diff --git a/projet_hello/.idea/projet_hello.iml b/.idea/Symphony_S_A.iml similarity index 63% rename from projet_hello/.idea/projet_hello.iml rename to .idea/Symphony_S_A.iml index 06eb85b1dcb8bd150480f4978bf866abfc9dc0cb..6df0dc38500878345f1825b65b584ece7518bea2 100644 --- a/projet_hello/.idea/projet_hello.iml +++ b/.idea/Symphony_S_A.iml @@ -17,12 +17,10 @@ - - + - - + diff --git a/projet_hello/.idea/modules.xml b/.idea/modules.xml similarity index 53% rename from projet_hello/.idea/modules.xml rename to .idea/modules.xml index 2640db87bd0d462bae71a1c78270d83749a3e44c..f2d7fb2685cf8c46524b00e0ef3b16e29a6abeed 100644 --- a/projet_hello/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000000000000000000000000000000000..94a25f7f4cb416c083d265558da75d457237d671 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000000000000000000000000000000000000..e5b7d334ccd2f9737dfce393ed0edc5ae0510b40 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1489232812889 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.project b/.project new file mode 100644 index 0000000000000000000000000000000000000000..184e068180e25d375592ea15ec44f434ccf1c773 --- /dev/null +++ b/.project @@ -0,0 +1,11 @@ + + + Symphony_S_A + + + + + + + + diff --git a/README.md b/README.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6a25db47151a336b6eb7818cf1ed6f04877423cf 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,4 @@ +projet +====== + +A Symfony project created on March 11, 2017, 7:35 pm. diff --git a/projet_hello/app/.htaccess b/app/.htaccess similarity index 100% rename from projet_hello/app/.htaccess rename to app/.htaccess diff --git a/projet_hello/app/AppCache.php b/app/AppCache.php similarity index 100% rename from projet_hello/app/AppCache.php rename to app/AppCache.php diff --git a/projet_hello/app/AppKernel.php b/app/AppKernel.php similarity index 100% rename from projet_hello/app/AppKernel.php rename to app/AppKernel.php diff --git a/projet_hello/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig similarity index 100% rename from projet_hello/app/Resources/views/base.html.twig rename to app/Resources/views/base.html.twig diff --git a/projet_hello/app/Resources/views/default/index.html.twig b/app/Resources/views/default/index.html.twig similarity index 100% rename from projet_hello/app/Resources/views/default/index.html.twig rename to app/Resources/views/default/index.html.twig diff --git a/projet_hello/app/autoload.php b/app/autoload.php similarity index 100% rename from projet_hello/app/autoload.php rename to app/autoload.php diff --git a/projet_hello/app/config/config.yml b/app/config/config.yml similarity index 57% rename from projet_hello/app/config/config.yml rename to app/config/config.yml index cfb039113335f9540fd6f8f35eda11508c2ac077..7ad4552b108f38f09c465b6ea9d14b741f3d8623 100644 --- a/projet_hello/app/config/config.yml +++ b/app/config/config.yml @@ -9,26 +9,26 @@ parameters: locale: en framework: - #esi: ~ - #translator: { fallbacks: ["%locale%"] } - secret: "%secret%" + #esi: ~ + #translator: { fallbacks: ['%locale%'] } + secret: '%secret%' router: - resource: "%kernel.root_dir%/config/routing.yml" + resource: '%kernel.root_dir%/config/routing.yml' strict_requirements: ~ - form: ~ + form: ~ csrf_protection: ~ - validation: { enable_annotations: true } - #serializer: { enable_annotations: true } + validation: { enable_annotations: true } + #serializer: { enable_annotations: true } templating: engines: ['twig'] - default_locale: "%locale%" - trusted_hosts: ~ + default_locale: '%locale%' + trusted_hosts: ~ trusted_proxies: ~ session: # http://symfony.com/doc/current/reference/configuration/framework.html#handler-id handler_id: session.handler.native_file save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%" - fragments: ~ + fragments: ~ http_method_override: true assets: ~ php_errors: @@ -36,35 +36,35 @@ framework: # Twig Configuration twig: - debug: "%kernel.debug%" - strict_variables: "%kernel.debug%" + debug: '%kernel.debug%' + strict_variables: '%kernel.debug%' # Doctrine Configuration doctrine: dbal: - driver: pdo_mysql - host: "%database_host%" - port: "%database_port%" - dbname: "%database_name%" - user: "%database_user%" - password: "%database_password%" - charset: UTF8 + driver: pdo_mysql + host: '%database_host%' + port: '%database_port%' + dbname: '%database_name%' + user: '%database_user%' + password: '%database_password%' + charset: UTF8 # if using pdo_sqlite as your database driver: # 1. add the path in parameters.yml # e.g. database_path: "%kernel.root_dir%/../var/data/data.sqlite" # 2. Uncomment database_path in parameters.yml.dist # 3. Uncomment next line: - #path: "%database_path%" + #path: '%database_path%' orm: - auto_generate_proxy_classes: "%kernel.debug%" + auto_generate_proxy_classes: '%kernel.debug%' naming_strategy: doctrine.orm.naming_strategy.underscore auto_mapping: true # Swiftmailer Configuration swiftmailer: - transport: "%mailer_transport%" - host: "%mailer_host%" - username: "%mailer_user%" - password: "%mailer_password%" - spool: { type: memory } + transport: '%mailer_transport%' + host: '%mailer_host%' + username: '%mailer_user%' + password: '%mailer_password%' + spool: { type: memory } diff --git a/projet_hello/app/config/config_dev.yml b/app/config/config_dev.yml similarity index 61% rename from projet_hello/app/config/config_dev.yml rename to app/config/config_dev.yml index 24831b535ea46e5c27ff8a6f3f5930c83c75e782..a616d3393f9740cdc6ab59e5192e4bdb0330eb6b 100644 --- a/projet_hello/app/config/config_dev.yml +++ b/app/config/config_dev.yml @@ -3,7 +3,7 @@ imports: framework: router: - resource: "%kernel.root_dir%/config/routing_dev.yml" + resource: '%kernel.root_dir%/config/routing_dev.yml' strict_requirements: true profiler: { only_exceptions: false } @@ -15,20 +15,20 @@ monolog: handlers: main: type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" + path: '%kernel.logs_dir%/%kernel.environment%.log' level: debug - channels: [!event] + channels: ['!event'] console: - type: console - channels: [!event, !doctrine] + type: console + channels: ['!event', '!doctrine'] # uncomment to get logging in your browser # you may have to allow bigger header sizes in your Web server configuration #firephp: - # type: firephp - # level: info + # type: firephp + # level: info #chromephp: - # type: chromephp - # level: info + # type: chromephp + # level: info #swiftmailer: # delivery_addresses: ['me@example.com'] diff --git a/projet_hello/app/config/config_prod.yml b/app/config/config_prod.yml similarity index 60% rename from projet_hello/app/config/config_prod.yml rename to app/config/config_prod.yml index 192f0c5c6e5a79879550e4c5de8a48167af07c97..0c85b038b0a4a2d4677278a0697d14a3f7595fbe 100644 --- a/projet_hello/app/config/config_prod.yml +++ b/app/config/config_prod.yml @@ -10,12 +10,12 @@ imports: monolog: handlers: main: - type: fingers_crossed + type: fingers_crossed action_level: error - handler: nested + handler: nested nested: - type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" + type: stream + path: '%kernel.logs_dir%/%kernel.environment%.log' level: debug console: - type: console + type: console diff --git a/projet_hello/app/config/config_test.yml b/app/config/config_test.yml similarity index 100% rename from projet_hello/app/config/config_test.yml rename to app/config/config_test.yml diff --git a/app/config/parameters.yml b/app/config/parameters.yml new file mode 100644 index 0000000000000000000000000000000000000000..5f80e725bbb32dc49fd5d9aa7b164dc75555d914 --- /dev/null +++ b/app/config/parameters.yml @@ -0,0 +1,12 @@ +# This file is auto-generated during the composer install +parameters: + database_host: 127.0.0.1 + database_port: null + database_name: symfony + database_user: root + database_password: null + mailer_transport: smtp + mailer_host: 127.0.0.1 + mailer_user: null + mailer_password: null + secret: d6fbf2d659c3fc14f77e4e680d7cf02c2bd41ccb diff --git a/projet_hello/app/config/parameters.yml.dist b/app/config/parameters.yml.dist similarity index 51% rename from projet_hello/app/config/parameters.yml.dist rename to app/config/parameters.yml.dist index 886c92bb8cb40e874d009d212a97f4f184c7d32d..8b636295d9c6a18d80d0182be265026dd75bce3e 100644 --- a/projet_hello/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -2,18 +2,18 @@ # Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production. # http://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration parameters: - database_host: 127.0.0.1 - database_port: ~ - database_name: symfony - database_user: root + database_host: 127.0.0.1 + database_port: ~ + database_name: symfony + database_user: root database_password: ~ - # You should uncomment this if you want use pdo_sqlite - # database_path: "%kernel.root_dir%/data.db3" + # You should uncomment this if you want to use pdo_sqlite + #database_path: "%kernel.root_dir%/data.db3" - mailer_transport: smtp - mailer_host: 127.0.0.1 - mailer_user: ~ - mailer_password: ~ + mailer_transport: smtp + mailer_host: 127.0.0.1 + mailer_user: ~ + mailer_password: ~ # A secret key that's used to generate certain security-related tokens - secret: ThisTokenIsNotSoSecretChangeIt + secret: ThisTokenIsNotSoSecretChangeIt diff --git a/app/config/routing.yml b/app/config/routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..2ec067f4c707d5c30c0ae38c61aef9b4c9f8bdb9 --- /dev/null +++ b/app/config/routing.yml @@ -0,0 +1,3 @@ +app: + resource: '@AppBundle/Controller/' + type: annotation diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml new file mode 100644 index 0000000000000000000000000000000000000000..20602eb27b4e3c4cf9c134464b9dea08a6d1f910 --- /dev/null +++ b/app/config/routing_dev.yml @@ -0,0 +1,14 @@ +_wdt: + resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' + prefix: /_wdt + +_profiler: + resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' + prefix: /_profiler + +_errors: + resource: '@TwigBundle/Resources/config/routing/errors.xml' + prefix: /_error + +_main: + resource: routing.yml diff --git a/projet_hello/app/config/security.yml b/app/config/security.yml similarity index 93% rename from projet_hello/app/config/security.yml rename to app/config/security.yml index 343eb49d06ce85eea1a4db9b8901436f5857dfc1..1086c1a7fb9a8a7c52402a14aaff6530121ff3f5 100644 --- a/projet_hello/app/config/security.yml +++ b/app/config/security.yml @@ -17,8 +17,8 @@ security: anonymous: ~ # activate different ways to authenticate - # http_basic: ~ # http://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate + #http_basic: ~ - # form_login: ~ # http://symfony.com/doc/current/cookbook/security/form_login_setup.html + #form_login: ~ diff --git a/app/config/services.yml b/app/config/services.yml new file mode 100644 index 0000000000000000000000000000000000000000..f15dc0ee60da6d486eb63ea5c726f5bb520b2c6a --- /dev/null +++ b/app/config/services.yml @@ -0,0 +1,9 @@ +# Learn more about services, parameters and containers at +# http://symfony.com/doc/current/service_container.html +parameters: + #parameter_name: value + +services: + #service_name: + # class: AppBundle\Directory\ClassName + # arguments: ['@another_service_name', 'plain_value', '%parameter_name%'] diff --git a/projet_hello/bin/console b/bin/console similarity index 100% rename from projet_hello/bin/console rename to bin/console diff --git a/projet_hello/bin/symfony_requirements b/bin/symfony_requirements similarity index 100% rename from projet_hello/bin/symfony_requirements rename to bin/symfony_requirements diff --git a/projet_hello/composer.json b/composer.json similarity index 89% rename from projet_hello/composer.json rename to composer.json index 1943e27fcfa59f49aba89716fea7ee4909153b67..11b6003d4917f4ba53d193fd541461f0481c6385 100644 --- a/projet_hello/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "sa162879/projet_hello", + "name": "c2i/projet", "license": "proprietary", "type": "project", "autoload": { @@ -14,22 +14,24 @@ "autoload-dev": { "psr-4": { "Tests\\": "tests/" - } + }, + "files": [ + "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" + ] }, "require": { "php": ">=5.5.9", - "symfony/symfony": "3.2.*", - "doctrine/orm": "^2.5", "doctrine/doctrine-bundle": "^1.6", "doctrine/doctrine-cache-bundle": "^1.2", - "symfony/swiftmailer-bundle": "^2.3.10", - "symfony/monolog-bundle": "^3.0.2", - "symfony/polyfill-apcu": "^1.0", + "doctrine/orm": "^2.5", + "incenteev/composer-parameter-handler": "^2.0", "sensio/distribution-bundle": "^5.0", "sensio/framework-extra-bundle": "^3.0.2", - "incenteev/composer-parameter-handler": "^2.0", - "twig/twig": "^1.0||^2.0", - "phpunit/phpunit": "^4.8" + "symfony/monolog-bundle": "^3.0.2", + "symfony/polyfill-apcu": "^1.0", + "symfony/swiftmailer-bundle": "^2.3.10", + "symfony/symfony": "3.2.*", + "twig/twig": "^1.0||^2.0" }, "require-dev": { "sensio/generator-bundle": "^3.0", @@ -51,6 +53,9 @@ "@symfony-scripts" ] }, + "config": { + "sort-packages": true + }, "extra": { "symfony-app-dir": "app", "symfony-bin-dir": "bin", diff --git a/projet_hello/composer.lock b/composer.lock similarity index 65% rename from projet_hello/composer.lock rename to composer.lock index acb0a76b504900f1cf0a34157452c4e71611f831..585e361f0bf49fbc4a788345a1276ea72387a2a1 100644 --- a/projet_hello/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "dc4ea0357fe5ff3dddbad467e3920faf", + "content-hash": "7cf8c664281db0ec9962404a01eacb48", "packages": [ { "name": "doctrine/annotations", @@ -955,16 +955,16 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.4", + "version": "v2.0.9", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e" + "reference": "6968531206671f94377b01dc7888d5d1b858a01b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e", - "reference": "a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/6968531206671f94377b01dc7888d5d1b858a01b", + "reference": "6968531206671f94377b01dc7888d5d1b858a01b", "shasum": "" }, "require": { @@ -999,1057 +999,100 @@ "pseudorandom", "random" ], - "time": "2016-11-07T23:38:38+00:00" + "time": "2017-03-03T20:43:42+00:00" }, { - "name": "phpdocumentor/reflection-common", - "version": "1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2015-12-27T11:43:31+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30T07:12:33+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.2.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2016-11-25T06:54:22+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1|^2.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2017-03-02T20:05:34+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-10-06T15:47:00+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2016-10-03T07:40:28+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2017-02-26T11:10:40+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.11", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2017-02-27T10:12:30+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "4.8.35", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/791b1a67c25af50e230f841ee7a9c6eba507dc87", - "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.8.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2017-02-06T05:18:07+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-10-02T06:51:40+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": "" - }, - "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/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "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": "2016-10-10T12:19:37+00:00" - }, - { - "name": "sebastian/comparator", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2017-01-29T09:50:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "1.4.1", + "name": "psr/cache", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-12-08T07:14:41+00:00" - }, - { - "name": "sebastian/environment", - "version": "1.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" + "psr-4": { + "Psr\\Cache\\": "src/" } }, - "autoload": { - "classmap": [ - "src/" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "description": "Common interface for caching libraries", "keywords": [ - "Xdebug", - "environment", - "hhvm" + "cache", + "psr", + "psr-6" ], - "time": "2016-08-18T05:49:44+00:00" + "time": "2016-08-06T20:24:11+00:00" }, { - "name": "sebastian/exporter", - "version": "1.2.2", + "name": "psr/log", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2016-06-17T09:04:28+00:00" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" + "psr-4": { + "Psr\\Log\\": "Psr/Log/" } }, - "autoload": { - "classmap": [ - "src/" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ - "global state" - ], - "time": "2015-10-12T03:26:01+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03T07:41:43+00:00" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } + "log", + "psr", + "psr-3" ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21T13:59:46+00:00" + "time": "2016-10-10T12:19:37+00:00" }, { "name": "sensio/distribution-bundle", @@ -2105,16 +1148,16 @@ }, { "name": "sensio/framework-extra-bundle", - "version": "v3.0.22", + "version": "v3.0.23", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", - "reference": "1c66c2e3b8f17f06178142386aff5a9f8057a104" + "reference": "d3601fd5709168ace7a1ca6eefa2619a1632b7f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/1c66c2e3b8f17f06178142386aff5a9f8057a104", - "reference": "1c66c2e3b8f17f06178142386aff5a9f8057a104", + "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/d3601fd5709168ace7a1ca6eefa2619a1632b7f7", + "reference": "d3601fd5709168ace7a1ca6eefa2619a1632b7f7", "shasum": "" }, "require": { @@ -2171,20 +1214,20 @@ "annotations", "controllers" ], - "time": "2017-02-15T06:52:30+00:00" + "time": "2017-03-02T20:17:28+00:00" }, { "name": "sensiolabs/security-checker", - "version": "v4.0.0", + "version": "v4.0.2", "source": { "type": "git", "url": "https://github.com/sensiolabs/security-checker.git", - "reference": "116027b57b568ed61b7b1c80eeb4f6ee9e8c599c" + "reference": "56bded66985e22f6eac2cf86735fd21c625bff2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/116027b57b568ed61b7b1c80eeb4f6ee9e8c599c", - "reference": "116027b57b568ed61b7b1c80eeb4f6ee9e8c599c", + "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/56bded66985e22f6eac2cf86735fd21c625bff2f", + "reference": "56bded66985e22f6eac2cf86735fd21c625bff2f", "shasum": "" }, "require": { @@ -2215,7 +1258,7 @@ } ], "description": "A security checker for your composer.lock", - "time": "2016-09-23T18:09:57+00:00" + "time": "2017-03-09T17:33:20+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -2670,16 +1713,16 @@ }, { "name": "symfony/swiftmailer-bundle", - "version": "v2.4.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/swiftmailer-bundle.git", - "reference": "ad751095576ce0c12a284e30e3fff80c91f27225" + "reference": "b59a70d03b948e29d070b6c4416b4a03af4748ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/ad751095576ce0c12a284e30e3fff80c91f27225", - "reference": "ad751095576ce0c12a284e30e3fff80c91f27225", + "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/b59a70d03b948e29d070b6c4416b4a03af4748ec", + "reference": "b59a70d03b948e29d070b6c4416b4a03af4748ec", "shasum": "" }, "require": { @@ -2701,7 +1744,7 @@ "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -2725,20 +1768,20 @@ ], "description": "Symfony SwiftmailerBundle", "homepage": "http://symfony.com", - "time": "2016-12-20T04:44:33+00:00" + "time": "2017-03-02T16:47:57+00:00" }, { "name": "symfony/symfony", - "version": "v3.2.4", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "141569be5b33a7cf0d141fb88422649fe11b0c47" + "reference": "b0f8a7fa4b8baadf9db299cb6ac87c96a8977dbe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/141569be5b33a7cf0d141fb88422649fe11b0c47", - "reference": "141569be5b33a7cf0d141fb88422649fe11b0c47", + "url": "https://api.github.com/repos/symfony/symfony/zipball/b0f8a7fa4b8baadf9db299cb6ac87c96a8977dbe", + "reference": "b0f8a7fa4b8baadf9db299cb6ac87c96a8977dbe", "shasum": "" }, "require": { @@ -2755,7 +1798,8 @@ }, "conflict": { "phpdocumentor/reflection-docblock": "<3.0", - "phpdocumentor/type-resolver": "<0.2.0" + "phpdocumentor/type-resolver": "<0.2.0", + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" }, "provide": { "psr/cache-implementation": "1.0" @@ -2868,33 +1912,34 @@ "keywords": [ "framework" ], - "time": "2017-02-17T00:00:43+00:00" + "time": "2017-03-10T18:35:48+00:00" }, { "name": "twig/twig", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "ddc9e3e20ee9c0b6908f401ac8353635b750eca7" + "reference": "9935b662e24d6e634da88901ab534cc12e8c728f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/ddc9e3e20ee9c0b6908f401ac8353635b750eca7", - "reference": "ddc9e3e20ee9c0b6908f401ac8353635b750eca7", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/9935b662e24d6e634da88901ab534cc12e8c728f", + "reference": "9935b662e24d6e634da88901ab534cc12e8c728f", "shasum": "" }, "require": { "php": ">=5.2.7" }, "require-dev": { + "psr/container": "^1.0", "symfony/debug": "~2.7", "symfony/phpunit-bridge": "~3.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.31-dev" + "dev-master": "1.32-dev" } }, "autoload": { @@ -2929,72 +1974,22 @@ "keywords": [ "templating" ], - "time": "2017-01-11T19:36:15+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2016-11-23T20:04:58+00:00" + "time": "2017-02-27T00:07:03+00:00" } ], "packages-dev": [ { "name": "sensio/generator-bundle", - "version": "v3.1.2", + "version": "v3.1.3", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git", - "reference": "ec278c0bd530edf155c4a00900577b5cb80f559e" + "reference": "c76c7833ed5ffe0f5aeef15e13939ddb59a684eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/ec278c0bd530edf155c4a00900577b5cb80f559e", - "reference": "ec278c0bd530edf155c4a00900577b5cb80f559e", + "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/c76c7833ed5ffe0f5aeef15e13939ddb59a684eb", + "reference": "c76c7833ed5ffe0f5aeef15e13939ddb59a684eb", "shasum": "" }, "require": { @@ -3033,25 +2028,28 @@ } ], "description": "This bundle generates code for you", - "time": "2016-12-05T16:01:19+00:00" + "time": "2017-03-03T15:22:50+00:00" }, { "name": "symfony/phpunit-bridge", - "version": "v3.2.4", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "996374975357b569ea319ec1c98c5ca0f7dda610" + "reference": "9103d17dd57c512a3a027bb5628f6701464d6fef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/996374975357b569ea319ec1c98c5ca0f7dda610", - "reference": "996374975357b569ea319ec1c98c5ca0f7dda610", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/9103d17dd57c512a3a027bb5628f6701464d6fef", + "reference": "9103d17dd57c512a3a027bb5628f6701464d6fef", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "conflict": { + "phpunit/phpunit": ">=6.0" + }, "suggest": { "ext-zip": "Zip support is required when using bin/simple-phpunit", "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" @@ -3092,7 +2090,7 @@ ], "description": "Symfony PHPUnit Bridge", "homepage": "https://symfony.com", - "time": "2017-01-21T17:06:35+00:00" + "time": "2017-03-09T12:58:16+00:00" } ], "aliases": [], @@ -3103,5 +2101,8 @@ "platform": { "php": ">=5.5.9" }, - "platform-dev": [] + "platform-dev": [], + "platform-overrides": { + "php": "5.5.9" + } } diff --git a/projet_hello/phpunit.xml.dist b/phpunit.xml.dist similarity index 100% rename from projet_hello/phpunit.xml.dist rename to phpunit.xml.dist diff --git a/projet_hello/.gitignore b/projet_hello/.gitignore deleted file mode 100644 index 93821ad1ce10daf8f7983737217dcae494ae08f3..0000000000000000000000000000000000000000 --- a/projet_hello/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -/app/config/parameters.yml -/build/ -/phpunit.xml -/var/* -!/var/cache -/var/cache/* -!var/cache/.gitkeep -!/var/logs -/var/logs/* -!var/logs/.gitkeep -!/var/sessions -/var/sessions/* -!var/sessions/.gitkeep -!var/SymfonyRequirements.php -/vendor/ -/web/bundles/ diff --git a/projet_hello/.idea/workspace.xml b/projet_hello/.idea/workspace.xml deleted file mode 100644 index 1e613df45f90d560bee2f548e5cc402ff0027e21..0000000000000000000000000000000000000000 --- a/projet_hello/.idea/workspace.xml +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - DEFINITION_ORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - project - - - true - - - - DIRECTORY - - false - - - - - - - - - 1488899632037 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/projet_hello/README.md b/projet_hello/README.md deleted file mode 100644 index 13c070da270de09e7f09920a3fffc57406cd65df..0000000000000000000000000000000000000000 --- a/projet_hello/README.md +++ /dev/null @@ -1,4 +0,0 @@ -projet_hello -============ - -A Symfony project created on March 7, 2017, 2:08 pm. diff --git a/projet_hello/app/Resources/views/default/hello.html.twig b/projet_hello/app/Resources/views/default/hello.html.twig deleted file mode 100644 index 870cd0f318834b58e842a9baa2f721fdfd5da35c..0000000000000000000000000000000000000000 --- a/projet_hello/app/Resources/views/default/hello.html.twig +++ /dev/null @@ -1,25 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block title %}Hello!{% endblock %} - -{% block body %} -
-
-

Hello {{ name }}!

-
- -
-{% endblock %} - -{% block stylesheets %} - -{% endblock %} diff --git a/projet_hello/app/config/routing.yml b/projet_hello/app/config/routing.yml deleted file mode 100644 index 8eadc31aebcf1182aabf51970d5ba38ecb22768e..0000000000000000000000000000000000000000 --- a/projet_hello/app/config/routing.yml +++ /dev/null @@ -1,3 +0,0 @@ -app: - resource: "@AppBundle/Controller/" - type: annotation diff --git a/projet_hello/app/config/routing_dev.yml b/projet_hello/app/config/routing_dev.yml deleted file mode 100644 index 404f6a3bce570a6acda8720e6d53b6845afd0a01..0000000000000000000000000000000000000000 --- a/projet_hello/app/config/routing_dev.yml +++ /dev/null @@ -1,14 +0,0 @@ -_wdt: - resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" - prefix: /_wdt - -_profiler: - resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" - prefix: /_profiler - -_errors: - resource: "@TwigBundle/Resources/config/routing/errors.xml" - prefix: /_error - -_main: - resource: routing.yml diff --git a/projet_hello/app/config/services.yml b/projet_hello/app/config/services.yml deleted file mode 100644 index 5a805ca49f6e9cb43a941989b0ccba7134868c0c..0000000000000000000000000000000000000000 --- a/projet_hello/app/config/services.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Learn more about services, parameters and containers at -# http://symfony.com/doc/current/service_container.html -parameters: -# parameter_name: value - -services: -# service_name: -# class: AppBundle\Directory\ClassName -# arguments: ["@another_service_name", "plain_value", "%parameter_name%"] diff --git a/projet_hello/composer.phar b/projet_hello/composer.phar deleted file mode 100755 index 1987803bf7e7a3be33aa5a523c8c07aff22c0ba0..0000000000000000000000000000000000000000 Binary files a/projet_hello/composer.phar and /dev/null differ diff --git a/projet_hello/src/AppBundle/Controller/HelloController.php b/projet_hello/src/AppBundle/Controller/HelloController.php deleted file mode 100644 index cd237ac68018bff3772f39c4b61db6e939d8c107..0000000000000000000000000000000000000000 --- a/projet_hello/src/AppBundle/Controller/HelloController.php +++ /dev/null @@ -1,46 +0,0 @@ -

Hello " - .self::generateRandomName() - ."

"); - } - - - static function generateRandomName() - { - $nouns = ['Circle', 'Cone', 'Cylinder', 'Ellipse', 'Hexagon', - 'Irregular Shape', 'Octagon', 'Oval', 'Parallelogram', 'Pentagon', - 'Pyramid', 'Rectangle', 'Semicircle', 'Sphere', 'Square', 'Star', - 'Trapezoid', 'Triangle', 'Wedge', 'Whorl']; - $adjectives = ['Amusing', 'Athletic', 'Beautiful', 'Brave', 'Careless', - 'Clever', 'Crafty', 'Creative', 'Cute', 'Dependable', 'Energetic', - 'Famous', 'Friendly', 'Graceful', 'Helpful', 'Humble', 'Inconsiderate', - 'Likable', 'Middle Class', 'Outgoing', 'Poor', 'Practical', 'Rich', - 'Sad', 'Skinny', 'Successful', 'Thin', 'Ugly', 'Wealth']; - return $adjectives[array_rand($adjectives)].' '.$nouns[array_rand($nouns)]; - } - - /** - * @Route("/hello/{name}", defaults={"name" = ""}) - */ -public function nameAction($name){ - if($name == ""){ - $name = self::generateRandomName(); - } - return new Response("

Hello $name

"); -} - -} - diff --git a/projet_hello/tests/AppBundle/Controller/HelloControllerTest.php b/projet_hello/tests/AppBundle/Controller/HelloControllerTest.php deleted file mode 100644 index e0ccf95ae7a858e36faaf495be3f8ba3880fc8bd..0000000000000000000000000000000000000000 --- a/projet_hello/tests/AppBundle/Controller/HelloControllerTest.php +++ /dev/null @@ -1,25 +0,0 @@ -request('GET', '/helloRandom'); - - $this->assertEquals(200, $client->getResponse()->getStatusCode()); - $this->assertContains('Hello ', $crawler->filter('h1')->text()); - } - - function testRandomNameGenerator(){ - $rdName = HelloController::generateRandomName(); - $this->assertGreaterThan(1, strlen($rdName)); - } - -} - diff --git a/projet_hello/src/.htaccess b/src/.htaccess similarity index 100% rename from projet_hello/src/.htaccess rename to src/.htaccess diff --git a/projet_hello/src/AppBundle/AppBundle.php b/src/AppBundle/AppBundle.php similarity index 100% rename from projet_hello/src/AppBundle/AppBundle.php rename to src/AppBundle/AppBundle.php diff --git a/projet_hello/src/AppBundle/Controller/DefaultController.php b/src/AppBundle/Controller/DefaultController.php similarity index 100% rename from projet_hello/src/AppBundle/Controller/DefaultController.php rename to src/AppBundle/Controller/DefaultController.php diff --git a/projet_hello/tests/AppBundle/Controller/DefaultControllerTest.php b/tests/AppBundle/Controller/DefaultControllerTest.php similarity index 100% rename from projet_hello/tests/AppBundle/Controller/DefaultControllerTest.php rename to tests/AppBundle/Controller/DefaultControllerTest.php diff --git a/projet_hello/var/SymfonyRequirements.php b/var/SymfonyRequirements.php similarity index 100% rename from projet_hello/var/SymfonyRequirements.php rename to var/SymfonyRequirements.php diff --git a/var/bootstrap.php.cache b/var/bootstrap.php.cache new file mode 100644 index 0000000000000000000000000000000000000000..1f54f8c1958acdb916541eca8621d6c21e98b011 --- /dev/null +++ b/var/bootstrap.php.cache @@ -0,0 +1,1305 @@ +parameters = $parameters; +} +public function all() +{ +return $this->parameters; +} +public function keys() +{ +return array_keys($this->parameters); +} +public function replace(array $parameters = array()) +{ +$this->parameters = $parameters; +} +public function add(array $parameters = array()) +{ +$this->parameters = array_replace($this->parameters, $parameters); +} +public function get($key, $default = null) +{ +return array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; +} +public function set($key, $value) +{ +$this->parameters[$key] = $value; +} +public function has($key) +{ +return array_key_exists($key, $this->parameters); +} +public function remove($key) +{ +unset($this->parameters[$key]); +} +public function getAlpha($key, $default ='') +{ +return preg_replace('/[^[:alpha:]]/','', $this->get($key, $default)); +} +public function getAlnum($key, $default ='') +{ +return preg_replace('/[^[:alnum:]]/','', $this->get($key, $default)); +} +public function getDigits($key, $default ='') +{ +return str_replace(array('-','+'),'', $this->filter($key, $default, FILTER_SANITIZE_NUMBER_INT)); +} +public function getInt($key, $default = 0) +{ +return (int) $this->get($key, $default); +} +public function getBoolean($key, $default = false) +{ +return $this->filter($key, $default, FILTER_VALIDATE_BOOLEAN); +} +public function filter($key, $default = null, $filter = FILTER_DEFAULT, $options = array()) +{ +$value = $this->get($key, $default); +if (!is_array($options) && $options) { +$options = array('flags'=> $options); +} +if (is_array($value) && !isset($options['flags'])) { +$options['flags'] = FILTER_REQUIRE_ARRAY; +} +return filter_var($value, $filter, $options); +} +public function getIterator() +{ +return new \ArrayIterator($this->parameters); +} +public function count() +{ +return count($this->parameters); +} +} +} +namespace Symfony\Component\HttpFoundation +{ +class HeaderBag implements \IteratorAggregate, \Countable +{ +protected $headers = array(); +protected $cacheControl = array(); +public function __construct(array $headers = array()) +{ +foreach ($headers as $key => $values) { +$this->set($key, $values); +} +} +public function __toString() +{ +if (!$this->headers) { +return''; +} +$max = max(array_map('strlen', array_keys($this->headers))) + 1; +$content =''; +ksort($this->headers); +foreach ($this->headers as $name => $values) { +$name = implode('-', array_map('ucfirst', explode('-', $name))); +foreach ($values as $value) { +$content .= sprintf("%-{$max}s %s\r\n", $name.':', $value); +} +} +return $content; +} +public function all() +{ +return $this->headers; +} +public function keys() +{ +return array_keys($this->headers); +} +public function replace(array $headers = array()) +{ +$this->headers = array(); +$this->add($headers); +} +public function add(array $headers) +{ +foreach ($headers as $key => $values) { +$this->set($key, $values); +} +} +public function get($key, $default = null, $first = true) +{ +$key = str_replace('_','-', strtolower($key)); +if (!array_key_exists($key, $this->headers)) { +if (null === $default) { +return $first ? null : array(); +} +return $first ? $default : array($default); +} +if ($first) { +return count($this->headers[$key]) ? $this->headers[$key][0] : $default; +} +return $this->headers[$key]; +} +public function set($key, $values, $replace = true) +{ +$key = str_replace('_','-', strtolower($key)); +$values = array_values((array) $values); +if (true === $replace || !isset($this->headers[$key])) { +$this->headers[$key] = $values; +} else { +$this->headers[$key] = array_merge($this->headers[$key], $values); +} +if ('cache-control'=== $key) { +$this->cacheControl = $this->parseCacheControl($values[0]); +} +} +public function has($key) +{ +return array_key_exists(str_replace('_','-', strtolower($key)), $this->headers); +} +public function contains($key, $value) +{ +return in_array($value, $this->get($key, null, false)); +} +public function remove($key) +{ +$key = str_replace('_','-', strtolower($key)); +unset($this->headers[$key]); +if ('cache-control'=== $key) { +$this->cacheControl = array(); +} +} +public function getDate($key, \DateTime $default = null) +{ +if (null === $value = $this->get($key)) { +return $default; +} +if (false === $date = \DateTime::createFromFormat(DATE_RFC2822, $value)) { +throw new \RuntimeException(sprintf('The %s HTTP header is not parseable (%s).', $key, $value)); +} +return $date; +} +public function addCacheControlDirective($key, $value = true) +{ +$this->cacheControl[$key] = $value; +$this->set('Cache-Control', $this->getCacheControlHeader()); +} +public function hasCacheControlDirective($key) +{ +return array_key_exists($key, $this->cacheControl); +} +public function getCacheControlDirective($key) +{ +return array_key_exists($key, $this->cacheControl) ? $this->cacheControl[$key] : null; +} +public function removeCacheControlDirective($key) +{ +unset($this->cacheControl[$key]); +$this->set('Cache-Control', $this->getCacheControlHeader()); +} +public function getIterator() +{ +return new \ArrayIterator($this->headers); +} +public function count() +{ +return count($this->headers); +} +protected function getCacheControlHeader() +{ +$parts = array(); +ksort($this->cacheControl); +foreach ($this->cacheControl as $key => $value) { +if (true === $value) { +$parts[] = $key; +} else { +if (preg_match('#[^a-zA-Z0-9._-]#', $value)) { +$value ='"'.$value.'"'; +} +$parts[] = "$key=$value"; +} +} +return implode(', ', $parts); +} +protected function parseCacheControl($header) +{ +$cacheControl = array(); +preg_match_all('#([a-zA-Z][a-zA-Z_-]*)\s*(?:=(?:"([^"]*)"|([^ \t",;]*)))?#', $header, $matches, PREG_SET_ORDER); +foreach ($matches as $match) { +$cacheControl[strtolower($match[1])] = isset($match[3]) ? $match[3] : (isset($match[2]) ? $match[2] : true); +} +return $cacheControl; +} +} +} +namespace Symfony\Component\HttpFoundation +{ +use Symfony\Component\HttpFoundation\File\UploadedFile; +class FileBag extends ParameterBag +{ +private static $fileKeys = array('error','name','size','tmp_name','type'); +public function __construct(array $parameters = array()) +{ +$this->replace($parameters); +} +public function replace(array $files = array()) +{ +$this->parameters = array(); +$this->add($files); +} +public function set($key, $value) +{ +if (!is_array($value) && !$value instanceof UploadedFile) { +throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.'); +} +parent::set($key, $this->convertFileInformation($value)); +} +public function add(array $files = array()) +{ +foreach ($files as $key => $file) { +$this->set($key, $file); +} +} +protected function convertFileInformation($file) +{ +if ($file instanceof UploadedFile) { +return $file; +} +$file = $this->fixPhpFilesArray($file); +if (is_array($file)) { +$keys = array_keys($file); +sort($keys); +if ($keys == self::$fileKeys) { +if (UPLOAD_ERR_NO_FILE == $file['error']) { +$file = null; +} else { +$file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error']); +} +} else { +$file = array_map(array($this,'convertFileInformation'), $file); +} +} +return $file; +} +protected function fixPhpFilesArray($data) +{ +if (!is_array($data)) { +return $data; +} +$keys = array_keys($data); +sort($keys); +if (self::$fileKeys != $keys || !isset($data['name']) || !is_array($data['name'])) { +return $data; +} +$files = $data; +foreach (self::$fileKeys as $k) { +unset($files[$k]); +} +foreach ($data['name'] as $key => $name) { +$files[$key] = $this->fixPhpFilesArray(array('error'=> $data['error'][$key],'name'=> $name,'type'=> $data['type'][$key],'tmp_name'=> $data['tmp_name'][$key],'size'=> $data['size'][$key], +)); +} +return $files; +} +} +} +namespace Symfony\Component\HttpFoundation +{ +class ServerBag extends ParameterBag +{ +public function getHeaders() +{ +$headers = array(); +$contentHeaders = array('CONTENT_LENGTH'=> true,'CONTENT_MD5'=> true,'CONTENT_TYPE'=> true); +foreach ($this->parameters as $key => $value) { +if (0 === strpos($key,'HTTP_')) { +$headers[substr($key, 5)] = $value; +} +elseif (isset($contentHeaders[$key])) { +$headers[$key] = $value; +} +} +if (isset($this->parameters['PHP_AUTH_USER'])) { +$headers['PHP_AUTH_USER'] = $this->parameters['PHP_AUTH_USER']; +$headers['PHP_AUTH_PW'] = isset($this->parameters['PHP_AUTH_PW']) ? $this->parameters['PHP_AUTH_PW'] :''; +} else { +$authorizationHeader = null; +if (isset($this->parameters['HTTP_AUTHORIZATION'])) { +$authorizationHeader = $this->parameters['HTTP_AUTHORIZATION']; +} elseif (isset($this->parameters['REDIRECT_HTTP_AUTHORIZATION'])) { +$authorizationHeader = $this->parameters['REDIRECT_HTTP_AUTHORIZATION']; +} +if (null !== $authorizationHeader) { +if (0 === stripos($authorizationHeader,'basic ')) { +$exploded = explode(':', base64_decode(substr($authorizationHeader, 6)), 2); +if (count($exploded) == 2) { +list($headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']) = $exploded; +} +} elseif (empty($this->parameters['PHP_AUTH_DIGEST']) && (0 === stripos($authorizationHeader,'digest '))) { +$headers['PHP_AUTH_DIGEST'] = $authorizationHeader; +$this->parameters['PHP_AUTH_DIGEST'] = $authorizationHeader; +} elseif (0 === stripos($authorizationHeader,'bearer ')) { +$headers['AUTHORIZATION'] = $authorizationHeader; +} +} +} +if (isset($headers['AUTHORIZATION'])) { +return $headers; +} +if (isset($headers['PHP_AUTH_USER'])) { +$headers['AUTHORIZATION'] ='Basic '.base64_encode($headers['PHP_AUTH_USER'].':'.$headers['PHP_AUTH_PW']); +} elseif (isset($headers['PHP_AUTH_DIGEST'])) { +$headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST']; +} +return $headers; +} +} +} +namespace Symfony\Component\HttpFoundation +{ +use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; +use Symfony\Component\HttpFoundation\Session\SessionInterface; +class Request +{ +const HEADER_FORWARDED ='forwarded'; +const HEADER_CLIENT_IP ='client_ip'; +const HEADER_CLIENT_HOST ='client_host'; +const HEADER_CLIENT_PROTO ='client_proto'; +const HEADER_CLIENT_PORT ='client_port'; +const METHOD_HEAD ='HEAD'; +const METHOD_GET ='GET'; +const METHOD_POST ='POST'; +const METHOD_PUT ='PUT'; +const METHOD_PATCH ='PATCH'; +const METHOD_DELETE ='DELETE'; +const METHOD_PURGE ='PURGE'; +const METHOD_OPTIONS ='OPTIONS'; +const METHOD_TRACE ='TRACE'; +const METHOD_CONNECT ='CONNECT'; +protected static $trustedProxies = array(); +protected static $trustedHostPatterns = array(); +protected static $trustedHosts = array(); +protected static $trustedHeaders = array( +self::HEADER_FORWARDED =>'FORWARDED', +self::HEADER_CLIENT_IP =>'X_FORWARDED_FOR', +self::HEADER_CLIENT_HOST =>'X_FORWARDED_HOST', +self::HEADER_CLIENT_PROTO =>'X_FORWARDED_PROTO', +self::HEADER_CLIENT_PORT =>'X_FORWARDED_PORT', +); +protected static $httpMethodParameterOverride = false; +public $attributes; +public $request; +public $query; +public $server; +public $files; +public $cookies; +public $headers; +protected $content; +protected $languages; +protected $charsets; +protected $encodings; +protected $acceptableContentTypes; +protected $pathInfo; +protected $requestUri; +protected $baseUrl; +protected $basePath; +protected $method; +protected $format; +protected $session; +protected $locale; +protected $defaultLocale ='en'; +protected static $formats; +protected static $requestFactory; +public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) +{ +$this->initialize($query, $request, $attributes, $cookies, $files, $server, $content); +} +public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) +{ +$this->request = new ParameterBag($request); +$this->query = new ParameterBag($query); +$this->attributes = new ParameterBag($attributes); +$this->cookies = new ParameterBag($cookies); +$this->files = new FileBag($files); +$this->server = new ServerBag($server); +$this->headers = new HeaderBag($this->server->getHeaders()); +$this->content = $content; +$this->languages = null; +$this->charsets = null; +$this->encodings = null; +$this->acceptableContentTypes = null; +$this->pathInfo = null; +$this->requestUri = null; +$this->baseUrl = null; +$this->basePath = null; +$this->method = null; +$this->format = null; +} +public static function createFromGlobals() +{ +$server = $_SERVER; +if ('cli-server'=== PHP_SAPI) { +if (array_key_exists('HTTP_CONTENT_LENGTH', $_SERVER)) { +$server['CONTENT_LENGTH'] = $_SERVER['HTTP_CONTENT_LENGTH']; +} +if (array_key_exists('HTTP_CONTENT_TYPE', $_SERVER)) { +$server['CONTENT_TYPE'] = $_SERVER['HTTP_CONTENT_TYPE']; +} +} +$request = self::createRequestFromFactory($_GET, $_POST, array(), $_COOKIE, $_FILES, $server); +if (0 === strpos($request->headers->get('CONTENT_TYPE'),'application/x-www-form-urlencoded') +&& in_array(strtoupper($request->server->get('REQUEST_METHOD','GET')), array('PUT','DELETE','PATCH')) +) { +parse_str($request->getContent(), $data); +$request->request = new ParameterBag($data); +} +return $request; +} +public static function create($uri, $method ='GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null) +{ +$server = array_replace(array('SERVER_NAME'=>'localhost','SERVER_PORT'=> 80,'HTTP_HOST'=>'localhost','HTTP_USER_AGENT'=>'Symfony/3.X','HTTP_ACCEPT'=>'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8','HTTP_ACCEPT_LANGUAGE'=>'en-us,en;q=0.5','HTTP_ACCEPT_CHARSET'=>'ISO-8859-1,utf-8;q=0.7,*;q=0.7','REMOTE_ADDR'=>'127.0.0.1','SCRIPT_NAME'=>'','SCRIPT_FILENAME'=>'','SERVER_PROTOCOL'=>'HTTP/1.1','REQUEST_TIME'=> time(), +), $server); +$server['PATH_INFO'] =''; +$server['REQUEST_METHOD'] = strtoupper($method); +$components = parse_url($uri); +if (isset($components['host'])) { +$server['SERVER_NAME'] = $components['host']; +$server['HTTP_HOST'] = $components['host']; +} +if (isset($components['scheme'])) { +if ('https'=== $components['scheme']) { +$server['HTTPS'] ='on'; +$server['SERVER_PORT'] = 443; +} else { +unset($server['HTTPS']); +$server['SERVER_PORT'] = 80; +} +} +if (isset($components['port'])) { +$server['SERVER_PORT'] = $components['port']; +$server['HTTP_HOST'] = $server['HTTP_HOST'].':'.$components['port']; +} +if (isset($components['user'])) { +$server['PHP_AUTH_USER'] = $components['user']; +} +if (isset($components['pass'])) { +$server['PHP_AUTH_PW'] = $components['pass']; +} +if (!isset($components['path'])) { +$components['path'] ='/'; +} +switch (strtoupper($method)) { +case'POST': +case'PUT': +case'DELETE': +if (!isset($server['CONTENT_TYPE'])) { +$server['CONTENT_TYPE'] ='application/x-www-form-urlencoded'; +} +case'PATCH': +$request = $parameters; +$query = array(); +break; +default: +$request = array(); +$query = $parameters; +break; +} +$queryString =''; +if (isset($components['query'])) { +parse_str(html_entity_decode($components['query']), $qs); +if ($query) { +$query = array_replace($qs, $query); +$queryString = http_build_query($query,'','&'); +} else { +$query = $qs; +$queryString = $components['query']; +} +} elseif ($query) { +$queryString = http_build_query($query,'','&'); +} +$server['REQUEST_URI'] = $components['path'].(''!== $queryString ?'?'.$queryString :''); +$server['QUERY_STRING'] = $queryString; +return self::createRequestFromFactory($query, $request, array(), $cookies, $files, $server, $content); +} +public static function setFactory($callable) +{ +self::$requestFactory = $callable; +} +public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) +{ +$dup = clone $this; +if ($query !== null) { +$dup->query = new ParameterBag($query); +} +if ($request !== null) { +$dup->request = new ParameterBag($request); +} +if ($attributes !== null) { +$dup->attributes = new ParameterBag($attributes); +} +if ($cookies !== null) { +$dup->cookies = new ParameterBag($cookies); +} +if ($files !== null) { +$dup->files = new FileBag($files); +} +if ($server !== null) { +$dup->server = new ServerBag($server); +$dup->headers = new HeaderBag($dup->server->getHeaders()); +} +$dup->languages = null; +$dup->charsets = null; +$dup->encodings = null; +$dup->acceptableContentTypes = null; +$dup->pathInfo = null; +$dup->requestUri = null; +$dup->baseUrl = null; +$dup->basePath = null; +$dup->method = null; +$dup->format = null; +if (!$dup->get('_format') && $this->get('_format')) { +$dup->attributes->set('_format', $this->get('_format')); +} +if (!$dup->getRequestFormat(null)) { +$dup->setRequestFormat($this->getRequestFormat(null)); +} +return $dup; +} +public function __clone() +{ +$this->query = clone $this->query; +$this->request = clone $this->request; +$this->attributes = clone $this->attributes; +$this->cookies = clone $this->cookies; +$this->files = clone $this->files; +$this->server = clone $this->server; +$this->headers = clone $this->headers; +} +public function __toString() +{ +try { +$content = $this->getContent(); +} catch (\LogicException $e) { +return trigger_error($e, E_USER_ERROR); +} +return +sprintf('%s %s %s', $this->getMethod(), $this->getRequestUri(), $this->server->get('SERVER_PROTOCOL'))."\r\n". +$this->headers."\r\n". +$content; +} +public function overrideGlobals() +{ +$this->server->set('QUERY_STRING', static::normalizeQueryString(http_build_query($this->query->all(), null,'&'))); +$_GET = $this->query->all(); +$_POST = $this->request->all(); +$_SERVER = $this->server->all(); +$_COOKIE = $this->cookies->all(); +foreach ($this->headers->all() as $key => $value) { +$key = strtoupper(str_replace('-','_', $key)); +if (in_array($key, array('CONTENT_TYPE','CONTENT_LENGTH'))) { +$_SERVER[$key] = implode(', ', $value); +} else { +$_SERVER['HTTP_'.$key] = implode(', ', $value); +} +} +$request = array('g'=> $_GET,'p'=> $_POST,'c'=> $_COOKIE); +$requestOrder = ini_get('request_order') ?: ini_get('variables_order'); +$requestOrder = preg_replace('#[^cgp]#','', strtolower($requestOrder)) ?:'gp'; +$_REQUEST = array(); +foreach (str_split($requestOrder) as $order) { +$_REQUEST = array_merge($_REQUEST, $request[$order]); +} +} +public static function setTrustedProxies(array $proxies) +{ +self::$trustedProxies = $proxies; +} +public static function getTrustedProxies() +{ +return self::$trustedProxies; +} +public static function setTrustedHosts(array $hostPatterns) +{ +self::$trustedHostPatterns = array_map(function ($hostPattern) { +return sprintf('#%s#i', $hostPattern); +}, $hostPatterns); +self::$trustedHosts = array(); +} +public static function getTrustedHosts() +{ +return self::$trustedHostPatterns; +} +public static function setTrustedHeaderName($key, $value) +{ +if (!array_key_exists($key, self::$trustedHeaders)) { +throw new \InvalidArgumentException(sprintf('Unable to set the trusted header name for key "%s".', $key)); +} +self::$trustedHeaders[$key] = $value; +} +public static function getTrustedHeaderName($key) +{ +if (!array_key_exists($key, self::$trustedHeaders)) { +throw new \InvalidArgumentException(sprintf('Unable to get the trusted header name for key "%s".', $key)); +} +return self::$trustedHeaders[$key]; +} +public static function normalizeQueryString($qs) +{ +if (''== $qs) { +return''; +} +$parts = array(); +$order = array(); +foreach (explode('&', $qs) as $param) { +if (''=== $param ||'='=== $param[0]) { +continue; +} +$keyValuePair = explode('=', $param, 2); +$parts[] = isset($keyValuePair[1]) ? +rawurlencode(urldecode($keyValuePair[0])).'='.rawurlencode(urldecode($keyValuePair[1])) : +rawurlencode(urldecode($keyValuePair[0])); +$order[] = urldecode($keyValuePair[0]); +} +array_multisort($order, SORT_ASC, $parts); +return implode('&', $parts); +} +public static function enableHttpMethodParameterOverride() +{ +self::$httpMethodParameterOverride = true; +} +public static function getHttpMethodParameterOverride() +{ +return self::$httpMethodParameterOverride; +} +public function get($key, $default = null) +{ +if ($this !== $result = $this->attributes->get($key, $this)) { +return $result; +} +if ($this !== $result = $this->query->get($key, $this)) { +return $result; +} +if ($this !== $result = $this->request->get($key, $this)) { +return $result; +} +return $default; +} +public function getSession() +{ +return $this->session; +} +public function hasPreviousSession() +{ +return $this->hasSession() && $this->cookies->has($this->session->getName()); +} +public function hasSession() +{ +return null !== $this->session; +} +public function setSession(SessionInterface $session) +{ +$this->session = $session; +} +public function getClientIps() +{ +$clientIps = array(); +$ip = $this->server->get('REMOTE_ADDR'); +if (!$this->isFromTrustedProxy()) { +return array($ip); +} +$hasTrustedForwardedHeader = self::$trustedHeaders[self::HEADER_FORWARDED] && $this->headers->has(self::$trustedHeaders[self::HEADER_FORWARDED]); +$hasTrustedClientIpHeader = self::$trustedHeaders[self::HEADER_CLIENT_IP] && $this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP]); +if ($hasTrustedForwardedHeader) { +$forwardedHeader = $this->headers->get(self::$trustedHeaders[self::HEADER_FORWARDED]); +preg_match_all('{(for)=("?\[?)([a-z0-9\.:_\-/]*)}', $forwardedHeader, $matches); +$forwardedClientIps = $matches[3]; +$forwardedClientIps = $this->normalizeAndFilterClientIps($forwardedClientIps, $ip); +$clientIps = $forwardedClientIps; +} +if ($hasTrustedClientIpHeader) { +$xForwardedForClientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP]))); +$xForwardedForClientIps = $this->normalizeAndFilterClientIps($xForwardedForClientIps, $ip); +$clientIps = $xForwardedForClientIps; +} +if ($hasTrustedForwardedHeader && $hasTrustedClientIpHeader && $forwardedClientIps !== $xForwardedForClientIps) { +throw new ConflictingHeadersException('The request has both a trusted Forwarded header and a trusted Client IP header, conflicting with each other with regards to the originating IP addresses of the request. This is the result of a misconfiguration. You should either configure your proxy only to send one of these headers, or configure Symfony to distrust one of them.'); +} +if (!$hasTrustedForwardedHeader && !$hasTrustedClientIpHeader) { +return $this->normalizeAndFilterClientIps(array(), $ip); +} +return $clientIps; +} +public function getClientIp() +{ +$ipAddresses = $this->getClientIps(); +return $ipAddresses[0]; +} +public function getScriptName() +{ +return $this->server->get('SCRIPT_NAME', $this->server->get('ORIG_SCRIPT_NAME','')); +} +public function getPathInfo() +{ +if (null === $this->pathInfo) { +$this->pathInfo = $this->preparePathInfo(); +} +return $this->pathInfo; +} +public function getBasePath() +{ +if (null === $this->basePath) { +$this->basePath = $this->prepareBasePath(); +} +return $this->basePath; +} +public function getBaseUrl() +{ +if (null === $this->baseUrl) { +$this->baseUrl = $this->prepareBaseUrl(); +} +return $this->baseUrl; +} +public function getScheme() +{ +return $this->isSecure() ?'https':'http'; +} +public function getPort() +{ +if ($this->isFromTrustedProxy()) { +if (self::$trustedHeaders[self::HEADER_CLIENT_PORT] && $port = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PORT])) { +return $port; +} +if (self::$trustedHeaders[self::HEADER_CLIENT_PROTO] &&'https'=== $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PROTO],'http')) { +return 443; +} +} +if ($host = $this->headers->get('HOST')) { +if ($host[0] ==='[') { +$pos = strpos($host,':', strrpos($host,']')); +} else { +$pos = strrpos($host,':'); +} +if (false !== $pos) { +return (int) substr($host, $pos + 1); +} +return'https'=== $this->getScheme() ? 443 : 80; +} +return $this->server->get('SERVER_PORT'); +} +public function getUser() +{ +return $this->headers->get('PHP_AUTH_USER'); +} +public function getPassword() +{ +return $this->headers->get('PHP_AUTH_PW'); +} +public function getUserInfo() +{ +$userinfo = $this->getUser(); +$pass = $this->getPassword(); +if (''!= $pass) { +$userinfo .= ":$pass"; +} +return $userinfo; +} +public function getHttpHost() +{ +$scheme = $this->getScheme(); +$port = $this->getPort(); +if (('http'== $scheme && $port == 80) || ('https'== $scheme && $port == 443)) { +return $this->getHost(); +} +return $this->getHost().':'.$port; +} +public function getRequestUri() +{ +if (null === $this->requestUri) { +$this->requestUri = $this->prepareRequestUri(); +} +return $this->requestUri; +} +public function getSchemeAndHttpHost() +{ +return $this->getScheme().'://'.$this->getHttpHost(); +} +public function getUri() +{ +if (null !== $qs = $this->getQueryString()) { +$qs ='?'.$qs; +} +return $this->getSchemeAndHttpHost().$this->getBaseUrl().$this->getPathInfo().$qs; +} +public function getUriForPath($path) +{ +return $this->getSchemeAndHttpHost().$this->getBaseUrl().$path; +} +public function getRelativeUriForPath($path) +{ +if (!isset($path[0]) ||'/'!== $path[0]) { +return $path; +} +if ($path === $basePath = $this->getPathInfo()) { +return''; +} +$sourceDirs = explode('/', isset($basePath[0]) &&'/'=== $basePath[0] ? substr($basePath, 1) : $basePath); +$targetDirs = explode('/', isset($path[0]) &&'/'=== $path[0] ? substr($path, 1) : $path); +array_pop($sourceDirs); +$targetFile = array_pop($targetDirs); +foreach ($sourceDirs as $i => $dir) { +if (isset($targetDirs[$i]) && $dir === $targetDirs[$i]) { +unset($sourceDirs[$i], $targetDirs[$i]); +} else { +break; +} +} +$targetDirs[] = $targetFile; +$path = str_repeat('../', count($sourceDirs)).implode('/', $targetDirs); +return !isset($path[0]) ||'/'=== $path[0] +|| false !== ($colonPos = strpos($path,':')) && ($colonPos < ($slashPos = strpos($path,'/')) || false === $slashPos) +? "./$path" : $path; +} +public function getQueryString() +{ +$qs = static::normalizeQueryString($this->server->get('QUERY_STRING')); +return''=== $qs ? null : $qs; +} +public function isSecure() +{ +if ($this->isFromTrustedProxy() && self::$trustedHeaders[self::HEADER_CLIENT_PROTO] && $proto = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PROTO])) { +return in_array(strtolower(current(explode(',', $proto))), array('https','on','ssl','1')); +} +$https = $this->server->get('HTTPS'); +return !empty($https) &&'off'!== strtolower($https); +} +public function getHost() +{ +if ($this->isFromTrustedProxy() && self::$trustedHeaders[self::HEADER_CLIENT_HOST] && $host = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_HOST])) { +$elements = explode(',', $host); +$host = $elements[count($elements) - 1]; +} elseif (!$host = $this->headers->get('HOST')) { +if (!$host = $this->server->get('SERVER_NAME')) { +$host = $this->server->get('SERVER_ADDR',''); +} +} +$host = strtolower(preg_replace('/:\d+$/','', trim($host))); +if ($host &&''!== preg_replace('/(?:^\[)?[a-zA-Z0-9-:\]_]+\.?/','', $host)) { +throw new \UnexpectedValueException(sprintf('Invalid Host "%s"', $host)); +} +if (count(self::$trustedHostPatterns) > 0) { +if (in_array($host, self::$trustedHosts)) { +return $host; +} +foreach (self::$trustedHostPatterns as $pattern) { +if (preg_match($pattern, $host)) { +self::$trustedHosts[] = $host; +return $host; +} +} +throw new \UnexpectedValueException(sprintf('Untrusted Host "%s"', $host)); +} +return $host; +} +public function setMethod($method) +{ +$this->method = null; +$this->server->set('REQUEST_METHOD', $method); +} +public function getMethod() +{ +if (null === $this->method) { +$this->method = strtoupper($this->server->get('REQUEST_METHOD','GET')); +if ('POST'=== $this->method) { +if ($method = $this->headers->get('X-HTTP-METHOD-OVERRIDE')) { +$this->method = strtoupper($method); +} elseif (self::$httpMethodParameterOverride) { +$this->method = strtoupper($this->request->get('_method', $this->query->get('_method','POST'))); +} +} +} +return $this->method; +} +public function getRealMethod() +{ +return strtoupper($this->server->get('REQUEST_METHOD','GET')); +} +public function getMimeType($format) +{ +if (null === static::$formats) { +static::initializeFormats(); +} +return isset(static::$formats[$format]) ? static::$formats[$format][0] : null; +} +public static function getMimeTypes($format) +{ +if (null === static::$formats) { +static::initializeFormats(); +} +return isset(static::$formats[$format]) ? static::$formats[$format] : array(); +} +public function getFormat($mimeType) +{ +$canonicalMimeType = null; +if (false !== $pos = strpos($mimeType,';')) { +$canonicalMimeType = substr($mimeType, 0, $pos); +} +if (null === static::$formats) { +static::initializeFormats(); +} +foreach (static::$formats as $format => $mimeTypes) { +if (in_array($mimeType, (array) $mimeTypes)) { +return $format; +} +if (null !== $canonicalMimeType && in_array($canonicalMimeType, (array) $mimeTypes)) { +return $format; +} +} +} +public function setFormat($format, $mimeTypes) +{ +if (null === static::$formats) { +static::initializeFormats(); +} +static::$formats[$format] = is_array($mimeTypes) ? $mimeTypes : array($mimeTypes); +} +public function getRequestFormat($default ='html') +{ +if (null === $this->format) { +$this->format = $this->attributes->get('_format'); +} +return null === $this->format ? $default : $this->format; +} +public function setRequestFormat($format) +{ +$this->format = $format; +} +public function getContentType() +{ +return $this->getFormat($this->headers->get('CONTENT_TYPE')); +} +public function setDefaultLocale($locale) +{ +$this->defaultLocale = $locale; +if (null === $this->locale) { +$this->setPhpDefaultLocale($locale); +} +} +public function getDefaultLocale() +{ +return $this->defaultLocale; +} +public function setLocale($locale) +{ +$this->setPhpDefaultLocale($this->locale = $locale); +} +public function getLocale() +{ +return null === $this->locale ? $this->defaultLocale : $this->locale; +} +public function isMethod($method) +{ +return $this->getMethod() === strtoupper($method); +} +public function isMethodSafe() +{ +if (!func_num_args() || func_get_arg(0)) { +@trigger_error('Checking only for cacheable HTTP methods with Symfony\Component\HttpFoundation\Request::isMethodSafe() is deprecated since version 3.2 and will throw an exception in 4.0. Disable checking only for cacheable methods by calling the method with `false` as first argument or use the Request::isMethodCacheable() instead.', E_USER_DEPRECATED); +return in_array($this->getMethod(), array('GET','HEAD')); +} +return in_array($this->getMethod(), array('GET','HEAD','OPTIONS','TRACE')); +} +public function isMethodIdempotent() +{ +return in_array($this->getMethod(), array('HEAD','GET','PUT','DELETE','TRACE','OPTIONS','PURGE')); +} +public function isMethodCacheable() +{ +return in_array($this->getMethod(), array('GET','HEAD')); +} +public function getContent($asResource = false) +{ +$currentContentIsResource = is_resource($this->content); +if (PHP_VERSION_ID < 50600 && false === $this->content) { +throw new \LogicException('getContent() can only be called once when using the resource return type and PHP below 5.6.'); +} +if (true === $asResource) { +if ($currentContentIsResource) { +rewind($this->content); +return $this->content; +} +if (is_string($this->content)) { +$resource = fopen('php://temp','r+'); +fwrite($resource, $this->content); +rewind($resource); +return $resource; +} +$this->content = false; +return fopen('php://input','rb'); +} +if ($currentContentIsResource) { +rewind($this->content); +return stream_get_contents($this->content); +} +if (null === $this->content || false === $this->content) { +$this->content = file_get_contents('php://input'); +} +return $this->content; +} +public function getETags() +{ +return preg_split('/\s*,\s*/', $this->headers->get('if_none_match'), null, PREG_SPLIT_NO_EMPTY); +} +public function isNoCache() +{ +return $this->headers->hasCacheControlDirective('no-cache') ||'no-cache'== $this->headers->get('Pragma'); +} +public function getPreferredLanguage(array $locales = null) +{ +$preferredLanguages = $this->getLanguages(); +if (empty($locales)) { +return isset($preferredLanguages[0]) ? $preferredLanguages[0] : null; +} +if (!$preferredLanguages) { +return $locales[0]; +} +$extendedPreferredLanguages = array(); +foreach ($preferredLanguages as $language) { +$extendedPreferredLanguages[] = $language; +if (false !== $position = strpos($language,'_')) { +$superLanguage = substr($language, 0, $position); +if (!in_array($superLanguage, $preferredLanguages)) { +$extendedPreferredLanguages[] = $superLanguage; +} +} +} +$preferredLanguages = array_values(array_intersect($extendedPreferredLanguages, $locales)); +return isset($preferredLanguages[0]) ? $preferredLanguages[0] : $locales[0]; +} +public function getLanguages() +{ +if (null !== $this->languages) { +return $this->languages; +} +$languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all(); +$this->languages = array(); +foreach ($languages as $lang => $acceptHeaderItem) { +if (false !== strpos($lang,'-')) { +$codes = explode('-', $lang); +if ('i'=== $codes[0]) { +if (count($codes) > 1) { +$lang = $codes[1]; +} +} else { +for ($i = 0, $max = count($codes); $i < $max; ++$i) { +if ($i === 0) { +$lang = strtolower($codes[0]); +} else { +$lang .='_'.strtoupper($codes[$i]); +} +} +} +} +$this->languages[] = $lang; +} +return $this->languages; +} +public function getCharsets() +{ +if (null !== $this->charsets) { +return $this->charsets; +} +return $this->charsets = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all()); +} +public function getEncodings() +{ +if (null !== $this->encodings) { +return $this->encodings; +} +return $this->encodings = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all()); +} +public function getAcceptableContentTypes() +{ +if (null !== $this->acceptableContentTypes) { +return $this->acceptableContentTypes; +} +return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all()); +} +public function isXmlHttpRequest() +{ +return'XMLHttpRequest'== $this->headers->get('X-Requested-With'); +} +protected function prepareRequestUri() +{ +$requestUri =''; +if ($this->headers->has('X_ORIGINAL_URL')) { +$requestUri = $this->headers->get('X_ORIGINAL_URL'); +$this->headers->remove('X_ORIGINAL_URL'); +$this->server->remove('HTTP_X_ORIGINAL_URL'); +$this->server->remove('UNENCODED_URL'); +$this->server->remove('IIS_WasUrlRewritten'); +} elseif ($this->headers->has('X_REWRITE_URL')) { +$requestUri = $this->headers->get('X_REWRITE_URL'); +$this->headers->remove('X_REWRITE_URL'); +} elseif ($this->server->get('IIS_WasUrlRewritten') =='1'&& $this->server->get('UNENCODED_URL') !='') { +$requestUri = $this->server->get('UNENCODED_URL'); +$this->server->remove('UNENCODED_URL'); +$this->server->remove('IIS_WasUrlRewritten'); +} elseif ($this->server->has('REQUEST_URI')) { +$requestUri = $this->server->get('REQUEST_URI'); +$schemeAndHttpHost = $this->getSchemeAndHttpHost(); +if (strpos($requestUri, $schemeAndHttpHost) === 0) { +$requestUri = substr($requestUri, strlen($schemeAndHttpHost)); +} +} elseif ($this->server->has('ORIG_PATH_INFO')) { +$requestUri = $this->server->get('ORIG_PATH_INFO'); +if (''!= $this->server->get('QUERY_STRING')) { +$requestUri .='?'.$this->server->get('QUERY_STRING'); +} +$this->server->remove('ORIG_PATH_INFO'); +} +$this->server->set('REQUEST_URI', $requestUri); +return $requestUri; +} +protected function prepareBaseUrl() +{ +$filename = basename($this->server->get('SCRIPT_FILENAME')); +if (basename($this->server->get('SCRIPT_NAME')) === $filename) { +$baseUrl = $this->server->get('SCRIPT_NAME'); +} elseif (basename($this->server->get('PHP_SELF')) === $filename) { +$baseUrl = $this->server->get('PHP_SELF'); +} elseif (basename($this->server->get('ORIG_SCRIPT_NAME')) === $filename) { +$baseUrl = $this->server->get('ORIG_SCRIPT_NAME'); } else { +$path = $this->server->get('PHP_SELF',''); +$file = $this->server->get('SCRIPT_FILENAME',''); +$segs = explode('/', trim($file,'/')); +$segs = array_reverse($segs); +$index = 0; +$last = count($segs); +$baseUrl =''; +do { +$seg = $segs[$index]; +$baseUrl ='/'.$seg.$baseUrl; +++$index; +} while ($last > $index && (false !== $pos = strpos($path, $baseUrl)) && 0 != $pos); +} +$requestUri = $this->getRequestUri(); +if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, $baseUrl)) { +return $prefix; +} +if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, rtrim(dirname($baseUrl),'/'.DIRECTORY_SEPARATOR).'/')) { +return rtrim($prefix,'/'.DIRECTORY_SEPARATOR); +} +$truncatedRequestUri = $requestUri; +if (false !== $pos = strpos($requestUri,'?')) { +$truncatedRequestUri = substr($requestUri, 0, $pos); +} +$basename = basename($baseUrl); +if (empty($basename) || !strpos(rawurldecode($truncatedRequestUri), $basename)) { +return''; +} +if (strlen($requestUri) >= strlen($baseUrl) && (false !== $pos = strpos($requestUri, $baseUrl)) && $pos !== 0) { +$baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl)); +} +return rtrim($baseUrl,'/'.DIRECTORY_SEPARATOR); +} +protected function prepareBasePath() +{ +$filename = basename($this->server->get('SCRIPT_FILENAME')); +$baseUrl = $this->getBaseUrl(); +if (empty($baseUrl)) { +return''; +} +if (basename($baseUrl) === $filename) { +$basePath = dirname($baseUrl); +} else { +$basePath = $baseUrl; +} +if ('\\'=== DIRECTORY_SEPARATOR) { +$basePath = str_replace('\\','/', $basePath); +} +return rtrim($basePath,'/'); +} +protected function preparePathInfo() +{ +$baseUrl = $this->getBaseUrl(); +if (null === ($requestUri = $this->getRequestUri())) { +return'/'; +} +if ($pos = strpos($requestUri,'?')) { +$requestUri = substr($requestUri, 0, $pos); +} +$pathInfo = substr($requestUri, strlen($baseUrl)); +if (null !== $baseUrl && (false === $pathInfo ||''=== $pathInfo)) { +return'/'; +} elseif (null === $baseUrl) { +return $requestUri; +} +return (string) $pathInfo; +} +protected static function initializeFormats() +{ +static::$formats = array('html'=> array('text/html','application/xhtml+xml'),'txt'=> array('text/plain'),'js'=> array('application/javascript','application/x-javascript','text/javascript'),'css'=> array('text/css'),'json'=> array('application/json','application/x-json'),'xml'=> array('text/xml','application/xml','application/x-xml'),'rdf'=> array('application/rdf+xml'),'atom'=> array('application/atom+xml'),'rss'=> array('application/rss+xml'),'form'=> array('application/x-www-form-urlencoded'), +); +} +private function setPhpDefaultLocale($locale) +{ +try { +if (class_exists('Locale', false)) { +\Locale::setDefault($locale); +} +} catch (\Exception $e) { +} +} +private function getUrlencodedPrefix($string, $prefix) +{ +if (0 !== strpos(rawurldecode($string), $prefix)) { +return false; +} +$len = strlen($prefix); +if (preg_match(sprintf('#^(%%[[:xdigit:]]{2}|.){%d}#', $len), $string, $match)) { +return $match[0]; +} +return false; +} +private static function createRequestFromFactory(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) +{ +if (self::$requestFactory) { +$request = call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content); +if (!$request instanceof self) { +throw new \LogicException('The Request factory must return an instance of Symfony\Component\HttpFoundation\Request.'); +} +return $request; +} +return new static($query, $request, $attributes, $cookies, $files, $server, $content); +} +public function isFromTrustedProxy() +{ +return self::$trustedProxies && IpUtils::checkIp($this->server->get('REMOTE_ADDR'), self::$trustedProxies); +} +private function normalizeAndFilterClientIps(array $clientIps, $ip) +{ +$clientIps[] = $ip; $firstTrustedIp = null; +foreach ($clientIps as $key => $clientIp) { +if (preg_match('{((?:\d+\.){3}\d+)\:\d+}', $clientIp, $match)) { +$clientIps[$key] = $clientIp = $match[1]; +} +if (!filter_var($clientIp, FILTER_VALIDATE_IP)) { +unset($clientIps[$key]); +continue; +} +if (IpUtils::checkIp($clientIp, self::$trustedProxies)) { +unset($clientIps[$key]); +if (null === $firstTrustedIp) { +$firstTrustedIp = $clientIp; +} +} +} +return $clientIps ? array_reverse($clientIps) : array($firstTrustedIp); +} +} +} +namespace {require __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php';} diff --git a/projet_hello/var/cache/.gitkeep b/var/cache/.gitkeep similarity index 100% rename from projet_hello/var/cache/.gitkeep rename to var/cache/.gitkeep diff --git a/projet_hello/var/logs/.gitkeep b/var/logs/.gitkeep similarity index 100% rename from projet_hello/var/logs/.gitkeep rename to var/logs/.gitkeep diff --git a/projet_hello/var/sessions/.gitkeep b/var/sessions/.gitkeep similarity index 100% rename from projet_hello/var/sessions/.gitkeep rename to var/sessions/.gitkeep diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 0000000000000000000000000000000000000000..2751026aa2d3c121317d03e2755755bbb8da5460 --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath.'\\'; + if (isset($this->prefixDirsPsr4[$search])) { + foreach ($this->prefixDirsPsr4[$search] as $dir) { + $length = $this->prefixLengthsPsr4[$first][$search]; + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f27399a042d95c4708af3a8c74d35d338763cf8f --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +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/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000000000000000000000000000000000000..2414d2c8d238816da7a648e45aa928a6b2e4654e --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,22 @@ + $baseDir . '/app/AppCache.php', + 'AppKernel' => $baseDir . '/app/AppKernel.php', + 'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php', + 'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php', + 'Collator' => $vendorDir . '/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/Collator.php', + 'DivisionByZeroError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php', + 'Error' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/Error.php', + 'IntlDateFormatter' => $vendorDir . '/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/IntlDateFormatter.php', + 'Locale' => $vendorDir . '/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/Locale.php', + 'NumberFormatter' => $vendorDir . '/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/NumberFormatter.php', + 'ParseError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ParseError.php', + 'SqlFormatter' => $vendorDir . '/jdorn/sql-formatter/lib/SqlFormatter.php', + 'TypeError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/TypeError.php', +); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php new file mode 100644 index 0000000000000000000000000000000000000000..76086855ca41b505ffe84f2c4ae6104564cee126 --- /dev/null +++ b/vendor/composer/autoload_files.php @@ -0,0 +1,18 @@ + $vendorDir . '/symfony/phpunit-bridge/bootstrap.php', + '2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php', + '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', + '023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php', + 'bd9634f2d41831496de0d3dfe4c94881' => $vendorDir . '/symfony/polyfill-php56/bootstrap.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + '6a47392539ca2329373e0d33e1dba053' => $vendorDir . '/symfony/polyfill-intl-icu/bootstrap.php', + '32dcc8afd4335739640db7d200c1971d' => $vendorDir . '/symfony/polyfill-apcu/bootstrap.php', + '719971e375036615a0685b6fb054583d' => $vendorDir . '/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000000000000000000000000000000000000..1107e0d66b162b4d2e3d1a90eccea8849a83cf94 --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,17 @@ + array($vendorDir . '/twig/twig/lib'), + 'SensioLabs\\Security' => array($vendorDir . '/sensiolabs/security-checker'), + 'Doctrine\\ORM\\' => array($vendorDir . '/doctrine/orm/lib'), + 'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/lib'), + 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'), + 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'), + 'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/lib'), + 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib'), +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php new file mode 100644 index 0000000000000000000000000000000000000000..cc66197726d8108d567df38d7b726c62ec6b93fd --- /dev/null +++ b/vendor/composer/autoload_psr4.php @@ -0,0 +1,37 @@ + array($baseDir . '/tests'), + 'Symfony\\Polyfill\\Util\\' => array($vendorDir . '/symfony/polyfill-util'), + 'Symfony\\Polyfill\\Php70\\' => array($vendorDir . '/symfony/polyfill-php70'), + 'Symfony\\Polyfill\\Php56\\' => array($vendorDir . '/symfony/polyfill-php56'), + 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'Symfony\\Component\\' => array($vendorDir . '/symfony/symfony/src/Symfony/Component'), + 'Symfony\\Bundle\\SwiftmailerBundle\\' => array($vendorDir . '/symfony/swiftmailer-bundle'), + 'Symfony\\Bundle\\MonologBundle\\' => array($vendorDir . '/symfony/monolog-bundle'), + 'Symfony\\Bundle\\' => array($vendorDir . '/symfony/symfony/src/Symfony/Bundle'), + 'Symfony\\Bridge\\Twig\\' => array($vendorDir . '/symfony/symfony/src/Symfony/Bridge/Twig'), + 'Symfony\\Bridge\\Swiftmailer\\' => array($vendorDir . '/symfony/symfony/src/Symfony/Bridge/Swiftmailer'), + 'Symfony\\Bridge\\ProxyManager\\' => array($vendorDir . '/symfony/symfony/src/Symfony/Bridge/ProxyManager'), + 'Symfony\\Bridge\\PhpUnit\\' => array($vendorDir . '/symfony/phpunit-bridge'), + 'Symfony\\Bridge\\Monolog\\' => array($vendorDir . '/symfony/symfony/src/Symfony/Bridge/Monolog'), + 'Symfony\\Bridge\\Doctrine\\' => array($vendorDir . '/symfony/symfony/src/Symfony/Bridge/Doctrine'), + 'Sensio\\Bundle\\GeneratorBundle\\' => array($vendorDir . '/sensio/generator-bundle'), + 'Sensio\\Bundle\\FrameworkExtraBundle\\' => array($vendorDir . '/sensio/framework-extra-bundle'), + 'Sensio\\Bundle\\DistributionBundle\\' => array($vendorDir . '/sensio/distribution-bundle'), + 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), + 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), + 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), + 'Incenteev\\ParameterHandler\\' => array($vendorDir . '/incenteev/composer-parameter-handler'), + 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), + 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache'), + 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/common/lib/Doctrine/Common'), + 'Doctrine\\Bundle\\DoctrineCacheBundle\\' => array($vendorDir . '/doctrine/doctrine-cache-bundle'), + 'Doctrine\\Bundle\\DoctrineBundle\\' => array($vendorDir . '/doctrine/doctrine-bundle'), + '' => array($baseDir . '/src'), +); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php new file mode 100644 index 0000000000000000000000000000000000000000..0fcf8ac19356037474dea2b58305918b24d1a32f --- /dev/null +++ b/vendor/composer/autoload_real.php @@ -0,0 +1,70 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit8e3b21c733fc5c71a8f44e6a1873cd39::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit8e3b21c733fc5c71a8f44e6a1873cd39::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire8e3b21c733fc5c71a8f44e6a1873cd39($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequire8e3b21c733fc5c71a8f44e6a1873cd39($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 0000000000000000000000000000000000000000..4a50311c1073843b5040226724cc71dd53e5d48b --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,255 @@ + __DIR__ . '/..' . '/symfony/phpunit-bridge/bootstrap.php', + '2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php', + '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', + '023d27dca8066ef29e6739335ea73bad' => __DIR__ . '/..' . '/symfony/polyfill-php70/bootstrap.php', + 'bd9634f2d41831496de0d3dfe4c94881' => __DIR__ . '/..' . '/symfony/polyfill-php56/bootstrap.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + '6a47392539ca2329373e0d33e1dba053' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/bootstrap.php', + '32dcc8afd4335739640db7d200c1971d' => __DIR__ . '/..' . '/symfony/polyfill-apcu/bootstrap.php', + '719971e375036615a0685b6fb054583d' => __DIR__ . '/..' . '/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'T' => + array ( + 'Tests\\' => 6, + ), + 'S' => + array ( + 'Symfony\\Polyfill\\Util\\' => 22, + 'Symfony\\Polyfill\\Php70\\' => 23, + 'Symfony\\Polyfill\\Php56\\' => 23, + 'Symfony\\Polyfill\\Mbstring\\' => 26, + 'Symfony\\Component\\' => 18, + 'Symfony\\Bundle\\SwiftmailerBundle\\' => 33, + 'Symfony\\Bundle\\MonologBundle\\' => 29, + 'Symfony\\Bundle\\' => 15, + 'Symfony\\Bridge\\Twig\\' => 20, + 'Symfony\\Bridge\\Swiftmailer\\' => 27, + 'Symfony\\Bridge\\ProxyManager\\' => 28, + 'Symfony\\Bridge\\PhpUnit\\' => 23, + 'Symfony\\Bridge\\Monolog\\' => 23, + 'Symfony\\Bridge\\Doctrine\\' => 24, + 'Sensio\\Bundle\\GeneratorBundle\\' => 30, + 'Sensio\\Bundle\\FrameworkExtraBundle\\' => 35, + 'Sensio\\Bundle\\DistributionBundle\\' => 33, + ), + 'P' => + array ( + 'Psr\\Log\\' => 8, + 'Psr\\Cache\\' => 10, + ), + 'M' => + array ( + 'Monolog\\' => 8, + ), + 'I' => + array ( + 'Incenteev\\ParameterHandler\\' => 27, + ), + 'D' => + array ( + 'Doctrine\\Instantiator\\' => 22, + 'Doctrine\\Common\\Cache\\' => 22, + 'Doctrine\\Common\\' => 16, + 'Doctrine\\Bundle\\DoctrineCacheBundle\\' => 36, + 'Doctrine\\Bundle\\DoctrineBundle\\' => 31, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Tests\\' => + array ( + 0 => __DIR__ . '/../..' . '/tests', + ), + 'Symfony\\Polyfill\\Util\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-util', + ), + 'Symfony\\Polyfill\\Php70\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php70', + ), + 'Symfony\\Polyfill\\Php56\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php56', + ), + 'Symfony\\Polyfill\\Mbstring\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', + ), + 'Symfony\\Component\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/symfony/src/Symfony/Component', + ), + 'Symfony\\Bundle\\SwiftmailerBundle\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/swiftmailer-bundle', + ), + 'Symfony\\Bundle\\MonologBundle\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/monolog-bundle', + ), + 'Symfony\\Bundle\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/symfony/src/Symfony/Bundle', + ), + 'Symfony\\Bridge\\Twig\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/symfony/src/Symfony/Bridge/Twig', + ), + 'Symfony\\Bridge\\Swiftmailer\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/symfony/src/Symfony/Bridge/Swiftmailer', + ), + 'Symfony\\Bridge\\ProxyManager\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/symfony/src/Symfony/Bridge/ProxyManager', + ), + 'Symfony\\Bridge\\PhpUnit\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/phpunit-bridge', + ), + 'Symfony\\Bridge\\Monolog\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/symfony/src/Symfony/Bridge/Monolog', + ), + 'Symfony\\Bridge\\Doctrine\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/symfony/src/Symfony/Bridge/Doctrine', + ), + 'Sensio\\Bundle\\GeneratorBundle\\' => + array ( + 0 => __DIR__ . '/..' . '/sensio/generator-bundle', + ), + 'Sensio\\Bundle\\FrameworkExtraBundle\\' => + array ( + 0 => __DIR__ . '/..' . '/sensio/framework-extra-bundle', + ), + 'Sensio\\Bundle\\DistributionBundle\\' => + array ( + 0 => __DIR__ . '/..' . '/sensio/distribution-bundle', + ), + 'Psr\\Log\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', + ), + 'Psr\\Cache\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/cache/src', + ), + 'Monolog\\' => + array ( + 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', + ), + 'Incenteev\\ParameterHandler\\' => + array ( + 0 => __DIR__ . '/..' . '/incenteev/composer-parameter-handler', + ), + 'Doctrine\\Instantiator\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator', + ), + 'Doctrine\\Common\\Cache\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache', + ), + 'Doctrine\\Common\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/common/lib/Doctrine/Common', + ), + 'Doctrine\\Bundle\\DoctrineCacheBundle\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/doctrine-cache-bundle', + ), + 'Doctrine\\Bundle\\DoctrineBundle\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/doctrine-bundle', + ), + ); + + public static $fallbackDirsPsr4 = array ( + 0 => __DIR__ . '/../..' . '/src', + ); + + public static $prefixesPsr0 = array ( + 'T' => + array ( + 'Twig_' => + array ( + 0 => __DIR__ . '/..' . '/twig/twig/lib', + ), + ), + 'S' => + array ( + 'SensioLabs\\Security' => + array ( + 0 => __DIR__ . '/..' . '/sensiolabs/security-checker', + ), + ), + 'D' => + array ( + 'Doctrine\\ORM\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/orm/lib', + ), + 'Doctrine\\DBAL\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/dbal/lib', + ), + 'Doctrine\\Common\\Lexer\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/lexer/lib', + ), + 'Doctrine\\Common\\Inflector\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/inflector/lib', + ), + 'Doctrine\\Common\\Collections\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/collections/lib', + ), + 'Doctrine\\Common\\Annotations\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/annotations/lib', + ), + ), + ); + + public static $classMap = array ( + 'AppCache' => __DIR__ . '/../..' . '/app/AppCache.php', + 'AppKernel' => __DIR__ . '/../..' . '/app/AppKernel.php', + 'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php', + 'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php', + 'Collator' => __DIR__ . '/..' . '/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/Collator.php', + 'DivisionByZeroError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php', + 'Error' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/Error.php', + 'IntlDateFormatter' => __DIR__ . '/..' . '/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/IntlDateFormatter.php', + 'Locale' => __DIR__ . '/..' . '/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/Locale.php', + 'NumberFormatter' => __DIR__ . '/..' . '/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/NumberFormatter.php', + 'ParseError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ParseError.php', + 'SqlFormatter' => __DIR__ . '/..' . '/jdorn/sql-formatter/lib/SqlFormatter.php', + 'TypeError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/TypeError.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit8e3b21c733fc5c71a8f44e6a1873cd39::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit8e3b21c733fc5c71a8f44e6a1873cd39::$prefixDirsPsr4; + $loader->fallbackDirsPsr4 = ComposerStaticInit8e3b21c733fc5c71a8f44e6a1873cd39::$fallbackDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit8e3b21c733fc5c71a8f44e6a1873cd39::$prefixesPsr0; + $loader->classMap = ComposerStaticInit8e3b21c733fc5c71a8f44e6a1873cd39::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 0000000000000000000000000000000000000000..c47812646c35e4c8644a0d5801224b56dc8bb4d9 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,2152 @@ +[ + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "time": "2014-09-09T13:34:57+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ] + }, + { + "name": "doctrine/annotations", + "version": "v1.2.7", + "version_normalized": "1.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": ">=5.3.2" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "4.*" + }, + "time": "2015-08-31T12:32:49+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Doctrine\\Common\\Annotations\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ] + }, + { + "name": "twig/twig", + "version": "v1.32.0", + "version_normalized": "1.32.0.0", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "9935b662e24d6e634da88901ab534cc12e8c728f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/9935b662e24d6e634da88901ab534cc12e8c728f", + "reference": "9935b662e24d6e634da88901ab534cc12e8c728f", + "shasum": "" + }, + "require": { + "php": ">=5.2.7" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/debug": "~2.7", + "symfony/phpunit-bridge": "~3.2" + }, + "time": "2017-02-27T00:07:03+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.32-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Twig_": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + }, + { + "name": "Twig Team", + "homepage": "http://twig.sensiolabs.org/contributors", + "role": "Contributors" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "http://twig.sensiolabs.org", + "keywords": [ + "templating" + ] + }, + { + "name": "symfony/polyfill-util", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-util.git", + "reference": "746bce0fca664ac0a575e465f65c6643faddf7fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/746bce0fca664ac0a575e465f65c6643faddf7fb", + "reference": "746bce0fca664ac0a575e465f65c6643faddf7fb", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2016-11-14T01:06:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Util\\": "" + } + }, + "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 utilities for portability of PHP codes", + "homepage": "https://symfony.com", + "keywords": [ + "compat", + "compatibility", + "polyfill", + "shim" + ] + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.9", + "version_normalized": "2.0.9.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "6968531206671f94377b01dc7888d5d1b858a01b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/6968531206671f94377b01dc7888d5d1b858a01b", + "reference": "6968531206671f94377b01dc7888d5d1b858a01b", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "time": "2017-03-03T20:43:42+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ] + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "13ce343935f0f91ca89605a2f6ca6f5c2f3faac2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/13ce343935f0f91ca89605a2f6ca6f5c2f3faac2", + "reference": "13ce343935f0f91ca89605a2f6ca6f5c2f3faac2", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0", + "php": ">=5.3.3" + }, + "time": "2016-11-14T01:06:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "symfony/polyfill-php56", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "1dd42b9b89556f18092f3d1ada22cb05ac85383c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/1dd42b9b89556f18092f3d1ada22cb05ac85383c", + "reference": "1dd42b9b89556f18092f3d1ada22cb05ac85383c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-util": "~1.0" + }, + "time": "2016-11-14T01:06:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php56\\": "" + }, + "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 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2016-11-14T01:06:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "symfony/symfony", + "version": "v3.2.6", + "version_normalized": "3.2.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/symfony.git", + "reference": "b0f8a7fa4b8baadf9db299cb6ac87c96a8977dbe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/symfony/zipball/b0f8a7fa4b8baadf9db299cb6ac87c96a8977dbe", + "reference": "b0f8a7fa4b8baadf9db299cb6ac87c96a8977dbe", + "shasum": "" + }, + "require": { + "doctrine/common": "~2.4", + "php": ">=5.5.9", + "psr/cache": "~1.0", + "psr/log": "~1.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php56": "~1.0", + "symfony/polyfill-php70": "~1.0", + "symfony/polyfill-util": "~1.0", + "twig/twig": "~1.28|~2.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.0", + "phpdocumentor/type-resolver": "<0.2.0", + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "provide": { + "psr/cache-implementation": "1.0" + }, + "replace": { + "symfony/asset": "self.version", + "symfony/browser-kit": "self.version", + "symfony/cache": "self.version", + "symfony/class-loader": "self.version", + "symfony/config": "self.version", + "symfony/console": "self.version", + "symfony/css-selector": "self.version", + "symfony/debug": "self.version", + "symfony/debug-bundle": "self.version", + "symfony/dependency-injection": "self.version", + "symfony/doctrine-bridge": "self.version", + "symfony/dom-crawler": "self.version", + "symfony/event-dispatcher": "self.version", + "symfony/expression-language": "self.version", + "symfony/filesystem": "self.version", + "symfony/finder": "self.version", + "symfony/form": "self.version", + "symfony/framework-bundle": "self.version", + "symfony/http-foundation": "self.version", + "symfony/http-kernel": "self.version", + "symfony/inflector": "self.version", + "symfony/intl": "self.version", + "symfony/ldap": "self.version", + "symfony/monolog-bridge": "self.version", + "symfony/options-resolver": "self.version", + "symfony/process": "self.version", + "symfony/property-access": "self.version", + "symfony/property-info": "self.version", + "symfony/proxy-manager-bridge": "self.version", + "symfony/routing": "self.version", + "symfony/security": "self.version", + "symfony/security-bundle": "self.version", + "symfony/security-core": "self.version", + "symfony/security-csrf": "self.version", + "symfony/security-guard": "self.version", + "symfony/security-http": "self.version", + "symfony/serializer": "self.version", + "symfony/stopwatch": "self.version", + "symfony/templating": "self.version", + "symfony/translation": "self.version", + "symfony/twig-bridge": "self.version", + "symfony/twig-bundle": "self.version", + "symfony/validator": "self.version", + "symfony/var-dumper": "self.version", + "symfony/web-profiler-bundle": "self.version", + "symfony/workflow": "self.version", + "symfony/yaml": "self.version" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "~1.6", + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": "~2.4", + "doctrine/doctrine-bundle": "~1.4", + "doctrine/orm": "~2.4,>=2.4.5", + "egulias/email-validator": "~1.2,>=1.2.8|~2.0", + "monolog/monolog": "~1.11", + "ocramius/proxy-manager": "~0.4|~1.0|~2.0", + "phpdocumentor/reflection-docblock": "^3.0", + "predis/predis": "~1.0", + "sensio/framework-extra-bundle": "^3.0.2", + "symfony/phpunit-bridge": "~3.2", + "symfony/polyfill-apcu": "~1.1", + "symfony/security-acl": "~2.8|~3.0" + }, + "time": "2017-03-10T18:35:48+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", + "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", + "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/", + "Symfony\\Bridge\\Swiftmailer\\": "src/Symfony/Bridge/Swiftmailer/", + "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", + "Symfony\\Bundle\\": "src/Symfony/Bundle/", + "Symfony\\Component\\": "src/Symfony/Component/" + }, + "classmap": [ + "src/Symfony/Component/Intl/Resources/stubs" + ], + "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": "The Symfony PHP framework", + "homepage": "https://symfony.com", + "keywords": [ + "framework" + ] + }, + { + "name": "symfony/polyfill-intl-icu", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-icu.git", + "reference": "2d6e2b20d457603eefb6e614286c22efca30fdb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/2d6e2b20d457603eefb6e614286c22efca30fdb4", + "reference": "2d6e2b20d457603eefb6e614286c22efca30fdb4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/intl": "~2.3|~3.0" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "time": "2016-11-14T01:06:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "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 intl's ICU-related data and classes", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "icu", + "intl", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "psr/log", + "version": "1.0.2", + "version_normalized": "1.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-10-10T12:19:37+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "psr/cache", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "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": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-08-06T20:24:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "doctrine/inflector", + "version": "v1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "time": "2015-11-06T14:35:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Doctrine\\Common\\Inflector\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ] + }, + { + "name": "doctrine/collections", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a", + "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "time": "2015-04-14T22:21:58+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Doctrine\\Common\\Collections\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Collections Abstraction library", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "array", + "collections", + "iterator" + ] + }, + { + "name": "doctrine/cache", + "version": "v1.6.1", + "version_normalized": "1.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3", + "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3", + "shasum": "" + }, + "require": { + "php": "~5.5|~7.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0", + "predis/predis": "~1.0", + "satooshi/php-coveralls": "~0.6" + }, + "time": "2016-10-29T11:16:17+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ] + }, + { + "name": "doctrine/common", + "version": "v2.6.2", + "version_normalized": "2.6.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/7bce00698899aa2c06fe7365c76e4d78ddb15fa3", + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3", + "shasum": "" + }, + "require": { + "doctrine/annotations": "1.*", + "doctrine/cache": "1.*", + "doctrine/collections": "1.*", + "doctrine/inflector": "1.*", + "doctrine/lexer": "1.*", + "php": "~5.5|~7.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0" + }, + "time": "2016-11-30T16:50:46+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common Library for Doctrine projects", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "collections", + "eventmanager", + "persistence", + "spl" + ] + }, + { + "name": "jdorn/sql-formatter", + "version": "v1.2.17", + "version_normalized": "1.2.17.0", + "source": { + "type": "git", + "url": "https://github.com/jdorn/sql-formatter.git", + "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/64990d96e0959dff8e059dfcdc1af130728d92bc", + "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc", + "shasum": "" + }, + "require": { + "php": ">=5.2.4" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, + "time": "2014-01-12T16:20:24+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "lib" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Dorn", + "email": "jeremy@jeremydorn.com", + "homepage": "http://jeremydorn.com/" + } + ], + "description": "a PHP SQL highlighting library", + "homepage": "https://github.com/jdorn/sql-formatter/", + "keywords": [ + "highlight", + "sql" + ] + }, + { + "name": "doctrine/doctrine-cache-bundle", + "version": "1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineCacheBundle.git", + "reference": "18c600a9b82f6454d2e81ca4957cdd56a1cf3504" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/18c600a9b82f6454d2e81ca4957cdd56a1cf3504", + "reference": "18c600a9b82f6454d2e81ca4957cdd56a1cf3504", + "shasum": "" + }, + "require": { + "doctrine/cache": "^1.4.2", + "doctrine/inflector": "~1.0", + "php": ">=5.3.2", + "symfony/doctrine-bridge": "~2.2|~3.0" + }, + "require-dev": { + "instaclick/coding-standard": "~1.1", + "instaclick/object-calisthenics-sniffs": "dev-master", + "instaclick/symfony2-coding-standard": "dev-remaster", + "phpunit/phpunit": "~4", + "predis/predis": "~0.8", + "satooshi/php-coveralls": "~0.6.1", + "squizlabs/php_codesniffer": "~1.5", + "symfony/console": "~2.2|~3.0", + "symfony/finder": "~2.2|~3.0", + "symfony/framework-bundle": "~2.2|~3.0", + "symfony/phpunit-bridge": "~2.7|~3.0", + "symfony/security-acl": "~2.3|~3.0", + "symfony/validator": "~2.2|~3.0", + "symfony/yaml": "~2.2|~3.0" + }, + "suggest": { + "symfony/security-acl": "For using this bundle to cache ACLs" + }, + "time": "2016-01-26T17:28:51+00:00", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\DoctrineCacheBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Fabio B. Silva", + "email": "fabio.bat.silva@gmail.com" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@hotmail.com" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org/" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Bundle for Doctrine Cache", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ] + }, + { + "name": "doctrine/dbal", + "version": "v2.5.12", + "version_normalized": "2.5.12.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "7b9e911f9d8b30d43b96853dab26898c710d8f44" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/7b9e911f9d8b30d43b96853dab26898c710d8f44", + "reference": "7b9e911f9d8b30d43b96853dab26898c710d8f44", + "shasum": "" + }, + "require": { + "doctrine/common": ">=2.4,<2.8-dev", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "symfony/console": "2.*||^3.0" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "time": "2017-02-08T12:53:47+00:00", + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Doctrine\\DBAL\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Database Abstraction Layer", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "persistence", + "queryobject" + ] + }, + { + "name": "doctrine/doctrine-bundle", + "version": "1.6.7", + "version_normalized": "1.6.7.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineBundle.git", + "reference": "a01d99bc6c9a6c8a8ace0012690099dd957ce9b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/a01d99bc6c9a6c8a8ace0012690099dd957ce9b9", + "reference": "a01d99bc6c9a6c8a8ace0012690099dd957ce9b9", + "shasum": "" + }, + "require": { + "doctrine/dbal": "~2.3", + "doctrine/doctrine-cache-bundle": "~1.0", + "jdorn/sql-formatter": "~1.1", + "php": ">=5.5.9", + "symfony/console": "~2.7|~3.0", + "symfony/dependency-injection": "~2.7|~3.0", + "symfony/doctrine-bridge": "~2.7|~3.0", + "symfony/framework-bundle": "~2.7|~3.0" + }, + "require-dev": { + "doctrine/orm": "~2.3", + "phpunit/phpunit": "~4", + "satooshi/php-coveralls": "^1.0", + "symfony/phpunit-bridge": "~2.7|~3.0", + "symfony/property-info": "~2.8|~3.0", + "symfony/validator": "~2.7|~3.0", + "symfony/yaml": "~2.7|~3.0", + "twig/twig": "~1.10|~2.0" + }, + "suggest": { + "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", + "symfony/web-profiler-bundle": "To use the data collector." + }, + "time": "2017-01-16T12:01:26+00:00", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\DoctrineBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org/" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony DoctrineBundle", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "orm", + "persistence" + ] + }, + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "version_normalized": "1.0.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "time": "2015-06-14T21:17:01+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ] + }, + { + "name": "doctrine/orm", + "version": "v2.5.6", + "version_normalized": "2.5.6.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/doctrine2.git", + "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/e6c434196c8ef058239aaa0724b4aadb0107940b", + "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b", + "shasum": "" + }, + "require": { + "doctrine/cache": "~1.4", + "doctrine/collections": "~1.2", + "doctrine/common": ">=2.5-dev,<2.8-dev", + "doctrine/dbal": ">=2.5-dev,<2.6-dev", + "doctrine/instantiator": "~1.0.1", + "ext-pdo": "*", + "php": ">=5.4", + "symfony/console": "~2.5|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "symfony/yaml": "~2.3|~3.0" + }, + "suggest": { + "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" + }, + "time": "2016-12-18T15:42:34+00:00", + "bin": [ + "bin/doctrine", + "bin/doctrine.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Doctrine\\ORM\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Object-Relational-Mapper for PHP", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "orm" + ] + }, + { + "name": "incenteev/composer-parameter-handler", + "version": "v2.1.2", + "version_normalized": "2.1.2.0", + "source": { + "type": "git", + "url": "https://github.com/Incenteev/ParameterHandler.git", + "reference": "d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc", + "reference": "d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/yaml": "~2.3|~3.0" + }, + "require-dev": { + "composer/composer": "1.0.*@dev", + "phpspec/prophecy-phpunit": "~1.0", + "symfony/filesystem": "~2.2" + }, + "time": "2015-11-10T17:04:01+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Incenteev\\ParameterHandler\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christophe Coevoet", + "email": "stof@notk.org" + } + ], + "description": "Composer script handling your ignored parameter file", + "homepage": "https://github.com/Incenteev/ParameterHandler", + "keywords": [ + "parameters management" + ] + }, + { + "name": "sensiolabs/security-checker", + "version": "v4.0.2", + "version_normalized": "4.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/security-checker.git", + "reference": "56bded66985e22f6eac2cf86735fd21c625bff2f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/56bded66985e22f6eac2cf86735fd21c625bff2f", + "reference": "56bded66985e22f6eac2cf86735fd21c625bff2f", + "shasum": "" + }, + "require": { + "symfony/console": "~2.7|~3.0" + }, + "time": "2017-03-09T17:33:20+00:00", + "bin": [ + "security-checker" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "SensioLabs\\Security": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "description": "A security checker for your composer.lock" + }, + { + "name": "sensio/distribution-bundle", + "version": "v5.0.18", + "version_normalized": "5.0.18.0", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", + "reference": "17846680901003d26d823c2e3ac9228702837916" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/17846680901003d26d823c2e3ac9228702837916", + "reference": "17846680901003d26d823c2e3ac9228702837916", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "sensiolabs/security-checker": "~3.0|~4.0", + "symfony/class-loader": "~2.3|~3.0", + "symfony/config": "~2.3|~3.0", + "symfony/dependency-injection": "~2.3|~3.0", + "symfony/filesystem": "~2.3|~3.0", + "symfony/http-kernel": "~2.3|~3.0", + "symfony/process": "~2.3|~3.0" + }, + "time": "2017-01-10T14:58:45+00:00", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Sensio\\Bundle\\DistributionBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Base bundle for Symfony Distributions", + "keywords": [ + "configuration", + "distribution" + ] + }, + { + "name": "sensio/framework-extra-bundle", + "version": "v3.0.23", + "version_normalized": "3.0.23.0", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", + "reference": "d3601fd5709168ace7a1ca6eefa2619a1632b7f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/d3601fd5709168ace7a1ca6eefa2619a1632b7f7", + "reference": "d3601fd5709168ace7a1ca6eefa2619a1632b7f7", + "shasum": "" + }, + "require": { + "doctrine/common": "~2.2", + "symfony/dependency-injection": "~2.3|~3.0", + "symfony/framework-bundle": "~2.3|~3.0" + }, + "require-dev": { + "doctrine/doctrine-bundle": "~1.5", + "doctrine/orm": "~2.4,>=2.4.5", + "symfony/asset": "~2.7|~3.0", + "symfony/browser-kit": "~2.3|~3.0", + "symfony/dom-crawler": "~2.3|~3.0", + "symfony/expression-language": "~2.4|~3.0", + "symfony/finder": "~2.3|~3.0", + "symfony/phpunit-bridge": "~3.2", + "symfony/psr-http-message-bridge": "^0.3", + "symfony/security-bundle": "~2.4|~3.0", + "symfony/templating": "~2.3|~3.0", + "symfony/translation": "~2.3|~3.0", + "symfony/twig-bundle": "~2.3|~3.0", + "symfony/yaml": "~2.3|~3.0", + "twig/twig": "~1.12|~2.0", + "zendframework/zend-diactoros": "^1.3" + }, + "suggest": { + "symfony/expression-language": "", + "symfony/psr-http-message-bridge": "To use the PSR-7 converters", + "symfony/security-bundle": "" + }, + "time": "2017-03-02T20:17:28+00:00", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Sensio\\Bundle\\FrameworkExtraBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "This bundle provides a way to configure your controllers with annotations", + "keywords": [ + "annotations", + "controllers" + ] + }, + { + "name": "monolog/monolog", + "version": "1.22.0", + "version_normalized": "1.22.0.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "bad29cb8d18ab0315e6c477751418a82c850d558" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bad29cb8d18ab0315e6c477751418a82c850d558", + "reference": "bad29cb8d18ab0315e6c477751418a82c850d558", + "shasum": "" + }, + "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" + }, + "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" + }, + "time": "2016-11-26T00:15:39+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "symfony/monolog-bundle", + "version": "v3.0.3", + "version_normalized": "3.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bundle.git", + "reference": "ebce76a39a65495a66c34eb1574cc4b9e35a4e64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/ebce76a39a65495a66c34eb1574cc4b9e35a4e64", + "reference": "ebce76a39a65495a66c34eb1574cc4b9e35a4e64", + "shasum": "" + }, + "require": { + "monolog/monolog": "~1.22", + "php": ">=5.3.2", + "symfony/config": "~2.7|~3.0", + "symfony/dependency-injection": "~2.7|~3.0", + "symfony/http-kernel": "~2.7|~3.0", + "symfony/monolog-bridge": "~2.7|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "symfony/console": "~2.3|~3.0", + "symfony/yaml": "~2.3|~3.0" + }, + "time": "2017-01-10T20:01:51+00:00", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\MonologBundle\\": "" + } + }, + "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": "Symfony MonologBundle", + "homepage": "http://symfony.com", + "keywords": [ + "log", + "logging" + ] + }, + { + "name": "symfony/polyfill-apcu", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-apcu.git", + "reference": "5d4474f447403c3348e37b70acc2b95475b7befa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/5d4474f447403c3348e37b70acc2b95475b7befa", + "reference": "5d4474f447403c3348e37b70acc2b95475b7befa", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2016-11-14T01:06:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "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 apcu_* functions to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "apcu", + "compatibility", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v5.4.6", + "version_normalized": "5.4.6.0", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "81fdccfaf8bdc5d5d7a1ef6bb3a61bbb1a6c4a3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/81fdccfaf8bdc5d5d7a1ef6bb3a61bbb1a6c4a3e", + "reference": "81fdccfaf8bdc5d5d7a1ef6bb3a61bbb1a6c4a3e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "~3.2" + }, + "time": "2017-02-13T07:52:53+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.org", + "keywords": [ + "email", + "mail", + "mailer" + ] + }, + { + "name": "symfony/swiftmailer-bundle", + "version": "v2.5.3", + "version_normalized": "2.5.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/swiftmailer-bundle.git", + "reference": "b59a70d03b948e29d070b6c4416b4a03af4748ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/b59a70d03b948e29d070b6c4416b4a03af4748ec", + "reference": "b59a70d03b948e29d070b6c4416b4a03af4748ec", + "shasum": "" + }, + "require": { + "php": ">=5.3.2", + "swiftmailer/swiftmailer": ">=4.2.0,~5.0", + "symfony/config": "~2.7|~3.0", + "symfony/dependency-injection": "~2.7|~3.0", + "symfony/http-kernel": "~2.7|~3.0" + }, + "require-dev": { + "symfony/console": "~2.7|~3.0", + "symfony/framework-bundle": "~2.7|~3.0", + "symfony/phpunit-bridge": "~2.7|~3.0", + "symfony/yaml": "~2.7|~3.0" + }, + "suggest": { + "psr/log": "Allows logging" + }, + "time": "2017-03-02T16:47:57+00:00", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\SwiftmailerBundle\\": "" + } + }, + "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": "Symfony SwiftmailerBundle", + "homepage": "http://symfony.com" + }, + { + "name": "sensio/generator-bundle", + "version": "v3.1.3", + "version_normalized": "3.1.3.0", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git", + "reference": "c76c7833ed5ffe0f5aeef15e13939ddb59a684eb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/c76c7833ed5ffe0f5aeef15e13939ddb59a684eb", + "reference": "c76c7833ed5ffe0f5aeef15e13939ddb59a684eb", + "shasum": "" + }, + "require": { + "symfony/console": "~2.7|~3.0", + "symfony/framework-bundle": "~2.7|~3.0", + "symfony/process": "~2.7|~3.0", + "symfony/yaml": "~2.7|~3.0", + "twig/twig": "^1.28.2|^2.0" + }, + "require-dev": { + "doctrine/orm": "~2.4", + "symfony/doctrine-bridge": "~2.7|~3.0" + }, + "time": "2017-03-03T15:22:50+00:00", + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Sensio\\Bundle\\GeneratorBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "This bundle generates code for you" + }, + { + "name": "symfony/phpunit-bridge", + "version": "v3.2.6", + "version_normalized": "3.2.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/phpunit-bridge.git", + "reference": "9103d17dd57c512a3a027bb5628f6701464d6fef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/9103d17dd57c512a3a027bb5628f6701464d6fef", + "reference": "9103d17dd57c512a3a027bb5628f6701464d6fef", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "conflict": { + "phpunit/phpunit": ">=6.0" + }, + "suggest": { + "ext-zip": "Zip support is required when using bin/simple-phpunit", + "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" + }, + "time": "2017-03-09T12:58:16+00:00", + "bin": [ + "bin/simple-phpunit" + ], + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Bridge\\PhpUnit\\": "" + }, + "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 PHPUnit Bridge", + "homepage": "https://symfony.com" + } +] diff --git a/vendor/doctrine/annotations/LICENSE b/vendor/doctrine/annotations/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5e781fce4bb504715ba0ec0188715b18a198ca6b --- /dev/null +++ b/vendor/doctrine/annotations/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2013 Doctrine Project + +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/vendor/doctrine/annotations/README.md b/vendor/doctrine/annotations/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ebb30e0bca4b9dea65df67ba437e24e3d50d7fbb --- /dev/null +++ b/vendor/doctrine/annotations/README.md @@ -0,0 +1,19 @@ +# Doctrine Annotations + +[![Build Status](https://travis-ci.org/doctrine/annotations.png?branch=master)](https://travis-ci.org/doctrine/annotations) + +Docblock Annotations Parser library (extracted from [Doctrine Common](https://github.com/doctrine/common)). + +## Changelog + +### v1.2.0 + + * HHVM support + * Allowing dangling comma in annotations + * Excluded annotations are no longer autoloaded + * Importing namespaces also in traits + * Added support for `::class` 5.5-style constant, works also in 5.3 and 5.4 + +### v1.1 + + * Add Exception when ZendOptimizer+ or Opcache is configured to drop comments diff --git a/vendor/doctrine/annotations/composer.json b/vendor/doctrine/annotations/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c65f6cd35a71e555f901d575911bf519003080e --- /dev/null +++ b/vendor/doctrine/annotations/composer.json @@ -0,0 +1,31 @@ +{ + "name": "doctrine/annotations", + "type": "library", + "description": "Docblock Annotations Parser", + "keywords": ["annotations", "docblock", "parser"], + "homepage": "http://www.doctrine-project.org", + "license": "MIT", + "authors": [ + {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, + {"name": "Roman Borschel", "email": "roman@code-factory.org"}, + {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, + {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, + {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} + ], + "require": { + "php": ">=5.3.2", + "doctrine/lexer": "1.*" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "4.*" + }, + "autoload": { + "psr-0": { "Doctrine\\Common\\Annotations\\": "lib/" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php new file mode 100644 index 0000000000000000000000000000000000000000..a79a0f8f0a18da1d0066c94bac1b605031e27be0 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php @@ -0,0 +1,79 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +/** + * Annotations class. + * + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Annotation +{ + /** + * Value property. Common among all derived classes. + * + * @var string + */ + public $value; + + /** + * Constructor. + * + * @param array $data Key-value for properties to be defined in this class. + */ + public final function __construct(array $data) + { + foreach ($data as $key => $value) { + $this->$key = $value; + } + } + + /** + * Error handler for unknown property accessor in Annotation class. + * + * @param string $name Unknown property name. + * + * @throws \BadMethodCallException + */ + public function __get($name) + { + throw new \BadMethodCallException( + sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this)) + ); + } + + /** + * Error handler for unknown property mutator in Annotation class. + * + * @param string $name Unknown property name. + * @param mixed $value Property value. + * + * @throws \BadMethodCallException + */ + public function __set($name, $value) + { + throw new \BadMethodCallException( + sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this)) + ); + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php new file mode 100644 index 0000000000000000000000000000000000000000..dbef6df087497cecf043dcdac40f95ffb5551fa0 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php @@ -0,0 +1,47 @@ +. + */ + +namespace Doctrine\Common\Annotations\Annotation; + +/** + * Annotation that can be used to signal to the parser + * to check the attribute type during the parsing process. + * + * @author Fabio B. Silva + * + * @Annotation + */ +final class Attribute +{ + /** + * @var string + */ + public $name; + + /** + * @var string + */ + public $type; + + /** + * @var boolean + */ + public $required = false; +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php new file mode 100644 index 0000000000000000000000000000000000000000..53134e3097af6c5dc95695b478d53282f2455604 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\Common\Annotations\Annotation; + +/** + * Annotation that can be used to signal to the parser + * to check the types of all declared attributes during the parsing process. + * + * @author Fabio B. Silva + * + * @Annotation + */ +final class Attributes +{ + /** + * @var array + */ + public $value; +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php new file mode 100644 index 0000000000000000000000000000000000000000..e122a7535881db3599a6d99b7292f49eaa9b4bc0 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php @@ -0,0 +1,84 @@ +. + */ + +namespace Doctrine\Common\Annotations\Annotation; + +/** + * Annotation that can be used to signal to the parser + * to check the available values during the parsing process. + * + * @since 2.4 + * @author Fabio B. Silva + * + * @Annotation + * @Attributes({ + * @Attribute("value", required = true, type = "array"), + * @Attribute("literal", required = false, type = "array") + * }) + */ +final class Enum +{ + /** + * @var array + */ + public $value; + + /** + * Literal target declaration. + * + * @var array + */ + public $literal; + + /** + * Annotation constructor. + * + * @param array $values + * + * @throws \InvalidArgumentException + */ + public function __construct(array $values) + { + if ( ! isset($values['literal'])) { + $values['literal'] = array(); + } + + foreach ($values['value'] as $var) { + if( ! is_scalar($var)) { + throw new \InvalidArgumentException(sprintf( + '@Enum supports only scalar values "%s" given.', + is_object($var) ? get_class($var) : gettype($var) + )); + } + } + + foreach ($values['literal'] as $key => $var) { + if( ! in_array($key, $values['value'])) { + throw new \InvalidArgumentException(sprintf( + 'Undefined enumerator value "%s" for literal "%s".', + $key , $var + )); + } + } + + $this->value = $values['value']; + $this->literal = $values['literal']; + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php new file mode 100644 index 0000000000000000000000000000000000000000..175226a67152c0dde61a9afcde55220adb2bbb65 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\Common\Annotations\Annotation; + +/** + * Annotation that can be used to signal to the parser to ignore specific + * annotations during the parsing process. + * + * @Annotation + * @author Johannes M. Schmitt + */ +final class IgnoreAnnotation +{ + /** + * @var array + */ + public $names; + + /** + * Constructor. + * + * @param array $values + * + * @throws \RuntimeException + */ + public function __construct(array $values) + { + if (is_string($values['value'])) { + $values['value'] = array($values['value']); + } + if (!is_array($values['value'])) { + throw new \RuntimeException(sprintf('@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', json_encode($values['value']))); + } + + $this->names = $values['value']; + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php new file mode 100644 index 0000000000000000000000000000000000000000..d67f9606879fdaa1bf1f9181ee90081a839b6510 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php @@ -0,0 +1,33 @@ +. + */ + +namespace Doctrine\Common\Annotations\Annotation; + +/** + * Annotation that can be used to signal to the parser + * to check if that attribute is required during the parsing process. + * + * @author Fabio B. Silva + * + * @Annotation + */ +final class Required +{ +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php new file mode 100644 index 0000000000000000000000000000000000000000..f6c544535934c2368c5c2482b9a3260a2547e901 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php @@ -0,0 +1,107 @@ +. + */ + +namespace Doctrine\Common\Annotations\Annotation; + +/** + * Annotation that can be used to signal to the parser + * to check the annotation target during the parsing process. + * + * @author Fabio B. Silva + * + * @Annotation + */ +final class Target +{ + const TARGET_CLASS = 1; + const TARGET_METHOD = 2; + const TARGET_PROPERTY = 4; + const TARGET_ANNOTATION = 8; + const TARGET_ALL = 15; + + /** + * @var array + */ + private static $map = array( + 'ALL' => self::TARGET_ALL, + 'CLASS' => self::TARGET_CLASS, + 'METHOD' => self::TARGET_METHOD, + 'PROPERTY' => self::TARGET_PROPERTY, + 'ANNOTATION' => self::TARGET_ANNOTATION, + ); + + /** + * @var array + */ + public $value; + + /** + * Targets as bitmask. + * + * @var integer + */ + public $targets; + + /** + * Literal target declaration. + * + * @var integer + */ + public $literal; + + /** + * Annotation constructor. + * + * @param array $values + * + * @throws \InvalidArgumentException + */ + public function __construct(array $values) + { + if (!isset($values['value'])){ + $values['value'] = null; + } + if (is_string($values['value'])){ + $values['value'] = array($values['value']); + } + if (!is_array($values['value'])){ + throw new \InvalidArgumentException( + sprintf('@Target expects either a string value, or an array of strings, "%s" given.', + is_object($values['value']) ? get_class($values['value']) : gettype($values['value']) + ) + ); + } + + $bitmask = 0; + foreach ($values['value'] as $literal) { + if(!isset(self::$map[$literal])){ + throw new \InvalidArgumentException( + sprintf('Invalid Target "%s". Available targets: [%s]', + $literal, implode(', ', array_keys(self::$map))) + ); + } + $bitmask |= self::$map[$literal]; + } + + $this->targets = $bitmask; + $this->value = $values['value']; + $this->literal = implode(', ', $this->value); + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php new file mode 100644 index 0000000000000000000000000000000000000000..d06fe663c26964be98aba634890638e246eada84 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php @@ -0,0 +1,197 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +/** + * Description of AnnotationException + * + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class AnnotationException extends \Exception +{ + /** + * Creates a new AnnotationException describing a Syntax error. + * + * @param string $message Exception message + * + * @return AnnotationException + */ + public static function syntaxError($message) + { + return new self('[Syntax Error] ' . $message); + } + + /** + * Creates a new AnnotationException describing a Semantical error. + * + * @param string $message Exception message + * + * @return AnnotationException + */ + public static function semanticalError($message) + { + return new self('[Semantical Error] ' . $message); + } + + /** + * Creates a new AnnotationException describing an error which occurred during + * the creation of the annotation. + * + * @since 2.2 + * + * @param string $message + * + * @return AnnotationException + */ + public static function creationError($message) + { + return new self('[Creation Error] ' . $message); + } + + /** + * Creates a new AnnotationException describing a type error. + * + * @since 1.1 + * + * @param string $message + * + * @return AnnotationException + */ + public static function typeError($message) + { + return new self('[Type Error] ' . $message); + } + + /** + * Creates a new AnnotationException describing a constant semantical error. + * + * @since 2.3 + * + * @param string $identifier + * @param string $context + * + * @return AnnotationException + */ + public static function semanticalErrorConstants($identifier, $context = null) + { + return self::semanticalError(sprintf( + "Couldn't find constant %s%s.", + $identifier, + $context ? ', ' . $context : '' + )); + } + + /** + * Creates a new AnnotationException describing an type error of an attribute. + * + * @since 2.2 + * + * @param string $attributeName + * @param string $annotationName + * @param string $context + * @param string $expected + * @param mixed $actual + * + * @return AnnotationException + */ + public static function attributeTypeError($attributeName, $annotationName, $context, $expected, $actual) + { + return self::typeError(sprintf( + 'Attribute "%s" of @%s declared on %s expects %s, but got %s.', + $attributeName, + $annotationName, + $context, + $expected, + is_object($actual) ? 'an instance of ' . get_class($actual) : gettype($actual) + )); + } + + /** + * Creates a new AnnotationException describing an required error of an attribute. + * + * @since 2.2 + * + * @param string $attributeName + * @param string $annotationName + * @param string $context + * @param string $expected + * + * @return AnnotationException + */ + public static function requiredError($attributeName, $annotationName, $context, $expected) + { + return self::typeError(sprintf( + 'Attribute "%s" of @%s declared on %s expects %s. This value should not be null.', + $attributeName, + $annotationName, + $context, + $expected + )); + } + + /** + * Creates a new AnnotationException describing a invalid enummerator. + * + * @since 2.4 + * + * @param string $attributeName + * @param string $annotationName + * @param string $context + * @param array $available + * @param mixed $given + * + * @return AnnotationException + */ + public static function enumeratorError($attributeName, $annotationName, $context, $available, $given) + { + return new self(sprintf( + '[Enum Error] Attribute "%s" of @%s declared on %s accept only [%s], but got %s.', + $attributeName, + $annotationName, + $context, + implode(', ', $available), + is_object($given) ? get_class($given) : $given + )); + } + + /** + * @return AnnotationException + */ + public static function optimizerPlusSaveComments() + { + return new self( + "You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1." + ); + } + + /** + * @return AnnotationException + */ + public static function optimizerPlusLoadComments() + { + return new self( + "You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1." + ); + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php new file mode 100644 index 0000000000000000000000000000000000000000..4ebd1fb4a00c50d2493f89733b3a1590fabc1e11 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php @@ -0,0 +1,394 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +use Doctrine\Common\Annotations\Annotation\IgnoreAnnotation; +use Doctrine\Common\Annotations\Annotation\Target; +use ReflectionClass; +use ReflectionMethod; +use ReflectionProperty; + +/** + * A reader for docblock annotations. + * + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Johannes M. Schmitt + */ +class AnnotationReader implements Reader +{ + /** + * Global map for imports. + * + * @var array + */ + private static $globalImports = array( + 'ignoreannotation' => 'Doctrine\Common\Annotations\Annotation\IgnoreAnnotation', + ); + + /** + * A list with annotations that are not causing exceptions when not resolved to an annotation class. + * + * The names are case sensitive. + * + * @var array + */ + private static $globalIgnoredNames = array( + // Annotation tags + 'Annotation' => true, 'Attribute' => true, 'Attributes' => true, + /* Can we enable this? 'Enum' => true, */ + 'Required' => true, + 'Target' => true, + // Widely used tags (but not existent in phpdoc) + 'fix' => true , 'fixme' => true, + 'override' => true, + // PHPDocumentor 1 tags + 'abstract'=> true, 'access'=> true, + 'code' => true, + 'deprec'=> true, + 'endcode' => true, 'exception'=> true, + 'final'=> true, + 'ingroup' => true, 'inheritdoc'=> true, 'inheritDoc'=> true, + 'magic' => true, + 'name'=> true, + 'toc' => true, 'tutorial'=> true, + 'private' => true, + 'static'=> true, 'staticvar'=> true, 'staticVar'=> true, + 'throw' => true, + // PHPDocumentor 2 tags. + 'api' => true, 'author'=> true, + 'category'=> true, 'copyright'=> true, + 'deprecated'=> true, + 'example'=> true, + 'filesource'=> true, + 'global'=> true, + 'ignore'=> true, /* Can we enable this? 'index' => true, */ 'internal'=> true, + 'license'=> true, 'link'=> true, + 'method' => true, + 'package'=> true, 'param'=> true, 'property' => true, 'property-read' => true, 'property-write' => true, + 'return'=> true, + 'see'=> true, 'since'=> true, 'source' => true, 'subpackage'=> true, + 'throws'=> true, 'todo'=> true, 'TODO'=> true, + 'usedby'=> true, 'uses' => true, + 'var'=> true, 'version'=> true, + // PHPUnit tags + 'codeCoverageIgnore' => true, 'codeCoverageIgnoreStart' => true, 'codeCoverageIgnoreEnd' => true, + // PHPCheckStyle + 'SuppressWarnings' => true, + // PHPStorm + 'noinspection' => true, + // PEAR + 'package_version' => true, + // PlantUML + 'startuml' => true, 'enduml' => true, + ); + + /** + * Add a new annotation to the globally ignored annotation names with regard to exception handling. + * + * @param string $name + */ + static public function addGlobalIgnoredName($name) + { + self::$globalIgnoredNames[$name] = true; + } + + /** + * Annotations parser. + * + * @var \Doctrine\Common\Annotations\DocParser + */ + private $parser; + + /** + * Annotations parser used to collect parsing metadata. + * + * @var \Doctrine\Common\Annotations\DocParser + */ + private $preParser; + + /** + * PHP parser used to collect imports. + * + * @var \Doctrine\Common\Annotations\PhpParser + */ + private $phpParser; + + /** + * In-memory cache mechanism to store imported annotations per class. + * + * @var array + */ + private $imports = array(); + + /** + * In-memory cache mechanism to store ignored annotations per class. + * + * @var array + */ + private $ignoredAnnotationNames = array(); + + /** + * Constructor. + * + * Initializes a new AnnotationReader. + */ + public function __construct() + { + if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === "0" || ini_get('opcache.save_comments') === "0")) { + throw AnnotationException::optimizerPlusSaveComments(); + } + + if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') == 0) { + throw AnnotationException::optimizerPlusSaveComments(); + } + + if (PHP_VERSION_ID < 70000) { + if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.load_comments') === "0" || ini_get('opcache.load_comments') === "0")) { + throw AnnotationException::optimizerPlusLoadComments(); + } + + if (extension_loaded('Zend OPcache') && ini_get('opcache.load_comments') == 0) { + throw AnnotationException::optimizerPlusLoadComments(); + } + } + + AnnotationRegistry::registerFile(__DIR__ . '/Annotation/IgnoreAnnotation.php'); + + $this->parser = new DocParser; + $this->preParser = new DocParser; + + $this->preParser->setImports(self::$globalImports); + $this->preParser->setIgnoreNotImportedAnnotations(true); + + $this->phpParser = new PhpParser; + } + + /** + * {@inheritDoc} + */ + public function getClassAnnotations(ReflectionClass $class) + { + $this->parser->setTarget(Target::TARGET_CLASS); + $this->parser->setImports($this->getClassImports($class)); + $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); + + return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); + } + + /** + * {@inheritDoc} + */ + public function getClassAnnotation(ReflectionClass $class, $annotationName) + { + $annotations = $this->getClassAnnotations($class); + + foreach ($annotations as $annotation) { + if ($annotation instanceof $annotationName) { + return $annotation; + } + } + + return null; + } + + /** + * {@inheritDoc} + */ + public function getPropertyAnnotations(ReflectionProperty $property) + { + $class = $property->getDeclaringClass(); + $context = 'property ' . $class->getName() . "::\$" . $property->getName(); + + $this->parser->setTarget(Target::TARGET_PROPERTY); + $this->parser->setImports($this->getPropertyImports($property)); + $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); + + return $this->parser->parse($property->getDocComment(), $context); + } + + /** + * {@inheritDoc} + */ + public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) + { + $annotations = $this->getPropertyAnnotations($property); + + foreach ($annotations as $annotation) { + if ($annotation instanceof $annotationName) { + return $annotation; + } + } + + return null; + } + + /** + * {@inheritDoc} + */ + public function getMethodAnnotations(ReflectionMethod $method) + { + $class = $method->getDeclaringClass(); + $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; + + $this->parser->setTarget(Target::TARGET_METHOD); + $this->parser->setImports($this->getMethodImports($method)); + $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); + + return $this->parser->parse($method->getDocComment(), $context); + } + + /** + * {@inheritDoc} + */ + public function getMethodAnnotation(ReflectionMethod $method, $annotationName) + { + $annotations = $this->getMethodAnnotations($method); + + foreach ($annotations as $annotation) { + if ($annotation instanceof $annotationName) { + return $annotation; + } + } + + return null; + } + + /** + * Returns the ignored annotations for the given class. + * + * @param \ReflectionClass $class + * + * @return array + */ + private function getIgnoredAnnotationNames(ReflectionClass $class) + { + if (isset($this->ignoredAnnotationNames[$name = $class->getName()])) { + return $this->ignoredAnnotationNames[$name]; + } + + $this->collectParsingMetadata($class); + + return $this->ignoredAnnotationNames[$name]; + } + + /** + * Retrieves imports. + * + * @param \ReflectionClass $class + * + * @return array + */ + private function getClassImports(ReflectionClass $class) + { + if (isset($this->imports[$name = $class->getName()])) { + return $this->imports[$name]; + } + + $this->collectParsingMetadata($class); + + return $this->imports[$name]; + } + + /** + * Retrieves imports for methods. + * + * @param \ReflectionMethod $method + * + * @return array + */ + private function getMethodImports(ReflectionMethod $method) + { + $class = $method->getDeclaringClass(); + $classImports = $this->getClassImports($class); + if (!method_exists($class, 'getTraits')) { + return $classImports; + } + + $traitImports = array(); + + foreach ($class->getTraits() as $trait) { + if ($trait->hasMethod($method->getName()) + && $trait->getFileName() === $method->getFileName() + ) { + $traitImports = array_merge($traitImports, $this->phpParser->parseClass($trait)); + } + } + + return array_merge($classImports, $traitImports); + } + + /** + * Retrieves imports for properties. + * + * @param \ReflectionProperty $property + * + * @return array + */ + private function getPropertyImports(ReflectionProperty $property) + { + $class = $property->getDeclaringClass(); + $classImports = $this->getClassImports($class); + if (!method_exists($class, 'getTraits')) { + return $classImports; + } + + $traitImports = array(); + + foreach ($class->getTraits() as $trait) { + if ($trait->hasProperty($property->getName())) { + $traitImports = array_merge($traitImports, $this->phpParser->parseClass($trait)); + } + } + + return array_merge($classImports, $traitImports); + } + + /** + * Collects parsing metadata for a given class. + * + * @param \ReflectionClass $class + */ + private function collectParsingMetadata(ReflectionClass $class) + { + $ignoredAnnotationNames = self::$globalIgnoredNames; + $annotations = $this->preParser->parse($class->getDocComment(), 'class ' . $class->name); + + foreach ($annotations as $annotation) { + if ($annotation instanceof IgnoreAnnotation) { + foreach ($annotation->names AS $annot) { + $ignoredAnnotationNames[$annot] = true; + } + } + } + + $name = $class->getName(); + + $this->imports[$name] = array_merge( + self::$globalImports, + $this->phpParser->parseClass($class), + array('__NAMESPACE__' => $class->getNamespaceName()) + ); + + $this->ignoredAnnotationNames[$name] = $ignoredAnnotationNames; + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php new file mode 100644 index 0000000000000000000000000000000000000000..13ceb6348b33593a7de16fd2600d9e408ce8c3c3 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php @@ -0,0 +1,151 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +/** + * AnnotationRegistry. + */ +final class AnnotationRegistry +{ + /** + * A map of namespaces to use for autoloading purposes based on a PSR-0 convention. + * + * Contains the namespace as key and an array of directories as value. If the value is NULL + * the include path is used for checking for the corresponding file. + * + * This autoloading mechanism does not utilize the PHP autoloading but implements autoloading on its own. + * + * @var array + */ + static private $autoloadNamespaces = array(); + + /** + * A map of autoloader callables. + * + * @var array + */ + static private $loaders = array(); + + /** + * @return void + */ + static public function reset() + { + self::$autoloadNamespaces = array(); + self::$loaders = array(); + } + + /** + * Registers file. + * + * @param string $file + * + * @return void + */ + static public function registerFile($file) + { + require_once $file; + } + + /** + * Adds a namespace with one or many directories to look for files or null for the include path. + * + * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm. + * + * @param string $namespace + * @param string|array|null $dirs + * + * @return void + */ + static public function registerAutoloadNamespace($namespace, $dirs = null) + { + self::$autoloadNamespaces[$namespace] = $dirs; + } + + /** + * Registers multiple namespaces. + * + * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm. + * + * @param array $namespaces + * + * @return void + */ + static public function registerAutoloadNamespaces(array $namespaces) + { + self::$autoloadNamespaces = array_merge(self::$autoloadNamespaces, $namespaces); + } + + /** + * Registers an autoloading callable for annotations, much like spl_autoload_register(). + * + * NOTE: These class loaders HAVE to be silent when a class was not found! + * IMPORTANT: Loaders have to return true if they loaded a class that could contain the searched annotation class. + * + * @param callable $callable + * + * @return void + * + * @throws \InvalidArgumentException + */ + static public function registerLoader($callable) + { + if (!is_callable($callable)) { + throw new \InvalidArgumentException("A callable is expected in AnnotationRegistry::registerLoader()."); + } + self::$loaders[] = $callable; + } + + /** + * Autoloads an annotation class silently. + * + * @param string $class + * + * @return boolean + */ + static public function loadAnnotationClass($class) + { + foreach (self::$autoloadNamespaces AS $namespace => $dirs) { + if (strpos($class, $namespace) === 0) { + $file = str_replace("\\", DIRECTORY_SEPARATOR, $class) . ".php"; + if ($dirs === null) { + if ($path = stream_resolve_include_path($file)) { + require $path; + return true; + } + } else { + foreach((array)$dirs AS $dir) { + if (is_file($dir . DIRECTORY_SEPARATOR . $file)) { + require $dir . DIRECTORY_SEPARATOR . $file; + return true; + } + } + } + } + } + + foreach (self::$loaders AS $loader) { + if (call_user_func($loader, $class) === true) { + return true; + } + } + return false; + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php new file mode 100644 index 0000000000000000000000000000000000000000..e6dc59329a5fd2d2376b6417fde08e55b474b9b7 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php @@ -0,0 +1,235 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +use Doctrine\Common\Cache\Cache; + +/** + * A cache aware annotation reader. + * + * @author Johannes M. Schmitt + * @author Benjamin Eberlei + */ +final class CachedReader implements Reader +{ + /** + * @var string + */ + private static $CACHE_SALT = '@[Annot]'; + + /** + * @var Reader + */ + private $delegate; + + /** + * @var Cache + */ + private $cache; + + /** + * @var boolean + */ + private $debug; + + /** + * @var array + */ + private $loadedAnnotations = array(); + + /** + * Constructor. + * + * @param Reader $reader + * @param Cache $cache + * @param bool $debug + */ + public function __construct(Reader $reader, Cache $cache, $debug = false) + { + $this->delegate = $reader; + $this->cache = $cache; + $this->debug = (boolean) $debug; + } + + /** + * {@inheritDoc} + */ + public function getClassAnnotations(\ReflectionClass $class) + { + $cacheKey = $class->getName(); + + if (isset($this->loadedAnnotations[$cacheKey])) { + return $this->loadedAnnotations[$cacheKey]; + } + + if (false === ($annots = $this->fetchFromCache($cacheKey, $class))) { + $annots = $this->delegate->getClassAnnotations($class); + $this->saveToCache($cacheKey, $annots); + } + + return $this->loadedAnnotations[$cacheKey] = $annots; + } + + /** + * {@inheritDoc} + */ + public function getClassAnnotation(\ReflectionClass $class, $annotationName) + { + foreach ($this->getClassAnnotations($class) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + + return null; + } + + /** + * {@inheritDoc} + */ + public function getPropertyAnnotations(\ReflectionProperty $property) + { + $class = $property->getDeclaringClass(); + $cacheKey = $class->getName().'$'.$property->getName(); + + if (isset($this->loadedAnnotations[$cacheKey])) { + return $this->loadedAnnotations[$cacheKey]; + } + + if (false === ($annots = $this->fetchFromCache($cacheKey, $class))) { + $annots = $this->delegate->getPropertyAnnotations($property); + $this->saveToCache($cacheKey, $annots); + } + + return $this->loadedAnnotations[$cacheKey] = $annots; + } + + /** + * {@inheritDoc} + */ + public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) + { + foreach ($this->getPropertyAnnotations($property) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + + return null; + } + + /** + * {@inheritDoc} + */ + public function getMethodAnnotations(\ReflectionMethod $method) + { + $class = $method->getDeclaringClass(); + $cacheKey = $class->getName().'#'.$method->getName(); + + if (isset($this->loadedAnnotations[$cacheKey])) { + return $this->loadedAnnotations[$cacheKey]; + } + + if (false === ($annots = $this->fetchFromCache($cacheKey, $class))) { + $annots = $this->delegate->getMethodAnnotations($method); + $this->saveToCache($cacheKey, $annots); + } + + return $this->loadedAnnotations[$cacheKey] = $annots; + } + + /** + * {@inheritDoc} + */ + public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) + { + foreach ($this->getMethodAnnotations($method) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + + return null; + } + + /** + * Clears loaded annotations. + * + * @return void + */ + public function clearLoadedAnnotations() + { + $this->loadedAnnotations = array(); + } + + /** + * Fetches a value from the cache. + * + * @param string $rawCacheKey The cache key. + * @param \ReflectionClass $class The related class. + * + * @return mixed The cached value or false when the value is not in cache. + */ + private function fetchFromCache($rawCacheKey, \ReflectionClass $class) + { + $cacheKey = $rawCacheKey . self::$CACHE_SALT; + if (($data = $this->cache->fetch($cacheKey)) !== false) { + if (!$this->debug || $this->isCacheFresh($cacheKey, $class)) { + return $data; + } + } + + return false; + } + + /** + * Saves a value to the cache. + * + * @param string $rawCacheKey The cache key. + * @param mixed $value The value. + * + * @return void + */ + private function saveToCache($rawCacheKey, $value) + { + $cacheKey = $rawCacheKey . self::$CACHE_SALT; + $this->cache->save($cacheKey, $value); + if ($this->debug) { + $this->cache->save('[C]'.$cacheKey, time()); + } + } + + /** + * Checks if the cache is fresh. + * + * @param string $cacheKey + * @param \ReflectionClass $class + * + * @return boolean + */ + private function isCacheFresh($cacheKey, \ReflectionClass $class) + { + if (false === $filename = $class->getFilename()) { + return true; + } + + return $this->cache->fetch('[C]'.$cacheKey) >= filemtime($filename); + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php new file mode 100644 index 0000000000000000000000000000000000000000..d864540e002fb1a5244d4ac23366571a40d232b4 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php @@ -0,0 +1,134 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +use Doctrine\Common\Lexer\AbstractLexer; + +/** + * Simple lexer for docblock annotations. + * + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Johannes M. Schmitt + */ +final class DocLexer extends AbstractLexer +{ + const T_NONE = 1; + const T_INTEGER = 2; + const T_STRING = 3; + const T_FLOAT = 4; + + // All tokens that are also identifiers should be >= 100 + const T_IDENTIFIER = 100; + const T_AT = 101; + const T_CLOSE_CURLY_BRACES = 102; + const T_CLOSE_PARENTHESIS = 103; + const T_COMMA = 104; + const T_EQUALS = 105; + const T_FALSE = 106; + const T_NAMESPACE_SEPARATOR = 107; + const T_OPEN_CURLY_BRACES = 108; + const T_OPEN_PARENTHESIS = 109; + const T_TRUE = 110; + const T_NULL = 111; + const T_COLON = 112; + + /** + * @var array + */ + protected $noCase = array( + '@' => self::T_AT, + ',' => self::T_COMMA, + '(' => self::T_OPEN_PARENTHESIS, + ')' => self::T_CLOSE_PARENTHESIS, + '{' => self::T_OPEN_CURLY_BRACES, + '}' => self::T_CLOSE_CURLY_BRACES, + '=' => self::T_EQUALS, + ':' => self::T_COLON, + '\\' => self::T_NAMESPACE_SEPARATOR + ); + + /** + * @var array + */ + protected $withCase = array( + 'true' => self::T_TRUE, + 'false' => self::T_FALSE, + 'null' => self::T_NULL + ); + + /** + * {@inheritdoc} + */ + protected function getCatchablePatterns() + { + return array( + '[a-z_\\\][a-z0-9_\:\\\]*[a-z_][a-z0-9_]*', + '(?:[+-]?[0-9]+(?:[\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?', + '"(?:""|[^"])*+"', + ); + } + + /** + * {@inheritdoc} + */ + protected function getNonCatchablePatterns() + { + return array('\s+', '\*+', '(.)'); + } + + /** + * {@inheritdoc} + */ + protected function getType(&$value) + { + $type = self::T_NONE; + + if ($value[0] === '"') { + $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2)); + + return self::T_STRING; + } + + if (isset($this->noCase[$value])) { + return $this->noCase[$value]; + } + + if ($value[0] === '_' || $value[0] === '\\' || ctype_alpha($value[0])) { + return self::T_IDENTIFIER; + } + + $lowerValue = strtolower($value); + + if (isset($this->withCase[$lowerValue])) { + return $this->withCase[$lowerValue]; + } + + // Checking numeric value + if (is_numeric($value)) { + return (strpos($value, '.') !== false || stripos($value, 'e') !== false) + ? self::T_FLOAT : self::T_INTEGER; + } + + return $type; + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php new file mode 100644 index 0000000000000000000000000000000000000000..db668460ee14e06ff41748b17ae8aa44ceae5979 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php @@ -0,0 +1,1138 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +use Doctrine\Common\Annotations\Annotation\Attribute; +use ReflectionClass; +use Doctrine\Common\Annotations\Annotation\Enum; +use Doctrine\Common\Annotations\Annotation\Target; +use Doctrine\Common\Annotations\Annotation\Attributes; + +/** + * A parser for docblock annotations. + * + * It is strongly discouraged to change the default annotation parsing process. + * + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Johannes M. Schmitt + * @author Fabio B. Silva + */ +final class DocParser +{ + /** + * An array of all valid tokens for a class name. + * + * @var array + */ + private static $classIdentifiers = array( + DocLexer::T_IDENTIFIER, + DocLexer::T_TRUE, + DocLexer::T_FALSE, + DocLexer::T_NULL + ); + + /** + * The lexer. + * + * @var \Doctrine\Common\Annotations\DocLexer + */ + private $lexer; + + /** + * Current target context. + * + * @var string + */ + private $target; + + /** + * Doc parser used to collect annotation target. + * + * @var \Doctrine\Common\Annotations\DocParser + */ + private static $metadataParser; + + /** + * Flag to control if the current annotation is nested or not. + * + * @var boolean + */ + private $isNestedAnnotation = false; + + /** + * Hashmap containing all use-statements that are to be used when parsing + * the given doc block. + * + * @var array + */ + private $imports = array(); + + /** + * This hashmap is used internally to cache results of class_exists() + * look-ups. + * + * @var array + */ + private $classExists = array(); + + /** + * Whether annotations that have not been imported should be ignored. + * + * @var boolean + */ + private $ignoreNotImportedAnnotations = false; + + /** + * An array of default namespaces if operating in simple mode. + * + * @var array + */ + private $namespaces = array(); + + /** + * A list with annotations that are not causing exceptions when not resolved to an annotation class. + * + * The names must be the raw names as used in the class, not the fully qualified + * class names. + * + * @var array + */ + private $ignoredAnnotationNames = array(); + + /** + * @var string + */ + private $context = ''; + + /** + * Hash-map for caching annotation metadata. + * + * @var array + */ + private static $annotationMetadata = array( + 'Doctrine\Common\Annotations\Annotation\Target' => array( + 'is_annotation' => true, + 'has_constructor' => true, + 'properties' => array(), + 'targets_literal' => 'ANNOTATION_CLASS', + 'targets' => Target::TARGET_CLASS, + 'default_property' => 'value', + 'attribute_types' => array( + 'value' => array( + 'required' => false, + 'type' =>'array', + 'array_type'=>'string', + 'value' =>'array' + ) + ), + ), + 'Doctrine\Common\Annotations\Annotation\Attribute' => array( + 'is_annotation' => true, + 'has_constructor' => false, + 'targets_literal' => 'ANNOTATION_ANNOTATION', + 'targets' => Target::TARGET_ANNOTATION, + 'default_property' => 'name', + 'properties' => array( + 'name' => 'name', + 'type' => 'type', + 'required' => 'required' + ), + 'attribute_types' => array( + 'value' => array( + 'required' => true, + 'type' =>'string', + 'value' =>'string' + ), + 'type' => array( + 'required' =>true, + 'type' =>'string', + 'value' =>'string' + ), + 'required' => array( + 'required' =>false, + 'type' =>'boolean', + 'value' =>'boolean' + ) + ), + ), + 'Doctrine\Common\Annotations\Annotation\Attributes' => array( + 'is_annotation' => true, + 'has_constructor' => false, + 'targets_literal' => 'ANNOTATION_CLASS', + 'targets' => Target::TARGET_CLASS, + 'default_property' => 'value', + 'properties' => array( + 'value' => 'value' + ), + 'attribute_types' => array( + 'value' => array( + 'type' =>'array', + 'required' =>true, + 'array_type'=>'Doctrine\Common\Annotations\Annotation\Attribute', + 'value' =>'array' + ) + ), + ), + 'Doctrine\Common\Annotations\Annotation\Enum' => array( + 'is_annotation' => true, + 'has_constructor' => true, + 'targets_literal' => 'ANNOTATION_PROPERTY', + 'targets' => Target::TARGET_PROPERTY, + 'default_property' => 'value', + 'properties' => array( + 'value' => 'value' + ), + 'attribute_types' => array( + 'value' => array( + 'type' => 'array', + 'required' => true, + ), + 'literal' => array( + 'type' => 'array', + 'required' => false, + ), + ), + ), + ); + + /** + * Hash-map for handle types declaration. + * + * @var array + */ + private static $typeMap = array( + 'float' => 'double', + 'bool' => 'boolean', + // allow uppercase Boolean in honor of George Boole + 'Boolean' => 'boolean', + 'int' => 'integer', + ); + + /** + * Constructs a new DocParser. + */ + public function __construct() + { + $this->lexer = new DocLexer; + } + + /** + * Sets the annotation names that are ignored during the parsing process. + * + * The names are supposed to be the raw names as used in the class, not the + * fully qualified class names. + * + * @param array $names + * + * @return void + */ + public function setIgnoredAnnotationNames(array $names) + { + $this->ignoredAnnotationNames = $names; + } + + /** + * Sets ignore on not-imported annotations. + * + * @param boolean $bool + * + * @return void + */ + public function setIgnoreNotImportedAnnotations($bool) + { + $this->ignoreNotImportedAnnotations = (boolean) $bool; + } + + /** + * Sets the default namespaces. + * + * @param array $namespace + * + * @return void + * + * @throws \RuntimeException + */ + public function addNamespace($namespace) + { + if ($this->imports) { + throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); + } + + $this->namespaces[] = $namespace; + } + + /** + * Sets the imports. + * + * @param array $imports + * + * @return void + * + * @throws \RuntimeException + */ + public function setImports(array $imports) + { + if ($this->namespaces) { + throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); + } + + $this->imports = $imports; + } + + /** + * Sets current target context as bitmask. + * + * @param integer $target + * + * @return void + */ + public function setTarget($target) + { + $this->target = $target; + } + + /** + * Parses the given docblock string for annotations. + * + * @param string $input The docblock string to parse. + * @param string $context The parsing context. + * + * @return array Array of annotations. If no annotations are found, an empty array is returned. + */ + public function parse($input, $context = '') + { + $pos = $this->findInitialTokenPosition($input); + if ($pos === null) { + return array(); + } + + $this->context = $context; + + $this->lexer->setInput(trim(substr($input, $pos), '* /')); + $this->lexer->moveNext(); + + return $this->Annotations(); + } + + /** + * Finds the first valid annotation + * + * @param string $input The docblock string to parse + * + * @return int|null + */ + private function findInitialTokenPosition($input) + { + $pos = 0; + + // search for first valid annotation + while (($pos = strpos($input, '@', $pos)) !== false) { + // if the @ is preceded by a space or * it is valid + if ($pos === 0 || $input[$pos - 1] === ' ' || $input[$pos - 1] === '*') { + return $pos; + } + + $pos++; + } + + return null; + } + + /** + * Attempts to match the given token with the current lookahead token. + * If they match, updates the lookahead token; otherwise raises a syntax error. + * + * @param integer $token Type of token. + * + * @return boolean True if tokens match; false otherwise. + */ + private function match($token) + { + if ( ! $this->lexer->isNextToken($token) ) { + $this->syntaxError($this->lexer->getLiteral($token)); + } + + return $this->lexer->moveNext(); + } + + /** + * Attempts to match the current lookahead token with any of the given tokens. + * + * If any of them matches, this method updates the lookahead token; otherwise + * a syntax error is raised. + * + * @param array $tokens + * + * @return boolean + */ + private function matchAny(array $tokens) + { + if ( ! $this->lexer->isNextTokenAny($tokens)) { + $this->syntaxError(implode(' or ', array_map(array($this->lexer, 'getLiteral'), $tokens))); + } + + return $this->lexer->moveNext(); + } + + /** + * Generates a new syntax error. + * + * @param string $expected Expected string. + * @param array|null $token Optional token. + * + * @return void + * + * @throws AnnotationException + */ + private function syntaxError($expected, $token = null) + { + if ($token === null) { + $token = $this->lexer->lookahead; + } + + $message = sprintf('Expected %s, got ', $expected); + $message .= ($this->lexer->lookahead === null) + ? 'end of string' + : sprintf("'%s' at position %s", $token['value'], $token['position']); + + if (strlen($this->context)) { + $message .= ' in ' . $this->context; + } + + $message .= '.'; + + throw AnnotationException::syntaxError($message); + } + + /** + * Attempts to check if a class exists or not. This never goes through the PHP autoloading mechanism + * but uses the {@link AnnotationRegistry} to load classes. + * + * @param string $fqcn + * + * @return boolean + */ + private function classExists($fqcn) + { + if (isset($this->classExists[$fqcn])) { + return $this->classExists[$fqcn]; + } + + // first check if the class already exists, maybe loaded through another AnnotationReader + if (class_exists($fqcn, false)) { + return $this->classExists[$fqcn] = true; + } + + // final check, does this class exist? + return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn); + } + + /** + * Collects parsing metadata for a given annotation class + * + * @param string $name The annotation name + * + * @return void + */ + private function collectAnnotationMetadata($name) + { + if (self::$metadataParser === null) { + self::$metadataParser = new self(); + + self::$metadataParser->setIgnoreNotImportedAnnotations(true); + self::$metadataParser->setIgnoredAnnotationNames($this->ignoredAnnotationNames); + self::$metadataParser->setImports(array( + 'enum' => 'Doctrine\Common\Annotations\Annotation\Enum', + 'target' => 'Doctrine\Common\Annotations\Annotation\Target', + 'attribute' => 'Doctrine\Common\Annotations\Annotation\Attribute', + 'attributes' => 'Doctrine\Common\Annotations\Annotation\Attributes' + )); + + AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Enum.php'); + AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Target.php'); + AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attribute.php'); + AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attributes.php'); + } + + $class = new \ReflectionClass($name); + $docComment = $class->getDocComment(); + + // Sets default values for annotation metadata + $metadata = array( + 'default_property' => null, + 'has_constructor' => (null !== $constructor = $class->getConstructor()) && $constructor->getNumberOfParameters() > 0, + 'properties' => array(), + 'property_types' => array(), + 'attribute_types' => array(), + 'targets_literal' => null, + 'targets' => Target::TARGET_ALL, + 'is_annotation' => false !== strpos($docComment, '@Annotation'), + ); + + // verify that the class is really meant to be an annotation + if ($metadata['is_annotation']) { + self::$metadataParser->setTarget(Target::TARGET_CLASS); + + foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) { + if ($annotation instanceof Target) { + $metadata['targets'] = $annotation->targets; + $metadata['targets_literal'] = $annotation->literal; + + continue; + } + + if ($annotation instanceof Attributes) { + foreach ($annotation->value as $attribute) { + $this->collectAttributeTypeMetadata($metadata, $attribute); + } + } + } + + // if not has a constructor will inject values into public properties + if (false === $metadata['has_constructor']) { + // collect all public properties + foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { + $metadata['properties'][$property->name] = $property->name; + + if (false === ($propertyComment = $property->getDocComment())) { + continue; + } + + $attribute = new Attribute(); + + $attribute->required = (false !== strpos($propertyComment, '@Required')); + $attribute->name = $property->name; + $attribute->type = (false !== strpos($propertyComment, '@var') && preg_match('/@var\s+([^\s]+)/',$propertyComment, $matches)) + ? $matches[1] + : 'mixed'; + + $this->collectAttributeTypeMetadata($metadata, $attribute); + + // checks if the property has @Enum + if (false !== strpos($propertyComment, '@Enum')) { + $context = 'property ' . $class->name . "::\$" . $property->name; + + self::$metadataParser->setTarget(Target::TARGET_PROPERTY); + + foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) { + if ( ! $annotation instanceof Enum) { + continue; + } + + $metadata['enum'][$property->name]['value'] = $annotation->value; + $metadata['enum'][$property->name]['literal'] = ( ! empty($annotation->literal)) + ? $annotation->literal + : $annotation->value; + } + } + } + + // choose the first property as default property + $metadata['default_property'] = reset($metadata['properties']); + } + } + + self::$annotationMetadata[$name] = $metadata; + } + + /** + * Collects parsing metadata for a given attribute. + * + * @param array $metadata + * @param Attribute $attribute + * + * @return void + */ + private function collectAttributeTypeMetadata(&$metadata, Attribute $attribute) + { + // handle internal type declaration + $type = isset(self::$typeMap[$attribute->type]) + ? self::$typeMap[$attribute->type] + : $attribute->type; + + // handle the case if the property type is mixed + if ('mixed' === $type) { + return; + } + + // Evaluate type + switch (true) { + // Checks if the property has array + case (false !== $pos = strpos($type, '<')): + $arrayType = substr($type, $pos + 1, -1); + $type = 'array'; + + if (isset(self::$typeMap[$arrayType])) { + $arrayType = self::$typeMap[$arrayType]; + } + + $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; + break; + + // Checks if the property has type[] + case (false !== $pos = strrpos($type, '[')): + $arrayType = substr($type, 0, $pos); + $type = 'array'; + + if (isset(self::$typeMap[$arrayType])) { + $arrayType = self::$typeMap[$arrayType]; + } + + $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; + break; + } + + $metadata['attribute_types'][$attribute->name]['type'] = $type; + $metadata['attribute_types'][$attribute->name]['value'] = $attribute->type; + $metadata['attribute_types'][$attribute->name]['required'] = $attribute->required; + } + + /** + * Annotations ::= Annotation {[ "*" ]* [Annotation]}* + * + * @return array + */ + private function Annotations() + { + $annotations = array(); + + while (null !== $this->lexer->lookahead) { + if (DocLexer::T_AT !== $this->lexer->lookahead['type']) { + $this->lexer->moveNext(); + continue; + } + + // make sure the @ is preceded by non-catchable pattern + if (null !== $this->lexer->token && $this->lexer->lookahead['position'] === $this->lexer->token['position'] + strlen($this->lexer->token['value'])) { + $this->lexer->moveNext(); + continue; + } + + // make sure the @ is followed by either a namespace separator, or + // an identifier token + if ((null === $peek = $this->lexer->glimpse()) + || (DocLexer::T_NAMESPACE_SEPARATOR !== $peek['type'] && !in_array($peek['type'], self::$classIdentifiers, true)) + || $peek['position'] !== $this->lexer->lookahead['position'] + 1) { + $this->lexer->moveNext(); + continue; + } + + $this->isNestedAnnotation = false; + if (false !== $annot = $this->Annotation()) { + $annotations[] = $annot; + } + } + + return $annotations; + } + + /** + * Annotation ::= "@" AnnotationName MethodCall + * AnnotationName ::= QualifiedName | SimpleName + * QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName + * NameSpacePart ::= identifier | null | false | true + * SimpleName ::= identifier | null | false | true + * + * @return mixed False if it is not a valid annotation. + * + * @throws AnnotationException + */ + private function Annotation() + { + $this->match(DocLexer::T_AT); + + // check if we have an annotation + $name = $this->Identifier(); + + // only process names which are not fully qualified, yet + // fully qualified names must start with a \ + $originalName = $name; + + if ('\\' !== $name[0]) { + $alias = (false === $pos = strpos($name, '\\'))? $name : substr($name, 0, $pos); + $found = false; + + if ($this->namespaces) { + foreach ($this->namespaces as $namespace) { + if ($this->classExists($namespace.'\\'.$name)) { + $name = $namespace.'\\'.$name; + $found = true; + break; + } + } + } elseif (isset($this->imports[$loweredAlias = strtolower($alias)])) { + $found = true; + $name = (false !== $pos) + ? $this->imports[$loweredAlias] . substr($name, $pos) + : $this->imports[$loweredAlias]; + } elseif ( ! isset($this->ignoredAnnotationNames[$name]) + && isset($this->imports['__NAMESPACE__']) + && $this->classExists($this->imports['__NAMESPACE__'] . '\\' . $name) + ) { + $name = $this->imports['__NAMESPACE__'].'\\'.$name; + $found = true; + } elseif (! isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) { + $found = true; + } + + if ( ! $found) { + if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) { + return false; + } + + throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation?', $name, $this->context)); + } + } + + if ( ! $this->classExists($name)) { + throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s does not exist, or could not be auto-loaded.', $name, $this->context)); + } + + // at this point, $name contains the fully qualified class name of the + // annotation, and it is also guaranteed that this class exists, and + // that it is loaded + + + // collects the metadata annotation only if there is not yet + if ( ! isset(self::$annotationMetadata[$name])) { + $this->collectAnnotationMetadata($name); + } + + // verify that the class is really meant to be an annotation and not just any ordinary class + if (self::$annotationMetadata[$name]['is_annotation'] === false) { + if (isset($this->ignoredAnnotationNames[$originalName])) { + return false; + } + + throw AnnotationException::semanticalError(sprintf('The class "%s" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "%s". If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s.', $name, $name, $originalName, $this->context)); + } + + //if target is nested annotation + $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target; + + // Next will be nested + $this->isNestedAnnotation = true; + + //if annotation does not support current target + if (0 === (self::$annotationMetadata[$name]['targets'] & $target) && $target) { + throw AnnotationException::semanticalError( + sprintf('Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s.', + $originalName, $this->context, self::$annotationMetadata[$name]['targets_literal']) + ); + } + + $values = $this->MethodCall(); + + if (isset(self::$annotationMetadata[$name]['enum'])) { + // checks all declared attributes + foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) { + // checks if the attribute is a valid enumerator + if (isset($values[$property]) && ! in_array($values[$property], $enum['value'])) { + throw AnnotationException::enumeratorError($property, $name, $this->context, $enum['literal'], $values[$property]); + } + } + } + + // checks all declared attributes + foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) { + if ($property === self::$annotationMetadata[$name]['default_property'] + && !isset($values[$property]) && isset($values['value'])) { + $property = 'value'; + } + + // handle a not given attribute or null value + if (!isset($values[$property])) { + if ($type['required']) { + throw AnnotationException::requiredError($property, $originalName, $this->context, 'a(n) '.$type['value']); + } + + continue; + } + + if ($type['type'] === 'array') { + // handle the case of a single value + if ( ! is_array($values[$property])) { + $values[$property] = array($values[$property]); + } + + // checks if the attribute has array type declaration, such as "array" + if (isset($type['array_type'])) { + foreach ($values[$property] as $item) { + if (gettype($item) !== $type['array_type'] && !$item instanceof $type['array_type']) { + throw AnnotationException::attributeTypeError($property, $originalName, $this->context, 'either a(n) '.$type['array_type'].', or an array of '.$type['array_type'].'s', $item); + } + } + } + } elseif (gettype($values[$property]) !== $type['type'] && !$values[$property] instanceof $type['type']) { + throw AnnotationException::attributeTypeError($property, $originalName, $this->context, 'a(n) '.$type['value'], $values[$property]); + } + } + + // check if the annotation expects values via the constructor, + // or directly injected into public properties + if (self::$annotationMetadata[$name]['has_constructor'] === true) { + return new $name($values); + } + + $instance = new $name(); + + foreach ($values as $property => $value) { + if (!isset(self::$annotationMetadata[$name]['properties'][$property])) { + if ('value' !== $property) { + throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not have a property named "%s". Available properties: %s', $originalName, $this->context, $property, implode(', ', self::$annotationMetadata[$name]['properties']))); + } + + // handle the case if the property has no annotations + if ( ! $property = self::$annotationMetadata[$name]['default_property']) { + throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not accept any values, but got %s.', $originalName, $this->context, json_encode($values))); + } + } + + $instance->{$property} = $value; + } + + return $instance; + } + + /** + * MethodCall ::= ["(" [Values] ")"] + * + * @return array + */ + private function MethodCall() + { + $values = array(); + + if ( ! $this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) { + return $values; + } + + $this->match(DocLexer::T_OPEN_PARENTHESIS); + + if ( ! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { + $values = $this->Values(); + } + + $this->match(DocLexer::T_CLOSE_PARENTHESIS); + + return $values; + } + + /** + * Values ::= Array | Value {"," Value}* [","] + * + * @return array + */ + private function Values() + { + $values = array($this->Value()); + + while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { + $this->match(DocLexer::T_COMMA); + + if ($this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { + break; + } + + $token = $this->lexer->lookahead; + $value = $this->Value(); + + if ( ! is_object($value) && ! is_array($value)) { + $this->syntaxError('Value', $token); + } + + $values[] = $value; + } + + foreach ($values as $k => $value) { + if (is_object($value) && $value instanceof \stdClass) { + $values[$value->name] = $value->value; + } else if ( ! isset($values['value'])){ + $values['value'] = $value; + } else { + if ( ! is_array($values['value'])) { + $values['value'] = array($values['value']); + } + + $values['value'][] = $value; + } + + unset($values[$k]); + } + + return $values; + } + + /** + * Constant ::= integer | string | float | boolean + * + * @return mixed + * + * @throws AnnotationException + */ + private function Constant() + { + $identifier = $this->Identifier(); + + if ( ! defined($identifier) && false !== strpos($identifier, '::') && '\\' !== $identifier[0]) { + list($className, $const) = explode('::', $identifier); + + $alias = (false === $pos = strpos($className, '\\')) ? $className : substr($className, 0, $pos); + $found = false; + + switch (true) { + case !empty ($this->namespaces): + foreach ($this->namespaces as $ns) { + if (class_exists($ns.'\\'.$className) || interface_exists($ns.'\\'.$className)) { + $className = $ns.'\\'.$className; + $found = true; + break; + } + } + break; + + case isset($this->imports[$loweredAlias = strtolower($alias)]): + $found = true; + $className = (false !== $pos) + ? $this->imports[$loweredAlias] . substr($className, $pos) + : $this->imports[$loweredAlias]; + break; + + default: + if(isset($this->imports['__NAMESPACE__'])) { + $ns = $this->imports['__NAMESPACE__']; + + if (class_exists($ns.'\\'.$className) || interface_exists($ns.'\\'.$className)) { + $className = $ns.'\\'.$className; + $found = true; + } + } + break; + } + + if ($found) { + $identifier = $className . '::' . $const; + } + } + + // checks if identifier ends with ::class, \strlen('::class') === 7 + $classPos = stripos($identifier, '::class'); + if ($classPos === strlen($identifier) - 7) { + return substr($identifier, 0, $classPos); + } + + if (!defined($identifier)) { + throw AnnotationException::semanticalErrorConstants($identifier, $this->context); + } + + return constant($identifier); + } + + /** + * Identifier ::= string + * + * @return string + */ + private function Identifier() + { + // check if we have an annotation + if ( ! $this->lexer->isNextTokenAny(self::$classIdentifiers)) { + $this->syntaxError('namespace separator or identifier'); + } + + $this->lexer->moveNext(); + + $className = $this->lexer->token['value']; + + while ($this->lexer->lookahead['position'] === ($this->lexer->token['position'] + strlen($this->lexer->token['value'])) + && $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR)) { + + $this->match(DocLexer::T_NAMESPACE_SEPARATOR); + $this->matchAny(self::$classIdentifiers); + + $className .= '\\' . $this->lexer->token['value']; + } + + return $className; + } + + /** + * Value ::= PlainValue | FieldAssignment + * + * @return mixed + */ + private function Value() + { + $peek = $this->lexer->glimpse(); + + if (DocLexer::T_EQUALS === $peek['type']) { + return $this->FieldAssignment(); + } + + return $this->PlainValue(); + } + + /** + * PlainValue ::= integer | string | float | boolean | Array | Annotation + * + * @return mixed + */ + private function PlainValue() + { + if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) { + return $this->Arrayx(); + } + + if ($this->lexer->isNextToken(DocLexer::T_AT)) { + return $this->Annotation(); + } + + if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { + return $this->Constant(); + } + + switch ($this->lexer->lookahead['type']) { + case DocLexer::T_STRING: + $this->match(DocLexer::T_STRING); + return $this->lexer->token['value']; + + case DocLexer::T_INTEGER: + $this->match(DocLexer::T_INTEGER); + return (int)$this->lexer->token['value']; + + case DocLexer::T_FLOAT: + $this->match(DocLexer::T_FLOAT); + return (float)$this->lexer->token['value']; + + case DocLexer::T_TRUE: + $this->match(DocLexer::T_TRUE); + return true; + + case DocLexer::T_FALSE: + $this->match(DocLexer::T_FALSE); + return false; + + case DocLexer::T_NULL: + $this->match(DocLexer::T_NULL); + return null; + + default: + $this->syntaxError('PlainValue'); + } + } + + /** + * FieldAssignment ::= FieldName "=" PlainValue + * FieldName ::= identifier + * + * @return array + */ + private function FieldAssignment() + { + $this->match(DocLexer::T_IDENTIFIER); + $fieldName = $this->lexer->token['value']; + + $this->match(DocLexer::T_EQUALS); + + $item = new \stdClass(); + $item->name = $fieldName; + $item->value = $this->PlainValue(); + + return $item; + } + + /** + * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}" + * + * @return array + */ + private function Arrayx() + { + $array = $values = array(); + + $this->match(DocLexer::T_OPEN_CURLY_BRACES); + + // If the array is empty, stop parsing and return. + if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { + $this->match(DocLexer::T_CLOSE_CURLY_BRACES); + + return $array; + } + + $values[] = $this->ArrayEntry(); + + while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { + $this->match(DocLexer::T_COMMA); + + // optional trailing comma + if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { + break; + } + + $values[] = $this->ArrayEntry(); + } + + $this->match(DocLexer::T_CLOSE_CURLY_BRACES); + + foreach ($values as $value) { + list ($key, $val) = $value; + + if ($key !== null) { + $array[$key] = $val; + } else { + $array[] = $val; + } + } + + return $array; + } + + /** + * ArrayEntry ::= Value | KeyValuePair + * KeyValuePair ::= Key ("=" | ":") PlainValue | Constant + * Key ::= string | integer | Constant + * + * @return array + */ + private function ArrayEntry() + { + $peek = $this->lexer->glimpse(); + + if (DocLexer::T_EQUALS === $peek['type'] + || DocLexer::T_COLON === $peek['type']) { + + if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { + $key = $this->Constant(); + } else { + $this->matchAny(array(DocLexer::T_INTEGER, DocLexer::T_STRING)); + $key = $this->lexer->token['value']; + } + + $this->matchAny(array(DocLexer::T_EQUALS, DocLexer::T_COLON)); + + return array($key, $this->PlainValue()); + } + + return array(null, $this->Value()); + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php new file mode 100644 index 0000000000000000000000000000000000000000..24add1b3ba83a46abaedbc393758c0f9fd8d924f --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php @@ -0,0 +1,288 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +/** + * File cache reader for annotations. + * + * @author Johannes M. Schmitt + * @author Benjamin Eberlei + * + * @deprecated the FileCacheReader is deprecated and will be removed + * in version 2.0.0 of doctrine/annotations. Please use the + * {@see \Doctrine\Common\Annotations\CachedReader} instead. + */ +class FileCacheReader implements Reader +{ + /** + * @var Reader + */ + private $reader; + + /** + * @var string + */ + private $dir; + + /** + * @var bool + */ + private $debug; + + /** + * @var array + */ + private $loadedAnnotations = array(); + + /** + * @var array + */ + private $classNameHashes = array(); + + /** + * @var int + */ + private $umask; + + /** + * Constructor. + * + * @param Reader $reader + * @param string $cacheDir + * @param boolean $debug + * + * @throws \InvalidArgumentException + */ + public function __construct(Reader $reader, $cacheDir, $debug = false, $umask = 0002) + { + if ( ! is_int($umask)) { + throw new \InvalidArgumentException(sprintf( + 'The parameter umask must be an integer, was: %s', + gettype($umask) + )); + } + + $this->reader = $reader; + $this->umask = $umask; + + if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777 & (~$this->umask), true)) { + throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist and could not be created.', $cacheDir)); + } + + $this->dir = rtrim($cacheDir, '\\/'); + $this->debug = $debug; + } + + /** + * {@inheritDoc} + */ + public function getClassAnnotations(\ReflectionClass $class) + { + if ( ! isset($this->classNameHashes[$class->name])) { + $this->classNameHashes[$class->name] = sha1($class->name); + } + $key = $this->classNameHashes[$class->name]; + + if (isset($this->loadedAnnotations[$key])) { + return $this->loadedAnnotations[$key]; + } + + $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php'; + if (!is_file($path)) { + $annot = $this->reader->getClassAnnotations($class); + $this->saveCacheFile($path, $annot); + return $this->loadedAnnotations[$key] = $annot; + } + + if ($this->debug + && (false !== $filename = $class->getFilename()) + && filemtime($path) < filemtime($filename)) { + @unlink($path); + + $annot = $this->reader->getClassAnnotations($class); + $this->saveCacheFile($path, $annot); + return $this->loadedAnnotations[$key] = $annot; + } + + return $this->loadedAnnotations[$key] = include $path; + } + + /** + * {@inheritDoc} + */ + public function getPropertyAnnotations(\ReflectionProperty $property) + { + $class = $property->getDeclaringClass(); + if ( ! isset($this->classNameHashes[$class->name])) { + $this->classNameHashes[$class->name] = sha1($class->name); + } + $key = $this->classNameHashes[$class->name].'$'.$property->getName(); + + if (isset($this->loadedAnnotations[$key])) { + return $this->loadedAnnotations[$key]; + } + + $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php'; + if (!is_file($path)) { + $annot = $this->reader->getPropertyAnnotations($property); + $this->saveCacheFile($path, $annot); + return $this->loadedAnnotations[$key] = $annot; + } + + if ($this->debug + && (false !== $filename = $class->getFilename()) + && filemtime($path) < filemtime($filename)) { + @unlink($path); + + $annot = $this->reader->getPropertyAnnotations($property); + $this->saveCacheFile($path, $annot); + return $this->loadedAnnotations[$key] = $annot; + } + + return $this->loadedAnnotations[$key] = include $path; + } + + /** + * {@inheritDoc} + */ + public function getMethodAnnotations(\ReflectionMethod $method) + { + $class = $method->getDeclaringClass(); + if ( ! isset($this->classNameHashes[$class->name])) { + $this->classNameHashes[$class->name] = sha1($class->name); + } + $key = $this->classNameHashes[$class->name].'#'.$method->getName(); + + if (isset($this->loadedAnnotations[$key])) { + return $this->loadedAnnotations[$key]; + } + + $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php'; + if (!is_file($path)) { + $annot = $this->reader->getMethodAnnotations($method); + $this->saveCacheFile($path, $annot); + return $this->loadedAnnotations[$key] = $annot; + } + + if ($this->debug + && (false !== $filename = $class->getFilename()) + && filemtime($path) < filemtime($filename)) { + @unlink($path); + + $annot = $this->reader->getMethodAnnotations($method); + $this->saveCacheFile($path, $annot); + return $this->loadedAnnotations[$key] = $annot; + } + + return $this->loadedAnnotations[$key] = include $path; + } + + /** + * Saves the cache file. + * + * @param string $path + * @param mixed $data + * + * @return void + */ + private function saveCacheFile($path, $data) + { + if (!is_writable($this->dir)) { + throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable. Both, the webserver and the console user need access. You can manage access rights for multiple users with "chmod +a". If your system does not support this, check out the acl package.', $this->dir)); + } + + $tempfile = tempnam($this->dir, uniqid('', true)); + + if (false === $tempfile) { + throw new \RuntimeException(sprintf('Unable to create tempfile in directory: %s', $this->dir)); + } + + $written = file_put_contents($tempfile, 'umask)); + + if (false === rename($tempfile, $path)) { + @unlink($tempfile); + throw new \RuntimeException(sprintf('Unable to rename %s to %s', $tempfile, $path)); + } + } + + /** + * {@inheritDoc} + */ + public function getClassAnnotation(\ReflectionClass $class, $annotationName) + { + $annotations = $this->getClassAnnotations($class); + + foreach ($annotations as $annotation) { + if ($annotation instanceof $annotationName) { + return $annotation; + } + } + + return null; + } + + /** + * {@inheritDoc} + */ + public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) + { + $annotations = $this->getMethodAnnotations($method); + + foreach ($annotations as $annotation) { + if ($annotation instanceof $annotationName) { + return $annotation; + } + } + + return null; + } + + /** + * {@inheritDoc} + */ + public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) + { + $annotations = $this->getPropertyAnnotations($property); + + foreach ($annotations as $annotation) { + if ($annotation instanceof $annotationName) { + return $annotation; + } + } + + return null; + } + + /** + * Clears loaded annotations. + * + * @return void + */ + public function clearLoadedAnnotations() + { + $this->loadedAnnotations = array(); + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php new file mode 100644 index 0000000000000000000000000000000000000000..bf7fbdcdd3def3bce57c2da607fb114dc9809229 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php @@ -0,0 +1,119 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +/** + * Allows the reader to be used in-place of Doctrine's reader. + * + * @author Johannes M. Schmitt + */ +class IndexedReader implements Reader +{ + /** + * @var Reader + */ + private $delegate; + + /** + * Constructor. + * + * @param Reader $reader + */ + public function __construct(Reader $reader) + { + $this->delegate = $reader; + } + + /** + * {@inheritDoc} + */ + public function getClassAnnotations(\ReflectionClass $class) + { + $annotations = array(); + foreach ($this->delegate->getClassAnnotations($class) as $annot) { + $annotations[get_class($annot)] = $annot; + } + + return $annotations; + } + + /** + * {@inheritDoc} + */ + public function getClassAnnotation(\ReflectionClass $class, $annotation) + { + return $this->delegate->getClassAnnotation($class, $annotation); + } + + /** + * {@inheritDoc} + */ + public function getMethodAnnotations(\ReflectionMethod $method) + { + $annotations = array(); + foreach ($this->delegate->getMethodAnnotations($method) as $annot) { + $annotations[get_class($annot)] = $annot; + } + + return $annotations; + } + + /** + * {@inheritDoc} + */ + public function getMethodAnnotation(\ReflectionMethod $method, $annotation) + { + return $this->delegate->getMethodAnnotation($method, $annotation); + } + + /** + * {@inheritDoc} + */ + public function getPropertyAnnotations(\ReflectionProperty $property) + { + $annotations = array(); + foreach ($this->delegate->getPropertyAnnotations($property) as $annot) { + $annotations[get_class($annot)] = $annot; + } + + return $annotations; + } + + /** + * {@inheritDoc} + */ + public function getPropertyAnnotation(\ReflectionProperty $property, $annotation) + { + return $this->delegate->getPropertyAnnotation($property, $annotation); + } + + /** + * Proxies all methods to the delegate. + * + * @param string $method + * @param array $args + * + * @return mixed + */ + public function __call($method, $args) + { + return call_user_func_array(array($this->delegate, $method), $args); + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php new file mode 100644 index 0000000000000000000000000000000000000000..21ee7cc9030178addfce1aee66195a2786549f2c --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php @@ -0,0 +1,91 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +use SplFileObject; + +/** + * Parses a file for namespaces/use/class declarations. + * + * @author Fabien Potencier + * @author Christian Kaps + */ +final class PhpParser +{ + /** + * Parses a class. + * + * @param \ReflectionClass $class A ReflectionClass object. + * + * @return array A list with use statements in the form (Alias => FQN). + */ + public function parseClass(\ReflectionClass $class) + { + if (method_exists($class, 'getUseStatements')) { + return $class->getUseStatements(); + } + + if (false === $filename = $class->getFilename()) { + return array(); + } + + $content = $this->getFileContent($filename, $class->getStartLine()); + + if (null === $content) { + return array(); + } + + $namespace = preg_quote($class->getNamespaceName()); + $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content); + $tokenizer = new TokenParser('parseUseStatements($class->getNamespaceName()); + + return $statements; + } + + /** + * Gets the content of the file right up to the given line number. + * + * @param string $filename The name of the file to load. + * @param integer $lineNumber The number of lines to read from file. + * + * @return string The content of the file. + */ + private function getFileContent($filename, $lineNumber) + { + if ( ! is_file($filename)) { + return null; + } + + $content = ''; + $lineCnt = 0; + $file = new SplFileObject($filename); + while (!$file->eof()) { + if ($lineCnt++ == $lineNumber) { + break; + } + + $content .= $file->fgets(); + } + + return $content; + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php new file mode 100644 index 0000000000000000000000000000000000000000..4774f87312bfc6e8526ea5b6c508fceef7ffdc91 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php @@ -0,0 +1,89 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +/** + * Interface for annotation readers. + * + * @author Johannes M. Schmitt + */ +interface Reader +{ + /** + * Gets the annotations applied to a class. + * + * @param \ReflectionClass $class The ReflectionClass of the class from which + * the class annotations should be read. + * + * @return array An array of Annotations. + */ + function getClassAnnotations(\ReflectionClass $class); + + /** + * Gets a class annotation. + * + * @param \ReflectionClass $class The ReflectionClass of the class from which + * the class annotations should be read. + * @param string $annotationName The name of the annotation. + * + * @return object|null The Annotation or NULL, if the requested annotation does not exist. + */ + function getClassAnnotation(\ReflectionClass $class, $annotationName); + + /** + * Gets the annotations applied to a method. + * + * @param \ReflectionMethod $method The ReflectionMethod of the method from which + * the annotations should be read. + * + * @return array An array of Annotations. + */ + function getMethodAnnotations(\ReflectionMethod $method); + + /** + * Gets a method annotation. + * + * @param \ReflectionMethod $method The ReflectionMethod to read the annotations from. + * @param string $annotationName The name of the annotation. + * + * @return object|null The Annotation or NULL, if the requested annotation does not exist. + */ + function getMethodAnnotation(\ReflectionMethod $method, $annotationName); + + /** + * Gets the annotations applied to a property. + * + * @param \ReflectionProperty $property The ReflectionProperty of the property + * from which the annotations should be read. + * + * @return array An array of Annotations. + */ + function getPropertyAnnotations(\ReflectionProperty $property); + + /** + * Gets a property annotation. + * + * @param \ReflectionProperty $property The ReflectionProperty to read the annotations from. + * @param string $annotationName The name of the annotation. + * + * @return object|null The Annotation or NULL, if the requested annotation does not exist. + */ + function getPropertyAnnotation(\ReflectionProperty $property, $annotationName); +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php new file mode 100644 index 0000000000000000000000000000000000000000..d4757eea2fb59a064b25c3869d453d803dc03a91 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php @@ -0,0 +1,127 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +/** + * Simple Annotation Reader. + * + * This annotation reader is intended to be used in projects where you have + * full-control over all annotations that are available. + * + * @since 2.2 + * @author Johannes M. Schmitt + * @author Fabio B. Silva + */ +class SimpleAnnotationReader implements Reader +{ + /** + * @var DocParser + */ + private $parser; + + /** + * Constructor. + * + * Initializes a new SimpleAnnotationReader. + */ + public function __construct() + { + $this->parser = new DocParser(); + $this->parser->setIgnoreNotImportedAnnotations(true); + } + + /** + * Adds a namespace in which we will look for annotations. + * + * @param string $namespace + * + * @return void + */ + public function addNamespace($namespace) + { + $this->parser->addNamespace($namespace); + } + + /** + * {@inheritDoc} + */ + public function getClassAnnotations(\ReflectionClass $class) + { + return $this->parser->parse($class->getDocComment(), 'class '.$class->getName()); + } + + /** + * {@inheritDoc} + */ + public function getMethodAnnotations(\ReflectionMethod $method) + { + return $this->parser->parse($method->getDocComment(), 'method '.$method->getDeclaringClass()->name.'::'.$method->getName().'()'); + } + + /** + * {@inheritDoc} + */ + public function getPropertyAnnotations(\ReflectionProperty $property) + { + return $this->parser->parse($property->getDocComment(), 'property '.$property->getDeclaringClass()->name.'::$'.$property->getName()); + } + + /** + * {@inheritDoc} + */ + public function getClassAnnotation(\ReflectionClass $class, $annotationName) + { + foreach ($this->getClassAnnotations($class) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + + return null; + } + + /** + * {@inheritDoc} + */ + public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) + { + foreach ($this->getMethodAnnotations($method) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + + return null; + } + + /** + * {@inheritDoc} + */ + public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) + { + foreach ($this->getPropertyAnnotations($property) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + + return null; + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php new file mode 100644 index 0000000000000000000000000000000000000000..9bdcccec92d21bfeb445ca34cea091fb93e89a91 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php @@ -0,0 +1,187 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +/** + * Parses a file for namespaces/use/class declarations. + * + * @author Fabien Potencier + * @author Christian Kaps + */ +class TokenParser +{ + /** + * The token list. + * + * @var array + */ + private $tokens; + + /** + * The number of tokens. + * + * @var int + */ + private $numTokens; + + /** + * The current array pointer. + * + * @var int + */ + private $pointer = 0; + + /** + * @param string $contents + */ + public function __construct($contents) + { + $this->tokens = token_get_all($contents); + + // The PHP parser sets internal compiler globals for certain things. Annoyingly, the last docblock comment it + // saw gets stored in doc_comment. When it comes to compile the next thing to be include()d this stored + // doc_comment becomes owned by the first thing the compiler sees in the file that it considers might have a + // docblock. If the first thing in the file is a class without a doc block this would cause calls to + // getDocBlock() on said class to return our long lost doc_comment. Argh. + // To workaround, cause the parser to parse an empty docblock. Sure getDocBlock() will return this, but at least + // it's harmless to us. + token_get_all("numTokens = count($this->tokens); + } + + /** + * Gets the next non whitespace and non comment token. + * + * @param boolean $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped. + * If FALSE then only whitespace and normal comments are skipped. + * + * @return array|null The token if exists, null otherwise. + */ + public function next($docCommentIsComment = TRUE) + { + for ($i = $this->pointer; $i < $this->numTokens; $i++) { + $this->pointer++; + if ($this->tokens[$i][0] === T_WHITESPACE || + $this->tokens[$i][0] === T_COMMENT || + ($docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT)) { + + continue; + } + + return $this->tokens[$i]; + } + + return null; + } + + /** + * Parses a single use statement. + * + * @return array A list with all found class names for a use statement. + */ + public function parseUseStatement() + { + $class = ''; + $alias = ''; + $statements = array(); + $explicitAlias = false; + while (($token = $this->next())) { + $isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR; + if (!$explicitAlias && $isNameToken) { + $class .= $token[1]; + $alias = $token[1]; + } else if ($explicitAlias && $isNameToken) { + $alias .= $token[1]; + } else if ($token[0] === T_AS) { + $explicitAlias = true; + $alias = ''; + } else if ($token === ',') { + $statements[strtolower($alias)] = $class; + $class = ''; + $alias = ''; + $explicitAlias = false; + } else if ($token === ';') { + $statements[strtolower($alias)] = $class; + break; + } else { + break; + } + } + + return $statements; + } + + /** + * Gets all use statements. + * + * @param string $namespaceName The namespace name of the reflected class. + * + * @return array A list with all found use statements. + */ + public function parseUseStatements($namespaceName) + { + $statements = array(); + while (($token = $this->next())) { + if ($token[0] === T_USE) { + $statements = array_merge($statements, $this->parseUseStatement()); + continue; + } + if ($token[0] !== T_NAMESPACE || $this->parseNamespace() != $namespaceName) { + continue; + } + + // Get fresh array for new namespace. This is to prevent the parser to collect the use statements + // for a previous namespace with the same name. This is the case if a namespace is defined twice + // or if a namespace with the same name is commented out. + $statements = array(); + } + + return $statements; + } + + /** + * Gets the namespace. + * + * @return string The found namespace. + */ + public function parseNamespace() + { + $name = ''; + while (($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR)) { + $name .= $token[1]; + } + + return $name; + } + + /** + * Gets the class name. + * + * @return string The found class name. + */ + public function parseClass() + { + // Namespaces and class names are tokenized the same: T_STRINGs + // separated by T_NS_SEPARATOR so we can use one function to provide + // both. + return $this->parseNamespace(); + } +} diff --git a/vendor/doctrine/cache/.coveralls.yml b/vendor/doctrine/cache/.coveralls.yml new file mode 100644 index 0000000000000000000000000000000000000000..0c082336063962b929699aee563aa668c8f46604 --- /dev/null +++ b/vendor/doctrine/cache/.coveralls.yml @@ -0,0 +1,4 @@ +# for php-coveralls +service_name: travis-ci +src_dir: lib +coverage_clover: build/logs/clover.xml diff --git a/vendor/doctrine/cache/.travis.yml b/vendor/doctrine/cache/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..a16fd9d930a9f6efc27a2817e4f2e7d0e5311174 --- /dev/null +++ b/vendor/doctrine/cache/.travis.yml @@ -0,0 +1,42 @@ +language: php + +sudo: false + +cache: + directories: + - vendor + - $HOME/.composer/cache + +php: + - 5.5 + - 5.6 + - 7.0 + - hhvm + +services: + - riak + - mongodb + - memcached + - redis-server + +before_install: + - if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]] ; then pecl channel-update pecl.php.net; fi; + - if [[ $TRAVIS_PHP_VERSION != 'hhvm' && $TRAVIS_PHP_VERSION != '7.0' ]]; then pecl install riak-beta; fi; + - if [[ $TRAVIS_PHP_VERSION =~ 5.[56] ]] ; then echo yes | pecl install apcu-4.0.10; fi; + - if [[ $TRAVIS_PHP_VERSION = 7.* ]] ; then pecl config-set preferred_state beta; echo yes | pecl install apcu; fi; + - if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then phpenv config-add ./tests/travis/php.ini; fi; + +install: + - travis_retry composer install + +script: + - ./vendor/bin/phpunit -c ./tests/travis/phpunit.travis.xml -v + +after_script: + - php vendor/bin/coveralls -v + +matrix: + fast_finish: true + allow_failures: + - php: hhvm + - php: 7.0 diff --git a/vendor/doctrine/cache/LICENSE b/vendor/doctrine/cache/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8c38cc1bc22db86729231cbe320da51c22b66de9 --- /dev/null +++ b/vendor/doctrine/cache/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2015 Doctrine Project + +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/vendor/doctrine/cache/README.md b/vendor/doctrine/cache/README.md new file mode 100644 index 0000000000000000000000000000000000000000..94f80a30ee959b10151b0811763896847ae1393a --- /dev/null +++ b/vendor/doctrine/cache/README.md @@ -0,0 +1,14 @@ +# Doctrine Cache + +Master: [![Build Status](https://secure.travis-ci.org/doctrine/cache.png?branch=master)](http://travis-ci.org/doctrine/cache) [![Coverage Status](https://coveralls.io/repos/doctrine/cache/badge.png?branch=master)](https://coveralls.io/r/doctrine/cache?branch=master) + +[![Latest Stable Version](https://poser.pugx.org/doctrine/cache/v/stable.png)](https://packagist.org/packages/doctrine/cache) [![Total Downloads](https://poser.pugx.org/doctrine/cache/downloads.png)](https://packagist.org/packages/doctrine/cache) + +Cache component extracted from the Doctrine Common project. + +## Changelog + +### v1.2 + +* Added support for MongoDB as Cache Provider +* Fix namespace version reset diff --git a/vendor/doctrine/cache/UPGRADE.md b/vendor/doctrine/cache/UPGRADE.md new file mode 100644 index 0000000000000000000000000000000000000000..e1f8a503eef6291b95ac104d8091586f099311fc --- /dev/null +++ b/vendor/doctrine/cache/UPGRADE.md @@ -0,0 +1,16 @@ +# Upgrade to 1.4 + +## Minor BC Break: `Doctrine\Common\Cache\FileCache#$extension` is now `private`. + +If you need to override the value of `Doctrine\Common\Cache\FileCache#$extension`, then use the +second parameter of `Doctrine\Common\Cache\FileCache#__construct()` instead of overriding +the property in your own implementation. + +## Minor BC Break: file based caches paths changed + +`Doctrine\Common\Cache\FileCache`, `Doctrine\Common\Cache\PhpFileCache` and +`Doctrine\Common\Cache\FilesystemCache` are using a different cache paths structure. + +If you rely on warmed up caches for deployments, consider that caches generated +with `doctrine/cache` `<1.4` are not compatible with the new directory structure, +and will be ignored. diff --git a/vendor/doctrine/cache/build.properties b/vendor/doctrine/cache/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..2d98c360aae2c117551ed77f376962f5a1597f37 --- /dev/null +++ b/vendor/doctrine/cache/build.properties @@ -0,0 +1,3 @@ +# Version class and file +project.version_class = Doctrine\\Common\\Cache\\Version +project.version_file = lib/Doctrine/Common/Cache/Version.php diff --git a/vendor/doctrine/cache/build.xml b/vendor/doctrine/cache/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..a7c52e3cf3c047d3aecf8e6ae5cb8ffbcb65b626 --- /dev/null +++ b/vendor/doctrine/cache/build.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/doctrine/cache/composer.json b/vendor/doctrine/cache/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..7ef1727a107d72263adc2cde7deea2fa0cdcacfa --- /dev/null +++ b/vendor/doctrine/cache/composer.json @@ -0,0 +1,37 @@ +{ + "name": "doctrine/cache", + "type": "library", + "description": "Caching library offering an object-oriented API for many cache backends", + "keywords": ["cache", "caching"], + "homepage": "http://www.doctrine-project.org", + "license": "MIT", + "authors": [ + {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, + {"name": "Roman Borschel", "email": "roman@code-factory.org"}, + {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, + {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, + {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} + ], + "require": { + "php": "~5.5|~7.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0", + "satooshi/php-coveralls": "~0.6", + "predis/predis": "~1.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "autoload": { + "psr-4": { "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" } + }, + "autoload-dev": { + "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine/Tests" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php new file mode 100644 index 0000000000000000000000000000000000000000..0dfbd6a1d546795505d0a1e8740d40f192c68d0c --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php @@ -0,0 +1,118 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * APC cache provider. + * + * @link www.doctrine-project.org + * @deprecated since version 1.6, use ApcuCache instead + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author David Abdemoulaie + */ +class ApcCache extends CacheProvider +{ + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + return apc_fetch($id); + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return apc_exists($id); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + return apc_store($id, $data, $lifeTime); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + // apc_delete returns false if the id does not exist + return apc_delete($id) || ! apc_exists($id); + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + return apc_clear_cache() && apc_clear_cache('user'); + } + + /** + * {@inheritdoc} + */ + protected function doFetchMultiple(array $keys) + { + return apc_fetch($keys) ?: []; + } + + /** + * {@inheritdoc} + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + $result = apc_store($keysAndValues, null, $lifetime); + + return empty($result); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $info = apc_cache_info('', true); + $sma = apc_sma_info(); + + // @TODO - Temporary fix @see https://github.com/krakjoe/apcu/pull/42 + if (PHP_VERSION_ID >= 50500) { + $info['num_hits'] = isset($info['num_hits']) ? $info['num_hits'] : $info['nhits']; + $info['num_misses'] = isset($info['num_misses']) ? $info['num_misses'] : $info['nmisses']; + $info['start_time'] = isset($info['start_time']) ? $info['start_time'] : $info['stime']; + } + + return array( + Cache::STATS_HITS => $info['num_hits'], + Cache::STATS_MISSES => $info['num_misses'], + Cache::STATS_UPTIME => $info['start_time'], + Cache::STATS_MEMORY_USAGE => $info['mem_size'], + Cache::STATS_MEMORY_AVAILABLE => $sma['avail_mem'], + ); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php new file mode 100644 index 0000000000000000000000000000000000000000..2a91752ba851af05bebc91776a417ccab4ff404a --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php @@ -0,0 +1,106 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * APCu cache provider. + * + * @link www.doctrine-project.org + * @since 1.6 + * @author Kévin Dunglas + */ +class ApcuCache extends CacheProvider +{ + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + return apcu_fetch($id); + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return apcu_exists($id); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + return apcu_store($id, $data, $lifeTime); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + // apcu_delete returns false if the id does not exist + return apcu_delete($id) || ! apcu_exists($id); + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + return apcu_clear_cache(); + } + + /** + * {@inheritdoc} + */ + protected function doFetchMultiple(array $keys) + { + return apcu_fetch($keys) ?: []; + } + + /** + * {@inheritdoc} + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + $result = apcu_store($keysAndValues, null, $lifetime); + + return empty($result); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $info = apcu_cache_info(true); + $sma = apcu_sma_info(); + + return array( + Cache::STATS_HITS => $info['num_hits'], + Cache::STATS_MISSES => $info['num_misses'], + Cache::STATS_UPTIME => $info['start_time'], + Cache::STATS_MEMORY_USAGE => $info['mem_size'], + Cache::STATS_MEMORY_AVAILABLE => $sma['avail_mem'], + ); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php new file mode 100644 index 0000000000000000000000000000000000000000..6610cc217353cb355732937220c5a2fdbe31508c --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php @@ -0,0 +1,142 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Array cache driver. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author David Abdemoulaie + */ +class ArrayCache extends CacheProvider +{ + /** + * @var array[] $data each element being a tuple of [$data, $expiration], where the expiration is int|bool + */ + private $data = []; + + /** + * @var int + */ + private $hitsCount = 0; + + /** + * @var int + */ + private $missesCount = 0; + + /** + * @var int + */ + private $upTime; + + /** + * {@inheritdoc} + */ + public function __construct() + { + $this->upTime = time(); + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + if (! $this->doContains($id)) { + $this->missesCount += 1; + + return false; + } + + $this->hitsCount += 1; + + return $this->data[$id][0]; + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + if (! isset($this->data[$id])) { + return false; + } + + $expiration = $this->data[$id][1]; + + if ($expiration && $expiration < time()) { + $this->doDelete($id); + + return false; + } + + return true; + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + $this->data[$id] = [$data, $lifeTime ? time() + $lifeTime : false]; + + return true; + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + unset($this->data[$id]); + + return true; + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + $this->data = []; + + return true; + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + return [ + Cache::STATS_HITS => $this->hitsCount, + Cache::STATS_MISSES => $this->missesCount, + Cache::STATS_UPTIME => $this->upTime, + Cache::STATS_MEMORY_USAGE => null, + Cache::STATS_MEMORY_AVAILABLE => null, + ]; + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php new file mode 100644 index 0000000000000000000000000000000000000000..89fe32307ff317640ad37883425d635ddce3d7d0 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php @@ -0,0 +1,116 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Interface for cache drivers. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Fabio B. Silva + * @author Kévin Dunglas + */ +interface Cache +{ + const STATS_HITS = 'hits'; + const STATS_MISSES = 'misses'; + const STATS_UPTIME = 'uptime'; + const STATS_MEMORY_USAGE = 'memory_usage'; + const STATS_MEMORY_AVAILABLE = 'memory_available'; + /** + * Only for backward compatibility (may be removed in next major release) + * + * @deprecated + */ + const STATS_MEMORY_AVAILIABLE = 'memory_available'; + + /** + * Fetches an entry from the cache. + * + * @param string $id The id of the cache entry to fetch. + * + * @return mixed The cached data or FALSE, if no cache entry exists for the given id. + */ + public function fetch($id); + + /** + * Tests if an entry exists in the cache. + * + * @param string $id The cache id of the entry to check for. + * + * @return bool TRUE if a cache entry exists for the given cache id, FALSE otherwise. + */ + public function contains($id); + + /** + * Puts data into the cache. + * + * If a cache entry with the given id already exists, its data will be replaced. + * + * @param string $id The cache id. + * @param mixed $data The cache entry/data. + * @param int $lifeTime The lifetime in number of seconds for this cache entry. + * If zero (the default), the entry never expires (although it may be deleted from the cache + * to make place for other entries). + * + * @return bool TRUE if the entry was successfully stored in the cache, FALSE otherwise. + */ + public function save($id, $data, $lifeTime = 0); + + /** + * Deletes a cache entry. + * + * @param string $id The cache id. + * + * @return bool TRUE if the cache entry was successfully deleted, FALSE otherwise. + * Deleting a non-existing entry is considered successful. + */ + public function delete($id); + + /** + * Retrieves cached information from the data store. + * + * The server's statistics array has the following values: + * + * - hits + * Number of keys that have been requested and found present. + * + * - misses + * Number of items that have been requested and not found. + * + * - uptime + * Time that the server is running. + * + * - memory_usage + * Memory used by this server to store items. + * + * - memory_available + * Memory allowed to use for storage. + * + * @since 2.2 + * + * @return array|null An associative array with server's statistics if available, NULL otherwise. + */ + public function getStats(); +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..9f579237a6199303a51e6e12f0955b1c0d7ef7ff --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php @@ -0,0 +1,312 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Base class for cache provider implementations. + * + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Fabio B. Silva + */ +abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, MultiGetCache, MultiPutCache +{ + const DOCTRINE_NAMESPACE_CACHEKEY = 'DoctrineNamespaceCacheKey[%s]'; + + /** + * The namespace to prefix all cache ids with. + * + * @var string + */ + private $namespace = ''; + + /** + * The namespace version. + * + * @var integer|null + */ + private $namespaceVersion; + + /** + * Sets the namespace to prefix all cache ids with. + * + * @param string $namespace + * + * @return void + */ + public function setNamespace($namespace) + { + $this->namespace = (string) $namespace; + $this->namespaceVersion = null; + } + + /** + * Retrieves the namespace that prefixes all cache ids. + * + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * {@inheritdoc} + */ + public function fetch($id) + { + return $this->doFetch($this->getNamespacedId($id)); + } + + /** + * {@inheritdoc} + */ + public function fetchMultiple(array $keys) + { + if (empty($keys)) { + return array(); + } + + // note: the array_combine() is in place to keep an association between our $keys and the $namespacedKeys + $namespacedKeys = array_combine($keys, array_map(array($this, 'getNamespacedId'), $keys)); + $items = $this->doFetchMultiple($namespacedKeys); + $foundItems = array(); + + // no internal array function supports this sort of mapping: needs to be iterative + // this filters and combines keys in one pass + foreach ($namespacedKeys as $requestedKey => $namespacedKey) { + if (isset($items[$namespacedKey]) || array_key_exists($namespacedKey, $items)) { + $foundItems[$requestedKey] = $items[$namespacedKey]; + } + } + + return $foundItems; + } + + /** + * {@inheritdoc} + */ + public function saveMultiple(array $keysAndValues, $lifetime = 0) + { + $namespacedKeysAndValues = array(); + foreach ($keysAndValues as $key => $value) { + $namespacedKeysAndValues[$this->getNamespacedId($key)] = $value; + } + + return $this->doSaveMultiple($namespacedKeysAndValues, $lifetime); + } + + /** + * {@inheritdoc} + */ + public function contains($id) + { + return $this->doContains($this->getNamespacedId($id)); + } + + /** + * {@inheritdoc} + */ + public function save($id, $data, $lifeTime = 0) + { + return $this->doSave($this->getNamespacedId($id), $data, $lifeTime); + } + + /** + * {@inheritdoc} + */ + public function delete($id) + { + return $this->doDelete($this->getNamespacedId($id)); + } + + /** + * {@inheritdoc} + */ + public function getStats() + { + return $this->doGetStats(); + } + + /** + * {@inheritDoc} + */ + public function flushAll() + { + return $this->doFlush(); + } + + /** + * {@inheritDoc} + */ + public function deleteAll() + { + $namespaceCacheKey = $this->getNamespaceCacheKey(); + $namespaceVersion = $this->getNamespaceVersion() + 1; + + if ($this->doSave($namespaceCacheKey, $namespaceVersion)) { + $this->namespaceVersion = $namespaceVersion; + + return true; + } + + return false; + } + + /** + * Prefixes the passed id with the configured namespace value. + * + * @param string $id The id to namespace. + * + * @return string The namespaced id. + */ + private function getNamespacedId($id) + { + $namespaceVersion = $this->getNamespaceVersion(); + + return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion); + } + + /** + * Returns the namespace cache key. + * + * @return string + */ + private function getNamespaceCacheKey() + { + return sprintf(self::DOCTRINE_NAMESPACE_CACHEKEY, $this->namespace); + } + + /** + * Returns the namespace version. + * + * @return integer + */ + private function getNamespaceVersion() + { + if (null !== $this->namespaceVersion) { + return $this->namespaceVersion; + } + + $namespaceCacheKey = $this->getNamespaceCacheKey(); + $this->namespaceVersion = $this->doFetch($namespaceCacheKey) ?: 1; + + return $this->namespaceVersion; + } + + /** + * Default implementation of doFetchMultiple. Each driver that supports multi-get should owerwrite it. + * + * @param array $keys Array of keys to retrieve from cache + * @return array Array of values retrieved for the given keys. + */ + protected function doFetchMultiple(array $keys) + { + $returnValues = array(); + + foreach ($keys as $key) { + if (false !== ($item = $this->doFetch($key)) || $this->doContains($key)) { + $returnValues[$key] = $item; + } + } + + return $returnValues; + } + + /** + * Fetches an entry from the cache. + * + * @param string $id The id of the cache entry to fetch. + * + * @return mixed|false The cached data or FALSE, if no cache entry exists for the given id. + */ + abstract protected function doFetch($id); + + /** + * Tests if an entry exists in the cache. + * + * @param string $id The cache id of the entry to check for. + * + * @return bool TRUE if a cache entry exists for the given cache id, FALSE otherwise. + */ + abstract protected function doContains($id); + + /** + * Default implementation of doSaveMultiple. Each driver that supports multi-put should override it. + * + * @param array $keysAndValues Array of keys and values to save in cache + * @param int $lifetime The lifetime. If != 0, sets a specific lifetime for these + * cache entries (0 => infinite lifeTime). + * + * @return bool TRUE if the operation was successful, FALSE if it wasn't. + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + $success = true; + + foreach ($keysAndValues as $key => $value) { + if (!$this->doSave($key, $value, $lifetime)) { + $success = false; + } + } + + return $success; + } + + /** + * Puts data into the cache. + * + * @param string $id The cache id. + * @param string $data The cache entry/data. + * @param int $lifeTime The lifetime. If != 0, sets a specific lifetime for this + * cache entry (0 => infinite lifeTime). + * + * @return bool TRUE if the entry was successfully stored in the cache, FALSE otherwise. + */ + abstract protected function doSave($id, $data, $lifeTime = 0); + + /** + * Deletes a cache entry. + * + * @param string $id The cache id. + * + * @return bool TRUE if the cache entry was successfully deleted, FALSE otherwise. + */ + abstract protected function doDelete($id); + + /** + * Flushes all cache entries. + * + * @return bool TRUE if the cache entries were successfully flushed, FALSE otherwise. + */ + abstract protected function doFlush(); + + /** + * Retrieves cached information from the data store. + * + * @since 2.2 + * + * @return array|null An associative array with server's statistics if available, NULL otherwise. + */ + abstract protected function doGetStats(); +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ChainCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ChainCache.php new file mode 100644 index 0000000000000000000000000000000000000000..96c9b5479fbec039c1c883f6dceac00cf4a4c269 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ChainCache.php @@ -0,0 +1,147 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Cache provider that allows to easily chain multiple cache providers + * + * @author Michaël Gallego + */ +class ChainCache extends CacheProvider +{ + /** + * @var CacheProvider[] + */ + private $cacheProviders = array(); + + /** + * Constructor + * + * @param CacheProvider[] $cacheProviders + */ + public function __construct($cacheProviders = array()) + { + $this->cacheProviders = $cacheProviders; + } + + /** + * {@inheritDoc} + */ + public function setNamespace($namespace) + { + parent::setNamespace($namespace); + + foreach ($this->cacheProviders as $cacheProvider) { + $cacheProvider->setNamespace($namespace); + } + } + + /** + * {@inheritDoc} + */ + protected function doFetch($id) + { + foreach ($this->cacheProviders as $key => $cacheProvider) { + if ($cacheProvider->doContains($id)) { + $value = $cacheProvider->doFetch($id); + + // We populate all the previous cache layers (that are assumed to be faster) + for ($subKey = $key - 1 ; $subKey >= 0 ; $subKey--) { + $this->cacheProviders[$subKey]->doSave($id, $value); + } + + return $value; + } + } + + return false; + } + + /** + * {@inheritDoc} + */ + protected function doContains($id) + { + foreach ($this->cacheProviders as $cacheProvider) { + if ($cacheProvider->doContains($id)) { + return true; + } + } + + return false; + } + + /** + * {@inheritDoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + $stored = true; + + foreach ($this->cacheProviders as $cacheProvider) { + $stored = $cacheProvider->doSave($id, $data, $lifeTime) && $stored; + } + + return $stored; + } + + /** + * {@inheritDoc} + */ + protected function doDelete($id) + { + $deleted = true; + + foreach ($this->cacheProviders as $cacheProvider) { + $deleted = $cacheProvider->doDelete($id) && $deleted; + } + + return $deleted; + } + + /** + * {@inheritDoc} + */ + protected function doFlush() + { + $flushed = true; + + foreach ($this->cacheProviders as $cacheProvider) { + $flushed = $cacheProvider->doFlush() && $flushed; + } + + return $flushed; + } + + /** + * {@inheritDoc} + */ + protected function doGetStats() + { + // We return all the stats from all adapters + $stats = array(); + + foreach ($this->cacheProviders as $cacheProvider) { + $stats[] = $cacheProvider->doGetStats(); + } + + return $stats; + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php new file mode 100644 index 0000000000000000000000000000000000000000..3a91eaf3a276db999eb628ffd2b09cf57d5f9adc --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php @@ -0,0 +1,40 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Interface for cache that can be flushed. + * + * Intended to be used for partial clearing of a cache namespace. For a more + * global "flushing", see {@see FlushableCache}. + * + * @link www.doctrine-project.org + * @since 1.4 + * @author Adirelle + */ +interface ClearableCache +{ + /** + * Deletes all cache entries in the current cache namespace. + * + * @return bool TRUE if the cache entries were successfully deleted, FALSE otherwise. + */ + public function deleteAll(); +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php new file mode 100644 index 0000000000000000000000000000000000000000..c21691df96290b96eaa77e9c0faab5646c228a6a --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php @@ -0,0 +1,121 @@ +. + */ + +namespace Doctrine\Common\Cache; + +use \Couchbase; + +/** + * Couchbase cache provider. + * + * @link www.doctrine-project.org + * @since 2.4 + * @author Michael Nitschinger + */ +class CouchbaseCache extends CacheProvider +{ + /** + * @var Couchbase|null + */ + private $couchbase; + + /** + * Sets the Couchbase instance to use. + * + * @param Couchbase $couchbase + * + * @return void + */ + public function setCouchbase(Couchbase $couchbase) + { + $this->couchbase = $couchbase; + } + + /** + * Gets the Couchbase instance used by the cache. + * + * @return Couchbase|null + */ + public function getCouchbase() + { + return $this->couchbase; + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + return $this->couchbase->get($id) ?: false; + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return (null !== $this->couchbase->get($id)); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + if ($lifeTime > 30 * 24 * 3600) { + $lifeTime = time() + $lifeTime; + } + return $this->couchbase->set($id, $data, (int) $lifeTime); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + return $this->couchbase->delete($id); + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + return $this->couchbase->flush(); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $stats = $this->couchbase->getStats(); + $servers = $this->couchbase->getServers(); + $server = explode(":", $servers[0]); + $key = $server[0] . ":" . "11210"; + $stats = $stats[$key]; + return array( + Cache::STATS_HITS => $stats['get_hits'], + Cache::STATS_MISSES => $stats['get_misses'], + Cache::STATS_UPTIME => $stats['uptime'], + Cache::STATS_MEMORY_USAGE => $stats['bytes'], + Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'], + ); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php new file mode 100644 index 0000000000000000000000000000000000000000..b2e0427e59a9a88b38eabd851a2799b3a1cc081b --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php @@ -0,0 +1,286 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Base file cache driver. + * + * @since 2.3 + * @author Fabio B. Silva + * @author Tobias Schultze + */ +abstract class FileCache extends CacheProvider +{ + /** + * The cache directory. + * + * @var string + */ + protected $directory; + + /** + * The cache file extension. + * + * @var string + */ + private $extension; + + /** + * @var int + */ + private $umask; + + /** + * @var int + */ + private $directoryStringLength; + + /** + * @var int + */ + private $extensionStringLength; + + /** + * @var bool + */ + private $isRunningOnWindows; + + /** + * Constructor. + * + * @param string $directory The cache directory. + * @param string $extension The cache file extension. + * + * @throws \InvalidArgumentException + */ + public function __construct($directory, $extension = '', $umask = 0002) + { + // YES, this needs to be *before* createPathIfNeeded() + if ( ! is_int($umask)) { + throw new \InvalidArgumentException(sprintf( + 'The umask parameter is required to be integer, was: %s', + gettype($umask) + )); + } + $this->umask = $umask; + + if ( ! $this->createPathIfNeeded($directory)) { + throw new \InvalidArgumentException(sprintf( + 'The directory "%s" does not exist and could not be created.', + $directory + )); + } + + if ( ! is_writable($directory)) { + throw new \InvalidArgumentException(sprintf( + 'The directory "%s" is not writable.', + $directory + )); + } + + // YES, this needs to be *after* createPathIfNeeded() + $this->directory = realpath($directory); + $this->extension = (string) $extension; + + $this->directoryStringLength = strlen($this->directory); + $this->extensionStringLength = strlen($this->extension); + $this->isRunningOnWindows = defined('PHP_WINDOWS_VERSION_BUILD'); + } + + /** + * Gets the cache directory. + * + * @return string + */ + public function getDirectory() + { + return $this->directory; + } + + /** + * Gets the cache file extension. + * + * @return string + */ + public function getExtension() + { + return $this->extension; + } + + /** + * @param string $id + * + * @return string + */ + protected function getFilename($id) + { + $hash = hash('sha256', $id); + + // This ensures that the filename is unique and that there are no invalid chars in it. + if ( + '' === $id + || ((strlen($id) * 2 + $this->extensionStringLength) > 255) + || ($this->isRunningOnWindows && ($this->directoryStringLength + 4 + strlen($id) * 2 + $this->extensionStringLength) > 258) + ) { + // Most filesystems have a limit of 255 chars for each path component. On Windows the the whole path is limited + // to 260 chars (including terminating null char). Using long UNC ("\\?\" prefix) does not work with the PHP API. + // And there is a bug in PHP (https://bugs.php.net/bug.php?id=70943) with path lengths of 259. + // So if the id in hex representation would surpass the limit, we use the hash instead. The prefix prevents + // collisions between the hash and bin2hex. + $filename = '_' . $hash; + } else { + $filename = bin2hex($id); + } + + return $this->directory + . DIRECTORY_SEPARATOR + . substr($hash, 0, 2) + . DIRECTORY_SEPARATOR + . $filename + . $this->extension; + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + $filename = $this->getFilename($id); + + return @unlink($filename) || ! file_exists($filename); + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + foreach ($this->getIterator() as $name => $file) { + if ($file->isDir()) { + // Remove the intermediate directories which have been created to balance the tree. It only takes effect + // if the directory is empty. If several caches share the same directory but with different file extensions, + // the other ones are not removed. + @rmdir($name); + } elseif ($this->isFilenameEndingWithExtension($name)) { + // If an extension is set, only remove files which end with the given extension. + // If no extension is set, we have no other choice than removing everything. + @unlink($name); + } + } + + return true; + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $usage = 0; + foreach ($this->getIterator() as $name => $file) { + if (! $file->isDir() && $this->isFilenameEndingWithExtension($name)) { + $usage += $file->getSize(); + } + } + + $free = disk_free_space($this->directory); + + return array( + Cache::STATS_HITS => null, + Cache::STATS_MISSES => null, + Cache::STATS_UPTIME => null, + Cache::STATS_MEMORY_USAGE => $usage, + Cache::STATS_MEMORY_AVAILABLE => $free, + ); + } + + /** + * Create path if needed. + * + * @param string $path + * @return bool TRUE on success or if path already exists, FALSE if path cannot be created. + */ + private function createPathIfNeeded($path) + { + if ( ! is_dir($path)) { + if (false === @mkdir($path, 0777 & (~$this->umask), true) && !is_dir($path)) { + return false; + } + } + + return true; + } + + /** + * Writes a string content to file in an atomic way. + * + * @param string $filename Path to the file where to write the data. + * @param string $content The content to write + * + * @return bool TRUE on success, FALSE if path cannot be created, if path is not writable or an any other error. + */ + protected function writeFile($filename, $content) + { + $filepath = pathinfo($filename, PATHINFO_DIRNAME); + + if ( ! $this->createPathIfNeeded($filepath)) { + return false; + } + + if ( ! is_writable($filepath)) { + return false; + } + + $tmpFile = tempnam($filepath, 'swap'); + @chmod($tmpFile, 0666 & (~$this->umask)); + + if (file_put_contents($tmpFile, $content) !== false) { + if (@rename($tmpFile, $filename)) { + return true; + } + + @unlink($tmpFile); + } + + return false; + } + + /** + * @return \Iterator + */ + private function getIterator() + { + return new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($this->directory, \FilesystemIterator::SKIP_DOTS), + \RecursiveIteratorIterator::CHILD_FIRST + ); + } + + /** + * @param string $name The filename + * + * @return bool + */ + private function isFilenameEndingWithExtension($name) + { + return '' === $this->extension + || strrpos($name, $this->extension) === (strlen($name) - $this->extensionStringLength); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php new file mode 100644 index 0000000000000000000000000000000000000000..d988294f6fb7d1a7c73789a30539761f7695679f --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php @@ -0,0 +1,111 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Filesystem cache driver. + * + * @since 2.3 + * @author Fabio B. Silva + */ +class FilesystemCache extends FileCache +{ + const EXTENSION = '.doctrinecache.data'; + + /** + * {@inheritdoc} + */ + public function __construct($directory, $extension = self::EXTENSION, $umask = 0002) + { + parent::__construct($directory, $extension, $umask); + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + $data = ''; + $lifetime = -1; + $filename = $this->getFilename($id); + + if ( ! is_file($filename)) { + return false; + } + + $resource = fopen($filename, "r"); + + if (false !== ($line = fgets($resource))) { + $lifetime = (int) $line; + } + + if ($lifetime !== 0 && $lifetime < time()) { + fclose($resource); + + return false; + } + + while (false !== ($line = fgets($resource))) { + $data .= $line; + } + + fclose($resource); + + return unserialize($data); + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + $lifetime = -1; + $filename = $this->getFilename($id); + + if ( ! is_file($filename)) { + return false; + } + + $resource = fopen($filename, "r"); + + if (false !== ($line = fgets($resource))) { + $lifetime = (int) $line; + } + + fclose($resource); + + return $lifetime === 0 || $lifetime > time(); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + if ($lifeTime > 0) { + $lifeTime = time() + $lifeTime; + } + + $data = serialize($data); + $filename = $this->getFilename($id); + + return $this->writeFile($filename, $lifeTime . PHP_EOL . $data); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php new file mode 100644 index 0000000000000000000000000000000000000000..4311d4f5939deb5b723e886ce2270757953bdb94 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Interface for cache that can be flushed. + * + * @link www.doctrine-project.org + * @since 1.4 + * @author Adirelle + */ +interface FlushableCache +{ + /** + * Flushes all cache entries, globally. + * + * @return bool TRUE if the cache entries were successfully flushed, FALSE otherwise. + */ + public function flushAll(); +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php new file mode 100644 index 0000000000000000000000000000000000000000..8afaeeacc2bca0bf5723cd26491b7592554c9d12 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php @@ -0,0 +1,126 @@ +. + */ + +namespace Doctrine\Common\Cache; + +use \Memcache; + +/** + * Memcache cache provider. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author David Abdemoulaie + */ +class MemcacheCache extends CacheProvider +{ + /** + * @var Memcache|null + */ + private $memcache; + + /** + * Sets the memcache instance to use. + * + * @param Memcache $memcache + * + * @return void + */ + public function setMemcache(Memcache $memcache) + { + $this->memcache = $memcache; + } + + /** + * Gets the memcache instance used by the cache. + * + * @return Memcache|null + */ + public function getMemcache() + { + return $this->memcache; + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + return $this->memcache->get($id); + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + $flags = null; + $this->memcache->get($id, $flags); + + //if memcache has changed the value of "flags", it means the value exists + return ($flags !== null); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + if ($lifeTime > 30 * 24 * 3600) { + $lifeTime = time() + $lifeTime; + } + return $this->memcache->set($id, $data, 0, (int) $lifeTime); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + // Memcache::delete() returns false if entry does not exist + return $this->memcache->delete($id) || ! $this->doContains($id); + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + return $this->memcache->flush(); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $stats = $this->memcache->getStats(); + return array( + Cache::STATS_HITS => $stats['get_hits'], + Cache::STATS_MISSES => $stats['get_misses'], + Cache::STATS_UPTIME => $stats['uptime'], + Cache::STATS_MEMORY_USAGE => $stats['bytes'], + Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'], + ); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php new file mode 100644 index 0000000000000000000000000000000000000000..dc4016b5979a75a85f4614bf3bc4867f679f5ade --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php @@ -0,0 +1,146 @@ +. + */ + +namespace Doctrine\Common\Cache; + +use \Memcached; + +/** + * Memcached cache provider. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author David Abdemoulaie + */ +class MemcachedCache extends CacheProvider +{ + /** + * @var Memcached|null + */ + private $memcached; + + /** + * Sets the memcache instance to use. + * + * @param Memcached $memcached + * + * @return void + */ + public function setMemcached(Memcached $memcached) + { + $this->memcached = $memcached; + } + + /** + * Gets the memcached instance used by the cache. + * + * @return Memcached|null + */ + public function getMemcached() + { + return $this->memcached; + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + return $this->memcached->get($id); + } + + /** + * {@inheritdoc} + */ + protected function doFetchMultiple(array $keys) + { + return $this->memcached->getMulti($keys) ?: []; + } + + /** + * {@inheritdoc} + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + if ($lifetime > 30 * 24 * 3600) { + $lifetime = time() + $lifetime; + } + + return $this->memcached->setMulti($keysAndValues, $lifetime); + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return false !== $this->memcached->get($id) + || $this->memcached->getResultCode() !== Memcached::RES_NOTFOUND; + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + if ($lifeTime > 30 * 24 * 3600) { + $lifeTime = time() + $lifeTime; + } + return $this->memcached->set($id, $data, (int) $lifeTime); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + return $this->memcached->delete($id) + || $this->memcached->getResultCode() === Memcached::RES_NOTFOUND; + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + return $this->memcached->flush(); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $stats = $this->memcached->getStats(); + $servers = $this->memcached->getServerList(); + $key = $servers[0]['host'] . ':' . $servers[0]['port']; + $stats = $stats[$key]; + return array( + Cache::STATS_HITS => $stats['get_hits'], + Cache::STATS_MISSES => $stats['get_misses'], + Cache::STATS_UPTIME => $stats['uptime'], + Cache::STATS_MEMORY_USAGE => $stats['bytes'], + Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'], + ); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php new file mode 100644 index 0000000000000000000000000000000000000000..75fe0ca113049f8b1278559f0e89f6d58c6c1d3d --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php @@ -0,0 +1,197 @@ +. + */ + +namespace Doctrine\Common\Cache; + +use MongoBinData; +use MongoCollection; +use MongoCursorException; +use MongoDate; + +/** + * MongoDB cache provider. + * + * @since 1.1 + * @author Jeremy Mikola + */ +class MongoDBCache extends CacheProvider +{ + /** + * The data field will store the serialized PHP value. + */ + const DATA_FIELD = 'd'; + + /** + * The expiration field will store a MongoDate value indicating when the + * cache entry should expire. + * + * With MongoDB 2.2+, entries can be automatically deleted by MongoDB by + * indexing this field with the "expireAfterSeconds" option equal to zero. + * This will direct MongoDB to regularly query for and delete any entries + * whose date is older than the current time. Entries without a date value + * in this field will be ignored. + * + * The cache provider will also check dates on its own, in case expired + * entries are fetched before MongoDB's TTLMonitor pass can expire them. + * + * @see http://docs.mongodb.org/manual/tutorial/expire-data/ + */ + const EXPIRATION_FIELD = 'e'; + + /** + * @var MongoCollection + */ + private $collection; + + /** + * Constructor. + * + * This provider will default to the write concern and read preference + * options set on the MongoCollection instance (or inherited from MongoDB or + * MongoClient). Using an unacknowledged write concern (< 1) may make the + * return values of delete() and save() unreliable. Reading from secondaries + * may make contain() and fetch() unreliable. + * + * @see http://www.php.net/manual/en/mongo.readpreferences.php + * @see http://www.php.net/manual/en/mongo.writeconcerns.php + * @param MongoCollection $collection + */ + public function __construct(MongoCollection $collection) + { + $this->collection = $collection; + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + $document = $this->collection->findOne(array('_id' => $id), array(self::DATA_FIELD, self::EXPIRATION_FIELD)); + + if ($document === null) { + return false; + } + + if ($this->isExpired($document)) { + $this->doDelete($id); + return false; + } + + return unserialize($document[self::DATA_FIELD]->bin); + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + $document = $this->collection->findOne(array('_id' => $id), array(self::EXPIRATION_FIELD)); + + if ($document === null) { + return false; + } + + if ($this->isExpired($document)) { + $this->doDelete($id); + return false; + } + + return true; + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + try { + $result = $this->collection->update( + array('_id' => $id), + array('$set' => array( + self::EXPIRATION_FIELD => ($lifeTime > 0 ? new MongoDate(time() + $lifeTime) : null), + self::DATA_FIELD => new MongoBinData(serialize($data), MongoBinData::BYTE_ARRAY), + )), + array('upsert' => true, 'multiple' => false) + ); + } catch (MongoCursorException $e) { + return false; + } + + return isset($result['ok']) ? $result['ok'] == 1 : true; + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + $result = $this->collection->remove(array('_id' => $id)); + + return isset($result['ok']) ? $result['ok'] == 1 : true; + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + // Use remove() in lieu of drop() to maintain any collection indexes + $result = $this->collection->remove(); + + return isset($result['ok']) ? $result['ok'] == 1 : true; + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $serverStatus = $this->collection->db->command(array( + 'serverStatus' => 1, + 'locks' => 0, + 'metrics' => 0, + 'recordStats' => 0, + 'repl' => 0, + )); + + $collStats = $this->collection->db->command(array('collStats' => 1)); + + return array( + Cache::STATS_HITS => null, + Cache::STATS_MISSES => null, + Cache::STATS_UPTIME => (isset($serverStatus['uptime']) ? (int) $serverStatus['uptime'] : null), + Cache::STATS_MEMORY_USAGE => (isset($collStats['size']) ? (int) $collStats['size'] : null), + Cache::STATS_MEMORY_AVAILABLE => null, + ); + } + + /** + * Check if the document is expired. + * + * @param array $document + * + * @return bool + */ + private function isExpired(array $document) + { + return isset($document[self::EXPIRATION_FIELD]) && + $document[self::EXPIRATION_FIELD] instanceof MongoDate && + $document[self::EXPIRATION_FIELD]->sec < time(); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiGetCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiGetCache.php new file mode 100644 index 0000000000000000000000000000000000000000..df7146d78efde37f6bac097a9445b90dd749d2f5 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiGetCache.php @@ -0,0 +1,39 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Interface for cache drivers that allows to get many items at once. + * + * @link www.doctrine-project.org + * @since 1.4 + * @author Asmir Mustafic + */ +interface MultiGetCache +{ + /** + * Returns an associative array of values for keys is found in cache. + * + * @param string[] $keys Array of keys to retrieve from cache + * @return mixed[] Array of retrieved values, indexed by the specified keys. + * Values that couldn't be retrieved are not contained in this array. + */ + function fetchMultiple(array $keys); +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiPutCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiPutCache.php new file mode 100644 index 0000000000000000000000000000000000000000..bf87ea9f1cd668651de80b601db8474077023f43 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiPutCache.php @@ -0,0 +1,41 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Interface for cache drivers that allows to put many items at once. + * + * @link www.doctrine-project.org + * @since 1.6 + * @author Daniel Gorgan + */ +interface MultiPutCache +{ + /** + * Returns a boolean value indicating if the operation succeeded. + * + * @param array $keysAndValues Array of keys and values to save in cache + * @param int $lifetime The lifetime. If != 0, sets a specific lifetime for these + * cache entries (0 => infinite lifeTime). + * + * @return bool TRUE if the operation was successful, FALSE if it wasn't. + */ + function saveMultiple(array $keysAndValues, $lifetime = 0); +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php new file mode 100644 index 0000000000000000000000000000000000000000..5e7519674e3e50414772f5bd3473870f53595d12 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php @@ -0,0 +1,120 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Php file cache driver. + * + * @since 2.3 + * @author Fabio B. Silva + */ +class PhpFileCache extends FileCache +{ + const EXTENSION = '.doctrinecache.php'; + + /** + * {@inheritdoc} + */ + public function __construct($directory, $extension = self::EXTENSION, $umask = 0002) + { + parent::__construct($directory, $extension, $umask); + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + $value = $this->includeFileForId($id); + + if (! $value) { + return false; + } + + if ($value['lifetime'] !== 0 && $value['lifetime'] < time()) { + return false; + } + + return $value['data']; + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + $value = $this->includeFileForId($id); + + if (! $value) { + return false; + } + + return $value['lifetime'] === 0 || $value['lifetime'] > time(); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + if ($lifeTime > 0) { + $lifeTime = time() + $lifeTime; + } + + if (is_object($data) && ! method_exists($data, '__set_state')) { + throw new \InvalidArgumentException( + "Invalid argument given, PhpFileCache only allows objects that implement __set_state() " . + "and fully support var_export(). You can use the FilesystemCache to save arbitrary object " . + "graphs using serialize()/deserialize()." + ); + } + + $filename = $this->getFilename($id); + + $value = array( + 'lifetime' => $lifeTime, + 'data' => $data + ); + + $value = var_export($value, true); + $code = sprintf('writeFile($filename, $code); + } + + /** + * @param string $id + * + * @return array|false + */ + private function includeFileForId($id) + { + $fileName = $this->getFilename($id); + + // note: error suppression is still faster than `file_exists`, `is_file` and `is_readable` + $value = @include $fileName; + + if (! isset($value['lifetime'])) { + return false; + } + + return $value; + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php new file mode 100644 index 0000000000000000000000000000000000000000..bcd27497e980e4abc3dea741aa752701289483d0 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php @@ -0,0 +1,136 @@ + + */ +class PredisCache extends CacheProvider +{ + /** + * @var ClientInterface + */ + private $client; + + /** + * @param ClientInterface $client + * + * @return void + */ + public function __construct(ClientInterface $client) + { + $this->client = $client; + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + $result = $this->client->get($id); + if (null === $result) { + return false; + } + + return unserialize($result); + } + + /** + * {@inheritdoc} + */ + protected function doFetchMultiple(array $keys) + { + $fetchedItems = call_user_func_array(array($this->client, 'mget'), $keys); + + return array_map('unserialize', array_filter(array_combine($keys, $fetchedItems))); + } + + /** + * {@inheritdoc} + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + if ($lifetime) { + $success = true; + + // Keys have lifetime, use SETEX for each of them + foreach ($keysAndValues as $key => $value) { + $response = $this->client->setex($key, $lifetime, serialize($value)); + + if ((string) $response != 'OK') { + $success = false; + } + } + + return $success; + } + + // No lifetime, use MSET + $response = $this->client->mset(array_map(function ($value) { + return serialize($value); + }, $keysAndValues)); + + return (string) $response == 'OK'; + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return (bool) $this->client->exists($id); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + $data = serialize($data); + if ($lifeTime > 0) { + $response = $this->client->setex($id, $lifeTime, $data); + } else { + $response = $this->client->set($id, $data); + } + + return $response === true || $response == 'OK'; + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + return $this->client->del($id) >= 0; + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + $response = $this->client->flushdb(); + + return $response === true || $response == 'OK'; + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $info = $this->client->info(); + + return array( + Cache::STATS_HITS => $info['Stats']['keyspace_hits'], + Cache::STATS_MISSES => $info['Stats']['keyspace_misses'], + Cache::STATS_UPTIME => $info['Server']['uptime_in_seconds'], + Cache::STATS_MEMORY_USAGE => $info['Memory']['used_memory'], + Cache::STATS_MEMORY_AVAILABLE => false + ); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php new file mode 100644 index 0000000000000000000000000000000000000000..22add6679b85aed2d602d85ac221552f59ccea97 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php @@ -0,0 +1,180 @@ +. + */ + +namespace Doctrine\Common\Cache; + +use Redis; + +/** + * Redis cache provider. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Osman Ungur + */ +class RedisCache extends CacheProvider +{ + /** + * @var Redis|null + */ + private $redis; + + /** + * Sets the redis instance to use. + * + * @param Redis $redis + * + * @return void + */ + public function setRedis(Redis $redis) + { + $redis->setOption(Redis::OPT_SERIALIZER, $this->getSerializerValue()); + $this->redis = $redis; + } + + /** + * Gets the redis instance used by the cache. + * + * @return Redis|null + */ + public function getRedis() + { + return $this->redis; + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + return $this->redis->get($id); + } + + /** + * {@inheritdoc} + */ + protected function doFetchMultiple(array $keys) + { + $fetchedItems = array_combine($keys, $this->redis->mget($keys)); + + // Redis mget returns false for keys that do not exist. So we need to filter those out unless it's the real data. + $foundItems = array(); + + foreach ($fetchedItems as $key => $value) { + if (false !== $value || $this->redis->exists($key)) { + $foundItems[$key] = $value; + } + } + + return $foundItems; + } + + /** + * {@inheritdoc} + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + if ($lifetime) { + $success = true; + + // Keys have lifetime, use SETEX for each of them + foreach ($keysAndValues as $key => $value) { + if (!$this->redis->setex($key, $lifetime, $value)) { + $success = false; + } + } + + return $success; + } + + // No lifetime, use MSET + return (bool) $this->redis->mset($keysAndValues); + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return $this->redis->exists($id); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + if ($lifeTime > 0) { + return $this->redis->setex($id, $lifeTime, $data); + } + + return $this->redis->set($id, $data); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + return $this->redis->delete($id) >= 0; + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + return $this->redis->flushDB(); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $info = $this->redis->info(); + return array( + Cache::STATS_HITS => $info['keyspace_hits'], + Cache::STATS_MISSES => $info['keyspace_misses'], + Cache::STATS_UPTIME => $info['uptime_in_seconds'], + Cache::STATS_MEMORY_USAGE => $info['used_memory'], + Cache::STATS_MEMORY_AVAILABLE => false + ); + } + + /** + * Returns the serializer constant to use. If Redis is compiled with + * igbinary support, that is used. Otherwise the default PHP serializer is + * used. + * + * @return integer One of the Redis::SERIALIZER_* constants + */ + protected function getSerializerValue() + { + if (defined('HHVM_VERSION')) { + return Redis::SERIALIZER_PHP; + } + + if (defined('Redis::SERIALIZER_IGBINARY') && extension_loaded('igbinary')) { + return Redis::SERIALIZER_IGBINARY; + } + + return Redis::SERIALIZER_PHP; + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php new file mode 100644 index 0000000000000000000000000000000000000000..0baa3f2531c5bc271f68c1a1063618b07bdf2a10 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php @@ -0,0 +1,250 @@ +. + */ + +namespace Doctrine\Common\Cache; + +use Riak\Bucket; +use Riak\Connection; +use Riak\Input; +use Riak\Exception; +use Riak\Object; + +/** + * Riak cache provider. + * + * @link www.doctrine-project.org + * @since 1.1 + * @author Guilherme Blanco + */ +class RiakCache extends CacheProvider +{ + const EXPIRES_HEADER = 'X-Riak-Meta-Expires'; + + /** + * @var \Riak\Bucket + */ + private $bucket; + + /** + * Sets the riak bucket instance to use. + * + * @param \Riak\Bucket $bucket + */ + public function __construct(Bucket $bucket) + { + $this->bucket = $bucket; + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + try { + $response = $this->bucket->get($id); + + // No objects found + if ( ! $response->hasObject()) { + return false; + } + + // Check for attempted siblings + $object = ($response->hasSiblings()) + ? $this->resolveConflict($id, $response->getVClock(), $response->getObjectList()) + : $response->getFirstObject(); + + // Check for expired object + if ($this->isExpired($object)) { + $this->bucket->delete($object); + + return false; + } + + return unserialize($object->getContent()); + } catch (Exception\RiakException $e) { + // Covers: + // - Riak\ConnectionException + // - Riak\CommunicationException + // - Riak\UnexpectedResponseException + // - Riak\NotFoundException + } + + return false; + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + try { + // We only need the HEAD, not the entire object + $input = new Input\GetInput(); + + $input->setReturnHead(true); + + $response = $this->bucket->get($id, $input); + + // No objects found + if ( ! $response->hasObject()) { + return false; + } + + $object = $response->getFirstObject(); + + // Check for expired object + if ($this->isExpired($object)) { + $this->bucket->delete($object); + + return false; + } + + return true; + } catch (Exception\RiakException $e) { + // Do nothing + } + + return false; + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + try { + $object = new Object($id); + + $object->setContent(serialize($data)); + + if ($lifeTime > 0) { + $object->addMetadata(self::EXPIRES_HEADER, (string) (time() + $lifeTime)); + } + + $this->bucket->put($object); + + return true; + } catch (Exception\RiakException $e) { + // Do nothing + } + + return false; + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + try { + $this->bucket->delete($id); + + return true; + } catch (Exception\BadArgumentsException $e) { + // Key did not exist on cluster already + } catch (Exception\RiakException $e) { + // Covers: + // - Riak\Exception\ConnectionException + // - Riak\Exception\CommunicationException + // - Riak\Exception\UnexpectedResponseException + } + + return false; + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + try { + $keyList = $this->bucket->getKeyList(); + + foreach ($keyList as $key) { + $this->bucket->delete($key); + } + + return true; + } catch (Exception\RiakException $e) { + // Do nothing + } + + return false; + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + // Only exposed through HTTP stats API, not Protocol Buffers API + return null; + } + + /** + * Check if a given Riak Object have expired. + * + * @param \Riak\Object $object + * + * @return bool + */ + private function isExpired(Object $object) + { + $metadataMap = $object->getMetadataMap(); + + return isset($metadataMap[self::EXPIRES_HEADER]) + && $metadataMap[self::EXPIRES_HEADER] < time(); + } + + /** + * On-read conflict resolution. Applied approach here is last write wins. + * Specific needs may override this method to apply alternate conflict resolutions. + * + * {@internal Riak does not attempt to resolve a write conflict, and store + * it as sibling of conflicted one. By following this approach, it is up to + * the next read to resolve the conflict. When this happens, your fetched + * object will have a list of siblings (read as a list of objects). + * In our specific case, we do not care about the intermediate ones since + * they are all the same read from storage, and we do apply a last sibling + * (last write) wins logic. + * If by any means our resolution generates another conflict, it'll up to + * next read to properly solve it.} + * + * @param string $id + * @param string $vClock + * @param array $objectList + * + * @return \Riak\Object + */ + protected function resolveConflict($id, $vClock, array $objectList) + { + // Our approach here is last-write wins + $winner = $objectList[count($objectList)]; + + $putInput = new Input\PutInput(); + $putInput->setVClock($vClock); + + $mergedObject = new Object($id); + $mergedObject->setContent($winner->getContent()); + + $this->bucket->put($mergedObject, $putInput); + + return $mergedObject; + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php new file mode 100644 index 0000000000000000000000000000000000000000..0bf6e4d44af84e5fb68da1033f2038486c6f5a85 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php @@ -0,0 +1,220 @@ +. + */ + +namespace Doctrine\Common\Cache; + +use SQLite3; +use SQLite3Result; + +/** + * SQLite3 cache provider. + * + * @since 1.4 + * @author Jake Bell + */ +class SQLite3Cache extends CacheProvider +{ + /** + * The ID field will store the cache key. + */ + const ID_FIELD = 'k'; + + /** + * The data field will store the serialized PHP value. + */ + const DATA_FIELD = 'd'; + + /** + * The expiration field will store a date value indicating when the + * cache entry should expire. + */ + const EXPIRATION_FIELD = 'e'; + + /** + * @var SQLite3 + */ + private $sqlite; + + /** + * @var string + */ + private $table; + + /** + * Constructor. + * + * Calling the constructor will ensure that the database file and table + * exist and will create both if they don't. + * + * @param SQLite3 $sqlite + * @param string $table + */ + public function __construct(SQLite3 $sqlite, $table) + { + $this->sqlite = $sqlite; + $this->table = (string) $table; + + list($id, $data, $exp) = $this->getFields(); + + return $this->sqlite->exec(sprintf( + 'CREATE TABLE IF NOT EXISTS %s(%s TEXT PRIMARY KEY NOT NULL, %s BLOB, %s INTEGER)', + $table, + $id, + $data, + $exp + )); + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + if ($item = $this->findById($id)) { + return unserialize($item[self::DATA_FIELD]); + } + + return false; + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return null !== $this->findById($id, false); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + $statement = $this->sqlite->prepare(sprintf( + 'INSERT OR REPLACE INTO %s (%s) VALUES (:id, :data, :expire)', + $this->table, + implode(',', $this->getFields()) + )); + + $statement->bindValue(':id', $id); + $statement->bindValue(':data', serialize($data), SQLITE3_BLOB); + $statement->bindValue(':expire', $lifeTime > 0 ? time() + $lifeTime : null); + + return $statement->execute() instanceof SQLite3Result; + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + list($idField) = $this->getFields(); + + $statement = $this->sqlite->prepare(sprintf( + 'DELETE FROM %s WHERE %s = :id', + $this->table, + $idField + )); + + $statement->bindValue(':id', $id); + + return $statement->execute() instanceof SQLite3Result; + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + return $this->sqlite->exec(sprintf('DELETE FROM %s', $this->table)); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + // no-op. + } + + /** + * Find a single row by ID. + * + * @param mixed $id + * @param bool $includeData + * + * @return array|null + */ + private function findById($id, $includeData = true) + { + list($idField) = $fields = $this->getFields(); + + if (!$includeData) { + $key = array_search(static::DATA_FIELD, $fields); + unset($fields[$key]); + } + + $statement = $this->sqlite->prepare(sprintf( + 'SELECT %s FROM %s WHERE %s = :id LIMIT 1', + implode(',', $fields), + $this->table, + $idField + )); + + $statement->bindValue(':id', $id, SQLITE3_TEXT); + + $item = $statement->execute()->fetchArray(SQLITE3_ASSOC); + + if ($item === false) { + return null; + } + + if ($this->isExpired($item)) { + $this->doDelete($id); + + return null; + } + + return $item; + } + + /** + * Gets an array of the fields in our table. + * + * @return array + */ + private function getFields() + { + return array(static::ID_FIELD, static::DATA_FIELD, static::EXPIRATION_FIELD); + } + + /** + * Check if the item is expired. + * + * @param array $item + * + * @return bool + */ + private function isExpired(array $item) + { + return isset($item[static::EXPIRATION_FIELD]) && + $item[self::EXPIRATION_FIELD] !== null && + $item[self::EXPIRATION_FIELD] < time(); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php new file mode 100644 index 0000000000000000000000000000000000000000..a6399ecc193329a5749fa3ff832893b165d364b5 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php @@ -0,0 +1,25 @@ +. + */ + +namespace Doctrine\Common\Cache; + +class Version +{ + const VERSION = '1.6.1-DEV'; +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/VoidCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/VoidCache.php new file mode 100644 index 0000000000000000000000000000000000000000..65e8456faad0e80b29a5bb3026c5f90f11b9e7f1 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/VoidCache.php @@ -0,0 +1,78 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Void cache driver. The cache could be of use in tests where you don`t need to cache anything. + * + * @link www.doctrine-project.org + * @since 1.5 + * @author Kotlyar Maksim + */ +class VoidCache extends CacheProvider +{ + /** + * {@inheritDoc} + */ + protected function doFetch($id) + { + return false; + } + + /** + * {@inheritDoc} + */ + protected function doContains($id) + { + return false; + } + + /** + * {@inheritDoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + return true; + } + + /** + * {@inheritDoc} + */ + protected function doDelete($id) + { + return true; + } + + /** + * {@inheritDoc} + */ + protected function doFlush() + { + return true; + } + + /** + * {@inheritDoc} + */ + protected function doGetStats() + { + return; + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php new file mode 100644 index 0000000000000000000000000000000000000000..8a250b29a877e349317fcf00355c45d297fa4365 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php @@ -0,0 +1,109 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * WinCache cache provider. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author David Abdemoulaie + */ +class WinCacheCache extends CacheProvider +{ + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + return wincache_ucache_get($id); + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return wincache_ucache_exists($id); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + return wincache_ucache_set($id, $data, $lifeTime); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + return wincache_ucache_delete($id); + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + return wincache_ucache_clear(); + } + + /** + * {@inheritdoc} + */ + protected function doFetchMultiple(array $keys) + { + return wincache_ucache_get($keys); + } + + /** + * {@inheritdoc} + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + $result = wincache_ucache_set($keysAndValues, null, $lifetime); + + return empty($result); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $info = wincache_ucache_info(); + $meminfo = wincache_ucache_meminfo(); + + return array( + Cache::STATS_HITS => $info['total_hit_count'], + Cache::STATS_MISSES => $info['total_miss_count'], + Cache::STATS_UPTIME => $info['total_cache_uptime'], + Cache::STATS_MEMORY_USAGE => $meminfo['memory_total'], + Cache::STATS_MEMORY_AVAILABLE => $meminfo['memory_free'], + ); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php new file mode 100644 index 0000000000000000000000000000000000000000..a2c4ca5662e2502e0db2c4f130387545192be5aa --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php @@ -0,0 +1,112 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Xcache cache driver. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author David Abdemoulaie + */ +class XcacheCache extends CacheProvider +{ + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + return $this->doContains($id) ? unserialize(xcache_get($id)) : false; + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return xcache_isset($id); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + return xcache_set($id, serialize($data), (int) $lifeTime); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + return xcache_unset($id); + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + $this->checkAuthorization(); + + xcache_clear_cache(XC_TYPE_VAR); + + return true; + } + + /** + * Checks that xcache.admin.enable_auth is Off. + * + * @return void + * + * @throws \BadMethodCallException When xcache.admin.enable_auth is On. + */ + protected function checkAuthorization() + { + if (ini_get('xcache.admin.enable_auth')) { + throw new \BadMethodCallException( + 'To use all features of \Doctrine\Common\Cache\XcacheCache, ' + . 'you must set "xcache.admin.enable_auth" to "Off" in your php.ini.' + ); + } + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $this->checkAuthorization(); + + $info = xcache_info(XC_TYPE_VAR, 0); + return array( + Cache::STATS_HITS => $info['hits'], + Cache::STATS_MISSES => $info['misses'], + Cache::STATS_UPTIME => null, + Cache::STATS_MEMORY_USAGE => $info['size'], + Cache::STATS_MEMORY_AVAILABLE => $info['avail'], + ); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php new file mode 100644 index 0000000000000000000000000000000000000000..6e35ac82369ebef6c8de49806181e59145ab4600 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php @@ -0,0 +1,83 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Zend Data Cache cache driver. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Ralph Schindler + * @author Guilherme Blanco + */ +class ZendDataCache extends CacheProvider +{ + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + return zend_shm_cache_fetch($id); + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return (false !== zend_shm_cache_fetch($id)); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + return zend_shm_cache_store($id, $data, $lifeTime); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + return zend_shm_cache_delete($id); + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + $namespace = $this->getNamespace(); + if (empty($namespace)) { + return zend_shm_cache_clear(); + } + return zend_shm_cache_clear($namespace); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + return null; + } +} diff --git a/vendor/doctrine/cache/phpunit.xml.dist b/vendor/doctrine/cache/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..40cc24deea42b2ce8f597b0154375461b6e85bf8 --- /dev/null +++ b/vendor/doctrine/cache/phpunit.xml.dist @@ -0,0 +1,25 @@ + + + + + + + + + + ./tests/Doctrine/ + + + + + + ./lib/Doctrine/ + + + diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5becdf998005b8a02768bdbae96f08bab82403b4 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php @@ -0,0 +1,28 @@ +markTestSkipped('APC must be enabled for the CLI with the ini setting apc.enable_cli=1'); + } + } + + protected function _getCacheDriver() + { + return new ApcCache(); + } + + public function testLifetime() + { + $this->markTestSkipped('The APC cache TTL is not working in a single process/request. See https://bugs.php.net/bug.php?id=58084'); + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ApcuCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ApcuCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..27764cd7d77d07aac7783a7c4a01fe39fc722d22 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ApcuCacheTest.php @@ -0,0 +1,28 @@ +markTestSkipped('APC must be enabled for the CLI with the ini setting apc.enable_cli=1'); + } + } + + protected function _getCacheDriver() + { + return new ApcuCache(); + } + + public function testLifetime() + { + $this->markTestSkipped('The APC cache TTL is not working in a single process/request. See https://bugs.php.net/bug.php?id=58084'); + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3be94c617557050731b36d407e7de42a07ab817c --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php @@ -0,0 +1,52 @@ +_getCacheDriver(); + $cache->fetch('test1'); + $cache->fetch('test2'); + $cache->fetch('test3'); + + $cache->save('test1', 123); + $cache->save('test2', 123); + + $cache->fetch('test1'); + $cache->fetch('test2'); + $cache->fetch('test3'); + + $stats = $cache->getStats(); + $this->assertEquals(2, $stats[Cache::STATS_HITS]); + $this->assertEquals(5, $stats[Cache::STATS_MISSES]); // +1 for internal call to DoctrineNamespaceCacheKey + $this->assertNotNull($stats[Cache::STATS_UPTIME]); + $this->assertNull($stats[Cache::STATS_MEMORY_USAGE]); + $this->assertNull($stats[Cache::STATS_MEMORY_AVAILABLE]); + + $cache->delete('test1'); + $cache->delete('test2'); + + $cache->fetch('test1'); + $cache->fetch('test2'); + $cache->fetch('test3'); + + $stats = $cache->getStats(); + $this->assertEquals(2, $stats[Cache::STATS_HITS]); + $this->assertEquals(8, $stats[Cache::STATS_MISSES]); // +1 for internal call to DoctrineNamespaceCacheKey + } + + protected function isSharedStorage() + { + return false; + } +} \ No newline at end of file diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/BaseFileCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/BaseFileCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c1256ee343a5752ba788b52566d116b63c54fdbd --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/BaseFileCacheTest.php @@ -0,0 +1,155 @@ +directory = sys_get_temp_dir() . '/doctrine_cache_'. uniqid(); + } while (file_exists($this->directory)); + } + + protected function tearDown() + { + if ( ! is_dir($this->directory)) { + return; + } + + $iterator = new RecursiveDirectoryIterator($this->directory); + + foreach (new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST) as $file) { + if ($file->isFile()) { + @unlink($file->getRealPath()); + } elseif ($file->isDir()) { + @rmdir($file->getRealPath()); + } + } + + @rmdir($this->directory); + } + + public function testFlushAllRemovesBalancingDirectories() + { + $cache = $this->_getCacheDriver(); + + $this->assertTrue($cache->save('key1', 1)); + $this->assertTrue($cache->save('key2', 2)); + $this->assertTrue($cache->flushAll()); + + $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->directory, \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::CHILD_FIRST); + + $this->assertCount(0, $iterator); + } + + protected function isSharedStorage() + { + return false; + } + + public function getPathLengthsToTest() + { + // Windows officially supports 260 bytes including null terminator + // 258 bytes available to use due to php bug #70943 + // Windows officially supports 260 bytes including null terminator + // 259 characters is too large due to PHP bug (https://bugs.php.net/bug.php?id=70943) + // 260 characters is too large - null terminator is included in allowable length + return array( + array(257, false), + array(258, false), + array(259, true), + array(260, true) + ); + } + + private static function getBasePathForWindowsPathLengthTests($pathLength) + { + return FileCacheTest::getBasePathForWindowsPathLengthTests($pathLength); + } + + /** + * @param int $length + * @param string $basePath + * + * @return array + */ + private static function getKeyAndPathFittingLength($length, $basePath) + { + $baseDirLength = strlen($basePath); + $extensionLength = strlen('.doctrine.cache'); + $directoryLength = strlen(DIRECTORY_SEPARATOR . 'aa' . DIRECTORY_SEPARATOR); + $namespaceAndBracketLength = strlen(bin2hex("[][1]")); + $keyLength = $length + - ($baseDirLength + + $extensionLength + + $directoryLength + + $namespaceAndBracketLength); + + $key = str_repeat('a', floor($keyLength / 2)); + $namespacedKey = '[' . $key . '][1]'; + + $keyHash = hash('sha256', $namespacedKey); + + $keyPath = $basePath + . DIRECTORY_SEPARATOR + . substr($keyHash, 0, 2) + . DIRECTORY_SEPARATOR + . bin2hex($namespacedKey) + . '.doctrine.cache'; + + $hashedKeyPath = $basePath + . DIRECTORY_SEPARATOR + . substr($keyHash, 0, 2) + . DIRECTORY_SEPARATOR + . '_' . $keyHash + . '.doctrine.cache'; + + return array($key, $keyPath, $hashedKeyPath); + } + + /** + * @dataProvider getPathLengthsToTest + * + * @param int $length + * @param bool $pathShouldBeHashed + */ + public function testWindowsPathLengthLimitIsCorrectlyHandled($length, $pathShouldBeHashed) + { + $this->directory = self::getBasePathForWindowsPathLengthTests($length); + + list($key, $keyPath, $hashedKeyPath) = self::getKeyAndPathFittingLength($length, $this->directory); + + $this->assertEquals($length, strlen($keyPath), 'Unhashed path should be of correct length.'); + + $cacheClass = get_class($this->_getCacheDriver()); + /* @var $cache \Doctrine\Common\Cache\FileCache */ + $cache = new $cacheClass($this->directory, '.doctrine.cache'); + + // Trick it into thinking this is windows. + $reflClass = new \ReflectionClass(FileCache::class); + $reflProp = $reflClass->getProperty('isRunningOnWindows'); + $reflProp->setAccessible(true); + $reflProp->setValue($cache, true); + $reflProp->setAccessible(false); + + $value = uniqid('value', true); + + $cache->save($key, $value); + $this->assertEquals($value, $cache->fetch($key)); + + if ($pathShouldBeHashed) { + $this->assertFileExists($hashedKeyPath, 'Path generated for key should be hashed.'); + unlink($hashedKeyPath); + } else { + $this->assertFileExists($keyPath, 'Path generated for key should not be hashed.'); + unlink($keyPath); + } + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheProviderTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5e11652cc59bee347af478ceb20df48991be3648 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheProviderTest.php @@ -0,0 +1,103 @@ +getMockForAbstractClass( + 'Doctrine\Common\Cache\CacheProvider', + array(), + '', + true, + true, + true, + array('doFetchMultiple') + ); + + $cache + ->expects($this->once()) + ->method('doFetchMultiple') + ->will($this->returnValue(array( + '[foo][1]' => 'bar', + '[bar][1]' => 'baz', + '[baz][1]' => 'tab', + ))); + + $this->assertEquals( + array('foo' => 'bar', 'bar' => 'baz'), + $cache->fetchMultiple(array('foo', 'bar')) + ); + } + + public function testFailedDeleteAllDoesNotChangeNamespaceVersion() + { + /* @var $cache \Doctrine\Common\Cache\CacheProvider|\PHPUnit_Framework_MockObject_MockObject */ + $cache = $this->getMockForAbstractClass( + 'Doctrine\Common\Cache\CacheProvider', + array(), + '', + true, + true, + true, + array('doFetch', 'doSave', 'doContains') + ); + + $cache + ->expects($this->once()) + ->method('doFetch') + ->with('DoctrineNamespaceCacheKey[]') + ->will($this->returnValue(false)); + + // doSave is only called once from deleteAll as we do not need to persist the default version in getNamespaceVersion() + $cache + ->expects($this->once()) + ->method('doSave') + ->with('DoctrineNamespaceCacheKey[]') + ->will($this->returnValue(false)); + + // After a failed deleteAll() the local namespace version is not increased (still 1). Otherwise all data written afterwards + // would be lost outside the current instance. + $cache + ->expects($this->once()) + ->method('doContains') + ->with('[key][1]') + ->will($this->returnValue(true)); + + $this->assertFalse($cache->deleteAll(), 'deleteAll() returns false when saving the namespace version fails'); + $cache->contains('key'); + } + + public function testSaveMultipleNoFail() + { + /* @var $cache \Doctrine\Common\Cache\CacheProvider|\PHPUnit_Framework_MockObject_MockObject */ + $cache = $this->getMockForAbstractClass( + 'Doctrine\Common\Cache\CacheProvider', + array(), + '', + true, + true, + true, + array('doSave') + ); + + $cache + ->expects($this->at(1)) + ->method('doSave') + ->with('[kerr][1]', 'verr', 0) + ->will($this->returnValue(false)); + + $cache + ->expects($this->at(2)) + ->method('doSave') + ->with('[kok][1]', 'vok', 0) + ->will($this->returnValue(true)); + + $cache->saveMultiple(array( + 'kerr' => 'verr', + 'kok' => 'vok', + )); + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5dd64d7fd90176a47c8f3bd9ee189eaec96c2740 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php @@ -0,0 +1,463 @@ +_getCacheDriver(); + + // Test saving a value, checking if it exists, and fetching it back + $this->assertTrue($cache->save('key', $value)); + $this->assertTrue($cache->contains('key')); + if (is_object($value)) { + $this->assertEquals($value, $cache->fetch('key'), 'Objects retrieved from the cache must be equal but not necessarily the same reference'); + } else { + $this->assertSame($value, $cache->fetch('key'), 'Scalar and array data retrieved from the cache must be the same as the original, e.g. same type'); + } + + // Test deleting a value + $this->assertTrue($cache->delete('key')); + $this->assertFalse($cache->contains('key')); + $this->assertFalse($cache->fetch('key')); + } + + /** + * @dataProvider provideDataToCache + */ + public function testUpdateExistingEntry($value) + { + $cache = $this->_getCacheDriver(); + + $this->assertTrue($cache->save('key', 'old-value')); + $this->assertTrue($cache->contains('key')); + + $this->assertTrue($cache->save('key', $value)); + $this->assertTrue($cache->contains('key')); + if (is_object($value)) { + $this->assertEquals($value, $cache->fetch('key'), 'Objects retrieved from the cache must be equal but not necessarily the same reference'); + } else { + $this->assertSame($value, $cache->fetch('key'), 'Scalar and array data retrieved from the cache must be the same as the original, e.g. same type'); + } + } + + public function testCacheKeyIsCaseSensitive() + { + $cache = $this->_getCacheDriver(); + + $this->assertTrue($cache->save('key', 'value')); + $this->assertTrue($cache->contains('key')); + $this->assertSame('value', $cache->fetch('key')); + + $this->assertFalse($cache->contains('KEY')); + $this->assertFalse($cache->fetch('KEY')); + + $cache->delete('KEY'); + $this->assertTrue($cache->contains('key', 'Deleting cache item with different case must not affect other cache item')); + } + + public function testFetchMultiple() + { + $cache = $this->_getCacheDriver(); + $values = $this->provideDataToCache(); + $saved = array(); + + foreach ($values as $key => $value) { + $cache->save($key, $value[0]); + + $saved[$key] = $value[0]; + } + + $keys = array_keys($saved); + + $this->assertEquals( + $saved, + $cache->fetchMultiple($keys), + 'Testing fetchMultiple with different data types' + ); + $this->assertEquals( + array_slice($saved, 0, 1), + $cache->fetchMultiple(array_slice($keys, 0, 1)), + 'Testing fetchMultiple with a single key' + ); + + $keysWithNonExisting = array(); + $keysWithNonExisting[] = 'non_existing1'; + $keysWithNonExisting[] = $keys[0]; + $keysWithNonExisting[] = 'non_existing2'; + $keysWithNonExisting[] = $keys[1]; + $keysWithNonExisting[] = 'non_existing3'; + + $this->assertEquals( + array_slice($saved, 0, 2), + $cache->fetchMultiple($keysWithNonExisting), + 'Testing fetchMultiple with a subset of keys and mixed with non-existing ones' + ); + } + + public function testFetchMultipleWithNoKeys() + { + $cache = $this->_getCacheDriver(); + + $this->assertSame(array(), $cache->fetchMultiple(array())); + } + + public function testSaveMultiple() + { + $cache = $this->_getCacheDriver(); + $cache->deleteAll(); + + $data = array_map(function ($value) { + return $value[0]; + }, $this->provideDataToCache()); + + $this->assertTrue($cache->saveMultiple($data)); + + $keys = array_keys($data); + + $this->assertEquals($data, $cache->fetchMultiple($keys)); + } + + public function provideDataToCache() + { + $obj = new \stdClass(); + $obj->foo = 'bar'; + $obj2 = new \stdClass(); + $obj2->bar = 'foo'; + $obj2->obj = $obj; + $obj->obj2 = $obj2; + + return array( + 'array' => array(array('one', 2, 3.01)), + 'string' => array('value'), + 'string_invalid_utf8' => array("\xc3\x28"), + 'string_null_byte' => array('with'."\0".'null char'), + 'integer' => array(1), + 'float' => array(1.5), + 'object' => array(new ArrayObject(array('one', 2, 3.01))), + 'object_recursive' => array($obj), + 'true' => array(true), + // the following are considered FALSE in boolean context, but caches should still recognize their existence + 'null' => array(null), + 'false' => array(false), + 'array_empty' => array(array()), + 'string_zero' => array('0'), + 'integer_zero' => array(0), + 'float_zero' => array(0.0), + 'string_empty' => array(''), + ); + } + + public function testDeleteIsSuccessfulWhenKeyDoesNotExist() + { + $cache = $this->_getCacheDriver(); + + $cache->delete('key'); + $this->assertFalse($cache->contains('key')); + $this->assertTrue($cache->delete('key')); + } + + public function testDeleteAll() + { + $cache = $this->_getCacheDriver(); + + $this->assertTrue($cache->save('key1', 1)); + $this->assertTrue($cache->save('key2', 2)); + $this->assertTrue($cache->deleteAll()); + $this->assertFalse($cache->contains('key1')); + $this->assertFalse($cache->contains('key2')); + } + + /** + * @dataProvider provideCacheIds + */ + public function testCanHandleSpecialCacheIds($id) + { + $cache = $this->_getCacheDriver(); + + $this->assertTrue($cache->save($id, 'value')); + $this->assertTrue($cache->contains($id)); + $this->assertEquals('value', $cache->fetch($id)); + + $this->assertTrue($cache->delete($id)); + $this->assertFalse($cache->contains($id)); + $this->assertFalse($cache->fetch($id)); + } + + public function testNoCacheIdCollisions() + { + $cache = $this->_getCacheDriver(); + + $ids = $this->provideCacheIds(); + + // fill cache with each id having a different value + foreach ($ids as $index => $id) { + $cache->save($id[0], $index); + } + + // then check value of each cache id + foreach ($ids as $index => $id) { + $value = $cache->fetch($id[0]); + $this->assertNotFalse($value, sprintf('Failed to retrieve data for cache id "%s".', $id[0])); + if ($index !== $value) { + $this->fail(sprintf('Cache id "%s" collides with id "%s".', $id[0], $ids[$value][0])); + } + } + } + + /** + * Returns cache ids with special characters that should still work. + * + * For example, the characters :\/<>"*?| are not valid in Windows filenames. So they must be encoded properly. + * Each cache id should be considered different from the others. + * + * @return array + */ + public function provideCacheIds() + { + return array( + array(':'), + array('\\'), + array('/'), + array('<'), + array('>'), + array('"'), + array('*'), + array('?'), + array('|'), + array('['), + array(']'), + array('ä'), + array('a'), + array('é'), + array('e'), + array('.'), // directory traversal + array('..'), // directory traversal + array('-'), + array('_'), + array('$'), + array('%'), + array(' '), + array("\0"), + array(''), + array(str_repeat('a', 300)), // long key + array(str_repeat('a', 113)), + ); + } + + public function testLifetime() + { + $cache = $this->_getCacheDriver(); + $cache->save('expire', 'value', 1); + $this->assertTrue($cache->contains('expire'), 'Data should not be expired yet'); + // @TODO should more TTL-based tests pop up, so then we should mock the `time` API instead + sleep(2); + $this->assertFalse($cache->contains('expire'), 'Data should be expired'); + } + + public function testNoExpire() + { + $cache = $this->_getCacheDriver(); + $cache->save('noexpire', 'value', 0); + // @TODO should more TTL-based tests pop up, so then we should mock the `time` API instead + sleep(1); + $this->assertTrue($cache->contains('noexpire'), 'Data with lifetime of zero should not expire'); + } + + public function testLongLifetime() + { + $cache = $this->_getCacheDriver(); + $cache->save('longlifetime', 'value', 30 * 24 * 3600 + 1); + $this->assertTrue($cache->contains('longlifetime'), 'Data with lifetime > 30 days should be accepted'); + } + + public function testDeleteAllAndNamespaceVersioningBetweenCaches() + { + if ( ! $this->isSharedStorage()) { + $this->markTestSkipped('The cache storage needs to be shared.'); + } + + $cache1 = $this->_getCacheDriver(); + $cache2 = $this->_getCacheDriver(); + + $this->assertTrue($cache1->save('key1', 1)); + $this->assertTrue($cache2->save('key2', 2)); + + /* Both providers are initialized with the same namespace version, so + * they can see entries set by each other. + */ + $this->assertTrue($cache1->contains('key1')); + $this->assertTrue($cache1->contains('key2')); + $this->assertTrue($cache2->contains('key1')); + $this->assertTrue($cache2->contains('key2')); + + /* Deleting all entries through one provider will only increment the + * namespace version on that object (and in the cache itself, which new + * instances will use to initialize). The second provider will retain + * its original version and still see stale data. + */ + $this->assertTrue($cache1->deleteAll()); + $this->assertFalse($cache1->contains('key1')); + $this->assertFalse($cache1->contains('key2')); + $this->assertTrue($cache2->contains('key1')); + $this->assertTrue($cache2->contains('key2')); + + /* A new cache provider should not see the deleted entries, since its + * namespace version will be initialized. + */ + $cache3 = $this->_getCacheDriver(); + $this->assertFalse($cache3->contains('key1')); + $this->assertFalse($cache3->contains('key2')); + } + + public function testFlushAll() + { + $cache = $this->_getCacheDriver(); + + $this->assertTrue($cache->save('key1', 1)); + $this->assertTrue($cache->save('key2', 2)); + $this->assertTrue($cache->flushAll()); + $this->assertFalse($cache->contains('key1')); + $this->assertFalse($cache->contains('key2')); + } + + public function testFlushAllAndNamespaceVersioningBetweenCaches() + { + if ( ! $this->isSharedStorage()) { + $this->markTestSkipped('The cache storage needs to be shared.'); + } + + $cache1 = $this->_getCacheDriver(); + $cache2 = $this->_getCacheDriver(); + + /* Deleting all elements from the first provider should increment its + * namespace version before saving the first entry. + */ + $cache1->deleteAll(); + $this->assertTrue($cache1->save('key1', 1)); + + /* The second provider will be initialized with the same namespace + * version upon its first save operation. + */ + $this->assertTrue($cache2->save('key2', 2)); + + /* Both providers have the same namespace version and can see entries + * set by each other. + */ + $this->assertTrue($cache1->contains('key1')); + $this->assertTrue($cache1->contains('key2')); + $this->assertTrue($cache2->contains('key1')); + $this->assertTrue($cache2->contains('key2')); + + /* Flushing all entries through one cache will remove all entries from + * the cache but leave their namespace version as-is. + */ + $this->assertTrue($cache1->flushAll()); + $this->assertFalse($cache1->contains('key1')); + $this->assertFalse($cache1->contains('key2')); + $this->assertFalse($cache2->contains('key1')); + $this->assertFalse($cache2->contains('key2')); + + /* Inserting a new entry will use the same, incremented namespace + * version, and it will be visible to both providers. + */ + $this->assertTrue($cache1->save('key1', 1)); + $this->assertTrue($cache1->contains('key1')); + $this->assertTrue($cache2->contains('key1')); + + /* A new cache provider will be initialized with the original namespace + * version and not share any visibility with the first two providers. + */ + $cache3 = $this->_getCacheDriver(); + $this->assertFalse($cache3->contains('key1')); + $this->assertFalse($cache3->contains('key2')); + $this->assertTrue($cache3->save('key3', 3)); + $this->assertTrue($cache3->contains('key3')); + } + + public function testNamespace() + { + $cache = $this->_getCacheDriver(); + + $cache->setNamespace('ns1_'); + + $this->assertTrue($cache->save('key1', 1)); + $this->assertTrue($cache->contains('key1')); + + $cache->setNamespace('ns2_'); + + $this->assertFalse($cache->contains('key1')); + } + + public function testDeleteAllNamespace() + { + $cache = $this->_getCacheDriver(); + + $cache->setNamespace('ns1'); + $this->assertFalse($cache->contains('key1')); + $cache->save('key1', 'test'); + $this->assertTrue($cache->contains('key1')); + + $cache->setNamespace('ns2'); + $this->assertFalse($cache->contains('key1')); + $cache->save('key1', 'test'); + $this->assertTrue($cache->contains('key1')); + + $cache->setNamespace('ns1'); + $this->assertTrue($cache->contains('key1')); + $cache->deleteAll(); + $this->assertFalse($cache->contains('key1')); + + $cache->setNamespace('ns2'); + $this->assertTrue($cache->contains('key1')); + $cache->deleteAll(); + $this->assertFalse($cache->contains('key1')); + } + + /** + * @group DCOM-43 + */ + public function testGetStats() + { + $cache = $this->_getCacheDriver(); + $stats = $cache->getStats(); + + $this->assertArrayHasKey(Cache::STATS_HITS, $stats); + $this->assertArrayHasKey(Cache::STATS_MISSES, $stats); + $this->assertArrayHasKey(Cache::STATS_UPTIME, $stats); + $this->assertArrayHasKey(Cache::STATS_MEMORY_USAGE, $stats); + $this->assertArrayHasKey(Cache::STATS_MEMORY_AVAILABLE, $stats); + } + + public function testSaveReturnsTrueWithAndWithoutTTlSet() + { + $cache = $this->_getCacheDriver(); + $cache->deleteAll(); + $this->assertTrue($cache->save('without_ttl', 'without_ttl')); + $this->assertTrue($cache->save('with_ttl', 'with_ttl', 3600)); + } + + /** + * Return whether multiple cache providers share the same storage. + * + * This is used for skipping certain tests for shared storage behavior. + * + * @return bool + */ + protected function isSharedStorage() + { + return true; + } + + /** + * @return \Doctrine\Common\Cache\CacheProvider + */ + abstract protected function _getCacheDriver(); +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ChainCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ChainCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a3c013b8dd0000f6d39e5779370884e081d984f7 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ChainCacheTest.php @@ -0,0 +1,99 @@ +markTestSkipped('The ChainCache test uses ArrayCache which does not implement TTL currently.'); + } + + public function testGetStats() + { + $cache = $this->_getCacheDriver(); + $stats = $cache->getStats(); + + $this->assertInternalType('array', $stats); + } + + public function testOnlyFetchFirstOne() + { + $cache1 = new ArrayCache(); + $cache2 = $this->getMockForAbstractClass('Doctrine\Common\Cache\CacheProvider'); + + $cache2->expects($this->never())->method('doFetch'); + + $chainCache = new ChainCache(array($cache1, $cache2)); + $chainCache->save('id', 'bar'); + + $this->assertEquals('bar', $chainCache->fetch('id')); + } + + public function testFetchPropagateToFastestCache() + { + $cache1 = new ArrayCache(); + $cache2 = new ArrayCache(); + + $cache2->save('bar', 'value'); + + $chainCache = new ChainCache(array($cache1, $cache2)); + + $this->assertFalse($cache1->contains('bar')); + + $result = $chainCache->fetch('bar'); + + $this->assertEquals('value', $result); + $this->assertTrue($cache2->contains('bar')); + } + + public function testNamespaceIsPropagatedToAllProviders() + { + $cache1 = new ArrayCache(); + $cache2 = new ArrayCache(); + + $chainCache = new ChainCache(array($cache1, $cache2)); + $chainCache->setNamespace('bar'); + + $this->assertEquals('bar', $cache1->getNamespace()); + $this->assertEquals('bar', $cache2->getNamespace()); + } + + public function testDeleteToAllProviders() + { + $cache1 = $this->getMockForAbstractClass('Doctrine\Common\Cache\CacheProvider'); + $cache2 = $this->getMockForAbstractClass('Doctrine\Common\Cache\CacheProvider'); + + $cache1->expects($this->once())->method('doDelete'); + $cache2->expects($this->once())->method('doDelete'); + + $chainCache = new ChainCache(array($cache1, $cache2)); + $chainCache->delete('bar'); + } + + public function testFlushToAllProviders() + { + $cache1 = $this->getMockForAbstractClass('Doctrine\Common\Cache\CacheProvider'); + $cache2 = $this->getMockForAbstractClass('Doctrine\Common\Cache\CacheProvider'); + + $cache1->expects($this->once())->method('doFlush'); + $cache2->expects($this->once())->method('doFlush'); + + $chainCache = new ChainCache(array($cache1, $cache2)); + $chainCache->flushAll(); + } + + protected function isSharedStorage() + { + return false; + } +} \ No newline at end of file diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CouchbaseCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CouchbaseCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f42b3a7f7f52eb1b2999cf9d459cec2e1e95c978 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CouchbaseCacheTest.php @@ -0,0 +1,30 @@ +couchbase = new Couchbase('127.0.0.1', 'Administrator', 'password', 'default'); + } catch(Exception $ex) { + $this->markTestSkipped('Could not instantiate the Couchbase cache because of: ' . $ex); + } + } + + protected function _getCacheDriver() + { + $driver = new CouchbaseCache(); + $driver->setCouchbase($this->couchbase); + return $driver; + } +} \ No newline at end of file diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FileCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FileCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f27d54283a6520951b62fc246f7527065536b304 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FileCacheTest.php @@ -0,0 +1,268 @@ +driver = $this->getMock( + 'Doctrine\Common\Cache\FileCache', + array('doFetch', 'doContains', 'doSave'), + array(), '', false + ); + } + + public function testFilenameShouldCreateThePathWithOneSubDirectory() + { + $cache = $this->driver; + $method = new \ReflectionMethod($cache, 'getFilename'); + $key = 'item-key'; + $expectedDir = array( + '84', + ); + $expectedDir = implode(DIRECTORY_SEPARATOR, $expectedDir); + + $method->setAccessible(true); + + $path = $method->invoke($cache, $key); + $dirname = pathinfo($path, PATHINFO_DIRNAME); + + $this->assertEquals(DIRECTORY_SEPARATOR . $expectedDir, $dirname); + } + + public function testFileExtensionCorrectlyEscaped() + { + $driver1 = $this->getMock( + 'Doctrine\Common\Cache\FileCache', + array('doFetch', 'doContains', 'doSave'), + array(__DIR__, '.*') + ); + $driver2 = $this->getMock( + 'Doctrine\Common\Cache\FileCache', + array('doFetch', 'doContains', 'doSave'), + array(__DIR__, '.php') + ); + + $doGetStats = new \ReflectionMethod($driver1, 'doGetStats'); + + $doGetStats->setAccessible(true); + + $stats1 = $doGetStats->invoke($driver1); + $stats2 = $doGetStats->invoke($driver2); + + $this->assertSame(0, $stats1[Cache::STATS_MEMORY_USAGE]); + $this->assertGreaterThan(0, $stats2[Cache::STATS_MEMORY_USAGE]); + } + + /** + * @group DCOM-266 + */ + public function testFileExtensionSlashCorrectlyEscaped() + { + $driver = $this->getMock( + 'Doctrine\Common\Cache\FileCache', + array('doFetch', 'doContains', 'doSave'), + array(__DIR__ . '/../', DIRECTORY_SEPARATOR . basename(__FILE__)) + ); + + $doGetStats = new \ReflectionMethod($driver, 'doGetStats'); + + $doGetStats->setAccessible(true); + + $stats = $doGetStats->invoke($driver); + + $this->assertGreaterThan(0, $stats[Cache::STATS_MEMORY_USAGE]); + } + + public function testNonIntUmaskThrowsInvalidArgumentException() + { + $this->setExpectedException('InvalidArgumentException'); + + $this->getMock( + 'Doctrine\Common\Cache\FileCache', + array('doFetch', 'doContains', 'doSave'), + array('', '', 'invalid') + ); + } + + public function testGetDirectoryReturnsRealpathDirectoryString() + { + $directory = __DIR__ . '/../'; + $driver = $this->getMock( + 'Doctrine\Common\Cache\FileCache', + array('doFetch', 'doContains', 'doSave'), + array($directory) + ); + + $doGetDirectory = new \ReflectionMethod($driver, 'getDirectory'); + + $actualDirectory = $doGetDirectory->invoke($driver); + $expectedDirectory = realpath($directory); + + $this->assertEquals($expectedDirectory, $actualDirectory); + } + + public function testGetExtensionReturnsExtensionString() + { + $directory = __DIR__ . '/../'; + $extension = DIRECTORY_SEPARATOR . basename(__FILE__); + $driver = $this->getMock( + 'Doctrine\Common\Cache\FileCache', + array('doFetch', 'doContains', 'doSave'), + array($directory, $extension) + ); + + $doGetExtension = new \ReflectionMethod($driver, 'getExtension'); + + $actualExtension = $doGetExtension->invoke($driver); + + $this->assertEquals($extension, $actualExtension); + } + + const WIN_MAX_PATH_LEN = 258; + + public static function getBasePathForWindowsPathLengthTests($pathLength) + { + // Not using __DIR__ because it can get screwed up when xdebug debugger is attached. + $basePath = realpath(sys_get_temp_dir()) . '/' . uniqid('doctrine-cache', true); + + /** @noinspection MkdirRaceConditionInspection */ + @mkdir($basePath); + + $basePath = realpath($basePath); + + // Test whether the desired path length is odd or even. + $desiredPathLengthIsOdd = ($pathLength % 2) == 1; + + // If the cache key is not too long, the filecache codepath will add + // a slash and bin2hex($key). The length of the added portion will be an odd number. + // len(desired) = len(base path) + len(slash . bin2hex($key)) + // odd = even + odd + // even = odd + odd + $basePathLengthShouldBeOdd = !$desiredPathLengthIsOdd; + + $basePathLengthIsOdd = (strlen($basePath) % 2) == 1; + + // If the base path needs to be odd or even where it is not, we add an odd number of + // characters as a pad. In this case, we're adding '\aa' (or '/aa' depending on platform) + // This is all to make it so that the key we're testing would result in + // a path that is exactly the length we want to test IF the path length limit + // were not in place in FileCache. + if ($basePathLengthIsOdd != $basePathLengthShouldBeOdd) { + $basePath .= DIRECTORY_SEPARATOR . "aa"; + } + + return $basePath; + } + + /** + * @param int $length + * @param string $basePath + * + * @return array + */ + public static function getKeyAndPathFittingLength($length, $basePath) + { + $baseDirLength = strlen($basePath); + $extensionLength = strlen('.doctrine.cache'); + $directoryLength = strlen(DIRECTORY_SEPARATOR . 'aa' . DIRECTORY_SEPARATOR); + $keyLength = $length - ($baseDirLength + $extensionLength + $directoryLength); // - 1 because of slash + + $key = str_repeat('a', floor($keyLength / 2)); + + $keyHash = hash('sha256', $key); + + $keyPath = $basePath + . DIRECTORY_SEPARATOR + . substr($keyHash, 0, 2) + . DIRECTORY_SEPARATOR + . bin2hex($key) + . '.doctrine.cache'; + + $hashedKeyPath = $basePath + . DIRECTORY_SEPARATOR + . substr($keyHash, 0, 2) + . DIRECTORY_SEPARATOR + . '_' . $keyHash + . '.doctrine.cache'; + + return array($key, $keyPath, $hashedKeyPath); + } + + public function getPathLengthsToTest() + { + // Windows officially supports 260 bytes including null terminator + // 259 characters is too large due to PHP bug (https://bugs.php.net/bug.php?id=70943) + // 260 characters is too large - null terminator is included in allowable length + return array( + array(257, false), + array(258, false), + array(259, true), + array(260, true) + ); + } + + /** + * @runInSeparateProcess + * @dataProvider getPathLengthsToTest + * + * @covers \Doctrine\Common\Cache\FileCache::getFilename + * + * @param int $length + * @param bool $pathShouldBeHashed + */ + public function testWindowsPathLengthLimitationsAreCorrectlyRespected($length, $pathShouldBeHashed) + { + if (! defined('PHP_WINDOWS_VERSION_BUILD')) { + define('PHP_WINDOWS_VERSION_BUILD', 'Yes, this is the "usual suspect", with the usual limitations'); + } + + $basePath = self::getBasePathForWindowsPathLengthTests($length); + + $fileCache = $this->getMockForAbstractClass( + 'Doctrine\Common\Cache\FileCache', + array($basePath, '.doctrine.cache') + ); + + list($key, $keyPath, $hashedKeyPath) = self::getKeyAndPathFittingLength($length, $basePath); + + $getFileName = new \ReflectionMethod($fileCache, 'getFilename'); + + $getFileName->setAccessible(true); + + $this->assertEquals( + $length, + strlen($keyPath), + sprintf('Path expected to be %d characters long is %d characters long', $length, strlen($keyPath)) + ); + + if ($pathShouldBeHashed) { + $keyPath = $hashedKeyPath; + } + + if ($pathShouldBeHashed) { + $this->assertSame( + $hashedKeyPath, + $getFileName->invoke($fileCache, $key), + 'Keys should be hashed correctly if they are over the limit.' + ); + } else { + $this->assertSame( + $keyPath, + $getFileName->invoke($fileCache, $key), + 'Keys below limit of the allowed length are used directly, unhashed' + ); + } + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9e7c9e818516c62d5b4b78d165ff335c54395ae2 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php @@ -0,0 +1,61 @@ +_getCacheDriver(); + $stats = $cache->getStats(); + + $this->assertNull($stats[Cache::STATS_HITS]); + $this->assertNull($stats[Cache::STATS_MISSES]); + $this->assertNull($stats[Cache::STATS_UPTIME]); + $this->assertEquals(0, $stats[Cache::STATS_MEMORY_USAGE]); + $this->assertGreaterThan(0, $stats[Cache::STATS_MEMORY_AVAILABLE]); + } + + public function testCacheInSharedDirectoryIsPerExtension() + { + $cache1 = new FilesystemCache($this->directory, '.foo'); + $cache2 = new FilesystemCache($this->directory, '.bar'); + + $this->assertTrue($cache1->save('key1', 11)); + $this->assertTrue($cache1->save('key2', 12)); + + $this->assertTrue($cache2->save('key1', 21)); + $this->assertTrue($cache2->save('key2', 22)); + + $this->assertSame(11, $cache1->fetch('key1'), 'Cache value must not be influenced by a different cache in the same directory but different extension'); + $this->assertSame(12, $cache1->fetch('key2')); + $this->assertTrue($cache1->flushAll()); + $this->assertFalse($cache1->fetch('key1'), 'flushAll() must delete all items with the current extension'); + $this->assertFalse($cache1->fetch('key2')); + + $this->assertSame(21, $cache2->fetch('key1'), 'flushAll() must not remove items with a different extension in a shared directory'); + $this->assertSame(22, $cache2->fetch('key2')); + } + + public function testFlushAllWithNoExtension() + { + $cache = new FilesystemCache($this->directory, ''); + + $this->assertTrue($cache->save('key1', 1)); + $this->assertTrue($cache->save('key2', 2)); + $this->assertTrue($cache->flushAll()); + $this->assertFalse($cache->contains('key1')); + $this->assertFalse($cache->contains('key2')); + } + + protected function _getCacheDriver() + { + return new FilesystemCache($this->directory); + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..74853b8491fb32b7ee30fe5a8ec4be2a11df3d0e --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php @@ -0,0 +1,59 @@ +memcache = new Memcache(); + + if (@$this->memcache->connect('localhost', 11211) === false) { + unset($this->memcache); + $this->markTestSkipped('Cannot connect to Memcache.'); + } + } + + protected function tearDown() + { + if ($this->memcache instanceof Memcache) { + $this->memcache->flush(); + } + } + + /** + * {@inheritdoc} + * + * Memcache does not support " " and null byte as key so we remove them from the tests. + */ + public function provideCacheIds() + { + $ids = parent::provideCacheIds(); + unset($ids[21], $ids[22]); + + return $ids; + } + + public function testGetMemcacheReturnsInstanceOfMemcache() + { + $this->assertInstanceOf('Memcache', $this->_getCacheDriver()->getMemcache()); + } + + /** + * {@inheritDoc} + */ + protected function _getCacheDriver() + { + $driver = new MemcacheCache(); + $driver->setMemcache($this->memcache); + return $driver; + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fbcf5c38edd50794449411690d51315b9a49746b --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php @@ -0,0 +1,61 @@ +memcached = new Memcached(); + $this->memcached->setOption(Memcached::OPT_COMPRESSION, false); + $this->memcached->addServer('127.0.0.1', 11211); + + if (@fsockopen('127.0.0.1', 11211) === false) { + unset($this->memcached); + $this->markTestSkipped('Cannot connect to Memcached.'); + } + } + + protected function tearDown() + { + if ($this->memcached instanceof Memcached) { + $this->memcached->flush(); + } + } + + /** + * {@inheritdoc} + * + * Memcached does not support " ", null byte and very long keys so we remove them from the tests. + */ + public function provideCacheIds() + { + $ids = parent::provideCacheIds(); + unset($ids[21], $ids[22], $ids[24]); + + return $ids; + } + + public function testGetMemcachedReturnsInstanceOfMemcached() + { + $this->assertInstanceOf('Memcached', $this->_getCacheDriver()->getMemcached()); + } + + /** + * {@inheritDoc} + */ + protected function _getCacheDriver() + { + $driver = new MemcachedCache(); + $driver->setMemcached($this->memcached); + return $driver; + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fa7cfacd1d345d7fb088e8b5769b5917dd61d034 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php @@ -0,0 +1,68 @@ +=')) { + $this->markTestSkipped('Mongo >= 1.3.0 is required.'); + } + + $mongo = new MongoClient(); + $this->collection = $mongo->selectCollection('doctrine_common_cache', 'test'); + } + + protected function tearDown() + { + if ($this->collection instanceof MongoCollection) { + $this->collection->drop(); + } + } + + public function testGetStats() + { + $cache = $this->_getCacheDriver(); + $stats = $cache->getStats(); + + $this->assertNull($stats[Cache::STATS_HITS]); + $this->assertNull($stats[Cache::STATS_MISSES]); + $this->assertGreaterThan(0, $stats[Cache::STATS_UPTIME]); + $this->assertEquals(0, $stats[Cache::STATS_MEMORY_USAGE]); + $this->assertNull($stats[Cache::STATS_MEMORY_AVAILABLE]); + } + + /** + * @group 108 + */ + public function testMongoCursorExceptionsDoNotBubbleUp() + { + /* @var $collection \MongoCollection|\PHPUnit_Framework_MockObject_MockObject */ + $collection = $this->getMock('MongoCollection', array(), array(), '', false); + + $collection->expects(self::once())->method('update')->willThrowException(new \MongoCursorException()); + + $cache = new MongoDBCache($collection); + + self::assertFalse($cache->save('foo', 'bar')); + } + + protected function _getCacheDriver() + { + return new MongoDBCache($this->collection); + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PhpFileCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PhpFileCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d1851cb3cb7f1f9e10dc28e53056395f0ba811c3 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PhpFileCacheTest.php @@ -0,0 +1,98 @@ +_getCacheDriver(); + + // Test save + $cache->save('test_set_state', new SetStateClass(array(1,2,3))); + + //Test __set_state call + $this->assertCount(0, SetStateClass::$values); + + // Test fetch + $value = $cache->fetch('test_set_state'); + $this->assertInstanceOf('Doctrine\Tests\Common\Cache\SetStateClass', $value); + $this->assertEquals(array(1,2,3), $value->getValue()); + + //Test __set_state call + $this->assertCount(1, SetStateClass::$values); + + // Test contains + $this->assertTrue($cache->contains('test_set_state')); + } + + public function testNotImplementsSetState() + { + $cache = $this->_getCacheDriver(); + + $this->setExpectedException('InvalidArgumentException'); + $cache->save('test_not_set_state', new NotSetStateClass(array(1,2,3))); + } + + public function testGetStats() + { + $cache = $this->_getCacheDriver(); + $stats = $cache->getStats(); + + $this->assertNull($stats[Cache::STATS_HITS]); + $this->assertNull($stats[Cache::STATS_MISSES]); + $this->assertNull($stats[Cache::STATS_UPTIME]); + $this->assertEquals(0, $stats[Cache::STATS_MEMORY_USAGE]); + $this->assertGreaterThan(0, $stats[Cache::STATS_MEMORY_AVAILABLE]); + } + + protected function _getCacheDriver() + { + return new PhpFileCache($this->directory); + } +} + +class NotSetStateClass +{ + private $value; + + public function __construct($value) + { + $this->value = $value; + } + + public function getValue() + { + return $this->value; + } +} + +class SetStateClass extends NotSetStateClass +{ + public static $values = array(); + + public static function __set_state($data) + { + self::$values = $data; + return new self($data['value']); + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PredisCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PredisCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e20839dc097f426a1bc4b62ef88f9abd52f67ad7 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PredisCacheTest.php @@ -0,0 +1,87 @@ +markTestSkipped('Predis\Client is missing. Make sure to "composer install" to have all dev dependencies.'); + } + + $this->client = new Client(); + + try { + $this->client->connect(); + } catch (ConnectionException $e) { + $this->markTestSkipped('Cannot connect to Redis because of: ' . $e); + } + } + + public function testHitMissesStatsAreProvided() + { + $cache = $this->_getCacheDriver(); + $stats = $cache->getStats(); + + $this->assertNotNull($stats[Cache::STATS_HITS]); + $this->assertNotNull($stats[Cache::STATS_MISSES]); + } + + /** + * @return PredisCache + */ + protected function _getCacheDriver() + { + return new PredisCache($this->client); + } + + /** + * {@inheritDoc} + * + * @dataProvider provideDataToCache + */ + public function testSetContainsFetchDelete($value) + { + if (array() === $value) { + $this->markTestIncomplete( + 'Predis currently doesn\'t support saving empty array values. ' + . 'See https://github.com/nrk/predis/issues/241' + ); + } + + parent::testSetContainsFetchDelete($value); + } + + /** + * {@inheritDoc} + * + * @dataProvider provideDataToCache + */ + public function testUpdateExistingEntry($value) + { + if (array() === $value) { + $this->markTestIncomplete( + 'Predis currently doesn\'t support saving empty array values. ' + . 'See https://github.com/nrk/predis/issues/241' + ); + } + + parent::testUpdateExistingEntry($value); + } + + public function testAllowsGenericPredisClient() + { + /* @var $predisClient \Predis\ClientInterface */ + $predisClient = $this->getMock('Predis\\ClientInterface'); + + $this->assertInstanceOf('Doctrine\\Common\\Cache\\PredisCache', new PredisCache($predisClient)); + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RedisCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RedisCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5fb6a11db692359a76a08088dfdd7684a4e1c940 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RedisCacheTest.php @@ -0,0 +1,59 @@ +_redis = new \Redis(); + $ok = @$this->_redis->connect('127.0.0.1'); + if (!$ok) { + $this->markTestSkipped('Cannot connect to Redis.'); + } + } + + public function testHitMissesStatsAreProvided() + { + $cache = $this->_getCacheDriver(); + $stats = $cache->getStats(); + + $this->assertNotNull($stats[Cache::STATS_HITS]); + $this->assertNotNull($stats[Cache::STATS_MISSES]); + } + + public function testGetRedisReturnsInstanceOfRedis() + { + $this->assertInstanceOf('Redis', $this->_getCacheDriver()->getRedis()); + } + + public function testSerializerOptionWithOutIgbinaryExtension() + { + if (defined('Redis::SERIALIZER_IGBINARY') && extension_loaded('igbinary')) { + $this->markTestSkipped('Extension igbinary is loaded.'); + } + + $this->assertEquals( + \Redis::SERIALIZER_PHP, + $this->_getCacheDriver()->getRedis()->getOption(\Redis::OPT_SERIALIZER) + ); + } + + /** + * {@inheritDoc} + */ + protected function _getCacheDriver() + { + $driver = new RedisCache(); + $driver->setRedis($this->_redis); + return $driver; + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e7d5f3dd33dd2abdd3a1021be727f15bde12655e --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php @@ -0,0 +1,58 @@ +connection = new Connection('127.0.0.1', 8087); + $this->bucket = new Bucket($this->connection, 'test'); + } catch (Exception\RiakException $e) { + $this->markTestSkipped('Cannot connect to Riak.'); + } + } + + /** + * {@inheritdoc} + */ + public function testGetStats() + { + $cache = $this->_getCacheDriver(); + $stats = $cache->getStats(); + + $this->assertNull($stats); + } + + /** + * Retrieve RiakCache instance. + * + * @return \Doctrine\Common\Cache\RiakCache + */ + protected function _getCacheDriver() + { + return new RiakCache($this->bucket); + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/SQLite3CacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/SQLite3CacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f0c5b0b592afe6ab8ec5d1c3c34cc7e2b8ac7156 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/SQLite3CacheTest.php @@ -0,0 +1,42 @@ +file = tempnam(null, 'doctrine-cache-test-'); + unlink($this->file); + $this->sqlite = new SQLite3($this->file); + } + + protected function tearDown() + { + $this->sqlite = null; // DB must be closed before + unlink($this->file); + } + + public function testGetStats() + { + $this->assertNull($this->_getCacheDriver()->getStats()); + } + + /** + * {@inheritDoc} + */ + protected function _getCacheDriver() + { + return new SQLite3Cache($this->sqlite, 'test_table'); + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/VoidCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/VoidCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8ab7e5b4721f458691f640d1d742f990dd80d938 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/VoidCacheTest.php @@ -0,0 +1,58 @@ +assertFalse($cache->contains('foo')); + $this->assertFalse($cache->contains('bar')); + } + + public function testShouldAlwaysReturnFalseOnFetch() + { + $cache = new VoidCache(); + + $this->assertFalse($cache->fetch('foo')); + $this->assertFalse($cache->fetch('bar')); + } + + public function testShouldAlwaysReturnTrueOnSaveButNotStoreAnything() + { + $cache = new VoidCache(); + + $this->assertTrue($cache->save('foo', 'fooVal')); + + $this->assertFalse($cache->contains('foo')); + $this->assertFalse($cache->fetch('foo')); + } + + public function testShouldAlwaysReturnTrueOnDelete() + { + $cache = new VoidCache(); + + $this->assertTrue($cache->delete('foo')); + } + + public function testShouldAlwaysReturnNullOnGetStatus() + { + $cache = new VoidCache(); + + $this->assertNull($cache->getStats()); + } + + public function testShouldAlwaysReturnTrueOnFlush() + { + $cache = new VoidCache(); + + $this->assertTrue($cache->flushAll()); + } +} diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/WinCacheCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/WinCacheCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1dded424789fd37d98e78feffe2c7f6117a57276 --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/WinCacheCacheTest.php @@ -0,0 +1,16 @@ +markTestSkipped('Zend Data Cache only works in apache2handler SAPI.'); + } + } + + public function testGetStats() + { + $cache = $this->_getCacheDriver(); + $stats = $cache->getStats(); + + $this->assertNull($stats); + } + + protected function _getCacheDriver() + { + return new ZendDataCache(); + } +} \ No newline at end of file diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/DoctrineTestCase.php b/vendor/doctrine/cache/tests/Doctrine/Tests/DoctrineTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..e8323d294092a5ed06eb1ff8fca5840f613ae41a --- /dev/null +++ b/vendor/doctrine/cache/tests/Doctrine/Tests/DoctrineTestCase.php @@ -0,0 +1,10 @@ + + + + + + + + + + + + + + ../Doctrine/ + + + + + + ../../lib/Doctrine/ + + + + + + performance + + + diff --git a/vendor/doctrine/collections/.travis.yml b/vendor/doctrine/collections/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..60f479277d085b2cdd592668bde86132503c69b3 --- /dev/null +++ b/vendor/doctrine/collections/.travis.yml @@ -0,0 +1,21 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - hhvm + - hhvm-nightly + +matrix: + fast_finish: true + allow_failures: + - php: 7.0 + +before_script: + - composer --prefer-source install + +script: + - phpunit diff --git a/vendor/doctrine/collections/LICENSE b/vendor/doctrine/collections/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5e781fce4bb504715ba0ec0188715b18a198ca6b --- /dev/null +++ b/vendor/doctrine/collections/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2013 Doctrine Project + +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/vendor/doctrine/collections/README.md b/vendor/doctrine/collections/README.md new file mode 100644 index 0000000000000000000000000000000000000000..161cab63c73a9fc6706f8591af9682e6c016715b --- /dev/null +++ b/vendor/doctrine/collections/README.md @@ -0,0 +1,25 @@ +# Doctrine Collections + +[![Build Status](https://travis-ci.org/doctrine/collections.svg?branch=master)](https://travis-ci.org/doctrine/collections) + +Collections Abstraction library + +## Changelog + +### v1.3.0 + +* [Explicit casting of first and max results in criteria API](https://github.com/doctrine/collections/pull/26) +* [Keep keys when using `ArrayCollection#matching()` with sorting](https://github.com/doctrine/collections/pull/49) +* [Made `AbstractLazyCollection#$initialized` protected for extensibility](https://github.com/doctrine/collections/pull/52) + +### v1.2.0 + +* Add a new ``AbstractLazyCollection`` + +### v1.1.0 + +* Deprecated ``Comparison::IS``, because it's only there for SQL semantics. + These are fixed in the ORM instead. +* Add ``Comparison::CONTAINS`` to perform partial string matches: + + $criteria->andWhere($criteria->expr()->contains('property', 'Foo')); diff --git a/vendor/doctrine/collections/composer.json b/vendor/doctrine/collections/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..155cac48f97a53a29e82275b1dfcba56fc737b64 --- /dev/null +++ b/vendor/doctrine/collections/composer.json @@ -0,0 +1,29 @@ +{ + "name": "doctrine/collections", + "type": "library", + "description": "Collections Abstraction library", + "keywords": ["collections", "array", "iterator"], + "homepage": "http://www.doctrine-project.org", + "license": "MIT", + "authors": [ + {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, + {"name": "Roman Borschel", "email": "roman@code-factory.org"}, + {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, + {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, + {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} + ], + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "autoload": { + "psr-0": { "Doctrine\\Common\\Collections\\": "lib/" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + } +} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php new file mode 100644 index 0000000000000000000000000000000000000000..b907f8b02a00cf7fec00672e375aca29be1e039f --- /dev/null +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php @@ -0,0 +1,343 @@ +. + */ + +namespace Doctrine\Common\Collections; + +use Closure; + +/** + * Lazy collection that is backed by a concrete collection + * + * @author Michaël Gallego + * @since 1.2 + */ +abstract class AbstractLazyCollection implements Collection +{ + /** + * The backed collection to use + * + * @var Collection + */ + protected $collection; + + /** + * @var boolean + */ + protected $initialized = false; + + /** + * {@inheritDoc} + */ + public function count() + { + $this->initialize(); + return $this->collection->count(); + } + + /** + * {@inheritDoc} + */ + public function add($element) + { + $this->initialize(); + return $this->collection->add($element); + } + + /** + * {@inheritDoc} + */ + public function clear() + { + $this->initialize(); + $this->collection->clear(); + } + + /** + * {@inheritDoc} + */ + public function contains($element) + { + $this->initialize(); + return $this->collection->contains($element); + } + + /** + * {@inheritDoc} + */ + public function isEmpty() + { + $this->initialize(); + return $this->collection->isEmpty(); + } + + /** + * {@inheritDoc} + */ + public function remove($key) + { + $this->initialize(); + return $this->collection->remove($key); + } + + /** + * {@inheritDoc} + */ + public function removeElement($element) + { + $this->initialize(); + return $this->collection->removeElement($element); + } + + /** + * {@inheritDoc} + */ + public function containsKey($key) + { + $this->initialize(); + return $this->collection->containsKey($key); + } + + /** + * {@inheritDoc} + */ + public function get($key) + { + $this->initialize(); + return $this->collection->get($key); + } + + /** + * {@inheritDoc} + */ + public function getKeys() + { + $this->initialize(); + return $this->collection->getKeys(); + } + + /** + * {@inheritDoc} + */ + public function getValues() + { + $this->initialize(); + return $this->collection->getValues(); + } + + /** + * {@inheritDoc} + */ + public function set($key, $value) + { + $this->initialize(); + $this->collection->set($key, $value); + } + + /** + * {@inheritDoc} + */ + public function toArray() + { + $this->initialize(); + return $this->collection->toArray(); + } + + /** + * {@inheritDoc} + */ + public function first() + { + $this->initialize(); + return $this->collection->first(); + } + + /** + * {@inheritDoc} + */ + public function last() + { + $this->initialize(); + return $this->collection->last(); + } + + /** + * {@inheritDoc} + */ + public function key() + { + $this->initialize(); + return $this->collection->key(); + } + + /** + * {@inheritDoc} + */ + public function current() + { + $this->initialize(); + return $this->collection->current(); + } + + /** + * {@inheritDoc} + */ + public function next() + { + $this->initialize(); + return $this->collection->next(); + } + + /** + * {@inheritDoc} + */ + public function exists(Closure $p) + { + $this->initialize(); + return $this->collection->exists($p); + } + + /** + * {@inheritDoc} + */ + public function filter(Closure $p) + { + $this->initialize(); + return $this->collection->filter($p); + } + + /** + * {@inheritDoc} + */ + public function forAll(Closure $p) + { + $this->initialize(); + return $this->collection->forAll($p); + } + + /** + * {@inheritDoc} + */ + public function map(Closure $func) + { + $this->initialize(); + return $this->collection->map($func); + } + + /** + * {@inheritDoc} + */ + public function partition(Closure $p) + { + $this->initialize(); + return $this->collection->partition($p); + } + + /** + * {@inheritDoc} + */ + public function indexOf($element) + { + $this->initialize(); + return $this->collection->indexOf($element); + } + + /** + * {@inheritDoc} + */ + public function slice($offset, $length = null) + { + $this->initialize(); + return $this->collection->slice($offset, $length); + } + + /** + * {@inheritDoc} + */ + public function getIterator() + { + $this->initialize(); + return $this->collection->getIterator(); + } + + /** + * {@inheritDoc} + */ + public function offsetExists($offset) + { + $this->initialize(); + return $this->collection->offsetExists($offset); + } + + /** + * {@inheritDoc} + */ + public function offsetGet($offset) + { + $this->initialize(); + return $this->collection->offsetGet($offset); + } + + /** + * {@inheritDoc} + */ + public function offsetSet($offset, $value) + { + $this->initialize(); + $this->collection->offsetSet($offset, $value); + } + + /** + * {@inheritDoc} + */ + public function offsetUnset($offset) + { + $this->initialize(); + $this->collection->offsetUnset($offset); + } + + /** + * Is the lazy collection already initialized? + * + * @return bool + */ + public function isInitialized() + { + return $this->initialized; + } + + /** + * Initialize the collection + * + * @return void + */ + protected function initialize() + { + if ( ! $this->initialized) { + $this->doInitialize(); + $this->initialized = true; + } + } + + /** + * Do the initialization logic + * + * @return void + */ + abstract protected function doInitialize(); +} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php new file mode 100644 index 0000000000000000000000000000000000000000..bce575120ea794a29004b51749252c8a63e6cc8c --- /dev/null +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php @@ -0,0 +1,387 @@ +. + */ + +namespace Doctrine\Common\Collections; + +use ArrayIterator; +use Closure; +use Doctrine\Common\Collections\Expr\ClosureExpressionVisitor; + +/** + * An ArrayCollection is a Collection implementation that wraps a regular PHP array. + * + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ArrayCollection implements Collection, Selectable +{ + /** + * An array containing the entries of this collection. + * + * @var array + */ + private $elements; + + /** + * Initializes a new ArrayCollection. + * + * @param array $elements + */ + public function __construct(array $elements = array()) + { + $this->elements = $elements; + } + + /** + * {@inheritDoc} + */ + public function toArray() + { + return $this->elements; + } + + /** + * {@inheritDoc} + */ + public function first() + { + return reset($this->elements); + } + + /** + * {@inheritDoc} + */ + public function last() + { + return end($this->elements); + } + + /** + * {@inheritDoc} + */ + public function key() + { + return key($this->elements); + } + + /** + * {@inheritDoc} + */ + public function next() + { + return next($this->elements); + } + + /** + * {@inheritDoc} + */ + public function current() + { + return current($this->elements); + } + + /** + * {@inheritDoc} + */ + public function remove($key) + { + if ( ! isset($this->elements[$key]) && ! array_key_exists($key, $this->elements)) { + return null; + } + + $removed = $this->elements[$key]; + unset($this->elements[$key]); + + return $removed; + } + + /** + * {@inheritDoc} + */ + public function removeElement($element) + { + $key = array_search($element, $this->elements, true); + + if ($key === false) { + return false; + } + + unset($this->elements[$key]); + + return true; + } + + /** + * Required by interface ArrayAccess. + * + * {@inheritDoc} + */ + public function offsetExists($offset) + { + return $this->containsKey($offset); + } + + /** + * Required by interface ArrayAccess. + * + * {@inheritDoc} + */ + public function offsetGet($offset) + { + return $this->get($offset); + } + + /** + * Required by interface ArrayAccess. + * + * {@inheritDoc} + */ + public function offsetSet($offset, $value) + { + if ( ! isset($offset)) { + return $this->add($value); + } + + $this->set($offset, $value); + } + + /** + * Required by interface ArrayAccess. + * + * {@inheritDoc} + */ + public function offsetUnset($offset) + { + return $this->remove($offset); + } + + /** + * {@inheritDoc} + */ + public function containsKey($key) + { + return isset($this->elements[$key]) || array_key_exists($key, $this->elements); + } + + /** + * {@inheritDoc} + */ + public function contains($element) + { + return in_array($element, $this->elements, true); + } + + /** + * {@inheritDoc} + */ + public function exists(Closure $p) + { + foreach ($this->elements as $key => $element) { + if ($p($key, $element)) { + return true; + } + } + + return false; + } + + /** + * {@inheritDoc} + */ + public function indexOf($element) + { + return array_search($element, $this->elements, true); + } + + /** + * {@inheritDoc} + */ + public function get($key) + { + return isset($this->elements[$key]) ? $this->elements[$key] : null; + } + + /** + * {@inheritDoc} + */ + public function getKeys() + { + return array_keys($this->elements); + } + + /** + * {@inheritDoc} + */ + public function getValues() + { + return array_values($this->elements); + } + + /** + * {@inheritDoc} + */ + public function count() + { + return count($this->elements); + } + + /** + * {@inheritDoc} + */ + public function set($key, $value) + { + $this->elements[$key] = $value; + } + + /** + * {@inheritDoc} + */ + public function add($value) + { + $this->elements[] = $value; + + return true; + } + + /** + * {@inheritDoc} + */ + public function isEmpty() + { + return empty($this->elements); + } + + /** + * Required by interface IteratorAggregate. + * + * {@inheritDoc} + */ + public function getIterator() + { + return new ArrayIterator($this->elements); + } + + /** + * {@inheritDoc} + */ + public function map(Closure $func) + { + return new static(array_map($func, $this->elements)); + } + + /** + * {@inheritDoc} + */ + public function filter(Closure $p) + { + return new static(array_filter($this->elements, $p)); + } + + /** + * {@inheritDoc} + */ + public function forAll(Closure $p) + { + foreach ($this->elements as $key => $element) { + if ( ! $p($key, $element)) { + return false; + } + } + + return true; + } + + /** + * {@inheritDoc} + */ + public function partition(Closure $p) + { + $matches = $noMatches = array(); + + foreach ($this->elements as $key => $element) { + if ($p($key, $element)) { + $matches[$key] = $element; + } else { + $noMatches[$key] = $element; + } + } + + return array(new static($matches), new static($noMatches)); + } + + /** + * Returns a string representation of this object. + * + * @return string + */ + public function __toString() + { + return __CLASS__ . '@' . spl_object_hash($this); + } + + /** + * {@inheritDoc} + */ + public function clear() + { + $this->elements = array(); + } + + /** + * {@inheritDoc} + */ + public function slice($offset, $length = null) + { + return array_slice($this->elements, $offset, $length, true); + } + + /** + * {@inheritDoc} + */ + public function matching(Criteria $criteria) + { + $expr = $criteria->getWhereExpression(); + $filtered = $this->elements; + + if ($expr) { + $visitor = new ClosureExpressionVisitor(); + $filter = $visitor->dispatch($expr); + $filtered = array_filter($filtered, $filter); + } + + if ($orderings = $criteria->getOrderings()) { + foreach (array_reverse($orderings) as $field => $ordering) { + $next = ClosureExpressionVisitor::sortByField($field, $ordering == Criteria::DESC ? -1 : 1); + } + + uasort($filtered, $next); + } + + $offset = $criteria->getFirstResult(); + $length = $criteria->getMaxResults(); + + if ($offset || $length) { + $filtered = array_slice($filtered, (int)$offset, $length); + } + + return new static($filtered); + } +} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php new file mode 100644 index 0000000000000000000000000000000000000000..8792f7a5b6634896bc607b42b83a66294cffc7ec --- /dev/null +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php @@ -0,0 +1,263 @@ +. + */ + +namespace Doctrine\Common\Collections; + +use ArrayAccess; +use Closure; +use Countable; +use IteratorAggregate; + +/** + * The missing (SPL) Collection/Array/OrderedMap interface. + * + * A Collection resembles the nature of a regular PHP array. That is, + * it is essentially an ordered map that can also be used + * like a list. + * + * A Collection has an internal iterator just like a PHP array. In addition, + * a Collection can be iterated with external iterators, which is preferable. + * To use an external iterator simply use the foreach language construct to + * iterate over the collection (which calls {@link getIterator()} internally) or + * explicitly retrieve an iterator though {@link getIterator()} which can then be + * used to iterate over the collection. + * You can not rely on the internal iterator of the collection being at a certain + * position unless you explicitly positioned it before. Prefer iteration with + * external iterators. + * + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +interface Collection extends Countable, IteratorAggregate, ArrayAccess +{ + /** + * Adds an element at the end of the collection. + * + * @param mixed $element The element to add. + * + * @return boolean Always TRUE. + */ + public function add($element); + + /** + * Clears the collection, removing all elements. + * + * @return void + */ + public function clear(); + + /** + * Checks whether an element is contained in the collection. + * This is an O(n) operation, where n is the size of the collection. + * + * @param mixed $element The element to search for. + * + * @return boolean TRUE if the collection contains the element, FALSE otherwise. + */ + public function contains($element); + + /** + * Checks whether the collection is empty (contains no elements). + * + * @return boolean TRUE if the collection is empty, FALSE otherwise. + */ + public function isEmpty(); + + /** + * Removes the element at the specified index from the collection. + * + * @param string|integer $key The kex/index of the element to remove. + * + * @return mixed The removed element or NULL, if the collection did not contain the element. + */ + public function remove($key); + + /** + * Removes the specified element from the collection, if it is found. + * + * @param mixed $element The element to remove. + * + * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. + */ + public function removeElement($element); + + /** + * Checks whether the collection contains an element with the specified key/index. + * + * @param string|integer $key The key/index to check for. + * + * @return boolean TRUE if the collection contains an element with the specified key/index, + * FALSE otherwise. + */ + public function containsKey($key); + + /** + * Gets the element at the specified key/index. + * + * @param string|integer $key The key/index of the element to retrieve. + * + * @return mixed + */ + public function get($key); + + /** + * Gets all keys/indices of the collection. + * + * @return array The keys/indices of the collection, in the order of the corresponding + * elements in the collection. + */ + public function getKeys(); + + /** + * Gets all values of the collection. + * + * @return array The values of all elements in the collection, in the order they + * appear in the collection. + */ + public function getValues(); + + /** + * Sets an element in the collection at the specified key/index. + * + * @param string|integer $key The key/index of the element to set. + * @param mixed $value The element to set. + * + * @return void + */ + public function set($key, $value); + + /** + * Gets a native PHP array representation of the collection. + * + * @return array + */ + public function toArray(); + + /** + * Sets the internal iterator to the first element in the collection and returns this element. + * + * @return mixed + */ + public function first(); + + /** + * Sets the internal iterator to the last element in the collection and returns this element. + * + * @return mixed + */ + public function last(); + + /** + * Gets the key/index of the element at the current iterator position. + * + * @return int|string + */ + public function key(); + + /** + * Gets the element of the collection at the current iterator position. + * + * @return mixed + */ + public function current(); + + /** + * Moves the internal iterator position to the next element and returns this element. + * + * @return mixed + */ + public function next(); + + /** + * Tests for the existence of an element that satisfies the given predicate. + * + * @param Closure $p The predicate. + * + * @return boolean TRUE if the predicate is TRUE for at least one element, FALSE otherwise. + */ + public function exists(Closure $p); + + /** + * Returns all the elements of this collection that satisfy the predicate p. + * The order of the elements is preserved. + * + * @param Closure $p The predicate used for filtering. + * + * @return Collection A collection with the results of the filter operation. + */ + public function filter(Closure $p); + + /** + * Tests whether the given predicate p holds for all elements of this collection. + * + * @param Closure $p The predicate. + * + * @return boolean TRUE, if the predicate yields TRUE for all elements, FALSE otherwise. + */ + public function forAll(Closure $p); + + /** + * Applies the given function to each element in the collection and returns + * a new collection with the elements returned by the function. + * + * @param Closure $func + * + * @return Collection + */ + public function map(Closure $func); + + /** + * Partitions this collection in two collections according to a predicate. + * Keys are preserved in the resulting collections. + * + * @param Closure $p The predicate on which to partition. + * + * @return array An array with two elements. The first element contains the collection + * of elements where the predicate returned TRUE, the second element + * contains the collection of elements where the predicate returned FALSE. + */ + public function partition(Closure $p); + + /** + * Gets the index/key of a given element. The comparison of two elements is strict, + * that means not only the value but also the type must match. + * For objects this means reference equality. + * + * @param mixed $element The element to search for. + * + * @return int|string|bool The key/index of the element or FALSE if the element was not found. + */ + public function indexOf($element); + + /** + * Extracts a slice of $length elements starting at position $offset from the Collection. + * + * If $length is null it returns all elements from $offset to the end of the Collection. + * Keys have to be preserved by this method. Calling this method will only return the + * selected slice and NOT change the elements contained in the collection slice is called on. + * + * @param int $offset The offset to start from. + * @param int|null $length The maximum number of elements to return, or null for no limit. + * + * @return array + */ + public function slice($offset, $length = null); +} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php new file mode 100644 index 0000000000000000000000000000000000000000..3f9d43a8294e7ccce12a7ec137c48c3d9854108a --- /dev/null +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php @@ -0,0 +1,259 @@ +. + */ + +namespace Doctrine\Common\Collections; + +use Doctrine\Common\Collections\Expr\Expression; +use Doctrine\Common\Collections\Expr\CompositeExpression; + +/** + * Criteria for filtering Selectable collections. + * + * @author Benjamin Eberlei + * @since 2.3 + */ +class Criteria +{ + /** + * @var string + */ + const ASC = 'ASC'; + + /** + * @var string + */ + const DESC = 'DESC'; + + /** + * @var \Doctrine\Common\Collections\ExpressionBuilder|null + */ + private static $expressionBuilder; + + /** + * @var \Doctrine\Common\Collections\Expr\Expression|null + */ + private $expression; + + /** + * @var string[] + */ + private $orderings = array(); + + /** + * @var int|null + */ + private $firstResult; + + /** + * @var int|null + */ + private $maxResults; + + /** + * Creates an instance of the class. + * + * @return Criteria + */ + public static function create() + { + return new static(); + } + + /** + * Returns the expression builder. + * + * @return \Doctrine\Common\Collections\ExpressionBuilder + */ + public static function expr() + { + if (self::$expressionBuilder === null) { + self::$expressionBuilder = new ExpressionBuilder(); + } + + return self::$expressionBuilder; + } + + /** + * Construct a new Criteria. + * + * @param Expression $expression + * @param string[]|null $orderings + * @param int|null $firstResult + * @param int|null $maxResults + */ + public function __construct(Expression $expression = null, array $orderings = null, $firstResult = null, $maxResults = null) + { + $this->expression = $expression; + + $this->setFirstResult($firstResult); + $this->setMaxResults($maxResults); + + if (null !== $orderings) { + $this->orderBy($orderings); + } + } + + /** + * Sets the where expression to evaluate when this Criteria is searched for. + * + * @param Expression $expression + * + * @return Criteria + */ + public function where(Expression $expression) + { + $this->expression = $expression; + + return $this; + } + + /** + * Appends the where expression to evaluate when this Criteria is searched for + * using an AND with previous expression. + * + * @param Expression $expression + * + * @return Criteria + */ + public function andWhere(Expression $expression) + { + if ($this->expression === null) { + return $this->where($expression); + } + + $this->expression = new CompositeExpression(CompositeExpression::TYPE_AND, array( + $this->expression, $expression + )); + + return $this; + } + + /** + * Appends the where expression to evaluate when this Criteria is searched for + * using an OR with previous expression. + * + * @param Expression $expression + * + * @return Criteria + */ + public function orWhere(Expression $expression) + { + if ($this->expression === null) { + return $this->where($expression); + } + + $this->expression = new CompositeExpression(CompositeExpression::TYPE_OR, array( + $this->expression, $expression + )); + + return $this; + } + + /** + * Gets the expression attached to this Criteria. + * + * @return Expression|null + */ + public function getWhereExpression() + { + return $this->expression; + } + + /** + * Gets the current orderings of this Criteria. + * + * @return string[] + */ + public function getOrderings() + { + return $this->orderings; + } + + /** + * Sets the ordering of the result of this Criteria. + * + * Keys are field and values are the order, being either ASC or DESC. + * + * @see Criteria::ASC + * @see Criteria::DESC + * + * @param string[] $orderings + * + * @return Criteria + */ + public function orderBy(array $orderings) + { + $this->orderings = array_map( + function ($ordering) { + return strtoupper($ordering) === Criteria::ASC ? Criteria::ASC : Criteria::DESC; + }, + $orderings + ); + + return $this; + } + + /** + * Gets the current first result option of this Criteria. + * + * @return int|null + */ + public function getFirstResult() + { + return $this->firstResult; + } + + /** + * Set the number of first result that this Criteria should return. + * + * @param int|null $firstResult The value to set. + * + * @return Criteria + */ + public function setFirstResult($firstResult) + { + $this->firstResult = null === $firstResult ? null : (int) $firstResult; + + return $this; + } + + /** + * Gets maxResults. + * + * @return int|null + */ + public function getMaxResults() + { + return $this->maxResults; + } + + /** + * Sets maxResults. + * + * @param int|null $maxResults The value to set. + * + * @return Criteria + */ + public function setMaxResults($maxResults) + { + $this->maxResults = null === $maxResults ? null : (int) $maxResults; + + return $this; + } +} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php new file mode 100644 index 0000000000000000000000000000000000000000..994085f914f0006660b7923f2502397178b182d5 --- /dev/null +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php @@ -0,0 +1,227 @@ +. + */ + +namespace Doctrine\Common\Collections\Expr; + +/** + * Walks an expression graph and turns it into a PHP closure. + * + * This closure can be used with {@Collection#filter()} and is used internally + * by {@ArrayCollection#select()}. + * + * @author Benjamin Eberlei + * @since 2.3 + */ +class ClosureExpressionVisitor extends ExpressionVisitor +{ + /** + * Accesses the field of a given object. This field has to be public + * directly or indirectly (through an accessor get*, is*, or a magic + * method, __get, __call). + * + * @param object $object + * @param string $field + * + * @return mixed + */ + public static function getObjectFieldValue($object, $field) + { + if (is_array($object)) { + return $object[$field]; + } + + $accessors = array('get', 'is'); + + foreach ($accessors as $accessor) { + $accessor .= $field; + + if ( ! method_exists($object, $accessor)) { + continue; + } + + return $object->$accessor(); + } + + // __call should be triggered for get. + $accessor = $accessors[0] . $field; + + if (method_exists($object, '__call')) { + return $object->$accessor(); + } + + if ($object instanceof \ArrayAccess) { + return $object[$field]; + } + + return $object->$field; + } + + /** + * Helper for sorting arrays of objects based on multiple fields + orientations. + * + * @param string $name + * @param int $orientation + * @param \Closure $next + * + * @return \Closure + */ + public static function sortByField($name, $orientation = 1, \Closure $next = null) + { + if ( ! $next) { + $next = function() { + return 0; + }; + } + + return function ($a, $b) use ($name, $next, $orientation) { + $aValue = ClosureExpressionVisitor::getObjectFieldValue($a, $name); + $bValue = ClosureExpressionVisitor::getObjectFieldValue($b, $name); + + if ($aValue === $bValue) { + return $next($a, $b); + } + + return (($aValue > $bValue) ? 1 : -1) * $orientation; + }; + } + + /** + * {@inheritDoc} + */ + public function walkComparison(Comparison $comparison) + { + $field = $comparison->getField(); + $value = $comparison->getValue()->getValue(); // shortcut for walkValue() + + switch ($comparison->getOperator()) { + case Comparison::EQ: + return function ($object) use ($field, $value) { + return ClosureExpressionVisitor::getObjectFieldValue($object, $field) === $value; + }; + + case Comparison::NEQ: + return function ($object) use ($field, $value) { + return ClosureExpressionVisitor::getObjectFieldValue($object, $field) !== $value; + }; + + case Comparison::LT: + return function ($object) use ($field, $value) { + return ClosureExpressionVisitor::getObjectFieldValue($object, $field) < $value; + }; + + case Comparison::LTE: + return function ($object) use ($field, $value) { + return ClosureExpressionVisitor::getObjectFieldValue($object, $field) <= $value; + }; + + case Comparison::GT: + return function ($object) use ($field, $value) { + return ClosureExpressionVisitor::getObjectFieldValue($object, $field) > $value; + }; + + case Comparison::GTE: + return function ($object) use ($field, $value) { + return ClosureExpressionVisitor::getObjectFieldValue($object, $field) >= $value; + }; + + case Comparison::IN: + return function ($object) use ($field, $value) { + return in_array(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value); + }; + + case Comparison::NIN: + return function ($object) use ($field, $value) { + return ! in_array(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value); + }; + + case Comparison::CONTAINS: + return function ($object) use ($field, $value) { + return false !== strpos(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value); + }; + + default: + throw new \RuntimeException("Unknown comparison operator: " . $comparison->getOperator()); + } + } + + /** + * {@inheritDoc} + */ + public function walkValue(Value $value) + { + return $value->getValue(); + } + + /** + * {@inheritDoc} + */ + public function walkCompositeExpression(CompositeExpression $expr) + { + $expressionList = array(); + + foreach ($expr->getExpressionList() as $child) { + $expressionList[] = $this->dispatch($child); + } + + switch($expr->getType()) { + case CompositeExpression::TYPE_AND: + return $this->andExpressions($expressionList); + + case CompositeExpression::TYPE_OR: + return $this->orExpressions($expressionList); + + default: + throw new \RuntimeException("Unknown composite " . $expr->getType()); + } + } + + /** + * @param array $expressions + * + * @return callable + */ + private function andExpressions($expressions) + { + return function ($object) use ($expressions) { + foreach ($expressions as $expression) { + if ( ! $expression($object)) { + return false; + } + } + return true; + }; + } + + /** + * @param array $expressions + * + * @return callable + */ + private function orExpressions($expressions) + { + return function ($object) use ($expressions) { + foreach ($expressions as $expression) { + if ($expression($object)) { + return true; + } + } + return false; + }; + } +} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php new file mode 100644 index 0000000000000000000000000000000000000000..d54ecf25c7d5af7bde342427fc8dd370b0b79d35 --- /dev/null +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php @@ -0,0 +1,103 @@ +. + */ + +namespace Doctrine\Common\Collections\Expr; + +/** + * Comparison of a field with a value by the given operator. + * + * @author Benjamin Eberlei + * @since 2.3 + */ +class Comparison implements Expression +{ + const EQ = '='; + const NEQ = '<>'; + const LT = '<'; + const LTE = '<='; + const GT = '>'; + const GTE = '>='; + const IS = '='; // no difference with EQ + const IN = 'IN'; + const NIN = 'NIN'; + const CONTAINS = 'CONTAINS'; + + /** + * @var string + */ + private $field; + + /** + * @var string + */ + private $op; + + /** + * @var Value + */ + private $value; + + /** + * @param string $field + * @param string $operator + * @param mixed $value + */ + public function __construct($field, $operator, $value) + { + if ( ! ($value instanceof Value)) { + $value = new Value($value); + } + + $this->field = $field; + $this->op = $operator; + $this->value = $value; + } + + /** + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * @return Value + */ + public function getValue() + { + return $this->value; + } + + /** + * @return string + */ + public function getOperator() + { + return $this->op; + } + + /** + * {@inheritDoc} + */ + public function visit(ExpressionVisitor $visitor) + { + return $visitor->walkComparison($this); + } +} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..3613c027457791a8cf3d5273ebbdf1aa3c459aec --- /dev/null +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php @@ -0,0 +1,90 @@ +. + */ + +namespace Doctrine\Common\Collections\Expr; + +/** + * Expression of Expressions combined by AND or OR operation. + * + * @author Benjamin Eberlei + * @since 2.3 + */ +class CompositeExpression implements Expression +{ + const TYPE_AND = 'AND'; + const TYPE_OR = 'OR'; + + /** + * @var string + */ + private $type; + + /** + * @var Expression[] + */ + private $expressions = array(); + + /** + * @param string $type + * @param array $expressions + * + * @throws \RuntimeException + */ + public function __construct($type, array $expressions) + { + $this->type = $type; + + foreach ($expressions as $expr) { + if ($expr instanceof Value) { + throw new \RuntimeException("Values are not supported expressions as children of and/or expressions."); + } + if ( ! ($expr instanceof Expression)) { + throw new \RuntimeException("No expression given to CompositeExpression."); + } + + $this->expressions[] = $expr; + } + } + + /** + * Returns the list of expressions nested in this composite. + * + * @return Expression[] + */ + public function getExpressionList() + { + return $this->expressions; + } + + /** + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * {@inheritDoc} + */ + public function visit(ExpressionVisitor $visitor) + { + return $visitor->walkCompositeExpression($this); + } +} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php new file mode 100644 index 0000000000000000000000000000000000000000..68db767c0716981fcfd07182ab14dd6f0a7a507b --- /dev/null +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php @@ -0,0 +1,35 @@ +. + */ + +namespace Doctrine\Common\Collections\Expr; + +/** + * Expression for the {@link Selectable} interface. + * + * @author Benjamin Eberlei + */ +interface Expression +{ + /** + * @param ExpressionVisitor $visitor + * + * @return mixed + */ + public function visit(ExpressionVisitor $visitor); +} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ExpressionVisitor.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ExpressionVisitor.php new file mode 100644 index 0000000000000000000000000000000000000000..080afdc6df56b654ade75a3831d83c8a4ed0e5c8 --- /dev/null +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ExpressionVisitor.php @@ -0,0 +1,82 @@ +. + */ + +namespace Doctrine\Common\Collections\Expr; + +/** + * An Expression visitor walks a graph of expressions and turns them into a + * query for the underlying implementation. + * + * @author Benjamin Eberlei + */ +abstract class ExpressionVisitor +{ + /** + * Converts a comparison expression into the target query language output. + * + * @param Comparison $comparison + * + * @return mixed + */ + abstract public function walkComparison(Comparison $comparison); + + /** + * Converts a value expression into the target query language part. + * + * @param Value $value + * + * @return mixed + */ + abstract public function walkValue(Value $value); + + /** + * Converts a composite expression into the target query language output. + * + * @param CompositeExpression $expr + * + * @return mixed + */ + abstract public function walkCompositeExpression(CompositeExpression $expr); + + /** + * Dispatches walking an expression to the appropriate handler. + * + * @param Expression $expr + * + * @return mixed + * + * @throws \RuntimeException + */ + public function dispatch(Expression $expr) + { + switch (true) { + case ($expr instanceof Comparison): + return $this->walkComparison($expr); + + case ($expr instanceof Value): + return $this->walkValue($expr); + + case ($expr instanceof CompositeExpression): + return $this->walkCompositeExpression($expr); + + default: + throw new \RuntimeException("Unknown Expression " . get_class($expr)); + } + } +} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php new file mode 100644 index 0000000000000000000000000000000000000000..7f6e83143b57505c1ac889b87b4824766c3b9c45 --- /dev/null +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php @@ -0,0 +1,52 @@ +. + */ + +namespace Doctrine\Common\Collections\Expr; + +class Value implements Expression +{ + /** + * @var mixed + */ + private $value; + + /** + * @param mixed $value + */ + public function __construct($value) + { + $this->value = $value; + } + + /** + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * {@inheritDoc} + */ + public function visit(ExpressionVisitor $visitor) + { + return $visitor->walkValue($this); + } +} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..6539e3c75fd44f27b38e81e6bec5f5f7a76e92ab --- /dev/null +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php @@ -0,0 +1,166 @@ +. + */ + +namespace Doctrine\Common\Collections; + +use Doctrine\Common\Collections\Expr\Comparison; +use Doctrine\Common\Collections\Expr\CompositeExpression; +use Doctrine\Common\Collections\Expr\Value; + +/** + * Builder for Expressions in the {@link Selectable} interface. + * + * Important Notice for interoperable code: You have to use scalar + * values only for comparisons, otherwise the behavior of the comparision + * may be different between implementations (Array vs ORM vs ODM). + * + * @author Benjamin Eberlei + * @since 2.3 + */ +class ExpressionBuilder +{ + /** + * @param mixed $x + * + * @return CompositeExpression + */ + public function andX($x = null) + { + return new CompositeExpression(CompositeExpression::TYPE_AND, func_get_args()); + } + + /** + * @param mixed $x + * + * @return CompositeExpression + */ + public function orX($x = null) + { + return new CompositeExpression(CompositeExpression::TYPE_OR, func_get_args()); + } + + /** + * @param string $field + * @param mixed $value + * + * @return Comparison + */ + public function eq($field, $value) + { + return new Comparison($field, Comparison::EQ, new Value($value)); + } + + /** + * @param string $field + * @param mixed $value + * + * @return Comparison + */ + public function gt($field, $value) + { + return new Comparison($field, Comparison::GT, new Value($value)); + } + + /** + * @param string $field + * @param mixed $value + * + * @return Comparison + */ + public function lt($field, $value) + { + return new Comparison($field, Comparison::LT, new Value($value)); + } + + /** + * @param string $field + * @param mixed $value + * + * @return Comparison + */ + public function gte($field, $value) + { + return new Comparison($field, Comparison::GTE, new Value($value)); + } + + /** + * @param string $field + * @param mixed $value + * + * @return Comparison + */ + public function lte($field, $value) + { + return new Comparison($field, Comparison::LTE, new Value($value)); + } + + /** + * @param string $field + * @param mixed $value + * + * @return Comparison + */ + public function neq($field, $value) + { + return new Comparison($field, Comparison::NEQ, new Value($value)); + } + + /** + * @param string $field + * + * @return Comparison + */ + public function isNull($field) + { + return new Comparison($field, Comparison::EQ, new Value(null)); + } + + /** + * @param string $field + * @param mixed $values + * + * @return Comparison + */ + public function in($field, array $values) + { + return new Comparison($field, Comparison::IN, new Value($values)); + } + + /** + * @param string $field + * @param mixed $values + * + * @return Comparison + */ + public function notIn($field, array $values) + { + return new Comparison($field, Comparison::NIN, new Value($values)); + } + + /** + * @param string $field + * @param mixed $value + * + * @return Comparison + */ + public function contains($field, $value) + { + return new Comparison($field, Comparison::CONTAINS, new Value($value)); + } +} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Selectable.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Selectable.php new file mode 100644 index 0000000000000000000000000000000000000000..57660ed7fcb0a2fc2f5f4380067eda6c5467aa28 --- /dev/null +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Selectable.php @@ -0,0 +1,48 @@ +. + */ + +namespace Doctrine\Common\Collections; + +/** + * Interface for collections that allow efficient filtering with an expression API. + * + * Goal of this interface is a backend independent method to fetch elements + * from a collections. {@link Expression} is crafted in a way that you can + * implement queries from both in-memory and database-backed collections. + * + * For database backed collections this allows very efficient access by + * utilizing the query APIs, for example SQL in the ORM. Applications using + * this API can implement efficient database access without having to ask the + * EntityManager or Repositories. + * + * @author Benjamin Eberlei + * @since 2.3 + */ +interface Selectable +{ + /** + * Selects all elements from a selectable that match the expression and + * returns a new collection containing these elements. + * + * @param Criteria $criteria + * + * @return Collection + */ + public function matching(Criteria $criteria); +} diff --git a/vendor/doctrine/collections/phpunit.xml.dist b/vendor/doctrine/collections/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..36968e99c30a8d01b2742eb300a20967111d76f7 --- /dev/null +++ b/vendor/doctrine/collections/phpunit.xml.dist @@ -0,0 +1,31 @@ + + + + + + ./tests/Doctrine/ + + + + + + ./lib/Doctrine/ + + + + + + performance + + + diff --git a/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/AbstractLazyCollectionTest.php b/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/AbstractLazyCollectionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4de82cc2037d38d92b82d7e65d6b066b5983c585 --- /dev/null +++ b/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/AbstractLazyCollectionTest.php @@ -0,0 +1,20 @@ +assertFalse($collection->isInitialized()); + $this->assertCount(3, $collection); + + $collection->add('bar'); + $this->assertTrue($collection->isInitialized()); + $this->assertCount(4, $collection); + } +} diff --git a/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ArrayCollectionTest.php b/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ArrayCollectionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1b8a906fdaf8bb9dfcd1905a84bb381ce918e794 --- /dev/null +++ b/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ArrayCollectionTest.php @@ -0,0 +1,296 @@ +. + */ + +namespace Doctrine\Tests\Common\Collections; + +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Collections\Criteria; + +/** + * Tests for {@see \Doctrine\Common\Collections\ArrayCollection} + * + * @covers \Doctrine\Common\Collections\ArrayCollection + */ +class ArrayCollectionTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider provideDifferentElements + */ + public function testToArray($elements) + { + $collection = new ArrayCollection($elements); + + $this->assertSame($elements, $collection->toArray()); + } + + /** + * @dataProvider provideDifferentElements + */ + public function testFirst($elements) + { + $collection = new ArrayCollection($elements); + $this->assertSame(reset($elements), $collection->first()); + } + + /** + * @dataProvider provideDifferentElements + */ + public function testLast($elements) + { + $collection = new ArrayCollection($elements); + $this->assertSame(end($elements), $collection->last()); + } + + /** + * @dataProvider provideDifferentElements + */ + public function testKey($elements) + { + $collection = new ArrayCollection($elements); + + $this->assertSame(key($elements), $collection->key()); + + next($elements); + $collection->next(); + + $this->assertSame(key($elements), $collection->key()); + } + + /** + * @dataProvider provideDifferentElements + */ + public function testNext($elements) + { + $collection = new ArrayCollection($elements); + + while (true) { + $collectionNext = $collection->next(); + $arrayNext = next($elements); + + if(!$collectionNext || !$arrayNext) { + break; + } + + $this->assertSame($arrayNext, $collectionNext, "Returned value of ArrayCollection::next() and next() not match"); + $this->assertSame(key($elements), $collection->key(), "Keys not match"); + $this->assertSame(current($elements), $collection->current(), "Current values not match"); + } + } + + /** + * @dataProvider provideDifferentElements + */ + public function testCurrent($elements) + { + $collection = new ArrayCollection($elements); + + $this->assertSame(current($elements), $collection->current()); + + next($elements); + $collection->next(); + + $this->assertSame(current($elements), $collection->current()); + } + + /** + * @dataProvider provideDifferentElements + */ + public function testGetKeys($elements) + { + $collection = new ArrayCollection($elements); + + $this->assertSame(array_keys($elements), $collection->getKeys()); + } + + /** + * @dataProvider provideDifferentElements + */ + public function testGetValues($elements) + { + $collection = new ArrayCollection($elements); + + $this->assertSame(array_values($elements), $collection->getValues()); + } + + /** + * @dataProvider provideDifferentElements + */ + public function testCount($elements) + { + $collection = new ArrayCollection($elements); + + $this->assertSame(count($elements), $collection->count()); + } + + /** + * @dataProvider provideDifferentElements + */ + public function testIterator($elements) + { + $collection = new ArrayCollection($elements); + + $iterations = 0; + foreach($collection->getIterator() as $key => $item) { + $this->assertSame($elements[$key], $item, "Item {$key} not match"); + $iterations++; + } + + $this->assertEquals(count($elements), $iterations, "Number of iterations not match"); + } + + /** + * @return array + */ + public function provideDifferentElements() + { + return array( + 'indexed' => array(array(1, 2, 3, 4, 5)), + 'associative' => array(array('A' => 'a', 'B' => 'b', 'C' => 'c')), + 'mixed' => array(array('A' => 'a', 1, 'B' => 'b', 2, 3)), + ); + } + + public function testRemove() + { + $elements = array(1, 'A' => 'a', 2, 'B' => 'b', 3); + $collection = new ArrayCollection($elements); + + $this->assertEquals(1, $collection->remove(0)); + unset($elements[0]); + + $this->assertEquals(null, $collection->remove('non-existent')); + unset($elements['non-existent']); + + $this->assertEquals(2, $collection->remove(1)); + unset($elements[1]); + + $this->assertEquals('a', $collection->remove('A')); + unset($elements['A']); + + $this->assertEquals($elements, $collection->toArray()); + } + + public function testRemoveElement() + { + $elements = array(1, 'A' => 'a', 2, 'B' => 'b', 3, 'A2' => 'a', 'B2' => 'b'); + $collection = new ArrayCollection($elements); + + $this->assertTrue($collection->removeElement(1)); + unset($elements[0]); + + $this->assertFalse($collection->removeElement('non-existent')); + + $this->assertTrue($collection->removeElement('a')); + unset($elements['A']); + + $this->assertTrue($collection->removeElement('a')); + unset($elements['A2']); + + $this->assertEquals($elements, $collection->toArray()); + } + + public function testContainsKey() + { + $elements = array(1, 'A' => 'a', 2, 'null' => null, 3, 'A2' => 'a', 'B2' => 'b'); + $collection = new ArrayCollection($elements); + + $this->assertTrue($collection->containsKey(0), "Contains index 0"); + $this->assertTrue($collection->containsKey('A'), "Contains key \"A\""); + $this->assertTrue($collection->containsKey('null'), "Contains key \"null\", with value null"); + $this->assertFalse($collection->containsKey('non-existent'), "Doesn't contain key"); + } + + public function testEmpty() + { + $collection = new ArrayCollection(); + $this->assertTrue($collection->isEmpty(), "Empty collection"); + + $collection->add(1); + $this->assertFalse($collection->isEmpty(), "Not empty collection"); + } + + public function testContains() + { + $elements = array(1, 'A' => 'a', 2, 'null' => null, 3, 'A2' => 'a', 'zero' => 0); + $collection = new ArrayCollection($elements); + + $this->assertTrue($collection->contains(0), "Contains Zero"); + $this->assertTrue($collection->contains('a'), "Contains \"a\""); + $this->assertTrue($collection->contains(null), "Contains Null"); + $this->assertFalse($collection->contains('non-existent'), "Doesn't contain an element"); + } + + public function testExists() + { + $elements = array(1, 'A' => 'a', 2, 'null' => null, 3, 'A2' => 'a', 'zero' => 0); + $collection = new ArrayCollection($elements); + + $this->assertTrue($collection->exists(function($key, $element) { + return $key == 'A' && $element == 'a'; + }), "Element exists"); + + $this->assertFalse($collection->exists(function($key, $element) { + return $key == 'non-existent' && $element == 'non-existent'; + }), "Element not exists"); + } + + public function testIndexOf() + { + $elements = array(1, 'A' => 'a', 2, 'null' => null, 3, 'A2' => 'a', 'zero' => 0); + $collection = new ArrayCollection($elements); + + $this->assertSame(array_search(2, $elements, true), $collection->indexOf(2), 'Index of 2'); + $this->assertSame(array_search(null, $elements, true), $collection->indexOf(null), 'Index of null'); + $this->assertSame(array_search('non-existent', $elements, true), $collection->indexOf('non-existent'), 'Index of non existent'); + } + + public function testGet() + { + $elements = array(1, 'A' => 'a', 2, 'null' => null, 3, 'A2' => 'a', 'zero' => 0); + $collection = new ArrayCollection($elements); + + $this->assertSame(2, $collection->get(1), 'Get element by index'); + $this->assertSame('a', $collection->get('A'), 'Get element by name'); + $this->assertSame(null, $collection->get('non-existent'), 'Get non existent element'); + } + + public function testMatchingWithSortingPreservesyKeys() + { + $object1 = new \stdClass(); + $object2 = new \stdClass(); + + $object1->sortField = 2; + $object2->sortField = 1; + + $collection = new ArrayCollection(array( + 'object1' => $object1, + 'object2' => $object2, + )); + + $this->assertSame( + array( + 'object2' => $object2, + 'object1' => $object1, + ), + $collection + ->matching(new Criteria(null, array('sortField' => Criteria::ASC))) + ->toArray() + ); + } +} diff --git a/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ClosureExpressionVisitorTest.php b/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ClosureExpressionVisitorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..21c2e3dfc52c172ecf071c5a91dd41868aedfbdf --- /dev/null +++ b/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ClosureExpressionVisitorTest.php @@ -0,0 +1,250 @@ +. + */ + +namespace Doctrine\Tests\Common\Collections; + +use Doctrine\Common\Collections\Expr\ClosureExpressionVisitor; +use Doctrine\Common\Collections\ExpressionBuilder; + +/** + * @group DDC-1637 + */ +class ClosureExpressionVisitorTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var ClosureExpressionVisitor + */ + private $visitor; + + /** + * @var ExpressionBuilder + */ + private $builder; + + protected function setUp() + { + $this->visitor = new ClosureExpressionVisitor(); + $this->builder = new ExpressionBuilder(); + } + + public function testGetObjectFieldValueIsAccessor() + { + $object = new TestObject(1, 2, true); + + $this->assertTrue($this->visitor->getObjectFieldValue($object, 'baz')); + } + + public function testGetObjectFieldValueMagicCallMethod() + { + $object = new TestObject(1, 2, true, 3); + + $this->assertEquals(3, $this->visitor->getObjectFieldValue($object, 'qux')); + } + + public function testWalkEqualsComparison() + { + $closure = $this->visitor->walkComparison($this->builder->eq("foo", 1)); + + $this->assertTrue($closure(new TestObject(1))); + $this->assertFalse($closure(new TestObject(2))); + } + + public function testWalkNotEqualsComparison() + { + $closure = $this->visitor->walkComparison($this->builder->neq("foo", 1)); + + $this->assertFalse($closure(new TestObject(1))); + $this->assertTrue($closure(new TestObject(2))); + } + + public function testWalkLessThanComparison() + { + $closure = $this->visitor->walkComparison($this->builder->lt("foo", 1)); + + $this->assertFalse($closure(new TestObject(1))); + $this->assertTrue($closure(new TestObject(0))); + } + + public function testWalkLessThanEqualsComparison() + { + $closure = $this->visitor->walkComparison($this->builder->lte("foo", 1)); + + $this->assertFalse($closure(new TestObject(2))); + $this->assertTrue($closure(new TestObject(1))); + $this->assertTrue($closure(new TestObject(0))); + } + + public function testWalkGreaterThanEqualsComparison() + { + $closure = $this->visitor->walkComparison($this->builder->gte("foo", 1)); + + $this->assertTrue($closure(new TestObject(2))); + $this->assertTrue($closure(new TestObject(1))); + $this->assertFalse($closure(new TestObject(0))); + } + + public function testWalkGreaterThanComparison() + { + $closure = $this->visitor->walkComparison($this->builder->gt("foo", 1)); + + $this->assertTrue($closure(new TestObject(2))); + $this->assertFalse($closure(new TestObject(1))); + $this->assertFalse($closure(new TestObject(0))); + } + + public function testWalkInComparison() + { + $closure = $this->visitor->walkComparison($this->builder->in("foo", array(1, 2, 3))); + + $this->assertTrue($closure(new TestObject(2))); + $this->assertTrue($closure(new TestObject(1))); + $this->assertFalse($closure(new TestObject(0))); + } + + public function testWalkNotInComparison() + { + $closure = $this->visitor->walkComparison($this->builder->notIn("foo", array(1, 2, 3))); + + $this->assertFalse($closure(new TestObject(1))); + $this->assertFalse($closure(new TestObject(2))); + $this->assertTrue($closure(new TestObject(0))); + $this->assertTrue($closure(new TestObject(4))); + } + + public function testWalkContainsComparison() + { + $closure = $this->visitor->walkComparison($this->builder->contains('foo', 'hello')); + + $this->assertTrue($closure(new TestObject('hello world'))); + $this->assertFalse($closure(new TestObject('world'))); + } + + public function testWalkAndCompositeExpression() + { + $closure = $this->visitor->walkCompositeExpression( + $this->builder->andX( + $this->builder->eq("foo", 1), + $this->builder->eq("bar", 1) + ) + ); + + $this->assertTrue($closure(new TestObject(1, 1))); + $this->assertFalse($closure(new TestObject(1, 0))); + $this->assertFalse($closure(new TestObject(0, 1))); + $this->assertFalse($closure(new TestObject(0, 0))); + } + + public function testWalkOrCompositeExpression() + { + $closure = $this->visitor->walkCompositeExpression( + $this->builder->orX( + $this->builder->eq("foo", 1), + $this->builder->eq("bar", 1) + ) + ); + + $this->assertTrue($closure(new TestObject(1, 1))); + $this->assertTrue($closure(new TestObject(1, 0))); + $this->assertTrue($closure(new TestObject(0, 1))); + $this->assertFalse($closure(new TestObject(0, 0))); + } + + public function testSortByFieldAscending() + { + $objects = array(new TestObject("b"), new TestObject("a"), new TestObject("c")); + $sort = ClosureExpressionVisitor::sortByField("foo"); + + usort($objects, $sort); + + $this->assertEquals("a", $objects[0]->getFoo()); + $this->assertEquals("b", $objects[1]->getFoo()); + $this->assertEquals("c", $objects[2]->getFoo()); + } + + public function testSortByFieldDescending() + { + $objects = array(new TestObject("b"), new TestObject("a"), new TestObject("c")); + $sort = ClosureExpressionVisitor::sortByField("foo", -1); + + usort($objects, $sort); + + $this->assertEquals("c", $objects[0]->getFoo()); + $this->assertEquals("b", $objects[1]->getFoo()); + $this->assertEquals("a", $objects[2]->getFoo()); + } + + public function testSortDelegate() + { + $objects = array(new TestObject("a", "c"), new TestObject("a", "b"), new TestObject("a", "a")); + $sort = ClosureExpressionVisitor::sortByField("bar", 1); + $sort = ClosureExpressionVisitor::sortByField("foo", 1, $sort); + + usort($objects, $sort); + + $this->assertEquals("a", $objects[0]->getBar()); + $this->assertEquals("b", $objects[1]->getBar()); + $this->assertEquals("c", $objects[2]->getBar()); + } + + public function testArrayComparison() + { + $closure = $this->visitor->walkComparison($this->builder->eq("foo", 42)); + + $this->assertTrue($closure(array('foo' => 42))); + } +} + +class TestObject +{ + private $foo; + private $bar; + private $baz; + private $qux; + + public function __construct($foo = null, $bar = null, $baz = null, $qux = null) + { + $this->foo = $foo; + $this->bar = $bar; + $this->baz = $baz; + $this->qux = $qux; + } + + public function __call($name, $arguments) + { + if ('getqux' === $name) { + return $this->qux; + } + } + + public function getFoo() + { + return $this->foo; + } + + public function getBar() + { + return $this->bar; + } + + public function isBaz() + { + return $this->baz; + } +} + diff --git a/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php b/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f3f91ad3f13cb3341c4d916a4cb247c3f23a6279 --- /dev/null +++ b/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php @@ -0,0 +1,265 @@ +collection = new ArrayCollection(); + } + + public function testIssetAndUnset() + { + $this->assertFalse(isset($this->collection[0])); + $this->collection->add('testing'); + $this->assertTrue(isset($this->collection[0])); + unset($this->collection[0]); + $this->assertFalse(isset($this->collection[0])); + } + + public function testToString() + { + $this->collection->add('testing'); + $this->assertTrue(is_string((string) $this->collection)); + } + + public function testRemovingNonExistentEntryReturnsNull() + { + $this->assertEquals(null, $this->collection->remove('testing_does_not_exist')); + } + + public function testExists() + { + $this->collection->add("one"); + $this->collection->add("two"); + $exists = $this->collection->exists(function($k, $e) { return $e == "one"; }); + $this->assertTrue($exists); + $exists = $this->collection->exists(function($k, $e) { return $e == "other"; }); + $this->assertFalse($exists); + } + + public function testMap() + { + $this->collection->add(1); + $this->collection->add(2); + $res = $this->collection->map(function($e) { return $e * 2; }); + $this->assertEquals(array(2, 4), $res->toArray()); + } + + public function testFilter() + { + $this->collection->add(1); + $this->collection->add("foo"); + $this->collection->add(3); + $res = $this->collection->filter(function($e) { return is_numeric($e); }); + $this->assertEquals(array(0 => 1, 2 => 3), $res->toArray()); + } + + public function testFirstAndLast() + { + $this->collection->add('one'); + $this->collection->add('two'); + + $this->assertEquals($this->collection->first(), 'one'); + $this->assertEquals($this->collection->last(), 'two'); + } + + public function testArrayAccess() + { + $this->collection[] = 'one'; + $this->collection[] = 'two'; + + $this->assertEquals($this->collection[0], 'one'); + $this->assertEquals($this->collection[1], 'two'); + + unset($this->collection[0]); + $this->assertEquals($this->collection->count(), 1); + } + + public function testContainsKey() + { + $this->collection[5] = 'five'; + $this->assertTrue($this->collection->containsKey(5)); + } + + public function testContains() + { + $this->collection[0] = 'test'; + $this->assertTrue($this->collection->contains('test')); + } + + public function testSearch() + { + $this->collection[0] = 'test'; + $this->assertEquals(0, $this->collection->indexOf('test')); + } + + public function testGet() + { + $this->collection[0] = 'test'; + $this->assertEquals('test', $this->collection->get(0)); + } + + public function testGetKeys() + { + $this->collection[] = 'one'; + $this->collection[] = 'two'; + $this->assertEquals(array(0, 1), $this->collection->getKeys()); + } + + public function testGetValues() + { + $this->collection[] = 'one'; + $this->collection[] = 'two'; + $this->assertEquals(array('one', 'two'), $this->collection->getValues()); + } + + public function testCount() + { + $this->collection[] = 'one'; + $this->collection[] = 'two'; + $this->assertEquals($this->collection->count(), 2); + $this->assertEquals(count($this->collection), 2); + } + + public function testForAll() + { + $this->collection[] = 'one'; + $this->collection[] = 'two'; + $this->assertEquals($this->collection->forAll(function($k, $e) { return is_string($e); }), true); + $this->assertEquals($this->collection->forAll(function($k, $e) { return is_array($e); }), false); + } + + public function testPartition() + { + $this->collection[] = true; + $this->collection[] = false; + $partition = $this->collection->partition(function($k, $e) { return $e == true; }); + $this->assertEquals($partition[0][0], true); + $this->assertEquals($partition[1][0], false); + } + + public function testClear() + { + $this->collection[] = 'one'; + $this->collection[] = 'two'; + $this->collection->clear(); + $this->assertEquals($this->collection->isEmpty(), true); + } + + public function testRemove() + { + $this->collection[] = 'one'; + $this->collection[] = 'two'; + $el = $this->collection->remove(0); + + $this->assertEquals('one', $el); + $this->assertEquals($this->collection->contains('one'), false); + $this->assertNull($this->collection->remove(0)); + } + + public function testRemoveElement() + { + $this->collection[] = 'one'; + $this->collection[] = 'two'; + + $this->assertTrue($this->collection->removeElement('two')); + $this->assertFalse($this->collection->contains('two')); + $this->assertFalse($this->collection->removeElement('two')); + } + + public function testSlice() + { + $this->collection[] = 'one'; + $this->collection[] = 'two'; + $this->collection[] = 'three'; + + $slice = $this->collection->slice(0, 1); + $this->assertInternalType('array', $slice); + $this->assertEquals(array('one'), $slice); + + $slice = $this->collection->slice(1); + $this->assertEquals(array(1 => 'two', 2 => 'three'), $slice); + + $slice = $this->collection->slice(1, 1); + $this->assertEquals(array(1 => 'two'), $slice); + } + + public function fillMatchingFixture() + { + $std1 = new \stdClass(); + $std1->foo = "bar"; + $this->collection[] = $std1; + + $std2 = new \stdClass(); + $std2->foo = "baz"; + $this->collection[] = $std2; + } + + /** + * @group DDC-1637 + */ + public function testMatching() + { + $this->fillMatchingFixture(); + + $col = $this->collection->matching(new Criteria(Criteria::expr()->eq("foo", "bar"))); + $this->assertInstanceOf('Doctrine\Common\Collections\Collection', $col); + $this->assertNotSame($col, $this->collection); + $this->assertEquals(1, count($col)); + } + + /** + * @group DDC-1637 + */ + public function testMatchingOrdering() + { + $this->fillMatchingFixture(); + + $col = $this->collection->matching(new Criteria(null, array('foo' => 'DESC'))); + + $this->assertInstanceOf('Doctrine\Common\Collections\Collection', $col); + $this->assertNotSame($col, $this->collection); + $this->assertEquals(2, count($col)); + $this->assertEquals('baz', $col->first()->foo); + $this->assertEquals('bar', $col->last()->foo); + } + + /** + * @group DDC-1637 + */ + public function testMatchingSlice() + { + $this->fillMatchingFixture(); + + $col = $this->collection->matching(new Criteria(null, null, 1, 1)); + + $this->assertInstanceOf('Doctrine\Common\Collections\Collection', $col); + $this->assertNotSame($col, $this->collection); + $this->assertEquals(1, count($col)); + $this->assertEquals('baz', $col[0]->foo); + } + + public function testCanRemoveNullValuesByKey() + { + $this->collection->add(null); + $this->collection->remove(0); + $this->assertTrue($this->collection->isEmpty()); + } + + public function testCanVerifyExistingKeysWithNullValues() + { + $this->collection->set('key', null); + $this->assertTrue($this->collection->containsKey('key')); + } +} diff --git a/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CriteriaTest.php b/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CriteriaTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1ab058a9b8c7ad82ac5c70ea3cbb28ec5376065c --- /dev/null +++ b/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CriteriaTest.php @@ -0,0 +1,83 @@ +assertInstanceOf('Doctrine\Common\Collections\Criteria', $criteria); + } + + public function testConstructor() + { + $expr = new Comparison("field", "=", "value"); + $criteria = new Criteria($expr, array("foo" => "ASC"), 10, 20); + + $this->assertSame($expr, $criteria->getWhereExpression()); + $this->assertEquals(array("foo" => "ASC"), $criteria->getOrderings()); + $this->assertEquals(10, $criteria->getFirstResult()); + $this->assertEquals(20, $criteria->getMaxResults()); + } + + public function testWhere() + { + $expr = new Comparison("field", "=", "value"); + $criteria = new Criteria(); + + $criteria->where($expr); + + $this->assertSame($expr, $criteria->getWhereExpression()); + } + + public function testAndWhere() + { + $expr = new Comparison("field", "=", "value"); + $criteria = new Criteria(); + + $criteria->where($expr); + $expr = $criteria->getWhereExpression(); + $criteria->andWhere($expr); + + $where = $criteria->getWhereExpression(); + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\CompositeExpression', $where); + + $this->assertEquals(CompositeExpression::TYPE_AND, $where->getType()); + $this->assertSame(array($expr, $expr), $where->getExpressionList()); + } + + public function testOrWhere() + { + $expr = new Comparison("field", "=", "value"); + $criteria = new Criteria(); + + $criteria->where($expr); + $expr = $criteria->getWhereExpression(); + $criteria->orWhere($expr); + + $where = $criteria->getWhereExpression(); + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\CompositeExpression', $where); + + $this->assertEquals(CompositeExpression::TYPE_OR, $where->getType()); + $this->assertSame(array($expr, $expr), $where->getExpressionList()); + } + + public function testOrderings() + { + $criteria = Criteria::create() + ->orderBy(array("foo" => "ASC")); + + $this->assertEquals(array("foo" => "ASC"), $criteria->getOrderings()); + } + + public function testExpr() + { + $this->assertInstanceOf('Doctrine\Common\Collections\ExpressionBuilder', Criteria::expr()); + } +} diff --git a/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ExpressionBuilderTest.php b/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ExpressionBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5f6b4ce2f01170e1ee5b4330259bccd1977863bf --- /dev/null +++ b/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ExpressionBuilderTest.php @@ -0,0 +1,125 @@ +builder = new ExpressionBuilder(); + } + + public function testAndX() + { + $expr = $this->builder->andX($this->builder->eq("a", "b")); + + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\CompositeExpression', $expr); + $this->assertEquals(CompositeExpression::TYPE_AND, $expr->getType()); + } + + public function testOrX() + { + $expr = $this->builder->orX($this->builder->eq("a", "b")); + + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\CompositeExpression', $expr); + $this->assertEquals(CompositeExpression::TYPE_OR, $expr->getType()); + } + + public function testInvalidAndXArgument() + { + $this->setExpectedException("RuntimeException"); + $this->builder->andX("foo"); + } + + public function testEq() + { + $expr = $this->builder->eq("a", "b"); + + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\Comparison', $expr); + $this->assertEquals(Comparison::EQ, $expr->getOperator()); + } + + public function testNeq() + { + $expr = $this->builder->neq("a", "b"); + + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\Comparison', $expr); + $this->assertEquals(Comparison::NEQ, $expr->getOperator()); + } + + public function testLt() + { + $expr = $this->builder->lt("a", "b"); + + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\Comparison', $expr); + $this->assertEquals(Comparison::LT, $expr->getOperator()); + } + + public function testGt() + { + $expr = $this->builder->gt("a", "b"); + + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\Comparison', $expr); + $this->assertEquals(Comparison::GT, $expr->getOperator()); + } + + public function testGte() + { + $expr = $this->builder->gte("a", "b"); + + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\Comparison', $expr); + $this->assertEquals(Comparison::GTE, $expr->getOperator()); + } + + public function testLte() + { + $expr = $this->builder->lte("a", "b"); + + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\Comparison', $expr); + $this->assertEquals(Comparison::LTE, $expr->getOperator()); + } + + public function testIn() + { + $expr = $this->builder->in("a", array("b")); + + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\Comparison', $expr); + $this->assertEquals(Comparison::IN, $expr->getOperator()); + } + + public function testNotIn() + { + $expr = $this->builder->notIn("a", array("b")); + + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\Comparison', $expr); + $this->assertEquals(Comparison::NIN, $expr->getOperator()); + } + + public function testIsNull() + { + $expr = $this->builder->isNull("a"); + + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\Comparison', $expr); + $this->assertEquals(Comparison::EQ, $expr->getOperator()); + } + + public function testContains() + { + $expr = $this->builder->contains("a", "b"); + + $this->assertInstanceOf('Doctrine\Common\Collections\Expr\Comparison', $expr); + $this->assertEquals(Comparison::CONTAINS, $expr->getOperator()); + } +} diff --git a/vendor/doctrine/collections/tests/Doctrine/Tests/LazyArrayCollection.php b/vendor/doctrine/collections/tests/Doctrine/Tests/LazyArrayCollection.php new file mode 100644 index 0000000000000000000000000000000000000000..56736b83b207860c27f10755c0a016fd8aace7cc --- /dev/null +++ b/vendor/doctrine/collections/tests/Doctrine/Tests/LazyArrayCollection.php @@ -0,0 +1,22 @@ +collection = new ArrayCollection(array('a', 'b', 'c')); + } +} diff --git a/vendor/doctrine/collections/tests/Doctrine/Tests/TestInit.php b/vendor/doctrine/collections/tests/Doctrine/Tests/TestInit.php new file mode 100644 index 0000000000000000000000000000000000000000..973b5fef64f21ea904ba0f61153bcac798e8a2d3 --- /dev/null +++ b/vendor/doctrine/collections/tests/Doctrine/Tests/TestInit.php @@ -0,0 +1,21 @@ +setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\'); + // new code necessary starting here + $reader->setIgnoreNotImportedAnnotations(true); + $reader->setEnableParsePhpImports(false); + $reader = new \Doctrine\Common\Annotations\CachedReader( + new \Doctrine\Common\Annotations\IndexedReader($reader), new ArrayCache() + ); + +## Annotation Base class or @Annotation + +Beginning after 2.1-RC2 you have to either extend ``Doctrine\Common\Annotations\Annotation`` or add @Annotation to your annotations class-level docblock, otherwise the class will simply be ignored. + +## Removed methods on AnnotationReader + +* AnnotationReader::setAutoloadAnnotations() +* AnnotationReader::getAutoloadAnnotations() +* AnnotationReader::isAutoloadAnnotations() + +## AnnotationRegistry + +Autoloading through the PHP autoloader is removed from the 2.1 AnnotationReader. Instead you have to use the global AnnotationRegistry for loading purposes: + + \Doctrine\Common\Annotations\AnnotationRegistry::registerFile($fileWithAnnotations); + \Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace($namespace, $dirs = null); + \Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespaces($namespaces); + \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader($callable); + +The $callable for registering a loader accepts a class as first and only parameter and must try to silently autoload it. On success true has to be returned. +The registerAutoloadNamespace function registers a PSR-0 compatible silent autoloader for all classes with the given namespace in the given directories. +If null is passed as directory the include path will be used. + diff --git a/vendor/doctrine/common/UPGRADE_TO_2_2 b/vendor/doctrine/common/UPGRADE_TO_2_2 new file mode 100644 index 0000000000000000000000000000000000000000..1d93a131ed192a113c8b7436210bd1c02794486b --- /dev/null +++ b/vendor/doctrine/common/UPGRADE_TO_2_2 @@ -0,0 +1,61 @@ +This document details all the possible changes that you should investigate when +updating your project from Doctrine Common 2.1 to 2.2: + +## Annotation Changes + +- AnnotationReader::setIgnoreNotImportedAnnotations has been removed, you need to + add ignore annotation names which are supposed to be ignored via + AnnotationReader::addGlobalIgnoredName + +- AnnotationReader::setAutoloadAnnotations was deprecated by the AnnotationRegistry + in 2.1 and has been removed in 2.2 + +- AnnotationReader::setEnableParsePhpImports was added to ease transition to the new + annotation mechanism in 2.1 and is removed in 2.2 + +- AnnotationReader::isParsePhpImportsEnabled is removed (see above) + +- AnnotationReader::setDefaultAnnotationNamespace was deprecated in favor of explicit + configuration in 2.1 and will be removed in 2.2 (for isolated projects where you + have full-control over _all_ available annotations, we offer a dedicated reader + class ``SimpleAnnotationReader``) + +- AnnotationReader::setAnnotationCreationFunction was deprecated in 2.1 and will be + removed in 2.2. We only offer two creation mechanisms which cannot be changed + anymore to allow the same reader instance to work with all annotations regardless + of which library they are coming from. + +- AnnotationReader::setAnnotationNamespaceAlias was deprecated in 2.1 and will be + removed in 2.2 (see setDefaultAnnotationNamespace) + +- If you use a class as annotation which has not the @Annotation marker in it's + class block, we will now throw an exception instead of silently ignoring it. You + can however still achieve the previous behavior using the @IgnoreAnnotation, or + AnnotationReader::addGlobalIgnoredName (the exception message will contain detailed + instructions when you run into this problem). + +## Cache Changes + +- Renamed old AbstractCache to CacheProvider + +- Dropped the support to the following functions of all cache providers: + + - CacheProvider::deleteByWildcard + + - CacheProvider::deleteByRegEx + + - CacheProvider::deleteByPrefix + + - CacheProvider::deleteBySuffix + +- CacheProvider::deleteAll will not remove ALL entries, it will only mark them as invalid + +- CacheProvider::flushAll will remove ALL entries, namespaced or not + +- Added support to MemcachedCache + +- Added support to WincacheCache + +## ClassLoader Changes + +- ClassLoader::fileExistsInIncludePath() no longer exists. Use the native stream_resolve_include_path() PHP function \ No newline at end of file diff --git a/vendor/doctrine/common/composer.json b/vendor/doctrine/common/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..a12495ab1d30a1fbc6d8b9f42d48675af359e138 --- /dev/null +++ b/vendor/doctrine/common/composer.json @@ -0,0 +1,36 @@ +{ + "name": "doctrine/common", + "type": "library", + "description": "Common Library for Doctrine projects", + "keywords": ["collections", "spl", "eventmanager", "annotations", "persistence"], + "homepage": "http://www.doctrine-project.org", + "license": "MIT", + "authors": [ + {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, + {"name": "Roman Borschel", "email": "roman@code-factory.org"}, + {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, + {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, + {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} + ], + "require": { + "php": "~5.5|~7.0", + "doctrine/inflector": "1.*", + "doctrine/cache": "1.*", + "doctrine/collections": "1.*", + "doctrine/lexer": "1.*", + "doctrine/annotations": "1.*" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0" + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "extra": { + "branch-alias": { + "dev-master": "2.7.x-dev" + } + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php b/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..78eeb35d3a40dc49e2cbdf5cb97b523374dbbe68 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php @@ -0,0 +1,280 @@ +. + */ + +namespace Doctrine\Common; + +/** + * A ClassLoader is an autoloader for class files that can be + * installed on the SPL autoload stack. It is a class loader that either loads only classes + * of a specific namespace or all namespaces and it is suitable for working together + * with other autoloaders in the SPL autoload stack. + * + * If no include path is configured through the constructor or {@link setIncludePath}, a ClassLoader + * relies on the PHP include_path. + * + * @author Roman Borschel + * @since 2.0 + * + * @deprecated the ClassLoader is deprecated and will be removed in version 3.0 of doctrine/common. + */ +class ClassLoader +{ + /** + * PHP file extension. + * + * @var string + */ + protected $fileExtension = '.php'; + + /** + * Current namespace. + * + * @var string|null + */ + protected $namespace; + + /** + * Current include path. + * + * @var string|null + */ + protected $includePath; + + /** + * PHP namespace separator. + * + * @var string + */ + protected $namespaceSeparator = '\\'; + + /** + * Creates a new ClassLoader that loads classes of the + * specified namespace from the specified include path. + * + * If no include path is given, the ClassLoader relies on the PHP include_path. + * If neither a namespace nor an include path is given, the ClassLoader will + * be responsible for loading all classes, thereby relying on the PHP include_path. + * + * @param string|null $ns The namespace of the classes to load. + * @param string|null $includePath The base include path to use. + */ + public function __construct($ns = null, $includePath = null) + { + $this->namespace = $ns; + $this->includePath = $includePath; + } + + /** + * Sets the namespace separator used by classes in the namespace of this ClassLoader. + * + * @param string $sep The separator to use. + * + * @return void + */ + public function setNamespaceSeparator($sep) + { + $this->namespaceSeparator = $sep; + } + + /** + * Gets the namespace separator used by classes in the namespace of this ClassLoader. + * + * @return string + */ + public function getNamespaceSeparator() + { + return $this->namespaceSeparator; + } + + /** + * Sets the base include path for all class files in the namespace of this ClassLoader. + * + * @param string|null $includePath + * + * @return void + */ + public function setIncludePath($includePath) + { + $this->includePath = $includePath; + } + + /** + * Gets the base include path for all class files in the namespace of this ClassLoader. + * + * @return string|null + */ + public function getIncludePath() + { + return $this->includePath; + } + + /** + * Sets the file extension of class files in the namespace of this ClassLoader. + * + * @param string $fileExtension + * + * @return void + */ + public function setFileExtension($fileExtension) + { + $this->fileExtension = $fileExtension; + } + + /** + * Gets the file extension of class files in the namespace of this ClassLoader. + * + * @return string + */ + public function getFileExtension() + { + return $this->fileExtension; + } + + /** + * Registers this ClassLoader on the SPL autoload stack. + * + * @return void + */ + public function register() + { + spl_autoload_register([$this, 'loadClass']); + } + + /** + * Removes this ClassLoader from the SPL autoload stack. + * + * @return void + */ + public function unregister() + { + spl_autoload_unregister([$this, 'loadClass']); + } + + /** + * Loads the given class or interface. + * + * @param string $className The name of the class to load. + * + * @return boolean TRUE if the class has been successfully loaded, FALSE otherwise. + */ + public function loadClass($className) + { + if (self::typeExists($className)) { + return true; + } + + if (! $this->canLoadClass($className)) { + return false; + } + + require ($this->includePath !== null ? $this->includePath . DIRECTORY_SEPARATOR : '') + . str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) + . $this->fileExtension; + + return self::typeExists($className); + } + + /** + * Asks this ClassLoader whether it can potentially load the class (file) with + * the given name. + * + * @param string $className The fully-qualified name of the class. + * + * @return boolean TRUE if this ClassLoader can load the class, FALSE otherwise. + */ + public function canLoadClass($className) + { + if ($this->namespace !== null && strpos($className, $this->namespace.$this->namespaceSeparator) !== 0) { + return false; + } + + $file = str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) . $this->fileExtension; + + if ($this->includePath !== null) { + return is_file($this->includePath . DIRECTORY_SEPARATOR . $file); + } + + return (false !== stream_resolve_include_path($file)); + } + + /** + * Checks whether a class with a given name exists. A class "exists" if it is either + * already defined in the current request or if there is an autoloader on the SPL + * autoload stack that is a) responsible for the class in question and b) is able to + * load a class file in which the class definition resides. + * + * If the class is not already defined, each autoloader in the SPL autoload stack + * is asked whether it is able to tell if the class exists. If the autoloader is + * a ClassLoader, {@link canLoadClass} is used, otherwise the autoload + * function of the autoloader is invoked and expected to return a value that + * evaluates to TRUE if the class (file) exists. As soon as one autoloader reports + * that the class exists, TRUE is returned. + * + * Note that, depending on what kinds of autoloaders are installed on the SPL + * autoload stack, the class (file) might already be loaded as a result of checking + * for its existence. This is not the case with a ClassLoader, who separates + * these responsibilities. + * + * @param string $className The fully-qualified name of the class. + * + * @return boolean TRUE if the class exists as per the definition given above, FALSE otherwise. + */ + public static function classExists($className) + { + return self::typeExists($className, true); + } + + /** + * Gets the ClassLoader from the SPL autoload stack that is responsible + * for (and is able to load) the class with the given name. + * + * @param string $className The name of the class. + * + * @return ClassLoader The ClassLoader for the class or NULL if no such ClassLoader exists. + */ + public static function getClassLoader($className) + { + foreach (spl_autoload_functions() as $loader) { + if (is_array($loader) + && ($classLoader = reset($loader)) + && $classLoader instanceof ClassLoader + && $classLoader->canLoadClass($className) + ) { + return $classLoader; + } + } + + return null; + } + + /** + * Checks whether a given type exists + * + * @param string $type + * @param bool $autoload + * + * @return bool + */ + private static function typeExists($type, $autoload = false) + { + return class_exists($type, $autoload) + || interface_exists($type, $autoload) + || trait_exists($type, $autoload); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php b/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php new file mode 100644 index 0000000000000000000000000000000000000000..2a1a08e7ef588b9fbc3a65c1b1b5569d0a421d71 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php @@ -0,0 +1,29 @@ +. + */ + +namespace Doctrine\Common; + +/** + * Base exception class for package Doctrine\Common. + * + * @author heinrich + */ +class CommonException extends \Exception +{ +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Comparable.php b/vendor/doctrine/common/lib/Doctrine/Common/Comparable.php new file mode 100644 index 0000000000000000000000000000000000000000..8cd02c9f2936d3f2a40734eefdde760cec7bdb1e --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Comparable.php @@ -0,0 +1,46 @@ +. + */ + +namespace Doctrine\Common; + +/** + * Comparable interface that allows to compare two value objects to each other for similarity. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + */ +interface Comparable +{ + /** + * Compares the current object to the passed $other. + * + * Returns 0 if they are semantically equal, 1 if the other object + * is less than the current one, or -1 if its more than the current one. + * + * This method should not check for identity using ===, only for semantical equality for example + * when two different DateTime instances point to the exact same Date + TZ. + * + * @param mixed $other + * + * @return int + */ + public function compareTo($other); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/EventArgs.php b/vendor/doctrine/common/lib/Doctrine/Common/EventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..75506e6acff591beb8feea3f620b33784d8290e6 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/EventArgs.php @@ -0,0 +1,67 @@ +. + */ + +namespace Doctrine\Common; + +/** + * EventArgs 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. The single empty EventArgs + * instance can be obtained through {@link getEmptyInstance}. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class EventArgs +{ + /** + * Single instance of EventArgs. + * + * @var EventArgs + */ + private static $_emptyEventArgsInstance; + + /** + * Gets the single, empty and immutable EventArgs instance. + * + * This instance will be used when events are dispatched without any parameter, + * like this: EventManager::dispatchEvent('eventname'); + * + * The benefit from this is that only one empty instance is instantiated and shared + * (otherwise there would be instances for every dispatched in the abovementioned form). + * + * @see EventManager::dispatchEvent + * + * @link http://msdn.microsoft.com/en-us/library/system.eventargs.aspx + * + * @return EventArgs + */ + public static function getEmptyInstance() + { + if ( ! self::$_emptyEventArgsInstance) { + self::$_emptyEventArgsInstance = new EventArgs; + } + + return self::$_emptyEventArgsInstance; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php b/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php new file mode 100644 index 0000000000000000000000000000000000000000..0ee04a15a46e65cbf054c92f1b07232dc8a3c96d --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php @@ -0,0 +1,154 @@ +. + */ + +namespace Doctrine\Common; + +/** + * The EventManager is the central point of Doctrine's event listener system. + * Listeners are registered on the manager and events are dispatched through the + * manager. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class EventManager +{ + /** + * Map of registered listeners. + * => + * + * @var array + */ + private $_listeners = []; + + /** + * Dispatches an event to all registered listeners. + * + * @param string $eventName The name of the event to dispatch. The name of the event is + * the name of the method that is invoked on listeners. + * @param EventArgs|null $eventArgs The event arguments to pass to the event handlers/listeners. + * If not supplied, the single empty EventArgs instance is used. + * + * @return boolean + */ + public function dispatchEvent($eventName, EventArgs $eventArgs = null) + { + if (isset($this->_listeners[$eventName])) { + $eventArgs = $eventArgs === null ? EventArgs::getEmptyInstance() : $eventArgs; + + foreach ($this->_listeners[$eventName] as $listener) { + $listener->$eventName($eventArgs); + } + } + } + + /** + * Gets the listeners of a specific event or all listeners. + * + * @param string|null $event The name of the event. + * + * @return array The event listeners for the specified event, or all event listeners. + */ + public function getListeners($event = null) + { + return $event ? $this->_listeners[$event] : $this->_listeners; + } + + /** + * Checks whether an event has any registered listeners. + * + * @param string $event + * + * @return boolean TRUE if the specified event has any listeners, FALSE otherwise. + */ + public function hasListeners($event) + { + return isset($this->_listeners[$event]) && $this->_listeners[$event]; + } + + /** + * Adds an event listener that listens on the specified events. + * + * @param string|array $events The event(s) to listen on. + * @param object $listener The listener object. + * + * @return void + */ + public function addEventListener($events, $listener) + { + // Picks the hash code related to that listener + $hash = spl_object_hash($listener); + + foreach ((array) $events as $event) { + // Overrides listener if a previous one was associated already + // Prevents duplicate listeners on same event (same instance only) + $this->_listeners[$event][$hash] = $listener; + } + } + + /** + * Removes an event listener from the specified events. + * + * @param string|array $events + * @param object $listener + * + * @return void + */ + public function removeEventListener($events, $listener) + { + // Picks the hash code related to that listener + $hash = spl_object_hash($listener); + + foreach ((array) $events as $event) { + // Check if actually have this listener associated + if (isset($this->_listeners[$event][$hash])) { + unset($this->_listeners[$event][$hash]); + } + } + } + + /** + * Adds an EventSubscriber. The subscriber is asked for all the events it is + * interested in and added as a listener for these events. + * + * @param \Doctrine\Common\EventSubscriber $subscriber The subscriber. + * + * @return void + */ + public function addEventSubscriber(EventSubscriber $subscriber) + { + $this->addEventListener($subscriber->getSubscribedEvents(), $subscriber); + } + + /** + * Removes an EventSubscriber. The subscriber is asked for all the events it is + * interested in and removed as a listener for these events. + * + * @param \Doctrine\Common\EventSubscriber $subscriber The subscriber. + * + * @return void + */ + public function removeEventSubscriber(EventSubscriber $subscriber) + { + $this->removeEventListener($subscriber->getSubscribedEvents(), $subscriber); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/EventSubscriber.php b/vendor/doctrine/common/lib/Doctrine/Common/EventSubscriber.php new file mode 100644 index 0000000000000000000000000000000000000000..55d0f7d0ef393c90d63c7100be9704dd2374ac69 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/EventSubscriber.php @@ -0,0 +1,42 @@ +. + */ + +namespace Doctrine\Common; + +/** + * An EventSubscriber knows himself what events he is interested in. + * If an EventSubscriber is added to an EventManager, the manager invokes + * {@link getSubscribedEvents} and registers the subscriber as a listener for all + * returned events. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +interface EventSubscriber +{ + /** + * Returns an array of events this subscriber wants to listen to. + * + * @return array + */ + public function getSubscribedEvents(); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php b/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php new file mode 100644 index 0000000000000000000000000000000000000000..0aa07f85641420b6b4c05e32baf84dd7175901b8 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\Common; + +use Doctrine\Common\Lexer\AbstractLexer; + +/** + * Base class for writing simple lexers, i.e. for creating small DSLs. + * + * Lexer moved into its own Component Doctrine\Common\Lexer. This class + * only stays for being BC. + * + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +abstract class Lexer extends AbstractLexer +{ +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/NotifyPropertyChanged.php b/vendor/doctrine/common/lib/Doctrine/Common/NotifyPropertyChanged.php new file mode 100644 index 0000000000000000000000000000000000000000..e25e99970813bd6e86306a462091ff4df5234501 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/NotifyPropertyChanged.php @@ -0,0 +1,42 @@ +. + */ + +namespace Doctrine\Common; + +/** + * Contract for classes that provide the service of notifying listeners of + * changes to their properties. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +interface NotifyPropertyChanged +{ + /** + * Adds a listener that wants to be notified about property changes. + * + * @param PropertyChangedListener $listener + * + * @return void + */ + public function addPropertyChangedListener(PropertyChangedListener $listener); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php new file mode 100644 index 0000000000000000000000000000000000000000..6da5422366fffa65403859c49af6470debd99dbb --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php @@ -0,0 +1,264 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +/** + * Abstract implementation of the ManagerRegistry contract. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Fabien Potencier + * @author Benjamin Eberlei + * @author Lukas Kahwe Smith + */ +abstract class AbstractManagerRegistry implements ManagerRegistry +{ + /** + * @var string + */ + private $name; + + /** + * @var array + */ + private $connections; + + /** + * @var array + */ + private $managers; + + /** + * @var string + */ + private $defaultConnection; + + /** + * @var string + */ + private $defaultManager; + + /** + * @var string + */ + private $proxyInterfaceName; + + /** + * Constructor. + * + * @param string $name + * @param array $connections + * @param array $managers + * @param string $defaultConnection + * @param string $defaultManager + * @param string $proxyInterfaceName + */ + public function __construct($name, array $connections, array $managers, $defaultConnection, $defaultManager, $proxyInterfaceName) + { + $this->name = $name; + $this->connections = $connections; + $this->managers = $managers; + $this->defaultConnection = $defaultConnection; + $this->defaultManager = $defaultManager; + $this->proxyInterfaceName = $proxyInterfaceName; + } + + /** + * Fetches/creates the given services. + * + * A service in this context is connection or a manager instance. + * + * @param string $name The name of the service. + * + * @return object The instance of the given service. + */ + abstract protected function getService($name); + + /** + * Resets the given services. + * + * A service in this context is connection or a manager instance. + * + * @param string $name The name of the service. + * + * @return void + */ + abstract protected function resetService($name); + + /** + * Gets the name of the registry. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * {@inheritdoc} + */ + public function getConnection($name = null) + { + if (null === $name) { + $name = $this->defaultConnection; + } + + if (!isset($this->connections[$name])) { + throw new \InvalidArgumentException(sprintf('Doctrine %s Connection named "%s" does not exist.', $this->name, $name)); + } + + return $this->getService($this->connections[$name]); + } + + /** + * {@inheritdoc} + */ + public function getConnectionNames() + { + return $this->connections; + } + + /** + * {@inheritdoc} + */ + public function getConnections() + { + $connections = []; + foreach ($this->connections as $name => $id) { + $connections[$name] = $this->getService($id); + } + + return $connections; + } + + /** + * {@inheritdoc} + */ + public function getDefaultConnectionName() + { + return $this->defaultConnection; + } + + /** + * {@inheritdoc} + */ + public function getDefaultManagerName() + { + return $this->defaultManager; + } + + /** + * {@inheritdoc} + * + * @throws \InvalidArgumentException + */ + public function getManager($name = null) + { + if (null === $name) { + $name = $this->defaultManager; + } + + if (!isset($this->managers[$name])) { + throw new \InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); + } + + return $this->getService($this->managers[$name]); + } + + /** + * {@inheritdoc} + */ + public function getManagerForClass($class) + { + // Check for namespace alias + if (strpos($class, ':') !== false) { + list($namespaceAlias, $simpleClassName) = explode(':', $class, 2); + $class = $this->getAliasNamespace($namespaceAlias) . '\\' . $simpleClassName; + } + + $proxyClass = new \ReflectionClass($class); + + if ($proxyClass->implementsInterface($this->proxyInterfaceName)) { + if (! $parentClass = $proxyClass->getParentClass()) { + return null; + } + + $class = $parentClass->getName(); + } + + foreach ($this->managers as $id) { + $manager = $this->getService($id); + + if (!$manager->getMetadataFactory()->isTransient($class)) { + return $manager; + } + } + } + + /** + * {@inheritdoc} + */ + public function getManagerNames() + { + return $this->managers; + } + + /** + * {@inheritdoc} + */ + public function getManagers() + { + $dms = []; + foreach ($this->managers as $name => $id) { + $dms[$name] = $this->getService($id); + } + + return $dms; + } + + /** + * {@inheritdoc} + */ + public function getRepository($persistentObjectName, $persistentManagerName = null) + { + return $this->getManager($persistentManagerName)->getRepository($persistentObjectName); + } + + /** + * {@inheritdoc} + */ + public function resetManager($name = null) + { + if (null === $name) { + $name = $this->defaultManager; + } + + if (!isset($this->managers[$name])) { + throw new \InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); + } + + // force the creation of a new document manager + // if the current one is closed + $this->resetService($this->managers[$name]); + + return $this->getManager($name); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistry.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistry.php new file mode 100644 index 0000000000000000000000000000000000000000..7c25e98aad050be5bd446bdacbeab57bcbb82c89 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistry.php @@ -0,0 +1,62 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +/** + * Contract covering connection for a Doctrine persistence layer ManagerRegistry class to implement. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Fabien Potencier + * @author Benjamin Eberlei + * @author Lukas Kahwe Smith + */ +interface ConnectionRegistry +{ + /** + * Gets the default connection name. + * + * @return string The default connection name. + */ + public function getDefaultConnectionName(); + + /** + * Gets the named connection. + * + * @param string $name The connection name (null for the default one). + * + * @return object + */ + public function getConnection($name = null); + + /** + * Gets an array of all registered connections. + * + * @return array An array of Connection instances. + */ + public function getConnections(); + + /** + * Gets all connection names. + * + * @return array An array of connection names. + */ + public function getConnectionNames(); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..52f41c0e7518ea207059afa93b45bcfff99c360a --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php @@ -0,0 +1,89 @@ +. + */ + +namespace Doctrine\Common\Persistence\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\Common\Persistence\ObjectManager; + +/** + * Lifecycle Events are triggered by the UnitOfWork during lifecycle transitions + * of entities. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class LifecycleEventArgs extends EventArgs +{ + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * @var object + */ + private $object; + + /** + * Constructor. + * + * @param object $object + * @param ObjectManager $objectManager + */ + public function __construct($object, ObjectManager $objectManager) + { + $this->object = $object; + $this->objectManager = $objectManager; + } + + /** + * Retrieves the associated entity. + * + * @deprecated + * + * @return object + */ + public function getEntity() + { + return $this->object; + } + + /** + * Retrieves the associated object. + * + * @return object + */ + public function getObject() + { + return $this->object; + } + + /** + * Retrieves the associated ObjectManager. + * + * @return ObjectManager + */ + public function getObjectManager() + { + return $this->objectManager; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..3d8abbe23837748585771587255b25d63de9b666 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php @@ -0,0 +1,75 @@ +. + */ + +namespace Doctrine\Common\Persistence\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Persistence\ObjectManager; + +/** + * Class that holds event arguments for a loadMetadata event. + * + * @author Jonathan H. Wage + * @since 2.2 + */ +class LoadClassMetadataEventArgs extends EventArgs +{ + /** + * @var ClassMetadata + */ + private $classMetadata; + + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * Constructor. + * + * @param ClassMetadata $classMetadata + * @param ObjectManager $objectManager + */ + public function __construct(ClassMetadata $classMetadata, ObjectManager $objectManager) + { + $this->classMetadata = $classMetadata; + $this->objectManager = $objectManager; + } + + /** + * Retrieves the associated ClassMetadata. + * + * @return ClassMetadata + */ + public function getClassMetadata() + { + return $this->classMetadata; + } + + /** + * Retrieves the associated ObjectManager. + * + * @return ObjectManager + */ + public function getObjectManager() + { + return $this->objectManager; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..5527d4d47b8749d25b14d038fffad17ae40b66c8 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php @@ -0,0 +1,59 @@ +. + */ + +namespace Doctrine\Common\Persistence\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\Common\Persistence\ObjectManager; + +/** + * Provides event arguments for the preFlush event. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class ManagerEventArgs extends EventArgs +{ + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * Constructor. + * + * @param ObjectManager $objectManager + */ + public function __construct(ObjectManager $objectManager) + { + $this->objectManager = $objectManager; + } + + /** + * Retrieves the associated ObjectManager. + * + * @return ObjectManager + */ + public function getObjectManager() + { + return $this->objectManager; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..b78bad99207ae2b8713efbb106f28cb1f2ae1cbf --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php @@ -0,0 +1,86 @@ +. + */ + +namespace Doctrine\Common\Persistence\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\Common\Persistence\ObjectManager; + +/** + * Provides event arguments for the onClear event. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class OnClearEventArgs extends EventArgs +{ + /** + * @var \Doctrine\Common\Persistence\ObjectManager + */ + private $objectManager; + + /** + * @var string|null + */ + private $entityClass; + + /** + * Constructor. + * + * @param ObjectManager $objectManager The object manager. + * @param string|null $entityClass The optional entity class. + */ + public function __construct($objectManager, $entityClass = null) + { + $this->objectManager = $objectManager; + $this->entityClass = $entityClass; + } + + /** + * Retrieves the associated ObjectManager. + * + * @return \Doctrine\Common\Persistence\ObjectManager + */ + public function getObjectManager() + { + return $this->objectManager; + } + + /** + * Returns the name of the entity class that is cleared, or null if all are cleared. + * + * @return string|null + */ + public function getEntityClass() + { + return $this->entityClass; + } + + /** + * Returns whether this event clears all entities. + * + * @return bool + */ + public function clearsAllEntities() + { + return ($this->entityClass === null); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..facce64710d59aafc21d0c89ccd86a3ba277a27b --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php @@ -0,0 +1,137 @@ +. + */ + +namespace Doctrine\Common\Persistence\Event; + +use Doctrine\Common\Persistence\ObjectManager; + +/** + * Class that holds event arguments for a preUpdate event. + * + * @author Guilherme Blanco + * @author Roman Borschel + * @author Benjamin Eberlei + * @since 2.2 + */ +class PreUpdateEventArgs extends LifecycleEventArgs +{ + /** + * @var array + */ + private $entityChangeSet; + + /** + * Constructor. + * + * @param object $entity + * @param ObjectManager $objectManager + * @param array $changeSet + */ + public function __construct($entity, ObjectManager $objectManager, array &$changeSet) + { + parent::__construct($entity, $objectManager); + + $this->entityChangeSet = &$changeSet; + } + + /** + * Retrieves the entity changeset. + * + * @return array + */ + public function getEntityChangeSet() + { + return $this->entityChangeSet; + } + + /** + * Checks if field has a changeset. + * + * @param string $field + * + * @return boolean + */ + public function hasChangedField($field) + { + return isset($this->entityChangeSet[$field]); + } + + /** + * Gets the old value of the changeset of the changed field. + * + * @param string $field + * + * @return mixed + */ + public function getOldValue($field) + { + $this->assertValidField($field); + + return $this->entityChangeSet[$field][0]; + } + + /** + * Gets the new value of the changeset of the changed field. + * + * @param string $field + * + * @return mixed + */ + public function getNewValue($field) + { + $this->assertValidField($field); + + return $this->entityChangeSet[$field][1]; + } + + /** + * Sets the new value of this field. + * + * @param string $field + * @param mixed $value + * + * @return void + */ + public function setNewValue($field, $value) + { + $this->assertValidField($field); + + $this->entityChangeSet[$field][1] = $value; + } + + /** + * Asserts the field exists in changeset. + * + * @param string $field + * + * @return void + * + * @throws \InvalidArgumentException + */ + private function assertValidField($field) + { + if ( ! isset($this->entityChangeSet[$field])) { + throw new \InvalidArgumentException(sprintf( + 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.', + $field, + get_class($this->getEntity()) + )); + } + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ManagerRegistry.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ManagerRegistry.php new file mode 100644 index 0000000000000000000000000000000000000000..fce854b62c9a6f697fe4bf4449b70378ec3a3c3a --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ManagerRegistry.php @@ -0,0 +1,111 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +/** + * Contract covering object managers for a Doctrine persistence layer ManagerRegistry class to implement. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Fabien Potencier + * @author Benjamin Eberlei + * @author Lukas Kahwe Smith + */ +interface ManagerRegistry extends ConnectionRegistry +{ + /** + * Gets the default object manager name. + * + * @return string The default object manager name. + */ + public function getDefaultManagerName(); + + /** + * Gets a named object manager. + * + * @param string $name The object manager name (null for the default one). + * + * @return \Doctrine\Common\Persistence\ObjectManager + */ + public function getManager($name = null); + + /** + * Gets an array of all registered object managers. + * + * @return \Doctrine\Common\Persistence\ObjectManager[] An array of ObjectManager instances + */ + public function getManagers(); + + /** + * Resets a named object manager. + * + * This method is useful when an object manager has been closed + * because of a rollbacked transaction AND when you think that + * it makes sense to get a new one to replace the closed one. + * + * Be warned that you will get a brand new object manager as + * the existing one is not useable anymore. This means that any + * other object with a dependency on this object manager will + * hold an obsolete reference. You can inject the registry instead + * to avoid this problem. + * + * @param string|null $name The object manager name (null for the default one). + * + * @return \Doctrine\Common\Persistence\ObjectManager + */ + public function resetManager($name = null); + + /** + * Resolves a registered namespace alias to the full namespace. + * + * This method looks for the alias in all registered object managers. + * + * @param string $alias The alias. + * + * @return string The full namespace. + */ + public function getAliasNamespace($alias); + + /** + * Gets all connection names. + * + * @return array An array of connection names. + */ + public function getManagerNames(); + + /** + * Gets the ObjectRepository for an persistent object. + * + * @param string $persistentObject The name of the persistent object. + * @param string $persistentManagerName The object manager name (null for the default one). + * + * @return \Doctrine\Common\Persistence\ObjectRepository + */ + public function getRepository($persistentObject, $persistentManagerName = null); + + /** + * Gets the object manager associated with a given class. + * + * @param string $class A persistent object class name. + * + * @return \Doctrine\Common\Persistence\ObjectManager|null + */ + public function getManagerForClass($class); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..cba424b0663ea4f1a43f2f517f1240789f5cf99a --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php @@ -0,0 +1,429 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping; + +use Doctrine\Common\Cache\Cache; +use Doctrine\Common\Util\ClassUtils; +use ReflectionException; + +/** + * The ClassMetadataFactory is used to create ClassMetadata objects that contain all the + * metadata mapping informations of a class which describes how a class should be mapped + * to a relational database. + * + * This class was abstracted from the ORM ClassMetadataFactory. + * + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +abstract class AbstractClassMetadataFactory implements ClassMetadataFactory +{ + /** + * Salt used by specific Object Manager implementation. + * + * @var string + */ + protected $cacheSalt = '$CLASSMETADATA'; + + /** + * @var \Doctrine\Common\Cache\Cache|null + */ + private $cacheDriver; + + /** + * @var ClassMetadata[] + */ + private $loadedMetadata = []; + + /** + * @var bool + */ + protected $initialized = false; + + /** + * @var ReflectionService|null + */ + private $reflectionService = null; + + /** + * Sets the cache driver used by the factory to cache ClassMetadata instances. + * + * @param \Doctrine\Common\Cache\Cache $cacheDriver + * + * @return void + */ + public function setCacheDriver(Cache $cacheDriver = null) + { + $this->cacheDriver = $cacheDriver; + } + + /** + * Gets the cache driver used by the factory to cache ClassMetadata instances. + * + * @return \Doctrine\Common\Cache\Cache|null + */ + public function getCacheDriver() + { + return $this->cacheDriver; + } + + /** + * Returns an array of all the loaded metadata currently in memory. + * + * @return ClassMetadata[] + */ + public function getLoadedMetadata() + { + return $this->loadedMetadata; + } + + /** + * Forces the factory to load the metadata of all classes known to the underlying + * mapping driver. + * + * @return array The ClassMetadata instances of all mapped classes. + */ + public function getAllMetadata() + { + if ( ! $this->initialized) { + $this->initialize(); + } + + $driver = $this->getDriver(); + $metadata = []; + foreach ($driver->getAllClassNames() as $className) { + $metadata[] = $this->getMetadataFor($className); + } + + return $metadata; + } + + /** + * Lazy initialization of this stuff, especially the metadata driver, + * since these are not needed at all when a metadata cache is active. + * + * @return void + */ + abstract protected function initialize(); + + /** + * Gets the fully qualified class-name from the namespace alias. + * + * @param string $namespaceAlias + * @param string $simpleClassName + * + * @return string + */ + abstract protected function getFqcnFromAlias($namespaceAlias, $simpleClassName); + + /** + * Returns the mapping driver implementation. + * + * @return \Doctrine\Common\Persistence\Mapping\Driver\MappingDriver + */ + abstract protected function getDriver(); + + /** + * Wakes up reflection after ClassMetadata gets unserialized from cache. + * + * @param ClassMetadata $class + * @param ReflectionService $reflService + * + * @return void + */ + abstract protected function wakeupReflection(ClassMetadata $class, ReflectionService $reflService); + + /** + * Initializes Reflection after ClassMetadata was constructed. + * + * @param ClassMetadata $class + * @param ReflectionService $reflService + * + * @return void + */ + abstract protected function initializeReflection(ClassMetadata $class, ReflectionService $reflService); + + /** + * Checks whether the class metadata is an entity. + * + * This method should return false for mapped superclasses or embedded classes. + * + * @param ClassMetadata $class + * + * @return boolean + */ + abstract protected function isEntity(ClassMetadata $class); + + /** + * Gets the class metadata descriptor for a class. + * + * @param string $className The name of the class. + * + * @return ClassMetadata + * + * @throws ReflectionException + * @throws MappingException + */ + public function getMetadataFor($className) + { + if (isset($this->loadedMetadata[$className])) { + return $this->loadedMetadata[$className]; + } + + // Check for namespace alias + if (strpos($className, ':') !== false) { + list($namespaceAlias, $simpleClassName) = explode(':', $className, 2); + + $realClassName = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName); + } else { + $realClassName = ClassUtils::getRealClass($className); + } + + if (isset($this->loadedMetadata[$realClassName])) { + // We do not have the alias name in the map, include it + return $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; + } + + $loadingException = null; + + try { + if ($this->cacheDriver) { + if (($cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt)) instanceof ClassMetadata) { + $this->loadedMetadata[$realClassName] = $cached; + + $this->wakeupReflection($cached, $this->getReflectionService()); + } else { + foreach ($this->loadMetadata($realClassName) as $loadedClassName) { + $this->cacheDriver->save( + $loadedClassName . $this->cacheSalt, + $this->loadedMetadata[$loadedClassName], + null + ); + } + } + } else { + $this->loadMetadata($realClassName); + } + } catch (MappingException $loadingException) { + if (! $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName)) { + throw $loadingException; + } + + $this->loadedMetadata[$realClassName] = $fallbackMetadataResponse; + } + + if ($className !== $realClassName) { + // We do not have the alias name in the map, include it + $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; + } + + return $this->loadedMetadata[$className]; + } + + /** + * Checks whether the factory has the metadata for a class loaded already. + * + * @param string $className + * + * @return boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise. + */ + public function hasMetadataFor($className) + { + return isset($this->loadedMetadata[$className]); + } + + /** + * Sets the metadata descriptor for a specific class. + * + * NOTE: This is only useful in very special cases, like when generating proxy classes. + * + * @param string $className + * @param ClassMetadata $class + * + * @return void + */ + public function setMetadataFor($className, $class) + { + $this->loadedMetadata[$className] = $class; + } + + /** + * Gets an array of parent classes for the given entity class. + * + * @param string $name + * + * @return array + */ + protected function getParentClasses($name) + { + // Collect parent classes, ignoring transient (not-mapped) classes. + $parentClasses = []; + foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { + if ( ! $this->getDriver()->isTransient($parentClass)) { + $parentClasses[] = $parentClass; + } + } + return $parentClasses; + } + + /** + * Loads the metadata of the class in question and all it's ancestors whose metadata + * is still not loaded. + * + * Important: The class $name does not necesarily exist at this point here. + * Scenarios in a code-generation setup might have access to XML/YAML + * Mapping files without the actual PHP code existing here. That is why the + * {@see Doctrine\Common\Persistence\Mapping\ReflectionService} interface + * should be used for reflection. + * + * @param string $name The name of the class for which the metadata should get loaded. + * + * @return array + */ + protected function loadMetadata($name) + { + if ( ! $this->initialized) { + $this->initialize(); + } + + $loaded = []; + + $parentClasses = $this->getParentClasses($name); + $parentClasses[] = $name; + + // Move down the hierarchy of parent classes, starting from the topmost class + $parent = null; + $rootEntityFound = false; + $visited = []; + $reflService = $this->getReflectionService(); + foreach ($parentClasses as $className) { + if (isset($this->loadedMetadata[$className])) { + $parent = $this->loadedMetadata[$className]; + if ($this->isEntity($parent)) { + $rootEntityFound = true; + array_unshift($visited, $className); + } + continue; + } + + $class = $this->newClassMetadataInstance($className); + $this->initializeReflection($class, $reflService); + + $this->doLoadMetadata($class, $parent, $rootEntityFound, $visited); + + $this->loadedMetadata[$className] = $class; + + $parent = $class; + + if ($this->isEntity($class)) { + $rootEntityFound = true; + array_unshift($visited, $className); + } + + $this->wakeupReflection($class, $reflService); + + $loaded[] = $className; + } + + return $loaded; + } + + /** + * Provides a fallback hook for loading metadata when loading failed due to reflection/mapping exceptions + * + * Override this method to implement a fallback strategy for failed metadata loading + * + * @param string $className + * + * @return \Doctrine\Common\Persistence\Mapping\ClassMetadata|null + */ + protected function onNotFoundMetadata($className) + { + return null; + } + + /** + * Actually loads the metadata from the underlying metadata. + * + * @param ClassMetadata $class + * @param ClassMetadata|null $parent + * @param bool $rootEntityFound + * @param array $nonSuperclassParents All parent class names + * that are not marked as mapped superclasses. + * + * @return void + */ + abstract protected function doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents); + + /** + * Creates a new ClassMetadata instance for the given class name. + * + * @param string $className + * + * @return ClassMetadata + */ + abstract protected function newClassMetadataInstance($className); + + /** + * {@inheritDoc} + */ + public function isTransient($class) + { + if ( ! $this->initialized) { + $this->initialize(); + } + + // Check for namespace alias + if (strpos($class, ':') !== false) { + list($namespaceAlias, $simpleClassName) = explode(':', $class, 2); + $class = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName); + } + + return $this->getDriver()->isTransient($class); + } + + /** + * Sets the reflectionService. + * + * @param ReflectionService $reflectionService + * + * @return void + */ + public function setReflectionService(ReflectionService $reflectionService) + { + $this->reflectionService = $reflectionService; + } + + /** + * Gets the reflection service associated with this metadata factory. + * + * @return ReflectionService + */ + public function getReflectionService() + { + if ($this->reflectionService === null) { + $this->reflectionService = new RuntimeReflectionService(); + } + return $this->reflectionService; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..b8445f1b9fc112b712fe889d2bc8a5c553b3f2a9 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php @@ -0,0 +1,174 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping; + +/** + * Contract for a Doctrine persistence layer ClassMetadata class to implement. + * + * @link www.doctrine-project.org + * @since 2.1 + * @author Benjamin Eberlei + * @author Jonathan Wage + */ +interface ClassMetadata +{ + /** + * Gets the fully-qualified class name of this persistent class. + * + * @return string + */ + public function getName(); + + /** + * Gets the mapped identifier field name. + * + * The returned structure is an array of the identifier field names. + * + * @return array + */ + public function getIdentifier(); + + /** + * Gets the ReflectionClass instance for this mapped class. + * + * @return \ReflectionClass + */ + public function getReflectionClass(); + + /** + * Checks if the given field name is a mapped identifier for this class. + * + * @param string $fieldName + * + * @return boolean + */ + public function isIdentifier($fieldName); + + /** + * Checks if the given field is a mapped property for this class. + * + * @param string $fieldName + * + * @return boolean + */ + public function hasField($fieldName); + + /** + * Checks if the given field is a mapped association for this class. + * + * @param string $fieldName + * + * @return boolean + */ + public function hasAssociation($fieldName); + + /** + * Checks if the given field is a mapped single valued association for this class. + * + * @param string $fieldName + * + * @return boolean + */ + public function isSingleValuedAssociation($fieldName); + + /** + * Checks if the given field is a mapped collection valued association for this class. + * + * @param string $fieldName + * + * @return boolean + */ + public function isCollectionValuedAssociation($fieldName); + + /** + * A numerically indexed list of field names of this persistent class. + * + * This array includes identifier fields if present on this class. + * + * @return array + */ + public function getFieldNames(); + + /** + * Returns an array of identifier field names numerically indexed. + * + * @return array + */ + public function getIdentifierFieldNames(); + + /** + * Returns a numerically indexed list of association names of this persistent class. + * + * This array includes identifier associations if present on this class. + * + * @return array + */ + public function getAssociationNames(); + + /** + * Returns a type name of this field. + * + * This type names can be implementation specific but should at least include the php types: + * integer, string, boolean, float/double, datetime. + * + * @param string $fieldName + * + * @return string + */ + public function getTypeOfField($fieldName); + + /** + * Returns the target class name of the given association. + * + * @param string $assocName + * + * @return string + */ + public function getAssociationTargetClass($assocName); + + /** + * Checks if the association is the inverse side of a bidirectional association. + * + * @param string $assocName + * + * @return boolean + */ + public function isAssociationInverseSide($assocName); + + /** + * Returns the target field of the owning side of the association. + * + * @param string $assocName + * + * @return string + */ + public function getAssociationMappedByTargetField($assocName); + + /** + * Returns the identifier of this object as an array with field name as key. + * + * Has to return an empty array if no identifier isset. + * + * @param object $object + * + * @return array + */ + public function getIdentifierValues($object); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..3d82881195bbcd2183e9f8a027f9ac158534e196 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php @@ -0,0 +1,76 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping; + +/** + * Contract for a Doctrine persistence layer ClassMetadata class to implement. + * + * @link www.doctrine-project.org + * @since 2.1 + * @author Benjamin Eberlei + * @author Jonathan Wage + */ +interface ClassMetadataFactory +{ + /** + * Forces the factory to load the metadata of all classes known to the underlying + * mapping driver. + * + * @return array The ClassMetadata instances of all mapped classes. + */ + public function getAllMetadata(); + + /** + * Gets the class metadata descriptor for a class. + * + * @param string $className The name of the class. + * + * @return ClassMetadata + */ + public function getMetadataFor($className); + + /** + * Checks whether the factory has the metadata for a class loaded already. + * + * @param string $className + * + * @return boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise. + */ + public function hasMetadataFor($className); + + /** + * Sets the metadata descriptor for a specific class. + * + * @param string $className + * + * @param ClassMetadata $class + */ + public function setMetadataFor($className, $class); + + /** + * Returns whether the class with the specified name should have its metadata loaded. + * This is only the case if it is either mapped directly or as a MappedSuperclass. + * + * @param string $className + * + * @return boolean + */ + public function isTransient($className); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..deb82c0c97922bc996206c1c51decf89191b9c81 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php @@ -0,0 +1,256 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Annotations\AnnotationReader; +use Doctrine\Common\Persistence\Mapping\MappingException; + +/** + * The AnnotationDriver reads the mapping metadata from docblock annotations. + * + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +abstract class AnnotationDriver implements MappingDriver +{ + /** + * The AnnotationReader. + * + * @var AnnotationReader + */ + protected $reader; + + /** + * The paths where to look for mapping files. + * + * @var array + */ + protected $paths = []; + + /** + * The paths excluded from path where to look for mapping files. + * + * @var array + */ + protected $excludePaths = []; + + /** + * The file extension of mapping documents. + * + * @var string + */ + protected $fileExtension = '.php'; + + /** + * Cache for AnnotationDriver#getAllClassNames(). + * + * @var array|null + */ + protected $classNames; + + /** + * Name of the entity annotations as keys. + * + * @var array + */ + protected $entityAnnotationClasses = []; + + /** + * Initializes a new AnnotationDriver that uses the given AnnotationReader for reading + * docblock annotations. + * + * @param AnnotationReader $reader The AnnotationReader to use, duck-typed. + * @param string|array|null $paths One or multiple paths where mapping classes can be found. + */ + public function __construct($reader, $paths = null) + { + $this->reader = $reader; + if ($paths) { + $this->addPaths((array) $paths); + } + } + + /** + * Appends lookup paths to metadata driver. + * + * @param array $paths + * + * @return void + */ + public function addPaths(array $paths) + { + $this->paths = array_unique(array_merge($this->paths, $paths)); + } + + /** + * Retrieves the defined metadata lookup paths. + * + * @return array + */ + public function getPaths() + { + return $this->paths; + } + + /** + * Append exclude lookup paths to metadata driver. + * + * @param array $paths + */ + public function addExcludePaths(array $paths) + { + $this->excludePaths = array_unique(array_merge($this->excludePaths, $paths)); + } + + /** + * Retrieve the defined metadata lookup exclude paths. + * + * @return array + */ + public function getExcludePaths() + { + return $this->excludePaths; + } + + /** + * Retrieve the current annotation reader + * + * @return AnnotationReader + */ + public function getReader() + { + return $this->reader; + } + + /** + * Gets the file extension used to look for mapping files under. + * + * @return string + */ + public function getFileExtension() + { + return $this->fileExtension; + } + + /** + * Sets the file extension used to look for mapping files under. + * + * @param string $fileExtension The file extension to set. + * + * @return void + */ + public function setFileExtension($fileExtension) + { + $this->fileExtension = $fileExtension; + } + + /** + * Returns whether the class with the specified name is transient. Only non-transient + * classes, that is entities and mapped superclasses, should have their metadata loaded. + * + * A class is non-transient if it is annotated with an annotation + * from the {@see AnnotationDriver::entityAnnotationClasses}. + * + * @param string $className + * + * @return boolean + */ + public function isTransient($className) + { + $classAnnotations = $this->reader->getClassAnnotations(new \ReflectionClass($className)); + + foreach ($classAnnotations as $annot) { + if (isset($this->entityAnnotationClasses[get_class($annot)])) { + return false; + } + } + return true; + } + + /** + * {@inheritDoc} + */ + public function getAllClassNames() + { + if ($this->classNames !== null) { + return $this->classNames; + } + + if (!$this->paths) { + throw MappingException::pathRequired(); + } + + $classes = []; + $includedFiles = []; + + foreach ($this->paths as $path) { + if ( ! is_dir($path)) { + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); + } + + $iterator = new \RegexIterator( + new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS), + \RecursiveIteratorIterator::LEAVES_ONLY + ), + '/^.+' . preg_quote($this->fileExtension) . '$/i', + \RecursiveRegexIterator::GET_MATCH + ); + + foreach ($iterator as $file) { + $sourceFile = $file[0]; + + if ( ! preg_match('(^phar:)i', $sourceFile)) { + $sourceFile = realpath($sourceFile); + } + + foreach ($this->excludePaths as $excludePath) { + $exclude = str_replace('\\', '/', realpath($excludePath)); + $current = str_replace('\\', '/', $sourceFile); + + if (strpos($current, $exclude) !== false) { + continue 2; + } + } + + require_once $sourceFile; + + $includedFiles[] = $sourceFile; + } + } + + $declared = get_declared_classes(); + + foreach ($declared as $className) { + $rc = new \ReflectionClass($className); + $sourceFile = $rc->getFileName(); + if (in_array($sourceFile, $includedFiles) && ! $this->isTransient($className)) { + $classes[] = $className; + } + } + + $this->classNames = $classes; + + return $classes; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php new file mode 100644 index 0000000000000000000000000000000000000000..6ed7f6d0d59a92a8492092096668b0582fe3be54 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php @@ -0,0 +1,173 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\MappingException; + +/** + * Locates the file that contains the metadata information for a given class name. + * + * This behavior is independent of the actual content of the file. It just detects + * the file which is responsible for the given class name. + * + * @author Benjamin Eberlei + * @author Johannes M. Schmitt + */ +class DefaultFileLocator implements FileLocator +{ + /** + * The paths where to look for mapping files. + * + * @var array + */ + protected $paths = []; + + /** + * The file extension of mapping documents. + * + * @var string|null + */ + protected $fileExtension; + + /** + * Initializes a new FileDriver that looks in the given path(s) for mapping + * documents and operates in the specified operating mode. + * + * @param string|array $paths One or multiple paths where mapping documents can be found. + * @param string|null $fileExtension The file extension of mapping documents, usually prefixed with a dot. + */ + public function __construct($paths, $fileExtension = null) + { + $this->addPaths((array) $paths); + $this->fileExtension = $fileExtension; + } + + /** + * Appends lookup paths to metadata driver. + * + * @param array $paths + * + * @return void + */ + public function addPaths(array $paths) + { + $this->paths = array_unique(array_merge($this->paths, $paths)); + } + + /** + * Retrieves the defined metadata lookup paths. + * + * @return array + */ + public function getPaths() + { + return $this->paths; + } + + /** + * Gets the file extension used to look for mapping files under. + * + * @return string|null + */ + public function getFileExtension() + { + return $this->fileExtension; + } + + /** + * Sets the file extension used to look for mapping files under. + * + * @param string|null $fileExtension The file extension to set. + * + * @return void + */ + public function setFileExtension($fileExtension) + { + $this->fileExtension = $fileExtension; + } + + /** + * {@inheritDoc} + */ + public function findMappingFile($className) + { + $fileName = str_replace('\\', '.', $className) . $this->fileExtension; + + // Check whether file exists + foreach ($this->paths as $path) { + if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) { + return $path . DIRECTORY_SEPARATOR . $fileName; + } + } + + throw MappingException::mappingFileNotFound($className, $fileName); + } + + /** + * {@inheritDoc} + */ + public function getAllClassNames($globalBasename) + { + $classes = []; + + if ($this->paths) { + foreach ($this->paths as $path) { + if ( ! is_dir($path)) { + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); + } + + $iterator = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($path), + \RecursiveIteratorIterator::LEAVES_ONLY + ); + + foreach ($iterator as $file) { + $fileName = $file->getBasename($this->fileExtension); + + if ($fileName == $file->getBasename() || $fileName == $globalBasename) { + continue; + } + + // NOTE: All files found here means classes are not transient! + $classes[] = str_replace('.', '\\', $fileName); + } + } + } + + return $classes; + } + + /** + * {@inheritDoc} + */ + public function fileExists($className) + { + $fileName = str_replace('\\', '.', $className) . $this->fileExtension; + + // Check whether file exists + foreach ((array) $this->paths as $path) { + if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) { + return true; + } + } + + return false; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..dc799d5cc8434fd21452b65b1e390975e5c54b7c --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php @@ -0,0 +1,214 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\MappingException; + +/** + * Base driver for file-based metadata drivers. + * + * A file driver operates in a mode where it loads the mapping files of individual + * classes on demand. This requires the user to adhere to the convention of 1 mapping + * file per class and the file names of the mapping files must correspond to the full + * class name, including namespace, with the namespace delimiters '\', replaced by dots '.'. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +abstract class FileDriver implements MappingDriver +{ + /** + * @var FileLocator + */ + protected $locator; + + /** + * @var array|null + */ + protected $classCache; + + /** + * @var string|null + */ + protected $globalBasename; + + /** + * Initializes a new FileDriver that looks in the given path(s) for mapping + * documents and operates in the specified operating mode. + * + * @param string|array|FileLocator $locator A FileLocator or one/multiple paths + * where mapping documents can be found. + * @param string|null $fileExtension + */ + public function __construct($locator, $fileExtension = null) + { + if ($locator instanceof FileLocator) { + $this->locator = $locator; + } else { + $this->locator = new DefaultFileLocator((array)$locator, $fileExtension); + } + } + + /** + * Sets the global basename. + * + * @param string $file + * + * @return void + */ + public function setGlobalBasename($file) + { + $this->globalBasename = $file; + } + + /** + * Retrieves the global basename. + * + * @return string|null + */ + public function getGlobalBasename() + { + return $this->globalBasename; + } + + /** + * Gets the element of schema meta data for the class from the mapping file. + * This will lazily load the mapping file if it is not loaded yet. + * + * @param string $className + * + * @return array The element of schema meta data. + * + * @throws MappingException + */ + public function getElement($className) + { + if ($this->classCache === null) { + $this->initialize(); + } + + if (isset($this->classCache[$className])) { + return $this->classCache[$className]; + } + + $result = $this->loadMappingFile($this->locator->findMappingFile($className)); + if (!isset($result[$className])) { + throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className) . $this->locator->getFileExtension()); + } + + return $result[$className]; + } + + /** + * {@inheritDoc} + */ + public function isTransient($className) + { + if ($this->classCache === null) { + $this->initialize(); + } + + if (isset($this->classCache[$className])) { + return false; + } + + return !$this->locator->fileExists($className); + } + + /** + * {@inheritDoc} + */ + public function getAllClassNames() + { + if ($this->classCache === null) { + $this->initialize(); + } + + if (! $this->classCache) { + return (array) $this->locator->getAllClassNames($this->globalBasename); + } + + return array_merge( + array_keys($this->classCache), + (array) $this->locator->getAllClassNames($this->globalBasename) + ); + } + + /** + * Loads a mapping file with the given name and returns a map + * from class/entity names to their corresponding file driver elements. + * + * @param string $file The mapping file to load. + * + * @return array + */ + abstract protected function loadMappingFile($file); + + /** + * Initializes the class cache from all the global files. + * + * Using this feature adds a substantial performance hit to file drivers as + * more metadata has to be loaded into memory than might actually be + * necessary. This may not be relevant to scenarios where caching of + * metadata is in place, however hits very hard in scenarios where no + * caching is used. + * + * @return void + */ + protected function initialize() + { + $this->classCache = []; + if (null !== $this->globalBasename) { + foreach ($this->locator->getPaths() as $path) { + $file = $path.'/'.$this->globalBasename.$this->locator->getFileExtension(); + if (is_file($file)) { + $this->classCache = array_merge( + $this->classCache, + $this->loadMappingFile($file) + ); + } + } + } + } + + /** + * Retrieves the locator used to discover mapping files by className. + * + * @return FileLocator + */ + public function getLocator() + { + return $this->locator; + } + + /** + * Sets the locator used to discover mapping files by className. + * + * @param FileLocator $locator + */ + public function setLocator(FileLocator $locator) + { + $this->locator = $locator; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php new file mode 100644 index 0000000000000000000000000000000000000000..f622856da845a964399c5aad8cb82d72874d77d8 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php @@ -0,0 +1,73 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +/** + * Locates the file that contains the metadata information for a given class name. + * + * This behavior is independent of the actual content of the file. It just detects + * the file which is responsible for the given class name. + * + * @author Benjamin Eberlei + * @author Johannes M. Schmitt + */ +interface FileLocator +{ + /** + * Locates mapping file for the given class name. + * + * @param string $className + * + * @return string + */ + public function findMappingFile($className); + + /** + * Gets all class names that are found with this file locator. + * + * @param string $globalBasename Passed to allow excluding the basename. + * + * @return array + */ + public function getAllClassNames($globalBasename); + + /** + * Checks if a file can be found for this class name. + * + * @param string $className + * + * @return bool + */ + public function fileExists($className); + + /** + * Gets all the paths that this file locator looks for mapping files. + * + * @return array + */ + public function getPaths(); + + /** + * Gets the file extension that mapping files are suffixed with. + * + * @return string + */ + public function getFileExtension(); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..b5d7ec03a1c13e5573a738a115016ae9f99dfb91 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php @@ -0,0 +1,58 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; + +/** + * Contract for metadata drivers. + * + * @since 2.2 + * @author Jonathan H. Wage + */ +interface MappingDriver +{ + /** + * Loads the metadata for the specified class into the provided container. + * + * @param string $className + * @param ClassMetadata $metadata + * + * @return void + */ + public function loadMetadataForClass($className, ClassMetadata $metadata); + + /** + * Gets the names of all mapped classes known to this driver. + * + * @return array The names of all mapped classes known to this driver. + */ + public function getAllClassNames(); + + /** + * Returns whether the class with the specified name should have its metadata loaded. + * This is only the case if it is either mapped as an Entity or a MappedSuperclass. + * + * @param string $className + * + * @return boolean + */ + public function isTransient($className); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php new file mode 100644 index 0000000000000000000000000000000000000000..50d9785bcd62a12b699d94dbd541272e91202318 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php @@ -0,0 +1,165 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Persistence\Mapping\MappingException; + +/** + * The DriverChain allows you to add multiple other mapping drivers for + * certain namespaces. + * + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +class MappingDriverChain implements MappingDriver +{ + /** + * The default driver. + * + * @var MappingDriver|null + */ + private $defaultDriver; + + /** + * @var array + */ + private $drivers = []; + + /** + * Gets the default driver. + * + * @return MappingDriver|null + */ + public function getDefaultDriver() + { + return $this->defaultDriver; + } + + /** + * Set the default driver. + * + * @param MappingDriver $driver + * + * @return void + */ + public function setDefaultDriver(MappingDriver $driver) + { + $this->defaultDriver = $driver; + } + + /** + * Adds a nested driver. + * + * @param MappingDriver $nestedDriver + * @param string $namespace + * + * @return void + */ + public function addDriver(MappingDriver $nestedDriver, $namespace) + { + $this->drivers[$namespace] = $nestedDriver; + } + + /** + * Gets the array of nested drivers. + * + * @return array $drivers + */ + public function getDrivers() + { + return $this->drivers; + } + + /** + * {@inheritDoc} + */ + public function loadMetadataForClass($className, ClassMetadata $metadata) + { + /* @var $driver MappingDriver */ + foreach ($this->drivers as $namespace => $driver) { + if (strpos($className, $namespace) === 0) { + $driver->loadMetadataForClass($className, $metadata); + return; + } + } + + if (null !== $this->defaultDriver) { + $this->defaultDriver->loadMetadataForClass($className, $metadata); + return; + } + + throw MappingException::classNotFoundInNamespaces($className, array_keys($this->drivers)); + } + + /** + * {@inheritDoc} + */ + public function getAllClassNames() + { + $classNames = []; + $driverClasses = []; + + /* @var $driver MappingDriver */ + foreach ($this->drivers AS $namespace => $driver) { + $oid = spl_object_hash($driver); + + if (!isset($driverClasses[$oid])) { + $driverClasses[$oid] = $driver->getAllClassNames(); + } + + foreach ($driverClasses[$oid] AS $className) { + if (strpos($className, $namespace) === 0) { + $classNames[$className] = true; + } + } + } + + if (null !== $this->defaultDriver) { + foreach ($this->defaultDriver->getAllClassNames() as $className) { + $classNames[$className] = true; + } + } + + return array_keys($classNames); + } + + /** + * {@inheritDoc} + */ + public function isTransient($className) + { + /* @var $driver MappingDriver */ + foreach ($this->drivers AS $namespace => $driver) { + if (strpos($className, $namespace) === 0) { + return $driver->isTransient($className); + } + } + + if ($this->defaultDriver !== null) { + return $this->defaultDriver->isTransient($className); + } + + return true; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..efffa6aa4c77a6d38302132f00e2aff9685ee3eb --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php @@ -0,0 +1,70 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; + +/** + * The PHPDriver includes php files which just populate ClassMetadataInfo + * instances with plain PHP code. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +class PHPDriver extends FileDriver +{ + /** + * @var ClassMetadata + */ + protected $metadata; + + /** + * {@inheritDoc} + */ + public function __construct($locator, $fileExtension = null) + { + parent::__construct($locator, '.php'); + } + + /** + * {@inheritDoc} + */ + public function loadMetadataForClass($className, ClassMetadata $metadata) + { + $this->metadata = $metadata; + + $this->loadMappingFile($this->locator->findMappingFile($className)); + } + + /** + * {@inheritDoc} + */ + protected function loadMappingFile($file) + { + $metadata = $this->metadata; + include $file; + + return [$metadata->getName() => $metadata]; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..8e37e5a7a16fce8209770d727dc7d3f941063def --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php @@ -0,0 +1,142 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Persistence\Mapping\MappingException; + +/** + * The StaticPHPDriver calls a static loadMetadata() method on your entity + * classes where you can manually populate the ClassMetadata instance. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +class StaticPHPDriver implements MappingDriver +{ + /** + * Paths of entity directories. + * + * @var array + */ + private $paths = []; + + /** + * Map of all class names. + * + * @var array + */ + private $classNames; + + /** + * Constructor. + * + * @param array|string $paths + */ + public function __construct($paths) + { + $this->addPaths((array) $paths); + } + + /** + * Adds paths. + * + * @param array $paths + * + * @return void + */ + public function addPaths(array $paths) + { + $this->paths = array_unique(array_merge($this->paths, $paths)); + } + + /** + * {@inheritdoc} + */ + public function loadMetadataForClass($className, ClassMetadata $metadata) + { + $className::loadMetadata($metadata); + } + + /** + * {@inheritDoc} + * @todo Same code exists in AnnotationDriver, should we re-use it somehow or not worry about it? + */ + public function getAllClassNames() + { + if ($this->classNames !== null) { + return $this->classNames; + } + + if (!$this->paths) { + throw MappingException::pathRequired(); + } + + $classes = []; + $includedFiles = []; + + foreach ($this->paths as $path) { + if (!is_dir($path)) { + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); + } + + $iterator = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($path), + \RecursiveIteratorIterator::LEAVES_ONLY + ); + + foreach ($iterator as $file) { + if ($file->getBasename('.php') == $file->getBasename()) { + continue; + } + + $sourceFile = realpath($file->getPathName()); + require_once $sourceFile; + $includedFiles[] = $sourceFile; + } + } + + $declared = get_declared_classes(); + + foreach ($declared as $className) { + $rc = new \ReflectionClass($className); + $sourceFile = $rc->getFileName(); + if (in_array($sourceFile, $includedFiles) && !$this->isTransient($className)) { + $classes[] = $className; + } + } + + $this->classNames = $classes; + + return $classes; + } + + /** + * {@inheritdoc} + */ + public function isTransient($className) + { + return ! method_exists($className, 'loadMetadata'); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php new file mode 100644 index 0000000000000000000000000000000000000000..4588cfec8893cf63c2e8b728745e06624e257135 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php @@ -0,0 +1,239 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\MappingException; + +/** + * The Symfony File Locator makes a simplifying assumptions compared + * to the DefaultFileLocator. By assuming paths only contain entities of a certain + * namespace the mapping files consists of the short classname only. + * + * @author Fabien Potencier + * @author Benjamin Eberlei + * @license MIT + */ +class SymfonyFileLocator implements FileLocator +{ + /** + * The paths where to look for mapping files. + * + * @var array + */ + protected $paths = []; + + /** + * A map of mapping directory path to namespace prefix used to expand class shortnames. + * + * @var array + */ + protected $prefixes = []; + + /** + * File extension that is searched for. + * + * @var string|null + */ + protected $fileExtension; + + /** + * Represents PHP namespace delimiters when looking for files + * + * @var string + */ + private $nsSeparator; + + /** + * Constructor. + * + * @param array $prefixes + * @param string|null $fileExtension + * @param string $nsSeparator String which would be used when converting FQCN to filename and vice versa. Should not be empty + */ + public function __construct(array $prefixes, $fileExtension = null, $nsSeparator = '.') + { + $this->addNamespacePrefixes($prefixes); + $this->fileExtension = $fileExtension; + + if (empty($nsSeparator)) { + throw new \InvalidArgumentException('Namespace separator should not be empty'); + } + + $this->nsSeparator = (string) $nsSeparator; + } + + /** + * Adds Namespace Prefixes. + * + * @param array $prefixes + * + * @return void + */ + public function addNamespacePrefixes(array $prefixes) + { + $this->prefixes = array_merge($this->prefixes, $prefixes); + $this->paths = array_merge($this->paths, array_keys($prefixes)); + } + + /** + * Gets Namespace Prefixes. + * + * @return array + */ + public function getNamespacePrefixes() + { + return $this->prefixes; + } + + /** + * {@inheritDoc} + */ + public function getPaths() + { + return $this->paths; + } + + /** + * {@inheritDoc} + */ + public function getFileExtension() + { + return $this->fileExtension; + } + + /** + * Sets the file extension used to look for mapping files under. + * + * @param string $fileExtension The file extension to set. + * + * @return void + */ + public function setFileExtension($fileExtension) + { + $this->fileExtension = $fileExtension; + } + + /** + * {@inheritDoc} + */ + public function fileExists($className) + { + $defaultFileName = str_replace('\\', $this->nsSeparator, $className).$this->fileExtension; + foreach ($this->paths as $path) { + if (!isset($this->prefixes[$path])) { + // global namespace class + if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) { + return true; + } + + continue; + } + + $prefix = $this->prefixes[$path]; + + if (0 !== strpos($className, $prefix.'\\')) { + continue; + } + + $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', $this->nsSeparator).$this->fileExtension; + if (is_file($filename)) { + return true; + } + } + + return false; + } + + /** + * {@inheritDoc} + */ + public function getAllClassNames($globalBasename = null) + { + $classes = []; + + if ($this->paths) { + foreach ((array) $this->paths as $path) { + if (!is_dir($path)) { + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); + } + + $iterator = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($path), + \RecursiveIteratorIterator::LEAVES_ONLY + ); + + foreach ($iterator as $file) { + $fileName = $file->getBasename($this->fileExtension); + + if ($fileName == $file->getBasename() || $fileName == $globalBasename) { + continue; + } + + // NOTE: All files found here means classes are not transient! + if (isset($this->prefixes[$path])) { + + // Calculate namespace suffix for given prefix as a relative path from basepath to file path + $nsSuffix = strtr( + substr(realpath($file->getPath()), strlen(realpath($path))), + $this->nsSeparator, + '\\' + ); + + $classes[] = $this->prefixes[$path] . str_replace(DIRECTORY_SEPARATOR, '\\', $nsSuffix) . '\\' .str_replace($this->nsSeparator, '\\', $fileName); + } else { + $classes[] = str_replace($this->nsSeparator, '\\', $fileName); + } + } + } + } + + return $classes; + } + + /** + * {@inheritDoc} + */ + public function findMappingFile($className) + { + $defaultFileName = str_replace('\\', $this->nsSeparator, $className).$this->fileExtension; + foreach ($this->paths as $path) { + if (!isset($this->prefixes[$path])) { + if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) { + return $path.DIRECTORY_SEPARATOR.$defaultFileName; + } + + continue; + } + + $prefix = $this->prefixes[$path]; + + if (0 !== strpos($className, $prefix.'\\')) { + continue; + } + + $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', $this->nsSeparator ).$this->fileExtension; + if (is_file($filename)) { + return $filename; + } + } + + throw MappingException::mappingFileNotFound($className, substr($className, strrpos($className, '\\') + 1).$this->fileExtension); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php new file mode 100644 index 0000000000000000000000000000000000000000..6e97485ebe28fe4afad99e165f143cb8f4a3c7a7 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php @@ -0,0 +1,98 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping; + +/** + * A MappingException indicates that something is wrong with the mapping setup. + * + * @since 2.2 + */ +class MappingException extends \Exception +{ + /** + * @param string $className + * @param array $namespaces + * + * @return self + */ + public static function classNotFoundInNamespaces($className, $namespaces) + { + return new self("The class '" . $className . "' was not found in the ". + "chain configured namespaces " . implode(", ", $namespaces)); + } + + /** + * @return self + */ + public static function pathRequired() + { + return new self("Specifying the paths to your entities is required ". + "in the AnnotationDriver to retrieve all class names."); + } + + /** + * @param string|null $path + * + * @return self + */ + public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null) + { + if ( ! empty($path)) { + $path = '[' . $path . ']'; + } + + return new self( + 'File mapping drivers must have a valid directory path, ' . + 'however the given path ' . $path . ' seems to be incorrect!' + ); + } + + /** + * @param string $entityName + * @param string $fileName + * + * @return self + */ + public static function mappingFileNotFound($entityName, $fileName) + { + return new self("No mapping file found named '$fileName' for class '$entityName'."); + } + + /** + * @param string $entityName + * @param string $fileName + * + * @return self + */ + public static function invalidMappingFile($entityName, $fileName) + { + return new self("Invalid mapping file '$fileName' for class '$entityName'."); + } + + /** + * @param string $className + * + * @return self + */ + public static function nonExistingClass($className) + { + return new self("Class '$className' does not exist"); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php new file mode 100644 index 0000000000000000000000000000000000000000..0088ed5ee25109df64b7706c60516b510262fe30 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php @@ -0,0 +1,87 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping; + +/** + * Very simple reflection service abstraction. + * + * This is required inside metadata layers that may require either + * static or runtime reflection. + * + * @author Benjamin Eberlei + */ +interface ReflectionService +{ + /** + * Returns an array of the parent classes (not interfaces) for the given class. + * + * @param string $class + * + * @throws \Doctrine\Common\Persistence\Mapping\MappingException + * + * @return array + */ + public function getParentClasses($class); + + /** + * Returns the shortname of a class. + * + * @param string $class + * + * @return string + */ + public function getClassShortName($class); + + /** + * @param string $class + * + * @return string + */ + public function getClassNamespace($class); + + /** + * Returns a reflection class instance or null. + * + * @param string $class + * + * @return \ReflectionClass|null + */ + public function getClass($class); + + /** + * Returns an accessible property (setAccessible(true)) or null. + * + * @param string $class + * @param string $property + * + * @return \ReflectionProperty|null + */ + public function getAccessibleProperty($class, $property); + + /** + * Checks if the class have a public method with the given name. + * + * @param mixed $class + * @param mixed $method + * + * @return bool + */ + public function hasPublicMethod($class, $method); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php new file mode 100644 index 0000000000000000000000000000000000000000..4598d5aff24cf63c8dfb2a4bb6c48b41f50e6bfc --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php @@ -0,0 +1,104 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping; + +use Doctrine\Common\Reflection\RuntimePublicReflectionProperty; +use ReflectionClass; +use ReflectionException; +use ReflectionMethod; +use ReflectionProperty; + +/** + * PHP Runtime Reflection Service. + * + * @author Benjamin Eberlei + */ +class RuntimeReflectionService implements ReflectionService +{ + /** + * {@inheritDoc} + */ + public function getParentClasses($class) + { + if ( ! class_exists($class)) { + throw MappingException::nonExistingClass($class); + } + + return class_parents($class); + } + + /** + * {@inheritDoc} + */ + public function getClassShortName($class) + { + $reflectionClass = new ReflectionClass($class); + + return $reflectionClass->getShortName(); + } + + /** + * {@inheritDoc} + */ + public function getClassNamespace($class) + { + $reflectionClass = new ReflectionClass($class); + + return $reflectionClass->getNamespaceName(); + } + + /** + * {@inheritDoc} + */ + public function getClass($class) + { + return new ReflectionClass($class); + } + + /** + * {@inheritDoc} + */ + public function getAccessibleProperty($class, $property) + { + $reflectionProperty = new ReflectionProperty($class, $property); + + if ($reflectionProperty->isPublic()) { + $reflectionProperty = new RuntimePublicReflectionProperty($class, $property); + } + + $reflectionProperty->setAccessible(true); + + return $reflectionProperty; + } + + /** + * {@inheritDoc} + */ + public function hasPublicMethod($class, $method) + { + try { + $reflectionMethod = new ReflectionMethod($class, $method); + } catch (ReflectionException $e) { + return false; + } + + return $reflectionMethod->isPublic(); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php new file mode 100644 index 0000000000000000000000000000000000000000..7d0176649240aaa62f484bd272a9df421a9c56de --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php @@ -0,0 +1,83 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping; + +/** + * PHP Runtime Reflection Service. + * + * @author Benjamin Eberlei + */ +class StaticReflectionService implements ReflectionService +{ + /** + * {@inheritDoc} + */ + public function getParentClasses($class) + { + return []; + } + + /** + * {@inheritDoc} + */ + public function getClassShortName($className) + { + if (strpos($className, '\\') !== false) { + $className = substr($className, strrpos($className, "\\")+1); + } + return $className; + } + + /** + * {@inheritDoc} + */ + public function getClassNamespace($className) + { + $namespace = ''; + if (strpos($className, '\\') !== false) { + $namespace = strrev(substr( strrev($className), strpos(strrev($className), '\\')+1 )); + } + return $namespace; + } + + /** + * {@inheritDoc} + */ + public function getClass($class) + { + return null; + } + + /** + * {@inheritDoc} + */ + public function getAccessibleProperty($class, $property) + { + return null; + } + + /** + * {@inheritDoc} + */ + public function hasPublicMethod($class, $method) + { + return true; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManager.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManager.php new file mode 100644 index 0000000000000000000000000000000000000000..02208c9d5963bd6ad74f1d2de2705f1110f4eaea --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManager.php @@ -0,0 +1,169 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +/** + * Contract for a Doctrine persistence layer ObjectManager class to implement. + * + * @link www.doctrine-project.org + * @since 2.1 + * @author Benjamin Eberlei + * @author Jonathan Wage + */ +interface ObjectManager +{ + /** + * Finds an object by its identifier. + * + * This is just a convenient shortcut for getRepository($className)->find($id). + * + * @param string $className The class name of the object to find. + * @param mixed $id The identity of the object to find. + * + * @return object The found object. + */ + public function find($className, $id); + + /** + * Tells the ObjectManager to make an instance managed and persistent. + * + * The object will be entered into the database as a result of the flush operation. + * + * NOTE: The persist operation always considers objects that are not yet known to + * this ObjectManager as NEW. Do not pass detached objects to the persist operation. + * + * @param object $object The instance to make managed and persistent. + * + * @return void + */ + public function persist($object); + + /** + * Removes an object instance. + * + * A removed object will be removed from the database as a result of the flush operation. + * + * @param object $object The object instance to remove. + * + * @return void + */ + public function remove($object); + + /** + * Merges the state of a detached object into the persistence context + * of this ObjectManager and returns the managed copy of the object. + * The object passed to merge will not become associated/managed with this ObjectManager. + * + * @param object $object + * + * @return object + */ + public function merge($object); + + /** + * Clears the ObjectManager. All objects that are currently managed + * by this ObjectManager become detached. + * + * @param string|null $objectName if given, only objects of this type will get detached. + * + * @return void + */ + public function clear($objectName = null); + + /** + * Detaches an object from the ObjectManager, causing a managed object to + * become detached. Unflushed changes made to the object if any + * (including removal of the object), will not be synchronized to the database. + * Objects which previously referenced the detached object will continue to + * reference it. + * + * @param object $object The object to detach. + * + * @return void + */ + public function detach($object); + + /** + * Refreshes the persistent state of an object from the database, + * overriding any local changes that have not yet been persisted. + * + * @param object $object The object to refresh. + * + * @return void + */ + public function refresh($object); + + /** + * Flushes all changes to objects that have been queued up to now to the database. + * This effectively synchronizes the in-memory state of managed objects with the + * database. + * + * @return void + */ + public function flush(); + + /** + * Gets the repository for a class. + * + * @param string $className + * + * @return \Doctrine\Common\Persistence\ObjectRepository + */ + public function getRepository($className); + + /** + * Returns the ClassMetadata descriptor for a class. + * + * The class name must be the fully-qualified class name without a leading backslash + * (as it is returned by get_class($obj)). + * + * @param string $className + * + * @return \Doctrine\Common\Persistence\Mapping\ClassMetadata + */ + public function getClassMetadata($className); + + /** + * Gets the metadata factory used to gather the metadata of classes. + * + * @return \Doctrine\Common\Persistence\Mapping\ClassMetadataFactory + */ + public function getMetadataFactory(); + + /** + * Helper method to initialize a lazy loading proxy or persistent collection. + * + * This method is a no-op for other objects. + * + * @param object $obj + * + * @return void + */ + public function initializeObject($obj); + + /** + * Checks if the object is part of the current UnitOfWork and therefore managed. + * + * @param object $object + * + * @return bool + */ + public function contains($object); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerAware.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerAware.php new file mode 100644 index 0000000000000000000000000000000000000000..9bc248a56a31e5c20291db6a212c6702bd343615 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerAware.php @@ -0,0 +1,51 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; + +/** + * Makes a Persistent Objects aware of its own object-manager. + * + * Using this interface the managing object manager and class metadata instances + * are injected into the persistent object after construction. This allows + * you to implement ActiveRecord functionality on top of the persistence-ignorance + * that Doctrine propagates. + * + * Word of Warning: This is a very powerful hook to change how you can work with your domain models. + * Using this hook will break the Single Responsibility Principle inside your Domain Objects + * and increase the coupling of database and objects. + * + * Every ObjectManager has to implement this functionality itself. + * + * @author Benjamin Eberlei + */ +interface ObjectManagerAware +{ + /** + * Injects responsible ObjectManager and the ClassMetadata into this persistent object. + * + * @param ObjectManager $objectManager + * @param ClassMetadata $classMetadata + * + * @return void + */ + public function injectObjectManager(ObjectManager $objectManager, ClassMetadata $classMetadata); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerDecorator.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerDecorator.php new file mode 100644 index 0000000000000000000000000000000000000000..8946475dbac7901de4d18d73dc227910df09fd71 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerDecorator.php @@ -0,0 +1,140 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +/** + * Base class to simplify ObjectManager decorators + * + * @license http://opensource.org/licenses/MIT MIT + * @link www.doctrine-project.org + * @since 2.4 + * @author Lars Strojny + */ +abstract class ObjectManagerDecorator implements ObjectManager +{ + /** + * @var ObjectManager + */ + protected $wrapped; + + /** + * {@inheritdoc} + */ + public function find($className, $id) + { + return $this->wrapped->find($className, $id); + } + + /** + * {@inheritdoc} + */ + public function persist($object) + { + return $this->wrapped->persist($object); + } + + /** + * {@inheritdoc} + */ + public function remove($object) + { + return $this->wrapped->remove($object); + } + + /** + * {@inheritdoc} + */ + public function merge($object) + { + return $this->wrapped->merge($object); + } + + /** + * {@inheritdoc} + */ + public function clear($objectName = null) + { + return $this->wrapped->clear($objectName); + } + + /** + * {@inheritdoc} + */ + public function detach($object) + { + return $this->wrapped->detach($object); + } + + /** + * {@inheritdoc} + */ + public function refresh($object) + { + return $this->wrapped->refresh($object); + } + + /** + * {@inheritdoc} + */ + public function flush() + { + return $this->wrapped->flush(); + } + + /** + * {@inheritdoc} + */ + public function getRepository($className) + { + return $this->wrapped->getRepository($className); + } + + /** + * {@inheritdoc} + */ + public function getClassMetadata($className) + { + return $this->wrapped->getClassMetadata($className); + } + + /** + * {@inheritdoc} + */ + public function getMetadataFactory() + { + return $this->wrapped->getMetadataFactory(); + } + + /** + * {@inheritdoc} + */ + public function initializeObject($obj) + { + return $this->wrapped->initializeObject($obj); + } + + /** + * {@inheritdoc} + */ + public function contains($object) + { + return $this->wrapped->contains($object); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectRepository.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectRepository.php new file mode 100644 index 0000000000000000000000000000000000000000..f60721914a1424ac180ab69934885df4f3c91e7c --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectRepository.php @@ -0,0 +1,81 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +/** + * Contract for a Doctrine persistence layer ObjectRepository class to implement. + * + * @link www.doctrine-project.org + * @since 2.1 + * @author Benjamin Eberlei + * @author Jonathan Wage + */ +interface ObjectRepository +{ + /** + * Finds an object by its primary key / identifier. + * + * @param mixed $id The identifier. + * + * @return object The object. + */ + public function find($id); + + /** + * Finds all objects in the repository. + * + * @return array The objects. + */ + public function findAll(); + + /** + * Finds objects by a set of criteria. + * + * Optionally sorting and limiting details can be passed. An implementation may throw + * an UnexpectedValueException if certain values of the sorting or limiting details are + * not supported. + * + * @param array $criteria + * @param array|null $orderBy + * @param int|null $limit + * @param int|null $offset + * + * @return array The objects. + * + * @throws \UnexpectedValueException + */ + public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null); + + /** + * Finds a single object by a set of criteria. + * + * @param array $criteria The criteria. + * + * @return object The object. + */ + public function findOneBy(array $criteria); + + /** + * Returns the class name of the object managed by the repository. + * + * @return string + */ + public function getClassName(); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php new file mode 100644 index 0000000000000000000000000000000000000000..990642e78e987720039c140db2bd2046bc2db0cc --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php @@ -0,0 +1,254 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Collections\Collection; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; + +/** + * PersistentObject base class that implements getter/setter methods for all mapped fields and associations + * by overriding __call. + * + * This class is a forward compatible implementation of the PersistentObject trait. + * + * Limitations: + * + * 1. All persistent objects have to be associated with a single ObjectManager, multiple + * ObjectManagers are not supported. You can set the ObjectManager with `PersistentObject#setObjectManager()`. + * 2. Setters and getters only work if a ClassMetadata instance was injected into the PersistentObject. + * This is either done on `postLoad` of an object or by accessing the global object manager. + * 3. There are no hooks for setters/getters. Just implement the method yourself instead of relying on __call(). + * 4. Slower than handcoded implementations: An average of 7 method calls per access to a field and 11 for an association. + * 5. Only the inverse side associations get autoset on the owning side as well. Setting objects on the owning side + * will not set the inverse side associations. + * + * @example + * + * PersistentObject::setObjectManager($em); + * + * class Foo extends PersistentObject + * { + * private $id; + * } + * + * $foo = new Foo(); + * $foo->getId(); // method exists through __call + * + * @author Benjamin Eberlei + */ +abstract class PersistentObject implements ObjectManagerAware +{ + /** + * @var ObjectManager|null + */ + private static $objectManager = null; + + /** + * @var ClassMetadata|null + */ + private $cm = null; + + /** + * Sets the object manager responsible for all persistent object base classes. + * + * @param ObjectManager|null $objectManager + * + * @return void + */ + static public function setObjectManager(ObjectManager $objectManager = null) + { + self::$objectManager = $objectManager; + } + + /** + * @return ObjectManager|null + */ + static public function getObjectManager() + { + return self::$objectManager; + } + + /** + * Injects the Doctrine Object Manager. + * + * @param ObjectManager $objectManager + * @param ClassMetadata $classMetadata + * + * @return void + * + * @throws \RuntimeException + */ + public function injectObjectManager(ObjectManager $objectManager, ClassMetadata $classMetadata) + { + if ($objectManager !== self::$objectManager) { + throw new \RuntimeException("Trying to use PersistentObject with different ObjectManager instances. " . + "Was PersistentObject::setObjectManager() called?"); + } + + $this->cm = $classMetadata; + } + + /** + * Sets a persistent fields value. + * + * @param string $field + * @param array $args + * + * @return void + * + * @throws \BadMethodCallException When no persistent field exists by that name. + * @throws \InvalidArgumentException When the wrong target object type is passed to an association. + */ + private function set($field, $args) + { + $this->initializeDoctrine(); + + if ($this->cm->hasField($field) && !$this->cm->isIdentifier($field)) { + $this->$field = $args[0]; + } else if ($this->cm->hasAssociation($field) && $this->cm->isSingleValuedAssociation($field)) { + $targetClass = $this->cm->getAssociationTargetClass($field); + if (!($args[0] instanceof $targetClass) && $args[0] !== null) { + throw new \InvalidArgumentException("Expected persistent object of type '".$targetClass."'"); + } + $this->$field = $args[0]; + $this->completeOwningSide($field, $targetClass, $args[0]); + } else { + throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getName()."'"); + } + } + + /** + * Gets a persistent field value. + * + * @param string $field + * + * @return mixed + * + * @throws \BadMethodCallException When no persistent field exists by that name. + */ + private function get($field) + { + $this->initializeDoctrine(); + + if ( $this->cm->hasField($field) || $this->cm->hasAssociation($field) ) { + return $this->$field; + } else { + throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getName()."'"); + } + } + + /** + * If this is an inverse side association, completes the owning side. + * + * @param string $field + * @param ClassMetadata $targetClass + * @param object $targetObject + * + * @return void + */ + private function completeOwningSide($field, $targetClass, $targetObject) + { + // add this object on the owning side as well, for obvious infinite recursion + // reasons this is only done when called on the inverse side. + if ($this->cm->isAssociationInverseSide($field)) { + $mappedByField = $this->cm->getAssociationMappedByTargetField($field); + $targetMetadata = self::$objectManager->getClassMetadata($targetClass); + + $setter = ($targetMetadata->isCollectionValuedAssociation($mappedByField) ? "add" : "set").$mappedByField; + $targetObject->$setter($this); + } + } + + /** + * Adds an object to a collection. + * + * @param string $field + * @param array $args + * + * @return void + * + * @throws \BadMethodCallException + * @throws \InvalidArgumentException + */ + private function add($field, $args) + { + $this->initializeDoctrine(); + + if ($this->cm->hasAssociation($field) && $this->cm->isCollectionValuedAssociation($field)) { + $targetClass = $this->cm->getAssociationTargetClass($field); + if (!($args[0] instanceof $targetClass)) { + throw new \InvalidArgumentException("Expected persistent object of type '".$targetClass."'"); + } + if (!($this->$field instanceof Collection)) { + $this->$field = new ArrayCollection($this->$field ?: []); + } + $this->$field->add($args[0]); + $this->completeOwningSide($field, $targetClass, $args[0]); + } else { + throw new \BadMethodCallException("There is no method add".$field."() on ".$this->cm->getName()); + } + } + + /** + * Initializes Doctrine Metadata for this class. + * + * @return void + * + * @throws \RuntimeException + */ + private function initializeDoctrine() + { + if ($this->cm !== null) { + return; + } + + if (!self::$objectManager) { + throw new \RuntimeException("No runtime object manager set. Call PersistentObject#setObjectManager()."); + } + + $this->cm = self::$objectManager->getClassMetadata(get_class($this)); + } + + /** + * Magic methods. + * + * @param string $method + * @param array $args + * + * @return mixed + * + * @throws \BadMethodCallException + */ + public function __call($method, $args) + { + $command = substr($method, 0, 3); + $field = lcfirst(substr($method, 3)); + if ($command == "set") { + $this->set($field, $args); + } else if ($command == "get") { + return $this->get($field); + } else if ($command == "add") { + $this->add($field, $args); + } else { + throw new \BadMethodCallException("There is no method ".$method." on ".$this->cm->getName()); + } + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Proxy.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Proxy.php new file mode 100644 index 0000000000000000000000000000000000000000..3369eb9498e1bbcfe1ba8531119b2de7b331564d --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Proxy.php @@ -0,0 +1,59 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +/** + * Interface for proxy classes. + * + * @author Roman Borschel + * @since 2.2 + */ +interface Proxy +{ + /** + * Marker for Proxy class names. + * + * @var string + */ + const MARKER = '__CG__'; + + /** + * Length of the proxy marker. + * + * @var integer + */ + const MARKER_LENGTH = 6; + + /** + * Initializes this proxy if its not yet initialized. + * + * Acts as a no-op if already initialized. + * + * @return void + */ + public function __load(); + + /** + * Returns whether this proxy is initialized or not. + * + * @return bool + */ + public function __isInitialized(); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/PropertyChangedListener.php b/vendor/doctrine/common/lib/Doctrine/Common/PropertyChangedListener.php new file mode 100644 index 0000000000000000000000000000000000000000..1a59cd4dd8d199c1e2e4da61ea5840a2689915c3 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/PropertyChangedListener.php @@ -0,0 +1,45 @@ +. + */ + +namespace Doctrine\Common; + +/** + * Contract for classes that are potential listeners of a NotifyPropertyChanged + * implementor. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +interface PropertyChangedListener +{ + /** + * Notifies the listener of a property change. + * + * @param object $sender The object on which the property changed. + * @param string $propertyName The name of the property that changed. + * @param mixed $oldValue The old value of the property that changed. + * @param mixed $newValue The new value of the property that changed. + * + * @return void + */ + function propertyChanged($sender, $propertyName, $oldValue, $newValue); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..7eb216bfc57ef675ce4ed23f6d681ab2567d4b92 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php @@ -0,0 +1,248 @@ +. + */ + +namespace Doctrine\Common\Proxy; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Persistence\Mapping\ClassMetadataFactory; +use Doctrine\Common\Proxy\Exception\InvalidArgumentException; +use Doctrine\Common\Proxy\Exception\OutOfBoundsException; +use Doctrine\Common\Util\ClassUtils; + +/** + * Abstract factory for proxy objects. + * + * @author Benjamin Eberlei + */ +abstract class AbstractProxyFactory +{ + /** + * Never autogenerate a proxy and rely that it was generated by some + * process before deployment. + * + * @var integer + */ + const AUTOGENERATE_NEVER = 0; + + /** + * Always generates a new proxy in every request. + * + * This is only sane during development. + * + * @var integer + */ + const AUTOGENERATE_ALWAYS = 1; + + /** + * Autogenerate the proxy class when the proxy file does not exist. + * + * This strategy causes a file exists call whenever any proxy is used the + * first time in a request. + * + * @var integer + */ + const AUTOGENERATE_FILE_NOT_EXISTS = 2; + + /** + * Generate the proxy classes using eval(). + * + * This strategy is only sane for development, and even then it gives me + * the creeps a little. + * + * @var integer + */ + const AUTOGENERATE_EVAL = 3; + + /** + * @var \Doctrine\Common\Persistence\Mapping\ClassMetadataFactory + */ + private $metadataFactory; + + /** + * @var \Doctrine\Common\Proxy\ProxyGenerator the proxy generator responsible for creating the proxy classes/files. + */ + private $proxyGenerator; + + /** + * @var bool Whether to automatically (re)generate proxy classes. + */ + private $autoGenerate; + + /** + * @var \Doctrine\Common\Proxy\ProxyDefinition[] + */ + private $definitions = []; + + /** + * @param \Doctrine\Common\Proxy\ProxyGenerator $proxyGenerator + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadataFactory $metadataFactory + * @param bool|int $autoGenerate + */ + public function __construct(ProxyGenerator $proxyGenerator, ClassMetadataFactory $metadataFactory, $autoGenerate) + { + $this->proxyGenerator = $proxyGenerator; + $this->metadataFactory = $metadataFactory; + $this->autoGenerate = (int)$autoGenerate; + } + + /** + * Gets a reference proxy instance for the entity of the given type and identified by + * the given identifier. + * + * @param string $className + * @param array $identifier + * + * @return \Doctrine\Common\Proxy\Proxy + * + * @throws \Doctrine\Common\Proxy\Exception\OutOfBoundsException + */ + public function getProxy($className, array $identifier) + { + $definition = isset($this->definitions[$className]) + ? $this->definitions[$className] + : $this->getProxyDefinition($className); + $fqcn = $definition->proxyClassName; + $proxy = new $fqcn($definition->initializer, $definition->cloner); + + foreach ($definition->identifierFields as $idField) { + if (! isset($identifier[$idField])) { + throw OutOfBoundsException::missingPrimaryKeyValue($className, $idField); + } + + $definition->reflectionFields[$idField]->setValue($proxy, $identifier[$idField]); + } + + return $proxy; + } + + /** + * Generates proxy classes for all given classes. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata[] $classes The classes (ClassMetadata instances) + * for which to generate proxies. + * @param string $proxyDir The target directory of the proxy classes. If not specified, the + * directory configured on the Configuration of the EntityManager used + * by this factory is used. + * @return int Number of generated proxies. + */ + public function generateProxyClasses(array $classes, $proxyDir = null) + { + $generated = 0; + + foreach ($classes as $class) { + if ($this->skipClass($class)) { + continue; + } + + $proxyFileName = $this->proxyGenerator->getProxyFileName($class->getName(), $proxyDir); + + $this->proxyGenerator->generateProxyClass($class, $proxyFileName); + + $generated += 1; + } + + return $generated; + } + + /** + * Reset initialization/cloning logic for an un-initialized proxy + * + * @param \Doctrine\Common\Proxy\Proxy $proxy + * + * @return \Doctrine\Common\Proxy\Proxy + * + * @throws \Doctrine\Common\Proxy\Exception\InvalidArgumentException + */ + public function resetUninitializedProxy(Proxy $proxy) + { + if ($proxy->__isInitialized()) { + throw InvalidArgumentException::unitializedProxyExpected($proxy); + } + + $className = ClassUtils::getClass($proxy); + $definition = isset($this->definitions[$className]) + ? $this->definitions[$className] + : $this->getProxyDefinition($className); + + $proxy->__setInitializer($definition->initializer); + $proxy->__setCloner($definition->cloner); + + return $proxy; + } + + /** + * Get a proxy definition for the given class name. + * + * @param string $className + * + * @return ProxyDefinition + */ + private function getProxyDefinition($className) + { + $classMetadata = $this->metadataFactory->getMetadataFor($className); + $className = $classMetadata->getName(); // aliases and case sensitivity + + $this->definitions[$className] = $this->createProxyDefinition($className); + $proxyClassName = $this->definitions[$className]->proxyClassName; + + if ( ! class_exists($proxyClassName, false)) { + $fileName = $this->proxyGenerator->getProxyFileName($className); + + switch ($this->autoGenerate) { + case self::AUTOGENERATE_NEVER: + require $fileName; + break; + + case self::AUTOGENERATE_FILE_NOT_EXISTS: + if ( ! file_exists($fileName)) { + $this->proxyGenerator->generateProxyClass($classMetadata, $fileName); + } + require $fileName; + break; + + case self::AUTOGENERATE_ALWAYS: + $this->proxyGenerator->generateProxyClass($classMetadata, $fileName); + require $fileName; + break; + + case self::AUTOGENERATE_EVAL: + $this->proxyGenerator->generateProxyClass($classMetadata, false); + break; + } + } + + return $this->definitions[$className]; + } + + /** + * Determine if this class should be skipped during proxy generation. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata + * + * @return bool + */ + abstract protected function skipClass(ClassMetadata $metadata); + + /** + * @param string $className + * + * @return ProxyDefinition + */ + abstract protected function createProxyDefinition($className); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php new file mode 100644 index 0000000000000000000000000000000000000000..0aa930b229b7b7180d508d5a2482e2d9b1f0633a --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php @@ -0,0 +1,92 @@ +. + */ + +namespace Doctrine\Common\Proxy; + +use Doctrine\Common\Proxy\Exception\InvalidArgumentException; + +/** + * Special Autoloader for Proxy classes, which are not PSR-0 compliant. + * + * @author Benjamin Eberlei + */ +class Autoloader +{ + /** + * Resolves proxy class name to a filename based on the following pattern. + * + * 1. Remove Proxy namespace from class name. + * 2. Remove namespace separators from remaining class name. + * 3. Return PHP filename from proxy-dir with the result from 2. + * + * @param string $proxyDir + * @param string $proxyNamespace + * @param string $className + * + * @return string + * + * @throws InvalidArgumentException + */ + public static function resolveFile($proxyDir, $proxyNamespace, $className) + { + if (0 !== strpos($className, $proxyNamespace)) { + throw InvalidArgumentException::notProxyClass($className, $proxyNamespace); + } + + $className = str_replace('\\', '', substr($className, strlen($proxyNamespace) + 1)); + + return $proxyDir . DIRECTORY_SEPARATOR . $className . '.php'; + } + + /** + * Registers and returns autoloader callback for the given proxy dir and namespace. + * + * @param string $proxyDir + * @param string $proxyNamespace + * @param callable|null $notFoundCallback Invoked when the proxy file is not found. + * + * @return \Closure + * + * @throws InvalidArgumentException + */ + public static function register($proxyDir, $proxyNamespace, $notFoundCallback = null) + { + $proxyNamespace = ltrim($proxyNamespace, '\\'); + + if ( ! (null === $notFoundCallback || is_callable($notFoundCallback))) { + throw InvalidArgumentException::invalidClassNotFoundCallback($notFoundCallback); + } + + $autoloader = function ($className) use ($proxyDir, $proxyNamespace, $notFoundCallback) { + if (0 === strpos($className, $proxyNamespace)) { + $file = Autoloader::resolveFile($proxyDir, $proxyNamespace, $className); + + if ($notFoundCallback && ! file_exists($file)) { + call_user_func($notFoundCallback, $proxyDir, $proxyNamespace, $className); + } + + require $file; + } + }; + + spl_autoload_register($autoloader); + + return $autoloader; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..dff54d9fd2fa41d3871a04ac9a079448fb363b18 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php @@ -0,0 +1,92 @@ +. + */ + +namespace Doctrine\Common\Proxy\Exception; + +use Doctrine\Common\Persistence\Proxy; +use InvalidArgumentException as BaseInvalidArgumentException; + +/** + * Proxy Invalid Argument Exception. + * + * @link www.doctrine-project.org + * @since 2.4 + * @author Marco Pivetta + */ +class InvalidArgumentException extends BaseInvalidArgumentException implements ProxyException +{ + /** + * @return self + */ + public static function proxyDirectoryRequired() + { + return new self('You must configure a proxy directory. See docs for details'); + } + + /** + * @param string $className + * @param string $proxyNamespace + * + * @return self + */ + public static function notProxyClass($className, $proxyNamespace) + { + return new self(sprintf('The class "%s" is not part of the proxy namespace "%s"', $className, $proxyNamespace)); + } + + /** + * @param string $name + * + * @return self + */ + public static function invalidPlaceholder($name) + { + return new self(sprintf('Provided placeholder for "%s" must be either a string or a valid callable', $name)); + } + + /** + * @return self + */ + public static function proxyNamespaceRequired() + { + return new self('You must configure a proxy namespace'); + } + + /** + * @param Proxy $proxy + * + * @return self + */ + public static function unitializedProxyExpected(Proxy $proxy) + { + return new self(sprintf('Provided proxy of type "%s" must not be initialized.', get_class($proxy))); + } + + /** + * @param mixed $callback + * + * @return self + */ + public static function invalidClassNotFoundCallback($callback) + { + $type = is_object($callback) ? get_class($callback) : gettype($callback); + + return new self(sprintf('Invalid \$notFoundCallback given: must be a callable, "%s" given', $type)); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/OutOfBoundsException.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/OutOfBoundsException.php new file mode 100644 index 0000000000000000000000000000000000000000..3c7415c6578971d98bf1f97c581d424a42c29ddc --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/OutOfBoundsException.php @@ -0,0 +1,42 @@ +. + */ + +namespace Doctrine\Common\Proxy\Exception; + +use OutOfBoundsException as BaseOutOfBoundsException; + +/** + * Proxy Invalid Argument Exception. + * + * @link www.doctrine-project.org + * @author Fredrik Wendel + */ +class OutOfBoundsException extends BaseOutOfBoundsException implements ProxyException +{ + /** + * @param string $className + * @param string $idField + * + * @return self + */ + public static function missingPrimaryKeyValue($className, $idField) + { + return new self(sprintf("Missing value for primary key %s on %s", $idField, $className)); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/ProxyException.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/ProxyException.php new file mode 100644 index 0000000000000000000000000000000000000000..0d1ff1408f98e986b0010d25b48d44e9b4fe113a --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/ProxyException.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\Common\Proxy\Exception; + +/** + * Base exception interface for proxy exceptions. + * + * @link www.doctrine-project.org + * @since 2.4 + * @author Marco Pivetta + */ +interface ProxyException +{ +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php new file mode 100644 index 0000000000000000000000000000000000000000..154b9177995696aaaa48ec04badf34ffa220bac0 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php @@ -0,0 +1,64 @@ +. + */ + +namespace Doctrine\Common\Proxy\Exception; + +use UnexpectedValueException as BaseUnexpectedValueException; + +/** + * Proxy Unexpected Value Exception. + * + * @link www.doctrine-project.org + * @since 2.4 + * @author Marco Pivetta + */ +class UnexpectedValueException extends BaseUnexpectedValueException implements ProxyException +{ + /** + * @param string $proxyDirectory + * + * @return self + */ + public static function proxyDirectoryNotWritable($proxyDirectory) + { + return new self(sprintf('Your proxy directory "%s" must be writable', $proxyDirectory)); + } + + /** + * @param string $className + * @param string $methodName + * @param string $parameterName + * @param \Exception $previous + * + * @return self + */ + public static function invalidParameterTypeHint($className, $methodName, $parameterName, \Exception $previous) + { + return new self( + sprintf( + 'The type hint of parameter "%s" in method "%s" in class "%s" is invalid.', + $parameterName, + $methodName, + $className + ), + 0, + $previous + ); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Proxy.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Proxy.php new file mode 100644 index 0000000000000000000000000000000000000000..bd2b0887478dfdd9cb07457ac176907bb95279d9 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Proxy.php @@ -0,0 +1,90 @@ +. + */ + +namespace Doctrine\Common\Proxy; + +use Closure; +use Doctrine\Common\Persistence\Proxy as BaseProxy; + +/** + * Interface for proxy classes. + * + * @author Roman Borschel + * @author Marco Pivetta + * @since 2.4 + */ +interface Proxy extends BaseProxy +{ + /** + * Marks the proxy as initialized or not. + * + * @param boolean $initialized + * + * @return void + */ + public function __setInitialized($initialized); + + /** + * Sets the initializer callback to be used when initializing the proxy. That + * initializer should accept 3 parameters: $proxy, $method and $params. Those + * are respectively the proxy object that is being initialized, the method name + * that triggered initialization and the parameters passed to that method. + * + * @param Closure|null $initializer + * + * @return void + */ + public function __setInitializer(Closure $initializer = null); + + /** + * Retrieves the initializer callback used to initialize the proxy. + * + * @see __setInitializer + * + * @return Closure|null + */ + public function __getInitializer(); + + /** + * Sets the callback to be used when cloning the proxy. That initializer should accept + * a single parameter, which is the cloned proxy instance itself. + * + * @param Closure|null $cloner + * + * @return void + */ + public function __setCloner(Closure $cloner = null); + + /** + * Retrieves the callback to be used when cloning the proxy. + * + * @see __setCloner + * + * @return Closure|null + */ + public function __getCloner(); + + /** + * Retrieves the list of lazy loaded properties for a given proxy + * + * @return array Keys are the property names, and values are the default values + * for those properties. + */ + public function __getLazyProperties(); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..48b149a305ed04f122b73f2f010bcb73bfce7005 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php @@ -0,0 +1,70 @@ +. + */ + +namespace Doctrine\Common\Proxy; + +/** + * Definition structure how to create a proxy. + * + * @author Benjamin Eberlei + */ +class ProxyDefinition +{ + /** + * @var string + */ + public $proxyClassName; + + /** + * @var array + */ + public $identifierFields; + + /** + * @var \ReflectionProperty[] + */ + public $reflectionFields; + + /** + * @var callable + */ + public $initializer; + + /** + * @var callable + */ + public $cloner; + + /** + * @param string $proxyClassName + * @param array $identifierFields + * @param array $reflectionFields + * @param callable $initializer + * @param callable $cloner + */ + public function __construct($proxyClassName, array $identifierFields, array $reflectionFields, $initializer, $cloner) + { + $this->proxyClassName = $proxyClassName; + $this->identifierFields = $identifierFields; + $this->reflectionFields = $reflectionFields; + $this->initializer = $initializer; + $this->cloner = $cloner; + } +} + diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..925dcd1b7bc2a6c5213a422ab156cefd25dec19d --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php @@ -0,0 +1,1037 @@ +. + */ + +namespace Doctrine\Common\Proxy; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Proxy\Exception\InvalidArgumentException; +use Doctrine\Common\Proxy\Exception\UnexpectedValueException; +use Doctrine\Common\Util\ClassUtils; + +/** + * This factory is used to generate proxy classes. + * It builds proxies from given parameters, a template and class metadata. + * + * @author Marco Pivetta + * @since 2.4 + */ +class ProxyGenerator +{ + /** + * Used to match very simple id methods that don't need + * to be decorated since the identifier is known. + */ + const PATTERN_MATCH_ID_METHOD = '((public\s+)?(function\s+%s\s*\(\)\s*)\s*{\s*return\s*\$this->%s;\s*})i'; + + /** + * The namespace that contains all proxy classes. + * + * @var string + */ + private $proxyNamespace; + + /** + * The directory that contains all proxy classes. + * + * @var string + */ + private $proxyDirectory; + + /** + * Map of callables used to fill in placeholders set in the template. + * + * @var string[]|callable[] + */ + protected $placeholders = [ + 'baseProxyInterface' => Proxy::class, + 'additionalProperties' => '', + ]; + + /** + * Template used as a blueprint to generate proxies. + * + * @var string + */ + protected $proxyClassTemplate = '; + +/** + * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE\'S PROXY GENERATOR + */ +class extends \ implements \ +{ + /** + * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with + * three parameters, being respectively the proxy object to be initialized, the method that triggered the + * initialization process and an array of ordered parameters that were passed to that method. + * + * @see \Doctrine\Common\Persistence\Proxy::__setInitializer + */ + public $__initializer__; + + /** + * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object + * + * @see \Doctrine\Common\Persistence\Proxy::__setCloner + */ + public $__cloner__; + + /** + * @var boolean flag indicating if this object was already initialized + * + * @see \Doctrine\Common\Persistence\Proxy::__isInitialized + */ + public $__isInitialized__ = false; + + /** + * @var array properties to be lazy loaded, with keys being the property + * names and values being their default values + * + * @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties + */ + public static $lazyPropertiesDefaults = []; + + + + + + + + + + + + + + + + + + /** + * Forces initialization of the proxy + */ + public function __load() + { + $this->__initializer__ && $this->__initializer__->__invoke($this, \'__load\', []); + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __isInitialized() + { + return $this->__isInitialized__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitialized($initialized) + { + $this->__isInitialized__ = $initialized; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setInitializer(\Closure $initializer = null) + { + $this->__initializer__ = $initializer; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __getInitializer() + { + return $this->__initializer__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + */ + public function __setCloner(\Closure $cloner = null) + { + $this->__cloner__ = $cloner; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific cloning logic + */ + public function __getCloner() + { + return $this->__cloner__; + } + + /** + * {@inheritDoc} + * @internal generated method: use only when explicitly handling proxy specific loading logic + * @static + */ + public function __getLazyProperties() + { + return self::$lazyPropertiesDefaults; + } + + +} +'; + + /** + * Initializes a new instance of the ProxyFactory class that is + * connected to the given EntityManager. + * + * @param string $proxyDirectory The directory to use for the proxy classes. It must exist. + * @param string $proxyNamespace The namespace to use for the proxy classes. + * + * @throws InvalidArgumentException + */ + public function __construct($proxyDirectory, $proxyNamespace) + { + if ( ! $proxyDirectory) { + throw InvalidArgumentException::proxyDirectoryRequired(); + } + + if ( ! $proxyNamespace) { + throw InvalidArgumentException::proxyNamespaceRequired(); + } + + $this->proxyDirectory = $proxyDirectory; + $this->proxyNamespace = $proxyNamespace; + } + + /** + * Sets a placeholder to be replaced in the template. + * + * @param string $name + * @param string|callable $placeholder + * + * @throws InvalidArgumentException + */ + public function setPlaceholder($name, $placeholder) + { + if ( ! is_string($placeholder) && ! is_callable($placeholder)) { + throw InvalidArgumentException::invalidPlaceholder($name); + } + + $this->placeholders[$name] = $placeholder; + } + + /** + * Sets the base template used to create proxy classes. + * + * @param string $proxyClassTemplate + */ + public function setProxyClassTemplate($proxyClassTemplate) + { + $this->proxyClassTemplate = (string) $proxyClassTemplate; + } + + /** + * Generates a proxy class file. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class Metadata for the original class. + * @param string|bool $fileName Filename (full path) for the generated class. If none is given, eval() is used. + * + * @throws UnexpectedValueException + */ + public function generateProxyClass(ClassMetadata $class, $fileName = false) + { + preg_match_all('(<([a-zA-Z]+)>)', $this->proxyClassTemplate, $placeholderMatches); + + $placeholderMatches = array_combine($placeholderMatches[0], $placeholderMatches[1]); + $placeholders = []; + + foreach ($placeholderMatches as $placeholder => $name) { + $placeholders[$placeholder] = isset($this->placeholders[$name]) + ? $this->placeholders[$name] + : [$this, 'generate' . $name]; + } + + foreach ($placeholders as & $placeholder) { + if (is_callable($placeholder)) { + $placeholder = call_user_func($placeholder, $class); + } + } + + $proxyCode = strtr($this->proxyClassTemplate, $placeholders); + + if ( ! $fileName) { + $proxyClassName = $this->generateNamespace($class) . '\\' . $this->generateProxyShortClassName($class); + + if ( ! class_exists($proxyClassName)) { + eval(substr($proxyCode, 5)); + } + + return; + } + + $parentDirectory = dirname($fileName); + + if ( ! is_dir($parentDirectory) && (false === @mkdir($parentDirectory, 0775, true))) { + throw UnexpectedValueException::proxyDirectoryNotWritable($this->proxyDirectory); + } + + if ( ! is_writable($parentDirectory)) { + throw UnexpectedValueException::proxyDirectoryNotWritable($this->proxyDirectory); + } + + $tmpFileName = $fileName . '.' . uniqid('', true); + + file_put_contents($tmpFileName, $proxyCode); + @chmod($tmpFileName, 0664); + rename($tmpFileName, $fileName); + } + + /** + * Generates the proxy short class name to be used in the template. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateProxyShortClassName(ClassMetadata $class) + { + $proxyClassName = ClassUtils::generateProxyClassName($class->getName(), $this->proxyNamespace); + $parts = explode('\\', strrev($proxyClassName), 2); + + return strrev($parts[0]); + } + + /** + * Generates the proxy namespace. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateNamespace(ClassMetadata $class) + { + $proxyClassName = ClassUtils::generateProxyClassName($class->getName(), $this->proxyNamespace); + $parts = explode('\\', strrev($proxyClassName), 2); + + return strrev($parts[1]); + } + + /** + * Generates the original class name. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateClassName(ClassMetadata $class) + { + return ltrim($class->getName(), '\\'); + } + + /** + * Generates the array representation of lazy loaded public properties and their default values. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateLazyPropertiesDefaults(ClassMetadata $class) + { + $lazyPublicProperties = $this->getLazyLoadedPublicProperties($class); + $values = []; + + foreach ($lazyPublicProperties as $key => $value) { + $values[] = var_export($key, true) . ' => ' . var_export($value, true); + } + + return implode(', ', $values); + } + + /** + * Generates the constructor code (un-setting public lazy loaded properties, setting identifier field values). + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateConstructorImpl(ClassMetadata $class) + { + $constructorImpl = <<<'EOT' + /** + * @param \Closure $initializer + * @param \Closure $cloner + */ + public function __construct($initializer = null, $cloner = null) + { + +EOT; + $toUnset = []; + + foreach ($this->getLazyLoadedPublicProperties($class) as $lazyPublicProperty => $unused) { + $toUnset[] = '$this->' . $lazyPublicProperty; + } + + $constructorImpl .= (empty($toUnset) ? '' : ' unset(' . implode(', ', $toUnset) . ");\n") + . <<<'EOT' + + $this->__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } +EOT; + + return $constructorImpl; + } + + /** + * Generates the magic getter invoked when lazy loaded public properties are requested. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateMagicGet(ClassMetadata $class) + { + $lazyPublicProperties = array_keys($this->getLazyLoadedPublicProperties($class)); + $reflectionClass = $class->getReflectionClass(); + $hasParentGet = false; + $returnReference = ''; + $inheritDoc = ''; + + if ($reflectionClass->hasMethod('__get')) { + $hasParentGet = true; + $inheritDoc = '{@inheritDoc}'; + + if ($reflectionClass->getMethod('__get')->returnsReference()) { + $returnReference = '& '; + } + } + + if (empty($lazyPublicProperties) && ! $hasParentGet) { + return ''; + } + + $magicGet = <<__getLazyProperties())) { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]); + + return $this->$name; + } + + +EOT; + } + + if ($hasParentGet) { + $magicGet .= <<<'EOT' + $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]); + + return parent::__get($name); + +EOT; + } else { + $magicGet .= <<<'EOT' + trigger_error(sprintf('Undefined property: %s::$%s', __CLASS__, $name), E_USER_NOTICE); + +EOT; + } + + $magicGet .= " }"; + + return $magicGet; + } + + /** + * Generates the magic setter (currently unused). + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateMagicSet(ClassMetadata $class) + { + $lazyPublicProperties = $this->getLazyLoadedPublicProperties($class); + $hasParentSet = $class->getReflectionClass()->hasMethod('__set'); + + if (empty($lazyPublicProperties) && ! $hasParentSet) { + return ''; + } + + $inheritDoc = $hasParentSet ? '{@inheritDoc}' : ''; + $magicSet = <<__getLazyProperties())) { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]); + + $this->$name = $value; + + return; + } + + +EOT; + } + + if ($hasParentSet) { + $magicSet .= <<<'EOT' + $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]); + + return parent::__set($name, $value); +EOT; + } else { + $magicSet .= " \$this->\$name = \$value;"; + } + + $magicSet .= "\n }"; + + return $magicSet; + } + + /** + * Generates the magic issetter invoked when lazy loaded public properties are checked against isset(). + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateMagicIsset(ClassMetadata $class) + { + $lazyPublicProperties = array_keys($this->getLazyLoadedPublicProperties($class)); + $hasParentIsset = $class->getReflectionClass()->hasMethod('__isset'); + + if (empty($lazyPublicProperties) && ! $hasParentIsset) { + return ''; + } + + $inheritDoc = $hasParentIsset ? '{@inheritDoc}' : ''; + $magicIsset = <<__getLazyProperties())) { + $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]); + + return isset($this->$name); + } + + +EOT; + } + + if ($hasParentIsset) { + $magicIsset .= <<<'EOT' + $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]); + + return parent::__isset($name); + +EOT; + } else { + $magicIsset .= " return false;"; + } + + return $magicIsset . "\n }"; + } + + /** + * Generates implementation for the `__sleep` method of proxies. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateSleepImpl(ClassMetadata $class) + { + $hasParentSleep = $class->getReflectionClass()->hasMethod('__sleep'); + $inheritDoc = $hasParentSleep ? '{@inheritDoc}' : ''; + $sleepImpl = <<__isInitialized__) { + $properties = array_diff($properties, array_keys($this->__getLazyProperties())); + } + + return $properties; + } +EOT; + } + + $allProperties = ['__isInitialized__']; + + /* @var $prop \ReflectionProperty */ + foreach ($class->getReflectionClass()->getProperties() as $prop) { + if ($prop->isStatic()) { + continue; + } + + $allProperties[] = $prop->isPrivate() + ? "\0" . $prop->getDeclaringClass()->getName() . "\0" . $prop->getName() + : $prop->getName(); + } + + $lazyPublicProperties = array_keys($this->getLazyLoadedPublicProperties($class)); + $protectedProperties = array_diff($allProperties, $lazyPublicProperties); + + foreach ($allProperties as &$property) { + $property = var_export($property, true); + } + + foreach ($protectedProperties as &$property) { + $property = var_export($property, true); + } + + $allProperties = implode(', ', $allProperties); + $protectedProperties = implode(', ', $protectedProperties); + + return $sleepImpl . <<__isInitialized__) { + return [$allProperties]; + } + + return [$protectedProperties]; + } +EOT; + } + + /** + * Generates implementation for the `__wakeup` method of proxies. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateWakeupImpl(ClassMetadata $class) + { + $unsetPublicProperties = []; + $hasWakeup = $class->getReflectionClass()->hasMethod('__wakeup'); + + foreach (array_keys($this->getLazyLoadedPublicProperties($class)) as $lazyPublicProperty) { + $unsetPublicProperties[] = '$this->' . $lazyPublicProperty; + } + + $shortName = $this->generateProxyShortClassName($class); + $inheritDoc = $hasWakeup ? '{@inheritDoc}' : ''; + $wakeupImpl = <<__isInitialized__) { + \$this->__initializer__ = function ($shortName \$proxy) { + \$proxy->__setInitializer(null); + \$proxy->__setCloner(null); + + \$existingProperties = get_object_vars(\$proxy); + + foreach (\$proxy->__getLazyProperties() as \$property => \$defaultValue) { + if ( ! array_key_exists(\$property, \$existingProperties)) { + \$proxy->\$property = \$defaultValue; + } + } + }; + +EOT; + + if ( ! empty($unsetPublicProperties)) { + $wakeupImpl .= "\n unset(" . implode(', ', $unsetPublicProperties) . ");"; + } + + $wakeupImpl .= "\n }"; + + if ($hasWakeup) { + $wakeupImpl .= "\n parent::__wakeup();"; + } + + $wakeupImpl .= "\n }"; + + return $wakeupImpl; + } + + /** + * Generates implementation for the `__clone` method of proxies. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateCloneImpl(ClassMetadata $class) + { + $hasParentClone = $class->getReflectionClass()->hasMethod('__clone'); + $inheritDoc = $hasParentClone ? '{@inheritDoc}' : ''; + $callParentClone = $hasParentClone ? "\n parent::__clone();\n" : ''; + + return <<__cloner__ && \$this->__cloner__->__invoke(\$this, '__clone', []); +$callParentClone } +EOT; + } + + /** + * Generates decorated methods by picking those available in the parent class. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateMethods(ClassMetadata $class) + { + $methods = ''; + $methodNames = []; + $reflectionMethods = $class->getReflectionClass()->getMethods(\ReflectionMethod::IS_PUBLIC); + $skippedMethods = [ + '__sleep' => true, + '__clone' => true, + '__wakeup' => true, + '__get' => true, + '__set' => true, + '__isset' => true, + ]; + + foreach ($reflectionMethods as $method) { + $name = $method->getName(); + + if ( + $method->isConstructor() || + isset($skippedMethods[strtolower($name)]) || + isset($methodNames[$name]) || + $method->isFinal() || + $method->isStatic() || + ( ! $method->isPublic()) + ) { + continue; + } + + $methodNames[$name] = true; + $methods .= "\n /**\n" + . " * {@inheritDoc}\n" + . " */\n" + . ' public function '; + + if ($method->returnsReference()) { + $methods .= '&'; + } + + $methods .= $name . '(' . $this->buildParametersString($class, $method, $method->getParameters()) . ')'; + $methods .= $this->getMethodReturnType($method); + $methods .= "\n" . ' {' . "\n"; + + if ($this->isShortIdentifierGetter($method, $class)) { + $identifier = lcfirst(substr($name, 3)); + $fieldType = $class->getTypeOfField($identifier); + $cast = in_array($fieldType, ['integer', 'smallint']) ? '(int) ' : ''; + + $methods .= ' if ($this->__isInitialized__ === false) {' . "\n"; + $methods .= ' return ' . $cast . ' parent::' . $method->getName() . "();\n"; + $methods .= ' }' . "\n\n"; + } + + $invokeParamsString = implode(', ', $this->getParameterNamesForInvoke($method->getParameters())); + $callParamsString = implode(', ', $this->getParameterNamesForParentCall($method->getParameters())); + + $methods .= "\n \$this->__initializer__ " + . "&& \$this->__initializer__->__invoke(\$this, " . var_export($name, true) + . ", [" . $invokeParamsString . "]);" + . "\n\n return parent::" . $name . '(' . $callParamsString . ');' + . "\n" . ' }' . "\n"; + } + + return $methods; + } + + /** + * Generates the Proxy file name. + * + * @param string $className + * @param string $baseDirectory Optional base directory for proxy file name generation. + * If not specified, the directory configured on the Configuration of the + * EntityManager will be used by this factory. + * + * @return string + */ + public function getProxyFileName($className, $baseDirectory = null) + { + $baseDirectory = $baseDirectory ?: $this->proxyDirectory; + + return rtrim($baseDirectory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . Proxy::MARKER + . str_replace('\\', '', $className) . '.php'; + } + + /** + * Checks if the method is a short identifier getter. + * + * What does this mean? For proxy objects the identifier is already known, + * however accessing the getter for this identifier usually triggers the + * lazy loading, leading to a query that may not be necessary if only the + * ID is interesting for the userland code (for example in views that + * generate links to the entity, but do not display anything else). + * + * @param \ReflectionMethod $method + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return boolean + */ + private function isShortIdentifierGetter($method, ClassMetadata $class) + { + $identifier = lcfirst(substr($method->getName(), 3)); + $startLine = $method->getStartLine(); + $endLine = $method->getEndLine(); + $cheapCheck = ( + $method->getNumberOfParameters() == 0 + && substr($method->getName(), 0, 3) == 'get' + && in_array($identifier, $class->getIdentifier(), true) + && $class->hasField($identifier) + && (($endLine - $startLine) <= 4) + ); + + if ($cheapCheck) { + $code = file($method->getDeclaringClass()->getFileName()); + $code = trim(implode(' ', array_slice($code, $startLine - 1, $endLine - $startLine + 1))); + + $pattern = sprintf(self::PATTERN_MATCH_ID_METHOD, $method->getName(), $identifier); + + if (preg_match($pattern, $code)) { + return true; + } + } + + return false; + } + + /** + * Generates the list of public properties to be lazy loaded, with their default values. + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class + * + * @return mixed[] + */ + private function getLazyLoadedPublicProperties(ClassMetadata $class) + { + $defaultProperties = $class->getReflectionClass()->getDefaultProperties(); + $properties = []; + + foreach ($class->getReflectionClass()->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { + $name = $property->getName(); + + if (($class->hasField($name) || $class->hasAssociation($name)) && ! $class->isIdentifier($name)) { + $properties[$name] = $defaultProperties[$name]; + } + } + + return $properties; + } + + /** + * @param ClassMetadata $class + * @param \ReflectionMethod $method + * @param \ReflectionParameter[] $parameters + * + * @return string + */ + private function buildParametersString(ClassMetadata $class, \ReflectionMethod $method, array $parameters) + { + $parameterDefinitions = []; + + /* @var $param \ReflectionParameter */ + foreach ($parameters as $param) { + $parameterDefinition = ''; + + if ($parameterType = $this->getParameterType($class, $method, $param)) { + $parameterDefinition .= $parameterType . ' '; + } + + if ($param->isPassedByReference()) { + $parameterDefinition .= '&'; + } + + if (method_exists($param, 'isVariadic') && $param->isVariadic()) { + $parameterDefinition .= '...'; + } + + $parameters[] = '$' . $param->getName(); + $parameterDefinition .= '$' . $param->getName(); + + if ($param->isDefaultValueAvailable()) { + $parameterDefinition .= ' = ' . var_export($param->getDefaultValue(), true); + } + + $parameterDefinitions[] = $parameterDefinition; + } + + return implode(', ', $parameterDefinitions); + } + + /** + * @param ClassMetadata $class + * @param \ReflectionMethod $method + * @param \ReflectionParameter $parameter + * + * @return string|null + */ + private function getParameterType(ClassMetadata $class, \ReflectionMethod $method, \ReflectionParameter $parameter) + { + + // We need to pick the type hint class too + if ($parameter->isArray()) { + return 'array'; + } + + if ($parameter->isCallable()) { + return 'callable'; + } + + if (method_exists($parameter, 'hasType') && $parameter->hasType() && $parameter->getType()->isBuiltin()) { + return (string) $parameter->getType(); + } + + try { + $parameterClass = $parameter->getClass(); + + if ($parameterClass) { + return '\\' . $parameterClass->getName(); + } + } catch (\ReflectionException $previous) { + throw UnexpectedValueException::invalidParameterTypeHint( + $class->getName(), + $method->getName(), + $parameter->getName(), + $previous + ); + } + + return null; + } + + /** + * @param \ReflectionParameter[] $parameters + * + * @return string[] + */ + private function getParameterNamesForInvoke(array $parameters) + { + return array_map( + function (\ReflectionParameter $parameter) { + return '$' . $parameter->getName(); + }, + $parameters + ); + } + + /** + * @param \ReflectionParameter[] $parameters + * + * @return string[] + */ + private function getParameterNamesForParentCall(array $parameters) + { + return array_map( + function (\ReflectionParameter $parameter) { + $name = ''; + + if (method_exists($parameter, 'isVariadic') && $parameter->isVariadic()) { + $name .= '...'; + } + + $name .= '$' . $parameter->getName(); + + return $name; + }, + $parameters + ); + } + + /** + * @Param \ReflectionMethod $method + * + * @return string + */ + private function getMethodReturnType(\ReflectionMethod $method) + { + if (! (method_exists($method, 'hasReturnType') && $method->hasReturnType())) { + return ''; + } + + $returnType = $method->getReturnType(); + + if ($returnType->isBuiltin()) { + return ': ' . $returnType; + } + + $nameLower = strtolower((string) $returnType); + + if ('self' === $nameLower) { + return ': \\' . $method->getDeclaringClass()->getName(); + } + + if ('parent' === $nameLower) { + return ': \\' . $method->getDeclaringClass()->getParentClass()->getName(); + } + + return ': \\' . (string) $returnType; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/ClassFinderInterface.php b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/ClassFinderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..639fd69a6168101cc00479539eb1b50da82ad909 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/ClassFinderInterface.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\Common\Reflection; + +/** + * Finds a class in a PSR-0 structure. + * + * @author Karoly Negyesi + */ +interface ClassFinderInterface +{ + /** + * Finds a class. + * + * @param string $class The name of the class. + * + * @return string|null The name of the class or NULL if not found. + */ + public function findFile($class); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/Psr0FindFile.php b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/Psr0FindFile.php new file mode 100644 index 0000000000000000000000000000000000000000..418bb0f7b99dc827f202c2435ff58551a0a4f0b7 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/Psr0FindFile.php @@ -0,0 +1,79 @@ +. + */ + +namespace Doctrine\Common\Reflection; + +/** + * Finds a class in a PSR-0 structure. + * + * @author Karoly Negyesi + */ +class Psr0FindFile implements ClassFinderInterface +{ + /** + * The PSR-0 prefixes. + * + * @var array + */ + protected $prefixes; + + /** + * @param array $prefixes An array of prefixes. Each key is a PHP namespace and each value is + * a list of directories. + */ + public function __construct($prefixes) + { + $this->prefixes = $prefixes; + } + + /** + * {@inheritDoc} + */ + public function findFile($class) + { + $lastNsPos = strrpos($class, '\\'); + if ('\\' == $class[0]) { + $class = substr($class, 1); + } + + if (false !== $lastNsPos) { + // namespaced class name + $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $lastNsPos)) . DIRECTORY_SEPARATOR; + $className = substr($class, $lastNsPos + 1); + } else { + // PEAR-like class name + $classPath = null; + $className = $class; + } + + $classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; + + foreach ($this->prefixes as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (is_file($dir . DIRECTORY_SEPARATOR . $classPath)) { + return $dir . DIRECTORY_SEPARATOR . $classPath; + } + } + } + } + + return null; + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/ReflectionProviderInterface.php b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/ReflectionProviderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..3d970eeedb43c277140ef533d270bad191e91062 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/ReflectionProviderInterface.php @@ -0,0 +1,48 @@ +. + */ + +namespace Doctrine\Common\Reflection; + +interface ReflectionProviderInterface +{ + /** + * Gets the ReflectionClass equivalent for this class. + * + * @return \ReflectionClass + */ + public function getReflectionClass(); + + /** + * Gets the ReflectionMethod equivalent for this class. + * + * @param string $name + * + * @return \ReflectionMethod + */ + public function getReflectionMethod($name); + + /** + * Gets the ReflectionProperty equivalent for this class. + * + * @param string $name + * + * @return \ReflectionProperty + */ + public function getReflectionProperty($name); +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/RuntimePublicReflectionProperty.php b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/RuntimePublicReflectionProperty.php new file mode 100644 index 0000000000000000000000000000000000000000..4e8ef5303ab3c82490a1584a2a0b9d8bf3650113 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/RuntimePublicReflectionProperty.php @@ -0,0 +1,76 @@ +. + */ + +namespace Doctrine\Common\Reflection; + +use Doctrine\Common\Proxy\Proxy; +use ReflectionProperty; + +/** + * PHP Runtime Reflection Public Property - special overrides for public properties. + * + * @author Marco Pivetta + * @since 2.4 + */ +class RuntimePublicReflectionProperty extends ReflectionProperty +{ + /** + * {@inheritDoc} + * + * Checks is the value actually exist before fetching it. + * This is to avoid calling `__get` on the provided $object if it + * is a {@see \Doctrine\Common\Proxy\Proxy}. + */ + public function getValue($object = null) + { + $name = $this->getName(); + + if ($object instanceof Proxy && ! $object->__isInitialized()) { + $originalInitializer = $object->__getInitializer(); + $object->__setInitializer(null); + $val = isset($object->$name) ? $object->$name : null; + $object->__setInitializer($originalInitializer); + + return $val; + } + + return isset($object->$name) ? parent::getValue($object) : null; + } + + /** + * {@inheritDoc} + * + * Avoids triggering lazy loading via `__set` if the provided object + * is a {@see \Doctrine\Common\Proxy\Proxy}. + * @link https://bugs.php.net/bug.php?id=63463 + */ + public function setValue($object, $value = null) + { + if ( ! ($object instanceof Proxy && ! $object->__isInitialized())) { + parent::setValue($object, $value); + + return; + } + + $originalInitializer = $object->__getInitializer(); + $object->__setInitializer(null); + parent::setValue($object, $value); + $object->__setInitializer($originalInitializer); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php new file mode 100644 index 0000000000000000000000000000000000000000..2d0f5b0077699ed0aa4f7e1459bd85af3315b7c5 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php @@ -0,0 +1,433 @@ +. + */ + +namespace Doctrine\Common\Reflection; + +use ReflectionClass; +use ReflectionException; + +class StaticReflectionClass extends ReflectionClass +{ + /** + * The static reflection parser object. + * + * @var StaticReflectionParser + */ + private $staticReflectionParser; + + /** + * @param StaticReflectionParser $staticReflectionParser + */ + public function __construct(StaticReflectionParser $staticReflectionParser) + { + $this->staticReflectionParser = $staticReflectionParser; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return $this->staticReflectionParser->getClassName(); + } + + /** + * {@inheritDoc} + */ + public function getDocComment() + { + return $this->staticReflectionParser->getDocComment(); + } + + /** + * {@inheritDoc} + */ + public function getNamespaceName() + { + return $this->staticReflectionParser->getNamespaceName(); + } + + /** + * @return array + */ + public function getUseStatements() + { + return $this->staticReflectionParser->getUseStatements(); + } + + /** + * {@inheritDoc} + */ + public function getMethod($name) + { + return $this->staticReflectionParser->getReflectionMethod($name); + } + + /** + * {@inheritDoc} + */ + public function getProperty($name) + { + return $this->staticReflectionParser->getReflectionProperty($name); + } + + /** + * {@inheritDoc} + */ + public static function export($argument, $return = false) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getConstant($name) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getConstants() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getConstructor() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getDefaultProperties() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getEndLine() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getExtension() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getExtensionName() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getFileName() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getInterfaceNames() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getInterfaces() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getMethods($filter = null) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getModifiers() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getParentClass() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getProperties($filter = null) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getShortName() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getStartLine() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getStaticProperties() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getStaticPropertyValue($name, $default = '') + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getTraitAliases() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getTraitNames() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getTraits() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function hasConstant($name) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function hasMethod($name) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function hasProperty($name) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function implementsInterface($interface) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function inNamespace() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isAbstract() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isCloneable() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isFinal() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isInstance($object) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isInstantiable() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isInterface() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isInternal() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isIterateable() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isSubclassOf($class) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isTrait() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isUserDefined() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function newInstance($args) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function newInstanceArgs(array $args = []) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function newInstanceWithoutConstructor() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function setStaticPropertyValue($name, $value) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function __toString() + { + throw new ReflectionException('Method not implemented'); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionMethod.php b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionMethod.php new file mode 100644 index 0000000000000000000000000000000000000000..8d5380b322ca7040961f1008dc5887f8984e7659 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionMethod.php @@ -0,0 +1,362 @@ +. + */ + +namespace Doctrine\Common\Reflection; + +use ReflectionException; +use ReflectionMethod; + +class StaticReflectionMethod extends ReflectionMethod +{ + /** + * The PSR-0 parser object. + * + * @var StaticReflectionParser + */ + protected $staticReflectionParser; + + /** + * The name of the method. + * + * @var string + */ + protected $methodName; + + /** + * @param StaticReflectionParser $staticReflectionParser + * @param string $methodName + */ + public function __construct(StaticReflectionParser $staticReflectionParser, $methodName) + { + $this->staticReflectionParser = $staticReflectionParser; + $this->methodName = $methodName; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return $this->methodName; + } + + /** + * @return StaticReflectionParser + */ + protected function getStaticReflectionParser() + { + return $this->staticReflectionParser->getStaticReflectionParserForDeclaringClass('method', $this->methodName); + } + + /** + * {@inheritDoc} + */ + public function getDeclaringClass() + { + return $this->getStaticReflectionParser()->getReflectionClass(); + } + + /** + * {@inheritDoc} + */ + public function getNamespaceName() + { + return $this->getStaticReflectionParser()->getNamespaceName(); + } + + /** + * {@inheritDoc} + */ + public function getDocComment() + { + return $this->getStaticReflectionParser()->getDocComment('method', $this->methodName); + } + + /** + * @return array + */ + public function getUseStatements() + { + return $this->getStaticReflectionParser()->getUseStatements(); + } + + /** + * {@inheritDoc} + */ + public static function export($class, $name, $return = false) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getClosure($object) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getModifiers() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getPrototype() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function invoke($object, $parameter = null) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function invokeArgs($object, array $args) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isAbstract() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isConstructor() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isDestructor() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isFinal() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isPrivate() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isProtected() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isPublic() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isStatic() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function setAccessible($accessible) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function __toString() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getClosureThis() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getEndLine() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getExtension() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getExtensionName() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getFileName() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getNumberOfParameters() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getNumberOfRequiredParameters() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getParameters() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getShortName() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getStartLine() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getStaticVariables() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function inNamespace() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isClosure() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isDeprecated() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isInternal() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isUserDefined() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function returnsReference() + { + throw new ReflectionException('Method not implemented'); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionParser.php b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionParser.php new file mode 100644 index 0000000000000000000000000000000000000000..c48e9ba73a5e05f69c0843478098bda47ca90e4c --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionParser.php @@ -0,0 +1,307 @@ +. + */ + +namespace Doctrine\Common\Reflection; + +use Doctrine\Common\Annotations\TokenParser; +use ReflectionException; + +/** + * Parses a file for namespaces/use/class declarations. + * + * @author Karoly Negyesi + */ +class StaticReflectionParser implements ReflectionProviderInterface +{ + /** + * The fully qualified class name. + * + * @var string + */ + protected $className; + + /** + * The short class name. + * + * @var string + */ + protected $shortClassName; + + /** + * Whether the caller only wants class annotations. + * + * @var boolean. + */ + protected $classAnnotationOptimize; + + /** + * Whether the parser has run. + * + * @var boolean + */ + protected $parsed = false; + + /** + * The namespace of the class. + * + * @var string + */ + protected $namespace = ''; + + /** + * The use statements of the class. + * + * @var array + */ + protected $useStatements = []; + + /** + * The docComment of the class. + * + * @var string + */ + protected $docComment = [ + 'class' => '', + 'property' => [], + 'method' => [] + ]; + + /** + * The name of the class this class extends, if any. + * + * @var string + */ + protected $parentClassName = ''; + + /** + * The parent PSR-0 Parser. + * + * @var \Doctrine\Common\Reflection\StaticReflectionParser + */ + protected $parentStaticReflectionParser; + + /** + * Parses a class residing in a PSR-0 hierarchy. + * + * @param string $className The full, namespaced class name. + * @param ClassFinderInterface $finder A ClassFinder object which finds the class. + * @param boolean $classAnnotationOptimize Only retrieve the class docComment. + * Presumes there is only one statement per line. + */ + public function __construct($className, $finder, $classAnnotationOptimize = false) + { + $this->className = ltrim($className, '\\'); + $lastNsPos = strrpos($this->className, '\\'); + + if ($lastNsPos !== false) { + $this->namespace = substr($this->className, 0, $lastNsPos); + $this->shortClassName = substr($this->className, $lastNsPos + 1); + } else { + $this->shortClassName = $this->className; + } + + $this->finder = $finder; + $this->classAnnotationOptimize = $classAnnotationOptimize; + } + + /** + * @return void + */ + protected function parse() + { + if ($this->parsed || !$fileName = $this->finder->findFile($this->className)) { + return; + } + $this->parsed = true; + $contents = file_get_contents($fileName); + if ($this->classAnnotationOptimize) { + if (preg_match("/\A.*^\s*((abstract|final)\s+)?class\s+{$this->shortClassName}\s+/sm", $contents, $matches)) { + $contents = $matches[0]; + } + } + $tokenParser = new TokenParser($contents); + $docComment = ''; + while ($token = $tokenParser->next(false)) { + if (is_array($token)) { + switch ($token[0]) { + case T_USE: + $this->useStatements = array_merge($this->useStatements, $tokenParser->parseUseStatement()); + break; + case T_DOC_COMMENT: + $docComment = $token[1]; + break; + case T_CLASS: + $this->docComment['class'] = $docComment; + $docComment = ''; + break; + case T_VAR: + case T_PRIVATE: + case T_PROTECTED: + case T_PUBLIC: + $token = $tokenParser->next(); + if ($token[0] === T_VARIABLE) { + $propertyName = substr($token[1], 1); + $this->docComment['property'][$propertyName] = $docComment; + continue 2; + } + if ($token[0] !== T_FUNCTION) { + // For example, it can be T_FINAL. + continue 2; + } + // No break. + case T_FUNCTION: + // The next string after function is the name, but + // there can be & before the function name so find the + // string. + while (($token = $tokenParser->next()) && $token[0] !== T_STRING); + $methodName = $token[1]; + $this->docComment['method'][$methodName] = $docComment; + $docComment = ''; + break; + case T_EXTENDS: + $this->parentClassName = $tokenParser->parseClass(); + $nsPos = strpos($this->parentClassName, '\\'); + $fullySpecified = false; + if ($nsPos === 0) { + $fullySpecified = true; + } else { + if ($nsPos) { + $prefix = strtolower(substr($this->parentClassName, 0, $nsPos)); + $postfix = substr($this->parentClassName, $nsPos); + } else { + $prefix = strtolower($this->parentClassName); + $postfix = ''; + } + foreach ($this->useStatements as $alias => $use) { + if ($alias == $prefix) { + $this->parentClassName = '\\' . $use . $postfix; + $fullySpecified = true; + } + } + } + if (!$fullySpecified) { + $this->parentClassName = '\\' . $this->namespace . '\\' . $this->parentClassName; + } + break; + } + } + } + } + + /** + * @return StaticReflectionParser + */ + protected function getParentStaticReflectionParser() + { + if (empty($this->parentStaticReflectionParser)) { + $this->parentStaticReflectionParser = new static($this->parentClassName, $this->finder); + } + + return $this->parentStaticReflectionParser; + } + + /** + * @return string + */ + public function getClassName() + { + return $this->className; + } + + /** + * @return string + */ + public function getNamespaceName() + { + return $this->namespace; + } + + /** + * {@inheritDoc} + */ + public function getReflectionClass() + { + return new StaticReflectionClass($this); + } + + /** + * {@inheritDoc} + */ + public function getReflectionMethod($methodName) + { + return new StaticReflectionMethod($this, $methodName); + } + + /** + * {@inheritDoc} + */ + public function getReflectionProperty($propertyName) + { + return new StaticReflectionProperty($this, $propertyName); + } + + /** + * Gets the use statements from this file. + * + * @return array + */ + public function getUseStatements() + { + $this->parse(); + + return $this->useStatements; + } + + /** + * Gets the doc comment. + * + * @param string $type The type: 'class', 'property' or 'method'. + * @param string $name The name of the property or method, not needed for 'class'. + * + * @return string The doc comment, empty string if none. + */ + public function getDocComment($type = 'class', $name = '') + { + $this->parse(); + + return $name ? $this->docComment[$type][$name] : $this->docComment[$type]; + } + + /** + * Gets the PSR-0 parser for the declaring class. + * + * @param string $type The type: 'property' or 'method'. + * @param string $name The name of the property or method. + * + * @return StaticReflectionParser A static reflection parser for the declaring class. + * + * @throws ReflectionException + */ + public function getStaticReflectionParserForDeclaringClass($type, $name) + { + $this->parse(); + if (isset($this->docComment[$type][$name])) { + return $this; + } + if (!empty($this->parentClassName)) { + return $this->getParentStaticReflectionParser()->getStaticReflectionParserForDeclaringClass($type, $name); + } + throw new ReflectionException('Invalid ' . $type . ' "' . $name . '"'); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionProperty.php b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionProperty.php new file mode 100644 index 0000000000000000000000000000000000000000..7f6522bbac5bee97982ba673194e0a9da14cdff9 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionProperty.php @@ -0,0 +1,178 @@ +. + */ + +namespace Doctrine\Common\Reflection; + +use ReflectionException; +use ReflectionProperty; + +class StaticReflectionProperty extends ReflectionProperty +{ + /** + * The PSR-0 parser object. + * + * @var StaticReflectionParser + */ + protected $staticReflectionParser; + + /** + * The name of the property. + * + * @var string|null + */ + protected $propertyName; + + /** + * @param StaticReflectionParser $staticReflectionParser + * @param string|null $propertyName + */ + public function __construct(StaticReflectionParser $staticReflectionParser, $propertyName) + { + $this->staticReflectionParser = $staticReflectionParser; + $this->propertyName = $propertyName; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return $this->propertyName; + } + + /** + * @return StaticReflectionParser + */ + protected function getStaticReflectionParser() + { + return $this->staticReflectionParser->getStaticReflectionParserForDeclaringClass('property', $this->propertyName); + } + + /** + * {@inheritDoc} + */ + public function getDeclaringClass() + { + return $this->getStaticReflectionParser()->getReflectionClass(); + } + + /** + * {@inheritDoc} + */ + public function getDocComment() + { + return $this->getStaticReflectionParser()->getDocComment('property', $this->propertyName); + } + + /** + * @return array + */ + public function getUseStatements() + { + return $this->getStaticReflectionParser()->getUseStatements(); + } + + /** + * {@inheritDoc} + */ + public static function export($class, $name, $return = false) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getModifiers() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function getValue($object = null) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isDefault() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isPrivate() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isProtected() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isPublic() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function isStatic() + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function setAccessible($accessible) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function setValue($object, $value = null) + { + throw new ReflectionException('Method not implemented'); + } + + /** + * {@inheritDoc} + */ + public function __toString() + { + throw new ReflectionException('Method not implemented'); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php b/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php new file mode 100644 index 0000000000000000000000000000000000000000..49dc7bb172251c167c27d43d14907e16ab5c14a7 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php @@ -0,0 +1,109 @@ +. + */ + +namespace Doctrine\Common\Util; + +use Doctrine\Common\Persistence\Proxy; + +/** + * Class and reflection related functionality for objects that + * might or not be proxy objects at the moment. + * + * @author Benjamin Eberlei + * @author Johannes Schmitt + */ +class ClassUtils +{ + /** + * Gets the real class name of a class name that could be a proxy. + * + * @param string $class + * + * @return string + */ + public static function getRealClass($class) + { + if (false === $pos = strrpos($class, '\\'.Proxy::MARKER.'\\')) { + return $class; + } + + return substr($class, $pos + Proxy::MARKER_LENGTH + 2); + } + + /** + * Gets the real class name of an object (even if its a proxy). + * + * @param object $object + * + * @return string + */ + public static function getClass($object) + { + return self::getRealClass(get_class($object)); + } + + /** + * Gets the real parent class name of a class or object. + * + * @param string $className + * + * @return string + */ + public static function getParentClass($className) + { + return get_parent_class( self::getRealClass( $className ) ); + } + + /** + * Creates a new reflection class. + * + * @param string $class + * + * @return \ReflectionClass + */ + public static function newReflectionClass($class) + { + return new \ReflectionClass( self::getRealClass( $class ) ); + } + + /** + * Creates a new reflection object. + * + * @param object $object + * + * @return \ReflectionObject + */ + public static function newReflectionObject($object) + { + return self::newReflectionClass( self::getClass( $object ) ); + } + + /** + * Given a class name and a proxy namespace returns the proxy name. + * + * @param string $className + * @param string $proxyNamespace + * + * @return string + */ + public static function generateProxyClassName($className, $proxyNamespace) + { + return rtrim($proxyNamespace, '\\') . '\\'.Proxy::MARKER.'\\' . ltrim($className, '\\'); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php b/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php new file mode 100644 index 0000000000000000000000000000000000000000..7f675328f8010a860ac8e9438d2bda67dc0bc4a9 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php @@ -0,0 +1,158 @@ +. + */ + +namespace Doctrine\Common\Util; + +use Doctrine\Common\Collections\Collection; +use Doctrine\Common\Persistence\Proxy; + +/** + * Static class containing most used debug methods. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Giorgio Sironi + */ +final class Debug +{ + /** + * Private constructor (prevents instantiation). + */ + private function __construct() + { + } + + /** + * Prints a dump of the public, protected and private properties of $var. + * + * @link http://xdebug.org/ + * + * @param mixed $var The variable to dump. + * @param integer $maxDepth The maximum nesting level for object properties. + * @param boolean $stripTags Whether output should strip HTML tags. + * @param boolean $echo Send the dumped value to the output buffer + * + * @return string + */ + public static function dump($var, $maxDepth = 2, $stripTags = true, $echo = true) + { + $html = ini_get('html_errors'); + + if ($html !== true) { + ini_set('html_errors', true); + } + + if (extension_loaded('xdebug')) { + ini_set('xdebug.var_display_max_depth', $maxDepth); + } + + $var = self::export($var, $maxDepth++); + + ob_start(); + var_dump($var); + + $dump = ob_get_contents(); + + ob_end_clean(); + + $dumpText = ($stripTags ? strip_tags(html_entity_decode($dump)) : $dump); + + ini_set('html_errors', $html); + + if ($echo) { + echo $dumpText; + } + + return $dumpText; + } + + /** + * @param mixed $var + * @param int $maxDepth + * + * @return mixed + */ + public static function export($var, $maxDepth) + { + $return = null; + $isObj = is_object($var); + + if ($var instanceof Collection) { + $var = $var->toArray(); + } + + if ($maxDepth) { + if (is_array($var)) { + $return = []; + + foreach ($var as $k => $v) { + $return[$k] = self::export($v, $maxDepth - 1); + } + } else if ($isObj) { + $return = new \stdclass(); + if ($var instanceof \DateTime) { + $return->__CLASS__ = "DateTime"; + $return->date = $var->format('c'); + $return->timezone = $var->getTimeZone()->getName(); + } else { + $reflClass = ClassUtils::newReflectionObject($var); + $return->__CLASS__ = ClassUtils::getClass($var); + + if ($var instanceof Proxy) { + $return->__IS_PROXY__ = true; + $return->__PROXY_INITIALIZED__ = $var->__isInitialized(); + } + + if ($var instanceof \ArrayObject || $var instanceof \ArrayIterator) { + $return->__STORAGE__ = self::export($var->getArrayCopy(), $maxDepth - 1); + } + + foreach ($reflClass->getProperties() as $reflProperty) { + $name = $reflProperty->getName(); + + $reflProperty->setAccessible(true); + $return->$name = self::export($reflProperty->getValue($var), $maxDepth - 1); + } + } + } else { + $return = $var; + } + } else { + $return = is_object($var) ? get_class($var) + : (is_array($var) ? 'Array(' . count($var) . ')' : $var); + } + + return $return; + } + + /** + * Returns a string representation of an object. + * + * @param object $obj + * + * @return string + */ + public static function toString($obj) + { + return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_hash($obj); + } +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php b/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php new file mode 100644 index 0000000000000000000000000000000000000000..082dc78944846810d5a3e01c3799e0bbebb98086 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\Common\Util; + +use Doctrine\Common\Inflector\Inflector as BaseInflector; + +/** + * Doctrine inflector has static methods for inflecting text. + * + * Kept for backwards compatibility reasons, was moved to its own component. + */ +class Inflector extends BaseInflector +{ +} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Version.php b/vendor/doctrine/common/lib/Doctrine/Common/Version.php new file mode 100644 index 0000000000000000000000000000000000000000..872f169ac604482fda4e712ac9eeb4fbde704701 --- /dev/null +++ b/vendor/doctrine/common/lib/Doctrine/Common/Version.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\Common; + +/** + * Class to store and retrieve the version of Doctrine. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Version +{ + /** + * Current Doctrine Version. + */ + const VERSION = '2.6.2-DEV'; + + /** + * Compares a Doctrine version with the current one. + * + * @param string $version Doctrine version to compare. + * + * @return int -1 if older, 0 if it is the same, 1 if version passed as argument is newer. + */ + public static function compare($version) + { + $currentVersion = str_replace(' ', '', strtolower(self::VERSION)); + $version = str_replace(' ', '', $version); + + return version_compare($version, $currentVersion); + } +} diff --git a/vendor/doctrine/dbal/LICENSE b/vendor/doctrine/dbal/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4a91f0bf2803d308cce8010164548a811127bc27 --- /dev/null +++ b/vendor/doctrine/dbal/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2012 Doctrine Project + +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/vendor/doctrine/dbal/README.md b/vendor/doctrine/dbal/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b9956306add0b858c4053a3b2db4d771aa771bb0 --- /dev/null +++ b/vendor/doctrine/dbal/README.md @@ -0,0 +1,14 @@ +# Doctrine DBAL + +Powerful database abstraction layer with many features for database schema introspection, schema management and PDO abstraction. + +* Master: [![Build Status](https://secure.travis-ci.org/doctrine/dbal.png?branch=master)](http://travis-ci.org/doctrine/dbal) [![Dependency Status](https://www.versioneye.com/php/doctrine:dbal/dev-master/badge.png)](https://www.versioneye.com/php/doctrine:dbal/dev-master) +* 2.4: [![Build Status](https://secure.travis-ci.org/doctrine/dbal.png?branch=2.4)](http://travis-ci.org/doctrine/dbal) [![Dependency Status](https://www.versioneye.com/php/doctrine:dbal/2.4.2/badge.png)](https://www.versioneye.com/php/doctrine:dbal/2.4.2) +* 2.3: [![Build Status](https://secure.travis-ci.org/doctrine/dbal.png?branch=2.3)](http://travis-ci.org/doctrine/dbal) [![Dependency Status](https://www.versioneye.com/php/doctrine:dbal/2.3.4/badge.png)](https://www.versioneye.com/php/doctrine:dbal/2.3.4) + +## More resources: + +* [Website](http://www.doctrine-project.org/projects/dbal.html) +* [Documentation](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/) +* [Issue Tracker](http://www.doctrine-project.org/jira/browse/DBAL) +* [Downloads](http://github.com/doctrine/dbal/downloads) diff --git a/vendor/doctrine/dbal/SECURITY.md b/vendor/doctrine/dbal/SECURITY.md new file mode 100644 index 0000000000000000000000000000000000000000..e18f0dd78ab69667a85c3315aca55be49c0ec6d7 --- /dev/null +++ b/vendor/doctrine/dbal/SECURITY.md @@ -0,0 +1,14 @@ +Security +======== + +The Doctrine library is operating very close to your database and as such needs +to handle and make assumptions about SQL injection vulnerabilities. + +It is vital that you understand how Doctrine approaches security, because +we cannot protect you from SQL injection. + +Please read the documentation chapter on Security in Doctrine DBAL to +understand the assumptions we make. + +- [Latest security.rst page on Github](https://github.com/doctrine/dbal/blob/master/docs/en/reference/security.rst) +- [Security Page in rendered documentation](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/security.html) diff --git a/vendor/doctrine/dbal/UPGRADE.md b/vendor/doctrine/dbal/UPGRADE.md new file mode 100644 index 0000000000000000000000000000000000000000..1d628eef70eedc70a48f49b5c471b983866de6e5 --- /dev/null +++ b/vendor/doctrine/dbal/UPGRADE.md @@ -0,0 +1,244 @@ +# Upgrade to 2.5.1 + +## MINOR BC BREAK: Doctrine\DBAL\Schema\Table + +When adding indexes to ``Doctrine\DBAL\Schema\Table`` via ``addIndex()`` or ``addUniqueIndex()``, +duplicate indexes are not silently ignored/dropped anymore (based on semantics, not naming!). +Duplicate indexes are considered indexes that pass ``isFullfilledBy()`` or ``overrules()`` +in ``Doctrine\DBAL\Schema\Index``. +This is required to make the index renaming feature introduced in 2.5.0 work properly and avoid +issues in the ORM schema tool / DBAL schema manager which pretends users from updating +their schemas and migrate to DBAL 2.5.*. +Additionally it offers more flexibility in declaring indexes for the user and potentially fixes +related issues in the ORM. +With this change, the responsibility to decide which index is a "duplicate" is completely deferred +to the user. +Please also note that adding foreign key constraints to a table via ``addForeignKeyConstraint()``, +``addUnnamedForeignKeyConstraint()`` or ``addNamedForeignKeyConstraint()`` now first checks if an +appropriate index is already present and avoids adding an additional auto-generated one eventually. + +# Upgrade to 2.5 + +## BC BREAK: time type resets date fields to UNIX epoch + +When mapping `time` type field to PHP's `DateTime` instance all unused date fields are +reset to UNIX epoch (i.e. 1970-01-01). This might break any logic which relies on comparing +`DateTime` instances with date fields set to the current date. + +Use `!` format prefix (see http://php.net/manual/en/datetime.createfromformat.php) for parsing +time strings to prevent having different date fields when comparing user input and `DateTime` +instances as mapped by Doctrine. + +## BC BREAK: Doctrine\DBAL\Schema\Table + +The methods ``addIndex()`` and ``addUniqueIndex()`` in ``Doctrine\DBAL\Schema\Table`` +have an additional, optional parameter. If you override these methods, you should +add this new parameter to the declaration of your overridden methods. + +## BC BREAK: Doctrine\DBAL\Connection + +The visibility of the property ``$_platform`` in ``Doctrine\DBAL\Connection`` +was changed from protected to private. If you have subclassed ``Doctrine\DBAL\Connection`` +in your application and accessed ``$_platform`` directly, you have to change the code +portions to use ``getDatabasePlatform()`` instead to retrieve the underlying database +platform. +The reason for this change is the new automatic platform version detection feature, +which lazily evaluates the appropriate platform class to use for the underlying database +server version at runtime. +Please also note, that calling ``getDatabasePlatform()`` now needs to establish a connection +in order to evaluate the appropriate platform class if ``Doctrine\DBAL\Connection`` is not +already connected. Under the following circumstances, it is not possible anymore to retrieve +the platform instance from the connection object without having to do a real connect: + +1. ``Doctrine\DBAL\Connection`` was instantiated without the ``platform`` connection parameter. +2. ``Doctrine\DBAL\Connection`` was instantiated without the ``serverVersion`` connection parameter. +3. The underlying driver is "version aware" and can provide different platform instances + for different versions. +4. The underlying driver connection is "version aware" and can provide the database server + version without having to query for it. + +If one of the above conditions is NOT met, there is no need for ``Doctrine\DBAL\Connection`` +to do a connect when calling ``getDatabasePlatform()``. + +## datetime Type uses date_create() as fallback + +Before 2.5 the DateTime type always required a specific format, defined in +`$platform->getDateTimeFormatString()`, which could cause quite some troubles +on platforms that had various microtime precision formats. Starting with 2.5 +whenever the parsing of a date fails with the predefined platform format, +the `date_create()` function will be used to parse the date. + +This could cause some troubles when your date format is weird and not parsed +correctly by `date_create`, however since databases are rather strict on dates +there should be no problem. + +## Support for pdo_ibm driver removed + +The ``pdo_ibm`` driver is buggy and does not work well with Doctrine. Therefore it will no +longer be supported and has been removed from the ``Doctrine\DBAL\DriverManager`` drivers +map. It is highly encouraged to to use `ibm_db2` driver instead if you want to connect +to an IBM DB2 database as it is much more stable and secure. + +If for some reason you have to utilize the ``pdo_ibm`` driver you can still use the `driverClass` +connection parameter to explicitly specify the ``Doctrine\DBAL\Driver\PDOIbm\Driver`` class. +However be aware that you are doing this at your own risk and it will not be guaranteed that +Doctrine will work as expected. + +# Upgrade to 2.4 + +## Doctrine\DBAL\Schema\Constraint + +If you have custom classes that implement the constraint interface, you have to implement +an additional method ``getQuotedColumns`` now. This method is used to build proper constraint +SQL for columns that need to be quoted, like keywords reserved by the specific platform used. +The method has to return the same values as ``getColumns`` only that those column names that +need quotation have to be returned quoted for the given platform. + +# Upgrade to 2.3 + +## Oracle Session Init now sets Numeric Character + +Before 2.3 the Oracle Session Init did not care about the numeric character of the Session. +This could lead to problems on non english locale systems that required a comma as a floating +point seperator in Oracle. Since 2.3, using the Oracle Session Init on connection start the +client session will be altered to set the numeric character to ".,": + + ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '.,' + +See [DBAL-345](http://www.doctrine-project.org/jira/browse/DBAL-345) for more details. + +## Doctrine\DBAL\Connection and Doctrine\DBAL\Statement + +The query related methods including but not limited to executeQuery, exec, query, and executeUpdate +now wrap the driver exceptions such as PDOException with DBALException to add more debugging +information such as the executed SQL statement, and any bound parameters. + +If you want to retrieve the driver specific exception, you can retrieve it by calling the +``getPrevious()`` method on DBALException. + +Before: + + catch(\PDOException $ex) { + // ... + } + +After: + + catch(\Doctrine\DBAL\DBALException $ex) { + $pdoException = $ex->getPrevious(); + // ... + } + +## Doctrine\DBAL\Connection#setCharsetSQL() removed + +This method only worked on MySQL and it is considered unsafe on MySQL to use SET NAMES UTF-8 instead +of setting the charset directly on connection already. Replace this behavior with the +connection charset option: + +Before: + + $conn = DriverManager::getConnection(array(..)); + $conn->setCharset('UTF8'); + +After: + + $conn = DriverManager::getConnection(array('charset' => 'UTF8', ..)); + +## Doctrine\DBAL\Schema\Table#renameColumn() removed + +Doctrine\DBAL\Schema\Table#renameColumn() was removed, because it drops and recreates +the column instead. There is no fix available, because a schema diff +cannot reliably detect if a column was renamed or one column was created +and another one dropped. + +You should use explicit SQL ALTER TABLE statements to change columns names. + +## Schema Filter paths + +The Filter Schema assets expression is not wrapped in () anymore for the regexp automatically. + +Before: + + $config->setFilterSchemaAssetsExpression('foo'); + +After: + + $config->setFilterSchemaAssetsExpression('(foo)'); + +## Creating MySQL Tables now defaults to UTF-8 + +If you are creating a new MySQL Table through the Doctrine API, charset/collate are +now set to 'utf8'/'utf8_unicode_ci' by default. Previously the MySQL server defaults were used. + +# Upgrade to 2.2 + +## Doctrine\DBAL\Connection#insert and Doctrine\DBAL\Connection#update + +Both methods now accept an optional last parameter $types with binding types of the values passed. +This can potentially break child classes that have overwritten one of these methods. + +## Doctrine\DBAL\Connection#executeQuery + +Doctrine\DBAL\Connection#executeQuery() got a new last parameter "QueryCacheProfile $qcp" + +## Doctrine\DBAL\Driver\Statement split + +The Driver statement was split into a ResultStatement and the normal statement extending from it. +This separates the configuration and the retrieval API from a statement. + +## MsSql Platform/SchemaManager renamed + +The MsSqlPlatform was renamed to SQLServerPlatform, the MsSqlSchemaManager was renamed +to SQLServerSchemaManager. + +## Cleanup SQLServer Platform version mess + +DBAL 2.1 and before were actually only compatible to SQL Server 2008, not earlier versions. +Still other parts of the platform did use old features instead of newly introduced datatypes +in SQL Server 2005. Starting with DBAL 2.2 you can pick the Doctrine abstraction exactly +matching your SQL Server version. + +The PDO SqlSrv driver now uses the new `SQLServer2008Platform` as default platform. +This platform uses new features of SQL Server as of version 2008. This also includes a switch +in the used fields for "text" and "blob" field types to: + + "text" => "VARCHAR(MAX)" + "blob" => "VARBINARY(MAX)" + +Additionally `SQLServerPlatform` in DBAL 2.1 and before used "DATE", "TIME" and "DATETIME2" for dates. +This types are only available since version 2008 and the introduction of an explicit +SQLServer 2008 platform makes this dependency explicit. + +An `SQLServer2005Platform` was also introduced to differentiate the features between +versions 2003, earlier and 2005. + +With this change the `SQLServerPlatform` now throws an exception for using limit queries +with an offset, since SQLServer 2003 and lower do not support this feature. + +To use the old SQL Server Platform, because you are using SQL Server 2003 and below use +the following configuration code: + + use Doctrine\DBAL\DriverManager; + use Doctrine\DBAL\Platforms\SQLServerPlatform; + use Doctrine\DBAL\Platforms\SQLServer2005Platform; + + // You are using SQL Server 2003 or earlier + $conn = DriverManager::getConnection(array( + 'driver' => 'pdo_sqlsrv', + 'platform' => new SQLServerPlatform() + // .. additional parameters + )); + + // You are using SQL Server 2005 + $conn = DriverManager::getConnection(array( + 'driver' => 'pdo_sqlsrv', + 'platform' => new SQLServer2005Platform() + // .. additional parameters + )); + + // You are using SQL Server 2008 + $conn = DriverManager::getConnection(array( + 'driver' => 'pdo_sqlsrv', + // 2008 is default platform + // .. additional parameters + )); diff --git a/vendor/doctrine/dbal/bin/doctrine-dbal b/vendor/doctrine/dbal/bin/doctrine-dbal new file mode 100755 index 0000000000000000000000000000000000000000..0531527ddca6a1ea6d7fed02c64c4aa12a79884f --- /dev/null +++ b/vendor/doctrine/dbal/bin/doctrine-dbal @@ -0,0 +1,4 @@ +#!/usr/bin/env php +. + */ + +use Symfony\Component\Console\Helper\HelperSet; +use Doctrine\DBAL\Tools\Console\ConsoleRunner; + +$files = array(__DIR__ . '/../vendor/autoload.php', __DIR__ . '/../../../autoload.php'); +$loader = null; +$cwd = getcwd(); +$directories = array($cwd, $cwd . DIRECTORY_SEPARATOR . 'config'); +$configFile = null; + +foreach ($files as $file) { + if (file_exists($file)) { + $loader = require $file; + + break; + } +} + +if ( ! $loader) { + throw new RuntimeException('vendor/autoload.php could not be found. Did you run `php composer.phar install`?'); +} + +foreach ($directories as $directory) { + $configFile = $directory . DIRECTORY_SEPARATOR . 'cli-config.php'; + + if (file_exists($configFile)) { + break; + } +} + +if ( ! file_exists($configFile)) { + ConsoleRunner::printCliConfigTemplate(); + + exit(1); +} + +if ( ! is_readable($configFile)) { + echo 'Configuration file [' . $configFile . '] does not have read permission.' . PHP_EOL; + + exit(1); +} + +$commands = array(); +$helperSet = require $configFile; + +if ( ! $helperSet instanceof HelperSet) { + foreach ($GLOBALS as $helperSetCandidate) { + if ($helperSetCandidate instanceof HelperSet) { + $helperSet = $helperSetCandidate; + + break; + } + } +} + +ConsoleRunner::run($helperSet, $commands); diff --git a/vendor/doctrine/dbal/composer.json b/vendor/doctrine/dbal/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..acf3405a58dfbd5ceb5b007405965044a8b74e2a --- /dev/null +++ b/vendor/doctrine/dbal/composer.json @@ -0,0 +1,37 @@ +{ + "name": "doctrine/dbal", + "type": "library", + "description": "Database Abstraction Layer", + "keywords": ["dbal", "database", "persistence", "queryobject"], + "homepage": "http://www.doctrine-project.org", + "license": "MIT", + "authors": [ + {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, + {"name": "Roman Borschel", "email": "roman@code-factory.org"}, + {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, + {"name": "Jonathan Wage", "email": "jonwage@gmail.com"} + ], + "require": { + "php": ">=5.3.2", + "doctrine/common": ">=2.4,<2.8-dev" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "symfony/console": "2.*||^3.0" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": ["bin/doctrine-dbal"], + "autoload": { + "psr-0": { "Doctrine\\DBAL\\": "lib/" } + }, + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + } + }, + "archive": { + "exclude": ["!vendor", "tests", "*phpunit.xml", ".travis.yml", "build.xml", "build.properties", "composer.phar"] + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/ArrayStatement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/ArrayStatement.php new file mode 100644 index 0000000000000000000000000000000000000000..0752dda31bd13cf5deca89e04651f4bb5254666d --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/ArrayStatement.php @@ -0,0 +1,148 @@ +. + */ + +namespace Doctrine\DBAL\Cache; + +use Doctrine\DBAL\Driver\ResultStatement; +use PDO; + +class ArrayStatement implements \IteratorAggregate, ResultStatement +{ + /** + * @var array + */ + private $data; + + /** + * @var integer + */ + private $columnCount = 0; + + /** + * @var integer + */ + private $num = 0; + + /** + * @var integer + */ + private $defaultFetchMode = PDO::FETCH_BOTH; + + /** + * @param array $data + */ + public function __construct(array $data) + { + $this->data = $data; + if (count($data)) { + $this->columnCount = count($data[0]); + } + } + + /** + * {@inheritdoc} + */ + public function closeCursor() + { + unset ($this->data); + } + + /** + * {@inheritdoc} + */ + public function columnCount() + { + return $this->columnCount; + } + + /** + * {@inheritdoc} + */ + public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) + { + if ($arg2 !== null || $arg3 !== null) { + throw new \InvalidArgumentException("Caching layer does not support 2nd/3rd argument to setFetchMode()"); + } + + $this->defaultFetchMode = $fetchMode; + + return true; + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + $data = $this->fetchAll(); + + return new \ArrayIterator($data); + } + + /** + * {@inheritdoc} + */ + public function fetch($fetchMode = null) + { + if (isset($this->data[$this->num])) { + $row = $this->data[$this->num++]; + $fetchMode = $fetchMode ?: $this->defaultFetchMode; + if ($fetchMode === PDO::FETCH_ASSOC) { + return $row; + } elseif ($fetchMode === PDO::FETCH_NUM) { + return array_values($row); + } elseif ($fetchMode === PDO::FETCH_BOTH) { + return array_merge($row, array_values($row)); + } elseif ($fetchMode === PDO::FETCH_COLUMN) { + return reset($row); + } else { + throw new \InvalidArgumentException("Invalid fetch-style given for fetching result."); + } + } + + return false; + } + + /** + * {@inheritdoc} + */ + public function fetchAll($fetchMode = null) + { + $rows = array(); + while ($row = $this->fetch($fetchMode)) { + $rows[] = $row; + } + + return $rows; + } + + /** + * {@inheritdoc} + */ + public function fetchColumn($columnIndex = 0) + { + $row = $this->fetch(PDO::FETCH_NUM); + if (!isset($row[$columnIndex])) { + // TODO: verify this is correct behavior + return false; + } + + return $row[$columnIndex]; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/CacheException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/CacheException.php new file mode 100644 index 0000000000000000000000000000000000000000..6b3b5394bbbe77622372317826c43bba58d27aec --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/CacheException.php @@ -0,0 +1,43 @@ +. + */ + +namespace Doctrine\DBAL\Cache; + +/** + * @author Benjamin Eberlei + * @since 2.2 + */ +class CacheException extends \Doctrine\DBAL\DBALException +{ + /** + * @return \Doctrine\DBAL\Cache\CacheException + */ + static public function noCacheKey() + { + return new self("No cache key was set."); + } + + /** + * @return \Doctrine\DBAL\Cache\CacheException + */ + static public function noResultDriverConfigured() + { + return new self("Trying to cache a query but no result driver is configured."); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php new file mode 100644 index 0000000000000000000000000000000000000000..330eec91f2312c5ca33d46629e16d5643d0fdabc --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php @@ -0,0 +1,141 @@ +. + */ + +namespace Doctrine\DBAL\Cache; + +use Doctrine\Common\Cache\Cache; + +/** + * Query Cache Profile handles the data relevant for query caching. + * + * It is a value object, setter methods return NEW instances. + * + * @author Benjamin Eberlei + */ +class QueryCacheProfile +{ + /** + * @var \Doctrine\Common\Cache\Cache|null + */ + private $resultCacheDriver; + + /** + * @var integer + */ + private $lifetime = 0; + + /** + * @var string|null + */ + private $cacheKey; + + /** + * @param integer $lifetime + * @param string|null $cacheKey + * @param \Doctrine\Common\Cache\Cache|null $resultCache + */ + public function __construct($lifetime = 0, $cacheKey = null, Cache $resultCache = null) + { + $this->lifetime = $lifetime; + $this->cacheKey = $cacheKey; + $this->resultCacheDriver = $resultCache; + } + + /** + * @return \Doctrine\Common\Cache\Cache|null + */ + public function getResultCacheDriver() + { + return $this->resultCacheDriver; + } + + /** + * @return integer + */ + public function getLifetime() + { + return $this->lifetime; + } + + /** + * @return string + * + * @throws \Doctrine\DBAL\Cache\CacheException + */ + public function getCacheKey() + { + if ($this->cacheKey === null) { + throw CacheException::noCacheKey(); + } + + return $this->cacheKey; + } + + /** + * Generates the real cache key from query, params and types. + * + * @param string $query + * @param array $params + * @param array $types + * + * @return array + */ + public function generateCacheKeys($query, $params, $types) + { + $realCacheKey = $query . "-" . serialize($params) . "-" . serialize($types); + // should the key be automatically generated using the inputs or is the cache key set? + if ($this->cacheKey === null) { + $cacheKey = sha1($realCacheKey); + } else { + $cacheKey = $this->cacheKey; + } + + return array($cacheKey, $realCacheKey); + } + + /** + * @param \Doctrine\Common\Cache\Cache $cache + * + * @return \Doctrine\DBAL\Cache\QueryCacheProfile + */ + public function setResultCacheDriver(Cache $cache) + { + return new QueryCacheProfile($this->lifetime, $this->cacheKey, $cache); + } + + /** + * @param string|null $cacheKey + * + * @return \Doctrine\DBAL\Cache\QueryCacheProfile + */ + public function setCacheKey($cacheKey) + { + return new QueryCacheProfile($this->lifetime, $cacheKey, $this->resultCacheDriver); + } + + /** + * @param integer $lifetime + * + * @return \Doctrine\DBAL\Cache\QueryCacheProfile + */ + public function setLifetime($lifetime) + { + return new QueryCacheProfile($lifetime, $this->cacheKey, $this->resultCacheDriver); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php new file mode 100644 index 0000000000000000000000000000000000000000..0062255e5d280db3b3f5e7a3980c06f03c797143 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php @@ -0,0 +1,221 @@ +. + */ + +namespace Doctrine\DBAL\Cache; + +use Doctrine\DBAL\Driver\Statement; +use Doctrine\DBAL\Driver\ResultStatement; +use Doctrine\Common\Cache\Cache; +use PDO; + +/** + * Cache statement for SQL results. + * + * A result is saved in multiple cache keys, there is the originally specified + * cache key which is just pointing to result rows by key. The following things + * have to be ensured: + * + * 1. lifetime of the original key has to be longer than that of all the individual rows keys + * 2. if any one row key is missing the query has to be re-executed. + * + * Also you have to realize that the cache will load the whole result into memory at once to ensure 2. + * This means that the memory usage for cached results might increase by using this feature. + */ +class ResultCacheStatement implements \IteratorAggregate, ResultStatement +{ + /** + * @var \Doctrine\Common\Cache\Cache + */ + private $resultCache; + + /** + * + * @var string + */ + private $cacheKey; + + /** + * @var string + */ + private $realKey; + + /** + * @var integer + */ + private $lifetime; + + /** + * @var \Doctrine\DBAL\Driver\Statement + */ + private $statement; + + /** + * Did we reach the end of the statement? + * + * @var boolean + */ + private $emptied = false; + + /** + * @var array + */ + private $data; + + /** + * @var integer + */ + private $defaultFetchMode = PDO::FETCH_BOTH; + + /** + * @param \Doctrine\DBAL\Driver\Statement $stmt + * @param \Doctrine\Common\Cache\Cache $resultCache + * @param string $cacheKey + * @param string $realKey + * @param integer $lifetime + */ + public function __construct(Statement $stmt, Cache $resultCache, $cacheKey, $realKey, $lifetime) + { + $this->statement = $stmt; + $this->resultCache = $resultCache; + $this->cacheKey = $cacheKey; + $this->realKey = $realKey; + $this->lifetime = $lifetime; + } + + /** + * {@inheritdoc} + */ + public function closeCursor() + { + $this->statement->closeCursor(); + if ($this->emptied && $this->data !== null) { + $data = $this->resultCache->fetch($this->cacheKey); + if ( ! $data) { + $data = array(); + } + $data[$this->realKey] = $this->data; + + $this->resultCache->save($this->cacheKey, $data, $this->lifetime); + unset($this->data); + } + } + + /** + * {@inheritdoc} + */ + public function columnCount() + { + return $this->statement->columnCount(); + } + + /** + * {@inheritdoc} + */ + public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) + { + $this->defaultFetchMode = $fetchMode; + + return true; + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + $data = $this->fetchAll(); + + return new \ArrayIterator($data); + } + + /** + * {@inheritdoc} + */ + public function fetch($fetchMode = null) + { + if ($this->data === null) { + $this->data = array(); + } + + $row = $this->statement->fetch(PDO::FETCH_ASSOC); + if ($row) { + $this->data[] = $row; + + $fetchMode = $fetchMode ?: $this->defaultFetchMode; + + if ($fetchMode == PDO::FETCH_ASSOC) { + return $row; + } elseif ($fetchMode == PDO::FETCH_NUM) { + return array_values($row); + } elseif ($fetchMode == PDO::FETCH_BOTH) { + return array_merge($row, array_values($row)); + } elseif ($fetchMode == PDO::FETCH_COLUMN) { + return reset($row); + } else { + throw new \InvalidArgumentException("Invalid fetch-style given for caching result."); + } + } + $this->emptied = true; + + return false; + } + + /** + * {@inheritdoc} + */ + public function fetchAll($fetchMode = null) + { + $rows = array(); + while ($row = $this->fetch($fetchMode)) { + $rows[] = $row; + } + + return $rows; + } + + /** + * {@inheritdoc} + */ + public function fetchColumn($columnIndex = 0) + { + $row = $this->fetch(PDO::FETCH_NUM); + if (!isset($row[$columnIndex])) { + // TODO: verify this is correct behavior + return false; + } + + return $row[$columnIndex]; + } + + /** + * Returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement + * executed by the corresponding object. + * + * If the last SQL statement executed by the associated Statement object was a SELECT statement, + * some databases may return the number of rows returned by that statement. However, + * this behaviour is not guaranteed for all databases and should not be + * relied on for portable applications. + * + * @return integer The number of rows. + */ + public function rowCount() + { + return $this->statement->rowCount(); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php new file mode 100644 index 0000000000000000000000000000000000000000..ec7c130619caf3fd3600ce5905fd913110a5d0a9 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php @@ -0,0 +1,152 @@ +. + */ + +namespace Doctrine\DBAL; + +use Doctrine\DBAL\Logging\SQLLogger; +use Doctrine\Common\Cache\Cache; + +/** + * Configuration container for the Doctrine DBAL. + * + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @internal When adding a new configuration option just write a getter/setter + * pair and add the option to the _attributes array with a proper default value. + */ +class Configuration +{ + /** + * The attributes that are contained in the configuration. + * Values are default values. + * + * @var array + */ + protected $_attributes = array(); + + /** + * Sets the SQL logger to use. Defaults to NULL which means SQL logging is disabled. + * + * @param \Doctrine\DBAL\Logging\SQLLogger|null $logger + * + * @return void + */ + public function setSQLLogger(SQLLogger $logger = null) + { + $this->_attributes['sqlLogger'] = $logger; + } + + /** + * Gets the SQL logger that is used. + * + * @return \Doctrine\DBAL\Logging\SQLLogger|null + */ + public function getSQLLogger() + { + return isset($this->_attributes['sqlLogger']) ? + $this->_attributes['sqlLogger'] : null; + } + + /** + * Gets the cache driver implementation that is used for query result caching. + * + * @return \Doctrine\Common\Cache\Cache|null + */ + public function getResultCacheImpl() + { + return isset($this->_attributes['resultCacheImpl']) ? + $this->_attributes['resultCacheImpl'] : null; + } + + /** + * Sets the cache driver implementation that is used for query result caching. + * + * @param \Doctrine\Common\Cache\Cache $cacheImpl + * + * @return void + */ + public function setResultCacheImpl(Cache $cacheImpl) + { + $this->_attributes['resultCacheImpl'] = $cacheImpl; + } + + /** + * Sets the filter schema assets expression. + * + * Only include tables/sequences matching the filter expression regexp in + * schema instances generated for the active connection when calling + * {AbstractSchemaManager#createSchema()}. + * + * @param string $filterExpression + * + * @return void + */ + public function setFilterSchemaAssetsExpression($filterExpression) + { + $this->_attributes['filterSchemaAssetsExpression'] = $filterExpression; + } + + /** + * Returns filter schema assets expression. + * + * @return string|null + */ + public function getFilterSchemaAssetsExpression() + { + if (isset($this->_attributes['filterSchemaAssetsExpression'])) { + return $this->_attributes['filterSchemaAssetsExpression']; + } + + return null; + } + + /** + * Sets the default auto-commit mode for connections. + * + * If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual + * transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either + * the method commit or the method rollback. By default, new connections are in auto-commit mode. + * + * @param boolean $autoCommit True to enable auto-commit mode; false to disable it. + * + * @see getAutoCommit + */ + public function setAutoCommit($autoCommit) + { + $this->_attributes['autoCommit'] = (boolean) $autoCommit; + } + + /** + * Returns the default auto-commit mode for connections. + * + * @return boolean True if auto-commit mode is enabled by default for connections, false otherwise. + * + * @see setAutoCommit + */ + public function getAutoCommit() + { + if (isset($this->_attributes['autoCommit'])) { + return $this->_attributes['autoCommit']; + } + + return true; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..7e33c2436b6bab9d7bffd43d5381242d79ad5b8a --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php @@ -0,0 +1,1626 @@ +. + */ + +namespace Doctrine\DBAL; + +use Doctrine\DBAL\Driver\ServerInfoAwareConnection; +use Doctrine\DBAL\Exception\InvalidArgumentException; +use PDO; +use Closure; +use Exception; +use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Driver\Connection as DriverConnection; +use Doctrine\Common\EventManager; +use Doctrine\DBAL\Cache\ResultCacheStatement; +use Doctrine\DBAL\Cache\QueryCacheProfile; +use Doctrine\DBAL\Cache\ArrayStatement; +use Doctrine\DBAL\Cache\CacheException; +use Doctrine\DBAL\Driver\PingableConnection; + +/** + * A wrapper around a Doctrine\DBAL\Driver\Connection that adds features like + * events, transaction isolation levels, configuration, emulated transaction nesting, + * lazy connecting and more. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Konsta Vesterinen + * @author Lukas Smith (MDB2 library) + * @author Benjamin Eberlei + */ +class Connection implements DriverConnection +{ + /** + * Constant for transaction isolation level READ UNCOMMITTED. + */ + const TRANSACTION_READ_UNCOMMITTED = 1; + + /** + * Constant for transaction isolation level READ COMMITTED. + */ + const TRANSACTION_READ_COMMITTED = 2; + + /** + * Constant for transaction isolation level REPEATABLE READ. + */ + const TRANSACTION_REPEATABLE_READ = 3; + + /** + * Constant for transaction isolation level SERIALIZABLE. + */ + const TRANSACTION_SERIALIZABLE = 4; + + /** + * Represents an array of ints to be expanded by Doctrine SQL parsing. + * + * @var integer + */ + const PARAM_INT_ARRAY = 101; + + /** + * Represents an array of strings to be expanded by Doctrine SQL parsing. + * + * @var integer + */ + const PARAM_STR_ARRAY = 102; + + /** + * Offset by which PARAM_* constants are detected as arrays of the param type. + * + * @var integer + */ + const ARRAY_PARAM_OFFSET = 100; + + /** + * The wrapped driver connection. + * + * @var \Doctrine\DBAL\Driver\Connection + */ + protected $_conn; + + /** + * @var \Doctrine\DBAL\Configuration + */ + protected $_config; + + /** + * @var \Doctrine\Common\EventManager + */ + protected $_eventManager; + + /** + * @var \Doctrine\DBAL\Query\Expression\ExpressionBuilder + */ + protected $_expr; + + /** + * Whether or not a connection has been established. + * + * @var boolean + */ + private $_isConnected = false; + + /** + * The current auto-commit mode of this connection. + * + * @var boolean + */ + private $autoCommit = true; + + /** + * The transaction nesting level. + * + * @var integer + */ + private $_transactionNestingLevel = 0; + + /** + * The currently active transaction isolation level. + * + * @var integer + */ + private $_transactionIsolationLevel; + + /** + * If nested transactions should use savepoints. + * + * @var boolean + */ + private $_nestTransactionsWithSavepoints = false; + + /** + * The parameters used during creation of the Connection instance. + * + * @var array + */ + private $_params = array(); + + /** + * The DatabasePlatform object that provides information about the + * database platform used by the connection. + * + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $platform; + + /** + * The schema manager. + * + * @var \Doctrine\DBAL\Schema\AbstractSchemaManager + */ + protected $_schemaManager; + + /** + * The used DBAL driver. + * + * @var \Doctrine\DBAL\Driver + */ + protected $_driver; + + /** + * Flag that indicates whether the current transaction is marked for rollback only. + * + * @var boolean + */ + private $_isRollbackOnly = false; + + /** + * @var integer + */ + protected $defaultFetchMode = PDO::FETCH_ASSOC; + + /** + * Initializes a new instance of the Connection class. + * + * @param array $params The connection parameters. + * @param \Doctrine\DBAL\Driver $driver The driver to use. + * @param \Doctrine\DBAL\Configuration|null $config The configuration, optional. + * @param \Doctrine\Common\EventManager|null $eventManager The event manager, optional. + * + * @throws \Doctrine\DBAL\DBALException + */ + public function __construct(array $params, Driver $driver, Configuration $config = null, + EventManager $eventManager = null) + { + $this->_driver = $driver; + $this->_params = $params; + + if (isset($params['pdo'])) { + $this->_conn = $params['pdo']; + $this->_isConnected = true; + unset($this->_params['pdo']); + } + + // Create default config and event manager if none given + if ( ! $config) { + $config = new Configuration(); + } + + if ( ! $eventManager) { + $eventManager = new EventManager(); + } + + $this->_config = $config; + $this->_eventManager = $eventManager; + + $this->_expr = new Query\Expression\ExpressionBuilder($this); + + $this->autoCommit = $config->getAutoCommit(); + } + + /** + * Gets the parameters used during instantiation. + * + * @return array + */ + public function getParams() + { + return $this->_params; + } + + /** + * Gets the name of the database this Connection is connected to. + * + * @return string + */ + public function getDatabase() + { + return $this->_driver->getDatabase($this); + } + + /** + * Gets the hostname of the currently connected database. + * + * @return string|null + */ + public function getHost() + { + return isset($this->_params['host']) ? $this->_params['host'] : null; + } + + /** + * Gets the port of the currently connected database. + * + * @return mixed + */ + public function getPort() + { + return isset($this->_params['port']) ? $this->_params['port'] : null; + } + + /** + * Gets the username used by this connection. + * + * @return string|null + */ + public function getUsername() + { + return isset($this->_params['user']) ? $this->_params['user'] : null; + } + + /** + * Gets the password used by this connection. + * + * @return string|null + */ + public function getPassword() + { + return isset($this->_params['password']) ? $this->_params['password'] : null; + } + + /** + * Gets the DBAL driver instance. + * + * @return \Doctrine\DBAL\Driver + */ + public function getDriver() + { + return $this->_driver; + } + + /** + * Gets the Configuration used by the Connection. + * + * @return \Doctrine\DBAL\Configuration + */ + public function getConfiguration() + { + return $this->_config; + } + + /** + * Gets the EventManager used by the Connection. + * + * @return \Doctrine\Common\EventManager + */ + public function getEventManager() + { + return $this->_eventManager; + } + + /** + * Gets the DatabasePlatform for the connection. + * + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getDatabasePlatform() + { + if (null == $this->platform) { + $this->detectDatabasePlatform(); + } + + return $this->platform; + } + + /** + * Gets the ExpressionBuilder for the connection. + * + * @return \Doctrine\DBAL\Query\Expression\ExpressionBuilder + */ + public function getExpressionBuilder() + { + return $this->_expr; + } + + /** + * Establishes the connection with the database. + * + * @return boolean TRUE if the connection was successfully established, FALSE if + * the connection is already open. + */ + public function connect() + { + if ($this->_isConnected) return false; + + $driverOptions = isset($this->_params['driverOptions']) ? + $this->_params['driverOptions'] : array(); + $user = isset($this->_params['user']) ? $this->_params['user'] : null; + $password = isset($this->_params['password']) ? + $this->_params['password'] : null; + + $this->_conn = $this->_driver->connect($this->_params, $user, $password, $driverOptions); + $this->_isConnected = true; + + if (null === $this->platform) { + $this->detectDatabasePlatform(); + } + + if (false === $this->autoCommit) { + $this->beginTransaction(); + } + + if ($this->_eventManager->hasListeners(Events::postConnect)) { + $eventArgs = new Event\ConnectionEventArgs($this); + $this->_eventManager->dispatchEvent(Events::postConnect, $eventArgs); + } + + return true; + } + + /** + * Detects and sets the database platform. + * + * Evaluates custom platform class and version in order to set the correct platform. + * + * @throws DBALException if an invalid platform was specified for this connection. + */ + private function detectDatabasePlatform() + { + if ( ! isset($this->_params['platform'])) { + $version = $this->getDatabasePlatformVersion(); + + if (null !== $version) { + $this->platform = $this->_driver->createDatabasePlatformForVersion($version); + } else { + $this->platform = $this->_driver->getDatabasePlatform(); + } + } elseif ($this->_params['platform'] instanceof Platforms\AbstractPlatform) { + $this->platform = $this->_params['platform']; + } else { + throw DBALException::invalidPlatformSpecified(); + } + + $this->platform->setEventManager($this->_eventManager); + } + + /** + * Returns the version of the related platform if applicable. + * + * Returns null if either the driver is not capable to create version + * specific platform instances, no explicit server version was specified + * or the underlying driver connection cannot determine the platform + * version without having to query it (performance reasons). + * + * @return string|null + */ + private function getDatabasePlatformVersion() + { + // Driver does not support version specific platforms. + if ( ! $this->_driver instanceof VersionAwarePlatformDriver) { + return null; + } + + // Explicit platform version requested (supersedes auto-detection). + if (isset($this->_params['serverVersion'])) { + return $this->_params['serverVersion']; + } + + // If not connected, we need to connect now to determine the platform version. + if (null === $this->_conn) { + $this->connect(); + } + + // Automatic platform version detection. + if ($this->_conn instanceof ServerInfoAwareConnection && + ! $this->_conn->requiresQueryForServerVersion() + ) { + return $this->_conn->getServerVersion(); + } + + // Unable to detect platform version. + return null; + } + + /** + * Returns the current auto-commit mode for this connection. + * + * @return boolean True if auto-commit mode is currently enabled for this connection, false otherwise. + * + * @see setAutoCommit + */ + public function isAutoCommit() + { + return true === $this->autoCommit; + } + + /** + * Sets auto-commit mode for this connection. + * + * If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual + * transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either + * the method commit or the method rollback. By default, new connections are in auto-commit mode. + * + * NOTE: If this method is called during a transaction and the auto-commit mode is changed, the transaction is + * committed. If this method is called and the auto-commit mode is not changed, the call is a no-op. + * + * @param boolean $autoCommit True to enable auto-commit mode; false to disable it. + * + * @see isAutoCommit + */ + public function setAutoCommit($autoCommit) + { + $autoCommit = (boolean) $autoCommit; + + // Mode not changed, no-op. + if ($autoCommit === $this->autoCommit) { + return; + } + + $this->autoCommit = $autoCommit; + + // Commit all currently active transactions if any when switching auto-commit mode. + if (true === $this->_isConnected && 0 !== $this->_transactionNestingLevel) { + $this->commitAll(); + } + } + + /** + * Sets the fetch mode. + * + * @param integer $fetchMode + * + * @return void + */ + public function setFetchMode($fetchMode) + { + $this->defaultFetchMode = $fetchMode; + } + + /** + * Prepares and executes an SQL query and returns the first row of the result + * as an associative array. + * + * @param string $statement The SQL query. + * @param array $params The query parameters. + * @param array $types The query parameter types. + * + * @return array + */ + public function fetchAssoc($statement, array $params = array(), array $types = array()) + { + return $this->executeQuery($statement, $params, $types)->fetch(PDO::FETCH_ASSOC); + } + + /** + * Prepares and executes an SQL query and returns the first row of the result + * as a numerically indexed array. + * + * @param string $statement The SQL query to be executed. + * @param array $params The prepared statement params. + * @param array $types The query parameter types. + * + * @return array + */ + public function fetchArray($statement, array $params = array(), array $types = array()) + { + return $this->executeQuery($statement, $params, $types)->fetch(PDO::FETCH_NUM); + } + + /** + * Prepares and executes an SQL query and returns the value of a single column + * of the first row of the result. + * + * @param string $statement The SQL query to be executed. + * @param array $params The prepared statement params. + * @param integer $column The 0-indexed column number to retrieve. + * @param array $types The query parameter types. + * + * @return mixed + */ + public function fetchColumn($statement, array $params = array(), $column = 0, array $types = array()) + { + return $this->executeQuery($statement, $params, $types)->fetchColumn($column); + } + + /** + * Whether an actual connection to the database is established. + * + * @return boolean + */ + public function isConnected() + { + return $this->_isConnected; + } + + /** + * Checks whether a transaction is currently active. + * + * @return boolean TRUE if a transaction is currently active, FALSE otherwise. + */ + public function isTransactionActive() + { + return $this->_transactionNestingLevel > 0; + } + + /** + * Executes an SQL DELETE statement on a table. + * + * Table expression and columns are not escaped and are not safe for user-input. + * + * @param string $tableExpression The expression of the table on which to delete. + * @param array $identifier The deletion criteria. An associative array containing column-value pairs. + * @param array $types The types of identifiers. + * + * @return integer The number of affected rows. + * + * @throws InvalidArgumentException + */ + public function delete($tableExpression, array $identifier, array $types = array()) + { + if (empty($identifier)) { + throw InvalidArgumentException::fromEmptyCriteria(); + } + + $columnList = array(); + $criteria = array(); + $paramValues = array(); + + foreach ($identifier as $columnName => $value) { + $columnList[] = $columnName; + $criteria[] = $columnName . ' = ?'; + $paramValues[] = $value; + } + + return $this->executeUpdate( + 'DELETE FROM ' . $tableExpression . ' WHERE ' . implode(' AND ', $criteria), + $paramValues, + is_string(key($types)) ? $this->extractTypeValues($columnList, $types) : $types + ); + } + + /** + * Closes the connection. + * + * @return void + */ + public function close() + { + $this->_conn = null; + + $this->_isConnected = false; + } + + /** + * Sets the transaction isolation level. + * + * @param integer $level The level to set. + * + * @return integer + */ + public function setTransactionIsolation($level) + { + $this->_transactionIsolationLevel = $level; + + return $this->executeUpdate($this->getDatabasePlatform()->getSetTransactionIsolationSQL($level)); + } + + /** + * Gets the currently active transaction isolation level. + * + * @return integer The current transaction isolation level. + */ + public function getTransactionIsolation() + { + if (null === $this->_transactionIsolationLevel) { + $this->_transactionIsolationLevel = $this->getDatabasePlatform()->getDefaultTransactionIsolationLevel(); + } + + return $this->_transactionIsolationLevel; + } + + /** + * Executes an SQL UPDATE statement on a table. + * + * Table expression and columns are not escaped and are not safe for user-input. + * + * @param string $tableExpression The expression of the table to update quoted or unquoted. + * @param array $data An associative array containing column-value pairs. + * @param array $identifier The update criteria. An associative array containing column-value pairs. + * @param array $types Types of the merged $data and $identifier arrays in that order. + * + * @return integer The number of affected rows. + */ + public function update($tableExpression, array $data, array $identifier, array $types = array()) + { + $columnList = array(); + $set = array(); + $criteria = array(); + $paramValues = array(); + + foreach ($data as $columnName => $value) { + $columnList[] = $columnName; + $set[] = $columnName . ' = ?'; + $paramValues[] = $value; + } + + foreach ($identifier as $columnName => $value) { + $columnList[] = $columnName; + $criteria[] = $columnName . ' = ?'; + $paramValues[] = $value; + } + + if (is_string(key($types))) { + $types = $this->extractTypeValues($columnList, $types); + } + + $sql = 'UPDATE ' . $tableExpression . ' SET ' . implode(', ', $set) + . ' WHERE ' . implode(' AND ', $criteria); + + return $this->executeUpdate($sql, $paramValues, $types); + } + + /** + * Inserts a table row with specified data. + * + * Table expression and columns are not escaped and are not safe for user-input. + * + * @param string $tableExpression The expression of the table to insert data into, quoted or unquoted. + * @param array $data An associative array containing column-value pairs. + * @param array $types Types of the inserted data. + * + * @return integer The number of affected rows. + */ + public function insert($tableExpression, array $data, array $types = array()) + { + $this->connect(); + + if (empty($data)) { + return $this->executeUpdate('INSERT INTO ' . $tableExpression . ' ()' . ' VALUES ()'); + } + + $columnList = array(); + $paramPlaceholders = array(); + $paramValues = array(); + + foreach ($data as $columnName => $value) { + $columnList[] = $columnName; + $paramPlaceholders[] = '?'; + $paramValues[] = $value; + } + + return $this->executeUpdate( + 'INSERT INTO ' . $tableExpression . ' (' . implode(', ', $columnList) . ')' . + ' VALUES (' . implode(', ', $paramPlaceholders) . ')', + $paramValues, + is_string(key($types)) ? $this->extractTypeValues($columnList, $types) : $types + ); + } + + /** + * Extract ordered type list from an ordered column list and type map. + * + * @param array $columnList + * @param array $types + * + * @return array + */ + private function extractTypeValues(array $columnList, array $types) + { + $typeValues = array(); + + foreach ($columnList as $columnIndex => $columnName) { + $typeValues[] = isset($types[$columnName]) + ? $types[$columnName] + : \PDO::PARAM_STR; + } + + return $typeValues; + } + + /** + * Quotes a string so it can be safely used as a table or column name, even if + * it is a reserved name. + * + * Delimiting style depends on the underlying database platform that is being used. + * + * NOTE: Just because you CAN use quoted identifiers does not mean + * you SHOULD use them. In general, they end up causing way more + * problems than they solve. + * + * @param string $str The name to be quoted. + * + * @return string The quoted name. + */ + public function quoteIdentifier($str) + { + return $this->getDatabasePlatform()->quoteIdentifier($str); + } + + /** + * Quotes a given input parameter. + * + * @param mixed $input The parameter to be quoted. + * @param string|null $type The type of the parameter. + * + * @return string The quoted parameter. + */ + public function quote($input, $type = null) + { + $this->connect(); + + list($value, $bindingType) = $this->getBindingInfo($input, $type); + return $this->_conn->quote($value, $bindingType); + } + + /** + * Prepares and executes an SQL query and returns the result as an associative array. + * + * @param string $sql The SQL query. + * @param array $params The query parameters. + * @param array $types The query parameter types. + * + * @return array + */ + public function fetchAll($sql, array $params = array(), $types = array()) + { + return $this->executeQuery($sql, $params, $types)->fetchAll(); + } + + /** + * Prepares an SQL statement. + * + * @param string $statement The SQL statement to prepare. + * + * @return \Doctrine\DBAL\Driver\Statement The prepared statement. + * + * @throws \Doctrine\DBAL\DBALException + */ + public function prepare($statement) + { + $this->connect(); + + try { + $stmt = new Statement($statement, $this); + } catch (\Exception $ex) { + throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $statement); + } + + $stmt->setFetchMode($this->defaultFetchMode); + + return $stmt; + } + + /** + * Executes an, optionally parametrized, SQL query. + * + * If the query is parametrized, a prepared statement is used. + * If an SQLLogger is configured, the execution is logged. + * + * @param string $query The SQL query to execute. + * @param array $params The parameters to bind to the query, if any. + * @param array $types The types the previous parameters are in. + * @param \Doctrine\DBAL\Cache\QueryCacheProfile|null $qcp The query cache profile, optional. + * + * @return \Doctrine\DBAL\Driver\Statement The executed statement. + * + * @throws \Doctrine\DBAL\DBALException + */ + public function executeQuery($query, array $params = array(), $types = array(), QueryCacheProfile $qcp = null) + { + if ($qcp !== null) { + return $this->executeCacheQuery($query, $params, $types, $qcp); + } + + $this->connect(); + + $logger = $this->_config->getSQLLogger(); + if ($logger) { + $logger->startQuery($query, $params, $types); + } + + try { + if ($params) { + list($query, $params, $types) = SQLParserUtils::expandListParameters($query, $params, $types); + + $stmt = $this->_conn->prepare($query); + if ($types) { + $this->_bindTypedValues($stmt, $params, $types); + $stmt->execute(); + } else { + $stmt->execute($params); + } + } else { + $stmt = $this->_conn->query($query); + } + } catch (\Exception $ex) { + throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $query, $this->resolveParams($params, $types)); + } + + $stmt->setFetchMode($this->defaultFetchMode); + + if ($logger) { + $logger->stopQuery(); + } + + return $stmt; + } + + /** + * Executes a caching query. + * + * @param string $query The SQL query to execute. + * @param array $params The parameters to bind to the query, if any. + * @param array $types The types the previous parameters are in. + * @param \Doctrine\DBAL\Cache\QueryCacheProfile $qcp The query cache profile. + * + * @return \Doctrine\DBAL\Driver\ResultStatement + * + * @throws \Doctrine\DBAL\Cache\CacheException + */ + public function executeCacheQuery($query, $params, $types, QueryCacheProfile $qcp) + { + $resultCache = $qcp->getResultCacheDriver() ?: $this->_config->getResultCacheImpl(); + if ( ! $resultCache) { + throw CacheException::noResultDriverConfigured(); + } + + list($cacheKey, $realKey) = $qcp->generateCacheKeys($query, $params, $types); + + // fetch the row pointers entry + if ($data = $resultCache->fetch($cacheKey)) { + // is the real key part of this row pointers map or is the cache only pointing to other cache keys? + if (isset($data[$realKey])) { + $stmt = new ArrayStatement($data[$realKey]); + } elseif (array_key_exists($realKey, $data)) { + $stmt = new ArrayStatement(array()); + } + } + + if (!isset($stmt)) { + $stmt = new ResultCacheStatement($this->executeQuery($query, $params, $types), $resultCache, $cacheKey, $realKey, $qcp->getLifetime()); + } + + $stmt->setFetchMode($this->defaultFetchMode); + + return $stmt; + } + + /** + * Executes an, optionally parametrized, SQL query and returns the result, + * applying a given projection/transformation function on each row of the result. + * + * @param string $query The SQL query to execute. + * @param array $params The parameters, if any. + * @param \Closure $function The transformation function that is applied on each row. + * The function receives a single parameter, an array, that + * represents a row of the result set. + * + * @return array The projected result of the query. + */ + public function project($query, array $params, Closure $function) + { + $result = array(); + $stmt = $this->executeQuery($query, $params); + + while ($row = $stmt->fetch()) { + $result[] = $function($row); + } + + $stmt->closeCursor(); + + return $result; + } + + /** + * Executes an SQL statement, returning a result set as a Statement object. + * + * @return \Doctrine\DBAL\Driver\Statement + * + * @throws \Doctrine\DBAL\DBALException + */ + public function query() + { + $this->connect(); + + $args = func_get_args(); + + $logger = $this->_config->getSQLLogger(); + if ($logger) { + $logger->startQuery($args[0]); + } + + try { + switch (func_num_args()) { + case 1: + $statement = $this->_conn->query($args[0]); + break; + case 2: + $statement = $this->_conn->query($args[0], $args[1]); + break; + default: + $statement = call_user_func_array(array($this->_conn, 'query'), $args); + break; + } + } catch (\Exception $ex) { + throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $args[0]); + } + + $statement->setFetchMode($this->defaultFetchMode); + + if ($logger) { + $logger->stopQuery(); + } + + return $statement; + } + + /** + * Executes an SQL INSERT/UPDATE/DELETE query with the given parameters + * and returns the number of affected rows. + * + * This method supports PDO binding types as well as DBAL mapping types. + * + * @param string $query The SQL query. + * @param array $params The query parameters. + * @param array $types The parameter types. + * + * @return integer The number of affected rows. + * + * @throws \Doctrine\DBAL\DBALException + */ + public function executeUpdate($query, array $params = array(), array $types = array()) + { + $this->connect(); + + $logger = $this->_config->getSQLLogger(); + if ($logger) { + $logger->startQuery($query, $params, $types); + } + + try { + if ($params) { + list($query, $params, $types) = SQLParserUtils::expandListParameters($query, $params, $types); + + $stmt = $this->_conn->prepare($query); + if ($types) { + $this->_bindTypedValues($stmt, $params, $types); + $stmt->execute(); + } else { + $stmt->execute($params); + } + $result = $stmt->rowCount(); + } else { + $result = $this->_conn->exec($query); + } + } catch (\Exception $ex) { + throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $query, $this->resolveParams($params, $types)); + } + + if ($logger) { + $logger->stopQuery(); + } + + return $result; + } + + /** + * Executes an SQL statement and return the number of affected rows. + * + * @param string $statement + * + * @return integer The number of affected rows. + * + * @throws \Doctrine\DBAL\DBALException + */ + public function exec($statement) + { + $this->connect(); + + $logger = $this->_config->getSQLLogger(); + if ($logger) { + $logger->startQuery($statement); + } + + try { + $result = $this->_conn->exec($statement); + } catch (\Exception $ex) { + throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $statement); + } + + if ($logger) { + $logger->stopQuery(); + } + + return $result; + } + + /** + * Returns the current transaction nesting level. + * + * @return integer The nesting level. A value of 0 means there's no active transaction. + */ + public function getTransactionNestingLevel() + { + return $this->_transactionNestingLevel; + } + + /** + * Fetches the SQLSTATE associated with the last database operation. + * + * @return integer The last error code. + */ + public function errorCode() + { + $this->connect(); + + return $this->_conn->errorCode(); + } + + /** + * Fetches extended error information associated with the last database operation. + * + * @return array The last error information. + */ + public function errorInfo() + { + $this->connect(); + + return $this->_conn->errorInfo(); + } + + /** + * Returns the ID of the last inserted row, or the last value from a sequence object, + * depending on the underlying driver. + * + * Note: This method may not return a meaningful or consistent result across different drivers, + * because the underlying database may not even support the notion of AUTO_INCREMENT/IDENTITY + * columns or sequences. + * + * @param string|null $seqName Name of the sequence object from which the ID should be returned. + * + * @return string A string representation of the last inserted ID. + */ + public function lastInsertId($seqName = null) + { + $this->connect(); + + return $this->_conn->lastInsertId($seqName); + } + + /** + * Executes a function in a transaction. + * + * The function gets passed this Connection instance as an (optional) parameter. + * + * If an exception occurs during execution of the function or transaction commit, + * the transaction is rolled back and the exception re-thrown. + * + * @param \Closure $func The function to execute transactionally. + * + * @return void + * + * @throws \Exception + */ + public function transactional(Closure $func) + { + $this->beginTransaction(); + try { + $func($this); + $this->commit(); + } catch (Exception $e) { + $this->rollback(); + throw $e; + } + } + + /** + * Sets if nested transactions should use savepoints. + * + * @param boolean $nestTransactionsWithSavepoints + * + * @return void + * + * @throws \Doctrine\DBAL\ConnectionException + */ + public function setNestTransactionsWithSavepoints($nestTransactionsWithSavepoints) + { + if ($this->_transactionNestingLevel > 0) { + throw ConnectionException::mayNotAlterNestedTransactionWithSavepointsInTransaction(); + } + + if ( ! $this->getDatabasePlatform()->supportsSavepoints()) { + throw ConnectionException::savepointsNotSupported(); + } + + $this->_nestTransactionsWithSavepoints = (bool) $nestTransactionsWithSavepoints; + } + + /** + * Gets if nested transactions should use savepoints. + * + * @return boolean + */ + public function getNestTransactionsWithSavepoints() + { + return $this->_nestTransactionsWithSavepoints; + } + + /** + * Returns the savepoint name to use for nested transactions are false if they are not supported + * "savepointFormat" parameter is not set + * + * @return mixed A string with the savepoint name or false. + */ + protected function _getNestedTransactionSavePointName() + { + return 'DOCTRINE2_SAVEPOINT_'.$this->_transactionNestingLevel; + } + + /** + * Starts a transaction by suspending auto-commit mode. + * + * @return void + */ + public function beginTransaction() + { + $this->connect(); + + ++$this->_transactionNestingLevel; + + $logger = $this->_config->getSQLLogger(); + + if ($this->_transactionNestingLevel == 1) { + if ($logger) { + $logger->startQuery('"START TRANSACTION"'); + } + $this->_conn->beginTransaction(); + if ($logger) { + $logger->stopQuery(); + } + } elseif ($this->_nestTransactionsWithSavepoints) { + if ($logger) { + $logger->startQuery('"SAVEPOINT"'); + } + $this->createSavepoint($this->_getNestedTransactionSavePointName()); + if ($logger) { + $logger->stopQuery(); + } + } + } + + /** + * Commits the current transaction. + * + * @return void + * + * @throws \Doctrine\DBAL\ConnectionException If the commit failed due to no active transaction or + * because the transaction was marked for rollback only. + */ + public function commit() + { + if ($this->_transactionNestingLevel == 0) { + throw ConnectionException::noActiveTransaction(); + } + if ($this->_isRollbackOnly) { + throw ConnectionException::commitFailedRollbackOnly(); + } + + $this->connect(); + + $logger = $this->_config->getSQLLogger(); + + if ($this->_transactionNestingLevel == 1) { + if ($logger) { + $logger->startQuery('"COMMIT"'); + } + $this->_conn->commit(); + if ($logger) { + $logger->stopQuery(); + } + } elseif ($this->_nestTransactionsWithSavepoints) { + if ($logger) { + $logger->startQuery('"RELEASE SAVEPOINT"'); + } + $this->releaseSavepoint($this->_getNestedTransactionSavePointName()); + if ($logger) { + $logger->stopQuery(); + } + } + + --$this->_transactionNestingLevel; + + if (false === $this->autoCommit && 0 === $this->_transactionNestingLevel) { + $this->beginTransaction(); + } + } + + /** + * Commits all current nesting transactions. + */ + private function commitAll() + { + while (0 !== $this->_transactionNestingLevel) { + if (false === $this->autoCommit && 1 === $this->_transactionNestingLevel) { + // When in no auto-commit mode, the last nesting commit immediately starts a new transaction. + // Therefore we need to do the final commit here and then leave to avoid an infinite loop. + $this->commit(); + + return; + } + + $this->commit(); + } + } + + /** + * Cancels any database changes done during the current transaction. + * + * This method can be listened with onPreTransactionRollback and onTransactionRollback + * eventlistener methods. + * + * @throws \Doctrine\DBAL\ConnectionException If the rollback operation failed. + */ + public function rollBack() + { + if ($this->_transactionNestingLevel == 0) { + throw ConnectionException::noActiveTransaction(); + } + + $this->connect(); + + $logger = $this->_config->getSQLLogger(); + + if ($this->_transactionNestingLevel == 1) { + if ($logger) { + $logger->startQuery('"ROLLBACK"'); + } + $this->_transactionNestingLevel = 0; + $this->_conn->rollback(); + $this->_isRollbackOnly = false; + if ($logger) { + $logger->stopQuery(); + } + + if (false === $this->autoCommit) { + $this->beginTransaction(); + } + } elseif ($this->_nestTransactionsWithSavepoints) { + if ($logger) { + $logger->startQuery('"ROLLBACK TO SAVEPOINT"'); + } + $this->rollbackSavepoint($this->_getNestedTransactionSavePointName()); + --$this->_transactionNestingLevel; + if ($logger) { + $logger->stopQuery(); + } + } else { + $this->_isRollbackOnly = true; + --$this->_transactionNestingLevel; + } + } + + /** + * Creates a new savepoint. + * + * @param string $savepoint The name of the savepoint to create. + * + * @return void + * + * @throws \Doctrine\DBAL\ConnectionException + */ + public function createSavepoint($savepoint) + { + if ( ! $this->getDatabasePlatform()->supportsSavepoints()) { + throw ConnectionException::savepointsNotSupported(); + } + + $this->_conn->exec($this->platform->createSavePoint($savepoint)); + } + + /** + * Releases the given savepoint. + * + * @param string $savepoint The name of the savepoint to release. + * + * @return void + * + * @throws \Doctrine\DBAL\ConnectionException + */ + public function releaseSavepoint($savepoint) + { + if ( ! $this->getDatabasePlatform()->supportsSavepoints()) { + throw ConnectionException::savepointsNotSupported(); + } + + if ($this->platform->supportsReleaseSavepoints()) { + $this->_conn->exec($this->platform->releaseSavePoint($savepoint)); + } + } + + /** + * Rolls back to the given savepoint. + * + * @param string $savepoint The name of the savepoint to rollback to. + * + * @return void + * + * @throws \Doctrine\DBAL\ConnectionException + */ + public function rollbackSavepoint($savepoint) + { + if ( ! $this->getDatabasePlatform()->supportsSavepoints()) { + throw ConnectionException::savepointsNotSupported(); + } + + $this->_conn->exec($this->platform->rollbackSavePoint($savepoint)); + } + + /** + * Gets the wrapped driver connection. + * + * @return \Doctrine\DBAL\Driver\Connection + */ + public function getWrappedConnection() + { + $this->connect(); + + return $this->_conn; + } + + /** + * Gets the SchemaManager that can be used to inspect or change the + * database schema through the connection. + * + * @return \Doctrine\DBAL\Schema\AbstractSchemaManager + */ + public function getSchemaManager() + { + if ( ! $this->_schemaManager) { + $this->_schemaManager = $this->_driver->getSchemaManager($this); + } + + return $this->_schemaManager; + } + + /** + * Marks the current transaction so that the only possible + * outcome for the transaction to be rolled back. + * + * @return void + * + * @throws \Doctrine\DBAL\ConnectionException If no transaction is active. + */ + public function setRollbackOnly() + { + if ($this->_transactionNestingLevel == 0) { + throw ConnectionException::noActiveTransaction(); + } + $this->_isRollbackOnly = true; + } + + /** + * Checks whether the current transaction is marked for rollback only. + * + * @return boolean + * + * @throws \Doctrine\DBAL\ConnectionException If no transaction is active. + */ + public function isRollbackOnly() + { + if ($this->_transactionNestingLevel == 0) { + throw ConnectionException::noActiveTransaction(); + } + + return $this->_isRollbackOnly; + } + + /** + * Converts a given value to its database representation according to the conversion + * rules of a specific DBAL mapping type. + * + * @param mixed $value The value to convert. + * @param string $type The name of the DBAL mapping type. + * + * @return mixed The converted value. + */ + public function convertToDatabaseValue($value, $type) + { + return Type::getType($type)->convertToDatabaseValue($value, $this->getDatabasePlatform()); + } + + /** + * Converts a given value to its PHP representation according to the conversion + * rules of a specific DBAL mapping type. + * + * @param mixed $value The value to convert. + * @param string $type The name of the DBAL mapping type. + * + * @return mixed The converted type. + */ + public function convertToPHPValue($value, $type) + { + return Type::getType($type)->convertToPHPValue($value, $this->getDatabasePlatform()); + } + + /** + * Binds a set of parameters, some or all of which are typed with a PDO binding type + * or DBAL mapping type, to a given statement. + * + * @param \Doctrine\DBAL\Driver\Statement $stmt The statement to bind the values to. + * @param array $params The map/list of named/positional parameters. + * @param array $types The parameter types (PDO binding types or DBAL mapping types). + * + * @return void + * + * @internal Duck-typing used on the $stmt parameter to support driver statements as well as + * raw PDOStatement instances. + */ + private function _bindTypedValues($stmt, array $params, array $types) + { + // Check whether parameters are positional or named. Mixing is not allowed, just like in PDO. + if (is_int(key($params))) { + // Positional parameters + $typeOffset = array_key_exists(0, $types) ? -1 : 0; + $bindIndex = 1; + foreach ($params as $value) { + $typeIndex = $bindIndex + $typeOffset; + if (isset($types[$typeIndex])) { + $type = $types[$typeIndex]; + list($value, $bindingType) = $this->getBindingInfo($value, $type); + $stmt->bindValue($bindIndex, $value, $bindingType); + } else { + $stmt->bindValue($bindIndex, $value); + } + ++$bindIndex; + } + } else { + // Named parameters + foreach ($params as $name => $value) { + if (isset($types[$name])) { + $type = $types[$name]; + list($value, $bindingType) = $this->getBindingInfo($value, $type); + $stmt->bindValue($name, $value, $bindingType); + } else { + $stmt->bindValue($name, $value); + } + } + } + } + + /** + * Gets the binding type of a given type. The given type can be a PDO or DBAL mapping type. + * + * @param mixed $value The value to bind. + * @param mixed $type The type to bind (PDO or DBAL). + * + * @return array [0] => the (escaped) value, [1] => the binding type. + */ + private function getBindingInfo($value, $type) + { + if (is_string($type)) { + $type = Type::getType($type); + } + if ($type instanceof Type) { + $value = $type->convertToDatabaseValue($value, $this->getDatabasePlatform()); + $bindingType = $type->getBindingType(); + } else { + $bindingType = $type; // PDO::PARAM_* constants + } + + return array($value, $bindingType); + } + + /** + * Resolves the parameters to a format which can be displayed. + * + * @internal This is a purely internal method. If you rely on this method, you are advised to + * copy/paste the code as this method may change, or be removed without prior notice. + * + * @param array $params + * @param array $types + * + * @return array + */ + public function resolveParams(array $params, array $types) + { + $resolvedParams = array(); + + // Check whether parameters are positional or named. Mixing is not allowed, just like in PDO. + if (is_int(key($params))) { + // Positional parameters + $typeOffset = array_key_exists(0, $types) ? -1 : 0; + $bindIndex = 1; + foreach ($params as $value) { + $typeIndex = $bindIndex + $typeOffset; + if (isset($types[$typeIndex])) { + $type = $types[$typeIndex]; + list($value,) = $this->getBindingInfo($value, $type); + $resolvedParams[$bindIndex] = $value; + } else { + $resolvedParams[$bindIndex] = $value; + } + ++$bindIndex; + } + } else { + // Named parameters + foreach ($params as $name => $value) { + if (isset($types[$name])) { + $type = $types[$name]; + list($value,) = $this->getBindingInfo($value, $type); + $resolvedParams[$name] = $value; + } else { + $resolvedParams[$name] = $value; + } + } + } + + return $resolvedParams; + } + + /** + * Creates a new instance of a SQL query builder. + * + * @return \Doctrine\DBAL\Query\QueryBuilder + */ + public function createQueryBuilder() + { + return new Query\QueryBuilder($this); + } + + /** + * Ping the server + * + * When the server is not available the method returns FALSE. + * It is responsibility of the developer to handle this case + * and abort the request or reconnect manually: + * + * @example + * + * if ($conn->ping() === false) { + * $conn->close(); + * $conn->connect(); + * } + * + * It is undefined if the underlying driver attempts to reconnect + * or disconnect when the connection is not available anymore + * as long it returns TRUE when a reconnect succeeded and + * FALSE when the connection was dropped. + * + * @return bool + */ + public function ping() + { + $this->connect(); + + if ($this->_conn instanceof PingableConnection) { + return $this->_conn->ping(); + } + + try { + $this->query($this->getDatabasePlatform()->getDummySelectSQL()); + + return true; + } catch (DBALException $e) { + return false; + } + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/ConnectionException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/ConnectionException.php new file mode 100644 index 0000000000000000000000000000000000000000..86494b0361aa02ec2c49590ceba106b28987b947 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/ConnectionException.php @@ -0,0 +1,60 @@ +. + */ + +namespace Doctrine\DBAL; + +/** + * @link www.doctrine-project.org + * @since 2.0 + * @author Jonathan H. Wage . + */ + +namespace Doctrine\DBAL\Connections; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Configuration; +use Doctrine\Common\EventManager; +use Doctrine\DBAL\Event\ConnectionEventArgs; +use Doctrine\DBAL\Events; + +/** + * Master-Slave Connection + * + * Connection can be used with master-slave setups. + * + * Important for the understanding of this connection should be how and when + * it picks the slave or master. + * + * 1. Slave if master was never picked before and ONLY if 'getWrappedConnection' + * or 'executeQuery' is used. + * 2. Master picked when 'exec', 'executeUpdate', 'insert', 'delete', 'update', 'createSavepoint', + * 'releaseSavepoint', 'beginTransaction', 'rollback', 'commit', 'query' or + * 'prepare' is called. + * 3. If master was picked once during the lifetime of the connection it will always get picked afterwards. + * 4. One slave connection is randomly picked ONCE during a request. + * + * ATTENTION: You can write to the slave with this connection if you execute a write query without + * opening up a transaction. For example: + * + * $conn = DriverManager::getConnection(...); + * $conn->executeQuery("DELETE FROM table"); + * + * Be aware that Connection#executeQuery is a method specifically for READ + * operations only. + * + * This connection is limited to slave operations using the + * Connection#executeQuery operation only, because it wouldn't be compatible + * with the ORM or SchemaManager code otherwise. Both use all the other + * operations in a context where writes could happen to a slave, which makes + * this restricted approach necessary. + * + * You can manually connect to the master at any time by calling: + * + * $conn->connect('master'); + * + * Instantiation through the DriverManager looks like: + * + * @example + * + * $conn = DriverManager::getConnection(array( + * 'wrapperClass' => 'Doctrine\DBAL\Connections\MasterSlaveConnection', + * 'driver' => 'pdo_mysql', + * 'master' => array('user' => '', 'password' => '', 'host' => '', 'dbname' => ''), + * 'slaves' => array( + * array('user' => 'slave1', 'password', 'host' => '', 'dbname' => ''), + * array('user' => 'slave2', 'password', 'host' => '', 'dbname' => ''), + * ) + * )); + * + * You can also pass 'driverOptions' and any other documented option to each of this drivers to pass additional information. + * + * @author Lars Strojny + * @author Benjamin Eberlei + */ +class MasterSlaveConnection extends Connection +{ + /** + * Master and slave connection (one of the randomly picked slaves). + * + * @var \Doctrine\DBAL\Driver\Connection[] + */ + protected $connections = array('master' => null, 'slave' => null); + + /** + * You can keep the slave connection and then switch back to it + * during the request if you know what you are doing. + * + * @var boolean + */ + protected $keepSlave = false; + + /** + * Creates Master Slave Connection. + * + * @param array $params + * @param \Doctrine\DBAL\Driver $driver + * @param \Doctrine\DBAL\Configuration|null $config + * @param \Doctrine\Common\EventManager|null $eventManager + * + * @throws \InvalidArgumentException + */ + public function __construct(array $params, Driver $driver, Configuration $config = null, EventManager $eventManager = null) + { + if ( !isset($params['slaves']) || !isset($params['master'])) { + throw new \InvalidArgumentException('master or slaves configuration missing'); + } + if (count($params['slaves']) == 0) { + throw new \InvalidArgumentException('You have to configure at least one slaves.'); + } + + $params['master']['driver'] = $params['driver']; + foreach ($params['slaves'] as $slaveKey => $slave) { + $params['slaves'][$slaveKey]['driver'] = $params['driver']; + } + + $this->keepSlave = isset($params['keepSlave']) ? (bool) $params['keepSlave'] : false; + + parent::__construct($params, $driver, $config, $eventManager); + } + + /** + * Checks if the connection is currently towards the master or not. + * + * @return boolean + */ + public function isConnectedToMaster() + { + return $this->_conn !== null && $this->_conn === $this->connections['master']; + } + + /** + * {@inheritDoc} + */ + public function connect($connectionName = null) + { + $requestedConnectionChange = ($connectionName !== null); + $connectionName = $connectionName ?: 'slave'; + + if ($connectionName !== 'slave' && $connectionName !== 'master') { + throw new \InvalidArgumentException("Invalid option to connect(), only master or slave allowed."); + } + + // If we have a connection open, and this is not an explicit connection + // change request, then abort right here, because we are already done. + // This prevents writes to the slave in case of "keepSlave" option enabled. + if ($this->_conn && !$requestedConnectionChange) { + return false; + } + + $forceMasterAsSlave = false; + + if ($this->getTransactionNestingLevel() > 0) { + $connectionName = 'master'; + $forceMasterAsSlave = true; + } + + if ($this->connections[$connectionName]) { + $this->_conn = $this->connections[$connectionName]; + + if ($forceMasterAsSlave && ! $this->keepSlave) { + $this->connections['slave'] = $this->_conn; + } + + return false; + } + + if ($connectionName === 'master') { + // Set slave connection to master to avoid invalid reads + if ($this->connections['slave'] && ! $this->keepSlave) { + unset($this->connections['slave']); + } + + $this->connections['master'] = $this->_conn = $this->connectTo($connectionName); + + if ( ! $this->keepSlave) { + $this->connections['slave'] = $this->connections['master']; + } + } else { + $this->connections['slave'] = $this->_conn = $this->connectTo($connectionName); + } + + if ($this->_eventManager->hasListeners(Events::postConnect)) { + $eventArgs = new ConnectionEventArgs($this); + $this->_eventManager->dispatchEvent(Events::postConnect, $eventArgs); + } + + return true; + } + + /** + * Connects to a specific connection. + * + * @param string $connectionName + * + * @return \Doctrine\DBAL\Driver + */ + protected function connectTo($connectionName) + { + $params = $this->getParams(); + + $driverOptions = isset($params['driverOptions']) ? $params['driverOptions'] : array(); + + $connectionParams = $this->chooseConnectionConfiguration($connectionName, $params); + + $user = isset($connectionParams['user']) ? $connectionParams['user'] : null; + $password = isset($connectionParams['password']) ? $connectionParams['password'] : null; + + return $this->_driver->connect($connectionParams, $user, $password, $driverOptions); + } + + /** + * @param string $connectionName + * @param array $params + * + * @return mixed + */ + protected function chooseConnectionConfiguration($connectionName, $params) + { + if ($connectionName === 'master') { + return $params['master']; + } + + return $params['slaves'][array_rand($params['slaves'])]; + } + + /** + * {@inheritDoc} + */ + public function executeUpdate($query, array $params = array(), array $types = array()) + { + $this->connect('master'); + + return parent::executeUpdate($query, $params, $types); + } + + /** + * {@inheritDoc} + */ + public function beginTransaction() + { + $this->connect('master'); + + parent::beginTransaction(); + } + + /** + * {@inheritDoc} + */ + public function commit() + { + $this->connect('master'); + + parent::commit(); + } + + /** + * {@inheritDoc} + */ + public function rollBack() + { + $this->connect('master'); + + return parent::rollBack(); + } + + /** + * {@inheritDoc} + */ + public function delete($tableName, array $identifier, array $types = array()) + { + $this->connect('master'); + + return parent::delete($tableName, $identifier, $types); + } + + /** + * {@inheritDoc} + */ + public function close() + { + unset($this->connections['master']); + unset($this->connections['slave']); + + parent::close(); + + $this->_conn = null; + $this->connections = array('master' => null, 'slave' => null); + } + + /** + * {@inheritDoc} + */ + public function update($tableName, array $data, array $identifier, array $types = array()) + { + $this->connect('master'); + + return parent::update($tableName, $data, $identifier, $types); + } + + /** + * {@inheritDoc} + */ + public function insert($tableName, array $data, array $types = array()) + { + $this->connect('master'); + + return parent::insert($tableName, $data, $types); + } + + /** + * {@inheritDoc} + */ + public function exec($statement) + { + $this->connect('master'); + + return parent::exec($statement); + } + + /** + * {@inheritDoc} + */ + public function createSavepoint($savepoint) + { + $this->connect('master'); + + parent::createSavepoint($savepoint); + } + + /** + * {@inheritDoc} + */ + public function releaseSavepoint($savepoint) + { + $this->connect('master'); + + parent::releaseSavepoint($savepoint); + } + + /** + * {@inheritDoc} + */ + public function rollbackSavepoint($savepoint) + { + $this->connect('master'); + + parent::rollbackSavepoint($savepoint); + } + + /** + * {@inheritDoc} + */ + public function query() + { + $this->connect('master'); + + $args = func_get_args(); + + $logger = $this->getConfiguration()->getSQLLogger(); + if ($logger) { + $logger->startQuery($args[0]); + } + + $statement = call_user_func_array(array($this->_conn, 'query'), $args); + + if ($logger) { + $logger->stopQuery(); + } + + return $statement; + } + + /** + * {@inheritDoc} + */ + public function prepare($statement) + { + $this->connect('master'); + + return parent::prepare($statement); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php new file mode 100644 index 0000000000000000000000000000000000000000..b0eac0b36dc3e42341d13eda4f911a26a173e5bd --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php @@ -0,0 +1,259 @@ +. + */ + +namespace Doctrine\DBAL; + +use Doctrine\DBAL\Driver\DriverException; +use Doctrine\DBAL\Driver\ExceptionConverterDriver; + +class DBALException extends \Exception +{ + /** + * @param string $method + * + * @return \Doctrine\DBAL\DBALException + */ + public static function notSupported($method) + { + return new self("Operation '$method' is not supported by platform."); + } + + /** + * @return \Doctrine\DBAL\DBALException + */ + public static function invalidPlatformSpecified() + { + return new self( + "Invalid 'platform' option specified, need to give an instance of ". + "\Doctrine\DBAL\Platforms\AbstractPlatform."); + } + + /** + * Returns a new instance for an invalid specified platform version. + * + * @param string $version The invalid platform version given. + * @param string $expectedFormat The expected platform version format. + * + * @return DBALException + */ + public static function invalidPlatformVersionSpecified($version, $expectedFormat) + { + return new self( + sprintf( + 'Invalid platform version "%s" specified. ' . + 'The platform version has to be specified in the format: "%s".', + $version, + $expectedFormat + ) + ); + } + + /** + * @return \Doctrine\DBAL\DBALException + */ + public static function invalidPdoInstance() + { + return new self( + "The 'pdo' option was used in DriverManager::getConnection() but no ". + "instance of PDO was given." + ); + } + + /** + * @param string|null $url The URL that was provided in the connection parameters (if any). + * + * @return \Doctrine\DBAL\DBALException + */ + public static function driverRequired($url = null) + { + if ($url) { + return new self( + sprintf( + "The options 'driver' or 'driverClass' are mandatory if a connection URL without scheme " . + "is given to DriverManager::getConnection(). Given URL: %s", + $url + ) + ); + } + + return new self("The options 'driver' or 'driverClass' are mandatory if no PDO ". + "instance is given to DriverManager::getConnection()."); + } + + /** + * @param string $unknownDriverName + * @param array $knownDrivers + * + * @return \Doctrine\DBAL\DBALException + */ + public static function unknownDriver($unknownDriverName, array $knownDrivers) + { + return new self("The given 'driver' ".$unknownDriverName." is unknown, ". + "Doctrine currently supports only the following drivers: ".implode(", ", $knownDrivers)); + } + + /** + * @param \Doctrine\DBAL\Driver $driver + * @param \Exception $driverEx + * @param string $sql + * @param array $params + * + * @return \Doctrine\DBAL\DBALException + */ + public static function driverExceptionDuringQuery(Driver $driver, \Exception $driverEx, $sql, array $params = array()) + { + $msg = "An exception occurred while executing '".$sql."'"; + if ($params) { + $msg .= " with params " . self::formatParameters($params); + } + $msg .= ":\n\n".$driverEx->getMessage(); + + if ($driver instanceof ExceptionConverterDriver && $driverEx instanceof DriverException) { + return $driver->convertException($msg, $driverEx); + } + + return new self($msg, 0, $driverEx); + } + + /** + * @param \Doctrine\DBAL\Driver $driver + * @param \Exception $driverEx + * + * @return \Doctrine\DBAL\DBALException + */ + public static function driverException(Driver $driver, \Exception $driverEx) + { + $msg = "An exception occured in driver: " . $driverEx->getMessage(); + + if ($driver instanceof ExceptionConverterDriver && $driverEx instanceof DriverException) { + return $driver->convertException($msg, $driverEx); + } + + return new self($msg, 0, $driverEx); + } + + /** + * Returns a human-readable representation of an array of parameters. + * This properly handles binary data by returning a hex representation. + * + * @param array $params + * + * @return string + */ + private static function formatParameters(array $params) + { + return '[' . implode(', ', array_map(function ($param) { + $json = @json_encode($param); + + if (! is_string($json) || $json == 'null' && is_string($param)) { + // JSON encoding failed, this is not a UTF-8 string. + return '"\x' . implode('\x', str_split(bin2hex($param), 2)) . '"'; + } + + return $json; + }, $params)) . ']'; + } + + /** + * @param string $wrapperClass + * + * @return \Doctrine\DBAL\DBALException + */ + public static function invalidWrapperClass($wrapperClass) + { + return new self("The given 'wrapperClass' ".$wrapperClass." has to be a ". + "subtype of \Doctrine\DBAL\Connection."); + } + + /** + * @param string $driverClass + * + * @return \Doctrine\DBAL\DBALException + */ + public static function invalidDriverClass($driverClass) + { + return new self("The given 'driverClass' ".$driverClass." has to implement the ". + "\Doctrine\DBAL\Driver interface."); + } + + /** + * @param string $tableName + * + * @return \Doctrine\DBAL\DBALException + */ + public static function invalidTableName($tableName) + { + return new self("Invalid table name specified: ".$tableName); + } + + /** + * @param string $tableName + * + * @return \Doctrine\DBAL\DBALException + */ + public static function noColumnsSpecifiedForTable($tableName) + { + return new self("No columns specified for table ".$tableName); + } + + /** + * @return \Doctrine\DBAL\DBALException + */ + public static function limitOffsetInvalid() + { + return new self("Invalid Offset in Limit Query, it has to be larger or equal to 0."); + } + + /** + * @param string $name + * + * @return \Doctrine\DBAL\DBALException + */ + public static function typeExists($name) + { + return new self('Type '.$name.' already exists.'); + } + + /** + * @param string $name + * + * @return \Doctrine\DBAL\DBALException + */ + public static function unknownColumnType($name) + { + return new self('Unknown column type "'.$name.'" requested. Any Doctrine type that you use has ' . + 'to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the ' . + 'known types with \Doctrine\DBAL\Types\Type::getTypesMap(). If this error occurs during database ' . + 'introspection then you might have forgot to register all database types for a Doctrine Type. Use ' . + 'AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement ' . + 'Type#getMappedDatabaseTypes(). If the type name is empty you might ' . + 'have a problem with the cache or forgot some mapping information.' + ); + } + + /** + * @param string $name + * + * @return \Doctrine\DBAL\DBALException + */ + public static function typeNotFound($name) + { + return new self('Type to be overwritten '.$name.' does not exist.'); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..21d60646640c71d91745d2e72aa9a8e3b3611204 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver.php @@ -0,0 +1,75 @@ +. + */ + +namespace Doctrine\DBAL; + +/** + * Driver interface. + * Interface that all DBAL drivers must implement. + * + * @since 2.0 + */ +interface Driver +{ + /** + * Attempts to create a connection with the database. + * + * @param array $params All connection parameters passed by the user. + * @param string|null $username The username to use when connecting. + * @param string|null $password The password to use when connecting. + * @param array $driverOptions The driver options to use when connecting. + * + * @return \Doctrine\DBAL\Driver\Connection The database connection. + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()); + + /** + * Gets the DatabasePlatform instance that provides all the metadata about + * the platform this driver connects to. + * + * @return \Doctrine\DBAL\Platforms\AbstractPlatform The database platform. + */ + public function getDatabasePlatform(); + + /** + * Gets the SchemaManager that can be used to inspect and change the underlying + * database schema of the platform this driver connects to. + * + * @param \Doctrine\DBAL\Connection $conn + * + * @return \Doctrine\DBAL\Schema\AbstractSchemaManager + */ + public function getSchemaManager(Connection $conn); + + /** + * Gets the name of the driver. + * + * @return string The name of the driver. + */ + public function getName(); + + /** + * Gets the name of the database connected to for this driver. + * + * @param \Doctrine\DBAL\Connection $conn + * + * @return string The name of the database. + */ + public function getDatabase(Connection $conn); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractDB2Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractDB2Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..baa081690c0a5f3bb389ce5c52fcda4b12032bbb --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractDB2Driver.php @@ -0,0 +1,60 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Platforms\DB2Platform; +use Doctrine\DBAL\Schema\DB2SchemaManager; + +/** + * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for IBM DB2 based drivers. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +abstract class AbstractDB2Driver implements Driver +{ + /** + * {@inheritdoc} + */ + public function getDatabase(\Doctrine\DBAL\Connection $conn) + { + $params = $conn->getParams(); + + return $params['dbname']; + } + + /** + * {@inheritdoc} + */ + public function getDatabasePlatform() + { + return new DB2Platform(); + } + + /** + * {@inheritdoc} + */ + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) + { + return new DB2SchemaManager($conn); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractDriverException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractDriverException.php new file mode 100644 index 0000000000000000000000000000000000000000..c5eee5a0735ceb4c8a6206107ce589ce4cbb77be --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractDriverException.php @@ -0,0 +1,75 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +/** + * Abstract base implementation of the {@link DriverException} interface. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +abstract class AbstractDriverException extends \Exception implements DriverException +{ + /** + * The driver specific error code. + * + * @var integer|string|null + */ + private $errorCode; + + /** + * The SQLSTATE of the driver. + * + * @var string|null + */ + private $sqlState; + + /** + * Constructor. + * + * @param string $message The driver error message. + * @param string|null $sqlState The SQLSTATE the driver is in at the time the error occured, if any. + * @param integer|string|null $errorCode The driver specific error code if any. + */ + public function __construct($message, $sqlState = null, $errorCode = null) + { + parent::__construct($message); + + $this->errorCode = $errorCode; + $this->sqlState = $sqlState; + } + + /** + * {@inheritdoc} + */ + public function getErrorCode() + { + return $this->errorCode; + } + + /** + * {@inheritdoc} + */ + public function getSQLState() + { + return $this->sqlState; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..eff79576291843c5b4ca6dcc4f5ec0e896973479 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php @@ -0,0 +1,175 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Exception; +use Doctrine\DBAL\Platforms\MySQL57Platform; +use Doctrine\DBAL\Platforms\MySqlPlatform; +use Doctrine\DBAL\Schema\MySqlSchemaManager; +use Doctrine\DBAL\VersionAwarePlatformDriver; + +/** + * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for MySQL based drivers. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +abstract class AbstractMySQLDriver implements Driver, ExceptionConverterDriver, VersionAwarePlatformDriver +{ + /** + * {@inheritdoc} + * + * @link http://dev.mysql.com/doc/refman/5.7/en/error-messages-client.html + * @link http://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html + */ + public function convertException($message, DriverException $exception) + { + switch ($exception->getErrorCode()) { + case '1050': + return new Exception\TableExistsException($message, $exception); + + case '1051': + case '1146': + return new Exception\TableNotFoundException($message, $exception); + + case '1216': + case '1217': + case '1451': + case '1452': + case '1701': + return new Exception\ForeignKeyConstraintViolationException($message, $exception); + + case '1062': + case '1557': + case '1569': + case '1586': + return new Exception\UniqueConstraintViolationException($message, $exception); + + case '1054': + case '1166': + case '1611': + return new Exception\InvalidFieldNameException($message, $exception); + + case '1052': + case '1060': + case '1110': + return new Exception\NonUniqueFieldNameException($message, $exception); + + case '1064': + case '1149': + case '1287': + case '1341': + case '1342': + case '1343': + case '1344': + case '1382': + case '1479': + case '1541': + case '1554': + case '1626': + return new Exception\SyntaxErrorException($message, $exception); + + case '1044': + case '1045': + case '1046': + case '1049': + case '1095': + case '1142': + case '1143': + case '1227': + case '1370': + case '2002': + case '2005': + return new Exception\ConnectionException($message, $exception); + + case '1048': + case '1121': + case '1138': + case '1171': + case '1252': + case '1263': + case '1566': + return new Exception\NotNullConstraintViolationException($message, $exception); + } + + return new Exception\DriverException($message, $exception); + } + + /** + * {@inheritdoc} + */ + public function createDatabasePlatformForVersion($version) + { + if ( ! preg_match('/^(?P\d+)(?:\.(?P\d+)(?:\.(?P\d+))?)?/', $version, $versionParts)) { + throw DBALException::invalidPlatformVersionSpecified( + $version, + '..' + ); + } + + if (false !== stripos($version, 'mariadb')) { + return $this->getDatabasePlatform(); + } + + $majorVersion = $versionParts['major']; + $minorVersion = isset($versionParts['minor']) ? $versionParts['minor'] : 0; + $patchVersion = isset($versionParts['patch']) ? $versionParts['patch'] : 0; + $version = $majorVersion . '.' . $minorVersion . '.' . $patchVersion; + + if (version_compare($version, '5.7', '>=')) { + return new MySQL57Platform(); + } + + return $this->getDatabasePlatform(); + } + + /** + * {@inheritdoc} + */ + public function getDatabase(\Doctrine\DBAL\Connection $conn) + { + $params = $conn->getParams(); + + if (isset($params['dbname'])) { + return $params['dbname']; + } + + return $conn->query('SELECT DATABASE()')->fetchColumn(); + } + + /** + * {@inheritdoc} + */ + public function getDatabasePlatform() + { + return new MySqlPlatform(); + } + + /** + * {@inheritdoc} + */ + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) + { + return new MySqlSchemaManager($conn); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractOracleDriver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractOracleDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..1a0d9777ffc5aa4865961e34517b81a94d322762 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractOracleDriver.php @@ -0,0 +1,151 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Exception; +use Doctrine\DBAL\Platforms\OraclePlatform; +use Doctrine\DBAL\Schema\OracleSchemaManager; + +/** + * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for Oracle based drivers. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +abstract class AbstractOracleDriver implements Driver, ExceptionConverterDriver +{ + /** + * {@inheritdoc} + */ + public function convertException($message, DriverException $exception) + { + switch ($exception->getErrorCode()) { + case '1': + case '2299': + case '38911': + return new Exception\UniqueConstraintViolationException($message, $exception); + + case '904': + return new Exception\InvalidFieldNameException($message, $exception); + + case '918': + case '960': + return new Exception\NonUniqueFieldNameException($message, $exception); + + case '923': + return new Exception\SyntaxErrorException($message, $exception); + + case '942': + return new Exception\TableNotFoundException($message, $exception); + + case '955': + return new Exception\TableExistsException($message, $exception); + + case '1017': + case '12545': + return new Exception\ConnectionException($message, $exception); + + case '1400': + return new Exception\NotNullConstraintViolationException($message, $exception); + + case '2266': + case '2291': + case '2292': + return new Exception\ForeignKeyConstraintViolationException($message, $exception); + } + + return new Exception\DriverException($message, $exception); + } + + /** + * {@inheritdoc} + */ + public function getDatabase(\Doctrine\DBAL\Connection $conn) + { + $params = $conn->getParams(); + + return $params['user']; + } + + /** + * {@inheritdoc} + */ + public function getDatabasePlatform() + { + return new OraclePlatform(); + } + + /** + * {@inheritdoc} + */ + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) + { + return new OracleSchemaManager($conn); + } + + /** + * Returns an appropriate Easy Connect String for the given parameters. + * + * @param array $params The connection parameters to return the Easy Connect STring for. + * + * @return string + * + * @link http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm + */ + protected function getEasyConnectString(array $params) + { + if ( ! empty($params['host'])) { + if ( ! isset($params['port'])) { + $params['port'] = 1521; + } + + $serviceName = $params['dbname']; + + if ( ! empty($params['servicename'])) { + $serviceName = $params['servicename']; + } + + $service = 'SID=' . $serviceName; + $pooled = ''; + $instance = ''; + + if (isset($params['service']) && $params['service'] == true) { + $service = 'SERVICE_NAME=' . $serviceName; + } + + if (isset($params['instancename']) && ! empty($params['instancename'])) { + $instance = '(INSTANCE_NAME = ' . $params['instancename'] . ')'; + } + + if (isset($params['pooled']) && $params['pooled'] == true) { + $pooled = '(SERVER=POOLED)'; + } + + return '(DESCRIPTION=' . + '(ADDRESS=(PROTOCOL=TCP)(HOST=' . $params['host'] . ')(PORT=' . $params['port'] . '))' . + '(CONNECT_DATA=(' . $service . ')' . $instance . $pooled . '))'; + + } + + return isset($params['dbname']) ? $params['dbname'] : ''; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..4ad7cbeef2f9b1d0f9f785386d2407adad323bc0 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php @@ -0,0 +1,148 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Exception; +use Doctrine\DBAL\Platforms\PostgreSQL91Platform; +use Doctrine\DBAL\Platforms\PostgreSQL92Platform; +use Doctrine\DBAL\Platforms\PostgreSqlPlatform; +use Doctrine\DBAL\Schema\PostgreSqlSchemaManager; +use Doctrine\DBAL\VersionAwarePlatformDriver; + +/** + * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for PostgreSQL based drivers. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +abstract class AbstractPostgreSQLDriver implements Driver, ExceptionConverterDriver, VersionAwarePlatformDriver +{ + /** + * {@inheritdoc} + * + * @link http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html + */ + public function convertException($message, DriverException $exception) + { + switch ($exception->getSQLState()) { + case '0A000': + // Foreign key constraint violations during a TRUNCATE operation + // are considered "feature not supported" in PostgreSQL. + if (strpos($exception->getMessage(), 'truncate') !== false) { + return new Exception\ForeignKeyConstraintViolationException($message, $exception); + } + + break; + case '23502': + return new Exception\NotNullConstraintViolationException($message, $exception); + + case '23503': + return new Exception\ForeignKeyConstraintViolationException($message, $exception); + + case '23505': + return new Exception\UniqueConstraintViolationException($message, $exception); + + case '42601': + return new Exception\SyntaxErrorException($message, $exception); + + case '42702': + return new Exception\NonUniqueFieldNameException($message, $exception); + + case '42703': + return new Exception\InvalidFieldNameException($message, $exception); + + case '42P01': + return new Exception\TableNotFoundException($message, $exception); + + case '42P07': + return new Exception\TableExistsException($message, $exception); + + case '7': + // In some case (mainly connection errors) the PDO exception does not provide a SQLSTATE via its code. + // The exception code is always set to 7 here. + // We have to match against the SQLSTATE in the error message in these cases. + if (strpos($exception->getMessage(), 'SQLSTATE[08006]') !== false) { + return new Exception\ConnectionException($message, $exception); + } + + break; + } + + return new Exception\DriverException($message, $exception); + } + + /** + * {@inheritdoc} + */ + public function createDatabasePlatformForVersion($version) + { + if ( ! preg_match('/^(?P\d+)(?:\.(?P\d+)(?:\.(?P\d+))?)?/', $version, $versionParts)) { + throw DBALException::invalidPlatformVersionSpecified( + $version, + '..' + ); + } + + $majorVersion = $versionParts['major']; + $minorVersion = isset($versionParts['minor']) ? $versionParts['minor'] : 0; + $patchVersion = isset($versionParts['patch']) ? $versionParts['patch'] : 0; + $version = $majorVersion . '.' . $minorVersion . '.' . $patchVersion; + + switch(true) { + case version_compare($version, '9.2', '>='): + return new PostgreSQL92Platform(); + case version_compare($version, '9.1', '>='): + return new PostgreSQL91Platform(); + default: + return new PostgreSqlPlatform(); + } + } + + /** + * {@inheritdoc} + */ + public function getDatabase(\Doctrine\DBAL\Connection $conn) + { + $params = $conn->getParams(); + + return (isset($params['dbname'])) + ? $params['dbname'] + : $conn->query('SELECT CURRENT_DATABASE()')->fetchColumn(); + } + + /** + * {@inheritdoc} + */ + public function getDatabasePlatform() + { + return new PostgreSqlPlatform(); + } + + /** + * {@inheritdoc} + */ + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) + { + return new PostgreSqlSchemaManager($conn); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..0527555af4f4db664b5ef41aa62fd80931d24e6c --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php @@ -0,0 +1,141 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Exception; +use Doctrine\DBAL\Platforms\SQLAnywhere11Platform; +use Doctrine\DBAL\Platforms\SQLAnywhere12Platform; +use Doctrine\DBAL\Platforms\SQLAnywhere16Platform; +use Doctrine\DBAL\Platforms\SQLAnywherePlatform; +use Doctrine\DBAL\Schema\SQLAnywhereSchemaManager; +use Doctrine\DBAL\VersionAwarePlatformDriver; + +/** + * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for SAP Sybase SQL Anywhere based drivers. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +abstract class AbstractSQLAnywhereDriver implements Driver, ExceptionConverterDriver, VersionAwarePlatformDriver +{ + /** + * {@inheritdoc} + * + * @link http://dcx.sybase.com/index.html#sa160/en/saerrors/sqlerror.html + */ + public function convertException($message, DriverException $exception) + { + switch ($exception->getErrorCode()) { + case '-100': + case '-103': + case '-832': + return new Exception\ConnectionException($message, $exception); + case '-143': + return new Exception\InvalidFieldNameException($message, $exception); + case '-193': + case '-196': + return new Exception\UniqueConstraintViolationException($message, $exception); + case '-194': + case '-198': + return new Exception\ForeignKeyConstraintViolationException($message, $exception); + case '-144': + return new Exception\NonUniqueFieldNameException($message, $exception); + case '-184': + case '-195': + return new Exception\NotNullConstraintViolationException($message, $exception); + case '-131': + return new Exception\SyntaxErrorException($message, $exception); + case '-110': + return new Exception\TableExistsException($message, $exception); + case '-141': + case '-1041': + return new Exception\TableNotFoundException($message, $exception); + } + + return new Exception\DriverException($message, $exception); + } + + /** + * {@inheritdoc} + */ + public function createDatabasePlatformForVersion($version) + { + if ( ! preg_match( + '/^(?P\d+)(?:\.(?P\d+)(?:\.(?P\d+)(?:\.(?P\d+))?)?)?/', + $version, + $versionParts + )) { + throw DBALException::invalidPlatformVersionSpecified( + $version, + '...' + ); + } + + $majorVersion = $versionParts['major']; + $minorVersion = isset($versionParts['minor']) ? $versionParts['minor'] : 0; + $patchVersion = isset($versionParts['patch']) ? $versionParts['patch'] : 0; + $buildVersion = isset($versionParts['build']) ? $versionParts['build'] : 0; + $version = $majorVersion . '.' . $minorVersion . '.' . $patchVersion . '.' . $buildVersion; + + switch(true) { + case version_compare($version, '16', '>='): + return new SQLAnywhere16Platform(); + case version_compare($version, '12', '>='): + return new SQLAnywhere12Platform(); + case version_compare($version, '11', '>='): + return new SQLAnywhere11Platform(); + default: + return new SQLAnywherePlatform(); + } + } + + /** + * {@inheritdoc} + */ + public function getDatabase(\Doctrine\DBAL\Connection $conn) + { + $params = $conn->getParams(); + + if (isset($params['dbname'])) { + return $params['dbname']; + } + + return $conn->query('SELECT DB_NAME()')->fetchColumn(); + } + + /** + * {@inheritdoc} + */ + public function getDatabasePlatform() + { + return new SQLAnywhere12Platform(); + } + + /** + * {@inheritdoc} + */ + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) + { + return new SQLAnywhereSchemaManager($conn); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..53a4dd526207b9877afb87e4fb3f59eecaa6d738 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php @@ -0,0 +1,104 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Platforms\SQLServer2005Platform; +use Doctrine\DBAL\Platforms\SQLServer2008Platform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; +use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Schema\SQLServerSchemaManager; +use Doctrine\DBAL\VersionAwarePlatformDriver; + +/** + * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for Microsoft SQL Server based drivers. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +abstract class AbstractSQLServerDriver implements Driver, VersionAwarePlatformDriver +{ + /** + * {@inheritdoc} + */ + public function createDatabasePlatformForVersion($version) + { + if ( ! preg_match( + '/^(?P\d+)(?:\.(?P\d+)(?:\.(?P\d+)(?:\.(?P\d+))?)?)?/', + $version, + $versionParts + )) { + throw DBALException::invalidPlatformVersionSpecified( + $version, + '...' + ); + } + + $majorVersion = $versionParts['major']; + $minorVersion = isset($versionParts['minor']) ? $versionParts['minor'] : 0; + $patchVersion = isset($versionParts['patch']) ? $versionParts['patch'] : 0; + $buildVersion = isset($versionParts['build']) ? $versionParts['build'] : 0; + $version = $majorVersion . '.' . $minorVersion . '.' . $patchVersion . '.' . $buildVersion; + + switch(true) { + case version_compare($version, '11.00.2100', '>='): + return new SQLServer2012Platform(); + case version_compare($version, '10.00.1600', '>='): + return new SQLServer2008Platform(); + case version_compare($version, '9.00.1399', '>='): + return new SQLServer2005Platform(); + default: + return new SQLServerPlatform(); + } + } + + /** + * {@inheritdoc} + */ + public function getDatabase(\Doctrine\DBAL\Connection $conn) + { + $params = $conn->getParams(); + + if (isset($params['dbname'])) { + return $params['dbname']; + } + + return $conn->query('SELECT DB_NAME()')->fetchColumn(); + } + + /** + * {@inheritdoc} + */ + public function getDatabasePlatform() + { + return new SQLServer2008Platform(); + } + + /** + * {@inheritdoc} + */ + + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) + { + return new SQLServerSchemaManager($conn); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..0facc9b815418e941c5f2245abfd9eec7e9e5e70 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php @@ -0,0 +1,113 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Exception; +use Doctrine\DBAL\Platforms\SqlitePlatform; +use Doctrine\DBAL\Schema\SqliteSchemaManager; + +/** + * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for SQLite based drivers. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +abstract class AbstractSQLiteDriver implements Driver, ExceptionConverterDriver +{ + /** + * {@inheritdoc} + * + * @link http://www.sqlite.org/c3ref/c_abort.html + */ + public function convertException($message, DriverException $exception) + { + if (strpos($exception->getMessage(), 'must be unique') !== false || + strpos($exception->getMessage(), 'is not unique') !== false || + strpos($exception->getMessage(), 'are not unique') !== false || + strpos($exception->getMessage(), 'UNIQUE constraint failed') !== false + ) { + return new Exception\UniqueConstraintViolationException($message, $exception); + } + + if (strpos($exception->getMessage(), 'may not be NULL') !== false || + strpos($exception->getMessage(), 'NOT NULL constraint failed') !== false + ) { + return new Exception\NotNullConstraintViolationException($message, $exception); + } + + if (strpos($exception->getMessage(), 'no such table:') !== false) { + return new Exception\TableNotFoundException($message, $exception); + } + + if (strpos($exception->getMessage(), 'already exists') !== false) { + return new Exception\TableExistsException($message, $exception); + } + + if (strpos($exception->getMessage(), 'has no column named') !== false) { + return new Exception\InvalidFieldNameException($message, $exception); + } + + if (strpos($exception->getMessage(), 'ambiguous column name') !== false) { + return new Exception\NonUniqueFieldNameException($message, $exception); + } + + if (strpos($exception->getMessage(), 'syntax error') !== false) { + return new Exception\SyntaxErrorException($message, $exception); + } + + if (strpos($exception->getMessage(), 'attempt to write a readonly database') !== false) { + return new Exception\ReadOnlyException($message, $exception); + } + + if (strpos($exception->getMessage(), 'unable to open database file') !== false) { + return new Exception\ConnectionException($message, $exception); + } + + return new Exception\DriverException($message, $exception); + } + + /** + * {@inheritdoc} + */ + public function getDatabase(\Doctrine\DBAL\Connection $conn) + { + $params = $conn->getParams(); + + return isset($params['path']) ? $params['path'] : null; + } + + /** + * {@inheritdoc} + */ + public function getDatabasePlatform() + { + return new SqlitePlatform(); + } + + /** + * {@inheritdoc} + */ + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) + { + return new SqliteSchemaManager($conn); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Connection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..401f2175c8987fb0962e40735939b97377677e9d --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Connection.php @@ -0,0 +1,110 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +/** + * Connection interface. + * Driver connections must implement this interface. + * + * This resembles (a subset of) the PDO interface. + * + * @since 2.0 + */ +interface Connection +{ + /** + * Prepares a statement for execution and returns a Statement object. + * + * @param string $prepareString + * + * @return \Doctrine\DBAL\Driver\Statement + */ + function prepare($prepareString); + + /** + * Executes an SQL statement, returning a result set as a Statement object. + * + * @return \Doctrine\DBAL\Driver\Statement + */ + function query(); + + /** + * Quotes a string for use in a query. + * + * @param string $input + * @param integer $type + * + * @return string + */ + function quote($input, $type=\PDO::PARAM_STR); + + /** + * Executes an SQL statement and return the number of affected rows. + * + * @param string $statement + * + * @return integer + */ + function exec($statement); + + /** + * Returns the ID of the last inserted row or sequence value. + * + * @param string|null $name + * + * @return string + */ + function lastInsertId($name = null); + + /** + * Initiates a transaction. + * + * @return boolean TRUE on success or FALSE on failure. + */ + function beginTransaction(); + + /** + * Commits a transaction. + * + * @return boolean TRUE on success or FALSE on failure. + */ + function commit(); + + /** + * Rolls back the current transaction, as initiated by beginTransaction(). + * + * @return boolean TRUE on success or FALSE on failure. + */ + function rollBack(); + + /** + * Returns the error code associated with the last operation on the database handle. + * + * @return string|null The error code, or null if no operation has been run on the database handle. + */ + function errorCode(); + + /** + * Returns extended error information associated with the last operation on the database handle. + * + * @return array + */ + function errorInfo(); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/DriverException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/DriverException.php new file mode 100644 index 0000000000000000000000000000000000000000..f11146b1bfc61a5e2e43c6bbfca02c9067d948b2 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/DriverException.php @@ -0,0 +1,59 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +/** + * Contract for a driver exception. + * + * Driver exceptions provide the SQLSTATE of the driver + * and the driver specific error code at the time the error occurred. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +interface DriverException +{ + /** + * Returns the driver specific error code if available. + * + * Returns null if no driver specific error code is available + * for the error raised by the driver. + * + * @return integer|string|null + */ + public function getErrorCode(); + + /** + * Returns the driver error message. + * + * @return string + */ + public function getMessage(); + + /** + * Returns the SQLSTATE the driver was in at the time the error occurred. + * + * Returns null if the driver does not provide a SQLSTATE for the error occurred. + * + * @return string|null + */ + public function getSQLState(); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Connection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..92ca6601f43db6203fb06174173dc1f634a79c4d --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Connection.php @@ -0,0 +1,42 @@ +. + */ + +namespace Doctrine\DBAL\Driver\DrizzlePDOMySql; + +/** + * @author Kim Hemsø Rasmussen + */ +class Connection extends \Doctrine\DBAL\Driver\PDOConnection +{ + /** + * {@inheritdoc} + */ + public function quote($value, $type = \PDO::PARAM_STR) + { + if (\PDO::PARAM_BOOL === $type) { + if ($value) { + return 'true'; + } else { + return 'false'; + } + } + + return parent::quote($value, $type); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..ff4cf3b83d02116bac5f394d71c33d8a8edf4997 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Driver.php @@ -0,0 +1,78 @@ +. + */ + +namespace Doctrine\DBAL\Driver\DrizzlePDOMySql; + +use Doctrine\DBAL\Platforms\DrizzlePlatform; +use Doctrine\DBAL\Schema\DrizzleSchemaManager; + +/** + * Drizzle driver using PDO MySql. + * + * @author Kim Hemsø Rasmussen + */ +class Driver extends \Doctrine\DBAL\Driver\PDOMySql\Driver +{ + /** + * {@inheritdoc} + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + $conn = new Connection( + $this->constructPdoDsn($params), + $username, + $password, + $driverOptions + ); + + return $conn; + } + + /** + * {@inheritdoc} + */ + public function createDatabasePlatformForVersion($version) + { + return $this->getDatabasePlatform(); + } + + /** + * {@inheritdoc} + */ + public function getDatabasePlatform() + { + return new DrizzlePlatform(); + } + + /** + * {@inheritdoc} + */ + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) + { + return new DrizzleSchemaManager($conn); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'drizzle_pdo_mysql'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ExceptionConverterDriver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ExceptionConverterDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..0bd8d516e14e890867d3b8c7e9558bfa236d3199 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ExceptionConverterDriver.php @@ -0,0 +1,44 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +/** + * Contract for a driver that is capable of converting DBAL driver exceptions into standardized DBAL driver exceptions. + * + * @author Benjamin Eberlei + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +interface ExceptionConverterDriver +{ + /** + * Converts a given DBAL driver exception into a standardized DBAL driver exception. + * + * It evaluates the vendor specific error code and SQLSTATE and transforms + * it into a unified {@link Doctrine\DBAL\Exception\DriverException} subclass. + * + * @param string $message The DBAL exception message to use. + * @param \Doctrine\DBAL\Driver\DriverException $exception The DBAL driver exception to convert. + * + * @return \Doctrine\DBAL\Exception\DriverException An instance of one of the DriverException subclasses. + */ + public function convertException($message, DriverException $exception); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..0e809e2f5cfc6fb9768fa80191353f7b50249dd2 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php @@ -0,0 +1,178 @@ +. + */ + +namespace Doctrine\DBAL\Driver\IBMDB2; + +use Doctrine\DBAL\Driver\Connection; +use Doctrine\DBAL\Driver\ServerInfoAwareConnection; + +class DB2Connection implements Connection, ServerInfoAwareConnection +{ + /** + * @var resource + */ + private $_conn = null; + + /** + * @param array $params + * @param string $username + * @param string $password + * @param array $driverOptions + * + * @throws \Doctrine\DBAL\Driver\IBMDB2\DB2Exception + */ + public function __construct(array $params, $username, $password, $driverOptions = array()) + { + $isPersistant = (isset($params['persistent']) && $params['persistent'] == true); + + if ($isPersistant) { + $this->_conn = db2_pconnect($params['dbname'], $username, $password, $driverOptions); + } else { + $this->_conn = db2_connect($params['dbname'], $username, $password, $driverOptions); + } + if ( ! $this->_conn) { + throw new DB2Exception(db2_conn_errormsg()); + } + } + + /** + * {@inheritdoc} + */ + public function getServerVersion() + { + $serverInfo = db2_server_info($this->_conn); + + return $serverInfo->DBMS_VER; + } + + /** + * {@inheritdoc} + */ + public function requiresQueryForServerVersion() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function prepare($sql) + { + $stmt = @db2_prepare($this->_conn, $sql); + if ( ! $stmt) { + throw new DB2Exception(db2_stmt_errormsg()); + } + + return new DB2Statement($stmt); + } + + /** + * {@inheritdoc} + */ + public function query() + { + $args = func_get_args(); + $sql = $args[0]; + $stmt = $this->prepare($sql); + $stmt->execute(); + + return $stmt; + } + + /** + * {@inheritdoc} + */ + public function quote($input, $type=\PDO::PARAM_STR) + { + $input = db2_escape_string($input); + if ($type == \PDO::PARAM_INT) { + return $input; + } else { + return "'".$input."'"; + } + } + + /** + * {@inheritdoc} + */ + public function exec($statement) + { + $stmt = $this->prepare($statement); + $stmt->execute(); + + return $stmt->rowCount(); + } + + /** + * {@inheritdoc} + */ + public function lastInsertId($name = null) + { + return db2_last_insert_id($this->_conn); + } + + /** + * {@inheritdoc} + */ + public function beginTransaction() + { + db2_autocommit($this->_conn, DB2_AUTOCOMMIT_OFF); + } + + /** + * {@inheritdoc} + */ + public function commit() + { + if (!db2_commit($this->_conn)) { + throw new DB2Exception(db2_conn_errormsg($this->_conn)); + } + db2_autocommit($this->_conn, DB2_AUTOCOMMIT_ON); + } + + /** + * {@inheritdoc} + */ + public function rollBack() + { + if (!db2_rollback($this->_conn)) { + throw new DB2Exception(db2_conn_errormsg($this->_conn)); + } + db2_autocommit($this->_conn, DB2_AUTOCOMMIT_ON); + } + + /** + * {@inheritdoc} + */ + public function errorCode() + { + return db2_conn_error($this->_conn); + } + + /** + * {@inheritdoc} + */ + public function errorInfo() + { + return array( + 0 => db2_conn_errormsg($this->_conn), + 1 => $this->errorCode(), + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..8ed82e4dda203778602b809ad3c841e8b7f4004b --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php @@ -0,0 +1,67 @@ +. + */ + +namespace Doctrine\DBAL\Driver\IBMDB2; + +use Doctrine\DBAL\Driver\AbstractDB2Driver; + +/** + * IBM DB2 Driver. + * + * @since 2.0 + * @author Benjamin Eberlei + */ +class DB2Driver extends AbstractDB2Driver +{ + /** + * {@inheritdoc} + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + if ( ! isset($params['protocol'])) { + $params['protocol'] = 'TCPIP'; + } + + if ($params['host'] !== 'localhost' && $params['host'] != '127.0.0.1') { + // if the host isn't localhost, use extended connection params + $params['dbname'] = 'DRIVER={IBM DB2 ODBC DRIVER}' . + ';DATABASE=' . $params['dbname'] . + ';HOSTNAME=' . $params['host'] . + ';PROTOCOL=' . $params['protocol'] . + ';UID=' . $username . + ';PWD=' . $password .';'; + if (isset($params['port'])) { + $params['dbname'] .= 'PORT=' . $params['port']; + } + + $username = null; + $password = null; + } + + return new DB2Connection($params, $username, $password, $driverOptions); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'ibm_db2'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..72775cbfe70287c74885d8cd0716dbca206cc0d2 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php @@ -0,0 +1,24 @@ +. + */ + +namespace Doctrine\DBAL\Driver\IBMDB2; + +class DB2Exception extends \Exception +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php new file mode 100644 index 0000000000000000000000000000000000000000..892db0ae52022b6069ce7bb8db25ceb17e758a30 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php @@ -0,0 +1,362 @@ +. + */ + +namespace Doctrine\DBAL\Driver\IBMDB2; + +use Doctrine\DBAL\Driver\Statement; + +class DB2Statement implements \IteratorAggregate, Statement +{ + /** + * @var resource + */ + private $_stmt = null; + + /** + * @var array + */ + private $_bindParam = array(); + + /** + * @var string Name of the default class to instantiate when fetch mode is \PDO::FETCH_CLASS. + */ + private $defaultFetchClass = '\stdClass'; + + /** + * @var string Constructor arguments for the default class to instantiate when fetch mode is \PDO::FETCH_CLASS. + */ + private $defaultFetchClassCtorArgs = array(); + + /** + * @var integer + */ + private $_defaultFetchMode = \PDO::FETCH_BOTH; + + /** + * Indicates whether the statement is in the state when fetching results is possible + * + * @var bool + */ + private $result = false; + + /** + * DB2_BINARY, DB2_CHAR, DB2_DOUBLE, or DB2_LONG + * + * @var array + */ + static private $_typeMap = array( + \PDO::PARAM_INT => DB2_LONG, + \PDO::PARAM_STR => DB2_CHAR, + ); + + /** + * @param resource $stmt + */ + public function __construct($stmt) + { + $this->_stmt = $stmt; + } + + /** + * {@inheritdoc} + */ + public function bindValue($param, $value, $type = null) + { + return $this->bindParam($param, $value, $type); + } + + /** + * {@inheritdoc} + */ + public function bindParam($column, &$variable, $type = null, $length = null) + { + $this->_bindParam[$column] =& $variable; + + if ($type && isset(self::$_typeMap[$type])) { + $type = self::$_typeMap[$type]; + } else { + $type = DB2_CHAR; + } + + if (!db2_bind_param($this->_stmt, $column, "variable", DB2_PARAM_IN, $type)) { + throw new DB2Exception(db2_stmt_errormsg()); + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function closeCursor() + { + if ( ! $this->_stmt) { + return false; + } + + $this->_bindParam = array(); + + if (!db2_free_result($this->_stmt)) { + return false; + } + + $this->result = false; + + return true; + } + + /** + * {@inheritdoc} + */ + public function columnCount() + { + if ( ! $this->_stmt) { + return false; + } + + return db2_num_fields($this->_stmt); + } + + /** + * {@inheritdoc} + */ + public function errorCode() + { + return db2_stmt_error(); + } + + /** + * {@inheritdoc} + */ + public function errorInfo() + { + return array( + 0 => db2_stmt_errormsg(), + 1 => db2_stmt_error(), + ); + } + + /** + * {@inheritdoc} + */ + public function execute($params = null) + { + if ( ! $this->_stmt) { + return false; + } + + if ($params === null) { + ksort($this->_bindParam); + + $params = array(); + + foreach ($this->_bindParam as $column => $value) { + $params[] = $value; + } + } + + $retval = @db2_execute($this->_stmt, $params); + + if ($retval === false) { + throw new DB2Exception(db2_stmt_errormsg()); + } + + $this->result = true; + + return $retval; + } + + /** + * {@inheritdoc} + */ + public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) + { + $this->_defaultFetchMode = $fetchMode; + $this->defaultFetchClass = $arg2 ? $arg2 : $this->defaultFetchClass; + $this->defaultFetchClassCtorArgs = $arg3 ? (array) $arg3 : $this->defaultFetchClassCtorArgs; + + return true; + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + $data = $this->fetchAll(); + + return new \ArrayIterator($data); + } + + /** + * {@inheritdoc} + */ + public function fetch($fetchMode = null) + { + // do not try fetching from the statement if it's not expected to contain result + // in order to prevent exceptional situation + if (!$this->result) { + return false; + } + + $fetchMode = $fetchMode ?: $this->_defaultFetchMode; + switch ($fetchMode) { + case \PDO::FETCH_BOTH: + return db2_fetch_both($this->_stmt); + case \PDO::FETCH_ASSOC: + return db2_fetch_assoc($this->_stmt); + case \PDO::FETCH_CLASS: + $className = $this->defaultFetchClass; + $ctorArgs = $this->defaultFetchClassCtorArgs; + + if (func_num_args() >= 2) { + $args = func_get_args(); + $className = $args[1]; + $ctorArgs = isset($args[2]) ? $args[2] : array(); + } + + $result = db2_fetch_object($this->_stmt); + + if ($result instanceof \stdClass) { + $result = $this->castObject($result, $className, $ctorArgs); + } + + return $result; + case \PDO::FETCH_NUM: + return db2_fetch_array($this->_stmt); + case \PDO::FETCH_OBJ: + return db2_fetch_object($this->_stmt); + default: + throw new DB2Exception("Given Fetch-Style " . $fetchMode . " is not supported."); + } + } + + /** + * {@inheritdoc} + */ + public function fetchAll($fetchMode = null) + { + $rows = array(); + + switch ($fetchMode) { + case \PDO::FETCH_CLASS: + while ($row = call_user_func_array(array($this, 'fetch'), func_get_args())) { + $rows[] = $row; + } + break; + case \PDO::FETCH_COLUMN: + while ($row = $this->fetchColumn()) { + $rows[] = $row; + } + break; + default: + while ($row = $this->fetch($fetchMode)) { + $rows[] = $row; + } + } + + return $rows; + } + + /** + * {@inheritdoc} + */ + public function fetchColumn($columnIndex = 0) + { + $row = $this->fetch(\PDO::FETCH_NUM); + + if (false === $row) { + return false; + } + + return isset($row[$columnIndex]) ? $row[$columnIndex] : null; + } + + /** + * {@inheritdoc} + */ + public function rowCount() + { + return (@db2_num_rows($this->_stmt))?:0; + } + + /** + * Casts a stdClass object to the given class name mapping its' properties. + * + * @param \stdClass $sourceObject Object to cast from. + * @param string|object $destinationClass Name of the class or class instance to cast to. + * @param array $ctorArgs Arguments to use for constructing the destination class instance. + * + * @return object + * + * @throws DB2Exception + */ + private function castObject(\stdClass $sourceObject, $destinationClass, array $ctorArgs = array()) + { + if ( ! is_string($destinationClass)) { + if ( ! is_object($destinationClass)) { + throw new DB2Exception(sprintf( + 'Destination class has to be of type string or object, %s given.', gettype($destinationClass) + )); + } + } else { + $destinationClass = new \ReflectionClass($destinationClass); + $destinationClass = $destinationClass->newInstanceArgs($ctorArgs); + } + + $sourceReflection = new \ReflectionObject($sourceObject); + $destinationClassReflection = new \ReflectionObject($destinationClass); + /** @var \ReflectionProperty[] $destinationProperties */ + $destinationProperties = array_change_key_case($destinationClassReflection->getProperties(), \CASE_LOWER); + + foreach ($sourceReflection->getProperties() as $sourceProperty) { + $sourceProperty->setAccessible(true); + + $name = $sourceProperty->getName(); + $value = $sourceProperty->getValue($sourceObject); + + // Try to find a case-matching property. + if ($destinationClassReflection->hasProperty($name)) { + $destinationProperty = $destinationClassReflection->getProperty($name); + + $destinationProperty->setAccessible(true); + $destinationProperty->setValue($destinationClass, $value); + + continue; + } + + $name = strtolower($name); + + // Try to find a property without matching case. + // Fallback for the driver returning either all uppercase or all lowercase column names. + if (isset($destinationProperties[$name])) { + $destinationProperty = $destinationProperties[$name]; + + $destinationProperty->setAccessible(true); + $destinationProperty->setValue($destinationClass, $value); + + continue; + } + + $destinationClass->$name = $value; + } + + return $destinationClass; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..8949d2b008f8624d537be574abe3a6dff0f4a8fb --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Driver.php @@ -0,0 +1,49 @@ +. + */ + +namespace Doctrine\DBAL\Driver\Mysqli; + +use Doctrine\DBAL\Driver\AbstractMySQLDriver; +use Doctrine\DBAL\DBALException; + +/** + * @author Kim Hemsø Rasmussen + */ +class Driver extends AbstractMySQLDriver +{ + /** + * {@inheritdoc} + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + try { + return new MysqliConnection($params, $username, $password, $driverOptions); + } catch (MysqliException $e) { + throw DBALException::driverException($this, $e); + } + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'mysqli'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php new file mode 100644 index 0000000000000000000000000000000000000000..ae3502c1682723e314effa058f7032c90287421d --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php @@ -0,0 +1,266 @@ +. + */ + +namespace Doctrine\DBAL\Driver\Mysqli; + +use Doctrine\DBAL\Driver\Connection as Connection; +use Doctrine\DBAL\Driver\PingableConnection; +use Doctrine\DBAL\Driver\ServerInfoAwareConnection; + +/** + * @author Kim Hemsø Rasmussen + * @author Till Klampaeckel + */ +class MysqliConnection implements Connection, PingableConnection, ServerInfoAwareConnection +{ + /** + * Name of the option to set connection flags + */ + const OPTION_FLAGS = 'flags'; + + /** + * @var \mysqli + */ + private $_conn; + + /** + * @param array $params + * @param string $username + * @param string $password + * @param array $driverOptions + * + * @throws \Doctrine\DBAL\Driver\Mysqli\MysqliException + */ + public function __construct(array $params, $username, $password, array $driverOptions = array()) + { + $port = isset($params['port']) ? $params['port'] : ini_get('mysqli.default_port'); + + // Fallback to default MySQL port if not given. + if ( ! $port) { + $port = 3306; + } + + $socket = isset($params['unix_socket']) ? $params['unix_socket'] : ini_get('mysqli.default_socket'); + $dbname = isset($params['dbname']) ? $params['dbname'] : null; + + $flags = isset($driverOptions[static::OPTION_FLAGS]) ? $driverOptions[static::OPTION_FLAGS] : null; + + $this->_conn = mysqli_init(); + + $this->setDriverOptions($driverOptions); + + set_error_handler(function () {}); + + if ( ! $this->_conn->real_connect($params['host'], $username, $password, $dbname, $port, $socket, $flags)) { + restore_error_handler(); + + throw new MysqliException($this->_conn->connect_error, @$this->_conn->sqlstate ?: 'HY000', $this->_conn->connect_errno); + } + + restore_error_handler(); + + if (isset($params['charset'])) { + $this->_conn->set_charset($params['charset']); + } + } + + /** + * Retrieves mysqli native resource handle. + * + * Could be used if part of your application is not using DBAL. + * + * @return \mysqli + */ + public function getWrappedResourceHandle() + { + return $this->_conn; + } + + /** + * {@inheritdoc} + */ + public function getServerVersion() + { + $majorVersion = floor($this->_conn->server_version / 10000); + $minorVersion = floor(($this->_conn->server_version - $majorVersion * 10000) / 100); + $patchVersion = floor($this->_conn->server_version - $majorVersion * 10000 - $minorVersion * 100); + + return $majorVersion . '.' . $minorVersion . '.' . $patchVersion; + } + + /** + * {@inheritdoc} + */ + public function requiresQueryForServerVersion() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function prepare($prepareString) + { + return new MysqliStatement($this->_conn, $prepareString); + } + + /** + * {@inheritdoc} + */ + public function query() + { + $args = func_get_args(); + $sql = $args[0]; + $stmt = $this->prepare($sql); + $stmt->execute(); + + return $stmt; + } + + /** + * {@inheritdoc} + */ + public function quote($input, $type=\PDO::PARAM_STR) + { + return "'". $this->_conn->escape_string($input) ."'"; + } + + /** + * {@inheritdoc} + */ + public function exec($statement) + { + if (false === $this->_conn->query($statement)) { + throw new MysqliException($this->_conn->error, $this->_conn->sqlstate, $this->_conn->errno); + } + + return $this->_conn->affected_rows; + } + + /** + * {@inheritdoc} + */ + public function lastInsertId($name = null) + { + return $this->_conn->insert_id; + } + + /** + * {@inheritdoc} + */ + public function beginTransaction() + { + $this->_conn->query('START TRANSACTION'); + + return true; + } + + /** + * {@inheritdoc} + */ + public function commit() + { + return $this->_conn->commit(); + } + + /** + * {@inheritdoc}non-PHPdoc) + */ + public function rollBack() + { + return $this->_conn->rollback(); + } + + /** + * {@inheritdoc} + */ + public function errorCode() + { + return $this->_conn->errno; + } + + /** + * {@inheritdoc} + */ + public function errorInfo() + { + return $this->_conn->error; + } + + /** + * Apply the driver options to the connection. + * + * @param array $driverOptions + * + * @throws MysqliException When one of of the options is not supported. + * @throws MysqliException When applying doesn't work - e.g. due to incorrect value. + */ + private function setDriverOptions(array $driverOptions = array()) + { + $supportedDriverOptions = array( + \MYSQLI_OPT_CONNECT_TIMEOUT, + \MYSQLI_OPT_LOCAL_INFILE, + \MYSQLI_INIT_COMMAND, + \MYSQLI_READ_DEFAULT_FILE, + \MYSQLI_READ_DEFAULT_GROUP, + ); + + if (defined('MYSQLI_SERVER_PUBLIC_KEY')) { + $supportedDriverOptions[] = \MYSQLI_SERVER_PUBLIC_KEY; + } + + $exceptionMsg = "%s option '%s' with value '%s'"; + + foreach ($driverOptions as $option => $value) { + + if ($option === static::OPTION_FLAGS) { + continue; + } + + if (!in_array($option, $supportedDriverOptions, true)) { + throw new MysqliException( + sprintf($exceptionMsg, 'Unsupported', $option, $value) + ); + } + + if (@mysqli_options($this->_conn, $option, $value)) { + continue; + } + + $msg = sprintf($exceptionMsg, 'Failed to set', $option, $value); + $msg .= sprintf(', error: %s (%d)', mysqli_error($this->_conn), mysqli_errno($this->_conn)); + + throw new MysqliException( + $msg, + $this->_conn->sqlstate, + $this->_conn->errno + ); + } + } + + /** + * Pings the server and re-connects when `mysqli.reconnect = 1` + * + * @return bool + */ + public function ping() + { + return $this->_conn->ping(); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php new file mode 100644 index 0000000000000000000000000000000000000000..23728b113a62dd337339b8c556cf5d6f60208b8c --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\DBAL\Driver\Mysqli; + +use Doctrine\DBAL\Driver\AbstractDriverException; + +/** + * Exception thrown in case the mysqli driver errors. + * + * @author Kim Hemsø Rasmussen + * @author Steve Müller + */ +class MysqliException extends AbstractDriverException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php new file mode 100644 index 0000000000000000000000000000000000000000..d181949ee185f11ca793a2400760012878305487 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php @@ -0,0 +1,403 @@ +. + */ + +namespace Doctrine\DBAL\Driver\Mysqli; + +use Doctrine\DBAL\Driver\Statement; +use PDO; + +/** + * @author Kim Hemsø Rasmussen + */ +class MysqliStatement implements \IteratorAggregate, Statement +{ + /** + * @var array + */ + protected static $_paramTypeMap = array( + PDO::PARAM_STR => 's', + PDO::PARAM_BOOL => 'i', + PDO::PARAM_NULL => 's', + PDO::PARAM_INT => 'i', + PDO::PARAM_LOB => 's' // TODO Support LOB bigger then max package size. + ); + + /** + * @var \mysqli + */ + protected $_conn; + + /** + * @var \mysqli_stmt + */ + protected $_stmt; + + /** + * @var null|boolean|array + */ + protected $_columnNames; + + /** + * @var null|array + */ + protected $_rowBindedValues; + + /** + * @var array + */ + protected $_bindedValues; + + /** + * @var string + */ + protected $types; + + /** + * Contains ref values for bindValue(). + * + * @var array + */ + protected $_values = array(); + + /** + * @var integer + */ + protected $_defaultFetchMode = PDO::FETCH_BOTH; + + /** + * Indicates whether the statement is in the state when fetching results is possible + * + * @var bool + */ + private $result = false; + + /** + * @param \mysqli $conn + * @param string $prepareString + * + * @throws \Doctrine\DBAL\Driver\Mysqli\MysqliException + */ + public function __construct(\mysqli $conn, $prepareString) + { + $this->_conn = $conn; + $this->_stmt = $conn->prepare($prepareString); + if (false === $this->_stmt) { + throw new MysqliException($this->_conn->error, $this->_conn->sqlstate, $this->_conn->errno); + } + + $paramCount = $this->_stmt->param_count; + if (0 < $paramCount) { + $this->types = str_repeat('s', $paramCount); + $this->_bindedValues = array_fill(1, $paramCount, null); + } + } + + /** + * {@inheritdoc} + */ + public function bindParam($column, &$variable, $type = null, $length = null) + { + if (null === $type) { + $type = 's'; + } else { + if (isset(self::$_paramTypeMap[$type])) { + $type = self::$_paramTypeMap[$type]; + } else { + throw new MysqliException("Unknown type: '{$type}'"); + } + } + + $this->_bindedValues[$column] =& $variable; + $this->types[$column - 1] = $type; + + return true; + } + + /** + * {@inheritdoc} + */ + public function bindValue($param, $value, $type = null) + { + if (null === $type) { + $type = 's'; + } else { + if (isset(self::$_paramTypeMap[$type])) { + $type = self::$_paramTypeMap[$type]; + } else { + throw new MysqliException("Unknown type: '{$type}'"); + } + } + + $this->_values[$param] = $value; + $this->_bindedValues[$param] =& $this->_values[$param]; + $this->types[$param - 1] = $type; + + return true; + } + + /** + * {@inheritdoc} + */ + public function execute($params = null) + { + if (null !== $this->_bindedValues) { + if (null !== $params) { + if ( ! $this->_bindValues($params)) { + throw new MysqliException($this->_stmt->error, $this->_stmt->errno); + } + } else { + if (!call_user_func_array(array($this->_stmt, 'bind_param'), array($this->types) + $this->_bindedValues)) { + throw new MysqliException($this->_stmt->error, $this->_stmt->sqlstate, $this->_stmt->errno); + } + } + } + + if ( ! $this->_stmt->execute()) { + throw new MysqliException($this->_stmt->error, $this->_stmt->sqlstate, $this->_stmt->errno); + } + + if (null === $this->_columnNames) { + $meta = $this->_stmt->result_metadata(); + if (false !== $meta) { + $columnNames = array(); + foreach ($meta->fetch_fields() as $col) { + $columnNames[] = $col->name; + } + $meta->free(); + + $this->_columnNames = $columnNames; + } else { + $this->_columnNames = false; + } + } + + if (false !== $this->_columnNames) { + // Store result of every execution which has it. Otherwise it will be impossible + // to execute a new statement in case if the previous one has non-fetched rows + // @link http://dev.mysql.com/doc/refman/5.7/en/commands-out-of-sync.html + $this->_stmt->store_result(); + + // Bind row values _after_ storing the result. Otherwise, if mysqli is compiled with libmysql, + // it will have to allocate as much memory as it may be needed for the given column type + // (e.g. for a LONGBLOB field it's 4 gigabytes) + // @link https://bugs.php.net/bug.php?id=51386#1270673122 + // + // Make sure that the values are bound after each execution. Otherwise, if closeCursor() has been + // previously called on the statement, the values are unbound making the statement unusable. + // + // It's also important that row values are bound after _each_ call to store_result(). Otherwise, + // if mysqli is compiled with libmysql, subsequently fetched string values will get truncated + // to the length of the ones fetched during the previous execution. + $this->_rowBindedValues = array_fill(0, count($this->_columnNames), null); + + $refs = array(); + foreach ($this->_rowBindedValues as $key => &$value) { + $refs[$key] =& $value; + } + + if (!call_user_func_array(array($this->_stmt, 'bind_result'), $refs)) { + throw new MysqliException($this->_stmt->error, $this->_stmt->sqlstate, $this->_stmt->errno); + } + } + + $this->result = true; + + return true; + } + + /** + * Binds a array of values to bound parameters. + * + * @param array $values + * + * @return boolean + */ + private function _bindValues($values) + { + $params = array(); + $types = str_repeat('s', count($values)); + $params[0] = $types; + + foreach ($values as &$v) { + $params[] =& $v; + } + + return call_user_func_array(array($this->_stmt, 'bind_param'), $params); + } + + /** + * @return boolean|array + */ + private function _fetch() + { + $ret = $this->_stmt->fetch(); + + if (true === $ret) { + $values = array(); + foreach ($this->_rowBindedValues as $v) { + $values[] = $v; + } + + return $values; + } + + return $ret; + } + + /** + * {@inheritdoc} + */ + public function fetch($fetchMode = null) + { + // do not try fetching from the statement if it's not expected to contain result + // in order to prevent exceptional situation + if (!$this->result) { + return false; + } + + $values = $this->_fetch(); + if (null === $values) { + return false; + } + + if (false === $values) { + throw new MysqliException($this->_stmt->error, $this->_stmt->sqlstate, $this->_stmt->errno); + } + + $fetchMode = $fetchMode ?: $this->_defaultFetchMode; + + switch ($fetchMode) { + case PDO::FETCH_NUM: + return $values; + + case PDO::FETCH_ASSOC: + return array_combine($this->_columnNames, $values); + + case PDO::FETCH_BOTH: + $ret = array_combine($this->_columnNames, $values); + $ret += $values; + + return $ret; + + default: + throw new MysqliException("Unknown fetch type '{$fetchMode}'"); + } + } + + /** + * {@inheritdoc} + */ + public function fetchAll($fetchMode = null) + { + $fetchMode = $fetchMode ?: $this->_defaultFetchMode; + + $rows = array(); + if (PDO::FETCH_COLUMN == $fetchMode) { + while (($row = $this->fetchColumn()) !== false) { + $rows[] = $row; + } + } else { + while (($row = $this->fetch($fetchMode)) !== false) { + $rows[] = $row; + } + } + + return $rows; + } + + /** + * {@inheritdoc} + */ + public function fetchColumn($columnIndex = 0) + { + $row = $this->fetch(PDO::FETCH_NUM); + if (false === $row) { + return false; + } + + return isset($row[$columnIndex]) ? $row[$columnIndex] : null; + } + + /** + * {@inheritdoc} + */ + public function errorCode() + { + return $this->_stmt->errno; + } + + /** + * {@inheritdoc} + */ + public function errorInfo() + { + return $this->_stmt->error; + } + + /** + * {@inheritdoc} + */ + public function closeCursor() + { + $this->_stmt->free_result(); + $this->result = false; + + return true; + } + + /** + * {@inheritdoc} + */ + public function rowCount() + { + if (false === $this->_columnNames) { + return $this->_stmt->affected_rows; + } + + return $this->_stmt->num_rows; + } + + /** + * {@inheritdoc} + */ + public function columnCount() + { + return $this->_stmt->field_count; + } + + /** + * {@inheritdoc} + */ + public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) + { + $this->_defaultFetchMode = $fetchMode; + + return true; + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + $data = $this->fetchAll(); + + return new \ArrayIterator($data); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..1aa1b876e2b22ac9e24dbdfa167ff6615a956cc6 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Driver.php @@ -0,0 +1,71 @@ +. + */ + +namespace Doctrine\DBAL\Driver\OCI8; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Driver\AbstractOracleDriver; + +/** + * A Doctrine DBAL driver for the Oracle OCI8 PHP extensions. + * + * @author Roman Borschel + * @since 2.0 + */ +class Driver extends AbstractOracleDriver +{ + /** + * {@inheritdoc} + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + try { + return new OCI8Connection( + $username, + $password, + $this->_constructDsn($params), + isset($params['charset']) ? $params['charset'] : null, + isset($params['sessionMode']) ? $params['sessionMode'] : OCI_DEFAULT, + isset($params['persistent']) ? $params['persistent'] : false + ); + } catch (OCI8Exception $e) { + throw DBALException::driverException($this, $e); + } + } + + /** + * Constructs the Oracle DSN. + * + * @param array $params + * + * @return string The DSN. + */ + protected function _constructDsn(array $params) + { + return $this->getEasyConnectString($params); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'oci8'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..a919ddaab836b2defb8f9fb2b47a8d9ba603af96 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php @@ -0,0 +1,233 @@ +. + */ + +namespace Doctrine\DBAL\Driver\OCI8; + +use Doctrine\DBAL\Driver\Connection; +use Doctrine\DBAL\Driver\ServerInfoAwareConnection; +use Doctrine\DBAL\Platforms\OraclePlatform; + +/** + * OCI8 implementation of the Connection interface. + * + * @since 2.0 + */ +class OCI8Connection implements Connection, ServerInfoAwareConnection +{ + /** + * @var resource + */ + protected $dbh; + + /** + * @var integer + */ + protected $executeMode = OCI_COMMIT_ON_SUCCESS; + + /** + * Creates a Connection to an Oracle Database using oci8 extension. + * + * @param string $username + * @param string $password + * @param string $db + * @param string|null $charset + * @param integer $sessionMode + * @param boolean $persistent + * + * @throws OCI8Exception + */ + public function __construct($username, $password, $db, $charset = null, $sessionMode = OCI_DEFAULT, $persistent = false) + { + if (!defined('OCI_NO_AUTO_COMMIT')) { + define('OCI_NO_AUTO_COMMIT', 0); + } + + $this->dbh = $persistent + ? @oci_pconnect($username, $password, $db, $charset, $sessionMode) + : @oci_connect($username, $password, $db, $charset, $sessionMode); + + if ( ! $this->dbh) { + throw OCI8Exception::fromErrorInfo(oci_error()); + } + } + + /** + * {@inheritdoc} + * + * @throws \UnexpectedValueException if the version string returned by the database server + * does not contain a parsable version number. + */ + public function getServerVersion() + { + if ( ! preg_match('/\s+(\d+\.\d+\.\d+\.\d+\.\d+)\s+/', oci_server_version($this->dbh), $version)) { + throw new \UnexpectedValueException( + sprintf( + 'Unexpected database version string "%s". Cannot parse an appropriate version number from it. ' . + 'Please report this database version string to the Doctrine team.', + oci_server_version($this->dbh) + ) + ); + } + + return $version[1]; + } + + /** + * {@inheritdoc} + */ + public function requiresQueryForServerVersion() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function prepare($prepareString) + { + return new OCI8Statement($this->dbh, $prepareString, $this); + } + + /** + * {@inheritdoc} + */ + public function query() + { + $args = func_get_args(); + $sql = $args[0]; + //$fetchMode = $args[1]; + $stmt = $this->prepare($sql); + $stmt->execute(); + + return $stmt; + } + + /** + * {@inheritdoc} + */ + public function quote($value, $type=\PDO::PARAM_STR) + { + if (is_int($value) || is_float($value)) { + return $value; + } + $value = str_replace("'", "''", $value); + + return "'" . addcslashes($value, "\000\n\r\\\032") . "'"; + } + + /** + * {@inheritdoc} + */ + public function exec($statement) + { + $stmt = $this->prepare($statement); + $stmt->execute(); + + return $stmt->rowCount(); + } + + /** + * {@inheritdoc} + */ + public function lastInsertId($name = null) + { + if ($name === null) { + return false; + } + + OraclePlatform::assertValidIdentifier($name); + + $sql = 'SELECT ' . $name . '.CURRVAL FROM DUAL'; + $stmt = $this->query($sql); + $result = $stmt->fetch(\PDO::FETCH_ASSOC); + + if ($result === false || !isset($result['CURRVAL'])) { + throw new OCI8Exception("lastInsertId failed: Query was executed but no result was returned."); + } + + return (int) $result['CURRVAL']; + } + + /** + * Returns the current execution mode. + * + * @return integer + */ + public function getExecuteMode() + { + return $this->executeMode; + } + + /** + * {@inheritdoc} + */ + public function beginTransaction() + { + $this->executeMode = OCI_NO_AUTO_COMMIT; + + return true; + } + + /** + * {@inheritdoc} + */ + public function commit() + { + if (!oci_commit($this->dbh)) { + throw OCI8Exception::fromErrorInfo($this->errorInfo()); + } + $this->executeMode = OCI_COMMIT_ON_SUCCESS; + + return true; + } + + /** + * {@inheritdoc} + */ + public function rollBack() + { + if (!oci_rollback($this->dbh)) { + throw OCI8Exception::fromErrorInfo($this->errorInfo()); + } + $this->executeMode = OCI_COMMIT_ON_SUCCESS; + + return true; + } + + /** + * {@inheritdoc} + */ + public function errorCode() + { + $error = oci_error($this->dbh); + if ($error !== false) { + $error = $error['code']; + } + + return $error; + } + + /** + * {@inheritdoc} + */ + public function errorInfo() + { + return oci_error($this->dbh); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..1cd08b8a408fb9338096a93a550c78973d65bb00 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php @@ -0,0 +1,35 @@ +. + */ + +namespace Doctrine\DBAL\Driver\OCI8; + +use Doctrine\DBAL\Driver\AbstractDriverException; + +class OCI8Exception extends AbstractDriverException +{ + /** + * @param array $error + * + * @return \Doctrine\DBAL\Driver\OCI8\OCI8Exception + */ + public static function fromErrorInfo($error) + { + return new self($error['message'], null, $error['code']); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php new file mode 100644 index 0000000000000000000000000000000000000000..628b6570f516dc22f83b876d5aa3984da8b8e930 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php @@ -0,0 +1,357 @@ +. + */ + +namespace Doctrine\DBAL\Driver\OCI8; + +use PDO; +use IteratorAggregate; +use Doctrine\DBAL\Driver\Statement; + +/** + * The OCI8 implementation of the Statement interface. + * + * @since 2.0 + * @author Roman Borschel + */ +class OCI8Statement implements \IteratorAggregate, Statement +{ + /** + * @var resource + */ + protected $_dbh; + + /** + * @var resource + */ + protected $_sth; + + /** + * @var \Doctrine\DBAL\Driver\OCI8\OCI8Connection + */ + protected $_conn; + + /** + * @var string + */ + protected static $_PARAM = ':param'; + + /** + * @var array + */ + protected static $fetchModeMap = array( + PDO::FETCH_BOTH => OCI_BOTH, + PDO::FETCH_ASSOC => OCI_ASSOC, + PDO::FETCH_NUM => OCI_NUM, + PDO::FETCH_COLUMN => OCI_NUM, + ); + + /** + * @var integer + */ + protected $_defaultFetchMode = PDO::FETCH_BOTH; + + /** + * @var array + */ + protected $_paramMap = array(); + + /** + * Holds references to bound parameter values. + * + * This is a new requirement for PHP7's oci8 extension that prevents bound values from being garbage collected. + * + * @var array + */ + private $boundValues = array(); + + /** + * Indicates whether the statement is in the state when fetching results is possible + * + * @var bool + */ + private $result = false; + + /** + * Creates a new OCI8Statement that uses the given connection handle and SQL statement. + * + * @param resource $dbh The connection handle. + * @param string $statement The SQL statement. + * @param \Doctrine\DBAL\Driver\OCI8\OCI8Connection $conn + */ + public function __construct($dbh, $statement, OCI8Connection $conn) + { + list($statement, $paramMap) = self::convertPositionalToNamedPlaceholders($statement); + $this->_sth = oci_parse($dbh, $statement); + $this->_dbh = $dbh; + $this->_paramMap = $paramMap; + $this->_conn = $conn; + } + + /** + * Converts positional (?) into named placeholders (:param). + * + * Oracle does not support positional parameters, hence this method converts all + * positional parameters into artificially named parameters. Note that this conversion + * is not perfect. All question marks (?) in the original statement are treated as + * placeholders and converted to a named parameter. + * + * The algorithm uses a state machine with two possible states: InLiteral and NotInLiteral. + * Question marks inside literal strings are therefore handled correctly by this method. + * This comes at a cost, the whole sql statement has to be looped over. + * + * @todo extract into utility class in Doctrine\DBAL\Util namespace + * @todo review and test for lost spaces. we experienced missing spaces with oci8 in some sql statements. + * + * @param string $statement The SQL statement to convert. + * + * @return string + */ + static public function convertPositionalToNamedPlaceholders($statement) + { + $count = 1; + $inLiteral = false; // a valid query never starts with quotes + $stmtLen = strlen($statement); + $paramMap = array(); + for ($i = 0; $i < $stmtLen; $i++) { + if ($statement[$i] == '?' && !$inLiteral) { + // real positional parameter detected + $paramMap[$count] = ":param$count"; + $len = strlen($paramMap[$count]); + $statement = substr_replace($statement, ":param$count", $i, 1); + $i += $len-1; // jump ahead + $stmtLen = strlen($statement); // adjust statement length + ++$count; + } elseif ($statement[$i] == "'" || $statement[$i] == '"') { + $inLiteral = ! $inLiteral; // switch state! + } + } + + return array($statement, $paramMap); + } + + /** + * {@inheritdoc} + */ + public function bindValue($param, $value, $type = null) + { + return $this->bindParam($param, $value, $type, null); + } + + /** + * {@inheritdoc} + */ + public function bindParam($column, &$variable, $type = null, $length = null) + { + $column = isset($this->_paramMap[$column]) ? $this->_paramMap[$column] : $column; + + if ($type == \PDO::PARAM_LOB) { + $lob = oci_new_descriptor($this->_dbh, OCI_D_LOB); + $lob->writeTemporary($variable, OCI_TEMP_BLOB); + + $this->boundValues[$column] =& $lob; + + return oci_bind_by_name($this->_sth, $column, $lob, -1, OCI_B_BLOB); + } elseif ($length !== null) { + $this->boundValues[$column] =& $variable; + + return oci_bind_by_name($this->_sth, $column, $variable, $length); + } + + $this->boundValues[$column] =& $variable; + + return oci_bind_by_name($this->_sth, $column, $variable); + } + + /** + * {@inheritdoc} + */ + public function closeCursor() + { + // not having the result means there's nothing to close + if (!$this->result) { + return true; + } + + oci_cancel($this->_sth); + + $this->result = false; + + return true; + } + + /** + * {@inheritdoc} + */ + public function columnCount() + { + return oci_num_fields($this->_sth); + } + + /** + * {@inheritdoc} + */ + public function errorCode() + { + $error = oci_error($this->_sth); + if ($error !== false) { + $error = $error['code']; + } + + return $error; + } + + /** + * {@inheritdoc} + */ + public function errorInfo() + { + return oci_error($this->_sth); + } + + /** + * {@inheritdoc} + */ + public function execute($params = null) + { + if ($params) { + $hasZeroIndex = array_key_exists(0, $params); + foreach ($params as $key => $val) { + if ($hasZeroIndex && is_numeric($key)) { + $this->bindValue($key + 1, $val); + } else { + $this->bindValue($key, $val); + } + } + } + + $ret = @oci_execute($this->_sth, $this->_conn->getExecuteMode()); + if ( ! $ret) { + throw OCI8Exception::fromErrorInfo($this->errorInfo()); + } + + $this->result = true; + + return $ret; + } + + /** + * {@inheritdoc} + */ + public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) + { + $this->_defaultFetchMode = $fetchMode; + + return true; + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + $data = $this->fetchAll(); + + return new \ArrayIterator($data); + } + + /** + * {@inheritdoc} + */ + public function fetch($fetchMode = null) + { + // do not try fetching from the statement if it's not expected to contain result + // in order to prevent exceptional situation + if (!$this->result) { + return false; + } + + $fetchMode = $fetchMode ?: $this->_defaultFetchMode; + if ( ! isset(self::$fetchModeMap[$fetchMode])) { + throw new \InvalidArgumentException("Invalid fetch style: " . $fetchMode); + } + + return oci_fetch_array($this->_sth, self::$fetchModeMap[$fetchMode] | OCI_RETURN_NULLS | OCI_RETURN_LOBS); + } + + /** + * {@inheritdoc} + */ + public function fetchAll($fetchMode = null) + { + $fetchMode = $fetchMode ?: $this->_defaultFetchMode; + if ( ! isset(self::$fetchModeMap[$fetchMode])) { + throw new \InvalidArgumentException("Invalid fetch style: " . $fetchMode); + } + + $result = array(); + if (self::$fetchModeMap[$fetchMode] === OCI_BOTH) { + while ($row = $this->fetch($fetchMode)) { + $result[] = $row; + } + } else { + $fetchStructure = OCI_FETCHSTATEMENT_BY_ROW; + if ($fetchMode == PDO::FETCH_COLUMN) { + $fetchStructure = OCI_FETCHSTATEMENT_BY_COLUMN; + } + + // do not try fetching from the statement if it's not expected to contain result + // in order to prevent exceptional situation + if (!$this->result) { + return array(); + } + + oci_fetch_all($this->_sth, $result, 0, -1, + self::$fetchModeMap[$fetchMode] | OCI_RETURN_NULLS | $fetchStructure | OCI_RETURN_LOBS); + + if ($fetchMode == PDO::FETCH_COLUMN) { + $result = $result[0]; + } + } + + return $result; + } + + /** + * {@inheritdoc} + */ + public function fetchColumn($columnIndex = 0) + { + // do not try fetching from the statement if it's not expected to contain result + // in order to prevent exceptional situation + if (!$this->result) { + return false; + } + + $row = oci_fetch_array($this->_sth, OCI_NUM | OCI_RETURN_NULLS | OCI_RETURN_LOBS); + + if (false === $row) { + return false; + } + + return isset($row[$columnIndex]) ? $row[$columnIndex] : null; + } + + /** + * {@inheritdoc} + */ + public function rowCount() + { + return oci_num_rows($this->_sth); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php new file mode 100644 index 0000000000000000000000000000000000000000..8960de1ae9d6e990bd99f9365fb02df1364a94ab --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php @@ -0,0 +1,133 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +use PDO; + +/** + * PDO implementation of the Connection interface. + * Used by all PDO-based drivers. + * + * @since 2.0 + */ +class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection +{ + /** + * @param string $dsn + * @param string|null $user + * @param string|null $password + * @param array|null $options + * + * @throws PDOException in case of an error. + */ + public function __construct($dsn, $user = null, $password = null, array $options = null) + { + try { + parent::__construct($dsn, $user, $password, $options); + $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Doctrine\DBAL\Driver\PDOStatement', array())); + $this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + } catch (\PDOException $exception) { + throw new PDOException($exception); + } + } + + /** + * {@inheritdoc} + */ + public function exec($statement) + { + try { + return parent::exec($statement); + } catch (\PDOException $exception) { + throw new PDOException($exception); + } + } + + /** + * {@inheritdoc} + */ + public function getServerVersion() + { + return PDO::getAttribute(PDO::ATTR_SERVER_VERSION); + } + + /** + * {@inheritdoc} + */ + public function prepare($prepareString, $driverOptions = array()) + { + try { + return parent::prepare($prepareString, $driverOptions); + } catch (\PDOException $exception) { + throw new PDOException($exception); + } + } + + /** + * {@inheritdoc} + */ + public function query() + { + $args = func_get_args(); + $argsCount = count($args); + + try { + if ($argsCount == 4) { + return parent::query($args[0], $args[1], $args[2], $args[3]); + } + + if ($argsCount == 3) { + return parent::query($args[0], $args[1], $args[2]); + } + + if ($argsCount == 2) { + return parent::query($args[0], $args[1]); + } + + return parent::query($args[0]); + } catch (\PDOException $exception) { + throw new PDOException($exception); + } + } + + /** + * {@inheritdoc} + */ + public function quote($input, $type = \PDO::PARAM_STR) + { + return parent::quote($input, $type); + } + + /** + * {@inheritdoc} + */ + public function lastInsertId($name = null) + { + return parent::lastInsertId($name); + } + + /** + * {@inheritdoc} + */ + public function requiresQueryForServerVersion() + { + return false; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOException.php new file mode 100644 index 0000000000000000000000000000000000000000..7a1a02a43f5ac7201e7385c23843a47d35c6fdbd --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOException.php @@ -0,0 +1,75 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +/** + * Tiny wrapper for PDOException instances to implement the {@link DriverException} interface. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class PDOException extends \PDOException implements DriverException +{ + /** + * The driver specific error code. + * + * @var integer|string|null + */ + private $errorCode; + + /** + * The SQLSTATE of the driver. + * + * @var string|null + */ + private $sqlState; + + /** + * Constructor. + * + * @param \PDOException $exception The PDO exception to wrap. + */ + public function __construct(\PDOException $exception) + { + parent::__construct($exception->getMessage(), 0, $exception); + + $this->code = $exception->getCode(); + $this->errorInfo = $exception->errorInfo; + $this->errorCode = isset($exception->errorInfo[1]) ? $exception->errorInfo[1] : $exception->getCode(); + $this->sqlState = isset($exception->errorInfo[0]) ? $exception->errorInfo[0] : $exception->getCode(); + } + + /** + * {@inheritdoc} + */ + public function getErrorCode() + { + return $this->errorCode; + } + + /** + * {@inheritdoc} + */ + public function getSQLState() + { + return $this->sqlState; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOIbm/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOIbm/Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..0b929f72007703e6b3220a9b0fa9ae6b8b69ecd6 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOIbm/Driver.php @@ -0,0 +1,83 @@ +. + */ + +namespace Doctrine\DBAL\Driver\PDOIbm; + +use Doctrine\DBAL\Driver\AbstractDB2Driver; +use Doctrine\DBAL\Driver\PDOConnection; + +/** + * Driver for the PDO IBM extension. + * + * @link www.doctrine-project.org + * @since 1.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Driver extends AbstractDB2Driver +{ + /** + * {@inheritdoc} + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + $conn = new PDOConnection( + $this->_constructPdoDsn($params), + $username, + $password, + $driverOptions + ); + + return $conn; + } + + /** + * Constructs the IBM PDO DSN. + * + * @param array $params + * + * @return string The DSN. + */ + private function _constructPdoDsn(array $params) + { + $dsn = 'ibm:'; + if (isset($params['host'])) { + $dsn .= 'HOSTNAME=' . $params['host'] . ';'; + } + if (isset($params['port'])) { + $dsn .= 'PORT=' . $params['port'] . ';'; + } + $dsn .= 'PROTOCOL=TCPIP;'; + if (isset($params['dbname'])) { + $dsn .= 'DATABASE=' . $params['dbname'] . ';'; + } + + return $dsn; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'pdo_ibm'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..7e3632dde91c7627c5e6bea4b876c48b8d53b61e --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php @@ -0,0 +1,89 @@ +. + */ + +namespace Doctrine\DBAL\Driver\PDOMySql; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Driver\AbstractMySQLDriver; +use Doctrine\DBAL\Driver\PDOConnection; +use PDOException; + +/** + * PDO MySql driver. + * + * @since 2.0 + */ +class Driver extends AbstractMySQLDriver +{ + /** + * {@inheritdoc} + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + try { + $conn = new PDOConnection( + $this->constructPdoDsn($params), + $username, + $password, + $driverOptions + ); + } catch (PDOException $e) { + throw DBALException::driverException($this, $e); + } + + return $conn; + } + + /** + * Constructs the MySql PDO DSN. + * + * @param array $params + * + * @return string The DSN. + */ + protected function constructPdoDsn(array $params) + { + $dsn = 'mysql:'; + if (isset($params['host']) && $params['host'] != '') { + $dsn .= 'host=' . $params['host'] . ';'; + } + if (isset($params['port'])) { + $dsn .= 'port=' . $params['port'] . ';'; + } + if (isset($params['dbname'])) { + $dsn .= 'dbname=' . $params['dbname'] . ';'; + } + if (isset($params['unix_socket'])) { + $dsn .= 'unix_socket=' . $params['unix_socket'] . ';'; + } + if (isset($params['charset'])) { + $dsn .= 'charset=' . $params['charset'] . ';'; + } + + return $dsn; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'pdo_mysql'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..6e958c7448e7762af2508e8ac2bc305709b40274 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php @@ -0,0 +1,78 @@ +. + */ + +namespace Doctrine\DBAL\Driver\PDOOracle; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Driver\AbstractOracleDriver; +use Doctrine\DBAL\Driver\PDOConnection; + +/** + * PDO Oracle driver. + * + * WARNING: This driver gives us segfaults in our testsuites on CLOB and other + * stuff. PDO Oracle is not maintained by Oracle or anyone in the PHP community, + * which leads us to the recommendation to use the "oci8" driver to connect + * to Oracle instead. + */ +class Driver extends AbstractOracleDriver +{ + /** + * {@inheritdoc} + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + try { + return new PDOConnection( + $this->constructPdoDsn($params), + $username, + $password, + $driverOptions + ); + } catch (\PDOException $e) { + throw DBALException::driverException($this, $e); + } + } + + /** + * Constructs the Oracle PDO DSN. + * + * @param array $params + * + * @return string The DSN. + */ + private function constructPdoDsn(array $params) + { + $dsn = 'oci:dbname=' . $this->getEasyConnectString($params); + + if (isset($params['charset'])) { + $dsn .= ';charset=' . $params['charset']; + } + + return $dsn; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'pdo_oracle'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..d5b0b8dd93a2fe1548b463b831e02fa10078a441 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php @@ -0,0 +1,112 @@ +. + */ + +namespace Doctrine\DBAL\Driver\PDOPgSql; + +use Doctrine\DBAL\Driver\AbstractPostgreSQLDriver; +use Doctrine\DBAL\Driver\PDOConnection; +use Doctrine\DBAL\DBALException; +use PDOException; +use PDO; + +/** + * Driver that connects through pdo_pgsql. + * + * @since 2.0 + */ +class Driver extends AbstractPostgreSQLDriver +{ + /** + * {@inheritdoc} + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + try { + $pdo = new PDOConnection( + $this->_constructPdoDsn($params), + $username, + $password, + $driverOptions + ); + + if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES') + && (! isset($driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES]) + || true === $driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES] + ) + ) { + $pdo->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true); + } + + /* defining client_encoding via SET NAMES to avoid inconsistent DSN support + * - the 'client_encoding' connection param only works with postgres >= 9.1 + * - passing client_encoding via the 'options' param breaks pgbouncer support + */ + if (isset($params['charset'])) { + $pdo->query('SET NAMES \''.$params['charset'].'\''); + } + + return $pdo; + } catch (PDOException $e) { + throw DBALException::driverException($this, $e); + } + } + + /** + * Constructs the Postgres PDO DSN. + * + * @param array $params + * + * @return string The DSN. + */ + private function _constructPdoDsn(array $params) + { + $dsn = 'pgsql:'; + + if (isset($params['host']) && $params['host'] != '') { + $dsn .= 'host=' . $params['host'] . ' '; + } + + if (isset($params['port']) && $params['port'] != '') { + $dsn .= 'port=' . $params['port'] . ' '; + } + + if (isset($params['dbname'])) { + $dsn .= 'dbname=' . $params['dbname'] . ' '; + } else { + // Used for temporary connections to allow operations like dropping the database currently connected to. + // Connecting without an explicit database does not work, therefore "postgres" database is used + // as it is certainly present in every server setup. + $dsn .= 'dbname=postgres' . ' '; + } + + if (isset($params['sslmode'])) { + $dsn .= 'sslmode=' . $params['sslmode'] . ' '; + } + + return $dsn; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'pdo_pgsql'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..3c5382fb5f3a668bfe08a2c089683f9af9dd3ceb --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php @@ -0,0 +1,98 @@ +. + */ + +namespace Doctrine\DBAL\Driver\PDOSqlite; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Driver\AbstractSQLiteDriver; +use Doctrine\DBAL\Driver\PDOConnection; +use PDOException; + +/** + * The PDO Sqlite driver. + * + * @since 2.0 + */ +class Driver extends AbstractSQLiteDriver +{ + /** + * @var array + */ + protected $_userDefinedFunctions = array( + 'sqrt' => array('callback' => array('Doctrine\DBAL\Platforms\SqlitePlatform', 'udfSqrt'), 'numArgs' => 1), + 'mod' => array('callback' => array('Doctrine\DBAL\Platforms\SqlitePlatform', 'udfMod'), 'numArgs' => 2), + 'locate' => array('callback' => array('Doctrine\DBAL\Platforms\SqlitePlatform', 'udfLocate'), 'numArgs' => -1), + ); + + /** + * {@inheritdoc} + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + if (isset($driverOptions['userDefinedFunctions'])) { + $this->_userDefinedFunctions = array_merge( + $this->_userDefinedFunctions, $driverOptions['userDefinedFunctions']); + unset($driverOptions['userDefinedFunctions']); + } + + try { + $pdo = new PDOConnection( + $this->_constructPdoDsn($params), + $username, + $password, + $driverOptions + ); + } catch (PDOException $ex) { + throw DBALException::driverException($this, $ex); + } + + foreach ($this->_userDefinedFunctions as $fn => $data) { + $pdo->sqliteCreateFunction($fn, $data['callback'], $data['numArgs']); + } + + return $pdo; + } + + /** + * Constructs the Sqlite PDO DSN. + * + * @param array $params + * + * @return string The DSN. + */ + protected function _constructPdoDsn(array $params) + { + $dsn = 'sqlite:'; + if (isset($params['path'])) { + $dsn .= $params['path']; + } elseif (isset($params['memory'])) { + $dsn .= ':memory:'; + } + + return $dsn; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'pdo_sqlite'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..7b9e9f0ad3c8c22f4f6d22efcfa9d591b727e99e --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php @@ -0,0 +1,69 @@ +. + */ + +namespace Doctrine\DBAL\Driver\PDOSqlsrv; + +use Doctrine\DBAL\Driver\PDOConnection; + +/** + * Sqlsrv Connection implementation. + * + * @since 2.0 + */ +class Connection extends PDOConnection implements \Doctrine\DBAL\Driver\Connection +{ + /** + * {@inheritdoc} + */ + public function __construct($dsn, $user = null, $password = null, array $options = null) + { + parent::__construct($dsn, $user, $password, $options); + $this->setAttribute(\PDO::ATTR_STATEMENT_CLASS, array(Statement::class, array())); + } + + /** + * @override + */ + public function lastInsertId($name = null) + { + if (null === $name) { + return parent::lastInsertId($name); + } + + $stmt = $this->prepare('SELECT CONVERT(VARCHAR(MAX), current_value) FROM sys.sequences WHERE name = ?'); + $stmt->execute(array($name)); + + return $stmt->fetchColumn(); + } + + /** + * {@inheritDoc} + */ + public function quote($value, $type=\PDO::PARAM_STR) + { + $val = parent::quote($value, $type); + + // Fix for a driver version terminating all values with null byte + if (strpos($val, "\0") !== false) { + $val = substr($val, 0, -1); + } + + return $val; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..64b91f194c0417743fab10b80303c5e2f1b060ed --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php @@ -0,0 +1,81 @@ +. + */ + +namespace Doctrine\DBAL\Driver\PDOSqlsrv; + +use Doctrine\DBAL\Driver\AbstractSQLServerDriver; + +/** + * The PDO-based Sqlsrv driver. + * + * @since 2.0 + */ +class Driver extends AbstractSQLServerDriver +{ + /** + * {@inheritdoc} + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + return new Connection( + $this->_constructPdoDsn($params), + $username, + $password, + $driverOptions + ); + } + + /** + * Constructs the Sqlsrv PDO DSN. + * + * @param array $params + * + * @return string The DSN. + */ + private function _constructPdoDsn(array $params) + { + $dsn = 'sqlsrv:server='; + + if (isset($params['host'])) { + $dsn .= $params['host']; + } + + if (isset($params['port']) && !empty($params['port'])) { + $dsn .= ',' . $params['port']; + } + + if (isset($params['dbname'])) { + $dsn .= ';Database=' . $params['dbname']; + } + + if (isset($params['MultipleActiveResultSets'])) { + $dsn .= '; MultipleActiveResultSets=' . ($params['MultipleActiveResultSets'] ? 'true' : 'false'); + } + + return $dsn; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'pdo_sqlsrv'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Statement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Statement.php new file mode 100644 index 0000000000000000000000000000000000000000..3d1b22a656e8ea9a305a4ca0a8b46a065070f4a6 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Statement.php @@ -0,0 +1,49 @@ +. + */ + +namespace Doctrine\DBAL\Driver\PDOSqlsrv; + +use Doctrine\DBAL\Driver\PDOStatement; +use PDO; + +/** + * PDO SQL Server Statement + */ +class Statement extends PDOStatement +{ + /** + * {@inheritdoc} + */ + public function bindParam($column, &$variable, $type = PDO::PARAM_STR, $length = null, $driverOptions = null) + { + if ($type === PDO::PARAM_LOB && $driverOptions === null) { + $driverOptions = PDO::SQLSRV_ENCODING_BINARY; + } + + return parent::bindParam($column, $variable, $type, $length, $driverOptions); + } + + /** + * {@inheritdoc} + */ + public function bindValue($param, $value, $type = PDO::PARAM_STR) + { + return $this->bindParam($param, $value, $type); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php new file mode 100644 index 0000000000000000000000000000000000000000..b6a8cb48c5167eb12457069b3d005994f618dab5 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php @@ -0,0 +1,156 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +/** + * The PDO implementation of the Statement interface. + * Used by all PDO-based drivers. + * + * @since 2.0 + */ +class PDOStatement extends \PDOStatement implements Statement +{ + /** + * Protected constructor. + */ + protected function __construct() + { + } + + /** + * {@inheritdoc} + */ + public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) + { + // This thin wrapper is necessary to shield against the weird signature + // of PDOStatement::setFetchMode(): even if the second and third + // parameters are optional, PHP will not let us remove it from this + // declaration. + try { + if ($arg2 === null && $arg3 === null) { + return parent::setFetchMode($fetchMode); + } + + if ($arg3 === null) { + return parent::setFetchMode($fetchMode, $arg2); + } + + return parent::setFetchMode($fetchMode, $arg2, $arg3); + } catch (\PDOException $exception) { + throw new PDOException($exception); + } + } + + /** + * {@inheritdoc} + */ + public function bindValue($param, $value, $type = \PDO::PARAM_STR) + { + try { + return parent::bindValue($param, $value, $type); + } catch (\PDOException $exception) { + throw new PDOException($exception); + } + } + + /** + * {@inheritdoc} + */ + public function bindParam($column, &$variable, $type = \PDO::PARAM_STR, $length = null, $driverOptions = null) + { + try { + return parent::bindParam($column, $variable, $type, $length, $driverOptions); + } catch (\PDOException $exception) { + throw new PDOException($exception); + } + } + + /** + * {@inheritdoc} + */ + public function execute($params = null) + { + try { + return parent::execute($params); + } catch (\PDOException $exception) { + throw new PDOException($exception); + } + } + + /** + * {@inheritdoc} + */ + public function fetch($fetchMode = null, $cursorOrientation = null, $cursorOffset = null) + { + try { + if ($fetchMode === null && $cursorOrientation === null && $cursorOffset === null) { + return parent::fetch(); + } + + if ($cursorOrientation === null && $cursorOffset === null) { + return parent::fetch($fetchMode); + } + + if ($cursorOffset === null) { + return parent::fetch($fetchMode, $cursorOrientation); + } + + return parent::fetch($fetchMode, $cursorOrientation, $cursorOffset); + } catch (\PDOException $exception) { + throw new PDOException($exception); + } + } + + /** + * {@inheritdoc} + */ + public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null) + { + try { + if ($fetchMode === null && $fetchArgument === null && $ctorArgs === null) { + return parent::fetchAll(); + } + + if ($fetchArgument === null && $ctorArgs === null) { + return parent::fetchAll($fetchMode); + } + + if ($ctorArgs === null) { + return parent::fetchAll($fetchMode, $fetchArgument); + } + + return parent::fetchAll($fetchMode, $fetchArgument, $ctorArgs); + } catch (\PDOException $exception) { + throw new PDOException($exception); + } + } + + /** + * {@inheritdoc} + */ + public function fetchColumn($columnIndex = 0) + { + try { + return parent::fetchColumn($columnIndex); + } catch (\PDOException $exception) { + throw new PDOException($exception); + } + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PingableConnection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PingableConnection.php new file mode 100644 index 0000000000000000000000000000000000000000..8c85a82c8399babb810af8287ee78a0340f7e52e --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PingableConnection.php @@ -0,0 +1,39 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +/** + * An interface for connections which support a "native" ping method. + * + * @link www.doctrine-project.org + * @since 2.5 + * @author Till Klampaeckel + * @author Benjamin Eberlei + */ +interface PingableConnection +{ + /** + * Pings the database server to determine if the connection is still + * available. Return true/false based on if that was successful or not. + * + * @return bool + */ + public function ping(); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ResultStatement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ResultStatement.php new file mode 100644 index 0000000000000000000000000000000000000000..ad76ddb1164a3074564711ad5bedda4b7100960f --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ResultStatement.php @@ -0,0 +1,95 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +/** + * Interface for the reading part of a prepare statement only. + * + * @author Benjamin Eberlei + */ +interface ResultStatement extends \Traversable +{ + /** + * Closes the cursor, enabling the statement to be executed again. + * + * @return boolean TRUE on success or FALSE on failure. + */ + public function closeCursor(); + + /** + * Returns the number of columns in the result set + * + * @return integer The number of columns in the result set represented + * by the PDOStatement object. If there is no result set, + * this method should return 0. + */ + public function columnCount(); + + /** + * Sets the fetch mode to use while iterating this statement. + * + * @param integer $fetchMode The fetch mode must be one of the PDO::FETCH_* constants. + * @param mixed $arg2 + * @param mixed $arg3 + * + * @return boolean + * + * @see PDO::FETCH_* constants. + */ + public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null); + + /** + * Returns the next row of a result set. + * + * @param integer|null $fetchMode Controls how the next row will be returned to the caller. + * The value must be one of the PDO::FETCH_* constants, + * defaulting to PDO::FETCH_BOTH. + * + * @return mixed The return value of this method on success depends on the fetch mode. In all cases, FALSE is + * returned on failure. + * + * @see PDO::FETCH_* constants. + */ + public function fetch($fetchMode = null); + + /** + * Returns an array containing all of the result set rows. + * + * @param integer|null $fetchMode Controls how the next row will be returned to the caller. + * The value must be one of the PDO::FETCH_* constants, + * defaulting to PDO::FETCH_BOTH. + * + * @return array + * + * @see PDO::FETCH_* constants. + */ + public function fetchAll($fetchMode = null); + + /** + * Returns a single column from the next row of a result set or FALSE if there are no more rows. + * + * @param integer $columnIndex 0-indexed number of the column you wish to retrieve from the row. + * If no value is supplied, PDOStatement->fetchColumn() + * fetches the first column. + * + * @return string|boolean A single column in the next row of a result set, or FALSE if there are no more rows. + */ + public function fetchColumn($columnIndex = 0); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLAnywhere/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLAnywhere/Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..cb694a32e209f4d11109c79e5048c377b2c8591d --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLAnywhere/Driver.php @@ -0,0 +1,104 @@ +. + */ + +namespace Doctrine\DBAL\Driver\SQLAnywhere; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver; + +/** + * A Doctrine DBAL driver for the SAP Sybase SQL Anywhere PHP extension. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class Driver extends AbstractSQLAnywhereDriver +{ + /** + * {@inheritdoc} + * + * @throws \Doctrine\DBAL\DBALException if there was a problem establishing the connection. + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + try { + return new SQLAnywhereConnection( + $this->buildDsn( + isset($params['host']) ? $params['host'] : null, + isset($params['port']) ? $params['port'] : null, + isset($params['server']) ? $params['server'] : null, + isset($params['dbname']) ? $params['dbname'] : null, + $username, + $password, + $driverOptions + ), + isset($params['persistent']) ? $params['persistent'] : false + ); + } catch (SQLAnywhereException $e) { + throw DBALException::driverException($this, $e); + } + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'sqlanywhere'; + } + + /** + * Build the connection string for given connection parameters and driver options. + * + * @param string $host Host address to connect to. + * @param integer $port Port to use for the connection (default to SQL Anywhere standard port 2638). + * @param string $server Database server name on the host to connect to. + * SQL Anywhere allows multiple database server instances on the same host, + * therefore specifying the server instance name to use is mandatory. + * @param string $dbname Name of the database on the server instance to connect to. + * @param string $username User name to use for connection authentication. + * @param string $password Password to use for connection authentication. + * @param array $driverOptions Additional parameters to use for the connection. + * + * @return string + */ + private function buildDsn($host, $port, $server, $dbname, $username = null, $password = null, array $driverOptions = array()) + { + $host = $host ?: 'localhost'; + $port = $port ?: 2638; + + if (! empty($server)) { + $server = ';ServerName=' . $server; + } + + return + 'HOST=' . $host . ':' . $port . + $server . + ';DBN=' . $dbname . + ';UID=' . $username . + ';PWD=' . $password . + ';' . implode( + ';', + array_map(function ($key, $value) { + return $key . '=' . $value; + }, array_keys($driverOptions), $driverOptions) + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php new file mode 100644 index 0000000000000000000000000000000000000000..79fbb363ce7ce06cf5a1ba67956cca0f1b85e50b --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php @@ -0,0 +1,223 @@ +. + */ + +namespace Doctrine\DBAL\Driver\SQLAnywhere; + +use Doctrine\DBAL\Driver\Connection; +use Doctrine\DBAL\Driver\ServerInfoAwareConnection; + +/** + * SAP Sybase SQL Anywhere implementation of the Connection interface. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class SQLAnywhereConnection implements Connection, ServerInfoAwareConnection +{ + /** + * @var resource The SQL Anywhere connection resource. + */ + private $connection; + + /** + * Constructor. + * + * Connects to database with given connection string. + * + * @param string $dsn The connection string. + * @param boolean $persistent Whether or not to establish a persistent connection. + * + * @throws SQLAnywhereException + */ + public function __construct($dsn, $persistent = false) + { + $this->connection = $persistent ? @sasql_pconnect($dsn) : @sasql_connect($dsn); + + if ( ! is_resource($this->connection) || get_resource_type($this->connection) !== 'SQLAnywhere connection') { + throw SQLAnywhereException::fromSQLAnywhereError(); + } + + // Disable PHP warnings on error. + if ( ! sasql_set_option($this->connection, 'verbose_errors', false)) { + throw SQLAnywhereException::fromSQLAnywhereError($this->connection); + } + + // Enable auto committing by default. + if ( ! sasql_set_option($this->connection, 'auto_commit', 'on')) { + throw SQLAnywhereException::fromSQLAnywhereError($this->connection); + } + + // Enable exact, non-approximated row count retrieval. + if ( ! sasql_set_option($this->connection, 'row_counts', true)) { + throw SQLAnywhereException::fromSQLAnywhereError($this->connection); + } + } + + /** + * {@inheritdoc} + * + * @throws SQLAnywhereException + */ + public function beginTransaction() + { + if ( ! sasql_set_option($this->connection, 'auto_commit', 'off')) { + throw SQLAnywhereException::fromSQLAnywhereError($this->connection); + } + + return true; + } + + /** + * {@inheritdoc} + * + * @throws SQLAnywhereException + */ + public function commit() + { + if ( ! sasql_commit($this->connection)) { + throw SQLAnywhereException::fromSQLAnywhereError($this->connection); + } + + $this->endTransaction(); + + return true; + } + + /** + * {@inheritdoc} + */ + public function errorCode() + { + return sasql_errorcode($this->connection); + } + + /** + * {@inheritdoc} + */ + public function errorInfo() + { + return sasql_error($this->connection); + } + + /** + * {@inheritdoc} + */ + public function exec($statement) + { + $stmt = $this->prepare($statement); + + $stmt->execute(); + + return $stmt->rowCount(); + } + + /** + * {@inheritdoc} + */ + public function getServerVersion() + { + return $this->query("SELECT PROPERTY('ProductVersion')")->fetchColumn(); + } + + /** + * {@inheritdoc} + */ + public function lastInsertId($name = null) + { + if (null === $name) { + return sasql_insert_id($this->connection); + } + + return $this->query('SELECT ' . $name . '.CURRVAL')->fetchColumn(); + } + + /** + * {@inheritdoc} + */ + public function prepare($prepareString) + { + return new SQLAnywhereStatement($this->connection, $prepareString); + } + + /** + * {@inheritdoc} + */ + public function query() + { + $args = func_get_args(); + $stmt = $this->prepare($args[0]); + + $stmt->execute(); + + return $stmt; + } + + /** + * {@inheritdoc} + */ + public function quote($input, $type = \PDO::PARAM_STR) + { + if (is_int($input) || is_float($input)) { + return $input; + } + + return "'" . sasql_escape_string($this->connection, $input) . "'"; + } + + /** + * {@inheritdoc} + */ + public function requiresQueryForServerVersion() + { + return true; + } + + /** + * {@inheritdoc} + * + * @throws SQLAnywhereException + */ + public function rollBack() + { + if ( ! sasql_rollback($this->connection)) { + throw SQLAnywhereException::fromSQLAnywhereError($this->connection); + } + + $this->endTransaction(); + + return true; + } + + /** + * Ends transactional mode and enables auto commit again. + * + * @throws SQLAnywhereException + * + * @return boolean Whether or not ending transactional mode succeeded. + */ + private function endTransaction() + { + if ( ! sasql_set_option($this->connection, 'auto_commit', 'on')) { + throw SQLAnywhereException::fromSQLAnywhereError($this->connection); + } + + return true; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereException.php new file mode 100644 index 0000000000000000000000000000000000000000..b68777da112dc75aedaa90965e8b989ba1152b99 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereException.php @@ -0,0 +1,94 @@ +. + */ + +namespace Doctrine\DBAL\Driver\SQLAnywhere; + +use Doctrine\DBAL\Driver\AbstractDriverException; + +/** + * SAP Sybase SQL Anywhere driver exception. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class SQLAnywhereException extends AbstractDriverException +{ + /** + * Helper method to turn SQL Anywhere error into exception. + * + * @param resource|null $conn The SQL Anywhere connection resource to retrieve the last error from. + * @param resource|null $stmt The SQL Anywhere statement resource to retrieve the last error from. + * + * @return SQLAnywhereException + * + * @throws \InvalidArgumentException + */ + public static function fromSQLAnywhereError($conn = null, $stmt = null) + { + if (null !== $conn && ! (is_resource($conn) && get_resource_type($conn) === 'SQLAnywhere connection')) { + throw new \InvalidArgumentException('Invalid SQL Anywhere connection resource given: ' . $conn); + } + + if (null !== $stmt && ! (is_resource($stmt) && get_resource_type($stmt) === 'SQLAnywhere statement')) { + throw new \InvalidArgumentException('Invalid SQL Anywhere statement resource given: ' . $stmt); + } + + $state = $conn ? sasql_sqlstate($conn) : sasql_sqlstate(); + $code = null; + $message = null; + + /** + * Try retrieving the last error from statement resource if given + */ + if ($stmt) { + $code = sasql_stmt_errno($stmt); + $message = sasql_stmt_error($stmt); + } + + /** + * Try retrieving the last error from the connection resource + * if either the statement resource is not given or the statement + * resource is given but the last error could not be retrieved from it (fallback). + * Depending on the type of error, it is sometimes necessary to retrieve + * it from the connection resource even though it occurred during + * a prepared statement. + */ + if ($conn && ! $code) { + $code = sasql_errorcode($conn); + $message = sasql_error($conn); + } + + /** + * Fallback mode if either no connection resource is given + * or the last error could not be retrieved from the given + * connection / statement resource. + */ + if ( ! $conn || ! $code) { + $code = sasql_errorcode(); + $message = sasql_error(); + } + + if ($message) { + return new self('SQLSTATE [' . $state . '] [' . $code . '] ' . $message, $state, $code); + } + + return new self('SQL Anywhere error occurred but no error message was retrieved from driver.', $state, $code); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php new file mode 100644 index 0000000000000000000000000000000000000000..a6d702a225a924658f7313342a4d8a5028fd77ac --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php @@ -0,0 +1,347 @@ +. + */ + +namespace Doctrine\DBAL\Driver\SQLAnywhere; + +use IteratorAggregate; +use PDO; +use Doctrine\DBAL\Driver\Statement; + +/** + * SAP SQL Anywhere implementation of the Statement interface. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class SQLAnywhereStatement implements IteratorAggregate, Statement +{ + /** + * @var resource The connection resource. + */ + private $conn; + + /** + * @var string Name of the default class to instantiate when fetch mode is \PDO::FETCH_CLASS. + */ + private $defaultFetchClass = '\stdClass'; + + /** + * @var string Constructor arguments for the default class to instantiate when fetch mode is \PDO::FETCH_CLASS. + */ + private $defaultFetchClassCtorArgs = array(); + + /** + * @var int Default fetch mode to use. + */ + private $defaultFetchMode = PDO::FETCH_BOTH; + + /** + * @var resource The result set resource to fetch. + */ + private $result; + + /** + * @var resource The prepared SQL statement to execute. + */ + private $stmt; + + /** + * Constructor. + * + * Prepares given statement for given connection. + * + * @param resource $conn The connection resource to use. + * @param string $sql The SQL statement to prepare. + * + * @throws SQLAnywhereException + */ + public function __construct($conn, $sql) + { + if ( ! is_resource($conn) || get_resource_type($conn) !== 'SQLAnywhere connection') { + throw new SQLAnywhereException('Invalid SQL Anywhere connection resource: ' . $conn); + } + + $this->conn = $conn; + $this->stmt = sasql_prepare($conn, $sql); + + if ( ! is_resource($this->stmt) || get_resource_type($this->stmt) !== 'SQLAnywhere statement') { + throw SQLAnywhereException::fromSQLAnywhereError($conn); + } + } + + /** + * {@inheritdoc} + * + * @throws SQLAnywhereException + */ + public function bindParam($column, &$variable, $type = null, $length = null) + { + switch ($type) { + case PDO::PARAM_INT: + case PDO::PARAM_BOOL: + $type = 'i'; + break; + case PDO::PARAM_LOB: + $type = 'b'; + break; + case PDO::PARAM_NULL: + case PDO::PARAM_STR: + $type = 's'; + break; + default: + throw new SQLAnywhereException('Unknown type: ' . $type); + } + + if ( ! sasql_stmt_bind_param_ex($this->stmt, $column - 1, $variable, $type, $variable === null)) { + throw SQLAnywhereException::fromSQLAnywhereError($this->conn, $this->stmt); + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function bindValue($param, $value, $type = null) + { + return $this->bindParam($param, $value, $type); + } + + /** + * {@inheritdoc} + * + * @throws SQLAnywhereException + */ + public function closeCursor() + { + if (!sasql_stmt_reset($this->stmt)) { + throw SQLAnywhereException::fromSQLAnywhereError($this->conn, $this->stmt); + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function columnCount() + { + return sasql_stmt_field_count($this->stmt); + } + + /** + * {@inheritdoc} + */ + public function errorCode() + { + return sasql_stmt_errno($this->stmt); + } + + /** + * {@inheritdoc} + */ + public function errorInfo() + { + return sasql_stmt_error($this->stmt); + } + + /** + * {@inheritdoc} + * + * @throws SQLAnywhereException + */ + public function execute($params = null) + { + if (is_array($params)) { + $hasZeroIndex = array_key_exists(0, $params); + + foreach ($params as $key => $val) { + $key = ($hasZeroIndex && is_numeric($key)) ? $key + 1 : $key; + + $this->bindValue($key, $val); + } + } + + if ( ! sasql_stmt_execute($this->stmt)) { + throw SQLAnywhereException::fromSQLAnywhereError($this->conn, $this->stmt); + } + + $this->result = sasql_stmt_result_metadata($this->stmt); + + return true; + } + + /** + * {@inheritdoc} + * + * @throws SQLAnywhereException + */ + public function fetch($fetchMode = null) + { + if ( ! is_resource($this->result) || get_resource_type($this->result) !== 'SQLAnywhere result') { + return false; + } + + $fetchMode = $fetchMode ?: $this->defaultFetchMode; + + switch ($fetchMode) { + case PDO::FETCH_ASSOC: + return sasql_fetch_assoc($this->result); + case PDO::FETCH_BOTH: + return sasql_fetch_array($this->result, SASQL_BOTH); + case PDO::FETCH_CLASS: + $className = $this->defaultFetchClass; + $ctorArgs = $this->defaultFetchClassCtorArgs; + + if (func_num_args() >= 2) { + $args = func_get_args(); + $className = $args[1]; + $ctorArgs = isset($args[2]) ? $args[2] : array(); + } + + $result = sasql_fetch_object($this->result); + + if ($result instanceof \stdClass) { + $result = $this->castObject($result, $className, $ctorArgs); + } + + return $result; + case PDO::FETCH_NUM: + return sasql_fetch_row($this->result); + case PDO::FETCH_OBJ: + return sasql_fetch_object($this->result); + default: + throw new SQLAnywhereException('Fetch mode is not supported: ' . $fetchMode); + } + } + + /** + * {@inheritdoc} + */ + public function fetchAll($fetchMode = null) + { + $rows = array(); + + switch ($fetchMode) { + case PDO::FETCH_CLASS: + while ($row = call_user_func_array(array($this, 'fetch'), func_get_args())) { + $rows[] = $row; + } + break; + case PDO::FETCH_COLUMN: + while ($row = $this->fetchColumn()) { + $rows[] = $row; + } + break; + default: + while ($row = $this->fetch($fetchMode)) { + $rows[] = $row; + } + } + + return $rows; + } + + /** + * {@inheritdoc} + */ + public function fetchColumn($columnIndex = 0) + { + $row = $this->fetch(PDO::FETCH_NUM); + + if (false === $row) { + return false; + } + + return isset($row[$columnIndex]) ? $row[$columnIndex] : null; + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + return new \ArrayIterator($this->fetchAll()); + } + + /** + * {@inheritdoc} + */ + public function rowCount() + { + return sasql_stmt_affected_rows($this->stmt); + } + + /** + * {@inheritdoc} + */ + public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) + { + $this->defaultFetchMode = $fetchMode; + $this->defaultFetchClass = $arg2 ? $arg2 : $this->defaultFetchClass; + $this->defaultFetchClassCtorArgs = $arg3 ? (array) $arg3 : $this->defaultFetchClassCtorArgs; + } + + /** + * Casts a stdClass object to the given class name mapping its' properties. + * + * @param \stdClass $sourceObject Object to cast from. + * @param string|object $destinationClass Name of the class or class instance to cast to. + * @param array $ctorArgs Arguments to use for constructing the destination class instance. + * + * @return object + * + * @throws SQLAnywhereException + */ + private function castObject(\stdClass $sourceObject, $destinationClass, array $ctorArgs = array()) + { + if ( ! is_string($destinationClass)) { + if ( ! is_object($destinationClass)) { + throw new SQLAnywhereException(sprintf( + 'Destination class has to be of type string or object, %s given.', gettype($destinationClass) + )); + } + } else { + $destinationClass = new \ReflectionClass($destinationClass); + $destinationClass = $destinationClass->newInstanceArgs($ctorArgs); + } + + $sourceReflection = new \ReflectionObject($sourceObject); + $destinationClassReflection = new \ReflectionObject($destinationClass); + + foreach ($sourceReflection->getProperties() as $sourceProperty) { + $sourceProperty->setAccessible(true); + + $name = $sourceProperty->getName(); + $value = $sourceProperty->getValue($sourceObject); + + if ($destinationClassReflection->hasProperty($name)) { + $destinationProperty = $destinationClassReflection->getProperty($name); + + $destinationProperty->setAccessible(true); + $destinationProperty->setValue($destinationClass, $value); + } else { + $destinationClass->$name = $value; + } + } + + return $destinationClass; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/Driver.php new file mode 100644 index 0000000000000000000000000000000000000000..f9423973e25cacf94db967db78843f0653ddd22f --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/Driver.php @@ -0,0 +1,68 @@ +. + */ + +namespace Doctrine\DBAL\Driver\SQLSrv; + +use Doctrine\DBAL\Driver\AbstractSQLServerDriver; + +/** + * Driver for ext/sqlsrv. + */ +class Driver extends AbstractSQLServerDriver +{ + /** + * {@inheritdoc} + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + if (!isset($params['host'])) { + throw new SQLSrvException("Missing 'host' in configuration for sqlsrv driver."); + } + + $serverName = $params['host']; + if (isset($params['port'])) { + $serverName .= ', ' . $params['port']; + } + + if (isset($params['dbname'])) { + $driverOptions['Database'] = $params['dbname']; + } + + if (isset($params['charset'])) { + $driverOptions['CharacterSet'] = $params['charset']; + } + + $driverOptions['UID'] = $username; + $driverOptions['PWD'] = $password; + + if (!isset($driverOptions['ReturnDatesAsStrings'])) { + $driverOptions['ReturnDatesAsStrings'] = 1; + } + + return new SQLSrvConnection($serverName, $driverOptions); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'sqlsrv'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/LastInsertId.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/LastInsertId.php new file mode 100644 index 0000000000000000000000000000000000000000..67c7bfa851a339a49e16969ac580229b5778b96d --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/LastInsertId.php @@ -0,0 +1,50 @@ +. + */ + +namespace Doctrine\DBAL\Driver\SQLSrv; + +/** + * Last Id Data Container. + * + * @since 2.3 + * @author Benjamin Eberlei + */ +class LastInsertId +{ + /** + * @var integer + */ + private $id; + + /** + * @param integer $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * @return integer + */ + public function getId() + { + return $this->id; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php new file mode 100644 index 0000000000000000000000000000000000000000..9a80b68d23552e859b68680565d966bdcc5c19ef --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php @@ -0,0 +1,192 @@ +. + */ + +namespace Doctrine\DBAL\Driver\SQLSrv; + +use Doctrine\DBAL\Driver\Connection; +use Doctrine\DBAL\Driver\ServerInfoAwareConnection; + +/** + * SQL Server implementation for the Connection interface. + * + * @since 2.3 + * @author Benjamin Eberlei + */ +class SQLSrvConnection implements Connection, ServerInfoAwareConnection +{ + /** + * @var resource + */ + protected $conn; + + /** + * @var \Doctrine\DBAL\Driver\SQLSrv\LastInsertId + */ + protected $lastInsertId; + + /** + * @param string $serverName + * @param array $connectionOptions + * + * @throws \Doctrine\DBAL\Driver\SQLSrv\SQLSrvException + */ + public function __construct($serverName, $connectionOptions) + { + if ( ! sqlsrv_configure('WarningsReturnAsErrors', 0)) { + throw SQLSrvException::fromSqlSrvErrors(); + } + + $this->conn = sqlsrv_connect($serverName, $connectionOptions); + if ( ! $this->conn) { + throw SQLSrvException::fromSqlSrvErrors(); + } + $this->lastInsertId = new LastInsertId(); + } + + /** + * {@inheritdoc} + */ + public function getServerVersion() + { + $serverInfo = sqlsrv_server_info($this->conn); + + return $serverInfo['SQLServerVersion']; + } + + /** + * {@inheritdoc} + */ + public function requiresQueryForServerVersion() + { + return false; + } + + /** + * {@inheritDoc} + */ + public function prepare($sql) + { + return new SQLSrvStatement($this->conn, $sql, $this->lastInsertId); + } + + /** + * {@inheritDoc} + */ + public function query() + { + $args = func_get_args(); + $sql = $args[0]; + $stmt = $this->prepare($sql); + $stmt->execute(); + + return $stmt; + } + + /** + * {@inheritDoc} + * @license New BSD, code from Zend Framework + */ + public function quote($value, $type=\PDO::PARAM_STR) + { + if (is_int($value)) { + return $value; + } elseif (is_float($value)) { + return sprintf('%F', $value); + } + + return "'" . str_replace("'", "''", $value) . "'"; + } + + /** + * {@inheritDoc} + */ + public function exec($statement) + { + $stmt = $this->prepare($statement); + $stmt->execute(); + + return $stmt->rowCount(); + } + + /** + * {@inheritDoc} + */ + public function lastInsertId($name = null) + { + if ($name !== null) { + $stmt = $this->prepare('SELECT CONVERT(VARCHAR(MAX), current_value) FROM sys.sequences WHERE name = ?'); + $stmt->execute(array($name)); + + return $stmt->fetchColumn(); + } + + return $this->lastInsertId->getId(); + } + + /** + * {@inheritDoc} + */ + public function beginTransaction() + { + if ( ! sqlsrv_begin_transaction($this->conn)) { + throw SQLSrvException::fromSqlSrvErrors(); + } + } + + /** + * {@inheritDoc} + */ + public function commit() + { + if ( ! sqlsrv_commit($this->conn)) { + throw SQLSrvException::fromSqlSrvErrors(); + } + } + + /** + * {@inheritDoc} + */ + public function rollBack() + { + if ( ! sqlsrv_rollback($this->conn)) { + throw SQLSrvException::fromSqlSrvErrors(); + } + } + + /** + * {@inheritDoc} + */ + public function errorCode() + { + $errors = sqlsrv_errors(SQLSRV_ERR_ERRORS); + if ($errors) { + return $errors[0]['code']; + } + + return false; + } + + /** + * {@inheritDoc} + */ + public function errorInfo() + { + return sqlsrv_errors(SQLSRV_ERR_ERRORS); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php new file mode 100644 index 0000000000000000000000000000000000000000..b2c463259a8b4ba3ed9c6722bf3df8b73ced2cfc --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php @@ -0,0 +1,56 @@ +. + */ + +namespace Doctrine\DBAL\Driver\SQLSrv; + + +use Doctrine\DBAL\Driver\AbstractDriverException; + +class SQLSrvException extends AbstractDriverException +{ + /** + * Helper method to turn sql server errors into exception. + * + * @return \Doctrine\DBAL\Driver\SQLSrv\SQLSrvException + */ + static public function fromSqlSrvErrors() + { + $errors = sqlsrv_errors(SQLSRV_ERR_ERRORS); + $message = ""; + $sqlState = null; + $errorCode = null; + + foreach ($errors as $error) { + $message .= "SQLSTATE [".$error['SQLSTATE'].", ".$error['code']."]: ". $error['message']."\n"; + + if (null === $sqlState) { + $sqlState = $error['SQLSTATE']; + } + + if (null === $errorCode) { + $errorCode = $error['code']; + } + } + if ( ! $message) { + $message = "SQL Server error occurred but no error message was retrieved from driver."; + } + + return new self(rtrim($message), $sqlState, $errorCode); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php new file mode 100644 index 0000000000000000000000000000000000000000..eee341796d8adfeeb40d8637cca58f5720303f11 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php @@ -0,0 +1,384 @@ +. + */ + +namespace Doctrine\DBAL\Driver\SQLSrv; + +use PDO; +use IteratorAggregate; +use Doctrine\DBAL\Driver\Statement; + +/** + * SQL Server Statement. + * + * @since 2.3 + * @author Benjamin Eberlei + */ +class SQLSrvStatement implements IteratorAggregate, Statement +{ + /** + * The SQLSRV Resource. + * + * @var resource + */ + private $conn; + + /** + * The SQL statement to execute. + * + * @var string + */ + private $sql; + + /** + * The SQLSRV statement resource. + * + * @var resource + */ + private $stmt; + + /** + * References to the variables bound as statement parameters. + * + * @var array + */ + private $variables = array(); + + /** + * Bound parameter types. + * + * @var array + */ + private $types = array(); + + /** + * Translations. + * + * @var array + */ + private static $fetchMap = array( + PDO::FETCH_BOTH => SQLSRV_FETCH_BOTH, + PDO::FETCH_ASSOC => SQLSRV_FETCH_ASSOC, + PDO::FETCH_NUM => SQLSRV_FETCH_NUMERIC, + ); + + /** + * The name of the default class to instantiate when fetch mode is \PDO::FETCH_CLASS. + * + * @var string + */ + private $defaultFetchClass = '\stdClass'; + + /** + * The constructor arguments for the default class to instantiate when fetch mode is \PDO::FETCH_CLASS. + * + * @var string + */ + private $defaultFetchClassCtorArgs = array(); + + /** + * The fetch style. + * + * @param integer + */ + private $defaultFetchMode = PDO::FETCH_BOTH; + + /** + * The last insert ID. + * + * @var \Doctrine\DBAL\Driver\SQLSrv\LastInsertId|null + */ + private $lastInsertId; + + /** + * Indicates whether the statement is in the state when fetching results is possible + * + * @var bool + */ + private $result = false; + + /** + * Append to any INSERT query to retrieve the last insert id. + * + * @var string + */ + const LAST_INSERT_ID_SQL = ';SELECT SCOPE_IDENTITY() AS LastInsertId;'; + + /** + * @param resource $conn + * @param string $sql + * @param \Doctrine\DBAL\Driver\SQLSrv\LastInsertId|null $lastInsertId + */ + public function __construct($conn, $sql, LastInsertId $lastInsertId = null) + { + $this->conn = $conn; + $this->sql = $sql; + + if (stripos($sql, 'INSERT INTO ') === 0) { + $this->sql .= self::LAST_INSERT_ID_SQL; + $this->lastInsertId = $lastInsertId; + } + } + + /** + * {@inheritdoc} + */ + public function bindValue($param, $value, $type = null) + { + if (!is_numeric($param)) { + throw new SQLSrvException( + 'sqlsrv does not support named parameters to queries, use question mark (?) placeholders instead.' + ); + } + + $this->variables[$param] = $value; + $this->types[$param] = $type; + } + + /** + * {@inheritdoc} + */ + public function bindParam($column, &$variable, $type = null, $length = null) + { + if (!is_numeric($column)) { + throw new SQLSrvException("sqlsrv does not support named parameters to queries, use question mark (?) placeholders instead."); + } + + $this->variables[$column] =& $variable; + $this->types[$column] = $type; + + // unset the statement resource if it exists as the new one will need to be bound to the new variable + $this->stmt = null; + } + + /** + * {@inheritdoc} + */ + public function closeCursor() + { + // not having the result means there's nothing to close + if (!$this->result) { + return true; + } + + // emulate it by fetching and discarding rows, similarly to what PDO does in this case + // @link http://php.net/manual/en/pdostatement.closecursor.php + // @link https://github.com/php/php-src/blob/php-7.0.11/ext/pdo/pdo_stmt.c#L2075 + // deliberately do not consider multiple result sets, since doctrine/dbal doesn't support them + while (sqlsrv_fetch($this->stmt)); + + $this->result = false; + + return true; + } + + /** + * {@inheritdoc} + */ + public function columnCount() + { + return sqlsrv_num_fields($this->stmt); + } + + /** + * {@inheritdoc} + */ + public function errorCode() + { + $errors = sqlsrv_errors(SQLSRV_ERR_ERRORS); + if ($errors) { + return $errors[0]['code']; + } + + return false; + } + + /** + * {@inheritdoc} + */ + public function errorInfo() + { + return sqlsrv_errors(SQLSRV_ERR_ERRORS); + } + + /** + * {@inheritdoc} + */ + public function execute($params = null) + { + if ($params) { + $hasZeroIndex = array_key_exists(0, $params); + foreach ($params as $key => $val) { + $key = ($hasZeroIndex && is_numeric($key)) ? $key + 1 : $key; + $this->bindValue($key, $val); + } + } + + if ( ! $this->stmt) { + $this->stmt = $this->prepare(); + } + + if (!sqlsrv_execute($this->stmt)) { + throw SQLSrvException::fromSqlSrvErrors(); + } + + if ($this->lastInsertId) { + sqlsrv_next_result($this->stmt); + sqlsrv_fetch($this->stmt); + $this->lastInsertId->setId(sqlsrv_get_field($this->stmt, 0)); + } + + $this->result = true; + } + + /** + * Prepares SQL Server statement resource + * + * @return resource + * @throws SQLSrvException + */ + private function prepare() + { + $params = array(); + + foreach ($this->variables as $column => &$variable) { + if ($this->types[$column] === \PDO::PARAM_LOB) { + $params[$column - 1] = array( + &$variable, + SQLSRV_PARAM_IN, + SQLSRV_PHPTYPE_STREAM(SQLSRV_ENC_BINARY), + SQLSRV_SQLTYPE_VARBINARY('max'), + ); + } else { + $params[$column - 1] =& $variable; + } + } + + $stmt = sqlsrv_prepare($this->conn, $this->sql, $params); + + if (!$stmt) { + throw SQLSrvException::fromSqlSrvErrors(); + } + + return $stmt; + } + + /** + * {@inheritdoc} + */ + public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) + { + $this->defaultFetchMode = $fetchMode; + $this->defaultFetchClass = $arg2 ?: $this->defaultFetchClass; + $this->defaultFetchClassCtorArgs = $arg3 ? (array) $arg3 : $this->defaultFetchClassCtorArgs; + + return true; + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + $data = $this->fetchAll(); + + return new \ArrayIterator($data); + } + + /** + * {@inheritdoc} + */ + public function fetch($fetchMode = null) + { + // do not try fetching from the statement if it's not expected to contain result + // in order to prevent exceptional situation + if (!$this->result) { + return false; + } + + $args = func_get_args(); + $fetchMode = $fetchMode ?: $this->defaultFetchMode; + + if (isset(self::$fetchMap[$fetchMode])) { + return sqlsrv_fetch_array($this->stmt, self::$fetchMap[$fetchMode]) ?: false; + } + + if ($fetchMode == PDO::FETCH_OBJ || $fetchMode == PDO::FETCH_CLASS) { + $className = $this->defaultFetchClass; + $ctorArgs = $this->defaultFetchClassCtorArgs; + + if (count($args) >= 2) { + $className = $args[1]; + $ctorArgs = (isset($args[2])) ? $args[2] : array(); + } + + return sqlsrv_fetch_object($this->stmt, $className, $ctorArgs) ?: false; + } + + throw new SQLSrvException("Fetch mode is not supported!"); + } + + /** + * {@inheritdoc} + */ + public function fetchAll($fetchMode = null) + { + $rows = array(); + + switch ($fetchMode) { + case PDO::FETCH_CLASS: + while ($row = call_user_func_array(array($this, 'fetch'), func_get_args())) { + $rows[] = $row; + } + break; + case PDO::FETCH_COLUMN: + while ($row = $this->fetchColumn()) { + $rows[] = $row; + } + break; + default: + while ($row = $this->fetch($fetchMode)) { + $rows[] = $row; + } + } + + return $rows; + } + + /** + * {@inheritdoc} + */ + public function fetchColumn($columnIndex = 0) + { + $row = $this->fetch(PDO::FETCH_NUM); + + if (false === $row) { + return false; + } + + return isset($row[$columnIndex]) ? $row[$columnIndex] : null; + } + + /** + * {@inheritdoc} + */ + public function rowCount() + { + return sqlsrv_rows_affected($this->stmt); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ServerInfoAwareConnection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ServerInfoAwareConnection.php new file mode 100644 index 0000000000000000000000000000000000000000..f15ffefcbac145856640c761d07d26f16c69ff00 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ServerInfoAwareConnection.php @@ -0,0 +1,44 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +/** + * Contract for a connection that is able to provide information about the server it is connected to. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +interface ServerInfoAwareConnection +{ + /** + * Returns the version number of the database server connected to. + * + * @return string + */ + public function getServerVersion(); + + /** + * Checks whether a query is required to retrieve the database server version. + * + * @return boolean True if a query is required to retrieve the database server version, false otherwise. + */ + public function requiresQueryForServerVersion(); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Statement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Statement.php new file mode 100644 index 0000000000000000000000000000000000000000..aedf47b8a967bfd5567e6e0b051105c392113c19 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Statement.php @@ -0,0 +1,128 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +/** + * Statement interface. + * Drivers must implement this interface. + * + * This resembles (a subset of) the PDOStatement interface. + * + * @author Konsta Vesterinen + * @author Roman Borschel + * @link www.doctrine-project.org + * @since 2.0 + */ +interface Statement extends ResultStatement +{ + /** + * Binds a value to a corresponding named (not supported by mysqli driver, see comment below) or positional + * placeholder in the SQL statement that was used to prepare the statement. + * + * As mentioned above, the named parameters are not natively supported by the mysqli driver, use executeQuery(), + * fetchAll(), fetchArray(), fetchColumn(), fetchAssoc() methods to have the named parameter emulated by doctrine. + * + * @param mixed $param Parameter identifier. For a prepared statement using named placeholders, + * this will be a parameter name of the form :name. For a prepared statement + * using question mark placeholders, this will be the 1-indexed position of the parameter. + * @param mixed $value The value to bind to the parameter. + * @param integer $type Explicit data type for the parameter using the PDO::PARAM_* constants. + * + * @return boolean TRUE on success or FALSE on failure. + */ + function bindValue($param, $value, $type = null); + + + /** + * Binds a PHP variable to a corresponding named (not supported by mysqli driver, see comment below) or question + * mark placeholder in the SQL statement that was use to prepare the statement. Unlike PDOStatement->bindValue(), + * the variable is bound as a reference and will only be evaluated at the time + * that PDOStatement->execute() is called. + * + * As mentioned above, the named parameters are not natively supported by the mysqli driver, use executeQuery(), + * fetchAll(), fetchArray(), fetchColumn(), fetchAssoc() methods to have the named parameter emulated by doctrine. + * + * Most parameters are input parameters, that is, parameters that are + * used in a read-only fashion to build up the query. Some drivers support the invocation + * of stored procedures that return data as output parameters, and some also as input/output + * parameters that both send in data and are updated to receive it. + * + * @param mixed $column Parameter identifier. For a prepared statement using named placeholders, + * this will be a parameter name of the form :name. For a prepared statement using + * question mark placeholders, this will be the 1-indexed position of the parameter. + * @param mixed $variable Name of the PHP variable to bind to the SQL statement parameter. + * @param integer|null $type Explicit data type for the parameter using the PDO::PARAM_* constants. To return + * an INOUT parameter from a stored procedure, use the bitwise OR operator to set the + * PDO::PARAM_INPUT_OUTPUT bits for the data_type parameter. + * @param integer|null $length You must specify maxlength when using an OUT bind + * so that PHP allocates enough memory to hold the returned value. + * + * @return boolean TRUE on success or FALSE on failure. + */ + function bindParam($column, &$variable, $type = null, $length = null); + + /** + * Fetches the SQLSTATE associated with the last operation on the statement handle. + * + * @see Doctrine_Adapter_Interface::errorCode() + * + * @return string The error code string. + */ + function errorCode(); + + /** + * Fetches extended error information associated with the last operation on the statement handle. + * + * @see Doctrine_Adapter_Interface::errorInfo() + * + * @return array The error info array. + */ + function errorInfo(); + + /** + * Executes a prepared statement + * + * If the prepared statement included parameter markers, you must either: + * call PDOStatement->bindParam() to bind PHP variables to the parameter markers: + * bound variables pass their value as input and receive the output value, + * if any, of their associated parameter markers or pass an array of input-only + * parameter values. + * + * + * @param array|null $params An array of values with as many elements as there are + * bound parameters in the SQL statement being executed. + * + * @return boolean TRUE on success or FALSE on failure. + */ + function execute($params = null); + + /** + * Returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement + * executed by the corresponding object. + * + * If the last SQL statement executed by the associated Statement object was a SELECT statement, + * some databases may return the number of rows returned by that statement. However, + * this behaviour is not guaranteed for all databases and should not be + * relied on for portable applications. + * + * @return integer The number of rows. + */ + function rowCount(); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php new file mode 100644 index 0000000000000000000000000000000000000000..19aedc378a09db0ebeb4ff852fe7b2548ebc74cd --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php @@ -0,0 +1,424 @@ +. + */ + +namespace Doctrine\DBAL; + +use Doctrine\Common\EventManager; + +/** + * Factory for creating Doctrine\DBAL\Connection instances. + * + * @author Roman Borschel + * @since 2.0 + */ +final class DriverManager +{ + /** + * List of supported drivers and their mappings to the driver classes. + * + * To add your own driver use the 'driverClass' parameter to + * {@link DriverManager::getConnection()}. + * + * @var array + */ + private static $_driverMap = array( + 'pdo_mysql' => 'Doctrine\DBAL\Driver\PDOMySql\Driver', + 'pdo_sqlite' => 'Doctrine\DBAL\Driver\PDOSqlite\Driver', + 'pdo_pgsql' => 'Doctrine\DBAL\Driver\PDOPgSql\Driver', + 'pdo_oci' => 'Doctrine\DBAL\Driver\PDOOracle\Driver', + 'oci8' => 'Doctrine\DBAL\Driver\OCI8\Driver', + 'ibm_db2' => 'Doctrine\DBAL\Driver\IBMDB2\DB2Driver', + 'pdo_sqlsrv' => 'Doctrine\DBAL\Driver\PDOSqlsrv\Driver', + 'mysqli' => 'Doctrine\DBAL\Driver\Mysqli\Driver', + 'drizzle_pdo_mysql' => 'Doctrine\DBAL\Driver\DrizzlePDOMySql\Driver', + 'sqlanywhere' => 'Doctrine\DBAL\Driver\SQLAnywhere\Driver', + 'sqlsrv' => 'Doctrine\DBAL\Driver\SQLSrv\Driver', + ); + + /** + * List of URL schemes from a database URL and their mappings to driver. + */ + private static $driverSchemeAliases = array( + 'db2' => 'ibm_db2', + 'mssql' => 'pdo_sqlsrv', + 'mysql' => 'pdo_mysql', + 'mysql2' => 'pdo_mysql', // Amazon RDS, for some weird reason + 'postgres' => 'pdo_pgsql', + 'postgresql' => 'pdo_pgsql', + 'pgsql' => 'pdo_pgsql', + 'sqlite' => 'pdo_sqlite', + 'sqlite3' => 'pdo_sqlite', + ); + + /** + * Private constructor. This class cannot be instantiated. + */ + private function __construct() + { + } + + /** + * Creates a connection object based on the specified parameters. + * This method returns a Doctrine\DBAL\Connection which wraps the underlying + * driver connection. + * + * $params must contain at least one of the following. + * + * Either 'driver' with one of the following values: + * + * pdo_mysql + * pdo_sqlite + * pdo_pgsql + * pdo_oci (unstable) + * pdo_sqlsrv + * pdo_sqlsrv + * mysqli + * sqlanywhere + * sqlsrv + * ibm_db2 (unstable) + * drizzle_pdo_mysql + * + * OR 'driverClass' that contains the full class name (with namespace) of the + * driver class to instantiate. + * + * Other (optional) parameters: + * + * user (string): + * The username to use when connecting. + * + * password (string): + * The password to use when connecting. + * + * driverOptions (array): + * Any additional driver-specific options for the driver. These are just passed + * through to the driver. + * + * pdo: + * You can pass an existing PDO instance through this parameter. The PDO + * instance will be wrapped in a Doctrine\DBAL\Connection. + * + * wrapperClass: + * You may specify a custom wrapper class through the 'wrapperClass' + * parameter but this class MUST inherit from Doctrine\DBAL\Connection. + * + * driverClass: + * The driver class to use. + * + * @param array $params The parameters. + * @param \Doctrine\DBAL\Configuration|null $config The configuration to use. + * @param \Doctrine\Common\EventManager|null $eventManager The event manager to use. + * + * @return \Doctrine\DBAL\Connection + * + * @throws \Doctrine\DBAL\DBALException + */ + public static function getConnection( + array $params, + Configuration $config = null, + EventManager $eventManager = null) + { + // create default config and event manager, if not set + if ( ! $config) { + $config = new Configuration(); + } + if ( ! $eventManager) { + $eventManager = new EventManager(); + } + + $params = self::parseDatabaseUrl($params); + + // check for existing pdo object + if (isset($params['pdo']) && ! $params['pdo'] instanceof \PDO) { + throw DBALException::invalidPdoInstance(); + } elseif (isset($params['pdo'])) { + $params['pdo']->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); + $params['driver'] = 'pdo_' . $params['pdo']->getAttribute(\PDO::ATTR_DRIVER_NAME); + } else { + self::_checkParams($params); + } + if (isset($params['driverClass'])) { + $className = $params['driverClass']; + } else { + $className = self::$_driverMap[$params['driver']]; + } + + $driver = new $className(); + + $wrapperClass = 'Doctrine\DBAL\Connection'; + if (isset($params['wrapperClass'])) { + if (is_subclass_of($params['wrapperClass'], $wrapperClass)) { + $wrapperClass = $params['wrapperClass']; + } else { + throw DBALException::invalidWrapperClass($params['wrapperClass']); + } + } + + return new $wrapperClass($params, $driver, $config, $eventManager); + } + + /** + * Returns the list of supported drivers. + * + * @return array + */ + public static function getAvailableDrivers() + { + return array_keys(self::$_driverMap); + } + + /** + * Checks the list of parameters. + * + * @param array $params The list of parameters. + * + * @return void + * + * @throws \Doctrine\DBAL\DBALException + */ + private static function _checkParams(array $params) + { + // check existence of mandatory parameters + + // driver + if ( ! isset($params['driver']) && ! isset($params['driverClass'])) { + throw DBALException::driverRequired(); + } + + // check validity of parameters + + // driver + if (isset($params['driver']) && ! isset(self::$_driverMap[$params['driver']])) { + throw DBALException::unknownDriver($params['driver'], array_keys(self::$_driverMap)); + } + + if (isset($params['driverClass']) && ! in_array('Doctrine\DBAL\Driver', class_implements($params['driverClass'], true))) { + throw DBALException::invalidDriverClass($params['driverClass']); + } + } + + /** + * Normalizes the given connection URL path. + * + * @param string $urlPath + * + * @return string The normalized connection URL path + */ + private static function normalizeDatabaseUrlPath($urlPath) + { + // Trim leading slash from URL path. + return substr($urlPath, 1); + } + + /** + * Extracts parts from a database URL, if present, and returns an + * updated list of parameters. + * + * @param array $params The list of parameters. + * + * @param array A modified list of parameters with info from a database + * URL extracted into indidivual parameter parts. + * + */ + private static function parseDatabaseUrl(array $params) + { + if (!isset($params['url'])) { + return $params; + } + + // (pdo_)?sqlite3?:///... => (pdo_)?sqlite3?://localhost/... or else the URL will be invalid + $url = preg_replace('#^((?:pdo_)?sqlite3?):///#', '$1://localhost/', $params['url']); + + // PHP < 5.4.8 doesn't parse schemeless urls properly. + // See: https://php.net/parse-url#refsect1-function.parse-url-changelog + if (PHP_VERSION_ID < 50408 && strpos($url, '//') === 0) { + $url = parse_url('fake:' . $url); + + unset($url['scheme']); + } else { + $url = parse_url($url); + } + + if ($url === false) { + throw new DBALException('Malformed parameter "url".'); + } + + // If we have a connection URL, we have to unset the default PDO instance connection parameter (if any) + // as we cannot merge connection details from the URL into the PDO instance (URL takes precedence). + unset($params['pdo']); + + $params = self::parseDatabaseUrlScheme($url, $params); + + if (isset($url['host'])) { + $params['host'] = $url['host']; + } + if (isset($url['port'])) { + $params['port'] = $url['port']; + } + if (isset($url['user'])) { + $params['user'] = $url['user']; + } + if (isset($url['pass'])) { + $params['password'] = $url['pass']; + } + + $params = self::parseDatabaseUrlPath($url, $params); + $params = self::parseDatabaseUrlQuery($url, $params); + + return $params; + } + + /** + * Parses the given connection URL and resolves the given connection parameters. + * + * Assumes that the connection URL scheme is already parsed and resolved into the given connection parameters + * via {@link parseDatabaseUrlScheme}. + * + * @param array $url The URL parts to evaluate. + * @param array $params The connection parameters to resolve. + * + * @return array The resolved connection parameters. + * + * @see parseDatabaseUrlScheme + */ + private static function parseDatabaseUrlPath(array $url, array $params) + { + if (! isset($url['path'])) { + return $params; + } + + $url['path'] = self::normalizeDatabaseUrlPath($url['path']); + + // If we do not have a known DBAL driver, we do not know any connection URL path semantics to evaluate + // and therefore treat the path as regular DBAL connection URL path. + if (! isset($params['driver'])) { + return self::parseRegularDatabaseUrlPath($url, $params); + } + + if (strpos($params['driver'], 'sqlite') !== false) { + return self::parseSqliteDatabaseUrlPath($url, $params); + } + + return self::parseRegularDatabaseUrlPath($url, $params); + } + + /** + * Parses the query part of the given connection URL and resolves the given connection parameters. + * + * @param array $url The connection URL parts to evaluate. + * @param array $params The connection parameters to resolve. + * + * @return array The resolved connection parameters. + */ + private static function parseDatabaseUrlQuery(array $url, array $params) + { + if (! isset($url['query'])) { + return $params; + } + + $query = array(); + + parse_str($url['query'], $query); // simply ingest query as extra params, e.g. charset or sslmode + + return array_merge($params, $query); // parse_str wipes existing array elements + } + + /** + * Parses the given regular connection URL and resolves the given connection parameters. + * + * Assumes that the "path" URL part is already normalized via {@link normalizeDatabaseUrlPath}. + * + * @param array $url The regular connection URL parts to evaluate. + * @param array $params The connection parameters to resolve. + * + * @return array The resolved connection parameters. + * + * @see normalizeDatabaseUrlPath + */ + private static function parseRegularDatabaseUrlPath(array $url, array $params) + { + $params['dbname'] = $url['path']; + + return $params; + } + + /** + * Parses the given SQLite connection URL and resolves the given connection parameters. + * + * Assumes that the "path" URL part is already normalized via {@link normalizeDatabaseUrlPath}. + * + * @param array $url The SQLite connection URL parts to evaluate. + * @param array $params The connection parameters to resolve. + * + * @return array The resolved connection parameters. + * + * @see normalizeDatabaseUrlPath + */ + private static function parseSqliteDatabaseUrlPath(array $url, array $params) + { + if ($url['path'] === ':memory:') { + $params['memory'] = true; + + return $params; + } + + $params['path'] = $url['path']; // pdo_sqlite driver uses 'path' instead of 'dbname' key + + return $params; + } + + /** + * Parses the scheme part from given connection URL and resolves the given connection parameters. + * + * @param array $url The connection URL parts to evaluate. + * @param array $params The connection parameters to resolve. + * + * @return array The resolved connection parameters. + * + * @throws DBALException if parsing failed or resolution is not possible. + */ + private static function parseDatabaseUrlScheme(array $url, array $params) + { + if (isset($url['scheme'])) { + // The requested driver from the URL scheme takes precedence + // over the default custom driver from the connection parameters (if any). + unset($params['driverClass']); + + // URL schemes must not contain underscores, but dashes are ok + $driver = str_replace('-', '_', $url['scheme']); + + // The requested driver from the URL scheme takes precedence + // over the default driver from the connection parameters (if any). + $params['driver'] = isset(self::$driverSchemeAliases[$driver]) + // use alias like "postgres", else we just let checkParams decide later + // if the driver exists (for literal "pdo-pgsql" etc) + ? self::$driverSchemeAliases[$driver] + : $driver; + + return $params; + } + + // If a schemeless connection URL is given, we require a default driver or default custom driver + // as connection parameter. + if (! isset($params['driverClass']) && ! isset($params['driver'])) { + throw DBALException::driverRequired($params['url']); + } + + return $params; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..fd82638e77183311709c41863806bdd779c87ffc --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php @@ -0,0 +1,78 @@ +. + */ + +namespace Doctrine\DBAL\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\DBAL\Connection; + +/** + * Event Arguments used when a Driver connection is established inside Doctrine\DBAL\Connection. + * + * @link www.doctrine-project.org + * @since 1.0 + * @author Benjamin Eberlei + */ +class ConnectionEventArgs extends EventArgs +{ + /** + * @var \Doctrine\DBAL\Connection + */ + private $_connection; + + /** + * @param \Doctrine\DBAL\Connection $connection + */ + public function __construct(Connection $connection) + { + $this->_connection = $connection; + } + + /** + * @return \Doctrine\DBAL\Connection + */ + public function getConnection() + { + return $this->_connection; + } + + /** + * @return \Doctrine\DBAL\Driver + */ + public function getDriver() + { + return $this->_connection->getDriver(); + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getDatabasePlatform() + { + return $this->_connection->getDatabasePlatform(); + } + + /** + * @return \Doctrine\DBAL\Schema\AbstractSchemaManager + */ + public function getSchemaManager() + { + return $this->_connection->getSchemaManager(); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php new file mode 100644 index 0000000000000000000000000000000000000000..bd362c4cb67cbe07b0d4f42cc558b86e4fab12bf --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php @@ -0,0 +1,80 @@ +. + */ + +namespace Doctrine\DBAL\Event\Listeners; + +use Doctrine\DBAL\Event\ConnectionEventArgs; +use Doctrine\DBAL\Events; +use Doctrine\Common\EventSubscriber; + +/** + * MySQL Session Init Event Subscriber which allows to set the Client Encoding of the Connection. + * + * @link www.doctrine-project.org + * @since 1.0 + * @author Benjamin Eberlei + * @deprecated Use "charset" option to PDO MySQL Connection instead. + */ +class MysqlSessionInit implements EventSubscriber +{ + /** + * The charset. + * + * @var string + */ + private $_charset; + + /** + * The collation, or FALSE if no collation. + * + * @var string|boolean + */ + private $_collation; + + /** + * Configure Charset and Collation options of MySQL Client for each Connection. + * + * @param string $charset The charset. + * @param string|boolean $collation The collation, or FALSE if no collation. + */ + public function __construct($charset = 'utf8', $collation = false) + { + $this->_charset = $charset; + $this->_collation = $collation; + } + + /** + * @param \Doctrine\DBAL\Event\ConnectionEventArgs $args + * + * @return void + */ + public function postConnect(ConnectionEventArgs $args) + { + $collation = ($this->_collation) ? " COLLATE ".$this->_collation : ""; + $args->getConnection()->executeUpdate("SET NAMES ".$this->_charset . $collation); + } + + /** + * {@inheritdoc} + */ + public function getSubscribedEvents() + { + return array(Events::postConnect); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php new file mode 100644 index 0000000000000000000000000000000000000000..1c7ddec2fe7479dd33f7dba22d90d600052b9be5 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php @@ -0,0 +1,90 @@ +. + */ + +namespace Doctrine\DBAL\Event\Listeners; + +use Doctrine\DBAL\Event\ConnectionEventArgs; +use Doctrine\DBAL\Events; +use Doctrine\Common\EventSubscriber; + +/** + * Should be used when Oracle Server default environment does not match the Doctrine requirements. + * + * The following environment variables are required for the Doctrine default date format: + * + * NLS_TIME_FORMAT="HH24:MI:SS" + * NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS" + * NLS_TIMESTAMP_FORMAT="YYYY-MM-DD HH24:MI:SS" + * NLS_TIMESTAMP_TZ_FORMAT="YYYY-MM-DD HH24:MI:SS TZH:TZM" + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class OracleSessionInit implements EventSubscriber +{ + /** + * @var array + */ + protected $_defaultSessionVars = array( + 'NLS_TIME_FORMAT' => "HH24:MI:SS", + 'NLS_DATE_FORMAT' => "YYYY-MM-DD HH24:MI:SS", + 'NLS_TIMESTAMP_FORMAT' => "YYYY-MM-DD HH24:MI:SS", + 'NLS_TIMESTAMP_TZ_FORMAT' => "YYYY-MM-DD HH24:MI:SS TZH:TZM", + 'NLS_NUMERIC_CHARACTERS' => ".,", + ); + + /** + * @param array $oracleSessionVars + */ + public function __construct(array $oracleSessionVars = array()) + { + $this->_defaultSessionVars = array_merge($this->_defaultSessionVars, $oracleSessionVars); + } + + /** + * @param \Doctrine\DBAL\Event\ConnectionEventArgs $args + * + * @return void + */ + public function postConnect(ConnectionEventArgs $args) + { + if (count($this->_defaultSessionVars)) { + array_change_key_case($this->_defaultSessionVars, \CASE_UPPER); + $vars = array(); + foreach ($this->_defaultSessionVars as $option => $value) { + if ($option === 'CURRENT_SCHEMA') { + $vars[] = $option . " = " . $value; + } else { + $vars[] = $option . " = '" . $value . "'"; + } + } + $sql = "ALTER SESSION SET ".implode(" ", $vars); + $args->getConnection()->executeUpdate($sql); + } + } + + /** + * {@inheritdoc} + */ + public function getSubscribedEvents() + { + return array(Events::postConnect); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php new file mode 100644 index 0000000000000000000000000000000000000000..cfa42994cb889c62862ee7ca0d626190ddecf5c5 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php @@ -0,0 +1,66 @@ +. + */ + +namespace Doctrine\DBAL\Event\Listeners; + +use Doctrine\DBAL\Event\ConnectionEventArgs; +use Doctrine\DBAL\Events; +use Doctrine\Common\EventSubscriber; + +/** + * Session init listener for executing a single SQL statement right after a connection is opened. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Benjamin Eberlei + */ +class SQLSessionInit implements EventSubscriber +{ + /** + * @var string + */ + protected $sql; + + /** + * @param string $sql + */ + public function __construct($sql) + { + $this->sql = $sql; + } + + /** + * @param \Doctrine\DBAL\Event\ConnectionEventArgs $args + * + * @return void + */ + public function postConnect(ConnectionEventArgs $args) + { + $conn = $args->getConnection(); + $conn->exec($this->sql); + } + + /** + * {@inheritdoc} + */ + public function getSubscribedEvents() + { + return array(Events::postConnect); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..c4477ad8a1edf4775312fb800e187d586015f0ad --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php @@ -0,0 +1,114 @@ +. + */ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\TableDiff; + +/** + * Event Arguments used when SQL queries for adding table columns are generated inside Doctrine\DBAL\Platform\*Platform. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\Column + */ + private $_column; + + /** + * @var \Doctrine\DBAL\Schema\TableDiff + */ + private $_tableDiff; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param \Doctrine\DBAL\Schema\Column $column + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform) + { + $this->_column = $column; + $this->_tableDiff = $tableDiff; + $this->_platform = $platform; + } + + /** + * @return \Doctrine\DBAL\Schema\Column + */ + public function getColumn() + { + return $this->_column; + } + + /** + * @return \Doctrine\DBAL\Schema\TableDiff + */ + public function getTableDiff() + { + return $this->_tableDiff; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * + * @return \Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..7249b63cb66b1e9754431497d40f2804029f60fe --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php @@ -0,0 +1,114 @@ +. + */ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Schema\ColumnDiff; +use Doctrine\DBAL\Schema\TableDiff; + +/** + * Event Arguments used when SQL queries for changing table columns are generated inside Doctrine\DBAL\Platform\*Platform. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\ColumnDiff + */ + private $_columnDiff; + + /** + * @var \Doctrine\DBAL\Schema\TableDiff + */ + private $_tableDiff; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param \Doctrine\DBAL\Schema\ColumnDiff $columnDiff + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct(ColumnDiff $columnDiff, TableDiff $tableDiff, AbstractPlatform $platform) + { + $this->_columnDiff = $columnDiff; + $this->_tableDiff = $tableDiff; + $this->_platform = $platform; + } + + /** + * @return \Doctrine\DBAL\Schema\ColumnDiff + */ + public function getColumnDiff() + { + return $this->_columnDiff; + } + + /** + * @return \Doctrine\DBAL\Schema\TableDiff + */ + public function getTableDiff() + { + return $this->_tableDiff; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * + * @return \Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..384315d5a0996cc91a30b86a1e751f58b66433fc --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php @@ -0,0 +1,98 @@ +. + */ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Schema\TableDiff; + +/** + * Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\*Platform. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaAlterTableEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\TableDiff + */ + private $_tableDiff; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct(TableDiff $tableDiff, AbstractPlatform $platform) + { + $this->_tableDiff = $tableDiff; + $this->_platform = $platform; + } + + /** + * @return \Doctrine\DBAL\Schema\TableDiff + */ + public function getTableDiff() + { + return $this->_tableDiff; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * + * @return \Doctrine\DBAL\Event\SchemaAlterTableEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..06f37888ff3bf056f6df8b138da263dd6672e084 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php @@ -0,0 +1,114 @@ +. + */ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\TableDiff; + +/** + * Event Arguments used when SQL queries for removing table columns are generated inside Doctrine\DBAL\Platform\*Platform. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\Column + */ + private $_column; + + /** + * @var \Doctrine\DBAL\Schema\TableDiff + */ + private $_tableDiff; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param \Doctrine\DBAL\Schema\Column $column + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform) + { + $this->_column = $column; + $this->_tableDiff = $tableDiff; + $this->_platform = $platform; + } + + /** + * @return \Doctrine\DBAL\Schema\Column + */ + public function getColumn() + { + return $this->_column; + } + + /** + * @return \Doctrine\DBAL\Schema\TableDiff + */ + public function getTableDiff() + { + return $this->_tableDiff; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * + * @return \Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..94a274c4fae28e9bd700c29c3fee67e0e15c8c64 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php @@ -0,0 +1,129 @@ +. + */ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\TableDiff; + +/** + * Event Arguments used when SQL queries for renaming table columns are generated inside Doctrine\DBAL\Platform\*Platform. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs +{ + /** + * @var string + */ + private $_oldColumnName; + + /** + * @var \Doctrine\DBAL\Schema\Column + */ + private $_column; + + /** + * @var \Doctrine\DBAL\Schema\TableDiff + */ + private $_tableDiff; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param string $oldColumnName + * @param \Doctrine\DBAL\Schema\Column $column + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct($oldColumnName, Column $column, TableDiff $tableDiff, AbstractPlatform $platform) + { + $this->_oldColumnName = $oldColumnName; + $this->_column = $column; + $this->_tableDiff = $tableDiff; + $this->_platform = $platform; + } + + /** + * @return string + */ + public function getOldColumnName() + { + return $this->_oldColumnName; + } + + /** + * @return \Doctrine\DBAL\Schema\Column + */ + public function getColumn() + { + return $this->_column; + } + + /** + * @return \Doctrine\DBAL\Schema\TableDiff + */ + public function getTableDiff() + { + return $this->_tableDiff; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * + * @return \Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..14bb8df73b36853cf93efccbbc9bf0c8f02d588b --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php @@ -0,0 +1,137 @@ +. + */ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Schema\Column; + +/** + * Event Arguments used when the portable column definition is generated inside Doctrine\DBAL\Schema\AbstractSchemaManager. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaColumnDefinitionEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\Column|null + */ + private $_column = null; + + /** + * Raw column data as fetched from the database. + * + * @var array + */ + private $_tableColumn; + + /** + * @var string + */ + private $_table; + + /** + * @var string + */ + private $_database; + + /** + * @var \Doctrine\DBAL\Connection + */ + private $_connection; + + /** + * @param array $tableColumn + * @param string $table + * @param string $database + * @param \Doctrine\DBAL\Connection $connection + */ + public function __construct(array $tableColumn, $table, $database, Connection $connection) + { + $this->_tableColumn = $tableColumn; + $this->_table = $table; + $this->_database = $database; + $this->_connection = $connection; + } + + /** + * Allows to clear the column which means the column will be excluded from + * tables column list. + * + * @param null|\Doctrine\DBAL\Schema\Column $column + * + * @return \Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs + */ + public function setColumn(Column $column = null) + { + $this->_column = $column; + + return $this; + } + + /** + * @return \Doctrine\DBAL\Schema\Column|null + */ + public function getColumn() + { + return $this->_column; + } + + /** + * @return array + */ + public function getTableColumn() + { + return $this->_tableColumn; + } + + /** + * @return string + */ + public function getTable() + { + return $this->_table; + } + + /** + * @return string + */ + public function getDatabase() + { + return $this->_database; + } + + /** + * @return \Doctrine\DBAL\Connection + */ + public function getConnection() + { + return $this->_connection; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getDatabasePlatform() + { + return $this->_connection->getDatabasePlatform(); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..38b218257b9cb6238f29cd4acf0f7e8bc6342446 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php @@ -0,0 +1,114 @@ +. + */ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\Table; + +/** + * Event Arguments used when SQL queries for creating table columns are generated inside Doctrine\DBAL\Platform\AbstractPlatform. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaCreateTableColumnEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\Column + */ + private $_column; + + /** + * @var \Doctrine\DBAL\Schema\Table + */ + private $_table; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param \Doctrine\DBAL\Schema\Column $column + * @param \Doctrine\DBAL\Schema\Table $table + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct(Column $column, Table $table, AbstractPlatform $platform) + { + $this->_column = $column; + $this->_table = $table; + $this->_platform = $platform; + } + + /** + * @return \Doctrine\DBAL\Schema\Column + */ + public function getColumn() + { + return $this->_column; + } + + /** + * @return \Doctrine\DBAL\Schema\Table + */ + public function getTable() + { + return $this->_table; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * + * @return \Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..175b0e9c345b485e105d820f159128ebacba6afe --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php @@ -0,0 +1,128 @@ +. + */ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Schema\Table; + +/** + * Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaCreateTableEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\Table + */ + private $_table; + + /** + * @var array + */ + private $_columns; + + /** + * @var array + */ + private $_options; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param \Doctrine\DBAL\Schema\Table $table + * @param array $columns + * @param array $options + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct(Table $table, array $columns, array $options, AbstractPlatform $platform) + { + $this->_table = $table; + $this->_columns = $columns; + $this->_options = $options; + $this->_platform = $platform; + } + + /** + * @return \Doctrine\DBAL\Schema\Table + */ + public function getTable() + { + return $this->_table; + } + + /** + * @return array + */ + public function getColumns() + { + return $this->_columns; + } + + /** + * @return array + */ + public function getOptions() + { + return $this->_options; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * + * @return \Doctrine\DBAL\Event\SchemaCreateTableEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..6ffb6442c07a3a973427bcf65f60c300b5e2e143 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php @@ -0,0 +1,100 @@ +. + */ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Schema\Table; + +/** + * Event Arguments used when the SQL query for dropping tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaDropTableEventArgs extends SchemaEventArgs +{ + /** + * @var string|\Doctrine\DBAL\Schema\Table + */ + private $_table; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform; + + /** + * @var string|null + */ + private $_sql = null; + + /** + * @param string|\Doctrine\DBAL\Schema\Table $table + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @throws \InvalidArgumentException + */ + public function __construct($table, AbstractPlatform $platform) + { + if ( ! $table instanceof Table && !is_string($table)) { + throw new \InvalidArgumentException('SchemaDropTableEventArgs expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); + } + + $this->_table = $table; + $this->_platform = $platform; + } + + /** + * @return string|\Doctrine\DBAL\Schema\Table + */ + public function getTable() + { + return $this->_table; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string $sql + * + * @return \Doctrine\DBAL\Event\SchemaDropTableEventArgs + */ + public function setSql($sql) + { + $this->_sql = $sql; + + return $this; + } + + /** + * @return string|null + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..d9648b64ffc57097246b18b6fdd2e9dc613c6d3a --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaEventArgs.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\DBAL\Event; + +use Doctrine\Common\EventArgs; + +/** + * Base class for schema related events. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaEventArgs extends EventArgs +{ + /** + * @var boolean + */ + private $_preventDefault = false; + + /** + * @return \Doctrine\DBAL\Event\SchemaEventArgs + */ + public function preventDefault() + { + $this->_preventDefault = true; + + return $this; + } + + /** + * @return boolean + */ + public function isDefaultPrevented() + { + return $this->_preventDefault; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..3fd1d4bf7da2e2a69839bb4e9f60181902f5ef14 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php @@ -0,0 +1,121 @@ +. + */ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Schema\Index; + +/** + * Event Arguments used when the portable index definition is generated inside Doctrine\DBAL\Schema\AbstractSchemaManager. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaIndexDefinitionEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\Index|null + */ + private $_index = null; + + /** + * Raw index data as fetched from the database. + * + * @var array + */ + private $_tableIndex; + + /** + * @var string + */ + private $_table; + + /** + * @var \Doctrine\DBAL\Connection + */ + private $_connection; + + /** + * @param array $tableIndex + * @param string $table + * @param \Doctrine\DBAL\Connection $connection + */ + public function __construct(array $tableIndex, $table, Connection $connection) + { + $this->_tableIndex = $tableIndex; + $this->_table = $table; + $this->_connection = $connection; + } + + /** + * Allows to clear the index which means the index will be excluded from tables index list. + * + * @param null|\Doctrine\DBAL\Schema\Index $index + * + * @return SchemaIndexDefinitionEventArgs + */ + public function setIndex(Index $index = null) + { + $this->_index = $index; + + return $this; + } + + /** + * @return \Doctrine\DBAL\Schema\Index|null + */ + public function getIndex() + { + return $this->_index; + } + + /** + * @return array + */ + public function getTableIndex() + { + return $this->_tableIndex; + } + + /** + * @return string + */ + public function getTable() + { + return $this->_table; + } + + /** + * @return \Doctrine\DBAL\Connection + */ + public function getConnection() + { + return $this->_connection; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getDatabasePlatform() + { + return $this->_connection->getDatabasePlatform(); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Events.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Events.php new file mode 100644 index 0000000000000000000000000000000000000000..0d31504c70a2e8aaa1685f86c761fa882e78736d --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Events.php @@ -0,0 +1,51 @@ +. + */ + +namespace Doctrine\DBAL; + +/** + * Container for all DBAL events. + * + * This class cannot be instantiated. + * + * @author Roman Borschel + * @since 2.0 + */ +final class Events +{ + /** + * Private constructor. This class cannot be instantiated. + */ + private function __construct() + { + } + + const postConnect = 'postConnect'; + + const onSchemaCreateTable = 'onSchemaCreateTable'; + const onSchemaCreateTableColumn = 'onSchemaCreateTableColumn'; + const onSchemaDropTable = 'onSchemaDropTable'; + const onSchemaAlterTable = 'onSchemaAlterTable'; + const onSchemaAlterTableAddColumn = 'onSchemaAlterTableAddColumn'; + const onSchemaAlterTableRemoveColumn = 'onSchemaAlterTableRemoveColumn'; + const onSchemaAlterTableChangeColumn = 'onSchemaAlterTableChangeColumn'; + const onSchemaAlterTableRenameColumn = 'onSchemaAlterTableRenameColumn'; + const onSchemaColumnDefinition = 'onSchemaColumnDefinition'; + const onSchemaIndexDefinition = 'onSchemaIndexDefinition'; +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ConnectionException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ConnectionException.php new file mode 100644 index 0000000000000000000000000000000000000000..8d976dcb325a31b3e9bc68cc240576390033b694 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ConnectionException.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Base class for all connection related errors detected in the driver. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class ConnectionException extends DriverException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ConstraintViolationException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ConstraintViolationException.php new file mode 100644 index 0000000000000000000000000000000000000000..8dd1cb6945252a33f0bee4d0df01a9e2adb3a95c --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ConstraintViolationException.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Base class for all constraint violation related errors detected in the driver. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class ConstraintViolationException extends ServerException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/DatabaseObjectExistsException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/DatabaseObjectExistsException.php new file mode 100644 index 0000000000000000000000000000000000000000..279aae9a5a3808519c361357738f504caa74c6b1 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/DatabaseObjectExistsException.php @@ -0,0 +1,35 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Base class for all already existing database object related errors detected in the driver. + * + * A database object is considered any asset that can be created in a database + * such as schemas, tables, views, sequences, triggers, constraints, indexes, + * functions, stored procedures etc. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class DatabaseObjectExistsException extends ServerException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/DatabaseObjectNotFoundException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/DatabaseObjectNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..fbca22d99424a31ee902567cb341fb40c0e73f82 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/DatabaseObjectNotFoundException.php @@ -0,0 +1,35 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Base class for all unknown database object related errors detected in the driver. + * + * A database object is considered any asset that can be created in a database + * such as schemas, tables, views, sequences, triggers, constraints, indexes, + * functions, stored procedures etc. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class DatabaseObjectNotFoundException extends ServerException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/DriverException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/DriverException.php new file mode 100644 index 0000000000000000000000000000000000000000..17c9f3a845a86e200a32259a59e06bb76313e35f --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/DriverException.php @@ -0,0 +1,82 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +use Doctrine\DBAL\DBALException; + +/** + * Base class for all errors detected in the driver. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class DriverException extends DBALException +{ + /** + * The previous DBAL driver exception. + * + * @var \Doctrine\DBAL\Driver\DriverException + */ + private $driverException; + + /** + * Constructor. + * + * @param string $message The exception message. + * @param \Doctrine\DBAL\Driver\DriverException $driverException The DBAL driver exception to chain. + */ + public function __construct($message, \Doctrine\DBAL\Driver\DriverException $driverException) + { + $exception = null; + + if ($driverException instanceof \Exception) { + $exception = $driverException; + } + + parent::__construct($message, 0, $exception); + + $this->driverException = $driverException; + } + + /** + * Returns the driver specific error code if given. + * + * Returns null if no error code was given by the driver. + * + * @return integer|string|null + */ + public function getErrorCode() + { + return $this->driverException->getErrorCode(); + } + + /** + * Returns the SQLSTATE the driver was in at the time the error occurred, if given. + * + * Returns null if no SQLSTATE was given by the driver. + * + * @return string|null + */ + public function getSQLState() + { + return $this->driverException->getSQLState(); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ForeignKeyConstraintViolationException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ForeignKeyConstraintViolationException.php new file mode 100644 index 0000000000000000000000000000000000000000..d244855a16d36386378e194a2195eae97e476111 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ForeignKeyConstraintViolationException.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Exception for a foreign key constraint violation detected in the driver. + * + * @author Benjamin Eberlei + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class ForeignKeyConstraintViolationException extends ConstraintViolationException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/InvalidArgumentException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..5b811227bdd8bcfd1b673ef4e56bb6092b068e1a --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/InvalidArgumentException.php @@ -0,0 +1,40 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +use Doctrine\DBAL\DBALException; + +/** + * Exception to be thrown when invalid arguments are passed to any DBAL API + * + * @author Marco Pivetta + * @link www.doctrine-project.org + * @since 2.5 + */ +class InvalidArgumentException extends DBALException +{ + /** + * @return self + */ + public static function fromEmptyCriteria() + { + return new self('Empty criteria was used, expected non-empty criteria'); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/InvalidFieldNameException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/InvalidFieldNameException.php new file mode 100644 index 0000000000000000000000000000000000000000..e0b1013fe4c4052f2c427657380a79c48d780f97 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/InvalidFieldNameException.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Exception for an invalid specified field name in a statement detected in the driver. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class InvalidFieldNameException extends ServerException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/NonUniqueFieldNameException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/NonUniqueFieldNameException.php new file mode 100644 index 0000000000000000000000000000000000000000..7b214e3b946559c18435f5bd9cb7b4f56e5d4c5a --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/NonUniqueFieldNameException.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Exception for a non-unique/ambiguous specified field name in a statement detected in the driver. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class NonUniqueFieldNameException extends ServerException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/NotNullConstraintViolationException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/NotNullConstraintViolationException.php new file mode 100644 index 0000000000000000000000000000000000000000..a1f45b92a44b1caf12bb342bd6d1901d9289ba2e --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/NotNullConstraintViolationException.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Exception for a NOT NULL constraint violation detected in the driver. + * + * @author Benjamin Eberlei + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class NotNullConstraintViolationException extends ConstraintViolationException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ReadOnlyException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ReadOnlyException.php new file mode 100644 index 0000000000000000000000000000000000000000..0345e88fce0ca6666ae7eb97c4c483bb75cb78f2 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ReadOnlyException.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Exception for a write operation attempt on a read-only database element detected in the driver. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class ReadOnlyException extends ServerException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ServerException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ServerException.php new file mode 100644 index 0000000000000000000000000000000000000000..36460ee0d6471681947b5f1966039c64af491ae0 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/ServerException.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Base class for all server related errors detected in the driver. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class ServerException extends DriverException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/SyntaxErrorException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/SyntaxErrorException.php new file mode 100644 index 0000000000000000000000000000000000000000..97b8fd25f3e31abef76671ff6f994320e413d2cd --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/SyntaxErrorException.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Exception for a syntax error in a statement detected in the driver. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class SyntaxErrorException extends ServerException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/TableExistsException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/TableExistsException.php new file mode 100644 index 0000000000000000000000000000000000000000..c90bfb476c4b3d8cdb6eafd493285a4bc9c9d273 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/TableExistsException.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Exception for an already existing table referenced in a statement detected in the driver. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class TableExistsException extends DatabaseObjectExistsException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/TableNotFoundException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/TableNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..90793b909defb4f4d92ef0e4db1f4432bda598c3 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/TableNotFoundException.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Exception for an unknown table referenced in a statement detected in the driver. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class TableNotFoundException extends DatabaseObjectNotFoundException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/UniqueConstraintViolationException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/UniqueConstraintViolationException.php new file mode 100644 index 0000000000000000000000000000000000000000..cd117738dd9b7eada6a43bb0c9cdd1cfad54ec59 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Exception/UniqueConstraintViolationException.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\DBAL\Exception; + +/** + * Exception for a unique constraint violation detected in the driver. + * + * @author Benjamin Eberlei + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class UniqueConstraintViolationException extends ConstraintViolationException +{ +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Id/TableGenerator.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Id/TableGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..62d6fcb8ef1738a8f170e5bb44c8a69de48ab9df --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Id/TableGenerator.php @@ -0,0 +1,165 @@ +. + */ + +namespace Doctrine\DBAL\Id; + +use Doctrine\DBAL\DriverManager; +use Doctrine\DBAL\Connection; + +/** + * Table ID Generator for those poor languages that are missing sequences. + * + * WARNING: The Table Id Generator clones a second independent database + * connection to work correctly. This means using the generator requests that + * generate IDs will have two open database connections. This is necessary to + * be safe from transaction failures in the main connection. Make sure to only + * ever use one TableGenerator otherwise you end up with many connections. + * + * TableID Generator does not work with SQLite. + * + * The TableGenerator does not take care of creating the SQL Table itself. You + * should look at the `TableGeneratorSchemaVisitor` to do this for you. + * Otherwise the schema for a table looks like: + * + * CREATE sequences ( + * sequence_name VARCHAR(255) NOT NULL, + * sequence_value INT NOT NULL DEFAULT '1', + * sequence_increment_by INT NOT NULL DEFAULT '1', + * PRIMARY KEY (table_name) + * ); + * + * Technically this generator works as follows: + * + * 1. Use a robust transaction serialization level. + * 2. Open transaction + * 3. Acquire a read lock on the table row (SELECT .. FOR UPDATE) + * 4. Increment current value by one and write back to database + * 5. Commit transaction + * + * If you are using a sequence_increment_by value that is larger than one the + * ID Generator will keep incrementing values until it hits the incrementation + * gap before issuing another query. + * + * If no row is present for a given sequence a new one will be created with the + * default values 'value' = 1 and 'increment_by' = 1 + * + * @author Benjamin Eberlei + */ +class TableGenerator +{ + /** + * @var \Doctrine\DBAL\Connection + */ + private $conn; + + /** + * @var string + */ + private $generatorTableName; + + /** + * @var array + */ + private $sequences = array(); + + /** + * @param \Doctrine\DBAL\Connection $conn + * @param string $generatorTableName + * + * @throws \Doctrine\DBAL\DBALException + */ + public function __construct(Connection $conn, $generatorTableName = 'sequences') + { + $params = $conn->getParams(); + if ($params['driver'] == 'pdo_sqlite') { + throw new \Doctrine\DBAL\DBALException("Cannot use TableGenerator with SQLite."); + } + $this->conn = DriverManager::getConnection($params, $conn->getConfiguration(), $conn->getEventManager()); + $this->generatorTableName = $generatorTableName; + } + + /** + * Generates the next unused value for the given sequence name. + * + * @param string $sequenceName + * + * @return integer + * + * @throws \Doctrine\DBAL\DBALException + */ + public function nextValue($sequenceName) + { + if (isset($this->sequences[$sequenceName])) { + $value = $this->sequences[$sequenceName]['value']; + $this->sequences[$sequenceName]['value']++; + if ($this->sequences[$sequenceName]['value'] >= $this->sequences[$sequenceName]['max']) { + unset ($this->sequences[$sequenceName]); + } + + return $value; + } + + $this->conn->beginTransaction(); + + try { + $platform = $this->conn->getDatabasePlatform(); + $sql = "SELECT sequence_value, sequence_increment_by " . + "FROM " . $platform->appendLockHint($this->generatorTableName, \Doctrine\DBAL\LockMode::PESSIMISTIC_WRITE) . " " . + "WHERE sequence_name = ? " . $platform->getWriteLockSQL(); + $stmt = $this->conn->executeQuery($sql, array($sequenceName)); + + if ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { + $row = array_change_key_case($row, CASE_LOWER); + + $value = $row['sequence_value']; + $value++; + + if ($row['sequence_increment_by'] > 1) { + $this->sequences[$sequenceName] = array( + 'value' => $value, + 'max' => $row['sequence_value'] + $row['sequence_increment_by'] + ); + } + + $sql = "UPDATE " . $this->generatorTableName . " ". + "SET sequence_value = sequence_value + sequence_increment_by " . + "WHERE sequence_name = ? AND sequence_value = ?"; + $rows = $this->conn->executeUpdate($sql, array($sequenceName, $row['sequence_value'])); + + if ($rows != 1) { + throw new \Doctrine\DBAL\DBALException("Race-condition detected while updating sequence. Aborting generation"); + } + } else { + $this->conn->insert( + $this->generatorTableName, + array('sequence_name' => $sequenceName, 'sequence_value' => 1, 'sequence_increment_by' => 1) + ); + $value = 1; + } + + $this->conn->commit(); + + } catch (\Exception $e) { + $this->conn->rollback(); + throw new \Doctrine\DBAL\DBALException("Error occurred while generating ID with TableGenerator, aborted generation: " . $e->getMessage(), 0, $e); + } + + return $value; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Id/TableGeneratorSchemaVisitor.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Id/TableGeneratorSchemaVisitor.php new file mode 100644 index 0000000000000000000000000000000000000000..25b06aca9f2f23abbefd140cc1337951c7762693 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Id/TableGeneratorSchemaVisitor.php @@ -0,0 +1,89 @@ +. + */ + +namespace Doctrine\DBAL\Id; + +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Sequence; +use Doctrine\DBAL\Schema\Index; + +class TableGeneratorSchemaVisitor implements \Doctrine\DBAL\Schema\Visitor\Visitor +{ + /** + * @var string + */ + private $generatorTableName; + + /** + * @param string $generatorTableName + */ + public function __construct($generatorTableName = 'sequences') + { + $this->generatorTableName = $generatorTableName; + } + + /** + * {@inheritdoc} + */ + public function acceptSchema(Schema $schema) + { + $table = $schema->createTable($this->generatorTableName); + $table->addColumn('sequence_name', 'string'); + $table->addColumn('sequence_value', 'integer', array('default' => 1)); + $table->addColumn('sequence_increment_by', 'integer', array('default' => 1)); + } + + /** + * {@inheritdoc} + */ + public function acceptTable(Table $table) + { + } + + /** + * {@inheritdoc} + */ + public function acceptColumn(Table $table, Column $column) + { + } + + /** + * {@inheritdoc} + */ + public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) + { + } + + /** + * {@inheritdoc} + */ + public function acceptIndex(Table $table, Index $index) + { + } + + /** + * {@inheritdoc} + */ + public function acceptSequence(Sequence $sequence) + { + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/LockMode.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/LockMode.php new file mode 100644 index 0000000000000000000000000000000000000000..8d78180ede253cb9b8254d9ae646d848a2f1d1aa --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/LockMode.php @@ -0,0 +1,43 @@ +. + */ + +namespace Doctrine\DBAL; + +/** + * Contains all DBAL LockModes. + * + * @link www.doctrine-project.org + * @since 1.0 + * @author Benjamin Eberlei + * @author Roman Borschel + */ +class LockMode +{ + const NONE = 0; + const OPTIMISTIC = 1; + const PESSIMISTIC_READ = 2; + const PESSIMISTIC_WRITE = 4; + + /** + * Private constructor. This class cannot be instantiated. + */ + final private function __construct() + { + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/DebugStack.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/DebugStack.php new file mode 100644 index 0000000000000000000000000000000000000000..b143a3ee28e647f4dd90c0e5a322948282e8c258 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/DebugStack.php @@ -0,0 +1,78 @@ +. + */ + +namespace Doctrine\DBAL\Logging; + +/** + * Includes executed SQLs in a Debug Stack. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class DebugStack implements SQLLogger +{ + /** + * Executed SQL queries. + * + * @var array + */ + public $queries = array(); + + /** + * If Debug Stack is enabled (log queries) or not. + * + * @var boolean + */ + public $enabled = true; + + /** + * @var float|null + */ + public $start = null; + + /** + * @var integer + */ + public $currentQuery = 0; + + /** + * {@inheritdoc} + */ + public function startQuery($sql, array $params = null, array $types = null) + { + if ($this->enabled) { + $this->start = microtime(true); + $this->queries[++$this->currentQuery] = array('sql' => $sql, 'params' => $params, 'types' => $types, 'executionMS' => 0); + } + } + + /** + * {@inheritdoc} + */ + public function stopQuery() + { + if ($this->enabled) { + $this->queries[$this->currentQuery]['executionMS'] = microtime(true) - $this->start; + } + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php new file mode 100644 index 0000000000000000000000000000000000000000..8ed04788fd684761fc59638fc73a433a0e760dfe --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php @@ -0,0 +1,56 @@ +. + */ + +namespace Doctrine\DBAL\Logging; + +/** + * A SQL logger that logs to the standard output using echo/var_dump. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class EchoSQLLogger implements SQLLogger +{ + /** + * {@inheritdoc} + */ + public function startQuery($sql, array $params = null, array $types = null) + { + echo $sql . PHP_EOL; + + if ($params) { + var_dump($params); + } + + if ($types) { + var_dump($types); + } + } + + /** + * {@inheritdoc} + */ + public function stopQuery() + { + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/LoggerChain.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/LoggerChain.php new file mode 100644 index 0000000000000000000000000000000000000000..81845b1b25069186adf8d6e10bae578576a07ec3 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/LoggerChain.php @@ -0,0 +1,67 @@ +. + */ + +namespace Doctrine\DBAL\Logging; + +/** + * Chains multiple SQLLogger. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Christophe Coevoet + */ +class LoggerChain implements SQLLogger +{ + /** + * @var \Doctrine\DBAL\Logging\SQLLogger[] + */ + private $loggers = array(); + + /** + * Adds a logger in the chain. + * + * @param \Doctrine\DBAL\Logging\SQLLogger $logger + * + * @return void + */ + public function addLogger(SQLLogger $logger) + { + $this->loggers[] = $logger; + } + + /** + * {@inheritdoc} + */ + public function startQuery($sql, array $params = null, array $types = null) + { + foreach ($this->loggers as $logger) { + $logger->startQuery($sql, $params, $types); + } + } + + /** + * {@inheritdoc} + */ + public function stopQuery() + { + foreach ($this->loggers as $logger) { + $logger->stopQuery(); + } + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/SQLLogger.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/SQLLogger.php new file mode 100644 index 0000000000000000000000000000000000000000..52491e50fe620d9202926eaa95517b297f3700b6 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/SQLLogger.php @@ -0,0 +1,51 @@ +. + */ + +namespace Doctrine\DBAL\Logging; + +/** + * Interface for SQL loggers. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +interface SQLLogger +{ + /** + * Logs a SQL statement somewhere. + * + * @param string $sql The SQL to be executed. + * @param array|null $params The SQL parameters. + * @param array|null $types The SQL parameter types. + * + * @return void + */ + public function startQuery($sql, array $params = null, array $types = null); + + /** + * Marks the last started query as stopped. This can be used for timing of queries. + * + * @return void + */ + public function stopQuery(); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php new file mode 100644 index 0000000000000000000000000000000000000000..192879ad521f777899def1108d6fa16a9894f5ae --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -0,0 +1,3536 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Schema\Identifier; +use Doctrine\DBAL\Types; +use Doctrine\DBAL\Schema\Constraint; +use Doctrine\DBAL\Schema\Sequence; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\TableDiff; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\ColumnDiff; +use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Events; +use Doctrine\Common\EventManager; +use Doctrine\DBAL\Event\SchemaCreateTableEventArgs; +use Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs; +use Doctrine\DBAL\Event\SchemaDropTableEventArgs; +use Doctrine\DBAL\Event\SchemaAlterTableEventArgs; +use Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs; +use Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs; +use Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs; +use Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs; + +/** + * Base class for all DatabasePlatforms. The DatabasePlatforms are the central + * point of abstraction of platform-specific behaviors, features and SQL dialects. + * They are a passive source of information. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Lukas Smith (PEAR MDB2 library) + * @author Benjamin Eberlei + * @todo Remove any unnecessary methods. + */ +abstract class AbstractPlatform +{ + /** + * @var integer + */ + const CREATE_INDEXES = 1; + + /** + * @var integer + */ + const CREATE_FOREIGNKEYS = 2; + + /** + * @var string + */ + const DATE_INTERVAL_UNIT_SECOND = 'SECOND'; + + /** + * @var string + */ + const DATE_INTERVAL_UNIT_MINUTE = 'MINUTE'; + + /** + * @var string + */ + const DATE_INTERVAL_UNIT_HOUR = 'HOUR'; + + /** + * @var string + */ + const DATE_INTERVAL_UNIT_DAY = 'DAY'; + + /** + * @var string + */ + const DATE_INTERVAL_UNIT_WEEK = 'WEEK'; + + /** + * @var string + */ + const DATE_INTERVAL_UNIT_MONTH = 'MONTH'; + + /** + * @var string + */ + const DATE_INTERVAL_UNIT_QUARTER = 'QUARTER'; + + /** + * @var string + */ + const DATE_INTERVAL_UNIT_YEAR = 'YEAR'; + + /** + * @var integer + */ + const TRIM_UNSPECIFIED = 0; + + /** + * @var integer + */ + const TRIM_LEADING = 1; + + /** + * @var integer + */ + const TRIM_TRAILING = 2; + + /** + * @var integer + */ + const TRIM_BOTH = 3; + + /** + * @var array|null + */ + protected $doctrineTypeMapping = null; + + /** + * Contains a list of all columns that should generate parseable column comments for type-detection + * in reverse engineering scenarios. + * + * @var array|null + */ + protected $doctrineTypeComments = null; + + /** + * @var \Doctrine\Common\EventManager + */ + protected $_eventManager; + + /** + * Holds the KeywordList instance for the current platform. + * + * @var \Doctrine\DBAL\Platforms\Keywords\KeywordList + */ + protected $_keywords; + + /** + * Constructor. + */ + public function __construct() + { + } + + /** + * Sets the EventManager used by the Platform. + * + * @param \Doctrine\Common\EventManager $eventManager + */ + public function setEventManager(EventManager $eventManager) + { + $this->_eventManager = $eventManager; + } + + /** + * Gets the EventManager used by the Platform. + * + * @return \Doctrine\Common\EventManager + */ + public function getEventManager() + { + return $this->_eventManager; + } + + /** + * Returns the SQL snippet that declares a boolean column. + * + * @param array $columnDef + * + * @return string + */ + abstract public function getBooleanTypeDeclarationSQL(array $columnDef); + + /** + * Returns the SQL snippet that declares a 4 byte integer column. + * + * @param array $columnDef + * + * @return string + */ + abstract public function getIntegerTypeDeclarationSQL(array $columnDef); + + /** + * Returns the SQL snippet that declares an 8 byte integer column. + * + * @param array $columnDef + * + * @return string + */ + abstract public function getBigIntTypeDeclarationSQL(array $columnDef); + + /** + * Returns the SQL snippet that declares a 2 byte integer column. + * + * @param array $columnDef + * + * @return string + */ + abstract public function getSmallIntTypeDeclarationSQL(array $columnDef); + + /** + * Returns the SQL snippet that declares common properties of an integer column. + * + * @param array $columnDef + * + * @return string + */ + abstract protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef); + + /** + * Lazy load Doctrine Type Mappings. + * + * @return void + */ + abstract protected function initializeDoctrineTypeMappings(); + + /** + * Initializes Doctrine Type Mappings with the platform defaults + * and with all additional type mappings. + * + * @return void + */ + private function initializeAllDoctrineTypeMappings() + { + $this->initializeDoctrineTypeMappings(); + + foreach (Type::getTypesMap() as $typeName => $className) { + foreach (Type::getType($typeName)->getMappedDatabaseTypes($this) as $dbType) { + $this->doctrineTypeMapping[$dbType] = $typeName; + } + } + } + + /** + * Returns the SQL snippet used to declare a VARCHAR column type. + * + * @param array $field + * + * @return string + */ + public function getVarcharTypeDeclarationSQL(array $field) + { + if ( !isset($field['length'])) { + $field['length'] = $this->getVarcharDefaultLength(); + } + + $fixed = (isset($field['fixed'])) ? $field['fixed'] : false; + + if ($field['length'] > $this->getVarcharMaxLength()) { + return $this->getClobTypeDeclarationSQL($field); + } + + return $this->getVarcharTypeDeclarationSQLSnippet($field['length'], $fixed); + } + + /** + * Returns the SQL snippet used to declare a BINARY/VARBINARY column type. + * + * @param array $field The column definition. + * + * @return string + */ + public function getBinaryTypeDeclarationSQL(array $field) + { + if ( ! isset($field['length'])) { + $field['length'] = $this->getBinaryDefaultLength(); + } + + $fixed = isset($field['fixed']) ? $field['fixed'] : false; + + if ($field['length'] > $this->getBinaryMaxLength()) { + return $this->getBlobTypeDeclarationSQL($field); + } + + return $this->getBinaryTypeDeclarationSQLSnippet($field['length'], $fixed); + } + + /** + * Returns the SQL snippet to declare a GUID/UUID field. + * + * By default this maps directly to a CHAR(36) and only maps to more + * special datatypes when the underlying databases support this datatype. + * + * @param array $field + * + * @return string + */ + public function getGuidTypeDeclarationSQL(array $field) + { + $field['length'] = 36; + $field['fixed'] = true; + + return $this->getVarcharTypeDeclarationSQL($field); + } + + /** + * Returns the SQL snippet to declare a JSON field. + * + * By default this maps directly to a CLOB and only maps to more + * special datatypes when the underlying databases support this datatype. + * + * @param array $field + * + * @return string + */ + public function getJsonTypeDeclarationSQL(array $field) + { + return $this->getClobTypeDeclarationSQL($field); + } + + /** + * @param integer $length + * @param boolean $fixed + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) + { + throw DBALException::notSupported('VARCHARs not supported by Platform.'); + } + + /** + * Returns the SQL snippet used to declare a BINARY/VARBINARY column type. + * + * @param integer $length The length of the column. + * @param boolean $fixed Whether the column length is fixed. + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) + { + throw DBALException::notSupported('BINARY/VARBINARY column types are not supported by this platform.'); + } + + /** + * Returns the SQL snippet used to declare a CLOB column type. + * + * @param array $field + * + * @return string + */ + abstract public function getClobTypeDeclarationSQL(array $field); + + /** + * Returns the SQL Snippet used to declare a BLOB column type. + * + * @param array $field + * + * @return string + */ + abstract public function getBlobTypeDeclarationSQL(array $field); + + /** + * Gets the name of the platform. + * + * @return string + */ + abstract public function getName(); + + /** + * Registers a doctrine type to be used in conjunction with a column type of this platform. + * + * @param string $dbType + * @param string $doctrineType + * + * @throws \Doctrine\DBAL\DBALException If the type is not found. + */ + public function registerDoctrineTypeMapping($dbType, $doctrineType) + { + if ($this->doctrineTypeMapping === null) { + $this->initializeAllDoctrineTypeMappings(); + } + + if (!Types\Type::hasType($doctrineType)) { + throw DBALException::typeNotFound($doctrineType); + } + + $dbType = strtolower($dbType); + $this->doctrineTypeMapping[$dbType] = $doctrineType; + } + + /** + * Gets the Doctrine type that is mapped for the given database column type. + * + * @param string $dbType + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException + */ + public function getDoctrineTypeMapping($dbType) + { + if ($this->doctrineTypeMapping === null) { + $this->initializeAllDoctrineTypeMappings(); + } + + $dbType = strtolower($dbType); + + if (!isset($this->doctrineTypeMapping[$dbType])) { + throw new \Doctrine\DBAL\DBALException("Unknown database type ".$dbType." requested, " . get_class($this) . " may not support it."); + } + + return $this->doctrineTypeMapping[$dbType]; + } + + /** + * Checks if a database type is currently supported by this platform. + * + * @param string $dbType + * + * @return boolean + */ + public function hasDoctrineTypeMappingFor($dbType) + { + if ($this->doctrineTypeMapping === null) { + $this->initializeAllDoctrineTypeMappings(); + } + + $dbType = strtolower($dbType); + + return isset($this->doctrineTypeMapping[$dbType]); + } + + /** + * Initializes the Doctrine Type comments instance variable for in_array() checks. + * + * @return void + */ + protected function initializeCommentedDoctrineTypes() + { + $this->doctrineTypeComments = array(); + + foreach (Type::getTypesMap() as $typeName => $className) { + $type = Type::getType($typeName); + + if ($type->requiresSQLCommentHint($this)) { + $this->doctrineTypeComments[] = $typeName; + } + } + } + + /** + * Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type? + * + * @param \Doctrine\DBAL\Types\Type $doctrineType + * + * @return boolean + */ + public function isCommentedDoctrineType(Type $doctrineType) + { + if ($this->doctrineTypeComments === null) { + $this->initializeCommentedDoctrineTypes(); + } + + return in_array($doctrineType->getName(), $this->doctrineTypeComments); + } + + /** + * Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements. + * + * @param string|\Doctrine\DBAL\Types\Type $doctrineType + * + * @return void + */ + public function markDoctrineTypeCommented($doctrineType) + { + if ($this->doctrineTypeComments === null) { + $this->initializeCommentedDoctrineTypes(); + } + + $this->doctrineTypeComments[] = $doctrineType instanceof Type ? $doctrineType->getName() : $doctrineType; + } + + /** + * Gets the comment to append to a column comment that helps parsing this type in reverse engineering. + * + * @param \Doctrine\DBAL\Types\Type $doctrineType + * + * @return string + */ + public function getDoctrineTypeComment(Type $doctrineType) + { + return '(DC2Type:' . $doctrineType->getName() . ')'; + } + + /** + * Gets the comment of a passed column modified by potential doctrine type comment hints. + * + * @param \Doctrine\DBAL\Schema\Column $column + * + * @return string + */ + protected function getColumnComment(Column $column) + { + $comment = $column->getComment(); + + if ($this->isCommentedDoctrineType($column->getType())) { + $comment .= $this->getDoctrineTypeComment($column->getType()); + } + + return $comment; + } + + /** + * Gets the character used for identifier quoting. + * + * @return string + */ + public function getIdentifierQuoteCharacter() + { + return '"'; + } + + /** + * Gets the string portion that starts an SQL comment. + * + * @return string + */ + public function getSqlCommentStartString() + { + return "--"; + } + + /** + * Gets the string portion that ends an SQL comment. + * + * @return string + */ + public function getSqlCommentEndString() + { + return "\n"; + } + + /** + * Gets the maximum length of a varchar field. + * + * @return integer + */ + public function getVarcharMaxLength() + { + return 4000; + } + + /** + * Gets the default length of a varchar field. + * + * @return integer + */ + public function getVarcharDefaultLength() + { + return 255; + } + + /** + * Gets the maximum length of a binary field. + * + * @return integer + */ + public function getBinaryMaxLength() + { + return 4000; + } + + /** + * Gets the default length of a binary field. + * + * @return integer + */ + public function getBinaryDefaultLength() + { + return 255; + } + + /** + * Gets all SQL wildcard characters of the platform. + * + * @return array + */ + public function getWildcards() + { + return array('%', '_'); + } + + /** + * Returns the regular expression operator. + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getRegexpExpression() + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the global unique identifier expression. + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getGuidExpression() + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the SQL snippet to get the average value of a column. + * + * @param string $column The column to use. + * + * @return string Generated SQL including an AVG aggregate function. + */ + public function getAvgExpression($column) + { + return 'AVG(' . $column . ')'; + } + + /** + * Returns the SQL snippet to get the number of rows (without a NULL value) of a column. + * + * If a '*' is used instead of a column the number of selected rows is returned. + * + * @param string|integer $column The column to use. + * + * @return string Generated SQL including a COUNT aggregate function. + */ + public function getCountExpression($column) + { + return 'COUNT(' . $column . ')'; + } + + /** + * Returns the SQL snippet to get the highest value of a column. + * + * @param string $column The column to use. + * + * @return string Generated SQL including a MAX aggregate function. + */ + public function getMaxExpression($column) + { + return 'MAX(' . $column . ')'; + } + + /** + * Returns the SQL snippet to get the lowest value of a column. + * + * @param string $column The column to use. + * + * @return string Generated SQL including a MIN aggregate function. + */ + public function getMinExpression($column) + { + return 'MIN(' . $column . ')'; + } + + /** + * Returns the SQL snippet to get the total sum of a column. + * + * @param string $column The column to use. + * + * @return string Generated SQL including a SUM aggregate function. + */ + public function getSumExpression($column) + { + return 'SUM(' . $column . ')'; + } + + // scalar functions + + /** + * Returns the SQL snippet to get the md5 sum of a field. + * + * Note: Not SQL92, but common functionality. + * + * @param string $column + * + * @return string + */ + public function getMd5Expression($column) + { + return 'MD5(' . $column . ')'; + } + + /** + * Returns the SQL snippet to get the length of a text field. + * + * @param string $column + * + * @return string + */ + public function getLengthExpression($column) + { + return 'LENGTH(' . $column . ')'; + } + + /** + * Returns the SQL snippet to get the squared value of a column. + * + * @param string $column The column to use. + * + * @return string Generated SQL including an SQRT aggregate function. + */ + public function getSqrtExpression($column) + { + return 'SQRT(' . $column . ')'; + } + + /** + * Returns the SQL snippet to round a numeric field to the number of decimals specified. + * + * @param string $column + * @param integer $decimals + * + * @return string + */ + public function getRoundExpression($column, $decimals = 0) + { + return 'ROUND(' . $column . ', ' . $decimals . ')'; + } + + /** + * Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2. + * + * @param string $expression1 + * @param string $expression2 + * + * @return string + */ + public function getModExpression($expression1, $expression2) + { + return 'MOD(' . $expression1 . ', ' . $expression2 . ')'; + } + + /** + * Returns the SQL snippet to trim a string. + * + * @param string $str The expression to apply the trim to. + * @param integer $pos The position of the trim (leading/trailing/both). + * @param string|boolean $char The char to trim, has to be quoted already. Defaults to space. + * + * @return string + */ + public function getTrimExpression($str, $pos = self::TRIM_UNSPECIFIED, $char = false) + { + $expression = ''; + + switch ($pos) { + case self::TRIM_LEADING: + $expression = 'LEADING '; + break; + + case self::TRIM_TRAILING: + $expression = 'TRAILING '; + break; + + case self::TRIM_BOTH: + $expression = 'BOTH '; + break; + } + + if (false !== $char) { + $expression .= $char . ' '; + } + + if ($pos || false !== $char) { + $expression .= 'FROM '; + } + + return 'TRIM(' . $expression . $str . ')'; + } + + /** + * Returns the SQL snippet to trim trailing space characters from the expression. + * + * @param string $str Literal string or column name. + * + * @return string + */ + public function getRtrimExpression($str) + { + return 'RTRIM(' . $str . ')'; + } + + /** + * Returns the SQL snippet to trim leading space characters from the expression. + * + * @param string $str Literal string or column name. + * + * @return string + */ + public function getLtrimExpression($str) + { + return 'LTRIM(' . $str . ')'; + } + + /** + * Returns the SQL snippet to change all characters from the expression to uppercase, + * according to the current character set mapping. + * + * @param string $str Literal string or column name. + * + * @return string + */ + public function getUpperExpression($str) + { + return 'UPPER(' . $str . ')'; + } + + /** + * Returns the SQL snippet to change all characters from the expression to lowercase, + * according to the current character set mapping. + * + * @param string $str Literal string or column name. + * + * @return string + */ + public function getLowerExpression($str) + { + return 'LOWER(' . $str . ')'; + } + + /** + * Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str. + * + * @param string $str Literal string. + * @param string $substr Literal string to find. + * @param integer|boolean $startPos Position to start at, beginning of string by default. + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getLocateExpression($str, $substr, $startPos = false) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the SQL snippet to get the current system date. + * + * @return string + */ + public function getNowExpression() + { + return 'NOW()'; + } + + /** + * Returns a SQL snippet to get a substring inside an SQL statement. + * + * Note: Not SQL92, but common functionality. + * + * SQLite only supports the 2 parameter variant of this function. + * + * @param string $value An sql string literal or column name/alias. + * @param integer $from Where to start the substring portion. + * @param integer|null $length The substring portion length. + * + * @return string + */ + public function getSubstringExpression($value, $from, $length = null) + { + if ($length === null) { + return 'SUBSTRING(' . $value . ' FROM ' . $from . ')'; + } + + return 'SUBSTRING(' . $value . ' FROM ' . $from . ' FOR ' . $length . ')'; + } + + /** + * Returns a SQL snippet to concatenate the given expressions. + * + * Accepts an arbitrary number of string parameters. Each parameter must contain an expression. + * + * @return string + */ + public function getConcatExpression() + { + return join(' || ', func_get_args()); + } + + /** + * Returns the SQL for a logical not. + * + * Example: + * + * $q = new Doctrine_Query(); + * $e = $q->expr; + * $q->select('*')->from('table') + * ->where($e->eq('id', $e->not('null')); + * + * + * @param string $expression + * + * @return string The logical expression. + */ + public function getNotExpression($expression) + { + return 'NOT(' . $expression . ')'; + } + + /** + * Returns the SQL that checks if an expression is null. + * + * @param string $expression The expression that should be compared to null. + * + * @return string The logical expression. + */ + public function getIsNullExpression($expression) + { + return $expression . ' IS NULL'; + } + + /** + * Returns the SQL that checks if an expression is not null. + * + * @param string $expression The expression that should be compared to null. + * + * @return string The logical expression. + */ + public function getIsNotNullExpression($expression) + { + return $expression . ' IS NOT NULL'; + } + + /** + * Returns the SQL that checks if an expression evaluates to a value between two values. + * + * The parameter $expression is checked if it is between $value1 and $value2. + * + * Note: There is a slight difference in the way BETWEEN works on some databases. + * http://www.w3schools.com/sql/sql_between.asp. If you want complete database + * independence you should avoid using between(). + * + * @param string $expression The value to compare to. + * @param string $value1 The lower value to compare with. + * @param string $value2 The higher value to compare with. + * + * @return string The logical expression. + */ + public function getBetweenExpression($expression, $value1, $value2) + { + return $expression . ' BETWEEN ' .$value1 . ' AND ' . $value2; + } + + /** + * Returns the SQL to get the arccosine of a value. + * + * @param string $value + * + * @return string + */ + public function getAcosExpression($value) + { + return 'ACOS(' . $value . ')'; + } + + /** + * Returns the SQL to get the sine of a value. + * + * @param string $value + * + * @return string + */ + public function getSinExpression($value) + { + return 'SIN(' . $value . ')'; + } + + /** + * Returns the SQL to get the PI value. + * + * @return string + */ + public function getPiExpression() + { + return 'PI()'; + } + + /** + * Returns the SQL to get the cosine of a value. + * + * @param string $value + * + * @return string + */ + public function getCosExpression($value) + { + return 'COS(' . $value . ')'; + } + + /** + * Returns the SQL to calculate the difference in days between the two passed dates. + * + * Computes diff = date1 - date2. + * + * @param string $date1 + * @param string $date2 + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateDiffExpression($date1, $date2) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the SQL to add the number of given seconds to a date. + * + * @param string $date + * @param integer $seconds + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateAddSecondsExpression($date, $seconds) + { + return $this->getDateArithmeticIntervalExpression($date, '+', $seconds, self::DATE_INTERVAL_UNIT_SECOND); + } + + /** + * Returns the SQL to subtract the number of given seconds from a date. + * + * @param string $date + * @param integer $seconds + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateSubSecondsExpression($date, $seconds) + { + return $this->getDateArithmeticIntervalExpression($date, '-', $seconds, self::DATE_INTERVAL_UNIT_SECOND); + } + + /** + * Returns the SQL to add the number of given minutes to a date. + * + * @param string $date + * @param integer $minutes + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateAddMinutesExpression($date, $minutes) + { + return $this->getDateArithmeticIntervalExpression($date, '+', $minutes, self::DATE_INTERVAL_UNIT_MINUTE); + } + + /** + * Returns the SQL to subtract the number of given minutes from a date. + * + * @param string $date + * @param integer $minutes + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateSubMinutesExpression($date, $minutes) + { + return $this->getDateArithmeticIntervalExpression($date, '-', $minutes, self::DATE_INTERVAL_UNIT_MINUTE); + } + + /** + * Returns the SQL to add the number of given hours to a date. + * + * @param string $date + * @param integer $hours + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateAddHourExpression($date, $hours) + { + return $this->getDateArithmeticIntervalExpression($date, '+', $hours, self::DATE_INTERVAL_UNIT_HOUR); + } + + /** + * Returns the SQL to subtract the number of given hours to a date. + * + * @param string $date + * @param integer $hours + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateSubHourExpression($date, $hours) + { + return $this->getDateArithmeticIntervalExpression($date, '-', $hours, self::DATE_INTERVAL_UNIT_HOUR); + } + + /** + * Returns the SQL to add the number of given days to a date. + * + * @param string $date + * @param integer $days + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateAddDaysExpression($date, $days) + { + return $this->getDateArithmeticIntervalExpression($date, '+', $days, self::DATE_INTERVAL_UNIT_DAY); + } + + /** + * Returns the SQL to subtract the number of given days to a date. + * + * @param string $date + * @param integer $days + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateSubDaysExpression($date, $days) + { + return $this->getDateArithmeticIntervalExpression($date, '-', $days, self::DATE_INTERVAL_UNIT_DAY); + } + + /** + * Returns the SQL to add the number of given weeks to a date. + * + * @param string $date + * @param integer $weeks + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateAddWeeksExpression($date, $weeks) + { + return $this->getDateArithmeticIntervalExpression($date, '+', $weeks, self::DATE_INTERVAL_UNIT_WEEK); + } + + /** + * Returns the SQL to subtract the number of given weeks from a date. + * + * @param string $date + * @param integer $weeks + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateSubWeeksExpression($date, $weeks) + { + return $this->getDateArithmeticIntervalExpression($date, '-', $weeks, self::DATE_INTERVAL_UNIT_WEEK); + } + + /** + * Returns the SQL to add the number of given months to a date. + * + * @param string $date + * @param integer $months + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateAddMonthExpression($date, $months) + { + return $this->getDateArithmeticIntervalExpression($date, '+', $months, self::DATE_INTERVAL_UNIT_MONTH); + } + + /** + * Returns the SQL to subtract the number of given months to a date. + * + * @param string $date + * @param integer $months + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateSubMonthExpression($date, $months) + { + return $this->getDateArithmeticIntervalExpression($date, '-', $months, self::DATE_INTERVAL_UNIT_MONTH); + } + + /** + * Returns the SQL to add the number of given quarters to a date. + * + * @param string $date + * @param integer $quarters + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateAddQuartersExpression($date, $quarters) + { + return $this->getDateArithmeticIntervalExpression($date, '+', $quarters, self::DATE_INTERVAL_UNIT_QUARTER); + } + + /** + * Returns the SQL to subtract the number of given quarters from a date. + * + * @param string $date + * @param integer $quarters + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateSubQuartersExpression($date, $quarters) + { + return $this->getDateArithmeticIntervalExpression($date, '-', $quarters, self::DATE_INTERVAL_UNIT_QUARTER); + } + + /** + * Returns the SQL to add the number of given years to a date. + * + * @param string $date + * @param integer $years + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateAddYearsExpression($date, $years) + { + return $this->getDateArithmeticIntervalExpression($date, '+', $years, self::DATE_INTERVAL_UNIT_YEAR); + } + + /** + * Returns the SQL to subtract the number of given years from a date. + * + * @param string $date + * @param integer $years + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateSubYearsExpression($date, $years) + { + return $this->getDateArithmeticIntervalExpression($date, '-', $years, self::DATE_INTERVAL_UNIT_YEAR); + } + + /** + * Returns the SQL for a date arithmetic expression. + * + * @param string $date The column or literal representing a date to perform the arithmetic operation on. + * @param string $operator The arithmetic operator (+ or -). + * @param integer $interval The interval that shall be calculated into the date. + * @param string $unit The unit of the interval that shall be calculated into the date. + * One of the DATE_INTERVAL_UNIT_* constants. + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the SQL bit AND comparison expression. + * + * @param string $value1 + * @param string $value2 + * + * @return string + */ + public function getBitAndComparisonExpression($value1, $value2) + { + return '(' . $value1 . ' & ' . $value2 . ')'; + } + + /** + * Returns the SQL bit OR comparison expression. + * + * @param string $value1 + * @param string $value2 + * + * @return string + */ + public function getBitOrComparisonExpression($value1, $value2) + { + return '(' . $value1 . ' | ' . $value2 . ')'; + } + + /** + * Returns the FOR UPDATE expression. + * + * @return string + */ + public function getForUpdateSQL() + { + return 'FOR UPDATE'; + } + + /** + * Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification. + * + * @param string $fromClause The FROM clause to append the hint for the given lock mode to. + * @param integer|null $lockMode One of the Doctrine\DBAL\LockMode::* constants. If null is given, nothing will + * be appended to the FROM clause. + * + * @return string + */ + public function appendLockHint($fromClause, $lockMode) + { + return $fromClause; + } + + /** + * Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock. + * + * This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database + * vendors allow to lighten this constraint up to be a real read lock. + * + * @return string + */ + public function getReadLockSQL() + { + return $this->getForUpdateSQL(); + } + + /** + * Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows. + * + * The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard. + * + * @return string + */ + public function getWriteLockSQL() + { + return $this->getForUpdateSQL(); + } + + /** + * Returns the SQL snippet to drop an existing database. + * + * @param string $database The name of the database that should be dropped. + * + * @return string + */ + public function getDropDatabaseSQL($database) + { + return 'DROP DATABASE ' . $database; + } + + /** + * Returns the SQL snippet to drop an existing table. + * + * @param \Doctrine\DBAL\Schema\Table|string $table + * + * @return string + * + * @throws \InvalidArgumentException + */ + public function getDropTableSQL($table) + { + $tableArg = $table; + + if ($table instanceof Table) { + $table = $table->getQuotedName($this); + } elseif (!is_string($table)) { + throw new \InvalidArgumentException('getDropTableSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); + } + + if (null !== $this->_eventManager && $this->_eventManager->hasListeners(Events::onSchemaDropTable)) { + $eventArgs = new SchemaDropTableEventArgs($tableArg, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaDropTable, $eventArgs); + + if ($eventArgs->isDefaultPrevented()) { + return $eventArgs->getSql(); + } + } + + return 'DROP TABLE ' . $table; + } + + /** + * Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction. + * + * @param \Doctrine\DBAL\Schema\Table|string $table + * + * @return string + */ + public function getDropTemporaryTableSQL($table) + { + return $this->getDropTableSQL($table); + } + + /** + * Returns the SQL to drop an index from a table. + * + * @param \Doctrine\DBAL\Schema\Index|string $index + * @param \Doctrine\DBAL\Schema\Table|string $table + * + * @return string + * + * @throws \InvalidArgumentException + */ + public function getDropIndexSQL($index, $table = null) + { + if ($index instanceof Index) { + $index = $index->getQuotedName($this); + } elseif (!is_string($index)) { + throw new \InvalidArgumentException('AbstractPlatform::getDropIndexSQL() expects $index parameter to be string or \Doctrine\DBAL\Schema\Index.'); + } + + return 'DROP INDEX ' . $index; + } + + /** + * Returns the SQL to drop a constraint. + * + * @param \Doctrine\DBAL\Schema\Constraint|string $constraint + * @param \Doctrine\DBAL\Schema\Table|string $table + * + * @return string + */ + public function getDropConstraintSQL($constraint, $table) + { + if (! $constraint instanceof Constraint) { + $constraint = new Identifier($constraint); + } + + if (! $table instanceof Table) { + $table = new Identifier($table); + } + + $constraint = $constraint->getQuotedName($this); + $table = $table->getQuotedName($this); + + return 'ALTER TABLE ' . $table . ' DROP CONSTRAINT ' . $constraint; + } + + /** + * Returns the SQL to drop a foreign key. + * + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint|string $foreignKey + * @param \Doctrine\DBAL\Schema\Table|string $table + * + * @return string + */ + public function getDropForeignKeySQL($foreignKey, $table) + { + if (! $foreignKey instanceof ForeignKeyConstraint) { + $foreignKey = new Identifier($foreignKey); + } + + if (! $table instanceof Table) { + $table = new Identifier($table); + } + + $foreignKey = $foreignKey->getQuotedName($this); + $table = $table->getQuotedName($this); + + return 'ALTER TABLE ' . $table . ' DROP FOREIGN KEY ' . $foreignKey; + } + + /** + * Returns the SQL statement(s) to create a table with the specified name, columns and constraints + * on this platform. + * + * @param \Doctrine\DBAL\Schema\Table $table + * @param integer $createFlags + * + * @return array The sequence of SQL statements. + * + * @throws \Doctrine\DBAL\DBALException + * @throws \InvalidArgumentException + */ + public function getCreateTableSQL(Table $table, $createFlags = self::CREATE_INDEXES) + { + if ( ! is_int($createFlags)) { + throw new \InvalidArgumentException("Second argument of AbstractPlatform::getCreateTableSQL() has to be integer."); + } + + if (count($table->getColumns()) === 0) { + throw DBALException::noColumnsSpecifiedForTable($table->getName()); + } + + $tableName = $table->getQuotedName($this); + $options = $table->getOptions(); + $options['uniqueConstraints'] = array(); + $options['indexes'] = array(); + $options['primary'] = array(); + + if (($createFlags&self::CREATE_INDEXES) > 0) { + foreach ($table->getIndexes() as $index) { + /* @var $index Index */ + if ($index->isPrimary()) { + $options['primary'] = $index->getQuotedColumns($this); + $options['primary_index'] = $index; + } else { + $options['indexes'][$index->getQuotedName($this)] = $index; + } + } + } + + $columnSql = array(); + $columns = array(); + + foreach ($table->getColumns() as $column) { + /* @var \Doctrine\DBAL\Schema\Column $column */ + + if (null !== $this->_eventManager && $this->_eventManager->hasListeners(Events::onSchemaCreateTableColumn)) { + $eventArgs = new SchemaCreateTableColumnEventArgs($column, $table, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaCreateTableColumn, $eventArgs); + + $columnSql = array_merge($columnSql, $eventArgs->getSql()); + + if ($eventArgs->isDefaultPrevented()) { + continue; + } + } + + $columnData = $column->toArray(); + $columnData['name'] = $column->getQuotedName($this); + $columnData['version'] = $column->hasPlatformOption("version") ? $column->getPlatformOption('version') : false; + $columnData['comment'] = $this->getColumnComment($column); + + if (strtolower($columnData['type']) == "string" && $columnData['length'] === null) { + $columnData['length'] = 255; + } + + if (in_array($column->getName(), $options['primary'])) { + $columnData['primary'] = true; + } + + $columns[$columnData['name']] = $columnData; + } + + if (($createFlags&self::CREATE_FOREIGNKEYS) > 0) { + $options['foreignKeys'] = array(); + foreach ($table->getForeignKeys() as $fkConstraint) { + $options['foreignKeys'][] = $fkConstraint; + } + } + + if (null !== $this->_eventManager && $this->_eventManager->hasListeners(Events::onSchemaCreateTable)) { + $eventArgs = new SchemaCreateTableEventArgs($table, $columns, $options, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaCreateTable, $eventArgs); + + if ($eventArgs->isDefaultPrevented()) { + return array_merge($eventArgs->getSql(), $columnSql); + } + } + + $sql = $this->_getCreateTableSQL($tableName, $columns, $options); + if ($this->supportsCommentOnStatement()) { + foreach ($table->getColumns() as $column) { + $comment = $this->getColumnComment($column); + + if (null !== $comment && '' !== $comment) { + $sql[] = $this->getCommentOnColumnSQL($tableName, $column->getQuotedName($this), $comment); + } + } + } + + return array_merge($sql, $columnSql); + } + + /** + * @param string $tableName + * @param string $columnName + * @param string $comment + * + * @return string + */ + public function getCommentOnColumnSQL($tableName, $columnName, $comment) + { + $tableName = new Identifier($tableName); + $columnName = new Identifier($columnName); + $comment = $this->quoteStringLiteral($comment); + + return "COMMENT ON COLUMN " . $tableName->getQuotedName($this) . "." . $columnName->getQuotedName($this) . + " IS " . $comment; + } + + /** + * Returns the SQL used to create a table. + * + * @param string $tableName + * @param array $columns + * @param array $options + * + * @return array + */ + protected function _getCreateTableSQL($tableName, array $columns, array $options = array()) + { + $columnListSql = $this->getColumnDeclarationListSQL($columns); + + if (isset($options['uniqueConstraints']) && ! empty($options['uniqueConstraints'])) { + foreach ($options['uniqueConstraints'] as $name => $definition) { + $columnListSql .= ', ' . $this->getUniqueConstraintDeclarationSQL($name, $definition); + } + } + + if (isset($options['primary']) && ! empty($options['primary'])) { + $columnListSql .= ', PRIMARY KEY(' . implode(', ', array_unique(array_values($options['primary']))) . ')'; + } + + if (isset($options['indexes']) && ! empty($options['indexes'])) { + foreach ($options['indexes'] as $index => $definition) { + $columnListSql .= ', ' . $this->getIndexDeclarationSQL($index, $definition); + } + } + + $query = 'CREATE TABLE ' . $tableName . ' (' . $columnListSql; + + $check = $this->getCheckDeclarationSQL($columns); + if ( ! empty($check)) { + $query .= ', ' . $check; + } + $query .= ')'; + + $sql[] = $query; + + if (isset($options['foreignKeys'])) { + foreach ((array) $options['foreignKeys'] as $definition) { + $sql[] = $this->getCreateForeignKeySQL($definition, $tableName); + } + } + + return $sql; + } + + /** + * @return string + */ + public function getCreateTemporaryTableSnippetSQL() + { + return "CREATE TEMPORARY TABLE"; + } + + /** + * Returns the SQL to create a sequence on this platform. + * + * @param \Doctrine\DBAL\Schema\Sequence $sequence + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getCreateSequenceSQL(Sequence $sequence) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the SQL to change a sequence on this platform. + * + * @param \Doctrine\DBAL\Schema\Sequence $sequence + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getAlterSequenceSQL(Sequence $sequence) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the SQL to create a constraint on a table on this platform. + * + * @param \Doctrine\DBAL\Schema\Constraint $constraint + * @param \Doctrine\DBAL\Schema\Table|string $table + * + * @return string + * + * @throws \InvalidArgumentException + */ + public function getCreateConstraintSQL(Constraint $constraint, $table) + { + if ($table instanceof Table) { + $table = $table->getQuotedName($this); + } + + $query = 'ALTER TABLE ' . $table . ' ADD CONSTRAINT ' . $constraint->getQuotedName($this); + + $columnList = '('. implode(', ', $constraint->getQuotedColumns($this)) . ')'; + + $referencesClause = ''; + if ($constraint instanceof Index) { + if ($constraint->isPrimary()) { + $query .= ' PRIMARY KEY'; + } elseif ($constraint->isUnique()) { + $query .= ' UNIQUE'; + } else { + throw new \InvalidArgumentException( + 'Can only create primary or unique constraints, no common indexes with getCreateConstraintSQL().' + ); + } + } elseif ($constraint instanceof ForeignKeyConstraint) { + $query .= ' FOREIGN KEY'; + + $referencesClause = ' REFERENCES ' . $constraint->getQuotedForeignTableName($this) . + ' (' . implode(', ', $constraint->getQuotedForeignColumns($this)) . ')'; + } + $query .= ' '.$columnList.$referencesClause; + + return $query; + } + + /** + * Returns the SQL to create an index on a table on this platform. + * + * @param \Doctrine\DBAL\Schema\Index $index + * @param \Doctrine\DBAL\Schema\Table|string $table The name of the table on which the index is to be created. + * + * @return string + * + * @throws \InvalidArgumentException + */ + public function getCreateIndexSQL(Index $index, $table) + { + if ($table instanceof Table) { + $table = $table->getQuotedName($this); + } + $name = $index->getQuotedName($this); + $columns = $index->getQuotedColumns($this); + + if (count($columns) == 0) { + throw new \InvalidArgumentException("Incomplete definition. 'columns' required."); + } + + if ($index->isPrimary()) { + return $this->getCreatePrimaryKeySQL($index, $table); + } + + $query = 'CREATE ' . $this->getCreateIndexSQLFlags($index) . 'INDEX ' . $name . ' ON ' . $table; + $query .= ' (' . $this->getIndexFieldDeclarationListSQL($columns) . ')' . $this->getPartialIndexSQL($index); + + return $query; + } + + /** + * Adds condition for partial index. + * + * @param \Doctrine\DBAL\Schema\Index $index + * + * @return string + */ + protected function getPartialIndexSQL(Index $index) + { + if ($this->supportsPartialIndexes() && $index->hasOption('where')) { + return ' WHERE ' . $index->getOption('where'); + } + + return ''; + } + + /** + * Adds additional flags for index generation. + * + * @param \Doctrine\DBAL\Schema\Index $index + * + * @return string + */ + protected function getCreateIndexSQLFlags(Index $index) + { + return $index->isUnique() ? 'UNIQUE ' : ''; + } + + /** + * Returns the SQL to create an unnamed primary key constraint. + * + * @param \Doctrine\DBAL\Schema\Index $index + * @param \Doctrine\DBAL\Schema\Table|string $table + * + * @return string + */ + public function getCreatePrimaryKeySQL(Index $index, $table) + { + return 'ALTER TABLE ' . $table . ' ADD PRIMARY KEY (' . $this->getIndexFieldDeclarationListSQL($index->getQuotedColumns($this)) . ')'; + } + + /** + * Returns the SQL to create a named schema. + * + * @param string $schemaName + * + * @return string + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getCreateSchemaSQL($schemaName) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Quotes a string so that it can be safely used as a table or column name, + * even if it is a reserved word of the platform. This also detects identifier + * chains separated by dot and quotes them independently. + * + * NOTE: Just because you CAN use quoted identifiers doesn't mean + * you SHOULD use them. In general, they end up causing way more + * problems than they solve. + * + * @param string $str The identifier name to be quoted. + * + * @return string The quoted identifier string. + */ + public function quoteIdentifier($str) + { + if (strpos($str, ".") !== false) { + $parts = array_map(array($this, "quoteSingleIdentifier"), explode(".", $str)); + + return implode(".", $parts); + } + + return $this->quoteSingleIdentifier($str); + } + + /** + * Quotes a single identifier (no dot chain separation). + * + * @param string $str The identifier name to be quoted. + * + * @return string The quoted identifier string. + */ + public function quoteSingleIdentifier($str) + { + $c = $this->getIdentifierQuoteCharacter(); + + return $c . str_replace($c, $c.$c, $str) . $c; + } + + /** + * Returns the SQL to create a new foreign key. + * + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey The foreign key constraint. + * @param \Doctrine\DBAL\Schema\Table|string $table The name of the table on which the foreign key is to be created. + * + * @return string + */ + public function getCreateForeignKeySQL(ForeignKeyConstraint $foreignKey, $table) + { + if ($table instanceof Table) { + $table = $table->getQuotedName($this); + } + + $query = 'ALTER TABLE ' . $table . ' ADD ' . $this->getForeignKeyDeclarationSQL($foreignKey); + + return $query; + } + + /** + * Gets the SQL statements for altering an existing table. + * + * This method returns an array of SQL statements, since some platforms need several statements. + * + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * + * @return array + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getAlterTableSQL(TableDiff $diff) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * @param \Doctrine\DBAL\Schema\Column $column + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * @param array $columnSql + * + * @return boolean + */ + protected function onSchemaAlterTableAddColumn(Column $column, TableDiff $diff, &$columnSql) + { + if (null === $this->_eventManager) { + return false; + } + + if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableAddColumn)) { + return false; + } + + $eventArgs = new SchemaAlterTableAddColumnEventArgs($column, $diff, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaAlterTableAddColumn, $eventArgs); + + $columnSql = array_merge($columnSql, $eventArgs->getSql()); + + return $eventArgs->isDefaultPrevented(); + } + + /** + * @param \Doctrine\DBAL\Schema\Column $column + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * @param array $columnSql + * + * @return boolean + */ + protected function onSchemaAlterTableRemoveColumn(Column $column, TableDiff $diff, &$columnSql) + { + if (null === $this->_eventManager) { + return false; + } + + if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableRemoveColumn)) { + return false; + } + + $eventArgs = new SchemaAlterTableRemoveColumnEventArgs($column, $diff, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaAlterTableRemoveColumn, $eventArgs); + + $columnSql = array_merge($columnSql, $eventArgs->getSql()); + + return $eventArgs->isDefaultPrevented(); + } + + /** + * @param \Doctrine\DBAL\Schema\ColumnDiff $columnDiff + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * @param array $columnSql + * + * @return boolean + */ + protected function onSchemaAlterTableChangeColumn(ColumnDiff $columnDiff, TableDiff $diff, &$columnSql) + { + if (null === $this->_eventManager) { + return false; + } + + if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableChangeColumn)) { + return false; + } + + $eventArgs = new SchemaAlterTableChangeColumnEventArgs($columnDiff, $diff, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaAlterTableChangeColumn, $eventArgs); + + $columnSql = array_merge($columnSql, $eventArgs->getSql()); + + return $eventArgs->isDefaultPrevented(); + } + + /** + * @param string $oldColumnName + * @param \Doctrine\DBAL\Schema\Column $column + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * @param array $columnSql + * + * @return boolean + */ + protected function onSchemaAlterTableRenameColumn($oldColumnName, Column $column, TableDiff $diff, &$columnSql) + { + if (null === $this->_eventManager) { + return false; + } + + if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTableRenameColumn)) { + return false; + } + + $eventArgs = new SchemaAlterTableRenameColumnEventArgs($oldColumnName, $column, $diff, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaAlterTableRenameColumn, $eventArgs); + + $columnSql = array_merge($columnSql, $eventArgs->getSql()); + + return $eventArgs->isDefaultPrevented(); + } + + /** + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * @param array $sql + * + * @return boolean + */ + protected function onSchemaAlterTable(TableDiff $diff, &$sql) + { + if (null === $this->_eventManager) { + return false; + } + + if ( ! $this->_eventManager->hasListeners(Events::onSchemaAlterTable)) { + return false; + } + + $eventArgs = new SchemaAlterTableEventArgs($diff, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaAlterTable, $eventArgs); + + $sql = array_merge($sql, $eventArgs->getSql()); + + return $eventArgs->isDefaultPrevented(); + } + + /** + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * + * @return array + */ + protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff) + { + $tableName = $diff->getName($this)->getQuotedName($this); + + $sql = array(); + if ($this->supportsForeignKeyConstraints()) { + foreach ($diff->removedForeignKeys as $foreignKey) { + $sql[] = $this->getDropForeignKeySQL($foreignKey, $tableName); + } + foreach ($diff->changedForeignKeys as $foreignKey) { + $sql[] = $this->getDropForeignKeySQL($foreignKey, $tableName); + } + } + + foreach ($diff->removedIndexes as $index) { + $sql[] = $this->getDropIndexSQL($index, $tableName); + } + foreach ($diff->changedIndexes as $index) { + $sql[] = $this->getDropIndexSQL($index, $tableName); + } + + return $sql; + } + + /** + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * + * @return array + */ + protected function getPostAlterTableIndexForeignKeySQL(TableDiff $diff) + { + $tableName = (false !== $diff->newName) + ? $diff->getNewName()->getQuotedName($this) + : $diff->getName($this)->getQuotedName($this); + + $sql = array(); + + if ($this->supportsForeignKeyConstraints()) { + foreach ($diff->addedForeignKeys as $foreignKey) { + $sql[] = $this->getCreateForeignKeySQL($foreignKey, $tableName); + } + + foreach ($diff->changedForeignKeys as $foreignKey) { + $sql[] = $this->getCreateForeignKeySQL($foreignKey, $tableName); + } + } + + foreach ($diff->addedIndexes as $index) { + $sql[] = $this->getCreateIndexSQL($index, $tableName); + } + + foreach ($diff->changedIndexes as $index) { + $sql[] = $this->getCreateIndexSQL($index, $tableName); + } + + foreach ($diff->renamedIndexes as $oldIndexName => $index) { + $oldIndexName = new Identifier($oldIndexName); + $sql = array_merge( + $sql, + $this->getRenameIndexSQL($oldIndexName->getQuotedName($this), $index, $tableName) + ); + } + + return $sql; + } + + /** + * Returns the SQL for renaming an index on a table. + * + * @param string $oldIndexName The name of the index to rename from. + * @param \Doctrine\DBAL\Schema\Index $index The definition of the index to rename to. + * @param string $tableName The table to rename the given index on. + * + * @return array The sequence of SQL statements for renaming the given index. + */ + protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName) + { + return array( + $this->getDropIndexSQL($oldIndexName, $tableName), + $this->getCreateIndexSQL($index, $tableName) + ); + } + + /** + * Common code for alter table statement generation that updates the changed Index and Foreign Key definitions. + * + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * + * @return array + */ + protected function _getAlterTableIndexForeignKeySQL(TableDiff $diff) + { + return array_merge($this->getPreAlterTableIndexForeignKeySQL($diff), $this->getPostAlterTableIndexForeignKeySQL($diff)); + } + + /** + * Gets declaration of a number of fields in bulk. + * + * @param array $fields A multidimensional associative array. + * The first dimension determines the field name, while the second + * dimension is keyed with the name of the properties + * of the field being declared as array indexes. Currently, the types + * of supported field properties are as follows: + * + * length + * Integer value that determines the maximum length of the text + * field. If this argument is missing the field should be + * declared to have the longest length allowed by the DBMS. + * + * default + * Text value to be used as default for this field. + * + * notnull + * Boolean flag that indicates whether this field is constrained + * to not be set to null. + * charset + * Text value with the default CHARACTER SET for this field. + * collation + * Text value with the default COLLATION for this field. + * unique + * unique constraint + * + * @return string + */ + public function getColumnDeclarationListSQL(array $fields) + { + $queryFields = array(); + + foreach ($fields as $fieldName => $field) { + $queryFields[] = $this->getColumnDeclarationSQL($fieldName, $field); + } + + return implode(', ', $queryFields); + } + + /** + * Obtains DBMS specific SQL code portion needed to declare a generic type + * field to be used in statements like CREATE TABLE. + * + * @param string $name The name the field to be declared. + * @param array $field An associative array with the name of the properties + * of the field being declared as array indexes. Currently, the types + * of supported field properties are as follows: + * + * length + * Integer value that determines the maximum length of the text + * field. If this argument is missing the field should be + * declared to have the longest length allowed by the DBMS. + * + * default + * Text value to be used as default for this field. + * + * notnull + * Boolean flag that indicates whether this field is constrained + * to not be set to null. + * charset + * Text value with the default CHARACTER SET for this field. + * collation + * Text value with the default COLLATION for this field. + * unique + * unique constraint + * check + * column check constraint + * columnDefinition + * a string that defines the complete column + * + * @return string DBMS specific SQL code portion that should be used to declare the column. + */ + public function getColumnDeclarationSQL($name, array $field) + { + if (isset($field['columnDefinition'])) { + $columnDef = $this->getCustomTypeDeclarationSQL($field); + } else { + $default = $this->getDefaultValueDeclarationSQL($field); + + $charset = (isset($field['charset']) && $field['charset']) ? + ' ' . $this->getColumnCharsetDeclarationSQL($field['charset']) : ''; + + $collation = (isset($field['collation']) && $field['collation']) ? + ' ' . $this->getColumnCollationDeclarationSQL($field['collation']) : ''; + + $notnull = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : ''; + + $unique = (isset($field['unique']) && $field['unique']) ? + ' ' . $this->getUniqueFieldDeclarationSQL() : ''; + + $check = (isset($field['check']) && $field['check']) ? + ' ' . $field['check'] : ''; + + $typeDecl = $field['type']->getSqlDeclaration($field, $this); + $columnDef = $typeDecl . $charset . $default . $notnull . $unique . $check . $collation; + } + + if ($this->supportsInlineColumnComments() && isset($field['comment']) && $field['comment'] !== '') { + $columnDef .= " COMMENT " . $this->quoteStringLiteral($field['comment']); + } + + return $name . ' ' . $columnDef; + } + + /** + * Returns the SQL snippet that declares a floating point column of arbitrary precision. + * + * @param array $columnDef + * + * @return string + */ + public function getDecimalTypeDeclarationSQL(array $columnDef) + { + $columnDef['precision'] = ( ! isset($columnDef['precision']) || empty($columnDef['precision'])) + ? 10 : $columnDef['precision']; + $columnDef['scale'] = ( ! isset($columnDef['scale']) || empty($columnDef['scale'])) + ? 0 : $columnDef['scale']; + + return 'NUMERIC(' . $columnDef['precision'] . ', ' . $columnDef['scale'] . ')'; + } + + /** + * Obtains DBMS specific SQL code portion needed to set a default value + * declaration to be used in statements like CREATE TABLE. + * + * @param array $field The field definition array. + * + * @return string DBMS specific SQL code portion needed to set a default value. + */ + public function getDefaultValueDeclarationSQL($field) + { + $default = empty($field['notnull']) ? ' DEFAULT NULL' : ''; + + if (isset($field['default'])) { + $default = " DEFAULT '".$field['default']."'"; + if (isset($field['type'])) { + if (in_array((string) $field['type'], array("Integer", "BigInt", "SmallInt"))) { + $default = " DEFAULT ".$field['default']; + } elseif (in_array((string) $field['type'], array('DateTime', 'DateTimeTz')) && $field['default'] == $this->getCurrentTimestampSQL()) { + $default = " DEFAULT ".$this->getCurrentTimestampSQL(); + } elseif ((string) $field['type'] == 'Time' && $field['default'] == $this->getCurrentTimeSQL()) { + $default = " DEFAULT ".$this->getCurrentTimeSQL(); + } elseif ((string) $field['type'] == 'Date' && $field['default'] == $this->getCurrentDateSQL()) { + $default = " DEFAULT ".$this->getCurrentDateSQL(); + } elseif ((string) $field['type'] == 'Boolean') { + $default = " DEFAULT '" . $this->convertBooleans($field['default']) . "'"; + } + } + } + + return $default; + } + + /** + * Obtains DBMS specific SQL code portion needed to set a CHECK constraint + * declaration to be used in statements like CREATE TABLE. + * + * @param array $definition The check definition. + * + * @return string DBMS specific SQL code portion needed to set a CHECK constraint. + */ + public function getCheckDeclarationSQL(array $definition) + { + $constraints = array(); + foreach ($definition as $field => $def) { + if (is_string($def)) { + $constraints[] = 'CHECK (' . $def . ')'; + } else { + if (isset($def['min'])) { + $constraints[] = 'CHECK (' . $field . ' >= ' . $def['min'] . ')'; + } + + if (isset($def['max'])) { + $constraints[] = 'CHECK (' . $field . ' <= ' . $def['max'] . ')'; + } + } + } + + return implode(', ', $constraints); + } + + /** + * Obtains DBMS specific SQL code portion needed to set a unique + * constraint declaration to be used in statements like CREATE TABLE. + * + * @param string $name The name of the unique constraint. + * @param \Doctrine\DBAL\Schema\Index $index The index definition. + * + * @return string DBMS specific SQL code portion needed to set a constraint. + * + * @throws \InvalidArgumentException + */ + public function getUniqueConstraintDeclarationSQL($name, Index $index) + { + $columns = $index->getQuotedColumns($this); + $name = new Identifier($name); + + if (count($columns) === 0) { + throw new \InvalidArgumentException("Incomplete definition. 'columns' required."); + } + + return 'CONSTRAINT ' . $name->getQuotedName($this) . ' UNIQUE (' + . $this->getIndexFieldDeclarationListSQL($columns) + . ')' . $this->getPartialIndexSQL($index); + } + + /** + * Obtains DBMS specific SQL code portion needed to set an index + * declaration to be used in statements like CREATE TABLE. + * + * @param string $name The name of the index. + * @param \Doctrine\DBAL\Schema\Index $index The index definition. + * + * @return string DBMS specific SQL code portion needed to set an index. + * + * @throws \InvalidArgumentException + */ + public function getIndexDeclarationSQL($name, Index $index) + { + $columns = $index->getQuotedColumns($this); + $name = new Identifier($name); + + if (count($columns) === 0) { + throw new \InvalidArgumentException("Incomplete definition. 'columns' required."); + } + + return $this->getCreateIndexSQLFlags($index) . 'INDEX ' . $name->getQuotedName($this) . ' (' + . $this->getIndexFieldDeclarationListSQL($columns) + . ')' . $this->getPartialIndexSQL($index); + } + + /** + * Obtains SQL code portion needed to create a custom column, + * e.g. when a field has the "columnDefinition" keyword. + * Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate. + * + * @param array $columnDef + * + * @return string + */ + public function getCustomTypeDeclarationSQL(array $columnDef) + { + return $columnDef['columnDefinition']; + } + + /** + * Obtains DBMS specific SQL code portion needed to set an index + * declaration to be used in statements like CREATE TABLE. + * + * @param array $fields + * + * @return string + */ + public function getIndexFieldDeclarationListSQL(array $fields) + { + $ret = array(); + + foreach ($fields as $field => $definition) { + if (is_array($definition)) { + $ret[] = $field; + } else { + $ret[] = $definition; + } + } + + return implode(', ', $ret); + } + + /** + * Returns the required SQL string that fits between CREATE ... TABLE + * to create the table as a temporary table. + * + * Should be overridden in driver classes to return the correct string for the + * specific database type. + * + * The default is to return the string "TEMPORARY" - this will result in a + * SQL error for any database that does not support temporary tables, or that + * requires a different SQL command from "CREATE TEMPORARY TABLE". + * + * @return string The string required to be placed between "CREATE" and "TABLE" + * to generate a temporary table, if possible. + */ + public function getTemporaryTableSQL() + { + return 'TEMPORARY'; + } + + /** + * Some vendors require temporary table names to be qualified specially. + * + * @param string $tableName + * + * @return string + */ + public function getTemporaryTableName($tableName) + { + return $tableName; + } + + /** + * Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint + * of a field declaration to be used in statements like CREATE TABLE. + * + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey + * + * @return string DBMS specific SQL code portion needed to set the FOREIGN KEY constraint + * of a field declaration. + */ + public function getForeignKeyDeclarationSQL(ForeignKeyConstraint $foreignKey) + { + $sql = $this->getForeignKeyBaseDeclarationSQL($foreignKey); + $sql .= $this->getAdvancedForeignKeyOptionsSQL($foreignKey); + + return $sql; + } + + /** + * Returns the FOREIGN KEY query section dealing with non-standard options + * as MATCH, INITIALLY DEFERRED, ON UPDATE, ... + * + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey The foreign key definition. + * + * @return string + */ + public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey) + { + $query = ''; + if ($this->supportsForeignKeyOnUpdate() && $foreignKey->hasOption('onUpdate')) { + $query .= ' ON UPDATE ' . $this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onUpdate')); + } + if ($foreignKey->hasOption('onDelete')) { + $query .= ' ON DELETE ' . $this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onDelete')); + } + + return $query; + } + + /** + * Returns the given referential action in uppercase if valid, otherwise throws an exception. + * + * @param string $action The foreign key referential action. + * + * @return string + * + * @throws \InvalidArgumentException if unknown referential action given + */ + public function getForeignKeyReferentialActionSQL($action) + { + $upper = strtoupper($action); + switch ($upper) { + case 'CASCADE': + case 'SET NULL': + case 'NO ACTION': + case 'RESTRICT': + case 'SET DEFAULT': + return $upper; + default: + throw new \InvalidArgumentException('Invalid foreign key action: ' . $upper); + } + } + + /** + * Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint + * of a field declaration to be used in statements like CREATE TABLE. + * + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey + * + * @return string + * + * @throws \InvalidArgumentException + */ + public function getForeignKeyBaseDeclarationSQL(ForeignKeyConstraint $foreignKey) + { + $sql = ''; + if (strlen($foreignKey->getName())) { + $sql .= 'CONSTRAINT ' . $foreignKey->getQuotedName($this) . ' '; + } + $sql .= 'FOREIGN KEY ('; + + if (count($foreignKey->getLocalColumns()) === 0) { + throw new \InvalidArgumentException("Incomplete definition. 'local' required."); + } + if (count($foreignKey->getForeignColumns()) === 0) { + throw new \InvalidArgumentException("Incomplete definition. 'foreign' required."); + } + if (strlen($foreignKey->getForeignTableName()) === 0) { + throw new \InvalidArgumentException("Incomplete definition. 'foreignTable' required."); + } + + $sql .= implode(', ', $foreignKey->getQuotedLocalColumns($this)) + . ') REFERENCES ' + . $foreignKey->getQuotedForeignTableName($this) . ' (' + . implode(', ', $foreignKey->getQuotedForeignColumns($this)) . ')'; + + return $sql; + } + + /** + * Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint + * of a field declaration to be used in statements like CREATE TABLE. + * + * @return string DBMS specific SQL code portion needed to set the UNIQUE constraint + * of a field declaration. + */ + public function getUniqueFieldDeclarationSQL() + { + return 'UNIQUE'; + } + + /** + * Obtains DBMS specific SQL code portion needed to set the CHARACTER SET + * of a field declaration to be used in statements like CREATE TABLE. + * + * @param string $charset The name of the charset. + * + * @return string DBMS specific SQL code portion needed to set the CHARACTER SET + * of a field declaration. + */ + public function getColumnCharsetDeclarationSQL($charset) + { + return ''; + } + + /** + * Obtains DBMS specific SQL code portion needed to set the COLLATION + * of a field declaration to be used in statements like CREATE TABLE. + * + * @param string $collation The name of the collation. + * + * @return string DBMS specific SQL code portion needed to set the COLLATION + * of a field declaration. + */ + public function getColumnCollationDeclarationSQL($collation) + { + return $this->supportsColumnCollation() ? 'COLLATE ' . $collation : ''; + } + + /** + * Whether the platform prefers sequences for ID generation. + * Subclasses should override this method to return TRUE if they prefer sequences. + * + * @return boolean + */ + public function prefersSequences() + { + return false; + } + + /** + * Whether the platform prefers identity columns (eg. autoincrement) for ID generation. + * Subclasses should override this method to return TRUE if they prefer identity columns. + * + * @return boolean + */ + public function prefersIdentityColumns() + { + return false; + } + + /** + * Some platforms need the boolean values to be converted. + * + * The default conversion in this implementation converts to integers (false => 0, true => 1). + * + * Note: if the input is not a boolean the original input might be returned. + * + * There are two contexts when converting booleans: Literals and Prepared Statements. + * This method should handle the literal case + * + * @param mixed $item A boolean or an array of them. + * + * @return mixed A boolean database value or an array of them. + */ + public function convertBooleans($item) + { + if (is_array($item)) { + foreach ($item as $k => $value) { + if (is_bool($value)) { + $item[$k] = (int) $value; + } + } + } elseif (is_bool($item)) { + $item = (int) $item; + } + + return $item; + } + + /** + * Some platforms have boolean literals that needs to be correctly converted + * + * The default conversion tries to convert value into bool "(bool)$item" + * + * @param mixed $item + * + * @return bool|null + */ + public function convertFromBoolean($item) + { + return null === $item ? null: (bool) $item ; + } + + /** + * This method should handle the prepared statements case. When there is no + * distinction, it's OK to use the same method. + * + * Note: if the input is not a boolean the original input might be returned. + * + * @param mixed $item A boolean or an array of them. + * + * @return mixed A boolean database value or an array of them. + */ + public function convertBooleansToDatabaseValue($item) + { + return $this->convertBooleans($item); + } + + /** + * Returns the SQL specific for the platform to get the current date. + * + * @return string + */ + public function getCurrentDateSQL() + { + return 'CURRENT_DATE'; + } + + /** + * Returns the SQL specific for the platform to get the current time. + * + * @return string + */ + public function getCurrentTimeSQL() + { + return 'CURRENT_TIME'; + } + + /** + * Returns the SQL specific for the platform to get the current timestamp + * + * @return string + */ + public function getCurrentTimestampSQL() + { + return 'CURRENT_TIMESTAMP'; + } + + /** + * Returns the SQL for a given transaction isolation level Connection constant. + * + * @param integer $level + * + * @return string + * + * @throws \InvalidArgumentException + */ + protected function _getTransactionIsolationLevelSQL($level) + { + switch ($level) { + case Connection::TRANSACTION_READ_UNCOMMITTED: + return 'READ UNCOMMITTED'; + case Connection::TRANSACTION_READ_COMMITTED: + return 'READ COMMITTED'; + case Connection::TRANSACTION_REPEATABLE_READ: + return 'REPEATABLE READ'; + case Connection::TRANSACTION_SERIALIZABLE: + return 'SERIALIZABLE'; + default: + throw new \InvalidArgumentException('Invalid isolation level:' . $level); + } + } + + /** + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getListDatabasesSQL() + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the SQL statement for retrieving the namespaces defined in the database. + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getListNamespacesSQL() + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * @param string $database + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getListSequencesSQL($database) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * @param string $table + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getListTableConstraintsSQL($table) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * @param string $table + * @param string|null $database + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getListTableColumnsSQL($table, $database = null) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getListTablesSQL() + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getListUsersSQL() + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the SQL to list all views of a database or user. + * + * @param string $database + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getListViewsSQL($database) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the list of indexes for the current database. + * + * The current database parameter is optional but will always be passed + * when using the SchemaManager API and is the database the given table is in. + * + * Attention: Some platforms only support currentDatabase when they + * are connected with that database. Cross-database information schema + * requests may be impossible. + * + * @param string $table + * @param string $currentDatabase + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getListTableIndexesSQL($table, $currentDatabase = null) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * @param string $table + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getListTableForeignKeysSQL($table) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * @param string $name + * @param string $sql + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getCreateViewSQL($name, $sql) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * @param string $name + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDropViewSQL($name) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the SQL snippet to drop an existing sequence. + * + * @param Sequence|string $sequence + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDropSequenceSQL($sequence) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * @param string $sequenceName + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getSequenceNextValSQL($sequenceName) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the SQL to create a new database. + * + * @param string $database The name of the database that should be created. + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getCreateDatabaseSQL($database) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Returns the SQL to set the transaction isolation level. + * + * @param integer $level + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getSetTransactionIsolationSQL($level) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Obtains DBMS specific SQL to be used to create datetime fields in + * statements like CREATE TABLE. + * + * @param array $fieldDeclaration + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Obtains DBMS specific SQL to be used to create datetime with timezone offset fields. + * + * @param array $fieldDeclaration + * + * @return string + */ + public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) + { + return $this->getDateTimeTypeDeclarationSQL($fieldDeclaration); + } + + + /** + * Obtains DBMS specific SQL to be used to create date fields in statements + * like CREATE TABLE. + * + * @param array $fieldDeclaration + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDateTypeDeclarationSQL(array $fieldDeclaration) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Obtains DBMS specific SQL to be used to create time fields in statements + * like CREATE TABLE. + * + * @param array $fieldDeclaration + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * @param array $fieldDeclaration + * + * @return string + */ + public function getFloatDeclarationSQL(array $fieldDeclaration) + { + return 'DOUBLE PRECISION'; + } + + /** + * Gets the default transaction isolation level of the platform. + * + * @return integer The default isolation level. + * + * @see Doctrine\DBAL\Connection\TRANSACTION_* constants. + */ + public function getDefaultTransactionIsolationLevel() + { + return Connection::TRANSACTION_READ_COMMITTED; + } + + /* supports*() methods */ + + /** + * Whether the platform supports sequences. + * + * @return boolean + */ + public function supportsSequences() + { + return false; + } + + /** + * Whether the platform supports identity columns. + * + * Identity columns are columns that receive an auto-generated value from the + * database on insert of a row. + * + * @return boolean + */ + public function supportsIdentityColumns() + { + return false; + } + + /** + * Whether the platform emulates identity columns through sequences. + * + * Some platforms that do not support identity columns natively + * but support sequences can emulate identity columns by using + * sequences. + * + * @return boolean + */ + public function usesSequenceEmulatedIdentityColumns() + { + return false; + } + + /** + * Returns the name of the sequence for a particular identity column in a particular table. + * + * @param string $tableName The name of the table to return the sequence name for. + * @param string $columnName The name of the identity column in the table to return the sequence name for. + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + * + * @see usesSequenceEmulatedIdentityColumns + */ + public function getIdentitySequenceName($tableName, $columnName) + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Whether the platform supports indexes. + * + * @return boolean + */ + public function supportsIndexes() + { + return true; + } + + /** + * Whether the platform supports partial indexes. + * + * @return boolean + */ + public function supportsPartialIndexes() + { + return false; + } + + /** + * Whether the platform supports altering tables. + * + * @return boolean + */ + public function supportsAlterTable() + { + return true; + } + + /** + * Whether the platform supports transactions. + * + * @return boolean + */ + public function supportsTransactions() + { + return true; + } + + /** + * Whether the platform supports savepoints. + * + * @return boolean + */ + public function supportsSavepoints() + { + return true; + } + + /** + * Whether the platform supports releasing savepoints. + * + * @return boolean + */ + public function supportsReleaseSavepoints() + { + return $this->supportsSavepoints(); + } + + /** + * Whether the platform supports primary key constraints. + * + * @return boolean + */ + public function supportsPrimaryConstraints() + { + return true; + } + + /** + * Whether the platform supports foreign key constraints. + * + * @return boolean + */ + public function supportsForeignKeyConstraints() + { + return true; + } + + /** + * Whether this platform supports onUpdate in foreign key constraints. + * + * @return boolean + */ + public function supportsForeignKeyOnUpdate() + { + return ($this->supportsForeignKeyConstraints() && true); + } + + /** + * Whether the platform supports database schemas. + * + * @return boolean + */ + public function supportsSchemas() + { + return false; + } + + /** + * Whether this platform can emulate schemas. + * + * Platforms that either support or emulate schemas don't automatically + * filter a schema for the namespaced elements in {@link + * AbstractManager#createSchema}. + * + * @return boolean + */ + public function canEmulateSchemas() + { + return false; + } + + /** + * Returns the default schema name. + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + public function getDefaultSchemaName() + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Whether this platform supports create database. + * + * Some databases don't allow to create and drop databases at all or only with certain tools. + * + * @return boolean + */ + public function supportsCreateDropDatabase() + { + return true; + } + + /** + * Whether the platform supports getting the affected rows of a recent update/delete type query. + * + * @return boolean + */ + public function supportsGettingAffectedRows() + { + return true; + } + + /** + * Whether this platform support to add inline column comments as postfix. + * + * @return boolean + */ + public function supportsInlineColumnComments() + { + return false; + } + + /** + * Whether this platform support the proprietary syntax "COMMENT ON asset". + * + * @return boolean + */ + public function supportsCommentOnStatement() + { + return false; + } + + /** + * Does this platform have native guid type. + * + * @return boolean + */ + public function hasNativeGuidType() + { + return false; + } + + /** + * Does this platform have native JSON type. + * + * @return boolean + */ + public function hasNativeJsonType() + { + return false; + } + + /** + * @deprecated + * @todo Remove in 3.0 + */ + public function getIdentityColumnNullInsertSQL() + { + return ""; + } + + /** + * Whether this platform supports views. + * + * @return boolean + */ + public function supportsViews() + { + return true; + } + + /** + * Does this platform support column collation? + * + * @return boolean + */ + public function supportsColumnCollation() + { + return false; + } + + /** + * Gets the format string, as accepted by the date() function, that describes + * the format of a stored datetime value of this platform. + * + * @return string The format string. + */ + public function getDateTimeFormatString() + { + return 'Y-m-d H:i:s'; + } + + /** + * Gets the format string, as accepted by the date() function, that describes + * the format of a stored datetime with timezone value of this platform. + * + * @return string The format string. + */ + public function getDateTimeTzFormatString() + { + return 'Y-m-d H:i:s'; + } + + /** + * Gets the format string, as accepted by the date() function, that describes + * the format of a stored date value of this platform. + * + * @return string The format string. + */ + public function getDateFormatString() + { + return 'Y-m-d'; + } + + /** + * Gets the format string, as accepted by the date() function, that describes + * the format of a stored time value of this platform. + * + * @return string The format string. + */ + public function getTimeFormatString() + { + return 'H:i:s'; + } + + /** + * Adds an driver-specific LIMIT clause to the query. + * + * @param string $query + * @param integer|null $limit + * @param integer|null $offset + * + * @return string + * + * @throws DBALException + */ + final public function modifyLimitQuery($query, $limit, $offset = null) + { + if ($limit !== null) { + $limit = (int) $limit; + } + + if ($offset !== null) { + $offset = (int) $offset; + + if ($offset < 0) { + throw new DBALException("LIMIT argument offset=$offset is not valid"); + } + if ($offset > 0 && ! $this->supportsLimitOffset()) { + throw new DBALException(sprintf("Platform %s does not support offset values in limit queries.", $this->getName())); + } + } + + return $this->doModifyLimitQuery($query, $limit, $offset); + } + + /** + * Adds an driver-specific LIMIT clause to the query. + * + * @param string $query + * @param integer|null $limit + * @param integer|null $offset + * + * @return string + */ + protected function doModifyLimitQuery($query, $limit, $offset) + { + if ($limit !== null) { + $query .= ' LIMIT ' . $limit; + } + + if ($offset !== null) { + $query .= ' OFFSET ' . $offset; + } + + return $query; + } + + /** + * Whether the database platform support offsets in modify limit clauses. + * + * @return boolean + */ + public function supportsLimitOffset() + { + return true; + } + + /** + * Gets the character casing of a column in an SQL result set of this platform. + * + * @param string $column The column name for which to get the correct character casing. + * + * @return string The column name in the character casing used in SQL result sets. + */ + public function getSQLResultCasing($column) + { + return $column; + } + + /** + * Makes any fixes to a name of a schema element (table, sequence, ...) that are required + * by restrictions of the platform, like a maximum length. + * + * @param string $schemaElementName + * + * @return string + */ + public function fixSchemaElementName($schemaElementName) + { + return $schemaElementName; + } + + /** + * Maximum length of any given database identifier, like tables or column names. + * + * @return integer + */ + public function getMaxIdentifierLength() + { + return 63; + } + + /** + * Returns the insert SQL for an empty insert statement. + * + * @param string $tableName + * @param string $identifierColumnName + * + * @return string + */ + public function getEmptyIdentityInsertSQL($tableName, $identifierColumnName) + { + return 'INSERT INTO ' . $tableName . ' (' . $identifierColumnName . ') VALUES (null)'; + } + + /** + * Generates a Truncate Table SQL statement for a given table. + * + * Cascade is not supported on many platforms but would optionally cascade the truncate by + * following the foreign keys. + * + * @param string $tableName + * @param boolean $cascade + * + * @return string + */ + public function getTruncateTableSQL($tableName, $cascade = false) + { + $tableIdentifier = new Identifier($tableName); + + return 'TRUNCATE ' . $tableIdentifier->getQuotedName($this); + } + + /** + * This is for test reasons, many vendors have special requirements for dummy statements. + * + * @return string + */ + public function getDummySelectSQL() + { + return 'SELECT 1'; + } + + /** + * Returns the SQL to create a new savepoint. + * + * @param string $savepoint + * + * @return string + */ + public function createSavePoint($savepoint) + { + return 'SAVEPOINT ' . $savepoint; + } + + /** + * Returns the SQL to release a savepoint. + * + * @param string $savepoint + * + * @return string + */ + public function releaseSavePoint($savepoint) + { + return 'RELEASE SAVEPOINT ' . $savepoint; + } + + /** + * Returns the SQL to rollback a savepoint. + * + * @param string $savepoint + * + * @return string + */ + public function rollbackSavePoint($savepoint) + { + return 'ROLLBACK TO SAVEPOINT ' . $savepoint; + } + + /** + * Returns the keyword list instance of this platform. + * + * @return \Doctrine\DBAL\Platforms\Keywords\KeywordList + * + * @throws \Doctrine\DBAL\DBALException If no keyword list is specified. + */ + final public function getReservedKeywordsList() + { + // Check for an existing instantiation of the keywords class. + if ($this->_keywords) { + return $this->_keywords; + } + + $class = $this->getReservedKeywordsClass(); + $keywords = new $class; + if ( ! $keywords instanceof \Doctrine\DBAL\Platforms\Keywords\KeywordList) { + throw DBALException::notSupported(__METHOD__); + } + + // Store the instance so it doesn't need to be generated on every request. + $this->_keywords = $keywords; + + return $keywords; + } + + /** + * Returns the class name of the reserved keywords list. + * + * @return string + * + * @throws \Doctrine\DBAL\DBALException If not supported on this platform. + */ + protected function getReservedKeywordsClass() + { + throw DBALException::notSupported(__METHOD__); + } + + /** + * Quotes a literal string. + * This method is NOT meant to fix SQL injections! + * It is only meant to escape this platform's string literal + * quote character inside the given literal string. + * + * @param string $str The literal string to be quoted. + * + * @return string The quoted literal string. + */ + public function quoteStringLiteral($str) + { + $c = $this->getStringLiteralQuoteCharacter(); + + return $c . str_replace($c, $c . $c, $str) . $c; + } + + /** + * Gets the character used for string literal quoting. + * + * @return string + */ + public function getStringLiteralQuoteCharacter() + { + return "'"; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DB2Platform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DB2Platform.php new file mode 100644 index 0000000000000000000000000000000000000000..da0d77ced38b47b2f3060aa325597d053e86af91 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DB2Platform.php @@ -0,0 +1,882 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\ColumnDiff; +use Doctrine\DBAL\Schema\Identifier; +use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\TableDiff; +use Doctrine\DBAL\Types\Type; + +class DB2Platform extends AbstractPlatform +{ + /** + * {@inheritdoc} + */ + public function getBinaryMaxLength() + { + return 32704; + } + + /** + * {@inheritdoc} + */ + public function getBinaryDefaultLength() + { + return 1; + } + + /** + * {@inheritDoc} + */ + public function getBlobTypeDeclarationSQL(array $field) + { + // todo blob(n) with $field['length']; + return 'BLOB(1M)'; + } + + /** + * {@inheritDoc} + */ + public function initializeDoctrineTypeMappings() + { + $this->doctrineTypeMapping = array( + 'smallint' => 'smallint', + 'bigint' => 'bigint', + 'integer' => 'integer', + 'time' => 'time', + 'date' => 'date', + 'varchar' => 'string', + 'character' => 'string', + 'varbinary' => 'binary', + 'binary' => 'binary', + 'clob' => 'text', + 'blob' => 'blob', + 'decimal' => 'decimal', + 'double' => 'float', + 'real' => 'float', + 'timestamp' => 'datetime', + ); + } + + /** + * {@inheritdoc} + */ + public function isCommentedDoctrineType(Type $doctrineType) + { + if ($doctrineType->getName() === Type::BOOLEAN) { + // We require a commented boolean type in order to distinguish between boolean and smallint + // as both (have to) map to the same native type. + return true; + } + + return parent::isCommentedDoctrineType($doctrineType); + } + + /** + * {@inheritDoc} + */ + protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) + { + return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(255)') + : ($length ? 'VARCHAR(' . $length . ')' : 'VARCHAR(255)'); + } + + /** + * {@inheritdoc} + */ + protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) + { + return $fixed ? 'BINARY(' . ($length ?: 255) . ')' : 'VARBINARY(' . ($length ?: 255) . ')'; + } + + /** + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $field) + { + // todo clob(n) with $field['length']; + return 'CLOB(1M)'; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'db2'; + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $columnDef) + { + return 'SMALLINT'; + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $columnDef) + { + return 'INTEGER' . $this->_getCommonIntegerTypeDeclarationSQL($columnDef); + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $columnDef) + { + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($columnDef); + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $columnDef) + { + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($columnDef); + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + { + $autoinc = ''; + if ( ! empty($columnDef['autoincrement'])) { + $autoinc = ' GENERATED BY DEFAULT AS IDENTITY'; + } + + return $autoinc; + } + + /** + * {@inheritdoc} + */ + public function getBitAndComparisonExpression($value1, $value2) + { + return 'BITAND(' . $value1 . ', ' . $value2 . ')'; + } + + /** + * {@inheritdoc} + */ + public function getBitOrComparisonExpression($value1, $value2) + { + return 'BITOR(' . $value1 . ', ' . $value2 . ')'; + } + + /** + * {@inheritdoc} + */ + protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) + { + switch ($unit) { + case self::DATE_INTERVAL_UNIT_WEEK: + $interval *= 7; + $unit = self::DATE_INTERVAL_UNIT_DAY; + break; + + case self::DATE_INTERVAL_UNIT_QUARTER: + $interval *= 3; + $unit = self::DATE_INTERVAL_UNIT_MONTH; + break; + } + + return $date . ' ' . $operator . ' ' . $interval . ' ' . $unit; + } + + /** + * {@inheritdoc} + */ + public function getDateDiffExpression($date1, $date2) + { + return 'DAYS(' . $date1 . ') - DAYS(' . $date2 . ')'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + { + if (isset($fieldDeclaration['version']) && $fieldDeclaration['version'] == true) { + return "TIMESTAMP(0) WITH DEFAULT"; + } + + return 'TIMESTAMP(0)'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIME'; + } + + /** + * {@inheritdoc} + */ + public function getTruncateTableSQL($tableName, $cascade = false) + { + $tableIdentifier = new Identifier($tableName); + + return 'TRUNCATE ' . $tableIdentifier->getQuotedName($this) . ' IMMEDIATE'; + } + + /** + * This code fragment is originally from the Zend_Db_Adapter_Db2 class, but has been edited. + * + * @license New BSD License + * + * @param string $table + * @param string $database + * + * @return string + */ + public function getListTableColumnsSQL($table, $database = null) + { + $table = $this->quoteStringLiteral($table); + + // We do the funky subquery and join syscat.columns.default this crazy way because + // as of db2 v10, the column is CLOB(64k) and the distinct operator won't allow a CLOB, + // it wants shorter stuff like a varchar. + return " + SELECT + cols.default, + subq.* + FROM ( + SELECT DISTINCT + c.tabschema, + c.tabname, + c.colname, + c.colno, + c.typename, + c.nulls, + c.length, + c.scale, + c.identity, + tc.type AS tabconsttype, + c.remarks AS comment, + k.colseq, + CASE + WHEN c.generated = 'D' THEN 1 + ELSE 0 + END AS autoincrement + FROM syscat.columns c + LEFT JOIN (syscat.keycoluse k JOIN syscat.tabconst tc + ON (k.tabschema = tc.tabschema + AND k.tabname = tc.tabname + AND tc.type = 'P')) + ON (c.tabschema = k.tabschema + AND c.tabname = k.tabname + AND c.colname = k.colname) + WHERE UPPER(c.tabname) = UPPER(" . $table . ") + ORDER BY c.colno + ) subq + JOIN syscat.columns cols + ON subq.tabschema = cols.tabschema + AND subq.tabname = cols.tabname + AND subq.colno = cols.colno + ORDER BY subq.colno + "; + } + + /** + * {@inheritDoc} + */ + public function getListTablesSQL() + { + return "SELECT NAME FROM SYSIBM.SYSTABLES WHERE TYPE = 'T'"; + } + + /** + * {@inheritDoc} + */ + public function getListViewsSQL($database) + { + return "SELECT NAME, TEXT FROM SYSIBM.SYSVIEWS"; + } + + /** + * {@inheritDoc} + */ + public function getListTableIndexesSQL($table, $currentDatabase = null) + { + $table = $this->quoteStringLiteral($table); + + return "SELECT idx.INDNAME AS key_name, + idxcol.COLNAME AS column_name, + CASE + WHEN idx.UNIQUERULE = 'P' THEN 1 + ELSE 0 + END AS primary, + CASE + WHEN idx.UNIQUERULE = 'D' THEN 1 + ELSE 0 + END AS non_unique + FROM SYSCAT.INDEXES AS idx + JOIN SYSCAT.INDEXCOLUSE AS idxcol + ON idx.INDSCHEMA = idxcol.INDSCHEMA AND idx.INDNAME = idxcol.INDNAME + WHERE idx.TABNAME = UPPER(" . $table . ") + ORDER BY idxcol.COLSEQ ASC"; + } + + /** + * {@inheritDoc} + */ + public function getListTableForeignKeysSQL($table) + { + $table = $this->quoteStringLiteral($table); + + return "SELECT fkcol.COLNAME AS local_column, + fk.REFTABNAME AS foreign_table, + pkcol.COLNAME AS foreign_column, + fk.CONSTNAME AS index_name, + CASE + WHEN fk.UPDATERULE = 'R' THEN 'RESTRICT' + ELSE NULL + END AS on_update, + CASE + WHEN fk.DELETERULE = 'C' THEN 'CASCADE' + WHEN fk.DELETERULE = 'N' THEN 'SET NULL' + WHEN fk.DELETERULE = 'R' THEN 'RESTRICT' + ELSE NULL + END AS on_delete + FROM SYSCAT.REFERENCES AS fk + JOIN SYSCAT.KEYCOLUSE AS fkcol + ON fk.CONSTNAME = fkcol.CONSTNAME + AND fk.TABSCHEMA = fkcol.TABSCHEMA + AND fk.TABNAME = fkcol.TABNAME + JOIN SYSCAT.KEYCOLUSE AS pkcol + ON fk.REFKEYNAME = pkcol.CONSTNAME + AND fk.REFTABSCHEMA = pkcol.TABSCHEMA + AND fk.REFTABNAME = pkcol.TABNAME + WHERE fk.TABNAME = UPPER(" . $table . ") + ORDER BY fkcol.COLSEQ ASC"; + } + + /** + * {@inheritDoc} + */ + public function getCreateViewSQL($name, $sql) + { + return "CREATE VIEW ".$name." AS ".$sql; + } + + /** + * {@inheritDoc} + */ + public function getDropViewSQL($name) + { + return "DROP VIEW ".$name; + } + + /** + * {@inheritDoc} + */ + public function getCreateDatabaseSQL($database) + { + return "CREATE DATABASE ".$database; + } + + /** + * {@inheritDoc} + */ + public function getDropDatabaseSQL($database) + { + return "DROP DATABASE " . $database; + } + + /** + * {@inheritDoc} + */ + public function supportsCreateDropDatabase() + { + return false; + } + + /** + * {@inheritDoc} + */ + public function supportsReleaseSavepoints() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function supportsCommentOnStatement() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function getCurrentDateSQL() + { + return 'CURRENT DATE'; + } + + /** + * {@inheritDoc} + */ + public function getCurrentTimeSQL() + { + return 'CURRENT TIME'; + } + + /** + * {@inheritDoc} + */ + public function getCurrentTimestampSQL() + { + return "CURRENT TIMESTAMP"; + } + + /** + * {@inheritDoc} + */ + public function getIndexDeclarationSQL($name, Index $index) + { + // Index declaration in statements like CREATE TABLE is not supported. + throw DBALException::notSupported(__METHOD__); + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL($tableName, array $columns, array $options = array()) + { + $indexes = array(); + if (isset($options['indexes'])) { + $indexes = $options['indexes']; + } + $options['indexes'] = array(); + + $sqls = parent::_getCreateTableSQL($tableName, $columns, $options); + + foreach ($indexes as $definition) { + $sqls[] = $this->getCreateIndexSQL($definition, $tableName); + } + return $sqls; + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff) + { + $sql = array(); + $columnSql = array(); + $commentsSQL = array(); + + $queryParts = array(); + foreach ($diff->addedColumns as $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + + $columnDef = $column->toArray(); + $queryPart = 'ADD COLUMN ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnDef); + + // Adding non-nullable columns to a table requires a default value to be specified. + if ( ! empty($columnDef['notnull']) && + ! isset($columnDef['default']) && + empty($columnDef['autoincrement']) + ) { + $queryPart .= ' WITH DEFAULT'; + } + + $queryParts[] = $queryPart; + + $comment = $this->getColumnComment($column); + + if (null !== $comment && '' !== $comment) { + $commentsSQL[] = $this->getCommentOnColumnSQL( + $diff->getName($this)->getQuotedName($this), + $column->getQuotedName($this), + $comment + ); + } + } + + foreach ($diff->removedColumns as $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + + $queryParts[] = 'DROP COLUMN ' . $column->getQuotedName($this); + } + + foreach ($diff->changedColumns as $columnDiff) { + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + + if ($columnDiff->hasChanged('comment')) { + $commentsSQL[] = $this->getCommentOnColumnSQL( + $diff->getName($this)->getQuotedName($this), + $columnDiff->column->getQuotedName($this), + $this->getColumnComment($columnDiff->column) + ); + + if (count($columnDiff->changedProperties) === 1) { + continue; + } + } + + $this->gatherAlterColumnSQL($diff->fromTable, $columnDiff, $sql, $queryParts); + } + + foreach ($diff->renamedColumns as $oldColumnName => $column) { + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + + $oldColumnName = new Identifier($oldColumnName); + + $queryParts[] = 'RENAME COLUMN ' . $oldColumnName->getQuotedName($this) . + ' TO ' . $column->getQuotedName($this); + } + + $tableSql = array(); + + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { + if (count($queryParts) > 0) { + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . implode(" ", $queryParts); + } + + // Some table alteration operations require a table reorganization. + if ( ! empty($diff->removedColumns) || ! empty($diff->changedColumns)) { + $sql[] = "CALL SYSPROC.ADMIN_CMD ('REORG TABLE " . $diff->getName($this)->getQuotedName($this) . "')"; + } + + $sql = array_merge($sql, $commentsSQL); + + if ($diff->newName !== false) { + $sql[] = 'RENAME TABLE ' . $diff->getName($this)->getQuotedName($this) . ' TO ' . $diff->getNewName()->getQuotedName($this); + } + + $sql = array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $sql, + $this->getPostAlterTableIndexForeignKeySQL($diff) + ); + } + + return array_merge($sql, $tableSql, $columnSql); + } + + /** + * Gathers the table alteration SQL for a given column diff. + * + * @param Table $table The table to gather the SQL for. + * @param ColumnDiff $columnDiff The column diff to evaluate. + * @param array $sql The sequence of table alteration statements to fill. + * @param array $queryParts The sequence of column alteration clauses to fill. + */ + private function gatherAlterColumnSQL(Table $table, ColumnDiff $columnDiff, array &$sql, array &$queryParts) + { + $alterColumnClauses = $this->getAlterColumnClausesSQL($columnDiff); + + if (empty($alterColumnClauses)) { + return; + } + + // If we have a single column alteration, we can append the clause to the main query. + if (count($alterColumnClauses) === 1) { + $queryParts[] = current($alterColumnClauses); + + return; + } + + // We have multiple alterations for the same column, + // so we need to trigger a complete ALTER TABLE statement + // for each ALTER COLUMN clause. + foreach ($alterColumnClauses as $alterColumnClause) { + $sql[] = 'ALTER TABLE ' . $table->getQuotedName($this) . ' ' . $alterColumnClause; + } + } + + /** + * Returns the ALTER COLUMN SQL clauses for altering a column described by the given column diff. + * + * @param ColumnDiff $columnDiff The column diff to evaluate. + * + * @return array + */ + private function getAlterColumnClausesSQL(ColumnDiff $columnDiff) + { + $column = $columnDiff->column->toArray(); + + $alterClause = 'ALTER COLUMN ' . $columnDiff->column->getQuotedName($this); + + if ($column['columnDefinition']) { + return array($alterClause . ' ' . $column['columnDefinition']); + } + + $clauses = array(); + + if ($columnDiff->hasChanged('type') || + $columnDiff->hasChanged('length') || + $columnDiff->hasChanged('precision') || + $columnDiff->hasChanged('scale') || + $columnDiff->hasChanged('fixed') + ) { + $clauses[] = $alterClause . ' SET DATA TYPE ' . $column['type']->getSQLDeclaration($column, $this); + } + + if ($columnDiff->hasChanged('notnull')) { + $clauses[] = $column['notnull'] ? $alterClause . ' SET NOT NULL' : $alterClause . ' DROP NOT NULL'; + } + + if ($columnDiff->hasChanged('default')) { + if (isset($column['default'])) { + $defaultClause = $this->getDefaultValueDeclarationSQL($column); + + if ($defaultClause) { + $clauses[] = $alterClause . ' SET' . $defaultClause; + } + } else { + $clauses[] = $alterClause . ' DROP DEFAULT'; + } + } + + return $clauses; + } + + /** + * {@inheritDoc} + */ + protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff) + { + $sql = array(); + $table = $diff->getName($this)->getQuotedName($this); + + foreach ($diff->removedIndexes as $remKey => $remIndex) { + foreach ($diff->addedIndexes as $addKey => $addIndex) { + if ($remIndex->getColumns() == $addIndex->getColumns()) { + if ($remIndex->isPrimary()) { + $sql[] = 'ALTER TABLE ' . $table . ' DROP PRIMARY KEY'; + } elseif ($remIndex->isUnique()) { + $sql[] = 'ALTER TABLE ' . $table . ' DROP UNIQUE ' . $remIndex->getQuotedName($this); + } else { + $sql[] = $this->getDropIndexSQL($remIndex, $table); + } + + $sql[] = $this->getCreateIndexSQL($addIndex, $table); + + unset($diff->removedIndexes[$remKey]); + unset($diff->addedIndexes[$addKey]); + + break; + } + } + } + + $sql = array_merge($sql, parent::getPreAlterTableIndexForeignKeySQL($diff)); + + return $sql; + } + + /** + * {@inheritdoc} + */ + protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName) + { + if (strpos($tableName, '.') !== false) { + list($schema) = explode('.', $tableName); + $oldIndexName = $schema . '.' . $oldIndexName; + } + + return array('RENAME INDEX ' . $oldIndexName . ' TO ' . $index->getQuotedName($this)); + } + + /** + * {@inheritDoc} + */ + public function getDefaultValueDeclarationSQL($field) + { + if ( ! empty($field['autoincrement'])) { + return ''; + } + + if (isset($field['version']) && $field['version']) { + if ((string) $field['type'] != "DateTime") { + $field['default'] = "1"; + } + } + + return parent::getDefaultValueDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + public function getEmptyIdentityInsertSQL($tableName, $identifierColumnName) + { + return 'INSERT INTO ' . $tableName . ' (' . $identifierColumnName . ') VALUES (DEFAULT)'; + } + + /** + * {@inheritDoc} + */ + public function getCreateTemporaryTableSnippetSQL() + { + return "DECLARE GLOBAL TEMPORARY TABLE"; + } + + /** + * {@inheritDoc} + */ + public function getTemporaryTableName($tableName) + { + return "SESSION." . $tableName; + } + + /** + * {@inheritDoc} + */ + protected function doModifyLimitQuery($query, $limit, $offset = null) + { + $where = array(); + + if ($offset > 0) { + $where[] = sprintf('db22.DC_ROWNUM >= %d', $offset + 1); + } + + if ($limit !== null) { + $where[] = sprintf('db22.DC_ROWNUM <= %d', $offset + $limit); + } + + if (empty($where)) { + return $query; + } + + // Todo OVER() needs ORDER BY data! + return sprintf( + 'SELECT db22.* FROM (SELECT db21.*, ROW_NUMBER() OVER() AS DC_ROWNUM FROM (%s) db21) db22 WHERE %s', + $query, + implode(' AND ', $where) + ); + } + + /** + * {@inheritDoc} + */ + public function getLocateExpression($str, $substr, $startPos = false) + { + if ($startPos == false) { + return 'LOCATE(' . $substr . ', ' . $str . ')'; + } + + return 'LOCATE(' . $substr . ', ' . $str . ', '.$startPos.')'; + } + + /** + * {@inheritDoc} + */ + public function getSubstringExpression($value, $from, $length = null) + { + if ($length === null) { + return 'SUBSTR(' . $value . ', ' . $from . ')'; + } + + return 'SUBSTR(' . $value . ', ' . $from . ', ' . $length . ')'; + } + + /** + * {@inheritDoc} + */ + public function supportsIdentityColumns() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function prefersIdentityColumns() + { + return true; + } + + /** + * {@inheritDoc} + * + * DB2 returns all column names in SQL result sets in uppercase. + */ + public function getSQLResultCasing($column) + { + return strtoupper($column); + } + + /** + * {@inheritDoc} + */ + public function getForUpdateSQL() + { + return ' WITH RR USE AND KEEP UPDATE LOCKS'; + } + + /** + * {@inheritDoc} + */ + public function getDummySelectSQL() + { + return 'SELECT 1 FROM sysibm.sysdummy1'; + } + + /** + * {@inheritDoc} + * + * DB2 supports savepoints, but they work semantically different than on other vendor platforms. + * + * TODO: We have to investigate how to get DB2 up and running with savepoints. + */ + public function supportsSavepoints() + { + return false; + } + + /** + * {@inheritDoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\DB2Keywords'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php new file mode 100644 index 0000000000000000000000000000000000000000..08f053b08c62e30d0374f96e3a68d0629dc218d8 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php @@ -0,0 +1,624 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\Schema\Identifier; +use Doctrine\DBAL\Schema\TableDiff; +use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Types\BinaryType; + +/** + * Drizzle platform + * + * @author Kim Hemsø Rasmussen + */ +class DrizzlePlatform extends AbstractPlatform +{ + /** + * {@inheritDoc} + */ + public function getName() + { + return 'drizzle'; + } + + /** + * {@inheritDoc} + */ + public function getIdentifierQuoteCharacter() + { + return '`'; + } + + /** + * {@inheritDoc} + */ + public function getConcatExpression() + { + $args = func_get_args(); + + return 'CONCAT(' . join(', ', (array) $args) . ')'; + } + + /** + * {@inheritdoc} + */ + protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) + { + $function = '+' === $operator ? 'DATE_ADD' : 'DATE_SUB'; + + return $function . '(' . $date . ', INTERVAL ' . $interval . ' ' . $unit . ')'; + } + + /** + * {@inheritDoc} + */ + public function getDateDiffExpression($date1, $date2) + { + return 'DATEDIFF(' . $date1 . ', ' . $date2 . ')'; + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $field) + { + return 'BOOLEAN'; + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $field) + { + return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + { + $autoinc = ''; + if ( ! empty($columnDef['autoincrement'])) { + $autoinc = ' AUTO_INCREMENT'; + } + + return $autoinc; + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $field) + { + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $field) + { + return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) + { + return $length ? 'VARCHAR(' . $length . ')' : 'VARCHAR(255)'; + } + + /** + * {@inheritdoc} + */ + protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) + { + return 'VARBINARY(' . ($length ?: 255) . ')'; + } + + /** + * {@inheritDoc} + */ + protected function initializeDoctrineTypeMappings() + { + $this->doctrineTypeMapping = array( + 'boolean' => 'boolean', + 'varchar' => 'string', + 'varbinary' => 'binary', + 'integer' => 'integer', + 'blob' => 'blob', + 'decimal' => 'decimal', + 'datetime' => 'datetime', + 'date' => 'date', + 'time' => 'time', + 'text' => 'text', + 'timestamp' => 'datetime', + 'double' => 'float', + 'bigint' => 'bigint', + ); + } + + /** + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $field) + { + return 'TEXT'; + } + + /** + * {@inheritDoc} + */ + public function getBlobTypeDeclarationSQL(array $field) + { + return 'BLOB'; + } + + /** + * {@inheritDoc} + */ + public function getCreateDatabaseSQL($name) + { + return 'CREATE DATABASE ' . $name; + } + + /** + * {@inheritDoc} + */ + public function getDropDatabaseSQL($name) + { + return 'DROP DATABASE ' . $name; + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL($tableName, array $columns, array $options = array()) + { + $queryFields = $this->getColumnDeclarationListSQL($columns); + + if (isset($options['uniqueConstraints']) && ! empty($options['uniqueConstraints'])) { + foreach ($options['uniqueConstraints'] as $index => $definition) { + $queryFields .= ', ' . $this->getUniqueConstraintDeclarationSQL($index, $definition); + } + } + + // add all indexes + if (isset($options['indexes']) && ! empty($options['indexes'])) { + foreach ($options['indexes'] as $index => $definition) { + $queryFields .= ', ' . $this->getIndexDeclarationSQL($index, $definition); + } + } + + // attach all primary keys + if (isset($options['primary']) && ! empty($options['primary'])) { + $keyColumns = array_unique(array_values($options['primary'])); + $queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')'; + } + + $query = 'CREATE '; + + if (!empty($options['temporary'])) { + $query .= 'TEMPORARY '; + } + + $query .= 'TABLE ' . $tableName . ' (' . $queryFields . ') '; + $query .= $this->buildTableOptions($options); + $query .= $this->buildPartitionOptions($options); + + $sql[] = $query; + + if (isset($options['foreignKeys'])) { + foreach ((array) $options['foreignKeys'] as $definition) { + $sql[] = $this->getCreateForeignKeySQL($definition, $tableName); + } + } + + return $sql; + } + + /** + * Build SQL for table options + * + * @param array $options + * + * @return string + */ + private function buildTableOptions(array $options) + { + if (isset($options['table_options'])) { + return $options['table_options']; + } + + $tableOptions = array(); + + // Collate + if ( ! isset($options['collate'])) { + $options['collate'] = 'utf8_unicode_ci'; + } + + $tableOptions[] = sprintf('COLLATE %s', $options['collate']); + + // Engine + if ( ! isset($options['engine'])) { + $options['engine'] = 'InnoDB'; + } + + $tableOptions[] = sprintf('ENGINE = %s', $options['engine']); + + // Auto increment + if (isset($options['auto_increment'])) { + $tableOptions[] = sprintf('AUTO_INCREMENT = %s', $options['auto_increment']); + } + + // Comment + if (isset($options['comment'])) { + $comment = trim($options['comment'], " '"); + + $tableOptions[] = sprintf("COMMENT = %s ", $this->quoteStringLiteral($comment)); + } + + // Row format + if (isset($options['row_format'])) { + $tableOptions[] = sprintf('ROW_FORMAT = %s', $options['row_format']); + } + + return implode(' ', $tableOptions); + } + + /** + * Build SQL for partition options. + * + * @param array $options + * + * @return string + */ + private function buildPartitionOptions(array $options) + { + return (isset($options['partition_options'])) + ? ' ' . $options['partition_options'] + : ''; + } + + /** + * {@inheritDoc} + */ + public function getListDatabasesSQL() + { + return "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE CATALOG_NAME='LOCAL'"; + } + + /** + * {@inheritDoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\DrizzleKeywords'; + } + + /** + * {@inheritDoc} + */ + public function getListTablesSQL() + { + return "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE' AND TABLE_SCHEMA=DATABASE()"; + } + + /** + * {@inheritDoc} + */ + public function getListTableColumnsSQL($table, $database = null) + { + if ($database) { + $database = "'" . $database . "'"; + } else { + $database = 'DATABASE()'; + } + + return "SELECT COLUMN_NAME, DATA_TYPE, COLUMN_COMMENT, IS_NULLABLE, IS_AUTO_INCREMENT, CHARACTER_MAXIMUM_LENGTH, COLUMN_DEFAULT," . + " NUMERIC_PRECISION, NUMERIC_SCALE, COLLATION_NAME" . + " FROM DATA_DICTIONARY.COLUMNS" . + " WHERE TABLE_SCHEMA=" . $database . " AND TABLE_NAME = '" . $table . "'"; + } + + /** + * {@inheritDoc} + */ + public function getListTableForeignKeysSQL($table, $database = null) + { + if ($database) { + $database = "'" . $database . "'"; + } else { + $database = 'DATABASE()'; + } + + return "SELECT CONSTRAINT_NAME, CONSTRAINT_COLUMNS, REFERENCED_TABLE_NAME, REFERENCED_TABLE_COLUMNS, UPDATE_RULE, DELETE_RULE" . + " FROM DATA_DICTIONARY.FOREIGN_KEYS" . + " WHERE CONSTRAINT_SCHEMA=" . $database . " AND CONSTRAINT_TABLE='" . $table . "'"; + } + + /** + * {@inheritDoc} + */ + public function getListTableIndexesSQL($table, $database = null) + { + if ($database) { + $database = "'" . $database . "'"; + } else { + $database = 'DATABASE()'; + } + + return "SELECT INDEX_NAME AS 'key_name', COLUMN_NAME AS 'column_name', IS_USED_IN_PRIMARY AS 'primary', IS_UNIQUE=0 AS 'non_unique'" . + " FROM DATA_DICTIONARY.INDEX_PARTS" . + " WHERE TABLE_SCHEMA=" . $database . " AND TABLE_NAME='" . $table . "'"; + } + + /** + * {@inheritDoc} + */ + public function prefersIdentityColumns() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function supportsIdentityColumns() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function supportsInlineColumnComments() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function supportsViews() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function supportsColumnCollation() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function getDropIndexSQL($index, $table=null) + { + if ($index instanceof Index) { + $indexName = $index->getQuotedName($this); + } elseif (is_string($index)) { + $indexName = $index; + } else { + throw new \InvalidArgumentException('DrizzlePlatform::getDropIndexSQL() expects $index parameter to be string or \Doctrine\DBAL\Schema\Index.'); + } + + if ($table instanceof Table) { + $table = $table->getQuotedName($this); + } elseif (!is_string($table)) { + throw new \InvalidArgumentException('DrizzlePlatform::getDropIndexSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); + } + + if ($index instanceof Index && $index->isPrimary()) { + // drizzle primary keys are always named "PRIMARY", + // so we cannot use them in statements because of them being keyword. + return $this->getDropPrimaryKeySQL($table); + } + + return 'DROP INDEX ' . $indexName . ' ON ' . $table; + } + + /** + * {@inheritDoc} + */ + protected function getDropPrimaryKeySQL($table) + { + return 'ALTER TABLE ' . $table . ' DROP PRIMARY KEY'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + { + if (isset($fieldDeclaration['version']) && $fieldDeclaration['version'] == true) { + return 'TIMESTAMP'; + } + + return 'DATETIME'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIME'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff) + { + $columnSql = array(); + $queryParts = array(); + + if ($diff->newName !== false) { + $queryParts[] = 'RENAME TO ' . $diff->getNewName()->getQuotedName($this); + } + + foreach ($diff->addedColumns as $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + + $columnArray = $column->toArray(); + $columnArray['comment'] = $this->getColumnComment($column); + $queryParts[] = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray); + } + + foreach ($diff->removedColumns as $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + + $queryParts[] = 'DROP ' . $column->getQuotedName($this); + } + + foreach ($diff->changedColumns as $columnDiff) { + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + + /* @var $columnDiff \Doctrine\DBAL\Schema\ColumnDiff */ + $column = $columnDiff->column; + $columnArray = $column->toArray(); + + // Do not generate column alteration clause if type is binary and only fixed property has changed. + // Drizzle only supports binary type columns with variable length. + // Avoids unnecessary table alteration statements. + if ($columnArray['type'] instanceof BinaryType && + $columnDiff->hasChanged('fixed') && + count($columnDiff->changedProperties) === 1 + ) { + continue; + } + + $columnArray['comment'] = $this->getColumnComment($column); + $queryParts[] = 'CHANGE ' . ($columnDiff->getOldColumnName()->getQuotedName($this)) . ' ' + . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray); + } + + foreach ($diff->renamedColumns as $oldColumnName => $column) { + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + + $oldColumnName = new Identifier($oldColumnName); + + $columnArray = $column->toArray(); + $columnArray['comment'] = $this->getColumnComment($column); + $queryParts[] = 'CHANGE ' . $oldColumnName->getQuotedName($this) . ' ' + . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray); + } + + $sql = array(); + $tableSql = array(); + + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { + if (count($queryParts) > 0) { + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . implode(", ", $queryParts); + } + $sql = array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $sql, + $this->getPostAlterTableIndexForeignKeySQL($diff) + ); + } + + return array_merge($sql, $tableSql, $columnSql); + } + + /** + * {@inheritDoc} + */ + public function getDropTemporaryTableSQL($table) + { + if ($table instanceof Table) { + $table = $table->getQuotedName($this); + } elseif (!is_string($table)) { + throw new \InvalidArgumentException('getDropTableSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); + } + + return 'DROP TEMPORARY TABLE ' . $table; + } + + /** + * {@inheritDoc} + */ + public function convertBooleans($item) + { + if (is_array($item)) { + foreach ($item as $key => $value) { + if (is_bool($value) || is_numeric($item)) { + $item[$key] = ($value) ? 'true' : 'false'; + } + } + } elseif (is_bool($item) || is_numeric($item)) { + $item = ($item) ? 'true' : 'false'; + } + + return $item; + } + + /** + * {@inheritDoc} + */ + public function getLocateExpression($str, $substr, $startPos = false) + { + if ($startPos == false) { + return 'LOCATE(' . $substr . ', ' . $str . ')'; + } + + return 'LOCATE(' . $substr . ', ' . $str . ', '.$startPos.')'; + } + + /** + * {@inheritDoc} + */ + public function getGuidExpression() + { + return 'UUID()'; + } + + /** + * {@inheritDoc} + */ + public function getRegexpExpression() + { + return 'RLIKE'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/DB2Keywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/DB2Keywords.php new file mode 100644 index 0000000000000000000000000000000000000000..ff8aac81c6ee35427656b3dac373985681efc689 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/DB2Keywords.php @@ -0,0 +1,441 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * DB2 Keywords. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class DB2Keywords extends KeywordList +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'DB2'; + } + + /** + * {@inheritdoc} + */ + protected function getKeywords() + { + return array( + 'ACTIVATE', + 'ADD', + 'AFTER', + 'ALIAS', + 'ALL', + 'ALLOCATE', + 'DOCUMENT', + 'DOUBLE', + 'DROP', + 'DSSIZE', + 'DYNAMIC', + 'EACH', + 'LOCK', + 'LOCKMAX', + 'LOCKSIZE', + 'LONG', + 'LOOP', + 'MAINTAINED', + 'ROUND_CEILING', + 'ROUND_DOWN', + 'ROUND_FLOOR', + 'ROUND_HALF_DOWN', + 'ROUND_HALF_EVEN', + 'ROUND_HALF_UP', + 'ALLOW', + 'ALTER', + 'AND', + 'ANY', + 'AS', + 'ASENSITIVE', + 'ASSOCIATE', + 'ASUTIME', + 'AT', + 'ATTRIBUTES', + 'AUDIT', + 'AUTHORIZATION', + 'AUX', + 'AUXILIARY', + 'BEFORE', + 'BEGIN', + 'BETWEEN', + 'BINARY', + 'BUFFERPOOL', + 'BY', + 'CACHE', + 'CALL', + 'CALLED', + 'CAPTURE', + 'CARDINALITY', + 'CASCADED', + 'CASE', + 'CAST', + 'CCSID', + 'CHAR', + 'CHARACTER', + 'CHECK', + 'CLONE', + 'CLOSE', + 'CLUSTER', + 'COLLECTION', + 'COLLID', + 'COLUMN', + 'COMMENT', + 'COMMIT', + 'CONCAT', + 'CONDITION', + 'CONNECT', + 'CONNECTION', + 'CONSTRAINT', + 'CONTAINS', + 'CONTINUE', + 'COUNT', + 'COUNT_BIG', + 'CREATE', + 'CROSS', + 'CURRENT', + 'CURRENT_DATE', + 'CURRENT_LC_CTYPE', + 'CURRENT_PATH', + 'CURRENT_SCHEMA', + 'CURRENT_SERVER', + 'CURRENT_TIME', + 'CURRENT_TIMESTAMP', + 'CURRENT_TIMEZONE', + 'CURRENT_USER', + 'CURSOR', + 'CYCLE', + 'DATA', + 'DATABASE', + 'DATAPARTITIONNAME', + 'DATAPARTITIONNUM', + 'EDITPROC', + 'ELSE', + 'ELSEIF', + 'ENABLE', + 'ENCODING', + 'ENCRYPTION', + 'END', + 'END-EXEC', + 'ENDING', + 'ERASE', + 'ESCAPE', + 'EVERY', + 'EXCEPT', + 'EXCEPTION', + 'EXCLUDING', + 'EXCLUSIVE', + 'EXECUTE', + 'EXISTS', + 'EXIT', + 'EXPLAIN', + 'EXTERNAL', + 'EXTRACT', + 'FENCED', + 'FETCH', + 'FIELDPROC', + 'FILE', + 'FINAL', + 'FOR', + 'FOREIGN', + 'FREE', + 'FROM', + 'FULL', + 'FUNCTION', + 'GENERAL', + 'GENERATED', + 'GET', + 'GLOBAL', + 'GO', + 'GOTO', + 'GRANT', + 'GRAPHIC', + 'GROUP', + 'HANDLER', + 'HASH', + 'HASHED_VALUE', + 'HAVING', + 'HINT', + 'HOLD', + 'HOUR', + 'HOURS', + 'IDENTITY', + 'IF', + 'IMMEDIATE', + 'IN', + 'INCLUDING', + 'INCLUSIVE', + 'INCREMENT', + 'INDEX', + 'INDICATOR', + 'INF', + 'INFINITY', + 'INHERIT', + 'INNER', + 'INOUT', + 'INSENSITIVE', + 'INSERT', + 'INTEGRITY', + 'MATERIALIZED', + 'MAXVALUE', + 'MICROSECOND', + 'MICROSECONDS', + 'MINUTE', + 'MINUTES', + 'MINVALUE', + 'MODE', + 'MODIFIES', + 'MONTH', + 'MONTHS', + 'NAN', + 'NEW', + 'NEW_TABLE', + 'NEXTVAL', + 'NO', + 'NOCACHE', + 'NOCYCLE', + 'NODENAME', + 'NODENUMBER', + 'NOMAXVALUE', + 'NOMINVALUE', + 'NONE', + 'NOORDER', + 'NORMALIZED', + 'NOT', + 'NULL', + 'NULLS', + 'NUMPARTS', + 'OBID', + 'OF', + 'OLD', + 'OLD_TABLE', + 'ON', + 'OPEN', + 'OPTIMIZATION', + 'OPTIMIZE', + 'OPTION', + 'OR', + 'ORDER', + 'OUT', + 'OUTER', + 'OVER', + 'OVERRIDING', + 'PACKAGE', + 'PADDED', + 'PAGESIZE', + 'PARAMETER', + 'PART', + 'PARTITION', + 'PARTITIONED', + 'PARTITIONING', + 'PARTITIONS', + 'PASSWORD', + 'PATH', + 'PIECESIZE', + 'PLAN', + 'POSITION', + 'PRECISION', + 'PREPARE', + 'PREVVAL', + 'PRIMARY', + 'PRIQTY', + 'PRIVILEGES', + 'PROCEDURE', + 'PROGRAM', + 'PSID', + 'ROUND_UP', + 'ROUTINE', + 'ROW', + 'ROW_NUMBER', + 'ROWNUMBER', + 'ROWS', + 'ROWSET', + 'RRN', + 'RUN', + 'SAVEPOINT', + 'SCHEMA', + 'SCRATCHPAD', + 'SCROLL', + 'SEARCH', + 'SECOND', + 'SECONDS', + 'SECQTY', + 'SECURITY', + 'SELECT', + 'SENSITIVE', + 'SEQUENCE', + 'SESSION', + 'SESSION_USER', + 'SET', + 'SIGNAL', + 'SIMPLE', + 'SNAN', + 'SOME', + 'SOURCE', + 'SPECIFIC', + 'SQL', + 'SQLID', + 'STACKED', + 'STANDARD', + 'START', + 'STARTING', + 'STATEMENT', + 'STATIC', + 'STATMENT', + 'STAY', + 'STOGROUP', + 'STORES', + 'STYLE', + 'SUBSTRING', + 'SUMMARY', + 'SYNONYM', + 'SYSFUN', + 'SYSIBM', + 'SYSPROC', + 'SYSTEM', + 'SYSTEM_USER', + 'TABLE', + 'TABLESPACE', + 'THEN', + 'TIME', + 'TIMESTAMP', + 'TO', + 'TRANSACTION', + 'TRIGGER', + 'TRIM', + 'TRUNCATE', + 'TYPE', + 'UNDO', + 'UNION', + 'UNIQUE', + 'UNTIL', + 'UPDATE', + 'DATE', + 'DAY', + 'DAYS', + 'DB2GENERAL', + 'DB2GENRL', + 'DB2SQL', + 'DBINFO', + 'DBPARTITIONNAME', + 'DBPARTITIONNUM', + 'DEALLOCATE', + 'DECLARE', + 'DEFAULT', + 'DEFAULTS', + 'DEFINITION', + 'DELETE', + 'DENSE_RANK', + 'DENSERANK', + 'DESCRIBE', + 'DESCRIPTOR', + 'DETERMINISTIC', + 'DIAGNOSTICS', + 'DISABLE', + 'DISALLOW', + 'DISCONNECT', + 'DISTINCT', + 'DO', + 'INTERSECT', + 'PUBLIC', + 'USAGE', + 'INTO', + 'QUERY', + 'USER', + 'IS', + 'QUERYNO', + 'USING', + 'ISOBID', + 'RANGE', + 'VALIDPROC', + 'ISOLATION', + 'RANK', + 'VALUE', + 'ITERATE', + 'READ', + 'VALUES', + 'JAR', + 'READS', + 'VARIABLE', + 'JAVA', + 'RECOVERY', + 'VARIANT', + 'JOIN', + 'REFERENCES', + 'VCAT', + 'KEEP', + 'REFERENCING', + 'VERSION', + 'KEY', + 'REFRESH', + 'VIEW', + 'LABEL', + 'RELEASE', + 'VOLATILE', + 'LANGUAGE', + 'RENAME', + 'VOLUMES', + 'LATERAL', + 'REPEAT', + 'WHEN', + 'LC_CTYPE', + 'RESET', + 'WHENEVER', + 'LEAVE', + 'RESIGNAL', + 'WHERE', + 'LEFT', + 'RESTART', + 'WHILE', + 'LIKE', + 'RESTRICT', + 'WITH', + 'LINKTYPE', + 'RESULT', + 'WITHOUT', + 'LOCAL', + 'RESULT_SET_LOCATOR WLM', + 'LOCALDATE', + 'RETURN', + 'WRITE', + 'LOCALE', + 'RETURNS', + 'XMLELEMENT', + 'LOCALTIME', + 'REVOKE', + 'XMLEXISTS', + 'LOCALTIMESTAMP RIGHT', + 'XMLNAMESPACES', + 'LOCATOR', + 'ROLE', + 'YEAR', + 'LOCATORS', + 'ROLLBACK', + 'YEARS', + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/DrizzleKeywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/DrizzleKeywords.php new file mode 100644 index 0000000000000000000000000000000000000000..21d59d8c5871ef0d232de4f4dd4885d10dd76a8a --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/DrizzleKeywords.php @@ -0,0 +1,345 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * Drizzle Keywordlist. + * + * @author Kim Hemsø Rasmussen + */ +class DrizzleKeywords extends KeywordList +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'drizzle'; + } + + /** + * {@inheritdoc} + */ + protected function getKeywords() + { + return array( + 'ABS', + 'ALL', + 'ALLOCATE', + 'ALTER', + 'AND', + 'ANY', + 'ARE', + 'ARRAY', + 'AS', + 'ASENSITIVE', + 'ASYMMETRIC', + 'AT', + 'ATOMIC', + 'AUTHORIZATION', + 'AVG', + 'BEGIN', + 'BETWEEN', + 'BIGINT', + 'BINARY', + 'BLOB', + 'BOOLEAN', + 'BOTH', + 'BY', + 'CALL', + 'CALLED', + 'CARDINALITY', + 'CASCADED', + 'CASE', + 'CAST', + 'CEIL', + 'CEILING', + 'CHAR', + 'CHARACTER', + 'CHARACTER_LENGTH', + 'CHAR_LENGTH', + 'CHECK', + 'CLOB', + 'CLOSE', + 'COALESCE', + 'COLLATE', + 'COLLECT', + 'COLUMN', + 'COMMIT', + 'CONDITION', + 'CONNECT', + 'CONSTRAINT', + 'CONVERT', + 'CORR', + 'CORRESPONDING', + 'COUNT', + 'COVAR_POP', + 'COVAR_SAMP', + 'CREATE', + 'CROSS', + 'CUBE', + 'CUME_DIST', + 'CURRENT', + 'CURRENT_DATE', + 'CURRENT_DEFAULT_TRANSFORM_GROUP', + 'CURRENT_PATH', + 'CURRENT_ROLE', + 'CURRENT_TIME', + 'CURRENT_TIMESTAMP', + 'CURRENT_TRANSFORM_GROUP_FOR_TYPE', + 'CURRENT_USER', + 'CURSOR', + 'CYCLE', + 'DATE', + 'DAY', + 'DEALLOCATE', + 'DEC', + 'DECIMAL', + 'DECLARE', + 'DEFAULT', + 'DELETE', + 'DENSE_RANK', + 'DEREF', + 'DESCRIBE', + 'DETERMINISTIC', + 'DISCONNECT', + 'DISTINCT', + 'DOUBLE', + 'DROP', + 'DYNAMIC', + 'EACH', + 'ELEMENT', + 'ELSE', + 'END', + 'ESCAPE', + 'EVERY', + 'EXCEPT', + 'EXEC', + 'EXECUTE', + 'EXISTS', + 'EXP', + 'EXTERNAL', + 'EXTRACT', + 'FALSE', + 'FETCH', + 'FILTER', + 'FLOAT', + 'FLOOR', + 'FOR', + 'FOREIGN', + 'FREE', + 'FROM', + 'FULL', + 'FUNCTION', + 'FUSION', + 'GET', + 'GLOBAL', + 'GRANT', + 'GROUP', + 'GROUPING', + 'HAVING', + 'HOLD', + 'HOUR', + 'IDENTITY', + 'IN', + 'INDICATOR', + 'INNER', + 'INOUT', + 'INSENSITIVE', + 'INSERT', + 'INT', + 'INTEGER', + 'INTERSECT', + 'INTERSECTION', + 'INTERVAL', + 'INTO', + 'IS', + 'JOIN', + 'LANGUAGE', + 'LARGE', + 'LATERAL', + 'LEADING', + 'LEFT', + 'LIKE', + 'LN', + 'LOCAL', + 'LOCALTIME', + 'LOCALTIMESTAMP', + 'LOWER', + 'MATCH', + 'MAX', + 'MEMBER', + 'MERGE', + 'METHOD', + 'MIN', + 'MINUTE', + 'MOD', + 'MODIFIES', + 'MODULE', + 'MONTH', + 'MULTISET', + 'NATIONAL', + 'NATURAL', + 'NCHAR', + 'NCLOB', + 'NEW', + 'NO', + 'NONE', + 'NORMALIZE', + 'NOT', + 'NULL_SYM', + 'NULLIF', + 'NUMERIC', + 'OCTET_LENGTH', + 'OF', + 'OLD', + 'ON', + 'ONLY', + 'OPEN', + 'OR', + 'ORDER', + 'OUT', + 'OUTER', + 'OVER', + 'OVERLAPS', + 'OVERLAY', + 'PARAMETER', + 'PARTITION', + 'PERCENTILE_CONT', + 'PERCENTILE_DISC', + 'PERCENT_RANK', + 'POSITION', + 'POWER', + 'PRECISION', + 'PREPARE', + 'PRIMARY', + 'PROCEDURE', + 'RANGE', + 'RANK', + 'READS', + 'REAL', + 'RECURSIVE', + 'REF', + 'REFERENCES', + 'REFERENCING', + 'REGR_AVGX', + 'REGR_AVGY', + 'REGR_COUNT', + 'REGR_INTERCEPT', + 'REGR_R2', + 'REGR_SLOPE', + 'REGR_SXX', + 'REGR_SXY', + 'REGR_SYY', + 'RELEASE', + 'RESULT', + 'RETURN', + 'RETURNS', + 'REVOKE', + 'RIGHT', + 'ROLLBACK', + 'ROLLUP', + 'ROW', + 'ROWS', + 'ROW_NUMBER', + 'SAVEPOINT', + 'SCOPE', + 'SCROLL', + 'SEARCH', + 'SECOND', + 'SELECT', + 'SENSITIVE', + 'SESSION_USER', + 'SET', + 'SIMILAR', + 'SMALLINT', + 'SOME', + 'SPECIFIC', + 'SPECIFICTYPE', + 'SQL', + 'SQLEXCEPTION', + 'SQLSTATE', + 'SQLWARNING', + 'SQRT', + 'START', + 'STATIC', + 'STDDEV_POP', + 'STDDEV_SAMP', + 'SUBMULTISET', + 'SUBSTRING', + 'SUM', + 'SYMMETRIC', + 'SYSTEM', + 'SYSTEM_USER', + 'TABLE', + 'TABLESAMPLE', + 'THEN', + 'TIME', + 'TIMESTAMP', + 'TIMEZONE_HOUR', + 'TIMEZONE_MINUTE', + 'TO', + 'TRAILING', + 'TRANSLATE', + 'TRANSLATION', + 'TREAT', + 'TRIGGER', + 'TRIM', + 'TRUE', + 'UESCAPE', + 'UNION', + 'UNIQUE', + 'UNKNOWN', + 'UNNEST', + 'UPDATE', + 'UPPER', + 'USER', + 'USING', + 'VALUE', + 'VALUES', + 'VARCHAR', + 'VARYING', + 'VAR_POP', + 'VAR_SAMP', + 'WHEN', + 'WHENEVER', + 'WHERE', + 'WIDTH_BUCKET', + 'WINDOW', + 'WITH', + 'WITHIN', + 'WITHOUT', + 'XML', + 'XMLAGG', + 'XMLATTRIBUTES', + 'XMLBINARY', + 'XMLCOMMENT', + 'XMLCONCAT', + 'XMLELEMENT', + 'XMLFOREST', + 'XMLNAMESPACES', + 'XMLPARSE', + 'XMLPI', + 'XMLROOT', + 'XMLSERIALIZE', + 'YEAR', + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php new file mode 100644 index 0000000000000000000000000000000000000000..5b8d74d01296569d664bb2e31b76146539520e73 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php @@ -0,0 +1,73 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * Abstract interface for a SQL reserved keyword dictionary. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +abstract class KeywordList +{ + /** + * @var array|null + */ + private $keywords = null; + + /** + * Checks if the given word is a keyword of this dialect/vendor platform. + * + * @param string $word + * + * @return boolean + */ + public function isKeyword($word) + { + if ($this->keywords === null) { + $this->initializeKeywords(); + } + + return isset($this->keywords[strtoupper($word)]); + } + + /** + * @return void + */ + protected function initializeKeywords() + { + $this->keywords = array_flip(array_map('strtoupper', $this->getKeywords())); + } + + /** + * Returns the list of keywords. + * + * @return array + */ + abstract protected function getKeywords(); + + /** + * Returns the name of this keyword list. + * + * @return string + */ + abstract public function getName(); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MsSQLKeywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MsSQLKeywords.php new file mode 100644 index 0000000000000000000000000000000000000000..9c8f614993ae29e62e0d5a60bc45bfd00f0ab7cd --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MsSQLKeywords.php @@ -0,0 +1,43 @@ +. + */ + + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * MsSQL Keywordlist + * + * @license BSD http://www.opensource.org/licenses/bsd-license.php + * @link www.doctrine-project.com + * @since 2.0 + * @author Benjamin Eberlei + * @author David Coallier + * @author Steve Müller + * @deprecated Use SQLServerKeywords class instead. + */ +class MsSQLKeywords extends SQLServerKeywords +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'MsSQL'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQL57Keywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQL57Keywords.php new file mode 100644 index 0000000000000000000000000000000000000000..7d7b2020877e15ca1b086e0edb5cc5919479c376 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQL57Keywords.php @@ -0,0 +1,281 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * MySQL 5.7 reserved keywords list. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class MySQL57Keywords extends MySQLKeywords +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'MySQL57'; + } + + /** + * {@inheritdoc} + * + * @link http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords-5-7.html + */ + protected function getKeywords() + { + return array( + 'ACCESSIBLE', + 'ADD', + 'ALL', + 'ALTER', + 'ANALYZE', + 'AND', + 'AS', + 'ASC', + 'ASENSITIVE', + 'BEFORE', + 'BETWEEN', + 'BIGINT', + 'BINARY', + 'BLOB', + 'BOTH', + 'BY', + 'CALL', + 'CASCADE', + 'CASE', + 'CHANGE', + 'CHAR', + 'CHARACTER', + 'CHECK', + 'COLLATE', + 'COLUMN', + 'CONDITION', + 'CONSTRAINT', + 'CONTINUE', + 'CONVERT', + 'CREATE', + 'CROSS', + 'CURRENT_DATE', + 'CURRENT_TIME', + 'CURRENT_TIMESTAMP', + 'CURRENT_USER', + 'CURSOR', + 'DATABASE', + 'DATABASES', + 'DAY_HOUR', + 'DAY_MICROSECOND', + 'DAY_MINUTE', + 'DAY_SECOND', + 'DEC', + 'DECIMAL', + 'DECLARE', + 'DEFAULT', + 'DELAYED', + 'DELETE', + 'DESC', + 'DESCRIBE', + 'DETERMINISTIC', + 'DISTINCT', + 'DISTINCTROW', + 'DIV', + 'DOUBLE', + 'DROP', + 'DUAL', + 'EACH', + 'ELSE', + 'ELSEIF', + 'ENCLOSED', + 'ESCAPED', + 'EXISTS', + 'EXIT', + 'EXPLAIN', + 'FALSE', + 'FETCH', + 'FLOAT', + 'FLOAT4', + 'FLOAT8', + 'FOR', + 'FORCE', + 'FOREIGN', + 'FROM', + 'FULLTEXT', + 'GET', + 'GRANT', + 'GROUP', + 'HAVING', + 'HIGH_PRIORITY', + 'HOUR_MICROSECOND', + 'HOUR_MINUTE', + 'HOUR_SECOND', + 'IF', + 'IGNORE', + 'IN', + 'INDEX', + 'INFILE', + 'INNER', + 'INOUT', + 'INSENSITIVE', + 'INSERT', + 'INT', + 'INT1', + 'INT2', + 'INT3', + 'INT4', + 'INT8', + 'INTEGER', + 'INTERVAL', + 'INTO', + 'IO_AFTER_GTIDS', + 'IO_BEFORE_GTIDS', + 'IS', + 'ITERATE', + 'JOIN', + 'KEY', + 'KEYS', + 'KILL', + 'LEADING', + 'LEAVE', + 'LEFT', + 'LIKE', + 'LIMIT', + 'LINEAR', + 'LINES', + 'LOAD', + 'LOCALTIME', + 'LOCALTIMESTAMP', + 'LOCK', + 'LONG', + 'LONGBLOB', + 'LONGTEXT', + 'LOOP', + 'LOW_PRIORITY', + 'MASTER_BIND', + 'MASTER_SSL_VERIFY_SERVER_CERT', + 'MATCH', + 'MAXVALUE', + 'MEDIUMBLOB', + 'MEDIUMINT', + 'MEDIUMTEXT', + 'MIDDLEINT', + 'MINUTE_MICROSECOND', + 'MINUTE_SECOND', + 'MOD', + 'MODIFIES', + 'NATURAL', + 'NO_WRITE_TO_BINLOG', + 'NONBLOCKING', + 'NOT', + 'NULL', + 'NUMERIC', + 'ON', + 'OPTIMIZE', + 'OPTION', + 'OPTIONALLY', + 'OR', + 'ORDER', + 'OUT', + 'OUTER', + 'OUTFILE', + 'PARTITION', + 'PRECISION', + 'PRIMARY', + 'PROCEDURE', + 'PURGE', + 'RANGE', + 'READ', + 'READ_WRITE', + 'READS', + 'REAL', + 'REFERENCES', + 'REGEXP', + 'RELEASE', + 'RENAME', + 'REPEAT', + 'REPLACE', + 'REQUIRE', + 'RESIGNAL', + 'RESTRICT', + 'RETURN', + 'REVOKE', + 'RIGHT', + 'RLIKE', + 'SCHEMA', + 'SCHEMAS', + 'SECOND_MICROSECOND', + 'SELECT', + 'SENSITIVE', + 'SEPARATOR', + 'SET', + 'SHOW', + 'SIGNAL', + 'SMALLINT', + 'SPATIAL', + 'SPECIFIC', + 'SQL', + 'SQL_BIG_RESULT', + 'SQL_CALC_FOUND_ROWS', + 'SQL_SMALL_RESULT', + 'SQLEXCEPTION', + 'SQLSTATE', + 'SQLWARNING', + 'SSL', + 'STARTING', + 'STRAIGHT_JOIN', + 'TABLE', + 'TERMINATED', + 'THEN', + 'TINYBLOB', + 'TINYINT', + 'TINYTEXT', + 'TO', + 'TRAILING', + 'TRIGGER', + 'TRUE', + 'UNDO', + 'UNION', + 'UNIQUE', + 'UNLOCK', + 'UNSIGNED', + 'UPDATE', + 'USAGE', + 'USE', + 'USING', + 'UTC_DATE', + 'UTC_TIME', + 'UTC_TIMESTAMP', + 'VALUES', + 'VARBINARY', + 'VARCHAR', + 'VARCHARACTER', + 'VARYING', + 'WHEN', + 'WHERE', + 'WHILE', + 'WITH', + 'WRITE', + 'XOR', + 'YEAR_MONTH', + 'ZEROFILL', + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQLKeywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQLKeywords.php new file mode 100644 index 0000000000000000000000000000000000000000..ba257741bf6d79a90c375481ce124084c14e3a3d --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQLKeywords.php @@ -0,0 +1,273 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * MySQL Keywordlist. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author David Coallier + */ +class MySQLKeywords extends KeywordList +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'MySQL'; + } + + /** + * {@inheritdoc} + */ + protected function getKeywords() + { + return array( + 'ADD', + 'ALL', + 'ALTER', + 'ANALYZE', + 'AND', + 'AS', + 'ASC', + 'ASENSITIVE', + 'BEFORE', + 'BETWEEN', + 'BIGINT', + 'BINARY', + 'BLOB', + 'BOTH', + 'BY', + 'CALL', + 'CASCADE', + 'CASE', + 'CHANGE', + 'CHAR', + 'CHARACTER', + 'CHECK', + 'COLLATE', + 'COLUMN', + 'CONDITION', + 'CONNECTION', + 'CONSTRAINT', + 'CONTINUE', + 'CONVERT', + 'CREATE', + 'CROSS', + 'CURRENT_DATE', + 'CURRENT_TIME', + 'CURRENT_TIMESTAMP', + 'CURRENT_USER', + 'CURSOR', + 'DATABASE', + 'DATABASES', + 'DAY_HOUR', + 'DAY_MICROSECOND', + 'DAY_MINUTE', + 'DAY_SECOND', + 'DEC', + 'DECIMAL', + 'DECLARE', + 'DEFAULT', + 'DELAYED', + 'DELETE', + 'DESC', + 'DESCRIBE', + 'DETERMINISTIC', + 'DISTINCT', + 'DISTINCTROW', + 'DIV', + 'DOUBLE', + 'DROP', + 'DUAL', + 'EACH', + 'ELSE', + 'ELSEIF', + 'ENCLOSED', + 'ESCAPED', + 'EXISTS', + 'EXIT', + 'EXPLAIN', + 'FALSE', + 'FETCH', + 'FLOAT', + 'FLOAT4', + 'FLOAT8', + 'FOR', + 'FORCE', + 'FOREIGN', + 'FROM', + 'FULLTEXT', + 'GOTO', + 'GRANT', + 'GROUP', + 'HAVING', + 'HIGH_PRIORITY', + 'HOUR_MICROSECOND', + 'HOUR_MINUTE', + 'HOUR_SECOND', + 'IF', + 'IGNORE', + 'IN', + 'INDEX', + 'INFILE', + 'INNER', + 'INOUT', + 'INSENSITIVE', + 'INSERT', + 'INT', + 'INT1', + 'INT2', + 'INT3', + 'INT4', + 'INT8', + 'INTEGER', + 'INTERVAL', + 'INTO', + 'IS', + 'ITERATE', + 'JOIN', + 'KEY', + 'KEYS', + 'KILL', + 'LABEL', + 'LEADING', + 'LEAVE', + 'LEFT', + 'LIKE', + 'LIMIT', + 'LINES', + 'LOAD', + 'LOCALTIME', + 'LOCALTIMESTAMP', + 'LOCK', + 'LONG', + 'LONGBLOB', + 'LONGTEXT', + 'LOOP', + 'LOW_PRIORITY', + 'MATCH', + 'MEDIUMBLOB', + 'MEDIUMINT', + 'MEDIUMTEXT', + 'MIDDLEINT', + 'MINUTE_MICROSECOND', + 'MINUTE_SECOND', + 'MOD', + 'MODIFIES', + 'NATURAL', + 'NOT', + 'NO_WRITE_TO_BINLOG', + 'NULL', + 'NUMERIC', + 'ON', + 'OPTIMIZE', + 'OPTION', + 'OPTIONALLY', + 'OR', + 'ORDER', + 'OUT', + 'OUTER', + 'OUTFILE', + 'PRECISION', + 'PRIMARY', + 'PROCEDURE', + 'PURGE', + 'RAID0', + 'RANGE', + 'READ', + 'READS', + 'REAL', + 'REFERENCES', + 'REGEXP', + 'RELEASE', + 'RENAME', + 'REPEAT', + 'REPLACE', + 'REQUIRE', + 'RESTRICT', + 'RETURN', + 'REVOKE', + 'RIGHT', + 'RLIKE', + 'SCHEMA', + 'SCHEMAS', + 'SECOND_MICROSECOND', + 'SELECT', + 'SENSITIVE', + 'SEPARATOR', + 'SET', + 'SHOW', + 'SMALLINT', + 'SONAME', + 'SPATIAL', + 'SPECIFIC', + 'SQL', + 'SQLEXCEPTION', + 'SQLSTATE', + 'SQLWARNING', + 'SQL_BIG_RESULT', + 'SQL_CALC_FOUND_ROWS', + 'SQL_SMALL_RESULT', + 'SSL', + 'STARTING', + 'STRAIGHT_JOIN', + 'TABLE', + 'TERMINATED', + 'THEN', + 'TINYBLOB', + 'TINYINT', + 'TINYTEXT', + 'TO', + 'TRAILING', + 'TRIGGER', + 'TRUE', + 'UNDO', + 'UNION', + 'UNIQUE', + 'UNLOCK', + 'UNSIGNED', + 'UPDATE', + 'USAGE', + 'USE', + 'USING', + 'UTC_DATE', + 'UTC_TIME', + 'UTC_TIMESTAMP', + 'VALUES', + 'VARBINARY', + 'VARCHAR', + 'VARCHARACTER', + 'VARYING', + 'WHEN', + 'WHERE', + 'WHILE', + 'WITH', + 'WRITE', + 'X509', + 'XOR', + 'YEAR_MONTH', + 'ZEROFILL', + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/OracleKeywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/OracleKeywords.php new file mode 100644 index 0000000000000000000000000000000000000000..b37fdad3debbd06c44ea3e90172dd3891bb2084e --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/OracleKeywords.php @@ -0,0 +1,161 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * Oracle Keywordlist. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author David Coallier + */ +class OracleKeywords extends KeywordList +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'Oracle'; + } + + /** + * {@inheritdoc} + */ + protected function getKeywords() + { + return array( + 'ACCESS', + 'ELSE', + 'MODIFY', + 'START', + 'ADD', + 'EXCLUSIVE', + 'NOAUDIT', + 'SELECT', + 'ALL', + 'EXISTS', + 'NOCOMPRESS', + 'SESSION', + 'ALTER', + 'FILE', + 'NOT', + 'SET', + 'AND', + 'FLOAT', + 'NOTFOUND ', + 'SHARE', + 'ANY', + 'FOR', + 'NOWAIT', + 'SIZE', + 'ARRAYLEN', + 'FROM', + 'NULL', + 'SMALLINT', + 'AS', + 'GRANT', + 'NUMBER', + 'SQLBUF', + 'ASC', + 'GROUP', + 'OF', + 'SUCCESSFUL', + 'AUDIT', + 'HAVING', + 'OFFLINE ', + 'SYNONYM', + 'BETWEEN', + 'IDENTIFIED', + 'ON', + 'SYSDATE', + 'BY', + 'IMMEDIATE', + 'ONLINE', + 'TABLE', + 'CHAR', + 'IN', + 'OPTION', + 'THEN', + 'CHECK', + 'INCREMENT', + 'OR', + 'TO', + 'CLUSTER', + 'INDEX', + 'ORDER', + 'TRIGGER', + 'COLUMN', + 'INITIAL', + 'PCTFREE', + 'UID', + 'COMMENT', + 'INSERT', + 'PRIOR', + 'UNION', + 'COMPRESS', + 'INTEGER', + 'PRIVILEGES', + 'UNIQUE', + 'CONNECT', + 'INTERSECT', + 'PUBLIC', + 'UPDATE', + 'CREATE', + 'INTO', + 'RAW', + 'USER', + 'CURRENT', + 'IS', + 'RENAME', + 'VALIDATE', + 'DATE', + 'LEVEL', + 'RESOURCE', + 'VALUES', + 'DECIMAL', + 'LIKE', + 'REVOKE', + 'VARCHAR', + 'DEFAULT', + 'LOCK', + 'ROW', + 'VARCHAR2', + 'DELETE', + 'LONG', + 'ROWID', + 'VIEW', + 'DESC', + 'MAXEXTENTS', + 'ROWLABEL', + 'WHENEVER', + 'DISTINCT', + 'MINUS', + 'ROWNUM', + 'WHERE', + 'DROP', + 'MODE', + 'ROWS', + 'WITH', + 'RANGE', + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL91Keywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL91Keywords.php new file mode 100644 index 0000000000000000000000000000000000000000..4e5c632d358e7aa942b5697466ccc781e6cb48e9 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL91Keywords.php @@ -0,0 +1,148 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * PostgreSQL 9.1 reserved keywords list. + * + * @author Martin Hasoň + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class PostgreSQL91Keywords extends PostgreSQLKeywords +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'PostgreSQL91'; + } + + /** + * {@inheritdoc} + * + * @link http://www.postgresql.org/docs/9.1/static/sql-keywords-appendix.html + */ + protected function getKeywords() + { + return array( + 'ALL', + 'ANALYSE', + 'ANALYZE', + 'AND', + 'ANY', + 'ARRAY', + 'AS', + 'ASC', + 'ASYMMETRIC', + 'AUTHORIZATION', + 'BINARY', + 'BOTH', + 'CASE', + 'CAST', + 'CHECK', + 'COLLATE', + 'COLUMN', + 'CONCURRENTLY', + 'CONSTRAINT', + 'CREATE', + 'CROSS', + 'CURRENT_CATALOG', + 'CURRENT_DATE', + 'CURRENT_ROLE', + 'CURRENT_SCHEMA', + 'CURRENT_TIME', + 'CURRENT_TIMESTAMP', + 'CURRENT_USER', + 'DEFAULT', + 'DEFERRABLE', + 'DESC', + 'DISTINCT', + 'DO', + 'ELSE', + 'END', + 'EXCEPT', + 'FALSE', + 'FETCH', + 'FOR', + 'FOREIGN', + 'FREEZE', + 'FROM', + 'FULL', + 'GRANT', + 'GROUP', + 'HAVING', + 'ILIKE', + 'IN', + 'INITIALLY', + 'INNER', + 'INTERSECT', + 'INTO', + 'IS', + 'ISNULL', + 'JOIN', + 'LEADING', + 'LEFT', + 'LIKE', + 'LIMIT', + 'LOCALTIME', + 'LOCALTIMESTAMP', + 'NATURAL', + 'NOT', + 'NOTNULL', + 'NULL', + 'OFFSET', + 'ON', + 'ONLY', + 'OR', + 'ORDER', + 'OUTER', + 'OVER', + 'OVERLAPS', + 'PLACING', + 'PRIMARY', + 'REFERENCES', + 'RETURNING', + 'RIGHT', + 'SELECT', + 'SESSION_USER', + 'SIMILAR', + 'SOME', + 'SYMMETRIC', + 'TABLE', + 'THEN', + 'TO', + 'TRAILING', + 'TRUE', + 'UNION', + 'UNIQUE', + 'USER', + 'USING', + 'VARIADIC', + 'VERBOSE', + 'WHEN', + 'WHERE', + 'WINDOW', + 'WITH', + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL92Keywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL92Keywords.php new file mode 100644 index 0000000000000000000000000000000000000000..7180dfd98349039b7ca3deb91db25d9855b5eeff --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL92Keywords.php @@ -0,0 +1,50 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * PostgreSQL 9.2 reserved keywords list. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class PostgreSQL92Keywords extends PostgreSQL91Keywords +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'PostgreSQL92'; + } + + /** + * {@inheritdoc} + * + * @link http://www.postgresql.org/docs/9.2/static/sql-keywords-appendix.html + */ + protected function getKeywords() + { + return array_merge(parent::getKeywords(), array( + 'COLLATION', + )); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php new file mode 100644 index 0000000000000000000000000000000000000000..9e49d7f250415de85f5878852f3a27a9baef24d8 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php @@ -0,0 +1,135 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * PostgreSQL Keywordlist. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Marcelo Santos Araujo + */ +class PostgreSQLKeywords extends KeywordList +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'PostgreSQL'; + } + + /** + * {@inheritdoc} + */ + protected function getKeywords() + { + return array( + 'ALL', + 'ANALYSE', + 'ANALYZE', + 'AND', + 'ANY', + 'AS', + 'ASC', + 'AUTHORIZATION', + 'BETWEEN', + 'BINARY', + 'BOTH', + 'CASE', + 'CAST', + 'CHECK', + 'COLLATE', + 'COLUMN', + 'CONSTRAINT', + 'CREATE', + 'CURRENT_DATE', + 'CURRENT_TIME', + 'CURRENT_TIMESTAMP', + 'CURRENT_USER', + 'DEFAULT', + 'DEFERRABLE', + 'DESC', + 'DISTINCT', + 'DO', + 'ELSE', + 'END', + 'EXCEPT', + 'FALSE', + 'FOR', + 'FOREIGN', + 'FREEZE', + 'FROM', + 'FULL', + 'GRANT', + 'GROUP', + 'HAVING', + 'ILIKE', + 'IN', + 'INITIALLY', + 'INNER', + 'INTERSECT', + 'INTO', + 'IS', + 'ISNULL', + 'JOIN', + 'LEADING', + 'LEFT', + 'LIKE', + 'LIMIT', + 'LOCALTIME', + 'LOCALTIMESTAMP', + 'NATURAL', + 'NEW', + 'NOT', + 'NOTNULL', + 'NULL', + 'OFF', + 'OFFSET', + 'OLD', + 'ON', + 'ONLY', + 'OR', + 'ORDER', + 'OUTER', + 'OVERLAPS', + 'PLACING', + 'PRIMARY', + 'REFERENCES', + 'SELECT', + 'SESSION_USER', + 'SIMILAR', + 'SOME', + 'TABLE', + 'THEN', + 'TO', + 'TRAILING', + 'TRUE', + 'UNION', + 'UNIQUE', + 'USER', + 'USING', + 'VERBOSE', + 'WHEN', + 'WHERE' + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..e1fdd492d8cee18c6243aac1bf726214c5b6408a --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php @@ -0,0 +1,143 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +use Doctrine\DBAL\Schema\Visitor\Visitor; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Schema\Sequence; +use Doctrine\DBAL\Schema\Index; + +class ReservedKeywordsValidator implements Visitor +{ + /** + * @var KeywordList[] + */ + private $keywordLists = array(); + + /** + * @var array + */ + private $violations = array(); + + /** + * @param \Doctrine\DBAL\Platforms\Keywords\KeywordList[] $keywordLists + */ + public function __construct(array $keywordLists) + { + $this->keywordLists = $keywordLists; + } + + /** + * @return array + */ + public function getViolations() + { + return $this->violations; + } + + /** + * @param string $word + * + * @return array + */ + private function isReservedWord($word) + { + if ($word[0] == "`") { + $word = str_replace('`', '', $word); + } + + $keywordLists = array(); + foreach ($this->keywordLists as $keywordList) { + if ($keywordList->isKeyword($word)) { + $keywordLists[] = $keywordList->getName(); + } + } + + return $keywordLists; + } + + /** + * @param string $asset + * @param array $violatedPlatforms + * + * @return void + */ + private function addViolation($asset, $violatedPlatforms) + { + if ( ! $violatedPlatforms) { + return; + } + + $this->violations[] = $asset . ' keyword violations: ' . implode(', ', $violatedPlatforms); + } + + /** + * {@inheritdoc} + */ + public function acceptColumn(Table $table, Column $column) + { + $this->addViolation( + 'Table ' . $table->getName() . ' column ' . $column->getName(), + $this->isReservedWord($column->getName()) + ); + } + + /** + * {@inheritdoc} + */ + public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) + { + } + + /** + * {@inheritdoc} + */ + public function acceptIndex(Table $table, Index $index) + { + } + + /** + * {@inheritdoc} + */ + public function acceptSchema(Schema $schema) + { + } + + /** + * {@inheritdoc} + */ + public function acceptSequence(Sequence $sequence) + { + } + + /** + * {@inheritdoc} + */ + public function acceptTable(Table $table) + { + $this->addViolation( + 'Table ' . $table->getName(), + $this->isReservedWord($table->getName()) + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php new file mode 100644 index 0000000000000000000000000000000000000000..12eacbf9b9b8f041f7bec376c9d9010d8f837ce1 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * SAP Sybase SQL Anywhere 11 reserved keywords list. + * + * @author Steve Müller + */ +class SQLAnywhere11Keywords extends SQLAnywhereKeywords +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'SQLAnywhere11'; + } + + /** + * {@inheritdoc} + * + * @link http://dcx.sybase.com/1100/en/dbreference_en11/alhakeywords.html + */ + protected function getKeywords() + { + return array_merge( + array_diff( + parent::getKeywords(), + array('IQ') + ), + array( + 'MERGE', + 'OPENSTRING' + ) + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere12Keywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere12Keywords.php new file mode 100644 index 0000000000000000000000000000000000000000..22e04893e98c5868573e54620ba72de28b84d145 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere12Keywords.php @@ -0,0 +1,64 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * SAP Sybase SQL Anywhere 12 reserved keywords list. + * + * @author Steve Müller + */ +class SQLAnywhere12Keywords extends SQLAnywhere11Keywords +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'SQLAnywhere12'; + } + + /** + * {@inheritdoc} + * + * @link http://dcx.sybase.com/1200/en/dbreference/alhakeywords.html + */ + protected function getKeywords() + { + return array_merge( + array_diff( + parent::getKeywords(), + array( + 'INDEX_LPAREN', + 'SYNTAX_ERROR', + 'WITH_CUBE', + 'WITH_LPAREN', + 'WITH_ROLLUP' + ) + ), + array( + 'DATETIMEOFFSET', + 'LIMIT', + 'OPENXML', + 'SPATIAL', + 'TREAT' + ) + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php new file mode 100644 index 0000000000000000000000000000000000000000..4d78b84109f8edee2ee717bcbec5a1b2a4f71245 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php @@ -0,0 +1,56 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * SAP Sybase SQL Anywhere 16 reserved keywords list. + * + * @author Steve Müller + */ +class SQLAnywhere16Keywords extends SQLAnywhere12Keywords +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'SQLAnywhere16'; + } + + /** + * {@inheritdoc} + * + * @link http://dcx.sybase.com/index.html#sa160/en/dbreference/alhakeywords.html + */ + protected function getKeywords() + { + return array_merge( + parent::getKeywords(), + array( + 'ARRAY', + 'JSON', + 'ROW', + 'ROWTYPE', + 'UNNEST', + 'VARRAY' + ) + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php new file mode 100644 index 0000000000000000000000000000000000000000..cabf1e44914ba31804767de9f6fcb1e3acc988aa --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php @@ -0,0 +1,281 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * SAP Sybase SQL Anywhere 10 reserved keywords list. + * + * @author Steve Müller + */ +class SQLAnywhereKeywords extends KeywordList +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'SQLAnywhere'; + } + + /** + * {@inheritdoc} + * + * @link http://infocenter.sybase.com/help/topic/com.sybase.dbrfen10/pdf/dbrfen10.pdf?noframes=true + */ + protected function getKeywords() + { + return array( + 'ADD', + 'ALL', + 'ALTER', + 'AND', + 'ANY', + 'AS', + 'ASC', + 'ATTACH', + 'BACKUP', + 'BEGIN', + 'BETWEEN', + 'BIGINT', + 'BINARY', + 'BIT', + 'BOTTOM', + 'BREAK', + 'BY', + 'CALL', + 'CAPABILITY', + 'CASCADE', + 'CASE', + 'CAST', + 'CHAR', + 'CHAR_CONVERT', + 'CHARACTER', + 'CHECK', + 'CHECKPOINT', + 'CLOSE', + 'COMMENT', + 'COMMIT', + 'COMPRESSED', + 'CONFLICT', + 'CONNECT', + 'CONSTRAINT', + 'CONTAINS', + 'CONTINUE', + 'CONVERT', + 'CREATE', + 'CROSS', + 'CUBE', + 'CURRENT', + 'CURRENT_TIMESTAMP', + 'CURRENT_USER', + 'CURSOR', + 'DATE', + 'DBSPACE', + 'DEALLOCATE', + 'DEC', + 'DECIMAL', + 'DECLARE', + 'DEFAULT', + 'DELETE', + 'DELETING', + 'DESC', + 'DETACH', + 'DISTINCT', + 'DO', + 'DOUBLE', + 'DROP', + 'DYNAMIC', + 'ELSE', + 'ELSEIF', + 'ENCRYPTED', + 'END', + 'ENDIF', + 'ESCAPE', + 'EXCEPT', + 'EXCEPTION', + 'EXEC', + 'EXECUTE', + 'EXISTING', + 'EXISTS', + 'EXTERNLOGIN', + 'FETCH', + 'FIRST', + 'FLOAT', + 'FOR', + 'FORCE', + 'FOREIGN', + 'FORWARD', + 'FROM', + 'FULL', + 'GOTO', + 'GRANT', + 'GROUP', + 'HAVING', + 'HOLDLOCK', + 'IDENTIFIED', + 'IF', + 'IN', + 'INDEX', + 'INDEX_LPAREN', + 'INNER', + 'INOUT', + 'INSENSITIVE', + 'INSERT', + 'INSERTING', + 'INSTALL', + 'INSTEAD', + 'INT', + 'INTEGER', + 'INTEGRATED', + 'INTERSECT', + 'INTO', + 'IQ', + 'IS', + 'ISOLATION', + 'JOIN', + 'KERBEROS', + 'KEY', + 'LATERAL', + 'LEFT', + 'LIKE', + 'LOCK', + 'LOGIN', + 'LONG', + 'MATCH', + 'MEMBERSHIP', + 'MESSAGE', + 'MODE', + 'MODIFY', + 'NATURAL', + 'NCHAR', + 'NEW', + 'NO', + 'NOHOLDLOCK', + 'NOT', + 'NOTIFY', + 'NULL', + 'NUMERIC', + 'NVARCHAR', + 'OF', + 'OFF', + 'ON', + 'OPEN', + 'OPTION', + 'OPTIONS', + 'OR', + 'ORDER', + 'OTHERS', + 'OUT', + 'OUTER', + 'OVER', + 'PASSTHROUGH', + 'PRECISION', + 'PREPARE', + 'PRIMARY', + 'PRINT', + 'PRIVILEGES', + 'PROC', + 'PROCEDURE', + 'PUBLICATION', + 'RAISERROR', + 'READTEXT', + 'REAL', + 'REFERENCE', + 'REFERENCES', + 'REFRESH', + 'RELEASE', + 'REMOTE', + 'REMOVE', + 'RENAME', + 'REORGANIZE', + 'RESOURCE', + 'RESTORE', + 'RESTRICT', + 'RETURN', + 'REVOKE', + 'RIGHT', + 'ROLLBACK', + 'ROLLUP', + 'SAVE', + 'SAVEPOINT', + 'SCROLL', + 'SELECT', + 'SENSITIVE', + 'SESSION', + 'SET', + 'SETUSER', + 'SHARE', + 'SMALLINT', + 'SOME', + 'SQLCODE', + 'SQLSTATE', + 'START', + 'STOP', + 'SUBTRANS', + 'SUBTRANSACTION', + 'SYNCHRONIZE', + 'SYNTAX_ERROR', + 'TABLE', + 'TEMPORARY', + 'THEN', + 'TIME', + 'TIMESTAMP', + 'TINYINT', + 'TO', + 'TOP', + 'TRAN', + 'TRIGGER', + 'TRUNCATE', + 'TSEQUAL', + 'UNBOUNDED', + 'UNION', + 'UNIQUE', + 'UNIQUEIDENTIFIER', + 'UNKNOWN', + 'UNSIGNED', + 'UPDATE', + 'UPDATING', + 'USER', + 'USING', + 'VALIDATE', + 'VALUES', + 'VARBINARY', + 'VARBIT', + 'VARCHAR', + 'VARIABLE', + 'VARYING', + 'VIEW', + 'WAIT', + 'WAITFOR', + 'WHEN', + 'WHERE', + 'WHILE', + 'WINDOW', + 'WITH', + 'WITH_CUBE', + 'WITH_LPAREN', + 'WITH_ROLLUP', + 'WITHIN', + 'WORK', + 'WRITETEXT', + 'XML' + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php new file mode 100644 index 0000000000000000000000000000000000000000..3a7434910f3f3b7578db0ae7566913d18fb2a85e --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php @@ -0,0 +1,56 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * Microsoft SQL Server 2005 reserved keyword dictionary. + * + * @license BSD http://www.opensource.org/licenses/bsd-license.php + * @link www.doctrine-project.com + * @since 2.3 + * @author Steve Müller + */ +class SQLServer2005Keywords extends SQLServerKeywords +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'SQLServer2005'; + } + + /** + * {@inheritdoc} + * + * @link http://msdn.microsoft.com/en-US/library/ms189822%28v=sql.90%29.aspx + */ + protected function getKeywords() + { + return array_merge(array_diff(parent::getKeywords(), array('DUMMY')), array( + 'EXTERNAL', + 'PIVOT', + 'REVERT', + 'SECURITYAUDIT', + 'TABLESAMPLE', + 'UNPIVOT' + )); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2008Keywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2008Keywords.php new file mode 100644 index 0000000000000000000000000000000000000000..38556b50557e282aeda89433c3435d487a780fc1 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2008Keywords.php @@ -0,0 +1,51 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * Microsoft SQL Server 2008 reserved keyword dictionary. + * + * @license BSD http://www.opensource.org/licenses/bsd-license.php + * @link www.doctrine-project.com + * @since 2.3 + * @author Steve Müller + */ +class SQLServer2008Keywords extends SQLServer2005Keywords +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'SQLServer2008'; + } + + /** + * {@inheritdoc} + * + * @link http://msdn.microsoft.com/en-us/library/ms189822%28v=sql.100%29.aspx + */ + protected function getKeywords() + { + return array_merge(parent::getKeywords(), array( + 'MERGE' + )); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php new file mode 100644 index 0000000000000000000000000000000000000000..ada1c026bd7a1d398f9e19b9a4c80b96e020b31a --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * Microsoft SQL Server 2012 reserved keyword dictionary. + * + * @license BSD http://www.opensource.org/licenses/bsd-license.php + * @link www.doctrine-project.com + * @since 2.3 + * @author Steve Müller + */ +class SQLServer2012Keywords extends SQLServer2008Keywords +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'SQLServer2012'; + } + + /** + * {@inheritdoc} + * + * @link http://msdn.microsoft.com/en-us/library/ms189822.aspx + */ + protected function getKeywords() + { + return array_merge(parent::getKeywords(), array( + 'SEMANTICKEYPHRASETABLE', + 'SEMANTICSIMILARITYDETAILSTABLE', + 'SEMANTICSIMILARITYTABLE', + 'TRY_CONVERT', + 'WITHIN GROUP' + )); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServerKeywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServerKeywords.php new file mode 100644 index 0000000000000000000000000000000000000000..fb43d2d531329f55f5a49617c21064add0720654 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServerKeywords.php @@ -0,0 +1,231 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * Microsoft SQL Server 2000 reserved keyword dictionary. + * + * @license BSD http://www.opensource.org/licenses/bsd-license.php + * @link www.doctrine-project.com + * @since 2.0 + * @author Benjamin Eberlei + * @author David Coallier + * @author Steve Müller + */ +class SQLServerKeywords extends KeywordList +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'SQLServer'; + } + + /** + * {@inheritdoc} + * + * @link http://msdn.microsoft.com/en-us/library/aa238507%28v=sql.80%29.aspx + */ + protected function getKeywords() + { + return array( + 'ADD', + 'ALL', + 'ALTER', + 'AND', + 'ANY', + 'AS', + 'ASC', + 'AUTHORIZATION', + 'BACKUP', + 'BEGIN', + 'BETWEEN', + 'BREAK', + 'BROWSE', + 'BULK', + 'BY', + 'CASCADE', + 'CASE', + 'CHECK', + 'CHECKPOINT', + 'CLOSE', + 'CLUSTERED', + 'COALESCE', + 'COLLATE', + 'COLUMN', + 'COMMIT', + 'COMPUTE', + 'CONSTRAINT', + 'CONTAINS', + 'CONTAINSTABLE', + 'CONTINUE', + 'CONVERT', + 'CREATE', + 'CROSS', + 'CURRENT', + 'CURRENT_DATE', + 'CURRENT_TIME', + 'CURRENT_TIMESTAMP', + 'CURRENT_USER', + 'CURSOR', + 'DATABASE', + 'DBCC', + 'DEALLOCATE', + 'DECLARE', + 'DEFAULT', + 'DELETE', + 'DENY', + 'DESC', + 'DISK', + 'DISTINCT', + 'DISTRIBUTED', + 'DOUBLE', + 'DROP', + 'DUMP', + 'ELSE', + 'END', + 'ERRLVL', + 'ESCAPE', + 'EXCEPT', + 'EXEC', + 'EXECUTE', + 'EXISTS', + 'EXIT', + 'EXTERNAL', + 'FETCH', + 'FILE', + 'FILLFACTOR', + 'FOR', + 'FOREIGN', + 'FREETEXT', + 'FREETEXTTABLE', + 'FROM', + 'FULL', + 'FUNCTION', + 'GOTO', + 'GRANT', + 'GROUP', + 'HAVING', + 'HOLDLOCK', + 'IDENTITY', + 'IDENTITY_INSERT', + 'IDENTITYCOL', + 'IF', + 'IN', + 'INDEX', + 'INNER', + 'INSERT', + 'INTERSECT', + 'INTO', + 'IS', + 'JOIN', + 'KEY', + 'KILL', + 'LEFT', + 'LIKE', + 'LINENO', + 'LOAD', + 'NATIONAL', + 'NOCHECK ', + 'NONCLUSTERED', + 'NOT', + 'NULL', + 'NULLIF', + 'OF', + 'OFF', + 'OFFSETS', + 'ON', + 'OPEN', + 'OPENDATASOURCE', + 'OPENQUERY', + 'OPENROWSET', + 'OPENXML', + 'OPTION', + 'OR', + 'ORDER', + 'OUTER', + 'OVER', + 'PERCENT', + 'PIVOT', + 'PLAN', + 'PRECISION', + 'PRIMARY', + 'PRINT', + 'PROC', + 'PROCEDURE', + 'PUBLIC', + 'RAISERROR', + 'READ', + 'READTEXT', + 'RECONFIGURE', + 'REFERENCES', + 'REPLICATION', + 'RESTORE', + 'RESTRICT', + 'RETURN', + 'REVERT', + 'REVOKE', + 'RIGHT', + 'ROLLBACK', + 'ROWCOUNT', + 'ROWGUIDCOL', + 'RULE', + 'SAVE', + 'SCHEMA', + 'SECURITYAUDIT', + 'SELECT', + 'SESSION_USER', + 'SET', + 'SETUSER', + 'SHUTDOWN', + 'SOME', + 'STATISTICS', + 'SYSTEM_USER', + 'TABLE', + 'TABLESAMPLE', + 'TEXTSIZE', + 'THEN', + 'TO', + 'TOP', + 'TRAN', + 'TRANSACTION', + 'TRIGGER', + 'TRUNCATE', + 'TSEQUAL', + 'UNION', + 'UNIQUE', + 'UNPIVOT', + 'UPDATE', + 'UPDATETEXT', + 'USE', + 'USER', + 'VALUES', + 'VARYING', + 'VIEW', + 'WAITFOR', + 'WHEN', + 'WHERE', + 'WHILE', + 'WITH', + 'WRITETEXT' + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLiteKeywords.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLiteKeywords.php new file mode 100644 index 0000000000000000000000000000000000000000..a162d3d5396a372b90523907e3c253ff730eb520 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLiteKeywords.php @@ -0,0 +1,168 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * SQLite Keywordlist. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class SQLiteKeywords extends KeywordList +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'SQLite'; + } + + /** + * {@inheritdoc} + */ + protected function getKeywords() + { + return array( + 'ABORT', + 'ACTION', + 'ADD', + 'AFTER', + 'ALL', + 'ALTER', + 'ANALYZE', + 'AND', + 'AS', + 'ASC', + 'ATTACH', + 'AUTOINCREMENT', + 'BEFORE', + 'BEGIN', + 'BETWEEN', + 'BY', + 'CASCADE', + 'CASE', + 'CAST', + 'CHECK', + 'COLLATE', + 'COLUMN', + 'COMMIT', + 'CONFLICT', + 'CONSTRAINT', + 'CREATE', + 'CROSS', + 'CURRENT_DATE', + 'CURRENT_TIME', + 'CURRENT_TIMESTAMP', + 'DATABASE', + 'DEFAULT', + 'DEFERRABLE', + 'DEFERRED', + 'DELETE', + 'DESC', + 'DETACH', + 'DISTINCT', + 'DROP', + 'EACH', + 'ELSE', + 'END', + 'ESCAPE', + 'EXCEPT', + 'EXCLUSIVE', + 'EXISTS', + 'EXPLAIN', + 'FAIL', + 'FOR', + 'FOREIGN', + 'FROM', + 'FULL', + 'GLOB', + 'GROUP', + 'HAVING', + 'IF', + 'IGNORE', + 'IMMEDIATE', + 'IN', + 'INDEX', + 'INDEXED', + 'INITIALLY', + 'INNER', + 'INSERT', + 'INSTEAD', + 'INTERSECT', + 'INTO', + 'IS', + 'ISNULL', + 'JOIN', + 'KEY', + 'LEFT', + 'LIKE', + 'LIMIT', + 'MATCH', + 'NATURAL', + 'NO', + 'NOT', + 'NOTNULL', + 'NULL', + 'OF', + 'OFFSET', + 'ON', + 'OR', + 'ORDER', + 'OUTER', + 'PLAN', + 'PRAGMA', + 'PRIMARY', + 'QUERY', + 'RAISE', + 'REFERENCES', + 'REGEXP', + 'REINDEX', + 'RELEASE', + 'RENAME', + 'REPLACE', + 'RESTRICT', + 'RIGHT', + 'ROLLBACK', + 'ROW', + 'SAVEPOINT', + 'SELECT', + 'SET', + 'TABLE', + 'TEMP', + 'TEMPORARY', + 'THEN', + 'TO', + 'TRANSACTION', + 'TRIGGER', + 'UNION', + 'UNIQUE', + 'UPDATE', + 'USING', + 'VACUUM', + 'VALUES', + 'VIEW', + 'VIRTUAL', + 'WHEN', + 'WHERE' + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySQL57Platform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySQL57Platform.php new file mode 100644 index 0000000000000000000000000000000000000000..36b525e2063fa5a2c8ae210e3c787f7dfee6bf29 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySQL57Platform.php @@ -0,0 +1,67 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\TableDiff; + +/** + * Provides the behavior, features and SQL dialect of the MySQL 5.7 database platform. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class MySQL57Platform extends MySqlPlatform +{ + /** + * {@inheritdoc} + */ + protected function getPreAlterTableRenameIndexForeignKeySQL(TableDiff $diff) + { + return array(); + } + + /** + * {@inheritdoc} + */ + protected function getPostAlterTableRenameIndexForeignKeySQL(TableDiff $diff) + { + return array(); + } + + /** + * {@inheritdoc} + */ + protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName) + { + return array( + 'ALTER TABLE ' . $tableName . ' RENAME INDEX ' . $oldIndexName . ' TO ' . $index->getQuotedName($this) + ); + } + + /** + * {@inheritdoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\MySQL57Keywords'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php new file mode 100644 index 0000000000000000000000000000000000000000..15d9df39468bed84c13a8202e870e632a6350dc3 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php @@ -0,0 +1,1093 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\Schema\Identifier; +use Doctrine\DBAL\Schema\TableDiff; +use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Types\BlobType; +use Doctrine\DBAL\Types\TextType; + +/** + * The MySqlPlatform provides the behavior, features and SQL dialect of the + * MySQL database platform. This platform represents a MySQL 5.0 or greater platform that + * uses the InnoDB storage engine. + * + * @since 2.0 + * @author Roman Borschel + * @author Benjamin Eberlei + * @todo Rename: MySQLPlatform + */ +class MySqlPlatform extends AbstractPlatform +{ + const LENGTH_LIMIT_TINYTEXT = 255; + const LENGTH_LIMIT_TEXT = 65535; + const LENGTH_LIMIT_MEDIUMTEXT = 16777215; + + const LENGTH_LIMIT_TINYBLOB = 255; + const LENGTH_LIMIT_BLOB = 65535; + const LENGTH_LIMIT_MEDIUMBLOB = 16777215; + + /** + * Adds MySQL-specific LIMIT clause to the query + * 18446744073709551615 is 2^64-1 maximum of unsigned BIGINT the biggest limit possible + */ + protected function doModifyLimitQuery($query, $limit, $offset) + { + if ($limit !== null) { + $query .= ' LIMIT ' . $limit; + if ($offset !== null) { + $query .= ' OFFSET ' . $offset; + } + } elseif ($offset !== null) { + $query .= ' LIMIT 18446744073709551615 OFFSET ' . $offset; + } + + return $query; + } + + /** + * {@inheritDoc} + */ + public function getIdentifierQuoteCharacter() + { + return '`'; + } + + /** + * {@inheritDoc} + */ + public function getRegexpExpression() + { + return 'RLIKE'; + } + + /** + * {@inheritDoc} + */ + public function getGuidExpression() + { + return 'UUID()'; + } + + /** + * {@inheritDoc} + */ + public function getLocateExpression($str, $substr, $startPos = false) + { + if ($startPos == false) { + return 'LOCATE(' . $substr . ', ' . $str . ')'; + } + + return 'LOCATE(' . $substr . ', ' . $str . ', '.$startPos.')'; + } + + /** + * {@inheritDoc} + */ + public function getConcatExpression() + { + $args = func_get_args(); + + return 'CONCAT(' . join(', ', (array) $args) . ')'; + } + + /** + * {@inheritdoc} + */ + protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) + { + $function = '+' === $operator ? 'DATE_ADD' : 'DATE_SUB'; + + return $function . '(' . $date . ', INTERVAL ' . $interval . ' ' . $unit . ')'; + } + + /** + * {@inheritDoc} + */ + public function getDateDiffExpression($date1, $date2) + { + return 'DATEDIFF(' . $date1 . ', ' . $date2 . ')'; + } + + /** + * {@inheritDoc} + */ + public function getListDatabasesSQL() + { + return 'SHOW DATABASES'; + } + + /** + * {@inheritDoc} + */ + public function getListTableConstraintsSQL($table) + { + return 'SHOW INDEX FROM ' . $table; + } + + /** + * {@inheritDoc} + * + * Two approaches to listing the table indexes. The information_schema is + * preferred, because it doesn't cause problems with SQL keywords such as "order" or "table". + */ + public function getListTableIndexesSQL($table, $currentDatabase = null) + { + if ($currentDatabase) { + $currentDatabase = $this->quoteStringLiteral($currentDatabase); + $table = $this->quoteStringLiteral($table); + + return "SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, ". + "SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, ". + "CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, " . + "NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment " . + "FROM information_schema.STATISTICS WHERE TABLE_NAME = " . $table . " AND TABLE_SCHEMA = " . $currentDatabase; + } + + return 'SHOW INDEX FROM ' . $table; + } + + /** + * {@inheritDoc} + */ + public function getListViewsSQL($database) + { + $database = $this->quoteStringLiteral($database); + + return "SELECT * FROM information_schema.VIEWS WHERE TABLE_SCHEMA = " . $database; + } + + /** + * {@inheritDoc} + */ + public function getListTableForeignKeysSQL($table, $database = null) + { + $table = $this->quoteStringLiteral($table); + + if (null !== $database) { + $database = $this->quoteStringLiteral($database); + } + + $sql = "SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, ". + "k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ ". + "FROM information_schema.key_column_usage k /*!50116 ". + "INNER JOIN information_schema.referential_constraints c ON ". + " c.constraint_name = k.constraint_name AND ". + " c.table_name = $table */ WHERE k.table_name = $table"; + + $databaseNameSql = null === $database ? 'DATABASE()' : $database; + + $sql .= " AND k.table_schema = $databaseNameSql /*!50116 AND c.constraint_schema = $databaseNameSql */"; + $sql .= " AND k.`REFERENCED_COLUMN_NAME` is not NULL"; + + return $sql; + } + + /** + * {@inheritDoc} + */ + public function getCreateViewSQL($name, $sql) + { + return 'CREATE VIEW ' . $name . ' AS ' . $sql; + } + + /** + * {@inheritDoc} + */ + public function getDropViewSQL($name) + { + return 'DROP VIEW '. $name; + } + + /** + * {@inheritDoc} + */ + protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) + { + return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(255)') + : ($length ? 'VARCHAR(' . $length . ')' : 'VARCHAR(255)'); + } + + /** + * {@inheritdoc} + */ + protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) + { + return $fixed ? 'BINARY(' . ($length ?: 255) . ')' : 'VARBINARY(' . ($length ?: 255) . ')'; + } + + /** + * Gets the SQL snippet used to declare a CLOB column type. + * TINYTEXT : 2 ^ 8 - 1 = 255 + * TEXT : 2 ^ 16 - 1 = 65535 + * MEDIUMTEXT : 2 ^ 24 - 1 = 16777215 + * LONGTEXT : 2 ^ 32 - 1 = 4294967295 + * + * @param array $field + * + * @return string + */ + public function getClobTypeDeclarationSQL(array $field) + { + if ( ! empty($field['length']) && is_numeric($field['length'])) { + $length = $field['length']; + + if ($length <= static::LENGTH_LIMIT_TINYTEXT) { + return 'TINYTEXT'; + } + + if ($length <= static::LENGTH_LIMIT_TEXT) { + return 'TEXT'; + } + + if ($length <= static::LENGTH_LIMIT_MEDIUMTEXT) { + return 'MEDIUMTEXT'; + } + } + + return 'LONGTEXT'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + { + if (isset($fieldDeclaration['version']) && $fieldDeclaration['version'] == true) { + return 'TIMESTAMP'; + } + + return 'DATETIME'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIME'; + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $field) + { + return 'TINYINT(1)'; + } + + /** + * Obtain DBMS specific SQL code portion needed to set the COLLATION + * of a field declaration to be used in statements like CREATE TABLE. + * + * @deprecated Deprecated since version 2.5, Use {@link self::getColumnCollationDeclarationSQL()} instead. + * + * @param string $collation name of the collation + * + * @return string DBMS specific SQL code portion needed to set the COLLATION + * of a field declaration. + */ + public function getCollationFieldDeclaration($collation) + { + return $this->getColumnCollationDeclarationSQL($collation); + } + + /** + * {@inheritDoc} + * + * MySql prefers "autoincrement" identity columns since sequences can only + * be emulated with a table. + */ + public function prefersIdentityColumns() + { + return true; + } + + /** + * {@inheritDoc} + * + * MySql supports this through AUTO_INCREMENT columns. + */ + public function supportsIdentityColumns() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function supportsInlineColumnComments() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function supportsColumnCollation() + { + return true; + } + + public function getListTablesSQL() + { + return "SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'"; + } + + /** + * {@inheritDoc} + */ + public function getListTableColumnsSQL($table, $database = null) + { + $table = $this->quoteStringLiteral($table); + + if ($database) { + $database = $this->quoteStringLiteral($database); + } else { + $database = 'DATABASE()'; + } + + return "SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, ". + "COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, " . + "CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation ". + "FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = " . $database . " AND TABLE_NAME = " . $table; + } + + /** + * {@inheritDoc} + */ + public function getCreateDatabaseSQL($name) + { + return 'CREATE DATABASE ' . $name; + } + + /** + * {@inheritDoc} + */ + public function getDropDatabaseSQL($name) + { + return 'DROP DATABASE ' . $name; + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL($tableName, array $columns, array $options = array()) + { + $queryFields = $this->getColumnDeclarationListSQL($columns); + + if (isset($options['uniqueConstraints']) && ! empty($options['uniqueConstraints'])) { + foreach ($options['uniqueConstraints'] as $index => $definition) { + $queryFields .= ', ' . $this->getUniqueConstraintDeclarationSQL($index, $definition); + } + } + + // add all indexes + if (isset($options['indexes']) && ! empty($options['indexes'])) { + foreach ($options['indexes'] as $index => $definition) { + $queryFields .= ', ' . $this->getIndexDeclarationSQL($index, $definition); + } + } + + // attach all primary keys + if (isset($options['primary']) && ! empty($options['primary'])) { + $keyColumns = array_unique(array_values($options['primary'])); + $queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')'; + } + + $query = 'CREATE '; + + if (!empty($options['temporary'])) { + $query .= 'TEMPORARY '; + } + + $query .= 'TABLE ' . $tableName . ' (' . $queryFields . ') '; + $query .= $this->buildTableOptions($options); + $query .= $this->buildPartitionOptions($options); + + $sql[] = $query; + $engine = 'INNODB'; + + if (isset($options['engine'])) { + $engine = strtoupper(trim($options['engine'])); + } + + // Propagate foreign key constraints only for InnoDB. + if (isset($options['foreignKeys']) && $engine === 'INNODB') { + foreach ((array) $options['foreignKeys'] as $definition) { + $sql[] = $this->getCreateForeignKeySQL($definition, $tableName); + } + } + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function getDefaultValueDeclarationSQL($field) + { + // Unset the default value if the given field definition does not allow default values. + if ($field['type'] instanceof TextType || $field['type'] instanceof BlobType) { + $field['default'] = null; + } + + return parent::getDefaultValueDeclarationSQL($field); + } + + /** + * Build SQL for table options + * + * @param array $options + * + * @return string + */ + private function buildTableOptions(array $options) + { + if (isset($options['table_options'])) { + return $options['table_options']; + } + + $tableOptions = array(); + + // Charset + if ( ! isset($options['charset'])) { + $options['charset'] = 'utf8'; + } + + $tableOptions[] = sprintf('DEFAULT CHARACTER SET %s', $options['charset']); + + // Collate + if ( ! isset($options['collate'])) { + $options['collate'] = 'utf8_unicode_ci'; + } + + $tableOptions[] = sprintf('COLLATE %s', $options['collate']); + + // Engine + if ( ! isset($options['engine'])) { + $options['engine'] = 'InnoDB'; + } + + $tableOptions[] = sprintf('ENGINE = %s', $options['engine']); + + // Auto increment + if (isset($options['auto_increment'])) { + $tableOptions[] = sprintf('AUTO_INCREMENT = %s', $options['auto_increment']); + } + + // Comment + if (isset($options['comment'])) { + $comment = trim($options['comment'], " '"); + + $tableOptions[] = sprintf("COMMENT = %s ", $this->quoteStringLiteral($comment)); + } + + // Row format + if (isset($options['row_format'])) { + $tableOptions[] = sprintf('ROW_FORMAT = %s', $options['row_format']); + } + + return implode(' ', $tableOptions); + } + + /** + * Build SQL for partition options. + * + * @param array $options + * + * @return string + */ + private function buildPartitionOptions(array $options) + { + return (isset($options['partition_options'])) + ? ' ' . $options['partition_options'] + : ''; + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff) + { + $columnSql = array(); + $queryParts = array(); + if ($diff->newName !== false) { + $queryParts[] = 'RENAME TO ' . $diff->getNewName()->getQuotedName($this); + } + + foreach ($diff->addedColumns as $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + + $columnArray = $column->toArray(); + $columnArray['comment'] = $this->getColumnComment($column); + $queryParts[] = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray); + } + + foreach ($diff->removedColumns as $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + + $queryParts[] = 'DROP ' . $column->getQuotedName($this); + } + + foreach ($diff->changedColumns as $columnDiff) { + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + + /* @var $columnDiff \Doctrine\DBAL\Schema\ColumnDiff */ + $column = $columnDiff->column; + $columnArray = $column->toArray(); + + // Don't propagate default value changes for unsupported column types. + if ($columnDiff->hasChanged('default') && + count($columnDiff->changedProperties) === 1 && + ($columnArray['type'] instanceof TextType || $columnArray['type'] instanceof BlobType) + ) { + continue; + } + + $columnArray['comment'] = $this->getColumnComment($column); + $queryParts[] = 'CHANGE ' . ($columnDiff->getOldColumnName()->getQuotedName($this)) . ' ' + . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray); + } + + foreach ($diff->renamedColumns as $oldColumnName => $column) { + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + + $oldColumnName = new Identifier($oldColumnName); + $columnArray = $column->toArray(); + $columnArray['comment'] = $this->getColumnComment($column); + $queryParts[] = 'CHANGE ' . $oldColumnName->getQuotedName($this) . ' ' + . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray); + } + + if (isset($diff->addedIndexes['primary'])) { + $keyColumns = array_unique(array_values($diff->addedIndexes['primary']->getColumns())); + $queryParts[] = 'ADD PRIMARY KEY (' . implode(', ', $keyColumns) . ')'; + unset($diff->addedIndexes['primary']); + } + + $sql = array(); + $tableSql = array(); + + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { + if (count($queryParts) > 0) { + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . implode(", ", $queryParts); + } + $sql = array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $sql, + $this->getPostAlterTableIndexForeignKeySQL($diff) + ); + } + + return array_merge($sql, $tableSql, $columnSql); + } + + /** + * {@inheritDoc} + */ + protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff) + { + $sql = array(); + $table = $diff->getName($this)->getQuotedName($this); + + foreach ($diff->changedIndexes as $changedIndex) { + $sql = array_merge($sql, $this->getPreAlterTableAlterPrimaryKeySQL($diff, $changedIndex)); + } + + foreach ($diff->removedIndexes as $remKey => $remIndex) { + $sql = array_merge($sql, $this->getPreAlterTableAlterPrimaryKeySQL($diff, $remIndex)); + + foreach ($diff->addedIndexes as $addKey => $addIndex) { + if ($remIndex->getColumns() == $addIndex->getColumns()) { + + $indexClause = 'INDEX ' . $addIndex->getName(); + + if ($addIndex->isPrimary()) { + $indexClause = 'PRIMARY KEY'; + } elseif ($addIndex->isUnique()) { + $indexClause = 'UNIQUE INDEX ' . $addIndex->getName(); + } + + $query = 'ALTER TABLE ' . $table . ' DROP INDEX ' . $remIndex->getName() . ', '; + $query .= 'ADD ' . $indexClause; + $query .= ' (' . $this->getIndexFieldDeclarationListSQL($addIndex->getQuotedColumns($this)) . ')'; + + $sql[] = $query; + + unset($diff->removedIndexes[$remKey]); + unset($diff->addedIndexes[$addKey]); + + break; + } + } + } + + $engine = 'INNODB'; + + if ($diff->fromTable instanceof Table && $diff->fromTable->hasOption('engine')) { + $engine = strtoupper(trim($diff->fromTable->getOption('engine'))); + } + + // Suppress foreign key constraint propagation on non-supporting engines. + if ('INNODB' !== $engine) { + $diff->addedForeignKeys = array(); + $diff->changedForeignKeys = array(); + $diff->removedForeignKeys = array(); + } + + $sql = array_merge( + $sql, + $this->getPreAlterTableAlterIndexForeignKeySQL($diff), + parent::getPreAlterTableIndexForeignKeySQL($diff), + $this->getPreAlterTableRenameIndexForeignKeySQL($diff) + ); + + return $sql; + } + + /** + * @param TableDiff $diff + * @param Index $index + * + * @return string[] + */ + private function getPreAlterTableAlterPrimaryKeySQL(TableDiff $diff, Index $index) + { + $sql = array(); + + if (! $index->isPrimary() || ! $diff->fromTable instanceof Table) { + return $sql; + } + + $tableName = $diff->getName($this)->getQuotedName($this); + + // Dropping primary keys requires to unset autoincrement attribute on the particular column first. + foreach ($index->getColumns() as $columnName) { + $column = $diff->fromTable->getColumn($columnName); + + if ($column->getAutoincrement() === true) { + $column->setAutoincrement(false); + + $sql[] = 'ALTER TABLE ' . $tableName . ' MODIFY ' . + $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); + + // original autoincrement information might be needed later on by other parts of the table alteration + $column->setAutoincrement(true); + } + } + + return $sql; + } + + /** + * @param TableDiff $diff The table diff to gather the SQL for. + * + * @return array + */ + private function getPreAlterTableAlterIndexForeignKeySQL(TableDiff $diff) + { + $sql = array(); + $table = $diff->getName($this)->getQuotedName($this); + + foreach ($diff->changedIndexes as $changedIndex) { + // Changed primary key + if ($changedIndex->isPrimary() && $diff->fromTable instanceof Table) { + foreach ($diff->fromTable->getPrimaryKeyColumns() as $columnName) { + $column = $diff->fromTable->getColumn($columnName); + + // Check if an autoincrement column was dropped from the primary key. + if ($column->getAutoincrement() && ! in_array($columnName, $changedIndex->getColumns())) { + // The autoincrement attribute needs to be removed from the dropped column + // before we can drop and recreate the primary key. + $column->setAutoincrement(false); + + $sql[] = 'ALTER TABLE ' . $table . ' MODIFY ' . + $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); + + // Restore the autoincrement attribute as it might be needed later on + // by other parts of the table alteration. + $column->setAutoincrement(true); + } + } + } + } + + return $sql; + } + + /** + * @param TableDiff $diff The table diff to gather the SQL for. + * + * @return array + */ + protected function getPreAlterTableRenameIndexForeignKeySQL(TableDiff $diff) + { + $sql = array(); + $tableName = $diff->getName($this)->getQuotedName($this); + + foreach ($this->getRemainingForeignKeyConstraintsRequiringRenamedIndexes($diff) as $foreignKey) { + if (! in_array($foreignKey, $diff->changedForeignKeys, true)) { + $sql[] = $this->getDropForeignKeySQL($foreignKey, $tableName); + } + } + + return $sql; + } + + /** + * Returns the remaining foreign key constraints that require one of the renamed indexes. + * + * "Remaining" here refers to the diff between the foreign keys currently defined in the associated + * table and the foreign keys to be removed. + * + * @param TableDiff $diff The table diff to evaluate. + * + * @return array + */ + private function getRemainingForeignKeyConstraintsRequiringRenamedIndexes(TableDiff $diff) + { + if (empty($diff->renamedIndexes) || ! $diff->fromTable instanceof Table) { + return array(); + } + + $foreignKeys = array(); + /** @var \Doctrine\DBAL\Schema\ForeignKeyConstraint[] $remainingForeignKeys */ + $remainingForeignKeys = array_diff_key( + $diff->fromTable->getForeignKeys(), + $diff->removedForeignKeys + ); + + foreach ($remainingForeignKeys as $foreignKey) { + foreach ($diff->renamedIndexes as $index) { + if ($foreignKey->intersectsIndexColumns($index)) { + $foreignKeys[] = $foreignKey; + + break; + } + } + } + + return $foreignKeys; + } + + /** + * {@inheritdoc} + */ + protected function getPostAlterTableIndexForeignKeySQL(TableDiff $diff) + { + return array_merge( + parent::getPostAlterTableIndexForeignKeySQL($diff), + $this->getPostAlterTableRenameIndexForeignKeySQL($diff) + ); + } + + /** + * @param TableDiff $diff The table diff to gather the SQL for. + * + * @return array + */ + protected function getPostAlterTableRenameIndexForeignKeySQL(TableDiff $diff) + { + $sql = array(); + $tableName = (false !== $diff->newName) + ? $diff->getNewName()->getQuotedName($this) + : $diff->getName($this)->getQuotedName($this); + + foreach ($this->getRemainingForeignKeyConstraintsRequiringRenamedIndexes($diff) as $foreignKey) { + if (! in_array($foreignKey, $diff->changedForeignKeys, true)) { + $sql[] = $this->getCreateForeignKeySQL($foreignKey, $tableName); + } + } + + return $sql; + } + + /** + * {@inheritDoc} + */ + protected function getCreateIndexSQLFlags(Index $index) + { + $type = ''; + if ($index->isUnique()) { + $type .= 'UNIQUE '; + } elseif ($index->hasFlag('fulltext')) { + $type .= 'FULLTEXT '; + } elseif ($index->hasFlag('spatial')) { + $type .= 'SPATIAL '; + } + + return $type; + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $field) + { + return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $field) + { + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $field) + { + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + { + $autoinc = ''; + if ( ! empty($columnDef['autoincrement'])) { + $autoinc = ' AUTO_INCREMENT'; + } + $unsigned = (isset($columnDef['unsigned']) && $columnDef['unsigned']) ? ' UNSIGNED' : ''; + + return $unsigned . $autoinc; + } + + /** + * {@inheritDoc} + */ + public function getAdvancedForeignKeyOptionsSQL(\Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey) + { + $query = ''; + if ($foreignKey->hasOption('match')) { + $query .= ' MATCH ' . $foreignKey->getOption('match'); + } + $query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey); + + return $query; + } + + /** + * {@inheritDoc} + */ + public function getDropIndexSQL($index, $table=null) + { + if ($index instanceof Index) { + $indexName = $index->getQuotedName($this); + } elseif (is_string($index)) { + $indexName = $index; + } else { + throw new \InvalidArgumentException('MysqlPlatform::getDropIndexSQL() expects $index parameter to be string or \Doctrine\DBAL\Schema\Index.'); + } + + if ($table instanceof Table) { + $table = $table->getQuotedName($this); + } elseif (!is_string($table)) { + throw new \InvalidArgumentException('MysqlPlatform::getDropIndexSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); + } + + if ($index instanceof Index && $index->isPrimary()) { + // mysql primary keys are always named "PRIMARY", + // so we cannot use them in statements because of them being keyword. + return $this->getDropPrimaryKeySQL($table); + } + + return 'DROP INDEX ' . $indexName . ' ON ' . $table; + } + + /** + * @param string $table + * + * @return string + */ + protected function getDropPrimaryKeySQL($table) + { + return 'ALTER TABLE ' . $table . ' DROP PRIMARY KEY'; + } + + /** + * {@inheritDoc} + */ + public function getSetTransactionIsolationSQL($level) + { + return 'SET SESSION TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSQL($level); + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'mysql'; + } + + /** + * {@inheritDoc} + */ + public function getReadLockSQL() + { + return 'LOCK IN SHARE MODE'; + } + + /** + * {@inheritDoc} + */ + protected function initializeDoctrineTypeMappings() + { + $this->doctrineTypeMapping = array( + 'tinyint' => 'boolean', + 'smallint' => 'smallint', + 'mediumint' => 'integer', + 'int' => 'integer', + 'integer' => 'integer', + 'bigint' => 'bigint', + 'tinytext' => 'text', + 'mediumtext' => 'text', + 'longtext' => 'text', + 'text' => 'text', + 'varchar' => 'string', + 'string' => 'string', + 'char' => 'string', + 'date' => 'date', + 'datetime' => 'datetime', + 'timestamp' => 'datetime', + 'time' => 'time', + 'float' => 'float', + 'double' => 'float', + 'real' => 'float', + 'decimal' => 'decimal', + 'numeric' => 'decimal', + 'year' => 'date', + 'longblob' => 'blob', + 'blob' => 'blob', + 'mediumblob' => 'blob', + 'tinyblob' => 'blob', + 'binary' => 'binary', + 'varbinary' => 'binary', + 'set' => 'simple_array', + ); + } + + /** + * {@inheritDoc} + */ + public function getVarcharMaxLength() + { + return 65535; + } + + /** + * {@inheritdoc} + */ + public function getBinaryMaxLength() + { + return 65535; + } + + /** + * {@inheritDoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\MySQLKeywords'; + } + + /** + * {@inheritDoc} + * + * MySQL commits a transaction implicitly when DROP TABLE is executed, however not + * if DROP TEMPORARY TABLE is executed. + */ + public function getDropTemporaryTableSQL($table) + { + if ($table instanceof Table) { + $table = $table->getQuotedName($this); + } elseif (!is_string($table)) { + throw new \InvalidArgumentException('getDropTableSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); + } + + return 'DROP TEMPORARY TABLE ' . $table; + } + + /** + * Gets the SQL Snippet used to declare a BLOB column type. + * TINYBLOB : 2 ^ 8 - 1 = 255 + * BLOB : 2 ^ 16 - 1 = 65535 + * MEDIUMBLOB : 2 ^ 24 - 1 = 16777215 + * LONGBLOB : 2 ^ 32 - 1 = 4294967295 + * + * @param array $field + * + * @return string + */ + public function getBlobTypeDeclarationSQL(array $field) + { + if ( ! empty($field['length']) && is_numeric($field['length'])) { + $length = $field['length']; + + if ($length <= static::LENGTH_LIMIT_TINYBLOB) { + return 'TINYBLOB'; + } + + if ($length <= static::LENGTH_LIMIT_BLOB) { + return 'BLOB'; + } + + if ($length <= static::LENGTH_LIMIT_MEDIUMBLOB) { + return 'MEDIUMBLOB'; + } + } + + return 'LONGBLOB'; + } + + /** + * {@inheritdoc} + */ + public function quoteStringLiteral($str) + { + $str = str_replace('\\', '\\\\', $str); // MySQL requires backslashes to be escaped aswell. + + return parent::quoteStringLiteral($str); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/OraclePlatform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/OraclePlatform.php new file mode 100644 index 0000000000000000000000000000000000000000..3cc5413fb3afccf675e3d5ed3a681b4005738ac0 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/OraclePlatform.php @@ -0,0 +1,1176 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Identifier; +use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\Sequence; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\TableDiff; +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Types\BinaryType; + +/** + * OraclePlatform. + * + * @since 2.0 + * @author Roman Borschel + * @author Lukas Smith (PEAR MDB2 library) + * @author Benjamin Eberlei + */ +class OraclePlatform extends AbstractPlatform +{ + /** + * Assertion for Oracle identifiers. + * + * @link http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements008.htm + * + * @param string $identifier + * + * @throws DBALException + */ + static public function assertValidIdentifier($identifier) + { + if ( ! preg_match('(^(([a-zA-Z]{1}[a-zA-Z0-9_$#]{0,})|("[^"]+"))$)', $identifier)) { + throw new DBALException("Invalid Oracle identifier"); + } + } + + /** + * {@inheritDoc} + */ + public function getSubstringExpression($value, $position, $length = null) + { + if ($length !== null) { + return "SUBSTR($value, $position, $length)"; + } + + return "SUBSTR($value, $position)"; + } + + /** + * {@inheritDoc} + */ + public function getNowExpression($type = 'timestamp') + { + switch ($type) { + case 'date': + case 'time': + case 'timestamp': + default: + return 'TO_CHAR(CURRENT_TIMESTAMP, \'YYYY-MM-DD HH24:MI:SS\')'; + } + } + + /** + * {@inheritDoc} + */ + public function getLocateExpression($str, $substr, $startPos = false) + { + if ($startPos == false) { + return 'INSTR('.$str.', '.$substr.')'; + } + + return 'INSTR('.$str.', '.$substr.', '.$startPos.')'; + } + + /** + * {@inheritDoc} + */ + public function getGuidExpression() + { + return 'SYS_GUID()'; + } + + /** + * {@inheritdoc} + */ + protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) + { + switch ($unit) { + case self::DATE_INTERVAL_UNIT_MONTH: + case self::DATE_INTERVAL_UNIT_QUARTER: + case self::DATE_INTERVAL_UNIT_YEAR: + switch ($unit) { + case self::DATE_INTERVAL_UNIT_QUARTER: + $interval *= 3; + break; + + case self::DATE_INTERVAL_UNIT_YEAR: + $interval *= 12; + break; + } + + return 'ADD_MONTHS(' . $date . ', ' . $operator . $interval . ')'; + + default: + $calculationClause = ''; + + switch ($unit) { + case self::DATE_INTERVAL_UNIT_SECOND: + $calculationClause = '/24/60/60'; + break; + + case self::DATE_INTERVAL_UNIT_MINUTE: + $calculationClause = '/24/60'; + break; + + case self::DATE_INTERVAL_UNIT_HOUR: + $calculationClause = '/24'; + break; + + case self::DATE_INTERVAL_UNIT_WEEK: + $calculationClause = '*7'; + break; + } + + return '(' . $date . $operator . $interval . $calculationClause . ')'; + } + } + + /** + * {@inheritDoc} + * + * Note: Since Oracle timestamp differences are calculated down to the microsecond we have to truncate + * them to the difference in days. This is obviously a restriction of the original functionality, but we + * need to make this a portable function. + */ + public function getDateDiffExpression($date1, $date2) + { + return "TRUNC(TO_NUMBER(SUBSTR((" . $date1 . "-" . $date2 . "), 1, INSTR(" . $date1 . "-" . $date2 .", ' '))))"; + } + + /** + * {@inheritDoc} + */ + public function getBitAndComparisonExpression($value1, $value2) + { + return 'BITAND('.$value1 . ', ' . $value2 . ')'; + } + + /** + * {@inheritDoc} + */ + public function getBitOrComparisonExpression($value1, $value2) + { + return '(' . $value1 . '-' . + $this->getBitAndComparisonExpression($value1, $value2) + . '+' . $value2 . ')'; + } + + /** + * {@inheritDoc} + * + * Need to specifiy minvalue, since start with is hidden in the system and MINVALUE <= START WITH. + * Therefore we can use MINVALUE to be able to get a hint what START WITH was for later introspection + * in {@see listSequences()} + */ + public function getCreateSequenceSQL(Sequence $sequence) + { + return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) . + ' START WITH ' . $sequence->getInitialValue() . + ' MINVALUE ' . $sequence->getInitialValue() . + ' INCREMENT BY ' . $sequence->getAllocationSize() . + $this->getSequenceCacheSQL($sequence); + } + + /** + * {@inheritDoc} + */ + public function getAlterSequenceSQL(Sequence $sequence) + { + return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) . + ' INCREMENT BY ' . $sequence->getAllocationSize() + . $this->getSequenceCacheSQL($sequence); + } + + /** + * Cache definition for sequences + * + * @param Sequence $sequence + * + * @return string + */ + private function getSequenceCacheSQL(Sequence $sequence) + { + if ($sequence->getCache() === 0) { + return ' NOCACHE'; + } else if ($sequence->getCache() === 1) { + return ' NOCACHE'; + } else if ($sequence->getCache() > 1) { + return ' CACHE ' . $sequence->getCache(); + } + + return ''; + } + + /** + * {@inheritDoc} + */ + public function getSequenceNextValSQL($sequenceName) + { + return 'SELECT ' . $sequenceName . '.nextval FROM DUAL'; + } + + /** + * {@inheritDoc} + */ + public function getSetTransactionIsolationSQL($level) + { + return 'SET TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSQL($level); + } + + /** + * {@inheritDoc} + */ + protected function _getTransactionIsolationLevelSQL($level) + { + switch ($level) { + case \Doctrine\DBAL\Connection::TRANSACTION_READ_UNCOMMITTED: + return 'READ UNCOMMITTED'; + case \Doctrine\DBAL\Connection::TRANSACTION_READ_COMMITTED: + return 'READ COMMITTED'; + case \Doctrine\DBAL\Connection::TRANSACTION_REPEATABLE_READ: + case \Doctrine\DBAL\Connection::TRANSACTION_SERIALIZABLE: + return 'SERIALIZABLE'; + default: + return parent::_getTransactionIsolationLevelSQL($level); + } + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $field) + { + return 'NUMBER(1)'; + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $field) + { + return 'NUMBER(10)'; + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $field) + { + return 'NUMBER(20)'; + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $field) + { + return 'NUMBER(5)'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIMESTAMP(0)'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIMESTAMP(0) WITH TIME ZONE'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + { + return ''; + } + + /** + * {@inheritDoc} + */ + protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) + { + return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(2000)') + : ($length ? 'VARCHAR2(' . $length . ')' : 'VARCHAR2(4000)'); + } + + /** + * {@inheritdoc} + */ + protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) + { + return 'RAW(' . ($length ?: $this->getBinaryMaxLength()) . ')'; + } + + /** + * {@inheritdoc} + */ + public function getBinaryMaxLength() + { + return 2000; + } + + /** + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $field) + { + return 'CLOB'; + } + + /** + * {@inheritDoc} + */ + public function getListDatabasesSQL() + { + return 'SELECT username FROM all_users'; + } + + /** + * {@inheritDoc} + */ + public function getListSequencesSQL($database) + { + $database = $this->normalizeIdentifier($database); + $database = $this->quoteStringLiteral($database->getName()); + + return "SELECT sequence_name, min_value, increment_by FROM sys.all_sequences ". + "WHERE SEQUENCE_OWNER = " . $database; + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL($table, array $columns, array $options = array()) + { + $indexes = isset($options['indexes']) ? $options['indexes'] : array(); + $options['indexes'] = array(); + $sql = parent::_getCreateTableSQL($table, $columns, $options); + + foreach ($columns as $name => $column) { + if (isset($column['sequence'])) { + $sql[] = $this->getCreateSequenceSQL($column['sequence'], 1); + } + + if (isset($column['autoincrement']) && $column['autoincrement'] || + (isset($column['autoinc']) && $column['autoinc'])) { + $sql = array_merge($sql, $this->getCreateAutoincrementSql($name, $table)); + } + } + + if (isset($indexes) && ! empty($indexes)) { + foreach ($indexes as $index) { + $sql[] = $this->getCreateIndexSQL($index, $table); + } + } + + return $sql; + } + + /** + * {@inheritDoc} + * + * @license New BSD License + * @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaOracleReader.html + */ + public function getListTableIndexesSQL($table, $currentDatabase = null) + { + $table = $this->normalizeIdentifier($table); + $table = $this->quoteStringLiteral($table->getName()); + + return "SELECT uind_col.index_name AS name, + ( + SELECT uind.index_type + FROM user_indexes uind + WHERE uind.index_name = uind_col.index_name + ) AS type, + decode( + ( + SELECT uind.uniqueness + FROM user_indexes uind + WHERE uind.index_name = uind_col.index_name + ), + 'NONUNIQUE', + 0, + 'UNIQUE', + 1 + ) AS is_unique, + uind_col.column_name AS column_name, + uind_col.column_position AS column_pos, + ( + SELECT ucon.constraint_type + FROM user_constraints ucon + WHERE ucon.constraint_name = uind_col.index_name + ) AS is_primary + FROM user_ind_columns uind_col + WHERE uind_col.table_name = " . $table . " + ORDER BY uind_col.column_position ASC"; + } + + /** + * {@inheritDoc} + */ + public function getListTablesSQL() + { + return 'SELECT * FROM sys.user_tables'; + } + + /** + * {@inheritDoc} + */ + public function getListViewsSQL($database) + { + return 'SELECT view_name, text FROM sys.user_views'; + } + + /** + * {@inheritDoc} + */ + public function getCreateViewSQL($name, $sql) + { + return 'CREATE VIEW ' . $name . ' AS ' . $sql; + } + + /** + * {@inheritDoc} + */ + public function getDropViewSQL($name) + { + return 'DROP VIEW '. $name; + } + + /** + * @param string $name + * @param string $table + * @param integer $start + * + * @return array + */ + public function getCreateAutoincrementSql($name, $table, $start = 1) + { + $tableIdentifier = $this->normalizeIdentifier($table); + $quotedTableName = $tableIdentifier->getQuotedName($this); + $unquotedTableName = $tableIdentifier->getName(); + + $nameIdentifier = $this->normalizeIdentifier($name); + $quotedName = $nameIdentifier->getQuotedName($this); + $unquotedName = $nameIdentifier->getName(); + + $sql = array(); + + $autoincrementIdentifierName = $this->getAutoincrementIdentifierName($tableIdentifier); + + $idx = new Index($autoincrementIdentifierName, array($quotedName), true, true); + + $sql[] = 'DECLARE + constraints_Count NUMBER; +BEGIN + SELECT COUNT(CONSTRAINT_NAME) INTO constraints_Count FROM USER_CONSTRAINTS WHERE TABLE_NAME = \'' . $unquotedTableName . '\' AND CONSTRAINT_TYPE = \'P\'; + IF constraints_Count = 0 OR constraints_Count = \'\' THEN + EXECUTE IMMEDIATE \''.$this->getCreateConstraintSQL($idx, $quotedTableName).'\'; + END IF; +END;'; + + $sequenceName = $this->getIdentitySequenceName( + $tableIdentifier->isQuoted() ? $quotedTableName : $unquotedTableName, + $nameIdentifier->isQuoted() ? $quotedName : $unquotedName + ); + $sequence = new Sequence($sequenceName, $start); + $sql[] = $this->getCreateSequenceSQL($sequence); + + $sql[] = 'CREATE TRIGGER ' . $autoincrementIdentifierName . ' + BEFORE INSERT + ON ' . $quotedTableName . ' + FOR EACH ROW +DECLARE + last_Sequence NUMBER; + last_InsertID NUMBER; +BEGIN + SELECT ' . $sequenceName . '.NEXTVAL INTO :NEW.' . $quotedName . ' FROM DUAL; + IF (:NEW.' . $quotedName . ' IS NULL OR :NEW.'.$quotedName.' = 0) THEN + SELECT ' . $sequenceName . '.NEXTVAL INTO :NEW.' . $quotedName . ' FROM DUAL; + ELSE + SELECT NVL(Last_Number, 0) INTO last_Sequence + FROM User_Sequences + WHERE Sequence_Name = \'' . $sequence->getName() . '\'; + SELECT :NEW.' . $quotedName . ' INTO last_InsertID FROM DUAL; + WHILE (last_InsertID > last_Sequence) LOOP + SELECT ' . $sequenceName . '.NEXTVAL INTO last_Sequence FROM DUAL; + END LOOP; + END IF; +END;'; + + return $sql; + } + + /** + * Returns the SQL statements to drop the autoincrement for the given table name. + * + * @param string $table The table name to drop the autoincrement for. + * + * @return array + */ + public function getDropAutoincrementSql($table) + { + $table = $this->normalizeIdentifier($table); + $autoincrementIdentifierName = $this->getAutoincrementIdentifierName($table); + $identitySequenceName = $this->getIdentitySequenceName( + $table->isQuoted() ? $table->getQuotedName($this) : $table->getName(), + '' + ); + + return array( + 'DROP TRIGGER ' . $autoincrementIdentifierName, + $this->getDropSequenceSQL($identitySequenceName), + $this->getDropConstraintSQL($autoincrementIdentifierName, $table->getQuotedName($this)), + ); + } + + /** + * Normalizes the given identifier. + * + * Uppercases the given identifier if it is not quoted by intention + * to reflect Oracle's internal auto uppercasing strategy of unquoted identifiers. + * + * @param string $name The identifier to normalize. + * + * @return Identifier The normalized identifier. + */ + private function normalizeIdentifier($name) + { + $identifier = new Identifier($name); + + return $identifier->isQuoted() ? $identifier : new Identifier(strtoupper($name)); + } + + /** + * Returns the autoincrement primary key identifier name for the given table identifier. + * + * Quotes the autoincrement primary key identifier name + * if the given table name is quoted by intention. + * + * @param Identifier $table The table identifier to return the autoincrement primary key identifier name for. + * + * @return string + */ + private function getAutoincrementIdentifierName(Identifier $table) + { + $identifierName = $table->getName() . '_AI_PK'; + + return $table->isQuoted() + ? $this->quoteSingleIdentifier($identifierName) + : $identifierName; + } + + /** + * {@inheritDoc} + */ + public function getListTableForeignKeysSQL($table) + { + $table = $this->normalizeIdentifier($table); + $table = $this->quoteStringLiteral($table->getName()); + + return "SELECT alc.constraint_name, + alc.DELETE_RULE, + alc.search_condition, + cols.column_name \"local_column\", + cols.position, + r_alc.table_name \"references_table\", + r_cols.column_name \"foreign_column\" + FROM user_cons_columns cols +LEFT JOIN user_constraints alc + ON alc.constraint_name = cols.constraint_name +LEFT JOIN user_constraints r_alc + ON alc.r_constraint_name = r_alc.constraint_name +LEFT JOIN user_cons_columns r_cols + ON r_alc.constraint_name = r_cols.constraint_name + AND cols.position = r_cols.position + WHERE alc.constraint_name = cols.constraint_name + AND alc.constraint_type = 'R' + AND alc.table_name = " . $table . " + ORDER BY cols.constraint_name ASC, cols.position ASC"; + } + + /** + * {@inheritDoc} + */ + public function getListTableConstraintsSQL($table) + { + $table = $this->normalizeIdentifier($table); + $table = $this->quoteStringLiteral($table->getName()); + + return "SELECT * FROM user_constraints WHERE table_name = " . $table; + } + + /** + * {@inheritDoc} + */ + public function getListTableColumnsSQL($table, $database = null) + { + $table = $this->normalizeIdentifier($table); + $table = $this->quoteStringLiteral($table->getName()); + + $tabColumnsTableName = "user_tab_columns"; + $colCommentsTableName = "user_col_comments"; + $tabColumnsOwnerCondition = ''; + $colCommentsOwnerCondition = ''; + + if (null !== $database && '/' !== $database) { + $database = $this->normalizeIdentifier($database); + $database = $this->quoteStringLiteral($database->getName()); + $tabColumnsTableName = "all_tab_columns"; + $colCommentsTableName = "all_col_comments"; + $tabColumnsOwnerCondition = "AND c.owner = " . $database; + $colCommentsOwnerCondition = "AND d.OWNER = c.OWNER"; + } + + return "SELECT c.*, + ( + SELECT d.comments + FROM $colCommentsTableName d + WHERE d.TABLE_NAME = c.TABLE_NAME " . $colCommentsOwnerCondition . " + AND d.COLUMN_NAME = c.COLUMN_NAME + ) AS comments + FROM $tabColumnsTableName c + WHERE c.table_name = " . $table . " $tabColumnsOwnerCondition + ORDER BY c.column_name"; + } + + /** + * {@inheritDoc} + */ + public function getDropSequenceSQL($sequence) + { + if ($sequence instanceof Sequence) { + $sequence = $sequence->getQuotedName($this); + } + + return 'DROP SEQUENCE ' . $sequence; + } + + /** + * {@inheritDoc} + */ + public function getDropForeignKeySQL($foreignKey, $table) + { + if (! $foreignKey instanceof ForeignKeyConstraint) { + $foreignKey = new Identifier($foreignKey); + } + + if (! $table instanceof Table) { + $table = new Identifier($table); + } + + $foreignKey = $foreignKey->getQuotedName($this); + $table = $table->getQuotedName($this); + + return 'ALTER TABLE ' . $table . ' DROP CONSTRAINT ' . $foreignKey; + } + + /** + * {@inheritdoc} + */ + public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey) + { + $referentialAction = null; + + if ($foreignKey->hasOption('onDelete')) { + $referentialAction = $this->getForeignKeyReferentialActionSQL($foreignKey->getOption('onDelete')); + } + + return $referentialAction ? ' ON DELETE ' . $referentialAction : ''; + } + + /** + * {@inheritdoc} + */ + public function getForeignKeyReferentialActionSQL($action) + { + $action = strtoupper($action); + + switch ($action) { + case 'RESTRICT': // RESTRICT is not supported, therefore falling back to NO ACTION. + case 'NO ACTION': + // NO ACTION cannot be declared explicitly, + // therefore returning empty string to indicate to OMIT the referential clause. + return ''; + + case 'CASCADE': + case 'SET NULL': + return $action; + + default: + // SET DEFAULT is not supported, throw exception instead. + throw new \InvalidArgumentException('Invalid foreign key action: ' . $action); + } + } + + /** + * {@inheritDoc} + */ + public function getDropDatabaseSQL($database) + { + return 'DROP USER ' . $database . ' CASCADE'; + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff) + { + $sql = array(); + $commentsSQL = array(); + $columnSql = array(); + + $fields = array(); + + foreach ($diff->addedColumns as $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + + $fields[] = $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); + if ($comment = $this->getColumnComment($column)) { + $commentsSQL[] = $this->getCommentOnColumnSQL( + $diff->getName($this)->getQuotedName($this), + $column->getQuotedName($this), + $comment + ); + } + } + + if (count($fields)) { + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ADD (' . implode(', ', $fields) . ')'; + } + + $fields = array(); + foreach ($diff->changedColumns as $columnDiff) { + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + + /* @var $columnDiff \Doctrine\DBAL\Schema\ColumnDiff */ + $column = $columnDiff->column; + + // Do not generate column alteration clause if type is binary and only fixed property has changed. + // Oracle only supports binary type columns with variable length. + // Avoids unnecessary table alteration statements. + if ($column->getType() instanceof BinaryType && + $columnDiff->hasChanged('fixed') && + count($columnDiff->changedProperties) === 1 + ) { + continue; + } + + $columnHasChangedComment = $columnDiff->hasChanged('comment'); + + /** + * Do not add query part if only comment has changed + */ + if ( ! ($columnHasChangedComment && count($columnDiff->changedProperties) === 1)) { + $columnInfo = $column->toArray(); + + if ( ! $columnDiff->hasChanged('notnull')) { + unset($columnInfo['notnull']); + } + + $fields[] = $column->getQuotedName($this) . $this->getColumnDeclarationSQL('', $columnInfo); + } + + if ($columnHasChangedComment) { + $commentsSQL[] = $this->getCommentOnColumnSQL( + $diff->getName($this)->getQuotedName($this), + $column->getQuotedName($this), + $this->getColumnComment($column) + ); + } + } + + if (count($fields)) { + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' MODIFY (' . implode(', ', $fields) . ')'; + } + + foreach ($diff->renamedColumns as $oldColumnName => $column) { + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + + $oldColumnName = new Identifier($oldColumnName); + + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . + ' RENAME COLUMN ' . $oldColumnName->getQuotedName($this) .' TO ' . $column->getQuotedName($this); + } + + $fields = array(); + foreach ($diff->removedColumns as $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + + $fields[] = $column->getQuotedName($this); + } + + if (count($fields)) { + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' DROP (' . implode(', ', $fields).')'; + } + + $tableSql = array(); + + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { + $sql = array_merge($sql, $commentsSQL); + + if ($diff->newName !== false) { + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' RENAME TO ' . $diff->getNewName()->getQuotedName($this); + } + + $sql = array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $sql, + $this->getPostAlterTableIndexForeignKeySQL($diff) + ); + } + + return array_merge($sql, $tableSql, $columnSql); + } + + /** + * {@inheritdoc} + */ + public function getColumnDeclarationSQL($name, array $field) + { + if (isset($field['columnDefinition'])) { + $columnDef = $this->getCustomTypeDeclarationSQL($field); + } else { + $default = $this->getDefaultValueDeclarationSQL($field); + + $notnull = ''; + + if (isset($field['notnull'])) { + $notnull = $field['notnull'] ? ' NOT NULL' : ' NULL'; + } + + $unique = (isset($field['unique']) && $field['unique']) ? + ' ' . $this->getUniqueFieldDeclarationSQL() : ''; + + $check = (isset($field['check']) && $field['check']) ? + ' ' . $field['check'] : ''; + + $typeDecl = $field['type']->getSqlDeclaration($field, $this); + $columnDef = $typeDecl . $default . $notnull . $unique . $check; + } + + return $name . ' ' . $columnDef; + } + + /** + * {@inheritdoc} + */ + protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName) + { + if (strpos($tableName, '.') !== false) { + list($schema) = explode('.', $tableName); + $oldIndexName = $schema . '.' . $oldIndexName; + } + + return array('ALTER INDEX ' . $oldIndexName . ' RENAME TO ' . $index->getQuotedName($this)); + } + + /** + * {@inheritDoc} + */ + public function prefersSequences() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function usesSequenceEmulatedIdentityColumns() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function getIdentitySequenceName($tableName, $columnName) + { + $table = new Identifier($tableName); + + // No usage of column name to preserve BC compatibility with <2.5 + $identitySequenceName = $table->getName() . '_SEQ'; + + if ($table->isQuoted()) { + $identitySequenceName = '"' . $identitySequenceName . '"'; + } + + $identitySequenceIdentifier = $this->normalizeIdentifier($identitySequenceName); + + return $identitySequenceIdentifier->getQuotedName($this); + } + + /** + * {@inheritDoc} + */ + public function supportsCommentOnStatement() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'oracle'; + } + + /** + * {@inheritDoc} + */ + protected function doModifyLimitQuery($query, $limit, $offset = null) + { + if ($limit === null && $offset === null) { + return $query; + } + + if (preg_match('/^\s*SELECT/i', $query)) { + if (!preg_match('/\sFROM\s/i', $query)) { + $query .= " FROM dual"; + } + + $columns = array('a.*'); + + if ($offset > 0) { + $columns[] = 'ROWNUM AS doctrine_rownum'; + } + + $query = sprintf('SELECT %s FROM (%s) a', implode(', ', $columns), $query); + + if ($limit !== null) { + $query .= sprintf(' WHERE ROWNUM <= %d', $offset + $limit); + } + + if ($offset > 0) { + $query = sprintf('SELECT * FROM (%s) WHERE doctrine_rownum >= %d', $query, $offset + 1); + } + } + + return $query; + } + + /** + * {@inheritDoc} + * + * Oracle returns all column names in SQL result sets in uppercase. + */ + public function getSQLResultCasing($column) + { + return strtoupper($column); + } + + /** + * {@inheritDoc} + */ + public function getCreateTemporaryTableSnippetSQL() + { + return "CREATE GLOBAL TEMPORARY TABLE"; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTzFormatString() + { + return 'Y-m-d H:i:sP'; + } + + /** + * {@inheritDoc} + */ + public function getDateFormatString() + { + return 'Y-m-d 00:00:00'; + } + + /** + * {@inheritDoc} + */ + public function getTimeFormatString() + { + return '1900-01-01 H:i:s'; + } + + /** + * {@inheritDoc} + */ + public function fixSchemaElementName($schemaElementName) + { + if (strlen($schemaElementName) > 30) { + // Trim it + return substr($schemaElementName, 0, 30); + } + + return $schemaElementName; + } + + /** + * {@inheritDoc} + */ + public function getMaxIdentifierLength() + { + return 30; + } + + /** + * {@inheritDoc} + */ + public function supportsSequences() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function supportsForeignKeyOnUpdate() + { + return false; + } + + /** + * {@inheritDoc} + */ + public function supportsReleaseSavepoints() + { + return false; + } + + /** + * {@inheritDoc} + */ + public function getTruncateTableSQL($tableName, $cascade = false) + { + $tableIdentifier = new Identifier($tableName); + + return 'TRUNCATE TABLE ' . $tableIdentifier->getQuotedName($this); + } + + /** + * {@inheritDoc} + */ + public function getDummySelectSQL() + { + return 'SELECT 1 FROM DUAL'; + } + + /** + * {@inheritDoc} + */ + protected function initializeDoctrineTypeMappings() + { + $this->doctrineTypeMapping = array( + 'integer' => 'integer', + 'number' => 'integer', + 'pls_integer' => 'boolean', + 'binary_integer' => 'boolean', + 'varchar' => 'string', + 'varchar2' => 'string', + 'nvarchar2' => 'string', + 'char' => 'string', + 'nchar' => 'string', + 'date' => 'date', + 'timestamp' => 'datetime', + 'timestamptz' => 'datetimetz', + 'float' => 'float', + 'binary_float' => 'float', + 'binary_double' => 'float', + 'long' => 'string', + 'clob' => 'text', + 'nclob' => 'text', + 'raw' => 'binary', + 'long raw' => 'blob', + 'rowid' => 'string', + 'urowid' => 'string', + 'blob' => 'blob', + ); + } + + /** + * {@inheritDoc} + */ + public function releaseSavePoint($savepoint) + { + return ''; + } + + /** + * {@inheritDoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\OracleKeywords'; + } + + /** + * {@inheritDoc} + */ + public function getBlobTypeDeclarationSQL(array $field) + { + return 'BLOB'; + } + + /** + * {@inheritdoc} + */ + public function quoteStringLiteral($str) + { + $str = str_replace('\\', '\\\\', $str); // Oracle requires backslashes to be escaped aswell. + + return parent::quoteStringLiteral($str); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL91Platform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL91Platform.php new file mode 100644 index 0000000000000000000000000000000000000000..b14aa7301ed07492dcd0d15636597c6766e181d4 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL91Platform.php @@ -0,0 +1,65 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +/** + * Provides the behavior, features and SQL dialect of the PostgreSQL 9.1 database platform. + * + * @author Martin Hasoň + * @link www.doctrine-project.org + * @since 2.5 + */ +class PostgreSQL91Platform extends PostgreSqlPlatform +{ + /** + * {@inheritDoc} + */ + public function supportsColumnCollation() + { + return true; + } + + /** + * {@inheritdoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\PostgreSQL91Keywords'; + } + + /** + * {@inheritDoc} + */ + public function getColumnCollationDeclarationSQL($collation) + { + return 'COLLATE ' . $this->quoteSingleIdentifier($collation); + } + + /** + * {@inheritDoc} + */ + public function getListTableColumnsSQL($table, $database = null) + { + $sql = parent::getListTableColumnsSQL($table, $database); + $parts = explode('AS complete_type,', $sql, 2); + + return $parts[0].'AS complete_type, (SELECT tc.collcollate FROM pg_catalog.pg_collation tc WHERE tc.oid = a.attcollation) AS collation,'.$parts[1]; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL92Platform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL92Platform.php new file mode 100644 index 0000000000000000000000000000000000000000..af1de90cd0efcfa2549bf7e46994bd4e40a4ffe1 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL92Platform.php @@ -0,0 +1,85 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +/** + * Provides the behavior, features and SQL dialect of the PostgreSQL 9.2 database platform. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class PostgreSQL92Platform extends PostgreSQL91Platform +{ + /** + * {@inheritdoc} + */ + public function getJsonTypeDeclarationSQL(array $field) + { + return 'JSON'; + } + + /** + * {@inheritdoc} + */ + public function getSmallIntTypeDeclarationSQL(array $field) + { + if ( ! empty($field['autoincrement'])) { + return 'SMALLSERIAL'; + } + + return parent::getSmallIntTypeDeclarationSQL($field); + } + + /** + * {@inheritdoc} + */ + public function hasNativeJsonType() + { + return true; + } + + /** + * {@inheritdoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\PostgreSQL92Keywords'; + } + + /** + * {@inheritdoc} + */ + protected function initializeDoctrineTypeMappings() + { + parent::initializeDoctrineTypeMappings(); + $this->doctrineTypeMapping['json'] = 'json_array'; + } + + /** + * {@inheritdoc} + */ + public function getCloseActiveDatabaseConnectionsSQL($database) + { + $database = $this->quoteStringLiteral($database); + + return "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = $database"; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php new file mode 100644 index 0000000000000000000000000000000000000000..2f31b9d00bf3335576609477c51840a7ffc67525 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php @@ -0,0 +1,1188 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\ColumnDiff; +use Doctrine\DBAL\Schema\Identifier; +use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\Sequence; +use Doctrine\DBAL\Schema\TableDiff; +use Doctrine\DBAL\Types\BinaryType; +use Doctrine\DBAL\Types\BlobType; + +/** + * PostgreSqlPlatform. + * + * @since 2.0 + * @author Roman Borschel + * @author Lukas Smith (PEAR MDB2 library) + * @author Benjamin Eberlei + * @todo Rename: PostgreSQLPlatform + */ +class PostgreSqlPlatform extends AbstractPlatform +{ + /** + * @var bool + */ + private $useBooleanTrueFalseStrings = true; + + /** + * @var array PostgreSQL booleans literals + */ + private $booleanLiterals = array( + 'true' => array( + 't', + 'true', + 'y', + 'yes', + 'on', + '1' + ), + 'false' => array( + 'f', + 'false', + 'n', + 'no', + 'off', + '0' + ) + ); + + /** + * PostgreSQL has different behavior with some drivers + * with regard to how booleans have to be handled. + * + * Enables use of 'true'/'false' or otherwise 1 and 0 instead. + * + * @param bool $flag + */ + public function setUseBooleanTrueFalseStrings($flag) + { + $this->useBooleanTrueFalseStrings = (bool) $flag; + } + + /** + * {@inheritDoc} + */ + public function getSubstringExpression($value, $from, $length = null) + { + if ($length === null) { + return 'SUBSTRING(' . $value . ' FROM ' . $from . ')'; + } + + return 'SUBSTRING(' . $value . ' FROM ' . $from . ' FOR ' . $length . ')'; + } + + /** + * {@inheritDoc} + */ + public function getNowExpression() + { + return 'LOCALTIMESTAMP(0)'; + } + + /** + * {@inheritDoc} + */ + public function getRegexpExpression() + { + return 'SIMILAR TO'; + } + + /** + * {@inheritDoc} + */ + public function getLocateExpression($str, $substr, $startPos = false) + { + if ($startPos !== false) { + $str = $this->getSubstringExpression($str, $startPos); + + return 'CASE WHEN (POSITION('.$substr.' IN '.$str.') = 0) THEN 0 ELSE (POSITION('.$substr.' IN '.$str.') + '.($startPos-1).') END'; + } + + return 'POSITION('.$substr.' IN '.$str.')'; + } + + /** + * {@inheritdoc} + */ + protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) + { + if (self::DATE_INTERVAL_UNIT_QUARTER === $unit) { + $interval *= 3; + $unit = self::DATE_INTERVAL_UNIT_MONTH; + } + + return "(" . $date ." " . $operator . " (" . $interval . " || ' " . $unit . "')::interval)"; + } + + /** + * {@inheritDoc} + */ + public function getDateDiffExpression($date1, $date2) + { + return '(DATE(' . $date1 . ')-DATE(' . $date2 . '))'; + } + + /** + * {@inheritDoc} + */ + public function supportsSequences() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function supportsSchemas() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function getDefaultSchemaName() + { + return 'public'; + } + + /** + * {@inheritDoc} + */ + public function supportsIdentityColumns() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function supportsPartialIndexes() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function usesSequenceEmulatedIdentityColumns() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function getIdentitySequenceName($tableName, $columnName) + { + return $tableName . '_' . $columnName . '_seq'; + } + + /** + * {@inheritDoc} + */ + public function supportsCommentOnStatement() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function prefersSequences() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function hasNativeGuidType() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function getListDatabasesSQL() + { + return 'SELECT datname FROM pg_database'; + } + + /** + * {@inheritDoc} + */ + public function getListNamespacesSQL() + { + return "SELECT schema_name AS nspname + FROM information_schema.schemata + WHERE schema_name NOT LIKE 'pg_%' + AND schema_name != 'information_schema'"; + } + + /** + * {@inheritDoc} + */ + public function getListSequencesSQL($database) + { + return "SELECT sequence_name AS relname, + sequence_schema AS schemaname + FROM information_schema.sequences + WHERE sequence_schema NOT LIKE 'pg_%' + AND sequence_schema != 'information_schema'"; + } + + /** + * {@inheritDoc} + */ + public function getListTablesSQL() + { + return "SELECT quote_ident(table_name) AS table_name, + table_schema AS schema_name + FROM information_schema.tables + WHERE table_schema NOT LIKE 'pg_%' + AND table_schema != 'information_schema' + AND table_name != 'geometry_columns' + AND table_name != 'spatial_ref_sys' + AND table_type != 'VIEW'"; + } + + /** + * {@inheritDoc} + */ + public function getListViewsSQL($database) + { + return 'SELECT quote_ident(table_name) AS viewname, + table_schema AS schemaname, + view_definition AS definition + FROM information_schema.views + WHERE view_definition IS NOT NULL'; + } + + /** + * {@inheritDoc} + */ + public function getListTableForeignKeysSQL($table, $database = null) + { + return "SELECT quote_ident(r.conname) as conname, pg_catalog.pg_get_constraintdef(r.oid, true) as condef + FROM pg_catalog.pg_constraint r + WHERE r.conrelid = + ( + SELECT c.oid + FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n + WHERE " .$this->getTableWhereClause($table) ." AND n.oid = c.relnamespace + ) + AND r.contype = 'f'"; + } + + /** + * {@inheritDoc} + */ + public function getCreateViewSQL($name, $sql) + { + return 'CREATE VIEW ' . $name . ' AS ' . $sql; + } + + /** + * {@inheritDoc} + */ + public function getDropViewSQL($name) + { + return 'DROP VIEW '. $name; + } + + /** + * {@inheritDoc} + */ + public function getListTableConstraintsSQL($table) + { + $table = new Identifier($table); + $table = $this->quoteStringLiteral($table->getName()); + + return "SELECT + quote_ident(relname) as relname + FROM + pg_class + WHERE oid IN ( + SELECT indexrelid + FROM pg_index, pg_class + WHERE pg_class.relname = $table + AND pg_class.oid = pg_index.indrelid + AND (indisunique = 't' OR indisprimary = 't') + )"; + } + + /** + * {@inheritDoc} + * + * @license New BSD License + * @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaPgsqlReader.html + */ + public function getListTableIndexesSQL($table, $currentDatabase = null) + { + return "SELECT quote_ident(relname) as relname, pg_index.indisunique, pg_index.indisprimary, + pg_index.indkey, pg_index.indrelid, + pg_get_expr(indpred, indrelid) AS where + FROM pg_class, pg_index + WHERE oid IN ( + SELECT indexrelid + FROM pg_index si, pg_class sc, pg_namespace sn + WHERE " . $this->getTableWhereClause($table, 'sc', 'sn')." AND sc.oid=si.indrelid AND sc.relnamespace = sn.oid + ) AND pg_index.indexrelid = oid"; + } + + /** + * @param string $table + * @param string $classAlias + * @param string $namespaceAlias + * + * @return string + */ + private function getTableWhereClause($table, $classAlias = 'c', $namespaceAlias = 'n') + { + $whereClause = $namespaceAlias.".nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast') AND "; + if (strpos($table, ".") !== false) { + list($schema, $table) = explode(".", $table); + $schema = $this->quoteStringLiteral($schema); + } else { + $schema = "ANY(string_to_array((select replace(replace(setting,'\"\$user\"',user),' ','') from pg_catalog.pg_settings where name = 'search_path'),','))"; + } + + $table = new Identifier($table); + $table = $this->quoteStringLiteral($table->getName()); + $whereClause .= "$classAlias.relname = " . $table . " AND $namespaceAlias.nspname = $schema"; + + return $whereClause; + } + + /** + * {@inheritDoc} + */ + public function getListTableColumnsSQL($table, $database = null) + { + return "SELECT + a.attnum, + quote_ident(a.attname) AS field, + t.typname AS type, + format_type(a.atttypid, a.atttypmod) AS complete_type, + (SELECT t1.typname FROM pg_catalog.pg_type t1 WHERE t1.oid = t.typbasetype) AS domain_type, + (SELECT format_type(t2.typbasetype, t2.typtypmod) FROM + pg_catalog.pg_type t2 WHERE t2.typtype = 'd' AND t2.oid = a.atttypid) AS domain_complete_type, + a.attnotnull AS isnotnull, + (SELECT 't' + FROM pg_index + WHERE c.oid = pg_index.indrelid + AND pg_index.indkey[0] = a.attnum + AND pg_index.indisprimary = 't' + ) AS pri, + (SELECT pg_get_expr(adbin, adrelid) + FROM pg_attrdef + WHERE c.oid = pg_attrdef.adrelid + AND pg_attrdef.adnum=a.attnum + ) AS default, + (SELECT pg_description.description + FROM pg_description WHERE pg_description.objoid = c.oid AND a.attnum = pg_description.objsubid + ) AS comment + FROM pg_attribute a, pg_class c, pg_type t, pg_namespace n + WHERE ".$this->getTableWhereClause($table, 'c', 'n') ." + AND a.attnum > 0 + AND a.attrelid = c.oid + AND a.atttypid = t.oid + AND n.oid = c.relnamespace + ORDER BY a.attnum"; + } + + /** + * {@inheritDoc} + */ + public function getCreateDatabaseSQL($name) + { + return 'CREATE DATABASE ' . $name; + } + + /** + * Returns the SQL statement for disallowing new connections on the given database. + * + * This is useful to force DROP DATABASE operations which could fail because of active connections. + * + * @param string $database The name of the database to disallow new connections for. + * + * @return string + */ + public function getDisallowDatabaseConnectionsSQL($database) + { + return "UPDATE pg_database SET datallowconn = 'false' WHERE datname = '$database'"; + } + + /** + * Returns the SQL statement for closing currently active connections on the given database. + * + * This is useful to force DROP DATABASE operations which could fail because of active connections. + * + * @param string $database The name of the database to close currently active connections for. + * + * @return string + */ + public function getCloseActiveDatabaseConnectionsSQL($database) + { + $database = $this->quoteStringLiteral($database); + + return "SELECT pg_terminate_backend(procpid) FROM pg_stat_activity WHERE datname = $database"; + } + + /** + * {@inheritDoc} + */ + public function getAdvancedForeignKeyOptionsSQL(\Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey) + { + $query = ''; + + if ($foreignKey->hasOption('match')) { + $query .= ' MATCH ' . $foreignKey->getOption('match'); + } + + $query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey); + + if ($foreignKey->hasOption('deferrable') && $foreignKey->getOption('deferrable') !== false) { + $query .= ' DEFERRABLE'; + } else { + $query .= ' NOT DEFERRABLE'; + } + + if (($foreignKey->hasOption('feferred') && $foreignKey->getOption('feferred') !== false) + || ($foreignKey->hasOption('deferred') && $foreignKey->getOption('deferred') !== false) + ) { + $query .= ' INITIALLY DEFERRED'; + } else { + $query .= ' INITIALLY IMMEDIATE'; + } + + return $query; + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff) + { + $sql = array(); + $commentsSQL = array(); + $columnSql = array(); + + foreach ($diff->addedColumns as $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + + $query = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query; + + $comment = $this->getColumnComment($column); + + if (null !== $comment && '' !== $comment) { + $commentsSQL[] = $this->getCommentOnColumnSQL( + $diff->getName($this)->getQuotedName($this), + $column->getQuotedName($this), + $comment + ); + } + } + + foreach ($diff->removedColumns as $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + + $query = 'DROP ' . $column->getQuotedName($this); + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query; + } + + foreach ($diff->changedColumns as $columnDiff) { + /** @var $columnDiff \Doctrine\DBAL\Schema\ColumnDiff */ + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + + if ($this->isUnchangedBinaryColumn($columnDiff)) { + continue; + } + + $oldColumnName = $columnDiff->getOldColumnName()->getQuotedName($this); + $column = $columnDiff->column; + + if ($columnDiff->hasChanged('type') || $columnDiff->hasChanged('precision') || $columnDiff->hasChanged('scale') || $columnDiff->hasChanged('fixed')) { + $type = $column->getType(); + + // here was a server version check before, but DBAL API does not support this anymore. + $query = 'ALTER ' . $oldColumnName . ' TYPE ' . $type->getSqlDeclaration($column->toArray(), $this); + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query; + } + + if ($columnDiff->hasChanged('default') || $columnDiff->hasChanged('type')) { + $defaultClause = null === $column->getDefault() + ? ' DROP DEFAULT' + : ' SET' . $this->getDefaultValueDeclarationSQL($column->toArray()); + $query = 'ALTER ' . $oldColumnName . $defaultClause; + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query; + } + + if ($columnDiff->hasChanged('notnull')) { + $query = 'ALTER ' . $oldColumnName . ' ' . ($column->getNotNull() ? 'SET' : 'DROP') . ' NOT NULL'; + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query; + } + + if ($columnDiff->hasChanged('autoincrement')) { + if ($column->getAutoincrement()) { + // add autoincrement + $seqName = $this->getIdentitySequenceName($diff->name, $oldColumnName); + + $sql[] = "CREATE SEQUENCE " . $seqName; + $sql[] = "SELECT setval('" . $seqName . "', (SELECT MAX(" . $oldColumnName . ") FROM " . $diff->getName($this)->getQuotedName($this) . "))"; + $query = "ALTER " . $oldColumnName . " SET DEFAULT nextval('" . $seqName . "')"; + $sql[] = "ALTER TABLE " . $diff->getName($this)->getQuotedName($this) . " " . $query; + } else { + // Drop autoincrement, but do NOT drop the sequence. It might be re-used by other tables or have + $query = "ALTER " . $oldColumnName . " " . "DROP DEFAULT"; + $sql[] = "ALTER TABLE " . $diff->getName($this)->getQuotedName($this) . " " . $query; + } + } + + if ($columnDiff->hasChanged('comment')) { + $commentsSQL[] = $this->getCommentOnColumnSQL( + $diff->getName($this)->getQuotedName($this), + $column->getQuotedName($this), + $this->getColumnComment($column) + ); + } + + if ($columnDiff->hasChanged('length')) { + $query = 'ALTER ' . $oldColumnName . ' TYPE ' . $column->getType()->getSqlDeclaration($column->toArray(), $this); + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query; + } + } + + foreach ($diff->renamedColumns as $oldColumnName => $column) { + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + + $oldColumnName = new Identifier($oldColumnName); + + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . + ' RENAME COLUMN ' . $oldColumnName->getQuotedName($this) . ' TO ' . $column->getQuotedName($this); + } + + $tableSql = array(); + + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { + $sql = array_merge($sql, $commentsSQL); + + if ($diff->newName !== false) { + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' RENAME TO ' . $diff->getNewName()->getQuotedName($this); + } + + $sql = array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $sql, + $this->getPostAlterTableIndexForeignKeySQL($diff) + ); + } + + return array_merge($sql, $tableSql, $columnSql); + } + + /** + * Checks whether a given column diff is a logically unchanged binary type column. + * + * Used to determine whether a column alteration for a binary type column can be skipped. + * Doctrine's {@link \Doctrine\DBAL\Types\BinaryType} and {@link \Doctrine\DBAL\Types\BlobType} + * are mapped to the same database column type on this platform as this platform + * does not have a native VARBINARY/BINARY column type. Therefore the {@link \Doctrine\DBAL\Schema\Comparator} + * might detect differences for binary type columns which do not have to be propagated + * to database as there actually is no difference at database level. + * + * @param ColumnDiff $columnDiff The column diff to check against. + * + * @return boolean True if the given column diff is an unchanged binary type column, false otherwise. + */ + private function isUnchangedBinaryColumn(ColumnDiff $columnDiff) + { + $columnType = $columnDiff->column->getType(); + + if ( ! $columnType instanceof BinaryType && ! $columnType instanceof BlobType) { + return false; + } + + $fromColumn = $columnDiff->fromColumn instanceof Column ? $columnDiff->fromColumn : null; + + if ($fromColumn) { + $fromColumnType = $fromColumn->getType(); + + if ( ! $fromColumnType instanceof BinaryType && ! $fromColumnType instanceof BlobType) { + return false; + } + + return count(array_diff($columnDiff->changedProperties, array('type', 'length', 'fixed'))) === 0; + } + + if ($columnDiff->hasChanged('type')) { + return false; + } + + return count(array_diff($columnDiff->changedProperties, array('length', 'fixed'))) === 0; + } + + /** + * {@inheritdoc} + */ + protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName) + { + if (strpos($tableName, '.') !== false) { + list($schema) = explode('.', $tableName); + $oldIndexName = $schema . '.' . $oldIndexName; + } + + return array('ALTER INDEX ' . $oldIndexName . ' RENAME TO ' . $index->getQuotedName($this)); + } + + /** + * {@inheritdoc} + */ + public function getCommentOnColumnSQL($tableName, $columnName, $comment) + { + $tableName = new Identifier($tableName); + $columnName = new Identifier($columnName); + $comment = $comment === null ? 'NULL' : $this->quoteStringLiteral($comment); + + return "COMMENT ON COLUMN " . $tableName->getQuotedName($this) . "." . $columnName->getQuotedName($this) . + " IS $comment"; + } + + /** + * {@inheritDoc} + */ + public function getCreateSequenceSQL(Sequence $sequence) + { + return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) . + ' INCREMENT BY ' . $sequence->getAllocationSize() . + ' MINVALUE ' . $sequence->getInitialValue() . + ' START ' . $sequence->getInitialValue() . + $this->getSequenceCacheSQL($sequence); + } + + /** + * {@inheritDoc} + */ + public function getAlterSequenceSQL(Sequence $sequence) + { + return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) . + ' INCREMENT BY ' . $sequence->getAllocationSize() . + $this->getSequenceCacheSQL($sequence); + } + + /** + * Cache definition for sequences + * + * @param Sequence $sequence + * + * @return string + */ + private function getSequenceCacheSQL(Sequence $sequence) + { + if ($sequence->getCache() > 1) { + return ' CACHE ' . $sequence->getCache(); + } + + return ''; + } + + /** + * {@inheritDoc} + */ + public function getDropSequenceSQL($sequence) + { + if ($sequence instanceof Sequence) { + $sequence = $sequence->getQuotedName($this); + } + + return 'DROP SEQUENCE ' . $sequence . ' CASCADE'; + } + + /** + * {@inheritDoc} + */ + public function getCreateSchemaSQL($schemaName) + { + return 'CREATE SCHEMA ' . $schemaName; + } + + /** + * {@inheritDoc} + */ + public function getDropForeignKeySQL($foreignKey, $table) + { + return $this->getDropConstraintSQL($foreignKey, $table); + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL($tableName, array $columns, array $options = array()) + { + $queryFields = $this->getColumnDeclarationListSQL($columns); + + if (isset($options['primary']) && ! empty($options['primary'])) { + $keyColumns = array_unique(array_values($options['primary'])); + $queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')'; + } + + $query = 'CREATE TABLE ' . $tableName . ' (' . $queryFields . ')'; + + $sql[] = $query; + + if (isset($options['indexes']) && ! empty($options['indexes'])) { + foreach ($options['indexes'] as $index) { + $sql[] = $this->getCreateIndexSQL($index, $tableName); + } + } + + if (isset($options['foreignKeys'])) { + foreach ((array) $options['foreignKeys'] as $definition) { + $sql[] = $this->getCreateForeignKeySQL($definition, $tableName); + } + } + + return $sql; + } + + /** + * Converts a single boolean value. + * + * First converts the value to its native PHP boolean type + * and passes it to the given callback function to be reconverted + * into any custom representation. + * + * @param mixed $value The value to convert. + * @param callable $callback The callback function to use for converting the real boolean value. + * + * @return mixed + * @throws \UnexpectedValueException + */ + private function convertSingleBooleanValue($value, $callback) + { + if (null === $value) { + return $callback(null); + } + + if (is_bool($value) || is_numeric($value)) { + return $callback($value ? true : false); + } + + if (!is_string($value)) { + return $callback(true); + } + + /** + * Better safe than sorry: http://php.net/in_array#106319 + */ + if (in_array(trim(strtolower($value)), $this->booleanLiterals['false'], true)) { + return $callback(false); + } + + if (in_array(trim(strtolower($value)), $this->booleanLiterals['true'], true)) { + return $callback(true); + } + + throw new \UnexpectedValueException("Unrecognized boolean literal '${value}'"); + } + + /** + * Converts one or multiple boolean values. + * + * First converts the value(s) to their native PHP boolean type + * and passes them to the given callback function to be reconverted + * into any custom representation. + * + * @param mixed $item The value(s) to convert. + * @param callable $callback The callback function to use for converting the real boolean value(s). + * + * @return mixed + */ + private function doConvertBooleans($item, $callback) + { + if (is_array($item)) { + foreach ($item as $key => $value) { + $item[$key] = $this->convertSingleBooleanValue($value, $callback); + } + + return $item; + } + + return $this->convertSingleBooleanValue($item, $callback); + } + + /** + * {@inheritDoc} + * + * Postgres wants boolean values converted to the strings 'true'/'false'. + */ + public function convertBooleans($item) + { + if ( ! $this->useBooleanTrueFalseStrings) { + return parent::convertBooleans($item); + } + + return $this->doConvertBooleans( + $item, + function ($boolean) { + if (null === $boolean) { + return 'NULL'; + } + + return true === $boolean ? 'true' : 'false'; + } + ); + } + + /** + * {@inheritDoc} + */ + public function convertBooleansToDatabaseValue($item) + { + if ( ! $this->useBooleanTrueFalseStrings) { + return parent::convertBooleansToDatabaseValue($item); + } + + return $this->doConvertBooleans( + $item, + function ($boolean) { + return null === $boolean ? null : (int) $boolean; + } + ); + } + + /** + * {@inheritDoc} + */ + public function convertFromBoolean($item) + { + if (in_array(strtolower($item), $this->booleanLiterals['false'], true)) { + return false; + } + + return parent::convertFromBoolean($item); + } + + /** + * {@inheritDoc} + */ + public function getSequenceNextValSQL($sequenceName) + { + return "SELECT NEXTVAL('" . $sequenceName . "')"; + } + + /** + * {@inheritDoc} + */ + public function getSetTransactionIsolationSQL($level) + { + return 'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL ' + . $this->_getTransactionIsolationLevelSQL($level); + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $field) + { + return 'BOOLEAN'; + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $field) + { + if ( ! empty($field['autoincrement'])) { + return 'SERIAL'; + } + + return 'INT'; + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $field) + { + if ( ! empty($field['autoincrement'])) { + return 'BIGSERIAL'; + } + + return 'BIGINT'; + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $field) + { + return 'SMALLINT'; + } + + /** + * {@inheritDoc} + */ + public function getGuidTypeDeclarationSQL(array $field) + { + return 'UUID'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIMESTAMP(0) WITHOUT TIME ZONE'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIMESTAMP(0) WITH TIME ZONE'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIME(0) WITHOUT TIME ZONE'; + } + + /** + * {@inheritDoc} + */ + public function getGuidExpression() + { + return 'UUID_GENERATE_V4()'; + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + { + return ''; + } + + /** + * {@inheritDoc} + */ + protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) + { + return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(255)') + : ($length ? 'VARCHAR(' . $length . ')' : 'VARCHAR(255)'); + } + + /** + * {@inheritdoc} + */ + protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) + { + return 'BYTEA'; + } + + /** + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $field) + { + return 'TEXT'; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'postgresql'; + } + + /** + * {@inheritDoc} + * + * PostgreSQL returns all column names in SQL result sets in lowercase. + */ + public function getSQLResultCasing($column) + { + return strtolower($column); + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTzFormatString() + { + return 'Y-m-d H:i:sO'; + } + + /** + * {@inheritDoc} + */ + public function getEmptyIdentityInsertSQL($quotedTableName, $quotedIdentifierColumnName) + { + return 'INSERT INTO ' . $quotedTableName . ' (' . $quotedIdentifierColumnName . ') VALUES (DEFAULT)'; + } + + /** + * {@inheritDoc} + */ + public function getTruncateTableSQL($tableName, $cascade = false) + { + $tableIdentifier = new Identifier($tableName); + $sql = 'TRUNCATE ' . $tableIdentifier->getQuotedName($this); + + if ($cascade) { + $sql .= ' CASCADE'; + } + + return $sql; + } + + /** + * {@inheritDoc} + */ + public function getReadLockSQL() + { + return 'FOR SHARE'; + } + + /** + * {@inheritDoc} + */ + protected function initializeDoctrineTypeMappings() + { + $this->doctrineTypeMapping = array( + 'smallint' => 'smallint', + 'int2' => 'smallint', + 'serial' => 'integer', + 'serial4' => 'integer', + 'int' => 'integer', + 'int4' => 'integer', + 'integer' => 'integer', + 'bigserial' => 'bigint', + 'serial8' => 'bigint', + 'bigint' => 'bigint', + 'int8' => 'bigint', + 'bool' => 'boolean', + 'boolean' => 'boolean', + 'text' => 'text', + 'varchar' => 'string', + 'interval' => 'string', + '_varchar' => 'string', + 'char' => 'string', + 'bpchar' => 'string', + 'inet' => 'string', + 'date' => 'date', + 'datetime' => 'datetime', + 'timestamp' => 'datetime', + 'timestamptz' => 'datetimetz', + 'time' => 'time', + 'timetz' => 'time', + 'float' => 'float', + 'float4' => 'float', + 'float8' => 'float', + 'double' => 'float', + 'double precision' => 'float', + 'real' => 'float', + 'decimal' => 'decimal', + 'money' => 'decimal', + 'numeric' => 'decimal', + 'year' => 'date', + 'uuid' => 'guid', + 'bytea' => 'blob', + ); + } + + /** + * {@inheritDoc} + */ + public function getVarcharMaxLength() + { + return 65535; + } + + /** + * {@inheritdoc} + */ + public function getBinaryMaxLength() + { + return 0; + } + + /** + * {@inheritdoc} + */ + public function getBinaryDefaultLength() + { + return 0; + } + + /** + * {@inheritDoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords'; + } + + /** + * {@inheritDoc} + */ + public function getBlobTypeDeclarationSQL(array $field) + { + return 'BYTEA'; + } + + /** + * {@inheritdoc} + */ + public function quoteStringLiteral($str) + { + $str = str_replace('\\', '\\\\', $str); // PostgreSQL requires backslashes to be escaped aswell. + + return parent::quoteStringLiteral($str); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere11Platform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere11Platform.php new file mode 100644 index 0000000000000000000000000000000000000000..44ba707b617de8b6595f55daf001098e38dcf815 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere11Platform.php @@ -0,0 +1,47 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +/** + * The SQLAnywhere11Platform provides the behavior, features and SQL dialect of the + * SAP Sybase SQL Anywhere 11 database platform. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class SQLAnywhere11Platform extends SQLAnywherePlatform +{ + /** + * {@inheritdoc} + */ + public function getRegexpExpression() + { + return 'REGEXP'; + } + + /** + * {@inheritdoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\SQLAnywhere11Keywords'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere12Platform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere12Platform.php new file mode 100644 index 0000000000000000000000000000000000000000..17b413eccb321b4c97054de9700b378b79581195 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere12Platform.php @@ -0,0 +1,135 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\Sequence; + +/** + * The SQLAnywhere12Platform provides the behavior, features and SQL dialect of the + * SAP Sybase SQL Anywhere 12 database platform. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class SQLAnywhere12Platform extends SQLAnywhere11Platform +{ + /** + * {@inheritdoc} + */ + public function getCreateSequenceSQL(Sequence $sequence) + { + return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) . + ' INCREMENT BY ' . $sequence->getAllocationSize() . + ' START WITH ' . $sequence->getInitialValue() . + ' MINVALUE ' . $sequence->getInitialValue(); + } + + /** + * {@inheritdoc} + */ + public function getAlterSequenceSQL(Sequence $sequence) + { + return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) . + ' INCREMENT BY ' . $sequence->getAllocationSize(); + } + + /** + * {@inheritdoc} + */ + public function getDateTimeTzFormatString() + { + return 'Y-m-d H:i:s.uP'; + } + + /** + * {@inheritdoc} + */ + public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIMESTAMP WITH TIME ZONE'; + } + + /** + * {@inheritdoc} + */ + public function getDropSequenceSQL($sequence) + { + if ($sequence instanceof Sequence) { + $sequence = $sequence->getQuotedName($this); + } + + return 'DROP SEQUENCE ' . $sequence; + } + + /** + * {@inheritdoc} + */ + public function getListSequencesSQL($database) + { + return 'SELECT sequence_name, increment_by, start_with, min_value FROM SYS.SYSSEQUENCE'; + } + + /** + * {@inheritdoc} + */ + public function getSequenceNextValSQL($sequenceName) + { + return 'SELECT ' . $sequenceName . '.NEXTVAL'; + } + + /** + * {@inheritdoc} + */ + public function supportsSequences() + { + return true; + } + + /** + * {@inheritdoc} + */ + protected function getAdvancedIndexOptionsSQL(Index $index) + { + if ( ! $index->isPrimary() && $index->isUnique() && $index->hasFlag('with_nulls_not_distinct')) { + return ' WITH NULLS NOT DISTINCT' . parent::getAdvancedIndexOptionsSQL($index); + } + + return parent::getAdvancedIndexOptionsSQL($index); + } + + /** + * {@inheritdoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\SQLAnywhere12Keywords'; + } + + /** + * {@inheritDoc} + */ + protected function initializeDoctrineTypeMappings() + { + parent::initializeDoctrineTypeMappings(); + $this->doctrineTypeMapping['timestamp with time zone'] = 'datetime'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere16Platform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere16Platform.php new file mode 100644 index 0000000000000000000000000000000000000000..6808d7301a7e8561c05bfada12a49140f3659c61 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere16Platform.php @@ -0,0 +1,60 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\Common\Proxy\Exception\UnexpectedValueException; +use Doctrine\DBAL\Schema\Index; + +/** + * The SQLAnywhere16Platform provides the behavior, features and SQL dialect of the + * SAP Sybase SQL Anywhere 16 database platform. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class SQLAnywhere16Platform extends SQLAnywhere12Platform +{ + /** + * {@inheritdoc} + */ + protected function getAdvancedIndexOptionsSQL(Index $index) + { + if ($index->hasFlag('with_nulls_distinct') && $index->hasFlag('with_nulls_not_distinct')) { + throw new UnexpectedValueException( + 'An Index can either have a "with_nulls_distinct" or "with_nulls_not_distinct" flag but not both.' + ); + } + + if ( ! $index->isPrimary() && $index->isUnique() && $index->hasFlag('with_nulls_distinct')) { + return ' WITH NULLS DISTINCT' . parent::getAdvancedIndexOptionsSQL($index); + } + + return parent::getAdvancedIndexOptionsSQL($index); + } + + /** + * {@inheritdoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\SQLAnywhere16Keywords'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php new file mode 100644 index 0000000000000000000000000000000000000000..841bdadb2e075863c2e5463fc97e3e55d66d9264 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php @@ -0,0 +1,1491 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\LockMode; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\ColumnDiff; +use Doctrine\DBAL\Schema\Constraint; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\Identifier; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\TableDiff; + +/** + * The SQLAnywherePlatform provides the behavior, features and SQL dialect of the + * SAP Sybase SQL Anywhere 10 database platform. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class SQLAnywherePlatform extends AbstractPlatform +{ + /** + * @var integer + */ + const FOREIGN_KEY_MATCH_SIMPLE = 1; + /** + * @var integer + */ + const FOREIGN_KEY_MATCH_FULL = 2; + /** + * @var integer + */ + const FOREIGN_KEY_MATCH_SIMPLE_UNIQUE = 129; + /** + * @var integer + */ + const FOREIGN_KEY_MATCH_FULL_UNIQUE = 130; + + /** + * {@inheritdoc} + */ + public function appendLockHint($fromClause, $lockMode) + { + switch (true) { + case $lockMode === LockMode::NONE: + return $fromClause . ' WITH (NOLOCK)'; + + case $lockMode === LockMode::PESSIMISTIC_READ: + return $fromClause . ' WITH (UPDLOCK)'; + + case $lockMode === LockMode::PESSIMISTIC_WRITE: + return $fromClause . ' WITH (XLOCK)'; + + default: + return $fromClause; + } + } + + /** + * {@inheritdoc} + * + * SQL Anywhere supports a maximum length of 128 bytes for identifiers. + */ + public function fixSchemaElementName($schemaElementName) + { + $maxIdentifierLength = $this->getMaxIdentifierLength(); + + if (strlen($schemaElementName) > $maxIdentifierLength) { + return substr($schemaElementName, 0, $maxIdentifierLength); + } + + return $schemaElementName; + } + + /** + * {@inheritdoc} + */ + public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey) + { + $query = ''; + + if ($foreignKey->hasOption('match')) { + $query = ' MATCH ' . $this->getForeignKeyMatchClauseSQL($foreignKey->getOption('match')); + } + + $query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey); + + if ($foreignKey->hasOption('check_on_commit') && (boolean) $foreignKey->getOption('check_on_commit')) { + $query .= ' CHECK ON COMMIT'; + } + + if ($foreignKey->hasOption('clustered') && (boolean) $foreignKey->getOption('clustered')) { + $query .= ' CLUSTERED'; + } + + if ($foreignKey->hasOption('for_olap_workload') && (boolean) $foreignKey->getOption('for_olap_workload')) { + $query .= ' FOR OLAP WORKLOAD'; + } + + return $query; + } + + /** + * {@inheritdoc} + */ + public function getAlterTableSQL(TableDiff $diff) + { + $sql = array(); + $columnSql = array(); + $commentsSQL = array(); + $tableSql = array(); + $alterClauses = array(); + + /** @var \Doctrine\DBAL\Schema\Column $column */ + foreach ($diff->addedColumns as $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + + $alterClauses[] = $this->getAlterTableAddColumnClause($column); + + $comment = $this->getColumnComment($column); + + if (null !== $comment && '' !== $comment) { + $commentsSQL[] = $this->getCommentOnColumnSQL( + $diff->getName($this)->getQuotedName($this), + $column->getQuotedName($this), + $comment + ); + } + } + + /** @var \Doctrine\DBAL\Schema\Column $column */ + foreach ($diff->removedColumns as $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + + $alterClauses[] = $this->getAlterTableRemoveColumnClause($column); + } + + /** @var \Doctrine\DBAL\Schema\ColumnDiff $columnDiff */ + foreach ($diff->changedColumns as $columnDiff) { + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + + $alterClause = $this->getAlterTableChangeColumnClause($columnDiff); + + if (null !== $alterClause) { + $alterClauses[] = $alterClause; + } + + if ($columnDiff->hasChanged('comment')) { + $column = $columnDiff->column; + + $commentsSQL[] = $this->getCommentOnColumnSQL( + $diff->getName($this)->getQuotedName($this), + $column->getQuotedName($this), + $this->getColumnComment($column) + ); + } + } + + foreach ($diff->renamedColumns as $oldColumnName => $column) { + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + + $sql[] = $this->getAlterTableClause($diff->getName($this)) . ' ' . + $this->getAlterTableRenameColumnClause($oldColumnName, $column); + } + + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { + if ( ! empty($alterClauses)) { + $sql[] = $this->getAlterTableClause($diff->getName($this)) . ' ' . implode(", ", $alterClauses); + } + + $sql = array_merge($sql, $commentsSQL); + + if ($diff->newName !== false) { + $sql[] = $this->getAlterTableClause($diff->getName($this)) . ' ' . + $this->getAlterTableRenameTableClause($diff->getNewName()); + } + + $sql = array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $sql, + $this->getPostAlterTableIndexForeignKeySQL($diff) + ); + } + + return array_merge($sql, $tableSql, $columnSql); + } + + /** + * Returns the SQL clause for creating a column in a table alteration. + * + * @param Column $column The column to add. + * + * @return string + */ + protected function getAlterTableAddColumnClause(Column $column) + { + return 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); + } + + /** + * Returns the SQL clause for altering a table. + * + * @param Identifier $tableName The quoted name of the table to alter. + * + * @return string + */ + protected function getAlterTableClause(Identifier $tableName) + { + return 'ALTER TABLE ' . $tableName->getQuotedName($this); + } + + /** + * Returns the SQL clause for dropping a column in a table alteration. + * + * @param Column $column The column to drop. + * + * @return string + */ + protected function getAlterTableRemoveColumnClause(Column $column) + { + return 'DROP ' . $column->getQuotedName($this); + } + + /** + * Returns the SQL clause for renaming a column in a table alteration. + * + * @param string $oldColumnName The quoted name of the column to rename. + * @param Column $column The column to rename to. + * + * @return string + */ + protected function getAlterTableRenameColumnClause($oldColumnName, Column $column) + { + $oldColumnName = new Identifier($oldColumnName); + + return 'RENAME ' . $oldColumnName->getQuotedName($this) .' TO ' . $column->getQuotedName($this); + } + + /** + * Returns the SQL clause for renaming a table in a table alteration. + * + * @param Identifier $newTableName The quoted name of the table to rename to. + * + * @return string + */ + protected function getAlterTableRenameTableClause(Identifier $newTableName) + { + return 'RENAME ' . $newTableName->getQuotedName($this); + } + + /** + * Returns the SQL clause for altering a column in a table alteration. + * + * This method returns null in case that only the column comment has changed. + * Changes in column comments have to be handled differently. + * + * @param ColumnDiff $columnDiff The diff of the column to alter. + * + * @return string|null + */ + protected function getAlterTableChangeColumnClause(ColumnDiff $columnDiff) + { + $column = $columnDiff->column; + + // Do not return alter clause if only comment has changed. + if ( ! ($columnDiff->hasChanged('comment') && count($columnDiff->changedProperties) === 1)) { + $columnAlterationClause = 'ALTER ' . + $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); + + if ($columnDiff->hasChanged('default') && null === $column->getDefault()) { + $columnAlterationClause .= ', ALTER ' . $column->getQuotedName($this) . ' DROP DEFAULT'; + } + + return $columnAlterationClause; + } + } + + /** + * {@inheritdoc} + */ + public function getBigIntTypeDeclarationSQL(array $columnDef) + { + $columnDef['integer_type'] = 'BIGINT'; + + return $this->_getCommonIntegerTypeDeclarationSQL($columnDef); + } + + /** + * {@inheritdoc} + */ + public function getBinaryDefaultLength() + { + return 1; + } + + /** + * {@inheritdoc} + */ + public function getBinaryMaxLength() + { + return 32767; + } + + /** + * {@inheritdoc} + */ + public function getBlobTypeDeclarationSQL(array $field) + { + return 'LONG BINARY'; + } + + /** + * {@inheritdoc} + * + * BIT type columns require an explicit NULL declaration + * in SQL Anywhere if they shall be nullable. + * Otherwise by just omitting the NOT NULL clause, + * SQL Anywhere will declare them NOT NULL nonetheless. + */ + public function getBooleanTypeDeclarationSQL(array $columnDef) + { + $nullClause = isset($columnDef['notnull']) && (boolean) $columnDef['notnull'] === false ? ' NULL' : ''; + + return 'BIT' . $nullClause; + } + + /** + * {@inheritdoc} + */ + public function getClobTypeDeclarationSQL(array $field) + { + return 'TEXT'; + } + + /** + * {@inheritdoc} + */ + public function getCommentOnColumnSQL($tableName, $columnName, $comment) + { + $tableName = new Identifier($tableName); + $columnName = new Identifier($columnName); + $comment = $comment === null ? 'NULL' : $this->quoteStringLiteral($comment); + + return "COMMENT ON COLUMN " . $tableName->getQuotedName($this) . '.' . $columnName->getQuotedName($this) . + " IS $comment"; + } + + /** + * {@inheritdoc} + */ + public function getConcatExpression() + { + return 'STRING(' . implode(', ', (array) func_get_args()) . ')'; + } + + /** + * {@inheritdoc} + */ + public function getCreateConstraintSQL(Constraint $constraint, $table) + { + if ($constraint instanceof ForeignKeyConstraint) { + return $this->getCreateForeignKeySQL($constraint, $table); + } + + if ($table instanceof Table) { + $table = $table->getQuotedName($this); + } + + return 'ALTER TABLE ' . $table . + ' ADD ' . $this->getTableConstraintDeclarationSQL($constraint, $constraint->getQuotedName($this)); + } + + /** + * {@inheritdoc} + */ + public function getCreateDatabaseSQL($database) + { + $database = new Identifier($database); + + return "CREATE DATABASE '" . $database->getName() . "'"; + } + + /** + * {@inheritdoc} + * + * Appends SQL Anywhere specific flags if given. + */ + public function getCreateIndexSQL(Index $index, $table) + { + return parent::getCreateIndexSQL($index, $table). $this->getAdvancedIndexOptionsSQL($index); + } + + /** + * {@inheritdoc} + */ + public function getCreatePrimaryKeySQL(Index $index, $table) + { + if ($table instanceof Table) { + $table = $table->getQuotedName($this); + } + + return 'ALTER TABLE ' . $table . ' ADD ' . $this->getPrimaryKeyDeclarationSQL($index); + } + + /** + * {@inheritdoc} + */ + public function getCreateTemporaryTableSnippetSQL() + { + return 'CREATE ' . $this->getTemporaryTableSQL() . ' TABLE'; + } + + /** + * {@inheritdoc} + */ + public function getCreateViewSQL($name, $sql) + { + return 'CREATE VIEW ' . $name . ' AS ' . $sql; + } + + /** + * {@inheritdoc} + */ + public function getCurrentDateSQL() + { + return 'CURRENT DATE'; + } + + /** + * {@inheritdoc} + */ + public function getCurrentTimeSQL() + { + return 'CURRENT TIME'; + } + + /** + * {@inheritdoc} + */ + public function getCurrentTimestampSQL() + { + return 'CURRENT TIMESTAMP'; + } + + /** + * {@inheritdoc} + */ + protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) + { + $factorClause = ''; + + if ('-' === $operator) { + $factorClause = '-1 * '; + } + + return 'DATEADD(' . $unit . ', ' . $factorClause . $interval . ', ' . $date . ')'; + } + + /** + * {@inheritdoc} + */ + public function getDateDiffExpression($date1, $date2) + { + return 'DATEDIFF(day, ' . $date2 . ', ' . $date1 . ')'; + } + + /** + * {@inheritdoc} + */ + public function getDateTimeFormatString() + { + return 'Y-m-d H:i:s.u'; + } + + /** + * {@inheritdoc} + */ + public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATETIME'; + } + + /** + * {@inheritdoc} + */ + public function getDateTimeTzFormatString() + { + return $this->getDateTimeFormatString(); + } + + /** + * {@inheritdoc} + */ + public function getDateTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATE'; + } + + /** + * {@inheritdoc} + */ + public function getDefaultTransactionIsolationLevel() + { + return Connection::TRANSACTION_READ_UNCOMMITTED; + } + + /** + * {@inheritdoc} + */ + public function getDropDatabaseSQL($database) + { + $database = new Identifier($database); + + return "DROP DATABASE '" . $database->getName() . "'"; + } + + /** + * {@inheritdoc} + */ + public function getDropIndexSQL($index, $table = null) + { + if ($index instanceof Index) { + $index = $index->getQuotedName($this); + } + + if ( ! is_string($index)) { + throw new \InvalidArgumentException( + 'SQLAnywherePlatform::getDropIndexSQL() expects $index parameter to be string or ' . + '\Doctrine\DBAL\Schema\Index.' + ); + } + + if ( ! isset($table)) { + return 'DROP INDEX ' . $index; + } + + if ($table instanceof Table) { + $table = $table->getQuotedName($this); + } + + if ( ! is_string($table)) { + throw new \InvalidArgumentException( + 'SQLAnywherePlatform::getDropIndexSQL() expects $table parameter to be string or ' . + '\Doctrine\DBAL\Schema\Table.' + ); + } + + return 'DROP INDEX ' . $table . '.' . $index; + } + + /** + * {@inheritdoc} + */ + public function getDropViewSQL($name) + { + return 'DROP VIEW ' . $name; + } + + /** + * {@inheritdoc} + */ + public function getForeignKeyBaseDeclarationSQL(ForeignKeyConstraint $foreignKey) + { + $sql = ''; + $foreignKeyName = $foreignKey->getName(); + $localColumns = $foreignKey->getQuotedLocalColumns($this); + $foreignColumns = $foreignKey->getQuotedForeignColumns($this); + $foreignTableName = $foreignKey->getQuotedForeignTableName($this); + + if ( ! empty($foreignKeyName)) { + $sql .= 'CONSTRAINT ' . $foreignKey->getQuotedName($this) . ' '; + } + + if (empty($localColumns)) { + throw new \InvalidArgumentException("Incomplete definition. 'local' required."); + } + + if (empty($foreignColumns)) { + throw new \InvalidArgumentException("Incomplete definition. 'foreign' required."); + } + + if (empty($foreignTableName)) { + throw new \InvalidArgumentException("Incomplete definition. 'foreignTable' required."); + } + + if ($foreignKey->hasOption('notnull') && (boolean) $foreignKey->getOption('notnull')) { + $sql .= 'NOT NULL '; + } + + return $sql . + 'FOREIGN KEY (' . $this->getIndexFieldDeclarationListSQL($localColumns) . ') ' . + 'REFERENCES ' . $foreignKey->getQuotedForeignTableName($this) . + ' (' . $this->getIndexFieldDeclarationListSQL($foreignColumns) . ')'; + } + + /** + * Returns foreign key MATCH clause for given type. + * + * @param integer $type The foreign key match type + * + * @return string + * + * @throws \InvalidArgumentException if unknown match type given + */ + public function getForeignKeyMatchClauseSQL($type) + { + switch ((int) $type) { + case self::FOREIGN_KEY_MATCH_SIMPLE: + return 'SIMPLE'; + break; + case self::FOREIGN_KEY_MATCH_FULL: + return 'FULL'; + break; + case self::FOREIGN_KEY_MATCH_SIMPLE_UNIQUE: + return 'UNIQUE SIMPLE'; + break; + case self::FOREIGN_KEY_MATCH_FULL_UNIQUE: + return 'UNIQUE FULL'; + default: + throw new \InvalidArgumentException('Invalid foreign key match type: ' . $type); + } + } + + /** + * {@inheritdoc} + */ + public function getForeignKeyReferentialActionSQL($action) + { + // NO ACTION is not supported, therefore falling back to RESTRICT. + if (strtoupper($action) === 'NO ACTION') { + return 'RESTRICT'; + } + + return parent::getForeignKeyReferentialActionSQL($action); + } + + /** + * {@inheritdoc} + */ + public function getForUpdateSQL() + { + return ''; + } + + /** + * {@inheritdoc} + */ + public function getGuidExpression() + { + return 'NEWID()'; + } + + /** + * {@inheritdoc} + */ + public function getGuidTypeDeclarationSQL(array $field) + { + return 'UNIQUEIDENTIFIER'; + } + + /** + * {@inheritdoc} + */ + public function getIndexDeclarationSQL($name, Index $index) + { + // Index declaration in statements like CREATE TABLE is not supported. + throw DBALException::notSupported(__METHOD__); + } + + /** + * {@inheritdoc} + */ + public function getIntegerTypeDeclarationSQL(array $columnDef) + { + $columnDef['integer_type'] = 'INT'; + + return $this->_getCommonIntegerTypeDeclarationSQL($columnDef); + } + + /** + * {@inheritdoc} + */ + public function getListDatabasesSQL() + { + return 'SELECT db_name(number) AS name FROM sa_db_list()'; + } + + /** + * {@inheritdoc} + */ + public function getListTableColumnsSQL($table, $database = null) + { + $user = 'USER_NAME()'; + + if (strpos($table, '.') !== false) { + list($user, $table) = explode('.', $table); + $user = $this->quoteStringLiteral($user); + } + + return "SELECT col.column_name, + COALESCE(def.user_type_name, def.domain_name) AS 'type', + def.declared_width AS 'length', + def.scale, + CHARINDEX('unsigned', def.domain_name) AS 'unsigned', + IF col.nulls = 'Y' THEN 0 ELSE 1 ENDIF AS 'notnull', + col.\"default\", + def.is_autoincrement AS 'autoincrement', + rem.remarks AS 'comment' + FROM sa_describe_query('SELECT * FROM \"$table\"') AS def + JOIN SYS.SYSTABCOL AS col + ON col.table_id = def.base_table_id AND col.column_id = def.base_column_id + LEFT JOIN SYS.SYSREMARK AS rem + ON col.object_id = rem.object_id + WHERE def.base_owner_name = $user + ORDER BY def.base_column_id ASC"; + } + + /** + * {@inheritdoc} + * + * @todo Where is this used? Which information should be retrieved? + */ + public function getListTableConstraintsSQL($table) + { + $user = ''; + + if (strpos($table, '.') !== false) { + list($user, $table) = explode('.', $table); + $user = $this->quoteStringLiteral($user); + $table = $this->quoteStringLiteral($table); + } else { + $table = $this->quoteStringLiteral($table); + } + + return "SELECT con.* + FROM SYS.SYSCONSTRAINT AS con + JOIN SYS.SYSTAB AS tab ON con.table_object_id = tab.object_id + WHERE tab.table_name = $table + AND tab.creator = USER_ID($user)"; + } + + /** + * {@inheritdoc} + */ + public function getListTableForeignKeysSQL($table) + { + $user = ''; + + if (strpos($table, '.') !== false) { + list($user, $table) = explode('.', $table); + $user = $this->quoteStringLiteral($user); + $table = $this->quoteStringLiteral($table); + } else { + $table = $this->quoteStringLiteral($table); + } + + return "SELECT fcol.column_name AS local_column, + ptbl.table_name AS foreign_table, + pcol.column_name AS foreign_column, + idx.index_name, + IF fk.nulls = 'N' + THEN 1 + ELSE NULL + ENDIF AS notnull, + CASE ut.referential_action + WHEN 'C' THEN 'CASCADE' + WHEN 'D' THEN 'SET DEFAULT' + WHEN 'N' THEN 'SET NULL' + WHEN 'R' THEN 'RESTRICT' + ELSE NULL + END AS on_update, + CASE dt.referential_action + WHEN 'C' THEN 'CASCADE' + WHEN 'D' THEN 'SET DEFAULT' + WHEN 'N' THEN 'SET NULL' + WHEN 'R' THEN 'RESTRICT' + ELSE NULL + END AS on_delete, + IF fk.check_on_commit = 'Y' + THEN 1 + ELSE NULL + ENDIF AS check_on_commit, -- check_on_commit flag + IF ftbl.clustered_index_id = idx.index_id + THEN 1 + ELSE NULL + ENDIF AS 'clustered', -- clustered flag + IF fk.match_type = 0 + THEN NULL + ELSE fk.match_type + ENDIF AS 'match', -- match option + IF pidx.max_key_distance = 1 + THEN 1 + ELSE NULL + ENDIF AS for_olap_workload -- for_olap_workload flag + FROM SYS.SYSFKEY AS fk + JOIN SYS.SYSIDX AS idx + ON fk.foreign_table_id = idx.table_id + AND fk.foreign_index_id = idx.index_id + JOIN SYS.SYSPHYSIDX pidx + ON idx.table_id = pidx.table_id + AND idx.phys_index_id = pidx.phys_index_id + JOIN SYS.SYSTAB AS ptbl + ON fk.primary_table_id = ptbl.table_id + JOIN SYS.SYSTAB AS ftbl + ON fk.foreign_table_id = ftbl.table_id + JOIN SYS.SYSIDXCOL AS idxcol + ON idx.table_id = idxcol.table_id + AND idx.index_id = idxcol.index_id + JOIN SYS.SYSTABCOL AS pcol + ON ptbl.table_id = pcol.table_id + AND idxcol.primary_column_id = pcol.column_id + JOIN SYS.SYSTABCOL AS fcol + ON ftbl.table_id = fcol.table_id + AND idxcol.column_id = fcol.column_id + LEFT JOIN SYS.SYSTRIGGER ut + ON fk.foreign_table_id = ut.foreign_table_id + AND fk.foreign_index_id = ut.foreign_key_id + AND ut.event = 'C' + LEFT JOIN SYS.SYSTRIGGER dt + ON fk.foreign_table_id = dt.foreign_table_id + AND fk.foreign_index_id = dt.foreign_key_id + AND dt.event = 'D' + WHERE ftbl.table_name = $table + AND ftbl.creator = USER_ID($user) + ORDER BY fk.foreign_index_id ASC, idxcol.sequence ASC"; + } + + /** + * {@inheritdoc} + */ + public function getListTableIndexesSQL($table, $currentDatabase = null) + { + $user = ''; + + if (strpos($table, '.') !== false) { + list($user, $table) = explode('.', $table); + $user = $this->quoteStringLiteral($user); + $table = $this->quoteStringLiteral($table); + } else { + $table = $this->quoteStringLiteral($table); + } + + return "SELECT idx.index_name AS key_name, + IF idx.index_category = 1 + THEN 1 + ELSE 0 + ENDIF AS 'primary', + col.column_name, + IF idx.\"unique\" IN(1, 2, 5) + THEN 0 + ELSE 1 + ENDIF AS non_unique, + IF tbl.clustered_index_id = idx.index_id + THEN 1 + ELSE NULL + ENDIF AS 'clustered', -- clustered flag + IF idx.\"unique\" = 5 + THEN 1 + ELSE NULL + ENDIF AS with_nulls_not_distinct, -- with_nulls_not_distinct flag + IF pidx.max_key_distance = 1 + THEN 1 + ELSE NULL + ENDIF AS for_olap_workload -- for_olap_workload flag + FROM SYS.SYSIDX AS idx + JOIN SYS.SYSPHYSIDX pidx + ON idx.table_id = pidx.table_id + AND idx.phys_index_id = pidx.phys_index_id + JOIN SYS.SYSIDXCOL AS idxcol + ON idx.table_id = idxcol.table_id AND idx.index_id = idxcol.index_id + JOIN SYS.SYSTABCOL AS col + ON idxcol.table_id = col.table_id AND idxcol.column_id = col.column_id + JOIN SYS.SYSTAB AS tbl + ON idx.table_id = tbl.table_id + WHERE tbl.table_name = $table + AND tbl.creator = USER_ID($user) + AND idx.index_category != 2 -- exclude indexes implicitly created by foreign key constraints + ORDER BY idx.index_id ASC, idxcol.sequence ASC"; + } + + /** + * {@inheritdoc} + */ + public function getListTablesSQL() + { + return "SELECT tbl.table_name + FROM SYS.SYSTAB AS tbl + JOIN SYS.SYSUSER AS usr ON tbl.creator = usr.user_id + JOIN dbo.SYSOBJECTS AS obj ON tbl.object_id = obj.id + WHERE tbl.table_type IN(1, 3) -- 'BASE', 'GBL TEMP' + AND usr.user_name NOT IN('SYS', 'dbo', 'rs_systabgroup') -- exclude system users + AND obj.type = 'U' -- user created tables only + ORDER BY tbl.table_name ASC"; + } + + /** + * {@inheritdoc} + * + * @todo Where is this used? Which information should be retrieved? + */ + public function getListUsersSQL() + { + return 'SELECT * FROM SYS.SYSUSER ORDER BY user_name ASC'; + } + + /** + * {@inheritdoc} + */ + public function getListViewsSQL($database) + { + return "SELECT tbl.table_name, v.view_def + FROM SYS.SYSVIEW v + JOIN SYS.SYSTAB tbl ON v.view_object_id = tbl.object_id + JOIN SYS.SYSUSER usr ON tbl.creator = usr.user_id + JOIN dbo.SYSOBJECTS obj ON tbl.object_id = obj.id + WHERE usr.user_name NOT IN('SYS', 'dbo', 'rs_systabgroup') -- exclude system users + ORDER BY tbl.table_name ASC"; + } + + /** + * {@inheritdoc} + */ + public function getLocateExpression($str, $substr, $startPos = false) + { + if ($startPos == false) { + return 'LOCATE(' . $str . ', ' . $substr . ')'; + } + + return 'LOCATE(' . $str . ', ' . $substr . ', ' . $startPos . ')'; + } + + /** + * {@inheritdoc} + */ + public function getMaxIdentifierLength() + { + return 128; + } + + /** + * {@inheritdoc} + */ + public function getMd5Expression($column) + { + return "HASH(" . $column . ", 'MD5')"; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'sqlanywhere'; + } + + /** + * Obtain DBMS specific SQL code portion needed to set a primary key + * declaration to be used in statements like ALTER TABLE. + * + * @param Index $index Index definition + * @param string $name Name of the primary key + * + * @return string DBMS specific SQL code portion needed to set a primary key + * + * @throws \InvalidArgumentException if the given index is not a primary key. + */ + public function getPrimaryKeyDeclarationSQL(Index $index, $name = null) + { + if ( ! $index->isPrimary()) { + throw new \InvalidArgumentException( + 'Can only create primary key declarations with getPrimaryKeyDeclarationSQL()' + ); + } + + return $this->getTableConstraintDeclarationSQL($index, $name); + } + + /** + * {@inheritdoc} + */ + public function getSetTransactionIsolationSQL($level) + { + return 'SET TEMPORARY OPTION isolation_level = ' . $this->_getTransactionIsolationLevelSQL($level); + } + + /** + * {@inheritdoc} + */ + public function getSmallIntTypeDeclarationSQL(array $columnDef) + { + $columnDef['integer_type'] = 'SMALLINT'; + + return $this->_getCommonIntegerTypeDeclarationSQL($columnDef); + } + + /** + * Returns the SQL statement for starting an existing database. + * + * In SQL Anywhere you can start and stop databases on a + * database server instance. + * This is a required statement after having created a new database + * as it has to be explicitly started to be usable. + * SQL Anywhere does not automatically start a database after creation! + * + * @param string $database Name of the database to start. + * + * @return string + */ + public function getStartDatabaseSQL($database) + { + $database = new Identifier($database); + + return "START DATABASE '" . $database->getName() . "' AUTOSTOP OFF"; + } + + /** + * Returns the SQL statement for stopping a running database. + * + * In SQL Anywhere you can start and stop databases on a + * database server instance. + * This is a required statement before dropping an existing database + * as it has to be explicitly stopped before it can be dropped. + * + * @param string $database Name of the database to stop. + * + * @return string + */ + public function getStopDatabaseSQL($database) + { + $database = new Identifier($database); + + return 'STOP DATABASE "' . $database->getName() . '" UNCONDITIONALLY'; + } + + /** + * {@inheritdoc} + */ + public function getSubstringExpression($value, $from, $length = null) + { + if (null === $length) { + return 'SUBSTRING(' . $value . ', ' . $from . ')'; + } + + return 'SUBSTRING(' . $value . ', ' . $from . ', ' . $length . ')'; + } + + /** + * {@inheritdoc} + */ + public function getTemporaryTableSQL() + { + return 'GLOBAL TEMPORARY'; + } + + /** + * {@inheritdoc} + */ + public function getTimeFormatString() + { + return 'H:i:s.u'; + } + + /** + * {@inheritdoc} + */ + public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIME'; + } + + /** + * {@inheritdoc} + */ + public function getTrimExpression($str, $pos = self::TRIM_UNSPECIFIED, $char = false) + { + if ( ! $char) { + switch ($pos) { + case self::TRIM_LEADING: + return $this->getLtrimExpression($str); + case self::TRIM_TRAILING: + return $this->getRtrimExpression($str); + default: + return 'TRIM(' . $str . ')'; + } + } + + $pattern = "'%[^' + $char + ']%'"; + + switch ($pos) { + case self::TRIM_LEADING: + return 'SUBSTR(' . $str . ', PATINDEX(' . $pattern . ', ' . $str . '))'; + case self::TRIM_TRAILING: + return 'REVERSE(SUBSTR(REVERSE(' . $str . '), PATINDEX(' . $pattern . ', REVERSE(' . $str . '))))'; + default: + return + 'REVERSE(SUBSTR(REVERSE(SUBSTR(' . $str . ', PATINDEX(' . $pattern . ', ' . $str . '))), ' . + 'PATINDEX(' . $pattern . ', REVERSE(SUBSTR(' . $str . ', PATINDEX(' . $pattern . ', ' . $str . '))))))'; + } + } + + /** + * {@inheritdoc} + */ + public function getTruncateTableSQL($tableName, $cascade = false) + { + $tableIdentifier = new Identifier($tableName); + + return 'TRUNCATE TABLE ' . $tableIdentifier->getQuotedName($this); + } + + /** + * {@inheritdoc} + */ + public function getUniqueConstraintDeclarationSQL($name, Index $index) + { + if ($index->isPrimary()) { + throw new \InvalidArgumentException( + 'Cannot create primary key constraint declarations with getUniqueConstraintDeclarationSQL().' + ); + } + + if ( ! $index->isUnique()) { + throw new \InvalidArgumentException( + 'Can only create unique constraint declarations, no common index declarations with ' . + 'getUniqueConstraintDeclarationSQL().' + ); + } + + return $this->getTableConstraintDeclarationSQL($index, $name); + } + + /** + * {@inheritdoc} + */ + public function getVarcharDefaultLength() + { + return 1; + } + + /** + * {@inheritdoc} + */ + public function getVarcharMaxLength() + { + return 32767; + } + + /** + * {@inheritdoc} + */ + public function hasNativeGuidType() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function prefersIdentityColumns() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function supportsCommentOnStatement() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function supportsIdentityColumns() + { + return true; + } + + /** + * {@inheritdoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + { + $unsigned = ! empty($columnDef['unsigned']) ? 'UNSIGNED ' : ''; + $autoincrement = ! empty($columnDef['autoincrement']) ? ' IDENTITY' : ''; + + return $unsigned . $columnDef['integer_type'] . $autoincrement; + } + + /** + * {@inheritdoc} + */ + protected function _getCreateTableSQL($tableName, array $columns, array $options = array()) + { + $columnListSql = $this->getColumnDeclarationListSQL($columns); + $indexSql = array(); + + if ( ! empty($options['uniqueConstraints'])) { + foreach ((array) $options['uniqueConstraints'] as $name => $definition) { + $columnListSql .= ', ' . $this->getUniqueConstraintDeclarationSQL($name, $definition); + } + } + + if ( ! empty($options['indexes'])) { + /** @var \Doctrine\DBAL\Schema\Index $index */ + foreach ((array) $options['indexes'] as $index) { + $indexSql[] = $this->getCreateIndexSQL($index, $tableName); + } + } + + if ( ! empty($options['primary'])) { + $flags = ''; + + if (isset($options['primary_index']) && $options['primary_index']->hasFlag('clustered')) { + $flags = ' CLUSTERED '; + } + + $columnListSql .= ', PRIMARY KEY' . $flags . ' (' . implode(', ', array_unique(array_values((array) $options['primary']))) . ')'; + } + + if ( ! empty($options['foreignKeys'])) { + foreach ((array) $options['foreignKeys'] as $definition) { + $columnListSql .= ', ' . $this->getForeignKeyDeclarationSQL($definition); + } + } + + $query = 'CREATE TABLE ' . $tableName . ' (' . $columnListSql; + $check = $this->getCheckDeclarationSQL($columns); + + if ( ! empty($check)) { + $query .= ', ' . $check; + } + + $query .= ')'; + + return array_merge(array($query), $indexSql); + } + + /** + * {@inheritdoc} + */ + protected function _getTransactionIsolationLevelSQL($level) + { + switch ($level) { + case Connection::TRANSACTION_READ_UNCOMMITTED: + return 0; + case Connection::TRANSACTION_READ_COMMITTED: + return 1; + case Connection::TRANSACTION_REPEATABLE_READ: + return 2; + case Connection::TRANSACTION_SERIALIZABLE: + return 3; + default: + throw new \InvalidArgumentException('Invalid isolation level:' . $level); + } + } + + /** + * {@inheritdoc} + */ + protected function doModifyLimitQuery($query, $limit, $offset) + { + $limitOffsetClause = ''; + + if ($limit > 0) { + $limitOffsetClause = 'TOP ' . $limit . ' '; + } + + if ($offset > 0) { + if ($limit == 0) { + $limitOffsetClause = 'TOP ALL '; + } + + $limitOffsetClause .= 'START AT ' . ($offset + 1) . ' '; + } + + if ($limitOffsetClause) { + return preg_replace('/^\s*(SELECT\s+(DISTINCT\s+)?)/i', '\1' . $limitOffsetClause, $query); + } + + return $query; + } + + /** + * Return the INDEX query section dealing with non-standard + * SQL Anywhere options. + * + * @param Index $index Index definition + * + * @return string + */ + protected function getAdvancedIndexOptionsSQL(Index $index) + { + $sql = ''; + + if ( ! $index->isPrimary() && $index->hasFlag('for_olap_workload')) { + $sql .= ' FOR OLAP WORKLOAD'; + } + + return $sql; + } + + /** + * {@inheritdoc} + */ + protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) + { + return $fixed + ? 'BINARY(' . ($length ?: $this->getBinaryDefaultLength()) . ')' + : 'VARBINARY(' . ($length ?: $this->getBinaryDefaultLength()) . ')'; + } + + /** + * Returns the SQL snippet for creating a table constraint. + * + * @param Constraint $constraint The table constraint to create the SQL snippet for. + * @param string|null $name The table constraint name to use if any. + * + * @return string + * + * @throws \InvalidArgumentException if the given table constraint type is not supported by this method. + */ + protected function getTableConstraintDeclarationSQL(Constraint $constraint, $name = null) + { + if ($constraint instanceof ForeignKeyConstraint) { + return $this->getForeignKeyDeclarationSQL($constraint); + } + + if ( ! $constraint instanceof Index) { + throw new \InvalidArgumentException('Unsupported constraint type: ' . get_class($constraint)); + } + + if ( ! $constraint->isPrimary() && ! $constraint->isUnique()) { + throw new \InvalidArgumentException( + 'Can only create primary, unique or foreign key constraint declarations, no common index declarations ' . + 'with getTableConstraintDeclarationSQL().' + ); + } + + $constraintColumns = $constraint->getQuotedColumns($this); + + if (empty($constraintColumns)) { + throw new \InvalidArgumentException("Incomplete definition. 'columns' required."); + } + + $sql = ''; + $flags = ''; + + if ( ! empty($name)) { + $name = new Identifier($name); + $sql .= 'CONSTRAINT ' . $name->getQuotedName($this) . ' '; + } + + if ($constraint->hasFlag('clustered')) { + $flags = 'CLUSTERED '; + } + + if ($constraint->isPrimary()) { + return $sql . 'PRIMARY KEY ' . $flags . '('. $this->getIndexFieldDeclarationListSQL($constraintColumns) . ')'; + } + + return $sql . 'UNIQUE ' . $flags . '('. $this->getIndexFieldDeclarationListSQL($constraintColumns) . ')'; + } + + /** + * {@inheritdoc} + */ + protected function getCreateIndexSQLFlags(Index $index) + { + $type = ''; + if ($index->hasFlag('virtual')) { + $type .= 'VIRTUAL '; + } + + if ($index->isUnique()) { + $type .= 'UNIQUE '; + } + + if ($index->hasFlag('clustered')) { + $type .= 'CLUSTERED '; + } + + return $type; + } + + /** + * {@inheritdoc} + */ + protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName) + { + return array( + 'ALTER INDEX ' . $oldIndexName . ' ON ' . $tableName . ' RENAME TO ' . $index->getQuotedName($this) + ); + } + + /** + * {@inheritdoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\SQLAnywhereKeywords'; + } + + /** + * {@inheritdoc} + */ + protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) + { + return $fixed + ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(' . $this->getVarcharDefaultLength() . ')') + : ($length ? 'VARCHAR(' . $length . ')' : 'VARCHAR(' . $this->getVarcharDefaultLength() . ')'); + } + + /** + * {@inheritdoc} + */ + protected function initializeDoctrineTypeMappings() + { + $this->doctrineTypeMapping = array( + 'char' => 'string', + 'long nvarchar' => 'text', + 'long varchar' => 'text', + 'nchar' => 'string', + 'ntext' => 'text', + 'nvarchar' => 'string', + 'text' => 'text', + 'uniqueidentifierstr' => 'guid', + 'varchar' => 'string', + 'xml' => 'text', + 'bigint' => 'bigint', + 'unsigned bigint' => 'bigint', + 'bit' => 'boolean', + 'decimal' => 'decimal', + 'double' => 'float', + 'float' => 'float', + 'int' => 'integer', + 'integer' => 'integer', + 'unsigned int' => 'integer', + 'numeric' => 'decimal', + 'smallint' => 'smallint', + 'unsigned smallint', 'smallint', + 'tinyint' => 'smallint', + 'unsigned tinyint', 'smallint', + 'money' => 'decimal', + 'smallmoney' => 'decimal', + 'long varbit' => 'text', + 'varbit' => 'string', + 'date' => 'date', + 'datetime' => 'datetime', + 'smalldatetime' => 'datetime', + 'time' => 'time', + 'timestamp' => 'datetime', + 'binary' => 'binary', + 'image' => 'blob', + 'long binary' => 'blob', + 'uniqueidentifier' => 'guid', + 'varbinary' => 'binary', + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAzurePlatform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAzurePlatform.php new file mode 100644 index 0000000000000000000000000000000000000000..71829cd0e0d4810ebff752c66c32e15adaff9a10 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAzurePlatform.php @@ -0,0 +1,50 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\Schema\Table; + +/** + * Platform to ensure compatibility of Doctrine with SQL Azure + * + * On top of SQL Server 2008 the following functionality is added: + * + * - Create tables with the FEDERATED ON syntax. + */ +class SQLAzurePlatform extends SQLServer2008Platform +{ + /** + * {@inheritDoc} + */ + public function getCreateTableSQL(Table $table, $createFlags=self::CREATE_INDEXES) + { + $sql = parent::getCreateTableSQL($table, $createFlags); + + if ($table->hasOption('azure.federatedOnColumnName')) { + $distributionName = $table->getOption('azure.federatedOnDistributionName'); + $columnName = $table->getOption('azure.federatedOnColumnName'); + $stmt = ' FEDERATED ON (' . $distributionName . ' = ' . $columnName . ')'; + + $sql[0] = $sql[0] . $stmt; + } + + return $sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php new file mode 100644 index 0000000000000000000000000000000000000000..6dc1188fadf1f7157ba9faf5852f2a55a14543d9 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php @@ -0,0 +1,63 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +/** + * Platform to ensure compatibility of Doctrine with Microsoft SQL Server 2005 version and + * higher. + * + * Differences to SQL Server 2008 are: + * + * - DATETIME2 datatype does not exist, only DATETIME which has a precision of + * 3. This is not supported by PHP DateTime, so we are emulating it by + * setting .000 manually. + * - Starting with SQLServer2005 VARCHAR(MAX), VARBINARY(MAX) and + * NVARCHAR(max) replace the old TEXT, NTEXT and IMAGE types. See + * {@link http://www.sql-server-helper.com/faq/sql-server-2005-varchar-max-p01.aspx} + * for more information. + */ +class SQLServer2005Platform extends SQLServerPlatform +{ + /** + * {@inheritDoc} + */ + public function supportsLimitOffset() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $field) + { + return 'VARCHAR(MAX)'; + } + + /** + * {@inheritdoc} + * + * Returns Microsoft SQL Server 2005 specific keywords class + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\SQLServer2005Keywords'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php new file mode 100644 index 0000000000000000000000000000000000000000..8b1184d195a78c9a769af06594220d702c8ac36b --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php @@ -0,0 +1,119 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +/** + * Platform to ensure compatibility of Doctrine with Microsoft SQL Server 2008 version. + * + * Differences to SQL Server 2005 and before are that a new DATETIME2 type was + * introduced that has a higher precision. + */ +class SQLServer2008Platform extends SQLServer2005Platform +{ + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + { + // 3 - microseconds precision length + // http://msdn.microsoft.com/en-us/library/ms187819.aspx + return 'DATETIME2(6)'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIME(0)'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATETIMEOFFSET(6)'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeFormatString() + { + return 'Y-m-d H:i:s.u'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTzFormatString() + { + return 'Y-m-d H:i:s.u P'; + } + + /** + * {@inheritDoc} + */ + public function getDateFormatString() + { + return 'Y-m-d'; + } + + /** + * {@inheritDoc} + */ + public function getTimeFormatString() + { + return 'H:i:s'; + } + + /** + * {@inheritDoc} + * + * Adding Datetime2 Type + */ + protected function initializeDoctrineTypeMappings() + { + parent::initializeDoctrineTypeMappings(); + $this->doctrineTypeMapping['datetime2'] = 'datetime'; + $this->doctrineTypeMapping['date'] = 'date'; + $this->doctrineTypeMapping['time'] = 'time'; + $this->doctrineTypeMapping['datetimeoffset'] = 'datetimetz'; + } + + /** + * {@inheritdoc} + * + * Returns Microsoft SQL Server 2008 specific keywords class + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\SQLServer2008Keywords'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php new file mode 100644 index 0000000000000000000000000000000000000000..c9bceaffdebc605e1740c340524420e84c4bfbee --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php @@ -0,0 +1,158 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\Schema\Sequence; + +/** + * Platform to ensure compatibility of Doctrine with Microsoft SQL Server 2012 version. + * + * Differences to SQL Server 2008 and before are that sequences are introduced. + * + * @author Steve Müller + */ +class SQLServer2012Platform extends SQLServer2008Platform +{ + /** + * {@inheritdoc} + */ + public function getAlterSequenceSQL(Sequence $sequence) + { + return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) . + ' INCREMENT BY ' . $sequence->getAllocationSize(); + } + + /** + * {@inheritdoc} + */ + public function getCreateSequenceSQL(Sequence $sequence) + { + return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) . + ' START WITH ' . $sequence->getInitialValue() . + ' INCREMENT BY ' . $sequence->getAllocationSize() . + ' MINVALUE ' . $sequence->getInitialValue(); + } + + /** + * {@inheritdoc} + */ + public function getDropSequenceSQL($sequence) + { + if ($sequence instanceof Sequence) { + $sequence = $sequence->getQuotedName($this); + } + + return 'DROP SEQUENCE ' . $sequence; + } + + /** + * {@inheritdoc} + */ + public function getListSequencesSQL($database) + { + return 'SELECT seq.name, + CAST( + seq.increment AS VARCHAR(MAX) + ) AS increment, -- CAST avoids driver error for sql_variant type + CAST( + seq.start_value AS VARCHAR(MAX) + ) AS start_value -- CAST avoids driver error for sql_variant type + FROM sys.sequences AS seq'; + } + + /** + * {@inheritdoc} + */ + public function getSequenceNextValSQL($sequenceName) + { + return 'SELECT NEXT VALUE FOR ' . $sequenceName; + } + + /** + * {@inheritdoc} + */ + public function supportsSequences() + { + return true; + } + + /** + * {@inheritdoc} + * + * Returns Microsoft SQL Server 2012 specific keywords class + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\SQLServer2012Keywords'; + } + + /** + * {@inheritdoc} + */ + protected function doModifyLimitQuery($query, $limit, $offset = null) + { + if ($limit === null && $offset === null) { + return $query; + } + + // Queries using OFFSET... FETCH MUST have an ORDER BY clause + // Find the position of the last instance of ORDER BY and ensure it is not within a parenthetical statement + // but can be in a newline + $matches = array(); + $matchesCount = preg_match_all("/[\\s]+order by /i", $query, $matches, PREG_OFFSET_CAPTURE); + $orderByPos = false; + + if ($matchesCount > 0) { + $orderByPos = $matches[0][($matchesCount - 1)][1]; + } + + if ($orderByPos === false + || substr_count($query, "(", $orderByPos) - substr_count($query, ")", $orderByPos) + ) { + if (stripos($query, 'SELECT DISTINCT') === 0) { + // SQL Server won't let us order by a non-selected column in a DISTINCT query, + // so we have to do this madness. This says, order by the first column in the + // result. SQL Server's docs say that a nonordered query's result order is non- + // deterministic anyway, so this won't do anything that a bunch of update and + // deletes to the table wouldn't do anyway. + $query .= " ORDER BY 1"; + } else { + // In another DBMS, we could do ORDER BY 0, but SQL Server gets angry if you + // use constant expressions in the order by list. + $query .= " ORDER BY (SELECT 0)"; + } + } + + if ($offset === null) { + $offset = 0; + } + + // This looks somewhat like MYSQL, but limit/offset are in inverse positions + // Supposedly SQL:2008 core standard. + // Per TSQL spec, FETCH NEXT n ROWS ONLY is not valid without OFFSET n ROWS. + $query .= " OFFSET " . (int) $offset . " ROWS"; + + if ($limit !== null) { + $query .= " FETCH NEXT " . (int) $limit . " ROWS ONLY"; + } + + return $query; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php new file mode 100644 index 0000000000000000000000000000000000000000..b0e53f44361afffa3a52a3595be96e7a8d3b4001 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php @@ -0,0 +1,1627 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\LockMode; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\ColumnDiff; +use Doctrine\DBAL\Schema\Identifier; +use Doctrine\DBAL\Schema\TableDiff; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\Table; + +/** + * The SQLServerPlatform provides the behavior, features and SQL dialect of the + * Microsoft SQL Server database platform. + * + * @since 2.0 + * @author Roman Borschel + * @author Jonathan H. Wage + * @author Benjamin Eberlei + * @author Steve Müller + */ +class SQLServerPlatform extends AbstractPlatform +{ + /** + * {@inheritdoc} + */ + public function getCurrentDateSQL() + { + return $this->getConvertExpression('date', 'GETDATE()'); + } + + /** + * {@inheritdoc} + */ + public function getCurrentTimeSQL() + { + return $this->getConvertExpression('time', 'GETDATE()'); + } + + /** + * Returns an expression that converts an expression of one data type to another. + * + * @param string $dataType The target native data type. Alias data types cannot be used. + * @param string $expression The SQL expression to convert. + * + * @return string + */ + private function getConvertExpression($dataType, $expression) + { + return sprintf('CONVERT(%s, %s)', $dataType, $expression); + } + + /** + * {@inheritdoc} + */ + protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) + { + $factorClause = ''; + + if ('-' === $operator) { + $factorClause = '-1 * '; + } + + return 'DATEADD(' . $unit . ', ' . $factorClause . $interval . ', ' . $date . ')'; + } + + /** + * {@inheritDoc} + */ + public function getDateDiffExpression($date1, $date2) + { + return 'DATEDIFF(day, ' . $date2 . ',' . $date1 . ')'; + } + + /** + * {@inheritDoc} + * + * Microsoft SQL Server prefers "autoincrement" identity columns + * since sequences can only be emulated with a table. + */ + public function prefersIdentityColumns() + { + return true; + } + + /** + * {@inheritDoc} + * + * Microsoft SQL Server supports this through AUTO_INCREMENT columns. + */ + public function supportsIdentityColumns() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function supportsReleaseSavepoints() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function supportsSchemas() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function getDefaultSchemaName() + { + return 'dbo'; + } + + /** + * {@inheritDoc} + */ + public function supportsColumnCollation() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function hasNativeGuidType() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function getCreateDatabaseSQL($name) + { + return 'CREATE DATABASE ' . $name; + } + + /** + * {@inheritDoc} + */ + public function getDropDatabaseSQL($name) + { + return 'DROP DATABASE ' . $name; + } + + /** + * {@inheritDoc} + */ + public function supportsCreateDropDatabase() + { + return false; + } + + /** + * {@inheritDoc} + */ + public function getCreateSchemaSQL($schemaName) + { + return 'CREATE SCHEMA ' . $schemaName; + } + + /** + * {@inheritDoc} + */ + public function getDropForeignKeySQL($foreignKey, $table) + { + if (! $foreignKey instanceof ForeignKeyConstraint) { + $foreignKey = new Identifier($foreignKey); + } + + if (! $table instanceof Table) { + $table = new Identifier($table); + } + + $foreignKey = $foreignKey->getQuotedName($this); + $table = $table->getQuotedName($this); + + return 'ALTER TABLE ' . $table . ' DROP CONSTRAINT ' . $foreignKey; + } + + /** + * {@inheritDoc} + */ + public function getDropIndexSQL($index, $table = null) + { + if ($index instanceof Index) { + $index = $index->getQuotedName($this); + } elseif (!is_string($index)) { + throw new \InvalidArgumentException('AbstractPlatform::getDropIndexSQL() expects $index parameter to be string or \Doctrine\DBAL\Schema\Index.'); + } + + if (!isset($table)) { + return 'DROP INDEX ' . $index; + } + + if ($table instanceof Table) { + $table = $table->getQuotedName($this); + } + + return "IF EXISTS (SELECT * FROM sysobjects WHERE name = '$index') + ALTER TABLE " . $table . " DROP CONSTRAINT " . $index . " + ELSE + DROP INDEX " . $index . " ON " . $table; + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL($tableName, array $columns, array $options = array()) + { + $defaultConstraintsSql = array(); + $commentsSql = array(); + + // @todo does other code breaks because of this? + // force primary keys to be not null + foreach ($columns as &$column) { + if (isset($column['primary']) && $column['primary']) { + $column['notnull'] = true; + } + + // Build default constraints SQL statements. + if (isset($column['default'])) { + $defaultConstraintsSql[] = 'ALTER TABLE ' . $tableName . + ' ADD' . $this->getDefaultConstraintDeclarationSQL($tableName, $column); + } + + if ( ! empty($column['comment']) || is_numeric($column['comment'])) { + $commentsSql[] = $this->getCreateColumnCommentSQL($tableName, $column['name'], $column['comment']); + } + } + + $columnListSql = $this->getColumnDeclarationListSQL($columns); + + if (isset($options['uniqueConstraints']) && !empty($options['uniqueConstraints'])) { + foreach ($options['uniqueConstraints'] as $name => $definition) { + $columnListSql .= ', ' . $this->getUniqueConstraintDeclarationSQL($name, $definition); + } + } + + if (isset($options['primary']) && !empty($options['primary'])) { + $flags = ''; + if (isset($options['primary_index']) && $options['primary_index']->hasFlag('nonclustered')) { + $flags = ' NONCLUSTERED'; + } + $columnListSql .= ', PRIMARY KEY' . $flags . ' (' . implode(', ', array_unique(array_values($options['primary']))) . ')'; + } + + $query = 'CREATE TABLE ' . $tableName . ' (' . $columnListSql; + + $check = $this->getCheckDeclarationSQL($columns); + if (!empty($check)) { + $query .= ', ' . $check; + } + $query .= ')'; + + $sql[] = $query; + + if (isset($options['indexes']) && !empty($options['indexes'])) { + foreach ($options['indexes'] as $index) { + $sql[] = $this->getCreateIndexSQL($index, $tableName); + } + } + + if (isset($options['foreignKeys'])) { + foreach ((array) $options['foreignKeys'] as $definition) { + $sql[] = $this->getCreateForeignKeySQL($definition, $tableName); + } + } + + return array_merge($sql, $commentsSql, $defaultConstraintsSql); + } + + /** + * {@inheritDoc} + */ + public function getCreatePrimaryKeySQL(Index $index, $table) + { + $flags = ''; + if ($index->hasFlag('nonclustered')) { + $flags = ' NONCLUSTERED'; + } + + return 'ALTER TABLE ' . $table . ' ADD PRIMARY KEY' . $flags . ' (' . $this->getIndexFieldDeclarationListSQL($index->getQuotedColumns($this)) . ')'; + } + + /** + * Returns the SQL statement for creating a column comment. + * + * SQL Server does not support native column comments, + * therefore the extended properties functionality is used + * as a workaround to store them. + * The property name used to store column comments is "MS_Description" + * which provides compatibility with SQL Server Management Studio, + * as column comments are stored in the same property there when + * specifying a column's "Description" attribute. + * + * @param string $tableName The quoted table name to which the column belongs. + * @param string $columnName The quoted column name to create the comment for. + * @param string $comment The column's comment. + * + * @return string + */ + protected function getCreateColumnCommentSQL($tableName, $columnName, $comment) + { + return $this->getAddExtendedPropertySQL( + 'MS_Description', + $comment, + 'SCHEMA', + 'dbo', + 'TABLE', + $tableName, + 'COLUMN', + $columnName + ); + } + + /** + * Returns the SQL snippet for declaring a default constraint. + * + * @param string $table Name of the table to return the default constraint declaration for. + * @param array $column Column definition. + * + * @return string + * + * @throws \InvalidArgumentException + */ + public function getDefaultConstraintDeclarationSQL($table, array $column) + { + if ( ! isset($column['default'])) { + throw new \InvalidArgumentException("Incomplete column definition. 'default' required."); + } + + $columnName = new Identifier($column['name']); + + return + ' CONSTRAINT ' . + $this->generateDefaultConstraintName($table, $column['name']) . + $this->getDefaultValueDeclarationSQL($column) . + ' FOR ' . $columnName->getQuotedName($this); + } + + /** + * {@inheritDoc} + */ + public function getUniqueConstraintDeclarationSQL($name, Index $index) + { + $constraint = parent::getUniqueConstraintDeclarationSQL($name, $index); + + $constraint = $this->_appendUniqueConstraintDefinition($constraint, $index); + + return $constraint; + } + + /** + * {@inheritDoc} + */ + public function getCreateIndexSQL(Index $index, $table) + { + $constraint = parent::getCreateIndexSQL($index, $table); + + if ($index->isUnique() && !$index->isPrimary()) { + $constraint = $this->_appendUniqueConstraintDefinition($constraint, $index); + } + + return $constraint; + } + + /** + * {@inheritDoc} + */ + protected function getCreateIndexSQLFlags(Index $index) + { + $type = ''; + if ($index->isUnique()) { + $type .= 'UNIQUE '; + } + + if ($index->hasFlag('clustered')) { + $type .= 'CLUSTERED '; + } elseif ($index->hasFlag('nonclustered')) { + $type .= 'NONCLUSTERED '; + } + + return $type; + } + + /** + * Extend unique key constraint with required filters + * + * @param string $sql + * @param \Doctrine\DBAL\Schema\Index $index + * + * @return string + */ + private function _appendUniqueConstraintDefinition($sql, Index $index) + { + $fields = array(); + + foreach ($index->getQuotedColumns($this) as $field) { + $fields[] = $field . ' IS NOT NULL'; + } + + return $sql . ' WHERE ' . implode(' AND ', $fields); + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff) + { + $queryParts = array(); + $sql = array(); + $columnSql = array(); + $commentsSql = array(); + + /** @var \Doctrine\DBAL\Schema\Column $column */ + foreach ($diff->addedColumns as $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + + $columnDef = $column->toArray(); + $queryParts[] = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnDef); + + if (isset($columnDef['default'])) { + $queryParts[] = $this->getAlterTableAddDefaultConstraintClause($diff->name, $column); + } + + $comment = $this->getColumnComment($column); + + if ( ! empty($comment) || is_numeric($comment)) { + $commentsSql[] = $this->getCreateColumnCommentSQL( + $diff->name, + $column->getQuotedName($this), + $comment + ); + } + } + + foreach ($diff->removedColumns as $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + + $queryParts[] = 'DROP COLUMN ' . $column->getQuotedName($this); + } + + /* @var $columnDiff \Doctrine\DBAL\Schema\ColumnDiff */ + foreach ($diff->changedColumns as $columnDiff) { + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + + $column = $columnDiff->column; + $comment = $this->getColumnComment($column); + $hasComment = ! empty ($comment) || is_numeric($comment); + + if ($columnDiff->fromColumn instanceof Column) { + $fromComment = $this->getColumnComment($columnDiff->fromColumn); + $hasFromComment = ! empty ($fromComment) || is_numeric($fromComment); + + if ($hasFromComment && $hasComment && $fromComment != $comment) { + $commentsSql[] = $this->getAlterColumnCommentSQL( + $diff->name, + $column->getQuotedName($this), + $comment + ); + } elseif ($hasFromComment && ! $hasComment) { + $commentsSql[] = $this->getDropColumnCommentSQL($diff->name, $column->getQuotedName($this)); + } elseif ($hasComment) { + $commentsSql[] = $this->getCreateColumnCommentSQL( + $diff->name, + $column->getQuotedName($this), + $comment + ); + } + } else { + // todo: Original comment cannot be determined. What to do? Add, update, drop or skip? + } + + // Do not add query part if only comment has changed. + if ($columnDiff->hasChanged('comment') && count($columnDiff->changedProperties) === 1) { + continue; + } + + $requireDropDefaultConstraint = $this->alterColumnRequiresDropDefaultConstraint($columnDiff); + + if ($requireDropDefaultConstraint) { + $queryParts[] = $this->getAlterTableDropDefaultConstraintClause( + $diff->name, + $columnDiff->oldColumnName + ); + } + + $columnDef = $column->toArray(); + + $queryParts[] = 'ALTER COLUMN ' . + $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnDef); + + if (isset($columnDef['default']) && ($requireDropDefaultConstraint || $columnDiff->hasChanged('default'))) { + $queryParts[] = $this->getAlterTableAddDefaultConstraintClause($diff->name, $column); + } + } + + foreach ($diff->renamedColumns as $oldColumnName => $column) { + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + + $oldColumnName = new Identifier($oldColumnName); + + $sql[] = "sp_RENAME '" . + $diff->getName($this)->getQuotedName($this) . "." . $oldColumnName->getQuotedName($this) . + "', '" . $column->getQuotedName($this) . "', 'COLUMN'"; + + // Recreate default constraint with new column name if necessary (for future reference). + if ($column->getDefault() !== null) { + $queryParts[] = $this->getAlterTableDropDefaultConstraintClause( + $diff->name, + $oldColumnName->getQuotedName($this) + ); + $queryParts[] = $this->getAlterTableAddDefaultConstraintClause($diff->name, $column); + } + } + + $tableSql = array(); + + if ($this->onSchemaAlterTable($diff, $tableSql)) { + return array_merge($tableSql, $columnSql); + } + + foreach ($queryParts as $query) { + $sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query; + } + + $sql = array_merge($sql, $commentsSql); + + if ($diff->newName !== false) { + $sql[] = "sp_RENAME '" . $diff->getName($this)->getQuotedName($this) . "', '" . $diff->getNewName()->getName() . "'"; + + /** + * Rename table's default constraints names + * to match the new table name. + * This is necessary to ensure that the default + * constraints can be referenced in future table + * alterations as the table name is encoded in + * default constraints' names. + */ + $sql[] = "DECLARE @sql NVARCHAR(MAX) = N''; " . + "SELECT @sql += N'EXEC sp_rename N''' + dc.name + ''', N''' " . + "+ REPLACE(dc.name, '" . $this->generateIdentifierName($diff->name) . "', " . + "'" . $this->generateIdentifierName($diff->newName) . "') + ''', ''OBJECT'';' " . + "FROM sys.default_constraints dc " . + "JOIN sys.tables tbl ON dc.parent_object_id = tbl.object_id " . + "WHERE tbl.name = '" . $diff->getNewName()->getName() . "';" . + "EXEC sp_executesql @sql"; + } + + $sql = array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $sql, + $this->getPostAlterTableIndexForeignKeySQL($diff) + ); + + return array_merge($sql, $tableSql, $columnSql); + } + + /** + * Returns the SQL clause for adding a default constraint in an ALTER TABLE statement. + * + * @param string $tableName The name of the table to generate the clause for. + * @param Column $column The column to generate the clause for. + * + * @return string + */ + private function getAlterTableAddDefaultConstraintClause($tableName, Column $column) + { + $columnDef = $column->toArray(); + $columnDef['name'] = $column->getQuotedName($this); + + return 'ADD' . $this->getDefaultConstraintDeclarationSQL($tableName, $columnDef); + } + + /** + * Returns the SQL clause for dropping an existing default constraint in an ALTER TABLE statement. + * + * @param string $tableName The name of the table to generate the clause for. + * @param string $columnName The name of the column to generate the clause for. + * + * @return string + */ + private function getAlterTableDropDefaultConstraintClause($tableName, $columnName) + { + return 'DROP CONSTRAINT ' . $this->generateDefaultConstraintName($tableName, $columnName); + } + + /** + * Checks whether a column alteration requires dropping its default constraint first. + * + * Different to other database vendors SQL Server implements column default values + * as constraints and therefore changes in a column's default value as well as changes + * in a column's type require dropping the default constraint first before being to + * alter the particular column to the new definition. + * + * @param ColumnDiff $columnDiff The column diff to evaluate. + * + * @return boolean True if the column alteration requires dropping its default constraint first, false otherwise. + */ + private function alterColumnRequiresDropDefaultConstraint(ColumnDiff $columnDiff) + { + // We can only decide whether to drop an existing default constraint + // if we know the original default value. + if ( ! $columnDiff->fromColumn instanceof Column) { + return false; + } + + // We only need to drop an existing default constraint if we know the + // column was defined with a default value before. + if ($columnDiff->fromColumn->getDefault() === null) { + return false; + } + + // We need to drop an existing default constraint if the column was + // defined with a default value before and it has changed. + if ($columnDiff->hasChanged('default')) { + return true; + } + + // We need to drop an existing default constraint if the column was + // defined with a default value before and the native column type has changed. + if ($columnDiff->hasChanged('type') || $columnDiff->hasChanged('fixed')) { + return true; + } + + return false; + } + + /** + * Returns the SQL statement for altering a column comment. + * + * SQL Server does not support native column comments, + * therefore the extended properties functionality is used + * as a workaround to store them. + * The property name used to store column comments is "MS_Description" + * which provides compatibility with SQL Server Management Studio, + * as column comments are stored in the same property there when + * specifying a column's "Description" attribute. + * + * @param string $tableName The quoted table name to which the column belongs. + * @param string $columnName The quoted column name to alter the comment for. + * @param string $comment The column's comment. + * + * @return string + */ + protected function getAlterColumnCommentSQL($tableName, $columnName, $comment) + { + return $this->getUpdateExtendedPropertySQL( + 'MS_Description', + $comment, + 'SCHEMA', + 'dbo', + 'TABLE', + $tableName, + 'COLUMN', + $columnName + ); + } + + /** + * Returns the SQL statement for dropping a column comment. + * + * SQL Server does not support native column comments, + * therefore the extended properties functionality is used + * as a workaround to store them. + * The property name used to store column comments is "MS_Description" + * which provides compatibility with SQL Server Management Studio, + * as column comments are stored in the same property there when + * specifying a column's "Description" attribute. + * + * @param string $tableName The quoted table name to which the column belongs. + * @param string $columnName The quoted column name to drop the comment for. + * + * @return string + */ + protected function getDropColumnCommentSQL($tableName, $columnName) + { + return $this->getDropExtendedPropertySQL( + 'MS_Description', + 'SCHEMA', + 'dbo', + 'TABLE', + $tableName, + 'COLUMN', + $columnName + ); + } + + /** + * {@inheritdoc} + */ + protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName) + { + return array( + sprintf( + "EXEC sp_RENAME N'%s.%s', N'%s', N'INDEX'", + $tableName, + $oldIndexName, + $index->getQuotedName($this) + ) + ); + } + + /** + * Returns the SQL statement for adding an extended property to a database object. + * + * @param string $name The name of the property to add. + * @param string|null $value The value of the property to add. + * @param string|null $level0Type The type of the object at level 0 the property belongs to. + * @param string|null $level0Name The name of the object at level 0 the property belongs to. + * @param string|null $level1Type The type of the object at level 1 the property belongs to. + * @param string|null $level1Name The name of the object at level 1 the property belongs to. + * @param string|null $level2Type The type of the object at level 2 the property belongs to. + * @param string|null $level2Name The name of the object at level 2 the property belongs to. + * + * @return string + * + * @link http://msdn.microsoft.com/en-us/library/ms180047%28v=sql.90%29.aspx + */ + public function getAddExtendedPropertySQL( + $name, + $value = null, + $level0Type = null, + $level0Name = null, + $level1Type = null, + $level1Name = null, + $level2Type = null, + $level2Name = null + ) { + return "EXEC sp_addextendedproperty " . + "N" . $this->quoteStringLiteral($name) . ", N" . $this->quoteStringLiteral($value) . ", " . + "N" . $this->quoteStringLiteral($level0Type) . ", " . $level0Name . ', ' . + "N" . $this->quoteStringLiteral($level1Type) . ", " . $level1Name . ', ' . + "N" . $this->quoteStringLiteral($level2Type) . ", " . $level2Name; + } + + /** + * Returns the SQL statement for dropping an extended property from a database object. + * + * @param string $name The name of the property to drop. + * @param string|null $level0Type The type of the object at level 0 the property belongs to. + * @param string|null $level0Name The name of the object at level 0 the property belongs to. + * @param string|null $level1Type The type of the object at level 1 the property belongs to. + * @param string|null $level1Name The name of the object at level 1 the property belongs to. + * @param string|null $level2Type The type of the object at level 2 the property belongs to. + * @param string|null $level2Name The name of the object at level 2 the property belongs to. + * + * @return string + * + * @link http://technet.microsoft.com/en-gb/library/ms178595%28v=sql.90%29.aspx + */ + public function getDropExtendedPropertySQL( + $name, + $level0Type = null, + $level0Name = null, + $level1Type = null, + $level1Name = null, + $level2Type = null, + $level2Name = null + ) { + return "EXEC sp_dropextendedproperty " . + "N" . $this->quoteStringLiteral($name) . ", " . + "N" . $this->quoteStringLiteral($level0Type) . ", " . $level0Name . ', ' . + "N" . $this->quoteStringLiteral($level1Type) . ", " . $level1Name . ', ' . + "N" . $this->quoteStringLiteral($level2Type) . ", " . $level2Name; + } + + /** + * Returns the SQL statement for updating an extended property of a database object. + * + * @param string $name The name of the property to update. + * @param string|null $value The value of the property to update. + * @param string|null $level0Type The type of the object at level 0 the property belongs to. + * @param string|null $level0Name The name of the object at level 0 the property belongs to. + * @param string|null $level1Type The type of the object at level 1 the property belongs to. + * @param string|null $level1Name The name of the object at level 1 the property belongs to. + * @param string|null $level2Type The type of the object at level 2 the property belongs to. + * @param string|null $level2Name The name of the object at level 2 the property belongs to. + * + * @return string + * + * @link http://msdn.microsoft.com/en-us/library/ms186885%28v=sql.90%29.aspx + */ + public function getUpdateExtendedPropertySQL( + $name, + $value = null, + $level0Type = null, + $level0Name = null, + $level1Type = null, + $level1Name = null, + $level2Type = null, + $level2Name = null + ) { + return "EXEC sp_updateextendedproperty " . + "N" . $this->quoteStringLiteral($name) . ", N" . $this->quoteStringLiteral($value) . ", " . + "N" . $this->quoteStringLiteral($level0Type) . ", " . $level0Name . ', ' . + "N" . $this->quoteStringLiteral($level1Type) . ", " . $level1Name . ', ' . + "N" . $this->quoteStringLiteral($level2Type) . ", " . $level2Name; + } + + /** + * {@inheritDoc} + */ + public function getEmptyIdentityInsertSQL($quotedTableName, $quotedIdentifierColumnName) + { + return 'INSERT INTO ' . $quotedTableName . ' DEFAULT VALUES'; + } + + /** + * {@inheritDoc} + */ + public function getListTablesSQL() + { + // "sysdiagrams" table must be ignored as it's internal SQL Server table for Database Diagrams + // Category 2 must be ignored as it is "MS SQL Server 'pseudo-system' object[s]" for replication + return "SELECT name FROM sysobjects WHERE type = 'U' AND name != 'sysdiagrams' AND category != 2 ORDER BY name"; + } + + /** + * {@inheritDoc} + */ + public function getListTableColumnsSQL($table, $database = null) + { + return "SELECT col.name, + type.name AS type, + col.max_length AS length, + ~col.is_nullable AS notnull, + def.definition AS [default], + col.scale, + col.precision, + col.is_identity AS autoincrement, + col.collation_name AS collation, + CAST(prop.value AS NVARCHAR(MAX)) AS comment -- CAST avoids driver error for sql_variant type + FROM sys.columns AS col + JOIN sys.types AS type + ON col.user_type_id = type.user_type_id + JOIN sys.objects AS obj + ON col.object_id = obj.object_id + JOIN sys.schemas AS scm + ON obj.schema_id = scm.schema_id + LEFT JOIN sys.default_constraints def + ON col.default_object_id = def.object_id + AND col.object_id = def.parent_object_id + LEFT JOIN sys.extended_properties AS prop + ON obj.object_id = prop.major_id + AND col.column_id = prop.minor_id + AND prop.name = 'MS_Description' + WHERE obj.type = 'U' + AND " . $this->getTableWhereClause($table, 'scm.name', 'obj.name'); + } + + /** + * {@inheritDoc} + */ + public function getListTableForeignKeysSQL($table, $database = null) + { + return "SELECT f.name AS ForeignKey, + SCHEMA_NAME (f.SCHEMA_ID) AS SchemaName, + OBJECT_NAME (f.parent_object_id) AS TableName, + COL_NAME (fc.parent_object_id,fc.parent_column_id) AS ColumnName, + SCHEMA_NAME (o.SCHEMA_ID) ReferenceSchemaName, + OBJECT_NAME (f.referenced_object_id) AS ReferenceTableName, + COL_NAME(fc.referenced_object_id,fc.referenced_column_id) AS ReferenceColumnName, + f.delete_referential_action_desc, + f.update_referential_action_desc + FROM sys.foreign_keys AS f + INNER JOIN sys.foreign_key_columns AS fc + INNER JOIN sys.objects AS o ON o.OBJECT_ID = fc.referenced_object_id + ON f.OBJECT_ID = fc.constraint_object_id + WHERE " . + $this->getTableWhereClause($table, 'SCHEMA_NAME (f.schema_id)', 'OBJECT_NAME (f.parent_object_id)'); + } + + /** + * {@inheritDoc} + */ + public function getListTableIndexesSQL($table, $currentDatabase = null) + { + return "SELECT idx.name AS key_name, + col.name AS column_name, + ~idx.is_unique AS non_unique, + idx.is_primary_key AS [primary], + CASE idx.type + WHEN '1' THEN 'clustered' + WHEN '2' THEN 'nonclustered' + ELSE NULL + END AS flags + FROM sys.tables AS tbl + JOIN sys.schemas AS scm ON tbl.schema_id = scm.schema_id + JOIN sys.indexes AS idx ON tbl.object_id = idx.object_id + JOIN sys.index_columns AS idxcol ON idx.object_id = idxcol.object_id AND idx.index_id = idxcol.index_id + JOIN sys.columns AS col ON idxcol.object_id = col.object_id AND idxcol.column_id = col.column_id + WHERE " . $this->getTableWhereClause($table, 'scm.name', 'tbl.name') . " + ORDER BY idx.index_id ASC, idxcol.key_ordinal ASC"; + } + + /** + * {@inheritDoc} + */ + public function getCreateViewSQL($name, $sql) + { + return 'CREATE VIEW ' . $name . ' AS ' . $sql; + } + + /** + * {@inheritDoc} + */ + public function getListViewsSQL($database) + { + return "SELECT name FROM sysobjects WHERE type = 'V' ORDER BY name"; + } + + /** + * Returns the where clause to filter schema and table name in a query. + * + * @param string $table The full qualified name of the table. + * @param string $schemaColumn The name of the column to compare the schema to in the where clause. + * @param string $tableColumn The name of the column to compare the table to in the where clause. + * + * @return string + */ + private function getTableWhereClause($table, $schemaColumn, $tableColumn) + { + if (strpos($table, ".") !== false) { + list($schema, $table) = explode(".", $table); + $schema = $this->quoteStringLiteral($schema); + $table = $this->quoteStringLiteral($table); + } else { + $schema = "SCHEMA_NAME()"; + $table = $this->quoteStringLiteral($table); + } + + return "({$tableColumn} = {$table} AND {$schemaColumn} = {$schema})"; + } + + /** + * {@inheritDoc} + */ + public function getDropViewSQL($name) + { + return 'DROP VIEW ' . $name; + } + + /** + * {@inheritDoc} + */ + public function getGuidExpression() + { + return 'NEWID()'; + } + + /** + * {@inheritDoc} + */ + public function getLocateExpression($str, $substr, $startPos = false) + { + if ($startPos == false) { + return 'CHARINDEX(' . $substr . ', ' . $str . ')'; + } + + return 'CHARINDEX(' . $substr . ', ' . $str . ', ' . $startPos . ')'; + } + + /** + * {@inheritDoc} + */ + public function getModExpression($expression1, $expression2) + { + return $expression1 . ' % ' . $expression2; + } + + /** + * {@inheritDoc} + */ + public function getTrimExpression($str, $pos = self::TRIM_UNSPECIFIED, $char = false) + { + if ( ! $char) { + switch ($pos) { + case self::TRIM_LEADING: + $trimFn = 'LTRIM'; + break; + + case self::TRIM_TRAILING: + $trimFn = 'RTRIM'; + break; + + default: + return 'LTRIM(RTRIM(' . $str . '))'; + } + + return $trimFn . '(' . $str . ')'; + } + + /** Original query used to get those expressions + declare @c varchar(100) = 'xxxBarxxx', @trim_char char(1) = 'x'; + declare @pat varchar(10) = '%[^' + @trim_char + ']%'; + select @c as string + , @trim_char as trim_char + , stuff(@c, 1, patindex(@pat, @c) - 1, null) as trim_leading + , reverse(stuff(reverse(@c), 1, patindex(@pat, reverse(@c)) - 1, null)) as trim_trailing + , reverse(stuff(reverse(stuff(@c, 1, patindex(@pat, @c) - 1, null)), 1, patindex(@pat, reverse(stuff(@c, 1, patindex(@pat, @c) - 1, null))) - 1, null)) as trim_both; + */ + $pattern = "'%[^' + $char + ']%'"; + + if ($pos == self::TRIM_LEADING) { + return 'stuff(' . $str . ', 1, patindex(' . $pattern . ', ' . $str . ') - 1, null)'; + } + + if ($pos == self::TRIM_TRAILING) { + return 'reverse(stuff(reverse(' . $str . '), 1, patindex(' . $pattern . ', reverse(' . $str . ')) - 1, null))'; + } + + return 'reverse(stuff(reverse(stuff(' . $str . ', 1, patindex(' . $pattern . ', ' . $str . ') - 1, null)), 1, patindex(' . $pattern . ', reverse(stuff(' . $str . ', 1, patindex(' . $pattern . ', ' . $str . ') - 1, null))) - 1, null))'; + } + + /** + * {@inheritDoc} + */ + public function getConcatExpression() + { + $args = func_get_args(); + + return '(' . implode(' + ', $args) . ')'; + } + + /** + * {@inheritDoc} + */ + public function getListDatabasesSQL() + { + return 'SELECT * FROM sys.databases'; + } + + /** + * {@inheritDoc} + */ + public function getListNamespacesSQL() + { + return "SELECT name FROM sys.schemas WHERE name NOT IN('guest', 'INFORMATION_SCHEMA', 'sys')"; + } + + /** + * {@inheritDoc} + */ + public function getSubstringExpression($value, $from, $length = null) + { + if (!is_null($length)) { + return 'SUBSTRING(' . $value . ', ' . $from . ', ' . $length . ')'; + } + + return 'SUBSTRING(' . $value . ', ' . $from . ', LEN(' . $value . ') - ' . $from . ' + 1)'; + } + + /** + * {@inheritDoc} + */ + public function getLengthExpression($column) + { + return 'LEN(' . $column . ')'; + } + + /** + * {@inheritDoc} + */ + public function getSetTransactionIsolationSQL($level) + { + return 'SET TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSQL($level); + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $field) + { + return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $field) + { + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $field) + { + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + public function getGuidTypeDeclarationSQL(array $field) + { + return 'UNIQUEIDENTIFIER'; + } + + /** + * {@inheritDoc} + */ + protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) + { + return $fixed ? ($length ? 'NCHAR(' . $length . ')' : 'CHAR(255)') : ($length ? 'NVARCHAR(' . $length . ')' : 'NVARCHAR(255)'); + } + + /** + * {@inheritdoc} + */ + protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) + { + return $fixed ? 'BINARY(' . ($length ?: 255) . ')' : 'VARBINARY(' . ($length ?: 255) . ')'; + } + + /** + * {@inheritdoc} + */ + public function getBinaryMaxLength() + { + return 8000; + } + + /** + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $field) + { + return 'VARCHAR(MAX)'; + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + { + return (!empty($columnDef['autoincrement'])) ? ' IDENTITY' : ''; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATETIME'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATETIME'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATETIME'; + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $field) + { + return 'BIT'; + } + + /** + * {@inheritDoc} + */ + protected function doModifyLimitQuery($query, $limit, $offset = null) + { + if ($limit === null) { + return $query; + } + + $start = $offset + 1; + $end = $offset + $limit; + + // We'll find a SELECT or SELECT distinct and prepend TOP n to it + // Even if the TOP n is very large, the use of a CTE will + // allow the SQL Server query planner to optimize it so it doesn't + // actually scan the entire range covered by the TOP clause. + $selectPattern = '/^(\s*SELECT\s+(?:DISTINCT\s+)?)(.*)$/i'; + $replacePattern = sprintf('$1%s $2', "TOP $end"); + $query = preg_replace($selectPattern, $replacePattern, $query); + + if (stristr($query, "ORDER BY")) { + // Inner order by is not valid in SQL Server for our purposes + // unless it's in a TOP N subquery. + $query = $this->scrubInnerOrderBy($query); + } + + // Build a new limited query around the original, using a CTE + return sprintf( + "WITH dctrn_cte AS (%s) " + . "SELECT * FROM (" + . "SELECT *, ROW_NUMBER() OVER (ORDER BY (SELECT 0)) AS doctrine_rownum FROM dctrn_cte" + . ") AS doctrine_tbl " + . "WHERE doctrine_rownum BETWEEN %d AND %d ORDER BY doctrine_rownum ASC", + $query, + $start, + $end + ); + } + + /** + * Remove ORDER BY clauses in subqueries - they're not supported by SQL Server. + * Caveat: will leave ORDER BY in TOP N subqueries. + * + * @param $query + * @return string + */ + private function scrubInnerOrderBy($query) + { + $count = substr_count(strtoupper($query), 'ORDER BY'); + $offset = 0; + + while ($count-- > 0) { + $orderByPos = stripos($query, ' ORDER BY', $offset); + if ($orderByPos === false) { + break; + } + + $qLen = strlen($query); + $parenCount = 0; + $currentPosition = $orderByPos; + + while ($parenCount >= 0 && $currentPosition < $qLen) { + if ($query[$currentPosition] === '(') { + $parenCount++; + } elseif ($query[$currentPosition] === ')') { + $parenCount--; + } + + $currentPosition++; + } + + if ($this->isOrderByInTopNSubquery($query, $orderByPos)) { + // If the order by clause is in a TOP N subquery, do not remove + // it and continue iteration from the current position. + $offset = $currentPosition; + continue; + } + + if ($currentPosition < $qLen - 1) { + $query = substr($query, 0, $orderByPos) . substr($query, $currentPosition - 1); + $offset = $orderByPos; + } + } + return $query; + } + + /** + * Check an ORDER BY clause to see if it is in a TOP N query or subquery. + * + * @param string $query The query + * @param int $currentPosition Start position of ORDER BY clause + * @return bool true if ORDER BY is in a TOP N query, false otherwise + */ + private function isOrderByInTopNSubquery($query, $currentPosition) + { + // Grab query text on the same nesting level as the ORDER BY clause we're examining. + $subQueryBuffer = ''; + $parenCount = 0; + + // If $parenCount goes negative, we've exited the subquery we're examining. + // If $currentPosition goes negative, we've reached the beginning of the query. + while ($parenCount >= 0 && $currentPosition >= 0) { + if ($query[$currentPosition] === '(') { + $parenCount--; + } elseif ($query[$currentPosition] === ')') { + $parenCount++; + } + + // Only yank query text on the same nesting level as the ORDER BY clause. + $subQueryBuffer = ($parenCount === 0 ? $query[$currentPosition] : ' ') . $subQueryBuffer; + + $currentPosition--; + } + + if (preg_match('/SELECT\s+(DISTINCT\s+)?TOP\s/i', $subQueryBuffer)) { + return true; + } + + return false; + } + + /** + * {@inheritDoc} + */ + public function supportsLimitOffset() + { + return false; + } + + /** + * {@inheritDoc} + */ + public function convertBooleans($item) + { + if (is_array($item)) { + foreach ($item as $key => $value) { + if (is_bool($value) || is_numeric($item)) { + $item[$key] = ($value) ? 1 : 0; + } + } + } elseif (is_bool($item) || is_numeric($item)) { + $item = ($item) ? 1 : 0; + } + + return $item; + } + + /** + * {@inheritDoc} + */ + public function getCreateTemporaryTableSnippetSQL() + { + return "CREATE TABLE"; + } + + /** + * {@inheritDoc} + */ + public function getTemporaryTableName($tableName) + { + return '#' . $tableName; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeFormatString() + { + return 'Y-m-d H:i:s.000'; + } + + /** + * {@inheritDoc} + */ + public function getDateFormatString() + { + return 'Y-m-d H:i:s.000'; + } + + /** + * {@inheritDoc} + */ + public function getTimeFormatString() + { + return 'Y-m-d H:i:s.000'; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTzFormatString() + { + return $this->getDateTimeFormatString(); + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'mssql'; + } + + /** + * {@inheritDoc} + */ + protected function initializeDoctrineTypeMappings() + { + $this->doctrineTypeMapping = array( + 'bigint' => 'bigint', + 'numeric' => 'decimal', + 'bit' => 'boolean', + 'smallint' => 'smallint', + 'decimal' => 'decimal', + 'smallmoney' => 'integer', + 'int' => 'integer', + 'tinyint' => 'smallint', + 'money' => 'integer', + 'float' => 'float', + 'real' => 'float', + 'double' => 'float', + 'double precision' => 'float', + 'smalldatetime' => 'datetime', + 'datetime' => 'datetime', + 'char' => 'string', + 'varchar' => 'string', + 'text' => 'text', + 'nchar' => 'string', + 'nvarchar' => 'string', + 'ntext' => 'text', + 'binary' => 'binary', + 'varbinary' => 'binary', + 'image' => 'blob', + 'uniqueidentifier' => 'guid', + ); + } + + /** + * {@inheritDoc} + */ + public function createSavePoint($savepoint) + { + return 'SAVE TRANSACTION ' . $savepoint; + } + + /** + * {@inheritDoc} + */ + public function releaseSavePoint($savepoint) + { + return ''; + } + + /** + * {@inheritDoc} + */ + public function rollbackSavePoint($savepoint) + { + return 'ROLLBACK TRANSACTION ' . $savepoint; + } + + /** + * {@inheritdoc} + */ + public function getForeignKeyReferentialActionSQL($action) + { + // RESTRICT is not supported, therefore falling back to NO ACTION. + if (strtoupper($action) === 'RESTRICT') { + return 'NO ACTION'; + } + + return parent::getForeignKeyReferentialActionSQL($action); + } + + /** + * {@inheritDoc} + */ + public function appendLockHint($fromClause, $lockMode) + { + switch (true) { + case LockMode::NONE === $lockMode: + return $fromClause . ' WITH (NOLOCK)'; + + case LockMode::PESSIMISTIC_READ === $lockMode: + return $fromClause . ' WITH (HOLDLOCK, ROWLOCK)'; + + case LockMode::PESSIMISTIC_WRITE === $lockMode: + return $fromClause . ' WITH (UPDLOCK, ROWLOCK)'; + + default: + return $fromClause; + } + } + + /** + * {@inheritDoc} + */ + public function getForUpdateSQL() + { + return ' '; + } + + /** + * {@inheritDoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\SQLServerKeywords'; + } + + /** + * {@inheritDoc} + */ + public function quoteSingleIdentifier($str) + { + return "[" . str_replace("]", "][", $str) . "]"; + } + + /** + * {@inheritDoc} + */ + public function getTruncateTableSQL($tableName, $cascade = false) + { + $tableIdentifier = new Identifier($tableName); + + return 'TRUNCATE TABLE ' . $tableIdentifier->getQuotedName($this); + } + + /** + * {@inheritDoc} + */ + public function getBlobTypeDeclarationSQL(array $field) + { + return 'VARBINARY(MAX)'; + } + + /** + * {@inheritDoc} + */ + public function getDefaultValueDeclarationSQL($field) + { + if ( ! isset($field['default'])) { + return empty($field['notnull']) ? ' NULL' : ''; + } + + if ( ! isset($field['type'])) { + return " DEFAULT '" . $field['default'] . "'"; + } + + if (in_array((string) $field['type'], array('Integer', 'BigInt', 'SmallInt'))) { + return " DEFAULT " . $field['default']; + } + + if (in_array((string) $field['type'], array('DateTime', 'DateTimeTz')) && $field['default'] == $this->getCurrentTimestampSQL()) { + return " DEFAULT " . $this->getCurrentTimestampSQL(); + } + + if ((string) $field['type'] == 'Boolean') { + return " DEFAULT '" . $this->convertBooleans($field['default']) . "'"; + } + + return " DEFAULT '" . $field['default'] . "'"; + } + + /** + * {@inheritdoc} + * + * Modifies column declaration order as it differs in Microsoft SQL Server. + */ + public function getColumnDeclarationSQL($name, array $field) + { + if (isset($field['columnDefinition'])) { + $columnDef = $this->getCustomTypeDeclarationSQL($field); + } else { + $collation = (isset($field['collation']) && $field['collation']) ? + ' ' . $this->getColumnCollationDeclarationSQL($field['collation']) : ''; + + $notnull = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : ''; + + $unique = (isset($field['unique']) && $field['unique']) ? + ' ' . $this->getUniqueFieldDeclarationSQL() : ''; + + $check = (isset($field['check']) && $field['check']) ? + ' ' . $field['check'] : ''; + + $typeDecl = $field['type']->getSqlDeclaration($field, $this); + $columnDef = $typeDecl . $collation . $notnull . $unique . $check; + } + + return $name . ' ' . $columnDef; + } + + /** + * Returns a unique default constraint name for a table and column. + * + * @param string $table Name of the table to generate the unique default constraint name for. + * @param string $column Name of the column in the table to generate the unique default constraint name for. + * + * @return string + */ + private function generateDefaultConstraintName($table, $column) + { + return 'DF_' . $this->generateIdentifierName($table) . '_' . $this->generateIdentifierName($column); + } + + /** + * Returns a hash value for a given identifier. + * + * @param string $identifier Identifier to generate a hash value for. + * + * @return string + */ + private function generateIdentifierName($identifier) + { + // Always generate name for unquoted identifiers to ensure consistency. + $identifier = new Identifier($identifier); + + return strtoupper(dechex(crc32($identifier->getName()))); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php new file mode 100644 index 0000000000000000000000000000000000000000..4711d99de650fc1ead5651c4ab75d3ff0f1f44aa --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php @@ -0,0 +1,1118 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\TableDiff; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\Identifier; +use Doctrine\DBAL\Schema\Constraint; + +/** + * The SqlitePlatform class describes the specifics and dialects of the SQLite + * database platform. + * + * @since 2.0 + * @author Roman Borschel + * @author Benjamin Eberlei + * @author Martin Hasoň + * @todo Rename: SQLitePlatform + */ +class SqlitePlatform extends AbstractPlatform +{ + /** + * {@inheritDoc} + */ + public function getRegexpExpression() + { + return 'REGEXP'; + } + + /** + * {@inheritDoc} + */ + public function getGuidExpression() + { + return "HEX(RANDOMBLOB(4)) || '-' || HEX(RANDOMBLOB(2)) || '-4' || " + . "SUBSTR(HEX(RANDOMBLOB(2)), 2) || '-' || " + . "SUBSTR('89AB', 1 + (ABS(RANDOM()) % 4), 1) || " + . "SUBSTR(HEX(RANDOMBLOB(2)), 2) || '-' || HEX(RANDOMBLOB(6))"; + } + + /** + * {@inheritDoc} + */ + public function getNowExpression($type = 'timestamp') + { + switch ($type) { + case 'time': + return 'time(\'now\')'; + case 'date': + return 'date(\'now\')'; + case 'timestamp': + default: + return 'datetime(\'now\')'; + } + } + + /** + * {@inheritDoc} + */ + public function getTrimExpression($str, $pos = self::TRIM_UNSPECIFIED, $char = false) + { + $trimChar = ($char != false) ? (', ' . $char) : ''; + + switch ($pos) { + case self::TRIM_LEADING: + $trimFn = 'LTRIM'; + break; + + case self::TRIM_TRAILING: + $trimFn = 'RTRIM'; + break; + + default: + $trimFn = 'TRIM'; + } + + return $trimFn . '(' . $str . $trimChar . ')'; + } + + /** + * {@inheritDoc} + * + * SQLite only supports the 2 parameter variant of this function + */ + public function getSubstringExpression($value, $position, $length = null) + { + if ($length !== null) { + return 'SUBSTR(' . $value . ', ' . $position . ', ' . $length . ')'; + } + + return 'SUBSTR(' . $value . ', ' . $position . ', LENGTH(' . $value . '))'; + } + + /** + * {@inheritDoc} + */ + public function getLocateExpression($str, $substr, $startPos = false) + { + if ($startPos == false) { + return 'LOCATE('.$str.', '.$substr.')'; + } + + return 'LOCATE('.$str.', '.$substr.', '.$startPos.')'; + } + + /** + * {@inheritdoc} + */ + protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) + { + switch ($unit) { + case self::DATE_INTERVAL_UNIT_SECOND: + case self::DATE_INTERVAL_UNIT_MINUTE: + case self::DATE_INTERVAL_UNIT_HOUR: + return "DATETIME(" . $date . ",'" . $operator . $interval . " " . $unit . "')"; + + default: + switch ($unit) { + case self::DATE_INTERVAL_UNIT_WEEK: + $interval *= 7; + $unit = self::DATE_INTERVAL_UNIT_DAY; + break; + + case self::DATE_INTERVAL_UNIT_QUARTER: + $interval *= 3; + $unit = self::DATE_INTERVAL_UNIT_MONTH; + break; + } + + return "DATE(" . $date . ",'" . $operator . $interval . " " . $unit . "')"; + } + } + + /** + * {@inheritDoc} + */ + public function getDateDiffExpression($date1, $date2) + { + return 'ROUND(JULIANDAY('.$date1 . ')-JULIANDAY('.$date2.'))'; + } + + /** + * {@inheritDoc} + */ + protected function _getTransactionIsolationLevelSQL($level) + { + switch ($level) { + case \Doctrine\DBAL\Connection::TRANSACTION_READ_UNCOMMITTED: + return 0; + case \Doctrine\DBAL\Connection::TRANSACTION_READ_COMMITTED: + case \Doctrine\DBAL\Connection::TRANSACTION_REPEATABLE_READ: + case \Doctrine\DBAL\Connection::TRANSACTION_SERIALIZABLE: + return 1; + default: + return parent::_getTransactionIsolationLevelSQL($level); + } + } + + /** + * {@inheritDoc} + */ + public function getSetTransactionIsolationSQL($level) + { + return 'PRAGMA read_uncommitted = ' . $this->_getTransactionIsolationLevelSQL($level); + } + + /** + * {@inheritDoc} + */ + public function prefersIdentityColumns() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function getBooleanTypeDeclarationSQL(array $field) + { + return 'BOOLEAN'; + } + + /** + * {@inheritDoc} + */ + public function getIntegerTypeDeclarationSQL(array $field) + { + return 'INTEGER' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + public function getBigIntTypeDeclarationSQL(array $field) + { + // SQLite autoincrement is implicit for INTEGER PKs, but not for BIGINT fields. + if ( ! empty($field['autoincrement'])) { + return $this->getIntegerTypeDeclarationSQL($field); + } + + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + public function getTinyIntTypeDeclarationSql(array $field) + { + // SQLite autoincrement is implicit for INTEGER PKs, but not for TINYINT fields. + if ( ! empty($field['autoincrement'])) { + return $this->getIntegerTypeDeclarationSQL($field); + } + + return 'TINYINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + public function getSmallIntTypeDeclarationSQL(array $field) + { + // SQLite autoincrement is implicit for INTEGER PKs, but not for SMALLINT fields. + if ( ! empty($field['autoincrement'])) { + return $this->getIntegerTypeDeclarationSQL($field); + } + + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + public function getMediumIntTypeDeclarationSql(array $field) + { + // SQLite autoincrement is implicit for INTEGER PKs, but not for MEDIUMINT fields. + if ( ! empty($field['autoincrement'])) { + return $this->getIntegerTypeDeclarationSQL($field); + } + + return 'MEDIUMINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + } + + /** + * {@inheritDoc} + */ + public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATETIME'; + } + + /** + * {@inheritDoc} + */ + public function getDateTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATE'; + } + + /** + * {@inheritDoc} + */ + public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIME'; + } + + /** + * {@inheritDoc} + */ + protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + { + // sqlite autoincrement is implicit for integer PKs, but not when the field is unsigned + if ( ! empty($columnDef['autoincrement'])) { + return ''; + } + + return ! empty($columnDef['unsigned']) ? ' UNSIGNED' : ''; + } + + /** + * {@inheritDoc} + */ + public function getForeignKeyDeclarationSQL(ForeignKeyConstraint $foreignKey) + { + return parent::getForeignKeyDeclarationSQL(new ForeignKeyConstraint( + $foreignKey->getQuotedLocalColumns($this), + str_replace('.', '__', $foreignKey->getQuotedForeignTableName($this)), + $foreignKey->getQuotedForeignColumns($this), + $foreignKey->getName(), + $foreignKey->getOptions() + )); + } + + /** + * {@inheritDoc} + */ + protected function _getCreateTableSQL($name, array $columns, array $options = array()) + { + $name = str_replace('.', '__', $name); + $queryFields = $this->getColumnDeclarationListSQL($columns); + + if (isset($options['uniqueConstraints']) && ! empty($options['uniqueConstraints'])) { + foreach ($options['uniqueConstraints'] as $name => $definition) { + $queryFields .= ', ' . $this->getUniqueConstraintDeclarationSQL($name, $definition); + } + } + + if (isset($options['primary']) && ! empty($options['primary'])) { + $keyColumns = array_unique(array_values($options['primary'])); + $queryFields.= ', PRIMARY KEY('.implode(', ', $keyColumns).')'; + } + + if (isset($options['foreignKeys'])) { + foreach ($options['foreignKeys'] as $foreignKey) { + $queryFields.= ', '.$this->getForeignKeyDeclarationSQL($foreignKey); + } + } + + $query[] = 'CREATE TABLE ' . $name . ' (' . $queryFields . ')'; + + if (isset($options['alter']) && true === $options['alter']) { + return $query; + } + + if (isset($options['indexes']) && ! empty($options['indexes'])) { + foreach ($options['indexes'] as $indexDef) { + $query[] = $this->getCreateIndexSQL($indexDef, $name); + } + } + + if (isset($options['unique']) && ! empty($options['unique'])) { + foreach ($options['unique'] as $indexDef) { + $query[] = $this->getCreateIndexSQL($indexDef, $name); + } + } + + return $query; + } + + /** + * {@inheritDoc} + */ + protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) + { + return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(255)') + : ($length ? 'VARCHAR(' . $length . ')' : 'TEXT'); + } + + /** + * {@inheritdoc} + */ + protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) + { + return 'BLOB'; + } + + /** + * {@inheritdoc} + */ + public function getBinaryMaxLength() + { + return 0; + } + + /** + * {@inheritdoc} + */ + public function getBinaryDefaultLength() + { + return 0; + } + + /** + * {@inheritDoc} + */ + public function getClobTypeDeclarationSQL(array $field) + { + return 'CLOB'; + } + + /** + * {@inheritDoc} + */ + public function getListTableConstraintsSQL($table) + { + $table = str_replace('.', '__', $table); + $table = $this->quoteStringLiteral($table); + + return "SELECT sql FROM sqlite_master WHERE type='index' AND tbl_name = $table AND sql NOT NULL ORDER BY name"; + } + + /** + * {@inheritDoc} + */ + public function getListTableColumnsSQL($table, $currentDatabase = null) + { + $table = str_replace('.', '__', $table); + $table = $this->quoteStringLiteral($table); + + return "PRAGMA table_info($table)"; + } + + /** + * {@inheritDoc} + */ + public function getListTableIndexesSQL($table, $currentDatabase = null) + { + $table = str_replace('.', '__', $table); + $table = $this->quoteStringLiteral($table); + + return "PRAGMA index_list($table)"; + } + + /** + * {@inheritDoc} + */ + public function getListTablesSQL() + { + return "SELECT name FROM sqlite_master WHERE type = 'table' AND name != 'sqlite_sequence' AND name != 'geometry_columns' AND name != 'spatial_ref_sys' " + . "UNION ALL SELECT name FROM sqlite_temp_master " + . "WHERE type = 'table' ORDER BY name"; + } + + /** + * {@inheritDoc} + */ + public function getListViewsSQL($database) + { + return "SELECT name, sql FROM sqlite_master WHERE type='view' AND sql NOT NULL"; + } + + /** + * {@inheritDoc} + */ + public function getCreateViewSQL($name, $sql) + { + return 'CREATE VIEW ' . $name . ' AS ' . $sql; + } + + /** + * {@inheritDoc} + */ + public function getDropViewSQL($name) + { + return 'DROP VIEW '. $name; + } + + /** + * {@inheritDoc} + */ + public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey) + { + $query = parent::getAdvancedForeignKeyOptionsSQL($foreignKey); + + $query .= (($foreignKey->hasOption('deferrable') && $foreignKey->getOption('deferrable') !== false) ? ' ' : ' NOT ') . 'DEFERRABLE'; + $query .= ' INITIALLY ' . (($foreignKey->hasOption('deferred') && $foreignKey->getOption('deferred') !== false) ? 'DEFERRED' : 'IMMEDIATE'); + + return $query; + } + + /** + * {@inheritDoc} + */ + public function supportsIdentityColumns() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function supportsColumnCollation() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'sqlite'; + } + + /** + * {@inheritDoc} + */ + public function getTruncateTableSQL($tableName, $cascade = false) + { + $tableIdentifier = new Identifier($tableName); + $tableName = str_replace('.', '__', $tableIdentifier->getQuotedName($this)); + + return 'DELETE FROM ' . $tableName; + } + + /** + * User-defined function for Sqlite that is used with PDO::sqliteCreateFunction(). + * + * @param integer|float $value + * + * @return float + */ + static public function udfSqrt($value) + { + return sqrt($value); + } + + /** + * User-defined function for Sqlite that implements MOD(a, b). + * + * @param integer $a + * @param integer $b + * + * @return integer + */ + static public function udfMod($a, $b) + { + return ($a % $b); + } + + /** + * @param string $str + * @param string $substr + * @param integer $offset + * + * @return integer + */ + static public function udfLocate($str, $substr, $offset = 0) + { + // SQL's LOCATE function works on 1-based positions, while PHP's strpos works on 0-based positions. + // So we have to make them compatible if an offset is given. + if ($offset > 0) { + $offset -= 1; + } + + $pos = strpos($str, $substr, $offset); + + if ($pos !== false) { + return $pos + 1; + } + + return 0; + } + + /** + * {@inheritDoc} + */ + public function getForUpdateSql() + { + return ''; + } + + /** + * {@inheritDoc} + */ + protected function initializeDoctrineTypeMappings() + { + $this->doctrineTypeMapping = array( + 'boolean' => 'boolean', + 'tinyint' => 'boolean', + 'smallint' => 'smallint', + 'mediumint' => 'integer', + 'int' => 'integer', + 'integer' => 'integer', + 'serial' => 'integer', + 'bigint' => 'bigint', + 'bigserial' => 'bigint', + 'clob' => 'text', + 'tinytext' => 'text', + 'mediumtext' => 'text', + 'longtext' => 'text', + 'text' => 'text', + 'varchar' => 'string', + 'longvarchar' => 'string', + 'varchar2' => 'string', + 'nvarchar' => 'string', + 'image' => 'string', + 'ntext' => 'string', + 'char' => 'string', + 'date' => 'date', + 'datetime' => 'datetime', + 'timestamp' => 'datetime', + 'time' => 'time', + 'float' => 'float', + 'double' => 'float', + 'double precision' => 'float', + 'real' => 'float', + 'decimal' => 'decimal', + 'numeric' => 'decimal', + 'blob' => 'blob', + ); + } + + /** + * {@inheritDoc} + */ + protected function getReservedKeywordsClass() + { + return 'Doctrine\DBAL\Platforms\Keywords\SQLiteKeywords'; + } + + /** + * {@inheritDoc} + */ + protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff) + { + if ( ! $diff->fromTable instanceof Table) { + throw new DBALException('Sqlite platform requires for alter table the table diff with reference to original table schema'); + } + + $sql = array(); + foreach ($diff->fromTable->getIndexes() as $index) { + if ( ! $index->isPrimary()) { + $sql[] = $this->getDropIndexSQL($index, $diff->name); + } + } + + return $sql; + } + + /** + * {@inheritDoc} + */ + protected function getPostAlterTableIndexForeignKeySQL(TableDiff $diff) + { + if ( ! $diff->fromTable instanceof Table) { + throw new DBALException('Sqlite platform requires for alter table the table diff with reference to original table schema'); + } + + $sql = array(); + $tableName = $diff->newName ? $diff->getNewName(): $diff->getName($this); + foreach ($this->getIndexesInAlteredTable($diff) as $index) { + if ($index->isPrimary()) { + continue; + } + + $sql[] = $this->getCreateIndexSQL($index, $tableName->getQuotedName($this)); + } + + return $sql; + } + + /** + * {@inheritDoc} + */ + protected function doModifyLimitQuery($query, $limit, $offset) + { + if (null === $limit && null !== $offset) { + return $query . ' LIMIT -1 OFFSET ' . $offset; + } + + return parent::doModifyLimitQuery($query, $limit, $offset); + } + + /** + * {@inheritDoc} + */ + public function getBlobTypeDeclarationSQL(array $field) + { + return 'BLOB'; + } + + /** + * {@inheritDoc} + */ + public function getTemporaryTableName($tableName) + { + $tableName = str_replace('.', '__', $tableName); + + return $tableName; + } + + /** + * {@inheritDoc} + * + * Sqlite Platform emulates schema by underscoring each dot and generating tables + * into the default database. + * + * This hack is implemented to be able to use SQLite as testdriver when + * using schema supporting databases. + */ + public function canEmulateSchemas() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function supportsForeignKeyConstraints() + { + return false; + } + + /** + * {@inheritDoc} + */ + public function getCreatePrimaryKeySQL(Index $index, $table) + { + throw new DBALException('Sqlite platform does not support alter primary key.'); + } + + /** + * {@inheritdoc} + */ + public function getCreateForeignKeySQL(ForeignKeyConstraint $foreignKey, $table) + { + throw new DBALException('Sqlite platform does not support alter foreign key.'); + } + + /** + * {@inheritdoc} + */ + public function getDropForeignKeySQL($foreignKey, $table) + { + throw new DBALException('Sqlite platform does not support alter foreign key.'); + } + + /** + * {@inheritDoc} + */ + public function getCreateConstraintSQL(Constraint $constraint, $table) + { + throw new DBALException('Sqlite platform does not support alter constraint.'); + } + + /** + * {@inheritDoc} + */ + public function getCreateTableSQL(Table $table, $createFlags = null) + { + $createFlags = null === $createFlags ? self::CREATE_INDEXES | self::CREATE_FOREIGNKEYS : $createFlags; + + return parent::getCreateTableSQL($table, $createFlags); + } + + /** + * {@inheritDoc} + */ + public function getListTableForeignKeysSQL($table, $database = null) + { + $table = str_replace('.', '__', $table); + $table = $this->quoteStringLiteral($table); + + return "PRAGMA foreign_key_list($table)"; + } + + /** + * {@inheritDoc} + */ + public function getAlterTableSQL(TableDiff $diff) + { + $sql = $this->getSimpleAlterTableSQL($diff); + if (false !== $sql) { + return $sql; + } + + $fromTable = $diff->fromTable; + if ( ! $fromTable instanceof Table) { + throw new DBALException('Sqlite platform requires for alter table the table diff with reference to original table schema'); + } + + $table = clone $fromTable; + + $columns = array(); + $oldColumnNames = array(); + $newColumnNames = array(); + $columnSql = array(); + + foreach ($table->getColumns() as $columnName => $column) { + $columnName = strtolower($columnName); + $columns[$columnName] = $column; + $oldColumnNames[$columnName] = $newColumnNames[$columnName] = $column->getQuotedName($this); + } + + foreach ($diff->removedColumns as $columnName => $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + + $columnName = strtolower($columnName); + if (isset($columns[$columnName])) { + unset($columns[$columnName]); + unset($oldColumnNames[$columnName]); + unset($newColumnNames[$columnName]); + } + } + + foreach ($diff->renamedColumns as $oldColumnName => $column) { + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + + $oldColumnName = strtolower($oldColumnName); + if (isset($columns[$oldColumnName])) { + unset($columns[$oldColumnName]); + } + + $columns[strtolower($column->getName())] = $column; + + if (isset($newColumnNames[$oldColumnName])) { + $newColumnNames[$oldColumnName] = $column->getQuotedName($this); + } + } + + foreach ($diff->changedColumns as $oldColumnName => $columnDiff) { + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + + if (isset($columns[$oldColumnName])) { + unset($columns[$oldColumnName]); + } + + $columns[strtolower($columnDiff->column->getName())] = $columnDiff->column; + + if (isset($newColumnNames[$oldColumnName])) { + $newColumnNames[$oldColumnName] = $columnDiff->column->getQuotedName($this); + } + } + + foreach ($diff->addedColumns as $columnName => $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + + $columns[strtolower($columnName)] = $column; + } + + $sql = array(); + $tableSql = array(); + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { + $dataTable = new Table('__temp__'.$table->getName()); + + $newTable = new Table($table->getQuotedName($this), $columns, $this->getPrimaryIndexInAlteredTable($diff), $this->getForeignKeysInAlteredTable($diff), 0, $table->getOptions()); + $newTable->addOption('alter', true); + + $sql = $this->getPreAlterTableIndexForeignKeySQL($diff); + //$sql = array_merge($sql, $this->getCreateTableSQL($dataTable, 0)); + $sql[] = sprintf('CREATE TEMPORARY TABLE %s AS SELECT %s FROM %s', $dataTable->getQuotedName($this), implode(', ', $oldColumnNames), $table->getQuotedName($this)); + $sql[] = $this->getDropTableSQL($fromTable); + + $sql = array_merge($sql, $this->getCreateTableSQL($newTable)); + $sql[] = sprintf('INSERT INTO %s (%s) SELECT %s FROM %s', $newTable->getQuotedName($this), implode(', ', $newColumnNames), implode(', ', $oldColumnNames), $dataTable->getQuotedName($this)); + $sql[] = $this->getDropTableSQL($dataTable); + + if ($diff->newName && $diff->newName != $diff->name) { + $renamedTable = $diff->getNewName(); + $sql[] = 'ALTER TABLE '.$newTable->getQuotedName($this).' RENAME TO '.$renamedTable->getQuotedName($this); + } + + $sql = array_merge($sql, $this->getPostAlterTableIndexForeignKeySQL($diff)); + } + + return array_merge($sql, $tableSql, $columnSql); + } + + /** + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * + * @return array|bool + */ + private function getSimpleAlterTableSQL(TableDiff $diff) + { + // Suppress changes on integer type autoincrement columns. + foreach ($diff->changedColumns as $oldColumnName => $columnDiff) { + if ( ! $columnDiff->fromColumn instanceof Column || + ! $columnDiff->column instanceof Column || + ! $columnDiff->column->getAutoincrement() || + ! (string) $columnDiff->column->getType() === 'Integer' + ) { + continue; + } + + if ( ! $columnDiff->hasChanged('type') && $columnDiff->hasChanged('unsigned')) { + unset($diff->changedColumns[$oldColumnName]); + + continue; + } + + $fromColumnType = (string) $columnDiff->fromColumn->getType(); + + if ($fromColumnType === 'SmallInt' || $fromColumnType === 'BigInt') { + unset($diff->changedColumns[$oldColumnName]); + } + } + + if ( ! empty($diff->renamedColumns) || ! empty($diff->addedForeignKeys) || ! empty($diff->addedIndexes) + || ! empty($diff->changedColumns) || ! empty($diff->changedForeignKeys) || ! empty($diff->changedIndexes) + || ! empty($diff->removedColumns) || ! empty($diff->removedForeignKeys) || ! empty($diff->removedIndexes) + || ! empty($diff->renamedIndexes) + ) { + return false; + } + + $table = new Table($diff->name); + + $sql = array(); + $tableSql = array(); + $columnSql = array(); + + foreach ($diff->addedColumns as $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + + $field = array_merge(array('unique' => null, 'autoincrement' => null, 'default' => null), $column->toArray()); + $type = (string) $field['type']; + switch (true) { + case isset($field['columnDefinition']) || $field['autoincrement'] || $field['unique']: + case $type == 'DateTime' && $field['default'] == $this->getCurrentTimestampSQL(): + case $type == 'Date' && $field['default'] == $this->getCurrentDateSQL(): + case $type == 'Time' && $field['default'] == $this->getCurrentTimeSQL(): + return false; + } + + $field['name'] = $column->getQuotedName($this); + if (strtolower($field['type']) == 'string' && $field['length'] === null) { + $field['length'] = 255; + } + + $sql[] = 'ALTER TABLE '.$table->getQuotedName($this).' ADD COLUMN '.$this->getColumnDeclarationSQL($field['name'], $field); + } + + if ( ! $this->onSchemaAlterTable($diff, $tableSql)) { + if ($diff->newName !== false) { + $newTable = new Identifier($diff->newName); + $sql[] = 'ALTER TABLE '.$table->getQuotedName($this).' RENAME TO '.$newTable->getQuotedName($this); + } + } + + return array_merge($sql, $tableSql, $columnSql); + } + + /** + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * + * @return array + */ + private function getColumnNamesInAlteredTable(TableDiff $diff) + { + $columns = array(); + + foreach ($diff->fromTable->getColumns() as $columnName => $column) { + $columns[strtolower($columnName)] = $column->getName(); + } + + foreach ($diff->removedColumns as $columnName => $column) { + $columnName = strtolower($columnName); + if (isset($columns[$columnName])) { + unset($columns[$columnName]); + } + } + + foreach ($diff->renamedColumns as $oldColumnName => $column) { + $columnName = $column->getName(); + $columns[strtolower($oldColumnName)] = $columnName; + $columns[strtolower($columnName)] = $columnName; + } + + foreach ($diff->changedColumns as $oldColumnName => $columnDiff) { + $columnName = $columnDiff->column->getName(); + $columns[strtolower($oldColumnName)] = $columnName; + $columns[strtolower($columnName)] = $columnName; + } + + foreach ($diff->addedColumns as $columnName => $column) { + $columns[strtolower($columnName)] = $columnName; + } + + return $columns; + } + + /** + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * + * @return \Doctrine\DBAL\Schema\Index[] + */ + private function getIndexesInAlteredTable(TableDiff $diff) + { + $indexes = $diff->fromTable->getIndexes(); + $columnNames = $this->getColumnNamesInAlteredTable($diff); + + foreach ($indexes as $key => $index) { + foreach ($diff->renamedIndexes as $oldIndexName => $renamedIndex) { + if (strtolower($key) === strtolower($oldIndexName)) { + unset($indexes[$key]); + } + } + + $changed = false; + $indexColumns = array(); + foreach ($index->getColumns() as $columnName) { + $normalizedColumnName = strtolower($columnName); + if ( ! isset($columnNames[$normalizedColumnName])) { + unset($indexes[$key]); + continue 2; + } else { + $indexColumns[] = $columnNames[$normalizedColumnName]; + if ($columnName !== $columnNames[$normalizedColumnName]) { + $changed = true; + } + } + } + + if ($changed) { + $indexes[$key] = new Index($index->getName(), $indexColumns, $index->isUnique(), $index->isPrimary(), $index->getFlags()); + } + } + + foreach ($diff->removedIndexes as $index) { + $indexName = strtolower($index->getName()); + if (strlen($indexName) && isset($indexes[$indexName])) { + unset($indexes[$indexName]); + } + } + + foreach (array_merge($diff->changedIndexes, $diff->addedIndexes, $diff->renamedIndexes) as $index) { + $indexName = strtolower($index->getName()); + if (strlen($indexName)) { + $indexes[$indexName] = $index; + } else { + $indexes[] = $index; + } + } + + return $indexes; + } + + /** + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * + * @return array + */ + private function getForeignKeysInAlteredTable(TableDiff $diff) + { + $foreignKeys = $diff->fromTable->getForeignKeys(); + $columnNames = $this->getColumnNamesInAlteredTable($diff); + + foreach ($foreignKeys as $key => $constraint) { + $changed = false; + $localColumns = array(); + foreach ($constraint->getLocalColumns() as $columnName) { + $normalizedColumnName = strtolower($columnName); + if ( ! isset($columnNames[$normalizedColumnName])) { + unset($foreignKeys[$key]); + continue 2; + } else { + $localColumns[] = $columnNames[$normalizedColumnName]; + if ($columnName !== $columnNames[$normalizedColumnName]) { + $changed = true; + } + } + } + + if ($changed) { + $foreignKeys[$key] = new ForeignKeyConstraint($localColumns, $constraint->getForeignTableName(), $constraint->getForeignColumns(), $constraint->getName(), $constraint->getOptions()); + } + } + + foreach ($diff->removedForeignKeys as $constraint) { + $constraintName = strtolower($constraint->getName()); + if (strlen($constraintName) && isset($foreignKeys[$constraintName])) { + unset($foreignKeys[$constraintName]); + } + } + + foreach (array_merge($diff->changedForeignKeys, $diff->addedForeignKeys) as $constraint) { + $constraintName = strtolower($constraint->getName()); + if (strlen($constraintName)) { + $foreignKeys[$constraintName] = $constraint; + } else { + $foreignKeys[] = $constraint; + } + } + + return $foreignKeys; + } + + /** + * @param \Doctrine\DBAL\Schema\TableDiff $diff + * + * @return array + */ + private function getPrimaryIndexInAlteredTable(TableDiff $diff) + { + $primaryIndex = array(); + + foreach ($this->getIndexesInAlteredTable($diff) as $index) { + if ($index->isPrimary()) { + $primaryIndex = array($index->getName() => $index); + } + } + + return $primaryIndex; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Portability/Connection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Portability/Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..df6b957a8ddbf7a6f547902ee928268567ab1ccf --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Portability/Connection.php @@ -0,0 +1,150 @@ +. + */ + +namespace Doctrine\DBAL\Portability; + +use Doctrine\DBAL\Cache\QueryCacheProfile; + +/** + * Portability wrapper for a Connection. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class Connection extends \Doctrine\DBAL\Connection +{ + const PORTABILITY_ALL = 255; + const PORTABILITY_NONE = 0; + const PORTABILITY_RTRIM = 1; + const PORTABILITY_EMPTY_TO_NULL = 4; + const PORTABILITY_FIX_CASE = 8; + + const PORTABILITY_DB2 = 13; + const PORTABILITY_ORACLE = 9; + const PORTABILITY_POSTGRESQL = 13; + const PORTABILITY_SQLITE = 13; + const PORTABILITY_OTHERVENDORS = 12; + const PORTABILITY_DRIZZLE = 13; + const PORTABILITY_SQLANYWHERE = 13; + const PORTABILITY_SQLSRV = 13; + + /** + * @var integer + */ + private $portability = self::PORTABILITY_NONE; + + /** + * @var integer + */ + private $case; + + /** + * {@inheritdoc} + */ + public function connect() + { + $ret = parent::connect(); + if ($ret) { + $params = $this->getParams(); + if (isset($params['portability'])) { + if ($this->getDatabasePlatform()->getName() === "oracle") { + $params['portability'] = $params['portability'] & self::PORTABILITY_ORACLE; + } elseif ($this->getDatabasePlatform()->getName() === "postgresql") { + $params['portability'] = $params['portability'] & self::PORTABILITY_POSTGRESQL; + } elseif ($this->getDatabasePlatform()->getName() === "sqlite") { + $params['portability'] = $params['portability'] & self::PORTABILITY_SQLITE; + } elseif ($this->getDatabasePlatform()->getName() === "drizzle") { + $params['portability'] = self::PORTABILITY_DRIZZLE; + } elseif ($this->getDatabasePlatform()->getName() === 'sqlanywhere') { + $params['portability'] = self::PORTABILITY_SQLANYWHERE; + } elseif ($this->getDatabasePlatform()->getName() === 'db2') { + $params['portability'] = self::PORTABILITY_DB2; + } elseif ($this->getDatabasePlatform()->getName() === 'mssql') { + $params['portability'] = $params['portability'] & self::PORTABILITY_SQLSRV; + } else { + $params['portability'] = $params['portability'] & self::PORTABILITY_OTHERVENDORS; + } + $this->portability = $params['portability']; + } + if (isset($params['fetch_case']) && $this->portability & self::PORTABILITY_FIX_CASE) { + if ($this->_conn instanceof \Doctrine\DBAL\Driver\PDOConnection) { + // make use of c-level support for case handling + $this->_conn->setAttribute(\PDO::ATTR_CASE, $params['fetch_case']); + } else { + $this->case = ($params['fetch_case'] == \PDO::CASE_LOWER) ? CASE_LOWER : CASE_UPPER; + } + } + } + + return $ret; + } + + /** + * @return integer + */ + public function getPortability() + { + return $this->portability; + } + + /** + * @return integer + */ + public function getFetchCase() + { + return $this->case; + } + + /** + * {@inheritdoc} + */ + public function executeQuery($query, array $params = array(), $types = array(), QueryCacheProfile $qcp = null) + { + $stmt = new Statement(parent::executeQuery($query, $params, $types, $qcp), $this); + $stmt->setFetchMode($this->defaultFetchMode); + + return $stmt; + } + + /** + * {@inheritdoc} + */ + public function prepare($statement) + { + $stmt = new Statement(parent::prepare($statement), $this); + $stmt->setFetchMode($this->defaultFetchMode); + + return $stmt; + } + + /** + * {@inheritdoc} + */ + public function query() + { + $this->connect(); + + $stmt = call_user_func_array(array($this->_conn, 'query'), func_get_args()); + $stmt = new Statement($stmt, $this); + $stmt->setFetchMode($this->defaultFetchMode); + + return $stmt; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Portability/Statement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Portability/Statement.php new file mode 100644 index 0000000000000000000000000000000000000000..352fda9d762c73f6513f540862dfbb835d67d9d5 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Portability/Statement.php @@ -0,0 +1,240 @@ +. + */ + +namespace Doctrine\DBAL\Portability; + +use PDO; + +/** + * Portability wrapper for a Statement. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class Statement implements \IteratorAggregate, \Doctrine\DBAL\Driver\Statement +{ + /** + * @var integer + */ + private $portability; + + /** + * @var \Doctrine\DBAL\Driver\Statement + */ + private $stmt; + + /** + * @var integer + */ + private $case; + + /** + * @var integer + */ + private $defaultFetchMode = PDO::FETCH_BOTH; + + /** + * Wraps Statement and applies portability measures. + * + * @param \Doctrine\DBAL\Driver\Statement $stmt + * @param \Doctrine\DBAL\Portability\Connection $conn + */ + public function __construct($stmt, Connection $conn) + { + $this->stmt = $stmt; + $this->portability = $conn->getPortability(); + $this->case = $conn->getFetchCase(); + } + + /** + * {@inheritdoc} + */ + public function bindParam($column, &$variable, $type = null, $length = null) + { + return $this->stmt->bindParam($column, $variable, $type, $length); + } + /** + * {@inheritdoc} + */ + + public function bindValue($param, $value, $type = null) + { + return $this->stmt->bindValue($param, $value, $type); + } + + /** + * {@inheritdoc} + */ + public function closeCursor() + { + return $this->stmt->closeCursor(); + } + + /** + * {@inheritdoc} + */ + public function columnCount() + { + return $this->stmt->columnCount(); + } + + /** + * {@inheritdoc} + */ + public function errorCode() + { + return $this->stmt->errorCode(); + } + + /** + * {@inheritdoc} + */ + public function errorInfo() + { + return $this->stmt->errorInfo(); + } + + /** + * {@inheritdoc} + */ + public function execute($params = null) + { + return $this->stmt->execute($params); + } + + /** + * {@inheritdoc} + */ + public function setFetchMode($fetchMode, $arg1 = null, $arg2 = null) + { + $this->defaultFetchMode = $fetchMode; + + return $this->stmt->setFetchMode($fetchMode, $arg1, $arg2); + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + $data = $this->fetchAll(); + + return new \ArrayIterator($data); + } + + /** + * {@inheritdoc} + */ + public function fetch($fetchMode = null) + { + $fetchMode = $fetchMode ?: $this->defaultFetchMode; + + $row = $this->stmt->fetch($fetchMode); + + $row = $this->fixRow($row, + $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM), + !is_null($this->case) && ($fetchMode == PDO::FETCH_ASSOC || $fetchMode == PDO::FETCH_BOTH) && ($this->portability & Connection::PORTABILITY_FIX_CASE) + ); + + return $row; + } + + /** + * {@inheritdoc} + */ + public function fetchAll($fetchMode = null, $columnIndex = 0) + { + $fetchMode = $fetchMode ?: $this->defaultFetchMode; + + if ($columnIndex != 0) { + $rows = $this->stmt->fetchAll($fetchMode, $columnIndex); + } else { + $rows = $this->stmt->fetchAll($fetchMode); + } + + $iterateRow = $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM); + $fixCase = !is_null($this->case) && ($fetchMode == PDO::FETCH_ASSOC || $fetchMode == PDO::FETCH_BOTH) && ($this->portability & Connection::PORTABILITY_FIX_CASE); + if ( ! $iterateRow && !$fixCase) { + return $rows; + } + + foreach ($rows as $num => $row) { + $rows[$num] = $this->fixRow($row, $iterateRow, $fixCase); + } + + return $rows; + } + + /** + * @param mixed $row + * @param integer $iterateRow + * @param boolean $fixCase + * + * @return array + */ + protected function fixRow($row, $iterateRow, $fixCase) + { + if ( ! $row) { + return $row; + } + + if ($fixCase) { + $row = array_change_key_case($row, $this->case); + } + + if ($iterateRow) { + foreach ($row as $k => $v) { + if (($this->portability & Connection::PORTABILITY_EMPTY_TO_NULL) && $v === '') { + $row[$k] = null; + } elseif (($this->portability & Connection::PORTABILITY_RTRIM) && is_string($v)) { + $row[$k] = rtrim($v); + } + } + } + + return $row; + } + + /** + * {@inheritdoc} + */ + public function fetchColumn($columnIndex = 0) + { + $value = $this->stmt->fetchColumn($columnIndex); + + if ($this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM)) { + if (($this->portability & Connection::PORTABILITY_EMPTY_TO_NULL) && $value === '') { + $value = null; + } elseif (($this->portability & Connection::PORTABILITY_RTRIM) && is_string($value)) { + $value = rtrim($value); + } + } + + return $value; + } + + /** + * {@inheritdoc} + */ + public function rowCount() + { + return $this->stmt->rowCount(); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..937726f044f1891f9f6cc49e8b5fd784f3538eff --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php @@ -0,0 +1,134 @@ +. + */ + +namespace Doctrine\DBAL\Query\Expression; + +/** + * Composite expression is responsible to build a group of similar expression. + * + * @link www.doctrine-project.org + * @since 2.1 + * @author Guilherme Blanco + * @author Benjamin Eberlei + */ +class CompositeExpression implements \Countable +{ + /** + * Constant that represents an AND composite expression. + */ + const TYPE_AND = 'AND'; + + /** + * Constant that represents an OR composite expression. + */ + const TYPE_OR = 'OR'; + + /** + * The instance type of composite expression. + * + * @var string + */ + private $type; + + /** + * Each expression part of the composite expression. + * + * @var array + */ + private $parts = array(); + + /** + * Constructor. + * + * @param string $type Instance type of composite expression. + * @param array $parts Composition of expressions to be joined on composite expression. + */ + public function __construct($type, array $parts = array()) + { + $this->type = $type; + + $this->addMultiple($parts); + } + + /** + * Adds multiple parts to composite expression. + * + * @param array $parts + * + * @return \Doctrine\DBAL\Query\Expression\CompositeExpression + */ + public function addMultiple(array $parts = array()) + { + foreach ((array) $parts as $part) { + $this->add($part); + } + + return $this; + } + + /** + * Adds an expression to composite expression. + * + * @param mixed $part + * + * @return \Doctrine\DBAL\Query\Expression\CompositeExpression + */ + public function add($part) + { + if ( ! empty($part) || ($part instanceof self && $part->count() > 0)) { + $this->parts[] = $part; + } + + return $this; + } + + /** + * Retrieves the amount of expressions on composite expression. + * + * @return integer + */ + public function count() + { + return count($this->parts); + } + + /** + * Retrieves the string representation of this composite expression. + * + * @return string + */ + public function __toString() + { + if (count($this->parts) === 1) { + return (string) $this->parts[0]; + } + + return '(' . implode(') ' . $this->type . ' (', $this->parts) . ')'; + } + + /** + * Returns the type of this composite expression (AND/OR). + * + * @return string + */ + public function getType() + { + return $this->type; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..2736fcf2264088053c480c5ea6e477e849b5c133 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php @@ -0,0 +1,313 @@ +. + */ + +namespace Doctrine\DBAL\Query\Expression; + +use Doctrine\DBAL\Connection; + +/** + * ExpressionBuilder class is responsible to dynamically create SQL query parts. + * + * @link www.doctrine-project.org + * @since 2.1 + * @author Guilherme Blanco + * @author Benjamin Eberlei + */ +class ExpressionBuilder +{ + const EQ = '='; + const NEQ = '<>'; + const LT = '<'; + const LTE = '<='; + const GT = '>'; + const GTE = '>='; + + /** + * The DBAL Connection. + * + * @var \Doctrine\DBAL\Connection + */ + private $connection; + + /** + * Initializes a new ExpressionBuilder. + * + * @param \Doctrine\DBAL\Connection $connection The DBAL Connection. + */ + public function __construct(Connection $connection) + { + $this->connection = $connection; + } + + /** + * Creates a conjunction of the given boolean expressions. + * + * Example: + * + * [php] + * // (u.type = ?) AND (u.role = ?) + * $expr->andX('u.type = ?', 'u.role = ?')); + * + * @param mixed $x Optional clause. Defaults = null, but requires + * at least one defined when converting to string. + * + * @return \Doctrine\DBAL\Query\Expression\CompositeExpression + */ + public function andX($x = null) + { + return new CompositeExpression(CompositeExpression::TYPE_AND, func_get_args()); + } + + /** + * Creates a disjunction of the given boolean expressions. + * + * Example: + * + * [php] + * // (u.type = ?) OR (u.role = ?) + * $qb->where($qb->expr()->orX('u.type = ?', 'u.role = ?')); + * + * @param mixed $x Optional clause. Defaults = null, but requires + * at least one defined when converting to string. + * + * @return \Doctrine\DBAL\Query\Expression\CompositeExpression + */ + public function orX($x = null) + { + return new CompositeExpression(CompositeExpression::TYPE_OR, func_get_args()); + } + + /** + * Creates a comparison expression. + * + * @param mixed $x The left expression. + * @param string $operator One of the ExpressionBuilder::* constants. + * @param mixed $y The right expression. + * + * @return string + */ + public function comparison($x, $operator, $y) + { + return $x . ' ' . $operator . ' ' . $y; + } + + /** + * Creates an equality comparison expression with the given arguments. + * + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a = . Example: + * + * [php] + * // u.id = ? + * $expr->eq('u.id', '?'); + * + * @param mixed $x The left expression. + * @param mixed $y The right expression. + * + * @return string + */ + public function eq($x, $y) + { + return $this->comparison($x, self::EQ, $y); + } + + /** + * Creates a non equality comparison expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a <> . Example: + * + * [php] + * // u.id <> 1 + * $q->where($q->expr()->neq('u.id', '1')); + * + * @param mixed $x The left expression. + * @param mixed $y The right expression. + * + * @return string + */ + public function neq($x, $y) + { + return $this->comparison($x, self::NEQ, $y); + } + + /** + * Creates a lower-than comparison expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a < . Example: + * + * [php] + * // u.id < ? + * $q->where($q->expr()->lt('u.id', '?')); + * + * @param mixed $x The left expression. + * @param mixed $y The right expression. + * + * @return string + */ + public function lt($x, $y) + { + return $this->comparison($x, self::LT, $y); + } + + /** + * Creates a lower-than-equal comparison expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a <= . Example: + * + * [php] + * // u.id <= ? + * $q->where($q->expr()->lte('u.id', '?')); + * + * @param mixed $x The left expression. + * @param mixed $y The right expression. + * + * @return string + */ + public function lte($x, $y) + { + return $this->comparison($x, self::LTE, $y); + } + + /** + * Creates a greater-than comparison expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a > . Example: + * + * [php] + * // u.id > ? + * $q->where($q->expr()->gt('u.id', '?')); + * + * @param mixed $x The left expression. + * @param mixed $y The right expression. + * + * @return string + */ + public function gt($x, $y) + { + return $this->comparison($x, self::GT, $y); + } + + /** + * Creates a greater-than-equal comparison expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a >= . Example: + * + * [php] + * // u.id >= ? + * $q->where($q->expr()->gte('u.id', '?')); + * + * @param mixed $x The left expression. + * @param mixed $y The right expression. + * + * @return string + */ + public function gte($x, $y) + { + return $this->comparison($x, self::GTE, $y); + } + + /** + * Creates an IS NULL expression with the given arguments. + * + * @param string $x The field in string format to be restricted by IS NULL. + * + * @return string + */ + public function isNull($x) + { + return $x . ' IS NULL'; + } + + /** + * Creates an IS NOT NULL expression with the given arguments. + * + * @param string $x The field in string format to be restricted by IS NOT NULL. + * + * @return string + */ + public function isNotNull($x) + { + return $x . ' IS NOT NULL'; + } + + /** + * Creates a LIKE() comparison expression with the given arguments. + * + * @param string $x Field in string format to be inspected by LIKE() comparison. + * @param mixed $y Argument to be used in LIKE() comparison. + * + * @return string + */ + public function like($x, $y) + { + return $this->comparison($x, 'LIKE', $y); + } + + /** + * Creates a NOT LIKE() comparison expression with the given arguments. + * + * @param string $x Field in string format to be inspected by NOT LIKE() comparison. + * @param mixed $y Argument to be used in NOT LIKE() comparison. + * + * @return string + */ + public function notLike($x, $y) + { + return $this->comparison($x, 'NOT LIKE', $y); + } + + /** + * Creates a IN () comparison expression with the given arguments. + * + * @param string $x The field in string format to be inspected by IN() comparison. + * @param string|array $y The placeholder or the array of values to be used by IN() comparison. + * + * @return string + */ + public function in($x, $y) + { + return $this->comparison($x, 'IN', '('.implode(', ', (array) $y).')'); + } + + /** + * Creates a NOT IN () comparison expression with the given arguments. + * + * @param string $x The field in string format to be inspected by NOT IN() comparison. + * @param string|array $y The placeholder or the array of values to be used by NOT IN() comparison. + * + * @return string + */ + public function notIn($x, $y) + { + return $this->comparison($x, 'NOT IN', '('.implode(', ', (array) $y).')'); + } + + /** + * Quotes a given input parameter. + * + * @param mixed $input The parameter to be quoted. + * @param string|null $type The type of the parameter. + * + * @return string + */ + public function literal($input, $type = null) + { + return $this->connection->quote($input, $type); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..5c46f1aa7333297e68e55aff8051628095c8e299 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php @@ -0,0 +1,1354 @@ +. + */ + +namespace Doctrine\DBAL\Query; + +use Doctrine\DBAL\Query\Expression\CompositeExpression; +use Doctrine\DBAL\Connection; + +/** + * QueryBuilder class is responsible to dynamically create SQL queries. + * + * Important: Verify that every feature you use will work with your database vendor. + * SQL Query Builder does not attempt to validate the generated SQL at all. + * + * The query builder does no validation whatsoever if certain features even work with the + * underlying database vendor. Limit queries and joins are NOT applied to UPDATE and DELETE statements + * even if some vendors such as MySQL support it. + * + * @link www.doctrine-project.org + * @since 2.1 + * @author Guilherme Blanco + * @author Benjamin Eberlei + */ +class QueryBuilder +{ + /* + * The query types. + */ + const SELECT = 0; + const DELETE = 1; + const UPDATE = 2; + const INSERT = 3; + + /* + * The builder states. + */ + const STATE_DIRTY = 0; + const STATE_CLEAN = 1; + + /** + * The DBAL Connection. + * + * @var \Doctrine\DBAL\Connection + */ + private $connection; + + /** + * @var array The array of SQL parts collected. + */ + private $sqlParts = array( + 'select' => array(), + 'from' => array(), + 'join' => array(), + 'set' => array(), + 'where' => null, + 'groupBy' => array(), + 'having' => null, + 'orderBy' => array(), + 'values' => array(), + ); + + /** + * The complete SQL string for this query. + * + * @var string + */ + private $sql; + + /** + * The query parameters. + * + * @var array + */ + private $params = array(); + + /** + * The parameter type map of this query. + * + * @var array + */ + private $paramTypes = array(); + + /** + * The type of query this is. Can be select, update or delete. + * + * @var integer + */ + private $type = self::SELECT; + + /** + * The state of the query object. Can be dirty or clean. + * + * @var integer + */ + private $state = self::STATE_CLEAN; + + /** + * The index of the first result to retrieve. + * + * @var integer + */ + private $firstResult = null; + + /** + * The maximum number of results to retrieve. + * + * @var integer + */ + private $maxResults = null; + + /** + * The counter of bound parameters used with {@see bindValue). + * + * @var integer + */ + private $boundCounter = 0; + + /** + * Initializes a new QueryBuilder. + * + * @param \Doctrine\DBAL\Connection $connection The DBAL Connection. + */ + public function __construct(Connection $connection) + { + $this->connection = $connection; + } + + /** + * Gets an ExpressionBuilder used for object-oriented construction of query expressions. + * This producer method is intended for convenient inline usage. Example: + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u') + * ->from('users', 'u') + * ->where($qb->expr()->eq('u.id', 1)); + * + * + * For more complex expression construction, consider storing the expression + * builder object in a local variable. + * + * @return \Doctrine\DBAL\Query\Expression\ExpressionBuilder + */ + public function expr() + { + return $this->connection->getExpressionBuilder(); + } + + /** + * Gets the type of the currently built query. + * + * @return integer + */ + public function getType() + { + return $this->type; + } + + /** + * Gets the associated DBAL Connection for this query builder. + * + * @return \Doctrine\DBAL\Connection + */ + public function getConnection() + { + return $this->connection; + } + + /** + * Gets the state of this query builder instance. + * + * @return integer Either QueryBuilder::STATE_DIRTY or QueryBuilder::STATE_CLEAN. + */ + public function getState() + { + return $this->state; + } + + /** + * Executes this query using the bound parameters and their types. + * + * Uses {@see Connection::executeQuery} for select statements and {@see Connection::executeUpdate} + * for insert, update and delete statements. + * + * @return \Doctrine\DBAL\Driver\Statement|int + */ + public function execute() + { + if ($this->type == self::SELECT) { + return $this->connection->executeQuery($this->getSQL(), $this->params, $this->paramTypes); + } else { + return $this->connection->executeUpdate($this->getSQL(), $this->params, $this->paramTypes); + } + } + + /** + * Gets the complete SQL string formed by the current specifications of this QueryBuilder. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * echo $qb->getSQL(); // SELECT u FROM User u + * + * + * @return string The SQL query string. + */ + public function getSQL() + { + if ($this->sql !== null && $this->state === self::STATE_CLEAN) { + return $this->sql; + } + + switch ($this->type) { + case self::INSERT: + $sql = $this->getSQLForInsert(); + break; + case self::DELETE: + $sql = $this->getSQLForDelete(); + break; + + case self::UPDATE: + $sql = $this->getSQLForUpdate(); + break; + + case self::SELECT: + default: + $sql = $this->getSQLForSelect(); + break; + } + + $this->state = self::STATE_CLEAN; + $this->sql = $sql; + + return $sql; + } + + /** + * Sets a query parameter for the query being constructed. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u') + * ->from('users', 'u') + * ->where('u.id = :user_id') + * ->setParameter(':user_id', 1); + * + * + * @param string|integer $key The parameter position or name. + * @param mixed $value The parameter value. + * @param string|null $type One of the PDO::PARAM_* constants. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function setParameter($key, $value, $type = null) + { + if ($type !== null) { + $this->paramTypes[$key] = $type; + } + + $this->params[$key] = $value; + + return $this; + } + + /** + * Sets a collection of query parameters for the query being constructed. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u') + * ->from('users', 'u') + * ->where('u.id = :user_id1 OR u.id = :user_id2') + * ->setParameters(array( + * ':user_id1' => 1, + * ':user_id2' => 2 + * )); + * + * + * @param array $params The query parameters to set. + * @param array $types The query parameters types to set. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function setParameters(array $params, array $types = array()) + { + $this->paramTypes = $types; + $this->params = $params; + + return $this; + } + + /** + * Gets all defined query parameters for the query being constructed indexed by parameter index or name. + * + * @return array The currently defined query parameters indexed by parameter index or name. + */ + public function getParameters() + { + return $this->params; + } + + /** + * Gets a (previously set) query parameter of the query being constructed. + * + * @param mixed $key The key (index or name) of the bound parameter. + * + * @return mixed The value of the bound parameter. + */ + public function getParameter($key) + { + return isset($this->params[$key]) ? $this->params[$key] : null; + } + + /** + * Gets all defined query parameter types for the query being constructed indexed by parameter index or name. + * + * @return array The currently defined query parameter types indexed by parameter index or name. + */ + public function getParameterTypes() + { + return $this->paramTypes; + } + + /** + * Gets a (previously set) query parameter type of the query being constructed. + * + * @param mixed $key The key (index or name) of the bound parameter type. + * + * @return mixed The value of the bound parameter type. + */ + public function getParameterType($key) + { + return isset($this->paramTypes[$key]) ? $this->paramTypes[$key] : null; + } + + /** + * Sets the position of the first result to retrieve (the "offset"). + * + * @param integer $firstResult The first result to return. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function setFirstResult($firstResult) + { + $this->state = self::STATE_DIRTY; + $this->firstResult = $firstResult; + + return $this; + } + + /** + * Gets the position of the first result the query object was set to retrieve (the "offset"). + * Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder. + * + * @return integer The position of the first result. + */ + public function getFirstResult() + { + return $this->firstResult; + } + + /** + * Sets the maximum number of results to retrieve (the "limit"). + * + * @param integer $maxResults The maximum number of results to retrieve. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function setMaxResults($maxResults) + { + $this->state = self::STATE_DIRTY; + $this->maxResults = $maxResults; + + return $this; + } + + /** + * Gets the maximum number of results the query object was set to retrieve (the "limit"). + * Returns NULL if {@link setMaxResults} was not applied to this query builder. + * + * @return integer The maximum number of results. + */ + public function getMaxResults() + { + return $this->maxResults; + } + + /** + * Either appends to or replaces a single, generic query part. + * + * The available parts are: 'select', 'from', 'set', 'where', + * 'groupBy', 'having' and 'orderBy'. + * + * @param string $sqlPartName + * @param string $sqlPart + * @param boolean $append + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function add($sqlPartName, $sqlPart, $append = false) + { + $isArray = is_array($sqlPart); + $isMultiple = is_array($this->sqlParts[$sqlPartName]); + + if ($isMultiple && !$isArray) { + $sqlPart = array($sqlPart); + } + + $this->state = self::STATE_DIRTY; + + if ($append) { + if ($sqlPartName == "orderBy" || $sqlPartName == "groupBy" || $sqlPartName == "select" || $sqlPartName == "set") { + foreach ($sqlPart as $part) { + $this->sqlParts[$sqlPartName][] = $part; + } + } elseif ($isArray && is_array($sqlPart[key($sqlPart)])) { + $key = key($sqlPart); + $this->sqlParts[$sqlPartName][$key][] = $sqlPart[$key]; + } elseif ($isMultiple) { + $this->sqlParts[$sqlPartName][] = $sqlPart; + } else { + $this->sqlParts[$sqlPartName] = $sqlPart; + } + + return $this; + } + + $this->sqlParts[$sqlPartName] = $sqlPart; + + return $this; + } + + /** + * Specifies an item that is to be returned in the query result. + * Replaces any previously specified selections, if any. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.id', 'p.id') + * ->from('users', 'u') + * ->leftJoin('u', 'phonenumbers', 'p', 'u.id = p.user_id'); + * + * + * @param mixed $select The selection expressions. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function select($select = null) + { + $this->type = self::SELECT; + + if (empty($select)) { + return $this; + } + + $selects = is_array($select) ? $select : func_get_args(); + + return $this->add('select', $selects, false); + } + + /** + * Adds an item that is to be returned in the query result. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.id') + * ->addSelect('p.id') + * ->from('users', 'u') + * ->leftJoin('u', 'phonenumbers', 'u.id = p.user_id'); + * + * + * @param mixed $select The selection expression. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function addSelect($select = null) + { + $this->type = self::SELECT; + + if (empty($select)) { + return $this; + } + + $selects = is_array($select) ? $select : func_get_args(); + + return $this->add('select', $selects, true); + } + + /** + * Turns the query being built into a bulk delete query that ranges over + * a certain table. + * + * + * $qb = $conn->createQueryBuilder() + * ->delete('users', 'u') + * ->where('u.id = :user_id'); + * ->setParameter(':user_id', 1); + * + * + * @param string $delete The table whose rows are subject to the deletion. + * @param string $alias The table alias used in the constructed query. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function delete($delete = null, $alias = null) + { + $this->type = self::DELETE; + + if ( ! $delete) { + return $this; + } + + return $this->add('from', array( + 'table' => $delete, + 'alias' => $alias + )); + } + + /** + * Turns the query being built into a bulk update query that ranges over + * a certain table + * + * + * $qb = $conn->createQueryBuilder() + * ->update('users', 'u') + * ->set('u.password', md5('password')) + * ->where('u.id = ?'); + * + * + * @param string $update The table whose rows are subject to the update. + * @param string $alias The table alias used in the constructed query. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function update($update = null, $alias = null) + { + $this->type = self::UPDATE; + + if ( ! $update) { + return $this; + } + + return $this->add('from', array( + 'table' => $update, + 'alias' => $alias + )); + } + + /** + * Turns the query being built into an insert query that inserts into + * a certain table + * + * + * $qb = $conn->createQueryBuilder() + * ->insert('users') + * ->values( + * array( + * 'name' => '?', + * 'password' => '?' + * ) + * ); + * + * + * @param string $insert The table into which the rows should be inserted. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function insert($insert = null) + { + $this->type = self::INSERT; + + if ( ! $insert) { + return $this; + } + + return $this->add('from', array( + 'table' => $insert + )); + } + + /** + * Creates and adds a query root corresponding to the table identified by the + * given alias, forming a cartesian product with any existing query roots. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.id') + * ->from('users', 'u') + * + * + * @param string $from The table. + * @param string|null $alias The alias of the table. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function from($from, $alias = null) + { + return $this->add('from', array( + 'table' => $from, + 'alias' => $alias + ), true); + } + + /** + * Creates and adds a join to the query. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->join('u', 'phonenumbers', 'p', 'p.is_primary = 1'); + * + * + * @param string $fromAlias The alias that points to a from clause. + * @param string $join The table name to join. + * @param string $alias The alias of the join table. + * @param string $condition The condition for the join. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function join($fromAlias, $join, $alias, $condition = null) + { + return $this->innerJoin($fromAlias, $join, $alias, $condition); + } + + /** + * Creates and adds a join to the query. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->innerJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1'); + * + * + * @param string $fromAlias The alias that points to a from clause. + * @param string $join The table name to join. + * @param string $alias The alias of the join table. + * @param string $condition The condition for the join. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function innerJoin($fromAlias, $join, $alias, $condition = null) + { + return $this->add('join', array( + $fromAlias => array( + 'joinType' => 'inner', + 'joinTable' => $join, + 'joinAlias' => $alias, + 'joinCondition' => $condition + ) + ), true); + } + + /** + * Creates and adds a left join to the query. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->leftJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1'); + * + * + * @param string $fromAlias The alias that points to a from clause. + * @param string $join The table name to join. + * @param string $alias The alias of the join table. + * @param string $condition The condition for the join. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function leftJoin($fromAlias, $join, $alias, $condition = null) + { + return $this->add('join', array( + $fromAlias => array( + 'joinType' => 'left', + 'joinTable' => $join, + 'joinAlias' => $alias, + 'joinCondition' => $condition + ) + ), true); + } + + /** + * Creates and adds a right join to the query. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->rightJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1'); + * + * + * @param string $fromAlias The alias that points to a from clause. + * @param string $join The table name to join. + * @param string $alias The alias of the join table. + * @param string $condition The condition for the join. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function rightJoin($fromAlias, $join, $alias, $condition = null) + { + return $this->add('join', array( + $fromAlias => array( + 'joinType' => 'right', + 'joinTable' => $join, + 'joinAlias' => $alias, + 'joinCondition' => $condition + ) + ), true); + } + + /** + * Sets a new value for a column in a bulk update query. + * + * + * $qb = $conn->createQueryBuilder() + * ->update('users', 'u') + * ->set('u.password', md5('password')) + * ->where('u.id = ?'); + * + * + * @param string $key The column to set. + * @param string $value The value, expression, placeholder, etc. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function set($key, $value) + { + return $this->add('set', $key .' = ' . $value, true); + } + + /** + * Specifies one or more restrictions to the query result. + * Replaces any previously specified restrictions, if any. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->where('u.id = ?'); + * + * // You can optionally programatically build and/or expressions + * $qb = $conn->createQueryBuilder(); + * + * $or = $qb->expr()->orx(); + * $or->add($qb->expr()->eq('u.id', 1)); + * $or->add($qb->expr()->eq('u.id', 2)); + * + * $qb->update('users', 'u') + * ->set('u.password', md5('password')) + * ->where($or); + * + * + * @param mixed $predicates The restriction predicates. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function where($predicates) + { + if ( ! (func_num_args() == 1 && $predicates instanceof CompositeExpression)) { + $predicates = new CompositeExpression(CompositeExpression::TYPE_AND, func_get_args()); + } + + return $this->add('where', $predicates); + } + + /** + * Adds one or more restrictions to the query results, forming a logical + * conjunction with any previously specified restrictions. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u') + * ->from('users', 'u') + * ->where('u.username LIKE ?') + * ->andWhere('u.is_active = 1'); + * + * + * @param mixed $where The query restrictions. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + * + * @see where() + */ + public function andWhere($where) + { + $args = func_get_args(); + $where = $this->getQueryPart('where'); + + if ($where instanceof CompositeExpression && $where->getType() === CompositeExpression::TYPE_AND) { + $where->addMultiple($args); + } else { + array_unshift($args, $where); + $where = new CompositeExpression(CompositeExpression::TYPE_AND, $args); + } + + return $this->add('where', $where, true); + } + + /** + * Adds one or more restrictions to the query results, forming a logical + * disjunction with any previously specified restrictions. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->where('u.id = 1') + * ->orWhere('u.id = 2'); + * + * + * @param mixed $where The WHERE statement. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + * + * @see where() + */ + public function orWhere($where) + { + $args = func_get_args(); + $where = $this->getQueryPart('where'); + + if ($where instanceof CompositeExpression && $where->getType() === CompositeExpression::TYPE_OR) { + $where->addMultiple($args); + } else { + array_unshift($args, $where); + $where = new CompositeExpression(CompositeExpression::TYPE_OR, $args); + } + + return $this->add('where', $where, true); + } + + /** + * Specifies a grouping over the results of the query. + * Replaces any previously specified groupings, if any. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->groupBy('u.id'); + * + * + * @param mixed $groupBy The grouping expression. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function groupBy($groupBy) + { + if (empty($groupBy)) { + return $this; + } + + $groupBy = is_array($groupBy) ? $groupBy : func_get_args(); + + return $this->add('groupBy', $groupBy, false); + } + + + /** + * Adds a grouping expression to the query. + * + * + * $qb = $conn->createQueryBuilder() + * ->select('u.name') + * ->from('users', 'u') + * ->groupBy('u.lastLogin'); + * ->addGroupBy('u.createdAt') + * + * + * @param mixed $groupBy The grouping expression. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function addGroupBy($groupBy) + { + if (empty($groupBy)) { + return $this; + } + + $groupBy = is_array($groupBy) ? $groupBy : func_get_args(); + + return $this->add('groupBy', $groupBy, true); + } + + /** + * Sets a value for a column in an insert query. + * + * + * $qb = $conn->createQueryBuilder() + * ->insert('users') + * ->values( + * array( + * 'name' => '?' + * ) + * ) + * ->setValue('password', '?'); + * + * + * @param string $column The column into which the value should be inserted. + * @param string $value The value that should be inserted into the column. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function setValue($column, $value) + { + $this->sqlParts['values'][$column] = $value; + + return $this; + } + + /** + * Specifies values for an insert query indexed by column names. + * Replaces any previous values, if any. + * + * + * $qb = $conn->createQueryBuilder() + * ->insert('users') + * ->values( + * array( + * 'name' => '?', + * 'password' => '?' + * ) + * ); + * + * + * @param array $values The values to specify for the insert query indexed by column names. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function values(array $values) + { + return $this->add('values', $values); + } + + /** + * Specifies a restriction over the groups of the query. + * Replaces any previous having restrictions, if any. + * + * @param mixed $having The restriction over the groups. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function having($having) + { + if ( ! (func_num_args() == 1 && $having instanceof CompositeExpression)) { + $having = new CompositeExpression(CompositeExpression::TYPE_AND, func_get_args()); + } + + return $this->add('having', $having); + } + + /** + * Adds a restriction over the groups of the query, forming a logical + * conjunction with any existing having restrictions. + * + * @param mixed $having The restriction to append. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function andHaving($having) + { + $args = func_get_args(); + $having = $this->getQueryPart('having'); + + if ($having instanceof CompositeExpression && $having->getType() === CompositeExpression::TYPE_AND) { + $having->addMultiple($args); + } else { + array_unshift($args, $having); + $having = new CompositeExpression(CompositeExpression::TYPE_AND, $args); + } + + return $this->add('having', $having); + } + + /** + * Adds a restriction over the groups of the query, forming a logical + * disjunction with any existing having restrictions. + * + * @param mixed $having The restriction to add. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function orHaving($having) + { + $args = func_get_args(); + $having = $this->getQueryPart('having'); + + if ($having instanceof CompositeExpression && $having->getType() === CompositeExpression::TYPE_OR) { + $having->addMultiple($args); + } else { + array_unshift($args, $having); + $having = new CompositeExpression(CompositeExpression::TYPE_OR, $args); + } + + return $this->add('having', $having); + } + + /** + * Specifies an ordering for the query results. + * Replaces any previously specified orderings, if any. + * + * @param string $sort The ordering expression. + * @param string $order The ordering direction. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function orderBy($sort, $order = null) + { + return $this->add('orderBy', $sort . ' ' . (! $order ? 'ASC' : $order), false); + } + + /** + * Adds an ordering to the query results. + * + * @param string $sort The ordering expression. + * @param string $order The ordering direction. + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function addOrderBy($sort, $order = null) + { + return $this->add('orderBy', $sort . ' ' . (! $order ? 'ASC' : $order), true); + } + + /** + * Gets a query part by its name. + * + * @param string $queryPartName + * + * @return mixed + */ + public function getQueryPart($queryPartName) + { + return $this->sqlParts[$queryPartName]; + } + + /** + * Gets all query parts. + * + * @return array + */ + public function getQueryParts() + { + return $this->sqlParts; + } + + /** + * Resets SQL parts. + * + * @param array|null $queryPartNames + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function resetQueryParts($queryPartNames = null) + { + if (is_null($queryPartNames)) { + $queryPartNames = array_keys($this->sqlParts); + } + + foreach ($queryPartNames as $queryPartName) { + $this->resetQueryPart($queryPartName); + } + + return $this; + } + + /** + * Resets a single SQL part. + * + * @param string $queryPartName + * + * @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance. + */ + public function resetQueryPart($queryPartName) + { + $this->sqlParts[$queryPartName] = is_array($this->sqlParts[$queryPartName]) + ? array() : null; + + $this->state = self::STATE_DIRTY; + + return $this; + } + + /** + * @return string + * + * @throws \Doctrine\DBAL\Query\QueryException + */ + private function getSQLForSelect() + { + $query = 'SELECT ' . implode(', ', $this->sqlParts['select']); + + $query .= ($this->sqlParts['from'] ? ' FROM ' . implode(', ', $this->getFromClauses()) : '') + . ($this->sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->sqlParts['where']) : '') + . ($this->sqlParts['groupBy'] ? ' GROUP BY ' . implode(', ', $this->sqlParts['groupBy']) : '') + . ($this->sqlParts['having'] !== null ? ' HAVING ' . ((string) $this->sqlParts['having']) : '') + . ($this->sqlParts['orderBy'] ? ' ORDER BY ' . implode(', ', $this->sqlParts['orderBy']) : ''); + + if ($this->isLimitQuery()) { + return $this->connection->getDatabasePlatform()->modifyLimitQuery( + $query, + $this->maxResults, + $this->firstResult + ); + } + + return $query; + } + + /** + * @return string[] + */ + private function getFromClauses() + { + $fromClauses = array(); + $knownAliases = array(); + + // Loop through all FROM clauses + foreach ($this->sqlParts['from'] as $from) { + if ($from['alias'] === null) { + $tableSql = $from['table']; + $tableReference = $from['table']; + } else { + $tableSql = $from['table'] . ' ' . $from['alias']; + $tableReference = $from['alias']; + } + + $knownAliases[$tableReference] = true; + + $fromClauses[$tableReference] = $tableSql . $this->getSQLForJoins($tableReference, $knownAliases); + } + + $this->verifyAllAliasesAreKnown($knownAliases); + + return $fromClauses; + } + + /** + * @param array $knownAliases + * + * @throws QueryException + */ + private function verifyAllAliasesAreKnown(array $knownAliases) + { + foreach ($this->sqlParts['join'] as $fromAlias => $joins) { + if ( ! isset($knownAliases[$fromAlias])) { + throw QueryException::unknownAlias($fromAlias, array_keys($knownAliases)); + } + } + } + + /** + * @return bool + */ + private function isLimitQuery() + { + return $this->maxResults !== null || $this->firstResult !== null; + } + + /** + * Converts this instance into an INSERT string in SQL. + * + * @return string + */ + private function getSQLForInsert() + { + return 'INSERT INTO ' . $this->sqlParts['from']['table'] . + ' (' . implode(', ', array_keys($this->sqlParts['values'])) . ')' . + ' VALUES(' . implode(', ', $this->sqlParts['values']) . ')'; + } + + /** + * Converts this instance into an UPDATE string in SQL. + * + * @return string + */ + private function getSQLForUpdate() + { + $table = $this->sqlParts['from']['table'] . ($this->sqlParts['from']['alias'] ? ' ' . $this->sqlParts['from']['alias'] : ''); + $query = 'UPDATE ' . $table + . ' SET ' . implode(", ", $this->sqlParts['set']) + . ($this->sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->sqlParts['where']) : ''); + + return $query; + } + + /** + * Converts this instance into a DELETE string in SQL. + * + * @return string + */ + private function getSQLForDelete() + { + $table = $this->sqlParts['from']['table'] . ($this->sqlParts['from']['alias'] ? ' ' . $this->sqlParts['from']['alias'] : ''); + $query = 'DELETE FROM ' . $table . ($this->sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->sqlParts['where']) : ''); + + return $query; + } + + /** + * Gets a string representation of this QueryBuilder which corresponds to + * the final SQL query being constructed. + * + * @return string The string representation of this QueryBuilder. + */ + public function __toString() + { + return $this->getSQL(); + } + + /** + * Creates a new named parameter and bind the value $value to it. + * + * This method provides a shortcut for PDOStatement::bindValue + * when using prepared statements. + * + * The parameter $value specifies the value that you want to bind. If + * $placeholder is not provided bindValue() will automatically create a + * placeholder for you. An automatic placeholder will be of the name + * ':dcValue1', ':dcValue2' etc. + * + * For more information see {@link http://php.net/pdostatement-bindparam} + * + * Example: + * + * $value = 2; + * $q->eq( 'id', $q->bindValue( $value ) ); + * $stmt = $q->executeQuery(); // executed with 'id = 2' + * + * + * @license New BSD License + * @link http://www.zetacomponents.org + * + * @param mixed $value + * @param mixed $type + * @param string $placeHolder The name to bind with. The string must start with a colon ':'. + * + * @return string the placeholder name used. + */ + public function createNamedParameter($value, $type = \PDO::PARAM_STR, $placeHolder = null) + { + if ($placeHolder === null) { + $this->boundCounter++; + $placeHolder = ":dcValue" . $this->boundCounter; + } + $this->setParameter(substr($placeHolder, 1), $value, $type); + + return $placeHolder; + } + + /** + * Creates a new positional parameter and bind the given value to it. + * + * Attention: If you are using positional parameters with the query builder you have + * to be very careful to bind all parameters in the order they appear in the SQL + * statement , otherwise they get bound in the wrong order which can lead to serious + * bugs in your code. + * + * Example: + * + * $qb = $conn->createQueryBuilder(); + * $qb->select('u.*') + * ->from('users', 'u') + * ->where('u.username = ' . $qb->createPositionalParameter('Foo', PDO::PARAM_STR)) + * ->orWhere('u.username = ' . $qb->createPositionalParameter('Bar', PDO::PARAM_STR)) + * + * + * @param mixed $value + * @param integer $type + * + * @return string + */ + public function createPositionalParameter($value, $type = \PDO::PARAM_STR) + { + $this->boundCounter++; + $this->setParameter($this->boundCounter, $value, $type); + + return "?"; + } + + /** + * @param string $fromAlias + * @param array $knownAliases + * + * @return string + */ + private function getSQLForJoins($fromAlias, array &$knownAliases) + { + $sql = ''; + + if (isset($this->sqlParts['join'][$fromAlias])) { + foreach ($this->sqlParts['join'][$fromAlias] as $join) { + if (array_key_exists($join['joinAlias'], $knownAliases)) { + throw QueryException::nonUniqueAlias($join['joinAlias'], array_keys($knownAliases)); + } + $sql .= ' ' . strtoupper($join['joinType']) + . ' JOIN ' . $join['joinTable'] . ' ' . $join['joinAlias'] + . ' ON ' . ((string) $join['joinCondition']); + $knownAliases[$join['joinAlias']] = true; + } + + foreach ($this->sqlParts['join'][$fromAlias] as $join) { + $sql .= $this->getSQLForJoins($join['joinAlias'], $knownAliases); + } + } + + return $sql; + } + + /** + * Deep clone of all expression objects in the SQL parts. + * + * @return void + */ + public function __clone() + { + foreach ($this->sqlParts as $part => $elements) { + if (is_array($this->sqlParts[$part])) { + foreach ($this->sqlParts[$part] as $idx => $element) { + if (is_object($element)) { + $this->sqlParts[$part][$idx] = clone $element; + } + } + } elseif (is_object($elements)) { + $this->sqlParts[$part] = clone $elements; + } + } + + foreach ($this->params as $name => $param) { + if (is_object($param)) { + $this->params[$name] = clone $param; + } + } + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryException.php new file mode 100644 index 0000000000000000000000000000000000000000..92c9336d6e8e4e6b64b2932a5ca46f6955452d1b --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryException.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\DBAL\Query; + +use Doctrine\DBAL\DBALException; + +/** + * @since 2.1.4 + */ +class QueryException extends DBALException +{ + /** + * @param string $alias + * @param array $registeredAliases + * + * @return \Doctrine\DBAL\Query\QueryException + */ + static public function unknownAlias($alias, $registeredAliases) + { + return new self("The given alias '" . $alias . "' is not part of " . + "any FROM or JOIN clause table. The currently registered " . + "aliases are: " . implode(", ", $registeredAliases) . "."); + } + + /** + * @param string $alias + * @param array $registeredAliases + * + * @return \Doctrine\DBAL\Query\QueryException + */ + static public function nonUniqueAlias($alias, $registeredAliases) + { + return new self("The given alias '" . $alias . "' is not unique " . + "in FROM and JOIN clause table. The currently registered " . + "aliases are: " . implode(", ", $registeredAliases) . "."); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/README.markdown b/vendor/doctrine/dbal/lib/Doctrine/DBAL/README.markdown new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtils.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtils.php new file mode 100644 index 0000000000000000000000000000000000000000..6c32413188a98159b4eb1430689ac4b5ea7b20aa --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtils.php @@ -0,0 +1,243 @@ +. + */ + +namespace Doctrine\DBAL; + +/** + * Utility class that parses sql statements with regard to types and parameters. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class SQLParserUtils +{ + const POSITIONAL_TOKEN = '\?'; + const NAMED_TOKEN = '(? integer pair (indexed from zero) for a positional statement + * and a string => int[] pair for a named statement. + * + * @param string $statement + * @param boolean $isPositional + * + * @return array + */ + static public function getPlaceholderPositions($statement, $isPositional = true) + { + $match = ($isPositional) ? '?' : ':'; + if (strpos($statement, $match) === false) { + return array(); + } + + $token = ($isPositional) ? self::POSITIONAL_TOKEN : self::NAMED_TOKEN; + $paramMap = array(); + + foreach (self::getUnquotedStatementFragments($statement) as $fragment) { + preg_match_all("/$token/", $fragment[0], $matches, PREG_OFFSET_CAPTURE); + foreach ($matches[0] as $placeholder) { + if ($isPositional) { + $paramMap[] = $placeholder[1] + $fragment[1]; + } else { + $pos = $placeholder[1] + $fragment[1]; + $paramMap[$pos] = substr($placeholder[0], 1, strlen($placeholder[0])); + } + } + } + + return $paramMap; + } + + /** + * For a positional query this method can rewrite the sql statement with regard to array parameters. + * + * @param string $query The SQL query to execute. + * @param array $params The parameters to bind to the query. + * @param array $types The types the previous parameters are in. + * + * @return array + * + * @throws SQLParserUtilsException + */ + static public function expandListParameters($query, $params, $types) + { + $isPositional = is_int(key($params)); + $arrayPositions = array(); + $bindIndex = -1; + + if ($isPositional) { + ksort($params); + ksort($types); + } + + foreach ($types as $name => $type) { + ++$bindIndex; + + if ($type !== Connection::PARAM_INT_ARRAY && $type !== Connection::PARAM_STR_ARRAY) { + continue; + } + + if ($isPositional) { + $name = $bindIndex; + } + + $arrayPositions[$name] = false; + } + + if (( ! $arrayPositions && $isPositional)) { + return array($query, $params, $types); + } + + $paramPos = self::getPlaceholderPositions($query, $isPositional); + + if ($isPositional) { + $paramOffset = 0; + $queryOffset = 0; + $params = array_values($params); + $types = array_values($types); + + foreach ($paramPos as $needle => $needlePos) { + if ( ! isset($arrayPositions[$needle])) { + continue; + } + + $needle += $paramOffset; + $needlePos += $queryOffset; + $count = count($params[$needle]); + + $params = array_merge( + array_slice($params, 0, $needle), + $params[$needle], + array_slice($params, $needle + 1) + ); + + $types = array_merge( + array_slice($types, 0, $needle), + $count ? + array_fill(0, $count, $types[$needle] - Connection::ARRAY_PARAM_OFFSET) : // array needles are at PDO::PARAM_* + 100 + array(), + array_slice($types, $needle + 1) + ); + + $expandStr = $count ? implode(", ", array_fill(0, $count, "?")) : 'NULL'; + $query = substr($query, 0, $needlePos) . $expandStr . substr($query, $needlePos + 1); + + $paramOffset += ($count - 1); // Grows larger by number of parameters minus the replaced needle. + $queryOffset += (strlen($expandStr) - 1); + } + + return array($query, $params, $types); + } + + $queryOffset = 0; + $typesOrd = array(); + $paramsOrd = array(); + + foreach ($paramPos as $pos => $paramName) { + $paramLen = strlen($paramName) + 1; + $value = static::extractParam($paramName, $params, true); + + if ( ! isset($arrayPositions[$paramName]) && ! isset($arrayPositions[':' . $paramName])) { + $pos += $queryOffset; + $queryOffset -= ($paramLen - 1); + $paramsOrd[] = $value; + $typesOrd[] = static::extractParam($paramName, $types, false, \PDO::PARAM_STR); + $query = substr($query, 0, $pos) . '?' . substr($query, ($pos + $paramLen)); + + continue; + } + + $count = count($value); + $expandStr = $count > 0 ? implode(', ', array_fill(0, $count, '?')) : 'NULL'; + + foreach ($value as $val) { + $paramsOrd[] = $val; + $typesOrd[] = static::extractParam($paramName, $types, false) - Connection::ARRAY_PARAM_OFFSET; + } + + $pos += $queryOffset; + $queryOffset += (strlen($expandStr) - $paramLen); + $query = substr($query, 0, $pos) . $expandStr . substr($query, ($pos + $paramLen)); + } + + return array($query, $paramsOrd, $typesOrd); + } + + /** + * Slice the SQL statement around pairs of quotes and + * return string fragments of SQL outside of quoted literals. + * Each fragment is captured as a 2-element array: + * + * 0 => matched fragment string, + * 1 => offset of fragment in $statement + * + * @param string $statement + * @return array + */ + static private function getUnquotedStatementFragments($statement) + { + $literal = self::ESCAPED_SINGLE_QUOTED_TEXT . '|' . + self::ESCAPED_DOUBLE_QUOTED_TEXT . '|' . + self::ESCAPED_BACKTICK_QUOTED_TEXT . '|' . + self::ESCAPED_BRACKET_QUOTED_TEXT; + preg_match_all("/([^'\"`\[]+)(?:$literal)?/s", $statement, $fragments, PREG_OFFSET_CAPTURE); + + return $fragments[1]; + } + + /** + * @param string $paramName The name of the parameter (without a colon in front) + * @param array $paramsOrTypes A hash of parameters or types + * @param bool $isParam + * @param mixed $defaultValue An optional default value. If omitted, an exception is thrown + * + * @throws SQLParserUtilsException + * @return mixed + */ + static private function extractParam($paramName, $paramsOrTypes, $isParam, $defaultValue = null) + { + if (array_key_exists($paramName, $paramsOrTypes)) { + return $paramsOrTypes[$paramName]; + } + + // Hash keys can be prefixed with a colon for compatibility + if (array_key_exists(':' . $paramName, $paramsOrTypes)) { + return $paramsOrTypes[':' . $paramName]; + } + + if (null !== $defaultValue) { + return $defaultValue; + } + + if ($isParam) { + throw SQLParserUtilsException::missingParam($paramName); + } + + throw SQLParserUtilsException::missingType($paramName); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtilsException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtilsException.php new file mode 100644 index 0000000000000000000000000000000000000000..25c7209c7bee446f3d5b9633deb6f3cc43fbc724 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtilsException.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\DBAL; + +/** + * Doctrine\DBAL\ConnectionException + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.org + * @since 2.4 + * @author Lars Strojny + */ +class SQLParserUtilsException extends DBALException +{ + /** + * @param string $paramName + * + * @return \Doctrine\DBAL\SQLParserUtilsException + */ + public static function missingParam($paramName) + { + return new self(sprintf('Value for :%1$s not found in params array. Params array key should be "%1$s"', $paramName)); + } + + /** + * @param string $typeName + * + * @return \Doctrine\DBAL\SQLParserUtilsException + */ + public static function missingType($typeName) + { + return new self(sprintf('Value for :%1$s not found in types array. Types array key should be "%1$s"', $typeName)); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractAsset.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..051dce92c4f72f354c52ea318eb78e811bfa01af --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractAsset.php @@ -0,0 +1,227 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * The abstract asset allows to reset the name of all assets without publishing this to the public userland. + * + * This encapsulation hack is necessary to keep a consistent state of the database schema. Say we have a list of tables + * array($tableName => Table($tableName)); if you want to rename the table, you have to make sure + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +abstract class AbstractAsset +{ + /** + * @var string + */ + protected $_name; + + /** + * Namespace of the asset. If none isset the default namespace is assumed. + * + * @var string|null + */ + protected $_namespace = null; + + /** + * @var boolean + */ + protected $_quoted = false; + + /** + * Sets the name of this asset. + * + * @param string $name + * + * @return void + */ + protected function _setName($name) + { + if ($this->isIdentifierQuoted($name)) { + $this->_quoted = true; + $name = $this->trimQuotes($name); + } + if (strpos($name, ".") !== false) { + $parts = explode(".", $name); + $this->_namespace = $parts[0]; + $name = $parts[1]; + } + $this->_name = $name; + } + + /** + * Is this asset in the default namespace? + * + * @param string $defaultNamespaceName + * + * @return boolean + */ + public function isInDefaultNamespace($defaultNamespaceName) + { + return $this->_namespace == $defaultNamespaceName || $this->_namespace === null; + } + + /** + * Gets the namespace name of this asset. + * + * If NULL is returned this means the default namespace is used. + * + * @return string|null + */ + public function getNamespaceName() + { + return $this->_namespace; + } + + /** + * The shortest name is stripped of the default namespace. All other + * namespaced elements are returned as full-qualified names. + * + * @param string $defaultNamespaceName + * + * @return string + */ + public function getShortestName($defaultNamespaceName) + { + $shortestName = $this->getName(); + if ($this->_namespace == $defaultNamespaceName) { + $shortestName = $this->_name; + } + + return strtolower($shortestName); + } + + /** + * The normalized name is full-qualified and lowerspaced. Lowerspacing is + * actually wrong, but we have to do it to keep our sanity. If you are + * using database objects that only differentiate in the casing (FOO vs + * Foo) then you will NOT be able to use Doctrine Schema abstraction. + * + * Every non-namespaced element is prefixed with the default namespace + * name which is passed as argument to this method. + * + * @param string $defaultNamespaceName + * + * @return string + */ + public function getFullQualifiedName($defaultNamespaceName) + { + $name = $this->getName(); + if ( ! $this->_namespace) { + $name = $defaultNamespaceName . "." . $name; + } + + return strtolower($name); + } + + /** + * Checks if this asset's name is quoted. + * + * @return boolean + */ + public function isQuoted() + { + return $this->_quoted; + } + + /** + * Checks if this identifier is quoted. + * + * @param string $identifier + * + * @return boolean + */ + protected function isIdentifierQuoted($identifier) + { + return (isset($identifier[0]) && ($identifier[0] == '`' || $identifier[0] == '"' || $identifier[0] == '[')); + } + + /** + * Trim quotes from the identifier. + * + * @param string $identifier + * + * @return string + */ + protected function trimQuotes($identifier) + { + return str_replace(array('`', '"', '[', ']'), '', $identifier); + } + + /** + * Returns the name of this schema asset. + * + * @return string + */ + public function getName() + { + if ($this->_namespace) { + return $this->_namespace . "." . $this->_name; + } + + return $this->_name; + } + + /** + * Gets the quoted representation of this asset but only if it was defined with one. Otherwise + * return the plain unquoted value as inserted. + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return string + */ + public function getQuotedName(AbstractPlatform $platform) + { + $keywords = $platform->getReservedKeywordsList(); + $parts = explode(".", $this->getName()); + foreach ($parts as $k => $v) { + $parts[$k] = ($this->_quoted || $keywords->isKeyword($v)) ? $platform->quoteIdentifier($v) : $v; + } + + return implode(".", $parts); + } + + /** + * Generates an identifier from a list of column names obeying a certain string length. + * + * This is especially important for Oracle, since it does not allow identifiers larger than 30 chars, + * however building idents automatically for foreign keys, composite keys or such can easily create + * very long names. + * + * @param array $columnNames + * @param string $prefix + * @param integer $maxSize + * + * @return string + */ + protected function _generateIdentifierName($columnNames, $prefix='', $maxSize=30) + { + $hash = implode("", array_map(function ($column) { + return dechex(crc32($column)); + }, $columnNames)); + + return substr(strtoupper($prefix . "_" . $hash), 0, $maxSize); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php new file mode 100644 index 0000000000000000000000000000000000000000..19dfa9369b4c907e0dddd4d65d58e5a2a08546e5 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php @@ -0,0 +1,1113 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Events; +use Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs; +use Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs; +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Base class for schema managers. Schema managers are used to inspect and/or + * modify the database schema/structure. + * + * @author Konsta Vesterinen + * @author Lukas Smith (PEAR MDB2 library) + * @author Roman Borschel + * @author Jonathan H. Wage + * @author Benjamin Eberlei + * @since 2.0 + */ +abstract class AbstractSchemaManager +{ + /** + * Holds instance of the Doctrine connection for this schema manager. + * + * @var \Doctrine\DBAL\Connection + */ + protected $_conn; + + /** + * Holds instance of the database platform used for this schema manager. + * + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + protected $_platform; + + /** + * Constructor. Accepts the Connection instance to manage the schema for. + * + * @param \Doctrine\DBAL\Connection $conn + * @param \Doctrine\DBAL\Platforms\AbstractPlatform|null $platform + */ + public function __construct(\Doctrine\DBAL\Connection $conn, AbstractPlatform $platform = null) + { + $this->_conn = $conn; + $this->_platform = $platform ?: $this->_conn->getDatabasePlatform(); + } + + /** + * Returns the associated platform. + * + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getDatabasePlatform() + { + return $this->_platform; + } + + /** + * Tries any method on the schema manager. Normally a method throws an + * exception when your DBMS doesn't support it or if an error occurs. + * This method allows you to try and method on your SchemaManager + * instance and will return false if it does not work or is not supported. + * + * + * $result = $sm->tryMethod('dropView', 'view_name'); + * + * + * @return mixed + */ + public function tryMethod() + { + $args = func_get_args(); + $method = $args[0]; + unset($args[0]); + $args = array_values($args); + + try { + return call_user_func_array(array($this, $method), $args); + } catch (\Exception $e) { + return false; + } + } + + /** + * Lists the available databases for this connection. + * + * @return array + */ + public function listDatabases() + { + $sql = $this->_platform->getListDatabasesSQL(); + + $databases = $this->_conn->fetchAll($sql); + + return $this->_getPortableDatabasesList($databases); + } + + /** + * Returns a list of all namespaces in the current database. + * + * @return array + */ + public function listNamespaceNames() + { + $sql = $this->_platform->getListNamespacesSQL(); + + $namespaces = $this->_conn->fetchAll($sql); + + return $this->getPortableNamespacesList($namespaces); + } + + /** + * Lists the available sequences for this connection. + * + * @param string|null $database + * + * @return \Doctrine\DBAL\Schema\Sequence[] + */ + public function listSequences($database = null) + { + if (is_null($database)) { + $database = $this->_conn->getDatabase(); + } + $sql = $this->_platform->getListSequencesSQL($database); + + $sequences = $this->_conn->fetchAll($sql); + + return $this->filterAssetNames($this->_getPortableSequencesList($sequences)); + } + + /** + * Lists the columns for a given table. + * + * In contrast to other libraries and to the old version of Doctrine, + * this column definition does try to contain the 'primary' field for + * the reason that it is not portable accross different RDBMS. Use + * {@see listTableIndexes($tableName)} to retrieve the primary key + * of a table. We're a RDBMS specifies more details these are held + * in the platformDetails array. + * + * @param string $table The name of the table. + * @param string|null $database + * + * @return \Doctrine\DBAL\Schema\Column[] + */ + public function listTableColumns($table, $database = null) + { + if ( ! $database) { + $database = $this->_conn->getDatabase(); + } + + $sql = $this->_platform->getListTableColumnsSQL($table, $database); + + $tableColumns = $this->_conn->fetchAll($sql); + + return $this->_getPortableTableColumnList($table, $database, $tableColumns); + } + + /** + * Lists the indexes for a given table returning an array of Index instances. + * + * Keys of the portable indexes list are all lower-cased. + * + * @param string $table The name of the table. + * + * @return \Doctrine\DBAL\Schema\Index[] + */ + public function listTableIndexes($table) + { + $sql = $this->_platform->getListTableIndexesSQL($table, $this->_conn->getDatabase()); + + $tableIndexes = $this->_conn->fetchAll($sql); + + return $this->_getPortableTableIndexesList($tableIndexes, $table); + } + + /** + * Returns true if all the given tables exist. + * + * @param array $tableNames + * + * @return boolean + */ + public function tablesExist($tableNames) + { + $tableNames = array_map('strtolower', (array) $tableNames); + + return count($tableNames) == count(\array_intersect($tableNames, array_map('strtolower', $this->listTableNames()))); + } + + /** + * Returns a list of all tables in the current database. + * + * @return array + */ + public function listTableNames() + { + $sql = $this->_platform->getListTablesSQL(); + + $tables = $this->_conn->fetchAll($sql); + $tableNames = $this->_getPortableTablesList($tables); + + return $this->filterAssetNames($tableNames); + } + + /** + * Filters asset names if they are configured to return only a subset of all + * the found elements. + * + * @param array $assetNames + * + * @return array + */ + protected function filterAssetNames($assetNames) + { + $filterExpr = $this->getFilterSchemaAssetsExpression(); + if ( ! $filterExpr) { + return $assetNames; + } + + return array_values( + array_filter($assetNames, function ($assetName) use ($filterExpr) { + $assetName = ($assetName instanceof AbstractAsset) ? $assetName->getName() : $assetName; + + return preg_match($filterExpr, $assetName); + }) + ); + } + + /** + * @return string|null + */ + protected function getFilterSchemaAssetsExpression() + { + return $this->_conn->getConfiguration()->getFilterSchemaAssetsExpression(); + } + + /** + * Lists the tables for this connection. + * + * @return \Doctrine\DBAL\Schema\Table[] + */ + public function listTables() + { + $tableNames = $this->listTableNames(); + + $tables = array(); + foreach ($tableNames as $tableName) { + $tables[] = $this->listTableDetails($tableName); + } + + return $tables; + } + + /** + * @param string $tableName + * + * @return \Doctrine\DBAL\Schema\Table + */ + public function listTableDetails($tableName) + { + $columns = $this->listTableColumns($tableName); + $foreignKeys = array(); + if ($this->_platform->supportsForeignKeyConstraints()) { + $foreignKeys = $this->listTableForeignKeys($tableName); + } + $indexes = $this->listTableIndexes($tableName); + + return new Table($tableName, $columns, $indexes, $foreignKeys, false, array()); + } + + /** + * Lists the views this connection has. + * + * @return \Doctrine\DBAL\Schema\View[] + */ + public function listViews() + { + $database = $this->_conn->getDatabase(); + $sql = $this->_platform->getListViewsSQL($database); + $views = $this->_conn->fetchAll($sql); + + return $this->_getPortableViewsList($views); + } + + /** + * Lists the foreign keys for the given table. + * + * @param string $table The name of the table. + * @param string|null $database + * + * @return \Doctrine\DBAL\Schema\ForeignKeyConstraint[] + */ + public function listTableForeignKeys($table, $database = null) + { + if (is_null($database)) { + $database = $this->_conn->getDatabase(); + } + $sql = $this->_platform->getListTableForeignKeysSQL($table, $database); + $tableForeignKeys = $this->_conn->fetchAll($sql); + + return $this->_getPortableTableForeignKeysList($tableForeignKeys); + } + + /* drop*() Methods */ + + /** + * Drops a database. + * + * NOTE: You can not drop the database this SchemaManager is currently connected to. + * + * @param string $database The name of the database to drop. + * + * @return void + */ + public function dropDatabase($database) + { + $this->_execSql($this->_platform->getDropDatabaseSQL($database)); + } + + /** + * Drops the given table. + * + * @param string $tableName The name of the table to drop. + * + * @return void + */ + public function dropTable($tableName) + { + $this->_execSql($this->_platform->getDropTableSQL($tableName)); + } + + /** + * Drops the index from the given table. + * + * @param \Doctrine\DBAL\Schema\Index|string $index The name of the index. + * @param \Doctrine\DBAL\Schema\Table|string $table The name of the table. + * + * @return void + */ + public function dropIndex($index, $table) + { + if ($index instanceof Index) { + $index = $index->getQuotedName($this->_platform); + } + + $this->_execSql($this->_platform->getDropIndexSQL($index, $table)); + } + + /** + * Drops the constraint from the given table. + * + * @param \Doctrine\DBAL\Schema\Constraint $constraint + * @param \Doctrine\DBAL\Schema\Table|string $table The name of the table. + * + * @return void + */ + public function dropConstraint(Constraint $constraint, $table) + { + $this->_execSql($this->_platform->getDropConstraintSQL($constraint, $table)); + } + + /** + * Drops a foreign key from a table. + * + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint|string $foreignKey The name of the foreign key. + * @param \Doctrine\DBAL\Schema\Table|string $table The name of the table with the foreign key. + * + * @return void + */ + public function dropForeignKey($foreignKey, $table) + { + $this->_execSql($this->_platform->getDropForeignKeySQL($foreignKey, $table)); + } + + /** + * Drops a sequence with a given name. + * + * @param string $name The name of the sequence to drop. + * + * @return void + */ + public function dropSequence($name) + { + $this->_execSql($this->_platform->getDropSequenceSQL($name)); + } + + /** + * Drops a view. + * + * @param string $name The name of the view. + * + * @return void + */ + public function dropView($name) + { + $this->_execSql($this->_platform->getDropViewSQL($name)); + } + + /* create*() Methods */ + + /** + * Creates a new database. + * + * @param string $database The name of the database to create. + * + * @return void + */ + public function createDatabase($database) + { + $this->_execSql($this->_platform->getCreateDatabaseSQL($database)); + } + + /** + * Creates a new table. + * + * @param \Doctrine\DBAL\Schema\Table $table + * + * @return void + */ + public function createTable(Table $table) + { + $createFlags = AbstractPlatform::CREATE_INDEXES|AbstractPlatform::CREATE_FOREIGNKEYS; + $this->_execSql($this->_platform->getCreateTableSQL($table, $createFlags)); + } + + /** + * Creates a new sequence. + * + * @param \Doctrine\DBAL\Schema\Sequence $sequence + * + * @return void + * + * @throws \Doctrine\DBAL\ConnectionException If something fails at database level. + */ + public function createSequence($sequence) + { + $this->_execSql($this->_platform->getCreateSequenceSQL($sequence)); + } + + /** + * Creates a constraint on a table. + * + * @param \Doctrine\DBAL\Schema\Constraint $constraint + * @param \Doctrine\DBAL\Schema\Table|string $table + * + * @return void + */ + public function createConstraint(Constraint $constraint, $table) + { + $this->_execSql($this->_platform->getCreateConstraintSQL($constraint, $table)); + } + + /** + * Creates a new index on a table. + * + * @param \Doctrine\DBAL\Schema\Index $index + * @param \Doctrine\DBAL\Schema\Table|string $table The name of the table on which the index is to be created. + * + * @return void + */ + public function createIndex(Index $index, $table) + { + $this->_execSql($this->_platform->getCreateIndexSQL($index, $table)); + } + + /** + * Creates a new foreign key. + * + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey The ForeignKey instance. + * @param \Doctrine\DBAL\Schema\Table|string $table The name of the table on which the foreign key is to be created. + * + * @return void + */ + public function createForeignKey(ForeignKeyConstraint $foreignKey, $table) + { + $this->_execSql($this->_platform->getCreateForeignKeySQL($foreignKey, $table)); + } + + /** + * Creates a new view. + * + * @param \Doctrine\DBAL\Schema\View $view + * + * @return void + */ + public function createView(View $view) + { + $this->_execSql($this->_platform->getCreateViewSQL($view->getQuotedName($this->_platform), $view->getSql())); + } + + /* dropAndCreate*() Methods */ + + /** + * Drops and creates a constraint. + * + * @see dropConstraint() + * @see createConstraint() + * + * @param \Doctrine\DBAL\Schema\Constraint $constraint + * @param \Doctrine\DBAL\Schema\Table|string $table + * + * @return void + */ + public function dropAndCreateConstraint(Constraint $constraint, $table) + { + $this->tryMethod('dropConstraint', $constraint, $table); + $this->createConstraint($constraint, $table); + } + + /** + * Drops and creates a new index on a table. + * + * @param \Doctrine\DBAL\Schema\Index $index + * @param \Doctrine\DBAL\Schema\Table|string $table The name of the table on which the index is to be created. + * + * @return void + */ + public function dropAndCreateIndex(Index $index, $table) + { + $this->tryMethod('dropIndex', $index->getQuotedName($this->_platform), $table); + $this->createIndex($index, $table); + } + + /** + * Drops and creates a new foreign key. + * + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey An associative array that defines properties of the foreign key to be created. + * @param \Doctrine\DBAL\Schema\Table|string $table The name of the table on which the foreign key is to be created. + * + * @return void + */ + public function dropAndCreateForeignKey(ForeignKeyConstraint $foreignKey, $table) + { + $this->tryMethod('dropForeignKey', $foreignKey, $table); + $this->createForeignKey($foreignKey, $table); + } + + /** + * Drops and create a new sequence. + * + * @param \Doctrine\DBAL\Schema\Sequence $sequence + * + * @return void + * + * @throws \Doctrine\DBAL\ConnectionException If something fails at database level. + */ + public function dropAndCreateSequence(Sequence $sequence) + { + $this->tryMethod('dropSequence', $sequence->getQuotedName($this->_platform)); + $this->createSequence($sequence); + } + + /** + * Drops and creates a new table. + * + * @param \Doctrine\DBAL\Schema\Table $table + * + * @return void + */ + public function dropAndCreateTable(Table $table) + { + $this->tryMethod('dropTable', $table->getQuotedName($this->_platform)); + $this->createTable($table); + } + + /** + * Drops and creates a new database. + * + * @param string $database The name of the database to create. + * + * @return void + */ + public function dropAndCreateDatabase($database) + { + $this->tryMethod('dropDatabase', $database); + $this->createDatabase($database); + } + + /** + * Drops and creates a new view. + * + * @param \Doctrine\DBAL\Schema\View $view + * + * @return void + */ + public function dropAndCreateView(View $view) + { + $this->tryMethod('dropView', $view->getQuotedName($this->_platform)); + $this->createView($view); + } + + /* alterTable() Methods */ + + /** + * Alters an existing tables schema. + * + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + * + * @return void + */ + public function alterTable(TableDiff $tableDiff) + { + $queries = $this->_platform->getAlterTableSQL($tableDiff); + if (is_array($queries) && count($queries)) { + foreach ($queries as $ddlQuery) { + $this->_execSql($ddlQuery); + } + } + } + + /** + * Renames a given table to another name. + * + * @param string $name The current name of the table. + * @param string $newName The new name of the table. + * + * @return void + */ + public function renameTable($name, $newName) + { + $tableDiff = new TableDiff($name); + $tableDiff->newName = $newName; + $this->alterTable($tableDiff); + } + + /** + * Methods for filtering return values of list*() methods to convert + * the native DBMS data definition to a portable Doctrine definition + */ + + /** + * @param array $databases + * + * @return array + */ + protected function _getPortableDatabasesList($databases) + { + $list = array(); + foreach ($databases as $value) { + if ($value = $this->_getPortableDatabaseDefinition($value)) { + $list[] = $value; + } + } + + return $list; + } + + /** + * Converts a list of namespace names from the native DBMS data definition to a portable Doctrine definition. + * + * @param array $namespaces The list of namespace names in the native DBMS data definition. + * + * @return array + */ + protected function getPortableNamespacesList(array $namespaces) + { + $namespacesList = array(); + + foreach ($namespaces as $namespace) { + $namespacesList[] = $this->getPortableNamespaceDefinition($namespace); + } + + return $namespacesList; + } + + /** + * @param array $database + * + * @return mixed + */ + protected function _getPortableDatabaseDefinition($database) + { + return $database; + } + + /** + * Converts a namespace definition from the native DBMS data definition to a portable Doctrine definition. + * + * @param array $namespace The native DBMS namespace definition. + * + * @return mixed + */ + protected function getPortableNamespaceDefinition(array $namespace) + { + return $namespace; + } + + /** + * @param array $functions + * + * @return array + */ + protected function _getPortableFunctionsList($functions) + { + $list = array(); + foreach ($functions as $value) { + if ($value = $this->_getPortableFunctionDefinition($value)) { + $list[] = $value; + } + } + + return $list; + } + + /** + * @param array $function + * + * @return mixed + */ + protected function _getPortableFunctionDefinition($function) + { + return $function; + } + + /** + * @param array $triggers + * + * @return array + */ + protected function _getPortableTriggersList($triggers) + { + $list = array(); + foreach ($triggers as $value) { + if ($value = $this->_getPortableTriggerDefinition($value)) { + $list[] = $value; + } + } + + return $list; + } + + /** + * @param array $trigger + * + * @return mixed + */ + protected function _getPortableTriggerDefinition($trigger) + { + return $trigger; + } + + /** + * @param array $sequences + * + * @return array + */ + protected function _getPortableSequencesList($sequences) + { + $list = array(); + foreach ($sequences as $value) { + if ($value = $this->_getPortableSequenceDefinition($value)) { + $list[] = $value; + } + } + + return $list; + } + + /** + * @param array $sequence + * + * @return \Doctrine\DBAL\Schema\Sequence + * + * @throws \Doctrine\DBAL\DBALException + */ + protected function _getPortableSequenceDefinition($sequence) + { + throw DBALException::notSupported('Sequences'); + } + + /** + * Independent of the database the keys of the column list result are lowercased. + * + * The name of the created column instance however is kept in its case. + * + * @param string $table The name of the table. + * @param string $database + * @param array $tableColumns + * + * @return array + */ + protected function _getPortableTableColumnList($table, $database, $tableColumns) + { + $eventManager = $this->_platform->getEventManager(); + + $list = array(); + foreach ($tableColumns as $tableColumn) { + $column = null; + $defaultPrevented = false; + + if (null !== $eventManager && $eventManager->hasListeners(Events::onSchemaColumnDefinition)) { + $eventArgs = new SchemaColumnDefinitionEventArgs($tableColumn, $table, $database, $this->_conn); + $eventManager->dispatchEvent(Events::onSchemaColumnDefinition, $eventArgs); + + $defaultPrevented = $eventArgs->isDefaultPrevented(); + $column = $eventArgs->getColumn(); + } + + if ( ! $defaultPrevented) { + $column = $this->_getPortableTableColumnDefinition($tableColumn); + } + + if ($column) { + $name = strtolower($column->getQuotedName($this->_platform)); + $list[$name] = $column; + } + } + + return $list; + } + + /** + * Gets Table Column Definition. + * + * @param array $tableColumn + * + * @return \Doctrine\DBAL\Schema\Column + */ + abstract protected function _getPortableTableColumnDefinition($tableColumn); + + /** + * Aggregates and groups the index results according to the required data result. + * + * @param array $tableIndexRows + * @param string|null $tableName + * + * @return array + */ + protected function _getPortableTableIndexesList($tableIndexRows, $tableName=null) + { + $result = array(); + foreach ($tableIndexRows as $tableIndex) { + $indexName = $keyName = $tableIndex['key_name']; + if ($tableIndex['primary']) { + $keyName = 'primary'; + } + $keyName = strtolower($keyName); + + if (!isset($result[$keyName])) { + $result[$keyName] = array( + 'name' => $indexName, + 'columns' => array($tableIndex['column_name']), + 'unique' => $tableIndex['non_unique'] ? false : true, + 'primary' => $tableIndex['primary'], + 'flags' => isset($tableIndex['flags']) ? $tableIndex['flags'] : array(), + 'options' => isset($tableIndex['where']) ? array('where' => $tableIndex['where']) : array(), + ); + } else { + $result[$keyName]['columns'][] = $tableIndex['column_name']; + } + } + + $eventManager = $this->_platform->getEventManager(); + + $indexes = array(); + foreach ($result as $indexKey => $data) { + $index = null; + $defaultPrevented = false; + + if (null !== $eventManager && $eventManager->hasListeners(Events::onSchemaIndexDefinition)) { + $eventArgs = new SchemaIndexDefinitionEventArgs($data, $tableName, $this->_conn); + $eventManager->dispatchEvent(Events::onSchemaIndexDefinition, $eventArgs); + + $defaultPrevented = $eventArgs->isDefaultPrevented(); + $index = $eventArgs->getIndex(); + } + + if ( ! $defaultPrevented) { + $index = new Index($data['name'], $data['columns'], $data['unique'], $data['primary'], $data['flags'], $data['options']); + } + + if ($index) { + $indexes[$indexKey] = $index; + } + } + + return $indexes; + } + + /** + * @param array $tables + * + * @return array + */ + protected function _getPortableTablesList($tables) + { + $list = array(); + foreach ($tables as $value) { + if ($value = $this->_getPortableTableDefinition($value)) { + $list[] = $value; + } + } + + return $list; + } + + /** + * @param array $table + * + * @return array + */ + protected function _getPortableTableDefinition($table) + { + return $table; + } + + /** + * @param array $users + * + * @return array + */ + protected function _getPortableUsersList($users) + { + $list = array(); + foreach ($users as $value) { + if ($value = $this->_getPortableUserDefinition($value)) { + $list[] = $value; + } + } + + return $list; + } + + /** + * @param array $user + * + * @return mixed + */ + protected function _getPortableUserDefinition($user) + { + return $user; + } + + /** + * @param array $views + * + * @return array + */ + protected function _getPortableViewsList($views) + { + $list = array(); + foreach ($views as $value) { + if ($view = $this->_getPortableViewDefinition($value)) { + $viewName = strtolower($view->getQuotedName($this->_platform)); + $list[$viewName] = $view; + } + } + + return $list; + } + + /** + * @param array $view + * + * @return mixed + */ + protected function _getPortableViewDefinition($view) + { + return false; + } + + /** + * @param array $tableForeignKeys + * + * @return array + */ + protected function _getPortableTableForeignKeysList($tableForeignKeys) + { + $list = array(); + foreach ($tableForeignKeys as $value) { + if ($value = $this->_getPortableTableForeignKeyDefinition($value)) { + $list[] = $value; + } + } + + return $list; + } + + /** + * @param array $tableForeignKey + * + * @return mixed + */ + protected function _getPortableTableForeignKeyDefinition($tableForeignKey) + { + return $tableForeignKey; + } + + /** + * @param array|string $sql + * + * @return void + */ + protected function _execSql($sql) + { + foreach ((array) $sql as $query) { + $this->_conn->executeUpdate($query); + } + } + + /** + * Creates a schema instance for the current database. + * + * @return \Doctrine\DBAL\Schema\Schema + */ + public function createSchema() + { + $namespaces = array(); + + if ($this->_platform->supportsSchemas()) { + $namespaces = $this->listNamespaceNames(); + } + + $sequences = array(); + + if ($this->_platform->supportsSequences()) { + $sequences = $this->listSequences(); + } + + $tables = $this->listTables(); + + return new Schema($tables, $sequences, $this->createSchemaConfig(), $namespaces); + } + + /** + * Creates the configuration for this schema. + * + * @return \Doctrine\DBAL\Schema\SchemaConfig + */ + public function createSchemaConfig() + { + $schemaConfig = new SchemaConfig(); + $schemaConfig->setMaxIdentifierLength($this->_platform->getMaxIdentifierLength()); + + $searchPaths = $this->getSchemaSearchPaths(); + if (isset($searchPaths[0])) { + $schemaConfig->setName($searchPaths[0]); + } + + $params = $this->_conn->getParams(); + if (isset($params['defaultTableOptions'])) { + $schemaConfig->setDefaultTableOptions($params['defaultTableOptions']); + } + + return $schemaConfig; + } + + /** + * The search path for namespaces in the currently connected database. + * + * The first entry is usually the default namespace in the Schema. All + * further namespaces contain tables/sequences which can also be addressed + * with a short, not full-qualified name. + * + * For databases that don't support subschema/namespaces this method + * returns the name of the currently connected database. + * + * @return array + */ + public function getSchemaSearchPaths() + { + return array($this->_conn->getDatabase()); + } + + /** + * Given a table comment this method tries to extract a typehint for Doctrine Type, or returns + * the type given as default. + * + * @param string $comment + * @param string $currentType + * + * @return string + */ + public function extractDoctrineTypeFromComment($comment, $currentType) + { + if (preg_match("(\(DC2Type:([a-zA-Z0-9_]+)\))", $comment, $match)) { + $currentType = $match[1]; + } + + return $currentType; + } + + /** + * @param string $comment + * @param string $type + * + * @return string + */ + public function removeDoctrineTypeFromComment($comment, $type) + { + return str_replace('(DC2Type:'.$type.')', '', $comment); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Column.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Column.php new file mode 100644 index 0000000000000000000000000000000000000000..192ce1d2eefccb3c7f261865092cbd960ed463fd --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Column.php @@ -0,0 +1,487 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Types\Type; + +/** + * Object representation of a database column. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class Column extends AbstractAsset +{ + /** + * @var Type + */ + protected $_type; + + /** + * @var integer|null + */ + protected $_length = null; + + /** + * @var integer + */ + protected $_precision = 10; + + /** + * @var integer + */ + protected $_scale = 0; + + /** + * @var boolean + */ + protected $_unsigned = false; + + /** + * @var boolean + */ + protected $_fixed = false; + + /** + * @var boolean + */ + protected $_notnull = true; + + /** + * @var string|null + */ + protected $_default = null; + + /** + * @var boolean + */ + protected $_autoincrement = false; + + /** + * @var array + */ + protected $_platformOptions = array(); + + /** + * @var string|null + */ + protected $_columnDefinition = null; + + /** + * @var string|null + */ + protected $_comment = null; + + /** + * @var array + */ + protected $_customSchemaOptions = array(); + + /** + * Creates a new Column. + * + * @param string $columnName + * @param Type $type + * @param array $options + */ + public function __construct($columnName, Type $type, array $options=array()) + { + $this->_setName($columnName); + $this->setType($type); + $this->setOptions($options); + } + + /** + * @param array $options + * + * @return Column + */ + public function setOptions(array $options) + { + foreach ($options as $name => $value) { + $method = "set".$name; + if (method_exists($this, $method)) { + $this->$method($value); + } + } + + return $this; + } + + /** + * @param Type $type + * + * @return Column + */ + public function setType(Type $type) + { + $this->_type = $type; + + return $this; + } + + /** + * @param integer|null $length + * + * @return Column + */ + public function setLength($length) + { + if ($length !== null) { + $this->_length = (int) $length; + } else { + $this->_length = null; + } + + return $this; + } + + /** + * @param integer $precision + * + * @return Column + */ + public function setPrecision($precision) + { + if (!is_numeric($precision)) { + $precision = 10; // defaults to 10 when no valid precision is given. + } + + $this->_precision = (int) $precision; + + return $this; + } + + /** + * @param integer $scale + * + * @return Column + */ + public function setScale($scale) + { + if (!is_numeric($scale)) { + $scale = 0; + } + + $this->_scale = (int) $scale; + + return $this; + } + + /** + * @param boolean $unsigned + * + * @return Column + */ + public function setUnsigned($unsigned) + { + $this->_unsigned = (bool) $unsigned; + + return $this; + } + + /** + * @param boolean $fixed + * + * @return Column + */ + public function setFixed($fixed) + { + $this->_fixed = (bool) $fixed; + + return $this; + } + + /** + * @param boolean $notnull + * + * @return Column + */ + public function setNotnull($notnull) + { + $this->_notnull = (bool) $notnull; + + return $this; + } + + /** + * @param mixed $default + * + * @return Column + */ + public function setDefault($default) + { + $this->_default = $default; + + return $this; + } + + /** + * @param array $platformOptions + * + * @return Column + */ + public function setPlatformOptions(array $platformOptions) + { + $this->_platformOptions = $platformOptions; + + return $this; + } + + /** + * @param string $name + * @param mixed $value + * + * @return Column + */ + public function setPlatformOption($name, $value) + { + $this->_platformOptions[$name] = $value; + + return $this; + } + + /** + * @param string $value + * + * @return Column + */ + public function setColumnDefinition($value) + { + $this->_columnDefinition = $value; + + return $this; + } + + /** + * @return Type + */ + public function getType() + { + return $this->_type; + } + + /** + * @return integer|null + */ + public function getLength() + { + return $this->_length; + } + + /** + * @return integer + */ + public function getPrecision() + { + return $this->_precision; + } + + /** + * @return integer + */ + public function getScale() + { + return $this->_scale; + } + + /** + * @return boolean + */ + public function getUnsigned() + { + return $this->_unsigned; + } + + /** + * @return boolean + */ + public function getFixed() + { + return $this->_fixed; + } + + /** + * @return boolean + */ + public function getNotnull() + { + return $this->_notnull; + } + + /** + * @return string|null + */ + public function getDefault() + { + return $this->_default; + } + + /** + * @return array + */ + public function getPlatformOptions() + { + return $this->_platformOptions; + } + + /** + * @param string $name + * + * @return boolean + */ + public function hasPlatformOption($name) + { + return isset($this->_platformOptions[$name]); + } + + /** + * @param string $name + * + * @return mixed + */ + public function getPlatformOption($name) + { + return $this->_platformOptions[$name]; + } + + /** + * @return string|null + */ + public function getColumnDefinition() + { + return $this->_columnDefinition; + } + + /** + * @return boolean + */ + public function getAutoincrement() + { + return $this->_autoincrement; + } + + /** + * @param boolean $flag + * + * @return Column + */ + public function setAutoincrement($flag) + { + $this->_autoincrement = $flag; + + return $this; + } + + /** + * @param string $comment + * + * @return Column + */ + public function setComment($comment) + { + $this->_comment = $comment; + + return $this; + } + + /** + * @return string|null + */ + public function getComment() + { + return $this->_comment; + } + + /** + * @param string $name + * @param mixed $value + * + * @return Column + */ + public function setCustomSchemaOption($name, $value) + { + $this->_customSchemaOptions[$name] = $value; + + return $this; + } + + /** + * @param string $name + * + * @return boolean + */ + public function hasCustomSchemaOption($name) + { + return isset($this->_customSchemaOptions[$name]); + } + + /** + * @param string $name + * + * @return mixed + */ + public function getCustomSchemaOption($name) + { + return $this->_customSchemaOptions[$name]; + } + + /** + * @param array $customSchemaOptions + * + * @return Column + */ + public function setCustomSchemaOptions(array $customSchemaOptions) + { + $this->_customSchemaOptions = $customSchemaOptions; + + return $this; + } + + /** + * @return array + */ + public function getCustomSchemaOptions() + { + return $this->_customSchemaOptions; + } + + /** + * @return array + */ + public function toArray() + { + return array_merge(array( + 'name' => $this->_name, + 'type' => $this->_type, + 'default' => $this->_default, + 'notnull' => $this->_notnull, + 'length' => $this->_length, + 'precision' => $this->_precision, + 'scale' => $this->_scale, + 'fixed' => $this->_fixed, + 'unsigned' => $this->_unsigned, + 'autoincrement' => $this->_autoincrement, + 'columnDefinition' => $this->_columnDefinition, + 'comment' => $this->_comment, + ), $this->_platformOptions, $this->_customSchemaOptions); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/ColumnDiff.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/ColumnDiff.php new file mode 100644 index 0000000000000000000000000000000000000000..61d7f7319502b22410e6b90f709c81d768a65116 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/ColumnDiff.php @@ -0,0 +1,84 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +/** + * Represents the change of a column. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class ColumnDiff +{ + /** + * @var string + */ + public $oldColumnName; + + /** + * @var Column + */ + public $column; + + /** + * @var array + */ + public $changedProperties = array(); + + /** + * @var Column + */ + public $fromColumn; + + /** + * @param string $oldColumnName + * @param Column $column + * @param string[] $changedProperties + * @param Column $fromColumn + */ + public function __construct($oldColumnName, Column $column, array $changedProperties = array(), Column $fromColumn = null) + { + $this->oldColumnName = $oldColumnName; + $this->column = $column; + $this->changedProperties = $changedProperties; + $this->fromColumn = $fromColumn; + } + + /** + * @param string $propertyName + * + * @return boolean + */ + public function hasChanged($propertyName) + { + return in_array($propertyName, $this->changedProperties); + } + + /** + * @return Identifier + */ + public function getOldColumnName() + { + $quote = $this->fromColumn && $this->fromColumn->isQuoted(); + + return new Identifier($this->oldColumnName, $quote); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Comparator.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Comparator.php new file mode 100644 index 0000000000000000000000000000000000000000..abedfc06281ddebb8c0ec1552c9946d920daa212 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Comparator.php @@ -0,0 +1,519 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Types; + +/** + * Compares two Schemas and return an instance of SchemaDiff. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class Comparator +{ + /** + * @param \Doctrine\DBAL\Schema\Schema $fromSchema + * @param \Doctrine\DBAL\Schema\Schema $toSchema + * + * @return \Doctrine\DBAL\Schema\SchemaDiff + */ + static public function compareSchemas(Schema $fromSchema, Schema $toSchema) + { + $c = new self(); + + return $c->compare($fromSchema, $toSchema); + } + + /** + * Returns a SchemaDiff object containing the differences between the schemas $fromSchema and $toSchema. + * + * The returned differences are returned in such a way that they contain the + * operations to change the schema stored in $fromSchema to the schema that is + * stored in $toSchema. + * + * @param \Doctrine\DBAL\Schema\Schema $fromSchema + * @param \Doctrine\DBAL\Schema\Schema $toSchema + * + * @return \Doctrine\DBAL\Schema\SchemaDiff + */ + public function compare(Schema $fromSchema, Schema $toSchema) + { + $diff = new SchemaDiff(); + $diff->fromSchema = $fromSchema; + + $foreignKeysToTable = array(); + + foreach ($toSchema->getNamespaces() as $namespace) { + if ( ! $fromSchema->hasNamespace($namespace)) { + $diff->newNamespaces[$namespace] = $namespace; + } + } + + foreach ($fromSchema->getNamespaces() as $namespace) { + if ( ! $toSchema->hasNamespace($namespace)) { + $diff->removedNamespaces[$namespace] = $namespace; + } + } + + foreach ($toSchema->getTables() as $table) { + $tableName = $table->getShortestName($toSchema->getName()); + if ( ! $fromSchema->hasTable($tableName)) { + $diff->newTables[$tableName] = $toSchema->getTable($tableName); + } else { + $tableDifferences = $this->diffTable($fromSchema->getTable($tableName), $toSchema->getTable($tableName)); + if ($tableDifferences !== false) { + $diff->changedTables[$tableName] = $tableDifferences; + } + } + } + + /* Check if there are tables removed */ + foreach ($fromSchema->getTables() as $table) { + $tableName = $table->getShortestName($fromSchema->getName()); + + $table = $fromSchema->getTable($tableName); + if ( ! $toSchema->hasTable($tableName)) { + $diff->removedTables[$tableName] = $table; + } + + // also remember all foreign keys that point to a specific table + foreach ($table->getForeignKeys() as $foreignKey) { + $foreignTable = strtolower($foreignKey->getForeignTableName()); + if (!isset($foreignKeysToTable[$foreignTable])) { + $foreignKeysToTable[$foreignTable] = array(); + } + $foreignKeysToTable[$foreignTable][] = $foreignKey; + } + } + + foreach ($diff->removedTables as $tableName => $table) { + if (isset($foreignKeysToTable[$tableName])) { + $diff->orphanedForeignKeys = array_merge($diff->orphanedForeignKeys, $foreignKeysToTable[$tableName]); + + // deleting duplicated foreign keys present on both on the orphanedForeignKey + // and the removedForeignKeys from changedTables + foreach ($foreignKeysToTable[$tableName] as $foreignKey) { + // strtolower the table name to make if compatible with getShortestName + $localTableName = strtolower($foreignKey->getLocalTableName()); + if (isset($diff->changedTables[$localTableName])) { + foreach ($diff->changedTables[$localTableName]->removedForeignKeys as $key => $removedForeignKey) { + // We check if the key is from the removed table if not we skip. + if ($tableName !== strtolower($removedForeignKey->getForeignTableName())) { + continue; + } + unset($diff->changedTables[$localTableName]->removedForeignKeys[$key]); + } + } + } + } + } + + foreach ($toSchema->getSequences() as $sequence) { + $sequenceName = $sequence->getShortestName($toSchema->getName()); + if ( ! $fromSchema->hasSequence($sequenceName)) { + if ( ! $this->isAutoIncrementSequenceInSchema($fromSchema, $sequence)) { + $diff->newSequences[] = $sequence; + } + } else { + if ($this->diffSequence($sequence, $fromSchema->getSequence($sequenceName))) { + $diff->changedSequences[] = $toSchema->getSequence($sequenceName); + } + } + } + + foreach ($fromSchema->getSequences() as $sequence) { + if ($this->isAutoIncrementSequenceInSchema($toSchema, $sequence)) { + continue; + } + + $sequenceName = $sequence->getShortestName($fromSchema->getName()); + + if ( ! $toSchema->hasSequence($sequenceName)) { + $diff->removedSequences[] = $sequence; + } + } + + return $diff; + } + + /** + * @param \Doctrine\DBAL\Schema\Schema $schema + * @param \Doctrine\DBAL\Schema\Sequence $sequence + * + * @return boolean + */ + private function isAutoIncrementSequenceInSchema($schema, $sequence) + { + foreach ($schema->getTables() as $table) { + if ($sequence->isAutoIncrementsFor($table)) { + return true; + } + } + + return false; + } + + /** + * @param \Doctrine\DBAL\Schema\Sequence $sequence1 + * @param \Doctrine\DBAL\Schema\Sequence $sequence2 + * + * @return boolean + */ + public function diffSequence(Sequence $sequence1, Sequence $sequence2) + { + if ($sequence1->getAllocationSize() != $sequence2->getAllocationSize()) { + return true; + } + + if ($sequence1->getInitialValue() != $sequence2->getInitialValue()) { + return true; + } + + return false; + } + + /** + * Returns the difference between the tables $table1 and $table2. + * + * If there are no differences this method returns the boolean false. + * + * @param \Doctrine\DBAL\Schema\Table $table1 + * @param \Doctrine\DBAL\Schema\Table $table2 + * + * @return boolean|\Doctrine\DBAL\Schema\TableDiff + */ + public function diffTable(Table $table1, Table $table2) + { + $changes = 0; + $tableDifferences = new TableDiff($table1->getName()); + $tableDifferences->fromTable = $table1; + + $table1Columns = $table1->getColumns(); + $table2Columns = $table2->getColumns(); + + /* See if all the fields in table 1 exist in table 2 */ + foreach ($table2Columns as $columnName => $column) { + if ( !$table1->hasColumn($columnName)) { + $tableDifferences->addedColumns[$columnName] = $column; + $changes++; + } + } + /* See if there are any removed fields in table 2 */ + foreach ($table1Columns as $columnName => $column) { + // See if column is removed in table 2. + if ( ! $table2->hasColumn($columnName)) { + $tableDifferences->removedColumns[$columnName] = $column; + $changes++; + continue; + } + + // See if column has changed properties in table 2. + $changedProperties = $this->diffColumn($column, $table2->getColumn($columnName)); + + if ( ! empty($changedProperties)) { + $columnDiff = new ColumnDiff($column->getName(), $table2->getColumn($columnName), $changedProperties); + $columnDiff->fromColumn = $column; + $tableDifferences->changedColumns[$column->getName()] = $columnDiff; + $changes++; + } + } + + $this->detectColumnRenamings($tableDifferences); + + $table1Indexes = $table1->getIndexes(); + $table2Indexes = $table2->getIndexes(); + + /* See if all the indexes in table 1 exist in table 2 */ + foreach ($table2Indexes as $indexName => $index) { + if (($index->isPrimary() && $table1->hasPrimaryKey()) || $table1->hasIndex($indexName)) { + continue; + } + + $tableDifferences->addedIndexes[$indexName] = $index; + $changes++; + } + /* See if there are any removed indexes in table 2 */ + foreach ($table1Indexes as $indexName => $index) { + // See if index is removed in table 2. + if (($index->isPrimary() && ! $table2->hasPrimaryKey()) || + ! $index->isPrimary() && ! $table2->hasIndex($indexName) + ) { + $tableDifferences->removedIndexes[$indexName] = $index; + $changes++; + continue; + } + + // See if index has changed in table 2. + $table2Index = $index->isPrimary() ? $table2->getPrimaryKey() : $table2->getIndex($indexName); + + if ($this->diffIndex($index, $table2Index)) { + $tableDifferences->changedIndexes[$indexName] = $table2Index; + $changes++; + } + } + + $this->detectIndexRenamings($tableDifferences); + + $fromFkeys = $table1->getForeignKeys(); + $toFkeys = $table2->getForeignKeys(); + + foreach ($fromFkeys as $key1 => $constraint1) { + foreach ($toFkeys as $key2 => $constraint2) { + if ($this->diffForeignKey($constraint1, $constraint2) === false) { + unset($fromFkeys[$key1]); + unset($toFkeys[$key2]); + } else { + if (strtolower($constraint1->getName()) == strtolower($constraint2->getName())) { + $tableDifferences->changedForeignKeys[] = $constraint2; + $changes++; + unset($fromFkeys[$key1]); + unset($toFkeys[$key2]); + } + } + } + } + + foreach ($fromFkeys as $constraint1) { + $tableDifferences->removedForeignKeys[] = $constraint1; + $changes++; + } + + foreach ($toFkeys as $constraint2) { + $tableDifferences->addedForeignKeys[] = $constraint2; + $changes++; + } + + return $changes ? $tableDifferences : false; + } + + /** + * Try to find columns that only changed their name, rename operations maybe cheaper than add/drop + * however ambiguities between different possibilities should not lead to renaming at all. + * + * @param \Doctrine\DBAL\Schema\TableDiff $tableDifferences + * + * @return void + */ + private function detectColumnRenamings(TableDiff $tableDifferences) + { + $renameCandidates = array(); + foreach ($tableDifferences->addedColumns as $addedColumnName => $addedColumn) { + foreach ($tableDifferences->removedColumns as $removedColumn) { + if (count($this->diffColumn($addedColumn, $removedColumn)) == 0) { + $renameCandidates[$addedColumn->getName()][] = array($removedColumn, $addedColumn, $addedColumnName); + } + } + } + + foreach ($renameCandidates as $candidateColumns) { + if (count($candidateColumns) == 1) { + list($removedColumn, $addedColumn) = $candidateColumns[0]; + $removedColumnName = strtolower($removedColumn->getName()); + $addedColumnName = strtolower($addedColumn->getName()); + + if ( ! isset($tableDifferences->renamedColumns[$removedColumnName])) { + $tableDifferences->renamedColumns[$removedColumnName] = $addedColumn; + unset($tableDifferences->addedColumns[$addedColumnName]); + unset($tableDifferences->removedColumns[$removedColumnName]); + } + } + } + } + + /** + * Try to find indexes that only changed their name, rename operations maybe cheaper than add/drop + * however ambiguities between different possibilities should not lead to renaming at all. + * + * @param \Doctrine\DBAL\Schema\TableDiff $tableDifferences + * + * @return void + */ + private function detectIndexRenamings(TableDiff $tableDifferences) + { + $renameCandidates = array(); + + // Gather possible rename candidates by comparing each added and removed index based on semantics. + foreach ($tableDifferences->addedIndexes as $addedIndexName => $addedIndex) { + foreach ($tableDifferences->removedIndexes as $removedIndex) { + if (! $this->diffIndex($addedIndex, $removedIndex)) { + $renameCandidates[$addedIndex->getName()][] = array($removedIndex, $addedIndex, $addedIndexName); + } + } + } + + foreach ($renameCandidates as $candidateIndexes) { + // If the current rename candidate contains exactly one semantically equal index, + // we can safely rename it. + // Otherwise it is unclear if a rename action is really intended, + // therefore we let those ambiguous indexes be added/dropped. + if (count($candidateIndexes) === 1) { + list($removedIndex, $addedIndex) = $candidateIndexes[0]; + + $removedIndexName = strtolower($removedIndex->getName()); + $addedIndexName = strtolower($addedIndex->getName()); + + if (! isset($tableDifferences->renamedIndexes[$removedIndexName])) { + $tableDifferences->renamedIndexes[$removedIndexName] = $addedIndex; + unset($tableDifferences->addedIndexes[$addedIndexName]); + unset($tableDifferences->removedIndexes[$removedIndexName]); + } + } + } + } + + /** + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $key1 + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $key2 + * + * @return boolean + */ + public function diffForeignKey(ForeignKeyConstraint $key1, ForeignKeyConstraint $key2) + { + if (array_map('strtolower', $key1->getUnquotedLocalColumns()) != array_map('strtolower', $key2->getUnquotedLocalColumns())) { + return true; + } + + if (array_map('strtolower', $key1->getUnquotedForeignColumns()) != array_map('strtolower', $key2->getUnquotedForeignColumns())) { + return true; + } + + if ($key1->getUnqualifiedForeignTableName() !== $key2->getUnqualifiedForeignTableName()) { + return true; + } + + if ($key1->onUpdate() != $key2->onUpdate()) { + return true; + } + + if ($key1->onDelete() != $key2->onDelete()) { + return true; + } + + return false; + } + + /** + * Returns the difference between the fields $field1 and $field2. + * + * If there are differences this method returns $field2, otherwise the + * boolean false. + * + * @param \Doctrine\DBAL\Schema\Column $column1 + * @param \Doctrine\DBAL\Schema\Column $column2 + * + * @return array + */ + public function diffColumn(Column $column1, Column $column2) + { + $properties1 = $column1->toArray(); + $properties2 = $column2->toArray(); + + $changedProperties = array(); + + foreach (array('type', 'notnull', 'unsigned', 'autoincrement') as $property) { + if ($properties1[$property] != $properties2[$property]) { + $changedProperties[] = $property; + } + } + + if ($properties1['default'] != $properties2['default'] || + // Null values need to be checked additionally as they tell whether to create or drop a default value. + // null != 0, null != false, null != '' etc. This affects platform's table alteration SQL generation. + (null === $properties1['default'] && null !== $properties2['default']) || + (null === $properties2['default'] && null !== $properties1['default']) + ) { + $changedProperties[] = 'default'; + } + + if (($properties1['type'] instanceof Types\StringType && ! $properties1['type'] instanceof Types\GuidType) || + $properties1['type'] instanceof Types\BinaryType + ) { + // check if value of length is set at all, default value assumed otherwise. + $length1 = $properties1['length'] ?: 255; + $length2 = $properties2['length'] ?: 255; + if ($length1 != $length2) { + $changedProperties[] = 'length'; + } + + if ($properties1['fixed'] != $properties2['fixed']) { + $changedProperties[] = 'fixed'; + } + } elseif ($properties1['type'] instanceof Types\DecimalType) { + if (($properties1['precision'] ?: 10) != ($properties2['precision'] ?: 10)) { + $changedProperties[] = 'precision'; + } + if ($properties1['scale'] != $properties2['scale']) { + $changedProperties[] = 'scale'; + } + } + + // A null value and an empty string are actually equal for a comment so they should not trigger a change. + if ($properties1['comment'] !== $properties2['comment'] && + ! (null === $properties1['comment'] && '' === $properties2['comment']) && + ! (null === $properties2['comment'] && '' === $properties1['comment']) + ) { + $changedProperties[] = 'comment'; + } + + $customOptions1 = $column1->getCustomSchemaOptions(); + $customOptions2 = $column2->getCustomSchemaOptions(); + + foreach (array_merge(array_keys($customOptions1), array_keys($customOptions2)) as $key) { + if ( ! array_key_exists($key, $properties1) || ! array_key_exists($key, $properties2)) { + $changedProperties[] = $key; + } elseif ($properties1[$key] !== $properties2[$key]) { + $changedProperties[] = $key; + } + } + + $platformOptions1 = $column1->getPlatformOptions(); + $platformOptions2 = $column2->getPlatformOptions(); + + foreach (array_keys(array_intersect_key($platformOptions1, $platformOptions2)) as $key) { + if ($properties1[$key] !== $properties2[$key]) { + $changedProperties[] = $key; + } + } + + return array_unique($changedProperties); + } + + /** + * Finds the difference between the indexes $index1 and $index2. + * + * Compares $index1 with $index2 and returns $index2 if there are any + * differences or false in case there are no differences. + * + * @param \Doctrine\DBAL\Schema\Index $index1 + * @param \Doctrine\DBAL\Schema\Index $index2 + * + * @return boolean + */ + public function diffIndex(Index $index1, Index $index2) + { + if ($index1->isFullfilledBy($index2) && $index2->isFullfilledBy($index1)) { + return false; + } + + return true; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Constraint.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Constraint.php new file mode 100644 index 0000000000000000000000000000000000000000..c373472c4651977dbdb0dfab293b128b76d9c061 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Constraint.php @@ -0,0 +1,66 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Marker interface for contraints. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +interface Constraint +{ + /** + * @return string + */ + public function getName(); + + /** + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return string + */ + public function getQuotedName(AbstractPlatform $platform); + + /** + * Returns the names of the referencing table columns + * the constraint is associated with. + * + * @return array + */ + public function getColumns(); + + /** + * Returns the quoted representation of the column names + * the constraint is associated with. + * + * But only if they were defined with one or a column name + * is a keyword reserved by the platform. + * Otherwise the plain unquoted value as inserted is returned. + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform The platform to use for quotation. + * + * @return array + */ + public function getQuotedColumns(AbstractPlatform $platform); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php new file mode 100644 index 0000000000000000000000000000000000000000..df6cf538c285c476e836fd464f1c892422ceec53 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php @@ -0,0 +1,218 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +/** + * IBM Db2 Schema Manager. + * + * @link www.doctrine-project.org + * @since 1.0 + * @author Benjamin Eberlei + */ +class DB2SchemaManager extends AbstractSchemaManager +{ + /** + * {@inheritdoc} + * + * Apparently creator is the schema not the user who created it: + * {@link http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.sqlref/db2z_sysibmsystablestable.htm} + */ + public function listTableNames() + { + $sql = $this->_platform->getListTablesSQL(); + $sql .= " AND CREATOR = UPPER('".$this->_conn->getUsername()."')"; + + $tables = $this->_conn->fetchAll($sql); + + return $this->_getPortableTablesList($tables); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableColumnDefinition($tableColumn) + { + $tableColumn = array_change_key_case($tableColumn, \CASE_LOWER); + + $length = null; + $fixed = null; + $unsigned = false; + $scale = false; + $precision = false; + + $default = null; + + if (null !== $tableColumn['default'] && 'NULL' != $tableColumn['default']) { + $default = trim($tableColumn['default'], "'"); + } + + $type = $this->_platform->getDoctrineTypeMapping($tableColumn['typename']); + + if (isset($tableColumn['comment'])) { + $type = $this->extractDoctrineTypeFromComment($tableColumn['comment'], $type); + $tableColumn['comment'] = $this->removeDoctrineTypeFromComment($tableColumn['comment'], $type); + } + + switch (strtolower($tableColumn['typename'])) { + case 'varchar': + $length = $tableColumn['length']; + $fixed = false; + break; + case 'character': + $length = $tableColumn['length']; + $fixed = true; + break; + case 'clob': + $length = $tableColumn['length']; + break; + case 'decimal': + case 'double': + case 'real': + $scale = $tableColumn['scale']; + $precision = $tableColumn['length']; + break; + } + + $options = array( + 'length' => $length, + 'unsigned' => (bool) $unsigned, + 'fixed' => (bool) $fixed, + 'default' => $default, + 'autoincrement' => (boolean) $tableColumn['autoincrement'], + 'notnull' => (bool) ($tableColumn['nulls'] == 'N'), + 'scale' => null, + 'precision' => null, + 'comment' => isset($tableColumn['comment']) && $tableColumn['comment'] !== '' + ? $tableColumn['comment'] + : null, + 'platformOptions' => array(), + ); + + if ($scale !== null && $precision !== null) { + $options['scale'] = $scale; + $options['precision'] = $precision; + } + + return new Column($tableColumn['colname'], \Doctrine\DBAL\Types\Type::getType($type), $options); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTablesList($tables) + { + $tableNames = array(); + foreach ($tables as $tableRow) { + $tableRow = array_change_key_case($tableRow, \CASE_LOWER); + $tableNames[] = $tableRow['name']; + } + + return $tableNames; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableIndexesList($tableIndexRows, $tableName = null) + { + foreach ($tableIndexRows as &$tableIndexRow) { + $tableIndexRow = array_change_key_case($tableIndexRow, \CASE_LOWER); + $tableIndexRow['primary'] = (boolean) $tableIndexRow['primary']; + } + + return parent::_getPortableTableIndexesList($tableIndexRows, $tableName); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableForeignKeyDefinition($tableForeignKey) + { + return new ForeignKeyConstraint( + $tableForeignKey['local_columns'], + $tableForeignKey['foreign_table'], + $tableForeignKey['foreign_columns'], + $tableForeignKey['name'], + $tableForeignKey['options'] + ); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableForeignKeysList($tableForeignKeys) + { + $foreignKeys = array(); + + foreach ($tableForeignKeys as $tableForeignKey) { + $tableForeignKey = array_change_key_case($tableForeignKey, \CASE_LOWER); + + if (!isset($foreignKeys[$tableForeignKey['index_name']])) { + $foreignKeys[$tableForeignKey['index_name']] = array( + 'local_columns' => array($tableForeignKey['local_column']), + 'foreign_table' => $tableForeignKey['foreign_table'], + 'foreign_columns' => array($tableForeignKey['foreign_column']), + 'name' => $tableForeignKey['index_name'], + 'options' => array( + 'onUpdate' => $tableForeignKey['on_update'], + 'onDelete' => $tableForeignKey['on_delete'], + ) + ); + } else { + $foreignKeys[$tableForeignKey['index_name']]['local_columns'][] = $tableForeignKey['local_column']; + $foreignKeys[$tableForeignKey['index_name']]['foreign_columns'][] = $tableForeignKey['foreign_column']; + } + } + + return parent::_getPortableTableForeignKeysList($foreignKeys); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableForeignKeyRuleDef($def) + { + if ($def == "C") { + return "CASCADE"; + } elseif ($def == "N") { + return "SET NULL"; + } + + return null; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableViewDefinition($view) + { + $view = array_change_key_case($view, \CASE_LOWER); + // sadly this still segfaults on PDO_IBM, see http://pecl.php.net/bugs/bug.php?id=17199 + //$view['text'] = (is_resource($view['text']) ? stream_get_contents($view['text']) : $view['text']); + if (!is_resource($view['text'])) { + $pos = strpos($view['text'], ' AS '); + $sql = substr($view['text'], $pos+4); + } else { + $sql = ''; + } + + return new View($view['name'], $sql); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/DrizzleSchemaManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/DrizzleSchemaManager.php new file mode 100644 index 0000000000000000000000000000000000000000..e9503c359a92a65a77908dd68de06cb14ca5d98f --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/DrizzleSchemaManager.php @@ -0,0 +1,119 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Types\Type; + +/** + * Schema manager for the Drizzle RDBMS. + * + * @author Kim Hemsø Rasmussen + */ +class DrizzleSchemaManager extends AbstractSchemaManager +{ + /** + * {@inheritdoc} + */ + protected function _getPortableTableColumnDefinition($tableColumn) + { + $dbType = strtolower($tableColumn['DATA_TYPE']); + + $type = $this->_platform->getDoctrineTypeMapping($dbType); + $type = $this->extractDoctrineTypeFromComment($tableColumn['COLUMN_COMMENT'], $type); + $tableColumn['COLUMN_COMMENT'] = $this->removeDoctrineTypeFromComment($tableColumn['COLUMN_COMMENT'], $type); + + $options = array( + 'notnull' => !(bool) $tableColumn['IS_NULLABLE'], + 'length' => (int) $tableColumn['CHARACTER_MAXIMUM_LENGTH'], + 'default' => isset($tableColumn['COLUMN_DEFAULT']) ? $tableColumn['COLUMN_DEFAULT'] : null, + 'autoincrement' => (bool) $tableColumn['IS_AUTO_INCREMENT'], + 'scale' => (int) $tableColumn['NUMERIC_SCALE'], + 'precision' => (int) $tableColumn['NUMERIC_PRECISION'], + 'comment' => isset($tableColumn['COLUMN_COMMENT']) && '' !== $tableColumn['COLUMN_COMMENT'] + ? $tableColumn['COLUMN_COMMENT'] + : null, + ); + + $column = new Column($tableColumn['COLUMN_NAME'], Type::getType($type), $options); + + if ( ! empty($tableColumn['COLLATION_NAME'])) { + $column->setPlatformOption('collation', $tableColumn['COLLATION_NAME']); + } + + return $column; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableDatabaseDefinition($database) + { + return $database['SCHEMA_NAME']; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableDefinition($table) + { + return $table['TABLE_NAME']; + } + + /** + * {@inheritdoc} + */ + public function _getPortableTableForeignKeyDefinition($tableForeignKey) + { + $columns = array(); + foreach (explode(',', $tableForeignKey['CONSTRAINT_COLUMNS']) as $value) { + $columns[] = trim($value, ' `'); + } + + $refColumns = array(); + foreach (explode(',', $tableForeignKey['REFERENCED_TABLE_COLUMNS']) as $value) { + $refColumns[] = trim($value, ' `'); + } + + return new ForeignKeyConstraint( + $columns, + $tableForeignKey['REFERENCED_TABLE_NAME'], + $refColumns, + $tableForeignKey['CONSTRAINT_NAME'], + array( + 'onUpdate' => $tableForeignKey['UPDATE_RULE'], + 'onDelete' => $tableForeignKey['DELETE_RULE'], + ) + ); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableIndexesList($tableIndexes, $tableName = null) + { + $indexes = array(); + foreach ($tableIndexes as $k) { + $k['primary'] = (boolean) $k['primary']; + $indexes[] = $k; + } + + return parent::_getPortableTableIndexesList($indexes, $tableName); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php new file mode 100644 index 0000000000000000000000000000000000000000..6070eb2e5bafc482b387416312c036c70796b9d4 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php @@ -0,0 +1,389 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * An abstraction class for a foreign key constraint. + * + * @author Benjamin Eberlei + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.0 + */ +class ForeignKeyConstraint extends AbstractAsset implements Constraint +{ + /** + * Instance of the referencing table the foreign key constraint is associated with. + * + * @var \Doctrine\DBAL\Schema\Table + */ + protected $_localTable; + + /** + * Asset identifier instances of the referencing table column names the foreign key constraint is associated with. + * array($columnName => Identifier) + * + * @var Identifier[] + */ + protected $_localColumnNames; + + /** + * Table or asset identifier instance of the referenced table name the foreign key constraint is associated with. + * + * @var Table|Identifier + */ + protected $_foreignTableName; + + /** + * Asset identifier instances of the referenced table column names the foreign key constraint is associated with. + * array($columnName => Identifier) + * + * @var Identifier[] + */ + protected $_foreignColumnNames; + + /** + * @var array Options associated with the foreign key constraint. + */ + protected $_options; + + /** + * Initializes the foreign key constraint. + * + * @param array $localColumnNames Names of the referencing table columns. + * @param Table|string $foreignTableName Referenced table. + * @param array $foreignColumnNames Names of the referenced table columns. + * @param string|null $name Name of the foreign key constraint. + * @param array $options Options associated with the foreign key constraint. + */ + public function __construct(array $localColumnNames, $foreignTableName, array $foreignColumnNames, $name = null, array $options = array()) + { + $this->_setName($name); + $identifierConstructorCallback = function ($column) { + return new Identifier($column); + }; + $this->_localColumnNames = $localColumnNames + ? array_combine($localColumnNames, array_map($identifierConstructorCallback, $localColumnNames)) + : array(); + + if ($foreignTableName instanceof Table) { + $this->_foreignTableName = $foreignTableName; + } else { + $this->_foreignTableName = new Identifier($foreignTableName); + } + + $this->_foreignColumnNames = $foreignColumnNames + ? array_combine($foreignColumnNames, array_map($identifierConstructorCallback, $foreignColumnNames)) + : array(); + $this->_options = $options; + } + + /** + * Returns the name of the referencing table + * the foreign key constraint is associated with. + * + * @return string + */ + public function getLocalTableName() + { + return $this->_localTable->getName(); + } + + /** + * Sets the Table instance of the referencing table + * the foreign key constraint is associated with. + * + * @param \Doctrine\DBAL\Schema\Table $table Instance of the referencing table. + * + * @return void + */ + public function setLocalTable(Table $table) + { + $this->_localTable = $table; + } + + /** + * @return Table + */ + public function getLocalTable() + { + return $this->_localTable; + } + + /** + * Returns the names of the referencing table columns + * the foreign key constraint is associated with. + * + * @return array + */ + public function getLocalColumns() + { + return array_keys($this->_localColumnNames); + } + + /** + * Returns the quoted representation of the referencing table column names + * the foreign key constraint is associated with. + * + * But only if they were defined with one or the referencing table column name + * is a keyword reserved by the platform. + * Otherwise the plain unquoted value as inserted is returned. + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform The platform to use for quotation. + * + * @return array + */ + public function getQuotedLocalColumns(AbstractPlatform $platform) + { + $columns = array(); + + foreach ($this->_localColumnNames as $column) { + $columns[] = $column->getQuotedName($platform); + } + + return $columns; + } + + /** + * Returns unquoted representation of local table column names for comparison with other FK + * + * @return array + */ + public function getUnquotedLocalColumns() + { + return array_map(array($this, 'trimQuotes'), $this->getLocalColumns()); + } + + /** + * Returns unquoted representation of foreign table column names for comparison with other FK + * + * @return array + */ + public function getUnquotedForeignColumns() + { + return array_map(array($this, 'trimQuotes'), $this->getForeignColumns()); + } + + /** + * {@inheritdoc} + * + * @see getLocalColumns + */ + public function getColumns() + { + return $this->getLocalColumns(); + } + + /** + * Returns the quoted representation of the referencing table column names + * the foreign key constraint is associated with. + * + * But only if they were defined with one or the referencing table column name + * is a keyword reserved by the platform. + * Otherwise the plain unquoted value as inserted is returned. + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform The platform to use for quotation. + * + * @see getQuotedLocalColumns + * + * @return array + */ + public function getQuotedColumns(AbstractPlatform $platform) + { + return $this->getQuotedLocalColumns($platform); + } + + /** + * Returns the name of the referenced table + * the foreign key constraint is associated with. + * + * @return string + */ + public function getForeignTableName() + { + return $this->_foreignTableName->getName(); + } + + /** + * Returns the non-schema qualified foreign table name. + * + * @return string + */ + public function getUnqualifiedForeignTableName() + { + $parts = explode(".", $this->_foreignTableName->getName()); + + return strtolower(end($parts)); + } + + /** + * Returns the quoted representation of the referenced table name + * the foreign key constraint is associated with. + * + * But only if it was defined with one or the referenced table name + * is a keyword reserved by the platform. + * Otherwise the plain unquoted value as inserted is returned. + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform The platform to use for quotation. + * + * @return string + */ + public function getQuotedForeignTableName(AbstractPlatform $platform) + { + return $this->_foreignTableName->getQuotedName($platform); + } + + /** + * Returns the names of the referenced table columns + * the foreign key constraint is associated with. + * + * @return array + */ + public function getForeignColumns() + { + return array_keys($this->_foreignColumnNames); + } + + /** + * Returns the quoted representation of the referenced table column names + * the foreign key constraint is associated with. + * + * But only if they were defined with one or the referenced table column name + * is a keyword reserved by the platform. + * Otherwise the plain unquoted value as inserted is returned. + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform The platform to use for quotation. + * + * @return array + */ + public function getQuotedForeignColumns(AbstractPlatform $platform) + { + $columns = array(); + + foreach ($this->_foreignColumnNames as $column) { + $columns[] = $column->getQuotedName($platform); + } + + return $columns; + } + + /** + * Returns whether or not a given option + * is associated with the foreign key constraint. + * + * @param string $name Name of the option to check. + * + * @return boolean + */ + public function hasOption($name) + { + return isset($this->_options[$name]); + } + + /** + * Returns an option associated with the foreign key constraint. + * + * @param string $name Name of the option the foreign key constraint is associated with. + * + * @return mixed + */ + public function getOption($name) + { + return $this->_options[$name]; + } + + /** + * Returns the options associated with the foreign key constraint. + * + * @return array + */ + public function getOptions() + { + return $this->_options; + } + + /** + * Returns the referential action for UPDATE operations + * on the referenced table the foreign key constraint is associated with. + * + * @return string|null + */ + public function onUpdate() + { + return $this->onEvent('onUpdate'); + } + + /** + * Returns the referential action for DELETE operations + * on the referenced table the foreign key constraint is associated with. + * + * @return string|null + */ + public function onDelete() + { + return $this->onEvent('onDelete'); + } + + /** + * Returns the referential action for a given database operation + * on the referenced table the foreign key constraint is associated with. + * + * @param string $event Name of the database operation/event to return the referential action for. + * + * @return string|null + */ + private function onEvent($event) + { + if (isset($this->_options[$event])) { + $onEvent = strtoupper($this->_options[$event]); + + if ( ! in_array($onEvent, array('NO ACTION', 'RESTRICT'))) { + return $onEvent; + } + } + + return false; + } + + /** + * Checks whether this foreign key constraint intersects the given index columns. + * + * Returns `true` if at least one of this foreign key's local columns + * matches one of the given index's columns, `false` otherwise. + * + * @param Index $index The index to be checked against. + * + * @return boolean + */ + public function intersectsIndexColumns(Index $index) + { + foreach ($index->getColumns() as $indexColumn) { + foreach ($this->_localColumnNames as $localColumn) { + if (strtolower($indexColumn) === strtolower($localColumn->getName())) { + return true; + } + } + } + + return false; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Identifier.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Identifier.php new file mode 100644 index 0000000000000000000000000000000000000000..babe583e43add89cf3586c254419916b0decf05e --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Identifier.php @@ -0,0 +1,48 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +/** + * An abstraction class for an asset identifier. + * + * Wraps identifier names like column names in indexes / foreign keys + * in an abstract class for proper quotation capabilities. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.4 + */ +class Identifier extends AbstractAsset +{ + /** + * Constructor. + * + * @param string $identifier Identifier name to wrap. + * @param bool $quote Whether to force quoting the given identifier. + */ + public function __construct($identifier, $quote = false) + { + $this->_setName($identifier); + + if ($quote && ! $this->_quoted) { + $this->_setName('"' . $this->getName() . '"'); + } + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Index.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Index.php new file mode 100644 index 0000000000000000000000000000000000000000..bc5cd93dc6fccce6e0f757a5ed06dbd2f1c937f1 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Index.php @@ -0,0 +1,358 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +class Index extends AbstractAsset implements Constraint +{ + /** + * Asset identifier instances of the column names the index is associated with. + * array($columnName => Identifier) + * + * @var Identifier[] + */ + protected $_columns = array(); + + /** + * @var boolean + */ + protected $_isUnique = false; + + /** + * @var boolean + */ + protected $_isPrimary = false; + + /** + * Platform specific flags for indexes. + * array($flagName => true) + * + * @var array + */ + protected $_flags = array(); + + /** + * Platform specific options + * + * @todo $_flags should eventually be refactored into options + * + * @var array + */ + private $options = array(); + + /** + * @param string $indexName + * @param string[] $columns + * @param boolean $isUnique + * @param boolean $isPrimary + * @param string[] $flags + * @param array $options + */ + public function __construct($indexName, array $columns, $isUnique = false, $isPrimary = false, array $flags = array(), array $options = array()) + { + $isUnique = $isUnique || $isPrimary; + + $this->_setName($indexName); + $this->_isUnique = $isUnique; + $this->_isPrimary = $isPrimary; + $this->options = $options; + + foreach ($columns as $column) { + $this->_addColumn($column); + } + foreach ($flags as $flag) { + $this->addFlag($flag); + } + } + + /** + * @param string $column + * + * @return void + * + * @throws \InvalidArgumentException + */ + protected function _addColumn($column) + { + if (is_string($column)) { + $this->_columns[$column] = new Identifier($column); + } else { + throw new \InvalidArgumentException("Expecting a string as Index Column"); + } + } + + /** + * {@inheritdoc} + */ + public function getColumns() + { + return array_keys($this->_columns); + } + + /** + * {@inheritdoc} + */ + public function getQuotedColumns(AbstractPlatform $platform) + { + $columns = array(); + + foreach ($this->_columns as $column) { + $columns[] = $column->getQuotedName($platform); + } + + return $columns; + } + + /** + * @return string[] + */ + public function getUnquotedColumns() + { + return array_map(array($this, 'trimQuotes'), $this->getColumns()); + } + + /** + * Is the index neither unique nor primary key? + * + * @return boolean + */ + public function isSimpleIndex() + { + return !$this->_isPrimary && !$this->_isUnique; + } + + /** + * @return boolean + */ + public function isUnique() + { + return $this->_isUnique; + } + + /** + * @return boolean + */ + public function isPrimary() + { + return $this->_isPrimary; + } + + /** + * @param string $columnName + * @param integer $pos + * + * @return boolean + */ + public function hasColumnAtPosition($columnName, $pos = 0) + { + $columnName = $this->trimQuotes(strtolower($columnName)); + $indexColumns = array_map('strtolower', $this->getUnquotedColumns()); + + return array_search($columnName, $indexColumns) === $pos; + } + + /** + * Checks if this index exactly spans the given column names in the correct order. + * + * @param array $columnNames + * + * @return boolean + */ + public function spansColumns(array $columnNames) + { + $columns = $this->getColumns(); + $numberOfColumns = count($columns); + $sameColumns = true; + + for ($i = 0; $i < $numberOfColumns; $i++) { + if ( ! isset($columnNames[$i]) || $this->trimQuotes(strtolower($columns[$i])) !== $this->trimQuotes(strtolower($columnNames[$i]))) { + $sameColumns = false; + } + } + + return $sameColumns; + } + + /** + * Checks if the other index already fulfills all the indexing and constraint needs of the current one. + * + * @param Index $other + * + * @return boolean + */ + public function isFullfilledBy(Index $other) + { + // allow the other index to be equally large only. It being larger is an option + // but it creates a problem with scenarios of the kind PRIMARY KEY(foo,bar) UNIQUE(foo) + if (count($other->getColumns()) != count($this->getColumns())) { + return false; + } + + // Check if columns are the same, and even in the same order + $sameColumns = $this->spansColumns($other->getColumns()); + + if ($sameColumns) { + if ( ! $this->samePartialIndex($other)) { + return false; + } + + if ( ! $this->isUnique() && ! $this->isPrimary()) { + // this is a special case: If the current key is neither primary or unique, any uniqe or + // primary key will always have the same effect for the index and there cannot be any constraint + // overlaps. This means a primary or unique index can always fulfill the requirements of just an + // index that has no constraints. + return true; + } + + if ($other->isPrimary() != $this->isPrimary()) { + return false; + } + + if ($other->isUnique() != $this->isUnique()) { + return false; + } + + return true; + } + + return false; + } + + /** + * Detects if the other index is a non-unique, non primary index that can be overwritten by this one. + * + * @param Index $other + * + * @return boolean + */ + public function overrules(Index $other) + { + if ($other->isPrimary()) { + return false; + } elseif ($this->isSimpleIndex() && $other->isUnique()) { + return false; + } + + if ($this->spansColumns($other->getColumns()) && ($this->isPrimary() || $this->isUnique()) && $this->samePartialIndex($other)) { + return true; + } + + return false; + } + + /** + * Returns platform specific flags for indexes. + * + * @return string[] + */ + public function getFlags() + { + return array_keys($this->_flags); + } + + /** + * Adds Flag for an index that translates to platform specific handling. + * + * @example $index->addFlag('CLUSTERED') + * + * @param string $flag + * + * @return Index + */ + public function addFlag($flag) + { + $this->_flags[strtolower($flag)] = true; + + return $this; + } + + /** + * Does this index have a specific flag? + * + * @param string $flag + * + * @return boolean + */ + public function hasFlag($flag) + { + return isset($this->_flags[strtolower($flag)]); + } + + /** + * Removes a flag. + * + * @param string $flag + * + * @return void + */ + public function removeFlag($flag) + { + unset($this->_flags[strtolower($flag)]); + } + + /** + * @param string $name + * + * @return boolean + */ + public function hasOption($name) + { + return isset($this->options[strtolower($name)]); + } + + /** + * @param string $name + * + * @return mixed + */ + public function getOption($name) + { + return $this->options[strtolower($name)]; + } + + /** + * @return array + */ + public function getOptions() + { + return $this->options; + } + + /** + * Return whether the two indexes have the same partial index + * @param \Doctrine\DBAL\Schema\Index $other + * + * @return boolean + */ + private function samePartialIndex(Index $other) + { + if ($this->hasOption('where') && $other->hasOption('where') && $this->getOption('where') == $other->getOption('where')) { + return true; + } + + if ( ! $this->hasOption('where') && ! $other->hasOption('where')) { + return true; + } + + return false; + } + +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php new file mode 100644 index 0000000000000000000000000000000000000000..0b36762b6ce1ed7fd84d4dc13b2e0a00dd6f2c10 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php @@ -0,0 +1,252 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Platforms\MySqlPlatform; +use Doctrine\DBAL\Types\Type; + +/** + * Schema manager for the MySql RDBMS. + * + * @author Konsta Vesterinen + * @author Lukas Smith (PEAR MDB2 library) + * @author Roman Borschel + * @author Benjamin Eberlei + * @since 2.0 + */ +class MySqlSchemaManager extends AbstractSchemaManager +{ + /** + * {@inheritdoc} + */ + protected function _getPortableViewDefinition($view) + { + return new View($view['TABLE_NAME'], $view['VIEW_DEFINITION']); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableDefinition($table) + { + return array_shift($table); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableUserDefinition($user) + { + return array( + 'user' => $user['User'], + 'password' => $user['Password'], + ); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableIndexesList($tableIndexes, $tableName=null) + { + foreach ($tableIndexes as $k => $v) { + $v = array_change_key_case($v, CASE_LOWER); + if ($v['key_name'] == 'PRIMARY') { + $v['primary'] = true; + } else { + $v['primary'] = false; + } + if (strpos($v['index_type'], 'FULLTEXT') !== false) { + $v['flags'] = array('FULLTEXT'); + } elseif (strpos($v['index_type'], 'SPATIAL') !== false) { + $v['flags'] = array('SPATIAL'); + } + $tableIndexes[$k] = $v; + } + + return parent::_getPortableTableIndexesList($tableIndexes, $tableName); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableSequenceDefinition($sequence) + { + return end($sequence); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableDatabaseDefinition($database) + { + return $database['Database']; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableColumnDefinition($tableColumn) + { + $tableColumn = array_change_key_case($tableColumn, CASE_LOWER); + + $dbType = strtolower($tableColumn['type']); + $dbType = strtok($dbType, '(), '); + if (isset($tableColumn['length'])) { + $length = $tableColumn['length']; + } else { + $length = strtok('(), '); + } + + $fixed = null; + + if ( ! isset($tableColumn['name'])) { + $tableColumn['name'] = ''; + } + + $scale = null; + $precision = null; + + $type = $this->_platform->getDoctrineTypeMapping($dbType); + + // In cases where not connected to a database DESCRIBE $table does not return 'Comment' + if (isset($tableColumn['comment'])) { + $type = $this->extractDoctrineTypeFromComment($tableColumn['comment'], $type); + $tableColumn['comment'] = $this->removeDoctrineTypeFromComment($tableColumn['comment'], $type); + } + + switch ($dbType) { + case 'char': + case 'binary': + $fixed = true; + break; + case 'float': + case 'double': + case 'real': + case 'numeric': + case 'decimal': + if (preg_match('([A-Za-z]+\(([0-9]+)\,([0-9]+)\))', $tableColumn['type'], $match)) { + $precision = $match[1]; + $scale = $match[2]; + $length = null; + } + break; + case 'tinytext': + $length = MySqlPlatform::LENGTH_LIMIT_TINYTEXT; + break; + case 'text': + $length = MySqlPlatform::LENGTH_LIMIT_TEXT; + break; + case 'mediumtext': + $length = MySqlPlatform::LENGTH_LIMIT_MEDIUMTEXT; + break; + case 'tinyblob': + $length = MySqlPlatform::LENGTH_LIMIT_TINYBLOB; + break; + case 'blob': + $length = MySqlPlatform::LENGTH_LIMIT_BLOB; + break; + case 'mediumblob': + $length = MySqlPlatform::LENGTH_LIMIT_MEDIUMBLOB; + break; + case 'tinyint': + case 'smallint': + case 'mediumint': + case 'int': + case 'integer': + case 'bigint': + case 'year': + $length = null; + break; + } + + $length = ((int) $length == 0) ? null : (int) $length; + + $options = array( + 'length' => $length, + 'unsigned' => (bool) (strpos($tableColumn['type'], 'unsigned') !== false), + 'fixed' => (bool) $fixed, + 'default' => isset($tableColumn['default']) ? $tableColumn['default'] : null, + 'notnull' => (bool) ($tableColumn['null'] != 'YES'), + 'scale' => null, + 'precision' => null, + 'autoincrement' => (bool) (strpos($tableColumn['extra'], 'auto_increment') !== false), + 'comment' => isset($tableColumn['comment']) && $tableColumn['comment'] !== '' + ? $tableColumn['comment'] + : null, + ); + + if ($scale !== null && $precision !== null) { + $options['scale'] = $scale; + $options['precision'] = $precision; + } + + $column = new Column($tableColumn['field'], Type::getType($type), $options); + + if (isset($tableColumn['collation'])) { + $column->setPlatformOption('collation', $tableColumn['collation']); + } + + return $column; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableForeignKeysList($tableForeignKeys) + { + $list = array(); + foreach ($tableForeignKeys as $value) { + $value = array_change_key_case($value, CASE_LOWER); + if (!isset($list[$value['constraint_name']])) { + if (!isset($value['delete_rule']) || $value['delete_rule'] == "RESTRICT") { + $value['delete_rule'] = null; + } + if (!isset($value['update_rule']) || $value['update_rule'] == "RESTRICT") { + $value['update_rule'] = null; + } + + $list[$value['constraint_name']] = array( + 'name' => $value['constraint_name'], + 'local' => array(), + 'foreign' => array(), + 'foreignTable' => $value['referenced_table_name'], + 'onDelete' => $value['delete_rule'], + 'onUpdate' => $value['update_rule'], + ); + } + $list[$value['constraint_name']]['local'][] = $value['column_name']; + $list[$value['constraint_name']]['foreign'][] = $value['referenced_column_name']; + } + + $result = array(); + foreach ($list as $constraint) { + $result[] = new ForeignKeyConstraint( + array_values($constraint['local']), $constraint['foreignTable'], + array_values($constraint['foreign']), $constraint['name'], + array( + 'onDelete' => $constraint['onDelete'], + 'onUpdate' => $constraint['onUpdate'], + ) + ); + } + + return $result; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php new file mode 100644 index 0000000000000000000000000000000000000000..9feecdc761be5476d44809b95402ece6b1730174 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php @@ -0,0 +1,425 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Driver\DriverException; +use Doctrine\DBAL\Types\Type; + +/** + * Oracle Schema Manager. + * + * @author Konsta Vesterinen + * @author Lukas Smith (PEAR MDB2 library) + * @author Benjamin Eberlei + * @since 2.0 + */ +class OracleSchemaManager extends AbstractSchemaManager +{ + /** + * {@inheritdoc} + */ + public function dropDatabase($database) + { + try { + parent::dropDatabase($database); + } catch (DBALException $exception) { + $exception = $exception->getPrevious(); + + if (! $exception instanceof DriverException) { + throw $exception; + } + + // If we have a error code 1940 (ORA-01940), the drop database operation failed + // because of active connections on the database. + // To force dropping the database, we first have to close all active connections + // on that database and issue the drop database operation again. + if ($exception->getErrorCode() !== 1940) { + throw $exception; + } + + $this->killUserSessions($database); + + parent::dropDatabase($database); + } + } + + /** + * {@inheritdoc} + */ + protected function _getPortableViewDefinition($view) + { + $view = \array_change_key_case($view, CASE_LOWER); + + return new View($this->getQuotedIdentifierName($view['view_name']), $view['text']); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableUserDefinition($user) + { + $user = \array_change_key_case($user, CASE_LOWER); + + return array( + 'user' => $user['username'], + ); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableDefinition($table) + { + $table = \array_change_key_case($table, CASE_LOWER); + + return $this->getQuotedIdentifierName($table['table_name']); + } + + /** + * {@inheritdoc} + * + * @license New BSD License + * @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaPgsqlReader.html + */ + protected function _getPortableTableIndexesList($tableIndexes, $tableName=null) + { + $indexBuffer = array(); + foreach ($tableIndexes as $tableIndex) { + $tableIndex = \array_change_key_case($tableIndex, CASE_LOWER); + + $keyName = strtolower($tableIndex['name']); + + if (strtolower($tableIndex['is_primary']) == "p") { + $keyName = 'primary'; + $buffer['primary'] = true; + $buffer['non_unique'] = false; + } else { + $buffer['primary'] = false; + $buffer['non_unique'] = ($tableIndex['is_unique'] == 0) ? true : false; + } + $buffer['key_name'] = $keyName; + $buffer['column_name'] = $this->getQuotedIdentifierName($tableIndex['column_name']); + $indexBuffer[] = $buffer; + } + + return parent::_getPortableTableIndexesList($indexBuffer, $tableName); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableColumnDefinition($tableColumn) + { + $tableColumn = \array_change_key_case($tableColumn, CASE_LOWER); + + $dbType = strtolower($tableColumn['data_type']); + if (strpos($dbType, "timestamp(") === 0) { + if (strpos($dbType, "with time zone")) { + $dbType = "timestamptz"; + } else { + $dbType = "timestamp"; + } + } + + $unsigned = $fixed = null; + + if ( ! isset($tableColumn['column_name'])) { + $tableColumn['column_name'] = ''; + } + + // Default values returned from database sometimes have trailing spaces. + $tableColumn['data_default'] = trim($tableColumn['data_default']); + + if ($tableColumn['data_default'] === '' || $tableColumn['data_default'] === 'NULL') { + $tableColumn['data_default'] = null; + } + + if (null !== $tableColumn['data_default']) { + // Default values returned from database are enclosed in single quotes. + $tableColumn['data_default'] = trim($tableColumn['data_default'], "'"); + } + + $precision = null; + $scale = null; + + $type = $this->_platform->getDoctrineTypeMapping($dbType); + $type = $this->extractDoctrineTypeFromComment($tableColumn['comments'], $type); + $tableColumn['comments'] = $this->removeDoctrineTypeFromComment($tableColumn['comments'], $type); + + switch ($dbType) { + case 'number': + if ($tableColumn['data_precision'] == 20 && $tableColumn['data_scale'] == 0) { + $precision = 20; + $scale = 0; + $type = 'bigint'; + } elseif ($tableColumn['data_precision'] == 5 && $tableColumn['data_scale'] == 0) { + $type = 'smallint'; + $precision = 5; + $scale = 0; + } elseif ($tableColumn['data_precision'] == 1 && $tableColumn['data_scale'] == 0) { + $precision = 1; + $scale = 0; + $type = 'boolean'; + } elseif ($tableColumn['data_scale'] > 0) { + $precision = $tableColumn['data_precision']; + $scale = $tableColumn['data_scale']; + $type = 'decimal'; + } + $length = null; + break; + case 'pls_integer': + case 'binary_integer': + $length = null; + break; + case 'varchar': + case 'varchar2': + case 'nvarchar2': + $length = $tableColumn['char_length']; + $fixed = false; + break; + case 'char': + case 'nchar': + $length = $tableColumn['char_length']; + $fixed = true; + break; + case 'date': + case 'timestamp': + $length = null; + break; + case 'float': + case 'binary_float': + case 'binary_double': + $precision = $tableColumn['data_precision']; + $scale = $tableColumn['data_scale']; + $length = null; + break; + case 'clob': + case 'nclob': + $length = null; + break; + case 'blob': + case 'raw': + case 'long raw': + case 'bfile': + $length = null; + break; + case 'rowid': + case 'urowid': + default: + $length = null; + } + + $options = array( + 'notnull' => (bool) ($tableColumn['nullable'] === 'N'), + 'fixed' => (bool) $fixed, + 'unsigned' => (bool) $unsigned, + 'default' => $tableColumn['data_default'], + 'length' => $length, + 'precision' => $precision, + 'scale' => $scale, + 'comment' => isset($tableColumn['comments']) && '' !== $tableColumn['comments'] + ? $tableColumn['comments'] + : null, + 'platformDetails' => array(), + ); + + return new Column($this->getQuotedIdentifierName($tableColumn['column_name']), Type::getType($type), $options); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableForeignKeysList($tableForeignKeys) + { + $list = array(); + foreach ($tableForeignKeys as $value) { + $value = \array_change_key_case($value, CASE_LOWER); + if (!isset($list[$value['constraint_name']])) { + if ($value['delete_rule'] == "NO ACTION") { + $value['delete_rule'] = null; + } + + $list[$value['constraint_name']] = array( + 'name' => $this->getQuotedIdentifierName($value['constraint_name']), + 'local' => array(), + 'foreign' => array(), + 'foreignTable' => $value['references_table'], + 'onDelete' => $value['delete_rule'], + ); + } + + $localColumn = $this->getQuotedIdentifierName($value['local_column']); + $foreignColumn = $this->getQuotedIdentifierName($value['foreign_column']); + + $list[$value['constraint_name']]['local'][$value['position']] = $localColumn; + $list[$value['constraint_name']]['foreign'][$value['position']] = $foreignColumn; + } + + $result = array(); + foreach ($list as $constraint) { + $result[] = new ForeignKeyConstraint( + array_values($constraint['local']), $this->getQuotedIdentifierName($constraint['foreignTable']), + array_values($constraint['foreign']), $this->getQuotedIdentifierName($constraint['name']), + array('onDelete' => $constraint['onDelete']) + ); + } + + return $result; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableSequenceDefinition($sequence) + { + $sequence = \array_change_key_case($sequence, CASE_LOWER); + + return new Sequence( + $this->getQuotedIdentifierName($sequence['sequence_name']), + $sequence['increment_by'], + $sequence['min_value'] + ); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableFunctionDefinition($function) + { + $function = \array_change_key_case($function, CASE_LOWER); + + return $function['name']; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableDatabaseDefinition($database) + { + $database = \array_change_key_case($database, CASE_LOWER); + + return $database['username']; + } + + /** + * {@inheritdoc} + */ + public function createDatabase($database = null) + { + if (is_null($database)) { + $database = $this->_conn->getDatabase(); + } + + $params = $this->_conn->getParams(); + $username = $database; + $password = $params['password']; + + $query = 'CREATE USER ' . $username . ' IDENTIFIED BY ' . $password; + $this->_conn->executeUpdate($query); + + $query = 'GRANT DBA TO ' . $username; + $this->_conn->executeUpdate($query); + + return true; + } + + /** + * @param string $table + * + * @return boolean + */ + public function dropAutoincrement($table) + { + $sql = $this->_platform->getDropAutoincrementSql($table); + foreach ($sql as $query) { + $this->_conn->executeUpdate($query); + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function dropTable($name) + { + $this->tryMethod('dropAutoincrement', $name); + + parent::dropTable($name); + } + + /** + * Returns the quoted representation of the given identifier name. + * + * Quotes non-uppercase identifiers explicitly to preserve case + * and thus make references to the particular identifier work. + * + * @param string $identifier The identifier to quote. + * + * @return string The quoted identifier. + */ + private function getQuotedIdentifierName($identifier) + { + if (preg_match('/[a-z]/', $identifier)) { + return $this->_platform->quoteIdentifier($identifier); + } + + return $identifier; + } + + /** + * Kills sessions connected with the given user. + * + * This is useful to force DROP USER operations which could fail because of active user sessions. + * + * @param string $user The name of the user to kill sessions for. + * + * @return void + */ + private function killUserSessions($user) + { + $sql = <<_conn->fetchAll($sql, array(strtoupper($user))); + + foreach ($activeUserSessions as $activeUserSession) { + $activeUserSession = array_change_key_case($activeUserSession, \CASE_LOWER); + + $this->_execSql( + sprintf( + "ALTER SYSTEM KILL SESSION '%s, %s' IMMEDIATE", + $activeUserSession['sid'], + $activeUserSession['serial#'] + ) + ); + } + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php new file mode 100644 index 0000000000000000000000000000000000000000..5b7b82e152b6c6a486b8f22e0197c5b1c7a55c47 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php @@ -0,0 +1,438 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Exception\DriverException; +use Doctrine\DBAL\Types\Type; + +/** + * PostgreSQL Schema Manager. + * + * @author Konsta Vesterinen + * @author Lukas Smith (PEAR MDB2 library) + * @author Benjamin Eberlei + * @since 2.0 + */ +class PostgreSqlSchemaManager extends AbstractSchemaManager +{ + /** + * @var array + */ + private $existingSchemaPaths; + + /** + * Gets all the existing schema names. + * + * @return array + */ + public function getSchemaNames() + { + $rows = $this->_conn->fetchAll("SELECT nspname as schema_name FROM pg_namespace WHERE nspname !~ '^pg_.*' and nspname != 'information_schema'"); + + return array_map(function ($v) { return $v['schema_name']; }, $rows); + } + + /** + * Returns an array of schema search paths. + * + * This is a PostgreSQL only function. + * + * @return array + */ + public function getSchemaSearchPaths() + { + $params = $this->_conn->getParams(); + $schema = explode(",", $this->_conn->fetchColumn('SHOW search_path')); + + if (isset($params['user'])) { + $schema = str_replace('"$user"', $params['user'], $schema); + } + + return array_map('trim', $schema); + } + + /** + * Gets names of all existing schemas in the current users search path. + * + * This is a PostgreSQL only function. + * + * @return array + */ + public function getExistingSchemaSearchPaths() + { + if ($this->existingSchemaPaths === null) { + $this->determineExistingSchemaSearchPaths(); + } + + return $this->existingSchemaPaths; + } + + /** + * Sets or resets the order of the existing schemas in the current search path of the user. + * + * This is a PostgreSQL only function. + * + * @return void + */ + public function determineExistingSchemaSearchPaths() + { + $names = $this->getSchemaNames(); + $paths = $this->getSchemaSearchPaths(); + + $this->existingSchemaPaths = array_filter($paths, function ($v) use ($names) { + return in_array($v, $names); + }); + } + + /** + * {@inheritdoc} + */ + public function dropDatabase($database) + { + try { + parent::dropDatabase($database); + } catch (DriverException $exception) { + // If we have a SQLSTATE 55006, the drop database operation failed + // because of active connections on the database. + // To force dropping the database, we first have to close all active connections + // on that database and issue the drop database operation again. + if ($exception->getSQLState() !== '55006') { + throw $exception; + } + + $this->_execSql( + array( + $this->_platform->getDisallowDatabaseConnectionsSQL($database), + $this->_platform->getCloseActiveDatabaseConnectionsSQL($database), + ) + ); + + parent::dropDatabase($database); + } + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableForeignKeyDefinition($tableForeignKey) + { + $onUpdate = null; + $onDelete = null; + + if (preg_match('(ON UPDATE ([a-zA-Z0-9]+( (NULL|ACTION|DEFAULT))?))', $tableForeignKey['condef'], $match)) { + $onUpdate = $match[1]; + } + if (preg_match('(ON DELETE ([a-zA-Z0-9]+( (NULL|ACTION|DEFAULT))?))', $tableForeignKey['condef'], $match)) { + $onDelete = $match[1]; + } + + if (preg_match('/FOREIGN KEY \((.+)\) REFERENCES (.+)\((.+)\)/', $tableForeignKey['condef'], $values)) { + // PostgreSQL returns identifiers that are keywords with quotes, we need them later, don't get + // the idea to trim them here. + $localColumns = array_map('trim', explode(",", $values[1])); + $foreignColumns = array_map('trim', explode(",", $values[3])); + $foreignTable = $values[2]; + } + + return new ForeignKeyConstraint( + $localColumns, $foreignTable, $foreignColumns, $tableForeignKey['conname'], + array('onUpdate' => $onUpdate, 'onDelete' => $onDelete) + ); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTriggerDefinition($trigger) + { + return $trigger['trigger_name']; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableViewDefinition($view) + { + return new View($view['schemaname'].'.'.$view['viewname'], $view['definition']); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableUserDefinition($user) + { + return array( + 'user' => $user['usename'], + 'password' => $user['passwd'] + ); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableDefinition($table) + { + $schemas = $this->getExistingSchemaSearchPaths(); + $firstSchema = array_shift($schemas); + + if ($table['schema_name'] == $firstSchema) { + return $table['table_name']; + } else { + return $table['schema_name'] . "." . $table['table_name']; + } + } + + /** + * {@inheritdoc} + * + * @license New BSD License + * @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaPgsqlReader.html + */ + protected function _getPortableTableIndexesList($tableIndexes, $tableName=null) + { + $buffer = array(); + foreach ($tableIndexes as $row) { + $colNumbers = explode(' ', $row['indkey']); + $colNumbersSql = 'IN (' . join(' ,', $colNumbers) . ' )'; + $columnNameSql = "SELECT attnum, attname FROM pg_attribute + WHERE attrelid={$row['indrelid']} AND attnum $colNumbersSql ORDER BY attnum ASC;"; + + $stmt = $this->_conn->executeQuery($columnNameSql); + $indexColumns = $stmt->fetchAll(); + + // required for getting the order of the columns right. + foreach ($colNumbers as $colNum) { + foreach ($indexColumns as $colRow) { + if ($colNum == $colRow['attnum']) { + $buffer[] = array( + 'key_name' => $row['relname'], + 'column_name' => trim($colRow['attname']), + 'non_unique' => !$row['indisunique'], + 'primary' => $row['indisprimary'], + 'where' => $row['where'], + ); + } + } + } + } + + return parent::_getPortableTableIndexesList($buffer, $tableName); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableDatabaseDefinition($database) + { + return $database['datname']; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableSequencesList($sequences) + { + $sequenceDefinitions = array(); + + foreach ($sequences as $sequence) { + if ($sequence['schemaname'] != 'public') { + $sequenceName = $sequence['schemaname'] . "." . $sequence['relname']; + } else { + $sequenceName = $sequence['relname']; + } + + $sequenceDefinitions[$sequenceName] = $sequence; + } + + $list = array(); + + foreach ($this->filterAssetNames(array_keys($sequenceDefinitions)) as $sequenceName) { + $list[] = $this->_getPortableSequenceDefinition($sequenceDefinitions[$sequenceName]); + } + + return $list; + } + + /** + * {@inheritdoc} + */ + protected function getPortableNamespaceDefinition(array $namespace) + { + return $namespace['nspname']; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableSequenceDefinition($sequence) + { + if ($sequence['schemaname'] != 'public') { + $sequenceName = $sequence['schemaname'] . "." . $sequence['relname']; + } else { + $sequenceName = $sequence['relname']; + } + + $data = $this->_conn->fetchAll('SELECT min_value, increment_by FROM ' . $this->_platform->quoteIdentifier($sequenceName)); + + return new Sequence($sequenceName, $data[0]['increment_by'], $data[0]['min_value']); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableColumnDefinition($tableColumn) + { + $tableColumn = array_change_key_case($tableColumn, CASE_LOWER); + + if (strtolower($tableColumn['type']) === 'varchar' || strtolower($tableColumn['type']) === 'bpchar') { + // get length from varchar definition + $length = preg_replace('~.*\(([0-9]*)\).*~', '$1', $tableColumn['complete_type']); + $tableColumn['length'] = $length; + } + + $matches = array(); + + $autoincrement = false; + if (preg_match("/^nextval\('(.*)'(::.*)?\)$/", $tableColumn['default'], $matches)) { + $tableColumn['sequence'] = $matches[1]; + $tableColumn['default'] = null; + $autoincrement = true; + } + + if (preg_match("/^'(.*)'::.*$/", $tableColumn['default'], $matches)) { + $tableColumn['default'] = $matches[1]; + } + + if (stripos($tableColumn['default'], 'NULL') === 0) { + $tableColumn['default'] = null; + } + + $length = (isset($tableColumn['length'])) ? $tableColumn['length'] : null; + if ($length == '-1' && isset($tableColumn['atttypmod'])) { + $length = $tableColumn['atttypmod'] - 4; + } + if ((int) $length <= 0) { + $length = null; + } + $fixed = null; + + if (!isset($tableColumn['name'])) { + $tableColumn['name'] = ''; + } + + $precision = null; + $scale = null; + + $dbType = strtolower($tableColumn['type']); + if (strlen($tableColumn['domain_type']) && !$this->_platform->hasDoctrineTypeMappingFor($tableColumn['type'])) { + $dbType = strtolower($tableColumn['domain_type']); + $tableColumn['complete_type'] = $tableColumn['domain_complete_type']; + } + + $type = $this->_platform->getDoctrineTypeMapping($dbType); + $type = $this->extractDoctrineTypeFromComment($tableColumn['comment'], $type); + $tableColumn['comment'] = $this->removeDoctrineTypeFromComment($tableColumn['comment'], $type); + + switch ($dbType) { + case 'smallint': + case 'int2': + $length = null; + break; + case 'int': + case 'int4': + case 'integer': + $length = null; + break; + case 'bigint': + case 'int8': + $length = null; + break; + case 'bool': + case 'boolean': + if ($tableColumn['default'] === 'true') { + $tableColumn['default'] = true; + } + + if ($tableColumn['default'] === 'false') { + $tableColumn['default'] = false; + } + + $length = null; + break; + case 'text': + $fixed = false; + break; + case 'varchar': + case 'interval': + case '_varchar': + $fixed = false; + break; + case 'char': + case 'bpchar': + $fixed = true; + break; + case 'float': + case 'float4': + case 'float8': + case 'double': + case 'double precision': + case 'real': + case 'decimal': + case 'money': + case 'numeric': + if (preg_match('([A-Za-z]+\(([0-9]+)\,([0-9]+)\))', $tableColumn['complete_type'], $match)) { + $precision = $match[1]; + $scale = $match[2]; + $length = null; + } + break; + case 'year': + $length = null; + break; + } + + if ($tableColumn['default'] && preg_match("('([^']+)'::)", $tableColumn['default'], $match)) { + $tableColumn['default'] = $match[1]; + } + + $options = array( + 'length' => $length, + 'notnull' => (bool) $tableColumn['isnotnull'], + 'default' => $tableColumn['default'], + 'primary' => (bool) ($tableColumn['pri'] == 't'), + 'precision' => $precision, + 'scale' => $scale, + 'fixed' => $fixed, + 'unsigned' => false, + 'autoincrement' => $autoincrement, + 'comment' => isset($tableColumn['comment']) && $tableColumn['comment'] !== '' + ? $tableColumn['comment'] + : null, + ); + + $column = new Column($tableColumn['field'], Type::getType($type), $options); + + if (isset($tableColumn['collation']) && !empty($tableColumn['collation'])) { + $column->setPlatformOption('collation', $tableColumn['collation']); + } + + return $column; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php new file mode 100644 index 0000000000000000000000000000000000000000..793a5fe8badf0aa6eef83cf16d46f47b830ce7c7 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php @@ -0,0 +1,243 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Types\Type; + +/** + * SAP Sybase SQL Anywhere schema manager. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +class SQLAnywhereSchemaManager extends AbstractSchemaManager +{ + /** + * {@inheritdoc} + * + * Starts a database after creation + * as SQL Anywhere needs a database to be started + * before it can be used. + * + * @see startDatabase + */ + public function createDatabase($database) + { + parent::createDatabase($database); + $this->startDatabase($database); + } + + /** + * {@inheritdoc} + * + * Tries stopping a database before dropping + * as SQL Anywhere needs a database to be stopped + * before it can be dropped. + * + * @see stopDatabase + */ + public function dropDatabase($database) + { + $this->tryMethod('stopDatabase', $database); + parent::dropDatabase($database); + } + + /** + * Starts a database. + * + * @param string $database The name of the database to start. + */ + public function startDatabase($database) + { + $this->_execSql($this->_platform->getStartDatabaseSQL($database)); + } + + /** + * Stops a database. + * + * @param string $database The name of the database to stop. + */ + public function stopDatabase($database) + { + $this->_execSql($this->_platform->getStopDatabaseSQL($database)); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableDatabaseDefinition($database) + { + return $database['name']; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableSequenceDefinition($sequence) + { + return new Sequence($sequence['sequence_name'], $sequence['increment_by'], $sequence['start_with']); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableColumnDefinition($tableColumn) + { + $type = $this->_platform->getDoctrineTypeMapping($tableColumn['type']); + $type = $this->extractDoctrineTypeFromComment($tableColumn['comment'], $type); + $tableColumn['comment'] = $this->removeDoctrineTypeFromComment($tableColumn['comment'], $type); + $precision = null; + $scale = null; + $fixed = false; + $default = null; + + if (null !== $tableColumn['default']) { + // Strip quotes from default value. + $default = preg_replace(array("/^'(.*)'$/", "/''/"), array("$1", "'"), $tableColumn['default']); + + if ('autoincrement' == $default) { + $default = null; + } + } + + switch ($tableColumn['type']) { + case 'binary': + case 'char': + case 'nchar': + $fixed = true; + } + + switch ($type) { + case 'decimal': + case 'float': + $precision = $tableColumn['length']; + $scale = $tableColumn['scale']; + } + + return new Column( + $tableColumn['column_name'], + Type::getType($type), + array( + 'length' => $type == 'string' ? $tableColumn['length'] : null, + 'precision' => $precision, + 'scale' => $scale, + 'unsigned' => (bool) $tableColumn['unsigned'], + 'fixed' => $fixed, + 'notnull' => (bool) $tableColumn['notnull'], + 'default' => $default, + 'autoincrement' => (bool) $tableColumn['autoincrement'], + 'comment' => isset($tableColumn['comment']) && '' !== $tableColumn['comment'] + ? $tableColumn['comment'] + : null, + )); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableDefinition($table) + { + return $table['table_name']; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableForeignKeyDefinition($tableForeignKey) + { + return new ForeignKeyConstraint( + $tableForeignKey['local_columns'], + $tableForeignKey['foreign_table'], + $tableForeignKey['foreign_columns'], + $tableForeignKey['name'], + $tableForeignKey['options'] + ); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableForeignKeysList($tableForeignKeys) + { + $foreignKeys = array(); + + foreach ($tableForeignKeys as $tableForeignKey) { + if (!isset($foreignKeys[$tableForeignKey['index_name']])) { + $foreignKeys[$tableForeignKey['index_name']] = array( + 'local_columns' => array($tableForeignKey['local_column']), + 'foreign_table' => $tableForeignKey['foreign_table'], + 'foreign_columns' => array($tableForeignKey['foreign_column']), + 'name' => $tableForeignKey['index_name'], + 'options' => array( + 'notnull' => $tableForeignKey['notnull'], + 'match' => $tableForeignKey['match'], + 'onUpdate' => $tableForeignKey['on_update'], + 'onDelete' => $tableForeignKey['on_delete'], + 'check_on_commit' => $tableForeignKey['check_on_commit'], + 'clustered' => $tableForeignKey['clustered'], + 'for_olap_workload' => $tableForeignKey['for_olap_workload'] + ) + ); + } else { + $foreignKeys[$tableForeignKey['index_name']]['local_columns'][] = $tableForeignKey['local_column']; + $foreignKeys[$tableForeignKey['index_name']]['foreign_columns'][] = $tableForeignKey['foreign_column']; + } + } + + return parent::_getPortableTableForeignKeysList($foreignKeys); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableIndexesList($tableIndexRows, $tableName = null) + { + foreach ($tableIndexRows as &$tableIndex) { + $tableIndex['primary'] = (boolean) $tableIndex['primary']; + $tableIndex['flags'] = array(); + + if ($tableIndex['clustered']) { + $tableIndex['flags'][] = 'clustered'; + } + + if ($tableIndex['with_nulls_not_distinct']) { + $tableIndex['flags'][] = 'with_nulls_not_distinct'; + } + + if ($tableIndex['for_olap_workload']) { + $tableIndex['flags'][] = 'for_olap_workload'; + } + } + + return parent::_getPortableTableIndexesList($tableIndexRows, $tableName); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableViewDefinition($view) + { + return new View( + $view['table_name'], + preg_replace('/^.*\s+as\s+SELECT(.*)/i', "SELECT$1", $view['view_def']) + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php new file mode 100644 index 0000000000000000000000000000000000000000..100a64c22b76d55a8f53cc9eb5bae6d5959ee2fa --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php @@ -0,0 +1,311 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Driver\DriverException; +use Doctrine\DBAL\Types\Type; + +/** + * SQL Server Schema Manager. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @author Konsta Vesterinen + * @author Lukas Smith (PEAR MDB2 library) + * @author Juozas Kaziukenas + * @author Steve Müller + * @since 2.0 + */ +class SQLServerSchemaManager extends AbstractSchemaManager +{ + /** + * {@inheritdoc} + */ + public function dropDatabase($database) + { + try { + parent::dropDatabase($database); + } catch (DBALException $exception) { + $exception = $exception->getPrevious(); + + if (! $exception instanceof DriverException) { + throw $exception; + } + + // If we have a error code 3702, the drop database operation failed + // because of active connections on the database. + // To force dropping the database, we first have to close all active connections + // on that database and issue the drop database operation again. + if ($exception->getErrorCode() !== 3702) { + throw $exception; + } + + $this->closeActiveDatabaseConnections($database); + + parent::dropDatabase($database); + } + } + + /** + * {@inheritdoc} + */ + protected function _getPortableSequenceDefinition($sequence) + { + return new Sequence($sequence['name'], $sequence['increment'], $sequence['start_value']); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableColumnDefinition($tableColumn) + { + $dbType = strtok($tableColumn['type'], '(), '); + $fixed = null; + $length = (int) $tableColumn['length']; + $default = $tableColumn['default']; + + if (!isset($tableColumn['name'])) { + $tableColumn['name'] = ''; + } + + while ($default != ($default2 = preg_replace("/^\((.*)\)$/", '$1', $default))) { + $default = trim($default2, "'"); + + if ($default == 'getdate()') { + $default = $this->_platform->getCurrentTimestampSQL(); + } + } + + switch ($dbType) { + case 'nchar': + case 'nvarchar': + case 'ntext': + // Unicode data requires 2 bytes per character + $length = $length / 2; + break; + case 'varchar': + // TEXT type is returned as VARCHAR(MAX) with a length of -1 + if ($length == -1) { + $dbType = 'text'; + } + break; + } + + if ('char' === $dbType || 'nchar' === $dbType || 'binary' === $dbType) { + $fixed = true; + } + + $type = $this->_platform->getDoctrineTypeMapping($dbType); + $type = $this->extractDoctrineTypeFromComment($tableColumn['comment'], $type); + $tableColumn['comment'] = $this->removeDoctrineTypeFromComment($tableColumn['comment'], $type); + + $options = array( + 'length' => ($length == 0 || !in_array($type, array('text', 'string'))) ? null : $length, + 'unsigned' => false, + 'fixed' => (bool) $fixed, + 'default' => $default !== 'NULL' ? $default : null, + 'notnull' => (bool) $tableColumn['notnull'], + 'scale' => $tableColumn['scale'], + 'precision' => $tableColumn['precision'], + 'autoincrement' => (bool) $tableColumn['autoincrement'], + 'comment' => $tableColumn['comment'] !== '' ? $tableColumn['comment'] : null, + ); + + $column = new Column($tableColumn['name'], Type::getType($type), $options); + + if (isset($tableColumn['collation']) && $tableColumn['collation'] !== 'NULL') { + $column->setPlatformOption('collation', $tableColumn['collation']); + } + + return $column; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableForeignKeysList($tableForeignKeys) + { + $foreignKeys = array(); + + foreach ($tableForeignKeys as $tableForeignKey) { + if ( ! isset($foreignKeys[$tableForeignKey['ForeignKey']])) { + $foreignKeys[$tableForeignKey['ForeignKey']] = array( + 'local_columns' => array($tableForeignKey['ColumnName']), + 'foreign_table' => $tableForeignKey['ReferenceTableName'], + 'foreign_columns' => array($tableForeignKey['ReferenceColumnName']), + 'name' => $tableForeignKey['ForeignKey'], + 'options' => array( + 'onUpdate' => str_replace('_', ' ', $tableForeignKey['update_referential_action_desc']), + 'onDelete' => str_replace('_', ' ', $tableForeignKey['delete_referential_action_desc']) + ) + ); + } else { + $foreignKeys[$tableForeignKey['ForeignKey']]['local_columns'][] = $tableForeignKey['ColumnName']; + $foreignKeys[$tableForeignKey['ForeignKey']]['foreign_columns'][] = $tableForeignKey['ReferenceColumnName']; + } + } + + return parent::_getPortableTableForeignKeysList($foreignKeys); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableIndexesList($tableIndexRows, $tableName=null) + { + foreach ($tableIndexRows as &$tableIndex) { + $tableIndex['non_unique'] = (boolean) $tableIndex['non_unique']; + $tableIndex['primary'] = (boolean) $tableIndex['primary']; + $tableIndex['flags'] = $tableIndex['flags'] ? array($tableIndex['flags']) : null; + } + + return parent::_getPortableTableIndexesList($tableIndexRows, $tableName); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableForeignKeyDefinition($tableForeignKey) + { + return new ForeignKeyConstraint( + $tableForeignKey['local_columns'], + $tableForeignKey['foreign_table'], + $tableForeignKey['foreign_columns'], + $tableForeignKey['name'], + $tableForeignKey['options'] + ); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableDefinition($table) + { + return $table['name']; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableDatabaseDefinition($database) + { + return $database['name']; + } + + /** + * {@inheritdoc} + */ + protected function getPortableNamespaceDefinition(array $namespace) + { + return $namespace['name']; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableViewDefinition($view) + { + // @todo + return new View($view['name'], null); + } + + /** + * {@inheritdoc} + */ + public function listTableIndexes($table) + { + $sql = $this->_platform->getListTableIndexesSQL($table, $this->_conn->getDatabase()); + + try { + $tableIndexes = $this->_conn->fetchAll($sql); + } catch (\PDOException $e) { + if ($e->getCode() == "IMSSP") { + return array(); + } else { + throw $e; + } + } catch (DBALException $e) { + if (strpos($e->getMessage(), 'SQLSTATE [01000, 15472]') === 0) { + return array(); + } else { + throw $e; + } + } + + return $this->_getPortableTableIndexesList($tableIndexes, $table); + } + + /** + * {@inheritdoc} + */ + public function alterTable(TableDiff $tableDiff) + { + if (count($tableDiff->removedColumns) > 0) { + foreach ($tableDiff->removedColumns as $col) { + $columnConstraintSql = $this->getColumnConstraintSQL($tableDiff->name, $col->getName()); + foreach ($this->_conn->fetchAll($columnConstraintSql) as $constraint) { + $this->_conn->exec("ALTER TABLE $tableDiff->name DROP CONSTRAINT " . $constraint['Name']); + } + } + } + + parent::alterTable($tableDiff); + } + + /** + * Returns the SQL to retrieve the constraints for a given column. + * + * @param string $table + * @param string $column + * + * @return string + */ + private function getColumnConstraintSQL($table, $column) + { + return "SELECT SysObjects.[Name] + FROM SysObjects INNER JOIN (SELECT [Name],[ID] FROM SysObjects WHERE XType = 'U') AS Tab + ON Tab.[ID] = Sysobjects.[Parent_Obj] + INNER JOIN sys.default_constraints DefCons ON DefCons.[object_id] = Sysobjects.[ID] + INNER JOIN SysColumns Col ON Col.[ColID] = DefCons.[parent_column_id] AND Col.[ID] = Tab.[ID] + WHERE Col.[Name] = " . $this->_conn->quote($column) ." AND Tab.[Name] = " . $this->_conn->quote($table) . " + ORDER BY Col.[Name]"; + } + + /** + * Closes currently active connections on the given database. + * + * This is useful to force DROP DATABASE operations which could fail because of active connections. + * + * @param string $database The name of the database to close currently active connections for. + * + * @return void + */ + private function closeActiveDatabaseConnections($database) + { + $database = new Identifier($database); + + $this->_execSql( + sprintf( + 'ALTER DATABASE %s SET SINGLE_USER WITH ROLLBACK IMMEDIATE', + $database->getQuotedName($this->_platform) + ) + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Schema.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Schema.php new file mode 100644 index 0000000000000000000000000000000000000000..b7e24fe9193c9b7225e4dbff72f26cf9b3e81119 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Schema.php @@ -0,0 +1,510 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector; +use Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector; +use Doctrine\DBAL\Schema\Visitor\NamespaceVisitor; +use Doctrine\DBAL\Schema\Visitor\Visitor; +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Object representation of a database schema. + * + * Different vendors have very inconsistent naming with regard to the concept + * of a "schema". Doctrine understands a schema as the entity that conceptually + * wraps a set of database objects such as tables, sequences, indexes and + * foreign keys that belong to each other into a namespace. A Doctrine Schema + * has nothing to do with the "SCHEMA" defined as in PostgreSQL, it is more + * related to the concept of "DATABASE" that exists in MySQL and PostgreSQL. + * + * Every asset in the doctrine schema has a name. A name consists of either a + * namespace.local name pair or just a local unqualified name. + * + * The abstraction layer that covers a PostgreSQL schema is the namespace of an + * database object (asset). A schema can have a name, which will be used as + * default namespace for the unqualified database objects that are created in + * the schema. + * + * In the case of MySQL where cross-database queries are allowed this leads to + * databases being "misinterpreted" as namespaces. This is intentional, however + * the CREATE/DROP SQL visitors will just filter this queries and do not + * execute them. Only the queries for the currently connected database are + * executed. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class Schema extends AbstractAsset +{ + /** + * The namespaces in this schema. + * + * @var array + */ + private $namespaces = array(); + + /** + * @var \Doctrine\DBAL\Schema\Table[] + */ + protected $_tables = array(); + + /** + * @var \Doctrine\DBAL\Schema\Sequence[] + */ + protected $_sequences = array(); + + /** + * @var \Doctrine\DBAL\Schema\SchemaConfig + */ + protected $_schemaConfig = false; + + /** + * @param \Doctrine\DBAL\Schema\Table[] $tables + * @param \Doctrine\DBAL\Schema\Sequence[] $sequences + * @param \Doctrine\DBAL\Schema\SchemaConfig $schemaConfig + * @param array $namespaces + */ + public function __construct( + array $tables = array(), + array $sequences = array(), + SchemaConfig $schemaConfig = null, + array $namespaces = array() + ) { + if ($schemaConfig == null) { + $schemaConfig = new SchemaConfig(); + } + $this->_schemaConfig = $schemaConfig; + $this->_setName($schemaConfig->getName() ?: 'public'); + + foreach ($namespaces as $namespace) { + $this->createNamespace($namespace); + } + + foreach ($tables as $table) { + $this->_addTable($table); + } + + foreach ($sequences as $sequence) { + $this->_addSequence($sequence); + } + } + + /** + * @return boolean + */ + public function hasExplicitForeignKeyIndexes() + { + return $this->_schemaConfig->hasExplicitForeignKeyIndexes(); + } + + /** + * @param \Doctrine\DBAL\Schema\Table $table + * + * @return void + * + * @throws \Doctrine\DBAL\Schema\SchemaException + */ + protected function _addTable(Table $table) + { + $namespaceName = $table->getNamespaceName(); + $tableName = $table->getFullQualifiedName($this->getName()); + + if (isset($this->_tables[$tableName])) { + throw SchemaException::tableAlreadyExists($tableName); + } + + if ( ! $table->isInDefaultNamespace($this->getName()) && ! $this->hasNamespace($namespaceName)) { + $this->createNamespace($namespaceName); + } + + $this->_tables[$tableName] = $table; + $table->setSchemaConfig($this->_schemaConfig); + } + + /** + * @param \Doctrine\DBAL\Schema\Sequence $sequence + * + * @return void + * + * @throws \Doctrine\DBAL\Schema\SchemaException + */ + protected function _addSequence(Sequence $sequence) + { + $namespaceName = $sequence->getNamespaceName(); + $seqName = $sequence->getFullQualifiedName($this->getName()); + + if (isset($this->_sequences[$seqName])) { + throw SchemaException::sequenceAlreadyExists($seqName); + } + + if ( ! $sequence->isInDefaultNamespace($this->getName()) && ! $this->hasNamespace($namespaceName)) { + $this->createNamespace($namespaceName); + } + + $this->_sequences[$seqName] = $sequence; + } + + /** + * Returns the namespaces of this schema. + * + * @return array A list of namespace names. + */ + public function getNamespaces() + { + return $this->namespaces; + } + + /** + * Gets all tables of this schema. + * + * @return \Doctrine\DBAL\Schema\Table[] + */ + public function getTables() + { + return $this->_tables; + } + + /** + * @param string $tableName + * + * @return \Doctrine\DBAL\Schema\Table + * + * @throws \Doctrine\DBAL\Schema\SchemaException + */ + public function getTable($tableName) + { + $tableName = $this->getFullQualifiedAssetName($tableName); + if (!isset($this->_tables[$tableName])) { + throw SchemaException::tableDoesNotExist($tableName); + } + + return $this->_tables[$tableName]; + } + + /** + * @param string $name + * + * @return string + */ + private function getFullQualifiedAssetName($name) + { + $name = $this->getUnquotedAssetName($name); + + if (strpos($name, ".") === false) { + $name = $this->getName() . "." . $name; + } + + return strtolower($name); + } + + /** + * Returns the unquoted representation of a given asset name. + * + * @param string $assetName Quoted or unquoted representation of an asset name. + * + * @return string + */ + private function getUnquotedAssetName($assetName) + { + if ($this->isIdentifierQuoted($assetName)) { + return $this->trimQuotes($assetName); + } + + return $assetName; + } + + /** + * Does this schema have a namespace with the given name? + * + * @param string $namespaceName + * + * @return boolean + */ + public function hasNamespace($namespaceName) + { + $namespaceName = strtolower($this->getUnquotedAssetName($namespaceName)); + + return isset($this->namespaces[$namespaceName]); + } + + /** + * Does this schema have a table with the given name? + * + * @param string $tableName + * + * @return boolean + */ + public function hasTable($tableName) + { + $tableName = $this->getFullQualifiedAssetName($tableName); + + return isset($this->_tables[$tableName]); + } + + /** + * Gets all table names, prefixed with a schema name, even the default one if present. + * + * @return array + */ + public function getTableNames() + { + return array_keys($this->_tables); + } + + /** + * @param string $sequenceName + * + * @return boolean + */ + public function hasSequence($sequenceName) + { + $sequenceName = $this->getFullQualifiedAssetName($sequenceName); + + return isset($this->_sequences[$sequenceName]); + } + + /** + * @param string $sequenceName + * + * @return \Doctrine\DBAL\Schema\Sequence + * + * @throws \Doctrine\DBAL\Schema\SchemaException + */ + public function getSequence($sequenceName) + { + $sequenceName = $this->getFullQualifiedAssetName($sequenceName); + if (!$this->hasSequence($sequenceName)) { + throw SchemaException::sequenceDoesNotExist($sequenceName); + } + + return $this->_sequences[$sequenceName]; + } + + /** + * @return \Doctrine\DBAL\Schema\Sequence[] + */ + public function getSequences() + { + return $this->_sequences; + } + + /** + * Creates a new namespace. + * + * @param string $namespaceName The name of the namespace to create. + * + * @return \Doctrine\DBAL\Schema\Schema This schema instance. + */ + public function createNamespace($namespaceName) + { + $unquotedNamespaceName = strtolower($this->getUnquotedAssetName($namespaceName)); + + if (isset($this->namespaces[$unquotedNamespaceName])) { + throw SchemaException::namespaceAlreadyExists($unquotedNamespaceName); + } + + $this->namespaces[$unquotedNamespaceName] = $namespaceName; + + return $this; + } + + /** + * Creates a new table. + * + * @param string $tableName + * + * @return \Doctrine\DBAL\Schema\Table + */ + public function createTable($tableName) + { + $table = new Table($tableName); + $this->_addTable($table); + + foreach ($this->_schemaConfig->getDefaultTableOptions() as $name => $value) { + $table->addOption($name, $value); + } + + return $table; + } + + /** + * Renames a table. + * + * @param string $oldTableName + * @param string $newTableName + * + * @return \Doctrine\DBAL\Schema\Schema + */ + public function renameTable($oldTableName, $newTableName) + { + $table = $this->getTable($oldTableName); + $table->_setName($newTableName); + + $this->dropTable($oldTableName); + $this->_addTable($table); + + return $this; + } + + /** + * Drops a table from the schema. + * + * @param string $tableName + * + * @return \Doctrine\DBAL\Schema\Schema + */ + public function dropTable($tableName) + { + $tableName = $this->getFullQualifiedAssetName($tableName); + $this->getTable($tableName); + unset($this->_tables[$tableName]); + + return $this; + } + + /** + * Creates a new sequence. + * + * @param string $sequenceName + * @param integer $allocationSize + * @param integer $initialValue + * + * @return \Doctrine\DBAL\Schema\Sequence + */ + public function createSequence($sequenceName, $allocationSize=1, $initialValue=1) + { + $seq = new Sequence($sequenceName, $allocationSize, $initialValue); + $this->_addSequence($seq); + + return $seq; + } + + /** + * @param string $sequenceName + * + * @return \Doctrine\DBAL\Schema\Schema + */ + public function dropSequence($sequenceName) + { + $sequenceName = $this->getFullQualifiedAssetName($sequenceName); + unset($this->_sequences[$sequenceName]); + + return $this; + } + + /** + * Returns an array of necessary SQL queries to create the schema on the given platform. + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return array + */ + public function toSql(AbstractPlatform $platform) + { + $sqlCollector = new CreateSchemaSqlCollector($platform); + $this->visit($sqlCollector); + + return $sqlCollector->getQueries(); + } + + /** + * Return an array of necessary SQL queries to drop the schema on the given platform. + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return array + */ + public function toDropSql(AbstractPlatform $platform) + { + $dropSqlCollector = new DropSchemaSqlCollector($platform); + $this->visit($dropSqlCollector); + + return $dropSqlCollector->getQueries(); + } + + /** + * @param \Doctrine\DBAL\Schema\Schema $toSchema + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return array + */ + public function getMigrateToSql(Schema $toSchema, AbstractPlatform $platform) + { + $comparator = new Comparator(); + $schemaDiff = $comparator->compare($this, $toSchema); + + return $schemaDiff->toSql($platform); + } + + /** + * @param \Doctrine\DBAL\Schema\Schema $fromSchema + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return array + */ + public function getMigrateFromSql(Schema $fromSchema, AbstractPlatform $platform) + { + $comparator = new Comparator(); + $schemaDiff = $comparator->compare($fromSchema, $this); + + return $schemaDiff->toSql($platform); + } + + /** + * @param \Doctrine\DBAL\Schema\Visitor\Visitor $visitor + * + * @return void + */ + public function visit(Visitor $visitor) + { + $visitor->acceptSchema($this); + + if ($visitor instanceof NamespaceVisitor) { + foreach ($this->namespaces as $namespace) { + $visitor->acceptNamespace($namespace); + } + } + + foreach ($this->_tables as $table) { + $table->visit($visitor); + } + + foreach ($this->_sequences as $sequence) { + $sequence->visit($visitor); + } + } + + /** + * Cloning a Schema triggers a deep clone of all related assets. + * + * @return void + */ + public function __clone() + { + foreach ($this->_tables as $k => $table) { + $this->_tables[$k] = clone $table; + } + foreach ($this->_sequences as $k => $sequence) { + $this->_sequences[$k] = clone $sequence; + } + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaConfig.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..cc23237d87bfe64f442ccf23ed30f45106adc62e --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaConfig.php @@ -0,0 +1,129 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +/** + * Configuration for a Schema. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class SchemaConfig +{ + /** + * @var boolean + */ + protected $hasExplicitForeignKeyIndexes = false; + + /** + * @var integer + */ + protected $maxIdentifierLength = 63; + + /** + * @var string + */ + protected $name; + + /** + * @var array + */ + protected $defaultTableOptions = array(); + + /** + * @return boolean + */ + public function hasExplicitForeignKeyIndexes() + { + return $this->hasExplicitForeignKeyIndexes; + } + + /** + * @param boolean $flag + * + * @return void + */ + public function setExplicitForeignKeyIndexes($flag) + { + $this->hasExplicitForeignKeyIndexes = (bool) $flag; + } + + /** + * @param integer $length + * + * @return void + */ + public function setMaxIdentifierLength($length) + { + $this->maxIdentifierLength = (int) $length; + } + + /** + * @return integer + */ + public function getMaxIdentifierLength() + { + return $this->maxIdentifierLength; + } + + /** + * Gets the default namespace of schema objects. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Sets the default namespace name of schema objects. + * + * @param string $name The value to set. + * + * @return void + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * Gets the default options that are passed to Table instances created with + * Schema#createTable(). + * + * @return array + */ + public function getDefaultTableOptions() + { + return $this->defaultTableOptions; + } + + /** + * @param array $defaultTableOptions + * + * @return void + */ + public function setDefaultTableOptions(array $defaultTableOptions) + { + $this->defaultTableOptions = $defaultTableOptions; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaDiff.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaDiff.php new file mode 100644 index 0000000000000000000000000000000000000000..23eccdad8ca1ae44b187e5e73e046823588d1e3d --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaDiff.php @@ -0,0 +1,204 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use \Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Schema Diff. + * + * @link www.doctrine-project.org + * @copyright Copyright (C) 2005-2009 eZ Systems AS. All rights reserved. + * @license http://ez.no/licenses/new_bsd New BSD License + * @since 2.0 + * @author Benjamin Eberlei + */ +class SchemaDiff +{ + /** + * @var \Doctrine\DBAL\Schema\Schema + */ + public $fromSchema; + + /** + * All added namespaces. + * + * @var string[] + */ + public $newNamespaces = array(); + + /** + * All removed namespaces. + * + * @var string[] + */ + public $removedNamespaces = array(); + + /** + * All added tables. + * + * @var \Doctrine\DBAL\Schema\Table[] + */ + public $newTables = array(); + + /** + * All changed tables. + * + * @var \Doctrine\DBAL\Schema\TableDiff[] + */ + public $changedTables = array(); + + /** + * All removed tables. + * + * @var \Doctrine\DBAL\Schema\Table[] + */ + public $removedTables = array(); + + /** + * @var \Doctrine\DBAL\Schema\Sequence[] + */ + public $newSequences = array(); + + /** + * @var \Doctrine\DBAL\Schema\Sequence[] + */ + public $changedSequences = array(); + + /** + * @var \Doctrine\DBAL\Schema\Sequence[] + */ + public $removedSequences = array(); + + /** + * @var \Doctrine\DBAL\Schema\ForeignKeyConstraint[] + */ + public $orphanedForeignKeys = array(); + + /** + * Constructs an SchemaDiff object. + * + * @param \Doctrine\DBAL\Schema\Table[] $newTables + * @param \Doctrine\DBAL\Schema\TableDiff[] $changedTables + * @param \Doctrine\DBAL\Schema\Table[] $removedTables + * @param \Doctrine\DBAL\Schema\Schema|null $fromSchema + */ + public function __construct($newTables = array(), $changedTables = array(), $removedTables = array(), Schema $fromSchema = null) + { + $this->newTables = $newTables; + $this->changedTables = $changedTables; + $this->removedTables = $removedTables; + $this->fromSchema = $fromSchema; + } + + /** + * The to save sql mode ensures that the following things don't happen: + * + * 1. Tables are deleted + * 2. Sequences are deleted + * 3. Foreign Keys which reference tables that would otherwise be deleted. + * + * This way it is ensured that assets are deleted which might not be relevant to the metadata schema at all. + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return array + */ + public function toSaveSql(AbstractPlatform $platform) + { + return $this->_toSql($platform, true); + } + + /** + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return array + */ + public function toSql(AbstractPlatform $platform) + { + return $this->_toSql($platform, false); + } + + /** + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * @param boolean $saveMode + * + * @return array + */ + protected function _toSql(AbstractPlatform $platform, $saveMode = false) + { + $sql = array(); + + if ($platform->supportsSchemas()) { + foreach ($this->newNamespaces as $newNamespace) { + $sql[] = $platform->getCreateSchemaSQL($newNamespace); + } + } + + if ($platform->supportsForeignKeyConstraints() && $saveMode == false) { + foreach ($this->orphanedForeignKeys as $orphanedForeignKey) { + $sql[] = $platform->getDropForeignKeySQL($orphanedForeignKey, $orphanedForeignKey->getLocalTable()); + } + } + + if ($platform->supportsSequences() == true) { + foreach ($this->changedSequences as $sequence) { + $sql[] = $platform->getAlterSequenceSQL($sequence); + } + + if ($saveMode === false) { + foreach ($this->removedSequences as $sequence) { + $sql[] = $platform->getDropSequenceSQL($sequence); + } + } + + foreach ($this->newSequences as $sequence) { + $sql[] = $platform->getCreateSequenceSQL($sequence); + } + } + + $foreignKeySql = array(); + foreach ($this->newTables as $table) { + $sql = array_merge( + $sql, + $platform->getCreateTableSQL($table, AbstractPlatform::CREATE_INDEXES) + ); + + if ($platform->supportsForeignKeyConstraints()) { + foreach ($table->getForeignKeys() as $foreignKey) { + $foreignKeySql[] = $platform->getCreateForeignKeySQL($foreignKey, $table); + } + } + } + $sql = array_merge($sql, $foreignKeySql); + + if ($saveMode === false) { + foreach ($this->removedTables as $table) { + $sql[] = $platform->getDropTableSQL($table); + } + } + + foreach ($this->changedTables as $tableDiff) { + $sql = array_merge($sql, $platform->getAlterTableSQL($tableDiff)); + } + + return $sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaException.php new file mode 100644 index 0000000000000000000000000000000000000000..152f374da0986964b16b477f4dd511e1ea22d5d2 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaException.php @@ -0,0 +1,181 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +class SchemaException extends \Doctrine\DBAL\DBALException +{ + const TABLE_DOESNT_EXIST = 10; + const TABLE_ALREADY_EXISTS = 20; + const COLUMN_DOESNT_EXIST = 30; + const COLUMN_ALREADY_EXISTS = 40; + const INDEX_DOESNT_EXIST = 50; + const INDEX_ALREADY_EXISTS = 60; + const SEQUENCE_DOENST_EXIST = 70; + const SEQUENCE_ALREADY_EXISTS = 80; + const INDEX_INVALID_NAME = 90; + const FOREIGNKEY_DOESNT_EXIST = 100; + const NAMESPACE_ALREADY_EXISTS = 110; + + /** + * @param string $tableName + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function tableDoesNotExist($tableName) + { + return new self("There is no table with name '".$tableName."' in the schema.", self::TABLE_DOESNT_EXIST); + } + + /** + * @param string $indexName + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function indexNameInvalid($indexName) + { + return new self("Invalid index-name $indexName given, has to be [a-zA-Z0-9_]", self::INDEX_INVALID_NAME); + } + + /** + * @param string $indexName + * @param string $table + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function indexDoesNotExist($indexName, $table) + { + return new self("Index '$indexName' does not exist on table '$table'.", self::INDEX_DOESNT_EXIST); + } + + /** + * @param string $indexName + * @param string $table + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function indexAlreadyExists($indexName, $table) + { + return new self("An index with name '$indexName' was already defined on table '$table'.", self::INDEX_ALREADY_EXISTS); + } + + /** + * @param string $columnName + * @param string $table + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function columnDoesNotExist($columnName, $table) + { + return new self("There is no column with name '$columnName' on table '$table'.", self::COLUMN_DOESNT_EXIST); + } + + /** + * @param string $namespaceName + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function namespaceAlreadyExists($namespaceName) + { + return new self( + sprintf("The namespace with name '%s' already exists.", $namespaceName), + self::NAMESPACE_ALREADY_EXISTS + ); + } + + /** + * @param string $tableName + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function tableAlreadyExists($tableName) + { + return new self("The table with name '".$tableName."' already exists.", self::TABLE_ALREADY_EXISTS); + } + + /** + * @param string $tableName + * @param string $columnName + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function columnAlreadyExists($tableName, $columnName) + { + return new self( + "The column '".$columnName."' on table '".$tableName."' already exists.", self::COLUMN_ALREADY_EXISTS + ); + } + + /** + * @param string $sequenceName + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function sequenceAlreadyExists($sequenceName) + { + return new self("The sequence '".$sequenceName."' already exists.", self::SEQUENCE_ALREADY_EXISTS); + } + + /** + * @param string $sequenceName + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function sequenceDoesNotExist($sequenceName) + { + return new self("There exists no sequence with the name '".$sequenceName."'.", self::SEQUENCE_DOENST_EXIST); + } + + /** + * @param string $fkName + * @param string $table + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function foreignKeyDoesNotExist($fkName, $table) + { + return new self("There exists no foreign key with the name '$fkName' on table '$table'.", self::FOREIGNKEY_DOESNT_EXIST); + } + + /** + * @param \Doctrine\DBAL\Schema\Table $localTable + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function namedForeignKeyRequired(Table $localTable, ForeignKeyConstraint $foreignKey) + { + return new self( + "The performed schema operation on ".$localTable->getName()." requires a named foreign key, ". + "but the given foreign key from (".implode(", ", $foreignKey->getColumns()).") onto foreign table ". + "'".$foreignKey->getForeignTableName()."' (".implode(", ", $foreignKey->getForeignColumns()).") is currently ". + "unnamed." + ); + } + + /** + * @param string $changeName + * + * @return \Doctrine\DBAL\Schema\SchemaException + */ + static public function alterTableChangeNotSupported($changeName) + { + return new self("Alter table change not supported, given '$changeName'"); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Sequence.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Sequence.php new file mode 100644 index 0000000000000000000000000000000000000000..cc5b5016e1f6016675f01f0e484ee8db6406407e --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Sequence.php @@ -0,0 +1,166 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Schema\Visitor\Visitor; + +/** + * Sequence structure. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class Sequence extends AbstractAsset +{ + /** + * @var integer + */ + protected $allocationSize = 1; + + /** + * @var integer + */ + protected $initialValue = 1; + + /** + * @var integer|null + */ + protected $cache = null; + + /** + * @param string $name + * @param integer $allocationSize + * @param integer $initialValue + * @param integer|null $cache + */ + public function __construct($name, $allocationSize = 1, $initialValue = 1, $cache = null) + { + $this->_setName($name); + $this->allocationSize = is_numeric($allocationSize) ? $allocationSize : 1; + $this->initialValue = is_numeric($initialValue) ? $initialValue : 1; + $this->cache = $cache; + } + + /** + * @return integer + */ + public function getAllocationSize() + { + return $this->allocationSize; + } + + /** + * @return integer + */ + public function getInitialValue() + { + return $this->initialValue; + } + + /** + * @return integer|null + */ + public function getCache() + { + return $this->cache; + } + + /** + * @param integer $allocationSize + * + * @return \Doctrine\DBAL\Schema\Sequence + */ + public function setAllocationSize($allocationSize) + { + $this->allocationSize = is_numeric($allocationSize) ? $allocationSize : 1; + + return $this; + } + + /** + * @param integer $initialValue + * + * @return \Doctrine\DBAL\Schema\Sequence + */ + public function setInitialValue($initialValue) + { + $this->initialValue = is_numeric($initialValue) ? $initialValue : 1; + + return $this; + } + + /** + * @param integer $cache + * + * @return \Doctrine\DBAL\Schema\Sequence + */ + public function setCache($cache) + { + $this->cache = $cache; + + return $this; + } + + /** + * Checks if this sequence is an autoincrement sequence for a given table. + * + * This is used inside the comparator to not report sequences as missing, + * when the "from" schema implicitly creates the sequences. + * + * @param \Doctrine\DBAL\Schema\Table $table + * + * @return boolean + */ + public function isAutoIncrementsFor(Table $table) + { + if ( ! $table->hasPrimaryKey()) { + return false; + } + + $pkColumns = $table->getPrimaryKey()->getColumns(); + + if (count($pkColumns) != 1) { + return false; + } + + $column = $table->getColumn($pkColumns[0]); + + if ( ! $column->getAutoincrement()) { + return false; + } + + $sequenceName = $this->getShortestName($table->getNamespaceName()); + $tableName = $table->getShortestName($table->getNamespaceName()); + $tableSequenceName = sprintf('%s_%s_seq', $tableName, $pkColumns[0]); + + return $tableSequenceName === $sequenceName; + } + + /** + * @param \Doctrine\DBAL\Schema\Visitor\Visitor $visitor + * + * @return void + */ + public function visit(Visitor $visitor) + { + $visitor->acceptSequence($this); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php new file mode 100644 index 0000000000000000000000000000000000000000..7cf166e3562ffd7adeed353341b8b8848c4b5365 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php @@ -0,0 +1,433 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Types\StringType; +use Doctrine\DBAL\Types\TextType; + +/** + * Sqlite SchemaManager. + * + * @author Konsta Vesterinen + * @author Lukas Smith (PEAR MDB2 library) + * @author Jonathan H. Wage + * @author Martin Hasoň + * @since 2.0 + */ +class SqliteSchemaManager extends AbstractSchemaManager +{ + /** + * {@inheritdoc} + */ + public function dropDatabase($database) + { + if (file_exists($database)) { + unlink($database); + } + } + + /** + * {@inheritdoc} + */ + public function createDatabase($database) + { + $params = $this->_conn->getParams(); + $driver = $params['driver']; + $options = array( + 'driver' => $driver, + 'path' => $database + ); + $conn = \Doctrine\DBAL\DriverManager::getConnection($options); + $conn->connect(); + $conn->close(); + } + + /** + * {@inheritdoc} + */ + public function renameTable($name, $newName) + { + $tableDiff = new TableDiff($name); + $tableDiff->fromTable = $this->listTableDetails($name); + $tableDiff->newName = $newName; + $this->alterTable($tableDiff); + } + + /** + * {@inheritdoc} + */ + public function createForeignKey(ForeignKeyConstraint $foreignKey, $table) + { + $tableDiff = $this->getTableDiffForAlterForeignKey($foreignKey, $table); + $tableDiff->addedForeignKeys[] = $foreignKey; + + $this->alterTable($tableDiff); + } + + /** + * {@inheritdoc} + */ + public function dropAndCreateForeignKey(ForeignKeyConstraint $foreignKey, $table) + { + $tableDiff = $this->getTableDiffForAlterForeignKey($foreignKey, $table); + $tableDiff->changedForeignKeys[] = $foreignKey; + + $this->alterTable($tableDiff); + } + + /** + * {@inheritdoc} + */ + public function dropForeignKey($foreignKey, $table) + { + $tableDiff = $this->getTableDiffForAlterForeignKey($foreignKey, $table); + $tableDiff->removedForeignKeys[] = $foreignKey; + + $this->alterTable($tableDiff); + } + + /** + * {@inheritdoc} + */ + public function listTableForeignKeys($table, $database = null) + { + if (null === $database) { + $database = $this->_conn->getDatabase(); + } + $sql = $this->_platform->getListTableForeignKeysSQL($table, $database); + $tableForeignKeys = $this->_conn->fetchAll($sql); + + if ( ! empty($tableForeignKeys)) { + $createSql = $this->_conn->fetchAll("SELECT sql FROM (SELECT * FROM sqlite_master UNION ALL SELECT * FROM sqlite_temp_master) WHERE type = 'table' AND name = '$table'"); + $createSql = isset($createSql[0]['sql']) ? $createSql[0]['sql'] : ''; + if (preg_match_all('# + (?:CONSTRAINT\s+([^\s]+)\s+)? + (?:FOREIGN\s+KEY[^\)]+\)\s*)? + REFERENCES\s+[^\s]+\s+(?:\([^\)]+\))? + (?: + [^,]*? + (NOT\s+DEFERRABLE|DEFERRABLE) + (?:\s+INITIALLY\s+(DEFERRED|IMMEDIATE))? + )?#isx', + $createSql, $match)) { + + $names = array_reverse($match[1]); + $deferrable = array_reverse($match[2]); + $deferred = array_reverse($match[3]); + } else { + $names = $deferrable = $deferred = array(); + } + + foreach ($tableForeignKeys as $key => $value) { + $id = $value['id']; + $tableForeignKeys[$key]['constraint_name'] = isset($names[$id]) && '' != $names[$id] ? $names[$id] : $id; + $tableForeignKeys[$key]['deferrable'] = isset($deferrable[$id]) && 'deferrable' == strtolower($deferrable[$id]) ? true : false; + $tableForeignKeys[$key]['deferred'] = isset($deferred[$id]) && 'deferred' == strtolower($deferred[$id]) ? true : false; + } + } + + return $this->_getPortableTableForeignKeysList($tableForeignKeys); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableDefinition($table) + { + return $table['name']; + } + + /** + * {@inheritdoc} + * + * @license New BSD License + * @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaPgsqlReader.html + */ + protected function _getPortableTableIndexesList($tableIndexes, $tableName=null) + { + $indexBuffer = array(); + + // fetch primary + $stmt = $this->_conn->executeQuery("PRAGMA TABLE_INFO ('$tableName')"); + $indexArray = $stmt->fetchAll(\PDO::FETCH_ASSOC); + usort($indexArray, function($a, $b) { + if ($a['pk'] == $b['pk']) { + return $a['cid'] - $b['cid']; + } + + return $a['pk'] - $b['pk']; + }); + foreach ($indexArray as $indexColumnRow) { + if ($indexColumnRow['pk'] != "0") { + $indexBuffer[] = array( + 'key_name' => 'primary', + 'primary' => true, + 'non_unique' => false, + 'column_name' => $indexColumnRow['name'] + ); + } + } + + // fetch regular indexes + foreach ($tableIndexes as $tableIndex) { + // Ignore indexes with reserved names, e.g. autoindexes + if (strpos($tableIndex['name'], 'sqlite_') !== 0) { + $keyName = $tableIndex['name']; + $idx = array(); + $idx['key_name'] = $keyName; + $idx['primary'] = false; + $idx['non_unique'] = $tableIndex['unique']?false:true; + + $stmt = $this->_conn->executeQuery("PRAGMA INDEX_INFO ('{$keyName}')"); + $indexArray = $stmt->fetchAll(\PDO::FETCH_ASSOC); + + foreach ($indexArray as $indexColumnRow) { + $idx['column_name'] = $indexColumnRow['name']; + $indexBuffer[] = $idx; + } + } + } + + return parent::_getPortableTableIndexesList($indexBuffer, $tableName); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableIndexDefinition($tableIndex) + { + return array( + 'name' => $tableIndex['name'], + 'unique' => (bool) $tableIndex['unique'] + ); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableColumnList($table, $database, $tableColumns) + { + $list = parent::_getPortableTableColumnList($table, $database, $tableColumns); + + // find column with autoincrement + $autoincrementColumn = null; + $autoincrementCount = 0; + + foreach ($tableColumns as $tableColumn) { + if ('0' != $tableColumn['pk']) { + $autoincrementCount++; + if (null === $autoincrementColumn && 'integer' == strtolower($tableColumn['type'])) { + $autoincrementColumn = $tableColumn['name']; + } + } + } + + if (1 == $autoincrementCount && null !== $autoincrementColumn) { + foreach ($list as $column) { + if ($autoincrementColumn == $column->getName()) { + $column->setAutoincrement(true); + } + } + } + + // inspect column collation + $createSql = $this->_conn->fetchAll("SELECT sql FROM (SELECT * FROM sqlite_master UNION ALL SELECT * FROM sqlite_temp_master) WHERE type = 'table' AND name = '$table'"); + $createSql = isset($createSql[0]['sql']) ? $createSql[0]['sql'] : ''; + + foreach ($list as $columnName => $column) { + $type = $column->getType(); + + if ($type instanceof StringType || $type instanceof TextType) { + $column->setPlatformOption('collation', $this->parseColumnCollationFromSQL($columnName, $createSql) ?: 'BINARY'); + } + } + + return $list; + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableColumnDefinition($tableColumn) + { + $parts = explode('(', $tableColumn['type']); + $tableColumn['type'] = trim($parts[0]); + if (isset($parts[1])) { + $length = trim($parts[1], ')'); + $tableColumn['length'] = $length; + } + + $dbType = strtolower($tableColumn['type']); + $length = isset($tableColumn['length']) ? $tableColumn['length'] : null; + $unsigned = false; + + if (strpos($dbType, ' unsigned') !== false) { + $dbType = str_replace(' unsigned', '', $dbType); + $unsigned = true; + } + + $fixed = false; + $type = $this->_platform->getDoctrineTypeMapping($dbType); + $default = $tableColumn['dflt_value']; + if ($default == 'NULL') { + $default = null; + } + if ($default !== null) { + // SQLite returns strings wrapped in single quotes, so we need to strip them + $default = preg_replace("/^'(.*)'$/", '\1', $default); + } + $notnull = (bool) $tableColumn['notnull']; + + if ( ! isset($tableColumn['name'])) { + $tableColumn['name'] = ''; + } + + $precision = null; + $scale = null; + + switch ($dbType) { + case 'char': + $fixed = true; + break; + case 'float': + case 'double': + case 'real': + case 'decimal': + case 'numeric': + if (isset($tableColumn['length'])) { + if (strpos($tableColumn['length'], ',') === false) { + $tableColumn['length'] .= ",0"; + } + list($precision, $scale) = array_map('trim', explode(',', $tableColumn['length'])); + } + $length = null; + break; + } + + $options = array( + 'length' => $length, + 'unsigned' => (bool) $unsigned, + 'fixed' => $fixed, + 'notnull' => $notnull, + 'default' => $default, + 'precision' => $precision, + 'scale' => $scale, + 'autoincrement' => false, + ); + + return new Column($tableColumn['name'], \Doctrine\DBAL\Types\Type::getType($type), $options); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableViewDefinition($view) + { + return new View($view['name'], $view['sql']); + } + + /** + * {@inheritdoc} + */ + protected function _getPortableTableForeignKeysList($tableForeignKeys) + { + $list = array(); + foreach ($tableForeignKeys as $value) { + $value = array_change_key_case($value, CASE_LOWER); + $name = $value['constraint_name']; + if ( ! isset($list[$name])) { + if ( ! isset($value['on_delete']) || $value['on_delete'] == "RESTRICT") { + $value['on_delete'] = null; + } + if ( ! isset($value['on_update']) || $value['on_update'] == "RESTRICT") { + $value['on_update'] = null; + } + + $list[$name] = array( + 'name' => $name, + 'local' => array(), + 'foreign' => array(), + 'foreignTable' => $value['table'], + 'onDelete' => $value['on_delete'], + 'onUpdate' => $value['on_update'], + 'deferrable' => $value['deferrable'], + 'deferred'=> $value['deferred'], + ); + } + $list[$name]['local'][] = $value['from']; + $list[$name]['foreign'][] = $value['to']; + } + + $result = array(); + foreach ($list as $constraint) { + $result[] = new ForeignKeyConstraint( + array_values($constraint['local']), $constraint['foreignTable'], + array_values($constraint['foreign']), $constraint['name'], + array( + 'onDelete' => $constraint['onDelete'], + 'onUpdate' => $constraint['onUpdate'], + 'deferrable' => $constraint['deferrable'], + 'deferred'=> $constraint['deferred'], + ) + ); + } + + return $result; + } + + /** + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey + * @param \Doctrine\DBAL\Schema\Table|string $table + * + * @return \Doctrine\DBAL\Schema\TableDiff + * + * @throws \Doctrine\DBAL\DBALException + */ + private function getTableDiffForAlterForeignKey(ForeignKeyConstraint $foreignKey, $table) + { + if ( ! $table instanceof Table) { + $tableDetails = $this->tryMethod('listTableDetails', $table); + if (false === $table) { + throw new DBALException(sprintf('Sqlite schema manager requires to modify foreign keys table definition "%s".', $table)); + } + + $table = $tableDetails; + } + + $tableDiff = new TableDiff($table->getName()); + $tableDiff->fromTable = $table; + + return $tableDiff; + } + + private function parseColumnCollationFromSQL($column, $sql) + { + if (preg_match( + '{(?:'.preg_quote($column).'|'.preg_quote($this->_platform->quoteSingleIdentifier($column)).') + [^,(]+(?:\([^()]+\)[^,]*)? + (?:(?:DEFAULT|CHECK)\s*(?:\(.*?\))?[^,]*)* + COLLATE\s+["\']?([^\s,"\')]+)}isx', $sql, $match)) { + return $match[1]; + } + + return false; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Synchronizer/AbstractSchemaSynchronizer.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Synchronizer/AbstractSchemaSynchronizer.php new file mode 100644 index 0000000000000000000000000000000000000000..3158df47de17b4448987d05ac197af3ec7639e87 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Synchronizer/AbstractSchemaSynchronizer.php @@ -0,0 +1,65 @@ +. + */ + +namespace Doctrine\DBAL\Schema\Synchronizer; + +use Doctrine\DBAL\Connection; + +/** + * Abstract schema synchronizer with methods for executing batches of SQL. + */ +abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer +{ + /** + * @var \Doctrine\DBAL\Connection + */ + protected $conn; + + /** + * @param \Doctrine\DBAL\Connection $conn + */ + public function __construct(Connection $conn) + { + $this->conn = $conn; + } + + /** + * @param array $sql + */ + protected function processSqlSafely(array $sql) + { + foreach ($sql as $s) { + try { + $this->conn->exec($s); + } catch (\Exception $e) { + + } + } + } + + /** + * @param array $sql + */ + protected function processSql(array $sql) + { + foreach ($sql as $s) { + $this->conn->exec($s); + } + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Synchronizer/SchemaSynchronizer.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Synchronizer/SchemaSynchronizer.php new file mode 100644 index 0000000000000000000000000000000000000000..1a5552ea681754fca1edf75aa5b9a711256d2f22 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Synchronizer/SchemaSynchronizer.php @@ -0,0 +1,101 @@ +. + */ + +namespace Doctrine\DBAL\Schema\Synchronizer; + +use Doctrine\DBAL\Schema\Schema; + +/** + * The synchronizer knows how to synchronize a schema with the configured + * database. + * + * @author Benjamin Eberlei + */ +interface SchemaSynchronizer +{ + /** + * Gets the SQL statements that can be executed to create the schema. + * + * @param \Doctrine\DBAL\Schema\Schema $createSchema + * + * @return array + */ + function getCreateSchema(Schema $createSchema); + + /** + * Gets the SQL Statements to update given schema with the underlying db. + * + * @param \Doctrine\DBAL\Schema\Schema $toSchema + * @param boolean $noDrops + * + * @return array + */ + function getUpdateSchema(Schema $toSchema, $noDrops = false); + + /** + * Gets the SQL Statements to drop the given schema from underlying db. + * + * @param \Doctrine\DBAL\Schema\Schema $dropSchema + * + * @return array + */ + function getDropSchema(Schema $dropSchema); + + /** + * Gets the SQL statements to drop all schema assets from underlying db. + * + * @return array + */ + function getDropAllSchema(); + + /** + * Creates the Schema. + * + * @param \Doctrine\DBAL\Schema\Schema $createSchema + * + * @return void + */ + function createSchema(Schema $createSchema); + + /** + * Updates the Schema to new schema version. + * + * @param \Doctrine\DBAL\Schema\Schema $toSchema + * @param boolean $noDrops + * + * @return void + */ + function updateSchema(Schema $toSchema, $noDrops = false); + + /** + * Drops the given database schema from the underlying db. + * + * @param \Doctrine\DBAL\Schema\Schema $dropSchema + * + * @return void + */ + function dropSchema(Schema $dropSchema); + + /** + * Drops all assets from the underlying db. + * + * @return void + */ + function dropAllSchema(); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php new file mode 100644 index 0000000000000000000000000000000000000000..7cab7a5b3a173b34198d26306d9a98cdd93712e8 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php @@ -0,0 +1,176 @@ +. + */ + +namespace Doctrine\DBAL\Schema\Synchronizer; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Schema\Comparator; +use Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector; + +/** + * Schema Synchronizer for Default DBAL Connection. + * + * @author Benjamin Eberlei + */ +class SingleDatabaseSynchronizer extends AbstractSchemaSynchronizer +{ + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $platform; + + /** + * @param \Doctrine\DBAL\Connection $conn + */ + public function __construct(Connection $conn) + { + parent::__construct($conn); + $this->platform = $conn->getDatabasePlatform(); + } + + /** + * {@inheritdoc} + */ + public function getCreateSchema(Schema $createSchema) + { + return $createSchema->toSql($this->platform); + } + + + /** + * {@inheritdoc} + */ + public function getUpdateSchema(Schema $toSchema, $noDrops = false) + { + $comparator = new Comparator(); + $sm = $this->conn->getSchemaManager(); + + $fromSchema = $sm->createSchema(); + $schemaDiff = $comparator->compare($fromSchema, $toSchema); + + if ($noDrops) { + return $schemaDiff->toSaveSql($this->platform); + } + + return $schemaDiff->toSql($this->platform); + } + + /** + * {@inheritdoc} + */ + public function getDropSchema(Schema $dropSchema) + { + $visitor = new DropSchemaSqlCollector($this->platform); + $sm = $this->conn->getSchemaManager(); + + $fullSchema = $sm->createSchema(); + + foreach ($fullSchema->getTables() as $table) { + if ($dropSchema->hasTable($table->getName())) { + $visitor->acceptTable($table); + } + + foreach ($table->getForeignKeys() as $foreignKey) { + if ( ! $dropSchema->hasTable($table->getName())) { + continue; + } + + if ( ! $dropSchema->hasTable($foreignKey->getForeignTableName())) { + continue; + } + + $visitor->acceptForeignKey($table, $foreignKey); + } + } + + if ( ! $this->platform->supportsSequences()) { + return $visitor->getQueries(); + } + + foreach ($dropSchema->getSequences() as $sequence) { + $visitor->acceptSequence($sequence); + } + + foreach ($dropSchema->getTables() as $table) { + if ( ! $table->hasPrimaryKey()) { + continue; + } + + $columns = $table->getPrimaryKey()->getColumns(); + if (count($columns) > 1) { + continue; + } + + $checkSequence = $table->getName() . "_" . $columns[0] . "_seq"; + if ($fullSchema->hasSequence($checkSequence)) { + $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); + } + } + + return $visitor->getQueries(); + } + + /** + * {@inheritdoc} + */ + public function getDropAllSchema() + { + $sm = $this->conn->getSchemaManager(); + $visitor = new DropSchemaSqlCollector($this->platform); + + /* @var $schema \Doctrine\DBAL\Schema\Schema */ + $schema = $sm->createSchema(); + $schema->visit($visitor); + + return $visitor->getQueries(); + } + + /** + * {@inheritdoc} + */ + public function createSchema(Schema $createSchema) + { + $this->processSql($this->getCreateSchema($createSchema)); + } + + /** + * {@inheritdoc} + */ + public function updateSchema(Schema $toSchema, $noDrops = false) + { + $this->processSql($this->getUpdateSchema($toSchema, $noDrops)); + } + + /** + * {@inheritdoc} + */ + public function dropSchema(Schema $dropSchema) + { + $this->processSqlSafely($this->getDropSchema($dropSchema)); + } + + /** + * {@inheritdoc} + */ + public function dropAllSchema() + { + $this->processSql($this->getDropAllSchema()); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Table.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Table.php new file mode 100644 index 0000000000000000000000000000000000000000..fb1e51da0692482ed70215aa57333b1e3d8b5265 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Table.php @@ -0,0 +1,850 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Schema\Visitor\Visitor; +use Doctrine\DBAL\DBALException; + +/** + * Object Representation of a table. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class Table extends AbstractAsset +{ + /** + * @var string + */ + protected $_name = null; + + /** + * @var Column[] + */ + protected $_columns = array(); + + /** + * @var Index[] + */ + private $implicitIndexes = array(); + + /** + * @var Index[] + */ + protected $_indexes = array(); + + /** + * @var string + */ + protected $_primaryKeyName = false; + + /** + * @var ForeignKeyConstraint[] + */ + protected $_fkConstraints = array(); + + /** + * @var array + */ + protected $_options = array(); + + /** + * @var SchemaConfig + */ + protected $_schemaConfig = null; + + /** + * @param string $tableName + * @param Column[] $columns + * @param Index[] $indexes + * @param ForeignKeyConstraint[] $fkConstraints + * @param integer $idGeneratorType + * @param array $options + * + * @throws DBALException + */ + public function __construct($tableName, array $columns=array(), array $indexes=array(), array $fkConstraints=array(), $idGeneratorType = 0, array $options=array()) + { + if (strlen($tableName) == 0) { + throw DBALException::invalidTableName($tableName); + } + + $this->_setName($tableName); + + foreach ($columns as $column) { + $this->_addColumn($column); + } + + foreach ($indexes as $idx) { + $this->_addIndex($idx); + } + + foreach ($fkConstraints as $constraint) { + $this->_addForeignKeyConstraint($constraint); + } + + $this->_options = $options; + } + + /** + * @param SchemaConfig $schemaConfig + * + * @return void + */ + public function setSchemaConfig(SchemaConfig $schemaConfig) + { + $this->_schemaConfig = $schemaConfig; + } + + /** + * @return integer + */ + protected function _getMaxIdentifierLength() + { + if ($this->_schemaConfig instanceof SchemaConfig) { + return $this->_schemaConfig->getMaxIdentifierLength(); + } else { + return 63; + } + } + + /** + * Sets the Primary Key. + * + * @param array $columns + * @param string|boolean $indexName + * + * @return self + */ + public function setPrimaryKey(array $columns, $indexName = false) + { + $this->_addIndex($this->_createIndex($columns, $indexName ?: "primary", true, true)); + + foreach ($columns as $columnName) { + $column = $this->getColumn($columnName); + $column->setNotnull(true); + } + + return $this; + } + + /** + * @param array $columnNames + * @param string|null $indexName + * @param array $flags + * @param array $options + * + * @return self + */ + public function addIndex(array $columnNames, $indexName = null, array $flags = array(), array $options = array()) + { + if ($indexName == null) { + $indexName = $this->_generateIdentifierName( + array_merge(array($this->getName()), $columnNames), "idx", $this->_getMaxIdentifierLength() + ); + } + + return $this->_addIndex($this->_createIndex($columnNames, $indexName, false, false, $flags, $options)); + } + + /** + * Drops the primary key from this table. + * + * @return void + */ + public function dropPrimaryKey() + { + $this->dropIndex($this->_primaryKeyName); + $this->_primaryKeyName = false; + } + + /** + * Drops an index from this table. + * + * @param string $indexName The index name. + * + * @return void + * + * @throws SchemaException If the index does not exist. + */ + public function dropIndex($indexName) + { + $indexName = $this->normalizeIdentifier($indexName); + if ( ! $this->hasIndex($indexName)) { + throw SchemaException::indexDoesNotExist($indexName, $this->_name); + } + unset($this->_indexes[$indexName]); + } + + /** + * @param array $columnNames + * @param string|null $indexName + * @param array $options + * + * @return self + */ + public function addUniqueIndex(array $columnNames, $indexName = null, array $options = array()) + { + if ($indexName === null) { + $indexName = $this->_generateIdentifierName( + array_merge(array($this->getName()), $columnNames), "uniq", $this->_getMaxIdentifierLength() + ); + } + + return $this->_addIndex($this->_createIndex($columnNames, $indexName, true, false, array(), $options)); + } + + /** + * Renames an index. + * + * @param string $oldIndexName The name of the index to rename from. + * @param string|null $newIndexName The name of the index to rename to. + * If null is given, the index name will be auto-generated. + * + * @return self This table instance. + * + * @throws SchemaException if no index exists for the given current name + * or if an index with the given new name already exists on this table. + */ + public function renameIndex($oldIndexName, $newIndexName = null) + { + $oldIndexName = $this->normalizeIdentifier($oldIndexName); + $normalizedNewIndexName = $this->normalizeIdentifier($newIndexName); + + if ($oldIndexName === $normalizedNewIndexName) { + return $this; + } + + if ( ! $this->hasIndex($oldIndexName)) { + throw SchemaException::indexDoesNotExist($oldIndexName, $this->_name); + } + + if ($this->hasIndex($normalizedNewIndexName)) { + throw SchemaException::indexAlreadyExists($normalizedNewIndexName, $this->_name); + } + + $oldIndex = $this->_indexes[$oldIndexName]; + + if ($oldIndex->isPrimary()) { + $this->dropPrimaryKey(); + + return $this->setPrimaryKey($oldIndex->getColumns(), $newIndexName); + } + + unset($this->_indexes[$oldIndexName]); + + if ($oldIndex->isUnique()) { + return $this->addUniqueIndex($oldIndex->getColumns(), $newIndexName, $oldIndex->getOptions()); + } + + return $this->addIndex($oldIndex->getColumns(), $newIndexName, $oldIndex->getFlags(), $oldIndex->getOptions()); + } + + /** + * Checks if an index begins in the order of the given columns. + * + * @param array $columnsNames + * + * @return boolean + */ + public function columnsAreIndexed(array $columnsNames) + { + foreach ($this->getIndexes() as $index) { + /* @var $index Index */ + if ($index->spansColumns($columnsNames)) { + return true; + } + } + + return false; + } + + /** + * @param array $columnNames + * @param string $indexName + * @param boolean $isUnique + * @param boolean $isPrimary + * @param array $flags + * @param array $options + * + * @return Index + * + * @throws SchemaException + */ + private function _createIndex(array $columnNames, $indexName, $isUnique, $isPrimary, array $flags = array(), array $options = array()) + { + if (preg_match('(([^a-zA-Z0-9_]+))', $this->normalizeIdentifier($indexName))) { + throw SchemaException::indexNameInvalid($indexName); + } + + foreach ($columnNames as $columnName => $indexColOptions) { + if (is_numeric($columnName) && is_string($indexColOptions)) { + $columnName = $indexColOptions; + } + + if ( ! $this->hasColumn($columnName)) { + throw SchemaException::columnDoesNotExist($columnName, $this->_name); + } + } + + return new Index($indexName, $columnNames, $isUnique, $isPrimary, $flags, $options); + } + + /** + * @param string $columnName + * @param string $typeName + * @param array $options + * + * @return Column + */ + public function addColumn($columnName, $typeName, array $options=array()) + { + $column = new Column($columnName, Type::getType($typeName), $options); + + $this->_addColumn($column); + + return $column; + } + + /** + * Renames a Column. + * + * @param string $oldColumnName + * @param string $newColumnName + * + * @return self + * + * @throws DBALException + */ + public function renameColumn($oldColumnName, $newColumnName) + { + throw new DBALException("Table#renameColumn() was removed, because it drops and recreates " . + "the column instead. There is no fix available, because a schema diff cannot reliably detect if a " . + "column was renamed or one column was created and another one dropped."); + } + + /** + * Change Column Details. + * + * @param string $columnName + * @param array $options + * + * @return self + */ + public function changeColumn($columnName, array $options) + { + $column = $this->getColumn($columnName); + $column->setOptions($options); + + return $this; + } + + /** + * Drops a Column from the Table. + * + * @param string $columnName + * + * @return self + */ + public function dropColumn($columnName) + { + $columnName = $this->normalizeIdentifier($columnName); + unset($this->_columns[$columnName]); + + return $this; + } + + /** + * Adds a foreign key constraint. + * + * Name is inferred from the local columns. + * + * @param Table|string $foreignTable Table schema instance or table name + * @param array $localColumnNames + * @param array $foreignColumnNames + * @param array $options + * @param string|null $constraintName + * + * @return self + */ + public function addForeignKeyConstraint($foreignTable, array $localColumnNames, array $foreignColumnNames, array $options=array(), $constraintName = null) + { + $constraintName = $constraintName ?: $this->_generateIdentifierName(array_merge((array) $this->getName(), $localColumnNames), "fk", $this->_getMaxIdentifierLength()); + + return $this->addNamedForeignKeyConstraint($constraintName, $foreignTable, $localColumnNames, $foreignColumnNames, $options); + } + + /** + * Adds a foreign key constraint. + * + * Name is to be generated by the database itself. + * + * @deprecated Use {@link addForeignKeyConstraint} + * + * @param Table|string $foreignTable Table schema instance or table name + * @param array $localColumnNames + * @param array $foreignColumnNames + * @param array $options + * + * @return self + */ + public function addUnnamedForeignKeyConstraint($foreignTable, array $localColumnNames, array $foreignColumnNames, array $options=array()) + { + return $this->addForeignKeyConstraint($foreignTable, $localColumnNames, $foreignColumnNames, $options); + } + + /** + * Adds a foreign key constraint with a given name. + * + * @deprecated Use {@link addForeignKeyConstraint} + * + * @param string $name + * @param Table|string $foreignTable Table schema instance or table name + * @param array $localColumnNames + * @param array $foreignColumnNames + * @param array $options + * + * @return self + * + * @throws SchemaException + */ + public function addNamedForeignKeyConstraint($name, $foreignTable, array $localColumnNames, array $foreignColumnNames, array $options=array()) + { + if ($foreignTable instanceof Table) { + foreach ($foreignColumnNames as $columnName) { + if ( ! $foreignTable->hasColumn($columnName)) { + throw SchemaException::columnDoesNotExist($columnName, $foreignTable->getName()); + } + } + } + + foreach ($localColumnNames as $columnName) { + if ( ! $this->hasColumn($columnName)) { + throw SchemaException::columnDoesNotExist($columnName, $this->_name); + } + } + + $constraint = new ForeignKeyConstraint( + $localColumnNames, $foreignTable, $foreignColumnNames, $name, $options + ); + $this->_addForeignKeyConstraint($constraint); + + return $this; + } + + /** + * @param string $name + * @param string $value + * + * @return self + */ + public function addOption($name, $value) + { + $this->_options[$name] = $value; + + return $this; + } + + /** + * @param Column $column + * + * @return void + * + * @throws SchemaException + */ + protected function _addColumn(Column $column) + { + $columnName = $column->getName(); + $columnName = $this->normalizeIdentifier($columnName); + + if (isset($this->_columns[$columnName])) { + throw SchemaException::columnAlreadyExists($this->getName(), $columnName); + } + + $this->_columns[$columnName] = $column; + } + + /** + * Adds an index to the table. + * + * @param Index $indexCandidate + * + * @return self + * + * @throws SchemaException + */ + protected function _addIndex(Index $indexCandidate) + { + $indexName = $indexCandidate->getName(); + $indexName = $this->normalizeIdentifier($indexName); + $replacedImplicitIndexes = array(); + + foreach ($this->implicitIndexes as $name => $implicitIndex) { + if ($implicitIndex->isFullfilledBy($indexCandidate) && isset($this->_indexes[$name])) { + $replacedImplicitIndexes[] = $name; + } + } + + if ((isset($this->_indexes[$indexName]) && ! in_array($indexName, $replacedImplicitIndexes, true)) || + ($this->_primaryKeyName != false && $indexCandidate->isPrimary()) + ) { + throw SchemaException::indexAlreadyExists($indexName, $this->_name); + } + + foreach ($replacedImplicitIndexes as $name) { + unset($this->_indexes[$name], $this->implicitIndexes[$name]); + } + + if ($indexCandidate->isPrimary()) { + $this->_primaryKeyName = $indexName; + } + + $this->_indexes[$indexName] = $indexCandidate; + + return $this; + } + + /** + * @param ForeignKeyConstraint $constraint + * + * @return void + */ + protected function _addForeignKeyConstraint(ForeignKeyConstraint $constraint) + { + $constraint->setLocalTable($this); + + if (strlen($constraint->getName())) { + $name = $constraint->getName(); + } else { + $name = $this->_generateIdentifierName( + array_merge((array) $this->getName(), $constraint->getLocalColumns()), "fk", $this->_getMaxIdentifierLength() + ); + } + $name = $this->normalizeIdentifier($name); + + $this->_fkConstraints[$name] = $constraint; + + // add an explicit index on the foreign key columns. If there is already an index that fulfils this requirements drop the request. + // In the case of __construct calling this method during hydration from schema-details all the explicitly added indexes + // lead to duplicates. This creates computation overhead in this case, however no duplicate indexes are ever added (based on columns). + $indexName = $this->_generateIdentifierName( + array_merge(array($this->getName()), $constraint->getColumns()), + "idx", + $this->_getMaxIdentifierLength() + ); + $indexCandidate = $this->_createIndex($constraint->getColumns(), $indexName, false, false); + + foreach ($this->_indexes as $existingIndex) { + if ($indexCandidate->isFullfilledBy($existingIndex)) { + return; + } + } + + $this->_addIndex($indexCandidate); + $this->implicitIndexes[$this->normalizeIdentifier($indexName)] = $indexCandidate; + } + + /** + * Returns whether this table has a foreign key constraint with the given name. + * + * @param string $constraintName + * + * @return boolean + */ + public function hasForeignKey($constraintName) + { + $constraintName = $this->normalizeIdentifier($constraintName); + + return isset($this->_fkConstraints[$constraintName]); + } + + /** + * Returns the foreign key constraint with the given name. + * + * @param string $constraintName The constraint name. + * + * @return ForeignKeyConstraint + * + * @throws SchemaException If the foreign key does not exist. + */ + public function getForeignKey($constraintName) + { + $constraintName = $this->normalizeIdentifier($constraintName); + if (!$this->hasForeignKey($constraintName)) { + throw SchemaException::foreignKeyDoesNotExist($constraintName, $this->_name); + } + + return $this->_fkConstraints[$constraintName]; + } + + /** + * Removes the foreign key constraint with the given name. + * + * @param string $constraintName The constraint name. + * + * @return void + * + * @throws SchemaException + */ + public function removeForeignKey($constraintName) + { + $constraintName = $this->normalizeIdentifier($constraintName); + if (!$this->hasForeignKey($constraintName)) { + throw SchemaException::foreignKeyDoesNotExist($constraintName, $this->_name); + } + + unset($this->_fkConstraints[$constraintName]); + } + + /** + * @return Column[] + */ + public function getColumns() + { + $columns = $this->_columns; + + $pkCols = array(); + $fkCols = array(); + + if ($this->hasPrimaryKey()) { + $pkCols = $this->getPrimaryKey()->getColumns(); + } + foreach ($this->getForeignKeys() as $fk) { + /* @var $fk ForeignKeyConstraint */ + $fkCols = array_merge($fkCols, $fk->getColumns()); + } + $colNames = array_unique(array_merge($pkCols, $fkCols, array_keys($columns))); + + uksort($columns, function ($a, $b) use ($colNames) { + return (array_search($a, $colNames) >= array_search($b, $colNames)); + }); + + return $columns; + } + + /** + * Returns whether this table has a Column with the given name. + * + * @param string $columnName The column name. + * + * @return boolean + */ + public function hasColumn($columnName) + { + $columnName = $this->normalizeIdentifier($columnName); + + return isset($this->_columns[$columnName]); + } + + /** + * Returns the Column with the given name. + * + * @param string $columnName The column name. + * + * @return Column + * + * @throws SchemaException If the column does not exist. + */ + public function getColumn($columnName) + { + $columnName = $this->normalizeIdentifier($columnName); + if ( ! $this->hasColumn($columnName)) { + throw SchemaException::columnDoesNotExist($columnName, $this->_name); + } + + return $this->_columns[$columnName]; + } + + /** + * Returns the primary key. + * + * @return Index|null The primary key, or null if this Table has no primary key. + */ + public function getPrimaryKey() + { + if ( ! $this->hasPrimaryKey()) { + return null; + } + + return $this->getIndex($this->_primaryKeyName); + } + + /** + * Returns the primary key columns. + * + * @return array + * + * @throws DBALException + */ + public function getPrimaryKeyColumns() + { + if ( ! $this->hasPrimaryKey()) { + throw new DBALException("Table " . $this->getName() . " has no primary key."); + } + + return $this->getPrimaryKey()->getColumns(); + } + + /** + * Returns whether this table has a primary key. + * + * @return boolean + */ + public function hasPrimaryKey() + { + return ($this->_primaryKeyName && $this->hasIndex($this->_primaryKeyName)); + } + + /** + * Returns whether this table has an Index with the given name. + * + * @param string $indexName The index name. + * + * @return boolean + */ + public function hasIndex($indexName) + { + $indexName = $this->normalizeIdentifier($indexName); + + return (isset($this->_indexes[$indexName])); + } + + /** + * Returns the Index with the given name. + * + * @param string $indexName The index name. + * + * @return Index + * + * @throws SchemaException If the index does not exist. + */ + public function getIndex($indexName) + { + $indexName = $this->normalizeIdentifier($indexName); + if ( ! $this->hasIndex($indexName)) { + throw SchemaException::indexDoesNotExist($indexName, $this->_name); + } + + return $this->_indexes[$indexName]; + } + + /** + * @return Index[] + */ + public function getIndexes() + { + return $this->_indexes; + } + + /** + * Returns the foreign key constraints. + * + * @return ForeignKeyConstraint[] + */ + public function getForeignKeys() + { + return $this->_fkConstraints; + } + + /** + * @param string $name + * + * @return boolean + */ + public function hasOption($name) + { + return isset($this->_options[$name]); + } + + /** + * @param string $name + * + * @return mixed + */ + public function getOption($name) + { + return $this->_options[$name]; + } + + /** + * @return array + */ + public function getOptions() + { + return $this->_options; + } + + /** + * @param Visitor $visitor + * + * @return void + */ + public function visit(Visitor $visitor) + { + $visitor->acceptTable($this); + + foreach ($this->getColumns() as $column) { + $visitor->acceptColumn($this, $column); + } + + foreach ($this->getIndexes() as $index) { + $visitor->acceptIndex($this, $index); + } + + foreach ($this->getForeignKeys() as $constraint) { + $visitor->acceptForeignKey($this, $constraint); + } + } + + /** + * Clone of a Table triggers a deep clone of all affected assets. + * + * @return void + */ + public function __clone() + { + foreach ($this->_columns as $k => $column) { + $this->_columns[$k] = clone $column; + } + foreach ($this->_indexes as $k => $index) { + $this->_indexes[$k] = clone $index; + } + foreach ($this->_fkConstraints as $k => $fk) { + $this->_fkConstraints[$k] = clone $fk; + $this->_fkConstraints[$k]->setLocalTable($this); + } + } + + /** + * Normalizes a given identifier. + * + * Trims quotes and lowercases the given identifier. + * + * @param string $identifier The identifier to normalize. + * + * @return string The normalized identifier. + */ + private function normalizeIdentifier($identifier) + { + return $this->trimQuotes(strtolower($identifier)); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/TableDiff.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/TableDiff.php new file mode 100644 index 0000000000000000000000000000000000000000..a837fab674685a86afecdf3115a1daf074906c5c --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/TableDiff.php @@ -0,0 +1,170 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Table Diff. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class TableDiff +{ + /** + * @var string + */ + public $name = null; + + /** + * @var string|boolean + */ + public $newName = false; + + /** + * All added fields. + * + * @var \Doctrine\DBAL\Schema\Column[] + */ + public $addedColumns; + + /** + * All changed fields. + * + * @var \Doctrine\DBAL\Schema\ColumnDiff[] + */ + public $changedColumns = array(); + + /** + * All removed fields. + * + * @var \Doctrine\DBAL\Schema\Column[] + */ + public $removedColumns = array(); + + /** + * Columns that are only renamed from key to column instance name. + * + * @var \Doctrine\DBAL\Schema\Column[] + */ + public $renamedColumns = array(); + + /** + * All added indexes. + * + * @var \Doctrine\DBAL\Schema\Index[] + */ + public $addedIndexes = array(); + + /** + * All changed indexes. + * + * @var \Doctrine\DBAL\Schema\Index[] + */ + public $changedIndexes = array(); + + /** + * All removed indexes + * + * @var \Doctrine\DBAL\Schema\Index[] + */ + public $removedIndexes = array(); + + /** + * Indexes that are only renamed but are identical otherwise. + * + * @var \Doctrine\DBAL\Schema\Index[] + */ + public $renamedIndexes = array(); + + /** + * All added foreign key definitions + * + * @var \Doctrine\DBAL\Schema\ForeignKeyConstraint[] + */ + public $addedForeignKeys = array(); + + /** + * All changed foreign keys + * + * @var \Doctrine\DBAL\Schema\ForeignKeyConstraint[] + */ + public $changedForeignKeys = array(); + + /** + * All removed foreign keys + * + * @var \Doctrine\DBAL\Schema\ForeignKeyConstraint[] + */ + public $removedForeignKeys = array(); + + /** + * @var \Doctrine\DBAL\Schema\Table + */ + public $fromTable; + + /** + * Constructs an TableDiff object. + * + * @param string $tableName + * @param \Doctrine\DBAL\Schema\Column[] $addedColumns + * @param \Doctrine\DBAL\Schema\ColumnDiff[] $changedColumns + * @param \Doctrine\DBAL\Schema\Column[] $removedColumns + * @param \Doctrine\DBAL\Schema\Index[] $addedIndexes + * @param \Doctrine\DBAL\Schema\Index[] $changedIndexes + * @param \Doctrine\DBAL\Schema\Index[] $removedIndexes + * @param \Doctrine\DBAL\Schema\Table|null $fromTable + */ + public function __construct($tableName, $addedColumns = array(), + $changedColumns = array(), $removedColumns = array(), $addedIndexes = array(), + $changedIndexes = array(), $removedIndexes = array(), Table $fromTable = null) + { + $this->name = $tableName; + $this->addedColumns = $addedColumns; + $this->changedColumns = $changedColumns; + $this->removedColumns = $removedColumns; + $this->addedIndexes = $addedIndexes; + $this->changedIndexes = $changedIndexes; + $this->removedIndexes = $removedIndexes; + $this->fromTable = $fromTable; + } + + /** + * @param AbstractPlatform $platform The platform to use for retrieving this table diff's name. + * + * @return \Doctrine\DBAL\Schema\Identifier + */ + public function getName(AbstractPlatform $platform) + { + return new Identifier( + $this->fromTable instanceof Table ? $this->fromTable->getQuotedName($platform) : $this->name + ); + } + + /** + * @return \Doctrine\DBAL\Schema\Identifier|boolean + */ + public function getNewName() + { + return $this->newName ? new Identifier($this->newName) : $this->newName; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/View.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/View.php new file mode 100644 index 0000000000000000000000000000000000000000..0ef7d305bbbb08c1f99955b7cc69bc6fd171ffe9 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/View.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\DBAL\Schema; + +/** + * Representation of a Database View. + * + * @link www.doctrine-project.org + * @since 1.0 + * @author Benjamin Eberlei + */ +class View extends AbstractAsset +{ + /** + * @var string + */ + private $_sql; + + /** + * @param string $name + * @param string $sql + */ + public function __construct($name, $sql) + { + $this->_setName($name); + $this->_sql = $sql; + } + + /** + * @return string + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/AbstractVisitor.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/AbstractVisitor.php new file mode 100644 index 0000000000000000000000000000000000000000..7bf5b2fec32cd5e3f58b54b0c2848e04d685d19e --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/AbstractVisitor.php @@ -0,0 +1,85 @@ +. + */ + +namespace Doctrine\DBAL\Schema\Visitor; + +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Sequence; +use Doctrine\DBAL\Schema\Index; + +/** + * Abstract Visitor with empty methods for easy extension. + */ +class AbstractVisitor implements Visitor, NamespaceVisitor +{ + /** + * @param \Doctrine\DBAL\Schema\Schema $schema + */ + public function acceptSchema(Schema $schema) + { + } + + /** + * {@inheritdoc} + */ + public function acceptNamespace($namespaceName) + { + } + + /** + * @param \Doctrine\DBAL\Schema\Table $table + */ + public function acceptTable(Table $table) + { + } + + /** + * @param \Doctrine\DBAL\Schema\Table $table + * @param \Doctrine\DBAL\Schema\Column $column + */ + public function acceptColumn(Table $table, Column $column) + { + } + + /** + * @param \Doctrine\DBAL\Schema\Table $localTable + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $fkConstraint + */ + public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) + { + } + + /** + * @param \Doctrine\DBAL\Schema\Table $table + * @param \Doctrine\DBAL\Schema\Index $index + */ + public function acceptIndex(Table $table, Index $index) + { + } + + /** + * @param \Doctrine\DBAL\Schema\Sequence $sequence + */ + public function acceptSequence(Sequence $sequence) + { + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..5e0c6ed437eca7abecb21d7e9806eb55464bf340 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php @@ -0,0 +1,148 @@ +. + */ + +namespace Doctrine\DBAL\Schema\Visitor; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Sequence; + +class CreateSchemaSqlCollector extends AbstractVisitor +{ + /** + * @var array + */ + private $createNamespaceQueries = array(); + + /** + * @var array + */ + private $createTableQueries = array(); + + /** + * @var array + */ + private $createSequenceQueries = array(); + + /** + * @var array + */ + private $createFkConstraintQueries = array(); + + /** + * + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $platform = null; + + /** + * @param AbstractPlatform $platform + */ + public function __construct(AbstractPlatform $platform) + { + $this->platform = $platform; + } + + /** + * {@inheritdoc} + */ + public function acceptNamespace($namespaceName) + { + if ($this->platform->supportsSchemas()) { + $this->createNamespaceQueries = array_merge( + $this->createNamespaceQueries, + (array) $this->platform->getCreateSchemaSQL($namespaceName) + ); + } + } + + /** + * {@inheritdoc} + */ + public function acceptTable(Table $table) + { + $this->createTableQueries = array_merge($this->createTableQueries, (array) $this->platform->getCreateTableSQL($table)); + } + + /** + * {@inheritdoc} + */ + public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) + { + if ($this->platform->supportsForeignKeyConstraints()) { + $this->createFkConstraintQueries = array_merge( + $this->createFkConstraintQueries, + (array) $this->platform->getCreateForeignKeySQL( + $fkConstraint, $localTable + ) + ); + } + } + + /** + * {@inheritdoc} + */ + public function acceptSequence(Sequence $sequence) + { + $this->createSequenceQueries = array_merge( + $this->createSequenceQueries, + (array) $this->platform->getCreateSequenceSQL($sequence) + ); + } + + /** + * @return void + */ + public function resetQueries() + { + $this->createNamespaceQueries = array(); + $this->createTableQueries = array(); + $this->createSequenceQueries = array(); + $this->createFkConstraintQueries = array(); + } + + /** + * Gets all queries collected so far. + * + * @return array + */ + public function getQueries() + { + $sql = array(); + + foreach ($this->createNamespaceQueries as $schemaSql) { + $sql = array_merge($sql, (array) $schemaSql); + } + + foreach ($this->createTableQueries as $schemaSql) { + $sql = array_merge($sql, (array) $schemaSql); + } + + foreach ($this->createSequenceQueries as $schemaSql) { + $sql = array_merge($sql, (array) $schemaSql); + } + + foreach ($this->createFkConstraintQueries as $schemaSql) { + $sql = array_merge($sql, (array) $schemaSql); + } + + return $sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..ab9752d58421f15479f023f790b691274445c0d4 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php @@ -0,0 +1,126 @@ +. + */ + +namespace Doctrine\DBAL\Schema\Visitor; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Sequence; +use Doctrine\DBAL\Schema\SchemaException; + +/** + * Gathers SQL statements that allow to completely drop the current schema. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class DropSchemaSqlCollector extends AbstractVisitor +{ + /** + * @var \SplObjectStorage + */ + private $constraints; + + /** + * @var \SplObjectStorage + */ + private $sequences; + + /** + * @var \SplObjectStorage + */ + private $tables; + + /** + * @var AbstractPlatform + */ + private $platform; + + /** + * @param AbstractPlatform $platform + */ + public function __construct(AbstractPlatform $platform) + { + $this->platform = $platform; + $this->clearQueries(); + } + + /** + * {@inheritdoc} + */ + public function acceptTable(Table $table) + { + $this->tables->attach($table); + } + + /** + * {@inheritdoc} + */ + public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) + { + if (strlen($fkConstraint->getName()) == 0) { + throw SchemaException::namedForeignKeyRequired($localTable, $fkConstraint); + } + + $this->constraints->attach($fkConstraint, $localTable); + } + + /** + * {@inheritdoc} + */ + public function acceptSequence(Sequence $sequence) + { + $this->sequences->attach($sequence); + } + + /** + * @return void + */ + public function clearQueries() + { + $this->constraints = new \SplObjectStorage(); + $this->sequences = new \SplObjectStorage(); + $this->tables = new \SplObjectStorage(); + } + + /** + * @return array + */ + public function getQueries() + { + $sql = array(); + + foreach ($this->constraints as $fkConstraint) { + $localTable = $this->constraints[$fkConstraint]; + $sql[] = $this->platform->getDropForeignKeySQL($fkConstraint, $localTable); + } + + foreach ($this->sequences as $sequence) { + $sql[] = $this->platform->getDropSequenceSQL($sequence); + } + + foreach ($this->tables as $table) { + $sql[] = $this->platform->getDropTableSQL($table); + } + + return $sql; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php new file mode 100644 index 0000000000000000000000000000000000000000..1573ddf5b2213d4259026fa89214f95e209b055a --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php @@ -0,0 +1,174 @@ +. + */ + +namespace Doctrine\DBAL\Schema\Visitor; + +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; + +/** + * Create a Graphviz output of a Schema. + */ +class Graphviz extends AbstractVisitor +{ + /** + * @var string + */ + private $output = ''; + + /** + * {@inheritdoc} + */ + public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) + { + $this->output .= $this->createNodeRelation( + $fkConstraint->getLocalTableName() . ":col" . current($fkConstraint->getLocalColumns()).":se", + $fkConstraint->getForeignTableName() . ":col" . current($fkConstraint->getForeignColumns()).":se", + array( + 'dir' => 'back', + 'arrowtail' => 'dot', + 'arrowhead' => 'normal', + ) + ); + } + + /** + * {@inheritdoc} + */ + public function acceptSchema(Schema $schema) + { + $this->output = 'digraph "' . sha1(mt_rand()) . '" {' . "\n"; + $this->output .= 'splines = true;' . "\n"; + $this->output .= 'overlap = false;' . "\n"; + $this->output .= 'outputorder=edgesfirst;'."\n"; + $this->output .= 'mindist = 0.6;' . "\n"; + $this->output .= 'sep = .2;' . "\n"; + } + + /** + * {@inheritdoc} + */ + public function acceptTable(Table $table) + { + $this->output .= $this->createNode( + $table->getName(), + array( + 'label' => $this->createTableLabel($table), + 'shape' => 'plaintext', + ) + ); + } + + /** + * @param \Doctrine\DBAL\Schema\Table $table + * + * @return string + */ + private function createTableLabel(Table $table) + { + // Start the table + $label = '<'; + + // The title + $label .= ''; + + // The attributes block + foreach ($table->getColumns() as $column) { + $columnLabel = $column->getName(); + + $label .= ''; + $label .= ''; + $label .= ''; + } + + // End the table + $label .= '
' . $table->getName() . '
'; + $label .= '' . $columnLabel . ''; + $label .= '' . strtolower($column->getType()) . ''; + if ($table->hasPrimaryKey() && in_array($column->getName(), $table->getPrimaryKey()->getColumns())) { + $label .= "\xe2\x9c\xb7"; + } + $label .= '
>'; + + return $label; + } + + /** + * @param string $name + * @param array $options + * + * @return string + */ + private function createNode($name, $options) + { + $node = $name . " ["; + foreach ($options as $key => $value) { + $node .= $key . '=' . $value . ' '; + } + $node .= "]\n"; + + return $node; + } + + /** + * @param string $node1 + * @param string $node2 + * @param array $options + * + * @return string + */ + private function createNodeRelation($node1, $node2, $options) + { + $relation = $node1 . ' -> ' . $node2 . ' ['; + foreach ($options as $key => $value) { + $relation .= $key . '=' . $value . ' '; + } + $relation .= "]\n"; + + return $relation; + } + + /** + * Get Graphviz Output + * + * @return string + */ + public function getOutput() + { + return $this->output . "}"; + } + + /** + * Writes dot language output to a file. This should usually be a *.dot file. + * + * You have to convert the output into a viewable format. For example use "neato" on linux systems + * and execute: + * + * neato -Tpng -o er.png er.dot + * + * @param string $filename + * + * @return void + */ + public function write($filename) + { + file_put_contents($filename, $this->getOutput()); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/NamespaceVisitor.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/NamespaceVisitor.php new file mode 100644 index 0000000000000000000000000000000000000000..da7b1edbcaaed3fe1ca7a49099006c3fbaaed208 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/NamespaceVisitor.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\DBAL\Schema\Visitor; + +/** + * Visitor that can visit schema namespaces. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +interface NamespaceVisitor +{ + /** + * Accepts a schema namespace name. + * + * @param string $namespaceName The schema namespace name to accept. + */ + public function acceptNamespace($namespaceName); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/RemoveNamespacedAssets.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/RemoveNamespacedAssets.php new file mode 100644 index 0000000000000000000000000000000000000000..e328d071cde8e6b0d2456b5b1092199e77e8baf9 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/RemoveNamespacedAssets.php @@ -0,0 +1,94 @@ +. + */ + +namespace Doctrine\DBAL\Schema\Visitor; + +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Sequence; + +/** + * Removes assets from a schema that are not in the default namespace. + * + * Some databases such as MySQL support cross databases joins, but don't + * allow to call DDLs to a database from another connected database. + * Before a schema is serialized into SQL this visitor can cleanup schemas with + * non default namespaces. + * + * This visitor filters all these non-default namespaced tables and sequences + * and removes them from the SChema instance. + * + * @author Benjamin Eberlei + * @since 2.2 + */ +class RemoveNamespacedAssets extends AbstractVisitor +{ + /** + * @var \Doctrine\DBAL\Schema\Schema + */ + private $schema; + + /** + * {@inheritdoc} + */ + public function acceptSchema(Schema $schema) + { + $this->schema = $schema; + } + + /** + * {@inheritdoc} + */ + public function acceptTable(Table $table) + { + if ( ! $table->isInDefaultNamespace($this->schema->getName())) { + $this->schema->dropTable($table->getName()); + } + } + + /** + * {@inheritdoc} + */ + public function acceptSequence(Sequence $sequence) + { + if ( ! $sequence->isInDefaultNamespace($this->schema->getName())) { + $this->schema->dropSequence($sequence->getName()); + } + } + + /** + * {@inheritdoc} + */ + public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) + { + // The table may already be deleted in a previous + // RemoveNamespacedAssets#acceptTable call. Removing Foreign keys that + // point to nowhere. + if ( ! $this->schema->hasTable($fkConstraint->getForeignTableName())) { + $localTable->removeForeignKey($fkConstraint->getName()); + return; + } + + $foreignTable = $this->schema->getTable($fkConstraint->getForeignTableName()); + if ( ! $foreignTable->isInDefaultNamespace($this->schema->getName())) { + $localTable->removeForeignKey($fkConstraint->getName()); + } + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/SchemaDiffVisitor.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/SchemaDiffVisitor.php new file mode 100644 index 0000000000000000000000000000000000000000..bde4453b357a47d1c6b26aeb50d1ac7797157388 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/SchemaDiffVisitor.php @@ -0,0 +1,82 @@ +. + */ + +namespace Doctrine\DBAL\Schema\Visitor; + +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\TableDiff; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Sequence; + +/** + * Visit a SchemaDiff. + * + * @link www.doctrine-project.org + * @since 2.4 + * @author Benjamin Eberlei + */ +interface SchemaDiffVisitor +{ + /** + * Visit an orphaned foreign key whose table was deleted. + * + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey + */ + function visitOrphanedForeignKey(ForeignKeyConstraint $foreignKey); + + /** + * Visit a sequence that has changed. + * + * @param \Doctrine\DBAL\Schema\Sequence $sequence + */ + function visitChangedSequence(Sequence $sequence); + + /** + * Visit a sequence that has been removed. + * + * @param \Doctrine\DBAL\Schema\Sequence $sequence + */ + function visitRemovedSequence(Sequence $sequence); + + /** + * @param \Doctrine\DBAL\Schema\Sequence $sequence + */ + function visitNewSequence(Sequence $sequence); + + /** + * @param \Doctrine\DBAL\Schema\Table $table + */ + function visitNewTable(Table $table); + + /** + * @param \Doctrine\DBAL\Schema\Table $table + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey + */ + function visitNewTableForeignKey(Table $table, ForeignKeyConstraint $foreignKey); + + /** + * @param \Doctrine\DBAL\Schema\Table $table + */ + function visitRemovedTable(Table $table); + + /** + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + */ + function visitChangedTable(TableDiff $tableDiff); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/Visitor.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/Visitor.php new file mode 100644 index 0000000000000000000000000000000000000000..656f0e20c6f7f4897c1fc51d86c82a79beba0676 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/Visitor.php @@ -0,0 +1,82 @@ +. + */ + +namespace Doctrine\DBAL\Schema\Visitor; + +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Sequence; +use Doctrine\DBAL\Schema\Index; + +/** + * Schema Visitor used for Validation or Generation purposes. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +interface Visitor +{ + /** + * @param \Doctrine\DBAL\Schema\Schema $schema + * + * @return void + */ + public function acceptSchema(Schema $schema); + + /** + * @param \Doctrine\DBAL\Schema\Table $table + * + * @return void + */ + public function acceptTable(Table $table); + + /** + * @param \Doctrine\DBAL\Schema\Table $table + * @param \Doctrine\DBAL\Schema\Column $column + * + * @return void + */ + public function acceptColumn(Table $table, Column $column); + + /** + * @param \Doctrine\DBAL\Schema\Table $localTable + * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $fkConstraint + * + * @return void + */ + public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint); + + /** + * @param \Doctrine\DBAL\Schema\Table $table + * @param \Doctrine\DBAL\Schema\Index $index + * + * @return void + */ + public function acceptIndex(Table $table, Index $index); + + /** + * @param \Doctrine\DBAL\Schema\Sequence $sequence + * + * @return void + */ + public function acceptSequence(Sequence $sequence); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/PoolingShardConnection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/PoolingShardConnection.php new file mode 100644 index 0000000000000000000000000000000000000000..c5fb77681a6f9c5b648aaf602f1ac7b7d8a249df --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/PoolingShardConnection.php @@ -0,0 +1,272 @@ +. + */ + +namespace Doctrine\DBAL\Sharding; + +use Doctrine\Common\EventManager; +use Doctrine\DBAL\Configuration; +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Event\ConnectionEventArgs; +use Doctrine\DBAL\Events; +use Doctrine\DBAL\Sharding\ShardChoser\ShardChoser; + +/** + * Sharding implementation that pools many different connections + * internally and serves data from the currently active connection. + * + * The internals of this class are: + * + * - All sharding clients are specified and given a shard-id during + * configuration. + * - By default, the global shard is selected. If no global shard is configured + * an exception is thrown on access. + * - Selecting a shard by distribution value delegates the mapping + * "distributionValue" => "client" to the ShardChooser interface. + * - An exception is thrown if trying to switch shards during an open + * transaction. + * + * Instantiation through the DriverManager looks like: + * + * @example + * + * $conn = DriverManager::getConnection(array( + * 'wrapperClass' => 'Doctrine\DBAL\Sharding\PoolingShardConnection', + * 'driver' => 'pdo_mysql', + * 'global' => array('user' => '', 'password' => '', 'host' => '', 'dbname' => ''), + * 'shards' => array( + * array('id' => 1, 'user' => 'slave1', 'password', 'host' => '', 'dbname' => ''), + * array('id' => 2, 'user' => 'slave2', 'password', 'host' => '', 'dbname' => ''), + * ), + * 'shardChoser' => 'Doctrine\DBAL\Sharding\ShardChoser\MultiTenantShardChoser', + * )); + * $shardManager = $conn->getShardManager(); + * $shardManager->selectGlobal(); + * $shardManager->selectShard($value); + * + * @author Benjamin Eberlei + */ +class PoolingShardConnection extends Connection +{ + /** + * @var array + */ + private $activeConnections; + + /** + * @var integer + */ + private $activeShardId; + + /** + * @var array + */ + private $connections; + + /** + * @param array $params + * @param \Doctrine\DBAL\Driver $driver + * @param \Doctrine\DBAL\Configuration $config + * @param \Doctrine\Common\EventManager $eventManager + * + * @throws \InvalidArgumentException + */ + public function __construct(array $params, Driver $driver, Configuration $config = null, EventManager $eventManager = null) + { + if ( !isset($params['global']) || !isset($params['shards'])) { + throw new \InvalidArgumentException("Connection Parameters require 'global' and 'shards' configurations."); + } + + if ( !isset($params['shardChoser'])) { + throw new \InvalidArgumentException("Missing Shard Choser configuration 'shardChoser'"); + } + + if (is_string($params['shardChoser'])) { + $params['shardChoser'] = new $params['shardChoser']; + } + + if ( ! ($params['shardChoser'] instanceof ShardChoser)) { + throw new \InvalidArgumentException("The 'shardChoser' configuration is not a valid instance of Doctrine\DBAL\Sharding\ShardChoser\ShardChoser"); + } + + $this->connections[0] = array_merge($params, $params['global']); + + foreach ($params['shards'] as $shard) { + if ( ! isset($shard['id'])) { + throw new \InvalidArgumentException("Missing 'id' for one configured shard. Please specify a unique shard-id."); + } + + if ( !is_numeric($shard['id']) || $shard['id'] < 1) { + throw new \InvalidArgumentException("Shard Id has to be a non-negative number."); + } + + if (isset($this->connections[$shard['id']])) { + throw new \InvalidArgumentException("Shard " . $shard['id'] . " is duplicated in the configuration."); + } + + $this->connections[$shard['id']] = array_merge($params, $shard); + } + + parent::__construct($params, $driver, $config, $eventManager); + } + + /** + * Get active shard id. + * + * @return integer + */ + public function getActiveShardId() + { + return $this->activeShardId; + } + + /** + * {@inheritdoc} + */ + public function getParams() + { + return $this->activeShardId ? $this->connections[$this->activeShardId] : $this->connections[0]; + } + + /** + * {@inheritdoc} + */ + public function getHost() + { + $params = $this->getParams(); + + return isset($params['host']) ? $params['host'] : parent::getHost(); + } + + /** + * {@inheritdoc} + */ + public function getPort() + { + $params = $this->getParams(); + + return isset($params['port']) ? $params['port'] : parent::getPort(); + } + + /** + * {@inheritdoc} + */ + public function getUsername() + { + $params = $this->getParams(); + + return isset($params['user']) ? $params['user'] : parent::getUsername(); + } + + /** + * {@inheritdoc} + */ + public function getPassword() + { + $params = $this->getParams(); + + return isset($params['password']) ? $params['password'] : parent::getPassword(); + } + + /** + * Connects to a given shard. + * + * @param mixed $shardId + * + * @return boolean + * + * @throws \Doctrine\DBAL\Sharding\ShardingException + */ + public function connect($shardId = null) + { + if ($shardId === null && $this->_conn) { + return false; + } + + if ($shardId !== null && $shardId === $this->activeShardId) { + return false; + } + + if ($this->getTransactionNestingLevel() > 0) { + throw new ShardingException("Cannot switch shard when transaction is active."); + } + + $this->activeShardId = (int)$shardId; + + if (isset($this->activeConnections[$this->activeShardId])) { + $this->_conn = $this->activeConnections[$this->activeShardId]; + + return false; + } + + $this->_conn = $this->activeConnections[$this->activeShardId] = $this->connectTo($this->activeShardId); + + if ($this->_eventManager->hasListeners(Events::postConnect)) { + $eventArgs = new ConnectionEventArgs($this); + $this->_eventManager->dispatchEvent(Events::postConnect, $eventArgs); + } + + return true; + } + + /** + * Connects to a specific connection. + * + * @param string $shardId + * + * @return \Doctrine\DBAL\Driver\Connection + */ + protected function connectTo($shardId) + { + $params = $this->getParams(); + + $driverOptions = isset($params['driverOptions']) ? $params['driverOptions'] : array(); + + $connectionParams = $this->connections[$shardId]; + + $user = isset($connectionParams['user']) ? $connectionParams['user'] : null; + $password = isset($connectionParams['password']) ? $connectionParams['password'] : null; + + return $this->_driver->connect($connectionParams, $user, $password, $driverOptions); + } + + /** + * @param string|null $shardId + * + * @return boolean + */ + public function isConnected($shardId = null) + { + if ($shardId === null) { + return $this->_conn !== null; + } + + return isset($this->activeConnections[$shardId]); + } + + /** + * @return void + */ + public function close() + { + $this->_conn = null; + $this->activeConnections = null; + $this->activeShardId = null; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/PoolingShardManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/PoolingShardManager.php new file mode 100644 index 0000000000000000000000000000000000000000..64307ca6664f6bfd3b2f58441f3de294a3adaf95 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/PoolingShardManager.php @@ -0,0 +1,134 @@ +. + */ + +namespace Doctrine\DBAL\Sharding; + +use Doctrine\DBAL\Sharding\ShardChoser\ShardChoser; + +/** + * Shard Manager for the Connection Pooling Shard Strategy + * + * @author Benjamin Eberlei + */ +class PoolingShardManager implements ShardManager +{ + /** + * @var PoolingShardConnection + */ + private $conn; + + /** + * @var ShardChoser + */ + private $choser; + + /** + * @var string|null + */ + private $currentDistributionValue; + + /** + * @param PoolingShardConnection $conn + */ + public function __construct(PoolingShardConnection $conn) + { + $params = $conn->getParams(); + $this->conn = $conn; + $this->choser = $params['shardChoser']; + } + + /** + * @return void + */ + public function selectGlobal() + { + $this->conn->connect(0); + $this->currentDistributionValue = null; + } + + /** + * @param string $distributionValue + * + * @return void + */ + public function selectShard($distributionValue) + { + $shardId = $this->choser->pickShard($distributionValue, $this->conn); + $this->conn->connect($shardId); + $this->currentDistributionValue = $distributionValue; + } + + /** + * @return string|null + */ + public function getCurrentDistributionValue() + { + return $this->currentDistributionValue; + } + + /** + * @return array + */ + public function getShards() + { + $params = $this->conn->getParams(); + $shards = array(); + + foreach ($params['shards'] as $shard) { + $shards[] = array('id' => $shard['id']); + } + + return $shards; + } + + /** + * @param string $sql + * @param array $params + * @param array $types + * + * @return array + * + * @throws \RuntimeException + */ + public function queryAll($sql, array $params, array $types) + { + $shards = $this->getShards(); + if (!$shards) { + throw new \RuntimeException("No shards found."); + } + + $result = array(); + $oldDistribution = $this->getCurrentDistributionValue(); + + foreach ($shards as $shard) { + $this->conn->connect($shard['id']); + foreach ($this->conn->fetchAll($sql, $params, $types) as $row) { + $result[] = $row; + } + } + + if ($oldDistribution === null) { + $this->selectGlobal(); + } else { + $this->selectShard($oldDistribution); + } + + return $result; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureFederationsSynchronizer.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureFederationsSynchronizer.php new file mode 100644 index 0000000000000000000000000000000000000000..edda835876b23b78d2fa951fe4558a9510c0d1f3 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureFederationsSynchronizer.php @@ -0,0 +1,298 @@ +. + */ + +namespace Doctrine\DBAL\Sharding\SQLAzure; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Types\Type; + +use Doctrine\DBAL\Schema\Synchronizer\AbstractSchemaSynchronizer; +use Doctrine\DBAL\Schema\Synchronizer\SingleDatabaseSynchronizer; +use Doctrine\DBAL\Schema\Synchronizer\SchemaSynchronizer; + +/** + * SQL Azure Schema Synchronizer. + * + * Will iterate over all shards when performing schema operations. This is done + * by partitioning the passed schema into subschemas for the federation and the + * global database and then applying the operations step by step using the + * {@see \Doctrine\DBAL\Schema\Synchronizer\SingleDatabaseSynchronizer}. + * + * @author Benjamin Eberlei + */ +class SQLAzureFederationsSynchronizer extends AbstractSchemaSynchronizer +{ + const FEDERATION_TABLE_FEDERATED = 'azure.federated'; + const FEDERATION_DISTRIBUTION_NAME = 'azure.federatedOnDistributionName'; + + /** + * @var \Doctrine\DBAL\Sharding\SQLAzure\SQLAzureShardManager + */ + private $shardManager; + + /** + * @var \Doctrine\DBAL\Schema\Synchronizer\SchemaSynchronizer + */ + private $synchronizer; + + /** + * @param \Doctrine\DBAL\Connection $conn + * @param \Doctrine\DBAL\Sharding\SQLAzure\SQLAzureShardManager $shardManager + * @param \Doctrine\DBAL\Schema\Synchronizer\SchemaSynchronizer|null $sync + */ + public function __construct(Connection $conn, SQLAzureShardManager $shardManager, SchemaSynchronizer $sync = null) + { + parent::__construct($conn); + $this->shardManager = $shardManager; + $this->synchronizer = $sync ?: new SingleDatabaseSynchronizer($conn); + } + + /** + * {@inheritdoc} + */ + public function getCreateSchema(Schema $createSchema) + { + $sql = array(); + + list($global, $federation) = $this->partitionSchema($createSchema); + + $globalSql = $this->synchronizer->getCreateSchema($global); + if ($globalSql) { + $sql[] = "-- Create Root Federation\n" . + "USE FEDERATION ROOT WITH RESET;"; + $sql = array_merge($sql, $globalSql); + } + + $federationSql = $this->synchronizer->getCreateSchema($federation); + + if ($federationSql) { + $defaultValue = $this->getFederationTypeDefaultValue(); + + $sql[] = $this->getCreateFederationStatement(); + $sql[] = "USE FEDERATION " . $this->shardManager->getFederationName() . " (" . $this->shardManager->getDistributionKey() . " = " . $defaultValue . ") WITH RESET, FILTERING = OFF;"; + $sql = array_merge($sql, $federationSql); + } + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function getUpdateSchema(Schema $toSchema, $noDrops = false) + { + return $this->work($toSchema, function ($synchronizer, $schema) use ($noDrops) { + return $synchronizer->getUpdateSchema($schema, $noDrops); + }); + } + + /** + * {@inheritdoc} + */ + public function getDropSchema(Schema $dropSchema) + { + return $this->work($dropSchema, function ($synchronizer, $schema) { + return $synchronizer->getDropSchema($schema); + }); + } + + /** + * {@inheritdoc} + */ + public function createSchema(Schema $createSchema) + { + $this->processSql($this->getCreateSchema($createSchema)); + } + + /** + * {@inheritdoc} + */ + public function updateSchema(Schema $toSchema, $noDrops = false) + { + $this->processSql($this->getUpdateSchema($toSchema, $noDrops)); + } + + /** + * {@inheritdoc} + */ + public function dropSchema(Schema $dropSchema) + { + $this->processSqlSafely($this->getDropSchema($dropSchema)); + } + + /** + * {@inheritdoc} + */ + public function getDropAllSchema() + { + $this->shardManager->selectGlobal(); + $globalSql = $this->synchronizer->getDropAllSchema(); + + if ($globalSql) { + $sql[] = "-- Work on Root Federation\nUSE FEDERATION ROOT WITH RESET;"; + $sql = array_merge($sql, $globalSql); + } + + $shards = $this->shardManager->getShards(); + foreach ($shards as $shard) { + $this->shardManager->selectShard($shard['rangeLow']); + + $federationSql = $this->synchronizer->getDropAllSchema(); + if ($federationSql) { + $sql[] = "-- Work on Federation ID " . $shard['id'] . "\n" . + "USE FEDERATION " . $this->shardManager->getFederationName() . " (" . $this->shardManager->getDistributionKey() . " = " . $shard['rangeLow'].") WITH RESET, FILTERING = OFF;"; + $sql = array_merge($sql, $federationSql); + } + } + + $sql[] = "USE FEDERATION ROOT WITH RESET;"; + $sql[] = "DROP FEDERATION " . $this->shardManager->getFederationName(); + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function dropAllSchema() + { + $this->processSqlSafely($this->getDropAllSchema()); + } + + /** + * @param \Doctrine\DBAL\Schema\Schema $schema + * + * @return array + */ + private function partitionSchema(Schema $schema) + { + return array( + $this->extractSchemaFederation($schema, false), + $this->extractSchemaFederation($schema, true), + ); + } + + /** + * @param \Doctrine\DBAL\Schema\Schema $schema + * @param boolean $isFederation + * + * @return \Doctrine\DBAL\Schema\Schema + * + * @throws \RuntimeException + */ + private function extractSchemaFederation(Schema $schema, $isFederation) + { + $partitionedSchema = clone $schema; + + foreach ($partitionedSchema->getTables() as $table) { + if ($isFederation) { + $table->addOption(self::FEDERATION_DISTRIBUTION_NAME, $this->shardManager->getDistributionKey()); + } + + if ($table->hasOption(self::FEDERATION_TABLE_FEDERATED) !== $isFederation) { + $partitionedSchema->dropTable($table->getName()); + } else { + foreach ($table->getForeignKeys() as $fk) { + $foreignTable = $schema->getTable($fk->getForeignTableName()); + if ($foreignTable->hasOption(self::FEDERATION_TABLE_FEDERATED) !== $isFederation) { + throw new \RuntimeException("Cannot have foreign key between global/federation."); + } + } + } + } + + return $partitionedSchema; + } + + /** + * Work on the Global/Federation based on currently existing shards and + * perform the given operation on the underlying schema synchronizer given + * the different partitioned schema instances. + * + * @param \Doctrine\DBAL\Schema\Schema $schema + * @param \Closure $operation + * + * @return array + */ + private function work(Schema $schema, \Closure $operation) + { + list($global, $federation) = $this->partitionSchema($schema); + $sql = array(); + + $this->shardManager->selectGlobal(); + $globalSql = $operation($this->synchronizer, $global); + + if ($globalSql) { + $sql[] = "-- Work on Root Federation\nUSE FEDERATION ROOT WITH RESET;"; + $sql = array_merge($sql, $globalSql); + } + + $shards = $this->shardManager->getShards(); + + foreach ($shards as $shard) { + $this->shardManager->selectShard($shard['rangeLow']); + + $federationSql = $operation($this->synchronizer, $federation); + if ($federationSql) { + $sql[] = "-- Work on Federation ID " . $shard['id'] . "\n" . + "USE FEDERATION " . $this->shardManager->getFederationName() . " (" . $this->shardManager->getDistributionKey() . " = " . $shard['rangeLow'].") WITH RESET, FILTERING = OFF;"; + $sql = array_merge($sql, $federationSql); + } + } + + return $sql; + } + + /** + * @return string + */ + private function getFederationTypeDefaultValue() + { + $federationType = Type::getType($this->shardManager->getDistributionType()); + + switch ($federationType->getName()) { + case Type::GUID: + $defaultValue = '00000000-0000-0000-0000-000000000000'; + break; + case Type::INTEGER: + case Type::SMALLINT: + case Type::BIGINT: + $defaultValue = '0'; + break; + default: + $defaultValue = ''; + break; + } + + return $defaultValue; + } + + /** + * @return string + */ + private function getCreateFederationStatement() + { + $federationType = Type::getType($this->shardManager->getDistributionType()); + $federationTypeSql = $federationType->getSqlDeclaration(array(), $this->conn->getDatabasePlatform()); + + return "--Create Federation\n" . + "CREATE FEDERATION " . $this->shardManager->getFederationName() . " (" . $this->shardManager->getDistributionKey() . " " . $federationTypeSql ." RANGE)"; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureShardManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureShardManager.php new file mode 100644 index 0000000000000000000000000000000000000000..b9047a9563c81601c4df72f038d08aba501bca7b --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureShardManager.php @@ -0,0 +1,243 @@ +. + */ + +namespace Doctrine\DBAL\Sharding\SQLAzure; + +use Doctrine\DBAL\Sharding\ShardManager; +use Doctrine\DBAL\Sharding\ShardingException; +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Types\Type; + +/** + * Sharding using the SQL Azure Federations support. + * + * @author Benjamin Eberlei + */ +class SQLAzureShardManager implements ShardManager +{ + /** + * @var string + */ + private $federationName; + + /** + * @var boolean + */ + private $filteringEnabled; + + /** + * @var string + */ + private $distributionKey; + + /** + * @var string + */ + private $distributionType; + + /** + * @var \Doctrine\DBAL\Connection + */ + private $conn; + + /** + * @var string + */ + private $currentDistributionValue; + + /** + * @param \Doctrine\DBAL\Connection $conn + * + * @throws \Doctrine\DBAL\Sharding\ShardingException + */ + public function __construct(Connection $conn) + { + $this->conn = $conn; + $params = $conn->getParams(); + + if ( ! isset($params['sharding']['federationName'])) { + throw ShardingException::missingDefaultFederationName(); + } + + if ( ! isset($params['sharding']['distributionKey'])) { + throw ShardingException::missingDefaultDistributionKey(); + } + + if ( ! isset($params['sharding']['distributionType'])) { + throw ShardingException::missingDistributionType(); + } + + $this->federationName = $params['sharding']['federationName']; + $this->distributionKey = $params['sharding']['distributionKey']; + $this->distributionType = $params['sharding']['distributionType']; + $this->filteringEnabled = (isset($params['sharding']['filteringEnabled'])) ? (bool) $params['sharding']['filteringEnabled'] : false; + } + + /** + * Gets the name of the federation. + * + * @return string + */ + public function getFederationName() + { + return $this->federationName; + } + + /** + * Gets the distribution key. + * + * @return string + */ + public function getDistributionKey() + { + return $this->distributionKey; + } + + /** + * Gets the Doctrine Type name used for the distribution. + * + * @return string + */ + public function getDistributionType() + { + return $this->distributionType; + } + + /** + * Sets Enabled/Disable filtering on the fly. + * + * @param boolean $flag + * + * @return void + */ + public function setFilteringEnabled($flag) + { + $this->filteringEnabled = (bool) $flag; + } + + /** + * {@inheritDoc} + */ + public function selectGlobal() + { + if ($this->conn->isTransactionActive()) { + throw ShardingException::activeTransaction(); + } + + $sql = "USE FEDERATION ROOT WITH RESET"; + $this->conn->exec($sql); + $this->currentDistributionValue = null; + } + + /** + * {@inheritDoc} + */ + public function selectShard($distributionValue) + { + if ($this->conn->isTransactionActive()) { + throw ShardingException::activeTransaction(); + } + + if ($distributionValue === null || is_bool($distributionValue) || !is_scalar($distributionValue)) { + throw ShardingException::noShardDistributionValue(); + } + + $platform = $this->conn->getDatabasePlatform(); + $sql = sprintf( + "USE FEDERATION %s (%s = %s) WITH RESET, FILTERING = %s;", + $platform->quoteIdentifier($this->federationName), + $platform->quoteIdentifier($this->distributionKey), + $this->conn->quote($distributionValue), + ($this->filteringEnabled ? 'ON' : 'OFF') + ); + + $this->conn->exec($sql); + $this->currentDistributionValue = $distributionValue; + } + + /** + * {@inheritDoc} + */ + public function getCurrentDistributionValue() + { + return $this->currentDistributionValue; + } + + /** + * {@inheritDoc} + */ + public function getShards() + { + $sql = "SELECT member_id as id, + distribution_name as distribution_key, + CAST(range_low AS CHAR) AS rangeLow, + CAST(range_high AS CHAR) AS rangeHigh + FROM sys.federation_member_distributions d + INNER JOIN sys.federations f ON f.federation_id = d.federation_id + WHERE f.name = " . $this->conn->quote($this->federationName); + + return $this->conn->fetchAll($sql); + } + + /** + * {@inheritDoc} + */ + public function queryAll($sql, array $params = array(), array $types = array()) + { + $shards = $this->getShards(); + if (!$shards) { + throw new \RuntimeException("No shards found for " . $this->federationName); + } + + $result = array(); + $oldDistribution = $this->getCurrentDistributionValue(); + + foreach ($shards as $shard) { + $this->selectShard($shard['rangeLow']); + foreach ($this->conn->fetchAll($sql, $params, $types) as $row) { + $result[] = $row; + } + } + + if ($oldDistribution === null) { + $this->selectGlobal(); + } else { + $this->selectShard($oldDistribution); + } + + return $result; + } + + /** + * Splits Federation at a given distribution value. + * + * @param mixed $splitDistributionValue + * + * @return void + */ + public function splitFederation($splitDistributionValue) + { + $type = Type::getType($this->distributionType); + + $sql = "ALTER FEDERATION " . $this->getFederationName() . " " . + "SPLIT AT (" . $this->getDistributionKey() . " = " . + $this->conn->quote($splitDistributionValue, $type->getBindingType()) . ")"; + $this->conn->exec($sql); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/Schema/MultiTenantVisitor.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/Schema/MultiTenantVisitor.php new file mode 100644 index 0000000000000000000000000000000000000000..c1a524f76a4844a7f717fd3cfefe6c6178a94e0d --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/Schema/MultiTenantVisitor.php @@ -0,0 +1,169 @@ +. + */ + +namespace Doctrine\DBAL\Sharding\SQLAzure\Schema; + +use Doctrine\DBAL\Schema\Visitor\Visitor; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use Doctrine\DBAL\Schema\Sequence; +use Doctrine\DBAL\Schema\Index; + +/** + * Converts a single tenant schema into a multi-tenant schema for SQL Azure + * Federations under the following assumptions: + * + * - Every table is part of the multi-tenant application, only explicitly + * excluded tables are non-federated. The behavior of the tables being in + * global or federated database is undefined. It depends on you selecting a + * federation before DDL statements or not. + * - Every Primary key of a federated table is extended by another column + * 'tenant_id' with a default value of the SQLAzure function + * `federation_filtering_value('tenant_id')`. + * - You always have to work with `filtering=On` when using federations with this + * multi-tenant approach. + * - Primary keys are either using globally unique ids (GUID, Table Generator) + * or you explicitly add the tenent_id in every UPDATE or DELETE statement + * (otherwise they will affect the same-id rows from other tenents as well). + * SQLAzure throws errors when you try to create IDENTIY columns on federated + * tables. + * + * @author Benjamin Eberlei + */ +class MultiTenantVisitor implements Visitor +{ + /** + * @var array + */ + private $excludedTables = array(); + + /** + * @var string + */ + private $tenantColumnName; + + /** + * @var string + */ + private $tenantColumnType = 'integer'; + + /** + * Name of the federation distribution, defaulting to the tenantColumnName + * if not specified. + * + * @var string + */ + private $distributionName; + + /** + * @param array $excludedTables + * @param string $tenantColumnName + * @param string|null $distributionName + */ + public function __construct(array $excludedTables = array(), $tenantColumnName = 'tenant_id', $distributionName = null) + { + $this->excludedTables = $excludedTables; + $this->tenantColumnName = $tenantColumnName; + $this->distributionName = $distributionName ?: $tenantColumnName; + } + + /** + * {@inheritdoc} + */ + public function acceptTable(Table $table) + { + if (in_array($table->getName(), $this->excludedTables)) { + return; + } + + $table->addColumn($this->tenantColumnName, $this->tenantColumnType, array( + 'default' => "federation_filtering_value('". $this->distributionName ."')", + )); + + $clusteredIndex = $this->getClusteredIndex($table); + + $indexColumns = $clusteredIndex->getColumns(); + $indexColumns[] = $this->tenantColumnName; + + if ($clusteredIndex->isPrimary()) { + $table->dropPrimaryKey(); + $table->setPrimaryKey($indexColumns); + } else { + $table->dropIndex($clusteredIndex->getName()); + $table->addIndex($indexColumns, $clusteredIndex->getName()); + $table->getIndex($clusteredIndex->getName())->addFlag('clustered'); + } + } + + /** + * @param \Doctrine\DBAL\Schema\Table $table + * + * @return \Doctrine\DBAL\Schema\Index + * + * @throws \RuntimeException + */ + private function getClusteredIndex($table) + { + foreach ($table->getIndexes() as $index) { + if ($index->isPrimary() && ! $index->hasFlag('nonclustered')) { + return $index; + } elseif ($index->hasFlag('clustered')) { + return $index; + } + } + throw new \RuntimeException("No clustered index found on table " . $table->getName()); + } + + /** + * {@inheritdoc} + */ + public function acceptSchema(Schema $schema) + { + } + + /** + * {@inheritdoc} + */ + public function acceptColumn(Table $table, Column $column) + { + } + + /** + * {@inheritdoc} + */ + public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) + { + } + + /** + * {@inheritdoc} + */ + public function acceptIndex(Table $table, Index $index) + { + } + + /** + * {@inheritdoc} + */ + public function acceptSequence(Sequence $sequence) + { + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardChoser/MultiTenantShardChoser.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardChoser/MultiTenantShardChoser.php new file mode 100644 index 0000000000000000000000000000000000000000..f1d51b8c957c4e73a4c82d1a1feac1fc19a2210e --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardChoser/MultiTenantShardChoser.php @@ -0,0 +1,39 @@ +. + */ + +namespace Doctrine\DBAL\Sharding\ShardChoser; + +use Doctrine\DBAL\Sharding\PoolingShardConnection; + +/** + * The MultiTenant Shard choser assumes that the distribution value directly + * maps to the shard id. + * + * @author Benjamin Eberlei + */ +class MultiTenantShardChoser implements ShardChoser +{ + /** + * {@inheritdoc} + */ + public function pickShard($distributionValue, PoolingShardConnection $conn) + { + return $distributionValue; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardChoser/ShardChoser.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardChoser/ShardChoser.php new file mode 100644 index 0000000000000000000000000000000000000000..a7b85a66bbc37a7d2c003f570fed28afd56c79f4 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardChoser/ShardChoser.php @@ -0,0 +1,41 @@ +. + */ + +namespace Doctrine\DBAL\Sharding\ShardChoser; + +use Doctrine\DBAL\Sharding\PoolingShardConnection; + +/** + * Given a distribution value this shard-choser strategy will pick the shard to + * connect to for retrieving rows with the distribution value. + * + * @author Benjamin Eberlei + */ +interface ShardChoser +{ + /** + * Picks a shard for the given distribution value. + * + * @param string $distributionValue + * @param \Doctrine\DBAL\Sharding\PoolingShardConnection $conn + * + * @return integer + */ + function pickShard($distributionValue, PoolingShardConnection $conn); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardManager.php new file mode 100644 index 0000000000000000000000000000000000000000..b742793b8152bc6655074d83766bcf36f424b016 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardManager.php @@ -0,0 +1,93 @@ +. + */ + +namespace Doctrine\DBAL\Sharding; + +/** + * Sharding Manager gives access to APIs to implementing sharding on top of + * Doctrine\DBAL\Connection instances. + * + * For simplicity and developer ease-of-use (and understanding) the sharding + * API only covers single shard queries, no fan-out support. It is primarily + * suited for multi-tenant applications. + * + * The assumption about sharding here + * is that a distribution value can be found that gives access to all the + * necessary data for all use-cases. Switching between shards should be done with + * caution, especially if lazy loading is implemented. Any query is always + * executed against the last shard that was selected. If a query is created for + * a shard Y but then a shard X is selected when its actually executed you + * will hit the wrong shard. + * + * @author Benjamin Eberlei + */ +interface ShardManager +{ + /** + * Selects global database with global data. + * + * This is the default database that is connected when no shard is + * selected. + * + * @return void + */ + function selectGlobal(); + + /** + * Selects the shard against which the queries after this statement will be issued. + * + * @param string $distributionValue + * + * @return void + * + * @throws \Doctrine\DBAL\Sharding\ShardingException If no value is passed as shard identifier. + */ + function selectShard($distributionValue); + + /** + * Gets the distribution value currently used for sharding. + * + * @return string + */ + function getCurrentDistributionValue(); + + /** + * Gets information about the amount of shards and other details. + * + * Format is implementation specific, each shard is one element and has an + * 'id' attribute at least. + * + * @return array + */ + function getShards(); + + /** + * Queries all shards in undefined order and return the results appended to + * each other. Restore the previous distribution value after execution. + * + * Using {@link \Doctrine\DBAL\Connection::fetchAll} to retrieve rows internally. + * + * @param string $sql + * @param array $params + * @param array $types + * + * @return array + */ + function queryAll($sql, array $params, array $types); +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardingException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardingException.php new file mode 100644 index 0000000000000000000000000000000000000000..407bf847d4d6796c27c42f0bba366ca8434b8df1 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardingException.php @@ -0,0 +1,78 @@ +. + */ + +namespace Doctrine\DBAL\Sharding; + +use Doctrine\DBAL\DBALException; + +/** + * Sharding related Exceptions + * + * @since 2.3 + */ +class ShardingException extends DBALException +{ + /** + * @return \Doctrine\DBAL\Sharding\ShardingException + */ + static public function notImplemented() + { + return new self("This functionality is not implemented with this sharding provider.", 1331557937); + } + + /** + * @return \Doctrine\DBAL\Sharding\ShardingException + */ + static public function missingDefaultFederationName() + { + return new self("SQLAzure requires a federation name to be set during sharding configuration.", 1332141280); + } + + /** + * @return \Doctrine\DBAL\Sharding\ShardingException + */ + static public function missingDefaultDistributionKey() + { + return new self("SQLAzure requires a distribution key to be set during sharding configuration.", 1332141329); + } + + /** + * @return \Doctrine\DBAL\Sharding\ShardingException + */ + static public function activeTransaction() + { + return new self("Cannot switch shard during an active transaction.", 1332141766); + } + + /** + * @return \Doctrine\DBAL\Sharding\ShardingException + */ + static public function noShardDistributionValue() + { + return new self("You have to specify a string or integer as shard distribution value.", 1332142103); + } + + /** + * @return \Doctrine\DBAL\Sharding\ShardingException + */ + static public function missingDistributionType() + { + return new self("You have to specify a sharding distribution type such as 'integer', 'string', 'guid'."); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php new file mode 100644 index 0000000000000000000000000000000000000000..77d0584ef94f6d73ccea1d700f781183c7392c25 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php @@ -0,0 +1,315 @@ +. + */ + +namespace Doctrine\DBAL; + +use PDO; +use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Driver\Statement as DriverStatement; + +/** + * A thin wrapper around a Doctrine\DBAL\Driver\Statement that adds support + * for logging, DBAL mapping types, etc. + * + * @author Roman Borschel + * @since 2.0 + */ +class Statement implements \IteratorAggregate, DriverStatement +{ + /** + * The SQL statement. + * + * @var string + */ + protected $sql; + + /** + * The bound parameters. + * + * @var array + */ + protected $params = array(); + + /** + * The parameter types. + * + * @var array + */ + protected $types = array(); + + /** + * The underlying driver statement. + * + * @var \Doctrine\DBAL\Driver\Statement + */ + protected $stmt; + + /** + * The underlying database platform. + * + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + protected $platform; + + /** + * The connection this statement is bound to and executed on. + * + * @var \Doctrine\DBAL\Connection + */ + protected $conn; + + /** + * Creates a new Statement for the given SQL and Connection. + * + * @param string $sql The SQL of the statement. + * @param \Doctrine\DBAL\Connection $conn The connection on which the statement should be executed. + */ + public function __construct($sql, Connection $conn) + { + $this->sql = $sql; + $this->stmt = $conn->getWrappedConnection()->prepare($sql); + $this->conn = $conn; + $this->platform = $conn->getDatabasePlatform(); + } + + /** + * Binds a parameter value to the statement. + * + * The value can optionally be bound with a PDO binding type or a DBAL mapping type. + * If bound with a DBAL mapping type, the binding type is derived from the mapping + * type and the value undergoes the conversion routines of the mapping type before + * being bound. + * + * @param string $name The name or position of the parameter. + * @param mixed $value The value of the parameter. + * @param mixed $type Either a PDO binding type or a DBAL mapping type name or instance. + * + * @return boolean TRUE on success, FALSE on failure. + */ + public function bindValue($name, $value, $type = null) + { + $this->params[$name] = $value; + $this->types[$name] = $type; + if ($type !== null) { + if (is_string($type)) { + $type = Type::getType($type); + } + if ($type instanceof Type) { + $value = $type->convertToDatabaseValue($value, $this->platform); + $bindingType = $type->getBindingType(); + } else { + $bindingType = $type; // PDO::PARAM_* constants + } + + return $this->stmt->bindValue($name, $value, $bindingType); + } else { + return $this->stmt->bindValue($name, $value); + } + } + + /** + * Binds a parameter to a value by reference. + * + * Binding a parameter by reference does not support DBAL mapping types. + * + * @param string $name The name or position of the parameter. + * @param mixed $var The reference to the variable to bind. + * @param integer $type The PDO binding type. + * @param integer|null $length Must be specified when using an OUT bind + * so that PHP allocates enough memory to hold the returned value. + * + * @return boolean TRUE on success, FALSE on failure. + */ + public function bindParam($name, &$var, $type = PDO::PARAM_STR, $length = null) + { + $this->params[$name] = $var; + $this->types[$name] = $type; + + return $this->stmt->bindParam($name, $var, $type, $length); + } + + /** + * Executes the statement with the currently bound parameters. + * + * @param array|null $params + * + * @return boolean TRUE on success, FALSE on failure. + * + * @throws \Doctrine\DBAL\DBALException + */ + public function execute($params = null) + { + if (is_array($params)) { + $this->params = $params; + } + + $logger = $this->conn->getConfiguration()->getSQLLogger(); + if ($logger) { + $logger->startQuery($this->sql, $this->params, $this->types); + } + + try { + $stmt = $this->stmt->execute($params); + } catch (\Exception $ex) { + if ($logger) { + $logger->stopQuery(); + } + throw DBALException::driverExceptionDuringQuery( + $this->conn->getDriver(), + $ex, + $this->sql, + $this->conn->resolveParams($this->params, $this->types) + ); + } + + if ($logger) { + $logger->stopQuery(); + } + $this->params = array(); + $this->types = array(); + + return $stmt; + } + + /** + * Closes the cursor, freeing the database resources used by this statement. + * + * @return boolean TRUE on success, FALSE on failure. + */ + public function closeCursor() + { + return $this->stmt->closeCursor(); + } + + /** + * Returns the number of columns in the result set. + * + * @return integer + */ + public function columnCount() + { + return $this->stmt->columnCount(); + } + + /** + * Fetches the SQLSTATE associated with the last operation on the statement. + * + * @return string + */ + public function errorCode() + { + return $this->stmt->errorCode(); + } + + /** + * Fetches extended error information associated with the last operation on the statement. + * + * @return array + */ + public function errorInfo() + { + return $this->stmt->errorInfo(); + } + + /** + * {@inheritdoc} + */ + public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) + { + if ($arg2 === null) { + return $this->stmt->setFetchMode($fetchMode); + } elseif ($arg3 === null) { + return $this->stmt->setFetchMode($fetchMode, $arg2); + } + + return $this->stmt->setFetchMode($fetchMode, $arg2, $arg3); + } + + /** + * Required by interface IteratorAggregate. + * + * {@inheritdoc} + */ + public function getIterator() + { + return $this->stmt; + } + + /** + * Fetches the next row from a result set. + * + * @param integer|null $fetchMode + * + * @return mixed The return value of this function on success depends on the fetch type. + * In all cases, FALSE is returned on failure. + */ + public function fetch($fetchMode = null) + { + return $this->stmt->fetch($fetchMode); + } + + /** + * Returns an array containing all of the result set rows. + * + * @param integer|null $fetchMode + * @param mixed $fetchArgument + * + * @return array An array containing all of the remaining rows in the result set. + */ + public function fetchAll($fetchMode = null, $fetchArgument = 0) + { + if ($fetchArgument !== 0) { + return $this->stmt->fetchAll($fetchMode, $fetchArgument); + } + + return $this->stmt->fetchAll($fetchMode); + } + + /** + * Returns a single column from the next row of a result set. + * + * @param integer $columnIndex + * + * @return mixed A single column from the next row of a result set or FALSE if there are no more rows. + */ + public function fetchColumn($columnIndex = 0) + { + return $this->stmt->fetchColumn($columnIndex); + } + + /** + * Returns the number of rows affected by the last execution of this statement. + * + * @return integer The number of affected rows. + */ + public function rowCount() + { + return $this->stmt->rowCount(); + } + + /** + * Gets the wrapped driver statement. + * + * @return \Doctrine\DBAL\Driver\Statement + */ + public function getWrappedStatement() + { + return $this->stmt; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..4d76ca92b7a2a886abf702afe5b9637fff9000c9 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php @@ -0,0 +1,130 @@ +. + */ + +namespace Doctrine\DBAL\Tools\Console\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Task for executing arbitrary SQL that can come from a file or directly from + * the command line. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ImportCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('dbal:import') + ->setDescription('Import SQL file(s) directly to Database.') + ->setDefinition(array( + new InputArgument( + 'file', InputArgument::REQUIRED | InputArgument::IS_ARRAY, 'File path(s) of SQL to be executed.' + ) + )) + ->setHelp(<<getHelper('db')->getConnection(); + + if (($fileNames = $input->getArgument('file')) !== null) { + foreach ((array) $fileNames as $fileName) { + $filePath = realpath($fileName); + + // Phar compatibility. + if (false === $filePath) { + $filePath = $fileName; + } + + if ( ! file_exists($filePath)) { + throw new \InvalidArgumentException( + sprintf("SQL file '%s' does not exist.", $filePath) + ); + } elseif ( ! is_readable($filePath)) { + throw new \InvalidArgumentException( + sprintf("SQL file '%s' does not have read permissions.", $filePath) + ); + } + + $output->write(sprintf("Processing file '%s'... ", $filePath)); + $sql = file_get_contents($filePath); + + if ($conn instanceof \Doctrine\DBAL\Driver\PDOConnection) { + // PDO Drivers + try { + $lines = 0; + + $stmt = $conn->prepare($sql); + $stmt->execute(); + + do { + // Required due to "MySQL has gone away!" issue + $stmt->fetch(); + $stmt->closeCursor(); + + $lines++; + } while ($stmt->nextRowset()); + + $output->write(sprintf('%d statements executed!', $lines) . PHP_EOL); + } catch (\PDOException $e) { + $output->write('error!' . PHP_EOL); + + throw new \RuntimeException($e->getMessage(), $e->getCode(), $e); + } + } else { + // Non-PDO Drivers (ie. OCI8 driver) + $stmt = $conn->prepare($sql); + $rs = $stmt->execute(); + + if ($rs) { + $output->writeln('OK!' . PHP_EOL); + } else { + $error = $stmt->errorInfo(); + + $output->write('error!' . PHP_EOL); + + throw new \RuntimeException($error[2], $error[0]); + } + + $stmt->closeCursor(); + } + } + } + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..f7acd0a86eebd9651204f2c06f51d44ce01ba90f --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php @@ -0,0 +1,172 @@ +. + */ + +namespace Doctrine\DBAL\Tools\Console\Command; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\DBAL\Platforms\Keywords\ReservedKeywordsValidator; + +class ReservedWordsCommand extends Command +{ + /** + * @var array + */ + private $keywordListClasses = array( + 'mysql' => 'Doctrine\DBAL\Platforms\Keywords\MySQLKeywords', + 'mysql57' => 'Doctrine\DBAL\Platforms\Keywords\MySQL57Keywords', + 'sqlserver' => 'Doctrine\DBAL\Platforms\Keywords\SQLServerKeywords', + 'sqlserver2005' => 'Doctrine\DBAL\Platforms\Keywords\SQLServer2005Keywords', + 'sqlserver2008' => 'Doctrine\DBAL\Platforms\Keywords\SQLServer2008Keywords', + 'sqlserver2012' => 'Doctrine\DBAL\Platforms\Keywords\SQLServer2012Keywords', + 'sqlite' => 'Doctrine\DBAL\Platforms\Keywords\SQLiteKeywords', + 'pgsql' => 'Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords', + 'pgsql91' => 'Doctrine\DBAL\Platforms\Keywords\PostgreSQL91Keywords', + 'pgsql92' => 'Doctrine\DBAL\Platforms\Keywords\PostgreSQL92Keywords', + 'oracle' => 'Doctrine\DBAL\Platforms\Keywords\OracleKeywords', + 'db2' => 'Doctrine\DBAL\Platforms\Keywords\DB2Keywords', + 'sqlanywhere' => 'Doctrine\DBAL\Platforms\Keywords\SQLAnywhereKeywords', + 'sqlanywhere11' => 'Doctrine\DBAL\Platforms\Keywords\SQLAnywhere11Keywords', + 'sqlanywhere12' => 'Doctrine\DBAL\Platforms\Keywords\SQLAnywhere12Keywords', + 'sqlanywhere16' => 'Doctrine\DBAL\Platforms\Keywords\SQLAnywhere16Keywords', + ); + + /** + * If you want to add or replace a keywords list use this command. + * + * @param string $name + * @param string $class + * + * @return void + */ + public function setKeywordListClass($name, $class) + { + $this->keywordListClasses[$name] = $class; + } + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('dbal:reserved-words') + ->setDescription('Checks if the current database contains identifiers that are reserved.') + ->setDefinition(array( + new InputOption( + 'list', 'l', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Keyword-List name.' + ) + )) + ->setHelp(<<%command.full_name% + +If you want to check against specific dialects you can +pass them to the command: + + %command.full_name% mysql pgsql + +The following keyword lists are currently shipped with Doctrine: + + * mysql + * mysql57 + * pgsql + * pgsql92 + * sqlite + * oracle + * sqlserver + * sqlserver2005 + * sqlserver2008 + * sqlserver2012 + * sqlanywhere + * sqlanywhere11 + * sqlanywhere12 + * sqlanywhere16 + * db2 (Not checked by default) +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + /* @var $conn \Doctrine\DBAL\Connection */ + $conn = $this->getHelper('db')->getConnection(); + + $keywordLists = (array) $input->getOption('list'); + if ( ! $keywordLists) { + $keywordLists = array( + 'mysql', + 'mysql57', + 'pgsql', + 'pgsql92', + 'sqlite', + 'oracle', + 'sqlserver', + 'sqlserver2005', + 'sqlserver2008', + 'sqlserver2012', + 'sqlanywhere', + 'sqlanywhere11', + 'sqlanywhere12', + 'sqlanywhere16', + ); + } + + $keywords = array(); + foreach ($keywordLists as $keywordList) { + if (!isset($this->keywordListClasses[$keywordList])) { + throw new \InvalidArgumentException( + "There exists no keyword list with name '" . $keywordList . "'. ". + "Known lists: " . implode(", ", array_keys($this->keywordListClasses)) + ); + } + $class = $this->keywordListClasses[$keywordList]; + $keywords[] = new $class; + } + + $output->write('Checking keyword violations for ' . implode(", ", $keywordLists) . "...", true); + + /* @var $schema \Doctrine\DBAL\Schema\Schema */ + $schema = $conn->getSchemaManager()->createSchema(); + $visitor = new ReservedKeywordsValidator($keywords); + $schema->visit($visitor); + + $violations = $visitor->getViolations(); + if (count($violations) == 0) { + $output->write("No reserved keywords violations have been found!", true); + } else { + $output->write('There are ' . count($violations) . ' reserved keyword violations in your database schema:', true); + foreach ($violations as $violation) { + $output->write(' - ' . $violation, true); + } + + return 1; + } + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..b2b2d97004e2f28dcaa56129938251b258ecbeda --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php @@ -0,0 +1,88 @@ +. + */ + +namespace Doctrine\DBAL\Tools\Console\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Input\InputOption; + +/** + * Task for executing arbitrary SQL that can come from a file or directly from + * the command line. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class RunSqlCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('dbal:run-sql') + ->setDescription('Executes arbitrary SQL directly from the command line.') + ->setDefinition(array( + new InputArgument('sql', InputArgument::REQUIRED, 'The SQL statement to execute.'), + new InputOption('depth', null, InputOption::VALUE_REQUIRED, 'Dumping depth of result set.', 7) + )) + ->setHelp(<<getHelper('db')->getConnection(); + + if (($sql = $input->getArgument('sql')) === null) { + throw new \RuntimeException("Argument 'SQL' is required in order to execute this command correctly."); + } + + $depth = $input->getOption('depth'); + + if ( ! is_numeric($depth)) { + throw new \LogicException("Option 'depth' must contains an integer value"); + } + + if (stripos($sql, 'select') === 0) { + $resultSet = $conn->fetchAll($sql); + } else { + $resultSet = $conn->executeUpdate($sql); + } + + ob_start(); + \Doctrine\Common\Util\Debug::dump($resultSet, (int) $depth); + $message = ob_get_clean(); + + $output->write($message); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/ConsoleRunner.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/ConsoleRunner.php new file mode 100644 index 0000000000000000000000000000000000000000..3fb9c050cdda0e7b5ae85961b3262f6449372f76 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/ConsoleRunner.php @@ -0,0 +1,107 @@ +. + */ + +namespace Doctrine\DBAL\Tools\Console; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Tools\Console\Command\ImportCommand; +use Doctrine\DBAL\Tools\Console\Command\ReservedWordsCommand; +use Doctrine\DBAL\Tools\Console\Command\RunSqlCommand; +use Symfony\Component\Console\Helper\HelperSet; +use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper; +use Symfony\Component\Console\Application; +use Doctrine\DBAL\Version; + +/** + * Handles running the Console Tools inside Symfony Console context. + */ +class ConsoleRunner +{ + /** + * Create a Symfony Console HelperSet + * + * @param Connection $connection + * + * @return HelperSet + */ + static public function createHelperSet(Connection $connection) + { + return new HelperSet(array( + 'db' => new ConnectionHelper($connection) + )); + } + + /** + * Runs console with the given helperset. + * + * @param \Symfony\Component\Console\Helper\HelperSet $helperSet + * @param \Symfony\Component\Console\Command\Command[] $commands + * + * @return void + */ + static public function run(HelperSet $helperSet, $commands = array()) + { + $cli = new Application('Doctrine Command Line Interface', Version::VERSION); + + $cli->setCatchExceptions(true); + $cli->setHelperSet($helperSet); + + self::addCommands($cli); + + $cli->addCommands($commands); + $cli->run(); + } + + /** + * @param Application $cli + * + * @return void + */ + static public function addCommands(Application $cli) + { + $cli->addCommands(array( + new RunSqlCommand(), + new ImportCommand(), + new ReservedWordsCommand(), + )); + } + + /** + * Prints the instructions to create a configuration file + */ + static public function printCliConfigTemplate() + { + echo <<<'HELP' +You are missing a "cli-config.php" or "config/cli-config.php" file in your +project, which is required to get the Doctrine-DBAL Console working. You can use the +following sample as a template: + +. + */ + +namespace Doctrine\DBAL\Tools\Console\Helper; + +use Symfony\Component\Console\Helper\Helper; +use Doctrine\DBAL\Connection; + +/** + * Doctrine CLI Connection Helper. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ConnectionHelper extends Helper +{ + /** + * The Doctrine database Connection. + * + * @var \Doctrine\DBAL\Connection + */ + protected $_connection; + + /** + * Constructor. + * + * @param \Doctrine\DBAL\Connection $connection The Doctrine database Connection. + */ + public function __construct(Connection $connection) + { + $this->_connection = $connection; + } + + /** + * Retrieves the Doctrine database Connection. + * + * @return \Doctrine\DBAL\Connection + */ + public function getConnection() + { + return $this->_connection; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'connection'; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ArrayType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ArrayType.php new file mode 100644 index 0000000000000000000000000000000000000000..f8c62cb7a9066d34ff1dd9f023cefa191e83f7cf --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ArrayType.php @@ -0,0 +1,81 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps a PHP array to a clob SQL type. + * + * @since 2.0 + */ +class ArrayType extends Type +{ + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getClobTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + // @todo 3.0 - $value === null check to save real NULL in database + return serialize($value); + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if ($value === null) { + return null; + } + + $value = (is_resource($value)) ? stream_get_contents($value) : $value; + $val = unserialize($value); + if ($val === false && $value != 'b:0;') { + throw ConversionException::conversionFailed($value, $this->getName()); + } + + return $val; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::TARRAY; + } + + /** + * {@inheritdoc} + */ + public function requiresSQLCommentHint(AbstractPlatform $platform) + { + return true; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/BigIntType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/BigIntType.php new file mode 100644 index 0000000000000000000000000000000000000000..1a9a6c37fced18e3d0056f81c031d707a7dfccbc --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/BigIntType.php @@ -0,0 +1,63 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps a database BIGINT to a PHP string. + * + * @author robo + * @since 2.0 + */ +class BigIntType extends Type +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::BIGINT; + } + + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getBigIntTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function getBindingType() + { + return \PDO::PARAM_STR; + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + return (null === $value) ? null : (string) $value; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/BinaryType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/BinaryType.php new file mode 100644 index 0000000000000000000000000000000000000000..a22a44054251d7ca4b76dd02a7c5fef173d57d55 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/BinaryType.php @@ -0,0 +1,78 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps ab SQL BINARY/VARBINARY to a PHP resource stream. + * + * @author Steve Müller + * @since 2.5 + */ +class BinaryType extends Type +{ + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getBinaryTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if (null === $value) { + return null; + } + + if (is_string($value)) { + $fp = fopen('php://temp', 'rb+'); + fwrite($fp, $value); + fseek($fp, 0); + $value = $fp; + } + + if ( ! is_resource($value)) { + throw ConversionException::conversionFailed($value, self::BINARY); + } + + return $value; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::BINARY; + } + + /** + * {@inheritdoc} + */ + public function getBindingType() + { + return \PDO::PARAM_LOB; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/BlobType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/BlobType.php new file mode 100644 index 0000000000000000000000000000000000000000..bd89301e21bb54933d654880ac7d3bb85828cb27 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/BlobType.php @@ -0,0 +1,77 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps an SQL BLOB to a PHP resource stream. + * + * @since 2.2 + */ +class BlobType extends Type +{ + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getBlobTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if (null === $value) { + return null; + } + + if (is_string($value)) { + $fp = fopen('php://temp', 'rb+'); + fwrite($fp, $value); + fseek($fp, 0); + $value = $fp; + } + + if ( ! is_resource($value)) { + throw ConversionException::conversionFailed($value, self::BLOB); + } + + return $value; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::BLOB; + } + + /** + * {@inheritdoc} + */ + public function getBindingType() + { + return \PDO::PARAM_LOB; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/BooleanType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/BooleanType.php new file mode 100644 index 0000000000000000000000000000000000000000..9fea80f10a2f89876649c786890f8784abcdd796 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/BooleanType.php @@ -0,0 +1,70 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps an SQL boolean to a PHP boolean. + * + * @since 2.0 + */ +class BooleanType extends Type +{ + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getBooleanTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + return $platform->convertBooleansToDatabaseValue($value); + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + return $platform->convertFromBoolean($value); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::BOOLEAN; + } + + /** + * {@inheritdoc} + */ + public function getBindingType() + { + return \PDO::PARAM_BOOL; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php new file mode 100644 index 0000000000000000000000000000000000000000..4675101b3058770b2e838addf2e8ff793aa8fff4 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php @@ -0,0 +1,68 @@ +. + */ + +/** + * Conversion Exception is thrown when the database to PHP conversion fails. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +namespace Doctrine\DBAL\Types; + +class ConversionException extends \Doctrine\DBAL\DBALException +{ + /** + * Thrown when a Database to Doctrine Type Conversion fails. + * + * @param string $value + * @param string $toType + * + * @return \Doctrine\DBAL\Types\ConversionException + */ + static public function conversionFailed($value, $toType) + { + $value = (strlen($value) > 32) ? substr($value, 0, 20) . "..." : $value; + + return new self('Could not convert database value "' . $value . '" to Doctrine Type ' . $toType); + } + + /** + * Thrown when a Database to Doctrine Type Conversion fails and we can make a statement + * about the expected format. + * + * @param string $value + * @param string $toType + * @param string $expectedFormat + * + * @return \Doctrine\DBAL\Types\ConversionException + */ + static public function conversionFailedFormat($value, $toType, $expectedFormat) + { + $value = (strlen($value) > 32) ? substr($value, 0, 20) . "..." : $value; + + return new self( + 'Could not convert database value "' . $value . '" to Doctrine Type ' . + $toType . '. Expected format: ' . $expectedFormat + ); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DateTimeType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DateTimeType.php new file mode 100644 index 0000000000000000000000000000000000000000..c5715a795c0e079b7221ce30ac4d196465591084 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DateTimeType.php @@ -0,0 +1,77 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps an SQL DATETIME/TIMESTAMP to a PHP DateTime object. + * + * @since 2.0 + */ +class DateTimeType extends Type +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::DATETIME; + } + + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getDateTimeTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + return ($value !== null) + ? $value->format($platform->getDateTimeFormatString()) : null; + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if ($value === null || $value instanceof \DateTime) { + return $value; + } + + $val = \DateTime::createFromFormat($platform->getDateTimeFormatString(), $value); + + if ( ! $val) { + $val = date_create($value); + } + + if ( ! $val) { + throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getDateTimeFormatString()); + } + + return $val; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DateTimeTzType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DateTimeTzType.php new file mode 100644 index 0000000000000000000000000000000000000000..2a9c6fa7b74d8e3f1931fb947ea042d4998f0f6a --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DateTimeTzType.php @@ -0,0 +1,90 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * DateTime type saving additional timezone information. + * + * Caution: Databases are not necessarily experts at storing timezone related + * data of dates. First, of all the supported vendors only PostgreSQL and Oracle + * support storing Timezone data. But those two don't save the actual timezone + * attached to a DateTime instance (for example "Europe/Berlin" or "America/Montreal") + * but the current offset of them related to UTC. That means depending on daylight saving times + * or not you may get different offsets. + * + * This datatype makes only sense to use, if your application works with an offset, not + * with an actual timezone that uses transitions. Otherwise your DateTime instance + * attached with a timezone such as Europe/Berlin gets saved into the database with + * the offset and re-created from persistence with only the offset, not the original timezone + * attached. + * + * @link www.doctrine-project.org + * @since 1.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class DateTimeTzType extends Type +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::DATETIMETZ; + } + + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getDateTimeTzTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + return ($value !== null) + ? $value->format($platform->getDateTimeTzFormatString()) : null; + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if ($value === null || $value instanceof \DateTime) { + return $value; + } + + $val = \DateTime::createFromFormat($platform->getDateTimeTzFormatString(), $value); + if ( ! $val) { + throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getDateTimeTzFormatString()); + } + + return $val; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DateType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DateType.php new file mode 100644 index 0000000000000000000000000000000000000000..9d3375586397b2ff3ddae793ae651d70d106c464 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DateType.php @@ -0,0 +1,72 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps an SQL DATE to a PHP Date object. + * + * @since 2.0 + */ +class DateType extends Type +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::DATE; + } + + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getDateTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + return ($value !== null) + ? $value->format($platform->getDateFormatString()) : null; + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if ($value === null || $value instanceof \DateTime) { + return $value; + } + + $val = \DateTime::createFromFormat('!'.$platform->getDateFormatString(), $value); + if ( ! $val) { + throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getDateFormatString()); + } + + return $val; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DecimalType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DecimalType.php new file mode 100644 index 0000000000000000000000000000000000000000..df251d71751605bf78b82189198bc6946c538c30 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DecimalType.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps an SQL DECIMAL to a PHP string. + * + * @since 2.0 + */ +class DecimalType extends Type +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::DECIMAL; + } + + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getDecimalTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + return (null === $value) ? null : $value; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/FloatType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/FloatType.php new file mode 100644 index 0000000000000000000000000000000000000000..87f9c32ae1a865f1bc80da1de5ab7698d19a77f5 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/FloatType.php @@ -0,0 +1,49 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +class FloatType extends Type +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::FLOAT; + } + + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getFloatDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + return (null === $value) ? null : (double) $value; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/GuidType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/GuidType.php new file mode 100644 index 0000000000000000000000000000000000000000..761d58a8e8513124a13110e52692c58a87e2dd91 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/GuidType.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Represents a GUID/UUID datatype (both are actually synonyms) in the database. + * + * @author Benjamin Eberlei + * @since 2.3 + */ +class GuidType extends StringType +{ + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getGuidTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::GUID; + } + + /** + * {@inheritdoc} + */ + public function requiresSQLCommentHint(AbstractPlatform $platform) + { + return !$platform->hasNativeGuidType(); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/IntegerType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/IntegerType.php new file mode 100644 index 0000000000000000000000000000000000000000..6fe6375ec810e6fe267755aac8ab154ebf90c4ee --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/IntegerType.php @@ -0,0 +1,63 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps an SQL INT to a PHP integer. + * + * @author Roman Borschel + * @since 2.0 + */ +class IntegerType extends Type +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::INTEGER; + } + + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getIntegerTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + return (null === $value) ? null : (int) $value; + } + + /** + * {@inheritdoc} + */ + public function getBindingType() + { + return \PDO::PARAM_INT; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/JsonArrayType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/JsonArrayType.php new file mode 100644 index 0000000000000000000000000000000000000000..79c3259411b0449eff3faaa66b03791cfad06ba1 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/JsonArrayType.php @@ -0,0 +1,81 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Array Type which can be used to generate json arrays. + * + * @since 2.3 + * @author Johannes M. Schmitt + */ +class JsonArrayType extends Type +{ + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getJsonTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + if (null === $value) { + return null; + } + + return json_encode($value); + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if ($value === null || $value === '') { + return array(); + } + + $value = (is_resource($value)) ? stream_get_contents($value) : $value; + + return json_decode($value, true); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::JSON_ARRAY; + } + + /** + * {@inheritdoc} + */ + public function requiresSQLCommentHint(AbstractPlatform $platform) + { + return ! $platform->hasNativeJsonType(); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ObjectType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ObjectType.php new file mode 100644 index 0000000000000000000000000000000000000000..0b1f87a23c72832a4a33d1f5f46011250ee9ed0d --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ObjectType.php @@ -0,0 +1,80 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps a PHP object to a clob SQL type. + * + * @since 2.0 + */ +class ObjectType extends Type +{ + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getClobTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + return serialize($value); + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if ($value === null) { + return null; + } + + $value = (is_resource($value)) ? stream_get_contents($value) : $value; + $val = unserialize($value); + if ($val === false && $value !== 'b:0;') { + throw ConversionException::conversionFailed($value, $this->getName()); + } + + return $val; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::OBJECT; + } + + /** + * {@inheritdoc} + */ + public function requiresSQLCommentHint(AbstractPlatform $platform) + { + return true; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/SimpleArrayType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/SimpleArrayType.php new file mode 100644 index 0000000000000000000000000000000000000000..47c821be4e4353f52562d63be589ae97b988dedd --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/SimpleArrayType.php @@ -0,0 +1,83 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Array Type which can be used for simple values. + * + * Only use this type if you are sure that your values cannot contain a ",". + * + * @since 2.3 + * @author Johannes M. Schmitt + */ +class SimpleArrayType extends Type +{ + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getClobTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + if (!$value) { + return null; + } + + return implode(',', $value); + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if ($value === null) { + return array(); + } + + $value = (is_resource($value)) ? stream_get_contents($value) : $value; + + return explode(',', $value); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::SIMPLE_ARRAY; + } + + /** + * {@inheritdoc} + */ + public function requiresSQLCommentHint(AbstractPlatform $platform) + { + return true; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/SmallIntType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/SmallIntType.php new file mode 100644 index 0000000000000000000000000000000000000000..7ebae6ebe2ae45e7400c7d2c4299500c4612b8fe --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/SmallIntType.php @@ -0,0 +1,62 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps a database SMALLINT to a PHP integer. + * + * @author robo + */ +class SmallIntType extends Type +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::SMALLINT; + } + + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getSmallIntTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + return (null === $value) ? null : (int) $value; + } + + /** + * {@inheritdoc} + */ + public function getBindingType() + { + return \PDO::PARAM_INT; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/StringType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/StringType.php new file mode 100644 index 0000000000000000000000000000000000000000..39bd32dbc8e41625092650a06c6307d33276246c --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/StringType.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps an SQL VARCHAR to a PHP string. + * + * @since 2.0 + */ +class StringType extends Type +{ + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function getDefaultLength(AbstractPlatform $platform) + { + return $platform->getVarcharDefaultLength(); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::STRING; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/TextType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/TextType.php new file mode 100644 index 0000000000000000000000000000000000000000..4055ac88d224ae35bf280276c09bbdeb273e49bf --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/TextType.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps an SQL CLOB to a PHP string. + * + * @since 2.0 + */ +class TextType extends Type +{ + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getClobTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + return (is_resource($value)) ? stream_get_contents($value) : $value; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::TEXT; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/TimeType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/TimeType.php new file mode 100644 index 0000000000000000000000000000000000000000..554d56dc0623390b5d64407bcbed0788e3e5d531 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/TimeType.php @@ -0,0 +1,72 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps an SQL TIME to a PHP DateTime object. + * + * @since 2.0 + */ +class TimeType extends Type +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return Type::TIME; + } + + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getTimeTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + return ($value !== null) + ? $value->format($platform->getTimeFormatString()) : null; + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if ($value === null || $value instanceof \DateTime) { + return $value; + } + + $val = \DateTime::createFromFormat('!' . $platform->getTimeFormatString(), $value); + if ( ! $val) { + throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getTimeFormatString()); + } + + return $val; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/Type.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/Type.php new file mode 100644 index 0000000000000000000000000000000000000000..9fa464f58b04842cbfc5b910389d0fb2f6dd0658 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/Type.php @@ -0,0 +1,341 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\DBALException; + +/** + * The base class for so-called Doctrine mapping types. + * + * A Type object is obtained by calling the static {@link getType()} method. + * + * @author Roman Borschel + * @author Benjamin Eberlei + * @since 2.0 + */ +abstract class Type +{ + const TARRAY = 'array'; + const SIMPLE_ARRAY = 'simple_array'; + const JSON_ARRAY = 'json_array'; + const BIGINT = 'bigint'; + const BOOLEAN = 'boolean'; + const DATETIME = 'datetime'; + const DATETIMETZ = 'datetimetz'; + const DATE = 'date'; + const TIME = 'time'; + const DECIMAL = 'decimal'; + const INTEGER = 'integer'; + const OBJECT = 'object'; + const SMALLINT = 'smallint'; + const STRING = 'string'; + const TEXT = 'text'; + const BINARY = 'binary'; + const BLOB = 'blob'; + const FLOAT = 'float'; + const GUID = 'guid'; + + /** + * Map of already instantiated type objects. One instance per type (flyweight). + * + * @var array + */ + private static $_typeObjects = array(); + + /** + * The map of supported doctrine mapping types. + * + * @var array + */ + private static $_typesMap = array( + self::TARRAY => 'Doctrine\DBAL\Types\ArrayType', + self::SIMPLE_ARRAY => 'Doctrine\DBAL\Types\SimpleArrayType', + self::JSON_ARRAY => 'Doctrine\DBAL\Types\JsonArrayType', + self::OBJECT => 'Doctrine\DBAL\Types\ObjectType', + self::BOOLEAN => 'Doctrine\DBAL\Types\BooleanType', + self::INTEGER => 'Doctrine\DBAL\Types\IntegerType', + self::SMALLINT => 'Doctrine\DBAL\Types\SmallIntType', + self::BIGINT => 'Doctrine\DBAL\Types\BigIntType', + self::STRING => 'Doctrine\DBAL\Types\StringType', + self::TEXT => 'Doctrine\DBAL\Types\TextType', + self::DATETIME => 'Doctrine\DBAL\Types\DateTimeType', + self::DATETIMETZ => 'Doctrine\DBAL\Types\DateTimeTzType', + self::DATE => 'Doctrine\DBAL\Types\DateType', + self::TIME => 'Doctrine\DBAL\Types\TimeType', + self::DECIMAL => 'Doctrine\DBAL\Types\DecimalType', + self::FLOAT => 'Doctrine\DBAL\Types\FloatType', + self::BINARY => 'Doctrine\DBAL\Types\BinaryType', + self::BLOB => 'Doctrine\DBAL\Types\BlobType', + self::GUID => 'Doctrine\DBAL\Types\GuidType', + ); + + /** + * Prevents instantiation and forces use of the factory method. + */ + final private function __construct() + { + } + + /** + * Converts a value from its PHP representation to its database representation + * of this type. + * + * @param mixed $value The value to convert. + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform The currently used database platform. + * + * @return mixed The database representation of the value. + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + return $value; + } + + /** + * Converts a value from its database representation to its PHP representation + * of this type. + * + * @param mixed $value The value to convert. + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform The currently used database platform. + * + * @return mixed The PHP representation of the value. + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + return $value; + } + + /** + * Gets the default length of this type. + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return integer|null + * + * @todo Needed? + */ + public function getDefaultLength(AbstractPlatform $platform) + { + return null; + } + + /** + * Gets the SQL declaration snippet for a field of this type. + * + * @param array $fieldDeclaration The field declaration. + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform The currently used database platform. + * + * @return string + */ + abstract public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform); + + /** + * Gets the name of this type. + * + * @return string + * + * @todo Needed? + */ + abstract public function getName(); + + /** + * Factory method to create type instances. + * Type instances are implemented as flyweights. + * + * @param string $name The name of the type (as returned by getName()). + * + * @return \Doctrine\DBAL\Types\Type + * + * @throws \Doctrine\DBAL\DBALException + */ + public static function getType($name) + { + if ( ! isset(self::$_typeObjects[$name])) { + if ( ! isset(self::$_typesMap[$name])) { + throw DBALException::unknownColumnType($name); + } + self::$_typeObjects[$name] = new self::$_typesMap[$name](); + } + + return self::$_typeObjects[$name]; + } + + /** + * Adds a custom type to the type map. + * + * @param string $name The name of the type. This should correspond to what getName() returns. + * @param string $className The class name of the custom type. + * + * @return void + * + * @throws \Doctrine\DBAL\DBALException + */ + public static function addType($name, $className) + { + if (isset(self::$_typesMap[$name])) { + throw DBALException::typeExists($name); + } + + self::$_typesMap[$name] = $className; + } + + /** + * Checks if exists support for a type. + * + * @param string $name The name of the type. + * + * @return boolean TRUE if type is supported; FALSE otherwise. + */ + public static function hasType($name) + { + return isset(self::$_typesMap[$name]); + } + + /** + * Overrides an already defined type to use a different implementation. + * + * @param string $name + * @param string $className + * + * @return void + * + * @throws \Doctrine\DBAL\DBALException + */ + public static function overrideType($name, $className) + { + if ( ! isset(self::$_typesMap[$name])) { + throw DBALException::typeNotFound($name); + } + + if (isset(self::$_typeObjects[$name])) { + unset(self::$_typeObjects[$name]); + } + + self::$_typesMap[$name] = $className; + } + + /** + * Gets the (preferred) binding type for values of this type that + * can be used when binding parameters to prepared statements. + * + * This method should return one of the PDO::PARAM_* constants, that is, one of: + * + * PDO::PARAM_BOOL + * PDO::PARAM_NULL + * PDO::PARAM_INT + * PDO::PARAM_STR + * PDO::PARAM_LOB + * + * @return integer + */ + public function getBindingType() + { + return \PDO::PARAM_STR; + } + + /** + * Gets the types array map which holds all registered types and the corresponding + * type class + * + * @return array + */ + public static function getTypesMap() + { + return self::$_typesMap; + } + + /** + * @return string + */ + public function __toString() + { + $e = explode('\\', get_class($this)); + + return str_replace('Type', '', end($e)); + } + + /** + * Does working with this column require SQL conversion functions? + * + * This is a metadata function that is required for example in the ORM. + * Usage of {@link convertToDatabaseValueSQL} and + * {@link convertToPHPValueSQL} works for any type and mostly + * does nothing. This method can additionally be used for optimization purposes. + * + * @return boolean + */ + public function canRequireSQLConversion() + { + return false; + } + + /** + * Modifies the SQL expression (identifier, parameter) to convert to a database value. + * + * @param string $sqlExpr + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return string + */ + public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) + { + return $sqlExpr; + } + + /** + * Modifies the SQL expression (identifier, parameter) to convert to a PHP value. + * + * @param string $sqlExpr + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return string + */ + public function convertToPHPValueSQL($sqlExpr, $platform) + { + return $sqlExpr; + } + + /** + * Gets an array of database types that map to this Doctrine type. + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return array + */ + public function getMappedDatabaseTypes(AbstractPlatform $platform) + { + return array(); + } + + /** + * If this Doctrine Type maps to an already mapped database type, + * reverse schema engineering can't take them apart. You need to mark + * one of those types as commented, which will have Doctrine use an SQL + * comment to typehint the actual Doctrine Type. + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return boolean + */ + public function requiresSQLCommentHint(AbstractPlatform $platform) + { + return false; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/VarDateTimeType.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/VarDateTimeType.php new file mode 100644 index 0000000000000000000000000000000000000000..5cf35f79583506375aabe53a811745819ec67dc6 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/VarDateTimeType.php @@ -0,0 +1,56 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Variable DateTime Type using date_create() instead of DateTime::createFromFormat(). + * + * This type has performance implications as it runs twice as long as the regular + * {@see DateTimeType}, however in certain PostgreSQL configurations with + * TIMESTAMP(n) columns where n > 0 it is necessary to use this type. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class VarDateTimeType extends DateTimeType +{ + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if ($value === null || $value instanceof \DateTime) { + return $value; + } + + $val = date_create($value); + if ( ! $val) { + throw ConversionException::conversionFailed($value, $this->getName()); + } + + return $val; + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Version.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Version.php new file mode 100644 index 0000000000000000000000000000000000000000..f9dfb72b8e776e657ad40979011fa09583ddd30f --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Version.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\DBAL; + +/** + * Class to store and retrieve the version of Doctrine. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Version +{ + /** + * Current Doctrine Version. + */ + const VERSION = '2.5.12'; + + /** + * Compares a Doctrine version with the current one. + * + * @param string $version The Doctrine version to compare to. + * + * @return integer -1 if older, 0 if it is the same, 1 if version passed as argument is newer. + */ + public static function compare($version) + { + $currentVersion = str_replace(' ', '', strtolower(self::VERSION)); + $version = str_replace(' ', '', $version); + + return version_compare($version, $currentVersion); + } +} diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/VersionAwarePlatformDriver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/VersionAwarePlatformDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..53e2d3ab78191975f1701a070887cf64dbf63fa8 --- /dev/null +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/VersionAwarePlatformDriver.php @@ -0,0 +1,47 @@ +. + */ + +namespace Doctrine\DBAL; + +/** + * Contract for a driver that is able to create platform instances by version. + * + * Doctrine uses different platform classes for different vendor versions to + * support the correct features and SQL syntax of each version. + * This interface should be implemented by drivers that are capable to do this + * distinction. + * + * @author Steve Müller + * @link www.doctrine-project.org + * @since 2.5 + */ +interface VersionAwarePlatformDriver +{ + /** + * Factory method for creating the appropriate platform instance for the given version. + * + * @param string $version The platform/server version string to evaluate. This should be given in the notation + * the underlying database vendor uses. + * + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + * + * @throws DBALException if the given version string could not be evaluated. + */ + public function createDatabasePlatformForVersion($version); +} diff --git a/vendor/doctrine/doctrine-bundle/.travis.yml b/vendor/doctrine/doctrine-bundle/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..158257d5d9c002de83629732dc89a6ed2e9680ed --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/.travis.yml @@ -0,0 +1,41 @@ +language: php + +sudo: false + +cache: + directories: + - $HOME/.composer/cache + +php: + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - hhvm + +matrix: + include: + - php: 5.5 + env: deps=low SYMFONY_DEPRECATIONS_HELPER=weak + - php: 5.6 + env: SYMFONY_VERSION="2.8.*@dev" + - php: 5.6 + env: SYMFONY_VERSION="3.0.*@dev" + +env: + global: + - deps=no + +before_install: + - composer self-update + - if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony:${SYMFONY_VERSION}; fi; + +install: + - if [ "$deps" = "no" ]; then composer update; fi; + - if [ "$deps" = "low" ]; then composer --prefer-lowest --prefer-stable update; fi; + +script: + - ./vendor/bin/phpunit -v --coverage-clover ./build/logs/clover.xml + +after_script: + - php ./vendor/bin/coveralls -v diff --git a/vendor/doctrine/doctrine-bundle/Changelog.md b/vendor/doctrine/doctrine-bundle/Changelog.md new file mode 100644 index 0000000000000000000000000000000000000000..2dc85f27b991e7f70dd7c43a84b7a18b201f26be --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Changelog.md @@ -0,0 +1,141 @@ +## 1.5.2 (2015-08-31) + +Security: + +* Fix Security Misconfiguration Vulnerability, allowing potential local arbitrary code execution. + +## 1.5.1 (2015-08-12) + +Bugfix: + +* Fixed the JS expanding all queries in the profiler in case of multiple connections +* Fixed the retrieval of the namespace in DisconnectedMetadataFactory +* Changed the composer constraint to allow Symfony 3.0 for people wanting to do early testing + +## 1.5.0 (2015-05-28) + +Features: + +* Added the possibility to configure the quote strategy in the configuration +* Improved the rendering of the query explanation for Postgres +* Added support for tagging entity listeners, without the need to map the listener + +Bugfix: + +* Fixed the serverVersion configuration for master slave connections +* Fixed the enabling of the profiler to avoid automatically enabling the logger +* Fixed the detection of existing databases when quoted names are used +* Fixed the profiler template when having a manager without any loaded metadata + +## 1.4.0 (2015-02-28) + +Features: + +* Added the ``--if-not-exists`` option in the ``doctrine:database:create`` command +* Added the ``--if-exists`` option in the ``doctrine:database:drop`` command +* Added the support for the ``url`` DBAL setting +* Added profiling ability for SQL Server + +Bugfix: + +* Fixed the cache configuration when using ``cache_provider`` +* Removed usage of deprecated DI features when using Symfony 2.6+ +* Close connections and clear managers on shutdown. This avoids leaking connections in tests. +* Added an exception when the ORM layer is configured but not DBAL + +## 1.3.0 (2014-11-28) + +Features: + +* add support for bundle namespace alias in the mapping compiler pass +* Added support for server_version connection parameter +* Added a way to enable auto_mapping option using multiple entity managers + +Bugfix: + +* Inlined the profiler picto images instead of getting from FrameworkBundle (where they are gone) +* Remove duplicates in the list of mapped entities in the profile +* Fixed the compatibility with PHP 5.3 (broken in 1.3.0-beta1) + +## 1.3.0-beta2 (2014-07-09) + +Feature: + +* add auto-commit DBAL configuration option +* Use DoctrineCacheBundle to create cache drivers, supporting more configuration +* Added sorting by time in DB panel + +Bugfix: + +* Fixed the compatibility of the DataCollector with Doctrine 2.4 (bug introduced in 1.3.0-beta1) +* Fixed the exit code of commands on failure +* Fixed the replacement of query parameters in the profiler + +## 1.3.0-beta1 (2014-01-26) + +Features: + +* Added option to configure entity listener resolver service +* add compiler pass for bundles to register mappings +* Added a button to expand/collapse all queries in the profiler +* Added configuration for sharding +* Added support for the new ways to generate proxies in Doctrine Common +* Added configuration for the second-level cache + +Bugfix: + +* Removed deprecated call +* fix drop and create command for connections with master slave configuration +* Remove usage of deprecated Twig features + +## 1.2.0 (2013-03-25) + + * Bumped the requirement to Symfony 2.2 + * Updated the profiler templates for Symfony 2.2 + +## 1.1.0 (2013-01-12) + + * Added syntax highlighting for queries in teh profiler + * Added the validation of the mapping in the profiler panel + * Added return codes for doctrine:database:[create|drop] commands + +## 1.0.0 (2012-09-07) + + * Removed the mysql charset hack for 5.3.6+ as PDO has been fixed + * Implement "keep_slave"/"keepSlave" configuration + * Added missing Redis cache class mapping. + * Fixed the XSD schema for the configuration. + * Added support for schema assets filter configuration + * integrate naming_strategy into config + +## 1.0.0-RC1 (2012-07-04) + + * Add support for targetEntity resolving through the ORM 2.2 listener. + * Fixed quote database name in doctrine:database:create and doctrine:database:drop commands + * added a way to use cache services + * Added a way to configure the default entity repository class + * Added the support for SQL filters + * Removed the InfoCommand and proxy the ORM command instead + * Made the ORM fully optional by avoiding breaking the console + * Added support for master_slave connections + * Fixed xml config for proxy parameters + * Fixes doctrine:generate:entities when called with the --path argument + * Added missing Memcached cache driver + * Fix memory leak in Doctrine Autoload Proxy Magic + * adds lazy-loading event manager, improved listener registration + * Added a configuration setting for commented types + * Fixed bug with MetadataFactory having problem when the StaticReflection is used. + * Added the possibility to explain queries in the profiler + * Splitted the configuration for the logging and the profiling of the connection + +## 1.0.0-beta1 (2011-12-15) + + * [BC break] Changed the namespace from Symfony\Bundle to Doctrine\Bundle + * Enhance error reporting during mapping validation when nested exceptions occur. + * Add DoctrineValidationPass to load validation files conditionally + * Moved the entity provider service to DoctrineBundle + * Added Stopwatch support in debug mode to integrate in the profiler timeline + * Removed the IndexedReader + * Added the implementation of the ManagerRegistry to replace the symfony 2.0 registry + * Added access to Doctrine's ValidateSchema command from the console. See symfony/symfony#2200. + * Extracted the bundle from Symfony 2.0 diff --git a/vendor/doctrine/doctrine-bundle/Command/CreateDatabaseDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/CreateDatabaseDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..40be5efabd6f77a9a20dc21b28b76365a537b6ec --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/CreateDatabaseDoctrineCommand.php @@ -0,0 +1,124 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\DBAL\DriverManager; + +/** + * Database tool allows you to easily drop and create your configured databases. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class CreateDatabaseDoctrineCommand extends DoctrineCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + $this + ->setName('doctrine:database:create') + ->setDescription('Creates the configured database') + ->addOption('shard', null, InputOption::VALUE_REQUIRED, 'The shard connection to use for this command') + ->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command') + ->addOption('if-not-exists', null, InputOption::VALUE_NONE, 'Don\'t trigger an error, when the database already exists') + ->setHelp(<<%command.name% command creates the default connections database: + + php %command.full_name% + +You can also optionally specify the name of a connection to create the database for: + + php %command.full_name% --connection=default +EOT + ); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $connectionName = $input->getOption('connection'); + if (empty($connectionName) === true) { + $connectionName = $this->getContainer()->get('doctrine')->getDefaultConnectionName(); + } + $connection = $this->getDoctrineConnection($connectionName); + + $ifNotExists = $input->getOption('if-not-exists'); + + $params = $connection->getParams(); + if (isset($params['master'])) { + $params = $params['master']; + } + + // Cannot inject `shard` option in parent::getDoctrineConnection + // cause it will try to connect to a non-existing database + if (isset($params['shards'])) { + $shards = $params['shards']; + // Default select global + $params = array_merge($params, $params['global']); + unset($params['global']['dbname']); + if ($input->getOption('shard')) { + foreach ($shards as $i => $shard) { + if ($shard['id'] === (int)$input->getOption('shard')) { + // Select sharded database + $params = array_merge($params, $shard); + unset($params['shards'][$i]['dbname'], $params['id']); + break; + } + } + } + } + + $hasPath = isset($params['path']); + $name = $hasPath ? $params['path'] : (isset($params['dbname']) ? $params['dbname'] : false); + if (!$name) { + throw new \InvalidArgumentException("Connection does not contain a 'path' or 'dbname' parameter and cannot be dropped."); + } + // Need to get rid of _every_ occurrence of dbname from connection configuration and we have already extracted all relevant info from url + unset($params['dbname'], $params['path'], $params['url']); + + $tmpConnection = DriverManager::getConnection($params); + $shouldNotCreateDatabase = $ifNotExists && in_array($name, $tmpConnection->getSchemaManager()->listDatabases()); + + // Only quote if we don't have a path + if (!$hasPath) { + $name = $tmpConnection->getDatabasePlatform()->quoteSingleIdentifier($name); + } + + $error = false; + try { + if ($shouldNotCreateDatabase) { + $output->writeln(sprintf('Database %s for connection named %s already exists. Skipped.', $name, $connectionName)); + } else { + $tmpConnection->getSchemaManager()->createDatabase($name); + $output->writeln(sprintf('Created database %s for connection named %s', $name, $connectionName)); + } + } catch (\Exception $e) { + $output->writeln(sprintf('Could not create database %s for connection named %s', $name, $connectionName)); + $output->writeln(sprintf('%s', $e->getMessage())); + $error = true; + } + + $tmpConnection->close(); + + return $error ? 1 : 0; + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/DoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/DoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..9197db2be16b25496ebf2f805bedc7c10497ae9e --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/DoctrineCommand.php @@ -0,0 +1,82 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Sharding\PoolingShardConnection; +use Doctrine\ORM\EntityManager; +use Doctrine\ORM\Tools\EntityGenerator; +use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; + +/** + * Base class for Doctrine console commands to extend from. + * + * @author Fabien Potencier + */ +abstract class DoctrineCommand extends ContainerAwareCommand +{ + /** + * get a doctrine entity generator + * + * @return EntityGenerator + */ + protected function getEntityGenerator() + { + $entityGenerator = new EntityGenerator(); + $entityGenerator->setGenerateAnnotations(false); + $entityGenerator->setGenerateStubMethods(true); + $entityGenerator->setRegenerateEntityIfExists(false); + $entityGenerator->setUpdateEntityIfExists(true); + $entityGenerator->setNumSpaces(4); + $entityGenerator->setAnnotationPrefix('ORM\\'); + + return $entityGenerator; + } + + /** + * Get a doctrine entity manager by symfony name. + * + * @param string $name + * @param null|integer $shardId + * + * @return EntityManager + */ + protected function getEntityManager($name, $shardId = null) + { + $manager = $this->getContainer()->get('doctrine')->getManager($name); + + if ($shardId) { + if (!$manager->getConnection() instanceof PoolingShardConnection) { + throw new \LogicException(sprintf("Connection of EntityManager '%s' must implement shards configuration.", $name)); + } + + $manager->getConnection()->connect($shardId); + } + + return $manager; + } + + /** + * Get a doctrine dbal connection by symfony name. + * + * @param string $name + * + * @return Connection + */ + protected function getDoctrineConnection($name) + { + return $this->getContainer()->get('doctrine')->getConnection($name); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/DropDatabaseDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/DropDatabaseDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..eb76182f025631fc275d9c480541de642ddf1e54 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/DropDatabaseDoctrineCommand.php @@ -0,0 +1,132 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command; + +use Doctrine\DBAL\DriverManager; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Database tool allows you to easily drop and create your configured databases. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class DropDatabaseDoctrineCommand extends DoctrineCommand +{ + const RETURN_CODE_NOT_DROP = 1; + + const RETURN_CODE_NO_FORCE = 2; + + /** + * {@inheritDoc} + */ + protected function configure() + { + $this + ->setName('doctrine:database:drop') + ->setDescription('Drops the configured database') + ->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command') + ->addOption('shard', null, InputOption::VALUE_REQUIRED, 'The shard connection to use for this command') + ->addOption('if-exists', null, InputOption::VALUE_NONE, 'Don\'t trigger an error, when the database doesn\'t exist') + ->addOption('force', null, InputOption::VALUE_NONE, 'Set this parameter to execute this action') + ->setHelp(<<%command.name% command drops the default connections database: + + php %command.full_name% + +The --force parameter has to be used to actually drop the database. + +You can also optionally specify the name of a connection to drop the database for: + + php %command.full_name% --connection=default + +Be careful: All data in a given database will be lost when executing this command. +EOT + ); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $connection = $this->getDoctrineConnection($input->getOption('connection')); + $ifExists = $input->getOption('if-exists'); + + $params = $connection->getParams(); + if (isset($params['master'])) { + $params = $params['master']; + } + + if (isset($params['shards'])) { + $shards = $params['shards']; + // Default select global + $params = array_merge($params, $params['global']); + if ($input->getOption('shard')) { + foreach ($shards as $shard) { + if ($shard['id'] === (int)$input->getOption('shard')) { + // Select sharded database + $params = $shard; + unset($params['id']); + break; + } + } + } + } + + $name = isset($params['path']) ? $params['path'] : (isset($params['dbname']) ? $params['dbname'] : false); + if (!$name) { + throw new \InvalidArgumentException("Connection does not contain a 'path' or 'dbname' parameter and cannot be dropped."); + } + unset($params['dbname']); + + if ($input->getOption('force')) { + // Reopen connection without database name set + // as some vendors do not allow dropping the database connected to. + $connection->close(); + $connection = DriverManager::getConnection($params); + $shouldDropDatabase = !$ifExists || in_array($name, $connection->getSchemaManager()->listDatabases()); + + // Only quote if we don't have a path + if (!isset($params['path'])) { + $name = $connection->getDatabasePlatform()->quoteSingleIdentifier($name); + } + + try { + if ($shouldDropDatabase) { + $connection->getSchemaManager()->dropDatabase($name); + $output->writeln(sprintf('Dropped database for connection named %s', $name)); + } else { + $output->writeln(sprintf('Database for connection named %s doesn\'t exist. Skipped.', $name)); + } + } catch (\Exception $e) { + $output->writeln(sprintf('Could not drop database for connection named %s', $name)); + $output->writeln(sprintf('%s', $e->getMessage())); + + return self::RETURN_CODE_NOT_DROP; + } + } else { + $output->writeln('ATTENTION: This operation should not be executed in a production environment.'); + $output->writeln(''); + $output->writeln(sprintf('Would drop the database named %s.', $name)); + $output->writeln('Please run the operation with --force to execute'); + $output->writeln('All data will be lost!'); + + return self::RETURN_CODE_NO_FORCE; + } + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/GenerateEntitiesDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/GenerateEntitiesDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..8e53728a65005226e519346a5561ed2c9863a292 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/GenerateEntitiesDoctrineCommand.php @@ -0,0 +1,140 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\EntityRepositoryGenerator; +use Doctrine\Bundle\DoctrineBundle\Mapping\DisconnectedMetadataFactory; + +/** + * Generate entity classes from mapping information + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class GenerateEntitiesDoctrineCommand extends DoctrineCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + $this + ->setName('doctrine:generate:entities') + ->setAliases(array('generate:doctrine:entities')) + ->setDescription('Generates entity classes and method stubs from your mapping information') + ->addArgument('name', InputArgument::REQUIRED, 'A bundle name, a namespace, or a class name') + ->addOption('path', null, InputOption::VALUE_REQUIRED, 'The path where to generate entities when it cannot be guessed') + ->addOption('no-backup', null, InputOption::VALUE_NONE, 'Do not backup existing entities files.') + ->setHelp(<<%command.name% command generates entity classes +and method stubs from your mapping information: + +You have to limit generation of entities: + +* To a bundle: + + php %command.full_name% MyCustomBundle + +* To a single entity: + + php %command.full_name% MyCustomBundle:User + php %command.full_name% MyCustomBundle/Entity/User + +* To a namespace + + php %command.full_name% MyCustomBundle/Entity + +If the entities are not stored in a bundle, and if the classes do not exist, +the command has no way to guess where they should be generated. In this case, +you must provide the --path option: + + php %command.full_name% Blog/Entity --path=src/ + +By default, the unmodified version of each entity is backed up and saved +(e.g. Product.php~). To prevent this task from creating the backup file, +pass the --no-backup option: + + php %command.full_name% Blog/Entity --no-backup + +Important: Even if you specified Inheritance options in your +XML or YAML Mapping files the generator cannot generate the base and +child classes for you correctly, because it doesn't know which +class is supposed to extend which. You have to adjust the entity +code manually for inheritance to work! + +EOT + ); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $manager = new DisconnectedMetadataFactory($this->getContainer()->get('doctrine')); + + try { + $bundle = $this->getApplication()->getKernel()->getBundle($input->getArgument('name')); + + $output->writeln(sprintf('Generating entities for bundle "%s"', $bundle->getName())); + $metadata = $manager->getBundleMetadata($bundle); + } catch (\InvalidArgumentException $e) { + $name = strtr($input->getArgument('name'), '/', '\\'); + + if (false !== $pos = strpos($name, ':')) { + $name = $this->getContainer()->get('doctrine')->getAliasNamespace(substr($name, 0, $pos)).'\\'.substr($name, $pos + 1); + } + + if (class_exists($name)) { + $output->writeln(sprintf('Generating entity "%s"', $name)); + $metadata = $manager->getClassMetadata($name, $input->getOption('path')); + } else { + $output->writeln(sprintf('Generating entities for namespace "%s"', $name)); + $metadata = $manager->getNamespaceMetadata($name, $input->getOption('path')); + } + } + + $generator = $this->getEntityGenerator(); + + $backupExisting = !$input->getOption('no-backup'); + $generator->setBackupExisting($backupExisting); + + $repoGenerator = new EntityRepositoryGenerator(); + foreach ($metadata->getMetadata() as $m) { + if ($backupExisting) { + $basename = substr($m->name, strrpos($m->name, '\\') + 1); + $output->writeln(sprintf(' > backing up %s.php to %s.php~', $basename, $basename)); + } + // Getting the metadata for the entity class once more to get the correct path if the namespace has multiple occurrences + try { + $entityMetadata = $manager->getClassMetadata($m->getName(), $input->getOption('path')); + } catch (\RuntimeException $e) { + // fall back to the bundle metadata when no entity class could be found + $entityMetadata = $metadata; + } + + $output->writeln(sprintf(' > generating %s', $m->name)); + $generator->generate(array($m), $entityMetadata->getPath()); + + if ($m->customRepositoryClassName && false !== strpos($m->customRepositoryClassName, $metadata->getNamespace())) { + $repoGenerator->writeEntityRepositoryClass($m->customRepositoryClassName, $metadata->getPath()); + } + } + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/ImportMappingDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/ImportMappingDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..8e09dd66bfb8020b7490a837738b1ac94c48d0a8 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/ImportMappingDoctrineCommand.php @@ -0,0 +1,138 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Mapping\Driver\DatabaseDriver; +use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory; +use Doctrine\ORM\Tools\Export\ClassMetadataExporter; +use Doctrine\ORM\Tools\Console\MetadataFilter; + +/** + * Import Doctrine ORM metadata mapping information from an existing database. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class ImportMappingDoctrineCommand extends DoctrineCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + $this + ->setName('doctrine:mapping:import') + ->addArgument('bundle', InputArgument::REQUIRED, 'The bundle to import the mapping information to') + ->addArgument('mapping-type', InputArgument::OPTIONAL, 'The mapping type to export the imported mapping information to') + ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command') + ->addOption('shard', null, InputOption::VALUE_REQUIRED, 'The shard connection to use for this command') + ->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be mapped.') + ->addOption('force', null, InputOption::VALUE_NONE, 'Force to overwrite existing mapping files.') + ->setDescription('Imports mapping information from an existing database') + ->setHelp(<<%command.name% command imports mapping information +from an existing database: + +php %command.full_name% "MyCustomBundle" xml + +You can also optionally specify which entity manager to import from with the +--em option: + +php %command.full_name% "MyCustomBundle" xml --em=default + +If you don't want to map every entity that can be found in the database, use the +--filter option. It will try to match the targeted mapped entity with the +provided pattern string. + +php %command.full_name% "MyCustomBundle" xml --filter=MyMatchedEntity + +Use the --force option, if you want to override existing mapping files: + +php %command.full_name% "MyCustomBundle" xml --force +EOT + ); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $bundle = $this->getApplication()->getKernel()->getBundle($input->getArgument('bundle')); + + $destPath = $bundle->getPath(); + $type = $input->getArgument('mapping-type') ? $input->getArgument('mapping-type') : 'xml'; + if ('annotation' === $type) { + $destPath .= '/Entity'; + } else { + $destPath .= '/Resources/config/doctrine'; + } + if ('yaml' === $type) { + $type = 'yml'; + } + + $cme = new ClassMetadataExporter(); + $exporter = $cme->getExporter($type); + $exporter->setOverwriteExistingFiles($input->getOption('force')); + + if ('annotation' === $type) { + $entityGenerator = $this->getEntityGenerator(); + $exporter->setEntityGenerator($entityGenerator); + } + + $em = $this->getEntityManager($input->getOption('em'), $input->getOption('shard')); + + $databaseDriver = new DatabaseDriver($em->getConnection()->getSchemaManager()); + $em->getConfiguration()->setMetadataDriverImpl($databaseDriver); + + $emName = $input->getOption('em'); + $emName = $emName ? $emName : 'default'; + + $cmf = new DisconnectedClassMetadataFactory(); + $cmf->setEntityManager($em); + $metadata = $cmf->getAllMetadata(); + $metadata = MetadataFilter::filter($metadata, $input->getOption('filter')); + if ($metadata) { + $output->writeln(sprintf('Importing mapping information from "%s" entity manager', $emName)); + foreach ($metadata as $class) { + $className = $class->name; + $class->name = $bundle->getNamespace().'\\Entity\\'.$className; + if ('annotation' === $type) { + $path = $destPath.'/'.str_replace('\\', '.', $className).'.php'; + } else { + $path = $destPath.'/'.str_replace('\\', '.', $className).'.orm.'.$type; + } + $output->writeln(sprintf(' > writing %s', $path)); + $code = $exporter->exportClassMetadata($class); + if (!is_dir($dir = dirname($path))) { + mkdir($dir, 0775, true); + } + file_put_contents($path, $code); + chmod($path, 0664); + } + + return 0; + } else { + $output->writeln('Database does not have any mapping information.', 'ERROR'); + $output->writeln('', 'ERROR'); + + return 1; + } + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/ClearMetadataCacheDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/ClearMetadataCacheDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..dc8797c166c288f03ea667fe704015fbb8d65c5d --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/ClearMetadataCacheDoctrineCommand.php @@ -0,0 +1,52 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand; + +/** + * Command to clear the metadata cache of the various cache drivers. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class ClearMetadataCacheDoctrineCommand extends MetadataCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setName('doctrine:cache:clear-metadata') + ->setDescription('Clears all metadata cache for an entity manager') + ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command'); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em')); + + return parent::execute($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/ClearQueryCacheDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/ClearQueryCacheDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..119d3cde16d1db31e83a61e5cfec8bede1b79ee0 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/ClearQueryCacheDoctrineCommand.php @@ -0,0 +1,52 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand; + +/** + * Command to clear the query cache of the various cache drivers. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class ClearQueryCacheDoctrineCommand extends QueryCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setName('doctrine:cache:clear-query') + ->setDescription('Clears all query cache for an entity manager') + ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command'); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em')); + + return parent::execute($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/ClearResultCacheDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/ClearResultCacheDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..95107cf2c0f6fb6767af036371be9bac94edf0f2 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/ClearResultCacheDoctrineCommand.php @@ -0,0 +1,52 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand; + +/** + * Command to clear the result cache of the various cache drivers. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class ClearResultCacheDoctrineCommand extends ResultCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setName('doctrine:cache:clear-result') + ->setDescription('Clears result cache for an entity manager') + ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command'); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em')); + + return parent::execute($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/CollectionRegionDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/CollectionRegionDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..e9432b57fb85457064e82c06d4007376cc5a937c --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/CollectionRegionDoctrineCommand.php @@ -0,0 +1,51 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Doctrine\ORM\Tools\Console\Command\ClearCache\CollectionRegionCommand; + +/** + * Command to clear a collection cache region. + * + * @author Fabio B. Silva + */ +class CollectionRegionDoctrineCommand extends DelegateCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this->setName('doctrine:cache:clear-collection-region'); + } + + /** + * {@inheritDoc} + */ + protected function createCommand() + { + return new CollectionRegionCommand(); + } + + /** + * {@inheritDoc} + */ + protected function getMinimalVersion() + { + return '2.5.0-DEV'; + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/ConvertMappingDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/ConvertMappingDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..6e09f3b16fc22013252a6f2f6850673de94e37d0 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/ConvertMappingDoctrineCommand.php @@ -0,0 +1,72 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand; +use Doctrine\ORM\Tools\Export\Driver\XmlExporter; +use Doctrine\ORM\Tools\Export\Driver\YamlExporter; + +/** + * Convert Doctrine ORM metadata mapping information between the various supported + * formats. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class ConvertMappingDoctrineCommand extends ConvertMappingCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + $this + ->setName('doctrine:mapping:convert') + ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command'); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em')); + + return parent::execute($input, $output); + } + + /** + * @param string $toType + * @param string $destPath + * + * @return \Doctrine\ORM\Tools\Export\Driver\AbstractExporter + */ + protected function getExporter($toType, $destPath) + { + /** @var $exporter \Doctrine\ORM\Tools\Export\Driver\AbstractExporter */ + $exporter = parent::getExporter($toType, $destPath); + if ($exporter instanceof XmlExporter) { + $exporter->setExtension('.orm.xml'); + } elseif ($exporter instanceof YamlExporter) { + $exporter->setExtension('.orm.yml'); + } + + return $exporter; + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/CreateSchemaDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/CreateSchemaDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..61dd67d61fde3437dcd25b8d8a540dd1a00ef513 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/CreateSchemaDoctrineCommand.php @@ -0,0 +1,53 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand; + +/** + * Command to execute the SQL needed to generate the database schema for + * a given entity manager. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class CreateSchemaDoctrineCommand extends CreateCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setName('doctrine:schema:create') + ->setDescription('Executes (or dumps) the SQL needed to generate the database schema') + ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command'); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em')); + + parent::execute($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/DelegateCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/DelegateCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..bd71147c19b3860b679edd09192db84f73b93d42 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/DelegateCommand.php @@ -0,0 +1,119 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Command Delegate. + * + * @author Fabio B. Silva + */ +abstract class DelegateCommand extends Command +{ + /** + * @var \Symfony\Component\Console\Command\Command + */ + protected $command; + + /** + * @return \Symfony\Component\Console\Command\Command + */ + abstract protected function createCommand(); + + /** + * @return string + */ + protected function getMinimalVersion() + { + return '2.3.0-DEV'; + } + + /** + * @return boolean + */ + private function isVersionCompatible() + { + return (version_compare(\Doctrine\ORM\Version::VERSION, $this->getMinimalVersion()) >= 0); + } + + /** + * {@inheritDoc} + */ + public function isEnabled() + { + return $this->isVersionCompatible(); + } + + /** + * @param string $entityManagerName + * + * @return Command + */ + protected function wrapCommand($entityManagerName) + { + if (!$this->isVersionCompatible()) { + throw new \RuntimeException(sprintf('"%s" requires doctrine-orm "%s" or newer', $this->getName(), $this->getMinimalVersion())); + } + + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $entityManagerName); + $this->command->setApplication($this->getApplication()); + + return $this->command; + } + + /** + * {@inheritDoc} + */ + protected function configure() + { + if ($this->isVersionCompatible()) { + $this->command = $this->createCommand(); + + $this->setHelp($this->command->getHelp()); + $this->setDefinition($this->command->getDefinition()); + $this->setDescription($this->command->getDescription()); + } + + $this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command'); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + return $this->wrapCommand($input->getOption('em'))->execute($input, $output); + } + + /** + * {@inheritDoc} + */ + protected function interact(InputInterface $input, OutputInterface $output) + { + $this->wrapCommand($input->getOption('em'))->interact($input, $output); + } + + /** + * {@inheritDoc} + */ + protected function initialize(InputInterface $input, OutputInterface $output) + { + $this->wrapCommand($input->getOption('em'))->initialize($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/DoctrineCommandHelper.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/DoctrineCommandHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..f65b63ffec432d2b624e8a79468857d0b6cb3d3f --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/DoctrineCommandHelper.php @@ -0,0 +1,55 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Bundle\FrameworkBundle\Console\Application; +use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper; +use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper; + +/** + * Provides some helper and convenience methods to configure doctrine commands in the context of bundles + * and multiple connections/entity managers. + * + * @author Fabien Potencier + */ +abstract class DoctrineCommandHelper +{ + /** + * Convenience method to push the helper sets of a given entity manager into the application. + * + * @param Application $application + * @param string $emName + */ + public static function setApplicationEntityManager(Application $application, $emName) + { + /** @var $em \Doctrine\ORM\EntityManager */ + $em = $application->getKernel()->getContainer()->get('doctrine')->getManager($emName); + $helperSet = $application->getHelperSet(); + $helperSet->set(new ConnectionHelper($em->getConnection()), 'db'); + $helperSet->set(new EntityManagerHelper($em), 'em'); + } + + /** + * Convenience method to push the helper sets of a given connection into the application. + * + * @param Application $application + * @param string $connName + */ + public static function setApplicationConnection(Application $application, $connName) + { + $connection = $application->getKernel()->getContainer()->get('doctrine')->getConnection($connName); + $helperSet = $application->getHelperSet(); + $helperSet->set(new ConnectionHelper($connection), 'db'); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/DropSchemaDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/DropSchemaDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..b69d9f71bb04a4f243b58f72b2b7061823dd778f --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/DropSchemaDoctrineCommand.php @@ -0,0 +1,52 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand; + +/** + * Command to drop the database schema for a set of classes based on their mappings. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class DropSchemaDoctrineCommand extends DropCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setName('doctrine:schema:drop') + ->setDescription('Executes (or dumps) the SQL needed to drop the current database schema') + ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command'); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em')); + + parent::execute($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/EnsureProductionSettingsDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/EnsureProductionSettingsDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..56011647fa163b663039dd701a08c1cf6a9a0671 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/EnsureProductionSettingsDoctrineCommand.php @@ -0,0 +1,51 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand; + +/** + * Ensure the Doctrine ORM is configured properly for a production environment. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class EnsureProductionSettingsDoctrineCommand extends EnsureProductionSettingsCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setName('doctrine:ensure-production-settings') + ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command'); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em')); + + parent::execute($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/EntityRegionCacheDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/EntityRegionCacheDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..7674df5770f2b8c9b241d0b6b00593b4a77174d3 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/EntityRegionCacheDoctrineCommand.php @@ -0,0 +1,51 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Doctrine\ORM\Tools\Console\Command\ClearCache\EntityRegionCommand; + +/** + * Command to clear a entity cache region. + * + * @author Fabio B. Silva + */ +class EntityRegionCacheDoctrineCommand extends DelegateCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this->setName('doctrine:cache:clear-entity-region'); + } + + /** + * {@inheritDoc} + */ + protected function createCommand() + { + return new EntityRegionCommand(); + } + + /** + * {@inheritDoc} + */ + protected function getMinimalVersion() + { + return '2.5.0-DEV'; + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/ImportDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/ImportDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..343060bb433c0731259b4336f733f9e281fb3abe --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/ImportDoctrineCommand.php @@ -0,0 +1,46 @@ + + * @author Sebastian Landwehr + */ +class ImportDoctrineCommand extends ImportCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setName('doctrine:database:import') + ->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command'); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationConnection($this->getApplication(), $input->getOption('connection')); + + return parent::execute($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/InfoDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/InfoDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..2228a3551888ef06d14994409fa4d1d2c5fc4a9a --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/InfoDoctrineCommand.php @@ -0,0 +1,48 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Doctrine\ORM\Tools\Console\Command\InfoCommand; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Show information about mapped entities + * + * @author Benjamin Eberlei + */ +class InfoDoctrineCommand extends InfoCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + $this + ->setName('doctrine:mapping:info') + ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command'); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em')); + + return parent::execute($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/QueryRegionCacheDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/QueryRegionCacheDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..bfec367897b0653001be95b08aeb8bd21dfc2db0 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/QueryRegionCacheDoctrineCommand.php @@ -0,0 +1,51 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Doctrine\ORM\Tools\Console\Command\ClearCache\QueryRegionCommand; + +/** + * Command to clear a query cache region. + * + * @author Fabio B. Silva + */ +class QueryRegionCacheDoctrineCommand extends DelegateCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this->setName('doctrine:cache:clear-query-region'); + } + + /** + * {@inheritDoc} + */ + protected function createCommand() + { + return new QueryRegionCommand(); + } + + /** + * {@inheritDoc} + */ + protected function getMinimalVersion() + { + return '2.5.0-DEV'; + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/RunDqlDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/RunDqlDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..ad65a26a89f43fc5712fb310126bbae9449c74f7 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/RunDqlDoctrineCommand.php @@ -0,0 +1,68 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\Console\Command\RunDqlCommand; + +/** + * Execute a Doctrine DQL query and output the results. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class RunDqlDoctrineCommand extends RunDqlCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setName('doctrine:query:dql') + ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command') + ->setHelp(<<%command.name% command executes the given DQL query and +outputs the results: + +php %command.full_name% "SELECT u FROM UserBundle:User u" + +You can also optional specify some additional options like what type of +hydration to use when executing the query: + +php %command.full_name% "SELECT u FROM UserBundle:User u" --hydrate=array + +Additionally you can specify the first result and maximum amount of results to +show: + +php %command.full_name% "SELECT u FROM UserBundle:User u" --first-result=0 --max-result=30 +EOT + ); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em')); + + return parent::execute($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/RunSqlDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/RunSqlDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..9dcfe0ee4c377c8dd9ef035da7504f0b197e6bb7 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/RunSqlDoctrineCommand.php @@ -0,0 +1,58 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\DBAL\Tools\Console\Command\RunSqlCommand; + +/** + * Execute a SQL query and output the results. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class RunSqlDoctrineCommand extends RunSqlCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setName('doctrine:query:sql') + ->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command') + ->setHelp(<<%command.name% command executes the given SQL query and +outputs the results: + +php %command.full_name% "SELECT * FROM users" +EOT + ); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationConnection($this->getApplication(), $input->getOption('connection')); + + return parent::execute($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/UpdateSchemaDoctrineCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/UpdateSchemaDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..918fc2cbcb8b3ebac9ff87c86f8e6eff0f455cba --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/UpdateSchemaDoctrineCommand.php @@ -0,0 +1,52 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand; + +/** + * Command to generate the SQL needed to update the database schema to match + * the current mapping information. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class UpdateSchemaDoctrineCommand extends UpdateCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setName('doctrine:schema:update') + ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command'); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em')); + + return parent::execute($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Command/Proxy/ValidateSchemaCommand.php b/vendor/doctrine/doctrine-bundle/Command/Proxy/ValidateSchemaCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..d981b4264ae6351436289abe2261764d6fdd08e2 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Command/Proxy/ValidateSchemaCommand.php @@ -0,0 +1,52 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand as DoctrineValidateSchemaCommand; + +/** + * Command to run Doctrine ValidateSchema() on the current mappings. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + * @author Neil Katin + */ +class ValidateSchemaCommand extends DoctrineValidateSchemaCommand +{ + /** + * {@inheritDoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setName('doctrine:schema:validate') + ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command'); + } + + /** + * {@inheritDoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em')); + + return parent::execute($input, $output); + } +} diff --git a/vendor/doctrine/doctrine-bundle/ConnectionFactory.php b/vendor/doctrine/doctrine-bundle/ConnectionFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..537700251b123d46c5ee67f8504e32c5ddfcdd38 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/ConnectionFactory.php @@ -0,0 +1,89 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle; + +use Doctrine\Common\EventManager; +use Doctrine\DBAL\Configuration; +use Doctrine\DBAL\DriverManager; +use Doctrine\DBAL\Types\Type; + +/** + * Connection + */ +class ConnectionFactory +{ + private $typesConfig = array(); + private $commentedTypes = array(); + private $initialized = false; + + /** + * Construct. + * + * @param array $typesConfig + */ + public function __construct(array $typesConfig) + { + $this->typesConfig = $typesConfig; + } + + /** + * Create a connection by name. + * + * @param array $params + * @param Configuration $config + * @param EventManager $eventManager + * @param array $mappingTypes + * + * @return \Doctrine\DBAL\Connection + */ + public function createConnection(array $params, Configuration $config = null, EventManager $eventManager = null, array $mappingTypes = array()) + { + if (!$this->initialized) { + $this->initializeTypes(); + $this->initialized = true; + } + + $connection = DriverManager::getConnection($params, $config, $eventManager); + + if (!empty($mappingTypes)) { + $platform = $connection->getDatabasePlatform(); + foreach ($mappingTypes as $dbType => $doctrineType) { + $platform->registerDoctrineTypeMapping($dbType, $doctrineType); + } + foreach ($this->commentedTypes as $type) { + $platform->markDoctrineTypeCommented(Type::getType($type)); + } + } + + return $connection; + } + + /** + * initialize the types + */ + private function initializeTypes() + { + foreach ($this->typesConfig as $type => $typeConfig) { + if (Type::hasType($type)) { + Type::overrideType($type, $typeConfig['class']); + } else { + Type::addType($type, $typeConfig['class']); + } + if ($typeConfig['commented']) { + $this->commentedTypes[] = $type; + } + } + } +} diff --git a/vendor/doctrine/doctrine-bundle/Controller/ProfilerController.php b/vendor/doctrine/doctrine-bundle/Controller/ProfilerController.php new file mode 100644 index 0000000000000000000000000000000000000000..ae72420cba7c2898828d1d2c5df0b3e998148da0 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Controller/ProfilerController.php @@ -0,0 +1,105 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Controller; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\Response; + +/** + * ProfilerController. + * + * @author Christophe Coevoet + */ +class ProfilerController implements ContainerAwareInterface +{ + /** + * @var ContainerInterface + */ + private $container; + + /** + * {@inheritDoc} + */ + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } + + /** + * Renders the profiler panel for the given token. + * + * @param string $token The profiler token + * @param string $connectionName + * @param integer $query + * + * @return Response A Response instance + */ + public function explainAction($token, $connectionName, $query) + { + /** @var $profiler \Symfony\Component\HttpKernel\Profiler\Profiler */ + $profiler = $this->container->get('profiler'); + $profiler->disable(); + + $profile = $profiler->loadProfile($token); + $queries = $profile->getCollector('db')->getQueries(); + + if (!isset($queries[$connectionName][$query])) { + return new Response('This query does not exist.'); + } + + $query = $queries[$connectionName][$query]; + if (!$query['explainable']) { + return new Response('This query cannot be explained.'); + } + + /** @var $connection \Doctrine\DBAL\Connection */ + $connection = $this->container->get('doctrine')->getConnection($connectionName); + try { + if ($connection->getDatabasePlatform() instanceof SQLServerPlatform) { + $results = $this->explainSQLServerPlatform($connection, $query); + } else { + $results = $this->explainOtherPlatform($connection, $query); + } + } catch (\Exception $e) { + return new Response('This query cannot be explained.'); + } + + return $this->container->get('templating')->renderResponse('@Doctrine/Collector/explain.html.twig', array( + 'data' => $results, + 'query' => $query, + )); + } + + private function explainSQLServerPlatform(Connection $connection, $query) + { + if (stripos($query['sql'], 'SELECT') === 0) { + $sql = 'SET STATISTICS PROFILE ON; ' . $query['sql'] . '; SET STATISTICS PROFILE OFF;'; + } else { + $sql = 'SET SHOWPLAN_TEXT ON; GO; SET NOEXEC ON; ' . $query['sql'] .'; SET NOEXEC OFF; GO; SET SHOWPLAN_TEXT OFF;'; + } + $stmt = $connection->executeQuery($sql, $query['params'], $query['types']); + $stmt->nextRowset(); + return $stmt->fetchAll(\PDO::FETCH_ASSOC); + } + + private function explainOtherPlatform(Connection $connection, $query) + { + return $connection->executeQuery('EXPLAIN '.$query['sql'], $query['params'], $query['types']) + ->fetchAll(\PDO::FETCH_ASSOC); + } +} diff --git a/vendor/doctrine/doctrine-bundle/DataCollector/DoctrineDataCollector.php b/vendor/doctrine/doctrine-bundle/DataCollector/DoctrineDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..694f1efbafa91e3c7db2007c7af28aac00e52451 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/DataCollector/DoctrineDataCollector.php @@ -0,0 +1,243 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\DataCollector; + +use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\ORM\Tools\SchemaValidator; +use Doctrine\ORM\Version; +use Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector as BaseCollector; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * DoctrineDataCollector. + * + * @author Christophe Coevoet + */ +class DoctrineDataCollector extends BaseCollector +{ + private $registry; + private $invalidEntityCount; + + public function __construct(ManagerRegistry $registry) + { + $this->registry = $registry; + + parent::__construct($registry); + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + parent::collect($request, $response, $exception); + + $errors = array(); + $entities = array(); + $caches = array( + 'enabled' => false, + 'log_enabled' => false, + 'counts' => array( + 'puts' => 0, + 'hits' => 0, + 'misses' => 0, + ), + 'regions' => array( + 'puts' => array(), + 'hits' => array(), + 'misses' => array(), + ), + ); + + foreach ($this->registry->getManagers() as $name => $em) { + $entities[$name] = array(); + /** @var $factory \Doctrine\ORM\Mapping\ClassMetadataFactory */ + $factory = $em->getMetadataFactory(); + $validator = new SchemaValidator($em); + + /** @var $class \Doctrine\ORM\Mapping\ClassMetadataInfo */ + foreach ($factory->getLoadedMetadata() as $class) { + if (!isset($entities[$name][$class->getName()])) { + $classErrors = $validator->validateClass($class); + $entities[$name][$class->getName()] = $class->getName(); + + if (!empty($classErrors)) { + $errors[$name][$class->getName()] = $classErrors; + } + } + } + + if (version_compare(Version::VERSION, '2.5.0-DEV') < 0) { + continue; + } + + /** @var $emConfig \Doctrine\ORM\Configuration */ + $emConfig = $em->getConfiguration(); + $slcEnabled = $emConfig->isSecondLevelCacheEnabled(); + + if (!$slcEnabled) { + continue; + } + + $caches['enabled'] = true; + + /** @var $cacheConfiguration \Doctrine\ORM\Cache\CacheConfiguration */ + /** @var $cacheLoggerChain \Doctrine\ORM\Cache\Logging\CacheLoggerChain */ + $cacheConfiguration = $emConfig->getSecondLevelCacheConfiguration(); + $cacheLoggerChain = $cacheConfiguration->getCacheLogger(); + + if (!$cacheLoggerChain || !$cacheLoggerChain->getLogger('statistics')) { + continue; + } + + /** @var $cacheLoggerStats \Doctrine\ORM\Cache\Logging\StatisticsCacheLogger */ + $cacheLoggerStats = $cacheLoggerChain->getLogger('statistics'); + $caches['log_enabled'] = true; + + $caches['counts']['puts'] += $cacheLoggerStats->getPutCount(); + $caches['counts']['hits'] += $cacheLoggerStats->getHitCount(); + $caches['counts']['misses'] += $cacheLoggerStats->getMissCount(); + + foreach ($cacheLoggerStats->getRegionsPut() as $key => $value) { + if (!isset($caches['regions']['puts'][$key])) { + $caches['regions']['puts'][$key] = 0; + } + + $caches['regions']['puts'][$key] += $value; + } + + foreach ($cacheLoggerStats->getRegionsHit() as $key => $value) { + if (!isset($caches['regions']['hits'][$key])) { + $caches['regions']['hits'][$key] = 0; + } + + $caches['regions']['hits'][$key] += $value; + } + + foreach ($cacheLoggerStats->getRegionsMiss() as $key => $value) { + if (!isset($caches['regions']['misses'][$key])) { + $caches['regions']['misses'][$key] = 0; + } + + $caches['regions']['misses'][$key] += $value; + } + } + + $this->data['entities'] = $entities; + $this->data['errors'] = $errors; + $this->data['caches'] = $caches; + } + + public function getEntities() + { + return $this->data['entities']; + } + + public function getMappingErrors() + { + return $this->data['errors']; + } + + public function getCacheHitsCount() + { + return $this->data['caches']['counts']['hits']; + } + + public function getCachePutsCount() + { + return $this->data['caches']['counts']['puts']; + } + + public function getCacheMissesCount() + { + return $this->data['caches']['counts']['misses']; + } + + public function getCacheEnabled() + { + return $this->data['caches']['enabled']; + } + + public function getCacheRegions() + { + return $this->data['caches']['regions']; + } + + public function getCacheCounts() + { + return $this->data['caches']['counts']; + } + + public function getInvalidEntityCount() + { + if (null === $this->invalidEntityCount) { + $this->invalidEntityCount = array_sum(array_map('count', $this->data['errors'])); + } + + return $this->invalidEntityCount; + } + + public function getGroupedQueries() + { + static $groupedQueries = null; + + if ($groupedQueries !== null) { + return $groupedQueries; + } + + $groupedQueries = array(); + $totalExecutionMS = 0; + foreach ($this->data['queries'] as $connection => $queries) { + $connectionGroupedQueries = array(); + foreach ($queries as $i => $query) { + $key = $query['sql']; + if (!isset($connectionGroupedQueries[$key])) { + $connectionGroupedQueries[$key] = $query; + $connectionGroupedQueries[$key]['executionMS'] = 0; + $connectionGroupedQueries[$key]['count'] = 0; + $connectionGroupedQueries[$key]['index'] = $i; // "Explain query" relies on query index in 'queries'. + } + $connectionGroupedQueries[$key]['executionMS'] += $query['executionMS']; + $connectionGroupedQueries[$key]['count']++; + $totalExecutionMS += $query['executionMS']; + } + usort($connectionGroupedQueries, function ($a, $b) { + if ($a['executionMS'] === $b['executionMS']) { + return 0; + } + return ($a['executionMS'] < $b['executionMS']) ? 1 : -1; + }); + $groupedQueries[$connection] = $connectionGroupedQueries; + } + foreach ($groupedQueries as $connection => $queries) { + foreach ($queries as $i => $query) { + $groupedQueries[$connection][$i]['executionPercent'] = $query['executionMS'] / $totalExecutionMS * 100; + } + } + + return $groupedQueries; + } + + public function getGroupedQueryCount() + { + $count = 0; + foreach ($this->getGroupedQueries() as $connectionGroupedQueries) { + $count += count($connectionGroupedQueries); + } + + return $count; + } +} diff --git a/vendor/doctrine/doctrine-bundle/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php b/vendor/doctrine/doctrine-bundle/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php new file mode 100644 index 0000000000000000000000000000000000000000..3c76f3d4c2ac6251f8319532400371d49992ecb2 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php @@ -0,0 +1,167 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler; + +use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterMappingsPass; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Class for Symfony bundles to configure mappings for model classes not in the + * auto-mapped folder. + * + * NOTE: alias is only supported by Symfony 2.6+ and will be ignored with older versions. + * + * @author David Buchmann + */ +class DoctrineOrmMappingsPass extends RegisterMappingsPass +{ + /** + * You should not directly instantiate this class but use one of the + * factory methods. + * + * @param Definition|Reference $driver Driver DI definition or reference. + * @param array $namespaces List of namespaces handled by $driver. + * @param string[] $managerParameters Ordered list of container parameters that + * could hold the manager name. + * doctrine.default_entity_manager is appended + * automatically. + * @param string|false $enabledParameter If specified, the compiler pass only executes + * if this parameter is defined in the service + * container. + * @param array $aliasMap Map of alias to namespace. + */ + public function __construct($driver, array $namespaces, array $managerParameters, $enabledParameter = false, array $aliasMap = array()) + { + $managerParameters[] = 'doctrine.default_entity_manager'; + parent::__construct( + $driver, + $namespaces, + $managerParameters, + 'doctrine.orm.%s_metadata_driver', + $enabledParameter, + 'doctrine.orm.%s_configuration', + 'addEntityNamespace', + $aliasMap + ); + } + + /** + * @param array $namespaces Hashmap of directory path to namespace. + * @param string[] $managerParameters List of parameters that could which object manager name + * your bundle uses. This compiler pass will automatically + * append the parameter name for the default entity manager + * to this list. + * @param string|false $enabledParameter Service container parameter that must be present to + * enable the mapping. Set to false to not do any check, + * optional. + * @param string[] $aliasMap Map of alias to namespace. + * + * @return self + */ + public static function createXmlMappingDriver(array $namespaces, array $managerParameters = array(), $enabledParameter = false, array $aliasMap = array()) + { + $arguments = array($namespaces, '.orm.xml'); + $locator = new Definition('Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator', $arguments); + $driver = new Definition('Doctrine\ORM\Mapping\Driver\XmlDriver', array($locator)); + + return new DoctrineOrmMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap); + } + + /** + * @param array $namespaces Hashmap of directory path to namespace + * @param string[] $managerParameters List of parameters that could which object manager name + * your bundle uses. This compiler pass will automatically + * append the parameter name for the default entity manager + * to this list. + * @param string|false $enabledParameter Service container parameter that must be present to + * enable the mapping. Set to false to not do any check, + * optional. + * @param string[] $aliasMap Map of alias to namespace. + * + * @return self + */ + public static function createYamlMappingDriver(array $namespaces, array $managerParameters = array(), $enabledParameter = false, array $aliasMap = array()) + { + $arguments = array($namespaces, '.orm.yml'); + $locator = new Definition('Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator', $arguments); + $driver = new Definition('Doctrine\ORM\Mapping\Driver\YamlDriver', array($locator)); + + return new DoctrineOrmMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap); + } + + /** + * @param array $namespaces Hashmap of directory path to namespace + * @param string[] $managerParameters List of parameters that could which object manager name + * your bundle uses. This compiler pass will automatically + * append the parameter name for the default entity manager + * to this list. + * @param string $enabledParameter Service container parameter that must be present to + * enable the mapping. Set to false to not do any check, + * optional. + * @param string[] $aliasMap Map of alias to namespace. + * + * @return self + */ + public static function createPhpMappingDriver(array $namespaces, array $managerParameters = array(), $enabledParameter = false, array $aliasMap = array()) + { + $arguments = array($namespaces, '.php'); + $locator = new Definition('Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator', $arguments); + $driver = new Definition('Doctrine\Common\Persistence\Mapping\Driver\PHPDriver', array($locator)); + + return new DoctrineOrmMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap); + } + + /** + * @param array $namespaces List of namespaces that are handled with annotation mapping + * @param array $directories List of directories to look for annotated classes + * @param string[] $managerParameters List of parameters that could which object manager name + * your bundle uses. This compiler pass will automatically + * append the parameter name for the default entity manager + * to this list. + * @param string|false $enabledParameter Service container parameter that must be present to + * enable the mapping. Set to false to not do any check, + * optional. + * @param string[] $aliasMap Map of alias to namespace. + * + * @return self + */ + public static function createAnnotationMappingDriver(array $namespaces, array $directories, array $managerParameters = array(), $enabledParameter = false, array $aliasMap = array()) + { + $reader = new Reference('annotation_reader'); + $driver = new Definition('Doctrine\ORM\Mapping\Driver\AnnotationDriver', array($reader, $directories)); + + return new DoctrineOrmMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap); + } + + /** + * @param array $namespaces List of namespaces that are handled with static php mapping + * @param array $directories List of directories to look for static php mapping files + * @param string[] $managerParameters List of parameters that could which object manager name + * your bundle uses. This compiler pass will automatically + * append the parameter name for the default entity manager + * to this list. + * @param string|false $enabledParameter Service container parameter that must be present to + * enable the mapping. Set to false to not do any check, + * optional. + * @param string[] $aliasMap Map of alias to namespace. + * + * @return self + */ + public static function createStaticPhpMappingDriver(array $namespaces, array $directories, array $managerParameters = array(), $enabledParameter = false, array $aliasMap = array()) + { + $driver = new Definition('Doctrine\Common\Persistence\Mapping\Driver\StaticPHPDriver', array($directories)); + + return new DoctrineOrmMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap); + } +} diff --git a/vendor/doctrine/doctrine-bundle/DependencyInjection/Compiler/EntityListenerPass.php b/vendor/doctrine/doctrine-bundle/DependencyInjection/Compiler/EntityListenerPass.php new file mode 100644 index 0000000000000000000000000000000000000000..c808ea80c6bb0906e4c8d9e5c410e617c36fa8f0 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/DependencyInjection/Compiler/EntityListenerPass.php @@ -0,0 +1,110 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Class for Symfony bundles to register entity listeners + * + * @author Sander Marechal + */ +class EntityListenerPass implements CompilerPassInterface +{ + /** + * {@inheritDoc} + */ + public function process(ContainerBuilder $container) + { + $resolvers = $container->findTaggedServiceIds('doctrine.orm.entity_listener'); + + foreach ($resolvers as $id => $tagAttributes) { + foreach ($tagAttributes as $attributes) { + $name = isset($attributes['entity_manager']) ? $attributes['entity_manager'] : $container->getParameter('doctrine.default_entity_manager'); + $entityManager = sprintf('doctrine.orm.%s_entity_manager', $name); + + if (!$container->hasDefinition($entityManager)) { + continue; + } + + $resolverId = sprintf('doctrine.orm.%s_entity_listener_resolver', $name); + + if (!$container->has($resolverId)) { + continue; + } + + $resolver = $container->findDefinition($resolverId); + + if (isset($attributes['entity']) && isset($attributes['event'])) { + $this->attachToListener($container, $name, $id, $attributes); + } + + if (isset($attributes['lazy']) && $attributes['lazy']) { + $listener = $container->findDefinition($id); + + if (!$listener->isPublic()) { + throw new InvalidArgumentException(sprintf('The service "%s" must be public as this entity listener is lazy-loaded.', $id)); + } + + if ($listener->isAbstract()) { + throw new InvalidArgumentException(sprintf('The service "%s" must not be abstract as this entity listener is lazy-loaded.', $id)); + } + + $interface = 'Doctrine\\Bundle\\DoctrineBundle\\Mapping\\EntityListenerServiceResolver'; + $class = $resolver->getClass(); + + if (substr($class, 0, 1) === '%') { + // resolve container parameter first + $class = $container->getParameterBag()->resolveValue($resolver->getClass()); + } + + if (!is_a($class, $interface, true)) { + throw new InvalidArgumentException( + sprintf('Lazy-loaded entity listeners can only be resolved by a resolver implementing %s.', $interface) + ); + } + + $resolver->addMethodCall('registerService', array($listener->getClass(), $id)); + } else { + $resolver->addMethodCall('register', array(new Reference($id))); + } + } + } + } + + private function attachToListener(ContainerBuilder $container, $name, $id, array $attributes) + { + $listenerId = sprintf('doctrine.orm.%s_listeners.attach_entity_listeners', $name); + + if (!$container->has($listenerId)) { + return; + } + + $serviceDef = $container->getDefinition($id); + + $args = array( + $attributes['entity'], + $serviceDef->getClass(), + $attributes['event'], + ); + + if (isset($attributes['method'])) { + $args[] = $attributes['method']; + } + + $container->findDefinition($listenerId)->addMethodCall('addEntityListener', $args); + } +} diff --git a/vendor/doctrine/doctrine-bundle/DependencyInjection/Configuration.php b/vendor/doctrine/doctrine-bundle/DependencyInjection/Configuration.php new file mode 100644 index 0000000000000000000000000000000000000000..db5df2e6a0b723fd7c678166c2a27357f2435ceb --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/DependencyInjection/Configuration.php @@ -0,0 +1,680 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\DependencyInjection; + +use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +/** + * This class contains the configuration information for the bundle + * + * This information is solely responsible for how the different configuration + * sections are normalized, and merged. + * + * @author Christophe Coevoet + */ +class Configuration implements ConfigurationInterface +{ + private $debug; + + /** + * Constructor + * + * @param Boolean $debug Whether to use the debug mode + */ + public function __construct($debug) + { + $this->debug = (Boolean) $debug; + } + + /** + * {@inheritDoc} + */ + public function getConfigTreeBuilder() + { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('doctrine'); + + $this->addDbalSection($rootNode); + $this->addOrmSection($rootNode); + + return $treeBuilder; + } + + /** + * Add DBAL section to configuration tree + * + * @param ArrayNodeDefinition $node + */ + private function addDbalSection(ArrayNodeDefinition $node) + { + $node + ->children() + ->arrayNode('dbal') + ->beforeNormalization() + ->ifTrue(function ($v) { return is_array($v) && !array_key_exists('connections', $v) && !array_key_exists('connection', $v); }) + ->then(function ($v) { + // Key that should not be rewritten to the connection config + $excludedKeys = array('default_connection' => true, 'types' => true, 'type' => true); + $connection = array(); + foreach ($v as $key => $value) { + if (isset($excludedKeys[$key])) { + continue; + } + $connection[$key] = $v[$key]; + unset($v[$key]); + } + $v['default_connection'] = isset($v['default_connection']) ? (string) $v['default_connection'] : 'default'; + $v['connections'] = array($v['default_connection'] => $connection); + + return $v; + }) + ->end() + ->children() + ->scalarNode('default_connection')->end() + ->end() + ->fixXmlConfig('type') + ->children() + ->arrayNode('types') + ->useAttributeAsKey('name') + ->prototype('array') + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array('class' => $v); }) + ->end() + ->children() + ->scalarNode('class')->isRequired()->end() + ->booleanNode('commented')->defaultTrue()->end() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('connection') + ->append($this->getDbalConnectionsNode()) + ->end() + ; + } + + /** + * Return the dbal connections node + * + * @return ArrayNodeDefinition + */ + private function getDbalConnectionsNode() + { + $treeBuilder = new TreeBuilder(); + $node = $treeBuilder->root('connections'); + + /** @var $connectionNode ArrayNodeDefinition */ + $connectionNode = $node + ->requiresAtLeastOneElement() + ->useAttributeAsKey('name') + ->prototype('array') + ; + + $this->configureDbalDriverNode($connectionNode); + + $connectionNode + ->fixXmlConfig('option') + ->fixXmlConfig('mapping_type') + ->fixXmlConfig('slave') + ->fixXmlConfig('shard') + ->fixXmlConfig('default_table_option') + ->children() + ->scalarNode('driver')->defaultValue('pdo_mysql')->end() + ->scalarNode('platform_service')->end() + ->booleanNode('auto_commit')->end() + ->scalarNode('schema_filter')->end() + ->booleanNode('logging')->defaultValue($this->debug)->end() + ->booleanNode('profiling')->defaultValue($this->debug)->end() + ->scalarNode('server_version')->end() + ->scalarNode('driver_class')->end() + ->scalarNode('wrapper_class')->end() + ->scalarNode('shard_manager_class')->end() + ->scalarNode('shard_choser')->end() + ->scalarNode('shard_choser_service')->end() + ->booleanNode('keep_slave')->end() + ->arrayNode('options') + ->useAttributeAsKey('key') + ->prototype('scalar')->end() + ->end() + ->arrayNode('mapping_types') + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->arrayNode('default_table_options') + ->info("This option is used by the schema-tool and affects generated SQL. Possible keys include 'charset','collate', and 'engine'.") + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->end() + ; + + $slaveNode = $connectionNode + ->children() + ->arrayNode('slaves') + ->useAttributeAsKey('name') + ->prototype('array') + ; + $this->configureDbalDriverNode($slaveNode); + + $shardNode = $connectionNode + ->children() + ->arrayNode('shards') + ->prototype('array') + ->children() + ->integerNode('id') + ->min(1) + ->isRequired() + ->end() + ->end() + ; + $this->configureDbalDriverNode($shardNode); + + return $node; + } + + /** + * Adds config keys related to params processed by the DBAL drivers + * + * These keys are available for slave configurations too. + * + * @param ArrayNodeDefinition $node + */ + private function configureDbalDriverNode(ArrayNodeDefinition $node) + { + $node + ->children() + ->scalarNode('url')->info('A URL with connection information; any parameter value parsed from this string will override explicitly set parameters')->end() + ->scalarNode('dbname')->end() + ->scalarNode('host')->defaultValue('localhost')->end() + ->scalarNode('port')->defaultNull()->end() + ->scalarNode('user')->defaultValue('root')->end() + ->scalarNode('password')->defaultNull()->end() + ->scalarNode('application_name')->end() + ->scalarNode('charset')->end() + ->scalarNode('path')->end() + ->booleanNode('memory')->end() + ->scalarNode('unix_socket')->info('The unix socket to use for MySQL')->end() + ->booleanNode('persistent')->info('True to use as persistent connection for the ibm_db2 driver')->end() + ->scalarNode('protocol')->info('The protocol to use for the ibm_db2 driver (default to TCPIP if ommited)')->end() + ->booleanNode('service') + ->info('True to use SERVICE_NAME as connection parameter instead of SID for Oracle') + ->end() + ->scalarNode('servicename') + ->info( + 'Overrules dbname parameter if given and used as SERVICE_NAME or SID connection parameter '. + 'for Oracle depending on the service parameter.' + ) + ->end() + ->scalarNode('sessionMode') + ->info('The session mode to use for the oci8 driver') + ->end() + ->scalarNode('server') + ->info('The name of a running database server to connect to for SQL Anywhere.') + ->end() + ->scalarNode('sslmode') + ->info( + 'Determines whether or with what priority a SSL TCP/IP connection will be negotiated with '. + 'the server for PostgreSQL.' + ) + ->end() + ->scalarNode('sslrootcert') + ->info( + 'The name of a file containing SSL certificate authority (CA) certificate(s). '. + 'If the file exists, the server\'s certificate will be verified to be signed by one of these authorities.' + ) + ->end() + ->booleanNode('pooled')->info('True to use a pooled server with the oci8/pdo_oracle driver')->end() + ->booleanNode('MultipleActiveResultSets')->info('Configuring MultipleActiveResultSets for the pdo_sqlsrv driver')->end() + ->booleanNode('use_savepoints')->info('Use savepoints for nested transactions')->end() + ->scalarNode('instancename') + ->info( + 'Optional parameter, complete whether to add the INSTANCE_NAME parameter in the connection.'. + ' It is generally used to connect to an Oracle RAC server to select the name'. + ' of a particular instance.' + ) + ->end() + ->scalarNode('connectstring') + ->info( + 'Complete Easy Connect connection descriptor, see https://docs.oracle.com/database/121/NETAG/naming.htm.'. + 'When using this option, you will still need to provide the user and password parameters, but the other '. + 'parameters will no longer be used. Note that when using this parameter, the getHost and getPort methods'. + ' from Doctrine\DBAL\Connection will no longer function as expected.' + ) + ->end() + ->end() + ->beforeNormalization() + ->ifTrue(function ($v) {return !isset($v['sessionMode']) && isset($v['session_mode']);}) + ->then(function ($v) { + $v['sessionMode'] = $v['session_mode']; + unset($v['session_mode']); + + return $v; + }) + ->end() + ->beforeNormalization() + ->ifTrue(function ($v) {return !isset($v['MultipleActiveResultSets']) && isset($v['multiple_active_result_sets']);}) + ->then(function ($v) { + $v['MultipleActiveResultSets'] = $v['multiple_active_result_sets']; + unset($v['multiple_active_result_sets']); + + return $v; + }) + ->end() + ; + } + + /** + * Add the ORM section to configuration tree + * + * @param ArrayNodeDefinition $node + */ + private function addOrmSection(ArrayNodeDefinition $node) + { + $generationModes = $this->getAutoGenerateModes(); + + $node + ->children() + ->arrayNode('orm') + ->beforeNormalization() + ->ifTrue(function ($v) { return null === $v || (is_array($v) && !array_key_exists('entity_managers', $v) && !array_key_exists('entity_manager', $v)); }) + ->then(function ($v) { + $v = (array) $v; + // Key that should not be rewritten to the connection config + $excludedKeys = array( + 'default_entity_manager' => true, 'auto_generate_proxy_classes' => true, + 'proxy_dir' => true, 'proxy_namespace' => true, 'resolve_target_entities' => true, + 'resolve_target_entity' => true, + ); + $entityManager = array(); + foreach ($v as $key => $value) { + if (isset($excludedKeys[$key])) { + continue; + } + $entityManager[$key] = $v[$key]; + unset($v[$key]); + } + $v['default_entity_manager'] = isset($v['default_entity_manager']) ? (string) $v['default_entity_manager'] : 'default'; + $v['entity_managers'] = array($v['default_entity_manager'] => $entityManager); + + return $v; + }) + ->end() + ->children() + ->scalarNode('default_entity_manager')->end() + ->scalarNode('auto_generate_proxy_classes')->defaultValue(false) + ->info('Auto generate mode possible values are: "NEVER", "ALWAYS", "FILE_NOT_EXISTS", "EVAL"') + ->validate() + ->ifTrue(function ($v) use ($generationModes) { + if (is_int($v) && in_array($v, $generationModes['values']/*array(0, 1, 2, 3)*/)) { + return false; + } + if (is_bool($v)) { + return false; + } + if (is_string($v)) { + if (in_array(strtoupper($v), $generationModes['names']/*array('NEVER', 'ALWAYS', 'FILE_NOT_EXISTS', 'EVAL')*/)) { + return false; + } + } + + return true; + }) + ->thenInvalid('Invalid auto generate mode value %s') + ->end() + ->validate() + ->ifString() + ->then(function ($v) { + return constant('Doctrine\Common\Proxy\AbstractProxyFactory::AUTOGENERATE_'.strtoupper($v)); + }) + ->end() + ->end() + ->scalarNode('proxy_dir')->defaultValue('%kernel.cache_dir%/doctrine/orm/Proxies')->end() + ->scalarNode('proxy_namespace')->defaultValue('Proxies')->end() + ->end() + ->fixXmlConfig('entity_manager') + ->append($this->getOrmEntityManagersNode()) + ->fixXmlConfig('resolve_target_entity', 'resolve_target_entities') + ->append($this->getOrmTargetEntityResolverNode()) + ->end() + ->end() + ; + } + + /** + * Return ORM target entity resolver node + * + * @return \Symfony\Component\Config\Definition\Builder\NodeDefinition + */ + private function getOrmTargetEntityResolverNode() + { + $treeBuilder = new TreeBuilder(); + $node = $treeBuilder->root('resolve_target_entities'); + + $node + ->useAttributeAsKey('interface') + ->prototype('scalar') + ->cannotBeEmpty() + ->end() + ; + + return $node; + } + + /** + * Return ORM entity listener node + * + * @return \Symfony\Component\Config\Definition\Builder\NodeDefinition + */ + private function getOrmEntityListenersNode() + { + $builder = new TreeBuilder(); + $node = $builder->root('entity_listeners'); + $normalizer = function ($mappings) { + $entities = array(); + + foreach ($mappings as $entityClass => $mapping) { + $listeners = array(); + + foreach ($mapping as $listenerClass => $listenerEvent) { + $events = array(); + + foreach ($listenerEvent as $eventType => $eventMapping) { + if ($eventMapping === null) { + $eventMapping = array(null); + } + + foreach ($eventMapping as $method) { + $events[] = array( + 'type' => $eventType, + 'method' => $method, + ); + } + } + + $listeners[] = array( + 'class' => $listenerClass, + 'event' => $events, + ); + } + + $entities[] = array( + 'class' => $entityClass, + 'listener' => $listeners, + ); + } + + return array('entities' => $entities); + }; + + $node + ->beforeNormalization() + // Yaml normalization + ->ifTrue(function ($v) { return is_array(reset($v)) && is_string(key(reset($v))); }) + ->then($normalizer) + ->end() + ->fixXmlConfig('entity', 'entities') + ->children() + ->arrayNode('entities') + ->useAttributeAsKey('class') + ->prototype('array') + ->fixXmlConfig('listener') + ->children() + ->arrayNode('listeners') + ->useAttributeAsKey('class') + ->prototype('array') + ->fixXmlConfig('event') + ->children() + ->arrayNode('events') + ->prototype('array') + ->children() + ->scalarNode('type')->end() + ->scalarNode('method')->defaultNull()->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + + return $node; + } + + /** + * Return ORM entity manager node + * + * @return ArrayNodeDefinition + */ + private function getOrmEntityManagersNode() + { + $treeBuilder = new TreeBuilder(); + $node = $treeBuilder->root('entity_managers'); + + $node + ->requiresAtLeastOneElement() + ->useAttributeAsKey('name') + ->prototype('array') + ->addDefaultsIfNotSet() + ->append($this->getOrmCacheDriverNode('query_cache_driver')) + ->append($this->getOrmCacheDriverNode('metadata_cache_driver')) + ->append($this->getOrmCacheDriverNode('result_cache_driver')) + ->append($this->getOrmEntityListenersNode()) + ->children() + ->scalarNode('connection')->end() + ->scalarNode('class_metadata_factory_name')->defaultValue('Doctrine\ORM\Mapping\ClassMetadataFactory')->end() + ->scalarNode('default_repository_class')->defaultValue('Doctrine\ORM\EntityRepository')->end() + ->scalarNode('auto_mapping')->defaultFalse()->end() + ->scalarNode('naming_strategy')->defaultValue('doctrine.orm.naming_strategy.default')->end() + ->scalarNode('quote_strategy')->defaultValue('doctrine.orm.quote_strategy.default')->end() + ->scalarNode('entity_listener_resolver')->defaultNull()->end() + ->scalarNode('repository_factory')->defaultNull()->end() + ->end() + ->children() + ->arrayNode('second_level_cache') + ->children() + ->append($this->getOrmCacheDriverNode('region_cache_driver')) + ->scalarNode('region_lock_lifetime')->defaultValue(60)->end() + ->booleanNode('log_enabled')->defaultValue($this->debug)->end() + ->scalarNode('region_lifetime')->defaultValue(0)->end() + ->booleanNode('enabled')->defaultValue(true)->end() + ->scalarNode('factory')->end() + ->end() + ->fixXmlConfig('region') + ->children() + ->arrayNode('regions') + ->useAttributeAsKey('name') + ->prototype('array') + ->children() + ->append($this->getOrmCacheDriverNode('cache_driver')) + ->scalarNode('lock_path')->defaultValue('%kernel.cache_dir%/doctrine/orm/slc/filelock')->end() + ->scalarNode('lock_lifetime')->defaultValue(60)->end() + ->scalarNode('type')->defaultValue('default')->end() + ->scalarNode('lifetime')->defaultValue(0)->end() + ->scalarNode('service')->end() + ->scalarNode('name')->end() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('logger') + ->children() + ->arrayNode('loggers') + ->useAttributeAsKey('name') + ->prototype('array') + ->children() + ->scalarNode('name')->end() + ->scalarNode('service')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('hydrator') + ->children() + ->arrayNode('hydrators') + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->end() + ->fixXmlConfig('mapping') + ->children() + ->arrayNode('mappings') + ->useAttributeAsKey('name') + ->prototype('array') + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array('type' => $v); }) + ->end() + ->treatNullLike(array()) + ->treatFalseLike(array('mapping' => false)) + ->performNoDeepMerging() + ->children() + ->scalarNode('mapping')->defaultValue(true)->end() + ->scalarNode('type')->end() + ->scalarNode('dir')->end() + ->scalarNode('alias')->end() + ->scalarNode('prefix')->end() + ->booleanNode('is_bundle')->end() + ->end() + ->end() + ->end() + ->arrayNode('dql') + ->fixXmlConfig('string_function') + ->fixXmlConfig('numeric_function') + ->fixXmlConfig('datetime_function') + ->children() + ->arrayNode('string_functions') + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->arrayNode('numeric_functions') + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->arrayNode('datetime_functions') + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('filter') + ->children() + ->arrayNode('filters') + ->info('Register SQL Filters in the entity manager') + ->useAttributeAsKey('name') + ->prototype('array') + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array('class' => $v); }) + ->end() + ->beforeNormalization() + // The content of the XML node is returned as the "value" key so we need to rename it + ->ifTrue(function ($v) { + return is_array($v) && isset($v['value']); + }) + ->then(function ($v) { + $v['class'] = $v['value']; + unset($v['value']); + + return $v; + }) + ->end() + ->fixXmlConfig('parameter') + ->children() + ->scalarNode('class')->isRequired()->end() + ->booleanNode('enabled')->defaultFalse()->end() + ->arrayNode('parameters') + ->useAttributeAsKey('name') + ->prototype('variable')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + + return $node; + } + + /** + * Return a ORM cache driver node for an given entity manager + * + * @param string $name + * + * @return ArrayNodeDefinition + */ + private function getOrmCacheDriverNode($name) + { + $treeBuilder = new TreeBuilder(); + $node = $treeBuilder->root($name); + + $node + ->addDefaultsIfNotSet() + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array('type' => $v); }) + ->end() + ->children() + ->scalarNode('type')->defaultValue('array')->end() + ->scalarNode('host')->end() + ->scalarNode('port')->end() + ->scalarNode('instance_class')->end() + ->scalarNode('class')->end() + ->scalarNode('id')->end() + ->scalarNode('namespace')->defaultNull()->end() + ->scalarNode('cache_provider')->defaultNull()->end() + ->end() + ; + + return $node; + } + + /** + * Find proxy auto generate modes for their names and int values + * + * @return array + */ + private function getAutoGenerateModes() + { + $constPrefix = 'AUTOGENERATE_'; + $prefixLen = strlen($constPrefix); + $refClass = new \ReflectionClass('Doctrine\Common\Proxy\AbstractProxyFactory'); + $constsArray = $refClass->getConstants(); + $namesArray = array(); + $valuesArray = array(); + + foreach ($constsArray as $key => $value) { + if (strpos($key, $constPrefix) === 0) { + $namesArray[] = substr($key, $prefixLen); + $valuesArray[] = (int) $value; + } + } + + return array( + 'names' => $namesArray, + 'values' => $valuesArray, + ); + } +} diff --git a/vendor/doctrine/doctrine-bundle/DependencyInjection/DoctrineExtension.php b/vendor/doctrine/doctrine-bundle/DependencyInjection/DoctrineExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..80ec9062a6c934da1cf28628d5ca5f5dd41d8127 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/DependencyInjection/DoctrineExtension.php @@ -0,0 +1,853 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\DependencyInjection; + +use Doctrine\ORM\Version; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension; +use Symfony\Component\Config\FileLocator; +use Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\SymfonyBridgeAdapter; +use Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\CacheProviderLoader; + +/** + * DoctrineExtension is an extension for the Doctrine DBAL and ORM library. + * + * @author Jonathan H. Wage + * @author Fabien Potencier + * @author Benjamin Eberlei + * @author Fabio B. Silva + * @author Kinn Coelho Julião + */ +class DoctrineExtension extends AbstractDoctrineExtension +{ + /** + * @var string + */ + private $defaultConnection; + + /** + * @var array + */ + private $entityManagers; + + /** + * @var SymfonyBridgeAdapter + */ + private $adapter; + + /** + * @param SymfonyBridgeAdapter $adapter + */ + public function __construct(SymfonyBridgeAdapter $adapter = null) + { + $this->adapter = $adapter ?: new SymfonyBridgeAdapter(new CacheProviderLoader(), 'doctrine.orm', 'orm'); + } + + /** + * {@inheritDoc} + */ + public function load(array $configs, ContainerBuilder $container) + { + $configuration = $this->getConfiguration($configs, $container); + $config = $this->processConfiguration($configuration, $configs); + + $this->adapter->loadServicesConfiguration($container); + + if (!empty($config['dbal'])) { + $this->dbalLoad($config['dbal'], $container); + } + + if (!empty($config['orm'])) { + if (empty($config['dbal'])) { + throw new \LogicException('Configuring the ORM layer requires to configure the DBAL layer as well.'); + } + + if (!class_exists('Doctrine\ORM\Version')) { + throw new \LogicException('To configure the ORM layer, you must first install the doctrine/orm package.'); + } + + $this->ormLoad($config['orm'], $container); + } + + if (PHP_VERSION_ID < 70000) { + $this->addClassesToCompile(array( + 'Doctrine\\Common\\Annotations\\DocLexer', + 'Doctrine\\Common\\Annotations\\FileCacheReader', + 'Doctrine\\Common\\Annotations\\PhpParser', + 'Doctrine\\Common\\Annotations\\Reader', + 'Doctrine\\Common\\Lexer', + 'Doctrine\\Common\\Persistence\\ConnectionRegistry', + 'Doctrine\\Common\\Persistence\\Proxy', + 'Doctrine\\Common\\Util\\ClassUtils', + 'Doctrine\\Bundle\\DoctrineBundle\\Registry', + )); + } + } + + /** + * Loads the DBAL configuration. + * + * Usage example: + * + * + * + * @param array $config An array of configuration settings + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function dbalLoad(array $config, ContainerBuilder $container) + { + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('dbal.xml'); + + if (empty($config['default_connection'])) { + $keys = array_keys($config['connections']); + $config['default_connection'] = reset($keys); + } + + $this->defaultConnection = $config['default_connection']; + + $container->setAlias('database_connection', sprintf('doctrine.dbal.%s_connection', $this->defaultConnection)); + $container->setAlias('doctrine.dbal.event_manager', new Alias(sprintf('doctrine.dbal.%s_connection.event_manager', $this->defaultConnection), false)); + + $container->setParameter('doctrine.dbal.connection_factory.types', $config['types']); + + $connections = array(); + + foreach (array_keys($config['connections']) as $name) { + $connections[$name] = sprintf('doctrine.dbal.%s_connection', $name); + } + + $container->setParameter('doctrine.connections', $connections); + $container->setParameter('doctrine.default_connection', $this->defaultConnection); + + $def = $container->getDefinition('doctrine.dbal.connection'); + if (method_exists($def, 'setFactory')) { + // to be inlined in dbal.xml when dependency on Symfony DependencyInjection is bumped to 2.6 + $def->setFactory(array(new Reference('doctrine.dbal.connection_factory'), 'createConnection')); + } else { + // to be removed when dependency on Symfony DependencyInjection is bumped to 2.6 + $def->setFactoryService('doctrine.dbal.connection_factory'); + $def->setFactoryMethod('createConnection'); + } + + foreach ($config['connections'] as $name => $connection) { + $this->loadDbalConnection($name, $connection, $container); + } + } + + /** + * Loads a configured DBAL connection. + * + * @param string $name The name of the connection + * @param array $connection A dbal connection configuration. + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function loadDbalConnection($name, array $connection, ContainerBuilder $container) + { + // configuration + $configuration = $container->setDefinition(sprintf('doctrine.dbal.%s_connection.configuration', $name), new DefinitionDecorator('doctrine.dbal.connection.configuration')); + $logger = null; + if ($connection['logging']) { + $logger = new Reference('doctrine.dbal.logger'); + } + unset ($connection['logging']); + if ($connection['profiling']) { + $profilingLoggerId = 'doctrine.dbal.logger.profiling.'.$name; + $container->setDefinition($profilingLoggerId, new DefinitionDecorator('doctrine.dbal.logger.profiling')); + $profilingLogger = new Reference($profilingLoggerId); + $container->getDefinition('data_collector.doctrine')->addMethodCall('addLogger', array($name, $profilingLogger)); + + if (null !== $logger) { + $chainLogger = new DefinitionDecorator('doctrine.dbal.logger.chain'); + $chainLogger->addMethodCall('addLogger', array($profilingLogger)); + + $loggerId = 'doctrine.dbal.logger.chain.'.$name; + $container->setDefinition($loggerId, $chainLogger); + $logger = new Reference($loggerId); + } else { + $logger = $profilingLogger; + } + } + unset($connection['profiling']); + + if (isset($connection['auto_commit'])) { + $configuration->addMethodCall('setAutoCommit', array($connection['auto_commit'])); + } + + unset($connection['auto_commit']); + + if (isset($connection['schema_filter']) && $connection['schema_filter']) { + $configuration->addMethodCall('setFilterSchemaAssetsExpression', array($connection['schema_filter'])); + } + + unset($connection['schema_filter']); + + if ($logger) { + $configuration->addMethodCall('setSQLLogger', array($logger)); + } + + // event manager + $container->setDefinition(sprintf('doctrine.dbal.%s_connection.event_manager', $name), new DefinitionDecorator('doctrine.dbal.connection.event_manager')); + + // connection + // PDO ignores the charset property before 5.3.6 so the init listener has to be used instead. + if (isset($connection['charset']) && version_compare(PHP_VERSION, '5.3.6', '<')) { + if ((isset($connection['driver']) && stripos($connection['driver'], 'mysql') !== false) || + (isset($connection['driver_class']) && stripos($connection['driver_class'], 'mysql') !== false)) { + $mysqlSessionInit = new Definition('%doctrine.dbal.events.mysql_session_init.class%'); + $mysqlSessionInit->setArguments(array($connection['charset'])); + $mysqlSessionInit->setPublic(false); + $mysqlSessionInit->addTag('doctrine.event_subscriber', array('connection' => $name)); + + $container->setDefinition( + sprintf('doctrine.dbal.%s_connection.events.mysqlsessioninit', $name), + $mysqlSessionInit + ); + unset($connection['charset']); + } + } + + $options = $this->getConnectionOptions($connection); + + $def = $container + ->setDefinition(sprintf('doctrine.dbal.%s_connection', $name), new DefinitionDecorator('doctrine.dbal.connection')) + ->setArguments(array( + $options, + new Reference(sprintf('doctrine.dbal.%s_connection.configuration', $name)), + new Reference(sprintf('doctrine.dbal.%s_connection.event_manager', $name)), + $connection['mapping_types'], + )) + ; + + if (!empty($connection['use_savepoints'])) { + $def->addMethodCall('setNestTransactionsWithSavepoints', array($connection['use_savepoints'])); + } + + // Create a shard_manager for this connection + if (isset($options['shards'])) { + $shardManagerDefinition = new Definition($options['shardManagerClass'], array( + new Reference(sprintf('doctrine.dbal.%s_connection', $name)) + )); + $container->setDefinition(sprintf('doctrine.dbal.%s_shard_manager', $name), $shardManagerDefinition); + } + } + + protected function getConnectionOptions($connection) + { + $options = $connection; + + if (isset($options['platform_service'])) { + $options['platform'] = new Reference($options['platform_service']); + unset($options['platform_service']); + } + unset($options['mapping_types']); + + if (isset($options['shard_choser_service'])) { + $options['shard_choser'] = new Reference($options['shard_choser_service']); + unset($options['shard_choser_service']); + } + + foreach (array( + 'options' => 'driverOptions', + 'driver_class' => 'driverClass', + 'wrapper_class' => 'wrapperClass', + 'keep_slave' => 'keepSlave', + 'shard_choser' => 'shardChoser', + 'shard_manager_class' => 'shardManagerClass', + 'server_version' => 'serverVersion', + 'default_table_options' => 'defaultTableOptions', + ) as $old => $new) { + if (isset($options[$old])) { + $options[$new] = $options[$old]; + unset($options[$old]); + } + } + + if (!empty($options['slaves']) && !empty($options['shards'])) { + throw new InvalidArgumentException('Sharding and master-slave connection cannot be used together'); + } + + if (!empty($options['slaves'])) { + $nonRewrittenKeys = array( + 'driver' => true, 'driverOptions' => true, 'driverClass' => true, + 'wrapperClass' => true, 'keepSlave' => true, 'shardChoser' => true, + 'platform' => true, 'slaves' => true, 'master' => true, 'shards' => true, + 'serverVersion' => true, + // included by safety but should have been unset already + 'logging' => true, 'profiling' => true, 'mapping_types' => true, 'platform_service' => true, + ); + foreach ($options as $key => $value) { + if (isset($nonRewrittenKeys[$key])) { + continue; + } + $options['master'][$key] = $value; + unset($options[$key]); + } + if (empty($options['wrapperClass'])) { + // Change the wrapper class only if the user does not already forced using a custom one. + $options['wrapperClass'] = 'Doctrine\\DBAL\\Connections\\MasterSlaveConnection'; + } + } else { + unset($options['slaves']); + } + + if (!empty($options['shards'])) { + $nonRewrittenKeys = array( + 'driver' => true, 'driverOptions' => true, 'driverClass' => true, + 'wrapperClass' => true, 'keepSlave' => true, 'shardChoser' => true, + 'platform' => true, 'slaves' => true, 'global' => true, 'shards' => true, + 'serverVersion' => true, + // included by safety but should have been unset already + 'logging' => true, 'profiling' => true, 'mapping_types' => true, 'platform_service' => true, + ); + foreach ($options as $key => $value) { + if (isset($nonRewrittenKeys[$key])) { + continue; + } + $options['global'][$key] = $value; + unset($options[$key]); + } + if (empty($options['wrapperClass'])) { + // Change the wrapper class only if the user does not already forced using a custom one. + $options['wrapperClass'] = 'Doctrine\\DBAL\\Sharding\\PoolingShardConnection'; + } + if (empty($options['shardManagerClass'])) { + // Change the shard manager class only if the user does not already forced using a custom one. + $options['shardManagerClass'] = 'Doctrine\\DBAL\\Sharding\\PoolingShardManager'; + } + } else { + unset($options['shards']); + } + + return $options; + } + + /** + * Loads the Doctrine ORM configuration. + * + * Usage example: + * + * + * + * @param array $config An array of configuration settings + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function ormLoad(array $config, ContainerBuilder $container) + { + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('orm.xml'); + + $this->entityManagers = array(); + foreach (array_keys($config['entity_managers']) as $name) { + $this->entityManagers[$name] = sprintf('doctrine.orm.%s_entity_manager', $name); + } + $container->setParameter('doctrine.entity_managers', $this->entityManagers); + + if (empty($config['default_entity_manager'])) { + $tmp = array_keys($this->entityManagers); + $config['default_entity_manager'] = reset($tmp); + } + $container->setParameter('doctrine.default_entity_manager', $config['default_entity_manager']); + + $options = array('auto_generate_proxy_classes', 'proxy_dir', 'proxy_namespace'); + foreach ($options as $key) { + $container->setParameter('doctrine.orm.'.$key, $config[$key]); + } + + $container->setAlias('doctrine.orm.entity_manager', sprintf('doctrine.orm.%s_entity_manager', $config['default_entity_manager'])); + + // BC logic to handle DoctrineBridge < 2.6 + if (!method_exists($this, 'fixManagersAutoMappings')) { + foreach ($config['entity_managers'] as $entityManager) { + if ($entityManager['auto_mapping'] && count($config['entity_managers']) > 1) { + throw new \LogicException('You cannot enable "auto_mapping" when several entity managers are defined.'); + } + } + } else { + $config['entity_managers'] = $this->fixManagersAutoMappings($config['entity_managers'], $container->getParameter('kernel.bundles')); + } + + $def = $container->getDefinition('doctrine.orm.entity_manager.abstract'); + if (method_exists($def, 'setFactory')) { + // to be inlined in dbal.xml when dependency on Symfony DependencyInjection is bumped to 2.6 + $def->setFactory(array('%doctrine.orm.entity_manager.class%', 'create')); + } else { + // to be removed when dependency on Symfony DependencyInjection is bumped to 2.6 + $def->setFactoryClass('%doctrine.orm.entity_manager.class%'); + $def->setFactoryMethod('create'); + } + + $loadPropertyInfoExtractor = interface_exists('Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface') + && class_exists('Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor'); + + foreach ($config['entity_managers'] as $name => $entityManager) { + $entityManager['name'] = $name; + $this->loadOrmEntityManager($entityManager, $container); + + if ($loadPropertyInfoExtractor) { + $this->loadPropertyInfoExtractor($name, $container); + } + } + + if ($config['resolve_target_entities']) { + $def = $container->findDefinition('doctrine.orm.listeners.resolve_target_entity'); + foreach ($config['resolve_target_entities'] as $name => $implementation) { + $def->addMethodCall('addResolveTargetEntity', array( + $name, $implementation, array(), + )); + } + + // BC: ResolveTargetEntityListener implements the subscriber interface since + // v2.5.0-beta1 (Commit 437f812) + if (version_compare(Version::VERSION, '2.5.0-DEV') < 0) { + $def->addTag('doctrine.event_listener', array('event' => 'loadClassMetadata')); + } else { + $def->addTag('doctrine.event_subscriber'); + } + } + } + + /** + * Loads a configured ORM entity manager. + * + * @param array $entityManager A configured ORM entity manager. + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function loadOrmEntityManager(array $entityManager, ContainerBuilder $container) + { + $ormConfigDef = $container->setDefinition(sprintf('doctrine.orm.%s_configuration', $entityManager['name']), new DefinitionDecorator('doctrine.orm.configuration')); + + $this->loadOrmEntityManagerMappingInformation($entityManager, $ormConfigDef, $container); + $this->loadOrmCacheDrivers($entityManager, $container); + + if (isset($entityManager['entity_listener_resolver']) && $entityManager['entity_listener_resolver']) { + $container->setAlias(sprintf('doctrine.orm.%s_entity_listener_resolver', $entityManager['name']), $entityManager['entity_listener_resolver']); + } else { + $definition = new Definition('%doctrine.orm.entity_listener_resolver.class%'); + $definition->addArgument(new Reference('service_container')); + $container->setDefinition(sprintf('doctrine.orm.%s_entity_listener_resolver', $entityManager['name']), $definition); + } + + $methods = array( + 'setMetadataCacheImpl' => new Reference(sprintf('doctrine.orm.%s_metadata_cache', $entityManager['name'])), + 'setQueryCacheImpl' => new Reference(sprintf('doctrine.orm.%s_query_cache', $entityManager['name'])), + 'setResultCacheImpl' => new Reference(sprintf('doctrine.orm.%s_result_cache', $entityManager['name'])), + 'setMetadataDriverImpl' => new Reference('doctrine.orm.'.$entityManager['name'].'_metadata_driver'), + 'setProxyDir' => '%doctrine.orm.proxy_dir%', + 'setProxyNamespace' => '%doctrine.orm.proxy_namespace%', + 'setAutoGenerateProxyClasses' => '%doctrine.orm.auto_generate_proxy_classes%', + 'setClassMetadataFactoryName' => $entityManager['class_metadata_factory_name'], + 'setDefaultRepositoryClassName' => $entityManager['default_repository_class'], + ); + // check for version to keep BC + if (version_compare(Version::VERSION, "2.3.0-DEV") >= 0) { + $methods = array_merge($methods, array( + 'setNamingStrategy' => new Reference($entityManager['naming_strategy']), + 'setQuoteStrategy' => new Reference($entityManager['quote_strategy']), + )); + } + + if (version_compare(Version::VERSION, "2.4.0-DEV") >= 0) { + $methods = array_merge($methods, array( + 'setEntityListenerResolver' => new Reference(sprintf('doctrine.orm.%s_entity_listener_resolver', $entityManager['name'])), + )); + } + + if (version_compare(Version::VERSION, "2.5.0-DEV") >= 0) { + $listenerId = sprintf('doctrine.orm.%s_listeners.attach_entity_listeners', $entityManager['name']); + $listenerDef = $container->setDefinition($listenerId, new Definition('%doctrine.orm.listeners.attach_entity_listeners.class%')); + $listenerTagParams = array('event' => 'loadClassMetadata'); + if (isset($entityManager['connection'])) { + $listenerTagParams['connection'] = $entityManager['connection']; + } + $listenerDef->addTag('doctrine.event_listener', $listenerTagParams); + } + + if (isset($entityManager['second_level_cache'])) { + $this->loadOrmSecondLevelCache($entityManager, $ormConfigDef, $container); + } + + if ($entityManager['repository_factory']) { + $methods['setRepositoryFactory'] = new Reference($entityManager['repository_factory']); + } + + foreach ($methods as $method => $arg) { + $ormConfigDef->addMethodCall($method, array($arg)); + } + + foreach ($entityManager['hydrators'] as $name => $class) { + $ormConfigDef->addMethodCall('addCustomHydrationMode', array($name, $class)); + } + + if (!empty($entityManager['dql'])) { + foreach ($entityManager['dql']['string_functions'] as $name => $function) { + $ormConfigDef->addMethodCall('addCustomStringFunction', array($name, $function)); + } + foreach ($entityManager['dql']['numeric_functions'] as $name => $function) { + $ormConfigDef->addMethodCall('addCustomNumericFunction', array($name, $function)); + } + foreach ($entityManager['dql']['datetime_functions'] as $name => $function) { + $ormConfigDef->addMethodCall('addCustomDatetimeFunction', array($name, $function)); + } + } + + $enabledFilters = array(); + $filtersParameters = array(); + foreach ($entityManager['filters'] as $name => $filter) { + $ormConfigDef->addMethodCall('addFilter', array($name, $filter['class'])); + if ($filter['enabled']) { + $enabledFilters[] = $name; + } + if ($filter['parameters']) { + $filtersParameters[$name] = $filter['parameters']; + } + } + + $managerConfiguratorName = sprintf('doctrine.orm.%s_manager_configurator', $entityManager['name']); + $container + ->setDefinition($managerConfiguratorName, new DefinitionDecorator('doctrine.orm.manager_configurator.abstract')) + ->replaceArgument(0, $enabledFilters) + ->replaceArgument(1, $filtersParameters) + ; + + if (!isset($entityManager['connection'])) { + $entityManager['connection'] = $this->defaultConnection; + } + + $container + ->setDefinition(sprintf('doctrine.orm.%s_entity_manager', $entityManager['name']), new DefinitionDecorator('doctrine.orm.entity_manager.abstract')) + ->setArguments(array( + new Reference(sprintf('doctrine.dbal.%s_connection', $entityManager['connection'])), + new Reference(sprintf('doctrine.orm.%s_configuration', $entityManager['name'])), + )) + ->setConfigurator(array(new Reference($managerConfiguratorName), 'configure')) + ; + + $container->setAlias( + sprintf('doctrine.orm.%s_entity_manager.event_manager', $entityManager['name']), + new Alias(sprintf('doctrine.dbal.%s_connection.event_manager', $entityManager['connection']), false) + ); + + if (isset($entityManager['entity_listeners'])) { + if (!isset($listenerDef)) { + throw new InvalidArgumentException('Entity listeners configuration requires doctrine-orm 2.5.0 or newer'); + } + + $entities = $entityManager['entity_listeners']['entities']; + + foreach ($entities as $entityListenerClass => $entity) { + foreach ($entity['listeners'] as $listenerClass => $listener) { + foreach ($listener['events'] as $listenerEvent) { + $listenerEventName = $listenerEvent['type']; + $listenerMethod = $listenerEvent['method']; + + $listenerDef->addMethodCall('addEntityListener', array( + $entityListenerClass, $listenerClass, $listenerEventName, $listenerMethod, + )); + } + } + } + + } + } + + /** + * Loads an ORM entity managers bundle mapping information. + * + * There are two distinct configuration possibilities for mapping information: + * + * 1. Specify a bundle and optionally details where the entity and mapping information reside. + * 2. Specify an arbitrary mapping location. + * + * @example + * + * doctrine.orm: + * mappings: + * MyBundle1: ~ + * MyBundle2: yml + * MyBundle3: { type: annotation, dir: Entities/ } + * MyBundle4: { type: xml, dir: Resources/config/doctrine/mapping } + * MyBundle5: + * type: yml + * dir: bundle-mappings/ + * alias: BundleAlias + * arbitrary_key: + * type: xml + * dir: %kernel.root_dir%/../src/vendor/DoctrineExtensions/lib/DoctrineExtensions/Entities + * prefix: DoctrineExtensions\Entities\ + * alias: DExt + * + * In the case of bundles everything is really optional (which leads to autodetection for this bundle) but + * in the mappings key everything except alias is a required argument. + * + * @param array $entityManager A configured ORM entity manager + * @param Definition $ormConfigDef A Definition instance + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function loadOrmEntityManagerMappingInformation(array $entityManager, Definition $ormConfigDef, ContainerBuilder $container) + { + // reset state of drivers and alias map. They are only used by this methods and children. + $this->drivers = array(); + $this->aliasMap = array(); + + $this->loadMappingInformation($entityManager, $container); + $this->registerMappingDrivers($entityManager, $container); + + $ormConfigDef->addMethodCall('setEntityNamespaces', array($this->aliasMap)); + } + + /** + * Loads an ORM second level cache bundle mapping information. + * + * @example + * entity_managers: + * default: + * second_level_cache: + * region_cache_driver: apc + * log_enabled: true + * regions: + * my_service_region: + * type: service + * service : "my_service_region" + * + * my_query_region: + * lifetime: 300 + * cache_driver: array + * type: filelock + * + * my_entity_region: + * lifetime: 600 + * cache_driver: + * type: apc + * + * @param array $entityManager A configured ORM entity manager + * @param Definition $ormConfigDef A Definition instance + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function loadOrmSecondLevelCache(array $entityManager, Definition $ormConfigDef, ContainerBuilder $container) + { + if (version_compare(Version::VERSION, '2.5.0-DEV') < 0) { + throw new \InvalidArgumentException('Second-level cache requires doctrine-orm 2.5.0 or newer'); + } + + $driverId = null; + $enabled = $entityManager['second_level_cache']['enabled']; + + if (isset($entityManager['second_level_cache']['region_cache_driver'])) { + $driverName = 'second_level_cache.region_cache_driver'; + $driverMap = $entityManager['second_level_cache']['region_cache_driver']; + $driverId = $this->loadCacheDriver($driverName, $entityManager['name'], $driverMap, $container); + } + + $configId = sprintf('doctrine.orm.%s_second_level_cache.cache_configuration', $entityManager['name']); + $regionsId = sprintf('doctrine.orm.%s_second_level_cache.regions_configuration', $entityManager['name']); + $driverId = $driverId ?: sprintf('doctrine.orm.%s_second_level_cache.region_cache_driver', $entityManager['name']); + $configDef = $container->setDefinition($configId, new Definition('%doctrine.orm.second_level_cache.cache_configuration.class%')); + $regionsDef = $container->setDefinition($regionsId, new Definition('%doctrine.orm.second_level_cache.regions_configuration.class%')); + + $slcFactoryId = sprintf('doctrine.orm.%s_second_level_cache.default_cache_factory', $entityManager['name']); + $factoryClass = isset($entityManager['second_level_cache']['factory']) ? $entityManager['second_level_cache']['factory'] : '%doctrine.orm.second_level_cache.default_cache_factory.class%'; + + $definition = new Definition($factoryClass, array(new Reference($regionsId), new Reference($driverId))); + + $slcFactoryDef = $container + ->setDefinition($slcFactoryId, $definition); + + if (isset($entityManager['second_level_cache']['regions'])) { + foreach ($entityManager['second_level_cache']['regions'] as $name => $region) { + $regionRef = null; + $regionType = $region['type']; + + if ($regionType === 'service') { + $regionId = sprintf('doctrine.orm.%s_second_level_cache.region.%s', $entityManager['name'], $name); + $regionRef = new Reference($region['service']); + + $container->setAlias($regionId, new Alias($region['service'], false)); + } + + if ($regionType === 'default' || $regionType === 'filelock') { + $regionId = sprintf('doctrine.orm.%s_second_level_cache.region.%s', $entityManager['name'], $name); + $driverName = sprintf('second_level_cache.region.%s_driver', $name); + $driverMap = $region['cache_driver']; + $driverId = $this->loadCacheDriver($driverName, $entityManager['name'], $driverMap, $container); + $regionRef = new Reference($regionId); + + $container + ->setDefinition($regionId, new Definition('%doctrine.orm.second_level_cache.default_region.class%')) + ->setArguments(array($name, new Reference($driverId), $region['lifetime'])); + } + + if ($regionType === 'filelock') { + $regionId = sprintf('doctrine.orm.%s_second_level_cache.region.%s_filelock', $entityManager['name'], $name); + + $container + ->setDefinition($regionId, new Definition('%doctrine.orm.second_level_cache.filelock_region.class%')) + ->setArguments(array($regionRef, $region['lock_path'], $region['lock_lifetime'])); + + $regionRef = new Reference($regionId); + $regionsDef->addMethodCall('getLockLifetime', array($name, $region['lock_lifetime'])); + } + + $regionsDef->addMethodCall('setLifetime', array($name, $region['lifetime'])); + $slcFactoryDef->addMethodCall('setRegion', array($regionRef)); + } + } + + if ($entityManager['second_level_cache']['log_enabled']) { + $loggerChainId = sprintf('doctrine.orm.%s_second_level_cache.logger_chain', $entityManager['name']); + $loggerStatsId = sprintf('doctrine.orm.%s_second_level_cache.logger_statistics', $entityManager['name']); + $loggerChaingDef = $container->setDefinition($loggerChainId, new Definition('%doctrine.orm.second_level_cache.logger_chain.class%')); + $loggerStatsDef = $container->setDefinition($loggerStatsId, new Definition('%doctrine.orm.second_level_cache.logger_statistics.class%')); + + $loggerChaingDef->addMethodCall('setLogger', array('statistics', $loggerStatsDef)); + $configDef->addMethodCall('setCacheLogger', array($loggerChaingDef)); + + foreach ($entityManager['second_level_cache']['loggers'] as $name => $logger) { + $loggerId = sprintf('doctrine.orm.%s_second_level_cache.logger.%s', $entityManager['name'], $name); + $loggerRef = new Reference($logger['service']); + + $container->setAlias($loggerId, new Alias($logger['service'], false)); + $loggerChaingDef->addMethodCall('setLogger', array($name, $loggerRef)); + } + } + + $configDef->addMethodCall('setCacheFactory', array($slcFactoryDef)); + $configDef->addMethodCall('setRegionsConfiguration', array($regionsDef)); + $ormConfigDef->addMethodCall('setSecondLevelCacheEnabled', array($enabled)); + $ormConfigDef->addMethodCall('setSecondLevelCacheConfiguration', array($configDef)); + } + + /** + * {@inheritDoc} + */ + protected function getObjectManagerElementName($name) + { + return 'doctrine.orm.'.$name; + } + + protected function getMappingObjectDefaultName() + { + return 'Entity'; + } + + /** + * {@inheritDoc} + */ + protected function getMappingResourceConfigDirectory() + { + return 'Resources/config/doctrine'; + } + + /** + * {@inheritDoc} + */ + protected function getMappingResourceExtension() + { + return 'orm'; + } + + /** + * {@inheritDoc} + */ + protected function loadCacheDriver($driverName, $entityManagerName, array $driverMap, ContainerBuilder $container) + { + if (!empty($driverMap['cache_provider'])) { + $aliasId = $this->getObjectManagerElementName(sprintf('%s_%s', $entityManagerName, $driverName)); + $serviceId = sprintf('doctrine_cache.providers.%s', $driverMap['cache_provider']); + + $container->setAlias($aliasId, new Alias($serviceId, false)); + + return $aliasId; + } + + return $this->adapter->loadCacheDriver($driverName, $entityManagerName, $driverMap, $container); + } + + /** + * Loads a configured entity managers cache drivers. + * + * @param array $entityManager A configured ORM entity manager. + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function loadOrmCacheDrivers(array $entityManager, ContainerBuilder $container) + { + $this->loadCacheDriver('metadata_cache', $entityManager['name'], $entityManager['metadata_cache_driver'], $container); + $this->loadCacheDriver('result_cache', $entityManager['name'], $entityManager['result_cache_driver'], $container); + $this->loadCacheDriver('query_cache', $entityManager['name'], $entityManager['query_cache_driver'], $container); + } + + /** + * Loads a property info extractor for each defined entity manager. + * + * @param string $entityManagerName + * @param ContainerBuilder $container + */ + private function loadPropertyInfoExtractor($entityManagerName, ContainerBuilder $container) + { + $metadataFactoryService = sprintf('doctrine.orm.%s_entity_manager.metadata_factory', $entityManagerName); + + $metadataFactoryDefinition = $container->register($metadataFactoryService, 'Doctrine\Common\Persistence\Mapping\ClassMetadataFactory'); + $metadataFactoryDefinition->setFactory(array( + new Reference(sprintf('doctrine.orm.%s_entity_manager', $entityManagerName)), + 'getMetadataFactory' + )); + $metadataFactoryDefinition->setPublic(false); + + $propertyExtractorDefinition = $container->register(sprintf('doctrine.orm.%s_entity_manager.property_info_extractor', $entityManagerName), 'Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor'); + $propertyExtractorDefinition->addArgument(new Reference($metadataFactoryService)); + $propertyExtractorDefinition->addTag('property_info.list_extractor', array('priority' => -1001)); + $propertyExtractorDefinition->addTag('property_info.type_extractor', array('priority' => -999)); + } + + /** + * @param array $objectManager + * @param ContainerBuilder $container + * @param string $cacheName + */ + public function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, $cacheName) + { + $this->loadCacheDriver($cacheName, $objectManager['name'], $objectManager[$cacheName.'_driver'], $container); + } + + /** + * {@inheritDoc} + */ + public function getXsdValidationBasePath() + { + return __DIR__.'/../Resources/config/schema'; + } + + /** + * {@inheritDoc} + */ + public function getNamespace() + { + return 'http://symfony.com/schema/dic/doctrine'; + } + + /** + * {@inheritDoc} + */ + public function getConfiguration(array $config, ContainerBuilder $container) + { + return new Configuration($container->getParameter('kernel.debug')); + } +} diff --git a/vendor/doctrine/doctrine-bundle/DoctrineBundle.php b/vendor/doctrine/doctrine-bundle/DoctrineBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..4a455d133dbb9495f735a659720fe57a469baac1 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/DoctrineBundle.php @@ -0,0 +1,155 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle; + +use Doctrine\Common\Util\ClassUtils; +use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand; +use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand; +use Doctrine\Bundle\DoctrineBundle\Command\Proxy\RunSqlDoctrineCommand; +use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\EntityListenerPass; +use Doctrine\ORM\Proxy\Autoloader; +use Symfony\Component\Console\Application; +use Symfony\Component\DependencyInjection\Compiler\PassConfig; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\IntrospectableContainerInterface; +use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\DoctrineValidationPass; +use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterEventListenersAndSubscribersPass; +use Symfony\Bridge\Doctrine\DependencyInjection\Security\UserProvider\EntityFactory; + +/** + * Bundle. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class DoctrineBundle extends Bundle +{ + private $autoloader; + + /** + * {@inheritDoc} + */ + public function build(ContainerBuilder $container) + { + parent::build($container); + + $container->addCompilerPass(new RegisterEventListenersAndSubscribersPass('doctrine.connections', 'doctrine.dbal.%s_connection.event_manager', 'doctrine'), PassConfig::TYPE_BEFORE_OPTIMIZATION); + + if ($container->hasExtension('security')) { + $container->getExtension('security')->addUserProviderFactory(new EntityFactory('entity', 'doctrine.orm.security.user.provider')); + } + + $container->addCompilerPass(new DoctrineValidationPass('orm')); + $container->addCompilerPass(new EntityListenerPass()); + } + + /** + * {@inheritDoc} + */ + public function boot() + { + // Register an autoloader for proxies to avoid issues when unserializing them + // when the ORM is used. + if ($this->container->hasParameter('doctrine.orm.proxy_namespace')) { + $namespace = $this->container->getParameter('doctrine.orm.proxy_namespace'); + $dir = $this->container->getParameter('doctrine.orm.proxy_dir'); + $proxyGenerator = null; + + if ($this->container->getParameter('doctrine.orm.auto_generate_proxy_classes')) { + // See https://github.com/symfony/symfony/pull/3419 for usage of references + $container = &$this->container; + + $proxyGenerator = function ($proxyDir, $proxyNamespace, $class) use (&$container) { + $originalClassName = ClassUtils::getRealClass($class); + /** @var $registry Registry */ + $registry = $container->get('doctrine'); + + // Tries to auto-generate the proxy file + /** @var $em \Doctrine\ORM\EntityManager */ + foreach ($registry->getManagers() as $em) { + if (!$em->getConfiguration()->getAutoGenerateProxyClasses()) { + continue; + } + + $metadataFactory = $em->getMetadataFactory(); + + if ($metadataFactory->isTransient($originalClassName)) { + continue; + } + + $classMetadata = $metadataFactory->getMetadataFor($originalClassName); + + $em->getProxyFactory()->generateProxyClasses(array($classMetadata)); + + clearstatcache(true, Autoloader::resolveFile($proxyDir, $proxyNamespace, $class)); + + break; + } + }; + } + + $this->autoloader = Autoloader::register($dir, $namespace, $proxyGenerator); + } + } + + /** + * {@inheritDoc} + */ + public function shutdown() + { + if (null !== $this->autoloader) { + spl_autoload_unregister($this->autoloader); + $this->autoloader = null; + } + + // Clear all entity managers to clear references to entities for GC + if ($this->container->hasParameter('doctrine.entity_managers')) { + foreach ($this->container->getParameter('doctrine.entity_managers') as $id) { + if (!$this->container instanceof IntrospectableContainerInterface || $this->container->initialized($id)) { + $this->container->get($id)->clear(); + } + } + } + + // Close all connections to avoid reaching too many connections in the process when booting again later (tests) + if ($this->container->hasParameter('doctrine.connections')) { + foreach ($this->container->getParameter('doctrine.connections') as $id) { + if (!$this->container instanceof IntrospectableContainerInterface || $this->container->initialized($id)) { + $this->container->get($id)->close(); + } + } + } + } + + /** + * {@inheritDoc} + */ + public function registerCommands(Application $application) + { + // Use the default logic when the ORM is available. + // This avoids listing all ORM commands by hand. + if (class_exists('Doctrine\\ORM\\Version')) { + parent::registerCommands($application); + + return; + } + + // Register only the DBAL commands if the ORM is not available. + $application->add(new CreateDatabaseDoctrineCommand()); + $application->add(new DropDatabaseDoctrineCommand()); + $application->add(new RunSqlDoctrineCommand()); + } +} diff --git a/vendor/doctrine/doctrine-bundle/LICENSE b/vendor/doctrine/doctrine-bundle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..655a5ce62af2b970f46edad48c924117127e993a --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2011 Fabien Potencier, Doctrine Project + +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/vendor/doctrine/doctrine-bundle/ManagerConfigurator.php b/vendor/doctrine/doctrine-bundle/ManagerConfigurator.php new file mode 100644 index 0000000000000000000000000000000000000000..86fd1ea96eeef7701e2992a7895a92cb8e3393fc --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/ManagerConfigurator.php @@ -0,0 +1,81 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle; + +use Doctrine\ORM\EntityManager; +use Doctrine\ORM\Query\Filter\SQLFilter; + +/** + * Configurator for an EntityManager + * + * @author Christophe Coevoet + */ +class ManagerConfigurator +{ + private $enabledFilters = array(); + private $filtersParameters = array(); + + public function __construct(array $enabledFilters, array $filtersParameters) + { + $this->enabledFilters = $enabledFilters; + $this->filtersParameters = $filtersParameters; + } + + /** + * Create a connection by name. + * + * @param EntityManager $entityManager + */ + public function configure(EntityManager $entityManager) + { + $this->enableFilters($entityManager); + } + + /** + * Enables filters for a given entity manager + * + * @param EntityManager $entityManager + */ + private function enableFilters(EntityManager $entityManager) + { + if (empty($this->enabledFilters)) { + return; + } + + $filterCollection = $entityManager->getFilters(); + foreach ($this->enabledFilters as $filter) { + $filterObject = $filterCollection->enable($filter); + if (null !== $filterObject) { + $this->setFilterParameters($filter, $filterObject); + } + } + } + + /** + * Sets default parameters for a given filter + * + * @param string $name Filter name + * @param SQLFilter $filter Filter object + */ + private function setFilterParameters($name, SQLFilter $filter) + { + if (!empty($this->filtersParameters[$name])) { + $parameters = $this->filtersParameters[$name]; + foreach ($parameters as $paramName => $paramValue) { + $filter->setParameter($paramName, $paramValue); + } + } + } +} diff --git a/vendor/doctrine/doctrine-bundle/Mapping/ClassMetadataCollection.php b/vendor/doctrine/doctrine-bundle/Mapping/ClassMetadataCollection.php new file mode 100644 index 0000000000000000000000000000000000000000..1f5d6c57c48ff602e5b97a09deeb5c4bb65fca08 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Mapping/ClassMetadataCollection.php @@ -0,0 +1,75 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Mapping; + +/** + * @author Fabien Potencier + */ +class ClassMetadataCollection +{ + private $path; + private $namespace; + private $metadata; + + /** + * Constructor + * + * @param array $metadata + */ + public function __construct(array $metadata) + { + $this->metadata = $metadata; + } + + /** + * @return array + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * @param string $path + */ + public function setPath($path) + { + $this->path = $path; + } + + /** + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * @param string $namespace + */ + public function setNamespace($namespace) + { + $this->namespace = $namespace; + } + + /** + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } +} diff --git a/vendor/doctrine/doctrine-bundle/Mapping/ContainerAwareEntityListenerResolver.php b/vendor/doctrine/doctrine-bundle/Mapping/ContainerAwareEntityListenerResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..f2b571c6ea67f6de74b1df655832f20abeaf22de --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Mapping/ContainerAwareEntityListenerResolver.php @@ -0,0 +1,113 @@ +container = $container; + } + + /** + * {@inheritdoc} + */ + public function clear($className = null) + { + if ($className === null) { + $this->instances = array(); + + return; + } + + $className = $this->normalizeClassName($className); + + if (isset($this->instances[$className])) { + unset($this->instances[$className]); + } + } + + /** + * {@inheritdoc} + */ + public function register($object) + { + if ( ! is_object($object)) { + throw new \InvalidArgumentException(sprintf('An object was expected, but got "%s".', gettype($object))); + } + + $className = $this->normalizeClassName(get_class($object)); + + $this->instances[$className] = $object; + } + + /** + * {@inheritdoc} + */ + public function registerService($className, $serviceId) + { + $this->serviceIds[$this->normalizeClassName($className)] = $serviceId; + } + + /** + * {@inheritdoc} + */ + public function resolve($className) + { + $className = $this->normalizeClassName($className); + + if (!isset($this->instances[$className])) { + if (isset($this->serviceIds[$className])) { + $this->instances[$className] = $this->resolveService($this->serviceIds[$className]); + } else { + $this->instances[$className] = new $className(); + } + } + + return $this->instances[$className]; + } + + /** + * @param string $serviceId + * + * @return object + */ + private function resolveService($serviceId) + { + if (!$this->container->has($serviceId)) { + throw new \RuntimeException(sprintf('There is no service named "%s"', $serviceId)); + } + + return $this->container->get($serviceId); + } + + /** + * @param $className + * + * @return string + */ + private function normalizeClassName($className) + { + return trim($className, '\\'); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Mapping/DisconnectedMetadataFactory.php b/vendor/doctrine/doctrine-bundle/Mapping/DisconnectedMetadataFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..a4df6e4b9ab2172f7dae6ef54d33f175a1f0bf7a --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Mapping/DisconnectedMetadataFactory.php @@ -0,0 +1,216 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Mapping; + +use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\ORM\Mapping\MappingException; +use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; + +/** + * This class provides methods to access Doctrine entity class metadata for a + * given bundle, namespace or entity class, for generation purposes + * + * @author Fabien Potencier + */ +class DisconnectedMetadataFactory +{ + private $registry; + + /** + * Constructor. + * + * @param ManagerRegistry $registry A ManagerRegistry instance + */ + public function __construct(ManagerRegistry $registry) + { + $this->registry = $registry; + } + + /** + * Gets the metadata of all classes of a bundle. + * + * @param BundleInterface $bundle A BundleInterface instance + * + * @return ClassMetadataCollection A ClassMetadataCollection instance + * + * @throws \RuntimeException When bundle does not contain mapped entities + */ + public function getBundleMetadata(BundleInterface $bundle) + { + $namespace = $bundle->getNamespace(); + $metadata = $this->getMetadataForNamespace($namespace); + if (!$metadata->getMetadata()) { + throw new \RuntimeException(sprintf('Bundle "%s" does not contain any mapped entities.', $bundle->getName())); + } + + $path = $this->getBasePathForClass($bundle->getName(), $bundle->getNamespace(), $bundle->getPath()); + + $metadata->setPath($path); + $metadata->setNamespace($bundle->getNamespace()); + + return $metadata; + } + + /** + * Gets the metadata of a class. + * + * @param string $class A class name + * @param string $path The path where the class is stored (if known) + * + * @return ClassMetadataCollection A ClassMetadataCollection instance + * + * @throws MappingException When class is not valid entity or mapped superclass + */ + public function getClassMetadata($class, $path = null) + { + $metadata = $this->getMetadataForClass($class); + if (!$metadata->getMetadata()) { + throw MappingException::classIsNotAValidEntityOrMappedSuperClass($class); + } + + $this->findNamespaceAndPathForMetadata($metadata, $path); + + return $metadata; + } + + /** + * Gets the metadata of all classes of a namespace. + * + * @param string $namespace A namespace name + * @param string $path The path where the class is stored (if known) + * + * @return ClassMetadataCollection A ClassMetadataCollection instance + * + * @throws \RuntimeException When namespace not contain mapped entities + */ + public function getNamespaceMetadata($namespace, $path = null) + { + $metadata = $this->getMetadataForNamespace($namespace); + if (!$metadata->getMetadata()) { + throw new \RuntimeException(sprintf('Namespace "%s" does not contain any mapped entities.', $namespace)); + } + + $this->findNamespaceAndPathForMetadata($metadata, $path); + + return $metadata; + } + + /** + * Find and configure path and namespace for the metadata collection. + * + * @param ClassMetadataCollection $metadata + * @param string|null $path + * + * @throws \RuntimeException When unable to determine the path + */ + public function findNamespaceAndPathForMetadata(ClassMetadataCollection $metadata, $path = null) + { + $all = $metadata->getMetadata(); + if (class_exists($all[0]->name)) { + $r = new \ReflectionClass($all[0]->name); + $path = $this->getBasePathForClass($r->getName(), $r->getNamespaceName(), dirname($r->getFilename())); + $ns = $r->getNamespaceName(); + + } elseif ($path) { + // Get namespace by removing the last component of the FQCN + $nsParts = explode('\\', $all[0]->name); + array_pop($nsParts); + $ns = implode('\\', $nsParts); + + } else { + throw new \RuntimeException(sprintf('Unable to determine where to save the "%s" class (use the --path option).', $all[0]->name)); + } + + $metadata->setPath($path); + $metadata->setNamespace($ns); + } + + /** + * Get a base path for a class + * + * @param string $name class name + * @param string $namespace class namespace + * @param string $path class path + * + * @return string + * @throws \RuntimeException When base path not found + */ + private function getBasePathForClass($name, $namespace, $path) + { + $namespace = str_replace('\\', '/', $namespace); + $search = str_replace('\\', '/', $path); + $destination = str_replace('/'.$namespace, '', $search, $c); + + if ($c != 1) { + throw new \RuntimeException(sprintf('Can\'t find base path for "%s" (path: "%s", destination: "%s").', $name, $path, $destination)); + } + + return $destination; + } + + /** + * @param string $namespace + * + * @return ClassMetadataCollection + */ + private function getMetadataForNamespace($namespace) + { + $metadata = array(); + foreach ($this->getAllMetadata() as $m) { + if (strpos($m->name, $namespace) === 0) { + $metadata[] = $m; + } + } + + return new ClassMetadataCollection($metadata); + } + + /** + * @param string $entity + * + * @return ClassMetadataCollection + */ + private function getMetadataForClass($entity) + { + foreach ($this->registry->getManagers() as $em) { + $cmf = new DisconnectedClassMetadataFactory(); + $cmf->setEntityManager($em); + + if (!$cmf->isTransient($entity)) { + return new ClassMetadataCollection(array($cmf->getMetadataFor($entity))); + } + } + + return new ClassMetadataCollection(array()); + } + + /** + * @return array + */ + private function getAllMetadata() + { + $metadata = array(); + foreach ($this->registry->getManagers() as $em) { + $cmf = new DisconnectedClassMetadataFactory(); + $cmf->setEntityManager($em); + foreach ($cmf->getAllMetadata() as $m) { + $metadata[] = $m; + } + } + + return $metadata; + } +} diff --git a/vendor/doctrine/doctrine-bundle/Mapping/EntityListenerServiceResolver.php b/vendor/doctrine/doctrine-bundle/Mapping/EntityListenerServiceResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..3cb4960cde73e33ea208edf659e3ea8ce2bf37e2 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Mapping/EntityListenerServiceResolver.php @@ -0,0 +1,14 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Bridge\Doctrine\RegistryInterface; +use Symfony\Bridge\Doctrine\ManagerRegistry; +use Doctrine\ORM\ORMException; +use Doctrine\ORM\EntityManager; + +/** + * References all Doctrine connections and entity managers in a given Container. + * + * @author Fabien Potencier + */ +class Registry extends ManagerRegistry implements RegistryInterface +{ + /** + * Construct. + * + * @param ContainerInterface $container + * @param array $connections + * @param array $entityManagers + * @param string $defaultConnection + * @param string $defaultEntityManager + */ + public function __construct(ContainerInterface $container, array $connections, array $entityManagers, $defaultConnection, $defaultEntityManager) + { + $this->setContainer($container); + + parent::__construct('ORM', $connections, $entityManagers, $defaultConnection, $defaultEntityManager, 'Doctrine\ORM\Proxy\Proxy'); + } + + /** + * Gets the default entity manager name. + * + * @return string The default entity manager name + * + * @deprecated + */ + public function getDefaultEntityManagerName() + { + @trigger_error('getDefaultEntityManagerName is deprecated since Symfony 2.1. Use getDefaultManagerName instead', E_USER_DEPRECATED); + + return $this->getDefaultManagerName(); + } + + /** + * Gets a named entity manager. + * + * @param string $name The entity manager name (null for the default one) + * + * @return EntityManager + * + * @deprecated + */ + public function getEntityManager($name = null) + { + @trigger_error('getEntityManager is deprecated since Symfony 2.1. Use getManager instead', E_USER_DEPRECATED); + + return $this->getManager($name); + } + + /** + * Gets an array of all registered entity managers + * + * @return EntityManager[] an array of all EntityManager instances + * + * @deprecated + */ + public function getEntityManagers() + { + @trigger_error('getEntityManagers is deprecated since Symfony 2.1. Use getManagers instead', E_USER_DEPRECATED); + + return $this->getManagers(); + } + + /** + * Resets a named entity manager. + * + * This method is useful when an entity manager has been closed + * because of a rollbacked transaction AND when you think that + * it makes sense to get a new one to replace the closed one. + * + * Be warned that you will get a brand new entity manager as + * the existing one is not usable anymore. This means that any + * other object with a dependency on this entity manager will + * hold an obsolete reference. You can inject the registry instead + * to avoid this problem. + * + * @param string $name The entity manager name (null for the default one) + * + * @return EntityManager + * + * @deprecated + */ + public function resetEntityManager($name = null) + { + @trigger_error('resetEntityManager is deprecated since Symfony 2.1. Use resetManager instead', E_USER_DEPRECATED); + + $this->resetManager($name); + } + + /** + * Resolves a registered namespace alias to the full namespace. + * + * This method looks for the alias in all registered entity managers. + * + * @param string $alias The alias + * + * @return string The full namespace + * + * @deprecated + */ + public function getEntityNamespace($alias) + { + @trigger_error('getEntityNamespace is deprecated since Symfony 2.1. Use getAliasNamespace instead', E_USER_DEPRECATED); + + return $this->getAliasNamespace($alias); + } + + /** + * Resolves a registered namespace alias to the full namespace. + * + * This method looks for the alias in all registered entity managers. + * + * @param string $alias The alias + * + * @return string The full namespace + * + * @see Configuration::getEntityNamespace + */ + public function getAliasNamespace($alias) + { + foreach (array_keys($this->getManagers()) as $name) { + try { + return $this->getManager($name)->getConfiguration()->getEntityNamespace($alias); + } catch (ORMException $e) { + } + } + + throw ORMException::unknownEntityNamespace($alias); + } + + /** + * Gets all connection names. + * + * @return array An array of connection names + * + * @deprecated + */ + public function getEntityManagerNames() + { + @trigger_error('getEntityManagerNames is deprecated since Symfony 2.1. Use getManagerNames instead', E_USER_DEPRECATED); + + return $this->getManagerNames(); + } + + /** + * Gets the entity manager associated with a given class. + * + * @param string $class A Doctrine Entity class name + * + * @return EntityManager|null + * + * @deprecated + */ + public function getEntityManagerForClass($class) + { + @trigger_error('getEntityManagerForClass is deprecated since Symfony 2.1. Use getManagerForClass instead', E_USER_DEPRECATED); + + return $this->getManagerForClass($class); + } +} diff --git a/vendor/doctrine/doctrine-bundle/Resources/config/dbal.xml b/vendor/doctrine/doctrine-bundle/Resources/config/dbal.xml new file mode 100644 index 0000000000000000000000000000000000000000..66c6f3d764d82e745c5b18f38483a578ae3a5206 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Resources/config/dbal.xml @@ -0,0 +1,67 @@ + + + + + + Doctrine\DBAL\Logging\LoggerChain + Doctrine\DBAL\Logging\DebugStack + Symfony\Bridge\Doctrine\Logger\DbalLogger + Doctrine\DBAL\Configuration + Doctrine\Bundle\DoctrineBundle\DataCollector\DoctrineDataCollector + Symfony\Bridge\Doctrine\ContainerAwareEventManager + Doctrine\Bundle\DoctrineBundle\ConnectionFactory + Doctrine\DBAL\Event\Listeners\MysqlSessionInit + Doctrine\DBAL\Event\Listeners\OracleSessionInit + Doctrine\Bundle\DoctrineBundle\Registry + + + + + + + + + + + + + + + + + + + + + + + + + + %doctrine.dbal.connection_factory.types% + + + + + + + + + + + + + %doctrine.connections% + %doctrine.entity_managers% + %doctrine.default_connection% + %doctrine.default_entity_manager% + + + + + + + + diff --git a/vendor/doctrine/doctrine-bundle/Resources/config/orm.xml b/vendor/doctrine/doctrine-bundle/Resources/config/orm.xml new file mode 100644 index 0000000000000000000000000000000000000000..5a20c53691cb843d681f6a8f89726c878ee91e70 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Resources/config/orm.xml @@ -0,0 +1,133 @@ + + + + + + Doctrine\ORM\Configuration + Doctrine\ORM\EntityManager + Doctrine\Bundle\DoctrineBundle\ManagerConfigurator + + + Doctrine\Common\Cache\ArrayCache + Doctrine\Common\Cache\ApcCache + Doctrine\Common\Cache\MemcacheCache + localhost + 11211 + Memcache + Doctrine\Common\Cache\MemcachedCache + localhost + 11211 + Memcached + Doctrine\Common\Cache\RedisCache + localhost + 6379 + Redis + Doctrine\Common\Cache\XcacheCache + Doctrine\Common\Cache\WinCacheCache + Doctrine\Common\Cache\ZendDataCache + + + Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain + Doctrine\ORM\Mapping\Driver\AnnotationDriver + Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver + Doctrine\ORM\Mapping\Driver\SimplifiedYamlDriver + Doctrine\ORM\Mapping\Driver\PHPDriver + Doctrine\ORM\Mapping\Driver\StaticPHPDriver + + + Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer + + + Symfony\Bridge\Doctrine\Form\DoctrineOrmTypeGuesser + + + Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator + Symfony\Bridge\Doctrine\Validator\DoctrineInitializer + + + Symfony\Bridge\Doctrine\Security\User\EntityUserProvider + + + Doctrine\ORM\Tools\ResolveTargetEntityListener + Doctrine\ORM\Tools\AttachEntityListenersListener + + + Doctrine\ORM\Mapping\DefaultNamingStrategy + Doctrine\ORM\Mapping\UnderscoreNamingStrategy + + + Doctrine\ORM\Mapping\DefaultQuoteStrategy + Doctrine\ORM\Mapping\AnsiQuoteStrategy + + + Doctrine\Bundle\DoctrineBundle\Mapping\ContainerAwareEntityListenerResolver + + + Doctrine\ORM\Cache\DefaultCacheFactory + Doctrine\ORM\Cache\Region\DefaultRegion + Doctrine\ORM\Cache\Region\FileLockRegion + Doctrine\ORM\Cache\Logging\CacheLoggerChain + Doctrine\ORM\Cache\Logging\StatisticsCacheLogger + Doctrine\ORM\Cache\CacheConfiguration + Doctrine\ORM\Cache\RegionsConfiguration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/doctrine/doctrine-bundle/Resources/config/schema/doctrine-1.0.xsd b/vendor/doctrine/doctrine-bundle/Resources/config/schema/doctrine-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..5a939d723ce0e1fd1ccf5064713e2168bec971aa --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Resources/config/schema/doctrine-1.0.xsd @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/doctrine/doctrine-bundle/Resources/views/Collector/db.html.twig b/vendor/doctrine/doctrine-bundle/Resources/views/Collector/db.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..c12616281f8417b281308d83fa6ecadd70cd9f54 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Resources/views/Collector/db.html.twig @@ -0,0 +1,465 @@ +{% extends app.request.isXmlHttpRequest ? '@WebProfiler/Profiler/ajax_layout.html.twig' : '@WebProfiler/Profiler/layout.html.twig' %} + +{% block toolbar %} + {% if collector.querycount > 0 or collector.invalidEntityCount > 0 %} + + {% set profiler_markup_version = profiler_markup_version|default(1) %} + + {% set icon %} + {% if profiler_markup_version == 1 %} + + Database + {{ collector.querycount }} + {% if collector.querycount > 0 %} + in {{ '%0.2f'|format(collector.time * 1000) }} ms + {% endif %} + {% if collector.invalidEntityCount > 0 %} + {{ collector.invalidEntityCount }} + {% endif %} + + {% else %} + + {% set status = collector.invalidEntityCount > 0 ? 'red' : collector.querycount > 50 ? 'yellow' %} + + {{ include('@Doctrine/Collector/icon.svg') }} + + {% if collector.querycount == 0 and collector.invalidEntityCount > 0 %} + {{ collector.invalidEntityCount }} + errors + {% else %} + {{ collector.querycount }} + + in + {{ '%0.2f'|format(collector.time * 1000) }} + ms + + {% endif %} + + {% endif %} + {% endset %} + + {% set text %} +
+ Database Queries + {{ collector.querycount }} +
+
+ Query time + {{ '%0.2f'|format(collector.time * 1000) }} ms +
+
+ Invalid entities + {{ collector.invalidEntityCount }} +
+ {% if collector.cacheEnabled %} +
+ Cache hits + {{ collector.cacheHitsCount }} +
+
+ Cache misses + {{ collector.cacheMissesCount }} +
+
+ Cache puts + {{ collector.cachePutsCount }} +
+ {% else %} +
+ Second Level Cache + disabled +
+ {% endif %} + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status|default('') }) }} + + {% endif %} +{% endblock %} + +{% block menu %} + {% set profiler_markup_version = profiler_markup_version|default(1) %} + + {% if profiler_markup_version == 1 %} + + + + Doctrine + + {{ collector.querycount }} + {{ '%0.0f'|format(collector.time * 1000) }} ms + + + + {% else %} + + + {{ include('@Doctrine/Collector/icon.svg') }} + Doctrine + {% if collector.invalidEntityCount %} + + {{ collector.invalidEntityCount }} + + {% endif %} + + + {% endif %} +{% endblock %} + +{% block panel %} + {% set profiler_markup_version = profiler_markup_version|default(1) %} + + {% if 'explain' == page %} + {{ render(controller('DoctrineBundle:Profiler:explain', { + token: token, + panel: 'db', + connectionName: app.request.query.get('connection'), + query: app.request.query.get('query') + })) }} + {% else %} + {{ block('queries') }} + {% endif %} +{% endblock %} + +{% block queries %} + + + {% if profiler_markup_version > 1 %} +

Query Metrics

+ +
+
+ {{ collector.querycount }} + Database Queries +
+ +
+ {{ collector.groupedQueryCount }} + Different statements +
+ +
+ {{ '%0.2f'|format(collector.time * 1000) }} ms + Query time +
+ +
+ {{ collector.invalidEntityCount }} + Invalid entities +
+ + {% if collector.cacheEnabled %} +
+ {{ collector.cacheHitsCount }} + Cache hits +
+
+ {{ collector.cacheMissesCount }} + Cache misses +
+
+ {{ collector.cachePutsCount }} + Cache puts +
+ {% endif %} +
+ {% endif %} + + {% set group_queries = request.query.getBoolean('group') %} + {% if group_queries %} +

Grouped Statements

+

Show all queries

+ {% else %} +

Queries

+

Group similar statements

+ {% endif %} + + {% for connection, queries in collector.queries %} + {% if collector.connections|length > 1 %} +

{{ connection }} connection

+ {% endif %} + + {% if queries is empty %} +
+

No database queries were performed.

+
+ {% else %} + {% if group_queries %} + {% set queries = collector.groupedQueries[connection] %} + {% endif %} + + + + {% if group_queries %} + + + {% else %} + + + {% endif %} + + + + + {% for i, query in queries %} + {% set i = group_queries ? query.index : i %} + + {% if group_queries %} + + + {% else %} + + + {% endif %} + + + {% endfor %} + +
TimeCount#TimeInfo
+ + {{ '%0.2f'|format(query.executionMS * 1000) }} ms
({{ '%0.2f'|format(query.executionPercent) }}%)
+
{{ query.count }}{{ loop.index }}{{ '%0.2f'|format(query.executionMS * 1000) }} ms + {{ query.sql|doctrine_pretty_query(highlight_only = true) }} + +
+ Parameters: {{ profiler_dump(query.params) }} +
+ +
+ View formatted query + +    + + View runnable query + + {% if query.explainable %} +    + Explain query + {% endif %} +
+ + + + + + {% if query.explainable %} +
+ {% endif %} +
+ {% endif %} + {% endfor %} + +

Database Connections

+ + {% if not collector.connections %} +
+

There are no configured database connections.

+
+ {% else %} + {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.connections, labels: ['Name', 'Service'] }, with_context = false ) }} + {% endif %} + +

Entity Managers

+ + {% if not collector.managers %} +
+

There are no configured entity managers.

+
+ {% else %} + {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.managers, labels: ['Name', 'Service'] }, with_context = false ) }} + {% endif %} + +

Second Level Cache

+ + {% if not collector.cacheEnabled %} +
+

Second Level Cache is not enabled.

+
+ {% else %} + {% if not collector.cacheCounts %} +
+

Second level cache information is not available.

+
+ {% else %} + {% if profiler_markup_version == 1 %} + {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.cacheCounts }, with_context = false) }} + {% else %} +
+
+ {{ collector.cacheCounts.hits }} + Hits +
+ +
+ {{ collector.cacheCounts.misses }} + Misses +
+ +
+ {{ collector.cacheCounts.puts }} + Puts +
+
+ {% endif %} + + {% if collector.cacheRegions.hits %} +

Number of cache hits

+ {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.cacheRegions.hits }, with_context = false) }} + {% endif %} + + {% if collector.cacheRegions.misses %} +

Number of cache misses

+ {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.cacheRegions.misses }, with_context = false) }} + {% endif %} + + {% if collector.cacheRegions.puts %} +

Number of cache puts

+ {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.cacheRegions.puts }, with_context = false) }} + {% endif %} + {% endif %} + {% endif %} + +

Entities Mapping

+ + {% for manager, classes in collector.entities %} + {% if collector.managers|length > 1 %} +

{{ manager }} entity manager

+ {% endif %} + + {% if classes is empty %} +
+

No loaded entities.

+
+ {% else %} + + + + + + + + + {% for class in classes %} + {% set contains_errors = collector.mappingErrors[manager] is defined and collector.mappingErrors[manager][class] is defined %} + + + + + {% endfor %} + +
ClassMapping errors
{{ class }} + {% if contains_errors %} +
    + {% for error in collector.mappingErrors[manager][class] %} +
  • {{ error }}
  • + {% endfor %} +
+ {% else %} + No errors. + {% endif %} +
+ {% endif %} + {% endfor %} + + +{% endblock %} diff --git a/vendor/doctrine/doctrine-bundle/Resources/views/Collector/explain.html.twig b/vendor/doctrine/doctrine-bundle/Resources/views/Collector/explain.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..3b2dd7f515d496837bb68369878f81a1a3fc3fef --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Resources/views/Collector/explain.html.twig @@ -0,0 +1,28 @@ +{% if data[0]|length > 1 %} + {# The platform returns a table for the explanation (e.g. MySQL), display all columns #} + + + + {% for label in data[0]|keys %} + + {% endfor %} + + + + {% for row in data %} + + {% for key, item in row %} + + {% endfor %} + + {% endfor %} + +
{{ label }}
{{ item|replace({',': ', '}) }}
+{% else %} + {# The Platform returns a single column for a textual explanation (e.g. PostgreSQL), display all lines #} +
+        {%- for row in data -%}
+            {{ row|first }}{{ "\n" }}
+        {%- endfor -%}
+    
+{% endif %} diff --git a/vendor/doctrine/doctrine-bundle/Resources/views/Collector/icon.svg b/vendor/doctrine/doctrine-bundle/Resources/views/Collector/icon.svg new file mode 100644 index 0000000000000000000000000000000000000000..299fbac43ebc195fb2c74fc78cfaca86811b0671 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Resources/views/Collector/icon.svg @@ -0,0 +1,4 @@ + + + diff --git a/vendor/doctrine/doctrine-bundle/Twig/DoctrineExtension.php b/vendor/doctrine/doctrine-bundle/Twig/DoctrineExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..5ae506a7eac8e28f9ad7f250c147d1a92ae32766 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/Twig/DoctrineExtension.php @@ -0,0 +1,360 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineBundle\Twig; + +/** + * This class contains the needed functions in order to do the query highlighting + * + * @author Florin Patan + * @author Christophe Coevoet + */ +class DoctrineExtension extends \Twig_Extension +{ + /** + * Number of maximum characters that one single line can hold in the interface + * + * @var int + */ + private $maxCharWidth = 100; + + /** + * Define our functions + * + * @return \Twig_SimpleFilter[] + */ + public function getFilters() + { + return array( + new \Twig_SimpleFilter('doctrine_minify_query', array($this, 'minifyQuery'), array('deprecated' => true)), + new \Twig_SimpleFilter('doctrine_pretty_query', array($this, 'formatQuery'), array('is_safe' => array('html'))), + new \Twig_SimpleFilter('doctrine_replace_query_parameters', array($this, 'replaceQueryParameters')), + ); + } + + /** + * Get the possible combinations of elements from the given array + * + * @param array $elements + * @param integer $combinationsLevel + * + * @return array + */ + private function getPossibleCombinations(array $elements, $combinationsLevel) + { + $baseCount = count($elements); + $result = array(); + + if (1 === $combinationsLevel) { + foreach ($elements as $element) { + $result[] = array($element); + } + + return $result; + } + + $nextLevelElements = $this->getPossibleCombinations($elements, $combinationsLevel - 1); + + foreach ($nextLevelElements as $nextLevelElement) { + $lastElement = $nextLevelElement[$combinationsLevel - 2]; + $found = false; + + foreach ($elements as $key => $element) { + if ($element == $lastElement) { + $found = true; + continue; + } + + if ($found == true && $key < $baseCount) { + $tmp = $nextLevelElement; + $newCombination = array_slice($tmp, 0); + $newCombination[] = $element; + $result[] = array_slice($newCombination, 0); + } + } + } + + return $result; + } + + /** + * Shrink the values of parameters from a combination + * + * @param array $parameters + * @param array $combination + * + * @return string + */ + private function shrinkParameters(array $parameters, array $combination) + { + array_shift($parameters); + $result = ''; + + $maxLength = $this->maxCharWidth; + $maxLength -= count($parameters) * 5; + $maxLength = $maxLength / count($parameters); + + foreach ($parameters as $key => $value) { + $isLarger = false; + + if (strlen($value) > $maxLength) { + $value = wordwrap($value, $maxLength, "\n", true); + $value = explode("\n", $value); + $value = $value[0]; + + $isLarger = true; + } + $value = self::escapeFunction($value); + + if (!is_numeric($value)) { + $value = substr($value, 1, -1); + } + + if ($isLarger) { + $value .= ' [...]'; + } + + $result .= ' '.$combination[$key].' '.$value; + } + + return trim($result); + } + + /** + * Attempt to compose the best scenario minified query so that a user could find it without expanding it + * + * @param string $query + * @param array $keywords + * @param integer $required + * + * @return string + */ + private function composeMiniQuery($query, array $keywords, $required) + { + // Extract the mandatory keywords and consider the rest as optional keywords + $mandatoryKeywords = array_splice($keywords, 0, $required); + + $combinations = array(); + $combinationsCount = count($keywords); + + // Compute all the possible combinations of keywords to match the query for + while ($combinationsCount > 0) { + $combinations = array_merge($combinations, $this->getPossibleCombinations($keywords, $combinationsCount)); + $combinationsCount--; + } + + // Try and match the best case query pattern + foreach ($combinations as $combination) { + $combination = array_merge($mandatoryKeywords, $combination); + + $regexp = implode('(.*) ', $combination).' (.*)'; + $regexp = '/^'.$regexp.'/is'; + + if (preg_match($regexp, $query, $matches)) { + $result = $this->shrinkParameters($matches, $combination); + + return $result; + } + } + + // Try and match the simplest query form that contains only the mandatory keywords + $regexp = implode(' (.*)', $mandatoryKeywords).' (.*)'; + $regexp = '/^'.$regexp.'/is'; + + if (preg_match($regexp, $query, $matches)) { + $result = $this->shrinkParameters($matches, $mandatoryKeywords); + + return $result; + } + + // Fallback in case we didn't managed to find any good match (can we actually have that happen?!) + $result = substr($query, 0, $this->maxCharWidth); + + return $result; + } + + /** + * Minify the query + * + * @param string $query + * + * @return string + */ + public function minifyQuery($query) + { + $result = ''; + $keywords = array(); + $required = 1; + + // Check if we can match the query against any of the major types + switch (true) { + case stripos($query, 'SELECT') !== false: + $keywords = array('SELECT', 'FROM', 'WHERE', 'HAVING', 'ORDER BY', 'LIMIT'); + $required = 2; + break; + + case stripos($query, 'DELETE') !== false: + $keywords = array('DELETE', 'FROM', 'WHERE', 'ORDER BY', 'LIMIT'); + $required = 2; + break; + + case stripos($query, 'UPDATE') !== false: + $keywords = array('UPDATE', 'SET', 'WHERE', 'ORDER BY', 'LIMIT'); + $required = 2; + break; + + case stripos($query, 'INSERT') !== false: + $keywords = array('INSERT', 'INTO', 'VALUE', 'VALUES'); + $required = 2; + break; + + // If there's no match so far just truncate it to the maximum allowed by the interface + default: + $result = substr($query, 0, $this->maxCharWidth); + } + + // If we had a match then we should minify it + if ($result == '') { + $result = $this->composeMiniQuery($query, $keywords, $required); + } + + return $result; + } + + /** + * Escape parameters of a SQL query + * DON'T USE THIS FUNCTION OUTSIDE ITS INTENDED SCOPE + * + * @internal + * + * @param mixed $parameter + * + * @return string + */ + public static function escapeFunction($parameter) + { + $result = $parameter; + + switch (true) { + // Check if result is non-unicode string using PCRE_UTF8 modifier + case is_string($result) && !preg_match('//u', $result): + $result = '0x'. strtoupper(bin2hex($result)); + break; + + case is_string($result): + $result = "'".addslashes($result)."'"; + break; + + case is_array($result): + foreach ($result as &$value) { + $value = static::escapeFunction($value); + } + + $result = implode(', ', $result); + break; + + case is_object($result): + $result = addslashes((string) $result); + break; + + case null === $result: + $result = 'NULL'; + break; + + case is_bool($result): + $result = $result ? '1' : '0'; + break; + } + + return $result; + } + + /** + * Return a query with the parameters replaced + * + * @param string $query + * @param array $parameters + * + * @return string + */ + public function replaceQueryParameters($query, array $parameters) + { + $i = 0; + + if (!array_key_exists(0, $parameters) && array_key_exists(1, $parameters)) { + $i = 1; + } + + $result = preg_replace_callback( + '/\?|((?([^"]*+)<\/pre>/Us', '\1', $html); + } else { + $html = \SqlFormatter::format($sql); + $html = preg_replace('/
([^"]*+)<\/pre>/Us', '
\2
', $html); + } + + return $html; + } + + /** + * Get the name of the extension + * + * @return string + */ + public function getName() + { + return 'doctrine_extension'; + } +} diff --git a/vendor/doctrine/doctrine-bundle/composer.json b/vendor/doctrine/doctrine-bundle/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..2827ba0bba1c602357d5e90dc18c7fe4e63f7377 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/composer.json @@ -0,0 +1,58 @@ +{ + "name": "doctrine/doctrine-bundle", + "type": "symfony-bundle", + "description": "Symfony DoctrineBundle", + "keywords": ["DBAL", "ORM", "Database", "Persistence"], + "homepage": "http://www.doctrine-project.org", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org/" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/framework-bundle": "~2.7|~3.0", + "symfony/console": "~2.7|~3.0", + "symfony/dependency-injection": "~2.7|~3.0", + "doctrine/dbal": "~2.3", + "jdorn/sql-formatter": "~1.1", + "symfony/doctrine-bridge": "~2.7|~3.0", + "doctrine/doctrine-cache-bundle": "~1.0" + }, + "require-dev": { + "doctrine/orm": "~2.3", + "symfony/yaml": "~2.7|~3.0", + "symfony/validator": "~2.7|~3.0", + "symfony/property-info": "~2.8|~3.0", + "symfony/phpunit-bridge": "~2.7|~3.0", + "twig/twig": "~1.10|~2.0", + "satooshi/php-coveralls": "^1.0", + "phpunit/phpunit": "~4" + }, + "suggest": { + "symfony/web-profiler-bundle": "To use the data collector.", + "doctrine/orm": "The Doctrine ORM integration is optional in the bundle." + }, + "autoload": { + "psr-4": { "Doctrine\\Bundle\\DoctrineBundle\\": "" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + } +} diff --git a/vendor/doctrine/doctrine-bundle/phpunit.xml.dist b/vendor/doctrine/doctrine-bundle/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..963871524b6c5e3d09f88b19d71a2437cb2075d9 --- /dev/null +++ b/vendor/doctrine/doctrine-bundle/phpunit.xml.dist @@ -0,0 +1,20 @@ + + + + + + ./Tests + + + + + + . + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/.coveralls.yml b/vendor/doctrine/doctrine-cache-bundle/.coveralls.yml new file mode 100644 index 0000000000000000000000000000000000000000..67bd5dd013a39f84a30f5c561feee94df76b415b --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/.coveralls.yml @@ -0,0 +1,4 @@ +# for php-coveralls +service_name: travis-ci +src_dir: ./ +coverage_clover: build/logs/clover.xml diff --git a/vendor/doctrine/doctrine-cache-bundle/.travis.yml b/vendor/doctrine/doctrine-cache-bundle/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..260db2f320c65bb0a9bb636ca3820ec9f5a5f978 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/.travis.yml @@ -0,0 +1,35 @@ +language: php +sudo: false + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm + +services: + - riak + - mongodb + - memcached + - redis-server + +before_script: + - ./Tests/travis/install-deps.sh + - composer self-update + - if [ "$DEPS" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; + - composer update --prefer-source + +script: + - ./vendor/bin/phpunit -v --coverage-clover ./build/logs/clover.xml + - ./vendor/bin/phpcs -np --extensions=php --ignore=vendor/*,Tests/* --standard=ruleset.xml . + +after_script: + - php ./vendor/bin/coveralls -v + +matrix: + allow_failures: + - php: hhvm + include: + - php: 5.6 + env: DEPS="dev" diff --git a/vendor/doctrine/doctrine-cache-bundle/Acl/Model/AclCache.php b/vendor/doctrine/doctrine-cache-bundle/Acl/Model/AclCache.php new file mode 100644 index 0000000000000000000000000000000000000000..d681af04cd335e5c421ace779a1ba3cae304c154 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Acl/Model/AclCache.php @@ -0,0 +1,239 @@ + + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class AclCache implements AclCacheInterface +{ + /** + * @var \Doctrine\Common\Cache\CacheProvider + */ + private $cache; + + /** + * @var \Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface + */ + private $permissionGrantingStrategy; + + /** + * Constructor + * + * @param \Doctrine\Common\Cache\CacheProvider $cache + * @param \Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface $permissionGrantingStrategy + */ + public function __construct(CacheProvider $cache, PermissionGrantingStrategyInterface $permissionGrantingStrategy) + { + $this->cache = $cache; + $this->permissionGrantingStrategy = $permissionGrantingStrategy; + } + + /** + * {@inheritdoc} + */ + public function evictFromCacheById($primaryKey) + { + if ( ! $this->cache->contains($primaryKey)) { + return; + } + + $key = $this->cache->fetch($primaryKey); + + $this->cache->delete($primaryKey); + $this->evictFromCacheByKey($key); + } + + /** + * {@inheritdoc} + */ + public function evictFromCacheByIdentity(ObjectIdentityInterface $oid) + { + $key = $this->createKeyFromIdentity($oid); + + $this->evictFromCacheByKey($key); + } + + /** + * {@inheritdoc} + */ + public function getFromCacheById($primaryKey) + { + if ( ! $this->cache->contains($primaryKey)) { + return null; + } + + $key = $this->cache->fetch($primaryKey); + $acl = $this->getFromCacheByKey($key); + + if ( ! $acl) { + $this->cache->delete($primaryKey); + + return null; + } + + return $acl; + } + + /** + * {@inheritdoc} + */ + public function getFromCacheByIdentity(ObjectIdentityInterface $oid) + { + $key = $this->createKeyFromIdentity($oid); + + return $this->getFromCacheByKey($key); + } + + /** + * {@inheritdoc} + */ + public function putInCache(AclInterface $acl) + { + if (null === $acl->getId()) { + throw new \InvalidArgumentException('Transient ACLs cannot be cached.'); + } + + $parentAcl = $acl->getParentAcl(); + + if (null !== $parentAcl) { + $this->putInCache($parentAcl); + } + + $key = $this->createKeyFromIdentity($acl->getObjectIdentity()); + + $this->cache->save($key, serialize($acl)); + $this->cache->save($acl->getId(), $key); + } + + /** + * {@inheritdoc} + */ + public function clearCache() + { + return $this->cache->deleteAll(); + } + + /** + * Unserialize a given ACL. + * + * @param string $serialized + * + * @return \Symfony\Component\Security\Acl\Model\AclInterface + */ + private function unserializeAcl($serialized) + { + $acl = unserialize($serialized); + $parentId = $acl->getParentAcl(); + + if (null !== $parentId) { + $parentAcl = $this->getFromCacheById($parentId); + + if (null === $parentAcl) { + return null; + } + + $acl->setParentAcl($parentAcl); + } + + $reflectionProperty = new \ReflectionProperty($acl, 'permissionGrantingStrategy'); + + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($acl, $this->permissionGrantingStrategy); + $reflectionProperty->setAccessible(false); + + $aceAclProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Entry', 'acl'); + + $aceAclProperty->setAccessible(true); + + foreach ($acl->getObjectAces() as $ace) { + $aceAclProperty->setValue($ace, $acl); + } + + foreach ($acl->getClassAces() as $ace) { + $aceAclProperty->setValue($ace, $acl); + } + + $aceClassFieldProperty = new \ReflectionProperty($acl, 'classFieldAces'); + + $aceClassFieldProperty->setAccessible(true); + + foreach ($aceClassFieldProperty->getValue($acl) as $aces) { + foreach ($aces as $ace) { + $aceAclProperty->setValue($ace, $acl); + } + } + + $aceClassFieldProperty->setAccessible(false); + + $aceObjectFieldProperty = new \ReflectionProperty($acl, 'objectFieldAces'); + + $aceObjectFieldProperty->setAccessible(true); + + foreach ($aceObjectFieldProperty->getValue($acl) as $aces) { + foreach ($aces as $ace) { + $aceAclProperty->setValue($ace, $acl); + } + } + + $aceObjectFieldProperty->setAccessible(false); + + $aceAclProperty->setAccessible(false); + + return $acl; + } + + /** + * Returns the key for the object identity + * + * @param \Symfony\Component\Security\Acl\Model\ObjectIdentityInterface $oid + * + * @return string + */ + private function createKeyFromIdentity(ObjectIdentityInterface $oid) + { + return $oid->getType() . '_' . $oid->getIdentifier(); + } + + /** + * Removes an ACL from the cache + * + * @param string $key + */ + private function evictFromCacheByKey($key) + { + if ( ! $this->cache->contains($key)) { + return; + } + + $this->cache->delete($key); + } + + /** + * Retrieves an ACL for the given key from the cache + * + * @param string $key + * + * @return null|\Symfony\Component\Security\Acl\Model\AclInterface + */ + private function getFromCacheByKey($key) + { + if ( ! $this->cache->contains($key)) { + return null; + } + + $serialized = $this->cache->fetch($key); + + return $this->unserializeAcl($serialized); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Command/CacheCommand.php b/vendor/doctrine/doctrine-cache-bundle/Command/CacheCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..3400e427a808dd8eb454fc8f4081b54af6fc87ea --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Command/CacheCommand.php @@ -0,0 +1,65 @@ + + */ +abstract class CacheCommand extends Command implements ContainerAwareInterface +{ + /** + * @var ContainerInterface + */ + private $container; + + /** + * Get the requested cache provider service. + * + * @param string $cacheName + * + * @return \Doctrine\Common\Cache\Cache + * + * @throws \InvalidArgumentException + */ + protected function getCacheProvider($cacheName) + { + $container = $this->getContainer(); + + // Try to use user input as cache service alias. + $cacheProvider = $container->get($cacheName, ContainerInterface::NULL_ON_INVALID_REFERENCE); + + // If cache provider was not found try the service provider name. + if ( ! $cacheProvider instanceof Cache) { + $cacheProvider = $container->get('doctrine_cache.providers.' . $cacheName, ContainerInterface::NULL_ON_INVALID_REFERENCE); + } + // Cache provider was not found. + if ( ! $cacheProvider instanceof Cache) { + throw new \InvalidArgumentException('Cache provider not found.'); + } + + return $cacheProvider; + } + + /** + * @return \Symfony\Component\DependencyInjection\ContainerInterface + */ + protected function getContainer() + { + return $this->container; + } + + /** + * {@inheritdoc} + */ + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Command/ContainsCommand.php b/vendor/doctrine/doctrine-cache-bundle/Command/ContainsCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..6faca657ee11e9acc8138b4451928a858e4e441e --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Command/ContainsCommand.php @@ -0,0 +1,40 @@ + + */ +class ContainsCommand extends CacheCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this->setName('doctrine:cache:contains') + ->setDescription('Check if a cache entry exists') + ->addArgument('cache-name', InputArgument::REQUIRED, 'Which cache provider to use?') + ->addArgument('cache-id', InputArgument::REQUIRED, 'Which cache ID to check?'); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $cacheName = $input->getArgument('cache-name'); + $cacheProvider = $this->getCacheProvider($cacheName); + $cacheId = $input->getArgument('cache-id'); + + $message = $cacheProvider->contains($cacheId) ? 'TRUE' : 'FALSE'; + $output->writeln($message); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Command/DeleteCommand.php b/vendor/doctrine/doctrine-cache-bundle/Command/DeleteCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..ca1b7bd5c4cdb4a8abfaa9b798ab9ff4a7fe6663 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Command/DeleteCommand.php @@ -0,0 +1,64 @@ + + */ +class DeleteCommand extends CacheCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this->setName('doctrine:cache:delete') + ->setDescription('Delete a cache entry') + ->addArgument('cache-name', InputArgument::REQUIRED, 'Which cache provider to use?') + ->addArgument('cache-id', InputArgument::OPTIONAL, 'Which cache ID to delete?') + ->addOption('all', 'a', InputOption::VALUE_NONE, 'Delete all cache entries in provider'); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $cacheName = $input->getArgument('cache-name'); + $cacheProvider = $this->getCacheProvider($cacheName); + $cacheId = $input->getArgument('cache-id'); + $all = $input->getOption('all'); + + if ($all && ! method_exists($cacheProvider, 'deleteAll')) { + throw new \RuntimeException('Cache provider does not implement a deleteAll method.'); + } + + if ( ! $all && ! $cacheId) { + throw new \InvalidArgumentException('Missing cache ID'); + } + + $success = $all ? $cacheProvider->deleteAll() : $cacheProvider->delete($cacheId); + $color = $success ? 'info' : 'error'; + $success = $success ? 'succeeded' : 'failed'; + $message = null; + + if ( ! $all) { + $message = "Deletion of <$color>%s in <$color>%s has <$color>%s"; + $message = sprintf($message, $cacheId, $cacheName, $success, true); + } + + if ($all) { + $message = "Deletion of <$color>all entries in <$color>%s has <$color>%s"; + $message = sprintf($message, $cacheName, $success, true); + } + + $output->writeln($message); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Command/FlushCommand.php b/vendor/doctrine/doctrine-cache-bundle/Command/FlushCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..3996152bf3b5c6a1f6215c50d0b608cf2a175715 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Command/FlushCommand.php @@ -0,0 +1,43 @@ + + */ +class FlushCommand extends CacheCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this->setName('doctrine:cache:flush') + ->setAliases(array('doctrine:cache:clear')) + ->setDescription('Flush a given cache') + ->addArgument('cache-name', InputArgument::REQUIRED, 'Which cache provider to flush?'); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $cacheName = $input->getArgument('cache-name'); + $cacheProvider = $this->getCacheProvider($cacheName); + + if ( ! method_exists($cacheProvider, 'flushAll')) { + throw new \RuntimeException('Cache provider does not implement a flushAll method.'); + } + + $cacheProviderName = get_class($cacheProvider); + $output->writeln(sprintf('Clearing the cache for the %s provider of type %s', $cacheName, $cacheProviderName, true)); + $cacheProvider->flushAll(); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Command/StatsCommand.php b/vendor/doctrine/doctrine-cache-bundle/Command/StatsCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..233c69a6b32b19394ea25e9554769459fa5c1c86 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Command/StatsCommand.php @@ -0,0 +1,53 @@ + + */ +class StatsCommand extends CacheCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this->setName('doctrine:cache:stats') + ->setDescription('Get stats on a given cache provider') + ->addArgument('cache-name', InputArgument::REQUIRED, 'Which cache provider to flush?'); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $cacheName = $input->getArgument('cache-name'); + $cacheProvider = $this->getCacheProvider($cacheName); + $cacheProviderName = get_class($cacheProvider); + + $stats = $cacheProvider->getStats(); + + if ($stats === null) { + $output->writeln(sprintf('Stats were not provided for the %s provider of type %s', $cacheName, $cacheProviderName, true)); + + return; + } + + $formatter = $this->getHelperSet()->get('formatter'); + + $lines = array(); + foreach ($stats as $key => $stat) { + $lines[] = $formatter->formatSection($key, $stat); + } + + $output->writeln(sprintf('Stats for the %s provider of type %s:', $cacheName, $cacheProviderName, true)); + $output->writeln($lines); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/CacheProviderLoader.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/CacheProviderLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..bbf8fa9fc57bd8cb31395dea2909dd588433c7a1 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/CacheProviderLoader.php @@ -0,0 +1,153 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection; + +use Doctrine\Common\Inflector\Inflector; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Cache provider loader + * + * @author Fabio B. Silva + */ +class CacheProviderLoader +{ + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + */ + public function loadCacheProvider($name, array $config, ContainerBuilder $container) + { + $serviceId = 'doctrine_cache.providers.' . $name; + $decorator = $this->getProviderDecorator($container, $config); + $service = $container->setDefinition($serviceId, $decorator); + $type = ($config['type'] === 'custom_provider') + ? $config['custom_provider']['type'] + : $config['type']; + + if ($config['namespace']) { + $service->addMethodCall('setNamespace', array($config['namespace'])); + } + + foreach ($config['aliases'] as $alias) { + $container->setAlias($alias, $serviceId); + } + + if ($this->definitionClassExists($type, $container)) { + $this->getCacheDefinition($type, $container)->configure($name, $config, $service, $container); + } + } + + /** + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * @param array $config + * + * @return \Symfony\Component\DependencyInjection\DefinitionDecorator + */ + protected function getProviderDecorator(ContainerBuilder $container, array $config) + { + $type = $config['type']; + $id = 'doctrine_cache.abstract.' . $type; + + if ($type === 'custom_provider') { + $type = $config['custom_provider']['type']; + $param = $this->getCustomProviderParameter($type); + + if ($container->hasParameter($param)) { + return new DefinitionDecorator($container->getParameter($param)); + } + } + + if ($container->hasDefinition($id)) { + return new DefinitionDecorator($id); + } + + throw new \InvalidArgumentException(sprintf('"%s" is an unrecognized Doctrine cache driver.', $type)); + } + + /** + * @param string $type + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition\CacheDefinition + */ + private function getCacheDefinition($type, ContainerBuilder $container) + { + $class = $this->getDefinitionClass($type, $container); + $object = new $class($type); + + return $object; + } + + /** + * @param string $type + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return boolean + */ + private function definitionClassExists($type, ContainerBuilder $container) + { + if ($container->hasParameter($this->getCustomDefinitionClassParameter($type))) { + return true; + } + + return class_exists($this->getDefinitionClass($type, $container)); + } + + /** + * @param string $type + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return string + */ + protected function getDefinitionClass($type, ContainerBuilder $container) + { + if ($container->hasParameter($this->getCustomDefinitionClassParameter($type))) { + return $container->getParameter($this->getCustomDefinitionClassParameter($type)); + } + + $name = Inflector::classify($type) . 'Definition'; + $class = sprintf('%s\Definition\%s', __NAMESPACE__, $name); + + return $class; + } + + /** + * @param string $type + * + * @return string + */ + public function getCustomProviderParameter($type) + { + return 'doctrine_cache.custom_provider.' . $type; + } + + /** + * @param string $type + * + * @return string + */ + public function getCustomDefinitionClassParameter($type) + { + return 'doctrine_cache.custom_definition_class.' . $type; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Configuration.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Configuration.php new file mode 100644 index 0000000000000000000000000000000000000000..578ab3dccfbca9365597321d27a280c2063b952a --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Configuration.php @@ -0,0 +1,563 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection; + +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; +use Symfony\Component\Config\Definition\NodeInterface; + +/** + * Cache Bundle Configuration + * + * @author Guilherme Blanco + * @author Fabio B. Silva + */ +class Configuration implements ConfigurationInterface +{ + /** + * @param array $parameters + * + * @return string + */ + public function getProviderParameters(array $parameters) + { + if (isset($parameters['type'])) { + unset($parameters['type']); + } + + if (isset($parameters['aliases'])) { + unset($parameters['aliases']); + } + + if (isset($parameters['namespace'])) { + unset($parameters['namespace']); + } + + return $parameters; + } + + /** + * @param array $parameters + * + * @return string + */ + public function resolveNodeType(array $parameters) + { + $values = $this->getProviderParameters($parameters); + $type = key($values); + + return $type; + } + + /** + * @param \Symfony\Component\Config\Definition\NodeInterface $tree + * + * @return array + */ + public function getProviderNames(NodeInterface $tree) + { + foreach ($tree->getChildren() as $providers) { + + if ($providers->getName() !== 'providers') { + continue; + } + + $children = $providers->getPrototype()->getChildren(); + $providers = array_diff(array_keys($children), array('type', 'aliases', 'namespace')); + + return $providers; + } + + return array(); + } + + /** + * @param string $type + * @param \Symfony\Component\Config\Definition\NodeInterface $tree + * + * @return boolean + */ + public function isCustomProvider($type, NodeInterface $tree) + { + return ( ! in_array($type, $this->getProviderNames($tree))); + } + + /** + * {@inheritDoc} + */ + public function getConfigTreeBuilder() + { + $self = $this; + $builder = new TreeBuilder(); + $node = $builder->root('doctrine_cache', 'array'); + $normalization = function ($conf) use ($self, $builder) { + $conf['type'] = isset($conf['type']) + ? $conf['type'] + : $self->resolveNodeType($conf); + + if ($self->isCustomProvider($conf['type'], $builder->buildTree())) { + $params = $self->getProviderParameters($conf); + $options = reset($params); + $conf = array( + 'type' => 'custom_provider', + 'custom_provider' => array( + 'type' => $conf['type'], + 'options' => $options ?: null, + ) + ); + } + + return $conf; + }; + + $node + ->children() + ->arrayNode('acl_cache') + ->beforeNormalization() + ->ifString() + ->then(function ($id) { + return array('id' => $id); + }) + ->end() + ->addDefaultsIfNotSet() + ->children() + ->scalarNode('id')->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('custom_provider') + ->children() + ->arrayNode('custom_providers') + ->useAttributeAsKey('type') + ->prototype('array') + ->children() + ->scalarNode('prototype')->isRequired()->cannotBeEmpty()->end() + ->scalarNode('definition_class')->defaultNull()->end() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('alias', 'aliases') + ->children() + ->arrayNode('aliases') + ->useAttributeAsKey('key') + ->prototype('scalar')->end() + ->end() + ->end() + ->fixXmlConfig('provider') + ->children() + ->arrayNode('providers') + ->useAttributeAsKey('name') + ->prototype('array') + ->beforeNormalization() + ->ifTrue(function ($v) use ($self, $builder) { + return ( ! isset($v['type']) || ! $self->isCustomProvider($v['type'], $builder->buildTree())); + }) + ->then($normalization) + ->end() + ->children() + ->scalarNode('namespace')->defaultNull()->end() + ->scalarNode('type')->defaultNull()->end() + ->append($this->addBasicProviderNode('apc')) + ->append($this->addBasicProviderNode('apcu')) + ->append($this->addBasicProviderNode('array')) + ->append($this->addBasicProviderNode('void')) + ->append($this->addBasicProviderNode('wincache')) + ->append($this->addBasicProviderNode('xcache')) + ->append($this->addBasicProviderNode('zenddata')) + ->append($this->addCustomProviderNode()) + ->append($this->addCouchbaseNode()) + ->append($this->addChainNode()) + ->append($this->addMemcachedNode()) + ->append($this->addMemcacheNode()) + ->append($this->addFileSystemNode()) + ->append($this->addPhpFileNode()) + ->append($this->addMongoNode()) + ->append($this->addRedisNode()) + ->append($this->addPredisNode()) + ->append($this->addRiakNode()) + ->append($this->addSqlite3Node()) + ->end() + ->fixXmlConfig('alias', 'aliases') + ->children() + ->arrayNode('aliases') + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + + return $builder; + } + + /** + * @param string $name + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addBasicProviderNode($name) + { + $builder = new TreeBuilder(); + $node = $builder->root($name); + + return $node; + } + + /** + * Build custom node configuration definition + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addCustomProviderNode() + { + $builder = new TreeBuilder(); + $node = $builder->root('custom_provider'); + + $node + ->children() + ->scalarNode('type')->isRequired()->cannotBeEmpty()->end() + ->arrayNode('options') + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->end() + ; + + return $node; + } + + /** + * Build chain node configuration definition + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addChainNode() + { + $builder = new TreeBuilder(); + $node = $builder->root('chain'); + + $node + ->fixXmlConfig('provider') + ->children() + ->arrayNode('providers') + ->prototype('scalar')->end() + ->end() + ->end() + ; + + return $node; + } + + /** + * Build memcache node configuration definition + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addMemcacheNode() + { + $builder = new TreeBuilder(); + $node = $builder->root('memcache'); + $host = '%doctrine_cache.memcache.host%'; + $port = '%doctrine_cache.memcache.port%'; + + $node + ->addDefaultsIfNotSet() + ->fixXmlConfig('server') + ->children() + ->scalarNode('connection_id')->defaultNull()->end() + ->arrayNode('servers') + ->useAttributeAsKey('host') + ->normalizeKeys(false) + ->prototype('array') + ->beforeNormalization() + ->ifTrue(function ($v) { + return is_scalar($v); + }) + ->then(function ($val) { + return array('port' => $val); + }) + ->end() + ->children() + ->scalarNode('host')->defaultValue($host)->end() + ->scalarNode('port')->defaultValue($port)->end() + ->end() + ->end() + ->defaultValue(array($host => array( + 'host' => $host, + 'port' => $port + ))) + ->end() + ->end() + ; + + return $node; + } + + /** + * Build memcached node configuration definition + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addMemcachedNode() + { + $builder = new TreeBuilder(); + $node = $builder->root('memcached'); + $host = '%doctrine_cache.memcached.host%'; + $port = '%doctrine_cache.memcached.port%'; + + $node + ->addDefaultsIfNotSet() + ->fixXmlConfig('server') + ->children() + ->scalarNode('connection_id')->defaultNull()->end() + ->scalarNode('persistent_id')->defaultNull()->end() + ->arrayNode('servers') + ->useAttributeAsKey('host') + ->normalizeKeys(false) + ->prototype('array') + ->beforeNormalization() + ->ifTrue(function ($v) { + return is_scalar($v); + }) + ->then(function ($val) { + return array('port' => $val); + }) + ->end() + ->children() + ->scalarNode('host')->defaultValue($host)->end() + ->scalarNode('port')->defaultValue($port)->end() + ->end() + ->end() + ->defaultValue(array($host => array( + 'host' => $host, + 'port' => $port + ))) + ->end() + ->end() + ; + + return $node; + } + + /** + * Build redis node configuration definition + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addRedisNode() + { + $builder = new TreeBuilder(); + $node = $builder->root('redis'); + + $node + ->addDefaultsIfNotSet() + ->children() + ->scalarNode('connection_id')->defaultNull()->end() + ->scalarNode('host')->defaultValue('%doctrine_cache.redis.host%')->end() + ->scalarNode('port')->defaultValue('%doctrine_cache.redis.port%')->end() + ->scalarNode('password')->defaultNull()->end() + ->scalarNode('timeout')->defaultNull()->end() + ->scalarNode('database')->defaultNull()->end() + ->end() + ; + + return $node; + } + + /** + * Build predis node configuration definition + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addPredisNode() + { + $builder = new TreeBuilder(); + $node = $builder->root('predis'); + + $node + ->addDefaultsIfNotSet() + ->children() + ->scalarNode('client_id')->defaultNull()->end() + ->scalarNode('scheme')->defaultValue('tcp')->end() + ->scalarNode('host')->defaultValue('%doctrine_cache.redis.host%')->end() + ->scalarNode('port')->defaultValue('%doctrine_cache.redis.port%')->end() + ->scalarNode('password')->defaultNull()->end() + ->scalarNode('timeout')->defaultNull()->end() + ->scalarNode('database')->defaultNull()->end() + ->arrayNode('options') + ->useAttributeAsKey('name') + ->prototype('scalar')->end() + ->end() + ->end() + ; + + return $node; + } + + /** + * Build riak node configuration definition + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addRiakNode() + { + $builder = new TreeBuilder(); + $node = $builder->root('riak'); + + $node + ->addDefaultsIfNotSet() + ->children() + ->scalarNode('host')->defaultValue('%doctrine_cache.riak.host%')->end() + ->scalarNode('port')->defaultValue('%doctrine_cache.riak.port%')->end() + ->scalarNode('bucket_name')->defaultValue('doctrine_cache')->end() + ->scalarNode('connection_id')->defaultNull()->end() + ->scalarNode('bucket_id')->defaultNull()->end() + ->arrayNode('bucket_property_list') + ->children() + ->scalarNode('allow_multiple')->defaultNull()->end() + ->scalarNode('n_value')->defaultNull()->end() + ->end() + ->end() + ->end() + ; + + return $node; + } + + /** + * Build couchbase node configuration definition + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addCouchbaseNode() + { + $builder = new TreeBuilder(); + $node = $builder->root('couchbase'); + + $node + ->addDefaultsIfNotSet() + ->fixXmlConfig('hostname') + ->children() + ->scalarNode('connection_id')->defaultNull()->end() + ->arrayNode('hostnames') + ->prototype('scalar')->end() + ->defaultValue(array('%doctrine_cache.couchbase.hostnames%')) + ->end() + ->scalarNode('username')->defaultNull()->end() + ->scalarNode('password')->defaultNull()->end() + ->scalarNode('bucket_name')->defaultValue('doctrine_cache')->end() + ->end() + ; + + return $node; + } + + /** + * Build mongodb node configuration definition + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addMongoNode() + { + $builder = new TreeBuilder(); + $node = $builder->root('mongodb'); + + $node + ->addDefaultsIfNotSet() + ->children() + ->scalarNode('connection_id')->defaultNull()->end() + ->scalarNode('collection_id')->defaultNull()->end() + ->scalarNode('database_name')->defaultValue('doctrine_cache')->end() + ->scalarNode('collection_name')->defaultValue('doctrine_cache')->end() + ->scalarNode('server')->defaultValue('%doctrine_cache.mongodb.server%')->end() + ->end() + ; + + return $node; + } + + /** + * Build php_file node configuration definition + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addPhpFileNode() + { + $builder = new TreeBuilder(); + $node = $builder->root('php_file'); + + $node + ->addDefaultsIfNotSet() + ->children() + ->scalarNode('directory')->defaultValue('%kernel.cache_dir%/doctrine/cache/phpfile')->end() + ->scalarNode('extension')->defaultNull()->end() + ->integerNode('umask')->defaultValue(0002)->end() + ->end() + ; + + return $node; + } + + /** + * Build file_system node configuration definition + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addFileSystemNode() + { + $builder = new TreeBuilder(); + $node = $builder->root('file_system'); + + $node + ->addDefaultsIfNotSet() + ->children() + ->scalarNode('directory')->defaultValue('%kernel.cache_dir%/doctrine/cache/file_system')->end() + ->scalarNode('extension')->defaultNull()->end() + ->integerNode('umask')->defaultValue(0002)->end() + ->end() + ; + + return $node; + } + + /** + * Build sqlite3 node configuration definition + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder + */ + private function addSqlite3Node() + { + $builder = new TreeBuilder(); + $node = $builder->root('sqlite3'); + + $node + ->addDefaultsIfNotSet() + ->children() + ->scalarNode('connection_id')->defaultNull()->end() + ->scalarNode('file_name')->defaultNull()->end() + ->scalarNode('table_name')->defaultNull()->end() + ->end() + ; + + return $node; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/CacheDefinition.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/CacheDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..56552f8eacf046faa7e10d4362b1879ab5643f68 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/CacheDefinition.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; + +/** + * Cache Definition. + * + * @author Fabio B. Silva + */ +abstract class CacheDefinition +{ + /** + * @var string + */ + private $type; + + /** + * @param string $type + */ + public function __construct($type) + { + $this->type = $type; + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\Definition $service + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + */ + abstract public function configure($name, array $config, Definition $service, ContainerBuilder $container); +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/ChainDefinition.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/ChainDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..3845ae7d4d8a3c3e1e930fd68dc89f13e743c6fc --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/ChainDefinition.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Chain definition. + * + * @author Guilherme Blanco + */ +class ChainDefinition extends CacheDefinition +{ + /** + * {@inheritDoc} + */ + public function configure($name, array $config, Definition $service, ContainerBuilder $container) + { + $providersConf = $config['chain']; + $providers = $this->getProviders($name, $providersConf, $container); + + $service->setArguments(array($providers)); + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return array + */ + private function getProviders($name, array $config, ContainerBuilder $container) + { + $providers = array(); + + foreach ($config['providers'] as $provider) { + if (strpos($provider, 'doctrine_cache.providers.') === false) { + $provider = sprintf('doctrine_cache.providers.%s', $provider); + } + + $providers[] = new Reference($provider); + } + + return $providers; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/CouchbaseDefinition.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/CouchbaseDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..1916e6e8da273c744c872b22eb8df0ed9ff6c6a0 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/CouchbaseDefinition.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Couchbase definition. + * + * @author Fabio B. Silva + */ +class CouchbaseDefinition extends CacheDefinition +{ + /** + * {@inheritDoc} + */ + public function configure($name, array $config, Definition $service, ContainerBuilder $container) + { + $couchbaseConf = $config['couchbase']; + $connRef = $this->getConnectionReference($name, $couchbaseConf, $container); + + $service->addMethodCall('setCouchbase', array($connRef)); + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Symfony\Component\DependencyInjection\Reference + */ + private function getConnectionReference($name, array $config, ContainerBuilder $container) + { + if (isset($config['connection_id'])) { + return new Reference($config['connection_id']); + } + + $host = $config['hostnames']; + $user = $config['username']; + $pass = $config['password']; + $bucket = $config['bucket_name']; + $connClass = '%doctrine_cache.couchbase.connection.class%'; + $connId = sprintf('doctrine_cache.services.%s_couchbase.connection', $name); + $connDef = new Definition($connClass, array($host, $user, $pass, $bucket)); + + $connDef->setPublic(false); + $container->setDefinition($connId, $connDef); + + return new Reference($connId); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/FileSystemDefinition.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/FileSystemDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..e7837b2bc74dccdb9cffce0a3e87615b0c7304dc --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/FileSystemDefinition.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; + +/** + * FileSystem definition. + * + * @author Fabio B. Silva + */ +class FileSystemDefinition extends CacheDefinition +{ + /** + * {@inheritDoc} + */ + public function configure($name, array $config, Definition $service, ContainerBuilder $container) + { + $service->setArguments(array( + $config['file_system']['directory'], + $config['file_system']['extension'], + $config['file_system']['umask'] + )); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/MemcacheDefinition.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/MemcacheDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..12a537d2530f74cc952e385fdb30cc704b90a8d3 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/MemcacheDefinition.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Memcache definition. + * + * @author Fabio B. Silva + */ +class MemcacheDefinition extends CacheDefinition +{ + /** + * {@inheritDoc} + */ + public function configure($name, array $config, Definition $service, ContainerBuilder $container) + { + $memcacheConf = $config['memcache']; + $connRef = $this->getConnectionReference($name, $memcacheConf, $container); + + $service->addMethodCall('setMemcache', array($connRef)); + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Symfony\Component\DependencyInjection\Reference + */ + private function getConnectionReference($name, array $config, ContainerBuilder $container) + { + if (isset($config['connection_id'])) { + return new Reference($config['connection_id']); + } + + $connClass = '%doctrine_cache.memcache.connection.class%'; + $connId = sprintf('doctrine_cache.services.%s.connection', $name); + $connDef = new Definition($connClass); + + foreach ($config['servers'] as $host => $server) { + $connDef->addMethodCall('addServer', array($host, $server['port'])); + } + + $connDef->setPublic(false); + $container->setDefinition($connId, $connDef); + + return new Reference($connId); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/MemcachedDefinition.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/MemcachedDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..6122626993e303d42ab92b047269a421c74c35cb --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/MemcachedDefinition.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Memcached definition. + * + * @author Fabio B. Silva + */ +class MemcachedDefinition extends CacheDefinition +{ + /** + * {@inheritDoc} + */ + public function configure($name, array $config, Definition $service, ContainerBuilder $container) + { + $memcachedConf = $config['memcached']; + $connRef = $this->getConnectionReference($name, $memcachedConf, $container); + + $service->addMethodCall('setMemcached', array($connRef)); + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Symfony\Component\DependencyInjection\Reference + */ + private function getConnectionReference($name, array $config, ContainerBuilder $container) + { + if (isset($config['connection_id'])) { + return new Reference($config['connection_id']); + } + + $connClass = '%doctrine_cache.memcached.connection.class%'; + $connId = sprintf('doctrine_cache.services.%s.connection', $name); + $connDef = new Definition($connClass); + + if (isset($config['persistent_id']) === true) { + $connDef->addArgument($config['persistent_id']); + } + + foreach ($config['servers'] as $host => $server) { + $connDef->addMethodCall('addServer', array($host, $server['port'])); + } + + $connDef->setPublic(false); + $container->setDefinition($connId, $connDef); + + return new Reference($connId); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/MongodbDefinition.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/MongodbDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..792a5b56a329d0b7272dbe19bc91f5fc858f3c8f --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/MongodbDefinition.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +/** + * MongoDB definition. + * + * @author Fabio B. Silva + */ +class MongodbDefinition extends CacheDefinition +{ + /** + * {@inheritDoc} + */ + public function configure($name, array $config, Definition $service, ContainerBuilder $container) + { + $memcacheConf = $config['mongodb']; + $collRef = $this->getCollectionReference($name, $memcacheConf, $container); + + $service->setArguments(array($collRef)); + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Symfony\Component\DependencyInjection\Reference + */ + private function getCollectionReference($name, array $config, ContainerBuilder $container) + { + if (isset($config['collection_id'])) { + return new Reference($config['collection_id']); + } + + $databaseName = $config['database_name']; + $collectionName = $config['collection_name']; + $collClass = '%doctrine_cache.mongodb.collection.class%'; + $collId = sprintf('doctrine_cache.services.%s.collection', $name); + $collDef = new Definition($collClass, array($databaseName, $collectionName)); + $connRef = $this->getConnectionReference($name, $config, $container); + + $definition = $container->setDefinition($collId, $collDef)->setPublic(false); + + if (method_exists($definition, 'setFactory')) { + $definition->setFactory(array($connRef, 'selectCollection')); + + return new Reference($collId); + } + + $definition + ->setFactoryService($connRef) + ->setFactoryMethod('selectCollection') + ; + + return new Reference($collId); + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Symfony\Component\DependencyInjection\Reference + */ + private function getConnectionReference($name, array $config, ContainerBuilder $container) + { + if (isset($config['connection_id'])) { + return new Reference($config['connection_id']); + } + + $server = $config['server']; + $connClass = '%doctrine_cache.mongodb.connection.class%'; + $connId = sprintf('doctrine_cache.services.%s.connection', $name); + $connDef = new Definition($connClass, array($server)); + + $connDef->setPublic(false); + $connDef->addMethodCall('connect'); + + $container->setDefinition($connId, $connDef); + + return new Reference($connId); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/PhpFileDefinition.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/PhpFileDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..f5da3b67665b5a8cd0aba352f59e6c0c385853d2 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/PhpFileDefinition.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; + +/** + * PhpFile definition. + * + * @author Fabio B. Silva + */ +class PhpFileDefinition extends CacheDefinition +{ + /** + * {@inheritDoc} + */ + public function configure($name, array $config, Definition $service, ContainerBuilder $container) + { + $service->setArguments(array( + $config['php_file']['directory'], + $config['php_file']['extension'], + $config['php_file']['umask'] + )); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/PredisDefinition.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/PredisDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..862ecca9ea3e94a20a50f7ea15cf0c0ea2fbe2ee --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/PredisDefinition.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Predis definition. + * + * @author Ivo Bathke + */ +class PredisDefinition extends CacheDefinition +{ + /** + * {@inheritDoc} + */ + public function configure($name, array $config, Definition $service, ContainerBuilder $container) + { + $redisConf = $config['predis']; + $connRef = $this->getConnectionReference($name, $redisConf, $container); + $service->addArgument($connRef); + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Symfony\Component\DependencyInjection\Reference + */ + private function getConnectionReference($name, array $config, ContainerBuilder $container) + { + if (isset($config['client_id'])) { + return new Reference($config['client_id']); + } + + $parameters = array( + 'scheme' => $config['scheme'], + 'host' => $config['host'], + 'port' => $config['port'], + ); + + if ($config['password']) { + $parameters['password'] = $config['password']; + } + + if ($config['timeout']) { + $parameters['timeout'] = $config['timeout']; + } + + if ($config['database']) { + $parameters['database'] = $config['database']; + } + + $options = null; + + if (isset($config['options'])) { + $options = $config['options']; + } + + $clientClass = '%doctrine_cache.predis.client.class%'; + $clientId = sprintf('doctrine_cache.services.%s_predis.client', $name); + $clientDef = new Definition($clientClass); + + $clientDef->addArgument($parameters); + $clientDef->addArgument($options); + $clientDef->setPublic(false); + + $container->setDefinition($clientId, $clientDef); + + return new Reference($clientId); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/RedisDefinition.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/RedisDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..0197279a413ef70f1cba6b6a8b5fc391be61c58d --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/RedisDefinition.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Redis definition. + * + * @author Fabio B. Silva + */ +class RedisDefinition extends CacheDefinition +{ + /** + * {@inheritDoc} + */ + public function configure($name, array $config, Definition $service, ContainerBuilder $container) + { + $redisConf = $config['redis']; + $connRef = $this->getConnectionReference($name, $redisConf, $container); + + $service->addMethodCall('setRedis', array($connRef)); + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Symfony\Component\DependencyInjection\Reference + */ + private function getConnectionReference($name, array $config, ContainerBuilder $container) + { + if (isset($config['connection_id'])) { + return new Reference($config['connection_id']); + } + + $host = $config['host']; + $port = $config['port']; + $connClass = '%doctrine_cache.redis.connection.class%'; + $connId = sprintf('doctrine_cache.services.%s_redis.connection', $name); + $connDef = new Definition($connClass); + $connParams = array($host, $port); + + if (isset($config['timeout'])) { + $connParams[] = $config['timeout']; + } + + $connDef->setPublic(false); + $connDef->addMethodCall('connect', $connParams); + + if (isset($config['password'])) { + $password = $config['password']; + $connDef->addMethodCall('auth', array($password)); + } + + if (isset($config['database'])) { + $database = (int) $config['database']; + $connDef->addMethodCall('select', array($database)); + } + + $container->setDefinition($connId, $connDef); + + return new Reference($connId); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/RiakDefinition.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/RiakDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..463d0016d858b551e6b3701594e7b6ecf75d19ba --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/RiakDefinition.php @@ -0,0 +1,109 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Riak definition. + * + * @author Fabio B. Silva + */ +class RiakDefinition extends CacheDefinition +{ + /** + * {@inheritDoc} + */ + public function configure($name, array $config, Definition $service, ContainerBuilder $container) + { + $riakConf = $config['riak']; + $bucketRef = $this->getBucketReference($name, $riakConf, $container); + + $service->setArguments(array($bucketRef)); + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Symfony\Component\DependencyInjection\Reference + */ + private function getBucketReference($name, array $config, ContainerBuilder $container) + { + if (isset($config['bucket_id'])) { + return new Reference($config['bucket_id']); + } + + $bucketName = $config['bucket_name']; + $bucketClass = '%doctrine_cache.riak.bucket.class%'; + $bucketId = sprintf('doctrine_cache.services.%s.bucket', $name); + $connDef = $this->getConnectionReference($name, $config, $container); + $bucketDef = new Definition($bucketClass, array($connDef, $bucketName)); + + $bucketDef->setPublic(false); + $container->setDefinition($bucketId, $bucketDef); + + if ( ! empty($config['bucket_property_list'])) { + $this->configureBucketPropertyList($name, $config['bucket_property_list'], $bucketDef, $container); + } + + return new Reference($bucketId); + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Symfony\Component\DependencyInjection\Reference + */ + private function getConnectionReference($name, array $config, ContainerBuilder $container) + { + if (isset($config['connection_id'])) { + return new Reference($config['connection_id']); + } + + $host = $config['host']; + $port = $config['port']; + $connClass = '%doctrine_cache.riak.connection.class%'; + $connId = sprintf('doctrine_cache.services.%s.connection', $name); + $connDef = new Definition($connClass, array($host, $port)); + + $connDef->setPublic(false); + $container->setDefinition($connId, $connDef); + + return new Reference($connId); + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\Definition $bucketDefinition + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + */ + private function configureBucketPropertyList($name, array $config, Definition $bucketDefinition, ContainerBuilder $container) + { + $propertyListClass = '%doctrine_cache.riak.bucket_property_list.class%'; + $propertyListServiceId = sprintf('doctrine_cache.services.%s.bucket_property_list', $name); + $propertyListReference = new Reference($propertyListServiceId); + $propertyListDefinition = new Definition($propertyListClass, array( + $config['n_value'], + $config['allow_multiple'] + )); + + $container->setDefinition($propertyListServiceId, $propertyListDefinition); + $bucketDefinition->addMethodCall('setPropertyList', array($propertyListReference)); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/Sqlite3Definition.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/Sqlite3Definition.php new file mode 100644 index 0000000000000000000000000000000000000000..a0dcc362e2def93f5cf9ffd40bcfb8a4f82b4664 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/Definition/Sqlite3Definition.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Sqlite3 definition. + * + * @author Guilherme Blanco + */ +class Sqlite3Definition extends CacheDefinition +{ + /** + * {@inheritDoc} + */ + public function configure($name, array $config, Definition $service, ContainerBuilder $container) + { + $sqlite3Conf = $config['sqlite3']; + $tableName = $sqlite3Conf['table_name']; + $connectionRef = $this->getConnectionReference($name, $sqlite3Conf, $container); + + $service->setArguments(array($connectionRef, $tableName)); + } + + /** + * @param string $name + * @param array $config + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Symfony\Component\DependencyInjection\Reference + */ + private function getConnectionReference($name, array $config, ContainerBuilder $container) + { + if (isset($config['connection_id'])) { + return new Reference($config['connection_id']); + } + + $fileName = $config['file_name']; + $connClass = '%doctrine_cache.sqlite3.connection.class%'; + $connId = sprintf('doctrine_cache.services.%s.connection', $name); + $connDef = new Definition($connClass, array($fileName, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE)); + + $connDef->setPublic(false); + $container->setDefinition($connId, $connDef); + + return new Reference($connId); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/DoctrineCacheExtension.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/DoctrineCacheExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..2469333947ddb65f8781701ee28f44688d64b1b3 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/DoctrineCacheExtension.php @@ -0,0 +1,161 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection; + +use Symfony\Component\Config\FileLocator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\HttpKernel\DependencyInjection\Extension; + +/** + * Cache Bundle Extension + * + * @author Guilherme Blanco + * @author Fabio B. Silva + * @author Danilo Cabello + */ +class DoctrineCacheExtension extends Extension +{ + /** + * @var \Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\CacheProviderLoader + */ + private $loader; + + /** + * @param \Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\CacheProviderLoader $loader + */ + public function __construct(CacheProviderLoader $loader = null) + { + $this->loader = $loader ?: new CacheProviderLoader; + } + + /** + * {@inheritdoc} + */ + public function load(array $configs, ContainerBuilder $container) + { + $configuration = new Configuration(); + $rootConfig = $this->processConfiguration($configuration, $configs); + + $locator = new FileLocator(__DIR__ . '/../Resources/config/'); + $loader = new XmlFileLoader($container, $locator); + + $loader->load('services.xml'); + + $this->loadAcl($rootConfig, $container); + $this->loadCustomProviders($rootConfig, $container); + $this->loadCacheProviders($rootConfig, $container); + $this->loadCacheAliases($rootConfig, $container); + } + + /** + * @param array $rootConfig + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + */ + protected function loadAcl(array $rootConfig, ContainerBuilder $container) + { + if ( ! isset($rootConfig['acl_cache']['id'])) { + return; + } + + if ( ! interface_exists('Symfony\Component\Security\Acl\Model\AclInterface')) { + throw new \LogicException('You must install symfony/security-acl in order to use the acl_cache functionality.'); + } + + $aclCacheDefinition = new Definition( + $container->getParameter('doctrine_cache.security.acl.cache.class'), + array( + new Reference($rootConfig['acl_cache']['id']), + new Reference('security.acl.permission_granting_strategy'), + ) + ); + + $aclCacheDefinition->setPublic(false); + + $container->setDefinition('doctrine_cache.security.acl.cache', $aclCacheDefinition); + $container->setAlias('security.acl.cache', 'doctrine_cache.security.acl.cache'); + } + + /** + * @param array $rootConfig + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + */ + protected function loadCacheProviders(array $rootConfig, ContainerBuilder $container) + { + foreach ($rootConfig['providers'] as $name => $config) { + $this->loader->loadCacheProvider($name, $config, $container); + } + } + + /** + * @param array $rootConfig + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + */ + protected function loadCacheAliases(array $rootConfig, ContainerBuilder $container) + { + foreach ($rootConfig['aliases'] as $alias => $name) { + $container->setAlias($alias, 'doctrine_cache.providers.' . $name); + } + } + + /** + * @param array $rootConfig + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + */ + protected function loadCustomProviders(array $rootConfig, ContainerBuilder $container) + { + foreach ($rootConfig['custom_providers'] as $type => $rootConfig) { + $providerParameterName = $this->loader->getCustomProviderParameter($type); + $definitionParameterName = $this->loader->getCustomDefinitionClassParameter($type); + + $container->setParameter($providerParameterName, $rootConfig['prototype']); + + if ($rootConfig['definition_class']) { + $container->setParameter($definitionParameterName, $rootConfig['definition_class']); + } + } + } + + /** + * {@inheritDoc} + */ + public function getAlias() + { + return 'doctrine_cache'; + } + + /** + * {@inheritDoc} + */ + public function getXsdValidationBasePath() + { + return __DIR__ . '/../Resources/config/schema'; + } + + /** + * {@inheritDoc} + **/ + public function getNamespace() + { + return 'http://doctrine-project.org/schemas/symfony-dic/cache'; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/SymfonyBridgeAdapter.php b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/SymfonyBridgeAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..5950cfe1836a73b81cfec95f033d417dc358af70 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DependencyInjection/SymfonyBridgeAdapter.php @@ -0,0 +1,155 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection; + +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\Config\FileLocator; + +/** + * Symfony bridge adpter + * + * @author Kinn Coelho Julião + * @author Fabio B. Silva + */ +class SymfonyBridgeAdapter +{ + /** + * @var \Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\CacheProviderLoader + */ + private $cacheProviderLoader; + + /** + * @var string + */ + protected $objectManagerName; + + /** + * @var string + */ + protected $mappingResourceName; + + /** + * @param \Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\CacheProviderLoader $cacheProviderLoader + * @param string $objectManagerName + * @param string $mappingResourceName + */ + public function __construct(CacheProviderLoader $cacheProviderLoader, $objectManagerName, $mappingResourceName) + { + $this->cacheProviderLoader = $cacheProviderLoader; + $this->objectManagerName = $objectManagerName; + $this->mappingResourceName = $mappingResourceName; + } + + /** + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + */ + public function loadServicesConfiguration(ContainerBuilder $container) + { + $locator = new FileLocator(__DIR__ . '/../Resources/config/'); + $loader = new XmlFileLoader($container, $locator); + + $loader->load('services.xml'); + } + + /** + * @param string $cacheName + * @param string $objectManagerName + * @param array $cacheDriver + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return string + */ + public function loadCacheDriver($cacheName, $objectManagerName, array $cacheDriver, ContainerBuilder $container) + { + $id = $this->getObjectManagerElementName($objectManagerName . '_' . $cacheName); + $host = isset($cacheDriver['host']) ? $cacheDriver['host'] : null; + $port = isset($cacheDriver['port']) ? $cacheDriver['port'] : null; + $password = isset($cacheDriver['password']) ? $cacheDriver['password'] : null; + $database = isset($cacheDriver['database']) ? $cacheDriver['database'] : null; + $type = $cacheDriver['type']; + + if ($type == 'service') { + $container->setAlias($id, new Alias($cacheDriver['id'], false)); + + return $id; + } + + $config = array( + 'aliases' => array($id), + $type => array(), + 'type' => $type, + 'namespace' => null, + ); + + if ( ! isset($cacheDriver['namespace'])) { + // generate a unique namespace for the given application + $environment = $container->getParameter('kernel.root_dir').$container->getParameter('kernel.environment'); + $hash = hash('sha256', $environment); + $namespace = 'sf2' . $this->mappingResourceName .'_' . $objectManagerName . '_' . $hash; + + $cacheDriver['namespace'] = $namespace; + } + + $config['namespace'] = $cacheDriver['namespace']; + + if (in_array($type, array('memcache', 'memcached'))) { + $host = !empty($host) ? $host : 'localhost'; + $config[$type]['servers'][$host] = array( + 'host' => $host, + 'port' => !empty($port) ? $port : 11211, + ); + } + + if ($type === 'redis') { + $config[$type] = array( + 'host' => !empty($host) ? $host : 'localhost', + 'port' => !empty($port) ? $port : 6379, + 'password' => !empty($password) ? $password : null, + 'database' => !empty($database) ? $database : 0 + ); + } + + $this->cacheProviderLoader->loadCacheProvider($id, $config, $container); + + return $id; + } + + /** + * @param array $objectManager + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * @param string $cacheName + */ + public function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, $cacheName) + { + $this->loadCacheDriver($cacheName, $objectManager['name'], $objectManager[$cacheName.'_driver'], $container); + } + + /** + * @param string $name + * + * @return string + */ + protected function getObjectManagerElementName($name) + { + return $this->objectManagerName . '.' . $name; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/DoctrineCacheBundle.php b/vendor/doctrine/doctrine-cache-bundle/DoctrineCacheBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..98a04f68ecad03613fc96d399005ad72af6a11e0 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/DoctrineCacheBundle.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +/** + * Symfony Bundle for Doctrine Cache + * + * @author Guilherme Blanco + * @author Fabio B. Silva + */ +class DoctrineCacheBundle extends Bundle +{ +} diff --git a/vendor/doctrine/doctrine-cache-bundle/LICENSE b/vendor/doctrine/doctrine-cache-bundle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d228a4ea878f19ecc083eb7f81346ff07a3e5f56 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2012 Doctrine Project + +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. \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/README.md b/vendor/doctrine/doctrine-cache-bundle/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f4e76f69caf67c67b175dc311fa13da662b3aaaf --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/README.md @@ -0,0 +1,32 @@ +DoctrineCacheBundle +=================== + +Symfony Bundle for Doctrine Cache. + +Master: [![Build Status](https://secure.travis-ci.org/doctrine/DoctrineCacheBundle.png?branch=master)](http://travis-ci.org/doctrine/DoctrineCacheBundle) + +Master: [![Coverage Status](https://coveralls.io/repos/doctrine/DoctrineCacheBundle/badge.png?branch=master)](https://coveralls.io/r/doctrine/DoctrineCacheBundle?branch=master) + +## Installation + +1. Add this bundle to your project as a composer dependency: + + ```bash + composer require doctrine/doctrine-cache-bundle + ``` + +2. Add this bundle in your application kernel: + + ```php + // app/AppKernel.php + public function registerBundles() + { + // ... + $bundles[] = new \Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(); + + return $bundles; + } + ``` + +Read the [documentation](Resources/doc/index.rst) to learn how to configure and +use your own cache providers. diff --git a/vendor/doctrine/doctrine-cache-bundle/Resources/config/schema/doctrine_cache-1.0.xsd b/vendor/doctrine/doctrine-cache-bundle/Resources/config/schema/doctrine_cache-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..776f95aebffbd58ffde7814883fd77df2c14147f --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Resources/config/schema/doctrine_cache-1.0.xsd @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Resources/config/services.xml b/vendor/doctrine/doctrine-cache-bundle/Resources/config/services.xml new file mode 100644 index 0000000000000000000000000000000000000000..eec30a84cf838c0eba228b7229c89fa2d14a8d92 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Resources/config/services.xml @@ -0,0 +1,73 @@ + + + + + + Doctrine\Common\Cache\ApcCache + Doctrine\Common\Cache\ApcuCache + Doctrine\Common\Cache\ArrayCache + Doctrine\Common\Cache\ChainCache + Doctrine\Common\Cache\CouchbaseCache + Couchbase + localhost:8091 + Doctrine\Common\Cache\FilesystemCache + Doctrine\Common\Cache\PhpFileCache + Doctrine\Common\Cache\MemcacheCache + Memcache + localhost + 11211 + Doctrine\Common\Cache\MemcachedCache + Memcached + localhost + 11211 + Doctrine\Common\Cache\MongoDBCache + MongoCollection + MongoClient + localhost:27017 + Predis\Client + tcp + localhost + 6379 + Doctrine\Common\Cache\RedisCache + Redis + localhost + 6379 + Doctrine\Common\Cache\RiakCache + Riak\Bucket + Riak\Connection + Riak\BucketPropertyList + localhost + 8087 + Doctrine\Common\Cache\SQLite3Cache + SQLite3 + Doctrine\Common\Cache\VoidCache + Doctrine\Common\Cache\WinCacheCache + Doctrine\Common\Cache\XcacheCache + Doctrine\Common\Cache\ZendDataCache + Doctrine\Bundle\DoctrineCacheBundle\Acl\Model\AclCache + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Resources/doc/acl_cache.rst b/vendor/doctrine/doctrine-cache-bundle/Resources/doc/acl_cache.rst new file mode 100644 index 0000000000000000000000000000000000000000..126ac78f40a8886a10c71fff3168b1eca772a1a1 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Resources/doc/acl_cache.rst @@ -0,0 +1,37 @@ +Symfony ACL Cache +================= + +.. configuration-block:: + + .. code-block:: yaml + + # app/config/config.yml + doctrine_cache: + acl_cache: + id: 'doctrine_cache.providers.acl_apc_provider' + providers: + acl_apc_provider: + type: 'apc' + + .. code-block:: xml + + + + + + + + + + + + + +Check the following sample:: + + /** @var $aclCache Symfony\Component\Security\Acl\Model\AclCacheInterface */ + $aclCache = $this->container->get('security.acl.cache'); diff --git a/vendor/doctrine/doctrine-cache-bundle/Resources/doc/custom_providers.rst b/vendor/doctrine/doctrine-cache-bundle/Resources/doc/custom_providers.rst new file mode 100644 index 0000000000000000000000000000000000000000..e6725de28559796497053f1ccb2991c9d7802629 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Resources/doc/custom_providers.rst @@ -0,0 +1,67 @@ +Custom Providers +================ + +You can also register your own custom cache drivers: + +.. configuration-block:: + + .. code-block:: yaml + + # app/config/services.yml + services: + my_custom_provider_service: + class: "MyCustomType" + # ... + + # app/config/config.yml + doctrine_cache: + custom_providers: + my_custom_type: + prototype: "my_custom_provider_service" + definition_class: "MyCustomTypeDefinition" # optional configuration + + providers: + my_custom_type_provider: + my_custom_type: + config_foo: "foo" + config_bar: "bar" + + .. code-block:: xml + + + + + + + + + + + + + + + + my_custom_provider_service + MyCustomTypeDefinition + + + + + foo + bar + + + + + +.. note:: + + Definition class is a optional configuration that will parse option arguments + given to your custom cache driver. See `CacheDefinition code`_. + +.. _`CacheDefinition code`: https://github.com/doctrine/DoctrineCacheBundle/blob/master/DependencyInjection/Definition/CacheDefinition.php diff --git a/vendor/doctrine/doctrine-cache-bundle/Resources/doc/index.rst b/vendor/doctrine/doctrine-cache-bundle/Resources/doc/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..4fb1ae2e1548cb3e8041cc82a89b7ccbec4c1c76 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Resources/doc/index.rst @@ -0,0 +1,16 @@ +DoctrineCacheBundle +=================== + +The DoctrineCacheBundle allows your Symfony application to use different caching +systems through the `Doctrine Cache`_ library. + +.. toctree:: + + installation + usage + custom_providers + service_parameter + acl_cache + reference + +.. _`Doctrine Cache`: http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/caching.html diff --git a/vendor/doctrine/doctrine-cache-bundle/Resources/doc/installation.rst b/vendor/doctrine/doctrine-cache-bundle/Resources/doc/installation.rst new file mode 100644 index 0000000000000000000000000000000000000000..c139b7f5a1aec7daabe1acbb4498effe126d6c14 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Resources/doc/installation.rst @@ -0,0 +1,43 @@ +Installation +============ + +Step 1: Download the Bundle +--------------------------- + +Open a command console, enter your project directory and execute the +following command to download the latest stable version of this bundle: + +.. code-block:: bash + + $ composer require doctrine/doctrine-cache-bundle + +This command requires you to have Composer installed globally, as explained +in the `installation chapter`_ of the Composer documentation. + +Step 2: Enable the Bundle +------------------------- + +Then, enable the bundle by adding it to the list of registered bundles +in the ``app/AppKernel.php`` file of your project:: + + + + + + + + + + + + + + + + + + + + + + + + + + + + my_bucket_name + + + + + + + + + +See :doc:`reference` for all the specific configurations. diff --git a/vendor/doctrine/doctrine-cache-bundle/Resources/doc/usage.rst b/vendor/doctrine/doctrine-cache-bundle/Resources/doc/usage.rst new file mode 100644 index 0000000000000000000000000000000000000000..d4a7b47b18600610d24ab2826130fc61b5937ae0 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Resources/doc/usage.rst @@ -0,0 +1,95 @@ +Usage +===== + +First, configure your cache providers under the ``doctrine_cache`` configuration +option. Example: + +.. configuration-block:: + + .. code-block:: yaml + + # app/config/config.yml + doctrine_cache: + providers: + my_apc_metadata_cache: + type: apc + namespace: metadata_cache_ns + my_apc_query_cache: + namespace: query_cache_ns + apc: ~ + + .. code-block:: yaml + + + + + + + + apc + metadata_cache_ns + + + + + + + +Then, use the newly created ``doctrine_cache.providers.{provider_name}`` container +services anywhere in your application:: + + $apcCache = $this->container->get('doctrine_cache.providers.my_apc_cache'); + $arrayCache = $this->container->get('doctrine_cache.providers.my_array_cache'); + +Service Aliases +--------------- + +In order to make your code more concise, you can define aliases for these services +thanks to the ``aliases`` configuration option. Example: + +.. configuration-block:: + + .. code-block:: yaml + + # app/config/config.yml + doctrine_cache: + aliases: + cache_apc: my_apc_cache + + providers: + my_apc_cache: + type: apc + namespace: my_apc_cache_ns + aliases: + - apc_cache + + .. code-block:: xml + + + + + + + + my_apc_cache + + + apc + my_apc_cache_ns + apc_cache + + + + +Now you can use the short ``apc_cache`` alias to get the provider called +``my_apc_cache``, instead of using ``doctrine_cache.providers.my_apc_cache``:: + + $apcCache = $this->container->get('apc_cache'); diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Acl/Model/AclCacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Acl/Model/AclCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a6e26c0fa637abb185b96e67c6448d33db6645fc --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Acl/Model/AclCacheTest.php @@ -0,0 +1,194 @@ +cacheProvider = new ArrayCache(); + $this->permissionGrantingStrategy = new PermissionGrantingStrategy(); + $this->aclCache = new AclCache($this->cacheProvider, $this->permissionGrantingStrategy); + } + + public function tearDown() + { + $this->cacheProvider = null; + $this->permissionGrantingStrategy = null; + $this->aclCache = null; + } + + /** + * @dataProvider provideDataForEvictFromCacheById + */ + public function testEvictFromCacheById($expected, $primaryKey) + { + $this->cacheProvider->save('bar', 'foo_1'); + $this->cacheProvider->save('foo_1', 's:4:test;'); + + $this->aclCache->evictFromCacheById($primaryKey); + + $this->assertEquals($expected, $this->cacheProvider->contains('bar')); + $this->assertEquals($expected, $this->cacheProvider->contains('foo_1')); + } + + public function provideDataForEvictFromCacheById() + { + return array( + array(false, 'bar'), + array(true, 'test'), + ); + } + + /** + * @dataProvider provideDataForEvictFromCacheByIdentity + */ + public function testEvictFromCacheByIdentity($expected, $identity) + { + $this->cacheProvider->save('foo_1', 's:4:test;'); + + $this->aclCache->evictFromCacheByIdentity($identity); + + $this->assertEquals($expected, $this->cacheProvider->contains('foo_1')); + } + + public function provideDataForEvictFromCacheByIdentity() + { + return array( + array(false, new ObjectIdentity(1, 'foo')), + ); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testPutInCacheWithoutId() + { + $acl = new Acl(null, new ObjectIdentity(1, 'foo'), $this->permissionGrantingStrategy, array(), false); + + $this->aclCache->putInCache($acl); + } + + public function testPutInCacheWithoutParent() + { + $acl = $this->getAcl(0); + + $this->aclCache->putInCache($acl); + + $this->assertTrue($this->cacheProvider->contains('foo1_class')); + $this->assertTrue($this->cacheProvider->contains('oid1')); + } + + public function testPutInCacheWithParent() + { + $acl = $this->getAcl(2); + + $this->aclCache->putInCache($acl); + + // current + $this->assertTrue($this->cacheProvider->contains('foo2_class')); + $this->assertTrue($this->cacheProvider->contains('oid2')); + + // parent + $this->assertTrue($this->cacheProvider->contains('foo3_class')); + $this->assertTrue($this->cacheProvider->contains('oid3')); + + // grand-parent + $this->assertTrue($this->cacheProvider->contains('foo4_class')); + $this->assertTrue($this->cacheProvider->contains('oid4')); + } + + public function testClearCache() + { + $acl = $this->getAcl(0); + + $this->aclCache->putInCache($acl); + $this->aclCache->clearCache(); + + $this->assertFalse($this->cacheProvider->contains('foo5_class')); + $this->assertFalse($this->cacheProvider->contains('oid5')); + } + + public function testGetFromCacheById() + { + $acl = $this->getAcl(1); + + $this->aclCache->putInCache($acl); + + $cachedAcl = $this->aclCache->getFromCacheById($acl->getId()); + + $this->assertEquals($acl->getId(), $cachedAcl->getId()); + $this->assertNotNull($cachedParentAcl = $cachedAcl->getParentAcl()); + $this->assertEquals($acl->getParentAcl()->getId(), $cachedParentAcl->getId()); + + $this->assertEquals($acl->getClassFieldAces('foo'), $cachedAcl->getClassFieldAces('foo')); + $this->assertEquals($acl->getObjectFieldAces('foo'), $cachedAcl->getObjectFieldAces('foo')); + } + + public function testGetFromCacheByIdentity() + { + $acl = $this->getAcl(1); + + $this->aclCache->putInCache($acl); + + $cachedAcl = $this->aclCache->getFromCacheByIdentity($acl->getObjectIdentity()); + + $this->assertEquals($acl->getId(), $cachedAcl->getId()); + $this->assertNotNull($cachedParentAcl = $cachedAcl->getParentAcl()); + $this->assertEquals($acl->getParentAcl()->getId(), $cachedParentAcl->getId()); + + $this->assertEquals($acl->getClassFieldAces('foo'), $cachedAcl->getClassFieldAces('foo')); + $this->assertEquals($acl->getObjectFieldAces('foo'), $cachedAcl->getObjectFieldAces('foo')); + } + + protected function getAcl($depth = 0) + { + static $id = 1; + + $acl = new Acl( + 'oid' . $id, + new ObjectIdentity('class', 'foo' . $id), + $this->permissionGrantingStrategy, + array(), + $depth > 0 + ); + + // insert some ACEs + $sid = new UserSecurityIdentity('johannes', 'Foo'); + + $acl->insertClassAce($sid, 1); + $acl->insertClassFieldAce('foo', $sid, 1); + $acl->insertObjectAce($sid, 1); + $acl->insertObjectFieldAce('foo', $sid, 1); + + $id++; + + if ($depth > 0) { + $acl->setParentAcl($this->getAcl($depth - 1)); + } + + return $acl; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/AbstractDoctrineCacheExtensionTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/AbstractDoctrineCacheExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ef0384ca4902ad8c6df3501a3e3fca265c71aab0 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/AbstractDoctrineCacheExtensionTest.php @@ -0,0 +1,382 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\DependencyInjection; + +use Doctrine\Bundle\DoctrineCacheBundle\Tests\TestCase; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass; +use Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\DoctrineCacheExtension; + +/** + * @group Extension + * @group DependencyInjection + */ +abstract class AbstractDoctrineCacheExtensionTest extends TestCase +{ + protected function setUp() + { + parent::setUp(); + } + + abstract protected function loadFromFile(ContainerBuilder $container, $file); + + public function testParameters() + { + $container = $this->createContainer(); + $cacheExtension = new DoctrineCacheExtension(); + + $cacheExtension->load(array(), $container); + + $this->assertTrue($container->hasParameter('doctrine_cache.apc.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.array.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.couchbase.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.file_system.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.memcached.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.memcache.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.mongodb.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.php_file.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.redis.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.riak.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.sqlite3.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.void.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.xcache.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.wincache.class')); + $this->assertTrue($container->hasParameter('doctrine_cache.zenddata.class')); + } + + public function testBasicCache() + { + $container = $this->compileContainer('basic'); + $drivers = array( + 'basic_apc_provider' => '%doctrine_cache.apc.class%', + 'basic_array_provider' => '%doctrine_cache.array.class%', + 'basic_void_provider' => '%doctrine_cache.void.class%', + 'basic_xcache_provider' => '%doctrine_cache.xcache.class%', + 'basic_wincache_provider' => '%doctrine_cache.wincache.class%', + 'basic_zenddata_provider' => '%doctrine_cache.zenddata.class%', + 'basic_ns_zenddata_provider' => '%doctrine_cache.zenddata.class%', + + 'basic_apc_provider2' => '%doctrine_cache.apc.class%', + 'basic_array_provider2' => '%doctrine_cache.array.class%', + 'basic_void_provider2' => '%doctrine_cache.void.class%', + 'basic_xcache_provider2' => '%doctrine_cache.xcache.class%', + 'basic_wincache_provider2' => '%doctrine_cache.wincache.class%', + 'basic_zenddata_provider2' => '%doctrine_cache.zenddata.class%', + ); + + foreach ($drivers as $key => $value) { + $this->assertCacheProvider($container, $key, $value); + } + } + + public function testBasicConfigurableCache() + { + $container = $this->compileContainer('configurable'); + $drivers = array( + 'configurable_chain_provider' => array( + '%doctrine_cache.chain.class%' + ), + 'configurable_couchbase_provider' => array( + '%doctrine_cache.couchbase.class%' + ), + 'configurable_filesystem_provider' => array( + '%doctrine_cache.file_system.class%' + ), + 'configurable_memcached_provider' => array( + '%doctrine_cache.memcached.class%', array('setMemcached' => array()) + ), + 'configurable_memcache_provider' => array( + '%doctrine_cache.memcache.class%', array('setMemcache' => array()) + ), + 'configurable_mongodb_provider' => array( + '%doctrine_cache.mongodb.class%' + ), + 'configurable_phpfile_provider' => array( + '%doctrine_cache.php_file.class%' + ), + 'configurable_redis_provider' => array( + '%doctrine_cache.redis.class%', array('setRedis' => array()) + ), + 'configurable_riak_provider' => array( + '%doctrine_cache.riak.class%' + ), + 'configurable_sqlite3_provider' => array( + '%doctrine_cache.sqlite3.class%' + ), + ); + + foreach ($drivers as $id => $value) { + $this->assertCacheProvider($container, $id, $value[0]); + } + } + + public function testBasicConfigurableDefaultCache() + { + $container = $this->compileContainer('configurable_defaults'); + $drivers = array( + 'configurable_memcached_provider' => array( + '%doctrine_cache.memcached.class%', array('setMemcached' => array()) + ), + 'configurable_memcache_provider' => array( + '%doctrine_cache.memcache.class%', array('setMemcache' => array()) + ), + 'configurable_redis_provider' => array( + '%doctrine_cache.redis.class%', array('setRedis' => array()) + ), + 'configurable_mongodb_provider' => array( + '%doctrine_cache.mongodb.class%' + ), + 'configurable_riak_provider' => array( + '%doctrine_cache.riak.class%' + ), + 'configurable_filesystem_provider' => array( + '%doctrine_cache.file_system.class%' + ), + 'configurable_phpfile_provider' => array( + '%doctrine_cache.php_file.class%' + ), + 'configurable_couchbase_provider' => array( + '%doctrine_cache.couchbase.class%' + ), + 'configurable_memcached_provider_type' => array( + '%doctrine_cache.memcached.class%', array('setMemcached' => array()) + ), + 'configurable_memcache_provider_type' => array( + '%doctrine_cache.memcache.class%', array('setMemcache' => array()) + ), + 'configurable_redis_provider_type' => array( + '%doctrine_cache.redis.class%', array('setRedis' => array()) + ), + 'configurable_mongodb_provider_type' => array( + '%doctrine_cache.mongodb.class%' + ), + 'configurable_riak_provider_type' => array( + '%doctrine_cache.riak.class%' + ), + 'configurable_filesystem_provider_type' => array( + '%doctrine_cache.file_system.class%' + ), + 'configurable_phpfile_provider_type' => array( + '%doctrine_cache.php_file.class%' + ), + 'configurable_couchbase_provider_type' => array( + '%doctrine_cache.couchbase.class%' + ), + ); + + foreach ($drivers as $id => $value) { + $this->assertCacheProvider($container, $id, $value[0]); + } + } + + public function testBasicNamespaceCache() + { + $container = $this->compileContainer('namespaced'); + $drivers = array( + 'doctrine_cache.providers.foo_namespace_provider' => 'foo_namespace', + 'doctrine_cache.providers.barNamespaceProvider' => 'barNamespace', + ); + + foreach ($drivers as $key => $value) { + $this->assertTrue($container->hasDefinition($key)); + + $def = $container->getDefinition($key); + $calls = $def->getMethodCalls(); + + $this->assertEquals('setNamespace', $calls[0][0]); + $this->assertEquals($value, $calls[0][1][0]); + } + } + + public function testAliasesCache() + { + $container = $this->compileContainer('aliased'); + $providers = array( + 'doctrine_cache.providers.foo_namespace_provider' => array('fooNamespaceProvider', 'foo'), + 'doctrine_cache.providers.barNamespaceProvider' => array('bar_namespace_provider', 'bar'), + ); + + foreach ($providers as $key => $aliases) { + $this->assertTrue($container->hasDefinition($key)); + + foreach ($aliases as $alias) { + $this->assertEquals(strtolower($key), (string) $container->getAlias($alias)); + } + } + } + + public function testServiceParameters() + { + $container = $this->compileContainer('service_parameter'); + $providers = array( + 'service_bucket_riak_provider' => array( + '%doctrine_cache.riak.class%' + ), + 'service_connection_riak_provider' => array( + '%doctrine_cache.riak.class%' + ), + 'service_connection_memcached_provider' => array( + '%doctrine_cache.memcached.class%' + ), + 'service_connection_memcache_provider' => array( + '%doctrine_cache.memcache.class%' + ), + 'service_connection_redis_provider' => array( + '%doctrine_cache.redis.class%' + ), + 'service_connection_mongodb_provider' => array( + '%doctrine_cache.mongodb.class%' + ), + 'service_collection_mongodb_provider' => array( + '%doctrine_cache.mongodb.class%' + ), + 'service_connection_sqlite3_provider' => array( + '%doctrine_cache.sqlite3.class%' + ), + ); + + foreach ($providers as $id => $value) { + $this->assertCacheProvider($container, $id, $value[0]); + } + } + + public function testCustomCacheProviders() + { + $container = $this->compileContainer('custom_providers'); + $providers = array( + 'my_custom_type_provider' => array( + 'Doctrine\Bundle\DoctrineCacheBundle\Tests\DependencyInjection\Fixtures\Cache\MyCustomType', + array('addConfig' => array( + array('config_foo', 'foo'), + array('config_bar', 'bar'), + )) + ), + 'my_custom_type_provider2' => array( + 'Doctrine\Bundle\DoctrineCacheBundle\Tests\DependencyInjection\Fixtures\Cache\MyCustomType', + array() + ), + ); + + foreach ($providers as $id => $value) { + $this->assertCacheProvider($container, $id, $value[0], $value[1]); + } + } + + /** + * @expectedException InvalidArgumentException + * @expectedExceptionMessage "unrecognized_type" is an unrecognized Doctrine cache driver. + */ + public function testUnrecognizedCacheDriverException() + { + $this->compileContainer('unrecognized'); + } + + public function testAcl() + { + $container = $this->compileContainer('acl'); + + $this->assertTrue($container->hasDefinition('doctrine_cache.security.acl.cache')); + + $definition = $container->getDefinition('doctrine_cache.security.acl.cache'); + + $this->assertEquals('Doctrine\Bundle\DoctrineCacheBundle\Acl\Model\AclCache', $definition->getClass()); + $this->assertCount(2, $definition->getArguments()); + $this->assertEquals('doctrine_cache.providers.acl_apc_provider', (string) $definition->getArgument(0)); + $this->assertEquals('security.acl.permission_granting_strategy', (string) $definition->getArgument(1)); + $this->assertFalse($definition->isPublic()); + } + + public function assertCacheProvider(ContainerBuilder $container, $name, $class, array $expectedCalls = array()) + { + $service = "doctrine_cache.providers." . $name; + + $this->assertTrue($container->hasDefinition($service)); + + $definition = $container->getDefinition($service); + + $this->assertTrue($definition->isPublic()); + $this->assertEquals($class, $definition->getClass()); + + foreach (array_unique($expectedCalls) as $methodName => $params) { + $this->assertMethodCall($definition, $methodName, $params); + } + } + + public function assertCacheResource(ContainerBuilder $container, $name, $class, array $expectedCalls = array()) + { + $service = "doctrine_cache.services.$name"; + + $this->assertTrue($container->hasDefinition($service)); + + $definition = $container->getDefinition($service); + + $this->assertTrue($definition->isPublic()); + $this->assertEquals($class, $definition->getClass()); + + foreach ($expectedCalls as $methodName => $params) { + $this->assertMethodCall($definition, $methodName, $params); + } + } + + private function assertMethodCall(Definition $definition, $methodName, array $parameters = array()) + { + $methodCalls = $definition->getMethodCalls(); + $actualCalls = array(); + + foreach ($methodCalls as $call) { + $actualCalls[$call[0]][] = $call[1]; + } + + $this->assertArrayHasKey($methodName, $actualCalls); + $this->assertCount(count($parameters), $actualCalls[$methodName]); + + foreach ($parameters as $index => $param) { + $this->assertArrayHasKey($index, $actualCalls[$methodName]); + $this->assertEquals($param, $actualCalls[$methodName][$index]); + } + } + + /** + * @param string $file + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Symfony\Component\DependencyInjection\ContainerBuilder + */ + protected function compileContainer($file, ContainerBuilder $container = null) + { + $container = $container ?: $this->createContainer(); + $cacheExtension = new DoctrineCacheExtension(); + + $container->registerExtension($cacheExtension); + + $compilerPassConfig = $container->getCompilerPassConfig(); + + $compilerPassConfig->setOptimizationPasses(array(new ResolveDefinitionTemplatesPass())); + $compilerPassConfig->setRemovingPasses(array()); + + $this->loadFromFile($container, $file); + + $container->compile(); + + return $container; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/XmlBundle.php b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/XmlBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..eb35d097b84b7741b4b5b6d0e3e6f2412d8768fc --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/XmlBundle.php @@ -0,0 +1,22 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Fixtures\Bundles\YamlBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class XmlBundle extends Bundle +{ + +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/Bundles/YamlBundle/YamlBundle.php b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/Bundles/YamlBundle/YamlBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..b76fee06dd432406b4dc1ada74f62acb052bbb0d --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/Bundles/YamlBundle/YamlBundle.php @@ -0,0 +1,22 @@ + + * (c) Doctrine Project, Benjamin Eberlei + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Fixtures\Bundles\YamlBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class YamlBundle extends Bundle +{ + +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/Cache/MyCustomType.php b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/Cache/MyCustomType.php new file mode 100644 index 0000000000000000000000000000000000000000..2dbbdc085ed97ce7da1e2c083e754b0ed1cef8d6 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/Cache/MyCustomType.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\DependencyInjection\Fixtures\Cache; + +use Doctrine\Common\Cache\ArrayCache; + +class MyCustomType extends ArrayCache +{ + public $configs; + + public function addConfig($name, $value) + { + $this->configs[$name] = $value; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/Definition/MyCustomTypeDefinition.php b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/Definition/MyCustomTypeDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..7a91e23604457eee12e33529c6d676dfffb88217 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/Definition/MyCustomTypeDefinition.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 Doctrine\Bundle\DoctrineCacheBundle\Tests\DependencyInjection\Fixtures\Definition; + +use Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\Definition\CacheDefinition; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; + +class MyCustomTypeDefinition extends CacheDefinition +{ + /** + * {@inheritDoc} + */ + public function configure($name, array $config, Definition $service, ContainerBuilder $container) + { + foreach ($config['custom_provider']['options'] as $name => $value) { + $service->addMethodCall('addConfig', array($name, $value)); + } + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/acl.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/acl.xml new file mode 100644 index 0000000000000000000000000000000000000000..4dc3fabb67947eadabc1674688d1683012b3162a --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/acl.xml @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/aliased.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/aliased.xml new file mode 100644 index 0000000000000000000000000000000000000000..50975dfedd4cbe4f89330546905f1ff1ca4a6e79 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/aliased.xml @@ -0,0 +1,20 @@ + + + + + foo_namespace_provider + + + fooNamespaceProvider + + + + bar_namespace_provider + bar + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/basic.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/basic.xml new file mode 100644 index 0000000000000000000000000000000000000000..a14836313258db5098be27bc49cc4580e74ffeb4 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/basic.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/configurable.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/configurable.xml new file mode 100644 index 0000000000000000000000000000000000000000..8023bb391c4710ffa8213f76e6f5a2fda005f540 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/configurable.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + configurable_array_provider + configurable_apc_provider + + + + + + + + + + + + + + + + + + + + + + + + my_database + my_collection + + + + + + my_bucket + + false + 1 + + + + + + + my_table + + + + + + %kernel.cache_dir%/configurable-filesystem-provider + + + + + + %kernel.cache_dir%/configurable-phpfile-provider + + + + + + my_bucket + 127.0.0.1:809 + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/configurable_defaults.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/configurable_defaults.xml new file mode 100644 index 0000000000000000000000000000000000000000..59acc00d90f1cc40edd2aef339faf120e1ffb19c --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/configurable_defaults.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + memcached_provider_type + + + memcache_provider_type + + + redis_provider_type + + + mongodb_provider_type + + + memcached_provider_type + + + filesystem_provider_type + + + phpfile_provider_type + + + couchbase_provider_type + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/custom_providers.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/custom_providers.xml new file mode 100644 index 0000000000000000000000000000000000000000..d1f347e4ac19da7faa698d70c362336f006d36a3 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/custom_providers.xml @@ -0,0 +1,36 @@ + + + + + + + + + + my_custom_provider_service + Doctrine\Bundle\DoctrineCacheBundle\Tests\DependencyInjection\Fixtures\Definition\MyCustomTypeDefinition + + + + my_custom_provider_service + + + + + foo + bar + + + + + + foobar + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/namespaced.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/namespaced.xml new file mode 100644 index 0000000000000000000000000000000000000000..c968926b0f1ebbf6d66fd10da6622166c80028ec --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/namespaced.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/service_parameter.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/service_parameter.xml new file mode 100644 index 0000000000000000000000000000000000000000..f8b75a5c320823229fd827875fabfda17ef201c8 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/service_parameter.xml @@ -0,0 +1,95 @@ + + + + + + localhost + 8087 + + + + + my_service_bucket_name + + + + cache.db + + + + + localhost + 11211 + + + + + + localhost + 11211 + + + + + + localhost + 6379 + + + + + localhost:27017 + + + + my_database + my_cache_collection + + + + + + + + + + + my_bucket_name + + + + + + + + + + my_memcache_connection_service + + + + + + + + + + + + + + + + + + my_memcache_connection_service + my_database + my_cache_collection + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/unrecognized.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/unrecognized.xml new file mode 100644 index 0000000000000000000000000000000000000000..d2af5804a7a7115f6e012879c9cc4a41608d4582 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/xml/unrecognized.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/acl.yml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/acl.yml new file mode 100644 index 0000000000000000000000000000000000000000..5f5023b8c60dfd50773577714c81795b789d9aa4 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/acl.yml @@ -0,0 +1,6 @@ +doctrine_cache: + acl_cache: + id: 'doctrine_cache.providers.acl_apc_provider' + providers: + acl_apc_provider: + type: 'apc' \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/aliased.yml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/aliased.yml new file mode 100644 index 0000000000000000000000000000000000000000..6b682f15724c0dcc811662a9f5076e8d814925e8 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/aliased.yml @@ -0,0 +1,13 @@ +doctrine_cache: + aliases: + foo: foo_namespace_provider + providers: + foo_namespace_provider: + type: array + aliases: + - fooNamespaceProvider + barNamespaceProvider: + type: array + aliases: + - bar_namespace_provider + - bar \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/basic.yml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/basic.yml new file mode 100644 index 0000000000000000000000000000000000000000..23fea42638e15c899ce6e718252fee32b3317e04 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/basic.yml @@ -0,0 +1,30 @@ +doctrine_cache: + providers: + basic_apc_provider: + type: apc + basic_array_provider: + type: array + basic_void_provider: + type: void + basic_xcache_provider: + type: xcache + basic_wincache_provider: + type: wincache + basic_zenddata_provider: + type: zenddata + basic_ns_zenddata_provider: + type: zenddata + namespace: zenddata_ns + + basic_apc_provider2: + apc: ~ + basic_array_provider2: + array: ~ + basic_void_provider2: + void: ~ + basic_xcache_provider2: + xcache: ~ + basic_wincache_provider2: + wincache: ~ + basic_zenddata_provider2: + zenddata: ~ diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/configurable.yml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/configurable.yml new file mode 100644 index 0000000000000000000000000000000000000000..758f7fcfb2525b75fbe590b4e4d4b7f0f0a14abd --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/configurable.yml @@ -0,0 +1,67 @@ +doctrine_cache: + providers: + configurable_apc_provider: + apc: ~ + + configurable_array_provider: + array: ~ + + configurable_chain_provider: + chain: + providers: + - configurable_array_provider + - configurable_apc_provider + + configurable_memcached_provider: + memcached: + servers: + memcached01.ss: ~ + memcached02.ss: ~ + + configurable_memcache_provider: + memcache: + servers: + memcache01.ss: ~ + memcache02.ss: ~ + + configurable_redis_provider: + redis: + host: localhost + port: 11211 + + configurable_couchbase_provider: + couchbase: + hostnames: [ 127.0.0.1:809 ] + bucket_name: my_bucket + username: Administrator + password: password + + configurable_phpfile_provider: + php_file: + extension: phpc + directory: "%kernel.cache_dir%/configurable-phpfile-provider" + + configurable_filesystem_provider: + file_system: + extension: fsc + directory: "%kernel.cache_dir%/configurable-filesystem-provider" + + configurable_mongodb_provider: + mongodb: + server: localhost:11211 + database_name: my_database + collection_name: my_collection + + configurable_riak_provider: + riak: + host: localhost + port: 8087 + bucket_name: my_bucket + bucket_property_list: + allow_multiple: false + n_value: 1 + + configurable_sqlite3_provider: + sqlite3: + file_name: cache.db + table_name: my_table \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/configurable_defaults.yml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/configurable_defaults.yml new file mode 100644 index 0000000000000000000000000000000000000000..0e4835e9dd9627f44fb80c963a387f71ad11da00 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/configurable_defaults.yml @@ -0,0 +1,65 @@ +doctrine_cache: + providers: + configurable_memcached_provider: + memcached: ~ + + configurable_memcache_provider: + memcache: ~ + + configurable_redis_provider: + redis: ~ + + configurable_couchbase_provider: + couchbase: ~ + + configurable_phpfile_provider: + php_file: ~ + + configurable_filesystem_provider: + file_system: ~ + + configurable_mongodb_provider: + mongodb: ~ + + configurable_riak_provider: + riak: ~ + + configurable_memcached_provider_type: + type : memcached + aliases : + - memcached_provider_type + + configurable_memcache_provider_type: + type : memcache + aliases : + - memcache_provider_type + + configurable_redis_provider_type: + type : redis + aliases : + - redis_provider_type + + configurable_couchbase_provider_type: + type : couchbase + aliases : + - couchbase_provider_type + + configurable_phpfile_provider_type: + type : php_file + aliases : + - php_file_provider_type + + configurable_filesystem_provider_type: + type : file_system + aliases : + - file_system_provider_type + + configurable_mongodb_provider_type: + type : mongodb + aliases : + - mongodb_provider_type + + configurable_riak_provider_type: + type : riak + aliases : + - riak_provider_type \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/custom_providers.yml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/custom_providers.yml new file mode 100644 index 0000000000000000000000000000000000000000..cd5605df65fc5f5a8f705fccd92ffc48eceafbae --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/custom_providers.yml @@ -0,0 +1,22 @@ +services: + my_custom_provider_service: + class: Doctrine\Bundle\DoctrineCacheBundle\Tests\DependencyInjection\Fixtures\Cache\MyCustomType + +doctrine_cache: + custom_providers: + my_custom_type: + prototype: "my_custom_provider_service" + definition_class: Doctrine\Bundle\DoctrineCacheBundle\Tests\DependencyInjection\Fixtures\Definition\MyCustomTypeDefinition + + my_custom_type2: + prototype: "my_custom_provider_service" + + providers: + my_custom_type_provider: + my_custom_type: + config_foo: "foo" + config_bar: "bar" + + my_custom_type_provider2: + my_custom_type2: + config_foobar: "foobar" diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/namespaced.yml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/namespaced.yml new file mode 100644 index 0000000000000000000000000000000000000000..a4557740786777a12bd8aa08f4120ec1d6eb83cf --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/namespaced.yml @@ -0,0 +1,8 @@ +doctrine_cache: + providers: + foo_namespace_provider: + type: array + namespace: foo_namespace + barNamespaceProvider: + type: array + namespace: barNamespace \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/service_parameter.yml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/service_parameter.yml new file mode 100644 index 0000000000000000000000000000000000000000..80789ae375e0075e95713b9c6a86c29c5d27d71a --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/service_parameter.yml @@ -0,0 +1,77 @@ +services: + my_memcached_connection_service: + class: "%doctrine_cache.memcached.connection.class%" + calls: + - [addServer, ["localhost", 11211]] + + my_memcache_connection_service: + class: "%doctrine_cache.memcache.connection.class%" + calls: + - [connect, ["localhost", 11211]] + + my_mongodb_connection_service: + class: "%doctrine_cache.mongodb.connection.class%" + arguments: ["localhost:27017"] + + my_mongodb_collection_service: + class: "%doctrine_cache.mongodb.collection.class%" + arguments: ["my_database", "my_cache_collection"] + + my_redis_connection_service: + class: "%doctrine_cache.redis.connection.class%" + calls: + - [connect, ["localhost", 6379]] + + my_riak_connection_service: + class: "%doctrine_cache.riak.connection.class%" + arguments: ["localhost", 8087] + + my_riak_bucket_service: + class: "%doctrine_cache.riak.bucket.class%" + arguments: ["@my_riak_connection_service", "my_service_bucket_name"] + + my_sqlite3_connection_service: + class: "%doctrine_cache.sqlite3.connection.class%" + arguments: ["cache.db"] + +doctrine_cache: + providers: + service_connection_couchbase_provider: + couchbase: + connection_id: "my_couchbase_connection_service" + + service_connection_memcached_provider: + memcached: + connection_id: "my_memcached_connection_service" + + service_connection_memcache_provider: + memcache: + connection_id: "my_memcache_connection_service" + + service_collection_mongodb_provider: + mongodb: + collection_id: "my_mongodb_collection_service" + + service_connection_mongodb_provider: + mongodb: + connection_id: "my_mongodb_connection_service" + collection_name: "my_cache_collection" + database_name: "my_database" + + service_connection_redis_provider: + redis: + connection_id: "my_redis_connection_service" + + service_bucket_riak_provider: + riak: + bucket_id : "my_riak_bucket_service" + + service_connection_riak_provider: + riak: + connection_id: "my_riak_connection_service" + bucket_name: "my_bucket_name" + + service_connection_sqlite3_provider: + sqlite3: + connection_id: "my_sqlite3_connection_service" + table_name: 'my_table' diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/unrecognized.yml b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/unrecognized.yml new file mode 100644 index 0000000000000000000000000000000000000000..d946f93fb3102fef484646d231b6bcdf5a3cb17e --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/Fixtures/config/yml/unrecognized.yml @@ -0,0 +1,4 @@ +doctrine_cache: + providers: + unrecognized_cache_provider: + type: unrecognized_type \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/SymfonyBridgeAdapterTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/SymfonyBridgeAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6c1b72e3173296c457b8af345891b97dc14564b6 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/SymfonyBridgeAdapterTest.php @@ -0,0 +1,143 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\DependencyInjection; + +use Doctrine\Bundle\DoctrineCacheBundle\Tests\TestCase; +use Symfony\Component\DependencyInjection\Definition; +use Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\SymfonyBridgeAdapter; +use Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\CacheProviderLoader; + +/** + * @group Extension + * @group SymfonyBridge + * + * @author Kinn Coelho Julião + * @author Fabio B. Silva + */ +class SymfonyBridgeAdpterTest extends TestCase +{ + /** + * @var \Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\SymfonyBridgeAdapter + */ + private $adapter; + + protected function setUp() + { + parent::setUp(); + + $this->adapter = new SymfonyBridgeAdapter(new CacheProviderLoader(), 'doctrine.orm', 'orm'); + } + + public function providerBasicDrivers() + { + return array( + array('%doctrine_cache.apc.class%', array('type' => 'apc')), + array('%doctrine_cache.array.class%', array('type' => 'array')), + array('%doctrine_cache.xcache.class%', array('type' => 'xcache')), + array('%doctrine_cache.wincache.class%', array('type' => 'wincache')), + array('%doctrine_cache.zenddata.class%', array('type' => 'zenddata')), + array('%doctrine_cache.redis.class%', array('type' => 'redis'), array('setRedis')), + array('%doctrine_cache.memcache.class%', array('type' => 'memcache'), array('setMemcache')), + array('%doctrine_cache.memcached.class%', array('type' => 'memcached'), array('setMemcached')), + ); + } + + /** + * @param string $class + * @param array $config + * + * @dataProvider providerBasicDrivers + */ + public function testLoadBasicCacheDriver($class, array $config, array $expectedCalls = array()) + { + $container = $this->createServiceContainer(); + $cacheName = 'metadata_cache'; + $objectManager = array( + 'name' => 'default', + 'metadata_cache_driver' => $config + ); + + $this->adapter->loadObjectManagerCacheDriver($objectManager, $container, $cacheName); + $this->assertTrue($container->hasAlias('doctrine.orm.default_metadata_cache')); + + $alias = $container->getAlias('doctrine.orm.default_metadata_cache'); + $decorator = $container->getDefinition($alias); + $definition = $container->getDefinition($decorator->getParent()); + $defCalls = $decorator->getMethodCalls(); + $expectedCalls[] = 'setNamespace'; + $actualCalls = array_map(function ($call) { + return $call[0]; + }, $defCalls); + + $this->assertEquals($class, $definition->getClass()); + + foreach (array_unique($expectedCalls) as $call) { + $this->assertContains($call, $actualCalls); + } + } + + public function testServiceCacheDriver() + { + $cacheName = 'metadata_cache'; + $container = $this->createServiceContainer(); + $definition = new Definition('%doctrine.orm.cache.apc.class%'); + $objectManager = array( + 'name' => 'default', + 'metadata_cache_driver' => array( + 'type' => 'service', + 'id' => 'service_driver' + ) + ); + + $container->setDefinition('service_driver', $definition); + + $this->adapter->loadObjectManagerCacheDriver($objectManager, $container, $cacheName); + + $this->assertTrue($container->hasAlias('doctrine.orm.default_metadata_cache')); + } + + /** + * @expectedException InvalidArgumentException + * @expectedExceptionMessage "unrecognized_type" is an unrecognized Doctrine cache driver. + */ + public function testUnrecognizedCacheDriverException() + { + $cacheName = 'metadata_cache'; + $container = $this->createServiceContainer(); + $objectManager = array( + 'name' => 'default', + 'metadata_cache_driver' => array( + 'type' => 'unrecognized_type' + ) + ); + + $this->adapter->loadObjectManagerCacheDriver($objectManager, $container, $cacheName); + } + + public function testLoadServicesConfiguration() + { + $container = $this->createContainer(); + + $this->assertFalse($container->hasParameter('doctrine_cache.array.class')); + $this->adapter->loadServicesConfiguration($container); + $this->assertTrue($container->hasParameter('doctrine_cache.array.class')); + } +} \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/XmlDoctrineCacheExtensionTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/XmlDoctrineCacheExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d63bbbe1fc8869e167693e151c08e27d67ff936f --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/XmlDoctrineCacheExtensionTest.php @@ -0,0 +1,41 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\DependencyInjection; + +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\FileLocator; + +/** + * @group Extension + * @group DependencyInjection + */ +class XmlDoctrineCacheExtensionTest extends AbstractDoctrineCacheExtensionTest +{ + /** + * {@inheritdoc} + */ + protected function loadFromFile(ContainerBuilder $container, $file) + { + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/Fixtures/config/xml')); + + $loader->load($file . '.xml'); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/YmlDoctrineCacheExtensionTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/YmlDoctrineCacheExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..85ecfe5c61c509e26a6cb1b8beaf7caea46fb6e4 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/DependencyInjection/YmlDoctrineCacheExtensionTest.php @@ -0,0 +1,41 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\DependencyInjection; + +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\FileLocator; + +/** + * @group Extension + * @group DependencyInjection + */ +class YmlDoctrineCacheExtensionTest extends AbstractDoctrineCacheExtensionTest +{ + /** + * {@inheritdoc} + */ + protected function loadFromFile(ContainerBuilder $container, $file) + { + $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/Fixtures/config/yml')); + + $loader->load($file . '.yml'); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/ArrayCacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/ArrayCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e0bb784b5bd5cd12052fe468d02c5d88d0ec31f7 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/ArrayCacheTest.php @@ -0,0 +1,39 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional; + +/** + * @group Functional + * @group Array + */ +class ArrayCacheTest extends BaseCacheTest +{ + /** + * {@inheritDoc} + */ + protected function createCacheDriver() + { + $container = $this->compileContainer('array'); + $cache = $container->get('doctrine_cache.providers.my_array_cache'); + + return $cache; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/BaseCacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/BaseCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0e297289bd420646c09cfaaf0ebd157b87c789ec --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/BaseCacheTest.php @@ -0,0 +1,48 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional; + +use Doctrine\Bundle\DoctrineCacheBundle\Tests\FunctionalTestCase; + +/** + * @group Functional + */ +abstract class BaseCacheTest extends FunctionalTestCase +{ + /** + * @return \Doctrine\Common\Cache\Cache + */ + abstract protected function createCacheDriver(); + + public function testCacheDriver() + { + $cache = $this->createCacheDriver(); + + $this->assertNotNull($cache); + $this->assertInstanceOf('Doctrine\Common\Cache\Cache', $cache); + + $this->assertTrue($cache->save('key', 'value')); + $this->assertTrue($cache->contains('key')); + $this->assertEquals('value', $cache->fetch('key')); + $this->assertTrue($cache->delete('key')); + $this->assertFalse($cache->contains('key')); + } +} \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/ChainCacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/ChainCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..211ecc3d475aa6790bbc78ca7d62d59b1a6f9c37 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/ChainCacheTest.php @@ -0,0 +1,48 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional; + +/** + * @group Functional + * @group Chain + */ +class ChainCacheTest extends BaseCacheTest +{ + public function setUp() + { + parent::setUp(); + + if (!class_exists('Doctrine\Common\Cache\ChainCache')) { + $this->markTestSkipped('The ' . __CLASS__ .' requires the use of ChainCache available in doctrine/cache since 1.4'); + } + } + + /** + * {@inheritDoc} + */ + protected function createCacheDriver() + { + $container = $this->compileContainer('chain'); + $cache = $container->get('doctrine_cache.providers.my_chain_cache'); + + return $cache; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/CommandTestCase.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/CommandTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..fa79108b62683ce6e4eccf0324e01fd4ca7054f0 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/CommandTestCase.php @@ -0,0 +1,88 @@ +container = $this->compileContainer('array'); + $this->provider = $this->container->get('doctrine_cache.providers.' . $this->cacheName); + $this->kernel = $this->getMockKernel(); + $this->app = new Application($this->kernel); + } + + /** + * @param \Doctrine\Bundle\DoctrineCacheBundle\Command\CacheCommand $command + * + * @return \Symfony\Component\Console\Tester\CommandTester + */ + protected function getTester(CacheCommand $command) + { + $command->setContainer($this->container); + $command->setApplication($this->app); + + return new CommandTester($command); + } + + /** + * Gets Kernel mock instance + * + * @return \Symfony\Component\HttpKernel\Kernel + */ + private function getMockKernel() + { + return $this->getMock('\Symfony\Component\HttpKernel\Kernel', array(), array(), '', false, false); + } + + /** + * Gets Filesystem mock instance + * + * @return \Symfony\Bundle\FrameworkBundle\Util\Filesystem + */ + private function getMockFilesystem() + { + return $this->getMock('\Symfony\Bundle\FrameworkBundle\Util\Filesystem', array(), array(), '', false, false); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/ContainsCommandTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/ContainsCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..923d68f81895d43467468104369c09bafa3106a2 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/ContainsCommandTest.php @@ -0,0 +1,60 @@ + + */ +class ContainsCommandTest extends CommandTestCase +{ + /** + * @var \Doctrine\Bundle\DoctrineCacheBundle\Command\ContainsCommand + */ + protected $command; + + /** + * @var \Symfony\Component\Console\Tester\CommandTester + */ + protected $tester; + + /** + * {@inheritdoc} + */ + public function setUp() + { + parent::setUp(); + + $this->command = new ContainsCommand(); + $this->tester = $this->getTester($this->command); + } + + /** + * Tests if a cache does not contain an entry. + */ + public function testContainsFalse() + { + $this->tester->execute(array( + 'cache-name' => $this->cacheName, + 'cache-id' => $this->cacheId, + )); + $this->assertEquals("FALSE\n", $this->tester->getDisplay()); + } + + /** + * Tests if a cache contains an entry. + */ + public function testContainsTrue() + { + $this->provider->save($this->cacheId, 'hello world'); + $this->tester->execute(array( + 'cache-name' => $this->cacheName, + 'cache-id' => $this->cacheId, + )); + $this->assertEquals("TRUE\n", $this->tester->getDisplay()); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/DeleteCommandTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/DeleteCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bc0f7f70f5d2aa49bc3635a47ab229ff86cc4eab --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/DeleteCommandTest.php @@ -0,0 +1,61 @@ + + */ +class DeleteCommandTest extends CommandTestCase +{ + /** + * @var \Doctrine\Bundle\DoctrineCacheBundle\Command\DeleteCommand + */ + protected $command; + + /** + * @var \Symfony\Component\Console\Tester\CommandTester + */ + protected $tester; + + /** + * {@inheritdoc} + */ + public function setUp() + { + parent::setUp(); + + $this->command = new DeleteCommand(); + $this->tester = $this->getTester($this->command); + } + + /** + * Tests a cache delete success. + */ + public function testDeleteSuccess() + { + $this->provider->save($this->cacheId, 'hello world'); + $this->tester->execute(array( + 'cache-name' => $this->cacheName, + 'cache-id' => $this->cacheId, + )); + $this->assertEquals("Deletion of {$this->cacheId} in {$this->cacheName} has succeeded\n", $this->tester->getDisplay()); + } + + /** + * Tests a cache delete all. + */ + public function testDeleteAll() + { + $this->tester->execute(array( + 'cache-name' => $this->cacheName, + 'cache-id' => $this->cacheId, + '--all' => true + )); + $this->assertEquals("Deletion of all entries in {$this->cacheName} has succeeded\n", $this->tester->getDisplay()); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/FlushCommandTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/FlushCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..195eca289a9b8871ce5598e54eee530a8598892d --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/FlushCommandTest.php @@ -0,0 +1,46 @@ + + */ +class FlushCommandTest extends CommandTestCase +{ + /** + * @var \Doctrine\Bundle\DoctrineCacheBundle\Command\FlushCommand + */ + protected $command; + + /** + * @var \Symfony\Component\Console\Tester\CommandTester + */ + protected $tester; + + /** + * {@inheritdoc} + */ + public function setUp() + { + parent::setUp(); + + $this->command = new FlushCommand(); + $this->tester = $this->getTester($this->command); + } + + /** + * Tests flushing a cache. + */ + public function testFlush() + { + $this->tester->execute(array( + 'cache-name' => $this->cacheName, + )); + $this->assertEquals("Clearing the cache for the {$this->cacheName} provider of type {$this->cacheProviderClass}\n", $this->tester->getDisplay()); + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/StatsCommandTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/StatsCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0c0c560162c7189ac5710fbae82111451fcf8fa8 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/StatsCommandTest.php @@ -0,0 +1,65 @@ + + */ +class StatsCommandTest extends CommandTestCase +{ + /** + * @var \Doctrine\Bundle\DoctrineCacheBundle\Command\StatsCommand + */ + protected $command; + + /** + * @var \Symfony\Component\Console\Tester\CommandTester + */ + protected $tester; + + /** + * {@inheritdoc} + */ + public function setUp() + { + parent::setUp(); + + $this->command = new StatsCommand(); + $this->tester = $this->getTester($this->command); + } + + /** + * Tests getting cache provider stats. + */ + public function testStats() + { + $this->tester->execute(array( + 'cache-name' => $this->cacheName, + )); + + $stats = $this->tester->getDisplay(); + + if (strpos($stats, 'Stats were not') === false) { + // This test is for Doctrine/Cache >= 1.6.0 only + $this->assertStringStartsWith( + "Stats for the {$this->cacheName} provider of type Doctrine\\Common\\Cache\\ArrayCache:", + $stats + ); + $this->assertContains("[hits] 0\n", $stats); + $this->assertContains("[misses] 0\n", $stats); + $this->assertRegExp('/\[uptime\] [0-9]{10}' . "\n/", $stats); + $this->assertContains("[memory_usage] \n", $stats); + $this->assertContains("[memory_available] \n", $stats); + } else { + // This test is for Doctrine/Cache < 1.6.0 only + $this->assertEquals("Stats were not provided for the {$this->cacheName} provider of type Doctrine\\Common\\Cache\\ArrayCache\n", $this->tester->getDisplay()); + } + + + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/FileSystemCacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/FileSystemCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e2af9e00053f8e65fa3b29948806b9ff0882a737 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/FileSystemCacheTest.php @@ -0,0 +1,39 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional; + +/** + * @group Functional + * @group FileSystem + */ +class FileSystemCacheTest extends BaseCacheTest +{ + /** + * {@inheritDoc} + */ + protected function createCacheDriver() + { + $container = $this->compileContainer('file_system'); + $cache = $container->get('doctrine_cache.providers.my_filesystem_cache'); + + return $cache; + } +} \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/Memcached.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/Memcached.php new file mode 100644 index 0000000000000000000000000000000000000000..187a76dab818b33a8fcaa73b1f3bef4cfa593177 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/Memcached.php @@ -0,0 +1,21 @@ +persistentId = $persistent_id; + } + + public function getPersistentId() + { + return $this->persistentId; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/array.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/array.xml new file mode 100644 index 0000000000000000000000000000000000000000..e3a2936d03bac3f72788bef26666ef98e46beab6 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/array.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/chain.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/chain.xml new file mode 100644 index 0000000000000000000000000000000000000000..e870e8191fefa494be44b0a2bd8dd2aeb88a6d0c --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/chain.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + my_array_cache + my_second_array_cache + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/file_system.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/file_system.xml new file mode 100644 index 0000000000000000000000000000000000000000..f4baecd9760e1e1634c3a2d838d36f345da8bfdf --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/file_system.xml @@ -0,0 +1,15 @@ + + + + + + + %kernel.cache_dir%/configurable-filesystem-provider + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/memcache.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/memcache.xml new file mode 100644 index 0000000000000000000000000000000000000000..d1b094ff54c61c66c7a59b51af7089b15b5662ed --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/memcache.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/memcached.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/memcached.xml new file mode 100644 index 0000000000000000000000000000000000000000..80f732433e6ec63ae7b99fb3f3e45f08a8d924d1 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/memcached.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/mongodb.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/mongodb.xml new file mode 100644 index 0000000000000000000000000000000000000000..57aab64d31d7cbaae654f38201a82be73c90d8ec --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/mongodb.xml @@ -0,0 +1,16 @@ + + + + + + + my_database + my_collection + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/php_file.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/php_file.xml new file mode 100644 index 0000000000000000000000000000000000000000..2203e52640f5afea32cc6ce07dc3c6b52fb79ae8 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/php_file.xml @@ -0,0 +1,15 @@ + + + + + + + %kernel.cache_dir%/configurable-phpfile-provider + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/predis.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/predis.xml new file mode 100644 index 0000000000000000000000000000000000000000..0c13dea7bc50838d1176242100cb2784ba666c59 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/predis.xml @@ -0,0 +1,19 @@ + + + + + + + 2 + 10 + + test_ + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/riak.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/riak.xml new file mode 100644 index 0000000000000000000000000000000000000000..49a7f04d7dd15ced44a474070abb8232373d32c6 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/riak.xml @@ -0,0 +1,19 @@ + + + + + + + my_bucket + + false + 1 + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/sqlite3.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/sqlite3.xml new file mode 100644 index 0000000000000000000000000000000000000000..641d863eadc2864a0026b3d142832bc784aa22b0 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/sqlite3.xml @@ -0,0 +1,15 @@ + + + + + + + my_table + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/void.xml b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/void.xml new file mode 100644 index 0000000000000000000000000000000000000000..217256a59bf05a734537b79844a96b6d57a8ae2b --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Fixtures/config/void.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/MemcacheCacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/MemcacheCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ca5a135e4b427480b77cc10de8edc9cd7369397e --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/MemcacheCacheTest.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional; + +/** + * @group Functional + * @group Memcache + */ +class MemcacheCacheTest extends BaseCacheTest +{ + /** + * {@inheritDoc} + */ + protected function setUp() + { + parent::setUp(); + + if ( ! extension_loaded('memcache')) { + $this->markTestSkipped('The ' . __CLASS__ .' requires the use of memcache'); + } + + if (@fsockopen('localhost', 11211) === false) { + $this->markTestSkipped('The ' . __CLASS__ .' cannot connect to memcache'); + } + } + + /** + * {@inheritDoc} + */ + protected function createCacheDriver() + { + $container = $this->compileContainer('memcache'); + $cache = $container->get('doctrine_cache.providers.my_memcache_cache'); + + return $cache; + } +} \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/MemcachedCacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/MemcachedCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a32e7a1d642084f9c0507d667975fb74c735d455 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/MemcachedCacheTest.php @@ -0,0 +1,68 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional; + +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * @group Functional + * @group Memcached + */ +class MemcachedCacheTest extends BaseCacheTest +{ + public function testPersistentId() + { + $cache = $this->createCacheDriver(); + $this->assertEquals('app', $cache->getMemcached()->getPersistentId()); + } + + /** + * {@inheritDoc} + */ + protected function setUp() + { + parent::setUp(); + + if ( ! extension_loaded('memcached')) { + $this->markTestSkipped('The ' . __CLASS__ .' requires the use of memcached'); + } + + if (@fsockopen('localhost', 11211) === false) { + $this->markTestSkipped('The ' . __CLASS__ .' cannot connect to memcached'); + } + } + + protected function overrideContainer(ContainerBuilder $container) + { + $container->setParameter('doctrine_cache.memcached.connection.class', 'Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional\Fixtures\Memcached'); + } + + /** + * {@inheritDoc} + */ + protected function createCacheDriver() + { + $container = $this->compileContainer('memcached'); + $cache = $container->get('doctrine_cache.providers.my_memcached_cache'); + + return $cache; + } +} \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/MongoDBCacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/MongoDBCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6bf1943cab9b15ede2d7415f9972f709818e29f0 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/MongoDBCacheTest.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional; + +/** + * @group Functional + * @group MongoDB + */ +class MongoDBCacheTest extends BaseCacheTest +{ + /** + * {@inheritDoc} + */ + protected function setUp() + { + parent::setUp(); + + if ( ! extension_loaded('mongo')) { + $this->markTestSkipped('The ' . __CLASS__ .' requires the use of mongo >= 1.3.0'); + } + + if (@fsockopen('localhost', 27017) === false) { + $this->markTestSkipped('The ' . __CLASS__ .' cannot connect to mongo'); + } + } + + /** + * {@inheritDoc} + */ + protected function createCacheDriver() + { + $container = $this->compileContainer('mongodb'); + $cache = $container->get('doctrine_cache.providers.my_mongodb_cache'); + + return $cache; + } +} \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/PhpFileCacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/PhpFileCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e7c2e2af377fcd56a62209f994e979ce80f7aea6 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/PhpFileCacheTest.php @@ -0,0 +1,39 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional; + +/** + * @group Functional + * @group PhpFile + */ +class PhpFileCacheTest extends BaseCacheTest +{ + /** + * {@inheritDoc} + */ + protected function createCacheDriver() + { + $container = $this->compileContainer('php_file'); + $cache = $container->get('doctrine_cache.providers.my_phpfile_cache'); + + return $cache; + } +} \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/PredisCacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/PredisCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c8058e29a9a3cb03d5a29f9c20ad23ab89a13148 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/PredisCacheTest.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional; + +/** + * Predis Driver Test + * + * @group Functional + * @group Predis + * @author Ivo Bathke + */ +class PredisCacheTest extends BaseCacheTest +{ + /** + * {@inheritDoc} + */ + protected function setUp() + { + parent::setUp(); + + if ( ! class_exists('Doctrine\Common\Cache\PredisCache')) { + $this->markTestSkipped('The ' . __CLASS__ .' requires the use of PredisCache available in doctrine/cache since 1.4'); + } + } + + /** + * {@inheritDoc} + */ + protected function createCacheDriver() + { + $container = $this->compileContainer('predis'); + $cache = $container->get('doctrine_cache.providers.my_predis_cache'); + + return $cache; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/RiakCacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/RiakCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b4889ccb73f7939571a6d0a049f5ee0c931a52e5 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/RiakCacheTest.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional; + +/** + * @group Functional + * @group Riak + */ +class RiakCacheTest extends BaseCacheTest +{ + /** + * {@inheritDoc} + */ + protected function setUp() + { + parent::setUp(); + + if ( ! extension_loaded('riak')) { + $this->markTestSkipped('The ' . __CLASS__ .' requires the use of riak'); + } + + if (@fsockopen('localhost', 8087) === false) { + $this->markTestSkipped('The ' . __CLASS__ .' cannot connect to riak'); + } + } + + /** + * {@inheritDoc} + */ + protected function createCacheDriver() + { + $container = $this->compileContainer('riak'); + $cache = $container->get('doctrine_cache.providers.my_riak_cache'); + + return $cache; + } +} \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Sqlite3CacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Sqlite3CacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2036f3caaf4810ea3523cf7bc6c433a74d8352c8 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Sqlite3CacheTest.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional; + +/** + * @group Functional + * @group Sqlite3 + */ +class Sqlite3CacheTest extends BaseCacheTest +{ + /** + * {@inheritDoc} + */ + protected function setUp() + { + parent::setUp(); + + if ( ! extension_loaded('sqlite3')) { + $this->markTestSkipped('The ' . __CLASS__ .' requires the use of sqlite3'); + } + + if (!class_exists('Doctrine\Common\Cache\SQLite3Cache')) { + $this->markTestSkipped('The ' . __CLASS__ .' requires the use of SQLite3Cache available in doctrine/cache since 1.4'); + } + } + + /** + * {@inheritDoc} + */ + protected function createCacheDriver() + { + $container = $this->compileContainer('sqlite3'); + $cache = $container->get('doctrine_cache.providers.my_sqlite3_cache'); + + return $cache; + } +} \ No newline at end of file diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/VoidCacheTest.php b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/VoidCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..57d00d6721d70484b881be6267d334b83621bf16 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/Functional/VoidCacheTest.php @@ -0,0 +1,61 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional; + +use Doctrine\Bundle\DoctrineCacheBundle\Tests\FunctionalTestCase; + +/** + * @group Functional + * @group Void + */ +class VoidCacheTest extends BaseCacheTest +{ + public function setUp() + { + parent::setUp(); + + if (!class_exists('Doctrine\Common\Cache\VoidCache')) { + $this->markTestSkipped('The ' . __CLASS__ .' requires the use of VoidCache available in doctrine/cache since 1.5'); + } + } + + public function testCacheDriver() + { + $cache = $this->createCacheDriver(); + + $this->assertNotNull($cache); + $this->assertInstanceOf('Doctrine\Common\Cache\Cache', $cache); + + $this->assertTrue($cache->save('key', 'value')); + $this->assertFalse($cache->contains('key')); + $this->assertFalse($cache->fetch('key')); + $this->assertTrue($cache->delete('key')); + $this->assertFalse($cache->contains('key')); + } + + protected function createCacheDriver() + { + $container = $this->compileContainer('void'); + $cache = $container->get('doctrine_cache.providers.my_void_cache'); + + return $cache; + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/FunctionalTestCase.php b/vendor/doctrine/doctrine-cache-bundle/Tests/FunctionalTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..c2a294e14a11238bc81f8f2b96eec7355b291865 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/FunctionalTestCase.php @@ -0,0 +1,69 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests; + +use Symfony\Component\Config\FileLocator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\DoctrineCacheExtension; + +class FunctionalTestCase extends TestCase +{ + /** + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @param type $file + */ + protected function loadFromFile(ContainerBuilder $container, $file) + { + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/Functional/Fixtures/config')); + + $loader->load($file . '.xml'); + } + + /** + * @param string $file + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * + * @return \Symfony\Component\DependencyInjection\ContainerBuilder + */ + protected function compileContainer($file, ContainerBuilder $container = null) + { + $container = $container ?: $this->createContainer(); + $loader = new DoctrineCacheExtension(); + + $container->registerExtension($loader); + $this->loadFromFile($container, $file); + $this->overrideContainer($container); + $container->compile(); + + return $container; + } + + /** + * Override this hook in your functional TestCase to customize the container + * + * @param ContainerBuilder $container + */ + protected function overrideContainer(ContainerBuilder $container) + { + + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/TestCase.php b/vendor/doctrine/doctrine-cache-bundle/Tests/TestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..ebedd94ad657b825f48c22f3ece75cba4542a06e --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/TestCase.php @@ -0,0 +1,67 @@ +. + */ + +namespace Doctrine\Bundle\DoctrineCacheBundle\Tests; + +use Symfony\Component\Config\FileLocator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; + +class TestCase extends \PHPUnit_Framework_TestCase +{ + /** + * @param array $bundles + * @param string $vendor + * @return \Symfony\Component\DependencyInjection\ContainerBuilder + */ + protected function createContainer(array $bundles = array('YamlBundle'), $vendor = null) + { + $mappings = array(); + + foreach ($bundles as $bundle) { + require_once __DIR__.'/DependencyInjection/Fixtures/Bundles/'.($vendor ? $vendor.'/' : '').$bundle.'/'.$bundle.'.php'; + $mappings[$bundle] = 'DependencyInjection\\Fixtures\\Bundles\\'.($vendor ? $vendor.'\\' : '').$bundle.'\\'.$bundle; + } + + return new ContainerBuilder(new ParameterBag(array( + 'kernel.debug' => false, + 'kernel.bundles' => $mappings, + 'kernel.environment' => 'test', + 'kernel.root_dir' => __DIR__.'/../', + 'kernel.cache_dir' => sys_get_temp_dir(), + ))); + } + + /** + * @param array $bundles + * @param string $vendor + * @return \Symfony\Component\DependencyInjection\ContainerBuilder + */ + protected function createServiceContainer(array $bundles = array('YamlBundle'), $vendor = null) + { + $container = $this->createContainer($bundles, $vendor); + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + + $loader->load('services.xml'); + + return $container; + } + +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/bootstrap.php b/vendor/doctrine/doctrine-cache-bundle/Tests/bootstrap.php new file mode 100644 index 0000000000000000000000000000000000000000..71ca3ff6fdad611a5a2868da6c3b7f2d329cd5c5 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/bootstrap.php @@ -0,0 +1,25 @@ +. + */ + +if ( ! @include __DIR__ . '/../vendor/autoload.php') { + die("You must set up the project dependencies, run the following commands: +wget http://getcomposer.org/composer.phar +php composer.phar install --dev +"); +} diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/travis/install-deps.sh b/vendor/doctrine/doctrine-cache-bundle/Tests/travis/install-deps.sh new file mode 100755 index 0000000000000000000000000000000000000000..5947b54f470e8d8f35a64455eca1980be639fad7 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/travis/install-deps.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +BASEDIR=$(dirname $0); + +if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then + exit 0; +fi + +pecl install riak +phpenv config-add $BASEDIR/php.ini diff --git a/vendor/doctrine/doctrine-cache-bundle/Tests/travis/php.ini b/vendor/doctrine/doctrine-cache-bundle/Tests/travis/php.ini new file mode 100644 index 0000000000000000000000000000000000000000..ef5d9a1b7b589b4b9f236b9b246bf8848cc3e566 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/Tests/travis/php.ini @@ -0,0 +1,6 @@ +extension="mongo.so" +extension="memcache.so" +extension="memcached.so" + +apc.enabled=1 +apc.enable_cli=1 diff --git a/vendor/doctrine/doctrine-cache-bundle/composer.json b/vendor/doctrine/doctrine-cache-bundle/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..ca7257d7d4ce4094dd2f1cd4889bb28540a1f4eb --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/composer.json @@ -0,0 +1,67 @@ +{ + "name": "doctrine/doctrine-cache-bundle", + "homepage": "http://www.doctrine-project.org", + "description": "Symfony Bundle for Doctrine Cache", + "keywords": ["cache", "caching"], + "type": "symfony-bundle", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Fabio B. Silva", + "email": "fabio.bat.silva@gmail.com" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@hotmail.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org/" + } + ], + "require": { + "php": ">=5.3.2", + "symfony/doctrine-bridge": "~2.2|~3.0", + "doctrine/inflector": "~1.0", + "doctrine/cache": "^1.4.2" + }, + "require-dev": { + "phpunit/phpunit": "~4", + "symfony/phpunit-bridge": "~2.7|~3.0", + "symfony/yaml": "~2.2|~3.0", + "symfony/validator": "~2.2|~3.0", + "symfony/console": "~2.2|~3.0", + "symfony/finder": "~2.2|~3.0", + "symfony/framework-bundle": "~2.2|~3.0", + "symfony/security-acl": "~2.3|~3.0", + "instaclick/coding-standard": "~1.1", + "satooshi/php-coveralls": "~0.6.1", + "squizlabs/php_codesniffer": "~1.5", + "instaclick/object-calisthenics-sniffs": "dev-master", + "instaclick/symfony2-coding-standard": "dev-remaster", + "predis/predis": "~0.8" + }, + "suggest": { + "symfony/security-acl": "For using this bundle to cache ACLs" + }, + "autoload": { + "psr-4": { "Doctrine\\Bundle\\DoctrineCacheBundle\\": "" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + } +} diff --git a/vendor/doctrine/doctrine-cache-bundle/phpunit.xml.dist b/vendor/doctrine/doctrine-cache-bundle/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..2157842753cecba80dc27c9b0b4b3c2ad254b41d --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/phpunit.xml.dist @@ -0,0 +1,35 @@ + + + + + + ./Tests + + + + + + benchmark + + + + + + . + + ./Resources + ./vendor + ./Tests + + + + diff --git a/vendor/doctrine/doctrine-cache-bundle/ruleset.xml b/vendor/doctrine/doctrine-cache-bundle/ruleset.xml new file mode 100644 index 0000000000000000000000000000000000000000..75ec87767805c3aaa2a01ed6fd25d8fe7b9ee642 --- /dev/null +++ b/vendor/doctrine/doctrine-cache-bundle/ruleset.xml @@ -0,0 +1,11 @@ + + + Instaclick Coding Standard + + */Resources/* + + + + + + diff --git a/vendor/doctrine/inflector/.travis.yml b/vendor/doctrine/inflector/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..9ec68f7650ca198d2d78d578a7f3bd19c516624c --- /dev/null +++ b/vendor/doctrine/inflector/.travis.yml @@ -0,0 +1,21 @@ +language: php + +sudo: false + +cache: + directory: + - $HOME/.composer/cache + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - hhvm + +install: + - composer install -n + +script: + - phpunit diff --git a/vendor/doctrine/inflector/LICENSE b/vendor/doctrine/inflector/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8c38cc1bc22db86729231cbe320da51c22b66de9 --- /dev/null +++ b/vendor/doctrine/inflector/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2015 Doctrine Project + +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/vendor/doctrine/inflector/README.md b/vendor/doctrine/inflector/README.md new file mode 100644 index 0000000000000000000000000000000000000000..acb55a014bd7cf6bee35bfb19c50630ade2a9518 --- /dev/null +++ b/vendor/doctrine/inflector/README.md @@ -0,0 +1,6 @@ +# Doctrine Inflector + +Doctrine Inflector is a small library that can perform string manipulations +with regard to upper-/lowercase and singular/plural forms of words. + +[![Build Status](https://travis-ci.org/doctrine/inflector.svg?branch=master)](https://travis-ci.org/doctrine/inflector) diff --git a/vendor/doctrine/inflector/composer.json b/vendor/doctrine/inflector/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..7e5b2efbfdb89c8ec9c1f27cd1a9fc01ce165de3 --- /dev/null +++ b/vendor/doctrine/inflector/composer.json @@ -0,0 +1,29 @@ +{ + "name": "doctrine/inflector", + "type": "library", + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "keywords": ["string", "inflection", "singularize", "pluralize"], + "homepage": "http://www.doctrine-project.org", + "license": "MIT", + "authors": [ + {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, + {"name": "Roman Borschel", "email": "roman@code-factory.org"}, + {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, + {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, + {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} + ], + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "autoload": { + "psr-0": { "Doctrine\\Common\\Inflector\\": "lib/" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + } +} diff --git a/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php b/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php new file mode 100644 index 0000000000000000000000000000000000000000..a53828aba95d0569788ff411ef0d5750f6284c4c --- /dev/null +++ b/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php @@ -0,0 +1,482 @@ +. + */ + +namespace Doctrine\Common\Inflector; + +/** + * Doctrine inflector has static methods for inflecting text. + * + * The methods in these classes are from several different sources collected + * across several different php projects and several different authors. The + * original author names and emails are not known. + * + * Pluralize & Singularize implementation are borrowed from CakePHP with some modifications. + * + * @link www.doctrine-project.org + * @since 1.0 + * @author Konsta Vesterinen + * @author Jonathan H. Wage + */ +class Inflector +{ + /** + * Plural inflector rules. + * + * @var array + */ + private static $plural = array( + 'rules' => array( + '/(s)tatus$/i' => '\1\2tatuses', + '/(quiz)$/i' => '\1zes', + '/^(ox)$/i' => '\1\2en', + '/([m|l])ouse$/i' => '\1ice', + '/(matr|vert|ind)(ix|ex)$/i' => '\1ices', + '/(x|ch|ss|sh)$/i' => '\1es', + '/([^aeiouy]|qu)y$/i' => '\1ies', + '/(hive)$/i' => '\1s', + '/(?:([^f])fe|([lr])f)$/i' => '\1\2ves', + '/sis$/i' => 'ses', + '/([ti])um$/i' => '\1a', + '/(p)erson$/i' => '\1eople', + '/(m)an$/i' => '\1en', + '/(c)hild$/i' => '\1hildren', + '/(f)oot$/i' => '\1eet', + '/(buffal|her|potat|tomat|volcan)o$/i' => '\1\2oes', + '/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|vir)us$/i' => '\1i', + '/us$/i' => 'uses', + '/(alias)$/i' => '\1es', + '/(analys|ax|cris|test|thes)is$/i' => '\1es', + '/s$/' => 's', + '/^$/' => '', + '/$/' => 's', + ), + 'uninflected' => array( + '.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', 'people', 'cookie' + ), + 'irregular' => array( + 'atlas' => 'atlases', + 'axe' => 'axes', + 'beef' => 'beefs', + 'brother' => 'brothers', + 'cafe' => 'cafes', + 'chateau' => 'chateaux', + 'child' => 'children', + 'cookie' => 'cookies', + 'corpus' => 'corpuses', + 'cow' => 'cows', + 'criterion' => 'criteria', + 'curriculum' => 'curricula', + 'demo' => 'demos', + 'domino' => 'dominoes', + 'echo' => 'echoes', + 'foot' => 'feet', + 'fungus' => 'fungi', + 'ganglion' => 'ganglions', + 'genie' => 'genies', + 'genus' => 'genera', + 'graffito' => 'graffiti', + 'hippopotamus' => 'hippopotami', + 'hoof' => 'hoofs', + 'human' => 'humans', + 'iris' => 'irises', + 'leaf' => 'leaves', + 'loaf' => 'loaves', + 'man' => 'men', + 'medium' => 'media', + 'memorandum' => 'memoranda', + 'money' => 'monies', + 'mongoose' => 'mongooses', + 'motto' => 'mottoes', + 'move' => 'moves', + 'mythos' => 'mythoi', + 'niche' => 'niches', + 'nucleus' => 'nuclei', + 'numen' => 'numina', + 'occiput' => 'occiputs', + 'octopus' => 'octopuses', + 'opus' => 'opuses', + 'ox' => 'oxen', + 'penis' => 'penises', + 'person' => 'people', + 'plateau' => 'plateaux', + 'runner-up' => 'runners-up', + 'sex' => 'sexes', + 'soliloquy' => 'soliloquies', + 'son-in-law' => 'sons-in-law', + 'syllabus' => 'syllabi', + 'testis' => 'testes', + 'thief' => 'thieves', + 'tooth' => 'teeth', + 'tornado' => 'tornadoes', + 'trilby' => 'trilbys', + 'turf' => 'turfs', + 'volcano' => 'volcanoes', + ) + ); + + /** + * Singular inflector rules. + * + * @var array + */ + private static $singular = array( + 'rules' => array( + '/(s)tatuses$/i' => '\1\2tatus', + '/^(.*)(menu)s$/i' => '\1\2', + '/(quiz)zes$/i' => '\\1', + '/(matr)ices$/i' => '\1ix', + '/(vert|ind)ices$/i' => '\1ex', + '/^(ox)en/i' => '\1', + '/(alias)(es)*$/i' => '\1', + '/(buffal|her|potat|tomat|volcan)oes$/i' => '\1o', + '/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$/i' => '\1us', + '/([ftw]ax)es/i' => '\1', + '/(analys|ax|cris|test|thes)es$/i' => '\1is', + '/(shoe|slave)s$/i' => '\1', + '/(o)es$/i' => '\1', + '/ouses$/' => 'ouse', + '/([^a])uses$/' => '\1us', + '/([m|l])ice$/i' => '\1ouse', + '/(x|ch|ss|sh)es$/i' => '\1', + '/(m)ovies$/i' => '\1\2ovie', + '/(s)eries$/i' => '\1\2eries', + '/([^aeiouy]|qu)ies$/i' => '\1y', + '/([lr])ves$/i' => '\1f', + '/(tive)s$/i' => '\1', + '/(hive)s$/i' => '\1', + '/(drive)s$/i' => '\1', + '/([^fo])ves$/i' => '\1fe', + '/(^analy)ses$/i' => '\1sis', + '/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis', + '/([ti])a$/i' => '\1um', + '/(p)eople$/i' => '\1\2erson', + '/(m)en$/i' => '\1an', + '/(c)hildren$/i' => '\1\2hild', + '/(f)eet$/i' => '\1oot', + '/(n)ews$/i' => '\1\2ews', + '/eaus$/' => 'eau', + '/^(.*us)$/' => '\\1', + '/s$/i' => '', + ), + 'uninflected' => array( + '.*[nrlm]ese', + '.*deer', + '.*fish', + '.*measles', + '.*ois', + '.*pox', + '.*sheep', + '.*ss', + ), + 'irregular' => array( + 'criteria' => 'criterion', + 'curves' => 'curve', + 'emphases' => 'emphasis', + 'foes' => 'foe', + 'hoaxes' => 'hoax', + 'media' => 'medium', + 'neuroses' => 'neurosis', + 'waves' => 'wave', + 'oases' => 'oasis', + ) + ); + + /** + * Words that should not be inflected. + * + * @var array + */ + private static $uninflected = array( + 'Amoyese', 'bison', 'Borghese', 'bream', 'breeches', 'britches', 'buffalo', 'cantus', + 'carp', 'chassis', 'clippers', 'cod', 'coitus', 'Congoese', 'contretemps', 'corps', + 'debris', 'diabetes', 'djinn', 'eland', 'elk', 'equipment', 'Faroese', 'flounder', + 'Foochowese', 'gallows', 'Genevese', 'Genoese', 'Gilbertese', 'graffiti', + 'headquarters', 'herpes', 'hijinks', 'Hottentotese', 'information', 'innings', + 'jackanapes', 'Kiplingese', 'Kongoese', 'Lucchese', 'mackerel', 'Maltese', '.*?media', + 'mews', 'moose', 'mumps', 'Nankingese', 'news', 'nexus', 'Niasese', + 'Pekingese', 'Piedmontese', 'pincers', 'Pistoiese', 'pliers', 'Portuguese', + 'proceedings', 'rabies', 'rice', 'rhinoceros', 'salmon', 'Sarawakese', 'scissors', + 'sea[- ]bass', 'series', 'Shavese', 'shears', 'siemens', 'species', 'staff', 'swine', + 'testes', 'trousers', 'trout', 'tuna', 'Vermontese', 'Wenchowese', 'whiting', + 'wildebeest', 'Yengeese' + ); + + /** + * Method cache array. + * + * @var array + */ + private static $cache = array(); + + /** + * The initial state of Inflector so reset() works. + * + * @var array + */ + private static $initialState = array(); + + /** + * Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'. + * + * @param string $word The word to tableize. + * + * @return string The tableized word. + */ + public static function tableize($word) + { + return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $word)); + } + + /** + * Converts a word into the format for a Doctrine class name. Converts 'table_name' to 'TableName'. + * + * @param string $word The word to classify. + * + * @return string The classified word. + */ + public static function classify($word) + { + return str_replace(" ", "", ucwords(strtr($word, "_-", " "))); + } + + /** + * Camelizes a word. This uses the classify() method and turns the first character to lowercase. + * + * @param string $word The word to camelize. + * + * @return string The camelized word. + */ + public static function camelize($word) + { + return lcfirst(self::classify($word)); + } + + /** + * Uppercases words with configurable delimeters between words. + * + * Takes a string and capitalizes all of the words, like PHP's built-in + * ucwords function. This extends that behavior, however, by allowing the + * word delimeters to be configured, rather than only separating on + * whitespace. + * + * Here is an example: + * + * + * + * + * @param string $string The string to operate on. + * @param string $delimiters A list of word separators. + * + * @return string The string with all delimeter-separated words capitalized. + */ + public static function ucwords($string, $delimiters = " \n\t\r\0\x0B-") + { + return preg_replace_callback( + '/[^' . preg_quote($delimiters, '/') . ']+/', + function($matches) { + return ucfirst($matches[0]); + }, + $string + ); + } + + /** + * Clears Inflectors inflected value caches, and resets the inflection + * rules to the initial values. + * + * @return void + */ + public static function reset() + { + if (empty(self::$initialState)) { + self::$initialState = get_class_vars('Inflector'); + + return; + } + + foreach (self::$initialState as $key => $val) { + if ($key != 'initialState') { + self::${$key} = $val; + } + } + } + + /** + * Adds custom inflection $rules, of either 'plural' or 'singular' $type. + * + * ### Usage: + * + * {{{ + * Inflector::rules('plural', array('/^(inflect)or$/i' => '\1ables')); + * Inflector::rules('plural', array( + * 'rules' => array('/^(inflect)ors$/i' => '\1ables'), + * 'uninflected' => array('dontinflectme'), + * 'irregular' => array('red' => 'redlings') + * )); + * }}} + * + * @param string $type The type of inflection, either 'plural' or 'singular' + * @param array $rules An array of rules to be added. + * @param boolean $reset If true, will unset default inflections for all + * new rules that are being defined in $rules. + * + * @return void + */ + public static function rules($type, $rules, $reset = false) + { + foreach ($rules as $rule => $pattern) { + if ( ! is_array($pattern)) { + continue; + } + + if ($reset) { + self::${$type}[$rule] = $pattern; + } else { + self::${$type}[$rule] = ($rule === 'uninflected') + ? array_merge($pattern, self::${$type}[$rule]) + : $pattern + self::${$type}[$rule]; + } + + unset($rules[$rule], self::${$type}['cache' . ucfirst($rule)]); + + if (isset(self::${$type}['merged'][$rule])) { + unset(self::${$type}['merged'][$rule]); + } + + if ($type === 'plural') { + self::$cache['pluralize'] = self::$cache['tableize'] = array(); + } elseif ($type === 'singular') { + self::$cache['singularize'] = array(); + } + } + + self::${$type}['rules'] = $rules + self::${$type}['rules']; + } + + /** + * Returns a word in plural form. + * + * @param string $word The word in singular form. + * + * @return string The word in plural form. + */ + public static function pluralize($word) + { + if (isset(self::$cache['pluralize'][$word])) { + return self::$cache['pluralize'][$word]; + } + + if (!isset(self::$plural['merged']['irregular'])) { + self::$plural['merged']['irregular'] = self::$plural['irregular']; + } + + if (!isset(self::$plural['merged']['uninflected'])) { + self::$plural['merged']['uninflected'] = array_merge(self::$plural['uninflected'], self::$uninflected); + } + + if (!isset(self::$plural['cacheUninflected']) || !isset(self::$plural['cacheIrregular'])) { + self::$plural['cacheUninflected'] = '(?:' . implode('|', self::$plural['merged']['uninflected']) . ')'; + self::$plural['cacheIrregular'] = '(?:' . implode('|', array_keys(self::$plural['merged']['irregular'])) . ')'; + } + + if (preg_match('/(.*)\\b(' . self::$plural['cacheIrregular'] . ')$/i', $word, $regs)) { + self::$cache['pluralize'][$word] = $regs[1] . substr($word, 0, 1) . substr(self::$plural['merged']['irregular'][strtolower($regs[2])], 1); + + return self::$cache['pluralize'][$word]; + } + + if (preg_match('/^(' . self::$plural['cacheUninflected'] . ')$/i', $word, $regs)) { + self::$cache['pluralize'][$word] = $word; + + return $word; + } + + foreach (self::$plural['rules'] as $rule => $replacement) { + if (preg_match($rule, $word)) { + self::$cache['pluralize'][$word] = preg_replace($rule, $replacement, $word); + + return self::$cache['pluralize'][$word]; + } + } + } + + /** + * Returns a word in singular form. + * + * @param string $word The word in plural form. + * + * @return string The word in singular form. + */ + public static function singularize($word) + { + if (isset(self::$cache['singularize'][$word])) { + return self::$cache['singularize'][$word]; + } + + if (!isset(self::$singular['merged']['uninflected'])) { + self::$singular['merged']['uninflected'] = array_merge( + self::$singular['uninflected'], + self::$uninflected + ); + } + + if (!isset(self::$singular['merged']['irregular'])) { + self::$singular['merged']['irregular'] = array_merge( + self::$singular['irregular'], + array_flip(self::$plural['irregular']) + ); + } + + if (!isset(self::$singular['cacheUninflected']) || !isset(self::$singular['cacheIrregular'])) { + self::$singular['cacheUninflected'] = '(?:' . join('|', self::$singular['merged']['uninflected']) . ')'; + self::$singular['cacheIrregular'] = '(?:' . join('|', array_keys(self::$singular['merged']['irregular'])) . ')'; + } + + if (preg_match('/(.*)\\b(' . self::$singular['cacheIrregular'] . ')$/i', $word, $regs)) { + self::$cache['singularize'][$word] = $regs[1] . substr($word, 0, 1) . substr(self::$singular['merged']['irregular'][strtolower($regs[2])], 1); + + return self::$cache['singularize'][$word]; + } + + if (preg_match('/^(' . self::$singular['cacheUninflected'] . ')$/i', $word, $regs)) { + self::$cache['singularize'][$word] = $word; + + return $word; + } + + foreach (self::$singular['rules'] as $rule => $replacement) { + if (preg_match($rule, $word)) { + self::$cache['singularize'][$word] = preg_replace($rule, $replacement, $word); + + return self::$cache['singularize'][$word]; + } + } + + self::$cache['singularize'][$word] = $word; + + return $word; + } +} diff --git a/vendor/doctrine/inflector/phpunit.xml.dist b/vendor/doctrine/inflector/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..ef07faa53c8bea9b324d18e6d5ae6952a62645e3 --- /dev/null +++ b/vendor/doctrine/inflector/phpunit.xml.dist @@ -0,0 +1,31 @@ + + + + + + ./tests/Doctrine/ + + + + + + ./lib/Doctrine/ + + + + + + performance + + + diff --git a/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php b/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4198d22c1da963d800b43e4ca0f1cc00cabce89c --- /dev/null +++ b/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php @@ -0,0 +1,309 @@ +assertEquals( + $singular, + Inflector::singularize($plural), + "'$plural' should be singularized to '$singular'" + ); + } + + /** + * testInflectingPlurals method + * + * @dataProvider dataSampleWords + * @return void + */ + public function testInflectingPlurals($singular, $plural) + { + $this->assertEquals( + $plural, + Inflector::pluralize($singular), + "'$singular' should be pluralized to '$plural'" + ); + } + + /** + * testCustomPluralRule method + * + * @return void + */ + public function testCustomPluralRule() + { + Inflector::reset(); + Inflector::rules('plural', array('/^(custom)$/i' => '\1izables')); + + $this->assertEquals(Inflector::pluralize('custom'), 'customizables'); + + Inflector::rules('plural', array('uninflected' => array('uninflectable'))); + + $this->assertEquals(Inflector::pluralize('uninflectable'), 'uninflectable'); + + Inflector::rules('plural', array( + 'rules' => array('/^(alert)$/i' => '\1ables'), + 'uninflected' => array('noflect', 'abtuse'), + 'irregular' => array('amaze' => 'amazable', 'phone' => 'phonezes') + )); + + $this->assertEquals(Inflector::pluralize('noflect'), 'noflect'); + $this->assertEquals(Inflector::pluralize('abtuse'), 'abtuse'); + $this->assertEquals(Inflector::pluralize('alert'), 'alertables'); + $this->assertEquals(Inflector::pluralize('amaze'), 'amazable'); + $this->assertEquals(Inflector::pluralize('phone'), 'phonezes'); + } + + /** + * testCustomSingularRule method + * + * @return void + */ + public function testCustomSingularRule() + { + Inflector::reset(); + Inflector::rules('singular', array('/(eple)r$/i' => '\1', '/(jente)r$/i' => '\1')); + + $this->assertEquals(Inflector::singularize('epler'), 'eple'); + $this->assertEquals(Inflector::singularize('jenter'), 'jente'); + + Inflector::rules('singular', array( + 'rules' => array('/^(bil)er$/i' => '\1', '/^(inflec|contribu)tors$/i' => '\1ta'), + 'uninflected' => array('singulars'), + 'irregular' => array('spins' => 'spinor') + )); + + $this->assertEquals(Inflector::singularize('inflectors'), 'inflecta'); + $this->assertEquals(Inflector::singularize('contributors'), 'contributa'); + $this->assertEquals(Inflector::singularize('spins'), 'spinor'); + $this->assertEquals(Inflector::singularize('singulars'), 'singulars'); + } + + /** + * test that setting new rules clears the inflector caches. + * + * @return void + */ + public function testRulesClearsCaches() + { + Inflector::reset(); + + $this->assertEquals(Inflector::singularize('Bananas'), 'Banana'); + $this->assertEquals(Inflector::pluralize('Banana'), 'Bananas'); + + Inflector::rules('singular', array( + 'rules' => array('/(.*)nas$/i' => '\1zzz') + )); + + $this->assertEquals('Banazzz', Inflector::singularize('Bananas'), 'Was inflected with old rules.'); + + Inflector::rules('plural', array( + 'rules' => array('/(.*)na$/i' => '\1zzz'), + 'irregular' => array('corpus' => 'corpora') + )); + + $this->assertEquals(Inflector::pluralize('Banana'), 'Banazzz', 'Was inflected with old rules.'); + $this->assertEquals(Inflector::pluralize('corpus'), 'corpora', 'Was inflected with old irregular form.'); + } + + /** + * Test resetting inflection rules. + * + * @return void + */ + public function testCustomRuleWithReset() + { + Inflector::reset(); + + $uninflected = array('atlas', 'lapis', 'onibus', 'pires', 'virus', '.*x'); + $pluralIrregular = array('as' => 'ases'); + + Inflector::rules('singular', array( + 'rules' => array('/^(.*)(a|e|o|u)is$/i' => '\1\2l'), + 'uninflected' => $uninflected, + ), true); + + Inflector::rules('plural', array( + 'rules' => array( + '/^(.*)(a|e|o|u)l$/i' => '\1\2is', + ), + 'uninflected' => $uninflected, + 'irregular' => $pluralIrregular + ), true); + + $this->assertEquals(Inflector::pluralize('Alcool'), 'Alcoois'); + $this->assertEquals(Inflector::pluralize('Atlas'), 'Atlas'); + $this->assertEquals(Inflector::singularize('Alcoois'), 'Alcool'); + $this->assertEquals(Inflector::singularize('Atlas'), 'Atlas'); + } + + /** + * Test basic ucwords functionality. + * + * @return void + */ + public function testUcwords() + { + $this->assertSame('Top-O-The-Morning To All_of_you!', Inflector::ucwords( 'top-o-the-morning to all_of_you!')); + } + + /** + * Test ucwords functionality with custom delimeters. + * + * @return void + */ + public function testUcwordsWithCustomDelimeters() + { + $this->assertSame('Top-O-The-Morning To All_Of_You!', Inflector::ucwords( 'top-o-the-morning to all_of_you!', '-_ ')); + } +} + diff --git a/vendor/doctrine/inflector/tests/Doctrine/Tests/DoctrineTestCase.php b/vendor/doctrine/inflector/tests/Doctrine/Tests/DoctrineTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..e8323d294092a5ed06eb1ff8fca5840f613ae41a --- /dev/null +++ b/vendor/doctrine/inflector/tests/Doctrine/Tests/DoctrineTestCase.php @@ -0,0 +1,10 @@ + composer-installer.php + hhvm composer-installer.php + hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 composer.phar update --prefer-source +elif [ "$TRAVIS_PHP_VERSION" = '5.3.3' ] ; then + composer self-update + composer update --prefer-source --no-dev + composer dump-autoload +else + composer self-update + composer update --prefer-source +fi diff --git a/vendor/doctrine/instantiator/.travis.yml b/vendor/doctrine/instantiator/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..7f1ec5f98d3d2a80b6ea2072de66126aacb769f1 --- /dev/null +++ b/vendor/doctrine/instantiator/.travis.yml @@ -0,0 +1,22 @@ +language: php + +php: + - 5.3.3 + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm + +before_script: + - ./.travis.install.sh + - if [ $TRAVIS_PHP_VERSION = '5.6' ]; then PHPUNIT_FLAGS="--coverage-clover coverage.clover"; else PHPUNIT_FLAGS=""; fi + +script: + - if [ $TRAVIS_PHP_VERSION = '5.3.3' ]; then phpunit; fi + - if [ $TRAVIS_PHP_VERSION != '5.3.3' ]; then ./vendor/bin/phpunit $PHPUNIT_FLAGS; fi + - if [ $TRAVIS_PHP_VERSION != '5.3.3' ]; then ./vendor/bin/phpcs --standard=PSR2 ./src/ ./tests/; fi + - if [[ $TRAVIS_PHP_VERSION != '5.3.3' && $TRAVIS_PHP_VERSION != '5.4.29' && $TRAVIS_PHP_VERSION != '5.5.13' ]]; then php -n ./vendor/bin/athletic -p ./tests/DoctrineTest/InstantiatorPerformance/ -f GroupedFormatter; fi + +after_script: + - if [ $TRAVIS_PHP_VERSION = '5.6' ]; then wget https://scrutinizer-ci.com/ocular.phar; php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi diff --git a/vendor/doctrine/instantiator/CONTRIBUTING.md b/vendor/doctrine/instantiator/CONTRIBUTING.md new file mode 100644 index 0000000000000000000000000000000000000000..75b84b2aa2e067771ee4210bb56ee215d5b56bec --- /dev/null +++ b/vendor/doctrine/instantiator/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# Contributing + + * Coding standard for the project is [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) + * The project will follow strict [object calisthenics](http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php) + * Any contribution must provide tests for additional introduced conditions + * Any un-confirmed issue needs a failing test case before being accepted + * Pull requests must be sent from a new hotfix/feature branch, not from `master`. + +## Installation + +To install the project and run the tests, you need to clone it first: + +```sh +$ git clone git://github.com/doctrine/instantiator.git +``` + +You will then need to run a composer installation: + +```sh +$ cd Instantiator +$ curl -s https://getcomposer.org/installer | php +$ php composer.phar update +``` + +## Testing + +The PHPUnit version to be used is the one installed as a dev- dependency via composer: + +```sh +$ ./vendor/bin/phpunit +``` + +Accepted coverage for new contributions is 80%. Any contribution not satisfying this requirement +won't be merged. + diff --git a/vendor/doctrine/instantiator/LICENSE b/vendor/doctrine/instantiator/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4d983d1ac70a22beb32a44c8ae52b43f04444f29 --- /dev/null +++ b/vendor/doctrine/instantiator/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Doctrine Project + +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/vendor/doctrine/instantiator/README.md b/vendor/doctrine/instantiator/README.md new file mode 100644 index 0000000000000000000000000000000000000000..393ec7caafc0bdf0e2c912af57825294d960a6fd --- /dev/null +++ b/vendor/doctrine/instantiator/README.md @@ -0,0 +1,40 @@ +# Instantiator + +This library provides a way of avoiding usage of constructors when instantiating PHP classes. + +[![Build Status](https://travis-ci.org/doctrine/instantiator.svg?branch=master)](https://travis-ci.org/doctrine/instantiator) +[![Code Coverage](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) +[![Dependency Status](https://www.versioneye.com/package/php--doctrine--instantiator/badge.svg)](https://www.versioneye.com/package/php--doctrine--instantiator) +[![HHVM Status](http://hhvm.h4cc.de/badge/doctrine/instantiator.png)](http://hhvm.h4cc.de/package/doctrine/instantiator) + +[![Latest Stable Version](https://poser.pugx.org/doctrine/instantiator/v/stable.png)](https://packagist.org/packages/doctrine/instantiator) +[![Latest Unstable Version](https://poser.pugx.org/doctrine/instantiator/v/unstable.png)](https://packagist.org/packages/doctrine/instantiator) + +## Installation + +The suggested installation method is via [composer](https://getcomposer.org/): + +```sh +php composer.phar require "doctrine/instantiator:~1.0.3" +``` + +## Usage + +The instantiator is able to create new instances of any class without using the constructor or any API of the class +itself: + +```php +$instantiator = new \Doctrine\Instantiator\Instantiator(); + +$instance = $instantiator->instantiate('My\\ClassName\\Here'); +``` + +## Contributing + +Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out! + +## Credits + +This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which +has been donated to the doctrine organization, and which is now deprecated in favour of this package. diff --git a/vendor/doctrine/instantiator/composer.json b/vendor/doctrine/instantiator/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..4823890b4c7049544660208ec6d61c1c0631ce15 --- /dev/null +++ b/vendor/doctrine/instantiator/composer.json @@ -0,0 +1,45 @@ +{ + "name": "doctrine/instantiator", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "type": "library", + "license": "MIT", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "instantiate", + "constructor" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "ext-phar": "*", + "ext-pdo": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0", + "athletic/athletic": "~0.1.8" + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "autoload-dev": { + "psr-0": { + "DoctrineTest\\InstantiatorPerformance\\": "tests", + "DoctrineTest\\InstantiatorTest\\": "tests", + "DoctrineTest\\InstantiatorTestAsset\\": "tests" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/vendor/doctrine/instantiator/phpmd.xml.dist b/vendor/doctrine/instantiator/phpmd.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..82541056275e0d8c2f58fc142a058230bf0cf54e --- /dev/null +++ b/vendor/doctrine/instantiator/phpmd.xml.dist @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + diff --git a/vendor/doctrine/instantiator/phpunit.xml.dist b/vendor/doctrine/instantiator/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..0a8d5709b7ea79877adfc0b6999df8f9cfe1d535 --- /dev/null +++ b/vendor/doctrine/instantiator/phpunit.xml.dist @@ -0,0 +1,22 @@ + + + + ./tests/DoctrineTest/InstantiatorTest + + + + ./src + + + diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..3065375a8ca48eef4d249905999a350cf102dcdf --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php @@ -0,0 +1,29 @@ +. + */ + +namespace Doctrine\Instantiator\Exception; + +/** + * Base exception marker interface for the instantiator component + * + * @author Marco Pivetta + */ +interface ExceptionInterface +{ +} diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..ea8d28c5c57f926b46f5b8493e7ec27b887ca6ae --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php @@ -0,0 +1,62 @@ +. + */ + +namespace Doctrine\Instantiator\Exception; + +use InvalidArgumentException as BaseInvalidArgumentException; +use ReflectionClass; + +/** + * Exception for invalid arguments provided to the instantiator + * + * @author Marco Pivetta + */ +class InvalidArgumentException extends BaseInvalidArgumentException implements ExceptionInterface +{ + /** + * @param string $className + * + * @return self + */ + public static function fromNonExistingClass($className) + { + if (interface_exists($className)) { + return new self(sprintf('The provided type "%s" is an interface, and can not be instantiated', $className)); + } + + if (PHP_VERSION_ID >= 50400 && trait_exists($className)) { + return new self(sprintf('The provided type "%s" is a trait, and can not be instantiated', $className)); + } + + return new self(sprintf('The provided class "%s" does not exist', $className)); + } + + /** + * @param ReflectionClass $reflectionClass + * + * @return self + */ + public static function fromAbstractClass(ReflectionClass $reflectionClass) + { + return new self(sprintf( + 'The provided class "%s" is abstract, and can not be instantiated', + $reflectionClass->getName() + )); + } +} diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php new file mode 100644 index 0000000000000000000000000000000000000000..1681e56e88796c74787a31f4466a1846248b5a97 --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php @@ -0,0 +1,79 @@ +. + */ + +namespace Doctrine\Instantiator\Exception; + +use Exception; +use ReflectionClass; +use UnexpectedValueException as BaseUnexpectedValueException; + +/** + * Exception for given parameters causing invalid/unexpected state on instantiation + * + * @author Marco Pivetta + */ +class UnexpectedValueException extends BaseUnexpectedValueException implements ExceptionInterface +{ + /** + * @param ReflectionClass $reflectionClass + * @param Exception $exception + * + * @return self + */ + public static function fromSerializationTriggeredException(ReflectionClass $reflectionClass, Exception $exception) + { + return new self( + sprintf( + 'An exception was raised while trying to instantiate an instance of "%s" via un-serialization', + $reflectionClass->getName() + ), + 0, + $exception + ); + } + + /** + * @param ReflectionClass $reflectionClass + * @param string $errorString + * @param int $errorCode + * @param string $errorFile + * @param int $errorLine + * + * @return UnexpectedValueException + */ + public static function fromUncleanUnSerialization( + ReflectionClass $reflectionClass, + $errorString, + $errorCode, + $errorFile, + $errorLine + ) { + return new self( + sprintf( + 'Could not produce an instance of "%s" via un-serialization, since an error was triggered ' + . 'in file "%s" at line "%d"', + $reflectionClass->getName(), + $errorFile, + $errorLine + ), + 0, + new Exception($errorString, $errorCode) + ); + } +} diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php new file mode 100644 index 0000000000000000000000000000000000000000..6d5b3b656750bd51c10ec67a693f363e3153c8eb --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php @@ -0,0 +1,273 @@ +. + */ + +namespace Doctrine\Instantiator; + +use Closure; +use Doctrine\Instantiator\Exception\InvalidArgumentException; +use Doctrine\Instantiator\Exception\UnexpectedValueException; +use Exception; +use ReflectionClass; + +/** + * {@inheritDoc} + * + * @author Marco Pivetta + */ +final class Instantiator implements InstantiatorInterface +{ + /** + * Markers used internally by PHP to define whether {@see \unserialize} should invoke + * the method {@see \Serializable::unserialize()} when dealing with classes implementing + * the {@see \Serializable} interface. + */ + const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C'; + const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O'; + + /** + * @var \Closure[] of {@see \Closure} instances used to instantiate specific classes + */ + private static $cachedInstantiators = array(); + + /** + * @var object[] of objects that can directly be cloned + */ + private static $cachedCloneables = array(); + + /** + * {@inheritDoc} + */ + public function instantiate($className) + { + if (isset(self::$cachedCloneables[$className])) { + return clone self::$cachedCloneables[$className]; + } + + if (isset(self::$cachedInstantiators[$className])) { + $factory = self::$cachedInstantiators[$className]; + + return $factory(); + } + + return $this->buildAndCacheFromFactory($className); + } + + /** + * Builds the requested object and caches it in static properties for performance + * + * @param string $className + * + * @return object + */ + private function buildAndCacheFromFactory($className) + { + $factory = self::$cachedInstantiators[$className] = $this->buildFactory($className); + $instance = $factory(); + + if ($this->isSafeToClone(new ReflectionClass($instance))) { + self::$cachedCloneables[$className] = clone $instance; + } + + return $instance; + } + + /** + * Builds a {@see \Closure} capable of instantiating the given $className without + * invoking its constructor. + * + * @param string $className + * + * @return Closure + */ + private function buildFactory($className) + { + $reflectionClass = $this->getReflectionClass($className); + + if ($this->isInstantiableViaReflection($reflectionClass)) { + return function () use ($reflectionClass) { + return $reflectionClass->newInstanceWithoutConstructor(); + }; + } + + $serializedString = sprintf( + '%s:%d:"%s":0:{}', + $this->getSerializationFormat($reflectionClass), + strlen($className), + $className + ); + + $this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString); + + return function () use ($serializedString) { + return unserialize($serializedString); + }; + } + + /** + * @param string $className + * + * @return ReflectionClass + * + * @throws InvalidArgumentException + */ + private function getReflectionClass($className) + { + if (! class_exists($className)) { + throw InvalidArgumentException::fromNonExistingClass($className); + } + + $reflection = new ReflectionClass($className); + + if ($reflection->isAbstract()) { + throw InvalidArgumentException::fromAbstractClass($reflection); + } + + return $reflection; + } + + /** + * @param ReflectionClass $reflectionClass + * @param string $serializedString + * + * @throws UnexpectedValueException + * + * @return void + */ + private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, $serializedString) + { + set_error_handler(function ($code, $message, $file, $line) use ($reflectionClass, & $error) { + $error = UnexpectedValueException::fromUncleanUnSerialization( + $reflectionClass, + $message, + $code, + $file, + $line + ); + }); + + $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); + + restore_error_handler(); + + if ($error) { + throw $error; + } + } + + /** + * @param ReflectionClass $reflectionClass + * @param string $serializedString + * + * @throws UnexpectedValueException + * + * @return void + */ + private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, $serializedString) + { + try { + unserialize($serializedString); + } catch (Exception $exception) { + restore_error_handler(); + + throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception); + } + } + + /** + * @param ReflectionClass $reflectionClass + * + * @return bool + */ + private function isInstantiableViaReflection(ReflectionClass $reflectionClass) + { + if (\PHP_VERSION_ID >= 50600) { + return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal()); + } + + return \PHP_VERSION_ID >= 50400 && ! $this->hasInternalAncestors($reflectionClass); + } + + /** + * Verifies whether the given class is to be considered internal + * + * @param ReflectionClass $reflectionClass + * + * @return bool + */ + private function hasInternalAncestors(ReflectionClass $reflectionClass) + { + do { + if ($reflectionClass->isInternal()) { + return true; + } + } while ($reflectionClass = $reflectionClass->getParentClass()); + + return false; + } + + /** + * Verifies if the given PHP version implements the `Serializable` interface serialization + * with an incompatible serialization format. If that's the case, use serialization marker + * "C" instead of "O". + * + * @link http://news.php.net/php.internals/74654 + * + * @param ReflectionClass $reflectionClass + * + * @return string the serialization format marker, either self::SERIALIZATION_FORMAT_USE_UNSERIALIZER + * or self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER + */ + private function getSerializationFormat(ReflectionClass $reflectionClass) + { + if ($this->isPhpVersionWithBrokenSerializationFormat() + && $reflectionClass->implementsInterface('Serializable') + ) { + return self::SERIALIZATION_FORMAT_USE_UNSERIALIZER; + } + + return self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER; + } + + /** + * Checks whether the current PHP runtime uses an incompatible serialization format + * + * @return bool + */ + private function isPhpVersionWithBrokenSerializationFormat() + { + return PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513; + } + + /** + * Checks if a class is cloneable + * + * @param ReflectionClass $reflection + * + * @return bool + */ + private function isSafeToClone(ReflectionClass $reflection) + { + if (method_exists($reflection, 'isCloneable') && ! $reflection->isCloneable()) { + return false; + } + + // not cloneable if it implements `__clone`, as we want to avoid calling it + return ! $reflection->hasMethod('__clone'); + } +} diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b665bea854749f90f841c0a31e2ad7f7ae1892b1 --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\Instantiator; + +/** + * Instantiator provides utility methods to build objects without invoking their constructors + * + * @author Marco Pivetta + */ +interface InstantiatorInterface +{ + /** + * @param string $className + * + * @return object + * + * @throws \Doctrine\Instantiator\Exception\ExceptionInterface + */ + public function instantiate($className); +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..3e8fc6ff43a674e06d88722948858a8ff3abbf16 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php @@ -0,0 +1,96 @@ +. + */ + +namespace DoctrineTest\InstantiatorPerformance; + +use Athletic\AthleticEvent; +use Doctrine\Instantiator\Instantiator; + +/** + * Performance tests for {@see \Doctrine\Instantiator\Instantiator} + * + * @author Marco Pivetta + */ +class InstantiatorPerformanceEvent extends AthleticEvent +{ + /** + * @var \Doctrine\Instantiator\Instantiator + */ + private $instantiator; + + /** + * {@inheritDoc} + */ + protected function setUp() + { + $this->instantiator = new Instantiator(); + + $this->instantiator->instantiate(__CLASS__); + $this->instantiator->instantiate('ArrayObject'); + $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SimpleSerializableAsset'); + $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'); + $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\UnCloneableAsset'); + } + + /** + * @iterations 20000 + * @baseline + * @group instantiation + */ + public function testInstantiateSelf() + { + $this->instantiator->instantiate(__CLASS__); + } + + /** + * @iterations 20000 + * @group instantiation + */ + public function testInstantiateInternalClass() + { + $this->instantiator->instantiate('ArrayObject'); + } + + /** + * @iterations 20000 + * @group instantiation + */ + public function testInstantiateSimpleSerializableAssetClass() + { + $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SimpleSerializableAsset'); + } + + /** + * @iterations 20000 + * @group instantiation + */ + public function testInstantiateSerializableArrayObjectAsset() + { + $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'); + } + + /** + * @iterations 20000 + * @group instantiation + */ + public function testInstantiateUnCloneableAsset() + { + $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\UnCloneableAsset'); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..39d9b94dfa895ef4c0c8173710555e57c71d8254 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php @@ -0,0 +1,83 @@ +. + */ + +namespace DoctrineTest\InstantiatorTest\Exception; + +use Doctrine\Instantiator\Exception\InvalidArgumentException; +use PHPUnit_Framework_TestCase; +use ReflectionClass; + +/** + * Tests for {@see \Doctrine\Instantiator\Exception\InvalidArgumentException} + * + * @author Marco Pivetta + * + * @covers \Doctrine\Instantiator\Exception\InvalidArgumentException + */ +class InvalidArgumentExceptionTest extends PHPUnit_Framework_TestCase +{ + public function testFromNonExistingTypeWithNonExistingClass() + { + $className = __CLASS__ . uniqid(); + $exception = InvalidArgumentException::fromNonExistingClass($className); + + $this->assertInstanceOf('Doctrine\\Instantiator\\Exception\\InvalidArgumentException', $exception); + $this->assertSame('The provided class "' . $className . '" does not exist', $exception->getMessage()); + } + + public function testFromNonExistingTypeWithTrait() + { + if (PHP_VERSION_ID < 50400) { + $this->markTestSkipped('Need at least PHP 5.4.0, as this test requires traits support to run'); + } + + $exception = InvalidArgumentException::fromNonExistingClass( + 'DoctrineTest\\InstantiatorTestAsset\\SimpleTraitAsset' + ); + + $this->assertSame( + 'The provided type "DoctrineTest\\InstantiatorTestAsset\\SimpleTraitAsset" is a trait, ' + . 'and can not be instantiated', + $exception->getMessage() + ); + } + + public function testFromNonExistingTypeWithInterface() + { + $exception = InvalidArgumentException::fromNonExistingClass('Doctrine\\Instantiator\\InstantiatorInterface'); + + $this->assertSame( + 'The provided type "Doctrine\\Instantiator\\InstantiatorInterface" is an interface, ' + . 'and can not be instantiated', + $exception->getMessage() + ); + } + + public function testFromAbstractClass() + { + $reflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset'); + $exception = InvalidArgumentException::fromAbstractClass($reflection); + + $this->assertSame( + 'The provided class "DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset" is abstract, ' + . 'and can not be instantiated', + $exception->getMessage() + ); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..84154e7397eec5114e62b4860518de96da4d9736 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php @@ -0,0 +1,69 @@ +. + */ + +namespace DoctrineTest\InstantiatorTest\Exception; + +use Doctrine\Instantiator\Exception\UnexpectedValueException; +use Exception; +use PHPUnit_Framework_TestCase; +use ReflectionClass; + +/** + * Tests for {@see \Doctrine\Instantiator\Exception\UnexpectedValueException} + * + * @author Marco Pivetta + * + * @covers \Doctrine\Instantiator\Exception\UnexpectedValueException + */ +class UnexpectedValueExceptionTest extends PHPUnit_Framework_TestCase +{ + public function testFromSerializationTriggeredException() + { + $reflectionClass = new ReflectionClass($this); + $previous = new Exception(); + $exception = UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $previous); + + $this->assertInstanceOf('Doctrine\\Instantiator\\Exception\\UnexpectedValueException', $exception); + $this->assertSame($previous, $exception->getPrevious()); + $this->assertSame( + 'An exception was raised while trying to instantiate an instance of "' + . __CLASS__ . '" via un-serialization', + $exception->getMessage() + ); + } + + public function testFromUncleanUnSerialization() + { + $reflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset'); + $exception = UnexpectedValueException::fromUncleanUnSerialization($reflection, 'foo', 123, 'bar', 456); + + $this->assertInstanceOf('Doctrine\\Instantiator\\Exception\\UnexpectedValueException', $exception); + $this->assertSame( + 'Could not produce an instance of "DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset" ' + . 'via un-serialization, since an error was triggered in file "bar" at line "456"', + $exception->getMessage() + ); + + $previous = $exception->getPrevious(); + + $this->assertInstanceOf('Exception', $previous); + $this->assertSame('foo', $previous->getMessage()); + $this->assertSame(123, $previous->getCode()); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0a2cb9313d2988db984434d621bf4b3f613a7689 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php @@ -0,0 +1,219 @@ +. + */ + +namespace DoctrineTest\InstantiatorTest; + +use Doctrine\Instantiator\Exception\UnexpectedValueException; +use Doctrine\Instantiator\Instantiator; +use PHPUnit_Framework_TestCase; +use ReflectionClass; + +/** + * Tests for {@see \Doctrine\Instantiator\Instantiator} + * + * @author Marco Pivetta + * + * @covers \Doctrine\Instantiator\Instantiator + */ +class InstantiatorTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Instantiator + */ + private $instantiator; + + /** + * {@inheritDoc} + */ + protected function setUp() + { + $this->instantiator = new Instantiator(); + } + + /** + * @param string $className + * + * @dataProvider getInstantiableClasses + */ + public function testCanInstantiate($className) + { + $this->assertInstanceOf($className, $this->instantiator->instantiate($className)); + } + + /** + * @param string $className + * + * @dataProvider getInstantiableClasses + */ + public function testInstantiatesSeparateInstances($className) + { + $instance1 = $this->instantiator->instantiate($className); + $instance2 = $this->instantiator->instantiate($className); + + $this->assertEquals($instance1, $instance2); + $this->assertNotSame($instance1, $instance2); + } + + public function testExceptionOnUnSerializationException() + { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped( + 'As of facebook/hhvm#3432, HHVM has no PDORow, and therefore ' + . ' no internal final classes that cannot be instantiated' + ); + } + + $className = 'DoctrineTest\\InstantiatorTestAsset\\UnserializeExceptionArrayObjectAsset'; + + if (\PHP_VERSION_ID >= 50600) { + $className = 'PDORow'; + } + + if (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513) { + $className = 'DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'; + } + + $this->setExpectedException('Doctrine\\Instantiator\\Exception\\UnexpectedValueException'); + + $this->instantiator->instantiate($className); + } + + public function testNoticeOnUnSerializationException() + { + if (\PHP_VERSION_ID >= 50600) { + $this->markTestSkipped( + 'PHP 5.6 supports `ReflectionClass#newInstanceWithoutConstructor()` for some internal classes' + ); + } + + try { + $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\WakeUpNoticesAsset'); + + $this->fail('No exception was raised'); + } catch (UnexpectedValueException $exception) { + $wakeUpNoticesReflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\WakeUpNoticesAsset'); + $previous = $exception->getPrevious(); + + $this->assertInstanceOf('Exception', $previous); + + // in PHP 5.4.29 and PHP 5.5.13, this case is not a notice, but an exception being thrown + if (! (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513)) { + $this->assertSame( + 'Could not produce an instance of "DoctrineTest\\InstantiatorTestAsset\WakeUpNoticesAsset" ' + . 'via un-serialization, since an error was triggered in file "' + . $wakeUpNoticesReflection->getFileName() . '" at line "36"', + $exception->getMessage() + ); + + $this->assertSame('Something went bananas while un-serializing this instance', $previous->getMessage()); + $this->assertSame(\E_USER_NOTICE, $previous->getCode()); + } + } + } + + /** + * @param string $invalidClassName + * + * @dataProvider getInvalidClassNames + */ + public function testInstantiationFromNonExistingClass($invalidClassName) + { + $this->setExpectedException('Doctrine\\Instantiator\\Exception\\InvalidArgumentException'); + + $this->instantiator->instantiate($invalidClassName); + } + + public function testInstancesAreNotCloned() + { + $className = 'TemporaryClass' . uniqid(); + + eval('namespace ' . __NAMESPACE__ . '; class ' . $className . '{}'); + + $instance = $this->instantiator->instantiate(__NAMESPACE__ . '\\' . $className); + + $instance->foo = 'bar'; + + $instance2 = $this->instantiator->instantiate(__NAMESPACE__ . '\\' . $className); + + $this->assertObjectNotHasAttribute('foo', $instance2); + } + + /** + * Provides a list of instantiable classes (existing) + * + * @return string[][] + */ + public function getInstantiableClasses() + { + $classes = array( + array('stdClass'), + array(__CLASS__), + array('Doctrine\\Instantiator\\Instantiator'), + array('Exception'), + array('PharException'), + array('DoctrineTest\\InstantiatorTestAsset\\SimpleSerializableAsset'), + array('DoctrineTest\\InstantiatorTestAsset\\ExceptionAsset'), + array('DoctrineTest\\InstantiatorTestAsset\\FinalExceptionAsset'), + array('DoctrineTest\\InstantiatorTestAsset\\PharExceptionAsset'), + array('DoctrineTest\\InstantiatorTestAsset\\UnCloneableAsset'), + array('DoctrineTest\\InstantiatorTestAsset\\XMLReaderAsset'), + ); + + if (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513) { + return $classes; + } + + $classes = array_merge( + $classes, + array( + array('PharException'), + array('ArrayObject'), + array('DoctrineTest\\InstantiatorTestAsset\\ArrayObjectAsset'), + array('DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'), + ) + ); + + if (\PHP_VERSION_ID >= 50600) { + $classes[] = array('DoctrineTest\\InstantiatorTestAsset\\WakeUpNoticesAsset'); + $classes[] = array('DoctrineTest\\InstantiatorTestAsset\\UnserializeExceptionArrayObjectAsset'); + } + + return $classes; + } + + /** + * Provides a list of instantiable classes (existing) + * + * @return string[][] + */ + public function getInvalidClassNames() + { + $classNames = array( + array(__CLASS__ . uniqid()), + array('Doctrine\\Instantiator\\InstantiatorInterface'), + array('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset'), + ); + + if (\PHP_VERSION_ID >= 50400) { + $classNames[] = array('DoctrineTest\\InstantiatorTestAsset\\SimpleTraitAsset'); + } + + return $classNames; + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..fbe28ddd0e7889564a10e30792cddcfbb2761d73 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php @@ -0,0 +1,29 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +/** + * A simple asset for an abstract class + * + * @author Marco Pivetta + */ +abstract class AbstractClassAsset +{ +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..56146d7092a82e4d3c635d6e467c8429e5bd7ce9 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php @@ -0,0 +1,41 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +use ArrayObject; +use BadMethodCallException; + +/** + * Test asset that extends an internal PHP class + * + * @author Marco Pivetta + */ +class ArrayObjectAsset extends ArrayObject +{ + /** + * Constructor - should not be called + * + * @throws BadMethodCallException + */ + public function __construct() + { + throw new BadMethodCallException('Not supposed to be called!'); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..43bbe46b715ddc2902332ebbaa4a8735f359aff9 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php @@ -0,0 +1,41 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +use BadMethodCallException; +use Exception; + +/** + * Test asset that extends an internal PHP base exception + * + * @author Marco Pivetta + */ +class ExceptionAsset extends Exception +{ + /** + * Constructor - should not be called + * + * @throws BadMethodCallException + */ + public function __construct() + { + throw new BadMethodCallException('Not supposed to be called!'); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..7d268f5b3b7ff9b3329d8557dccb16db6806047e --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php @@ -0,0 +1,41 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +use BadMethodCallException; +use Exception; + +/** + * Test asset that extends an internal PHP base exception + * + * @author Marco Pivetta + */ +final class FinalExceptionAsset extends Exception +{ + /** + * Constructor - should not be called + * + * @throws BadMethodCallException + */ + public function __construct() + { + throw new BadMethodCallException('Not supposed to be called!'); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..553fd561262e52877e14ffdeddef13e1504503a9 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php @@ -0,0 +1,41 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +use BadMethodCallException; +use Phar; + +/** + * Test asset that extends an internal PHP class + * + * @author Marco Pivetta + */ +class PharAsset extends Phar +{ + /** + * Constructor - should not be called + * + * @throws BadMethodCallException + */ + public function __construct() + { + throw new BadMethodCallException('Not supposed to be called!'); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..42bf73e7eebb1fc920d952517fd6ea20e0587053 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php @@ -0,0 +1,44 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +use BadMethodCallException; +use PharException; + +/** + * Test asset that extends an internal PHP class + * This class should be serializable without problems + * and without getting the "Erroneous data format for unserializing" + * error + * + * @author Marco Pivetta + */ +class PharExceptionAsset extends PharException +{ + /** + * Constructor - should not be called + * + * @throws BadMethodCallException + */ + public function __construct() + { + throw new BadMethodCallException('Not supposed to be called!'); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..ba19aaf63f913ffb55300368896d6d4e06fc4aff --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php @@ -0,0 +1,62 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +use ArrayObject; +use BadMethodCallException; +use Serializable; + +/** + * Serializable test asset that also extends an internal class + * + * @author Marco Pivetta + */ +class SerializableArrayObjectAsset extends ArrayObject implements Serializable +{ + /** + * Constructor - should not be called + * + * @throws BadMethodCallException + */ + public function __construct() + { + throw new BadMethodCallException('Not supposed to be called!'); + } + + /** + * {@inheritDoc} + */ + public function serialize() + { + return ''; + } + + /** + * {@inheritDoc} + * + * Should not be called + * + * @throws BadMethodCallException + */ + public function unserialize($serialized) + { + throw new BadMethodCallException('Not supposed to be called!'); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..39f84a6c0d7f6dd44a4f577a149d3c75c55510fb --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php @@ -0,0 +1,61 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +use BadMethodCallException; +use Serializable; + +/** + * Base serializable test asset + * + * @author Marco Pivetta + */ +class SimpleSerializableAsset implements Serializable +{ + /** + * Constructor - should not be called + * + * @throws BadMethodCallException + */ + public function __construct() + { + throw new BadMethodCallException('Not supposed to be called!'); + } + + /** + * {@inheritDoc} + */ + public function serialize() + { + return ''; + } + + /** + * {@inheritDoc} + * + * Should not be called + * + * @throws BadMethodCallException + */ + public function unserialize($serialized) + { + throw new BadMethodCallException('Not supposed to be called!'); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..04e78069d21ed32aebbaa1d1b5e6e310cd5815c3 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php @@ -0,0 +1,29 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +/** + * A simple trait with no attached logic + * + * @author Marco Pivetta + */ +trait SimpleTraitAsset +{ +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..7d03bdab0b69b64abdc3c521f2462dcbe521628f --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php @@ -0,0 +1,50 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +use BadMethodCallException; + +/** + * Base un-cloneable asset + * + * @author Marco Pivetta + */ +class UnCloneableAsset +{ + /** + * Constructor - should not be called + * + * @throws BadMethodCallException + */ + public function __construct() + { + throw new BadMethodCallException('Not supposed to be called!'); + } + + /** + * Magic `__clone` - should not be invoked + * + * @throws BadMethodCallException + */ + public function __clone() + { + throw new BadMethodCallException('Not supposed to be called!'); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..b348a40535b32e1b46b1434c973733e700f6e308 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php @@ -0,0 +1,39 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +use ArrayObject; +use BadMethodCallException; + +/** + * A simple asset for an abstract class + * + * @author Marco Pivetta + */ +class UnserializeExceptionArrayObjectAsset extends ArrayObject +{ + /** + * {@inheritDoc} + */ + public function __wakeup() + { + throw new BadMethodCallException(); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..18dc6711dc9123cda6bb5f5173454c0e4461d5fd --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php @@ -0,0 +1,38 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +use ArrayObject; + +/** + * A simple asset for an abstract class + * + * @author Marco Pivetta + */ +class WakeUpNoticesAsset extends ArrayObject +{ + /** + * Wakeup method called after un-serialization + */ + public function __wakeup() + { + trigger_error('Something went bananas while un-serializing this instance'); + } +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php new file mode 100644 index 0000000000000000000000000000000000000000..39ee6992aee6d7e12a180411394299f91b944877 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php @@ -0,0 +1,41 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +use BadMethodCallException; +use XMLReader; + +/** + * Test asset that extends an internal PHP class + * + * @author Dave Marshall + */ +class XMLReaderAsset extends XMLReader +{ + /** + * Constructor - should not be called + * + * @throws BadMethodCallException + */ + public function __construct() + { + throw new BadMethodCallException('Not supposed to be called!'); + } +} diff --git a/vendor/doctrine/lexer/LICENSE b/vendor/doctrine/lexer/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5e781fce4bb504715ba0ec0188715b18a198ca6b --- /dev/null +++ b/vendor/doctrine/lexer/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2013 Doctrine Project + +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/vendor/doctrine/lexer/README.md b/vendor/doctrine/lexer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..66f443089eb33fe51fd2bbc4df260ef4fd6bf898 --- /dev/null +++ b/vendor/doctrine/lexer/README.md @@ -0,0 +1,5 @@ +# Doctrine Lexer + +Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. + +This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). diff --git a/vendor/doctrine/lexer/composer.json b/vendor/doctrine/lexer/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..8cd694c6525462fb0189392c3862c1f0d22a8cdf --- /dev/null +++ b/vendor/doctrine/lexer/composer.json @@ -0,0 +1,24 @@ +{ + "name": "doctrine/lexer", + "type": "library", + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "keywords": ["lexer", "parser"], + "homepage": "http://www.doctrine-project.org", + "license": "MIT", + "authors": [ + {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, + {"name": "Roman Borschel", "email": "roman@code-factory.org"}, + {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} + ], + "require": { + "php": ">=5.3.2" + }, + "autoload": { + "psr-0": { "Doctrine\\Common\\Lexer\\": "lib/" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php b/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php new file mode 100644 index 0000000000000000000000000000000000000000..399a55230b0871e19fea7c5d2a6466a08d6fcd43 --- /dev/null +++ b/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php @@ -0,0 +1,327 @@ +. + */ + +namespace Doctrine\Common\Lexer; + +/** + * Base class for writing simple lexers, i.e. for creating small DSLs. + * + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +abstract class AbstractLexer +{ + /** + * Lexer original input string. + * + * @var string + */ + private $input; + + /** + * Array of scanned tokens. + * + * Each token is an associative array containing three items: + * - 'value' : the string value of the token in the input string + * - 'type' : the type of the token (identifier, numeric, string, input + * parameter, none) + * - 'position' : the position of the token in the input string + * + * @var array + */ + private $tokens = array(); + + /** + * Current lexer position in input string. + * + * @var integer + */ + private $position = 0; + + /** + * Current peek of current lexer position. + * + * @var integer + */ + private $peek = 0; + + /** + * The next token in the input. + * + * @var array + */ + public $lookahead; + + /** + * The last matched/seen token. + * + * @var array + */ + public $token; + + /** + * Sets the input data to be tokenized. + * + * The Lexer is immediately reset and the new input tokenized. + * Any unprocessed tokens from any previous input are lost. + * + * @param string $input The input to be tokenized. + * + * @return void + */ + public function setInput($input) + { + $this->input = $input; + $this->tokens = array(); + + $this->reset(); + $this->scan($input); + } + + /** + * Resets the lexer. + * + * @return void + */ + public function reset() + { + $this->lookahead = null; + $this->token = null; + $this->peek = 0; + $this->position = 0; + } + + /** + * Resets the peek pointer to 0. + * + * @return void + */ + public function resetPeek() + { + $this->peek = 0; + } + + /** + * Resets the lexer position on the input to the given position. + * + * @param integer $position Position to place the lexical scanner. + * + * @return void + */ + public function resetPosition($position = 0) + { + $this->position = $position; + } + + /** + * Retrieve the original lexer's input until a given position. + * + * @param integer $position + * + * @return string + */ + public function getInputUntilPosition($position) + { + return substr($this->input, 0, $position); + } + + /** + * Checks whether a given token matches the current lookahead. + * + * @param integer|string $token + * + * @return boolean + */ + public function isNextToken($token) + { + return null !== $this->lookahead && $this->lookahead['type'] === $token; + } + + /** + * Checks whether any of the given tokens matches the current lookahead. + * + * @param array $tokens + * + * @return boolean + */ + public function isNextTokenAny(array $tokens) + { + return null !== $this->lookahead && in_array($this->lookahead['type'], $tokens, true); + } + + /** + * Moves to the next token in the input string. + * + * @return boolean + */ + public function moveNext() + { + $this->peek = 0; + $this->token = $this->lookahead; + $this->lookahead = (isset($this->tokens[$this->position])) + ? $this->tokens[$this->position++] : null; + + return $this->lookahead !== null; + } + + /** + * Tells the lexer to skip input tokens until it sees a token with the given value. + * + * @param string $type The token type to skip until. + * + * @return void + */ + public function skipUntil($type) + { + while ($this->lookahead !== null && $this->lookahead['type'] !== $type) { + $this->moveNext(); + } + } + + /** + * Checks if given value is identical to the given token. + * + * @param mixed $value + * @param integer $token + * + * @return boolean + */ + public function isA($value, $token) + { + return $this->getType($value) === $token; + } + + /** + * Moves the lookahead token forward. + * + * @return array|null The next token or NULL if there are no more tokens ahead. + */ + public function peek() + { + if (isset($this->tokens[$this->position + $this->peek])) { + return $this->tokens[$this->position + $this->peek++]; + } else { + return null; + } + } + + /** + * Peeks at the next token, returns it and immediately resets the peek. + * + * @return array|null The next token or NULL if there are no more tokens ahead. + */ + public function glimpse() + { + $peek = $this->peek(); + $this->peek = 0; + return $peek; + } + + /** + * Scans the input string for tokens. + * + * @param string $input A query string. + * + * @return void + */ + protected function scan($input) + { + static $regex; + + if ( ! isset($regex)) { + $regex = sprintf( + '/(%s)|%s/%s', + implode(')|(', $this->getCatchablePatterns()), + implode('|', $this->getNonCatchablePatterns()), + $this->getModifiers() + ); + } + + $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; + $matches = preg_split($regex, $input, -1, $flags); + + foreach ($matches as $match) { + // Must remain before 'value' assignment since it can change content + $type = $this->getType($match[0]); + + $this->tokens[] = array( + 'value' => $match[0], + 'type' => $type, + 'position' => $match[1], + ); + } + } + + /** + * Gets the literal for a given token. + * + * @param integer $token + * + * @return string + */ + public function getLiteral($token) + { + $className = get_class($this); + $reflClass = new \ReflectionClass($className); + $constants = $reflClass->getConstants(); + + foreach ($constants as $name => $value) { + if ($value === $token) { + return $className . '::' . $name; + } + } + + return $token; + } + + /** + * Regex modifiers + * + * @return string + */ + protected function getModifiers() + { + return 'i'; + } + + /** + * Lexical catchable patterns. + * + * @return array + */ + abstract protected function getCatchablePatterns(); + + /** + * Lexical non-catchable patterns. + * + * @return array + */ + abstract protected function getNonCatchablePatterns(); + + /** + * Retrieve token type. Also processes the token value if necessary. + * + * @param string $value + * + * @return integer + */ + abstract protected function getType(&$value); +} diff --git a/vendor/doctrine/orm/.coveralls.yml b/vendor/doctrine/orm/.coveralls.yml new file mode 100644 index 0000000000000000000000000000000000000000..b086fff7a459ddc8ccbf7aa082afed34036c6e27 --- /dev/null +++ b/vendor/doctrine/orm/.coveralls.yml @@ -0,0 +1,4 @@ +# for php-coveralls +service_name: travis-ci +src_dir: lib +coverage_clover: build/logs/clover*.xml diff --git a/vendor/doctrine/orm/LICENSE b/vendor/doctrine/orm/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4a91f0bf2803d308cce8010164548a811127bc27 --- /dev/null +++ b/vendor/doctrine/orm/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2012 Doctrine Project + +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/vendor/doctrine/orm/README.markdown b/vendor/doctrine/orm/README.markdown new file mode 100644 index 0000000000000000000000000000000000000000..6cbccaf799663a523088a160cb3a1e5e930da889 --- /dev/null +++ b/vendor/doctrine/orm/README.markdown @@ -0,0 +1,30 @@ +| [Master][Master] | [2.4][2.4] | [2.3][2.3] | [2.2][2.2] | [2.1][2.1] | +|:----------------:|:----------:|:----------:|:----------:|:----------:| +| [![Build status][Master image]][Master] | [![Build status][2.4 image]][2.4] | [![Build status][2.3 image]][2.3] | [![Build status][2.2 image]][2.2] | [![Build status][2.1 image]][2.1] | +| [![Coverage Status][Master coverage image]][Master coverage] | + +Doctrine 2 is an object-relational mapper (ORM) for PHP 5.4+ that provides transparent persistence +for PHP objects. It sits on top of a powerful database abstraction layer (DBAL). One of its key features +is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), +inspired by Hibernate's HQL. This provides developers with a powerful alternative to SQL that maintains flexibility +without requiring unnecessary code duplication. + +## More resources: + +* [Website](http://www.doctrine-project.org) +* [Documentation](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/index.html) +* [Issue Tracker](http://www.doctrine-project.org/jira/browse/DDC) +* [Downloads](http://github.com/doctrine/doctrine2/downloads) + + [Master image]: https://travis-ci.org/doctrine/doctrine2.svg?branch=master + [Master]: https://travis-ci.org/doctrine/doctrine2 + [Master coverage image]: https://coveralls.io/repos/doctrine/doctrine2/badge.png?branch=master + [Master coverage]: https://coveralls.io/r/doctrine/doctrine2?branch=master + [2.4 image]: https://travis-ci.org/doctrine/doctrine2.svg?branch=2.4 + [2.4]: https://github.com/doctrine/doctrine2/tree/2.4 + [2.3 image]: https://travis-ci.org/doctrine/doctrine2.svg?branch=2.3 + [2.3]: https://github.com/doctrine/doctrine2/tree/2.3 + [2.2 image]: https://travis-ci.org/doctrine/doctrine2.svg?branch=2.2 + [2.2]: https://github.com/doctrine/doctrine2/tree/2.2 + [2.1 image]: https://travis-ci.org/doctrine/doctrine2.svg?branch=2.1.x + [2.1]: https://github.com/doctrine/doctrine2/tree/2.1.x diff --git a/vendor/doctrine/orm/SECURITY.md b/vendor/doctrine/orm/SECURITY.md new file mode 100644 index 0000000000000000000000000000000000000000..313900211e6b31568329e88fbf4143c4d2100405 --- /dev/null +++ b/vendor/doctrine/orm/SECURITY.md @@ -0,0 +1,18 @@ +Security +======== + +The Doctrine library is operating very close to your database and as such needs +to handle and make assumptions about SQL injection vulnerabilities. + +It is vital that you understand how Doctrine approaches security, because +we cannot protect you from SQL injection. + +Please read the documentation chapter on Security in Doctrine DBAL and ORM to +understand the assumptions we make. + +- [DBAL Security Page](https://github.com/doctrine/dbal/blob/master/docs/en/reference/security.rst) +- [ORM Security Page](https://github.com/doctrine/doctrine2/blob/master/docs/en/reference/security.rst) + +If you find a Security bug in Doctrine, please report it on Jira and change the +Security Level to "Security Issues". It will be visible to Doctrine Core +developers and you only. diff --git a/vendor/doctrine/orm/bin/doctrine b/vendor/doctrine/orm/bin/doctrine new file mode 100755 index 0000000000000000000000000000000000000000..c359ca7d83ee8d78ca3866af26af40ec36ebbf75 --- /dev/null +++ b/vendor/doctrine/orm/bin/doctrine @@ -0,0 +1,4 @@ +#!/usr/bin/env php +. + */ + +require_once 'Doctrine/Common/ClassLoader.php'; + +$classLoader = new \Doctrine\Common\ClassLoader('Doctrine'); +$classLoader->register(); + +$classLoader = new \Doctrine\Common\ClassLoader('Symfony'); +$classLoader->register(); + +$configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php'; + +$helperSet = null; +if (file_exists($configFile)) { + if ( ! is_readable($configFile)) { + trigger_error( + 'Configuration file [' . $configFile . '] does not have read permission.', E_ERROR + ); + } + + require $configFile; + + foreach ($GLOBALS as $helperSetCandidate) { + if ($helperSetCandidate instanceof \Symfony\Component\Console\Helper\HelperSet) { + $helperSet = $helperSetCandidate; + break; + } + } +} + +$helperSet = ($helperSet) ?: new \Symfony\Component\Console\Helper\HelperSet(); + +\Doctrine\ORM\Tools\Console\ConsoleRunner::run($helperSet); diff --git a/vendor/doctrine/orm/bin/doctrine.bat b/vendor/doctrine/orm/bin/doctrine.bat new file mode 100644 index 0000000000000000000000000000000000000000..a9e8ceefd9eaf581450099adcec813b36ea045b4 --- /dev/null +++ b/vendor/doctrine/orm/bin/doctrine.bat @@ -0,0 +1,9 @@ +@echo off + +if "%PHPBIN%" == "" set PHPBIN=@php_bin@ +if not exist "%PHPBIN%" if "%PHP_PEAR_PHP_BIN%" neq "" goto USE_PEAR_PATH +GOTO RUN +:USE_PEAR_PATH +set PHPBIN=%PHP_PEAR_PHP_BIN% +:RUN +"%PHPBIN%" "@bin_dir@\doctrine" %* diff --git a/vendor/doctrine/orm/bin/doctrine.php b/vendor/doctrine/orm/bin/doctrine.php new file mode 100755 index 0000000000000000000000000000000000000000..842c5493f8ec3d3d3471554ae617e4a4107cea1b --- /dev/null +++ b/vendor/doctrine/orm/bin/doctrine.php @@ -0,0 +1,66 @@ +. + */ + +use Symfony\Component\Console\Helper\HelperSet; +use Doctrine\ORM\Tools\Console\ConsoleRunner; + +$autoloadFiles = array(__DIR__ . '/../vendor/autoload.php', + __DIR__ . '/../../../autoload.php'); + +foreach ($autoloadFiles as $autoloadFile) { + if (file_exists($autoloadFile)) { + require_once $autoloadFile; + } +} + +$directories = array(getcwd(), getcwd() . DIRECTORY_SEPARATOR . 'config'); + +$configFile = null; +foreach ($directories as $directory) { + $configFile = $directory . DIRECTORY_SEPARATOR . 'cli-config.php'; + + if (file_exists($configFile)) { + break; + } +} + +if ( ! file_exists($configFile)) { + ConsoleRunner::printCliConfigTemplate(); + exit(1); +} + +if ( ! is_readable($configFile)) { + echo 'Configuration file [' . $configFile . '] does not have read permission.' . "\n"; + exit(1); +} + +$commands = array(); + +$helperSet = require $configFile; + +if ( ! ($helperSet instanceof HelperSet)) { + foreach ($GLOBALS as $helperSetCandidate) { + if ($helperSetCandidate instanceof HelperSet) { + $helperSet = $helperSetCandidate; + break; + } + } +} + +\Doctrine\ORM\Tools\Console\ConsoleRunner::run($helperSet, $commands); diff --git a/vendor/doctrine/orm/composer.json b/vendor/doctrine/orm/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..759ae5c04004eb820568ba772517bc8c6b7dfdfe --- /dev/null +++ b/vendor/doctrine/orm/composer.json @@ -0,0 +1,47 @@ +{ + "name": "doctrine/orm", + "type": "library", + "description": "Object-Relational-Mapper for PHP", + "keywords": ["orm", "database"], + "homepage": "http://www.doctrine-project.org", + "license": "MIT", + "authors": [ + {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, + {"name": "Roman Borschel", "email": "roman@code-factory.org"}, + {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, + {"name": "Jonathan Wage", "email": "jonwage@gmail.com"} + ], + "minimum-stability": "dev", + "require": { + "php": ">=5.4", + "ext-pdo": "*", + "doctrine/collections": "~1.2", + "doctrine/dbal": ">=2.5-dev,<2.6-dev", + "doctrine/instantiator": "~1.0.1", + "doctrine/common": ">=2.5-dev,<2.8-dev", + "doctrine/cache": "~1.4", + "symfony/console": "~2.5|~3.0" + }, + "require-dev": { + "symfony/yaml": "~2.3|~3.0", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" + }, + "autoload": { + "psr-0": { "Doctrine\\ORM\\": "lib/" } + }, + "autoload-dev": { + "psr-0": { "Doctrine\\Tests\\": "tests/" } + }, + "bin": ["bin/doctrine", "bin/doctrine.php"], + "extra": { + "branch-alias": { + "dev-master": "2.6.x-dev" + } + }, + "archive": { + "exclude": ["!vendor", "tests", "*phpunit.xml", ".travis.yml", "build.xml", "build.properties", "composer.phar", "vendor/satooshi", "lib/vendor", "*.swp", "*coveralls.yml"] + } +} diff --git a/vendor/doctrine/orm/docs/LICENSE.md b/vendor/doctrine/orm/docs/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..1bf8659a1b054770f369be2cb526a66f12674593 --- /dev/null +++ b/vendor/doctrine/orm/docs/LICENSE.md @@ -0,0 +1,363 @@ +The Doctrine2 documentation is licensed under [CC BY-NC-SA 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US) + +Creative Commons Legal Code + +Attribution-NonCommercial-ShareAlike 3.0 Unported + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR + DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE +COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY +COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS +AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE +TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY +BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS +CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND +CONDITIONS. + +1. Definitions + + a. "Adaptation" means a work based upon the Work, or upon the Work and + other pre-existing works, such as a translation, adaptation, + derivative work, arrangement of music or other alterations of a + literary or artistic work, or phonogram or performance and includes + cinematographic adaptations or any other form in which the Work may be + recast, transformed, or adapted including in any form recognizably + derived from the original, except that a work that constitutes a + Collection will not be considered an Adaptation for the purpose of + this License. For the avoidance of doubt, where the Work is a musical + work, performance or phonogram, the synchronization of the Work in + timed-relation with a moving image ("synching") will be considered an + Adaptation for the purpose of this License. + b. "Collection" means a collection of literary or artistic works, such as + encyclopedias and anthologies, or performances, phonograms or + broadcasts, or other works or subject matter other than works listed + in Section 1(g) below, which, by reason of the selection and + arrangement of their contents, constitute intellectual creations, in + which the Work is included in its entirety in unmodified form along + with one or more other contributions, each constituting separate and + independent works in themselves, which together are assembled into a + collective whole. A work that constitutes a Collection will not be + considered an Adaptation (as defined above) for the purposes of this + License. + c. "Distribute" means to make available to the public the original and + copies of the Work or Adaptation, as appropriate, through sale or + other transfer of ownership. + d. "License Elements" means the following high-level license attributes + as selected by Licensor and indicated in the title of this License: + Attribution, Noncommercial, ShareAlike. + e. "Licensor" means the individual, individuals, entity or entities that + offer(s) the Work under the terms of this License. + f. "Original Author" means, in the case of a literary or artistic work, + the individual, individuals, entity or entities who created the Work + or if no individual or entity can be identified, the publisher; and in + addition (i) in the case of a performance the actors, singers, + musicians, dancers, and other persons who act, sing, deliver, declaim, + play in, interpret or otherwise perform literary or artistic works or + expressions of folklore; (ii) in the case of a phonogram the producer + being the person or legal entity who first fixes the sounds of a + performance or other sounds; and, (iii) in the case of broadcasts, the + organization that transmits the broadcast. + g. "Work" means the literary and/or artistic work offered under the terms + of this License including without limitation any production in the + literary, scientific and artistic domain, whatever may be the mode or + form of its expression including digital form, such as a book, + pamphlet and other writing; a lecture, address, sermon or other work + of the same nature; a dramatic or dramatico-musical work; a + choreographic work or entertainment in dumb show; a musical + composition with or without words; a cinematographic work to which are + assimilated works expressed by a process analogous to cinematography; + a work of drawing, painting, architecture, sculpture, engraving or + lithography; a photographic work to which are assimilated works + expressed by a process analogous to photography; a work of applied + art; an illustration, map, plan, sketch or three-dimensional work + relative to geography, topography, architecture or science; a + performance; a broadcast; a phonogram; a compilation of data to the + extent it is protected as a copyrightable work; or a work performed by + a variety or circus performer to the extent it is not otherwise + considered a literary or artistic work. + h. "You" means an individual or entity exercising rights under this + License who has not previously violated the terms of this License with + respect to the Work, or who has received express permission from the + Licensor to exercise rights under this License despite a previous + violation. + i. "Publicly Perform" means to perform public recitations of the Work and + to communicate to the public those public recitations, by any means or + process, including by wire or wireless means or public digital + performances; to make available to the public Works in such a way that + members of the public may access these Works from a place and at a + place individually chosen by them; to perform the Work to the public + by any means or process and the communication to the public of the + performances of the Work, including by public digital performance; to + broadcast and rebroadcast the Work by any means including signs, + sounds or images. + j. "Reproduce" means to make copies of the Work by any means including + without limitation by sound or visual recordings and the right of + fixation and reproducing fixations of the Work, including storage of a + protected performance or phonogram in digital form or other electronic + medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, +limit, or restrict any uses free from copyright or rights arising from +limitations or exceptions that are provided for in connection with the +copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, +Licensor hereby grants You a worldwide, royalty-free, non-exclusive, +perpetual (for the duration of the applicable copyright) license to +exercise the rights in the Work as stated below: + + a. to Reproduce the Work, to incorporate the Work into one or more + Collections, and to Reproduce the Work as incorporated in the + Collections; + b. to create and Reproduce Adaptations provided that any such Adaptation, + including any translation in any medium, takes reasonable steps to + clearly label, demarcate or otherwise identify that changes were made + to the original Work. For example, a translation could be marked "The + original work was translated from English to Spanish," or a + modification could indicate "The original work has been modified."; + c. to Distribute and Publicly Perform the Work including as incorporated + in Collections; and, + d. to Distribute and Publicly Perform Adaptations. + +The above rights may be exercised in all media and formats whether now +known or hereafter devised. The above rights include the right to make +such modifications as are technically necessary to exercise the rights in +other media and formats. Subject to Section 8(f), all rights not expressly +granted by Licensor are hereby reserved, including but not limited to the +rights described in Section 4(e). + +4. Restrictions. The license granted in Section 3 above is expressly made +subject to and limited by the following restrictions: + + a. You may Distribute or Publicly Perform the Work only under the terms + of this License. You must include a copy of, or the Uniform Resource + Identifier (URI) for, this License with every copy of the Work You + Distribute or Publicly Perform. You may not offer or impose any terms + on the Work that restrict the terms of this License or the ability of + the recipient of the Work to exercise the rights granted to that + recipient under the terms of the License. You may not sublicense the + Work. You must keep intact all notices that refer to this License and + to the disclaimer of warranties with every copy of the Work You + Distribute or Publicly Perform. When You Distribute or Publicly + Perform the Work, You may not impose any effective technological + measures on the Work that restrict the ability of a recipient of the + Work from You to exercise the rights granted to that recipient under + the terms of the License. This Section 4(a) applies to the Work as + incorporated in a Collection, but this does not require the Collection + apart from the Work itself to be made subject to the terms of this + License. If You create a Collection, upon notice from any Licensor You + must, to the extent practicable, remove from the Collection any credit + as required by Section 4(d), as requested. If You create an + Adaptation, upon notice from any Licensor You must, to the extent + practicable, remove from the Adaptation any credit as required by + Section 4(d), as requested. + b. You may Distribute or Publicly Perform an Adaptation only under: (i) + the terms of this License; (ii) a later version of this License with + the same License Elements as this License; (iii) a Creative Commons + jurisdiction license (either this or a later license version) that + contains the same License Elements as this License (e.g., + Attribution-NonCommercial-ShareAlike 3.0 US) ("Applicable License"). + You must include a copy of, or the URI, for Applicable License with + every copy of each Adaptation You Distribute or Publicly Perform. You + may not offer or impose any terms on the Adaptation that restrict the + terms of the Applicable License or the ability of the recipient of the + Adaptation to exercise the rights granted to that recipient under the + terms of the Applicable License. You must keep intact all notices that + refer to the Applicable License and to the disclaimer of warranties + with every copy of the Work as included in the Adaptation You + Distribute or Publicly Perform. When You Distribute or Publicly + Perform the Adaptation, You may not impose any effective technological + measures on the Adaptation that restrict the ability of a recipient of + the Adaptation from You to exercise the rights granted to that + recipient under the terms of the Applicable License. This Section 4(b) + applies to the Adaptation as incorporated in a Collection, but this + does not require the Collection apart from the Adaptation itself to be + made subject to the terms of the Applicable License. + c. You may not exercise any of the rights granted to You in Section 3 + above in any manner that is primarily intended for or directed toward + commercial advantage or private monetary compensation. The exchange of + the Work for other copyrighted works by means of digital file-sharing + or otherwise shall not be considered to be intended for or directed + toward commercial advantage or private monetary compensation, provided + there is no payment of any monetary compensation in con-nection with + the exchange of copyrighted works. + d. If You Distribute, or Publicly Perform the Work or any Adaptations or + Collections, You must, unless a request has been made pursuant to + Section 4(a), keep intact all copyright notices for the Work and + provide, reasonable to the medium or means You are utilizing: (i) the + name of the Original Author (or pseudonym, if applicable) if supplied, + and/or if the Original Author and/or Licensor designate another party + or parties (e.g., a sponsor institute, publishing entity, journal) for + attribution ("Attribution Parties") in Licensor's copyright notice, + terms of service or by other reasonable means, the name of such party + or parties; (ii) the title of the Work if supplied; (iii) to the + extent reasonably practicable, the URI, if any, that Licensor + specifies to be associated with the Work, unless such URI does not + refer to the copyright notice or licensing information for the Work; + and, (iv) consistent with Section 3(b), in the case of an Adaptation, + a credit identifying the use of the Work in the Adaptation (e.g., + "French translation of the Work by Original Author," or "Screenplay + based on original Work by Original Author"). The credit required by + this Section 4(d) may be implemented in any reasonable manner; + provided, however, that in the case of a Adaptation or Collection, at + a minimum such credit will appear, if a credit for all contributing + authors of the Adaptation or Collection appears, then as part of these + credits and in a manner at least as prominent as the credits for the + other contributing authors. For the avoidance of doubt, You may only + use the credit required by this Section for the purpose of attribution + in the manner set out above and, by exercising Your rights under this + License, You may not implicitly or explicitly assert or imply any + connection with, sponsorship or endorsement by the Original Author, + Licensor and/or Attribution Parties, as appropriate, of You or Your + use of the Work, without the separate, express prior written + permission of the Original Author, Licensor and/or Attribution + Parties. + e. For the avoidance of doubt: + + i. Non-waivable Compulsory License Schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme cannot be waived, the Licensor + reserves the exclusive right to collect such royalties for any + exercise by You of the rights granted under this License; + ii. Waivable Compulsory License Schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme can be waived, the Licensor reserves + the exclusive right to collect such royalties for any exercise by + You of the rights granted under this License if Your exercise of + such rights is for a purpose or use which is otherwise than + noncommercial as permitted under Section 4(c) and otherwise waives + the right to collect royalties through any statutory or compulsory + licensing scheme; and, + iii. Voluntary License Schemes. The Licensor reserves the right to + collect royalties, whether individually or, in the event that the + Licensor is a member of a collecting society that administers + voluntary licensing schemes, via that society, from any exercise + by You of the rights granted under this License that is for a + purpose or use which is otherwise than noncommercial as permitted + under Section 4(c). + f. Except as otherwise agreed in writing by the Licensor or as may be + otherwise permitted by applicable law, if You Reproduce, Distribute or + Publicly Perform the Work either by itself or as part of any + Adaptations or Collections, You must not distort, mutilate, modify or + take other derogatory action in relation to the Work which would be + prejudicial to the Original Author's honor or reputation. Licensor + agrees that in those jurisdictions (e.g. Japan), in which any exercise + of the right granted in Section 3(b) of this License (the right to + make Adaptations) would be deemed to be a distortion, mutilation, + modification or other derogatory action prejudicial to the Original + Author's honor and reputation, the Licensor will waive or not assert, + as appropriate, this Section, to the fullest extent permitted by the + applicable national law, to enable You to reasonably exercise Your + right under Section 3(b) of this License (right to make Adaptations) + but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING AND TO THE +FULLEST EXTENT PERMITTED BY APPLICABLE LAW, LICENSOR OFFERS THE WORK AS-IS +AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE +WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT +LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, +ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT +DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED +WARRANTIES, SO THIS EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE +LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR +ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES +ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + a. This License and the rights granted hereunder will terminate + automatically upon any breach by You of the terms of this License. + Individuals or entities who have received Adaptations or Collections + from You under this License, however, will not have their licenses + terminated provided such individuals or entities remain in full + compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will + survive any termination of this License. + b. Subject to the above terms and conditions, the license granted here is + perpetual (for the duration of the applicable copyright in the Work). + Notwithstanding the above, Licensor reserves the right to release the + Work under different license terms or to stop distributing the Work at + any time; provided, however that any such election will not serve to + withdraw this License (or any other license that has been, or is + required to be, granted under the terms of this License), and this + License will continue in full force and effect unless terminated as + stated above. + +8. Miscellaneous + + a. Each time You Distribute or Publicly Perform the Work or a Collection, + the Licensor offers to the recipient a license to the Work on the same + terms and conditions as the license granted to You under this License. + b. Each time You Distribute or Publicly Perform an Adaptation, Licensor + offers to the recipient a license to the original Work on the same + terms and conditions as the license granted to You under this License. + c. If any provision of this License is invalid or unenforceable under + applicable law, it shall not affect the validity or enforceability of + the remainder of the terms of this License, and without further action + by the parties to this agreement, such provision shall be reformed to + the minimum extent necessary to make such provision valid and + enforceable. + d. No term or provision of this License shall be deemed waived and no + breach consented to unless such waiver or consent shall be in writing + and signed by the party to be charged with such waiver or consent. + e. This License constitutes the entire agreement between the parties with + respect to the Work licensed here. There are no understandings, + agreements or representations with respect to the Work not specified + here. Licensor shall not be bound by any additional provisions that + may appear in any communication from You. This License may not be + modified without the mutual written agreement of the Licensor and You. + f. The rights granted under, and the subject matter referenced, in this + License were drafted utilizing the terminology of the Berne Convention + for the Protection of Literary and Artistic Works (as amended on + September 28, 1979), the Rome Convention of 1961, the WIPO Copyright + Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 + and the Universal Copyright Convention (as revised on July 24, 1971). + These rights and subject matter take effect in the relevant + jurisdiction in which the License terms are sought to be enforced + according to the corresponding provisions of the implementation of + those treaty provisions in the applicable national law. If the + standard suite of rights granted under applicable copyright law + includes additional rights not granted under this License, such + additional rights are deemed to be included in the License; this + License is not intended to restrict the license of any rights under + applicable law. + + +Creative Commons Notice + + Creative Commons is not a party to this License, and makes no warranty + whatsoever in connection with the Work. Creative Commons will not be + liable to You or any party on any legal theory for any damages + whatsoever, including without limitation any general, special, + incidental or consequential damages arising in connection to this + license. Notwithstanding the foregoing two (2) sentences, if Creative + Commons has expressly identified itself as the Licensor hereunder, it + shall have all rights and obligations of Licensor. + + Except for the limited purpose of indicating to the public that the + Work is licensed under the CCPL, Creative Commons does not authorize + the use by either party of the trademark "Creative Commons" or any + related trademark or logo of Creative Commons without the prior + written consent of Creative Commons. Any permitted use will be in + compliance with Creative Commons' then-current trademark usage + guidelines, as may be published on its website or otherwise made + available upon request from time to time. For the avoidance of doubt, + this trademark restriction does not form part of this License. + + Creative Commons may be contacted at http://creativecommons.org/. + diff --git a/vendor/doctrine/orm/docs/README.md b/vendor/doctrine/orm/docs/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4315116f88a61ce90f69788e244314eb47a677c3 --- /dev/null +++ b/vendor/doctrine/orm/docs/README.md @@ -0,0 +1,8 @@ +# Doctrine ORM Documentation + +## How to Generate + +1. Run ./bin/install-dependencies.sh +2. Run ./bin/generate-docs.sh + +It will generate the documentation into the build directory of the checkout. \ No newline at end of file diff --git a/vendor/doctrine/orm/docs/bin/generate-docs.sh b/vendor/doctrine/orm/docs/bin/generate-docs.sh new file mode 100755 index 0000000000000000000000000000000000000000..7d06d2a8dd291add1ee689bfe3fa614ac5fe56b1 --- /dev/null +++ b/vendor/doctrine/orm/docs/bin/generate-docs.sh @@ -0,0 +1,10 @@ +#!/bin/bash +EXECPATH=`dirname $0` +cd $EXECPATH +cd .. + +rm build -Rf +sphinx-build en build + +sphinx-build -b latex en build/pdf +rubber --into build/pdf --pdf build/pdf/Doctrine2ORM.tex \ No newline at end of file diff --git a/vendor/doctrine/orm/docs/bin/install-dependencies.sh b/vendor/doctrine/orm/docs/bin/install-dependencies.sh new file mode 100644 index 0000000000000000000000000000000000000000..86b3bdff7bfed89820dc0ecf4bcc024c9bcf0bab --- /dev/null +++ b/vendor/doctrine/orm/docs/bin/install-dependencies.sh @@ -0,0 +1,4 @@ +#!/bin/bash +sudo apt-get install python25 python25-dev texlive-full rubber +sudo easy_install pygments +sudo easy_install sphinx \ No newline at end of file diff --git a/vendor/doctrine/orm/docs/en/Makefile b/vendor/doctrine/orm/docs/en/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..a6f6fce6205626ed6bb54baab9ea620418ecf075 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/Makefile @@ -0,0 +1,89 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Doctrine2ORM.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Doctrine2ORM.qhc" + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ + "run these through (pdf)latex." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/vendor/doctrine/orm/docs/en/_exts/configurationblock.py b/vendor/doctrine/orm/docs/en/_exts/configurationblock.py new file mode 100644 index 0000000000000000000000000000000000000000..36ca61f5b15774b30e1905b8bd381b9dbffcb848 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/_exts/configurationblock.py @@ -0,0 +1,93 @@ +#Copyright (c) 2010 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. + +from docutils.parsers.rst import Directive, directives +from docutils import nodes +from string import upper + +class configurationblock(nodes.General, nodes.Element): + pass + +class ConfigurationBlock(Directive): + has_content = True + required_arguments = 0 + optional_arguments = 0 + final_argument_whitespace = True + option_spec = {} + formats = { + 'html': 'HTML', + 'xml': 'XML', + 'php': 'PHP', + 'yaml': 'YAML', + 'jinja': 'Twig', + 'html+jinja': 'Twig', + 'jinja+html': 'Twig', + 'php+html': 'PHP', + 'html+php': 'PHP', + 'ini': 'INI', + 'php-annotations': 'Annotations', + } + + def run(self): + env = self.state.document.settings.env + + node = nodes.Element() + node.document = self.state.document + self.state.nested_parse(self.content, self.content_offset, node) + + entries = [] + for i, child in enumerate(node): + if isinstance(child, nodes.literal_block): + # add a title (the language name) before each block + #targetid = "configuration-block-%d" % env.new_serialno('configuration-block') + #targetnode = nodes.target('', '', ids=[targetid]) + #targetnode.append(child) + + innernode = nodes.emphasis(self.formats[child['language']], self.formats[child['language']]) + + para = nodes.paragraph() + para += [innernode, child] + + entry = nodes.list_item('') + entry.append(para) + entries.append(entry) + + resultnode = configurationblock() + resultnode.append(nodes.bullet_list('', *entries)) + + return [resultnode] + +def visit_configurationblock_html(self, node): + self.body.append(self.starttag(node, 'div', CLASS='configuration-block')) + +def depart_configurationblock_html(self, node): + self.body.append('\n') + +def visit_configurationblock_latex(self, node): + pass + +def depart_configurationblock_latex(self, node): + pass + +def setup(app): + app.add_node(configurationblock, + html=(visit_configurationblock_html, depart_configurationblock_html), + latex=(visit_configurationblock_latex, depart_configurationblock_latex)) + app.add_directive('configuration-block', ConfigurationBlock) diff --git a/vendor/doctrine/orm/docs/en/changelog/migration_2_5.rst b/vendor/doctrine/orm/docs/en/changelog/migration_2_5.rst new file mode 100644 index 0000000000000000000000000000000000000000..43a40e62cf55008647d0d929526c69f42dc7defa --- /dev/null +++ b/vendor/doctrine/orm/docs/en/changelog/migration_2_5.rst @@ -0,0 +1,710 @@ +What is new in Doctrine ORM 2.5? +================================ + +This document describes changes between Doctrine ORM 2.4 and 2.5 (currently in +Beta). It contains a description of all the new features and sections +about behavioral changes and potential backwards compatibility breaks. +Please review this document carefully when updating to Doctrine 2.5. + +First note, that with the ORM 2.5 release we are dropping support +for PHP 5.3. We are enforcing this with Composer, servers without +at least PHP 5.4 will not allow installing Doctrine 2.5. + +New Features and Improvements +----------------------------- + +Events: PostLoad now triggered after associations are loaded +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Before Doctrine 2.5 if you had an entity with a ``@PostLoad`` event +defined then Doctrine would trigger listeners after the fields were +loaded, but before assocations are available. + +- `DDC-54 `_ +- `Commit `_ + +Events: Add API to programatically add event listeners to Entity +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When developing third party libraries or decoupled applications +it can be interesting to develop an entity listener without knowing +the entities that require this listener. + +You can now attach entity listeners to entities using the +``AttachEntityListenersListener`` class, which is listening to the +``loadMetadata`` event that is fired once for every entity during +metadata generation: + +.. code-block:: php + + addEntityListener( + 'MyProject\Entity\User', 'MyProject\Listener\TimestampableListener', + Events::prePersist, 'onPrePersist' + ); + + $evm->addEventListener(Events::loadClassMetadata, $listener); + + class TimestampableListener + { + public function onPrePersist($event) + { + $entity = $event->getEntity(); + $entity->setCreated(new \DateTime('now')); + } + } + +Embeddedable Objects +~~~~~~~~~~~~~~~~~~~~ + +Doctrine now supports creating multiple PHP objects from one database table +implementing a feature called "Embeddedable Objects". Next to an ``@Entity`` +class you can now define a class that is embeddable into a database table of an +entity using the ``@Embeddable`` annotation. Embeddable objects can never be +saved, updated or deleted on their own, only as part of an entity (called +"root-entity" or "aggregate"). Consequently embeddables don't have a primary +key, they are identified only by their values. + +Example of defining and using embeddables classes: + +.. code-block:: php + + `_. + +This feature was developed by external contributor `Johannes Schmitt +`_ + +- `DDC-93 `_ +- `Pull Request `_ + +Second-Level-Cache +~~~~~~~~~~~~~~~~~~ + +Since version 2.0 of Doctrine, fetching the same object twice by primary key +would result in just one query. This was achieved by the identity map pattern +(first-level-cache) that kept entities in memory. + +The newly introduced second-level-cache works a bit differently. Instead +of saving objects in memory, it saves them in a fast in-memory cache such +as Memcache, Redis, Riak or MongoDB. Additionally it allows saving the result +of more complex queries than by primary key. Summarized this feature works +like the existing Query result cache, but it is much more powerful. + +As an example lets cache an entity Country that is a relation to the User +entity. We always want to display the country, but avoid the additional +query to this table. + +.. code-block:: php + + setSecondLevelCacheEnabled(); + + $cacheConfig = $config->getSecondLevelCacheConfiguration(); + $regionConfig = $cacheConfig->getRegionsConfiguration(); + $regionConfig->setLifetime('country_region', 3600); + +Now Doctrine will first check for the data of any country in the cache +instead of the database. + +- `Documentation + `_ +- `Pull Request `_ + +Criteria API: Support for ManyToMany assocations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +We introduced support for querying collections using the `Criteria API +`_ +in 2.4. This only worked efficently for One-To-Many assocations, not for +Many-To-Many. With the start of 2.5 also Many-To-Many associations get queried +instead of loading them into memory. + +Criteria API: Add new contains() expression +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It is now possible to use the Criteria API to check for string contains needle +using ``contains()``. This translates to using a ``column LIKE '%needle%'`` SQL +condition. + +.. code-block:: php + + where(Criteria::expr()->contains('name', 'Benjamin')); + + $users = $repository->matching($criteria); + +Criteria API: Support for EXTRA_LAZY +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A collection that is marked as ``fetch="EXTRA_LAZY"`` will now return another +lazy collection when using ``Collection::matching($criteria)``: + +.. code-block:: php + + where(Criteria->expr()->eq("published", 1)); + + $publishedComments = $post->getComments()->matching($criteria); + + echo count($publishedComments); + +The lazy criteria currently supports the ``count()`` and ``contains()`` +functionality lazily. All other operations of the ``Collection`` interface +trigger a full load of the collection. + +This feature was contributed by `Michaël Gallego `_. + +- `Pull Request #1 `_ +- `Pull Request #2 `_ + +Mapping: Allow configuring Index flags +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It is now possible to control the index flags in the DBAL +schema abstraction from the ORM using metadata. This was possible +only with a schema event listener before. + +.. code-block:: php + + `_. + +- `Pull Request `_ + +SQLFilter API: Check if a parameter is set +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can now check in your SQLFilter if a parameter was set. This allows +to more easily control which features of a filter to enable or disable. + +Extending on the locale example of the documentation: + +.. code-block:: php + + reflClass->implementsInterface('LocaleAware')) { + return ""; + } + + if (!$this->hasParameter('locale')) { + return ""; + } + + return $targetTableAlias.'.locale = ' . $this->getParameter('locale'); + } + } + +This feature was contributed by `Miroslav Demovic `_ + +- `Pull Request `_ + + +EXTRA_LAZY Improvements +~~~~~~~~~~~~~~~~~~~~~~~ + +1. Efficient query when using EXTRA_LAZY and containsKey + + When calling ``Collection::containsKey($key)`` on one-to-many and many-to-many + collections using ``indexBy`` and ``EXTRA_LAZY`` a query is now executed to check + for the existance for the item. Prevoiusly this operation was performed in memory + by loading all entities of the collection. + + .. code-block:: php + + getGroups()->containsKey($groupId)) { + echo "User is in group $groupId\n"; + } + + This feature was contributed by `Asmir Mustafic `_ + + - `Pull Request `_ + +2. Add EXTRA_LAZY Support for get() for owning and inverse many-to-many + + This was contributed by `Sander Marechal `_. + +Improve efficiency of One-To-Many EAGER +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When marking a one-to-many association with ``fetch="EAGER"`` it will now +execute one query less than before and work correctly in combination with +``indexBy``. + +Better support for EntityManagerInterface +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Many of the locations where previously only the ``Doctrine\ORM\EntityManager`` +was allowed are now changed to accept the ``EntityManagerInterface`` that was +introduced in 2.4. This allows you to more easily use the decorator pattern +to extend the EntityManager if you need. It's still not replaced everywhere, +so you still have to be careful. + +DQL Improvements +~~~~~~~~~~~~~~~~ + +1. It is now possible to add functions to the ``ORDER BY`` clause in DQL statements: + +.. code-block:: php + + createQuery($dql); + $query->setParameter('groups', array(1, 2, 3)); + + $users = $query->getResult(); + +6. Expressions inside ``COUNT()`` now allowed + +.. code-block:: php + + `_ to pass a callback instead that resolves +the function: + +.. code-block:: php + + addCustomNumericFunction( + 'IS_PUBLISHED', function($funcName) use ($currentSiteId) { + return new IsPublishedFunction($currentSiteId); + } + ); + +Query API: WHERE IN Query using a Collection as parameter +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When performing a ``WHERE IN`` query for a collection of entities you can +now pass the array collection of entities as a parameter value to the query +object: + +.. code-block:: php + + getChildren(); + + $queryBuilder + ->select('p') + ->from('Product', 'p') + ->where('p.category IN (:categories)') + ->setParameter('categories', $categories) + ; + +This feature was contributed by `Michael Perrin +`_. + +- `Pull Request `_ +- `DDC-2319 `_ + +Query API: Add suport for default Query Hints +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To configure multiple different features such as custom AST Walker, fetch modes, +locking and other features affecting DQL generation we have had a feature +called "query hints" since version 2.0. + +It is now possible to add query hints that are always enabled for every Query: + +.. code-block:: php + + setDefaultQueryHints( + 'doctrine.customOutputWalker' => 'MyProject\CustomOutputWalker' + ); + +This feature was contributed by `Artur Eshenbrener +`_. + +- `Pull Request `_ + +ResultSetMappingBuilder: Add support for Single-Table Inheritance +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Before 2.5 the ResultSetMappingBuilder did not work with entities +that are using Single-Table-Inheritance. This restriction was lifted +by adding the missing support. + +YAML Mapping: Many-To-Many doesnt require join column definition +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In Annotations and XML it was not necessary using conventions for naming +the many-to-many join column names, in YAML it was not possible however. + +A many-to-many definition in YAML is now possible using this minimal +definition: + +.. code-block:: yaml + + manyToMany: + groups: + targetEntity: Group + joinTable: + name: users_groups + +Schema Validator Command: Allow to skip sub-checks +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Schema Validator command executes two independent checks +for validity of the mappings and if the schema is synchronized +correctly. It is now possible to skip any of the two steps +when executing the command: + +:: + + $ php vendor/bin/doctrine orm:validate-schema --skip-mapping + $ php vendor/bin/doctrine orm:validate-schema --skip-sync + +This allows you to write more specialized continuous integration and automation +checks. When no changes are found the command returns the exit code 0 +and 1, 2 or 3 when failing because of mapping, sync or both. + +EntityGenerator Command: Avoid backups +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When calling the EntityGenerator for an existing entity, Doctrine would +create a backup file every time to avoid loosing changes to the code. +You can now skip generating the backup file by passing the ``--no-backup`` +flag: + +:: + + $ php vendor/bin/doctrine orm:generate-entities src/ --no-backup + +Support for Objects as Identifiers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It is now possible to use Objects as identifiers for Entities +as long as they implement the magic method ``__toString()``. + +.. code-block:: php + + value = $value; + } + + public function __toString() + { + return (string)$this->value; + } + } + + class User + { + /** @Id @Column(type="userid") */ + private $id; + + public function __construct(UserId $id) + { + $this->id = $id; + } + } + + class UserIdType extends \Doctrine\DBAL\Types\Type + { + // ... + } + + Doctrine\DBAL\Types\Type::addType('userid', 'MyProject\UserIdType'); + +Behavioral Changes (BC Breaks) +------------------------------ + +NamingStrategy interface changed +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``Doctrine\ORM\Mapping\NamingStrategyInterface`` changed slightly +to pass the Class Name of the entity into the join column name generation: + +:: + + - function joinColumnName($propertyName); + + function joinColumnName($propertyName, $className = null); + +It also received a new method for supporting embeddables: + +:: + + public function embeddedFieldToColumnName($propertyName, $embeddedColumnName); + +Minor BC BREAK: EntityManagerInterface instead of EntityManager in type-hints +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +As of 2.5, classes requiring the ``EntityManager`` in any method signature will now require +an ``EntityManagerInterface`` instead. +If you are extending any of the following classes, then you need to check following +signatures: + +- ``Doctrine\ORM\Tools\DebugUnitOfWorkListener#dumpIdentityMap(EntityManagerInterface $em)`` +- ``Doctrine\ORM\Mapping\ClassMetadataFactory#setEntityManager(EntityManagerInterface $em)`` + +Minor BC BREAK: Custom Hydrators API change +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +As of 2.5, ``AbstractHydrator`` does not enforce the usage of cache as part of +API, and now provides you a clean API for column information through the method +``hydrateColumnInfo($column)``. +Cache variable being passed around by reference is no longer needed since +Hydrators are per query instantiated since Doctrine 2.4. + +- `DDC-3060 `_ + +Minor BC BREAK: All non-transient classes in an inheritance must be part of the inheritance map +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +As of 2.5, classes, if you define an inheritance map for an inheritance tree, you are required +to map all non-transient classes in that inheritance, including the root of the inheritance. + +So far, the root of the inheritance was allowed to be skipped in the inheritance map: this is +not possible anymore, and if you don't plan to persist instances of that class, then you should +either: + +- make that class as ``abstract`` +- add that class to your inheritance map + +If you fail to do so, then a ``Doctrine\ORM\Mapping\MappingException`` will be thrown. + + +- `DDC-3300 `_ +- `DDC-3503 `_ + +Minor BC BREAK: Entity based EntityManager#clear() calls follow cascade detach +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Whenever ``EntityManager#clear()`` method gets called with a given entity class +name, until 2.4, it was only detaching the specific requested entity. +As of 2.5, ``EntityManager`` will follow configured cascades, providing a better +memory management since associations will be garbage collected, optimizing +resources consumption on long running jobs. + +Updates on entities scheduled for deletion are no longer processed +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In Doctrine 2.4, if you modified properties of an entity scheduled for deletion, UnitOfWork would +produce an ``UPDATE`` statement to be executed right before the ``DELETE`` statement. The entity in question +was therefore present in ``UnitOfWork#entityUpdates``, which means that ``preUpdate`` and ``postUpdate`` +listeners were (quite pointlessly) called. In ``preFlush`` listeners, it used to be possible to undo +the scheduled deletion for updated entities (by calling ``persist()`` if the entity was found in both +``entityUpdates`` and ``entityDeletions``). This does not work any longer, because the entire changeset +calculation logic is optimized away. + +Minor BC BREAK: Default lock mode changed from LockMode::NONE to null in method signatures +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A misconception concerning default lock mode values in method signatures lead to unexpected behaviour +in SQL statements on SQL Server. With a default lock mode of ``LockMode::NONE`` throughout the +method signatures in ORM, the table lock hint ``WITH (NOLOCK)`` was appended to all locking related +queries by default. This could result in unpredictable results because an explicit ``WITH (NOLOCK)`` +table hint tells SQL Server to run a specific query in transaction isolation level READ UNCOMMITTED +instead of the default READ COMMITTED transaction isolation level. +Therefore there now is a distinction between ``LockMode::NONE`` and ``null`` to be able to tell +Doctrine whether to add table lock hints to queries by intention or not. To achieve this, the following +method signatures have been changed to declare ``$lockMode = null`` instead of ``$lockMode = LockMode::NONE``: + +- ``Doctrine\ORM\Cache\Persister\AbstractEntityPersister#getSelectSQL()`` +- ``Doctrine\ORM\Cache\Persister\AbstractEntityPersister#load()`` +- ``Doctrine\ORM\Cache\Persister\AbstractEntityPersister#refresh()`` +- ``Doctrine\ORM\Decorator\EntityManagerDecorator#find()`` +- ``Doctrine\ORM\EntityManager#find()`` +- ``Doctrine\ORM\EntityRepository#find()`` +- ``Doctrine\ORM\Persisters\BasicEntityPersister#getSelectSQL()`` +- ``Doctrine\ORM\Persisters\BasicEntityPersister#load()`` +- ``Doctrine\ORM\Persisters\BasicEntityPersister#refresh()`` +- ``Doctrine\ORM\Persisters\EntityPersister#getSelectSQL()`` +- ``Doctrine\ORM\Persisters\EntityPersister#load()`` +- ``Doctrine\ORM\Persisters\EntityPersister#refresh()`` +- ``Doctrine\ORM\Persisters\JoinedSubclassPersister#getSelectSQL()`` + +You should update signatures for these methods if you have subclassed one of the above classes. +Please also check the calling code of these methods in your application and update if necessary. + +.. note:: + + This in fact is really a minor BC BREAK and should not have any affect on database vendors + other than SQL Server because it is the only one that supports and therefore cares about + ``LockMode::NONE``. It's really just a FIX for SQL Server environments using ORM. + +Minor BC BREAK: __clone method not called anymore when entities are instantiated via metadata API +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +As of PHP 5.6, instantiation of new entities is deferred to the +`doctrine/instantiator `_ library, which will avoid calling ``__clone`` +or any public API on instantiated objects. + +BC BREAK: DefaultRepositoryFactory is now final +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Please implement the ``Doctrine\ORM\Repository\RepositoryFactory`` interface instead of extending +the ``Doctrine\ORM\Repository\DefaultRepositoryFactory``. + +BC BREAK: New object expression DQL queries now respects user provided aliasing and not return consumed fields +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When executing DQL queries with new object expressions, instead of returning +DTOs numerically indexes, it will now respect user provided aliases. Consider +the following query: + +:: + + SELECT new UserDTO(u.id,u.name) as user,new AddressDTO(a.street,a.postalCode) as address, a.id as addressId + FROM User u INNER JOIN u.addresses a WITH a.isPrimary = true + +Previously, your result would be similar to this: + +:: + + array( + 0=>array( + 0=>{UserDTO object}, + 1=>{AddressDTO object}, + 2=>{u.id scalar}, + 3=>{u.name scalar}, + 4=>{a.street scalar}, + 5=>{a.postalCode scalar}, + 'addressId'=>{a.id scalar}, + ), + ... + ) + +From now on, the resultset will look like this: + +:: + + array( + 0=>array( + 'user'=>{UserDTO object}, + 'address'=>{AddressDTO object}, + 'addressId'=>{a.id scalar} + ), + ... + ) diff --git a/vendor/doctrine/orm/docs/en/conf.py b/vendor/doctrine/orm/docs/en/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..5155ac9a6e7d52616845fb909e52e7173bd426f2 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/conf.py @@ -0,0 +1,201 @@ +# -*- coding: utf-8 -*- +# +# Doctrine 2 ORM documentation build configuration file, created by +# sphinx-quickstart on Fri Dec 3 18:10:24 2010. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.append(os.path.abspath('_exts')) + +# -- General configuration ----------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['configurationblock'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'Doctrine 2 ORM' +copyright = u'2010-12, Doctrine Project Team' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '2' +# The full version, including alpha/beta/rc tags. +release = '2' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +language = 'en' + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of documents that shouldn't be included in the build. +#unused_docs = [] + +# List of directories, relative to source directory, that shouldn't be searched +# for source files. +exclude_trees = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +show_authors = True + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +html_theme = 'doctrine' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +html_theme_path = ['_theme'] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_use_modindex = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = '' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'Doctrine2ORMdoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +# The paper size ('letter' or 'a4'). +#latex_paper_size = 'letter' + +# The font size ('10pt', '11pt' or '12pt'). +#latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'Doctrine2ORM.tex', u'Doctrine 2 ORM Documentation', + u'Doctrine Project Team', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# Additional stuff for the LaTeX preamble. +#latex_preamble = '' + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_use_modindex = True + +primary_domain = "dcorm" + +def linkcode_resolve(domain, info): + if domain == 'dcorm': + return 'http://' + return None diff --git a/vendor/doctrine/orm/docs/en/cookbook/advanced-field-value-conversion-using-custom-mapping-types.rst b/vendor/doctrine/orm/docs/en/cookbook/advanced-field-value-conversion-using-custom-mapping-types.rst new file mode 100644 index 0000000000000000000000000000000000000000..5bbd2a3b11fd8bb0d5976f780278852c40672555 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/advanced-field-value-conversion-using-custom-mapping-types.rst @@ -0,0 +1,256 @@ +Advanced field value conversion using custom mapping types +========================================================== + +.. sectionauthor:: Jan Sorgalla + +When creating entities, you sometimes have the need to transform field values +before they are saved to the database. In Doctrine you can use Custom Mapping +Types to solve this (see: :ref:`reference-basic-mapping-custom-mapping-types`). + +There are several ways to achieve this: converting the value inside the Type +class, converting the value on the database-level or a combination of both. + +This article describes the third way by implementing the MySQL specific column +type `Point `_. + +The ``Point`` type is part of the `Spatial extension `_ +of MySQL and enables you to store a single location in a coordinate space by +using x and y coordinates. You can use the Point type to store a +longitude/latitude pair to represent a geographic location. + +The entity +---------- + +We create a simple entity with a field ``$point`` which holds a value object +``Point`` representing the latitude and longitude of the position. + +The entity class: + +.. code-block:: php + + point = $point; + } + + /** + * @return \Geo\ValueObject\Point + */ + public function getPoint() + { + return $this->point; + } + + /** + * @param string $address + */ + public function setAddress($address) + { + $this->address = $address; + } + + /** + * @return string + */ + public function getAddress() + { + return $this->address; + } + } + +We use the custom type ``point`` in the ``@Column`` docblock annotation of the +``$point`` field. We will create this custom mapping type in the next chapter. + +The point class: + +.. code-block:: php + + latitude = $latitude; + $this->longitude = $longitude; + } + + /** + * @return float + */ + public function getLatitude() + { + return $this->latitude; + } + + /** + * @return float + */ + public function getLongitude() + { + return $this->longitude; + } + } + +The mapping type +---------------- + +Now we're going to create the ``point`` type and implement all required methods. + +.. code-block:: php + + getLongitude(), $value->getLatitude()); + } + + return $value; + } + + public function canRequireSQLConversion() + { + return true; + } + + public function convertToPHPValueSQL($sqlExpr, AbstractPlatform $platform) + { + return sprintf('AsText(%s)', $sqlExpr); + } + + public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) + { + return sprintf('PointFromText(%s)', $sqlExpr); + } + } + +We do a 2-step conversion here. In the first step, we convert the ``Point`` +object into a string representation before saving to the database (in the +``convertToDatabaseValue`` method) and back into an object after fetching the +value from the database (in the ``convertToPHPValue`` method). + +The format of the string representation format is called `Well-known text (WKT) +`_. The advantage of this format +is, that it is both human readable and parsable by MySQL. + +Internally, MySQL stores geometry values in a binary format that is not +identical to the WKT format. So, we need to let MySQL transform the WKT +representation into its internal format. + +This is where the ``convertToPHPValueSQL`` and ``convertToDatabaseValueSQL`` +methods come into play. + +This methods wrap a sql expression (the WKT representation of the Point) into +MySQL functions `PointFromText `_ +and `AsText `_ +which convert WKT strings to and from the internal format of MySQL. + +.. note:: + + When using DQL queries, the ``convertToPHPValueSQL`` and + ``convertToDatabaseValueSQL`` methods only apply to identification variables + and path expressions in SELECT clauses. Expressions in WHERE clauses are + **not** wrapped! + + If you want to use Point values in WHERE clauses, you have to implement a + :doc:`user defined function ` for + ``PointFromText``. + +Example usage +------------- + +.. code-block:: php + + getConnection()->getDatabasePlatform()->registerDoctrineTypeMapping('point', 'point'); + + // Store a Location object + use Geo\Entity\Location; + use Geo\ValueObject\Point; + + $location = new Location(); + + $location->setAddress('1600 Amphitheatre Parkway, Mountain View, CA'); + $location->setPoint(new Point(37.4220761, -122.0845187)); + + $em->persist($location); + $em->flush(); + $em->clear(); + + // Fetch the Location object + $query = $em->createQuery("SELECT l FROM Geo\Entity\Location WHERE l.address = '1600 Amphitheatre Parkway, Mountain View, CA'"); + $location = $query->getSingleResult(); + + /* @var Geo\ValueObject\Point */ + $point = $location->getPoint(); diff --git a/vendor/doctrine/orm/docs/en/cookbook/aggregate-fields.rst b/vendor/doctrine/orm/docs/en/cookbook/aggregate-fields.rst new file mode 100644 index 0000000000000000000000000000000000000000..fdf830323e100d3d93029651e15d6a745728d2d1 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/aggregate-fields.rst @@ -0,0 +1,376 @@ +Aggregate Fields +================ + +.. sectionauthor:: Benjamin Eberlei + +You will often come across the requirement to display aggregate +values of data that can be computed by using the MIN, MAX, COUNT or +SUM SQL functions. For any ORM this is a tricky issue +traditionally. Doctrine 2 offers several ways to get access to +these values and this article will describe all of them from +different perspectives. + +You will see that aggregate fields can become very explicit +features in your domain model and how this potentially complex +business rules can be easily tested. + +An example model +---------------- + +Say you want to model a bank account and all their entries. Entries +into the account can either be of positive or negative money +values. Each account has a credit limit and the account is never +allowed to have a balance below that value. + +For simplicity we live in a world were money is composed of +integers only. Also we omit the receiver/sender name, stated reason +for transfer and the execution date. These all would have to be +added on the ``Entry`` object. + +Our entities look like: + +.. code-block:: php + + no = $no; + $this->maxCredit = $maxCredit; + $this->entries = new \Doctrine\Common\Collections\ArrayCollection(); + } + } + + /** + * @Entity + */ + class Entry + { + /** @Id @GeneratedValue @Column(type="integer") */ + private $id; + + /** + * @ManyToOne(targetEntity="Account", inversedBy="entries") + */ + private $account; + + /** + * @Column(type="integer") + */ + private $amount; + + public function __construct($account, $amount) + { + $this->account = $account; + $this->amount = $amount; + // more stuff here, from/to whom, stated reason, execution date and such + } + + public function getAmount() + { + return $this->amount; + } + } + +Using DQL +--------- + +The Doctrine Query Language allows you to select for aggregate +values computed from fields of your Domain Model. You can select +the current balance of your account by calling: + +.. code-block:: php + + createQuery($dql) + ->setParameter(1, $myAccountId) + ->getSingleScalarResult(); + +The ``$em`` variable in this (and forthcoming) example holds the +Doctrine ``EntityManager``. We create a query for the SUM of all +amounts (negative amounts are withdraws) and retrieve them as a +single scalar result, essentially return only the first column of +the first row. + +This approach is simple and powerful, however it has a serious +drawback. We have to execute a specific query for the balance +whenever we need it. + +To implement a powerful domain model we would rather have access to +the balance from our ``Account`` entity during all times (even if +the Account was not persisted in the database before!). + +Also an additional requirement is the max credit per ``Account`` +rule. + +We cannot reliably enforce this rule in our ``Account`` entity with +the DQL retrieval of the balance. There are many different ways to +retrieve accounts. We cannot guarantee that we can execute the +aggregation query for all these use-cases, let alone that a +userland programmer checks this balance against newly added +entries. + +Using your Domain Model +----------------------- + +``Account`` and all the ``Entry`` instances are connected through a +collection, which means we can compute this value at runtime: + +.. code-block:: php + + entries as $entry) { + $balance += $entry->getAmount(); + } + return $balance; + } + } + +Now we can always call ``Account::getBalance()`` to access the +current account balance. + +To enforce the max credit rule we have to implement the "Aggregate +Root" pattern as described in Eric Evans book on Domain Driven +Design. Described with one sentence, an aggregate root controls the +instance creation, access and manipulation of its children. + +In our case we want to enforce that new entries can only added to +the ``Account`` by using a designated method. The ``Account`` is +the aggregate root of this relation. We can also enforce the +correctness of the bi-directional ``Account`` <-> ``Entry`` +relation with this method: + +.. code-block:: php + + assertAcceptEntryAllowed($amount); + + $e = new Entry($this, $amount); + $this->entries[] = $e; + return $e; + } + } + +Now look at the following test-code for our entities: + +.. code-block:: php + + assertEquals(0, $account->getBalance()); + + $account->addEntry(500); + $this->assertEquals(500, $account->getBalance()); + + $account->addEntry(-700); + $this->assertEquals(-200, $account->getBalance()); + } + + public function testExceedMaxLimit() + { + $account = new Account("123456", $maxCredit = 200); + + $this->setExpectedException("Exception"); + $account->addEntry(-1000); + } + } + +To enforce our rule we can now implement the assertion in +``Account::addEntry``: + +.. code-block:: php + + getBalance() + $amount; + $allowedMinimalBalance = ($this->maxCredit * -1); + if ($futureBalance < $allowedMinimalBalance) { + throw new Exception("Credit Limit exceeded, entry is not allowed!"); + } + } + } + +We haven't talked to the entity manager for persistence of our +account example before. You can call +``EntityManager::persist($account)`` and then +``EntityManager::flush()`` at any point to save the account to the +database. All the nested ``Entry`` objects are automatically +flushed to the database also. + +.. code-block:: php + + addEntry(500); + $account->addEntry(-200); + $em->persist($account); + $em->flush(); + +The current implementation has a considerable drawback. To get the +balance, we have to initialize the complete ``Account::$entries`` +collection, possibly a very large one. This can considerably hurt +the performance of your application. + +Using an Aggregate Field +------------------------ + +To overcome the previously mentioned issue (initializing the whole +entries collection) we want to add an aggregate field called +"balance" on the Account and adjust the code in +``Account::getBalance()`` and ``Account:addEntry()``: + +.. code-block:: php + + balance; + } + + public function addEntry($amount) + { + $this->assertAcceptEntryAllowed($amount); + + $e = new Entry($this, $amount); + $this->entries[] = $e; + $this->balance += $amount; + return $e; + } + } + +This is a very simple change, but all the tests still pass. Our +account entities return the correct balance. Now calling the +``Account::getBalance()`` method will not occur the overhead of +loading all entries anymore. Adding a new Entry to the +``Account::$entities`` will also not initialize the collection +internally. + +Adding a new entry is therefore very performant and explicitly +hooked into the domain model. It will only update the account with +the current balance and insert the new entry into the database. + +Tackling Race Conditions with Aggregate Fields +---------------------------------------------- + +Whenever you denormalize your database schema race-conditions can +potentially lead to inconsistent state. See this example: + +.. code-block:: php + + find('Bank\Entities\Account', $accId); + + // request 2 account + $account2 = $em->find('Bank\Entities\Account', $accId); + + $account1->addEntry(-200); + $account2->addEntry(-200); + + // now request 1 and 2 both flush the changes. + +The aggregate field ``Account::$balance`` is now -200, however the +SUM over all entries amounts yields -400. A violation of our max +credit rule. + +You can use both optimistic or pessimistic locking to save-guard +your aggregate fields against this kind of race-conditions. Reading +Eric Evans DDD carefully he mentions that the "Aggregate Root" +(Account in our example) needs a locking mechanism. + +Optimistic locking is as easy as adding a version column: + +.. code-block:: php + + find('Bank\Entities\Account', $accId, LockMode::PESSIMISTIC_READ); + +Keeping Updates and Deletes in Sync +----------------------------------- + +The example shown in this article does not allow changes to the +value in ``Entry``, which considerably simplifies the effort to +keep ``Account::$balance`` in sync. If your use-case allows fields +to be updated or related entities to be removed you have to +encapsulate this logic in your "Aggregate Root" entity and adjust +the aggregate field accordingly. + +Conclusion +---------- + +This article described how to obtain aggregate values using DQL or +your domain model. It showed how you can easily add an aggregate +field that offers serious performance benefits over iterating all +the related objects that make up an aggregate value. Finally I +showed how you can ensure that your aggregate fields do not get out +of sync due to race-conditions and concurrent access. + + diff --git a/vendor/doctrine/orm/docs/en/cookbook/custom-mapping-types.rst b/vendor/doctrine/orm/docs/en/cookbook/custom-mapping-types.rst new file mode 100644 index 0000000000000000000000000000000000000000..1bd4f12421556fb372d5004e763db735155bfd77 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/custom-mapping-types.rst @@ -0,0 +1,103 @@ +Custom Mapping Types +==================== + +Doctrine allows you to create new mapping types. This can come in +handy when you're missing a specific mapping type or when you want +to replace the existing implementation of a mapping type. + +In order to create a new mapping type you need to subclass +``Doctrine\DBAL\Types\Type`` and implement/override the methods as +you wish. Here is an example skeleton of such a custom type class: + +.. code-block:: php + + getConnection(); + $conn->getDatabasePlatform()->registerDoctrineTypeMapping('db_mytype', 'mytype'); + +When registering the custom types in the configuration you specify a unique +name for the mapping type and map that to the corresponding fully qualified +class name. Now the new type can be used when mapping columns: + +.. code-block:: php + + + +This recipe will show you a simple example of how you can use +Doctrine 2 to persist an implementation of the +`Decorator Pattern `_ + +Component +--------- + +The ``Component`` class needs to be persisted, so it's going to +be an ``Entity``. As the top of the inheritance hierarchy, it's going +to have to define the persistent inheritance. For this example, we +will use Single Table Inheritance, but Class Table Inheritance +would work as well. In the discriminator map, we will define two +concrete subclasses, ``ConcreteComponent`` and ``ConcreteDecorator``. + +.. code-block:: php + + id; + } + + /** + * Set name + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * Get name + * @return string $name + */ + public function getName() + { + return $this->name; + } + + } + +ConcreteComponent +----------------- + +The ``ConcreteComponent`` class is pretty simple and doesn't do much +more than extend the abstract ``Component`` class (only for the +purpose of keeping this example simple). + +.. code-block:: php + + setDecorates($c); + } + + /** + * (non-PHPdoc) + * @see Test.Component::getName() + */ + public function getName() + { + return 'Decorated ' . $this->getDecorates()->getName(); + } + + /** + * the component being decorated + * @return Component + */ + protected function getDecorates() + { + return $this->decorates; + } + + /** + * sets the component being decorated + * @param Component $c + */ + protected function setDecorates(Component $c) + { + $this->decorates = $c; + } + + } + +All operations on the ``Decorator`` (i.e. persist, remove, etc) will +cascade from the ``Decorator`` to the ``Component``. This means that +when we persist a ``Decorator``, Doctrine will take care of +persisting the chain of decorated objects for us. A ``Decorator`` can +be treated exactly as a ``Component`` when it comes time to +persisting it. + +The ``Decorator's`` constructor accepts an instance of a +``Component``, as defined by the ``Decorator`` pattern. The +setDecorates/getDecorates methods have been defined as protected to +hide the fact that a ``Decorator`` is decorating a ``Component`` and +keeps the ``Component`` interface and the ``Decorator`` interface +identical. + +To illustrate the intended result of the ``Decorator`` pattern, the +getName() method has been overridden to append a string to the +``Component's`` getName() method. + +ConcreteDecorator +----------------- + +The final class required to complete a simple implementation of the +Decorator pattern is the ``ConcreteDecorator``. In order to further +illustrate how the ``Decorator`` can alter data as it moves through +the chain of decoration, a new field, "special", has been added to +this class. The getName() has been overridden and appends the value +of the getSpecial() method to its return value. + +.. code-block:: php + + special = $special; + } + + /** + * Get special + * @return string $special + */ + public function getSpecial() + { + return $this->special; + } + + /** + * (non-PHPdoc) + * @see Test.Component::getName() + */ + public function getName() + { + return '[' . $this->getSpecial() + . '] ' . parent::getName(); + } + + } + +Examples +-------- + +Here is an example of how to persist and retrieve your decorated +objects + +.. code-block:: php + + setName('Test Component 1'); + $em->persist($c); // assigned unique ID = 1 + + // create a new concrete decorator + $c = new ConcreteComponent(); + $c->setName('Test Component 2'); + + $d = new ConcreteDecorator($c); + $d->setSpecial('Really'); + $em->persist($d); + // assigns c as unique ID = 2, and d as unique ID = 3 + + $em->flush(); + + $c = $em->find('Test\Component', 1); + $d = $em->find('Test\Component', 3); + + echo get_class($c); + // prints: Test\Component\ConcreteComponent + + echo $c->getName(); + // prints: Test Component 1 + + echo get_class($d) + // prints: Test\Component\ConcreteDecorator + + echo $d->getName(); + // prints: [Really] Decorated Test Component 2 + diff --git a/vendor/doctrine/orm/docs/en/cookbook/dql-custom-walkers.rst b/vendor/doctrine/orm/docs/en/cookbook/dql-custom-walkers.rst new file mode 100644 index 0000000000000000000000000000000000000000..e840126db3805b9e96f0fbf9f4222512b9f31c83 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/dql-custom-walkers.rst @@ -0,0 +1,217 @@ +Extending DQL in Doctrine 2: Custom AST Walkers +=============================================== + +.. sectionauthor:: Benjamin Eberlei + +The Doctrine Query Language (DQL) is a proprietary sql-dialect that +substitutes tables and columns for Entity names and their fields. +Using DQL you write a query against the database using your +entities. With the help of the metadata you can write very concise, +compact and powerful queries that are then translated into SQL by +the Doctrine ORM. + +In Doctrine 1 the DQL language was not implemented using a real +parser. This made modifications of the DQL by the user impossible. +Doctrine 2 in contrast has a real parser for the DQL language, +which transforms the DQL statement into an +`Abstract Syntax Tree `_ +and generates the appropriate SQL statement for it. Since this +process is deterministic Doctrine heavily caches the SQL that is +generated from any given DQL query, which reduces the performance +overhead of the parsing process to zero. + +You can modify the Abstract syntax tree by hooking into DQL parsing +process by adding a Custom Tree Walker. A walker is an interface +that walks each node of the Abstract syntax tree, thereby +generating the SQL statement. + +There are two types of custom tree walkers that you can hook into +the DQL parser: + + +- An output walker. This one actually generates the SQL, and there + is only ever one of them. We implemented the default SqlWalker + implementation for it. +- A tree walker. There can be many tree walkers, they cannot + generate the sql, however they can modify the AST before its + rendered to sql. + +Now this is all awfully technical, so let me come to some use-cases +fast to keep you motivated. Using walker implementation you can for +example: + + +- Modify the AST to generate a Count Query to be used with a + paginator for any given DQL query. +- Modify the Output Walker to generate vendor-specific SQL + (instead of ANSI). +- Modify the AST to add additional where clauses for specific + entities (example ACL, country-specific content...) +- Modify the Output walker to pretty print the SQL for debugging + purposes. + +In this cookbook-entry I will show examples on the first two +points. There are probably much more use-cases. + +Generic count query for pagination +---------------------------------- + +Say you have a blog and posts all with one category and one author. +A query for the front-page or any archive page might look something +like: + +.. code-block:: sql + + SELECT p, c, a FROM BlogPost p JOIN p.category c JOIN p.author a WHERE ... + +Now in this query the blog post is the root entity, meaning its the +one that is hydrated directly from the query and returned as an +array of blog posts. In contrast the comment and author are loaded +for deeper use in the object tree. + +A pagination for this query would want to approximate the number of +posts that match the WHERE clause of this query to be able to +predict the number of pages to show to the user. A draft of the DQL +query for pagination would look like: + +.. code-block:: sql + + SELECT count(DISTINCT p.id) FROM BlogPost p JOIN p.category c JOIN p.author a WHERE ... + +Now you could go and write each of these queries by hand, or you +can use a tree walker to modify the AST for you. Lets see how the +API would look for this use-case: + +.. code-block:: php + + createQuery($dql); + $query->setFirstResult( ($pageNum-1) * 20)->setMaxResults(20); + + $totalResults = Paginate::count($query); + $results = $query->getResult(); + +The ``Paginate::count(Query $query)`` looks like: + +.. code-block:: php + + setHint(Query::HINT_CUSTOM_TREE_WALKERS, array('DoctrineExtensions\Paginate\CountSqlWalker')); + $countQuery->setFirstResult(null)->setMaxResults(null); + + return $countQuery->getSingleScalarResult(); + } + } + +It clones the query, resets the limit clause first and max results +and registers the ``CountSqlWalker`` custom tree walker which +will modify the AST to execute a count query. The walkers +implementation is: + +.. code-block:: php + + _getQueryComponents() as $dqlAlias => $qComp) { + if ($qComp['parent'] === null && $qComp['nestingLevel'] == 0) { + $parent = $qComp; + $parentName = $dqlAlias; + break; + } + } + + $pathExpression = new PathExpression( + PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $parentName, + $parent['metadata']->getSingleIdentifierFieldName() + ); + $pathExpression->type = PathExpression::TYPE_STATE_FIELD; + + $AST->selectClause->selectExpressions = array( + new SelectExpression( + new AggregateExpression('count', $pathExpression, true), null + ) + ); + } + } + +This will delete any given select expressions and replace them with +a distinct count query for the root entities primary key. This will +only work if your entity has only one identifier field (composite +keys won't work). + +Modify the Output Walker to generate Vendor specific SQL +-------------------------------------------------------- + +Most RMDBS have vendor-specific features for optimizing select +query execution plans. You can write your own output walker to +introduce certain keywords using the Query Hint API. A query hint +can be set via ``Query::setHint($name, $value)`` as shown in the +previous example with the ``HINT_CUSTOM_TREE_WALKERS`` query hint. + +We will implement a custom Output Walker that allows to specify the +SQL\_NO\_CACHE query hint. + +.. code-block:: php + + createQuery($dql); + $query->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, 'DoctrineExtensions\Query\MysqlWalker'); + $query->setHint("mysqlWalker.sqlNoCache", true); + $results = $query->getResult(); + +Our ``MysqlWalker`` will extend the default ``SqlWalker``. We will +modify the generation of the SELECT clause, adding the +SQL\_NO\_CACHE on those queries that need it: + +.. code-block:: php + + getQuery()->getHint('mysqlWalker.sqlNoCache') === true) { + if ($selectClause->isDistinct) { + $sql = str_replace('SELECT DISTINCT', 'SELECT DISTINCT SQL_NO_CACHE', $sql); + } else { + $sql = str_replace('SELECT', 'SELECT SQL_NO_CACHE', $sql); + } + } + + return $sql; + } + } + +Writing extensions to the Output Walker requires a very deep +understanding of the DQL Parser and Walkers, but may offer your +huge benefits with using vendor specific features. This would still +allow you write DQL queries instead of NativeQueries to make use of +vendor specific features. + diff --git a/vendor/doctrine/orm/docs/en/cookbook/dql-user-defined-functions.rst b/vendor/doctrine/orm/docs/en/cookbook/dql-user-defined-functions.rst new file mode 100644 index 0000000000000000000000000000000000000000..a3a7606ad809089f270738dfa88efd74392b49b8 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/dql-user-defined-functions.rst @@ -0,0 +1,251 @@ +DQL User Defined Functions +========================== + +.. sectionauthor:: Benjamin Eberlei + +By default DQL supports a limited subset of all the vendor-specific +SQL functions common between all the vendors. However in many cases +once you have decided on a specific database vendor, you will never +change it during the life of your project. This decision for a +specific vendor potentially allows you to make use of powerful SQL +features that are unique to the vendor. + +It is worth to mention that Doctrine 2 also allows you to handwrite +your SQL instead of extending the DQL parser. Extending DQL is sort of an +advanced extension point. You can map arbitrary SQL to your objects +and gain access to vendor specific functionalities using the +``EntityManager#createNativeQuery()`` API as described in +the :doc:`Native Query <../reference/native-sql>` chapter. + + +The DQL Parser has hooks to register functions that can then be +used in your DQL queries and transformed into SQL, allowing to +extend Doctrines Query capabilities to the vendors strength. This +post explains the Used-Defined Functions API (UDF) of the Dql +Parser and shows some examples to give you some hints how you would +extend DQL. + +There are three types of functions in DQL, those that return a +numerical value, those that return a string and those that return a +Date. Your custom method has to be registered as either one of +those. The return type information is used by the DQL parser to +check possible syntax errors during the parsing process, for +example using a string function return value in a math expression. + +Registering your own DQL functions +---------------------------------- + +You can register your functions adding them to the ORM +configuration: + +.. code-block:: php + + addCustomStringFunction($name, $class); + $config->addCustomNumericFunction($name, $class); + $config->addCustomDatetimeFunction($name, $class); + + $em = EntityManager::create($dbParams, $config); + +The ``$name`` is the name the function will be referred to in the +DQL query. ``$class`` is a string of a class-name which has to +extend ``Doctrine\ORM\Query\Node\FunctionNode``. This is a class +that offers all the necessary API and methods to implement a UDF. + +Instead of providing the function class name, you can also provide +a callable that returns the function object: + +.. code-block:: php + + addCustomStringFunction($name, function () { + return new MyCustomFunction(); + }); + +In this post we will implement some MySql specific Date calculation +methods, which are quite handy in my opinion: + +Date Diff +--------- + +`Mysql's DateDiff function `_ +takes two dates as argument and calculates the difference in days +with ``date1-date2``. + +The DQL parser is a top-down recursive descent parser to generate +the Abstract-Syntax Tree (AST) and uses a TreeWalker approach to +generate the appropriate SQL from the AST. This makes reading the +Parser/TreeWalker code manageable in a finite amount of time. + +The ``FunctionNode`` class I referred to earlier requires you to +implement two methods, one for the parsing process (obviously) +called ``parse`` and one for the TreeWalker process called +``getSql()``. I show you the code for the DateDiff method and +discuss it step by step: + +.. code-block:: php + + match(Lexer::T_IDENTIFIER); // (2) + $parser->match(Lexer::T_OPEN_PARENTHESIS); // (3) + $this->firstDateExpression = $parser->ArithmeticPrimary(); // (4) + $parser->match(Lexer::T_COMMA); // (5) + $this->secondDateExpression = $parser->ArithmeticPrimary(); // (6) + $parser->match(Lexer::T_CLOSE_PARENTHESIS); // (3) + } + + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return 'DATEDIFF(' . + $this->firstDateExpression->dispatch($sqlWalker) . ', ' . + $this->secondDateExpression->dispatch($sqlWalker) . + ')'; // (7) + } + } + +The Parsing process of the DATEDIFF function is going to find two +expressions the date1 and the date2 values, whose AST Node +representations will be saved in the variables of the DateDiff +FunctionNode instance at (1). + +The parse() method has to cut the function call "DATEDIFF" and its +argument into pieces. Since the parser detects the function using a +lookahead the T\_IDENTIFIER of the function name has to be taken +from the stack (2), followed by a detection of the arguments in +(4)-(6). The opening and closing parenthesis have to be detected +also. This happens during the Parsing process and leads to the +generation of a DateDiff FunctionNode somewhere in the AST of the +dql statement. + +The ``ArithmeticPrimary`` method call is the most common +denominator of valid EBNF tokens taken from the +`DQL EBNF grammar `_ +that matches our requirements for valid input into the DateDiff Dql +function. Picking the right tokens for your methods is a tricky +business, but the EBNF grammar is pretty helpful finding it, as is +looking at the Parser source code. + +Now in the TreeWalker process we have to pick up this node and +generate SQL from it, which apparently is quite easy looking at the +code in (7). Since we don't know which type of AST Node the first +and second Date expression are we are just dispatching them back to +the SQL Walker to generate SQL from and then wrap our DATEDIFF +function call around this output. + +Now registering this DateDiff FunctionNode with the ORM using: + +.. code-block:: php + + addCustomStringFunction('DATEDIFF', 'DoctrineExtensions\Query\MySql\DateDiff'); + +We can do fancy stuff like: + +.. code-block:: sql + + SELECT p FROM DoctrineExtensions\Query\BlogPost p WHERE DATEDIFF(CURRENT_TIME(), p.created) < 7 + +Date Add +-------- + +Often useful it the ability to do some simple date calculations in +your DQL query using +`MySql's DATE\_ADD function `_. + +I'll skip the blah and show the code for this function: + +.. code-block:: php + + match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->firstDateExpression = $parser->ArithmeticPrimary(); + + $parser->match(Lexer::T_COMMA); + $parser->match(Lexer::T_IDENTIFIER); + + $this->intervalExpression = $parser->ArithmeticPrimary(); + + $parser->match(Lexer::T_IDENTIFIER); + + /* @var $lexer Lexer */ + $lexer = $parser->getLexer(); + $this->unit = $lexer->token['value']; + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } + + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return 'DATE_ADD(' . + $this->firstDateExpression->dispatch($sqlWalker) . ', INTERVAL ' . + $this->intervalExpression->dispatch($sqlWalker) . ' ' . $this->unit . + ')'; + } + } + +The only difference compared to the DATEDIFF here is, we +additionally need the ``Lexer`` to access the value of the +``T_IDENTIFIER`` token for the Date Interval unit, for example the +MONTH in: + +.. code-block:: sql + + SELECT p FROM DoctrineExtensions\Query\BlogPost p WHERE DATE_ADD(CURRENT_TIME(), INTERVAL 4 MONTH) > p.created + +The above method now only supports the specification using +``INTERVAL``, to also allow a real date in DATE\_ADD we need to add +some decision logic to the parsing process (makes up for a nice +exercise). + +Now as you see, the Parsing process doesn't catch all the possible +SQL errors, here we don't match for all the valid inputs for the +interval unit. However where necessary we rely on the database +vendors SQL parser to show us further errors in the parsing +process, for example if the Unit would not be one of the supported +values by MySql. + +Conclusion +---------- + +Now that you all know how you can implement vendor specific SQL +functionalities in DQL, we would be excited to see user extensions +that add vendor specific function packages, for example more math +functions, XML + GIS Support, Hashing functions and so on. + +For 2.0 we will come with the current set of functions, however for +a future version we will re-evaluate if we can abstract even more +vendor sql functions and extend the DQL languages scope. + +Code for this Extension to DQL and other Doctrine Extensions can be +found +`in my Github DoctrineExtensions repository `_. + + diff --git a/vendor/doctrine/orm/docs/en/cookbook/entities-in-session.rst b/vendor/doctrine/orm/docs/en/cookbook/entities-in-session.rst new file mode 100644 index 0000000000000000000000000000000000000000..664cff53f5ca3084d2489f5f0c47d8557fd2616d --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/entities-in-session.rst @@ -0,0 +1,68 @@ +Entities in the Session +======================= + +There are several use-cases to save entities in the session, for example: + +1. User object +2. Multi-step forms + +To achieve this with Doctrine you have to pay attention to some details to get +this working. + +Merging entity into an EntityManager +------------------------------------ + +In Doctrine an entity objects has to be "managed" by an EntityManager to be +updateable. Entities saved into the session are not managed in the next request +anymore. This means that you have to register these entities with an +EntityManager again if you want to change them or use them as part of +references between other entities. You can achieve this by calling +``EntityManager#merge()``. + +For a representative User object the code to get turn an instance from +the session into a managed Doctrine object looks like this: + +.. code-block:: php + + merge($user); + } + +.. note:: + + A frequent mistake is not to get the merged user object from the return + value of ``EntityManager#merge()``. The entity object passed to merge is + not necessarily the same object that is returned from the method. + +Serializing entity into the session +----------------------------------- + +Entities that are serialized into the session normally contain references to +other entities as well. Think of the user entity has a reference to his +articles, groups, photos or many other different entities. If you serialize +this object into the session then you don't want to serialize the related +entities as well. This is why you should call ``EntityManager#detach()`` on this +object or implement the __sleep() magic method on your entity. + +.. code-block:: php + + find("User", 1); + $em->detach($user); + $_SESSION['user'] = $user; + +.. note:: + + When you called detach on your objects they get "unmanaged" with that + entity manager. This means you cannot use them as part of write operations + during ``EntityManager#flush()`` anymore in this request. + diff --git a/vendor/doctrine/orm/docs/en/cookbook/implementing-arrayaccess-for-domain-objects.rst b/vendor/doctrine/orm/docs/en/cookbook/implementing-arrayaccess-for-domain-objects.rst new file mode 100644 index 0000000000000000000000000000000000000000..4eb2b717bf5517e5cd7732909cf5b5fb4e05b110 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/implementing-arrayaccess-for-domain-objects.rst @@ -0,0 +1,112 @@ +Implementing ArrayAccess for Domain Objects +=========================================== + +.. sectionauthor:: Roman Borschel (roman@code-factory.org) + +This recipe will show you how to implement ArrayAccess for your +domain objects in order to allow more uniform access, for example +in templates. In these examples we will implement ArrayAccess on a +`Layer Supertype `_ +for all our domain objects. + +Option 1 +-------- + +In this implementation we will make use of PHPs highly dynamic +nature to dynamically access properties of a subtype in a supertype +at runtime. Note that this implementation has 2 main caveats: + + +- It will not work with private fields +- It will not go through any getters/setters + +.. code-block:: php + + $offset); + } + + public function offsetSet($offset, $value) { + $this->$offset = $value; + } + + public function offsetGet($offset) { + return $this->$offset; + } + + public function offsetUnset($offset) { + $this->$offset = null; + } + } + +Option 2 +-------- + +In this implementation we will dynamically invoke getters/setters. +Again we use PHPs dynamic nature to invoke methods on a subtype +from a supertype at runtime. This implementation has the following +caveats: + + +- It relies on a naming convention +- The semantics of offsetExists can differ +- offsetUnset will not work with typehinted setters + +.. code-block:: php + + {"get$offset"}(); + return $value !== null; + } + + public function offsetSet($offset, $value) { + $this->{"set$offset"}($value); + } + + public function offsetGet($offset) { + return $this->{"get$offset"}(); + } + + public function offsetUnset($offset) { + $this->{"set$offset"}(null); + } + } + +Read-only +--------- + +You can slightly tweak option 1 or option 2 in order to make array +access read-only. This will also circumvent some of the caveats of +each option. Simply make offsetSet and offsetUnset throw an +exception (i.e. BadMethodCallException). + +.. code-block:: php + + `_ +for all our domain objects. + +Implementing NotifyPropertyChanged +---------------------------------- + +The NOTIFY policy is based on the assumption that the entities +notify interested listeners of changes to their properties. For +that purpose, a class that wants to use this policy needs to +implement the ``NotifyPropertyChanged`` interface from the +``Doctrine\Common`` namespace. + +.. code-block:: php + + listeners[] = $listener; + } + + /** Notifies listeners of a change. */ + protected function onPropertyChanged($propName, $oldValue, $newValue) { + if ($this->listeners) { + foreach ($this->listeners as $listener) { + $listener->propertyChanged($this, $propName, $oldValue, $newValue); + } + } + } + } + +Then, in each property setter of concrete, derived domain classes, +you need to invoke onPropertyChanged as follows to notify +listeners: + +.. code-block:: php + + data) { // check: is it actually modified? + $this->onPropertyChanged('data', $this->data, $data); + $this->data = $data; + } + } + } + +The check whether the new value is different from the old one is +not mandatory but recommended. That way you can avoid unnecessary +updates and also have full control over when you consider a +property changed. + + diff --git a/vendor/doctrine/orm/docs/en/cookbook/implementing-wakeup-or-clone.rst b/vendor/doctrine/orm/docs/en/cookbook/implementing-wakeup-or-clone.rst new file mode 100644 index 0000000000000000000000000000000000000000..6a8ef9c91a7bcae443e3ec59b220af8259c13407 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/implementing-wakeup-or-clone.rst @@ -0,0 +1,78 @@ +Implementing Wakeup or Clone +============================ + +.. sectionauthor:: Roman Borschel (roman@code-factory.org) + +As explained in the +`restrictions for entity classes in the manual `_, +it is usually not allowed for an entity to implement ``__wakeup`` +or ``__clone``, because Doctrine makes special use of them. +However, it is quite easy to make use of these methods in a safe +way by guarding the custom wakeup or clone code with an entity +identity check, as demonstrated in the following sections. + +Safely implementing \_\_wakeup +------------------------------ + +To safely implement ``__wakeup``, simply enclose your +implementation code in an identity check as follows: + +.. code-block:: php + + id) { + // ... Your code here as normal ... + } + // otherwise do nothing, do NOT throw an exception! + } + + //... + } + +Safely implementing \_\_clone +----------------------------- + +Safely implementing ``__clone`` is pretty much the same: + +.. code-block:: php + + id) { + // ... Your code here as normal ... + } + // otherwise do nothing, do NOT throw an exception! + } + + //... + } + +Summary +------- + +As you have seen, it is quite easy to safely make use of +``__wakeup`` and ``__clone`` in your entities without adding any +really Doctrine-specific or Doctrine-dependant code. + +These implementations are possible and safe because when Doctrine +invokes these methods, the entities never have an identity (yet). +Furthermore, it is possibly a good idea to check for the identity +in your code anyway, since it's rarely the case that you want to +unserialize or clone an entity with no identity. + + diff --git a/vendor/doctrine/orm/docs/en/cookbook/integrating-with-codeigniter.rst b/vendor/doctrine/orm/docs/en/cookbook/integrating-with-codeigniter.rst new file mode 100644 index 0000000000000000000000000000000000000000..1c06a34e2c429aedbb6278a7ebeb9fd0f5907283 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/integrating-with-codeigniter.rst @@ -0,0 +1,140 @@ +Integrating with CodeIgniter +============================ + +This is recipe for using Doctrine 2 in your +`CodeIgniter `_ framework. + +.. note:: + + This might not work for all CodeIgniter versions and may require + slight adjustments. + + +Here is how to set it up: + +Make a CodeIgniter library that is both a wrapper and a bootstrap +for Doctrine 2. + +Setting up the file structure +----------------------------- + +Here are the steps: + + +- Add a php file to your system/application/libraries folder + called Doctrine.php. This is going to be your wrapper/bootstrap for + the D2 entity manager. +- Put the Doctrine folder (the one that contains Common, DBAL, and + ORM) inside that same libraries folder. +- Your system/application/libraries folder now looks like this: + + system/applications/libraries -Doctrine -Doctrine.php -index.html + +- If you want, open your config/autoload.php file and autoload + your Doctrine library. + + register(); + $entitiesClassLoader = new ClassLoader('models', rtrim(APPPATH, "/" )); + $entitiesClassLoader->register(); + $proxiesClassLoader = new ClassLoader('Proxies', APPPATH.'models/proxies'); + $proxiesClassLoader->register(); + + // Set up caches + $config = new Configuration; + $cache = new ArrayCache; + $config->setMetadataCacheImpl($cache); + $driverImpl = $config->newDefaultAnnotationDriver(array(APPPATH.'models/Entities')); + $config->setMetadataDriverImpl($driverImpl); + $config->setQueryCacheImpl($cache); + + $config->setQueryCacheImpl($cache); + + // Proxy configuration + $config->setProxyDir(APPPATH.'/models/proxies'); + $config->setProxyNamespace('Proxies'); + + // Set up logger + $logger = new EchoSQLLogger; + $config->setSQLLogger($logger); + + $config->setAutoGenerateProxyClasses( TRUE ); + + // Database connection information + $connectionOptions = array( + 'driver' => 'pdo_mysql', + 'user' => $db['default']['username'], + 'password' => $db['default']['password'], + 'host' => $db['default']['hostname'], + 'dbname' => $db['default']['database'] + ); + + // Create EntityManager + $this->em = EntityManager::create($connectionOptions, $config); + } + } + +Please note that this is a development configuration; for a +production system you'll want to use a real caching system like +APC, get rid of EchoSqlLogger, and turn off +autoGenerateProxyClasses. + +For more details, consult the +`Doctrine 2 Configuration documentation `_. + +Now to use it +------------- + +Whenever you need a reference to the entity manager inside one of +your controllers, views, or models you can do this: + +.. code-block:: php + + doctrine->em; + +That's all there is to it. Once you get the reference to your +EntityManager do your Doctrine 2.0 voodoo as normal. + +Note: If you do not choose to autoload the Doctrine library, you +will need to put this line before you get a reference to it: + +.. code-block:: php + + load->library('doctrine'); + +Good luck! + + diff --git a/vendor/doctrine/orm/docs/en/cookbook/mysql-enums.rst b/vendor/doctrine/orm/docs/en/cookbook/mysql-enums.rst new file mode 100644 index 0000000000000000000000000000000000000000..fcc04517b1b6e47b94dc53a65438b111411e8090 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/mysql-enums.rst @@ -0,0 +1,189 @@ +Mysql Enums +=========== + +The type system of Doctrine 2 consists of flyweights, which means there is only +one instance of any given type. Additionally types do not contain state. Both +assumptions make it rather complicated to work with the Enum Type of MySQL that +is used quite a lot by developers. + +When using Enums with a non-tweaked Doctrine 2 application you will get +errors from the Schema-Tool commands due to the unknown database type "enum". +By default Doctrine does not map the MySQL enum type to a Doctrine type. +This is because Enums contain state (their allowed values) and Doctrine +types don't. + +This cookbook entry shows two possible solutions to work with MySQL enums. +But first a word of warning. The MySQL Enum type has considerable downsides: + +- Adding new values requires to rebuild the whole table, which can take hours + depending on the size. +- Enums are ordered in the way the values are specified, not in their "natural" order. +- Enums validation mechanism for allowed values is not necessarily good, + specifying invalid values leads to an empty enum for the default MySQL error + settings. You can easily replicate the "allow only some values" requirement + in your Doctrine entities. + +Solution 1: Mapping to Varchars +------------------------------- + +You can map ENUMs to varchars. You can register MySQL ENUMs to map to Doctrine +varchars. This way Doctrine always resolves ENUMs to Doctrine varchars. It +will even detect this match correctly when using SchemaTool update commands. + +.. code-block:: php + + getConnection(); + $conn->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); + +In this case you have to ensure that each varchar field that is an enum in the +database only gets passed the allowed values. You can easily enforce this in your +entities: + +.. code-block:: php + + status = $status; + } + } + +If you want to actively create enums through the Doctrine Schema-Tool by using +the **columnDefinition** attribute. + +.. code-block:: php + + values); + + return "ENUM(".implode(", ", $values).") COMMENT '(DC2Type:".$this->name.")'"; + } + + public function convertToPHPValue($value, AbstractPlatform $platform) + { + return $value; + } + + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + if (!in_array($value, $this->values)) { + throw new \InvalidArgumentException("Invalid '".$this->name."' value."); + } + return $value; + } + + public function getName() + { + return $this->name; + } + } + +With this base class you can define an enum as easily as: + +.. code-block:: php + + addResolveTargetEntity('Acme\\InvoiceModule\\Model\\InvoiceSubjectInterface', 'Acme\\CustomerModule\\Entity\\Customer', array()); + + // Add the ResolveTargetEntityListener + $evm->addEventListener(Doctrine\ORM\Events::loadClassMetadata, $rtel); + + $em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config, $evm); + +Final Thoughts +-------------- + +With the ``ResolveTargetEntityListener``, we are able to decouple our +bundles, keeping them usable by themselves, but still being able to +define relationships between different objects. By using this method, +I've found my bundles end up being easier to maintain independently. + + diff --git a/vendor/doctrine/orm/docs/en/cookbook/sql-table-prefixes.rst b/vendor/doctrine/orm/docs/en/cookbook/sql-table-prefixes.rst new file mode 100644 index 0000000000000000000000000000000000000000..fdfd4032f3c35c19a76b8f75345ad6c4917b5612 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/sql-table-prefixes.rst @@ -0,0 +1,84 @@ +SQL-Table Prefixes +================== + +This recipe is intended as an example of implementing a +loadClassMetadata listener to provide a Table Prefix option for +your application. The method used below is not a hack, but fully +integrates into the Doctrine system, all SQL generated will include +the appropriate table prefix. + +In most circumstances it is desirable to separate different +applications into individual databases, but in certain cases, it +may be beneficial to have a table prefix for your Entities to +separate them from other vendor products in the same database. + +Implementing the listener +------------------------- + +The listener in this example has been set up with the +DoctrineExtensions namespace. You create this file in your +library/DoctrineExtensions directory, but will need to set up +appropriate autoloaders. + +.. code-block:: php + + prefix = (string) $prefix; + } + + public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs) + { + $classMetadata = $eventArgs->getClassMetadata(); + + if (!$classMetadata->isInheritanceTypeSingleTable() || $classMetadata->getName() === $classMetadata->rootEntityName) { + $classMetadata->setTableName($this->prefix . $classMetadata->getTableName()); + } + + foreach ($classMetadata->getAssociationMappings() as $fieldName => $mapping) { + if ($mapping['type'] == \Doctrine\ORM\Mapping\ClassMetadataInfo::MANY_TO_MANY && $mapping['isOwningSide']) { + $mappedTableName = $mapping['joinTable']['name']; + $classMetadata->associationMappings[$fieldName]['joinTable']['name'] = $this->prefix . $mappedTableName; + } + } + } + + } + +Telling the EntityManager about our listener +-------------------------------------------- + +A listener of this type must be set up before the EntityManager has +been initialised, otherwise an Entity might be created or cached +before the prefix has been set. + +.. note:: + + If you set this listener up, be aware that you will need + to clear your caches and drop then recreate your database schema. + + +.. code-block:: php + + addEventListener(\Doctrine\ORM\Events::loadClassMetadata, $tablePrefix); + + $em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config, $evm); + + diff --git a/vendor/doctrine/orm/docs/en/cookbook/strategy-cookbook-introduction.rst b/vendor/doctrine/orm/docs/en/cookbook/strategy-cookbook-introduction.rst new file mode 100644 index 0000000000000000000000000000000000000000..d9934f577de4f88b31f9d5a09a11ca8788c9b0e2 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/strategy-cookbook-introduction.rst @@ -0,0 +1,254 @@ +Strategy-Pattern +================ + +This recipe will give you a short introduction on how to design +similar entities without using expensive (i.e. slow) inheritance +but with not more than \* the well-known strategy pattern \* event +listeners + +Scenario / Problem +------------------ + +Given a Content-Management-System, we probably want to add / edit +some so-called "blocks" and "panels". What are they for? + + +- A block might be a registration form, some text content, a table + with information. A good example might also be a small calendar. +- A panel is by definition a block that can itself contain blocks. + A good example for a panel might be a sidebar box: You could easily + add a small calendar into it. + +So, in this scenario, when building your CMS, you will surely add +lots of blocks and panels to your pages and you will find yourself +highly uncomfortable because of the following: + + +- Every existing page needs to know about the panels it contains - + therefore, you'll have an association to your panels. But if you've + got several types of panels - what do you do? Add an association to + every panel-type? This wouldn't be flexible. You might be tempted + to add an AbstractPanelEntity and an AbstractBlockEntity that use + class inheritance. Your page could then only confer to the + AbstractPanelType and Doctrine 2 would do the rest for you, i.e. + load the right entities. But - you'll for sure have lots of panels + and blocks, and even worse, you'd have to edit the discriminator + map *manually* every time you or another developer implements a new + block / entity. This would tear down any effort of modular + programming. + +Therefore, we need something that's far more flexible. + +Solution +-------- + +The solution itself is pretty easy. We will have one base class +that will be loaded via the page and that has specific behaviour - +a Block class might render the front-end and even the backend, for +example. Now, every block that you'll write might look different or +need different data - therefore, we'll offer an API to these +methods but internally, we use a strategy that exactly knows what +to do. + +First of all, we need to make sure that we have an interface that +contains every needed action. Such actions would be rendering the +front-end or the backend, solving dependencies (blocks that are +supposed to be placed in the sidebar could refuse to be placed in +the middle of your page, for example). + +Such an interface could look like this: + + +.. code-block:: php + + blockStrategy. Will not be persisted by Doctrine 2. + * + * @var BlockStrategyInterface + */ + protected $strategyInstance; + + /** + * Returns the strategy that is used for this blockitem. + * + * The strategy itself defines how this block can be rendered etc. + * + * @return string + */ + public function getStrategyClassName() { + return $this->strategyClassName; + } + + /** + * Returns the instantiated strategy + * + * @return BlockStrategyInterface + */ + public function getStrategyInstance() { + return $this->strategyInstance; + } + + /** + * Sets the strategy this block / panel should work as. Make sure that you've used + * this method before persisting the block! + * + * @param BlockStrategyInterface $strategy + */ + public function setStrategy(BlockStrategyInterface $strategy) { + $this->strategyInstance = $strategy; + $this->strategyClassName = get_class($strategy); + $strategy->setBlockEntity($this); + } + +Now, the important point is that $strategyClassName is a Doctrine 2 +field, i.e. Doctrine will persist this value. This is only the +class name of your strategy and not an instance! + +Finishing your strategy pattern, we hook into the Doctrine postLoad +event and check whether a block has been loaded. If so, you will +initialize it - i.e. get the strategies classname, create an +instance of it and set it via setStrategyBlock(). + +This might look like this: + +.. code-block:: php + + view = $view; + } + + public function getSubscribedEvents() { + return array(ORM\Events::postLoad); + } + + public function postLoad(ORM\Event\LifecycleEventArgs $args) { + $blockItem = $args->getEntity(); + + // Both blocks and panels are instances of Block\AbstractBlock + if ($blockItem instanceof Block\AbstractBlock) { + $strategy = $blockItem->getStrategyClassName(); + $strategyInstance = new $strategy(); + if (null !== $blockItem->getConfig()) { + $strategyInstance->setConfig($blockItem->getConfig()); + } + $strategyInstance->setView($this->view); + $blockItem->setStrategy($strategyInstance); + } + } + } + +In this example, even some variables are set - like a view object +or a specific configuration object. + + diff --git a/vendor/doctrine/orm/docs/en/cookbook/validation-of-entities.rst b/vendor/doctrine/orm/docs/en/cookbook/validation-of-entities.rst new file mode 100644 index 0000000000000000000000000000000000000000..fb0254417b0950630fbf8300db20509ebef2de1b --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/validation-of-entities.rst @@ -0,0 +1,137 @@ +Validation of Entities +====================== + +.. sectionauthor:: Benjamin Eberlei + +Doctrine 2 does not ship with any internal validators, the reason +being that we think all the frameworks out there already ship with +quite decent ones that can be integrated into your Domain easily. +What we offer are hooks to execute any kind of validation. + +.. note:: + + You don't need to validate your entities in the lifecycle + events. Its only one of many options. Of course you can also + perform validations in value setters or any other method of your + entities that are used in your code. + + +Entities can register lifecycle event methods with Doctrine that +are called on different occasions. For validation we would need to +hook into the events called before persisting and updating. Even +though we don't support validation out of the box, the +implementation is even simpler than in Doctrine 1 and you will get +the additional benefit of being able to re-use your validation in +any other part of your domain. + +Say we have an ``Order`` with several ``OrderLine`` instances. We +never want to allow any customer to order for a larger sum than he +is allowed to: + +.. code-block:: php + + customer->getOrderLimit(); + + $amount = 0; + foreach ($this->orderLines as $line) { + $amount += $line->getAmount(); + } + + if ($amount > $orderLimit) { + throw new CustomerOrderLimitExceededException(); + } + } + } + +Now this is some pretty important piece of business logic in your +code, enforcing it at any time is important so that customers with +a unknown reputation don't owe your business too much money. + +We can enforce this constraint in any of the metadata drivers. +First Annotations: + +.. code-block:: php + + + + + + + + + + +YAML needs some little change yet, to allow multiple lifecycle +events for one method, this will happen before Beta 1 though. + +Now validation is performed whenever you call +``EntityManager#persist($order)`` or when you call +``EntityManager#flush()`` and an order is about to be updated. Any +Exception that happens in the lifecycle callbacks will be cached by +the EntityManager and the current transaction is rolled back. + +Of course you can do any type of primitive checks, not null, +email-validation, string size, integer and date ranges in your +validation callbacks. + +.. code-block:: php + + plannedShipDate instanceof DateTime)) { + throw new ValidateException(); + } + + if ($this->plannedShipDate->format('U') < time()) { + throw new ValidateException(); + } + + if ($this->customer == null) { + throw new OrderRequiresCustomerException(); + } + } + } + +What is nice about lifecycle events is, you can also re-use the +methods at other places in your domain, for example in combination +with your form library. Additionally there is no limitation in the +number of methods you register on one particular event, i.e. you +can register multiple methods for validation in "PrePersist" or +"PreUpdate" or mix and share them in any combinations between those +two events. + +There is no limit to what you can and can't validate in +"PrePersist" and "PreUpdate" as long as you don't create new entity +instances. This was already discussed in the previous blog post on +the Versionable extension, which requires another type of event +called "onFlush". + +Further readings: :doc:`Lifecycle Events <../reference/events>` diff --git a/vendor/doctrine/orm/docs/en/cookbook/working-with-datetime.rst b/vendor/doctrine/orm/docs/en/cookbook/working-with-datetime.rst new file mode 100644 index 0000000000000000000000000000000000000000..fc548dac0fc96ddfe693a4b28103bf00b1b2c7aa --- /dev/null +++ b/vendor/doctrine/orm/docs/en/cookbook/working-with-datetime.rst @@ -0,0 +1,168 @@ +Working with DateTime Instances +=============================== + +There are many nitty gritty details when working with PHPs DateTime instances. You have know their inner +workings pretty well not to make mistakes with date handling. This cookbook entry holds several +interesting pieces of information on how to work with PHP DateTime instances in Doctrine 2. + +DateTime changes are detected by Reference +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When calling ``EntityManager#flush()`` Doctrine computes the changesets of all the currently managed entities +and saves the differences to the database. In case of object properties (@Column(type="datetime") or @Column(type="object")) +these comparisons are always made **BY REFERENCE**. That means the following change will **NOT** be saved into the database: + +.. code-block:: php + + updated->modify("now"); + } + } + +The way to go would be: + +.. code-block:: php + + updated = new \DateTime("now"); + } + } + +Default Timezone Gotcha +~~~~~~~~~~~~~~~~~~~~~~~ + +By default Doctrine assumes that you are working with a default timezone. Each DateTime instance that +is created by Doctrine will be assigned the timezone that is currently the default, either through +the ``date.timezone`` ini setting or by calling ``date_default_timezone_set()``. + +This is very important to handle correctly if your application runs on different serves or is moved from one to another server +(with different timezone settings). You have to make sure that the timezone is the correct one +on all this systems. + +Handling different Timezones with the DateTime Type +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you first come across the requirement to save different you are still optimistic to manage this mess, +however let me crush your expectations fast. There is not a single database out there (supported by Doctrine 2) +that supports timezones correctly. Correctly here means that you can cover all the use-cases that +can come up with timezones. If you don't believe me you should read up on `Storing DateTime +in Databases `_. + +The problem is simple. Not a single database vendor saves the timezone, only the differences to UTC. +However with frequent daylight saving and political timezone changes you can have a UTC offset that moves +in different offset directions depending on the real location. + +The solution for this dilemma is simple. Don't use timezones with DateTime and Doctrine 2. However there is a workaround +that even allows correct date-time handling with timezones: + +1. Always convert any DateTime instance to UTC. +2. Only set Timezones for displaying purposes +3. Save the Timezone in the Entity for persistence. + +Say we have an application for an international postal company and employees insert events regarding postal-package +around the world, in their current timezones. To determine the exact time an event occurred means to save both +the UTC time at the time of the booking and the timezone the event happened in. + +.. code-block:: php + + format($platform->getDateTimeFormatString(), + (self::$utc) ? self::$utc : (self::$utc = new \DateTimeZone('UTC')) + ); + } + + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if ($value === null) { + return null; + } + + $val = \DateTime::createFromFormat( + $platform->getDateTimeFormatString(), + $value, + (self::$utc) ? self::$utc : (self::$utc = new \DateTimeZone('UTC')) + ); + if (!$val) { + throw ConversionException::conversionFailed($value, $this->getName()); + } + return $val; + } + } + +This database type makes sure that every DateTime instance is always saved in UTC, relative +to the current timezone that the passed DateTime instance has. To be able to transform these values +back into their real timezone you have to save the timezone in a separate field of the entity +requiring timezoned datetimes: + +.. code-block:: php + + localized = true; + $this->created = $createDate; + $this->timezone = $createDate->getTimeZone()->getName(); + } + + public function getCreated() + { + if (!$this->localized) { + $this->created->setTimeZone(new \DateTimeZone($this->timezone)); + } + return $this->created; + } + } + +This snippet makes use of the previously discussed "changeset by reference only" property of +objects. That means a new DateTime will only be used during updating if the reference +changes between retrieval and flush operation. This means we can easily go and modify +the instance by setting the previous local timezone. diff --git a/vendor/doctrine/orm/docs/en/index.rst b/vendor/doctrine/orm/docs/en/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..8e6afc82592807ed172dbe1f88ee609878f17412 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/index.rst @@ -0,0 +1,131 @@ +Welcome to Doctrine 2 ORM's documentation! +========================================== + +The Doctrine documentation is comprised of tutorials, a reference section and +cookbook articles that explain different parts of the Object Relational mapper. + +Doctrine DBAL and Doctrine Common both have their own documentation. + +Getting Help +------------ + +If this documentation is not helping to answer questions you have about +Doctrine ORM don't panic. You can get help from different sources: + +- There is a :doc:`FAQ ` with answers to frequent questions. +- The `Doctrine Mailing List `_ +- Internet Relay Chat (IRC) in #doctrine on Freenode +- Report a bug on `JIRA `_. +- On `Twitter `_ with ``#doctrine2`` +- On `StackOverflow `_ + +If you need more structure over the different topics you can browse the :doc:`table +of contents `. + +Getting Started +--------------- + +* **Tutorial**: + :doc:`Getting Started with Doctrine ` + +* **Setup**: + :doc:`Installation & Configuration ` + +Mapping Objects onto a Database +------------------------------- + +* **Mapping**: + :doc:`Objects ` | + :doc:`Associations ` | + :doc:`Inheritance ` + +* **Drivers**: + :doc:`Docblock Annotations ` | + :doc:`XML ` | + :doc:`YAML ` | + :doc:`PHP ` + +Working with Objects +-------------------- + +* **Basic Reference**: + :doc:`Entities ` | + :doc:`Associations ` | + :doc:`Events ` + +* **Query Reference**: + :doc:`DQL ` | + :doc:`QueryBuilder ` | + :doc:`Native SQL ` + +* **Internals**: + :doc:`Internals explained ` | + :doc:`Associations ` + +Advanced Topics +--------------- + +* :doc:`Architecture ` +* :doc:`Advanced Configuration ` +* :doc:`Limitations and known issues ` +* :doc:`Commandline Tools ` +* :doc:`Transactions and Concurrency ` +* :doc:`Filters ` +* :doc:`NamingStrategy ` +* :doc:`Improving Performance ` +* :doc:`Caching ` +* :doc:`Partial Objects ` +* :doc:`Change Tracking Policies ` +* :doc:`Best Practices ` +* :doc:`Metadata Drivers ` +* :doc:`Batch Processing ` +* :doc:`Second Level Cache ` + +Tutorials +--------- + +* :doc:`Indexed associations ` +* :doc:`Extra Lazy Associations ` +* :doc:`Composite Primary Keys ` +* :doc:`Ordered associations ` +* :doc:`Pagination ` +* :doc:`Override Field/Association Mappings In Subclasses ` +* :doc:`Embeddables ` + +Changelogs +---------- + +* :doc:`Migration to 2.5 ` + +Cookbook +-------- + +* **Patterns**: + :doc:`Aggregate Fields ` | + :doc:`Decorator Pattern ` | + :doc:`Strategy Pattern ` + +* **DQL Extension Points**: + :doc:`DQL Custom Walkers ` | + :doc:`DQL User-Defined-Functions ` + +* **Implementation**: + :doc:`Array Access ` | + :doc:`Notify ChangeTracking Example ` | + :doc:`Using Wakeup Or Clone ` | + :doc:`Working with DateTime ` | + :doc:`Validation ` | + :doc:`Entities in the Session ` | + :doc:`Keeping your Modules independent ` + +* **Integration into Frameworks/Libraries** + :doc:`CodeIgniter ` + +* **Hidden Gems** + :doc:`Prefixing Table Name ` + +* **Custom Datatypes** + :doc:`MySQL Enums ` + :doc:`Advanced Field Value Conversion ` + +.. include:: toc.rst diff --git a/vendor/doctrine/orm/docs/en/make.bat b/vendor/doctrine/orm/docs/en/make.bat new file mode 100644 index 0000000000000000000000000000000000000000..53c40c9129a516e947594512f3002d96c3938dff --- /dev/null +++ b/vendor/doctrine/orm/docs/en/make.bat @@ -0,0 +1,113 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +set SPHINXBUILD=sphinx-build +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. changes to make an overview over all changed/added/deprecated items + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Doctrine2ORM.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Doctrine2ORM.ghc + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +:end diff --git a/vendor/doctrine/orm/docs/en/reference/advanced-configuration.rst b/vendor/doctrine/orm/docs/en/reference/advanced-configuration.rst new file mode 100644 index 0000000000000000000000000000000000000000..9d200f87005a5cd7a43f22977da3fd2eabd34697 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/advanced-configuration.rst @@ -0,0 +1,468 @@ +Advanced Configuration +====================== + +The configuration of the EntityManager requires a +``Doctrine\ORM\Configuration`` instance as well as some database +connection parameters. This example shows all the potential +steps of configuration. + +.. code-block:: php + + setMetadataCacheImpl($cache); + $driverImpl = $config->newDefaultAnnotationDriver('/path/to/lib/MyProject/Entities'); + $config->setMetadataDriverImpl($driverImpl); + $config->setQueryCacheImpl($cache); + $config->setProxyDir('/path/to/myproject/lib/MyProject/Proxies'); + $config->setProxyNamespace('MyProject\Proxies'); + + if ($applicationMode == "development") { + $config->setAutoGenerateProxyClasses(true); + } else { + $config->setAutoGenerateProxyClasses(false); + } + + $connectionOptions = array( + 'driver' => 'pdo_sqlite', + 'path' => 'database.sqlite' + ); + + $em = EntityManager::create($connectionOptions, $config); + +.. note:: + + Do not use Doctrine without a metadata and query cache! + Doctrine is optimized for working with caches. The main + parts in Doctrine that are optimized for caching are the metadata + mapping information with the metadata cache and the DQL to SQL + conversions with the query cache. These 2 caches require only an + absolute minimum of memory yet they heavily improve the runtime + performance of Doctrine. The recommended cache driver to use with + Doctrine is `APC `_. APC provides you with + an opcode-cache (which is highly recommended anyway) and a very + fast in-memory cache storage that you can use for the metadata and + query caches as seen in the previous code snippet. + +Configuration Options +--------------------- + +The following sections describe all the configuration options +available on a ``Doctrine\ORM\Configuration`` instance. + +Proxy Directory (***REQUIRED***) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + setProxyDir($dir); + $config->getProxyDir(); + +Gets or sets the directory where Doctrine generates any proxy +classes. For a detailed explanation on proxy classes and how they +are used in Doctrine, refer to the "Proxy Objects" section further +down. + +Proxy Namespace (***REQUIRED***) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + setProxyNamespace($namespace); + $config->getProxyNamespace(); + +Gets or sets the namespace to use for generated proxy classes. For +a detailed explanation on proxy classes and how they are used in +Doctrine, refer to the "Proxy Objects" section further down. + +Metadata Driver (***REQUIRED***) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + setMetadataDriverImpl($driver); + $config->getMetadataDriverImpl(); + +Gets or sets the metadata driver implementation that is used by +Doctrine to acquire the object-relational metadata for your +classes. + +There are currently 4 available implementations: + + +- ``Doctrine\ORM\Mapping\Driver\AnnotationDriver`` +- ``Doctrine\ORM\Mapping\Driver\XmlDriver`` +- ``Doctrine\ORM\Mapping\Driver\YamlDriver`` +- ``Doctrine\ORM\Mapping\Driver\DriverChain`` + +Throughout the most part of this manual the AnnotationDriver is +used in the examples. For information on the usage of the XmlDriver +or YamlDriver please refer to the dedicated chapters +``XML Mapping`` and ``YAML Mapping``. + +The annotation driver can be configured with a factory method on +the ``Doctrine\ORM\Configuration``: + +.. code-block:: php + + newDefaultAnnotationDriver('/path/to/lib/MyProject/Entities'); + $config->setMetadataDriverImpl($driverImpl); + +The path information to the entities is required for the annotation +driver, because otherwise mass-operations on all entities through +the console could not work correctly. All of metadata drivers +accept either a single directory as a string or an array of +directories. With this feature a single driver can support multiple +directories of Entities. + +Metadata Cache (***RECOMMENDED***) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + setMetadataCacheImpl($cache); + $config->getMetadataCacheImpl(); + +Gets or sets the cache implementation to use for caching metadata +information, that is, all the information you supply via +annotations, xml or yaml, so that they do not need to be parsed and +loaded from scratch on every single request which is a waste of +resources. The cache implementation must implement the +``Doctrine\Common\Cache\Cache`` interface. + +Usage of a metadata cache is highly recommended. + +The recommended implementations for production are: + + +- ``Doctrine\Common\Cache\ApcCache`` +- ``Doctrine\Common\Cache\MemcacheCache`` +- ``Doctrine\Common\Cache\XcacheCache`` +- ``Doctrine\Common\Cache\RedisCache`` + +For development you should use the +``Doctrine\Common\Cache\ArrayCache`` which only caches data on a +per-request basis. + +Query Cache (***RECOMMENDED***) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + setQueryCacheImpl($cache); + $config->getQueryCacheImpl(); + +Gets or sets the cache implementation to use for caching DQL +queries, that is, the result of a DQL parsing process that includes +the final SQL as well as meta information about how to process the +SQL result set of a query. Note that the query cache does not +affect query results. You do not get stale data. This is a pure +optimization cache without any negative side-effects (except some +minimal memory usage in your cache). + +Usage of a query cache is highly recommended. + +The recommended implementations for production are: + + +- ``Doctrine\Common\Cache\ApcCache`` +- ``Doctrine\Common\Cache\MemcacheCache`` +- ``Doctrine\Common\Cache\XcacheCache`` +- ``Doctrine\Common\Cache\RedisCache`` + +For development you should use the +``Doctrine\Common\Cache\ArrayCache`` which only caches data on a +per-request basis. + +SQL Logger (***Optional***) +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + setSQLLogger($logger); + $config->getSQLLogger(); + +Gets or sets the logger to use for logging all SQL statements +executed by Doctrine. The logger class must implement the +``Doctrine\DBAL\Logging\SQLLogger`` interface. A simple default +implementation that logs to the standard output using ``echo`` and +``var_dump`` can be found at +``Doctrine\DBAL\Logging\EchoSQLLogger``. + +Auto-generating Proxy Classes (***OPTIONAL***) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Proxy classes can either be generated manually through the Doctrine +Console or automatically at runtime by Doctrine. The configuration +option that controls this behavior is: + +.. code-block:: php + + setAutoGenerateProxyClasses($mode); + +Possible values for ``$mode`` are: + +- ``Doctrine\Common\Proxy\AbstractProxyFactory::AUTOGENERATE_NEVER`` + +Never autogenerate a proxy. You will need to generate the proxies +manually, for this use the Doctrine Console like so: + +.. code-block:: php + + $ ./doctrine orm:generate-proxies + +When you do this in a development environment, +be aware that you may get class/file not found errors if certain proxies +are not yet generated. You may also get failing lazy-loads if new +methods were added to the entity class that are not yet in the proxy class. +In such a case, simply use the Doctrine Console to (re)generate the +proxy classes. + +- ``Doctrine\Common\Proxy\AbstractProxyFactory::AUTOGENERATE_ALWAYS`` + +Always generates a new proxy in every request and writes it to disk. + +- ``Doctrine\Common\Proxy\AbstractProxyFactory::AUTOGENERATE_FILE_NOT_EXISTS`` + +Generate the proxy class when the proxy file does not exist. +This strategy causes a file exists call whenever any proxy is +used the first time in a request. + +- ``Doctrine\Common\Proxy\AbstractProxyFactory::AUTOGENERATE_EVAL`` + +Generate the proxy classes and evaluate them on the fly via eval(), +avoiding writing the proxies to disk. +This strategy is only sane for development. + +In a production environment, it is highly recommended to use +AUTOGENERATE_NEVER to allow for optimal performances. The other +options are interesting in development environment. + +Before v2.4, ``setAutoGenerateProxyClasses`` would accept a boolean +value. This is still possible, ``FALSE`` being equivalent to +AUTOGENERATE_NEVER and ``TRUE`` to AUTOGENERATE_ALWAYS. + +Development vs Production Configuration +--------------------------------------- + +You should code your Doctrine2 bootstrapping with two different +runtime models in mind. There are some serious benefits of using +APC or Memcache in production. In development however this will +frequently give you fatal errors, when you change your entities and +the cache still keeps the outdated metadata. That is why we +recommend the ``ArrayCache`` for development. + +Furthermore you should have the Auto-generating Proxy Classes +option to true in development and to false in production. If this +option is set to ``TRUE`` it can seriously hurt your script +performance if several proxy classes are re-generated during script +execution. Filesystem calls of that magnitude can even slower than +all the database queries Doctrine issues. Additionally writing a +proxy sets an exclusive file lock which can cause serious +performance bottlenecks in systems with regular concurrent +requests. + +Connection Options +------------------ + +The ``$connectionOptions`` passed as the first argument to +``EntityManager::create()`` has to be either an array or an +instance of ``Doctrine\DBAL\Connection``. If an array is passed it +is directly passed along to the DBAL Factory +``Doctrine\DBAL\DriverManager::getConnection()``. The DBAL +configuration is explained in the +`DBAL section <./../../../../../projects/doctrine-dbal/en/latest/reference/configuration.html>`_. + +Proxy Objects +------------- + +A proxy object is an object that is put in place or used instead of +the "real" object. A proxy object can add behavior to the object +being proxied without that object being aware of it. In Doctrine 2, +proxy objects are used to realize several features but mainly for +transparent lazy-loading. + +Proxy objects with their lazy-loading facilities help to keep the +subset of objects that are already in memory connected to the rest +of the objects. This is an essential property as without it there +would always be fragile partial objects at the outer edges of your +object graph. + +Doctrine 2 implements a variant of the proxy pattern where it +generates classes that extend your entity classes and adds +lazy-loading capabilities to them. Doctrine can then give you an +instance of such a proxy class whenever you request an object of +the class being proxied. This happens in two situations: + +Reference Proxies +~~~~~~~~~~~~~~~~~ + +The method ``EntityManager#getReference($entityName, $identifier)`` +lets you obtain a reference to an entity for which the identifier +is known, without loading that entity from the database. This is +useful, for example, as a performance enhancement, when you want to +establish an association to an entity for which you have the +identifier. You could simply do this: + +.. code-block:: php + + getReference('MyProject\Model\Item', $itemId); + $cart->addItem($item); + +Here, we added an Item to a Cart without loading the Item from the +database. If you invoke any method on the Item instance, it would +fully initialize its state transparently from the database. Here +$item is actually an instance of the proxy class that was generated +for the Item class but your code does not need to care. In fact it +**should not care**. Proxy objects should be transparent to your +code. + +Association proxies +~~~~~~~~~~~~~~~~~~~ + +The second most important situation where Doctrine uses proxy +objects is when querying for objects. Whenever you query for an +object that has a single-valued association to another object that +is configured LAZY, without joining that association in the same +query, Doctrine puts proxy objects in place where normally the +associated object would be. Just like other proxies it will +transparently initialize itself on first access. + +.. note:: + + Joining an association in a DQL or native query + essentially means eager loading of that association in that query. + This will override the 'fetch' option specified in the mapping for + that association, but only for that query. + + +Generating Proxy classes +~~~~~~~~~~~~~~~~~~~~~~~~ + +In a production environment, it is highly recommended to use +``AUTOGENERATE_NEVER`` to allow for optimal performances. +However you will be required to generate the proxies manually +using the Doctrine Console: + +.. code-block:: php + + $ ./doctrine orm:generate-proxies + +The other options are interesting in development environment: + +- ``AUTOGENERATE_ALWAYS`` will require you to create and configure + a proxy directory. Proxies will be generated and written to file + on each request, so any modification to your code will be acknowledged. + +- ``AUTOGENERATE_FILE_NOT_EXISTS`` will not overwrite an existing + proxy file. If your code changes, you will need to regenerate the + proxies manually. + +- ``AUTOGENERATE_EVAL`` will regenerate each proxy on each request, + but without writing them to disk. + +Autoloading Proxies +------------------- + +When you deserialize proxy objects from the session or any other storage +it is necessary to have an autoloading mechanism in place for these classes. +For implementation reasons Proxy class names are not PSR-0 compliant. This +means that you have to register a special autoloader for these classes: + +.. code-block:: php + + addDriver($xmlDriver, 'Doctrine\Tests\Models\Company'); + $chain->addDriver($yamlDriver, 'Doctrine\Tests\ORM\Mapping'); + +Based on the namespace of the entity the loading of entities is +delegated to the appropriate driver. The chain semantics come from +the fact that the driver loops through all namespaces and matches +the entity class name against the namespace using a +``strpos() === 0`` call. This means you need to order the drivers +correctly if sub-namespaces use different metadata driver +implementations. + + +Default Repository (***OPTIONAL***) +----------------------------------- + +Specifies the FQCN of a subclass of the EntityRepository. +That will be available for all entities without a custom repository class. + +.. code-block:: php + + setDefaultRepositoryClassName($fqcn); + $config->getDefaultRepositoryClassName(); + +The default value is ``Doctrine\ORM\EntityRepository``. +Any repository class must be a subclass of EntityRepository otherwise you got an ORMException + +Setting up the Console +---------------------- + +Doctrine uses the Symfony Console component for generating the command +line interface. You can take a look at the ``vendor/bin/doctrine.php`` +script and the ``Doctrine\ORM\Tools\Console\ConsoleRunner`` command +for inspiration how to setup the cli. + +In general the required code looks like this: + +.. code-block:: php + + setCatchExceptions(true); + $cli->setHelperSet($helperSet); + Doctrine\ORM\Tools\Console\ConsoleRunner::addCommands($cli); + $cli->run(); + diff --git a/vendor/doctrine/orm/docs/en/reference/annotations-reference.rst b/vendor/doctrine/orm/docs/en/reference/annotations-reference.rst new file mode 100644 index 0000000000000000000000000000000000000000..d6d700b834fd253d03605bf1c2fe6761dc38aa84 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/annotations-reference.rst @@ -0,0 +1,1231 @@ +Annotations Reference +===================== + +You've probably used docblock annotations in some form already, +most likely to provide documentation metadata for a tool like +``PHPDocumentor`` (@author, @link, ...). Docblock annotations are a +tool to embed metadata inside the documentation section which can +then be processed by some tool. Doctrine 2 generalizes the concept +of docblock annotations so that they can be used for any kind of +metadata and so that it is easy to define new docblock annotations. +In order to allow more involved annotation values and to reduce the +chances of clashes with other docblock annotations, the Doctrine 2 +docblock annotations feature an alternative syntax that is heavily +inspired by the Annotation syntax introduced in Java 5. + +The implementation of these enhanced docblock annotations is +located in the ``Doctrine\Common\Annotations`` namespace and +therefore part of the Common package. Doctrine 2 docblock +annotations support namespaces and nested annotations among other +things. The Doctrine 2 ORM defines its own set of docblock +annotations for supplying object-relational mapping metadata. + +.. note:: + + If you're not comfortable with the concept of docblock + annotations, don't worry, as mentioned earlier Doctrine 2 provides + XML and YAML alternatives and you could easily implement your own + favourite mechanism for defining ORM metadata. + +In this chapter a reference of every Doctrine 2 Annotation is given +with short explanations on their context and usage. + +Index +----- + +- :ref:`@Column ` +- :ref:`@ColumnResult ` +- :ref:`@Cache ` +- :ref:`@ChangeTrackingPolicy ` +- :ref:`@DiscriminatorColumn ` +- :ref:`@DiscriminatorMap ` +- :ref:`@Entity ` +- :ref:`@EntityResult ` +- :ref:`@FieldResult ` +- :ref:`@GeneratedValue ` +- :ref:`@HasLifecycleCallbacks ` +- :ref:`@Index ` +- :ref:`@Id ` +- :ref:`@InheritanceType ` +- :ref:`@JoinColumn ` +- :ref:`@JoinColumns ` +- :ref:`@JoinTable ` +- :ref:`@ManyToOne ` +- :ref:`@ManyToMany ` +- :ref:`@MappedSuperclass ` +- :ref:`@NamedNativeQuery ` +- :ref:`@OneToOne ` +- :ref:`@OneToMany ` +- :ref:`@OrderBy ` +- :ref:`@PostLoad ` +- :ref:`@PostPersist ` +- :ref:`@PostRemove ` +- :ref:`@PostUpdate ` +- :ref:`@PrePersist ` +- :ref:`@PreRemove ` +- :ref:`@PreUpdate ` +- :ref:`@SequenceGenerator ` +- :ref:`@SqlResultSetMapping ` +- :ref:`@Table ` +- :ref:`@UniqueConstraint ` +- :ref:`@Version ` + +Reference +--------- + +.. _annref_column: + +@Column +~~~~~~~ + +Marks an annotated instance variable as "persistent". It has to be +inside the instance variables PHP DocBlock comment. Any value hold +inside this variable will be saved to and loaded from the database +as part of the lifecycle of the instance variables entity-class. + +Required attributes: + +- **type**: Name of the Doctrine Type which is converted between PHP + and Database representation. + +Optional attributes: + +- **name**: By default the property name is used for the database + column name also, however the 'name' attribute allows you to + determine the column name. + +- **length**: Used by the "string" type to determine its maximum + length in the database. Doctrine does not validate the length of a + string values for you. + +- **precision**: The precision for a decimal (exact numeric) column + (applies only for decimal column), which is the maximum number of + digits that are stored for the values. + +- **scale**: The scale for a decimal (exact numeric) column (applies + only for decimal column), which represents the number of digits + to the right of the decimal point and must not be greater than + *precision*. + +- **unique**: Boolean value to determine if the value of the column + should be unique across all rows of the underlying entities table. + +- **nullable**: Determines if NULL values allowed for this column. + +- **options**: Array of additional options: + + - ``default``: The default value to set for the column if no value + is supplied. + + - ``unsigned``: Boolean value to determine if the column should + be capable of representing only non-negative integers + (applies only for integer column and might not be supported by + all vendors). + + - ``fixed``: Boolean value to determine if the specified length of + a string column should be fixed or varying (applies only for + string/binary column and might not be supported by all vendors). + + - ``comment``: The comment of the column in the schema (might not + be supported by all vendors). + + - ``collation``: The collation of the column (only supported by Drizzle, Mysql, PostgreSQL>=9.1, Sqlite and SQLServer). + +- **columnDefinition**: DDL SQL snippet that starts after the column + name and specifies the complete (non-portable!) column definition. + This attribute allows to make use of advanced RMDBS features. + However you should make careful use of this feature and the + consequences. SchemaTool will not detect changes on the column correctly + anymore if you use "columnDefinition". + + Additionally you should remember that the "type" + attribute still handles the conversion between PHP and Database + values. If you use this attribute on a column that is used for + joins between tables you should also take a look at + :ref:`@JoinColumn `. + +.. note:: + + For more detailed information on each attribute, please refer to + the DBAL ``Schema-Representation`` documentation. + +Examples: + +.. code-block:: php + + ` +can be found in the configuration section. + +Example: + +.. code-block:: php + + = 2.1) Specifies that this entity is marked as read only and not + considered for change-tracking. Entities of this type can be persisted + and removed though. + +Example: + +.. code-block:: php + + `. This +annotation is optional and only has meaning when used in +conjunction with @Id. + +If this annotation is not specified with @Id the NONE strategy is +used as default. + +Required attributes: + + +- **strategy**: Set the name of the identifier generation strategy. + Valid values are AUTO, SEQUENCE, TABLE, IDENTITY, UUID, CUSTOM and NONE. + +Example: + +.. code-block:: php + + ` annotation on +the entity-class level. It provides a hint to the SchemaTool to +generate a database index on the specified table columns. It only +has meaning in the SchemaTool schema generation context. + +Required attributes: + + +- **name**: Name of the Index +- **columns**: Array of columns. + +Optional attributes: + +- **options**: Array of platform specific options: + + - ``where``: SQL WHERE condition to be used for partial indexes. It will + only have effect on supported platforms. + +Basic example: + +.. code-block:: php + + ` and +:ref:`@DiscriminatorColumn ` annotations. + +Examples: + +.. code-block:: php + + `, :ref:`@OneToOne ` fields +and in the Context of :ref:`@JoinTable ` nested inside +a @ManyToMany. This annotation is not required. If it is not +specified the attributes *name* and *referencedColumnName* are +inferred from the table and primary key names. + +Required attributes: + + +- **name**: Column name that holds the foreign key identifier for + this relation. In the context of @JoinTable it specifies the column + name in the join table. +- **referencedColumnName**: Name of the primary key identifier that + is used for joining of this relation. + +Optional attributes: + + +- **unique**: Determines whether this relation is exclusive between the + affected entities and should be enforced as such on the database + constraint level. Defaults to false. +- **nullable**: Determine whether the related entity is required, or if + null is an allowed state for the relation. Defaults to true. +- **onDelete**: Cascade Action (Database-level) +- **columnDefinition**: DDL SQL snippet that starts after the column + name and specifies the complete (non-portable!) column definition. + This attribute enables the use of advanced RMDBS features. Using + this attribute on @JoinColumn is necessary if you need slightly + different column definitions for joining columns, for example + regarding NULL/NOT NULL defaults. However by default a + "columnDefinition" attribute on :ref:`@Column ` also sets + the related @JoinColumn's columnDefinition. This is necessary to + make foreign keys work. + +Example: + +.. code-block:: php + + ` or :ref:`@OneToOne ` +relation with an entity that has multiple identifiers. + +.. _annref_jointable: + +@JoinTable +~~~~~~~~~~~~~~ + +Using :ref:`@OneToMany ` or +:ref:`@ManyToMany ` on the owning side of the relation +requires to specify the @JoinTable annotation which describes the +details of the database join table. If you do not specify +@JoinTable on these relations reasonable mapping defaults apply +using the affected table and the column names. + +Optional attributes: + + +- **name**: Database name of the join-table +- **joinColumns**: An array of @JoinColumn annotations describing the + join-relation between the owning entities table and the join table. +- **inverseJoinColumns**: An array of @JoinColumn annotations + describing the join-relation between the inverse entities table and + the join table. + +Example: + +.. code-block:: php + + ` is an +additional, optional annotation that has reasonable default +configuration values using the table and names of the two related +entities. + +Required attributes: + + +- **targetEntity**: FQCN of the referenced target entity. Can be the + unqualified class name if both classes are in the same namespace. + *IMPORTANT:* No leading backslash! + +Optional attributes: + + +- **mappedBy**: This option specifies the property name on the + targetEntity that is the owning side of this relation. It is a + required attribute for the inverse side of a relationship. +- **inversedBy**: The inversedBy attribute designates the field in the + entity that is the inverse side of the relationship. +- **cascade**: Cascade Option +- **fetch**: One of LAZY, EXTRA_LAZY or EAGER +- **indexBy**: Index the collection by a field on the target entity. + +.. note:: + + For ManyToMany bidirectional relationships either side may + be the owning side (the side that defines the @JoinTable and/or + does not make use of the mappedBy attribute, thus using a default + join table). + +Example: + +.. code-block:: php + + `. + +Optional attributes: + + +- **repositoryClass**: (>= 2.2) Specifies the FQCN of a subclass of the EntityRepository. + That will be inherited for all subclasses of that Mapped Superclass. + +Example: + +.. code-block:: php + + ` with one additional option which can +be specified. The configuration defaults for +:ref:`@JoinColumn ` using the target entity table and +primary key column names apply here too. + +Required attributes: + + +- **targetEntity**: FQCN of the referenced target entity. Can be the + unqualified class name if both classes are in the same namespace. + *IMPORTANT:* No leading backslash! + +Optional attributes: + + +- **cascade**: Cascade Option +- **fetch**: One of LAZY or EAGER +- **orphanRemoval**: Boolean that specifies if orphans, inverse + OneToOne entities that are not connected to any owning instance, + should be removed by Doctrine. Defaults to false. +- **inversedBy**: The inversedBy attribute designates the field in the + entity that is the inverse side of the relationship. + +Example: + +.. code-block:: php + + ` or :ref:`@OneToMany ` +annotation to specify by which criteria the collection should be +retrieved from the database by using an ORDER BY clause. + +This annotation requires a single non-attributed value with an DQL +snippet: + +Example: + +.. code-block:: php + + = 2.5) Name of the schema the table lies in. + +Example: + +.. code-block:: php + + ` annotation on +the entity-class level. It allows to hint the SchemaTool to +generate a database unique constraint on the specified table +columns. It only has meaning in the SchemaTool schema generation +context. + +Required attributes: + + +- **name**: Name of the Index +- **columns**: Array of columns. + +Optional attributes: + +- **options**: Array of platform specific options: + + - ``where``: SQL WHERE condition to be used for partial indexes. It will + only have effect on supported platforms. + +Basic example: + +.. code-block:: php + + ` annotations that have the type integer or +datetime. Combining @Version with :ref:`@Id ` is not supported. + +Example: + +.. code-block:: php + + `. +- An entity class must not implement ``__wakeup`` or + :doc:`do so safely <../cookbook/implementing-wakeup-or-clone>`. + Also consider implementing + `Serializable `_ + instead. +- Any two entity classes in a class hierarchy that inherit + directly or indirectly from one another must not have a mapped + property with the same name. That is, if B inherits from A then B + must not have a mapped field with the same name as an already + mapped field that is inherited from A. +- An entity cannot make use of func_get_args() to implement variable parameters. + Generated proxies do not support this for performance reasons and your code might + actually fail to work when violating this restriction. + +Entities support inheritance, polymorphic associations, and +polymorphic queries. Both abstract and concrete classes can be +entities. Entities may extend non-entity classes as well as entity +classes, and non-entity classes may extend entity classes. + +.. note:: + + The constructor of an entity is only ever invoked when + *you* construct a new instance with the *new* keyword. Doctrine + never calls entity constructors, thus you are free to use them as + you wish and even have it require arguments of any type. + + +Entity states +~~~~~~~~~~~~~ + +An entity instance can be characterized as being NEW, MANAGED, +DETACHED or REMOVED. + + +- A NEW entity instance has no persistent identity, and is not yet + associated with an EntityManager and a UnitOfWork (i.e. those just + created with the "new" operator). +- A MANAGED entity instance is an instance with a persistent + identity that is associated with an EntityManager and whose + persistence is thus managed. +- A DETACHED entity instance is an instance with a persistent + identity that is not (or no longer) associated with an + EntityManager and a UnitOfWork. +- A REMOVED entity instance is an instance with a persistent + identity, associated with an EntityManager, that will be removed + from the database upon transaction commit. + +.. _architecture_persistent_fields: + +Persistent fields +~~~~~~~~~~~~~~~~~ + +The persistent state of an entity is represented by instance +variables. An instance variable must be directly accessed only from +within the methods of the entity by the entity instance itself. +Instance variables must not be accessed by clients of the entity. +The state of the entity is available to clients only through the +entity’s methods, i.e. accessor methods (getter/setter methods) or +other business methods. + +Collection-valued persistent fields and properties must be defined +in terms of the ``Doctrine\Common\Collections\Collection`` +interface. The collection implementation type may be used by the +application to initialize fields or properties before the entity is +made persistent. Once the entity becomes managed (or detached), +subsequent access must be through the interface type. + +Serializing entities +~~~~~~~~~~~~~~~~~~~~ + +Serializing entities can be problematic and is not really +recommended, at least not as long as an entity instance still holds +references to proxy objects or is still managed by an +EntityManager. If you intend to serialize (and unserialize) entity +instances that still hold references to proxy objects you may run +into problems with private properties because of technical +limitations. Proxy objects implement ``__sleep`` and it is not +possible for ``__sleep`` to return names of private properties in +parent classes. On the other hand it is not a solution for proxy +objects to implement ``Serializable`` because Serializable does not +work well with any potential cyclic object references (at least we +did not find a way yet, if you did, please contact us). + +The EntityManager +~~~~~~~~~~~~~~~~~ + +The ``EntityManager`` class is a central access point to the ORM +functionality provided by Doctrine 2. The ``EntityManager`` API is +used to manage the persistence of your objects and to query for +persistent objects. + +Transactional write-behind +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +An ``EntityManager`` and the underlying ``UnitOfWork`` employ a +strategy called "transactional write-behind" that delays the +execution of SQL statements in order to execute them in the most +efficient way and to execute them at the end of a transaction so +that all write locks are quickly released. You should see Doctrine +as a tool to synchronize your in-memory objects with the database +in well defined units of work. Work with your objects and modify +them as usual and when you're done call ``EntityManager#flush()`` +to make your changes persistent. + +The Unit of Work +~~~~~~~~~~~~~~~~ + +Internally an ``EntityManager`` uses a ``UnitOfWork``, which is a +typical implementation of the +`Unit of Work pattern `_, +to keep track of all the things that need to be done the next time +``flush`` is invoked. You usually do not directly interact with a +``UnitOfWork`` but with the ``EntityManager`` instead. + + diff --git a/vendor/doctrine/orm/docs/en/reference/association-mapping.rst b/vendor/doctrine/orm/docs/en/reference/association-mapping.rst new file mode 100644 index 0000000000000000000000000000000000000000..c212e57a5fcd0b85400d96d0a19a4d9a8aa062a3 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/association-mapping.rst @@ -0,0 +1,1094 @@ +Association Mapping +=================== + +This chapter explains mapping associations between objects. + +Instead of working with foreign keys in your code, you will always work with +references to objects instead and Doctrine will convert those references +to foreign keys internally. + +- A reference to a single object is represented by a foreign key. +- A collection of objects is represented by many foreign keys pointing to the object holding the collection + +This chapter is split into three different sections. + +- A list of all the possible association mapping use-cases is given. +- :ref:`association_mapping_defaults` are explained that simplify the use-case examples. +- :ref:`collections` are introduced that contain entities in associations. + +To gain a full understanding of associations you should also read about :doc:`owning and +inverse sides of associations ` + +Many-To-One, Unidirectional +--------------------------- + +A many-to-one association is the most common association between objects. + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + .. code-block:: yaml + + User: + type: entity + manyToOne: + address: + targetEntity: Address + joinColumn: + name: address_id + referencedColumnName: id + + +.. note:: + + The above ``@JoinColumn`` is optional as it would default + to ``address_id`` and ``id`` anyways. You can omit it and let it + use the defaults. + +Generated MySQL Schema: + +.. code-block:: sql + + CREATE TABLE User ( + id INT AUTO_INCREMENT NOT NULL, + address_id INT DEFAULT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + + CREATE TABLE Address ( + id INT AUTO_INCREMENT NOT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + + ALTER TABLE User ADD FOREIGN KEY (address_id) REFERENCES Address(id); + +One-To-One, Unidirectional +-------------------------- + +Here is an example of a one-to-one association with a ``Product`` entity that +references one ``Shipping`` entity. The ``Shipping`` does not reference back to +the ``Product`` so that the reference is said to be unidirectional, in one +direction only. + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + .. code-block:: yaml + + Product: + type: entity + oneToOne: + shipping: + targetEntity: Shipping + joinColumn: + name: shipping_id + referencedColumnName: id + +Note that the @JoinColumn is not really necessary in this example, +as the defaults would be the same. + +Generated MySQL Schema: + +.. code-block:: sql + + CREATE TABLE Product ( + id INT AUTO_INCREMENT NOT NULL, + shipping_id INT DEFAULT NULL, + UNIQUE INDEX UNIQ_6FBC94267FE4B2B (shipping_id), + PRIMARY KEY(id) + ) ENGINE = InnoDB; + CREATE TABLE Shipping ( + id INT AUTO_INCREMENT NOT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + ALTER TABLE Product ADD FOREIGN KEY (shipping_id) REFERENCES Shipping(id); + +One-To-One, Bidirectional +------------------------- + +Here is a one-to-one relationship between a ``Customer`` and a +``Cart``. The ``Cart`` has a reference back to the ``Customer`` so +it is bidirectional. + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + + + + .. code-block:: yaml + + Customer: + oneToOne: + cart: + targetEntity: Cart + mappedBy: customer + Cart: + oneToOne: + customer: + targetEntity: Customer + inversedBy: cart + joinColumn: + name: customer_id + referencedColumnName: id + +Note that the @JoinColumn is not really necessary in this example, +as the defaults would be the same. + +Generated MySQL Schema: + +.. code-block:: sql + + CREATE TABLE Cart ( + id INT AUTO_INCREMENT NOT NULL, + customer_id INT DEFAULT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + CREATE TABLE Customer ( + id INT AUTO_INCREMENT NOT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + ALTER TABLE Cart ADD FOREIGN KEY (customer_id) REFERENCES Customer(id); + +See how the foreign key is defined on the owning side of the +relation, the table ``Cart``. + +One-To-One, Self-referencing +---------------------------- + +You can define a self-referencing one-to-one relationships like +below. + +.. code-block:: php + + features = new ArrayCollection(); + } + } + + /** @Entity **/ + class Feature + { + // ... + /** + * @ManyToOne(targetEntity="Product", inversedBy="features") + * @JoinColumn(name="product_id", referencedColumnName="id") + **/ + private $product; + // ... + } + + .. code-block:: xml + + + + + + + + + + + + + .. code-block:: yaml + + Product: + type: entity + oneToMany: + features: + targetEntity: Feature + mappedBy: product + Feature: + type: entity + manyToOne: + product: + targetEntity: Product + inversedBy: features + joinColumn: + name: product_id + referencedColumnName: id + +Note that the @JoinColumn is not really necessary in this example, +as the defaults would be the same. + +Generated MySQL Schema: + +.. code-block:: sql + + CREATE TABLE Product ( + id INT AUTO_INCREMENT NOT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + CREATE TABLE Feature ( + id INT AUTO_INCREMENT NOT NULL, + product_id INT DEFAULT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + ALTER TABLE Feature ADD FOREIGN KEY (product_id) REFERENCES Product(id); + +One-To-Many, Unidirectional with Join Table +------------------------------------------- + +A unidirectional one-to-many association can be mapped through a +join table. From Doctrine's point of view, it is simply mapped as a +unidirectional many-to-many whereby a unique constraint on one of +the join columns enforces the one-to-many cardinality. + +The following example sets up such a unidirectional one-to-many association: + +.. configuration-block:: + + .. code-block:: php + + phonenumbers = new \Doctrine\Common\Collections\ArrayCollection(); + } + + // ... + } + + /** @Entity **/ + class Phonenumber + { + // ... + } + + .. code-block:: xml + + + + + + + + + + + + + + + + + .. code-block:: yaml + + User: + type: entity + manyToMany: + phonenumbers: + targetEntity: Phonenumber + joinTable: + name: users_phonenumbers + joinColumns: + user_id: + referencedColumnName: id + inverseJoinColumns: + phonenumber_id: + referencedColumnName: id + unique: true + + +Generates the following MySQL Schema: + +.. code-block:: sql + + CREATE TABLE User ( + id INT AUTO_INCREMENT NOT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + + CREATE TABLE users_phonenumbers ( + user_id INT NOT NULL, + phonenumber_id INT NOT NULL, + UNIQUE INDEX users_phonenumbers_phonenumber_id_uniq (phonenumber_id), + PRIMARY KEY(user_id, phonenumber_id) + ) ENGINE = InnoDB; + + CREATE TABLE Phonenumber ( + id INT AUTO_INCREMENT NOT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + + ALTER TABLE users_phonenumbers ADD FOREIGN KEY (user_id) REFERENCES User(id); + ALTER TABLE users_phonenumbers ADD FOREIGN KEY (phonenumber_id) REFERENCES Phonenumber(id); + +One-To-Many, Self-referencing +----------------------------- + +You can also setup a one-to-many association that is +self-referencing. In this example we setup a hierarchy of +``Category`` objects by creating a self referencing relationship. +This effectively models a hierarchy of categories and from the +database perspective is known as an adjacency list approach. + +.. configuration-block:: + + .. code-block:: php + + children = new \Doctrine\Common\Collections\ArrayCollection(); + } + } + + .. code-block:: xml + + + + + + + + + .. code-block:: yaml + + Category: + type: entity + oneToMany: + children: + targetEntity: Category + mappedBy: parent + manyToOne: + parent: + targetEntity: Category + inversedBy: children + +Note that the @JoinColumn is not really necessary in this example, +as the defaults would be the same. + +Generated MySQL Schema: + +.. code-block:: sql + + CREATE TABLE Category ( + id INT AUTO_INCREMENT NOT NULL, + parent_id INT DEFAULT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + ALTER TABLE Category ADD FOREIGN KEY (parent_id) REFERENCES Category(id); + +Many-To-Many, Unidirectional +---------------------------- + +Real many-to-many associations are less common. The following +example shows a unidirectional association between User and Group +entities: + +.. configuration-block:: + + .. code-block:: php + + groups = new \Doctrine\Common\Collections\ArrayCollection(); + } + } + + /** @Entity **/ + class Group + { + // ... + } + + .. code-block:: xml + + + + + + + + + + + + + + + + + .. code-block:: yaml + + User: + type: entity + manyToMany: + groups: + targetEntity: Group + joinTable: + name: users_groups + joinColumns: + user_id: + referencedColumnName: id + inverseJoinColumns: + group_id: + referencedColumnName: id + +Generated MySQL Schema: + +.. code-block:: sql + + CREATE TABLE User ( + id INT AUTO_INCREMENT NOT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + CREATE TABLE users_groups ( + user_id INT NOT NULL, + group_id INT NOT NULL, + PRIMARY KEY(user_id, group_id) + ) ENGINE = InnoDB; + CREATE TABLE Group ( + id INT AUTO_INCREMENT NOT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + ALTER TABLE users_groups ADD FOREIGN KEY (user_id) REFERENCES User(id); + ALTER TABLE users_groups ADD FOREIGN KEY (group_id) REFERENCES Group(id); + +.. note:: + + Why are many-to-many associations less common? Because + frequently you want to associate additional attributes with an + association, in which case you introduce an association class. + Consequently, the direct many-to-many association disappears and is + replaced by one-to-many/many-to-one associations between the 3 + participating classes. + +Many-To-Many, Bidirectional +--------------------------- + +Here is a similar many-to-many relationship as above except this +one is bidirectional. + +.. configuration-block:: + + .. code-block:: php + + groups = new \Doctrine\Common\Collections\ArrayCollection(); + } + + // ... + } + + /** @Entity **/ + class Group + { + // ... + /** + * @ManyToMany(targetEntity="User", mappedBy="groups") + **/ + private $users; + + public function __construct() { + $this->users = new \Doctrine\Common\Collections\ArrayCollection(); + } + + // ... + } + + .. code-block:: xml + + + + + + + + + + + + + + + + + + + + + .. code-block:: yaml + + User: + type: entity + manyToMany: + groups: + targetEntity: Group + inversedBy: users + joinTable: + name: users_groups + joinColumns: + user_id: + referencedColumnName: id + inverseJoinColumns: + group_id: + referencedColumnName: id + + Group: + type: entity + manyToMany: + users: + targetEntity: User + mappedBy: groups + +The MySQL schema is exactly the same as for the Many-To-Many +uni-directional case above. + +Owning and Inverse Side on a ManyToMany association +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For Many-To-Many associations you can chose which entity is the +owning and which the inverse side. There is a very simple semantic +rule to decide which side is more suitable to be the owning side +from a developers perspective. You only have to ask yourself, which +entity is responsible for the connection management and pick that +as the owning side. + +Take an example of two entities ``Article`` and ``Tag``. Whenever +you want to connect an Article to a Tag and vice-versa, it is +mostly the Article that is responsible for this relation. Whenever +you add a new article, you want to connect it with existing or new +tags. Your create Article form will probably support this notion +and allow to specify the tags directly. This is why you should pick +the Article as owning side, as it makes the code more +understandable: + +.. code-block:: php + + addArticle($this); // synchronously updating inverse side + $this->tags[] = $tag; + } + } + + class Tag + { + private $articles; + + public function addArticle(Article $article) + { + $this->articles[] = $article; + } + } + +This allows to group the tag adding on the ``Article`` side of the +association: + +.. code-block:: php + + addTag($tagA); + $article->addTag($tagB); + +Many-To-Many, Self-referencing +------------------------------ + +You can even have a self-referencing many-to-many association. A +common scenario is where a ``User`` has friends and the target +entity of that relationship is a ``User`` so it is self +referencing. In this example it is bidirectional so ``User`` has a +field named ``$friendsWithMe`` and ``$myFriends``. + +.. code-block:: php + + friendsWithMe = new \Doctrine\Common\Collections\ArrayCollection(); + $this->myFriends = new \Doctrine\Common\Collections\ArrayCollection(); + } + + // ... + } + +Generated MySQL Schema: + +.. code-block:: sql + + CREATE TABLE User ( + id INT AUTO_INCREMENT NOT NULL, + PRIMARY KEY(id) + ) ENGINE = InnoDB; + CREATE TABLE friends ( + user_id INT NOT NULL, + friend_user_id INT NOT NULL, + PRIMARY KEY(user_id, friend_user_id) + ) ENGINE = InnoDB; + ALTER TABLE friends ADD FOREIGN KEY (user_id) REFERENCES User(id); + ALTER TABLE friends ADD FOREIGN KEY (friend_user_id) REFERENCES User(id); + +.. _association_mapping_defaults: + +Mapping Defaults +---------------- + +The ``@JoinColumn`` and ``@JoinTable`` definitions are usually optional and have +sensible default values. The defaults for a join column in a +one-to-one/many-to-one association is as follows: + +:: + + name: "_id" + referencedColumnName: "id" + +As an example, consider this mapping: + +.. configuration-block:: + + .. code-block:: php + + + + + + + + .. code-block:: yaml + + Product: + type: entity + oneToOne: + shipping: + targetEntity: Shipping + +This is essentially the same as the following, more verbose, +mapping: + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + .. code-block:: yaml + + Product: + type: entity + oneToOne: + shipping: + targetEntity: Shipping + joinColumn: + name: shipping_id + referencedColumnName: id + +The @JoinTable definition used for many-to-many mappings has +similar defaults. As an example, consider this mapping: + +.. configuration-block:: + + .. code-block:: php + + + + + + + + .. code-block:: yaml + + User: + type: entity + manyToMany: + groups: + targetEntity: Group + +This is essentially the same as the following, more verbose, mapping: + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + + + + + + + + .. code-block:: yaml + + User: + type: entity + manyToMany: + groups: + targetEntity: Group + joinTable: + name: User_Group + joinColumns: + User_id: + referencedColumnName: id + inverseJoinColumns: + Group_id: + referencedColumnName: id + +In that case, the name of the join table defaults to a combination +of the simple, unqualified class names of the participating +classes, separated by an underscore character. The names of the +join columns default to the simple, unqualified class name of the +targeted class followed by "\_id". The referencedColumnName always +defaults to "id", just as in one-to-one or many-to-one mappings. + +If you accept these defaults, you can reduce the mapping code to a +minimum. + +.. _collections: + +Collections +----------- + +Unfortunately, PHP arrays, while being great for many things, are missing +features that make them suitable for lazy loading in the context of an ORM. +This is why in all the examples of many-valued associations in this manual we +will make use of a ``Collection`` interface and its +default implementation ``ArrayCollection`` that are both defined in the +``Doctrine\Common\Collections`` namespace. A collection implements +the PHP interfaces ``ArrayAccess``, ``Traversable`` and ``Countable``. + +.. note:: + + The Collection interface and ArrayCollection class, + like everything else in the Doctrine namespace, are neither part of + the ORM, nor the DBAL, it is a plain PHP class that has no outside + dependencies apart from dependencies on PHP itself (and the SPL). + Therefore using this class in your model and elsewhere + does not introduce a coupling to the ORM. + +Initializing Collections +------------------------ + +You should always initialize the collections of your ``@OneToMany`` +and ``@ManyToMany`` associations in the constructor of your entities: + +.. code-block:: php + + groups = new ArrayCollection(); + } + + public function getGroups() + { + return $this->groups; + } + } + +The following code will then work even if the Entity hasn't +been associated with an EntityManager yet: + +.. code-block:: php + + getGroups()->add($group); diff --git a/vendor/doctrine/orm/docs/en/reference/basic-mapping.rst b/vendor/doctrine/orm/docs/en/reference/basic-mapping.rst new file mode 100644 index 0000000000000000000000000000000000000000..4ece67666bb148cf4b008bbf9c28e375201e7805 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/basic-mapping.rst @@ -0,0 +1,499 @@ +Basic Mapping +============= + +This guide explains the basic mapping of entities and properties. +After working through this guide you should know: + +- How to create PHP objects that can be saved to the database with Doctrine; +- How to configure the mapping between columns on tables and properties on + entities; +- What Doctrine mapping types are; +- Defining primary keys and how identifiers are generated by Doctrine; +- How quoting of reserved symbols works in Doctrine. + +Mapping of associations will be covered in the next chapter on +:doc:`Association Mapping `. + +Guide Assumptions +----------------- + +You should have already :doc:`installed and configure ` +Doctrine. + +Creating Classes for the Database +--------------------------------- + +Every PHP object that you want to save in the database using Doctrine +is called an "Entity". The term "Entity" describes objects +that have an identity over many independent requests. This identity is +usually achieved by assigning a unique identifier to an entity. +In this tutorial the following ``Message`` PHP class will serve as the +example Entity: + +.. code-block:: php + + ` +- :doc:`XML ` +- :doc:`YAML ` +- :doc:`PHP code ` + +This manual will usually show mapping metadata via docblock annotations, though +many examples also show the equivalent configuration in YAML and XML. + +.. note:: + + All metadata drivers perform equally. Once the metadata of a class has been + read from the source (annotations, xml or yaml) it is stored in an instance + of the ``Doctrine\ORM\Mapping\ClassMetadata`` class and these instances are + stored in the metadata cache. If you're not using a metadata cache (not + recommended!) then the XML driver is the fastest. + +Marking our ``Message`` class as an entity for Doctrine is straightforward: + +.. configuration-block:: + + .. code-block:: php + + + + + + + + .. code-block:: yaml + + Message: + type: entity + # ... + +With no additional information, Doctrine expects the entity to be saved +into a table with the same name as the class in our case ``Message``. +You can change this by configuring information about the table: + +.. configuration-block:: + + .. code-block:: php + + + + + + + + .. code-block:: yaml + + Message: + type: entity + table: message + # ... + +Now the class ``Message`` will be saved and fetched from the table ``message``. + +Property Mapping +---------------- + +The next step after marking a PHP class as an entity is mapping its properties +to columns in a table. + +To configure a property use the ``@Column`` docblock annotation. The ``type`` +attribute specifies the :ref:`Doctrine Mapping Type ` +to use for the field. If the type is not specified, ``string`` is used as the +default. + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + .. code-block:: yaml + + Message: + type: entity + fields: + id: + type: integer + text: + length: 140 + postedAt: + type: datetime + column: posted_at + +When we don't explicitly specify a column name via the ``name`` option, Doctrine +assumes the field name is also the column name. This means that: + +* the ``id`` property will map to the column ``id`` using the type ``integer``; +* the ``text`` property will map to the column ``text`` with the default mapping type ``string``; +* the ``postedAt`` property will map to the ``posted_at`` column with the ``datetime`` type. + +The Column annotation has some more attributes. Here is a complete +list: + +- ``type``: (optional, defaults to 'string') The mapping type to + use for the column. +- ``name``: (optional, defaults to field name) The name of the + column in the database. +- ``length``: (optional, default 255) The length of the column in + the database. (Applies only if a string-valued column is used). +- ``unique``: (optional, default FALSE) Whether the column is a + unique key. +- ``nullable``: (optional, default FALSE) Whether the database + column is nullable. +- ``precision``: (optional, default 0) The precision for a decimal + (exact numeric) column (applies only for decimal column), + which is the maximum number of digits that are stored for the values. +- ``scale``: (optional, default 0) The scale for a decimal (exact + numeric) column (applies only for decimal column), which represents + the number of digits to the right of the decimal point and must + not be greater than *precision*. +- ``columnDefinition``: (optional) Allows to define a custom + DDL snippet that is used to create the column. Warning: This normally + confuses the SchemaTool to always detect the column as changed. +- ``options``: (optional) Key-value pairs of options that get passed + to the underlying database platform when generating DDL statements. + +.. _reference-mapping-types: + +Doctrine Mapping Types +---------------------- + +The ``type`` option used in the ``@Column`` accepts any of the existing +Doctrine types or even your own custom types. A Doctrine type defines +the conversion between PHP and SQL types, independent from the database vendor +you are using. All Mapping Types that ship with Doctrine are fully portable +between the supported database systems. + +As an example, the Doctrine Mapping Type ``string`` defines the +mapping from a PHP string to a SQL VARCHAR (or VARCHAR2 etc. +depending on the RDBMS brand). Here is a quick overview of the +built-in mapping types: + +- ``string``: Type that maps a SQL VARCHAR to a PHP string. +- ``integer``: Type that maps a SQL INT to a PHP integer. +- ``smallint``: Type that maps a database SMALLINT to a PHP + integer. +- ``bigint``: Type that maps a database BIGINT to a PHP string. +- ``boolean``: Type that maps a SQL boolean or equivalent (TINYINT) to a PHP boolean. +- ``decimal``: Type that maps a SQL DECIMAL to a PHP string. +- ``date``: Type that maps a SQL DATETIME to a PHP DateTime + object. +- ``time``: Type that maps a SQL TIME to a PHP DateTime object. +- ``datetime``: Type that maps a SQL DATETIME/TIMESTAMP to a PHP + DateTime object. +- ``datetimetz``: Type that maps a SQL DATETIME/TIMESTAMP to a PHP + DateTime object with timezone. +- ``text``: Type that maps a SQL CLOB to a PHP string. +- ``object``: Type that maps a SQL CLOB to a PHP object using + ``serialize()`` and ``unserialize()`` +- ``array``: Type that maps a SQL CLOB to a PHP array using + ``serialize()`` and ``unserialize()`` +- ``simple_array``: Type that maps a SQL CLOB to a PHP array using + ``implode()`` and ``explode()``, with a comma as delimiter. *IMPORTANT* + Only use this type if you are sure that your values cannot contain a ",". +- ``json_array``: Type that maps a SQL CLOB to a PHP array using + ``json_encode()`` and ``json_decode()`` +- ``float``: Type that maps a SQL Float (Double Precision) to a + PHP double. *IMPORTANT*: Works only with locale settings that use + decimal points as separator. +- ``guid``: Type that maps a database GUID/UUID to a PHP string. Defaults to + varchar but uses a specific type if the platform supports it. +- ``blob``: Type that maps a SQL BLOB to a PHP resource stream + +A cookbook article shows how to define :doc:`your own custom mapping types +<../cookbook/custom-mapping-types>`. + +.. note:: + + DateTime and Object types are compared by reference, not by value. Doctrine + updates this values if the reference changes and therefore behaves as if + these objects are immutable value objects. + +.. warning:: + + All Date types assume that you are exclusively using the default timezone + set by `date_default_timezone_set() `_ + or by the php.ini configuration ``date.timezone``. Working with + different timezones will cause troubles and unexpected behavior. + + If you need specific timezone handling you have to handle this + in your domain, converting all the values back and forth from UTC. + There is also a :doc:`cookbook entry <../cookbook/working-with-datetime>` + on working with datetimes that gives hints for implementing + multi timezone applications. + +Identifiers / Primary Keys +-------------------------- + +Every entity class must have an identifier/primary key. You can select +the field that serves as the identifier with the ``@Id`` +annotation. + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + + .. code-block:: yaml + + Message: + type: entity + id: + id: + type: integer + generator: + strategy: AUTO + fields: + # fields here + +In most cases using the automatic generator strategy (``@GeneratedValue``) is +what you want. It defaults to the identifier generation mechanism your current +database vendor prefers: AUTO_INCREMENT with MySQL, SERIAL with PostgreSQL, +Sequences with Oracle and so on. + +Identifier Generation Strategies +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The previous example showed how to use the default identifier +generation strategy without knowing the underlying database with +the AUTO-detection strategy. It is also possible to specify the +identifier generation strategy more explicitly, which allows you to +make use of some additional features. + +Here is the list of possible generation strategies: + +- ``AUTO`` (default): Tells Doctrine to pick the strategy that is + preferred by the used database platform. The preferred strategies + are IDENTITY for MySQL, SQLite, MsSQL and SQL Anywhere and SEQUENCE + for Oracle and PostgreSQL. This strategy provides full portability. +- ``SEQUENCE``: Tells Doctrine to use a database sequence for ID + generation. This strategy does currently not provide full + portability. Sequences are supported by Oracle, PostgreSql and + SQL Anywhere. +- ``IDENTITY``: Tells Doctrine to use special identity columns in + the database that generate a value on insertion of a row. This + strategy does currently not provide full portability and is + supported by the following platforms: MySQL/SQLite/SQL Anywhere + (AUTO\_INCREMENT), MSSQL (IDENTITY) and PostgreSQL (SERIAL). +- ``TABLE``: Tells Doctrine to use a separate table for ID + generation. This strategy provides full portability. + ***This strategy is not yet implemented!*** +- ``NONE``: Tells Doctrine that the identifiers are assigned (and + thus generated) by your code. The assignment must take place before + a new entity is passed to ``EntityManager#persist``. NONE is the + same as leaving off the @GeneratedValue entirely. + +Sequence Generator +^^^^^^^^^^^^^^^^^^ + +The Sequence Generator can currently be used in conjunction with +Oracle or Postgres and allows some additional configuration options +besides specifying the sequence's name: + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + + .. code-block:: yaml + + Message: + type: entity + id: + id: + type: integer + generator: + strategy: SEQUENCE + sequenceGenerator: + sequenceName: message_seq + allocationSize: 100 + initialValue: 1 + +The initial value specifies at which value the sequence should +start. + +The allocationSize is a powerful feature to optimize INSERT +performance of Doctrine. The allocationSize specifies by how much +values the sequence is incremented whenever the next value is +retrieved. If this is larger than 1 (one) Doctrine can generate +identifier values for the allocationSizes amount of entities. In +the above example with ``allocationSize=100`` Doctrine 2 would only +need to access the sequence once to generate the identifiers for +100 new entities. + +*The default allocationSize for a @SequenceGenerator is currently 10.* + +.. caution:: + + The allocationSize is detected by SchemaTool and + transformed into an "INCREMENT BY " clause in the CREATE SEQUENCE + statement. For a database schema created manually (and not + SchemaTool) you have to make sure that the allocationSize + configuration option is never larger than the actual sequences + INCREMENT BY value, otherwise you may get duplicate keys. + + +.. note:: + + It is possible to use strategy="AUTO" and at the same time + specifying a @SequenceGenerator. In such a case, your custom + sequence settings are used in the case where the preferred strategy + of the underlying platform is SEQUENCE, such as for Oracle and + PostgreSQL. + + +Composite Keys +~~~~~~~~~~~~~~ + +with Doctrine 2 you can use composite primary keys, using ``@Id`` on more then +one column. Some restrictions exist opposed to using a single identifier in +this case: The use of the ``@GeneratedValue`` annotation is not supported, +which means you can only use composite keys if you generate the primary key +values yourself before calling ``EntityManager#persist()`` on the entity. + +More details on composite primary keys are discussed in a :doc:`dedicated tutorial +<../tutorials/composite-primary-keys>`. + +Quoting Reserved Words +---------------------- + +Sometimes it is necessary to quote a column or table name because of reserved +word conflicts. Doctrine does not quote identifiers automatically, because it +leads to more problems than it would solve. Quoting tables and column names +needs to be done explicitly using ticks in the definition. + +.. code-block:: php + + setQuoteStrategy(new AnsiQuoteStrategy()); diff --git a/vendor/doctrine/orm/docs/en/reference/batch-processing.rst b/vendor/doctrine/orm/docs/en/reference/batch-processing.rst new file mode 100644 index 0000000000000000000000000000000000000000..5d3cf18878190d36343bf4ee005400ed51838766 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/batch-processing.rst @@ -0,0 +1,187 @@ +Batch Processing +================ + +This chapter shows you how to accomplish bulk inserts, updates and +deletes with Doctrine in an efficient way. The main problem with +bulk operations is usually not to run out of memory and this is +especially what the strategies presented here provide help with. + +.. warning:: + + An ORM tool is not primarily well-suited for mass + inserts, updates or deletions. Every RDBMS has its own, most + effective way of dealing with such operations and if the options + outlined below are not sufficient for your purposes we recommend + you use the tools for your particular RDBMS for these bulk + operations. + + +Bulk Inserts +------------ + +Bulk inserts in Doctrine are best performed in batches, taking +advantage of the transactional write-behind behavior of an +``EntityManager``. The following code shows an example for +inserting 10000 objects with a batch size of 20. You may need to +experiment with the batch size to find the size that works best for +you. Larger batch sizes mean more prepared statement reuse +internally but also mean more work during ``flush``. + +.. code-block:: php + + setStatus('user'); + $user->setUsername('user' . $i); + $user->setName('Mr.Smith-' . $i); + $em->persist($user); + if (($i % $batchSize) === 0) { + $em->flush(); + $em->clear(); // Detaches all objects from Doctrine! + } + } + $em->flush(); //Persist objects that did not make up an entire batch + $em->clear(); + +Bulk Updates +------------ + +There are 2 possibilities for bulk updates with Doctrine. + +DQL UPDATE +~~~~~~~~~~ + +The by far most efficient way for bulk updates is to use a DQL +UPDATE query. Example: + +.. code-block:: php + + createQuery('update MyProject\Model\Manager m set m.salary = m.salary * 0.9'); + $numUpdated = $q->execute(); + +Iterating results +~~~~~~~~~~~~~~~~~ + +An alternative solution for bulk updates is to use the +``Query#iterate()`` facility to iterate over the query results step +by step instead of loading the whole result into memory at once. +The following example shows how to do this, combining the iteration +with the batching strategy that was already used for bulk inserts: + +.. code-block:: php + + createQuery('select u from MyProject\Model\User u'); + $iterableResult = $q->iterate(); + foreach ($iterableResult as $row) { + $user = $row[0]; + $user->increaseCredit(); + $user->calculateNewBonuses(); + if (($i % $batchSize) === 0) { + $em->flush(); // Executes all updates. + $em->clear(); // Detaches all objects from Doctrine! + } + ++$i; + } + $em->flush(); + +.. note:: + + Iterating results is not possible with queries that + fetch-join a collection-valued association. The nature of such SQL + result sets is not suitable for incremental hydration. + +.. note:: + + Results may be fully buffered by the database client/ connection allocating + additional memory not visible to the PHP process. For large sets this + may easily kill the process for no apparant reason. + + +Bulk Deletes +------------ + +There are two possibilities for bulk deletes with Doctrine. You can +either issue a single DQL DELETE query or you can iterate over +results removing them one at a time. + +DQL DELETE +~~~~~~~~~~ + +The by far most efficient way for bulk deletes is to use a DQL +DELETE query. + +Example: + +.. code-block:: php + + createQuery('delete from MyProject\Model\Manager m where m.salary > 100000'); + $numDeleted = $q->execute(); + +Iterating results +~~~~~~~~~~~~~~~~~ + +An alternative solution for bulk deletes is to use the +``Query#iterate()`` facility to iterate over the query results step +by step instead of loading the whole result into memory at once. +The following example shows how to do this: + +.. code-block:: php + + createQuery('select u from MyProject\Model\User u'); + $iterableResult = $q->iterate(); + while (($row = $iterableResult->next()) !== false) { + $em->remove($row[0]); + if (($i % $batchSize) === 0) { + $em->flush(); // Executes all deletions. + $em->clear(); // Detaches all objects from Doctrine! + } + ++$i; + } + $em->flush(); + +.. note:: + + Iterating results is not possible with queries that + fetch-join a collection-valued association. The nature of such SQL + result sets is not suitable for incremental hydration. + + +Iterating Large Results for Data-Processing +------------------------------------------- + +You can use the ``iterate()`` method just to iterate over a large +result and no UPDATE or DELETE intention. The ``IterableResult`` +instance returned from ``$query->iterate()`` implements the +Iterator interface so you can process a large result without memory +problems using the following approach: + +.. code-block:: php + + _em->createQuery('select u from MyProject\Model\User u'); + $iterableResult = $q->iterate(); + foreach ($iterableResult as $row) { + // do stuff with the data in the row, $row[0] is always the object + + // detach from Doctrine, so that it can be Garbage-Collected immediately + $this->_em->detach($row[0]); + } + +.. note:: + + Iterating results is not possible with queries that + fetch-join a collection-valued association. The nature of such SQL + result sets is not suitable for incremental hydration. + + + diff --git a/vendor/doctrine/orm/docs/en/reference/best-practices.rst b/vendor/doctrine/orm/docs/en/reference/best-practices.rst new file mode 100644 index 0000000000000000000000000000000000000000..6937e99b18d1eca4f798f9409fd73c6990ff8482 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/best-practices.rst @@ -0,0 +1,111 @@ +Best Practices +============== + +The best practices mentioned here that affect database +design generally refer to best practices when working with Doctrine +and do not necessarily reflect best practices for database design +in general. + +Constrain relationships as much as possible +------------------------------------------- + +It is important to constrain relationships as much as possible. +This means: + + +- Impose a traversal direction (avoid bidirectional associations + if possible) +- Eliminate nonessential associations + +This has several benefits: + + +- Reduced coupling in your domain model +- Simpler code in your domain model (no need to maintain + bidirectionality properly) +- Less work for Doctrine + +Avoid composite keys +-------------------- + +Even though Doctrine fully supports composite keys it is best not +to use them if possible. Composite keys require additional work by +Doctrine and thus have a higher probability of errors. + +Use events judiciously +---------------------- + +The event system of Doctrine is great and fast. Even though making +heavy use of events, especially lifecycle events, can have a +negative impact on the performance of your application. Thus you +should use events judiciously. + +Use cascades judiciously +------------------------ + +Automatic cascades of the persist/remove/merge/etc. operations are +very handy but should be used wisely. Do NOT simply add all +cascades to all associations. Think about which cascades actually +do make sense for you for a particular association, given the +scenarios it is most likely used in. + +Don't use special characters +---------------------------- + +Avoid using any non-ASCII characters in class, field, table or +column names. Doctrine itself is not unicode-safe in many places +and will not be until PHP itself is fully unicode-aware (PHP6). + +Don't use identifier quoting +---------------------------- + +Identifier quoting is a workaround for using reserved words that +often causes problems in edge cases. Do not use identifier quoting +and avoid using reserved words as table or column names. + +Initialize collections in the constructor +----------------------------------------- + +It is recommended best practice to initialize any business +collections in entities in the constructor. Example: + +.. code-block:: php + + addresses = new ArrayCollection; + $this->articles = new ArrayCollection; + } + } + +Don't map foreign keys to fields in an entity +--------------------------------------------- + +Foreign keys have no meaning whatsoever in an object model. Foreign +keys are how a relational database establishes relationships. Your +object model establishes relationships through object references. +Thus mapping foreign keys to object fields heavily leaks details of +the relational model into the object model, something you really +should not do. + +Use explicit transaction demarcation +------------------------------------ + +While Doctrine will automatically wrap all DML operations in a +transaction on flush(), it is considered best practice to +explicitly set the transaction boundaries yourself. Otherwise every +single query is wrapped in a small transaction (Yes, SELECT +queries, too) since you can not talk to your database outside of a +transaction. While such short transactions for read-only (SELECT) +queries generally don't have any noticeable performance impact, it +is still preferable to use fewer, well-defined transactions that +are established through explicit transaction boundaries. + + diff --git a/vendor/doctrine/orm/docs/en/reference/caching.rst b/vendor/doctrine/orm/docs/en/reference/caching.rst new file mode 100644 index 0000000000000000000000000000000000000000..68813493c00ad65a5c5e33ce2844527ed02a9b31 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/caching.rst @@ -0,0 +1,420 @@ +Caching +======= + +Doctrine provides cache drivers in the ``Common`` package for some +of the most popular caching implementations such as APC, Memcache +and Xcache. We also provide an ``ArrayCache`` driver which stores +the data in a PHP array. Obviously, when using ``ArrayCache``, the +cache does not persist between requests, but this is useful for +testing in a development environment. + +Cache Drivers +------------- + +The cache drivers follow a simple interface that is defined in +``Doctrine\Common\Cache\Cache``. All the cache drivers extend a +base class ``Doctrine\Common\Cache\AbstractCache`` which implements +this interface. + +The interface defines the following public methods for you to implement: + + +- fetch($id) - Fetches an entry from the cache +- contains($id) - Test if an entry exists in the cache +- save($id, $data, $lifeTime = false) - Puts data into the cache +- delete($id) - Deletes a cache entry + +Each driver extends the ``AbstractCache`` class which defines a few +abstract protected methods that each of the drivers must +implement: + + +- \_doFetch($id) +- \_doContains($id) +- \_doSave($id, $data, $lifeTime = false) +- \_doDelete($id) + +The public methods ``fetch()``, ``contains()`` etc. use the +above protected methods which are implemented by the drivers. The +code is organized this way so that the protected methods in the +drivers do the raw interaction with the cache implementation and +the ``AbstractCache`` can build custom functionality on top of +these methods. + +APC +~~~ + +In order to use the APC cache driver you must have it compiled and +enabled in your php.ini. You can read about APC +`in the PHP Documentation `_. It will give +you a little background information about what it is and how you +can use it as well as how to install it. + +Below is a simple example of how you could use the APC cache driver +by itself. + +.. code-block:: php + + save('cache_id', 'my_data'); + +Memcache +~~~~~~~~ + +In order to use the Memcache cache driver you must have it compiled +and enabled in your php.ini. You can read about Memcache +`on the PHP website `_. It will +give you a little background information about what it is and how +you can use it as well as how to install it. + +Below is a simple example of how you could use the Memcache cache +driver by itself. + +.. code-block:: php + + connect('memcache_host', 11211); + + $cacheDriver = new \Doctrine\Common\Cache\MemcacheCache(); + $cacheDriver->setMemcache($memcache); + $cacheDriver->save('cache_id', 'my_data'); + +Memcached +~~~~~~~~ + +Memcached is a more recent and complete alternative extension to +Memcache. + +In order to use the Memcached cache driver you must have it compiled +and enabled in your php.ini. You can read about Memcached +`on the PHP website `_. It will +give you a little background information about what it is and how +you can use it as well as how to install it. + +Below is a simple example of how you could use the Memcached cache +driver by itself. + +.. code-block:: php + + addServer('memcache_host', 11211); + + $cacheDriver = new \Doctrine\Common\Cache\MemcachedCache(); + $cacheDriver->setMemcached($memcached); + $cacheDriver->save('cache_id', 'my_data'); + +Xcache +~~~~~~ + +In order to use the Xcache cache driver you must have it compiled +and enabled in your php.ini. You can read about Xcache +`here `_. It will give you a little +background information about what it is and how you can use it as +well as how to install it. + +Below is a simple example of how you could use the Xcache cache +driver by itself. + +.. code-block:: php + + save('cache_id', 'my_data'); + +Redis +~~~~~ + +In order to use the Redis cache driver you must have it compiled +and enabled in your php.ini. You can read about what Redis is +`from here `_. Also check +`A PHP extension for Redis `_ for how you can use +and install the Redis PHP extension. + +Below is a simple example of how you could use the Redis cache +driver by itself. + +.. code-block:: php + + connect('redis_host', 6379); + + $cacheDriver = new \Doctrine\Common\Cache\RedisCache(); + $cacheDriver->setRedis($redis); + $cacheDriver->save('cache_id', 'my_data'); + +Using Cache Drivers +------------------- + +In this section we'll describe how you can fully utilize the API of +the cache drivers to save data to a cache, check if some cached data +exists, fetch the cached data and delete the cached data. We'll use the +``ArrayCache`` implementation as our example here. + +.. code-block:: php + + save('cache_id', 'my_data'); + +The ``save()`` method accepts three arguments which are described +below: + + +- ``$id`` - The cache id +- ``$data`` - The cache entry/data. +- ``$lifeTime`` - The lifetime. If != false, sets a specific + lifetime for this cache entry (null => infinite lifeTime). + +You can save any type of data whether it be a string, array, +object, etc. + +.. code-block:: php + + 'value1', + 'key2' => 'value2' + ); + $cacheDriver->save('my_array', $array); + +Checking +~~~~~~~~ + +Checking whether cached data exists is very simple: just use the +``contains()`` method. It accepts a single argument which is the ID +of the cache entry. + +.. code-block:: php + + contains('cache_id')) { + echo 'cache exists'; + } else { + echo 'cache does not exist'; + } + +Fetching +~~~~~~~~ + +Now if you want to retrieve some cache entry you can use the +``fetch()`` method. It also accepts a single argument just like +``contains()`` which is again the ID of the cache entry. + +.. code-block:: php + + fetch('my_array'); + +Deleting +~~~~~~~~ + +As you might guess, deleting is just as easy as saving, checking +and fetching. You can delete by an individual ID, or you can +delete all entries. + +By Cache ID +^^^^^^^^^^^ + +.. code-block:: php + + delete('my_array'); + +All +^^^ + +If you simply want to delete all cache entries you can do so with +the ``deleteAll()`` method. + +.. code-block:: php + + deleteAll(); + +Namespaces +~~~~~~~~~~ + +If you heavily use caching in your application and use it in +multiple parts of your application, or use it in different +applications on the same server you may have issues with cache +naming collisions. This can be worked around by using namespaces. +You can set the namespace a cache driver should use by using the +``setNamespace()`` method. + +.. code-block:: php + + setNamespace('my_namespace_'); + +Integrating with the ORM +------------------------ + +The Doctrine ORM package is tightly integrated with the cache +drivers to allow you to improve the performance of various aspects of +Doctrine by simply making some additional configurations and +method calls. + +Query Cache +~~~~~~~~~~~ + +It is highly recommended that in a production environment you cache +the transformation of a DQL query to its SQL counterpart. It +doesn't make sense to do this parsing multiple times as it doesn't +change unless you alter the DQL query. + +This can be done by configuring the query cache implementation to +use on your ORM configuration. + +.. code-block:: php + + setQueryCacheImpl(new \Doctrine\Common\Cache\ApcCache()); + +Result Cache +~~~~~~~~~~~~ + +The result cache can be used to cache the results of your queries +so that we don't have to query the database or hydrate the data +again after the first time. You just need to configure the result +cache implementation. + +.. code-block:: php + + setResultCacheImpl(new \Doctrine\Common\Cache\ApcCache()); + +Now when you're executing DQL queries you can configure them to use +the result cache. + +.. code-block:: php + + createQuery('select u from \Entities\User u'); + $query->useResultCache(true); + +You can also configure an individual query to use a different +result cache driver. + +.. code-block:: php + + setResultCacheDriver(new \Doctrine\Common\Cache\ApcCache()); + +.. note:: + + Setting the result cache driver on the query will + automatically enable the result cache for the query. If you want to + disable it pass false to ``useResultCache()``. + + :: + + useResultCache(false); + + +If you want to set the time the cache has to live you can use the +``setResultCacheLifetime()`` method. + +.. code-block:: php + + setResultCacheLifetime(3600); + +The ID used to store the result set cache is a hash which is +automatically generated for you if you don't set a custom ID +yourself with the ``setResultCacheId()`` method. + +.. code-block:: php + + setResultCacheId('my_custom_id'); + +You can also set the lifetime and cache ID by passing the values as +the second and third argument to ``useResultCache()``. + +.. code-block:: php + + useResultCache(true, 3600, 'my_custom_id'); + +Metadata Cache +~~~~~~~~~~~~~~ + +Your class metadata can be parsed from a few different sources like +YAML, XML, Annotations, etc. Instead of parsing this information on +each request we should cache it using one of the cache drivers. + +Just like the query and result cache we need to configure it +first. + +.. code-block:: php + + setMetadataCacheImpl(new \Doctrine\Common\Cache\ApcCache()); + +Now the metadata information will only be parsed once and stored in +the cache driver. + +Clearing the Cache +------------------ + +We've already shown you how you can use the API of the +cache drivers to manually delete cache entries. For your +convenience we offer command line tasks to help you with +clearing the query, result and metadata cache. + +From the Doctrine command line you can run the following commands: + +To clear the query cache use the ``orm:clear-cache:query`` task. + +.. code-block:: php + + $ ./doctrine orm:clear-cache:query + +To clear the metadata cache use the ``orm:clear-cache:metadata`` task. + +.. code-block:: php + + $ ./doctrine orm:clear-cache:metadata + +To clear the result cache use the ``orm:clear-cache:result`` task. + +.. code-block:: php + + $ ./doctrine orm:clear-cache:result + +All these tasks accept a ``--flush`` option to flush the entire +contents of the cache instead of invalidating the entries. + +Cache Slams +----------- + +Something to be careful of when using the cache drivers is +"cache slams". Imagine you have a heavily trafficked website with some +code that checks for the existence of a cache record and if it does +not exist it generates the information and saves it to the cache. +Now, if 100 requests were issued all at the same time and each one +sees the cache does not exist and they all try to insert the same +cache entry it could lock up APC, Xcache, etc. and cause problems. +Ways exist to work around this, like pre-populating your cache and +not letting your users' requests populate the cache. + +You can read more about cache slams +`in this blog post `_. + + diff --git a/vendor/doctrine/orm/docs/en/reference/change-tracking-policies.rst b/vendor/doctrine/orm/docs/en/reference/change-tracking-policies.rst new file mode 100644 index 0000000000000000000000000000000000000000..d0f099895fb2eb4cbbc75aefdcdd334ed065a824 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/change-tracking-policies.rst @@ -0,0 +1,151 @@ +Change Tracking Policies +======================== + +Change tracking is the process of determining what has changed in +managed entities since the last time they were synchronized with +the database. + +Doctrine provides 3 different change tracking policies, each having +its particular advantages and disadvantages. The change tracking +policy can be defined on a per-class basis (or more precisely, +per-hierarchy). + +Deferred Implicit +~~~~~~~~~~~~~~~~~ + +The deferred implicit policy is the default change tracking policy +and the most convenient one. With this policy, Doctrine detects the +changes by a property-by-property comparison at commit time and +also detects changes to entities or new entities that are +referenced by other managed entities ("persistence by +reachability"). Although the most convenient policy, it can have +negative effects on performance if you are dealing with large units +of work (see "Understanding the Unit of Work"). Since Doctrine +can't know what has changed, it needs to check all managed entities +for changes every time you invoke EntityManager#flush(), making +this operation rather costly. + +Deferred Explicit +~~~~~~~~~~~~~~~~~ + +The deferred explicit policy is similar to the deferred implicit +policy in that it detects changes through a property-by-property +comparison at commit time. The difference is that Doctrine 2 only +considers entities that have been explicitly marked for change detection +through a call to EntityManager#persist(entity) or through a save +cascade. All other entities are skipped. This policy therefore +gives improved performance for larger units of work while +sacrificing the behavior of "automatic dirty checking". + +Therefore, flush() operations are potentially cheaper with this +policy. The negative aspect this has is that if you have a rather +large application and you pass your objects through several layers +for processing purposes and business tasks you may need to track +yourself which entities have changed on the way so you can pass +them to EntityManager#persist(). + +This policy can be configured as follows: + +.. code-block:: php + + _listeners[] = $listener; + } + } + +Then, in each property setter of this class or derived classes, you +need to notify all the ``PropertyChangedListener`` instances. As an +example we add a convenience method on ``MyEntity`` that shows this +behaviour: + +.. code-block:: php + + _listeners) { + foreach ($this->_listeners as $listener) { + $listener->propertyChanged($this, $propName, $oldValue, $newValue); + } + } + } + + public function setData($data) + { + if ($data != $this->data) { + $this->_onPropertyChanged('data', $this->data, $data); + $this->data = $data; + } + } + } + +You have to invoke ``_onPropertyChanged`` inside every method that +changes the persistent state of ``MyEntity``. + +The check whether the new value is different from the old one is +not mandatory but recommended. That way you also have full control +over when you consider a property changed. + +The negative point of this policy is obvious: You need implement an +interface and write some plumbing code. But also note that we tried +hard to keep this notification functionality abstract. Strictly +speaking, it has nothing to do with the persistence layer and the +Doctrine ORM or DBAL. You may find that property notification +events come in handy in many other scenarios as well. As mentioned +earlier, the ``Doctrine\Common`` namespace is not that evil and +consists solely of very small classes and interfaces that have +almost no external dependencies (none to the DBAL and none to the +ORM) and that you can easily take with you should you want to swap +out the persistence layer. This change tracking policy does not +introduce a dependency on the Doctrine DBAL/ORM or the persistence +layer. + +The positive point and main advantage of this policy is its +effectiveness. It has the best performance characteristics of the 3 +policies with larger units of work and a flush() operation is very +cheap when nothing has changed. + + diff --git a/vendor/doctrine/orm/docs/en/reference/configuration.rst b/vendor/doctrine/orm/docs/en/reference/configuration.rst new file mode 100644 index 0000000000000000000000000000000000000000..5837f0f956d04f0c2dffca949485ae8cb2d2f27e --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/configuration.rst @@ -0,0 +1,141 @@ +Installation and Configuration +============================== + +Doctrine can be installed with `Composer `_. For +older versions we still have `PEAR packages +`_. + +Define the following requirement in your ``composer.json`` file: + +:: + + { + "require": { + "doctrine/orm": "*" + } + } + +Then call ``composer install`` from your command line. If you don't know +how Composer works, check out their `Getting Started +`_ to set up. + +Class loading +------------- + +Autoloading is taken care of by Composer. You just have to include the composer autoload file in your project: + +.. code-block:: php + + 'pdo_mysql', + 'user' => 'root', + 'password' => '', + 'dbname' => 'foo', + ); + + $config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode); + $entityManager = EntityManager::create($dbParams, $config); + +Or if you prefer XML: + +.. code-block:: php + + ` section. + +.. note:: + + You can learn more about the database connection configuration in the + `Doctrine DBAL connection configuration reference `_. + +Setting up the Commandline Tool +------------------------------- + +Doctrine ships with a number of command line tools that are very helpful +during development. You can call this command from the Composer binary +directory: + +.. code-block:: sh + + $ php vendor/bin/doctrine + +You need to register your applications EntityManager to the console tool +to make use of the tasks by creating a ``cli-config.php`` file with the +following content: + +On Doctrine 2.4 and above: + +.. code-block:: php + + new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()), + 'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em) + )); diff --git a/vendor/doctrine/orm/docs/en/reference/dql-doctrine-query-language.rst b/vendor/doctrine/orm/docs/en/reference/dql-doctrine-query-language.rst new file mode 100644 index 0000000000000000000000000000000000000000..ea5f60deb92ebed06e19f052c3004a3196e264b6 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/dql-doctrine-query-language.rst @@ -0,0 +1,1696 @@ +Doctrine Query Language +=========================== + +DQL stands for Doctrine Query Language and is an Object +Query Language derivate that is very similar to the Hibernate +Query Language (HQL) or the Java Persistence Query Language (JPQL). + +In essence, DQL provides powerful querying capabilities over your +object model. Imagine all your objects lying around in some storage +(like an object database). When writing DQL queries, think about +querying that storage to pick a certain subset of your objects. + +.. note:: + + A common mistake for beginners is to mistake DQL for + being just some form of SQL and therefore trying to use table names + and column names or join arbitrary tables together in a query. You + need to think about DQL as a query language for your object model, + not for your relational schema. + + +DQL is case in-sensitive, except for namespace, class and field +names, which are case sensitive. + +Types of DQL queries +-------------------- + +DQL as a query language has SELECT, UPDATE and DELETE constructs +that map to their corresponding SQL statement types. INSERT +statements are not allowed in DQL, because entities and their +relations have to be introduced into the persistence context +through ``EntityManager#persist()`` to ensure consistency of your +object model. + +DQL SELECT statements are a very powerful way of retrieving parts +of your domain model that are not accessible via associations. +Additionally they allow to retrieve entities and their associations +in one single SQL select statement which can make a huge difference +in performance in contrast to using several queries. + +DQL UPDATE and DELETE statements offer a way to execute bulk +changes on the entities of your domain model. This is often +necessary when you cannot load all the affected entities of a bulk +update into memory. + +SELECT queries +-------------- + +DQL SELECT clause +~~~~~~~~~~~~~~~~~ + +The select clause of a DQL query specifies what appears in the +query result. The composition of all the expressions in the select +clause also influences the nature of the query result. + +Here is an example that selects all users with an age > 20: + +.. code-block:: php + + createQuery('SELECT u FROM MyProject\Model\User u WHERE u.age > 20'); + $users = $query->getResult(); + +Lets examine the query: + + +- ``u`` is a so called identification variable or alias that + refers to the ``MyProject\Model\User`` class. By placing this alias + in the SELECT clause we specify that we want all instances of the + User class that are matched by this query to appear in the query + result. +- The FROM keyword is always followed by a fully-qualified class + name which in turn is followed by an identification variable or + alias for that class name. This class designates a root of our + query from which we can navigate further via joins (explained + later) and path expressions. +- The expression ``u.age`` in the WHERE clause is a path + expression. Path expressions in DQL are easily identified by the + use of the '.' operator that is used for constructing paths. The + path expression ``u.age`` refers to the ``age`` field on the User + class. + +The result of this query would be a list of User objects where all +users are older than 20. + +The SELECT clause allows to specify both class identification +variables that signal the hydration of a complete entity class or +just fields of the entity using the syntax ``u.name``. Combinations +of both are also allowed and it is possible to wrap both fields and +identification values into aggregation and DQL functions. Numerical +fields can be part of computations using mathematical operations. +See the sub-section on `Functions, Operators, Aggregates`_ for +more information. + +Joins +~~~~~ + +A SELECT query can contain joins. There are 2 types of JOINs: +"Regular" Joins and "Fetch" Joins. + +**Regular Joins**: Used to limit the results and/or compute +aggregate values. + +**Fetch Joins**: In addition to the uses of regular joins: Used to +fetch related entities and include them in the hydrated result of a +query. + +There is no special DQL keyword that distinguishes a regular join +from a fetch join. A join (be it an inner or outer join) becomes a +"fetch join" as soon as fields of the joined entity appear in the +SELECT part of the DQL query outside of an aggregate function. +Otherwise its a "regular join". + +Example: + +Regular join of the address: + +.. code-block:: php + + createQuery("SELECT u FROM User u JOIN u.address a WHERE a.city = 'Berlin'"); + $users = $query->getResult(); + +Fetch join of the address: + +.. code-block:: php + + createQuery("SELECT u, a FROM User u JOIN u.address a WHERE a.city = 'Berlin'"); + $users = $query->getResult(); + +When Doctrine hydrates a query with fetch-join it returns the class +in the FROM clause on the root level of the result array. In the +previous example an array of User instances is returned and the +address of each user is fetched and hydrated into the +``User#address`` variable. If you access the address Doctrine does +not need to lazy load the association with another query. + +.. note:: + + Doctrine allows you to walk all the associations between + all the objects in your domain model. Objects that were not already + loaded from the database are replaced with lazy load proxy + instances. Non-loaded Collections are also replaced by lazy-load + instances that fetch all the contained objects upon first access. + However relying on the lazy-load mechanism leads to many small + queries executed against the database, which can significantly + affect the performance of your application. **Fetch Joins** are the + solution to hydrate most or all of the entities that you need in a + single SELECT query. + + +Named and Positional Parameters +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +DQL supports both named and positional parameters, however in +contrast to many SQL dialects positional parameters are specified +with numbers, for example "?1", "?2" and so on. Named parameters +are specified with ":name1", ":name2" and so on. + +When referencing the parameters in ``Query#setParameter($param, $value)`` +both named and positional parameters are used **without** their prefixes. + +DQL SELECT Examples +~~~~~~~~~~~~~~~~~~~ + +This section contains a large set of DQL queries and some +explanations of what is happening. The actual result also depends +on the hydration mode. + +Hydrate all User entities: + +.. code-block:: php + + createQuery('SELECT u FROM MyProject\Model\User u'); + $users = $query->getResult(); // array of User objects + +Retrieve the IDs of all CmsUsers: + +.. code-block:: php + + createQuery('SELECT u.id FROM CmsUser u'); + $ids = $query->getResult(); // array of CmsUser ids + +Retrieve the IDs of all users that have written an article: + +.. code-block:: php + + createQuery('SELECT DISTINCT u.id FROM CmsArticle a JOIN a.user u'); + $ids = $query->getResult(); // array of CmsUser ids + +Retrieve all articles and sort them by the name of the articles +users instance: + +.. code-block:: php + + createQuery('SELECT a FROM CmsArticle a JOIN a.user u ORDER BY u.name ASC'); + $articles = $query->getResult(); // array of CmsArticle objects + +Retrieve the Username and Name of a CmsUser: + +.. code-block:: php + + createQuery('SELECT u.username, u.name FROM CmsUser u'); + $users = $query->getResult(); // array of CmsUser username and name values + echo $users[0]['username']; + +Retrieve a ForumUser and his single associated entity: + +.. code-block:: php + + createQuery('SELECT u, a FROM ForumUser u JOIN u.avatar a'); + $users = $query->getResult(); // array of ForumUser objects with the avatar association loaded + echo get_class($users[0]->getAvatar()); + +Retrieve a CmsUser and fetch join all the phonenumbers he has: + +.. code-block:: php + + createQuery('SELECT u, p FROM CmsUser u JOIN u.phonenumbers p'); + $users = $query->getResult(); // array of CmsUser objects with the phonenumbers association loaded + $phonenumbers = $users[0]->getPhonenumbers(); + +Hydrate a result in Ascending: + +.. code-block:: php + + createQuery('SELECT u FROM ForumUser u ORDER BY u.id ASC'); + $users = $query->getResult(); // array of ForumUser objects + +Or in Descending Order: + +.. code-block:: php + + createQuery('SELECT u FROM ForumUser u ORDER BY u.id DESC'); + $users = $query->getResult(); // array of ForumUser objects + +Using Aggregate Functions: + +.. code-block:: php + + createQuery('SELECT COUNT(u.id) FROM Entities\User u'); + $count = $query->getSingleScalarResult(); + + $query = $em->createQuery('SELECT u, count(g.id) FROM Entities\User u JOIN u.groups g GROUP BY u.id'); + $result = $query->getResult(); + +With WHERE Clause and Positional Parameter: + +.. code-block:: php + + createQuery('SELECT u FROM ForumUser u WHERE u.id = ?1'); + $query->setParameter(1, 321); + $users = $query->getResult(); // array of ForumUser objects + +With WHERE Clause and Named Parameter: + +.. code-block:: php + + createQuery('SELECT u FROM ForumUser u WHERE u.username = :name'); + $query->setParameter('name', 'Bob'); + $users = $query->getResult(); // array of ForumUser objects + +With Nested Conditions in WHERE Clause: + +.. code-block:: php + + createQuery('SELECT u FROM ForumUser u WHERE (u.username = :name OR u.username = :name2) AND u.id = :id'); + $query->setParameters(array( + 'name' => 'Bob', + 'name2' => 'Alice', + 'id' => 321, + )); + $users = $query->getResult(); // array of ForumUser objects + +With COUNT DISTINCT: + +.. code-block:: php + + createQuery('SELECT COUNT(DISTINCT u.name) FROM CmsUser'); + $users = $query->getResult(); // array of ForumUser objects + +With Arithmetic Expression in WHERE clause: + +.. code-block:: php + + createQuery('SELECT u FROM CmsUser u WHERE ((u.id + 5000) * u.id + 3) < 10000000'); + $users = $query->getResult(); // array of ForumUser objects + +Retrieve user entities with Arithmetic Expression in ORDER clause, using the ``HIDDEN`` keyword: + +.. code-block:: php + + createQuery('SELECT u, u.posts_count + u.likes_count AS HIDDEN score FROM CmsUser u ORDER BY score'); + $users = $query->getResult(); // array of User objects + +Using a LEFT JOIN to hydrate all user-ids and optionally associated +article-ids: + +.. code-block:: php + + createQuery('SELECT u.id, a.id as article_id FROM CmsUser u LEFT JOIN u.articles a'); + $results = $query->getResult(); // array of user ids and every article_id for each user + +Restricting a JOIN clause by additional conditions: + +.. code-block:: php + + createQuery("SELECT u FROM CmsUser u LEFT JOIN u.articles a WITH a.topic LIKE :foo"); + $query->setParameter('foo', '%foo%'); + $users = $query->getResult(); + +Using several Fetch JOINs: + +.. code-block:: php + + createQuery('SELECT u, a, p, c FROM CmsUser u JOIN u.articles a JOIN u.phonenumbers p JOIN a.comments c'); + $users = $query->getResult(); + +BETWEEN in WHERE clause: + +.. code-block:: php + + createQuery('SELECT u.name FROM CmsUser u WHERE u.id BETWEEN ?1 AND ?2'); + $query->setParameter(1, 123); + $query->setParameter(2, 321); + $usernames = $query->getResult(); + +DQL Functions in WHERE clause: + +.. code-block:: php + + createQuery("SELECT u.name FROM CmsUser u WHERE TRIM(u.name) = 'someone'"); + $usernames = $query->getResult(); + +IN() Expression: + +.. code-block:: php + + createQuery('SELECT u.name FROM CmsUser u WHERE u.id IN(46)'); + $usernames = $query->getResult(); + + $query = $em->createQuery('SELECT u FROM CmsUser u WHERE u.id IN (1, 2)'); + $users = $query->getResult(); + + $query = $em->createQuery('SELECT u FROM CmsUser u WHERE u.id NOT IN (1)'); + $users = $query->getResult(); + +CONCAT() DQL Function: + +.. code-block:: php + + createQuery("SELECT u.id FROM CmsUser u WHERE CONCAT(u.name, 's') = ?1"); + $query->setParameter(1, 'Jess'); + $ids = $query->getResult(); + + $query = $em->createQuery('SELECT CONCAT(u.id, u.name) FROM CmsUser u WHERE u.id = ?1'); + $query->setParameter(1, 321); + $idUsernames = $query->getResult(); + +EXISTS in WHERE clause with correlated Subquery + +.. code-block:: php + + createQuery('SELECT u.id FROM CmsUser u WHERE EXISTS (SELECT p.phonenumber FROM CmsPhonenumber p WHERE p.user = u.id)'); + $ids = $query->getResult(); + +Get all users who are members of $group. + +.. code-block:: php + + createQuery('SELECT u.id FROM CmsUser u WHERE :groupId MEMBER OF u.groups'); + $query->setParameter('groupId', $group); + $ids = $query->getResult(); + +Get all users that have more than 1 phonenumber + +.. code-block:: php + + createQuery('SELECT u FROM CmsUser u WHERE SIZE(u.phonenumbers) > 1'); + $users = $query->getResult(); + +Get all users that have no phonenumber + +.. code-block:: php + + createQuery('SELECT u FROM CmsUser u WHERE u.phonenumbers IS EMPTY'); + $users = $query->getResult(); + +Get all instances of a specific type, for use with inheritance +hierarchies: + +.. versionadded:: 2.1 + +.. code-block:: php + + createQuery('SELECT u FROM Doctrine\Tests\Models\Company\CompanyPerson u WHERE u INSTANCE OF Doctrine\Tests\Models\Company\CompanyEmployee'); + $query = $em->createQuery('SELECT u FROM Doctrine\Tests\Models\Company\CompanyPerson u WHERE u INSTANCE OF ?1'); + $query = $em->createQuery('SELECT u FROM Doctrine\Tests\Models\Company\CompanyPerson u WHERE u NOT INSTANCE OF ?1'); + +Get all users visible on a given website that have chosen certain gender: + +.. versionadded:: 2.2 + +.. code-block:: php + + createQuery('SELECT u FROM User u WHERE u.gender IN (SELECT IDENTITY(agl.gender) FROM Site s JOIN s.activeGenderList agl WHERE s.id = ?1)'); + +.. versionadded:: 2.4 + +Starting with 2.4, the IDENTITY() DQL function also works for composite primary keys: + +.. code-block:: php + + createQuery("SELECT IDENTITY(c.location, 'latitude') AS latitude, IDENTITY(c.location, 'longitude') AS longitude FROM Checkpoint c WHERE c.user = ?1"); + +Joins between entities without associations were not possible until version +2.4, where you can generate an arbitrary join with the following syntax: + +.. code-block:: php + + createQuery('SELECT u FROM User u JOIN Blacklist b WITH u.email = b.email'); + +Partial Object Syntax +^^^^^^^^^^^^^^^^^^^^^ + +By default when you run a DQL query in Doctrine and select only a +subset of the fields for a given entity, you do not receive objects +back. Instead, you receive only arrays as a flat rectangular result +set, similar to how you would if you were just using SQL directly +and joining some data. + +If you want to select partial objects you can use the ``partial`` +DQL keyword: + +.. code-block:: php + + createQuery('SELECT partial u.{id, username} FROM CmsUser u'); + $users = $query->getResult(); // array of partially loaded CmsUser objects + +You use the partial syntax when joining as well: + +.. code-block:: php + + createQuery('SELECT partial u.{id, username}, partial a.{id, name} FROM CmsUser u JOIN u.articles a'); + $users = $query->getResult(); // array of partially loaded CmsUser objects + +"NEW" Operator Syntax +^^^^^^^^^^^^^^^^^^^^^ + +.. versionadded:: 2.4 + +Using the ``NEW`` operator you can construct Data Transfer Objects (DTOs) directly from DQL queries. + +- When using ``SELECT NEW`` you don't need to specify a mapped entity. +- You can specify any PHP class, it's only require that the constructor of this class matches the ``NEW`` statement. +- This approach involves determining exactly which columns you really need, + and instantiating data-transfer object that containing a constructor with those arguments. + +If you want to select data-transfer objects you should create a class: + +.. code-block:: php + + createQuery('SELECT NEW CustomerDTO(c.name, e.email, a.city) FROM Customer c JOIN c.email e JOIN c.address a'); + $users = $query->getResult(); // array of CustomerDTO + +.. code-block:: php + + createQuery('SELECT NEW CustomerDTO(c.name, e.email, a.city, SUM(o.value)) FROM Customer c JOIN c.email e JOIN c.address a JOIN c.orders o GROUP BY c'); + $users = $query->getResult(); // array of CustomerDTO + +Note that you can only pass scalar expressions to the constructor. + +Using INDEX BY +~~~~~~~~~~~~~~ + +The INDEX BY construct is nothing that directly translates into SQL +but that affects object and array hydration. After each FROM and +JOIN clause you specify by which field this class should be indexed +in the result. By default a result is incremented by numerical keys +starting with 0. However with INDEX BY you can specify any other +column to be the key of your result, it really only makes sense +with primary or unique fields though: + +.. code-block:: sql + + SELECT u.id, u.status, upper(u.name) nameUpper FROM User u INDEX BY u.id + JOIN u.phonenumbers p INDEX BY p.phonenumber + +Returns an array of the following kind, indexed by both user-id +then phonenumber-id: + +.. code-block:: php + + array + 0 => + array + 1 => + object(stdClass)[299] + public '__CLASS__' => string 'Doctrine\Tests\Models\CMS\CmsUser' (length=33) + public 'id' => int 1 + .. + 'nameUpper' => string 'ROMANB' (length=6) + 1 => + array + 2 => + object(stdClass)[298] + public '__CLASS__' => string 'Doctrine\Tests\Models\CMS\CmsUser' (length=33) + public 'id' => int 2 + ... + 'nameUpper' => string 'JWAGE' (length=5) + +UPDATE queries +-------------- + +DQL not only allows to select your Entities using field names, you +can also execute bulk updates on a set of entities using an +DQL-UPDATE query. The Syntax of an UPDATE query works as expected, +as the following example shows: + +.. code-block:: sql + + UPDATE MyProject\Model\User u SET u.password = 'new' WHERE u.id IN (1, 2, 3) + +References to related entities are only possible in the WHERE +clause and using sub-selects. + +.. warning:: + + DQL UPDATE statements are ported directly into a + Database UPDATE statement and therefore bypass any locking scheme, events + and do not increment the version column. Entities that are already + loaded into the persistence context will *NOT* be synced with the + updated database state. It is recommended to call + ``EntityManager#clear()`` and retrieve new instances of any + affected entity. + + +DELETE queries +-------------- + +DELETE queries can also be specified using DQL and their syntax is +as simple as the UPDATE syntax: + +.. code-block:: sql + + DELETE MyProject\Model\User u WHERE u.id = 4 + +The same restrictions apply for the reference of related entities. + +.. warning:: + + DQL DELETE statements are ported directly into a + Database DELETE statement and therefore bypass any events and checks for the + version column if they are not explicitly added to the WHERE clause + of the query. Additionally Deletes of specifies entities are *NOT* + cascaded to related entities even if specified in the metadata. + + +Functions, Operators, Aggregates +-------------------------------- + +DQL Functions +~~~~~~~~~~~~~ + +The following functions are supported in SELECT, WHERE and HAVING +clauses: + + +- IDENTITY(single\_association\_path\_expression [, fieldMapping]) - Retrieve the foreign key column of association of the owning side +- ABS(arithmetic\_expression) +- CONCAT(str1, str2) +- CURRENT\_DATE() - Return the current date +- CURRENT\_TIME() - Returns the current time +- CURRENT\_TIMESTAMP() - Returns a timestamp of the current date + and time. +- LENGTH(str) - Returns the length of the given string +- LOCATE(needle, haystack [, offset]) - Locate the first + occurrence of the substring in the string. +- LOWER(str) - returns the string lowercased. +- MOD(a, b) - Return a MOD b. +- SIZE(collection) - Return the number of elements in the + specified collection +- SQRT(q) - Return the square-root of q. +- SUBSTRING(str, start [, length]) - Return substring of given + string. +- TRIM([LEADING \| TRAILING \| BOTH] ['trchar' FROM] str) - Trim + the string by the given trim char, defaults to whitespaces. +- UPPER(str) - Return the upper-case of the given string. +- DATE_ADD(date, days, unit) - Add the number of days to a given date. (Supported units are DAY, MONTH) +- DATE_SUB(date, days, unit) - Substract the number of days from a given date. (Supported units are DAY, MONTH) +- DATE_DIFF(date1, date2) - Calculate the difference in days between date1-date2. + +Arithmetic operators +~~~~~~~~~~~~~~~~~~~~ + +You can do math in DQL using numeric values, for example: + +.. code-block:: sql + + SELECT person.salary * 1.5 FROM CompanyPerson person WHERE person.salary < 100000 + +Aggregate Functions +~~~~~~~~~~~~~~~~~~~ + +The following aggregate functions are allowed in SELECT and GROUP +BY clauses: AVG, COUNT, MIN, MAX, SUM + +Other Expressions +~~~~~~~~~~~~~~~~~ + +DQL offers a wide-range of additional expressions that are known +from SQL, here is a list of all the supported constructs: + + +- ``ALL/ANY/SOME`` - Used in a WHERE clause followed by a + sub-select this works like the equivalent constructs in SQL. +- ``BETWEEN a AND b`` and ``NOT BETWEEN a AND b`` can be used to + match ranges of arithmetic values. +- ``IN (x1, x2, ...)`` and ``NOT IN (x1, x2, ..)`` can be used to + match a set of given values. +- ``LIKE ..`` and ``NOT LIKE ..`` match parts of a string or text + using % as a wildcard. +- ``IS NULL`` and ``IS NOT NULL`` to check for null values +- ``EXISTS`` and ``NOT EXISTS`` in combination with a sub-select + +Adding your own functions to the DQL language +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +By default DQL comes with functions that are part of a large basis +of underlying databases. However you will most likely choose a +database platform at the beginning of your project and most likely +never change it. For this cases you can easily extend the DQL +parser with own specialized platform functions. + +You can register custom DQL functions in your ORM Configuration: + +.. code-block:: php + + addCustomStringFunction($name, $class); + $config->addCustomNumericFunction($name, $class); + $config->addCustomDatetimeFunction($name, $class); + + $em = EntityManager::create($dbParams, $config); + +The functions have to return either a string, numeric or datetime +value depending on the registered function type. As an example we +will add a MySQL specific FLOOR() functionality. All the given +classes have to implement the base class : + +.. code-block:: php + + walkSimpleArithmeticExpression( + $this->simpleArithmeticExpression + ) . ')'; + } + + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $lexer = $parser->getLexer(); + + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } + } + +We will register the function by calling and can then use it: + +.. code-block:: php + + getConfiguration(); + $config->registerNumericFunction('FLOOR', 'MyProject\Query\MysqlFloor'); + + $dql = "SELECT FLOOR(person.salary * 1.75) FROM CompanyPerson person"; + +Querying Inherited Classes +-------------------------- + +This section demonstrates how you can query inherited classes and +what type of results to expect. + +Single Table +~~~~~~~~~~~~ + +`Single Table Inheritance `_ +is an inheritance mapping strategy where all classes of a hierarchy +are mapped to a single database table. In order to distinguish +which row represents which type in the hierarchy a so-called +discriminator column is used. + +First we need to setup an example set of entities to use. In this +scenario it is a generic Person and Employee example: + +.. code-block:: php + + setName('test'); + $employee->setDepartment('testing'); + $em->persist($employee); + $em->flush(); + +Now lets run a simple query to retrieve the ``Employee`` we just +created: + +.. code-block:: sql + + SELECT e FROM Entities\Employee e WHERE e.name = 'test' + +If we check the generated SQL you will notice it has some special +conditions added to ensure that we will only get back ``Employee`` +entities: + +.. code-block:: sql + + SELECT p0_.id AS id0, p0_.name AS name1, p0_.department AS department2, + p0_.discr AS discr3 FROM Person p0_ + WHERE (p0_.name = ?) AND p0_.discr IN ('employee') + +Class Table Inheritance +~~~~~~~~~~~~~~~~~~~~~~~ + +`Class Table Inheritance `_ +is an inheritance mapping strategy where each class in a hierarchy +is mapped to several tables: its own table and the tables of all +parent classes. The table of a child class is linked to the table +of a parent class through a foreign key constraint. Doctrine 2 +implements this strategy through the use of a discriminator column +in the topmost table of the hierarchy because this is the easiest +way to achieve polymorphic queries with Class Table Inheritance. + +The example for class table inheritance is the same as single +table, you just need to change the inheritance type from +``SINGLE_TABLE`` to ``JOINED``: + +.. code-block:: php + + createQuery('select u from MyProject\Model\User u'); + + // example2: using setDql + $q = $em->createQuery(); + $q->setDql('select u from MyProject\Model\User u'); + +Query Result Formats +~~~~~~~~~~~~~~~~~~~~ + +The format in which the result of a DQL SELECT query is returned +can be influenced by a so-called ``hydration mode``. A hydration +mode specifies a particular way in which a SQL result set is +transformed. Each hydration mode has its own dedicated method on +the Query class. Here they are: + + +- ``Query#getResult()``: Retrieves a collection of objects. The + result is either a plain collection of objects (pure) or an array + where the objects are nested in the result rows (mixed). +- ``Query#getSingleResult()``: Retrieves a single object. If the + result contains more than one object, an ``NonUniqueResultException`` + is thrown. If the result contains no objects, an ``NoResultException`` + is thrown. The pure/mixed distinction does not apply. +- ``Query#getOneOrNullResult()``: Retrieve a single object. If no + object is found null will be returned. +- ``Query#getArrayResult()``: Retrieves an array graph (a nested + array) that is largely interchangeable with the object graph + generated by ``Query#getResult()`` for read-only purposes. + + .. note:: + + An array graph can differ from the corresponding object + graph in certain scenarios due to the difference of the identity + semantics between arrays and objects. + + + +- ``Query#getScalarResult()``: Retrieves a flat/rectangular result + set of scalar values that can contain duplicate data. The + pure/mixed distinction does not apply. +- ``Query#getSingleScalarResult()``: Retrieves a single scalar + value from the result returned by the dbms. If the result contains + more than a single scalar value, an exception is thrown. The + pure/mixed distinction does not apply. + +Instead of using these methods, you can alternatively use the +general-purpose method +``Query#execute(array $params = array(), $hydrationMode = Query::HYDRATE_OBJECT)``. +Using this method you can directly supply the hydration mode as the +second parameter via one of the Query constants. In fact, the +methods mentioned earlier are just convenient shortcuts for the +execute method. For example, the method ``Query#getResult()`` +internally invokes execute, passing in ``Query::HYDRATE_OBJECT`` as +the hydration mode. + +The use of the methods mentioned earlier is generally preferred as +it leads to more concise code. + +Pure and Mixed Results +~~~~~~~~~~~~~~~~~~~~~~ + +The nature of a result returned by a DQL SELECT query retrieved +through ``Query#getResult()`` or ``Query#getArrayResult()`` can be +of 2 forms: **pure** and **mixed**. In the previous simple +examples, you already saw a "pure" query result, with only objects. +By default, the result type is **pure** but +**as soon as scalar values, such as aggregate values or other scalar values that do not belong to an entity, appear in the SELECT part of the DQL query, the result becomes mixed**. +A mixed result has a different structure than a pure result in +order to accommodate for the scalar values. + +A pure result usually looks like this: + +.. code-block:: php + + $dql = "SELECT u FROM User u"; + + array + [0] => Object + [1] => Object + [2] => Object + ... + +A mixed result on the other hand has the following general +structure: + +.. code-block:: php + + $dql = "SELECT u, 'some scalar string', count(u.groups) AS num FROM User u JOIN u.groups g GROUP BY u.id"; + + array + [0] + [0] => Object + [1] => "some scalar string" + ['num'] => 42 + // ... more scalar values, either indexed numerically or with a name + [1] + [0] => Object + [1] => "some scalar string" + ['num'] => 42 + // ... more scalar values, either indexed numerically or with a name + +To better understand mixed results, consider the following DQL +query: + +.. code-block:: sql + + SELECT u, UPPER(u.name) nameUpper FROM MyProject\Model\User u + +This query makes use of the ``UPPER`` DQL function that returns a +scalar value and because there is now a scalar value in the SELECT +clause, we get a mixed result. + +Conventions for mixed results are as follows: + + +- The object fetched in the FROM clause is always positioned with the key '0'. +- Every scalar without a name is numbered in the order given in the query, starting with 1. +- Every aliased scalar is given with its alias-name as the key. The case of the name is kept. +- If several objects are fetched from the FROM clause they alternate every row. + + +Here is how the result could look like: + +.. code-block:: php + + array + array + [0] => User (Object) + ['nameUpper'] => "ROMAN" + array + [0] => User (Object) + ['nameUpper'] => "JONATHAN" + ... + +And here is how you would access it in PHP code: + +.. code-block:: php + + getName(); + echo "Name UPPER: " . $row['nameUpper']; + } + +Fetching Multiple FROM Entities +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you fetch multiple entities that are listed in the FROM clause then the hydration +will return the rows iterating the different top-level entities. + +.. code-block:: php + + $dql = "SELECT u, g FROM User u, Group g"; + + array + [0] => Object (User) + [1] => Object (Group) + [2] => Object (User) + [3] => Object (Group) + + +Hydration Modes +~~~~~~~~~~~~~~~ + +Each of the Hydration Modes makes assumptions about how the result +is returned to user land. You should know about all the details to +make best use of the different result formats: + +The constants for the different hydration modes are: + + +- Query::HYDRATE\_OBJECT +- Query::HYDRATE\_ARRAY +- Query::HYDRATE\_SCALAR +- Query::HYDRATE\_SINGLE\_SCALAR + +Object Hydration +^^^^^^^^^^^^^^^^ + +Object hydration hydrates the result set into the object graph: + +.. code-block:: php + + createQuery('SELECT u FROM CmsUser u'); + $users = $query->getResult(Query::HYDRATE_OBJECT); + +Array Hydration +^^^^^^^^^^^^^^^ + +You can run the same query with array hydration and the result set +is hydrated into an array that represents the object graph: + +.. code-block:: php + + createQuery('SELECT u FROM CmsUser u'); + $users = $query->getResult(Query::HYDRATE_ARRAY); + +You can use the ``getArrayResult()`` shortcut as well: + +.. code-block:: php + + getArrayResult(); + +Scalar Hydration +^^^^^^^^^^^^^^^^ + +If you want to return a flat rectangular result set instead of an +object graph you can use scalar hydration: + +.. code-block:: php + + createQuery('SELECT u FROM CmsUser u'); + $users = $query->getResult(Query::HYDRATE_SCALAR); + echo $users[0]['u_id']; + +The following assumptions are made about selected fields using +Scalar Hydration: + + +1. Fields from classes are prefixed by the DQL alias in the result. + A query of the kind 'SELECT u.name ..' returns a key 'u\_name' in + the result rows. + +Single Scalar Hydration +^^^^^^^^^^^^^^^^^^^^^^^ + +If you have a query which returns just a single scalar value you can use +single scalar hydration: + +.. code-block:: php + + createQuery('SELECT COUNT(a.id) FROM CmsUser u LEFT JOIN u.articles a WHERE u.username = ?1 GROUP BY u.id'); + $query->setParameter(1, 'jwage'); + $numArticles = $query->getResult(Query::HYDRATE_SINGLE_SCALAR); + +You can use the ``getSingleScalarResult()`` shortcut as well: + +.. code-block:: php + + getSingleScalarResult(); + +Custom Hydration Modes +^^^^^^^^^^^^^^^^^^^^^^ + +You can easily add your own custom hydration modes by first +creating a class which extends ``AbstractHydrator``: + +.. code-block:: php + + _stmt->fetchAll(PDO::FETCH_ASSOC); + } + } + +Next you just need to add the class to the ORM configuration: + +.. code-block:: php + + getConfiguration()->addCustomHydrationMode('CustomHydrator', 'MyProject\Hydrators\CustomHydrator'); + +Now the hydrator is ready to be used in your queries: + +.. code-block:: php + + createQuery('SELECT u FROM CmsUser u'); + $results = $query->getResult('CustomHydrator'); + +Iterating Large Result Sets +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are situations when a query you want to execute returns a +very large result-set that needs to be processed. All the +previously described hydration modes completely load a result-set +into memory which might not be feasible with large result sets. See +the `Batch Processing `_ section on details how +to iterate large result sets. + +Functions +~~~~~~~~~ + +The following methods exist on the ``AbstractQuery`` which both +``Query`` and ``NativeQuery`` extend from. + +Parameters +^^^^^^^^^^ + +Prepared Statements that use numerical or named wildcards require +additional parameters to be executable against the database. To +pass parameters to the query the following methods can be used: + + +- ``AbstractQuery::setParameter($param, $value)`` - Set the + numerical or named wildcard to the given value. +- ``AbstractQuery::setParameters(array $params)`` - Set an array + of parameter key-value pairs. +- ``AbstractQuery::getParameter($param)`` +- ``AbstractQuery::getParameters()`` + +Both named and positional parameters are passed to these methods without their ? or : prefix. + +Cache related API +^^^^^^^^^^^^^^^^^ + +You can cache query results based either on all variables that +define the result (SQL, Hydration Mode, Parameters and Hints) or on +user-defined cache keys. However by default query results are not +cached at all. You have to enable the result cache on a per query +basis. The following example shows a complete workflow using the +Result Cache API: + +.. code-block:: php + + createQuery('SELECT u FROM MyProject\Model\User u WHERE u.id = ?1'); + $query->setParameter(1, 12); + + $query->setResultCacheDriver(new ApcCache()); + + $query->useResultCache(true) + ->setResultCacheLifeTime($seconds = 3600); + + $result = $query->getResult(); // cache miss + + $query->expireResultCache(true); + $result = $query->getResult(); // forced expire, cache miss + + $query->setResultCacheId('my_query_result'); + $result = $query->getResult(); // saved in given result cache id. + + // or call useResultCache() with all parameters: + $query->useResultCache(true, $seconds = 3600, 'my_query_result'); + $result = $query->getResult(); // cache hit! + + // Introspection + $queryCacheProfile = $query->getQueryCacheProfile(); + $cacheDriver = $query->getResultCacheDriver(); + $lifetime = $query->getLifetime(); + $key = $query->getCacheKey(); + +.. note:: + + You can set the Result Cache Driver globally on the + ``Doctrine\ORM\Configuration`` instance so that it is passed to + every ``Query`` and ``NativeQuery`` instance. + + +Query Hints +^^^^^^^^^^^ + +You can pass hints to the query parser and hydrators by using the +``AbstractQuery::setHint($name, $value)`` method. Currently there +exist mostly internal query hints that are not be consumed in +userland. However the following few hints are to be used in +userland: + + +- Query::HINT\_FORCE\_PARTIAL\_LOAD - Allows to hydrate objects + although not all their columns are fetched. This query hint can be + used to handle memory consumption problems with large result-sets + that contain char or binary data. Doctrine has no way of implicitly + reloading this data. Partially loaded objects have to be passed to + ``EntityManager::refresh()`` if they are to be reloaded fully from + the database. +- Query::HINT\_REFRESH - This query is used internally by + ``EntityManager::refresh()`` and can be used in userland as well. + If you specify this hint and a query returns the data for an entity + that is already managed by the UnitOfWork, the fields of the + existing entity will be refreshed. In normal operation a result-set + that loads data of an already existing entity is discarded in favor + of the already existing entity. +- Query::HINT\_CUSTOM\_TREE\_WALKERS - An array of additional + ``Doctrine\ORM\Query\TreeWalker`` instances that are attached to + the DQL query parsing process. + +Query Cache (DQL Query Only) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Parsing a DQL query and converting it into a SQL query against the +underlying database platform obviously has some overhead in +contrast to directly executing Native SQL queries. That is why +there is a dedicated Query Cache for caching the DQL parser +results. In combination with the use of wildcards you can reduce +the number of parsed queries in production to zero. + +The Query Cache Driver is passed from the +``Doctrine\ORM\Configuration`` instance to each +``Doctrine\ORM\Query`` instance by default and is also enabled by +default. This also means you don't regularly need to fiddle with +the parameters of the Query Cache, however if you do there are +several methods to interact with it: + + +- ``Query::setQueryCacheDriver($driver)`` - Allows to set a Cache + instance +- ``Query::setQueryCacheLifeTime($seconds = 3600)`` - Set lifetime + of the query caching. +- ``Query::expireQueryCache($bool)`` - Enforce the expiring of the + query cache if set to true. +- ``Query::getExpireQueryCache()`` +- ``Query::getQueryCacheDriver()`` +- ``Query::getQueryCacheLifeTime()`` + +First and Max Result Items (DQL Query Only) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can limit the number of results returned from a DQL query as +well as specify the starting offset, Doctrine then uses a strategy +of manipulating the select query to return only the requested +number of results: + + +- ``Query::setMaxResults($maxResults)`` +- ``Query::setFirstResult($offset)`` + +.. note:: + + If your query contains a fetch-joined collection + specifying the result limit methods are not working as you would + expect. Set Max Results restricts the number of database result + rows, however in the case of fetch-joined collections one root + entity might appear in many rows, effectively hydrating less than + the specified number of results. + +.. _dql-temporarily-change-fetch-mode: + +Temporarily change fetch mode in DQL +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +While normally all your associations are marked as lazy or extra lazy you will have cases where you are using DQL and don't want to +fetch join a second, third or fourth level of entities into your result, because of the increased cost of the SQL JOIN. You +can mark a many-to-one or one-to-one association as fetched temporarily to batch fetch these entities using a WHERE .. IN query. + +.. code-block:: php + + createQuery("SELECT u FROM MyProject\User u"); + $query->setFetchMode("MyProject\User", "address", \Doctrine\ORM\Mapping\ClassMetadata::FETCH_EAGER); + $query->execute(); + +Given that there are 10 users and corresponding addresses in the database the executed queries will look something like: + +.. code-block:: sql + + SELECT * FROM users; + SELECT * FROM address WHERE id IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10); + +.. note:: + Changing the fetch mode during a query is only possible for one-to-one and many-to-one relations. + + +EBNF +---- + +The following context-free grammar, written in an EBNF variant, +describes the Doctrine Query Language. You can consult this grammar +whenever you are unsure about what is possible with DQL or what the +correct syntax for a particular query should be. + +Document syntax: +~~~~~~~~~~~~~~~~ + + +- non-terminals begin with an upper case character +- terminals begin with a lower case character +- parentheses (...) are used for grouping +- square brackets [...] are used for defining an optional part, + e.g. zero or one time +- curly brackets {...} are used for repetition, e.g. zero or more + times +- double quotation marks "..." define a terminal string +- a vertical bar \| represents an alternative + +Terminals +~~~~~~~~~ + + +- identifier (name, email, ...) +- string ('foo', 'bar''s house', '%ninja%', ...) +- char ('/', '\\', ' ', ...) +- integer (-1, 0, 1, 34, ...) +- float (-0.23, 0.007, 1.245342E+8, ...) +- boolean (false, true) + +Query Language +~~~~~~~~~~~~~~ + +.. code-block:: php + + QueryLanguage ::= SelectStatement | UpdateStatement | DeleteStatement + +Statements +~~~~~~~~~~ + +.. code-block:: php + + SelectStatement ::= SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] + UpdateStatement ::= UpdateClause [WhereClause] + DeleteStatement ::= DeleteClause [WhereClause] + +Identifiers +~~~~~~~~~~~ + +.. code-block:: php + + /* Alias Identification usage (the "u" of "u.name") */ + IdentificationVariable ::= identifier + + /* Alias Identification declaration (the "u" of "FROM User u") */ + AliasIdentificationVariable :: = identifier + + /* identifier that must be a class name (the "User" of "FROM User u") */ + AbstractSchemaName ::= identifier + + /* Alias ResultVariable declaration (the "total" of "COUNT(*) AS total") */ + AliasResultVariable = identifier + + /* ResultVariable identifier usage of mapped field aliases (the "total" of "COUNT(*) AS total") */ + ResultVariable = identifier + + /* identifier that must be a field (the "name" of "u.name") */ + /* This is responsible to know if the field exists in Object, no matter if it's a relation or a simple field */ + FieldIdentificationVariable ::= identifier + + /* identifier that must be a collection-valued association field (to-many) (the "Phonenumbers" of "u.Phonenumbers") */ + CollectionValuedAssociationField ::= FieldIdentificationVariable + + /* identifier that must be a single-valued association field (to-one) (the "Group" of "u.Group") */ + SingleValuedAssociationField ::= FieldIdentificationVariable + + /* identifier that must be an embedded class state field */ + EmbeddedClassStateField ::= FieldIdentificationVariable + + /* identifier that must be a simple state field (name, email, ...) (the "name" of "u.name") */ + /* The difference between this and FieldIdentificationVariable is only semantical, because it points to a single field (not mapping to a relation) */ + SimpleStateField ::= FieldIdentificationVariable + +Path Expressions +~~~~~~~~~~~~~~~~ + +.. code-block:: php + + /* "u.Group" or "u.Phonenumbers" declarations */ + JoinAssociationPathExpression ::= IdentificationVariable "." (CollectionValuedAssociationField | SingleValuedAssociationField) + + /* "u.Group" or "u.Phonenumbers" usages */ + AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression + + /* "u.name" or "u.Group" */ + SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression + + /* "u.name" or "u.Group.name" */ + StateFieldPathExpression ::= IdentificationVariable "." StateField + + /* "u.Group" */ + SingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField + + /* "u.Group.Permissions" */ + CollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField + + /* "name" */ + StateField ::= {EmbeddedClassStateField "."}* SimpleStateField + +Clauses +~~~~~~~ + +.. code-block:: php + + SelectClause ::= "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression}* + SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression + UpdateClause ::= "UPDATE" AbstractSchemaName ["AS"] AliasIdentificationVariable "SET" UpdateItem {"," UpdateItem}* + DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName ["AS"] AliasIdentificationVariable + FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration}* + SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}* + WhereClause ::= "WHERE" ConditionalExpression + HavingClause ::= "HAVING" ConditionalExpression + GroupByClause ::= "GROUP" "BY" GroupByItem {"," GroupByItem}* + OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}* + Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] + +Items +~~~~~ + +.. code-block:: php + + UpdateItem ::= SingleValuedPathExpression "=" NewValue + OrderByItem ::= (SimpleArithmeticExpression | SingleValuedPathExpression | ScalarExpression | ResultVariable | FunctionDeclaration) ["ASC" | "DESC"] + GroupByItem ::= IdentificationVariable | ResultVariable | SingleValuedPathExpression + NewValue ::= SimpleArithmeticExpression | "NULL" + +From, Join and Index by +~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {Join}* + SubselectIdentificationVariableDeclaration ::= IdentificationVariableDeclaration + RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable + JoinAssociationDeclaration ::= JoinAssociationPathExpression ["AS"] AliasIdentificationVariable [IndexBy] + Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" (JoinAssociationDeclaration | RangeVariableDeclaration) ["WITH" ConditionalExpression] + IndexBy ::= "INDEX" "BY" StateFieldPathExpression + +Select Expressions +~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + SelectExpression ::= (IdentificationVariable | ScalarExpression | AggregateExpression | FunctionDeclaration | PartialObjectExpression | "(" Subselect ")" | CaseExpression | NewObjectExpression) [["AS"] ["HIDDEN"] AliasResultVariable] + SimpleSelectExpression ::= (StateFieldPathExpression | IdentificationVariable | FunctionDeclaration | AggregateExpression | "(" Subselect ")" | ScalarExpression) [["AS"] AliasResultVariable] + PartialObjectExpression ::= "PARTIAL" IdentificationVariable "." PartialFieldSet + PartialFieldSet ::= "{" SimpleStateField {"," SimpleStateField}* "}" + NewObjectExpression ::= "NEW" IdentificationVariable "(" NewObjectArg {"," NewObjectArg}* ")" + NewObjectArg ::= ScalarExpression | "(" Subselect ")" + +Conditional Expressions +~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}* + ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}* + ConditionalFactor ::= ["NOT"] ConditionalPrimary + ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")" + SimpleConditionalExpression ::= ComparisonExpression | BetweenExpression | LikeExpression | + InExpression | NullComparisonExpression | ExistsExpression | + EmptyCollectionComparisonExpression | CollectionMemberExpression | + InstanceOfExpression + + +Collection Expressions +~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY" + CollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpression + +Literal Values +~~~~~~~~~~~~~~ + +.. code-block:: php + + Literal ::= string | char | integer | float | boolean + InParameter ::= Literal | InputParameter + +Input Parameter +~~~~~~~~~~~~~~~ + +.. code-block:: php + + InputParameter ::= PositionalParameter | NamedParameter + PositionalParameter ::= "?" integer + NamedParameter ::= ":" string + +Arithmetic Expressions +~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")" + SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}* + ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}* + ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary + ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")" + | FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings + | FunctionsReturningDatetime | IdentificationVariable | ResultVariable + | InputParameter | CaseExpression + +Scalar and Type Expressions +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + ScalarExpression ::= SimpleArithmeticExpression | StringPrimary | DateTimePrimary | StateFieldPathExpression | BooleanPrimary | CaseExpression | InstanceOfExpression + StringExpression ::= StringPrimary | ResultVariable | "(" Subselect ")" + StringPrimary ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression | CaseExpression + BooleanExpression ::= BooleanPrimary | "(" Subselect ")" + BooleanPrimary ::= StateFieldPathExpression | boolean | InputParameter + EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression + SimpleEntityExpression ::= IdentificationVariable | InputParameter + DatetimeExpression ::= DatetimePrimary | "(" Subselect ")" + DatetimePrimary ::= StateFieldPathExpression | InputParameter | FunctionsReturningDatetime | AggregateExpression + +.. note:: + + Parts of CASE expressions are not yet implemented. + +Aggregate Expressions +~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: php + + AggregateExpression ::= ("AVG" | "MAX" | "MIN" | "SUM" | "COUNT") "(" ["DISTINCT"] SimpleArithmeticExpression ")" + +Case Expressions +~~~~~~~~~~~~~~~~ + +.. code-block:: php + + CaseExpression ::= GeneralCaseExpression | SimpleCaseExpression | CoalesceExpression | NullifExpression + GeneralCaseExpression ::= "CASE" WhenClause {WhenClause}* "ELSE" ScalarExpression "END" + WhenClause ::= "WHEN" ConditionalExpression "THEN" ScalarExpression + SimpleCaseExpression ::= "CASE" CaseOperand SimpleWhenClause {SimpleWhenClause}* "ELSE" ScalarExpression "END" + CaseOperand ::= StateFieldPathExpression | TypeDiscriminator + SimpleWhenClause ::= "WHEN" ScalarExpression "THEN" ScalarExpression + CoalesceExpression ::= "COALESCE" "(" ScalarExpression {"," ScalarExpression}* ")" + NullifExpression ::= "NULLIF" "(" ScalarExpression "," ScalarExpression ")" + +Other Expressions +~~~~~~~~~~~~~~~~~ + +QUANTIFIED/BETWEEN/COMPARISON/LIKE/NULL/EXISTS + +.. code-block:: php + + QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")" + BetweenExpression ::= ArithmeticExpression ["NOT"] "BETWEEN" ArithmeticExpression "AND" ArithmeticExpression + ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression ) + InExpression ::= SingleValuedPathExpression ["NOT"] "IN" "(" (InParameter {"," InParameter}* | Subselect) ")" + InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (InstanceOfParameter | "(" InstanceOfParameter {"," InstanceOfParameter}* ")") + InstanceOfParameter ::= AbstractSchemaName | InputParameter + LikeExpression ::= StringExpression ["NOT"] "LIKE" StringPrimary ["ESCAPE" char] + NullComparisonExpression ::= (InputParameter | NullIfExpression | CoalesceExpression | AggregateExpression | FunctionDeclaration | IdentificationVariable | SingleValuedPathExpression | ResultVariable) "IS" ["NOT"] "NULL" + ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")" + ComparisonOperator ::= "=" | "<" | "<=" | "<>" | ">" | ">=" | "!=" + +Functions +~~~~~~~~~ + +.. code-block:: php + + FunctionDeclaration ::= FunctionsReturningStrings | FunctionsReturningNumerics | FunctionsReturningDateTime + + FunctionsReturningNumerics ::= + "LENGTH" "(" StringPrimary ")" | + "LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")" | + "ABS" "(" SimpleArithmeticExpression ")" | + "SQRT" "(" SimpleArithmeticExpression ")" | + "MOD" "(" SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | + "SIZE" "(" CollectionValuedPathExpression ")" | + "DATE_DIFF" "(" ArithmeticPrimary "," ArithmeticPrimary ")" | + "BIT_AND" "(" ArithmeticPrimary "," ArithmeticPrimary ")" | + "BIT_OR" "(" ArithmeticPrimary "," ArithmeticPrimary ")" + + FunctionsReturningDateTime ::= + "CURRENT_DATE" | + "CURRENT_TIME" | + "CURRENT_TIMESTAMP" | + "DATE_ADD" "(" ArithmeticPrimary "," ArithmeticPrimary "," StringPrimary ")" | + "DATE_SUB" "(" ArithmeticPrimary "," ArithmeticPrimary "," StringPrimary ")" + + FunctionsReturningStrings ::= + "CONCAT" "(" StringPrimary "," StringPrimary ")" | + "SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | + "TRIM" "(" [["LEADING" | "TRAILING" | "BOTH"] [char] "FROM"] StringPrimary ")" | + "LOWER" "(" StringPrimary ")" | + "UPPER" "(" StringPrimary ")" | + "IDENTITY" "(" SingleValuedAssociationPathExpression {"," string} ")" + + diff --git a/vendor/doctrine/orm/docs/en/reference/events.rst b/vendor/doctrine/orm/docs/en/reference/events.rst new file mode 100644 index 0000000000000000000000000000000000000000..6ec2f092db3b33a12f6ce1a1407c8bb3a1d66d56 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/events.rst @@ -0,0 +1,983 @@ +Events +====== + +Doctrine 2 features a lightweight event system that is part of the +Common package. Doctrine uses it to dispatch system events, mainly +:ref:`lifecycle events `. +You can also use it for your own custom events. + +The Event System +---------------- + +The event system is controlled by the ``EventManager``. It is the +central point of Doctrine's event listener system. Listeners are +registered on the manager and events are dispatched through the +manager. + +.. code-block:: php + + addEventListener(array(self::preFoo, self::postFoo), $this); + } + + public function preFoo(EventArgs $e) + { + $this->preFooInvoked = true; + } + + public function postFoo(EventArgs $e) + { + $this->postFooInvoked = true; + } + } + + // Create a new instance + $test = new TestEvent($evm); + +Events can be dispatched by using the ``dispatchEvent()`` method. + +.. code-block:: php + + dispatchEvent(TestEvent::preFoo); + $evm->dispatchEvent(TestEvent::postFoo); + +You can easily remove a listener with the ``removeEventListener()`` +method. + +.. code-block:: php + + removeEventListener(array(self::preFoo, self::postFoo), $this); + +The Doctrine 2 event system also has a simple concept of event +subscribers. We can define a simple ``TestEventSubscriber`` class +which implements the ``\Doctrine\Common\EventSubscriber`` interface +and implements a ``getSubscribedEvents()`` method which returns an +array of events it should be subscribed to. + +.. code-block:: php + + preFooInvoked = true; + } + + public function getSubscribedEvents() + { + return array(TestEvent::preFoo); + } + } + + $eventSubscriber = new TestEventSubscriber(); + $evm->addEventSubscriber($eventSubscriber); + +.. note:: + + The array to return in the ``getSubscribedEvents`` method is a simple array + with the values being the event names. The subscriber must have a method + that is named exactly like the event. + +Now when you dispatch an event, any event subscribers will be +notified for that event. + +.. code-block:: php + + dispatchEvent(TestEvent::preFoo); + +Now you can test the ``$eventSubscriber`` instance to see if the +``preFoo()`` method was invoked. + +.. code-block:: php + + preFooInvoked) { + echo 'pre foo invoked!'; + } + +Naming convention +~~~~~~~~~~~~~~~~~ + +Events being used with the Doctrine 2 EventManager are best named +with camelcase and the value of the corresponding constant should +be the name of the constant itself, even with spelling. This has +several reasons: + + +- It is easy to read. +- Simplicity. +- Each method within an EventSubscriber is named after the + corresponding constant's value. If the constant's name and value differ + it contradicts the intention of using the constant and makes your code + harder to maintain. + +An example for a correct notation can be found in the example +``TestEvent`` above. + +.. _reference-events-lifecycle-events: + +Lifecycle Events +---------------- + +The EntityManager and UnitOfWork trigger a bunch of events during +the life-time of their registered entities. + + +- preRemove - The preRemove event occurs for a given entity before + the respective EntityManager remove operation for that entity is + executed. It is not called for a DQL DELETE statement. +- postRemove - The postRemove event occurs for an entity after the + entity has been deleted. It will be invoked after the database + delete operations. It is not called for a DQL DELETE statement. +- prePersist - The prePersist event occurs for a given entity + before the respective EntityManager persist operation for that + entity is executed. It should be noted that this event is only triggered on + *initial* persist of an entity (i.e. it does not trigger on future updates). +- postPersist - The postPersist event occurs for an entity after + the entity has been made persistent. It will be invoked after the + database insert operations. Generated primary key values are + available in the postPersist event. +- preUpdate - The preUpdate event occurs before the database + update operations to entity data. It is not called for a DQL UPDATE statement. +- postUpdate - The postUpdate event occurs after the database + update operations to entity data. It is not called for a DQL UPDATE statement. +- postLoad - The postLoad event occurs for an entity after the + entity has been loaded into the current EntityManager from the + database or after the refresh operation has been applied to it. +- loadClassMetadata - The loadClassMetadata event occurs after the + mapping metadata for a class has been loaded from a mapping source + (annotations/xml/yaml). This event is not a lifecycle callback. +- onClassMetadataNotFound - Loading class metadata for a particular + requested class name failed. Manipulating the given event args instance + allows providing fallback metadata even when no actual metadata exists + or could be found. This event is not a lifecycle callback. +- preFlush - The preFlush event occurs at the very beginning of a flush + operation. This event is not a lifecycle callback. +- onFlush - The onFlush event occurs after the change-sets of all + managed entities are computed. This event is not a lifecycle + callback. +- postFlush - The postFlush event occurs at the end of a flush operation. This + event is not a lifecycle callback. +- onClear - The onClear event occurs when the EntityManager#clear() operation is + invoked, after all references to entities have been removed from the unit of + work. This event is not a lifecycle callback. + +.. warning:: + + Note that, when using ``Doctrine\ORM\AbstractQuery#iterate()``, ``postLoad`` + events will be executed immediately after objects are being hydrated, and therefore + associations are not guaranteed to be initialized. It is not safe to combine + usage of ``Doctrine\ORM\AbstractQuery#iterate()`` and ``postLoad`` event + handlers. + +.. warning:: + + Note that the postRemove event or any events triggered after an entity removal + can receive an uninitializable proxy in case you have configured an entity to + cascade remove relations. In this case, you should load yourself the proxy in + the associated pre event. + +You can access the Event constants from the ``Events`` class in the +ORM package. + +.. code-block:: php + + createdAt = date('Y-m-d H:i:s'); + } + + /** @PrePersist */ + public function doOtherStuffOnPrePersist() + { + $this->value = 'changed from prePersist callback!'; + } + + /** @PostPersist */ + public function doStuffOnPostPersist() + { + $this->value = 'changed from postPersist callback!'; + } + + /** @PostLoad */ + public function doStuffOnPostLoad() + { + $this->value = 'changed from postLoad callback!'; + } + + /** @PreUpdate */ + public function doStuffOnPreUpdate() + { + $this->value = 'changed from preUpdate callback!'; + } + } + +Note that the methods set as lifecycle callbacks need to be public and, +when using these annotations, you have to apply the +``@HasLifecycleCallbacks`` marker annotation on the entity class. + +If you want to register lifecycle callbacks from YAML or XML you +can do it with the following. + +.. code-block:: yaml + + User: + type: entity + fields: + # ... + name: + type: string(50) + lifecycleCallbacks: + prePersist: [ doStuffOnPrePersist, doOtherStuffOnPrePersist ] + postPersist: [ doStuffOnPostPersist ] + +In YAML the ``key`` of the lifecycleCallbacks entry is the event that you +are triggering on and the value is the method (or methods) to call. The allowed +event types are the ones listed in the previous Lifecycle Events section. + +XML would look something like this: + +.. code-block:: xml + + + + + + + + + + + + + + + + +In XML the ``type`` of the lifecycle-callback entry is the event that you +are triggering on and the ``method`` is the method to call. The allowed event +types are the ones listed in the previous Lifecycle Events section. + +When using YAML or XML you need to remember to create public methods to match the +callback names you defined. E.g. in these examples ``doStuffOnPrePersist()``, +``doOtherStuffOnPrePersist()`` and ``doStuffOnPostPersist()`` methods need to be +defined on your ``User`` model. + +.. code-block:: php + + hasChangedField('username')) { + // Do something when the username is changed. + } + } + } + +Listening and subscribing to Lifecycle Events +--------------------------------------------- + +Lifecycle event listeners are much more powerful than the simple +lifecycle callbacks that are defined on the entity classes. They +sit at a level above the entities and allow you to implement re-usable +behaviors across different entity classes. + +Note that they require much more detailed knowledge about the inner +workings of the EntityManager and UnitOfWork. Please read the +*Implementing Event Listeners* section carefully if you are trying +to write your own listener. + +For event subscribers, there are no surprises. They declare the +lifecycle events in their ``getSubscribedEvents`` method and provide +public methods that expect the relevant arguments. + +A lifecycle event listener looks like the following: + +.. code-block:: php + + getObject(); + $entityManager = $args->getObjectManager(); + + // perhaps you only want to act on some "Product" entity + if ($entity instanceof Product) { + // do something with the Product + } + } + } + +A lifecycle event subscriber may looks like this: + +.. code-block:: php + + getObject(); + $entityManager = $args->getObjectManager(); + + // perhaps you only want to act on some "Product" entity + if ($entity instanceof Product) { + // do something with the Product + } + } + +.. note:: + + Lifecycle events are triggered for all entities. It is the responsibility + of the listeners and subscribers to check if the entity is of a type + it wants to handle. + +To register an event listener or subscriber, you have to hook it into the +EventManager that is passed to the EntityManager factory: + +.. code-block:: php + + addEventListener(array(Events::preUpdate), new MyEventListener()); + $eventManager->addEventSubscriber(new MyEventSubscriber()); + + $entityManager = EntityManager::create($dbOpts, $config, $eventManager); + +You can also retrieve the event manager instance after the +EntityManager was created: + +.. code-block:: php + + getEventManager()->addEventListener(array(Events::preUpdate), new MyEventListener()); + $entityManager->getEventManager()->addEventSubscriber(new MyEventSubscriber()); + +.. _reference-events-implementing-listeners: + +Implementing Event Listeners +---------------------------- + +This section explains what is and what is not allowed during +specific lifecycle events of the UnitOfWork. Although you get +passed the EntityManager in all of these events, you have to follow +these restrictions very carefully since operations in the wrong +event may produce lots of different errors, such as inconsistent +data and lost updates/persists/removes. + +For the described events that are also lifecycle callback events +the restrictions apply as well, with the additional restriction +that (prior to version 2.4) you do not have access to the +EntityManager or UnitOfWork APIs inside these events. + +prePersist +~~~~~~~~~~ + +There are two ways for the ``prePersist`` event to be triggered. +One is obviously when you call ``EntityManager#persist()``. The +event is also called for all cascaded associations. + +There is another way for ``prePersist`` to be called, inside the +``flush()`` method when changes to associations are computed and +this association is marked as cascade persist. Any new entity found +during this operation is also persisted and ``prePersist`` called +on it. This is called "persistence by reachability". + +In both cases you get passed a ``LifecycleEventArgs`` instance +which has access to the entity and the entity manager. + +The following restrictions apply to ``prePersist``: + + +- If you are using a PrePersist Identity Generator such as + sequences the ID value will *NOT* be available within any + PrePersist events. +- Doctrine will not recognize changes made to relations in a prePersist + event. This includes modifications to + collections such as additions, removals or replacement. + +preRemove +~~~~~~~~~ + +The ``preRemove`` event is called on every entity when its passed +to the ``EntityManager#remove()`` method. It is cascaded for all +associations that are marked as cascade delete. + +There are no restrictions to what methods can be called inside the +``preRemove`` event, except when the remove method itself was +called during a flush operation. + +preFlush +~~~~~~~~ + +``preFlush`` is called at ``EntityManager#flush()`` before +anything else. ``EntityManager#flush()`` can be called safely +inside its listeners. + +.. code-block:: php + + getEntityManager(); + $uow = $em->getUnitOfWork(); + + foreach ($uow->getScheduledEntityInsertions() as $entity) { + + } + + foreach ($uow->getScheduledEntityUpdates() as $entity) { + + } + + foreach ($uow->getScheduledEntityDeletions() as $entity) { + + } + + foreach ($uow->getScheduledCollectionDeletions() as $col) { + + } + + foreach ($uow->getScheduledCollectionUpdates() as $col) { + + } + } + } + +The following restrictions apply to the onFlush event: + + +- If you create and persist a new entity in ``onFlush``, then + calling ``EntityManager#persist()`` is not enough. + You have to execute an additional call to + ``$unitOfWork->computeChangeSet($classMetadata, $entity)``. +- Changing primitive fields or associations requires you to + explicitly trigger a re-computation of the changeset of the + affected entity. This can be done by calling + ``$unitOfWork->recomputeSingleEntityChangeSet($classMetadata, $entity)``. + +postFlush +~~~~~~~~~ + +``postFlush`` is called at the end of ``EntityManager#flush()``. +``EntityManager#flush()`` can **NOT** be called safely inside its listeners. + +.. code-block:: php + + getEntity() instanceof User) { + if ($eventArgs->hasChangedField('name') && $eventArgs->getNewValue('name') == 'Alice') { + $eventArgs->setNewValue('name', 'Bob'); + } + } + } + } + +You could also use this listener to implement validation of all the +fields that have changed. This is more efficient than using a +lifecycle callback when there are expensive validations to call: + +.. code-block:: php + + getEntity() instanceof Account) { + if ($eventArgs->hasChangedField('creditCard')) { + $this->validateCreditCard($eventArgs->getNewValue('creditCard')); + } + } + } + + private function validateCreditCard($no) + { + // throw an exception to interrupt flush event. Transaction will be rolled back. + } + } + +Restrictions for this event: + + +- Changes to associations of the passed entities are not + recognized by the flush operation anymore. +- Changes to fields of the passed entities are not recognized by + the flush operation anymore, use the computed change-set passed to + the event to modify primitive field values, e.g. use + ``$eventArgs->setNewValue($field, $value);`` as in the Alice to Bob example above. +- Any calls to ``EntityManager#persist()`` or + ``EntityManager#remove()``, even in combination with the UnitOfWork + API are strongly discouraged and don't work as expected outside the + flush operation. + +postUpdate, postRemove, postPersist +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The three post events are called inside ``EntityManager#flush()``. +Changes in here are not relevant to the persistence in the +database, but you can use these events to alter non-persistable items, +like non-mapped fields, logging or even associated classes that are +directly mapped by Doctrine. + +postLoad +~~~~~~~~ + +This event is called after an entity is constructed by the +EntityManager. + +Entity listeners +---------------- + +.. versionadded:: 2.4 + +An entity listener is a lifecycle listener class used for an entity. + +- The entity listener's mapping may be applied to an entity class or mapped superclass. +- An entity listener is defined by mapping the entity class with the corresponding mapping. + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + .. code-block:: yaml + + MyProject\Entity\User: + type: entity + entityListeners: + UserListener: + # .... + +.. _reference-entity-listeners: + +Entity listeners class +~~~~~~~~~~~~~~~~~~~~~~ + +An ``Entity Listener`` could be any class, by default it should be a class with a no-arg constructor. + +- Different from :ref:`reference-events-implementing-listeners` an ``Entity Listener`` is invoked just to the specified entity +- An entity listener method receives two arguments, the entity instance and the lifecycle event. +- The callback method can be defined by naming convention or specifying a method mapping. +- When a listener mapping is not given the parser will use the naming convention to look for a matching method, + e.g. it will look for a public ``preUpdate()`` method if you are listening to the ``preUpdate`` event. +- When a listener mapping is given the parser will not look for any methods using the naming convention. + +.. code-block:: php + + + + + + + + + + + + + + + + + + + + + + .. code-block:: yaml + + MyProject\Entity\User: + type: entity + entityListeners: + UserListener: + preFlush: [preFlushHandler] + postLoad: [postLoadHandler] + + postPersist: [postPersistHandler] + prePersist: [prePersistHandler] + + postUpdate: [postUpdateHandler] + preUpdate: [preUpdateHandler] + + postRemove: [postRemoveHandler] + preRemove: [preRemoveHandler] + # .... + + + +Entity listeners resolver +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Doctrine invokes the listener resolver to get the listener instance. + +- A resolver allows you register a specific entity listener instance. +- You can also implement your own resolver by extending ``Doctrine\ORM\Mapping\DefaultEntityListenerResolver`` or implementing ``Doctrine\ORM\Mapping\EntityListenerResolver`` + +Specifying an entity listener instance : + +.. code-block:: php + + service = $service; + } + + public function preUpdate(User $user, PreUpdateEventArgs $event) + { + $this->service->doSomething($user); + } + } + + // register a entity listener. + $listener = $container->get('user_listener'); + $em->getConfiguration()->getEntityListenerResolver()->register($listener); + +Implementing your own resolver : + +.. code-block:: php + + container = $container; + } + + public function resolve($className) + { + // resolve the service id by the given class name; + $id = 'user_listener'; + + return $this->container->get($id); + } + } + + // Configure the listener resolver only before instantiating the EntityManager + $configurations->setEntityListenerResolver(new MyEntityListenerResolver); + EntityManager::create(.., $configurations, ..); + +Load ClassMetadata Event +------------------------ + +When the mapping information for an entity is read, it is populated +in to a ``ClassMetadataInfo`` instance. You can hook in to this +process and manipulate the instance. + +.. code-block:: php + + getMetadataFactory(); + $evm = $em->getEventManager(); + $evm->addEventListener(Events::loadClassMetadata, $test); + + class TestEvent + { + public function loadClassMetadata(\Doctrine\ORM\Event\LoadClassMetadataEventArgs $eventArgs) + { + $classMetadata = $eventArgs->getClassMetadata(); + $fieldMapping = array( + 'fieldName' => 'about', + 'type' => 'string', + 'length' => 255 + ); + $classMetadata->mapField($fieldMapping); + } + } + + diff --git a/vendor/doctrine/orm/docs/en/reference/faq.rst b/vendor/doctrine/orm/docs/en/reference/faq.rst new file mode 100644 index 0000000000000000000000000000000000000000..45fde18d7e03020f07b6b3eed6386f49cd8a1439 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/faq.rst @@ -0,0 +1,224 @@ +Frequently Asked Questions +========================== + +.. note:: + + This FAQ is a work in progress. We will add lots of questions and not answer them right away just to remember + what is often asked. If you stumble across an unanswered question please write a mail to the mailing-list or + join the #doctrine channel on Freenode IRC. + +Database Schema +--------------- + +How do I set the charset and collation for MySQL tables? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can't set these values inside the annotations, yml or xml mapping files. To make a database +work with the default charset and collation you should configure MySQL to use it as default charset, +or create the database with charset and collation details. This way they get inherited to all newly +created database tables and columns. + +Entity Classes +-------------- + +I access a variable and its null, what is wrong? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If this variable is a public variable then you are violating one of the criteria for entities. +All properties have to be protected or private for the proxy object pattern to work. + +How can I add default values to a column? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Doctrine does not support to set the default values in columns through the "DEFAULT" keyword in SQL. +This is not necessary however, you can just use your class properties as default values. These are then used +upon insert: + +.. code-block:: php + + class User + { + const STATUS_DISABLED = 0; + const STATUS_ENABLED = 1; + + private $algorithm = "sha1"; + private $status = self:STATUS_DISABLED; + } + +. + +Mapping +------- + +Why do I get exceptions about unique constraint failures during ``$em->flush()``? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Doctrine does not check if you are re-adding entities with a primary key that already exists +or adding entities to a collection twice. You have to check for both conditions yourself +in the code before calling ``$em->flush()`` if you know that unique constraint failures +can occur. + +In `Symfony2 `_ for example there is a Unique Entity Validator +to achieve this task. + +For collections you can check with ``$collection->contains($entity)`` if an entity is already +part of this collection. For a FETCH=LAZY collection this will initialize the collection, +however for FETCH=EXTRA_LAZY this method will use SQL to determine if this entity is already +part of the collection. + +Associations +------------ + +What is wrong when I get an InvalidArgumentException "A new entity was found through the relationship.."? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This exception is thrown during ``EntityManager#flush()`` when there exists an object in the identity map +that contains a reference to an object that Doctrine does not know about. Say for example you grab +a "User"-entity from the database with a specific id and set a completely new object into one of the associations +of the User object. If you then call ``EntityManager#flush()`` without letting Doctrine know about +this new object using ``EntityManager#persist($newObject)`` you will see this exception. + +You can solve this exception by: + +* Calling ``EntityManager#persist($newObject)`` on the new object +* Using cascade=persist on the association that contains the new object + +How can I filter an association? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Natively you can't filter associations in 2.0 and 2.1. You should use DQL queries to query for the filtered set of entities. + +I call clear() on a One-To-Many collection but the entities are not deleted +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This is an expected behavior that has to do with the inverse/owning side handling of Doctrine. +By definition a One-To-Many association is on the inverse side, that means changes to it +will not be recognized by Doctrine. + +If you want to perform the equivalent of the clear operation you have to iterate the +collection and set the owning side many-to-one reference to NULL as well to detach all entities +from the collection. This will trigger the appropriate UPDATE statements on the database. + +How can I add columns to a many-to-many table? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The many-to-many association is only supporting foreign keys in the table definition +To work with many-to-many tables containing extra columns you have to use the +foreign keys as primary keys feature of Doctrine introduced in version 2.1. + +See :doc:`the tutorial on composite primary keys for more information<../tutorials/composite-primary-keys>`. + + +How can i paginate fetch-joined collections? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you are issuing a DQL statement that fetches a collection as well you cannot easily iterate +over this collection using a LIMIT statement (or vendor equivalent). + +Doctrine does not offer a solution for this out of the box but there are several extensions +that do: + +* `DoctrineExtensions `_ +* `Pagerfanta `_ + +Why does pagination not work correctly with fetch joins? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Pagination in Doctrine uses a LIMIT clause (or vendor equivalent) to restrict the results. +However when fetch-joining this is not returning the correct number of results since joining +with a one-to-many or many-to-many association multiplies the number of rows by the number +of associated entities. + +See the previous question for a solution to this task. + +Inheritance +----------- + +Can I use Inheritance with Doctrine 2? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Yes, you can use Single- or Joined-Table Inheritance in Doctrine 2. + +See the documentation chapter on :doc:`inheritance mapping ` for +the details. + +Why does Doctrine not create proxy objects for my inheritance hierarchy? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you set a many-to-one or one-to-one association target-entity to any parent class of +an inheritance hierarchy Doctrine does not know what PHP class the foreign is actually of. +To find this out it has to execute a SQL query to look this information up in the database. + +EntityGenerator +--------------- + +Why does the EntityGenerator not do X? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The EntityGenerator is not a full fledged code-generator that solves all tasks. Code-Generation +is not a first-class priority in Doctrine 2 anymore (compared to Doctrine 1). The EntityGenerator +is supposed to kick-start you, but not towards 100%. + +Why does the EntityGenerator not generate inheritance correctly? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Just from the details of the discriminator map the EntityGenerator cannot guess the inheritance hierarchy. +This is why the generation of inherited entities does not fully work. You have to adjust some additional +code to get this one working correctly. + +Performance +----------- + +Why is an extra SQL query executed every time I fetch an entity with a one-to-one relation? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If Doctrine detects that you are fetching an inverse side one-to-one association +it has to execute an additional query to load this object, because it cannot know +if there is no such object (setting null) or if it should set a proxy and which id this proxy has. + +To solve this problem currently a query has to be executed to find out this information. + +Doctrine Query Language +----------------------- + +What is DQL? +~~~~~~~~~~~~ + +DQL stands for Doctrine Query Language, a query language that very much looks like SQL +but has some important benefits when using Doctrine: + +- It uses class names and fields instead of tables and columns, separating concerns between backend and your object model. +- It utilizes the metadata defined to offer a range of shortcuts when writing. For example you do not have to specify the ON clause of joins, since Doctrine already knows about them. +- It adds some functionality that is related to object management and transforms them into SQL. + +It also has some drawbacks of course: + +- The syntax is slightly different to SQL so you have to learn and remember the differences. +- To be vendor independent it can only implement a subset of all the existing SQL dialects. Vendor specific functionality and optimizations cannot be used through DQL unless implemented by you explicitly. +- For some DQL constructs subselects are used which are known to be slow in MySQL. + +Can I sort by a function (for example ORDER BY RAND()) in DQL? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +No, it is not supported to sort by function in DQL. If you need this functionality you should either +use a native-query or come up with another solution. As a side note: Sorting with ORDER BY RAND() is painfully slow +starting with 1000 rows. + +A Query fails, how can I debug it? +---------------------------------- + +First, if you are using the QueryBuilder you can use +``$queryBuilder->getDQL()`` to get the DQL string of this query. The +corresponding SQL you can get from the Query instance by calling +``$query->getSQL()``. + +.. code-block:: php + + createQuery($dql); + var_dump($query->getSQL()); + + $qb = $entityManager->createQueryBuilder(); + $qb->select('u')->from('User', 'u'); + var_dump($qb->getDQL()); diff --git a/vendor/doctrine/orm/docs/en/reference/filters.rst b/vendor/doctrine/orm/docs/en/reference/filters.rst new file mode 100644 index 0000000000000000000000000000000000000000..a5c0ee4cf144c5cbb772e64c56c2ea5f0a6e25d5 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/filters.rst @@ -0,0 +1,93 @@ +Filters +======= + +.. versionadded:: 2.2 + +Doctrine 2.2 features a filter system that allows the developer to add SQL to +the conditional clauses of queries, regardless the place where the SQL is +generated (e.g. from a DQL query, or by loading associated entities). + +The filter functionality works on SQL level. Whether a SQL query is generated +in a Persister, during lazy loading, in extra lazy collections or from DQL. +Each time the system iterates over all the enabled filters, adding a new SQL +part as a filter returns. + +By adding SQL to the conditional clauses of queries, the filter system filters +out rows belonging to the entities at the level of the SQL result set. This +means that the filtered entities are never hydrated (which can be expensive). + + +Example filter class +-------------------- +Throughout this document the example ``MyLocaleFilter`` class will be used to +illustrate how the filter feature works. A filter class must extend the base +``Doctrine\ORM\Query\Filter\SQLFilter`` class and implement the ``addFilterConstraint`` +method. The method receives the ``ClassMetadata`` of the filtered entity and the +table alias of the SQL table of the entity. + +.. note:: + + In the case of joined or single table inheritance, you always get passed the ClassMetadata of the + inheritance root. This is necessary to avoid edge cases that would break the SQL when applying the filters. + +Parameters for the query should be set on the filter object by +``SQLFilter#setParameter()``. Only parameters set via this function can be used +in filters. The ``SQLFilter#getParameter()`` function takes care of the +proper quoting of parameters. + +.. code-block:: php + + reflClass->implementsInterface('LocaleAware')) { + return ""; + } + + return $targetTableAlias.'.locale = ' . $this->getParameter('locale'); // getParameter applies quoting automatically + } + } + + +Configuration +------------- +Filter classes are added to the configuration as following: + +.. code-block:: php + + addFilter("locale", "\Doctrine\Tests\ORM\Functional\MyLocaleFilter"); + + +The ``Configuration#addFilter()`` method takes a name for the filter and the name of the +class responsible for the actual filtering. + + +Disabling/Enabling Filters and Setting Parameters +--------------------------------------------------- +Filters can be disabled and enabled via the ``FilterCollection`` which is +stored in the ``EntityManager``. The ``FilterCollection#enable($name)`` method +will retrieve the filter object. You can set the filter parameters on that +object. + +.. code-block:: php + + getFilters()->enable("locale"); + $filter->setParameter('locale', 'en'); + + // Disable it + $filter = $em->getFilters()->disable("locale"); + +.. warning:: + Disabling and enabling filters has no effect on managed entities. If you + want to refresh or reload an object after having modified a filter or the + FilterCollection, then you should clear the EntityManager and re-fetch your + entities, having the new rules for filtering applied. diff --git a/vendor/doctrine/orm/docs/en/reference/improving-performance.rst b/vendor/doctrine/orm/docs/en/reference/improving-performance.rst new file mode 100644 index 0000000000000000000000000000000000000000..d9de6c80863a0f1c7b324fd25a48d5b46709fd4b --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/improving-performance.rst @@ -0,0 +1,68 @@ +Improving Performance +===================== + +Bytecode Cache +-------------- + +It is highly recommended to make use of a bytecode cache like APC. +A bytecode cache removes the need for parsing PHP code on every +request and can greatly improve performance. + + "If you care about performance and don't use a bytecode + cache then you don't really care about performance. Please get one + and start using it." + + *Stas Malyshev, Core Contributor to PHP and Zend Employee* + + +Metadata and Query caches +------------------------- + +As already mentioned earlier in the chapter about configuring +Doctrine, it is strongly discouraged to use Doctrine without a +Metadata and Query cache (preferably with APC or Memcache as the +cache driver). Operating Doctrine without these caches means +Doctrine will need to load your mapping information on every single +request and has to parse each DQL query on every single request. +This is a waste of resources. + +Alternative Query Result Formats +-------------------------------- + +Make effective use of the available alternative query result +formats like nested array graphs or pure scalar results, especially +in scenarios where data is loaded for read-only purposes. + +Read-Only Entities +------------------ + +Starting with Doctrine 2.1 you can mark entities as read only (See metadata mapping +references for details). This means that the entity marked as read only is never considered +for updates, which means when you call flush on the EntityManager these entities are skipped +even if properties changed. Read-Only allows to persist new entities of a kind and remove existing +ones, they are just not considered for updates. + +Extra-Lazy Collections +---------------------- + +If entities hold references to large collections you will get performance and memory problems initializing them. +To solve this issue you can use the EXTRA_LAZY fetch-mode feature for collections. See the :doc:`tutorial <../tutorials/extra-lazy-associations>` +for more information on how this fetch mode works. + +Temporarily change fetch mode in DQL +------------------------------------ + +See :ref:`Doctrine Query Language chapter ` + + +Apply Best Practices +-------------------- + +A lot of the points mentioned in the Best Practices chapter will +also positively affect the performance of Doctrine. + + +Change Tracking policies +------------------------ + +See: :doc:`Change Tracking Policies ` diff --git a/vendor/doctrine/orm/docs/en/reference/inheritance-mapping.rst b/vendor/doctrine/orm/docs/en/reference/inheritance-mapping.rst new file mode 100644 index 0000000000000000000000000000000000000000..9a0d3c208d3179d07ca850ccad60c220ddb955bc --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/inheritance-mapping.rst @@ -0,0 +1,605 @@ +Inheritance Mapping +=================== + +Mapped Superclasses +------------------- + +A mapped superclass is an abstract or concrete class that provides +persistent entity state and mapping information for its subclasses, +but which is not itself an entity. Typically, the purpose of such a +mapped superclass is to define state and mapping information that +is common to multiple entity classes. + +Mapped superclasses, just as regular, non-mapped classes, can +appear in the middle of an otherwise mapped inheritance hierarchy +(through Single Table Inheritance or Class Table Inheritance). + +.. note:: + + A mapped superclass cannot be an entity, it is not query-able and + persistent relationships defined by a mapped superclass must be + unidirectional (with an owning side only). This means that One-To-Many + associations are not possible on a mapped superclass at all. + Furthermore Many-To-Many associations are only possible if the + mapped superclass is only used in exactly one entity at the moment. + For further support of inheritance, the single or + joined table inheritance features have to be used. + + +Example: + +.. code-block:: php + + `_ +is an inheritance mapping strategy where all classes of a hierarchy +are mapped to a single database table. In order to distinguish +which row represents which type in the hierarchy a so-called +discriminator column is used. + +Example: + +.. configuration-block:: + + .. code-block:: php + + `_ +is an inheritance mapping strategy where each class in a hierarchy +is mapped to several tables: its own table and the tables of all +parent classes. The table of a child class is linked to the table +of a parent class through a foreign key constraint. Doctrine 2 +implements this strategy through the use of a discriminator column +in the topmost table of the hierarchy because this is the easiest +way to achieve polymorphic queries with Class Table Inheritance. + +Example: + +.. code-block:: php + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .. code-block:: yaml + + # user mapping + MyProject\Model\User: + type: mappedSuperclass + # other fields mapping + manyToOne: + address: + targetEntity: Address + joinColumn: + name: address_id + referencedColumnName: id + cascade: [ persist, merge ] + manyToMany: + groups: + targetEntity: Group + joinTable: + name: users_groups + joinColumns: + user_id: + referencedColumnName: id + inverseJoinColumns: + group_id: + referencedColumnName: id + cascade: [ persist, merge, detach ] + + # admin mapping + MyProject\Model\Admin: + type: entity + associationOverride: + address: + joinColumn: + adminaddress_id: + name: adminaddress_id + referencedColumnName: id + groups: + joinTable: + name: users_admingroups + joinColumns: + adminuser_id: + referencedColumnName: id + inverseJoinColumns: + admingroup_id: + referencedColumnName: id + + +Things to note: + +- The "association override" specifies the overrides base on the property name. +- This feature is available for all kind of associations. (OneToOne, OneToMany, ManyToOne, ManyToMany) +- The association type *CANNOT* be changed. +- The override could redefine the joinTables or joinColumns depending on the association type. + +Attribute Override +~~~~~~~~~~~~~~~~~~~~ +Override the mapping of a field. + +Could be used by an entity that extends a mapped superclass to override a field mapping defined by the mapped superclass. + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .. code-block:: yaml + + # user mapping + MyProject\Model\User: + type: mappedSuperclass + id: + id: + type: integer + column: user_id + length: 150 + generator: + strategy: AUTO + fields: + name: + type: string + column: user_name + length: 250 + nullable: true + unique: false + #other fields mapping + + + # guest mapping + MyProject\Model\Guest: + type: entity + attributeOverride: + id: + column: guest_id + type: integer + length: 140 + name: + column: guest_name + type: string + length: 240 + nullable: false + unique: true + +Things to note: + +- The "attribute override" specifies the overrides base on the property name. +- The column type *CANNOT* be changed. If the column type is not equal you get a ``MappingException`` +- The override can redefine all the columns except the type. + +Query the Type +-------------- + +It may happen that the entities of a special type should be queried. Because there +is no direct access to the discriminator column, Doctrine provides the +``INSTANCE OF`` construct. + +The following example shows how to use ``INSTANCE OF``. There is a three level hierarchy +with a base entity ``NaturalPerson`` which is extended by ``Staff`` which in turn +is extended by ``Technician``. + +Querying for the staffs without getting any technicians can be achieved by this DQL: + +.. code-block:: php + + createQuery("SELECT staff FROM MyProject\Model\Staff staff WHERE staff NOT INSTANCE OF MyProject\Model\Technician"); + $staffs = $query->getResult(); diff --git a/vendor/doctrine/orm/docs/en/reference/installation.rst b/vendor/doctrine/orm/docs/en/reference/installation.rst new file mode 100644 index 0000000000000000000000000000000000000000..8b732ad6058f62ed98f27cce31f68f0b7312af52 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/installation.rst @@ -0,0 +1,5 @@ +Installation +============ + +The installation chapter has moved to `Installation and Configuration +`_. diff --git a/vendor/doctrine/orm/docs/en/reference/limitations-and-known-issues.rst b/vendor/doctrine/orm/docs/en/reference/limitations-and-known-issues.rst new file mode 100644 index 0000000000000000000000000000000000000000..49976f12ba673c50003cd874e5f315d4bfdbb4ca --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/limitations-and-known-issues.rst @@ -0,0 +1,184 @@ +Limitations and Known Issues +============================ + +We try to make using Doctrine2 a very pleasant experience. +Therefore we think it is very important to be honest about the +current limitations to our users. Much like every other piece of +software Doctrine2 is not perfect and far from feature complete. +This section should give you an overview of current limitations of +Doctrine 2 as well as critical known issues that you should know +about. + +Current Limitations +------------------- + +There is a set of limitations that exist currently which might be +solved in the future. Any of this limitations now stated has at +least one ticket in the Tracker and is discussed for future +releases. + +Join-Columns with non-primary keys +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It is not possible to use join columns pointing to non-primary keys. Doctrine will think these are the primary +keys and create lazy-loading proxies with the data, which can lead to unexpected results. Doctrine can for performance +reasons not validate the correctness of this settings at runtime but only through the Validate Schema command. + +Mapping Arrays to a Join Table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Related to the previous limitation with "Foreign Keys as +Identifier" you might be interested in mapping the same table +structure as given above to an array. However this is not yet +possible either. See the following example: + +.. code-block:: sql + + CREATE TABLE product ( + id INTEGER, + name VARCHAR, + PRIMARY KEY(id) + ); + + CREATE TABLE product_attributes ( + product_id INTEGER, + attribute_name VARCHAR, + attribute_value VARCHAR, + PRIMARY KEY (product_id, attribute_name) + ); + +This schema should be mapped to a Product Entity as follows: + +.. code-block:: php + + class Product + { + private $id; + private $name; + private $attributes = array(); + } + +Where the ``attribute_name`` column contains the key and +``attribute_value`` contains the value of each array element in +``$attributes``. + +The feature request for persistence of primitive value arrays +`is described in the DDC-298 ticket `_. + +Cascade Merge with Bi-directional Associations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are two bugs now that concern the use of cascade merge in combination with bi-directional associations. +Make sure to study the behavior of cascade merge if you are using it: + +- `DDC-875 `_ Merge can sometimes add the same entity twice into a collection +- `DDC-763 `_ Cascade merge on associated entities can insert too many rows through "Persistence by Reachability" + +Custom Persisters +~~~~~~~~~~~~~~~~~ + +A Persister in Doctrine is an object that is responsible for the +hydration and write operations of an entity against the database. +Currently there is no way to overwrite the persister implementation +for a given entity, however there are several use-cases that can +benefit from custom persister implementations: + + +- `Add Upsert Support `_ +- `Evaluate possible ways in which stored-procedures can be used `_ +- The previous Filter Rules Feature Request + +Persist Keys of Collections +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +PHP Arrays are ordered hash-maps and so should be the +``Doctrine\Common\Collections\Collection`` interface. We plan to +evaluate a feature that optionally persists and hydrates the keys +of a Collection instance. + +`Ticket DDC-213 `_ + +Mapping many tables to one entity +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It is not possible to map several equally looking tables onto one +entity. For example if you have a production and an archive table +of a certain business concept then you cannot have both tables map +to the same entity. + +Behaviors +~~~~~~~~~ + +Doctrine 2 will **never** include a behavior system like Doctrine 1 +in the core library. We don't think behaviors add more value than +they cost pain and debugging hell. Please see the many different +blog posts we have written on this topics: + +- `Doctrine2 "Behaviors" in a Nutshell `_ +- `A re-usable Versionable behavior for Doctrine2 `_ +- `Write your own ORM on top of Doctrine2 `_ +- `Doctrine 2 Behavioral Extensions `_ +- `Doctrator _ + +Doctrine 2 has enough hooks and extension points so that **you** can +add whatever you want on top of it. None of this will ever become +core functionality of Doctrine2 however, you will have to rely on +third party extensions for magical behaviors. + +Nested Set +~~~~~~~~~~ + +NestedSet was offered as a behavior in Doctrine 1 and will not be +included in the core of Doctrine 2. However there are already two +extensions out there that offer support for Nested Set with +Doctrine 2: + + +- `Doctrine2 Hierarchical-Structural Behavior `_ +- `Doctrine2 NestedSet `_ + +Known Issues +------------ + +The Known Issues section describes critical/blocker bugs and other +issues that are either complicated to fix, not fixable due to +backwards compatibility issues or where no simple fix exists (yet). +We don't plan to add every bug in the tracker there, just those +issues that can potentially cause nightmares or pain of any sort. + +See the Open Bugs on Jira for more details on `bugs, improvement and feature +requests +`_. + +Identifier Quoting and Legacy Databases +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For compatibility reasons between all the supported vendors and +edge case problems Doctrine 2 does **NOT** do automatic identifier +quoting. This can lead to problems when trying to get +legacy-databases to work with Doctrine 2. + + +- You can quote column-names as described in the + :doc:`Basic-Mapping ` section. +- You cannot quote join column names. +- You cannot use non [a-zA-Z0-9\_]+ characters, they will break + several SQL statements. + +Having problems with these kind of column names? Many databases +support all CRUD operations on views that semantically map to +certain tables. You can create views for all your problematic +tables and column names to avoid the legacy quoting nightmare. + +Microsoft SQL Server and Doctrine "datetime" +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Doctrine assumes that you use ``DateTime2`` data-types. If your legacy database contains DateTime +datatypes then you have to add your own data-type (see Basic Mapping for an example). + +MySQL with MyISAM tables +~~~~~~~~~~~~~~~~~~~~~~~~ + +Doctrine cannot provide atomic operations when calling ``EntityManager#flush()`` if one +of the tables involved uses the storage engine MyISAM. You must use InnoDB or +other storage engines that support transactions if you need integrity. diff --git a/vendor/doctrine/orm/docs/en/reference/metadata-drivers.rst b/vendor/doctrine/orm/docs/en/reference/metadata-drivers.rst new file mode 100644 index 0000000000000000000000000000000000000000..6b9cb31e42cafe30b6ac921d3770680ef7f99392 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/metadata-drivers.rst @@ -0,0 +1,194 @@ +Metadata Drivers +================ + +The heart of an object relational mapper is the mapping information +that glues everything together. It instructs the EntityManager how +it should behave when dealing with the different entities. + +Core Metadata Drivers +--------------------- + +Doctrine provides a few different ways for you to specify your +metadata: + + +- **XML files** (XmlDriver) +- **Class DocBlock Annotations** (AnnotationDriver) +- **YAML files** (YamlDriver) +- **PHP Code in files or static functions** (PhpDriver) + +Something important to note about the above drivers is they are all +an intermediate step to the same end result. The mapping +information is populated to ``Doctrine\ORM\Mapping\ClassMetadata`` +instances. So in the end, Doctrine only ever has to work with the +API of the ``ClassMetadata`` class to get mapping information for +an entity. + +.. note:: + + The populated ``ClassMetadata`` instances are also cached + so in a production environment the parsing and populating only ever + happens once. You can configure the metadata cache implementation + using the ``setMetadataCacheImpl()`` method on the + ``Doctrine\ORM\Configuration`` class: + + .. code-block:: php + + getConfiguration()->setMetadataCacheImpl(new ApcCache()); + + +If you want to use one of the included core metadata drivers you +just need to configure it. All the drivers are in the +``Doctrine\ORM\Mapping\Driver`` namespace: + +.. code-block:: php + + getConfiguration()->setMetadataDriverImpl($driver); + +Implementing Metadata Drivers +----------------------------- + +In addition to the included metadata drivers you can very easily +implement your own. All you need to do is define a class which +implements the ``Driver`` interface: + +.. code-block:: php + + _loadMappingFile($file); + + // populate ClassMetadataInfo instance from $data + } + + /** + * {@inheritdoc} + */ + protected function _loadMappingFile($file) + { + // parse contents of $file and return php data structure + } + } + +.. note:: + + When using the ``AbstractFileDriver`` it requires that you + only have one entity defined per file and the file named after the + class described inside where namespace separators are replaced by + periods. So if you have an entity named ``Entities\User`` and you + wanted to write a mapping file for your driver above you would need + to name the file ``Entities.User.dcm.ext`` for it to be + recognized. + + +Now you can use your ``MyMetadataDriver`` implementation by setting +it with the ``setMetadataDriverImpl()`` method: + +.. code-block:: php + + getConfiguration()->setMetadataDriverImpl($driver); + +ClassMetadata +------------- + +The last piece you need to know and understand about metadata in +Doctrine 2 is the API of the ``ClassMetadata`` classes. You need to +be familiar with them in order to implement your own drivers but +more importantly to retrieve mapping information for a certain +entity when needed. + +You have all the methods you need to manually specify the mapping +information instead of using some mapping file to populate it from. +The base ``ClassMetadataInfo`` class is responsible for only data +storage and is not meant for runtime use. It does not require that +the class actually exists yet so it is useful for describing some +entity before it exists and using that information to generate for +example the entities themselves. The class ``ClassMetadata`` +extends ``ClassMetadataInfo`` and adds some functionality required +for runtime usage and requires that the PHP class is present and +can be autoloaded. + +You can read more about the API of the ``ClassMetadata`` classes in +the PHP Mapping chapter. + +Getting ClassMetadata Instances +------------------------------- + +If you want to get the ``ClassMetadata`` instance for an entity in +your project to programmatically use some mapping information to +generate some HTML or something similar you can retrieve it through +the ``ClassMetadataFactory``: + +.. code-block:: php + + getMetadataFactory(); + $class = $cmf->getMetadataFor('MyEntityName'); + +Now you can learn about the entity and use the data stored in the +``ClassMetadata`` instance to get all mapped fields for example and +iterate over them: + +.. code-block:: php + + fieldMappings as $fieldMapping) { + echo $fieldMapping['fieldName'] . "\n"; + } + + diff --git a/vendor/doctrine/orm/docs/en/reference/namingstrategy.rst b/vendor/doctrine/orm/docs/en/reference/namingstrategy.rst new file mode 100644 index 0000000000000000000000000000000000000000..9d82d8d8b7d74db1cf861aeda9a4fc21884edb1f --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/namingstrategy.rst @@ -0,0 +1,150 @@ +Implementing a NamingStrategy +============================== + +.. versionadded:: 2.3 + +Using a naming strategy you can provide rules for automatically generating +database identifiers, columns and tables names +when the table/column name is not given. +This feature helps reduce the verbosity of the mapping document, +eliminating repetitive noise (eg: ``TABLE_``). + + +Configuring a naming strategy +----------------------------- +The default strategy used by Doctrine is quite minimal. + +By default the ``Doctrine\ORM\Mapping\DefaultNamingStrategy`` +uses the simple class name and the attributes names to generate tables and columns + +You can specify a different strategy by calling ``Doctrine\ORM\Configuration#setNamingStrategy()`` : + +.. code-block:: php + + setNamingStrategy($namingStrategy); + +Underscore naming strategy +--------------------------- + +``\Doctrine\ORM\Mapping\UnderscoreNamingStrategy`` is a built-in strategy +that might be a useful if you want to use a underlying convention. + +.. code-block:: php + + setNamingStrategy($namingStrategy); + +Then SomeEntityName will generate the table SOME_ENTITY_NAME when CASE_UPPER +or some_entity_name using CASE_LOWER is given. + + +Naming strategy interface +------------------------- +The interface ``Doctrine\ORM\Mapping\NamingStrategy`` allows you to specify +a "naming standard" for database tables and columns. + +.. code-block:: php + + referenceColumnName(); + } + public function joinTableName($sourceEntity, $targetEntity, $propertyName = null) + { + return strtolower($this->classToTableName($sourceEntity) . '_' . + $this->classToTableName($targetEntity)); + } + public function joinKeyColumnName($entityName, $referencedColumnName = null) + { + return strtolower($this->classToTableName($entityName) . '_' . + ($referencedColumnName ?: $this->referenceColumnName())); + } + } + +Configuring the namingstrategy is easy if. +Just set your naming strategy calling ``Doctrine\ORM\Configuration#setNamingStrategy()`` :. + +.. code-block:: php + + setNamingStrategy($namingStrategy); diff --git a/vendor/doctrine/orm/docs/en/reference/native-sql.rst b/vendor/doctrine/orm/docs/en/reference/native-sql.rst new file mode 100644 index 0000000000000000000000000000000000000000..75231b7a99bc9557b8187576dba5807608cdd2a9 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/native-sql.rst @@ -0,0 +1,905 @@ +Native SQL +========== + +With ``NativeQuery`` you can execute native SELECT SQL statements +and map the results to Doctrine entities or any other result format +supported by Doctrine. + +In order to make this mapping possible, you need to describe +to Doctrine what columns in the result map to which entity property. +This description is represented by a ``ResultSetMapping`` object. + +With this feature you can map arbitrary SQL code to objects, such as highly +vendor-optimized SQL or stored-procedures. + +Writing ``ResultSetMapping`` from scratch is complex, but there is a convenience +wrapper around it called a ``ResultSetMappingBuilder``. It can generate +the mappings for you based on Entities and even generates the ``SELECT`` +clause based on this information for you. + +.. note:: + + If you want to execute DELETE, UPDATE or INSERT statements + the Native SQL API cannot be used and will probably throw errors. + Use ``EntityManager#getConnection()`` to access the native database + connection and call the ``executeUpdate()`` method for these + queries. + +The NativeQuery class +--------------------- + +To create a ``NativeQuery`` you use the method +``EntityManager#createNativeQuery($sql, $resultSetMapping)``. As you can see in +the signature of this method, it expects 2 ingredients: The SQL you want to +execute and the ``ResultSetMapping`` that describes how the results will be +mapped. + +Once you obtained an instance of a ``NativeQuery``, you can bind parameters to +it with the same API that ``Query`` has and execute it. + +.. code-block:: php + + createNativeQuery('SELECT id, name, discr FROM users WHERE name = ?', $rsm); + $query->setParameter(1, 'romanb'); + + $users = $query->getResult(); + +ResultSetMappingBuilder +----------------------- + +An easy start into ResultSet mapping is the ``ResultSetMappingBuilder`` object. +This has several benefits: + +- The builder takes care of automatically updating your ``ResultSetMapping`` + when the fields or associations change on the metadata of an entity. +- You can generate the required ``SELECT`` expression for a builder + by converting it to a string. +- The API is much simpler than the usual ``ResultSetMapping`` API. + +One downside is that the builder API does not yet support entities +with inheritance hierachies. + +.. code-block:: php + + addRootEntityFromClassMetadata('MyProject\User', 'u'); + $rsm->addJoinedEntityFromClassMetadata('MyProject\Address', 'a', 'u', 'address', array('id' => 'address_id')); + +The builder extends the ``ResultSetMapping`` class and as such has all the functionality of it as well. + +.. versionadded:: 2.4 + +Starting with Doctrine ORM 2.4 you can generate the ``SELECT`` clause +from a ``ResultSetMappingBuilder``. You can either cast the builder +object to ``(string)`` and the DQL aliases are used as SQL table aliases +or use the ``generateSelectClause($tableAliases)`` method and pass +a mapping from DQL alias (key) to SQL alias (value) + +.. code-block:: php + + generateSelectClause(array( + 'u' => 't1', + 'g' => 't2' + )); + $sql = "SELECT " . $selectClause . " FROM users t1 JOIN groups t2 ON t1.group_id = t2.id"; + + +The ResultSetMapping +-------------------- + +Understanding the ``ResultSetMapping`` is the key to using a +``NativeQuery``. A Doctrine result can contain the following +components: + + +- Entity results. These represent root result elements. +- Joined entity results. These represent joined entities in + associations of root entity results. +- Field results. These represent a column in the result set that + maps to a field of an entity. A field result always belongs to an + entity result or joined entity result. +- Scalar results. These represent scalar values in the result set + that will appear in each result row. Adding scalar results to a + ResultSetMapping can also cause the overall result to become + **mixed** (see DQL - Doctrine Query Language) if the same + ResultSetMapping also contains entity results. +- Meta results. These represent columns that contain + meta-information, such as foreign keys and discriminator columns. + When querying for objects (``getResult()``), all meta columns of + root entities or joined entities must be present in the SQL query + and mapped accordingly using ``ResultSetMapping#addMetaResult``. + +.. note:: + + It might not surprise you that Doctrine uses + ``ResultSetMapping`` internally when you create DQL queries. As + the query gets parsed and transformed to SQL, Doctrine fills a + ``ResultSetMapping`` that describes how the results should be + processed by the hydration routines. + + +We will now look at each of the result types that can appear in a +ResultSetMapping in detail. + +Entity results +~~~~~~~~~~~~~~ + +An entity result describes an entity type that appears as a root +element in the transformed result. You add an entity result through +``ResultSetMapping#addEntityResult()``. Let's take a look at the +method signature in detail: + +.. code-block:: php + + addEntityResult('User', 'u'); + $rsm->addFieldResult('u', 'id', 'id'); + $rsm->addFieldResult('u', 'name', 'name'); + + $query = $this->_em->createNativeQuery('SELECT id, name FROM users WHERE name = ?', $rsm); + $query->setParameter(1, 'romanb'); + + $users = $query->getResult(); + +The result would look like this: + +.. code-block:: php + + array( + [0] => User (Object) + ) + +Note that this would be a partial object if the entity has more +fields than just id and name. In the example above the column and +field names are identical but that is not necessary, of course. +Also note that the query string passed to createNativeQuery is +**real native SQL**. Doctrine does not touch this SQL in any way. + +In the previous basic example, a User had no relations and the +table the class is mapped to owns no foreign keys. The next example +assumes User has a unidirectional or bidirectional one-to-one +association to a CmsAddress, where the User is the owning side and +thus owns the foreign key. + +.. code-block:: php + + addEntityResult('User', 'u'); + $rsm->addFieldResult('u', 'id', 'id'); + $rsm->addFieldResult('u', 'name', 'name'); + $rsm->addMetaResult('u', 'address_id', 'address_id'); + + $query = $this->_em->createNativeQuery('SELECT id, name, address_id FROM users WHERE name = ?', $rsm); + $query->setParameter(1, 'romanb'); + + $users = $query->getResult(); + +Foreign keys are used by Doctrine for lazy-loading purposes when +querying for objects. In the previous example, each user object in +the result will have a proxy (a "ghost") in place of the address +that contains the address\_id. When the ghost proxy is accessed, it +loads itself based on this key. + +Consequently, associations that are *fetch-joined* do not require +the foreign keys to be present in the SQL result set, only +associations that are lazy. + +.. code-block:: php + + addEntityResult('User', 'u'); + $rsm->addFieldResult('u', 'id', 'id'); + $rsm->addFieldResult('u', 'name', 'name'); + $rsm->addJoinedEntityResult('Address' , 'a', 'u', 'address'); + $rsm->addFieldResult('a', 'address_id', 'id'); + $rsm->addFieldResult('a', 'street', 'street'); + $rsm->addFieldResult('a', 'city', 'city'); + + $sql = 'SELECT u.id, u.name, a.id AS address_id, a.street, a.city FROM users u ' . + 'INNER JOIN address a ON u.address_id = a.id WHERE u.name = ?'; + $query = $this->_em->createNativeQuery($sql, $rsm); + $query->setParameter(1, 'romanb'); + + $users = $query->getResult(); + +In this case the nested entity ``Address`` is registered with the +``ResultSetMapping#addJoinedEntityResult`` method, which notifies +Doctrine that this entity is not hydrated at the root level, but as +a joined entity somewhere inside the object graph. In this case we +specify the alias 'u' as third parameter and ``address`` as fourth +parameter, which means the ``Address`` is hydrated into the +``User::$address`` property. + +If a fetched entity is part of a mapped hierarchy that requires a +discriminator column, this column must be present in the result set +as a meta column so that Doctrine can create the appropriate +concrete type. This is shown in the following example where we +assume that there are one or more subclasses that extend User and +either Class Table Inheritance or Single Table Inheritance is used +to map the hierarchy (both use a discriminator column). + +.. code-block:: php + + addEntityResult('User', 'u'); + $rsm->addFieldResult('u', 'id', 'id'); + $rsm->addFieldResult('u', 'name', 'name'); + $rsm->addMetaResult('u', 'discr', 'discr'); // discriminator column + $rsm->setDiscriminatorColumn('u', 'discr'); + + $query = $this->_em->createNativeQuery('SELECT id, name, discr FROM users WHERE name = ?', $rsm); + $query->setParameter(1, 'romanb'); + + $users = $query->getResult(); + +Note that in the case of Class Table Inheritance, an example as +above would result in partial objects if any objects in the result +are actually a subtype of User. When using DQL, Doctrine +automatically includes the necessary joins for this mapping +strategy but with native SQL it is your responsibility. + +Named Native Query +------------------ + +You can also map a native query using a named native query mapping. + +To achieve that, you must describe the SQL resultset structure +using named native query (and sql resultset mappings if is a several resultset mappings). + +Like named query, a named native query can be defined at class level or in a XML or YAML file. + + +A resultSetMapping parameter is defined in @NamedNativeQuery, +it represents the name of a defined @SqlResultSetMapping. + +.. configuration-block:: + + .. code-block:: php + + + + + + SELECT u.id AS u_id, u.name AS u_name, u.status AS u_status, a.id AS a_id, a.zip AS a_zip, a.country AS a_country, COUNT(p.phonenumber) AS numphones FROM users u INNER JOIN addresses a ON u.id = a.user_id INNER JOIN phonenumbers p ON u.id = p.user_id GROUP BY u.id, u.name, u.status, u.username, a.id, a.zip, a.country ORDER BY u.username + + + + + + + + + + + + + + + + + + + + .. code-block:: yaml + + MyProject\Model\User: + type: entity + namedNativeQueries: + fetchMultipleJoinsEntityResults: + name: fetchMultipleJoinsEntityResults + resultSetMapping: mappingMultipleJoinsEntityResults + query: SELECT u.id AS u_id, u.name AS u_name, u.status AS u_status, a.id AS a_id, a.zip AS a_zip, a.country AS a_country, COUNT(p.phonenumber) AS numphones FROM users u INNER JOIN addresses a ON u.id = a.user_id INNER JOIN phonenumbers p ON u.id = p.user_id GROUP BY u.id, u.name, u.status, u.username, a.id, a.zip, a.country ORDER BY u.username + sqlResultSetMappings: + mappingMultipleJoinsEntityResults: + name: mappingMultipleJoinsEntityResults + columnResult: + 0: + name: numphones + entityResult: + 0: + entityClass: __CLASS__ + fieldResult: + 0: + name: id + column: u_id + 1: + name: name + column: u_name + 2: + name: status + column: u_status + 1: + entityClass: Address + fieldResult: + 0: + name: id + column: a_id + 1: + name: zip + column: a_zip + 2: + name: country + column: a_country + + +Things to note: + - The resultset mapping declares the entities retrieved by this native query. + - Each field of the entity is bound to a SQL alias (or column name). + - All fields of the entity including the ones of subclasses + and the foreign key columns of related entities have to be present in the SQL query. + - Field definitions are optional provided that they map to the same + column name as the one declared on the class property. + - ``__CLASS__`` is an alias for the mapped class + + +In the above example, +the ``fetchJoinedAddress`` named query use the joinMapping result set mapping. +This mapping returns 2 entities, User and Address, each property is declared and associated to a column name, +actually the column name retrieved by the query. + +Let's now see an implicit declaration of the property / column. + +.. configuration-block:: + + .. code-block:: php + + + + + + SELECT * FROM addresses + + + + + + + + + + .. code-block:: yaml + + MyProject\Model\Address: + type: entity + namedNativeQueries: + findAll: + resultSetMapping: mappingFindAll + query: SELECT * FROM addresses + sqlResultSetMappings: + mappingFindAll: + name: mappingFindAll + entityResult: + address: + entityClass: Address + + +In this example, we only describe the entity member of the result set mapping. +The property / column mappings is done using the entity mapping values. +In this case the model property is bound to the model_txt column. +If the association to a related entity involve a composite primary key, +a @FieldResult element should be used for each foreign key column. +The @FieldResult name is composed of the property name for the relationship, +followed by a dot ("."), followed by the name or the field or property of the primary key. + + +.. configuration-block:: + + .. code-block:: php + + + + + + SELECT u.id, u.name, u.status, a.id AS a_id, a.country AS a_country, a.zip AS a_zip, a.city AS a_city FROM users u INNER JOIN addresses a ON u.id = a.user_id WHERE u.username = ? + + + + + + + + + + + + + + + + + + .. code-block:: yaml + + MyProject\Model\User: + type: entity + namedNativeQueries: + fetchJoinedAddress: + name: fetchJoinedAddress + resultSetMapping: mappingJoinedAddress + query: SELECT u.id, u.name, u.status, a.id AS a_id, a.country AS a_country, a.zip AS a_zip, a.city AS a_city FROM users u INNER JOIN addresses a ON u.id = a.user_id WHERE u.username = ? + sqlResultSetMappings: + mappingJoinedAddress: + entityResult: + 0: + entityClass: __CLASS__ + fieldResult: + 0: + name: id + 1: + name: name + 2: + name: status + 3: + name: address.id + column: a_id + 4: + name: address.zip + column: a_zip + 5: + name: address.city + column: a_city + 6: + name: address.country + column: a_country + + + +If you retrieve a single entity and if you use the default mapping, +you can use the resultClass attribute instead of resultSetMapping: + +.. configuration-block:: + + .. code-block:: php + + + + + + SELECT * FROM addresses WHERE id = ? + + + + + .. code-block:: yaml + + MyProject\Model\Address: + type: entity + namedNativeQueries: + findAll: + name: findAll + resultClass: Address + query: SELECT * FROM addresses + + +In some of your native queries, you'll have to return scalar values, +for example when building report queries. +You can map them in the @SqlResultsetMapping through @ColumnResult. +You actually can even mix, entities and scalar returns in the same native query (this is probably not that common though). + +.. configuration-block:: + + .. code-block:: php + + + + + SELECT COUNT(*) AS count FROM addresses + + + + + + + + + .. code-block:: yaml + + MyProject\Model\Address: + type: entity + namedNativeQueries: + count: + name: count + resultSetMapping: mappingCount + query: SELECT COUNT(*) AS count FROM addresses + sqlResultSetMappings: + mappingCount: + name: mappingCount + columnResult: + count: + name: count diff --git a/vendor/doctrine/orm/docs/en/reference/partial-objects.rst b/vendor/doctrine/orm/docs/en/reference/partial-objects.rst new file mode 100644 index 0000000000000000000000000000000000000000..396eecce3d027742893e9e7c78788ce0667f0b60 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/partial-objects.rst @@ -0,0 +1,90 @@ +Partial Objects +=============== + +A partial object is an object whose state is not fully initialized +after being reconstituted from the database and that is +disconnected from the rest of its data. The following section will +describe why partial objects are problematic and what the approach +of Doctrine2 to this problem is. + +.. note:: + + The partial object problem in general does not apply to + methods or queries where you do not retrieve the query result as + objects. Examples are: ``Query#getArrayResult()``, + ``Query#getScalarResult()``, ``Query#getSingleScalarResult()``, + etc. + +.. warning:: + + Use of partial objects is tricky. Fields that are not retrieved + from the database will not be updated by the UnitOfWork even if they + get changed in your objects. You can only promote a partial object + to a fully-loaded object by calling ``EntityManager#refresh()`` + or a DQL query with the refresh flag. + + +What is the problem? +-------------------- + +In short, partial objects are problematic because they are usually +objects with broken invariants. As such, code that uses these +partial objects tends to be very fragile and either needs to "know" +which fields or methods can be safely accessed or add checks around +every field access or method invocation. The same holds true for +the internals, i.e. the method implementations, of such objects. +You usually simply assume the state you need in the method is +available, after all you properly constructed this object before +you pushed it into the database, right? These blind assumptions can +quickly lead to null reference errors when working with such +partial objects. + +It gets worse with the scenario of an optional association (0..1 to +1). When the associated field is NULL, you don't know whether this +object does not have an associated object or whether it was simply +not loaded when the owning object was loaded from the database. + +These are reasons why many ORMs do not allow partial objects at all +and instead you always have to load an object with all its fields +(associations being proxied). One secure way to allow partial +objects is if the programming language/platform allows the ORM tool +to hook deeply into the object and instrument it in such a way that +individual fields (not only associations) can be loaded lazily on +first access. This is possible in Java, for example, through +bytecode instrumentation. In PHP though this is not possible, so +there is no way to have "secure" partial objects in an ORM with +transparent persistence. + +Doctrine, by default, does not allow partial objects. That means, +any query that only selects partial object data and wants to +retrieve the result as objects (i.e. ``Query#getResult()``) will +raise an exception telling you that partial objects are dangerous. +If you want to force a query to return you partial objects, +possibly as a performance tweak, you can use the ``partial`` +keyword as follows: + +.. code-block:: php + + createQuery("select partial u.{id,name} from MyApp\Domain\User u"); + +You can also get a partial reference instead of a proxy reference by +calling: + +.. code-block:: php + + getPartialReference('MyApp\Domain\User', 1); + +Partial references are objects with only the identifiers set as they +are passed to the second argument of the ``getPartialReference()`` method. +All other fields are null. + +When should I force partial objects? +------------------------------------ + +Mainly for optimization purposes, but be careful of premature +optimization as partial objects lead to potentially more fragile +code. + + diff --git a/vendor/doctrine/orm/docs/en/reference/php-mapping.rst b/vendor/doctrine/orm/docs/en/reference/php-mapping.rst new file mode 100644 index 0000000000000000000000000000000000000000..78a721411d62ec46762fe170f3e990b68e3c9c78 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/php-mapping.rst @@ -0,0 +1,325 @@ +PHP Mapping +=========== + +Doctrine 2 also allows you to provide the ORM metadata in the form +of plain PHP code using the ``ClassMetadata`` API. You can write +the code in PHP files or inside of a static function named +``loadMetadata($class)`` on the entity class itself. + +PHP Files +--------- + +If you wish to write your mapping information inside PHP files that +are named after the entity and included to populate the metadata +for an entity you can do so by using the ``PHPDriver``: + +.. code-block:: php + + getConfiguration()->setMetadataDriverImpl($driver); + +Now imagine we had an entity named ``Entities\User`` and we wanted +to write a mapping file for it using the above configured +``PHPDriver`` instance: + +.. code-block:: php + + mapField(array( + 'id' => true, + 'fieldName' => 'id', + 'type' => 'integer' + )); + + $metadata->mapField(array( + 'fieldName' => 'username', + 'type' => 'string', + 'options' => array( + 'fixed' => true, + 'comment' => "User's login name" + ) + )); + + $metadata->mapField(array( + 'fieldName' => 'login_count', + 'type' => 'integer', + 'nullable' => false, + 'options' => array( + 'unsigned' => true, + 'default' => 0 + ) + )); + +Now we can easily retrieve the populated ``ClassMetadata`` instance +where the ``PHPDriver`` includes the file and the +``ClassMetadataFactory`` caches it for later retrieval: + +.. code-block:: php + + getClassMetadata('Entities\User'); + // or + $class = $em->getMetadataFactory()->getMetadataFor('Entities\User'); + +Static Function +--------------- + +In addition to the PHP files you can also specify your mapping +information inside of a static function defined on the entity class +itself. This is useful for cases where you want to keep your entity +and mapping information together but don't want to use annotations. +For this you just need to use the ``StaticPHPDriver``: + +.. code-block:: php + + getConfiguration()->setMetadataDriverImpl($driver); + +Now you just need to define a static function named +``loadMetadata($metadata)`` on your entity: + +.. code-block:: php + + mapField(array( + 'id' => true, + 'fieldName' => 'id', + 'type' => 'integer' + )); + + $metadata->mapField(array( + 'fieldName' => 'username', + 'type' => 'string' + )); + } + } + +ClassMetadataBuilder +-------------------- + +To ease the use of the ClassMetadata API (which is very raw) there is a ``ClassMetadataBuilder`` that you can use. + +.. code-block:: php + + createField('id', 'integer')->isPrimaryKey()->generatedValue()->build(); + $builder->addField('username', 'string'); + } + } + +The API of the ClassMetadataBuilder has the following methods with a fluent interface: + +- ``addField($name, $type, array $mapping)`` +- ``setMappedSuperclass()`` +- ``setReadOnly()`` +- ``setCustomRepositoryClass($className)`` +- ``setTable($name)`` +- ``addIndex(array $columns, $indexName)`` +- ``addUniqueConstraint(array $columns, $constraintName)`` +- ``addNamedQuery($name, $dqlQuery)`` +- ``setJoinedTableInheritance()`` +- ``setSingleTableInheritance()`` +- ``setDiscriminatorColumn($name, $type = 'string', $length = 255)`` +- ``addDiscriminatorMapClass($name, $class)`` +- ``setChangeTrackingPolicyDeferredExplicit()`` +- ``setChangeTrackingPolicyNotify()`` +- ``addLifecycleEvent($methodName, $event)`` +- ``addManyToOne($name, $targetEntity, $inversedBy = null)`` +- ``addInverseOneToOne($name, $targetEntity, $mappedBy)`` +- ``addOwningOneToOne($name, $targetEntity, $inversedBy = null)`` +- ``addOwningManyToMany($name, $targetEntity, $inversedBy = null)`` +- ``addInverseManyToMany($name, $targetEntity, $mappedBy)`` +- ``addOneToMany($name, $targetEntity, $mappedBy)`` + +It also has several methods that create builders (which are necessary for advanced mappings): + +- ``createField($name, $type)`` returns a ``FieldBuilder`` instance +- ``createManyToOne($name, $targetEntity)`` returns an ``AssociationBuilder`` instance +- ``createOneToOne($name, $targetEntity)`` returns an ``AssociationBuilder`` instance +- ``createManyToMany($name, $targetEntity)`` returns an ``ManyToManyAssociationBuilder`` instance +- ``createOneToMany($name, $targetEntity)`` returns an ``OneToManyAssociationBuilder`` instance + +ClassMetadataInfo API +--------------------- + +The ``ClassMetadataInfo`` class is the base data object for storing +the mapping metadata for a single entity. It contains all the +getters and setters you need populate and retrieve information for +an entity. + +General Setters +~~~~~~~~~~~~~~~ + + +- ``setTableName($tableName)`` +- ``setPrimaryTable(array $primaryTableDefinition)`` +- ``setCustomRepositoryClass($repositoryClassName)`` +- ``setIdGeneratorType($generatorType)`` +- ``setIdGenerator($generator)`` +- ``setSequenceGeneratorDefinition(array $definition)`` +- ``setChangeTrackingPolicy($policy)`` +- ``setIdentifier(array $identifier)`` + +Inheritance Setters +~~~~~~~~~~~~~~~~~~~ + + +- ``setInheritanceType($type)`` +- ``setSubclasses(array $subclasses)`` +- ``setParentClasses(array $classNames)`` +- ``setDiscriminatorColumn($columnDef)`` +- ``setDiscriminatorMap(array $map)`` + +Field Mapping Setters +~~~~~~~~~~~~~~~~~~~~~ + + +- ``mapField(array $mapping)`` +- ``mapOneToOne(array $mapping)`` +- ``mapOneToMany(array $mapping)`` +- ``mapManyToOne(array $mapping)`` +- ``mapManyToMany(array $mapping)`` + +Lifecycle Callback Setters +~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +- ``addLifecycleCallback($callback, $event)`` +- ``setLifecycleCallbacks(array $callbacks)`` + +Versioning Setters +~~~~~~~~~~~~~~~~~~ + + +- ``setVersionMapping(array &$mapping)`` +- ``setVersioned($bool)`` +- ``setVersionField()`` + +General Getters +~~~~~~~~~~~~~~~ + + +- ``getTableName()`` +- ``getSchemaName()`` +- ``getTemporaryIdTableName()`` + +Identifier Getters +~~~~~~~~~~~~~~~~~~ + + +- ``getIdentifierColumnNames()`` +- ``usesIdGenerator()`` +- ``isIdentifier($fieldName)`` +- ``isIdGeneratorIdentity()`` +- ``isIdGeneratorSequence()`` +- ``isIdGeneratorTable()`` +- ``isIdentifierNatural()`` +- ``getIdentifierFieldNames()`` +- ``getSingleIdentifierFieldName()`` +- ``getSingleIdentifierColumnName()`` + +Inheritance Getters +~~~~~~~~~~~~~~~~~~~ + + +- ``isInheritanceTypeNone()`` +- ``isInheritanceTypeJoined()`` +- ``isInheritanceTypeSingleTable()`` +- ``isInheritanceTypeTablePerClass()`` +- ``isInheritedField($fieldName)`` +- ``isInheritedAssociation($fieldName)`` + +Change Tracking Getters +~~~~~~~~~~~~~~~~~~~~~~~ + + +- ``isChangeTrackingDeferredExplicit()`` +- ``isChangeTrackingDeferredImplicit()`` +- ``isChangeTrackingNotify()`` + +Field & Association Getters +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +- ``isUniqueField($fieldName)`` +- ``isNullable($fieldName)`` +- ``getColumnName($fieldName)`` +- ``getFieldMapping($fieldName)`` +- ``getAssociationMapping($fieldName)`` +- ``getAssociationMappings()`` +- ``getFieldName($columnName)`` +- ``hasField($fieldName)`` +- ``getColumnNames(array $fieldNames = null)`` +- ``getTypeOfField($fieldName)`` +- ``getTypeOfColumn($columnName)`` +- ``hasAssociation($fieldName)`` +- ``isSingleValuedAssociation($fieldName)`` +- ``isCollectionValuedAssociation($fieldName)`` + +Lifecycle Callback Getters +~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +- ``hasLifecycleCallbacks($lifecycleEvent)`` +- ``getLifecycleCallbacks($event)`` + +ClassMetadata API +----------------- + +The ``ClassMetadata`` class extends ``ClassMetadataInfo`` and adds +the runtime functionality required by Doctrine. It adds a few extra +methods related to runtime reflection for working with the entities +themselves. + + +- ``getReflectionClass()`` +- ``getReflectionProperties()`` +- ``getReflectionProperty($name)`` +- ``getSingleIdReflectionProperty()`` +- ``getIdentifierValues($entity)`` +- ``setIdentifierValues($entity, $id)`` +- ``setFieldValue($entity, $field, $value)`` +- ``getFieldValue($entity, $field)`` + + diff --git a/vendor/doctrine/orm/docs/en/reference/query-builder.rst b/vendor/doctrine/orm/docs/en/reference/query-builder.rst new file mode 100644 index 0000000000000000000000000000000000000000..57eee179f63eadcd4aec0ac1872fdace80e27cac --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/query-builder.rst @@ -0,0 +1,565 @@ +The QueryBuilder +================ + +A ``QueryBuilder`` provides an API that is designed for +conditionally constructing a DQL query in several steps. + +It provides a set of classes and methods that is able to +programmatically build queries, and also provides a fluent API. +This means that you can change between one methodology to the other +as you want, and also pick one if you prefer. + +Constructing a new QueryBuilder object +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The same way you build a normal Query, you build a ``QueryBuilder`` +object, just providing the correct method name. Here is an example +how to build a ``QueryBuilder`` object: + +.. code-block:: php + + createQueryBuilder(); + +Once you have created an instance of QueryBuilder, it provides a +set of useful informative functions that you can use. One good +example is to inspect what type of object the ``QueryBuilder`` is. + +.. code-block:: php + + getType(); // Prints: 0 + +There're currently 3 possible return values for ``getType()``: + + +- ``QueryBuilder::SELECT``, which returns value 0 +- ``QueryBuilder::DELETE``, returning value 1 +- ``QueryBuilder::UPDATE``, which returns value 2 + +It is possible to retrieve the associated ``EntityManager`` of the +current ``QueryBuilder``, its DQL and also a ``Query`` object when +you finish building your DQL. + +.. code-block:: php + + getEntityManager(); + + // example4: retrieve the DQL string of what was defined in QueryBuilder + $dql = $qb->getDql(); + + // example5: retrieve the associated Query object with the processed DQL + $q = $qb->getQuery(); + +Internally, ``QueryBuilder`` works with a DQL cache to increase +performance. Any changes that may affect the generated DQL actually +modifies the state of ``QueryBuilder`` to a stage we call +STATE\_DIRTY. One ``QueryBuilder`` can be in two different states: + + +- ``QueryBuilder::STATE_CLEAN``, which means DQL haven't been + altered since last retrieval or nothing were added since its + instantiation +- ``QueryBuilder::STATE_DIRTY``, means DQL query must (and will) + be processed on next retrieval + +Working with QueryBuilder +~~~~~~~~~~~~~~~~~~~~~~~~~ + + +High level API methods +^^^^^^^^^^^^^^^^^^^^^^ + +To simplify even more the way you build a query in Doctrine, we can take +advantage of what we call Helper methods. For all base code, there +is a set of useful methods to simplify a programmer's life. To +illustrate how to work with them, here is the same example 6 +re-written using ``QueryBuilder`` helper methods: + +.. code-block:: php + + select('u') + ->from('User', 'u') + ->where('u.id = ?1') + ->orderBy('u.name', 'ASC'); + +``QueryBuilder`` helper methods are considered the standard way to +build DQL queries. Although it is supported, it should be avoided +to use string based queries and greatly encouraged to use +``$qb->expr()->*`` methods. Here is a converted example 8 to +suggested standard way to build queries: + +.. code-block:: php + + select(array('u')) // string 'u' is converted to array internally + ->from('User', 'u') + ->where($qb->expr()->orX( + $qb->expr()->eq('u.id', '?1'), + $qb->expr()->like('u.nickname', '?2') + )) + ->orderBy('u.surname', 'ASC')); + +Here is a complete list of helper methods available in ``QueryBuilder``: + +.. code-block:: php + + select('u') + // Example - $qb->select(array('u', 'p')) + // Example - $qb->select($qb->expr()->select('u', 'p')) + public function select($select = null); + + // addSelect does not override previous calls to select + // + // Example - $qb->select('u'); + // ->addSelect('p.area_code'); + public function addSelect($select = null); + + // Example - $qb->delete('User', 'u') + public function delete($delete = null, $alias = null); + + // Example - $qb->update('Group', 'g') + public function update($update = null, $alias = null); + + // Example - $qb->set('u.firstName', $qb->expr()->literal('Arnold')) + // Example - $qb->set('u.numChilds', 'u.numChilds + ?1') + // Example - $qb->set('u.numChilds', $qb->expr()->sum('u.numChilds', '?1')) + public function set($key, $value); + + // Example - $qb->from('Phonenumber', 'p') + // Example - $qb->from('Phonenumber', 'p', 'p.id') + public function from($from, $alias, $indexBy = null); + + // Example - $qb->join('u.Group', 'g', Expr\Join::WITH, $qb->expr()->eq('u.status_id', '?1')) + // Example - $qb->join('u.Group', 'g', 'WITH', 'u.status = ?1') + // Example - $qb->join('u.Group', 'g', 'WITH', 'u.status = ?1', 'g.id') + public function join($join, $alias, $conditionType = null, $condition = null, $indexBy = null); + + // Example - $qb->innerJoin('u.Group', 'g', Expr\Join::WITH, $qb->expr()->eq('u.status_id', '?1')) + // Example - $qb->innerJoin('u.Group', 'g', 'WITH', 'u.status = ?1') + // Example - $qb->innerJoin('u.Group', 'g', 'WITH', 'u.status = ?1', 'g.id') + public function innerJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null); + + // Example - $qb->leftJoin('u.Phonenumbers', 'p', Expr\Join::WITH, $qb->expr()->eq('p.area_code', 55)) + // Example - $qb->leftJoin('u.Phonenumbers', 'p', 'WITH', 'p.area_code = 55') + // Example - $qb->leftJoin('u.Phonenumbers', 'p', 'WITH', 'p.area_code = 55', 'p.id') + public function leftJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null); + + // NOTE: ->where() overrides all previously set conditions + // + // Example - $qb->where('u.firstName = ?1', $qb->expr()->eq('u.surname', '?2')) + // Example - $qb->where($qb->expr()->andX($qb->expr()->eq('u.firstName', '?1'), $qb->expr()->eq('u.surname', '?2'))) + // Example - $qb->where('u.firstName = ?1 AND u.surname = ?2') + public function where($where); + + // NOTE: ->andWhere() can be used directly, without any ->where() before + // + // Example - $qb->andWhere($qb->expr()->orX($qb->expr()->lte('u.age', 40), 'u.numChild = 0')) + public function andWhere($where); + + // Example - $qb->orWhere($qb->expr()->between('u.id', 1, 10)); + public function orWhere($where); + + // NOTE: -> groupBy() overrides all previously set grouping conditions + // + // Example - $qb->groupBy('u.id') + public function groupBy($groupBy); + + // Example - $qb->addGroupBy('g.name') + public function addGroupBy($groupBy); + + // NOTE: -> having() overrides all previously set having conditions + // + // Example - $qb->having('u.salary >= ?1') + // Example - $qb->having($qb->expr()->gte('u.salary', '?1')) + public function having($having); + + // Example - $qb->andHaving($qb->expr()->gt($qb->expr()->count('u.numChild'), 0)) + public function andHaving($having); + + // Example - $qb->orHaving($qb->expr()->lte('g.managerLevel', '100')) + public function orHaving($having); + + // NOTE: -> orderBy() overrides all previously set ordering conditions + // + // Example - $qb->orderBy('u.surname', 'DESC') + public function orderBy($sort, $order = null); + + // Example - $qb->addOrderBy('u.firstName') + public function addOrderBy($sort, $order = null); // Default $order = 'ASC' + } + +Binding parameters to your query +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Doctrine supports dynamic binding of parameters to your query, +similar to preparing queries. You can use both strings and numbers +as placeholders, although both have a slightly different syntax. +Additionally, you must make your choice: Mixing both styles is not +allowed. Binding parameters can simply be achieved as follows: + +.. code-block:: php + + select('u') + ->from('User', 'u') + ->where('u.id = ?1') + ->orderBy('u.name', 'ASC') + ->setParameter(1, 100); // Sets ?1 to 100, and thus we will fetch a user with u.id = 100 + +You are not forced to enumerate your placeholders as the +alternative syntax is available: + +.. code-block:: php + + select('u') + ->from('User', 'u') + ->where('u.id = :identifier') + ->orderBy('u.name', 'ASC') + ->setParameter('identifier', 100); // Sets :identifier to 100, and thus we will fetch a user with u.id = 100 + +Note that numeric placeholders start with a ? followed by a number +while the named placeholders start with a : followed by a string. + +Calling ``setParameter()`` automatically infers which type you are setting as +value. This works for integers, arrays of strings/integers, DateTime instances +and for managed entities. If you want to set a type explicitly you can call +the third argument to ``setParameter()`` explicitly. It accepts either a PDO +type or a DBAL Type name for conversion. + +If you've got several parameters to bind to your query, you can +also use setParameters() instead of setParameter() with the +following syntax: + +.. code-block:: php + + setParameters(array(1 => 'value for ?1', 2 => 'value for ?2')); + +Getting already bound parameters is easy - simply use the above +mentioned syntax with "getParameter()" or "getParameters()": + +.. code-block:: php + + getParameters(); + // $params instanceof \Doctrine\Common\Collections\ArrayCollection + + // Equivalent to + $param = $qb->getParameter(1); + // $param instanceof \Doctrine\ORM\Query\Parameter + +Note: If you try to get a parameter that was not bound yet, +getParameter() simply returns NULL. + +The API of a Query Parameter is: + +.. code-block:: php + + namespace Doctrine\ORM\Query; + + class Parameter + { + public function getName(); + public function getValue(); + public function getType(); + public function setValue($value, $type = null); + } + +Limiting the Result +^^^^^^^^^^^^^^^^^^^ + +To limit a result the query builder has some methods in common with +the Query object which can be retrieved from ``EntityManager#createQuery()``. + +.. code-block:: php + + add('select', 'u') + ->add('from', 'User u') + ->add('orderBy', 'u.name ASC') + ->setFirstResult( $offset ) + ->setMaxResults( $limit ); + +Executing a Query +^^^^^^^^^^^^^^^^^ + +The QueryBuilder is a builder object only, it has no means of actually +executing the Query. Additionally a set of parameters such as query hints +cannot be set on the QueryBuilder itself. This is why you always have to convert +a querybuilder instance into a Query object: + +.. code-block:: php + + getQuery(); + + // Set additional Query options + $query->setQueryHint('foo', 'bar'); + $query->useResultCache('my_cache_id'); + + // Execute Query + $result = $query->getResult(); + $single = $query->getSingleResult(); + $array = $query->getArrayResult(); + $scalar = $query->getScalarResult(); + $singleScalar = $query->getSingleScalarResult(); + +The Expr class +^^^^^^^^^^^^^^ + +To workaround some of the issues that ``add()`` method may cause, +Doctrine created a class that can be considered as a helper for +building expressions. This class is called ``Expr``, which provides a +set of useful methods to help build expressions: + +.. code-block:: php + + add('select', new Expr\Select(array('u'))) + ->add('from', new Expr\From('User', 'u')) + ->add('where', $qb->expr()->orX( + $qb->expr()->eq('u.id', '?1'), + $qb->expr()->like('u.nickname', '?2') + )) + ->add('orderBy', new Expr\OrderBy('u.name', 'ASC')); + +Although it still sounds complex, the ability to programmatically +create conditions are the main feature of ``Expr``. Here it is a +complete list of supported helper methods available: + +.. code-block:: php + + expr()->andX($cond1 [, $condN])->add(...)->... + public function andX($x = null); // Returns Expr\AndX instance + + // Example - $qb->expr()->orX($cond1 [, $condN])->add(...)->... + public function orX($x = null); // Returns Expr\OrX instance + + + /** Comparison objects **/ + + // Example - $qb->expr()->eq('u.id', '?1') => u.id = ?1 + public function eq($x, $y); // Returns Expr\Comparison instance + + // Example - $qb->expr()->neq('u.id', '?1') => u.id <> ?1 + public function neq($x, $y); // Returns Expr\Comparison instance + + // Example - $qb->expr()->lt('u.id', '?1') => u.id < ?1 + public function lt($x, $y); // Returns Expr\Comparison instance + + // Example - $qb->expr()->lte('u.id', '?1') => u.id <= ?1 + public function lte($x, $y); // Returns Expr\Comparison instance + + // Example - $qb->expr()->gt('u.id', '?1') => u.id > ?1 + public function gt($x, $y); // Returns Expr\Comparison instance + + // Example - $qb->expr()->gte('u.id', '?1') => u.id >= ?1 + public function gte($x, $y); // Returns Expr\Comparison instance + + // Example - $qb->expr()->isNull('u.id') => u.id IS NULL + public function isNull($x); // Returns string + + // Example - $qb->expr()->isNotNull('u.id') => u.id IS NOT NULL + public function isNotNull($x); // Returns string + + + /** Arithmetic objects **/ + + // Example - $qb->expr()->prod('u.id', '2') => u.id * 2 + public function prod($x, $y); // Returns Expr\Math instance + + // Example - $qb->expr()->diff('u.id', '2') => u.id - 2 + public function diff($x, $y); // Returns Expr\Math instance + + // Example - $qb->expr()->sum('u.id', '2') => u.id + 2 + public function sum($x, $y); // Returns Expr\Math instance + + // Example - $qb->expr()->quot('u.id', '2') => u.id / 2 + public function quot($x, $y); // Returns Expr\Math instance + + + /** Pseudo-function objects **/ + + // Example - $qb->expr()->exists($qb2->getDql()) + public function exists($subquery); // Returns Expr\Func instance + + // Example - $qb->expr()->all($qb2->getDql()) + public function all($subquery); // Returns Expr\Func instance + + // Example - $qb->expr()->some($qb2->getDql()) + public function some($subquery); // Returns Expr\Func instance + + // Example - $qb->expr()->any($qb2->getDql()) + public function any($subquery); // Returns Expr\Func instance + + // Example - $qb->expr()->not($qb->expr()->eq('u.id', '?1')) + public function not($restriction); // Returns Expr\Func instance + + // Example - $qb->expr()->in('u.id', array(1, 2, 3)) + // Make sure that you do NOT use something similar to $qb->expr()->in('value', array('stringvalue')) as this will cause Doctrine to throw an Exception. + // Instead, use $qb->expr()->in('value', array('?1')) and bind your parameter to ?1 (see section above) + public function in($x, $y); // Returns Expr\Func instance + + // Example - $qb->expr()->notIn('u.id', '2') + public function notIn($x, $y); // Returns Expr\Func instance + + // Example - $qb->expr()->like('u.firstname', $qb->expr()->literal('Gui%')) + public function like($x, $y); // Returns Expr\Comparison instance + + // Example - $qb->expr()->notLike('u.firstname', $qb->expr()->literal('Gui%')) + public function notLike($x, $y); // Returns Expr\Comparison instance + + // Example - $qb->expr()->between('u.id', '1', '10') + public function between($val, $x, $y); // Returns Expr\Func + + + /** Function objects **/ + + // Example - $qb->expr()->trim('u.firstname') + public function trim($x); // Returns Expr\Func + + // Example - $qb->expr()->concat('u.firstname', $qb->expr()->concat($qb->expr()->literal(' '), 'u.lastname')) + public function concat($x, $y); // Returns Expr\Func + + // Example - $qb->expr()->substring('u.firstname', 0, 1) + public function substring($x, $from, $len); // Returns Expr\Func + + // Example - $qb->expr()->lower('u.firstname') + public function lower($x); // Returns Expr\Func + + // Example - $qb->expr()->upper('u.firstname') + public function upper($x); // Returns Expr\Func + + // Example - $qb->expr()->length('u.firstname') + public function length($x); // Returns Expr\Func + + // Example - $qb->expr()->avg('u.age') + public function avg($x); // Returns Expr\Func + + // Example - $qb->expr()->max('u.age') + public function max($x); // Returns Expr\Func + + // Example - $qb->expr()->min('u.age') + public function min($x); // Returns Expr\Func + + // Example - $qb->expr()->abs('u.currentBalance') + public function abs($x); // Returns Expr\Func + + // Example - $qb->expr()->sqrt('u.currentBalance') + public function sqrt($x); // Returns Expr\Func + + // Example - $qb->expr()->count('u.firstname') + public function count($x); // Returns Expr\Func + + // Example - $qb->expr()->countDistinct('u.surname') + public function countDistinct($x); // Returns Expr\Func + } + + +Low Level API +^^^^^^^^^^^^^ + +Now we have describe the low level (thought of as the +hardcore method) of creating queries. It may be useful to work at +this level for optimization purposes, but most of the time it is +preferred to work at a higher level of abstraction. + +All helper methods in ``QueryBuilder`` actually rely on a single +one: ``add()``. This method is responsible of building every piece +of DQL. It takes 3 parameters: ``$dqlPartName``, ``$dqlPart`` and +``$append`` (default=false) + + +- ``$dqlPartName``: Where the ``$dqlPart`` should be placed. + Possible values: select, from, where, groupBy, having, orderBy +- ``$dqlPart``: What should be placed in ``$dqlPartName``. Accepts + a string or any instance of ``Doctrine\ORM\Query\Expr\*`` +- ``$append``: Optional flag (default=false) if the ``$dqlPart`` + should override all previously defined items in ``$dqlPartName`` or + not (no effect on the ``where`` and ``having`` DQL query parts, + which always override all previously defined items) + +- + +.. code-block:: php + + add('select', 'u') + ->add('from', 'User u') + ->add('where', 'u.id = ?1') + ->add('orderBy', 'u.name ASC'); + +Expr\* classes +^^^^^^^^^^^^^^ + +When you call ``add()`` with string, it internally evaluates to an +instance of ``Doctrine\ORM\Query\Expr\Expr\*`` class. Here is the +same query of example 6 written using +``Doctrine\ORM\Query\Expr\Expr\*`` classes: + +.. code-block:: php + + add('select', new Expr\Select(array('u'))) + ->add('from', new Expr\From('User', 'u')) + ->add('where', new Expr\Comparison('u.id', '=', '?1')) + ->add('orderBy', new Expr\OrderBy('u.name', 'ASC')); + +Of course this is the hardest way to build a DQL query in Doctrine. +To simplify some of these efforts, we introduce what we call as +``Expr`` helper class. + diff --git a/vendor/doctrine/orm/docs/en/reference/second-level-cache.rst b/vendor/doctrine/orm/docs/en/reference/second-level-cache.rst new file mode 100644 index 0000000000000000000000000000000000000000..f69314dc7e79ea87ae630977119a902ff9c911a4 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/second-level-cache.rst @@ -0,0 +1,731 @@ +The Second Level Cache +====================== + +.. note:: + + The second level cache functionality is marked as experimental for now. It + is a very complex feature and we cannot guarantee yet that it works stable + in all cases. + +The Second Level Cache is designed to reduce the amount of necessary database access. +It sits between your application and the database to avoid the number of database hits as much as possible. + +When turned on, entities will be first searched in cache and if they are not found, +a database query will be fired an then the entity result will be stored in a cache provider. + +There are some flavors of caching available, but is better to cache read-only data. + +Be aware that caches are not aware of changes made to the persistent store by another application. +They can, however, be configured to regularly expire cached data. + + +Caching Regions +--------------- + +Second level cache does not store instances of an entity, instead it caches only entity identifier and values. +Each entity class, collection association and query has its region, where values of each instance are stored. + +Caching Regions are specific region into the cache provider that might store entities, collection or queries. +Each cache region resides in a specific cache namespace and has its own lifetime configuration. + +Notice that when caching collection and queries only identifiers are stored. +The entity values will be stored in its own region + +Something like below for an entity region : + +.. code-block:: php + + ['id'=> 1, 'name' => 'FooBar', 'associationName'=>null], + 'region_name:entity_2_hash' => ['id'=> 2, 'name' => 'Foo', 'associationName'=>['id'=>11]], + 'region_name:entity_3_hash' => ['id'=> 3, 'name' => 'Bar', 'associationName'=>['id'=>22]] + ]; + + +If the entity holds a collection that also needs to be cached. +An collection region could look something like : + +.. code-block:: php + + ['ownerId'=> 1, 'list' => [1, 2, 3]], + 'region_name:entity_2_coll_assoc_name_hash' => ['ownerId'=> 2, 'list' => [2, 3]], + 'region_name:entity_3_coll_assoc_name_hash' => ['ownerId'=> 3, 'list' => [2, 4]] + ]; + +A query region might be something like : + +.. code-block:: php + + ['list' => [1, 2, 3]], + 'region_name:query_2_hash' => ['list' => [2, 3]], + 'region_name:query_3_hash' => ['list' => [2, 4]] + ]; + + +.. note:: + + The following data structures represents now the cache will looks like, this is not actual cached data. + + +.. _reference-second-level-cache-regions: + +Cache Regions +------------- + +``Doctrine\ORM\Cache\Region\DefaultRegion`` It's the default implementation. + A simplest cache region compatible with all doctrine-cache drivers but does not support locking. + +``Doctrine\ORM\Cache\Region`` and ``Doctrine\ORM\Cache\ConcurrentRegion`` +Defines contracts that should be implemented by a cache provider. + +It allows you to provide your own cache implementation that might take advantage of specific cache driver. + +If you want to support locking for ``READ_WRITE`` strategies you should implement ``ConcurrentRegion``; ``CacheRegion`` otherwise. + + +Cache region +~~~~~~~~~~~~ + +Defines a contract for accessing a particular region. + +``Doctrine\ORM\Cache\Region`` + +Defines a contract for accessing a particular cache region. + +`See API Doc `_. + +Concurrent cache region +~~~~~~~~~~~~~~~~~~~~~~~ + +A ``Doctrine\ORM\Cache\ConcurrentRegion`` is designed to store concurrently managed data region. +By default, Doctrine provides a very simple implementation based on file locks ``Doctrine\ORM\Cache\Region\FileLockRegion``. + +If you want to use an ``READ_WRITE`` cache, you should consider providing your own cache region. + +``Doctrine\ORM\Cache\ConcurrentRegion`` + +Defines contract for concurrently managed data region. + +`See API Doc `_. + +Timestamp region +~~~~~~~~~~~~~~~~ + +``Doctrine\ORM\Cache\TimestampRegion`` + +Tracks the timestamps of the most recent updates to particular entity. + +`See API Doc `_. + +.. _reference-second-level-cache-mode: + +Caching mode +------------ + +* ``READ_ONLY`` (DEFAULT) + + * Can do reads, inserts and deletes, cannot perform updates or employ any locks. + * Useful for data that is read frequently but never updated. + * Best performer. + * It is Simple. + +* ``NONSTRICT_READ_WRITE`` + + * Read Write Cache doesn’t employ any locks but can do reads, inserts, updates and deletes. + * Good if the application needs to update data rarely. + + +* ``READ_WRITE`` + + * Read Write cache employs locks before update/delete. + * Use if data needs to be updated. + * Slowest strategy. + * To use it a the cache region implementation must support locking. + + +Built-in cached persisters +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Cached persisters are responsible to access cache regions. + + +-----------------------+-------------------------------------------------------------------------------+ + | Cache Usage | Persister | + +=======================+===============================================================================+ + | READ_ONLY | Doctrine\\ORM\\Cache\\Persister\\ReadOnlyCachedEntityPersister | + +-----------------------+-------------------------------------------------------------------------------+ + | READ_WRITE | Doctrine\\ORM\\Cache\\Persister\\ReadWriteCachedEntityPersister | + +-----------------------+-------------------------------------------------------------------------------+ + | NONSTRICT_READ_WRITE | Doctrine\\ORM\\Cache\\Persister\\NonStrictReadWriteCachedEntityPersister | + +-----------------------+-------------------------------------------------------------------------------+ + | READ_ONLY | Doctrine\\ORM\\Cache\\Persister\\ReadOnlyCachedCollectionPersister | + +-----------------------+-------------------------------------------------------------------------------+ + | READ_WRITE | Doctrine\\ORM\\Cache\\Persister\\ReadWriteCachedCollectionPersister | + +-----------------------+-------------------------------------------------------------------------------+ + | NONSTRICT_READ_WRITE | Doctrine\\ORM\\Cache\\Persister\\NonStrictReadWriteCacheCollectionPersister | + +-----------------------+-------------------------------------------------------------------------------+ + +Configuration +------------- +Doctrine allows you to specify configurations and some points of extension for the second-level-cache + + +Enable Second Level Cache +~~~~~~~~~~~~~~~~~~~~~~~~~ + +To enable the second-level-cache, you should provide a cache factory +``\Doctrine\ORM\Cache\DefaultCacheFactory`` is the default implementation. + +.. code-block:: php + + setSecondLevelCacheEnabled(); + + // Cache factory + $config->getSecondLevelCacheConfiguration() + ->setCacheFactory($factory); + + +Cache Factory +~~~~~~~~~~~~~ + +Cache Factory is the main point of extension. + +It allows you to provide a specific implementation of the following components : + +* ``QueryCache`` Store and retrieve query cache results. +* ``CachedEntityPersister`` Store and retrieve entity results. +* ``CachedCollectionPersister`` Store and retrieve query results. +* ``EntityHydrator`` Transform an entity into a cache entry and cache entry into entities +* ``CollectionHydrator`` Transform a collection into a cache entry and cache entry into collection + +`See API Doc `_. + +Region Lifetime +~~~~~~~~~~~~~~~ + +To specify a default lifetime for all regions or specify a different lifetime for a specific region. + +.. code-block:: php + + getSecondLevelCacheConfiguration(); + $regionConfig = $cacheConfig->getRegionsConfiguration(); + + // Cache Region lifetime + $regionConfig->setLifetime('my_entity_region', 3600); // Time to live for a specific region; In seconds + $regionConfig->setDefaultLifetime(7200); // Default time to live; In seconds + + +Cache Log +~~~~~~~~~ +By providing a cache logger you should be able to get information about all cache operations such as hits, misses and puts. + +``\Doctrine\ORM\Cache\Logging\StatisticsCacheLogger`` is a built-in implementation that provides basic statistics. + + .. code-block:: php + + setSecondLevelCacheEnabled(true); + $config->getSecondLevelCacheConfiguration() + ->setCacheLogger($logger); + + + // Collect cache statistics + + // Get the number of entries successfully retrieved from a specific region. + $logger->getRegionHitCount('my_entity_region'); + + // Get the number of cached entries *not* found in a specific region. + $logger->getRegionMissCount('my_entity_region'); + + // Get the number of cacheable entries put in cache. + $logger->getRegionPutCount('my_entity_region'); + + // Get the total number of put in all regions. + $logger->getPutCount(); + + // Get the total number of entries successfully retrieved from all regions. + $logger->getHitCount(); + + // Get the total number of cached entries *not* found in all regions. + $logger->getMissCount(); + +If you want to get more information you should implement ``\Doctrine\ORM\Cache\Logging\CacheLogger``. +and collect all information you want. + +`See API Doc `_. + + +Entity cache definition +----------------------- +* Entity cache configuration allows you to define the caching strategy and region for an entity. + + * ``usage`` Specifies the caching strategy: ``READ_ONLY``, ``NONSTRICT_READ_WRITE``, ``READ_WRITE``. see :ref:`reference-second-level-cache-mode` + * ``region`` Optional value that specifies the name of the second level cache region. + + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + + + + .. code-block:: yaml + + Country: + type: entity + cache: + usage : READ_ONLY + region : my_entity_region + id: + id: + type: integer + id: true + generator: + strategy: IDENTITY + fields: + name: + type: string + + +Association cache definition +---------------------------- +The most common use case is to cache entities. But we can also cache relationships. +It caches the primary keys of association and cache each element will be cached into its region. + + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + + + + + + + + + + + + + + + + + + + .. code-block:: yaml + + State: + type: entity + cache: + usage : NONSTRICT_READ_WRITE + id: + id: + type: integer + id: true + generator: + strategy: IDENTITY + fields: + name: + type: string + + manyToOne: + state: + targetEntity: Country + joinColumns: + country_id: + referencedColumnName: id + cache: + usage : NONSTRICT_READ_WRITE + + oneToMany: + cities: + targetEntity:City + mappedBy: state + cache: + usage : NONSTRICT_READ_WRITE + + +> Note: for this to work, the target entity must also be marked as cacheable. + +Cache usage +~~~~~~~~~~~ + +Basic entity cache + +.. code-block:: php + + persist(new Country($name)); + $em->flush(); // Hit database to insert the row and put into cache + + $em->clear(); // Clear entity manager + + $country1 = $em->find('Country', 1); // Retrieve item from cache + + $country->setName("New Name"); + $em->persist($country); + $em->flush(); // Hit database to update the row and update cache + + $em->clear(); // Clear entity manager + + $country2 = $em->find('Country', 1); // Retrieve item from cache + // Notice that $country1 and $country2 are not the same instance. + + +Association cache + +.. code-block:: php + + persist(new State($name, $country)); + $em->flush(); + + // Clear entity manager + $em->clear(); + + // Retrieve item from cache + $state = $em->find('State', 1); + + // Hit database to update the row and update cache entry + $state->setName("New Name"); + $em->persist($state); + $em->flush(); + + // Create a new collection item + $city = new City($name, $state); + $state->addCity($city); + + // Hit database to insert new collection item, + // put entity and collection cache into cache. + $em->persist($city); + $em->persist($state); + $em->flush(); + + // Clear entity manager + $em->clear(); + + // Retrieve item from cache + $state = $em->find('State', 1); + + // Retrieve association from cache + $country = $state->getCountry(); + + // Retrieve collection from cache + $cities = $state->getCities(); + + echo $country->getName(); + echo $state->getName(); + + // Retrieve each collection item from cache + foreach ($cities as $city) { + echo $city->getName(); + } + +.. note:: + + Notice that all entities should be marked as cacheable. + +Using the query cache +--------------------- + +The second level cache stores the entities, associations and collections. +The query cache stores the results of the query but as identifiers, entity values are actually stored in the 2nd level cache. + +.. note:: + + Query cache should always be used in conjunction with the second-level-cache for those entities which should be cached. + +.. code-block:: php + + createQuery('SELECT c FROM Country c ORDER BY c.name') + ->setCacheable(true) + ->getResult(); + + $em->clear() + + // Check if query result is valid and load entities from cache + $result2 = $em->createQuery('SELECT c FROM Country c ORDER BY c.name') + ->setCacheable(true) + ->getResult(); + +Cache mode +~~~~~~~~~~ + +The Cache Mode controls how a particular query interacts with the second-level cache: + +* ``Cache::MODE_GET`` - May read items from the cache, but will not add items. +* ``Cache::MODE_PUT`` - Will never read items from the cache, but will add items to the cache as it reads them from the database. +* ``Cache::MODE_NORMAL`` - May read items from the cache, and add items to the cache. +* ``Cache::MODE_REFRESH`` - The query will never read items from the cache, but will refresh items to the cache as it reads them from the database. + +.. code-block:: php + + createQuery('SELECT c FROM Country c ORDER BY c.name') + ->setCacheMode(Cache::MODE_GET) + ->setCacheable(true) + ->getResult(); + +.. note:: + + The the default query cache mode is ```Cache::MODE_NORMAL``` + +DELETE / UPDATE queries +~~~~~~~~~~~~~~~~~~~~~~~ + +DQL UPDATE / DELETE statements are ported directly into a database and bypass the second-level cache, +Entities that are already cached will NOT be invalidated. +However the cached data could be evicted using the cache API or an special query hint. + + +Execute the ``UPDATE`` and invalidate ``all cache entries`` using ``Query::HINT_CACHE_EVICT`` + +.. code-block:: php + + _em->createQuery("UPDATE Entity\Country u SET u.name = 'unknown' WHERE u.id = 1") + ->setHint(Query::HINT_CACHE_EVICT, true) + ->execute(); + + +Execute the ``UPDATE`` and invalidate ``all cache entries`` using the cache API + +.. code-block:: php + + _em->createQuery("UPDATE Entity\Country u SET u.name = 'unknown' WHERE u.id = 1") + ->execute(); + // Invoke Cache API + $em->getCache()->evictEntityRegion('Entity\Country'); + + +Execute the ``UPDATE`` and invalidate ``a specific cache entry`` using the cache API + +.. code-block:: php + + _em->createQuery("UPDATE Entity\Country u SET u.name = 'unknown' WHERE u.id = 1") + ->execute(); + // Invoke Cache API + $em->getCache()->evictEntity('Entity\Country', 1); + +Using the repository query cache +--------------------- + +As well as ``Query Cache`` all persister queries store only identifier values for an individual query. +All persister use a single timestamps cache region keeps track of the last update for each persister, +When a query is loaded from cache, the timestamp region is checked for the last update for that persister. +Using the last update timestamps as part of the query key invalidate the cache key when an update occurs. + +.. code-block:: php + + getRepository('Entity\Country')->findAll(); + + // load from query and entities from cache.. + $entities = $em->getRepository('Entity\Country')->findAll(); + + // update the timestamp cache region for Country + $em->persist(new Country('zombieland')); + $em->flush(); + $em->clear(); + + // Reload from database. + // At this point the query cache key if not logger valid, the select goes straight + $entities = $em->getRepository('Entity\Country')->findAll(); + +Cache API +--------- + +Caches are not aware of changes made by another application. +However, you can use the cache API to check / invalidate cache entries. + +.. code-block:: php + + getCache(); + + $cache->containsEntity('Entity\State', 1) // Check if the cache exists + $cache->evictEntity('Entity\State', 1); // Remove an entity from cache + $cache->evictEntityRegion('Entity\State'); // Remove all entities from cache + + $cache->containsCollection('Entity\State', 'cities', 1); // Check if the cache exists + $cache->evictCollection('Entity\State', 'cities', 1); // Remove an entity collection from cache + $cache->evictCollectionRegion('Entity\State', 'cities'); // Remove all collections from cache + +Limitations +----------- + +Composite primary key +~~~~~~~~~~~~~~~~~~~~~ + +Composite primary key are supported by second level cache, +however when one of the keys is an association the cached entity should always be retrieved using the association identifier. +For performance reasons the cache API does not extract from composite primary key. + +.. code-block:: php + + find('Article', 1); + + // Supported + /* @var $article Article */ + $article = $em->find('Article', $article); + + // Supported + $id = array('source' => 1, 'target' => 2); + $reference = $em->find('Reference', $id); + + // NOT Supported + $id = array('source' => new Article(1), 'target' => new Article(2)); + $reference = $em->find('Reference', $id); + +Distributed environments +~~~~~~~~~~~~~~~~~~~~~~~~ + +Some cache driver are not meant to be used in a distributed environment. +Load-balancer for distributing workloads across multiple computing resources +should be used in conjunction with distributed caching system such as memcached, redis, riak ... + +Caches should be used with care when using a load-balancer if you don't share the cache. +While using APC or any file based cache update occurred in a specific machine would not reflect to the cache in other machines. + + +Paginator +~~~~~~~~~ + +Count queries generated by ``Doctrine\ORM\Tools\Pagination\Paginator`` are not cached by second-level cache. +Although entities and query result are cached count queries will hit the database every time. diff --git a/vendor/doctrine/orm/docs/en/reference/security.rst b/vendor/doctrine/orm/docs/en/reference/security.rst new file mode 100644 index 0000000000000000000000000000000000000000..efc0989cfbf111e7863e5797c579964f7940aaf4 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/security.rst @@ -0,0 +1,151 @@ +Security +======== + +The Doctrine library is operating very close to your database and as such needs +to handle and make assumptions about SQL injection vulnerabilities. + +It is vital that you understand how Doctrine approaches security, because +we cannot protect you from SQL injection. + +Please also read the documentation chapter on Security in Doctrine DBAL. This +page only handles Security issues in the ORM. + +- [DBAL Security Page](https://github.com/doctrine/dbal/blob/master/docs/en/reference/security.rst) + +If you find a Security bug in Doctrine, please report it on Jira and change the +Security Level to "Security Issues". It will be visible to Doctrine Core +developers and you only. + +User input and Doctrine ORM +--------------------------- + +The ORM is much better at protecting against SQL injection than the DBAL alone. +You can consider the following APIs to be safe from SQL injection: + +- ``\Doctrine\ORM\EntityManager#find()`` and ``getReference()``. +- All values on Objects inserted and updated through ``Doctrine\ORM\EntityManager#persist()`` +- All find methods on ``Doctrine\ORM\EntityRepository``. +- User Input set to DQL Queries or QueryBuilder methods through + - ``setParameter()`` or variants + - ``setMaxResults()`` + - ``setFirstResult()`` +- Queries through the Criteria API on ``Doctrine\ORM\PersistentCollection`` and + ``Doctrine\ORM\EntityRepository``. + +You are **NOT** save from SQL injection when using user input with: + +- Expression API of ``Doctrine\ORM\QueryBuilder`` +- Concatenating user input into DQL SELECT, UPDATE or DELETE statements or + Native SQL. + +This means SQL injections can only occur with Doctrine ORM when working with +Query Objects of any kind. The safe rule is to always use prepared statement +parameters for user objects when using a Query object. + +.. warning:: + + Insecure code follows, don't copy paste this. + +The following example shows insecure DQL usage: + +.. code-block:: php + + createQuery($dql); + $query->setParameter(1, $_GET['status']); + + +Preventing Mass Assignment Vulnerabilities +------------------------------------------ + +ORMs are very convenient for CRUD applications and Doctrine is no exception. +However CRUD apps are often vulnerable to mass assignment security problems +when implemented naively. + +Doctrine is not vulnerable to this problem out of the box, but you can easily +make your entities vulnerable to mass assignment when you add methods of +the kind ``updateFromArray()`` or ``updateFromJson()`` to them. A vulnerable +entity might look like this: + +.. code-block:: php + + $value) { + $this->$key = $value; + } + } + } + +Now the possiblity of mass-asignment exists on this entity and can +be exploitet by attackers to set the "isAdmin" flag to true on any +object when you pass the whole request data to this method like: + +.. code-block:: php + + fromArray($_POST); + + $entityManager->persist($entity); + $entityManager->flush(); + +You can spot this problem in this very simple example easily. However +in combination with frameworks and form libraries it might not be +so obvious when this issue arises. Be careful to avoid this +kind of mistake. + +How to fix this problem? You should always have a whitelist +of allowed key to set via mass assignment functions. + +.. code-block:: php + + public function fromArray(array $userInput, $allowedFields = array()) + { + foreach ($userInput as $key => $value) { + if (in_array($key, $allowedFields)) { + $this->$key = $value; + } + } + } diff --git a/vendor/doctrine/orm/docs/en/reference/tools.rst b/vendor/doctrine/orm/docs/en/reference/tools.rst new file mode 100644 index 0000000000000000000000000000000000000000..51f4573000e9304574eb959f30ee187df89d9a4d --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/tools.rst @@ -0,0 +1,528 @@ +Tools +===== + +Doctrine Console +---------------- + +The Doctrine Console is a Command Line Interface tool for simplifying common +administration tasks during the development of a project that uses Doctrine 2. + +Take a look at the :doc:`Installation and Configuration ` +chapter for more information how to setup the console command. + +Display Help Information +~~~~~~~~~~~~~~~~~~~~~~~~ + +Type ``php vendor/bin/doctrine`` on the command line and you should see an +overview of the available commands or use the --help flag to get +information on the available commands. If you want to know more +about the use of generate entities for example, you can call: + +.. code-block:: php + + $> php vendor/bin/doctrine orm:generate-entities --help + + +Configuration +~~~~~~~~~~~~~ + +Whenever the ``doctrine`` command line tool is invoked, it can +access all Commands that were registered by developer. There is no +auto-detection mechanism at work. The Doctrine binary +already registers all the commands that currently ship with +Doctrine DBAL and ORM. If you want to use additional commands you +have to register them yourself. + +All the commands of the Doctrine Console require access to the ``EntityManager`` +or ``DBAL`` Connection. You have to inject them into the console application +using so called Helper-Sets. This requires either the ``db`` +or the ``em`` helpers to be defined in order to work correctly. + +Whenever you invoke the Doctrine binary the current folder is searched for a +``cli-config.php`` file. This file contains the project specific configuration: + +.. code-block:: php + + new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($conn) + )); + $cli->setHelperSet($helperSet); + +When dealing with the ORM package, the EntityManagerHelper is +required: + +.. code-block:: php + + new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em) + )); + $cli->setHelperSet($helperSet); + +The HelperSet instance has to be generated in a separate file (i.e. +``cli-config.php``) that contains typical Doctrine bootstrap code +and predefines the needed HelperSet attributes mentioned above. A +sample ``cli-config.php`` file looks as follows: + +.. code-block:: php + + new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()), + 'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em) + )); + +It is important to define a correct HelperSet that Doctrine binary +script will ultimately use. The Doctrine Binary will automatically +find the first instance of HelperSet in the global variable +namespace and use this. + +.. note:: + + You have to adjust this snippet for your specific application or framework + and use their facilities to access the Doctrine EntityManager and + Connection Resources. + +Command Overview +~~~~~~~~~~~~~~~~ + +The following Commands are currently available: + + +- ``help`` Displays help for a command (?) +- ``list`` Lists commands +- ``dbal:import`` Import SQL file(s) directly to Database. +- ``dbal:run-sql`` Executes arbitrary SQL directly from the + command line. +- ``orm:clear-cache:metadata`` Clear all metadata cache of the + various cache drivers. +- ``orm:clear-cache:query`` Clear all query cache of the various + cache drivers. +- ``orm:clear-cache:result`` Clear result cache of the various + cache drivers. +- ``orm:convert-d1-schema`` Converts Doctrine 1.X schema into a + Doctrine 2.X schema. +- ``orm:convert-mapping`` Convert mapping information between + supported formats. +- ``orm:ensure-production-settings`` Verify that Doctrine is + properly configured for a production environment. +- ``orm:generate-entities`` Generate entity classes and method + stubs from your mapping information. +- ``orm:generate-proxies`` Generates proxy classes for entity + classes. +- ``orm:generate-repositories`` Generate repository classes from + your mapping information. +- ``orm:run-dql`` Executes arbitrary DQL directly from the command + line. +- ``orm:schema-tool:create`` Processes the schema and either + create it directly on EntityManager Storage Connection or generate + the SQL output. +- ``orm:schema-tool:drop`` Processes the schema and either drop + the database schema of EntityManager Storage Connection or generate + the SQL output. +- ``orm:schema-tool:update`` Processes the schema and either + update the database schema of EntityManager Storage Connection or + generate the SQL output. + +For these commands are also available aliases: + + +- ``orm:convert:d1-schema`` is alias for ``orm:convert-d1-schema``. +- ``orm:convert:mapping`` is alias for ``orm:convert-mapping``. +- ``orm:generate:entities`` is alias for ``orm:generate-entities``. +- ``orm:generate:proxies`` is alias for ``orm:generate-proxies``. +- ``orm:generate:repositories`` is alias for ``orm:generate-repositories``. + +.. note:: + + Console also supports auto completion, for example, instead of + ``orm:clear-cache:query`` you can use just ``o:c:q``. + +Database Schema Generation +-------------------------- + +.. note:: + + SchemaTool can do harm to your database. It will drop or alter + tables, indexes, sequences and such. Please use this tool with + caution in development and not on a production server. It is meant + for helping you develop your Database Schema, but NOT with + migrating schema from A to B in production. A safe approach would + be generating the SQL on development server and saving it into SQL + Migration files that are executed manually on the production + server. + + SchemaTool assumes your Doctrine Project uses the given database on + its own. Update and Drop commands will mess with other tables if + they are not related to the current project that is using Doctrine. + Please be careful! + + +To generate your database schema from your Doctrine mapping files +you can use the ``SchemaTool`` class or the ``schema-tool`` Console +Command. + +When using the SchemaTool class directly, create your schema using +the ``createSchema()`` method. First create an instance of the +``SchemaTool`` and pass it an instance of the ``EntityManager`` +that you want to use to create the schema. This method receives an +array of ``ClassMetadataInfo`` instances. + +.. code-block:: php + + getClassMetadata('Entities\User'), + $em->getClassMetadata('Entities\Profile') + ); + $tool->createSchema($classes); + +To drop the schema you can use the ``dropSchema()`` method. + +.. code-block:: php + + dropSchema($classes); + +This drops all the tables that are currently used by your metadata +model. When you are changing your metadata a lot during development +you might want to drop the complete database instead of only the +tables of the current model to clean up with orphaned tables. + +.. code-block:: php + + dropSchema($classes, \Doctrine\ORM\Tools\SchemaTool::DROP_DATABASE); + +You can also use database introspection to update your schema +easily with the ``updateSchema()`` method. It will compare your +existing database schema to the passed array of +``ClassMetdataInfo`` instances. + +.. code-block:: php + + updateSchema($classes); + +If you want to use this functionality from the command line you can +use the ``schema-tool`` command. + +To create the schema use the ``create`` command: + +.. code-block:: php + + $ php doctrine orm:schema-tool:create + +To drop the schema use the ``drop`` command: + +.. code-block:: php + + $ php doctrine orm:schema-tool:drop + +If you want to drop and then recreate the schema then use both +options: + +.. code-block:: php + + $ php doctrine orm:schema-tool:drop + $ php doctrine orm:schema-tool:create + +As you would think, if you want to update your schema use the +``update`` command: + +.. code-block:: php + + $ php doctrine orm:schema-tool:update + +All of the above commands also accept a ``--dump-sql`` option that +will output the SQL for the ran operation. + +.. code-block:: php + + $ php doctrine orm:schema-tool:create --dump-sql + +Before using the orm:schema-tool commands, remember to configure +your cli-config.php properly. + +.. note:: + + When using the Annotation Mapping Driver you have to either setup + your autoloader in the cli-config.php correctly to find all the + entities, or you can use the second argument of the + ``EntityManagerHelper`` to specify all the paths of your entities + (or mapping files), i.e. + ``new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em, $mappingPaths);`` + +Entity Generation +----------------- + +Generate entity classes and method stubs from your mapping information. + +.. code-block:: php + + $ php doctrine orm:generate-entities + $ php doctrine orm:generate-entities --update-entities + $ php doctrine orm:generate-entities --regenerate-entities + +This command is not suited for constant usage. It is a little helper and does +not support all the mapping edge cases very well. You still have to put work +in your entities after using this command. + +It is possible to use the EntityGenerator on code that you have already written. It will +not be lost. The EntityGenerator will only append new code to your +file and will not delete the old code. However this approach may still be prone +to error and we suggest you use code repositories such as GIT or SVN to make +backups of your code. + +It makes sense to generate the entity code if you are using entities as Data +Access Objects only and don't put much additional logic on them. If you are +however putting much more logic on the entities you should refrain from using +the entity-generator and code your entities manually. + +.. note:: + + Even if you specified Inheritance options in your + XML or YAML Mapping files the generator cannot generate the base and + child classes for you correctly, because it doesn't know which + class is supposed to extend which. You have to adjust the entity + code manually for inheritance to work! + + +Convert Mapping Information +--------------------------- + +Convert mapping information between supported formats. + +This is an **execute one-time** command. It should not be necessary for +you to call this method multiple times, especially when using the ``--from-database`` +flag. + +Converting an existing database schema into mapping files only solves about 70-80% +of the necessary mapping information. Additionally the detection from an existing +database cannot detect inverse associations, inheritance types, +entities with foreign keys as primary keys and many of the +semantical operations on associations such as cascade. + +.. note:: + + There is no need to convert YAML or XML mapping files to annotations + every time you make changes. All mapping drivers are first class citizens + in Doctrine 2 and can be used as runtime mapping for the ORM. See the + docs on XML and YAML Mapping for an example how to register this metadata + drivers as primary mapping source. + +To convert some mapping information between the various supported +formats you can use the ``ClassMetadataExporter`` to get exporter +instances for the different formats: + +.. code-block:: php + + getExporter('yml', '/path/to/export/yml'); + +Now you can export some ``ClassMetadata`` instances: + +.. code-block:: php + + getClassMetadata('Entities\User'), + $em->getClassMetadata('Entities\Profile') + ); + $exporter->setMetadata($classes); + $exporter->export(); + +This functionality is also available from the command line to +convert your loaded mapping information to another format. The +``orm:convert-mapping`` command accepts two arguments, the type to +convert to and the path to generate it: + +.. code-block:: php + + $ php doctrine orm:convert-mapping xml /path/to/mapping-path-converted-to-xml + +Reverse Engineering +------------------- + +You can use the ``DatabaseDriver`` to reverse engineer a database +to an array of ``ClassMetadataInfo`` instances and generate YAML, +XML, etc. from them. + +.. note:: + + Reverse Engineering is a **one-time** process that can get you started with a project. + Converting an existing database schema into mapping files only detects about 70-80% + of the necessary mapping information. Additionally the detection from an existing + database cannot detect inverse associations, inheritance types, + entities with foreign keys as primary keys and many of the + semantical operations on associations such as cascade. + +First you need to retrieve the metadata instances with the +``DatabaseDriver``: + +.. code-block:: php + + getConfiguration()->setMetadataDriverImpl( + new \Doctrine\ORM\Mapping\Driver\DatabaseDriver( + $em->getConnection()->getSchemaManager() + ) + ); + + $cmf = new DisconnectedClassMetadataFactory(); + $cmf->setEntityManager($em); + $metadata = $cmf->getAllMetadata(); + +Now you can get an exporter instance and export the loaded metadata +to yml: + +.. code-block:: php + + getExporter('yml', '/path/to/export/yml'); + $exporter->setMetadata($metadata); + $exporter->export(); + +You can also reverse engineer a database using the +``orm:convert-mapping`` command: + +.. code-block:: php + + $ php doctrine orm:convert-mapping --from-database yml /path/to/mapping-path-converted-to-yml + +.. note:: + + Reverse Engineering is not always working perfectly + depending on special cases. It will only detect Many-To-One + relations (even if they are One-To-One) and will try to create + entities from Many-To-Many tables. It also has problems with naming + of foreign keys that have multiple column names. Any Reverse + Engineered Database-Schema needs considerable manual work to become + a useful domain model. + + +Runtime vs Development Mapping Validation +----------------------------------------- + +For performance reasons Doctrine 2 has to skip some of the +necessary validation of metadata mappings. You have to execute +this validation in your development workflow to verify the +associations are correctly defined. + +You can either use the Doctrine Command Line Tool: + +.. code-block:: php + + doctrine orm:validate-schema + +Or you can trigger the validation manually: + +.. code-block:: php + + validateMapping(); + + if (count($errors) > 0) { + // Lots of errors! + echo implode("\n\n", $errors); + } + +If the mapping is invalid the errors array contains a positive +number of elements with error messages. + +.. warning:: + + One mapping option that is not validated is the use of the referenced column name. + It has to point to the equivalent primary key otherwise Doctrine will not work. + +.. note:: + + One common error is to use a backlash in front of the + fully-qualified class-name. Whenever a FQCN is represented inside a + string (such as in your mapping definitions) you have to drop the + prefix backslash. PHP does this with ``get_class()`` or Reflection + methods for backwards compatibility reasons. + + +Adding own commands +------------------- + +You can also add your own commands on-top of the Doctrine supported +tools if you are using a manually built console script. + +To include a new command on Doctrine Console, you need to do modify the +``doctrine.php`` file a little: + +.. code-block:: php + + setCatchExceptions(true); + $cli->setHelperSet($helperSet); + + // Register All Doctrine Commands + ConsoleRunner::addCommands($cli); + + // Register your own command + $cli->addCommand(new \MyProject\Tools\Console\Commands\MyCustomCommand); + + // Runs console application + $cli->run(); + +Additionally, include multiple commands (and overriding previously +defined ones) is possible through the command: + +.. code-block:: php + + addCommands(array( + new \MyProject\Tools\Console\Commands\MyCustomCommand(), + new \MyProject\Tools\Console\Commands\SomethingCommand(), + new \MyProject\Tools\Console\Commands\AnotherCommand(), + new \MyProject\Tools\Console\Commands\OneMoreCommand(), + )); + + +Re-use console application +-------------------------- + +You are also able to retrieve and re-use the default console application. +Just call ``ConsoleRunner::createApplication(...)`` with an appropriate +HelperSet, like it is described in the configuration section. + +.. code-block:: php + + run(); + diff --git a/vendor/doctrine/orm/docs/en/reference/transactions-and-concurrency.rst b/vendor/doctrine/orm/docs/en/reference/transactions-and-concurrency.rst new file mode 100644 index 0000000000000000000000000000000000000000..4dc18318e62c3ebf5435bc5ab3dd8bc54dd8db74 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/transactions-and-concurrency.rst @@ -0,0 +1,350 @@ +Transactions and Concurrency +============================ + +Transaction Demarcation +----------------------- + +Transaction demarcation is the task of defining your transaction +boundaries. Proper transaction demarcation is very important +because if not done properly it can negatively affect the +performance of your application. Many databases and database +abstraction layers like PDO by default operate in auto-commit mode, +which means that every single SQL statement is wrapped in a small +transaction. Without any explicit transaction demarcation from your +side, this quickly results in poor performance because transactions +are not cheap. + +For the most part, Doctrine 2 already takes care of proper +transaction demarcation for you: All the write operations +(INSERT/UPDATE/DELETE) are queued until ``EntityManager#flush()`` +is invoked which wraps all of these changes in a single +transaction. + +However, Doctrine 2 also allows (and encourages) you to take over +and control transaction demarcation yourself. + +These are two ways to deal with transactions when using the +Doctrine ORM and are now described in more detail. + +Approach 1: Implicitly +~~~~~~~~~~~~~~~~~~~~~~ + +The first approach is to use the implicit transaction handling +provided by the Doctrine ORM EntityManager. Given the following +code snippet, without any explicit transaction demarcation: + +.. code-block:: php + + setName('George'); + $em->persist($user); + $em->flush(); + +Since we do not do any custom transaction demarcation in the above +code, ``EntityManager#flush()`` will begin and commit/rollback a +transaction. This behavior is made possible by the aggregation of +the DML operations by the Doctrine ORM and is sufficient if all the +data manipulation that is part of a unit of work happens through +the domain model and thus the ORM. + +Approach 2: Explicitly +~~~~~~~~~~~~~~~~~~~~~~ + +The explicit alternative is to use the ``Doctrine\DBAL\Connection`` +API directly to control the transaction boundaries. The code then +looks like this: + +.. code-block:: php + + getConnection()->beginTransaction(); // suspend auto-commit + try { + //... do some work + $user = new User; + $user->setName('George'); + $em->persist($user); + $em->flush(); + $em->getConnection()->commit(); + } catch (Exception $e) { + $em->getConnection()->rollback(); + throw $e; + } + +Explicit transaction demarcation is required when you want to +include custom DBAL operations in a unit of work or when you want +to make use of some methods of the ``EntityManager`` API that +require an active transaction. Such methods will throw a +``TransactionRequiredException`` to inform you of that +requirement. + +A more convenient alternative for explicit transaction demarcation is the use +of provided control abstractions in the form of +``Connection#transactional($func)`` and ``EntityManager#transactional($func)``. +When used, these control abstractions ensure that you never forget to rollback +the transaction, in addition to the obvious code reduction. An example that is +functionally equivalent to the previously shown code looks as follows: + +.. code-block:: php + + transactional(function($em) { + //... do some work + $user = new User; + $user->setName('George'); + $em->persist($user); + }); + +The difference between ``Connection#transactional($func)`` and +``EntityManager#transactional($func)`` is that the latter +abstraction flushes the ``EntityManager`` prior to transaction +commit and rolls back the transaction when an +exception occurs. + +Exception Handling +~~~~~~~~~~~~~~~~~~ + +When using implicit transaction demarcation and an exception occurs +during ``EntityManager#flush()``, the transaction is automatically +rolled back and the ``EntityManager`` closed. + +When using explicit transaction demarcation and an exception +occurs, the transaction should be rolled back immediately and the +``EntityManager`` closed by invoking ``EntityManager#close()`` and +subsequently discarded, as demonstrated in the example above. This +can be handled elegantly by the control abstractions shown earlier. +Note that when catching ``Exception`` you should generally re-throw +the exception. If you intend to recover from some exceptions, catch +them explicitly in earlier catch blocks (but do not forget to +rollback the transaction and close the ``EntityManager`` there as +well). All other best practices of exception handling apply +similarly (i.e. either log or re-throw, not both, etc.). + +As a result of this procedure, all previously managed or removed +instances of the ``EntityManager`` become detached. The state of +the detached objects will be the state at the point at which the +transaction was rolled back. The state of the objects is in no way +rolled back and thus the objects are now out of synch with the +database. The application can continue to use the detached objects, +knowing that their state is potentially no longer accurate. + +If you intend to start another unit of work after an exception has +occurred you should do that with a new ``EntityManager``. + +Locking Support +--------------- + +Doctrine 2 offers support for Pessimistic- and Optimistic-locking +strategies natively. This allows to take very fine-grained control +over what kind of locking is required for your Entities in your +application. + +Optimistic Locking +~~~~~~~~~~~~~~~~~~ + +Database transactions are fine for concurrency control during a +single request. However, a database transaction should not span +across requests, the so-called "user think time". Therefore a +long-running "business transaction" that spans multiple requests +needs to involve several database transactions. Thus, database +transactions alone can no longer control concurrency during such a +long-running business transaction. Concurrency control becomes the +partial responsibility of the application itself. + +Doctrine has integrated support for automatic optimistic locking +via a version field. In this approach any entity that should be +protected against concurrent modifications during long-running +business transactions gets a version field that is either a simple +number (mapping type: integer) or a timestamp (mapping type: +datetime). When changes to such an entity are persisted at the end +of a long-running conversation the version of the entity is +compared to the version in the database and if they don't match, an +``OptimisticLockException`` is thrown, indicating that the entity +has been modified by someone else already. + +You designate a version field in an entity as follows. In this +example we'll use an integer. + +.. code-block:: php + + find('User', $theEntityId, LockMode::OPTIMISTIC, $expectedVersion); + + // do the work + + $em->flush(); + } catch(OptimisticLockException $e) { + echo "Sorry, but someone else has already changed this entity. Please apply the changes again!"; + } + +Or you can use ``EntityManager#lock()`` to find out: + +.. code-block:: php + + find('User', $theEntityId); + + try { + // assert version + $em->lock($entity, LockMode::OPTIMISTIC, $expectedVersion); + + } catch(OptimisticLockException $e) { + echo "Sorry, but someone else has already changed this entity. Please apply the changes again!"; + } + +Important Implementation Notes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can easily get the optimistic locking workflow wrong if you +compare the wrong versions. Say you have Alice and Bob editing a +hypothetical blog post: + +- Alice reads the headline of the blog post being "Foo", at + optimistic lock version 1 (GET Request) +- Bob reads the headline of the blog post being "Foo", at + optimistic lock version 1 (GET Request) +- Bob updates the headline to "Bar", upgrading the optimistic lock + version to 2 (POST Request of a Form) +- Alice updates the headline to "Baz", ... (POST Request of a + Form) + +Now at the last stage of this scenario the blog post has to be read +again from the database before Alice's headline can be applied. At +this point you will want to check if the blog post is still at +version 1 (which it is not in this scenario). + +Using optimistic locking correctly, you *have* to add the version +as an additional hidden field (or into the SESSION for more +safety). Otherwise you cannot verify the version is still the one +being originally read from the database when Alice performed her +GET request for the blog post. If this happens you might see lost +updates you wanted to prevent with Optimistic Locking. + +See the example code, The form (GET Request): + +.. code-block:: php + + find('BlogPost', 123456); + + echo ''; + echo ''; + +And the change headline action (POST Request): + +.. code-block:: php + + find('BlogPost', $postId, \Doctrine\DBAL\LockMode::OPTIMISTIC, $postVersion); + +Pessimistic Locking +~~~~~~~~~~~~~~~~~~~ + +Doctrine 2 supports Pessimistic Locking at the database level. No +attempt is being made to implement pessimistic locking inside +Doctrine, rather vendor-specific and ANSI-SQL commands are used to +acquire row-level locks. Every Entity can be part of a pessimistic +lock, there is no special metadata required to use this feature. + +However for Pessimistic Locking to work you have to disable the +Auto-Commit Mode of your Database and start a transaction around +your pessimistic lock use-case using the "Approach 2: Explicit +Transaction Demarcation" described above. Doctrine 2 will throw an +Exception if you attempt to acquire an pessimistic lock and no +transaction is running. + +Doctrine 2 currently supports two pessimistic lock modes: + + +- Pessimistic Write + (``Doctrine\DBAL\LockMode::PESSIMISTIC_WRITE``), locks the + underlying database rows for concurrent Read and Write Operations. +- Pessimistic Read (``Doctrine\DBAL\LockMode::PESSIMISTIC_READ``), + locks other concurrent requests that attempt to update or lock rows + in write mode. + +You can use pessimistic locks in three different scenarios: + + +1. Using + ``EntityManager#find($className, $id, \Doctrine\DBAL\LockMode::PESSIMISTIC_WRITE)`` + or + ``EntityManager#find($className, $id, \Doctrine\DBAL\LockMode::PESSIMISTIC_READ)`` +2. Using + ``EntityManager#lock($entity, \Doctrine\DBAL\LockMode::PESSIMISTIC_WRITE)`` + or + ``EntityManager#lock($entity, \Doctrine\DBAL\LockMode::PESSIMISTIC_READ)`` +3. Using + ``Query#setLockMode(\Doctrine\DBAL\LockMode::PESSIMISTIC_WRITE)`` + or + ``Query#setLockMode(\Doctrine\DBAL\LockMode::PESSIMISTIC_READ)`` + + diff --git a/vendor/doctrine/orm/docs/en/reference/unitofwork-associations.rst b/vendor/doctrine/orm/docs/en/reference/unitofwork-associations.rst new file mode 100644 index 0000000000000000000000000000000000000000..da3cc9dc88bb3d856c7f4577ad5e4a50a6724055 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/unitofwork-associations.rst @@ -0,0 +1,60 @@ +Association Updates: Owning Side and Inverse Side +================================================= + +When mapping bidirectional associations it is important to +understand the concept of the owning and inverse sides. The +following general rules apply: + +- Relationships may be bidirectional or unidirectional. +- A bidirectional relationship has both an owning side and an inverse side +- A unidirectional relationship only has an owning side. +- Doctrine will **only** check the owning side of an association for changes. + +Bidirectional Associations +-------------------------- + +The following rules apply to **bidirectional** associations: + +- The inverse side has to use the ``mappedBy`` attribute of the OneToOne, + OneToMany, or ManyToMany mapping declaration. The mappedBy + attribute contains the name of the association-field on the owning side. +- The owning side has to use the ``inversedBy`` attribute of the + OneToOne, ManyToOne, or ManyToMany mapping declaration. + The inversedBy attribute contains the name of the association-field + on the inverse-side. +- ManyToOne is always the owning side of a bidirectional association. +- OneToMany is always the inverse side of a bidirectional association. +- The owning side of a OneToOne association is the entity with the table + containing the foreign key. +- You can pick the owning side of a many-to-many association yourself. + +Important concepts +------------------ + +**Doctrine will only check the owning side of an association for changes.** + +To fully understand this, remember how bidirectional associations +are maintained in the object world. There are 2 references on each +side of the association and these 2 references both represent the +same association but can change independently of one another. Of +course, in a correct application the semantics of the bidirectional +association are properly maintained by the application developer +(that's his responsibility). Doctrine needs to know which of these +two in-memory references is the one that should be persisted and +which not. This is what the owning/inverse concept is mainly used +for. + +**Changes made only to the inverse side of an association are ignored. Make sure to update both sides of a bidirectional association (or at least the owning side, from Doctrine's point of view)** + +The owning side of a bidirectional association is the side Doctrine +"looks at" when determining the state of the association, and +consequently whether there is anything to do to update the +association in the database. + +.. note:: + + "Owning side" and "inverse side" are technical concepts of + the ORM technology, not concepts of your domain model. What you + consider as the owning side in your domain model can be different + from what the owning side is for Doctrine. These are unrelated. + diff --git a/vendor/doctrine/orm/docs/en/reference/unitofwork.rst b/vendor/doctrine/orm/docs/en/reference/unitofwork.rst new file mode 100644 index 0000000000000000000000000000000000000000..cdfb6e0be4a187ad8109e893ecef8451dfed1aff --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/unitofwork.rst @@ -0,0 +1,201 @@ +Doctrine Internals explained +============================ + +Object relational mapping is a complex topic and sufficiently understanding how Doctrine works internally helps you use its full power. + +How Doctrine keeps track of Objects +----------------------------------- + +Doctrine uses the Identity Map pattern to track objects. Whenever you fetch an +object from the database, Doctrine will keep a reference to this object inside +its UnitOfWork. The array holding all the entity references is two-levels deep +and has the keys "root entity name" and "id". Since Doctrine allows composite +keys the id is a sorted, serialized version of all the key columns. + +This allows Doctrine room for optimizations. If you call the EntityManager and +ask for an entity with a specific ID twice, it will return the same instance: + +.. code-block:: php + + public function testIdentityMap() + { + $objectA = $this->entityManager->find('EntityName', 1); + $objectB = $this->entityManager->find('EntityName', 1); + + $this->assertSame($objectA, $objectB) + } + +Only one SELECT query will be fired against the database here. In the second +``EntityManager#find()`` call Doctrine will check the identity map first and +doesn't need to make that database roundtrip. + +Even if you get a proxy object first then fetch the object by the same id you +will still end up with the same reference: + +.. code-block:: php + + public function testIdentityMapReference() + { + $objectA = $this->entityManager->getReference('EntityName', 1); + // check for proxyinterface + $this->assertInstanceOf('Doctrine\ORM\Proxy\Proxy', $objectA); + + $objectB = $this->entityManager->find('EntityName', 1); + + $this->assertSame($objectA, $objectB) + } + +The identity map being indexed by primary keys only allows shortcuts when you +ask for objects by primary key. Assume you have the following ``persons`` +table: + +:: + + id | name + ------------- + 1 | Benjamin + 2 | Bud + +Take the following example where two +consecutive calls are made against a repository to fetch an entity by a set of +criteria: + +.. code-block:: php + + public function testIdentityMapRepositoryFindBy() + { + $repository = $this->entityManager->getRepository('Person'); + $objectA = $repository->findOneBy(array('name' => 'Benjamin')); + $objectB = $repository->findOneBy(array('name' => 'Benjamin')); + + $this->assertSame($objectA, $objectB); + } + +This query will still return the same references and `$objectA` and `$objectB` +are indeed referencing the same object. However when checking your SQL logs you +will realize that two queries have been executed against the database. Doctrine +only knows objects by id, so a query for different criteria has to go to the +database, even if it was executed just before. + +But instead of creating a second Person object Doctrine first gets the primary +key from the row and check if it already has an object inside the UnitOfWork +with that primary key. In our example it finds an object and decides to return +this instead of creating a new one. + +The identity map has a second use-case. When you call ``EntityManager#flush`` +Doctrine will ask the identity map for all objects that are currently managed. +This means you don't have to call ``EntityManager#persist`` over and over again +to pass known objects to the EntityManager. This is a NO-OP for known entities, +but leads to much code written that is confusing to other developers. + +The following code WILL update your database with the changes made to the +``Person`` object, even if you did not call ``EntityManager#persist``: + +.. code-block:: php + + find("Person", 1); + $user->setName("Guilherme"); + $entityManager->flush(); + +How Doctrine Detects Changes +---------------------------- + +Doctrine is a data-mapper that tries to achieve persistence-ignorance (PI). +This means you map php objects into a relational database that don't +necessarily know about the database at all. A natural question would now be, +"how does Doctrine even detect objects have changed?". + +For this Doctrine keeps a second map inside the UnitOfWork. Whenever you fetch +an object from the database Doctrine will keep a copy of all the properties and +associations inside the UnitOfWork. Because variables in the PHP language are +subject to "copy-on-write" the memory usage of a PHP request that only reads +objects from the database is the same as if Doctrine did not keep this variable +copy. Only if you start changing variables PHP will create new variables internally +that consume new memory. + +Now whenever you call ``EntityManager#flush`` Doctrine will iterate over the +Identity Map and for each object compares the original property and association +values with the values that are currently set on the object. If changes are +detected then the object is queued for a SQL UPDATE operation. Only the fields +that actually changed are updated. + +This process has an obvious performance impact. The larger the size of the +UnitOfWork is, the longer this computation takes. There are several ways to +optimize the performance of the Flush Operation: + +- Mark entities as read only. These entities can only be inserted or removed, + but are never updated. They are omitted in the changeset calculation. +- Temporarily mark entities as read only. If you have a very large UnitOfWork + but know that a large set of entities has not changed, just mark them as read + only with ``$entityManager->getUnitOfWork()->markReadOnly($entity)``. +- Flush only a single entity with ``$entityManager->flush($entity)``. +- Use :doc:`Change Tracking Policies ` to use more + explicit strategies of notifying the UnitOfWork what objects/properties + changed. + + +Query Internals +--------------- + +The different ORM Layers +------------------------ + +Doctrine ships with a set of layers with different responsibilities. This +section gives a short explanation of each layer. + +Hydration +~~~~~~~~~ + +Responsible for creating a final result from a raw database statement and a +result-set mapping object. The developer can choose which kind of result he +wishes to be hydrated. Default result-types include: + +- SQL to Entities +- SQL to structured Arrays +- SQL to simple scalar result arrays +- SQL to a single result variable + +Hydration to entities and arrays is one of most complex parts of Doctrine +algorithm-wise. It can build results with for example: + +- Single table selects +- Joins with n:1 or 1:n cardinality, grouping belonging to the same parent. +- Mixed results of objects and scalar values +- Hydration of results by a given scalar value as key. + +Persisters +~~~~~~~~~~ + +tbr + +UnitOfWork +~~~~~~~~~~ + +tbr + +ResultSetMapping +~~~~~~~~~~~~~~~~ + +tbr + +DQL Parser +~~~~~~~~~~ + +tbr + +SQLWalker +~~~~~~~~~ + +tbr + +EntityManager +~~~~~~~~~~~~~ + +tbr + +ClassMetadataFactory +~~~~~~~~~~~~~~~~~~~~ + +tbr + diff --git a/vendor/doctrine/orm/docs/en/reference/working-with-associations.rst b/vendor/doctrine/orm/docs/en/reference/working-with-associations.rst new file mode 100644 index 0000000000000000000000000000000000000000..85ffaee3a2fafc9165723bc3dd02759bd2c014d4 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/working-with-associations.rst @@ -0,0 +1,712 @@ +Working with Associations +========================= + +Associations between entities are represented just like in regular +object-oriented PHP code using references to other objects or +collections of objects. + +Changes to associations in your code are not synchronized to the +database directly, only when calling ``EntityManager#flush()``. + +There are other concepts you should know about when working +with associations in Doctrine: + +- If an entity is removed from a collection, the association is + removed, not the entity itself. A collection of entities always + only represents the association to the containing entities, not the + entity itself. +- When a bidirectional assocation is updated, Doctrine only checks + on one of both sides for these changes. This is called the :doc:`owning side ` + of the association. +- A property with a reference to many entities has to be instances of the + ``Doctrine\Common\Collections\Collection`` interface. + +Association Example Entities +---------------------------- + +We will use a simple comment system with Users and Comments as +entities to show examples of association management. See the PHP +docblocks of each association in the following example for +information about its type and if it's the owning or inverse side. + +.. code-block:: php + + commentsRead; + } + + public function setFirstComment(Comment $c) { + $this->firstComment = $c; + } + } + +The interaction code would then look like in the following snippet +(``$em`` here is an instance of the EntityManager): + +.. code-block:: php + + find('User', $userId); + + // unidirectional many to many + $comment = $em->find('Comment', $readCommentId); + $user->getReadComments()->add($comment); + + $em->flush(); + + // unidirectional many to one + $myFirstComment = new Comment(); + $user->setFirstComment($myFirstComment); + + $em->persist($myFirstComment); + $em->flush(); + +In the case of bi-directional associations you have to update the +fields on both sides: + +.. code-block:: php + + commentsAuthored; + } + + public function getFavoriteComments() { + return $this->favorites; + } + } + + class Comment + { + // ... + + public function getUserFavorites() { + return $this->userFavorites; + } + + public function setAuthor(User $author = null) { + $this->author = $author; + } + } + + // Many-to-Many + $user->getFavorites()->add($favoriteComment); + $favoriteComment->getUserFavorites()->add($user); + + $em->flush(); + + // Many-To-One / One-To-Many Bidirectional + $newComment = new Comment(); + $user->getAuthoredComments()->add($newComment); + $newComment->setAuthor($user); + + $em->persist($newComment); + $em->flush(); + +Notice how always both sides of the bidirectional association are +updated. The previous unidirectional associations were simpler to +handle. + +Removing Associations +--------------------- + +Removing an association between two entities is similarly +straight-forward. There are two strategies to do so, by key and by +element. Here are some examples: + +.. code-block:: php + + getComments()->removeElement($comment); + $comment->setAuthor(null); + + $user->getFavorites()->removeElement($comment); + $comment->getUserFavorites()->removeElement($user); + + // Remove by Key + $user->getComments()->remove($ithComment); + $comment->setAuthor(null); + +You need to call ``$em->flush()`` to make persist these changes in +the database permanently. + +Notice how both sides of the bidirectional association are always +updated. Unidirectional associations are consequently simpler to +handle. Also note that if you use type-hinting in your methods, i.e. +``setAddress(Address $address)``, PHP will only allow null +values if ``null`` is set as default value. Otherwise +setAddress(null) will fail for removing the association. If you +insist on type-hinting a typical way to deal with this is to +provide a special method, like ``removeAddress()``. This can also +provide better encapsulation as it hides the internal meaning of +not having an address. + +When working with collections, keep in mind that a Collection is +essentially an ordered map (just like a PHP array). That is why the +``remove`` operation accepts an index/key. ``removeElement`` is a +separate method that has O(n) complexity using ``array_search``, +where n is the size of the map. + +.. note:: + + Since Doctrine always only looks at the owning side of a + bidirectional association for updates, it is not necessary for + write operations that an inverse collection of a bidirectional + one-to-many or many-to-many association is updated. This knowledge + can often be used to improve performance by avoiding the loading of + the inverse collection. + + +You can also clear the contents of a whole collection using the +``Collections::clear()`` method. You should be aware that using +this method can lead to a straight and optimized database delete or +update call during the flush operation that is not aware of +entities that have been re-added to the collection. + +Say you clear a collection of tags by calling +``$post->getTags()->clear();`` and then call +``$post->getTags()->add($tag)``. This will not recognize the tag having +already been added previously and will consequently issue two separate database +calls. + +Association Management Methods +------------------------------ + +It is generally a good idea to encapsulate proper association +management inside the entity classes. This makes it easier to use +the class correctly and can encapsulate details about how the +association is maintained. + +The following code shows updates to the previous User and Comment +example that encapsulate much of the association management code: + +.. code-block:: php + + commentsRead[] = $comment; + } + + public function addComment(Comment $comment) { + if (count($this->commentsAuthored) == 0) { + $this->setFirstComment($comment); + } + $this->comments[] = $comment; + $comment->setAuthor($this); + } + + private function setFirstComment(Comment $c) { + $this->firstComment = $c; + } + + public function addFavorite(Comment $comment) { + $this->favorites->add($comment); + $comment->addUserFavorite($this); + } + + public function removeFavorite(Comment $comment) { + $this->favorites->removeElement($comment); + $comment->removeUserFavorite($this); + } + } + + class Comment + { + // .. + + public function addUserFavorite(User $user) { + $this->userFavorites[] = $user; + } + + public function removeUserFavorite(User $user) { + $this->userFavorites->removeElement($user); + } + } + +You will notice that ``addUserFavorite`` and ``removeUserFavorite`` +do not call ``addFavorite`` and ``removeFavorite``, thus the +bidirectional association is strictly-speaking still incomplete. +However if you would naively add the ``addFavorite`` in +``addUserFavorite``, you end up with an infinite loop, so more work +is needed. As you can see, proper bidirectional association +management in plain OOP is a non-trivial task and encapsulating all +the details inside the classes can be challenging. + +.. note:: + + If you want to make sure that your collections are perfectly + encapsulated you should not return them from a + ``getCollectionName()`` method directly, but call + ``$collection->toArray()``. This way a client programmer for the + entity cannot circumvent the logic you implement on your entity for + association management. For example: + + +.. code-block:: php + + commentsRead->toArray(); + } + } + +This will however always initialize the collection, with all the +performance penalties given the size. In some scenarios of large +collections it might even be a good idea to completely hide the +read access behind methods on the EntityRepository. + +There is no single, best way for association management. It greatly +depends on the requirements of your concrete domain model as well +as your preferences. + +Synchronizing Bidirectional Collections +--------------------------------------- + +In the case of Many-To-Many associations you as the developer have the +responsibility of keeping the collections on the owning and inverse side +in sync when you apply changes to them. Doctrine can only +guarantee a consistent state for the hydration, not for your client +code. + +Using the User-Comment entities from above, a very simple example +can show the possible caveats you can encounter: + +.. code-block:: php + + getFavorites()->add($favoriteComment); + // not calling $favoriteComment->getUserFavorites()->add($user); + + $user->getFavorites()->contains($favoriteComment); // TRUE + $favoriteComment->getUserFavorites()->contains($user); // FALSE + +There are two approaches to handle this problem in your code: + + +1. Ignore updating the inverse side of bidirectional collections, + BUT never read from them in requests that changed their state. In + the next Request Doctrine hydrates the consistent collection state + again. +2. Always keep the bidirectional collections in sync through + association management methods. Reads of the Collections directly + after changes are consistent then. + +Transitive persistence / Cascade Operations +------------------------------------------- + +Persisting, removing, detaching, refreshing and merging individual entities can +become pretty cumbersome, especially when a highly interweaved object graph +is involved. Therefore Doctrine 2 provides a +mechanism for transitive persistence through cascading of these +operations. Each association to another entity or a collection of +entities can be configured to automatically cascade certain +operations. By default, no operations are cascaded. + +The following cascade options exist: + + +- persist : Cascades persist operations to the associated + entities. +- remove : Cascades remove operations to the associated entities. +- merge : Cascades merge operations to the associated entities. +- detach : Cascades detach operations to the associated entities. +- refresh : Cascades refresh operations to the associated entities. +- all : Cascades persist, remove, merge, refresh and detach operations to + associated entities. + +.. note:: + + Cascade operations are performed in memory. That means collections and related entities + are fetched into memory, even if they are still marked as lazy when + the cascade operation is about to be performed. However this approach allows + entity lifecycle events to be performed for each of these operations. + + However, pulling objects graph into memory on cascade can cause considerable performance + overhead, especially when cascading collections are large. Makes sure + to weigh the benefits and downsides of each cascade operation that you define. + + To rely on the database level cascade operations for the delete operation instead, you can + configure each join column with the **onDelete** option. See the respective + mapping driver chapters for more information. + +The following example is an extension to the User-Comment example +of this chapter. Suppose in our application a user is created +whenever he writes his first comment. In this case we would use the +following code: + +.. code-block:: php + + addComment($myFirstComment); + + $em->persist($user); + $em->persist($myFirstComment); + $em->flush(); + +Even if you *persist* a new User that contains our new Comment this +code would fail if you removed the call to +``EntityManager#persist($myFirstComment)``. Doctrine 2 does not +cascade the persist operation to all nested entities that are new +as well. + +More complicated is the deletion of all of a user's comments when he is +removed from the system: + +.. code-block:: php + + find('User', $deleteUserId); + + foreach ($user->getAuthoredComments() as $comment) { + $em->remove($comment); + } + $em->remove($user); + $em->flush(); + +Without the loop over all the authored comments Doctrine would use +an UPDATE statement only to set the foreign key to NULL and only +the User would be deleted from the database during the +flush()-Operation. + +To have Doctrine handle both cases automatically we can change the +``User#commentsAuthored`` property to cascade both the "persist" +and the "remove" operation. + +.. code-block:: php + + addresses = new ArrayCollection(); + } + + public function newStandingData(StandingData $sd) + { + $this->standingData = $sd; + } + + public function removeAddress($pos) + { + unset($this->addresses[$pos]); + } + } + +Now two examples of what happens when you remove the references: + +.. code-block:: php + + find("Addressbook\Contact", $contactId); + $contact->newStandingData(new StandingData("Firstname", "Lastname", "Street")); + $contact->removeAddress(1); + + $em->flush(); + +In this case you have not only changed the ``Contact`` entity itself but +you have also removed the references for standing data and as well as one +address reference. When flush is called not only are the references removed +but both the old standing data and the one address entity are also deleted +from the database. + +Filtering Collections +--------------------- + +.. filtering-collections: + +Collections have a filtering API that allows to slice parts of data from +a collection. If the collection has not been loaded from the database yet, +the filtering API can work on the SQL level to make optimized access to +large collections. + +.. code-block:: php + + find('Group', $groupId); + $userCollection = $group->getUsers(); + + $criteria = Criteria::create() + ->where(Criteria::expr()->eq("birthday", "1982-02-17")) + ->orderBy(array("username" => Criteria::ASC)) + ->setFirstResult(0) + ->setMaxResults(20) + ; + + $birthdayUsers = $userCollection->matching($criteria); + +.. tip:: + + You can move the access of slices of collections into dedicated methods of + an entity. For example ``Group#getTodaysBirthdayUsers()``. + +The Criteria has a limited matching language that works both on the +SQL and on the PHP collection level. This means you can use collection matching +interchangeably, independent of in-memory or sql-backed collections. + +.. code-block:: php + + find('CMS\Article', 1234); + $article->setHeadline('Hello World dude!'); + + $article2 = $entityManager->find('CMS\Article', 1234); + echo $article2->getHeadline(); + +In this case the Article is accessed from the entity manager twice, +but modified in between. Doctrine 2 realizes this and will only +ever give you access to one instance of the Article with ID 1234, +no matter how often do you retrieve it from the EntityManager and +even no matter what kind of Query method you are using (find, +Repository Finder or DQL). This is called "Identity Map" pattern, +which means Doctrine keeps a map of each entity and ids that have +been retrieved per PHP request and keeps returning you the same +instances. + +In the previous example the echo prints "Hello World dude!" to the +screen. You can even verify that ``$article`` and ``$article2`` are +indeed pointing to the same instance by running the following +code: + +.. code-block:: php + + comments = new ArrayCollection(); + } + + public function getAuthor() { return $this->author; } + public function getComments() { return $this->comments; } + } + + $article = $em->find('Article', 1); + +This code only retrieves the ``Article`` instance with id 1 executing +a single SELECT statement against the articles table in the database. +You can still access the associated properties author and comments +and the associated objects they contain. + +This works by utilizing the lazy loading pattern. Instead of +passing you back a real Author instance and a collection of +comments Doctrine will create proxy instances for you. Only if you +access these proxies for the first time they will go through the +EntityManager and load their state from the database. + +This lazy-loading process happens behind the scenes, hidden from +your code. See the following code: + +.. code-block:: php + + find('Article', 1); + + // accessing a method of the user instance triggers the lazy-load + echo "Author: " . $article->getAuthor()->getName() . "\n"; + + // Lazy Loading Proxies pass instanceof tests: + if ($article->getAuthor() instanceof User) { + // a User Proxy is a generated "UserProxy" class + } + + // accessing the comments as an iterator triggers the lazy-load + // retrieving ALL the comments of this article from the database + // using a single SELECT statement + foreach ($article->getComments() as $comment) { + echo $comment->getText() . "\n\n"; + } + + // Article::$comments passes instanceof tests for the Collection interface + // But it will NOT pass for the ArrayCollection interface + if ($article->getComments() instanceof \Doctrine\Common\Collections\Collection) { + echo "This will always be true!"; + } + +A slice of the generated proxy classes code looks like the +following piece of code. A real proxy class override ALL public +methods along the lines of the ``getName()`` method shown below: + +.. code-block:: php + + _load(); + return parent::getName(); + } + // .. other public methods of User + } + +.. warning:: + + Traversing the object graph for parts that are lazy-loaded will + easily trigger lots of SQL queries and will perform badly if used + to heavily. Make sure to use DQL to fetch-join all the parts of the + object-graph that you need as efficiently as possible. + + +Persisting entities +------------------- + +An entity can be made persistent by passing it to the +``EntityManager#persist($entity)`` method. By applying the persist +operation on some entity, that entity becomes MANAGED, which means +that its persistence is from now on managed by an EntityManager. As +a result the persistent state of such an entity will subsequently +be properly synchronized with the database when +``EntityManager#flush()`` is invoked. + +.. note:: + + Invoking the ``persist`` method on an entity does NOT + cause an immediate SQL INSERT to be issued on the database. + Doctrine applies a strategy called "transactional write-behind", + which means that it will delay most SQL commands until + ``EntityManager#flush()`` is invoked which will then issue all + necessary SQL statements to synchronize your objects with the + database in the most efficient way and a single, short transaction, + taking care of maintaining referential integrity. + + +Example: + +.. code-block:: php + + setName('Mr.Right'); + $em->persist($user); + $em->flush(); + +.. note:: + + Generated entity identifiers / primary keys are + guaranteed to be available after the next successful flush + operation that involves the entity in question. You can not rely on + a generated identifier to be available directly after invoking + ``persist``. The inverse is also true. You can not rely on a + generated identifier being not available after a failed flush + operation. + + +The semantics of the persist operation, applied on an entity X, are +as follows: + + +- If X is a new entity, it becomes managed. The entity X will be + entered into the database as a result of the flush operation. +- If X is a preexisting managed entity, it is ignored by the + persist operation. However, the persist operation is cascaded to + entities referenced by X, if the relationships from X to these + other entities are mapped with cascade=PERSIST or cascade=ALL (see + "Transitive Persistence"). +- If X is a removed entity, it becomes managed. +- If X is a detached entity, an exception will be thrown on + flush. + +Removing entities +----------------- + +An entity can be removed from persistent storage by passing it to +the ``EntityManager#remove($entity)`` method. By applying the +``remove`` operation on some entity, that entity becomes REMOVED, +which means that its persistent state will be deleted once +``EntityManager#flush()`` is invoked. + +.. note:: + + Just like ``persist``, invoking ``remove`` on an entity + does NOT cause an immediate SQL DELETE to be issued on the + database. The entity will be deleted on the next invocation of + ``EntityManager#flush()`` that involves that entity. This + means that entities scheduled for removal can still be queried + for and appear in query and collection results. See + the section on :ref:`Database and UnitOfWork Out-Of-Sync ` + for more information. + + +Example: + +.. code-block:: php + + remove($user); + $em->flush(); + +The semantics of the remove operation, applied to an entity X are +as follows: + + +- If X is a new entity, it is ignored by the remove operation. + However, the remove operation is cascaded to entities referenced by + X, if the relationship from X to these other entities is mapped + with cascade=REMOVE or cascade=ALL (see "Transitive Persistence"). +- If X is a managed entity, the remove operation causes it to + become removed. The remove operation is cascaded to entities + referenced by X, if the relationships from X to these other + entities is mapped with cascade=REMOVE or cascade=ALL (see + "Transitive Persistence"). +- If X is a detached entity, an InvalidArgumentException will be + thrown. +- If X is a removed entity, it is ignored by the remove operation. +- A removed entity X will be removed from the database as a result + of the flush operation. + +After an entity has been removed its in-memory state is the same as +before the removal, except for generated identifiers. + +Removing an entity will also automatically delete any existing +records in many-to-many join tables that link this entity. The +action taken depends on the value of the ``@joinColumn`` mapping +attribute "onDelete". Either Doctrine issues a dedicated ``DELETE`` +statement for records of each join table or it depends on the +foreign key semantics of onDelete="CASCADE". + +Deleting an object with all its associated objects can be achieved +in multiple ways with very different performance impacts. + + +1. If an association is marked as ``CASCADE=REMOVE`` Doctrine 2 + will fetch this association. If its a Single association it will + pass this entity to + ´EntityManager#remove()``. If the association is a collection, Doctrine will loop over all its elements and pass them to``EntityManager#remove()\`. + In both cases the cascade remove semantics are applied recursively. + For large object graphs this removal strategy can be very costly. +2. Using a DQL ``DELETE`` statement allows you to delete multiple + entities of a type with a single command and without hydrating + these entities. This can be very efficient to delete large object + graphs from the database. +3. Using foreign key semantics ``onDelete="CASCADE"`` can force the + database to remove all associated objects internally. This strategy + is a bit tricky to get right but can be very powerful and fast. You + should be aware however that using strategy 1 (``CASCADE=REMOVE``) + completely by-passes any foreign key ``onDelete=CASCADE`` option, + because Doctrine will fetch and remove all associated entities + explicitly nevertheless. + +Detaching entities +------------------ + +An entity is detached from an EntityManager and thus no longer +managed by invoking the ``EntityManager#detach($entity)`` method on +it or by cascading the detach operation to it. Changes made to the +detached entity, if any (including removal of the entity), will not +be synchronized to the database after the entity has been +detached. + +Doctrine will not hold on to any references to a detached entity. + +Example: + +.. code-block:: php + + detach($entity); + +The semantics of the detach operation, applied to an entity X are +as follows: + + +- If X is a managed entity, the detach operation causes it to + become detached. The detach operation is cascaded to entities + referenced by X, if the relationships from X to these other + entities is mapped with cascade=DETACH or cascade=ALL (see + "Transitive Persistence"). Entities which previously referenced X + will continue to reference X. +- If X is a new or detached entity, it is ignored by the detach + operation. +- If X is a removed entity, the detach operation is cascaded to + entities referenced by X, if the relationships from X to these + other entities is mapped with cascade=DETACH or cascade=ALL (see + "Transitive Persistence"). Entities which previously referenced X + will continue to reference X. + +There are several situations in which an entity is detached +automatically without invoking the ``detach`` method: + + +- When ``EntityManager#clear()`` is invoked, all entities that are + currently managed by the EntityManager instance become detached. +- When serializing an entity. The entity retrieved upon subsequent + unserialization will be detached (This is the case for all entities + that are serialized and stored in some cache, i.e. when using the + Query Result Cache). + +The ``detach`` operation is usually not as frequently needed and +used as ``persist`` and ``remove``. + +Merging entities +---------------- + +Merging entities refers to the merging of (usually detached) +entities into the context of an EntityManager so that they become +managed again. To merge the state of an entity into an +EntityManager use the ``EntityManager#merge($entity)`` method. The +state of the passed entity will be merged into a managed copy of +this entity and this copy will subsequently be returned. + +Example: + +.. code-block:: php + + merge($detachedEntity); + // $entity now refers to the fully managed copy returned by the merge operation. + // The EntityManager $em now manages the persistence of $entity as usual. + +.. note:: + + When you want to serialize/unserialize entities you + have to make all entity properties protected, never private. The + reason for this is, if you serialize a class that was a proxy + instance before, the private variables won't be serialized and a + PHP Notice is thrown. + + +The semantics of the merge operation, applied to an entity X, are +as follows: + + +- If X is a detached entity, the state of X is copied onto a + pre-existing managed entity instance X' of the same identity. +- If X is a new entity instance, a new managed copy X' will be + created and the state of X is copied onto this managed instance. +- If X is a removed entity instance, an InvalidArgumentException + will be thrown. +- If X is a managed entity, it is ignored by the merge operation, + however, the merge operation is cascaded to entities referenced by + relationships from X if these relationships have been mapped with + the cascade element value MERGE or ALL (see "Transitive + Persistence"). +- For all entities Y referenced by relationships from X having the + cascade element value MERGE or ALL, Y is merged recursively as Y'. + For all such Y referenced by X, X' is set to reference Y'. (Note + that if X is managed then X is the same object as X'.) +- If X is an entity merged to X', with a reference to another + entity Y, where cascade=MERGE or cascade=ALL is not specified, then + navigation of the same association from X' yields a reference to a + managed object Y' with the same persistent identity as Y. + +The ``merge`` operation will throw an ``OptimisticLockException`` +if the entity being merged uses optimistic locking through a +version field and the versions of the entity being merged and the +managed copy don't match. This usually means that the entity has +been modified while being detached. + +The ``merge`` operation is usually not as frequently needed and +used as ``persist`` and ``remove``. The most common scenario for +the ``merge`` operation is to reattach entities to an EntityManager +that come from some cache (and are therefore detached) and you want +to modify and persist such an entity. + +.. warning:: + + If you need to perform multiple merges of entities that share certain subparts + of their object-graphs and cascade merge, then you have to call ``EntityManager#clear()`` between the + successive calls to ``EntityManager#merge()``. Otherwise you might end up with + multiple copies of the "same" object in the database, however with different ids. + +.. note:: + + If you load some detached entities from a cache and you do + not need to persist or delete them or otherwise make use of them + without the need for persistence services there is no need to use + ``merge``. I.e. you can simply pass detached objects from a cache + directly to the view. + + +Synchronization with the Database +--------------------------------- + +The state of persistent entities is synchronized with the database +on flush of an ``EntityManager`` which commits the underlying +``UnitOfWork``. The synchronization involves writing any updates to +persistent entities and their relationships to the database. +Thereby bidirectional relationships are persisted based on the +references held by the owning side of the relationship as explained +in the Association Mapping chapter. + +When ``EntityManager#flush()`` is called, Doctrine inspects all +managed, new and removed entities and will perform the following +operations. + +.. _workingobjects_database_uow_outofsync: + +Effects of Database and UnitOfWork being Out-Of-Sync +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +As soon as you begin to change the state of entities, call persist or remove the +contents of the UnitOfWork and the database will drive out of sync. They can +only be synchronized by calling ``EntityManager#flush()``. This section +describes the effects of database and UnitOfWork being out of sync. + +- Entities that are scheduled for removal can still be queried from the database. + They are returned from DQL and Repository queries and are visible in collections. +- Entities that are passed to ``EntityManager#persist`` do not turn up in query + results. +- Entities that have changed will not be overwritten with the state from the database. + This is because the identity map will detect the construction of an already existing + entity and assumes its the most up to date version. + +``EntityManager#flush()`` is never called implicitly by Doctrine. You always have to trigger it manually. + +Synchronizing New and Managed Entities +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The flush operation applies to a managed entity with the following +semantics: + + +- The entity itself is synchronized to the database using a SQL + UPDATE statement, only if at least one persistent field has + changed. +- No SQL updates are executed if the entity did not change. + +The flush operation applies to a new entity with the following +semantics: + + +- The entity itself is synchronized to the database using a SQL + INSERT statement. + +For all (initialized) relationships of the new or managed entity +the following semantics apply to each associated entity X: + + +- If X is new and persist operations are configured to cascade on + the relationship, X will be persisted. +- If X is new and no persist operations are configured to cascade + on the relationship, an exception will be thrown as this indicates + a programming error. +- If X is removed and persist operations are configured to cascade + on the relationship, an exception will be thrown as this indicates + a programming error (X would be re-persisted by the cascade). +- If X is detached and persist operations are configured to + cascade on the relationship, an exception will be thrown (This is + semantically the same as passing X to persist()). + +Synchronizing Removed Entities +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The flush operation applies to a removed entity by deleting its +persistent state from the database. No cascade options are relevant +for removed entities on flush, the cascade remove option is already +executed during ``EntityManager#remove($entity)``. + +The size of a Unit of Work +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The size of a Unit of Work mainly refers to the number of managed +entities at a particular point in time. + +The cost of flushing +~~~~~~~~~~~~~~~~~~~~ + +How costly a flush operation is, mainly depends on two factors: + + +- The size of the EntityManager's current UnitOfWork. +- The configured change tracking policies + +You can get the size of a UnitOfWork as follows: + +.. code-block:: php + + getUnitOfWork()->size(); + +The size represents the number of managed entities in the Unit of +Work. This size affects the performance of flush() operations due +to change tracking (see "Change Tracking Policies") and, of course, +memory consumption, so you may want to check it from time to time +during development. + +.. note:: + + Do not invoke ``flush`` after every change to an entity + or every single invocation of persist/remove/merge/... This is an + anti-pattern and unnecessarily reduces the performance of your + application. Instead, form units of work that operate on your + objects and call ``flush`` when you are done. While serving a + single HTTP request there should be usually no need for invoking + ``flush`` more than 0-2 times. + + +Direct access to a Unit of Work +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can get direct access to the Unit of Work by calling +``EntityManager#getUnitOfWork()``. This will return the UnitOfWork +instance the EntityManager is currently using. + +.. code-block:: php + + getUnitOfWork(); + +.. note:: + + Directly manipulating a UnitOfWork is not recommended. + When working directly with the UnitOfWork API, respect methods + marked as INTERNAL by not using them and carefully read the API + documentation. + + +Entity State +~~~~~~~~~~~~ + +As outlined in the architecture overview an entity can be in one of +four possible states: NEW, MANAGED, REMOVED, DETACHED. If you +explicitly need to find out what the current state of an entity is +in the context of a certain ``EntityManager`` you can ask the +underlying ``UnitOfWork``: + +.. code-block:: php + + getUnitOfWork()->getEntityState($entity)) { + case UnitOfWork::STATE_MANAGED: + ... + case UnitOfWork::STATE_REMOVED: + ... + case UnitOfWork::STATE_DETACHED: + ... + case UnitOfWork::STATE_NEW: + ... + } + +An entity is in MANAGED state if it is associated with an +``EntityManager`` and it is not REMOVED. + +An entity is in REMOVED state after it has been passed to +``EntityManager#remove()`` until the next flush operation of the +same EntityManager. A REMOVED entity is still associated with an +``EntityManager`` until the next flush operation. + +An entity is in DETACHED state if it has persistent state and +identity but is currently not associated with an +``EntityManager``. + +An entity is in NEW state if has no persistent state and identity +and is not associated with an ``EntityManager`` (for example those +just created via the "new" operator). + +Querying +-------- + +Doctrine 2 provides the following ways, in increasing level of +power and flexibility, to query for persistent objects. You should +always start with the simplest one that suits your needs. + +By Primary Key +~~~~~~~~~~~~~~ + +The most basic way to query for a persistent object is by its +identifier / primary key using the +``EntityManager#find($entityName, $id)`` method. Here is an +example: + +.. code-block:: php + + find('MyProject\Domain\User', $id); + +The return value is either the found entity instance or null if no +instance could be found with the given identifier. + +Essentially, ``EntityManager#find()`` is just a shortcut for the +following: + +.. code-block:: php + + getRepository('MyProject\Domain\User')->find($id); + +``EntityManager#getRepository($entityName)`` returns a repository +object which provides many ways to retrieve entities of the +specified type. By default, the repository instance is of type +``Doctrine\ORM\EntityRepository``. You can also use custom +repository classes as shown later. + +By Simple Conditions +~~~~~~~~~~~~~~~~~~~~ + +To query for one or more entities based on several conditions that +form a logical conjunction, use the ``findBy`` and ``findOneBy`` +methods on a repository as follows: + +.. code-block:: php + + getRepository('MyProject\Domain\User')->findBy(array('age' => 20)); + + // All users that are 20 years old and have a surname of 'Miller' + $users = $em->getRepository('MyProject\Domain\User')->findBy(array('age' => 20, 'surname' => 'Miller')); + + // A single user by its nickname + $user = $em->getRepository('MyProject\Domain\User')->findOneBy(array('nickname' => 'romanb')); + +You can also load by owning side associations through the repository: + +.. code-block:: php + + find('MyProject\Domain\Phonenumber', 1234); + $user = $em->getRepository('MyProject\Domain\User')->findOneBy(array('phone' => $number->getId())); + +Be careful that this only works by passing the ID of the associated entity, not yet by passing the associated entity itself. + +The ``EntityRepository#findBy()`` method additionally accepts orderings, limit and offset as second to fourth parameters: + +.. code-block:: php + + getRepository('MyProject\Domain\User')->findBy(array('age' => 20), array('name' => 'ASC'), 10, 0); + +If you pass an array of values Doctrine will convert the query into a WHERE field IN (..) query automatically: + +.. code-block:: php + + getRepository('MyProject\Domain\User')->findBy(array('age' => array(20, 30, 40))); + // translates roughly to: SELECT * FROM users WHERE age IN (20, 30, 40) + +An EntityRepository also provides a mechanism for more concise +calls through its use of ``__call``. Thus, the following two +examples are equivalent: + +.. code-block:: php + + getRepository('MyProject\Domain\User')->findOneBy(array('nickname' => 'romanb')); + + // A single user by its nickname (__call magic) + $user = $em->getRepository('MyProject\Domain\User')->findOneByNickname('romanb'); + +By Criteria +~~~~~~~~~~~ + +.. versionadded:: 2.3 + +The Repository implement the ``Doctrine\Common\Collections\Selectable`` +interface. That means you can build ``Doctrine\Common\Collections\Criteria`` +and pass them to the ``matching($criteria)`` method. + +See the :ref:`Working with Associations: Filtering collections +`. + +By Eager Loading +~~~~~~~~~~~~~~~~ + +Whenever you query for an entity that has persistent associations +and these associations are mapped as EAGER, they will automatically +be loaded together with the entity being queried and is thus +immediately available to your application. + +By Lazy Loading +~~~~~~~~~~~~~~~ + +Whenever you have a managed entity instance at hand, you can +traverse and use any associations of that entity that are +configured LAZY as if they were in-memory already. Doctrine will +automatically load the associated objects on demand through the +concept of lazy-loading. + +By DQL +~~~~~~ + +The most powerful and flexible method to query for persistent +objects is the Doctrine Query Language, an object query language. +DQL enables you to query for persistent objects in the language of +objects. DQL understands classes, fields, inheritance and +associations. DQL is syntactically very similar to the familiar SQL +but *it is not SQL*. + +A DQL query is represented by an instance of the +``Doctrine\ORM\Query`` class. You create a query using +``EntityManager#createQuery($dql)``. Here is a simple example: + +.. code-block:: php + + createQuery("select u from MyDomain\Model\User u where u.age >= 20 and u.age <= 30"); + $users = $q->getResult(); + +Note that this query contains no knowledge about the relational +schema, only about the object model. DQL supports positional as +well as named parameters, many functions, (fetch) joins, +aggregates, subqueries and much more. Detailed information about +DQL and its syntax as well as the Doctrine class can be found in +:doc:`the dedicated chapter `. +For programmatically building up queries based on conditions that +are only known at runtime, Doctrine provides the special +``Doctrine\ORM\QueryBuilder`` class. More information on +constructing queries with a QueryBuilder can be found +:doc:`in Query Builder chapter `. + +By Native Queries +~~~~~~~~~~~~~~~~~ + +As an alternative to DQL or as a fallback for special SQL +statements native queries can be used. Native queries are built by +using a hand-crafted SQL query and a ResultSetMapping that +describes how the SQL result set should be transformed by Doctrine. +More information about native queries can be found in +:doc:`the dedicated chapter `. + +Custom Repositories +~~~~~~~~~~~~~~~~~~~ + +By default the EntityManager returns a default implementation of +``Doctrine\ORM\EntityRepository`` when you call +``EntityManager#getRepository($entityClass)``. You can overwrite +this behaviour by specifying the class name of your own Entity +Repository in the Annotation, XML or YAML metadata. In large +applications that require lots of specialized DQL queries using a +custom repository is one recommended way of grouping these queries +in a central location. + +.. code-block:: php + + _em->createQuery('SELECT u FROM MyDomain\Model\User u WHERE u.status = "admin"') + ->getResult(); + } + } + +You can access your repository now by calling: + +.. code-block:: php + + getRepository('MyDomain\Model\User')->getAllAdminUsers(); + + diff --git a/vendor/doctrine/orm/docs/en/reference/xml-mapping.rst b/vendor/doctrine/orm/docs/en/reference/xml-mapping.rst new file mode 100644 index 0000000000000000000000000000000000000000..dbf97dc0ad17dc2b9159befc5d75636d0ba116e0 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/xml-mapping.rst @@ -0,0 +1,782 @@ +XML Mapping +=========== + +The XML mapping driver enables you to provide the ORM metadata in +form of XML documents. + +The XML driver is backed by an XML Schema document that describes +the structure of a mapping document. The most recent version of the +XML Schema document is available online at +`http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd `_. +In order to point to the latest version of the document of a +particular stable release branch, just append the release number, +i.e.: doctrine-mapping-2.0.xsd The most convenient way to work with +XML mapping files is to use an IDE/editor that can provide +code-completion based on such an XML Schema document. The following +is an outline of a XML mapping document with the proper xmlns/xsi +setup for the latest code in trunk. + +.. code-block:: xml + + + + ... + + + +The XML mapping document of a class is loaded on-demand the first +time it is requested and subsequently stored in the metadata cache. +In order to work, this requires certain conventions: + + +- Each entity/mapped superclass must get its own dedicated XML + mapping document. +- The name of the mapping document must consist of the fully + qualified name of the class, where namespace separators are + replaced by dots (.). For example an Entity with the fully + qualified class-name "MyProject" would require a mapping file + "MyProject.Entities.User.dcm.xml" unless the extension is changed. +- All mapping documents should get the extension ".dcm.xml" to + identify it as a Doctrine mapping file. This is more of a + convention and you are not forced to do this. You can change the + file extension easily enough. + +.. code-block:: php + + setFileExtension('.xml'); + +It is recommended to put all XML mapping documents in a single +folder but you can spread the documents over several folders if you +want to. In order to tell the XmlDriver where to look for your +mapping documents, supply an array of paths as the first argument +of the constructor, like this: + +.. code-block:: php + + setMetadataDriverImpl($driver); + +.. warning:: + + Note that Doctrine ORM does not modify any settings for ``libxml``, + therefore, external XML entities may or may not be enabled or + configured correctly. + XML mappings are not XXE/XEE attack vectors since they are not + related with user input, but it is recommended that you do not + use external XML entities in your mapping files to avoid running + into unexpected behaviour. + +Simplified XML Driver +~~~~~~~~~~~~~~~~~~~~~ + +The Symfony project sponsored a driver that simplifies usage of the XML Driver. +The changes between the original driver are: + +1. File Extension is .orm.xml +2. Filenames are shortened, "MyProject\Entities\User" will become User.orm.xml +3. You can add a global file and add multiple entities in this file. + +Configuration of this client works a little bit different: + +.. code-block:: php + + 'MyProject\Entities', + '/path/to/files2' => 'OtherProject\Entities' + ); + $driver = new \Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver($namespaces); + $driver->setGlobalBasename('global'); // global.orm.xml + +Example +------- + +As a quick start, here is a small example document that makes use +of several common elements: + +.. code-block:: xml + + // Doctrine.Tests.ORM.Mapping.User.dcm.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Be aware that class-names specified in the XML files should be +fully qualified. + +XML-Element Reference +--------------------- + +The XML-Element reference explains all the tags and attributes that +the Doctrine Mapping XSD Schema defines. You should read the +Basic-, Association- and Inheritance Mapping chapters to understand +what each of this definitions means in detail. + +Defining an Entity +~~~~~~~~~~~~~~~~~~ + +Each XML Mapping File contains the definition of one entity, +specified as the ```` element as a direct child of the +```` element: + +.. code-block:: xml + + + + + + + +Required attributes: + + +- name - The fully qualified class-name of the entity. + +Optional attributes: + + +- **table** - The Table-Name to be used for this entity. Otherwise the + Unqualified Class-Name is used by default. +- **repository-class** - The fully qualified class-name of an + alternative ``Doctrine\ORM\EntityRepository`` implementation to be + used with this entity. +- **inheritance-type** - The type of inheritance, defaults to none. A + more detailed description follows in the + *Defining Inheritance Mappings* section. +- **read-only** - (>= 2.1) Specifies that this entity is marked as read only and not + considered for change-tracking. Entities of this type can be persisted + and removed though. +- **schema** - (>= 2.5) The schema the table lies in, for platforms that support schemas + +Defining Fields +~~~~~~~~~~~~~~~ + +Each entity class can contain zero to infinite fields that are +managed by Doctrine. You can define them using the ```` +element as a children to the ```` element. The field +element is only used for primitive types that are not the ID of the +entity. For the ID mapping you have to use the ```` element. + +.. code-block:: xml + + + + + + + + + + + + + + + + +Required attributes: + + +- name - The name of the Property/Field on the given Entity PHP + class. + +Optional attributes: + + +- type - The ``Doctrine\DBAL\Types\Type`` name, defaults to + "string" +- column - Name of the column in the database, defaults to the + field name. +- length - The length of the given type, for use with strings + only. +- unique - Should this field contain a unique value across the + table? Defaults to false. +- nullable - Should this field allow NULL as a value? Defaults to + false. +- version - Should this field be used for optimistic locking? Only + works on fields with type integer or datetime. +- scale - Scale of a decimal type. +- precision - Precision of a decimal type. +- options - Array of additional options: + + - default - The default value to set for the column if no value + is supplied. + - unsigned - Boolean value to determine if the column should + be capable of representing only non-negative integers + (applies only for integer column and might not be supported by + all vendors). + - fixed - Boolean value to determine if the specified length of + a string column should be fixed or varying (applies only for + string/binary column and might not be supported by all vendors). + - comment - The comment of the column in the schema (might not + be supported by all vendors). + - customSchemaOptions - Array of additional schema options + which are mostly vendor specific. +- column-definition - Optional alternative SQL representation for + this column. This definition begin after the field-name and has to + specify the complete column definition. Using this feature will + turn this field dirty for Schema-Tool update commands at all + times. + +.. note:: + + For more detailed information on each attribute, please refer to + the DBAL ``Schema-Representation`` documentation. + +Defining Identity and Generator Strategies +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +An entity has to have at least one ```` element. For +composite keys you can specify more than one id-element, however +surrogate keys are recommended for use with Doctrine 2. The Id +field allows to define properties of the identifier and allows a +subset of the ```` element attributes: + +.. code-block:: xml + + + + + +Required attributes: + + +- name - The name of the Property/Field on the given Entity PHP + class. +- type - The ``Doctrine\DBAL\Types\Type`` name, preferably + "string" or "integer". + +Optional attributes: + + +- column - Name of the column in the database, defaults to the + field name. + +Using the simplified definition above Doctrine will use no +identifier strategy for this entity. That means you have to +manually set the identifier before calling +``EntityManager#persist($entity)``. This is the so called +``ASSIGNED`` strategy. + +If you want to switch the identifier generation strategy you have +to nest a ```` element inside the id-element. This of +course only works for surrogate keys. For composite keys you always +have to use the ``ASSIGNED`` strategy. + +.. code-block:: xml + + + + + + + +The following values are allowed for the ```` strategy +attribute: + + +- AUTO - Automatic detection of the identifier strategy based on + the preferred solution of the database vendor. +- IDENTITY - Use of a IDENTIFY strategy such as Auto-Increment IDs + available to Doctrine AFTER the INSERT statement has been executed. +- SEQUENCE - Use of a database sequence to retrieve the + entity-ids. This is possible before the INSERT statement is + executed. + +If you are using the SEQUENCE strategy you can define an additional +element to describe the sequence: + +.. code-block:: xml + + + + + + + + +Required attributes for ````: + + +- sequence-name - The name of the sequence + +Optional attributes for ````: + + +- allocation-size - By how much steps should the sequence be + incremented when a value is retrieved. Defaults to 1 +- initial-value - What should the initial value of the sequence + be. + + **NOTE** + + If you want to implement a cross-vendor compatible application you + have to specify and additionally define the + element, if Doctrine chooses the sequence strategy for a + platform. + + +Defining a Mapped Superclass +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Sometimes you want to define a class that multiple entities inherit +from, which itself is not an entity however. The chapter on +*Inheritance Mapping* describes a Mapped Superclass in detail. You +can define it in XML using the ```` tag. + +.. code-block:: xml + + + + + + + + +Required attributes: + + +- name - Class name of the mapped superclass. + +You can nest any number of ```` and unidirectional +```` or ```` associations inside a +mapped superclass. + +Defining Inheritance Mappings +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are currently two inheritance persistence strategies that you +can choose from when defining entities that inherit from each +other. Single Table inheritance saves the fields of the complete +inheritance hierarchy in a single table, joined table inheritance +creates a table for each entity combining the fields using join +conditions. + +You can specify the inheritance type in the ```` element +and then use the ```` and +```` attributes. + +.. code-block:: xml + + + + + + + + + + +The allowed values for inheritance-type attribute are ``JOINED`` or +``SINGLE_TABLE``. + +.. note:: + + All inheritance related definitions have to be defined on the root + entity of the hierarchy. + + +Defining Lifecycle Callbacks +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can define the lifecycle callback methods on your entities +using the ```` element: + +.. code-block:: xml + + + + + + + + +Defining One-To-One Relations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can define One-To-One Relations/Associations using the +```` element. The required and optional attributes +depend on the associations being on the inverse or owning side. + +For the inverse side the mapping is as simple as: + +.. code-block:: xml + + + + + +Required attributes for inverse One-To-One: + + +- field - Name of the property/field on the entity's PHP class. +- target-entity - Name of the entity associated entity class. If + this is not qualified the namespace of the current class is + prepended. *IMPORTANT:* No leading backslash! +- mapped-by - Name of the field on the owning side (here Address + entity) that contains the owning side association. + +For the owning side this mapping would look like: + +.. code-block:: xml + + + + + +Required attributes for owning One-to-One: + + +- field - Name of the property/field on the entity's PHP class. +- target-entity - Name of the entity associated entity class. If + this is not qualified the namespace of the current class is + prepended. *IMPORTANT:* No leading backslash! + +Optional attributes for owning One-to-One: + + +- inversed-by - If the association is bidirectional the + inversed-by attribute has to be specified with the name of the + field on the inverse entity that contains the back-reference. +- orphan-removal - If true, the inverse side entity is always + deleted when the owning side entity is. Defaults to false. +- fetch - Either LAZY or EAGER, defaults to LAZY. This attribute + makes only sense on the owning side, the inverse side *ALWAYS* has + to use the ``FETCH`` strategy. + +The definition for the owning side relies on a bunch of mapping +defaults for the join column names. Without the nested +```` element Doctrine assumes to foreign key to be +called ``user_id`` on the Address Entities table. This is because +the ``MyProject\Address`` entity is the owning side of this +association, which means it contains the foreign key. + +The completed explicitly defined mapping is: + +.. code-block:: xml + + + + + + + +Defining Many-To-One Associations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The many-to-one association is *ALWAYS* the owning side of any +bidirectional association. This simplifies the mapping compared to +the one-to-one case. The minimal mapping for this association looks +like: + +.. code-block:: xml + + + + + +Required attributes: + + +- field - Name of the property/field on the entity's PHP class. +- target-entity - Name of the entity associated entity class. If + this is not qualified the namespace of the current class is + prepended. *IMPORTANT:* No leading backslash! + +Optional attributes: + + +- inversed-by - If the association is bidirectional the + inversed-by attribute has to be specified with the name of the + field on the inverse entity that contains the back-reference. +- orphan-removal - If true the entity on the inverse side is + always deleted when the owning side entity is and it is not + connected to any other owning side entity anymore. Defaults to + false. +- fetch - Either LAZY or EAGER, defaults to LAZY. + +This definition relies on a bunch of mapping defaults with regards +to the naming of the join-column/foreign key. The explicitly +defined mapping includes a ```` tag nested inside +the many-to-one association tag: + +.. code-block:: xml + + + + + + + +The join-column attribute ``name`` specifies the column name of the +foreign key and the ``referenced-column-name`` attribute specifies +the name of the primary key column on the User entity. + +Defining One-To-Many Associations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The one-to-many association is *ALWAYS* the inverse side of any +association. There exists no such thing as a uni-directional +one-to-many association, which means this association only ever +exists for bi-directional associations. + +.. code-block:: xml + + + + + +Required attributes: + + +- field - Name of the property/field on the entity's PHP class. +- target-entity - Name of the entity associated entity class. If + this is not qualified the namespace of the current class is + prepended. *IMPORTANT:* No leading backslash! +- mapped-by - Name of the field on the owning side (here + Phonenumber entity) that contains the owning side association. + +Optional attributes: + + +- fetch - Either LAZY, EXTRA_LAZY or EAGER, defaults to LAZY. +- index-by: Index the collection by a field on the target entity. + +Defining Many-To-Many Associations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +From all the associations the many-to-many has the most complex +definition. When you rely on the mapping defaults you can omit many +definitions and rely on their implicit values. + +.. code-block:: xml + + + + + +Required attributes: + + +- field - Name of the property/field on the entity's PHP class. +- target-entity - Name of the entity associated entity class. If + this is not qualified the namespace of the current class is + prepended. *IMPORTANT:* No leading backslash! + +Optional attributes: + + +- mapped-by - Name of the field on the owning side that contains + the owning side association if the defined many-to-many association + is on the inverse side. +- inversed-by - If the association is bidirectional the + inversed-by attribute has to be specified with the name of the + field on the inverse entity that contains the back-reference. +- fetch - Either LAZY, EXTRA_LAZY or EAGER, defaults to LAZY. +- index-by: Index the collection by a field on the target entity. + +The mapping defaults would lead to a join-table with the name +"User\_Group" being created that contains two columns "user\_id" +and "group\_id". The explicit definition of this mapping would be: + +.. code-block:: xml + + + + + + + + + + + + + + +Here both the ```` and ```` +tags are necessary to tell Doctrine for which side the specified +join-columns apply. These are nested inside a ```` +attribute which allows to specify the table name of the +many-to-many join-table. + +Cascade Element +~~~~~~~~~~~~~~~ + +Doctrine allows cascading of several UnitOfWork operations to +related entities. You can specify the cascade operations in the +```` element inside any of the association mapping +tags. + +.. code-block:: xml + + + + + + + + + +Besides ```` the following operations can be +specified by their respective tags: + + +- ```` +- ```` +- ```` +- ```` + +Join Column Element +~~~~~~~~~~~~~~~~~~~ + +In any explicitly defined association mapping you will need the +```` tag. It defines how the foreign key and primary +key names are called that are used for joining two entities. + +Required attributes: + + +- name - The column name of the foreign key. +- referenced-column-name - The column name of the associated + entities primary key + +Optional attributes: + + +- unique - If the join column should contain a UNIQUE constraint. + This makes sense for Many-To-Many join-columns only to simulate a + one-to-many unidirectional using a join-table. +- nullable - should the join column be nullable, defaults to true. +- on-delete - Foreign Key Cascade action to perform when entity is + deleted, defaults to NO ACTION/RESTRICT but can be set to + "CASCADE". + +Defining Order of To-Many Associations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can require one-to-many or many-to-many associations to be +retrieved using an additional ``ORDER BY``. + +.. code-block:: xml + + + + + + + + + +Defining Indexes or Unique Constraints +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To define additional indexes or unique constraints on the entities +table you can use the ```` and +```` elements: + +.. code-block:: xml + + + + + + + + + + + + + +You have to specify the column and not the entity-class field names +in the index and unique-constraint definitions. + +Derived Entities ID syntax +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If the primary key of an entity contains a foreign key to another entity we speak of a derived +entity relationship. You can define this in XML with the "association-key" attribute in the ```` tag. + +.. code-block:: xml + + + + + + + + + + + + + diff --git a/vendor/doctrine/orm/docs/en/reference/yaml-mapping.rst b/vendor/doctrine/orm/docs/en/reference/yaml-mapping.rst new file mode 100644 index 0000000000000000000000000000000000000000..ea54e277ae993d9e70a7bfa9896a0ab00dc696a1 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/reference/yaml-mapping.rst @@ -0,0 +1,154 @@ +YAML Mapping +============ + +The YAML mapping driver enables you to provide the ORM metadata in +form of YAML documents. + +The YAML mapping document of a class is loaded on-demand the first +time it is requested and subsequently stored in the metadata cache. +In order to work, this requires certain conventions: + + +- Each entity/mapped superclass must get its own dedicated YAML + mapping document. +- The name of the mapping document must consist of the fully + qualified name of the class, where namespace separators are + replaced by dots (.). +- All mapping documents should get the extension ".dcm.yml" to + identify it as a Doctrine mapping file. This is more of a + convention and you are not forced to do this. You can change the + file extension easily enough. + +.. code-block:: php + + setFileExtension('.yml'); + +It is recommended to put all YAML mapping documents in a single +folder but you can spread the documents over several folders if you +want to. In order to tell the YamlDriver where to look for your +mapping documents, supply an array of paths as the first argument +of the constructor, like this: + +.. code-block:: php + + setMetadataDriverImpl($driver); + +Simplified YAML Driver +~~~~~~~~~~~~~~~~~~~~~~ + +The Symfony project sponsored a driver that simplifies usage of the YAML Driver. +The changes between the original driver are: + +- File Extension is .orm.yml +- Filenames are shortened, "MyProject\\Entities\\User" will become User.orm.yml +- You can add a global file and add multiple entities in this file. + +Configuration of this client works a little bit different: + +.. code-block:: php + + 'MyProject\Entities', + '/path/to/files2' => 'OtherProject\Entities' + ); + $driver = new \Doctrine\ORM\Mapping\Driver\SimplifiedYamlDriver($namespaces); + $driver->setGlobalBasename('global'); // global.orm.yml + +Example +------- + +As a quick start, here is a small example document that makes use +of several common elements: + +.. code-block:: yaml + + # Doctrine.Tests.ORM.Mapping.User.dcm.yml + Doctrine\Tests\ORM\Mapping\User: + type: entity + repositoryClass: Doctrine\Tests\ORM\Mapping\UserRepository + table: cms_users + schema: schema_name # The schema the table lies in, for platforms that support schemas (Optional, >= 2.5) + readOnly: true + indexes: + name_index: + columns: [ name ] + id: + id: + type: integer + generator: + strategy: AUTO + fields: + name: + type: string + length: 50 + email: + type: string + length: 32 + column: user_email + unique: true + options: + fixed: true + comment: User's email address + loginCount: + type: integer + column: login_count + nullable: false + options: + unsigned: true + default: 0 + oneToOne: + address: + targetEntity: Address + joinColumn: + name: address_id + referencedColumnName: id + onDelete: CASCADE + oneToMany: + phonenumbers: + targetEntity: Phonenumber + mappedBy: user + cascade: ["persist", "merge"] + manyToMany: + groups: + targetEntity: Group + joinTable: + name: cms_users_groups + joinColumns: + user_id: + referencedColumnName: id + inverseJoinColumns: + group_id: + referencedColumnName: id + lifecycleCallbacks: + prePersist: [ doStuffOnPrePersist, doOtherStuffOnPrePersistToo ] + postPersist: [ doStuffOnPostPersist ] + +Be aware that class-names specified in the YAML files should be +fully qualified. + +Reference +~~~~~~~~~~~~~~~~~~~~~~ + +Unique Constraints +------------------ + +It is possible to define unique constraints by the following declaration: + +.. code-block:: yaml + + # ECommerceProduct.orm.yml + ECommerceProduct: + type: entity + fields: + # definition of some fields + uniqueConstraints: + search_idx: + columns: [ name, email ] + diff --git a/vendor/doctrine/orm/docs/en/toc.rst b/vendor/doctrine/orm/docs/en/toc.rst new file mode 100644 index 0000000000000000000000000000000000000000..0df70414f687c837730c8b84f8535b2b2ecf58af --- /dev/null +++ b/vendor/doctrine/orm/docs/en/toc.rst @@ -0,0 +1,87 @@ +Welcome to Doctrine 2 ORM's documentation! +========================================== + +Tutorials +--------- + +.. toctree:: + :maxdepth: 1 + + tutorials/getting-started + tutorials/getting-started-database + tutorials/getting-started-models + tutorials/working-with-indexed-associations + tutorials/extra-lazy-associations + tutorials/composite-primary-keys + tutorials/ordered-associations + tutorials/override-field-association-mappings-in-subclasses + tutorials/pagination.rst + tutorials/embeddables.rst + +Reference Guide +--------------- + +.. toctree:: + :maxdepth: 1 + :numbered: + + reference/architecture + reference/configuration.rst + reference/faq + reference/basic-mapping + reference/association-mapping + reference/inheritance-mapping + reference/working-with-objects + reference/working-with-associations + reference/events + reference/unitofwork + reference/unitofwork-associations + reference/transactions-and-concurrency + reference/batch-processing + reference/dql-doctrine-query-language + reference/query-builder + reference/native-sql + reference/change-tracking-policies + reference/partial-objects + reference/xml-mapping + reference/yaml-mapping + reference/annotations-reference + reference/php-mapping + reference/caching + reference/improving-performance + reference/tools + reference/metadata-drivers + reference/best-practices + reference/limitations-and-known-issues + tutorials/pagination + reference/filters + reference/namingstrategy + reference/advanced-configuration + reference/second-level-cache + reference/security + + +Cookbook +-------- + +.. toctree:: + :maxdepth: 1 + + cookbook/aggregate-fields + cookbook/custom-mapping-types + cookbook/decorator-pattern + cookbook/dql-custom-walkers + cookbook/dql-user-defined-functions + cookbook/implementing-arrayaccess-for-domain-objects + cookbook/implementing-the-notify-changetracking-policy + cookbook/implementing-wakeup-or-clone + cookbook/integrating-with-codeigniter + cookbook/resolve-target-entity-listener + cookbook/sql-table-prefixes + cookbook/strategy-cookbook-introduction + cookbook/validation-of-entities + cookbook/working-with-datetime + cookbook/mysql-enums + cookbook/advanced-field-value-conversion-using-custom-mapping-types + cookbook/entities-in-session + diff --git a/vendor/doctrine/orm/docs/en/tutorials/composite-primary-keys.rst b/vendor/doctrine/orm/docs/en/tutorials/composite-primary-keys.rst new file mode 100644 index 0000000000000000000000000000000000000000..dd4e49e04aa05dd9df09850fa0f662335717ddf4 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/tutorials/composite-primary-keys.rst @@ -0,0 +1,375 @@ +Composite and Foreign Keys as Primary Key +========================================= + +.. versionadded:: 2.1 + +Doctrine 2 supports composite primary keys natively. Composite keys are a very powerful relational database concept +and we took good care to make sure Doctrine 2 supports as many of the composite primary key use-cases. +For Doctrine 2.0 composite keys of primitive data-types are supported, for Doctrine 2.1 even foreign keys as +primary keys are supported. + +This tutorial shows how the semantics of composite primary keys work and how they map to the database. + +General Considerations +~~~~~~~~~~~~~~~~~~~~~~ + +Every entity with a composite key cannot use an id generator other than "ASSIGNED". That means +the ID fields have to have their values set before you call ``EntityManager#persist($entity)``. + +Primitive Types only +~~~~~~~~~~~~~~~~~~~~ + +Even in version 2.0 you can have composite keys as long as they only consist of the primitive types +``integer`` and ``string``. Suppose you want to create a database of cars and use the model-name +and year of production as primary keys: + +.. configuration-block:: + + .. code-block:: php + + name = $name; + $this->year = $year; + } + + public function getModelName() + { + return $this->name; + } + + public function getYearOfProduction() + { + return $this->year; + } + } + + .. code-block:: xml + + + + + + + + + + + .. code-block:: yaml + + VehicleCatalogue\Model\Car: + type: entity + id: + name: + type: string + year: + type: integer + +Now you can use this entity: + +.. code-block:: php + + persist($car); + $em->flush(); + +And for querying you can use arrays to both DQL and EntityRepositories: + +.. code-block:: php + + find("VehicleCatalogue\Model\Car", array("name" => "Audi A8", "year" => 2010)); + + $dql = "SELECT c FROM VehicleCatalogue\Model\Car c WHERE c.id = ?1"; + $audi = $em->createQuery($dql) + ->setParameter(1, array("name" => "Audi A8", "year" => 2010)) + ->getSingleResult(); + +You can also use this entity in associations. Doctrine will then generate two foreign keys one for ``name`` +and to ``year`` to the related entities. + +.. note:: + + This example shows how you can nicely solve the requirement for existing + values before ``EntityManager#persist()``: By adding them as mandatory values for the constructor. + +Identity through foreign Entities +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. note:: + + Identity through foreign entities is only supported with Doctrine 2.1 + +There are tons of use-cases where the identity of an Entity should be determined by the entity +of one or many parent entities. + +- Dynamic Attributes of an Entity (for example Article). Each Article has many + attributes with primary key "article_id" and "attribute_name". +- Address object of a Person, the primary key of the address is "user_id". This is not a case of a composite primary + key, but the identity is derived through a foreign entity and a foreign key. +- Join Tables with metadata can be modelled as Entity, for example connections between two articles + with a little description and a score. + +The semantics of mapping identity through foreign entities are easy: + +- Only allowed on Many-To-One or One-To-One associations. +- Plug an ``@Id`` annotation onto every association. +- Set an attribute ``association-key`` with the field name of the association in XML. +- Set a key ``associationKey:`` with the field name of the association in YAML. + +Use-Case 1: Dynamic Attributes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +We keep up the example of an Article with arbitrary attributes, the mapping looks like this: + +.. configuration-block:: + + .. code-block:: php + + attributes[$name] = new ArticleAttribute($name, $value, $this); + } + } + + /** + * @Entity + */ + class ArticleAttribute + { + /** @Id @ManyToOne(targetEntity="Article", inversedBy="attributes") */ + private $article; + + /** @Id @Column(type="string") */ + private $attribute; + + /** @Column(type="string") */ + private $value; + + public function __construct($name, $value, $article) + { + $this->attribute = $name; + $this->value = $value; + $this->article = $article; + } + } + + .. code-block:: xml + + + + + + + + + + + + + + + .. code-block:: yaml + + Application\Model\ArticleAttribute: + type: entity + id: + article: + associationKey: true + attribute: + type: string + fields: + value: + type: string + manyToOne: + article: + targetEntity: Article + inversedBy: attributes + + +Use-Case 2: Simple Derived Identity +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Sometimes you have the requirement that two objects are related by a One-To-One association +and that the dependent class should re-use the primary key of the class it depends on. +One good example for this is a user-address relationship: + +.. configuration-block:: + + .. code-block:: php + + customer = $customer; + $this->items = new ArrayCollection(); + $this->created = new \DateTime("now"); + } + } + + /** @Entity */ + class Product + { + /** @Id @Column(type="integer") @GeneratedValue */ + private $id; + + /** @Column(type="string") */ + private $name; + + /** @Column(type="decimal") */ + private $currentPrice; + + public function getCurrentPrice() + { + return $this->currentPrice; + } + } + + /** @Entity */ + class OrderItem + { + /** @Id @ManyToOne(targetEntity="Order") */ + private $order; + + /** @Id @ManyToOne(targetEntity="Product") */ + private $product; + + /** @Column(type="integer") */ + private $amount = 1; + + /** @Column(type="decimal") */ + private $offeredPrice; + + public function __construct(Order $order, Product $product, $amount = 1) + { + $this->order = $order; + $this->product = $product; + $this->offeredPrice = $product->getCurrentPrice(); + } + } + + +Performance Considerations +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Using composite keys always comes with a performance hit compared to using entities with +a simple surrogate key. This performance impact is mostly due to additional PHP code that is +necessary to handle this kind of keys, most notably when using derived identifiers. + +On the SQL side there is not much overhead as no additional or unexpected queries have to be +executed to manage entities with derived foreign keys. diff --git a/vendor/doctrine/orm/docs/en/tutorials/embeddables.rst b/vendor/doctrine/orm/docs/en/tutorials/embeddables.rst new file mode 100644 index 0000000000000000000000000000000000000000..60265d6d5aeb51c29298fd4e7cd66c3356ff7aa0 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/tutorials/embeddables.rst @@ -0,0 +1,162 @@ +Separating Concerns using Embeddables +------------------------------------- + +Embeddables are classes which are not entities themself, but are embedded +in entities and can also be queried in DQL. You'll mostly want to use them +to reduce duplication or separating concerns. Value objects such as date range +or address are the primary use case for this feature. Embeddables can only +contain properties with basic ``@Column`` mapping. + +For the purposes of this tutorial, we will assume that you have a ``User`` +class in your application and you would like to store an address in +the ``User`` class. We will model the ``Address`` class as an embeddable +instead of simply adding the respective columns to the ``User`` class. + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + + + + + + .. code-block:: yaml + + User: + type: entity + embedded: + address: + class: Address + + Address: + type: embeddable + fields: + street: { type: string } + postalCode: { type: string } + city: { type: string } + country: { type: string } + +In terms of your database schema, Doctrine will automatically inline all +columns from the ``Address`` class into the table of the ``User`` class, +just as if you had declared them directly there. + +Column Prefixing +---------------- + +By default, Doctrine names your columns by prefixing them, using the value +object name. + +Following the example above, your columns would be named as ``address_street``, +``address_postalCode``... + +You can change this behaviour to meet your needs by changing the +``columnPrefix`` attribute in the ``@Embedded`` notation. + +The following example shows you how to set your prefix to ``myPrefix_``: + +.. configuration-block:: + + .. code-block:: php + + + + + + .. code-block:: yaml + + User: + type: entity + embedded: + address: + class: Address + columnPrefix: myPrefix_ + +To have Doctrine drop the prefix and use the value object's property name +directly, set ``columnPrefix=false`` (``use-column-prefix="false"`` for XML): + +.. configuration-block:: + + .. code-block:: php + + + + + + +DQL +--- + +You can also use mapped fields of embedded classes in DQL queries, just +as if they were declared in the ``User`` class: + +.. code-block:: sql + + SELECT u FROM User u WHERE u.address.city = :myCity + diff --git a/vendor/doctrine/orm/docs/en/tutorials/extra-lazy-associations.rst b/vendor/doctrine/orm/docs/en/tutorials/extra-lazy-associations.rst new file mode 100644 index 0000000000000000000000000000000000000000..456c8c1c5ff40aebdfc571552cb61b584df9d480 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/tutorials/extra-lazy-associations.rst @@ -0,0 +1,86 @@ +Extra Lazy Associations +======================= + +.. versionadded:: 2.1 + +In many cases associations between entities can get pretty large. Even in a simple scenario like a blog. +where posts can be commented, you always have to assume that a post draws hundreds of comments. +In Doctrine 2.0 if you accessed an association it would always get loaded completely into memory. This +can lead to pretty serious performance problems, if your associations contain several hundreds or thousands +of entities. + +With Doctrine 2.1 a feature called **Extra Lazy** is introduced for associations. Associations +are marked as **Lazy** by default, which means the whole collection object for an association is populated +the first time its accessed. If you mark an association as extra lazy the following methods on collections +can be called without triggering a full load of the collection: + +- ``Collection#contains($entity)`` +- ``Collection#containsKey($key)`` (available with Doctrine 2.5) +- ``Collection#count()`` +- ``Collection#get($key)`` (available with Doctrine 2.4) +- ``Collection#slice($offset, $length = null)`` + +For each of the above methods the following semantics apply: + +- For each call, if the Collection is not yet loaded, issue a straight SELECT statement against the database. +- For each call, if the collection is already loaded, fallback to the default functionality for lazy collections. No additional SELECT statements are executed. + +Additionally even with Doctrine 2.0 the following methods do not trigger the collection load: + +- ``Collection#add($entity)`` +- ``Collection#offsetSet($key, $entity)`` - ArrayAccess with no specific key ``$coll[] = $entity``, it does + not work when setting specific keys like ``$coll[0] = $entity``. + +With extra lazy collections you can now not only add entities to large collections but also paginate them +easily using a combination of ``count`` and ``slice``. + + +Enabling Extra-Lazy Associations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The mapping configuration is simple. Instead of using the default value of ``fetch="LAZY"`` you have to +switch to extra lazy as shown in these examples: + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + + .. code-block:: yaml + + Doctrine\Tests\Models\CMS\CmsGroup: + type: entity + # ... + manyToMany: + users: + targetEntity: CmsUser + mappedBy: groups + fetch: EXTRA_LAZY + diff --git a/vendor/doctrine/orm/docs/en/tutorials/getting-started-database.rst b/vendor/doctrine/orm/docs/en/tutorials/getting-started-database.rst new file mode 100644 index 0000000000000000000000000000000000000000..c625193aeb51a7858fbfb39d1052b7bf5ce43b56 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/tutorials/getting-started-database.rst @@ -0,0 +1,27 @@ +Getting Started: Database First +=============================== + +.. note:: *Development Workflows* + + When you :doc:`Code First `, you + start with developing Objects and then map them onto your database. When + you :doc:`Model First `, you are modelling your application using tools (for + example UML) and generate database schema and PHP code from this model. + When you have a :doc:`Database First `, you already have a database schema + and generate the corresponding PHP code from it. + +.. note:: + + This getting started guide is in development. + +Development of new applications often starts with an existing database schema. +When the database schema is the starting point for your application, then +development is said to use the *Database First* approach to Doctrine. + +In this workflow you would modify the database schema first and then +regenerate the PHP code to use with this schema. You need a flexible +code-generator for this task and up to Doctrine 2.2, the code generator hasn't +been flexible enough to achieve this. + +We spinned off a subproject, Doctrine CodeGenerator, that will fill this gap and +allow you to do *Database First* development. diff --git a/vendor/doctrine/orm/docs/en/tutorials/getting-started-models.rst b/vendor/doctrine/orm/docs/en/tutorials/getting-started-models.rst new file mode 100644 index 0000000000000000000000000000000000000000..e844b4d68650d085f759604c022ee4363693a7f7 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/tutorials/getting-started-models.rst @@ -0,0 +1,24 @@ +Getting Started: Model First +============================ + +.. note:: *Development Workflows* + + When you :doc:`Code First `, you + start with developing Objects and then map them onto your database. When + you :doc:`Model First `, you are modelling your application using tools (for + example UML) and generate database schema and PHP code from this model. + When you have a :doc:`Database First `, then you already have a database schema + and generate the corresponding PHP code from it. + +.. note:: + + This getting started guide is in development. + +There are applications when you start with a high-level description of the +model using modelling tools such as UML. Modelling tools could also be Excel, +XML or CSV files that describe the model in some structured way. If your +application is using a modelling tool, then the development workflow is said to +be a *Model First* approach to Doctrine2. + +In this workflow you always change the model description and then regenerate +both PHP code and database schema from this model. diff --git a/vendor/doctrine/orm/docs/en/tutorials/getting-started.rst b/vendor/doctrine/orm/docs/en/tutorials/getting-started.rst new file mode 100644 index 0000000000000000000000000000000000000000..1abcfb548a36c2e778cb647d70f12d755ab94722 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/tutorials/getting-started.rst @@ -0,0 +1,1549 @@ +Getting Started with Doctrine +============================= + +This guide covers getting started with the Doctrine ORM. After working +through the guide you should know: + +- How to install and configure Doctrine by connecting it to a database +- Mapping PHP objects to database tables +- Generating a database schema from PHP objects +- Using the ``EntityManager`` to insert, update, delete and find + objects in the database. + +Guide Assumptions +----------------- + +This guide is designed for beginners that haven't worked with Doctrine ORM +before. There are some prerequesites for the tutorial that have to be +installed: + +- PHP 5.4 or above +- Composer Package Manager (`Install Composer + `_) + +The code of this tutorial is `available on Github `_. + +.. note:: + + This tutorial assumes you work with **Doctrine 2.4** and above. + Some of the code will not work with lower versions. + +What is Doctrine? +----------------- + +Doctrine 2 is an `object-relational mapper (ORM) +`_ for PHP 5.4+ that +provides transparent persistence for PHP objects. It uses the Data Mapper +pattern at the heart, aiming for a complete separation of your domain/business +logic from the persistence in a relational database management system. + +The benefit of Doctrine for the programmer is the ability to focus +on the object-oriented business logic and worry about persistence only +as a secondary problem. This doesn't mean persistence is downplayed by Doctrine +2, however it is our belief that there are considerable benefits for +object-oriented programming if persistence and entities are kept +separated. + +What are Entities? +~~~~~~~~~~~~~~~~~~ + +Entities are PHP Objects that can be identified over many requests +by a unique identifier or primary key. These classes don't need to extend any +abstract base class or interface. An entity class must not be final +or contain final methods. Additionally it must not implement +**clone** nor **wakeup** or :doc:`do so safely <../cookbook/implementing-wakeup-or-clone>`. + +An entity contains persistable properties. A persistable property +is an instance variable of the entity that is saved into and retrieved from the database +by Doctrine's data mapping capabilities. + +An Example Model: Bug Tracker +----------------------------- + +For this Getting Started Guide for Doctrine we will implement the +Bug Tracker domain model from the +`Zend\_Db\_Table `_ +documentation. Reading their documentation we can extract the +requirements: + +- A Bug has a description, creation date, status, reporter and + engineer +- A Bug can occur on different Products (platforms) +- A Product has a name. +- Bug reporters and engineers are both Users of the system. +- A User can create new Bugs. +- The assigned engineer can close a Bug. +- A User can see all his reported or assigned Bugs. +- Bugs can be paginated through a list-view. + +Project Setup +------------- + +Create a new empty folder for this tutorial project, for example +``doctrine2-tutorial`` and create a new file ``composer.json`` with +the following contents: + +:: + + { + "require": { + "doctrine/orm": "2.4.*", + "symfony/yaml": "2.*" + }, + "autoload": { + "psr-0": {"": "src/"} + } + } + + +Install Doctrine using the Composer Dependency Management tool, by calling: + +:: + + $ composer install + +This will install the packages Doctrine Common, Doctrine DBAL, Doctrine ORM, +Symfony YAML and Symfony Console into the `vendor` directory. The Symfony +dependencies are not required by Doctrine but will be used in this tutorial. + +Add the following directories: +:: + + doctrine2-tutorial + |-- config + | |-- xml + | `-- yaml + `-- src + +Obtaining the EntityManager +--------------------------- + +Doctrine's public interface is the EntityManager, it provides the +access point to the complete lifecycle management of your entities +and transforms entities from and back to persistence. You have to +configure and create it to use your entities with Doctrine 2. I +will show the configuration steps and then discuss them step by +step: + +.. code-block:: php + + 'pdo_sqlite', + 'path' => __DIR__ . '/db.sqlite', + ); + + // obtaining the entity manager + $entityManager = EntityManager::create($conn, $config); + +The first require statement sets up the autoloading capabilities of Doctrine +using the Composer autoload. + +The second block consists of the instantiation of the ORM +``Configuration`` object using the Setup helper. It assumes a bunch +of defaults that you don't have to bother about for now. You can +read up on the configuration details in the +:doc:`reference chapter on configuration <../reference/configuration>`. + +The third block shows the configuration options required to connect +to a database, in my case a file-based sqlite database. All the +configuration options for all the shipped drivers are given in the +`DBAL Configuration section of the manual `_. + +The last block shows how the ``EntityManager`` is obtained from a +factory method. + +Generating the Database Schema +------------------------------ + +Now that we have defined the Metadata mappings and bootstrapped the +EntityManager we want to generate the relational database schema +from it. Doctrine has a Command-Line Interface that allows you to +access the SchemaTool, a component that generates the required +tables to work with the metadata. + +For the command-line tool to work a cli-config.php file has to be +present in the project root directory, where you will execute the +doctrine command. Its a fairly simple file: + +.. code-block:: php + + id; + } + + public function getName() + { + return $this->name; + } + + public function setName($name) + { + $this->name = $name; + } + } + +Note that all fields are set to protected (not public) with a +mutator (getter and setter) defined for every field except $id. +The use of mutators allows Doctrine to hook into calls which +manipulate the entities in ways that it could not if you just +directly set the values with ``entity#field = foo;`` + +The id field has no setter since, generally speaking, your code +should not set this value since it represents a database id value. +(Note that Doctrine itself can still set the value using the +Reflection API instead of a defined setter function) + +The next step for persistence with Doctrine is to describe the +structure of the ``Product`` entity to Doctrine using a metadata +language. The metadata language describes how entities, their +properties and references should be persisted and what constraints +should be applied to them. + +Metadata for entities are configured using a XML, YAML or Docblock Annotations. +This Getting Started Guide will show the mappings for all Mapping Drivers. +References in the text will be made to the XML mapping. + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + + + + + .. code-block:: yaml + + # config/yaml/Product.dcm.yml + Product: + type: entity + table: products + id: + id: + type: integer + generator: + strategy: AUTO + fields: + name: + type: string + +The top-level ``entity`` definition tag specifies information about +the class and table-name. The primitive type ``Product#name`` is +defined as a ``field`` attribute. The ``id`` property is defined with +the ``id`` tag, this has a ``generator`` tag nested inside which +defines that the primary key generation mechanism automatically +uses the database platforms native id generation strategy (for +example AUTO INCREMENT in the case of MySql or Sequences in the +case of PostgreSql and Oracle). + +Now that we have defined our first entity, let's update the database: + +:: + + $ vendor/bin/doctrine orm:schema-tool:update --force --dump-sql + +Specifying both flags ``--force`` and ``-dump-sql`` prints and executes the DDL +statements. + +Now create a new script that will insert products into the database: + +.. code-block:: php + + setName($newProductName); + + $entityManager->persist($product); + $entityManager->flush(); + + echo "Created Product with ID " . $product->getId() . "\n"; + +Call this script from the command-line to see how new products are created: + +:: + + $ php create_product.php ORM + $ php create_product.php DBAL + +What is happening here? Using the ``Product`` is pretty standard OOP. +The interesting bits are the use of the ``EntityManager`` service. To +notify the EntityManager that a new entity should be inserted into the database +you have to call ``persist()``. To initiate a transaction to actually perform +the insertion, You have to explicitly call ``flush()`` on the ``EntityManager``. + +This distinction between persist and flush is allows to aggregate all writes +(INSERT, UPDATE, DELETE) into one single transaction, which is executed when +flush is called. Using this approach the write-performance is significantly +better than in a scenario where updates are done for each entity in isolation. + +Doctrine follows the UnitOfWork pattern which additionally detects all entities +that were fetched and have changed during the request. You don't have to keep track of +entities yourself, when Doctrine already knows about them. + +As a next step we want to fetch a list of all the Products. Let's create a +new script for this: + +.. code-block:: php + + getRepository('Product'); + $products = $productRepository->findAll(); + + foreach ($products as $product) { + echo sprintf("-%s\n", $product->getName()); + } + +The ``EntityManager#getRepository()`` method can create a finder object (called +a repository) for every entity. It is provided by Doctrine and contains some +finder methods such as ``findAll()``. + +Let's continue with displaying the name of a product based on its ID: + +.. code-block:: php + + + require_once "bootstrap.php"; + + $id = $argv[1]; + $product = $entityManager->find('Product', $id); + + if ($product === null) { + echo "No product found.\n"; + exit(1); + } + + echo sprintf("-%s\n", $product->getName()); + +Updating a product name demonstrates the functionality UnitOfWork of pattern +discussed before. We only need to find a product entity and all changes to its +properties are written to the database: + +.. code-block:: php + + + require_once "bootstrap.php"; + + $id = $argv[1]; + $newName = $argv[2]; + + $product = $entityManager->find('Product', $id); + + if ($product === null) { + echo "Product $id does not exist.\n"; + exit(1); + } + + $product->setName($newName); + + $entityManager->flush(); + +After calling this script on one of the existing products, you can verify the +product name changed by calling the ``show_product.php`` script. + +Adding Bug and User Entities +---------------------------- + +We continue with the bug tracker domain, by creating the missing classes +``Bug`` and ``User`` and putting them into ``src/Bug.php`` and +``src/User.php`` respectively. + +.. code-block:: php + + id; + } + + public function getDescription() + { + return $this->description; + } + + public function setDescription($description) + { + $this->description = $description; + } + + public function setCreated(DateTime $created) + { + $this->created = $created; + } + + public function getCreated() + { + return $this->created; + } + + public function setStatus($status) + { + $this->status = $status; + } + + public function getStatus() + { + return $this->status; + } + } + +.. code-block:: php + + id; + } + + public function getName() + { + return $this->name; + } + + public function setName($name) + { + $this->name = $name; + } + } + +All of the properties discussed so far are simple string and integer values, +for example the id fields of the entities, their names, description, status and +change dates. Next we will model the dynamic relationships between the entities +by defining the references between entities. + +References between objects are foreign keys in the database. You never have to +(and never should) work with the foreign keys directly, only with the objects +that represent the foreign key through their own identity. + +For every foreign key you either have a Doctrine ManyToOne or OneToOne +association. On the inverse sides of these foreign keys you can have +OneToMany associations. Obviously you can have ManyToMany associations +that connect two tables with each other through a join table with +two foreign keys. + +Now that you know the basics about references in Doctrine, we can extend the +domain model to match the requirements: + +.. code-block:: php + + products = new ArrayCollection(); + } + } + +.. code-block:: php + + reportedBugs = new ArrayCollection(); + $this->assignedBugs = new ArrayCollection(); + } + } + +Whenever an entity is recreated from the database, an Collection +implementation of the type Doctrine is injected into your entity +instead of an array. Compared to the ArrayCollection this +implementation helps the Doctrine ORM understand the changes that +have happened to the collection which are noteworthy for +persistence. + +.. warning:: + + Lazy load proxies always contain an instance of + Doctrine's EntityManager and all its dependencies. Therefore a + var\_dump() will possibly dump a very large recursive structure + which is impossible to render and read. You have to use + ``Doctrine\Common\Util\Debug::dump()`` to restrict the dumping to a + human readable level. Additionally you should be aware that dumping + the EntityManager to a Browser may take several minutes, and the + Debug::dump() method just ignores any occurrences of it in Proxy + instances. + +Because we only work with collections for the references we must be +careful to implement a bidirectional reference in the domain model. +The concept of owning or inverse side of a relation is central to +this notion and should always be kept in mind. The following +assumptions are made about relations and have to be followed to be +able to work with Doctrine 2. These assumptions are not unique to +Doctrine 2 but are best practices in handling database relations +and Object-Relational Mapping. + + +- Changes to Collections are saved or updated, when the entity on + the *owning* side of the collection is saved or updated. +- Saving an Entity at the inverse side of a relation never + triggers a persist operation to changes to the collection. +- In a one-to-one relation the entity holding the foreign key of + the related entity on its own database table is *always* the owning + side of the relation. +- In a many-to-many relation, both sides can be the owning side of + the relation. However in a bi-directional many-to-many relation + only one is allowed to be. +- In a many-to-one relation the Many-side is the owning side by + default, because it holds the foreign key. +- The OneToMany side of a relation is inverse by default, since + the foreign key is saved on the Many side. A OneToMany relation can + only be the owning side, if its implemented using a ManyToMany + relation with join table and restricting the one side to allow only + UNIQUE values per database constraint. + +.. note:: + + Consistency of bi-directional references on the inverse side of a + relation have to be managed in userland application code. Doctrine + cannot magically update your collections to be consistent. + + +In the case of Users and Bugs we have references back and forth to +the assigned and reported bugs from a user, making this relation +bi-directional. We have to change the code to ensure consistency of +the bi-directional reference: + +.. code-block:: php + + assignedToBug($this); + $this->engineer = $engineer; + } + + public function setReporter($reporter) + { + $reporter->addReportedBug($this); + $this->reporter = $reporter; + } + + public function getEngineer() + { + return $this->engineer; + } + + public function getReporter() + { + return $this->reporter; + } + } + +.. code-block:: php + + reportedBugs[] = $bug; + } + + public function assignedToBug($bug) + { + $this->assignedBugs[] = $bug; + } + } + +I chose to name the inverse methods in past-tense, which should +indicate that the actual assigning has already taken place and the +methods are only used for ensuring consistency of the references. +This approach is my personal preference, you can choose whatever +method to make this work. + +You can see from ``User#addReportedBug()`` and +``User#assignedToBug()`` that using this method in userland alone +would not add the Bug to the collection of the owning side in +``Bug#reporter`` or ``Bug#engineer``. Using these methods and +calling Doctrine for persistence would not update the collections +representation in the database. + +Only using ``Bug#setEngineer()`` or ``Bug#setReporter()`` +correctly saves the relation information. + +The ``Bug#reporter`` and ``Bug#engineer`` properties are +Many-To-One relations, which point to a User. In a normalized +relational model the foreign key is saved on the Bug's table, hence +in our object-relation model the Bug is at the owning side of the +relation. You should always make sure that the use-cases of your +domain model should drive which side is an inverse or owning one in +your Doctrine mapping. In our example, whenever a new bug is saved +or an engineer is assigned to the bug, we don't want to update the +User to persist the reference, but the Bug. This is the case with +the Bug being at the owning side of the relation. + +Bugs reference Products by an uni-directional ManyToMany relation in +the database that points from Bugs to Products. + +.. code-block:: php + + products[] = $product; + } + + public function getProducts() + { + return $this->products; + } + } + +We are now finished with the domain model given the requirements. +Lets add metadata mappings for the ``User`` and ``Bug`` as we did for +the ``Product`` before: + +.. configuration-block:: + .. code-block:: php + + + + + + + + + + + + + + + + + + + + + .. code-block:: yaml + + # config/yaml/Bug.dcm.yml + Bug: + type: entity + table: bugs + id: + id: + type: integer + generator: + strategy: AUTO + fields: + description: + type: text + created: + type: datetime + status: + type: string + manyToOne: + reporter: + targetEntity: User + inversedBy: reportedBugs + engineer: + targetEntity: User + inversedBy: assignedBugs + manyToMany: + products: + targetEntity: Product + + +Here we have the entity, id and primitive type definitions. +For the "created" field we have used the ``datetime`` type, +which translates the YYYY-mm-dd HH:mm:ss database format +into a PHP DateTime instance and back. + +After the field definitions the two qualified references to the +user entity are defined. They are created by the ``many-to-one`` +tag. The class name of the related entity has to be specified with +the ``target-entity`` attribute, which is enough information for +the database mapper to access the foreign-table. Since +``reporter`` and ``engineer`` are on the owning side of a +bi-directional relation we also have to specify the ``inversed-by`` +attribute. They have to point to the field names on the inverse +side of the relationship. We will see in the next example that the ``inversed-by`` +attribute has a counterpart ``mapped-by`` which makes that +the inverse side. + +The last definition is for the ``Bug#products`` collection. It +holds all products where the specific bug occurs. Again +you have to define the ``target-entity`` and ``field`` attributes +on the ``many-to-many`` tag. + +The last missing definition is that of the User entity: + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + + + + + + + + .. code-block:: yaml + + # config/xml/User.dcm.yml + User: + type: entity + table: users + id: + id: + type: integer + generator: + strategy: AUTO + fields: + name: + type: string + oneToMany: + reportedBugs: + targetEntity: Bug + mappedBy: reporter + assignedBugs: + targetEntity: Bug + mappedBy: engineer + +Here are some new things to mention about the ``one-to-many`` tags. +Remember that we discussed about the inverse and owning side. Now +both reportedBugs and assignedBugs are inverse relations, which +means the join details have already been defined on the owning +side. Therefore we only have to specify the property on the Bug +class that holds the owning sides. + +This example has a fair overview of the most basic features of the +metadata definition language. + +Update your database running: +:: + + $ vendor/bin/doctrine orm:schema-tool:update --force + + +Implementing more Requirements +------------------------------ + +For starters we need a create user entities: + +.. code-block:: php + + setName($newUsername); + + $entityManager->persist($user); + $entityManager->flush(); + + echo "Created User with ID " . $user->getId() . "\n"; + +Now call: + +:: + + $ php create_user.php beberlei + +We now have the data to create a bug and the code for this scenario may look +like this: + +.. code-block:: php + + find("User", $theReporterId); + $engineer = $entityManager->find("User", $theDefaultEngineerId); + if (!$reporter || !$engineer) { + echo "No reporter and/or engineer found for the input.\n"; + exit(1); + } + + $bug = new Bug(); + $bug->setDescription("Something does not work!"); + $bug->setCreated(new DateTime("now")); + $bug->setStatus("OPEN"); + + foreach ($productIds as $productId) { + $product = $entityManager->find("Product", $productId); + $bug->assignToProduct($product); + } + + $bug->setReporter($reporter); + $bug->setEngineer($engineer); + + $entityManager->persist($bug); + $entityManager->flush(); + + echo "Your new Bug Id: ".$bug->getId()."\n"; + +Since we only have one user and product, probably with the ID of 1, we can call this script with: + +:: + + php create_bug.php 1 1 1 + +This is the first contact with the read API of the EntityManager, +showing that a call to ``EntityManager#find($name, $id)`` returns a +single instance of an entity queried by primary key. Besides this +we see the persist + flush pattern again to save the Bug into the +database. + +See how simple relating Bug, Reporter, Engineer and Products is +done by using the discussed methods in the "A first prototype" +section. The UnitOfWork will detect this relations when flush is +called and relate them in the database appropriately. + +Queries for Application Use-Cases +--------------------------------- + +List of Bugs +~~~~~~~~~~~~ + +Using the previous examples we can fill up the database quite a +bit, however we now need to discuss how to query the underlying +mapper for the required view representations. When opening the +application, bugs can be paginated through a list-view, which is +the first read-only use-case: + +.. code-block:: php + + createQuery($dql); + $query->setMaxResults(30); + $bugs = $query->getResult(); + + foreach ($bugs as $bug) { + echo $bug->getDescription()." - ".$bug->getCreated()->format('d.m.Y')."\n"; + echo " Reported by: ".$bug->getReporter()->getName()."\n"; + echo " Assigned to: ".$bug->getEngineer()->getName()."\n"; + foreach ($bug->getProducts() as $product) { + echo " Platform: ".$product->getName()."\n"; + } + echo "\n"; + } + +The DQL Query in this example fetches the 30 most recent bugs with +their respective engineer and reporter in one single SQL statement. +The console output of this script is then: + +:: + + Something does not work! - 02.04.2010 + Reported by: beberlei + Assigned to: beberlei + Platform: My Product + +.. note:: + + **DQL is not SQL** + + You may wonder why we start writing SQL at the beginning of this + use-case. Don't we use an ORM to get rid of all the endless + hand-writing of SQL? Doctrine introduces DQL which is best + described as **object-query-language** and is a dialect of + `OQL `_ and + similar to `HQL `_ or + `JPQL `_. + It does not know the concept of columns and tables, but only those + of Entity-Class and property. Using the Metadata we defined before + it allows for very short distinctive and powerful queries. + + + An important reason why DQL is favourable to the Query API of most + ORMs is its similarity to SQL. The DQL language allows query + constructs that most ORMs don't, GROUP BY even with HAVING, + Sub-selects, Fetch-Joins of nested classes, mixed results with + entities and scalar data such as COUNT() results and much more. + Using DQL you should seldom come to the point where you want to + throw your ORM into the dumpster, because it doesn't support some + the more powerful SQL concepts. + + + Instead of handwriting DQL you can use the ``QueryBuilder`` retrieved + by calling ``$entityManager->createQueryBuilder()``. There are more + details about this in the relevant part of the documentation. + + + As a last resort you can still use Native SQL and a description of the + result set to retrieve entities from the database. DQL boils down to a + Native SQL statement and a ``ResultSetMapping`` instance itself. Using + Native SQL you could even use stored procedures for data retrieval, or + make use of advanced non-portable database queries like PostgreSql's + recursive queries. + + +Array Hydration of the Bug List +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In the previous use-case we retrieved the results as their +respective object instances. We are not limited to retrieving +objects only from Doctrine however. For a simple list view like the +previous one we only need read access to our entities and can +switch the hydration from objects to simple PHP arrays instead. + +Hydration can be an expensive process so only retrieving what you need can +yield considerable performance benefits for read-only requests. + +Implementing the same list view as before using array hydration we +can rewrite our code: + +.. code-block:: php + + createQuery($dql); + $bugs = $query->getArrayResult(); + + foreach ($bugs as $bug) { + echo $bug['description'] . " - " . $bug['created']->format('d.m.Y')."\n"; + echo " Reported by: ".$bug['reporter']['name']."\n"; + echo " Assigned to: ".$bug['engineer']['name']."\n"; + foreach ($bug['products'] as $product) { + echo " Platform: ".$product['name']."\n"; + } + echo "\n"; + } + +There is one significant difference in the DQL query however, we +have to add an additional fetch-join for the products connected to +a bug. The resulting SQL query for this single select statement is +pretty large, however still more efficient to retrieve compared to +hydrating objects. + +Find by Primary Key +~~~~~~~~~~~~~~~~~~~ + +The next Use-Case is displaying a Bug by primary key. This could be +done using DQL as in the previous example with a where clause, +however there is a convenience method on the ``EntityManager`` that +handles loading by primary key, which we have already seen in the +write scenarios: + +.. code-block:: php + + find("Bug", (int)$theBugId); + + echo "Bug: ".$bug->getDescription()."\n"; + echo "Engineer: ".$bug->getEngineer()->getName()."\n"; + +The output of the engineer’s name is fetched from the database! What is happening? + +Since we only retrieved the bug by primary key both the engineer and reporter +are not immediately loaded from the database but are replaced by LazyLoading +proxies. These proxies will load behind the scenes, when the first method +is called on them. + +Sample code of this proxy generated code can be found in the specified Proxy +Directory, it looks like: + +.. code-block:: php + + _load(); + return parent::addReportedBug($bug); + } + + public function assignedToBug($bug) + { + $this->_load(); + return parent::assignedToBug($bug); + } + } + +See how upon each method call the proxy is lazily loaded from the +database? + +The call prints: + +:: + + $ php show_bug.php 1 + Bug: Something does not work! + Engineer: beberlei + +.. warning:: + + Lazy loading additional data can be very convenient but the additional + queries create an overhead. If you know that certain fields will always + (or usually) be required by the query then you will get better performance + by explicitly retrieving them all in the first query. + + +Dashboard of the User +--------------------- + +For the next use-case we want to retrieve the dashboard view, a +list of all open bugs the user reported or was assigned to. This +will be achieved using DQL again, this time with some WHERE clauses +and usage of bound parameters: + +.. code-block:: php + + createQuery($dql) + ->setParameter(1, $theUserId) + ->setMaxResults(15) + ->getResult(); + + echo "You have created or assigned to " . count($myBugs) . " open bugs:\n\n"; + + foreach ($myBugs as $bug) { + echo $bug->getId() . " - " . $bug->getDescription()."\n"; + } + +Number of Bugs +-------------- + +Until now we only retrieved entities or their array representation. +Doctrine also supports the retrieval of non-entities through DQL. +These values are called "scalar result values" and may even be +aggregate values using COUNT, SUM, MIN, MAX or AVG functions. + +We will need this knowledge to retrieve the number of open bugs +grouped by product: + +.. code-block:: php + + createQuery($dql)->getScalarResult(); + + foreach ($productBugs as $productBug) { + echo $productBug['name']." has " . $productBug['openBugs'] . " open bugs!\n"; + } + +Updating Entities +----------------- + +There is a single use-case missing from the requirements, Engineers +should be able to close a bug. This looks like: + +.. code-block:: php + + status = "CLOSE"; + } + } + +.. code-block:: php + + find("Bug", (int)$theBugId); + $bug->close(); + + $entityManager->flush(); + +When retrieving the Bug from the database it is inserted into the +IdentityMap inside the UnitOfWork of Doctrine. This means your Bug +with exactly this id can only exist once during the whole request +no matter how often you call ``EntityManager#find()``. It even +detects entities that are hydrated using DQL and are already +present in the Identity Map. + +When flush is called the EntityManager loops over all the entities +in the identity map and performs a comparison between the values +originally retrieved from the database and those values the entity +currently has. If at least one of these properties is different the +entity is scheduled for an UPDATE against the database. Only the +changed columns are updated, which offers a pretty good performance +improvement compared to updating all the properties. + +Entity Repositories +------------------- + +For now we have not discussed how to separate the Doctrine query logic from your model. +In Doctrine 1 there was the concept of ``Doctrine_Table`` instances for this +separation. The similar concept in Doctrine2 is called Entity Repositories, integrating +the `repository pattern `_ at the heart of Doctrine. + +Every Entity uses a default repository by default and offers a bunch of convenience +methods that you can use to query for instances of that Entity. Take for example +our Product entity. If we wanted to Query by name, we can use: + +.. code-block:: php + + getRepository('Product') + ->findOneBy(array('name' => $productName)); + +The method ``findOneBy()`` takes an array of fields or association keys and the values to match against. + +If you want to find all entities matching a condition you can use ``findBy()``, for +example querying for all closed bugs: + +.. code-block:: php + + getRepository('Bug') + ->findBy(array('status' => 'CLOSED')); + + foreach ($bugs as $bug) { + // do stuff + } + +Compared to DQL these query methods are falling short of functionality very fast. +Doctrine offers you a convenient way to extend the functionalities of the default ``EntityRepository`` +and put all the specialized DQL query logic on it. For this you have to create a subclass +of ``Doctrine\ORM\EntityRepository``, in our case a ``BugRepository`` and group all +the previously discussed query functionality in it: + +.. code-block:: php + + getEntityManager()->createQuery($dql); + $query->setMaxResults($number); + return $query->getResult(); + } + + public function getRecentBugsArray($number = 30) + { + $dql = "SELECT b, e, r, p FROM Bug b JOIN b.engineer e ". + "JOIN b.reporter r JOIN b.products p ORDER BY b.created DESC"; + $query = $this->getEntityManager()->createQuery($dql); + $query->setMaxResults($number); + return $query->getArrayResult(); + } + + public function getUsersBugs($userId, $number = 15) + { + $dql = "SELECT b, e, r FROM Bug b JOIN b.engineer e JOIN b.reporter r ". + "WHERE b.status = 'OPEN' AND e.id = ?1 OR r.id = ?1 ORDER BY b.created DESC"; + + return $this->getEntityManager()->createQuery($dql) + ->setParameter(1, $userId) + ->setMaxResults($number) + ->getResult(); + } + + public function getOpenBugsByProduct() + { + $dql = "SELECT p.id, p.name, count(b.id) AS openBugs FROM Bug b ". + "JOIN b.products p WHERE b.status = 'OPEN' GROUP BY p.id"; + return $this->getEntityManager()->createQuery($dql)->getScalarResult(); + } + } + +To be able to use this query logic through ``$this->getEntityManager()->getRepository('Bug')`` +we have to adjust the metadata slightly. + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + .. code-block:: yaml + + Bug: + type: entity + repositoryClass: BugRepository + +Now we can remove our query logic in all the places and instead use them through the EntityRepository. +As an example here is the code of the first use case "List of Bugs": + +.. code-block:: php + + getRepository('Bug')->getRecentBugs(); + + foreach ($bugs as $bug) { + echo $bug->getDescription()." - ".$bug->getCreated()->format('d.m.Y')."\n"; + echo " Reported by: ".$bug->getReporter()->getName()."\n"; + echo " Assigned to: ".$bug->getEngineer()->getName()."\n"; + foreach ($bug->getProducts() as $product) { + echo " Platform: ".$product->getName()."\n"; + } + echo "\n"; + } + +Using EntityRepositories you can avoid coupling your model with specific query logic. +You can also re-use query logic easily throughout your application. + +Conclusion +---------- + +This tutorial is over here, I hope you had fun. Additional content +will be added to this tutorial incrementally, topics will include: + +- More on Association Mappings +- Lifecycle Events triggered in the UnitOfWork +- Ordering of Collections + +Additional details on all the topics discussed here can be found in +the respective manual chapters. diff --git a/vendor/doctrine/orm/docs/en/tutorials/ordered-associations.rst b/vendor/doctrine/orm/docs/en/tutorials/ordered-associations.rst new file mode 100644 index 0000000000000000000000000000000000000000..121bd145d571f519ce73f1704ab12b4e05d8ca34 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/tutorials/ordered-associations.rst @@ -0,0 +1,110 @@ +Ordering To-Many Associations +----------------------------- + +There are use-cases when you'll want to sort collections when they are +retrieved from the database. In userland you do this as long as you +haven't initially saved an entity with its associations into the +database. To retrieve a sorted collection from the database you can +use the ``@OrderBy`` annotation with an collection that specifies +an DQL snippet that is appended to all queries with this +collection. + +Additional to any ``@OneToMany`` or ``@ManyToMany`` annotation you +can specify the ``@OrderBy`` in the following way: + +.. configuration-block:: + + .. code-block:: php + + + + + + + + + + + + .. code-block:: yaml + + User: + type: entity + manyToMany: + groups: + orderBy: { 'name': 'ASC' } + targetEntity: Group + joinTable: + name: users_groups + joinColumns: + user_id: + referencedColumnName: id + inverseJoinColumns: + group_id: + referencedColumnName: id + +The DQL Snippet in OrderBy is only allowed to consist of +unqualified, unquoted field names and of an optional ASC/DESC +positional statement. Multiple Fields are separated by a comma (,). +The referenced field names have to exist on the ``targetEntity`` +class of the ``@ManyToMany`` or ``@OneToMany`` annotation. + +The semantics of this feature can be described as follows. + + +- ``@OrderBy`` acts as an implicit ORDER BY clause for the given + fields, that is appended to all the explicitly given ORDER BY + items. +- All collections of the ordered type are always retrieved in an + ordered fashion. +- To keep the database impact low, these implicit ORDER BY items + are only added to an DQL Query if the collection is fetch joined in + the DQL query. + +Given our previously defined example, the following would not add +ORDER BY, since g is not fetch joined: + +.. code-block:: sql + + SELECT u FROM User u JOIN u.groups g WHERE SIZE(g) > 10 + +However the following: + +.. code-block:: sql + + SELECT u, g FROM User u JOIN u.groups g WHERE u.id = 10 + +...would internally be rewritten to: + +.. code-block:: sql + + SELECT u, g FROM User u JOIN u.groups g WHERE u.id = 10 ORDER BY g.name ASC + +You can reverse the order with an explicit DQL ORDER BY: + +.. code-block:: sql + + SELECT u, g FROM User u JOIN u.groups g WHERE u.id = 10 ORDER BY g.name DESC + +...is internally rewritten to: + +.. code-block:: sql + + SELECT u, g FROM User u JOIN u.groups g WHERE u.id = 10 ORDER BY g.name DESC, g.name ASC + + diff --git a/vendor/doctrine/orm/docs/en/tutorials/override-field-association-mappings-in-subclasses.rst b/vendor/doctrine/orm/docs/en/tutorials/override-field-association-mappings-in-subclasses.rst new file mode 100644 index 0000000000000000000000000000000000000000..aef663f2a68c653f8663f38eb1e781782e34db6c --- /dev/null +++ b/vendor/doctrine/orm/docs/en/tutorials/override-field-association-mappings-in-subclasses.rst @@ -0,0 +1,90 @@ +Override Field Association Mappings In Subclasses +------------------------------------------------- + +Sometimes there is a need to persist entities but override all or part of the +mapping metadata. Sometimes also the mapping to override comes from entities +using traits where the traits have mapping metadata. +This tutorial explains how to override mapping metadata, +i.e. attributes and associations metadata in particular. The example here shows +the overriding of a class that uses a trait but is similar when extending a base +class as shown at the end of this tutorial. + +Suppose we have a class ExampleEntityWithOverride. This class uses trait ExampleTrait: + +.. code-block:: php + + `). diff --git a/vendor/doctrine/orm/docs/en/tutorials/pagination.rst b/vendor/doctrine/orm/docs/en/tutorials/pagination.rst new file mode 100644 index 0000000000000000000000000000000000000000..3971383875195d260ff0c0e858ec61b9063b572c --- /dev/null +++ b/vendor/doctrine/orm/docs/en/tutorials/pagination.rst @@ -0,0 +1,43 @@ +Pagination +========== + +.. versionadded:: 2.2 + +Starting with version 2.2 Doctrine ships with a Paginator for DQL queries. It +has a very simple API and implements the SPL interfaces ``Countable`` and +``IteratorAggregate``. + +.. code-block:: php + + createQuery($dql) + ->setFirstResult(0) + ->setMaxResults(100); + + $paginator = new Paginator($query, $fetchJoinCollection = true); + + $c = count($paginator); + foreach ($paginator as $post) { + echo $post->getHeadline() . "\n"; + } + +Paginating Doctrine queries is not as simple as you might think in the +beginning. If you have complex fetch-join scenarios with one-to-many or +many-to-many associations using the "default" LIMIT functionality of database +vendors is not sufficient to get the correct results. + +By default the pagination extension does the following steps to compute the +correct result: + +- Perform a Count query using `DISTINCT` keyword. +- Perform a Limit Subquery with `DISTINCT` to find all ids of the entity in from on the current page. +- Perform a WHERE IN query to get all results for the current page. + +This behavior is only necessary if you actually fetch join a to-many +collection. You can disable this behavior by setting the +``$fetchJoinCollection`` flag to ``false``; in that case only 2 instead of the 3 queries +described are executed. We hope to automate the detection for this in +the future. diff --git a/vendor/doctrine/orm/docs/en/tutorials/working-with-indexed-associations.rst b/vendor/doctrine/orm/docs/en/tutorials/working-with-indexed-associations.rst new file mode 100644 index 0000000000000000000000000000000000000000..3536a34f8eec42ebd4b43a12816cfcfb23a9f601 --- /dev/null +++ b/vendor/doctrine/orm/docs/en/tutorials/working-with-indexed-associations.rst @@ -0,0 +1,298 @@ +Working with Indexed Associations +================================= + +.. note:: + + This feature is scheduled for version 2.1 of Doctrine and not included in the 2.0.x series. + +Doctrine 2 collections are modelled after PHPs native arrays. PHP arrays are an ordered hashmap, but in +the first version of Doctrine keys retrieved from the database were always numerical unless ``INDEX BY`` +was used. Starting with Doctrine 2.1 you can index your collections by a value in the related entity. +This is a first step towards full ordered hashmap support through the Doctrine ORM. +The feature works like an implicit ``INDEX BY`` for the selected association but has several +downsides also: + +- You have to manage both the key and field if you want to change the index by field value. +- On each request the keys are regenerated from the field value not from the previous collection key. +- Values of the Index-By keys are never considered during persistence, it only exists for accessing purposes. +- Fields that are used for the index by feature **HAVE** to be unique in the database. The behavior for multiple entities + with the same index-by field value is undefined. + +As an example we will design a simple stock exchange list view. The domain consists of the entity ``Stock`` +and ``Market`` where each Stock has a symbol and is traded on a single market. Instead of having a numerical +list of stocks traded on a market they will be indexed by their symbol, which is unique across all markets. + +Mapping Indexed Associations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can map indexed associations by adding: + + * ``indexBy`` attribute to any ``@OneToMany`` or ``@ManyToMany`` annotation. + * ``index-by`` attribute to any ```` or ```` xml element. + * ``indexBy:`` key-value pair to any association defined in ``manyToMany:`` or ``oneToMany:`` YAML mapping files. + +The code and mappings for the Market entity looks like this: + +.. configuration-block:: + .. code-block:: php + + name = $name; + $this->stocks = new ArrayCollection(); + } + + public function getId() + { + return $this->id; + } + + public function getName() + { + return $this->name; + } + + public function addStock(Stock $stock) + { + $this->stocks[$stock->getSymbol()] = $stock; + } + + public function getStock($symbol) + { + if (!isset($this->stocks[$symbol])) { + throw new \InvalidArgumentException("Symbol is not traded on this market."); + } + + return $this->stocks[$symbol]; + } + + public function getStocks() + { + return $this->stocks->toArray(); + } + } + + .. code-block:: xml + + + + + + + + + + + + + + + + .. code-block:: yaml + + Doctrine\Tests\Models\StockExchange\Market: + type: entity + id: + id: + type: integer + generator: + strategy: AUTO + fields: + name: + type:string + oneToMany: + stocks: + targetEntity: Stock + mappedBy: market + indexBy: symbol + +Inside the ``addStock()`` method you can see how we directly set the key of the association to the symbol, +so that we can work with the indexed association directly after invoking ``addStock()``. Inside ``getStock($symbol)`` +we pick a stock traded on the particular market by symbol. If this stock doesn't exist an exception is thrown. + +The ``Stock`` entity doesn't contain any special instructions that are new, but for completeness +here are the code and mappings for it: + +.. configuration-block:: + .. code-block:: php + + symbol = $symbol; + $this->market = $market; + $market->addStock($this); + } + + public function getSymbol() + { + return $this->symbol; + } + } + + .. code-block:: xml + + + + + + + + + + + + + + + .. code-block:: yaml + + Doctrine\Tests\Models\StockExchange\Stock: + type: entity + id: + id: + type: integer + generator: + strategy: AUTO + fields: + symbol: + type: string + manyToOne: + market: + targetEntity: Market + inversedBy: stocks + +Querying indexed associations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Now that we defined the stocks collection to be indexed by symbol we can take a look at some code, +that makes use of the indexing. + +First we will populate our database with two example stocks traded on a single market: + +.. code-block:: php + + persist($market); + $em->persist($stock1); + $em->persist($stock2); + $em->flush(); + +This code is not particular interesting since the indexing feature is not yet used. In a new request we could +now query for the market: + +.. code-block:: php + + find("Doctrine\Tests\Models\StockExchange\Market", $marketId); + + // Access the stocks by symbol now: + $stock = $market->getStock($symbol); + + echo $stock->getSymbol(); // will print "AAPL" + +The implementation ``Market::addStock()`` in combination with ``indexBy`` allows to access the collection +consistently by the Stock symbol. It does not matter if Stock is managed by Doctrine or not. + +The same applies to DQL queries: The ``indexBy`` configuration acts as implicit "INDEX BY" to a join association. + +.. code-block:: php + + createQuery($dql) + ->setParameter(1, $marketId) + ->getSingleResult(); + + // Access the stocks by symbol now: + $stock = $market->getStock($symbol); + + echo $stock->getSymbol(); // will print "AAPL" + +If you want to use ``INDEX BY`` explicitly on an indexed association you are free to do so. Additionally +indexed associations also work with the ``Collection::slice()`` functionality, no matter if marked as +LAZY or EXTRA_LAZY. + +Outlook into the Future +~~~~~~~~~~~~~~~~~~~~~~~ + +For the inverse side of a many-to-many associations there will be a way to persist the keys and the order +as a third and fourth parameter into the join table. This feature is discussed in `DDC-213 `_ +This feature cannot be implemented for One-To-Many associations, because they are never the owning side. + diff --git a/vendor/doctrine/orm/doctrine-mapping.xsd b/vendor/doctrine/orm/doctrine-mapping.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6a7e2a284833526326c50d1da4fce1f96c1dc65f --- /dev/null +++ b/vendor/doctrine/orm/doctrine-mapping.xsd @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php b/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php new file mode 100644 index 0000000000000000000000000000000000000000..7ac726f466a5c400b8b5f709244c5c74344a3d28 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php @@ -0,0 +1,1142 @@ +. + */ + +namespace Doctrine\ORM; + +use Doctrine\Common\Util\ClassUtils; +use Doctrine\Common\Collections\Collection; +use Doctrine\Common\Collections\ArrayCollection; + +use Doctrine\ORM\Query\Parameter; +use Doctrine\ORM\Cache\QueryCacheKey; +use Doctrine\DBAL\Cache\QueryCacheProfile; + +use Doctrine\ORM\Cache; +use Doctrine\ORM\Query\ResultSetMapping; + +/** + * Base contract for ORM queries. Base class for Query and NativeQuery. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Konsta Vesterinen + */ +abstract class AbstractQuery +{ + /* Hydration mode constants */ + + /** + * Hydrates an object graph. This is the default behavior. + */ + const HYDRATE_OBJECT = 1; + + /** + * Hydrates an array graph. + */ + const HYDRATE_ARRAY = 2; + + /** + * Hydrates a flat, rectangular result set with scalar values. + */ + const HYDRATE_SCALAR = 3; + + /** + * Hydrates a single scalar value. + */ + const HYDRATE_SINGLE_SCALAR = 4; + + /** + * Very simple object hydrator (optimized for performance). + */ + const HYDRATE_SIMPLEOBJECT = 5; + + /** + * The parameter map of this query. + * + * @var \Doctrine\Common\Collections\ArrayCollection + */ + protected $parameters; + + /** + * The user-specified ResultSetMapping to use. + * + * @var \Doctrine\ORM\Query\ResultSetMapping + */ + protected $_resultSetMapping; + + /** + * The entity manager used by this query object. + * + * @var EntityManagerInterface + */ + protected $_em; + + /** + * The map of query hints. + * + * @var array + */ + protected $_hints = array(); + + /** + * The hydration mode. + * + * @var integer + */ + protected $_hydrationMode = self::HYDRATE_OBJECT; + + /** + * @param \Doctrine\DBAL\Cache\QueryCacheProfile + */ + protected $_queryCacheProfile; + + /** + * Whether or not expire the result cache. + * + * @var boolean + */ + protected $_expireResultCache = false; + + /** + * @param \Doctrine\DBAL\Cache\QueryCacheProfile + */ + protected $_hydrationCacheProfile; + + /** + * Whether to use second level cache, if available. + * + * @var boolean + */ + protected $cacheable = false; + + /** + * @var boolean + */ + protected $hasCache = false; + + /** + * Second level cache region name. + * + * @var string|null + */ + protected $cacheRegion; + + /** + * Second level query cache mode. + * + * @var integer|null + */ + protected $cacheMode; + + /** + * @var \Doctrine\ORM\Cache\Logging\CacheLogger|null + */ + protected $cacheLogger; + + /** + * @var integer + */ + protected $lifetime = 0; + + /** + * Initializes a new instance of a class derived from AbstractQuery. + * + * @param \Doctrine\ORM\EntityManagerInterface $em + */ + public function __construct(EntityManagerInterface $em) + { + $this->_em = $em; + $this->parameters = new ArrayCollection(); + $this->_hints = $em->getConfiguration()->getDefaultQueryHints(); + $this->hasCache = $this->_em->getConfiguration()->isSecondLevelCacheEnabled(); + + if ($this->hasCache) { + $this->cacheLogger = $em->getConfiguration() + ->getSecondLevelCacheConfiguration() + ->getCacheLogger(); + } + } + + /** + * + * Enable/disable second level query (result) caching for this query. + * + * @param boolean $cacheable + * + * @return static This query instance. + */ + public function setCacheable($cacheable) + { + $this->cacheable = (boolean) $cacheable; + + return $this; + } + + /** + * @return boolean TRUE if the query results are enable for second level cache, FALSE otherwise. + */ + public function isCacheable() + { + return $this->cacheable; + } + + /** + * @param string $cacheRegion + * + * @return static This query instance. + */ + public function setCacheRegion($cacheRegion) + { + $this->cacheRegion = (string) $cacheRegion; + + return $this; + } + + /** + * Obtain the name of the second level query cache region in which query results will be stored + * + * @return The cache region name; NULL indicates the default region. + */ + public function getCacheRegion() + { + return $this->cacheRegion; + } + + /** + * @return boolean TRUE if the query cache and second level cache are enabled, FALSE otherwise. + */ + protected function isCacheEnabled() + { + return $this->cacheable && $this->hasCache; + } + + /** + * @return integer + */ + public function getLifetime() + { + return $this->lifetime; + } + + /** + * Sets the life-time for this query into second level cache. + * + * @param integer $lifetime + * + * @return static This query instance. + */ + public function setLifetime($lifetime) + { + $this->lifetime = (integer) $lifetime; + + return $this; + } + + /** + * @return integer + */ + public function getCacheMode() + { + return $this->cacheMode; + } + + /** + * @param integer $cacheMode + * + * @return static This query instance. + */ + public function setCacheMode($cacheMode) + { + $this->cacheMode = (integer) $cacheMode; + + return $this; + } + + /** + * Gets the SQL query that corresponds to this query object. + * The returned SQL syntax depends on the connection driver that is used + * by this query object at the time of this method call. + * + * @return string SQL query + */ + abstract public function getSQL(); + + /** + * Retrieves the associated EntityManager of this Query instance. + * + * @return \Doctrine\ORM\EntityManager + */ + public function getEntityManager() + { + return $this->_em; + } + + /** + * Frees the resources used by the query object. + * + * Resets Parameters, Parameter Types and Query Hints. + * + * @return void + */ + public function free() + { + $this->parameters = new ArrayCollection(); + + $this->_hints = $this->_em->getConfiguration()->getDefaultQueryHints(); + } + + /** + * Get all defined parameters. + * + * @return \Doctrine\Common\Collections\ArrayCollection The defined query parameters. + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Gets a query parameter. + * + * @param mixed $key The key (index or name) of the bound parameter. + * + * @return Query\Parameter|null The value of the bound parameter, or NULL if not available. + */ + public function getParameter($key) + { + $filteredParameters = $this->parameters->filter( + function ($parameter) use ($key) + { + // Must not be identical because of string to integer conversion + return ($key == $parameter->getName()); + } + ); + + return count($filteredParameters) ? $filteredParameters->first() : null; + } + + /** + * Sets a collection of query parameters. + * + * @param \Doctrine\Common\Collections\ArrayCollection|array $parameters + * + * @return static This query instance. + */ + public function setParameters($parameters) + { + // BC compatibility with 2.3- + if (is_array($parameters)) { + $parameterCollection = new ArrayCollection(); + + foreach ($parameters as $key => $value) { + $parameterCollection->add(new Parameter($key, $value)); + } + + $parameters = $parameterCollection; + } + + $this->parameters = $parameters; + + return $this; + } + + /** + * Sets a query parameter. + * + * @param string|int $key The parameter position or name. + * @param mixed $value The parameter value. + * @param string|null $type The parameter type. If specified, the given value will be run through + * the type conversion of this type. This is usually not needed for + * strings and numeric types. + * + * @return static This query instance. + */ + public function setParameter($key, $value, $type = null) + { + $filteredParameters = $this->parameters->filter( + function ($parameter) use ($key) + { + // Must not be identical because of string to integer conversion + return ($key == $parameter->getName()); + } + ); + + if (count($filteredParameters)) { + $parameter = $filteredParameters->first(); + $parameter->setValue($value, $type); + + return $this; + } + + $this->parameters->add(new Parameter($key, $value, $type)); + + return $this; + } + + /** + * Processes an individual parameter value. + * + * @param mixed $value + * + * @return array + * + * @throws \Doctrine\ORM\ORMInvalidArgumentException + */ + public function processParameterValue($value) + { + if (is_scalar($value)) { + return $value; + } + + if ($value instanceof Collection) { + $value = $value->toArray(); + } + + if (is_array($value)) { + foreach ($value as $key => $paramValue) { + $paramValue = $this->processParameterValue($paramValue); + $value[$key] = is_array($paramValue) ? reset($paramValue) : $paramValue; + } + + return $value; + } + + if (is_object($value) && $this->_em->getMetadataFactory()->hasMetadataFor(ClassUtils::getClass($value))) { + $value = $this->_em->getUnitOfWork()->getSingleIdentifierValue($value); + + if ($value === null) { + throw ORMInvalidArgumentException::invalidIdentifierBindingEntity(); + } + } + + if ($value instanceof Mapping\ClassMetadata) { + return $value->name; + } + + return $value; + } + + /** + * Sets the ResultSetMapping that should be used for hydration. + * + * @param \Doctrine\ORM\Query\ResultSetMapping $rsm + * + * @return static This query instance. + */ + public function setResultSetMapping(Query\ResultSetMapping $rsm) + { + $this->translateNamespaces($rsm); + $this->_resultSetMapping = $rsm; + + return $this; + } + + /** + * Gets the ResultSetMapping used for hydration. + * + * @return \Doctrine\ORM\Query\ResultSetMapping + */ + protected function getResultSetMapping() + { + return $this->_resultSetMapping; + } + + /** + * Allows to translate entity namespaces to full qualified names. + * + * @param Query\ResultSetMapping $rsm + * + * @return void + */ + private function translateNamespaces(Query\ResultSetMapping $rsm) + { + $translate = function ($alias) { + return $this->_em->getClassMetadata($alias)->getName(); + }; + + $rsm->aliasMap = array_map($translate, $rsm->aliasMap); + $rsm->declaringClasses = array_map($translate, $rsm->declaringClasses); + } + + /** + * Set a cache profile for hydration caching. + * + * If no result cache driver is set in the QueryCacheProfile, the default + * result cache driver is used from the configuration. + * + * Important: Hydration caching does NOT register entities in the + * UnitOfWork when retrieved from the cache. Never use result cached + * entities for requests that also flush the EntityManager. If you want + * some form of caching with UnitOfWork registration you should use + * {@see AbstractQuery::setResultCacheProfile()}. + * + * @example + * $lifetime = 100; + * $resultKey = "abc"; + * $query->setHydrationCacheProfile(new QueryCacheProfile()); + * $query->setHydrationCacheProfile(new QueryCacheProfile($lifetime, $resultKey)); + * + * @param \Doctrine\DBAL\Cache\QueryCacheProfile $profile + * + * @return static This query instance. + */ + public function setHydrationCacheProfile(QueryCacheProfile $profile = null) + { + if ( ! $profile->getResultCacheDriver()) { + $resultCacheDriver = $this->_em->getConfiguration()->getHydrationCacheImpl(); + $profile = $profile->setResultCacheDriver($resultCacheDriver); + } + + $this->_hydrationCacheProfile = $profile; + + return $this; + } + + /** + * @return \Doctrine\DBAL\Cache\QueryCacheProfile + */ + public function getHydrationCacheProfile() + { + return $this->_hydrationCacheProfile; + } + + /** + * Set a cache profile for the result cache. + * + * If no result cache driver is set in the QueryCacheProfile, the default + * result cache driver is used from the configuration. + * + * @param \Doctrine\DBAL\Cache\QueryCacheProfile $profile + * + * @return static This query instance. + */ + public function setResultCacheProfile(QueryCacheProfile $profile = null) + { + if ( ! $profile->getResultCacheDriver()) { + $resultCacheDriver = $this->_em->getConfiguration()->getResultCacheImpl(); + $profile = $profile->setResultCacheDriver($resultCacheDriver); + } + + $this->_queryCacheProfile = $profile; + + return $this; + } + + /** + * Defines a cache driver to be used for caching result sets and implicitly enables caching. + * + * @param \Doctrine\Common\Cache\Cache|null $resultCacheDriver Cache driver + * + * @return static This query instance. + * + * @throws ORMException + */ + public function setResultCacheDriver($resultCacheDriver = null) + { + if ($resultCacheDriver !== null && ! ($resultCacheDriver instanceof \Doctrine\Common\Cache\Cache)) { + throw ORMException::invalidResultCacheDriver(); + } + + $this->_queryCacheProfile = $this->_queryCacheProfile + ? $this->_queryCacheProfile->setResultCacheDriver($resultCacheDriver) + : new QueryCacheProfile(0, null, $resultCacheDriver); + + return $this; + } + + /** + * Returns the cache driver used for caching result sets. + * + * @deprecated + * + * @return \Doctrine\Common\Cache\Cache Cache driver + */ + public function getResultCacheDriver() + { + if ($this->_queryCacheProfile && $this->_queryCacheProfile->getResultCacheDriver()) { + return $this->_queryCacheProfile->getResultCacheDriver(); + } + + return $this->_em->getConfiguration()->getResultCacheImpl(); + } + + /** + * Set whether or not to cache the results of this query and if so, for + * how long and which ID to use for the cache entry. + * + * @param boolean $bool + * @param integer $lifetime + * @param string $resultCacheId + * + * @return static This query instance. + */ + public function useResultCache($bool, $lifetime = null, $resultCacheId = null) + { + if ($bool) { + $this->setResultCacheLifetime($lifetime); + $this->setResultCacheId($resultCacheId); + + return $this; + } + + $this->_queryCacheProfile = null; + + return $this; + } + + /** + * Defines how long the result cache will be active before expire. + * + * @param integer $lifetime How long the cache entry is valid. + * + * @return static This query instance. + */ + public function setResultCacheLifetime($lifetime) + { + $lifetime = ($lifetime !== null) ? (int) $lifetime : 0; + + $this->_queryCacheProfile = $this->_queryCacheProfile + ? $this->_queryCacheProfile->setLifetime($lifetime) + : new QueryCacheProfile($lifetime, null, $this->_em->getConfiguration()->getResultCacheImpl()); + + return $this; + } + + /** + * Retrieves the lifetime of resultset cache. + * + * @deprecated + * + * @return integer + */ + public function getResultCacheLifetime() + { + return $this->_queryCacheProfile ? $this->_queryCacheProfile->getLifetime() : 0; + } + + /** + * Defines if the result cache is active or not. + * + * @param boolean $expire Whether or not to force resultset cache expiration. + * + * @return static This query instance. + */ + public function expireResultCache($expire = true) + { + $this->_expireResultCache = $expire; + + return $this; + } + + /** + * Retrieves if the resultset cache is active or not. + * + * @return boolean + */ + public function getExpireResultCache() + { + return $this->_expireResultCache; + } + + /** + * @return QueryCacheProfile + */ + public function getQueryCacheProfile() + { + return $this->_queryCacheProfile; + } + + /** + * Change the default fetch mode of an association for this query. + * + * $fetchMode can be one of ClassMetadata::FETCH_EAGER or ClassMetadata::FETCH_LAZY + * + * @param string $class + * @param string $assocName + * @param int $fetchMode + * + * @return static This query instance. + */ + public function setFetchMode($class, $assocName, $fetchMode) + { + if ($fetchMode !== Mapping\ClassMetadata::FETCH_EAGER) { + $fetchMode = Mapping\ClassMetadata::FETCH_LAZY; + } + + $this->_hints['fetchMode'][$class][$assocName] = $fetchMode; + + return $this; + } + + /** + * Defines the processing mode to be used during hydration / result set transformation. + * + * @param integer $hydrationMode Doctrine processing mode to be used during hydration process. + * One of the Query::HYDRATE_* constants. + * + * @return static This query instance. + */ + public function setHydrationMode($hydrationMode) + { + $this->_hydrationMode = $hydrationMode; + + return $this; + } + + /** + * Gets the hydration mode currently used by the query. + * + * @return integer + */ + public function getHydrationMode() + { + return $this->_hydrationMode; + } + + /** + * Gets the list of results for the query. + * + * Alias for execute(null, $hydrationMode = HYDRATE_OBJECT). + * + * @param int $hydrationMode + * + * @return array + */ + public function getResult($hydrationMode = self::HYDRATE_OBJECT) + { + return $this->execute(null, $hydrationMode); + } + + /** + * Gets the array of results for the query. + * + * Alias for execute(null, HYDRATE_ARRAY). + * + * @return array + */ + public function getArrayResult() + { + return $this->execute(null, self::HYDRATE_ARRAY); + } + + /** + * Gets the scalar results for the query. + * + * Alias for execute(null, HYDRATE_SCALAR). + * + * @return array + */ + public function getScalarResult() + { + return $this->execute(null, self::HYDRATE_SCALAR); + } + + /** + * Get exactly one result or null. + * + * @param int $hydrationMode + * + * @return mixed + * + * @throws NonUniqueResultException + */ + public function getOneOrNullResult($hydrationMode = null) + { + try { + $result = $this->execute(null, $hydrationMode); + } catch (NoResultException $e) { + return null; + } + + + if ($this->_hydrationMode !== self::HYDRATE_SINGLE_SCALAR && ! $result) { + return null; + } + + if ( ! is_array($result)) { + return $result; + } + + if (count($result) > 1) { + throw new NonUniqueResultException; + } + + return array_shift($result); + } + + /** + * Gets the single result of the query. + * + * Enforces the presence as well as the uniqueness of the result. + * + * If the result is not unique, a NonUniqueResultException is thrown. + * If there is no result, a NoResultException is thrown. + * + * @param integer $hydrationMode + * + * @return mixed + * + * @throws NonUniqueResultException If the query result is not unique. + * @throws NoResultException If the query returned no result. + */ + public function getSingleResult($hydrationMode = null) + { + $result = $this->execute(null, $hydrationMode); + + if ($this->_hydrationMode !== self::HYDRATE_SINGLE_SCALAR && ! $result) { + throw new NoResultException; + } + + if ( ! is_array($result)) { + return $result; + } + + if (count($result) > 1) { + throw new NonUniqueResultException; + } + + return array_shift($result); + } + + /** + * Gets the single scalar result of the query. + * + * Alias for getSingleResult(HYDRATE_SINGLE_SCALAR). + * + * @return mixed + * + * @throws NonUniqueResultException If the query result is not unique. + * @throws NoResultException If the query returned no result. + */ + public function getSingleScalarResult() + { + return $this->getSingleResult(self::HYDRATE_SINGLE_SCALAR); + } + + /** + * Sets a query hint. If the hint name is not recognized, it is silently ignored. + * + * @param string $name The name of the hint. + * @param mixed $value The value of the hint. + * + * @return static This query instance. + */ + public function setHint($name, $value) + { + $this->_hints[$name] = $value; + + return $this; + } + + /** + * Gets the value of a query hint. If the hint name is not recognized, FALSE is returned. + * + * @param string $name The name of the hint. + * + * @return mixed The value of the hint or FALSE, if the hint name is not recognized. + */ + public function getHint($name) + { + return isset($this->_hints[$name]) ? $this->_hints[$name] : false; + } + + /** + * Check if the query has a hint + * + * @param string $name The name of the hint + * + * @return bool False if the query does not have any hint + */ + public function hasHint($name) + { + return isset($this->_hints[$name]); + } + + /** + * Return the key value map of query hints that are currently set. + * + * @return array + */ + public function getHints() + { + return $this->_hints; + } + + /** + * Executes the query and returns an IterableResult that can be used to incrementally + * iterate over the result. + * + * @param ArrayCollection|array|null $parameters The query parameters. + * @param integer|null $hydrationMode The hydration mode to use. + * + * @return \Doctrine\ORM\Internal\Hydration\IterableResult + */ + public function iterate($parameters = null, $hydrationMode = null) + { + if ($hydrationMode !== null) { + $this->setHydrationMode($hydrationMode); + } + + if ( ! empty($parameters)) { + $this->setParameters($parameters); + } + + $rsm = $this->getResultSetMapping(); + $stmt = $this->_doExecute(); + + return $this->_em->newHydrator($this->_hydrationMode)->iterate($stmt, $rsm, $this->_hints); + } + + /** + * Executes the query. + * + * @param ArrayCollection|array|null $parameters Query parameters. + * @param integer|null $hydrationMode Processing mode to be used during the hydration process. + * + * @return mixed + */ + public function execute($parameters = null, $hydrationMode = null) + { + if ($this->cacheable && $this->isCacheEnabled()) { + return $this->executeUsingQueryCache($parameters, $hydrationMode); + } + + return $this->executeIgnoreQueryCache($parameters, $hydrationMode); + } + + /** + * Execute query ignoring second level cache. + * + * @param ArrayCollection|array|null $parameters + * @param integer|null $hydrationMode + * + * @return mixed + */ + private function executeIgnoreQueryCache($parameters = null, $hydrationMode = null) + { + if ($hydrationMode !== null) { + $this->setHydrationMode($hydrationMode); + } + + if ( ! empty($parameters)) { + $this->setParameters($parameters); + } + + $setCacheEntry = function() {}; + + if ($this->_hydrationCacheProfile !== null) { + list($cacheKey, $realCacheKey) = $this->getHydrationCacheId(); + + $queryCacheProfile = $this->getHydrationCacheProfile(); + $cache = $queryCacheProfile->getResultCacheDriver(); + $result = $cache->fetch($cacheKey); + + if (isset($result[$realCacheKey])) { + return $result[$realCacheKey]; + } + + if ( ! $result) { + $result = array(); + } + + $setCacheEntry = function($data) use ($cache, $result, $cacheKey, $realCacheKey, $queryCacheProfile) { + $result[$realCacheKey] = $data; + + $cache->save($cacheKey, $result, $queryCacheProfile->getLifetime()); + }; + } + + $stmt = $this->_doExecute(); + + if (is_numeric($stmt)) { + $setCacheEntry($stmt); + + return $stmt; + } + + $rsm = $this->getResultSetMapping(); + $data = $this->_em->newHydrator($this->_hydrationMode)->hydrateAll($stmt, $rsm, $this->_hints); + + $setCacheEntry($data); + + return $data; + } + + /** + * Load from second level cache or executes the query and put into cache. + * + * @param ArrayCollection|array|null $parameters + * @param integer|null $hydrationMode + * + * @return mixed + */ + private function executeUsingQueryCache($parameters = null, $hydrationMode = null) + { + $rsm = $this->getResultSetMapping(); + $queryCache = $this->_em->getCache()->getQueryCache($this->cacheRegion); + $queryKey = new QueryCacheKey( + $this->getHash(), + $this->lifetime, + $this->cacheMode ?: Cache::MODE_NORMAL, + $this->getTimestampKey() + ); + + $result = $queryCache->get($queryKey, $rsm, $this->_hints); + + if ($result !== null) { + if ($this->cacheLogger) { + $this->cacheLogger->queryCacheHit($queryCache->getRegion()->getName(), $queryKey); + } + + return $result; + } + + $result = $this->executeIgnoreQueryCache($parameters, $hydrationMode); + $cached = $queryCache->put($queryKey, $rsm, $result, $this->_hints); + + if ($this->cacheLogger) { + $this->cacheLogger->queryCacheMiss($queryCache->getRegion()->getName(), $queryKey); + + if ($cached) { + $this->cacheLogger->queryCachePut($queryCache->getRegion()->getName(), $queryKey); + } + } + + return $result; + } + + /** + * @return \Doctrine\ORM\Cache\TimestampCacheKey|null + */ + private function getTimestampKey() + { + $entityName = reset($this->_resultSetMapping->aliasMap); + + if (empty($entityName)) { + return null; + } + + $metadata = $this->_em->getClassMetadata($entityName); + + return new Cache\TimestampCacheKey($metadata->rootEntityName); + } + + /** + * Get the result cache id to use to store the result set cache entry. + * Will return the configured id if it exists otherwise a hash will be + * automatically generated for you. + * + * @return array ($key, $hash) + */ + protected function getHydrationCacheId() + { + $parameters = array(); + + foreach ($this->getParameters() as $parameter) { + $parameters[$parameter->getName()] = $this->processParameterValue($parameter->getValue()); + } + + $sql = $this->getSQL(); + $queryCacheProfile = $this->getHydrationCacheProfile(); + $hints = $this->getHints(); + $hints['hydrationMode'] = $this->getHydrationMode(); + + ksort($hints); + + return $queryCacheProfile->generateCacheKeys($sql, $parameters, $hints); + } + + /** + * Set the result cache id to use to store the result set cache entry. + * If this is not explicitly set by the developer then a hash is automatically + * generated for you. + * + * @param string $id + * + * @return static This query instance. + */ + public function setResultCacheId($id) + { + $this->_queryCacheProfile = $this->_queryCacheProfile + ? $this->_queryCacheProfile->setCacheKey($id) + : new QueryCacheProfile(0, $id, $this->_em->getConfiguration()->getResultCacheImpl()); + + return $this; + } + + /** + * Get the result cache id to use to store the result set cache entry if set. + * + * @deprecated + * + * @return string + */ + public function getResultCacheId() + { + return $this->_queryCacheProfile ? $this->_queryCacheProfile->getCacheKey() : null; + } + + /** + * Executes the query and returns a the resulting Statement object. + * + * @return \Doctrine\DBAL\Driver\Statement The executed database statement that holds the results. + */ + abstract protected function _doExecute(); + + /** + * Cleanup Query resource when clone is called. + * + * @return void + */ + public function __clone() + { + $this->parameters = new ArrayCollection(); + + $this->_hints = array(); + $this->_hints = $this->_em->getConfiguration()->getDefaultQueryHints(); + } + + /** + * Generates a string of currently query to use for the cache second level cache. + * + * @return string + */ + protected function getHash() + { + $query = $this->getSQL(); + $hints = $this->getHints(); + $params = array_map(function(Parameter $parameter) { + // Small optimization + // Does not invoke processParameterValue for scalar values + if (is_scalar($value = $parameter->getValue())) { + return $value; + } + + return $this->processParameterValue($value); + }, $this->parameters->getValues()); + + ksort($hints); + + return sha1($query . '-' . serialize($params) . '-' . serialize($hints)); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache.php new file mode 100644 index 0000000000000000000000000000000000000000..3da7c05ef4ec6ec478b4c3a655408576d10e0ca7 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache.php @@ -0,0 +1,178 @@ +. + */ + +namespace Doctrine\ORM; + +/** + * Provides an API for querying/managing the second level cache regions. + * + * @since 2.5 + * @author Fabio B. Silva + */ +interface Cache +{ + const DEFAULT_QUERY_REGION_NAME = 'query_cache_region'; + + const DEFAULT_TIMESTAMP_REGION_NAME = 'timestamp_cache_region'; + + /** + * May read items from the cache, but will not add items. + */ + const MODE_GET = 1; + + /** + * Will never read items from the cache, + * but will add items to the cache as it reads them from the database. + */ + const MODE_PUT = 2; + + /** + * May read items from the cache, and add items to the cache. + */ + const MODE_NORMAL = 3; + + /** + * The query will never read items from the cache, + * but will refresh items to the cache as it reads them from the database. + */ + const MODE_REFRESH = 4; + + /** + * @param string $className The entity class. + * + * @return \Doctrine\ORM\Cache\Region|null + */ + public function getEntityCacheRegion($className); + + /** + * @param string $className The entity class. + * @param string $association The field name that represents the association. + * + * @return \Doctrine\ORM\Cache\Region|null + */ + public function getCollectionCacheRegion($className, $association); + + /** + * Determine whether the cache contains data for the given entity "instance". + * + * @param string $className The entity class. + * @param mixed $identifier The entity identifier + * + * @return boolean true if the underlying cache contains corresponding data; false otherwise. + */ + public function containsEntity($className, $identifier); + + /** + * Evicts the entity data for a particular entity "instance". + * + * @param string $className The entity class. + * @param mixed $identifier The entity identifier. + * + * @return void + */ + public function evictEntity($className, $identifier); + + /** + * Evicts all entity data from the given region. + * + * @param string $className The entity metadata. + * + * @return void + */ + public function evictEntityRegion($className); + + /** + * Evict data from all entity regions. + * + * @return void + */ + public function evictEntityRegions(); + + /** + * Determine whether the cache contains data for the given collection. + * + * @param string $className The entity class. + * @param string $association The field name that represents the association. + * @param mixed $ownerIdentifier The identifier of the owning entity. + * + * @return boolean true if the underlying cache contains corresponding data; false otherwise. + */ + public function containsCollection($className, $association, $ownerIdentifier); + + /** + * Evicts the cache data for the given identified collection instance. + * + * @param string $className The entity class. + * @param string $association The field name that represents the association. + * @param mixed $ownerIdentifier The identifier of the owning entity. + * + * @return void + */ + public function evictCollection($className, $association, $ownerIdentifier); + + /** + * Evicts all entity data from the given region. + * + * @param string $className The entity class. + * @param string $association The field name that represents the association. + * + * @return void + */ + public function evictCollectionRegion($className, $association); + + /** + * Evict data from all collection regions. + * + * @return void + */ + public function evictCollectionRegions(); + + /** + * Determine whether the cache contains data for the given query. + * + * @param string $regionName The cache name given to the query. + * + * @return boolean true if the underlying cache contains corresponding data; false otherwise. + */ + public function containsQuery($regionName); + + /** + * Evicts all cached query results under the given name, or default query cache if the region name is NULL. + * + * @param string|null $regionName The cache name associated to the queries being cached. + */ + public function evictQueryRegion($regionName = null); + + /** + * Evict data from all query regions. + * + * @return void + */ + public function evictQueryRegions(); + + /** + * Get query cache by region name or create a new one if none exist. + * + * @param string|null $regionName Query cache region name, or default query cache if the region name is NULL. + * + * @return \Doctrine\ORM\Cache\QueryCache The Query Cache associated with the region name. + */ + public function getQueryCache($regionName = null); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/AssociationCacheEntry.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/AssociationCacheEntry.php new file mode 100644 index 0000000000000000000000000000000000000000..3aee1096bfc2ae505ee686b4c65ad445a11bb3f8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/AssociationCacheEntry.php @@ -0,0 +1,66 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Association cache entry + * + * @since 2.5 + * @author Fabio B. Silva + */ +class AssociationCacheEntry implements CacheEntry +{ + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var array The entity identifier + */ + public $identifier; + + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var string The entity class name + */ + public $class; + + /** + * @param string $class The entity class. + * @param array $identifier The entity identifier. + */ + public function __construct($class, array $identifier) + { + $this->class = $class; + $this->identifier = $identifier; + } + + /** + * Creates a new AssociationCacheEntry + * + * This method allow Doctrine\Common\Cache\PhpFileCache compatibility + * + * @param array $values array containing property values + */ + public static function __set_state(array $values) + { + return new self($values['class'], $values['identifier']); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheConfiguration.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheConfiguration.php new file mode 100644 index 0000000000000000000000000000000000000000..eb3ec428df38463c31c1a08208cab34666085ce0 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheConfiguration.php @@ -0,0 +1,128 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\ORM\Cache\Logging\CacheLogger; + +/** + * Configuration container for second-level cache. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class CacheConfiguration +{ + /** + * @var \Doctrine\ORM\Cache\CacheFactory|null + */ + private $cacheFactory; + + /** + * @var \Doctrine\ORM\Cache\RegionsConfiguration|null + */ + private $regionsConfig; + + /** + * @var \Doctrine\ORM\Cache\Logging\CacheLogger|null + */ + private $cacheLogger; + + /** + * @var \Doctrine\ORM\Cache\QueryCacheValidator|null + */ + private $queryValidator; + + /** + * @return \Doctrine\ORM\Cache\CacheFactory|null + */ + public function getCacheFactory() + { + return $this->cacheFactory; + } + + /** + * @param \Doctrine\ORM\Cache\CacheFactory $factory + * + * @return void + */ + public function setCacheFactory(CacheFactory $factory) + { + $this->cacheFactory = $factory; + } + + /** + * @return \Doctrine\ORM\Cache\Logging\CacheLogger|null + */ + public function getCacheLogger() + { + return $this->cacheLogger; + } + + /** + * @param \Doctrine\ORM\Cache\Logging\CacheLogger $logger + */ + public function setCacheLogger(CacheLogger $logger) + { + $this->cacheLogger = $logger; + } + + /** + * @return \Doctrine\ORM\Cache\RegionsConfiguration + */ + public function getRegionsConfiguration() + { + if ($this->regionsConfig === null) { + $this->regionsConfig = new RegionsConfiguration(); + } + + return $this->regionsConfig; + } + + /** + * @param \Doctrine\ORM\Cache\RegionsConfiguration $regionsConfig + */ + public function setRegionsConfiguration(RegionsConfiguration $regionsConfig) + { + $this->regionsConfig = $regionsConfig; + } + + /** + * @return \Doctrine\ORM\Cache\QueryCacheValidator + */ + public function getQueryValidator() + { + if ($this->queryValidator === null) { + $this->queryValidator = new TimestampQueryCacheValidator( + $this->cacheFactory->getTimestampRegion() + ); + } + + return $this->queryValidator; + } + + /** + * @param \Doctrine\ORM\Cache\QueryCacheValidator $validator + */ + public function setQueryValidator(QueryCacheValidator $validator) + { + $this->queryValidator = $validator; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheEntry.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheEntry.php new file mode 100644 index 0000000000000000000000000000000000000000..c34b0ff9b00a9f3810c158f17ffd484b72279f11 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheEntry.php @@ -0,0 +1,36 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Cache entry interface + * + * IMPORTANT NOTE: + * + * Fields of classes that implement CacheEntry are public for performance reason. + * + * @since 2.5 + * @author Fabio B. Silva + */ +interface CacheEntry +{ + +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheException.php new file mode 100644 index 0000000000000000000000000000000000000000..5b548fe5ec724710947b4b417d64b11070848b13 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheException.php @@ -0,0 +1,72 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\ORM\ORMException; + +/** + * Exception for cache. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class CacheException extends ORMException +{ + /** + * @param string $sourceEntity + * @param string $fieldName + * + * @return \Doctrine\ORM\Cache\CacheException + */ + public static function updateReadOnlyCollection($sourceEntity, $fieldName) + { + return new self(sprintf('Cannot update a readonly collection "%s#%s"', $sourceEntity, $fieldName)); + } + + /** + * @param string $entityName + * + * @return \Doctrine\ORM\Cache\CacheException + */ + public static function updateReadOnlyEntity($entityName) + { + return new self(sprintf('Cannot update a readonly entity "%s"', $entityName)); + } + + /** + * @param string $entityName + * + * @return \Doctrine\ORM\Cache\CacheException + */ + public static function nonCacheableEntity($entityName) + { + return new self(sprintf('Entity "%s" not configured as part of the second-level cache.', $entityName)); + } + + /** + * @param string $entityName + * + * @return \Doctrine\ORM\Cache\CacheException + */ + public static function nonCacheableEntityAssociation($entityName, $field) + { + return new self(sprintf('Entity association field "%s#%s" not configured as part of the second-level cache.', $entityName, $field)); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheFactory.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..b915100623a9cb3c058cc9d7c8502b320a6b4297 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheFactory.php @@ -0,0 +1,112 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Persisters\Collection\CollectionPersister; +use Doctrine\ORM\Persisters\Entity\EntityPersister; + +/** + * Contract for building second level cache regions components. + * + * @since 2.5 + * @author Fabio B. Silva + */ +interface CacheFactory +{ + /** + * Build an entity persister for the given entity metadata. + * + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param \Doctrine\ORM\Persisters\Entity\EntityPersister $persister The entity persister that will be cached. + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. + * + * @return \Doctrine\ORM\Cache\Persister\Entity\CachedEntityPersister + */ + public function buildCachedEntityPersister(EntityManagerInterface $em, EntityPersister $persister, ClassMetadata $metadata); + + /** + * Build a collection persister for the given relation mapping. + * + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param \Doctrine\ORM\Persisters\Collection\CollectionPersister $persister The collection persister that will be cached. + * @param array $mapping The association mapping. + * + * @return \Doctrine\ORM\Cache\Persister\Collection\CachedCollectionPersister + */ + public function buildCachedCollectionPersister(EntityManagerInterface $em, CollectionPersister $persister, array $mapping); + + /** + * Build a query cache based on the given region name + * + * @param \Doctrine\ORM\EntityManagerInterface $em The Entity manager. + * @param string $regionName The region name. + * + * @return \Doctrine\ORM\Cache\QueryCache The built query cache. + */ + public function buildQueryCache(EntityManagerInterface $em, $regionName = null); + + /** + * Build an entity hydrator + * + * @param \Doctrine\ORM\EntityManagerInterface $em The Entity manager. + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. + * + * @return \Doctrine\ORM\Cache\EntityHydrator The built entity hydrator. + */ + public function buildEntityHydrator(EntityManagerInterface $em, ClassMetadata $metadata); + + /** + * Build a collection hydrator + * + * @param \Doctrine\ORM\EntityManagerInterface $em The Entity manager. + * @param array $mapping The association mapping. + * + * @return \Doctrine\ORM\Cache\CollectionHydrator The built collection hydrator. + */ + public function buildCollectionHydrator(EntityManagerInterface $em, array $mapping); + + /** + * Build a cache region + * + * @param array $cache The cache configuration. + * + * @return \Doctrine\ORM\Cache\Region The cache region. + */ + public function getRegion(array $cache); + + /** + * Build timestamp cache region + * + * @return \Doctrine\ORM\Cache\TimestampRegion The timestamp region. + */ + public function getTimestampRegion(); + + /** + * Build \Doctrine\ORM\Cache + * + * @param EntityManagerInterface $entityManager + * + * @return \Doctrine\ORM\Cache + */ + public function createCache(EntityManagerInterface $entityManager); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheKey.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheKey.php new file mode 100644 index 0000000000000000000000000000000000000000..1641c9900dcca545d98680a10d2c206566534965 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CacheKey.php @@ -0,0 +1,38 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Defines entity / collection / query key to be stored in the cache region. + * Allows multiple roles to be stored in the same cache region. + * + * @since 2.5 + * @author Fabio B. Silva + */ +abstract class CacheKey +{ + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var string Unique identifier + */ + public $hash; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CollectionCacheEntry.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CollectionCacheEntry.php new file mode 100644 index 0000000000000000000000000000000000000000..6c634ce311df7dcb838373021d8d581676320ddf --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CollectionCacheEntry.php @@ -0,0 +1,59 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Collection cache entry + * + * @since 2.5 + * @author Fabio B. Silva + */ +class CollectionCacheEntry implements CacheEntry +{ + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var CacheKey[] The list of entity identifiers hold by the collection + */ + public $identifiers; + + /** + * @param CacheKey[] $identifiers List of entity identifiers hold by the collection + */ + public function __construct(array $identifiers) + { + $this->identifiers = $identifiers; + } + + /** + * Creates a new CollectionCacheEntry + * + * This method allows for Doctrine\Common\Cache\PhpFileCache compatibility + * + * @param array $values array containing property values + * + * @return self + */ + public static function __set_state(array $values) + { + return new self($values['identifiers']); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CollectionCacheKey.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CollectionCacheKey.php new file mode 100644 index 0000000000000000000000000000000000000000..6b631455000edf9516bba0b6946e3c8b6e1bf537 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CollectionCacheKey.php @@ -0,0 +1,66 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Defines entity collection roles to be stored in the cache region. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class CollectionCacheKey extends CacheKey +{ + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var array The owner entity identifier + */ + public $ownerIdentifier; + + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var string The owner entity class + */ + public $entityClass; + + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var string The association name + */ + public $association; + + /** + * @param string $entityClass The entity class. + * @param string $association The field name that represents the association. + * @param array $ownerIdentifier The identifier of the owning entity. + */ + public function __construct($entityClass, $association, array $ownerIdentifier) + { + ksort($ownerIdentifier); + + $this->ownerIdentifier = $ownerIdentifier; + $this->entityClass = (string) $entityClass; + $this->association = (string) $association; + $this->hash = str_replace('\\', '.', strtolower($entityClass)) . '_' . implode(' ', $ownerIdentifier) . '__' . $association; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CollectionHydrator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CollectionHydrator.php new file mode 100644 index 0000000000000000000000000000000000000000..04cdde162680da9ee899fff85d627c929cfbec5d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/CollectionHydrator.php @@ -0,0 +1,52 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\ORM\PersistentCollection; +use Doctrine\ORM\Mapping\ClassMetadata; + +/** + * Hydrator cache entry for collections + * + * @since 2.5 + * @author Fabio B. Silva + */ +interface CollectionHydrator +{ + /** + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. + * @param \Doctrine\ORM\Cache\CollectionCacheKey $key The cached collection key. + * @param array|\Doctrine\Common\Collections\Collection $collection The collection. + * + * @return \Doctrine\ORM\Cache\CollectionCacheEntry + */ + public function buildCacheEntry(ClassMetadata $metadata, CollectionCacheKey $key, $collection); + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The owning entity metadata. + * @param \Doctrine\ORM\Cache\CollectionCacheKey $key The cached collection key. + * @param \Doctrine\ORM\Cache\CollectionCacheEntry $entry The cached collection entry. + * @param \Doctrine\ORM\PersistentCollection $collection The collection to load the cache into. + * + * @return array + */ + public function loadCacheEntry(ClassMetadata $metadata, CollectionCacheKey $key, CollectionCacheEntry $entry, PersistentCollection $collection); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/ConcurrentRegion.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/ConcurrentRegion.php new file mode 100644 index 0000000000000000000000000000000000000000..12da6d615adcf6158ee4c1349e4a6fe244cbccf2 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/ConcurrentRegion.php @@ -0,0 +1,57 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Defines contract for concurrently managed data region. + * It should be able to lock an specific cache entry in an atomic operation. + * + * When a entry is locked another process should not be able to read or write the entry. + * All evict operation should not consider locks, even though an entry is locked evict should be able to delete the entry and its lock. + * + * @since 2.5 + * @author Fabio B. Silva + */ +interface ConcurrentRegion extends Region +{ + /** + * Attempts to read lock the mapping for the given key. + * + * @param \Doctrine\ORM\Cache\CacheKey $key The key of the item to lock. + * + * @return \Doctrine\ORM\Cache\Lock A lock instance or NULL if the lock already exists. + * + * @throws \Doctrine\ORM\Cache\LockException Indicates a problem accessing the region. + */ + public function lock(CacheKey $key); + + /** + * Attempts to read unlock the mapping for the given key. + * + * @param \Doctrine\ORM\Cache\CacheKey $key The key of the item to unlock. + * @param \Doctrine\ORM\Cache\Lock $lock The lock previously obtained from {@link readLock} + * + * @return void + * + * @throws \Doctrine\ORM\Cache\LockException Indicates a problem accessing the region. + */ + public function unlock(CacheKey $key, Lock $lock); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultCache.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultCache.php new file mode 100644 index 0000000000000000000000000000000000000000..78a22a80f1d187ade5ea9a25ee7245bf0d1c6103 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultCache.php @@ -0,0 +1,342 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\ORM\Cache; +use Doctrine\Common\Util\ClassUtils; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Cache\Persister\CachedPersister; +use Doctrine\ORM\ORMInvalidArgumentException; + +/** + * Provides an API for querying/managing the second level cache regions. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class DefaultCache implements Cache +{ + /** + * @var \Doctrine\ORM\EntityManagerInterface + */ + private $em; + + /** + * @var \Doctrine\ORM\UnitOfWork + */ + private $uow; + + /** + * @var \Doctrine\ORM\Cache\CacheFactory + */ + private $cacheFactory; + + /** + * @var \Doctrine\ORM\Cache\QueryCache[] + */ + private $queryCaches = array(); + + /** + * @var \Doctrine\ORM\Cache\QueryCache + */ + private $defaultQueryCache; + + /** + * {@inheritdoc} + */ + public function __construct(EntityManagerInterface $em) + { + $this->em = $em; + $this->uow = $em->getUnitOfWork(); + $this->cacheFactory = $em->getConfiguration() + ->getSecondLevelCacheConfiguration() + ->getCacheFactory(); + } + + /** + * {@inheritdoc} + */ + public function getEntityCacheRegion($className) + { + $metadata = $this->em->getClassMetadata($className); + $persister = $this->uow->getEntityPersister($metadata->rootEntityName); + + if ( ! ($persister instanceof CachedPersister)) { + return null; + } + + return $persister->getCacheRegion(); + } + + /** + * {@inheritdoc} + */ + public function getCollectionCacheRegion($className, $association) + { + $metadata = $this->em->getClassMetadata($className); + $persister = $this->uow->getCollectionPersister($metadata->getAssociationMapping($association)); + + if ( ! ($persister instanceof CachedPersister)) { + return null; + } + + return $persister->getCacheRegion(); + } + + /** + * {@inheritdoc} + */ + public function containsEntity($className, $identifier) + { + $metadata = $this->em->getClassMetadata($className); + $persister = $this->uow->getEntityPersister($metadata->rootEntityName); + + if ( ! ($persister instanceof CachedPersister)) { + return false; + } + + return $persister->getCacheRegion()->contains($this->buildEntityCacheKey($metadata, $identifier)); + } + + /** + * {@inheritdoc} + */ + public function evictEntity($className, $identifier) + { + $metadata = $this->em->getClassMetadata($className); + $persister = $this->uow->getEntityPersister($metadata->rootEntityName); + + if ( ! ($persister instanceof CachedPersister)) { + return; + } + + $persister->getCacheRegion()->evict($this->buildEntityCacheKey($metadata, $identifier)); + } + + /** + * {@inheritdoc} + */ + public function evictEntityRegion($className) + { + $metadata = $this->em->getClassMetadata($className); + $persister = $this->uow->getEntityPersister($metadata->rootEntityName); + + if ( ! ($persister instanceof CachedPersister)) { + return; + } + + $persister->getCacheRegion()->evictAll(); + } + + /** + * {@inheritdoc} + */ + public function evictEntityRegions() + { + $metadatas = $this->em->getMetadataFactory()->getAllMetadata(); + + foreach ($metadatas as $metadata) { + $persister = $this->uow->getEntityPersister($metadata->rootEntityName); + + if ( ! ($persister instanceof CachedPersister)) { + continue; + } + + $persister->getCacheRegion()->evictAll(); + } + } + + /** + * {@inheritdoc} + */ + public function containsCollection($className, $association, $ownerIdentifier) + { + $metadata = $this->em->getClassMetadata($className); + $persister = $this->uow->getCollectionPersister($metadata->getAssociationMapping($association)); + + if ( ! ($persister instanceof CachedPersister)) { + return false; + } + + return $persister->getCacheRegion()->contains($this->buildCollectionCacheKey($metadata, $association, $ownerIdentifier)); + } + + /** + * {@inheritdoc} + */ + public function evictCollection($className, $association, $ownerIdentifier) + { + $metadata = $this->em->getClassMetadata($className); + $persister = $this->uow->getCollectionPersister($metadata->getAssociationMapping($association)); + + if ( ! ($persister instanceof CachedPersister)) { + return; + } + + $persister->getCacheRegion()->evict($this->buildCollectionCacheKey($metadata, $association, $ownerIdentifier)); + } + + /** + * {@inheritdoc} + */ + public function evictCollectionRegion($className, $association) + { + $metadata = $this->em->getClassMetadata($className); + $persister = $this->uow->getCollectionPersister($metadata->getAssociationMapping($association)); + + if ( ! ($persister instanceof CachedPersister)) { + return; + } + + $persister->getCacheRegion()->evictAll(); + } + + /** + * {@inheritdoc} + */ + public function evictCollectionRegions() + { + $metadatas = $this->em->getMetadataFactory()->getAllMetadata(); + + foreach ($metadatas as $metadata) { + + foreach ($metadata->associationMappings as $association) { + + if ( ! $association['type'] & ClassMetadata::TO_MANY) { + continue; + } + + $persister = $this->uow->getCollectionPersister($association); + + if ( ! ($persister instanceof CachedPersister)) { + continue; + } + + $persister->getCacheRegion()->evictAll(); + } + } + } + + /** + * {@inheritdoc} + */ + public function containsQuery($regionName) + { + return isset($this->queryCaches[$regionName]); + } + + /** + * {@inheritdoc} + */ + public function evictQueryRegion($regionName = null) + { + if ($regionName === null && $this->defaultQueryCache !== null) { + $this->defaultQueryCache->clear(); + + return; + } + + if (isset($this->queryCaches[$regionName])) { + $this->queryCaches[$regionName]->clear(); + } + } + + /** + * {@inheritdoc} + */ + public function evictQueryRegions() + { + $this->getQueryCache()->clear(); + + foreach ($this->queryCaches as $queryCache) { + $queryCache->clear(); + } + } + + /** + * {@inheritdoc} + */ + public function getQueryCache($regionName = null) + { + if ($regionName === null) { + return $this->defaultQueryCache ?: + $this->defaultQueryCache = $this->cacheFactory->buildQueryCache($this->em); + } + + if ( ! isset($this->queryCaches[$regionName])) { + $this->queryCaches[$regionName] = $this->cacheFactory->buildQueryCache($this->em, $regionName); + } + + return $this->queryCaches[$regionName]; + } + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. + * @param mixed $identifier The entity identifier. + * + * @return \Doctrine\ORM\Cache\EntityCacheKey + */ + private function buildEntityCacheKey(ClassMetadata $metadata, $identifier) + { + if ( ! is_array($identifier)) { + $identifier = $this->toIdentifierArray($metadata, $identifier); + } + + return new EntityCacheKey($metadata->rootEntityName, $identifier); + } + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. + * @param string $association The field name that represents the association. + * @param mixed $ownerIdentifier The identifier of the owning entity. + * + * @return \Doctrine\ORM\Cache\CollectionCacheKey + */ + private function buildCollectionCacheKey(ClassMetadata $metadata, $association, $ownerIdentifier) + { + if ( ! is_array($ownerIdentifier)) { + $ownerIdentifier = $this->toIdentifierArray($metadata, $ownerIdentifier);; + } + + return new CollectionCacheKey($metadata->rootEntityName, $association, $ownerIdentifier); + } + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. + * @param mixed $identifier The entity identifier. + * + * @return array + */ + private function toIdentifierArray(ClassMetadata $metadata, $identifier) + { + if (is_object($identifier) && $this->em->getMetadataFactory()->hasMetadataFor(ClassUtils::getClass($identifier))) { + $identifier = $this->uow->getSingleIdentifierValue($identifier); + + if ($identifier === null) { + throw ORMInvalidArgumentException::invalidIdentifierBindingEntity(); + } + } + + return array($metadata->identifier[0] => $identifier); + } + +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultCacheFactory.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultCacheFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..82843d35933252fad8b2196a13ba4a668db19dd3 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultCacheFactory.php @@ -0,0 +1,254 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\Common\Cache\Cache as CacheAdapter; +use Doctrine\Common\Cache\CacheProvider; +use Doctrine\Common\Cache\MultiGetCache; +use Doctrine\ORM\Cache; +use Doctrine\ORM\Cache\Persister\Collection\NonStrictReadWriteCachedCollectionPersister; +use Doctrine\ORM\Cache\Persister\Collection\ReadOnlyCachedCollectionPersister; +use Doctrine\ORM\Cache\Persister\Collection\ReadWriteCachedCollectionPersister; +use Doctrine\ORM\Cache\Persister\Entity\NonStrictReadWriteCachedEntityPersister; +use Doctrine\ORM\Cache\Persister\Entity\ReadOnlyCachedEntityPersister; +use Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister; +use Doctrine\ORM\Cache\Region; +use Doctrine\ORM\Cache\Region\DefaultMultiGetRegion; +use Doctrine\ORM\Cache\Region\DefaultRegion; +use Doctrine\ORM\Cache\Region\FileLockRegion; +use Doctrine\ORM\Cache\Region\UpdateTimestampCache; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Persisters\Collection\CollectionPersister; +use Doctrine\ORM\Persisters\Entity\EntityPersister; + +/** + * @since 2.5 + * @author Fabio B. Silva + */ +class DefaultCacheFactory implements CacheFactory +{ + /** + * @var CacheAdapter + */ + private $cache; + + /** + * @var \Doctrine\ORM\Cache\RegionsConfiguration + */ + private $regionsConfig; + + /** + * @var \Doctrine\ORM\Cache\TimestampRegion|null + */ + private $timestampRegion; + + /** + * @var \Doctrine\ORM\Cache\Region[] + */ + private $regions = array(); + + /** + * @var string|null + */ + private $fileLockRegionDirectory; + + /** + * @param RegionsConfiguration $cacheConfig + * @param CacheAdapter $cache + */ + public function __construct(RegionsConfiguration $cacheConfig, CacheAdapter $cache) + { + $this->cache = $cache; + $this->regionsConfig = $cacheConfig; + } + + /** + * @param string $fileLockRegionDirectory + */ + public function setFileLockRegionDirectory($fileLockRegionDirectory) + { + $this->fileLockRegionDirectory = (string) $fileLockRegionDirectory; + } + + /** + * @return string + */ + public function getFileLockRegionDirectory() + { + return $this->fileLockRegionDirectory; + } + + /** + * @param \Doctrine\ORM\Cache\Region $region + */ + public function setRegion(Region $region) + { + $this->regions[$region->getName()] = $region; + } + + /** + * @param \Doctrine\ORM\Cache\TimestampRegion $region + */ + public function setTimestampRegion(TimestampRegion $region) + { + $this->timestampRegion = $region; + } + + /** + * {@inheritdoc} + */ + public function buildCachedEntityPersister(EntityManagerInterface $em, EntityPersister $persister, ClassMetadata $metadata) + { + $region = $this->getRegion($metadata->cache); + $usage = $metadata->cache['usage']; + + if ($usage === ClassMetadata::CACHE_USAGE_READ_ONLY) { + return new ReadOnlyCachedEntityPersister($persister, $region, $em, $metadata); + } + + if ($usage === ClassMetadata::CACHE_USAGE_NONSTRICT_READ_WRITE) { + return new NonStrictReadWriteCachedEntityPersister($persister, $region, $em, $metadata); + } + + if ($usage === ClassMetadata::CACHE_USAGE_READ_WRITE) { + return new ReadWriteCachedEntityPersister($persister, $region, $em, $metadata); + } + + throw new \InvalidArgumentException(sprintf("Unrecognized access strategy type [%s]", $usage)); + } + + /** + * {@inheritdoc} + */ + public function buildCachedCollectionPersister(EntityManagerInterface $em, CollectionPersister $persister, array $mapping) + { + $usage = $mapping['cache']['usage']; + $region = $this->getRegion($mapping['cache']); + + if ($usage === ClassMetadata::CACHE_USAGE_READ_ONLY) { + return new ReadOnlyCachedCollectionPersister($persister, $region, $em, $mapping); + } + + if ($usage === ClassMetadata::CACHE_USAGE_NONSTRICT_READ_WRITE) { + return new NonStrictReadWriteCachedCollectionPersister($persister, $region, $em, $mapping); + } + + if ($usage === ClassMetadata::CACHE_USAGE_READ_WRITE) { + return new ReadWriteCachedCollectionPersister($persister, $region, $em, $mapping); + } + + throw new \InvalidArgumentException(sprintf("Unrecognized access strategy type [%s]", $usage)); + } + + /** + * {@inheritdoc} + */ + public function buildQueryCache(EntityManagerInterface $em, $regionName = null) + { + return new DefaultQueryCache( + $em, + $this->getRegion( + array( + 'region' => $regionName ?: Cache::DEFAULT_QUERY_REGION_NAME, + 'usage' => ClassMetadata::CACHE_USAGE_NONSTRICT_READ_WRITE + ) + ) + ); + } + + /** + * {@inheritdoc} + */ + public function buildCollectionHydrator(EntityManagerInterface $em, array $mapping) + { + return new DefaultCollectionHydrator($em); + } + + /** + * {@inheritdoc} + */ + public function buildEntityHydrator(EntityManagerInterface $em, ClassMetadata $metadata) + { + return new DefaultEntityHydrator($em); + } + + /** + * {@inheritdoc} + */ + public function getRegion(array $cache) + { + if (isset($this->regions[$cache['region']])) { + return $this->regions[$cache['region']]; + } + + $cacheAdapter = clone $this->cache; + + if ($cacheAdapter instanceof CacheProvider) { + $cacheAdapter->setNamespace($cache['region']); + } + + $name = $cache['region']; + $lifetime = $this->regionsConfig->getLifetime($cache['region']); + + $region = ($cacheAdapter instanceof MultiGetCache) + ? new DefaultMultiGetRegion($name, $cacheAdapter, $lifetime) + : new DefaultRegion($name, $cacheAdapter, $lifetime); + + if ($cache['usage'] === ClassMetadata::CACHE_USAGE_READ_WRITE) { + + if ( ! $this->fileLockRegionDirectory) { + throw new \LogicException( + 'If you what to use a "READ_WRITE" cache an implementation of "Doctrine\ORM\Cache\ConcurrentRegion" is required, ' . + 'The default implementation provided by doctrine is "Doctrine\ORM\Cache\Region\FileLockRegion" if you what to use it please provide a valid directory, DefaultCacheFactory#setFileLockRegionDirectory(). ' + ); + } + + $directory = $this->fileLockRegionDirectory . DIRECTORY_SEPARATOR . $cache['region']; + $region = new FileLockRegion($region, $directory, $this->regionsConfig->getLockLifetime($cache['region'])); + } + + return $this->regions[$cache['region']] = $region; + } + + /** + * {@inheritdoc} + */ + public function getTimestampRegion() + { + if ($this->timestampRegion === null) { + $name = Cache::DEFAULT_TIMESTAMP_REGION_NAME; + $lifetime = $this->regionsConfig->getLifetime($name); + + $this->timestampRegion = new UpdateTimestampCache($name, clone $this->cache, $lifetime); + } + + return $this->timestampRegion; + } + + /** + * {@inheritdoc} + */ + public function createCache(EntityManagerInterface $em) + { + return new DefaultCache($em); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultCollectionHydrator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultCollectionHydrator.php new file mode 100644 index 0000000000000000000000000000000000000000..f6583cbd2ca60bd3607cbcbd5dbeacdcdc1f9068 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultCollectionHydrator.php @@ -0,0 +1,103 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\ORM\Query; +use Doctrine\ORM\PersistentCollection; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\EntityManagerInterface; + +/** + * Default hydrator cache for collections + * + * @since 2.5 + * @author Fabio B. Silva + */ +class DefaultCollectionHydrator implements CollectionHydrator +{ + /** + * @var \Doctrine\ORM\EntityManagerInterface + */ + private $em; + + /** + * @var \Doctrine\ORM\UnitOfWork + */ + private $uow; + + /** + * @var array + */ + private static $hints = array(Query::HINT_CACHE_ENABLED => true); + + /** + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + */ + public function __construct(EntityManagerInterface $em) + { + $this->em = $em; + $this->uow = $em->getUnitOfWork(); + } + + /** + * {@inheritdoc} + */ + public function buildCacheEntry(ClassMetadata $metadata, CollectionCacheKey $key, $collection) + { + $data = array(); + + foreach ($collection as $index => $entity) { + $data[$index] = new EntityCacheKey($metadata->name, $this->uow->getEntityIdentifier($entity)); + } + return new CollectionCacheEntry($data); + } + + /** + * {@inheritdoc} + */ + public function loadCacheEntry(ClassMetadata $metadata, CollectionCacheKey $key, CollectionCacheEntry $entry, PersistentCollection $collection) + { + $assoc = $metadata->associationMappings[$key->association]; + /* @var $targetPersister \Doctrine\ORM\Cache\Persister\CachedPersister */ + $targetPersister = $this->uow->getEntityPersister($assoc['targetEntity']); + $targetRegion = $targetPersister->getCacheRegion(); + $list = array(); + + $entityEntries = $targetRegion->getMultiple($entry); + + if ($entityEntries === null) { + return null; + } + + /* @var $entityEntries \Doctrine\ORM\Cache\EntityCacheEntry[] */ + foreach ($entityEntries as $index => $entityEntry) { + $list[$index] = $this->uow->createEntity($entityEntry->class, $entityEntry->resolveAssociationEntries($this->em), self::$hints); + } + + array_walk($list, function($entity, $index) use ($collection) { + $collection->hydrateSet($index, $entity); + }); + + $this->uow->hydrationComplete(); + + return $list; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php new file mode 100644 index 0000000000000000000000000000000000000000..70fd1f39a6835b0b029ce7b4acf0c53fb60bf447 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php @@ -0,0 +1,192 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\Common\Util\ClassUtils; + +use Doctrine\ORM\Query; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Utility\IdentifierFlattener; + +/** + * Default hydrator cache for entities + * + * @since 2.5 + * @author Fabio B. Silva + */ +class DefaultEntityHydrator implements EntityHydrator +{ + /** + * @var \Doctrine\ORM\EntityManager + */ + private $em; + + /** + * @var \Doctrine\ORM\UnitOfWork + */ + private $uow; + + /** + * The IdentifierFlattener used for manipulating identifiers + * + * @var \Doctrine\ORM\Utility\IdentifierFlattener + */ + private $identifierFlattener; + + /** + * @var array + */ + private static $hints = array(Query::HINT_CACHE_ENABLED => true); + + /** + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + */ + public function __construct(EntityManagerInterface $em) + { + $this->em = $em; + $this->uow = $em->getUnitOfWork(); + $this->identifierFlattener = new IdentifierFlattener($em->getUnitOfWork(), $em->getMetadataFactory()); + } + + /** + * {@inheritdoc} + */ + public function buildCacheEntry(ClassMetadata $metadata, EntityCacheKey $key, $entity) + { + $data = $this->uow->getOriginalEntityData($entity); + $data = array_merge($data, $metadata->getIdentifierValues($entity)); // why update has no identifier values ? + + foreach ($metadata->associationMappings as $name => $assoc) { + + if ( ! isset($data[$name])) { + continue; + } + + if (! ($assoc['type'] & ClassMetadata::TO_ONE)) { + unset($data[$name]); + continue; + } + + if ( ! isset($assoc['cache'])) { + $targetClassMetadata = $this->em->getClassMetadata($assoc['targetEntity']); + $associationIds = $this->identifierFlattener->flattenIdentifier($targetClassMetadata, $targetClassMetadata->getIdentifierValues($data[$name])); + unset($data[$name]); + + foreach ($associationIds as $fieldName => $fieldValue) { + + if (isset($targetClassMetadata->associationMappings[$fieldName])){ + $targetAssoc = $targetClassMetadata->associationMappings[$fieldName]; + + foreach($assoc['targetToSourceKeyColumns'] as $referencedColumn => $localColumn) { + + if (isset($targetAssoc['sourceToTargetKeyColumns'][$referencedColumn])) { + $data[$localColumn] = $fieldValue; + } + } + }else{ + $data[$assoc['targetToSourceKeyColumns'][$targetClassMetadata->columnNames[$fieldName]]] = $fieldValue; + } + } + + continue; + } + + if ( ! isset($assoc['id'])) { + $targetClass = ClassUtils::getClass($data[$name]); + $targetId = $this->uow->getEntityIdentifier($data[$name]); + $data[$name] = new AssociationCacheEntry($targetClass, $targetId); + + continue; + } + + // handle association identifier + $targetId = is_object($data[$name]) && $this->uow->isInIdentityMap($data[$name]) + ? $this->uow->getEntityIdentifier($data[$name]) + : $data[$name]; + + // @TODO - fix it ! + // handle UnitOfWork#createEntity hash generation + if ( ! is_array($targetId)) { + + $data[reset($assoc['joinColumnFieldNames'])] = $targetId; + + $targetEntity = $this->em->getClassMetadata($assoc['targetEntity']); + $targetId = array($targetEntity->identifier[0] => $targetId); + } + + $data[$name] = new AssociationCacheEntry($assoc['targetEntity'], $targetId); + } + + return new EntityCacheEntry($metadata->name, $data); + } + + /** + * {@inheritdoc} + */ + public function loadCacheEntry(ClassMetadata $metadata, EntityCacheKey $key, EntityCacheEntry $entry, $entity = null) + { + $data = $entry->data; + $hints = self::$hints; + + if ($entity !== null) { + $hints[Query::HINT_REFRESH] = true; + $hints[Query::HINT_REFRESH_ENTITY] = $entity; + } + + foreach ($metadata->associationMappings as $name => $assoc) { + if ( ! isset($assoc['cache']) || ! isset($data[$name])) { + continue; + } + + $assocClass = $data[$name]->class; + $assocId = $data[$name]->identifier; + $isEagerLoad = ($assoc['fetch'] === ClassMetadata::FETCH_EAGER || ($assoc['type'] === ClassMetadata::ONE_TO_ONE && ! $assoc['isOwningSide'])); + + if ( ! $isEagerLoad) { + $data[$name] = $this->em->getReference($assocClass, $assocId); + + continue; + } + + $assocKey = new EntityCacheKey($assoc['targetEntity'], $assocId); + $assocPersister = $this->uow->getEntityPersister($assoc['targetEntity']); + $assocRegion = $assocPersister->getCacheRegion(); + $assocEntry = $assocRegion->get($assocKey); + + if ($assocEntry === null) { + return null; + } + + $data[$name] = $this->uow->createEntity($assocEntry->class, $assocEntry->resolveAssociationEntries($this->em), $hints); + } + + if ($entity !== null) { + $this->uow->registerManaged($entity, $key->identifier, $data); + } + + $result = $this->uow->createEntity($entry->class, $data, $hints); + + $this->uow->hydrationComplete(); + + return $result; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultQueryCache.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultQueryCache.php new file mode 100644 index 0000000000000000000000000000000000000000..87bb136636254a5e36514b04b3ab2735a5a30086 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultQueryCache.php @@ -0,0 +1,342 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\ORM\Cache\Persister\CachedPersister; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Query\ResultSetMapping; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\PersistentCollection; +use Doctrine\Common\Proxy\Proxy; +use Doctrine\ORM\Cache; +use Doctrine\ORM\Query; + +/** + * Default query cache implementation. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class DefaultQueryCache implements QueryCache +{ + /** + * @var \Doctrine\ORM\EntityManagerInterface + */ + private $em; + + /** + * @var \Doctrine\ORM\UnitOfWork + */ + private $uow; + + /** + * @var \Doctrine\ORM\Cache\Region + */ + private $region; + + /** + * @var \Doctrine\ORM\Cache\QueryCacheValidator + */ + private $validator; + + /** + * @var \Doctrine\ORM\Cache\Logging\CacheLogger + */ + protected $cacheLogger; + + /** + * @var array + */ + private static $hints = array(Query::HINT_CACHE_ENABLED => true); + + /** + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param \Doctrine\ORM\Cache\Region $region The query region. + */ + public function __construct(EntityManagerInterface $em, Region $region) + { + $cacheConfig = $em->getConfiguration()->getSecondLevelCacheConfiguration(); + + $this->em = $em; + $this->region = $region; + $this->uow = $em->getUnitOfWork(); + $this->cacheLogger = $cacheConfig->getCacheLogger(); + $this->validator = $cacheConfig->getQueryValidator(); + } + + /** + * {@inheritdoc} + */ + public function get(QueryCacheKey $key, ResultSetMapping $rsm, array $hints = array()) + { + if ( ! ($key->cacheMode & Cache::MODE_GET)) { + return null; + } + + $entry = $this->region->get($key); + + if ( ! $entry instanceof QueryCacheEntry) { + return null; + } + + if ( ! $this->validator->isValid($key, $entry)) { + $this->region->evict($key); + + return null; + } + + $result = array(); + $entityName = reset($rsm->aliasMap); + $hasRelation = ( ! empty($rsm->relationMap)); + $persister = $this->uow->getEntityPersister($entityName); + $region = $persister->getCacheRegion(); + $regionName = $region->getName(); + + // @TODO - move to cache hydration component + foreach ($entry->result as $index => $entry) { + + if (($entityEntry = $region->get($entityKey = new EntityCacheKey($entityName, $entry['identifier']))) === null) { + + if ($this->cacheLogger !== null) { + $this->cacheLogger->entityCacheMiss($regionName, $entityKey); + } + + return null; + } + + if ($this->cacheLogger !== null) { + $this->cacheLogger->entityCacheHit($regionName, $entityKey); + } + + if ( ! $hasRelation) { + + $result[$index] = $this->uow->createEntity($entityEntry->class, $entityEntry->resolveAssociationEntries($this->em), self::$hints); + + continue; + } + + $data = $entityEntry->data; + + foreach ($entry['associations'] as $name => $assoc) { + + $assocPersister = $this->uow->getEntityPersister($assoc['targetEntity']); + $assocRegion = $assocPersister->getCacheRegion(); + + if ($assoc['type'] & ClassMetadata::TO_ONE) { + + if (($assocEntry = $assocRegion->get($assocKey = new EntityCacheKey($assoc['targetEntity'], $assoc['identifier']))) === null) { + + if ($this->cacheLogger !== null) { + $this->cacheLogger->entityCacheMiss($assocRegion->getName(), $assocKey); + } + + $this->uow->hydrationComplete(); + + return null; + } + + $data[$name] = $this->uow->createEntity($assocEntry->class, $assocEntry->resolveAssociationEntries($this->em), self::$hints); + + if ($this->cacheLogger !== null) { + $this->cacheLogger->entityCacheHit($assocRegion->getName(), $assocKey); + } + + continue; + } + + if ( ! isset($assoc['list']) || empty($assoc['list'])) { + continue; + } + + $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); + $collection = new PersistentCollection($this->em, $targetClass, new ArrayCollection()); + + foreach ($assoc['list'] as $assocIndex => $assocId) { + + if (($assocEntry = $assocRegion->get($assocKey = new EntityCacheKey($assoc['targetEntity'], $assocId))) === null) { + + if ($this->cacheLogger !== null) { + $this->cacheLogger->entityCacheMiss($assocRegion->getName(), $assocKey); + } + + $this->uow->hydrationComplete(); + + return null; + } + + $element = $this->uow->createEntity($assocEntry->class, $assocEntry->resolveAssociationEntries($this->em), self::$hints); + + $collection->hydrateSet($assocIndex, $element); + + if ($this->cacheLogger !== null) { + $this->cacheLogger->entityCacheHit($assocRegion->getName(), $assocKey); + } + } + + $data[$name] = $collection; + + $collection->setInitialized(true); + } + + $result[$index] = $this->uow->createEntity($entityEntry->class, $data, self::$hints); + } + + $this->uow->hydrationComplete(); + + return $result; + } + + /** + * {@inheritdoc} + */ + public function put(QueryCacheKey $key, ResultSetMapping $rsm, $result, array $hints = array()) + { + if ($rsm->scalarMappings) { + throw new CacheException("Second level cache does not support scalar results."); + } + + if (count($rsm->entityMappings) > 1) { + throw new CacheException("Second level cache does not support multiple root entities."); + } + + if ( ! $rsm->isSelect) { + throw new CacheException("Second-level cache query supports only select statements."); + } + + if (isset($hints[Query::HINT_FORCE_PARTIAL_LOAD]) && $hints[Query::HINT_FORCE_PARTIAL_LOAD]) { + throw new CacheException("Second level cache does not support partial entities."); + } + + if ( ! ($key->cacheMode & Cache::MODE_PUT)) { + return false; + } + + $data = array(); + $entityName = reset($rsm->aliasMap); + $hasRelation = ( ! empty($rsm->relationMap)); + $metadata = $this->em->getClassMetadata($entityName); + $persister = $this->uow->getEntityPersister($entityName); + + if ( ! ($persister instanceof CachedPersister)) { + throw CacheException::nonCacheableEntity($entityName); + } + + $region = $persister->getCacheRegion(); + + foreach ($result as $index => $entity) { + $identifier = $this->uow->getEntityIdentifier($entity); + $data[$index]['identifier'] = $identifier; + $data[$index]['associations'] = array(); + + if (($key->cacheMode & Cache::MODE_REFRESH) || ! $region->contains($entityKey = new EntityCacheKey($entityName, $identifier))) { + // Cancel put result if entity put fail + if ( ! $persister->storeEntityCache($entity, $entityKey)) { + return false; + } + } + + if ( ! $hasRelation) { + continue; + } + + // @TODO - move to cache hydration components + foreach ($rsm->relationMap as $name) { + $assoc = $metadata->associationMappings[$name]; + + if (($assocValue = $metadata->getFieldValue($entity, $name)) === null || $assocValue instanceof Proxy) { + continue; + } + + if ( ! isset($assoc['cache'])) { + throw CacheException::nonCacheableEntityAssociation($entityName, $name); + } + + $assocPersister = $this->uow->getEntityPersister($assoc['targetEntity']); + $assocRegion = $assocPersister->getCacheRegion(); + $assocMetadata = $assocPersister->getClassMetadata(); + + // Handle *-to-one associations + if ($assoc['type'] & ClassMetadata::TO_ONE) { + + $assocIdentifier = $this->uow->getEntityIdentifier($assocValue); + + if (($key->cacheMode & Cache::MODE_REFRESH) || ! $assocRegion->contains($entityKey = new EntityCacheKey($assocMetadata->rootEntityName, $assocIdentifier))) { + + // Cancel put result if association entity put fail + if ( ! $assocPersister->storeEntityCache($assocValue, $entityKey)) { + return false; + } + } + + $data[$index]['associations'][$name] = array( + 'targetEntity' => $assocMetadata->rootEntityName, + 'identifier' => $assocIdentifier, + 'type' => $assoc['type'] + ); + + continue; + } + + // Handle *-to-many associations + $list = array(); + + foreach ($assocValue as $assocItemIndex => $assocItem) { + $assocIdentifier = $this->uow->getEntityIdentifier($assocItem); + + if (($key->cacheMode & Cache::MODE_REFRESH) || ! $assocRegion->contains($entityKey = new EntityCacheKey($assocMetadata->rootEntityName, $assocIdentifier))) { + + // Cancel put result if entity put fail + if ( ! $assocPersister->storeEntityCache($assocItem, $entityKey)) { + return false; + } + } + + $list[$assocItemIndex] = $assocIdentifier; + } + + $data[$index]['associations'][$name] = array( + 'targetEntity' => $assocMetadata->rootEntityName, + 'type' => $assoc['type'], + 'list' => $list, + ); + } + } + + return $this->region->put($key, new QueryCacheEntry($data)); + } + + /** + * {@inheritdoc} + */ + public function clear() + { + return $this->region->evictAll(); + } + + /** + * {@inheritdoc} + */ + public function getRegion() + { + return $this->region; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/EntityCacheEntry.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/EntityCacheEntry.php new file mode 100644 index 0000000000000000000000000000000000000000..ece7fae18d14c96cc36305ecb98b69186d7d1e96 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/EntityCacheEntry.php @@ -0,0 +1,86 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\ORM\EntityManagerInterface; + +/** + * Entity cache entry + * + * @since 2.5 + * @author Fabio B. Silva + */ +class EntityCacheEntry implements CacheEntry +{ + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var array The entity map data + */ + public $data; + + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var string The entity class name + */ + public $class; + + /** + * @param string $class The entity class. + * @param array $data The entity data. + */ + public function __construct($class, array $data) + { + $this->class = $class; + $this->data = $data; + } + + /** + * Creates a new EntityCacheEntry + * + * This method allow Doctrine\Common\Cache\PhpFileCache compatibility + * + * @param array $values array containing property values + */ + public static function __set_state(array $values) + { + return new self($values['class'], $values['data']); + } + + /** + * Retrieves the entity data resolving cache entries + * + * @param \Doctrine\ORM\EntityManagerInterfac $em + * + * @return array + */ + public function resolveAssociationEntries(EntityManagerInterface $em) + { + return array_map(function($value) use ($em) { + if ( ! ($value instanceof AssociationCacheEntry)) { + return $value; + } + + return $em->getReference($value->class, $value->identifier); + }, $this->data); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/EntityCacheKey.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/EntityCacheKey.php new file mode 100644 index 0000000000000000000000000000000000000000..281e610fa6ce4a3b87a4f565eb56d0e37f97d361 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/EntityCacheKey.php @@ -0,0 +1,57 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Defines entity classes roles to be stored in the cache region. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class EntityCacheKey extends CacheKey +{ + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var array The entity identifier + */ + public $identifier; + + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var string The entity class name + */ + public $entityClass; + + /** + * @param string $entityClass The entity class name. In a inheritance hierarchy it should always be the root entity class. + * @param array $identifier The entity identifier + */ + public function __construct($entityClass, array $identifier) + { + ksort($identifier); + + $this->identifier = $identifier; + $this->entityClass = $entityClass; + $this->hash = str_replace('\\', '.', strtolower($entityClass) . '_' . implode(' ', $identifier)); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/EntityHydrator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/EntityHydrator.php new file mode 100644 index 0000000000000000000000000000000000000000..05a394da7b2007e307ee113a8822e666a942002a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/EntityHydrator.php @@ -0,0 +1,49 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\ORM\Mapping\ClassMetadata; + +/** + * Hydrator cache entry for entities + * + * @since 2.5 + * @author Fabio B. Silva + */ +interface EntityHydrator +{ + /** + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. + * @param \Doctrine\ORM\Cache\EntityCacheKey $key The entity cache key. + * @param object $entity The entity. + * + * @return \Doctrine\ORM\Cache\EntityCacheEntry + */ + public function buildCacheEntry(ClassMetadata $metadata, EntityCacheKey $key, $entity); + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. + * @param \Doctrine\ORM\Cache\EntityCacheKey $key The entity cache key. + * @param \Doctrine\ORM\Cache\EntityCacheEntry $entry The entity cache entry. + * @param object $entity The entity to load the cache into. If not specified, a new entity is created. + */ + public function loadCacheEntry(ClassMetadata $metadata, EntityCacheKey $key, EntityCacheEntry $entry, $entity = null); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Lock.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Lock.php new file mode 100644 index 0000000000000000000000000000000000000000..5346aa32371f4174385a748b93235f4805ad0dbd --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Lock.php @@ -0,0 +1,58 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Cache Lock + * + * @since 2.5 + * @author Fabio B. Silva + */ +class Lock +{ + /** + * @var string + */ + public $value; + + /** + * @var integer + */ + public $time; + + /** + * @param string $value + * @param integer $time + */ + public function __construct($value, $time = null) + { + $this->value = $value; + $this->time = $time ? : time(); + } + + /** + * @return \Doctrine\ORM\Cache\Lock + */ + public static function createLockRead() + { + return new self(uniqid(time())); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/LockException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/LockException.php new file mode 100644 index 0000000000000000000000000000000000000000..d4c76240aa96e17dc052509ebe700f1f2ce8cee7 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/LockException.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Lock exception for cache. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class LockException extends CacheException +{ + +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Logging/CacheLogger.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Logging/CacheLogger.php new file mode 100644 index 0000000000000000000000000000000000000000..bdae4eea8c5db6f3bda71a83ba2b15b2df23a7a1 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Logging/CacheLogger.php @@ -0,0 +1,106 @@ +. + */ + +namespace Doctrine\ORM\Cache\Logging; + +use Doctrine\ORM\Cache\CollectionCacheKey; +use Doctrine\ORM\Cache\EntityCacheKey; +use Doctrine\ORM\Cache\QueryCacheKey; + +/** + * Interface for logging. + * + * @since 2.5 + * @author Fabio B. Silva + */ +interface CacheLogger +{ + /** + * Log an entity put into second level cache. + * + * @param string $regionName The name of the cache region. + * @param \Doctrine\ORM\Cache\EntityCacheKey $key The cache key of the entity. + */ + public function entityCachePut($regionName, EntityCacheKey $key); + + /** + * Log an entity get from second level cache resulted in a hit. + * + * @param string $regionName The name of the cache region. + * @param \Doctrine\ORM\Cache\EntityCacheKey $key The cache key of the entity. + */ + public function entityCacheHit($regionName, EntityCacheKey $key); + + /** + * Log an entity get from second level cache resulted in a miss. + * + * @param string $regionName The name of the cache region. + * @param \Doctrine\ORM\Cache\EntityCacheKey $key The cache key of the entity. + */ + public function entityCacheMiss($regionName, EntityCacheKey $key); + + /** + * Log an entity put into second level cache. + * + * @param string $regionName The name of the cache region. + * @param \Doctrine\ORM\Cache\CollectionCacheKey $key The cache key of the collection. + */ + public function collectionCachePut($regionName, CollectionCacheKey $key); + + /** + * Log an entity get from second level cache resulted in a hit. + * + * @param string $regionName The name of the cache region. + * @param \Doctrine\ORM\Cache\CollectionCacheKey $key The cache key of the collection. + */ + public function collectionCacheHit($regionName, CollectionCacheKey $key); + + /** + * Log an entity get from second level cache resulted in a miss. + * + * @param string $regionName The name of the cache region. + * @param \Doctrine\ORM\Cache\CollectionCacheKey $key The cache key of the collection. + */ + public function collectionCacheMiss($regionName, CollectionCacheKey $key); + + /** + * Log a query put into the query cache. + * + * @param string $regionName The name of the cache region. + * @param \Doctrine\ORM\Cache\QueryCacheKey $key The cache key of the query. + */ + public function queryCachePut($regionName, QueryCacheKey $key); + + /** + * Log a query get from the query cache resulted in a hit. + * + * @param string $regionName The name of the cache region. + * @param \Doctrine\ORM\Cache\QueryCacheKey $key The cache key of the query. + */ + public function queryCacheHit($regionName, QueryCacheKey $key); + + /** + * Log a query get from the query cache resulted in a miss. + * + * @param string $regionName The name of the cache region. + * @param \Doctrine\ORM\Cache\QueryCacheKey $key The cache key of the query. + */ + public function queryCacheMiss($regionName, QueryCacheKey $key); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Logging/CacheLoggerChain.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Logging/CacheLoggerChain.php new file mode 100644 index 0000000000000000000000000000000000000000..694b35ca5eb4759cebf172bdbb7ea1fe09170e71 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Logging/CacheLoggerChain.php @@ -0,0 +1,156 @@ +. + */ + +namespace Doctrine\ORM\Cache\Logging; + +use Doctrine\ORM\Cache\CollectionCacheKey; +use Doctrine\ORM\Cache\EntityCacheKey; +use Doctrine\ORM\Cache\QueryCacheKey; + +/** + * Cache logger chain + * + * @since 2.5 + * @author Fabio B. Silva + */ +class CacheLoggerChain implements CacheLogger +{ + /** + * @var array<\Doctrine\ORM\Cache\Logging\CacheLogger> + */ + private $loggers = array(); + + /** + * @param string $name + * @param \Doctrine\ORM\Cache\Logging\CacheLogger $logger + */ + public function setLogger($name, CacheLogger $logger) + { + $this->loggers[$name] = $logger; + } + + /** + * @param string $name + * + * @return \Doctrine\ORM\Cache\Logging\CacheLogger|null + */ + public function getLogger($name) + { + return isset($this->loggers[$name]) ? $this->loggers[$name] : null; + } + + /** + * @return array<\Doctrine\ORM\Cache\Logging\CacheLogger> + */ + public function getLoggers() + { + return $this->loggers; + } + + /** + * {@inheritdoc} + */ + public function collectionCacheHit($regionName, CollectionCacheKey $key) + { + foreach ($this->loggers as $logger) { + $logger->collectionCacheHit($regionName, $key); + } + } + + /** + * {@inheritdoc} + */ + public function collectionCacheMiss($regionName, CollectionCacheKey $key) + { + foreach ($this->loggers as $logger) { + $logger->collectionCacheMiss($regionName, $key); + } + } + + /** + * {@inheritdoc} + */ + public function collectionCachePut($regionName, CollectionCacheKey $key) + { + foreach ($this->loggers as $logger) { + $logger->collectionCachePut($regionName, $key); + } + } + + /** + * {@inheritdoc} + */ + public function entityCacheHit($regionName, EntityCacheKey $key) + { + foreach ($this->loggers as $logger) { + $logger->entityCacheHit($regionName, $key); + } + } + + /** + * {@inheritdoc} + */ + public function entityCacheMiss($regionName, EntityCacheKey $key) + { + foreach ($this->loggers as $logger) { + $logger->entityCacheMiss($regionName, $key); + } + } + + /** + * {@inheritdoc} + */ + public function entityCachePut($regionName, EntityCacheKey $key) + { + foreach ($this->loggers as $logger) { + $logger->entityCachePut($regionName, $key); + } + } + + /** + * {@inheritdoc} + */ + public function queryCacheHit($regionName, QueryCacheKey $key) + { + foreach ($this->loggers as $logger) { + $logger->queryCacheHit($regionName, $key); + } + } + + /** + * {@inheritdoc} + */ + public function queryCacheMiss($regionName, QueryCacheKey $key) + { + foreach ($this->loggers as $logger) { + $logger->queryCacheMiss($regionName, $key); + } + } + + /** + * {@inheritdoc} + */ + public function queryCachePut($regionName, QueryCacheKey $key) + { + foreach ($this->loggers as $logger) { + $logger->queryCachePut($regionName, $key); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Logging/StatisticsCacheLogger.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Logging/StatisticsCacheLogger.php new file mode 100644 index 0000000000000000000000000000000000000000..2fbba40bef1bb9813e120698de9e8c76838f886b --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Logging/StatisticsCacheLogger.php @@ -0,0 +1,251 @@ +. + */ + +namespace Doctrine\ORM\Cache\Logging; + +use Doctrine\ORM\Cache\CollectionCacheKey; +use Doctrine\ORM\Cache\EntityCacheKey; +use Doctrine\ORM\Cache\QueryCacheKey; + +/** + * Provide basic second level cache statistics. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class StatisticsCacheLogger implements CacheLogger +{ + /** + * @var array + */ + private $cacheMissCountMap = array(); + + /** + * @var array + */ + private $cacheHitCountMap = array(); + + /** + * @var array + */ + private $cachePutCountMap = array(); + + /** + * {@inheritdoc} + */ + public function collectionCacheMiss($regionName, CollectionCacheKey $key) + { + $this->cacheMissCountMap[$regionName] = isset($this->cacheMissCountMap[$regionName]) + ? $this->cacheMissCountMap[$regionName] + 1 + : 1; + } + + /** + * {@inheritdoc} + */ + public function collectionCacheHit($regionName, CollectionCacheKey $key) + { + $this->cacheHitCountMap[$regionName] = isset($this->cacheHitCountMap[$regionName]) + ? $this->cacheHitCountMap[$regionName] + 1 + : 1; + } + + /** + * {@inheritdoc} + */ + public function collectionCachePut($regionName, CollectionCacheKey $key) + { + $this->cachePutCountMap[$regionName] = isset($this->cachePutCountMap[$regionName]) + ? $this->cachePutCountMap[$regionName] + 1 + : 1; + } + + /** + * {@inheritdoc} + */ + public function entityCacheMiss($regionName, EntityCacheKey $key) + { + $this->cacheMissCountMap[$regionName] = isset($this->cacheMissCountMap[$regionName]) + ? $this->cacheMissCountMap[$regionName] + 1 + : 1; + } + + /** + * {@inheritdoc} + */ + public function entityCacheHit($regionName, EntityCacheKey $key) + { + $this->cacheHitCountMap[$regionName] = isset($this->cacheHitCountMap[$regionName]) + ? $this->cacheHitCountMap[$regionName] + 1 + : 1; + } + + /** + * {@inheritdoc} + */ + public function entityCachePut($regionName, EntityCacheKey $key) + { + $this->cachePutCountMap[$regionName] = isset($this->cachePutCountMap[$regionName]) + ? $this->cachePutCountMap[$regionName] + 1 + : 1; + } + + /** + * {@inheritdoc} + */ + public function queryCacheHit($regionName, QueryCacheKey $key) + { + $this->cacheHitCountMap[$regionName] = isset($this->cacheHitCountMap[$regionName]) + ? $this->cacheHitCountMap[$regionName] + 1 + : 1; + } + + /** + * {@inheritdoc} + */ + public function queryCacheMiss($regionName, QueryCacheKey $key) + { + $this->cacheMissCountMap[$regionName] = isset($this->cacheMissCountMap[$regionName]) + ? $this->cacheMissCountMap[$regionName] + 1 + : 1; + } + + /** + * {@inheritdoc} + */ + public function queryCachePut($regionName, QueryCacheKey $key) + { + $this->cachePutCountMap[$regionName] = isset($this->cachePutCountMap[$regionName]) + ? $this->cachePutCountMap[$regionName] + 1 + : 1; + } + + /** + * Get the number of entries successfully retrieved from cache. + * + * @param string $regionName The name of the cache region. + * + * @return integer + */ + public function getRegionHitCount($regionName) + { + return isset($this->cacheHitCountMap[$regionName]) ? $this->cacheHitCountMap[$regionName] : 0; + } + + /** + * Get the number of cached entries *not* found in cache. + * + * @param string $regionName The name of the cache region. + * + * @return integer + */ + public function getRegionMissCount($regionName) + { + return isset($this->cacheMissCountMap[$regionName]) ? $this->cacheMissCountMap[$regionName] : 0; + } + + /** + * Get the number of cacheable entries put in cache. + * + * @param string $regionName The name of the cache region. + * + * @return integer + */ + public function getRegionPutCount($regionName) + { + return isset($this->cachePutCountMap[$regionName]) ? $this->cachePutCountMap[$regionName] : 0; + } + + /** + * @return array + */ + public function getRegionsMiss() + { + return $this->cacheMissCountMap; + } + + /** + * @return array + */ + public function getRegionsHit() + { + return $this->cacheHitCountMap; + } + + /** + * @return array + */ + public function getRegionsPut() + { + return $this->cachePutCountMap; + } + + /** + * Clear region statistics + * + * @param string $regionName The name of the cache region. + */ + public function clearRegionStats($regionName) + { + $this->cachePutCountMap[$regionName] = 0; + $this->cacheHitCountMap[$regionName] = 0; + $this->cacheMissCountMap[$regionName] = 0; + } + + /** + * Clear all statistics + */ + public function clearStats() + { + $this->cachePutCountMap = array(); + $this->cacheHitCountMap = array(); + $this->cacheMissCountMap = array(); + } + + /** + * Get the total number of put in cache. + * + * @return integer + */ + public function getPutCount() + { + return array_sum($this->cachePutCountMap); + } + + /** + * Get the total number of entries successfully retrieved from cache. + * + * @return integer + */ + public function getHitCount() + { + return array_sum($this->cacheHitCountMap); + } + + /** + * Get the total number of cached entries *not* found in cache. + * + * @return integer + */ + public function getMissCount() + { + return array_sum($this->cacheMissCountMap); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/MultiGetRegion.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/MultiGetRegion.php new file mode 100644 index 0000000000000000000000000000000000000000..be32b08f0fe2c37cd0d30a62c2ba5bf2337ed32e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/MultiGetRegion.php @@ -0,0 +1,42 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Defines a region that supports multi-get reading. + * + * With one method call we can get multiple items. + * + * @since 2.5 + * @author Asmir Mustafic + */ +interface MultiGetRegion +{ + /** + * Get all items from the cache identified by $keys. + * It returns NULL if some elements can not be found. + * + * @param CollectionCacheEntry $collection The collection of the items to be retrieved. + * + * @return CacheEntry[]|null The cached entries or NULL if one or more entries can not be found + */ + public function getMultiple(CollectionCacheEntry $collection); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/CachedPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/CachedPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..89afd32095f88c1060270ad7fbaf841fa4db1199 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/CachedPersister.php @@ -0,0 +1,46 @@ +. + */ + +namespace Doctrine\ORM\Cache\Persister; + +/** + * Interface for persister that support second level cache. + * + * @since 2.5 + * @author Fabio B. Silva + */ +interface CachedPersister +{ + /** + * Perform whatever processing is encapsulated here after completion of the transaction. + */ + public function afterTransactionComplete(); + + /** + * Perform whatever processing is encapsulated here after completion of the rolled-back. + */ + public function afterTransactionRolledBack(); + + /** + * Gets the The region access. + * + * @return \Doctrine\ORM\Cache\Region + */ + public function getCacheRegion(); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/AbstractCollectionPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/AbstractCollectionPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..abaef17a680ac6b089c4166f2e4243f10734bdc8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/AbstractCollectionPersister.php @@ -0,0 +1,313 @@ +. + */ + +namespace Doctrine\ORM\Cache\Persister\Collection; + +use Doctrine\Common\Collections\Criteria; +use Doctrine\ORM\Cache\EntityCacheKey; +use Doctrine\ORM\Cache\CollectionCacheKey; +use Doctrine\ORM\Cache\Persister\Entity\CachedEntityPersister; +use Doctrine\ORM\Persisters\Collection\CollectionPersister; +use Doctrine\ORM\PersistentCollection; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Cache\Region; +use Doctrine\Common\Util\ClassUtils; + +/** + * @author Fabio B. Silva + * @author Guilherme Blanco + * @since 2.5 + */ +abstract class AbstractCollectionPersister implements CachedCollectionPersister +{ + /** + * @var \Doctrine\ORM\UnitOfWork + */ + protected $uow; + + /** + * @var \Doctrine\ORM\Mapping\ClassMetadataFactory + */ + protected $metadataFactory; + + /** + * @var \Doctrine\ORM\Persisters\Collection\CollectionPersister + */ + protected $persister; + + /** + * @var \Doctrine\ORM\Mapping\ClassMetadata + */ + protected $sourceEntity; + + /** + * @var \Doctrine\ORM\Mapping\ClassMetadata + */ + protected $targetEntity; + + /** + * @var array + */ + protected $association; + + /** + * @var array + */ + protected $queuedCache = array(); + + /** + * @var \Doctrine\ORM\Cache\Region + */ + protected $region; + + /** + * @var string + */ + protected $regionName; + + /** + * @var \Doctrine\ORM\Cache\CollectionHydrator + */ + protected $hydrator; + + /** + * @var \Doctrine\ORM\Cache\Logging\CacheLogger + */ + protected $cacheLogger; + + /** + * @param \Doctrine\ORM\Persisters\Collection\CollectionPersister $persister The collection persister that will be cached. + * @param \Doctrine\ORM\Cache\Region $region The collection region. + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param array $association The association mapping. + */ + public function __construct(CollectionPersister $persister, Region $region, EntityManagerInterface $em, array $association) + { + $configuration = $em->getConfiguration(); + $cacheConfig = $configuration->getSecondLevelCacheConfiguration(); + $cacheFactory = $cacheConfig->getCacheFactory(); + + $this->region = $region; + $this->persister = $persister; + $this->association = $association; + $this->regionName = $region->getName(); + $this->uow = $em->getUnitOfWork(); + $this->metadataFactory = $em->getMetadataFactory(); + $this->cacheLogger = $cacheConfig->getCacheLogger(); + $this->hydrator = $cacheFactory->buildCollectionHydrator($em, $association); + $this->sourceEntity = $em->getClassMetadata($association['sourceEntity']); + $this->targetEntity = $em->getClassMetadata($association['targetEntity']); + } + + /** + * {@inheritdoc} + */ + public function getCacheRegion() + { + return $this->region; + } + + /** + * {@inheritdoc} + */ + public function getSourceEntityMetadata() + { + return $this->sourceEntity; + } + + /** + * {@inheritdoc} + */ + public function getTargetEntityMetadata() + { + return $this->targetEntity; + } + + /** + * @param \Doctrine\ORM\PersistentCollection $collection + * @param \Doctrine\ORM\Cache\CollectionCacheKey $key + * + * @return \Doctrine\ORM\PersistentCollection|null + */ + public function loadCollectionCache(PersistentCollection $collection, CollectionCacheKey $key) + { + if (($cache = $this->region->get($key)) === null) { + return null; + } + + if (($cache = $this->hydrator->loadCacheEntry($this->sourceEntity, $key, $cache, $collection)) === null) { + return null; + } + + return $cache; + } + + /** + * {@inheritdoc} + */ + public function storeCollectionCache(CollectionCacheKey $key, $elements) + { + /* @var $targetPersister CachedEntityPersister */ + $associationMapping = $this->sourceEntity->associationMappings[$key->association]; + $targetPersister = $this->uow->getEntityPersister($this->targetEntity->rootEntityName); + $targetRegion = $targetPersister->getCacheRegion(); + $targetHydrator = $targetPersister->getEntityHydrator(); + + // Only preserve ordering if association configured it + if ( ! (isset($associationMapping['indexBy']) && $associationMapping['indexBy'])) { + // Elements may be an array or a Collection + $elements = array_values(is_array($elements) ? $elements : $elements->getValues()); + } + + $entry = $this->hydrator->buildCacheEntry($this->targetEntity, $key, $elements); + + foreach ($entry->identifiers as $index => $entityKey) { + if ($targetRegion->contains($entityKey)) { + continue; + } + + $class = $this->targetEntity; + $className = ClassUtils::getClass($elements[$index]); + + if ($className !== $this->targetEntity->name) { + $class = $this->metadataFactory->getMetadataFor($className); + } + + $entity = $elements[$index]; + $entityEntry = $targetHydrator->buildCacheEntry($class, $entityKey, $entity); + + $targetRegion->put($entityKey, $entityEntry); + } + + $cached = $this->region->put($key, $entry); + + if ($this->cacheLogger && $cached) { + $this->cacheLogger->collectionCachePut($this->regionName, $key); + } + } + + /** + * {@inheritdoc} + */ + public function contains(PersistentCollection $collection, $element) + { + return $this->persister->contains($collection, $element); + } + + /** + * {@inheritdoc} + */ + public function containsKey(PersistentCollection $collection, $key) + { + return $this->persister->containsKey($collection, $key); + } + + /** + * {@inheritdoc} + */ + public function count(PersistentCollection $collection) + { + $ownerId = $this->uow->getEntityIdentifier($collection->getOwner()); + $key = new CollectionCacheKey($this->sourceEntity->rootEntityName, $this->association['fieldName'], $ownerId); + $entry = $this->region->get($key); + + if ($entry !== null) { + return count($entry->identifiers); + } + + return $this->persister->count($collection); + } + + /** + * {@inheritdoc} + */ + public function get(PersistentCollection $collection, $index) + { + return $this->persister->get($collection, $index); + } + + /** + * {@inheritdoc} + */ + public function removeElement(PersistentCollection $collection, $element) + { + if ($persisterResult = $this->persister->removeElement($collection, $element)) { + $this->evictCollectionCache($collection); + $this->evictElementCache($this->sourceEntity->rootEntityName, $collection->getOwner()); + $this->evictElementCache($this->targetEntity->rootEntityName, $element); + } + + return $persisterResult; + } + + /** + * {@inheritdoc} + */ + public function slice(PersistentCollection $collection, $offset, $length = null) + { + return $this->persister->slice($collection, $offset, $length); + } + + /** + * {@inheritDoc} + */ + public function loadCriteria(PersistentCollection $collection, Criteria $criteria) + { + return $this->persister->loadCriteria($collection, $criteria); + } + + /** + * Clears cache entries related to the current collection + * + * @param PersistentCollection $collection + */ + protected function evictCollectionCache(PersistentCollection $collection) + { + $key = new CollectionCacheKey( + $this->sourceEntity->rootEntityName, + $this->association['fieldName'], + $this->uow->getEntityIdentifier($collection->getOwner()) + ); + + $this->region->evict($key); + + if ($this->cacheLogger) { + $this->cacheLogger->collectionCachePut($this->regionName, $key); + } + } + + /** + * @param string $targetEntity + * @param object $element + */ + protected function evictElementCache($targetEntity, $element) + { + /* @var $targetPersister CachedEntityPersister */ + $targetPersister = $this->uow->getEntityPersister($targetEntity); + $targetRegion = $targetPersister->getCacheRegion(); + $key = new EntityCacheKey($targetEntity, $this->uow->getEntityIdentifier($element)); + + $targetRegion->evict($key); + + if ($this->cacheLogger) { + $this->cacheLogger->entityCachePut($targetRegion->getName(), $key); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/CachedCollectionPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/CachedCollectionPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..5722027c49d2472b710d9b615cbbdec2ac88f527 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/CachedCollectionPersister.php @@ -0,0 +1,65 @@ +. + */ + +namespace Doctrine\ORM\Cache\Persister\Collection; + +use Doctrine\ORM\Cache\CollectionCacheKey; +use Doctrine\ORM\Cache\Persister\CachedPersister; +use Doctrine\ORM\Persisters\Collection\CollectionPersister; +use Doctrine\ORM\PersistentCollection; + +/** + * Interface for second level cache collection persisters. + * + * @author Fabio B. Silva + * @since 2.5 + */ +interface CachedCollectionPersister extends CachedPersister, CollectionPersister +{ + /** + * @return \Doctrine\ORM\Mapping\ClassMetadata + */ + public function getSourceEntityMetadata(); + + /** + * @return \Doctrine\ORM\Mapping\ClassMetadata + */ + public function getTargetEntityMetadata(); + + /** + * Loads a collection from cache + * + * @param \Doctrine\ORM\PersistentCollection $collection + * @param \Doctrine\ORM\Cache\CollectionCacheKey $key + * + * @return \Doctrine\ORM\PersistentCollection|null + */ + public function loadCollectionCache(PersistentCollection $collection, CollectionCacheKey $key); + + /** + * Stores a collection into cache + * + * @param \Doctrine\ORM\Cache\CollectionCacheKey $key + * @param array|\Doctrine\Common\Collections\Collection $elements + * + * @return void + */ + public function storeCollectionCache(CollectionCacheKey $key, $elements); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..86e5c8f9ffd0ae59ba11261063fe1cae1e2907be --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php @@ -0,0 +1,104 @@ +. + */ + +namespace Doctrine\ORM\Cache\Persister\Collection; + +use Doctrine\ORM\Cache\CollectionCacheKey; +use Doctrine\ORM\PersistentCollection; + +/** + * @author Fabio B. Silva + * @since 2.5 + */ +class NonStrictReadWriteCachedCollectionPersister extends AbstractCollectionPersister +{ + /** + * {@inheritdoc} + */ + public function afterTransactionComplete() + { + if (isset($this->queuedCache['update'])) { + foreach ($this->queuedCache['update'] as $item) { + $this->storeCollectionCache($item['key'], $item['list']); + } + } + + if (isset($this->queuedCache['delete'])) { + foreach ($this->queuedCache['delete'] as $key) { + $this->region->evict($key); + } + } + + $this->queuedCache = array(); + } + + /** + * {@inheritdoc} + */ + public function afterTransactionRolledBack() + { + $this->queuedCache = array(); + } + + /** + * {@inheritdoc} + */ + public function delete(PersistentCollection $collection) + { + $ownerId = $this->uow->getEntityIdentifier($collection->getOwner()); + $key = new CollectionCacheKey($this->sourceEntity->rootEntityName, $this->association['fieldName'], $ownerId); + + $this->persister->delete($collection); + + $this->queuedCache['delete'][spl_object_hash($collection)] = $key; + } + + /** + * {@inheritdoc} + */ + public function update(PersistentCollection $collection) + { + $isInitialized = $collection->isInitialized(); + $isDirty = $collection->isDirty(); + + if ( ! $isInitialized && ! $isDirty) { + return; + } + + $ownerId = $this->uow->getEntityIdentifier($collection->getOwner()); + $key = new CollectionCacheKey($this->sourceEntity->rootEntityName, $this->association['fieldName'], $ownerId); + + // Invalidate non initialized collections OR ordered collection + if ($isDirty && ! $isInitialized || isset($this->association['orderBy'])) { + $this->persister->update($collection); + + $this->queuedCache['delete'][spl_object_hash($collection)] = $key; + + return; + } + + $this->persister->update($collection); + + $this->queuedCache['update'][spl_object_hash($collection)] = array( + 'key' => $key, + 'list' => $collection + ); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/ReadOnlyCachedCollectionPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/ReadOnlyCachedCollectionPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..4f35ceb10dcfd902e2a9bb3e406581164ad9be32 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/ReadOnlyCachedCollectionPersister.php @@ -0,0 +1,44 @@ +. + */ + +namespace Doctrine\ORM\Cache\Persister\Collection; + +use Doctrine\ORM\PersistentCollection; +use Doctrine\ORM\Cache\CacheException; +use Doctrine\Common\Util\ClassUtils; + +/** + * @author Fabio B. Silva + * @since 2.5 + */ +class ReadOnlyCachedCollectionPersister extends NonStrictReadWriteCachedCollectionPersister +{ + /** + * {@inheritdoc} + */ + public function update(PersistentCollection $collection) + { + if ($collection->isDirty() && count($collection->getSnapshot()) > 0) { + throw CacheException::updateReadOnlyCollection(ClassUtils::getClass($collection->getOwner()), $this->association['fieldName']); + } + + parent::update($collection); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..a92ed20d30248a273900075bbed7b4d4351962ba --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php @@ -0,0 +1,134 @@ +. + */ + +namespace Doctrine\ORM\Cache\Persister\Collection; + +use Doctrine\ORM\Persisters\Collection\CollectionPersister; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Cache\CollectionCacheKey; +use Doctrine\ORM\Cache\ConcurrentRegion; +use Doctrine\ORM\PersistentCollection; + +/** + * @author Fabio B. Silva + * @since 2.5 + */ +class ReadWriteCachedCollectionPersister extends AbstractCollectionPersister +{ + /** + * @param \Doctrine\ORM\Persisters\Collection\CollectionPersister $persister The collection persister that will be cached. + * @param \Doctrine\ORM\Cache\ConcurrentRegion $region The collection region. + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param array $association The association mapping. + */ + public function __construct(CollectionPersister $persister, ConcurrentRegion $region, EntityManagerInterface $em, array $association) + { + parent::__construct($persister, $region, $em, $association); + } + + /** + * {@inheritdoc} + */ + public function afterTransactionComplete() + { + if (isset($this->queuedCache['update'])) { + foreach ($this->queuedCache['update'] as $item) { + $this->region->evict($item['key']); + } + } + + if (isset($this->queuedCache['delete'])) { + foreach ($this->queuedCache['delete'] as $item) { + $this->region->evict($item['key']); + } + } + + $this->queuedCache = array(); + } + + /** + * {@inheritdoc} + */ + public function afterTransactionRolledBack() + { + if (isset($this->queuedCache['update'])) { + foreach ($this->queuedCache['update'] as $item) { + $this->region->evict($item['key']); + } + } + + if (isset($this->queuedCache['delete'])) { + foreach ($this->queuedCache['delete'] as $item) { + $this->region->evict($item['key']); + } + } + + $this->queuedCache = array(); + } + + /** + * {@inheritdoc} + */ + public function delete(PersistentCollection $collection) + { + $ownerId = $this->uow->getEntityIdentifier($collection->getOwner()); + $key = new CollectionCacheKey($this->sourceEntity->rootEntityName, $this->association['fieldName'], $ownerId); + $lock = $this->region->lock($key); + + $this->persister->delete($collection); + + if ($lock === null) { + return; + } + + $this->queuedCache['delete'][spl_object_hash($collection)] = array( + 'key' => $key, + 'lock' => $lock + ); + } + + /** + * {@inheritdoc} + */ + public function update(PersistentCollection $collection) + { + $isInitialized = $collection->isInitialized(); + $isDirty = $collection->isDirty(); + + if ( ! $isInitialized && ! $isDirty) { + return; + } + + $this->persister->update($collection); + + $ownerId = $this->uow->getEntityIdentifier($collection->getOwner()); + $key = new CollectionCacheKey($this->sourceEntity->rootEntityName, $this->association['fieldName'], $ownerId); + $lock = $this->region->lock($key); + + if ($lock === null) { + return; + } + + $this->queuedCache['update'][spl_object_hash($collection)] = array( + 'key' => $key, + 'lock' => $lock + ); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/AbstractEntityPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/AbstractEntityPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..0a5aa1c656b21e93e00477dc9a837e2e356d1744 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/AbstractEntityPersister.php @@ -0,0 +1,645 @@ +. + */ + +namespace Doctrine\ORM\Cache\Persister\Entity; + +use Doctrine\ORM\Cache; +use Doctrine\ORM\Cache\Region; +use Doctrine\ORM\Cache\EntityCacheKey; +use Doctrine\ORM\Cache\CollectionCacheKey; +use Doctrine\ORM\Cache\TimestampCacheKey; +use Doctrine\ORM\Cache\QueryCacheKey; +use Doctrine\ORM\Cache\Persister\CachedPersister; +use Doctrine\ORM\Cache\CacheException; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\PersistentCollection; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Persisters\Entity\EntityPersister; + +use Doctrine\Common\Util\ClassUtils; +use Doctrine\Common\Collections\Criteria; + +/** + * @author Fabio B. Silva + * @since 2.5 + */ +abstract class AbstractEntityPersister implements CachedEntityPersister +{ + /** + * @var \Doctrine\ORM\UnitOfWork + */ + protected $uow; + + /** + * @var \Doctrine\ORM\Mapping\ClassMetadataFactory + */ + protected $metadataFactory; + + /** + * @var \Doctrine\ORM\Persisters\Entity\EntityPersister + */ + protected $persister; + + /** + * @var \Doctrine\ORM\Mapping\ClassMetadata + */ + protected $class; + + /** + * @var array + */ + protected $queuedCache = array(); + + /** + * @var \Doctrine\ORM\Cache\Region + */ + protected $region; + + /** + * @var \Doctrine\ORM\Cache\TimestampRegion + */ + protected $timestampRegion; + + /** + * @var \Doctrine\ORM\Cache\TimestampCacheKey + */ + protected $timestampKey; + + /** + * @var \Doctrine\ORM\Cache\EntityHydrator + */ + protected $hydrator; + + /** + * @var \Doctrine\ORM\Cache + */ + protected $cache; + + /** + * @var \Doctrine\ORM\Cache\Logging\CacheLogger + */ + protected $cacheLogger; + + /** + * @var string + */ + protected $regionName; + + /** + * Associations configured as FETCH_EAGER, as well as all inverse one-to-one associations. + * + * @var array + */ + protected $joinedAssociations; + + /** + * @param \Doctrine\ORM\Persisters\Entity\EntityPersister $persister The entity persister to cache. + * @param \Doctrine\ORM\Cache\Region $region The entity cache region. + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param \Doctrine\ORM\Mapping\ClassMetadata $class The entity metadata. + */ + public function __construct(EntityPersister $persister, Region $region, EntityManagerInterface $em, ClassMetadata $class) + { + $configuration = $em->getConfiguration(); + $cacheConfig = $configuration->getSecondLevelCacheConfiguration(); + $cacheFactory = $cacheConfig->getCacheFactory(); + + $this->class = $class; + $this->region = $region; + $this->persister = $persister; + $this->cache = $em->getCache(); + $this->regionName = $region->getName(); + $this->uow = $em->getUnitOfWork(); + $this->metadataFactory = $em->getMetadataFactory(); + $this->cacheLogger = $cacheConfig->getCacheLogger(); + $this->timestampRegion = $cacheFactory->getTimestampRegion(); + $this->hydrator = $cacheFactory->buildEntityHydrator($em, $class); + $this->timestampKey = new TimestampCacheKey($this->class->rootEntityName); + } + + /** + * {@inheritdoc} + */ + public function addInsert($entity) + { + $this->persister->addInsert($entity); + } + + /** + * {@inheritdoc} + */ + public function getInserts() + { + return $this->persister->getInserts(); + } + + /** + * {@inheritdoc} + */ + public function getSelectSQL($criteria, $assoc = null, $lockMode = null, $limit = null, $offset = null, array $orderBy = null) + { + return $this->persister->getSelectSQL($criteria, $assoc, $lockMode, $limit, $offset, $orderBy); + } + + /** + * {@inheritDoc} + */ + public function getCountSQL($criteria = array()) + { + return $this->persister->getCountSQL($criteria); + } + + /** + * {@inheritdoc} + */ + public function getInsertSQL() + { + return $this->persister->getInsertSQL(); + } + + /** + * {@inheritdoc} + */ + public function getResultSetMapping() + { + return $this->persister->getResultSetMapping(); + } + + /** + * {@inheritdoc} + */ + public function getSelectConditionStatementSQL($field, $value, $assoc = null, $comparison = null) + { + return $this->persister->getSelectConditionStatementSQL($field, $value, $assoc, $comparison); + } + + /** + * {@inheritdoc} + */ + public function exists($entity, Criteria $extraConditions = null) + { + if (null === $extraConditions) { + $key = new EntityCacheKey($this->class->rootEntityName, $this->class->getIdentifierValues($entity)); + + if ($this->region->contains($key)) { + return true; + } + } + + return $this->persister->exists($entity, $extraConditions); + } + + /** + * {@inheritdoc} + */ + public function getCacheRegion() + { + return $this->region; + } + + /** + * @return \Doctrine\ORM\Cache\EntityHydrator + */ + public function getEntityHydrator() + { + return $this->hydrator; + } + + /** + * {@inheritdoc} + */ + public function storeEntityCache($entity, EntityCacheKey $key) + { + $class = $this->class; + $className = ClassUtils::getClass($entity); + + if ($className !== $this->class->name) { + $class = $this->metadataFactory->getMetadataFor($className); + } + + if ($class->containsForeignIdentifier) { + foreach ($class->associationMappings as $name => $assoc) { + if (!empty($assoc['id']) && !isset($assoc['cache'])) { + throw CacheException::nonCacheableEntityAssociation($class->name, $name); + } + } + } + + $entry = $this->hydrator->buildCacheEntry($class, $key, $entity); + $cached = $this->region->put($key, $entry); + + if ($this->cacheLogger && $cached) { + $this->cacheLogger->entityCachePut($this->regionName, $key); + } + + return $cached; + } + + /** + * @param object $entity + */ + private function storeJoinedAssociations($entity) + { + if ($this->joinedAssociations === null) { + $associations = array(); + + foreach ($this->class->associationMappings as $name => $assoc) { + if (isset($assoc['cache']) && + ($assoc['type'] & ClassMetadata::TO_ONE) && + ($assoc['fetch'] === ClassMetadata::FETCH_EAGER || ! $assoc['isOwningSide'])) { + + $associations[] = $name; + } + } + + $this->joinedAssociations = $associations; + } + + foreach ($this->joinedAssociations as $name) { + $assoc = $this->class->associationMappings[$name]; + $assocEntity = $this->class->getFieldValue($entity, $name); + + if ($assocEntity === null) { + continue; + } + + $assocId = $this->uow->getEntityIdentifier($assocEntity); + $assocKey = new EntityCacheKey($assoc['targetEntity'], $assocId); + $assocPersister = $this->uow->getEntityPersister($assoc['targetEntity']); + + $assocPersister->storeEntityCache($assocEntity, $assocKey); + } + } + + /** + * Generates a string of currently query + * + * @param array $query + * @param string $criteria + * @param array $orderBy + * @param integer $limit + * @param integer $offset + * + * @return string + */ + protected function getHash($query, $criteria, array $orderBy = null, $limit = null, $offset = null) + { + list($params) = ($criteria instanceof Criteria) + ? $this->persister->expandCriteriaParameters($criteria) + : $this->persister->expandParameters($criteria); + + return sha1($query . serialize($params) . serialize($orderBy) . $limit . $offset); + } + + /** + * {@inheritdoc} + */ + public function expandParameters($criteria) + { + return $this->persister->expandParameters($criteria); + } + + /** + * {@inheritdoc} + */ + public function expandCriteriaParameters(Criteria $criteria) + { + return $this->persister->expandCriteriaParameters($criteria); + } + + /** + * {@inheritdoc} + */ + public function getClassMetadata() + { + return $this->persister->getClassMetadata(); + } + + /** + * {@inheritdoc} + */ + public function getManyToManyCollection(array $assoc, $sourceEntity, $offset = null, $limit = null) + { + return $this->persister->getManyToManyCollection($assoc, $sourceEntity, $offset, $limit); + } + + /** + * {@inheritdoc} + */ + public function getOneToManyCollection(array $assoc, $sourceEntity, $offset = null, $limit = null) + { + return $this->persister->getOneToManyCollection($assoc, $sourceEntity, $offset, $limit); + } + + /** + * {@inheritdoc} + */ + public function getOwningTable($fieldName) + { + return $this->persister->getOwningTable($fieldName); + } + + /** + * {@inheritdoc} + */ + public function executeInserts() + { + $this->queuedCache['insert'] = $this->persister->getInserts(); + + return $this->persister->executeInserts(); + } + + /** + * {@inheritdoc} + */ + public function load(array $criteria, $entity = null, $assoc = null, array $hints = array(), $lockMode = null, $limit = null, array $orderBy = null) + { + if ($entity !== null || $assoc !== null || ! empty($hints) || $lockMode !== null) { + return $this->persister->load($criteria, $entity, $assoc, $hints, $lockMode, $limit, $orderBy); + } + + //handle only EntityRepository#findOneBy + $query = $this->persister->getSelectSQL($criteria, null, null, $limit, null, $orderBy); + $hash = $this->getHash($query, $criteria, null, null, null); + $rsm = $this->getResultSetMapping(); + $queryKey = new QueryCacheKey($hash, 0, Cache::MODE_NORMAL, $this->timestampKey); + $queryCache = $this->cache->getQueryCache($this->regionName); + $result = $queryCache->get($queryKey, $rsm); + + if ($result !== null) { + if ($this->cacheLogger) { + $this->cacheLogger->queryCacheHit($this->regionName, $queryKey); + } + + return $result[0]; + } + + if (($result = $this->persister->load($criteria, $entity, $assoc, $hints, $lockMode, $limit, $orderBy)) === null) { + return null; + } + + $cached = $queryCache->put($queryKey, $rsm, array($result)); + + if ($this->cacheLogger) { + if ($result) { + $this->cacheLogger->queryCacheMiss($this->regionName, $queryKey); + } + + if ($cached) { + $this->cacheLogger->queryCachePut($this->regionName, $queryKey); + } + } + + return $result; + } + + /** + * {@inheritdoc} + */ + public function loadAll(array $criteria = array(), array $orderBy = null, $limit = null, $offset = null) + { + $query = $this->persister->getSelectSQL($criteria, null, null, $limit, $offset, $orderBy); + $hash = $this->getHash($query, $criteria, null, null, null); + $rsm = $this->getResultSetMapping(); + $queryKey = new QueryCacheKey($hash, 0, Cache::MODE_NORMAL, $this->timestampKey); + $queryCache = $this->cache->getQueryCache($this->regionName); + $result = $queryCache->get($queryKey, $rsm); + + if ($result !== null) { + if ($this->cacheLogger) { + $this->cacheLogger->queryCacheHit($this->regionName, $queryKey); + } + + return $result; + } + + $result = $this->persister->loadAll($criteria, $orderBy, $limit, $offset); + $cached = $queryCache->put($queryKey, $rsm, $result); + + if ($this->cacheLogger) { + if ($result) { + $this->cacheLogger->queryCacheMiss($this->regionName, $queryKey); + } + + if ($cached) { + $this->cacheLogger->queryCachePut($this->regionName, $queryKey); + } + } + + return $result; + } + + /** + * {@inheritdoc} + */ + public function loadById(array $identifier, $entity = null) + { + $cacheKey = new EntityCacheKey($this->class->rootEntityName, $identifier); + $cacheEntry = $this->region->get($cacheKey); + $class = $this->class; + + if ($cacheEntry !== null) { + if ($cacheEntry->class !== $this->class->name) { + $class = $this->metadataFactory->getMetadataFor($cacheEntry->class); + } + + if (($entity = $this->hydrator->loadCacheEntry($class, $cacheKey, $cacheEntry, $entity)) !== null) { + if ($this->cacheLogger) { + $this->cacheLogger->entityCacheHit($this->regionName, $cacheKey); + } + + return $entity; + } + } + + $entity = $this->persister->loadById($identifier, $entity); + + if ($entity === null) { + return null; + } + + $class = $this->class; + $className = ClassUtils::getClass($entity); + + if ($className !== $this->class->name) { + $class = $this->metadataFactory->getMetadataFor($className); + } + + $cacheEntry = $this->hydrator->buildCacheEntry($class, $cacheKey, $entity); + $cached = $this->region->put($cacheKey, $cacheEntry); + + if ($cached && ($this->joinedAssociations === null || count($this->joinedAssociations) > 0)) { + $this->storeJoinedAssociations($entity); + } + + if ($this->cacheLogger) { + if ($cached) { + $this->cacheLogger->entityCachePut($this->regionName, $cacheKey); + } + + $this->cacheLogger->entityCacheMiss($this->regionName, $cacheKey); + } + + return $entity; + } + + /** + * {@inheritDoc} + */ + public function count($criteria = array()) + { + return $this->persister->count($criteria); + } + + /** + * {@inheritdoc} + */ + public function loadCriteria(Criteria $criteria) + { + $orderBy = $criteria->getOrderings(); + $limit = $criteria->getMaxResults(); + $offset = $criteria->getFirstResult(); + $query = $this->persister->getSelectSQL($criteria); + $hash = $this->getHash($query, $criteria, $orderBy, $limit, $offset); + $rsm = $this->getResultSetMapping(); + $queryKey = new QueryCacheKey($hash, 0, Cache::MODE_NORMAL, $this->timestampKey); + $queryCache = $this->cache->getQueryCache($this->regionName); + $cacheResult = $queryCache->get($queryKey, $rsm); + + if ($cacheResult !== null) { + if ($this->cacheLogger) { + $this->cacheLogger->queryCacheHit($this->regionName, $queryKey); + } + + return $cacheResult; + } + + $result = $this->persister->loadCriteria($criteria); + $cached = $queryCache->put($queryKey, $rsm, $result); + + if ($this->cacheLogger) { + if ($result) { + $this->cacheLogger->queryCacheMiss($this->regionName, $queryKey); + } + + if ($cached) { + $this->cacheLogger->queryCachePut($this->regionName, $queryKey); + } + } + + return $result; + } + + /** + * {@inheritdoc} + */ + public function loadManyToManyCollection(array $assoc, $sourceEntity, PersistentCollection $coll) + { + $persister = $this->uow->getCollectionPersister($assoc); + $hasCache = ($persister instanceof CachedPersister); + $key = null; + + if ($hasCache) { + $ownerId = $this->uow->getEntityIdentifier($coll->getOwner()); + $key = new CollectionCacheKey($assoc['sourceEntity'], $assoc['fieldName'], $ownerId); + $list = $persister->loadCollectionCache($coll, $key); + + if ($list !== null) { + if ($this->cacheLogger) { + $this->cacheLogger->collectionCacheHit($persister->getCacheRegion()->getName(), $key); + } + + return $list; + } + } + + $list = $this->persister->loadManyToManyCollection($assoc, $sourceEntity, $coll); + + if ($hasCache) { + $persister->storeCollectionCache($key, $list); + + if ($this->cacheLogger) { + $this->cacheLogger->collectionCacheMiss($persister->getCacheRegion()->getName(), $key); + } + } + + return $list; + } + + /** + * {@inheritdoc} + */ + public function loadOneToManyCollection(array $assoc, $sourceEntity, PersistentCollection $coll) + { + $persister = $this->uow->getCollectionPersister($assoc); + $hasCache = ($persister instanceof CachedPersister); + + if ($hasCache) { + $ownerId = $this->uow->getEntityIdentifier($coll->getOwner()); + $key = new CollectionCacheKey($assoc['sourceEntity'], $assoc['fieldName'], $ownerId); + $list = $persister->loadCollectionCache($coll, $key); + + if ($list !== null) { + if ($this->cacheLogger) { + $this->cacheLogger->collectionCacheHit($persister->getCacheRegion()->getName(), $key); + } + + return $list; + } + } + + $list = $this->persister->loadOneToManyCollection($assoc, $sourceEntity, $coll); + + if ($hasCache) { + $persister->storeCollectionCache($key, $list); + + if ($this->cacheLogger) { + $this->cacheLogger->collectionCacheMiss($persister->getCacheRegion()->getName(), $key); + } + } + + return $list; + } + + /** + * {@inheritdoc} + */ + public function loadOneToOneEntity(array $assoc, $sourceEntity, array $identifier = array()) + { + return $this->persister->loadOneToOneEntity($assoc, $sourceEntity, $identifier); + } + + /** + * {@inheritdoc} + */ + public function lock(array $criteria, $lockMode) + { + $this->persister->lock($criteria, $lockMode); + } + + /** + * {@inheritdoc} + */ + public function refresh(array $id, $entity, $lockMode = null) + { + $this->persister->refresh($id, $entity, $lockMode); + } + +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/CachedEntityPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/CachedEntityPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..0c9078cec723adfa4d2a3815b078abaeec4f4737 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/CachedEntityPersister.php @@ -0,0 +1,46 @@ +. + */ + +namespace Doctrine\ORM\Cache\Persister\Entity; + +use Doctrine\ORM\Cache\EntityCacheKey; +use Doctrine\ORM\Cache\Persister\CachedPersister; +use Doctrine\ORM\Persisters\Entity\EntityPersister; + +/** + * Interface for second level cache entity persisters. + * + * @author Fabio B. Silva + * @since 2.5 + */ +interface CachedEntityPersister extends CachedPersister, EntityPersister +{ + /** + * @return \Doctrine\ORM\Cache\EntityHydrator + */ + public function getEntityHydrator(); + + /** + * @param object $entity + * @param \Doctrine\ORM\Cache\EntityCacheKey $key + * @return boolean + */ + public function storeEntityCache($entity, EntityCacheKey $key); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..b4f63e560ed18945b9af507a1cfaa8dd0660c473 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersister.php @@ -0,0 +1,118 @@ +. + */ + +namespace Doctrine\ORM\Cache\Persister\Entity; + +use Doctrine\Common\Util\ClassUtils; +use Doctrine\ORM\Cache\EntityCacheKey; + +/** + * Specific non-strict read/write cached entity persister + * + * @author Fabio B. Silva + * @author Guilherme Blanco + * @since 2.5 + */ +class NonStrictReadWriteCachedEntityPersister extends AbstractEntityPersister +{ + /** + * {@inheritdoc} + */ + public function afterTransactionComplete() + { + $isChanged = false; + + if (isset($this->queuedCache['insert'])) { + foreach ($this->queuedCache['insert'] as $entity) { + $isChanged = $this->updateCache($entity, $isChanged); + } + } + + if (isset($this->queuedCache['update'])) { + foreach ($this->queuedCache['update'] as $entity) { + $isChanged = $this->updateCache($entity, $isChanged); + } + } + + if (isset($this->queuedCache['delete'])) { + foreach ($this->queuedCache['delete'] as $key) { + $this->region->evict($key); + + $isChanged = true; + } + } + + if ($isChanged) { + $this->timestampRegion->update($this->timestampKey); + } + + $this->queuedCache = array(); + } + + /** + * {@inheritdoc} + */ + public function afterTransactionRolledBack() + { + $this->queuedCache = array(); + } + + /** + * {@inheritdoc} + */ + public function delete($entity) + { + $key = new EntityCacheKey($this->class->rootEntityName, $this->uow->getEntityIdentifier($entity)); + $deleted = $this->persister->delete($entity); + + if ($deleted) { + $this->region->evict($key); + } + + $this->queuedCache['delete'][] = $key; + + return $deleted; + } + + /** + * {@inheritdoc} + */ + public function update($entity) + { + $this->persister->update($entity); + + $this->queuedCache['update'][] = $entity; + } + + private function updateCache($entity, $isChanged) + { + $class = $this->metadataFactory->getMetadataFor(get_class($entity)); + $key = new EntityCacheKey($class->rootEntityName, $this->uow->getEntityIdentifier($entity)); + $entry = $this->hydrator->buildCacheEntry($class, $key, $entity); + $cached = $this->region->put($key, $entry); + $isChanged = $isChanged ?: $cached; + + if ($this->cacheLogger && $cached) { + $this->cacheLogger->entityCachePut($this->regionName, $key); + } + + return $isChanged; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..ce93d7b0e61af8314628dd27a1aa1d38bd6779ec --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersister.php @@ -0,0 +1,41 @@ +. + */ + +namespace Doctrine\ORM\Cache\Persister\Entity; + +use Doctrine\ORM\Cache\CacheException; +use Doctrine\Common\Util\ClassUtils; + +/** + * Specific read-only region entity persister + * + * @author Fabio B. Silva + * @since 2.5 + */ +class ReadOnlyCachedEntityPersister extends NonStrictReadWriteCachedEntityPersister +{ + /** + * {@inheritdoc} + */ + public function update($entity) + { + throw CacheException::updateReadOnlyEntity(ClassUtils::getClass($entity)); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/ReadWriteCachedEntityPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/ReadWriteCachedEntityPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..07cac510d4c42a03a26e19235c28e053c1077ebf --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Persister/Entity/ReadWriteCachedEntityPersister.php @@ -0,0 +1,143 @@ +. + */ + +namespace Doctrine\ORM\Cache\Persister\Entity; + +use Doctrine\ORM\Persisters\Entity\EntityPersister; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Cache\ConcurrentRegion; +use Doctrine\ORM\Cache\EntityCacheKey; + +/** + * Specific read-write entity persister + * + * @author Fabio B. Silva + * @author Guilherme Blanco + * @since 2.5 + */ +class ReadWriteCachedEntityPersister extends AbstractEntityPersister +{ + /** + * @param \Doctrine\ORM\Persisters\Entity\EntityPersister $persister The entity persister to cache. + * @param \Doctrine\ORM\Cache\ConcurrentRegion $region The entity cache region. + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param \Doctrine\ORM\Mapping\ClassMetadata $class The entity metadata. + */ + public function __construct(EntityPersister $persister, ConcurrentRegion $region, EntityManagerInterface $em, ClassMetadata $class) + { + parent::__construct($persister, $region, $em, $class); + } + + /** + * {@inheritdoc} + */ + public function afterTransactionComplete() + { + $isChanged = true; + + if (isset($this->queuedCache['update'])) { + foreach ($this->queuedCache['update'] as $item) { + $this->region->evict($item['key']); + + $isChanged = true; + } + } + + if (isset($this->queuedCache['delete'])) { + foreach ($this->queuedCache['delete'] as $item) { + $this->region->evict($item['key']); + + $isChanged = true; + } + } + + if ($isChanged) { + $this->timestampRegion->update($this->timestampKey); + } + + $this->queuedCache = array(); + } + + /** + * {@inheritdoc} + */ + public function afterTransactionRolledBack() + { + if (isset($this->queuedCache['update'])) { + foreach ($this->queuedCache['update'] as $item) { + $this->region->evict($item['key']); + } + } + + if (isset($this->queuedCache['delete'])) { + foreach ($this->queuedCache['delete'] as $item) { + $this->region->evict($item['key']); + } + } + + $this->queuedCache = array(); + } + + /** + * {@inheritdoc} + */ + public function delete($entity) + { + $key = new EntityCacheKey($this->class->rootEntityName, $this->uow->getEntityIdentifier($entity)); + $lock = $this->region->lock($key); + $deleted = $this->persister->delete($entity); + + if ($deleted) { + $this->region->evict($key); + } + + if ($lock === null) { + return $deleted; + } + + $this->queuedCache['delete'][] = array( + 'lock' => $lock, + 'key' => $key + ); + + return $deleted; + } + + /** + * {@inheritdoc} + */ + public function update($entity) + { + $key = new EntityCacheKey($this->class->rootEntityName, $this->uow->getEntityIdentifier($entity)); + $lock = $this->region->lock($key); + + $this->persister->update($entity); + + if ($lock === null) { + return; + } + + $this->queuedCache['update'][] = array( + 'lock' => $lock, + 'key' => $key + ); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/QueryCache.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/QueryCache.php new file mode 100644 index 0000000000000000000000000000000000000000..dd5ef3bf539f5534e37506e402f5b5c45d42fbb6 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/QueryCache.php @@ -0,0 +1,62 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\ORM\Query\ResultSetMapping; + +/** + * Defines the contract for caches capable of storing query results. + * These caches should only concern themselves with storing the matching result ids. + * + * @since 2.5 + * @author Fabio B. Silva + */ +interface QueryCache +{ + /** + * @return boolean + */ + public function clear(); + + /** + * @param \Doctrine\ORM\Cache\QueryCacheKey $key + * @param \Doctrine\ORM\Query\ResultSetMapping $rsm + * @param mixed $result + * @param array $hints + * + * @return boolean + */ + public function put(QueryCacheKey $key, ResultSetMapping $rsm, $result, array $hints = array()); + + /** + * @param \Doctrine\ORM\Cache\QueryCacheKey $key + * @param \Doctrine\ORM\Query\ResultSetMapping $rsm + * @param array $hints + * + * @return array|null + */ + public function get(QueryCacheKey $key, ResultSetMapping $rsm, array $hints = array()); + + /** + * @return \Doctrine\ORM\Cache\Region + */ + public function getRegion(); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/QueryCacheEntry.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/QueryCacheEntry.php new file mode 100644 index 0000000000000000000000000000000000000000..a8a26f6d2d8d610b3f44bdcfc474f632c59b74ee --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/QueryCacheEntry.php @@ -0,0 +1,62 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Query cache entry + * + * @since 2.5 + * @author Fabio B. Silva + */ +class QueryCacheEntry implements CacheEntry +{ + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var array List of entity identifiers + */ + public $result; + + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var float Time creation of this cache entry + */ + public $time; + + /** + * @param array $result + * @param float $time + */ + public function __construct($result, $time = null) + { + $this->result = $result; + $this->time = $time ?: microtime(true); + } + + /** + * @param array $values + */ + public static function __set_state(array $values) + { + return new self($values['result'], $values['time']); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/QueryCacheKey.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/QueryCacheKey.php new file mode 100644 index 0000000000000000000000000000000000000000..0e072a36fc0d2c10da1cdfa1c6dcaa714ce18031 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/QueryCacheKey.php @@ -0,0 +1,71 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\ORM\Cache; + +/** + * A cache key that identifies a particular query. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class QueryCacheKey extends CacheKey +{ + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var integer Cache key lifetime + */ + public $lifetime; + + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var integer Cache mode (Doctrine\ORM\Cache::MODE_*) + */ + public $cacheMode; + + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var TimestampCacheKey|null + */ + public $timestampKey; + + /** + * @param string $hash Result cache id + * @param integer $lifetime Query lifetime + * @param int $cacheMode Query cache mode + * @param TimestampCacheKey|null $timestampKey + */ + public function __construct( + $hash, + $lifetime = 0, + $cacheMode = Cache::MODE_NORMAL, + TimestampCacheKey $timestampKey = null + ) { + $this->hash = $hash; + $this->lifetime = $lifetime; + $this->cacheMode = $cacheMode; + $this->timestampKey = $timestampKey; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/QueryCacheValidator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/QueryCacheValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..682a41ec4fae6d1b974959c093c347763a373095 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/QueryCacheValidator.php @@ -0,0 +1,40 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Cache query validator interface. + * + * @since 2.5 + * @author Fabio B. Silva + */ +interface QueryCacheValidator +{ + /** + * Checks if the query entry is valid + * + * @param \Doctrine\ORM\Cache\QueryCacheKey $key + * @param \Doctrine\ORM\Cache\QueryCacheEntry $entry + * + * @return boolean + */ + public function isValid(QueryCacheKey $key, QueryCacheEntry $entry); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region.php new file mode 100644 index 0000000000000000000000000000000000000000..3bffbbce74760be839353fd3263f60751042d3f3 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region.php @@ -0,0 +1,84 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Defines a contract for accessing a particular named region. + * + * @since 2.5 + * @author Fabio B. Silva + */ +interface Region extends MultiGetRegion +{ + /** + * Retrieve the name of this region. + * + * @return string The region name + */ + public function getName(); + + /** + * Determine whether this region contains data for the given key. + * + * @param \Doctrine\ORM\Cache\CacheKey $key The cache key + * + * @return boolean TRUE if the underlying cache contains corresponding data; FALSE otherwise. + */ + public function contains(CacheKey $key); + + /** + * Get an item from the cache. + * + * @param \Doctrine\ORM\Cache\CacheKey $key The key of the item to be retrieved. + * + * @return \Doctrine\ORM\Cache\CacheEntry|null The cached entry or NULL + * + * @throws \Doctrine\ORM\Cache\CacheException Indicates a problem accessing the item or region. + */ + public function get(CacheKey $key); + + /** + * Put an item into the cache. + * + * @param \Doctrine\ORM\Cache\CacheKey $key The key under which to cache the item. + * @param \Doctrine\ORM\Cache\CacheEntry $entry The entry to cache. + * @param \Doctrine\ORM\Cache\Lock $lock The lock previously obtained. + * + * @throws \Doctrine\ORM\Cache\CacheException Indicates a problem accessing the region. + */ + public function put(CacheKey $key, CacheEntry $entry, Lock $lock = null); + + /** + * Remove an item from the cache. + * + * @param \Doctrine\ORM\Cache\CacheKey $key The key under which to cache the item. + * + * @throws \Doctrine\ORM\Cache\CacheException Indicates a problem accessing the region. + */ + public function evict(CacheKey $key); + + /** + * Remove all contents of this particular cache region. + * + * @throws \Doctrine\ORM\Cache\CacheException Indicates problem accessing the region. + */ + public function evictAll(); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region/DefaultMultiGetRegion.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region/DefaultMultiGetRegion.php new file mode 100644 index 0000000000000000000000000000000000000000..7ecf7331116e8d148ba82f957146dc726ab34afe --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region/DefaultMultiGetRegion.php @@ -0,0 +1,77 @@ +. + */ + +namespace Doctrine\ORM\Cache\Region; + +use Doctrine\Common\Cache\MultiGetCache; +use Doctrine\ORM\Cache\Region; +use Doctrine\ORM\Cache\CollectionCacheEntry; + +/** + * A cache region that enables the retrieval of multiple elements with one call + * + * @since 2.5 + * @author Asmir Mustafic + */ +class DefaultMultiGetRegion extends DefaultRegion +{ + /** + * Note that the multiple type is due to doctrine/cache not integrating the MultiGetCache interface + * in its signature due to BC in 1.x + * + * @var MultiGetCache|\Doctrine\Common\Cache\Cache + */ + protected $cache; + + /** + * {@inheritDoc} + * + * @param MultiGetCache $cache + */ + public function __construct($name, MultiGetCache $cache, $lifetime = 0) + { + /* @var $cache \Doctrine\Common\Cache\Cache */ + parent::__construct($name, $cache, $lifetime); + } + + /** + * {@inheritdoc} + */ + public function getMultiple(CollectionCacheEntry $collection) + { + $keysToRetrieve = array(); + + foreach ($collection->identifiers as $index => $key) { + $keysToRetrieve[$index] = $this->getCacheEntryKey($key); + } + + $items = $this->cache->fetchMultiple($keysToRetrieve); + if (count($items) !== count($keysToRetrieve)) { + return null; + } + + $returnableItems = array(); + foreach ($keysToRetrieve as $index => $key) { + $returnableItems[$index] = $items[$key]; + } + + return $returnableItems; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region/DefaultRegion.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region/DefaultRegion.php new file mode 100644 index 0000000000000000000000000000000000000000..3f214d0b0e9bffa1953f192b88f4052b7ca7f1c8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region/DefaultRegion.php @@ -0,0 +1,160 @@ +. + */ + +namespace Doctrine\ORM\Cache\Region; + +use Doctrine\Common\Cache\Cache as CacheAdapter; +use Doctrine\Common\Cache\ClearableCache; +use Doctrine\ORM\Cache\CacheEntry; +use Doctrine\ORM\Cache\CacheKey; +use Doctrine\ORM\Cache\CollectionCacheEntry; +use Doctrine\ORM\Cache\Lock; +use Doctrine\ORM\Cache\Region; + +/** + * The simplest cache region compatible with all doctrine-cache drivers. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class DefaultRegion implements Region +{ + const REGION_KEY_SEPARATOR = '_'; + + /** + * @var CacheAdapter + */ + protected $cache; + + /** + * @var string + */ + protected $name; + + /** + * @var integer + */ + protected $lifetime = 0; + + /** + * @param string $name + * @param CacheAdapter $cache + * @param integer $lifetime + */ + public function __construct($name, CacheAdapter $cache, $lifetime = 0) + { + $this->cache = $cache; + $this->name = (string) $name; + $this->lifetime = (integer) $lifetime; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->name; + } + + /** + * @return \Doctrine\Common\Cache\CacheProvider + */ + public function getCache() + { + return $this->cache; + } + + /** + * {@inheritdoc} + */ + public function contains(CacheKey $key) + { + return $this->cache->contains($this->getCacheEntryKey($key)); + } + + /** + * {@inheritdoc} + */ + public function get(CacheKey $key) + { + return $this->cache->fetch($this->getCacheEntryKey($key)) ?: null; + } + + /** + * {@inheritdoc} + */ + public function getMultiple(CollectionCacheEntry $collection) + { + $result = array(); + + foreach ($collection->identifiers as $key) { + $entryKey = $this->getCacheEntryKey($key); + $entryValue = $this->cache->fetch($entryKey); + + if ($entryValue === false) { + return null; + } + + $result[] = $entryValue; + } + + return $result; + } + + /** + * @param CacheKey $key + * @return string + */ + protected function getCacheEntryKey(CacheKey $key) + { + return $this->name . self::REGION_KEY_SEPARATOR . $key->hash; + } + + /** + * {@inheritdoc} + */ + public function put(CacheKey $key, CacheEntry $entry, Lock $lock = null) + { + return $this->cache->save($this->getCacheEntryKey($key), $entry, $this->lifetime); + } + + /** + * {@inheritdoc} + */ + public function evict(CacheKey $key) + { + return $this->cache->delete($this->getCacheEntryKey($key)); + } + + /** + * {@inheritdoc} + */ + public function evictAll() + { + if (! $this->cache instanceof ClearableCache) { + throw new \BadMethodCallException(sprintf( + 'Clearing all cache entries is not supported by the supplied cache adapter of type %s', + get_class($this->cache) + )); + } + + return $this->cache->deleteAll(); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region/FileLockRegion.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region/FileLockRegion.php new file mode 100644 index 0000000000000000000000000000000000000000..d8d4b26948d36c65851e75d23c68aec552d982d5 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region/FileLockRegion.php @@ -0,0 +1,265 @@ +. + */ + +namespace Doctrine\ORM\Cache\Region; + +use Doctrine\ORM\Cache\CollectionCacheEntry; +use Doctrine\ORM\Cache\Lock; +use Doctrine\ORM\Cache\Region; +use Doctrine\ORM\Cache\CacheKey; +use Doctrine\ORM\Cache\CacheEntry; +use Doctrine\ORM\Cache\ConcurrentRegion; + +/** + * Very naive concurrent region, based on file locks. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class FileLockRegion implements ConcurrentRegion +{ + const LOCK_EXTENSION = 'lock'; + + /** + * var \Doctrine\ORM\Cache\Region + */ + private $region; + + /** + * @var string + */ + private $directory; + + /** + * var integer + */ + private $lockLifetime; + + /** + * @param \Doctrine\ORM\Cache\Region $region + * @param string $directory + * @param string $lockLifetime + * + * @throws \InvalidArgumentException + */ + public function __construct(Region $region, $directory, $lockLifetime) + { + if ( ! is_dir($directory) && ! @mkdir($directory, 0775, true)) { + throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist and could not be created.', $directory)); + } + + if ( ! is_writable($directory)) { + throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable.', $directory)); + } + + $this->region = $region; + $this->directory = $directory; + $this->lockLifetime = $lockLifetime; + } + + /** + * @param \Doctrine\ORM\Cache\CacheKey $key + * @param \Doctrine\ORM\Cache\Lock $lock + * + * @return boolean + */ + private function isLocked(CacheKey $key, Lock $lock = null) + { + $filename = $this->getLockFileName($key); + + if ( ! is_file($filename)) { + return false; + } + + $time = $this->getLockTime($filename); + $content = $this->getLockContent($filename); + + if ( ! $content || ! $time) { + @unlink($filename); + + return false; + } + + if ($lock && $content === $lock->value) { + return false; + } + + // outdated lock + if (($time + $this->lockLifetime) <= time()) { + @unlink($filename); + + return false; + } + + return true; + } + + /** + * @param \Doctrine\ORM\Cache\CacheKey $key + * + * return string + */ + private function getLockFileName(CacheKey $key) + { + return $this->directory . DIRECTORY_SEPARATOR . $key->hash . '.' . self::LOCK_EXTENSION; + } + + /** + * @param string $filename + * + * return string + */ + private function getLockContent($filename) + { + return @file_get_contents($filename); + } + + /** + * @param string $filename + * + * return integer + */ + private function getLockTime($filename) + { + return @fileatime($filename); + } + + /** + * {inheritdoc} + */ + public function getName() + { + return $this->region->getName(); + } + + /** + * {inheritdoc} + */ + public function contains(CacheKey $key) + { + if ($this->isLocked($key)) { + return false; + } + + return $this->region->contains($key); + } + + /** + * {inheritdoc} + */ + public function get(CacheKey $key) + { + if ($this->isLocked($key)) { + return null; + } + + return $this->region->get($key); + } + + /** + * {@inheritdoc} + */ + public function getMultiple(CollectionCacheEntry $collection) + { + if (array_filter(array_map([$this, 'isLocked'], $collection->identifiers))) { + return null; + } + + return $this->region->getMultiple($collection); + } + + /** + * {inheritdoc} + */ + public function put(CacheKey $key, CacheEntry $entry, Lock $lock = null) + { + if ($this->isLocked($key, $lock)) { + return false; + } + + return $this->region->put($key, $entry); + } + + /** + * {inheritdoc} + */ + public function evict(CacheKey $key) + { + if ($this->isLocked($key)) { + @unlink($this->getLockFileName($key)); + } + + return $this->region->evict($key); + } + + /** + * {inheritdoc} + */ + public function evictAll() + { + // The check below is necessary because on some platforms glob returns false + // when nothing matched (even though no errors occurred) + $filenames = glob(sprintf("%s/*.%s" , $this->directory, self::LOCK_EXTENSION)); + + if ($filenames) { + foreach ($filenames as $filename) { + @unlink($filename); + } + } + + return $this->region->evictAll(); + } + + /** + * {inheritdoc} + */ + public function lock(CacheKey $key) + { + if ($this->isLocked($key)) { + return null; + } + + $lock = Lock::createLockRead(); + $filename = $this->getLockFileName($key); + + if ( ! @file_put_contents($filename, $lock->value, LOCK_EX)) { + return null; + } + chmod($filename, 0664); + + return $lock; + } + + /** + * {inheritdoc} + */ + public function unlock(CacheKey $key, Lock $lock) + { + if ($this->isLocked($key, $lock)) { + return false; + } + + if ( ! @unlink($this->getLockFileName($key))) { + return false; + } + + return true; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region/UpdateTimestampCache.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region/UpdateTimestampCache.php new file mode 100644 index 0000000000000000000000000000000000000000..dfdf9062aa3c2631b55a21fc3dff7d7e10ec50eb --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/Region/UpdateTimestampCache.php @@ -0,0 +1,42 @@ +. + */ + +namespace Doctrine\ORM\Cache\Region; + +use Doctrine\ORM\Cache\TimestampCacheEntry; +use Doctrine\ORM\Cache\TimestampRegion; +use Doctrine\ORM\Cache\CacheKey; + +/** + * Tracks the timestamps of the most recent updates to particular keys. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class UpdateTimestampCache extends DefaultRegion implements TimestampRegion +{ + /** + * {@inheritdoc} + */ + public function update(CacheKey $key) + { + $this->put($key, new TimestampCacheEntry); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/RegionsConfiguration.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/RegionsConfiguration.php new file mode 100644 index 0000000000000000000000000000000000000000..0d060636cf19ace120d767fddb7639ea02b78d05 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/RegionsConfiguration.php @@ -0,0 +1,134 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Cache regions configuration + * + * @since 2.5 + * @author Fabio B. Silva + */ +class RegionsConfiguration +{ + /** + * @var array + */ + private $lifetimes = array(); + + /** + * @var array + */ + private $lockLifetimes = array(); + + /** + * @var integer + */ + private $defaultLifetime; + + /** + * @var integer + */ + private $defaultLockLifetime; + + /** + * @param integer $defaultLifetime + * @param integer $defaultLockLifetime + */ + public function __construct($defaultLifetime = 3600, $defaultLockLifetime = 60) + { + $this->defaultLifetime = (integer) $defaultLifetime; + $this->defaultLockLifetime = (integer) $defaultLockLifetime; + } + + /** + * @return integer + */ + public function getDefaultLifetime() + { + return $this->defaultLifetime; + } + + /** + * @param integer $defaultLifetime + */ + public function setDefaultLifetime($defaultLifetime) + { + $this->defaultLifetime = (integer) $defaultLifetime; + } + + /** + * @return integer + */ + public function getDefaultLockLifetime() + { + return $this->defaultLockLifetime; + } + + /** + * @param integer $defaultLockLifetime + */ + public function setDefaultLockLifetime($defaultLockLifetime) + { + $this->defaultLockLifetime = (integer) $defaultLockLifetime; + } + + /** + * @param string $regionName + * + * @return integer + */ + public function getLifetime($regionName) + { + return isset($this->lifetimes[$regionName]) + ? $this->lifetimes[$regionName] + : $this->defaultLifetime; + } + + /** + * @param string $name + * @param integer $lifetime + */ + public function setLifetime($name, $lifetime) + { + $this->lifetimes[$name] = (integer) $lifetime; + } + + /** + * @param string $regionName + * + * @return integer + */ + public function getLockLifetime($regionName) + { + return isset($this->lockLifetimes[$regionName]) + ? $this->lockLifetimes[$regionName] + : $this->defaultLockLifetime; + } + + /** + * @param string $name + * @param integer $lifetime + */ + public function setLockLifetime($name, $lifetime) + { + $this->lockLifetimes[$name] = (integer) $lifetime; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/TimestampCacheEntry.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/TimestampCacheEntry.php new file mode 100644 index 0000000000000000000000000000000000000000..9d15c84b3847b267f68da72d50dc946bd07a0e59 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/TimestampCacheEntry.php @@ -0,0 +1,57 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Timestamp cache entry + * + * @since 2.5 + * @author Fabio B. Silva + */ +class TimestampCacheEntry implements CacheEntry +{ + /** + * READ-ONLY: Public only for performance reasons, it should be considered immutable. + * + * @var float + */ + public $time; + + /** + * @param float $time + */ + public function __construct($time = null) + { + $this->time = $time ? (float)$time : microtime(true); + } + + /** + * Creates a new TimestampCacheEntry + * + * This method allow Doctrine\Common\Cache\PhpFileCache compatibility + * + * @param array $values array containing property values + */ + public static function __set_state(array $values) + { + return new self($values['time']); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/TimestampCacheKey.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/TimestampCacheKey.php new file mode 100644 index 0000000000000000000000000000000000000000..dfa72274b234b71bd52d381520035aaf7c27d9d0 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/TimestampCacheKey.php @@ -0,0 +1,38 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * A key that identifies a timestamped space. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class TimestampCacheKey extends CacheKey +{ + /** + * @param string $space Result cache id + */ + public function __construct($space) + { + $this->hash = (string) $space; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/TimestampQueryCacheValidator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/TimestampQueryCacheValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..c6404d3b25dccb0a59b06f1d6fda2713474412d7 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/TimestampQueryCacheValidator.php @@ -0,0 +1,74 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * @since 2.5 + * @author Fabio B. Silva + */ +class TimestampQueryCacheValidator implements QueryCacheValidator +{ + /** + * @var TimestampRegion + */ + private $timestampRegion; + + /** + * @param TimestampRegion $timestampRegion + */ + public function __construct(TimestampRegion $timestampRegion) + { + $this->timestampRegion = $timestampRegion; + } + + /** + * {@inheritdoc} + */ + public function isValid(QueryCacheKey $key, QueryCacheEntry $entry) + { + if ($this->regionUpdated($key, $entry)) { + return false; + } + + if ($key->lifetime == 0) { + return true; + } + + return ($entry->time + $key->lifetime) > microtime(true); + } + + /** + * @param QueryCacheKey $key + * @param QueryCacheEntry $entry + * + * @return bool + */ + private function regionUpdated(QueryCacheKey $key, QueryCacheEntry $entry) + { + if ($key->timestampKey === null) { + return false; + } + + $timestamp = $this->timestampRegion->get($key->timestampKey); + + return $timestamp && $timestamp->time > $entry->time; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/TimestampRegion.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/TimestampRegion.php new file mode 100644 index 0000000000000000000000000000000000000000..9e0c25ca6abcb3447af45db81beae6580d07995d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/TimestampRegion.php @@ -0,0 +1,39 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +/** + * Defines the contract for a cache region which will specifically be used to store entity "update timestamps". + * + * @since 2.5 + * @author Fabio B. Silva + */ +interface TimestampRegion extends Region +{ + /** + * Update an specific key into the cache region. + * + * @param \Doctrine\ORM\Cache\CacheKey $key The key of the item to update the timestamp. + * + * @throws \Doctrine\ORM\Cache\LockException Indicates a problem accessing the region. + */ + public function update(CacheKey $key); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php new file mode 100644 index 0000000000000000000000000000000000000000..c99c404751b4bbf620bc4adbb84f6af389b3c2e5 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php @@ -0,0 +1,927 @@ +. + */ + +namespace Doctrine\ORM; + +use Doctrine\Common\Annotations\AnnotationReader; +use Doctrine\Common\Annotations\AnnotationRegistry; +use Doctrine\Common\Annotations\CachedReader; +use Doctrine\Common\Annotations\SimpleAnnotationReader; +use Doctrine\Common\Cache\ArrayCache; +use Doctrine\Common\Cache\Cache as CacheDriver; +use Doctrine\Common\Proxy\AbstractProxyFactory; +use Doctrine\ORM\Cache\CacheConfiguration; +use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver; +use Doctrine\ORM\Mapping\DefaultEntityListenerResolver; +use Doctrine\ORM\Mapping\DefaultNamingStrategy; +use Doctrine\ORM\Mapping\DefaultQuoteStrategy; +use Doctrine\ORM\Mapping\Driver\AnnotationDriver; +use Doctrine\ORM\Mapping\EntityListenerResolver; +use Doctrine\ORM\Mapping\NamingStrategy; +use Doctrine\ORM\Mapping\QuoteStrategy; +use Doctrine\ORM\Repository\DefaultRepositoryFactory; +use Doctrine\ORM\Repository\RepositoryFactory; + +/** + * Configuration container for all configuration options of Doctrine. + * It combines all configuration options from DBAL & ORM. + * + * Internal note: When adding a new configuration option just write a getter/setter pair. + * + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Configuration extends \Doctrine\DBAL\Configuration +{ + /** + * Sets the directory where Doctrine generates any necessary proxy class files. + * + * @param string $dir + * + * @return void + */ + public function setProxyDir($dir) + { + $this->_attributes['proxyDir'] = $dir; + } + + /** + * Gets the directory where Doctrine generates any necessary proxy class files. + * + * @return string|null + */ + public function getProxyDir() + { + return isset($this->_attributes['proxyDir']) + ? $this->_attributes['proxyDir'] + : null; + } + + /** + * Gets the strategy for automatically generating proxy classes. + * + * @return int Possible values are constants of Doctrine\Common\Proxy\AbstractProxyFactory. + */ + public function getAutoGenerateProxyClasses() + { + return isset($this->_attributes['autoGenerateProxyClasses']) + ? $this->_attributes['autoGenerateProxyClasses'] + : AbstractProxyFactory::AUTOGENERATE_ALWAYS; + } + + /** + * Sets the strategy for automatically generating proxy classes. + * + * @param boolean|int $autoGenerate Possible values are constants of Doctrine\Common\Proxy\AbstractProxyFactory. + * True is converted to AUTOGENERATE_ALWAYS, false to AUTOGENERATE_NEVER. + * + * @return void + */ + public function setAutoGenerateProxyClasses($autoGenerate) + { + $this->_attributes['autoGenerateProxyClasses'] = (int)$autoGenerate; + } + + /** + * Gets the namespace where proxy classes reside. + * + * @return string|null + */ + public function getProxyNamespace() + { + return isset($this->_attributes['proxyNamespace']) + ? $this->_attributes['proxyNamespace'] + : null; + } + + /** + * Sets the namespace where proxy classes reside. + * + * @param string $ns + * + * @return void + */ + public function setProxyNamespace($ns) + { + $this->_attributes['proxyNamespace'] = $ns; + } + + /** + * Sets the cache driver implementation that is used for metadata caching. + * + * @param MappingDriver $driverImpl + * + * @return void + * + * @todo Force parameter to be a Closure to ensure lazy evaluation + * (as soon as a metadata cache is in effect, the driver never needs to initialize). + */ + public function setMetadataDriverImpl(MappingDriver $driverImpl) + { + $this->_attributes['metadataDriverImpl'] = $driverImpl; + } + + /** + * Adds a new default annotation driver with a correctly configured annotation reader. If $useSimpleAnnotationReader + * is true, the notation `@Entity` will work, otherwise, the notation `@ORM\Entity` will be supported. + * + * @param array $paths + * @param bool $useSimpleAnnotationReader + * + * @return AnnotationDriver + */ + public function newDefaultAnnotationDriver($paths = array(), $useSimpleAnnotationReader = true) + { + AnnotationRegistry::registerFile(__DIR__ . '/Mapping/Driver/DoctrineAnnotations.php'); + + if ($useSimpleAnnotationReader) { + // Register the ORM Annotations in the AnnotationRegistry + $reader = new SimpleAnnotationReader(); + $reader->addNamespace('Doctrine\ORM\Mapping'); + $cachedReader = new CachedReader($reader, new ArrayCache()); + + return new AnnotationDriver($cachedReader, (array) $paths); + } + + return new AnnotationDriver( + new CachedReader(new AnnotationReader(), new ArrayCache()), + (array) $paths + ); + } + + /** + * Adds a namespace under a certain alias. + * + * @param string $alias + * @param string $namespace + * + * @return void + */ + public function addEntityNamespace($alias, $namespace) + { + $this->_attributes['entityNamespaces'][$alias] = $namespace; + } + + /** + * Resolves a registered namespace alias to the full namespace. + * + * @param string $entityNamespaceAlias + * + * @return string + * + * @throws ORMException + */ + public function getEntityNamespace($entityNamespaceAlias) + { + if ( ! isset($this->_attributes['entityNamespaces'][$entityNamespaceAlias])) { + throw ORMException::unknownEntityNamespace($entityNamespaceAlias); + } + + return trim($this->_attributes['entityNamespaces'][$entityNamespaceAlias], '\\'); + } + + /** + * Sets the entity alias map. + * + * @param array $entityNamespaces + * + * @return void + */ + public function setEntityNamespaces(array $entityNamespaces) + { + $this->_attributes['entityNamespaces'] = $entityNamespaces; + } + + /** + * Retrieves the list of registered entity namespace aliases. + * + * @return array + */ + public function getEntityNamespaces() + { + return $this->_attributes['entityNamespaces']; + } + + /** + * Gets the cache driver implementation that is used for the mapping metadata. + * + * @return MappingDriver|null + * + * @throws ORMException + */ + public function getMetadataDriverImpl() + { + return isset($this->_attributes['metadataDriverImpl']) + ? $this->_attributes['metadataDriverImpl'] + : null; + } + + /** + * Gets the cache driver implementation that is used for the query cache (SQL cache). + * + * @return \Doctrine\Common\Cache\Cache|null + */ + public function getQueryCacheImpl() + { + return isset($this->_attributes['queryCacheImpl']) + ? $this->_attributes['queryCacheImpl'] + : null; + } + + /** + * Sets the cache driver implementation that is used for the query cache (SQL cache). + * + * @param \Doctrine\Common\Cache\Cache $cacheImpl + * + * @return void + */ + public function setQueryCacheImpl(CacheDriver $cacheImpl) + { + $this->_attributes['queryCacheImpl'] = $cacheImpl; + } + + /** + * Gets the cache driver implementation that is used for the hydration cache (SQL cache). + * + * @return \Doctrine\Common\Cache\Cache|null + */ + public function getHydrationCacheImpl() + { + return isset($this->_attributes['hydrationCacheImpl']) + ? $this->_attributes['hydrationCacheImpl'] + : null; + } + + /** + * Sets the cache driver implementation that is used for the hydration cache (SQL cache). + * + * @param \Doctrine\Common\Cache\Cache $cacheImpl + * + * @return void + */ + public function setHydrationCacheImpl(CacheDriver $cacheImpl) + { + $this->_attributes['hydrationCacheImpl'] = $cacheImpl; + } + + /** + * Gets the cache driver implementation that is used for metadata caching. + * + * @return \Doctrine\Common\Cache\Cache|null + */ + public function getMetadataCacheImpl() + { + return isset($this->_attributes['metadataCacheImpl']) + ? $this->_attributes['metadataCacheImpl'] + : null; + } + + /** + * Sets the cache driver implementation that is used for metadata caching. + * + * @param \Doctrine\Common\Cache\Cache $cacheImpl + * + * @return void + */ + public function setMetadataCacheImpl(CacheDriver $cacheImpl) + { + $this->_attributes['metadataCacheImpl'] = $cacheImpl; + } + + /** + * Adds a named DQL query to the configuration. + * + * @param string $name The name of the query. + * @param string $dql The DQL query string. + * + * @return void + */ + public function addNamedQuery($name, $dql) + { + $this->_attributes['namedQueries'][$name] = $dql; + } + + /** + * Gets a previously registered named DQL query. + * + * @param string $name The name of the query. + * + * @return string The DQL query. + * + * @throws ORMException + */ + public function getNamedQuery($name) + { + if ( ! isset($this->_attributes['namedQueries'][$name])) { + throw ORMException::namedQueryNotFound($name); + } + + return $this->_attributes['namedQueries'][$name]; + } + + /** + * Adds a named native query to the configuration. + * + * @param string $name The name of the query. + * @param string $sql The native SQL query string. + * @param Query\ResultSetMapping $rsm The ResultSetMapping used for the results of the SQL query. + * + * @return void + */ + public function addNamedNativeQuery($name, $sql, Query\ResultSetMapping $rsm) + { + $this->_attributes['namedNativeQueries'][$name] = array($sql, $rsm); + } + + /** + * Gets the components of a previously registered named native query. + * + * @param string $name The name of the query. + * + * @return array A tuple with the first element being the SQL string and the second + * element being the ResultSetMapping. + * + * @throws ORMException + */ + public function getNamedNativeQuery($name) + { + if ( ! isset($this->_attributes['namedNativeQueries'][$name])) { + throw ORMException::namedNativeQueryNotFound($name); + } + + return $this->_attributes['namedNativeQueries'][$name]; + } + + /** + * Ensures that this Configuration instance contains settings that are + * suitable for a production environment. + * + * @return void + * + * @throws ORMException If a configuration setting has a value that is not + * suitable for a production environment. + */ + public function ensureProductionSettings() + { + $queryCacheImpl = $this->getQueryCacheImpl(); + + if ( ! $queryCacheImpl) { + throw ORMException::queryCacheNotConfigured(); + } + + if ($queryCacheImpl instanceof ArrayCache) { + throw ORMException::queryCacheUsesNonPersistentCache($queryCacheImpl); + } + + $metadataCacheImpl = $this->getMetadataCacheImpl(); + + if ( ! $metadataCacheImpl) { + throw ORMException::metadataCacheNotConfigured(); + } + + if ($metadataCacheImpl instanceof ArrayCache) { + throw ORMException::metadataCacheUsesNonPersistentCache($metadataCacheImpl); + } + + if ($this->getAutoGenerateProxyClasses()) { + throw ORMException::proxyClassesAlwaysRegenerating(); + } + } + + /** + * Registers a custom DQL function that produces a string value. + * Such a function can then be used in any DQL statement in any place where string + * functions are allowed. + * + * DQL function names are case-insensitive. + * + * @param string $name Function name. + * @param string|callable $className Class name or a callable that returns the function. + * + * @return void + * + * @throws ORMException + */ + public function addCustomStringFunction($name, $className) + { + if (Query\Parser::isInternalFunction($name)) { + throw ORMException::overwriteInternalDQLFunctionNotAllowed($name); + } + + $this->_attributes['customStringFunctions'][strtolower($name)] = $className; + } + + /** + * Gets the implementation class name of a registered custom string DQL function. + * + * @param string $name + * + * @return string|null + */ + public function getCustomStringFunction($name) + { + $name = strtolower($name); + + return isset($this->_attributes['customStringFunctions'][$name]) + ? $this->_attributes['customStringFunctions'][$name] + : null; + } + + /** + * Sets a map of custom DQL string functions. + * + * Keys must be function names and values the FQCN of the implementing class. + * The function names will be case-insensitive in DQL. + * + * Any previously added string functions are discarded. + * + * @param array $functions The map of custom DQL string functions. + * + * @return void + */ + public function setCustomStringFunctions(array $functions) + { + foreach ($functions as $name => $className) { + $this->addCustomStringFunction($name, $className); + } + } + + /** + * Registers a custom DQL function that produces a numeric value. + * Such a function can then be used in any DQL statement in any place where numeric + * functions are allowed. + * + * DQL function names are case-insensitive. + * + * @param string $name Function name. + * @param string|callable $className Class name or a callable that returns the function. + * + * @return void + * + * @throws ORMException + */ + public function addCustomNumericFunction($name, $className) + { + if (Query\Parser::isInternalFunction($name)) { + throw ORMException::overwriteInternalDQLFunctionNotAllowed($name); + } + + $this->_attributes['customNumericFunctions'][strtolower($name)] = $className; + } + + /** + * Gets the implementation class name of a registered custom numeric DQL function. + * + * @param string $name + * + * @return string|null + */ + public function getCustomNumericFunction($name) + { + $name = strtolower($name); + + return isset($this->_attributes['customNumericFunctions'][$name]) + ? $this->_attributes['customNumericFunctions'][$name] + : null; + } + + /** + * Sets a map of custom DQL numeric functions. + * + * Keys must be function names and values the FQCN of the implementing class. + * The function names will be case-insensitive in DQL. + * + * Any previously added numeric functions are discarded. + * + * @param array $functions The map of custom DQL numeric functions. + * + * @return void + */ + public function setCustomNumericFunctions(array $functions) + { + foreach ($functions as $name => $className) { + $this->addCustomNumericFunction($name, $className); + } + } + + /** + * Registers a custom DQL function that produces a date/time value. + * Such a function can then be used in any DQL statement in any place where date/time + * functions are allowed. + * + * DQL function names are case-insensitive. + * + * @param string $name Function name. + * @param string|callable $className Class name or a callable that returns the function. + * + * @return void + * + * @throws ORMException + */ + public function addCustomDatetimeFunction($name, $className) + { + if (Query\Parser::isInternalFunction($name)) { + throw ORMException::overwriteInternalDQLFunctionNotAllowed($name); + } + + $this->_attributes['customDatetimeFunctions'][strtolower($name)] = $className; + } + + /** + * Gets the implementation class name of a registered custom date/time DQL function. + * + * @param string $name + * + * @return string|null + */ + public function getCustomDatetimeFunction($name) + { + $name = strtolower($name); + + return isset($this->_attributes['customDatetimeFunctions'][$name]) + ? $this->_attributes['customDatetimeFunctions'][$name] + : null; + } + + /** + * Sets a map of custom DQL date/time functions. + * + * Keys must be function names and values the FQCN of the implementing class. + * The function names will be case-insensitive in DQL. + * + * Any previously added date/time functions are discarded. + * + * @param array $functions The map of custom DQL date/time functions. + * + * @return void + */ + public function setCustomDatetimeFunctions(array $functions) + { + foreach ($functions as $name => $className) { + $this->addCustomDatetimeFunction($name, $className); + } + } + + /** + * Sets the custom hydrator modes in one pass. + * + * @param array $modes An array of ($modeName => $hydrator). + * + * @return void + */ + public function setCustomHydrationModes($modes) + { + $this->_attributes['customHydrationModes'] = array(); + + foreach ($modes as $modeName => $hydrator) { + $this->addCustomHydrationMode($modeName, $hydrator); + } + } + + /** + * Gets the hydrator class for the given hydration mode name. + * + * @param string $modeName The hydration mode name. + * + * @return string|null The hydrator class name. + */ + public function getCustomHydrationMode($modeName) + { + return isset($this->_attributes['customHydrationModes'][$modeName]) + ? $this->_attributes['customHydrationModes'][$modeName] + : null; + } + + /** + * Adds a custom hydration mode. + * + * @param string $modeName The hydration mode name. + * @param string $hydrator The hydrator class name. + * + * @return void + */ + public function addCustomHydrationMode($modeName, $hydrator) + { + $this->_attributes['customHydrationModes'][$modeName] = $hydrator; + } + + /** + * Sets a class metadata factory. + * + * @param string $cmfName + * + * @return void + */ + public function setClassMetadataFactoryName($cmfName) + { + $this->_attributes['classMetadataFactoryName'] = $cmfName; + } + + /** + * @return string + */ + public function getClassMetadataFactoryName() + { + if ( ! isset($this->_attributes['classMetadataFactoryName'])) { + $this->_attributes['classMetadataFactoryName'] = 'Doctrine\ORM\Mapping\ClassMetadataFactory'; + } + + return $this->_attributes['classMetadataFactoryName']; + } + + /** + * Adds a filter to the list of possible filters. + * + * @param string $name The name of the filter. + * @param string $className The class name of the filter. + */ + public function addFilter($name, $className) + { + $this->_attributes['filters'][$name] = $className; + } + + /** + * Gets the class name for a given filter name. + * + * @param string $name The name of the filter. + * + * @return string The class name of the filter, or null of it is not + * defined. + */ + public function getFilterClassName($name) + { + return isset($this->_attributes['filters'][$name]) + ? $this->_attributes['filters'][$name] + : null; + } + + /** + * Sets default repository class. + * + * @since 2.2 + * + * @param string $className + * + * @return void + * + * @throws ORMException If not is a \Doctrine\Common\Persistence\ObjectRepository + */ + public function setDefaultRepositoryClassName($className) + { + $reflectionClass = new \ReflectionClass($className); + + if ( ! $reflectionClass->implementsInterface('Doctrine\Common\Persistence\ObjectRepository')) { + throw ORMException::invalidEntityRepository($className); + } + + $this->_attributes['defaultRepositoryClassName'] = $className; + } + + /** + * Get default repository class. + * + * @since 2.2 + * + * @return string + */ + public function getDefaultRepositoryClassName() + { + return isset($this->_attributes['defaultRepositoryClassName']) + ? $this->_attributes['defaultRepositoryClassName'] + : 'Doctrine\ORM\EntityRepository'; + } + + /** + * Sets naming strategy. + * + * @since 2.3 + * + * @param NamingStrategy $namingStrategy + * + * @return void + */ + public function setNamingStrategy(NamingStrategy $namingStrategy) + { + $this->_attributes['namingStrategy'] = $namingStrategy; + } + + /** + * Gets naming strategy.. + * + * @since 2.3 + * + * @return NamingStrategy + */ + public function getNamingStrategy() + { + if ( ! isset($this->_attributes['namingStrategy'])) { + $this->_attributes['namingStrategy'] = new DefaultNamingStrategy(); + } + + return $this->_attributes['namingStrategy']; + } + + /** + * Sets quote strategy. + * + * @since 2.3 + * + * @param \Doctrine\ORM\Mapping\QuoteStrategy $quoteStrategy + * + * @return void + */ + public function setQuoteStrategy(QuoteStrategy $quoteStrategy) + { + $this->_attributes['quoteStrategy'] = $quoteStrategy; + } + + /** + * Gets quote strategy. + * + * @since 2.3 + * + * @return \Doctrine\ORM\Mapping\QuoteStrategy + */ + public function getQuoteStrategy() + { + if ( ! isset($this->_attributes['quoteStrategy'])) { + $this->_attributes['quoteStrategy'] = new DefaultQuoteStrategy(); + } + + return $this->_attributes['quoteStrategy']; + } + + /** + * Set the entity listener resolver. + * + * @since 2.4 + * @param \Doctrine\ORM\Mapping\EntityListenerResolver $resolver + */ + public function setEntityListenerResolver(EntityListenerResolver $resolver) + { + $this->_attributes['entityListenerResolver'] = $resolver; + } + + /** + * Get the entity listener resolver. + * + * @since 2.4 + * @return \Doctrine\ORM\Mapping\EntityListenerResolver + */ + public function getEntityListenerResolver() + { + if ( ! isset($this->_attributes['entityListenerResolver'])) { + $this->_attributes['entityListenerResolver'] = new DefaultEntityListenerResolver(); + } + + return $this->_attributes['entityListenerResolver']; + } + + /** + * Set the entity repository factory. + * + * @since 2.4 + * @param \Doctrine\ORM\Repository\RepositoryFactory $repositoryFactory + */ + public function setRepositoryFactory(RepositoryFactory $repositoryFactory) + { + $this->_attributes['repositoryFactory'] = $repositoryFactory; + } + + /** + * Get the entity repository factory. + * + * @since 2.4 + * @return \Doctrine\ORM\Repository\RepositoryFactory + */ + public function getRepositoryFactory() + { + return isset($this->_attributes['repositoryFactory']) + ? $this->_attributes['repositoryFactory'] + : new DefaultRepositoryFactory(); + } + + /** + * @since 2.5 + * + * @return boolean + */ + public function isSecondLevelCacheEnabled() + { + return isset($this->_attributes['isSecondLevelCacheEnabled']) + ? $this->_attributes['isSecondLevelCacheEnabled'] + : false; + } + + /** + * @since 2.5 + * + * @param boolean $flag + * + * @return void + */ + public function setSecondLevelCacheEnabled($flag = true) + { + $this->_attributes['isSecondLevelCacheEnabled'] = (boolean) $flag; + } + + /** + * @since 2.5 + * + * @param \Doctrine\ORM\Cache\CacheConfiguration $cacheConfig + * + * @return void + */ + public function setSecondLevelCacheConfiguration(CacheConfiguration $cacheConfig) + { + $this->_attributes['secondLevelCacheConfiguration'] = $cacheConfig; + } + + /** + * @since 2.5 + * + * @return \Doctrine\ORM\Cache\CacheConfiguration|null + */ + public function getSecondLevelCacheConfiguration() + { + if ( ! isset($this->_attributes['secondLevelCacheConfiguration']) && $this->isSecondLevelCacheEnabled()) { + $this->_attributes['secondLevelCacheConfiguration'] = new CacheConfiguration(); + } + + return isset($this->_attributes['secondLevelCacheConfiguration']) + ? $this->_attributes['secondLevelCacheConfiguration'] + : null; + } + + /** + * Returns query hints, which will be applied to every query in application + * + * @since 2.5 + * + * @return array + */ + public function getDefaultQueryHints() + { + return isset($this->_attributes['defaultQueryHints']) ? $this->_attributes['defaultQueryHints'] : array(); + } + + /** + * Sets array of query hints, which will be applied to every query in application + * + * @since 2.5 + * + * @param array $defaultQueryHints + */ + public function setDefaultQueryHints(array $defaultQueryHints) + { + $this->_attributes['defaultQueryHints'] = $defaultQueryHints; + } + + /** + * Gets the value of a default query hint. If the hint name is not recognized, FALSE is returned. + * + * @since 2.5 + * + * @param string $name The name of the hint. + * + * @return mixed The value of the hint or FALSE, if the hint name is not recognized. + */ + public function getDefaultQueryHint($name) + { + return isset($this->_attributes['defaultQueryHints'][$name]) + ? $this->_attributes['defaultQueryHints'][$name] + : false; + } + + /** + * Sets a default query hint. If the hint name is not recognized, it is silently ignored. + * + * @since 2.5 + * + * @param string $name The name of the hint. + * @param mixed $value The value of the hint. + */ + public function setDefaultQueryHint($name, $value) + { + $this->_attributes['defaultQueryHints'][$name] = $value; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Decorator/EntityManagerDecorator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Decorator/EntityManagerDecorator.php new file mode 100644 index 0000000000000000000000000000000000000000..69cc6f507391a747287fca2c96421ee7e9fa1a31 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Decorator/EntityManagerDecorator.php @@ -0,0 +1,278 @@ +. + */ + +namespace Doctrine\ORM\Decorator; + +use Doctrine\ORM\Query\ResultSetMapping; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\Common\Persistence\ObjectManagerDecorator; + +/** + * Base class for EntityManager decorators + * + * @since 2.4 + * @author Lars Strojny wrapped = $wrapped; + } + + /** + * {@inheritdoc} + */ + public function getConnection() + { + return $this->wrapped->getConnection(); + } + + /** + * {@inheritdoc} + */ + public function getExpressionBuilder() + { + return $this->wrapped->getExpressionBuilder(); + } + + /** + * {@inheritdoc} + */ + public function beginTransaction() + { + return $this->wrapped->beginTransaction(); + } + + /** + * {@inheritdoc} + */ + public function transactional($func) + { + return $this->wrapped->transactional($func); + } + + /** + * {@inheritdoc} + */ + public function commit() + { + return $this->wrapped->commit(); + } + + /** + * {@inheritdoc} + */ + public function rollback() + { + return $this->wrapped->rollback(); + } + + /** + * {@inheritdoc} + */ + public function createQuery($dql = '') + { + return $this->wrapped->createQuery($dql); + } + + /** + * {@inheritdoc} + */ + public function createNamedQuery($name) + { + return $this->wrapped->createNamedQuery($name); + } + + /** + * {@inheritdoc} + */ + public function createNativeQuery($sql, ResultSetMapping $rsm) + { + return $this->wrapped->createNativeQuery($sql, $rsm); + } + + /** + * {@inheritdoc} + */ + public function createNamedNativeQuery($name) + { + return $this->wrapped->createNamedNativeQuery($name); + } + + /** + * {@inheritdoc} + */ + public function createQueryBuilder() + { + return $this->wrapped->createQueryBuilder(); + } + + /** + * {@inheritdoc} + */ + public function getReference($entityName, $id) + { + return $this->wrapped->getReference($entityName, $id); + } + + /** + * {@inheritdoc} + */ + public function getPartialReference($entityName, $identifier) + { + return $this->wrapped->getPartialReference($entityName, $identifier); + } + + /** + * {@inheritdoc} + */ + public function close() + { + return $this->wrapped->close(); + } + + /** + * {@inheritdoc} + */ + public function copy($entity, $deep = false) + { + return $this->wrapped->copy($entity, $deep); + } + + /** + * {@inheritdoc} + */ + public function lock($entity, $lockMode, $lockVersion = null) + { + return $this->wrapped->lock($entity, $lockMode, $lockVersion); + } + + /** + * {@inheritdoc} + */ + public function find($entityName, $id, $lockMode = null, $lockVersion = null) + { + return $this->wrapped->find($entityName, $id, $lockMode, $lockVersion); + } + + /** + * {@inheritdoc} + */ + public function flush($entity = null) + { + return $this->wrapped->flush($entity); + } + + /** + * {@inheritdoc} + */ + public function getEventManager() + { + return $this->wrapped->getEventManager(); + } + + /** + * {@inheritdoc} + */ + public function getConfiguration() + { + return $this->wrapped->getConfiguration(); + } + + /** + * {@inheritdoc} + */ + public function isOpen() + { + return $this->wrapped->isOpen(); + } + + /** + * {@inheritdoc} + */ + public function getUnitOfWork() + { + return $this->wrapped->getUnitOfWork(); + } + + /** + * {@inheritdoc} + */ + public function getHydrator($hydrationMode) + { + return $this->wrapped->getHydrator($hydrationMode); + } + + /** + * {@inheritdoc} + */ + public function newHydrator($hydrationMode) + { + return $this->wrapped->newHydrator($hydrationMode); + } + + /** + * {@inheritdoc} + */ + public function getProxyFactory() + { + return $this->wrapped->getProxyFactory(); + } + + /** + * {@inheritdoc} + */ + public function getFilters() + { + return $this->wrapped->getFilters(); + } + + /** + * {@inheritdoc} + */ + public function isFiltersStateClean() + { + return $this->wrapped->isFiltersStateClean(); + } + + /** + * {@inheritdoc} + */ + public function hasFilters() + { + return $this->wrapped->hasFilters(); + } + + /** + * {@inheritdoc} + */ + public function getCache() + { + return $this->wrapped->getCache(); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php b/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php new file mode 100644 index 0000000000000000000000000000000000000000..685fc0d71d72c8552192e2961083b60b9b261ac0 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php @@ -0,0 +1,880 @@ +. + */ + +namespace Doctrine\ORM; + +use Exception; +use Doctrine\Common\EventManager; +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\LockMode; +use Doctrine\ORM\Query\ResultSetMapping; +use Doctrine\ORM\Proxy\ProxyFactory; +use Doctrine\ORM\Query\FilterCollection; +use Doctrine\Common\Util\ClassUtils; + +/** + * The EntityManager is the central access point to ORM functionality. + * + * It is a facade to all different ORM subsystems such as UnitOfWork, + * Query Language and Repository API. Instantiation is done through + * the static create() method. The quickest way to obtain a fully + * configured EntityManager is: + * + * use Doctrine\ORM\Tools\Setup; + * use Doctrine\ORM\EntityManager; + * + * $paths = array('/path/to/entity/mapping/files'); + * + * $config = Setup::createAnnotationMetadataConfiguration($paths); + * $dbParams = array('driver' => 'pdo_sqlite', 'memory' => true); + * $entityManager = EntityManager::create($dbParams, $config); + * + * For more information see + * {@link http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/configuration.html} + * + * You should never attempt to inherit from the EntityManager: Inheritance + * is not a valid extension point for the EntityManager. Instead you + * should take a look at the {@see \Doctrine\ORM\Decorator\EntityManagerDecorator} + * and wrap your entity manager in a decorator. + * + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +/* final */class EntityManager implements EntityManagerInterface +{ + /** + * The used Configuration. + * + * @var \Doctrine\ORM\Configuration + */ + private $config; + + /** + * The database connection used by the EntityManager. + * + * @var \Doctrine\DBAL\Connection + */ + private $conn; + + /** + * The metadata factory, used to retrieve the ORM metadata of entity classes. + * + * @var \Doctrine\ORM\Mapping\ClassMetadataFactory + */ + private $metadataFactory; + + /** + * The UnitOfWork used to coordinate object-level transactions. + * + * @var \Doctrine\ORM\UnitOfWork + */ + private $unitOfWork; + + /** + * The event manager that is the central point of the event system. + * + * @var \Doctrine\Common\EventManager + */ + private $eventManager; + + /** + * The proxy factory used to create dynamic proxies. + * + * @var \Doctrine\ORM\Proxy\ProxyFactory + */ + private $proxyFactory; + + /** + * The repository factory used to create dynamic repositories. + * + * @var \Doctrine\ORM\Repository\RepositoryFactory + */ + private $repositoryFactory; + + /** + * The expression builder instance used to generate query expressions. + * + * @var \Doctrine\ORM\Query\Expr + */ + private $expressionBuilder; + + /** + * Whether the EntityManager is closed or not. + * + * @var bool + */ + private $closed = false; + + /** + * Collection of query filters. + * + * @var \Doctrine\ORM\Query\FilterCollection + */ + private $filterCollection; + + /** + * @var \Doctrine\ORM\Cache The second level cache regions API. + */ + private $cache; + + /** + * Creates a new EntityManager that operates on the given database connection + * and uses the given Configuration and EventManager implementations. + * + * @param \Doctrine\DBAL\Connection $conn + * @param \Doctrine\ORM\Configuration $config + * @param \Doctrine\Common\EventManager $eventManager + */ + protected function __construct(Connection $conn, Configuration $config, EventManager $eventManager) + { + $this->conn = $conn; + $this->config = $config; + $this->eventManager = $eventManager; + + $metadataFactoryClassName = $config->getClassMetadataFactoryName(); + + $this->metadataFactory = new $metadataFactoryClassName; + $this->metadataFactory->setEntityManager($this); + $this->metadataFactory->setCacheDriver($this->config->getMetadataCacheImpl()); + + $this->repositoryFactory = $config->getRepositoryFactory(); + $this->unitOfWork = new UnitOfWork($this); + $this->proxyFactory = new ProxyFactory( + $this, + $config->getProxyDir(), + $config->getProxyNamespace(), + $config->getAutoGenerateProxyClasses() + ); + + if ($config->isSecondLevelCacheEnabled()) { + $cacheConfig = $config->getSecondLevelCacheConfiguration(); + $cacheFactory = $cacheConfig->getCacheFactory(); + $this->cache = $cacheFactory->createCache($this); + } + } + + /** + * {@inheritDoc} + */ + public function getConnection() + { + return $this->conn; + } + + /** + * Gets the metadata factory used to gather the metadata of classes. + * + * @return \Doctrine\ORM\Mapping\ClassMetadataFactory + */ + public function getMetadataFactory() + { + return $this->metadataFactory; + } + + /** + * {@inheritDoc} + */ + public function getExpressionBuilder() + { + if ($this->expressionBuilder === null) { + $this->expressionBuilder = new Query\Expr; + } + + return $this->expressionBuilder; + } + + /** + * {@inheritDoc} + */ + public function beginTransaction() + { + $this->conn->beginTransaction(); + } + + /** + * {@inheritDoc} + */ + public function getCache() + { + return $this->cache; + } + + /** + * {@inheritDoc} + */ + public function transactional($func) + { + if (!is_callable($func)) { + throw new \InvalidArgumentException('Expected argument of type "callable", got "' . gettype($func) . '"'); + } + + $this->conn->beginTransaction(); + + try { + $return = call_user_func($func, $this); + + $this->flush(); + $this->conn->commit(); + + return $return ?: true; + } catch (Exception $e) { + $this->close(); + $this->conn->rollback(); + + throw $e; + } + } + + /** + * {@inheritDoc} + */ + public function commit() + { + $this->conn->commit(); + } + + /** + * {@inheritDoc} + */ + public function rollback() + { + $this->conn->rollback(); + } + + /** + * Returns the ORM metadata descriptor for a class. + * + * The class name must be the fully-qualified class name without a leading backslash + * (as it is returned by get_class($obj)) or an aliased class name. + * + * Examples: + * MyProject\Domain\User + * sales:PriceRequest + * + * Internal note: Performance-sensitive method. + * + * @param string $className + * + * @return \Doctrine\ORM\Mapping\ClassMetadata + */ + public function getClassMetadata($className) + { + return $this->metadataFactory->getMetadataFor($className); + } + + /** + * {@inheritDoc} + */ + public function createQuery($dql = '') + { + $query = new Query($this); + + if ( ! empty($dql)) { + $query->setDql($dql); + } + + return $query; + } + + /** + * {@inheritDoc} + */ + public function createNamedQuery($name) + { + return $this->createQuery($this->config->getNamedQuery($name)); + } + + /** + * {@inheritDoc} + */ + public function createNativeQuery($sql, ResultSetMapping $rsm) + { + $query = new NativeQuery($this); + + $query->setSql($sql); + $query->setResultSetMapping($rsm); + + return $query; + } + + /** + * {@inheritDoc} + */ + public function createNamedNativeQuery($name) + { + list($sql, $rsm) = $this->config->getNamedNativeQuery($name); + + return $this->createNativeQuery($sql, $rsm); + } + + /** + * {@inheritDoc} + */ + public function createQueryBuilder() + { + return new QueryBuilder($this); + } + + /** + * Flushes all changes to objects that have been queued up to now to the database. + * This effectively synchronizes the in-memory state of managed objects with the + * database. + * + * If an entity is explicitly passed to this method only this entity and + * the cascade-persist semantics + scheduled inserts/removals are synchronized. + * + * @param null|object|array $entity + * + * @return void + * + * @throws \Doctrine\ORM\OptimisticLockException If a version check on an entity that + * makes use of optimistic locking fails. + */ + public function flush($entity = null) + { + $this->errorIfClosed(); + + $this->unitOfWork->commit($entity); + } + + /** + * Finds an Entity by its identifier. + * + * @param string $entityName The class name of the entity to find. + * @param mixed $id The identity of the entity to find. + * @param integer|null $lockMode One of the \Doctrine\DBAL\LockMode::* constants + * or NULL if no specific lock mode should be used + * during the search. + * @param integer|null $lockVersion The version of the entity to find when using + * optimistic locking. + * + * @return object|null The entity instance or NULL if the entity can not be found. + * + * @throws OptimisticLockException + * @throws ORMInvalidArgumentException + * @throws TransactionRequiredException + * @throws ORMException + */ + public function find($entityName, $id, $lockMode = null, $lockVersion = null) + { + $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); + + if ( ! is_array($id)) { + if ($class->isIdentifierComposite) { + throw ORMInvalidArgumentException::invalidCompositeIdentifier(); + } + + $id = array($class->identifier[0] => $id); + } + + foreach ($id as $i => $value) { + if (is_object($value) && $this->metadataFactory->hasMetadataFor(ClassUtils::getClass($value))) { + $id[$i] = $this->unitOfWork->getSingleIdentifierValue($value); + + if ($id[$i] === null) { + throw ORMInvalidArgumentException::invalidIdentifierBindingEntity(); + } + } + } + + $sortedId = array(); + + foreach ($class->identifier as $identifier) { + if ( ! isset($id[$identifier])) { + throw ORMException::missingIdentifierField($class->name, $identifier); + } + + $sortedId[$identifier] = $id[$identifier]; + unset($id[$identifier]); + } + + if ($id) { + throw ORMException::unrecognizedIdentifierFields($class->name, array_keys($id)); + } + + $unitOfWork = $this->getUnitOfWork(); + + // Check identity map first + if (($entity = $unitOfWork->tryGetById($sortedId, $class->rootEntityName)) !== false) { + if ( ! ($entity instanceof $class->name)) { + return null; + } + + switch (true) { + case LockMode::OPTIMISTIC === $lockMode: + $this->lock($entity, $lockMode, $lockVersion); + break; + + case LockMode::NONE === $lockMode: + case LockMode::PESSIMISTIC_READ === $lockMode: + case LockMode::PESSIMISTIC_WRITE === $lockMode: + $persister = $unitOfWork->getEntityPersister($class->name); + $persister->refresh($sortedId, $entity, $lockMode); + break; + } + + return $entity; // Hit! + } + + $persister = $unitOfWork->getEntityPersister($class->name); + + switch (true) { + case LockMode::OPTIMISTIC === $lockMode: + if ( ! $class->isVersioned) { + throw OptimisticLockException::notVersioned($class->name); + } + + $entity = $persister->load($sortedId); + + $unitOfWork->lock($entity, $lockMode, $lockVersion); + + return $entity; + + case LockMode::NONE === $lockMode: + case LockMode::PESSIMISTIC_READ === $lockMode: + case LockMode::PESSIMISTIC_WRITE === $lockMode: + if ( ! $this->getConnection()->isTransactionActive()) { + throw TransactionRequiredException::transactionRequired(); + } + + return $persister->load($sortedId, null, null, array(), $lockMode); + + default: + return $persister->loadById($sortedId); + } + } + + /** + * {@inheritDoc} + */ + public function getReference($entityName, $id) + { + $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); + + if ( ! is_array($id)) { + $id = array($class->identifier[0] => $id); + } + + $sortedId = array(); + + foreach ($class->identifier as $identifier) { + if ( ! isset($id[$identifier])) { + throw ORMException::missingIdentifierField($class->name, $identifier); + } + + $sortedId[$identifier] = $id[$identifier]; + } + + // Check identity map first, if its already in there just return it. + if (($entity = $this->unitOfWork->tryGetById($sortedId, $class->rootEntityName)) !== false) { + return ($entity instanceof $class->name) ? $entity : null; + } + + if ($class->subClasses) { + return $this->find($entityName, $sortedId); + } + + if ( ! is_array($sortedId)) { + $sortedId = array($class->identifier[0] => $sortedId); + } + + $entity = $this->proxyFactory->getProxy($class->name, $sortedId); + + $this->unitOfWork->registerManaged($entity, $sortedId, array()); + + return $entity; + } + + /** + * {@inheritDoc} + */ + public function getPartialReference($entityName, $identifier) + { + $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); + + // Check identity map first, if its already in there just return it. + if (($entity = $this->unitOfWork->tryGetById($identifier, $class->rootEntityName)) !== false) { + return ($entity instanceof $class->name) ? $entity : null; + } + + if ( ! is_array($identifier)) { + $identifier = array($class->identifier[0] => $identifier); + } + + $entity = $class->newInstance(); + + $class->setIdentifierValues($entity, $identifier); + + $this->unitOfWork->registerManaged($entity, $identifier, array()); + $this->unitOfWork->markReadOnly($entity); + + return $entity; + } + + /** + * Clears the EntityManager. All entities that are currently managed + * by this EntityManager become detached. + * + * @param string|null $entityName if given, only entities of this type will get detached + * + * @return void + */ + public function clear($entityName = null) + { + $this->unitOfWork->clear($entityName); + } + + /** + * {@inheritDoc} + */ + public function close() + { + $this->clear(); + + $this->closed = true; + } + + /** + * Tells the EntityManager to make an instance managed and persistent. + * + * The entity will be entered into the database at or before transaction + * commit or as a result of the flush operation. + * + * NOTE: The persist operation always considers entities that are not yet known to + * this EntityManager as NEW. Do not pass detached entities to the persist operation. + * + * @param object $entity The instance to make managed and persistent. + * + * @return void + * + * @throws ORMInvalidArgumentException + */ + public function persist($entity) + { + if ( ! is_object($entity)) { + throw ORMInvalidArgumentException::invalidObject('EntityManager#persist()' , $entity); + } + + $this->errorIfClosed(); + + $this->unitOfWork->persist($entity); + } + + /** + * Removes an entity instance. + * + * A removed entity will be removed from the database at or before transaction commit + * or as a result of the flush operation. + * + * @param object $entity The entity instance to remove. + * + * @return void + * + * @throws ORMInvalidArgumentException + */ + public function remove($entity) + { + if ( ! is_object($entity)) { + throw ORMInvalidArgumentException::invalidObject('EntityManager#remove()' , $entity); + } + + $this->errorIfClosed(); + + $this->unitOfWork->remove($entity); + } + + /** + * Refreshes the persistent state of an entity from the database, + * overriding any local changes that have not yet been persisted. + * + * @param object $entity The entity to refresh. + * + * @return void + * + * @throws ORMInvalidArgumentException + */ + public function refresh($entity) + { + if ( ! is_object($entity)) { + throw ORMInvalidArgumentException::invalidObject('EntityManager#refresh()' , $entity); + } + + $this->errorIfClosed(); + + $this->unitOfWork->refresh($entity); + } + + /** + * Detaches an entity from the EntityManager, causing a managed entity to + * become detached. Unflushed changes made to the entity if any + * (including removal of the entity), will not be synchronized to the database. + * Entities which previously referenced the detached entity will continue to + * reference it. + * + * @param object $entity The entity to detach. + * + * @return void + * + * @throws ORMInvalidArgumentException + */ + public function detach($entity) + { + if ( ! is_object($entity)) { + throw ORMInvalidArgumentException::invalidObject('EntityManager#detach()' , $entity); + } + + $this->unitOfWork->detach($entity); + } + + /** + * Merges the state of a detached entity into the persistence context + * of this EntityManager and returns the managed copy of the entity. + * The entity passed to merge will not become associated/managed with this EntityManager. + * + * @param object $entity The detached entity to merge into the persistence context. + * + * @return object The managed copy of the entity. + * + * @throws ORMInvalidArgumentException + */ + public function merge($entity) + { + if ( ! is_object($entity)) { + throw ORMInvalidArgumentException::invalidObject('EntityManager#merge()' , $entity); + } + + $this->errorIfClosed(); + + return $this->unitOfWork->merge($entity); + } + + /** + * {@inheritDoc} + * + * @todo Implementation need. This is necessary since $e2 = clone $e1; throws an E_FATAL when access anything on $e: + * Fatal error: Maximum function nesting level of '100' reached, aborting! + */ + public function copy($entity, $deep = false) + { + throw new \BadMethodCallException("Not implemented."); + } + + /** + * {@inheritDoc} + */ + public function lock($entity, $lockMode, $lockVersion = null) + { + $this->unitOfWork->lock($entity, $lockMode, $lockVersion); + } + + /** + * Gets the repository for an entity class. + * + * @param string $entityName The name of the entity. + * + * @return \Doctrine\ORM\EntityRepository The repository class. + */ + public function getRepository($entityName) + { + return $this->repositoryFactory->getRepository($this, $entityName); + } + + /** + * Determines whether an entity instance is managed in this EntityManager. + * + * @param object $entity + * + * @return boolean TRUE if this EntityManager currently manages the given entity, FALSE otherwise. + */ + public function contains($entity) + { + return $this->unitOfWork->isScheduledForInsert($entity) + || $this->unitOfWork->isInIdentityMap($entity) + && ! $this->unitOfWork->isScheduledForDelete($entity); + } + + /** + * {@inheritDoc} + */ + public function getEventManager() + { + return $this->eventManager; + } + + /** + * {@inheritDoc} + */ + public function getConfiguration() + { + return $this->config; + } + + /** + * Throws an exception if the EntityManager is closed or currently not active. + * + * @return void + * + * @throws ORMException If the EntityManager is closed. + */ + private function errorIfClosed() + { + if ($this->closed) { + throw ORMException::entityManagerClosed(); + } + } + + /** + * {@inheritDoc} + */ + public function isOpen() + { + return (!$this->closed); + } + + /** + * {@inheritDoc} + */ + public function getUnitOfWork() + { + return $this->unitOfWork; + } + + /** + * {@inheritDoc} + */ + public function getHydrator($hydrationMode) + { + return $this->newHydrator($hydrationMode); + } + + /** + * {@inheritDoc} + */ + public function newHydrator($hydrationMode) + { + switch ($hydrationMode) { + case Query::HYDRATE_OBJECT: + return new Internal\Hydration\ObjectHydrator($this); + + case Query::HYDRATE_ARRAY: + return new Internal\Hydration\ArrayHydrator($this); + + case Query::HYDRATE_SCALAR: + return new Internal\Hydration\ScalarHydrator($this); + + case Query::HYDRATE_SINGLE_SCALAR: + return new Internal\Hydration\SingleScalarHydrator($this); + + case Query::HYDRATE_SIMPLEOBJECT: + return new Internal\Hydration\SimpleObjectHydrator($this); + + default: + if (($class = $this->config->getCustomHydrationMode($hydrationMode)) !== null) { + return new $class($this); + } + } + + throw ORMException::invalidHydrationMode($hydrationMode); + } + + /** + * {@inheritDoc} + */ + public function getProxyFactory() + { + return $this->proxyFactory; + } + + /** + * {@inheritDoc} + */ + public function initializeObject($obj) + { + $this->unitOfWork->initializeObject($obj); + } + + /** + * Factory method to create EntityManager instances. + * + * @param mixed $conn An array with the connection parameters or an existing Connection instance. + * @param Configuration $config The Configuration instance to use. + * @param EventManager $eventManager The EventManager instance to use. + * + * @return EntityManager The created EntityManager. + * + * @throws \InvalidArgumentException + * @throws ORMException + */ + public static function create($conn, Configuration $config, EventManager $eventManager = null) + { + if ( ! $config->getMetadataDriverImpl()) { + throw ORMException::missingMappingDriverImpl(); + } + + switch (true) { + case (is_array($conn)): + $conn = \Doctrine\DBAL\DriverManager::getConnection( + $conn, $config, ($eventManager ?: new EventManager()) + ); + break; + + case ($conn instanceof Connection): + if ($eventManager !== null && $conn->getEventManager() !== $eventManager) { + throw ORMException::mismatchedEventManager(); + } + break; + + default: + throw new \InvalidArgumentException("Invalid argument: " . $conn); + } + + return new EntityManager($conn, $config, $conn->getEventManager()); + } + + /** + * {@inheritDoc} + */ + public function getFilters() + { + if (null === $this->filterCollection) { + $this->filterCollection = new FilterCollection($this); + } + + return $this->filterCollection; + } + + /** + * {@inheritDoc} + */ + public function isFiltersStateClean() + { + return null === $this->filterCollection || $this->filterCollection->isClean(); + } + + /** + * {@inheritDoc} + */ + public function hasFilters() + { + return null !== $this->filterCollection; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManagerInterface.php b/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManagerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..016cfd4ec8b8255a67ede195fc3dcb155087f5d2 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManagerInterface.php @@ -0,0 +1,296 @@ +. + */ + +namespace Doctrine\ORM; + +use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\Query\ResultSetMapping; + +/** + * EntityManager interface + * + * @since 2.4 + * @author Lars Strojny + * + * @method Mapping\ClassMetadata getClassMetadata($className) + */ +interface EntityManagerInterface extends ObjectManager +{ + /** + * Returns the cache API for managing the second level cache regions or NULL if the cache is not enabled. + * + * @return \Doctrine\ORM\Cache|null + */ + public function getCache(); + + /** + * Gets the database connection object used by the EntityManager. + * + * @return \Doctrine\DBAL\Connection + */ + public function getConnection(); + + /** + * Gets an ExpressionBuilder used for object-oriented construction of query expressions. + * + * Example: + * + * + * $qb = $em->createQueryBuilder(); + * $expr = $em->getExpressionBuilder(); + * $qb->select('u')->from('User', 'u') + * ->where($expr->orX($expr->eq('u.id', 1), $expr->eq('u.id', 2))); + * + * + * @return \Doctrine\ORM\Query\Expr + */ + public function getExpressionBuilder(); + + /** + * Starts a transaction on the underlying database connection. + * + * @return void + */ + public function beginTransaction(); + + /** + * Executes a function in a transaction. + * + * The function gets passed this EntityManager instance as an (optional) parameter. + * + * {@link flush} is invoked prior to transaction commit. + * + * If an exception occurs during execution of the function or flushing or transaction commit, + * the transaction is rolled back, the EntityManager closed and the exception re-thrown. + * + * @param callable $func The function to execute transactionally. + * + * @return mixed The non-empty value returned from the closure or true instead. + */ + public function transactional($func); + + /** + * Commits a transaction on the underlying database connection. + * + * @return void + */ + public function commit(); + + /** + * Performs a rollback on the underlying database connection. + * + * @return void + */ + public function rollback(); + + /** + * Creates a new Query object. + * + * @param string $dql The DQL string. + * + * @return Query + */ + public function createQuery($dql = ''); + + /** + * Creates a Query from a named query. + * + * @param string $name + * + * @return Query + */ + public function createNamedQuery($name); + + /** + * Creates a native SQL query. + * + * @param string $sql + * @param ResultSetMapping $rsm The ResultSetMapping to use. + * + * @return NativeQuery + */ + public function createNativeQuery($sql, ResultSetMapping $rsm); + + /** + * Creates a NativeQuery from a named native query. + * + * @param string $name + * + * @return NativeQuery + */ + public function createNamedNativeQuery($name); + + /** + * Create a QueryBuilder instance + * + * @return QueryBuilder + */ + public function createQueryBuilder(); + + /** + * Gets a reference to the entity identified by the given type and identifier + * without actually loading it, if the entity is not yet loaded. + * + * @param string $entityName The name of the entity type. + * @param mixed $id The entity identifier. + * + * @return object The entity reference. + * + * @throws ORMException + */ + public function getReference($entityName, $id); + + /** + * Gets a partial reference to the entity identified by the given type and identifier + * without actually loading it, if the entity is not yet loaded. + * + * The returned reference may be a partial object if the entity is not yet loaded/managed. + * If it is a partial object it will not initialize the rest of the entity state on access. + * Thus you can only ever safely access the identifier of an entity obtained through + * this method. + * + * The use-cases for partial references involve maintaining bidirectional associations + * without loading one side of the association or to update an entity without loading it. + * Note, however, that in the latter case the original (persistent) entity data will + * never be visible to the application (especially not event listeners) as it will + * never be loaded in the first place. + * + * @param string $entityName The name of the entity type. + * @param mixed $identifier The entity identifier. + * + * @return object The (partial) entity reference. + */ + public function getPartialReference($entityName, $identifier); + + /** + * Closes the EntityManager. All entities that are currently managed + * by this EntityManager become detached. The EntityManager may no longer + * be used after it is closed. + * + * @return void + */ + public function close(); + + /** + * Creates a copy of the given entity. Can create a shallow or a deep copy. + * + * @param object $entity The entity to copy. + * @param boolean $deep FALSE for a shallow copy, TRUE for a deep copy. + * + * @return object The new entity. + * + * @throws \BadMethodCallException + */ + public function copy($entity, $deep = false); + + /** + * Acquire a lock on the given entity. + * + * @param object $entity + * @param int $lockMode + * @param int|null $lockVersion + * + * @return void + * + * @throws OptimisticLockException + * @throws PessimisticLockException + */ + public function lock($entity, $lockMode, $lockVersion = null); + + /** + * Gets the EventManager used by the EntityManager. + * + * @return \Doctrine\Common\EventManager + */ + public function getEventManager(); + + /** + * Gets the Configuration used by the EntityManager. + * + * @return Configuration + */ + public function getConfiguration(); + + /** + * Check if the Entity manager is open or closed. + * + * @return bool + */ + public function isOpen(); + + /** + * Gets the UnitOfWork used by the EntityManager to coordinate operations. + * + * @return UnitOfWork + */ + public function getUnitOfWork(); + + /** + * Gets a hydrator for the given hydration mode. + * + * This method caches the hydrator instances which is used for all queries that don't + * selectively iterate over the result. + * + * @deprecated + * + * @param int $hydrationMode + * + * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator + */ + public function getHydrator($hydrationMode); + + /** + * Create a new instance for the given hydration mode. + * + * @param int $hydrationMode + * + * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator + * + * @throws ORMException + */ + public function newHydrator($hydrationMode); + + /** + * Gets the proxy factory used by the EntityManager to create entity proxies. + * + * @return \Doctrine\ORM\Proxy\ProxyFactory + */ + public function getProxyFactory(); + + /** + * Gets the enabled filters. + * + * @return \Doctrine\ORM\Query\FilterCollection The active filter collection. + */ + public function getFilters(); + + /** + * Checks whether the state of the filter collection is clean. + * + * @return boolean True, if the filter collection is clean. + */ + public function isFiltersStateClean(); + + /** + * Checks whether the Entity Manager has filters. + * + * @return boolean True, if the EM has a filter collection. + */ + public function hasFilters(); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/EntityNotFoundException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/EntityNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..afe2f22426d3cf14861d3b1c16467b440e30cdde --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/EntityNotFoundException.php @@ -0,0 +1,51 @@ +. + */ + +namespace Doctrine\ORM; + +/** + * Exception thrown when a Proxy fails to retrieve an Entity result. + * + * @author robo + * @since 2.0 + */ +class EntityNotFoundException extends ORMException +{ + /** + * Static constructor. + * + * @param string $className + * @param string[] $id + * + * @return self + */ + public static function fromClassNameAndIdentifier($className, array $id) + { + $ids = array(); + + foreach ($id as $key => $value) { + $ids[] = $key . '(' . $value . ')'; + } + + + return new self( + 'Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found' + ); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php b/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php new file mode 100644 index 0000000000000000000000000000000000000000..47d0648beada18d8866f99edfb7dc7349a9e664f --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php @@ -0,0 +1,306 @@ +. + */ + +namespace Doctrine\ORM; + +use Doctrine\ORM\Query\ResultSetMappingBuilder; +use Doctrine\Common\Persistence\ObjectRepository; +use Doctrine\Common\Collections\Selectable; +use Doctrine\Common\Collections\Criteria; +use Doctrine\Common\Collections\ArrayCollection; + +/** + * An EntityRepository serves as a repository for entities with generic as well as + * business specific methods for retrieving entities. + * + * This class is designed for inheritance and users can subclass this class to + * write their own repositories with business-specific methods to locate entities. + * + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class EntityRepository implements ObjectRepository, Selectable +{ + /** + * @var string + */ + protected $_entityName; + + /** + * @var EntityManager + */ + protected $_em; + + /** + * @var \Doctrine\ORM\Mapping\ClassMetadata + */ + protected $_class; + + /** + * Initializes a new EntityRepository. + * + * @param EntityManager $em The EntityManager to use. + * @param Mapping\ClassMetadata $class The class descriptor. + */ + public function __construct($em, Mapping\ClassMetadata $class) + { + $this->_entityName = $class->name; + $this->_em = $em; + $this->_class = $class; + } + + /** + * Creates a new QueryBuilder instance that is prepopulated for this entity name. + * + * @param string $alias + * @param string $indexBy The index for the from. + * + * @return QueryBuilder + */ + public function createQueryBuilder($alias, $indexBy = null) + { + return $this->_em->createQueryBuilder() + ->select($alias) + ->from($this->_entityName, $alias, $indexBy); + } + + /** + * Creates a new result set mapping builder for this entity. + * + * The column naming strategy is "INCREMENT". + * + * @param string $alias + * + * @return ResultSetMappingBuilder + */ + public function createResultSetMappingBuilder($alias) + { + $rsm = new ResultSetMappingBuilder($this->_em, ResultSetMappingBuilder::COLUMN_RENAMING_INCREMENT); + $rsm->addRootEntityFromClassMetadata($this->_entityName, $alias); + + return $rsm; + } + + /** + * Creates a new Query instance based on a predefined metadata named query. + * + * @param string $queryName + * + * @return Query + */ + public function createNamedQuery($queryName) + { + return $this->_em->createQuery($this->_class->getNamedQuery($queryName)); + } + + /** + * Creates a native SQL query. + * + * @param string $queryName + * + * @return NativeQuery + */ + public function createNativeNamedQuery($queryName) + { + $queryMapping = $this->_class->getNamedNativeQuery($queryName); + $rsm = new Query\ResultSetMappingBuilder($this->_em); + $rsm->addNamedNativeQueryMapping($this->_class, $queryMapping); + + return $this->_em->createNativeQuery($queryMapping['query'], $rsm); + } + + /** + * Clears the repository, causing all managed entities to become detached. + * + * @return void + */ + public function clear() + { + $this->_em->clear($this->_class->rootEntityName); + } + + /** + * Finds an entity by its primary key / identifier. + * + * @param mixed $id The identifier. + * @param int|null $lockMode One of the \Doctrine\DBAL\LockMode::* constants + * or NULL if no specific lock mode should be used + * during the search. + * @param int|null $lockVersion The lock version. + * + * @return object|null The entity instance or NULL if the entity can not be found. + */ + public function find($id, $lockMode = null, $lockVersion = null) + { + return $this->_em->find($this->_entityName, $id, $lockMode, $lockVersion); + } + + /** + * Finds all entities in the repository. + * + * @return array The entities. + */ + public function findAll() + { + return $this->findBy(array()); + } + + /** + * Finds entities by a set of criteria. + * + * @param array $criteria + * @param array|null $orderBy + * @param int|null $limit + * @param int|null $offset + * + * @return array The objects. + */ + public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + { + $persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName); + + return $persister->loadAll($criteria, $orderBy, $limit, $offset); + } + + /** + * Finds a single entity by a set of criteria. + * + * @param array $criteria + * @param array|null $orderBy + * + * @return object|null The entity instance or NULL if the entity can not be found. + */ + public function findOneBy(array $criteria, array $orderBy = null) + { + $persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName); + + return $persister->load($criteria, null, null, array(), null, 1, $orderBy); + } + + /** + * Adds support for magic finders. + * + * @param string $method + * @param array $arguments + * + * @return array|object The found entity/entities. + * + * @throws ORMException + * @throws \BadMethodCallException If the method called is an invalid find* method + * or no find* method at all and therefore an invalid + * method call. + */ + public function __call($method, $arguments) + { + switch (true) { + case (0 === strpos($method, 'findBy')): + $by = substr($method, 6); + $method = 'findBy'; + break; + + case (0 === strpos($method, 'findOneBy')): + $by = substr($method, 9); + $method = 'findOneBy'; + break; + + default: + throw new \BadMethodCallException( + "Undefined method '$method'. The method name must start with ". + "either findBy or findOneBy!" + ); + } + + if (empty($arguments)) { + throw ORMException::findByRequiresParameter($method . $by); + } + + $fieldName = lcfirst(\Doctrine\Common\Util\Inflector::classify($by)); + + if ($this->_class->hasField($fieldName) || $this->_class->hasAssociation($fieldName)) { + switch (count($arguments)) { + case 1: + return $this->$method(array($fieldName => $arguments[0])); + + case 2: + return $this->$method(array($fieldName => $arguments[0]), $arguments[1]); + + case 3: + return $this->$method(array($fieldName => $arguments[0]), $arguments[1], $arguments[2]); + + case 4: + return $this->$method(array($fieldName => $arguments[0]), $arguments[1], $arguments[2], $arguments[3]); + + default: + // Do nothing + } + } + + throw ORMException::invalidFindByCall($this->_entityName, $fieldName, $method.$by); + } + + /** + * @return string + */ + protected function getEntityName() + { + return $this->_entityName; + } + + /** + * @return string + */ + public function getClassName() + { + return $this->getEntityName(); + } + + /** + * @return EntityManager + */ + protected function getEntityManager() + { + return $this->_em; + } + + /** + * @return Mapping\ClassMetadata + */ + protected function getClassMetadata() + { + return $this->_class; + } + + /** + * Select all elements from a selectable that match the expression and + * return a new collection containing these elements. + * + * @param \Doctrine\Common\Collections\Criteria $criteria + * + * @return \Doctrine\Common\Collections\Collection + */ + public function matching(Criteria $criteria) + { + $persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName); + + return new LazyCriteriaCollection($persister, $criteria); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Event/LifecycleEventArgs.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/LifecycleEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..9a5c8cf0624934bd8c9e4296c8308761faefd9e0 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/LifecycleEventArgs.php @@ -0,0 +1,54 @@ +. +*/ + +namespace Doctrine\ORM\Event; + +use Doctrine\Common\Persistence\Event\LifecycleEventArgs as BaseLifecycleEventArgs; + +/** + * Lifecycle Events are triggered by the UnitOfWork during lifecycle transitions + * of entities. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class LifecycleEventArgs extends BaseLifecycleEventArgs +{ + /** + * Retrieves associated Entity. + * + * @return object + */ + public function getEntity() + { + return $this->getObject(); + } + + /** + * Retrieves associated EntityManager. + * + * @return \Doctrine\ORM\EntityManager + */ + public function getEntityManager() + { + return $this->getObjectManager(); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Event/ListenersInvoker.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/ListenersInvoker.php new file mode 100644 index 0000000000000000000000000000000000000000..bbcbd4118ebbc38501ce1b531d06b41d6fb6738f --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/ListenersInvoker.php @@ -0,0 +1,120 @@ +. + */ + +namespace Doctrine\ORM\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Mapping\ClassMetadata; + +/** + * A method invoker based on entity lifecycle. + * + * @author Fabio B. Silva + * @since 2.4 + */ +class ListenersInvoker +{ + const INVOKE_NONE = 0; + const INVOKE_LISTENERS = 1; + const INVOKE_CALLBACKS = 2; + const INVOKE_MANAGER = 4; + + /** + * @var \Doctrine\ORM\Mapping\EntityListenerResolver The Entity listener resolver. + */ + private $resolver; + + /** + * The EventManager used for dispatching events. + * + * @var \Doctrine\Common\EventManager + */ + private $eventManager; + + /** + * Initializes a new ListenersInvoker instance. + * + * @param EntityManagerInterface $em + */ + public function __construct(EntityManagerInterface $em) + { + $this->eventManager = $em->getEventManager(); + $this->resolver = $em->getConfiguration()->getEntityListenerResolver(); + } + + /** + * Get the subscribed event systems + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. + * @param string $eventName The entity lifecycle event. + * + * @return integer Bitmask of subscribed event systems. + */ + public function getSubscribedSystems(ClassMetadata $metadata, $eventName) + { + $invoke = self::INVOKE_NONE; + + if (isset($metadata->lifecycleCallbacks[$eventName])) { + $invoke |= self::INVOKE_CALLBACKS; + } + + if (isset($metadata->entityListeners[$eventName])) { + $invoke |= self::INVOKE_LISTENERS; + } + + if ($this->eventManager->hasListeners($eventName)) { + $invoke |= self::INVOKE_MANAGER; + } + + return $invoke; + } + + /** + * Dispatches the lifecycle event of the given entity. + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. + * @param string $eventName The entity lifecycle event. + * @param object $entity The Entity on which the event occurred. + * @param \Doctrine\Common\EventArgs $event The Event args. + * @param integer $invoke Bitmask to invoke listeners. + */ + public function invoke(ClassMetadata $metadata, $eventName, $entity, EventArgs $event, $invoke) + { + if($invoke & self::INVOKE_CALLBACKS) { + foreach ($metadata->lifecycleCallbacks[$eventName] as $callback) { + $entity->$callback($event); + } + } + + if($invoke & self::INVOKE_LISTENERS) { + foreach ($metadata->entityListeners[$eventName] as $listener) { + $class = $listener['class']; + $method = $listener['method']; + $instance = $this->resolver->resolve($class); + + $instance->$method($entity, $event); + } + } + + if($invoke & self::INVOKE_MANAGER) { + $this->eventManager->dispatchEvent($eventName, $event); + } + } +} \ No newline at end of file diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..95e75616e1274f19b7603bf49214babb318b02cd --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php @@ -0,0 +1,46 @@ +. + */ + +namespace Doctrine\ORM\Event; + +use Doctrine\Common\Persistence\Event\LoadClassMetadataEventArgs as BaseLoadClassMetadataEventArgs; + +/** + * Class that holds event arguments for a loadMetadata event. + * + * @author Jonathan H. Wage + * @since 2.0 + * + * Note: method annotations are used instead of method overrides (due to BC policy) + * + * @method __construct(\Doctrine\ORM\Mapping\ClassMetadata $classMetadata, \Doctrine\ORM\EntityManager $objectManager) + * @method \Doctrine\ORM\EntityManager getClassMetadata() + */ +class LoadClassMetadataEventArgs extends BaseLoadClassMetadataEventArgs +{ + /** + * Retrieve associated EntityManager. + * + * @return \Doctrine\ORM\EntityManager + */ + public function getEntityManager() + { + return $this->getObjectManager(); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Event/OnClassMetadataNotFoundEventArgs.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/OnClassMetadataNotFoundEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..a044a7e321d90c6a7cf5e33b709ddb7c7846c8f5 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/OnClassMetadataNotFoundEventArgs.php @@ -0,0 +1,86 @@ +. + */ + +namespace Doctrine\ORM\Event; + +use Doctrine\Common\Persistence\Event\ManagerEventArgs; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Persistence\ObjectManager; + +/** + * Class that holds event arguments for a `onClassMetadataNotFound` event. + * + * This object is mutable by design, allowing callbacks having access to it to set the + * found metadata in it, and therefore "cancelling" a `onClassMetadataNotFound` event + * + * @author Marco Pivetta + * @since 2.5 + */ +class OnClassMetadataNotFoundEventArgs extends ManagerEventArgs +{ + /** + * @var string + */ + private $className; + + /** + * @var ClassMetadata|null + */ + private $foundMetadata; + + /** + * Constructor. + * + * @param string $className + * @param ObjectManager $objectManager + */ + public function __construct($className, ObjectManager $objectManager) + { + $this->className = (string) $className; + + parent::__construct($objectManager); + } + + /** + * @param ClassMetadata|null $classMetadata + */ + public function setFoundMetadata(ClassMetadata $classMetadata = null) + { + $this->foundMetadata = $classMetadata; + } + + /** + * @return ClassMetadata|null + */ + public function getFoundMetadata() + { + return $this->foundMetadata; + } + + /** + * Retrieve class name for which a failed metadata fetch attempt was executed + * + * @return string + */ + public function getClassName() + { + return $this->className; + } +} + diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Event/OnClearEventArgs.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/OnClearEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..dd827c72568f105c03c0d1a37057c8f05188f55b --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/OnClearEventArgs.php @@ -0,0 +1,86 @@ +. + */ + +namespace Doctrine\ORM\Event; + +use Doctrine\ORM\EntityManagerInterface; + +/** + * Provides event arguments for the onClear event. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.org + * @since 2.0 + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class OnClearEventArgs extends \Doctrine\Common\EventArgs +{ + /** + * @var EntityManagerInterface + */ + private $em; + + /** + * @var string + */ + private $entityClass; + + /** + * Constructor. + * + * @param EntityManagerInterface $em + * @param string|null $entityClass Optional entity class. + */ + public function __construct(EntityManagerInterface $em, $entityClass = null) + { + $this->em = $em; + $this->entityClass = $entityClass; + } + + /** + * Retrieves associated EntityManager. + * + * @return \Doctrine\ORM\EntityManager + */ + public function getEntityManager() + { + return $this->em; + } + + /** + * Name of the entity class that is cleared, or empty if all are cleared. + * + * @return string|null + */ + public function getEntityClass() + { + return $this->entityClass; + } + + /** + * Checks if event clears all entities. + * + * @return bool + */ + public function clearsAllEntities() + { + return ($this->entityClass === null); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Event/OnFlushEventArgs.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/OnFlushEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..6a9c7c7f464d559c9bfbf3364b9e4e15f74ae553 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/OnFlushEventArgs.php @@ -0,0 +1,61 @@ +. + */ + +namespace Doctrine\ORM\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\ORM\EntityManagerInterface; + +/** + * Provides event arguments for the preFlush event. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.org + * @since 2.0 + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class OnFlushEventArgs extends EventArgs +{ + /** + * @var EntityManagerInterface + */ + private $em; + + /** + * Constructor. + * + * @param EntityManagerInterface $em + */ + public function __construct(EntityManagerInterface $em) + { + $this->em = $em; + } + + /** + * Retrieve associated EntityManager. + * + * @return \Doctrine\ORM\EntityManager + */ + public function getEntityManager() + { + return $this->em; + } + +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Event/PostFlushEventArgs.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/PostFlushEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..860f2d33b90a6ad1c688bc62153a4754d48535e3 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/PostFlushEventArgs.php @@ -0,0 +1,58 @@ +. + */ +namespace Doctrine\ORM\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\ORM\EntityManagerInterface; + +/** + * Provides event arguments for the postFlush event. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.org + * @since 2.0 + * @author Daniel Freudenberger + */ +class PostFlushEventArgs extends EventArgs +{ + /** + * @var \Doctrine\ORM\EntityManager + */ + private $em; + + /** + * Constructor. + * + * @param EntityManagerInterface $em + */ + public function __construct(EntityManagerInterface $em) + { + $this->em = $em; + } + + /** + * Retrieves associated EntityManager. + * + * @return \Doctrine\ORM\EntityManager + */ + public function getEntityManager() + { + return $this->em; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Event/PreFlushEventArgs.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/PreFlushEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..d01a926396047e9b848e238c4a3a5a729b8ab143 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/PreFlushEventArgs.php @@ -0,0 +1,58 @@ +. + */ + +namespace Doctrine\ORM\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\ORM\EntityManagerInterface; + +/** + * Provides event arguments for the preFlush event. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 2.0 + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class PreFlushEventArgs extends EventArgs +{ + /** + * @var \Doctrine\ORM\EntityManager + */ + private $em; + + /** + * Constructor. + * + * @param EntityManagerInterface $em + */ + public function __construct(EntityManagerInterface $em) + { + $this->em = $em; + } + + /** + * @return \Doctrine\ORM\EntityManager + */ + public function getEntityManager() + { + return $this->em; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Event/PreUpdateEventArgs.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/PreUpdateEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..d9a9f9db2ccf603c3fc041c250255815f40b5e93 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Event/PreUpdateEventArgs.php @@ -0,0 +1,137 @@ +. + */ + +namespace Doctrine\ORM\Event; + +use Doctrine\ORM\EntityManagerInterface; + +/** + * Class that holds event arguments for a preInsert/preUpdate event. + * + * @author Guilherme Blanco + * @author Roman Borschel + * @author Benjamin Eberlei + * @since 2.0 + */ +class PreUpdateEventArgs extends LifecycleEventArgs +{ + /** + * @var array + */ + private $entityChangeSet; + + /** + * Constructor. + * + * @param object $entity + * @param EntityManagerInterface $em + * @param array $changeSet + */ + public function __construct($entity, EntityManagerInterface $em, array &$changeSet) + { + parent::__construct($entity, $em); + + $this->entityChangeSet = &$changeSet; + } + + /** + * Retrieves entity changeset. + * + * @return array + */ + public function getEntityChangeSet() + { + return $this->entityChangeSet; + } + + /** + * Checks if field has a changeset. + * + * @param string $field + * + * @return boolean + */ + public function hasChangedField($field) + { + return isset($this->entityChangeSet[$field]); + } + + /** + * Gets the old value of the changeset of the changed field. + * + * @param string $field + * + * @return mixed + */ + public function getOldValue($field) + { + $this->assertValidField($field); + + return $this->entityChangeSet[$field][0]; + } + + /** + * Gets the new value of the changeset of the changed field. + * + * @param string $field + * + * @return mixed + */ + public function getNewValue($field) + { + $this->assertValidField($field); + + return $this->entityChangeSet[$field][1]; + } + + /** + * Sets the new value of this field. + * + * @param string $field + * @param mixed $value + * + * @return void + */ + public function setNewValue($field, $value) + { + $this->assertValidField($field); + + $this->entityChangeSet[$field][1] = $value; + } + + /** + * Asserts the field exists in changeset. + * + * @param string $field + * + * @return void + * + * @throws \InvalidArgumentException + */ + private function assertValidField($field) + { + if ( ! isset($this->entityChangeSet[$field])) { + throw new \InvalidArgumentException(sprintf( + 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.', + $field, + get_class($this->getEntity()) + )); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Events.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Events.php new file mode 100644 index 0000000000000000000000000000000000000000..e16b47a4214deef5ec72cb43e1b440b41c561b0f --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Events.php @@ -0,0 +1,167 @@ +. + */ + +namespace Doctrine\ORM; + +/** + * Container for all ORM events. + * + * This class cannot be instantiated. + * + * @author Roman Borschel + * @since 2.0 + */ +final class Events +{ + /** + * Private constructor. This class is not meant to be instantiated. + */ + private function __construct() + { + } + + /** + * The preRemove event occurs for a given entity before the respective + * EntityManager remove operation for that entity is executed. + * + * This is an entity lifecycle event. + * + * @var string + */ + const preRemove = 'preRemove'; + + /** + * The postRemove event occurs for an entity after the entity has + * been deleted. It will be invoked after the database delete operations. + * + * This is an entity lifecycle event. + * + * @var string + */ + const postRemove = 'postRemove'; + + /** + * The prePersist event occurs for a given entity before the respective + * EntityManager persist operation for that entity is executed. + * + * This is an entity lifecycle event. + * + * @var string + */ + const prePersist = 'prePersist'; + + /** + * The postPersist event occurs for an entity after the entity has + * been made persistent. It will be invoked after the database insert operations. + * Generated primary key values are available in the postPersist event. + * + * This is an entity lifecycle event. + * + * @var string + */ + const postPersist = 'postPersist'; + + /** + * The preUpdate event occurs before the database update operations to + * entity data. + * + * This is an entity lifecycle event. + * + * @var string + */ + const preUpdate = 'preUpdate'; + + /** + * The postUpdate event occurs after the database update operations to + * entity data. + * + * This is an entity lifecycle event. + * + * @var string + */ + const postUpdate = 'postUpdate'; + + /** + * The postLoad event occurs for an entity after the entity has been loaded + * into the current EntityManager from the database or after the refresh operation + * has been applied to it. + * + * Note that the postLoad event occurs for an entity before any associations have been + * initialized. Therefore it is not safe to access associations in a postLoad callback + * or event handler. + * + * This is an entity lifecycle event. + * + * @var string + */ + const postLoad = 'postLoad'; + + /** + * The loadClassMetadata event occurs after the mapping metadata for a class + * has been loaded from a mapping source (annotations/xml/yaml). + * + * @var string + */ + const loadClassMetadata = 'loadClassMetadata'; + + /** + * The onClassMetadataNotFound event occurs whenever loading metadata for a class + * failed. + * + * @var string + */ + const onClassMetadataNotFound = 'onClassMetadataNotFound'; + + /** + * The preFlush event occurs when the EntityManager#flush() operation is invoked, + * but before any changes to managed entities have been calculated. This event is + * always raised right after EntityManager#flush() call. + */ + const preFlush = 'preFlush'; + + /** + * The onFlush event occurs when the EntityManager#flush() operation is invoked, + * after any changes to managed entities have been determined but before any + * actual database operations are executed. The event is only raised if there is + * actually something to do for the underlying UnitOfWork. If nothing needs to be done, + * the onFlush event is not raised. + * + * @var string + */ + const onFlush = 'onFlush'; + + /** + * The postFlush event occurs when the EntityManager#flush() operation is invoked and + * after all actual database operations are executed successfully. The event is only raised if there is + * actually something to do for the underlying UnitOfWork. If nothing needs to be done, + * the postFlush event is not raised. The event won't be raised if an error occurs during the + * flush operation. + * + * @var string + */ + const postFlush = 'postFlush'; + + /** + * The onClear event occurs when the EntityManager#clear() operation is invoked, + * after all references to entities have been removed from the unit of work. + * + * @var string + */ + const onClear = 'onClear'; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Id/AbstractIdGenerator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/AbstractIdGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..5ed2872add6c4475ad6a50623753e89864776a60 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/AbstractIdGenerator.php @@ -0,0 +1,49 @@ +. + */ + +namespace Doctrine\ORM\Id; + +use Doctrine\ORM\EntityManager; + +abstract class AbstractIdGenerator +{ + /** + * Generates an identifier for an entity. + * + * @param EntityManager|EntityManager $em + * @param \Doctrine\ORM\Mapping\Entity $entity + * @return mixed + */ + abstract public function generate(EntityManager $em, $entity); + + /** + * Gets whether this generator is a post-insert generator which means that + * {@link generate()} must be called after the entity has been inserted + * into the database. + * + * By default, this method returns FALSE. Generators that have this requirement + * must override this method and return TRUE. + * + * @return boolean + */ + public function isPostInsertGenerator() + { + return false; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Id/AssignedGenerator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/AssignedGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..447dbd6d597ec25aaebf9210cc56358ebc956c2f --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/AssignedGenerator.php @@ -0,0 +1,66 @@ +. + */ + +namespace Doctrine\ORM\Id; + +use Doctrine\ORM\EntityManager; +use Doctrine\ORM\ORMException; + +/** + * Special generator for application-assigned identifiers (doesn't really generate anything). + * + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class AssignedGenerator extends AbstractIdGenerator +{ + /** + * Returns the identifier assigned to the given entity. + * + * {@inheritDoc} + * + * @throws \Doctrine\ORM\ORMException + */ + public function generate(EntityManager $em, $entity) + { + $class = $em->getClassMetadata(get_class($entity)); + $idFields = $class->getIdentifierFieldNames(); + $identifier = array(); + + foreach ($idFields as $idField) { + $value = $class->getFieldValue($entity, $idField); + + if ( ! isset($value)) { + throw ORMException::entityMissingAssignedIdForField($entity, $idField); + } + + if (isset($class->associationMappings[$idField])) { + // NOTE: Single Columns as associated identifiers only allowed - this constraint it is enforced. + $value = $em->getUnitOfWork()->getSingleIdentifierValue($value); + } + + $identifier[$idField] = $value; + } + + return $identifier; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Id/BigIntegerIdentityGenerator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/BigIntegerIdentityGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..01d139f485b74db2938ce16b8f969d99bccea989 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/BigIntegerIdentityGenerator.php @@ -0,0 +1,66 @@ +. + */ + +namespace Doctrine\ORM\Id; + +use Doctrine\ORM\EntityManager; + +/** + * Id generator that obtains IDs from special "identity" columns. These are columns + * that automatically get a database-generated, auto-incremented identifier on INSERT. + * This generator obtains the last insert id after such an insert. + */ +class BigIntegerIdentityGenerator extends AbstractIdGenerator +{ + /** + * The name of the sequence to pass to lastInsertId(), if any. + * + * @var string + */ + private $sequenceName; + + /** + * Constructor. + * + * @param string|null $sequenceName The name of the sequence to pass to lastInsertId() + * to obtain the last generated identifier within the current + * database session/connection, if any. + */ + public function __construct($sequenceName = null) + { + $this->sequenceName = $sequenceName; + } + + /** + * {@inheritDoc} + */ + public function generate(EntityManager $em, $entity) + { + return (string) $em->getConnection()->lastInsertId($this->sequenceName); + } + + /** + * {@inheritDoc} + */ + public function isPostInsertGenerator() + { + return true; + } +} + diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Id/IdentityGenerator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/IdentityGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..46cd7dbcd26c60bb0865578e49361ad9b9a6b2f0 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/IdentityGenerator.php @@ -0,0 +1,66 @@ +. + */ + +namespace Doctrine\ORM\Id; + +use Doctrine\ORM\EntityManager; + +/** + * Id generator that obtains IDs from special "identity" columns. These are columns + * that automatically get a database-generated, auto-incremented identifier on INSERT. + * This generator obtains the last insert id after such an insert. + */ +class IdentityGenerator extends AbstractIdGenerator +{ + /** + * The name of the sequence to pass to lastInsertId(), if any. + * + * @var string + */ + private $sequenceName; + + /** + * Constructor. + * + * @param string|null $sequenceName The name of the sequence to pass to lastInsertId() + * to obtain the last generated identifier within the current + * database session/connection, if any. + */ + public function __construct($sequenceName = null) + { + $this->sequenceName = $sequenceName; + } + + /** + * {@inheritDoc} + */ + public function generate( + EntityManager $em, $entity) + { + return (int)$em->getConnection()->lastInsertId($this->sequenceName); + } + + /** + * {@inheritdoc} + */ + public function isPostInsertGenerator() + { + return true; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Id/SequenceGenerator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/SequenceGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..1236d95b55183d785a2351c1ca7559dac63715b0 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/SequenceGenerator.php @@ -0,0 +1,129 @@ +. + */ + +namespace Doctrine\ORM\Id; + +use Doctrine\ORM\EntityManager; +use Serializable; + +/** + * Represents an ID generator that uses a database sequence. + * + * @since 2.0 + * @author Roman Borschel + */ +class SequenceGenerator extends AbstractIdGenerator implements Serializable +{ + /** + * The allocation size of the sequence. + * + * @var int + */ + private $_allocationSize; + + /** + * The name of the sequence. + * + * @var string + */ + private $_sequenceName; + + /** + * @var int + */ + private $_nextValue = 0; + + /** + * @var int|null + */ + private $_maxValue = null; + + /** + * Initializes a new sequence generator. + * + * @param string $sequenceName The name of the sequence. + * @param integer $allocationSize The allocation size of the sequence. + */ + public function __construct($sequenceName, $allocationSize) + { + $this->_sequenceName = $sequenceName; + $this->_allocationSize = $allocationSize; + } + + /** + * {@inheritDoc} + */ + public function generate(EntityManager $em, $entity) + { + if ($this->_maxValue === null || $this->_nextValue == $this->_maxValue) { + // Allocate new values + $conn = $em->getConnection(); + $sql = $conn->getDatabasePlatform()->getSequenceNextValSQL($this->_sequenceName); + + $this->_nextValue = (int)$conn->fetchColumn($sql); + $this->_maxValue = $this->_nextValue + $this->_allocationSize; + } + + return $this->_nextValue++; + } + + /** + * Gets the maximum value of the currently allocated bag of values. + * + * @return integer|null + */ + public function getCurrentMaxValue() + { + return $this->_maxValue; + } + + /** + * Gets the next value that will be returned by generate(). + * + * @return integer + */ + public function getNextValue() + { + return $this->_nextValue; + } + + /** + * @return string + */ + public function serialize() + { + return serialize(array( + 'allocationSize' => $this->_allocationSize, + 'sequenceName' => $this->_sequenceName + )); + } + + /** + * @param string $serialized + * + * @return void + */ + public function unserialize($serialized) + { + $array = unserialize($serialized); + + $this->_sequenceName = $array['sequenceName']; + $this->_allocationSize = $array['allocationSize']; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Id/TableGenerator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/TableGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..abf3ab8acd34164b4a22afbfe0bceabef678d36a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/TableGenerator.php @@ -0,0 +1,109 @@ +. + */ + +namespace Doctrine\ORM\Id; + +use Doctrine\ORM\EntityManager; + +/** + * Id generator that uses a single-row database table and a hi/lo algorithm. + * + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class TableGenerator extends AbstractIdGenerator +{ + /** + * @var string + */ + private $_tableName; + + /** + * @var string + */ + private $_sequenceName; + + /** + * @var int + */ + private $_allocationSize; + + /** + * @var int|null + */ + private $_nextValue; + + /** + * @var int|null + */ + private $_maxValue; + + /** + * @param string $tableName + * @param string $sequenceName + * @param int $allocationSize + */ + public function __construct($tableName, $sequenceName = 'default', $allocationSize = 10) + { + $this->_tableName = $tableName; + $this->_sequenceName = $sequenceName; + $this->_allocationSize = $allocationSize; + } + + /** + * {@inheritDoc} + */ + public function generate( + EntityManager $em, $entity) + { + if ($this->_maxValue === null || $this->_nextValue == $this->_maxValue) { + // Allocate new values + $conn = $em->getConnection(); + + if ($conn->getTransactionNestingLevel() === 0) { + // use select for update + $sql = $conn->getDatabasePlatform()->getTableHiLoCurrentValSql($this->_tableName, $this->_sequenceName); + $currentLevel = $conn->fetchColumn($sql); + + if ($currentLevel != null) { + $this->_nextValue = $currentLevel; + $this->_maxValue = $this->_nextValue + $this->_allocationSize; + + $updateSql = $conn->getDatabasePlatform()->getTableHiLoUpdateNextValSql( + $this->_tableName, $this->_sequenceName, $this->_allocationSize + ); + + if ($conn->executeUpdate($updateSql, array(1 => $currentLevel, 2 => $currentLevel+1)) !== 1) { + // no affected rows, concurrency issue, throw exception + } + } else { + // no current level returned, TableGenerator seems to be broken, throw exception + } + } else { + // only table locks help here, implement this or throw exception? + // or do we want to work with table locks exclusively? + } + } + + return $this->_nextValue++; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Id/UuidGenerator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/UuidGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..a8e92bbe202f89ebc422ca1304fa64a4d11ead58 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Id/UuidGenerator.php @@ -0,0 +1,41 @@ +. + */ + +namespace Doctrine\ORM\Id; + +use Doctrine\ORM\EntityManager; + +/** + * Represents an ID generator that uses the database UUID expression + * + * @since 2.3 + * @author Maarten de Keizer + */ +class UuidGenerator extends AbstractIdGenerator +{ + /** + * {@inheritDoc} + */ + public function generate(EntityManager $em, $entity) + { + $conn = $em->getConnection(); + $sql = 'SELECT ' . $conn->getDatabasePlatform()->getGuidExpression(); + return $conn->query($sql)->fetchColumn(0); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php new file mode 100644 index 0000000000000000000000000000000000000000..9e069b0e3aab152b41b9a1f61c6e12772075283e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php @@ -0,0 +1,156 @@ +. + */ + +namespace Doctrine\ORM\Internal; + +/** + * The CommitOrderCalculator is used by the UnitOfWork to sort out the + * correct order in which changes to entities need to be persisted. + * + * @since 2.0 + * @author Roman Borschel + * @author Guilherme Blanco + */ +class CommitOrderCalculator +{ + const NOT_VISITED = 1; + const IN_PROGRESS = 2; + const VISITED = 3; + + /** + * @var array + */ + private $_nodeStates = array(); + + /** + * The nodes to sort. + * + * @var array + */ + private $_classes = array(); + + /** + * @var array + */ + private $_relatedClasses = array(); + + /** + * @var array + */ + private $_sorted = array(); + + /** + * Clears the current graph. + * + * @return void + */ + public function clear() + { + $this->_classes = array(); + $this->_relatedClasses = array(); + } + + /** + * Gets a valid commit order for all current nodes. + * + * Uses a depth-first search (DFS) to traverse the graph. + * The desired topological sorting is the reverse postorder of these searches. + * + * @return array The list of ordered classes. + */ + public function getCommitOrder() + { + // Check whether we need to do anything. 0 or 1 node is easy. + $nodeCount = count($this->_classes); + + if ($nodeCount <= 1) { + return ($nodeCount == 1) ? array_values($this->_classes) : array(); + } + + // Init + foreach ($this->_classes as $node) { + $this->_nodeStates[$node->name] = self::NOT_VISITED; + } + + // Go + foreach ($this->_classes as $node) { + if ($this->_nodeStates[$node->name] == self::NOT_VISITED) { + $this->_visitNode($node); + } + } + + $sorted = array_reverse($this->_sorted); + + $this->_sorted = $this->_nodeStates = array(); + + return $sorted; + } + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadata $node + * + * @return void + */ + private function _visitNode($node) + { + $this->_nodeStates[$node->name] = self::IN_PROGRESS; + + if (isset($this->_relatedClasses[$node->name])) { + foreach ($this->_relatedClasses[$node->name] as $relatedNode) { + if ($this->_nodeStates[$relatedNode->name] == self::NOT_VISITED) { + $this->_visitNode($relatedNode); + } + } + } + + $this->_nodeStates[$node->name] = self::VISITED; + $this->_sorted[] = $node; + } + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadata $fromClass + * @param \Doctrine\ORM\Mapping\ClassMetadata $toClass + * + * @return void + */ + public function addDependency($fromClass, $toClass) + { + $this->_relatedClasses[$fromClass->name][] = $toClass; + } + + /** + * @param string $className + * + * @return bool + */ + public function hasClass($className) + { + return isset($this->_classes[$className]); + } + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadata $class + * + * @return void + */ + public function addClass($class) + { + $this->_classes[$class->name] = $class; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php new file mode 100644 index 0000000000000000000000000000000000000000..af232d1ff2eefad93eabf62cc59ef8a25af9da4c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php @@ -0,0 +1,470 @@ +. + */ + +namespace Doctrine\ORM\Internal\Hydration; + +use Doctrine\DBAL\Types\Type; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Events; +use Doctrine\ORM\Mapping\ClassMetadata; +use PDO; + +/** + * Base class for all hydrators. A hydrator is a class that provides some form + * of transformation of an SQL result set into another structure. + * + * @since 2.0 + * @author Konsta Vesterinen + * @author Roman Borschel + * @author Guilherme Blanco + */ +abstract class AbstractHydrator +{ + /** + * The ResultSetMapping. + * + * @var \Doctrine\ORM\Query\ResultSetMapping + */ + protected $_rsm; + + /** + * The EntityManager instance. + * + * @var EntityManagerInterface + */ + protected $_em; + + /** + * The dbms Platform instance. + * + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + protected $_platform; + + /** + * The UnitOfWork of the associated EntityManager. + * + * @var \Doctrine\ORM\UnitOfWork + */ + protected $_uow; + + /** + * Local ClassMetadata cache to avoid going to the EntityManager all the time. + * + * @var array + */ + protected $_metadataCache = array(); + + /** + * The cache used during row-by-row hydration. + * + * @var array + */ + protected $_cache = array(); + + /** + * The statement that provides the data to hydrate. + * + * @var \Doctrine\DBAL\Driver\Statement + */ + protected $_stmt; + + /** + * The query hints. + * + * @var array + */ + protected $_hints; + + /** + * Initializes a new instance of a class derived from AbstractHydrator. + * + * @param EntityManagerInterface $em The EntityManager to use. + */ + public function __construct(EntityManagerInterface $em) + { + $this->_em = $em; + $this->_platform = $em->getConnection()->getDatabasePlatform(); + $this->_uow = $em->getUnitOfWork(); + } + + /** + * Initiates a row-by-row hydration. + * + * @param object $stmt + * @param object $resultSetMapping + * @param array $hints + * + * @return IterableResult + */ + public function iterate($stmt, $resultSetMapping, array $hints = array()) + { + $this->_stmt = $stmt; + $this->_rsm = $resultSetMapping; + $this->_hints = $hints; + + $evm = $this->_em->getEventManager(); + $evm->addEventListener(array(Events::onClear), $this); + + $this->prepare(); + + return new IterableResult($this); + } + + /** + * Hydrates all rows returned by the passed statement instance at once. + * + * @param object $stmt + * @param object $resultSetMapping + * @param array $hints + * + * @return array + */ + public function hydrateAll($stmt, $resultSetMapping, array $hints = array()) + { + $this->_stmt = $stmt; + $this->_rsm = $resultSetMapping; + $this->_hints = $hints; + + $this->prepare(); + + $result = $this->hydrateAllData(); + + $this->cleanup(); + + return $result; + } + + /** + * Hydrates a single row returned by the current statement instance during + * row-by-row hydration with {@link iterate()}. + * + * @return mixed + */ + public function hydrateRow() + { + $row = $this->_stmt->fetch(PDO::FETCH_ASSOC); + + if ( ! $row) { + $this->cleanup(); + + return false; + } + + $result = array(); + + $this->hydrateRowData($row, $result); + + return $result; + } + + /** + * When executed in a hydrate() loop we have to clear internal state to + * decrease memory consumption. + * + * @param mixed $eventArgs + * + * @return void + */ + public function onClear($eventArgs) + { + } + + /** + * Executes one-time preparation tasks, once each time hydration is started + * through {@link hydrateAll} or {@link iterate()}. + * + * @return void + */ + protected function prepare() + { + } + + /** + * Executes one-time cleanup tasks at the end of a hydration that was initiated + * through {@link hydrateAll} or {@link iterate()}. + * + * @return void + */ + protected function cleanup() + { + $this->_stmt->closeCursor(); + + $this->_stmt = null; + $this->_rsm = null; + $this->_cache = array(); + $this->_metadataCache = array(); + } + + /** + * Hydrates a single row from the current statement instance. + * + * Template method. + * + * @param array $data The row data. + * @param array $result The result to fill. + * + * @return void + * + * @throws HydrationException + */ + protected function hydrateRowData(array $data, array &$result) + { + throw new HydrationException("hydrateRowData() not implemented by this hydrator."); + } + + /** + * Hydrates all rows from the current statement instance at once. + * + * @return array + */ + abstract protected function hydrateAllData(); + + /** + * Processes a row of the result set. + * + * Used for identity-based hydration (HYDRATE_OBJECT and HYDRATE_ARRAY). + * Puts the elements of a result row into a new array, grouped by the dql alias + * they belong to. The column names in the result set are mapped to their + * field names during this procedure as well as any necessary conversions on + * the values applied. Scalar values are kept in a specific key 'scalars'. + * + * @param array $data SQL Result Row. + * @param array &$id Dql-Alias => ID-Hash. + * @param array &$nonemptyComponents Does this DQL-Alias has at least one non NULL value? + * + * @return array An array with all the fields (name => value) of the data row, + * grouped by their component alias. + */ + protected function gatherRowData(array $data, array &$id, array &$nonemptyComponents) + { + $rowData = array('data' => array()); + + foreach ($data as $key => $value) { + if (($cacheKeyInfo = $this->hydrateColumnInfo($key)) === null) { + continue; + } + + $fieldName = $cacheKeyInfo['fieldName']; + + switch (true) { + case (isset($cacheKeyInfo['isNewObjectParameter'])): + $argIndex = $cacheKeyInfo['argIndex']; + $objIndex = $cacheKeyInfo['objIndex']; + $type = $cacheKeyInfo['type']; + $value = $type->convertToPHPValue($value, $this->_platform); + + $rowData['newObjects'][$objIndex]['class'] = $cacheKeyInfo['class']; + $rowData['newObjects'][$objIndex]['args'][$argIndex] = $value; + break; + + case (isset($cacheKeyInfo['isScalar'])): + $type = $cacheKeyInfo['type']; + $value = $type->convertToPHPValue($value, $this->_platform); + + $rowData['scalars'][$fieldName] = $value; + break; + + //case (isset($cacheKeyInfo['isMetaColumn'])): + default: + $dqlAlias = $cacheKeyInfo['dqlAlias']; + $type = $cacheKeyInfo['type']; + + // in an inheritance hierarchy the same field could be defined several times. + // We overwrite this value so long we don't have a non-null value, that value we keep. + // Per definition it cannot be that a field is defined several times and has several values. + if (isset($rowData['data'][$dqlAlias][$fieldName])) { + break; + } + + $rowData['data'][$dqlAlias][$fieldName] = $type + ? $type->convertToPHPValue($value, $this->_platform) + : $value; + + if ($cacheKeyInfo['isIdentifier'] && $value !== null) { + $id[$dqlAlias] .= '|' . $value; + $nonemptyComponents[$dqlAlias] = true; + } + break; + } + } + + return $rowData; + } + + /** + * Processes a row of the result set. + * + * Used for HYDRATE_SCALAR. This is a variant of _gatherRowData() that + * simply converts column names to field names and properly converts the + * values according to their types. The resulting row has the same number + * of elements as before. + * + * @param array $data + * + * @return array The processed row. + */ + protected function gatherScalarRowData(&$data) + { + $rowData = array(); + + foreach ($data as $key => $value) { + if (($cacheKeyInfo = $this->hydrateColumnInfo($key)) === null) { + continue; + } + + $fieldName = $cacheKeyInfo['fieldName']; + + // WARNING: BC break! We know this is the desired behavior to type convert values, but this + // erroneous behavior exists since 2.0 and we're forced to keep compatibility. + if ( ! isset($cacheKeyInfo['isScalar'])) { + $dqlAlias = $cacheKeyInfo['dqlAlias']; + $type = $cacheKeyInfo['type']; + $fieldName = $dqlAlias . '_' . $fieldName; + $value = $type + ? $type->convertToPHPValue($value, $this->_platform) + : $value; + } + + $rowData[$fieldName] = $value; + } + + return $rowData; + } + + /** + * Retrieve column information from ResultSetMapping. + * + * @param string $key Column name + * + * @return array|null + */ + protected function hydrateColumnInfo($key) + { + if (isset($this->_cache[$key])) { + return $this->_cache[$key]; + } + + switch (true) { + // NOTE: Most of the times it's a field mapping, so keep it first!!! + case (isset($this->_rsm->fieldMappings[$key])): + $classMetadata = $this->getClassMetadata($this->_rsm->declaringClasses[$key]); + $fieldName = $this->_rsm->fieldMappings[$key]; + $fieldMapping = $classMetadata->fieldMappings[$fieldName]; + + return $this->_cache[$key] = array( + 'isIdentifier' => in_array($fieldName, $classMetadata->identifier), + 'fieldName' => $fieldName, + 'type' => Type::getType($fieldMapping['type']), + 'dqlAlias' => $this->_rsm->columnOwnerMap[$key], + ); + + case (isset($this->_rsm->newObjectMappings[$key])): + // WARNING: A NEW object is also a scalar, so it must be declared before! + $mapping = $this->_rsm->newObjectMappings[$key]; + + return $this->_cache[$key] = array( + 'isScalar' => true, + 'isNewObjectParameter' => true, + 'fieldName' => $this->_rsm->scalarMappings[$key], + 'type' => Type::getType($this->_rsm->typeMappings[$key]), + 'argIndex' => $mapping['argIndex'], + 'objIndex' => $mapping['objIndex'], + 'class' => new \ReflectionClass($mapping['className']), + ); + + case (isset($this->_rsm->scalarMappings[$key])): + return $this->_cache[$key] = array( + 'isScalar' => true, + 'fieldName' => $this->_rsm->scalarMappings[$key], + 'type' => Type::getType($this->_rsm->typeMappings[$key]), + ); + + case (isset($this->_rsm->metaMappings[$key])): + // Meta column (has meaning in relational schema only, i.e. foreign keys or discriminator columns). + $fieldName = $this->_rsm->metaMappings[$key]; + $dqlAlias = $this->_rsm->columnOwnerMap[$key]; + $classMetadata = $this->getClassMetadata($this->_rsm->aliasMap[$dqlAlias]); + $type = isset($this->_rsm->typeMappings[$key]) + ? Type::getType($this->_rsm->typeMappings[$key]) + : null; + + return $this->_cache[$key] = array( + 'isIdentifier' => isset($this->_rsm->isIdentifierColumn[$dqlAlias][$key]), + 'isMetaColumn' => true, + 'fieldName' => $fieldName, + 'type' => $type, + 'dqlAlias' => $dqlAlias, + ); + } + + // this column is a left over, maybe from a LIMIT query hack for example in Oracle or DB2 + // maybe from an additional column that has not been defined in a NativeQuery ResultSetMapping. + return null; + } + + /** + * Retrieve ClassMetadata associated to entity class name. + * + * @param string $className + * + * @return \Doctrine\ORM\Mapping\ClassMetadata + */ + protected function getClassMetadata($className) + { + if ( ! isset($this->_metadataCache[$className])) { + $this->_metadataCache[$className] = $this->_em->getClassMetadata($className); + } + + return $this->_metadataCache[$className]; + } + + /** + * Register entity as managed in UnitOfWork. + * + * @param ClassMetadata $class + * @param object $entity + * @param array $data + * + * @return void + * + * @todo The "$id" generation is the same of UnitOfWork#createEntity. Remove this duplication somehow + */ + protected function registerManaged(ClassMetadata $class, $entity, array $data) + { + if ($class->isIdentifierComposite) { + $id = array(); + + foreach ($class->identifier as $fieldName) { + $id[$fieldName] = isset($class->associationMappings[$fieldName]) + ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']] + : $data[$fieldName]; + } + } else { + $fieldName = $class->identifier[0]; + $id = array( + $fieldName => isset($class->associationMappings[$fieldName]) + ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']] + : $data[$fieldName] + ); + } + + $this->_em->getUnitOfWork()->registerManaged($entity, $id, $data); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php new file mode 100644 index 0000000000000000000000000000000000000000..f3e4376f7579fb924aac6f8b533f18583c2c2194 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php @@ -0,0 +1,307 @@ +. + */ + +namespace Doctrine\ORM\Internal\Hydration; + +use PDO; +use Doctrine\ORM\Mapping\ClassMetadata; + +/** + * The ArrayHydrator produces a nested array "graph" that is often (not always) + * interchangeable with the corresponding object graph for read-only access. + * + * @since 2.0 + * @author Roman Borschel + * @author Guilherme Blanco + */ +class ArrayHydrator extends AbstractHydrator +{ + /** + * @var array + */ + private $_rootAliases = array(); + + /** + * @var bool + */ + private $_isSimpleQuery = false; + + /** + * @var array + */ + private $_identifierMap = array(); + + /** + * @var array + */ + private $_resultPointers = array(); + + /** + * @var array + */ + private $_idTemplate = array(); + + /** + * @var int + */ + private $_resultCounter = 0; + + /** + * {@inheritdoc} + */ + protected function prepare() + { + $this->_isSimpleQuery = count($this->_rsm->aliasMap) <= 1; + + foreach ($this->_rsm->aliasMap as $dqlAlias => $className) { + $this->_identifierMap[$dqlAlias] = array(); + $this->_resultPointers[$dqlAlias] = array(); + $this->_idTemplate[$dqlAlias] = ''; + } + } + + /** + * {@inheritdoc} + */ + protected function hydrateAllData() + { + $result = array(); + + while ($data = $this->_stmt->fetch(PDO::FETCH_ASSOC)) { + $this->hydrateRowData($data, $result); + } + + return $result; + } + + /** + * {@inheritdoc} + */ + protected function hydrateRowData(array $row, array &$result) + { + // 1) Initialize + $id = $this->_idTemplate; // initialize the id-memory + $nonemptyComponents = array(); + $rowData = $this->gatherRowData($row, $id, $nonemptyComponents); + + // 2) Now hydrate the data found in the current row. + foreach ($rowData['data'] as $dqlAlias => $data) { + $index = false; + + if (isset($this->_rsm->parentAliasMap[$dqlAlias])) { + // It's a joined result + + $parent = $this->_rsm->parentAliasMap[$dqlAlias]; + $path = $parent . '.' . $dqlAlias; + + // missing parent data, skipping as RIGHT JOIN hydration is not supported. + if ( ! isset($nonemptyComponents[$parent]) ) { + continue; + } + + // Get a reference to the right element in the result tree. + // This element will get the associated element attached. + if ($this->_rsm->isMixed && isset($this->_rootAliases[$parent])) { + $first = reset($this->_resultPointers); + // TODO: Exception if $key === null ? + $baseElement =& $this->_resultPointers[$parent][key($first)]; + } else if (isset($this->_resultPointers[$parent])) { + $baseElement =& $this->_resultPointers[$parent]; + } else { + unset($this->_resultPointers[$dqlAlias]); // Ticket #1228 + + continue; + } + + $relationAlias = $this->_rsm->relationMap[$dqlAlias]; + $parentClass = $this->_metadataCache[$this->_rsm->aliasMap[$parent]]; + $relation = $parentClass->associationMappings[$relationAlias]; + + // Check the type of the relation (many or single-valued) + if ( ! ($relation['type'] & ClassMetadata::TO_ONE)) { + $oneToOne = false; + + if ( ! isset($baseElement[$relationAlias])) { + $baseElement[$relationAlias] = array(); + } + + if (isset($nonemptyComponents[$dqlAlias])) { + $indexExists = isset($this->_identifierMap[$path][$id[$parent]][$id[$dqlAlias]]); + $index = $indexExists ? $this->_identifierMap[$path][$id[$parent]][$id[$dqlAlias]] : false; + $indexIsValid = $index !== false ? isset($baseElement[$relationAlias][$index]) : false; + + if ( ! $indexExists || ! $indexIsValid) { + $element = $data; + + if (isset($this->_rsm->indexByMap[$dqlAlias])) { + $baseElement[$relationAlias][$row[$this->_rsm->indexByMap[$dqlAlias]]] = $element; + } else { + $baseElement[$relationAlias][] = $element; + } + + end($baseElement[$relationAlias]); + + $this->_identifierMap[$path][$id[$parent]][$id[$dqlAlias]] = key($baseElement[$relationAlias]); + } + } + } else { + $oneToOne = true; + + if ( + ( ! isset($nonemptyComponents[$dqlAlias])) && + ( ! isset($baseElement[$relationAlias])) + ) { + $baseElement[$relationAlias] = null; + } else if ( ! isset($baseElement[$relationAlias])) { + $baseElement[$relationAlias] = $data; + } + } + + $coll =& $baseElement[$relationAlias]; + + if (is_array($coll)) { + $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne); + } + } else { + // It's a root result element + + $this->_rootAliases[$dqlAlias] = true; // Mark as root + $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0; + + // if this row has a NULL value for the root result id then make it a null result. + if ( ! isset($nonemptyComponents[$dqlAlias]) ) { + $result[] = $this->_rsm->isMixed + ? array($entityKey => null) + : null; + + $resultKey = $this->_resultCounter; + ++$this->_resultCounter; + + continue; + } + + // Check for an existing element + if ($this->_isSimpleQuery || ! isset($this->_identifierMap[$dqlAlias][$id[$dqlAlias]])) { + $element = $this->_rsm->isMixed + ? array($entityKey => $data) + : $data; + + if (isset($this->_rsm->indexByMap[$dqlAlias])) { + $resultKey = $row[$this->_rsm->indexByMap[$dqlAlias]]; + $result[$resultKey] = $element; + } else { + $resultKey = $this->_resultCounter; + $result[] = $element; + + ++$this->_resultCounter; + } + + $this->_identifierMap[$dqlAlias][$id[$dqlAlias]] = $resultKey; + } else { + $index = $this->_identifierMap[$dqlAlias][$id[$dqlAlias]]; + $resultKey = $index; + } + + $this->updateResultPointer($result, $index, $dqlAlias, false); + } + } + + if ( ! isset($resultKey)) { + $this->_resultCounter++; + } + + // Append scalar values to mixed result sets + if (isset($rowData['scalars'])) { + if ( ! isset($resultKey)) { + // this only ever happens when no object is fetched (scalar result only) + $resultKey = isset($this->_rsm->indexByMap['scalars']) + ? $row[$this->_rsm->indexByMap['scalars']] + : $this->_resultCounter - 1; + } + + foreach ($rowData['scalars'] as $name => $value) { + $result[$resultKey][$name] = $value; + } + } + + // Append new object to mixed result sets + if (isset($rowData['newObjects'])) { + if ( ! isset($resultKey)) { + $resultKey = $this->_resultCounter - 1; + } + + $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0); + + foreach ($rowData['newObjects'] as $objIndex => $newObject) { + $class = $newObject['class']; + $args = $newObject['args']; + $obj = $class->newInstanceArgs($args); + + if (count($args) == $scalarCount || ($scalarCount == 0 && count($rowData['newObjects']) == 1)) { + $result[$resultKey] = $obj; + + continue; + } + + $result[$resultKey][$objIndex] = $obj; + } + } + } + + /** + * Updates the result pointer for an Entity. The result pointers point to the + * last seen instance of each Entity type. This is used for graph construction. + * + * @param array $coll The element. + * @param boolean|integer $index Index of the element in the collection. + * @param string $dqlAlias + * @param boolean $oneToOne Whether it is a single-valued association or not. + * + * @return void + */ + private function updateResultPointer(array &$coll, $index, $dqlAlias, $oneToOne) + { + if ($coll === null) { + unset($this->_resultPointers[$dqlAlias]); // Ticket #1228 + + return; + } + + if ($oneToOne) { + $this->_resultPointers[$dqlAlias] =& $coll; + + return; + } + + if ($index !== false) { + $this->_resultPointers[$dqlAlias] =& $coll[$index]; + + return; + } + + if ( ! $coll) { + return; + } + + end($coll); + $this->_resultPointers[$dqlAlias] =& $coll[key($coll)]; + + return; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php new file mode 100644 index 0000000000000000000000000000000000000000..b35012c994bb5ba9d1f69184467f8803730a465f --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php @@ -0,0 +1,105 @@ +. + */ + +namespace Doctrine\ORM\Internal\Hydration; + +class HydrationException extends \Doctrine\ORM\ORMException +{ + /** + * @return HydrationException + */ + public static function nonUniqueResult() + { + return new self("The result returned by the query was not unique."); + } + + /** + * @param string $alias + * @param string $parentAlias + * + * @return HydrationException + */ + public static function parentObjectOfRelationNotFound($alias, $parentAlias) + { + return new self("The parent object of entity result with alias '$alias' was not found." + . " The parent alias is '$parentAlias'."); + } + + /** + * @param string $dqlAlias + * + * @return HydrationException + */ + public static function emptyDiscriminatorValue($dqlAlias) + { + return new self("The DQL alias '" . $dqlAlias . "' contains an entity ". + "of an inheritance hierarchy with an empty discriminator value. This means " . + "that the database contains inconsistent data with an empty " . + "discriminator value in a table row." + ); + } + + /** + * @since 2.3 + * + * @param string $entityName + * @param string $discrColumnName + * @param string $dqlAlias + * + * @return HydrationException + */ + public static function missingDiscriminatorColumn($entityName, $discrColumnName, $dqlAlias) + { + return new self(sprintf( + 'The discriminator column "%s" is missing for "%s" using the DQL alias "%s".', + $discrColumnName, $entityName, $dqlAlias + )); + } + + /** + * @since 2.3 + * + * @param string $entityName + * @param string $discrColumnName + * @param string $dqlAlias + * + * @return HydrationException + */ + public static function missingDiscriminatorMetaMappingColumn($entityName, $discrColumnName, $dqlAlias) + { + return new self(sprintf( + 'The meta mapping for the discriminator column "%s" is missing for "%s" using the DQL alias "%s".', + $discrColumnName, $entityName, $dqlAlias + )); + } + + /** + * @param string $discrValue + * @param array $discrMap + * + * @return HydrationException + */ + public static function invalidDiscriminatorValue($discrValue, $discrMap) + { + return new self(sprintf( + 'The discriminator value "%s" is invalid. It must be one of "%s".', + $discrValue, implode('", "', $discrMap) + )); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php new file mode 100644 index 0000000000000000000000000000000000000000..3bbf6724d1d85c918ce5d45d5ae8374b688a8cde --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php @@ -0,0 +1,109 @@ +. + */ + +namespace Doctrine\ORM\Internal\Hydration; + +/** + * Represents a result structure that can be iterated over, hydrating row-by-row + * during the iteration. An IterableResult is obtained by AbstractHydrator#iterate(). + * + * @author robo + * @since 2.0 + */ +class IterableResult implements \Iterator +{ + /** + * @var \Doctrine\ORM\Internal\Hydration\AbstractHydrator + */ + private $_hydrator; + + /** + * @var boolean + */ + private $_rewinded = false; + + /** + * @var integer + */ + private $_key = -1; + + /** + * @var object|null + */ + private $_current = null; + + /** + * @param \Doctrine\ORM\Internal\Hydration\AbstractHydrator $hydrator + */ + public function __construct($hydrator) + { + $this->_hydrator = $hydrator; + } + + /** + * @return void + * + * @throws HydrationException + */ + public function rewind() + { + if ($this->_rewinded == true) { + throw new HydrationException("Can only iterate a Result once."); + } else { + $this->_current = $this->next(); + $this->_rewinded = true; + } + } + + /** + * Gets the next set of results. + * + * @return array + */ + public function next() + { + $this->_current = $this->_hydrator->hydrateRow(); + $this->_key++; + return $this->_current; + } + + /** + * @return mixed + */ + public function current() + { + return $this->_current; + } + + /** + * @return int + */ + public function key() + { + return $this->_key; + } + + /** + * @return bool + */ + public function valid() + { + return ($this->_current!=false); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php new file mode 100644 index 0000000000000000000000000000000000000000..f9039e7abee63d1873b16cc0068347c36206be4c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php @@ -0,0 +1,598 @@ +. + */ + +namespace Doctrine\ORM\Internal\Hydration; + +use Doctrine\ORM\UnitOfWork; +use PDO; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\PersistentCollection; +use Doctrine\ORM\Query; +use Doctrine\ORM\Events; +use Doctrine\ORM\Event\LifecycleEventArgs; +use Doctrine\ORM\Event\PostLoadEventDispatcher; +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\ORM\Proxy\Proxy; + +/** + * The ObjectHydrator constructs an object graph out of an SQL result set. + * + * Internal note: Highly performance-sensitive code. + * + * @since 2.0 + * @author Roman Borschel + * @author Guilherme Blanco + * @author Fabio B. Silva + */ +class ObjectHydrator extends AbstractHydrator +{ + /** + * @var array + */ + private $identifierMap = array(); + + /** + * @var array + */ + private $resultPointers = array(); + + /** + * @var array + */ + private $idTemplate = array(); + + /** + * @var integer + */ + private $resultCounter = 0; + + /** + * @var array + */ + private $rootAliases = array(); + + /** + * @var array + */ + private $initializedCollections = array(); + + /** + * @var array + */ + private $existingCollections = array(); + + /** + * {@inheritdoc} + */ + protected function prepare() + { + if ( ! isset($this->_hints[UnitOfWork::HINT_DEFEREAGERLOAD])) { + $this->_hints[UnitOfWork::HINT_DEFEREAGERLOAD] = true; + } + + foreach ($this->_rsm->aliasMap as $dqlAlias => $className) { + $this->identifierMap[$dqlAlias] = array(); + $this->idTemplate[$dqlAlias] = ''; + + // Remember which associations are "fetch joined", so that we know where to inject + // collection stubs or proxies and where not. + if ( ! isset($this->_rsm->relationMap[$dqlAlias])) { + continue; + } + + $parent = $this->_rsm->parentAliasMap[$dqlAlias]; + + if ( ! isset($this->_rsm->aliasMap[$parent])) { + throw HydrationException::parentObjectOfRelationNotFound($dqlAlias, $parent); + } + + $sourceClassName = $this->_rsm->aliasMap[$parent]; + $sourceClass = $this->getClassMetadata($sourceClassName); + $assoc = $sourceClass->associationMappings[$this->_rsm->relationMap[$dqlAlias]]; + + $this->_hints['fetched'][$parent][$assoc['fieldName']] = true; + + if ($assoc['type'] === ClassMetadata::MANY_TO_MANY) { + continue; + } + + // Mark any non-collection opposite sides as fetched, too. + if ($assoc['mappedBy']) { + $this->_hints['fetched'][$dqlAlias][$assoc['mappedBy']] = true; + + continue; + } + + // handle fetch-joined owning side bi-directional one-to-one associations + if ($assoc['inversedBy']) { + $class = $this->getClassMetadata($className); + $inverseAssoc = $class->associationMappings[$assoc['inversedBy']]; + + if ( ! ($inverseAssoc['type'] & ClassMetadata::TO_ONE)) { + continue; + } + + $this->_hints['fetched'][$dqlAlias][$inverseAssoc['fieldName']] = true; + } + } + } + + /** + * {@inheritdoc} + */ + protected function cleanup() + { + $eagerLoad = (isset($this->_hints[UnitOfWork::HINT_DEFEREAGERLOAD])) && $this->_hints[UnitOfWork::HINT_DEFEREAGERLOAD] == true; + + parent::cleanup(); + + $this->identifierMap = + $this->initializedCollections = + $this->existingCollections = + $this->resultPointers = array(); + + if ($eagerLoad) { + $this->_uow->triggerEagerLoads(); + } + + $this->_uow->hydrationComplete(); + } + + /** + * {@inheritdoc} + */ + protected function hydrateAllData() + { + $result = array(); + + while ($row = $this->_stmt->fetch(PDO::FETCH_ASSOC)) { + $this->hydrateRowData($row, $result); + } + + // Take snapshots from all newly initialized collections + foreach ($this->initializedCollections as $coll) { + $coll->takeSnapshot(); + } + + return $result; + } + + /** + * Initializes a related collection. + * + * @param object $entity The entity to which the collection belongs. + * @param ClassMetadata $class + * @param string $fieldName The name of the field on the entity that holds the collection. + * @param string $parentDqlAlias Alias of the parent fetch joining this collection. + * + * @return \Doctrine\ORM\PersistentCollection + */ + private function initRelatedCollection($entity, $class, $fieldName, $parentDqlAlias) + { + $oid = spl_object_hash($entity); + $relation = $class->associationMappings[$fieldName]; + $value = $class->reflFields[$fieldName]->getValue($entity); + + if ($value === null || is_array($value)) { + $value = new ArrayCollection((array) $value); + } + + if ( ! $value instanceof PersistentCollection) { + $value = new PersistentCollection( + $this->_em, $this->_metadataCache[$relation['targetEntity']], $value + ); + $value->setOwner($entity, $relation); + + $class->reflFields[$fieldName]->setValue($entity, $value); + $this->_uow->setOriginalEntityProperty($oid, $fieldName, $value); + + $this->initializedCollections[$oid . $fieldName] = $value; + } else if ( + isset($this->_hints[Query::HINT_REFRESH]) || + isset($this->_hints['fetched'][$parentDqlAlias][$fieldName]) && + ! $value->isInitialized() + ) { + // Is already PersistentCollection, but either REFRESH or FETCH-JOIN and UNINITIALIZED! + $value->setDirty(false); + $value->setInitialized(true); + $value->unwrap()->clear(); + + $this->initializedCollections[$oid . $fieldName] = $value; + } else { + // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN! + $this->existingCollections[$oid . $fieldName] = $value; + } + + return $value; + } + + /** + * Gets an entity instance. + * + * @param array $data The instance data. + * @param string $dqlAlias The DQL alias of the entity's class. + * + * @return object The entity. + * + * @throws HydrationException + */ + private function getEntity(array $data, $dqlAlias) + { + $className = $this->_rsm->aliasMap[$dqlAlias]; + + if (isset($this->_rsm->discriminatorColumns[$dqlAlias])) { + $fieldName = $this->_rsm->discriminatorColumns[$dqlAlias]; + + if ( ! isset($this->_rsm->metaMappings[$fieldName])) { + throw HydrationException::missingDiscriminatorMetaMappingColumn($className, $fieldName, $dqlAlias); + } + + $discrColumn = $this->_rsm->metaMappings[$fieldName]; + + if ( ! isset($data[$discrColumn])) { + throw HydrationException::missingDiscriminatorColumn($className, $discrColumn, $dqlAlias); + } + + if ($data[$discrColumn] === "") { + throw HydrationException::emptyDiscriminatorValue($dqlAlias); + } + + $discrMap = $this->_metadataCache[$className]->discriminatorMap; + + if ( ! isset($discrMap[$data[$discrColumn]])) { + throw HydrationException::invalidDiscriminatorValue($data[$discrColumn], array_keys($discrMap)); + } + + $className = $discrMap[$data[$discrColumn]]; + + unset($data[$discrColumn]); + } + + if (isset($this->_hints[Query::HINT_REFRESH_ENTITY]) && isset($this->rootAliases[$dqlAlias])) { + $this->registerManaged($this->_metadataCache[$className], $this->_hints[Query::HINT_REFRESH_ENTITY], $data); + } + + $this->_hints['fetchAlias'] = $dqlAlias; + + return $this->_uow->createEntity($className, $data, $this->_hints); + } + + /** + * @param string $className + * @param array $data + * + * @return mixed + */ + private function getEntityFromIdentityMap($className, array $data) + { + // TODO: Abstract this code and UnitOfWork::createEntity() equivalent? + $class = $this->_metadataCache[$className]; + + /* @var $class ClassMetadata */ + if ($class->isIdentifierComposite) { + $idHash = ''; + + foreach ($class->identifier as $fieldName) { + $idHash .= ' ' . (isset($class->associationMappings[$fieldName]) + ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']] + : $data[$fieldName]); + } + + return $this->_uow->tryGetByIdHash(ltrim($idHash), $class->rootEntityName); + } else if (isset($class->associationMappings[$class->identifier[0]])) { + return $this->_uow->tryGetByIdHash($data[$class->associationMappings[$class->identifier[0]]['joinColumns'][0]['name']], $class->rootEntityName); + } + + return $this->_uow->tryGetByIdHash($data[$class->identifier[0]], $class->rootEntityName); + } + + /** + * Hydrates a single row in an SQL result set. + * + * @internal + * First, the data of the row is split into chunks where each chunk contains data + * that belongs to a particular component/class. Afterwards, all these chunks + * are processed, one after the other. For each chunk of class data only one of the + * following code paths is executed: + * + * Path A: The data chunk belongs to a joined/associated object and the association + * is collection-valued. + * Path B: The data chunk belongs to a joined/associated object and the association + * is single-valued. + * Path C: The data chunk belongs to a root result element/object that appears in the topmost + * level of the hydrated result. A typical example are the objects of the type + * specified by the FROM clause in a DQL query. + * + * @param array $row The data of the row to process. + * @param array $result The result array to fill. + * + * @return void + */ + protected function hydrateRowData(array $row, array &$result) + { + // Initialize + $id = $this->idTemplate; // initialize the id-memory + $nonemptyComponents = array(); + // Split the row data into chunks of class data. + $rowData = $this->gatherRowData($row, $id, $nonemptyComponents); + + // reset result pointers for each data row + $this->resultPointers = []; + + // Hydrate the data chunks + foreach ($rowData['data'] as $dqlAlias => $data) { + $entityName = $this->_rsm->aliasMap[$dqlAlias]; + + if (isset($this->_rsm->parentAliasMap[$dqlAlias])) { + // It's a joined result + + $parentAlias = $this->_rsm->parentAliasMap[$dqlAlias]; + // we need the $path to save into the identifier map which entities were already + // seen for this parent-child relationship + $path = $parentAlias . '.' . $dqlAlias; + + // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs + if ( ! isset($nonemptyComponents[$parentAlias])) { + // TODO: Add special case code where we hydrate the right join objects into identity map at least + continue; + } + + $parentClass = $this->_metadataCache[$this->_rsm->aliasMap[$parentAlias]]; + $relationField = $this->_rsm->relationMap[$dqlAlias]; + $relation = $parentClass->associationMappings[$relationField]; + $reflField = $parentClass->reflFields[$relationField]; + + // Get a reference to the parent object to which the joined element belongs. + if ($this->_rsm->isMixed && isset($this->rootAliases[$parentAlias])) { + $first = reset($this->resultPointers); + $parentObject = $first[key($first)]; + } else if (isset($this->resultPointers[$parentAlias])) { + $parentObject = $this->resultPointers[$parentAlias]; + } else { + // Parent object of relation not found, mark as not-fetched again + $element = $this->getEntity($data, $dqlAlias); + + // Update result pointer and provide initial fetch data for parent + $this->resultPointers[$dqlAlias] = $element; + $rowData['data'][$parentAlias][$relationField] = $element; + + // Mark as not-fetched again + unset($this->_hints['fetched'][$parentAlias][$relationField]); + continue; + } + + $oid = spl_object_hash($parentObject); + + // Check the type of the relation (many or single-valued) + if ( ! ($relation['type'] & ClassMetadata::TO_ONE)) { + // PATH A: Collection-valued association + $reflFieldValue = $reflField->getValue($parentObject); + + if (isset($nonemptyComponents[$dqlAlias])) { + $collKey = $oid . $relationField; + if (isset($this->initializedCollections[$collKey])) { + $reflFieldValue = $this->initializedCollections[$collKey]; + } else if ( ! isset($this->existingCollections[$collKey])) { + $reflFieldValue = $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias); + } + + $indexExists = isset($this->identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]]); + $index = $indexExists ? $this->identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]] : false; + $indexIsValid = $index !== false ? isset($reflFieldValue[$index]) : false; + + if ( ! $indexExists || ! $indexIsValid) { + if (isset($this->existingCollections[$collKey])) { + // Collection exists, only look for the element in the identity map. + if ($element = $this->getEntityFromIdentityMap($entityName, $data)) { + $this->resultPointers[$dqlAlias] = $element; + } else { + unset($this->resultPointers[$dqlAlias]); + } + } else { + $element = $this->getEntity($data, $dqlAlias); + + if (isset($this->_rsm->indexByMap[$dqlAlias])) { + $indexValue = $row[$this->_rsm->indexByMap[$dqlAlias]]; + $reflFieldValue->hydrateSet($indexValue, $element); + $this->identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]] = $indexValue; + } else { + $reflFieldValue->hydrateAdd($element); + $reflFieldValue->last(); + $this->identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]] = $reflFieldValue->key(); + } + // Update result pointer + $this->resultPointers[$dqlAlias] = $element; + } + } else { + // Update result pointer + $this->resultPointers[$dqlAlias] = $reflFieldValue[$index]; + } + } else if ( ! $reflFieldValue) { + $reflFieldValue = $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias); + } else if ($reflFieldValue instanceof PersistentCollection && $reflFieldValue->isInitialized() === false) { + $reflFieldValue->setInitialized(true); + } + + } else { + // PATH B: Single-valued association + $reflFieldValue = $reflField->getValue($parentObject); + + if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof Proxy && !$reflFieldValue->__isInitialized__)) { + // we only need to take action if this value is null, + // we refresh the entity or its an unitialized proxy. + if (isset($nonemptyComponents[$dqlAlias])) { + $element = $this->getEntity($data, $dqlAlias); + $reflField->setValue($parentObject, $element); + $this->_uow->setOriginalEntityProperty($oid, $relationField, $element); + $targetClass = $this->_metadataCache[$relation['targetEntity']]; + + if ($relation['isOwningSide']) { + // TODO: Just check hints['fetched'] here? + // If there is an inverse mapping on the target class its bidirectional + if ($relation['inversedBy']) { + $inverseAssoc = $targetClass->associationMappings[$relation['inversedBy']]; + if ($inverseAssoc['type'] & ClassMetadata::TO_ONE) { + $targetClass->reflFields[$inverseAssoc['fieldName']]->setValue($element, $parentObject); + $this->_uow->setOriginalEntityProperty(spl_object_hash($element), $inverseAssoc['fieldName'], $parentObject); + } + } else if ($parentClass === $targetClass && $relation['mappedBy']) { + // Special case: bi-directional self-referencing one-one on the same class + $targetClass->reflFields[$relationField]->setValue($element, $parentObject); + } + } else { + // For sure bidirectional, as there is no inverse side in unidirectional mappings + $targetClass->reflFields[$relation['mappedBy']]->setValue($element, $parentObject); + $this->_uow->setOriginalEntityProperty(spl_object_hash($element), $relation['mappedBy'], $parentObject); + } + // Update result pointer + $this->resultPointers[$dqlAlias] = $element; + } else { + $this->_uow->setOriginalEntityProperty($oid, $relationField, null); + $reflField->setValue($parentObject, null); + } + // else leave $reflFieldValue null for single-valued associations + } else { + // Update result pointer + $this->resultPointers[$dqlAlias] = $reflFieldValue; + } + } + } else { + // PATH C: Its a root result element + $this->rootAliases[$dqlAlias] = true; // Mark as root alias + $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0; + + // if this row has a NULL value for the root result id then make it a null result. + if ( ! isset($nonemptyComponents[$dqlAlias]) ) { + if ($this->_rsm->isMixed) { + $result[] = array($entityKey => null); + } else { + $result[] = null; + } + $resultKey = $this->resultCounter; + ++$this->resultCounter; + continue; + } + + // check for existing result from the iterations before + if ( ! isset($this->identifierMap[$dqlAlias][$id[$dqlAlias]])) { + $element = $this->getEntity($data, $dqlAlias); + + if ($this->_rsm->isMixed) { + $element = array($entityKey => $element); + } + + if (isset($this->_rsm->indexByMap[$dqlAlias])) { + $resultKey = $row[$this->_rsm->indexByMap[$dqlAlias]]; + + if (isset($this->_hints['collection'])) { + $this->_hints['collection']->hydrateSet($resultKey, $element); + } + + $result[$resultKey] = $element; + } else { + $resultKey = $this->resultCounter; + ++$this->resultCounter; + + if (isset($this->_hints['collection'])) { + $this->_hints['collection']->hydrateAdd($element); + } + + $result[] = $element; + } + + $this->identifierMap[$dqlAlias][$id[$dqlAlias]] = $resultKey; + + // Update result pointer + $this->resultPointers[$dqlAlias] = $element; + + } else { + // Update result pointer + $index = $this->identifierMap[$dqlAlias][$id[$dqlAlias]]; + $this->resultPointers[$dqlAlias] = $result[$index]; + $resultKey = $index; + } + } + + if (isset($this->_hints[Query::HINT_INTERNAL_ITERATION]) && $this->_hints[Query::HINT_INTERNAL_ITERATION]) { + $this->_uow->hydrationComplete(); + } + } + + if ( ! isset($resultKey) ) { + $this->resultCounter++; + } + + // Append scalar values to mixed result sets + if (isset($rowData['scalars'])) { + if ( ! isset($resultKey) ) { + $resultKey = (isset($this->_rsm->indexByMap['scalars'])) + ? $row[$this->_rsm->indexByMap['scalars']] + : $this->resultCounter - 1; + } + + foreach ($rowData['scalars'] as $name => $value) { + $result[$resultKey][$name] = $value; + } + } + + // Append new object to mixed result sets + if (isset($rowData['newObjects'])) { + if ( ! isset($resultKey) ) { + $resultKey = $this->resultCounter - 1; + } + + + $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0); + + foreach ($rowData['newObjects'] as $objIndex => $newObject) { + $class = $newObject['class']; + $args = $newObject['args']; + $obj = $class->newInstanceArgs($args); + + if ($scalarCount == 0 && count($rowData['newObjects']) == 1 ) { + $result[$resultKey] = $obj; + + continue; + } + + $result[$resultKey][$objIndex] = $obj; + } + } + } + + /** + * When executed in a hydrate() loop we may have to clear internal state to + * decrease memory consumption. + * + * @param mixed $eventArgs + * + * @return void + */ + public function onClear($eventArgs) + { + parent::onClear($eventArgs); + + $aliases = array_keys($this->identifierMap); + $this->identifierMap = array(); + + foreach ($aliases as $alias) { + $this->identifierMap[$alias] = array(); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php new file mode 100644 index 0000000000000000000000000000000000000000..024ee3b669267be935097cd6cb53f7026a1e8a0d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\ORM\Internal\Hydration; + +/** + * Hydrator that produces flat, rectangular results of scalar data. + * The created result is almost the same as a regular SQL result set, except + * that column names are mapped to field names and data type conversions take place. + * + * @since 2.0 + * @author Roman Borschel + * @author Guilherme Blanco + */ +class ScalarHydrator extends AbstractHydrator +{ + /** + * {@inheritdoc} + */ + protected function hydrateAllData() + { + $result = array(); + + while ($data = $this->_stmt->fetch(\PDO::FETCH_ASSOC)) { + $this->hydrateRowData($data, $result); + } + + return $result; + } + + /** + * {@inheritdoc} + */ + protected function hydrateRowData(array $data, array &$result) + { + $result[] = $this->gatherScalarRowData($data); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php new file mode 100644 index 0000000000000000000000000000000000000000..5fb77d67e67454d1fc930accdd4fcfd21617309f --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php @@ -0,0 +1,155 @@ +. + */ + +namespace Doctrine\ORM\Internal\Hydration; + +use PDO; +use Doctrine\DBAL\Types\Type; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Query; + +class SimpleObjectHydrator extends AbstractHydrator +{ + /** + * @var ClassMetadata + */ + private $class; + + /** + * {@inheritdoc} + */ + protected function prepare() + { + if (count($this->_rsm->aliasMap) !== 1) { + throw new \RuntimeException("Cannot use SimpleObjectHydrator with a ResultSetMapping that contains more than one object result."); + } + + if ($this->_rsm->scalarMappings) { + throw new \RuntimeException("Cannot use SimpleObjectHydrator with a ResultSetMapping that contains scalar mappings."); + } + + $this->class = $this->getClassMetadata(reset($this->_rsm->aliasMap)); + } + + /** + * {@inheritdoc} + */ + protected function cleanup() + { + parent::cleanup(); + + $this->_uow->triggerEagerLoads(); + $this->_uow->hydrationComplete(); + } + + /** + * {@inheritdoc} + */ + protected function hydrateAllData() + { + $result = array(); + + while ($row = $this->_stmt->fetch(PDO::FETCH_ASSOC)) { + $this->hydrateRowData($row, $result); + } + + $this->_em->getUnitOfWork()->triggerEagerLoads(); + + return $result; + } + + /** + * {@inheritdoc} + */ + protected function hydrateRowData(array $sqlResult, array &$result) + { + $entityName = $this->class->name; + $data = array(); + + // We need to find the correct entity class name if we have inheritance in resultset + if ($this->class->inheritanceType !== ClassMetadata::INHERITANCE_TYPE_NONE) { + $discrColumnName = $this->_platform->getSQLResultCasing($this->class->discriminatorColumn['name']); + + // Find mapped discriminator column from the result set. + if ($metaMappingDiscrColumnName = array_search($discrColumnName, $this->_rsm->metaMappings)) { + $discrColumnName = $metaMappingDiscrColumnName; + } + + if ( ! isset($sqlResult[$discrColumnName])) { + throw HydrationException::missingDiscriminatorColumn($entityName, $discrColumnName, key($this->_rsm->aliasMap)); + } + + if ($sqlResult[$discrColumnName] === '') { + throw HydrationException::emptyDiscriminatorValue(key($this->_rsm->aliasMap)); + } + + $discrMap = $this->class->discriminatorMap; + + if ( ! isset($discrMap[$sqlResult[$discrColumnName]])) { + throw HydrationException::invalidDiscriminatorValue($sqlResult[$discrColumnName], array_keys($discrMap)); + } + + $entityName = $discrMap[$sqlResult[$discrColumnName]]; + + unset($sqlResult[$discrColumnName]); + } + + foreach ($sqlResult as $column => $value) { + // An ObjectHydrator should be used instead of SimpleObjectHydrator + if (isset($this->_rsm->relationMap[$column])) { + throw new \Exception(sprintf('Unable to retrieve association information for column "%s"', $column)); + } + + $cacheKeyInfo = $this->hydrateColumnInfo($column); + + if ( ! $cacheKeyInfo) { + continue; + } + + // Check if value is null before conversion (because some types convert null to something else) + $valueIsNull = null === $value; + + // Convert field to a valid PHP value + if (isset($cacheKeyInfo['type'])) { + $type = $cacheKeyInfo['type']; + $value = $type->convertToPHPValue($value, $this->_platform); + } + + $fieldName = $cacheKeyInfo['fieldName']; + + // Prevent overwrite in case of inherit classes using same property name (See AbstractHydrator) + if ( ! isset($data[$fieldName]) || ! $valueIsNull) { + $data[$fieldName] = $value; + } + } + + if (isset($this->_hints[Query::HINT_REFRESH_ENTITY])) { + $this->registerManaged($this->class, $this->_hints[Query::HINT_REFRESH_ENTITY], $data); + } + + $uow = $this->_em->getUnitOfWork(); + $entity = $uow->createEntity($entityName, $data, $this->_hints); + + $result[] = $entity; + + if (isset($this->_hints[Query::HINT_INTERNAL_ITERATION]) && $this->_hints[Query::HINT_INTERNAL_ITERATION]) { + $this->_uow->hydrationComplete(); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php new file mode 100644 index 0000000000000000000000000000000000000000..b9caeb11b8345bedbbe8be5bfe1c6fe1e782a3a4 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php @@ -0,0 +1,58 @@ +. + */ + +namespace Doctrine\ORM\Internal\Hydration; + +use Doctrine\ORM\NoResultException; +use Doctrine\ORM\NonUniqueResultException; + +/** + * Hydrator that hydrates a single scalar value from the result set. + * + * @since 2.0 + * @author Roman Borschel + * @author Guilherme Blanco + */ +class SingleScalarHydrator extends AbstractHydrator +{ + /** + * {@inheritdoc} + */ + protected function hydrateAllData() + { + $data = $this->_stmt->fetchAll(\PDO::FETCH_ASSOC); + $numRows = count($data); + + if ($numRows === 0) { + throw new NoResultException(); + } + + if ($numRows > 1) { + throw new NonUniqueResultException('The query returned multiple rows. Change the query or use a different result function like getScalarResult().'); + } + + if (count($data[key($data)]) > 1) { + throw new NonUniqueResultException('The query returned a row containing multiple columns. Change the query or use a different result function like getScalarResult().'); + } + + $result = $this->gatherScalarRowData($data[key($data)]); + + return array_shift($result); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/HydrationCompleteHandler.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/HydrationCompleteHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..4da71cefaf273fbb8dac1c5c708932aa7d360f9c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/HydrationCompleteHandler.php @@ -0,0 +1,103 @@ +. + */ + +namespace Doctrine\ORM\Internal; + +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Event\LifecycleEventArgs; +use Doctrine\ORM\Event\ListenersInvoker; +use Doctrine\ORM\Events; +use Doctrine\ORM\Mapping\ClassMetadata; + +/** + * Class, which can handle completion of hydration cycle and produce some of tasks. + * In current implementation triggers deferred postLoad event. + * + * @author Artur Eshenbrener + * @since 2.5 + */ +final class HydrationCompleteHandler +{ + /** + * @var ListenersInvoker + */ + private $listenersInvoker; + + /** + * @var EntityManagerInterface + */ + private $em; + + /** + * @var array[] + */ + private $deferredPostLoadInvocations = array(); + + /** + * Constructor for this object + * + * @param ListenersInvoker $listenersInvoker + * @param EntityManagerInterface $em + */ + public function __construct(ListenersInvoker $listenersInvoker, EntityManagerInterface $em) + { + $this->listenersInvoker = $listenersInvoker; + $this->em = $em; + } + + /** + * Method schedules invoking of postLoad entity to the very end of current hydration cycle. + * + * @param ClassMetadata $class + * @param object $entity + */ + public function deferPostLoadInvoking(ClassMetadata $class, $entity) + { + $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::postLoad); + + if ($invoke === ListenersInvoker::INVOKE_NONE) { + return; + } + + $this->deferredPostLoadInvocations[] = array($class, $invoke, $entity); + } + + /** + * This method should me called after any hydration cycle completed. + * + * Method fires all deferred invocations of postLoad events + */ + public function hydrationComplete() + { + $toInvoke = $this->deferredPostLoadInvocations; + $this->deferredPostLoadInvocations = array(); + + foreach ($toInvoke as $classAndEntity) { + list($class, $invoke, $entity) = $classAndEntity; + + $this->listenersInvoker->invoke( + $class, + Events::postLoad, + $entity, + new LifecycleEventArgs($entity, $this->em), + $invoke + ); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/LazyCriteriaCollection.php b/vendor/doctrine/orm/lib/Doctrine/ORM/LazyCriteriaCollection.php new file mode 100644 index 0000000000000000000000000000000000000000..28e2709ac350601956943d3bc259d6db54b00705 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/LazyCriteriaCollection.php @@ -0,0 +1,118 @@ +. + */ + +namespace Doctrine\ORM; + +use Doctrine\Common\Collections\AbstractLazyCollection; +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Collections\Criteria; +use Doctrine\Common\Collections\Selectable; +use Doctrine\ORM\Persisters\Entity\BasicEntityPersister; +use Doctrine\ORM\Persisters\Entity\EntityPersister; + +/** + * A lazy collection that allow a fast count when using criteria object + * Once count gets executed once without collection being initialized, result + * is cached and returned on subsequent calls until collection gets loaded, + * then returning the number of loaded results. + * + * @since 2.5 + * @author Guilherme Blanco + * @author Michaël Gallego + */ +class LazyCriteriaCollection extends AbstractLazyCollection implements Selectable +{ + /** + * @var BasicEntityPersister + */ + protected $entityPersister; + + /** + * @var Criteria + */ + protected $criteria; + + /** + * @var integer|null + */ + private $count; + + /** + * @param EntityPersister $entityPersister + * @param Criteria $criteria + */ + public function __construct(EntityPersister $entityPersister, Criteria $criteria) + { + $this->entityPersister = $entityPersister; + $this->criteria = $criteria; + } + + /** + * Do an efficient count on the collection + * + * @return integer + */ + public function count() + { + if ($this->isInitialized()) { + return $this->collection->count(); + } + + // Return cached result in case count query was already executed + if ($this->count !== null) { + return $this->count; + } + + return $this->count = $this->entityPersister->count($this->criteria); + } + + /** + * Do an optimized search of an element + * + * @param object $element + * @return bool + */ + public function contains($element) + { + if ($this->isInitialized()) { + return $this->collection->contains($element); + } + + return $this->entityPersister->exists($element, $this->criteria); + } + + /** + * {@inheritDoc} + */ + public function matching(Criteria $criteria) + { + $this->initialize(); + + return $this->collection->matching($criteria); + } + + /** + * {@inheritDoc} + */ + protected function doInitialize() + { + $elements = $this->entityPersister->loadCriteria($this->criteria); + $this->collection = new ArrayCollection($elements); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Annotation.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Annotation.php new file mode 100644 index 0000000000000000000000000000000000000000..19374ff31469bda96a40561cae448567513bcbd8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Annotation.php @@ -0,0 +1,24 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +interface Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AnsiQuoteStrategy.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AnsiQuoteStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..d18c8be7c72e5dd09b1c84e4cbf3bfc8e7bb8c94 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AnsiQuoteStrategy.php @@ -0,0 +1,96 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * ANSI compliant quote strategy, this strategy does not apply any quote. + * To use this strategy all mapped tables and columns should be ANSI compliant. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class AnsiQuoteStrategy implements QuoteStrategy +{ + /** + * {@inheritdoc} + */ + public function getColumnName($fieldName, ClassMetadata $class, AbstractPlatform $platform) + { + return $class->fieldMappings[$fieldName]['columnName']; + } + + /** + * {@inheritdoc} + */ + public function getTableName(ClassMetadata $class, AbstractPlatform $platform) + { + return $class->table['name']; + } + + /** + * {@inheritdoc} + */ + public function getSequenceName(array $definition, ClassMetadata $class, AbstractPlatform $platform) + { + return $definition['sequenceName']; + } + + /** + * {@inheritdoc} + */ + public function getJoinColumnName(array $joinColumn, ClassMetadata $class, AbstractPlatform $platform) + { + return $joinColumn['name']; + } + + /** + * {@inheritdoc} + */ + public function getReferencedJoinColumnName(array $joinColumn, ClassMetadata $class, AbstractPlatform $platform) + { + return $joinColumn['referencedColumnName']; + } + + /** + * {@inheritdoc} + */ + public function getJoinTableName(array $association, ClassMetadata $class, AbstractPlatform $platform) + { + return $association['joinTable']['name']; + } + + /** + * {@inheritdoc} + */ + public function getIdentifierColumnNames(ClassMetadata $class, AbstractPlatform $platform) + { + return $class->identifier; + } + + /** + * {@inheritdoc} + */ + public function getColumnAlias($columnName, $counter, AbstractPlatform $platform, ClassMetadata $class = null) + { + return $platform->getSQLResultCasing($columnName . '_' . $counter); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AssociationOverride.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AssociationOverride.php new file mode 100644 index 0000000000000000000000000000000000000000..1a9a31f1842717797a1f30d67156c333e87b172b --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AssociationOverride.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * This annotation is used to override association mapping of property for an entity relationship. + * + * @author Fabio B. Silva + * @since 2.3 + * + * @Annotation + * @Target("ANNOTATION") + */ +final class AssociationOverride implements Annotation +{ + /** + * The name of the relationship property whose mapping is being overridden. + * + * @var string + */ + public $name; + + /** + * The join column that is being mapped to the persistent attribute. + * + * @var array<\Doctrine\ORM\Mapping\JoinColumn> + */ + public $joinColumns; + + /** + * The join table that maps the relationship. + * + * @var \Doctrine\ORM\Mapping\JoinTable + */ + public $joinTable; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AssociationOverrides.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AssociationOverrides.php new file mode 100644 index 0000000000000000000000000000000000000000..217c9e457356c1d58f5c581f8f57eee177d1a6af --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AssociationOverrides.php @@ -0,0 +1,39 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * This annotation is used to override association mappings of relationship properties. + * + * @author Fabio B. Silva + * @since 2.3 + * + * @Annotation + * @Target("CLASS") + */ +final class AssociationOverrides implements Annotation +{ + /** + * Mapping overrides of relationship properties. + * + * @var array<\Doctrine\ORM\Mapping\AssociationOverride> + */ + public $value; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AttributeOverride.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AttributeOverride.php new file mode 100644 index 0000000000000000000000000000000000000000..f86d3a1521d77965771cd74c4bb2344b692b8e23 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AttributeOverride.php @@ -0,0 +1,46 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * This annotation is used to override the mapping of a entity property. + * + * @author Fabio B. Silva + * @since 2.3 + * + * @Annotation + * @Target("ANNOTATION") + */ +final class AttributeOverride implements Annotation +{ + /** + * The name of the property whose mapping is being overridden. + * + * @var string + */ + public $name; + + /** + * The column definition. + * + * @var \Doctrine\ORM\Mapping\Column + */ + public $column; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AttributeOverrides.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AttributeOverrides.php new file mode 100644 index 0000000000000000000000000000000000000000..63b2cc66e7fbd00f568fa7ebfec0657bcaadb4c7 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/AttributeOverrides.php @@ -0,0 +1,39 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * This annotation is used to override the mapping of a entity property. + * + * @author Fabio B. Silva + * @since 2.3 + * + * @Annotation + * @Target("CLASS") + */ +final class AttributeOverrides implements Annotation +{ + /** + * One or more field or property mapping overrides. + * + * @var array<\Doctrine\ORM\Mapping\AttributeOverride> + */ + public $value; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..5bc75e31ef61bc928cddc4924fcb6dfffb8ce7bb --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php @@ -0,0 +1,231 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Builder; + +use Doctrine\ORM\Mapping\ClassMetadata; + +class AssociationBuilder +{ + /** + * @var ClassMetadataBuilder + */ + protected $builder; + + /** + * @var array + */ + protected $mapping; + + /** + * @var array|null + */ + protected $joinColumns; + + /** + * @var int + */ + protected $type; + + /** + * @param ClassMetadataBuilder $builder + * @param array $mapping + * @param int $type + */ + public function __construct(ClassMetadataBuilder $builder, array $mapping, $type) + { + $this->builder = $builder; + $this->mapping = $mapping; + $this->type = $type; + } + + /** + * @param string $fieldName + * + * @return AssociationBuilder + */ + public function mappedBy($fieldName) + { + $this->mapping['mappedBy'] = $fieldName; + return $this; + } + + /** + * @param string $fieldName + * + * @return AssociationBuilder + */ + public function inversedBy($fieldName) + { + $this->mapping['inversedBy'] = $fieldName; + return $this; + } + + /** + * @return AssociationBuilder + */ + public function cascadeAll() + { + $this->mapping['cascade'] = array("ALL"); + return $this; + } + + /** + * @return AssociationBuilder + */ + public function cascadePersist() + { + $this->mapping['cascade'][] = "persist"; + return $this; + } + + /** + * @return AssociationBuilder + */ + public function cascadeRemove() + { + $this->mapping['cascade'][] = "remove"; + return $this; + } + + /** + * @return AssociationBuilder + */ + public function cascadeMerge() + { + $this->mapping['cascade'][] = "merge"; + return $this; + } + + /** + * @return AssociationBuilder + */ + public function cascadeDetach() + { + $this->mapping['cascade'][] = "detach"; + return $this; + } + + /** + * @return AssociationBuilder + */ + public function cascadeRefresh() + { + $this->mapping['cascade'][] = "refresh"; + return $this; + } + + /** + * @return AssociationBuilder + */ + public function fetchExtraLazy() + { + $this->mapping['fetch'] = ClassMetadata::FETCH_EXTRA_LAZY; + return $this; + } + + /** + * @return AssociationBuilder + */ + public function fetchEager() + { + $this->mapping['fetch'] = ClassMetadata::FETCH_EAGER; + return $this; + } + + /** + * @return AssociationBuilder + */ + public function fetchLazy() + { + $this->mapping['fetch'] = ClassMetadata::FETCH_LAZY; + return $this; + } + + /** + * Add Join Columns. + * + * @param string $columnName + * @param string $referencedColumnName + * @param bool $nullable + * @param bool $unique + * @param string|null $onDelete + * @param string|null $columnDef + * + * @return AssociationBuilder + */ + public function addJoinColumn($columnName, $referencedColumnName, $nullable = true, $unique = false, $onDelete = null, $columnDef = null) + { + $this->joinColumns[] = array( + 'name' => $columnName, + 'referencedColumnName' => $referencedColumnName, + 'nullable' => $nullable, + 'unique' => $unique, + 'onDelete' => $onDelete, + 'columnDefinition' => $columnDef, + ); + return $this; + } + + /** + * Sets field as primary key. + * + * @return self + */ + public function makePrimaryKey() + { + $this->mapping['id'] = true; + + return $this; + } + + /** + * Removes orphan entities when detached from their parent. + * + * @return self + */ + public function orphanRemoval() + { + $this->mapping['orphanRemoval'] = true; + + return $this; + } + + /** + * @return ClassMetadataBuilder + * + * @throws \InvalidArgumentException + */ + public function build() + { + $mapping = $this->mapping; + if ($this->joinColumns) { + $mapping['joinColumns'] = $this->joinColumns; + } + $cm = $this->builder->getClassMetadata(); + if ($this->type == ClassMetadata::MANY_TO_ONE) { + $cm->mapManyToOne($mapping); + } else if ($this->type == ClassMetadata::ONE_TO_ONE) { + $cm->mapOneToOne($mapping); + } else { + throw new \InvalidArgumentException("Type should be a ToOne Association here"); + } + return $this->builder; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..7d771d3f95a198c570762c334eed237b279f5fb8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php @@ -0,0 +1,547 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Builder; + +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Mapping\ClassMetadataInfo; + +/** + * Builder Object for ClassMetadata + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + */ +class ClassMetadataBuilder +{ + /** + * @var \Doctrine\ORM\Mapping\ClassMetadataInfo + */ + private $cm; + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadataInfo $cm + */ + public function __construct(ClassMetadataInfo $cm) + { + $this->cm = $cm; + } + + /** + * @return ClassMetadata + */ + public function getClassMetadata() + { + return $this->cm; + } + + /** + * Marks the class as mapped superclass. + * + * @return ClassMetadataBuilder + */ + public function setMappedSuperClass() + { + $this->cm->isMappedSuperclass = true; + $this->cm->isEmbeddedClass = false; + + return $this; + } + + /** + * Marks the class as embeddable. + * + * @return ClassMetadataBuilder + */ + public function setEmbeddable() + { + $this->cm->isEmbeddedClass = true; + $this->cm->isMappedSuperclass = false; + + return $this; + } + + /** + * Adds and embedded class + * + * @param string $fieldName + * @param string $class + * @param string|null $columnPrefix + * + * @return $this + */ + public function addEmbedded($fieldName, $class, $columnPrefix = null) + { + $this->cm->mapEmbedded(array( + 'fieldName' => $fieldName, + 'class' => $class, + 'columnPrefix' => $columnPrefix + )); + + return $this; + } + + /** + * Sets custom Repository class name. + * + * @param string $repositoryClassName + * + * @return ClassMetadataBuilder + */ + public function setCustomRepositoryClass($repositoryClassName) + { + $this->cm->setCustomRepositoryClass($repositoryClassName); + + return $this; + } + + /** + * Marks class read only. + * + * @return ClassMetadataBuilder + */ + public function setReadOnly() + { + $this->cm->markReadOnly(); + + return $this; + } + + /** + * Sets the table name. + * + * @param string $name + * + * @return ClassMetadataBuilder + */ + public function setTable($name) + { + $this->cm->setPrimaryTable(array('name' => $name)); + + return $this; + } + + /** + * Adds Index. + * + * @param array $columns + * @param string $name + * + * @return ClassMetadataBuilder + */ + public function addIndex(array $columns, $name) + { + if (!isset($this->cm->table['indexes'])) { + $this->cm->table['indexes'] = array(); + } + + $this->cm->table['indexes'][$name] = array('columns' => $columns); + + return $this; + } + + /** + * Adds Unique Constraint. + * + * @param array $columns + * @param string $name + * + * @return ClassMetadataBuilder + */ + public function addUniqueConstraint(array $columns, $name) + { + if ( ! isset($this->cm->table['uniqueConstraints'])) { + $this->cm->table['uniqueConstraints'] = array(); + } + + $this->cm->table['uniqueConstraints'][$name] = array('columns' => $columns); + + return $this; + } + + /** + * Adds named query. + * + * @param string $name + * @param string $dqlQuery + * + * @return ClassMetadataBuilder + */ + public function addNamedQuery($name, $dqlQuery) + { + $this->cm->addNamedQuery(array( + 'name' => $name, + 'query' => $dqlQuery, + )); + + return $this; + } + + /** + * Sets class as root of a joined table inheritance hierarchy. + * + * @return ClassMetadataBuilder + */ + public function setJoinedTableInheritance() + { + $this->cm->setInheritanceType(ClassMetadata::INHERITANCE_TYPE_JOINED); + + return $this; + } + + /** + * Sets class as root of a single table inheritance hierarchy. + * + * @return ClassMetadataBuilder + */ + public function setSingleTableInheritance() + { + $this->cm->setInheritanceType(ClassMetadata::INHERITANCE_TYPE_SINGLE_TABLE); + + return $this; + } + + /** + * Sets the discriminator column details. + * + * @param string $name + * @param string $type + * @param int $length + * + * @return ClassMetadataBuilder + */ + public function setDiscriminatorColumn($name, $type = 'string', $length = 255) + { + $this->cm->setDiscriminatorColumn(array( + 'name' => $name, + 'type' => $type, + 'length' => $length, + )); + + return $this; + } + + /** + * Adds a subclass to this inheritance hierarchy. + * + * @param string $name + * @param string $class + * + * @return ClassMetadataBuilder + */ + public function addDiscriminatorMapClass($name, $class) + { + $this->cm->addDiscriminatorMapClass($name, $class); + + return $this; + } + + /** + * Sets deferred explicit change tracking policy. + * + * @return ClassMetadataBuilder + */ + public function setChangeTrackingPolicyDeferredExplicit() + { + $this->cm->setChangeTrackingPolicy(ClassMetadata::CHANGETRACKING_DEFERRED_EXPLICIT); + + return $this; + } + + /** + * Sets notify change tracking policy. + * + * @return ClassMetadataBuilder + */ + public function setChangeTrackingPolicyNotify() + { + $this->cm->setChangeTrackingPolicy(ClassMetadata::CHANGETRACKING_NOTIFY); + + return $this; + } + + /** + * Adds lifecycle event. + * + * @param string $methodName + * @param string $event + * + * @return ClassMetadataBuilder + */ + public function addLifecycleEvent($methodName, $event) + { + $this->cm->addLifecycleCallback($methodName, $event); + + return $this; + } + + /** + * Adds Field. + * + * @param string $name + * @param string $type + * @param array $mapping + * + * @return ClassMetadataBuilder + */ + public function addField($name, $type, array $mapping = array()) + { + $mapping['fieldName'] = $name; + $mapping['type'] = $type; + + $this->cm->mapField($mapping); + + return $this; + } + + /** + * Creates a field builder. + * + * @param string $name + * @param string $type + * + * @return FieldBuilder + */ + public function createField($name, $type) + { + return new FieldBuilder( + $this, + array( + 'fieldName' => $name, + 'type' => $type + ) + ); + } + + /** + * Creates an embedded builder. + * + * @param string $fieldName + * @param string $class + * + * @return EmbeddedBuilder + */ + public function createEmbedded($fieldName, $class) + { + return new EmbeddedBuilder( + $this, + array( + 'fieldName' => $fieldName, + 'class' => $class, + 'columnPrefix' => null + ) + ); + } + + /** + * Adds a simple many to one association, optionally with the inversed by field. + * + * @param string $name + * @param string $targetEntity + * @param string|null $inversedBy + * + * @return ClassMetadataBuilder + */ + public function addManyToOne($name, $targetEntity, $inversedBy = null) + { + $builder = $this->createManyToOne($name, $targetEntity); + + if ($inversedBy) { + $builder->inversedBy($inversedBy); + } + + return $builder->build(); + } + + /** + * Creates a ManyToOne Association Builder. + * + * Note: This method does not add the association, you have to call build() on the AssociationBuilder. + * + * @param string $name + * @param string $targetEntity + * + * @return AssociationBuilder + */ + public function createManyToOne($name, $targetEntity) + { + return new AssociationBuilder( + $this, + array( + 'fieldName' => $name, + 'targetEntity' => $targetEntity + ), + ClassMetadata::MANY_TO_ONE + ); + } + + /** + * Creates a OneToOne Association Builder. + * + * @param string $name + * @param string $targetEntity + * + * @return AssociationBuilder + */ + public function createOneToOne($name, $targetEntity) + { + return new AssociationBuilder( + $this, + array( + 'fieldName' => $name, + 'targetEntity' => $targetEntity + ), + ClassMetadata::ONE_TO_ONE + ); + } + + /** + * Adds simple inverse one-to-one association. + * + * @param string $name + * @param string $targetEntity + * @param string $mappedBy + * + * @return ClassMetadataBuilder + */ + public function addInverseOneToOne($name, $targetEntity, $mappedBy) + { + $builder = $this->createOneToOne($name, $targetEntity); + $builder->mappedBy($mappedBy); + + return $builder->build(); + } + + /** + * Adds simple owning one-to-one association. + * + * @param string $name + * @param string $targetEntity + * @param string|null $inversedBy + * + * @return ClassMetadataBuilder + */ + public function addOwningOneToOne($name, $targetEntity, $inversedBy = null) + { + $builder = $this->createOneToOne($name, $targetEntity); + + if ($inversedBy) { + $builder->inversedBy($inversedBy); + } + + return $builder->build(); + } + + /** + * Creates a ManyToMany Association Builder. + * + * @param string $name + * @param string $targetEntity + * + * @return ManyToManyAssociationBuilder + */ + public function createManyToMany($name, $targetEntity) + { + return new ManyToManyAssociationBuilder( + $this, + array( + 'fieldName' => $name, + 'targetEntity' => $targetEntity + ), + ClassMetadata::MANY_TO_MANY + ); + } + + /** + * Adds a simple owning many to many association. + * + * @param string $name + * @param string $targetEntity + * @param string|null $inversedBy + * + * @return ClassMetadataBuilder + */ + public function addOwningManyToMany($name, $targetEntity, $inversedBy = null) + { + $builder = $this->createManyToMany($name, $targetEntity); + + if ($inversedBy) { + $builder->inversedBy($inversedBy); + } + + return $builder->build(); + } + + /** + * Adds a simple inverse many to many association. + * + * @param string $name + * @param string $targetEntity + * @param string $mappedBy + * + * @return ClassMetadataBuilder + */ + public function addInverseManyToMany($name, $targetEntity, $mappedBy) + { + $builder = $this->createManyToMany($name, $targetEntity); + $builder->mappedBy($mappedBy); + + return $builder->build(); + } + + /** + * Creates a one to many association builder. + * + * @param string $name + * @param string $targetEntity + * + * @return OneToManyAssociationBuilder + */ + public function createOneToMany($name, $targetEntity) + { + return new OneToManyAssociationBuilder( + $this, + array( + 'fieldName' => $name, + 'targetEntity' => $targetEntity + ), + ClassMetadata::ONE_TO_MANY + ); + } + + /** + * Adds simple OneToMany association. + * + * @param string $name + * @param string $targetEntity + * @param string $mappedBy + * + * @return ClassMetadataBuilder + */ + public function addOneToMany($name, $targetEntity, $mappedBy) + { + $builder = $this->createOneToMany($name, $targetEntity); + $builder->mappedBy($mappedBy); + + return $builder->build(); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/EmbeddedBuilder.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/EmbeddedBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..de8383c53572565d578620f0f431d9fa31efac6d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/EmbeddedBuilder.php @@ -0,0 +1,80 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Builder; + +/** + * Embedded Builder + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 2.5 + * @author Guido Contreras Woda + */ +class EmbeddedBuilder +{ + /** + * @var ClassMetadataBuilder + */ + private $builder; + + /** + * @var array + */ + private $mapping; + + /** + * @param ClassMetadataBuilder $builder + * @param array $mapping + */ + public function __construct(ClassMetadataBuilder $builder, array $mapping) + { + $this->builder = $builder; + $this->mapping = $mapping; + } + + /** + * Sets the column prefix for all of the embedded columns. + * + * @param string $columnPrefix + * @return $this + */ + public function setColumnPrefix($columnPrefix) + { + $this->mapping['columnPrefix'] = $columnPrefix; + + return $this; + } + + /** + * Finalizes this embeddable and attach it to the ClassMetadata. + * + * Without this call an EmbeddedBuilder has no effect on the ClassMetadata. + * + * @return ClassMetadataBuilder + */ + public function build() + { + $cm = $this->builder->getClassMetadata(); + + $cm->mapEmbedded($this->mapping); + + return $this->builder; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/EntityListenerBuilder.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/EntityListenerBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..d17abeac52c45d86f3c7f2d2eeaa44138a82a09b --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/EntityListenerBuilder.php @@ -0,0 +1,72 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Builder; + +use Doctrine\ORM\Mapping\MappingException; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Events; + +/** + * Builder for entity listeners. + * + * @since 2.4 + * @author Fabio B. Silva + */ +class EntityListenerBuilder +{ + /** + * @var array Hash-map to handle event names. + */ + static private $events = array( + Events::preRemove => true, + Events::postRemove => true, + Events::prePersist => true, + Events::postPersist => true, + Events::preUpdate => true, + Events::postUpdate => true, + Events::postLoad => true, + Events::preFlush => true + ); + + /** + * Lookup the entity class to find methods that match to event lifecycle names + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. + * @param string $className The listener class name. + * + * @throws \Doctrine\ORM\Mapping\MappingException When the listener class not found. + */ + static public function bindEntityListener(ClassMetadata $metadata, $className) + { + $class = $metadata->fullyQualifiedClassName($className); + + if ( ! class_exists($class)) { + throw MappingException::entityListenerClassNotFound($class, $className); + } + + foreach (get_class_methods($class) as $method) { + if ( ! isset(self::$events[$method])) { + continue; + } + + $metadata->addEntityListener($method, $class, $method); + } + } +} \ No newline at end of file diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..425840aaf0d2955b531351055f382805f86938c5 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php @@ -0,0 +1,257 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Builder; + +/** + * Field Builder + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 2.2 + * @author Benjamin Eberlei + */ +class FieldBuilder +{ + /** + * @var ClassMetadataBuilder + */ + private $builder; + + /** + * @var array + */ + private $mapping; + + /** + * @var bool + */ + private $version; + + /** + * @var string + */ + private $generatedValue; + + /** + * @var array + */ + private $sequenceDef; + + /** + * @param ClassMetadataBuilder $builder + * @param array $mapping + */ + public function __construct(ClassMetadataBuilder $builder, array $mapping) + { + $this->builder = $builder; + $this->mapping = $mapping; + } + + /** + * Sets length. + * + * @param int $length + * + * @return FieldBuilder + */ + public function length($length) + { + $this->mapping['length'] = $length; + return $this; + } + + /** + * Sets nullable. + * + * @param bool $flag + * + * @return FieldBuilder + */ + public function nullable($flag = true) + { + $this->mapping['nullable'] = (bool)$flag; + return $this; + } + + /** + * Sets Unique. + * + * @param bool $flag + * + * @return FieldBuilder + */ + public function unique($flag = true) + { + $this->mapping['unique'] = (bool)$flag; + return $this; + } + + /** + * Sets column name. + * + * @param string $name + * + * @return FieldBuilder + */ + public function columnName($name) + { + $this->mapping['columnName'] = $name; + return $this; + } + + /** + * Sets Precision. + * + * @param int $p + * + * @return FieldBuilder + */ + public function precision($p) + { + $this->mapping['precision'] = $p; + return $this; + } + + /** + * Sets scale. + * + * @param int $s + * + * @return FieldBuilder + */ + public function scale($s) + { + $this->mapping['scale'] = $s; + return $this; + } + + /** + * Sets field as primary key. + * + * @deprecated Use makePrimaryKey() instead + * @return FieldBuilder + */ + public function isPrimaryKey() + { + return $this->makePrimaryKey(); + } + + /** + * Sets field as primary key. + * + * @return FieldBuilder + */ + public function makePrimaryKey() + { + $this->mapping['id'] = true; + return $this; + } + + /** + * Sets an option. + * + * @param string $name + * @param mixed $value + * + * @return FieldBuilder + */ + public function option($name, $value) + { + $this->mapping['options'][$name] = $value; + return $this; + } + + /** + * @param string $strategy + * + * @return FieldBuilder + */ + public function generatedValue($strategy = 'AUTO') + { + $this->generatedValue = $strategy; + return $this; + } + + /** + * Sets field versioned. + * + * @return FieldBuilder + */ + public function isVersionField() + { + $this->version = true; + return $this; + } + + /** + * Sets Sequence Generator. + * + * @param string $sequenceName + * @param int $allocationSize + * @param int $initialValue + * + * @return FieldBuilder + */ + public function setSequenceGenerator($sequenceName, $allocationSize = 1, $initialValue = 1) + { + $this->sequenceDef = array( + 'sequenceName' => $sequenceName, + 'allocationSize' => $allocationSize, + 'initialValue' => $initialValue, + ); + return $this; + } + + /** + * Sets column definition. + * + * @param string $def + * + * @return FieldBuilder + */ + public function columnDefinition($def) + { + $this->mapping['columnDefinition'] = $def; + return $this; + } + + /** + * Finalizes this field and attach it to the ClassMetadata. + * + * Without this call a FieldBuilder has no effect on the ClassMetadata. + * + * @return ClassMetadataBuilder + */ + public function build() + { + $cm = $this->builder->getClassMetadata(); + if ($this->generatedValue) { + $cm->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . $this->generatedValue)); + } + if ($this->version) { + $cm->setVersionMapping($this->mapping); + } + $cm->mapField($this->mapping); + if ($this->sequenceDef) { + $cm->setSequenceGeneratorDefinition($this->sequenceDef); + } + return $this->builder; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/ManyToManyAssociationBuilder.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/ManyToManyAssociationBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..a182e1e862b119cb83f1ff8c81837694239f73c1 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/ManyToManyAssociationBuilder.php @@ -0,0 +1,98 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Builder; + +/** + * ManyToMany Association Builder + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 2.0 + * @author Benjamin Eberlei + */ +class ManyToManyAssociationBuilder extends OneToManyAssociationBuilder +{ + /** + * @var string|null + */ + private $joinTableName; + + /** + * @var array + */ + private $inverseJoinColumns = array(); + + /** + * @param string $name + * + * @return ManyToManyAssociationBuilder + */ + public function setJoinTable($name) + { + $this->joinTableName = $name; + return $this; + } + + /** + * Adds Inverse Join Columns. + * + * @param string $columnName + * @param string $referencedColumnName + * @param bool $nullable + * @param bool $unique + * @param string|null $onDelete + * @param string|null $columnDef + * + * @return ManyToManyAssociationBuilder + */ + public function addInverseJoinColumn($columnName, $referencedColumnName, $nullable = true, $unique = false, $onDelete = null, $columnDef = null) + { + $this->inverseJoinColumns[] = array( + 'name' => $columnName, + 'referencedColumnName' => $referencedColumnName, + 'nullable' => $nullable, + 'unique' => $unique, + 'onDelete' => $onDelete, + 'columnDefinition' => $columnDef, + ); + return $this; + } + + /** + * @return ClassMetadataBuilder + */ + public function build() + { + $mapping = $this->mapping; + $mapping['joinTable'] = array(); + if ($this->joinColumns) { + $mapping['joinTable']['joinColumns'] = $this->joinColumns; + } + if ($this->inverseJoinColumns) { + $mapping['joinTable']['inverseJoinColumns'] = $this->inverseJoinColumns; + } + if ($this->joinTableName) { + $mapping['joinTable']['name'] = $this->joinTableName; + } + $cm = $this->builder->getClassMetadata(); + $cm->mapManyToMany($mapping); + return $this->builder; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/OneToManyAssociationBuilder.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/OneToManyAssociationBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..4ca60f0ce033b6c340bd5027ee6d6e73121197a0 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Builder/OneToManyAssociationBuilder.php @@ -0,0 +1,67 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Builder; + +/** + * OneToMany Association Builder + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 2.0 + * @author Benjamin Eberlei + */ +class OneToManyAssociationBuilder extends AssociationBuilder +{ + /** + * @param array $fieldNames + * + * @return OneToManyAssociationBuilder + */ + public function setOrderBy(array $fieldNames) + { + $this->mapping['orderBy'] = $fieldNames; + return $this; + } + + /** + * @param string $fieldName + * + * @return OneToManyAssociationBuilder + */ + public function setIndexBy($fieldName) + { + $this->mapping['indexBy'] = $fieldName; + return $this; + } + + /** + * @return ClassMetadataBuilder + */ + public function build() + { + $mapping = $this->mapping; + if ($this->joinColumns) { + $mapping['joinColumns'] = $this->joinColumns; + } + $cm = $this->builder->getClassMetadata(); + $cm->mapOneToMany($mapping); + return $this->builder; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Cache.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Cache.php new file mode 100644 index 0000000000000000000000000000000000000000..3226b6031601a456f7e96a8324c5f86adf896655 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Cache.php @@ -0,0 +1,44 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * Caching to an entity or a collection. + * + * @author Fabio B. Silva + * @since 2.5 + * + * @Annotation + * @Target({"CLASS","PROPERTY"}) + */ +final class Cache implements Annotation +{ + /** + * @Enum({"READ_ONLY", "NONSTRICT_READ_WRITE", "READ_WRITE"}) + * + * @var string The concurrency strategy. + */ + public $usage = 'READ_ONLY'; + + /** + * @var string Cache region name. + */ + public $region; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ChangeTrackingPolicy.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ChangeTrackingPolicy.php new file mode 100644 index 0000000000000000000000000000000000000000..3657b764f1e6952bb757674d33509d67c2b70535 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ChangeTrackingPolicy.php @@ -0,0 +1,36 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("CLASS") + */ +final class ChangeTrackingPolicy implements Annotation +{ + /** + * The change tracking policy. + * + * @var string + * + * @Enum({"DEFERRED_IMPLICIT", "DEFERRED_EXPLICIT", "NOTIFY"}) + */ + public $value; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadata.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..a57f1e15a10bf2352233e5341e6a4e8bc121c4c5 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadata.php @@ -0,0 +1,29 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * {@inheritDoc} + * + * @todo remove or rename ClassMetadataInfo to ClassMetadata + */ +class ClassMetadata extends ClassMetadataInfo +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..e0eacfa5317d5932b9e1c6c54be4bec6a9f9e956 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php @@ -0,0 +1,768 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +use Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory; +use Doctrine\Common\Persistence\Mapping\ClassMetadata as ClassMetadataInterface; +use Doctrine\Common\Persistence\Mapping\ReflectionService; +use Doctrine\DBAL\Platforms; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Event\LoadClassMetadataEventArgs; +use Doctrine\ORM\Event\OnClassMetadataNotFoundEventArgs; +use Doctrine\ORM\Events; +use Doctrine\ORM\Id\BigIntegerIdentityGenerator; +use Doctrine\ORM\Id\IdentityGenerator; +use Doctrine\ORM\ORMException; +use ReflectionException; + +/** + * The ClassMetadataFactory is used to create ClassMetadata objects that contain all the + * metadata mapping information of a class which describes how a class should be mapped + * to a relational database. + * + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ClassMetadataFactory extends AbstractClassMetadataFactory +{ + /** + * @var EntityManagerInterface|null + */ + private $em; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $targetPlatform; + + /** + * @var \Doctrine\Common\Persistence\Mapping\Driver\MappingDriver + */ + private $driver; + + /** + * @var \Doctrine\Common\EventManager + */ + private $evm; + + /** + * @var array + */ + private $embeddablesActiveNesting = array(); + + /** + * {@inheritDoc} + */ + protected function loadMetadata($name) + { + $loaded = parent::loadMetadata($name); + + array_map([$this, 'resolveDiscriminatorValue'], array_map([$this, 'getMetadataFor'], $loaded)); + + return $loaded; + } + + /** + * @param EntityManagerInterface $em + */ + public function setEntityManager(EntityManagerInterface $em) + { + $this->em = $em; + } + + /** + * {@inheritDoc} + */ + protected function initialize() + { + $this->driver = $this->em->getConfiguration()->getMetadataDriverImpl(); + $this->evm = $this->em->getEventManager(); + $this->initialized = true; + } + + /** + * {@inheritDoc} + */ + protected function onNotFoundMetadata($className) + { + if (! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { + return; + } + + $eventArgs = new OnClassMetadataNotFoundEventArgs($className, $this->em); + + $this->evm->dispatchEvent(Events::onClassMetadataNotFound, $eventArgs); + + return $eventArgs->getFoundMetadata(); + } + + /** + * {@inheritDoc} + */ + protected function doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents) + { + /* @var $class ClassMetadata */ + /* @var $parent ClassMetadata */ + if ($parent) { + $class->setInheritanceType($parent->inheritanceType); + $class->setDiscriminatorColumn($parent->discriminatorColumn); + $class->setIdGeneratorType($parent->generatorType); + $this->addInheritedFields($class, $parent); + $this->addInheritedRelations($class, $parent); + $this->addInheritedEmbeddedClasses($class, $parent); + $class->setIdentifier($parent->identifier); + $class->setVersioned($parent->isVersioned); + $class->setVersionField($parent->versionField); + $class->setDiscriminatorMap($parent->discriminatorMap); + $class->setLifecycleCallbacks($parent->lifecycleCallbacks); + $class->setChangeTrackingPolicy($parent->changeTrackingPolicy); + + if ( ! empty($parent->customGeneratorDefinition)) { + $class->setCustomGeneratorDefinition($parent->customGeneratorDefinition); + } + + if ($parent->isMappedSuperclass) { + $class->setCustomRepositoryClass($parent->customRepositoryClassName); + } + } + + // Invoke driver + try { + $this->driver->loadMetadataForClass($class->getName(), $class); + } catch (ReflectionException $e) { + throw MappingException::reflectionFailure($class->getName(), $e); + } + + // If this class has a parent the id generator strategy is inherited. + // However this is only true if the hierarchy of parents contains the root entity, + // if it consists of mapped superclasses these don't necessarily include the id field. + if ($parent && $rootEntityFound) { + if ($parent->isIdGeneratorSequence()) { + $class->setSequenceGeneratorDefinition($parent->sequenceGeneratorDefinition); + } else if ($parent->isIdGeneratorTable()) { + $class->tableGeneratorDefinition = $parent->tableGeneratorDefinition; + } + + if ($parent->generatorType) { + $class->setIdGeneratorType($parent->generatorType); + } + + if ($parent->idGenerator) { + $class->setIdGenerator($parent->idGenerator); + } + } else { + $this->completeIdGeneratorMapping($class); + } + + if (!$class->isMappedSuperclass) { + foreach ($class->embeddedClasses as $property => $embeddableClass) { + + if (isset($embeddableClass['inherited'])) { + continue; + } + + if ( ! (isset($embeddableClass['class']) && $embeddableClass['class'])) { + throw MappingException::missingEmbeddedClass($property); + } + + if (isset($this->embeddablesActiveNesting[$embeddableClass['class']])) { + throw MappingException::infiniteEmbeddableNesting($class->name, $property); + } + + $this->embeddablesActiveNesting[$class->name] = true; + + $embeddableMetadata = $this->getMetadataFor($embeddableClass['class']); + + if ($embeddableMetadata->isEmbeddedClass) { + $this->addNestedEmbeddedClasses($embeddableMetadata, $class, $property); + } + + $class->inlineEmbeddable($property, $embeddableMetadata); + + unset($this->embeddablesActiveNesting[$class->name]); + } + } + + if ($parent) { + if ($parent->isInheritanceTypeSingleTable()) { + $class->setPrimaryTable($parent->table); + } + + if ($parent) { + $this->addInheritedIndexes($class, $parent); + } + + if ($parent->cache) { + $class->cache = $parent->cache; + } + + if ($parent->containsForeignIdentifier) { + $class->containsForeignIdentifier = true; + } + + if ( ! empty($parent->namedQueries)) { + $this->addInheritedNamedQueries($class, $parent); + } + + if ( ! empty($parent->namedNativeQueries)) { + $this->addInheritedNamedNativeQueries($class, $parent); + } + + if ( ! empty($parent->sqlResultSetMappings)) { + $this->addInheritedSqlResultSetMappings($class, $parent); + } + + if ( ! empty($parent->entityListeners) && empty($class->entityListeners)) { + $class->entityListeners = $parent->entityListeners; + } + } + + $class->setParentClasses($nonSuperclassParents); + + if ($class->isRootEntity() && ! $class->isInheritanceTypeNone() && ! $class->discriminatorMap) { + $this->addDefaultDiscriminatorMap($class); + } + + if ($this->evm->hasListeners(Events::loadClassMetadata)) { + $eventArgs = new LoadClassMetadataEventArgs($class, $this->em); + $this->evm->dispatchEvent(Events::loadClassMetadata, $eventArgs); + } + + $this->validateRuntimeMetadata($class, $parent); + } + + /** + * Validate runtime metadata is correctly defined. + * + * @param ClassMetadata $class + * @param ClassMetadataInterface|null $parent + * + * @return void + * + * @throws MappingException + */ + protected function validateRuntimeMetadata($class, $parent) + { + if ( ! $class->reflClass ) { + // only validate if there is a reflection class instance + return; + } + + $class->validateIdentifier(); + $class->validateAssociations(); + $class->validateLifecycleCallbacks($this->getReflectionService()); + + // verify inheritance + if ( ! $class->isMappedSuperclass && !$class->isInheritanceTypeNone()) { + if ( ! $parent) { + if (count($class->discriminatorMap) == 0) { + throw MappingException::missingDiscriminatorMap($class->name); + } + if ( ! $class->discriminatorColumn) { + throw MappingException::missingDiscriminatorColumn($class->name); + } + } + } else if ($class->isMappedSuperclass && $class->name == $class->rootEntityName && (count($class->discriminatorMap) || $class->discriminatorColumn)) { + // second condition is necessary for mapped superclasses in the middle of an inheritance hierarchy + throw MappingException::noInheritanceOnMappedSuperClass($class->name); + } + } + + /** + * {@inheritDoc} + */ + protected function newClassMetadataInstance($className) + { + return new ClassMetadata($className, $this->em->getConfiguration()->getNamingStrategy()); + } + + /** + * Populates the discriminator value of the given metadata (if not set) by iterating over discriminator + * map classes and looking for a fitting one. + * + * @param ClassMetadata $metadata + * + * @return void + * + * @throws MappingException + */ + private function resolveDiscriminatorValue(ClassMetadata $metadata) + { + if ($metadata->discriminatorValue + || ! $metadata->discriminatorMap + || $metadata->isMappedSuperclass + || ! $metadata->reflClass + || $metadata->reflClass->isAbstract() + ) { + return; + } + + // minor optimization: avoid loading related metadata when not needed + foreach ($metadata->discriminatorMap as $discriminatorValue => $discriminatorClass) { + if ($discriminatorClass === $metadata->name) { + $metadata->discriminatorValue = $discriminatorValue; + + return; + } + } + + // iterate over discriminator mappings and resolve actual referenced classes according to existing metadata + foreach ($metadata->discriminatorMap as $discriminatorValue => $discriminatorClass) { + if ($metadata->name === $this->getMetadataFor($discriminatorClass)->getName()) { + $metadata->discriminatorValue = $discriminatorValue; + + return; + } + } + + throw MappingException::mappedClassNotPartOfDiscriminatorMap($metadata->name, $metadata->rootEntityName); + } + + /** + * Adds a default discriminator map if no one is given + * + * If an entity is of any inheritance type and does not contain a + * discriminator map, then the map is generated automatically. This process + * is expensive computation wise. + * + * The automatically generated discriminator map contains the lowercase short name of + * each class as key. + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $class + * + * @throws MappingException + */ + private function addDefaultDiscriminatorMap(ClassMetadata $class) + { + $allClasses = $this->driver->getAllClassNames(); + $fqcn = $class->getName(); + $map = array($this->getShortName($class->name) => $fqcn); + + $duplicates = array(); + foreach ($allClasses as $subClassCandidate) { + if (is_subclass_of($subClassCandidate, $fqcn)) { + $shortName = $this->getShortName($subClassCandidate); + + if (isset($map[$shortName])) { + $duplicates[] = $shortName; + } + + $map[$shortName] = $subClassCandidate; + } + } + + if ($duplicates) { + throw MappingException::duplicateDiscriminatorEntry($class->name, $duplicates, $map); + } + + $class->setDiscriminatorMap($map); + } + + /** + * Gets the lower-case short name of a class. + * + * @param string $className + * + * @return string + */ + private function getShortName($className) + { + if (strpos($className, "\\") === false) { + return strtolower($className); + } + + $parts = explode("\\", $className); + return strtolower(end($parts)); + } + + /** + * Adds inherited fields to the subclass mapping. + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $subClass + * @param \Doctrine\ORM\Mapping\ClassMetadata $parentClass + * + * @return void + */ + private function addInheritedFields(ClassMetadata $subClass, ClassMetadata $parentClass) + { + foreach ($parentClass->fieldMappings as $mapping) { + if ( ! isset($mapping['inherited']) && ! $parentClass->isMappedSuperclass) { + $mapping['inherited'] = $parentClass->name; + } + if ( ! isset($mapping['declared'])) { + $mapping['declared'] = $parentClass->name; + } + $subClass->addInheritedFieldMapping($mapping); + } + foreach ($parentClass->reflFields as $name => $field) { + $subClass->reflFields[$name] = $field; + } + } + + /** + * Adds inherited association mappings to the subclass mapping. + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $subClass + * @param \Doctrine\ORM\Mapping\ClassMetadata $parentClass + * + * @return void + * + * @throws MappingException + */ + private function addInheritedRelations(ClassMetadata $subClass, ClassMetadata $parentClass) + { + foreach ($parentClass->associationMappings as $field => $mapping) { + if ($parentClass->isMappedSuperclass) { + if ($mapping['type'] & ClassMetadata::TO_MANY && !$mapping['isOwningSide']) { + throw MappingException::illegalToManyAssociationOnMappedSuperclass($parentClass->name, $field); + } + $mapping['sourceEntity'] = $subClass->name; + } + + //$subclassMapping = $mapping; + if ( ! isset($mapping['inherited']) && ! $parentClass->isMappedSuperclass) { + $mapping['inherited'] = $parentClass->name; + } + if ( ! isset($mapping['declared'])) { + $mapping['declared'] = $parentClass->name; + } + $subClass->addInheritedAssociationMapping($mapping); + } + } + + private function addInheritedEmbeddedClasses(ClassMetadata $subClass, ClassMetadata $parentClass) + { + foreach ($parentClass->embeddedClasses as $field => $embeddedClass) { + if ( ! isset($embeddedClass['inherited']) && ! $parentClass->isMappedSuperclass) { + $embeddedClass['inherited'] = $parentClass->name; + } + if ( ! isset($embeddedClass['declared'])) { + $embeddedClass['declared'] = $parentClass->name; + } + + $subClass->embeddedClasses[$field] = $embeddedClass; + } + } + + /** + * Adds nested embedded classes metadata to a parent class. + * + * @param ClassMetadata $subClass Sub embedded class metadata to add nested embedded classes metadata from. + * @param ClassMetadata $parentClass Parent class to add nested embedded classes metadata to. + * @param string $prefix Embedded classes' prefix to use for nested embedded classes field names. + */ + private function addNestedEmbeddedClasses(ClassMetadata $subClass, ClassMetadata $parentClass, $prefix) + { + foreach ($subClass->embeddedClasses as $property => $embeddableClass) { + if (isset($embeddableClass['inherited'])) { + continue; + } + + $embeddableMetadata = $this->getMetadataFor($embeddableClass['class']); + + $parentClass->mapEmbedded(array( + 'fieldName' => $prefix . '.' . $property, + 'class' => $embeddableMetadata->name, + 'columnPrefix' => $embeddableClass['columnPrefix'], + 'declaredField' => $embeddableClass['declaredField'] + ? $prefix . '.' . $embeddableClass['declaredField'] + : $prefix, + 'originalField' => $embeddableClass['originalField'] ?: $property, + )); + } + } + + /** + * Copy the table indices from the parent class superclass to the child class + * + * @param ClassMetadata $subClass + * @param ClassMetadata $parentClass + * + * @return void + */ + private function addInheritedIndexes(ClassMetadata $subClass, ClassMetadata $parentClass) + { + if (! $parentClass->isMappedSuperclass) { + return; + } + + foreach (array('uniqueConstraints', 'indexes') as $indexType) { + if (isset($parentClass->table[$indexType])) { + foreach ($parentClass->table[$indexType] as $indexName => $index) { + if (isset($subClass->table[$indexType][$indexName])) { + continue; // Let the inheriting table override indices + } + + $subClass->table[$indexType][$indexName] = $index; + } + } + } + } + + /** + * Adds inherited named queries to the subclass mapping. + * + * @since 2.2 + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $subClass + * @param \Doctrine\ORM\Mapping\ClassMetadata $parentClass + * + * @return void + */ + private function addInheritedNamedQueries(ClassMetadata $subClass, ClassMetadata $parentClass) + { + foreach ($parentClass->namedQueries as $name => $query) { + if ( ! isset ($subClass->namedQueries[$name])) { + $subClass->addNamedQuery(array( + 'name' => $query['name'], + 'query' => $query['query'] + )); + } + } + } + + /** + * Adds inherited named native queries to the subclass mapping. + * + * @since 2.3 + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $subClass + * @param \Doctrine\ORM\Mapping\ClassMetadata $parentClass + * + * @return void + */ + private function addInheritedNamedNativeQueries(ClassMetadata $subClass, ClassMetadata $parentClass) + { + foreach ($parentClass->namedNativeQueries as $name => $query) { + if ( ! isset ($subClass->namedNativeQueries[$name])) { + $subClass->addNamedNativeQuery(array( + 'name' => $query['name'], + 'query' => $query['query'], + 'isSelfClass' => $query['isSelfClass'], + 'resultSetMapping' => $query['resultSetMapping'], + 'resultClass' => $query['isSelfClass'] ? $subClass->name : $query['resultClass'], + )); + } + } + } + + /** + * Adds inherited sql result set mappings to the subclass mapping. + * + * @since 2.3 + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $subClass + * @param \Doctrine\ORM\Mapping\ClassMetadata $parentClass + * + * @return void + */ + private function addInheritedSqlResultSetMappings(ClassMetadata $subClass, ClassMetadata $parentClass) + { + foreach ($parentClass->sqlResultSetMappings as $name => $mapping) { + if ( ! isset ($subClass->sqlResultSetMappings[$name])) { + $entities = array(); + foreach ($mapping['entities'] as $entity) { + $entities[] = array( + 'fields' => $entity['fields'], + 'isSelfClass' => $entity['isSelfClass'], + 'discriminatorColumn' => $entity['discriminatorColumn'], + 'entityClass' => $entity['isSelfClass'] ? $subClass->name : $entity['entityClass'], + ); + } + + $subClass->addSqlResultSetMapping(array( + 'name' => $mapping['name'], + 'columns' => $mapping['columns'], + 'entities' => $entities, + )); + } + } + } + + /** + * Completes the ID generator mapping. If "auto" is specified we choose the generator + * most appropriate for the targeted database platform. + * + * @param ClassMetadataInfo $class + * + * @return void + * + * @throws ORMException + */ + private function completeIdGeneratorMapping(ClassMetadataInfo $class) + { + $idGenType = $class->generatorType; + if ($idGenType == ClassMetadata::GENERATOR_TYPE_AUTO) { + if ($this->getTargetPlatform()->prefersSequences()) { + $class->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_SEQUENCE); + } else if ($this->getTargetPlatform()->prefersIdentityColumns()) { + $class->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_IDENTITY); + } else { + $class->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_TABLE); + } + } + + // Create & assign an appropriate ID generator instance + switch ($class->generatorType) { + case ClassMetadata::GENERATOR_TYPE_IDENTITY: + $sequenceName = null; + $fieldName = $class->identifier ? $class->getSingleIdentifierFieldName() : null; + + // Platforms that do not have native IDENTITY support need a sequence to emulate this behaviour. + if ($this->getTargetPlatform()->usesSequenceEmulatedIdentityColumns()) { + $columnName = $class->getSingleIdentifierColumnName(); + $quoted = isset($class->fieldMappings[$fieldName]['quoted']) || isset($class->table['quoted']); + $sequencePrefix = $class->getSequencePrefix($this->getTargetPlatform()); + $sequenceName = $this->getTargetPlatform()->getIdentitySequenceName($sequencePrefix, $columnName); + $definition = array( + 'sequenceName' => $this->getTargetPlatform()->fixSchemaElementName($sequenceName) + ); + + if ($quoted) { + $definition['quoted'] = true; + } + + $sequenceName = $this + ->em + ->getConfiguration() + ->getQuoteStrategy() + ->getSequenceName($definition, $class, $this->getTargetPlatform()); + } + + $generator = ($fieldName && $class->fieldMappings[$fieldName]['type'] === 'bigint') + ? new BigIntegerIdentityGenerator($sequenceName) + : new IdentityGenerator($sequenceName); + + $class->setIdGenerator($generator); + + break; + + case ClassMetadata::GENERATOR_TYPE_SEQUENCE: + // If there is no sequence definition yet, create a default definition + $definition = $class->sequenceGeneratorDefinition; + + if ( ! $definition) { + $fieldName = $class->getSingleIdentifierFieldName(); + $sequenceName = $class->getSequenceName($this->getTargetPlatform()); + $quoted = isset($class->fieldMappings[$fieldName]['quoted']) || isset($class->table['quoted']); + + $definition = array( + 'sequenceName' => $this->getTargetPlatform()->fixSchemaElementName($sequenceName), + 'allocationSize' => 1, + 'initialValue' => 1, + ); + + if ($quoted) { + $definition['quoted'] = true; + } + + $class->setSequenceGeneratorDefinition($definition); + } + + $sequenceGenerator = new \Doctrine\ORM\Id\SequenceGenerator( + $this->em->getConfiguration()->getQuoteStrategy()->getSequenceName($definition, $class, $this->getTargetPlatform()), + $definition['allocationSize'] + ); + $class->setIdGenerator($sequenceGenerator); + break; + + case ClassMetadata::GENERATOR_TYPE_NONE: + $class->setIdGenerator(new \Doctrine\ORM\Id\AssignedGenerator()); + break; + + case ClassMetadata::GENERATOR_TYPE_UUID: + $class->setIdGenerator(new \Doctrine\ORM\Id\UuidGenerator()); + break; + + case ClassMetadata::GENERATOR_TYPE_TABLE: + throw new ORMException("TableGenerator not yet implemented."); + break; + + case ClassMetadata::GENERATOR_TYPE_CUSTOM: + $definition = $class->customGeneratorDefinition; + if ( ! class_exists($definition['class'])) { + throw new ORMException("Can't instantiate custom generator : " . + $definition['class']); + } + $class->setIdGenerator(new $definition['class']); + break; + + default: + throw new ORMException("Unknown generator type: " . $class->generatorType); + } + } + + /** + * {@inheritDoc} + */ + protected function wakeupReflection(ClassMetadataInterface $class, ReflectionService $reflService) + { + /* @var $class ClassMetadata */ + $class->wakeupReflection($reflService); + } + + /** + * {@inheritDoc} + */ + protected function initializeReflection(ClassMetadataInterface $class, ReflectionService $reflService) + { + /* @var $class ClassMetadata */ + $class->initializeReflection($reflService); + } + + /** + * {@inheritDoc} + */ + protected function getFqcnFromAlias($namespaceAlias, $simpleClassName) + { + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; + } + + /** + * {@inheritDoc} + */ + protected function getDriver() + { + return $this->driver; + } + + /** + * {@inheritDoc} + */ + protected function isEntity(ClassMetadataInterface $class) + { + return isset($class->isMappedSuperclass) && $class->isMappedSuperclass === false; + } + + /** + * @return Platforms\AbstractPlatform + */ + private function getTargetPlatform() + { + if (!$this->targetPlatform) { + $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform(); + } + + return $this->targetPlatform; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php new file mode 100644 index 0000000000000000000000000000000000000000..5670069a8542598dc59485c9d661a5d9f5d42c94 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -0,0 +1,3322 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +use BadMethodCallException; +use Doctrine\Instantiator\Instantiator; +use InvalidArgumentException; +use RuntimeException; +use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Platforms\AbstractPlatform; +use ReflectionClass; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\ClassLoader; + +/** + * A ClassMetadata instance holds all the object-relational mapping metadata + * of an entity and its associations. + * + * Once populated, ClassMetadata instances are usually cached in a serialized form. + * + * IMPORTANT NOTE: + * + * The fields of this class are only public for 2 reasons: + * 1) To allow fast READ access. + * 2) To drastically reduce the size of a serialized instance (private/protected members + * get the whole class name, namespace inclusive, prepended to every property in + * the serialized representation). + * + * @author Roman Borschel + * @author Jonathan H. Wage + * @since 2.0 + */ +class ClassMetadataInfo implements ClassMetadata +{ + /* The inheritance mapping types */ + /** + * NONE means the class does not participate in an inheritance hierarchy + * and therefore does not need an inheritance mapping type. + */ + const INHERITANCE_TYPE_NONE = 1; + + /** + * JOINED means the class will be persisted according to the rules of + * Class Table Inheritance. + */ + const INHERITANCE_TYPE_JOINED = 2; + + /** + * SINGLE_TABLE means the class will be persisted according to the rules of + * Single Table Inheritance. + */ + const INHERITANCE_TYPE_SINGLE_TABLE = 3; + + /** + * TABLE_PER_CLASS means the class will be persisted according to the rules + * of Concrete Table Inheritance. + */ + const INHERITANCE_TYPE_TABLE_PER_CLASS = 4; + + /* The Id generator types. */ + /** + * AUTO means the generator type will depend on what the used platform prefers. + * Offers full portability. + */ + const GENERATOR_TYPE_AUTO = 1; + + /** + * SEQUENCE means a separate sequence object will be used. Platforms that do + * not have native sequence support may emulate it. Full portability is currently + * not guaranteed. + */ + const GENERATOR_TYPE_SEQUENCE = 2; + + /** + * TABLE means a separate table is used for id generation. + * Offers full portability. + */ + const GENERATOR_TYPE_TABLE = 3; + + /** + * IDENTITY means an identity column is used for id generation. The database + * will fill in the id column on insertion. Platforms that do not support + * native identity columns may emulate them. Full portability is currently + * not guaranteed. + */ + const GENERATOR_TYPE_IDENTITY = 4; + + /** + * NONE means the class does not have a generated id. That means the class + * must have a natural, manually assigned id. + */ + const GENERATOR_TYPE_NONE = 5; + + /** + * UUID means that a UUID/GUID expression is used for id generation. Full + * portability is currently not guaranteed. + */ + const GENERATOR_TYPE_UUID = 6; + + /** + * CUSTOM means that customer will use own ID generator that supposedly work + */ + const GENERATOR_TYPE_CUSTOM = 7; + + /** + * DEFERRED_IMPLICIT means that changes of entities are calculated at commit-time + * by doing a property-by-property comparison with the original data. This will + * be done for all entities that are in MANAGED state at commit-time. + * + * This is the default change tracking policy. + */ + const CHANGETRACKING_DEFERRED_IMPLICIT = 1; + + /** + * DEFERRED_EXPLICIT means that changes of entities are calculated at commit-time + * by doing a property-by-property comparison with the original data. This will + * be done only for entities that were explicitly saved (through persist() or a cascade). + */ + const CHANGETRACKING_DEFERRED_EXPLICIT = 2; + + /** + * NOTIFY means that Doctrine relies on the entities sending out notifications + * when their properties change. Such entity classes must implement + * the NotifyPropertyChanged interface. + */ + const CHANGETRACKING_NOTIFY = 3; + + /** + * Specifies that an association is to be fetched when it is first accessed. + */ + const FETCH_LAZY = 2; + + /** + * Specifies that an association is to be fetched when the owner of the + * association is fetched. + */ + const FETCH_EAGER = 3; + + /** + * Specifies that an association is to be fetched lazy (on first access) and that + * commands such as Collection#count, Collection#slice are issued directly against + * the database if the collection is not yet initialized. + */ + const FETCH_EXTRA_LAZY = 4; + + /** + * Identifies a one-to-one association. + */ + const ONE_TO_ONE = 1; + + /** + * Identifies a many-to-one association. + */ + const MANY_TO_ONE = 2; + + /** + * Identifies a one-to-many association. + */ + const ONE_TO_MANY = 4; + + /** + * Identifies a many-to-many association. + */ + const MANY_TO_MANY = 8; + + /** + * Combined bitmask for to-one (single-valued) associations. + */ + const TO_ONE = 3; + + /** + * Combined bitmask for to-many (collection-valued) associations. + */ + const TO_MANY = 12; + + /** + * ReadOnly cache can do reads, inserts and deletes, cannot perform updates or employ any locks, + */ + const CACHE_USAGE_READ_ONLY = 1; + + /** + * Nonstrict Read Write Cache doesn’t employ any locks but can do inserts, update and deletes. + */ + const CACHE_USAGE_NONSTRICT_READ_WRITE = 2; + + /** + * Read Write Attempts to lock the entity before update/delete. + */ + const CACHE_USAGE_READ_WRITE = 3; + + /** + * READ-ONLY: The name of the entity class. + * + * @var string + */ + public $name; + + /** + * READ-ONLY: The namespace the entity class is contained in. + * + * @var string + * + * @todo Not really needed. Usage could be localized. + */ + public $namespace; + + /** + * READ-ONLY: The name of the entity class that is at the root of the mapped entity inheritance + * hierarchy. If the entity is not part of a mapped inheritance hierarchy this is the same + * as {@link $entityName}. + * + * @var string + */ + public $rootEntityName; + + /** + * READ-ONLY: The definition of custom generator. Only used for CUSTOM + * generator type + * + * The definition has the following structure: + * + * array( + * 'class' => 'ClassName', + * ) + * + * + * @var array + * + * @todo Merge with tableGeneratorDefinition into generic generatorDefinition + */ + public $customGeneratorDefinition; + + /** + * The name of the custom repository class used for the entity class. + * (Optional). + * + * @var string + */ + public $customRepositoryClassName; + + /** + * READ-ONLY: Whether this class describes the mapping of a mapped superclass. + * + * @var boolean + */ + public $isMappedSuperclass = false; + + /** + * READ-ONLY: Whether this class describes the mapping of an embeddable class. + * + * @var boolean + */ + public $isEmbeddedClass = false; + + /** + * READ-ONLY: The names of the parent classes (ancestors). + * + * @var array + */ + public $parentClasses = array(); + + /** + * READ-ONLY: The names of all subclasses (descendants). + * + * @var array + */ + public $subClasses = array(); + + /** + * READ-ONLY: The names of all embedded classes based on properties. + * + * @var array + */ + public $embeddedClasses = array(); + + /** + * READ-ONLY: The named queries allowed to be called directly from Repository. + * + * @var array + */ + public $namedQueries = array(); + + /** + * READ-ONLY: The named native queries allowed to be called directly from Repository. + * + * A native SQL named query definition has the following structure: + *
+     * array(
+     *     'name'               => ,
+     *     'query'              => ,
+     *     'resultClass'        => ,
+     *     'resultSetMapping'   => 
+     * )
+     * 
+ * + * @var array + */ + public $namedNativeQueries = array(); + + /** + * READ-ONLY: The mappings of the results of native SQL queries. + * + * A native result mapping definition has the following structure: + *
+     * array(
+     *     'name'               => ,
+     *     'entities'           => array(),
+     *     'columns'            => array()
+     * )
+     * 
+ * + * @var array + */ + public $sqlResultSetMappings = array(); + + /** + * READ-ONLY: The field names of all fields that are part of the identifier/primary key + * of the mapped entity class. + * + * @var array + */ + public $identifier = array(); + + /** + * READ-ONLY: The inheritance mapping type used by the class. + * + * @var integer + */ + public $inheritanceType = self::INHERITANCE_TYPE_NONE; + + /** + * READ-ONLY: The Id generator type used by the class. + * + * @var int + */ + public $generatorType = self::GENERATOR_TYPE_NONE; + + /** + * READ-ONLY: The field mappings of the class. + * Keys are field names and values are mapping definitions. + * + * The mapping definition array has the following values: + * + * - fieldName (string) + * The name of the field in the Entity. + * + * - type (string) + * The type name of the mapped field. Can be one of Doctrine's mapping types + * or a custom mapping type. + * + * - columnName (string, optional) + * The column name. Optional. Defaults to the field name. + * + * - length (integer, optional) + * The database length of the column. Optional. Default value taken from + * the type. + * + * - id (boolean, optional) + * Marks the field as the primary key of the entity. Multiple fields of an + * entity can have the id attribute, forming a composite key. + * + * - nullable (boolean, optional) + * Whether the column is nullable. Defaults to FALSE. + * + * - columnDefinition (string, optional, schema-only) + * The SQL fragment that is used when generating the DDL for the column. + * + * - precision (integer, optional, schema-only) + * The precision of a decimal column. Only valid if the column type is decimal. + * + * - scale (integer, optional, schema-only) + * The scale of a decimal column. Only valid if the column type is decimal. + * + * - 'unique' (string, optional, schema-only) + * Whether a unique constraint should be generated for the column. + * + * @var array + */ + public $fieldMappings = array(); + + /** + * READ-ONLY: An array of field names. Used to look up field names from column names. + * Keys are column names and values are field names. + * This is the reverse lookup map of $_columnNames. + * + * @var array + */ + public $fieldNames = array(); + + /** + * READ-ONLY: A map of field names to column names. Keys are field names and values column names. + * Used to look up column names from field names. + * This is the reverse lookup map of $_fieldNames. + * + * @var array + * + * @todo We could get rid of this array by just using $fieldMappings[$fieldName]['columnName']. + */ + public $columnNames = array(); + + /** + * READ-ONLY: The discriminator value of this class. + * + * This does only apply to the JOINED and SINGLE_TABLE inheritance mapping strategies + * where a discriminator column is used. + * + * @var mixed + * + * @see discriminatorColumn + */ + public $discriminatorValue; + + /** + * READ-ONLY: The discriminator map of all mapped classes in the hierarchy. + * + * This does only apply to the JOINED and SINGLE_TABLE inheritance mapping strategies + * where a discriminator column is used. + * + * @var mixed + * + * @see discriminatorColumn + */ + public $discriminatorMap = array(); + + /** + * READ-ONLY: The definition of the discriminator column used in JOINED and SINGLE_TABLE + * inheritance mappings. + * + * @var array + */ + public $discriminatorColumn; + + /** + * READ-ONLY: The primary table definition. The definition is an array with the + * following entries: + * + * name => + * schema => + * indexes => array + * uniqueConstraints => array + * + * @var array + */ + public $table; + + /** + * READ-ONLY: The registered lifecycle callbacks for entities of this class. + * + * @var array + */ + public $lifecycleCallbacks = array(); + + /** + * READ-ONLY: The registered entity listeners. + * + * @var array + */ + public $entityListeners = array(); + + /** + * READ-ONLY: The association mappings of this class. + * + * The mapping definition array supports the following keys: + * + * - fieldName (string) + * The name of the field in the entity the association is mapped to. + * + * - targetEntity (string) + * The class name of the target entity. If it is fully-qualified it is used as is. + * If it is a simple, unqualified class name the namespace is assumed to be the same + * as the namespace of the source entity. + * + * - mappedBy (string, required for bidirectional associations) + * The name of the field that completes the bidirectional association on the owning side. + * This key must be specified on the inverse side of a bidirectional association. + * + * - inversedBy (string, required for bidirectional associations) + * The name of the field that completes the bidirectional association on the inverse side. + * This key must be specified on the owning side of a bidirectional association. + * + * - cascade (array, optional) + * The names of persistence operations to cascade on the association. The set of possible + * values are: "persist", "remove", "detach", "merge", "refresh", "all" (implies all others). + * + * - orderBy (array, one-to-many/many-to-many only) + * A map of field names (of the target entity) to sorting directions (ASC/DESC). + * Example: array('priority' => 'desc') + * + * - fetch (integer, optional) + * The fetching strategy to use for the association, usually defaults to FETCH_LAZY. + * Possible values are: ClassMetadata::FETCH_EAGER, ClassMetadata::FETCH_LAZY. + * + * - joinTable (array, optional, many-to-many only) + * Specification of the join table and its join columns (foreign keys). + * Only valid for many-to-many mappings. Note that one-to-many associations can be mapped + * through a join table by simply mapping the association as many-to-many with a unique + * constraint on the join table. + * + * - indexBy (string, optional, to-many only) + * Specification of a field on target-entity that is used to index the collection by. + * This field HAS to be either the primary key or a unique column. Otherwise the collection + * does not contain all the entities that are actually related. + * + * A join table definition has the following structure: + *
+     * array(
+     *     'name' => ,
+     *      'joinColumns' => array(),
+     *      'inverseJoinColumns' => array()
+     * )
+     * 
+ * + * @var array + */ + public $associationMappings = array(); + + /** + * READ-ONLY: Flag indicating whether the identifier/primary key of the class is composite. + * + * @var boolean + */ + public $isIdentifierComposite = false; + + /** + * READ-ONLY: Flag indicating whether the identifier/primary key contains at least one foreign key association. + * + * This flag is necessary because some code blocks require special treatment of this cases. + * + * @var boolean + */ + public $containsForeignIdentifier = false; + + /** + * READ-ONLY: The ID generator used for generating IDs for this class. + * + * @var \Doctrine\ORM\Id\AbstractIdGenerator + * + * @todo Remove! + */ + public $idGenerator; + + /** + * READ-ONLY: The definition of the sequence generator of this class. Only used for the + * SEQUENCE generation strategy. + * + * The definition has the following structure: + * + * array( + * 'sequenceName' => 'name', + * 'allocationSize' => 20, + * 'initialValue' => 1 + * ) + * + * + * @var array + * + * @todo Merge with tableGeneratorDefinition into generic generatorDefinition + */ + public $sequenceGeneratorDefinition; + + /** + * READ-ONLY: The definition of the table generator of this class. Only used for the + * TABLE generation strategy. + * + * @var array + * + * @todo Merge with tableGeneratorDefinition into generic generatorDefinition + */ + public $tableGeneratorDefinition; + + /** + * READ-ONLY: The policy used for change-tracking on entities of this class. + * + * @var integer + */ + public $changeTrackingPolicy = self::CHANGETRACKING_DEFERRED_IMPLICIT; + + /** + * READ-ONLY: A flag for whether or not instances of this class are to be versioned + * with optimistic locking. + * + * @var boolean + */ + public $isVersioned; + + /** + * READ-ONLY: The name of the field which is used for versioning in optimistic locking (if any). + * + * @var mixed + */ + public $versionField; + + /** + * @var array + */ + public $cache = null; + + /** + * The ReflectionClass instance of the mapped class. + * + * @var ReflectionClass + */ + public $reflClass; + + /** + * Is this entity marked as "read-only"? + * + * That means it is never considered for change-tracking in the UnitOfWork. It is a very helpful performance + * optimization for entities that are immutable, either in your domain or through the relation database + * (coming from a view, or a history table for example). + * + * @var bool + */ + public $isReadOnly = false; + + /** + * NamingStrategy determining the default column and table names. + * + * @var \Doctrine\ORM\Mapping\NamingStrategy + */ + protected $namingStrategy; + + /** + * The ReflectionProperty instances of the mapped class. + * + * @var \ReflectionProperty[] + */ + public $reflFields = array(); + + /** + * @var \Doctrine\Instantiator\InstantiatorInterface|null + */ + private $instantiator; + + /** + * Initializes a new ClassMetadata instance that will hold the object-relational mapping + * metadata of the class with the given name. + * + * @param string $entityName The name of the entity class the new instance is used for. + * @param NamingStrategy|null $namingStrategy + */ + public function __construct($entityName, NamingStrategy $namingStrategy = null) + { + $this->name = $entityName; + $this->rootEntityName = $entityName; + $this->namingStrategy = $namingStrategy ?: new DefaultNamingStrategy(); + $this->instantiator = new Instantiator(); + } + + /** + * Gets the ReflectionProperties of the mapped class. + * + * @return array An array of ReflectionProperty instances. + */ + public function getReflectionProperties() + { + return $this->reflFields; + } + + /** + * Gets a ReflectionProperty for a specific field of the mapped class. + * + * @param string $name + * + * @return \ReflectionProperty + */ + public function getReflectionProperty($name) + { + return $this->reflFields[$name]; + } + + /** + * Gets the ReflectionProperty for the single identifier field. + * + * @return \ReflectionProperty + * + * @throws BadMethodCallException If the class has a composite identifier. + */ + public function getSingleIdReflectionProperty() + { + if ($this->isIdentifierComposite) { + throw new BadMethodCallException("Class " . $this->name . " has a composite identifier."); + } + return $this->reflFields[$this->identifier[0]]; + } + + /** + * Extracts the identifier values of an entity of this class. + * + * For composite identifiers, the identifier values are returned as an array + * with the same order as the field order in {@link identifier}. + * + * @param object $entity + * + * @return array + */ + public function getIdentifierValues($entity) + { + if ($this->isIdentifierComposite) { + $id = array(); + + foreach ($this->identifier as $idField) { + $value = $this->reflFields[$idField]->getValue($entity); + + if ($value !== null) { + $id[$idField] = $value; + } + } + + return $id; + } + + $id = $this->identifier[0]; + $value = $this->reflFields[$id]->getValue($entity); + + if (null === $value) { + return array(); + } + + return array($id => $value); + } + + /** + * Populates the entity identifier of an entity. + * + * @param object $entity + * @param mixed $id + * + * @return void + * + * @todo Rename to assignIdentifier() + */ + public function setIdentifierValues($entity, array $id) + { + foreach ($id as $idField => $idValue) { + $this->reflFields[$idField]->setValue($entity, $idValue); + } + } + + /** + * Sets the specified field to the specified value on the given entity. + * + * @param object $entity + * @param string $field + * @param mixed $value + * + * @return void + */ + public function setFieldValue($entity, $field, $value) + { + $this->reflFields[$field]->setValue($entity, $value); + } + + /** + * Gets the specified field's value off the given entity. + * + * @param object $entity + * @param string $field + * + * @return mixed + */ + public function getFieldValue($entity, $field) + { + return $this->reflFields[$field]->getValue($entity); + } + + /** + * Creates a string representation of this instance. + * + * @return string The string representation of this instance. + * + * @todo Construct meaningful string representation. + */ + public function __toString() + { + return __CLASS__ . '@' . spl_object_hash($this); + } + + /** + * Determines which fields get serialized. + * + * It is only serialized what is necessary for best unserialization performance. + * That means any metadata properties that are not set or empty or simply have + * their default value are NOT serialized. + * + * Parts that are also NOT serialized because they can not be properly unserialized: + * - reflClass (ReflectionClass) + * - reflFields (ReflectionProperty array) + * + * @return array The names of all the fields that should be serialized. + */ + public function __sleep() + { + // This metadata is always serialized/cached. + $serialized = array( + 'associationMappings', + 'columnNames', //TODO: Not really needed. Can use fieldMappings[$fieldName]['columnName'] + 'fieldMappings', + 'fieldNames', + 'embeddedClasses', + 'identifier', + 'isIdentifierComposite', // TODO: REMOVE + 'name', + 'namespace', // TODO: REMOVE + 'table', + 'rootEntityName', + 'idGenerator', //TODO: Does not really need to be serialized. Could be moved to runtime. + ); + + // The rest of the metadata is only serialized if necessary. + if ($this->changeTrackingPolicy != self::CHANGETRACKING_DEFERRED_IMPLICIT) { + $serialized[] = 'changeTrackingPolicy'; + } + + if ($this->customRepositoryClassName) { + $serialized[] = 'customRepositoryClassName'; + } + + if ($this->inheritanceType != self::INHERITANCE_TYPE_NONE) { + $serialized[] = 'inheritanceType'; + $serialized[] = 'discriminatorColumn'; + $serialized[] = 'discriminatorValue'; + $serialized[] = 'discriminatorMap'; + $serialized[] = 'parentClasses'; + $serialized[] = 'subClasses'; + } + + if ($this->generatorType != self::GENERATOR_TYPE_NONE) { + $serialized[] = 'generatorType'; + if ($this->generatorType == self::GENERATOR_TYPE_SEQUENCE) { + $serialized[] = 'sequenceGeneratorDefinition'; + } + } + + if ($this->isMappedSuperclass) { + $serialized[] = 'isMappedSuperclass'; + } + + if ($this->isEmbeddedClass) { + $serialized[] = 'isEmbeddedClass'; + } + + if ($this->containsForeignIdentifier) { + $serialized[] = 'containsForeignIdentifier'; + } + + if ($this->isVersioned) { + $serialized[] = 'isVersioned'; + $serialized[] = 'versionField'; + } + + if ($this->lifecycleCallbacks) { + $serialized[] = 'lifecycleCallbacks'; + } + + if ($this->entityListeners) { + $serialized[] = 'entityListeners'; + } + + if ($this->namedQueries) { + $serialized[] = 'namedQueries'; + } + + if ($this->namedNativeQueries) { + $serialized[] = 'namedNativeQueries'; + } + + if ($this->sqlResultSetMappings) { + $serialized[] = 'sqlResultSetMappings'; + } + + if ($this->isReadOnly) { + $serialized[] = 'isReadOnly'; + } + + if ($this->customGeneratorDefinition) { + $serialized[] = "customGeneratorDefinition"; + } + + if ($this->cache) { + $serialized[] = 'cache'; + } + + return $serialized; + } + + /** + * Creates a new instance of the mapped class, without invoking the constructor. + * + * @return object + */ + public function newInstance() + { + return $this->instantiator->instantiate($this->name); + } + + /** + * Restores some state that can not be serialized/unserialized. + * + * @param \Doctrine\Common\Persistence\Mapping\ReflectionService $reflService + * + * @return void + */ + public function wakeupReflection($reflService) + { + // Restore ReflectionClass and properties + $this->reflClass = $reflService->getClass($this->name); + $this->instantiator = $this->instantiator ?: new Instantiator(); + + $parentReflFields = array(); + + foreach ($this->embeddedClasses as $property => $embeddedClass) { + if (isset($embeddedClass['declaredField'])) { + $parentReflFields[$property] = new ReflectionEmbeddedProperty( + $parentReflFields[$embeddedClass['declaredField']], + $reflService->getAccessibleProperty( + $this->embeddedClasses[$embeddedClass['declaredField']]['class'], + $embeddedClass['originalField'] + ), + $this->embeddedClasses[$embeddedClass['declaredField']]['class'] + ); + + continue; + } + + $fieldRefl = $reflService->getAccessibleProperty( + isset($embeddedClass['declared']) ? $embeddedClass['declared'] : $this->name, + $property + ); + + $parentReflFields[$property] = $fieldRefl; + $this->reflFields[$property] = $fieldRefl; + } + + foreach ($this->fieldMappings as $field => $mapping) { + if (isset($mapping['declaredField']) && isset($parentReflFields[$mapping['declaredField']])) { + $this->reflFields[$field] = new ReflectionEmbeddedProperty( + $parentReflFields[$mapping['declaredField']], + $reflService->getAccessibleProperty($mapping['originalClass'], $mapping['originalField']), + $mapping['originalClass'] + ); + continue; + } + + $this->reflFields[$field] = isset($mapping['declared']) + ? $reflService->getAccessibleProperty($mapping['declared'], $field) + : $reflService->getAccessibleProperty($this->name, $field); + } + + foreach ($this->associationMappings as $field => $mapping) { + $this->reflFields[$field] = isset($mapping['declared']) + ? $reflService->getAccessibleProperty($mapping['declared'], $field) + : $reflService->getAccessibleProperty($this->name, $field); + } + } + + /** + * Initializes a new ClassMetadata instance that will hold the object-relational mapping + * metadata of the class with the given name. + * + * @param \Doctrine\Common\Persistence\Mapping\ReflectionService $reflService The reflection service. + * + * @return void + */ + public function initializeReflection($reflService) + { + $this->reflClass = $reflService->getClass($this->name); + $this->namespace = $reflService->getClassNamespace($this->name); + + if ($this->reflClass) { + $this->name = $this->rootEntityName = $this->reflClass->getName(); + } + + $this->table['name'] = $this->namingStrategy->classToTableName($this->name); + } + + /** + * Validates Identifier. + * + * @return void + * + * @throws MappingException + */ + public function validateIdentifier() + { + if ($this->isMappedSuperclass || $this->isEmbeddedClass) { + return; + } + + // Verify & complete identifier mapping + if ( ! $this->identifier) { + throw MappingException::identifierRequired($this->name); + } + + if ($this->usesIdGenerator() && $this->isIdentifierComposite) { + throw MappingException::compositeKeyAssignedIdGeneratorRequired($this->name); + } + } + + /** + * Validates association targets actually exist. + * + * @return void + * + * @throws MappingException + */ + public function validateAssociations() + { + foreach ($this->associationMappings as $mapping) { + if ( ! ClassLoader::classExists($mapping['targetEntity']) ) { + throw MappingException::invalidTargetEntityClass($mapping['targetEntity'], $this->name, $mapping['fieldName']); + } + } + } + + /** + * Validates lifecycle callbacks. + * + * @param \Doctrine\Common\Persistence\Mapping\ReflectionService $reflService + * + * @return void + * + * @throws MappingException + */ + public function validateLifecycleCallbacks($reflService) + { + foreach ($this->lifecycleCallbacks as $callbacks) { + foreach ($callbacks as $callbackFuncName) { + if ( ! $reflService->hasPublicMethod($this->name, $callbackFuncName)) { + throw MappingException::lifecycleCallbackMethodNotFound($this->name, $callbackFuncName); + } + } + } + } + + /** + * {@inheritDoc} + */ + public function getReflectionClass() + { + return $this->reflClass; + } + + /** + * @param array $cache + * + * @return void + */ + public function enableCache(array $cache) + { + if ( ! isset($cache['usage'])) { + $cache['usage'] = self::CACHE_USAGE_READ_ONLY; + } + + if ( ! isset($cache['region'])) { + $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)); + } + + $this->cache = $cache; + } + + /** + * @param string $fieldName + * @param array $cache + * + * @return void + */ + public function enableAssociationCache($fieldName, array $cache) + { + if ( ! isset($cache['usage'])) { + $cache['usage'] = isset($this->cache['usage']) + ? $this->cache['usage'] + : self::CACHE_USAGE_READ_ONLY; + } + + if ( ! isset($cache['region'])) { + $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)) . '__' . $fieldName; + } + + $this->associationMappings[$fieldName]['cache'] = $cache; + } + + /** + * Sets the change tracking policy used by this class. + * + * @param integer $policy + * + * @return void + */ + public function setChangeTrackingPolicy($policy) + { + $this->changeTrackingPolicy = $policy; + } + + /** + * Whether the change tracking policy of this class is "deferred explicit". + * + * @return boolean + */ + public function isChangeTrackingDeferredExplicit() + { + return $this->changeTrackingPolicy == self::CHANGETRACKING_DEFERRED_EXPLICIT; + } + + /** + * Whether the change tracking policy of this class is "deferred implicit". + * + * @return boolean + */ + public function isChangeTrackingDeferredImplicit() + { + return $this->changeTrackingPolicy == self::CHANGETRACKING_DEFERRED_IMPLICIT; + } + + /** + * Whether the change tracking policy of this class is "notify". + * + * @return boolean + */ + public function isChangeTrackingNotify() + { + return $this->changeTrackingPolicy == self::CHANGETRACKING_NOTIFY; + } + + /** + * Checks whether a field is part of the identifier/primary key field(s). + * + * @param string $fieldName The field name. + * + * @return boolean TRUE if the field is part of the table identifier/primary key field(s), + * FALSE otherwise. + */ + public function isIdentifier($fieldName) + { + if ( ! $this->identifier) { + return false; + } + + if ( ! $this->isIdentifierComposite) { + return $fieldName === $this->identifier[0]; + } + + return in_array($fieldName, $this->identifier); + } + + /** + * Checks if the field is unique. + * + * @param string $fieldName The field name. + * + * @return boolean TRUE if the field is unique, FALSE otherwise. + */ + public function isUniqueField($fieldName) + { + $mapping = $this->getFieldMapping($fieldName); + if ($mapping !== false) { + return isset($mapping['unique']) && $mapping['unique'] == true; + } + return false; + } + + /** + * Checks if the field is not null. + * + * @param string $fieldName The field name. + * + * @return boolean TRUE if the field is not null, FALSE otherwise. + */ + public function isNullable($fieldName) + { + $mapping = $this->getFieldMapping($fieldName); + if ($mapping !== false) { + return isset($mapping['nullable']) && $mapping['nullable'] == true; + } + return false; + } + + /** + * Gets a column name for a field name. + * If the column name for the field cannot be found, the given field name + * is returned. + * + * @param string $fieldName The field name. + * + * @return string The column name. + */ + public function getColumnName($fieldName) + { + return isset($this->columnNames[$fieldName]) ? + $this->columnNames[$fieldName] : $fieldName; + } + + /** + * Gets the mapping of a (regular) field that holds some data but not a + * reference to another object. + * + * @param string $fieldName The field name. + * + * @return array The field mapping. + * + * @throws MappingException + */ + public function getFieldMapping($fieldName) + { + if ( ! isset($this->fieldMappings[$fieldName])) { + throw MappingException::mappingNotFound($this->name, $fieldName); + } + return $this->fieldMappings[$fieldName]; + } + + /** + * Gets the mapping of an association. + * + * @see ClassMetadataInfo::$associationMappings + * + * @param string $fieldName The field name that represents the association in + * the object model. + * + * @return array The mapping. + * + * @throws MappingException + */ + public function getAssociationMapping($fieldName) + { + if ( ! isset($this->associationMappings[$fieldName])) { + throw MappingException::mappingNotFound($this->name, $fieldName); + } + return $this->associationMappings[$fieldName]; + } + + /** + * Gets all association mappings of the class. + * + * @return array + */ + public function getAssociationMappings() + { + return $this->associationMappings; + } + + /** + * Gets the field name for a column name. + * If no field name can be found the column name is returned. + * + * @param string $columnName The column name. + * + * @return string The column alias. + */ + public function getFieldName($columnName) + { + return isset($this->fieldNames[$columnName]) ? + $this->fieldNames[$columnName] : $columnName; + } + + /** + * Gets the named query. + * + * @see ClassMetadataInfo::$namedQueries + * + * @param string $queryName The query name. + * + * @return string + * + * @throws MappingException + */ + public function getNamedQuery($queryName) + { + if ( ! isset($this->namedQueries[$queryName])) { + throw MappingException::queryNotFound($this->name, $queryName); + } + return $this->namedQueries[$queryName]['dql']; + } + + /** + * Gets all named queries of the class. + * + * @return array + */ + public function getNamedQueries() + { + return $this->namedQueries; + } + + /** + * Gets the named native query. + * + * @see ClassMetadataInfo::$namedNativeQueries + * + * @param string $queryName The query name. + * + * @return array + * + * @throws MappingException + */ + public function getNamedNativeQuery($queryName) + { + if ( ! isset($this->namedNativeQueries[$queryName])) { + throw MappingException::queryNotFound($this->name, $queryName); + } + + return $this->namedNativeQueries[$queryName]; + } + + /** + * Gets all named native queries of the class. + * + * @return array + */ + public function getNamedNativeQueries() + { + return $this->namedNativeQueries; + } + + /** + * Gets the result set mapping. + * + * @see ClassMetadataInfo::$sqlResultSetMappings + * + * @param string $name The result set mapping name. + * + * @return array + * + * @throws MappingException + */ + public function getSqlResultSetMapping($name) + { + if ( ! isset($this->sqlResultSetMappings[$name])) { + throw MappingException::resultMappingNotFound($this->name, $name); + } + + return $this->sqlResultSetMappings[$name]; + } + + /** + * Gets all sql result set mappings of the class. + * + * @return array + */ + public function getSqlResultSetMappings() + { + return $this->sqlResultSetMappings; + } + + /** + * Validates & completes the given field mapping. + * + * @param array $mapping The field mapping to validate & complete. + * + * @return array The validated and completed field mapping. + * + * @throws MappingException + */ + protected function _validateAndCompleteFieldMapping(array &$mapping) + { + // Check mandatory fields + if ( ! isset($mapping['fieldName']) || strlen($mapping['fieldName']) == 0) { + throw MappingException::missingFieldName($this->name); + } + if ( ! isset($mapping['type'])) { + // Default to string + $mapping['type'] = 'string'; + } + + // Complete fieldName and columnName mapping + if ( ! isset($mapping['columnName'])) { + $mapping['columnName'] = $this->namingStrategy->propertyToColumnName($mapping['fieldName'], $this->name); + } + + if ($mapping['columnName'][0] === '`') { + $mapping['columnName'] = trim($mapping['columnName'], '`'); + $mapping['quoted'] = true; + } + + $this->columnNames[$mapping['fieldName']] = $mapping['columnName']; + if (isset($this->fieldNames[$mapping['columnName']]) || ($this->discriminatorColumn != null && $this->discriminatorColumn['name'] == $mapping['columnName'])) { + throw MappingException::duplicateColumnName($this->name, $mapping['columnName']); + } + + $this->fieldNames[$mapping['columnName']] = $mapping['fieldName']; + + // Complete id mapping + if (isset($mapping['id']) && $mapping['id'] === true) { + if ($this->versionField == $mapping['fieldName']) { + throw MappingException::cannotVersionIdField($this->name, $mapping['fieldName']); + } + + if ( ! in_array($mapping['fieldName'], $this->identifier)) { + $this->identifier[] = $mapping['fieldName']; + } + // Check for composite key + if ( ! $this->isIdentifierComposite && count($this->identifier) > 1) { + $this->isIdentifierComposite = true; + } + } + + if (Type::hasType($mapping['type']) && Type::getType($mapping['type'])->canRequireSQLConversion()) { + if (isset($mapping['id']) && $mapping['id'] === true) { + throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']); + } + + $mapping['requireSQLConversion'] = true; + } + } + + /** + * Validates & completes the basic mapping information that is common to all + * association mappings (one-to-one, many-ot-one, one-to-many, many-to-many). + * + * @param array $mapping The mapping. + * + * @return array The updated mapping. + * + * @throws MappingException If something is wrong with the mapping. + */ + protected function _validateAndCompleteAssociationMapping(array $mapping) + { + if ( ! isset($mapping['mappedBy'])) { + $mapping['mappedBy'] = null; + } + if ( ! isset($mapping['inversedBy'])) { + $mapping['inversedBy'] = null; + } + $mapping['isOwningSide'] = true; // assume owning side until we hit mappedBy + + // unset optional indexBy attribute if its empty + if ( ! isset($mapping['indexBy']) || !$mapping['indexBy']) { + unset($mapping['indexBy']); + } + + // If targetEntity is unqualified, assume it is in the same namespace as + // the sourceEntity. + $mapping['sourceEntity'] = $this->name; + + if (isset($mapping['targetEntity'])) { + $mapping['targetEntity'] = $this->fullyQualifiedClassName($mapping['targetEntity']); + $mapping['targetEntity'] = ltrim($mapping['targetEntity'], '\\'); + } + + if ( ($mapping['type'] & self::MANY_TO_ONE) > 0 && + isset($mapping['orphanRemoval']) && + $mapping['orphanRemoval'] == true) { + + throw MappingException::illegalOrphanRemoval($this->name, $mapping['fieldName']); + } + + // Complete id mapping + if (isset($mapping['id']) && $mapping['id'] === true) { + if (isset($mapping['orphanRemoval']) && $mapping['orphanRemoval'] == true) { + throw MappingException::illegalOrphanRemovalOnIdentifierAssociation($this->name, $mapping['fieldName']); + } + + if ( ! in_array($mapping['fieldName'], $this->identifier)) { + if (isset($mapping['joinColumns']) && count($mapping['joinColumns']) >= 2) { + throw MappingException::cannotMapCompositePrimaryKeyEntitiesAsForeignId( + $mapping['targetEntity'], $this->name, $mapping['fieldName'] + ); + } + + $this->identifier[] = $mapping['fieldName']; + $this->containsForeignIdentifier = true; + } + // Check for composite key + if ( ! $this->isIdentifierComposite && count($this->identifier) > 1) { + $this->isIdentifierComposite = true; + } + } + + // Mandatory attributes for both sides + // Mandatory: fieldName, targetEntity + if ( ! isset($mapping['fieldName']) || strlen($mapping['fieldName']) == 0) { + throw MappingException::missingFieldName($this->name); + } + if ( ! isset($mapping['targetEntity'])) { + throw MappingException::missingTargetEntity($mapping['fieldName']); + } + + // Mandatory and optional attributes for either side + if ( ! $mapping['mappedBy']) { + if (isset($mapping['joinTable']) && $mapping['joinTable']) { + if (isset($mapping['joinTable']['name']) && $mapping['joinTable']['name'][0] === '`') { + $mapping['joinTable']['name'] = trim($mapping['joinTable']['name'], '`'); + $mapping['joinTable']['quoted'] = true; + } + } + } else { + $mapping['isOwningSide'] = false; + } + + if (isset($mapping['id']) && $mapping['id'] === true && $mapping['type'] & self::TO_MANY) { + throw MappingException::illegalToManyIdentifierAssociation($this->name, $mapping['fieldName']); + } + + // Fetch mode. Default fetch mode to LAZY, if not set. + if ( ! isset($mapping['fetch'])) { + $mapping['fetch'] = self::FETCH_LAZY; + } + + // Cascades + $cascades = isset($mapping['cascade']) ? array_map('strtolower', $mapping['cascade']) : array(); + + if (in_array('all', $cascades)) { + $cascades = array('remove', 'persist', 'refresh', 'merge', 'detach'); + } + + if (count($cascades) !== count(array_intersect($cascades, array('remove', 'persist', 'refresh', 'merge', 'detach')))) { + throw MappingException::invalidCascadeOption( + array_diff($cascades, array_intersect($cascades, array('remove', 'persist', 'refresh', 'merge', 'detach'))), + $this->name, + $mapping['fieldName'] + ); + } + + $mapping['cascade'] = $cascades; + $mapping['isCascadeRemove'] = in_array('remove', $cascades); + $mapping['isCascadePersist'] = in_array('persist', $cascades); + $mapping['isCascadeRefresh'] = in_array('refresh', $cascades); + $mapping['isCascadeMerge'] = in_array('merge', $cascades); + $mapping['isCascadeDetach'] = in_array('detach', $cascades); + + return $mapping; + } + + /** + * Validates & completes a one-to-one association mapping. + * + * @param array $mapping The mapping to validate & complete. + * + * @return array The validated & completed mapping. + * + * @throws RuntimeException + * @throws MappingException + */ + protected function _validateAndCompleteOneToOneMapping(array $mapping) + { + $mapping = $this->_validateAndCompleteAssociationMapping($mapping); + + if (isset($mapping['joinColumns']) && $mapping['joinColumns']) { + $mapping['isOwningSide'] = true; + } + + if ($mapping['isOwningSide']) { + if ( ! isset($mapping['joinColumns']) || ! $mapping['joinColumns']) { + // Apply default join column + $mapping['joinColumns'] = array(array( + 'name' => $this->namingStrategy->joinColumnName($mapping['fieldName'], $this->name), + 'referencedColumnName' => $this->namingStrategy->referenceColumnName() + )); + } + + $uniqueConstraintColumns = array(); + foreach ($mapping['joinColumns'] as &$joinColumn) { + if ($mapping['type'] === self::ONE_TO_ONE && ! $this->isInheritanceTypeSingleTable()) { + if (count($mapping['joinColumns']) == 1) { + if ( ! isset($mapping['id']) || ! $mapping['id']) { + $joinColumn['unique'] = true; + } + } else { + $uniqueConstraintColumns[] = $joinColumn['name']; + } + } + + if (empty($joinColumn['name'])) { + $joinColumn['name'] = $this->namingStrategy->joinColumnName($mapping['fieldName'], $this->name); + } + + if (empty($joinColumn['referencedColumnName'])) { + $joinColumn['referencedColumnName'] = $this->namingStrategy->referenceColumnName(); + } + + if ($joinColumn['name'][0] === '`') { + $joinColumn['name'] = trim($joinColumn['name'], '`'); + $joinColumn['quoted'] = true; + } + + if ($joinColumn['referencedColumnName'][0] === '`') { + $joinColumn['referencedColumnName'] = trim($joinColumn['referencedColumnName'], '`'); + $joinColumn['quoted'] = true; + } + + $mapping['sourceToTargetKeyColumns'][$joinColumn['name']] = $joinColumn['referencedColumnName']; + $mapping['joinColumnFieldNames'][$joinColumn['name']] = isset($joinColumn['fieldName']) + ? $joinColumn['fieldName'] : $joinColumn['name']; + } + + if ($uniqueConstraintColumns) { + if ( ! $this->table) { + throw new RuntimeException("ClassMetadataInfo::setTable() has to be called before defining a one to one relationship."); + } + $this->table['uniqueConstraints'][$mapping['fieldName']."_uniq"] = array( + 'columns' => $uniqueConstraintColumns + ); + } + + $mapping['targetToSourceKeyColumns'] = array_flip($mapping['sourceToTargetKeyColumns']); + } + + $mapping['orphanRemoval'] = isset($mapping['orphanRemoval']) ? (bool) $mapping['orphanRemoval'] : false; + $mapping['isCascadeRemove'] = $mapping['orphanRemoval'] ? true : $mapping['isCascadeRemove']; + + if ($mapping['orphanRemoval']) { + unset($mapping['unique']); + } + + if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) { + throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']); + } + + return $mapping; + } + + /** + * Validates & completes a one-to-many association mapping. + * + * @param array $mapping The mapping to validate and complete. + * + * @return array The validated and completed mapping. + * + * @throws MappingException + * @throws InvalidArgumentException + */ + protected function _validateAndCompleteOneToManyMapping(array $mapping) + { + $mapping = $this->_validateAndCompleteAssociationMapping($mapping); + + // OneToMany-side MUST be inverse (must have mappedBy) + if ( ! isset($mapping['mappedBy'])) { + throw MappingException::oneToManyRequiresMappedBy($mapping['fieldName']); + } + + $mapping['orphanRemoval'] = isset($mapping['orphanRemoval']) ? (bool) $mapping['orphanRemoval'] : false; + $mapping['isCascadeRemove'] = $mapping['orphanRemoval'] ? true : $mapping['isCascadeRemove']; + + if (isset($mapping['orderBy'])) { + if ( ! is_array($mapping['orderBy'])) { + throw new InvalidArgumentException("'orderBy' is expected to be an array, not ".gettype($mapping['orderBy'])); + } + } + + return $mapping; + } + + /** + * Validates & completes a many-to-many association mapping. + * + * @param array $mapping The mapping to validate & complete. + * + * @return array The validated & completed mapping. + * + * @throws \InvalidArgumentException + */ + protected function _validateAndCompleteManyToManyMapping(array $mapping) + { + $mapping = $this->_validateAndCompleteAssociationMapping($mapping); + if ($mapping['isOwningSide']) { + // owning side MUST have a join table + if ( ! isset($mapping['joinTable']['name'])) { + $mapping['joinTable']['name'] = $this->namingStrategy->joinTableName($mapping['sourceEntity'], $mapping['targetEntity'], $mapping['fieldName']); + } + + $selfReferencingEntityWithoutJoinColumns = $mapping['sourceEntity'] == $mapping['targetEntity'] + && (! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); + + if ( ! isset($mapping['joinTable']['joinColumns'])) { + $mapping['joinTable']['joinColumns'] = array(array( + 'name' => $this->namingStrategy->joinKeyColumnName($mapping['sourceEntity'], $selfReferencingEntityWithoutJoinColumns ? 'source' : null), + 'referencedColumnName' => $this->namingStrategy->referenceColumnName(), + 'onDelete' => 'CASCADE')); + } + if ( ! isset($mapping['joinTable']['inverseJoinColumns'])) { + $mapping['joinTable']['inverseJoinColumns'] = array(array( + 'name' => $this->namingStrategy->joinKeyColumnName($mapping['targetEntity'], $selfReferencingEntityWithoutJoinColumns ? 'target' : null), + 'referencedColumnName' => $this->namingStrategy->referenceColumnName(), + 'onDelete' => 'CASCADE')); + } + + $mapping['joinTableColumns'] = array(); + + foreach ($mapping['joinTable']['joinColumns'] as &$joinColumn) { + if (empty($joinColumn['name'])) { + $joinColumn['name'] = $this->namingStrategy->joinKeyColumnName($mapping['sourceEntity'], $joinColumn['referencedColumnName']); + } + + if (empty($joinColumn['referencedColumnName'])) { + $joinColumn['referencedColumnName'] = $this->namingStrategy->referenceColumnName(); + } + + if ($joinColumn['name'][0] === '`') { + $joinColumn['name'] = trim($joinColumn['name'], '`'); + $joinColumn['quoted'] = true; + } + + if ($joinColumn['referencedColumnName'][0] === '`') { + $joinColumn['referencedColumnName'] = trim($joinColumn['referencedColumnName'], '`'); + $joinColumn['quoted'] = true; + } + + if (isset($joinColumn['onDelete']) && strtolower($joinColumn['onDelete']) == 'cascade') { + $mapping['isOnDeleteCascade'] = true; + } + + $mapping['relationToSourceKeyColumns'][$joinColumn['name']] = $joinColumn['referencedColumnName']; + $mapping['joinTableColumns'][] = $joinColumn['name']; + } + + foreach ($mapping['joinTable']['inverseJoinColumns'] as &$inverseJoinColumn) { + if (empty($inverseJoinColumn['name'])) { + $inverseJoinColumn['name'] = $this->namingStrategy->joinKeyColumnName($mapping['targetEntity'], $inverseJoinColumn['referencedColumnName']); + } + + if (empty($inverseJoinColumn['referencedColumnName'])) { + $inverseJoinColumn['referencedColumnName'] = $this->namingStrategy->referenceColumnName(); + } + + if ($inverseJoinColumn['name'][0] === '`') { + $inverseJoinColumn['name'] = trim($inverseJoinColumn['name'], '`'); + $inverseJoinColumn['quoted'] = true; + } + + if ($inverseJoinColumn['referencedColumnName'][0] === '`') { + $inverseJoinColumn['referencedColumnName'] = trim($inverseJoinColumn['referencedColumnName'], '`'); + $inverseJoinColumn['quoted'] = true; + } + + if (isset($inverseJoinColumn['onDelete']) && strtolower($inverseJoinColumn['onDelete']) == 'cascade') { + $mapping['isOnDeleteCascade'] = true; + } + + $mapping['relationToTargetKeyColumns'][$inverseJoinColumn['name']] = $inverseJoinColumn['referencedColumnName']; + $mapping['joinTableColumns'][] = $inverseJoinColumn['name']; + } + } + + $mapping['orphanRemoval'] = isset($mapping['orphanRemoval']) ? (bool) $mapping['orphanRemoval'] : false; + + if (isset($mapping['orderBy'])) { + if ( ! is_array($mapping['orderBy'])) { + throw new InvalidArgumentException("'orderBy' is expected to be an array, not ".gettype($mapping['orderBy'])); + } + } + + return $mapping; + } + + /** + * {@inheritDoc} + */ + public function getIdentifierFieldNames() + { + return $this->identifier; + } + + /** + * Gets the name of the single id field. Note that this only works on + * entity classes that have a single-field pk. + * + * @return string + * + * @throws MappingException If the class has a composite primary key. + */ + public function getSingleIdentifierFieldName() + { + if ($this->isIdentifierComposite) { + throw MappingException::singleIdNotAllowedOnCompositePrimaryKey($this->name); + } + return $this->identifier[0]; + } + + /** + * Gets the column name of the single id column. Note that this only works on + * entity classes that have a single-field pk. + * + * @return string + * + * @throws MappingException If the class has a composite primary key. + */ + public function getSingleIdentifierColumnName() + { + return $this->getColumnName($this->getSingleIdentifierFieldName()); + } + + /** + * INTERNAL: + * Sets the mapped identifier/primary key fields of this class. + * Mainly used by the ClassMetadataFactory to assign inherited identifiers. + * + * @param array $identifier + * + * @return void + */ + public function setIdentifier(array $identifier) + { + $this->identifier = $identifier; + $this->isIdentifierComposite = (count($this->identifier) > 1); + } + + /** + * {@inheritDoc} + */ + public function getIdentifier() + { + return $this->identifier; + } + + /** + * {@inheritDoc} + */ + public function hasField($fieldName) + { + return isset($this->fieldMappings[$fieldName]); + } + + /** + * Gets an array containing all the column names. + * + * @param array|null $fieldNames + * + * @return array + */ + public function getColumnNames(array $fieldNames = null) + { + if ($fieldNames === null) { + return array_keys($this->fieldNames); + } else { + $columnNames = array(); + foreach ($fieldNames as $fieldName) { + $columnNames[] = $this->getColumnName($fieldName); + } + return $columnNames; + } + } + + /** + * Returns an array with all the identifier column names. + * + * @return array + */ + public function getIdentifierColumnNames() + { + $columnNames = array(); + + foreach ($this->identifier as $idProperty) { + if (isset($this->fieldMappings[$idProperty])) { + $columnNames[] = $this->fieldMappings[$idProperty]['columnName']; + + continue; + } + + // Association defined as Id field + $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; + $assocColumnNames = array_map(function ($joinColumn) { return $joinColumn['name']; }, $joinColumns); + + $columnNames = array_merge($columnNames, $assocColumnNames); + } + + return $columnNames; + } + + /** + * Sets the type of Id generator to use for the mapped class. + * + * @param int $generatorType + * + * @return void + */ + public function setIdGeneratorType($generatorType) + { + $this->generatorType = $generatorType; + } + + /** + * Checks whether the mapped class uses an Id generator. + * + * @return boolean TRUE if the mapped class uses an Id generator, FALSE otherwise. + */ + public function usesIdGenerator() + { + return $this->generatorType != self::GENERATOR_TYPE_NONE; + } + + /** + * @return boolean + */ + public function isInheritanceTypeNone() + { + return $this->inheritanceType == self::INHERITANCE_TYPE_NONE; + } + + /** + * Checks whether the mapped class uses the JOINED inheritance mapping strategy. + * + * @return boolean TRUE if the class participates in a JOINED inheritance mapping, + * FALSE otherwise. + */ + public function isInheritanceTypeJoined() + { + return $this->inheritanceType == self::INHERITANCE_TYPE_JOINED; + } + + /** + * Checks whether the mapped class uses the SINGLE_TABLE inheritance mapping strategy. + * + * @return boolean TRUE if the class participates in a SINGLE_TABLE inheritance mapping, + * FALSE otherwise. + */ + public function isInheritanceTypeSingleTable() + { + return $this->inheritanceType == self::INHERITANCE_TYPE_SINGLE_TABLE; + } + + /** + * Checks whether the mapped class uses the TABLE_PER_CLASS inheritance mapping strategy. + * + * @return boolean TRUE if the class participates in a TABLE_PER_CLASS inheritance mapping, + * FALSE otherwise. + */ + public function isInheritanceTypeTablePerClass() + { + return $this->inheritanceType == self::INHERITANCE_TYPE_TABLE_PER_CLASS; + } + + /** + * Checks whether the class uses an identity column for the Id generation. + * + * @return boolean TRUE if the class uses the IDENTITY generator, FALSE otherwise. + */ + public function isIdGeneratorIdentity() + { + return $this->generatorType == self::GENERATOR_TYPE_IDENTITY; + } + + /** + * Checks whether the class uses a sequence for id generation. + * + * @return boolean TRUE if the class uses the SEQUENCE generator, FALSE otherwise. + */ + public function isIdGeneratorSequence() + { + return $this->generatorType == self::GENERATOR_TYPE_SEQUENCE; + } + + /** + * Checks whether the class uses a table for id generation. + * + * @return boolean TRUE if the class uses the TABLE generator, FALSE otherwise. + */ + public function isIdGeneratorTable() + { + return $this->generatorType == self::GENERATOR_TYPE_TABLE; + } + + /** + * Checks whether the class has a natural identifier/pk (which means it does + * not use any Id generator. + * + * @return boolean + */ + public function isIdentifierNatural() + { + return $this->generatorType == self::GENERATOR_TYPE_NONE; + } + + /** + * Checks whether the class use a UUID for id generation. + * + * @return boolean + */ + public function isIdentifierUuid() + { + return $this->generatorType == self::GENERATOR_TYPE_UUID; + } + + /** + * Gets the type of a field. + * + * @param string $fieldName + * + * @return \Doctrine\DBAL\Types\Type|string|null + */ + public function getTypeOfField($fieldName) + { + return isset($this->fieldMappings[$fieldName]) ? + $this->fieldMappings[$fieldName]['type'] : null; + } + + /** + * Gets the type of a column. + * + * @param string $columnName + * + * @return \Doctrine\DBAL\Types\Type|string|null + * + * @deprecated this method is bogous and unreliable, since it cannot resolve the type of a column that is + * derived by a referenced field on a different entity. + */ + public function getTypeOfColumn($columnName) + { + return $this->getTypeOfField($this->getFieldName($columnName)); + } + + /** + * Gets the name of the primary table. + * + * @return string + */ + public function getTableName() + { + return $this->table['name']; + } + + /** + * Gets primary table's schema name. + * + * @return string|null + */ + public function getSchemaName() + { + return isset($this->table['schema']) ? $this->table['schema'] : null; + } + + /** + * Gets the table name to use for temporary identifier tables of this class. + * + * @return string + */ + public function getTemporaryIdTableName() + { + // replace dots with underscores because PostgreSQL creates temporary tables in a special schema + return str_replace('.', '_', $this->getTableName() . '_id_tmp'); + } + + /** + * Sets the mapped subclasses of this class. + * + * @param array $subclasses The names of all mapped subclasses. + * + * @return void + */ + public function setSubclasses(array $subclasses) + { + foreach ($subclasses as $subclass) { + $this->subClasses[] = $this->fullyQualifiedClassName($subclass); + } + } + + /** + * Sets the parent class names. + * Assumes that the class names in the passed array are in the order: + * directParent -> directParentParent -> directParentParentParent ... -> root. + * + * @param array $classNames + * + * @return void + */ + public function setParentClasses(array $classNames) + { + $this->parentClasses = $classNames; + if (count($classNames) > 0) { + $this->rootEntityName = array_pop($classNames); + } + } + + /** + * Sets the inheritance type used by the class and its subclasses. + * + * @param integer $type + * + * @return void + * + * @throws MappingException + */ + public function setInheritanceType($type) + { + if ( ! $this->_isInheritanceType($type)) { + throw MappingException::invalidInheritanceType($this->name, $type); + } + $this->inheritanceType = $type; + } + + /** + * Sets the association to override association mapping of property for an entity relationship. + * + * @param string $fieldName + * @param array $overrideMapping + * + * @return void + * + * @throws MappingException + */ + public function setAssociationOverride($fieldName, array $overrideMapping) + { + if ( ! isset($this->associationMappings[$fieldName])) { + throw MappingException::invalidOverrideFieldName($this->name, $fieldName); + } + + $mapping = $this->associationMappings[$fieldName]; + + if (isset($overrideMapping['joinColumns'])) { + $mapping['joinColumns'] = $overrideMapping['joinColumns']; + } + + if (isset($overrideMapping['joinTable'])) { + $mapping['joinTable'] = $overrideMapping['joinTable']; + } + + $mapping['joinColumnFieldNames'] = null; + $mapping['joinTableColumns'] = null; + $mapping['sourceToTargetKeyColumns'] = null; + $mapping['relationToSourceKeyColumns'] = null; + $mapping['relationToTargetKeyColumns'] = null; + + switch ($mapping['type']) { + case self::ONE_TO_ONE: + $mapping = $this->_validateAndCompleteOneToOneMapping($mapping); + break; + case self::ONE_TO_MANY: + $mapping = $this->_validateAndCompleteOneToManyMapping($mapping); + break; + case self::MANY_TO_ONE: + $mapping = $this->_validateAndCompleteOneToOneMapping($mapping); + break; + case self::MANY_TO_MANY: + $mapping = $this->_validateAndCompleteManyToManyMapping($mapping); + break; + } + + $this->associationMappings[$fieldName] = $mapping; + } + + /** + * Sets the override for a mapped field. + * + * @param string $fieldName + * @param array $overrideMapping + * + * @return void + * + * @throws MappingException + */ + public function setAttributeOverride($fieldName, array $overrideMapping) + { + if ( ! isset($this->fieldMappings[$fieldName])) { + throw MappingException::invalidOverrideFieldName($this->name, $fieldName); + } + + $mapping = $this->fieldMappings[$fieldName]; + + if (isset($mapping['id'])) { + $overrideMapping['id'] = $mapping['id']; + } + + if ( ! isset($overrideMapping['type']) || $overrideMapping['type'] === null) { + $overrideMapping['type'] = $mapping['type']; + } + + if ( ! isset($overrideMapping['fieldName']) || $overrideMapping['fieldName'] === null) { + $overrideMapping['fieldName'] = $mapping['fieldName']; + } + + if ($overrideMapping['type'] !== $mapping['type']) { + throw MappingException::invalidOverrideFieldType($this->name, $fieldName); + } + + unset($this->fieldMappings[$fieldName]); + unset($this->fieldNames[$mapping['columnName']]); + unset($this->columnNames[$mapping['fieldName']]); + $this->_validateAndCompleteFieldMapping($overrideMapping); + + $this->fieldMappings[$fieldName] = $overrideMapping; + } + + /** + * Checks whether a mapped field is inherited from an entity superclass. + * + * @param string $fieldName + * + * @return bool TRUE if the field is inherited, FALSE otherwise. + */ + public function isInheritedField($fieldName) + { + return isset($this->fieldMappings[$fieldName]['inherited']); + } + + /** + * Checks if this entity is the root in any entity-inheritance-hierarchy. + * + * @return bool + */ + public function isRootEntity() + { + return $this->name == $this->rootEntityName; + } + + /** + * Checks whether a mapped association field is inherited from a superclass. + * + * @param string $fieldName + * + * @return boolean TRUE if the field is inherited, FALSE otherwise. + */ + public function isInheritedAssociation($fieldName) + { + return isset($this->associationMappings[$fieldName]['inherited']); + } + + public function isInheritedEmbeddedClass($fieldName) + { + return isset($this->embeddedClasses[$fieldName]['inherited']); + } + + /** + * Sets the name of the primary table the class is mapped to. + * + * @param string $tableName The table name. + * + * @return void + * + * @deprecated Use {@link setPrimaryTable}. + */ + public function setTableName($tableName) + { + $this->table['name'] = $tableName; + } + + /** + * Sets the primary table definition. The provided array supports the + * following structure: + * + * name => (optional, defaults to class name) + * indexes => array of indexes (optional) + * uniqueConstraints => array of constraints (optional) + * + * If a key is omitted, the current value is kept. + * + * @param array $table The table description. + * + * @return void + */ + public function setPrimaryTable(array $table) + { + if (isset($table['name'])) { + // Split schema and table name from a table name like "myschema.mytable" + if (strpos($table['name'], '.') !== false) { + list($this->table['schema'], $table['name']) = explode('.', $table['name'], 2); + } + + if ($table['name'][0] === '`') { + $table['name'] = trim($table['name'], '`'); + $this->table['quoted'] = true; + } + + $this->table['name'] = $table['name']; + } + + if (isset($table['schema'])) { + $this->table['schema'] = $table['schema']; + } + + if (isset($table['indexes'])) { + $this->table['indexes'] = $table['indexes']; + } + + if (isset($table['uniqueConstraints'])) { + $this->table['uniqueConstraints'] = $table['uniqueConstraints']; + } + + if (isset($table['options'])) { + $this->table['options'] = $table['options']; + } + } + + /** + * Checks whether the given type identifies an inheritance type. + * + * @param integer $type + * + * @return boolean TRUE if the given type identifies an inheritance type, FALSe otherwise. + */ + private function _isInheritanceType($type) + { + return $type == self::INHERITANCE_TYPE_NONE || + $type == self::INHERITANCE_TYPE_SINGLE_TABLE || + $type == self::INHERITANCE_TYPE_JOINED || + $type == self::INHERITANCE_TYPE_TABLE_PER_CLASS; + } + + /** + * Adds a mapped field to the class. + * + * @param array $mapping The field mapping. + * + * @return void + * + * @throws MappingException + */ + public function mapField(array $mapping) + { + $this->_validateAndCompleteFieldMapping($mapping); + $this->assertFieldNotMapped($mapping['fieldName']); + + $this->fieldMappings[$mapping['fieldName']] = $mapping; + } + + /** + * INTERNAL: + * Adds an association mapping without completing/validating it. + * This is mainly used to add inherited association mappings to derived classes. + * + * @param array $mapping + * + * @return void + * + * @throws MappingException + */ + public function addInheritedAssociationMapping(array $mapping/*, $owningClassName = null*/) + { + if (isset($this->associationMappings[$mapping['fieldName']])) { + throw MappingException::duplicateAssociationMapping($this->name, $mapping['fieldName']); + } + $this->associationMappings[$mapping['fieldName']] = $mapping; + } + + /** + * INTERNAL: + * Adds a field mapping without completing/validating it. + * This is mainly used to add inherited field mappings to derived classes. + * + * @param array $fieldMapping + * + * @return void + */ + public function addInheritedFieldMapping(array $fieldMapping) + { + $this->fieldMappings[$fieldMapping['fieldName']] = $fieldMapping; + $this->columnNames[$fieldMapping['fieldName']] = $fieldMapping['columnName']; + $this->fieldNames[$fieldMapping['columnName']] = $fieldMapping['fieldName']; + } + + /** + * INTERNAL: + * Adds a named query to this class. + * + * @param array $queryMapping + * + * @return void + * + * @throws MappingException + */ + public function addNamedQuery(array $queryMapping) + { + if (!isset($queryMapping['name'])) { + throw MappingException::nameIsMandatoryForQueryMapping($this->name); + } + + if (isset($this->namedQueries[$queryMapping['name']])) { + throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); + } + + if (!isset($queryMapping['query'])) { + throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); + } + + $name = $queryMapping['name']; + $query = $queryMapping['query']; + $dql = str_replace('__CLASS__', $this->name, $query); + $this->namedQueries[$name] = array( + 'name' => $name, + 'query' => $query, + 'dql' => $dql + ); + } + + /** + * INTERNAL: + * Adds a named native query to this class. + * + * @param array $queryMapping + * + * @return void + * + * @throws MappingException + */ + public function addNamedNativeQuery(array $queryMapping) + { + if (!isset($queryMapping['name'])) { + throw MappingException::nameIsMandatoryForQueryMapping($this->name); + } + + if (isset($this->namedNativeQueries[$queryMapping['name']])) { + throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); + } + + if (!isset($queryMapping['query'])) { + throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); + } + + if (!isset($queryMapping['resultClass']) && !isset($queryMapping['resultSetMapping'])) { + throw MappingException::missingQueryMapping($this->name, $queryMapping['name']); + } + + $queryMapping['isSelfClass'] = false; + if (isset($queryMapping['resultClass'])) { + + if ($queryMapping['resultClass'] === '__CLASS__') { + + $queryMapping['isSelfClass'] = true; + $queryMapping['resultClass'] = $this->name; + } + + $queryMapping['resultClass'] = $this->fullyQualifiedClassName($queryMapping['resultClass']); + $queryMapping['resultClass'] = ltrim($queryMapping['resultClass'], '\\'); + } + + $this->namedNativeQueries[$queryMapping['name']] = $queryMapping; + } + + /** + * INTERNAL: + * Adds a sql result set mapping to this class. + * + * @param array $resultMapping + * + * @return void + * + * @throws MappingException + */ + public function addSqlResultSetMapping(array $resultMapping) + { + if (!isset($resultMapping['name'])) { + throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->name); + } + + if (isset($this->sqlResultSetMappings[$resultMapping['name']])) { + throw MappingException::duplicateResultSetMapping($this->name, $resultMapping['name']); + } + + if (isset($resultMapping['entities'])) { + foreach ($resultMapping['entities'] as $key => $entityResult) { + if (!isset($entityResult['entityClass'])) { + throw MappingException::missingResultSetMappingEntity($this->name, $resultMapping['name']); + } + + $entityResult['isSelfClass'] = false; + if ($entityResult['entityClass'] === '__CLASS__') { + + $entityResult['isSelfClass'] = true; + $entityResult['entityClass'] = $this->name; + + } + + $entityResult['entityClass'] = $this->fullyQualifiedClassName($entityResult['entityClass']); + + $resultMapping['entities'][$key]['entityClass'] = ltrim($entityResult['entityClass'], '\\'); + $resultMapping['entities'][$key]['isSelfClass'] = $entityResult['isSelfClass']; + + if (isset($entityResult['fields'])) { + foreach ($entityResult['fields'] as $k => $field) { + if (!isset($field['name'])) { + throw MappingException::missingResultSetMappingFieldName($this->name, $resultMapping['name']); + } + + if (!isset($field['column'])) { + $fieldName = $field['name']; + if (strpos($fieldName, '.')) { + list(, $fieldName) = explode('.', $fieldName); + } + + $resultMapping['entities'][$key]['fields'][$k]['column'] = $fieldName; + } + } + } + } + } + + $this->sqlResultSetMappings[$resultMapping['name']] = $resultMapping; + } + + /** + * Adds a one-to-one mapping. + * + * @param array $mapping The mapping. + * + * @return void + */ + public function mapOneToOne(array $mapping) + { + $mapping['type'] = self::ONE_TO_ONE; + $mapping = $this->_validateAndCompleteOneToOneMapping($mapping); + $this->_storeAssociationMapping($mapping); + } + + /** + * Adds a one-to-many mapping. + * + * @param array $mapping The mapping. + * + * @return void + */ + public function mapOneToMany(array $mapping) + { + $mapping['type'] = self::ONE_TO_MANY; + $mapping = $this->_validateAndCompleteOneToManyMapping($mapping); + $this->_storeAssociationMapping($mapping); + } + + /** + * Adds a many-to-one mapping. + * + * @param array $mapping The mapping. + * + * @return void + */ + public function mapManyToOne(array $mapping) + { + $mapping['type'] = self::MANY_TO_ONE; + // A many-to-one mapping is essentially a one-one backreference + $mapping = $this->_validateAndCompleteOneToOneMapping($mapping); + $this->_storeAssociationMapping($mapping); + } + + /** + * Adds a many-to-many mapping. + * + * @param array $mapping The mapping. + * + * @return void + */ + public function mapManyToMany(array $mapping) + { + $mapping['type'] = self::MANY_TO_MANY; + $mapping = $this->_validateAndCompleteManyToManyMapping($mapping); + $this->_storeAssociationMapping($mapping); + } + + /** + * Stores the association mapping. + * + * @param array $assocMapping + * + * @return void + * + * @throws MappingException + */ + protected function _storeAssociationMapping(array $assocMapping) + { + $sourceFieldName = $assocMapping['fieldName']; + + $this->assertFieldNotMapped($sourceFieldName); + + $this->associationMappings[$sourceFieldName] = $assocMapping; + } + + /** + * Registers a custom repository class for the entity class. + * + * @param string $repositoryClassName The class name of the custom mapper. + * + * @return void + */ + public function setCustomRepositoryClass($repositoryClassName) + { + $this->customRepositoryClassName = $this->fullyQualifiedClassName($repositoryClassName); + } + + /** + * Dispatches the lifecycle event of the given entity to the registered + * lifecycle callbacks and lifecycle listeners. + * + * @deprecated Deprecated since version 2.4 in favor of \Doctrine\ORM\Event\ListenersInvoker + * + * @param string $lifecycleEvent The lifecycle event. + * @param object $entity The Entity on which the event occurred. + * + * @return void + */ + public function invokeLifecycleCallbacks($lifecycleEvent, $entity) + { + foreach ($this->lifecycleCallbacks[$lifecycleEvent] as $callback) { + $entity->$callback(); + } + } + + /** + * Whether the class has any attached lifecycle listeners or callbacks for a lifecycle event. + * + * @param string $lifecycleEvent + * + * @return boolean + */ + public function hasLifecycleCallbacks($lifecycleEvent) + { + return isset($this->lifecycleCallbacks[$lifecycleEvent]); + } + + /** + * Gets the registered lifecycle callbacks for an event. + * + * @param string $event + * + * @return array + */ + public function getLifecycleCallbacks($event) + { + return isset($this->lifecycleCallbacks[$event]) ? $this->lifecycleCallbacks[$event] : array(); + } + + /** + * Adds a lifecycle callback for entities of this class. + * + * @param string $callback + * @param string $event + * + * @return void + */ + public function addLifecycleCallback($callback, $event) + { + if (isset($this->lifecycleCallbacks[$event]) && in_array($callback, $this->lifecycleCallbacks[$event])) { + return; + } + + $this->lifecycleCallbacks[$event][] = $callback; + } + + /** + * Sets the lifecycle callbacks for entities of this class. + * Any previously registered callbacks are overwritten. + * + * @param array $callbacks + * + * @return void + */ + public function setLifecycleCallbacks(array $callbacks) + { + $this->lifecycleCallbacks = $callbacks; + } + + /** + * Adds a entity listener for entities of this class. + * + * @param string $eventName The entity lifecycle event. + * @param string $class The listener class. + * @param string $method The listener callback method. + * + * @throws \Doctrine\ORM\Mapping\MappingException + */ + public function addEntityListener($eventName, $class, $method) + { + $class = $this->fullyQualifiedClassName($class); + $listener = array( + 'class' => $class, + 'method' => $method + ); + + if ( ! class_exists($class)) { + throw MappingException::entityListenerClassNotFound($class, $this->name); + } + + if ( ! method_exists($class, $method)) { + throw MappingException::entityListenerMethodNotFound($class, $method, $this->name); + } + + if (isset($this->entityListeners[$eventName]) && in_array($listener, $this->entityListeners[$eventName])) { + throw MappingException::duplicateEntityListener($class, $method, $this->name); + } + + $this->entityListeners[$eventName][] = $listener; + } + + /** + * Sets the discriminator column definition. + * + * @param array $columnDef + * + * @return void + * + * @throws MappingException + * + * @see getDiscriminatorColumn() + */ + public function setDiscriminatorColumn($columnDef) + { + if ($columnDef !== null) { + if ( ! isset($columnDef['name'])) { + throw MappingException::nameIsMandatoryForDiscriminatorColumns($this->name); + } + + if (isset($this->fieldNames[$columnDef['name']])) { + throw MappingException::duplicateColumnName($this->name, $columnDef['name']); + } + + if ( ! isset($columnDef['fieldName'])) { + $columnDef['fieldName'] = $columnDef['name']; + } + + if ( ! isset($columnDef['type'])) { + $columnDef['type'] = "string"; + } + + if (in_array($columnDef['type'], array("boolean", "array", "object", "datetime", "time", "date"))) { + throw MappingException::invalidDiscriminatorColumnType($this->name, $columnDef['type']); + } + + $this->discriminatorColumn = $columnDef; + } + } + + /** + * Sets the discriminator values used by this class. + * Used for JOINED and SINGLE_TABLE inheritance mapping strategies. + * + * @param array $map + * + * @return void + */ + public function setDiscriminatorMap(array $map) + { + foreach ($map as $value => $className) { + $this->addDiscriminatorMapClass($value, $className); + } + } + + /** + * Adds one entry of the discriminator map with a new class and corresponding name. + * + * @param string $name + * @param string $className + * + * @return void + * + * @throws MappingException + */ + public function addDiscriminatorMapClass($name, $className) + { + $className = $this->fullyQualifiedClassName($className); + $className = ltrim($className, '\\'); + $this->discriminatorMap[$name] = $className; + + if ($this->name === $className) { + $this->discriminatorValue = $name; + + return; + } + + if ( ! (class_exists($className) || interface_exists($className))) { + throw MappingException::invalidClassInDiscriminatorMap($className, $this->name); + } + + if (is_subclass_of($className, $this->name) && ! in_array($className, $this->subClasses)) { + $this->subClasses[] = $className; + } + } + + /** + * Checks whether the class has a named query with the given query name. + * + * @param string $queryName + * + * @return boolean + */ + public function hasNamedQuery($queryName) + { + return isset($this->namedQueries[$queryName]); + } + + /** + * Checks whether the class has a named native query with the given query name. + * + * @param string $queryName + * + * @return boolean + */ + public function hasNamedNativeQuery($queryName) + { + return isset($this->namedNativeQueries[$queryName]); + } + + /** + * Checks whether the class has a named native query with the given query name. + * + * @param string $name + * + * @return boolean + */ + public function hasSqlResultSetMapping($name) + { + return isset($this->sqlResultSetMappings[$name]); + } + + /** + * {@inheritDoc} + */ + public function hasAssociation($fieldName) + { + return isset($this->associationMappings[$fieldName]); + } + + /** + * {@inheritDoc} + */ + public function isSingleValuedAssociation($fieldName) + { + return isset($this->associationMappings[$fieldName]) && + ($this->associationMappings[$fieldName]['type'] & self::TO_ONE); + } + + /** + * {@inheritDoc} + */ + public function isCollectionValuedAssociation($fieldName) + { + return isset($this->associationMappings[$fieldName]) && + ! ($this->associationMappings[$fieldName]['type'] & self::TO_ONE); + } + + /** + * Is this an association that only has a single join column? + * + * @param string $fieldName + * + * @return bool + */ + public function isAssociationWithSingleJoinColumn($fieldName) + { + return ( + isset($this->associationMappings[$fieldName]) && + isset($this->associationMappings[$fieldName]['joinColumns'][0]) && + !isset($this->associationMappings[$fieldName]['joinColumns'][1]) + ); + } + + /** + * Returns the single association join column (if any). + * + * @param string $fieldName + * + * @return string + * + * @throws MappingException + */ + public function getSingleAssociationJoinColumnName($fieldName) + { + if ( ! $this->isAssociationWithSingleJoinColumn($fieldName)) { + throw MappingException::noSingleAssociationJoinColumnFound($this->name, $fieldName); + } + return $this->associationMappings[$fieldName]['joinColumns'][0]['name']; + } + + /** + * Returns the single association referenced join column name (if any). + * + * @param string $fieldName + * + * @return string + * + * @throws MappingException + */ + public function getSingleAssociationReferencedJoinColumnName($fieldName) + { + if ( ! $this->isAssociationWithSingleJoinColumn($fieldName)) { + throw MappingException::noSingleAssociationJoinColumnFound($this->name, $fieldName); + } + return $this->associationMappings[$fieldName]['joinColumns'][0]['referencedColumnName']; + } + + /** + * Used to retrieve a fieldname for either field or association from a given column. + * + * This method is used in foreign-key as primary-key contexts. + * + * @param string $columnName + * + * @return string + * + * @throws MappingException + */ + public function getFieldForColumn($columnName) + { + if (isset($this->fieldNames[$columnName])) { + return $this->fieldNames[$columnName]; + } else { + foreach ($this->associationMappings as $assocName => $mapping) { + if ($this->isAssociationWithSingleJoinColumn($assocName) && + $this->associationMappings[$assocName]['joinColumns'][0]['name'] == $columnName) { + + return $assocName; + } + } + + throw MappingException::noFieldNameFoundForColumn($this->name, $columnName); + } + } + + /** + * Sets the ID generator used to generate IDs for instances of this class. + * + * @param \Doctrine\ORM\Id\AbstractIdGenerator $generator + * + * @return void + */ + public function setIdGenerator($generator) + { + $this->idGenerator = $generator; + } + + /** + * Sets definition. + * + * @param array $definition + * + * @return void + */ + public function setCustomGeneratorDefinition(array $definition) + { + $this->customGeneratorDefinition = $definition; + } + + /** + * Sets the definition of the sequence ID generator for this class. + * + * The definition must have the following structure: + * + * array( + * 'sequenceName' => 'name', + * 'allocationSize' => 20, + * 'initialValue' => 1 + * 'quoted' => 1 + * ) + * + * + * @param array $definition + * + * @return void + */ + public function setSequenceGeneratorDefinition(array $definition) + { + if ( ! isset($definition['sequenceName'])) { + throw MappingException::missingSequenceName($this->name); + } + + if ($definition['sequenceName'][0] == '`') { + $definition['sequenceName'] = trim($definition['sequenceName'], '`'); + $definition['quoted'] = true; + } + + $this->sequenceGeneratorDefinition = $definition; + } + + /** + * Sets the version field mapping used for versioning. Sets the default + * value to use depending on the column type. + * + * @param array $mapping The version field mapping array. + * + * @return void + * + * @throws MappingException + */ + public function setVersionMapping(array &$mapping) + { + $this->isVersioned = true; + $this->versionField = $mapping['fieldName']; + + if ( ! isset($mapping['default'])) { + if (in_array($mapping['type'], array('integer', 'bigint', 'smallint'))) { + $mapping['default'] = 1; + } else if ($mapping['type'] == 'datetime') { + $mapping['default'] = 'CURRENT_TIMESTAMP'; + } else { + throw MappingException::unsupportedOptimisticLockingType($this->name, $mapping['fieldName'], $mapping['type']); + } + } + } + + /** + * Sets whether this class is to be versioned for optimistic locking. + * + * @param boolean $bool + * + * @return void + */ + public function setVersioned($bool) + { + $this->isVersioned = $bool; + } + + /** + * Sets the name of the field that is to be used for versioning if this class is + * versioned for optimistic locking. + * + * @param string $versionField + * + * @return void + */ + public function setVersionField($versionField) + { + $this->versionField = $versionField; + } + + /** + * Marks this class as read only, no change tracking is applied to it. + * + * @return void + */ + public function markReadOnly() + { + $this->isReadOnly = true; + } + + /** + * {@inheritDoc} + */ + public function getFieldNames() + { + return array_keys($this->fieldMappings); + } + + /** + * {@inheritDoc} + */ + public function getAssociationNames() + { + return array_keys($this->associationMappings); + } + + /** + * {@inheritDoc} + * + * @throws InvalidArgumentException + */ + public function getAssociationTargetClass($assocName) + { + if ( ! isset($this->associationMappings[$assocName])) { + throw new InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association."); + } + + return $this->associationMappings[$assocName]['targetEntity']; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return $this->name; + } + + /** + * Gets the (possibly quoted) identifier column names for safe use in an SQL statement. + * + * @deprecated Deprecated since version 2.3 in favor of \Doctrine\ORM\Mapping\QuoteStrategy + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return array + */ + public function getQuotedIdentifierColumnNames($platform) + { + $quotedColumnNames = array(); + + foreach ($this->identifier as $idProperty) { + if (isset($this->fieldMappings[$idProperty])) { + $quotedColumnNames[] = isset($this->fieldMappings[$idProperty]['quoted']) + ? $platform->quoteIdentifier($this->fieldMappings[$idProperty]['columnName']) + : $this->fieldMappings[$idProperty]['columnName']; + + continue; + } + + // Association defined as Id field + $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; + $assocQuotedColumnNames = array_map( + function ($joinColumn) use ($platform) { + return isset($joinColumn['quoted']) + ? $platform->quoteIdentifier($joinColumn['name']) + : $joinColumn['name']; + }, + $joinColumns + ); + + $quotedColumnNames = array_merge($quotedColumnNames, $assocQuotedColumnNames); + } + + return $quotedColumnNames; + } + + /** + * Gets the (possibly quoted) column name of a mapped field for safe use in an SQL statement. + * + * @deprecated Deprecated since version 2.3 in favor of \Doctrine\ORM\Mapping\QuoteStrategy + * + * @param string $field + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return string + */ + public function getQuotedColumnName($field, $platform) + { + return isset($this->fieldMappings[$field]['quoted']) + ? $platform->quoteIdentifier($this->fieldMappings[$field]['columnName']) + : $this->fieldMappings[$field]['columnName']; + } + + /** + * Gets the (possibly quoted) primary table name of this class for safe use in an SQL statement. + * + * @deprecated Deprecated since version 2.3 in favor of \Doctrine\ORM\Mapping\QuoteStrategy + * + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return string + */ + public function getQuotedTableName($platform) + { + return isset($this->table['quoted']) ? $platform->quoteIdentifier($this->table['name']) : $this->table['name']; + } + + /** + * Gets the (possibly quoted) name of the join table. + * + * @deprecated Deprecated since version 2.3 in favor of \Doctrine\ORM\Mapping\QuoteStrategy + * + * @param array $assoc + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + * + * @return string + */ + public function getQuotedJoinTableName(array $assoc, $platform) + { + return isset($assoc['joinTable']['quoted']) ? $platform->quoteIdentifier($assoc['joinTable']['name']) : $assoc['joinTable']['name']; + } + + /** + * {@inheritDoc} + */ + public function isAssociationInverseSide($fieldName) + { + return isset($this->associationMappings[$fieldName]) && ! $this->associationMappings[$fieldName]['isOwningSide']; + } + + /** + * {@inheritDoc} + */ + public function getAssociationMappedByTargetField($fieldName) + { + return $this->associationMappings[$fieldName]['mappedBy']; + } + + /** + * @param string $targetClass + * + * @return array + */ + public function getAssociationsByTargetClass($targetClass) + { + $relations = array(); + foreach ($this->associationMappings as $mapping) { + if ($mapping['targetEntity'] == $targetClass) { + $relations[$mapping['fieldName']] = $mapping; + } + } + return $relations; + } + + /** + * @param string|null $className + * @return string|null null if the input value is null + */ + public function fullyQualifiedClassName($className) + { + if (empty($className)) { + return $className; + } + + if ($className !== null && strpos($className, '\\') === false && strlen($this->namespace) > 0) { + return $this->namespace . '\\' . $className; + } + + return $className; + } + + /** + * @param string $name + * + * @return mixed + */ + public function getMetadataValue($name) { + + if (isset($this->$name)) { + return $this->$name; + } + + return null; + } + + /** + * Map Embedded Class + * + * @param array $mapping + * @throws MappingException + * @return void + */ + public function mapEmbedded(array $mapping) + { + $this->assertFieldNotMapped($mapping['fieldName']); + + $this->embeddedClasses[$mapping['fieldName']] = array( + 'class' => $this->fullyQualifiedClassName($mapping['class']), + 'columnPrefix' => $mapping['columnPrefix'], + 'declaredField' => isset($mapping['declaredField']) ? $mapping['declaredField'] : null, + 'originalField' => isset($mapping['originalField']) ? $mapping['originalField'] : null, + ); + } + + /** + * Inline the embeddable class + * + * @param string $property + * @param ClassMetadataInfo $embeddable + */ + public function inlineEmbeddable($property, ClassMetadataInfo $embeddable) + { + foreach ($embeddable->fieldMappings as $fieldMapping) { + $fieldMapping['originalClass'] = isset($fieldMapping['originalClass']) + ? $fieldMapping['originalClass'] + : $embeddable->name; + $fieldMapping['declaredField'] = isset($fieldMapping['declaredField']) + ? $property . '.' . $fieldMapping['declaredField'] + : $property; + $fieldMapping['originalField'] = isset($fieldMapping['originalField']) + ? $fieldMapping['originalField'] + : $fieldMapping['fieldName']; + $fieldMapping['fieldName'] = $property . "." . $fieldMapping['fieldName']; + + if (! empty($this->embeddedClasses[$property]['columnPrefix'])) { + $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'] . $fieldMapping['columnName']; + } elseif ($this->embeddedClasses[$property]['columnPrefix'] !== false) { + $fieldMapping['columnName'] = $this->namingStrategy + ->embeddedFieldToColumnName( + $property, + $fieldMapping['columnName'], + $this->reflClass->name, + $embeddable->reflClass->name + ); + } + + $this->mapField($fieldMapping); + } + } + + /** + * @param string $fieldName + * @throws MappingException + */ + private function assertFieldNotMapped($fieldName) + { + if (isset($this->fieldMappings[$fieldName]) || + isset($this->associationMappings[$fieldName]) || + isset($this->embeddedClasses[$fieldName])) { + + throw MappingException::duplicateFieldMapping($this->name, $fieldName); + } + } + + /** + * Gets the sequence name based on class metadata. + * + * @param AbstractPlatform $platform + * @return string + * + * @todo Sequence names should be computed in DBAL depending on the platform + */ + public function getSequenceName(AbstractPlatform $platform) + { + $sequencePrefix = $this->getSequencePrefix($platform); + + $columnName = $this->getSingleIdentifierColumnName(); + $sequenceName = $sequencePrefix . '_' . $columnName . '_seq'; + + return $sequenceName; + } + + /** + * Gets the sequence name prefix based on class metadata. + * + * @param AbstractPlatform $platform + * @return string + * + * @todo Sequence names should be computed in DBAL depending on the platform + */ + public function getSequencePrefix(AbstractPlatform $platform) + { + $tableName = $this->getTableName(); + $sequencePrefix = $tableName; + + // Prepend the schema name to the table name if there is one + if ($schemaName = $this->getSchemaName()) { + $sequencePrefix = $schemaName . '.' . $tableName; + + if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) { + $sequencePrefix = $schemaName . '__' . $tableName; + } + } + + return $sequencePrefix; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Column.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Column.php new file mode 100644 index 0000000000000000000000000000000000000000..70337323f6f0066fc802c9a841c1f3f3fa00993c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Column.php @@ -0,0 +1,76 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target({"PROPERTY","ANNOTATION"}) + */ +final class Column implements Annotation +{ + /** + * @var string + */ + public $name; + + /** + * @var mixed + */ + public $type = 'string'; + + /** + * @var integer + */ + public $length; + + /** + * The precision for a decimal (exact numeric) column (Applies only for decimal column). + * + * @var integer + */ + public $precision = 0; + + /** + * The scale for a decimal (exact numeric) column (Applies only for decimal column). + * + * @var integer + */ + public $scale = 0; + + /** + * @var boolean + */ + public $unique = false; + + /** + * @var boolean + */ + public $nullable = false; + + /** + * @var array + */ + public $options = array(); + + /** + * @var string + */ + public $columnDefinition; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ColumnResult.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ColumnResult.php new file mode 100644 index 0000000000000000000000000000000000000000..a164c85c0ee1272ff5d29f2e6481840828e1c085 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ColumnResult.php @@ -0,0 +1,40 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * References name of a column in the SELECT clause of a SQL query. + * Scalar result types can be included in the query result by specifying this annotation in the metadata. + * + * @author Fabio B. Silva + * @since 2.3 + * + * @Annotation + * @Target("ANNOTATION") + */ +final class ColumnResult implements Annotation +{ + /** + * The name of a column in the SELECT clause of a SQL query. + * + * @var string + */ + public $name; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/CustomIdGenerator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/CustomIdGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..41e200e12a768503fbcdba2cc4dfcb50402049b0 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/CustomIdGenerator.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("PROPERTY") + */ +final class CustomIdGenerator implements Annotation +{ + /** + * @var string + */ + public $class; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DefaultEntityListenerResolver.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DefaultEntityListenerResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..75658547e17da94c343fa0aaf15ab7202e983b6f --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DefaultEntityListenerResolver.php @@ -0,0 +1,75 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * The default DefaultEntityListener + * + * @since 2.4 + * @author Fabio B. Silva + */ +class DefaultEntityListenerResolver implements EntityListenerResolver +{ + /** + * @var array Map to store entity listener instances. + */ + private $instances = array(); + + /** + * {@inheritdoc} + */ + public function clear($className = null) + { + if ($className === null) { + $this->instances = array(); + + return; + } + + if (isset($this->instances[$className = trim($className, '\\')])) { + unset($this->instances[$className]); + } + } + + /** + * {@inheritdoc} + */ + public function register($object) + { + if ( ! is_object($object)) { + throw new \InvalidArgumentException(sprintf('An object was expected, but got "%s".', gettype($object))); + } + + $this->instances[get_class($object)] = $object; + } + + /** + * {@inheritdoc} + */ + public function resolve($className) + { + if (isset($this->instances[$className = trim($className, '\\')])) { + return $this->instances[$className]; + } + + return $this->instances[$className] = new $className(); + } +} \ No newline at end of file diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DefaultNamingStrategy.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DefaultNamingStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..1e75f9794516c1ae783f338db48b868ec21dd567 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DefaultNamingStrategy.php @@ -0,0 +1,94 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * The default NamingStrategy + * + * + * @link www.doctrine-project.org + * @since 2.3 + * @author Fabio B. Silva + */ +class DefaultNamingStrategy implements NamingStrategy +{ + /** + * {@inheritdoc} + */ + public function classToTableName($className) + { + if (strpos($className, '\\') !== false) { + return substr($className, strrpos($className, '\\') + 1); + } + + return $className; + } + + /** + * {@inheritdoc} + */ + public function propertyToColumnName($propertyName, $className = null) + { + return $propertyName; + } + + /** + * {@inheritdoc} + */ + public function embeddedFieldToColumnName($propertyName, $embeddedColumnName, $className = null, $embeddedClassName = null) + { + return $propertyName.'_'.$embeddedColumnName; + } + + /** + * {@inheritdoc} + */ + public function referenceColumnName() + { + return 'id'; + } + + /** + * {@inheritdoc} + */ + public function joinColumnName($propertyName, $className = null) + { + return $propertyName . '_' . $this->referenceColumnName(); + } + + /** + * {@inheritdoc} + */ + public function joinTableName($sourceEntity, $targetEntity, $propertyName = null) + { + return strtolower($this->classToTableName($sourceEntity) . '_' . + $this->classToTableName($targetEntity)); + } + + /** + * {@inheritdoc} + */ + public function joinKeyColumnName($entityName, $referencedColumnName = null) + { + return strtolower($this->classToTableName($entityName) . '_' . + ($referencedColumnName ?: $this->referenceColumnName())); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DefaultQuoteStrategy.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DefaultQuoteStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..dfbded8a4a9b0feab05f463073a4602914fcdab6 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DefaultQuoteStrategy.php @@ -0,0 +1,163 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * A set of rules for determining the physical column, alias and table quotes + * + * @since 2.3 + * @author Fabio B. Silva + */ +class DefaultQuoteStrategy implements QuoteStrategy +{ + /** + * {@inheritdoc} + */ + public function getColumnName($fieldName, ClassMetadata $class, AbstractPlatform $platform) + { + return isset($class->fieldMappings[$fieldName]['quoted']) + ? $platform->quoteIdentifier($class->fieldMappings[$fieldName]['columnName']) + : $class->fieldMappings[$fieldName]['columnName']; + } + + /** + * {@inheritdoc} + * + * @todo Table names should be computed in DBAL depending on the platform + */ + public function getTableName(ClassMetadata $class, AbstractPlatform $platform) + { + $tableName = $class->table['name']; + + if ( ! empty($class->table['schema'])) { + $tableName = $class->table['schema'] . '.' . $class->table['name']; + + if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) { + $tableName = $class->table['schema'] . '__' . $class->table['name']; + } + } + + return isset($class->table['quoted']) + ? $platform->quoteIdentifier($tableName) + : $tableName; + } + + /** + * {@inheritdoc} + */ + public function getSequenceName(array $definition, ClassMetadata $class, AbstractPlatform $platform) + { + return isset($definition['quoted']) + ? $platform->quoteIdentifier($definition['sequenceName']) + : $definition['sequenceName']; + } + + /** + * {@inheritdoc} + */ + public function getJoinColumnName(array $joinColumn, ClassMetadata $class, AbstractPlatform $platform) + { + return isset($joinColumn['quoted']) + ? $platform->quoteIdentifier($joinColumn['name']) + : $joinColumn['name']; + } + + /** + * {@inheritdoc} + */ + public function getReferencedJoinColumnName(array $joinColumn, ClassMetadata $class, AbstractPlatform $platform) + { + return isset($joinColumn['quoted']) + ? $platform->quoteIdentifier($joinColumn['referencedColumnName']) + : $joinColumn['referencedColumnName']; + } + + /** + * {@inheritdoc} + */ + public function getJoinTableName(array $association, ClassMetadata $class, AbstractPlatform $platform) + { + $schema = ''; + + if (isset($association['joinTable']['schema'])) { + $schema = $association['joinTable']['schema'] . '.'; + } + + $tableName = $association['joinTable']['name']; + + if (isset($association['joinTable']['quoted'])) { + $tableName = $platform->quoteIdentifier($tableName); + } + + return $schema . $tableName; + } + + /** + * {@inheritdoc} + */ + public function getIdentifierColumnNames(ClassMetadata $class, AbstractPlatform $platform) + { + $quotedColumnNames = array(); + + foreach ($class->identifier as $fieldName) { + if (isset($class->fieldMappings[$fieldName])) { + $quotedColumnNames[] = $this->getColumnName($fieldName, $class, $platform); + + continue; + } + + // Association defined as Id field + $joinColumns = $class->associationMappings[$fieldName]['joinColumns']; + $assocQuotedColumnNames = array_map( + function ($joinColumn) use ($platform) + { + return isset($joinColumn['quoted']) + ? $platform->quoteIdentifier($joinColumn['name']) + : $joinColumn['name']; + }, + $joinColumns + ); + + $quotedColumnNames = array_merge($quotedColumnNames, $assocQuotedColumnNames); + } + + return $quotedColumnNames; + } + + /** + * {@inheritdoc} + */ + public function getColumnAlias($columnName, $counter, AbstractPlatform $platform, ClassMetadata $class = null) + { + // 1 ) Concatenate column name and counter + // 2 ) Trim the column alias to the maximum identifier length of the platform. + // If the alias is to long, characters are cut off from the beginning. + // 3 ) Strip non alphanumeric characters + // 4 ) Prefix with "_" if the result its numeric + $columnName = $columnName . '_' . $counter; + $columnName = substr($columnName, -$platform->getMaxIdentifierLength()); + $columnName = preg_replace('/[^A-Za-z0-9_]/', '', $columnName); + $columnName = is_numeric($columnName) ? '_' . $columnName : $columnName; + + return $platform->getSQLResultCasing($columnName); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DiscriminatorColumn.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DiscriminatorColumn.php new file mode 100644 index 0000000000000000000000000000000000000000..97ca7e9b57792b0e141259c34e5780b634459563 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DiscriminatorColumn.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("CLASS") + */ +final class DiscriminatorColumn implements Annotation +{ + /** + * @var string + */ + public $name; + + /** + * @var string + */ + public $type; + + /** + * @var integer + */ + public $length; + + /** + * Field name used in non-object hydration (array/scalar). + * + * @var mixed + */ + public $fieldName; + + /** + * @var string + */ + public $columnDefinition; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DiscriminatorMap.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DiscriminatorMap.php new file mode 100644 index 0000000000000000000000000000000000000000..09d619465cd412bbb7b6ef7587aad36734ae4c2a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/DiscriminatorMap.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("CLASS") + */ +final class DiscriminatorMap implements Annotation +{ + /** + * @var array + */ + public $value; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..df8b7b80c490cf67b40a0cda529db4d7847e8d25 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -0,0 +1,638 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Driver; + +use Doctrine\Common\Annotations\AnnotationReader; +use Doctrine\ORM\Mapping\MappingException; +use Doctrine\ORM\Mapping\JoinColumn; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Builder\EntityListenerBuilder; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Persistence\Mapping\Driver\AnnotationDriver as AbstractAnnotationDriver; +use Doctrine\ORM\Events; + +/** + * The AnnotationDriver reads the mapping metadata from docblock annotations. + * + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +class AnnotationDriver extends AbstractAnnotationDriver +{ + /** + * {@inheritDoc} + */ + protected $entityAnnotationClasses = array( + 'Doctrine\ORM\Mapping\Entity' => 1, + 'Doctrine\ORM\Mapping\MappedSuperclass' => 2, + ); + + /** + * {@inheritDoc} + */ + public function loadMetadataForClass($className, ClassMetadata $metadata) + { + /* @var $metadata \Doctrine\ORM\Mapping\ClassMetadataInfo */ + $class = $metadata->getReflectionClass(); + if ( ! $class) { + // this happens when running annotation driver in combination with + // static reflection services. This is not the nicest fix + $class = new \ReflectionClass($metadata->name); + } + + $classAnnotations = $this->reader->getClassAnnotations($class); + + if ($classAnnotations) { + foreach ($classAnnotations as $key => $annot) { + if ( ! is_numeric($key)) { + continue; + } + + $classAnnotations[get_class($annot)] = $annot; + } + } + + // Evaluate Entity annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\Entity'])) { + $entityAnnot = $classAnnotations['Doctrine\ORM\Mapping\Entity']; + if ($entityAnnot->repositoryClass !== null) { + $metadata->setCustomRepositoryClass($entityAnnot->repositoryClass); + } + if ($entityAnnot->readOnly) { + $metadata->markReadOnly(); + } + } else if (isset($classAnnotations['Doctrine\ORM\Mapping\MappedSuperclass'])) { + $mappedSuperclassAnnot = $classAnnotations['Doctrine\ORM\Mapping\MappedSuperclass']; + $metadata->setCustomRepositoryClass($mappedSuperclassAnnot->repositoryClass); + $metadata->isMappedSuperclass = true; + } else if (isset($classAnnotations['Doctrine\ORM\Mapping\Embeddable'])) { + $metadata->isEmbeddedClass = true; + } else { + throw MappingException::classIsNotAValidEntityOrMappedSuperClass($className); + } + + // Evaluate Table annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\Table'])) { + $tableAnnot = $classAnnotations['Doctrine\ORM\Mapping\Table']; + $primaryTable = array( + 'name' => $tableAnnot->name, + 'schema' => $tableAnnot->schema + ); + + if ($tableAnnot->indexes !== null) { + foreach ($tableAnnot->indexes as $indexAnnot) { + $index = array('columns' => $indexAnnot->columns); + + if ( ! empty($indexAnnot->flags)) { + $index['flags'] = $indexAnnot->flags; + } + + if ( ! empty($indexAnnot->options)) { + $index['options'] = $indexAnnot->options; + } + + if ( ! empty($indexAnnot->name)) { + $primaryTable['indexes'][$indexAnnot->name] = $index; + } else { + $primaryTable['indexes'][] = $index; + } + } + } + + if ($tableAnnot->uniqueConstraints !== null) { + foreach ($tableAnnot->uniqueConstraints as $uniqueConstraintAnnot) { + $uniqueConstraint = array('columns' => $uniqueConstraintAnnot->columns); + + if ( ! empty($uniqueConstraintAnnot->options)) { + $uniqueConstraint['options'] = $uniqueConstraintAnnot->options; + } + + if ( ! empty($uniqueConstraintAnnot->name)) { + $primaryTable['uniqueConstraints'][$uniqueConstraintAnnot->name] = $uniqueConstraint; + } else { + $primaryTable['uniqueConstraints'][] = $uniqueConstraint; + } + } + } + + if ($tableAnnot->options) { + $primaryTable['options'] = $tableAnnot->options; + } + + $metadata->setPrimaryTable($primaryTable); + } + + // Evaluate @Cache annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\Cache'])) { + $cacheAnnot = $classAnnotations['Doctrine\ORM\Mapping\Cache']; + $cacheMap = array( + 'region' => $cacheAnnot->region, + 'usage' => constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $cacheAnnot->usage), + ); + + $metadata->enableCache($cacheMap); + } + + // Evaluate NamedNativeQueries annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\NamedNativeQueries'])) { + $namedNativeQueriesAnnot = $classAnnotations['Doctrine\ORM\Mapping\NamedNativeQueries']; + + foreach ($namedNativeQueriesAnnot->value as $namedNativeQuery) { + $metadata->addNamedNativeQuery(array( + 'name' => $namedNativeQuery->name, + 'query' => $namedNativeQuery->query, + 'resultClass' => $namedNativeQuery->resultClass, + 'resultSetMapping' => $namedNativeQuery->resultSetMapping, + )); + } + } + + // Evaluate SqlResultSetMappings annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\SqlResultSetMappings'])) { + $sqlResultSetMappingsAnnot = $classAnnotations['Doctrine\ORM\Mapping\SqlResultSetMappings']; + + foreach ($sqlResultSetMappingsAnnot->value as $resultSetMapping) { + $entities = array(); + $columns = array(); + foreach ($resultSetMapping->entities as $entityResultAnnot) { + $entityResult = array( + 'fields' => array(), + 'entityClass' => $entityResultAnnot->entityClass, + 'discriminatorColumn' => $entityResultAnnot->discriminatorColumn, + ); + + foreach ($entityResultAnnot->fields as $fieldResultAnnot) { + $entityResult['fields'][] = array( + 'name' => $fieldResultAnnot->name, + 'column' => $fieldResultAnnot->column + ); + } + + $entities[] = $entityResult; + } + + foreach ($resultSetMapping->columns as $columnResultAnnot) { + $columns[] = array( + 'name' => $columnResultAnnot->name, + ); + } + + $metadata->addSqlResultSetMapping(array( + 'name' => $resultSetMapping->name, + 'entities' => $entities, + 'columns' => $columns + )); + } + } + + // Evaluate NamedQueries annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\NamedQueries'])) { + $namedQueriesAnnot = $classAnnotations['Doctrine\ORM\Mapping\NamedQueries']; + + if ( ! is_array($namedQueriesAnnot->value)) { + throw new \UnexpectedValueException("@NamedQueries should contain an array of @NamedQuery annotations."); + } + + foreach ($namedQueriesAnnot->value as $namedQuery) { + if ( ! ($namedQuery instanceof \Doctrine\ORM\Mapping\NamedQuery)) { + throw new \UnexpectedValueException("@NamedQueries should contain an array of @NamedQuery annotations."); + } + $metadata->addNamedQuery(array( + 'name' => $namedQuery->name, + 'query' => $namedQuery->query + )); + } + } + + // Evaluate InheritanceType annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\InheritanceType'])) { + $inheritanceTypeAnnot = $classAnnotations['Doctrine\ORM\Mapping\InheritanceType']; + $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceTypeAnnot->value)); + + if ($metadata->inheritanceType != \Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_NONE) { + // Evaluate DiscriminatorColumn annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\DiscriminatorColumn'])) { + $discrColumnAnnot = $classAnnotations['Doctrine\ORM\Mapping\DiscriminatorColumn']; + $metadata->setDiscriminatorColumn(array( + 'name' => $discrColumnAnnot->name, + 'type' => $discrColumnAnnot->type, + 'length' => $discrColumnAnnot->length, + 'columnDefinition' => $discrColumnAnnot->columnDefinition + )); + } else { + $metadata->setDiscriminatorColumn(array('name' => 'dtype', 'type' => 'string', 'length' => 255)); + } + + // Evaluate DiscriminatorMap annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\DiscriminatorMap'])) { + $discrMapAnnot = $classAnnotations['Doctrine\ORM\Mapping\DiscriminatorMap']; + $metadata->setDiscriminatorMap($discrMapAnnot->value); + } + } + } + + + // Evaluate DoctrineChangeTrackingPolicy annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\ChangeTrackingPolicy'])) { + $changeTrackingAnnot = $classAnnotations['Doctrine\ORM\Mapping\ChangeTrackingPolicy']; + $metadata->setChangeTrackingPolicy(constant('Doctrine\ORM\Mapping\ClassMetadata::CHANGETRACKING_' . $changeTrackingAnnot->value)); + } + + // Evaluate annotations on properties/fields + /* @var $property \ReflectionProperty */ + foreach ($class->getProperties() as $property) { + if ($metadata->isMappedSuperclass && ! $property->isPrivate() + || + $metadata->isInheritedField($property->name) + || + $metadata->isInheritedAssociation($property->name) + || + $metadata->isInheritedEmbeddedClass($property->name)) { + continue; + } + + $mapping = array(); + $mapping['fieldName'] = $property->getName(); + + // Check for JoinColumn/JoinColumns annotations + $joinColumns = array(); + + if ($joinColumnAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\JoinColumn')) { + $joinColumns[] = $this->joinColumnToArray($joinColumnAnnot); + } else if ($joinColumnsAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\JoinColumns')) { + foreach ($joinColumnsAnnot->value as $joinColumn) { + $joinColumns[] = $this->joinColumnToArray($joinColumn); + } + } + + // Field can only be annotated with one of: + // @Column, @OneToOne, @OneToMany, @ManyToOne, @ManyToMany + if ($columnAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\Column')) { + if ($columnAnnot->type == null) { + throw MappingException::propertyTypeIsRequired($className, $property->getName()); + } + + $mapping = $this->columnToArray($property->getName(), $columnAnnot); + + if ($idAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\Id')) { + $mapping['id'] = true; + } + + if ($generatedValueAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\GeneratedValue')) { + $metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . $generatedValueAnnot->strategy)); + } + + if ($this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\Version')) { + $metadata->setVersionMapping($mapping); + } + + $metadata->mapField($mapping); + + // Check for SequenceGenerator/TableGenerator definition + if ($seqGeneratorAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\SequenceGenerator')) { + $metadata->setSequenceGeneratorDefinition(array( + 'sequenceName' => $seqGeneratorAnnot->sequenceName, + 'allocationSize' => $seqGeneratorAnnot->allocationSize, + 'initialValue' => $seqGeneratorAnnot->initialValue + )); + } else if ($this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\TableGenerator')) { + throw MappingException::tableIdGeneratorNotImplemented($className); + } else if ($customGeneratorAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\CustomIdGenerator')) { + $metadata->setCustomGeneratorDefinition(array( + 'class' => $customGeneratorAnnot->class + )); + } + } else if ($oneToOneAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\OneToOne')) { + if ($idAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\Id')) { + $mapping['id'] = true; + } + + $mapping['targetEntity'] = $oneToOneAnnot->targetEntity; + $mapping['joinColumns'] = $joinColumns; + $mapping['mappedBy'] = $oneToOneAnnot->mappedBy; + $mapping['inversedBy'] = $oneToOneAnnot->inversedBy; + $mapping['cascade'] = $oneToOneAnnot->cascade; + $mapping['orphanRemoval'] = $oneToOneAnnot->orphanRemoval; + $mapping['fetch'] = $this->getFetchMode($className, $oneToOneAnnot->fetch); + $metadata->mapOneToOne($mapping); + } else if ($oneToManyAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\OneToMany')) { + $mapping['mappedBy'] = $oneToManyAnnot->mappedBy; + $mapping['targetEntity'] = $oneToManyAnnot->targetEntity; + $mapping['cascade'] = $oneToManyAnnot->cascade; + $mapping['indexBy'] = $oneToManyAnnot->indexBy; + $mapping['orphanRemoval'] = $oneToManyAnnot->orphanRemoval; + $mapping['fetch'] = $this->getFetchMode($className, $oneToManyAnnot->fetch); + + if ($orderByAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\OrderBy')) { + $mapping['orderBy'] = $orderByAnnot->value; + } + + $metadata->mapOneToMany($mapping); + } else if ($manyToOneAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\ManyToOne')) { + if ($idAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\Id')) { + $mapping['id'] = true; + } + + $mapping['joinColumns'] = $joinColumns; + $mapping['cascade'] = $manyToOneAnnot->cascade; + $mapping['inversedBy'] = $manyToOneAnnot->inversedBy; + $mapping['targetEntity'] = $manyToOneAnnot->targetEntity; + $mapping['fetch'] = $this->getFetchMode($className, $manyToOneAnnot->fetch); + $metadata->mapManyToOne($mapping); + } else if ($manyToManyAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\ManyToMany')) { + $joinTable = array(); + + if ($joinTableAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\JoinTable')) { + $joinTable = array( + 'name' => $joinTableAnnot->name, + 'schema' => $joinTableAnnot->schema + ); + + foreach ($joinTableAnnot->joinColumns as $joinColumn) { + $joinTable['joinColumns'][] = $this->joinColumnToArray($joinColumn); + } + + foreach ($joinTableAnnot->inverseJoinColumns as $joinColumn) { + $joinTable['inverseJoinColumns'][] = $this->joinColumnToArray($joinColumn); + } + } + + $mapping['joinTable'] = $joinTable; + $mapping['targetEntity'] = $manyToManyAnnot->targetEntity; + $mapping['mappedBy'] = $manyToManyAnnot->mappedBy; + $mapping['inversedBy'] = $manyToManyAnnot->inversedBy; + $mapping['cascade'] = $manyToManyAnnot->cascade; + $mapping['indexBy'] = $manyToManyAnnot->indexBy; + $mapping['orphanRemoval'] = $manyToManyAnnot->orphanRemoval; + $mapping['fetch'] = $this->getFetchMode($className, $manyToManyAnnot->fetch); + + if ($orderByAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\OrderBy')) { + $mapping['orderBy'] = $orderByAnnot->value; + } + + $metadata->mapManyToMany($mapping); + } else if ($embeddedAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\Embedded')) { + $mapping['class'] = $embeddedAnnot->class; + $mapping['columnPrefix'] = $embeddedAnnot->columnPrefix; + $metadata->mapEmbedded($mapping); + } + + // Evaluate @Cache annotation + if (($cacheAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\Cache')) !== null) { + $metadata->enableAssociationCache($mapping['fieldName'], array( + 'usage' => constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $cacheAnnot->usage), + 'region' => $cacheAnnot->region, + )); + } + } + + // Evaluate AssociationOverrides annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\AssociationOverrides'])) { + $associationOverridesAnnot = $classAnnotations['Doctrine\ORM\Mapping\AssociationOverrides']; + + foreach ($associationOverridesAnnot->value as $associationOverride) { + $override = array(); + $fieldName = $associationOverride->name; + + // Check for JoinColumn/JoinColumns annotations + if ($associationOverride->joinColumns) { + $joinColumns = array(); + foreach ($associationOverride->joinColumns as $joinColumn) { + $joinColumns[] = $this->joinColumnToArray($joinColumn); + } + $override['joinColumns'] = $joinColumns; + } + + // Check for JoinTable annotations + if ($associationOverride->joinTable) { + $joinTableAnnot = $associationOverride->joinTable; + $joinTable = array( + 'name' => $joinTableAnnot->name, + 'schema' => $joinTableAnnot->schema + ); + + foreach ($joinTableAnnot->joinColumns as $joinColumn) { + $joinTable['joinColumns'][] = $this->joinColumnToArray($joinColumn); + } + + foreach ($joinTableAnnot->inverseJoinColumns as $joinColumn) { + $joinTable['inverseJoinColumns'][] = $this->joinColumnToArray($joinColumn); + } + + $override['joinTable'] = $joinTable; + } + + $metadata->setAssociationOverride($fieldName, $override); + } + } + + // Evaluate AttributeOverrides annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\AttributeOverrides'])) { + $attributeOverridesAnnot = $classAnnotations['Doctrine\ORM\Mapping\AttributeOverrides']; + foreach ($attributeOverridesAnnot->value as $attributeOverrideAnnot) { + $attributeOverride = $this->columnToArray($attributeOverrideAnnot->name, $attributeOverrideAnnot->column); + $metadata->setAttributeOverride($attributeOverrideAnnot->name, $attributeOverride); + } + } + + // Evaluate EntityListeners annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\EntityListeners'])) { + $entityListenersAnnot = $classAnnotations['Doctrine\ORM\Mapping\EntityListeners']; + + foreach ($entityListenersAnnot->value as $item) { + $listenerClassName = $metadata->fullyQualifiedClassName($item); + + if ( ! class_exists($listenerClassName)) { + throw MappingException::entityListenerClassNotFound($listenerClassName, $className); + } + + $hasMapping = false; + $listenerClass = new \ReflectionClass($listenerClassName); + /* @var $method \ReflectionMethod */ + foreach ($listenerClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) { + // find method callbacks. + $callbacks = $this->getMethodCallbacks($method); + $hasMapping = $hasMapping ?: ( ! empty($callbacks)); + + foreach ($callbacks as $value) { + $metadata->addEntityListener($value[1], $listenerClassName, $value[0]); + } + } + // Evaluate the listener using naming convention. + if ( ! $hasMapping ) { + EntityListenerBuilder::bindEntityListener($metadata, $listenerClassName); + } + } + } + + // Evaluate @HasLifecycleCallbacks annotation + if (isset($classAnnotations['Doctrine\ORM\Mapping\HasLifecycleCallbacks'])) { + /* @var $method \ReflectionMethod */ + foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) { + + foreach ($this->getMethodCallbacks($method) as $value) { + + $metadata->addLifecycleCallback($value[0], $value[1]); + } + } + } + } + + /** + * Attempts to resolve the fetch mode. + * + * @param string $className The class name. + * @param string $fetchMode The fetch mode. + * + * @return integer The fetch mode as defined in ClassMetadata. + * + * @throws MappingException If the fetch mode is not valid. + */ + private function getFetchMode($className, $fetchMode) + { + if( ! defined('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $fetchMode)) { + throw MappingException::invalidFetchMode($className, $fetchMode); + } + + return constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $fetchMode); + } + + /** + * Parses the given method. + * + * @param \ReflectionMethod $method + * + * @return array + */ + private function getMethodCallbacks(\ReflectionMethod $method) + { + $callbacks = array(); + $annotations = $this->reader->getMethodAnnotations($method); + + foreach ($annotations as $annot) { + if ($annot instanceof \Doctrine\ORM\Mapping\PrePersist) { + $callbacks[] = array($method->name, Events::prePersist); + } + + if ($annot instanceof \Doctrine\ORM\Mapping\PostPersist) { + $callbacks[] = array($method->name, Events::postPersist); + } + + if ($annot instanceof \Doctrine\ORM\Mapping\PreUpdate) { + $callbacks[] = array($method->name, Events::preUpdate); + } + + if ($annot instanceof \Doctrine\ORM\Mapping\PostUpdate) { + $callbacks[] = array($method->name, Events::postUpdate); + } + + if ($annot instanceof \Doctrine\ORM\Mapping\PreRemove) { + $callbacks[] = array($method->name, Events::preRemove); + } + + if ($annot instanceof \Doctrine\ORM\Mapping\PostRemove) { + $callbacks[] = array($method->name, Events::postRemove); + } + + if ($annot instanceof \Doctrine\ORM\Mapping\PostLoad) { + $callbacks[] = array($method->name, Events::postLoad); + } + + if ($annot instanceof \Doctrine\ORM\Mapping\PreFlush) { + $callbacks[] = array($method->name, Events::preFlush); + } + } + + return $callbacks; + } + + /** + * Parse the given JoinColumn as array + * + * @param JoinColumn $joinColumn + * @return array + */ + private function joinColumnToArray(JoinColumn $joinColumn) + { + return array( + 'name' => $joinColumn->name, + 'unique' => $joinColumn->unique, + 'nullable' => $joinColumn->nullable, + 'onDelete' => $joinColumn->onDelete, + 'columnDefinition' => $joinColumn->columnDefinition, + 'referencedColumnName' => $joinColumn->referencedColumnName, + ); + } + + /** + * Parse the given Column as array + * + * @param string $fieldName + * @param Column $column + * + * @return array + */ + private function columnToArray($fieldName, Column $column) + { + $mapping = array( + 'fieldName' => $fieldName, + 'type' => $column->type, + 'scale' => $column->scale, + 'length' => $column->length, + 'unique' => $column->unique, + 'nullable' => $column->nullable, + 'precision' => $column->precision + ); + + if ($column->options) { + $mapping['options'] = $column->options; + } + + if (isset($column->name)) { + $mapping['columnName'] = $column->name; + } + + if (isset($column->columnDefinition)) { + $mapping['columnDefinition'] = $column->columnDefinition; + } + + return $mapping; + } + + /** + * Factory method for the Annotation Driver. + * + * @param array|string $paths + * @param AnnotationReader|null $reader + * + * @return AnnotationDriver + */ + static public function create($paths = array(), AnnotationReader $reader = null) + { + if ($reader == null) { + $reader = new AnnotationReader(); + } + + return new self($reader, $paths); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..e51c15282e82bd532d1abfc11cd328b388cb18aa --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php @@ -0,0 +1,555 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Util\Inflector; +use Doctrine\DBAL\Schema\AbstractSchemaManager; +use Doctrine\DBAL\Schema\SchemaException; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\Column; +use Doctrine\DBAL\Types\Type; +use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\ORM\Mapping\MappingException; + +/** + * The DatabaseDriver reverse engineers the mapping metadata from a database. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Benjamin Eberlei + */ +class DatabaseDriver implements MappingDriver +{ + /** + * @var AbstractSchemaManager + */ + private $_sm; + + /** + * @var array|null + */ + private $tables = null; + + /** + * @var array + */ + private $classToTableNames = array(); + + /** + * @var array + */ + private $manyToManyTables = array(); + + /** + * @var array + */ + private $classNamesForTables = array(); + + /** + * @var array + */ + private $fieldNamesForColumns = array(); + + /** + * The namespace for the generated entities. + * + * @var string|null + */ + private $namespace; + + /** + * @param AbstractSchemaManager $schemaManager + */ + public function __construct(AbstractSchemaManager $schemaManager) + { + $this->_sm = $schemaManager; + } + + /** + * Set the namespace for the generated entities. + * + * @param string $namespace + * + * @return void + */ + public function setNamespace($namespace) + { + $this->namespace = $namespace; + } + + /** + * {@inheritDoc} + */ + public function isTransient($className) + { + return true; + } + + /** + * {@inheritDoc} + */ + public function getAllClassNames() + { + $this->reverseEngineerMappingFromDatabase(); + + return array_keys($this->classToTableNames); + } + + /** + * Sets class name for a table. + * + * @param string $tableName + * @param string $className + * + * @return void + */ + public function setClassNameForTable($tableName, $className) + { + $this->classNamesForTables[$tableName] = $className; + } + + /** + * Sets field name for a column on a specific table. + * + * @param string $tableName + * @param string $columnName + * @param string $fieldName + * + * @return void + */ + public function setFieldNameForColumn($tableName, $columnName, $fieldName) + { + $this->fieldNamesForColumns[$tableName][$columnName] = $fieldName; + } + + /** + * Sets tables manually instead of relying on the reverse engineering capabilities of SchemaManager. + * + * @param array $entityTables + * @param array $manyToManyTables + * + * @return void + */ + public function setTables($entityTables, $manyToManyTables) + { + $this->tables = $this->manyToManyTables = $this->classToTableNames = array(); + + foreach ($entityTables as $table) { + $className = $this->getClassNameForTable($table->getName()); + + $this->classToTableNames[$className] = $table->getName(); + $this->tables[$table->getName()] = $table; + } + + foreach ($manyToManyTables as $table) { + $this->manyToManyTables[$table->getName()] = $table; + } + } + + /** + * {@inheritDoc} + */ + public function loadMetadataForClass($className, ClassMetadata $metadata) + { + $this->reverseEngineerMappingFromDatabase(); + + if ( ! isset($this->classToTableNames[$className])) { + throw new \InvalidArgumentException("Unknown class " . $className); + } + + $tableName = $this->classToTableNames[$className]; + + $metadata->name = $className; + $metadata->table['name'] = $tableName; + + $this->buildIndexes($metadata); + $this->buildFieldMappings($metadata); + $this->buildToOneAssociationMappings($metadata); + + foreach ($this->manyToManyTables as $manyTable) { + foreach ($manyTable->getForeignKeys() as $foreignKey) { + // foreign key maps to the table of the current entity, many to many association probably exists + if ( ! (strtolower($tableName) === strtolower($foreignKey->getForeignTableName()))) { + continue; + } + + $myFk = $foreignKey; + $otherFk = null; + + foreach ($manyTable->getForeignKeys() as $foreignKey) { + if ($foreignKey != $myFk) { + $otherFk = $foreignKey; + break; + } + } + + if ( ! $otherFk) { + // the definition of this many to many table does not contain + // enough foreign key information to continue reverse engineering. + continue; + } + + $localColumn = current($myFk->getColumns()); + + $associationMapping = array(); + $associationMapping['fieldName'] = $this->getFieldNameForColumn($manyTable->getName(), current($otherFk->getColumns()), true); + $associationMapping['targetEntity'] = $this->getClassNameForTable($otherFk->getForeignTableName()); + + if (current($manyTable->getColumns())->getName() == $localColumn) { + $associationMapping['inversedBy'] = $this->getFieldNameForColumn($manyTable->getName(), current($myFk->getColumns()), true); + $associationMapping['joinTable'] = array( + 'name' => strtolower($manyTable->getName()), + 'joinColumns' => array(), + 'inverseJoinColumns' => array(), + ); + + $fkCols = $myFk->getForeignColumns(); + $cols = $myFk->getColumns(); + + for ($i = 0; $i < count($cols); $i++) { + $associationMapping['joinTable']['joinColumns'][] = array( + 'name' => $cols[$i], + 'referencedColumnName' => $fkCols[$i], + ); + } + + $fkCols = $otherFk->getForeignColumns(); + $cols = $otherFk->getColumns(); + + for ($i = 0; $i < count($cols); $i++) { + $associationMapping['joinTable']['inverseJoinColumns'][] = array( + 'name' => $cols[$i], + 'referencedColumnName' => $fkCols[$i], + ); + } + } else { + $associationMapping['mappedBy'] = $this->getFieldNameForColumn($manyTable->getName(), current($myFk->getColumns()), true); + } + + $metadata->mapManyToMany($associationMapping); + + break; + } + } + } + + /** + * @return void + * + * @throws \Doctrine\ORM\Mapping\MappingException + */ + private function reverseEngineerMappingFromDatabase() + { + if ($this->tables !== null) { + return; + } + + $tables = array(); + + foreach ($this->_sm->listTableNames() as $tableName) { + $tables[$tableName] = $this->_sm->listTableDetails($tableName); + } + + $this->tables = $this->manyToManyTables = $this->classToTableNames = array(); + + foreach ($tables as $tableName => $table) { + $foreignKeys = ($this->_sm->getDatabasePlatform()->supportsForeignKeyConstraints()) + ? $table->getForeignKeys() + : array(); + + $allForeignKeyColumns = array(); + + foreach ($foreignKeys as $foreignKey) { + $allForeignKeyColumns = array_merge($allForeignKeyColumns, $foreignKey->getLocalColumns()); + } + + if ( ! $table->hasPrimaryKey()) { + throw new MappingException( + "Table " . $table->getName() . " has no primary key. Doctrine does not ". + "support reverse engineering from tables that don't have a primary key." + ); + } + + $pkColumns = $table->getPrimaryKey()->getColumns(); + + sort($pkColumns); + sort($allForeignKeyColumns); + + if ($pkColumns == $allForeignKeyColumns && count($foreignKeys) == 2) { + $this->manyToManyTables[$tableName] = $table; + } else { + // lower-casing is necessary because of Oracle Uppercase Tablenames, + // assumption is lower-case + underscore separated. + $className = $this->getClassNameForTable($tableName); + + $this->tables[$tableName] = $table; + $this->classToTableNames[$className] = $tableName; + } + } + } + + /** + * Build indexes from a class metadata. + * + * @param \Doctrine\ORM\Mapping\ClassMetadataInfo $metadata + */ + private function buildIndexes(ClassMetadataInfo $metadata) + { + $tableName = $metadata->table['name']; + $indexes = $this->tables[$tableName]->getIndexes(); + + foreach($indexes as $index){ + if ($index->isPrimary()) { + continue; + } + + $indexName = $index->getName(); + $indexColumns = $index->getColumns(); + $constraintType = $index->isUnique() + ? 'uniqueConstraints' + : 'indexes'; + + $metadata->table[$constraintType][$indexName]['columns'] = $indexColumns; + } + } + + /** + * Build field mapping from class metadata. + * + * @param \Doctrine\ORM\Mapping\ClassMetadataInfo $metadata + */ + private function buildFieldMappings(ClassMetadataInfo $metadata) + { + $tableName = $metadata->table['name']; + $columns = $this->tables[$tableName]->getColumns(); + $primaryKeys = $this->getTablePrimaryKeys($this->tables[$tableName]); + $foreignKeys = $this->getTableForeignKeys($this->tables[$tableName]); + $allForeignKeys = array(); + + foreach ($foreignKeys as $foreignKey) { + $allForeignKeys = array_merge($allForeignKeys, $foreignKey->getLocalColumns()); + } + + $ids = array(); + $fieldMappings = array(); + + foreach ($columns as $column) { + if (in_array($column->getName(), $allForeignKeys)) { + continue; + } + + $fieldMapping = $this->buildFieldMapping($tableName, $column); + + if ($primaryKeys && in_array($column->getName(), $primaryKeys)) { + $fieldMapping['id'] = true; + $ids[] = $fieldMapping; + } + + $fieldMappings[] = $fieldMapping; + } + + // We need to check for the columns here, because we might have associations as id as well. + if ($ids && count($primaryKeys) == 1) { + $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO); + } + + foreach ($fieldMappings as $fieldMapping) { + $metadata->mapField($fieldMapping); + } + } + + /** + * Build field mapping from a schema column definition + * + * @param string $tableName + * @param \Doctrine\DBAL\Schema\Column $column + * + * @return array + */ + private function buildFieldMapping($tableName, Column $column) + { + $fieldMapping = array( + 'fieldName' => $this->getFieldNameForColumn($tableName, $column->getName(), false), + 'columnName' => $column->getName(), + 'type' => $column->getType()->getName(), + 'nullable' => ( ! $column->getNotNull()), + ); + + // Type specific elements + switch ($fieldMapping['type']) { + case Type::TARRAY: + case Type::BLOB: + case Type::GUID: + case Type::JSON_ARRAY: + case Type::OBJECT: + case Type::SIMPLE_ARRAY: + case Type::STRING: + case Type::TEXT: + $fieldMapping['length'] = $column->getLength(); + $fieldMapping['options']['fixed'] = $column->getFixed(); + break; + + case Type::DECIMAL: + case Type::FLOAT: + $fieldMapping['precision'] = $column->getPrecision(); + $fieldMapping['scale'] = $column->getScale(); + break; + + case Type::INTEGER: + case Type::BIGINT: + case Type::SMALLINT: + $fieldMapping['options']['unsigned'] = $column->getUnsigned(); + break; + } + + // Comment + if (($comment = $column->getComment()) !== null) { + $fieldMapping['options']['comment'] = $comment; + } + + // Default + if (($default = $column->getDefault()) !== null) { + $fieldMapping['options']['default'] = $default; + } + + return $fieldMapping; + } + + /** + * Build to one (one to one, many to one) association mapping from class metadata. + * + * @param \Doctrine\ORM\Mapping\ClassMetadataInfo $metadata + */ + private function buildToOneAssociationMappings(ClassMetadataInfo $metadata) + { + $tableName = $metadata->table['name']; + $primaryKeys = $this->getTablePrimaryKeys($this->tables[$tableName]); + $foreignKeys = $this->getTableForeignKeys($this->tables[$tableName]); + + foreach ($foreignKeys as $foreignKey) { + $foreignTableName = $foreignKey->getForeignTableName(); + $fkColumns = $foreignKey->getColumns(); + $fkForeignColumns = $foreignKey->getForeignColumns(); + $localColumn = current($fkColumns); + $associationMapping = array( + 'fieldName' => $this->getFieldNameForColumn($tableName, $localColumn, true), + 'targetEntity' => $this->getClassNameForTable($foreignTableName), + ); + + if (isset($metadata->fieldMappings[$associationMapping['fieldName']])) { + $associationMapping['fieldName'] .= '2'; // "foo" => "foo2" + } + + if ($primaryKeys && in_array($localColumn, $primaryKeys)) { + $associationMapping['id'] = true; + } + + for ($i = 0; $i < count($fkColumns); $i++) { + $associationMapping['joinColumns'][] = array( + 'name' => $fkColumns[$i], + 'referencedColumnName' => $fkForeignColumns[$i], + ); + } + + // Here we need to check if $fkColumns are the same as $primaryKeys + if ( ! array_diff($fkColumns, $primaryKeys)) { + $metadata->mapOneToOne($associationMapping); + } else { + $metadata->mapManyToOne($associationMapping); + } + } + } + + /** + * Retreive schema table definition foreign keys. + * + * @param \Doctrine\DBAL\Schema\Table $table + * + * @return array + */ + private function getTableForeignKeys(Table $table) + { + return ($this->_sm->getDatabasePlatform()->supportsForeignKeyConstraints()) + ? $table->getForeignKeys() + : array(); + } + + /** + * Retreive schema table definition primary keys. + * + * @param \Doctrine\DBAL\Schema\Table $table + * + * @return array + */ + private function getTablePrimaryKeys(Table $table) + { + try { + return $table->getPrimaryKey()->getColumns(); + } catch(SchemaException $e) { + // Do nothing + } + + return array(); + } + + /** + * Returns the mapped class name for a table if it exists. Otherwise return "classified" version. + * + * @param string $tableName + * + * @return string + */ + private function getClassNameForTable($tableName) + { + if (isset($this->classNamesForTables[$tableName])) { + return $this->namespace . $this->classNamesForTables[$tableName]; + } + + return $this->namespace . Inflector::classify(strtolower($tableName)); + } + + /** + * Return the mapped field name for a column, if it exists. Otherwise return camelized version. + * + * @param string $tableName + * @param string $columnName + * @param boolean $fk Whether the column is a foreignkey or not. + * + * @return string + */ + private function getFieldNameForColumn($tableName, $columnName, $fk = false) + { + if (isset($this->fieldNamesForColumns[$tableName]) && isset($this->fieldNamesForColumns[$tableName][$columnName])) { + return $this->fieldNamesForColumns[$tableName][$columnName]; + } + + $columnName = strtolower($columnName); + + // Replace _id if it is a foreignkey column + if ($fk) { + $columnName = str_replace('_id', '', $columnName); + } + return Inflector::camelize($columnName); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php new file mode 100644 index 0000000000000000000000000000000000000000..8f4a34c0ef4ff2657f7d7a2e26b1d7be4f520f66 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php @@ -0,0 +1,69 @@ +. + */ + +require_once __DIR__.'/../Annotation.php'; +require_once __DIR__.'/../Entity.php'; +require_once __DIR__.'/../Embeddable.php'; +require_once __DIR__.'/../Embedded.php'; +require_once __DIR__.'/../MappedSuperclass.php'; +require_once __DIR__.'/../InheritanceType.php'; +require_once __DIR__.'/../DiscriminatorColumn.php'; +require_once __DIR__.'/../DiscriminatorMap.php'; +require_once __DIR__.'/../Id.php'; +require_once __DIR__.'/../GeneratedValue.php'; +require_once __DIR__.'/../Version.php'; +require_once __DIR__.'/../JoinColumn.php'; +require_once __DIR__.'/../JoinColumns.php'; +require_once __DIR__.'/../Column.php'; +require_once __DIR__.'/../OneToOne.php'; +require_once __DIR__.'/../OneToMany.php'; +require_once __DIR__.'/../ManyToOne.php'; +require_once __DIR__.'/../ManyToMany.php'; +require_once __DIR__.'/../Table.php'; +require_once __DIR__.'/../UniqueConstraint.php'; +require_once __DIR__.'/../Index.php'; +require_once __DIR__.'/../JoinTable.php'; +require_once __DIR__.'/../SequenceGenerator.php'; +require_once __DIR__.'/../CustomIdGenerator.php'; +require_once __DIR__.'/../ChangeTrackingPolicy.php'; +require_once __DIR__.'/../OrderBy.php'; +require_once __DIR__.'/../NamedQueries.php'; +require_once __DIR__.'/../NamedQuery.php'; +require_once __DIR__.'/../HasLifecycleCallbacks.php'; +require_once __DIR__.'/../PrePersist.php'; +require_once __DIR__.'/../PostPersist.php'; +require_once __DIR__.'/../PreUpdate.php'; +require_once __DIR__.'/../PostUpdate.php'; +require_once __DIR__.'/../PreRemove.php'; +require_once __DIR__.'/../PostRemove.php'; +require_once __DIR__.'/../PostLoad.php'; +require_once __DIR__.'/../PreFlush.php'; +require_once __DIR__.'/../FieldResult.php'; +require_once __DIR__.'/../ColumnResult.php'; +require_once __DIR__.'/../EntityResult.php'; +require_once __DIR__.'/../NamedNativeQuery.php'; +require_once __DIR__.'/../NamedNativeQueries.php'; +require_once __DIR__.'/../SqlResultSetMapping.php'; +require_once __DIR__.'/../SqlResultSetMappings.php'; +require_once __DIR__.'/../AssociationOverride.php'; +require_once __DIR__.'/../AssociationOverrides.php'; +require_once __DIR__.'/../AttributeOverride.php'; +require_once __DIR__.'/../AttributeOverrides.php'; +require_once __DIR__.'/../EntityListeners.php'; +require_once __DIR__.'/../Cache.php'; diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php new file mode 100644 index 0000000000000000000000000000000000000000..f4cd8cd6081d0ca671671b8b6da9e52ec02956f8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain; + +/** + * {@inheritDoc} + * + * @deprecated this driver will be removed. Use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain instead + */ +class DriverChain extends MappingDriverChain +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..28e2dbea22f58bd7651831ef6090afb880970691 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\Driver\PHPDriver as CommonPHPDriver; + +/** + * {@inheritDoc} + * + * @deprecated this driver will be removed. Use Doctrine\Common\Persistence\Mapping\Driver\PHPDriver instead + */ +class PHPDriver extends CommonPHPDriver +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/SimplifiedXmlDriver.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/SimplifiedXmlDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..85221f3a2bc01dfc20ec165f40eecd18e0305099 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/SimplifiedXmlDriver.php @@ -0,0 +1,43 @@ +. +*/ + +namespace Doctrine\ORM\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator; + +/** + * XmlDriver that additionally looks for mapping information in a global file. + * + * @author Fabien Potencier + * @author Benjamin Eberlei + * @license MIT + */ +class SimplifiedXmlDriver extends XmlDriver +{ + const DEFAULT_FILE_EXTENSION = '.orm.xml'; + + /** + * {@inheritDoc} + */ + public function __construct($prefixes, $fileExtension = self::DEFAULT_FILE_EXTENSION) + { + $locator = new SymfonyFileLocator((array) $prefixes, $fileExtension); + parent::__construct($locator, $fileExtension); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/SimplifiedYamlDriver.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/SimplifiedYamlDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..d2b8c0fcf0350d361e771acaeeb9019bbdb14f2d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/SimplifiedYamlDriver.php @@ -0,0 +1,43 @@ +. +*/ + +namespace Doctrine\ORM\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator; + +/** + * YamlDriver that additionally looks for mapping information in a global file. + * + * @author Fabien Potencier + * @author Benjamin Eberlei + * @license MIT + */ +class SimplifiedYamlDriver extends YamlDriver +{ + const DEFAULT_FILE_EXTENSION = '.orm.yml'; + + /** + * {@inheritDoc} + */ + public function __construct($prefixes, $fileExtension = self::DEFAULT_FILE_EXTENSION) + { + $locator = new SymfonyFileLocator((array) $prefixes, $fileExtension); + parent::__construct($locator, $fileExtension); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..d6c6ead853c10646c3fca93094964865a2d334c6 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php @@ -0,0 +1,31 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\Driver\StaticPHPDriver as CommonStaticPHPDriver; + +/** + * {@inheritDoc} + * + * @deprecated this driver will be removed. Use Doctrine\Common\Persistence\Mapping\Driver\StaticPHPDriver instead + */ +class StaticPHPDriver extends CommonStaticPHPDriver +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..c917eb245993e91626058448d9ffc2fd010da526 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -0,0 +1,847 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Driver; + +use SimpleXMLElement; +use Doctrine\Common\Persistence\Mapping\Driver\FileDriver; +use Doctrine\ORM\Mapping\Builder\EntityListenerBuilder; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\ORM\Mapping\MappingException; + +/** + * XmlDriver is a metadata driver that enables mapping through XML files. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +class XmlDriver extends FileDriver +{ + const DEFAULT_FILE_EXTENSION = '.dcm.xml'; + + /** + * {@inheritDoc} + */ + public function __construct($locator, $fileExtension = self::DEFAULT_FILE_EXTENSION) + { + parent::__construct($locator, $fileExtension); + } + + /** + * {@inheritDoc} + */ + public function loadMetadataForClass($className, ClassMetadata $metadata) + { + /* @var $metadata \Doctrine\ORM\Mapping\ClassMetadataInfo */ + /* @var $xmlRoot SimpleXMLElement */ + $xmlRoot = $this->getElement($className); + + if ($xmlRoot->getName() == 'entity') { + if (isset($xmlRoot['repository-class'])) { + $metadata->setCustomRepositoryClass((string)$xmlRoot['repository-class']); + } + if (isset($xmlRoot['read-only']) && $this->evaluateBoolean($xmlRoot['read-only'])) { + $metadata->markReadOnly(); + } + } else if ($xmlRoot->getName() == 'mapped-superclass') { + $metadata->setCustomRepositoryClass( + isset($xmlRoot['repository-class']) ? (string)$xmlRoot['repository-class'] : null + ); + $metadata->isMappedSuperclass = true; + } else if ($xmlRoot->getName() == 'embeddable') { + $metadata->isEmbeddedClass = true; + } else { + throw MappingException::classIsNotAValidEntityOrMappedSuperClass($className); + } + + // Evaluate attributes + $primaryTable = array(); + + if (isset($xmlRoot['table'])) { + $primaryTable['name'] = (string) $xmlRoot['table']; + } + + if (isset($xmlRoot['schema'])) { + $primaryTable['schema'] = (string) $xmlRoot['schema']; + } + + $metadata->setPrimaryTable($primaryTable); + + // Evaluate second level cache + if (isset($xmlRoot->cache)) { + $metadata->enableCache($this->cacheToArray($xmlRoot->cache)); + } + + // Evaluate named queries + if (isset($xmlRoot->{'named-queries'})) { + foreach ($xmlRoot->{'named-queries'}->{'named-query'} as $namedQueryElement) { + $metadata->addNamedQuery(array( + 'name' => (string)$namedQueryElement['name'], + 'query' => (string)$namedQueryElement['query'] + )); + } + } + + // Evaluate native named queries + if (isset($xmlRoot->{'named-native-queries'})) { + foreach ($xmlRoot->{'named-native-queries'}->{'named-native-query'} as $nativeQueryElement) { + $metadata->addNamedNativeQuery(array( + 'name' => isset($nativeQueryElement['name']) ? (string)$nativeQueryElement['name'] : null, + 'query' => isset($nativeQueryElement->query) ? (string)$nativeQueryElement->query : null, + 'resultClass' => isset($nativeQueryElement['result-class']) ? (string)$nativeQueryElement['result-class'] : null, + 'resultSetMapping' => isset($nativeQueryElement['result-set-mapping']) ? (string)$nativeQueryElement['result-set-mapping'] : null, + )); + } + } + + // Evaluate sql result set mapping + if (isset($xmlRoot->{'sql-result-set-mappings'})) { + foreach ($xmlRoot->{'sql-result-set-mappings'}->{'sql-result-set-mapping'} as $rsmElement) { + $entities = array(); + $columns = array(); + foreach ($rsmElement as $entityElement) { + // + if (isset($entityElement['entity-class'])) { + $entityResult = array( + 'fields' => array(), + 'entityClass' => (string)$entityElement['entity-class'], + 'discriminatorColumn' => isset($entityElement['discriminator-column']) ? (string)$entityElement['discriminator-column'] : null, + ); + + foreach ($entityElement as $fieldElement) { + $entityResult['fields'][] = array( + 'name' => isset($fieldElement['name']) ? (string)$fieldElement['name'] : null, + 'column' => isset($fieldElement['column']) ? (string)$fieldElement['column'] : null, + ); + } + + $entities[] = $entityResult; + } + + // + if (isset($entityElement['name'])) { + $columns[] = array( + 'name' => (string)$entityElement['name'], + ); + } + } + + $metadata->addSqlResultSetMapping(array( + 'name' => (string)$rsmElement['name'], + 'entities' => $entities, + 'columns' => $columns + )); + } + } + + if (isset($xmlRoot['inheritance-type'])) { + $inheritanceType = (string)$xmlRoot['inheritance-type']; + $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceType)); + + if ($metadata->inheritanceType != \Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_NONE) { + // Evaluate + if (isset($xmlRoot->{'discriminator-column'})) { + $discrColumn = $xmlRoot->{'discriminator-column'}; + $metadata->setDiscriminatorColumn(array( + 'name' => isset($discrColumn['name']) ? (string)$discrColumn['name'] : null, + 'type' => isset($discrColumn['type']) ? (string)$discrColumn['type'] : null, + 'length' => isset($discrColumn['length']) ? (string)$discrColumn['length'] : null, + 'columnDefinition' => isset($discrColumn['column-definition']) ? (string)$discrColumn['column-definition'] : null + )); + } else { + $metadata->setDiscriminatorColumn(array('name' => 'dtype', 'type' => 'string', 'length' => 255)); + } + + // Evaluate + if (isset($xmlRoot->{'discriminator-map'})) { + $map = array(); + foreach ($xmlRoot->{'discriminator-map'}->{'discriminator-mapping'} as $discrMapElement) { + $map[(string)$discrMapElement['value']] = (string)$discrMapElement['class']; + } + $metadata->setDiscriminatorMap($map); + } + } + } + + + // Evaluate + if (isset($xmlRoot['change-tracking-policy'])) { + $metadata->setChangeTrackingPolicy(constant('Doctrine\ORM\Mapping\ClassMetadata::CHANGETRACKING_' + . strtoupper((string)$xmlRoot['change-tracking-policy']))); + } + + // Evaluate + if (isset($xmlRoot->indexes)) { + $metadata->table['indexes'] = array(); + foreach ($xmlRoot->indexes->index as $indexXml) { + $index = array('columns' => explode(',', (string) $indexXml['columns'])); + + if (isset($indexXml['flags'])) { + $index['flags'] = explode(',', (string) $indexXml['flags']); + } + + if (isset($indexXml->options)) { + $index['options'] = $this->_parseOptions($indexXml->options->children()); + } + + if (isset($indexXml['name'])) { + $metadata->table['indexes'][(string) $indexXml['name']] = $index; + } else { + $metadata->table['indexes'][] = $index; + } + } + } + + // Evaluate + if (isset($xmlRoot->{'unique-constraints'})) { + $metadata->table['uniqueConstraints'] = array(); + foreach ($xmlRoot->{'unique-constraints'}->{'unique-constraint'} as $uniqueXml) { + $unique = array('columns' => explode(',', (string) $uniqueXml['columns'])); + + + if (isset($uniqueXml->options)) { + $unique['options'] = $this->_parseOptions($uniqueXml->options->children()); + } + + if (isset($uniqueXml['name'])) { + $metadata->table['uniqueConstraints'][(string)$uniqueXml['name']] = $unique; + } else { + $metadata->table['uniqueConstraints'][] = $unique; + } + } + } + + if (isset($xmlRoot->options)) { + $metadata->table['options'] = $this->_parseOptions($xmlRoot->options->children()); + } + + // The mapping assignment is done in 2 times as a bug might occurs on some php/xml lib versions + // The internal SimpleXmlIterator get resetted, to this generate a duplicate field exception + $mappings = array(); + // Evaluate mappings + if (isset($xmlRoot->field)) { + foreach ($xmlRoot->field as $fieldMapping) { + $mapping = $this->columnToArray($fieldMapping); + + if (isset($mapping['version'])) { + $metadata->setVersionMapping($mapping); + unset($mapping['version']); + } + + $metadata->mapField($mapping); + } + } + + if (isset($xmlRoot->embedded)) { + foreach ($xmlRoot->embedded as $embeddedMapping) { + $columnPrefix = isset($embeddedMapping['column-prefix']) + ? (string) $embeddedMapping['column-prefix'] + : null; + + $useColumnPrefix = isset($embeddedMapping['use-column-prefix']) + ? $this->evaluateBoolean($embeddedMapping['use-column-prefix']) + : true; + + $mapping = array( + 'fieldName' => (string) $embeddedMapping['name'], + 'class' => (string) $embeddedMapping['class'], + 'columnPrefix' => $useColumnPrefix ? $columnPrefix : false + ); + + $metadata->mapEmbedded($mapping); + } + } + + foreach ($mappings as $mapping) { + if (isset($mapping['version'])) { + $metadata->setVersionMapping($mapping); + } + + $metadata->mapField($mapping); + } + + // Evaluate mappings + $associationIds = array(); + foreach ($xmlRoot->id as $idElement) { + if (isset($idElement['association-key']) && $this->evaluateBoolean($idElement['association-key'])) { + $associationIds[(string)$idElement['name']] = true; + continue; + } + + $mapping = array( + 'id' => true, + 'fieldName' => (string)$idElement['name'] + ); + + if (isset($idElement['type'])) { + $mapping['type'] = (string)$idElement['type']; + } + + if (isset($idElement['length'])) { + $mapping['length'] = (string)$idElement['length']; + } + + if (isset($idElement['column'])) { + $mapping['columnName'] = (string)$idElement['column']; + } + + if (isset($idElement['column-definition'])) { + $mapping['columnDefinition'] = (string)$idElement['column-definition']; + } + + if (isset($idElement->options)) { + $mapping['options'] = $this->_parseOptions($idElement->options->children()); + } + + $metadata->mapField($mapping); + + if (isset($idElement->generator)) { + $strategy = isset($idElement->generator['strategy']) ? + (string)$idElement->generator['strategy'] : 'AUTO'; + $metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' + . $strategy)); + } + + // Check for SequenceGenerator/TableGenerator definition + if (isset($idElement->{'sequence-generator'})) { + $seqGenerator = $idElement->{'sequence-generator'}; + $metadata->setSequenceGeneratorDefinition(array( + 'sequenceName' => (string)$seqGenerator['sequence-name'], + 'allocationSize' => (string)$seqGenerator['allocation-size'], + 'initialValue' => (string)$seqGenerator['initial-value'] + )); + } else if (isset($idElement->{'custom-id-generator'})) { + $customGenerator = $idElement->{'custom-id-generator'}; + $metadata->setCustomGeneratorDefinition(array( + 'class' => (string) $customGenerator['class'] + )); + } else if (isset($idElement->{'table-generator'})) { + throw MappingException::tableIdGeneratorNotImplemented($className); + } + } + + // Evaluate mappings + if (isset($xmlRoot->{'one-to-one'})) { + foreach ($xmlRoot->{'one-to-one'} as $oneToOneElement) { + $mapping = array( + 'fieldName' => (string)$oneToOneElement['field'], + 'targetEntity' => (string)$oneToOneElement['target-entity'] + ); + + if (isset($associationIds[$mapping['fieldName']])) { + $mapping['id'] = true; + } + + if (isset($oneToOneElement['fetch'])) { + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string)$oneToOneElement['fetch']); + } + + if (isset($oneToOneElement['mapped-by'])) { + $mapping['mappedBy'] = (string)$oneToOneElement['mapped-by']; + } else { + if (isset($oneToOneElement['inversed-by'])) { + $mapping['inversedBy'] = (string)$oneToOneElement['inversed-by']; + } + $joinColumns = array(); + + if (isset($oneToOneElement->{'join-column'})) { + $joinColumns[] = $this->joinColumnToArray($oneToOneElement->{'join-column'}); + } else if (isset($oneToOneElement->{'join-columns'})) { + foreach ($oneToOneElement->{'join-columns'}->{'join-column'} as $joinColumnElement) { + $joinColumns[] = $this->joinColumnToArray($joinColumnElement); + } + } + + $mapping['joinColumns'] = $joinColumns; + } + + if (isset($oneToOneElement->cascade)) { + $mapping['cascade'] = $this->_getCascadeMappings($oneToOneElement->cascade); + } + + if (isset($oneToOneElement['orphan-removal'])) { + $mapping['orphanRemoval'] = $this->evaluateBoolean($oneToOneElement['orphan-removal']); + } + + $metadata->mapOneToOne($mapping); + + // Evaluate second level cache + if (isset($oneToOneElement->cache)) { + $metadata->enableAssociationCache($mapping['fieldName'], $this->cacheToArray($oneToOneElement->cache)); + } + } + } + + // Evaluate mappings + if (isset($xmlRoot->{'one-to-many'})) { + foreach ($xmlRoot->{'one-to-many'} as $oneToManyElement) { + $mapping = array( + 'fieldName' => (string)$oneToManyElement['field'], + 'targetEntity' => (string)$oneToManyElement['target-entity'], + 'mappedBy' => (string)$oneToManyElement['mapped-by'] + ); + + if (isset($oneToManyElement['fetch'])) { + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string)$oneToManyElement['fetch']); + } + + if (isset($oneToManyElement->cascade)) { + $mapping['cascade'] = $this->_getCascadeMappings($oneToManyElement->cascade); + } + + if (isset($oneToManyElement['orphan-removal'])) { + $mapping['orphanRemoval'] = $this->evaluateBoolean($oneToManyElement['orphan-removal']); + } + + if (isset($oneToManyElement->{'order-by'})) { + $orderBy = array(); + foreach ($oneToManyElement->{'order-by'}->{'order-by-field'} as $orderByField) { + $orderBy[(string)$orderByField['name']] = (string)$orderByField['direction']; + } + $mapping['orderBy'] = $orderBy; + } + + if (isset($oneToManyElement['index-by'])) { + $mapping['indexBy'] = (string)$oneToManyElement['index-by']; + } else if (isset($oneToManyElement->{'index-by'})) { + throw new \InvalidArgumentException(" is not a valid tag"); + } + + $metadata->mapOneToMany($mapping); + + // Evaluate second level cache + if (isset($oneToManyElement->cache)) { + $metadata->enableAssociationCache($mapping['fieldName'], $this->cacheToArray($oneToManyElement->cache)); + } + } + } + + // Evaluate mappings + if (isset($xmlRoot->{'many-to-one'})) { + foreach ($xmlRoot->{'many-to-one'} as $manyToOneElement) { + $mapping = array( + 'fieldName' => (string)$manyToOneElement['field'], + 'targetEntity' => (string)$manyToOneElement['target-entity'] + ); + + if (isset($associationIds[$mapping['fieldName']])) { + $mapping['id'] = true; + } + + if (isset($manyToOneElement['fetch'])) { + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string)$manyToOneElement['fetch']); + } + + if (isset($manyToOneElement['inversed-by'])) { + $mapping['inversedBy'] = (string)$manyToOneElement['inversed-by']; + } + + $joinColumns = array(); + + if (isset($manyToOneElement->{'join-column'})) { + $joinColumns[] = $this->joinColumnToArray($manyToOneElement->{'join-column'}); + } else if (isset($manyToOneElement->{'join-columns'})) { + foreach ($manyToOneElement->{'join-columns'}->{'join-column'} as $joinColumnElement) { + $joinColumns[] = $this->joinColumnToArray($joinColumnElement); + } + } + + $mapping['joinColumns'] = $joinColumns; + + if (isset($manyToOneElement->cascade)) { + $mapping['cascade'] = $this->_getCascadeMappings($manyToOneElement->cascade); + } + + $metadata->mapManyToOne($mapping); + + // Evaluate second level cache + if (isset($manyToOneElement->cache)) { + $metadata->enableAssociationCache($mapping['fieldName'], $this->cacheToArray($manyToOneElement->cache)); + } + } + } + + // Evaluate mappings + if (isset($xmlRoot->{'many-to-many'})) { + foreach ($xmlRoot->{'many-to-many'} as $manyToManyElement) { + $mapping = array( + 'fieldName' => (string)$manyToManyElement['field'], + 'targetEntity' => (string)$manyToManyElement['target-entity'] + ); + + if (isset($manyToManyElement['fetch'])) { + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string)$manyToManyElement['fetch']); + } + + if (isset($manyToManyElement['orphan-removal'])) { + $mapping['orphanRemoval'] = $this->evaluateBoolean($manyToManyElement['orphan-removal']); + } + + if (isset($manyToManyElement['mapped-by'])) { + $mapping['mappedBy'] = (string)$manyToManyElement['mapped-by']; + } else if (isset($manyToManyElement->{'join-table'})) { + if (isset($manyToManyElement['inversed-by'])) { + $mapping['inversedBy'] = (string)$manyToManyElement['inversed-by']; + } + + $joinTableElement = $manyToManyElement->{'join-table'}; + $joinTable = array( + 'name' => (string)$joinTableElement['name'] + ); + + if (isset($joinTableElement['schema'])) { + $joinTable['schema'] = (string)$joinTableElement['schema']; + } + + foreach ($joinTableElement->{'join-columns'}->{'join-column'} as $joinColumnElement) { + $joinTable['joinColumns'][] = $this->joinColumnToArray($joinColumnElement); + } + + foreach ($joinTableElement->{'inverse-join-columns'}->{'join-column'} as $joinColumnElement) { + $joinTable['inverseJoinColumns'][] = $this->joinColumnToArray($joinColumnElement); + } + + $mapping['joinTable'] = $joinTable; + } + + if (isset($manyToManyElement->cascade)) { + $mapping['cascade'] = $this->_getCascadeMappings($manyToManyElement->cascade); + } + + if (isset($manyToManyElement->{'order-by'})) { + $orderBy = array(); + foreach ($manyToManyElement->{'order-by'}->{'order-by-field'} as $orderByField) { + $orderBy[(string)$orderByField['name']] = (string)$orderByField['direction']; + } + $mapping['orderBy'] = $orderBy; + } + + if (isset($manyToManyElement['index-by'])) { + $mapping['indexBy'] = (string)$manyToManyElement['index-by']; + } else if (isset($manyToManyElement->{'index-by'})) { + throw new \InvalidArgumentException(" is not a valid tag"); + } + + $metadata->mapManyToMany($mapping); + + // Evaluate second level cache + if (isset($manyToManyElement->cache)) { + $metadata->enableAssociationCache($mapping['fieldName'], $this->cacheToArray($manyToManyElement->cache)); + } + } + } + + // Evaluate association-overrides + if (isset($xmlRoot->{'attribute-overrides'})) { + foreach ($xmlRoot->{'attribute-overrides'}->{'attribute-override'} as $overrideElement) { + $fieldName = (string) $overrideElement['name']; + foreach ($overrideElement->field as $field) { + $mapping = $this->columnToArray($field); + $mapping['fieldName'] = $fieldName; + $metadata->setAttributeOverride($fieldName, $mapping); + } + } + } + + // Evaluate association-overrides + if (isset($xmlRoot->{'association-overrides'})) { + foreach ($xmlRoot->{'association-overrides'}->{'association-override'} as $overrideElement) { + $fieldName = (string) $overrideElement['name']; + $override = array(); + + // Check for join-columns + if (isset($overrideElement->{'join-columns'})) { + $joinColumns = array(); + foreach ($overrideElement->{'join-columns'}->{'join-column'} as $joinColumnElement) { + $joinColumns[] = $this->joinColumnToArray($joinColumnElement); + } + $override['joinColumns'] = $joinColumns; + } + + // Check for join-table + if ($overrideElement->{'join-table'}) { + $joinTable = null; + $joinTableElement = $overrideElement->{'join-table'}; + + $joinTable = array( + 'name' => (string) $joinTableElement['name'], + 'schema' => (string) $joinTableElement['schema'] + ); + + if (isset($joinTableElement->{'join-columns'})) { + foreach ($joinTableElement->{'join-columns'}->{'join-column'} as $joinColumnElement) { + $joinTable['joinColumns'][] = $this->joinColumnToArray($joinColumnElement); + } + } + + if (isset($joinTableElement->{'inverse-join-columns'})) { + foreach ($joinTableElement->{'inverse-join-columns'}->{'join-column'} as $joinColumnElement) { + $joinTable['inverseJoinColumns'][] = $this->joinColumnToArray($joinColumnElement); + } + } + + $override['joinTable'] = $joinTable; + } + + $metadata->setAssociationOverride($fieldName, $override); + } + } + + // Evaluate + if (isset($xmlRoot->{'lifecycle-callbacks'})) { + foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) { + $metadata->addLifecycleCallback((string)$lifecycleCallback['method'], constant('Doctrine\ORM\Events::' . (string)$lifecycleCallback['type'])); + } + } + + // Evaluate entity listener + if (isset($xmlRoot->{'entity-listeners'})) { + foreach ($xmlRoot->{'entity-listeners'}->{'entity-listener'} as $listenerElement) { + $className = (string) $listenerElement['class']; + // Evaluate the listener using naming convention. + if($listenerElement->count() === 0) { + EntityListenerBuilder::bindEntityListener($metadata, $className); + + continue; + } + + foreach ($listenerElement as $callbackElement) { + $eventName = (string) $callbackElement['type']; + $methodName = (string) $callbackElement['method']; + + $metadata->addEntityListener($eventName, $className, $methodName); + } + } + } + } + + /** + * Parses (nested) option elements. + * + * @param SimpleXMLElement $options The XML element. + * + * @return array The options array. + */ + private function _parseOptions(SimpleXMLElement $options) + { + $array = array(); + + /* @var $option SimpleXMLElement */ + foreach ($options as $option) { + if ($option->count()) { + $value = $this->_parseOptions($option->children()); + } else { + $value = (string) $option; + } + + $attr = $option->attributes(); + + if (isset($attr->name)) { + $array[(string) $attr->name] = $value; + } else { + $array[] = $value; + } + } + + return $array; + } + + /** + * Constructs a joinColumn mapping array based on the information + * found in the given SimpleXMLElement. + * + * @param SimpleXMLElement $joinColumnElement The XML element. + * + * @return array The mapping array. + */ + private function joinColumnToArray(SimpleXMLElement $joinColumnElement) + { + $joinColumn = array( + 'name' => (string)$joinColumnElement['name'], + 'referencedColumnName' => (string)$joinColumnElement['referenced-column-name'] + ); + + if (isset($joinColumnElement['unique'])) { + $joinColumn['unique'] = $this->evaluateBoolean($joinColumnElement['unique']); + } + + if (isset($joinColumnElement['nullable'])) { + $joinColumn['nullable'] = $this->evaluateBoolean($joinColumnElement['nullable']); + } + + if (isset($joinColumnElement['on-delete'])) { + $joinColumn['onDelete'] = (string)$joinColumnElement['on-delete']; + } + + if (isset($joinColumnElement['column-definition'])) { + $joinColumn['columnDefinition'] = (string)$joinColumnElement['column-definition']; + } + + return $joinColumn; + } + + /** + * Parses the given field as array. + * + * @param SimpleXMLElement $fieldMapping + * + * @return array + */ + private function columnToArray(SimpleXMLElement $fieldMapping) + { + $mapping = array( + 'fieldName' => (string) $fieldMapping['name'], + ); + + if (isset($fieldMapping['type'])) { + $mapping['type'] = (string) $fieldMapping['type']; + } + + if (isset($fieldMapping['column'])) { + $mapping['columnName'] = (string) $fieldMapping['column']; + } + + if (isset($fieldMapping['length'])) { + $mapping['length'] = (int) $fieldMapping['length']; + } + + if (isset($fieldMapping['precision'])) { + $mapping['precision'] = (int) $fieldMapping['precision']; + } + + if (isset($fieldMapping['scale'])) { + $mapping['scale'] = (int) $fieldMapping['scale']; + } + + if (isset($fieldMapping['unique'])) { + $mapping['unique'] = $this->evaluateBoolean($fieldMapping['unique']); + } + + if (isset($fieldMapping['nullable'])) { + $mapping['nullable'] = $this->evaluateBoolean($fieldMapping['nullable']); + } + + if (isset($fieldMapping['version']) && $fieldMapping['version']) { + $mapping['version'] = $this->evaluateBoolean($fieldMapping['version']); + } + + if (isset($fieldMapping['column-definition'])) { + $mapping['columnDefinition'] = (string) $fieldMapping['column-definition']; + } + + if (isset($fieldMapping->options)) { + $mapping['options'] = $this->_parseOptions($fieldMapping->options->children()); + } + + return $mapping; + } + + /** + * Parse / Normalize the cache configuration + * + * @param SimpleXMLElement $cacheMapping + * + * @return array + */ + private function cacheToArray(SimpleXMLElement $cacheMapping) + { + $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null; + $usage = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null; + + if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) { + throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage)); + } + + if ($usage) { + $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage); + } + + return array( + 'usage' => $usage, + 'region' => $region, + ); + } + + /** + * Gathers a list of cascade options found in the given cascade element. + * + * @param SimpleXMLElement $cascadeElement The cascade element. + * + * @return array The list of cascade options. + */ + private function _getCascadeMappings(SimpleXMLElement $cascadeElement) + { + $cascades = array(); + /* @var $action SimpleXmlElement */ + foreach ($cascadeElement->children() as $action) { + // According to the JPA specifications, XML uses "cascade-persist" + // instead of "persist". Here, both variations + // are supported because both YAML and Annotation use "persist" + // and we want to make sure that this driver doesn't need to know + // anything about the supported cascading actions + $cascades[] = str_replace('cascade-', '', $action->getName()); + } + return $cascades; + } + + /** + * {@inheritDoc} + */ + protected function loadMappingFile($file) + { + $result = array(); + $xmlElement = simplexml_load_file($file); + + if (isset($xmlElement->entity)) { + foreach ($xmlElement->entity as $entityElement) { + $entityName = (string)$entityElement['name']; + $result[$entityName] = $entityElement; + } + } else if (isset($xmlElement->{'mapped-superclass'})) { + foreach ($xmlElement->{'mapped-superclass'} as $mappedSuperClass) { + $className = (string)$mappedSuperClass['name']; + $result[$className] = $mappedSuperClass; + } + } else if (isset($xmlElement->embeddable)) { + foreach ($xmlElement->embeddable as $embeddableElement) { + $embeddableName = (string) $embeddableElement['name']; + $result[$embeddableName] = $embeddableElement; + } + } + + return $result; + } + + /** + * @param mixed $element + * + * @return bool + */ + protected function evaluateBoolean($element) + { + $flag = (string)$element; + + return ($flag == "true" || $flag == "1"); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php new file mode 100644 index 0000000000000000000000000000000000000000..eab510b1e7b64649b39f7ef332f614f3ee18f1e8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php @@ -0,0 +1,790 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\ORM\Mapping\Builder\EntityListenerBuilder; +use Doctrine\Common\Persistence\Mapping\Driver\FileDriver; +use Doctrine\ORM\Mapping\MappingException; +use Symfony\Component\Yaml\Yaml; + +/** + * The YamlDriver reads the mapping metadata from yaml schema files. + * + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +class YamlDriver extends FileDriver +{ + const DEFAULT_FILE_EXTENSION = '.dcm.yml'; + + /** + * {@inheritDoc} + */ + public function __construct($locator, $fileExtension = self::DEFAULT_FILE_EXTENSION) + { + parent::__construct($locator, $fileExtension); + } + + /** + * {@inheritDoc} + */ + public function loadMetadataForClass($className, ClassMetadata $metadata) + { + /* @var $metadata \Doctrine\ORM\Mapping\ClassMetadataInfo */ + $element = $this->getElement($className); + + if ($element['type'] == 'entity') { + if (isset($element['repositoryClass'])) { + $metadata->setCustomRepositoryClass($element['repositoryClass']); + } + if (isset($element['readOnly']) && $element['readOnly'] == true) { + $metadata->markReadOnly(); + } + } else if ($element['type'] == 'mappedSuperclass') { + $metadata->setCustomRepositoryClass( + isset($element['repositoryClass']) ? $element['repositoryClass'] : null + ); + $metadata->isMappedSuperclass = true; + } else if ($element['type'] == 'embeddable') { + $metadata->isEmbeddedClass = true; + } else { + throw MappingException::classIsNotAValidEntityOrMappedSuperClass($className); + } + + // Evaluate root level properties + $primaryTable = array(); + + if (isset($element['table'])) { + $primaryTable['name'] = $element['table']; + } + + if (isset($element['schema'])) { + $primaryTable['schema'] = $element['schema']; + } + + // Evaluate second level cache + if (isset($element['cache'])) { + $metadata->enableCache($this->cacheToArray($element['cache'])); + } + + $metadata->setPrimaryTable($primaryTable); + + // Evaluate named queries + if (isset($element['namedQueries'])) { + foreach ($element['namedQueries'] as $name => $queryMapping) { + if (is_string($queryMapping)) { + $queryMapping = array('query' => $queryMapping); + } + + if ( ! isset($queryMapping['name'])) { + $queryMapping['name'] = $name; + } + + $metadata->addNamedQuery($queryMapping); + } + } + + // Evaluate named native queries + if (isset($element['namedNativeQueries'])) { + foreach ($element['namedNativeQueries'] as $name => $mappingElement) { + if (!isset($mappingElement['name'])) { + $mappingElement['name'] = $name; + } + $metadata->addNamedNativeQuery(array( + 'name' => $mappingElement['name'], + 'query' => isset($mappingElement['query']) ? $mappingElement['query'] : null, + 'resultClass' => isset($mappingElement['resultClass']) ? $mappingElement['resultClass'] : null, + 'resultSetMapping' => isset($mappingElement['resultSetMapping']) ? $mappingElement['resultSetMapping'] : null, + )); + } + } + + // Evaluate sql result set mappings + if (isset($element['sqlResultSetMappings'])) { + foreach ($element['sqlResultSetMappings'] as $name => $resultSetMapping) { + if (!isset($resultSetMapping['name'])) { + $resultSetMapping['name'] = $name; + } + + $entities = array(); + $columns = array(); + if (isset($resultSetMapping['entityResult'])) { + foreach ($resultSetMapping['entityResult'] as $entityResultElement) { + $entityResult = array( + 'fields' => array(), + 'entityClass' => isset($entityResultElement['entityClass']) ? $entityResultElement['entityClass'] : null, + 'discriminatorColumn' => isset($entityResultElement['discriminatorColumn']) ? $entityResultElement['discriminatorColumn'] : null, + ); + + if (isset($entityResultElement['fieldResult'])) { + foreach ($entityResultElement['fieldResult'] as $fieldResultElement) { + $entityResult['fields'][] = array( + 'name' => isset($fieldResultElement['name']) ? $fieldResultElement['name'] : null, + 'column' => isset($fieldResultElement['column']) ? $fieldResultElement['column'] : null, + ); + } + } + + $entities[] = $entityResult; + } + } + + + if (isset($resultSetMapping['columnResult'])) { + foreach ($resultSetMapping['columnResult'] as $columnResultAnnot) { + $columns[] = array( + 'name' => isset($columnResultAnnot['name']) ? $columnResultAnnot['name'] : null, + ); + } + } + + $metadata->addSqlResultSetMapping(array( + 'name' => $resultSetMapping['name'], + 'entities' => $entities, + 'columns' => $columns + )); + } + } + + if (isset($element['inheritanceType'])) { + $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . strtoupper($element['inheritanceType']))); + + if ($metadata->inheritanceType != \Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_NONE) { + // Evaluate discriminatorColumn + if (isset($element['discriminatorColumn'])) { + $discrColumn = $element['discriminatorColumn']; + $metadata->setDiscriminatorColumn(array( + 'name' => isset($discrColumn['name']) ? (string)$discrColumn['name'] : null, + 'type' => isset($discrColumn['type']) ? (string)$discrColumn['type'] : null, + 'length' => isset($discrColumn['length']) ? (string)$discrColumn['length'] : null, + 'columnDefinition' => isset($discrColumn['columnDefinition']) ? (string)$discrColumn['columnDefinition'] : null + )); + } else { + $metadata->setDiscriminatorColumn(array('name' => 'dtype', 'type' => 'string', 'length' => 255)); + } + + // Evaluate discriminatorMap + if (isset($element['discriminatorMap'])) { + $metadata->setDiscriminatorMap($element['discriminatorMap']); + } + } + } + + + // Evaluate changeTrackingPolicy + if (isset($element['changeTrackingPolicy'])) { + $metadata->setChangeTrackingPolicy(constant('Doctrine\ORM\Mapping\ClassMetadata::CHANGETRACKING_' + . strtoupper($element['changeTrackingPolicy']))); + } + + // Evaluate indexes + if (isset($element['indexes'])) { + foreach ($element['indexes'] as $name => $indexYml) { + if ( ! isset($indexYml['name'])) { + $indexYml['name'] = $name; + } + + if (is_string($indexYml['columns'])) { + $index = array('columns' => array_map('trim', explode(',', $indexYml['columns']))); + } else { + $index = array('columns' => $indexYml['columns']); + } + + if (isset($indexYml['flags'])) { + if (is_string($indexYml['flags'])) { + $index['flags'] = array_map('trim', explode(',', $indexYml['flags'])); + } else { + $index['flags'] = $indexYml['flags']; + } + } + + if (isset($indexYml['options'])) { + $index['options'] = $indexYml['options']; + } + + $metadata->table['indexes'][$indexYml['name']] = $index; + } + } + + // Evaluate uniqueConstraints + if (isset($element['uniqueConstraints'])) { + foreach ($element['uniqueConstraints'] as $name => $uniqueYml) { + if ( ! isset($uniqueYml['name'])) { + $uniqueYml['name'] = $name; + } + + if (is_string($uniqueYml['columns'])) { + $unique = array('columns' => array_map('trim', explode(',', $uniqueYml['columns']))); + } else { + $unique = array('columns' => $uniqueYml['columns']); + } + + if (isset($uniqueYml['options'])) { + $unique['options'] = $uniqueYml['options']; + } + + $metadata->table['uniqueConstraints'][$uniqueYml['name']] = $unique; + } + } + + if (isset($element['options'])) { + $metadata->table['options'] = $element['options']; + } + + $associationIds = array(); + if (isset($element['id'])) { + // Evaluate identifier settings + foreach ($element['id'] as $name => $idElement) { + if (isset($idElement['associationKey']) && $idElement['associationKey'] == true) { + $associationIds[$name] = true; + continue; + } + + $mapping = array( + 'id' => true, + 'fieldName' => $name + ); + + if (isset($idElement['type'])) { + $mapping['type'] = $idElement['type']; + } + + if (isset($idElement['column'])) { + $mapping['columnName'] = $idElement['column']; + } + + if (isset($idElement['length'])) { + $mapping['length'] = $idElement['length']; + } + + if (isset($idElement['columnDefinition'])) { + $mapping['columnDefinition'] = $idElement['columnDefinition']; + } + + if (isset($idElement['options'])) { + $mapping['options'] = $idElement['options']; + } + + $metadata->mapField($mapping); + + if (isset($idElement['generator'])) { + $metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' + . strtoupper($idElement['generator']['strategy']))); + } + // Check for SequenceGenerator/TableGenerator definition + if (isset($idElement['sequenceGenerator'])) { + $metadata->setSequenceGeneratorDefinition($idElement['sequenceGenerator']); + } else if (isset($idElement['customIdGenerator'])) { + $customGenerator = $idElement['customIdGenerator']; + $metadata->setCustomGeneratorDefinition(array( + 'class' => (string) $customGenerator['class'] + )); + } else if (isset($idElement['tableGenerator'])) { + throw MappingException::tableIdGeneratorNotImplemented($className); + } + } + } + + // Evaluate fields + if (isset($element['fields'])) { + foreach ($element['fields'] as $name => $fieldMapping) { + + $mapping = $this->columnToArray($name, $fieldMapping); + + if (isset($fieldMapping['id'])) { + $mapping['id'] = true; + if (isset($fieldMapping['generator']['strategy'])) { + $metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' + . strtoupper($fieldMapping['generator']['strategy']))); + } + } + + if (isset($mapping['version'])) { + $metadata->setVersionMapping($mapping); + unset($mapping['version']); + } + + $metadata->mapField($mapping); + } + } + + if (isset($element['embedded'])) { + foreach ($element['embedded'] as $name => $embeddedMapping) { + $mapping = array( + 'fieldName' => $name, + 'class' => $embeddedMapping['class'], + 'columnPrefix' => isset($embeddedMapping['columnPrefix']) ? $embeddedMapping['columnPrefix'] : null, + ); + $metadata->mapEmbedded($mapping); + } + } + + // Evaluate oneToOne relationships + if (isset($element['oneToOne'])) { + foreach ($element['oneToOne'] as $name => $oneToOneElement) { + $mapping = array( + 'fieldName' => $name, + 'targetEntity' => $oneToOneElement['targetEntity'] + ); + + if (isset($associationIds[$mapping['fieldName']])) { + $mapping['id'] = true; + } + + if (isset($oneToOneElement['fetch'])) { + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $oneToOneElement['fetch']); + } + + if (isset($oneToOneElement['mappedBy'])) { + $mapping['mappedBy'] = $oneToOneElement['mappedBy']; + } else { + if (isset($oneToOneElement['inversedBy'])) { + $mapping['inversedBy'] = $oneToOneElement['inversedBy']; + } + + $joinColumns = array(); + + if (isset($oneToOneElement['joinColumn'])) { + $joinColumns[] = $this->joinColumnToArray($oneToOneElement['joinColumn']); + } else if (isset($oneToOneElement['joinColumns'])) { + foreach ($oneToOneElement['joinColumns'] as $joinColumnName => $joinColumnElement) { + if ( ! isset($joinColumnElement['name'])) { + $joinColumnElement['name'] = $joinColumnName; + } + + $joinColumns[] = $this->joinColumnToArray($joinColumnElement); + } + } + + $mapping['joinColumns'] = $joinColumns; + } + + if (isset($oneToOneElement['cascade'])) { + $mapping['cascade'] = $oneToOneElement['cascade']; + } + + if (isset($oneToOneElement['orphanRemoval'])) { + $mapping['orphanRemoval'] = (bool)$oneToOneElement['orphanRemoval']; + } + + $metadata->mapOneToOne($mapping); + + // Evaluate second level cache + if (isset($oneToOneElement['cache'])) { + $metadata->enableAssociationCache($mapping['fieldName'], $this->cacheToArray($oneToOneElement['cache'])); + } + } + } + + // Evaluate oneToMany relationships + if (isset($element['oneToMany'])) { + foreach ($element['oneToMany'] as $name => $oneToManyElement) { + $mapping = array( + 'fieldName' => $name, + 'targetEntity' => $oneToManyElement['targetEntity'], + 'mappedBy' => $oneToManyElement['mappedBy'] + ); + + if (isset($oneToManyElement['fetch'])) { + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $oneToManyElement['fetch']); + } + + if (isset($oneToManyElement['cascade'])) { + $mapping['cascade'] = $oneToManyElement['cascade']; + } + + if (isset($oneToManyElement['orphanRemoval'])) { + $mapping['orphanRemoval'] = (bool)$oneToManyElement['orphanRemoval']; + } + + if (isset($oneToManyElement['orderBy'])) { + $mapping['orderBy'] = $oneToManyElement['orderBy']; + } + + if (isset($oneToManyElement['indexBy'])) { + $mapping['indexBy'] = $oneToManyElement['indexBy']; + } + + $metadata->mapOneToMany($mapping); + + // Evaluate second level cache + if (isset($oneToManyElement['cache'])) { + $metadata->enableAssociationCache($mapping['fieldName'], $this->cacheToArray($oneToManyElement['cache'])); + } + } + } + + // Evaluate manyToOne relationships + if (isset($element['manyToOne'])) { + foreach ($element['manyToOne'] as $name => $manyToOneElement) { + $mapping = array( + 'fieldName' => $name, + 'targetEntity' => $manyToOneElement['targetEntity'] + ); + + if (isset($associationIds[$mapping['fieldName']])) { + $mapping['id'] = true; + } + + if (isset($manyToOneElement['fetch'])) { + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $manyToOneElement['fetch']); + } + + if (isset($manyToOneElement['inversedBy'])) { + $mapping['inversedBy'] = $manyToOneElement['inversedBy']; + } + + $joinColumns = array(); + + if (isset($manyToOneElement['joinColumn'])) { + $joinColumns[] = $this->joinColumnToArray($manyToOneElement['joinColumn']); + } else if (isset($manyToOneElement['joinColumns'])) { + foreach ($manyToOneElement['joinColumns'] as $joinColumnName => $joinColumnElement) { + if ( ! isset($joinColumnElement['name'])) { + $joinColumnElement['name'] = $joinColumnName; + } + + $joinColumns[] = $this->joinColumnToArray($joinColumnElement); + } + } + + $mapping['joinColumns'] = $joinColumns; + + if (isset($manyToOneElement['cascade'])) { + $mapping['cascade'] = $manyToOneElement['cascade']; + } + + $metadata->mapManyToOne($mapping); + + // Evaluate second level cache + if (isset($manyToOneElement['cache'])) { + $metadata->enableAssociationCache($mapping['fieldName'], $this->cacheToArray($manyToOneElement['cache'])); + } + } + } + + // Evaluate manyToMany relationships + if (isset($element['manyToMany'])) { + foreach ($element['manyToMany'] as $name => $manyToManyElement) { + $mapping = array( + 'fieldName' => $name, + 'targetEntity' => $manyToManyElement['targetEntity'] + ); + + if (isset($manyToManyElement['fetch'])) { + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $manyToManyElement['fetch']); + } + + if (isset($manyToManyElement['mappedBy'])) { + $mapping['mappedBy'] = $manyToManyElement['mappedBy']; + } else if (isset($manyToManyElement['joinTable'])) { + + $joinTableElement = $manyToManyElement['joinTable']; + $joinTable = array( + 'name' => $joinTableElement['name'] + ); + + if (isset($joinTableElement['schema'])) { + $joinTable['schema'] = $joinTableElement['schema']; + } + + if (isset($joinTableElement['joinColumns'])) { + foreach ($joinTableElement['joinColumns'] as $joinColumnName => $joinColumnElement) { + if ( ! isset($joinColumnElement['name'])) { + $joinColumnElement['name'] = $joinColumnName; + } + $joinTable['joinColumns'][] = $this->joinColumnToArray($joinColumnElement); + } + } + + if (isset($joinTableElement['inverseJoinColumns'])) { + foreach ($joinTableElement['inverseJoinColumns'] as $joinColumnName => $joinColumnElement) { + if ( ! isset($joinColumnElement['name'])) { + $joinColumnElement['name'] = $joinColumnName; + } + $joinTable['inverseJoinColumns'][] = $this->joinColumnToArray($joinColumnElement); + } + } + + $mapping['joinTable'] = $joinTable; + } + + if (isset($manyToManyElement['inversedBy'])) { + $mapping['inversedBy'] = $manyToManyElement['inversedBy']; + } + + if (isset($manyToManyElement['cascade'])) { + $mapping['cascade'] = $manyToManyElement['cascade']; + } + + if (isset($manyToManyElement['orderBy'])) { + $mapping['orderBy'] = $manyToManyElement['orderBy']; + } + + if (isset($manyToManyElement['indexBy'])) { + $mapping['indexBy'] = $manyToManyElement['indexBy']; + } + + if (isset($manyToManyElement['orphanRemoval'])) { + $mapping['orphanRemoval'] = (bool)$manyToManyElement['orphanRemoval']; + } + + $metadata->mapManyToMany($mapping); + + // Evaluate second level cache + if (isset($manyToManyElement['cache'])) { + $metadata->enableAssociationCache($mapping['fieldName'], $this->cacheToArray($manyToManyElement['cache'])); + } + } + } + + // Evaluate associationOverride + if (isset($element['associationOverride']) && is_array($element['associationOverride'])) { + + foreach ($element['associationOverride'] as $fieldName => $associationOverrideElement) { + $override = array(); + + // Check for joinColumn + if (isset($associationOverrideElement['joinColumn'])) { + $joinColumns = array(); + foreach ($associationOverrideElement['joinColumn'] as $name => $joinColumnElement) { + if ( ! isset($joinColumnElement['name'])) { + $joinColumnElement['name'] = $name; + } + $joinColumns[] = $this->joinColumnToArray($joinColumnElement); + } + $override['joinColumns'] = $joinColumns; + } + + // Check for joinTable + if (isset($associationOverrideElement['joinTable'])) { + + $joinTableElement = $associationOverrideElement['joinTable']; + $joinTable = array( + 'name' => $joinTableElement['name'] + ); + + if (isset($joinTableElement['schema'])) { + $joinTable['schema'] = $joinTableElement['schema']; + } + + foreach ($joinTableElement['joinColumns'] as $name => $joinColumnElement) { + if ( ! isset($joinColumnElement['name'])) { + $joinColumnElement['name'] = $name; + } + + $joinTable['joinColumns'][] = $this->joinColumnToArray($joinColumnElement); + } + + foreach ($joinTableElement['inverseJoinColumns'] as $name => $joinColumnElement) { + if ( ! isset($joinColumnElement['name'])) { + $joinColumnElement['name'] = $name; + } + + $joinTable['inverseJoinColumns'][] = $this->joinColumnToArray($joinColumnElement); + } + + $override['joinTable'] = $joinTable; + } + + $metadata->setAssociationOverride($fieldName, $override); + } + } + + // Evaluate associationOverride + if (isset($element['attributeOverride']) && is_array($element['attributeOverride'])) { + + foreach ($element['attributeOverride'] as $fieldName => $attributeOverrideElement) { + $mapping = $this->columnToArray($fieldName, $attributeOverrideElement); + $metadata->setAttributeOverride($fieldName, $mapping); + } + } + + // Evaluate lifeCycleCallbacks + if (isset($element['lifecycleCallbacks'])) { + foreach ($element['lifecycleCallbacks'] as $type => $methods) { + foreach ($methods as $method) { + $metadata->addLifecycleCallback($method, constant('Doctrine\ORM\Events::' . $type)); + } + } + } + + // Evaluate entityListeners + if (isset($element['entityListeners'])) { + foreach ($element['entityListeners'] as $className => $entityListener) { + // Evaluate the listener using naming convention. + if (empty($entityListener)) { + EntityListenerBuilder::bindEntityListener($metadata, $className); + + continue; + } + + foreach ($entityListener as $eventName => $callbackElement){ + foreach ($callbackElement as $methodName) { + $metadata->addEntityListener($eventName, $className, $methodName); + } + } + } + } + } + + /** + * Constructs a joinColumn mapping array based on the information + * found in the given join column element. + * + * @param array $joinColumnElement The array join column element. + * + * @return array The mapping array. + */ + private function joinColumnToArray($joinColumnElement) + { + $joinColumn = array(); + if (isset($joinColumnElement['referencedColumnName'])) { + $joinColumn['referencedColumnName'] = (string) $joinColumnElement['referencedColumnName']; + } + + if (isset($joinColumnElement['name'])) { + $joinColumn['name'] = (string) $joinColumnElement['name']; + } + + if (isset($joinColumnElement['fieldName'])) { + $joinColumn['fieldName'] = (string) $joinColumnElement['fieldName']; + } + + if (isset($joinColumnElement['unique'])) { + $joinColumn['unique'] = (bool) $joinColumnElement['unique']; + } + + if (isset($joinColumnElement['nullable'])) { + $joinColumn['nullable'] = (bool) $joinColumnElement['nullable']; + } + + if (isset($joinColumnElement['onDelete'])) { + $joinColumn['onDelete'] = $joinColumnElement['onDelete']; + } + + if (isset($joinColumnElement['columnDefinition'])) { + $joinColumn['columnDefinition'] = $joinColumnElement['columnDefinition']; + } + + return $joinColumn; + } + + /** + * Parses the given column as array. + * + * @param string $fieldName + * @param array $column + * + * @return array + */ + private function columnToArray($fieldName, $column) + { + $mapping = array( + 'fieldName' => $fieldName + ); + + if (isset($column['type'])) { + $params = explode('(', $column['type']); + $column['type'] = $params[0]; + $mapping['type'] = $column['type']; + + if (isset($params[1])) { + $column['length'] = (integer) substr($params[1], 0, strlen($params[1]) - 1); + } + } + + if (isset($column['column'])) { + $mapping['columnName'] = $column['column']; + } + + if (isset($column['length'])) { + $mapping['length'] = $column['length']; + } + + if (isset($column['precision'])) { + $mapping['precision'] = $column['precision']; + } + + if (isset($column['scale'])) { + $mapping['scale'] = $column['scale']; + } + + if (isset($column['unique'])) { + $mapping['unique'] = (bool)$column['unique']; + } + + if (isset($column['options'])) { + $mapping['options'] = $column['options']; + } + + if (isset($column['nullable'])) { + $mapping['nullable'] = $column['nullable']; + } + + if (isset($column['version']) && $column['version']) { + $mapping['version'] = $column['version']; + } + + if (isset($column['columnDefinition'])) { + $mapping['columnDefinition'] = $column['columnDefinition']; + } + + return $mapping; + } + + /** + * Parse / Normalize the cache configuration + * + * @param array $cacheMapping + * + * @return array + */ + private function cacheToArray($cacheMapping) + { + $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null; + $usage = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null; + + if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) { + throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage)); + } + + if ($usage) { + $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage); + } + + return array( + 'usage' => $usage, + 'region' => $region, + ); + } + + /** + * {@inheritDoc} + */ + protected function loadMappingFile($file) + { + return Yaml::parse(file_get_contents($file)); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Embeddable.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Embeddable.php new file mode 100644 index 0000000000000000000000000000000000000000..f14bfac82a605f7bbe06dd2cf6a66a2489a42cd9 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Embeddable.php @@ -0,0 +1,28 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("CLASS") + */ +final class Embeddable implements Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Embedded.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Embedded.php new file mode 100644 index 0000000000000000000000000000000000000000..37339108bc9b503f9e8608d43359b2ba3cd4000a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Embedded.php @@ -0,0 +1,38 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("PROPERTY") + */ +final class Embedded implements Annotation +{ + /** + * @Required + * @var string + */ + public $class; + + /** + * @var mixed + */ + public $columnPrefix; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Entity.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Entity.php new file mode 100644 index 0000000000000000000000000000000000000000..edf6ad5a4bea31355f61d12016bd35a8ebcf9cf4 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Entity.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("CLASS") + */ +final class Entity implements Annotation +{ + /** + * @var string + */ + public $repositoryClass; + + /** + * @var boolean + */ + public $readOnly = false; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/EntityListenerResolver.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/EntityListenerResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..2d5ecf714f768888b66032c8720cef75d530704a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/EntityListenerResolver.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * A resolver is used to instantiate an entity listener. + * + * @since 2.4 + * @author Fabio B. Silva + */ +interface EntityListenerResolver +{ + /** + * Clear all instances from the set, or a specific class when given. + * + * @param string $className The fully-qualified class name + * + * @return void + */ + function clear($className = null); + + /** + * Returns a entity listener instance for the given class name. + * + * @param string $className The fully-qualified class name + * + * @return object An entity listener + */ + function resolve($className); + + /** + * Register a entity listener instance. + * + * @param object $object An entity listener + */ + function register($object); +} \ No newline at end of file diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/EntityListeners.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/EntityListeners.php new file mode 100644 index 0000000000000000000000000000000000000000..d9478a4979e8fbfb10a541202851ddb56a2053c8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/EntityListeners.php @@ -0,0 +1,41 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * The EntityListeners annotation specifies the callback listener classes to be used for an entity or mapped superclass. + * The EntityListeners annotation may be applied to an entity class or mapped superclass. + * + * @author Fabio B. Silva + * @since 2.4 + * + * @Annotation + * @Target("CLASS") + */ +final class EntityListeners implements Annotation +{ + /** + * Specifies the names of the entity listeners. + * + * @var array + */ + public $value = array(); +} \ No newline at end of file diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/EntityResult.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/EntityResult.php new file mode 100644 index 0000000000000000000000000000000000000000..63bbed22facafa8744da327d36d8a5f464f327f1 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/EntityResult.php @@ -0,0 +1,56 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * References an entity in the SELECT clause of a SQL query. + * If this annotation is used, the SQL statement should select all of the columns that are mapped to the entity object. + * This should include foreign key columns to related entities. + * The results obtained when insufficient data is available are undefined. + * + * @author Fabio B. Silva + * @since 2.3 + * + * @Annotation + * @Target("ANNOTATION") + */ +final class EntityResult implements Annotation +{ + /** + * The class of the result. + * + * @var string + */ + public $entityClass; + + /** + * Maps the columns specified in the SELECT list of the query to the properties or fields of the entity class. + * + * @var array<\Doctrine\ORM\Mapping\FieldResult> + */ + public $fields = array(); + + /** + * Specifies the column name of the column in the SELECT list that is used to determine the type of the entity instance. + * + * @var string + */ + public $discriminatorColumn; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/FieldResult.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/FieldResult.php new file mode 100644 index 0000000000000000000000000000000000000000..5e8aa0cd3e0e89707d91978859f64e1e955a167c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/FieldResult.php @@ -0,0 +1,46 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * Is used to map the columns specified in the SELECT list of the query to the properties or fields of the entity class. + * + * @author Fabio B. Silva + * @since 2.3 + * + * @Annotation + * @Target("ANNOTATION") + */ +final class FieldResult implements Annotation +{ + /** + * Name of the column in the SELECT clause. + * + * @var string + */ + public $name; + + /** + * Name of the persistent field or property of the class. + * + * @var string + */ + public $column; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/GeneratedValue.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/GeneratedValue.php new file mode 100644 index 0000000000000000000000000000000000000000..27c03d4bee7d376e72cc298d60655022e0ab899d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/GeneratedValue.php @@ -0,0 +1,36 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("PROPERTY") + */ +final class GeneratedValue implements Annotation +{ + /** + * The type of Id generator. + * + * @var string + * + * @Enum({"AUTO", "SEQUENCE", "TABLE", "IDENTITY", "NONE", "UUID", "CUSTOM"}) + */ + public $strategy = 'AUTO'; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/HasLifecycleCallbacks.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/HasLifecycleCallbacks.php new file mode 100644 index 0000000000000000000000000000000000000000..313ece31f8c54d6470a949c5fe77c38ac363ec33 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/HasLifecycleCallbacks.php @@ -0,0 +1,28 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("CLASS") + */ +final class HasLifecycleCallbacks implements Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Id.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Id.php new file mode 100644 index 0000000000000000000000000000000000000000..6c9bcef0d7198edcfd1fc82bced8cc61ade90f15 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Id.php @@ -0,0 +1,28 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("PROPERTY") + */ +final class Id implements Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Index.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Index.php new file mode 100644 index 0000000000000000000000000000000000000000..45953a804780ff495c824b21e2bb76449b860ef8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Index.php @@ -0,0 +1,47 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("ANNOTATION") + */ +final class Index implements Annotation +{ + /** + * @var string + */ + public $name; + + /** + * @var array + */ + public $columns; + + /** + * @var array + */ + public $flags; + + /** + * @var array + */ + public $options; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/InheritanceType.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/InheritanceType.php new file mode 100644 index 0000000000000000000000000000000000000000..de803369a300c330ed7b69823c8bdbdc477147d0 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/InheritanceType.php @@ -0,0 +1,36 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("CLASS") + */ +final class InheritanceType implements Annotation +{ + /** + * The inheritance type used by the class and its subclasses. + * + * @var string + * + * @Enum({"NONE", "JOINED", "SINGLE_TABLE", "TABLE_PER_CLASS"}) + */ + public $value; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinColumn.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinColumn.php new file mode 100644 index 0000000000000000000000000000000000000000..febce9174813b10d3448721339c8d90d00d6de06 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinColumn.php @@ -0,0 +1,64 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target({"PROPERTY","ANNOTATION"}) + */ +final class JoinColumn implements Annotation +{ + /** + * @var string + */ + public $name; + + /** + * @var string + */ + public $referencedColumnName = 'id'; + + /** + * @var boolean + */ + public $unique = false; + + /** + * @var boolean + */ + public $nullable = true; + + /** + * @var mixed + */ + public $onDelete; + + /** + * @var string + */ + public $columnDefinition; + + /** + * Field name used in non-object hydration (array/scalar). + * + * @var string + */ + public $fieldName; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinColumns.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinColumns.php new file mode 100644 index 0000000000000000000000000000000000000000..ae096c27503914b865d2f3550c7abefb4f1e7986 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinColumns.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("PROPERTY") + */ +final class JoinColumns implements Annotation +{ + /** + * @var array<\Doctrine\ORM\Mapping\JoinColumn> + */ + public $value; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinTable.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinTable.php new file mode 100644 index 0000000000000000000000000000000000000000..8a440c6143d332ef50b4a5b321e26dc85a6e7907 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/JoinTable.php @@ -0,0 +1,47 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target({"PROPERTY","ANNOTATION"}) + */ +final class JoinTable implements Annotation +{ + /** + * @var string + */ + public $name; + + /** + * @var string + */ + public $schema; + + /** + * @var array<\Doctrine\ORM\Mapping\JoinColumn> + */ + public $joinColumns = array(); + + /** + * @var array<\Doctrine\ORM\Mapping\JoinColumn> + */ + public $inverseJoinColumns = array(); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ManyToMany.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ManyToMany.php new file mode 100644 index 0000000000000000000000000000000000000000..ca2f53c9eea200ebfd0bafc6811915c7679d52e3 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ManyToMany.php @@ -0,0 +1,66 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("PROPERTY") + */ +final class ManyToMany implements Annotation +{ + /** + * @var string + */ + public $targetEntity; + + /** + * @var string + */ + public $mappedBy; + + /** + * @var string + */ + public $inversedBy; + + /** + * @var array + */ + public $cascade; + + /** + * The fetching strategy to use for the association. + * + * @var string + * + * @Enum({"LAZY", "EAGER", "EXTRA_LAZY"}) + */ + public $fetch = 'LAZY'; + + /** + * @var boolean + */ + public $orphanRemoval = false; + + /** + * @var string + */ + public $indexBy; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ManyToOne.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ManyToOne.php new file mode 100644 index 0000000000000000000000000000000000000000..d3414e6a956aab3d95c157bf9731a526cc9c1bb1 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ManyToOne.php @@ -0,0 +1,51 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("PROPERTY") + */ +final class ManyToOne implements Annotation +{ + /** + * @var string + */ + public $targetEntity; + + /** + * @var array + */ + public $cascade; + + /** + * The fetching strategy to use for the association. + * + * @var string + * + * @Enum({"LAZY", "EAGER", "EXTRA_LAZY"}) + */ + public $fetch = 'LAZY'; + + /** + * @var string + */ + public $inversedBy; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappedSuperclass.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappedSuperclass.php new file mode 100644 index 0000000000000000000000000000000000000000..74588107d899b3a1f216c4d61e621ec65e3591be --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappedSuperclass.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("CLASS") + */ +final class MappedSuperclass implements Annotation +{ + /** + * @var string + */ + public $repositoryClass; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php new file mode 100644 index 0000000000000000000000000000000000000000..9e6b4b33fdb389d1bc353df86861a7cfda3c69a3 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php @@ -0,0 +1,812 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * A MappingException indicates that something is wrong with the mapping setup. + * + * @since 2.0 + */ +class MappingException extends \Doctrine\ORM\ORMException +{ + /** + * @return MappingException + */ + public static function pathRequired() + { + return new self("Specifying the paths to your entities is required ". + "in the AnnotationDriver to retrieve all class names."); + } + + /** + * @param string $entityName + * + * @return MappingException + */ + public static function identifierRequired($entityName) + { + if (false !== ($parent = get_parent_class($entityName))) { + return new self(sprintf( + 'No identifier/primary key specified for Entity "%s" sub class of "%s". Every Entity must have an identifier/primary key.', + $entityName, $parent + )); + } + + return new self(sprintf( + 'No identifier/primary key specified for Entity "%s". Every Entity must have an identifier/primary key.', + $entityName + )); + + } + + /** + * @param string $entityName + * @param string $type + * + * @return MappingException + */ + public static function invalidInheritanceType($entityName, $type) + { + return new self("The inheritance type '$type' specified for '$entityName' does not exist."); + } + + /** + * @return MappingException + */ + public static function generatorNotAllowedWithCompositeId() + { + return new self("Id generators can't be used with a composite id."); + } + + /** + * @param string $entity + * + * @return MappingException + */ + public static function missingFieldName($entity) + { + return new self("The field or association mapping misses the 'fieldName' attribute in entity '$entity'."); + } + + /** + * @param string $fieldName + * + * @return MappingException + */ + public static function missingTargetEntity($fieldName) + { + return new self("The association mapping '$fieldName' misses the 'targetEntity' attribute."); + } + + /** + * @param string $fieldName + * + * @return MappingException + */ + public static function missingSourceEntity($fieldName) + { + return new self("The association mapping '$fieldName' misses the 'sourceEntity' attribute."); + } + + /** + * @param string $fieldName + * + * @return MappingException + */ + public static function missingEmbeddedClass($fieldName) + { + return new self("The embed mapping '$fieldName' misses the 'class' attribute."); + } + + /** + * @param string $entityName + * @param string $fileName + * + * @return MappingException + */ + public static function mappingFileNotFound($entityName, $fileName) + { + return new self("No mapping file found named '$fileName' for class '$entityName'."); + } + + /** + * Exception for invalid property name override. + * + * @param string $className The entity's name. + * @param string $fieldName + * + * @return MappingException + */ + public static function invalidOverrideFieldName($className, $fieldName) + { + return new self("Invalid field override named '$fieldName' for class '$className'."); + } + + /** + * Exception for invalid property type override. + * + * @param string $className The entity's name. + * @param string $fieldName + * + * @return MappingException + */ + public static function invalidOverrideFieldType($className, $fieldName) + { + return new self("The column type of attribute '$fieldName' on class '$className' could not be changed."); + } + + /** + * @param string $className + * @param string $fieldName + * + * @return MappingException + */ + public static function mappingNotFound($className, $fieldName) + { + return new self("No mapping found for field '$fieldName' on class '$className'."); + } + + /** + * @param string $className + * @param string $queryName + * + * @return MappingException + */ + public static function queryNotFound($className, $queryName) + { + return new self("No query found named '$queryName' on class '$className'."); + } + + /** + * @param string $className + * @param string $resultName + * + * @return MappingException + */ + public static function resultMappingNotFound($className, $resultName) + { + return new self("No result set mapping found named '$resultName' on class '$className'."); + } + + /** + * @param string $entity + * @param string $queryName + * + * @return MappingException + */ + public static function emptyQueryMapping($entity, $queryName) + { + return new self('Query named "'.$queryName.'" in "'.$entity.'" could not be empty.'); + } + + /** + * @param string $className + * + * @return MappingException + */ + public static function nameIsMandatoryForQueryMapping($className) + { + return new self("Query name on entity class '$className' is not defined."); + } + + /** + * @param string $entity + * @param string $queryName + * + * @return MappingException + */ + public static function missingQueryMapping($entity, $queryName) + { + return new self('Query named "'.$queryName.'" in "'.$entity.' requires a result class or result set mapping.'); + } + + /** + * @param string $entity + * @param string $resultName + * + * @return MappingException + */ + public static function missingResultSetMappingEntity($entity, $resultName) + { + return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a entity class name.'); + } + + /** + * @param string $entity + * @param string $resultName + * + * @return MappingException + */ + public static function missingResultSetMappingFieldName($entity, $resultName) + { + return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a field name.'); + } + + /** + * @param string $className + * + * @return MappingException + */ + public static function nameIsMandatoryForSqlResultSetMapping($className) + { + return new self("Result set mapping name on entity class '$className' is not defined."); + } + + /** + * @param string $fieldName + * + * @return MappingException + */ + public static function oneToManyRequiresMappedBy($fieldName) + { + return new self("OneToMany mapping on field '$fieldName' requires the 'mappedBy' attribute."); + } + + /** + * @param string $fieldName + * + * @return MappingException + */ + public static function joinTableRequired($fieldName) + { + return new self("The mapping of field '$fieldName' requires an the 'joinTable' attribute."); + } + + /** + * Called if a required option was not found but is required + * + * @param string $field Which field cannot be processed? + * @param string $expectedOption Which option is required + * @param string $hint Can optionally be used to supply a tip for common mistakes, + * e.g. "Did you think of the plural s?" + * + * @return MappingException + */ + static function missingRequiredOption($field, $expectedOption, $hint = '') + { + $message = "The mapping of field '{$field}' is invalid: The option '{$expectedOption}' is required."; + + if ( ! empty($hint)) { + $message .= ' (Hint: ' . $hint . ')'; + } + + return new self($message); + } + + /** + * Generic exception for invalid mappings. + * + * @param string $fieldName + * + * @return MappingException + */ + public static function invalidMapping($fieldName) + { + return new self("The mapping of field '$fieldName' is invalid."); + } + + /** + * Exception for reflection exceptions - adds the entity name, + * because there might be long classnames that will be shortened + * within the stacktrace + * + * @param string $entity The entity's name + * @param \ReflectionException $previousException + * + * @return MappingException + */ + public static function reflectionFailure($entity, \ReflectionException $previousException) + { + return new self('An error occurred in ' . $entity, 0, $previousException); + } + + /** + * @param string $className + * @param string $joinColumn + * + * @return MappingException + */ + public static function joinColumnMustPointToMappedField($className, $joinColumn) + { + return new self('The column ' . $joinColumn . ' must be mapped to a field in class ' + . $className . ' since it is referenced by a join column of another class.'); + } + + /** + * @param string $className + * + * @return MappingException + */ + public static function classIsNotAValidEntityOrMappedSuperClass($className) + { + if (false !== ($parent = get_parent_class($className))) { + return new self(sprintf( + 'Class "%s" sub class of "%s" is not a valid entity or mapped super class.', + $className, $parent + )); + } + + return new self(sprintf( + 'Class "%s" is not a valid entity or mapped super class.', + $className + )); + } + + /** + * @param string $className + * @param string $propertyName + * + * @return MappingException + */ + public static function propertyTypeIsRequired($className, $propertyName) + { + return new self("The attribute 'type' is required for the column description of property ".$className."::\$".$propertyName."."); + } + + /** + * @param string $className + * + * @return MappingException + */ + public static function tableIdGeneratorNotImplemented($className) + { + return new self("TableIdGenerator is not yet implemented for use with class ".$className); + } + + /** + * @param string $entity The entity's name. + * @param string $fieldName The name of the field that was already declared. + * + * @return MappingException + */ + public static function duplicateFieldMapping($entity, $fieldName) + { + return new self('Property "'.$fieldName.'" in "'.$entity.'" was already declared, but it must be declared only once'); + } + + /** + * @param string $entity + * @param string $fieldName + * + * @return MappingException + */ + public static function duplicateAssociationMapping($entity, $fieldName) + { + return new self('Property "'.$fieldName.'" in "'.$entity.'" was already declared, but it must be declared only once'); + } + + /** + * @param string $entity + * @param string $queryName + * + * @return MappingException + */ + public static function duplicateQueryMapping($entity, $queryName) + { + return new self('Query named "'.$queryName.'" in "'.$entity.'" was already declared, but it must be declared only once'); + } + + /** + * @param string $entity + * @param string $resultName + * + * @return MappingException + */ + public static function duplicateResultSetMapping($entity, $resultName) + { + return new self('Result set mapping named "'.$resultName.'" in "'.$entity.'" was already declared, but it must be declared only once'); + } + + /** + * @param string $entity + * + * @return MappingException + */ + public static function singleIdNotAllowedOnCompositePrimaryKey($entity) + { + return new self('Single id is not allowed on composite primary key in entity '.$entity); + } + + /** + * @param string $entity + * @param string $fieldName + * @param string $unsupportedType + * + * @return MappingException + */ + public static function unsupportedOptimisticLockingType($entity, $fieldName, $unsupportedType) + { + return new self('Locking type "'.$unsupportedType.'" (specified in "'.$entity.'", field "'.$fieldName.'") ' + .'is not supported by Doctrine.' + ); + } + + /** + * @param string|null $path + * + * @return MappingException + */ + public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null) + { + if ( ! empty($path)) { + $path = '[' . $path . ']'; + } + + return new self( + 'File mapping drivers must have a valid directory path, ' . + 'however the given path ' . $path . ' seems to be incorrect!' + ); + } + + /** + * Returns an exception that indicates that a class used in a discriminator map does not exist. + * An example would be an outdated (maybe renamed) classname. + * + * @param string $className The class that could not be found + * @param string $owningClass The class that declares the discriminator map. + * + * @return MappingException + */ + public static function invalidClassInDiscriminatorMap($className, $owningClass) + { + return new self( + "Entity class '$className' used in the discriminator map of class '$owningClass' ". + "does not exist." + ); + } + + /** + * @param string $className + * @param array $entries + * @param array $map + * + * @return MappingException + */ + public static function duplicateDiscriminatorEntry($className, array $entries, array $map) + { + return new self( + "The entries " . implode(', ', $entries) . " in discriminator map of class '" . $className . "' is duplicated. " . + "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. " . + "The entries of the current map are: @DiscriminatorMap({" . implode(', ', array_map( + function($a, $b) { return "'$a': '$b'"; }, array_keys($map), array_values($map) + )) . "})" + ); + } + + /** + * @param string $className + * + * @return MappingException + */ + public static function missingDiscriminatorMap($className) + { + return new self("Entity class '$className' is using inheritance but no discriminator map was defined."); + } + + /** + * @param string $className + * + * @return MappingException + */ + public static function missingDiscriminatorColumn($className) + { + return new self("Entity class '$className' is using inheritance but no discriminator column was defined."); + } + + /** + * @param string $className + * @param string $type + * + * @return MappingException + */ + public static function invalidDiscriminatorColumnType($className, $type) + { + return new self("Discriminator column type on entity class '$className' is not allowed to be '$type'. 'string' or 'integer' type variables are suggested!"); + } + + /** + * @param string $className + * + * @return MappingException + */ + public static function nameIsMandatoryForDiscriminatorColumns($className) + { + return new self("Discriminator column name on entity class '$className' is not defined."); + } + + /** + * @param string $className + * @param string $fieldName + * + * @return MappingException + */ + public static function cannotVersionIdField($className, $fieldName) + { + return new self("Setting Id field '$fieldName' as versionable in entity class '$className' is not supported."); + } + + /** + * @param string $className + * @param string $fieldName + * @param string $type + * + * @return MappingException + */ + public static function sqlConversionNotAllowedForIdentifiers($className, $fieldName, $type) + { + return new self("It is not possible to set id field '$fieldName' to type '$type' in entity class '$className'. The type '$type' requires conversion SQL which is not allowed for identifiers."); + } + + /** + * @param string $className + * @param string $columnName + * + * @return MappingException + */ + public static function duplicateColumnName($className, $columnName) + { + return new self("Duplicate definition of column '".$columnName."' on entity '".$className."' in a field or discriminator column mapping."); + } + + /** + * @param string $className + * @param string $field + * + * @return MappingException + */ + public static function illegalToManyAssociationOnMappedSuperclass($className, $field) + { + return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '".$className."#".$field."'."); + } + + /** + * @param string $className + * @param string $targetEntity + * @param string $targetField + * + * @return MappingException + */ + public static function cannotMapCompositePrimaryKeyEntitiesAsForeignId($className, $targetEntity, $targetField) + { + return new self("It is not possible to map entity '".$className."' with a composite primary key ". + "as part of the primary key of another entity '".$targetEntity."#".$targetField."'."); + } + + /** + * @param string $className + * @param string $field + * + * @return MappingException + */ + public static function noSingleAssociationJoinColumnFound($className, $field) + { + return new self("'$className#$field' is not an association with a single join column."); + } + + /** + * @param string $className + * @param string $column + * + * @return MappingException + */ + public static function noFieldNameFoundForColumn($className, $column) + { + return new self("Cannot find a field on '$className' that is mapped to column '$column'. Either the ". + "field does not exist or an association exists but it has multiple join columns."); + } + + /** + * @param string $className + * @param string $field + * + * @return MappingException + */ + public static function illegalOrphanRemovalOnIdentifierAssociation($className, $field) + { + return new self("The orphan removal option is not allowed on an association that is ". + "part of the identifier in '$className#$field'."); + } + + /** + * @param string $className + * @param string $field + * + * @return MappingException + */ + public static function illegalOrphanRemoval($className, $field) + { + return new self("Orphan removal is only allowed on one-to-one and one-to-many ". + "associations, but " . $className."#" .$field . " is not."); + } + + /** + * @param string $className + * @param string $field + * + * @return MappingException + */ + public static function illegalInverseIdentifierAssociation($className, $field) + { + return new self("An inverse association is not allowed to be identifier in '$className#$field'."); + } + + /** + * @param string $className + * @param string $field + * + * @return MappingException + */ + public static function illegalToManyIdentifierAssociation($className, $field) + { + return new self("Many-to-many or one-to-many associations are not allowed to be identifier in '$className#$field'."); + } + + /** + * @param string $className + * + * @return MappingException + */ + public static function noInheritanceOnMappedSuperClass($className) + { + return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'."); + } + + /** + * @param string $className + * @param string $rootClassName + * + * @return MappingException + */ + public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName) + { + return new self( + "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " . + "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class " . + "to avoid this exception from occurring." + ); + } + + /** + * @param string $className + * @param string $methodName + * + * @return MappingException + */ + public static function lifecycleCallbackMethodNotFound($className, $methodName) + { + return new self("Entity '" . $className . "' has no method '" . $methodName . "' to be registered as lifecycle callback."); + } + + /** + * @param string $listenerName + * @param string $className + * + * @return \Doctrine\ORM\Mapping\MappingException + */ + public static function entityListenerClassNotFound($listenerName, $className) + { + return new self(sprintf('Entity Listener "%s" declared on "%s" not found.', $listenerName, $className)); + } + + /** + * @param string $listenerName + * @param string $methodName + * @param string $className + * + * @return \Doctrine\ORM\Mapping\MappingException + */ + public static function entityListenerMethodNotFound($listenerName, $methodName, $className) + { + return new self(sprintf('Entity Listener "%s" declared on "%s" has no method "%s".', $listenerName, $className, $methodName)); + } + + /** + * @param string $listenerName + * @param string $methodName + * @param string $className + * + * @return \Doctrine\ORM\Mapping\MappingException + */ + public static function duplicateEntityListener($listenerName, $methodName, $className) + { + return new self(sprintf('Entity Listener "%s#%s()" in "%s" was already declared, but it must be declared only once.', $listenerName, $methodName, $className)); + } + + /** + * @param string $className + * @param string $annotation + * + * @return MappingException + */ + public static function invalidFetchMode($className, $annotation) + { + return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'"); + } + + /** + * @param string $className + * + * @return MappingException + */ + public static function compositeKeyAssignedIdGeneratorRequired($className) + { + return new self("Entity '". $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); + } + + /** + * @param string $targetEntity + * @param string $sourceEntity + * @param string $associationName + * + * @return MappingException + */ + public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName) + { + return new self("The target-entity " . $targetEntity . " cannot be found in '" . $sourceEntity."#".$associationName."'."); + } + + /** + * @param array $cascades + * @param string $className + * @param string $propertyName + * + * @return MappingException + */ + public static function invalidCascadeOption(array $cascades, $className, $propertyName) + { + $cascades = implode(", ", array_map(function ($e) { return "'" . $e . "'"; }, $cascades)); + return new self(sprintf( + "You have specified invalid cascade options for %s::$%s: %s; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'", + $className, + $propertyName, + $cascades + )); + } + + /** + * @param string $className + * + * @return MappingException + */ + public static function missingSequenceName($className) + { + return new self( + sprintf('Missing "sequenceName" attribute for sequence id generator definition on class "%s".', $className) + ); + } + + /** + * @param string $className + * @param string $propertyName + * + * @return MappingException + */ + public static function infiniteEmbeddableNesting($className, $propertyName) + { + return new self( + sprintf( + 'Infinite nesting detected for embedded property %s::%s. ' . + 'You cannot embed an embeddable from the same type inside an embeddable.', + $className, + $propertyName + ) + ); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedNativeQueries.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedNativeQueries.php new file mode 100644 index 0000000000000000000000000000000000000000..7f5460a81e983d54b113962ad69bb46834f38d63 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedNativeQueries.php @@ -0,0 +1,40 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * Is used to specify an array of native SQL named queries. + * The NamedNativeQueries annotation can be applied to an entity or mapped superclass. + * + * @author Fabio B. Silva + * @since 2.3 + * + * @Annotation + * @Target("CLASS") + */ +final class NamedNativeQueries implements Annotation +{ + /** + * One or more NamedNativeQuery annotations. + * + * @var array<\Doctrine\ORM\Mapping\NamedNativeQuery> + */ + public $value = array(); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedNativeQuery.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedNativeQuery.php new file mode 100644 index 0000000000000000000000000000000000000000..f336c99171db3459452bd9bc10249b14b5c66212 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedNativeQuery.php @@ -0,0 +1,61 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * Is used to specify a native SQL named query. + * The NamedNativeQuery annotation can be applied to an entity or mapped superclass. + * + * @author Fabio B. Silva + * @since 2.3 + * + * @Annotation + * @Target("ANNOTATION") + */ +final class NamedNativeQuery implements Annotation +{ + /** + * The name used to refer to the query with the EntityManager methods that create query objects. + * + * @var string + */ + public $name; + + /** + * The SQL query string. + * + * @var string + */ + public $query; + + /** + * The class of the result. + * + * @var string + */ + public $resultClass; + + /** + * The name of a SqlResultSetMapping, as defined in metadata. + * + * @var string + */ + public $resultSetMapping; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedQueries.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedQueries.php new file mode 100644 index 0000000000000000000000000000000000000000..5fce0727b282f041c0412cf8698074f5dd301391 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedQueries.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("CLASS") + */ +final class NamedQueries implements Annotation +{ + /** + * @var array<\Doctrine\ORM\Mapping\NamedQuery> + */ + public $value; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedQuery.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedQuery.php new file mode 100644 index 0000000000000000000000000000000000000000..c4e6cd528fbdaf2f83e943632c630110039d4b30 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamedQuery.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("ANNOTATION") + */ +final class NamedQuery implements Annotation +{ + /** + * @var string + */ + public $name; + + /** + * @var string + */ + public $query; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamingStrategy.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamingStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..8845cb1ed5f115c70f44ffa512e5ec1fcc80446e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/NamingStrategy.php @@ -0,0 +1,100 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * A set of rules for determining the physical column and table names + * + * + * @link www.doctrine-project.org + * @since 2.3 + * @author Fabio B. Silva + */ +interface NamingStrategy +{ + /** + * Returns a table name for an entity class. + * + * @param string $className The fully-qualified class name. + * + * @return string A table name. + */ + function classToTableName($className); + + /** + * Returns a column name for a property. + * + * @param string $propertyName A property name. + * @param string|null $className The fully-qualified class name. + * + * @return string A column name. + */ + function propertyToColumnName($propertyName, $className = null); + + /** + * Returns a column name for an embedded property. + * + * @param string $propertyName + * @param string $embeddedColumnName + * + * @return string + */ + function embeddedFieldToColumnName($propertyName, $embeddedColumnName, $className = null, $embeddedClassName = null); + + /** + * Returns the default reference column name. + * + * @return string A column name. + */ + function referenceColumnName(); + + /** + * Returns a join column name for a property. + * + * @param string $propertyName A property name. + * @param string|null $className The fully-qualified class name. + * This parameter is omitted from the signature due to BC + * + * @return string A join column name. + */ + function joinColumnName($propertyName/*, $className = null*/); + + /** + * Returns a join table name. + * + * @param string $sourceEntity The source entity. + * @param string $targetEntity The target entity. + * @param string|null $propertyName A property name. + * + * @return string A join table name. + */ + function joinTableName($sourceEntity, $targetEntity, $propertyName = null); + + /** + * Returns the foreign key column name for the given parameters. + * + * @param string $entityName An entity. + * @param string|null $referencedColumnName A property. + * + * @return string A join column name. + */ + function joinKeyColumnName($entityName, $referencedColumnName = null); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/OneToMany.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/OneToMany.php new file mode 100644 index 0000000000000000000000000000000000000000..4b2465718e120ea04cf88add0961cc5bfc56cebf --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/OneToMany.php @@ -0,0 +1,61 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("PROPERTY") + */ +final class OneToMany implements Annotation +{ + /** + * @var string + */ + public $mappedBy; + + /** + * @var string + */ + public $targetEntity; + + /** + * @var array + */ + public $cascade; + + /** + * The fetching strategy to use for the association. + * + * @var string + * + * @Enum({"LAZY", "EAGER", "EXTRA_LAZY"}) + */ + public $fetch = 'LAZY'; + + /** + * @var boolean + */ + public $orphanRemoval = false; + + /** + * @var string + */ + public $indexBy; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/OneToOne.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/OneToOne.php new file mode 100644 index 0000000000000000000000000000000000000000..b2ab81f88d98e55626b3acb8214255bc0445eda4 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/OneToOne.php @@ -0,0 +1,61 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("PROPERTY") + */ +final class OneToOne implements Annotation +{ + /** + * @var string + */ + public $targetEntity; + + /** + * @var string + */ + public $mappedBy; + + /** + * @var string + */ + public $inversedBy; + + /** + * @var array + */ + public $cascade; + + /** + * The fetching strategy to use for the association. + * + * @var string + * + * @Enum({"LAZY", "EAGER", "EXTRA_LAZY"}) + */ + public $fetch = 'LAZY'; + + /** + * @var boolean + */ + public $orphanRemoval = false; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/OrderBy.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/OrderBy.php new file mode 100644 index 0000000000000000000000000000000000000000..ad1b7a8f714c3e0de302f07c7fc2acf1528ca83c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/OrderBy.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("PROPERTY") + */ +final class OrderBy implements Annotation +{ + /** + * @var array + */ + public $value; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PostLoad.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PostLoad.php new file mode 100644 index 0000000000000000000000000000000000000000..2f8e9932e35eaa13d18d51cec5fa3a53c64f2510 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PostLoad.php @@ -0,0 +1,28 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("METHOD") + */ +final class PostLoad implements Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PostPersist.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PostPersist.php new file mode 100644 index 0000000000000000000000000000000000000000..2aea7194911e578275747b8909c69c7619f50ab8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PostPersist.php @@ -0,0 +1,28 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("METHOD") + */ +final class PostPersist implements Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PostRemove.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PostRemove.php new file mode 100644 index 0000000000000000000000000000000000000000..321c4bd547b1a6725616c62d0be5a85b6b1b83cf --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PostRemove.php @@ -0,0 +1,28 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("METHOD") + */ +final class PostRemove implements Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PostUpdate.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PostUpdate.php new file mode 100644 index 0000000000000000000000000000000000000000..a55f7072a69fc8f6d53317eb3cd784c851c779ed --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PostUpdate.php @@ -0,0 +1,28 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("METHOD") + */ +final class PostUpdate implements Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PreFlush.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PreFlush.php new file mode 100644 index 0000000000000000000000000000000000000000..6697d372c37e214dfa71256a16df4384f559c1c6 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PreFlush.php @@ -0,0 +1,28 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("METHOD") + */ +final class PreFlush implements Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PrePersist.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PrePersist.php new file mode 100644 index 0000000000000000000000000000000000000000..fea05be6d3d34e5e15371b13a01dccc7e3c3fb89 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PrePersist.php @@ -0,0 +1,28 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("METHOD") + */ +final class PrePersist implements Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PreRemove.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PreRemove.php new file mode 100644 index 0000000000000000000000000000000000000000..29822edacc9506b3f9fc668cab3d3632ea83a99e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PreRemove.php @@ -0,0 +1,28 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("METHOD") + */ +final class PreRemove implements Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PreUpdate.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PreUpdate.php new file mode 100644 index 0000000000000000000000000000000000000000..290df72e04a5b9fddcb5925f8462ce827f8612ff --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/PreUpdate.php @@ -0,0 +1,28 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("METHOD") + */ +final class PreUpdate implements Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/QuoteStrategy.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/QuoteStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..1a21ff1bb16931031700db5d7592259d2ba80923 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/QuoteStrategy.php @@ -0,0 +1,119 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * A set of rules for determining the column, alias and table quotes. + * + * @since 2.3 + * @author Fabio B. Silva + */ +interface QuoteStrategy +{ + /** + * Gets the (possibly quoted) column name for safe use in an SQL statement. + * + * @param string $fieldName + * @param ClassMetadata $class + * @param AbstractPlatform $platform + * + * @return string + */ + function getColumnName($fieldName, ClassMetadata $class, AbstractPlatform $platform); + + /** + * Gets the (possibly quoted) primary table name for safe use in an SQL statement. + * + * @param ClassMetadata $class + * @param AbstractPlatform $platform + * + * @return string + */ + function getTableName(ClassMetadata $class, AbstractPlatform $platform); + + /** + * Gets the (possibly quoted) sequence name for safe use in an SQL statement. + * + * @param array $definition + * @param ClassMetadata $class + * @param AbstractPlatform $platform + * + * @return string + */ + function getSequenceName(array $definition, ClassMetadata $class, AbstractPlatform $platform); + + /** + * Gets the (possibly quoted) name of the join table. + * + * @param array $association + * @param ClassMetadata $class + * @param AbstractPlatform $platform + * + * @return string + */ + function getJoinTableName(array $association, ClassMetadata $class, AbstractPlatform $platform); + + /** + * Gets the (possibly quoted) join column name. + * + * @param array $joinColumn + * @param ClassMetadata $class + * @param AbstractPlatform $platform + * + * @return string + */ + function getJoinColumnName(array $joinColumn, ClassMetadata $class, AbstractPlatform $platform); + + /** + * Gets the (possibly quoted) join column name. + * + * @param array $joinColumn + * @param ClassMetadata $class + * @param AbstractPlatform $platform + * + * @return string + */ + function getReferencedJoinColumnName(array $joinColumn, ClassMetadata $class, AbstractPlatform $platform); + + /** + * Gets the (possibly quoted) identifier column names for safe use in an SQL statement. + * + * @param ClassMetadata $class + * @param AbstractPlatform $platform + * + * @return array + */ + function getIdentifierColumnNames(ClassMetadata $class, AbstractPlatform $platform); + + /** + * Gets the column alias. + * + * @param string $columnName + * @param integer $counter + * @param AbstractPlatform $platform + * @param ClassMetadata|null $class + * + * @return string + */ + function getColumnAlias($columnName, $counter, AbstractPlatform $platform, ClassMetadata $class = null); + +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Reflection/ReflectionPropertiesGetter.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Reflection/ReflectionPropertiesGetter.php new file mode 100644 index 0000000000000000000000000000000000000000..6ac7f11c3fdc1547cf643326e9eed4988f9c9aea --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Reflection/ReflectionPropertiesGetter.php @@ -0,0 +1,163 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Reflection; + +use Doctrine\Common\Persistence\Mapping\ReflectionService; +use ReflectionClass; +use ReflectionProperty; + +/** + * Utility class to retrieve all reflection instance properties of a given class, including + * private inherited properties and transient properties. + * + * @private This API is for internal use only + * + * @author Marco Pivetta + */ +final class ReflectionPropertiesGetter +{ + /** + * @var ReflectionProperty[][] indexed by class name and property internal name + */ + private $properties = []; + + /** + * @var ReflectionService + */ + private $reflectionService; + + /** + * @param ReflectionService $reflectionService + */ + public function __construct(ReflectionService $reflectionService) + { + $this->reflectionService = $reflectionService; + } + + /** + * @param $className + * + * @return ReflectionProperty[] indexed by property internal name + */ + public function getProperties($className) + { + if (isset($this->properties[$className])) { + return $this->properties[$className]; + } + + return $this->properties[$className] = call_user_func_array( + 'array_merge', + // first merge because `array_merge` expects >= 1 params + array_merge( + [[]], + array_map( + [$this, 'getClassProperties'], + $this->getHierarchyClasses($className) + ) + ) + ); + } + + /** + * @param string $className + * + * @return ReflectionClass[] + */ + private function getHierarchyClasses($className) + { + $classes = []; + $parentClassName = $className; + + while ($parentClassName && $currentClass = $this->reflectionService->getClass($parentClassName)) { + $classes[] = $currentClass; + $parentClassName = null; + + if ($parentClass = $currentClass->getParentClass()) { + $parentClassName = $parentClass->getName(); + } + } + + return $classes; + } + + /** + * @param ReflectionClass $reflectionClass + * + * @return ReflectionProperty[] + */ + private function getClassProperties(ReflectionClass $reflectionClass) + { + $properties = $reflectionClass->getProperties(); + + return array_filter( + array_filter(array_map( + [$this, 'getAccessibleProperty'], + array_combine( + array_map([$this, 'getLogicalName'], $properties), + $properties + ) + )), + [$this, 'isInstanceProperty'] + ); + } + + /** + * @param ReflectionProperty $reflectionProperty + * + * @return bool + */ + private function isInstanceProperty(ReflectionProperty $reflectionProperty) + { + return ! $reflectionProperty->isStatic(); + } + + /** + * @param ReflectionProperty $property + * + * @return null|ReflectionProperty + */ + private function getAccessibleProperty(ReflectionProperty $property) + { + return $this->reflectionService->getAccessibleProperty( + $property->getDeclaringClass()->getName(), + $property->getName() + ); + } + + /** + * @param ReflectionProperty $property + * + * @return string + */ + private function getLogicalName(ReflectionProperty $property) + { + $propertyName = $property->getName(); + + if ($property->isPublic()) { + return $propertyName; + } + + if ($property->isProtected()) { + return "\0*\0" . $propertyName; + } + + return "\0" . $property->getDeclaringClass()->getName() . "\0" . $propertyName; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ReflectionEmbeddedProperty.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ReflectionEmbeddedProperty.php new file mode 100644 index 0000000000000000000000000000000000000000..b224fff4eb54e1a5f0a93e2aad7dbb7a3fa9d6eb --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ReflectionEmbeddedProperty.php @@ -0,0 +1,101 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +use Doctrine\Instantiator\Instantiator; +use ReflectionProperty; + +/** + * Acts as a proxy to a nested Property structure, making it look like + * just a single scalar property. + * + * This way value objects "just work" without UnitOfWork, Persisters or Hydrators + * needing any changes. + * + * TODO: Move this class into Common\Reflection + */ +class ReflectionEmbeddedProperty extends ReflectionProperty +{ + /** + * @var ReflectionProperty reflection property of the class where the embedded object has to be put + */ + private $parentProperty; + + /** + * @var ReflectionProperty reflection property of the embedded object + */ + private $childProperty; + + /** + * @var string name of the embedded class to be eventually instantiated + */ + private $embeddedClass; + + /** + * @var Instantiator|null + */ + private $instantiator; + + /** + * @param ReflectionProperty $parentProperty + * @param ReflectionProperty $childProperty + * @param string $embeddedClass + */ + public function __construct(ReflectionProperty $parentProperty, ReflectionProperty $childProperty, $embeddedClass) + { + $this->parentProperty = $parentProperty; + $this->childProperty = $childProperty; + $this->embeddedClass = (string) $embeddedClass; + + parent::__construct($childProperty->getDeclaringClass()->getName(), $childProperty->getName()); + } + + /** + * {@inheritDoc} + */ + public function getValue($object = null) + { + $embeddedObject = $this->parentProperty->getValue($object); + + if (null === $embeddedObject) { + return null; + } + + return $this->childProperty->getValue($embeddedObject); + } + + /** + * {@inheritDoc} + */ + public function setValue($object, $value = null) + { + $embeddedObject = $this->parentProperty->getValue($object); + + if (null === $embeddedObject) { + $this->instantiator = $this->instantiator ?: new Instantiator(); + + $embeddedObject = $this->instantiator->instantiate($this->embeddedClass); + + $this->parentProperty->setValue($object, $embeddedObject); + } + + $this->childProperty->setValue($embeddedObject, $value); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/SequenceGenerator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/SequenceGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..ba1c45b6425d775a3dec10206389d8d0470d8944 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/SequenceGenerator.php @@ -0,0 +1,42 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("PROPERTY") + */ +final class SequenceGenerator implements Annotation +{ + /** + * @var string + */ + public $sequenceName; + + /** + * @var integer + */ + public $allocationSize = 1; + + /** + * @var integer + */ + public $initialValue = 1; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/SqlResultSetMapping.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/SqlResultSetMapping.php new file mode 100644 index 0000000000000000000000000000000000000000..f5ead7c0f227e5e2e882cfe304e9786f3d6ba037 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/SqlResultSetMapping.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * The SqlResultSetMapping annotation is used to specify the mapping of the result of a native SQL query. + * The SqlResultSetMapping annotation can be applied to an entity or mapped superclass. + * + * @author Fabio B. Silva + * @since 2.3 + * + * @Annotation + * @Target("ANNOTATION") + */ +final class SqlResultSetMapping implements Annotation +{ + /** + * The name given to the result set mapping, and used to refer to it in the methods of the Query API. + * + * @var string + */ + public $name; + + /** + * Specifies the result set mapping to entities. + * + * @var array<\Doctrine\ORM\Mapping\EntityResult> + */ + public $entities = array(); + + /** + * Specifies the result set mapping to scalar values. + * + * @var array<\Doctrine\ORM\Mapping\ColumnResult> + */ + public $columns = array(); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/SqlResultSetMappings.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/SqlResultSetMappings.php new file mode 100644 index 0000000000000000000000000000000000000000..c21b2ab820bfc25a55274e11651405617d40fa07 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/SqlResultSetMappings.php @@ -0,0 +1,40 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * Is used to specify an array of mappings. + * The SqlResultSetMappings annotation can be applied to an entity or mapped superclass. + * + * @author Fabio B. Silva + * @since 2.3 + * + * @Annotation + * @Target("CLASS") + */ +final class SqlResultSetMappings implements Annotation +{ + /** + * One or more SqlResultSetMapping annotations. + * + * @var array<\Doctrine\ORM\Mapping\SqlResultSetMapping> + */ + public $value = array(); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Table.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Table.php new file mode 100644 index 0000000000000000000000000000000000000000..f9f8d4a656de8ed96ceec863d1c9545288bdae56 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Table.php @@ -0,0 +1,52 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("CLASS") + */ +final class Table implements Annotation +{ + /** + * @var string + */ + public $name; + + /** + * @var string + */ + public $schema; + + /** + * @var array<\Doctrine\ORM\Mapping\Index> + */ + public $indexes; + + /** + * @var array<\Doctrine\ORM\Mapping\UniqueConstraint> + */ + public $uniqueConstraints; + + /** + * @var array + */ + public $options = array(); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..543d92ba31cb960060076b4542908be5e702046d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php @@ -0,0 +1,146 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * Naming strategy implementing the underscore naming convention. + * Converts 'MyEntity' to 'my_entity' or 'MY_ENTITY'. + * + * + * @link www.doctrine-project.org + * @since 2.3 + * @author Fabio B. Silva + */ +class UnderscoreNamingStrategy implements NamingStrategy +{ + /** + * @var integer + */ + private $case; + + /** + * Underscore naming strategy construct. + * + * @param integer $case CASE_LOWER | CASE_UPPER + */ + public function __construct($case = CASE_LOWER) + { + $this->case = $case; + } + + /** + * @return integer CASE_LOWER | CASE_UPPER + */ + public function getCase() + { + return $this->case; + } + + /** + * Sets string case CASE_LOWER | CASE_UPPER. + * Alphabetic characters converted to lowercase or uppercase. + * + * @param integer $case + * + * @return void + */ + public function setCase($case) + { + $this->case = $case; + } + + /** + * {@inheritdoc} + */ + public function classToTableName($className) + { + if (strpos($className, '\\') !== false) { + $className = substr($className, strrpos($className, '\\') + 1); + } + + return $this->underscore($className); + } + + /** + * {@inheritdoc} + */ + public function propertyToColumnName($propertyName, $className = null) + { + return $this->underscore($propertyName); + } + + /** + * {@inheritdoc} + */ + public function embeddedFieldToColumnName($propertyName, $embeddedColumnName, $className = null, $embeddedClassName = null) + { + return $this->underscore($propertyName).'_'.$embeddedColumnName; + } + + /** + * {@inheritdoc} + */ + public function referenceColumnName() + { + return $this->case === CASE_UPPER ? 'ID' : 'id'; + } + + /** + * {@inheritdoc} + */ + public function joinColumnName($propertyName, $className = null) + { + return $this->underscore($propertyName) . '_' . $this->referenceColumnName(); + } + + /** + * {@inheritdoc} + */ + public function joinTableName($sourceEntity, $targetEntity, $propertyName = null) + { + return $this->classToTableName($sourceEntity) . '_' . $this->classToTableName($targetEntity); + } + + /** + * {@inheritdoc} + */ + public function joinKeyColumnName($entityName, $referencedColumnName = null) + { + return $this->classToTableName($entityName) . '_' . + ($referencedColumnName ?: $this->referenceColumnName()); + } + + /** + * @param string $string + * + * @return string + */ + private function underscore($string) + { + $string = preg_replace('/(?<=[a-z])([A-Z])/', '_$1', $string); + + if ($this->case === CASE_UPPER) { + return strtoupper($string); + } + + return strtolower($string); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/UniqueConstraint.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/UniqueConstraint.php new file mode 100644 index 0000000000000000000000000000000000000000..f117d1873e807535a89e49ab42978f461bee8665 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/UniqueConstraint.php @@ -0,0 +1,42 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("ANNOTATION") + */ +final class UniqueConstraint implements Annotation +{ + /** + * @var string + */ + public $name; + + /** + * @var array + */ + public $columns; + + /** + * @var array + */ + public $options; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Version.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Version.php new file mode 100644 index 0000000000000000000000000000000000000000..a2377027950138720108f071ec4bf78990ddaec6 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Version.php @@ -0,0 +1,28 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("PROPERTY") + */ +final class Version implements Annotation +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/NativeQuery.php b/vendor/doctrine/orm/lib/Doctrine/ORM/NativeQuery.php new file mode 100644 index 0000000000000000000000000000000000000000..b19f81805643d157f6afa5c4834f3ac49d70e8b9 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/NativeQuery.php @@ -0,0 +1,92 @@ +. + */ + +namespace Doctrine\ORM; + +/** + * Represents a native SQL query. + * + * @author Roman Borschel + * @since 2.0 + */ +final class NativeQuery extends AbstractQuery +{ + /** + * @var string + */ + private $_sql; + + /** + * Sets the SQL of the query. + * + * @param string $sql + * + * @return NativeQuery This query instance. + */ + public function setSQL($sql) + { + $this->_sql = $sql; + + return $this; + } + + /** + * Gets the SQL query. + * + * @return mixed The built SQL query or an array of all SQL queries. + * + * @override + */ + public function getSQL() + { + return $this->_sql; + } + + /** + * {@inheritdoc} + */ + protected function _doExecute() + { + $parameters = array(); + $types = array(); + + foreach ($this->getParameters() as $parameter) { + $name = $parameter->getName(); + $value = $this->processParameterValue($parameter->getValue()); + $type = ($parameter->getValue() === $value) + ? $parameter->getType() + : Query\ParameterTypeInferer::inferType($value); + + $parameters[$name] = $value; + $types[$name] = $type; + } + + if ($parameters && is_int(key($parameters))) { + ksort($parameters); + ksort($types); + + $parameters = array_values($parameters); + $types = array_values($types); + } + + return $this->_em->getConnection()->executeQuery( + $this->_sql, $parameters, $types, $this->_queryCacheProfile + ); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/NoResultException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/NoResultException.php new file mode 100644 index 0000000000000000000000000000000000000000..2cbac8e9d95e82e324951209ada1ccbbdc8e21a4 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/NoResultException.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\ORM; + +/** + * Exception thrown when an ORM query unexpectedly does not return any results. + * + * @author robo + * @since 2.0 + */ +class NoResultException extends UnexpectedResultException +{ + /** + * Constructor. + */ + public function __construct() + { + parent::__construct('No result was found for query although at least one row was expected.'); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/NonUniqueResultException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/NonUniqueResultException.php new file mode 100644 index 0000000000000000000000000000000000000000..55b71300058b6a83d1194cc6d062fbf25293d1af --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/NonUniqueResultException.php @@ -0,0 +1,30 @@ +. + */ + +namespace Doctrine\ORM; + +/** + * Exception thrown when an ORM query unexpectedly returns more than one result. + * + * @author robo + * @since 2.0 + */ +class NonUniqueResultException extends UnexpectedResultException +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php new file mode 100644 index 0000000000000000000000000000000000000000..d4a729d7e2f30ebc15cd1a4e6ed41ffc4e95f2df --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php @@ -0,0 +1,328 @@ +. + */ + +namespace Doctrine\ORM; + +use Doctrine\Common\Cache\Cache as CacheDriver; +use Exception; + +/** + * Base exception class for all ORM exceptions. + * + * @author Roman Borschel + * @since 2.0 + */ +class ORMException extends Exception +{ + /** + * @return ORMException + */ + public static function missingMappingDriverImpl() + { + return new self("It's a requirement to specify a Metadata Driver and pass it ". + "to Doctrine\\ORM\\Configuration::setMetadataDriverImpl()."); + } + + /** + * @param string $queryName + * + * @return ORMException + */ + public static function namedQueryNotFound($queryName) + { + return new self('Could not find a named query by the name "' . $queryName . '"'); + } + + /** + * @param string $nativeQueryName + * + * @return ORMException + */ + public static function namedNativeQueryNotFound($nativeQueryName) + { + return new self('Could not find a named native query by the name "' . $nativeQueryName . '"'); + } + + /** + * @param object $entity + * @param object $relatedEntity + * + * @return ORMException + */ + public static function entityMissingForeignAssignedId($entity, $relatedEntity) + { + return new self( + "Entity of type " . get_class($entity) . " has identity through a foreign entity " . get_class($relatedEntity) . ", " . + "however this entity has no identity itself. You have to call EntityManager#persist() on the related entity " . + "and make sure that an identifier was generated before trying to persist '" . get_class($entity) . "'. In case " . + "of Post Insert ID Generation (such as MySQL Auto-Increment) this means you have to call " . + "EntityManager#flush() between both persist operations." + ); + } + + /** + * @param object $entity + * @param string $field + * + * @return ORMException + */ + public static function entityMissingAssignedIdForField($entity, $field) + { + return new self("Entity of type " . get_class($entity) . " is missing an assigned ID for field '" . $field . "'. " . + "The identifier generation strategy for this entity requires the ID field to be populated before ". + "EntityManager#persist() is called. If you want automatically generated identifiers instead " . + "you need to adjust the metadata mapping accordingly." + ); + } + + /** + * @param string $field + * + * @return ORMException + */ + public static function unrecognizedField($field) + { + return new self("Unrecognized field: $field"); + } + + /** + * + * @param string $class + * @param string $association + * @param string $given + * @param string $expected + * + * @return \Doctrine\ORM\ORMInvalidArgumentException + */ + public static function unexpectedAssociationValue($class, $association, $given, $expected) + { + return new self(sprintf('Found entity of type %s on association %s#%s, but expecting %s', $given, $class, $association, $expected)); + } + + /** + * @param string $className + * @param string $field + * + * @return ORMException + */ + public static function invalidOrientation($className, $field) + { + return new self("Invalid order by orientation specified for " . $className . "#" . $field); + } + + /** + * @param string $mode + * + * @return ORMException + */ + public static function invalidFlushMode($mode) + { + return new self("'$mode' is an invalid flush mode."); + } + + /** + * @return ORMException + */ + public static function entityManagerClosed() + { + return new self("The EntityManager is closed."); + } + + /** + * @param string $mode + * + * @return ORMException + */ + public static function invalidHydrationMode($mode) + { + return new self("'$mode' is an invalid hydration mode."); + } + + /** + * @return ORMException + */ + public static function mismatchedEventManager() + { + return new self("Cannot use different EventManager instances for EntityManager and Connection."); + } + + /** + * @param string $methodName + * + * @return ORMException + */ + public static function findByRequiresParameter($methodName) + { + return new self("You need to pass a parameter to '".$methodName."'"); + } + + /** + * @param string $entityName + * @param string $fieldName + * @param string $method + * + * @return ORMException + */ + public static function invalidFindByCall($entityName, $fieldName, $method) + { + return new self( + "Entity '".$entityName."' has no field '".$fieldName."'. ". + "You can therefore not call '".$method."' on the entities' repository" + ); + } + + /** + * @param string $entityName + * @param string $associationFieldName + * + * @return ORMException + */ + public static function invalidFindByInverseAssociation($entityName, $associationFieldName) + { + return new self( + "You cannot search for the association field '".$entityName."#".$associationFieldName."', ". + "because it is the inverse side of an association. Find methods only work on owning side associations." + ); + } + + /** + * @return ORMException + */ + public static function invalidResultCacheDriver() + { + return new self("Invalid result cache driver; it must implement Doctrine\\Common\\Cache\\Cache."); + } + + /** + * @return ORMException + */ + public static function notSupported() + { + return new self("This behaviour is (currently) not supported by Doctrine 2"); + } + + /** + * @return ORMException + */ + public static function queryCacheNotConfigured() + { + return new self('Query Cache is not configured.'); + } + + /** + * @return ORMException + */ + public static function metadataCacheNotConfigured() + { + return new self('Class Metadata Cache is not configured.'); + } + + /** + * @param \Doctrine\Common\Cache\Cache $cache + * + * @return ORMException + */ + public static function queryCacheUsesNonPersistentCache(CacheDriver $cache) + { + return new self('Query Cache uses a non-persistent cache driver, ' . get_class($cache) . '.'); + } + + /** + * @param \Doctrine\Common\Cache\Cache $cache + * + * @return ORMException + */ + public static function metadataCacheUsesNonPersistentCache(CacheDriver $cache) + { + return new self('Metadata Cache uses a non-persistent cache driver, ' . get_class($cache) . '.'); + } + + /** + * @return ORMException + */ + public static function proxyClassesAlwaysRegenerating() + { + return new self('Proxy Classes are always regenerating.'); + } + + /** + * @param string $entityNamespaceAlias + * + * @return ORMException + */ + public static function unknownEntityNamespace($entityNamespaceAlias) + { + return new self( + "Unknown Entity namespace alias '$entityNamespaceAlias'." + ); + } + + /** + * @param string $className + * + * @return ORMException + */ + public static function invalidEntityRepository($className) + { + return new self("Invalid repository class '".$className."'. It must be a Doctrine\Common\Persistence\ObjectRepository."); + } + + /** + * @param string $className + * @param string $fieldName + * + * @return ORMException + */ + public static function missingIdentifierField($className, $fieldName) + { + return new self("The identifier $fieldName is missing for a query of " . $className); + } + + /** + * @param string $className + * @param string $fieldName + * + * @return ORMException + */ + public static function unrecognizedIdentifierFields($className, $fieldNames) + { + return new self( + "Unrecognized identifier fields: '" . implode("', '", $fieldNames) . "' " . + "are not present on class '" . $className . "'." + ); + } + + /** + * @param string $functionName + * + * @return ORMException + */ + public static function overwriteInternalDQLFunctionNotAllowed($functionName) + { + return new self("It is not allowed to overwrite internal function '$functionName' in the DQL parser through user-defined functions."); + } + + /** + * @return ORMException + */ + public static function cantUseInOperatorOnCompositeKeys() + { + return new self("Can't use IN operator on entities that have composite keys."); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..02c0f99aafb351308b291595dd82501dd5955bae --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php @@ -0,0 +1,226 @@ +. + */ + +namespace Doctrine\ORM; +use Doctrine\ORM\Mapping\ClassMetadata; + +/** + * Contains exception messages for all invalid lifecycle state exceptions inside UnitOfWork + * + * @author Benjamin Eberlei + */ +class ORMInvalidArgumentException extends \InvalidArgumentException +{ + /** + * @param object $entity + * + * @return ORMInvalidArgumentException + */ + static public function scheduleInsertForManagedEntity($entity) + { + return new self("A managed+dirty entity " . self::objToStr($entity) . " can not be scheduled for insertion."); + } + + /** + * @param object $entity + * + * @return ORMInvalidArgumentException + */ + static public function scheduleInsertForRemovedEntity($entity) + { + return new self("Removed entity " . self::objToStr($entity) . " can not be scheduled for insertion."); + } + + /** + * @param object $entity + * + * @return ORMInvalidArgumentException + */ + static public function scheduleInsertTwice($entity) + { + return new self("Entity " . self::objToStr($entity) . " can not be scheduled for insertion twice."); + } + + /** + * @param string $className + * @param object $entity + * + * @return ORMInvalidArgumentException + */ + static public function entityWithoutIdentity($className, $entity) + { + return new self( + "The given entity of type '" . $className . "' (".self::objToStr($entity).") has no identity/no " . + "id values set. It cannot be added to the identity map." + ); + } + + /** + * @param object $entity + * + * @return ORMInvalidArgumentException + */ + static public function readOnlyRequiresManagedEntity($entity) + { + return new self("Only managed entities can be marked or checked as read only. But " . self::objToStr($entity) . " is not"); + } + + /** + * @param array $assoc + * @param object $entry + * + * @return ORMInvalidArgumentException + */ + static public function newEntityFoundThroughRelationship(array $assoc, $entry) + { + return new self("A new entity was found through the relationship '" + . $assoc['sourceEntity'] . "#" . $assoc['fieldName'] . "' that was not" + . " configured to cascade persist operations for entity: " . self::objToStr($entry) . "." + . " To solve this issue: Either explicitly call EntityManager#persist()" + . " on this unknown entity or configure cascade persist " + . " this association in the mapping for example @ManyToOne(..,cascade={\"persist\"})." + . (method_exists($entry, '__toString') ? + "": + " If you cannot find out which entity causes the problem" + ." implement '" . $assoc['targetEntity'] . "#__toString()' to get a clue.")); + } + + /** + * @param array $assoc + * @param object $entry + * + * @return ORMInvalidArgumentException + */ + static public function detachedEntityFoundThroughRelationship(array $assoc, $entry) + { + return new self("A detached entity of type " . $assoc['targetEntity'] . " (" . self::objToStr($entry) . ") " + . " was found through the relationship '" . $assoc['sourceEntity'] . "#" . $assoc['fieldName'] . "' " + . "during cascading a persist operation."); + } + + /** + * @param object $entity + * + * @return ORMInvalidArgumentException + */ + static public function entityNotManaged($entity) + { + return new self("Entity " . self::objToStr($entity) . " is not managed. An entity is managed if its fetched " . + "from the database or registered as new through EntityManager#persist"); + } + + /** + * @param object $entity + * @param string $operation + * + * @return ORMInvalidArgumentException + */ + static public function entityHasNoIdentity($entity, $operation) + { + return new self("Entity has no identity, therefore " . $operation ." cannot be performed. " . self::objToStr($entity)); + } + + /** + * @param object $entity + * @param string $operation + * + * @return ORMInvalidArgumentException + */ + static public function entityIsRemoved($entity, $operation) + { + return new self("Entity is removed, therefore " . $operation ." cannot be performed. " . self::objToStr($entity)); + } + + /** + * @param object $entity + * @param string $operation + * + * @return ORMInvalidArgumentException + */ + static public function detachedEntityCannot($entity, $operation) + { + return new self("Detached entity " . self::objToStr($entity) . " cannot be " . $operation); + } + + /** + * @param string $context + * @param mixed $given + * @param int $parameterIndex + * + * @return ORMInvalidArgumentException + */ + public static function invalidObject($context, $given, $parameterIndex = 1) + { + return new self($context . ' expects parameter ' . $parameterIndex . + ' to be an entity object, '. gettype($given) . ' given.'); + } + + /** + * @return ORMInvalidArgumentException + */ + public static function invalidCompositeIdentifier() + { + return new self("Binding an entity with a composite primary key to a query is not supported. " . + "You should split the parameter into the explicit fields and bind them separately."); + } + + /** + * @return ORMInvalidArgumentException + */ + public static function invalidIdentifierBindingEntity() + { + return new self("Binding entities to query parameters only allowed for entities that have an identifier."); + } + + /** + * @param ClassMetadata $targetClass + * @param array $assoc + * @param mixed $actualValue + * + * @return self + */ + public static function invalidAssociation(ClassMetadata $targetClass, $assoc, $actualValue) + { + $expectedType = 'Doctrine\Common\Collections\Collection|array'; + + if (($assoc['type'] & ClassMetadata::TO_ONE) > 0) { + $expectedType = $targetClass->getName(); + } + + return new self(sprintf( + 'Expected value of type "%s" for association field "%s#$%s", got "%s" instead.', + $expectedType, + $assoc['sourceEntity'], + $assoc['fieldName'], + is_object($actualValue) ? get_class($actualValue) : gettype($actualValue) + )); + } + + /** + * Helper method to show an object as string. + * + * @param object $obj + * + * @return string + */ + private static function objToStr($obj) + { + return method_exists($obj, '__toString') ? (string)$obj : get_class($obj).'@'.spl_object_hash($obj); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/OptimisticLockException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/OptimisticLockException.php new file mode 100644 index 0000000000000000000000000000000000000000..ecd5445b71bf469c396ead4d6465e81e1018d7e0 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/OptimisticLockException.php @@ -0,0 +1,90 @@ +. + */ + +namespace Doctrine\ORM; + +/** + * An OptimisticLockException is thrown when a version check on an object + * that uses optimistic locking through a version field fails. + * + * @author Roman Borschel + * @author Benjamin Eberlei + * @since 2.0 + */ +class OptimisticLockException extends ORMException +{ + /** + * @var object|null + */ + private $entity; + + /** + * @param string $msg + * @param object $entity + */ + public function __construct($msg, $entity) + { + parent::__construct($msg); + $this->entity = $entity; + } + + /** + * Gets the entity that caused the exception. + * + * @return object|null + */ + public function getEntity() + { + return $this->entity; + } + + /** + * @param object $entity + * + * @return OptimisticLockException + */ + public static function lockFailed($entity) + { + return new self("The optimistic lock on an entity failed.", $entity); + } + + /** + * @param object $entity + * @param int $expectedLockVersion + * @param int $actualLockVersion + * + * @return OptimisticLockException + */ + public static function lockFailedVersionMismatch($entity, $expectedLockVersion, $actualLockVersion) + { + $expectedLockVersion = ($expectedLockVersion instanceof \DateTime) ? $expectedLockVersion->getTimestamp() : $expectedLockVersion; + $actualLockVersion = ($actualLockVersion instanceof \DateTime) ? $actualLockVersion->getTimestamp() : $actualLockVersion; + return new self("The optimistic lock failed, version " . $expectedLockVersion . " was expected, but is actually ".$actualLockVersion, $entity); + } + + /** + * @param string $entityName + * + * @return OptimisticLockException + */ + public static function notVersioned($entityName) + { + return new self("Cannot obtain optimistic lock on unversioned entity " . $entityName, null); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/PersistentCollection.php b/vendor/doctrine/orm/lib/Doctrine/ORM/PersistentCollection.php new file mode 100644 index 0000000000000000000000000000000000000000..c2e11dfbe309756babdaa61e8049b2c2508e972e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/PersistentCollection.php @@ -0,0 +1,711 @@ +. + */ + +namespace Doctrine\ORM; + +use Closure; +use Doctrine\Common\Collections\AbstractLazyCollection; +use Doctrine\Common\Collections\Collection; +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Collections\Selectable; +use Doctrine\Common\Collections\Criteria; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Mapping\ClassMetadataInfo; + +/** + * A PersistentCollection represents a collection of elements that have persistent state. + * + * Collections of entities represent only the associations (links) to those entities. + * That means, if the collection is part of a many-many mapping and you remove + * entities from the collection, only the links in the relation table are removed (on flush). + * Similarly, if you remove entities from a collection that is part of a one-many + * mapping this will only result in the nulling out of the foreign keys on flush. + * + * @since 2.0 + * @author Konsta Vesterinen + * @author Roman Borschel + * @author Giorgio Sironi + * @author Stefano Rodriguez + */ +final class PersistentCollection extends AbstractLazyCollection implements Selectable +{ + /** + * A snapshot of the collection at the moment it was fetched from the database. + * This is used to create a diff of the collection at commit time. + * + * @var array + */ + private $snapshot = array(); + + /** + * The entity that owns this collection. + * + * @var object + */ + private $owner; + + /** + * The association mapping the collection belongs to. + * This is currently either a OneToManyMapping or a ManyToManyMapping. + * + * @var array + */ + private $association; + + /** + * The EntityManager that manages the persistence of the collection. + * + * @var \Doctrine\ORM\EntityManagerInterface + */ + private $em; + + /** + * The name of the field on the target entities that points to the owner + * of the collection. This is only set if the association is bi-directional. + * + * @var string + */ + private $backRefFieldName; + + /** + * The class descriptor of the collection's entity type. + * + * @var ClassMetadata + */ + private $typeClass; + + /** + * Whether the collection is dirty and needs to be synchronized with the database + * when the UnitOfWork that manages its persistent state commits. + * + * @var boolean + */ + private $isDirty = false; + + /** + * Creates a new persistent collection. + * + * @param EntityManagerInterface $em The EntityManager the collection will be associated with. + * @param ClassMetadata $class The class descriptor of the entity type of this collection. + * @param Collection $collection The collection elements. + */ + public function __construct(EntityManagerInterface $em, $class, Collection $collection) + { + $this->collection = $collection; + $this->em = $em; + $this->typeClass = $class; + $this->initialized = true; + } + + /** + * INTERNAL: + * Sets the collection's owning entity together with the AssociationMapping that + * describes the association between the owner and the elements of the collection. + * + * @param object $entity + * @param array $assoc + * + * @return void + */ + public function setOwner($entity, array $assoc) + { + $this->owner = $entity; + $this->association = $assoc; + $this->backRefFieldName = $assoc['inversedBy'] ?: $assoc['mappedBy']; + } + + /** + * INTERNAL: + * Gets the collection owner. + * + * @return object + */ + public function getOwner() + { + return $this->owner; + } + + /** + * @return Mapping\ClassMetadata + */ + public function getTypeClass() + { + return $this->typeClass; + } + + /** + * INTERNAL: + * Adds an element to a collection during hydration. This will automatically + * complete bidirectional associations in the case of a one-to-many association. + * + * @param mixed $element The element to add. + * + * @return void + */ + public function hydrateAdd($element) + { + $this->collection->add($element); + + // If _backRefFieldName is set and its a one-to-many association, + // we need to set the back reference. + if ($this->backRefFieldName && $this->association['type'] === ClassMetadata::ONE_TO_MANY) { + // Set back reference to owner + $this->typeClass->reflFields[$this->backRefFieldName]->setValue( + $element, $this->owner + ); + + $this->em->getUnitOfWork()->setOriginalEntityProperty( + spl_object_hash($element), $this->backRefFieldName, $this->owner + ); + } + } + + /** + * INTERNAL: + * Sets a keyed element in the collection during hydration. + * + * @param mixed $key The key to set. + * @param mixed $element The element to set. + * + * @return void + */ + public function hydrateSet($key, $element) + { + $this->collection->set($key, $element); + + // If _backRefFieldName is set, then the association is bidirectional + // and we need to set the back reference. + if ($this->backRefFieldName && $this->association['type'] === ClassMetadata::ONE_TO_MANY) { + // Set back reference to owner + $this->typeClass->reflFields[$this->backRefFieldName]->setValue( + $element, $this->owner + ); + } + } + + /** + * Initializes the collection by loading its contents from the database + * if the collection is not yet initialized. + * + * @return void + */ + public function initialize() + { + if ($this->initialized || ! $this->association) { + return; + } + + $this->doInitialize(); + + $this->initialized = true; + } + + /** + * INTERNAL: + * Tells this collection to take a snapshot of its current state. + * + * @return void + */ + public function takeSnapshot() + { + $this->snapshot = $this->collection->toArray(); + $this->isDirty = false; + } + + /** + * INTERNAL: + * Returns the last snapshot of the elements in the collection. + * + * @return array The last snapshot of the elements. + */ + public function getSnapshot() + { + return $this->snapshot; + } + + /** + * INTERNAL: + * getDeleteDiff + * + * @return array + */ + public function getDeleteDiff() + { + return array_udiff_assoc( + $this->snapshot, + $this->collection->toArray(), + function($a, $b) { return $a === $b ? 0 : 1; } + ); + } + + /** + * INTERNAL: + * getInsertDiff + * + * @return array + */ + public function getInsertDiff() + { + return array_udiff_assoc( + $this->collection->toArray(), + $this->snapshot, + function($a, $b) { return $a === $b ? 0 : 1; } + ); + } + + /** + * INTERNAL: Gets the association mapping of the collection. + * + * @return array + */ + public function getMapping() + { + return $this->association; + } + + /** + * Marks this collection as changed/dirty. + * + * @return void + */ + private function changed() + { + if ($this->isDirty) { + return; + } + + $this->isDirty = true; + + if ($this->association !== null && + $this->association['isOwningSide'] && + $this->association['type'] === ClassMetadata::MANY_TO_MANY && + $this->owner && + $this->em->getClassMetadata(get_class($this->owner))->isChangeTrackingNotify()) { + $this->em->getUnitOfWork()->scheduleForDirtyCheck($this->owner); + } + } + + /** + * Gets a boolean flag indicating whether this collection is dirty which means + * its state needs to be synchronized with the database. + * + * @return boolean TRUE if the collection is dirty, FALSE otherwise. + */ + public function isDirty() + { + return $this->isDirty; + } + + /** + * Sets a boolean flag, indicating whether this collection is dirty. + * + * @param boolean $dirty Whether the collection should be marked dirty or not. + * + * @return void + */ + public function setDirty($dirty) + { + $this->isDirty = $dirty; + } + + /** + * Sets the initialized flag of the collection, forcing it into that state. + * + * @param boolean $bool + * + * @return void + */ + public function setInitialized($bool) + { + $this->initialized = $bool; + } + + /** + * {@inheritdoc} + */ + public function remove($key) + { + // TODO: If the keys are persistent as well (not yet implemented) + // and the collection is not initialized and orphanRemoval is + // not used we can issue a straight SQL delete/update on the + // association (table). Without initializing the collection. + $removed = parent::remove($key); + + if ( ! $removed) { + return $removed; + } + + $this->changed(); + + if ($this->association !== null && + $this->association['type'] & ClassMetadata::TO_MANY && + $this->owner && + $this->association['orphanRemoval']) { + $this->em->getUnitOfWork()->scheduleOrphanRemoval($removed); + } + + return $removed; + } + + /** + * {@inheritdoc} + */ + public function removeElement($element) + { + if ( ! $this->initialized && $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) { + if ($this->collection->contains($element)) { + return $this->collection->removeElement($element); + } + + $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); + + if ($persister->removeElement($this, $element)) { + return $element; + } + + return null; + } + + $removed = parent::removeElement($element); + + if ( ! $removed) { + return $removed; + } + + $this->changed(); + + if ($this->association !== null && + $this->association['type'] & ClassMetadata::TO_MANY && + $this->owner && + $this->association['orphanRemoval']) { + $this->em->getUnitOfWork()->scheduleOrphanRemoval($element); + } + + return $removed; + } + + /** + * {@inheritdoc} + */ + public function containsKey($key) + { + if (! $this->initialized && $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY + && isset($this->association['indexBy'])) { + $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); + + return $this->collection->containsKey($key) || $persister->containsKey($this, $key); + } + + return parent::containsKey($key); + } + + /** + * {@inheritdoc} + */ + public function contains($element) + { + if ( ! $this->initialized && $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) { + $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); + + return $this->collection->contains($element) || $persister->contains($this, $element); + } + + return parent::contains($element); + } + + /** + * {@inheritdoc} + */ + public function get($key) + { + if ( ! $this->initialized + && $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY + && isset($this->association['indexBy']) + ) { + if (!$this->typeClass->isIdentifierComposite && $this->typeClass->isIdentifier($this->association['indexBy'])) { + return $this->em->find($this->typeClass->name, $key); + } + + return $this->em->getUnitOfWork()->getCollectionPersister($this->association)->get($this, $key); + } + + return parent::get($key); + } + + /** + * {@inheritdoc} + */ + public function count() + { + if ( ! $this->initialized && $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) { + $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); + + return $persister->count($this) + ($this->isDirty ? $this->collection->count() : 0); + } + + return parent::count(); + } + + /** + * {@inheritdoc} + */ + public function set($key, $value) + { + parent::set($key, $value); + + $this->changed(); + } + + /** + * {@inheritdoc} + */ + public function add($value) + { + $this->collection->add($value); + + $this->changed(); + + return true; + } + + /* ArrayAccess implementation */ + + /** + * {@inheritdoc} + */ + public function offsetExists($offset) + { + return $this->containsKey($offset); + } + + /** + * {@inheritdoc} + */ + public function offsetGet($offset) + { + return $this->get($offset); + } + + /** + * {@inheritdoc} + */ + public function offsetSet($offset, $value) + { + if ( ! isset($offset)) { + return $this->add($value); + } + + return $this->set($offset, $value); + } + + /** + * {@inheritdoc} + */ + public function offsetUnset($offset) + { + return $this->remove($offset); + } + + /** + * {@inheritdoc} + */ + public function isEmpty() + { + return $this->collection->isEmpty() && $this->count() === 0; + } + + /** + * {@inheritdoc} + */ + public function clear() + { + if ($this->initialized && $this->isEmpty()) { + $this->collection->clear(); + + return; + } + + $uow = $this->em->getUnitOfWork(); + + if ($this->association['type'] & ClassMetadata::TO_MANY && + $this->association['orphanRemoval'] && + $this->owner) { + // we need to initialize here, as orphan removal acts like implicit cascadeRemove, + // hence for event listeners we need the objects in memory. + $this->initialize(); + + foreach ($this->collection as $element) { + $uow->scheduleOrphanRemoval($element); + } + } + + $this->collection->clear(); + + $this->initialized = true; // direct call, {@link initialize()} is too expensive + + if ($this->association['isOwningSide'] && $this->owner) { + $this->changed(); + + $uow->scheduleCollectionDeletion($this); + + $this->takeSnapshot(); + } + } + + /** + * Called by PHP when this collection is serialized. Ensures that only the + * elements are properly serialized. + * + * Internal note: Tried to implement Serializable first but that did not work well + * with circular references. This solution seems simpler and works well. + * + * @return array + */ + public function __sleep() + { + return array('collection', 'initialized'); + } + + /** + * Extracts a slice of $length elements starting at position $offset from the Collection. + * + * If $length is null it returns all elements from $offset to the end of the Collection. + * Keys have to be preserved by this method. Calling this method will only return the + * selected slice and NOT change the elements contained in the collection slice is called on. + * + * @param int $offset + * @param int|null $length + * + * @return array + */ + public function slice($offset, $length = null) + { + if ( ! $this->initialized && ! $this->isDirty && $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) { + $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); + + return $persister->slice($this, $offset, $length); + } + + return parent::slice($offset, $length); + } + + /** + * Cleans up internal state of cloned persistent collection. + * + * The following problems have to be prevented: + * 1. Added entities are added to old PC + * 2. New collection is not dirty, if reused on other entity nothing + * changes. + * 3. Snapshot leads to invalid diffs being generated. + * 4. Lazy loading grabs entities from old owner object. + * 5. New collection is connected to old owner and leads to duplicate keys. + * + * @return void + */ + public function __clone() + { + if (is_object($this->collection)) { + $this->collection = clone $this->collection; + } + + $this->initialize(); + + $this->owner = null; + $this->snapshot = array(); + + $this->changed(); + } + + /** + * Selects all elements from a selectable that match the expression and + * return a new collection containing these elements. + * + * @param \Doctrine\Common\Collections\Criteria $criteria + * + * @return Collection + * + * @throws \RuntimeException + */ + public function matching(Criteria $criteria) + { + if ($this->isDirty) { + $this->initialize(); + } + + if ($this->initialized) { + return $this->collection->matching($criteria); + } + + if ($this->association['type'] === ClassMetadata::MANY_TO_MANY) { + $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); + + return new ArrayCollection($persister->loadCriteria($this, $criteria)); + } + + $builder = Criteria::expr(); + $ownerExpression = $builder->eq($this->backRefFieldName, $this->owner); + $expression = $criteria->getWhereExpression(); + $expression = $expression ? $builder->andX($expression, $ownerExpression) : $ownerExpression; + + $criteria = clone $criteria; + $criteria->where($expression); + + $persister = $this->em->getUnitOfWork()->getEntityPersister($this->association['targetEntity']); + + return ($this->association['fetch'] === ClassMetadataInfo::FETCH_EXTRA_LAZY) + ? new LazyCriteriaCollection($persister, $criteria) + : new ArrayCollection($persister->loadCriteria($criteria)); + } + + /** + * Retrieves the wrapped Collection instance. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function unwrap() + { + return $this->collection; + } + + /** + * {@inheritdoc} + */ + protected function doInitialize() + { + // Has NEW objects added through add(). Remember them. + $newObjects = array(); + + if ($this->isDirty) { + $newObjects = $this->collection->toArray(); + } + + $this->collection->clear(); + $this->em->getUnitOfWork()->loadCollection($this); + $this->takeSnapshot(); + + // Reattach NEW objects added through add(), if any. + if ($newObjects) { + foreach ($newObjects as $obj) { + $this->collection->add($obj); + } + + $this->isDirty = true; + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Collection/AbstractCollectionPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Collection/AbstractCollectionPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..2e85b67f3b2f46afaaea5a002f879fd2797810c9 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Collection/AbstractCollectionPersister.php @@ -0,0 +1,95 @@ +. + */ + +namespace Doctrine\ORM\Persisters\Collection; + +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\UnitOfWork; + +/** + * Base class for all collection persisters. + * + * @since 2.0 + * @author Roman Borschel + */ +abstract class AbstractCollectionPersister implements CollectionPersister +{ + /** + * @var EntityManagerInterface + */ + protected $em; + + /** + * @var \Doctrine\DBAL\Connection + */ + protected $conn; + + /** + * @var UnitOfWork + */ + protected $uow; + + /** + * The database platform. + * + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + protected $platform; + + /** + * The quote strategy. + * + * @var \Doctrine\ORM\Mapping\QuoteStrategy + */ + protected $quoteStrategy; + + /** + * Initializes a new instance of a class derived from AbstractCollectionPersister. + * + * @param EntityManagerInterface $em + */ + public function __construct(EntityManagerInterface $em) + { + $this->em = $em; + $this->uow = $em->getUnitOfWork(); + $this->conn = $em->getConnection(); + $this->platform = $this->conn->getDatabasePlatform(); + $this->quoteStrategy = $em->getConfiguration()->getQuoteStrategy(); + } + + /** + * Check if entity is in a valid state for operations. + * + * @param object $entity + * + * @return bool + */ + protected function isValidEntityState($entity) + { + $entityState = $this->uow->getEntityState($entity, UnitOfWork::STATE_NEW); + + if ($entityState === UnitOfWork::STATE_NEW) { + return false; + } + + // If Entity is scheduled for inclusion, it is not in this collection. + // We can assure that because it would have return true before on array check + return ! ($entityState === UnitOfWork::STATE_MANAGED && $this->uow->isScheduledForInsert($entity)); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Collection/CollectionPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Collection/CollectionPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..36b5706a07869e06a2a5b630c7b1f7422dfa7dcc --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Collection/CollectionPersister.php @@ -0,0 +1,122 @@ +. + */ + +namespace Doctrine\ORM\Persisters\Collection; + +use Doctrine\Common\Collections\Criteria; +use Doctrine\ORM\PersistentCollection; + +/** + * Collection persister interface + * Define the behavior that should be implemented by all collection persisters. + * + * @author Fabio B. Silva + * @since 2.5 + */ +interface CollectionPersister +{ + /** + * Deletes the persistent state represented by the given collection. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * + * @return void + */ + public function delete(PersistentCollection $collection); + + /** + * Updates the given collection, synchronizing its state with the database + * by inserting, updating and deleting individual elements. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * + * @return void + */ + public function update(PersistentCollection $collection); + + /** + * Counts the size of this persistent collection. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * + * @return integer + */ + public function count(PersistentCollection $collection); + + /** + * Slices elements. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * @param integer $offset + * @param integer $length + * + * @return array + */ + public function slice(PersistentCollection $collection, $offset, $length = null); + + /** + * Checks for existence of an element. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * @param object $element + * + * @return boolean + */ + public function contains(PersistentCollection $collection, $element); + + /** + * Checks for existence of a key. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * @param mixed $key + * + * @return boolean + */ + public function containsKey(PersistentCollection $collection, $key); + + /** + * Removes an element. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * @param object $element + * + * @return mixed + */ + public function removeElement(PersistentCollection $collection, $element); + + /** + * Gets an element by key. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * @param mixed $index + * + * @return mixed + */ + public function get(PersistentCollection $collection, $index); + + /** + * Loads association entities matching the given Criteria object. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * @param \Doctrine\Common\Collections\Criteria $criteria + * + * @return array + */ + public function loadCriteria(PersistentCollection $collection, Criteria $criteria); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..bf9f14e688ba788947431a8e7a5d262a60e098ee --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php @@ -0,0 +1,724 @@ +. + */ + +namespace Doctrine\ORM\Persisters\Collection; + +use Doctrine\Common\Collections\Criteria; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Persisters\SqlExpressionVisitor; +use Doctrine\ORM\Persisters\SqlValueVisitor; +use Doctrine\ORM\PersistentCollection; +use Doctrine\ORM\Query; +use Doctrine\ORM\Utility\PersisterHelper; + +/** + * Persister for many-to-many collections. + * + * @author Roman Borschel + * @author Guilherme Blanco + * @author Alexander + * @since 2.0 + */ +class ManyToManyPersister extends AbstractCollectionPersister +{ + /** + * {@inheritdoc} + */ + public function delete(PersistentCollection $collection) + { + $mapping = $collection->getMapping(); + + if ( ! $mapping['isOwningSide']) { + return; // ignore inverse side + } + + $this->conn->executeUpdate($this->getDeleteSQL($collection), $this->getDeleteSQLParameters($collection)); + } + + /** + * {@inheritdoc} + */ + public function update(PersistentCollection $collection) + { + $mapping = $collection->getMapping(); + + if ( ! $mapping['isOwningSide']) { + return; // ignore inverse side + } + + list($deleteSql, $deleteTypes) = $this->getDeleteRowSQL($collection); + list($insertSql, $insertTypes) = $this->getInsertRowSQL($collection); + + foreach ($collection->getDeleteDiff() as $element) { + $this->conn->executeUpdate( + $deleteSql, + $this->getDeleteRowSQLParameters($collection, $element), + $deleteTypes + ); + } + + foreach ($collection->getInsertDiff() as $element) { + $this->conn->executeUpdate( + $insertSql, + $this->getInsertRowSQLParameters($collection, $element), + $insertTypes + ); + } + } + + /** + * {@inheritdoc} + */ + public function get(PersistentCollection $collection, $index) + { + $mapping = $collection->getMapping(); + + if ( ! isset($mapping['indexBy'])) { + throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections."); + } + + $persister = $this->uow->getEntityPersister($mapping['targetEntity']); + $mappedKey = $mapping['isOwningSide'] + ? $mapping['inversedBy'] + : $mapping['mappedBy']; + + return $persister->load(array($mappedKey => $collection->getOwner(), $mapping['indexBy'] => $index), null, $mapping, array(), 0, 1); + } + + /** + * {@inheritdoc} + */ + public function count(PersistentCollection $collection) + { + $conditions = array(); + $params = array(); + $types = array(); + $mapping = $collection->getMapping(); + $id = $this->uow->getEntityIdentifier($collection->getOwner()); + $sourceClass = $this->em->getClassMetadata($mapping['sourceEntity']); + $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); + $association = ( ! $mapping['isOwningSide']) + ? $targetClass->associationMappings[$mapping['mappedBy']] + : $mapping; + + $joinTableName = $this->quoteStrategy->getJoinTableName($association, $sourceClass, $this->platform); + $joinColumns = ( ! $mapping['isOwningSide']) + ? $association['joinTable']['inverseJoinColumns'] + : $association['joinTable']['joinColumns']; + + foreach ($joinColumns as $joinColumn) { + $columnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $sourceClass, $this->platform); + $referencedName = $joinColumn['referencedColumnName']; + $conditions[] = 't.' . $columnName . ' = ?'; + $params[] = $id[$sourceClass->getFieldForColumn($referencedName)]; + $types[] = PersisterHelper::getTypeOfColumn($referencedName, $sourceClass, $this->em); + } + + list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($mapping); + + if ($filterSql) { + $conditions[] = $filterSql; + } + + // If there is a provided criteria, make part of conditions + // @todo Fix this. Current SQL returns something like: + // + /*if ($criteria && ($expression = $criteria->getWhereExpression()) !== null) { + // A join is needed on the target entity + $targetTableName = $this->quoteStrategy->getTableName($targetClass, $this->platform); + $targetJoinSql = ' JOIN ' . $targetTableName . ' te' + . ' ON' . implode(' AND ', $this->getOnConditionSQL($association)); + + // And criteria conditions needs to be added + $persister = $this->uow->getEntityPersister($targetClass->name); + $visitor = new SqlExpressionVisitor($persister, $targetClass); + $conditions[] = $visitor->dispatch($expression); + + $joinTargetEntitySQL = $targetJoinSql . $joinTargetEntitySQL; + }*/ + + $sql = 'SELECT COUNT(*)' + . ' FROM ' . $joinTableName . ' t' + . $joinTargetEntitySQL + . ' WHERE ' . implode(' AND ', $conditions); + + return $this->conn->fetchColumn($sql, $params, 0, $types); + } + + /** + * {@inheritDoc} + */ + public function slice(PersistentCollection $collection, $offset, $length = null) + { + $mapping = $collection->getMapping(); + $persister = $this->uow->getEntityPersister($mapping['targetEntity']); + + return $persister->getManyToManyCollection($mapping, $collection->getOwner(), $offset, $length); + } + /** + * {@inheritdoc} + */ + public function containsKey(PersistentCollection $collection, $key) + { + $mapping = $collection->getMapping(); + + if ( ! isset($mapping['indexBy'])) { + throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections."); + } + + list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictionsWithKey($collection, $key, true); + + $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); + + return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); + } + + /** + * {@inheritDoc} + */ + public function contains(PersistentCollection $collection, $element) + { + if ( ! $this->isValidEntityState($element)) { + return false; + } + + list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, true); + + $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); + + return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); + } + + /** + * {@inheritDoc} + */ + public function removeElement(PersistentCollection $collection, $element) + { + if ( ! $this->isValidEntityState($element)) { + return false; + } + + list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, false); + + $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); + + return (bool) $this->conn->executeUpdate($sql, $params, $types); + } + + /** + * {@inheritDoc} + */ + public function loadCriteria(PersistentCollection $collection, Criteria $criteria) + { + $mapping = $collection->getMapping(); + $owner = $collection->getOwner(); + $ownerMetadata = $this->em->getClassMetadata(get_class($owner)); + $whereClauses = $params = array(); + + foreach ($mapping['relationToSourceKeyColumns'] as $key => $value) { + $whereClauses[] = sprintf('t.%s = ?', $key); + $params[] = $ownerMetadata->getFieldValue($owner, $value); + } + + $parameters = $this->expandCriteriaParameters($criteria); + + foreach ($parameters as $parameter) { + list($name, $value) = $parameter; + $whereClauses[] = sprintf('te.%s = ?', $name); + $params[] = $value; + } + + $mapping = $collection->getMapping(); + $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); + $tableName = $this->quoteStrategy->getTableName($targetClass, $this->platform); + $joinTable = $this->quoteStrategy->getJoinTableName($mapping, $ownerMetadata, $this->platform); + $onConditions = $this->getOnConditionSQL($mapping); + + $rsm = new Query\ResultSetMappingBuilder($this->em); + $rsm->addRootEntityFromClassMetadata($mapping['targetEntity'], 'te'); + + $sql = 'SELECT ' . $rsm->generateSelectClause() + . ' FROM ' . $tableName . ' te' + . ' JOIN ' . $joinTable . ' t ON' + . implode(' AND ', $onConditions) + . ' WHERE ' . implode(' AND ', $whereClauses); + + $stmt = $this->conn->executeQuery($sql, $params); + + return $this + ->em + ->newHydrator(Query::HYDRATE_OBJECT) + ->hydrateAll($stmt, $rsm); + } + + /** + * Generates the filter SQL for a given mapping. + * + * This method is not used for actually grabbing the related entities + * but when the extra-lazy collection methods are called on a filtered + * association. This is why besides the many to many table we also + * have to join in the actual entities table leading to additional + * JOIN. + * + * @param array $mapping Array containing mapping information. + * + * @return string[] ordered tuple: + * - JOIN condition to add to the SQL + * - WHERE condition to add to the SQL + */ + public function getFilterSql($mapping) + { + $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); + $rootClass = $this->em->getClassMetadata($targetClass->rootEntityName); + $filterSql = $this->generateFilterConditionSQL($rootClass, 'te'); + + if ('' === $filterSql) { + return array('', ''); + } + + // A join is needed if there is filtering on the target entity + $tableName = $this->quoteStrategy->getTableName($rootClass, $this->platform); + $joinSql = ' JOIN ' . $tableName . ' te' + . ' ON' . implode(' AND ', $this->getOnConditionSQL($mapping)); + + return array($joinSql, $filterSql); + } + + /** + * Generates the filter SQL for a given entity and table alias. + * + * @param ClassMetadata $targetEntity Metadata of the target entity. + * @param string $targetTableAlias The table alias of the joined/selected table. + * + * @return string The SQL query part to add to a query. + */ + protected function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) + { + $filterClauses = array(); + + foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { + if ($filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { + $filterClauses[] = '(' . $filterExpr . ')'; + } + } + + return $filterClauses + ? '(' . implode(' AND ', $filterClauses) . ')' + : ''; + } + + /** + * Generate ON condition + * + * @param array $mapping + * + * @return array + */ + protected function getOnConditionSQL($mapping) + { + $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); + $association = ( ! $mapping['isOwningSide']) + ? $targetClass->associationMappings[$mapping['mappedBy']] + : $mapping; + + $joinColumns = $mapping['isOwningSide'] + ? $association['joinTable']['inverseJoinColumns'] + : $association['joinTable']['joinColumns']; + + $conditions = array(); + + foreach ($joinColumns as $joinColumn) { + $joinColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); + $refColumnName = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); + + $conditions[] = ' t.' . $joinColumnName . ' = ' . 'te.' . $refColumnName; + } + + return $conditions; + } + + /** + * {@inheritdoc} + * + * @override + */ + protected function getDeleteSQL(PersistentCollection $collection) + { + $columns = array(); + $mapping = $collection->getMapping(); + $class = $this->em->getClassMetadata(get_class($collection->getOwner())); + $joinTable = $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform); + + foreach ($mapping['joinTable']['joinColumns'] as $joinColumn) { + $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); + } + + return 'DELETE FROM ' . $joinTable + . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?'; + } + + /** + * {@inheritdoc} + * + * Internal note: Order of the parameters must be the same as the order of the columns in getDeleteSql. + * @override + */ + protected function getDeleteSQLParameters(PersistentCollection $collection) + { + $mapping = $collection->getMapping(); + $identifier = $this->uow->getEntityIdentifier($collection->getOwner()); + + // Optimization for single column identifier + if (count($mapping['relationToSourceKeyColumns']) === 1) { + return array(reset($identifier)); + } + + // Composite identifier + $sourceClass = $this->em->getClassMetadata($mapping['sourceEntity']); + $params = array(); + + foreach ($mapping['relationToSourceKeyColumns'] as $columnName => $refColumnName) { + $params[] = isset($sourceClass->fieldNames[$refColumnName]) + ? $identifier[$sourceClass->fieldNames[$refColumnName]] + : $identifier[$sourceClass->getFieldForColumn($columnName)]; + } + + return $params; + } + + /** + * Gets the SQL statement used for deleting a row from the collection. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * + * @return string[]|string[][] ordered tuple containing the SQL to be executed and an array + * of types for bound parameters + */ + protected function getDeleteRowSQL(PersistentCollection $collection) + { + $mapping = $collection->getMapping(); + $class = $this->em->getClassMetadata($mapping['sourceEntity']); + $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); + $columns = array(); + $types = array(); + + foreach ($mapping['joinTable']['joinColumns'] as $joinColumn) { + $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); + $types[] = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $class, $this->em); + } + + foreach ($mapping['joinTable']['inverseJoinColumns'] as $joinColumn) { + $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); + $types[] = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em); + } + + return array( + 'DELETE FROM ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) + . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?', + $types, + ); + } + + /** + * Gets the SQL parameters for the corresponding SQL statement to delete the given + * element from the given collection. + * + * Internal note: Order of the parameters must be the same as the order of the columns in getDeleteRowSql. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * @param mixed $element + * + * @return array + */ + protected function getDeleteRowSQLParameters(PersistentCollection $collection, $element) + { + return $this->collectJoinTableColumnParameters($collection, $element); + } + + /** + * Gets the SQL statement used for inserting a row in the collection. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * + * @return string[]|string[][] ordered tuple containing the SQL to be executed and an array + * of types for bound parameters + */ + protected function getInsertRowSQL(PersistentCollection $collection) + { + $columns = array(); + $types = array(); + $mapping = $collection->getMapping(); + $class = $this->em->getClassMetadata($mapping['sourceEntity']); + $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); + + foreach ($mapping['joinTable']['joinColumns'] as $joinColumn) { + $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); + $types[] = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $class, $this->em); + } + + foreach ($mapping['joinTable']['inverseJoinColumns'] as $joinColumn) { + $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); + $types[] = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em); + } + + return array( + 'INSERT INTO ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) + . ' (' . implode(', ', $columns) . ')' + . ' VALUES' + . ' (' . implode(', ', array_fill(0, count($columns), '?')) . ')', + $types, + ); + } + + /** + * Gets the SQL parameters for the corresponding SQL statement to insert the given + * element of the given collection into the database. + * + * Internal note: Order of the parameters must be the same as the order of the columns in getInsertRowSql. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * @param mixed $element + * + * @return array + */ + protected function getInsertRowSQLParameters(PersistentCollection $collection, $element) + { + return $this->collectJoinTableColumnParameters($collection, $element); + } + + /** + * Collects the parameters for inserting/deleting on the join table in the order + * of the join table columns as specified in ManyToManyMapping#joinTableColumns. + * + * @param \Doctrine\ORM\PersistentCollection $collection + * @param object $element + * + * @return array + */ + private function collectJoinTableColumnParameters(PersistentCollection $collection, $element) + { + $params = array(); + $mapping = $collection->getMapping(); + $isComposite = count($mapping['joinTableColumns']) > 2; + + $identifier1 = $this->uow->getEntityIdentifier($collection->getOwner()); + $identifier2 = $this->uow->getEntityIdentifier($element); + + if ($isComposite) { + $class1 = $this->em->getClassMetadata(get_class($collection->getOwner())); + $class2 = $collection->getTypeClass(); + } + + foreach ($mapping['joinTableColumns'] as $joinTableColumn) { + $isRelationToSource = isset($mapping['relationToSourceKeyColumns'][$joinTableColumn]); + + if ( ! $isComposite) { + $params[] = $isRelationToSource ? array_pop($identifier1) : array_pop($identifier2); + + continue; + } + + if ($isRelationToSource) { + $params[] = $identifier1[$class1->getFieldForColumn($mapping['relationToSourceKeyColumns'][$joinTableColumn])]; + + continue; + } + + $params[] = $identifier2[$class2->getFieldForColumn($mapping['relationToTargetKeyColumns'][$joinTableColumn])]; + } + + return $params; + } + + /** + * @param \Doctrine\ORM\PersistentCollection $collection + * @param string $key + * @param boolean $addFilters Whether the filter SQL should be included or not. + * + * @return array ordered vector: + * - quoted join table name + * - where clauses to be added for filtering + * - parameters to be bound for filtering + * - types of the parameters to be bound for filtering + */ + private function getJoinTableRestrictionsWithKey(PersistentCollection $collection, $key, $addFilters) + { + $filterMapping = $collection->getMapping(); + $mapping = $filterMapping; + $indexBy = $mapping['indexBy']; + $id = $this->uow->getEntityIdentifier($collection->getOwner()); + $sourceClass = $this->em->getClassMetadata($mapping['sourceEntity']); + $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); + + if (! $mapping['isOwningSide']) { + $associationSourceClass = $this->em->getClassMetadata($mapping['targetEntity']); + $mapping = $associationSourceClass->associationMappings[$mapping['mappedBy']]; + $joinColumns = $mapping['joinTable']['joinColumns']; + $sourceRelationMode = 'relationToTargetKeyColumns'; + $targetRelationMode = 'relationToSourceKeyColumns'; + } else { + $associationSourceClass = $this->em->getClassMetadata($mapping['sourceEntity']); + $joinColumns = $mapping['joinTable']['inverseJoinColumns']; + $sourceRelationMode = 'relationToSourceKeyColumns'; + $targetRelationMode = 'relationToTargetKeyColumns'; + } + + $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform). ' t'; + $whereClauses = array(); + $params = array(); + $types = array(); + + $joinNeeded = ! in_array($indexBy, $targetClass->identifier); + + if ($joinNeeded) { // extra join needed if indexBy is not a @id + $joinConditions = array(); + + foreach ($joinColumns as $joinTableColumn) { + $joinConditions[] = 't.' . $joinTableColumn['name'] . ' = tr.' . $joinTableColumn['referencedColumnName']; + } + + $tableName = $this->quoteStrategy->getTableName($targetClass, $this->platform); + $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions); + $columnName = $targetClass->getColumnName($indexBy); + + $whereClauses[] = 'tr.' . $columnName . ' = ?'; + $params[] = $key; + $types[] = PersisterHelper::getTypeOfColumn($columnName, $targetClass, $this->em); + } + + foreach ($mapping['joinTableColumns'] as $joinTableColumn) { + if (isset($mapping[$sourceRelationMode][$joinTableColumn])) { + $column = $mapping[$sourceRelationMode][$joinTableColumn]; + $whereClauses[] = 't.' . $joinTableColumn . ' = ?'; + $params[] = $sourceClass->containsForeignIdentifier + ? $id[$sourceClass->getFieldForColumn($column)] + : $id[$sourceClass->fieldNames[$column]]; + $types[] = PersisterHelper::getTypeOfColumn($column, $sourceClass, $this->em); + } elseif ( ! $joinNeeded) { + $column = $mapping[$targetRelationMode][$joinTableColumn]; + + $whereClauses[] = 't.' . $joinTableColumn . ' = ?'; + $params[] = $key; + $types[] = PersisterHelper::getTypeOfColumn($column, $targetClass, $this->em); + } + } + + if ($addFilters) { + list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping); + + if ($filterSql) { + $quotedJoinTable .= ' ' . $joinTargetEntitySQL; + $whereClauses[] = $filterSql; + } + } + + return array($quotedJoinTable, $whereClauses, $params, $types); + } + + /** + * @param \Doctrine\ORM\PersistentCollection $collection + * @param object $element + * @param boolean $addFilters Whether the filter SQL should be included or not. + * + * @return array ordered vector: + * - quoted join table name + * - where clauses to be added for filtering + * - parameters to be bound for filtering + * - types of the parameters to be bound for filtering + */ + private function getJoinTableRestrictions(PersistentCollection $collection, $element, $addFilters) + { + $filterMapping = $collection->getMapping(); + $mapping = $filterMapping; + + if ( ! $mapping['isOwningSide']) { + $sourceClass = $this->em->getClassMetadata($mapping['targetEntity']); + $targetClass = $this->em->getClassMetadata($mapping['sourceEntity']); + $sourceId = $this->uow->getEntityIdentifier($element); + $targetId = $this->uow->getEntityIdentifier($collection->getOwner()); + + $mapping = $sourceClass->associationMappings[$mapping['mappedBy']]; + } else { + $sourceClass = $this->em->getClassMetadata($mapping['sourceEntity']); + $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); + $sourceId = $this->uow->getEntityIdentifier($collection->getOwner()); + $targetId = $this->uow->getEntityIdentifier($element); + } + + $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $sourceClass, $this->platform); + $whereClauses = array(); + $params = array(); + $types = array(); + + foreach ($mapping['joinTableColumns'] as $joinTableColumn) { + $whereClauses[] = ($addFilters ? 't.' : '') . $joinTableColumn . ' = ?'; + + if (isset($mapping['relationToTargetKeyColumns'][$joinTableColumn])) { + $targetColumn = $mapping['relationToTargetKeyColumns'][$joinTableColumn]; + $params[] = $targetId[$targetClass->getFieldForColumn($targetColumn)]; + $types[] = PersisterHelper::getTypeOfColumn($targetColumn, $targetClass, $this->em); + + continue; + } + + // relationToSourceKeyColumns + $targetColumn = $mapping['relationToSourceKeyColumns'][$joinTableColumn]; + $params[] = $sourceId[$sourceClass->getFieldForColumn($targetColumn)]; + $types[] = PersisterHelper::getTypeOfColumn($targetColumn, $sourceClass, $this->em); + } + + if ($addFilters) { + $quotedJoinTable .= ' t'; + + list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping); + + if ($filterSql) { + $quotedJoinTable .= ' ' . $joinTargetEntitySQL; + $whereClauses[] = $filterSql; + } + } + + return array($quotedJoinTable, $whereClauses, $params, $types); + } + + /** + * Expands Criteria Parameters by walking the expressions and grabbing all + * parameters and types from it. + * + * @param \Doctrine\Common\Collections\Criteria $criteria + * + * @return array + */ + private function expandCriteriaParameters(Criteria $criteria) + { + $expression = $criteria->getWhereExpression(); + + if ($expression === null) { + return array(); + } + + $valueVisitor = new SqlValueVisitor(); + + $valueVisitor->dispatch($expression); + + list($values, $types) = $valueVisitor->getParamsAndTypes(); + + return $types; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Collection/OneToManyPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Collection/OneToManyPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..c18fdbbb9f1239aa1e1716d71ca492c8ff1e6be1 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Collection/OneToManyPersister.php @@ -0,0 +1,184 @@ +. + */ + +namespace Doctrine\ORM\Persisters\Collection; + +use Doctrine\Common\Collections\Criteria; +use Doctrine\Common\Proxy\Proxy; +use Doctrine\ORM\PersistentCollection; + +/** + * Persister for one-to-many collections. + * + * @author Roman Borschel + * @author Guilherme Blanco + * @author Alexander + * @since 2.0 + */ +class OneToManyPersister extends AbstractCollectionPersister +{ + /** + * {@inheritdoc} + */ + public function delete(PersistentCollection $collection) + { + // This can never happen. One to many can only be inverse side. + // For owning side one to many, it is required to have a join table, + // then classifying it as a ManyToManyPersister. + return; + } + + /** + * {@inheritdoc} + */ + public function update(PersistentCollection $collection) + { + // This can never happen. One to many can only be inverse side. + // For owning side one to many, it is required to have a join table, + // then classifying it as a ManyToManyPersister. + return; + } + + /** + * {@inheritdoc} + */ + public function get(PersistentCollection $collection, $index) + { + $mapping = $collection->getMapping(); + + if ( ! isset($mapping['indexBy'])) { + throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections."); + } + + $persister = $this->uow->getEntityPersister($mapping['targetEntity']); + + return $persister->load( + array( + $mapping['mappedBy'] => $collection->getOwner(), + $mapping['indexBy'] => $index + ), + null, + $mapping, + array(), + null, + 1 + ); + } + + /** + * {@inheritdoc} + */ + public function count(PersistentCollection $collection) + { + $mapping = $collection->getMapping(); + $persister = $this->uow->getEntityPersister($mapping['targetEntity']); + + // only works with single id identifier entities. Will throw an + // exception in Entity Persisters if that is not the case for the + // 'mappedBy' field. + $criteria = new Criteria(Criteria::expr()->eq($mapping['mappedBy'], $collection->getOwner())); + + return $persister->count($criteria); + } + + /** + * {@inheritdoc} + */ + public function slice(PersistentCollection $collection, $offset, $length = null) + { + $mapping = $collection->getMapping(); + $persister = $this->uow->getEntityPersister($mapping['targetEntity']); + + return $persister->getOneToManyCollection($mapping, $collection->getOwner(), $offset, $length); + } + + /** + * {@inheritdoc} + */ + public function containsKey(PersistentCollection $collection, $key) + { + $mapping = $collection->getMapping(); + + if ( ! isset($mapping['indexBy'])) { + throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections."); + } + + $persister = $this->uow->getEntityPersister($mapping['targetEntity']); + + // only works with single id identifier entities. Will throw an + // exception in Entity Persisters if that is not the case for the + // 'mappedBy' field. + $criteria = new Criteria(); + + $criteria->andWhere(Criteria::expr()->eq($mapping['mappedBy'], $collection->getOwner())); + $criteria->andWhere(Criteria::expr()->eq($mapping['indexBy'], $key)); + + return (bool) $persister->count($criteria); + } + + /** + * {@inheritdoc} + */ + public function contains(PersistentCollection $collection, $element) + { + if ( ! $this->isValidEntityState($element)) { + return false; + } + + $mapping = $collection->getMapping(); + $persister = $this->uow->getEntityPersister($mapping['targetEntity']); + + // only works with single id identifier entities. Will throw an + // exception in Entity Persisters if that is not the case for the + // 'mappedBy' field. + $criteria = new Criteria(Criteria::expr()->eq($mapping['mappedBy'], $collection->getOwner())); + + return $persister->exists($element, $criteria); + } + + /** + * {@inheritdoc} + */ + public function removeElement(PersistentCollection $collection, $element) + { + $mapping = $collection->getMapping(); + + if ( ! $mapping['orphanRemoval']) { + // no-op: this is not the owning side, therefore no operations should be applied + return false; + } + + if ( ! $this->isValidEntityState($element)) { + return false; + } + + return $this + ->uow + ->getEntityPersister($mapping['targetEntity']) + ->delete($element); + } + + /** + * {@inheritdoc} + */ + public function loadCriteria(PersistentCollection $collection, Criteria $criteria) + { + throw new \BadMethodCallException("Filtering a collection by Criteria is not supported by this CollectionPersister."); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/AbstractEntityInheritancePersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/AbstractEntityInheritancePersister.php new file mode 100644 index 0000000000000000000000000000000000000000..6b5e5c4f13c2bf8cdb1946acf18a43fdf743081e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/AbstractEntityInheritancePersister.php @@ -0,0 +1,95 @@ +. + */ + +namespace Doctrine\ORM\Persisters\Entity; + +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\DBAL\Types\Type; + +/** + * Base class for entity persisters that implement a certain inheritance mapping strategy. + * All these persisters are assumed to use a discriminator column to discriminate entity + * types in the hierarchy. + * + * @author Roman Borschel + * @author Benjamin Eberlei + * @since 2.0 + */ +abstract class AbstractEntityInheritancePersister extends BasicEntityPersister +{ + /** + * {@inheritdoc} + */ + protected function prepareInsertData($entity) + { + $data = parent::prepareInsertData($entity); + + // Populate the discriminator column + $discColumn = $this->class->discriminatorColumn; + $this->columnTypes[$discColumn['name']] = $discColumn['type']; + $data[$this->getDiscriminatorColumnTableName()][$discColumn['name']] = $this->class->discriminatorValue; + + return $data; + } + + /** + * Gets the name of the table that contains the discriminator column. + * + * @return string The table name. + */ + abstract protected function getDiscriminatorColumnTableName(); + + /** + * {@inheritdoc} + */ + protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r') + { + $tableAlias = $alias == 'r' ? '' : $alias; + $columnName = $class->columnNames[$field]; + $columnAlias = $this->getSQLColumnAlias($columnName); + $sql = $this->getSQLTableAlias($class->name, $tableAlias) . '.' + . $this->quoteStrategy->getColumnName($field, $class, $this->platform); + + $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->name); + + if (isset($class->fieldMappings[$field]['requireSQLConversion'])) { + $type = Type::getType($class->getTypeOfField($field)); + $sql = $type->convertToPHPValueSQL($sql, $this->platform); + } + + return $sql . ' AS ' . $columnAlias; + } + + /** + * @param string $tableAlias + * @param string $joinColumnName + * @param string $className + * @param string $type + * + * @return string + */ + protected function getSelectJoinColumnSQL($tableAlias, $joinColumnName, $className, $type) + { + $columnAlias = $this->getSQLColumnAlias($joinColumnName); + + $this->currentPersisterContext->rsm->addMetaResult('r', $columnAlias, $joinColumnName, false, $type); + + return $tableAlias . '.' . $joinColumnName . ' AS ' . $columnAlias; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..7ab1d3b1c2c575c139627f4395c582f402c12785 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php @@ -0,0 +1,2066 @@ +. + */ + +namespace Doctrine\ORM\Persisters\Entity; + +use Doctrine\Common\Collections\Criteria; +use Doctrine\Common\Collections\Expr\Comparison; +use Doctrine\Common\Util\ClassUtils; +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\LockMode; +use Doctrine\DBAL\Types\Type; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Mapping\MappingException; +use Doctrine\ORM\OptimisticLockException; +use Doctrine\ORM\ORMException; +use Doctrine\ORM\PersistentCollection; +use Doctrine\ORM\Persisters\SqlExpressionVisitor; +use Doctrine\ORM\Persisters\SqlValueVisitor; +use Doctrine\ORM\Query; +use Doctrine\ORM\UnitOfWork; +use Doctrine\ORM\Utility\IdentifierFlattener; +use Doctrine\ORM\Utility\PersisterHelper; + +/** + * A BasicEntityPersister maps an entity to a single table in a relational database. + * + * A persister is always responsible for a single entity type. + * + * EntityPersisters are used during a UnitOfWork to apply any changes to the persistent + * state of entities onto a relational database when the UnitOfWork is committed, + * as well as for basic querying of entities and their associations (not DQL). + * + * The persisting operations that are invoked during a commit of a UnitOfWork to + * persist the persistent entity state are: + * + * - {@link addInsert} : To schedule an entity for insertion. + * - {@link executeInserts} : To execute all scheduled insertions. + * - {@link update} : To update the persistent state of an entity. + * - {@link delete} : To delete the persistent state of an entity. + * + * As can be seen from the above list, insertions are batched and executed all at once + * for increased efficiency. + * + * The querying operations invoked during a UnitOfWork, either through direct find + * requests or lazy-loading, are the following: + * + * - {@link load} : Loads (the state of) a single, managed entity. + * - {@link loadAll} : Loads multiple, managed entities. + * - {@link loadOneToOneEntity} : Loads a one/many-to-one entity association (lazy-loading). + * - {@link loadOneToManyCollection} : Loads a one-to-many entity association (lazy-loading). + * - {@link loadManyToManyCollection} : Loads a many-to-many entity association (lazy-loading). + * + * The BasicEntityPersister implementation provides the default behavior for + * persisting and querying entities that are mapped to a single database table. + * + * Subclasses can be created to provide custom persisting and querying strategies, + * i.e. spanning multiple tables. + * + * @author Roman Borschel + * @author Giorgio Sironi + * @author Benjamin Eberlei + * @author Alexander + * @author Fabio B. Silva + * @author Rob Caiger + * @since 2.0 + */ +class BasicEntityPersister implements EntityPersister +{ + /** + * @var array + */ + static private $comparisonMap = array( + Comparison::EQ => '= %s', + Comparison::IS => '= %s', + Comparison::NEQ => '!= %s', + Comparison::GT => '> %s', + Comparison::GTE => '>= %s', + Comparison::LT => '< %s', + Comparison::LTE => '<= %s', + Comparison::IN => 'IN (%s)', + Comparison::NIN => 'NOT IN (%s)', + Comparison::CONTAINS => 'LIKE %s', + ); + + /** + * Metadata object that describes the mapping of the mapped entity class. + * + * @var \Doctrine\ORM\Mapping\ClassMetadata + */ + protected $class; + + /** + * The underlying DBAL Connection of the used EntityManager. + * + * @var \Doctrine\DBAL\Connection $conn + */ + protected $conn; + + /** + * The database platform. + * + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + protected $platform; + + /** + * The EntityManager instance. + * + * @var EntityManagerInterface + */ + protected $em; + + /** + * Queued inserts. + * + * @var array + */ + protected $queuedInserts = array(); + + /** + * The map of column names to DBAL mapping types of all prepared columns used + * when INSERTing or UPDATEing an entity. + * + * @var array + * + * @see prepareInsertData($entity) + * @see prepareUpdateData($entity) + */ + protected $columnTypes = array(); + + /** + * The map of quoted column names. + * + * @var array + * + * @see prepareInsertData($entity) + * @see prepareUpdateData($entity) + */ + protected $quotedColumns = array(); + + /** + * The INSERT SQL statement used for entities handled by this persister. + * This SQL is only generated once per request, if at all. + * + * @var string + */ + private $insertSql; + + /** + * The quote strategy. + * + * @var \Doctrine\ORM\Mapping\QuoteStrategy + */ + protected $quoteStrategy; + + /** + * The IdentifierFlattener used for manipulating identifiers + * + * @var \Doctrine\ORM\Utility\IdentifierFlattener + */ + private $identifierFlattener; + + /** + * @var CachedPersisterContext + */ + protected $currentPersisterContext; + + /** + * @var CachedPersisterContext + */ + private $limitsHandlingContext; + + /** + * @var CachedPersisterContext + */ + private $noLimitsContext; + + /** + * Initializes a new BasicEntityPersister that uses the given EntityManager + * and persists instances of the class described by the given ClassMetadata descriptor. + * + * @param EntityManagerInterface $em + * @param ClassMetadata $class + */ + public function __construct(EntityManagerInterface $em, ClassMetadata $class) + { + $this->em = $em; + $this->class = $class; + $this->conn = $em->getConnection(); + $this->platform = $this->conn->getDatabasePlatform(); + $this->quoteStrategy = $em->getConfiguration()->getQuoteStrategy(); + $this->identifierFlattener = new IdentifierFlattener($em->getUnitOfWork(), $em->getMetadataFactory()); + $this->noLimitsContext = $this->currentPersisterContext = new CachedPersisterContext( + $class, + new Query\ResultSetMapping(), + false + ); + $this->limitsHandlingContext = new CachedPersisterContext( + $class, + new Query\ResultSetMapping(), + true + ); + } + + /** + * {@inheritdoc} + */ + public function getClassMetadata() + { + return $this->class; + } + + /** + * {@inheritdoc} + */ + public function getResultSetMapping() + { + return $this->currentPersisterContext->rsm; + } + + /** + * {@inheritdoc} + */ + public function addInsert($entity) + { + $this->queuedInserts[spl_object_hash($entity)] = $entity; + } + + /** + * {@inheritdoc} + */ + public function getInserts() + { + return $this->queuedInserts; + } + + /** + * {@inheritdoc} + */ + public function executeInserts() + { + if ( ! $this->queuedInserts) { + return array(); + } + + $postInsertIds = array(); + $idGenerator = $this->class->idGenerator; + $isPostInsertId = $idGenerator->isPostInsertGenerator(); + + $stmt = $this->conn->prepare($this->getInsertSQL()); + $tableName = $this->class->getTableName(); + + foreach ($this->queuedInserts as $entity) { + $insertData = $this->prepareInsertData($entity); + + if (isset($insertData[$tableName])) { + $paramIndex = 1; + + foreach ($insertData[$tableName] as $column => $value) { + $stmt->bindValue($paramIndex++, $value, $this->columnTypes[$column]); + } + } + + $stmt->execute(); + + if ($isPostInsertId) { + $generatedId = $idGenerator->generate($this->em, $entity); + $id = array( + $this->class->identifier[0] => $generatedId + ); + $postInsertIds[] = array( + 'generatedId' => $generatedId, + 'entity' => $entity, + ); + } else { + $id = $this->class->getIdentifierValues($entity); + } + + if ($this->class->isVersioned) { + $this->assignDefaultVersionValue($entity, $id); + } + } + + $stmt->closeCursor(); + $this->queuedInserts = array(); + + return $postInsertIds; + } + + /** + * Retrieves the default version value which was created + * by the preceding INSERT statement and assigns it back in to the + * entities version field. + * + * @param object $entity + * @param array $id + * + * @return void + */ + protected function assignDefaultVersionValue($entity, array $id) + { + $value = $this->fetchVersionValue($this->class, $id); + + $this->class->setFieldValue($entity, $this->class->versionField, $value); + } + + /** + * Fetches the current version value of a versioned entity. + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $versionedClass + * @param array $id + * + * @return mixed + */ + protected function fetchVersionValue($versionedClass, array $id) + { + $versionField = $versionedClass->versionField; + $tableName = $this->quoteStrategy->getTableName($versionedClass, $this->platform); + $identifier = $this->quoteStrategy->getIdentifierColumnNames($versionedClass, $this->platform); + $columnName = $this->quoteStrategy->getColumnName($versionField, $versionedClass, $this->platform); + + // FIXME: Order with composite keys might not be correct + $sql = 'SELECT ' . $columnName + . ' FROM ' . $tableName + . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?'; + + $flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id); + + $value = $this->conn->fetchColumn($sql, array_values($flatId)); + + return Type::getType($versionedClass->fieldMappings[$versionField]['type'])->convertToPHPValue($value, $this->platform); + } + + /** + * {@inheritdoc} + */ + public function update($entity) + { + $tableName = $this->class->getTableName(); + $updateData = $this->prepareUpdateData($entity); + + if ( ! isset($updateData[$tableName]) || ! ($data = $updateData[$tableName])) { + return; + } + + $isVersioned = $this->class->isVersioned; + $quotedTableName = $this->quoteStrategy->getTableName($this->class, $this->platform); + + $this->updateTable($entity, $quotedTableName, $data, $isVersioned); + + if ($isVersioned) { + $id = $this->em->getUnitOfWork()->getEntityIdentifier($entity); + + $this->assignDefaultVersionValue($entity, $id); + } + } + + /** + * Performs an UPDATE statement for an entity on a specific table. + * The UPDATE can optionally be versioned, which requires the entity to have a version field. + * + * @param object $entity The entity object being updated. + * @param string $quotedTableName The quoted name of the table to apply the UPDATE on. + * @param array $updateData The map of columns to update (column => value). + * @param boolean $versioned Whether the UPDATE should be versioned. + * + * @return void + * + * @throws \Doctrine\ORM\ORMException + * @throws \Doctrine\ORM\OptimisticLockException + */ + protected final function updateTable($entity, $quotedTableName, array $updateData, $versioned = false) + { + $set = array(); + $types = array(); + $params = array(); + + foreach ($updateData as $columnName => $value) { + $placeholder = '?'; + $column = $columnName; + + switch (true) { + case isset($this->class->fieldNames[$columnName]): + $fieldName = $this->class->fieldNames[$columnName]; + $column = $this->quoteStrategy->getColumnName($fieldName, $this->class, $this->platform); + + if (isset($this->class->fieldMappings[$fieldName]['requireSQLConversion'])) { + $type = Type::getType($this->columnTypes[$columnName]); + $placeholder = $type->convertToDatabaseValueSQL('?', $this->platform); + } + + break; + + case isset($this->quotedColumns[$columnName]): + $column = $this->quotedColumns[$columnName]; + + break; + } + + $params[] = $value; + $set[] = $column . ' = ' . $placeholder; + $types[] = $this->columnTypes[$columnName]; + } + + $where = array(); + $identifier = $this->em->getUnitOfWork()->getEntityIdentifier($entity); + + foreach ($this->class->identifier as $idField) { + if ( ! isset($this->class->associationMappings[$idField])) { + + $params[] = $identifier[$idField]; + $types[] = $this->class->fieldMappings[$idField]['type']; + $where[] = $this->quoteStrategy->getColumnName($idField, $this->class, $this->platform); + + continue; + } + + $params[] = $identifier[$idField]; + $where[] = $this->class->associationMappings[$idField]['joinColumns'][0]['name']; + $targetMapping = $this->em->getClassMetadata($this->class->associationMappings[$idField]['targetEntity']); + + switch (true) { + case (isset($targetMapping->fieldMappings[$targetMapping->identifier[0]])): + $types[] = $targetMapping->fieldMappings[$targetMapping->identifier[0]]['type']; + break; + + case (isset($targetMapping->associationMappings[$targetMapping->identifier[0]])): + $types[] = $targetMapping->associationMappings[$targetMapping->identifier[0]]['type']; + break; + + default: + throw ORMException::unrecognizedField($targetMapping->identifier[0]); + } + + } + + if ($versioned) { + $versionField = $this->class->versionField; + $versionFieldType = $this->class->fieldMappings[$versionField]['type']; + $versionColumn = $this->quoteStrategy->getColumnName($versionField, $this->class, $this->platform); + + $where[] = $versionColumn; + $types[] = $this->class->fieldMappings[$versionField]['type']; + $params[] = $this->class->reflFields[$versionField]->getValue($entity); + + switch ($versionFieldType) { + case Type::SMALLINT: + case Type::INTEGER: + case Type::BIGINT: + $set[] = $versionColumn . ' = ' . $versionColumn . ' + 1'; + break; + + case Type::DATETIME: + $set[] = $versionColumn . ' = CURRENT_TIMESTAMP'; + break; + } + } + + $sql = 'UPDATE ' . $quotedTableName + . ' SET ' . implode(', ', $set) + . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?'; + + $result = $this->conn->executeUpdate($sql, $params, $types); + + if ($versioned && ! $result) { + throw OptimisticLockException::lockFailed($entity); + } + } + + /** + * @todo Add check for platform if it supports foreign keys/cascading. + * + * @param array $identifier + * + * @return void + */ + protected function deleteJoinTableRecords($identifier) + { + foreach ($this->class->associationMappings as $mapping) { + if ($mapping['type'] !== ClassMetadata::MANY_TO_MANY) { + continue; + } + + // @Todo this only covers scenarios with no inheritance or of the same level. Is there something + // like self-referential relationship between different levels of an inheritance hierarchy? I hope not! + $selfReferential = ($mapping['targetEntity'] == $mapping['sourceEntity']); + $class = $this->class; + $association = $mapping; + $otherColumns = array(); + $otherKeys = array(); + $keys = array(); + + if ( ! $mapping['isOwningSide']) { + $class = $this->em->getClassMetadata($mapping['targetEntity']); + $association = $class->associationMappings[$mapping['mappedBy']]; + } + + $joinColumns = $mapping['isOwningSide'] + ? $association['joinTable']['joinColumns'] + : $association['joinTable']['inverseJoinColumns']; + + + if ($selfReferential) { + $otherColumns = (! $mapping['isOwningSide']) + ? $association['joinTable']['joinColumns'] + : $association['joinTable']['inverseJoinColumns']; + } + + foreach ($joinColumns as $joinColumn) { + $keys[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); + } + + foreach ($otherColumns as $joinColumn) { + $otherKeys[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); + } + + if (isset($mapping['isOnDeleteCascade'])) { + continue; + } + + $joinTableName = $this->quoteStrategy->getJoinTableName($association, $this->class, $this->platform); + + $this->conn->delete($joinTableName, array_combine($keys, $identifier)); + + if ($selfReferential) { + $this->conn->delete($joinTableName, array_combine($otherKeys, $identifier)); + } + } + } + + /** + * {@inheritdoc} + */ + public function delete($entity) + { + $class = $this->class; + $identifier = $this->em->getUnitOfWork()->getEntityIdentifier($entity); + $tableName = $this->quoteStrategy->getTableName($class, $this->platform); + $idColumns = $this->quoteStrategy->getIdentifierColumnNames($class, $this->platform); + $id = array_combine($idColumns, $identifier); + $types = array_map(function ($identifier) use ($class) { + + if (isset($class->fieldMappings[$identifier])) { + return $class->fieldMappings[$identifier]['type']; + } + + $targetMapping = $this->em->getClassMetadata($class->associationMappings[$identifier]['targetEntity']); + + if (isset($targetMapping->fieldMappings[$targetMapping->identifier[0]])) { + return $targetMapping->fieldMappings[$targetMapping->identifier[0]]['type']; + } + + if (isset($targetMapping->associationMappings[$targetMapping->identifier[0]])) { + return $targetMapping->associationMappings[$targetMapping->identifier[0]]['type']; + } + + throw ORMException::unrecognizedField($targetMapping->identifier[0]); + + }, $class->identifier); + + $this->deleteJoinTableRecords($identifier); + + return (bool) $this->conn->delete($tableName, $id, $types); + } + + /** + * Prepares the changeset of an entity for database insertion (UPDATE). + * + * The changeset is obtained from the currently running UnitOfWork. + * + * During this preparation the array that is passed as the second parameter is filled with + * => pairs, grouped by table name. + * + * Example: + * + * array( + * 'foo_table' => array('column1' => 'value1', 'column2' => 'value2', ...), + * 'bar_table' => array('columnX' => 'valueX', 'columnY' => 'valueY', ...), + * ... + * ) + * + * + * @param object $entity The entity for which to prepare the data. + * + * @return array The prepared data. + */ + protected function prepareUpdateData($entity) + { + $versionField = null; + $result = array(); + $uow = $this->em->getUnitOfWork(); + + if (($versioned = $this->class->isVersioned) != false) { + $versionField = $this->class->versionField; + } + + foreach ($uow->getEntityChangeSet($entity) as $field => $change) { + if (isset($versionField) && $versionField == $field) { + continue; + } + + if (isset($this->class->embeddedClasses[$field])) { + continue; + } + + $newVal = $change[1]; + + if ( ! isset($this->class->associationMappings[$field])) { + $columnName = $this->class->columnNames[$field]; + $this->columnTypes[$columnName] = $this->class->fieldMappings[$field]['type']; + $result[$this->getOwningTable($field)][$columnName] = $newVal; + + continue; + } + + $assoc = $this->class->associationMappings[$field]; + + // Only owning side of x-1 associations can have a FK column. + if ( ! $assoc['isOwningSide'] || ! ($assoc['type'] & ClassMetadata::TO_ONE)) { + continue; + } + + if ($newVal !== null) { + $oid = spl_object_hash($newVal); + + if (isset($this->queuedInserts[$oid]) || $uow->isScheduledForInsert($newVal)) { + // The associated entity $newVal is not yet persisted, so we must + // set $newVal = null, in order to insert a null value and schedule an + // extra update on the UnitOfWork. + $uow->scheduleExtraUpdate($entity, array($field => array(null, $newVal))); + + $newVal = null; + } + } + + $newValId = null; + + if ($newVal !== null) { + $newValId = $uow->getEntityIdentifier($newVal); + } + + $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); + $owningTable = $this->getOwningTable($field); + + foreach ($assoc['joinColumns'] as $joinColumn) { + $sourceColumn = $joinColumn['name']; + $targetColumn = $joinColumn['referencedColumnName']; + $quotedColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); + + $this->quotedColumns[$sourceColumn] = $quotedColumn; + $this->columnTypes[$sourceColumn] = PersisterHelper::getTypeOfColumn($targetColumn, $targetClass, $this->em); + $result[$owningTable][$sourceColumn] = $newValId + ? $newValId[$targetClass->getFieldForColumn($targetColumn)] + : null; + } + } + + return $result; + } + + /** + * Prepares the data changeset of a managed entity for database insertion (initial INSERT). + * The changeset of the entity is obtained from the currently running UnitOfWork. + * + * The default insert data preparation is the same as for updates. + * + * @param object $entity The entity for which to prepare the data. + * + * @return array The prepared data for the tables to update. + * + * @see prepareUpdateData + */ + protected function prepareInsertData($entity) + { + return $this->prepareUpdateData($entity); + } + + /** + * {@inheritdoc} + */ + public function getOwningTable($fieldName) + { + return $this->class->getTableName(); + } + + /** + * {@inheritdoc} + */ + public function load(array $criteria, $entity = null, $assoc = null, array $hints = array(), $lockMode = null, $limit = null, array $orderBy = null) + { + $this->switchPersisterContext(null, $limit); + + $sql = $this->getSelectSQL($criteria, $assoc, $lockMode, $limit, null, $orderBy); + list($params, $types) = $this->expandParameters($criteria); + $stmt = $this->conn->executeQuery($sql, $params, $types); + + if ($entity !== null) { + $hints[Query::HINT_REFRESH] = true; + $hints[Query::HINT_REFRESH_ENTITY] = $entity; + } + + $hydrator = $this->em->newHydrator($this->currentPersisterContext->selectJoinSql ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT); + $entities = $hydrator->hydrateAll($stmt, $this->currentPersisterContext->rsm, $hints); + + return $entities ? $entities[0] : null; + } + + /** + * {@inheritdoc} + */ + public function loadById(array $identifier, $entity = null) + { + return $this->load($identifier, $entity); + } + + /** + * {@inheritdoc} + */ + public function loadOneToOneEntity(array $assoc, $sourceEntity, array $identifier = array()) + { + if (($foundEntity = $this->em->getUnitOfWork()->tryGetById($identifier, $assoc['targetEntity'])) != false) { + return $foundEntity; + } + + $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); + + if ($assoc['isOwningSide']) { + $isInverseSingleValued = $assoc['inversedBy'] && ! $targetClass->isCollectionValuedAssociation($assoc['inversedBy']); + + // Mark inverse side as fetched in the hints, otherwise the UoW would + // try to load it in a separate query (remember: to-one inverse sides can not be lazy). + $hints = array(); + + if ($isInverseSingleValued) { + $hints['fetched']["r"][$assoc['inversedBy']] = true; + } + + /* cascade read-only status + if ($this->em->getUnitOfWork()->isReadOnly($sourceEntity)) { + $hints[Query::HINT_READ_ONLY] = true; + } + */ + + $targetEntity = $this->load($identifier, null, $assoc, $hints); + + // Complete bidirectional association, if necessary + if ($targetEntity !== null && $isInverseSingleValued) { + $targetClass->reflFields[$assoc['inversedBy']]->setValue($targetEntity, $sourceEntity); + } + + return $targetEntity; + } + + $sourceClass = $this->em->getClassMetadata($assoc['sourceEntity']); + $owningAssoc = $targetClass->getAssociationMapping($assoc['mappedBy']); + + // TRICKY: since the association is specular source and target are flipped + foreach ($owningAssoc['targetToSourceKeyColumns'] as $sourceKeyColumn => $targetKeyColumn) { + if ( ! isset($sourceClass->fieldNames[$sourceKeyColumn])) { + throw MappingException::joinColumnMustPointToMappedField( + $sourceClass->name, $sourceKeyColumn + ); + } + + // unset the old value and set the new sql aliased value here. By definition + // unset($identifier[$targetKeyColumn] works here with how UnitOfWork::createEntity() calls this method. + $identifier[$this->getSQLTableAlias($targetClass->name) . "." . $targetKeyColumn] = + $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity); + + unset($identifier[$targetKeyColumn]); + } + + $targetEntity = $this->load($identifier, null, $assoc); + + if ($targetEntity !== null) { + $targetClass->setFieldValue($targetEntity, $assoc['mappedBy'], $sourceEntity); + } + + return $targetEntity; + } + + /** + * {@inheritdoc} + */ + public function refresh(array $id, $entity, $lockMode = null) + { + $sql = $this->getSelectSQL($id, null, $lockMode); + list($params, $types) = $this->expandParameters($id); + $stmt = $this->conn->executeQuery($sql, $params, $types); + + $hydrator = $this->em->newHydrator(Query::HYDRATE_OBJECT); + $hydrator->hydrateAll($stmt, $this->currentPersisterContext->rsm, array(Query::HINT_REFRESH => true)); + } + + /** + * {@inheritDoc} + */ + public function count($criteria = array()) + { + $sql = $this->getCountSQL($criteria); + + list($params, $types) = ($criteria instanceof Criteria) + ? $this->expandCriteriaParameters($criteria) + : $this->expandParameters($criteria); + + return $this->conn->executeQuery($sql, $params, $types)->fetchColumn(); + } + + /** + * {@inheritdoc} + */ + public function loadCriteria(Criteria $criteria) + { + $orderBy = $criteria->getOrderings(); + $limit = $criteria->getMaxResults(); + $offset = $criteria->getFirstResult(); + $query = $this->getSelectSQL($criteria, null, null, $limit, $offset, $orderBy); + + list($params, $types) = $this->expandCriteriaParameters($criteria); + + $stmt = $this->conn->executeQuery($query, $params, $types); + $hydrator = $this->em->newHydrator(($this->currentPersisterContext->selectJoinSql) ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT); + + return $hydrator->hydrateAll($stmt, $this->currentPersisterContext->rsm, array(UnitOfWork::HINT_DEFEREAGERLOAD => true)); + } + + /** + * {@inheritdoc} + */ + public function expandCriteriaParameters(Criteria $criteria) + { + $expression = $criteria->getWhereExpression(); + $sqlParams = array(); + $sqlTypes = array(); + + if ($expression === null) { + return array($sqlParams, $sqlTypes); + } + + $valueVisitor = new SqlValueVisitor(); + + $valueVisitor->dispatch($expression); + + list($params, $types) = $valueVisitor->getParamsAndTypes(); + + foreach ($params as $param) { + $sqlParams = array_merge($sqlParams, $this->getValues($param)); + } + + foreach ($types as $type) { + list ($field, $value) = $type; + $sqlTypes = array_merge($sqlTypes, $this->getTypes($field, $value, $this->class)); + } + + return array($sqlParams, $sqlTypes); + } + + /** + * {@inheritdoc} + */ + public function loadAll(array $criteria = array(), array $orderBy = null, $limit = null, $offset = null) + { + $this->switchPersisterContext($offset, $limit); + + $sql = $this->getSelectSQL($criteria, null, null, $limit, $offset, $orderBy); + list($params, $types) = $this->expandParameters($criteria); + $stmt = $this->conn->executeQuery($sql, $params, $types); + + $hydrator = $this->em->newHydrator(($this->currentPersisterContext->selectJoinSql) ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT); + + return $hydrator->hydrateAll($stmt, $this->currentPersisterContext->rsm, array(UnitOfWork::HINT_DEFEREAGERLOAD => true)); + } + + /** + * {@inheritdoc} + */ + public function getManyToManyCollection(array $assoc, $sourceEntity, $offset = null, $limit = null) + { + $this->switchPersisterContext($offset, $limit); + + $stmt = $this->getManyToManyStatement($assoc, $sourceEntity, $offset, $limit); + + return $this->loadArrayFromStatement($assoc, $stmt); + } + + /** + * Loads an array of entities from a given DBAL statement. + * + * @param array $assoc + * @param \Doctrine\DBAL\Statement $stmt + * + * @return array + */ + private function loadArrayFromStatement($assoc, $stmt) + { + $rsm = $this->currentPersisterContext->rsm; + $hints = array(UnitOfWork::HINT_DEFEREAGERLOAD => true); + + if (isset($assoc['indexBy'])) { + $rsm = clone ($this->currentPersisterContext->rsm); // this is necessary because the "default rsm" should be changed. + $rsm->addIndexBy('r', $assoc['indexBy']); + } + + return $this->em->newHydrator(Query::HYDRATE_OBJECT)->hydrateAll($stmt, $rsm, $hints); + } + + /** + * Hydrates a collection from a given DBAL statement. + * + * @param array $assoc + * @param \Doctrine\DBAL\Statement $stmt + * @param PersistentCollection $coll + * + * @return array + */ + private function loadCollectionFromStatement($assoc, $stmt, $coll) + { + $rsm = $this->currentPersisterContext->rsm; + $hints = array( + UnitOfWork::HINT_DEFEREAGERLOAD => true, + 'collection' => $coll + ); + + if (isset($assoc['indexBy'])) { + $rsm = clone ($this->currentPersisterContext->rsm); // this is necessary because the "default rsm" should be changed. + $rsm->addIndexBy('r', $assoc['indexBy']); + } + + return $this->em->newHydrator(Query::HYDRATE_OBJECT)->hydrateAll($stmt, $rsm, $hints); + } + + /** + * {@inheritdoc} + */ + public function loadManyToManyCollection(array $assoc, $sourceEntity, PersistentCollection $coll) + { + $stmt = $this->getManyToManyStatement($assoc, $sourceEntity); + + return $this->loadCollectionFromStatement($assoc, $stmt, $coll); + } + + /** + * @param array $assoc + * @param object $sourceEntity + * @param int|null $offset + * @param int|null $limit + * + * @return \Doctrine\DBAL\Driver\Statement + * + * @throws \Doctrine\ORM\Mapping\MappingException + */ + private function getManyToManyStatement(array $assoc, $sourceEntity, $offset = null, $limit = null) + { + $this->switchPersisterContext($offset, $limit); + + $sourceClass = $this->em->getClassMetadata($assoc['sourceEntity']); + $class = $sourceClass; + $association = $assoc; + $criteria = array(); + $parameters = array(); + + if ( ! $assoc['isOwningSide']) { + $class = $this->em->getClassMetadata($assoc['targetEntity']); + $association = $class->associationMappings[$assoc['mappedBy']]; + } + + $joinColumns = $assoc['isOwningSide'] + ? $association['joinTable']['joinColumns'] + : $association['joinTable']['inverseJoinColumns']; + + $quotedJoinTable = $this->quoteStrategy->getJoinTableName($association, $class, $this->platform); + + foreach ($joinColumns as $joinColumn) { + + $sourceKeyColumn = $joinColumn['referencedColumnName']; + $quotedKeyColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); + + switch (true) { + case $sourceClass->containsForeignIdentifier: + $field = $sourceClass->getFieldForColumn($sourceKeyColumn); + $value = $sourceClass->reflFields[$field]->getValue($sourceEntity); + + if (isset($sourceClass->associationMappings[$field])) { + $value = $this->em->getUnitOfWork()->getEntityIdentifier($value); + $value = $value[$this->em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]]; + } + + break; + + case isset($sourceClass->fieldNames[$sourceKeyColumn]): + $field = $sourceClass->fieldNames[$sourceKeyColumn]; + $value = $sourceClass->reflFields[$field]->getValue($sourceEntity); + + break; + + default: + throw MappingException::joinColumnMustPointToMappedField( + $sourceClass->name, $sourceKeyColumn + ); + } + + $criteria[$quotedJoinTable . '.' . $quotedKeyColumn] = $value; + $parameters[] = array( + 'value' => $value, + 'field' => $field, + 'class' => $sourceClass, + ); + } + + $sql = $this->getSelectSQL($criteria, $assoc, null, $limit, $offset); + list($params, $types) = $this->expandToManyParameters($parameters); + + return $this->conn->executeQuery($sql, $params, $types); + } + + /** + * {@inheritdoc} + */ + public function getSelectSQL($criteria, $assoc = null, $lockMode = null, $limit = null, $offset = null, array $orderBy = null) + { + $this->switchPersisterContext($offset, $limit); + + $lockSql = ''; + $joinSql = ''; + $orderBySql = ''; + + if ($assoc != null && $assoc['type'] == ClassMetadata::MANY_TO_MANY) { + $joinSql = $this->getSelectManyToManyJoinSQL($assoc); + } + + if (isset($assoc['orderBy'])) { + $orderBy = $assoc['orderBy']; + } + + if ($orderBy) { + $orderBySql = $this->getOrderBySQL($orderBy, $this->getSQLTableAlias($this->class->name)); + } + + $conditionSql = ($criteria instanceof Criteria) + ? $this->getSelectConditionCriteriaSQL($criteria) + : $this->getSelectConditionSQL($criteria, $assoc); + + switch ($lockMode) { + case LockMode::PESSIMISTIC_READ: + $lockSql = ' ' . $this->platform->getReadLockSql(); + break; + + case LockMode::PESSIMISTIC_WRITE: + $lockSql = ' ' . $this->platform->getWriteLockSql(); + break; + } + + $columnList = $this->getSelectColumnsSQL(); + $tableAlias = $this->getSQLTableAlias($this->class->name); + $filterSql = $this->generateFilterConditionSQL($this->class, $tableAlias); + $tableName = $this->quoteStrategy->getTableName($this->class, $this->platform); + + if ('' !== $filterSql) { + $conditionSql = $conditionSql + ? $conditionSql . ' AND ' . $filterSql + : $filterSql; + } + + $select = 'SELECT ' . $columnList; + $from = ' FROM ' . $tableName . ' '. $tableAlias; + $join = $this->currentPersisterContext->selectJoinSql . $joinSql; + $where = ($conditionSql ? ' WHERE ' . $conditionSql : ''); + $lock = $this->platform->appendLockHint($from, $lockMode); + $query = $select + . $lock + . $join + . $where + . $orderBySql; + + return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql; + } + + /** + * {@inheritDoc} + */ + public function getCountSQL($criteria = array()) + { + $tableName = $this->quoteStrategy->getTableName($this->class, $this->platform); + $tableAlias = $this->getSQLTableAlias($this->class->name); + + $conditionSql = ($criteria instanceof Criteria) + ? $this->getSelectConditionCriteriaSQL($criteria) + : $this->getSelectConditionSQL($criteria); + + $filterSql = $this->generateFilterConditionSQL($this->class, $tableAlias); + + if ('' !== $filterSql) { + $conditionSql = $conditionSql + ? $conditionSql . ' AND ' . $filterSql + : $filterSql; + } + + $sql = 'SELECT COUNT(*) ' + . 'FROM ' . $tableName . ' ' . $tableAlias + . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); + + return $sql; + } + + /** + * Gets the ORDER BY SQL snippet for ordered collections. + * + * @param array $orderBy + * @param string $baseTableAlias + * + * @return string + * + * @throws \Doctrine\ORM\ORMException + */ + protected final function getOrderBySQL(array $orderBy, $baseTableAlias) + { + $orderByList = array(); + + foreach ($orderBy as $fieldName => $orientation) { + + $orientation = strtoupper(trim($orientation)); + + if ($orientation != 'ASC' && $orientation != 'DESC') { + throw ORMException::invalidOrientation($this->class->name, $fieldName); + } + + if (isset($this->class->fieldMappings[$fieldName])) { + $tableAlias = isset($this->class->fieldMappings[$fieldName]['inherited']) + ? $this->getSQLTableAlias($this->class->fieldMappings[$fieldName]['inherited']) + : $baseTableAlias; + + $columnName = $this->quoteStrategy->getColumnName($fieldName, $this->class, $this->platform); + $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation; + + continue; + } + + if (isset($this->class->associationMappings[$fieldName])) { + + if ( ! $this->class->associationMappings[$fieldName]['isOwningSide']) { + throw ORMException::invalidFindByInverseAssociation($this->class->name, $fieldName); + } + + $tableAlias = isset($this->class->associationMappings[$fieldName]['inherited']) + ? $this->getSQLTableAlias($this->class->associationMappings[$fieldName]['inherited']) + : $baseTableAlias; + + foreach ($this->class->associationMappings[$fieldName]['joinColumns'] as $joinColumn) { + $columnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); + $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation; + } + + continue; + } + + throw ORMException::unrecognizedField($fieldName); + } + + return ' ORDER BY ' . implode(', ', $orderByList); + } + + /** + * Gets the SQL fragment with the list of columns to select when querying for + * an entity in this persister. + * + * Subclasses should override this method to alter or change the select column + * list SQL fragment. Note that in the implementation of BasicEntityPersister + * the resulting SQL fragment is generated only once and cached in {@link selectColumnListSql}. + * Subclasses may or may not do the same. + * + * @return string The SQL fragment. + */ + protected function getSelectColumnsSQL() + { + if ($this->currentPersisterContext->selectColumnListSql !== null) { + return $this->currentPersisterContext->selectColumnListSql; + } + + $columnList = array(); + $this->currentPersisterContext->rsm->addEntityResult($this->class->name, 'r'); // r for root + + // Add regular columns to select list + foreach ($this->class->fieldNames as $field) { + $columnList[] = $this->getSelectColumnSQL($field, $this->class); + } + + $this->currentPersisterContext->selectJoinSql = ''; + $eagerAliasCounter = 0; + + foreach ($this->class->associationMappings as $assocField => $assoc) { + $assocColumnSQL = $this->getSelectColumnAssociationSQL($assocField, $assoc, $this->class); + + if ($assocColumnSQL) { + $columnList[] = $assocColumnSQL; + } + + $isAssocToOneInverseSide = $assoc['type'] & ClassMetadata::TO_ONE && ! $assoc['isOwningSide']; + $isAssocFromOneEager = $assoc['type'] !== ClassMetadata::MANY_TO_MANY && $assoc['fetch'] === ClassMetadata::FETCH_EAGER; + + if ( ! ($isAssocFromOneEager || $isAssocToOneInverseSide)) { + continue; + } + + if ((($assoc['type'] & ClassMetadata::TO_MANY) > 0) && $this->currentPersisterContext->handlesLimits) { + continue; + } + + $eagerEntity = $this->em->getClassMetadata($assoc['targetEntity']); + + if ($eagerEntity->inheritanceType != ClassMetadata::INHERITANCE_TYPE_NONE) { + continue; // now this is why you shouldn't use inheritance + } + + $assocAlias = 'e' . ($eagerAliasCounter++); + $this->currentPersisterContext->rsm->addJoinedEntityResult($assoc['targetEntity'], $assocAlias, 'r', $assocField); + + foreach ($eagerEntity->fieldNames as $field) { + $columnList[] = $this->getSelectColumnSQL($field, $eagerEntity, $assocAlias); + } + + foreach ($eagerEntity->associationMappings as $eagerAssocField => $eagerAssoc) { + $eagerAssocColumnSQL = $this->getSelectColumnAssociationSQL( + $eagerAssocField, $eagerAssoc, $eagerEntity, $assocAlias + ); + + if ($eagerAssocColumnSQL) { + $columnList[] = $eagerAssocColumnSQL; + } + } + + $association = $assoc; + $joinCondition = array(); + + if (isset($assoc['indexBy'])) { + $this->currentPersisterContext->rsm->addIndexBy($assocAlias, $assoc['indexBy']); + } + + if ( ! $assoc['isOwningSide']) { + $eagerEntity = $this->em->getClassMetadata($assoc['targetEntity']); + $association = $eagerEntity->getAssociationMapping($assoc['mappedBy']); + } + + $joinTableAlias = $this->getSQLTableAlias($eagerEntity->name, $assocAlias); + $joinTableName = $this->quoteStrategy->getTableName($eagerEntity, $this->platform); + + if ($assoc['isOwningSide']) { + $tableAlias = $this->getSQLTableAlias($association['targetEntity'], $assocAlias); + $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForJoinColumns($association['joinColumns']); + + foreach ($association['joinColumns'] as $joinColumn) { + $sourceCol = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); + $targetCol = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform); + $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity']) + . '.' . $sourceCol . ' = ' . $tableAlias . '.' . $targetCol; + } + + // Add filter SQL + if ($filterSql = $this->generateFilterConditionSQL($eagerEntity, $tableAlias)) { + $joinCondition[] = $filterSql; + } + + } else { + + $this->currentPersisterContext->selectJoinSql .= ' LEFT JOIN'; + + foreach ($association['joinColumns'] as $joinColumn) { + $sourceCol = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); + $targetCol = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform); + + $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias) . '.' . $sourceCol . ' = ' + . $this->getSQLTableAlias($association['targetEntity']) . '.' . $targetCol; + } + } + + $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON '; + $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition); + } + + $this->currentPersisterContext->selectColumnListSql = implode(', ', $columnList); + + return $this->currentPersisterContext->selectColumnListSql; + } + + /** + * Gets the SQL join fragment used when selecting entities from an association. + * + * @param string $field + * @param array $assoc + * @param ClassMetadata $class + * @param string $alias + * + * @return string + */ + protected function getSelectColumnAssociationSQL($field, $assoc, ClassMetadata $class, $alias = 'r') + { + if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) ) { + return ''; + } + + $columnList = array(); + $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); + + foreach ($assoc['joinColumns'] as $joinColumn) { + $type = null; + $isIdentifier = isset($assoc['id']) && $assoc['id'] === true; + $quotedColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); + $resultColumnName = $this->getSQLColumnAlias($joinColumn['name']); + $columnList[] = $this->getSQLTableAlias($class->name, ($alias == 'r' ? '' : $alias) ) + . '.' . $quotedColumn . ' AS ' . $resultColumnName; + $type = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em); + + $this->currentPersisterContext->rsm->addMetaResult($alias, $resultColumnName, $quotedColumn, $isIdentifier, $type); + } + + return implode(', ', $columnList); + } + + /** + * Gets the SQL join fragment used when selecting entities from a + * many-to-many association. + * + * @param array $manyToMany + * + * @return string + */ + protected function getSelectManyToManyJoinSQL(array $manyToMany) + { + $conditions = array(); + $association = $manyToMany; + $sourceTableAlias = $this->getSQLTableAlias($this->class->name); + + if ( ! $manyToMany['isOwningSide']) { + $targetEntity = $this->em->getClassMetadata($manyToMany['targetEntity']); + $association = $targetEntity->associationMappings[$manyToMany['mappedBy']]; + } + + $joinTableName = $this->quoteStrategy->getJoinTableName($association, $this->class, $this->platform); + $joinColumns = ($manyToMany['isOwningSide']) + ? $association['joinTable']['inverseJoinColumns'] + : $association['joinTable']['joinColumns']; + + foreach ($joinColumns as $joinColumn) { + $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); + $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform); + $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableName . '.' . $quotedSourceColumn; + } + + return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions); + } + + /** + * {@inheritdoc} + */ + public function getInsertSQL() + { + if ($this->insertSql !== null) { + return $this->insertSql; + } + + $columns = $this->getInsertColumnList(); + $tableName = $this->quoteStrategy->getTableName($this->class, $this->platform); + + if (empty($columns)) { + $identityColumn = $this->quoteStrategy->getColumnName($this->class->identifier[0], $this->class, $this->platform); + $this->insertSql = $this->platform->getEmptyIdentityInsertSQL($tableName, $identityColumn); + + return $this->insertSql; + } + + $values = array(); + $columns = array_unique($columns); + + foreach ($columns as $column) { + $placeholder = '?'; + + if (isset($this->class->fieldNames[$column]) + && isset($this->columnTypes[$this->class->fieldNames[$column]]) + && isset($this->class->fieldMappings[$this->class->fieldNames[$column]]['requireSQLConversion'])) { + + $type = Type::getType($this->columnTypes[$this->class->fieldNames[$column]]); + $placeholder = $type->convertToDatabaseValueSQL('?', $this->platform); + } + + $values[] = $placeholder; + } + + $columns = implode(', ', $columns); + $values = implode(', ', $values); + + $this->insertSql = sprintf('INSERT INTO %s (%s) VALUES (%s)', $tableName, $columns, $values); + + return $this->insertSql; + } + + /** + * Gets the list of columns to put in the INSERT SQL statement. + * + * Subclasses should override this method to alter or change the list of + * columns placed in the INSERT statements used by the persister. + * + * @return array The list of columns. + */ + protected function getInsertColumnList() + { + $columns = array(); + + foreach ($this->class->reflFields as $name => $field) { + if ($this->class->isVersioned && $this->class->versionField == $name) { + continue; + } + + if (isset($this->class->embeddedClasses[$name])) { + continue; + } + + if (isset($this->class->associationMappings[$name])) { + $assoc = $this->class->associationMappings[$name]; + if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) { + foreach ($assoc['joinColumns'] as $joinColumn) { + $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); + } + } + + continue; + } + + if ($this->class->generatorType != ClassMetadata::GENERATOR_TYPE_IDENTITY || $this->class->identifier[0] != $name) { + $columns[] = $this->quoteStrategy->getColumnName($name, $this->class, $this->platform); + $this->columnTypes[$name] = $this->class->fieldMappings[$name]['type']; + } + } + + return $columns; + } + + /** + * Gets the SQL snippet of a qualified column name for the given field name. + * + * @param string $field The field name. + * @param ClassMetadata $class The class that declares this field. The table this class is + * mapped to must own the column for the given field. + * @param string $alias + * + * @return string + */ + protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r') + { + $root = $alias == 'r' ? '' : $alias ; + $tableAlias = $this->getSQLTableAlias($class->name, $root); + $columnName = $this->quoteStrategy->getColumnName($field, $class, $this->platform); + $sql = $tableAlias . '.' . $columnName; + $columnAlias = $this->getSQLColumnAlias($class->columnNames[$field]); + + $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field); + + if (isset($class->fieldMappings[$field]['requireSQLConversion'])) { + $type = Type::getType($class->getTypeOfField($field)); + $sql = $type->convertToPHPValueSQL($sql, $this->platform); + } + + return $sql . ' AS ' . $columnAlias; + } + + /** + * Gets the SQL table alias for the given class name. + * + * @param string $className + * @param string $assocName + * + * @return string The SQL table alias. + * + * @todo Reconsider. Binding table aliases to class names is not such a good idea. + */ + protected function getSQLTableAlias($className, $assocName = '') + { + if ($assocName) { + $className .= '#' . $assocName; + } + + if (isset($this->currentPersisterContext->sqlTableAliases[$className])) { + return $this->currentPersisterContext->sqlTableAliases[$className]; + } + + $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++; + + $this->currentPersisterContext->sqlTableAliases[$className] = $tableAlias; + + return $tableAlias; + } + + /** + * {@inheritdoc} + */ + public function lock(array $criteria, $lockMode) + { + $lockSql = ''; + $conditionSql = $this->getSelectConditionSQL($criteria); + + switch ($lockMode) { + case LockMode::PESSIMISTIC_READ: + $lockSql = $this->platform->getReadLockSql(); + + break; + case LockMode::PESSIMISTIC_WRITE: + + $lockSql = $this->platform->getWriteLockSql(); + break; + } + + $lock = $this->getLockTablesSql($lockMode); + $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' '; + $sql = 'SELECT 1 ' + . $lock + . $where + . $lockSql; + + list($params, $types) = $this->expandParameters($criteria); + + $this->conn->executeQuery($sql, $params, $types); + } + + /** + * Gets the FROM and optionally JOIN conditions to lock the entity managed by this persister. + * + * @param integer $lockMode One of the Doctrine\DBAL\LockMode::* constants. + * + * @return string + */ + protected function getLockTablesSql($lockMode) + { + return $this->platform->appendLockHint( + 'FROM ' + . $this->quoteStrategy->getTableName($this->class, $this->platform) . ' ' + . $this->getSQLTableAlias($this->class->name), + $lockMode + ); + } + + /** + * Gets the Select Where Condition from a Criteria object. + * + * @param \Doctrine\Common\Collections\Criteria $criteria + * + * @return string + */ + protected function getSelectConditionCriteriaSQL(Criteria $criteria) + { + $expression = $criteria->getWhereExpression(); + + if ($expression === null) { + return ''; + } + + $visitor = new SqlExpressionVisitor($this, $this->class); + + return $visitor->dispatch($expression); + } + + /** + * {@inheritdoc} + */ + public function getSelectConditionStatementSQL($field, $value, $assoc = null, $comparison = null) + { + $selectedColumns = array(); + $columns = $this->getSelectConditionStatementColumnSQL($field, $assoc); + + if (count($columns) > 1 && $comparison === Comparison::IN) { + /* + * @todo try to support multi-column IN expressions. + * Example: (col1, col2) IN (('val1A', 'val2A'), ('val1B', 'val2B')) + */ + throw ORMException::cantUseInOperatorOnCompositeKeys(); + } + + foreach ($columns as $column) { + $placeholder = '?'; + + if (isset($this->class->fieldMappings[$field]['requireSQLConversion'])) { + $placeholder = Type::getType($this->class->getTypeOfField($field))->convertToDatabaseValueSQL($placeholder, $this->platform); + } + + if (null !== $comparison) { + // special case null value handling + if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) { + $selectedColumns[] = $column . ' IS NULL'; + continue; + } + + if ($comparison === Comparison::NEQ && null === $value) { + $selectedColumns[] = $column . ' IS NOT NULL'; + continue; + } + + $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder); + continue; + } + + if (is_array($value)) { + $in = sprintf('%s IN (%s)', $column, $placeholder); + + if (false !== array_search(null, $value, true)) { + $selectedColumns[] = sprintf('(%s OR %s IS NULL)', $in, $column); + continue; + } + + $selectedColumns[] = $in; + continue; + } + + if (null === $value) { + $selectedColumns[] = sprintf('%s IS NULL', $column); + continue; + } + + $selectedColumns[] = sprintf('%s = %s', $column, $placeholder); + } + + return implode(' AND ', $selectedColumns); + } + + /** + * Builds the left-hand-side of a where condition statement. + * + * @param string $field + * @param array|null $assoc + * + * @return string[] + * + * @throws \Doctrine\ORM\ORMException + */ + private function getSelectConditionStatementColumnSQL($field, $assoc = null) + { + if (isset($this->class->columnNames[$field])) { + $className = (isset($this->class->fieldMappings[$field]['inherited'])) + ? $this->class->fieldMappings[$field]['inherited'] + : $this->class->name; + + return array($this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getColumnName($field, $this->class, $this->platform)); + } + + if (isset($this->class->associationMappings[$field])) { + $association = $this->class->associationMappings[$field]; + // Many-To-Many requires join table check for joinColumn + $columns = array(); + $class = $this->class; + + if ($association['type'] === ClassMetadata::MANY_TO_MANY) { + if ( ! $association['isOwningSide']) { + $association = $assoc; + } + + $joinTableName = $this->quoteStrategy->getJoinTableName($association, $class, $this->platform); + $joinColumns = $assoc['isOwningSide'] + ? $association['joinTable']['joinColumns'] + : $association['joinTable']['inverseJoinColumns']; + + + foreach ($joinColumns as $joinColumn) { + $columns[] = $joinTableName . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); + } + + } else { + + if ( ! $association['isOwningSide']) { + throw ORMException::invalidFindByInverseAssociation($this->class->name, $field); + } + + $className = (isset($association['inherited'])) + ? $association['inherited'] + : $this->class->name; + + foreach ($association['joinColumns'] as $joinColumn) { + $columns[] = $this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); + } + } + return $columns; + } + + if ($assoc !== null && strpos($field, " ") === false && strpos($field, "(") === false) { + // very careless developers could potentially open up this normally hidden api for userland attacks, + // therefore checking for spaces and function calls which are not allowed. + + // found a join column condition, not really a "field" + return array($field); + } + + throw ORMException::unrecognizedField($field); + } + + /** + * Gets the conditional SQL fragment used in the WHERE clause when selecting + * entities in this persister. + * + * Subclasses are supposed to override this method if they intend to change + * or alter the criteria by which entities are selected. + * + * @param array $criteria + * @param array|null $assoc + * + * @return string + */ + protected function getSelectConditionSQL(array $criteria, $assoc = null) + { + $conditions = array(); + + foreach ($criteria as $field => $value) { + $conditions[] = $this->getSelectConditionStatementSQL($field, $value, $assoc); + } + + return implode(' AND ', $conditions); + } + + /** + * {@inheritdoc} + */ + public function getOneToManyCollection(array $assoc, $sourceEntity, $offset = null, $limit = null) + { + $this->switchPersisterContext($offset, $limit); + + $stmt = $this->getOneToManyStatement($assoc, $sourceEntity, $offset, $limit); + + return $this->loadArrayFromStatement($assoc, $stmt); + } + + /** + * {@inheritdoc} + */ + public function loadOneToManyCollection(array $assoc, $sourceEntity, PersistentCollection $coll) + { + $stmt = $this->getOneToManyStatement($assoc, $sourceEntity); + + return $this->loadCollectionFromStatement($assoc, $stmt, $coll); + } + + /** + * Builds criteria and execute SQL statement to fetch the one to many entities from. + * + * @param array $assoc + * @param object $sourceEntity + * @param int|null $offset + * @param int|null $limit + * + * @return \Doctrine\DBAL\Statement + */ + private function getOneToManyStatement(array $assoc, $sourceEntity, $offset = null, $limit = null) + { + $this->switchPersisterContext($offset, $limit); + + $criteria = array(); + $parameters = array(); + $owningAssoc = $this->class->associationMappings[$assoc['mappedBy']]; + $sourceClass = $this->em->getClassMetadata($assoc['sourceEntity']); + + $tableAlias = $this->getSQLTableAlias(isset($owningAssoc['inherited']) ? $owningAssoc['inherited'] : $this->class->name); + + foreach ($owningAssoc['targetToSourceKeyColumns'] as $sourceKeyColumn => $targetKeyColumn) { + if ($sourceClass->containsForeignIdentifier) { + $field = $sourceClass->getFieldForColumn($sourceKeyColumn); + $value = $sourceClass->reflFields[$field]->getValue($sourceEntity); + + if (isset($sourceClass->associationMappings[$field])) { + $value = $this->em->getUnitOfWork()->getEntityIdentifier($value); + $value = $value[$this->em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]]; + } + + $criteria[$tableAlias . "." . $targetKeyColumn] = $value; + $parameters[] = array( + 'value' => $value, + 'field' => $field, + 'class' => $sourceClass, + ); + + continue; + } + + $field = $sourceClass->fieldNames[$sourceKeyColumn]; + $value = $sourceClass->reflFields[$field]->getValue($sourceEntity); + + $criteria[$tableAlias . "." . $targetKeyColumn] = $value; + $parameters[] = array( + 'value' => $value, + 'field' => $field, + 'class' => $sourceClass, + ); + + } + + $sql = $this->getSelectSQL($criteria, $assoc, null, $limit, $offset); + list($params, $types) = $this->expandToManyParameters($parameters); + + return $this->conn->executeQuery($sql, $params, $types); + } + + /** + * {@inheritdoc} + */ + public function expandParameters($criteria) + { + $params = array(); + $types = array(); + + foreach ($criteria as $field => $value) { + if ($value === null) { + continue; // skip null values. + } + + $types = array_merge($types, $this->getTypes($field, $value, $this->class)); + $params = array_merge($params, $this->getValues($value)); + } + + return array($params, $types); + } + + /** + * Expands the parameters from the given criteria and use the correct binding types if found, + * specialized for OneToMany or ManyToMany associations. + * + * @param mixed[][] $criteria an array of arrays containing following: + * - field to which each criterion will be bound + * - value to be bound + * - class to which the field belongs to + * + * + * @return array + */ + private function expandToManyParameters($criteria) + { + $params = array(); + $types = array(); + + foreach ($criteria as $criterion) { + if ($criterion['value'] === null) { + continue; // skip null values. + } + + $types = array_merge($types, $this->getTypes($criterion['field'], $criterion['value'], $criterion['class'])); + $params = array_merge($params, $this->getValues($criterion['value'])); + } + + return array($params, $types); + } + + /** + * Infers field types to be used by parameter type casting. + * + * @param string $field + * @param mixed $value + * + * @return array + * + * @throws \Doctrine\ORM\Query\QueryException + */ + private function getTypes($field, $value, ClassMetadata $class) + { + $types = array(); + + switch (true) { + case (isset($class->fieldMappings[$field])): + $types = array_merge($types, PersisterHelper::getTypeOfField($field, $class, $this->em)); + break; + + case (isset($class->associationMappings[$field])): + $assoc = $class->associationMappings[$field]; + $class = $this->em->getClassMetadata($assoc['targetEntity']); + + if (! $assoc['isOwningSide']) { + $assoc = $class->associationMappings[$assoc['mappedBy']]; + $class = $this->em->getClassMetadata($assoc['targetEntity']); + } + + $columns = $assoc['type'] === ClassMetadata::MANY_TO_MANY + ? $assoc['relationToTargetKeyColumns'] + : $assoc['sourceToTargetKeyColumns']; + + foreach ($columns as $column){ + $types[] = PersisterHelper::getTypeOfColumn($column, $class, $this->em); + } + break; + + default: + $types[] = null; + break; + } + + if (is_array($value)) { + return array_map( + function ($type) { + return Type::getType($type)->getBindingType() + Connection::ARRAY_PARAM_OFFSET; + }, + $types + ); + } + + return $types; + } + + /** + * Retrieves the parameters that identifies a value. + * + * @param mixed $value + * + * @return array + */ + private function getValues($value) + { + if (is_array($value)) { + $newValue = array(); + + foreach ($value as $itemValue) { + $newValue = array_merge($newValue, $this->getValues($itemValue)); + } + + return array($newValue); + } + + if (is_object($value) && $this->em->getMetadataFactory()->hasMetadataFor(ClassUtils::getClass($value))) { + $class = $this->em->getClassMetadata(get_class($value)); + if ($class->isIdentifierComposite) { + $newValue = array(); + + foreach ($class->getIdentifierValues($value) as $innerValue) { + $newValue = array_merge($newValue, $this->getValues($innerValue)); + } + + return $newValue; + } + } + + return array($this->getIndividualValue($value)); + } + + /** + * Retrieves an individual parameter value. + * + * @param mixed $value + * + * @return mixed + */ + private function getIndividualValue($value) + { + if ( ! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(ClassUtils::getClass($value))) { + return $value; + } + + return $this->em->getUnitOfWork()->getSingleIdentifierValue($value); + } + + /** + * {@inheritdoc} + */ + public function exists($entity, Criteria $extraConditions = null) + { + $criteria = $this->class->getIdentifierValues($entity); + + if ( ! $criteria) { + return false; + } + + $alias = $this->getSQLTableAlias($this->class->name); + + $sql = 'SELECT 1 ' + . $this->getLockTablesSql(null) + . ' WHERE ' . $this->getSelectConditionSQL($criteria); + + list($params, $types) = $this->expandParameters($criteria); + + if (null !== $extraConditions) { + $sql .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions); + list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions); + + $params = array_merge($params, $criteriaParams); + $types = array_merge($types, $criteriaTypes); + } + + if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) { + $sql .= ' AND ' . $filterSql; + } + + return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); + } + + /** + * Generates the appropriate join SQL for the given join column. + * + * @param array $joinColumns The join columns definition of an association. + * + * @return string LEFT JOIN if one of the columns is nullable, INNER JOIN otherwise. + */ + protected function getJoinSQLForJoinColumns($joinColumns) + { + // if one of the join columns is nullable, return left join + foreach ($joinColumns as $joinColumn) { + if ( ! isset($joinColumn['nullable']) || $joinColumn['nullable']) { + return 'LEFT JOIN'; + } + } + + return 'INNER JOIN'; + } + + /** + * {@inheritdoc} + */ + public function getSQLColumnAlias($columnName) + { + return $this->quoteStrategy->getColumnAlias($columnName, $this->currentPersisterContext->sqlAliasCounter++, $this->platform); + } + + /** + * Generates the filter SQL for a given entity and table alias. + * + * @param ClassMetadata $targetEntity Metadata of the target entity. + * @param string $targetTableAlias The table alias of the joined/selected table. + * + * @return string The SQL query part to add to a query. + */ + protected function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) + { + $filterClauses = array(); + + foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { + if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { + $filterClauses[] = '(' . $filterExpr . ')'; + } + } + + $sql = implode(' AND ', $filterClauses); + return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL" + } + + /** + * Switches persister context according to current query offset/limits + * + * This is due to the fact that to-many associations cannot be fetch-joined when a limit is involved + * + * @param null|int $offset + * @param null|int $limit + */ + protected function switchPersisterContext($offset, $limit) + { + if (null === $offset && null === $limit) { + $this->currentPersisterContext = $this->noLimitsContext; + + return; + } + + $this->currentPersisterContext = $this->limitsHandlingContext; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/CachedPersisterContext.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/CachedPersisterContext.php new file mode 100644 index 0000000000000000000000000000000000000000..81fde938b3ec8b06dff90138625855d88c066283 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/CachedPersisterContext.php @@ -0,0 +1,102 @@ +. + */ + +namespace Doctrine\ORM\Persisters\Entity; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\ORM\Query\ResultSetMapping; + +/** + * A swappable persister context to use as a container for the current + * generated query/resultSetMapping/type binding information. + * + * This class is a utility class to be used only by the persister API + * + * This object is highly mutable due to performance reasons. Same reasoning + * behind its properties being public. + * + * @author Marco Pivetta + */ +class CachedPersisterContext +{ + /** + * Metadata object that describes the mapping of the mapped entity class. + * + * @var \Doctrine\ORM\Mapping\ClassMetadata + */ + public $class; + + /** + * ResultSetMapping that is used for all queries. Is generated lazily once per request. + * + * @var \Doctrine\ORM\Query\ResultSetMapping + */ + public $rsm; + + /** + * The SELECT column list SQL fragment used for querying entities by this persister. + * This SQL fragment is only generated once per request, if at all. + * + * @var string|null + */ + public $selectColumnListSql; + + /** + * The JOIN SQL fragment used to eagerly load all many-to-one and one-to-one + * associations configured as FETCH_EAGER, as well as all inverse one-to-one associations. + * + * @var string + */ + public $selectJoinSql; + + /** + * Counter for creating unique SQL table and column aliases. + * + * @var integer + */ + public $sqlAliasCounter = 0; + + /** + * Map from class names (FQCN) to the corresponding generated SQL table aliases. + * + * @var array + */ + public $sqlTableAliases = array(); + + /** + * Whether this persistent context is considering limit operations applied to the selection queries + * + * @var bool + */ + public $handlesLimits; + + /** + * @param ClassMetadata $class + * @param ResultSetMapping $rsm + * @param bool $handlesLimits + */ + public function __construct( + ClassMetadata $class, + ResultSetMapping $rsm, + $handlesLimits + ) { + $this->class = $class; + $this->rsm = $rsm; + $this->handlesLimits = (bool) $handlesLimits; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/EntityPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/EntityPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..55887eefa8f62c8387e96d3bcafcd88b63895da3 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/EntityPersister.php @@ -0,0 +1,329 @@ +. + */ + +namespace Doctrine\ORM\Persisters\Entity; + +use Doctrine\ORM\PersistentCollection; +use Doctrine\Common\Collections\Criteria; + +/** + * Entity persister interface + * Define the behavior that should be implemented by all entity persisters. + * + * @author Fabio B. Silva + * @since 2.5 + */ +interface EntityPersister +{ + /** + * @return \Doctrine\ORM\Mapping\ClassMetadata + */ + public function getClassMetadata(); + + /** + * Gets the ResultSetMapping used for hydration. + * + * @return \Doctrine\ORM\Query\ResultSetMapping + */ + public function getResultSetMapping(); + + /** + * Get all queued inserts. + * + * @return array + */ + public function getInserts(); + + /** + * @TODO - It should not be here. + * But its necessary since JoinedSubclassPersister#executeInserts invoke the root persister. + * + * Gets the INSERT SQL used by the persister to persist a new entity. + * + * @return string + */ + public function getInsertSQL(); + + /** + * Gets the SELECT SQL to select one or more entities by a set of field criteria. + * + * @param array|\Doctrine\Common\Collections\Criteria $criteria + * @param array|null $assoc + * @param int|null $lockMode + * @param int|null $limit + * @param int|null $offset + * @param array|null $orderBy + * + * @return string + */ + public function getSelectSQL($criteria, $assoc = null, $lockMode = null, $limit = null, $offset = null, array $orderBy = null); + + /** + * Get the COUNT SQL to count entities (optionally based on a criteria) + * + * @param array|\Doctrine\Common\Collections\Criteria $criteria + * @return string + */ + public function getCountSQL($criteria = array()); + + /** + * Expands the parameters from the given criteria and use the correct binding types if found. + * + * @param $criteria + * + * @return array + */ + public function expandParameters($criteria); + + /** + * Expands Criteria Parameters by walking the expressions and grabbing all parameters and types from it. + * + * @param \Doctrine\Common\Collections\Criteria $criteria + * + * @return array + */ + public function expandCriteriaParameters(Criteria $criteria); + + /** + * Gets the SQL WHERE condition for matching a field with a given value. + * + * @param string $field + * @param mixed $value + * @param array|null $assoc + * @param string|null $comparison + * + * @return string + */ + public function getSelectConditionStatementSQL($field, $value, $assoc = null, $comparison = null); + + /** + * Adds an entity to the queued insertions. + * The entity remains queued until {@link executeInserts} is invoked. + * + * @param object $entity The entity to queue for insertion. + * + * @return void + */ + public function addInsert($entity); + + /** + * Executes all queued entity insertions and returns any generated post-insert + * identifiers that were created as a result of the insertions. + * + * If no inserts are queued, invoking this method is a NOOP. + * + * @return array An array of any generated post-insert IDs. This will be an empty array + * if the entity class does not use the IDENTITY generation strategy. + */ + public function executeInserts(); + + /** + * Updates a managed entity. The entity is updated according to its current changeset + * in the running UnitOfWork. If there is no changeset, nothing is updated. + * + * @param object $entity The entity to update. + * + * @return void + */ + public function update($entity); + + /** + * Deletes a managed entity. + * + * The entity to delete must be managed and have a persistent identifier. + * The deletion happens instantaneously. + * + * Subclasses may override this method to customize the semantics of entity deletion. + * + * @param object $entity The entity to delete. + * + * @return bool TRUE if the entity got deleted in the database, FALSE otherwise. + */ + public function delete($entity); + + /** + * Count entities (optionally filtered by a criteria) + * + * @param array|\Doctrine\Common\Collections\Criteria $criteria + * + * @return int + */ + public function count($criteria = array()); + + /** + * Gets the name of the table that owns the column the given field is mapped to. + * + * The default implementation in BasicEntityPersister always returns the name + * of the table the entity type of this persister is mapped to, since an entity + * is always persisted to a single table with a BasicEntityPersister. + * + * @param string $fieldName The field name. + * + * @return string The table name. + */ + public function getOwningTable($fieldName); + + /** + * Loads an entity by a list of field criteria. + * + * @param array $criteria The criteria by which to load the entity. + * @param object|null $entity The entity to load the data into. If not specified, a new entity is created. + * @param array|null $assoc The association that connects the entity to load to another entity, if any. + * @param array $hints Hints for entity creation. + * @param int|null $lockMode One of the \Doctrine\DBAL\LockMode::* constants + * or NULL if no specific lock mode should be used + * for loading the entity. + * @param int|null $limit Limit number of results. + * @param array|null $orderBy Criteria to order by. + * + * @return object|null The loaded and managed entity instance or NULL if the entity can not be found. + * + * @todo Check identity map? loadById method? Try to guess whether $criteria is the id? + */ + public function load(array $criteria, $entity = null, $assoc = null, array $hints = array(), $lockMode = null, $limit = null, array $orderBy = null); + + /** + * Loads an entity by identifier. + * + * @param array $identifier The entity identifier. + * @param object|null $entity The entity to load the data into. If not specified, a new entity is created. + * + * @return object The loaded and managed entity instance or NULL if the entity can not be found. + * + * @todo Check parameters + */ + public function loadById(array $identifier, $entity = null); + + /** + * Loads an entity of this persister's mapped class as part of a single-valued + * association from another entity. + * + * @param array $assoc The association to load. + * @param object $sourceEntity The entity that owns the association (not necessarily the "owning side"). + * @param array $identifier The identifier of the entity to load. Must be provided if + * the association to load represents the owning side, otherwise + * the identifier is derived from the $sourceEntity. + * + * @return object The loaded and managed entity instance or NULL if the entity can not be found. + * + * @throws \Doctrine\ORM\Mapping\MappingException + */ + public function loadOneToOneEntity(array $assoc, $sourceEntity, array $identifier = array()); + + /** + * Refreshes a managed entity. + * + * @param array $id The identifier of the entity as an associative array from + * column or field names to values. + * @param object $entity The entity to refresh. + * @param int|null $lockMode One of the \Doctrine\DBAL\LockMode::* constants + * or NULL if no specific lock mode should be used + * for refreshing the managed entity. + * + * @return void + */ + public function refresh(array $id, $entity, $lockMode = null); + + /** + * Loads Entities matching the given Criteria object. + * + * @param \Doctrine\Common\Collections\Criteria $criteria + * + * @return array + */ + public function loadCriteria(Criteria $criteria); + + /** + * Loads a list of entities by a list of field criteria. + * + * @param array $criteria + * @param array|null $orderBy + * @param int|null $limit + * @param int|null $offset + * + * @return array + */ + public function loadAll(array $criteria = array(), array $orderBy = null, $limit = null, $offset = null); + + /** + * Gets (sliced or full) elements of the given collection. + * + * @param array $assoc + * @param object $sourceEntity + * @param int|null $offset + * @param int|null $limit + * + * @return array + */ + public function getManyToManyCollection(array $assoc, $sourceEntity, $offset = null, $limit = null); + + /** + * Loads a collection of entities of a many-to-many association. + * + * @param array $assoc The association mapping of the association being loaded. + * @param object $sourceEntity The entity that owns the collection. + * @param PersistentCollection $collection The collection to fill. + * + * @return array + */ + public function loadManyToManyCollection(array $assoc, $sourceEntity, PersistentCollection $collection); + + /** + * Loads a collection of entities in a one-to-many association. + * + * @param array $assoc + * @param object $sourceEntity + * @param PersistentCollection $collection The collection to load/fill. + * + * @return array + */ + public function loadOneToManyCollection(array $assoc, $sourceEntity, PersistentCollection $collection); + + /** + * Locks all rows of this entity matching the given criteria with the specified pessimistic lock mode. + * + * @param array $criteria + * @param int $lockMode One of the Doctrine\DBAL\LockMode::* constants. + * + * @return void + */ + public function lock(array $criteria, $lockMode); + + /** + * Returns an array with (sliced or full list) of elements in the specified collection. + * + * @param array $assoc + * @param object $sourceEntity + * @param int|null $offset + * @param int|null $limit + * + * @return array + */ + public function getOneToManyCollection(array $assoc, $sourceEntity, $offset = null, $limit = null); + + /** + * Checks whether the given managed entity exists in the database. + * + * @param object $entity + * @param Criteria|null $extraConditions + * + * @return boolean TRUE if the entity exists in the database, FALSE otherwise. + */ + public function exists($entity, Criteria $extraConditions = null); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php new file mode 100644 index 0000000000000000000000000000000000000000..b807fbae9ca0a86dbcf74f02630bd8fbd5a052bb --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php @@ -0,0 +1,628 @@ +. + */ + +namespace Doctrine\ORM\Persisters\Entity; + +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Query\ResultSetMapping; + +use Doctrine\DBAL\LockMode; +use Doctrine\DBAL\Types\Type; + +use Doctrine\Common\Collections\Criteria; +use Doctrine\ORM\Utility\PersisterHelper; + +/** + * The joined subclass persister maps a single entity instance to several tables in the + * database as it is defined by the Class Table Inheritance strategy. + * + * @author Roman Borschel + * @author Benjamin Eberlei + * @author Alexander + * @since 2.0 + * @see http://martinfowler.com/eaaCatalog/classTableInheritance.html + */ +class JoinedSubclassPersister extends AbstractEntityInheritancePersister +{ + /** + * Map that maps column names to the table names that own them. + * This is mainly a temporary cache, used during a single request. + * + * @var array + */ + private $owningTableMap = array(); + + /** + * Map of table to quoted table names. + * + * @var array + */ + private $quotedTableMap = array(); + + /** + * {@inheritdoc} + */ + protected function getDiscriminatorColumnTableName() + { + $class = ($this->class->name !== $this->class->rootEntityName) + ? $this->em->getClassMetadata($this->class->rootEntityName) + : $this->class; + + return $class->getTableName(); + } + + /** + * This function finds the ClassMetadata instance in an inheritance hierarchy + * that is responsible for enabling versioning. + * + * @return \Doctrine\ORM\Mapping\ClassMetadata + */ + private function getVersionedClassMetadata() + { + if (isset($this->class->fieldMappings[$this->class->versionField]['inherited'])) { + $definingClassName = $this->class->fieldMappings[$this->class->versionField]['inherited']; + + return $this->em->getClassMetadata($definingClassName); + } + + return $this->class; + } + + /** + * Gets the name of the table that owns the column the given field is mapped to. + * + * @param string $fieldName + * + * @return string + * + * @override + */ + public function getOwningTable($fieldName) + { + if (isset($this->owningTableMap[$fieldName])) { + return $this->owningTableMap[$fieldName]; + } + + switch (true) { + case isset($this->class->associationMappings[$fieldName]['inherited']): + $cm = $this->em->getClassMetadata($this->class->associationMappings[$fieldName]['inherited']); + break; + + case isset($this->class->fieldMappings[$fieldName]['inherited']): + $cm = $this->em->getClassMetadata($this->class->fieldMappings[$fieldName]['inherited']); + break; + + default: + $cm = $this->class; + break; + } + + $tableName = $cm->getTableName(); + $quotedTableName = $this->quoteStrategy->getTableName($cm, $this->platform); + + $this->owningTableMap[$fieldName] = $tableName; + $this->quotedTableMap[$tableName] = $quotedTableName; + + return $tableName; + } + + /** + * {@inheritdoc} + */ + public function executeInserts() + { + if ( ! $this->queuedInserts) { + return array(); + } + + $postInsertIds = array(); + $idGenerator = $this->class->idGenerator; + $isPostInsertId = $idGenerator->isPostInsertGenerator(); + $rootClass = ($this->class->name !== $this->class->rootEntityName) + ? $this->em->getClassMetadata($this->class->rootEntityName) + : $this->class; + + // Prepare statement for the root table + $rootPersister = $this->em->getUnitOfWork()->getEntityPersister($rootClass->name); + $rootTableName = $rootClass->getTableName(); + $rootTableStmt = $this->conn->prepare($rootPersister->getInsertSQL()); + + // Prepare statements for sub tables. + $subTableStmts = array(); + + if ($rootClass !== $this->class) { + $subTableStmts[$this->class->getTableName()] = $this->conn->prepare($this->getInsertSQL()); + } + + foreach ($this->class->parentClasses as $parentClassName) { + $parentClass = $this->em->getClassMetadata($parentClassName); + $parentTableName = $parentClass->getTableName(); + + if ($parentClass !== $rootClass) { + $parentPersister = $this->em->getUnitOfWork()->getEntityPersister($parentClassName); + $subTableStmts[$parentTableName] = $this->conn->prepare($parentPersister->getInsertSQL()); + } + } + + // Execute all inserts. For each entity: + // 1) Insert on root table + // 2) Insert on sub tables + foreach ($this->queuedInserts as $entity) { + $insertData = $this->prepareInsertData($entity); + + // Execute insert on root table + $paramIndex = 1; + + foreach ($insertData[$rootTableName] as $columnName => $value) { + $rootTableStmt->bindValue($paramIndex++, $value, $this->columnTypes[$columnName]); + } + + $rootTableStmt->execute(); + + if ($isPostInsertId) { + $generatedId = $idGenerator->generate($this->em, $entity); + $id = array( + $this->class->identifier[0] => $generatedId + ); + $postInsertIds[] = array( + 'generatedId' => $generatedId, + 'entity' => $entity, + ); + } else { + $id = $this->em->getUnitOfWork()->getEntityIdentifier($entity); + } + + if ($this->class->isVersioned) { + $this->assignDefaultVersionValue($entity, $id); + } + + // Execute inserts on subtables. + // The order doesn't matter because all child tables link to the root table via FK. + foreach ($subTableStmts as $tableName => $stmt) { + /** @var \Doctrine\DBAL\Statement $stmt */ + $paramIndex = 1; + $data = isset($insertData[$tableName]) + ? $insertData[$tableName] + : array(); + + foreach ((array) $id as $idName => $idVal) { + $type = isset($this->columnTypes[$idName]) ? $this->columnTypes[$idName] : Type::STRING; + + $stmt->bindValue($paramIndex++, $idVal, $type); + } + + foreach ($data as $columnName => $value) { + if (!is_array($id) || !isset($id[$columnName])) { + $stmt->bindValue($paramIndex++, $value, $this->columnTypes[$columnName]); + } + } + + $stmt->execute(); + } + } + + $rootTableStmt->closeCursor(); + + foreach ($subTableStmts as $stmt) { + $stmt->closeCursor(); + } + + $this->queuedInserts = array(); + + return $postInsertIds; + } + + /** + * {@inheritdoc} + */ + public function update($entity) + { + $updateData = $this->prepareUpdateData($entity); + + if ( ! $updateData) { + return; + } + + if (($isVersioned = $this->class->isVersioned) === false) { + return; + } + + $versionedClass = $this->getVersionedClassMetadata(); + $versionedTable = $versionedClass->getTableName(); + + foreach ($updateData as $tableName => $data) { + $tableName = $this->quotedTableMap[$tableName]; + $versioned = $isVersioned && $versionedTable === $tableName; + + $this->updateTable($entity, $tableName, $data, $versioned); + } + + // Make sure the table with the version column is updated even if no columns on that + // table were affected. + if ($isVersioned) { + if ( ! isset($updateData[$versionedTable])) { + $tableName = $this->quoteStrategy->getTableName($versionedClass, $this->platform); + $this->updateTable($entity, $tableName, array(), true); + } + + $identifiers = $this->em->getUnitOfWork()->getEntityIdentifier($entity); + $this->assignDefaultVersionValue($entity, $identifiers); + } + } + + /** + * {@inheritdoc} + */ + public function delete($entity) + { + $identifier = $this->em->getUnitOfWork()->getEntityIdentifier($entity); + $id = array_combine($this->class->getIdentifierColumnNames(), $identifier); + + $this->deleteJoinTableRecords($identifier); + + // If the database platform supports FKs, just + // delete the row from the root table. Cascades do the rest. + if ($this->platform->supportsForeignKeyConstraints()) { + $rootClass = $this->em->getClassMetadata($this->class->rootEntityName); + $rootTable = $this->quoteStrategy->getTableName($rootClass, $this->platform); + + return (bool) $this->conn->delete($rootTable, $id); + } + + // Delete from all tables individually, starting from this class' table up to the root table. + $rootTable = $this->quoteStrategy->getTableName($this->class, $this->platform); + + $affectedRows = $this->conn->delete($rootTable, $id); + + foreach ($this->class->parentClasses as $parentClass) { + $parentMetadata = $this->em->getClassMetadata($parentClass); + $parentTable = $this->quoteStrategy->getTableName($parentMetadata, $this->platform); + + $this->conn->delete($parentTable, $id); + } + + return (bool) $affectedRows; + } + + /** + * {@inheritdoc} + */ + public function getSelectSQL($criteria, $assoc = null, $lockMode = null, $limit = null, $offset = null, array $orderBy = null) + { + $this->switchPersisterContext($offset, $limit); + + $baseTableAlias = $this->getSQLTableAlias($this->class->name); + $joinSql = $this->getJoinSql($baseTableAlias); + + if ($assoc != null && $assoc['type'] == ClassMetadata::MANY_TO_MANY) { + $joinSql .= $this->getSelectManyToManyJoinSQL($assoc); + } + + $conditionSql = ($criteria instanceof Criteria) + ? $this->getSelectConditionCriteriaSQL($criteria) + : $this->getSelectConditionSQL($criteria, $assoc); + + // If the current class in the root entity, add the filters + if ($filterSql = $this->generateFilterConditionSQL($this->em->getClassMetadata($this->class->rootEntityName), $this->getSQLTableAlias($this->class->rootEntityName))) { + $conditionSql .= $conditionSql + ? ' AND ' . $filterSql + : $filterSql; + } + + $orderBySql = ''; + + if ($assoc !== null && isset($assoc['orderBy'])) { + $orderBy = $assoc['orderBy']; + } + + if ($orderBy) { + $orderBySql = $this->getOrderBySQL($orderBy, $baseTableAlias); + } + + $lockSql = ''; + + switch ($lockMode) { + case LockMode::PESSIMISTIC_READ: + + $lockSql = ' ' . $this->platform->getReadLockSql(); + + break; + + case LockMode::PESSIMISTIC_WRITE: + + $lockSql = ' ' . $this->platform->getWriteLockSql(); + + break; + } + + $tableName = $this->quoteStrategy->getTableName($this->class, $this->platform); + $from = ' FROM ' . $tableName . ' ' . $baseTableAlias; + $where = $conditionSql != '' ? ' WHERE ' . $conditionSql : ''; + $lock = $this->platform->appendLockHint($from, $lockMode); + $columnList = $this->getSelectColumnsSQL(); + $query = 'SELECT ' . $columnList + . $lock + . $joinSql + . $where + . $orderBySql; + + return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql; + } + + /** + * {@inheritDoc} + */ + public function getCountSQL($criteria = array()) + { + $tableName = $this->quoteStrategy->getTableName($this->class, $this->platform); + $baseTableAlias = $this->getSQLTableAlias($this->class->name); + $joinSql = $this->getJoinSql($baseTableAlias); + + $conditionSql = ($criteria instanceof Criteria) + ? $this->getSelectConditionCriteriaSQL($criteria) + : $this->getSelectConditionSQL($criteria); + + $filterSql = $this->generateFilterConditionSQL($this->em->getClassMetadata($this->class->rootEntityName), $this->getSQLTableAlias($this->class->rootEntityName)); + + if ('' !== $filterSql) { + $conditionSql = $conditionSql + ? $conditionSql . ' AND ' . $filterSql + : $filterSql; + } + + $sql = 'SELECT COUNT(*) ' + . 'FROM ' . $tableName . ' ' . $baseTableAlias + . $joinSql + . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); + + return $sql; + } + + /** + * {@inheritdoc} + */ + protected function getLockTablesSql($lockMode) + { + $joinSql = ''; + $identifierColumns = $this->class->getIdentifierColumnNames(); + $baseTableAlias = $this->getSQLTableAlias($this->class->name); + + // INNER JOIN parent tables + foreach ($this->class->parentClasses as $parentClassName) { + $conditions = array(); + $tableAlias = $this->getSQLTableAlias($parentClassName); + $parentClass = $this->em->getClassMetadata($parentClassName); + $joinSql .= ' INNER JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON '; + + foreach ($identifierColumns as $idColumn) { + $conditions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn; + } + + $joinSql .= implode(' AND ', $conditions); + } + + return parent::getLockTablesSql($lockMode) . $joinSql; + } + + /** + * Ensure this method is never called. This persister overrides getSelectEntitiesSQL directly. + * + * @return string + */ + protected function getSelectColumnsSQL() + { + // Create the column list fragment only once + if ($this->currentPersisterContext->selectColumnListSql !== null) { + return $this->currentPersisterContext->selectColumnListSql; + } + + $columnList = array(); + $discrColumn = $this->class->discriminatorColumn['name']; + $baseTableAlias = $this->getSQLTableAlias($this->class->name); + $resultColumnName = $this->platform->getSQLResultCasing($discrColumn); + + $this->currentPersisterContext->rsm->addEntityResult($this->class->name, 'r'); + $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); + $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumn); + + // Add regular columns + foreach ($this->class->fieldMappings as $fieldName => $mapping) { + $class = isset($mapping['inherited']) + ? $this->em->getClassMetadata($mapping['inherited']) + : $this->class; + + $columnList[] = $this->getSelectColumnSQL($fieldName, $class); + } + + // Add foreign key columns + foreach ($this->class->associationMappings as $mapping) { + if ( ! $mapping['isOwningSide'] || ! ($mapping['type'] & ClassMetadata::TO_ONE)) { + continue; + } + + $tableAlias = isset($mapping['inherited']) + ? $this->getSQLTableAlias($mapping['inherited']) + : $baseTableAlias; + + foreach ($mapping['targetToSourceKeyColumns'] as $srcColumn) { + $className = isset($mapping['inherited']) + ? $mapping['inherited'] + : $this->class->name; + + $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); + + $columnList[] = $this->getSelectJoinColumnSQL( + $tableAlias, + $srcColumn, + $className, + PersisterHelper::getTypeOfColumn( + $mapping['sourceToTargetKeyColumns'][$srcColumn], + $targetClass, + $this->em + ) + ); + } + } + + // Add discriminator column (DO NOT ALIAS, see AbstractEntityInheritancePersister#processSQLResult). + $tableAlias = ($this->class->rootEntityName == $this->class->name) + ? $baseTableAlias + : $this->getSQLTableAlias($this->class->rootEntityName); + + $columnList[] = $tableAlias . '.' . $discrColumn; + + // sub tables + foreach ($this->class->subClasses as $subClassName) { + $subClass = $this->em->getClassMetadata($subClassName); + $tableAlias = $this->getSQLTableAlias($subClassName); + + // Add subclass columns + foreach ($subClass->fieldMappings as $fieldName => $mapping) { + if (isset($mapping['inherited'])) { + continue; + } + + $columnList[] = $this->getSelectColumnSQL($fieldName, $subClass); + } + + // Add join columns (foreign keys) + foreach ($subClass->associationMappings as $mapping) { + if ( ! $mapping['isOwningSide'] + || ! ($mapping['type'] & ClassMetadata::TO_ONE) + || isset($mapping['inherited'])) { + continue; + } + + foreach ($mapping['targetToSourceKeyColumns'] as $srcColumn) { + $className = isset($mapping['inherited']) + ? $mapping['inherited'] + : $subClass->name; + + $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); + + $columnList[] = $this->getSelectJoinColumnSQL( + $tableAlias, + $srcColumn, + $className, + PersisterHelper::getTypeOfColumn( + $mapping['sourceToTargetKeyColumns'][$srcColumn], + $targetClass, + $this->em + ) + ); + } + } + } + + $this->currentPersisterContext->selectColumnListSql = implode(', ', $columnList); + + return $this->currentPersisterContext->selectColumnListSql; + } + + /** + * {@inheritdoc} + */ + protected function getInsertColumnList() + { + // Identifier columns must always come first in the column list of subclasses. + $columns = $this->class->parentClasses + ? $this->class->getIdentifierColumnNames() + : array(); + + foreach ($this->class->reflFields as $name => $field) { + if (isset($this->class->fieldMappings[$name]['inherited']) + && ! isset($this->class->fieldMappings[$name]['id']) + || isset($this->class->associationMappings[$name]['inherited']) + || ($this->class->isVersioned && $this->class->versionField == $name) + || isset($this->class->embeddedClasses[$name])) { + continue; + } + + if (isset($this->class->associationMappings[$name])) { + $assoc = $this->class->associationMappings[$name]; + if ($assoc['type'] & ClassMetadata::TO_ONE && $assoc['isOwningSide']) { + foreach ($assoc['targetToSourceKeyColumns'] as $sourceCol) { + $columns[] = $sourceCol; + } + } + } else if ($this->class->name != $this->class->rootEntityName || + ! $this->class->isIdGeneratorIdentity() || $this->class->identifier[0] != $name) { + $columns[] = $this->quoteStrategy->getColumnName($name, $this->class, $this->platform); + $this->columnTypes[$name] = $this->class->fieldMappings[$name]['type']; + } + } + + // Add discriminator column if it is the topmost class. + if ($this->class->name == $this->class->rootEntityName) { + $columns[] = $this->class->discriminatorColumn['name']; + } + + return $columns; + } + + /** + * {@inheritdoc} + */ + protected function assignDefaultVersionValue($entity, array $id) + { + $value = $this->fetchVersionValue($this->getVersionedClassMetadata(), $id); + $this->class->setFieldValue($entity, $this->class->versionField, $value); + } + + /** + * @param string $baseTableAlias + * @return string + */ + private function getJoinSql($baseTableAlias) + { + $joinSql = ''; + $identifierColumn = $this->class->getIdentifierColumnNames(); + + // INNER JOIN parent tables + foreach ($this->class->parentClasses as $parentClassName) { + $conditions = array(); + $parentClass = $this->em->getClassMetadata($parentClassName); + $tableAlias = $this->getSQLTableAlias($parentClassName); + $joinSql .= ' INNER JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON '; + + + foreach ($identifierColumn as $idColumn) { + $conditions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn; + } + + $joinSql .= implode(' AND ', $conditions); + } + + // OUTER JOIN sub tables + foreach ($this->class->subClasses as $subClassName) { + $conditions = array(); + $subClass = $this->em->getClassMetadata($subClassName); + $tableAlias = $this->getSQLTableAlias($subClassName); + $joinSql .= ' LEFT JOIN ' . $this->quoteStrategy->getTableName($subClass, $this->platform) . ' ' . $tableAlias . ' ON '; + + foreach ($identifierColumn as $idColumn) { + $conditions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn; + } + + $joinSql .= implode(' AND ', $conditions); + } + + return $joinSql; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php new file mode 100644 index 0000000000000000000000000000000000000000..f9e4d55736341f0af8cf8dcf4b221b870f19d4c6 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php @@ -0,0 +1,198 @@ +. + */ + +namespace Doctrine\ORM\Persisters\Entity; + +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\Common\Collections\Criteria; +use Doctrine\ORM\Utility\PersisterHelper; + +/** + * Persister for entities that participate in a hierarchy mapped with the + * SINGLE_TABLE strategy. + * + * @author Roman Borschel + * @author Benjamin Eberlei + * @author Alexander + * @since 2.0 + * @link http://martinfowler.com/eaaCatalog/singleTableInheritance.html + */ +class SingleTablePersister extends AbstractEntityInheritancePersister +{ + /** + * {@inheritdoc} + */ + protected function getDiscriminatorColumnTableName() + { + return $this->class->getTableName(); + } + + /** + * {@inheritdoc} + */ + protected function getSelectColumnsSQL() + { + if ($this->currentPersisterContext->selectColumnListSql !== null) { + return $this->currentPersisterContext->selectColumnListSql; + } + + $columnList[] = parent::getSelectColumnsSQL(); + + $rootClass = $this->em->getClassMetadata($this->class->rootEntityName); + $tableAlias = $this->getSQLTableAlias($rootClass->name); + + // Append discriminator column + $discrColumn = $this->class->discriminatorColumn['name']; + $columnList[] = $tableAlias . '.' . $discrColumn; + + $resultColumnName = $this->platform->getSQLResultCasing($discrColumn); + + $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); + $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumn); + + // Append subclass columns + foreach ($this->class->subClasses as $subClassName) { + $subClass = $this->em->getClassMetadata($subClassName); + + // Regular columns + foreach ($subClass->fieldMappings as $fieldName => $mapping) { + if (isset($mapping['inherited'])) { + continue; + } + + $columnList[] = $this->getSelectColumnSQL($fieldName, $subClass); + } + + // Foreign key columns + foreach ($subClass->associationMappings as $assoc) { + if ( ! $assoc['isOwningSide'] + || ! ($assoc['type'] & ClassMetadata::TO_ONE) + || isset($assoc['inherited'])) { + continue; + } + + foreach ($assoc['targetToSourceKeyColumns'] as $srcColumn) { + $className = isset($assoc['inherited']) ? $assoc['inherited'] : $this->class->name; + + $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); + + $columnList[] = $this->getSelectJoinColumnSQL( + $tableAlias, + $srcColumn, + $className, + PersisterHelper::getTypeOfColumn( + $assoc['sourceToTargetKeyColumns'][$srcColumn], + $targetClass, + $this->em + ) + ); + } + } + } + + $this->currentPersisterContext->selectColumnListSql = implode(', ', $columnList); + + return $this->currentPersisterContext->selectColumnListSql; + } + + /** + * {@inheritdoc} + */ + protected function getInsertColumnList() + { + $columns = parent::getInsertColumnList(); + + // Add discriminator column to the INSERT SQL + $columns[] = $this->class->discriminatorColumn['name']; + + return $columns; + } + + /** + * {@inheritdoc} + */ + protected function getSQLTableAlias($className, $assocName = '') + { + return parent::getSQLTableAlias($this->class->rootEntityName, $assocName); + } + + /** + * {@inheritdoc} + */ + protected function getSelectConditionSQL(array $criteria, $assoc = null) + { + $conditionSql = parent::getSelectConditionSQL($criteria, $assoc); + + if ($conditionSql) { + $conditionSql .= ' AND '; + } + + return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL(); + } + + /** + * {@inheritdoc} + */ + protected function getSelectConditionCriteriaSQL(Criteria $criteria) + { + $conditionSql = parent::getSelectConditionCriteriaSQL($criteria); + + if ($conditionSql) { + $conditionSql .= ' AND '; + } + + return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL(); + } + + /** + * @return string + */ + protected function getSelectConditionDiscriminatorValueSQL() + { + $values = array(); + + if ($this->class->discriminatorValue !== null) { // discriminators can be 0 + $values[] = $this->conn->quote($this->class->discriminatorValue); + } + + $discrValues = array_flip($this->class->discriminatorMap); + + foreach ($this->class->subClasses as $subclassName) { + $values[] = $this->conn->quote($discrValues[$subclassName]); + } + + $values = implode(', ', $values); + $discColumn = $this->class->discriminatorColumn['name']; + $tableAlias = $this->getSQLTableAlias($this->class->name); + + return $tableAlias . '.' . $discColumn . ' IN (' . $values . ')'; + } + + /** + * {@inheritdoc} + */ + protected function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) + { + // Ensure that the filters are applied to the root entity of the inheritance tree + $targetEntity = $this->em->getClassMetadata($targetEntity->rootEntityName); + // we don't care about the $targetTableAlias, in a STI there is only one table. + + return parent::generateFilterConditionSQL($targetEntity, $targetTableAlias); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/PersisterException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/PersisterException.php new file mode 100644 index 0000000000000000000000000000000000000000..111455e5b86035c59ed14413d4e1d8eda6f1c102 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/PersisterException.php @@ -0,0 +1,20 @@ +. + */ + +namespace Doctrine\ORM\Persisters; + +use Doctrine\ORM\Mapping\ClassMetadata; + +use Doctrine\Common\Collections\Expr\ExpressionVisitor; +use Doctrine\Common\Collections\Expr\Comparison; +use Doctrine\Common\Collections\Expr\Value; +use Doctrine\Common\Collections\Expr\CompositeExpression; +use Doctrine\ORM\Persisters\Entity\BasicEntityPersister; + +/** + * Visit Expressions and generate SQL WHERE conditions from them. + * + * @author Benjamin Eberlei + * @since 2.3 + */ +class SqlExpressionVisitor extends ExpressionVisitor +{ + /** + * @var \Doctrine\ORM\Persisters\Entity\BasicEntityPersister + */ + private $persister; + + /** + * @var \Doctrine\ORM\Mapping\ClassMetadata + */ + private $classMetadata; + + /** + * @param \Doctrine\ORM\Persisters\Entity\BasicEntityPersister $persister + * @param \Doctrine\ORM\Mapping\ClassMetadata $classMetadata + */ + public function __construct(BasicEntityPersister $persister, ClassMetadata $classMetadata) + { + $this->persister = $persister; + $this->classMetadata = $classMetadata; + } + + /** + * Converts a comparison expression into the target query language output. + * + * @param \Doctrine\Common\Collections\Expr\Comparison $comparison + * + * @return mixed + */ + public function walkComparison(Comparison $comparison) + { + $field = $comparison->getField(); + $value = $comparison->getValue()->getValue(); // shortcut for walkValue() + + if (isset($this->classMetadata->associationMappings[$field]) && + $value !== null && + ! is_object($value) && + ! in_array($comparison->getOperator(), array(Comparison::IN, Comparison::NIN))) { + + throw PersisterException::matchingAssocationFieldRequiresObject($this->classMetadata->name, $field); + } + + return $this->persister->getSelectConditionStatementSQL($field, $value, null, $comparison->getOperator()); + } + + /** + * Converts a composite expression into the target query language output. + * + * @param \Doctrine\Common\Collections\Expr\CompositeExpression $expr + * + * @return mixed + * + * @throws \RuntimeException + */ + public function walkCompositeExpression(CompositeExpression $expr) + { + $expressionList = array(); + + foreach ($expr->getExpressionList() as $child) { + $expressionList[] = $this->dispatch($child); + } + + switch($expr->getType()) { + case CompositeExpression::TYPE_AND: + return '(' . implode(' AND ', $expressionList) . ')'; + + case CompositeExpression::TYPE_OR: + return '(' . implode(' OR ', $expressionList) . ')'; + + default: + throw new \RuntimeException("Unknown composite " . $expr->getType()); + } + } + + /** + * Converts a value expression into the target query language part. + * + * @param \Doctrine\Common\Collections\Expr\Value $value + * + * @return mixed + */ + public function walkValue(Value $value) + { + return '?'; + } +} + diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/SqlValueVisitor.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/SqlValueVisitor.php new file mode 100644 index 0000000000000000000000000000000000000000..0e680ad078d1a09d5c19e4aa27ab63df9af8b80d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/SqlValueVisitor.php @@ -0,0 +1,118 @@ +. + */ + +namespace Doctrine\ORM\Persisters; + +use Doctrine\Common\Collections\Expr\ExpressionVisitor; +use Doctrine\Common\Collections\Expr\Comparison; +use Doctrine\Common\Collections\Expr\Value; +use Doctrine\Common\Collections\Expr\CompositeExpression; + +/** + * Extract the values from a criteria/expression + * + * @author Benjamin Eberlei + */ +class SqlValueVisitor extends ExpressionVisitor +{ + /** + * @var array + */ + private $values = array(); + + /** + * @var array + */ + private $types = array(); + + /** + * Converts a comparison expression into the target query language output. + * + * @param \Doctrine\Common\Collections\Expr\Comparison $comparison + * + * @return mixed + */ + public function walkComparison(Comparison $comparison) + { + $value = $this->getValueFromComparison($comparison); + $field = $comparison->getField(); + $operator = $comparison->getOperator(); + + if (($operator === Comparison::EQ || $operator === Comparison::IS) && $value === null) { + return; + } else if ($operator === Comparison::NEQ && $value === null) { + return; + } + + $this->values[] = $value; + $this->types[] = array($field, $value); + } + + /** + * Converts a composite expression into the target query language output. + * + * @param \Doctrine\Common\Collections\Expr\CompositeExpression $expr + * + * @return mixed + */ + public function walkCompositeExpression(CompositeExpression $expr) + { + foreach ($expr->getExpressionList() as $child) { + $this->dispatch($child); + } + } + + /** + * Converts a value expression into the target query language part. + * + * @param \Doctrine\Common\Collections\Expr\Value $value + * + * @return mixed + */ + public function walkValue(Value $value) + { + return; + } + + /** + * Returns the Parameters and Types necessary for matching the last visited expression. + * + * @return array + */ + public function getParamsAndTypes() + { + return array($this->values, $this->types); + } + + /** + * Returns the value from a Comparison. In case of a CONTAINS comparison, + * the value is wrapped in %-signs, because it will be used in a LIKE clause. + * + * @param \Doctrine\Common\Collections\Expr\Comparison $comparison + * @return mixed + */ + protected function getValueFromComparison(Comparison $comparison) + { + $value = $comparison->getValue()->getValue(); + + return $comparison->getOperator() == Comparison::CONTAINS + ? "%{$value}%" + : $value; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/PessimisticLockException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/PessimisticLockException.php new file mode 100644 index 0000000000000000000000000000000000000000..d60f7a821771a4502ab87bb5cde7bd122f5941f2 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/PessimisticLockException.php @@ -0,0 +1,40 @@ +. + */ + +namespace Doctrine\ORM; + +/** + * Pessimistic Lock Exception + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 1.0 + * @author Benjamin Eberlei + * @author Roman Borschel + */ +class PessimisticLockException extends ORMException +{ + /** + * @return PessimisticLockException + */ + public static function lockFailed() + { + return new self("The pessimistic lock failed."); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/Autoloader.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/Autoloader.php new file mode 100644 index 0000000000000000000000000000000000000000..9b2e2cdfa1aed2940de0ed5874193d535f71cae9 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/Autoloader.php @@ -0,0 +1,29 @@ +. + */ + +namespace Doctrine\ORM\Proxy; + +use Doctrine\Common\Proxy\Autoloader as BaseAutoloader; + +/** + * @deprecated use \Doctrine\Common\Proxy\Autoloader instead + */ +class Autoloader extends BaseAutoloader +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/Proxy.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/Proxy.php new file mode 100644 index 0000000000000000000000000000000000000000..f478d4905c06b8a296fba5882803e136220cbaa3 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/Proxy.php @@ -0,0 +1,32 @@ +. + */ + +namespace Doctrine\ORM\Proxy; + +use Doctrine\Common\Proxy\Proxy as BaseProxy; + +/** + * Interface for proxy classes. + * + * @author Roman Borschel + * @since 2.0 + */ +interface Proxy extends BaseProxy +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..7a1a2c671866c5264d4c3c958bde115549f6324c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php @@ -0,0 +1,241 @@ +. + */ + +namespace Doctrine\ORM\Proxy; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Proxy\AbstractProxyFactory; +use Doctrine\Common\Proxy\Proxy as BaseProxy; +use Doctrine\Common\Proxy\ProxyDefinition; +use Doctrine\Common\Proxy\ProxyGenerator; +use Doctrine\Common\Util\ClassUtils; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Persisters\Entity\EntityPersister; +use Doctrine\ORM\EntityNotFoundException; +use Doctrine\ORM\Utility\IdentifierFlattener; + +/** + * This factory is used to create proxy objects for entities at runtime. + * + * @author Roman Borschel + * @author Giorgio Sironi + * @author Marco Pivetta + * @since 2.0 + */ +class ProxyFactory extends AbstractProxyFactory +{ + /** + * @var EntityManagerInterface The EntityManager this factory is bound to. + */ + private $em; + + /** + * @var \Doctrine\ORM\UnitOfWork The UnitOfWork this factory uses to retrieve persisters + */ + private $uow; + + /** + * @var string + */ + private $proxyNs; + + /** + * The IdentifierFlattener used for manipulating identifiers + * + * @var \Doctrine\ORM\Utility\IdentifierFlattener + */ + private $identifierFlattener; + + /** + * Initializes a new instance of the ProxyFactory class that is + * connected to the given EntityManager. + * + * @param EntityManagerInterface $em The EntityManager the new factory works for. + * @param string $proxyDir The directory to use for the proxy classes. It must exist. + * @param string $proxyNs The namespace to use for the proxy classes. + * @param boolean|int $autoGenerate The strategy for automatically generating proxy classes. Possible + * values are constants of Doctrine\Common\Proxy\AbstractProxyFactory. + */ + public function __construct(EntityManagerInterface $em, $proxyDir, $proxyNs, $autoGenerate = AbstractProxyFactory::AUTOGENERATE_NEVER) + { + $proxyGenerator = new ProxyGenerator($proxyDir, $proxyNs); + + $proxyGenerator->setPlaceholder('baseProxyInterface', 'Doctrine\ORM\Proxy\Proxy'); + parent::__construct($proxyGenerator, $em->getMetadataFactory(), $autoGenerate); + + $this->em = $em; + $this->uow = $em->getUnitOfWork(); + $this->proxyNs = $proxyNs; + $this->identifierFlattener = new IdentifierFlattener($this->uow, $em->getMetadataFactory()); + } + + /** + * {@inheritDoc} + */ + protected function skipClass(ClassMetadata $metadata) + { + /* @var $metadata \Doctrine\ORM\Mapping\ClassMetadataInfo */ + return $metadata->isMappedSuperclass || $metadata->getReflectionClass()->isAbstract(); + } + + /** + * {@inheritDoc} + */ + protected function createProxyDefinition($className) + { + $classMetadata = $this->em->getClassMetadata($className); + $entityPersister = $this->uow->getEntityPersister($className); + + return new ProxyDefinition( + ClassUtils::generateProxyClassName($className, $this->proxyNs), + $classMetadata->getIdentifierFieldNames(), + $classMetadata->getReflectionProperties(), + $this->createInitializer($classMetadata, $entityPersister), + $this->createCloner($classMetadata, $entityPersister) + ); + } + + /** + * Creates a closure capable of initializing a proxy + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $classMetadata + * @param \Doctrine\ORM\Persisters\Entity\EntityPersister $entityPersister + * + * @return \Closure + * + * @throws \Doctrine\ORM\EntityNotFoundException + */ + private function createInitializer(ClassMetadata $classMetadata, EntityPersister $entityPersister) + { + if ($classMetadata->getReflectionClass()->hasMethod('__wakeup')) { + return function (BaseProxy $proxy) use ($entityPersister, $classMetadata) { + $initializer = $proxy->__getInitializer(); + $cloner = $proxy->__getCloner(); + + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + if ($proxy->__isInitialized()) { + return; + } + + $properties = $proxy->__getLazyProperties(); + + foreach ($properties as $propertyName => $property) { + if ( ! isset($proxy->$propertyName)) { + $proxy->$propertyName = $properties[$propertyName]; + } + } + + $proxy->__setInitialized(true); + $proxy->__wakeup(); + + $identifier = $classMetadata->getIdentifierValues($proxy); + + if (null === $entityPersister->loadById($identifier, $proxy)) { + $proxy->__setInitializer($initializer); + $proxy->__setCloner($cloner); + $proxy->__setInitialized(false); + + throw EntityNotFoundException::fromClassNameAndIdentifier( + $classMetadata->getName(), + $this->identifierFlattener->flattenIdentifier($classMetadata, $identifier) + ); + } + }; + } + + return function (BaseProxy $proxy) use ($entityPersister, $classMetadata) { + $initializer = $proxy->__getInitializer(); + $cloner = $proxy->__getCloner(); + + $proxy->__setInitializer(null); + $proxy->__setCloner(null); + + if ($proxy->__isInitialized()) { + return; + } + + $properties = $proxy->__getLazyProperties(); + + foreach ($properties as $propertyName => $property) { + if (!isset($proxy->$propertyName)) { + $proxy->$propertyName = $properties[$propertyName]; + } + } + + $proxy->__setInitialized(true); + + $identifier = $classMetadata->getIdentifierValues($proxy); + + if (null === $entityPersister->loadById($identifier, $proxy)) { + $proxy->__setInitializer($initializer); + $proxy->__setCloner($cloner); + $proxy->__setInitialized(false); + + throw EntityNotFoundException::fromClassNameAndIdentifier( + $classMetadata->getName(), + $this->identifierFlattener->flattenIdentifier($classMetadata, $identifier) + ); + } + }; + } + + /** + * Creates a closure capable of finalizing state a cloned proxy + * + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $classMetadata + * @param \Doctrine\ORM\Persisters\Entity\EntityPersister $entityPersister + * + * @return \Closure + * + * @throws \Doctrine\ORM\EntityNotFoundException + */ + private function createCloner(ClassMetadata $classMetadata, EntityPersister $entityPersister) + { + return function (BaseProxy $proxy) use ($entityPersister, $classMetadata) { + if ($proxy->__isInitialized()) { + return; + } + + $proxy->__setInitialized(true); + $proxy->__setInitializer(null); + + $class = $entityPersister->getClassMetadata(); + $identifier = $classMetadata->getIdentifierValues($proxy); + $original = $entityPersister->loadById($identifier); + + if (null === $original) { + throw EntityNotFoundException::fromClassNameAndIdentifier( + $classMetadata->getName(), + $this->identifierFlattener->flattenIdentifier($classMetadata, $identifier) + ); + } + + foreach ($class->getReflectionProperties() as $property) { + if ( ! $class->hasField($property->name) && ! $class->hasAssociation($property->name)) { + continue; + } + + $property->setAccessible(true); + $property->setValue($proxy, $property->getValue($original)); + } + }; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php new file mode 100644 index 0000000000000000000000000000000000000000..1911200a933562f50d14eb120b454e902c8edf67 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php @@ -0,0 +1,735 @@ +. + */ + +namespace Doctrine\ORM; + +use Doctrine\DBAL\LockMode; +use Doctrine\ORM\Query\Parser; +use Doctrine\ORM\Query\ParserResult; +use Doctrine\ORM\Query\QueryException; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Query\ParameterTypeInferer; +use Doctrine\Common\Collections\ArrayCollection; + +/** + * A Query object represents a DQL query. + * + * @since 1.0 + * @author Guilherme Blanco + * @author Konsta Vesterinen + * @author Roman Borschel + */ +final class Query extends AbstractQuery +{ + /** + * A query object is in CLEAN state when it has NO unparsed/unprocessed DQL parts. + */ + const STATE_CLEAN = 1; + + /** + * A query object is in state DIRTY when it has DQL parts that have not yet been + * parsed/processed. This is automatically defined as DIRTY when addDqlQueryPart + * is called. + */ + const STATE_DIRTY = 2; + + /* Query HINTS */ + + /** + * The refresh hint turns any query into a refresh query with the result that + * any local changes in entities are overridden with the fetched values. + * + * @var string + */ + const HINT_REFRESH = 'doctrine.refresh'; + + /** + * @var string + */ + const HINT_CACHE_ENABLED = 'doctrine.cache.enabled'; + + /** + * @var string + */ + const HINT_CACHE_EVICT = 'doctrine.cache.evict'; + + /** + * Internal hint: is set to the proxy entity that is currently triggered for loading + * + * @var string + */ + const HINT_REFRESH_ENTITY = 'doctrine.refresh.entity'; + + /** + * The forcePartialLoad query hint forces a particular query to return + * partial objects. + * + * @var string + * @todo Rename: HINT_OPTIMIZE + */ + const HINT_FORCE_PARTIAL_LOAD = 'doctrine.forcePartialLoad'; + + /** + * The includeMetaColumns query hint causes meta columns like foreign keys and + * discriminator columns to be selected and returned as part of the query result. + * + * This hint does only apply to non-object queries. + * + * @var string + */ + const HINT_INCLUDE_META_COLUMNS = 'doctrine.includeMetaColumns'; + + /** + * An array of class names that implement \Doctrine\ORM\Query\TreeWalker and + * are iterated and executed after the DQL has been parsed into an AST. + * + * @var string + */ + const HINT_CUSTOM_TREE_WALKERS = 'doctrine.customTreeWalkers'; + + /** + * A string with a class name that implements \Doctrine\ORM\Query\TreeWalker + * and is used for generating the target SQL from any DQL AST tree. + * + * @var string + */ + const HINT_CUSTOM_OUTPUT_WALKER = 'doctrine.customOutputWalker'; + + //const HINT_READ_ONLY = 'doctrine.readOnly'; + + /** + * @var string + */ + const HINT_INTERNAL_ITERATION = 'doctrine.internal.iteration'; + + /** + * @var string + */ + const HINT_LOCK_MODE = 'doctrine.lockMode'; + + /** + * The current state of this query. + * + * @var integer + */ + private $_state = self::STATE_CLEAN; + + /** + * A snapshot of the parameter types the query was parsed with. + * + * @var array + */ + private $_parsedTypes = array(); + + /** + * Cached DQL query. + * + * @var string + */ + private $_dql = null; + + /** + * The parser result that holds DQL => SQL information. + * + * @var \Doctrine\ORM\Query\ParserResult + */ + private $_parserResult; + + /** + * The first result to return (the "offset"). + * + * @var integer + */ + private $_firstResult = null; + + /** + * The maximum number of results to return (the "limit"). + * + * @var integer + */ + private $_maxResults = null; + + /** + * The cache driver used for caching queries. + * + * @var \Doctrine\Common\Cache\Cache|null + */ + private $_queryCache; + + /** + * Whether or not expire the query cache. + * + * @var boolean + */ + private $_expireQueryCache = false; + + /** + * The query cache lifetime. + * + * @var int + */ + private $_queryCacheTTL; + + /** + * Whether to use a query cache, if available. Defaults to TRUE. + * + * @var boolean + */ + private $_useQueryCache = true; + + /** + * Gets the SQL query/queries that correspond to this DQL query. + * + * @return mixed The built sql query or an array of all sql queries. + * + * @override + */ + public function getSQL() + { + return $this->_parse()->getSQLExecutor()->getSQLStatements(); + } + + /** + * Returns the corresponding AST for this DQL query. + * + * @return \Doctrine\ORM\Query\AST\SelectStatement | + * \Doctrine\ORM\Query\AST\UpdateStatement | + * \Doctrine\ORM\Query\AST\DeleteStatement + */ + public function getAST() + { + $parser = new Parser($this); + + return $parser->getAST(); + } + + /** + * {@inheritdoc} + */ + protected function getResultSetMapping() + { + // parse query or load from cache + if ($this->_resultSetMapping === null) { + $this->_resultSetMapping = $this->_parse()->getResultSetMapping(); + } + + return $this->_resultSetMapping; + } + + /** + * Parses the DQL query, if necessary, and stores the parser result. + * + * Note: Populates $this->_parserResult as a side-effect. + * + * @return \Doctrine\ORM\Query\ParserResult + */ + private function _parse() + { + $types = array(); + + foreach ($this->parameters as $parameter) { + /** @var Query\Parameter $parameter */ + $types[$parameter->getName()] = $parameter->getType(); + } + + // Return previous parser result if the query and the filter collection are both clean + if ($this->_state === self::STATE_CLEAN && $this->_parsedTypes === $types && $this->_em->isFiltersStateClean()) { + return $this->_parserResult; + } + + $this->_state = self::STATE_CLEAN; + $this->_parsedTypes = $types; + + // Check query cache. + if ( ! ($this->_useQueryCache && ($queryCache = $this->getQueryCacheDriver()))) { + $parser = new Parser($this); + + $this->_parserResult = $parser->parse(); + + return $this->_parserResult; + } + + $hash = $this->_getQueryCacheId(); + $cached = $this->_expireQueryCache ? false : $queryCache->fetch($hash); + + if ($cached instanceof ParserResult) { + // Cache hit. + $this->_parserResult = $cached; + + return $this->_parserResult; + } + + // Cache miss. + $parser = new Parser($this); + + $this->_parserResult = $parser->parse(); + + $queryCache->save($hash, $this->_parserResult, $this->_queryCacheTTL); + + return $this->_parserResult; + } + + /** + * {@inheritdoc} + */ + protected function _doExecute() + { + $executor = $this->_parse()->getSqlExecutor(); + + if ($this->_queryCacheProfile) { + $executor->setQueryCacheProfile($this->_queryCacheProfile); + } + + if ($this->_resultSetMapping === null) { + $this->_resultSetMapping = $this->_parserResult->getResultSetMapping(); + } + + // Prepare parameters + $paramMappings = $this->_parserResult->getParameterMappings(); + $paramCount = count($this->parameters); + $mappingCount = count($paramMappings); + + if ($paramCount > $mappingCount) { + throw QueryException::tooManyParameters($mappingCount, $paramCount); + } elseif ($paramCount < $mappingCount) { + throw QueryException::tooFewParameters($mappingCount, $paramCount); + } + + // evict all cache for the entity region + if ($this->hasCache && isset($this->_hints[self::HINT_CACHE_EVICT]) && $this->_hints[self::HINT_CACHE_EVICT]) { + $this->evictEntityCacheRegion(); + } + + list($sqlParams, $types) = $this->processParameterMappings($paramMappings); + + return $executor->execute($this->_em->getConnection(), $sqlParams, $types); + } + + /** + * Evict entity cache region + */ + private function evictEntityCacheRegion() + { + $AST = $this->getAST(); + + if ($AST instanceof \Doctrine\ORM\Query\AST\SelectStatement) { + throw new QueryException('The hint "HINT_CACHE_EVICT" is not valid for select statements.'); + } + + $className = ($AST instanceof \Doctrine\ORM\Query\AST\DeleteStatement) + ? $AST->deleteClause->abstractSchemaName + : $AST->updateClause->abstractSchemaName; + + $this->_em->getCache()->evictEntityRegion($className); + } + + /** + * Processes query parameter mappings. + * + * @param array $paramMappings + * + * @return array + * + * @throws Query\QueryException + */ + private function processParameterMappings($paramMappings) + { + $sqlParams = array(); + $types = array(); + + foreach ($this->parameters as $parameter) { + $key = $parameter->getName(); + $value = $parameter->getValue(); + $rsm = $this->getResultSetMapping(); + + if ( ! isset($paramMappings[$key])) { + throw QueryException::unknownParameter($key); + } + + if (isset($rsm->metadataParameterMapping[$key]) && $value instanceof ClassMetadata) { + $value = $value->getMetadataValue($rsm->metadataParameterMapping[$key]); + } + + $value = $this->processParameterValue($value); + $type = ($parameter->getValue() === $value) + ? $parameter->getType() + : ParameterTypeInferer::inferType($value); + + foreach ($paramMappings[$key] as $position) { + $types[$position] = $type; + } + + $sqlPositions = $paramMappings[$key]; + + // optimized multi value sql positions away for now, + // they are not allowed in DQL anyways. + $value = array($value); + $countValue = count($value); + + for ($i = 0, $l = count($sqlPositions); $i < $l; $i++) { + $sqlParams[$sqlPositions[$i]] = $value[($i % $countValue)]; + } + } + + if (count($sqlParams) != count($types)) { + throw QueryException::parameterTypeMismatch(); + } + + if ($sqlParams) { + ksort($sqlParams); + $sqlParams = array_values($sqlParams); + + ksort($types); + $types = array_values($types); + } + + return array($sqlParams, $types); + } + + /** + * Defines a cache driver to be used for caching queries. + * + * @param \Doctrine\Common\Cache\Cache|null $queryCache Cache driver. + * + * @return Query This query instance. + */ + public function setQueryCacheDriver($queryCache) + { + $this->_queryCache = $queryCache; + + return $this; + } + + /** + * Defines whether the query should make use of a query cache, if available. + * + * @param boolean $bool + * + * @return Query This query instance. + */ + public function useQueryCache($bool) + { + $this->_useQueryCache = $bool; + + return $this; + } + + /** + * Returns the cache driver used for query caching. + * + * @return \Doctrine\Common\Cache\Cache|null The cache driver used for query caching or NULL, if + * this Query does not use query caching. + */ + public function getQueryCacheDriver() + { + if ($this->_queryCache) { + return $this->_queryCache; + } + + return $this->_em->getConfiguration()->getQueryCacheImpl(); + } + + /** + * Defines how long the query cache will be active before expire. + * + * @param integer $timeToLive How long the cache entry is valid. + * + * @return Query This query instance. + */ + public function setQueryCacheLifetime($timeToLive) + { + if ($timeToLive !== null) { + $timeToLive = (int) $timeToLive; + } + + $this->_queryCacheTTL = $timeToLive; + + return $this; + } + + /** + * Retrieves the lifetime of resultset cache. + * + * @return int + */ + public function getQueryCacheLifetime() + { + return $this->_queryCacheTTL; + } + + /** + * Defines if the query cache is active or not. + * + * @param boolean $expire Whether or not to force query cache expiration. + * + * @return Query This query instance. + */ + public function expireQueryCache($expire = true) + { + $this->_expireQueryCache = $expire; + + return $this; + } + + /** + * Retrieves if the query cache is active or not. + * + * @return bool + */ + public function getExpireQueryCache() + { + return $this->_expireQueryCache; + } + + /** + * @override + */ + public function free() + { + parent::free(); + + $this->_dql = null; + $this->_state = self::STATE_CLEAN; + } + + /** + * Sets a DQL query string. + * + * @param string $dqlQuery DQL Query. + * + * @return \Doctrine\ORM\AbstractQuery + */ + public function setDQL($dqlQuery) + { + if ($dqlQuery !== null) { + $this->_dql = $dqlQuery; + $this->_state = self::STATE_DIRTY; + } + + return $this; + } + + /** + * Returns the DQL query that is represented by this query object. + * + * @return string DQL query. + */ + public function getDQL() + { + return $this->_dql; + } + + /** + * Returns the state of this query object + * By default the type is Doctrine_ORM_Query_Abstract::STATE_CLEAN but if it appears any unprocessed DQL + * part, it is switched to Doctrine_ORM_Query_Abstract::STATE_DIRTY. + * + * @see AbstractQuery::STATE_CLEAN + * @see AbstractQuery::STATE_DIRTY + * + * @return integer The query state. + */ + public function getState() + { + return $this->_state; + } + + /** + * Method to check if an arbitrary piece of DQL exists + * + * @param string $dql Arbitrary piece of DQL to check for. + * + * @return boolean + */ + public function contains($dql) + { + return stripos($this->getDQL(), $dql) === false ? false : true; + } + + /** + * Sets the position of the first result to retrieve (the "offset"). + * + * @param integer $firstResult The first result to return. + * + * @return Query This query object. + */ + public function setFirstResult($firstResult) + { + $this->_firstResult = $firstResult; + $this->_state = self::STATE_DIRTY; + + return $this; + } + + /** + * Gets the position of the first result the query object was set to retrieve (the "offset"). + * Returns NULL if {@link setFirstResult} was not applied to this query. + * + * @return integer The position of the first result. + */ + public function getFirstResult() + { + return $this->_firstResult; + } + + /** + * Sets the maximum number of results to retrieve (the "limit"). + * + * @param integer $maxResults + * + * @return Query This query object. + */ + public function setMaxResults($maxResults) + { + $this->_maxResults = $maxResults; + $this->_state = self::STATE_DIRTY; + + return $this; + } + + /** + * Gets the maximum number of results the query object was set to retrieve (the "limit"). + * Returns NULL if {@link setMaxResults} was not applied to this query. + * + * @return integer Maximum number of results. + */ + public function getMaxResults() + { + return $this->_maxResults; + } + + /** + * Executes the query and returns an IterableResult that can be used to incrementally + * iterated over the result. + * + * @param ArrayCollection|array|null $parameters The query parameters. + * @param integer $hydrationMode The hydration mode to use. + * + * @return \Doctrine\ORM\Internal\Hydration\IterableResult + */ + public function iterate($parameters = null, $hydrationMode = self::HYDRATE_OBJECT) + { + $this->setHint(self::HINT_INTERNAL_ITERATION, true); + + return parent::iterate($parameters, $hydrationMode); + } + + /** + * {@inheritdoc} + */ + public function setHint($name, $value) + { + $this->_state = self::STATE_DIRTY; + + return parent::setHint($name, $value); + } + + /** + * {@inheritdoc} + */ + public function setHydrationMode($hydrationMode) + { + $this->_state = self::STATE_DIRTY; + + return parent::setHydrationMode($hydrationMode); + } + + /** + * Set the lock mode for this Query. + * + * @see \Doctrine\DBAL\LockMode + * + * @param int $lockMode + * + * @return Query + * + * @throws TransactionRequiredException + */ + public function setLockMode($lockMode) + { + if (in_array($lockMode, array(LockMode::NONE, LockMode::PESSIMISTIC_READ, LockMode::PESSIMISTIC_WRITE), true)) { + if ( ! $this->_em->getConnection()->isTransactionActive()) { + throw TransactionRequiredException::transactionRequired(); + } + } + + $this->setHint(self::HINT_LOCK_MODE, $lockMode); + + return $this; + } + + /** + * Get the current lock mode for this query. + * + * @return int|null The current lock mode of this query or NULL if no specific lock mode is set. + */ + public function getLockMode() + { + $lockMode = $this->getHint(self::HINT_LOCK_MODE); + + if (false === $lockMode) { + return null; + } + + return $lockMode; + } + + /** + * Generate a cache id for the query cache - reusing the Result-Cache-Id generator. + * + * @return string + */ + protected function _getQueryCacheId() + { + ksort($this->_hints); + + $platform = $this->getEntityManager() + ->getConnection() + ->getDatabasePlatform() + ->getName(); + + return md5( + $this->getDql() . serialize($this->_hints) . + '&platform=' . $platform . + ($this->_em->hasFilters() ? $this->_em->getFilters()->getHash() : '') . + '&firstResult=' . $this->_firstResult . '&maxResult=' . $this->_maxResults . + '&hydrationMode=' . $this->_hydrationMode . '&types=' . serialize($this->_parsedTypes) . 'DOCTRINE_QUERY_CACHE_SALT' + ); + } + + /** + * {@inheritdoc} + */ + protected function getHash() + { + return sha1(parent::getHash(). '-'. $this->_firstResult . '-' . $this->_maxResults); + } + + /** + * Cleanup Query resource when clone is called. + * + * @return void + */ + public function __clone() + { + parent::__clone(); + + $this->_state = self::STATE_DIRTY; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ASTException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ASTException.php new file mode 100644 index 0000000000000000000000000000000000000000..b8f931b45ee6dbd6bb96a0ab2e72dbf5215b59a6 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ASTException.php @@ -0,0 +1,38 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +use Doctrine\ORM\Query\QueryException; + +/** + * Base exception class for AST exceptions. + */ +class ASTException extends QueryException +{ + /** + * @param Node $node + * + * @return ASTException + */ + public static function noDispatchForNode($node) + { + return new self("Double-dispatch for node " . get_class($node) . " is not supported."); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/AggregateExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/AggregateExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..0966d902b8414195ef00bbe63b083ba13aac9949 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/AggregateExpression.php @@ -0,0 +1,69 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * Description of AggregateExpression. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class AggregateExpression extends Node +{ + /** + * @var string + */ + public $functionName; + + /** + * @var PathExpression|SimpleArithmeticExpression + */ + public $pathExpression; + + /** + * Some aggregate expressions support distinct, eg COUNT. + * + * @var bool + */ + public $isDistinct = false; + + /** + * @param string $functionName + * @param PathExpression|SimpleArithmeticExpression $pathExpression + * @param bool $isDistinct + */ + public function __construct($functionName, $pathExpression, $isDistinct) + { + $this->functionName = $functionName; + $this->pathExpression = $pathExpression; + $this->isDistinct = $isDistinct; + } + + /** + * {@inheritdoc} + */ + public function dispatch($walker) + { + return $walker->walkAggregateExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..b586cba3084757b4bb79a9675b6839b69ce424e1 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php @@ -0,0 +1,66 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")" + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ArithmeticExpression extends Node +{ + /** + * @var SimpleArithmeticExpression|null + */ + public $simpleArithmeticExpression; + + /** + * @var Subselect|null + */ + public $subselect; + + /** + * @return bool + */ + public function isSimpleArithmeticExpression() + { + return (bool) $this->simpleArithmeticExpression; + } + + /** + * @return bool + */ + public function isSubselect() + { + return (bool) $this->subselect; + } + + /** + * {@inheritdoc} + */ + public function dispatch($walker) + { + return $walker->walkArithmeticExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php new file mode 100644 index 0000000000000000000000000000000000000000..3120466fd86f3ed8c8db3de6dbfe6a293f567a4a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php @@ -0,0 +1,78 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ArithmeticFactor extends Node +{ + /** + * @var mixed + */ + public $arithmeticPrimary; + + /** + * NULL represents no sign, TRUE means positive and FALSE means negative sign. + * + * @var null|boolean + */ + public $sign; + + /** + * @param mixed $arithmeticPrimary + * @param null|bool $sign + */ + public function __construct($arithmeticPrimary, $sign = null) + { + $this->arithmeticPrimary = $arithmeticPrimary; + $this->sign = $sign; + } + + /** + * @return bool + */ + public function isPositiveSigned() + { + return $this->sign === true; + } + + /** + * @return bool + */ + public function isNegativeSigned() + { + return $this->sign === false; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkArithmeticFactor($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ArithmeticTerm.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ArithmeticTerm.php new file mode 100644 index 0000000000000000000000000000000000000000..e08ae7fbb83c39e2a9f407cb25abc6b8fbe4de0c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ArithmeticTerm.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}* + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ArithmeticTerm extends Node +{ + /** + * @var array + */ + public $arithmeticFactors; + + /** + * @param array $arithmeticFactors + */ + public function __construct(array $arithmeticFactors) + { + $this->arithmeticFactors = $arithmeticFactors; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkArithmeticTerm($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/BetweenExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/BetweenExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..1e31fd1a5a6ded1c56a49ecc5fbec85a3c5b2cf4 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/BetweenExpression.php @@ -0,0 +1,72 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * Description of BetweenExpression. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class BetweenExpression extends Node +{ + /** + * @var ArithmeticExpression + */ + public $expression; + + /** + * @var ArithmeticExpression + */ + public $leftBetweenExpression; + + /** + * @var ArithmeticExpression + */ + public $rightBetweenExpression; + + /** + * @var bool + */ + public $not; + + /** + * @param ArithmeticExpression $expr + * @param ArithmeticExpression $leftExpr + * @param ArithmeticExpression $rightExpr + */ + public function __construct($expr, $leftExpr, $rightExpr) + { + $this->expression = $expr; + $this->leftBetweenExpression = $leftExpr; + $this->rightBetweenExpression = $rightExpr; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkBetweenExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..194f9ace55fcd1fe8f10842300f0452c43f3f1fe --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * CoalesceExpression ::= "COALESCE" "(" ScalarExpression {"," ScalarExpression}* ")" + * + * @since 2.1 + * + * @link www.doctrine-project.org + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class CoalesceExpression extends Node +{ + /** + * @var array + */ + public $scalarExpressions = array(); + + /** + * @param array $scalarExpressions + */ + public function __construct(array $scalarExpressions) + { + $this->scalarExpressions = $scalarExpressions; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkCoalesceExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/CollectionMemberExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/CollectionMemberExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..70989a2678487e26b8688c81ae78b1e68e6bb759 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/CollectionMemberExpression.php @@ -0,0 +1,63 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * CollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpression + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class CollectionMemberExpression extends Node +{ + public $entityExpression; + + /** + * @var PathExpression + */ + public $collectionValuedPathExpression; + + /** + * @var bool + */ + public $not; + + /** + * @param mixed $entityExpr + * @param PathExpression $collValuedPathExpr + */ + public function __construct($entityExpr, $collValuedPathExpr) + { + $this->entityExpression = $entityExpr; + $this->collectionValuedPathExpression = $collValuedPathExpr; + } + + /** + * {@inheritdoc} + */ + public function dispatch($walker) + { + return $walker->walkCollectionMemberExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..05583920df4889b607e5dd248d8652e348733f6e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php @@ -0,0 +1,72 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression ) | + * StringExpression ComparisonOperator (StringExpression | QuantifiedExpression) | + * BooleanExpression ("=" | "<>" | "!=") (BooleanExpression | QuantifiedExpression) | + * EnumExpression ("=" | "<>" | "!=") (EnumExpression | QuantifiedExpression) | + * DatetimeExpression ComparisonOperator (DatetimeExpression | QuantifiedExpression) | + * EntityExpression ("=" | "<>") (EntityExpression | QuantifiedExpression) + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ComparisonExpression extends Node +{ + /** + * @var Node + */ + public $leftExpression; + + /** + * @var Node + */ + public $rightExpression; + + /** + * @var string + */ + public $operator; + + /** + * @param Node $leftExpr + * @param string $operator + * @param Node $rightExpr + */ + public function __construct($leftExpr, $operator, $rightExpr) + { + $this->leftExpression = $leftExpr; + $this->rightExpression = $rightExpr; + $this->operator = $operator; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkComparisonExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ConditionalExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ConditionalExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..62c7b2bca26d4b9a685d9239fe1d36b50414dfdb --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ConditionalExpression.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}* + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ConditionalExpression extends Node +{ + /** + * @var array + */ + public $conditionalTerms = array(); + + /** + * @param array $conditionalTerms + */ + public function __construct(array $conditionalTerms) + { + $this->conditionalTerms = $conditionalTerms; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkConditionalExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ConditionalFactor.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ConditionalFactor.php new file mode 100644 index 0000000000000000000000000000000000000000..7c89faa420b7d287de95d50b90774186c33b2186 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ConditionalFactor.php @@ -0,0 +1,58 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * ConditionalFactor ::= ["NOT"] ConditionalPrimary + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ConditionalFactor extends Node +{ + /** + * @var bool + */ + public $not = false; + + /** + * @var ConditionalPrimary + */ + public $conditionalPrimary; + + /** + * @param ConditionalPrimary $conditionalPrimary + */ + public function __construct($conditionalPrimary) + { + $this->conditionalPrimary = $conditionalPrimary; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkConditionalFactor($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ConditionalPrimary.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ConditionalPrimary.php new file mode 100644 index 0000000000000000000000000000000000000000..1eed41dce672ad4f701f906ce2bda9d88d923b90 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ConditionalPrimary.php @@ -0,0 +1,66 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")" + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ConditionalPrimary extends Node +{ + /** + * @var Node|null + */ + public $simpleConditionalExpression; + + /** + * @var ConditionalExpression|null + */ + public $conditionalExpression; + + /** + * @return bool + */ + public function isSimpleConditionalExpression() + { + return (bool) $this->simpleConditionalExpression; + } + + /** + * @return bool + */ + public function isConditionalExpression() + { + return (bool) $this->conditionalExpression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkConditionalPrimary($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ConditionalTerm.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ConditionalTerm.php new file mode 100644 index 0000000000000000000000000000000000000000..bb92db119bf04d8cbb531c81a49112bd492d00b9 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ConditionalTerm.php @@ -0,0 +1,52 @@ +. + */ +namespace Doctrine\ORM\Query\AST; + +/** + * ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}* + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ConditionalTerm extends Node +{ + /** + * @var array + */ + public $conditionalFactors = array(); + + /** + * @param array $conditionalFactors + */ + public function __construct(array $conditionalFactors) + { + $this->conditionalFactors = $conditionalFactors; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkConditionalTerm($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/DeleteClause.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/DeleteClause.php new file mode 100644 index 0000000000000000000000000000000000000000..8ca35c6772feb33bfb5df3e42aa78e8949833cc0 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/DeleteClause.php @@ -0,0 +1,58 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName [["AS"] AliasIdentificationVariable] + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class DeleteClause extends Node +{ + /** + * @var string + */ + public $abstractSchemaName; + + /** + * @var string + */ + public $aliasIdentificationVariable; + + /** + * @param string $abstractSchemaName + */ + public function __construct($abstractSchemaName) + { + $this->abstractSchemaName = $abstractSchemaName; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkDeleteClause($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/DeleteStatement.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/DeleteStatement.php new file mode 100644 index 0000000000000000000000000000000000000000..da6859b8678802badcb9cd22b6adf80eb4911cad --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/DeleteStatement.php @@ -0,0 +1,58 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * DeleteStatement = DeleteClause [WhereClause] + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class DeleteStatement extends Node +{ + /** + * @var DeleteClause + */ + public $deleteClause; + + /** + * @var WhereClause|null + */ + public $whereClause; + + /** + * @param DeleteClause $deleteClause + */ + public function __construct($deleteClause) + { + $this->deleteClause = $deleteClause; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkDeleteStatement($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..bd978af04be497f77c61bcdd77ed973123b5a1d9 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php @@ -0,0 +1,58 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY" + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class EmptyCollectionComparisonExpression extends Node +{ + /** + * @var PathExpression + */ + public $expression; + + /** + * @var bool + */ + public $not; + + /** + * @param PathExpression $expression + */ + public function __construct($expression) + { + $this->expression = $expression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkEmptyCollectionComparisonExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ExistsExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ExistsExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..c53a10775e1be07f5dab0bebb5bad42cc1889492 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ExistsExpression.php @@ -0,0 +1,58 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")" + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ExistsExpression extends Node +{ + /** + * @var bool + */ + public $not; + + /** + * @var Subselect + */ + public $subselect; + + /** + * @param Subselect $subselect + */ + public function __construct($subselect) + { + $this->subselect = $subselect; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkExistsExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/FromClause.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/FromClause.php new file mode 100644 index 0000000000000000000000000000000000000000..b1d8dfe6b8f1e6859eb42313354ea7d60c31b520 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/FromClause.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration} + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class FromClause extends Node +{ + /** + * @var array + */ + public $identificationVariableDeclarations = array(); + + /** + * @param array $identificationVariableDeclarations + */ + public function __construct(array $identificationVariableDeclarations) + { + $this->identificationVariableDeclarations = $identificationVariableDeclarations; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkFromClause($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/AbsFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/AbsFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..8fade4c7a8961ad02354bc52de2e43ebef2ccb8a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/AbsFunction.php @@ -0,0 +1,64 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "ABS" "(" SimpleArithmeticExpression ")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class AbsFunction extends FunctionNode +{ + /** + * @var \Doctrine\ORM\Query\AST\SimpleArithmeticExpression + */ + public $simpleArithmeticExpression; + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression( + $this->simpleArithmeticExpression + ) . ')'; + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/BitAndFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/BitAndFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..0e5edd55bf7a53ade39eaaa0cc4d781313f28225 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/BitAndFunction.php @@ -0,0 +1,63 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "BIT_AND" "(" ArithmeticPrimary "," ArithmeticPrimary ")" + * + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Fabio B. Silva + */ +class BitAndFunction extends FunctionNode +{ + public $firstArithmetic; + public $secondArithmetic; + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + $platform = $sqlWalker->getConnection()->getDatabasePlatform(); + return $platform->getBitAndComparisonExpression( + $this->firstArithmetic->dispatch($sqlWalker), + $this->secondArithmetic->dispatch($sqlWalker) + ); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->firstArithmetic = $parser->ArithmeticPrimary(); + $parser->match(Lexer::T_COMMA); + $this->secondArithmetic = $parser->ArithmeticPrimary(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/BitOrFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/BitOrFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..1d9c2df0454ee45a77540510b39f329d5d1de394 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/BitOrFunction.php @@ -0,0 +1,63 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "BIT_OR" "(" ArithmeticPrimary "," ArithmeticPrimary ")" + * + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Fabio B. Silva + */ +class BitOrFunction extends FunctionNode +{ + public $firstArithmetic; + public $secondArithmetic; + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + $platform = $sqlWalker->getConnection()->getDatabasePlatform(); + return $platform->getBitOrComparisonExpression( + $this->firstArithmetic->dispatch($sqlWalker), + $this->secondArithmetic->dispatch($sqlWalker) + ); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->firstArithmetic = $parser->ArithmeticPrimary(); + $parser->match(Lexer::T_COMMA); + $this->secondArithmetic = $parser->ArithmeticPrimary(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/ConcatFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/ConcatFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..421fe9ae7b0b6e37f4c2ef8ed825db88ddd98b94 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/ConcatFunction.php @@ -0,0 +1,83 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "CONCAT" "(" StringPrimary "," StringPrimary {"," StringPrimary }* ")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class ConcatFunction extends FunctionNode +{ + public $firstStringPrimary; + + public $secondStringPrimary; + + public $concatExpressions = array(); + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + $platform = $sqlWalker->getConnection()->getDatabasePlatform(); + + $args = array(); + + foreach ($this->concatExpressions as $expression) { + $args[] = $sqlWalker->walkStringPrimary($expression); + } + + return call_user_func_array(array($platform,'getConcatExpression'), $args); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->firstStringPrimary = $parser->StringPrimary(); + $this->concatExpressions[] = $this->firstStringPrimary; + + $parser->match(Lexer::T_COMMA); + + $this->secondStringPrimary = $parser->StringPrimary(); + $this->concatExpressions[] = $this->secondStringPrimary; + + while ($parser->getLexer()->isNextToken(Lexer::T_COMMA)) { + $parser->match(Lexer::T_COMMA); + $this->concatExpressions[] = $parser->StringPrimary(); + } + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} + diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/CurrentDateFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/CurrentDateFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..8e8ce1c77b010b9b4aaa620f420ed86851ba2275 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/CurrentDateFunction.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "CURRENT_DATE" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class CurrentDateFunction extends FunctionNode +{ + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return $sqlWalker->getConnection()->getDatabasePlatform()->getCurrentDateSQL(); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/CurrentTimeFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/CurrentTimeFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..4bab247c0ffe1dd6690b693cacb18ea21f5356ca --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/CurrentTimeFunction.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "CURRENT_TIME" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class CurrentTimeFunction extends FunctionNode +{ + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return $sqlWalker->getConnection()->getDatabasePlatform()->getCurrentTimeSQL(); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/CurrentTimestampFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/CurrentTimestampFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..8a9b4185fb28f615ca0c7a3a36a420abdef78724 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/CurrentTimestampFunction.php @@ -0,0 +1,54 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "CURRENT_TIMESTAMP" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class CurrentTimestampFunction extends FunctionNode +{ + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return $sqlWalker->getConnection()->getDatabasePlatform()->getCurrentTimestampSQL(); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/DateAddFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/DateAddFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..312a52c673b6c3c65f08777d7c35b8531c70f2fb --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/DateAddFunction.php @@ -0,0 +1,94 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; +use Doctrine\ORM\Query\SqlWalker; +use Doctrine\ORM\Query\Parser; +use Doctrine\ORM\Query\QueryException; + +/** + * "DATE_ADD" "(" ArithmeticPrimary "," ArithmeticPrimary "," StringPrimary ")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Benjamin Eberlei + */ +class DateAddFunction extends FunctionNode +{ + public $firstDateExpression = null; + public $intervalExpression = null; + public $unit = null; + + /** + * @override + */ + public function getSql(SqlWalker $sqlWalker) + { + switch (strtolower($this->unit->value)) { + case 'second': + return $sqlWalker->getConnection()->getDatabasePlatform()->getDateAddSecondsExpression( + $this->firstDateExpression->dispatch($sqlWalker), + $this->intervalExpression->dispatch($sqlWalker) + ); + + case 'hour': + return $sqlWalker->getConnection()->getDatabasePlatform()->getDateAddHourExpression( + $this->firstDateExpression->dispatch($sqlWalker), + $this->intervalExpression->dispatch($sqlWalker) + ); + case 'day': + return $sqlWalker->getConnection()->getDatabasePlatform()->getDateAddDaysExpression( + $this->firstDateExpression->dispatch($sqlWalker), + $this->intervalExpression->dispatch($sqlWalker) + ); + + case 'month': + return $sqlWalker->getConnection()->getDatabasePlatform()->getDateAddMonthExpression( + $this->firstDateExpression->dispatch($sqlWalker), + $this->intervalExpression->dispatch($sqlWalker) + ); + + default: + throw QueryException::semanticalError( + 'DATE_ADD() only supports units of type second, hour, day and month.' + ); + } + } + + /** + * @override + */ + public function parse(Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->firstDateExpression = $parser->ArithmeticPrimary(); + $parser->match(Lexer::T_COMMA); + $this->intervalExpression = $parser->ArithmeticPrimary(); + $parser->match(Lexer::T_COMMA); + $this->unit = $parser->StringPrimary(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/DateDiffFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/DateDiffFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..a33c2d06f335f71fec8104e3087329bf2d7b54e7 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/DateDiffFunction.php @@ -0,0 +1,64 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; +use Doctrine\ORM\Query\SqlWalker; +use Doctrine\ORM\Query\Parser; + +/** + * "DATE_DIFF" "(" ArithmeticPrimary "," ArithmeticPrimary ")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + */ +class DateDiffFunction extends FunctionNode +{ + public $date1; + public $date2; + + /** + * @override + */ + public function getSql(SqlWalker $sqlWalker) + { + return $sqlWalker->getConnection()->getDatabasePlatform()->getDateDiffExpression( + $this->date1->dispatch($sqlWalker), + $this->date2->dispatch($sqlWalker) + ); + } + + /** + * @override + */ + public function parse(Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->date1 = $parser->ArithmeticPrimary(); + $parser->match(Lexer::T_COMMA); + $this->date2 = $parser->ArithmeticPrimary(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/DateSubFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/DateSubFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..d0e890fa7930c6420802fd39fa7fcac7694140ab --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/DateSubFunction.php @@ -0,0 +1,65 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\SqlWalker; +use Doctrine\ORM\Query\QueryException; + +/** + * "DATE_ADD(date1, interval, unit)" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Benjamin Eberlei + */ +class DateSubFunction extends DateAddFunction +{ + /** + * @override + */ + public function getSql(SqlWalker $sqlWalker) + { + switch (strtolower($this->unit->value)) { + case 'hour': + return $sqlWalker->getConnection()->getDatabasePlatform()->getDateSubHourExpression( + $this->firstDateExpression->dispatch($sqlWalker), + $this->intervalExpression->dispatch($sqlWalker) + ); + case 'day': + return $sqlWalker->getConnection()->getDatabasePlatform()->getDateSubDaysExpression( + $this->firstDateExpression->dispatch($sqlWalker), + $this->intervalExpression->dispatch($sqlWalker) + ); + + case 'month': + return $sqlWalker->getConnection()->getDatabasePlatform()->getDateSubMonthExpression( + $this->firstDateExpression->dispatch($sqlWalker), + $this->intervalExpression->dispatch($sqlWalker) + ); + + default: + throw QueryException::semanticalError( + 'DATE_SUB() only supports units of type hour, day and month.' + ); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/FunctionNode.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/FunctionNode.php new file mode 100644 index 0000000000000000000000000000000000000000..2f33c9da34be163ed2d0dc58c1aaba3f77803351 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/FunctionNode.php @@ -0,0 +1,73 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\AST\Node; + +/** + * Abstract Function Node. + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +abstract class FunctionNode extends Node +{ + /** + * @var string + */ + public $name; + + /** + * @param string $name + */ + public function __construct($name) + { + $this->name = $name; + } + + /** + * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker + * + * @return string + */ + abstract public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker); + + /** + * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker + * + * @return string + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkFunction($this); + } + + /** + * @param \Doctrine\ORM\Query\Parser $parser + * + * @return void + */ + abstract public function parse(\Doctrine\ORM\Query\Parser $parser); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..242a38bcf7206ab6b470cf808aa6391464732f21 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php @@ -0,0 +1,113 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; +use Doctrine\ORM\Query\Parser; +use Doctrine\ORM\Query\SqlWalker; +use Doctrine\ORM\Query\QueryException; + +/** + * "IDENTITY" "(" SingleValuedAssociationPathExpression {"," string} ")" + * + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Guilherme Blanco + * @author Benjamin Eberlei + */ +class IdentityFunction extends FunctionNode +{ + /** + * @var \Doctrine\ORM\Query\AST\PathExpression + */ + public $pathExpression; + + /** + * @var string + */ + public $fieldMapping; + + /** + * {@inheritdoc} + */ + public function getSql(SqlWalker $sqlWalker) + { + $platform = $sqlWalker->getEntityManager()->getConnection()->getDatabasePlatform(); + $quoteStrategy = $sqlWalker->getEntityManager()->getConfiguration()->getQuoteStrategy(); + $dqlAlias = $this->pathExpression->identificationVariable; + $assocField = $this->pathExpression->field; + $qComp = $sqlWalker->getQueryComponent($dqlAlias); + $class = $qComp['metadata']; + $assoc = $class->associationMappings[$assocField]; + $targetEntity = $sqlWalker->getEntityManager()->getClassMetadata($assoc['targetEntity']); + $joinColumn = reset($assoc['joinColumns']); + + if ($this->fieldMapping !== null) { + if ( ! isset($targetEntity->fieldMappings[$this->fieldMapping])) { + throw new QueryException(sprintf('Undefined reference field mapping "%s"', $this->fieldMapping)); + } + + $field = $targetEntity->fieldMappings[$this->fieldMapping]; + $joinColumn = null; + + foreach ($assoc['joinColumns'] as $mapping) { + + if($mapping['referencedColumnName'] === $field['columnName']) { + $joinColumn = $mapping; + + break; + } + } + + if ($joinColumn === null) { + throw new QueryException(sprintf('Unable to resolve the reference field mapping "%s"', $this->fieldMapping)); + } + } + + // The table with the relation may be a subclass, so get the table name from the association definition + $tableName = $sqlWalker->getEntityManager()->getClassMetadata($assoc['sourceEntity'])->getTableName(); + + $tableAlias = $sqlWalker->getSQLTableAlias($tableName, $dqlAlias); + $columnName = $quoteStrategy->getJoinColumnName($joinColumn, $targetEntity, $platform); + + return $tableAlias . '.' . $columnName; + } + + /** + * {@inheritdoc} + */ + public function parse(Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->pathExpression = $parser->SingleValuedAssociationPathExpression(); + + if ($parser->getLexer()->isNextToken(Lexer::T_COMMA)) { + $parser->match(Lexer::T_COMMA); + $parser->match(Lexer::T_STRING); + + $this->fieldMapping = $parser->getLexer()->token['value']; + } + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/LengthFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/LengthFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..deb3066e2a20ed036855ba411e71fad8ee3c54bf --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/LengthFunction.php @@ -0,0 +1,61 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "LENGTH" "(" StringPrimary ")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class LengthFunction extends FunctionNode +{ + public $stringPrimary; + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return $sqlWalker->getConnection()->getDatabasePlatform()->getLengthExpression( + $sqlWalker->walkSimpleArithmeticExpression($this->stringPrimary) + ); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->stringPrimary = $parser->StringPrimary(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..cba45bc1cb13fdbc9213ef80a9ffeed607fb66bd --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php @@ -0,0 +1,84 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class LocateFunction extends FunctionNode +{ + public $firstStringPrimary; + public $secondStringPrimary; + + /** + * @var \Doctrine\ORM\Query\AST\SimpleArithmeticExpression|bool + */ + public $simpleArithmeticExpression = false; + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + + return $sqlWalker->getConnection()->getDatabasePlatform()->getLocateExpression( + $sqlWalker->walkStringPrimary($this->secondStringPrimary), // its the other way around in platform + $sqlWalker->walkStringPrimary($this->firstStringPrimary), + (($this->simpleArithmeticExpression) + ? $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) + : false + ) + ); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->firstStringPrimary = $parser->StringPrimary(); + + $parser->match(Lexer::T_COMMA); + + $this->secondStringPrimary = $parser->StringPrimary(); + + $lexer = $parser->getLexer(); + if ($lexer->isNextToken(Lexer::T_COMMA)) { + $parser->match(Lexer::T_COMMA); + + $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression(); + } + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/LowerFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/LowerFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..ffc86b6f8dafbadb279a32da52566a6df99d9f53 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/LowerFunction.php @@ -0,0 +1,61 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "LOWER" "(" StringPrimary ")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class LowerFunction extends FunctionNode +{ + public $stringPrimary; + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return $sqlWalker->getConnection()->getDatabasePlatform()->getLowerExpression( + $sqlWalker->walkSimpleArithmeticExpression($this->stringPrimary) + ); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->stringPrimary = $parser->StringPrimary(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..cf4cf0c989aa7f1c91a709ff76ece6a083c2f12b --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php @@ -0,0 +1,74 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "MOD" "(" SimpleArithmeticExpression "," SimpleArithmeticExpression ")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class ModFunction extends FunctionNode +{ + /** + * @var \Doctrine\ORM\Query\AST\SimpleArithmeticExpression + */ + public $firstSimpleArithmeticExpression; + + /** + * @var \Doctrine\ORM\Query\AST\SimpleArithmeticExpression + */ + public $secondSimpleArithmeticExpression; + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return $sqlWalker->getConnection()->getDatabasePlatform()->getModExpression( + $sqlWalker->walkSimpleArithmeticExpression($this->firstSimpleArithmeticExpression), + $sqlWalker->walkSimpleArithmeticExpression($this->secondSimpleArithmeticExpression) + ); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->firstSimpleArithmeticExpression = $parser->SimpleArithmeticExpression(); + + $parser->match(Lexer::T_COMMA); + + $this->secondSimpleArithmeticExpression = $parser->SimpleArithmeticExpression(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..7970508f17ff1940e222fae52203a6c66f1660e3 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php @@ -0,0 +1,123 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "SIZE" "(" CollectionValuedPathExpression ")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class SizeFunction extends FunctionNode +{ + /** + * @var \Doctrine\ORM\Query\AST\PathExpression + */ + public $collectionPathExpression; + + /** + * @override + * @todo If the collection being counted is already joined, the SQL can be simpler (more efficient). + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + $platform = $sqlWalker->getEntityManager()->getConnection()->getDatabasePlatform(); + $quoteStrategy = $sqlWalker->getEntityManager()->getConfiguration()->getQuoteStrategy(); + $dqlAlias = $this->collectionPathExpression->identificationVariable; + $assocField = $this->collectionPathExpression->field; + + $qComp = $sqlWalker->getQueryComponent($dqlAlias); + $class = $qComp['metadata']; + $assoc = $class->associationMappings[$assocField]; + $sql = 'SELECT COUNT(*) FROM '; + + if ($assoc['type'] == \Doctrine\ORM\Mapping\ClassMetadata::ONE_TO_MANY) { + $targetClass = $sqlWalker->getEntityManager()->getClassMetadata($assoc['targetEntity']); + $targetTableAlias = $sqlWalker->getSQLTableAlias($targetClass->getTableName()); + $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias); + + $sql .= $quoteStrategy->getTableName($targetClass, $platform) . ' ' . $targetTableAlias . ' WHERE '; + + $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']]; + + $first = true; + + foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) { + if ($first) $first = false; else $sql .= ' AND '; + + $sql .= $targetTableAlias . '.' . $sourceColumn + . ' = ' + . $sourceTableAlias . '.' . $quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $platform); + } + } else { // many-to-many + $targetClass = $sqlWalker->getEntityManager()->getClassMetadata($assoc['targetEntity']); + + $owningAssoc = $assoc['isOwningSide'] ? $assoc : $targetClass->associationMappings[$assoc['mappedBy']]; + $joinTable = $owningAssoc['joinTable']; + + // SQL table aliases + $joinTableAlias = $sqlWalker->getSQLTableAlias($joinTable['name']); + $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias); + + // join to target table + $sql .= $quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $platform) . ' ' . $joinTableAlias . ' WHERE '; + + $joinColumns = $assoc['isOwningSide'] + ? $joinTable['joinColumns'] + : $joinTable['inverseJoinColumns']; + + $first = true; + + foreach ($joinColumns as $joinColumn) { + if ($first) $first = false; else $sql .= ' AND '; + + $sourceColumnName = $quoteStrategy->getColumnName( + $class->fieldNames[$joinColumn['referencedColumnName']], $class, $platform + ); + + $sql .= $joinTableAlias . '.' . $joinColumn['name'] + . ' = ' + . $sourceTableAlias . '.' . $sourceColumnName; + } + } + + return '(' . $sql . ')'; + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->collectionPathExpression = $parser->CollectionValuedPathExpression(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..c9f1038c49444b9f8ed2f2619e86c14c51dba68b --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php @@ -0,0 +1,64 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "SQRT" "(" SimpleArithmeticExpression ")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class SqrtFunction extends FunctionNode +{ + /** + * @var \Doctrine\ORM\Query\AST\SimpleArithmeticExpression + */ + public $simpleArithmeticExpression; + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return $sqlWalker->getConnection()->getDatabasePlatform()->getSqrtExpression( + $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) + ); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..ee80c06acfabe954d79c156e483bcb9c513eed2f --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php @@ -0,0 +1,89 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class SubstringFunction extends FunctionNode +{ + public $stringPrimary; + + /** + * @var \Doctrine\ORM\Query\AST\SimpleArithmeticExpression + */ + public $firstSimpleArithmeticExpression; + + /** + * @var \Doctrine\ORM\Query\AST\SimpleArithmeticExpression|null + */ + public $secondSimpleArithmeticExpression = null; + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + $optionalSecondSimpleArithmeticExpression = null; + if ($this->secondSimpleArithmeticExpression !== null) { + $optionalSecondSimpleArithmeticExpression = $sqlWalker->walkSimpleArithmeticExpression($this->secondSimpleArithmeticExpression); + } + + return $sqlWalker->getConnection()->getDatabasePlatform()->getSubstringExpression( + $sqlWalker->walkStringPrimary($this->stringPrimary), + $sqlWalker->walkSimpleArithmeticExpression($this->firstSimpleArithmeticExpression), + $optionalSecondSimpleArithmeticExpression + ); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->stringPrimary = $parser->StringPrimary(); + + $parser->match(Lexer::T_COMMA); + + $this->firstSimpleArithmeticExpression = $parser->SimpleArithmeticExpression(); + + $lexer = $parser->getLexer(); + if ($lexer->isNextToken(Lexer::T_COMMA)) { + $parser->match(Lexer::T_COMMA); + + $this->secondSimpleArithmeticExpression = $parser->SimpleArithmeticExpression(); + } + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..0c1f5d86f2170d80bd60bf5a963eefc84826c73e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php @@ -0,0 +1,163 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; +use Doctrine\ORM\Query\Parser; +use Doctrine\ORM\Query\SqlWalker; +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * "TRIM" "(" [["LEADING" | "TRAILING" | "BOTH"] [char] "FROM"] StringPrimary ")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class TrimFunction extends FunctionNode +{ + /** + * @var boolean + */ + public $leading; + + /** + * @var boolean + */ + public $trailing; + + /** + * @var boolean + */ + public $both; + + /** + * @var boolean + */ + public $trimChar = false; + + /** + * @var \Doctrine\ORM\Query\AST\Node + */ + public $stringPrimary; + + /** + * {@inheritdoc} + */ + public function getSql(SqlWalker $sqlWalker) + { + $stringPrimary = $sqlWalker->walkStringPrimary($this->stringPrimary); + $platform = $sqlWalker->getConnection()->getDatabasePlatform(); + $trimMode = $this->getTrimMode(); + $trimChar = ($this->trimChar !== false) + ? $sqlWalker->getConnection()->quote($this->trimChar) + : false; + + return $platform->getTrimExpression($stringPrimary, $trimMode, $trimChar); + } + + /** + * {@inheritdoc} + */ + public function parse(Parser $parser) + { + $lexer = $parser->getLexer(); + + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->parseTrimMode($parser); + + if ($lexer->isNextToken(Lexer::T_STRING)) { + $parser->match(Lexer::T_STRING); + + $this->trimChar = $lexer->token['value']; + } + + if ($this->leading || $this->trailing || $this->both || $this->trimChar) { + $parser->match(Lexer::T_FROM); + } + + $this->stringPrimary = $parser->StringPrimary(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } + + /** + * @param \Doctrine\ORM\Query\Parser $parser + * + * @return integer + */ + private function getTrimMode() + { + if ($this->leading) { + return AbstractPlatform::TRIM_LEADING; + } + + if ($this->trailing) { + return AbstractPlatform::TRIM_TRAILING; + } + + if ($this->both) { + return AbstractPlatform::TRIM_BOTH; + } + + return AbstractPlatform::TRIM_UNSPECIFIED; + } + + /** + * @param \Doctrine\ORM\Query\Parser $parser + * + * @return void + */ + private function parseTrimMode(Parser $parser) + { + $lexer = $parser->getLexer(); + $value = $lexer->lookahead['value']; + + if (strcasecmp('leading', $value) === 0) { + $parser->match(Lexer::T_LEADING); + + $this->leading = true; + + return; + } + + if (strcasecmp('trailing', $value) === 0) { + $parser->match(Lexer::T_TRAILING); + + $this->trailing = true; + + return; + } + + if (strcasecmp('both', $value) === 0) { + $parser->match(Lexer::T_BOTH); + + $this->both = true; + + return; + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/UpperFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/UpperFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..888009a7b31de1b394c533312373e209ca0ad790 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/UpperFunction.php @@ -0,0 +1,61 @@ +. + */ + +namespace Doctrine\ORM\Query\AST\Functions; + +use Doctrine\ORM\Query\Lexer; + +/** + * "UPPER" "(" StringPrimary ")" + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class UpperFunction extends FunctionNode +{ + public $stringPrimary; + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return $sqlWalker->getConnection()->getDatabasePlatform()->getUpperExpression( + $sqlWalker->walkSimpleArithmeticExpression($this->stringPrimary) + ); + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $parser->match(Lexer::T_IDENTIFIER); + $parser->match(Lexer::T_OPEN_PARENTHESIS); + + $this->stringPrimary = $parser->StringPrimary(); + + $parser->match(Lexer::T_CLOSE_PARENTHESIS); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/GeneralCaseExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/GeneralCaseExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..a74eed599dcb70e9c13bd2bb2be7b08877827493 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/GeneralCaseExpression.php @@ -0,0 +1,62 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * GeneralCaseExpression ::= "CASE" WhenClause {WhenClause}* "ELSE" ScalarExpression "END" + * + * @since 2.2 + * + * @link www.doctrine-project.org + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class GeneralCaseExpression extends Node +{ + /** + * @var array + */ + public $whenClauses = array(); + + /** + * @var mixed + */ + public $elseScalarExpression = null; + + /** + * @param array $whenClauses + * @param mixed $elseScalarExpression + */ + public function __construct(array $whenClauses, $elseScalarExpression) + { + $this->whenClauses = $whenClauses; + $this->elseScalarExpression = $elseScalarExpression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkGeneralCaseExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/GroupByClause.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/GroupByClause.php new file mode 100644 index 0000000000000000000000000000000000000000..c05fa5863d035070be9d410877ee5847980f219f --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/GroupByClause.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * Description of GroupByClause. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class GroupByClause extends Node +{ + /** + * @var array + */ + public $groupByItems = array(); + + /** + * @param array $groupByItems + */ + public function __construct(array $groupByItems) + { + $this->groupByItems = $groupByItems; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkGroupByClause($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/HavingClause.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/HavingClause.php new file mode 100644 index 0000000000000000000000000000000000000000..1d369fff66a3808ebcd396668ed562767b2e6b55 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/HavingClause.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * Description of HavingClause. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class HavingClause extends Node +{ + /** + * @var ConditionalExpression + */ + public $conditionalExpression; + + /** + * @param ConditionalExpression $conditionalExpression + */ + public function __construct($conditionalExpression) + { + $this->conditionalExpression = $conditionalExpression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkHavingClause($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php new file mode 100644 index 0000000000000000000000000000000000000000..a8f7f6d350e5d49c6c7d93dcf6516c214c660969 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php @@ -0,0 +1,67 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}* + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class IdentificationVariableDeclaration extends Node +{ + /** + * @var RangeVariableDeclaration|null + */ + public $rangeVariableDeclaration = null; + + /** + * @var IndexBy|null + */ + public $indexBy = null; + + /** + * @var array + */ + public $joins = array(); + + /** + * @param RangeVariableDeclaration|null $rangeVariableDecl + * @param IndexBy|null $indexBy + * @param array $joins + */ + public function __construct($rangeVariableDecl, $indexBy, array $joins) + { + $this->rangeVariableDeclaration = $rangeVariableDecl; + $this->indexBy = $indexBy; + $this->joins = $joins; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkIdentificationVariableDeclaration($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/InExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/InExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..9d0a8b54ee8332100aa1deea00b2f01d1d8eacb7 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/InExpression.php @@ -0,0 +1,67 @@ +. + */ +namespace Doctrine\ORM\Query\AST; + +/** + * InExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (Literal {"," Literal}* | Subselect) ")" + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class InExpression extends Node +{ + /** + * @var bool + */ + public $not; + + /** + * @var ArithmeticExpression + */ + public $expression; + + /** + * @var array + */ + public $literals = array(); + + /** + * @var Subselect|null + */ + public $subselect; + + /** + * @param ArithmeticExpression $expression + */ + public function __construct($expression) + { + $this->expression = $expression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkInExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/IndexBy.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/IndexBy.php new file mode 100644 index 0000000000000000000000000000000000000000..c7874b70a3594ae3c27a2e0ec8341c046544549c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/IndexBy.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class IndexBy extends Node +{ + /** + * @var PathExpression + */ + public $simpleStateFieldPathExpression = null; + + /** + * @param PathExpression $simpleStateFieldPathExpression + */ + public function __construct($simpleStateFieldPathExpression) + { + $this->simpleStateFieldPathExpression = $simpleStateFieldPathExpression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkIndexBy($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/InputParameter.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/InputParameter.php new file mode 100644 index 0000000000000000000000000000000000000000..cf50140be9bc1b5d1e415147290414aaf848af72 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/InputParameter.php @@ -0,0 +1,66 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * Description of InputParameter. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class InputParameter extends Node +{ + /** + * @var bool + */ + public $isNamed; + + /** + * @var string + */ + public $name; + + /** + * @param string $value + * + * @throws \Doctrine\ORM\Query\QueryException + */ + public function __construct($value) + { + if (strlen($value) == 1) { + throw \Doctrine\ORM\Query\QueryException::invalidParameterFormat($value); + } + + $param = substr($value, 1); + $this->isNamed = ! is_numeric($param); + $this->name = $param; + } + + /** + * {@inheritdoc} + */ + public function dispatch($walker) + { + return $walker->walkInputParameter($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/InstanceOfExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/InstanceOfExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..c1fd65b8e6b5d95839a27e6c65ef5da7951ff9b0 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/InstanceOfExpression.php @@ -0,0 +1,64 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (InstanceOfParameter | "(" InstanceOfParameter {"," InstanceOfParameter}* ")") + * InstanceOfParameter ::= AbstractSchemaName | InputParameter + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class InstanceOfExpression extends Node +{ + /** + * @var bool + */ + public $not; + + /** + * @var string + */ + public $identificationVariable; + + /** + * @var array + */ + public $value; + + /** + * @param string $identVariable + */ + public function __construct($identVariable) + { + $this->identificationVariable = $identVariable; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkInstanceOfExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Join.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Join.php new file mode 100644 index 0000000000000000000000000000000000000000..5c203aa0b47b38f20da5aa29bd03e32927095633 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Join.php @@ -0,0 +1,70 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression + * ["AS"] AliasIdentificationVariable [("ON" | "WITH") ConditionalExpression] + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Join extends Node +{ + const JOIN_TYPE_LEFT = 1; + const JOIN_TYPE_LEFTOUTER = 2; + const JOIN_TYPE_INNER = 3; + + /** + * @var int + */ + public $joinType = self::JOIN_TYPE_INNER; + + /** + * @var Node|null + */ + public $joinAssociationDeclaration = null; + + /** + * @var ConditionalExpression|null + */ + public $conditionalExpression = null; + + /** + * @param int $joinType + * @param Node $joinAssociationDeclaration + */ + public function __construct($joinType, $joinAssociationDeclaration) + { + $this->joinType = $joinType; + $this->joinAssociationDeclaration = $joinAssociationDeclaration; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkJoin($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/JoinAssociationDeclaration.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/JoinAssociationDeclaration.php new file mode 100644 index 0000000000000000000000000000000000000000..a33900a6d650e6b0b74fe712bf70d260eb54edb6 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/JoinAssociationDeclaration.php @@ -0,0 +1,65 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * JoinAssociationDeclaration ::= JoinAssociationPathExpression ["AS"] AliasIdentificationVariable + * + * @link www.doctrine-project.org + * @since 2.3 + * @author Guilherme Blanco + */ +class JoinAssociationDeclaration extends Node +{ + /** + * @var JoinAssociationPathExpression + */ + public $joinAssociationPathExpression; + + /** + * @var string + */ + public $aliasIdentificationVariable; + + /** + * @var IndexBy|null + */ + public $indexBy; + + /** + * @param JoinAssociationPathExpression $joinAssociationPathExpression + * @param string $aliasIdentificationVariable + * @param IndexBy|null $indexBy + */ + public function __construct($joinAssociationPathExpression, $aliasIdentificationVariable, $indexBy) + { + $this->joinAssociationPathExpression = $joinAssociationPathExpression; + $this->aliasIdentificationVariable = $aliasIdentificationVariable; + $this->indexBy = $indexBy; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkJoinAssociationDeclaration($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..946bbb15b7d42f165eb1b6c6d727c9686c18ff9d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php @@ -0,0 +1,60 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * JoinAssociationPathExpression ::= IdentificationVariable "." (SingleValuedAssociationField | CollectionValuedAssociationField) + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class JoinAssociationPathExpression extends Node +{ + /** + * @var string + */ + public $identificationVariable; + + /** + * @var string + */ + public $associationField; + + /** + * @param string $identificationVariable + * @param string $associationField + */ + public function __construct($identificationVariable, $associationField) + { + $this->identificationVariable = $identificationVariable; + $this->associationField = $associationField; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkPathExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..7e374149f2d1b8eb0f902187ba01372b7eb4cdcf --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php @@ -0,0 +1,59 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * JoinClassPathExpression ::= AbstractSchemaName ["AS"] AliasIdentificationVariable + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.org + * @since 2.3 + * @author Alexander + */ +class JoinClassPathExpression extends Node +{ + /** + * @var mixed + */ + public $abstractSchemaName; + + /** + * @var mixed + */ + public $aliasIdentificationVariable; + + /** + * @param mixed $abstractSchemaName + * @param mixed $aliasIdentificationVar + */ + public function __construct($abstractSchemaName, $aliasIdentificationVar) + { + $this->abstractSchemaName = $abstractSchemaName; + $this->aliasIdentificationVariable = $aliasIdentificationVar; + } + + /** + * {@inheritdoc} + */ + public function dispatch($walker) + { + return $walker->walkJoinPathExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php new file mode 100644 index 0000000000000000000000000000000000000000..89aa83ad8cce2f0ea055d9cb5c6006d21e97f532 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php @@ -0,0 +1,61 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * JoinVariableDeclaration ::= Join [IndexBy] + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.org + * @since 2.5 + * @author Guilherme Blanco + */ +class JoinVariableDeclaration extends Node +{ + /** + * @var Join + */ + public $join; + + /** + * @var IndexBy|null + */ + public $indexBy; + + /** + * Constructor. + * + * @param Join $join + * @param IndexBy|null $indexBy + */ + public function __construct($join, $indexBy) + { + $this->join = $join; + $this->indexBy = $indexBy; + } + + /** + * {@inheritdoc} + */ + public function dispatch($walker) + { + return $walker->walkJoinVariableDeclaration($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/LikeExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/LikeExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..e320c51c882f9419868d65386951670a7ff29566 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/LikeExpression.php @@ -0,0 +1,71 @@ +. + */ +namespace Doctrine\ORM\Query\AST; + +/** + * LikeExpression ::= StringExpression ["NOT"] "LIKE" string ["ESCAPE" char] + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class LikeExpression extends Node +{ + /** + * @var bool + */ + public $not; + + /** + * @var Node + */ + public $stringExpression; + + /** + * @var InputParameter + */ + public $stringPattern; + + /** + * @var Literal|null + */ + public $escapeChar; + + /** + * @param Node $stringExpression + * @param InputParameter $stringPattern + * @param Literal|null $escapeChar + */ + public function __construct($stringExpression, $stringPattern, $escapeChar = null) + { + $this->stringExpression = $stringExpression; + $this->stringPattern = $stringPattern; + $this->escapeChar = $escapeChar; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkLikeExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Literal.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Literal.php new file mode 100644 index 0000000000000000000000000000000000000000..43d71add08ffe75133b4675052f9e2f7d32d2f10 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Literal.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +class Literal extends Node +{ + const STRING = 1; + const BOOLEAN = 2; + const NUMERIC = 3; + + /** + * @var int + */ + public $type; + + /** + * @var mixed + */ + public $value; + + /** + * @param int $type + * @param mixed $value + */ + public function __construct($type, $value) + { + $this->type = $type; + $this->value = $value; + } + + /** + * {@inheritdoc} + */ + public function dispatch($walker) + { + return $walker->walkLiteral($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/NewObjectExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/NewObjectExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..65b94ac63cfed63872aafd3cf2e5e5207779b71f --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/NewObjectExpression.php @@ -0,0 +1,58 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * NewObjectExpression ::= "NEW" IdentificationVariable "(" NewObjectArg {"," NewObjectArg}* ")" + * + * @link www.doctrine-project.org + * @since 2.4 + * @author Fabio B. Silva + */ +class NewObjectExpression extends Node +{ + /** + * @var string + */ + public $className; + + /** + * @var array + */ + public $args; + + /** + * @param string $className + * @param array $args + */ + public function __construct($className, array $args) + { + $this->className = $className; + $this->args = $args; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkNewObject($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Node.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Node.php new file mode 100644 index 0000000000000000000000000000000000000000..a257dc2d79cb5b232db45ff6b97df8ec6996422b --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Node.php @@ -0,0 +1,103 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * Abstract class of an AST node. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +abstract class Node +{ + /** + * Double-dispatch method, supposed to dispatch back to the walker. + * + * Implementation is not mandatory for all nodes. + * + * @param \Doctrine\ORM\Query\SqlWalker $walker + * + * @return string + * + * @throws ASTException + */ + public function dispatch($walker) + { + throw ASTException::noDispatchForNode($this); + } + + /** + * Dumps the AST Node into a string representation for information purpose only. + * + * @return string + */ + public function __toString() + { + return $this->dump($this); + } + + /** + * @param object $obj + * + * @return string + */ + public function dump($obj) + { + static $ident = 0; + + $str = ''; + + if ($obj instanceof Node) { + $str .= get_class($obj) . '(' . PHP_EOL; + $props = get_object_vars($obj); + + foreach ($props as $name => $prop) { + $ident += 4; + $str .= str_repeat(' ', $ident) . '"' . $name . '": ' + . $this->dump($prop) . ',' . PHP_EOL; + $ident -= 4; + } + + $str .= str_repeat(' ', $ident) . ')'; + } else if (is_array($obj)) { + $ident += 4; + $str .= 'array('; + $some = false; + + foreach ($obj as $k => $v) { + $str .= PHP_EOL . str_repeat(' ', $ident) . '"' + . $k . '" => ' . $this->dump($v) . ','; + $some = true; + } + + $ident -= 4; + $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '') . ')'; + } else if (is_object($obj)) { + $str .= 'instanceof(' . get_class($obj) . ')'; + } else { + $str .= var_export($obj, true); + } + + return $str; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/NullComparisonExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/NullComparisonExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..84a199784cccfe29cb00b85a25c60965237af8f1 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/NullComparisonExpression.php @@ -0,0 +1,58 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL" + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class NullComparisonExpression extends Node +{ + /** + * @var bool + */ + public $not; + + /** + * @var Node + */ + public $expression; + + /** + * @param Node $expression + */ + public function __construct($expression) + { + $this->expression = $expression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkNullComparisonExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/NullIfExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/NullIfExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..e33bc72b15eb4d172df271d5c4466b528d35b17c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/NullIfExpression.php @@ -0,0 +1,62 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * NullIfExpression ::= "NULLIF" "(" ScalarExpression "," ScalarExpression ")" + * + * @since 2.1 + * + * @link www.doctrine-project.org + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class NullIfExpression extends Node +{ + /** + * @var mixed + */ + public $firstExpression; + + /** + * @var mixed + */ + public $secondExpression; + + /** + * @param mixed $firstExpression + * @param mixed $secondExpression + */ + public function __construct($firstExpression, $secondExpression) + { + $this->firstExpression = $firstExpression; + $this->secondExpression = $secondExpression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkNullIfExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/OrderByClause.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/OrderByClause.php new file mode 100644 index 0000000000000000000000000000000000000000..75d16c7319d1ae4c9546e71829a394ee7f7f780e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/OrderByClause.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}* + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class OrderByClause extends Node +{ + /** + * @var array + */ + public $orderByItems = array(); + + /** + * @param array $orderByItems + */ + public function __construct(array $orderByItems) + { + $this->orderByItems = $orderByItems; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkOrderByClause($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/OrderByItem.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/OrderByItem.php new file mode 100644 index 0000000000000000000000000000000000000000..bf3288a7b9a68405b39f8aefcc9c51cb76cd47e6 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/OrderByItem.php @@ -0,0 +1,75 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * OrderByItem ::= (ResultVariable | StateFieldPathExpression) ["ASC" | "DESC"] + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class OrderByItem extends Node +{ + /** + * @var mixed + */ + public $expression; + + /** + * @var string + */ + public $type; + + /** + * @param mixed $expression + */ + public function __construct($expression) + { + $this->expression = $expression; + } + + /** + * @return bool + */ + public function isAsc() + { + return strtoupper($this->type) == 'ASC'; + } + + /** + * @return bool + */ + public function isDesc() + { + return strtoupper($this->type) == 'DESC'; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkOrderByItem($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ParenthesisExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ParenthesisExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..f16db0eb74d19b07ce23fcb03dbb95c2e3e9a596 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/ParenthesisExpression.php @@ -0,0 +1,51 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * ParenthesisExpression ::= "(" ArithmeticPrimary ")" + * + * @author Fabio B. Silva + * @since 2.4 + */ +class ParenthesisExpression extends Node +{ + /** + * @var \Doctrine\ORM\Query\AST\Node + */ + public $expression; + + /** + * @param \Doctrine\ORM\Query\AST\Node $expression + */ + public function __construct(Node $expression) + { + $this->expression = $expression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($walker) + { + return $walker->walkParenthesisExpression($this); + } +} \ No newline at end of file diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/PartialObjectExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/PartialObjectExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..e4ffe79b2aabf1941e9471b29665197bd1e24e05 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/PartialObjectExpression.php @@ -0,0 +1,43 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +class PartialObjectExpression extends Node +{ + /** + * @var string + */ + public $identificationVariable; + + /** + * @var array + */ + public $partialFieldSet; + + /** + * @param string $identificationVariable + * @param array $partialFieldSet + */ + public function __construct($identificationVariable, array $partialFieldSet) + { + $this->identificationVariable = $identificationVariable; + $this->partialFieldSet = $partialFieldSet; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/PathExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/PathExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..37674b6fd4793dbb48a5b37ae51e032da419f339 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/PathExpression.php @@ -0,0 +1,81 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression + * SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression + * StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression + * SingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField + * CollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField + * StateField ::= {EmbeddedClassStateField "."}* SimpleStateField + * SimpleStateFieldPathExpression ::= IdentificationVariable "." StateField + * + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class PathExpression extends Node +{ + const TYPE_COLLECTION_VALUED_ASSOCIATION = 2; + const TYPE_SINGLE_VALUED_ASSOCIATION = 4; + const TYPE_STATE_FIELD = 8; + + /** + * @var int + */ + public $type; + + /** + * @var int + */ + public $expectedType; + + /** + * @var string + */ + public $identificationVariable; + + /** + * @var string|null + */ + public $field; + + /** + * @param int $expectedType + * @param string $identificationVariable + * @param string|null $field + */ + public function __construct($expectedType, $identificationVariable, $field = null) + { + $this->expectedType = $expectedType; + $this->identificationVariable = $identificationVariable; + $this->field = $field; + } + + /** + * {@inheritdoc} + */ + public function dispatch($walker) + { + return $walker->walkPathExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/QuantifiedExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/QuantifiedExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..15be9523471c2e416f3b03f9af18d84e77a7fb41 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/QuantifiedExpression.php @@ -0,0 +1,81 @@ +. + */ +namespace Doctrine\ORM\Query\AST; + +/** + * QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")" + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class QuantifiedExpression extends Node +{ + /** + * @var string + */ + public $type; + + /** + * @var Subselect + */ + public $subselect; + + /** + * @param Subselect $subselect + */ + public function __construct($subselect) + { + $this->subselect = $subselect; + } + + /** + * @return bool + */ + public function isAll() + { + return strtoupper($this->type) == 'ALL'; + } + + /** + * @return bool + */ + public function isAny() + { + return strtoupper($this->type) == 'ANY'; + } + + /** + * @return bool + */ + public function isSome() + { + return strtoupper($this->type) == 'SOME'; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkQuantifiedExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php new file mode 100644 index 0000000000000000000000000000000000000000..0ca5274d19e25702c0767d8624e19607ca88528c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php @@ -0,0 +1,67 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class RangeVariableDeclaration extends Node +{ + /** + * @var string + */ + public $abstractSchemaName; + + /** + * @var string + */ + public $aliasIdentificationVariable; + + /** + * @var boolean + */ + public $isRoot; + + /** + * @param string $abstractSchemaName + * @param string $aliasIdentificationVar + * @param boolean $isRoot + */ + public function __construct($abstractSchemaName, $aliasIdentificationVar, $isRoot = true) + { + $this->abstractSchemaName = $abstractSchemaName; + $this->aliasIdentificationVariable = $aliasIdentificationVar; + $this->isRoot = $isRoot; + } + + /** + * {@inheritdoc} + */ + public function dispatch($walker) + { + return $walker->walkRangeVariableDeclaration($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SelectClause.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SelectClause.php new file mode 100644 index 0000000000000000000000000000000000000000..1df143677be518103e055b28010d17bd45636016 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SelectClause.php @@ -0,0 +1,60 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * SelectClause = "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression} + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class SelectClause extends Node +{ + /** + * @var bool + */ + public $isDistinct; + + /** + * @var array + */ + public $selectExpressions = array(); + + /** + * @param array $selectExpressions + * @param bool $isDistinct + */ + public function __construct(array $selectExpressions, $isDistinct) + { + $this->isDistinct = $isDistinct; + $this->selectExpressions = $selectExpressions; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkSelectClause($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SelectExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SelectExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..4187013994a81df8e7964220b77c632f781b0a31 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SelectExpression.php @@ -0,0 +1,68 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression | + * (AggregateExpression | "(" Subselect ")") [["AS"] ["HIDDEN"] FieldAliasIdentificationVariable] + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class SelectExpression extends Node +{ + /** + * @var mixed + */ + public $expression; + + /** + * @var string|null + */ + public $fieldIdentificationVariable; + + /** + * @var bool + */ + public $hiddenAliasResultVariable; + + /** + * @param mixed $expression + * @param string|null $fieldIdentificationVariable + * @param bool $hiddenAliasResultVariable + */ + public function __construct($expression, $fieldIdentificationVariable, $hiddenAliasResultVariable = false) + { + $this->expression = $expression; + $this->fieldIdentificationVariable = $fieldIdentificationVariable; + $this->hiddenAliasResultVariable = $hiddenAliasResultVariable; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkSelectExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SelectStatement.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SelectStatement.php new file mode 100644 index 0000000000000000000000000000000000000000..d84f7258a9fb23de2ccd5840e6f60e848e16edb5 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SelectStatement.php @@ -0,0 +1,80 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * SelectStatement = SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class SelectStatement extends Node +{ + /** + * @var SelectClause + */ + public $selectClause; + + /** + * @var FromClause + */ + public $fromClause; + + /** + * @var WhereClause|null + */ + public $whereClause; + + /** + * @var GroupByClause|null + */ + public $groupByClause; + + /** + * @var HavingClause|null + */ + public $havingClause; + + /** + * @var OrderByClause|null + */ + public $orderByClause; + + /** + * @param SelectClause $selectClause + * @param FromClause $fromClause + */ + public function __construct($selectClause, $fromClause) + { + $this->selectClause = $selectClause; + $this->fromClause = $fromClause; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkSelectStatement($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..9bd485045f39ee7d3775a562887172a0f99f7fb8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}* + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class SimpleArithmeticExpression extends Node +{ + /** + * @var array + */ + public $arithmeticTerms = array(); + + /** + * @param array $arithmeticTerms + */ + public function __construct(array $arithmeticTerms) + { + $this->arithmeticTerms = $arithmeticTerms; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkSimpleArithmeticExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleCaseExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleCaseExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..5272f3962a811f912f19bd76ba4a7aa1b9ac7a78 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleCaseExpression.php @@ -0,0 +1,69 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * SimpleCaseExpression ::= "CASE" CaseOperand SimpleWhenClause {SimpleWhenClause}* "ELSE" ScalarExpression "END" + * + * @since 2.2 + * + * @link www.doctrine-project.org + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class SimpleCaseExpression extends Node +{ + /** + * @var PathExpression + */ + public $caseOperand = null; + + /** + * @var array + */ + public $simpleWhenClauses = array(); + + /** + * @var mixed + */ + public $elseScalarExpression = null; + + /** + * @param PathExpression $caseOperand + * @param array $simpleWhenClauses + * @param mixed $elseScalarExpression + */ + public function __construct($caseOperand, array $simpleWhenClauses, $elseScalarExpression) + { + $this->caseOperand = $caseOperand; + $this->simpleWhenClauses = $simpleWhenClauses; + $this->elseScalarExpression = $elseScalarExpression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkSimpleCaseExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php new file mode 100644 index 0000000000000000000000000000000000000000..92361da45b781cf7ae369d6be3ff7bf899df82f2 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php @@ -0,0 +1,60 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class SimpleSelectClause extends Node +{ + /** + * @var bool + */ + public $isDistinct = false; + + /** + * @var SimpleSelectExpression + */ + public $simpleSelectExpression; + + /** + * @param SimpleSelectExpression $simpleSelectExpression + * @param bool $isDistinct + */ + public function __construct($simpleSelectExpression, $isDistinct) + { + $this->simpleSelectExpression = $simpleSelectExpression; + $this->isDistinct = $isDistinct; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkSimpleSelectClause($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php new file mode 100644 index 0000000000000000000000000000000000000000..e556835ed6198c3556946b51ad9eba78aca997c3 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php @@ -0,0 +1,59 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable + * | (AggregateExpression [["AS"] FieldAliasIdentificationVariable]) + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class SimpleSelectExpression extends Node +{ + /** + * @var Node + */ + public $expression; + + /** + * @var string + */ + public $fieldIdentificationVariable; + + /** + * @param Node $expression + */ + public function __construct($expression) + { + $this->expression = $expression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkSimpleSelectExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleWhenClause.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleWhenClause.php new file mode 100644 index 0000000000000000000000000000000000000000..4f60881d42aa0da89398b88fb2890bd84f692e75 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SimpleWhenClause.php @@ -0,0 +1,62 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * SimpleWhenClause ::= "WHEN" ScalarExpression "THEN" ScalarExpression + * + * @since 2.2 + * + * @link www.doctrine-project.org + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class SimpleWhenClause extends Node +{ + /** + * @var mixed + */ + public $caseScalarExpression = null; + + /** + * @var mixed + */ + public $thenScalarExpression = null; + + /** + * @param mixed $caseScalarExpression + * @param mixed $thenScalarExpression + */ + public function __construct($caseScalarExpression, $thenScalarExpression) + { + $this->caseScalarExpression = $caseScalarExpression; + $this->thenScalarExpression = $thenScalarExpression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkWhenClauseExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Subselect.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Subselect.php new file mode 100644 index 0000000000000000000000000000000000000000..ce08266f083dd2a140fe06e38a42373c56a11c75 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Subselect.php @@ -0,0 +1,80 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Subselect extends Node +{ + /** + * @var SimpleSelectClause + */ + public $simpleSelectClause; + + /** + * @var SubselectFromClause + */ + public $subselectFromClause; + + /** + * @var WhereClause|null + */ + public $whereClause; + + /** + * @var GroupByClause|null + */ + public $groupByClause; + + /** + * @var HavingClause|null + */ + public $havingClause; + + /** + * @var OrderByClause|null + */ + public $orderByClause; + + /** + * @param SimpleSelectClause $simpleSelectClause + * @param SubselectFromClause $subselectFromClause + */ + public function __construct($simpleSelectClause, $subselectFromClause) + { + $this->simpleSelectClause = $simpleSelectClause; + $this->subselectFromClause = $subselectFromClause; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkSubselect($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SubselectFromClause.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SubselectFromClause.php new file mode 100644 index 0000000000000000000000000000000000000000..8d009fcfdc1ee185e4f2cc28ca2b89ae8e42913c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SubselectFromClause.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}* + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class SubselectFromClause extends Node +{ + /** + * @var array + */ + public $identificationVariableDeclarations = array(); + + /** + * @param array $identificationVariableDeclarations + */ + public function __construct(array $identificationVariableDeclarations) + { + $this->identificationVariableDeclarations = $identificationVariableDeclarations; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkSubselectFromClause($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SubselectIdentificationVariableDeclaration.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SubselectIdentificationVariableDeclaration.php new file mode 100644 index 0000000000000000000000000000000000000000..8fbd9e2105d46a3e4c62d8344eb83cf5ca73377c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/SubselectIdentificationVariableDeclaration.php @@ -0,0 +1,52 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * SubselectIdentificationVariableDeclaration ::= AssociationPathExpression ["AS"] AliasIdentificationVariable + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + */ +class SubselectIdentificationVariableDeclaration +{ + /** + * @var PathExpression + */ + public $associationPathExpression; + + /** + * @var string + */ + public $aliasIdentificationVariable; + + /** + * Constructor. + * + * @param PathExpression $associationPathExpression + * @param string $aliasIdentificationVariable + */ + public function __construct($associationPathExpression, $aliasIdentificationVariable) + { + $this->associationPathExpression = $associationPathExpression; + $this->aliasIdentificationVariable = $aliasIdentificationVariable; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/UpdateClause.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/UpdateClause.php new file mode 100644 index 0000000000000000000000000000000000000000..430ed14eb93535e08dff11aed159e5150334a63a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/UpdateClause.php @@ -0,0 +1,65 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * UpdateClause ::= "UPDATE" AbstractSchemaName [["AS"] AliasIdentificationVariable] "SET" UpdateItem {"," UpdateItem}* + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class UpdateClause extends Node +{ + /** + * @var string + */ + public $abstractSchemaName; + + /** + * @var string + */ + public $aliasIdentificationVariable; + + /** + * @var array + */ + public $updateItems = array(); + + /** + * @param string $abstractSchemaName + * @param array $updateItems + */ + public function __construct($abstractSchemaName, array $updateItems) + { + $this->abstractSchemaName = $abstractSchemaName; + $this->updateItems = $updateItems; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkUpdateClause($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/UpdateItem.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/UpdateItem.php new file mode 100644 index 0000000000000000000000000000000000000000..f1a288cae216c3c271730216632d0544d09abb3c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/UpdateItem.php @@ -0,0 +1,62 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * UpdateItem ::= [IdentificationVariable "."] {StateField | SingleValuedAssociationField} "=" NewValue + * NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | + * EnumPrimary | SimpleEntityExpression | "NULL" + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class UpdateItem extends Node +{ + /** + * @var PathExpression + */ + public $pathExpression; + + /** + * @var InputParameter|ArithmeticExpression|null + */ + public $newValue; + + /** + * @param PathExpression $pathExpression + * @param InputParameter|ArithmeticExpression|null $newValue + */ + public function __construct($pathExpression, $newValue) + { + $this->pathExpression = $pathExpression; + $this->newValue = $newValue; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkUpdateItem($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/UpdateStatement.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/UpdateStatement.php new file mode 100644 index 0000000000000000000000000000000000000000..c578efef487b2e4c3e0ceb8bcd505d5a07f2dced --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/UpdateStatement.php @@ -0,0 +1,58 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * UpdateStatement = UpdateClause [WhereClause] + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class UpdateStatement extends Node +{ + /** + * @var UpdateClause + */ + public $updateClause; + + /** + * @var WhereClause|null + */ + public $whereClause; + + /** + * @param UpdateClause $updateClause + */ + public function __construct($updateClause) + { + $this->updateClause = $updateClause; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkUpdateStatement($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/WhenClause.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/WhenClause.php new file mode 100644 index 0000000000000000000000000000000000000000..01c0330f48ce9de97508a4aa0d22ef44fc362662 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/WhenClause.php @@ -0,0 +1,62 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * WhenClause ::= "WHEN" ConditionalExpression "THEN" ScalarExpression + * + * @since 2.2 + * + * @link www.doctrine-project.org + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class WhenClause extends Node +{ + /** + * @var ConditionalExpression + */ + public $caseConditionExpression = null; + + /** + * @var mixed + */ + public $thenScalarExpression = null; + + /** + * @param ConditionalExpression $caseConditionExpression + * @param mixed $thenScalarExpression + */ + public function __construct($caseConditionExpression, $thenScalarExpression) + { + $this->caseConditionExpression = $caseConditionExpression; + $this->thenScalarExpression = $thenScalarExpression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkWhenClauseExpression($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/WhereClause.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/WhereClause.php new file mode 100644 index 0000000000000000000000000000000000000000..e6597752ffff24f15394ca49b7074296fb32060d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/WhereClause.php @@ -0,0 +1,53 @@ +. + */ + +namespace Doctrine\ORM\Query\AST; + +/** + * WhereClause ::= "WHERE" ConditionalExpression + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class WhereClause extends Node +{ + /** + * @var ConditionalExpression + */ + public $conditionalExpression; + + /** + * @param ConditionalExpression $conditionalExpression + */ + public function __construct($conditionalExpression) + { + $this->conditionalExpression = $conditionalExpression; + } + + /** + * {@inheritdoc} + */ + public function dispatch($sqlWalker) + { + return $sqlWalker->walkWhereClause($this); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/AbstractSqlExecutor.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/AbstractSqlExecutor.php new file mode 100644 index 0000000000000000000000000000000000000000..9be35df187d8ff0542046b9fa5023ff89f42b958 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/AbstractSqlExecutor.php @@ -0,0 +1,76 @@ +. + */ + +namespace Doctrine\ORM\Query\Exec; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Cache\QueryCacheProfile; + +/** + * Base class for SQL statement executors. + * + * @author Roman Borschel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://www.doctrine-project.org + * @since 2.0 + * @todo Rename: AbstractSQLExecutor + */ +abstract class AbstractSqlExecutor +{ + /** + * @var array + */ + protected $_sqlStatements; + + /** + * @var QueryCacheProfile + */ + protected $queryCacheProfile; + + /** + * Gets the SQL statements that are executed by the executor. + * + * @return array All the SQL update statements. + */ + public function getSqlStatements() + { + return $this->_sqlStatements; + } + + /** + * @param \Doctrine\DBAL\Cache\QueryCacheProfile $qcp + * + * @return void + */ + public function setQueryCacheProfile(QueryCacheProfile $qcp) + { + $this->queryCacheProfile = $qcp; + } + + /** + * Executes all sql statements. + * + * @param Connection $conn The database connection that is used to execute the queries. + * @param array $params The parameters. + * @param array $types The parameter types. + * + * @return \Doctrine\DBAL\Driver\Statement + */ + abstract public function execute(Connection $conn, array $params, array $types); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php new file mode 100644 index 0000000000000000000000000000000000000000..4e5303ce7b2d2bc985b658edbe7bb7ee885708f5 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php @@ -0,0 +1,145 @@ +. + */ + +namespace Doctrine\ORM\Query\Exec; + +use Doctrine\DBAL\Connection; +use Doctrine\ORM\Query\AST; + +/** + * Executes the SQL statements for bulk DQL DELETE statements on classes in + * Class Table Inheritance (JOINED). + * + * @author Roman Borschel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://www.doctrine-project.org + * @since 2.0 + */ +class MultiTableDeleteExecutor extends AbstractSqlExecutor +{ + /** + * @var string + */ + private $_createTempTableSql; + + /** + * @var string + */ + private $_dropTempTableSql; + + /** + * @var string + */ + private $_insertSql; + + /** + * Initializes a new MultiTableDeleteExecutor. + * + * Internal note: Any SQL construction and preparation takes place in the constructor for + * best performance. With a query cache the executor will be cached. + * + * @param \Doctrine\ORM\Query\AST\Node $AST The root AST node of the DQL query. + * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker The walker used for SQL generation from the AST. + */ + public function __construct(AST\Node $AST, $sqlWalker) + { + $em = $sqlWalker->getEntityManager(); + $conn = $em->getConnection(); + $platform = $conn->getDatabasePlatform(); + $quoteStrategy = $em->getConfiguration()->getQuoteStrategy(); + + $primaryClass = $em->getClassMetadata($AST->deleteClause->abstractSchemaName); + $primaryDqlAlias = $AST->deleteClause->aliasIdentificationVariable; + $rootClass = $em->getClassMetadata($primaryClass->rootEntityName); + + $tempTable = $platform->getTemporaryTableName($rootClass->getTemporaryIdTableName()); + $idColumnNames = $rootClass->getIdentifierColumnNames(); + $idColumnList = implode(', ', $idColumnNames); + + // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause() + $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $primaryDqlAlias); + + $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')' + . ' SELECT t0.' . implode(', t0.', $idColumnNames); + + $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $primaryDqlAlias); + $fromClause = new AST\FromClause(array(new AST\IdentificationVariableDeclaration($rangeDecl, null, array()))); + $this->_insertSql .= $sqlWalker->walkFromClause($fromClause); + + // Append WHERE clause, if there is one. + if ($AST->whereClause) { + $this->_insertSql .= $sqlWalker->walkWhereClause($AST->whereClause); + } + + // 2. Create ID subselect statement used in DELETE ... WHERE ... IN (subselect) + $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable; + + // 3. Create and store DELETE statements + $classNames = array_merge($primaryClass->parentClasses, array($primaryClass->name), $primaryClass->subClasses); + foreach (array_reverse($classNames) as $className) { + $tableName = $quoteStrategy->getTableName($em->getClassMetadata($className), $platform); + $this->_sqlStatements[] = 'DELETE FROM ' . $tableName + . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')'; + } + + // 4. Store DDL for temporary identifier table. + $columnDefinitions = array(); + foreach ($idColumnNames as $idColumnName) { + $columnDefinitions[$idColumnName] = array( + 'notnull' => true, + 'type' => \Doctrine\DBAL\Types\Type::getType($rootClass->getTypeOfColumn($idColumnName)) + ); + } + $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' + . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; + $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable); + } + + /** + * {@inheritDoc} + */ + public function execute(Connection $conn, array $params, array $types) + { + $numDeleted = 0; + + // Create temporary id table + $conn->executeUpdate($this->_createTempTableSql); + + try { + // Insert identifiers + $numDeleted = $conn->executeUpdate($this->_insertSql, $params, $types); + + // Execute DELETE statements + foreach ($this->_sqlStatements as $sql) { + $conn->executeUpdate($sql); + } + } catch (\Exception $exception) { + // FAILURE! Drop temporary table to avoid possible collisions + $conn->executeUpdate($this->_dropTempTableSql); + + // Re-throw exception + throw $exception; + } + + // Drop temporary table + $conn->executeUpdate($this->_dropTempTableSql); + + return $numDeleted; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php new file mode 100644 index 0000000000000000000000000000000000000000..54653fc555c15c8217e6405ec3f284191ddbe85c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php @@ -0,0 +1,206 @@ +. + */ + +namespace Doctrine\ORM\Query\Exec; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Types\Type; + +use Doctrine\ORM\Query\ParameterTypeInferer; +use Doctrine\ORM\Query\AST; + +/** + * Executes the SQL statements for bulk DQL UPDATE statements on classes in + * Class Table Inheritance (JOINED). + * + * @author Roman Borschel + * @since 2.0 + */ +class MultiTableUpdateExecutor extends AbstractSqlExecutor +{ + /** + * @var string + */ + private $_createTempTableSql; + + /** + * @var string + */ + private $_dropTempTableSql; + + /** + * @var string + */ + private $_insertSql; + + /** + * @var array + */ + private $_sqlParameters = array(); + + /** + * @var int + */ + private $_numParametersInUpdateClause = 0; + + /** + * Initializes a new MultiTableUpdateExecutor. + * + * Internal note: Any SQL construction and preparation takes place in the constructor for + * best performance. With a query cache the executor will be cached. + * + * @param \Doctrine\ORM\Query\AST\Node $AST The root AST node of the DQL query. + * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker The walker used for SQL generation from the AST. + */ + public function __construct(AST\Node $AST, $sqlWalker) + { + $em = $sqlWalker->getEntityManager(); + $conn = $em->getConnection(); + $platform = $conn->getDatabasePlatform(); + $quoteStrategy = $em->getConfiguration()->getQuoteStrategy(); + + $updateClause = $AST->updateClause; + $primaryClass = $sqlWalker->getEntityManager()->getClassMetadata($updateClause->abstractSchemaName); + $rootClass = $em->getClassMetadata($primaryClass->rootEntityName); + + $updateItems = $updateClause->updateItems; + + $tempTable = $platform->getTemporaryTableName($rootClass->getTemporaryIdTableName()); + $idColumnNames = $rootClass->getIdentifierColumnNames(); + $idColumnList = implode(', ', $idColumnNames); + + // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause() + $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $updateClause->aliasIdentificationVariable); + + $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')' + . ' SELECT t0.' . implode(', t0.', $idColumnNames); + + $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $updateClause->aliasIdentificationVariable); + $fromClause = new AST\FromClause(array(new AST\IdentificationVariableDeclaration($rangeDecl, null, array()))); + + $this->_insertSql .= $sqlWalker->walkFromClause($fromClause); + + // 2. Create ID subselect statement used in UPDATE ... WHERE ... IN (subselect) + $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable; + + // 3. Create and store UPDATE statements + $classNames = array_merge($primaryClass->parentClasses, array($primaryClass->name), $primaryClass->subClasses); + $i = -1; + + foreach (array_reverse($classNames) as $className) { + $affected = false; + $class = $em->getClassMetadata($className); + $updateSql = 'UPDATE ' . $quoteStrategy->getTableName($class, $platform) . ' SET '; + + foreach ($updateItems as $updateItem) { + $field = $updateItem->pathExpression->field; + + if (isset($class->fieldMappings[$field]) && ! isset($class->fieldMappings[$field]['inherited']) || + isset($class->associationMappings[$field]) && ! isset($class->associationMappings[$field]['inherited'])) { + $newValue = $updateItem->newValue; + + if ( ! $affected) { + $affected = true; + ++$i; + } else { + $updateSql .= ', '; + } + + $updateSql .= $sqlWalker->walkUpdateItem($updateItem); + + if ($newValue instanceof AST\InputParameter) { + $this->_sqlParameters[$i][] = $newValue->name; + + ++$this->_numParametersInUpdateClause; + } + } + } + + if ($affected) { + $this->_sqlStatements[$i] = $updateSql . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')'; + } + } + + // Append WHERE clause to insertSql, if there is one. + if ($AST->whereClause) { + $this->_insertSql .= $sqlWalker->walkWhereClause($AST->whereClause); + } + + // 4. Store DDL for temporary identifier table. + $columnDefinitions = array(); + + foreach ($idColumnNames as $idColumnName) { + $columnDefinitions[$idColumnName] = array( + 'notnull' => true, + 'type' => Type::getType($rootClass->getTypeOfColumn($idColumnName)) + ); + } + + $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' + . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; + + $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable); + } + + /** + * {@inheritDoc} + */ + public function execute(Connection $conn, array $params, array $types) + { + $numUpdated = 0; + + // Create temporary id table + $conn->executeUpdate($this->_createTempTableSql); + + try { + // Insert identifiers. Parameters from the update clause are cut off. + $numUpdated = $conn->executeUpdate( + $this->_insertSql, + array_slice($params, $this->_numParametersInUpdateClause), + array_slice($types, $this->_numParametersInUpdateClause) + ); + + // Execute UPDATE statements + foreach ($this->_sqlStatements as $key => $statement) { + $paramValues = array(); + $paramTypes = array(); + + if (isset($this->_sqlParameters[$key])) { + foreach ($this->_sqlParameters[$key] as $parameterKey => $parameterName) { + $paramValues[] = $params[$parameterKey]; + $paramTypes[] = isset($types[$parameterKey]) ? $types[$parameterKey] : ParameterTypeInferer::inferType($params[$parameterKey]); + } + } + + $conn->executeUpdate($statement, $paramValues, $paramTypes); + } + } catch (\Exception $exception) { + // FAILURE! Drop temporary table to avoid possible collisions + $conn->executeUpdate($this->_dropTempTableSql); + + // Re-throw exception + throw $exception; + } + + // Drop temporary table + $conn->executeUpdate($this->_dropTempTableSql); + + return $numUpdated; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php new file mode 100644 index 0000000000000000000000000000000000000000..91827ab1adcf95061dd9bb64733d08678b029e64 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php @@ -0,0 +1,52 @@ +. + */ + +namespace Doctrine\ORM\Query\Exec; + +use Doctrine\DBAL\Connection; +use Doctrine\ORM\Query\AST\SelectStatement; +use Doctrine\ORM\Query\SqlWalker; + +/** + * Executor that executes the SQL statement for simple DQL SELECT statements. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @author Roman Borschel + * @link www.doctrine-project.org + * @since 2.0 + */ +class SingleSelectExecutor extends AbstractSqlExecutor +{ + /** + * @param \Doctrine\ORM\Query\AST\SelectStatement $AST + * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker + */ + public function __construct(SelectStatement $AST, SqlWalker $sqlWalker) + { + $this->_sqlStatements = $sqlWalker->walkSelectStatement($AST); + } + + /** + * {@inheritDoc} + */ + public function execute(Connection $conn, array $params, array $types) + { + return $conn->executeQuery($this->_sqlStatements, $params, $types, $this->queryCacheProfile); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleTableDeleteUpdateExecutor.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleTableDeleteUpdateExecutor.php new file mode 100644 index 0000000000000000000000000000000000000000..e0183dd6879d2e00cb05491e0e86414bd043e7f8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleTableDeleteUpdateExecutor.php @@ -0,0 +1,57 @@ +. + */ + +namespace Doctrine\ORM\Query\Exec; + +use Doctrine\DBAL\Connection; +use Doctrine\ORM\Query\AST; + +/** + * Executor that executes the SQL statements for DQL DELETE/UPDATE statements on classes + * that are mapped to a single table. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @author Roman Borschel + * @link www.doctrine-project.org + * @since 2.0 + * @todo This is exactly the same as SingleSelectExecutor. Unify in SingleStatementExecutor. + */ +class SingleTableDeleteUpdateExecutor extends AbstractSqlExecutor +{ + /** + * @param \Doctrine\ORM\Query\AST\Node $AST + * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker + */ + public function __construct(AST\Node $AST, $sqlWalker) + { + if ($AST instanceof AST\UpdateStatement) { + $this->_sqlStatements = $sqlWalker->walkUpdateStatement($AST); + } else if ($AST instanceof AST\DeleteStatement) { + $this->_sqlStatements = $sqlWalker->walkDeleteStatement($AST); + } + } + + /** + * {@inheritDoc} + */ + public function execute(Connection $conn, array $params, array $types) + { + return $conn->executeUpdate($this->_sqlStatements, $params, $types); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr.php new file mode 100644 index 0000000000000000000000000000000000000000..b6997d8cb8335272ed9b445158a2acc8452bd273 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr.php @@ -0,0 +1,673 @@ +. + */ + +namespace Doctrine\ORM\Query; + +/** + * This class is used to generate DQL expressions via a set of PHP static functions. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + * @todo Rename: ExpressionBuilder + */ +class Expr +{ + /** + * Creates a conjunction of the given boolean expressions. + * + * Example: + * + * [php] + * // (u.type = ?1) AND (u.role = ?2) + * $expr->andX($expr->eq('u.type', ':1'), $expr->eq('u.role', ':2')); + * + * @param \Doctrine\ORM\Query\Expr\Comparison | + * \Doctrine\ORM\Query\Expr\Func | + * \Doctrine\ORM\Query\Expr\Orx + * $x Optional clause. Defaults to null, but requires at least one defined when converting to string. + * + * @return Expr\Andx + */ + public function andX($x = null) + { + return new Expr\Andx(func_get_args()); + } + + /** + * Creates a disjunction of the given boolean expressions. + * + * Example: + * + * [php] + * // (u.type = ?1) OR (u.role = ?2) + * $q->where($q->expr()->orX('u.type = ?1', 'u.role = ?2')); + * + * @param mixed $x Optional clause. Defaults to null, but requires + * at least one defined when converting to string. + * + * @return Expr\Orx + */ + public function orX($x = null) + { + return new Expr\Orx(func_get_args()); + } + + /** + * Creates an ASCending order expression. + * + * @param mixed $expr + * + * @return Expr\OrderBy + */ + public function asc($expr) + { + return new Expr\OrderBy($expr, 'ASC'); + } + + /** + * Creates a DESCending order expression. + * + * @param mixed $expr + * + * @return Expr\OrderBy + */ + public function desc($expr) + { + return new Expr\OrderBy($expr, 'DESC'); + } + + /** + * Creates an equality comparison expression with the given arguments. + * + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a = . Example: + * + * [php] + * // u.id = ?1 + * $expr->eq('u.id', '?1'); + * + * @param mixed $x Left expression. + * @param mixed $y Right expression. + * + * @return Expr\Comparison + */ + public function eq($x, $y) + { + return new Expr\Comparison($x, Expr\Comparison::EQ, $y); + } + + /** + * Creates an instance of Expr\Comparison, with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a <> . Example: + * + * [php] + * // u.id <> ?1 + * $q->where($q->expr()->neq('u.id', '?1')); + * + * @param mixed $x Left expression. + * @param mixed $y Right expression. + * + * @return Expr\Comparison + */ + public function neq($x, $y) + { + return new Expr\Comparison($x, Expr\Comparison::NEQ, $y); + } + + /** + * Creates an instance of Expr\Comparison, with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a < . Example: + * + * [php] + * // u.id < ?1 + * $q->where($q->expr()->lt('u.id', '?1')); + * + * @param mixed $x Left expression. + * @param mixed $y Right expression. + * + * @return Expr\Comparison + */ + public function lt($x, $y) + { + return new Expr\Comparison($x, Expr\Comparison::LT, $y); + } + + /** + * Creates an instance of Expr\Comparison, with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a <= . Example: + * + * [php] + * // u.id <= ?1 + * $q->where($q->expr()->lte('u.id', '?1')); + * + * @param mixed $x Left expression. + * @param mixed $y Right expression. + * + * @return Expr\Comparison + */ + public function lte($x, $y) + { + return new Expr\Comparison($x, Expr\Comparison::LTE, $y); + } + + /** + * Creates an instance of Expr\Comparison, with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a > . Example: + * + * [php] + * // u.id > ?1 + * $q->where($q->expr()->gt('u.id', '?1')); + * + * @param mixed $x Left expression. + * @param mixed $y Right expression. + * + * @return Expr\Comparison + */ + public function gt($x, $y) + { + return new Expr\Comparison($x, Expr\Comparison::GT, $y); + } + + /** + * Creates an instance of Expr\Comparison, with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a >= . Example: + * + * [php] + * // u.id >= ?1 + * $q->where($q->expr()->gte('u.id', '?1')); + * + * @param mixed $x Left expression. + * @param mixed $y Right expression. + * + * @return Expr\Comparison + */ + public function gte($x, $y) + { + return new Expr\Comparison($x, Expr\Comparison::GTE, $y); + } + + /** + * Creates an instance of AVG() function, with the given argument. + * + * @param mixed $x Argument to be used in AVG() function. + * + * @return Expr\Func + */ + public function avg($x) + { + return new Expr\Func('AVG', array($x)); + } + + /** + * Creates an instance of MAX() function, with the given argument. + * + * @param mixed $x Argument to be used in MAX() function. + * + * @return Expr\Func + */ + public function max($x) + { + return new Expr\Func('MAX', array($x)); + } + + /** + * Creates an instance of MIN() function, with the given argument. + * + * @param mixed $x Argument to be used in MIN() function. + * + * @return Expr\Func + */ + public function min($x) + { + return new Expr\Func('MIN', array($x)); + } + + /** + * Creates an instance of COUNT() function, with the given argument. + * + * @param mixed $x Argument to be used in COUNT() function. + * + * @return Expr\Func + */ + public function count($x) + { + return new Expr\Func('COUNT', array($x)); + } + + /** + * Creates an instance of COUNT(DISTINCT) function, with the given argument. + * + * @param mixed $x Argument to be used in COUNT(DISTINCT) function. + * + * @return string + */ + public function countDistinct($x) + { + return 'COUNT(DISTINCT ' . implode(', ', func_get_args()) . ')'; + } + + /** + * Creates an instance of EXISTS() function, with the given DQL Subquery. + * + * @param mixed $subquery DQL Subquery to be used in EXISTS() function. + * + * @return Expr\Func + */ + public function exists($subquery) + { + return new Expr\Func('EXISTS', array($subquery)); + } + + /** + * Creates an instance of ALL() function, with the given DQL Subquery. + * + * @param mixed $subquery DQL Subquery to be used in ALL() function. + * + * @return Expr\Func + */ + public function all($subquery) + { + return new Expr\Func('ALL', array($subquery)); + } + + /** + * Creates a SOME() function expression with the given DQL subquery. + * + * @param mixed $subquery DQL Subquery to be used in SOME() function. + * + * @return Expr\Func + */ + public function some($subquery) + { + return new Expr\Func('SOME', array($subquery)); + } + + /** + * Creates an ANY() function expression with the given DQL subquery. + * + * @param mixed $subquery DQL Subquery to be used in ANY() function. + * + * @return Expr\Func + */ + public function any($subquery) + { + return new Expr\Func('ANY', array($subquery)); + } + + /** + * Creates a negation expression of the given restriction. + * + * @param mixed $restriction Restriction to be used in NOT() function. + * + * @return Expr\Func + */ + public function not($restriction) + { + return new Expr\Func('NOT', array($restriction)); + } + + /** + * Creates an ABS() function expression with the given argument. + * + * @param mixed $x Argument to be used in ABS() function. + * + * @return Expr\Func + */ + public function abs($x) + { + return new Expr\Func('ABS', array($x)); + } + + /** + * Creates a product mathematical expression with the given arguments. + * + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a * . Example: + * + * [php] + * // u.salary * u.percentAnnualSalaryIncrease + * $q->expr()->prod('u.salary', 'u.percentAnnualSalaryIncrease') + * + * @param mixed $x Left expression. + * @param mixed $y Right expression. + * + * @return Expr\Math + */ + public function prod($x, $y) + { + return new Expr\Math($x, '*', $y); + } + + /** + * Creates a difference mathematical expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a - . Example: + * + * [php] + * // u.monthlySubscriptionCount - 1 + * $q->expr()->diff('u.monthlySubscriptionCount', '1') + * + * @param mixed $x Left expression. + * @param mixed $y Right expression. + * + * @return Expr\Math + */ + public function diff($x, $y) + { + return new Expr\Math($x, '-', $y); + } + + /** + * Creates a sum mathematical expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a + . Example: + * + * [php] + * // u.numChildren + 1 + * $q->expr()->diff('u.numChildren', '1') + * + * @param mixed $x Left expression. + * @param mixed $y Right expression. + * + * @return Expr\Math + */ + public function sum($x, $y) + { + return new Expr\Math($x, '+', $y); + } + + /** + * Creates a quotient mathematical expression with the given arguments. + * First argument is considered the left expression and the second is the right expression. + * When converted to string, it will generated a / . Example: + * + * [php] + * // u.total / u.period + * $expr->quot('u.total', 'u.period') + * + * @param mixed $x Left expression. + * @param mixed $y Right expression. + * + * @return Expr\Math + */ + public function quot($x, $y) + { + return new Expr\Math($x, '/', $y); + } + + /** + * Creates a SQRT() function expression with the given argument. + * + * @param mixed $x Argument to be used in SQRT() function. + * + * @return Expr\Func + */ + public function sqrt($x) + { + return new Expr\Func('SQRT', array($x)); + } + + /** + * Creates an IN() expression with the given arguments. + * + * @param string $x Field in string format to be restricted by IN() function. + * @param mixed $y Argument to be used in IN() function. + * + * @return Expr\Func + */ + public function in($x, $y) + { + if (is_array($y)) { + foreach ($y as &$literal) { + if ( ! ($literal instanceof Expr\Literal)) { + $literal = $this->_quoteLiteral($literal); + } + } + } + return new Expr\Func($x . ' IN', (array) $y); + } + + /** + * Creates a NOT IN() expression with the given arguments. + * + * @param string $x Field in string format to be restricted by NOT IN() function. + * @param mixed $y Argument to be used in NOT IN() function. + * + * @return Expr\Func + */ + public function notIn($x, $y) + { + if (is_array($y)) { + foreach ($y as &$literal) { + if ( ! ($literal instanceof Expr\Literal)) { + $literal = $this->_quoteLiteral($literal); + } + } + } + return new Expr\Func($x . ' NOT IN', (array) $y); + } + + /** + * Creates an IS NULL expression with the given arguments. + * + * @param string $x Field in string format to be restricted by IS NULL. + * + * @return string + */ + public function isNull($x) + { + return $x . ' IS NULL'; + } + + /** + * Creates an IS NOT NULL expression with the given arguments. + * + * @param string $x Field in string format to be restricted by IS NOT NULL. + * + * @return string + */ + public function isNotNull($x) + { + return $x . ' IS NOT NULL'; + } + + /** + * Creates a LIKE() comparison expression with the given arguments. + * + * @param string $x Field in string format to be inspected by LIKE() comparison. + * @param mixed $y Argument to be used in LIKE() comparison. + * + * @return Expr\Comparison + */ + public function like($x, $y) + { + return new Expr\Comparison($x, 'LIKE', $y); + } + + /** + * Creates a NOT LIKE() comparison expression with the given arguments. + * + * @param string $x Field in string format to be inspected by LIKE() comparison. + * @param mixed $y Argument to be used in LIKE() comparison. + * + * @return Expr\Comparison + */ + public function notLike($x, $y) + { + return new Expr\Comparison($x, 'NOT LIKE', $y); + } + + /** + * Creates a CONCAT() function expression with the given arguments. + * + * @param mixed $x First argument to be used in CONCAT() function. + * @param mixed $y Second argument to be used in CONCAT() function. + * + * @return Expr\Func + */ + public function concat($x, $y) + { + return new Expr\Func('CONCAT', array($x, $y)); + } + + /** + * Creates a SUBSTRING() function expression with the given arguments. + * + * @param mixed $x Argument to be used as string to be cropped by SUBSTRING() function. + * @param int $from Initial offset to start cropping string. May accept negative values. + * @param int|null $len Length of crop. May accept negative values. + * + * @return Expr\Func + */ + public function substring($x, $from, $len = null) + { + $args = array($x, $from); + if (null !== $len) { + $args[] = $len; + } + return new Expr\Func('SUBSTRING', $args); + } + + /** + * Creates a LOWER() function expression with the given argument. + * + * @param mixed $x Argument to be used in LOWER() function. + * + * @return Expr\Func A LOWER function expression. + */ + public function lower($x) + { + return new Expr\Func('LOWER', array($x)); + } + + /** + * Creates an UPPER() function expression with the given argument. + * + * @param mixed $x Argument to be used in UPPER() function. + * + * @return Expr\Func An UPPER function expression. + */ + public function upper($x) + { + return new Expr\Func('UPPER', array($x)); + } + + /** + * Creates a LENGTH() function expression with the given argument. + * + * @param mixed $x Argument to be used as argument of LENGTH() function. + * + * @return Expr\Func A LENGTH function expression. + */ + public function length($x) + { + return new Expr\Func('LENGTH', array($x)); + } + + /** + * Creates a literal expression of the given argument. + * + * @param mixed $literal Argument to be converted to literal. + * + * @return Expr\Literal + */ + public function literal($literal) + { + return new Expr\Literal($this->_quoteLiteral($literal)); + } + + /** + * Quotes a literal value, if necessary, according to the DQL syntax. + * + * @param mixed $literal The literal value. + * + * @return string + */ + private function _quoteLiteral($literal) + { + if (is_numeric($literal) && !is_string($literal)) { + return (string) $literal; + } else if (is_bool($literal)) { + return $literal ? "true" : "false"; + } else { + return "'" . str_replace("'", "''", $literal) . "'"; + } + } + + /** + * Creates an instance of BETWEEN() function, with the given argument. + * + * @param mixed $val Valued to be inspected by range values. + * @param integer $x Starting range value to be used in BETWEEN() function. + * @param integer $y End point value to be used in BETWEEN() function. + * + * @return Expr\Func A BETWEEN expression. + */ + public function between($val, $x, $y) + { + return $val . ' BETWEEN ' . $x . ' AND ' . $y; + } + + /** + * Creates an instance of TRIM() function, with the given argument. + * + * @param mixed $x Argument to be used as argument of TRIM() function. + * + * @return Expr\Func a TRIM expression. + */ + public function trim($x) + { + return new Expr\Func('TRIM', $x); + } + + /** + * Creates an instance of MEMBER OF function, with the given arguments. + * + * @param string $x Value to be checked + * @param string $y Value to be checked against + * + * @return Expr\Comparison + */ + public function isMemberOf($x, $y) + { + return new Expr\Comparison($x, 'MEMBER OF', $y); + } + + /** + * Creates an instance of INSTANCE OF function, with the given arguments. + * + * @param string $x Value to be checked + * @param string $y Value to be checked against + * + * @return Expr\Comparison + */ + public function isInstanceOf($x, $y) + { + return new Expr\Comparison($x, 'INSTANCE OF', $y); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Andx.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Andx.php new file mode 100644 index 0000000000000000000000000000000000000000..432f714f6d9eb2c3b1deda260fc7d4e7639034ef --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Andx.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Expression class for building DQL and parts. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Andx extends Composite +{ + /** + * @var string + */ + protected $separator = ' AND '; + + /** + * @var array + */ + protected $allowedClasses = array( + 'Doctrine\ORM\Query\Expr\Comparison', + 'Doctrine\ORM\Query\Expr\Func', + 'Doctrine\ORM\Query\Expr\Orx', + 'Doctrine\ORM\Query\Expr\Andx', + ); + + /** + * @return array + */ + public function getParts() + { + return $this->parts; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Base.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Base.php new file mode 100644 index 0000000000000000000000000000000000000000..6eac70a27c6ad93a3fef455f8eaa5e4536fabad2 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Base.php @@ -0,0 +1,124 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Abstract base Expr class for building DQL parts. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +abstract class Base +{ + /** + * @var string + */ + protected $preSeparator = '('; + + /** + * @var string + */ + protected $separator = ', '; + + /** + * @var string + */ + protected $postSeparator = ')'; + + /** + * @var array + */ + protected $allowedClasses = array(); + + /** + * @var array + */ + protected $parts = array(); + + /** + * @param array $args + */ + public function __construct($args = array()) + { + $this->addMultiple($args); + } + + /** + * @param array $args + * + * @return Base + */ + public function addMultiple($args = array()) + { + foreach ((array) $args as $arg) { + $this->add($arg); + } + + return $this; + } + + /** + * @param mixed $arg + * + * @return Base + * + * @throws \InvalidArgumentException + */ + public function add($arg) + { + if ( $arg !== null && (!$arg instanceof self || $arg->count() > 0) ) { + // If we decide to keep Expr\Base instances, we can use this check + if ( ! is_string($arg)) { + $class = get_class($arg); + + if ( ! in_array($class, $this->allowedClasses)) { + throw new \InvalidArgumentException("Expression of type '$class' not allowed in this context."); + } + } + + $this->parts[] = $arg; + } + + return $this; + } + + /** + * @return integer + */ + public function count() + { + return count($this->parts); + } + + /** + * @return string + */ + public function __toString() + { + if ($this->count() == 1) { + return (string) $this->parts[0]; + } + + return $this->preSeparator . implode($this->separator, $this->parts) . $this->postSeparator; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Comparison.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Comparison.php new file mode 100644 index 0000000000000000000000000000000000000000..4103dcea9eba347c26115c119de3872fd19e64bc --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Comparison.php @@ -0,0 +1,100 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Expression class for DQL comparison expressions. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Comparison +{ + const EQ = '='; + const NEQ = '<>'; + const LT = '<'; + const LTE = '<='; + const GT = '>'; + const GTE = '>='; + + /** + * @var mixed + */ + protected $leftExpr; + + /** + * @var string + */ + protected $operator; + + /** + * @var mixed + */ + protected $rightExpr; + + /** + * Creates a comparison expression with the given arguments. + * + * @param mixed $leftExpr + * @param string $operator + * @param mixed $rightExpr + */ + public function __construct($leftExpr, $operator, $rightExpr) + { + $this->leftExpr = $leftExpr; + $this->operator = $operator; + $this->rightExpr = $rightExpr; + } + + /** + * @return mixed + */ + public function getLeftExpr() + { + return $this->leftExpr; + } + + /** + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * @return mixed + */ + public function getRightExpr() + { + return $this->rightExpr; + } + + /** + * @return string + */ + public function __toString() + { + return $this->leftExpr . ' ' . $this->operator . ' ' . $this->rightExpr; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Composite.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Composite.php new file mode 100644 index 0000000000000000000000000000000000000000..4d9a251986c666736101393b98db0c92b936385f --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Composite.php @@ -0,0 +1,71 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Expression class for building DQL and parts. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Composite extends Base +{ + /** + * @return string + */ + public function __toString() + { + if ($this->count() === 1) { + return (string) $this->parts[0]; + } + + $components = array(); + + foreach ($this->parts as $part) { + $components[] = $this->processQueryPart($part); + } + + return implode($this->separator, $components); + } + + /** + * @param string $part + * + * @return string + */ + private function processQueryPart($part) + { + $queryPart = (string) $part; + + if (is_object($part) && $part instanceof self && $part->count() > 1) { + return $this->preSeparator . $queryPart . $this->postSeparator; + } + + // Fixes DDC-1237: User may have added a where item containing nested expression (with "OR" or "AND") + if (stripos($queryPart, ' OR ') !== false || stripos($queryPart, ' AND ') !== false) { + return $this->preSeparator . $queryPart . $this->postSeparator; + } + + return $queryPart; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/From.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/From.php new file mode 100644 index 0000000000000000000000000000000000000000..9dcce9bbe2734ee450d9ed043c1e8c55a0cb5a2d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/From.php @@ -0,0 +1,92 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Expression class for DQL from. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class From +{ + /** + * @var string + */ + protected $from; + + /** + * @var string + */ + protected $alias; + + /** + * @var string + */ + protected $indexBy; + + /** + * @param string $from The class name. + * @param string $alias The alias of the class. + * @param string $indexBy The index for the from. + */ + public function __construct($from, $alias, $indexBy = null) + { + $this->from = $from; + $this->alias = $alias; + $this->indexBy = $indexBy; + } + + /** + * @return string + */ + public function getFrom() + { + return $this->from; + } + + /** + * @return string + */ + public function getAlias() + { + return $this->alias; + } + + /** + * @return string + */ + public function getIndexBy() + { + return $this->indexBy; + } + + /** + * @return string + */ + public function __toString() + { + return $this->from . ' ' . $this->alias . + ($this->indexBy ? ' INDEX BY ' . $this->indexBy : ''); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Func.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Func.php new file mode 100644 index 0000000000000000000000000000000000000000..b4ed07cd3b24a2cc2d46dff596e096921167dfda --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Func.php @@ -0,0 +1,78 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Expression class for generating DQL functions. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Func +{ + /** + * @var string + */ + protected $name; + + /** + * @var array + */ + protected $arguments; + + /** + * Creates a function, with the given argument. + * + * @param string $name + * @param array $arguments + */ + public function __construct($name, $arguments) + { + $this->name = $name; + $this->arguments = (array) $arguments; + } + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * @return array + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * @return string + */ + public function __toString() + { + return $this->name . '(' . implode(', ', $this->arguments) . ')'; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/GroupBy.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/GroupBy.php new file mode 100644 index 0000000000000000000000000000000000000000..efa3582bdb22f3020f46f8f03966adc08eec6c45 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/GroupBy.php @@ -0,0 +1,50 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Expression class for building DQL Group By parts. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class GroupBy extends Base +{ + /** + * @var string + */ + protected $preSeparator = ''; + + /** + * @var string + */ + protected $postSeparator = ''; + + /** + * @return array + */ + public function getParts() + { + return $this->parts; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Join.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Join.php new file mode 100644 index 0000000000000000000000000000000000000000..7a59e247ae024bcbda6e1c42645d0baee5a97123 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Join.php @@ -0,0 +1,145 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Expression class for DQL join. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Join +{ + const INNER_JOIN = 'INNER'; + const LEFT_JOIN = 'LEFT'; + + const ON = 'ON'; + const WITH = 'WITH'; + + /** + * @var string + */ + protected $joinType; + + /** + * @var string + */ + protected $join; + + /** + * @var string + */ + protected $alias; + + /** + * @var string + */ + protected $conditionType; + + /** + * @var string + */ + protected $condition; + + /** + * @var string + */ + protected $indexBy; + + /** + * @param string $joinType The condition type constant. Either INNER_JOIN or LEFT_JOIN. + * @param string $join The relationship to join. + * @param string|null $alias The alias of the join. + * @param string|null $conditionType The condition type constant. Either ON or WITH. + * @param string|null $condition The condition for the join. + * @param string|null $indexBy The index for the join. + */ + public function __construct($joinType, $join, $alias = null, $conditionType = null, $condition = null, $indexBy = null) + { + $this->joinType = $joinType; + $this->join = $join; + $this->alias = $alias; + $this->conditionType = $conditionType; + $this->condition = $condition; + $this->indexBy = $indexBy; + } + + /** + * @return string + */ + public function getJoinType() + { + return $this->joinType; + } + + /** + * @return string + */ + public function getJoin() + { + return $this->join; + } + + /** + * @return string + */ + public function getAlias() + { + return $this->alias; + } + + /** + * @return string + */ + public function getConditionType() + { + return $this->conditionType; + } + + /** + * @return string + */ + public function getCondition() + { + return $this->condition; + } + + /** + * @return string + */ + public function getIndexBy() + { + return $this->indexBy; + } + + /** + * @return string + */ + public function __toString() + { + return strtoupper($this->joinType) . ' JOIN ' . $this->join + . ($this->alias ? ' ' . $this->alias : '') + . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') + . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Literal.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Literal.php new file mode 100644 index 0000000000000000000000000000000000000000..98cee79d7edc1b4c93ad7eaf1c344a07e5ba3e6c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Literal.php @@ -0,0 +1,50 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Expression class for generating DQL functions. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Literal extends Base +{ + /** + * @var string + */ + protected $preSeparator = ''; + + /** + * @var string + */ + protected $postSeparator = ''; + + /** + * @return array + */ + public function getParts() + { + return $this->parts; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Math.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Math.php new file mode 100644 index 0000000000000000000000000000000000000000..9bf800de8feb452a12d3b122a329897a8d0b8c41 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Math.php @@ -0,0 +1,107 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Expression class for DQL math statements. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Math +{ + /** + * @var mixed + */ + protected $leftExpr; + + /** + * @var string + */ + protected $operator; + + /** + * @var mixed + */ + protected $rightExpr; + + /** + * Creates a mathematical expression with the given arguments. + * + * @param mixed $leftExpr + * @param string $operator + * @param mixed $rightExpr + */ + public function __construct($leftExpr, $operator, $rightExpr) + { + $this->leftExpr = $leftExpr; + $this->operator = $operator; + $this->rightExpr = $rightExpr; + } + + /** + * @return mixed + */ + public function getLeftExpr() + { + return $this->leftExpr; + } + + /** + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * @return mixed + */ + public function getRightExpr() + { + return $this->rightExpr; + } + + /** + * @return string + */ + public function __toString() + { + // Adjusting Left Expression + $leftExpr = (string) $this->leftExpr; + + if ($this->leftExpr instanceof Math) { + $leftExpr = '(' . $leftExpr . ')'; + } + + // Adjusting Right Expression + $rightExpr = (string) $this->rightExpr; + + if ($this->rightExpr instanceof Math) { + $rightExpr = '(' . $rightExpr . ')'; + } + + return $leftExpr . ' ' . $this->operator . ' ' . $rightExpr; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/OrderBy.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/OrderBy.php new file mode 100644 index 0000000000000000000000000000000000000000..932548bd60317ce84cdfb2e30c67892fe5e80c7d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/OrderBy.php @@ -0,0 +1,104 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Expression class for building DQL Order By parts. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class OrderBy +{ + /** + * @var string + */ + protected $preSeparator = ''; + + /** + * @var string + */ + protected $separator = ', '; + + /** + * @var string + */ + protected $postSeparator = ''; + + /** + * @var array + */ + protected $allowedClasses = array(); + + /** + * @var array + */ + protected $parts = array(); + + /** + * @param string|null $sort + * @param string|null $order + */ + public function __construct($sort = null, $order = null) + { + if ($sort) { + $this->add($sort, $order); + } + } + + /** + * @param string $sort + * @param string|null $order + * + * @return void + */ + public function add($sort, $order = null) + { + $order = ! $order ? 'ASC' : $order; + $this->parts[] = $sort . ' '. $order; + } + + /** + * @return integer + */ + public function count() + { + return count($this->parts); + } + + /** + * @return array + */ + public function getParts() + { + return $this->parts; + } + + /** + * @return string + */ + public function __tostring() + { + return $this->preSeparator . implode($this->separator, $this->parts) . $this->postSeparator; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Orx.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Orx.php new file mode 100644 index 0000000000000000000000000000000000000000..c4ff7ae30d0f5af3ab519913d1083905577d48d8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Orx.php @@ -0,0 +1,55 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Expression class for building DQL OR clauses. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Orx extends Composite +{ + /** + * @var string + */ + protected $separator = ' OR '; + + /** + * @var array + */ + protected $allowedClasses = array( + 'Doctrine\ORM\Query\Expr\Comparison', + 'Doctrine\ORM\Query\Expr\Func', + 'Doctrine\ORM\Query\Expr\Andx', + 'Doctrine\ORM\Query\Expr\Orx', + ); + + /** + * @return array + */ + public function getParts() + { + return $this->parts; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Select.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Select.php new file mode 100644 index 0000000000000000000000000000000000000000..21df6c735d46cb7e2b40ea3687ef87f59c67a151 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Select.php @@ -0,0 +1,57 @@ +. + */ + +namespace Doctrine\ORM\Query\Expr; + +/** + * Expression class for building DQL select statements. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Select extends Base +{ + /** + * @var string + */ + protected $preSeparator = ''; + + /** + * @var string + */ + protected $postSeparator = ''; + + /** + * @var array + */ + protected $allowedClasses = array( + 'Doctrine\ORM\Query\Expr\Func' + ); + + /** + * @return array + */ + public function getParts() + { + return $this->parts; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Filter/SQLFilter.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Filter/SQLFilter.php new file mode 100644 index 0000000000000000000000000000000000000000..b0248fbac15799e7d8bb685e18e72c53dbe828ec --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Filter/SQLFilter.php @@ -0,0 +1,155 @@ +. + */ + +namespace Doctrine\ORM\Query\Filter; + +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Query\ParameterTypeInferer; + +/** + * The base class that user defined filters should extend. + * + * Handles the setting and escaping of parameters. + * + * @author Alexander + * @author Benjamin Eberlei + * @abstract + */ +abstract class SQLFilter +{ + /** + * The entity manager. + * + * @var EntityManagerInterface + */ + private $em; + + /** + * Parameters for the filter. + * + * @var array + */ + private $parameters = []; + + /** + * Constructs the SQLFilter object. + * + * @param EntityManagerInterface $em The entity manager. + */ + final public function __construct(EntityManagerInterface $em) + { + $this->em = $em; + } + + /** + * Sets a parameter that can be used by the filter. + * + * @param string $name Name of the parameter. + * @param string $value Value of the parameter. + * @param string|null $type The parameter type. If specified, the given value will be run through + * the type conversion of this type. This is usually not needed for + * strings and numeric types. + * + * @return SQLFilter The current SQL filter. + */ + final public function setParameter($name, $value, $type = null) + { + if (null === $type) { + $type = ParameterTypeInferer::inferType($value); + } + + $this->parameters[$name] = array('value' => $value, 'type' => $type); + + // Keep the parameters sorted for the hash + ksort($this->parameters); + + // The filter collection of the EM is now dirty + $this->em->getFilters()->setFiltersStateDirty(); + + return $this; + } + + /** + * Gets a parameter to use in a query. + * + * The function is responsible for the right output escaping to use the + * value in a query. + * + * @param string $name Name of the parameter. + * + * @return string The SQL escaped parameter to use in a query. + * + * @throws \InvalidArgumentException + */ + final public function getParameter($name) + { + if (!isset($this->parameters[$name])) { + throw new \InvalidArgumentException("Parameter '" . $name . "' does not exist."); + } + + return $this->em->getConnection()->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']); + } + + /** + * Checks if a parameter was set for the filter. + * + * @param string $name Name of the parameter. + * + * @return boolean + */ + final public function hasParameter($name) + { + if (!isset($this->parameters[$name])) { + return false; + } + + return true; + } + + /** + * Returns as string representation of the SQLFilter parameters (the state). + * + * @return string String representation of the SQLFilter. + */ + final public function __toString() + { + return serialize($this->parameters); + } + + /** + * Returns the database connection used by the entity manager + * + * @return \Doctrine\DBAL\Connection + */ + final protected function getConnection() + { + return $this->em->getConnection(); + } + + /** + * Gets the SQL query part to add to a query. + * + * @param ClassMetaData $targetEntity + * @param string $targetTableAlias + * + * @return string The constraint SQL if there is available, empty string otherwise. + */ + abstract public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/FilterCollection.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/FilterCollection.php new file mode 100644 index 0000000000000000000000000000000000000000..ffbaeaf1293f2b113947230e7b6003151da2ab1c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/FilterCollection.php @@ -0,0 +1,225 @@ +. + */ + +namespace Doctrine\ORM\Query; + +use Doctrine\ORM\EntityManagerInterface; + +/** + * Collection class for all the query filters. + * + * @author Alexander + */ +class FilterCollection +{ + /* Filter STATES */ + + /** + * A filter object is in CLEAN state when it has no changed parameters. + */ + const FILTERS_STATE_CLEAN = 1; + + /** + * A filter object is in DIRTY state when it has changed parameters. + */ + const FILTERS_STATE_DIRTY = 2; + + /** + * The used Configuration. + * + * @var \Doctrine\ORM\Configuration + */ + private $config; + + /** + * The EntityManager that "owns" this FilterCollection instance. + * + * @var \Doctrine\ORM\EntityManager + */ + private $em; + + /** + * Instances of enabled filters. + * + * @var \Doctrine\ORM\Query\Filter\SQLFilter[] + */ + private $enabledFilters = array(); + + /** + * @var string The filter hash from the last time the query was parsed. + */ + private $filterHash; + + /** + * @var integer The current state of this filter. + */ + private $filtersState = self::FILTERS_STATE_CLEAN; + + /** + * Constructor. + * + * @param EntityManagerInterface $em + */ + public function __construct(EntityManagerInterface $em) + { + $this->em = $em; + $this->config = $em->getConfiguration(); + } + + /** + * Gets all the enabled filters. + * + * @return \Doctrine\ORM\Query\Filter\SQLFilter[] The enabled filters. + */ + public function getEnabledFilters() + { + return $this->enabledFilters; + } + + /** + * Enables a filter from the collection. + * + * @param string $name Name of the filter. + * + * @return \Doctrine\ORM\Query\Filter\SQLFilter The enabled filter. + * + * @throws \InvalidArgumentException If the filter does not exist. + */ + public function enable($name) + { + if ( ! $this->has($name)) { + throw new \InvalidArgumentException("Filter '" . $name . "' does not exist."); + } + + if ( ! $this->isEnabled($name)) { + $filterClass = $this->config->getFilterClassName($name); + + $this->enabledFilters[$name] = new $filterClass($this->em); + + // Keep the enabled filters sorted for the hash + ksort($this->enabledFilters); + + // Now the filter collection is dirty + $this->filtersState = self::FILTERS_STATE_DIRTY; + } + + return $this->enabledFilters[$name]; + } + + /** + * Disables a filter. + * + * @param string $name Name of the filter. + * + * @return \Doctrine\ORM\Query\Filter\SQLFilter The disabled filter. + * + * @throws \InvalidArgumentException If the filter does not exist. + */ + public function disable($name) + { + // Get the filter to return it + $filter = $this->getFilter($name); + + unset($this->enabledFilters[$name]); + + // Now the filter collection is dirty + $this->filtersState = self::FILTERS_STATE_DIRTY; + + return $filter; + } + + /** + * Gets an enabled filter from the collection. + * + * @param string $name Name of the filter. + * + * @return \Doctrine\ORM\Query\Filter\SQLFilter The filter. + * + * @throws \InvalidArgumentException If the filter is not enabled. + */ + public function getFilter($name) + { + if ( ! $this->isEnabled($name)) { + throw new \InvalidArgumentException("Filter '" . $name . "' is not enabled."); + } + + return $this->enabledFilters[$name]; + } + + /** + * Checks whether filter with given name is defined. + * + * @param string $name Name of the filter. + * + * @return bool true if the filter exists, false if not. + */ + public function has($name) + { + return null !== $this->config->getFilterClassName($name); + } + + /** + * Checks if a filter is enabled. + * + * @param string $name Name of the filter. + * + * @return boolean True if the filter is enabled, false otherwise. + */ + public function isEnabled($name) + { + return isset($this->enabledFilters[$name]); + } + + /** + * @return boolean True, if the filter collection is clean. + */ + public function isClean() + { + return self::FILTERS_STATE_CLEAN === $this->filtersState; + } + + /** + * Generates a string of currently enabled filters to use for the cache id. + * + * @return string + */ + public function getHash() + { + // If there are only clean filters, the previous hash can be returned + if (self::FILTERS_STATE_CLEAN === $this->filtersState) { + return $this->filterHash; + } + + $filterHash = ''; + + foreach ($this->enabledFilters as $name => $filter) { + $filterHash .= $name . $filter; + } + + return $filterHash; + } + + /** + * Sets the filter state to dirty. + */ + public function setFiltersStateDirty() + { + $this->filtersState = self::FILTERS_STATE_DIRTY; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Lexer.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Lexer.php new file mode 100644 index 0000000000000000000000000000000000000000..d5721a7357a2e67aed72966910b8eb7a4b59d39e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Lexer.php @@ -0,0 +1,207 @@ +. + */ + +namespace Doctrine\ORM\Query; + +/** + * Scans a DQL query for tokens. + * + * @author Guilherme Blanco + * @author Janne Vanhala + * @author Roman Borschel + * @since 2.0 + */ +class Lexer extends \Doctrine\Common\Lexer +{ + // All tokens that are not valid identifiers must be < 100 + const T_NONE = 1; + const T_INTEGER = 2; + const T_STRING = 3; + const T_INPUT_PARAMETER = 4; + const T_FLOAT = 5; + const T_CLOSE_PARENTHESIS = 6; + const T_OPEN_PARENTHESIS = 7; + const T_COMMA = 8; + const T_DIVIDE = 9; + const T_DOT = 10; + const T_EQUALS = 11; + const T_GREATER_THAN = 12; + const T_LOWER_THAN = 13; + const T_MINUS = 14; + const T_MULTIPLY = 15; + const T_NEGATE = 16; + const T_PLUS = 17; + const T_OPEN_CURLY_BRACE = 18; + const T_CLOSE_CURLY_BRACE = 19; + + // All tokens that are also identifiers should be >= 100 + const T_IDENTIFIER = 100; + const T_ALL = 101; + const T_AND = 102; + const T_ANY = 103; + const T_AS = 104; + const T_ASC = 105; + const T_AVG = 106; + const T_BETWEEN = 107; + const T_BOTH = 108; + const T_BY = 109; + const T_CASE = 110; + const T_COALESCE = 111; + const T_COUNT = 112; + const T_DELETE = 113; + const T_DESC = 114; + const T_DISTINCT = 115; + const T_ELSE = 116; + const T_EMPTY = 117; + const T_END = 118; + const T_ESCAPE = 119; + const T_EXISTS = 120; + const T_FALSE = 121; + const T_FROM = 122; + const T_GROUP = 123; + const T_HAVING = 124; + const T_HIDDEN = 125; + const T_IN = 126; + const T_INDEX = 127; + const T_INNER = 128; + const T_INSTANCE = 129; + const T_IS = 130; + const T_JOIN = 131; + const T_LEADING = 132; + const T_LEFT = 133; + const T_LIKE = 134; + const T_MAX = 135; + const T_MEMBER = 136; + const T_MIN = 137; + const T_NOT = 138; + const T_NULL = 139; + const T_NULLIF = 140; + const T_OF = 141; + const T_OR = 142; + const T_ORDER = 143; + const T_OUTER = 144; + const T_SELECT = 145; + const T_SET = 146; + const T_SOME = 147; + const T_SUM = 148; + const T_THEN = 149; + const T_TRAILING = 150; + const T_TRUE = 151; + const T_UPDATE = 152; + const T_WHEN = 153; + const T_WHERE = 154; + const T_WITH = 155; + const T_PARTIAL = 156; + const T_NEW = 157; + + /** + * Creates a new query scanner object. + * + * @param string $input A query string. + */ + public function __construct($input) + { + $this->setInput($input); + } + + /** + * @inheritdoc + */ + protected function getCatchablePatterns() + { + return array( + '[a-z_\\\][a-z0-9_\:\\\]*[a-z0-9_]{1}', + '(?:[0-9]+(?:[\.][0-9]+)*)(?:e[+-]?[0-9]+)?', + "'(?:[^']|'')*'", + '\?[0-9]*|:[a-z_][a-z0-9_]*' + ); + } + + /** + * @inheritdoc + */ + protected function getNonCatchablePatterns() + { + return array('\s+', '(.)'); + } + + /** + * @inheritdoc + */ + protected function getType(&$value) + { + $type = self::T_NONE; + + switch (true) { + // Recognize numeric values + case (is_numeric($value)): + if (strpos($value, '.') !== false || stripos($value, 'e') !== false) { + return self::T_FLOAT; + } + + return self::T_INTEGER; + + // Recognize quoted strings + case ($value[0] === "'"): + $value = str_replace("''", "'", substr($value, 1, strlen($value) - 2)); + + return self::T_STRING; + + // Recognize identifiers + case (ctype_alpha($value[0]) || $value[0] === '_'): + $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value); + + if (defined($name)) { + $type = constant($name); + + if ($type > 100) { + return $type; + } + } + + return self::T_IDENTIFIER; + + // Recognize input parameters + case ($value[0] === '?' || $value[0] === ':'): + return self::T_INPUT_PARAMETER; + + // Recognize symbols + case ($value === '.'): return self::T_DOT; + case ($value === ','): return self::T_COMMA; + case ($value === '('): return self::T_OPEN_PARENTHESIS; + case ($value === ')'): return self::T_CLOSE_PARENTHESIS; + case ($value === '='): return self::T_EQUALS; + case ($value === '>'): return self::T_GREATER_THAN; + case ($value === '<'): return self::T_LOWER_THAN; + case ($value === '+'): return self::T_PLUS; + case ($value === '-'): return self::T_MINUS; + case ($value === '*'): return self::T_MULTIPLY; + case ($value === '/'): return self::T_DIVIDE; + case ($value === '!'): return self::T_NEGATE; + case ($value === '{'): return self::T_OPEN_CURLY_BRACE; + case ($value === '}'): return self::T_CLOSE_CURLY_BRACE; + + // Default + default: + // Do nothing + } + + return $type; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parameter.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parameter.php new file mode 100644 index 0000000000000000000000000000000000000000..39e2a7a4f2164ef365e7069821b4ba87716c2600 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parameter.php @@ -0,0 +1,107 @@ +. + */ + +namespace Doctrine\ORM\Query; + +/** + * Defines a Query Parameter. + * + * @link www.doctrine-project.org + * @since 2.3 + * @author Guilherme Blanco + */ +class Parameter +{ + /** + * The parameter name. + * + * @var string + */ + private $name; + + /** + * The parameter value. + * + * @var mixed + */ + private $value; + + /** + * The parameter type. + * + * @var mixed + */ + private $type; + + /** + * Constructor. + * + * @param string $name Parameter name + * @param mixed $value Parameter value + * @param mixed $type Parameter type + */ + public function __construct($name, $value, $type = null) + { + $this->name = trim($name, ':'); + + $this->setValue($value, $type); + } + + /** + * Retrieves the Parameter name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Retrieves the Parameter value. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Retrieves the Parameter type. + * + * @return mixed + */ + public function getType() + { + return $this->type; + } + + /** + * Defines the Parameter value. + * + * @param mixed $value Parameter value. + * @param mixed $type Parameter type. + */ + public function setValue($value, $type = null) + { + $this->value = $value; + $this->type = $type ?: ParameterTypeInferer::inferType($value); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ParameterTypeInferer.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ParameterTypeInferer.php new file mode 100644 index 0000000000000000000000000000000000000000..a12a559a730cb4e74801bc60f2e2710ae6bb5654 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ParameterTypeInferer.php @@ -0,0 +1,68 @@ +. + */ + +namespace Doctrine\ORM\Query; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Types\Type; + +/** + * Provides an enclosed support for parameter inferring. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ParameterTypeInferer +{ + /** + * Infers type of a given value, returning a compatible constant: + * - Type (\Doctrine\DBAL\Types\Type::*) + * - Connection (\Doctrine\DBAL\Connection::PARAM_*) + * + * @param mixed $value Parameter value. + * + * @return mixed Parameter type constant. + */ + public static function inferType($value) + { + if (is_integer($value)) { + return Type::INTEGER; + } + + if (is_bool($value)) { + return Type::BOOLEAN; + } + + if ($value instanceof \DateTime || $value instanceof \DateTimeInterface) { + return Type::DATETIME; + } + + if (is_array($value)) { + return is_integer(current($value)) + ? Connection::PARAM_INT_ARRAY + : Connection::PARAM_STR_ARRAY; + } + + return \PDO::PARAM_STR; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php new file mode 100644 index 0000000000000000000000000000000000000000..695e7ed1089b4537186eb1f8d65554721f07bab1 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php @@ -0,0 +1,3504 @@ +. + */ + +namespace Doctrine\ORM\Query; + +use Doctrine\ORM\Query; +use Doctrine\ORM\Mapping\ClassMetadata; + +/** + * An LL(*) recursive-descent parser for the context-free grammar of the Doctrine Query Language. + * Parses a DQL query, reports any errors in it, and generates an AST. + * + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Janne Vanhala + * @author Fabio B. Silva + */ +class Parser +{ + /** + * READ-ONLY: Maps BUILT-IN string function names to AST class names. + * + * @var array + */ + private static $_STRING_FUNCTIONS = array( + 'concat' => 'Doctrine\ORM\Query\AST\Functions\ConcatFunction', + 'substring' => 'Doctrine\ORM\Query\AST\Functions\SubstringFunction', + 'trim' => 'Doctrine\ORM\Query\AST\Functions\TrimFunction', + 'lower' => 'Doctrine\ORM\Query\AST\Functions\LowerFunction', + 'upper' => 'Doctrine\ORM\Query\AST\Functions\UpperFunction', + 'identity' => 'Doctrine\ORM\Query\AST\Functions\IdentityFunction', + ); + + /** + * READ-ONLY: Maps BUILT-IN numeric function names to AST class names. + * + * @var array + */ + private static $_NUMERIC_FUNCTIONS = array( + 'length' => 'Doctrine\ORM\Query\AST\Functions\LengthFunction', + 'locate' => 'Doctrine\ORM\Query\AST\Functions\LocateFunction', + 'abs' => 'Doctrine\ORM\Query\AST\Functions\AbsFunction', + 'sqrt' => 'Doctrine\ORM\Query\AST\Functions\SqrtFunction', + 'mod' => 'Doctrine\ORM\Query\AST\Functions\ModFunction', + 'size' => 'Doctrine\ORM\Query\AST\Functions\SizeFunction', + 'date_diff' => 'Doctrine\ORM\Query\AST\Functions\DateDiffFunction', + 'bit_and' => 'Doctrine\ORM\Query\AST\Functions\BitAndFunction', + 'bit_or' => 'Doctrine\ORM\Query\AST\Functions\BitOrFunction', + ); + + /** + * READ-ONLY: Maps BUILT-IN datetime function names to AST class names. + * + * @var array + */ + private static $_DATETIME_FUNCTIONS = array( + 'current_date' => 'Doctrine\ORM\Query\AST\Functions\CurrentDateFunction', + 'current_time' => 'Doctrine\ORM\Query\AST\Functions\CurrentTimeFunction', + 'current_timestamp' => 'Doctrine\ORM\Query\AST\Functions\CurrentTimestampFunction', + 'date_add' => 'Doctrine\ORM\Query\AST\Functions\DateAddFunction', + 'date_sub' => 'Doctrine\ORM\Query\AST\Functions\DateSubFunction', + ); + + /* + * Expressions that were encountered during parsing of identifiers and expressions + * and still need to be validated. + */ + + /** + * @var array + */ + private $deferredIdentificationVariables = array(); + + /** + * @var array + */ + private $deferredPartialObjectExpressions = array(); + + /** + * @var array + */ + private $deferredPathExpressions = array(); + + /** + * @var array + */ + private $deferredResultVariables = array(); + + /** + * @var array + */ + private $deferredNewObjectExpressions = array(); + + /** + * The lexer. + * + * @var \Doctrine\ORM\Query\Lexer + */ + private $lexer; + + /** + * The parser result. + * + * @var \Doctrine\ORM\Query\ParserResult + */ + private $parserResult; + + /** + * The EntityManager. + * + * @var \Doctrine\ORM\EntityManager + */ + private $em; + + /** + * The Query to parse. + * + * @var Query + */ + private $query; + + /** + * Map of declared query components in the parsed query. + * + * @var array + */ + private $queryComponents = array(); + + /** + * Keeps the nesting level of defined ResultVariables. + * + * @var integer + */ + private $nestingLevel = 0; + + /** + * Any additional custom tree walkers that modify the AST. + * + * @var array + */ + private $customTreeWalkers = array(); + + /** + * The custom last tree walker, if any, that is responsible for producing the output. + * + * @var TreeWalker + */ + private $customOutputWalker; + + /** + * @var array + */ + private $identVariableExpressions = array(); + + /** + * Checks if a function is internally defined. Used to prevent overwriting + * of built-in functions through user-defined functions. + * + * @param string $functionName + * + * @return bool + */ + static public function isInternalFunction($functionName) + { + $functionName = strtolower($functionName); + + return isset(self::$_STRING_FUNCTIONS[$functionName]) + || isset(self::$_DATETIME_FUNCTIONS[$functionName]) + || isset(self::$_NUMERIC_FUNCTIONS[$functionName]); + } + + /** + * Creates a new query parser object. + * + * @param Query $query The Query to parse. + */ + public function __construct(Query $query) + { + $this->query = $query; + $this->em = $query->getEntityManager(); + $this->lexer = new Lexer($query->getDql()); + $this->parserResult = new ParserResult(); + } + + /** + * Sets a custom tree walker that produces output. + * This tree walker will be run last over the AST, after any other walkers. + * + * @param string $className + * + * @return void + */ + public function setCustomOutputTreeWalker($className) + { + $this->customOutputWalker = $className; + } + + /** + * Adds a custom tree walker for modifying the AST. + * + * @param string $className + * + * @return void + */ + public function addCustomTreeWalker($className) + { + $this->customTreeWalkers[] = $className; + } + + /** + * Gets the lexer used by the parser. + * + * @return \Doctrine\ORM\Query\Lexer + */ + public function getLexer() + { + return $this->lexer; + } + + /** + * Gets the ParserResult that is being filled with information during parsing. + * + * @return \Doctrine\ORM\Query\ParserResult + */ + public function getParserResult() + { + return $this->parserResult; + } + + /** + * Gets the EntityManager used by the parser. + * + * @return \Doctrine\ORM\EntityManager + */ + public function getEntityManager() + { + return $this->em; + } + + /** + * Parses and builds AST for the given Query. + * + * @return \Doctrine\ORM\Query\AST\SelectStatement | + * \Doctrine\ORM\Query\AST\UpdateStatement | + * \Doctrine\ORM\Query\AST\DeleteStatement + */ + public function getAST() + { + // Parse & build AST + $AST = $this->QueryLanguage(); + + // Process any deferred validations of some nodes in the AST. + // This also allows post-processing of the AST for modification purposes. + $this->processDeferredIdentificationVariables(); + + if ($this->deferredPartialObjectExpressions) { + $this->processDeferredPartialObjectExpressions(); + } + + if ($this->deferredPathExpressions) { + $this->processDeferredPathExpressions($AST); + } + + if ($this->deferredResultVariables) { + $this->processDeferredResultVariables(); + } + + if ($this->deferredNewObjectExpressions) { + $this->processDeferredNewObjectExpressions($AST); + } + + $this->processRootEntityAliasSelected(); + + // TODO: Is there a way to remove this? It may impact the mixed hydration resultset a lot! + $this->fixIdentificationVariableOrder($AST); + + return $AST; + } + + /** + * Attempts to match the given token with the current lookahead token. + * + * If they match, updates the lookahead token; otherwise raises a syntax + * error. + * + * @param int $token The token type. + * + * @return void + * + * @throws QueryException If the tokens don't match. + */ + public function match($token) + { + $lookaheadType = $this->lexer->lookahead['type']; + + // short-circuit on first condition, usually types match + if ($lookaheadType !== $token && $token !== Lexer::T_IDENTIFIER && $lookaheadType <= Lexer::T_IDENTIFIER) { + $this->syntaxError($this->lexer->getLiteral($token)); + } + + $this->lexer->moveNext(); + } + + /** + * Frees this parser, enabling it to be reused. + * + * @param boolean $deep Whether to clean peek and reset errors. + * @param integer $position Position to reset. + * + * @return void + */ + public function free($deep = false, $position = 0) + { + // WARNING! Use this method with care. It resets the scanner! + $this->lexer->resetPosition($position); + + // Deep = true cleans peek and also any previously defined errors + if ($deep) { + $this->lexer->resetPeek(); + } + + $this->lexer->token = null; + $this->lexer->lookahead = null; + } + + /** + * Parses a query string. + * + * @return ParserResult + */ + public function parse() + { + $AST = $this->getAST(); + + if (($customWalkers = $this->query->getHint(Query::HINT_CUSTOM_TREE_WALKERS)) !== false) { + $this->customTreeWalkers = $customWalkers; + } + + if (($customOutputWalker = $this->query->getHint(Query::HINT_CUSTOM_OUTPUT_WALKER)) !== false) { + $this->customOutputWalker = $customOutputWalker; + } + + // Run any custom tree walkers over the AST + if ($this->customTreeWalkers) { + $treeWalkerChain = new TreeWalkerChain($this->query, $this->parserResult, $this->queryComponents); + + foreach ($this->customTreeWalkers as $walker) { + $treeWalkerChain->addTreeWalker($walker); + } + + switch (true) { + case ($AST instanceof AST\UpdateStatement): + $treeWalkerChain->walkUpdateStatement($AST); + break; + + case ($AST instanceof AST\DeleteStatement): + $treeWalkerChain->walkDeleteStatement($AST); + break; + + case ($AST instanceof AST\SelectStatement): + default: + $treeWalkerChain->walkSelectStatement($AST); + } + + $this->queryComponents = $treeWalkerChain->getQueryComponents(); + } + + $outputWalkerClass = $this->customOutputWalker ?: __NAMESPACE__ . '\SqlWalker'; + $outputWalker = new $outputWalkerClass($this->query, $this->parserResult, $this->queryComponents); + + // Assign an SQL executor to the parser result + $this->parserResult->setSqlExecutor($outputWalker->getExecutor($AST)); + + return $this->parserResult; + } + + /** + * Fixes order of identification variables. + * + * They have to appear in the select clause in the same order as the + * declarations (from ... x join ... y join ... z ...) appear in the query + * as the hydration process relies on that order for proper operation. + * + * @param AST\SelectStatement|AST\DeleteStatement|AST\UpdateStatement $AST + * + * @return void + */ + private function fixIdentificationVariableOrder($AST) + { + if (count($this->identVariableExpressions) <= 1) { + return; + } + + foreach ($this->queryComponents as $dqlAlias => $qComp) { + if ( ! isset($this->identVariableExpressions[$dqlAlias])) { + continue; + } + + $expr = $this->identVariableExpressions[$dqlAlias]; + $key = array_search($expr, $AST->selectClause->selectExpressions); + + unset($AST->selectClause->selectExpressions[$key]); + + $AST->selectClause->selectExpressions[] = $expr; + } + } + + /** + * Generates a new syntax error. + * + * @param string $expected Expected string. + * @param array|null $token Got token. + * + * @return void + * + * @throws \Doctrine\ORM\Query\QueryException + */ + public function syntaxError($expected = '', $token = null) + { + if ($token === null) { + $token = $this->lexer->lookahead; + } + + $tokenPos = (isset($token['position'])) ? $token['position'] : '-1'; + + $message = "line 0, col {$tokenPos}: Error: "; + $message .= ($expected !== '') ? "Expected {$expected}, got " : 'Unexpected '; + $message .= ($this->lexer->lookahead === null) ? 'end of string.' : "'{$token['value']}'"; + + throw QueryException::syntaxError($message, QueryException::dqlError($this->query->getDQL())); + } + + /** + * Generates a new semantical error. + * + * @param string $message Optional message. + * @param array|null $token Optional token. + * + * @return void + * + * @throws \Doctrine\ORM\Query\QueryException + */ + public function semanticalError($message = '', $token = null) + { + if ($token === null) { + $token = $this->lexer->lookahead; + } + + // Minimum exposed chars ahead of token + $distance = 12; + + // Find a position of a final word to display in error string + $dql = $this->query->getDql(); + $length = strlen($dql); + $pos = $token['position'] + $distance; + $pos = strpos($dql, ' ', ($length > $pos) ? $pos : $length); + $length = ($pos !== false) ? $pos - $token['position'] : $distance; + + $tokenPos = (isset($token['position']) && $token['position'] > 0) ? $token['position'] : '-1'; + $tokenStr = substr($dql, $token['position'], $length); + + // Building informative message + $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message; + + throw QueryException::semanticalError($message, QueryException::dqlError($this->query->getDQL())); + } + + /** + * Peeks beyond the matched closing parenthesis and returns the first token after that one. + * + * @param boolean $resetPeek Reset peek after finding the closing parenthesis. + * + * @return array + */ + private function peekBeyondClosingParenthesis($resetPeek = true) + { + $token = $this->lexer->peek(); + $numUnmatched = 1; + + while ($numUnmatched > 0 && $token !== null) { + switch ($token['type']) { + case Lexer::T_OPEN_PARENTHESIS: + ++$numUnmatched; + break; + + case Lexer::T_CLOSE_PARENTHESIS: + --$numUnmatched; + break; + + default: + // Do nothing + } + + $token = $this->lexer->peek(); + } + + if ($resetPeek) { + $this->lexer->resetPeek(); + } + + return $token; + } + + /** + * Checks if the given token indicates a mathematical operator. + * + * @param array $token + * + * @return boolean TRUE if the token is a mathematical operator, FALSE otherwise. + */ + private function isMathOperator($token) + { + return in_array($token['type'], array(Lexer::T_PLUS, Lexer::T_MINUS, Lexer::T_DIVIDE, Lexer::T_MULTIPLY)); + } + + /** + * Checks if the next-next (after lookahead) token starts a function. + * + * @return boolean TRUE if the next-next tokens start a function, FALSE otherwise. + */ + private function isFunction() + { + $lookaheadType = $this->lexer->lookahead['type']; + $peek = $this->lexer->peek(); + + $this->lexer->resetPeek(); + + return ($lookaheadType >= Lexer::T_IDENTIFIER && $peek['type'] === Lexer::T_OPEN_PARENTHESIS); + } + + /** + * Checks whether the given token type indicates an aggregate function. + * + * @param int $tokenType + * + * @return boolean TRUE if the token type is an aggregate function, FALSE otherwise. + */ + private function isAggregateFunction($tokenType) + { + return in_array($tokenType, array(Lexer::T_AVG, Lexer::T_MIN, Lexer::T_MAX, Lexer::T_SUM, Lexer::T_COUNT)); + } + + /** + * Checks whether the current lookahead token of the lexer has the type T_ALL, T_ANY or T_SOME. + * + * @return boolean + */ + private function isNextAllAnySome() + { + return in_array($this->lexer->lookahead['type'], array(Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME)); + } + + /** + * Validates that the given IdentificationVariable is semantically correct. + * It must exist in query components list. + * + * @return void + */ + private function processDeferredIdentificationVariables() + { + foreach ($this->deferredIdentificationVariables as $deferredItem) { + $identVariable = $deferredItem['expression']; + + // Check if IdentificationVariable exists in queryComponents + if ( ! isset($this->queryComponents[$identVariable])) { + $this->semanticalError( + "'$identVariable' is not defined.", $deferredItem['token'] + ); + } + + $qComp = $this->queryComponents[$identVariable]; + + // Check if queryComponent points to an AbstractSchemaName or a ResultVariable + if ( ! isset($qComp['metadata'])) { + $this->semanticalError( + "'$identVariable' does not point to a Class.", $deferredItem['token'] + ); + } + + // Validate if identification variable nesting level is lower or equal than the current one + if ($qComp['nestingLevel'] > $deferredItem['nestingLevel']) { + $this->semanticalError( + "'$identVariable' is used outside the scope of its declaration.", $deferredItem['token'] + ); + } + } + } + + /** + * Validates that the given NewObjectExpression. + * + * @param \Doctrine\ORM\Query\AST\SelectClause $AST + * + * @return void + */ + private function processDeferredNewObjectExpressions($AST) + { + foreach ($this->deferredNewObjectExpressions as $deferredItem) { + $expression = $deferredItem['expression']; + $token = $deferredItem['token']; + $className = $expression->className; + $args = $expression->args; + $fromClassName = isset($AST->fromClause->identificationVariableDeclarations[0]->rangeVariableDeclaration->abstractSchemaName) + ? $AST->fromClause->identificationVariableDeclarations[0]->rangeVariableDeclaration->abstractSchemaName + : null; + + // If the namespace is not given then assumes the first FROM entity namespace + if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) { + $namespace = substr($fromClassName, 0 , strrpos($fromClassName, '\\')); + $fqcn = $namespace . '\\' . $className; + + if (class_exists($fqcn)) { + $expression->className = $fqcn; + $className = $fqcn; + } + } + + if ( ! class_exists($className)) { + $this->semanticalError(sprintf('Class "%s" is not defined.', $className), $token); + } + + $class = new \ReflectionClass($className); + + if ( ! $class->isInstantiable()) { + $this->semanticalError(sprintf('Class "%s" can not be instantiated.', $className), $token); + } + + if ($class->getConstructor() === null) { + $this->semanticalError(sprintf('Class "%s" has not a valid constructor.', $className), $token); + } + + if ($class->getConstructor()->getNumberOfRequiredParameters() > count($args)) { + $this->semanticalError(sprintf('Number of arguments does not match with "%s" constructor declaration.', $className), $token); + } + } + } + + /** + * Validates that the given PartialObjectExpression is semantically correct. + * It must exist in query components list. + * + * @return void + */ + private function processDeferredPartialObjectExpressions() + { + foreach ($this->deferredPartialObjectExpressions as $deferredItem) { + $expr = $deferredItem['expression']; + $class = $this->queryComponents[$expr->identificationVariable]['metadata']; + + foreach ($expr->partialFieldSet as $field) { + if (isset($class->fieldMappings[$field])) { + continue; + } + + if (isset($class->associationMappings[$field]) && + $class->associationMappings[$field]['isOwningSide'] && + $class->associationMappings[$field]['type'] & ClassMetadata::TO_ONE) { + continue; + } + + $this->semanticalError( + "There is no mapped field named '$field' on class " . $class->name . ".", $deferredItem['token'] + ); + } + + if (array_intersect($class->identifier, $expr->partialFieldSet) != $class->identifier) { + $this->semanticalError( + "The partial field selection of class " . $class->name . " must contain the identifier.", + $deferredItem['token'] + ); + } + } + } + + /** + * Validates that the given ResultVariable is semantically correct. + * It must exist in query components list. + * + * @return void + */ + private function processDeferredResultVariables() + { + foreach ($this->deferredResultVariables as $deferredItem) { + $resultVariable = $deferredItem['expression']; + + // Check if ResultVariable exists in queryComponents + if ( ! isset($this->queryComponents[$resultVariable])) { + $this->semanticalError( + "'$resultVariable' is not defined.", $deferredItem['token'] + ); + } + + $qComp = $this->queryComponents[$resultVariable]; + + // Check if queryComponent points to an AbstractSchemaName or a ResultVariable + if ( ! isset($qComp['resultVariable'])) { + $this->semanticalError( + "'$resultVariable' does not point to a ResultVariable.", $deferredItem['token'] + ); + } + + // Validate if identification variable nesting level is lower or equal than the current one + if ($qComp['nestingLevel'] > $deferredItem['nestingLevel']) { + $this->semanticalError( + "'$resultVariable' is used outside the scope of its declaration.", $deferredItem['token'] + ); + } + } + } + + /** + * Validates that the given PathExpression is semantically correct for grammar rules: + * + * AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression + * SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression + * StateFieldPathExpression ::= IdentificationVariable "." StateField + * SingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField + * CollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField + * + * @param mixed $AST + * + * @return void + */ + private function processDeferredPathExpressions($AST) + { + foreach ($this->deferredPathExpressions as $deferredItem) { + $pathExpression = $deferredItem['expression']; + + $qComp = $this->queryComponents[$pathExpression->identificationVariable]; + $class = $qComp['metadata']; + + if (($field = $pathExpression->field) === null) { + $field = $pathExpression->field = $class->identifier[0]; + } + + // Check if field or association exists + if ( ! isset($class->associationMappings[$field]) && ! isset($class->fieldMappings[$field])) { + $this->semanticalError( + 'Class ' . $class->name . ' has no field or association named ' . $field, + $deferredItem['token'] + ); + } + + $fieldType = AST\PathExpression::TYPE_STATE_FIELD; + + if (isset($class->associationMappings[$field])) { + $assoc = $class->associationMappings[$field]; + + $fieldType = ($assoc['type'] & ClassMetadata::TO_ONE) + ? AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION + : AST\PathExpression::TYPE_COLLECTION_VALUED_ASSOCIATION; + } + + // Validate if PathExpression is one of the expected types + $expectedType = $pathExpression->expectedType; + + if ( ! ($expectedType & $fieldType)) { + // We need to recognize which was expected type(s) + $expectedStringTypes = array(); + + // Validate state field type + if ($expectedType & AST\PathExpression::TYPE_STATE_FIELD) { + $expectedStringTypes[] = 'StateFieldPathExpression'; + } + + // Validate single valued association (*-to-one) + if ($expectedType & AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION) { + $expectedStringTypes[] = 'SingleValuedAssociationField'; + } + + // Validate single valued association (*-to-many) + if ($expectedType & AST\PathExpression::TYPE_COLLECTION_VALUED_ASSOCIATION) { + $expectedStringTypes[] = 'CollectionValuedAssociationField'; + } + + // Build the error message + $semanticalError = 'Invalid PathExpression. '; + $semanticalError .= (count($expectedStringTypes) == 1) + ? 'Must be a ' . $expectedStringTypes[0] . '.' + : implode(' or ', $expectedStringTypes) . ' expected.'; + + $this->semanticalError($semanticalError, $deferredItem['token']); + } + + // We need to force the type in PathExpression + $pathExpression->type = $fieldType; + } + } + + /** + * @return void + */ + private function processRootEntityAliasSelected() + { + if ( ! count($this->identVariableExpressions)) { + return; + } + + $foundRootEntity = false; + + foreach ($this->identVariableExpressions as $dqlAlias => $expr) { + if (isset($this->queryComponents[$dqlAlias]) && $this->queryComponents[$dqlAlias]['parent'] === null) { + $foundRootEntity = true; + } + } + + if ( ! $foundRootEntity) { + $this->semanticalError('Cannot select entity through identification variables without choosing at least one root entity alias.'); + } + } + + /** + * QueryLanguage ::= SelectStatement | UpdateStatement | DeleteStatement + * + * @return \Doctrine\ORM\Query\AST\SelectStatement | + * \Doctrine\ORM\Query\AST\UpdateStatement | + * \Doctrine\ORM\Query\AST\DeleteStatement + */ + public function QueryLanguage() + { + $this->lexer->moveNext(); + + switch ($this->lexer->lookahead['type']) { + case Lexer::T_SELECT: + $statement = $this->SelectStatement(); + break; + + case Lexer::T_UPDATE: + $statement = $this->UpdateStatement(); + break; + + case Lexer::T_DELETE: + $statement = $this->DeleteStatement(); + break; + + default: + $this->syntaxError('SELECT, UPDATE or DELETE'); + break; + } + + // Check for end of string + if ($this->lexer->lookahead !== null) { + $this->syntaxError('end of string'); + } + + return $statement; + } + + /** + * SelectStatement ::= SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] + * + * @return \Doctrine\ORM\Query\AST\SelectStatement + */ + public function SelectStatement() + { + $selectStatement = new AST\SelectStatement($this->SelectClause(), $this->FromClause()); + + $selectStatement->whereClause = $this->lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null; + $selectStatement->groupByClause = $this->lexer->isNextToken(Lexer::T_GROUP) ? $this->GroupByClause() : null; + $selectStatement->havingClause = $this->lexer->isNextToken(Lexer::T_HAVING) ? $this->HavingClause() : null; + $selectStatement->orderByClause = $this->lexer->isNextToken(Lexer::T_ORDER) ? $this->OrderByClause() : null; + + return $selectStatement; + } + + /** + * UpdateStatement ::= UpdateClause [WhereClause] + * + * @return \Doctrine\ORM\Query\AST\UpdateStatement + */ + public function UpdateStatement() + { + $updateStatement = new AST\UpdateStatement($this->UpdateClause()); + + $updateStatement->whereClause = $this->lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null; + + return $updateStatement; + } + + /** + * DeleteStatement ::= DeleteClause [WhereClause] + * + * @return \Doctrine\ORM\Query\AST\DeleteStatement + */ + public function DeleteStatement() + { + $deleteStatement = new AST\DeleteStatement($this->DeleteClause()); + + $deleteStatement->whereClause = $this->lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null; + + return $deleteStatement; + } + + /** + * IdentificationVariable ::= identifier + * + * @return string + */ + public function IdentificationVariable() + { + $this->match(Lexer::T_IDENTIFIER); + + $identVariable = $this->lexer->token['value']; + + $this->deferredIdentificationVariables[] = array( + 'expression' => $identVariable, + 'nestingLevel' => $this->nestingLevel, + 'token' => $this->lexer->token, + ); + + return $identVariable; + } + + /** + * AliasIdentificationVariable = identifier + * + * @return string + */ + public function AliasIdentificationVariable() + { + $this->match(Lexer::T_IDENTIFIER); + + $aliasIdentVariable = $this->lexer->token['value']; + $exists = isset($this->queryComponents[$aliasIdentVariable]); + + if ($exists) { + $this->semanticalError("'$aliasIdentVariable' is already defined.", $this->lexer->token); + } + + return $aliasIdentVariable; + } + + /** + * AbstractSchemaName ::= identifier + * + * @return string + */ + public function AbstractSchemaName() + { + $this->match(Lexer::T_IDENTIFIER); + + $schemaName = ltrim($this->lexer->token['value'], '\\'); + + if (strrpos($schemaName, ':') !== false) { + list($namespaceAlias, $simpleClassName) = explode(':', $schemaName); + + $schemaName = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; + } + + $exists = class_exists($schemaName, true) || interface_exists($schemaName, true); + + if ( ! $exists) { + $this->semanticalError("Class '$schemaName' is not defined.", $this->lexer->token); + } + + return $schemaName; + } + + /** + * AliasResultVariable ::= identifier + * + * @return string + */ + public function AliasResultVariable() + { + $this->match(Lexer::T_IDENTIFIER); + + $resultVariable = $this->lexer->token['value']; + $exists = isset($this->queryComponents[$resultVariable]); + + if ($exists) { + $this->semanticalError("'$resultVariable' is already defined.", $this->lexer->token); + } + + return $resultVariable; + } + + /** + * ResultVariable ::= identifier + * + * @return string + */ + public function ResultVariable() + { + $this->match(Lexer::T_IDENTIFIER); + + $resultVariable = $this->lexer->token['value']; + + // Defer ResultVariable validation + $this->deferredResultVariables[] = array( + 'expression' => $resultVariable, + 'nestingLevel' => $this->nestingLevel, + 'token' => $this->lexer->token, + ); + + return $resultVariable; + } + + /** + * JoinAssociationPathExpression ::= IdentificationVariable "." (CollectionValuedAssociationField | SingleValuedAssociationField) + * + * @return \Doctrine\ORM\Query\AST\JoinAssociationPathExpression + */ + public function JoinAssociationPathExpression() + { + $identVariable = $this->IdentificationVariable(); + + if ( ! isset($this->queryComponents[$identVariable])) { + $this->semanticalError( + 'Identification Variable ' . $identVariable .' used in join path expression but was not defined before.' + ); + } + + $this->match(Lexer::T_DOT); + $this->match(Lexer::T_IDENTIFIER); + + $field = $this->lexer->token['value']; + + // Validate association field + $qComp = $this->queryComponents[$identVariable]; + $class = $qComp['metadata']; + + if ( ! $class->hasAssociation($field)) { + $this->semanticalError('Class ' . $class->name . ' has no association named ' . $field); + } + + return new AST\JoinAssociationPathExpression($identVariable, $field); + } + + /** + * Parses an arbitrary path expression and defers semantical validation + * based on expected types. + * + * PathExpression ::= IdentificationVariable {"." identifier}* + * + * @param integer $expectedTypes + * + * @return \Doctrine\ORM\Query\AST\PathExpression + */ + public function PathExpression($expectedTypes) + { + $identVariable = $this->IdentificationVariable(); + $field = null; + + if ($this->lexer->isNextToken(Lexer::T_DOT)) { + $this->match(Lexer::T_DOT); + $this->match(Lexer::T_IDENTIFIER); + + $field = $this->lexer->token['value']; + + while ($this->lexer->isNextToken(Lexer::T_DOT)) { + $this->match(Lexer::T_DOT); + $this->match(Lexer::T_IDENTIFIER); + $field .= '.'.$this->lexer->token['value']; + } + } + + // Creating AST node + $pathExpr = new AST\PathExpression($expectedTypes, $identVariable, $field); + + // Defer PathExpression validation if requested to be deferred + $this->deferredPathExpressions[] = array( + 'expression' => $pathExpr, + 'nestingLevel' => $this->nestingLevel, + 'token' => $this->lexer->token, + ); + + return $pathExpr; + } + + /** + * AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression + * + * @return \Doctrine\ORM\Query\AST\PathExpression + */ + public function AssociationPathExpression() + { + return $this->PathExpression( + AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION | + AST\PathExpression::TYPE_COLLECTION_VALUED_ASSOCIATION + ); + } + + /** + * SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression + * + * @return \Doctrine\ORM\Query\AST\PathExpression + */ + public function SingleValuedPathExpression() + { + return $this->PathExpression( + AST\PathExpression::TYPE_STATE_FIELD | + AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION + ); + } + + /** + * StateFieldPathExpression ::= IdentificationVariable "." StateField + * + * @return \Doctrine\ORM\Query\AST\PathExpression + */ + public function StateFieldPathExpression() + { + return $this->PathExpression(AST\PathExpression::TYPE_STATE_FIELD); + } + + /** + * SingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField + * + * @return \Doctrine\ORM\Query\AST\PathExpression + */ + public function SingleValuedAssociationPathExpression() + { + return $this->PathExpression(AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION); + } + + /** + * CollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField + * + * @return \Doctrine\ORM\Query\AST\PathExpression + */ + public function CollectionValuedPathExpression() + { + return $this->PathExpression(AST\PathExpression::TYPE_COLLECTION_VALUED_ASSOCIATION); + } + + /** + * SelectClause ::= "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression} + * + * @return \Doctrine\ORM\Query\AST\SelectClause + */ + public function SelectClause() + { + $isDistinct = false; + $this->match(Lexer::T_SELECT); + + // Check for DISTINCT + if ($this->lexer->isNextToken(Lexer::T_DISTINCT)) { + $this->match(Lexer::T_DISTINCT); + + $isDistinct = true; + } + + // Process SelectExpressions (1..N) + $selectExpressions = array(); + $selectExpressions[] = $this->SelectExpression(); + + while ($this->lexer->isNextToken(Lexer::T_COMMA)) { + $this->match(Lexer::T_COMMA); + + $selectExpressions[] = $this->SelectExpression(); + } + + return new AST\SelectClause($selectExpressions, $isDistinct); + } + + /** + * SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression + * + * @return \Doctrine\ORM\Query\AST\SimpleSelectClause + */ + public function SimpleSelectClause() + { + $isDistinct = false; + $this->match(Lexer::T_SELECT); + + if ($this->lexer->isNextToken(Lexer::T_DISTINCT)) { + $this->match(Lexer::T_DISTINCT); + + $isDistinct = true; + } + + return new AST\SimpleSelectClause($this->SimpleSelectExpression(), $isDistinct); + } + + /** + * UpdateClause ::= "UPDATE" AbstractSchemaName ["AS"] AliasIdentificationVariable "SET" UpdateItem {"," UpdateItem}* + * + * @return \Doctrine\ORM\Query\AST\UpdateClause + */ + public function UpdateClause() + { + $this->match(Lexer::T_UPDATE); + $token = $this->lexer->lookahead; + $abstractSchemaName = $this->AbstractSchemaName(); + + if ($this->lexer->isNextToken(Lexer::T_AS)) { + $this->match(Lexer::T_AS); + } + + $aliasIdentificationVariable = $this->AliasIdentificationVariable(); + + $class = $this->em->getClassMetadata($abstractSchemaName); + + // Building queryComponent + $queryComponent = array( + 'metadata' => $class, + 'parent' => null, + 'relation' => null, + 'map' => null, + 'nestingLevel' => $this->nestingLevel, + 'token' => $token, + ); + + $this->queryComponents[$aliasIdentificationVariable] = $queryComponent; + + $this->match(Lexer::T_SET); + + $updateItems = array(); + $updateItems[] = $this->UpdateItem(); + + while ($this->lexer->isNextToken(Lexer::T_COMMA)) { + $this->match(Lexer::T_COMMA); + + $updateItems[] = $this->UpdateItem(); + } + + $updateClause = new AST\UpdateClause($abstractSchemaName, $updateItems); + $updateClause->aliasIdentificationVariable = $aliasIdentificationVariable; + + return $updateClause; + } + + /** + * DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName ["AS"] AliasIdentificationVariable + * + * @return \Doctrine\ORM\Query\AST\DeleteClause + */ + public function DeleteClause() + { + $this->match(Lexer::T_DELETE); + + if ($this->lexer->isNextToken(Lexer::T_FROM)) { + $this->match(Lexer::T_FROM); + } + + $token = $this->lexer->lookahead; + $deleteClause = new AST\DeleteClause($this->AbstractSchemaName()); + + if ($this->lexer->isNextToken(Lexer::T_AS)) { + $this->match(Lexer::T_AS); + } + + $aliasIdentificationVariable = $this->AliasIdentificationVariable(); + + $deleteClause->aliasIdentificationVariable = $aliasIdentificationVariable; + $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); + + // Building queryComponent + $queryComponent = array( + 'metadata' => $class, + 'parent' => null, + 'relation' => null, + 'map' => null, + 'nestingLevel' => $this->nestingLevel, + 'token' => $token, + ); + + $this->queryComponents[$aliasIdentificationVariable] = $queryComponent; + + return $deleteClause; + } + + /** + * FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration}* + * + * @return \Doctrine\ORM\Query\AST\FromClause + */ + public function FromClause() + { + $this->match(Lexer::T_FROM); + + $identificationVariableDeclarations = array(); + $identificationVariableDeclarations[] = $this->IdentificationVariableDeclaration(); + + while ($this->lexer->isNextToken(Lexer::T_COMMA)) { + $this->match(Lexer::T_COMMA); + + $identificationVariableDeclarations[] = $this->IdentificationVariableDeclaration(); + } + + return new AST\FromClause($identificationVariableDeclarations); + } + + /** + * SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}* + * + * @return \Doctrine\ORM\Query\AST\SubselectFromClause + */ + public function SubselectFromClause() + { + $this->match(Lexer::T_FROM); + + $identificationVariables = array(); + $identificationVariables[] = $this->SubselectIdentificationVariableDeclaration(); + + while ($this->lexer->isNextToken(Lexer::T_COMMA)) { + $this->match(Lexer::T_COMMA); + + $identificationVariables[] = $this->SubselectIdentificationVariableDeclaration(); + } + + return new AST\SubselectFromClause($identificationVariables); + } + + /** + * WhereClause ::= "WHERE" ConditionalExpression + * + * @return \Doctrine\ORM\Query\AST\WhereClause + */ + public function WhereClause() + { + $this->match(Lexer::T_WHERE); + + return new AST\WhereClause($this->ConditionalExpression()); + } + + /** + * HavingClause ::= "HAVING" ConditionalExpression + * + * @return \Doctrine\ORM\Query\AST\HavingClause + */ + public function HavingClause() + { + $this->match(Lexer::T_HAVING); + + return new AST\HavingClause($this->ConditionalExpression()); + } + + /** + * GroupByClause ::= "GROUP" "BY" GroupByItem {"," GroupByItem}* + * + * @return \Doctrine\ORM\Query\AST\GroupByClause + */ + public function GroupByClause() + { + $this->match(Lexer::T_GROUP); + $this->match(Lexer::T_BY); + + $groupByItems = array($this->GroupByItem()); + + while ($this->lexer->isNextToken(Lexer::T_COMMA)) { + $this->match(Lexer::T_COMMA); + + $groupByItems[] = $this->GroupByItem(); + } + + return new AST\GroupByClause($groupByItems); + } + + /** + * OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}* + * + * @return \Doctrine\ORM\Query\AST\OrderByClause + */ + public function OrderByClause() + { + $this->match(Lexer::T_ORDER); + $this->match(Lexer::T_BY); + + $orderByItems = array(); + $orderByItems[] = $this->OrderByItem(); + + while ($this->lexer->isNextToken(Lexer::T_COMMA)) { + $this->match(Lexer::T_COMMA); + + $orderByItems[] = $this->OrderByItem(); + } + + return new AST\OrderByClause($orderByItems); + } + + /** + * Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] + * + * @return \Doctrine\ORM\Query\AST\Subselect + */ + public function Subselect() + { + // Increase query nesting level + $this->nestingLevel++; + + $subselect = new AST\Subselect($this->SimpleSelectClause(), $this->SubselectFromClause()); + + $subselect->whereClause = $this->lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null; + $subselect->groupByClause = $this->lexer->isNextToken(Lexer::T_GROUP) ? $this->GroupByClause() : null; + $subselect->havingClause = $this->lexer->isNextToken(Lexer::T_HAVING) ? $this->HavingClause() : null; + $subselect->orderByClause = $this->lexer->isNextToken(Lexer::T_ORDER) ? $this->OrderByClause() : null; + + // Decrease query nesting level + $this->nestingLevel--; + + return $subselect; + } + + /** + * UpdateItem ::= SingleValuedPathExpression "=" NewValue + * + * @return \Doctrine\ORM\Query\AST\UpdateItem + */ + public function UpdateItem() + { + $pathExpr = $this->SingleValuedPathExpression(); + + $this->match(Lexer::T_EQUALS); + + $updateItem = new AST\UpdateItem($pathExpr, $this->NewValue()); + + return $updateItem; + } + + /** + * GroupByItem ::= IdentificationVariable | ResultVariable | SingleValuedPathExpression + * + * @return string | \Doctrine\ORM\Query\AST\PathExpression + */ + public function GroupByItem() + { + // We need to check if we are in a IdentificationVariable or SingleValuedPathExpression + $glimpse = $this->lexer->glimpse(); + + if ($glimpse['type'] === Lexer::T_DOT) { + return $this->SingleValuedPathExpression(); + } + + // Still need to decide between IdentificationVariable or ResultVariable + $lookaheadValue = $this->lexer->lookahead['value']; + + if ( ! isset($this->queryComponents[$lookaheadValue])) { + $this->semanticalError('Cannot group by undefined identification or result variable.'); + } + + return (isset($this->queryComponents[$lookaheadValue]['metadata'])) + ? $this->IdentificationVariable() + : $this->ResultVariable(); + } + + /** + * OrderByItem ::= ( + * SimpleArithmeticExpression | SingleValuedPathExpression | + * ScalarExpression | ResultVariable | FunctionDeclaration + * ) ["ASC" | "DESC"] + * + * @return \Doctrine\ORM\Query\AST\OrderByItem + */ + public function OrderByItem() + { + $this->lexer->peek(); // lookahead => '.' + $this->lexer->peek(); // lookahead => token after '.' + + $peek = $this->lexer->peek(); // lookahead => token after the token after the '.' + + $this->lexer->resetPeek(); + + $glimpse = $this->lexer->glimpse(); + + switch (true) { + case ($this->isFunction($peek)): + $expr = $this->FunctionDeclaration(); + break; + + case ($this->isMathOperator($peek)): + $expr = $this->SimpleArithmeticExpression(); + break; + + case ($glimpse['type'] === Lexer::T_DOT): + $expr = $this->SingleValuedPathExpression(); + break; + + case ($this->lexer->peek() && $this->isMathOperator($this->peekBeyondClosingParenthesis())): + $expr = $this->ScalarExpression(); + break; + + default: + $expr = $this->ResultVariable(); + break; + } + + $type = 'ASC'; + $item = new AST\OrderByItem($expr); + + switch (true) { + case ($this->lexer->isNextToken(Lexer::T_DESC)): + $this->match(Lexer::T_DESC); + $type = 'DESC'; + break; + + case ($this->lexer->isNextToken(Lexer::T_ASC)): + $this->match(Lexer::T_ASC); + break; + + default: + // Do nothing + } + + $item->type = $type; + + return $item; + } + + /** + * NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | + * EnumPrimary | SimpleEntityExpression | "NULL" + * + * NOTE: Since it is not possible to correctly recognize individual types, here is the full + * grammar that needs to be supported: + * + * NewValue ::= SimpleArithmeticExpression | "NULL" + * + * SimpleArithmeticExpression covers all *Primary grammar rules and also SimpleEntityExpression + * + * @return AST\ArithmeticExpression + */ + public function NewValue() + { + if ($this->lexer->isNextToken(Lexer::T_NULL)) { + $this->match(Lexer::T_NULL); + + return null; + } + + if ($this->lexer->isNextToken(Lexer::T_INPUT_PARAMETER)) { + $this->match(Lexer::T_INPUT_PARAMETER); + + return new AST\InputParameter($this->lexer->token['value']); + } + + return $this->ArithmeticExpression(); + } + + /** + * IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {Join}* + * + * @return \Doctrine\ORM\Query\AST\IdentificationVariableDeclaration + */ + public function IdentificationVariableDeclaration() + { + $joins = array(); + $rangeVariableDeclaration = $this->RangeVariableDeclaration(); + $indexBy = $this->lexer->isNextToken(Lexer::T_INDEX) + ? $this->IndexBy() + : null; + + $rangeVariableDeclaration->isRoot = true; + + while ( + $this->lexer->isNextToken(Lexer::T_LEFT) || + $this->lexer->isNextToken(Lexer::T_INNER) || + $this->lexer->isNextToken(Lexer::T_JOIN) + ) { + $joins[] = $this->Join(); + } + + return new AST\IdentificationVariableDeclaration( + $rangeVariableDeclaration, $indexBy, $joins + ); + } + + /** + * + * SubselectIdentificationVariableDeclaration ::= IdentificationVariableDeclaration + * + * {Internal note: WARNING: Solution is harder than a bare implementation. + * Desired EBNF support: + * + * SubselectIdentificationVariableDeclaration ::= IdentificationVariableDeclaration | (AssociationPathExpression ["AS"] AliasIdentificationVariable) + * + * It demands that entire SQL generation to become programmatical. This is + * needed because association based subselect requires "WHERE" conditional + * expressions to be injected, but there is no scope to do that. Only scope + * accessible is "FROM", prohibiting an easy implementation without larger + * changes.} + * + * @return \Doctrine\ORM\Query\AST\SubselectIdentificationVariableDeclaration | + * \Doctrine\ORM\Query\AST\IdentificationVariableDeclaration + */ + public function SubselectIdentificationVariableDeclaration() + { + /* + NOT YET IMPLEMENTED! + + $glimpse = $this->lexer->glimpse(); + + if ($glimpse['type'] == Lexer::T_DOT) { + $associationPathExpression = $this->AssociationPathExpression(); + + if ($this->lexer->isNextToken(Lexer::T_AS)) { + $this->match(Lexer::T_AS); + } + + $aliasIdentificationVariable = $this->AliasIdentificationVariable(); + $identificationVariable = $associationPathExpression->identificationVariable; + $field = $associationPathExpression->associationField; + + $class = $this->queryComponents[$identificationVariable]['metadata']; + $targetClass = $this->em->getClassMetadata($class->associationMappings[$field]['targetEntity']); + + // Building queryComponent + $joinQueryComponent = array( + 'metadata' => $targetClass, + 'parent' => $identificationVariable, + 'relation' => $class->getAssociationMapping($field), + 'map' => null, + 'nestingLevel' => $this->nestingLevel, + 'token' => $this->lexer->lookahead + ); + + $this->queryComponents[$aliasIdentificationVariable] = $joinQueryComponent; + + return new AST\SubselectIdentificationVariableDeclaration( + $associationPathExpression, $aliasIdentificationVariable + ); + } + */ + + return $this->IdentificationVariableDeclaration(); + } + + /** + * Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" + * (JoinAssociationDeclaration | RangeVariableDeclaration) + * ["WITH" ConditionalExpression] + * + * @return \Doctrine\ORM\Query\AST\Join + */ + public function Join() + { + // Check Join type + $joinType = AST\Join::JOIN_TYPE_INNER; + + switch (true) { + case ($this->lexer->isNextToken(Lexer::T_LEFT)): + $this->match(Lexer::T_LEFT); + + $joinType = AST\Join::JOIN_TYPE_LEFT; + + // Possible LEFT OUTER join + if ($this->lexer->isNextToken(Lexer::T_OUTER)) { + $this->match(Lexer::T_OUTER); + + $joinType = AST\Join::JOIN_TYPE_LEFTOUTER; + } + break; + + case ($this->lexer->isNextToken(Lexer::T_INNER)): + $this->match(Lexer::T_INNER); + break; + + default: + // Do nothing + } + + $this->match(Lexer::T_JOIN); + + $next = $this->lexer->glimpse(); + $joinDeclaration = ($next['type'] === Lexer::T_DOT) ? $this->JoinAssociationDeclaration() : $this->RangeVariableDeclaration(); + $adhocConditions = $this->lexer->isNextToken(Lexer::T_WITH); + $join = new AST\Join($joinType, $joinDeclaration); + + // Describe non-root join declaration + if ($joinDeclaration instanceof AST\RangeVariableDeclaration) { + $joinDeclaration->isRoot = false; + + $adhocConditions = true; + } + + // Check for ad-hoc Join conditions + if ($adhocConditions) { + $this->match(Lexer::T_WITH); + + $join->conditionalExpression = $this->ConditionalExpression(); + } + + return $join; + } + + /** + * RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable + * + * @return \Doctrine\ORM\Query\AST\RangeVariableDeclaration + */ + public function RangeVariableDeclaration() + { + $abstractSchemaName = $this->AbstractSchemaName(); + + if ($this->lexer->isNextToken(Lexer::T_AS)) { + $this->match(Lexer::T_AS); + } + + $token = $this->lexer->lookahead; + $aliasIdentificationVariable = $this->AliasIdentificationVariable(); + $classMetadata = $this->em->getClassMetadata($abstractSchemaName); + + // Building queryComponent + $queryComponent = array( + 'metadata' => $classMetadata, + 'parent' => null, + 'relation' => null, + 'map' => null, + 'nestingLevel' => $this->nestingLevel, + 'token' => $token + ); + + $this->queryComponents[$aliasIdentificationVariable] = $queryComponent; + + return new AST\RangeVariableDeclaration($abstractSchemaName, $aliasIdentificationVariable); + } + + /** + * JoinAssociationDeclaration ::= JoinAssociationPathExpression ["AS"] AliasIdentificationVariable [IndexBy] + * + * @return \Doctrine\ORM\Query\AST\JoinAssociationPathExpression + */ + public function JoinAssociationDeclaration() + { + $joinAssociationPathExpression = $this->JoinAssociationPathExpression(); + + if ($this->lexer->isNextToken(Lexer::T_AS)) { + $this->match(Lexer::T_AS); + } + + $aliasIdentificationVariable = $this->AliasIdentificationVariable(); + $indexBy = $this->lexer->isNextToken(Lexer::T_INDEX) ? $this->IndexBy() : null; + + $identificationVariable = $joinAssociationPathExpression->identificationVariable; + $field = $joinAssociationPathExpression->associationField; + + $class = $this->queryComponents[$identificationVariable]['metadata']; + $targetClass = $this->em->getClassMetadata($class->associationMappings[$field]['targetEntity']); + + // Building queryComponent + $joinQueryComponent = array( + 'metadata' => $targetClass, + 'parent' => $joinAssociationPathExpression->identificationVariable, + 'relation' => $class->getAssociationMapping($field), + 'map' => null, + 'nestingLevel' => $this->nestingLevel, + 'token' => $this->lexer->lookahead + ); + + $this->queryComponents[$aliasIdentificationVariable] = $joinQueryComponent; + + return new AST\JoinAssociationDeclaration($joinAssociationPathExpression, $aliasIdentificationVariable, $indexBy); + } + + /** + * PartialObjectExpression ::= "PARTIAL" IdentificationVariable "." PartialFieldSet + * PartialFieldSet ::= "{" SimpleStateField {"," SimpleStateField}* "}" + * + * @return array + */ + public function PartialObjectExpression() + { + $this->match(Lexer::T_PARTIAL); + + $partialFieldSet = array(); + + $identificationVariable = $this->IdentificationVariable(); + + $this->match(Lexer::T_DOT); + $this->match(Lexer::T_OPEN_CURLY_BRACE); + $this->match(Lexer::T_IDENTIFIER); + + $partialFieldSet[] = $this->lexer->token['value']; + + while ($this->lexer->isNextToken(Lexer::T_COMMA)) { + $this->match(Lexer::T_COMMA); + $this->match(Lexer::T_IDENTIFIER); + + $field = $this->lexer->token['value']; + + while ($this->lexer->isNextToken(Lexer::T_DOT)) { + $this->match(Lexer::T_DOT); + $this->match(Lexer::T_IDENTIFIER); + $field .= '.'.$this->lexer->token['value']; + } + + $partialFieldSet[] = $field; + } + + $this->match(Lexer::T_CLOSE_CURLY_BRACE); + + $partialObjectExpression = new AST\PartialObjectExpression($identificationVariable, $partialFieldSet); + + // Defer PartialObjectExpression validation + $this->deferredPartialObjectExpressions[] = array( + 'expression' => $partialObjectExpression, + 'nestingLevel' => $this->nestingLevel, + 'token' => $this->lexer->token, + ); + + return $partialObjectExpression; + } + + /** + * NewObjectExpression ::= "NEW" IdentificationVariable "(" NewObjectArg {"," NewObjectArg}* ")" + * + * @return \Doctrine\ORM\Query\AST\NewObjectExpression + */ + public function NewObjectExpression() + { + $this->match(Lexer::T_NEW); + $this->match(Lexer::T_IDENTIFIER); + + $token = $this->lexer->token; + $className = $token['value']; + + if (strrpos($className, ':') !== false) { + list($namespaceAlias, $simpleClassName) = explode(':', $className); + + $className = $this->em->getConfiguration() + ->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; + } + + $this->match(Lexer::T_OPEN_PARENTHESIS); + + $args[] = $this->NewObjectArg(); + + while ($this->lexer->isNextToken(Lexer::T_COMMA)) { + $this->match(Lexer::T_COMMA); + + $args[] = $this->NewObjectArg(); + } + + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + $expression = new AST\NewObjectExpression($className, $args); + + // Defer NewObjectExpression validation + $this->deferredNewObjectExpressions[] = array( + 'token' => $token, + 'expression' => $expression, + 'nestingLevel' => $this->nestingLevel, + ); + + return $expression; + } + + /** + * NewObjectArg ::= ScalarExpression | "(" Subselect ")" + * + * @return mixed + */ + public function NewObjectArg() + { + $token = $this->lexer->lookahead; + $peek = $this->lexer->glimpse(); + + if ($token['type'] === Lexer::T_OPEN_PARENTHESIS && $peek['type'] === Lexer::T_SELECT) { + $this->match(Lexer::T_OPEN_PARENTHESIS); + $expression = $this->Subselect(); + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + return $expression; + } + + return $this->ScalarExpression(); + } + + /** + * IndexBy ::= "INDEX" "BY" StateFieldPathExpression + * + * @return \Doctrine\ORM\Query\AST\IndexBy + */ + public function IndexBy() + { + $this->match(Lexer::T_INDEX); + $this->match(Lexer::T_BY); + $pathExpr = $this->StateFieldPathExpression(); + + // Add the INDEX BY info to the query component + $this->queryComponents[$pathExpr->identificationVariable]['map'] = $pathExpr->field; + + return new AST\IndexBy($pathExpr); + } + + /** + * ScalarExpression ::= SimpleArithmeticExpression | StringPrimary | DateTimePrimary | + * StateFieldPathExpression | BooleanPrimary | CaseExpression | + * InstanceOfExpression + * + * @return mixed One of the possible expressions or subexpressions. + */ + public function ScalarExpression() + { + $lookahead = $this->lexer->lookahead['type']; + $peek = $this->lexer->glimpse(); + + switch (true) { + case ($lookahead === Lexer::T_INTEGER): + case ($lookahead === Lexer::T_FLOAT): + // SimpleArithmeticExpression : (- u.value ) or ( + u.value ) or ( - 1 ) or ( + 1 ) + case ($lookahead === Lexer::T_MINUS): + case ($lookahead === Lexer::T_PLUS): + return $this->SimpleArithmeticExpression(); + + case ($lookahead === Lexer::T_STRING): + return $this->StringPrimary(); + + case ($lookahead === Lexer::T_TRUE): + case ($lookahead === Lexer::T_FALSE): + $this->match($lookahead); + + return new AST\Literal(AST\Literal::BOOLEAN, $this->lexer->token['value']); + + case ($lookahead === Lexer::T_INPUT_PARAMETER): + switch (true) { + case $this->isMathOperator($peek): + // :param + u.value + return $this->SimpleArithmeticExpression(); + + default: + return $this->InputParameter(); + } + + case ($lookahead === Lexer::T_CASE): + case ($lookahead === Lexer::T_COALESCE): + case ($lookahead === Lexer::T_NULLIF): + // Since NULLIF and COALESCE can be identified as a function, + // we need to check these before checking for FunctionDeclaration + return $this->CaseExpression(); + + case ($lookahead === Lexer::T_OPEN_PARENTHESIS): + return $this->SimpleArithmeticExpression(); + + // this check must be done before checking for a filed path expression + case ($this->isFunction()): + $this->lexer->peek(); // "(" + + switch (true) { + case ($this->isMathOperator($this->peekBeyondClosingParenthesis())): + // SUM(u.id) + COUNT(u.id) + return $this->SimpleArithmeticExpression(); + + case ($this->isAggregateFunction($this->lexer->lookahead['type'])): + return $this->AggregateExpression(); + + default: + // IDENTITY(u) + return $this->FunctionDeclaration(); + } + + break; + // it is no function, so it must be a field path + case ($lookahead === Lexer::T_IDENTIFIER): + $this->lexer->peek(); // lookahead => '.' + $this->lexer->peek(); // lookahead => token after '.' + $peek = $this->lexer->peek(); // lookahead => token after the token after the '.' + $this->lexer->resetPeek(); + + if ($this->isMathOperator($peek)) { + return $this->SimpleArithmeticExpression(); + } + + return $this->StateFieldPathExpression(); + + default: + $this->syntaxError(); + } + } + + /** + * CaseExpression ::= GeneralCaseExpression | SimpleCaseExpression | CoalesceExpression | NullifExpression + * GeneralCaseExpression ::= "CASE" WhenClause {WhenClause}* "ELSE" ScalarExpression "END" + * WhenClause ::= "WHEN" ConditionalExpression "THEN" ScalarExpression + * SimpleCaseExpression ::= "CASE" CaseOperand SimpleWhenClause {SimpleWhenClause}* "ELSE" ScalarExpression "END" + * CaseOperand ::= StateFieldPathExpression | TypeDiscriminator + * SimpleWhenClause ::= "WHEN" ScalarExpression "THEN" ScalarExpression + * CoalesceExpression ::= "COALESCE" "(" ScalarExpression {"," ScalarExpression}* ")" + * NullifExpression ::= "NULLIF" "(" ScalarExpression "," ScalarExpression ")" + * + * @return mixed One of the possible expressions or subexpressions. + */ + public function CaseExpression() + { + $lookahead = $this->lexer->lookahead['type']; + + switch ($lookahead) { + case Lexer::T_NULLIF: + return $this->NullIfExpression(); + + case Lexer::T_COALESCE: + return $this->CoalesceExpression(); + + case Lexer::T_CASE: + $this->lexer->resetPeek(); + $peek = $this->lexer->peek(); + + if ($peek['type'] === Lexer::T_WHEN) { + return $this->GeneralCaseExpression(); + } + + return $this->SimpleCaseExpression(); + + default: + // Do nothing + break; + } + + $this->syntaxError(); + } + + /** + * CoalesceExpression ::= "COALESCE" "(" ScalarExpression {"," ScalarExpression}* ")" + * + * @return \Doctrine\ORM\Query\AST\CoalesceExpression + */ + public function CoalesceExpression() + { + $this->match(Lexer::T_COALESCE); + $this->match(Lexer::T_OPEN_PARENTHESIS); + + // Process ScalarExpressions (1..N) + $scalarExpressions = array(); + $scalarExpressions[] = $this->ScalarExpression(); + + while ($this->lexer->isNextToken(Lexer::T_COMMA)) { + $this->match(Lexer::T_COMMA); + + $scalarExpressions[] = $this->ScalarExpression(); + } + + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + return new AST\CoalesceExpression($scalarExpressions); + } + + /** + * NullIfExpression ::= "NULLIF" "(" ScalarExpression "," ScalarExpression ")" + * + * @return \Doctrine\ORM\Query\AST\NullIfExpression + */ + public function NullIfExpression() + { + $this->match(Lexer::T_NULLIF); + $this->match(Lexer::T_OPEN_PARENTHESIS); + + $firstExpression = $this->ScalarExpression(); + $this->match(Lexer::T_COMMA); + $secondExpression = $this->ScalarExpression(); + + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + return new AST\NullIfExpression($firstExpression, $secondExpression); + } + + /** + * GeneralCaseExpression ::= "CASE" WhenClause {WhenClause}* "ELSE" ScalarExpression "END" + * + * @return \Doctrine\ORM\Query\AST\GeneralCaseExpression + */ + public function GeneralCaseExpression() + { + $this->match(Lexer::T_CASE); + + // Process WhenClause (1..N) + $whenClauses = array(); + + do { + $whenClauses[] = $this->WhenClause(); + } while ($this->lexer->isNextToken(Lexer::T_WHEN)); + + $this->match(Lexer::T_ELSE); + $scalarExpression = $this->ScalarExpression(); + $this->match(Lexer::T_END); + + return new AST\GeneralCaseExpression($whenClauses, $scalarExpression); + } + + /** + * SimpleCaseExpression ::= "CASE" CaseOperand SimpleWhenClause {SimpleWhenClause}* "ELSE" ScalarExpression "END" + * CaseOperand ::= StateFieldPathExpression | TypeDiscriminator + * + * @return AST\SimpleCaseExpression + */ + public function SimpleCaseExpression() + { + $this->match(Lexer::T_CASE); + $caseOperand = $this->StateFieldPathExpression(); + + // Process SimpleWhenClause (1..N) + $simpleWhenClauses = array(); + + do { + $simpleWhenClauses[] = $this->SimpleWhenClause(); + } while ($this->lexer->isNextToken(Lexer::T_WHEN)); + + $this->match(Lexer::T_ELSE); + $scalarExpression = $this->ScalarExpression(); + $this->match(Lexer::T_END); + + return new AST\SimpleCaseExpression($caseOperand, $simpleWhenClauses, $scalarExpression); + } + + /** + * WhenClause ::= "WHEN" ConditionalExpression "THEN" ScalarExpression + * + * @return \Doctrine\ORM\Query\AST\WhenClause + */ + public function WhenClause() + { + $this->match(Lexer::T_WHEN); + $conditionalExpression = $this->ConditionalExpression(); + $this->match(Lexer::T_THEN); + + return new AST\WhenClause($conditionalExpression, $this->ScalarExpression()); + } + + /** + * SimpleWhenClause ::= "WHEN" ScalarExpression "THEN" ScalarExpression + * + * @return \Doctrine\ORM\Query\AST\SimpleWhenClause + */ + public function SimpleWhenClause() + { + $this->match(Lexer::T_WHEN); + $conditionalExpression = $this->ScalarExpression(); + $this->match(Lexer::T_THEN); + + return new AST\SimpleWhenClause($conditionalExpression, $this->ScalarExpression()); + } + + /** + * SelectExpression ::= ( + * IdentificationVariable | ScalarExpression | AggregateExpression | FunctionDeclaration | + * PartialObjectExpression | "(" Subselect ")" | CaseExpression | NewObjectExpression + * ) [["AS"] ["HIDDEN"] AliasResultVariable] + * + * @return \Doctrine\ORM\Query\AST\SelectExpression + */ + public function SelectExpression() + { + $expression = null; + $identVariable = null; + $peek = $this->lexer->glimpse(); + $lookaheadType = $this->lexer->lookahead['type']; + + switch (true) { + // ScalarExpression (u.name) + case ($lookaheadType === Lexer::T_IDENTIFIER && $peek['type'] === Lexer::T_DOT): + $expression = $this->ScalarExpression(); + break; + + // IdentificationVariable (u) + case ($lookaheadType === Lexer::T_IDENTIFIER && $peek['type'] !== Lexer::T_OPEN_PARENTHESIS): + $expression = $identVariable = $this->IdentificationVariable(); + break; + + // CaseExpression (CASE ... or NULLIF(...) or COALESCE(...)) + case ($lookaheadType === Lexer::T_CASE): + case ($lookaheadType === Lexer::T_COALESCE): + case ($lookaheadType === Lexer::T_NULLIF): + $expression = $this->CaseExpression(); + break; + + // DQL Function (SUM(u.value) or SUM(u.value) + 1) + case ($this->isFunction()): + $this->lexer->peek(); // "(" + + switch (true) { + case ($this->isMathOperator($this->peekBeyondClosingParenthesis())): + // SUM(u.id) + COUNT(u.id) + $expression = $this->ScalarExpression(); + break; + + case ($this->isAggregateFunction($lookaheadType)): + // COUNT(u.id) + $expression = $this->AggregateExpression(); + break; + + default: + // IDENTITY(u) + $expression = $this->FunctionDeclaration(); + break; + } + + break; + + // PartialObjectExpression (PARTIAL u.{id, name}) + case ($lookaheadType === Lexer::T_PARTIAL): + $expression = $this->PartialObjectExpression(); + $identVariable = $expression->identificationVariable; + break; + + // Subselect + case ($lookaheadType === Lexer::T_OPEN_PARENTHESIS && $peek['type'] === Lexer::T_SELECT): + $this->match(Lexer::T_OPEN_PARENTHESIS); + $expression = $this->Subselect(); + $this->match(Lexer::T_CLOSE_PARENTHESIS); + break; + + // Shortcut: ScalarExpression => SimpleArithmeticExpression + case ($lookaheadType === Lexer::T_OPEN_PARENTHESIS): + case ($lookaheadType === Lexer::T_INTEGER): + case ($lookaheadType === Lexer::T_STRING): + case ($lookaheadType === Lexer::T_FLOAT): + // SimpleArithmeticExpression : (- u.value ) or ( + u.value ) + case ($lookaheadType === Lexer::T_MINUS): + case ($lookaheadType === Lexer::T_PLUS): + $expression = $this->SimpleArithmeticExpression(); + break; + + // NewObjectExpression (New ClassName(id, name)) + case ($lookaheadType === Lexer::T_NEW): + $expression = $this->NewObjectExpression(); + break; + + default: + $this->syntaxError( + 'IdentificationVariable | ScalarExpression | AggregateExpression | FunctionDeclaration | PartialObjectExpression | "(" Subselect ")" | CaseExpression', + $this->lexer->lookahead + ); + } + + // [["AS"] ["HIDDEN"] AliasResultVariable] + + if ($this->lexer->isNextToken(Lexer::T_AS)) { + $this->match(Lexer::T_AS); + } + + $hiddenAliasResultVariable = false; + + if ($this->lexer->isNextToken(Lexer::T_HIDDEN)) { + $this->match(Lexer::T_HIDDEN); + + $hiddenAliasResultVariable = true; + } + + $aliasResultVariable = null; + + if ($this->lexer->isNextToken(Lexer::T_IDENTIFIER)) { + $token = $this->lexer->lookahead; + $aliasResultVariable = $this->AliasResultVariable(); + + // Include AliasResultVariable in query components. + $this->queryComponents[$aliasResultVariable] = array( + 'resultVariable' => $expression, + 'nestingLevel' => $this->nestingLevel, + 'token' => $token, + ); + } + + // AST + + $expr = new AST\SelectExpression($expression, $aliasResultVariable, $hiddenAliasResultVariable); + + if ($identVariable) { + $this->identVariableExpressions[$identVariable] = $expr; + } + + return $expr; + } + + /** + * SimpleSelectExpression ::= ( + * StateFieldPathExpression | IdentificationVariable | FunctionDeclaration | + * AggregateExpression | "(" Subselect ")" | ScalarExpression + * ) [["AS"] AliasResultVariable] + * + * @return \Doctrine\ORM\Query\AST\SimpleSelectExpression + */ + public function SimpleSelectExpression() + { + $peek = $this->lexer->glimpse(); + + switch ($this->lexer->lookahead['type']) { + case Lexer::T_IDENTIFIER: + switch (true) { + case ($peek['type'] === Lexer::T_DOT): + $expression = $this->StateFieldPathExpression(); + + return new AST\SimpleSelectExpression($expression); + + case ($peek['type'] !== Lexer::T_OPEN_PARENTHESIS): + $expression = $this->IdentificationVariable(); + + return new AST\SimpleSelectExpression($expression); + + case ($this->isFunction()): + // SUM(u.id) + COUNT(u.id) + if ($this->isMathOperator($this->peekBeyondClosingParenthesis())) { + return new AST\SimpleSelectExpression($this->ScalarExpression()); + } + // COUNT(u.id) + if ($this->isAggregateFunction($this->lexer->lookahead['type'])) { + return new AST\SimpleSelectExpression($this->AggregateExpression()); + } + // IDENTITY(u) + return new AST\SimpleSelectExpression($this->FunctionDeclaration()); + + default: + // Do nothing + } + break; + + case Lexer::T_OPEN_PARENTHESIS: + if ($peek['type'] !== Lexer::T_SELECT) { + // Shortcut: ScalarExpression => SimpleArithmeticExpression + $expression = $this->SimpleArithmeticExpression(); + + return new AST\SimpleSelectExpression($expression); + } + + // Subselect + $this->match(Lexer::T_OPEN_PARENTHESIS); + $expression = $this->Subselect(); + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + return new AST\SimpleSelectExpression($expression); + + default: + // Do nothing + } + + $this->lexer->peek(); + + $expression = $this->ScalarExpression(); + $expr = new AST\SimpleSelectExpression($expression); + + if ($this->lexer->isNextToken(Lexer::T_AS)) { + $this->match(Lexer::T_AS); + } + + if ($this->lexer->isNextToken(Lexer::T_IDENTIFIER)) { + $token = $this->lexer->lookahead; + $resultVariable = $this->AliasResultVariable(); + $expr->fieldIdentificationVariable = $resultVariable; + + // Include AliasResultVariable in query components. + $this->queryComponents[$resultVariable] = array( + 'resultvariable' => $expr, + 'nestingLevel' => $this->nestingLevel, + 'token' => $token, + ); + } + + return $expr; + } + + /** + * ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}* + * + * @return \Doctrine\ORM\Query\AST\ConditionalExpression + */ + public function ConditionalExpression() + { + $conditionalTerms = array(); + $conditionalTerms[] = $this->ConditionalTerm(); + + while ($this->lexer->isNextToken(Lexer::T_OR)) { + $this->match(Lexer::T_OR); + + $conditionalTerms[] = $this->ConditionalTerm(); + } + + // Phase 1 AST optimization: Prevent AST\ConditionalExpression + // if only one AST\ConditionalTerm is defined + if (count($conditionalTerms) == 1) { + return $conditionalTerms[0]; + } + + return new AST\ConditionalExpression($conditionalTerms); + } + + /** + * ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}* + * + * @return \Doctrine\ORM\Query\AST\ConditionalTerm + */ + public function ConditionalTerm() + { + $conditionalFactors = array(); + $conditionalFactors[] = $this->ConditionalFactor(); + + while ($this->lexer->isNextToken(Lexer::T_AND)) { + $this->match(Lexer::T_AND); + + $conditionalFactors[] = $this->ConditionalFactor(); + } + + // Phase 1 AST optimization: Prevent AST\ConditionalTerm + // if only one AST\ConditionalFactor is defined + if (count($conditionalFactors) == 1) { + return $conditionalFactors[0]; + } + + return new AST\ConditionalTerm($conditionalFactors); + } + + /** + * ConditionalFactor ::= ["NOT"] ConditionalPrimary + * + * @return \Doctrine\ORM\Query\AST\ConditionalFactor + */ + public function ConditionalFactor() + { + $not = false; + + if ($this->lexer->isNextToken(Lexer::T_NOT)) { + $this->match(Lexer::T_NOT); + + $not = true; + } + + $conditionalPrimary = $this->ConditionalPrimary(); + + // Phase 1 AST optimization: Prevent AST\ConditionalFactor + // if only one AST\ConditionalPrimary is defined + if ( ! $not) { + return $conditionalPrimary; + } + + $conditionalFactor = new AST\ConditionalFactor($conditionalPrimary); + $conditionalFactor->not = $not; + + return $conditionalFactor; + } + + /** + * ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")" + * + * @return \Doctrine\ORM\Query\AST\ConditionalPrimary + */ + public function ConditionalPrimary() + { + $condPrimary = new AST\ConditionalPrimary; + + if ( ! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) { + $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression(); + + return $condPrimary; + } + + // Peek beyond the matching closing parenthesis ')' + $peek = $this->peekBeyondClosingParenthesis(); + + if (in_array($peek['value'], array("=", "<", "<=", "<>", ">", ">=", "!=")) || + in_array($peek['type'], array(Lexer::T_NOT, Lexer::T_BETWEEN, Lexer::T_LIKE, Lexer::T_IN, Lexer::T_IS, Lexer::T_EXISTS)) || + $this->isMathOperator($peek)) { + $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression(); + + return $condPrimary; + } + + $this->match(Lexer::T_OPEN_PARENTHESIS); + $condPrimary->conditionalExpression = $this->ConditionalExpression(); + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + return $condPrimary; + } + + /** + * SimpleConditionalExpression ::= + * ComparisonExpression | BetweenExpression | LikeExpression | + * InExpression | NullComparisonExpression | ExistsExpression | + * EmptyCollectionComparisonExpression | CollectionMemberExpression | + * InstanceOfExpression + */ + public function SimpleConditionalExpression() + { + if ($this->lexer->isNextToken(Lexer::T_EXISTS)) { + return $this->ExistsExpression(); + } + + $token = $this->lexer->lookahead; + $peek = $this->lexer->glimpse(); + $lookahead = $token; + + if ($this->lexer->isNextToken(Lexer::T_NOT)) { + $token = $this->lexer->glimpse(); + } + + if ($token['type'] === Lexer::T_IDENTIFIER || $token['type'] === Lexer::T_INPUT_PARAMETER || $this->isFunction()) { + // Peek beyond the matching closing parenthesis. + $beyond = $this->lexer->peek(); + + switch ($peek['value']) { + case '(': + // Peeks beyond the matched closing parenthesis. + $token = $this->peekBeyondClosingParenthesis(false); + + if ($token['type'] === Lexer::T_NOT) { + $token = $this->lexer->peek(); + } + + if ($token['type'] === Lexer::T_IS) { + $lookahead = $this->lexer->peek(); + } + break; + + default: + // Peek beyond the PathExpression or InputParameter. + $token = $beyond; + + while ($token['value'] === '.') { + $this->lexer->peek(); + + $token = $this->lexer->peek(); + } + + // Also peek beyond a NOT if there is one. + if ($token['type'] === Lexer::T_NOT) { + $token = $this->lexer->peek(); + } + + // We need to go even further in case of IS (differentiate between NULL and EMPTY) + $lookahead = $this->lexer->peek(); + } + + // Also peek beyond a NOT if there is one. + if ($lookahead['type'] === Lexer::T_NOT) { + $lookahead = $this->lexer->peek(); + } + + $this->lexer->resetPeek(); + } + + if ($token['type'] === Lexer::T_BETWEEN) { + return $this->BetweenExpression(); + } + + if ($token['type'] === Lexer::T_LIKE) { + return $this->LikeExpression(); + } + + if ($token['type'] === Lexer::T_IN) { + return $this->InExpression(); + } + + if ($token['type'] === Lexer::T_INSTANCE) { + return $this->InstanceOfExpression(); + } + + if ($token['type'] === Lexer::T_MEMBER) { + return $this->CollectionMemberExpression(); + } + + if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_NULL) { + return $this->NullComparisonExpression(); + } + + if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) { + return $this->EmptyCollectionComparisonExpression(); + } + + return $this->ComparisonExpression(); + } + + /** + * EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY" + * + * @return \Doctrine\ORM\Query\AST\EmptyCollectionComparisonExpression + */ + public function EmptyCollectionComparisonExpression() + { + $emptyCollectionCompExpr = new AST\EmptyCollectionComparisonExpression( + $this->CollectionValuedPathExpression() + ); + $this->match(Lexer::T_IS); + + if ($this->lexer->isNextToken(Lexer::T_NOT)) { + $this->match(Lexer::T_NOT); + $emptyCollectionCompExpr->not = true; + } + + $this->match(Lexer::T_EMPTY); + + return $emptyCollectionCompExpr; + } + + /** + * CollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpression + * + * EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression + * SimpleEntityExpression ::= IdentificationVariable | InputParameter + * + * @return \Doctrine\ORM\Query\AST\CollectionMemberExpression + */ + public function CollectionMemberExpression() + { + $not = false; + $entityExpr = $this->EntityExpression(); + + if ($this->lexer->isNextToken(Lexer::T_NOT)) { + $this->match(Lexer::T_NOT); + + $not = true; + } + + $this->match(Lexer::T_MEMBER); + + if ($this->lexer->isNextToken(Lexer::T_OF)) { + $this->match(Lexer::T_OF); + } + + $collMemberExpr = new AST\CollectionMemberExpression( + $entityExpr, $this->CollectionValuedPathExpression() + ); + $collMemberExpr->not = $not; + + return $collMemberExpr; + } + + /** + * Literal ::= string | char | integer | float | boolean + * + * @return \Doctrine\ORM\Query\AST\Literal + */ + public function Literal() + { + switch ($this->lexer->lookahead['type']) { + case Lexer::T_STRING: + $this->match(Lexer::T_STRING); + return new AST\Literal(AST\Literal::STRING, $this->lexer->token['value']); + + case Lexer::T_INTEGER: + case Lexer::T_FLOAT: + $this->match( + $this->lexer->isNextToken(Lexer::T_INTEGER) ? Lexer::T_INTEGER : Lexer::T_FLOAT + ); + return new AST\Literal(AST\Literal::NUMERIC, $this->lexer->token['value']); + + case Lexer::T_TRUE: + case Lexer::T_FALSE: + $this->match( + $this->lexer->isNextToken(Lexer::T_TRUE) ? Lexer::T_TRUE : Lexer::T_FALSE + ); + return new AST\Literal(AST\Literal::BOOLEAN, $this->lexer->token['value']); + + default: + $this->syntaxError('Literal'); + } + } + + /** + * InParameter ::= Literal | InputParameter + * + * @return string | \Doctrine\ORM\Query\AST\InputParameter + */ + public function InParameter() + { + if ($this->lexer->lookahead['type'] == Lexer::T_INPUT_PARAMETER) { + return $this->InputParameter(); + } + + return $this->Literal(); + } + + /** + * InputParameter ::= PositionalParameter | NamedParameter + * + * @return \Doctrine\ORM\Query\AST\InputParameter + */ + public function InputParameter() + { + $this->match(Lexer::T_INPUT_PARAMETER); + + return new AST\InputParameter($this->lexer->token['value']); + } + + /** + * ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")" + * + * @return \Doctrine\ORM\Query\AST\ArithmeticExpression + */ + public function ArithmeticExpression() + { + $expr = new AST\ArithmeticExpression; + + if ($this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) { + $peek = $this->lexer->glimpse(); + + if ($peek['type'] === Lexer::T_SELECT) { + $this->match(Lexer::T_OPEN_PARENTHESIS); + $expr->subselect = $this->Subselect(); + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + return $expr; + } + } + + $expr->simpleArithmeticExpression = $this->SimpleArithmeticExpression(); + + return $expr; + } + + /** + * SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}* + * + * @return \Doctrine\ORM\Query\AST\SimpleArithmeticExpression + */ + public function SimpleArithmeticExpression() + { + $terms = array(); + $terms[] = $this->ArithmeticTerm(); + + while (($isPlus = $this->lexer->isNextToken(Lexer::T_PLUS)) || $this->lexer->isNextToken(Lexer::T_MINUS)) { + $this->match(($isPlus) ? Lexer::T_PLUS : Lexer::T_MINUS); + + $terms[] = $this->lexer->token['value']; + $terms[] = $this->ArithmeticTerm(); + } + + // Phase 1 AST optimization: Prevent AST\SimpleArithmeticExpression + // if only one AST\ArithmeticTerm is defined + if (count($terms) == 1) { + return $terms[0]; + } + + return new AST\SimpleArithmeticExpression($terms); + } + + /** + * ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}* + * + * @return \Doctrine\ORM\Query\AST\ArithmeticTerm + */ + public function ArithmeticTerm() + { + $factors = array(); + $factors[] = $this->ArithmeticFactor(); + + while (($isMult = $this->lexer->isNextToken(Lexer::T_MULTIPLY)) || $this->lexer->isNextToken(Lexer::T_DIVIDE)) { + $this->match(($isMult) ? Lexer::T_MULTIPLY : Lexer::T_DIVIDE); + + $factors[] = $this->lexer->token['value']; + $factors[] = $this->ArithmeticFactor(); + } + + // Phase 1 AST optimization: Prevent AST\ArithmeticTerm + // if only one AST\ArithmeticFactor is defined + if (count($factors) == 1) { + return $factors[0]; + } + + return new AST\ArithmeticTerm($factors); + } + + /** + * ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary + * + * @return \Doctrine\ORM\Query\AST\ArithmeticFactor + */ + public function ArithmeticFactor() + { + $sign = null; + + if (($isPlus = $this->lexer->isNextToken(Lexer::T_PLUS)) || $this->lexer->isNextToken(Lexer::T_MINUS)) { + $this->match(($isPlus) ? Lexer::T_PLUS : Lexer::T_MINUS); + $sign = $isPlus; + } + + $primary = $this->ArithmeticPrimary(); + + // Phase 1 AST optimization: Prevent AST\ArithmeticFactor + // if only one AST\ArithmeticPrimary is defined + if ($sign === null) { + return $primary; + } + + return new AST\ArithmeticFactor($primary, $sign); + } + + /** + * ArithmeticPrimary ::= SingleValuedPathExpression | Literal | ParenthesisExpression + * | FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings + * | FunctionsReturningDatetime | IdentificationVariable | ResultVariable + * | InputParameter | CaseExpression + */ + public function ArithmeticPrimary() + { + if ($this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) { + $this->match(Lexer::T_OPEN_PARENTHESIS); + + $expr = $this->SimpleArithmeticExpression(); + + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + return new AST\ParenthesisExpression($expr); + } + + switch ($this->lexer->lookahead['type']) { + case Lexer::T_COALESCE: + case Lexer::T_NULLIF: + case Lexer::T_CASE: + return $this->CaseExpression(); + + case Lexer::T_IDENTIFIER: + $peek = $this->lexer->glimpse(); + + if ($peek['value'] == '(') { + return $this->FunctionDeclaration(); + } + + if ($peek['value'] == '.') { + return $this->SingleValuedPathExpression(); + } + + if (isset($this->queryComponents[$this->lexer->lookahead['value']]['resultVariable'])) { + return $this->ResultVariable(); + } + + return $this->StateFieldPathExpression(); + + case Lexer::T_INPUT_PARAMETER: + return $this->InputParameter(); + + default: + $peek = $this->lexer->glimpse(); + + if ($peek['value'] == '(') { + if ($this->isAggregateFunction($this->lexer->lookahead['type'])) { + return $this->AggregateExpression(); + } + + return $this->FunctionDeclaration(); + } + + return $this->Literal(); + } + } + + /** + * StringExpression ::= StringPrimary | ResultVariable | "(" Subselect ")" + * + * @return \Doctrine\ORM\Query\AST\StringPrimary | + * \Doctrine\ORM\Query\AST\Subselect | + * string + */ + public function StringExpression() + { + $peek = $this->lexer->glimpse(); + + // Subselect + if ($this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS) && $peek['type'] === Lexer::T_SELECT) { + $this->match(Lexer::T_OPEN_PARENTHESIS); + $expr = $this->Subselect(); + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + return $expr; + } + + // ResultVariable (string) + if ($this->lexer->isNextToken(Lexer::T_IDENTIFIER) && + isset($this->queryComponents[$this->lexer->lookahead['value']]['resultVariable'])) { + return $this->ResultVariable(); + } + + return $this->StringPrimary(); + } + + /** + * StringPrimary ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression | CaseExpression + */ + public function StringPrimary() + { + $lookaheadType = $this->lexer->lookahead['type']; + + switch ($lookaheadType) { + case Lexer::T_IDENTIFIER: + $peek = $this->lexer->glimpse(); + + if ($peek['value'] == '.') { + return $this->StateFieldPathExpression(); + } + + if ($peek['value'] == '(') { + // do NOT directly go to FunctionsReturningString() because it doesn't check for custom functions. + return $this->FunctionDeclaration(); + } + + $this->syntaxError("'.' or '('"); + break; + + case Lexer::T_STRING: + $this->match(Lexer::T_STRING); + + return new AST\Literal(AST\Literal::STRING, $this->lexer->token['value']); + + case Lexer::T_INPUT_PARAMETER: + return $this->InputParameter(); + + case Lexer::T_CASE: + case Lexer::T_COALESCE: + case Lexer::T_NULLIF: + return $this->CaseExpression(); + + default: + if ($this->isAggregateFunction($lookaheadType)) { + return $this->AggregateExpression(); + } + } + + $this->syntaxError( + 'StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression' + ); + } + + /** + * EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression + * + * @return \Doctrine\ORM\Query\AST\SingleValuedAssociationPathExpression | + * \Doctrine\ORM\Query\AST\SimpleEntityExpression + */ + public function EntityExpression() + { + $glimpse = $this->lexer->glimpse(); + + if ($this->lexer->isNextToken(Lexer::T_IDENTIFIER) && $glimpse['value'] === '.') { + return $this->SingleValuedAssociationPathExpression(); + } + + return $this->SimpleEntityExpression(); + } + + /** + * SimpleEntityExpression ::= IdentificationVariable | InputParameter + * + * @return string | \Doctrine\ORM\Query\AST\InputParameter + */ + public function SimpleEntityExpression() + { + if ($this->lexer->isNextToken(Lexer::T_INPUT_PARAMETER)) { + return $this->InputParameter(); + } + + return $this->StateFieldPathExpression(); + } + + /** + * AggregateExpression ::= + * ("AVG" | "MAX" | "MIN" | "SUM" | "COUNT") "(" ["DISTINCT"] SimpleArithmeticExpression ")" + * + * @return \Doctrine\ORM\Query\AST\AggregateExpression + */ + public function AggregateExpression() + { + $lookaheadType = $this->lexer->lookahead['type']; + $isDistinct = false; + + if ( ! in_array($lookaheadType, array(Lexer::T_COUNT, Lexer::T_AVG, Lexer::T_MAX, Lexer::T_MIN, Lexer::T_SUM))) { + $this->syntaxError('One of: MAX, MIN, AVG, SUM, COUNT'); + } + + $this->match($lookaheadType); + $functionName = $this->lexer->token['value']; + $this->match(Lexer::T_OPEN_PARENTHESIS); + + if ($this->lexer->isNextToken(Lexer::T_DISTINCT)) { + $this->match(Lexer::T_DISTINCT); + $isDistinct = true; + } + + $pathExp = $this->SimpleArithmeticExpression(); + + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + return new AST\AggregateExpression($functionName, $pathExp, $isDistinct); + } + + /** + * QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")" + * + * @return \Doctrine\ORM\Query\AST\QuantifiedExpression + */ + public function QuantifiedExpression() + { + $lookaheadType = $this->lexer->lookahead['type']; + $value = $this->lexer->lookahead['value']; + + if ( ! in_array($lookaheadType, array(Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME))) { + $this->syntaxError('ALL, ANY or SOME'); + } + + $this->match($lookaheadType); + $this->match(Lexer::T_OPEN_PARENTHESIS); + + $qExpr = new AST\QuantifiedExpression($this->Subselect()); + $qExpr->type = $value; + + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + return $qExpr; + } + + /** + * BetweenExpression ::= ArithmeticExpression ["NOT"] "BETWEEN" ArithmeticExpression "AND" ArithmeticExpression + * + * @return \Doctrine\ORM\Query\AST\BetweenExpression + */ + public function BetweenExpression() + { + $not = false; + $arithExpr1 = $this->ArithmeticExpression(); + + if ($this->lexer->isNextToken(Lexer::T_NOT)) { + $this->match(Lexer::T_NOT); + $not = true; + } + + $this->match(Lexer::T_BETWEEN); + $arithExpr2 = $this->ArithmeticExpression(); + $this->match(Lexer::T_AND); + $arithExpr3 = $this->ArithmeticExpression(); + + $betweenExpr = new AST\BetweenExpression($arithExpr1, $arithExpr2, $arithExpr3); + $betweenExpr->not = $not; + + return $betweenExpr; + } + + /** + * ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression ) + * + * @return \Doctrine\ORM\Query\AST\ComparisonExpression + */ + public function ComparisonExpression() + { + $this->lexer->glimpse(); + + $leftExpr = $this->ArithmeticExpression(); + $operator = $this->ComparisonOperator(); + $rightExpr = ($this->isNextAllAnySome()) + ? $this->QuantifiedExpression() + : $this->ArithmeticExpression(); + + return new AST\ComparisonExpression($leftExpr, $operator, $rightExpr); + } + + /** + * InExpression ::= SingleValuedPathExpression ["NOT"] "IN" "(" (InParameter {"," InParameter}* | Subselect) ")" + * + * @return \Doctrine\ORM\Query\AST\InExpression + */ + public function InExpression() + { + $inExpression = new AST\InExpression($this->ArithmeticExpression()); + + if ($this->lexer->isNextToken(Lexer::T_NOT)) { + $this->match(Lexer::T_NOT); + $inExpression->not = true; + } + + $this->match(Lexer::T_IN); + $this->match(Lexer::T_OPEN_PARENTHESIS); + + if ($this->lexer->isNextToken(Lexer::T_SELECT)) { + $inExpression->subselect = $this->Subselect(); + } else { + $literals = array(); + $literals[] = $this->InParameter(); + + while ($this->lexer->isNextToken(Lexer::T_COMMA)) { + $this->match(Lexer::T_COMMA); + $literals[] = $this->InParameter(); + } + + $inExpression->literals = $literals; + } + + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + return $inExpression; + } + + /** + * InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (InstanceOfParameter | "(" InstanceOfParameter {"," InstanceOfParameter}* ")") + * + * @return \Doctrine\ORM\Query\AST\InstanceOfExpression + */ + public function InstanceOfExpression() + { + $instanceOfExpression = new AST\InstanceOfExpression($this->IdentificationVariable()); + + if ($this->lexer->isNextToken(Lexer::T_NOT)) { + $this->match(Lexer::T_NOT); + $instanceOfExpression->not = true; + } + + $this->match(Lexer::T_INSTANCE); + $this->match(Lexer::T_OF); + + $exprValues = array(); + + if ($this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) { + $this->match(Lexer::T_OPEN_PARENTHESIS); + + $exprValues[] = $this->InstanceOfParameter(); + + while ($this->lexer->isNextToken(Lexer::T_COMMA)) { + $this->match(Lexer::T_COMMA); + + $exprValues[] = $this->InstanceOfParameter(); + } + + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + $instanceOfExpression->value = $exprValues; + + return $instanceOfExpression; + } + + $exprValues[] = $this->InstanceOfParameter(); + + $instanceOfExpression->value = $exprValues; + + return $instanceOfExpression; + } + + /** + * InstanceOfParameter ::= AbstractSchemaName | InputParameter + * + * @return mixed + */ + public function InstanceOfParameter() + { + if ($this->lexer->isNextToken(Lexer::T_INPUT_PARAMETER)) { + $this->match(Lexer::T_INPUT_PARAMETER); + + return new AST\InputParameter($this->lexer->token['value']); + } + + return $this->AliasIdentificationVariable(); + } + + /** + * LikeExpression ::= StringExpression ["NOT"] "LIKE" StringPrimary ["ESCAPE" char] + * + * @return \Doctrine\ORM\Query\AST\LikeExpression + */ + public function LikeExpression() + { + $stringExpr = $this->StringExpression(); + $not = false; + + if ($this->lexer->isNextToken(Lexer::T_NOT)) { + $this->match(Lexer::T_NOT); + $not = true; + } + + $this->match(Lexer::T_LIKE); + + if ($this->lexer->isNextToken(Lexer::T_INPUT_PARAMETER)) { + $this->match(Lexer::T_INPUT_PARAMETER); + $stringPattern = new AST\InputParameter($this->lexer->token['value']); + } else { + $stringPattern = $this->StringPrimary(); + } + + $escapeChar = null; + + if ($this->lexer->lookahead['type'] === Lexer::T_ESCAPE) { + $this->match(Lexer::T_ESCAPE); + $this->match(Lexer::T_STRING); + + $escapeChar = new AST\Literal(AST\Literal::STRING, $this->lexer->token['value']); + } + + $likeExpr = new AST\LikeExpression($stringExpr, $stringPattern, $escapeChar); + $likeExpr->not = $not; + + return $likeExpr; + } + + /** + * NullComparisonExpression ::= (InputParameter | NullIfExpression | CoalesceExpression | AggregateExpression | FunctionDeclaration | IdentificationVariable | SingleValuedPathExpression | ResultVariable) "IS" ["NOT"] "NULL" + * + * @return \Doctrine\ORM\Query\AST\NullComparisonExpression + */ + public function NullComparisonExpression() + { + switch (true) { + case $this->lexer->isNextToken(Lexer::T_INPUT_PARAMETER): + $this->match(Lexer::T_INPUT_PARAMETER); + + $expr = new AST\InputParameter($this->lexer->token['value']); + break; + + case $this->lexer->isNextToken(Lexer::T_NULLIF): + $expr = $this->NullIfExpression(); + break; + + case $this->lexer->isNextToken(Lexer::T_COALESCE): + $expr = $this->CoalesceExpression(); + break; + + case $this->isAggregateFunction($this->lexer->lookahead['type']): + $expr = $this->AggregateExpression(); + break; + + case $this->isFunction(): + $expr = $this->FunctionDeclaration(); + break; + + default: + // We need to check if we are in a IdentificationVariable or SingleValuedPathExpression + $glimpse = $this->lexer->glimpse(); + + if ($glimpse['type'] === Lexer::T_DOT) { + $expr = $this->SingleValuedPathExpression(); + + // Leave switch statement + break; + } + + $lookaheadValue = $this->lexer->lookahead['value']; + + // Validate existing component + if ( ! isset($this->queryComponents[$lookaheadValue])) { + $this->semanticalError('Cannot add having condition on undefined result variable.'); + } + + // Validating ResultVariable + if ( ! isset($this->queryComponents[$lookaheadValue]['resultVariable'])) { + $this->semanticalError('Cannot add having condition on a non result variable.'); + } + + $expr = $this->ResultVariable(); + break; + } + + $nullCompExpr = new AST\NullComparisonExpression($expr); + + $this->match(Lexer::T_IS); + + if ($this->lexer->isNextToken(Lexer::T_NOT)) { + $this->match(Lexer::T_NOT); + + $nullCompExpr->not = true; + } + + $this->match(Lexer::T_NULL); + + return $nullCompExpr; + } + + /** + * ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")" + * + * @return \Doctrine\ORM\Query\AST\ExistsExpression + */ + public function ExistsExpression() + { + $not = false; + + if ($this->lexer->isNextToken(Lexer::T_NOT)) { + $this->match(Lexer::T_NOT); + $not = true; + } + + $this->match(Lexer::T_EXISTS); + $this->match(Lexer::T_OPEN_PARENTHESIS); + + $existsExpression = new AST\ExistsExpression($this->Subselect()); + $existsExpression->not = $not; + + $this->match(Lexer::T_CLOSE_PARENTHESIS); + + return $existsExpression; + } + + /** + * ComparisonOperator ::= "=" | "<" | "<=" | "<>" | ">" | ">=" | "!=" + * + * @return string + */ + public function ComparisonOperator() + { + switch ($this->lexer->lookahead['value']) { + case '=': + $this->match(Lexer::T_EQUALS); + + return '='; + + case '<': + $this->match(Lexer::T_LOWER_THAN); + $operator = '<'; + + if ($this->lexer->isNextToken(Lexer::T_EQUALS)) { + $this->match(Lexer::T_EQUALS); + $operator .= '='; + } else if ($this->lexer->isNextToken(Lexer::T_GREATER_THAN)) { + $this->match(Lexer::T_GREATER_THAN); + $operator .= '>'; + } + + return $operator; + + case '>': + $this->match(Lexer::T_GREATER_THAN); + $operator = '>'; + + if ($this->lexer->isNextToken(Lexer::T_EQUALS)) { + $this->match(Lexer::T_EQUALS); + $operator .= '='; + } + + return $operator; + + case '!': + $this->match(Lexer::T_NEGATE); + $this->match(Lexer::T_EQUALS); + + return '<>'; + + default: + $this->syntaxError('=, <, <=, <>, >, >=, !='); + } + } + + /** + * FunctionDeclaration ::= FunctionsReturningStrings | FunctionsReturningNumerics | FunctionsReturningDatetime + * + * @return \Doctrine\ORM\Query\AST\Functions\FunctionNode + */ + public function FunctionDeclaration() + { + $token = $this->lexer->lookahead; + $funcName = strtolower($token['value']); + + // Check for built-in functions first! + switch (true) { + case (isset(self::$_STRING_FUNCTIONS[$funcName])): + return $this->FunctionsReturningStrings(); + + case (isset(self::$_NUMERIC_FUNCTIONS[$funcName])): + return $this->FunctionsReturningNumerics(); + + case (isset(self::$_DATETIME_FUNCTIONS[$funcName])): + return $this->FunctionsReturningDatetime(); + + default: + return $this->CustomFunctionDeclaration(); + } + } + + /** + * Helper function for FunctionDeclaration grammar rule. + * + * @return \Doctrine\ORM\Query\AST\Functions\FunctionNode + */ + private function CustomFunctionDeclaration() + { + $token = $this->lexer->lookahead; + $funcName = strtolower($token['value']); + + // Check for custom functions afterwards + $config = $this->em->getConfiguration(); + + switch (true) { + case ($config->getCustomStringFunction($funcName) !== null): + return $this->CustomFunctionsReturningStrings(); + + case ($config->getCustomNumericFunction($funcName) !== null): + return $this->CustomFunctionsReturningNumerics(); + + case ($config->getCustomDatetimeFunction($funcName) !== null): + return $this->CustomFunctionsReturningDatetime(); + + default: + $this->syntaxError('known function', $token); + } + } + + /** + * FunctionsReturningNumerics ::= + * "LENGTH" "(" StringPrimary ")" | + * "LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")" | + * "ABS" "(" SimpleArithmeticExpression ")" | + * "SQRT" "(" SimpleArithmeticExpression ")" | + * "MOD" "(" SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | + * "SIZE" "(" CollectionValuedPathExpression ")" | + * "DATE_DIFF" "(" ArithmeticPrimary "," ArithmeticPrimary ")" | + * "BIT_AND" "(" ArithmeticPrimary "," ArithmeticPrimary ")" | + * "BIT_OR" "(" ArithmeticPrimary "," ArithmeticPrimary ")" + * + * @return \Doctrine\ORM\Query\AST\Functions\FunctionNode + */ + public function FunctionsReturningNumerics() + { + $funcNameLower = strtolower($this->lexer->lookahead['value']); + $funcClass = self::$_NUMERIC_FUNCTIONS[$funcNameLower]; + + $function = new $funcClass($funcNameLower); + $function->parse($this); + + return $function; + } + + /** + * @return \Doctrine\ORM\Query\AST\Functions\FunctionNode + */ + public function CustomFunctionsReturningNumerics() + { + // getCustomNumericFunction is case-insensitive + $functionName = strtolower($this->lexer->lookahead['value']); + $functionClass = $this->em->getConfiguration()->getCustomNumericFunction($functionName); + + $function = is_string($functionClass) + ? new $functionClass($functionName) + : call_user_func($functionClass, $functionName); + + $function->parse($this); + + return $function; + } + + /** + * FunctionsReturningDateTime ::= + * "CURRENT_DATE" | + * "CURRENT_TIME" | + * "CURRENT_TIMESTAMP" | + * "DATE_ADD" "(" ArithmeticPrimary "," ArithmeticPrimary "," StringPrimary ")" | + * "DATE_SUB" "(" ArithmeticPrimary "," ArithmeticPrimary "," StringPrimary ")" + * + * @return \Doctrine\ORM\Query\AST\Functions\FunctionNode + */ + public function FunctionsReturningDatetime() + { + $funcNameLower = strtolower($this->lexer->lookahead['value']); + $funcClass = self::$_DATETIME_FUNCTIONS[$funcNameLower]; + + $function = new $funcClass($funcNameLower); + $function->parse($this); + + return $function; + } + + /** + * @return \Doctrine\ORM\Query\AST\Functions\FunctionNode + */ + public function CustomFunctionsReturningDatetime() + { + // getCustomDatetimeFunction is case-insensitive + $functionName = $this->lexer->lookahead['value']; + $functionClass = $this->em->getConfiguration()->getCustomDatetimeFunction($functionName); + + $function = is_string($functionClass) + ? new $functionClass($functionName) + : call_user_func($functionClass, $functionName); + + $function->parse($this); + + return $function; + } + + /** + * FunctionsReturningStrings ::= + * "CONCAT" "(" StringPrimary "," StringPrimary ")" | + * "SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | + * "TRIM" "(" [["LEADING" | "TRAILING" | "BOTH"] [char] "FROM"] StringPrimary ")" | + * "LOWER" "(" StringPrimary ")" | + * "UPPER" "(" StringPrimary ")" | + * "IDENTITY" "(" SingleValuedAssociationPathExpression {"," string} ")" + * + * @return \Doctrine\ORM\Query\AST\Functions\FunctionNode + */ + public function FunctionsReturningStrings() + { + $funcNameLower = strtolower($this->lexer->lookahead['value']); + $funcClass = self::$_STRING_FUNCTIONS[$funcNameLower]; + + $function = new $funcClass($funcNameLower); + $function->parse($this); + + return $function; + } + + /** + * @return \Doctrine\ORM\Query\AST\Functions\FunctionNode + */ + public function CustomFunctionsReturningStrings() + { + // getCustomStringFunction is case-insensitive + $functionName = $this->lexer->lookahead['value']; + $functionClass = $this->em->getConfiguration()->getCustomStringFunction($functionName); + + $function = is_string($functionClass) + ? new $functionClass($functionName) + : call_user_func($functionClass, $functionName); + + $function->parse($this); + + return $function; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ParserResult.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ParserResult.php new file mode 100644 index 0000000000000000000000000000000000000000..dfc7361f8ba69998f421dceb7a436b2ff4aca843 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ParserResult.php @@ -0,0 +1,145 @@ +. + */ + +namespace Doctrine\ORM\Query; + +/** + * Encapsulates the resulting components from a DQL query parsing process that + * can be serialized. + * + * @author Guilherme Blanco + * @author Janne Vanhala + * @author Roman Borschel + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://www.doctrine-project.org + * @since 2.0 + */ +class ParserResult +{ + /** + * The SQL executor used for executing the SQL. + * + * @var \Doctrine\ORM\Query\Exec\AbstractSqlExecutor + */ + private $_sqlExecutor; + + /** + * The ResultSetMapping that describes how to map the SQL result set. + * + * @var \Doctrine\ORM\Query\ResultSetMapping + */ + private $_resultSetMapping; + + /** + * The mappings of DQL parameter names/positions to SQL parameter positions. + * + * @var array + */ + private $_parameterMappings = array(); + + /** + * Initializes a new instance of the ParserResult class. + * The new instance is initialized with an empty ResultSetMapping. + */ + public function __construct() + { + $this->_resultSetMapping = new ResultSetMapping; + } + + /** + * Gets the ResultSetMapping for the parsed query. + * + * @return ResultSetMapping|null The result set mapping of the parsed query or NULL + * if the query is not a SELECT query. + */ + public function getResultSetMapping() + { + return $this->_resultSetMapping; + } + + /** + * Sets the ResultSetMapping of the parsed query. + * + * @param ResultSetMapping $rsm + * + * @return void + */ + public function setResultSetMapping(ResultSetMapping $rsm) + { + $this->_resultSetMapping = $rsm; + } + + /** + * Sets the SQL executor that should be used for this ParserResult. + * + * @param \Doctrine\ORM\Query\Exec\AbstractSqlExecutor $executor + * + * @return void + */ + public function setSqlExecutor($executor) + { + $this->_sqlExecutor = $executor; + } + + /** + * Gets the SQL executor used by this ParserResult. + * + * @return \Doctrine\ORM\Query\Exec\AbstractSqlExecutor + */ + public function getSqlExecutor() + { + return $this->_sqlExecutor; + } + + /** + * Adds a DQL to SQL parameter mapping. One DQL parameter name/position can map to + * several SQL parameter positions. + * + * @param string|integer $dqlPosition + * @param integer $sqlPosition + * + * @return void + */ + public function addParameterMapping($dqlPosition, $sqlPosition) + { + $this->_parameterMappings[$dqlPosition][] = $sqlPosition; + } + + /** + * Gets all DQL to SQL parameter mappings. + * + * @return array The parameter mappings. + */ + public function getParameterMappings() + { + return $this->_parameterMappings; + } + + /** + * Gets the SQL parameter positions for a DQL parameter name/position. + * + * @param string|integer $dqlPosition The name or position of the DQL parameter. + * + * @return array The positions of the corresponding SQL parameters. + */ + public function getSqlParameterPositions($dqlPosition) + { + return $this->_parameterMappings[$dqlPosition]; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Printer.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Printer.php new file mode 100644 index 0000000000000000000000000000000000000000..d92ad850f5ba76780932259c5360b655b1880f85 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Printer.php @@ -0,0 +1,98 @@ +. + */ + +namespace Doctrine\ORM\Query; + +/** + * A parse tree printer for Doctrine Query Language parser. + * + * @author Janne Vanhala + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://www.phpdoctrine.org + * @since 2.0 + */ +class Printer +{ + /** + * Current indentation level + * + * @var int + */ + protected $_indent = 0; + + /** + * Defines whether parse tree is printed (default, false) or not (true). + * + * @var bool + */ + protected $_silent; + + /** + * Constructs a new parse tree printer. + * + * @param bool $silent Parse tree will not be printed if true. + */ + public function __construct($silent = false) + { + $this->_silent = $silent; + } + + /** + * Prints an opening parenthesis followed by production name and increases + * indentation level by one. + * + * This method is called before executing a production. + * + * @param string $name Production name. + * + * @return void + */ + public function startProduction($name) + { + $this->println('(' . $name); + $this->_indent++; + } + + /** + * Decreases indentation level by one and prints a closing parenthesis. + * + * This method is called after executing a production. + * + * @return void + */ + public function endProduction() + { + $this->_indent--; + $this->println(')'); + } + + /** + * Prints text indented with spaces depending on current indentation level. + * + * @param string $str The text. + * + * @return void + */ + public function println($str) + { + if ( ! $this->_silent) { + echo str_repeat(' ', $this->_indent), $str, "\n"; + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php new file mode 100644 index 0000000000000000000000000000000000000000..16a10856acc9989c0ca1a7e691d5b0ed2ee0222d --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php @@ -0,0 +1,266 @@ +. + */ + +namespace Doctrine\ORM\Query; + +/** + * Description of QueryException. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class QueryException extends \Doctrine\ORM\ORMException +{ + /** + * @param string $dql + * + * @return QueryException + */ + public static function dqlError($dql) + { + return new self($dql); + } + + /** + * @param string $message + * @param \Exception|null $previous + * + * @return QueryException + */ + public static function syntaxError($message, $previous = null) + { + return new self('[Syntax Error] ' . $message, 0, $previous); + } + + /** + * @param string $message + * @param \Exception|null $previous + * + * @return QueryException + */ + public static function semanticalError($message, $previous = null) + { + return new self('[Semantical Error] ' . $message, 0, $previous); + } + + /** + * @return QueryException + */ + public static function invalidLockMode() + { + return new self('Invalid lock mode hint provided.'); + } + + /** + * @param string $expected + * @param string $received + * + * @return QueryException + */ + public static function invalidParameterType($expected, $received) + { + return new self('Invalid parameter type, ' . $received . ' given, but ' . $expected . ' expected.'); + } + + /** + * @param string $pos + * + * @return QueryException + */ + public static function invalidParameterPosition($pos) + { + return new self('Invalid parameter position: ' . $pos); + } + + /** + * @param integer $expected + * @param integer $received + * + * @return QueryException + */ + public static function tooManyParameters($expected, $received) + { + return new self('Too many parameters: the query defines ' . $expected . ' parameters and you bound ' . $received); + } + + /** + * @param integer $expected + * @param integer $received + * + * @return QueryException + */ + public static function tooFewParameters($expected, $received) + { + return new self('Too few parameters: the query defines ' . $expected . ' parameters but you only bound ' . $received); + } + + /** + * @param string $value + * + * @return QueryException + */ + public static function invalidParameterFormat($value) + { + return new self('Invalid parameter format, '.$value.' given, but : or ? expected.'); + } + + /** + * @param string $key + * + * @return QueryException + */ + public static function unknownParameter($key) + { + return new self("Invalid parameter: token ".$key." is not defined in the query."); + } + + /** + * @return QueryException + */ + public static function parameterTypeMismatch() + { + return new self("DQL Query parameter and type numbers mismatch, but have to be exactly equal."); + } + + /** + * @param object $pathExpr + * + * @return QueryException + */ + public static function invalidPathExpression($pathExpr) + { + return new self( + "Invalid PathExpression '" . $pathExpr->identificationVariable . "." . $pathExpr->field . "'." + ); + } + + /** + * @param string $literal + * + * @return QueryException + */ + public static function invalidLiteral($literal) + { + return new self("Invalid literal '$literal'"); + } + + /** + * @param array $assoc + * + * @return QueryException + */ + public static function iterateWithFetchJoinCollectionNotAllowed($assoc) + { + return new self( + "Invalid query operation: Not allowed to iterate over fetch join collections ". + "in class ".$assoc['sourceEntity']." association ".$assoc['fieldName'] + ); + } + + /** + * @return QueryException + */ + public static function partialObjectsAreDangerous() + { + return new self( + "Loading partial objects is dangerous. Fetch full objects or consider " . + "using a different fetch mode. If you really want partial objects, " . + "set the doctrine.forcePartialLoad query hint to TRUE." + ); + } + + /** + * @param array $assoc + * + * @return QueryException + */ + public static function overwritingJoinConditionsNotYetSupported($assoc) + { + return new self( + "Unsupported query operation: It is not yet possible to overwrite the join ". + "conditions in class ".$assoc['sourceEntityName']." association ".$assoc['fieldName'].". ". + "Use WITH to append additional join conditions to the association." + ); + } + + /** + * @return QueryException + */ + public static function associationPathInverseSideNotSupported() + { + return new self( + "A single-valued association path expression to an inverse side is not supported". + " in DQL queries. Use an explicit join instead." + ); + } + + /** + * @param array $assoc + * + * @return QueryException + */ + public static function iterateWithFetchJoinNotAllowed($assoc) + { + return new self( + "Iterate with fetch join in class " . $assoc['sourceEntity'] . + " using association " . $assoc['fieldName'] . " not allowed." + ); + } + + /** + * @return QueryException + */ + public static function associationPathCompositeKeyNotSupported() + { + return new self( + "A single-valued association path expression to an entity with a composite primary ". + "key is not supported. Explicitly name the components of the composite primary key ". + "in the query." + ); + } + + /** + * @param string $className + * @param string $rootClass + * + * @return QueryException + */ + public static function instanceOfUnrelatedClass($className, $rootClass) + { + return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " . + "inheritance hierarchy does not exists between these two classes."); + } + + /** + * @param string $dqlAlias + * + * @return QueryException + */ + public static function invalidQueryComponent($dqlAlias) + { + return new self( + "Invalid query component given for DQL alias '" . $dqlAlias . "', ". + "requires 'metadata', 'parent', 'relation', 'map', 'nestingLevel' and 'token' keys." + ); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryExpressionVisitor.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryExpressionVisitor.php new file mode 100644 index 0000000000000000000000000000000000000000..fe547081f3896fc8041f55331acb2e3132729467 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryExpressionVisitor.php @@ -0,0 +1,211 @@ +. + */ + +namespace Doctrine\ORM\Query; + +use Doctrine\Common\Collections\ArrayCollection; + +use Doctrine\Common\Collections\Expr\ExpressionVisitor; +use Doctrine\Common\Collections\Expr\Comparison; +use Doctrine\Common\Collections\Expr\CompositeExpression; +use Doctrine\Common\Collections\Expr\Value; + +/** + * Converts Collection expressions to Query expressions. + * + * @author Kirill chEbba Chebunin + * @since 2.4 + */ +class QueryExpressionVisitor extends ExpressionVisitor +{ + /** + * @var array + */ + private static $operatorMap = array( + Comparison::GT => Expr\Comparison::GT, + Comparison::GTE => Expr\Comparison::GTE, + Comparison::LT => Expr\Comparison::LT, + Comparison::LTE => Expr\Comparison::LTE + ); + + /** + * @var array + */ + private $queryAliases; + + /** + * @var Expr + */ + private $expr; + + /** + * @var array + */ + private $parameters = array(); + + /** + * Constructor + * + * @param array $queryAliases + */ + public function __construct($queryAliases) + { + $this->queryAliases = $queryAliases; + $this->expr = new Expr(); + } + + /** + * Gets bound parameters. + * Filled after {@link dispach()}. + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getParameters() + { + return new ArrayCollection($this->parameters); + } + + /** + * Clears parameters. + * + * @return void + */ + public function clearParameters() + { + $this->parameters = array(); + } + + /** + * Converts Criteria expression to Query one based on static map. + * + * @param string $criteriaOperator + * + * @return string|null + */ + private static function convertComparisonOperator($criteriaOperator) + { + return isset(self::$operatorMap[$criteriaOperator]) ? self::$operatorMap[$criteriaOperator] : null; + } + + /** + * {@inheritDoc} + */ + public function walkCompositeExpression(CompositeExpression $expr) + { + $expressionList = array(); + + foreach ($expr->getExpressionList() as $child) { + $expressionList[] = $this->dispatch($child); + } + + switch($expr->getType()) { + case CompositeExpression::TYPE_AND: + return new Expr\Andx($expressionList); + + case CompositeExpression::TYPE_OR: + return new Expr\Orx($expressionList); + + default: + throw new \RuntimeException("Unknown composite " . $expr->getType()); + } + } + + /** + * {@inheritDoc} + */ + public function walkComparison(Comparison $comparison) + { + + if ( ! isset($this->queryAliases[0])) { + throw new QueryException('No aliases are set before invoking walkComparison().'); + } + + $field = $this->queryAliases[0] . '.' . $comparison->getField(); + + foreach($this->queryAliases as $alias) { + if(strpos($comparison->getField() . '.', $alias . '.') === 0) { + $field = $comparison->getField(); + break; + } + } + + $parameterName = str_replace('.', '_', $comparison->getField()); + + foreach($this->parameters as $parameter) { + if($parameter->getName() === $parameterName) { + $parameterName .= '_' . count($this->parameters); + break; + } + } + + $parameter = new Parameter($parameterName, $this->walkValue($comparison->getValue())); + $placeholder = ':' . $parameterName; + + switch ($comparison->getOperator()) { + case Comparison::IN: + $this->parameters[] = $parameter; + return $this->expr->in($field, $placeholder); + + case Comparison::NIN: + $this->parameters[] = $parameter; + return $this->expr->notIn($field, $placeholder); + + case Comparison::EQ: + case Comparison::IS: + if ($this->walkValue($comparison->getValue()) === null) { + return $this->expr->isNull($field); + } + $this->parameters[] = $parameter; + return $this->expr->eq($field, $placeholder); + + case Comparison::NEQ: + if ($this->walkValue($comparison->getValue()) === null) { + return $this->expr->isNotNull($field); + } + $this->parameters[] = $parameter; + return $this->expr->neq($field, $placeholder); + + case Comparison::CONTAINS: + $parameter->setValue('%' . $parameter->getValue() . '%', $parameter->getType()); + $this->parameters[] = $parameter; + return $this->expr->like($field, $placeholder); + + default: + $operator = self::convertComparisonOperator($comparison->getOperator()); + if ($operator) { + $this->parameters[] = $parameter; + return new Expr\Comparison( + $field, + $operator, + $placeholder + ); + } + + throw new \RuntimeException("Unknown comparison operator: " . $comparison->getOperator()); + } + } + + /** + * {@inheritDoc} + */ + public function walkValue(Value $value) + { + return $value->getValue(); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ResultSetMapping.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ResultSetMapping.php new file mode 100644 index 0000000000000000000000000000000000000000..bdd5de75eff70eac6b9f226115a2448c4a1342b4 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ResultSetMapping.php @@ -0,0 +1,578 @@ +. + */ + +namespace Doctrine\ORM\Query; + +/** + * A ResultSetMapping describes how a result set of an SQL query maps to a Doctrine result. + * + * IMPORTANT NOTE: + * The properties of this class are only public for fast internal READ access and to (drastically) + * reduce the size of serialized instances for more effective caching due to better (un-)serialization + * performance. + * + * Users should use the public methods. + * + * @author Roman Borschel + * @since 2.0 + * @todo Think about whether the number of lookup maps can be reduced. + */ +class ResultSetMapping +{ + /** + * Whether the result is mixed (contains scalar values together with field values). + * + * @ignore + * @var boolean + */ + public $isMixed = false; + + /** + * Whether the result is a select statement. + * + * @ignore + * @var boolean + */ + public $isSelect = true; + + /** + * Maps alias names to class names. + * + * @ignore + * @var array + */ + public $aliasMap = array(); + + /** + * Maps alias names to related association field names. + * + * @ignore + * @var array + */ + public $relationMap = array(); + + /** + * Maps alias names to parent alias names. + * + * @ignore + * @var array + */ + public $parentAliasMap = array(); + + /** + * Maps column names in the result set to field names for each class. + * + * @ignore + * @var array + */ + public $fieldMappings = array(); + + /** + * Maps column names in the result set to the alias/field name to use in the mapped result. + * + * @ignore + * @var array + */ + public $scalarMappings = array(); + + /** + * Maps column names in the result set to the alias/field type to use in the mapped result. + * + * @ignore + * @var array + */ + public $typeMappings = array(); + + /** + * Maps entities in the result set to the alias name to use in the mapped result. + * + * @ignore + * @var array + */ + public $entityMappings = array(); + + /** + * Maps column names of meta columns (foreign keys, discriminator columns, ...) to field names. + * + * @ignore + * @var array + */ + public $metaMappings = array(); + + /** + * Maps column names in the result set to the alias they belong to. + * + * @ignore + * @var array + */ + public $columnOwnerMap = array(); + + /** + * List of columns in the result set that are used as discriminator columns. + * + * @ignore + * @var array + */ + public $discriminatorColumns = array(); + + /** + * Maps alias names to field names that should be used for indexing. + * + * @ignore + * @var array + */ + public $indexByMap = array(); + + /** + * Map from column names to class names that declare the field the column is mapped to. + * + * @ignore + * @var array + */ + public $declaringClasses = array(); + + /** + * This is necessary to hydrate derivate foreign keys correctly. + * + * @var array + */ + public $isIdentifierColumn = array(); + + /** + * Maps column names in the result set to field names for each new object expression. + * + * @var array + */ + public $newObjectMappings = array(); + + /** + * Maps metadata parameter names to the metadata attribute. + * + * @var array + */ + public $metadataParameterMapping = array(); + + /** + * Adds an entity result to this ResultSetMapping. + * + * @param string $class The class name of the entity. + * @param string $alias The alias for the class. The alias must be unique among all entity + * results or joined entity results within this ResultSetMapping. + * @param string|null $resultAlias The result alias with which the entity result should be + * placed in the result structure. + * + * @return ResultSetMapping This ResultSetMapping instance. + * + * @todo Rename: addRootEntity + */ + public function addEntityResult($class, $alias, $resultAlias = null) + { + $this->aliasMap[$alias] = $class; + $this->entityMappings[$alias] = $resultAlias; + + if ($resultAlias !== null) { + $this->isMixed = true; + } + + return $this; + } + + /** + * Sets a discriminator column for an entity result or joined entity result. + * The discriminator column will be used to determine the concrete class name to + * instantiate. + * + * @param string $alias The alias of the entity result or joined entity result the discriminator + * column should be used for. + * @param string $discrColumn The name of the discriminator column in the SQL result set. + * + * @return ResultSetMapping This ResultSetMapping instance. + * + * @todo Rename: addDiscriminatorColumn + */ + public function setDiscriminatorColumn($alias, $discrColumn) + { + $this->discriminatorColumns[$alias] = $discrColumn; + $this->columnOwnerMap[$discrColumn] = $alias; + + return $this; + } + + /** + * Sets a field to use for indexing an entity result or joined entity result. + * + * @param string $alias The alias of an entity result or joined entity result. + * @param string $fieldName The name of the field to use for indexing. + * + * @return ResultSetMapping This ResultSetMapping instance. + */ + public function addIndexBy($alias, $fieldName) + { + $found = false; + + foreach (array_merge($this->metaMappings, $this->fieldMappings) as $columnName => $columnFieldName) { + if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) continue; + + $this->addIndexByColumn($alias, $columnName); + $found = true; + + break; + } + + /* TODO: check if this exception can be put back, for now it's gone because of assumptions made by some ORM internals + if ( ! $found) { + $message = sprintf( + 'Cannot add index by for DQL alias %s and field %s without calling addFieldResult() for them before.', + $alias, + $fieldName + ); + + throw new \LogicException($message); + } + */ + + return $this; + } + + /** + * Sets to index by a scalar result column name. + * + * @param string $resultColumnName + * + * @return ResultSetMapping This ResultSetMapping instance. + */ + public function addIndexByScalar($resultColumnName) + { + $this->indexByMap['scalars'] = $resultColumnName; + + return $this; + } + + /** + * Sets a column to use for indexing an entity or joined entity result by the given alias name. + * + * @param string $alias + * @param string $resultColumnName + * + * @return ResultSetMapping This ResultSetMapping instance. + */ + public function addIndexByColumn($alias, $resultColumnName) + { + $this->indexByMap[$alias] = $resultColumnName; + + return $this; + } + + /** + * Checks whether an entity result or joined entity result with a given alias has + * a field set for indexing. + * + * @param string $alias + * + * @return boolean + * + * @todo Rename: isIndexed($alias) + */ + public function hasIndexBy($alias) + { + return isset($this->indexByMap[$alias]); + } + + /** + * Checks whether the column with the given name is mapped as a field result + * as part of an entity result or joined entity result. + * + * @param string $columnName The name of the column in the SQL result set. + * + * @return boolean + * + * @todo Rename: isField + */ + public function isFieldResult($columnName) + { + return isset($this->fieldMappings[$columnName]); + } + + /** + * Adds a field to the result that belongs to an entity or joined entity. + * + * @param string $alias The alias of the root entity or joined entity to which the field belongs. + * @param string $columnName The name of the column in the SQL result set. + * @param string $fieldName The name of the field on the declaring class. + * @param string|null $declaringClass The name of the class that declares/owns the specified field. + * When $alias refers to a superclass in a mapped hierarchy but + * the field $fieldName is defined on a subclass, specify that here. + * If not specified, the field is assumed to belong to the class + * designated by $alias. + * + * @return ResultSetMapping This ResultSetMapping instance. + * + * @todo Rename: addField + */ + public function addFieldResult($alias, $columnName, $fieldName, $declaringClass = null) + { + // column name (in result set) => field name + $this->fieldMappings[$columnName] = $fieldName; + // column name => alias of owner + $this->columnOwnerMap[$columnName] = $alias; + // field name => class name of declaring class + $this->declaringClasses[$columnName] = $declaringClass ?: $this->aliasMap[$alias]; + + if ( ! $this->isMixed && $this->scalarMappings) { + $this->isMixed = true; + } + + return $this; + } + + /** + * Adds a joined entity result. + * + * @param string $class The class name of the joined entity. + * @param string $alias The unique alias to use for the joined entity. + * @param string $parentAlias The alias of the entity result that is the parent of this joined result. + * @param string $relation The association field that connects the parent entity result + * with the joined entity result. + * + * @return ResultSetMapping This ResultSetMapping instance. + * + * @todo Rename: addJoinedEntity + */ + public function addJoinedEntityResult($class, $alias, $parentAlias, $relation) + { + $this->aliasMap[$alias] = $class; + $this->parentAliasMap[$alias] = $parentAlias; + $this->relationMap[$alias] = $relation; + + return $this; + } + + /** + * Adds a scalar result mapping. + * + * @param string $columnName The name of the column in the SQL result set. + * @param string $alias The result alias with which the scalar result should be placed in the result structure. + * @param string $type The column type + * + * @return ResultSetMapping This ResultSetMapping instance. + * + * @todo Rename: addScalar + */ + public function addScalarResult($columnName, $alias, $type = 'string') + { + $this->scalarMappings[$columnName] = $alias; + $this->typeMappings[$columnName] = $type; + + if ( ! $this->isMixed && $this->fieldMappings) { + $this->isMixed = true; + } + + return $this; + } + + /** + * Adds a metadata parameter mappings. + * + * @param mixed $parameter The parameter name in the SQL result set. + * @param string $attribute The metadata attribute. + */ + public function addMetadataParameterMapping($parameter, $attribute) + { + $this->metadataParameterMapping[$parameter] = $attribute; + } + + /** + * Checks whether a column with a given name is mapped as a scalar result. + * + * @param string $columnName The name of the column in the SQL result set. + * + * @return boolean + * + * @todo Rename: isScalar + */ + public function isScalarResult($columnName) + { + return isset($this->scalarMappings[$columnName]); + } + + /** + * Gets the name of the class of an entity result or joined entity result, + * identified by the given unique alias. + * + * @param string $alias + * + * @return string + */ + public function getClassName($alias) + { + return $this->aliasMap[$alias]; + } + + /** + * Gets the field alias for a column that is mapped as a scalar value. + * + * @param string $columnName The name of the column in the SQL result set. + * + * @return string + */ + public function getScalarAlias($columnName) + { + return $this->scalarMappings[$columnName]; + } + + /** + * Gets the name of the class that owns a field mapping for the specified column. + * + * @param string $columnName + * + * @return string + */ + public function getDeclaringClass($columnName) + { + return $this->declaringClasses[$columnName]; + } + + /** + * @param string $alias + * + * @return AssociationMapping + */ + public function getRelation($alias) + { + return $this->relationMap[$alias]; + } + + /** + * @param string $alias + * + * @return boolean + */ + public function isRelation($alias) + { + return isset($this->relationMap[$alias]); + } + + /** + * Gets the alias of the class that owns a field mapping for the specified column. + * + * @param string $columnName + * + * @return string + */ + public function getEntityAlias($columnName) + { + return $this->columnOwnerMap[$columnName]; + } + + /** + * Gets the parent alias of the given alias. + * + * @param string $alias + * + * @return string + */ + public function getParentAlias($alias) + { + return $this->parentAliasMap[$alias]; + } + + /** + * Checks whether the given alias has a parent alias. + * + * @param string $alias + * + * @return boolean + */ + public function hasParentAlias($alias) + { + return isset($this->parentAliasMap[$alias]); + } + + /** + * Gets the field name for a column name. + * + * @param string $columnName + * + * @return string + */ + public function getFieldName($columnName) + { + return $this->fieldMappings[$columnName]; + } + + /** + * @return array + */ + public function getAliasMap() + { + return $this->aliasMap; + } + + /** + * Gets the number of different entities that appear in the mapped result. + * + * @return integer + */ + public function getEntityResultCount() + { + return count($this->aliasMap); + } + + /** + * Checks whether this ResultSetMapping defines a mixed result. + * + * Mixed results can only occur in object and array (graph) hydration. In such a + * case a mixed result means that scalar values are mixed with objects/array in + * the result. + * + * @return boolean + */ + public function isMixedResult() + { + return $this->isMixed; + } + + /** + * Adds a meta column (foreign key or discriminator column) to the result set. + * + * @param string $alias The result alias with which the meta result should be placed in the result structure. + * @param string $columnName The name of the column in the SQL result set. + * @param string $fieldName The name of the field on the declaring class. + * @param bool $isIdentifierColumn + * @param string $type The column type + * + * @return ResultSetMapping This ResultSetMapping instance. + */ + public function addMetaResult($alias, $columnName, $fieldName, $isIdentifierColumn = false, $type = null) + { + $this->metaMappings[$columnName] = $fieldName; + $this->columnOwnerMap[$columnName] = $alias; + + if ($isIdentifierColumn) { + $this->isIdentifierColumn[$alias][$columnName] = true; + } + + if ($type) { + $this->typeMappings[$columnName] = $type; + } + + return $this; + } +} + diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..804a208efbe8f7ba43c911592b667549c25dfb00 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php @@ -0,0 +1,458 @@ +. + */ + +namespace Doctrine\ORM\Query; + +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Mapping\ClassMetadataInfo; + +/** + * A ResultSetMappingBuilder uses the EntityManager to automatically populate entity fields. + * + * @author Michael Ridgway + * @since 2.1 + */ +class ResultSetMappingBuilder extends ResultSetMapping +{ + /** + * Picking this rename mode will register entity columns as is, + * as they are in the database. This can cause clashes when multiple + * entities are fetched that have columns with the same name. + * + * @var int + */ + const COLUMN_RENAMING_NONE = 1; + + /** + * Picking custom renaming allows the user to define the renaming + * of specific columns with a rename array that contains column names as + * keys and result alias as values. + * + * @var int + */ + const COLUMN_RENAMING_CUSTOM = 2; + + /** + * Incremental renaming uses a result set mapping internal counter to add a + * number to each column result, leading to uniqueness. This only works if + * you use {@see generateSelectClause()} to generate the SELECT clause for + * you. + * + * @var int + */ + const COLUMN_RENAMING_INCREMENT = 3; + + /** + * @var int + */ + private $sqlCounter = 0; + + /** + * @var EntityManagerInterface + */ + private $em; + + /** + * Default column renaming mode. + * + * @var int + */ + private $defaultRenameMode; + + /** + * @param EntityManagerInterface $em + * @param integer $defaultRenameMode + */ + public function __construct(EntityManagerInterface $em, $defaultRenameMode = self::COLUMN_RENAMING_NONE) + { + $this->em = $em; + $this->defaultRenameMode = $defaultRenameMode; + } + + /** + * Adds a root entity and all of its fields to the result set. + * + * @param string $class The class name of the root entity. + * @param string $alias The unique alias to use for the root entity. + * @param array $renamedColumns Columns that have been renamed (tableColumnName => queryColumnName). + * @param int|null $renameMode One of the COLUMN_RENAMING_* constants or array for BC reasons (CUSTOM). + * + * @return void + */ + public function addRootEntityFromClassMetadata($class, $alias, $renamedColumns = array(), $renameMode = null) + { + $renameMode = $renameMode ?: $this->defaultRenameMode; + $columnAliasMap = $this->getColumnAliasMap($class, $renameMode, $renamedColumns); + + $this->addEntityResult($class, $alias); + $this->addAllClassFields($class, $alias, $columnAliasMap); + } + + /** + * Adds a joined entity and all of its fields to the result set. + * + * @param string $class The class name of the joined entity. + * @param string $alias The unique alias to use for the joined entity. + * @param string $parentAlias The alias of the entity result that is the parent of this joined result. + * @param object $relation The association field that connects the parent entity result + * with the joined entity result. + * @param array $renamedColumns Columns that have been renamed (tableColumnName => queryColumnName). + * @param int|null $renameMode One of the COLUMN_RENAMING_* constants or array for BC reasons (CUSTOM). + * + * @return void + */ + public function addJoinedEntityFromClassMetadata($class, $alias, $parentAlias, $relation, $renamedColumns = array(), $renameMode = null) + { + $renameMode = $renameMode ?: $this->defaultRenameMode; + $columnAliasMap = $this->getColumnAliasMap($class, $renameMode, $renamedColumns); + + $this->addJoinedEntityResult($class, $alias, $parentAlias, $relation); + $this->addAllClassFields($class, $alias, $columnAliasMap); + } + + /** + * Adds all fields of the given class to the result set mapping (columns and meta fields). + * + * @param string $class + * @param string $alias + * @param array $columnAliasMap + * + * @return void + * + * @throws \InvalidArgumentException + */ + protected function addAllClassFields($class, $alias, $columnAliasMap = array()) + { + $classMetadata = $this->em->getClassMetadata($class); + $platform = $this->em->getConnection()->getDatabasePlatform(); + + if ( ! $this->isInheritanceSupported($classMetadata)) { + throw new \InvalidArgumentException('ResultSetMapping builder does not currently support your inheritance scheme.'); + } + + + foreach ($classMetadata->getColumnNames() as $columnName) { + $propertyName = $classMetadata->getFieldName($columnName); + $columnAlias = $platform->getSQLResultCasing($columnAliasMap[$columnName]); + + if (isset($this->fieldMappings[$columnAlias])) { + throw new \InvalidArgumentException("The column '$columnName' conflicts with another column in the mapper."); + } + + $this->addFieldResult($alias, $columnAlias, $propertyName); + } + + foreach ($classMetadata->associationMappings as $associationMapping) { + if ($associationMapping['isOwningSide'] && $associationMapping['type'] & ClassMetadataInfo::TO_ONE) { + foreach ($associationMapping['joinColumns'] as $joinColumn) { + $columnName = $joinColumn['name']; + $columnAlias = $platform->getSQLResultCasing($columnAliasMap[$columnName]); + + if (isset($this->metaMappings[$columnAlias])) { + throw new \InvalidArgumentException("The column '$columnAlias' conflicts with another column in the mapper."); + } + + $this->addMetaResult( + $alias, + $columnAlias, + $columnName, + (isset($associationMapping['id']) && $associationMapping['id'] === true) + ); + } + } + } + } + + private function isInheritanceSupported(ClassMetadataInfo $classMetadata) + { + if ($classMetadata->isInheritanceTypeSingleTable() + && in_array($classMetadata->name, $classMetadata->discriminatorMap, true)) { + return true; + } + + return ! ($classMetadata->isInheritanceTypeSingleTable() || $classMetadata->isInheritanceTypeJoined()); + } + + /** + * Gets column alias for a given column. + * + * @param string $columnName + * @param int $mode + * @param array $customRenameColumns + * + * @return string + */ + private function getColumnAlias($columnName, $mode, array $customRenameColumns) + { + switch ($mode) { + case self::COLUMN_RENAMING_INCREMENT: + return $columnName . $this->sqlCounter++; + + case self::COLUMN_RENAMING_CUSTOM: + return isset($customRenameColumns[$columnName]) + ? $customRenameColumns[$columnName] : $columnName; + + case self::COLUMN_RENAMING_NONE: + return $columnName; + + } + } + + /** + * Retrieves a class columns and join columns aliases that are used in the SELECT clause. + * + * This depends on the renaming mode selected by the user. + * + * @param string $className + * @param int $mode + * @param array $customRenameColumns + * + * @return array + */ + private function getColumnAliasMap($className, $mode, array $customRenameColumns) + { + if ($customRenameColumns) { // for BC with 2.2-2.3 API + $mode = self::COLUMN_RENAMING_CUSTOM; + } + + $columnAlias = array(); + $class = $this->em->getClassMetadata($className); + + foreach ($class->getColumnNames() as $columnName) { + $columnAlias[$columnName] = $this->getColumnAlias($columnName, $mode, $customRenameColumns); + } + + foreach ($class->associationMappings as $associationMapping) { + if ($associationMapping['isOwningSide'] && $associationMapping['type'] & ClassMetadataInfo::TO_ONE) { + foreach ($associationMapping['joinColumns'] as $joinColumn) { + $columnName = $joinColumn['name']; + $columnAlias[$columnName] = $this->getColumnAlias($columnName, $mode, $customRenameColumns); + } + } + } + + return $columnAlias; + } + + /** + * Adds the mappings of the results of native SQL queries to the result set. + * + * @param ClassMetadataInfo $class + * @param array $queryMapping + * + * @return ResultSetMappingBuilder + */ + public function addNamedNativeQueryMapping(ClassMetadataInfo $class, array $queryMapping) + { + if (isset($queryMapping['resultClass'])) { + return $this->addNamedNativeQueryResultClassMapping($class, $queryMapping['resultClass']); + } + + return $this->addNamedNativeQueryResultSetMapping($class, $queryMapping['resultSetMapping']); + } + + /** + * Adds the class mapping of the results of native SQL queries to the result set. + * + * @param ClassMetadataInfo $class + * @param string $resultClassName + * + * @return ResultSetMappingBuilder + */ + public function addNamedNativeQueryResultClassMapping(ClassMetadataInfo $class, $resultClassName) + { + $classMetadata = $this->em->getClassMetadata($resultClassName); + $shortName = $classMetadata->reflClass->getShortName(); + $alias = strtolower($shortName[0]).'0'; + + $this->addEntityResult($class->name, $alias); + + if ($classMetadata->discriminatorColumn) { + $discriminatorColumn = $classMetadata->discriminatorColumn; + $this->setDiscriminatorColumn($alias, $discriminatorColumn['name']); + $this->addMetaResult($alias, $discriminatorColumn['name'], $discriminatorColumn['fieldName']); + } + + foreach ($classMetadata->getColumnNames() as $key => $columnName) { + $propertyName = $classMetadata->getFieldName($columnName); + $this->addFieldResult($alias, $columnName, $propertyName); + } + + foreach ($classMetadata->associationMappings as $associationMapping) { + if ($associationMapping['isOwningSide'] && $associationMapping['type'] & ClassMetadataInfo::TO_ONE) { + foreach ($associationMapping['joinColumns'] as $joinColumn) { + $columnName = $joinColumn['name']; + $this->addMetaResult($alias, $columnName, $columnName, $classMetadata->isIdentifier($columnName)); + } + } + } + + return $this; + } + + /** + * Adds the result set mapping of the results of native SQL queries to the result set. + * + * @param ClassMetadataInfo $class + * @param string $resultSetMappingName + * + * @return ResultSetMappingBuilder + */ + public function addNamedNativeQueryResultSetMapping(ClassMetadataInfo $class, $resultSetMappingName) + { + $counter = 0; + $resultMapping = $class->getSqlResultSetMapping($resultSetMappingName); + $rooShortName = $class->reflClass->getShortName(); + $rootAlias = strtolower($rooShortName[0]) . $counter; + + + if (isset($resultMapping['entities'])) { + foreach ($resultMapping['entities'] as $key => $entityMapping) { + $classMetadata = $this->em->getClassMetadata($entityMapping['entityClass']); + + if ($class->reflClass->name == $classMetadata->reflClass->name) { + $this->addEntityResult($classMetadata->name, $rootAlias); + $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $rootAlias); + } else { + $shortName = $classMetadata->reflClass->getShortName(); + $joinAlias = strtolower($shortName[0]) . ++ $counter; + $associations = $class->getAssociationsByTargetClass($classMetadata->name); + + foreach ($associations as $relation => $mapping) { + $this->addJoinedEntityResult($mapping['targetEntity'], $joinAlias, $rootAlias, $relation); + $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $joinAlias); + } + } + + } + } + + if (isset($resultMapping['columns'])) { + foreach ($resultMapping['columns'] as $entityMapping) { + $this->addScalarResult($entityMapping['name'], $entityMapping['name']); + } + } + + return $this; + } + + /** + * Adds the entity result mapping of the results of native SQL queries to the result set. + * + * @param ClassMetadataInfo $classMetadata + * @param array $entityMapping + * @param string $alias + * + * @return ResultSetMappingBuilder + * + * @throws \InvalidArgumentException + */ + public function addNamedNativeQueryEntityResultMapping(ClassMetadataInfo $classMetadata, array $entityMapping, $alias) + { + if (isset($entityMapping['discriminatorColumn']) && $entityMapping['discriminatorColumn']) { + $discriminatorColumn = $entityMapping['discriminatorColumn']; + $this->setDiscriminatorColumn($alias, $discriminatorColumn); + $this->addMetaResult($alias, $discriminatorColumn, $discriminatorColumn); + } + + if (isset($entityMapping['fields']) && !empty($entityMapping['fields'])) { + foreach ($entityMapping['fields'] as $field) { + $fieldName = $field['name']; + $relation = null; + + if(strpos($fieldName, '.')){ + list($relation, $fieldName) = explode('.', $fieldName); + } + + if (isset($classMetadata->associationMappings[$relation])) { + if($relation) { + $associationMapping = $classMetadata->associationMappings[$relation]; + $joinAlias = $alias.$relation; + $parentAlias = $alias; + + $this->addJoinedEntityResult($associationMapping['targetEntity'], $joinAlias, $parentAlias, $relation); + $this->addFieldResult($joinAlias, $field['column'], $fieldName); + }else { + $this->addFieldResult($alias, $field['column'], $fieldName, $classMetadata->name); + } + } else { + if(!isset($classMetadata->fieldMappings[$fieldName])) { + throw new \InvalidArgumentException("Entity '".$classMetadata->name."' has no field '".$fieldName."'. "); + } + $this->addFieldResult($alias, $field['column'], $fieldName, $classMetadata->name); + } + } + + } else { + foreach ($classMetadata->getColumnNames() as $columnName) { + $propertyName = $classMetadata->getFieldName($columnName); + $this->addFieldResult($alias, $columnName, $propertyName); + } + } + + return $this; + } + + /** + * Generates the Select clause from this ResultSetMappingBuilder. + * + * Works only for all the entity results. The select parts for scalar + * expressions have to be written manually. + * + * @param array $tableAliases + * + * @return string + */ + public function generateSelectClause($tableAliases = array()) + { + $sql = ""; + + foreach ($this->columnOwnerMap as $columnName => $dqlAlias) { + $tableAlias = isset($tableAliases[$dqlAlias]) + ? $tableAliases[$dqlAlias] : $dqlAlias; + + if ($sql) { + $sql .= ", "; + } + + $sql .= $tableAlias . "."; + + if (isset($this->fieldMappings[$columnName])) { + $class = $this->em->getClassMetadata($this->declaringClasses[$columnName]); + $sql .= $class->fieldMappings[$this->fieldMappings[$columnName]]['columnName']; + } else if (isset($this->metaMappings[$columnName])) { + $sql .= $this->metaMappings[$columnName]; + } else if (isset($this->discriminatorColumns[$dqlAlias])) { + $sql .= $this->discriminatorColumns[$dqlAlias]; + } + + $sql .= " AS " . $columnName; + } + + return $sql; + } + + /** + * @return string + */ + public function __toString() + { + return $this->generateSelectClause(array()); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php new file mode 100644 index 0000000000000000000000000000000000000000..9c4ac2a88af4636c2ccee3150622e65896dadca8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php @@ -0,0 +1,2326 @@ +. + */ + +namespace Doctrine\ORM\Query; + +use Doctrine\DBAL\LockMode; +use Doctrine\DBAL\Types\Type; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Query; +use Doctrine\ORM\OptimisticLockException; +use Doctrine\ORM\Mapping\ClassMetadataInfo; + +/** + * The SqlWalker is a TreeWalker that walks over a DQL AST and constructs + * the corresponding SQL. + * + * @author Guilherme Blanco + * @author Roman Borschel + * @author Benjamin Eberlei + * @author Alexander + * @author Fabio B. Silva + * @since 2.0 + * @todo Rename: SQLWalker + */ +class SqlWalker implements TreeWalker +{ + /** + * @var string + */ + const HINT_DISTINCT = 'doctrine.distinct'; + + /** + * @var ResultSetMapping + */ + private $rsm; + + /** + * Counter for generating unique column aliases. + * + * @var integer + */ + private $aliasCounter = 0; + + /** + * Counter for generating unique table aliases. + * + * @var integer + */ + private $tableAliasCounter = 0; + + /** + * Counter for generating unique scalar result. + * + * @var integer + */ + private $scalarResultCounter = 1; + + /** + * Counter for generating unique parameter indexes. + * + * @var integer + */ + private $sqlParamIndex = 0; + + /** + * Counter for generating indexes. + * + * @var integer + */ + private $newObjectCounter = 0; + + /** + * @var ParserResult + */ + private $parserResult; + + /** + * @var \Doctrine\ORM\EntityManager + */ + private $em; + + /** + * @var \Doctrine\DBAL\Connection + */ + private $conn; + + /** + * @var \Doctrine\ORM\AbstractQuery + */ + private $query; + + /** + * @var array + */ + private $tableAliasMap = array(); + + /** + * Map from result variable names to their SQL column alias names. + * + * @var array + */ + private $scalarResultAliasMap = array(); + + /** + * Map from Table-Alias + Column-Name to OrderBy-Direction. + * + * @var array + */ + private $orderedColumnsMap = array(); + + /** + * Map from DQL-Alias + Field-Name to SQL Column Alias. + * + * @var array + */ + private $scalarFields = array(); + + /** + * Map of all components/classes that appear in the DQL query. + * + * @var array + */ + private $queryComponents; + + /** + * A list of classes that appear in non-scalar SelectExpressions. + * + * @var array + */ + private $selectedClasses = array(); + + /** + * The DQL alias of the root class of the currently traversed query. + * + * @var array + */ + private $rootAliases = array(); + + /** + * Flag that indicates whether to generate SQL table aliases in the SQL. + * These should only be generated for SELECT queries, not for UPDATE/DELETE. + * + * @var boolean + */ + private $useSqlTableAliases = true; + + /** + * The database platform abstraction. + * + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $platform; + + /** + * The quote strategy. + * + * @var \Doctrine\ORM\Mapping\QuoteStrategy + */ + private $quoteStrategy; + + /** + * {@inheritDoc} + */ + public function __construct($query, $parserResult, array $queryComponents) + { + $this->query = $query; + $this->parserResult = $parserResult; + $this->queryComponents = $queryComponents; + $this->rsm = $parserResult->getResultSetMapping(); + $this->em = $query->getEntityManager(); + $this->conn = $this->em->getConnection(); + $this->platform = $this->conn->getDatabasePlatform(); + $this->quoteStrategy = $this->em->getConfiguration()->getQuoteStrategy(); + } + + /** + * Gets the Query instance used by the walker. + * + * @return Query. + */ + public function getQuery() + { + return $this->query; + } + + /** + * Gets the Connection used by the walker. + * + * @return \Doctrine\DBAL\Connection + */ + public function getConnection() + { + return $this->conn; + } + + /** + * Gets the EntityManager used by the walker. + * + * @return \Doctrine\ORM\EntityManager + */ + public function getEntityManager() + { + return $this->em; + } + + /** + * Gets the information about a single query component. + * + * @param string $dqlAlias The DQL alias. + * + * @return array + */ + public function getQueryComponent($dqlAlias) + { + return $this->queryComponents[$dqlAlias]; + } + + /** + * {@inheritdoc} + */ + public function getQueryComponents() + { + return $this->queryComponents; + } + + /** + * {@inheritdoc} + */ + public function setQueryComponent($dqlAlias, array $queryComponent) + { + $requiredKeys = array('metadata', 'parent', 'relation', 'map', 'nestingLevel', 'token'); + + if (array_diff($requiredKeys, array_keys($queryComponent))) { + throw QueryException::invalidQueryComponent($dqlAlias); + } + + $this->queryComponents[$dqlAlias] = $queryComponent; + } + + /** + * {@inheritdoc} + */ + public function getExecutor($AST) + { + switch (true) { + case ($AST instanceof AST\DeleteStatement): + $primaryClass = $this->em->getClassMetadata($AST->deleteClause->abstractSchemaName); + + return ($primaryClass->isInheritanceTypeJoined()) + ? new Exec\MultiTableDeleteExecutor($AST, $this) + : new Exec\SingleTableDeleteUpdateExecutor($AST, $this); + + case ($AST instanceof AST\UpdateStatement): + $primaryClass = $this->em->getClassMetadata($AST->updateClause->abstractSchemaName); + + return ($primaryClass->isInheritanceTypeJoined()) + ? new Exec\MultiTableUpdateExecutor($AST, $this) + : new Exec\SingleTableDeleteUpdateExecutor($AST, $this); + + default: + return new Exec\SingleSelectExecutor($AST, $this); + } + } + + /** + * Generates a unique, short SQL table alias. + * + * @param string $tableName Table name + * @param string $dqlAlias The DQL alias. + * + * @return string Generated table alias. + */ + public function getSQLTableAlias($tableName, $dqlAlias = '') + { + $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; + + if ( ! isset($this->tableAliasMap[$tableName])) { + $this->tableAliasMap[$tableName] = (preg_match('/[a-z]/i', $tableName[0]) ? strtolower($tableName[0]) : 't') + . $this->tableAliasCounter++ . '_'; + } + + return $this->tableAliasMap[$tableName]; + } + + /** + * Forces the SqlWalker to use a specific alias for a table name, rather than + * generating an alias on its own. + * + * @param string $tableName + * @param string $alias + * @param string $dqlAlias + * + * @return string + */ + public function setSQLTableAlias($tableName, $alias, $dqlAlias = '') + { + $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; + + $this->tableAliasMap[$tableName] = $alias; + + return $alias; + } + + /** + * Gets an SQL column alias for a column name. + * + * @param string $columnName + * + * @return string + */ + public function getSQLColumnAlias($columnName) + { + return $this->quoteStrategy->getColumnAlias($columnName, $this->aliasCounter++, $this->platform); + } + + /** + * Generates the SQL JOINs that are necessary for Class Table Inheritance + * for the given class. + * + * @param ClassMetadata $class The class for which to generate the joins. + * @param string $dqlAlias The DQL alias of the class. + * + * @return string The SQL. + */ + private function _generateClassTableInheritanceJoins($class, $dqlAlias) + { + $sql = ''; + + $baseTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); + + // INNER JOIN parent class tables + foreach ($class->parentClasses as $parentClassName) { + $parentClass = $this->em->getClassMetadata($parentClassName); + $tableAlias = $this->getSQLTableAlias($parentClass->getTableName(), $dqlAlias); + + // If this is a joined association we must use left joins to preserve the correct result. + $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; + $sql .= 'JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON '; + + $sqlParts = array(); + + foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) { + $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName; + } + + // Add filters on the root class + if ($filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias)) { + $sqlParts[] = $filterSql; + } + + $sql .= implode(' AND ', $sqlParts); + } + + // Ignore subclassing inclusion if partial objects is disallowed + if ($this->query->getHint(Query::HINT_FORCE_PARTIAL_LOAD)) { + return $sql; + } + + // LEFT JOIN child class tables + foreach ($class->subClasses as $subClassName) { + $subClass = $this->em->getClassMetadata($subClassName); + $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); + + $sql .= ' LEFT JOIN ' . $this->quoteStrategy->getTableName($subClass, $this->platform) . ' ' . $tableAlias . ' ON '; + + $sqlParts = array(); + + foreach ($this->quoteStrategy->getIdentifierColumnNames($subClass, $this->platform) as $columnName) { + $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName; + } + + $sql .= implode(' AND ', $sqlParts); + } + + return $sql; + } + + /** + * @return string + */ + private function _generateOrderedCollectionOrderByItems() + { + $orderedColumns = array(); + + foreach ($this->selectedClasses as $selectedClass) { + $dqlAlias = $selectedClass['dqlAlias']; + $qComp = $this->queryComponents[$dqlAlias]; + + if ( ! isset($qComp['relation']['orderBy'])) { + continue; + } + + $persister = $this->em->getUnitOfWork()->getEntityPersister($qComp['metadata']->name); + + foreach ($qComp['relation']['orderBy'] as $fieldName => $orientation) { + $columnName = $this->quoteStrategy->getColumnName($fieldName, $qComp['metadata'], $this->platform); + $tableName = ($qComp['metadata']->isInheritanceTypeJoined()) + ? $persister->getOwningTable($fieldName) + : $qComp['metadata']->getTableName(); + + $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName; + + // OrderByClause should replace an ordered relation. see - DDC-2475 + if (isset($this->orderedColumnsMap[$orderedColumn])) { + continue; + } + + $this->orderedColumnsMap[$orderedColumn] = $orientation; + $orderedColumns[] = $orderedColumn . ' ' . $orientation; + } + } + + return implode(', ', $orderedColumns); + } + + /** + * Generates a discriminator column SQL condition for the class with the given DQL alias. + * + * @param array $dqlAliases List of root DQL aliases to inspect for discriminator restrictions. + * + * @return string + */ + private function _generateDiscriminatorColumnConditionSQL(array $dqlAliases) + { + $sqlParts = array(); + + foreach ($dqlAliases as $dqlAlias) { + $class = $this->queryComponents[$dqlAlias]['metadata']; + + if ( ! $class->isInheritanceTypeSingleTable()) continue; + + $conn = $this->em->getConnection(); + $values = array(); + + if ($class->discriminatorValue !== null) { // discriminators can be 0 + $values[] = $conn->quote($class->discriminatorValue); + } + + foreach ($class->subClasses as $subclassName) { + $values[] = $conn->quote($this->em->getClassMetadata($subclassName)->discriminatorValue); + } + + $sqlParts[] = (($this->useSqlTableAliases) ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.' : '') + . $class->discriminatorColumn['name'] . ' IN (' . implode(', ', $values) . ')'; + } + + $sql = implode(' AND ', $sqlParts); + + return (count($sqlParts) > 1) ? '(' . $sql . ')' : $sql; + } + + /** + * Generates the filter SQL for a given entity and table alias. + * + * @param ClassMetadata $targetEntity Metadata of the target entity. + * @param string $targetTableAlias The table alias of the joined/selected table. + * + * @return string The SQL query part to add to a query. + */ + private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) + { + if (!$this->em->hasFilters()) { + return ''; + } + + switch($targetEntity->inheritanceType) { + case ClassMetadata::INHERITANCE_TYPE_NONE: + break; + case ClassMetadata::INHERITANCE_TYPE_JOINED: + // The classes in the inheritance will be added to the query one by one, + // but only the root node is getting filtered + if ($targetEntity->name !== $targetEntity->rootEntityName) { + return ''; + } + break; + case ClassMetadata::INHERITANCE_TYPE_SINGLE_TABLE: + // With STI the table will only be queried once, make sure that the filters + // are added to the root entity + $targetEntity = $this->em->getClassMetadata($targetEntity->rootEntityName); + break; + default: + //@todo: throw exception? + return ''; + break; + } + + $filterClauses = array(); + foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { + if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { + $filterClauses[] = '(' . $filterExpr . ')'; + } + } + + return implode(' AND ', $filterClauses); + } + + /** + * {@inheritdoc} + */ + public function walkSelectStatement(AST\SelectStatement $AST) + { + $limit = $this->query->getMaxResults(); + $offset = $this->query->getFirstResult(); + $lockMode = $this->query->getHint(Query::HINT_LOCK_MODE); + $sql = $this->walkSelectClause($AST->selectClause) + . $this->walkFromClause($AST->fromClause) + . $this->walkWhereClause($AST->whereClause); + + if ($AST->groupByClause) { + $sql .= $this->walkGroupByClause($AST->groupByClause); + } + + if ($AST->havingClause) { + $sql .= $this->walkHavingClause($AST->havingClause); + } + + if ($AST->orderByClause) { + $sql .= $this->walkOrderByClause($AST->orderByClause); + } + + if ( ! $AST->orderByClause && ($orderBySql = $this->_generateOrderedCollectionOrderByItems())) { + $sql .= ' ORDER BY ' . $orderBySql; + } + + if ($limit !== null || $offset !== null) { + $sql = $this->platform->modifyLimitQuery($sql, $limit, $offset); + } + + if ($lockMode === null || $lockMode === false || $lockMode === LockMode::NONE) { + return $sql; + } + + if ($lockMode === LockMode::PESSIMISTIC_READ) { + return $sql . ' ' . $this->platform->getReadLockSQL(); + } + + if ($lockMode === LockMode::PESSIMISTIC_WRITE) { + return $sql . ' ' . $this->platform->getWriteLockSQL(); + } + + if ($lockMode !== LockMode::OPTIMISTIC) { + throw QueryException::invalidLockMode(); + } + + foreach ($this->selectedClasses as $selectedClass) { + if ( ! $selectedClass['class']->isVersioned) { + throw OptimisticLockException::lockFailed($selectedClass['class']->name); + } + } + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkUpdateStatement(AST\UpdateStatement $AST) + { + $this->useSqlTableAliases = false; + $this->rsm->isSelect = false; + + return $this->walkUpdateClause($AST->updateClause) + . $this->walkWhereClause($AST->whereClause); + } + + /** + * {@inheritdoc} + */ + public function walkDeleteStatement(AST\DeleteStatement $AST) + { + $this->useSqlTableAliases = false; + $this->rsm->isSelect = false; + + return $this->walkDeleteClause($AST->deleteClause) + . $this->walkWhereClause($AST->whereClause); + } + + /** + * Walks down an IdentificationVariable AST node, thereby generating the appropriate SQL. + * This one differs of ->walkIdentificationVariable() because it generates the entity identifiers. + * + * @param string $identVariable + * + * @return string + */ + public function walkEntityIdentificationVariable($identVariable) + { + $class = $this->queryComponents[$identVariable]['metadata']; + $tableAlias = $this->getSQLTableAlias($class->getTableName(), $identVariable); + $sqlParts = array(); + + foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) { + $sqlParts[] = $tableAlias . '.' . $columnName; + } + + return implode(', ', $sqlParts); + } + + /** + * Walks down an IdentificationVariable (no AST node associated), thereby generating the SQL. + * + * @param string $identificationVariable + * @param string $fieldName + * + * @return string The SQL. + */ + public function walkIdentificationVariable($identificationVariable, $fieldName = null) + { + $class = $this->queryComponents[$identificationVariable]['metadata']; + + if ( + $fieldName !== null && $class->isInheritanceTypeJoined() && + isset($class->fieldMappings[$fieldName]['inherited']) + ) { + $class = $this->em->getClassMetadata($class->fieldMappings[$fieldName]['inherited']); + } + + return $this->getSQLTableAlias($class->getTableName(), $identificationVariable); + } + + /** + * {@inheritdoc} + */ + public function walkPathExpression($pathExpr) + { + $sql = ''; + + switch ($pathExpr->type) { + case AST\PathExpression::TYPE_STATE_FIELD: + $fieldName = $pathExpr->field; + $dqlAlias = $pathExpr->identificationVariable; + $class = $this->queryComponents[$dqlAlias]['metadata']; + + if ($this->useSqlTableAliases) { + $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; + } + + $sql .= $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); + break; + + case AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION: + // 1- the owning side: + // Just use the foreign key, i.e. u.group_id + $fieldName = $pathExpr->field; + $dqlAlias = $pathExpr->identificationVariable; + $class = $this->queryComponents[$dqlAlias]['metadata']; + + if (isset($class->associationMappings[$fieldName]['inherited'])) { + $class = $this->em->getClassMetadata($class->associationMappings[$fieldName]['inherited']); + } + + $assoc = $class->associationMappings[$fieldName]; + + if ( ! $assoc['isOwningSide']) { + throw QueryException::associationPathInverseSideNotSupported(); + } + + // COMPOSITE KEYS NOT (YET?) SUPPORTED + if (count($assoc['sourceToTargetKeyColumns']) > 1) { + throw QueryException::associationPathCompositeKeyNotSupported(); + } + + if ($this->useSqlTableAliases) { + $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.'; + } + + $sql .= reset($assoc['targetToSourceKeyColumns']); + break; + + default: + throw QueryException::invalidPathExpression($pathExpr); + } + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkSelectClause($selectClause) + { + $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : ''); + $sqlSelectExpressions = array_filter(array_map(array($this, 'walkSelectExpression'), $selectClause->selectExpressions)); + + if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && $selectClause->isDistinct) { + $this->query->setHint(self::HINT_DISTINCT, true); + } + + $addMetaColumns = ! $this->query->getHint(Query::HINT_FORCE_PARTIAL_LOAD) && + $this->query->getHydrationMode() == Query::HYDRATE_OBJECT + || + $this->query->getHydrationMode() != Query::HYDRATE_OBJECT && + $this->query->getHint(Query::HINT_INCLUDE_META_COLUMNS); + + foreach ($this->selectedClasses as $selectedClass) { + $class = $selectedClass['class']; + $dqlAlias = $selectedClass['dqlAlias']; + $resultAlias = $selectedClass['resultAlias']; + + // Register as entity or joined entity result + if ($this->queryComponents[$dqlAlias]['relation'] === null) { + $this->rsm->addEntityResult($class->name, $dqlAlias, $resultAlias); + } else { + $this->rsm->addJoinedEntityResult( + $class->name, + $dqlAlias, + $this->queryComponents[$dqlAlias]['parent'], + $this->queryComponents[$dqlAlias]['relation']['fieldName'] + ); + } + + if ($class->isInheritanceTypeSingleTable() || $class->isInheritanceTypeJoined()) { + // Add discriminator columns to SQL + $rootClass = $this->em->getClassMetadata($class->rootEntityName); + $tblAlias = $this->getSQLTableAlias($rootClass->getTableName(), $dqlAlias); + $discrColumn = $rootClass->discriminatorColumn; + $columnAlias = $this->getSQLColumnAlias($discrColumn['name']); + + $sqlSelectExpressions[] = $tblAlias . '.' . $discrColumn['name'] . ' AS ' . $columnAlias; + + $this->rsm->setDiscriminatorColumn($dqlAlias, $columnAlias); + $this->rsm->addMetaResult($dqlAlias, $columnAlias, $discrColumn['fieldName']); + } + + // Add foreign key columns to SQL, if necessary + if ( ! $addMetaColumns && ! $class->containsForeignIdentifier) { + continue; + } + + // Add foreign key columns of class and also parent classes + foreach ($class->associationMappings as $assoc) { + if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) { + continue; + } else if ( !$addMetaColumns && !isset($assoc['id'])) { + continue; + } + + $owningClass = (isset($assoc['inherited'])) ? $this->em->getClassMetadata($assoc['inherited']) : $class; + $sqlTableAlias = $this->getSQLTableAlias($owningClass->getTableName(), $dqlAlias); + + $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); + + foreach ($assoc['targetToSourceKeyColumns'] as $targetColumn => $srcColumn) { + $columnAlias = $this->getSQLColumnAlias($srcColumn); + + $type = null; + $isIdentifier = (isset($assoc['id']) && $assoc['id'] === true); + $sqlSelectExpressions[] = $sqlTableAlias . '.' . $srcColumn . ' AS ' . $columnAlias; + + if (isset($targetClass->fieldNames[$targetColumn])) { + $type = $targetClass->fieldMappings[$targetClass->fieldNames[$targetColumn]]['type']; + } + + $this->rsm->addMetaResult($dqlAlias, $columnAlias, $srcColumn, $isIdentifier, $type); + } + } + + // Add foreign key columns to SQL, if necessary + if ( ! $addMetaColumns) { + continue; + } + + // Add foreign key columns of subclasses + foreach ($class->subClasses as $subClassName) { + $subClass = $this->em->getClassMetadata($subClassName); + $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); + + foreach ($subClass->associationMappings as $assoc) { + // Skip if association is inherited + if (isset($assoc['inherited'])) continue; + + if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) continue; + + foreach ($assoc['targetToSourceKeyColumns'] as $srcColumn) { + $columnAlias = $this->getSQLColumnAlias($srcColumn); + + $sqlSelectExpressions[] = $sqlTableAlias . '.' . $srcColumn . ' AS ' . $columnAlias; + + $this->rsm->addMetaResult($dqlAlias, $columnAlias, $srcColumn); + } + } + } + } + + $sql .= implode(', ', $sqlSelectExpressions); + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkFromClause($fromClause) + { + $identificationVarDecls = $fromClause->identificationVariableDeclarations; + $sqlParts = array(); + + foreach ($identificationVarDecls as $identificationVariableDecl) { + $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); + } + + return ' FROM ' . implode(', ', $sqlParts); + } + + /** + * Walks down a IdentificationVariableDeclaration AST node, thereby generating the appropriate SQL. + * + * @param AST\IdentificationVariableDeclaration $identificationVariableDecl + * + * @return string + */ + public function walkIdentificationVariableDeclaration($identificationVariableDecl) + { + $sql = $this->walkRangeVariableDeclaration($identificationVariableDecl->rangeVariableDeclaration); + + if ($identificationVariableDecl->indexBy) { + $this->walkIndexBy($identificationVariableDecl->indexBy); + } + + foreach ($identificationVariableDecl->joins as $join) { + $sql .= $this->walkJoin($join); + } + + return $sql; + } + + /** + * Walks down a IndexBy AST node. + * + * @param AST\IndexBy $indexBy + * + * @return void + */ + public function walkIndexBy($indexBy) + { + $pathExpression = $indexBy->simpleStateFieldPathExpression; + $alias = $pathExpression->identificationVariable; + $field = $pathExpression->field; + + if (isset($this->scalarFields[$alias][$field])) { + $this->rsm->addIndexByScalar($this->scalarFields[$alias][$field]); + + return; + } + + $this->rsm->addIndexBy($alias, $field); + } + + /** + * Walks down a RangeVariableDeclaration AST node, thereby generating the appropriate SQL. + * + * @param AST\RangeVariableDeclaration $rangeVariableDeclaration + * + * @return string + */ + public function walkRangeVariableDeclaration($rangeVariableDeclaration) + { + $class = $this->em->getClassMetadata($rangeVariableDeclaration->abstractSchemaName); + $dqlAlias = $rangeVariableDeclaration->aliasIdentificationVariable; + + if ($rangeVariableDeclaration->isRoot) { + $this->rootAliases[] = $dqlAlias; + } + + $sql = $this->platform->appendLockHint( + $this->quoteStrategy->getTableName($class, $this->platform) . ' ' . + $this->getSQLTableAlias($class->getTableName(), $dqlAlias), + $this->query->getHint(Query::HINT_LOCK_MODE) + ); + + if ($class->isInheritanceTypeJoined()) { + $sql .= $this->_generateClassTableInheritanceJoins($class, $dqlAlias); + } + + return $sql; + } + + /** + * Walks down a JoinAssociationDeclaration AST node, thereby generating the appropriate SQL. + * + * @param AST\JoinAssociationDeclaration $joinAssociationDeclaration + * @param int $joinType + * @param AST\ConditionalExpression $condExpr + * + * @return string + * + * @throws QueryException + */ + public function walkJoinAssociationDeclaration($joinAssociationDeclaration, $joinType = AST\Join::JOIN_TYPE_INNER, $condExpr = null) + { + $sql = ''; + + $associationPathExpression = $joinAssociationDeclaration->joinAssociationPathExpression; + $joinedDqlAlias = $joinAssociationDeclaration->aliasIdentificationVariable; + $indexBy = $joinAssociationDeclaration->indexBy; + + $relation = $this->queryComponents[$joinedDqlAlias]['relation']; + $targetClass = $this->em->getClassMetadata($relation['targetEntity']); + $sourceClass = $this->em->getClassMetadata($relation['sourceEntity']); + $targetTableName = $this->quoteStrategy->getTableName($targetClass,$this->platform); + + $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName(), $joinedDqlAlias); + $sourceTableAlias = $this->getSQLTableAlias($sourceClass->getTableName(), $associationPathExpression->identificationVariable); + + // Ensure we got the owning side, since it has all mapping info + $assoc = ( ! $relation['isOwningSide']) ? $targetClass->associationMappings[$relation['mappedBy']] : $relation; + + if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && (!$this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { + if ($relation['type'] == ClassMetadata::ONE_TO_MANY || $relation['type'] == ClassMetadata::MANY_TO_MANY) { + throw QueryException::iterateWithFetchJoinNotAllowed($assoc); + } + } + + $targetTableJoin = null; + + // This condition is not checking ClassMetadata::MANY_TO_ONE, because by definition it cannot + // be the owning side and previously we ensured that $assoc is always the owning side of the associations. + // The owning side is necessary at this point because only it contains the JoinColumn information. + switch (true) { + case ($assoc['type'] & ClassMetadata::TO_ONE): + $conditions = array(); + + foreach ($assoc['joinColumns'] as $joinColumn) { + $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); + $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); + + if ($relation['isOwningSide']) { + $conditions[] = $sourceTableAlias . '.' . $quotedSourceColumn . ' = ' . $targetTableAlias . '.' . $quotedTargetColumn; + + continue; + } + + $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $targetTableAlias . '.' . $quotedSourceColumn; + } + + // Apply remaining inheritance restrictions + $discrSql = $this->_generateDiscriminatorColumnConditionSQL(array($joinedDqlAlias)); + + if ($discrSql) { + $conditions[] = $discrSql; + } + + // Apply the filters + $filterExpr = $this->generateFilterConditionSQL($targetClass, $targetTableAlias); + + if ($filterExpr) { + $conditions[] = $filterExpr; + } + + $targetTableJoin = array( + 'table' => $targetTableName . ' ' . $targetTableAlias, + 'condition' => implode(' AND ', $conditions), + ); + break; + + case ($assoc['type'] == ClassMetadata::MANY_TO_MANY): + // Join relation table + $joinTable = $assoc['joinTable']; + $joinTableAlias = $this->getSQLTableAlias($joinTable['name'], $joinedDqlAlias); + $joinTableName = $this->quoteStrategy->getJoinTableName($assoc, $sourceClass, $this->platform); + + $conditions = array(); + $relationColumns = ($relation['isOwningSide']) + ? $assoc['joinTable']['joinColumns'] + : $assoc['joinTable']['inverseJoinColumns']; + + foreach ($relationColumns as $joinColumn) { + $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); + $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); + + $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn; + } + + $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); + + // Join target table + $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN '; + + $conditions = array(); + $relationColumns = ($relation['isOwningSide']) + ? $assoc['joinTable']['inverseJoinColumns'] + : $assoc['joinTable']['joinColumns']; + + foreach ($relationColumns as $joinColumn) { + $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); + $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); + + $conditions[] = $targetTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn; + } + + // Apply remaining inheritance restrictions + $discrSql = $this->_generateDiscriminatorColumnConditionSQL(array($joinedDqlAlias)); + + if ($discrSql) { + $conditions[] = $discrSql; + } + + // Apply the filters + $filterExpr = $this->generateFilterConditionSQL($targetClass, $targetTableAlias); + + if ($filterExpr) { + $conditions[] = $filterExpr; + } + + $targetTableJoin = array( + 'table' => $targetTableName . ' ' . $targetTableAlias, + 'condition' => implode(' AND ', $conditions), + ); + break; + + default: + throw new \BadMethodCallException('Type of association must be one of *_TO_ONE or MANY_TO_MANY'); + } + + // Handle WITH clause + $withCondition = (null === $condExpr) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); + + if ($targetClass->isInheritanceTypeJoined()) { + $ctiJoins = $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); + // If we have WITH condition, we need to build nested joins for target class table and cti joins + if ($withCondition) { + $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; + } else { + $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; + } + } else { + $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; + } + + if ($withCondition) { + $sql .= ' AND ' . $withCondition; + } + + // Apply the indexes + if ($indexBy) { + // For Many-To-One or One-To-One associations this obviously makes no sense, but is ignored silently. + $this->walkIndexBy($indexBy); + } else if (isset($relation['indexBy'])) { + $this->rsm->addIndexBy($joinedDqlAlias, $relation['indexBy']); + } + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkFunction($function) + { + return $function->getSql($this); + } + + /** + * {@inheritdoc} + */ + public function walkOrderByClause($orderByClause) + { + $orderByItems = array_map(array($this, 'walkOrderByItem'), $orderByClause->orderByItems); + + if (($collectionOrderByItems = $this->_generateOrderedCollectionOrderByItems()) !== '') { + $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); + } + + return ' ORDER BY ' . implode(', ', $orderByItems); + } + + /** + * {@inheritdoc} + */ + public function walkOrderByItem($orderByItem) + { + $type = strtoupper($orderByItem->type); + $expr = $orderByItem->expression; + $sql = ($expr instanceof AST\Node) + ? $expr->dispatch($this) + : $this->walkResultVariable($this->queryComponents[$expr]['token']['value']); + + $this->orderedColumnsMap[$sql] = $type; + + if ($expr instanceof AST\Subselect) { + return '(' . $sql . ') ' . $type; + } + + return $sql . ' ' . $type; + } + + /** + * {@inheritdoc} + */ + public function walkHavingClause($havingClause) + { + return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); + } + + /** + * {@inheritdoc} + */ + public function walkJoin($join) + { + $joinType = $join->joinType; + $joinDeclaration = $join->joinAssociationDeclaration; + + $sql = ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) + ? ' LEFT JOIN ' + : ' INNER JOIN '; + + switch (true) { + case ($joinDeclaration instanceof \Doctrine\ORM\Query\AST\RangeVariableDeclaration): + $class = $this->em->getClassMetadata($joinDeclaration->abstractSchemaName); + $dqlAlias = $joinDeclaration->aliasIdentificationVariable; + $tableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias); + $condition = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; + $condExprConjunction = ($class->isInheritanceTypeJoined() && $joinType != AST\Join::JOIN_TYPE_LEFT && $joinType != AST\Join::JOIN_TYPE_LEFTOUTER) + ? ' AND ' + : ' ON '; + + $sql .= $this->walkRangeVariableDeclaration($joinDeclaration); + + $conditions = array($condition); + + // Apply remaining inheritance restrictions + $discrSql = $this->_generateDiscriminatorColumnConditionSQL(array($dqlAlias)); + + if ($discrSql) { + $conditions[] = $discrSql; + } + + // Apply the filters + $filterExpr = $this->generateFilterConditionSQL($class, $tableAlias); + + if ($filterExpr) { + $conditions[] = $filterExpr; + } + + $sql .= $condExprConjunction . implode(' AND ', $conditions); + break; + + case ($joinDeclaration instanceof \Doctrine\ORM\Query\AST\JoinAssociationDeclaration): + $sql .= $this->walkJoinAssociationDeclaration($joinDeclaration, $joinType, $join->conditionalExpression); + break; + } + + return $sql; + } + + /** + * Walks down a CaseExpression AST node and generates the corresponding SQL. + * + * @param AST\CoalesceExpression|AST\NullIfExpression|AST\GeneralCaseExpression|AST\SimpleCaseExpression $expression + * + * @return string The SQL. + */ + public function walkCaseExpression($expression) + { + switch (true) { + case ($expression instanceof AST\CoalesceExpression): + return $this->walkCoalesceExpression($expression); + + case ($expression instanceof AST\NullIfExpression): + return $this->walkNullIfExpression($expression); + + case ($expression instanceof AST\GeneralCaseExpression): + return $this->walkGeneralCaseExpression($expression); + + case ($expression instanceof AST\SimpleCaseExpression): + return $this->walkSimpleCaseExpression($expression); + + default: + return ''; + } + } + + /** + * Walks down a CoalesceExpression AST node and generates the corresponding SQL. + * + * @param AST\CoalesceExpression $coalesceExpression + * + * @return string The SQL. + */ + public function walkCoalesceExpression($coalesceExpression) + { + $sql = 'COALESCE('; + + $scalarExpressions = array(); + + foreach ($coalesceExpression->scalarExpressions as $scalarExpression) { + $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); + } + + $sql .= implode(', ', $scalarExpressions) . ')'; + + return $sql; + } + + /** + * Walks down a NullIfExpression AST node and generates the corresponding SQL. + * + * @param AST\NullIfExpression $nullIfExpression + * + * @return string The SQL. + */ + public function walkNullIfExpression($nullIfExpression) + { + $firstExpression = is_string($nullIfExpression->firstExpression) + ? $this->conn->quote($nullIfExpression->firstExpression) + : $this->walkSimpleArithmeticExpression($nullIfExpression->firstExpression); + + $secondExpression = is_string($nullIfExpression->secondExpression) + ? $this->conn->quote($nullIfExpression->secondExpression) + : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); + + return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; + } + + /** + * Walks down a GeneralCaseExpression AST node and generates the corresponding SQL. + * + * @param AST\GeneralCaseExpression $generalCaseExpression + * + * @return string The SQL. + */ + public function walkGeneralCaseExpression(AST\GeneralCaseExpression $generalCaseExpression) + { + $sql = 'CASE'; + + foreach ($generalCaseExpression->whenClauses as $whenClause) { + $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); + $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); + } + + $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; + + return $sql; + } + + /** + * Walks down a SimpleCaseExpression AST node and generates the corresponding SQL. + * + * @param AST\SimpleCaseExpression $simpleCaseExpression + * + * @return string The SQL. + */ + public function walkSimpleCaseExpression($simpleCaseExpression) + { + $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); + + foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { + $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); + $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); + } + + $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkSelectExpression($selectExpression) + { + $sql = ''; + $expr = $selectExpression->expression; + $hidden = $selectExpression->hiddenAliasResultVariable; + + switch (true) { + case ($expr instanceof AST\PathExpression): + if ($expr->type !== AST\PathExpression::TYPE_STATE_FIELD) { + throw QueryException::invalidPathExpression($expr); + } + + $fieldName = $expr->field; + $dqlAlias = $expr->identificationVariable; + $qComp = $this->queryComponents[$dqlAlias]; + $class = $qComp['metadata']; + + $resultAlias = $selectExpression->fieldIdentificationVariable ?: $fieldName; + $tableName = ($class->isInheritanceTypeJoined()) + ? $this->em->getUnitOfWork()->getEntityPersister($class->name)->getOwningTable($fieldName) + : $class->getTableName(); + + $sqlTableAlias = $this->getSQLTableAlias($tableName, $dqlAlias); + $columnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); + $columnAlias = $this->getSQLColumnAlias($class->fieldMappings[$fieldName]['columnName']); + + $col = $sqlTableAlias . '.' . $columnName; + + $fieldType = $class->getTypeOfField($fieldName); + + if (isset($class->fieldMappings[$fieldName]['requireSQLConversion'])) { + $type = Type::getType($fieldType); + $col = $type->convertToPHPValueSQL($col, $this->conn->getDatabasePlatform()); + } + + $sql .= $col . ' AS ' . $columnAlias; + + $this->scalarResultAliasMap[$resultAlias] = $columnAlias; + + if ( ! $hidden) { + $this->rsm->addScalarResult($columnAlias, $resultAlias, $fieldType); + $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias; + } + break; + + case ($expr instanceof AST\AggregateExpression): + case ($expr instanceof AST\Functions\FunctionNode): + case ($expr instanceof AST\SimpleArithmeticExpression): + case ($expr instanceof AST\ArithmeticTerm): + case ($expr instanceof AST\ArithmeticFactor): + case ($expr instanceof AST\ParenthesisExpression): + case ($expr instanceof AST\Literal): + case ($expr instanceof AST\NullIfExpression): + case ($expr instanceof AST\CoalesceExpression): + case ($expr instanceof AST\GeneralCaseExpression): + case ($expr instanceof AST\SimpleCaseExpression): + $columnAlias = $this->getSQLColumnAlias('sclr'); + $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; + + $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; + + $this->scalarResultAliasMap[$resultAlias] = $columnAlias; + + if ( ! $hidden) { + // We cannot resolve field type here; assume 'string'. + $this->rsm->addScalarResult($columnAlias, $resultAlias, 'string'); + } + break; + + case ($expr instanceof AST\Subselect): + $columnAlias = $this->getSQLColumnAlias('sclr'); + $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; + + $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; + + $this->scalarResultAliasMap[$resultAlias] = $columnAlias; + + if ( ! $hidden) { + // We cannot resolve field type here; assume 'string'. + $this->rsm->addScalarResult($columnAlias, $resultAlias, 'string'); + } + break; + + case ($expr instanceof AST\NewObjectExpression): + $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable); + break; + + default: + // IdentificationVariable or PartialObjectExpression + if ($expr instanceof AST\PartialObjectExpression) { + $dqlAlias = $expr->identificationVariable; + $partialFieldSet = $expr->partialFieldSet; + } else { + $dqlAlias = $expr; + $partialFieldSet = array(); + } + + $queryComp = $this->queryComponents[$dqlAlias]; + $class = $queryComp['metadata']; + $resultAlias = $selectExpression->fieldIdentificationVariable ?: null; + + if ( ! isset($this->selectedClasses[$dqlAlias])) { + $this->selectedClasses[$dqlAlias] = array( + 'class' => $class, + 'dqlAlias' => $dqlAlias, + 'resultAlias' => $resultAlias + ); + } + + $sqlParts = array(); + + // Select all fields from the queried class + foreach ($class->fieldMappings as $fieldName => $mapping) { + if ($partialFieldSet && ! in_array($fieldName, $partialFieldSet)) { + continue; + } + + $tableName = (isset($mapping['inherited'])) + ? $this->em->getClassMetadata($mapping['inherited'])->getTableName() + : $class->getTableName(); + + $sqlTableAlias = $this->getSQLTableAlias($tableName, $dqlAlias); + $columnAlias = $this->getSQLColumnAlias($mapping['columnName']); + $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); + + $col = $sqlTableAlias . '.' . $quotedColumnName; + + if (isset($class->fieldMappings[$fieldName]['requireSQLConversion'])) { + $type = Type::getType($class->getTypeOfField($fieldName)); + $col = $type->convertToPHPValueSQL($col, $this->platform); + } + + $sqlParts[] = $col . ' AS '. $columnAlias; + + $this->scalarResultAliasMap[$resultAlias][] = $columnAlias; + + $this->rsm->addFieldResult($dqlAlias, $columnAlias, $fieldName, $class->name); + } + + // Add any additional fields of subclasses (excluding inherited fields) + // 1) on Single Table Inheritance: always, since its marginal overhead + // 2) on Class Table Inheritance only if partial objects are disallowed, + // since it requires outer joining subtables. + if ($class->isInheritanceTypeSingleTable() || ! $this->query->getHint(Query::HINT_FORCE_PARTIAL_LOAD)) { + foreach ($class->subClasses as $subClassName) { + $subClass = $this->em->getClassMetadata($subClassName); + $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); + + foreach ($subClass->fieldMappings as $fieldName => $mapping) { + if (isset($mapping['inherited']) || $partialFieldSet && !in_array($fieldName, $partialFieldSet)) { + continue; + } + + $columnAlias = $this->getSQLColumnAlias($mapping['columnName']); + $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $subClass, $this->platform); + + $col = $sqlTableAlias . '.' . $quotedColumnName; + + if (isset($subClass->fieldMappings[$fieldName]['requireSQLConversion'])) { + $type = Type::getType($subClass->getTypeOfField($fieldName)); + $col = $type->convertToPHPValueSQL($col, $this->platform); + } + + $sqlParts[] = $col . ' AS ' . $columnAlias; + + $this->scalarResultAliasMap[$resultAlias][] = $columnAlias; + + $this->rsm->addFieldResult($dqlAlias, $columnAlias, $fieldName, $subClassName); + } + } + } + + $sql .= implode(', ', $sqlParts); + } + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkQuantifiedExpression($qExpr) + { + return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; + } + + /** + * {@inheritdoc} + */ + public function walkSubselect($subselect) + { + $useAliasesBefore = $this->useSqlTableAliases; + $rootAliasesBefore = $this->rootAliases; + + $this->rootAliases = array(); // reset the rootAliases for the subselect + $this->useSqlTableAliases = true; + + $sql = $this->walkSimpleSelectClause($subselect->simpleSelectClause); + $sql .= $this->walkSubselectFromClause($subselect->subselectFromClause); + $sql .= $this->walkWhereClause($subselect->whereClause); + + $sql .= $subselect->groupByClause ? $this->walkGroupByClause($subselect->groupByClause) : ''; + $sql .= $subselect->havingClause ? $this->walkHavingClause($subselect->havingClause) : ''; + $sql .= $subselect->orderByClause ? $this->walkOrderByClause($subselect->orderByClause) : ''; + + $this->rootAliases = $rootAliasesBefore; // put the main aliases back + $this->useSqlTableAliases = $useAliasesBefore; + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkSubselectFromClause($subselectFromClause) + { + $identificationVarDecls = $subselectFromClause->identificationVariableDeclarations; + $sqlParts = array (); + + foreach ($identificationVarDecls as $subselectIdVarDecl) { + $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); + } + + return ' FROM ' . implode(', ', $sqlParts); + } + + /** + * {@inheritdoc} + */ + public function walkSimpleSelectClause($simpleSelectClause) + { + return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') + . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); + } + + /** + * @param \Doctrine\ORM\Query\AST\ParenthesisExpression $parenthesisExpression + * + * @return string. + */ + public function walkParenthesisExpression(AST\ParenthesisExpression $parenthesisExpression) + { + return sprintf('(%s)', $parenthesisExpression->expression->dispatch($this)); + } + + /** + * @param AST\NewObjectExpression $newObjectExpression + * + * @return string The SQL. + */ + public function walkNewObject($newObjectExpression, $newObjectResultAlias=null) + { + $sqlSelectExpressions = array(); + $objIndex = $newObjectResultAlias?:$this->newObjectCounter++; + + foreach ($newObjectExpression->args as $argIndex => $e) { + $resultAlias = $this->scalarResultCounter++; + $columnAlias = $this->getSQLColumnAlias('sclr'); + $fieldType = 'string'; + + switch (true) { + case ($e instanceof AST\NewObjectExpression): + $sqlSelectExpressions[] = $e->dispatch($this); + break; + + case ($e instanceof AST\Subselect): + $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; + break; + + case ($e instanceof AST\PathExpression): + $fieldName = $e->field; + $dqlAlias = $e->identificationVariable; + $qComp = $this->queryComponents[$dqlAlias]; + $class = $qComp['metadata']; + $fieldType = $class->getTypeOfField($fieldName); + + $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; + break; + + case ($e instanceof AST\Literal): + switch ($e->type) { + case AST\Literal::BOOLEAN: + $fieldType = 'boolean'; + break; + + case AST\Literal::NUMERIC: + $fieldType = is_float($e->value) ? 'float' : 'integer'; + break; + } + + $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; + break; + + default: + $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; + break; + } + + $this->scalarResultAliasMap[$resultAlias] = $columnAlias; + $this->rsm->addScalarResult($columnAlias, $resultAlias, $fieldType); + + $this->rsm->newObjectMappings[$columnAlias] = array( + 'className' => $newObjectExpression->className, + 'objIndex' => $objIndex, + 'argIndex' => $argIndex + ); + } + + return implode(', ', $sqlSelectExpressions); + } + + /** + * {@inheritdoc} + */ + public function walkSimpleSelectExpression($simpleSelectExpression) + { + $expr = $simpleSelectExpression->expression; + $sql = ' '; + + switch (true) { + case ($expr instanceof AST\PathExpression): + $sql .= $this->walkPathExpression($expr); + break; + + case ($expr instanceof AST\AggregateExpression): + $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; + + $sql .= $this->walkAggregateExpression($expr) . ' AS dctrn__' . $alias; + break; + + case ($expr instanceof AST\Subselect): + $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; + + $columnAlias = 'sclr' . $this->aliasCounter++; + $this->scalarResultAliasMap[$alias] = $columnAlias; + + $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; + break; + + case ($expr instanceof AST\Functions\FunctionNode): + case ($expr instanceof AST\SimpleArithmeticExpression): + case ($expr instanceof AST\ArithmeticTerm): + case ($expr instanceof AST\ArithmeticFactor): + case ($expr instanceof AST\Literal): + case ($expr instanceof AST\NullIfExpression): + case ($expr instanceof AST\CoalesceExpression): + case ($expr instanceof AST\GeneralCaseExpression): + case ($expr instanceof AST\SimpleCaseExpression): + $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; + + $columnAlias = $this->getSQLColumnAlias('sclr'); + $this->scalarResultAliasMap[$alias] = $columnAlias; + + $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; + break; + + case ($expr instanceof AST\ParenthesisExpression): + $sql .= $this->walkParenthesisExpression($expr); + break; + + default: // IdentificationVariable + $sql .= $this->walkEntityIdentificationVariable($expr); + break; + } + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkAggregateExpression($aggExpression) + { + return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; + } + + /** + * {@inheritdoc} + */ + public function walkGroupByClause($groupByClause) + { + $sqlParts = array(); + + foreach ($groupByClause->groupByItems as $groupByItem) { + $sqlParts[] = $this->walkGroupByItem($groupByItem); + } + + return ' GROUP BY ' . implode(', ', $sqlParts); + } + + /** + * {@inheritdoc} + */ + public function walkGroupByItem($groupByItem) + { + // StateFieldPathExpression + if ( ! is_string($groupByItem)) { + return $this->walkPathExpression($groupByItem); + } + + // ResultVariable + if (isset($this->queryComponents[$groupByItem]['resultVariable'])) { + $resultVariable = $this->queryComponents[$groupByItem]['resultVariable']; + + if ($resultVariable instanceof AST\PathExpression) { + return $this->walkPathExpression($resultVariable); + } + + if (isset($resultVariable->pathExpression)) { + return $this->walkPathExpression($resultVariable->pathExpression); + } + + return $this->walkResultVariable($groupByItem); + } + + // IdentificationVariable + $sqlParts = array(); + + foreach ($this->queryComponents[$groupByItem]['metadata']->fieldNames as $field) { + $item = new AST\PathExpression(AST\PathExpression::TYPE_STATE_FIELD, $groupByItem, $field); + $item->type = AST\PathExpression::TYPE_STATE_FIELD; + + $sqlParts[] = $this->walkPathExpression($item); + } + + foreach ($this->queryComponents[$groupByItem]['metadata']->associationMappings as $mapping) { + if ($mapping['isOwningSide'] && $mapping['type'] & ClassMetadataInfo::TO_ONE) { + $item = new AST\PathExpression(AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $groupByItem, $mapping['fieldName']); + $item->type = AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION; + + $sqlParts[] = $this->walkPathExpression($item); + } + } + + return implode(', ', $sqlParts); + } + + /** + * {@inheritdoc} + */ + public function walkDeleteClause(AST\DeleteClause $deleteClause) + { + $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); + $tableName = $class->getTableName(); + $sql = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform); + + $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); + $this->rootAliases[] = $deleteClause->aliasIdentificationVariable; + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkUpdateClause($updateClause) + { + $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); + $tableName = $class->getTableName(); + $sql = 'UPDATE ' . $this->quoteStrategy->getTableName($class, $this->platform); + + $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); + $this->rootAliases[] = $updateClause->aliasIdentificationVariable; + + $sql .= ' SET ' . implode(', ', array_map(array($this, 'walkUpdateItem'), $updateClause->updateItems)); + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkUpdateItem($updateItem) + { + $useTableAliasesBefore = $this->useSqlTableAliases; + $this->useSqlTableAliases = false; + + $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; + $newValue = $updateItem->newValue; + + switch (true) { + case ($newValue instanceof AST\Node): + $sql .= $newValue->dispatch($this); + break; + + case ($newValue === null): + $sql .= 'NULL'; + break; + + default: + $sql .= $this->conn->quote($newValue); + break; + } + + $this->useSqlTableAliases = $useTableAliasesBefore; + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkWhereClause($whereClause) + { + $condSql = null !== $whereClause ? $this->walkConditionalExpression($whereClause->conditionalExpression) : ''; + $discrSql = $this->_generateDiscriminatorColumnConditionSql($this->rootAliases); + + if ($this->em->hasFilters()) { + $filterClauses = array(); + foreach ($this->rootAliases as $dqlAlias) { + $class = $this->queryComponents[$dqlAlias]['metadata']; + $tableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias); + + if ($filterExpr = $this->generateFilterConditionSQL($class, $tableAlias)) { + $filterClauses[] = $filterExpr; + } + } + + if (count($filterClauses)) { + if ($condSql) { + $condSql = '(' . $condSql . ') AND '; + } + + $condSql .= implode(' AND ', $filterClauses); + } + } + + if ($condSql) { + return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql); + } + + if ($discrSql) { + return ' WHERE ' . $discrSql; + } + + return ''; + } + + /** + * {@inheritdoc} + */ + public function walkConditionalExpression($condExpr) + { + // Phase 2 AST optimization: Skip processing of ConditionalExpression + // if only one ConditionalTerm is defined + if ( ! ($condExpr instanceof AST\ConditionalExpression)) { + return $this->walkConditionalTerm($condExpr); + } + + return implode(' OR ', array_map(array($this, 'walkConditionalTerm'), $condExpr->conditionalTerms)); + } + + /** + * {@inheritdoc} + */ + public function walkConditionalTerm($condTerm) + { + // Phase 2 AST optimization: Skip processing of ConditionalTerm + // if only one ConditionalFactor is defined + if ( ! ($condTerm instanceof AST\ConditionalTerm)) { + return $this->walkConditionalFactor($condTerm); + } + + return implode(' AND ', array_map(array($this, 'walkConditionalFactor'), $condTerm->conditionalFactors)); + } + + /** + * {@inheritdoc} + */ + public function walkConditionalFactor($factor) + { + // Phase 2 AST optimization: Skip processing of ConditionalFactor + // if only one ConditionalPrimary is defined + return ( ! ($factor instanceof AST\ConditionalFactor)) + ? $this->walkConditionalPrimary($factor) + : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); + } + + /** + * {@inheritdoc} + */ + public function walkConditionalPrimary($primary) + { + if ($primary->isSimpleConditionalExpression()) { + return $primary->simpleConditionalExpression->dispatch($this); + } + + if ($primary->isConditionalExpression()) { + $condExpr = $primary->conditionalExpression; + + return '(' . $this->walkConditionalExpression($condExpr) . ')'; + } + } + + /** + * {@inheritdoc} + */ + public function walkExistsExpression($existsExpr) + { + $sql = ($existsExpr->not) ? 'NOT ' : ''; + + $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkCollectionMemberExpression($collMemberExpr) + { + $sql = $collMemberExpr->not ? 'NOT ' : ''; + $sql .= 'EXISTS (SELECT 1 FROM '; + + $entityExpr = $collMemberExpr->entityExpression; + $collPathExpr = $collMemberExpr->collectionValuedPathExpression; + + $fieldName = $collPathExpr->field; + $dqlAlias = $collPathExpr->identificationVariable; + + $class = $this->queryComponents[$dqlAlias]['metadata']; + + switch (true) { + // InputParameter + case ($entityExpr instanceof AST\InputParameter): + $dqlParamKey = $entityExpr->name; + $entitySql = '?'; + break; + + // SingleValuedAssociationPathExpression | IdentificationVariable + case ($entityExpr instanceof AST\PathExpression): + $entitySql = $this->walkPathExpression($entityExpr); + break; + + default: + throw new \BadMethodCallException("Not implemented"); + } + + $assoc = $class->associationMappings[$fieldName]; + + if ($assoc['type'] == ClassMetadata::ONE_TO_MANY) { + $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); + $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); + $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); + + $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' WHERE '; + + $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']]; + $sqlParts = array(); + + foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) { + $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $this->platform); + + $sqlParts[] = $sourceTableAlias . '.' . $targetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn; + } + + foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) { + if (isset($dqlParamKey)) { + $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); + } + + $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' = ' . $entitySql; + } + + $sql .= implode(' AND ', $sqlParts); + } else { // many-to-many + $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); + + $owningAssoc = $assoc['isOwningSide'] ? $assoc : $targetClass->associationMappings[$assoc['mappedBy']]; + $joinTable = $owningAssoc['joinTable']; + + // SQL table aliases + $joinTableAlias = $this->getSQLTableAlias($joinTable['name']); + $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); + $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); + + // join to target table + $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform) . ' ' . $joinTableAlias + . ' INNER JOIN ' . $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' ON '; + + // join conditions + $joinColumns = $assoc['isOwningSide'] ? $joinTable['inverseJoinColumns'] : $joinTable['joinColumns']; + $joinSqlParts = array(); + + foreach ($joinColumns as $joinColumn) { + $targetColumn = $this->quoteStrategy->getColumnName($targetClass->fieldNames[$joinColumn['referencedColumnName']], $targetClass, $this->platform); + + $joinSqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $targetTableAlias . '.' . $targetColumn; + } + + $sql .= implode(' AND ', $joinSqlParts); + $sql .= ' WHERE '; + + $joinColumns = $assoc['isOwningSide'] ? $joinTable['joinColumns'] : $joinTable['inverseJoinColumns']; + $sqlParts = array(); + + foreach ($joinColumns as $joinColumn) { + $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$joinColumn['referencedColumnName']], $class, $this->platform); + + $sqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $sourceTableAlias . '.' . $targetColumn; + } + + foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) { + if (isset($dqlParamKey)) { + $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); + } + + $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' IN (' . $entitySql . ')'; + } + + $sql .= implode(' AND ', $sqlParts); + } + + return $sql . ')'; + } + + /** + * {@inheritdoc} + */ + public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr) + { + $sizeFunc = new AST\Functions\SizeFunction('size'); + $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; + + return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); + } + + /** + * {@inheritdoc} + */ + public function walkNullComparisonExpression($nullCompExpr) + { + $expression = $nullCompExpr->expression; + $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; + + // Handle ResultVariable + if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { + return $this->walkResultVariable($expression) . $comparison; + } + + // Handle InputParameter mapping inclusion to ParserResult + if ($expression instanceof AST\InputParameter) { + return $this->walkInputParameter($expression) . $comparison; + } + + return $expression->dispatch($this) . $comparison; + } + + /** + * {@inheritdoc} + */ + public function walkInExpression($inExpr) + { + $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; + + $sql .= ($inExpr->subselect) + ? $this->walkSubselect($inExpr->subselect) + : implode(', ', array_map(array($this, 'walkInParameter'), $inExpr->literals)); + + $sql .= ')'; + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkInstanceOfExpression($instanceOfExpr) + { + $sql = ''; + + $dqlAlias = $instanceOfExpr->identificationVariable; + $discrClass = $class = $this->queryComponents[$dqlAlias]['metadata']; + + if ($class->discriminatorColumn) { + $discrClass = $this->em->getClassMetadata($class->rootEntityName); + } + + if ($this->useSqlTableAliases) { + $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias) . '.'; + } + + $sql .= $class->discriminatorColumn['name'] . ($instanceOfExpr->not ? ' NOT IN ' : ' IN '); + + $sqlParameterList = array(); + + foreach ($instanceOfExpr->value as $parameter) { + if ($parameter instanceof AST\InputParameter) { + $this->rsm->addMetadataParameterMapping($parameter->name, 'discriminatorValue'); + + $sqlParameterList[] = $this->walkInputParameter($parameter); + + continue; + } + + // Get name from ClassMetadata to resolve aliases. + $entityClassName = $this->em->getClassMetadata($parameter)->name; + $discriminatorValue = $class->discriminatorValue; + + if ($entityClassName !== $class->name) { + $discrMap = array_flip($class->discriminatorMap); + + if ( ! isset($discrMap[$entityClassName])) { + throw QueryException::instanceOfUnrelatedClass($entityClassName, $class->rootEntityName); + } + + $discriminatorValue = $discrMap[$entityClassName]; + } + + $sqlParameterList[] = $this->conn->quote($discriminatorValue); + } + + $sql .= '(' . implode(', ', $sqlParameterList) . ')'; + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkInParameter($inParam) + { + return $inParam instanceof AST\InputParameter + ? $this->walkInputParameter($inParam) + : $this->walkLiteral($inParam); + } + + /** + * {@inheritdoc} + */ + public function walkLiteral($literal) + { + switch ($literal->type) { + case AST\Literal::STRING: + return $this->conn->quote($literal->value); + + case AST\Literal::BOOLEAN: + $bool = strtolower($literal->value) == 'true' ? true : false; + $boolVal = $this->conn->getDatabasePlatform()->convertBooleans($bool); + + return $boolVal; + + case AST\Literal::NUMERIC: + return $literal->value; + + default: + throw QueryException::invalidLiteral($literal); + } + } + + /** + * {@inheritdoc} + */ + public function walkBetweenExpression($betweenExpr) + { + $sql = $this->walkArithmeticExpression($betweenExpr->expression); + + if ($betweenExpr->not) { + $sql .= ' NOT'; + } + + $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) + . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkLikeExpression($likeExpr) + { + $stringExpr = $likeExpr->stringExpression; + $leftExpr = (is_string($stringExpr) && isset($this->queryComponents[$stringExpr]['resultVariable'])) + ? $this->walkResultVariable($stringExpr) + : $stringExpr->dispatch($this); + + $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; + + if ($likeExpr->stringPattern instanceof AST\InputParameter) { + $sql .= $this->walkInputParameter($likeExpr->stringPattern); + } elseif ($likeExpr->stringPattern instanceof AST\Functions\FunctionNode) { + $sql .= $this->walkFunction($likeExpr->stringPattern); + } elseif ($likeExpr->stringPattern instanceof AST\PathExpression) { + $sql .= $this->walkPathExpression($likeExpr->stringPattern); + } else { + $sql .= $this->walkLiteral($likeExpr->stringPattern); + } + + if ($likeExpr->escapeChar) { + $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); + } + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkStateFieldPathExpression($stateFieldPathExpression) + { + return $this->walkPathExpression($stateFieldPathExpression); + } + + /** + * {@inheritdoc} + */ + public function walkComparisonExpression($compExpr) + { + $leftExpr = $compExpr->leftExpression; + $rightExpr = $compExpr->rightExpression; + $sql = ''; + + $sql .= ($leftExpr instanceof AST\Node) + ? $leftExpr->dispatch($this) + : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); + + $sql .= ' ' . $compExpr->operator . ' '; + + $sql .= ($rightExpr instanceof AST\Node) + ? $rightExpr->dispatch($this) + : (is_numeric($rightExpr) ? $rightExpr : $this->conn->quote($rightExpr)); + + return $sql; + } + + /** + * {@inheritdoc} + */ + public function walkInputParameter($inputParam) + { + $this->parserResult->addParameterMapping($inputParam->name, $this->sqlParamIndex++); + + $parameter = $this->query->getParameter($inputParam->name); + + if ($parameter && Type::hasType($type = $parameter->getType())) { + return Type::getType($type)->convertToDatabaseValueSQL('?', $this->platform); + } + + return '?'; + } + + /** + * {@inheritdoc} + */ + public function walkArithmeticExpression($arithmeticExpr) + { + return ($arithmeticExpr->isSimpleArithmeticExpression()) + ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) + : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; + } + + /** + * {@inheritdoc} + */ + public function walkSimpleArithmeticExpression($simpleArithmeticExpr) + { + if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { + return $this->walkArithmeticTerm($simpleArithmeticExpr); + } + + return implode(' ', array_map(array($this, 'walkArithmeticTerm'), $simpleArithmeticExpr->arithmeticTerms)); + } + + /** + * {@inheritdoc} + */ + public function walkArithmeticTerm($term) + { + if (is_string($term)) { + return (isset($this->queryComponents[$term])) + ? $this->walkResultVariable($this->queryComponents[$term]['token']['value']) + : $term; + } + + // Phase 2 AST optimization: Skip processing of ArithmeticTerm + // if only one ArithmeticFactor is defined + if ( ! ($term instanceof AST\ArithmeticTerm)) { + return $this->walkArithmeticFactor($term); + } + + return implode(' ', array_map(array($this, 'walkArithmeticFactor'), $term->arithmeticFactors)); + } + + /** + * {@inheritdoc} + */ + public function walkArithmeticFactor($factor) + { + if (is_string($factor)) { + return (isset($this->queryComponents[$factor])) + ? $this->walkResultVariable($this->queryComponents[$factor]['token']['value']) + : $factor; + } + + // Phase 2 AST optimization: Skip processing of ArithmeticFactor + // if only one ArithmeticPrimary is defined + if ( ! ($factor instanceof AST\ArithmeticFactor)) { + return $this->walkArithmeticPrimary($factor); + } + + $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); + + return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); + } + + /** + * Walks down an ArithmeticPrimary that represents an AST node, thereby generating the appropriate SQL. + * + * @param mixed $primary + * + * @return string The SQL. + */ + public function walkArithmeticPrimary($primary) + { + if ($primary instanceof AST\SimpleArithmeticExpression) { + return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; + } + + if ($primary instanceof AST\Node) { + return $primary->dispatch($this); + } + + return $this->walkEntityIdentificationVariable($primary); + } + + /** + * {@inheritdoc} + */ + public function walkStringPrimary($stringPrimary) + { + return (is_string($stringPrimary)) + ? $this->conn->quote($stringPrimary) + : $stringPrimary->dispatch($this); + } + + /** + * {@inheritdoc} + */ + public function walkResultVariable($resultVariable) + { + $resultAlias = $this->scalarResultAliasMap[$resultVariable]; + + if (is_array($resultAlias)) { + return implode(', ', $resultAlias); + } + + return $resultAlias; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalker.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalker.php new file mode 100644 index 0000000000000000000000000000000000000000..9ddd86b04320d290700094ab01a4320313a5608e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalker.php @@ -0,0 +1,479 @@ +. + */ + +namespace Doctrine\ORM\Query; + +/** + * Interface for walkers of DQL ASTs (abstract syntax trees). + * + * @author Roman Borschel + * @since 2.0 + */ +interface TreeWalker +{ + /** + * Initializes TreeWalker with important information about the ASTs to be walked. + * + * @param \Doctrine\ORM\AbstractQuery $query The parsed Query. + * @param \Doctrine\ORM\Query\ParserResult $parserResult The result of the parsing process. + * @param array $queryComponents The query components (symbol table). + */ + public function __construct($query, $parserResult, array $queryComponents); + + /** + * Returns internal queryComponents array. + * + * @return array + */ + public function getQueryComponents(); + + /** + * Sets or overrides a query component for a given dql alias. + * + * @param string $dqlAlias The DQL alias. + * @param array $queryComponent + * + * @return void + */ + public function setQueryComponent($dqlAlias, array $queryComponent); + + /** + * Walks down a SelectStatement AST node, thereby generating the appropriate SQL. + * + * @param AST\SelectStatement $AST + * + * @return string The SQL. + */ + function walkSelectStatement(AST\SelectStatement $AST); + + /** + * Walks down a SelectClause AST node, thereby generating the appropriate SQL. + * + * @param AST\SelectClause $selectClause + * + * @return string The SQL. + */ + function walkSelectClause($selectClause); + + /** + * Walks down a FromClause AST node, thereby generating the appropriate SQL. + * + * @param AST\FromClause $fromClause + * + * @return string The SQL. + */ + function walkFromClause($fromClause); + + /** + * Walks down a FunctionNode AST node, thereby generating the appropriate SQL. + * + * @param AST\Functions\FunctionNode $function + * + * @return string The SQL. + */ + function walkFunction($function); + + /** + * Walks down an OrderByClause AST node, thereby generating the appropriate SQL. + * + * @param AST\OrderByClause $orderByClause + * + * @return string The SQL. + */ + function walkOrderByClause($orderByClause); + + /** + * Walks down an OrderByItem AST node, thereby generating the appropriate SQL. + * + * @param AST\OrderByItem $orderByItem + * + * @return string The SQL. + */ + function walkOrderByItem($orderByItem); + + /** + * Walks down a HavingClause AST node, thereby generating the appropriate SQL. + * + * @param AST\HavingClause $havingClause + * + * @return string The SQL. + */ + function walkHavingClause($havingClause); + + /** + * Walks down a Join AST node and creates the corresponding SQL. + * + * @param AST\Join $join + * + * @return string The SQL. + */ + function walkJoin($join); + + /** + * Walks down a SelectExpression AST node and generates the corresponding SQL. + * + * @param AST\SelectExpression $selectExpression + * + * @return string The SQL. + */ + function walkSelectExpression($selectExpression); + + /** + * Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\QuantifiedExpression $qExpr + * + * @return string The SQL. + */ + function walkQuantifiedExpression($qExpr); + + /** + * Walks down a Subselect AST node, thereby generating the appropriate SQL. + * + * @param AST\Subselect $subselect + * + * @return string The SQL. + */ + function walkSubselect($subselect); + + /** + * Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL. + * + * @param AST\SubselectFromClause $subselectFromClause + * + * @return string The SQL. + */ + function walkSubselectFromClause($subselectFromClause); + + /** + * Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL. + * + * @param AST\SimpleSelectClause $simpleSelectClause + * + * @return string The SQL. + */ + function walkSimpleSelectClause($simpleSelectClause); + + /** + * Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\SimpleSelectExpression $simpleSelectExpression + * + * @return string The SQL. + */ + function walkSimpleSelectExpression($simpleSelectExpression); + + /** + * Walks down an AggregateExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\AggregateExpression $aggExpression + * + * @return string The SQL. + */ + function walkAggregateExpression($aggExpression); + + /** + * Walks down a GroupByClause AST node, thereby generating the appropriate SQL. + * + * @param AST\GroupByClause $groupByClause + * + * @return string The SQL. + */ + function walkGroupByClause($groupByClause); + + /** + * Walks down a GroupByItem AST node, thereby generating the appropriate SQL. + * + * @param AST\PathExpression|string $groupByItem + * + * @return string The SQL. + */ + function walkGroupByItem($groupByItem); + + /** + * Walks down an UpdateStatement AST node, thereby generating the appropriate SQL. + * + * @param AST\UpdateStatement $AST + * + * @return string The SQL. + */ + function walkUpdateStatement(AST\UpdateStatement $AST); + + /** + * Walks down a DeleteStatement AST node, thereby generating the appropriate SQL. + * + * @param AST\DeleteStatement $AST + * + * @return string The SQL. + */ + function walkDeleteStatement(AST\DeleteStatement $AST); + + /** + * Walks down a DeleteClause AST node, thereby generating the appropriate SQL. + * + * @param AST\DeleteClause $deleteClause + * + * @return string The SQL. + */ + function walkDeleteClause(AST\DeleteClause $deleteClause); + + /** + * Walks down an UpdateClause AST node, thereby generating the appropriate SQL. + * + * @param AST\UpdateClause $updateClause + * + * @return string The SQL. + */ + function walkUpdateClause($updateClause); + + /** + * Walks down an UpdateItem AST node, thereby generating the appropriate SQL. + * + * @param AST\UpdateItem $updateItem + * + * @return string The SQL. + */ + function walkUpdateItem($updateItem); + + /** + * Walks down a WhereClause AST node, thereby generating the appropriate SQL. + * WhereClause or not, the appropriate discriminator sql is added. + * + * @param AST\WhereClause $whereClause + * + * @return string The SQL. + */ + function walkWhereClause($whereClause); + + /** + * Walk down a ConditionalExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\ConditionalExpression $condExpr + * + * @return string The SQL. + */ + function walkConditionalExpression($condExpr); + + /** + * Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL. + * + * @param AST\ConditionalTerm $condTerm + * + * @return string The SQL. + */ + function walkConditionalTerm($condTerm); + + /** + * Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL. + * + * @param AST\ConditionalFactor $factor + * + * @return string The SQL. + */ + function walkConditionalFactor($factor); + + /** + * Walks down a ConditionalPrimary AST node, thereby generating the appropriate SQL. + * + * @param AST\ConditionalPrimary $primary + * + * @return string The SQL. + */ + function walkConditionalPrimary($primary); + + /** + * Walks down an ExistsExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\ExistsExpression $existsExpr + * + * @return string The SQL. + */ + function walkExistsExpression($existsExpr); + + /** + * Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\CollectionMemberExpression $collMemberExpr + * + * @return string The SQL. + */ + function walkCollectionMemberExpression($collMemberExpr); + + /** + * Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\EmptyCollectionComparisonExpression $emptyCollCompExpr + * + * @return string The SQL. + */ + function walkEmptyCollectionComparisonExpression($emptyCollCompExpr); + + /** + * Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\NullComparisonExpression $nullCompExpr + * + * @return string The SQL. + */ + function walkNullComparisonExpression($nullCompExpr); + + /** + * Walks down an InExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\InExpression $inExpr + * + * @return string The SQL. + */ + function walkInExpression($inExpr); + + /** + * Walks down an InstanceOfExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\InstanceOfExpression $instanceOfExpr + * + * @return string The SQL. + */ + function walkInstanceOfExpression($instanceOfExpr); + + /** + * Walks down a literal that represents an AST node, thereby generating the appropriate SQL. + * + * @param mixed $literal + * + * @return string The SQL. + */ + function walkLiteral($literal); + + /** + * Walks down a BetweenExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\BetweenExpression $betweenExpr + * + * @return string The SQL. + */ + function walkBetweenExpression($betweenExpr); + + /** + * Walks down a LikeExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\LikeExpression $likeExpr + * + * @return string The SQL. + */ + function walkLikeExpression($likeExpr); + + /** + * Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\PathExpression $stateFieldPathExpression + * + * @return string The SQL. + */ + function walkStateFieldPathExpression($stateFieldPathExpression); + + /** + * Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\ComparisonExpression $compExpr + * + * @return string The SQL. + */ + function walkComparisonExpression($compExpr); + + /** + * Walks down an InputParameter AST node, thereby generating the appropriate SQL. + * + * @param AST\InputParameter $inputParam + * + * @return string The SQL. + */ + function walkInputParameter($inputParam); + + /** + * Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\ArithmeticExpression $arithmeticExpr + * + * @return string The SQL. + */ + function walkArithmeticExpression($arithmeticExpr); + + /** + * Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL. + * + * @param mixed $term + * + * @return string The SQL. + */ + function walkArithmeticTerm($term); + + /** + * Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL. + * + * @param mixed $stringPrimary + * + * @return string The SQL. + */ + function walkStringPrimary($stringPrimary); + + /** + * Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL. + * + * @param mixed $factor + * + * @return string The SQL. + */ + function walkArithmeticFactor($factor); + + /** + * Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL. + * + * @param AST\SimpleArithmeticExpression $simpleArithmeticExpr + * + * @return string The SQL. + */ + function walkSimpleArithmeticExpression($simpleArithmeticExpr); + + /** + * Walks down a PathExpression AST node, thereby generating the appropriate SQL. + * + * @param mixed $pathExpr + * + * @return string The SQL. + */ + function walkPathExpression($pathExpr); + + /** + * Walks down a ResultVariable that represents an AST node, thereby generating the appropriate SQL. + * + * @param string $resultVariable + * + * @return string The SQL. + */ + function walkResultVariable($resultVariable); + + /** + * Gets an executor that can be used to execute the result of this walker. + * + * @param AST\DeleteStatement|AST\UpdateStatement|AST\SelectStatement $AST + * + * @return Exec\AbstractSqlExecutor + */ + function getExecutor($AST); +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..e95155c13f30486c8ef5d55b11a8501bbdec3242 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php @@ -0,0 +1,440 @@ +. + */ + +namespace Doctrine\ORM\Query; + +/** + * An adapter implementation of the TreeWalker interface. The methods in this class + * are empty. This class exists as convenience for creating tree walkers. + * + * @author Roman Borschel + * @since 2.0 + */ +abstract class TreeWalkerAdapter implements TreeWalker +{ + /** + * The original Query. + * + * @var \Doctrine\ORM\AbstractQuery + */ + private $_query; + + /** + * The ParserResult of the original query that was produced by the Parser. + * + * @var \Doctrine\ORM\Query\ParserResult + */ + private $_parserResult; + + /** + * The query components of the original query (the "symbol table") that was produced by the Parser. + * + * @var array + */ + private $_queryComponents; + + /** + * {@inheritdoc} + */ + public function __construct($query, $parserResult, array $queryComponents) + { + $this->_query = $query; + $this->_parserResult = $parserResult; + $this->_queryComponents = $queryComponents; + } + + /** + * {@inheritdoc} + */ + public function getQueryComponents() + { + return $this->_queryComponents; + } + + /** + * {@inheritdoc} + */ + public function setQueryComponent($dqlAlias, array $queryComponent) + { + $requiredKeys = array('metadata', 'parent', 'relation', 'map', 'nestingLevel', 'token'); + + if (array_diff($requiredKeys, array_keys($queryComponent))) { + throw QueryException::invalidQueryComponent($dqlAlias); + } + + $this->_queryComponents[$dqlAlias] = $queryComponent; + } + + /** + * @return array + */ + protected function _getQueryComponents() + { + return $this->_queryComponents; + } + + /** + * Retrieves the Query Instance responsible for the current walkers execution. + * + * @return \Doctrine\ORM\AbstractQuery + */ + protected function _getQuery() + { + return $this->_query; + } + + /** + * Retrieves the ParserResult. + * + * @return \Doctrine\ORM\Query\ParserResult + */ + protected function _getParserResult() + { + return $this->_parserResult; + } + + /** + * {@inheritdoc} + */ + public function walkSelectStatement(AST\SelectStatement $AST) + { + } + + /** + * {@inheritdoc} + */ + public function walkSelectClause($selectClause) + { + } + + /** + * {@inheritdoc} + */ + public function walkFromClause($fromClause) + { + } + + /** + * {@inheritdoc} + */ + public function walkFunction($function) + { + } + + /** + * {@inheritdoc} + */ + public function walkOrderByClause($orderByClause) + { + } + + /** + * {@inheritdoc} + */ + public function walkOrderByItem($orderByItem) + { + } + + /** + * {@inheritdoc} + */ + public function walkHavingClause($havingClause) + { + } + + /** + * {@inheritdoc} + */ + public function walkJoin($join) + { + } + + /** + * {@inheritdoc} + */ + public function walkSelectExpression($selectExpression) + { + } + + /** + * {@inheritdoc} + */ + public function walkQuantifiedExpression($qExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkSubselect($subselect) + { + } + + /** + * {@inheritdoc} + */ + public function walkSubselectFromClause($subselectFromClause) + { + } + + /** + * {@inheritdoc} + */ + public function walkSimpleSelectClause($simpleSelectClause) + { + } + + /** + * {@inheritdoc} + */ + public function walkSimpleSelectExpression($simpleSelectExpression) + { + } + + /** + * {@inheritdoc} + */ + public function walkAggregateExpression($aggExpression) + { + } + + /** + * {@inheritdoc} + */ + public function walkGroupByClause($groupByClause) + { + } + + /** + * {@inheritdoc} + */ + public function walkGroupByItem($groupByItem) + { + } + + /** + * {@inheritdoc} + */ + public function walkUpdateStatement(AST\UpdateStatement $AST) + { + } + + /** + * {@inheritdoc} + */ + public function walkDeleteStatement(AST\DeleteStatement $AST) + { + } + + /** + * {@inheritdoc} + */ + public function walkDeleteClause(AST\DeleteClause $deleteClause) + { + } + + /** + * {@inheritdoc} + */ + public function walkUpdateClause($updateClause) + { + } + + /** + * {@inheritdoc} + */ + public function walkUpdateItem($updateItem) + { + } + + /** + * {@inheritdoc} + */ + public function walkWhereClause($whereClause) + { + } + + /** + * {@inheritdoc} + */ + public function walkConditionalExpression($condExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkConditionalTerm($condTerm) + { + } + + /** + * {@inheritdoc} + */ + public function walkConditionalFactor($factor) + { + } + + /** + * {@inheritdoc} + */ + public function walkConditionalPrimary($primary) + { + } + + /** + * {@inheritdoc} + */ + public function walkExistsExpression($existsExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkCollectionMemberExpression($collMemberExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkNullComparisonExpression($nullCompExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkInExpression($inExpr) + { + } + + /** + * {@inheritdoc} + */ + function walkInstanceOfExpression($instanceOfExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkLiteral($literal) + { + } + + /** + * {@inheritdoc} + */ + public function walkBetweenExpression($betweenExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkLikeExpression($likeExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkStateFieldPathExpression($stateFieldPathExpression) + { + } + + /** + * {@inheritdoc} + */ + public function walkComparisonExpression($compExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkInputParameter($inputParam) + { + } + + /** + * {@inheritdoc} + */ + public function walkArithmeticExpression($arithmeticExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkArithmeticTerm($term) + { + } + + /** + * {@inheritdoc} + */ + public function walkStringPrimary($stringPrimary) + { + } + + /** + * {@inheritdoc} + */ + public function walkArithmeticFactor($factor) + { + } + + /** + * {@inheritdoc} + */ + public function walkSimpleArithmeticExpression($simpleArithmeticExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkPathExpression($pathExpr) + { + } + + /** + * {@inheritdoc} + */ + public function walkResultVariable($resultVariable) + { + } + + /** + * {@inheritdoc} + */ + public function getExecutor($AST) + { + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalkerChain.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalkerChain.php new file mode 100644 index 0000000000000000000000000000000000000000..19597ed1a3d086d5912924349d5ea26961433a36 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalkerChain.php @@ -0,0 +1,575 @@ +. + */ + +namespace Doctrine\ORM\Query; + +/** + * Represents a chain of tree walkers that modify an AST and finally emit output. + * Only the last walker in the chain can emit output. Any previous walkers can modify + * the AST to influence the final output produced by the last walker. + * + * @author Roman Borschel + * @since 2.0 + */ +class TreeWalkerChain implements TreeWalker +{ + /** + * The tree walkers. + * + * @var TreeWalker[] + */ + private $_walkers; + + /** + * The original Query. + * + * @var \Doctrine\ORM\AbstractQuery + */ + private $_query; + + /** + * The ParserResult of the original query that was produced by the Parser. + * + * @var \Doctrine\ORM\Query\ParserResult + */ + private $_parserResult; + + /** + * The query components of the original query (the "symbol table") that was produced by the Parser. + * + * @var array + */ + private $_queryComponents; + + /** + * Returns the internal queryComponents array. + * + * @return array + */ + public function getQueryComponents() + { + return $this->_queryComponents; + } + + /** + * {@inheritdoc} + */ + public function setQueryComponent($dqlAlias, array $queryComponent) + { + $requiredKeys = array('metadata', 'parent', 'relation', 'map', 'nestingLevel', 'token'); + + if (array_diff($requiredKeys, array_keys($queryComponent))) { + throw QueryException::invalidQueryComponent($dqlAlias); + } + + $this->_queryComponents[$dqlAlias] = $queryComponent; + } + + /** + * {@inheritdoc} + */ + public function __construct($query, $parserResult, array $queryComponents) + { + $this->_query = $query; + $this->_parserResult = $parserResult; + $this->_queryComponents = $queryComponents; + $this->_walkers = new TreeWalkerChainIterator($this, $query, $parserResult); + } + + /** + * Adds a tree walker to the chain. + * + * @param string $walkerClass The class of the walker to instantiate. + * + * @return void + */ + public function addTreeWalker($walkerClass) + { + $this->_walkers[] = $walkerClass; + } + + /** + * {@inheritdoc} + */ + public function walkSelectStatement(AST\SelectStatement $AST) + { + foreach ($this->_walkers as $walker) { + $walker->walkSelectStatement($AST); + + $this->_queryComponents = $walker->getQueryComponents(); + } + } + + /** + * {@inheritdoc} + */ + public function walkSelectClause($selectClause) + { + foreach ($this->_walkers as $walker) { + $walker->walkSelectClause($selectClause); + } + } + + /** + * {@inheritdoc} + */ + public function walkFromClause($fromClause) + { + foreach ($this->_walkers as $walker) { + $walker->walkFromClause($fromClause); + } + } + + /** + * {@inheritdoc} + */ + public function walkFunction($function) + { + foreach ($this->_walkers as $walker) { + $walker->walkFunction($function); + } + } + + /** + * {@inheritdoc} + */ + public function walkOrderByClause($orderByClause) + { + foreach ($this->_walkers as $walker) { + $walker->walkOrderByClause($orderByClause); + } + } + + /** + * {@inheritdoc} + */ + public function walkOrderByItem($orderByItem) + { + foreach ($this->_walkers as $walker) { + $walker->walkOrderByItem($orderByItem); + } + } + + /** + * {@inheritdoc} + */ + public function walkHavingClause($havingClause) + { + foreach ($this->_walkers as $walker) { + $walker->walkHavingClause($havingClause); + } + } + + /** + * {@inheritdoc} + */ + public function walkJoin($join) + { + foreach ($this->_walkers as $walker) { + $walker->walkJoin($join); + } + } + + /** + * {@inheritdoc} + */ + public function walkSelectExpression($selectExpression) + { + foreach ($this->_walkers as $walker) { + $walker->walkSelectExpression($selectExpression); + } + } + + /** + * {@inheritdoc} + */ + public function walkQuantifiedExpression($qExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkQuantifiedExpression($qExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkSubselect($subselect) + { + foreach ($this->_walkers as $walker) { + $walker->walkSubselect($subselect); + } + } + + /** + * {@inheritdoc} + */ + public function walkSubselectFromClause($subselectFromClause) + { + foreach ($this->_walkers as $walker) { + $walker->walkSubselectFromClause($subselectFromClause); + } + } + + /** + * {@inheritdoc} + */ + public function walkSimpleSelectClause($simpleSelectClause) + { + foreach ($this->_walkers as $walker) { + $walker->walkSimpleSelectClause($simpleSelectClause); + } + } + + /** + * {@inheritdoc} + */ + public function walkSimpleSelectExpression($simpleSelectExpression) + { + foreach ($this->_walkers as $walker) { + $walker->walkSimpleSelectExpression($simpleSelectExpression); + } + } + + /** + * {@inheritdoc} + */ + public function walkAggregateExpression($aggExpression) + { + foreach ($this->_walkers as $walker) { + $walker->walkAggregateExpression($aggExpression); + } + } + + /** + * {@inheritdoc} + */ + public function walkGroupByClause($groupByClause) + { + foreach ($this->_walkers as $walker) { + $walker->walkGroupByClause($groupByClause); + } + } + + /** + * {@inheritdoc} + */ + public function walkGroupByItem($groupByItem) + { + foreach ($this->_walkers as $walker) { + $walker->walkGroupByItem($groupByItem); + } + } + + /** + * {@inheritdoc} + */ + public function walkUpdateStatement(AST\UpdateStatement $AST) + { + foreach ($this->_walkers as $walker) { + $walker->walkUpdateStatement($AST); + } + } + + /** + * {@inheritdoc} + */ + public function walkDeleteStatement(AST\DeleteStatement $AST) + { + foreach ($this->_walkers as $walker) { + $walker->walkDeleteStatement($AST); + } + } + + /** + * {@inheritdoc} + */ + public function walkDeleteClause(AST\DeleteClause $deleteClause) + { + foreach ($this->_walkers as $walker) { + $walker->walkDeleteClause($deleteClause); + } + } + + /** + * {@inheritdoc} + */ + public function walkUpdateClause($updateClause) + { + foreach ($this->_walkers as $walker) { + $walker->walkUpdateClause($updateClause); + } + } + + /** + * {@inheritdoc} + */ + public function walkUpdateItem($updateItem) + { + foreach ($this->_walkers as $walker) { + $walker->walkUpdateItem($updateItem); + } + } + + /** + * {@inheritdoc} + */ + public function walkWhereClause($whereClause) + { + foreach ($this->_walkers as $walker) { + $walker->walkWhereClause($whereClause); + } + } + + /** + * {@inheritdoc} + */ + public function walkConditionalExpression($condExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkConditionalExpression($condExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkConditionalTerm($condTerm) + { + foreach ($this->_walkers as $walker) { + $walker->walkConditionalTerm($condTerm); + } + } + + /** + * {@inheritdoc} + */ + public function walkConditionalFactor($factor) + { + foreach ($this->_walkers as $walker) { + $walker->walkConditionalFactor($factor); + } + } + + /** + * {@inheritdoc} + */ + public function walkConditionalPrimary($condPrimary) + { + foreach ($this->_walkers as $walker) { + $walker->walkConditionalPrimary($condPrimary); + } + } + + /** + * {@inheritdoc} + */ + public function walkExistsExpression($existsExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkExistsExpression($existsExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkCollectionMemberExpression($collMemberExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkCollectionMemberExpression($collMemberExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkEmptyCollectionComparisonExpression($emptyCollCompExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkNullComparisonExpression($nullCompExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkNullComparisonExpression($nullCompExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkInExpression($inExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkInExpression($inExpr); + } + } + + /** + * {@inheritdoc} + */ + function walkInstanceOfExpression($instanceOfExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkInstanceOfExpression($instanceOfExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkLiteral($literal) + { + foreach ($this->_walkers as $walker) { + $walker->walkLiteral($literal); + } + } + + /** + * {@inheritdoc} + */ + public function walkBetweenExpression($betweenExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkBetweenExpression($betweenExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkLikeExpression($likeExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkLikeExpression($likeExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkStateFieldPathExpression($stateFieldPathExpression) + { + foreach ($this->_walkers as $walker) { + $walker->walkStateFieldPathExpression($stateFieldPathExpression); + } + } + + /** + * {@inheritdoc} + */ + public function walkComparisonExpression($compExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkComparisonExpression($compExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkInputParameter($inputParam) + { + foreach ($this->_walkers as $walker) { + $walker->walkInputParameter($inputParam); + } + } + + /** + * {@inheritdoc} + */ + public function walkArithmeticExpression($arithmeticExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkArithmeticExpression($arithmeticExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkArithmeticTerm($term) + { + foreach ($this->_walkers as $walker) { + $walker->walkArithmeticTerm($term); + } + } + + /** + * {@inheritdoc} + */ + public function walkStringPrimary($stringPrimary) + { + foreach ($this->_walkers as $walker) { + $walker->walkStringPrimary($stringPrimary); + } + } + + /** + * {@inheritdoc} + */ + public function walkArithmeticFactor($factor) + { + foreach ($this->_walkers as $walker) { + $walker->walkArithmeticFactor($factor); + } + } + + /** + * {@inheritdoc} + */ + public function walkSimpleArithmeticExpression($simpleArithmeticExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkSimpleArithmeticExpression($simpleArithmeticExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkPathExpression($pathExpr) + { + foreach ($this->_walkers as $walker) { + $walker->walkPathExpression($pathExpr); + } + } + + /** + * {@inheritdoc} + */ + public function walkResultVariable($resultVariable) + { + foreach ($this->_walkers as $walker) { + $walker->walkResultVariable($resultVariable); + } + } + + /** + * {@inheritdoc} + */ + public function getExecutor($AST) + { + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalkerChainIterator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalkerChainIterator.php new file mode 100644 index 0000000000000000000000000000000000000000..1b0fb8a4f2ea6e152666a90fa3e75474acdf0fda --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalkerChainIterator.php @@ -0,0 +1,139 @@ +. + */ + +namespace Doctrine\ORM\Query; + +/** + * + */ +class TreeWalkerChainIterator implements \Iterator, \ArrayAccess +{ + /** + * @var TreeWalker[] + */ + private $walkers = array(); + /** + * @var TreeWalkerChain + */ + private $treeWalkerChain; + /** + * @var + */ + private $query; + /** + * @var + */ + private $parserResult; + + public function __construct(TreeWalkerChain $treeWalkerChain, $query, $parserResult) + { + $this->treeWalkerChain = $treeWalkerChain; + $this->query = $query; + $this->parserResult = $parserResult; + } + + /** + * {@inheritdoc} + */ + function rewind() + { + return reset($this->walkers); + } + + /** + * {@inheritdoc} + */ + function current() + { + return $this->offsetGet(key($this->walkers)); + } + + /** + * {@inheritdoc} + */ + function key() + { + return key($this->walkers); + } + + /** + * {@inheritdoc} + */ + function next() + { + next($this->walkers); + + return $this->offsetGet(key($this->walkers)); + } + + /** + * {@inheritdoc} + */ + function valid() + { + return key($this->walkers) !== null; + } + + + /** + * {@inheritdoc} + */ + public function offsetExists($offset) + { + return isset($this->walkers[$offset]); + } + + /** + * {@inheritdoc} + */ + public function offsetGet($offset) + { + if ($this->offsetExists($offset)) { + return new $this->walkers[$offset]( + $this->query, + $this->parserResult, + $this->treeWalkerChain->getQueryComponents() + ); + } + + return null; + } + + /** + * {@inheritdoc} + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->walkers[] = $value; + } else { + $this->walkers[$offset] = $value; + } + } + + /** + * {@inheritdoc} + */ + public function offsetUnset($offset) + { + if ($this->offsetExists($offset)) { + unset($this->walkers[$offset]); + } + } +} \ No newline at end of file diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/QueryBuilder.php b/vendor/doctrine/orm/lib/Doctrine/ORM/QueryBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..e7c603dc87633ea8adbf52a662f5d1882850c257 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/QueryBuilder.php @@ -0,0 +1,1516 @@ +. + */ + +namespace Doctrine\ORM; + +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Collections\Criteria; + +use Doctrine\ORM\Query\Expr; +use Doctrine\ORM\Query\QueryExpressionVisitor; + +/** + * This class is responsible for building DQL query strings via an object oriented + * PHP interface. + * + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class QueryBuilder +{ + /* The query types. */ + const SELECT = 0; + const DELETE = 1; + const UPDATE = 2; + + /* The builder states. */ + const STATE_DIRTY = 0; + const STATE_CLEAN = 1; + + /** + * The EntityManager used by this QueryBuilder. + * + * @var EntityManagerInterface + */ + private $_em; + + /** + * The array of DQL parts collected. + * + * @var array + */ + private $_dqlParts = array( + 'distinct' => false, + 'select' => array(), + 'from' => array(), + 'join' => array(), + 'set' => array(), + 'where' => null, + 'groupBy' => array(), + 'having' => null, + 'orderBy' => array() + ); + + /** + * The type of query this is. Can be select, update or delete. + * + * @var integer + */ + private $_type = self::SELECT; + + /** + * The state of the query object. Can be dirty or clean. + * + * @var integer + */ + private $_state = self::STATE_CLEAN; + + /** + * The complete DQL string for this query. + * + * @var string + */ + private $_dql; + + /** + * The query parameters. + * + * @var \Doctrine\Common\Collections\ArrayCollection + */ + private $parameters; + + /** + * The index of the first result to retrieve. + * + * @var integer + */ + private $_firstResult = null; + + /** + * The maximum number of results to retrieve. + * + * @var integer + */ + private $_maxResults = null; + + /** + * Keeps root entity alias names for join entities. + * + * @var array + */ + private $joinRootAliases = array(); + + /** + * Whether to use second level cache, if available. + * + * @var boolean + */ + protected $cacheable = false; + + /** + * Second level cache region name. + * + * @var string|null + */ + protected $cacheRegion; + + /** + * Second level query cache mode. + * + * @var integer|null + */ + protected $cacheMode; + + /** + * @var integer + */ + protected $lifetime = 0; + + /** + * Initializes a new QueryBuilder that uses the given EntityManager. + * + * @param EntityManagerInterface $em The EntityManager to use. + */ + public function __construct(EntityManagerInterface $em) + { + $this->_em = $em; + $this->parameters = new ArrayCollection(); + } + + /** + * Gets an ExpressionBuilder used for object-oriented construction of query expressions. + * This producer method is intended for convenient inline usage. Example: + * + * + * $qb = $em->createQueryBuilder(); + * $qb + * ->select('u') + * ->from('User', 'u') + * ->where($qb->expr()->eq('u.id', 1)); + * + * + * For more complex expression construction, consider storing the expression + * builder object in a local variable. + * + * @return Query\Expr + */ + public function expr() + { + return $this->_em->getExpressionBuilder(); + } + + /** + * + * Enable/disable second level query (result) caching for this query. + * + * @param boolean $cacheable + * + * @return \Doctrine\ORM\AbstractQuery This query instance. + */ + public function setCacheable($cacheable) + { + $this->cacheable = (boolean) $cacheable; + + return $this; + } + + /** + * @return boolean TRUE if the query results are enable for second level cache, FALSE otherwise. + */ + public function isCacheable() + { + return $this->cacheable; + } + + /** + * @param string $cacheRegion + * + * @return \Doctrine\ORM\AbstractQuery This query instance. + */ + public function setCacheRegion($cacheRegion) + { + $this->cacheRegion = (string) $cacheRegion; + + return $this; + } + + /** + * Obtain the name of the second level query cache region in which query results will be stored + * + * @return The cache region name; NULL indicates the default region. + */ + public function getCacheRegion() + { + return $this->cacheRegion; + } + + /** + * @return integer + */ + public function getLifetime() + { + return $this->lifetime; + } + + /** + * Sets the life-time for this query into second level cache. + * + * @param integer $lifetime + * @return \Doctrine\ORM\AbstractQuery This query instance. + */ + public function setLifetime($lifetime) + { + $this->lifetime = (integer) $lifetime; + + return $this; + } + + /** + * @return integer + */ + public function getCacheMode() + { + return $this->cacheMode; + } + + /** + * @param integer $cacheMode + * @return \Doctrine\ORM\AbstractQuery This query instance. + */ + public function setCacheMode($cacheMode) + { + $this->cacheMode = (integer) $cacheMode; + + return $this; + } + + /** + * Gets the type of the currently built query. + * + * @return integer + */ + public function getType() + { + return $this->_type; + } + + /** + * Gets the associated EntityManager for this query builder. + * + * @return EntityManager + */ + public function getEntityManager() + { + return $this->_em; + } + + /** + * Gets the state of this query builder instance. + * + * @return integer Either QueryBuilder::STATE_DIRTY or QueryBuilder::STATE_CLEAN. + */ + public function getState() + { + return $this->_state; + } + + /** + * Gets the complete DQL string formed by the current specifications of this QueryBuilder. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u'); + * echo $qb->getDql(); // SELECT u FROM User u + * + * + * @return string The DQL query string. + */ + public function getDQL() + { + if ($this->_dql !== null && $this->_state === self::STATE_CLEAN) { + return $this->_dql; + } + + switch ($this->_type) { + case self::DELETE: + $dql = $this->_getDQLForDelete(); + break; + + case self::UPDATE: + $dql = $this->_getDQLForUpdate(); + break; + + case self::SELECT: + default: + $dql = $this->_getDQLForSelect(); + break; + } + + $this->_state = self::STATE_CLEAN; + $this->_dql = $dql; + + return $dql; + } + + /** + * Constructs a Query instance from the current specifications of the builder. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u'); + * $q = $qb->getQuery(); + * $results = $q->execute(); + * + * + * @return Query + */ + public function getQuery() + { + $parameters = clone $this->parameters; + $query = $this->_em->createQuery($this->getDQL()) + ->setParameters($parameters) + ->setFirstResult($this->_firstResult) + ->setMaxResults($this->_maxResults); + + if ($this->lifetime) { + $query->setLifetime($this->lifetime); + } + + if ($this->cacheMode) { + $query->setCacheMode($this->cacheMode); + } + + if ($this->cacheable) { + $query->setCacheable($this->cacheable); + } + + if ($this->cacheRegion) { + $query->setCacheRegion($this->cacheRegion); + } + + return $query; + } + + /** + * Finds the root entity alias of the joined entity. + * + * @param string $alias The alias of the new join entity + * @param string $parentAlias The parent entity alias of the join relationship + * + * @return string + */ + private function findRootAlias($alias, $parentAlias) + { + $rootAlias = null; + + if (in_array($parentAlias, $this->getRootAliases())) { + $rootAlias = $parentAlias; + } elseif (isset($this->joinRootAliases[$parentAlias])) { + $rootAlias = $this->joinRootAliases[$parentAlias]; + } else { + // Should never happen with correct joining order. Might be + // thoughtful to throw exception instead. + $rootAlias = $this->getRootAlias(); + } + + $this->joinRootAliases[$alias] = $rootAlias; + + return $rootAlias; + } + + /** + * Gets the FIRST root alias of the query. This is the first entity alias involved + * in the construction of the query. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u'); + * + * echo $qb->getRootAlias(); // u + * + * + * @deprecated Please use $qb->getRootAliases() instead. + * @throws RuntimeException + * + * @return string + */ + public function getRootAlias() + { + $aliases = $this->getRootAliases(); + + if ( ! isset($aliases[0])) { + throw new \RuntimeException('No alias was set before invoking getRootAlias().'); + } + + return $aliases[0]; + } + + /** + * Gets the root aliases of the query. This is the entity aliases involved + * in the construction of the query. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u'); + * + * $qb->getRootAliases(); // array('u') + * + * + * @return array + */ + public function getRootAliases() + { + $aliases = array(); + + foreach ($this->_dqlParts['from'] as &$fromClause) { + if (is_string($fromClause)) { + $spacePos = strrpos($fromClause, ' '); + $from = substr($fromClause, 0, $spacePos); + $alias = substr($fromClause, $spacePos + 1); + + $fromClause = new Query\Expr\From($from, $alias); + } + + $aliases[] = $fromClause->getAlias(); + } + + return $aliases; + } + + /** + * Gets all the aliases that have been used in the query. + * Including all select root aliases and join aliases + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * ->join('u.articles','a'; + * + * $qb->getAllAliases(); // array('u','a') + * + * @return array + */ + public function getAllAliases() { + return array_merge($this->getRootAliases(),array_keys($this->joinRootAliases)); + } + + /** + * Gets the root entities of the query. This is the entity aliases involved + * in the construction of the query. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u'); + * + * $qb->getRootEntities(); // array('User') + * + * + * @return array + */ + public function getRootEntities() + { + $entities = array(); + + foreach ($this->_dqlParts['from'] as &$fromClause) { + if (is_string($fromClause)) { + $spacePos = strrpos($fromClause, ' '); + $from = substr($fromClause, 0, $spacePos); + $alias = substr($fromClause, $spacePos + 1); + + $fromClause = new Query\Expr\From($from, $alias); + } + + $entities[] = $fromClause->getFrom(); + } + + return $entities; + } + + /** + * Sets a query parameter for the query being constructed. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * ->where('u.id = :user_id') + * ->setParameter('user_id', 1); + * + * + * @param string|integer $key The parameter position or name. + * @param mixed $value The parameter value. + * @param string|null $type PDO::PARAM_* or \Doctrine\DBAL\Types\Type::* constant + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function setParameter($key, $value, $type = null) + { + $filteredParameters = $this->parameters->filter( + function ($parameter) use ($key) + { + // Must not be identical because of string to integer conversion + return ($key == $parameter->getName()); + } + ); + + if (count($filteredParameters)) { + $parameter = $filteredParameters->first(); + $parameter->setValue($value, $type); + + return $this; + } + + $parameter = new Query\Parameter($key, $value, $type); + + $this->parameters->add($parameter); + + return $this; + } + + /** + * Sets a collection of query parameters for the query being constructed. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * ->where('u.id = :user_id1 OR u.id = :user_id2') + * ->setParameters(new ArrayCollection(array( + * new Parameter('user_id1', 1), + * new Parameter('user_id2', 2) + * ))); + * + * + * @param \Doctrine\Common\Collections\ArrayCollection|array $parameters The query parameters to set. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function setParameters($parameters) + { + // BC compatibility with 2.3- + if (is_array($parameters)) { + $parameterCollection = new ArrayCollection(); + + foreach ($parameters as $key => $value) { + $parameter = new Query\Parameter($key, $value); + + $parameterCollection->add($parameter); + } + + $parameters = $parameterCollection; + } + + $this->parameters = $parameters; + + return $this; + } + + /** + * Gets all defined query parameters for the query being constructed. + * + * @return \Doctrine\Common\Collections\ArrayCollection The currently defined query parameters. + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Gets a (previously set) query parameter of the query being constructed. + * + * @param mixed $key The key (index or name) of the bound parameter. + * + * @return Query\Parameter|null The value of the bound parameter. + */ + public function getParameter($key) + { + $filteredParameters = $this->parameters->filter( + function ($parameter) use ($key) + { + // Must not be identical because of string to integer conversion + return ($key == $parameter->getName()); + } + ); + + return count($filteredParameters) ? $filteredParameters->first() : null; + } + + /** + * Sets the position of the first result to retrieve (the "offset"). + * + * @param integer $firstResult The first result to return. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function setFirstResult($firstResult) + { + $this->_firstResult = $firstResult; + + return $this; + } + + /** + * Gets the position of the first result the query object was set to retrieve (the "offset"). + * Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder. + * + * @return integer The position of the first result. + */ + public function getFirstResult() + { + return $this->_firstResult; + } + + /** + * Sets the maximum number of results to retrieve (the "limit"). + * + * @param integer $maxResults The maximum number of results to retrieve. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function setMaxResults($maxResults) + { + $this->_maxResults = $maxResults; + + return $this; + } + + /** + * Gets the maximum number of results the query object was set to retrieve (the "limit"). + * Returns NULL if {@link setMaxResults} was not applied to this query builder. + * + * @return integer Maximum number of results. + */ + public function getMaxResults() + { + return $this->_maxResults; + } + + /** + * Either appends to or replaces a single, generic query part. + * + * The available parts are: 'select', 'from', 'join', 'set', 'where', + * 'groupBy', 'having' and 'orderBy'. + * + * @param string $dqlPartName + * @param Expr\Base $dqlPart + * @param bool $append + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function add($dqlPartName, $dqlPart, $append = false) + { + if ($append && ($dqlPartName === "where" || $dqlPartName === "having")) { + throw new \InvalidArgumentException( + "Using \$append = true does not have an effect with 'where' or 'having' ". + "parts. See QueryBuilder#andWhere() for an example for correct usage." + ); + } + + $isMultiple = is_array($this->_dqlParts[$dqlPartName]) + && !($dqlPartName == 'join' && !$append); + + // Allow adding any part retrieved from self::getDQLParts(). + if (is_array($dqlPart) && $dqlPartName != 'join') { + $dqlPart = reset($dqlPart); + } + + // This is introduced for backwards compatibility reasons. + // TODO: Remove for 3.0 + if ($dqlPartName == 'join') { + $newDqlPart = array(); + + foreach ($dqlPart as $k => $v) { + $k = is_numeric($k) ? $this->getRootAlias() : $k; + + $newDqlPart[$k] = $v; + } + + $dqlPart = $newDqlPart; + } + + if ($append && $isMultiple) { + if (is_array($dqlPart)) { + $key = key($dqlPart); + + $this->_dqlParts[$dqlPartName][$key][] = $dqlPart[$key]; + } else { + $this->_dqlParts[$dqlPartName][] = $dqlPart; + } + } else { + $this->_dqlParts[$dqlPartName] = ($isMultiple) ? array($dqlPart) : $dqlPart; + } + + $this->_state = self::STATE_DIRTY; + + return $this; + } + + /** + * Specifies an item that is to be returned in the query result. + * Replaces any previously specified selections, if any. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u', 'p') + * ->from('User', 'u') + * ->leftJoin('u.Phonenumbers', 'p'); + * + * + * @param mixed $select The selection expressions. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function select($select = null) + { + $this->_type = self::SELECT; + + if (empty($select)) { + return $this; + } + + $selects = is_array($select) ? $select : func_get_args(); + + return $this->add('select', new Expr\Select($selects), false); + } + + /** + * Adds a DISTINCT flag to this query. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->distinct() + * ->from('User', 'u'); + * + * + * @param bool $flag + * + * @return QueryBuilder + */ + public function distinct($flag = true) + { + $this->_dqlParts['distinct'] = (bool) $flag; + + return $this; + } + + /** + * Adds an item that is to be returned in the query result. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->addSelect('p') + * ->from('User', 'u') + * ->leftJoin('u.Phonenumbers', 'p'); + * + * + * @param mixed $select The selection expression. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function addSelect($select = null) + { + $this->_type = self::SELECT; + + if (empty($select)) { + return $this; + } + + $selects = is_array($select) ? $select : func_get_args(); + + return $this->add('select', new Expr\Select($selects), true); + } + + /** + * Turns the query being built into a bulk delete query that ranges over + * a certain entity type. + * + * + * $qb = $em->createQueryBuilder() + * ->delete('User', 'u') + * ->where('u.id = :user_id') + * ->setParameter('user_id', 1); + * + * + * @param string $delete The class/type whose instances are subject to the deletion. + * @param string $alias The class/type alias used in the constructed query. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function delete($delete = null, $alias = null) + { + $this->_type = self::DELETE; + + if ( ! $delete) { + return $this; + } + + return $this->add('from', new Expr\From($delete, $alias)); + } + + /** + * Turns the query being built into a bulk update query that ranges over + * a certain entity type. + * + * + * $qb = $em->createQueryBuilder() + * ->update('User', 'u') + * ->set('u.password', md5('password')) + * ->where('u.id = ?'); + * + * + * @param string $update The class/type whose instances are subject to the update. + * @param string $alias The class/type alias used in the constructed query. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function update($update = null, $alias = null) + { + $this->_type = self::UPDATE; + + if ( ! $update) { + return $this; + } + + return $this->add('from', new Expr\From($update, $alias)); + } + + /** + * Creates and adds a query root corresponding to the entity identified by the given alias, + * forming a cartesian product with any existing query roots. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u'); + * + * + * @param string $from The class name. + * @param string $alias The alias of the class. + * @param string $indexBy The index for the from. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function from($from, $alias, $indexBy = null) + { + return $this->add('from', new Expr\From($from, $alias, $indexBy), true); + } + + /** + * Updates a query root corresponding to an entity setting its index by. This method is intended to be used with + * EntityRepository->createQueryBuilder(), which creates the initial FROM clause and do not allow you to update it + * setting an index by. + * + * + * $qb = $userRepository->createQueryBuilder('u') + * ->indexBy('u', 'u.id'); + * + * // Is equivalent to... + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u', 'u.id'); + * + * + * @param string $alias The root alias of the class. + * @param string $indexBy The index for the from. + * + * @return QueryBuilder This QueryBuilder instance. + * + * @throws Query\QueryException + */ + public function indexBy($alias, $indexBy) + { + $rootAliases = $this->getRootAliases(); + + if (!in_array($alias, $rootAliases)) { + throw new Query\QueryException( + sprintf('Specified root alias %s must be set before invoking indexBy().', $alias) + ); + } + + foreach ($this->_dqlParts['from'] as &$fromClause) { + if ($fromClause->getAlias() !== $alias) { + continue; + } + + $fromClause = new Expr\From($fromClause->getFrom(), $fromClause->getAlias(), $indexBy); + } + + return $this; + } + + /** + * Creates and adds a join over an entity association to the query. + * + * The entities in the joined association will be fetched as part of the query + * result if the alias used for the joined association is placed in the select + * expressions. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * ->join('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1'); + * + * + * @param string $join The relationship to join. + * @param string $alias The alias of the join. + * @param string|null $conditionType The condition type constant. Either ON or WITH. + * @param string|null $condition The condition for the join. + * @param string|null $indexBy The index for the join. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function join($join, $alias, $conditionType = null, $condition = null, $indexBy = null) + { + return $this->innerJoin($join, $alias, $conditionType, $condition, $indexBy); + } + + /** + * Creates and adds a join over an entity association to the query. + * + * The entities in the joined association will be fetched as part of the query + * result if the alias used for the joined association is placed in the select + * expressions. + * + * [php] + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * ->innerJoin('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1'); + * + * @param string $join The relationship to join. + * @param string $alias The alias of the join. + * @param string|null $conditionType The condition type constant. Either ON or WITH. + * @param string|null $condition The condition for the join. + * @param string|null $indexBy The index for the join. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function innerJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null) + { + $parentAlias = substr($join, 0, strpos($join, '.')); + + $rootAlias = $this->findRootAlias($alias, $parentAlias); + + $join = new Expr\Join( + Expr\Join::INNER_JOIN, $join, $alias, $conditionType, $condition, $indexBy + ); + + return $this->add('join', array($rootAlias => $join), true); + } + + /** + * Creates and adds a left join over an entity association to the query. + * + * The entities in the joined association will be fetched as part of the query + * result if the alias used for the joined association is placed in the select + * expressions. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * ->leftJoin('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1'); + * + * + * @param string $join The relationship to join. + * @param string $alias The alias of the join. + * @param string|null $conditionType The condition type constant. Either ON or WITH. + * @param string|null $condition The condition for the join. + * @param string|null $indexBy The index for the join. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function leftJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null) + { + $parentAlias = substr($join, 0, strpos($join, '.')); + + $rootAlias = $this->findRootAlias($alias, $parentAlias); + + $join = new Expr\Join( + Expr\Join::LEFT_JOIN, $join, $alias, $conditionType, $condition, $indexBy + ); + + return $this->add('join', array($rootAlias => $join), true); + } + + /** + * Sets a new value for a field in a bulk update query. + * + * + * $qb = $em->createQueryBuilder() + * ->update('User', 'u') + * ->set('u.password', md5('password')) + * ->where('u.id = ?'); + * + * + * @param string $key The key/field to set. + * @param string $value The value, expression, placeholder, etc. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function set($key, $value) + { + return $this->add('set', new Expr\Comparison($key, Expr\Comparison::EQ, $value), true); + } + + /** + * Specifies one or more restrictions to the query result. + * Replaces any previously specified restrictions, if any. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * ->where('u.id = ?'); + * + * // You can optionally programatically build and/or expressions + * $qb = $em->createQueryBuilder(); + * + * $or = $qb->expr()->orx(); + * $or->add($qb->expr()->eq('u.id', 1)); + * $or->add($qb->expr()->eq('u.id', 2)); + * + * $qb->update('User', 'u') + * ->set('u.password', md5('password')) + * ->where($or); + * + * + * @param mixed $predicates The restriction predicates. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function where($predicates) + { + if ( ! (func_num_args() == 1 && $predicates instanceof Expr\Composite)) { + $predicates = new Expr\Andx(func_get_args()); + } + + return $this->add('where', $predicates); + } + + /** + * Adds one or more restrictions to the query results, forming a logical + * conjunction with any previously specified restrictions. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * ->where('u.username LIKE ?') + * ->andWhere('u.is_active = 1'); + * + * + * @param mixed $where The query restrictions. + * + * @return QueryBuilder This QueryBuilder instance. + * + * @see where() + */ + public function andWhere() + { + $args = func_get_args(); + $where = $this->getDQLPart('where'); + + if ($where instanceof Expr\Andx) { + $where->addMultiple($args); + } else { + array_unshift($args, $where); + $where = new Expr\Andx($args); + } + + return $this->add('where', $where); + } + + /** + * Adds one or more restrictions to the query results, forming a logical + * disjunction with any previously specified restrictions. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * ->where('u.id = 1') + * ->orWhere('u.id = 2'); + * + * + * @param mixed $where The WHERE statement. + * + * @return QueryBuilder + * + * @see where() + */ + public function orWhere() + { + $args = func_get_args(); + $where = $this->getDqlPart('where'); + + if ($where instanceof Expr\Orx) { + $where->addMultiple($args); + } else { + array_unshift($args, $where); + $where = new Expr\Orx($args); + } + + return $this->add('where', $where); + } + + /** + * Specifies a grouping over the results of the query. + * Replaces any previously specified groupings, if any. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * ->groupBy('u.id'); + * + * + * @param string $groupBy The grouping expression. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function groupBy($groupBy) + { + return $this->add('groupBy', new Expr\GroupBy(func_get_args())); + } + + /** + * Adds a grouping expression to the query. + * + * + * $qb = $em->createQueryBuilder() + * ->select('u') + * ->from('User', 'u') + * ->groupBy('u.lastLogin') + * ->addGroupBy('u.createdAt'); + * + * + * @param string $groupBy The grouping expression. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function addGroupBy($groupBy) + { + return $this->add('groupBy', new Expr\GroupBy(func_get_args()), true); + } + + /** + * Specifies a restriction over the groups of the query. + * Replaces any previous having restrictions, if any. + * + * @param mixed $having The restriction over the groups. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function having($having) + { + if ( ! (func_num_args() == 1 && ($having instanceof Expr\Andx || $having instanceof Expr\Orx))) { + $having = new Expr\Andx(func_get_args()); + } + + return $this->add('having', $having); + } + + /** + * Adds a restriction over the groups of the query, forming a logical + * conjunction with any existing having restrictions. + * + * @param mixed $having The restriction to append. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function andHaving($having) + { + $args = func_get_args(); + $having = $this->getDqlPart('having'); + + if ($having instanceof Expr\Andx) { + $having->addMultiple($args); + } else { + array_unshift($args, $having); + $having = new Expr\Andx($args); + } + + return $this->add('having', $having); + } + + /** + * Adds a restriction over the groups of the query, forming a logical + * disjunction with any existing having restrictions. + * + * @param mixed $having The restriction to add. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function orHaving($having) + { + $args = func_get_args(); + $having = $this->getDqlPart('having'); + + if ($having instanceof Expr\Orx) { + $having->addMultiple($args); + } else { + array_unshift($args, $having); + $having = new Expr\Orx($args); + } + + return $this->add('having', $having); + } + + /** + * Specifies an ordering for the query results. + * Replaces any previously specified orderings, if any. + * + * @param string|Expr\OrderBy $sort The ordering expression. + * @param string $order The ordering direction. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function orderBy($sort, $order = null) + { + $orderBy = ($sort instanceof Expr\OrderBy) ? $sort : new Expr\OrderBy($sort, $order); + + return $this->add('orderBy', $orderBy); + } + + /** + * Adds an ordering to the query results. + * + * @param string|Expr\OrderBy $sort The ordering expression. + * @param string $order The ordering direction. + * + * @return QueryBuilder This QueryBuilder instance. + */ + public function addOrderBy($sort, $order = null) + { + $orderBy = ($sort instanceof Expr\OrderBy) ? $sort : new Expr\OrderBy($sort, $order); + + return $this->add('orderBy', $orderBy, true); + } + + /** + * Adds criteria to the query. + * + * Adds where expressions with AND operator. + * Adds orderings. + * Overrides firstResult and maxResults if they're set. + * + * @param Criteria $criteria + * @return QueryBuilder + * @throws Query\QueryException + */ + public function addCriteria(Criteria $criteria) + { + $allAliases = $this->getAllAliases(); + if ( ! isset($allAliases[0])) { + throw new Query\QueryException('No aliases are set before invoking addCriteria().'); + } + + $visitor = new QueryExpressionVisitor($this->getAllAliases()); + + if ($whereExpression = $criteria->getWhereExpression()) { + $this->andWhere($visitor->dispatch($whereExpression)); + foreach ($visitor->getParameters() as $parameter) { + $this->parameters->add($parameter); + } + } + + if ($criteria->getOrderings()) { + foreach ($criteria->getOrderings() as $sort => $order) { + + $hasValidAlias = false; + foreach($allAliases as $alias) { + if(strpos($sort . '.', $alias . '.') === 0) { + $hasValidAlias = true; + break; + } + } + + if(!$hasValidAlias) { + $sort = $allAliases[0] . '.' . $sort; + } + + $this->addOrderBy($sort, $order); + } + } + + // Overwrite limits only if they was set in criteria + if (($firstResult = $criteria->getFirstResult()) !== null) { + $this->setFirstResult($firstResult); + } + if (($maxResults = $criteria->getMaxResults()) !== null) { + $this->setMaxResults($maxResults); + } + + return $this; + } + + /** + * Gets a query part by its name. + * + * @param string $queryPartName + * + * @return mixed $queryPart + * + * @todo Rename: getQueryPart (or remove?) + */ + public function getDQLPart($queryPartName) + { + return $this->_dqlParts[$queryPartName]; + } + + /** + * Gets all query parts. + * + * @return array $dqlParts + * + * @todo Rename: getQueryParts (or remove?) + */ + public function getDQLParts() + { + return $this->_dqlParts; + } + + /** + * @return string + */ + private function _getDQLForDelete() + { + return 'DELETE' + . $this->_getReducedDQLQueryPart('from', array('pre' => ' ', 'separator' => ', ')) + . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE ')) + . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', ')); + } + + /** + * @return string + */ + private function _getDQLForUpdate() + { + return 'UPDATE' + . $this->_getReducedDQLQueryPart('from', array('pre' => ' ', 'separator' => ', ')) + . $this->_getReducedDQLQueryPart('set', array('pre' => ' SET ', 'separator' => ', ')) + . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE ')) + . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', ')); + } + + /** + * @return string + */ + private function _getDQLForSelect() + { + $dql = 'SELECT' + . ($this->_dqlParts['distinct']===true ? ' DISTINCT' : '') + . $this->_getReducedDQLQueryPart('select', array('pre' => ' ', 'separator' => ', ')); + + $fromParts = $this->getDQLPart('from'); + $joinParts = $this->getDQLPart('join'); + $fromClauses = array(); + + // Loop through all FROM clauses + if ( ! empty($fromParts)) { + $dql .= ' FROM '; + + foreach ($fromParts as $from) { + $fromClause = (string) $from; + + if ($from instanceof Expr\From && isset($joinParts[$from->getAlias()])) { + foreach ($joinParts[$from->getAlias()] as $join) { + $fromClause .= ' ' . ((string) $join); + } + } + + $fromClauses[] = $fromClause; + } + } + + $dql .= implode(', ', $fromClauses) + . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE ')) + . $this->_getReducedDQLQueryPart('groupBy', array('pre' => ' GROUP BY ', 'separator' => ', ')) + . $this->_getReducedDQLQueryPart('having', array('pre' => ' HAVING ')) + . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', ')); + + return $dql; + } + + /** + * @param string $queryPartName + * @param array $options + * + * @return string + */ + private function _getReducedDQLQueryPart($queryPartName, $options = array()) + { + $queryPart = $this->getDQLPart($queryPartName); + + if (empty($queryPart)) { + return (isset($options['empty']) ? $options['empty'] : ''); + } + + return (isset($options['pre']) ? $options['pre'] : '') + . (is_array($queryPart) ? implode($options['separator'], $queryPart) : $queryPart) + . (isset($options['post']) ? $options['post'] : ''); + } + + /** + * Resets DQL parts. + * + * @param array|null $parts + * + * @return QueryBuilder + */ + public function resetDQLParts($parts = null) + { + if (is_null($parts)) { + $parts = array_keys($this->_dqlParts); + } + + foreach ($parts as $part) { + $this->resetDQLPart($part); + } + + return $this; + } + + /** + * Resets single DQL part. + * + * @param string $part + * + * @return QueryBuilder + */ + public function resetDQLPart($part) + { + $this->_dqlParts[$part] = is_array($this->_dqlParts[$part]) ? array() : null; + $this->_state = self::STATE_DIRTY; + + return $this; + } + + /** + * Gets a string representation of this QueryBuilder which corresponds to + * the final DQL query being constructed. + * + * @return string The string representation of this QueryBuilder. + */ + public function __toString() + { + return $this->getDQL(); + } + + /** + * Deep clones all expression objects in the DQL parts. + * + * @return void + */ + public function __clone() + { + foreach ($this->_dqlParts as $part => $elements) { + if (is_array($this->_dqlParts[$part])) { + foreach ($this->_dqlParts[$part] as $idx => $element) { + if (is_object($element)) { + $this->_dqlParts[$part][$idx] = clone $element; + } + } + } else if (is_object($elements)) { + $this->_dqlParts[$part] = clone $elements; + } + } + + $parameters = array(); + + foreach ($this->parameters as $parameter) { + $parameters[] = clone $parameter; + } + + $this->parameters = new ArrayCollection($parameters); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/README.markdown b/vendor/doctrine/orm/lib/Doctrine/ORM/README.markdown new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..12163eff6157a9b60e4336589e6999f61ebf5c80 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php @@ -0,0 +1,70 @@ +. + */ + +namespace Doctrine\ORM\Repository; + +use Doctrine\ORM\EntityManagerInterface; + +/** + * This factory is used to create default repository objects for entities at runtime. + * + * @author Guilherme Blanco + * @since 2.4 + */ +final class DefaultRepositoryFactory implements RepositoryFactory +{ + /** + * The list of EntityRepository instances. + * + * @var \Doctrine\Common\Persistence\ObjectRepository[] + */ + private $repositoryList = array(); + + /** + * {@inheritdoc} + */ + public function getRepository(EntityManagerInterface $entityManager, $entityName) + { + $repositoryHash = $entityManager->getClassMetadata($entityName)->getName() . spl_object_hash($entityManager); + + if (isset($this->repositoryList[$repositoryHash])) { + return $this->repositoryList[$repositoryHash]; + } + + return $this->repositoryList[$repositoryHash] = $this->createRepository($entityManager, $entityName); + } + + /** + * Create a new repository instance for an entity class. + * + * @param \Doctrine\ORM\EntityManagerInterface $entityManager The EntityManager instance. + * @param string $entityName The name of the entity. + * + * @return \Doctrine\Common\Persistence\ObjectRepository + */ + private function createRepository(EntityManagerInterface $entityManager, $entityName) + { + /* @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */ + $metadata = $entityManager->getClassMetadata($entityName); + $repositoryClassName = $metadata->customRepositoryClassName + ?: $entityManager->getConfiguration()->getDefaultRepositoryClassName(); + + return new $repositoryClassName($entityManager, $metadata); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/RepositoryFactory.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/RepositoryFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..f3af43ebe0d4ecee3e3a656c9c73b90a590e2195 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/RepositoryFactory.php @@ -0,0 +1,41 @@ +. + */ + +namespace Doctrine\ORM\Repository; + +use Doctrine\ORM\EntityManagerInterface; + +/** + * Interface for entity repository factory. + * + * @author Guilherme Blanco + * @since 2.4 + */ +interface RepositoryFactory +{ + /** + * Gets the repository for an entity class. + * + * @param \Doctrine\ORM\EntityManagerInterface $entityManager The EntityManager instance. + * @param string $entityName The name of the entity. + * + * @return \Doctrine\Common\Persistence\ObjectRepository + */ + public function getRepository(EntityManagerInterface $entityManager, $entityName); +} \ No newline at end of file diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/AttachEntityListenersListener.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/AttachEntityListenersListener.php new file mode 100644 index 0000000000000000000000000000000000000000..2b6c91aedcf234c80299e195ee376fe7a4977239 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/AttachEntityListenersListener.php @@ -0,0 +1,79 @@ +. + */ + +namespace Doctrine\ORM\Tools; + +use Doctrine\ORM\Event\LoadClassMetadataEventArgs; + +/** + * Mechanism to programmatically attach entity listeners. + * + * @author Fabio B. SIlva + * + * @since 2.5 + */ +class AttachEntityListenersListener +{ + /** + * @var array[] + */ + private $entityListeners = array(); + + /** + * Adds a entity listener for a specific entity. + * + * @param string $entityClass The entity to attach the listener. + * @param string $listenerClass The listener class. + * @param string $eventName The entity lifecycle event. + * @param string $listenerCallback|null The listener callback method or NULL to use $eventName. + * + * @return void + */ + public function addEntityListener($entityClass, $listenerClass, $eventName, $listenerCallback = null) + { + $this->entityListeners[ltrim($entityClass, '\\')][] = array( + 'event' => $eventName, + 'class' => $listenerClass, + 'method' => $listenerCallback ?: $eventName + ); + } + + /** + * Processes event and attach the entity listener. + * + * @param \Doctrine\ORM\Event\LoadClassMetadataEventArgs $event + * + * @return void + */ + public function loadClassMetadata(LoadClassMetadataEventArgs $event) + { + /** @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */ + $metadata = $event->getClassMetadata(); + + if ( ! isset($this->entityListeners[$metadata->name])) { + return; + } + + foreach ($this->entityListeners[$metadata->name] as $listener) { + $metadata->addEntityListener($listener['event'], $listener['class'], $listener['method']); + } + + unset($this->entityListeners[$metadata->name]); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/CollectionRegionCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/CollectionRegionCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..80df37a6400edf6139e78a73db45abe4731390c8 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/CollectionRegionCommand.php @@ -0,0 +1,134 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\ClearCache; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Cache\Region\DefaultRegion; +use Doctrine\ORM\Cache; + +/** + * Command to clear a collection cache region. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class CollectionRegionCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:clear-cache:region:collection') + ->setDescription('Clear a second-level cache collection region.') + ->addArgument('owner-class', InputArgument::OPTIONAL, 'The owner entity name.') + ->addArgument('association', InputArgument::OPTIONAL, 'The association collection name.') + ->addArgument('owner-id', InputArgument::OPTIONAL, 'The owner identifier.') + ->addOption('all', null, InputOption::VALUE_NONE, 'If defined, all entity regions will be deleted/invalidated.') + ->addOption('flush', null, InputOption::VALUE_NONE,'If defined, all cache entries will be flushed.'); + + + $this->setHelp(<<%command.name% command is meant to clear a second-level cache collection regions for an associated Entity Manager. +It is possible to delete/invalidate all collection region, a specific collection region or flushes the cache provider. + +The execution type differ on how you execute the command. +If you want to invalidate all entries for an collection region this command would do the work: + +%command.name% 'Entities\MyEntity' 'collectionName' + +To invalidate a specific entry you should use : + +%command.name% 'Entities\MyEntity' 'collectionName' 1 + +If you want to invalidate all entries for the all collection regions: + +%command.name% --all + +Alternatively, if you want to flush the configured cache provider for an collection region use this command: + +%command.name% 'Entities\MyEntity' 'collectionName' --flush + +Finally, be aware that if --flush option is passed, +not all cache providers are able to flush entries, because of a limitation of its execution nature. +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $em = $this->getHelper('em')->getEntityManager(); + $ownerClass = $input->getArgument('owner-class'); + $assoc = $input->getArgument('association'); + $ownerId = $input->getArgument('owner-id'); + $cache = $em->getCache(); + + if ( ! $cache instanceof Cache) { + throw new \InvalidArgumentException('No second-level cache is configured on the given EntityManager.'); + } + + if ( (! $ownerClass || ! $assoc) && ! $input->getOption('all')) { + throw new \InvalidArgumentException('Missing arguments "--owner-class" "--association"'); + } + + if ($input->getOption('flush')) { + $collectionRegion = $cache->getCollectionCacheRegion($ownerClass, $assoc); + + if ( ! $collectionRegion instanceof DefaultRegion) { + throw new \InvalidArgumentException(sprintf( + 'The option "--flush" expects a "Doctrine\ORM\Cache\Region\DefaultRegion", but got "%s".', + is_object($collectionRegion) ? get_class($collectionRegion) : gettype($collectionRegion) + )); + } + + $collectionRegion->getCache()->flushAll(); + + $output->writeln(sprintf('Flushing cache provider configured for "%s#%s"', $ownerClass, $assoc)); + + return; + } + + if ($input->getOption('all')) { + $output->writeln('Clearing all second-level cache collection regions'); + + $cache->evictEntityRegions(); + + return; + } + + if ($ownerId) { + $output->writeln(sprintf('Clearing second-level cache entry for collection "%s#%s" owner entity identified by "%s"', $ownerClass, $assoc, $ownerId)); + $cache->evictCollection($ownerClass, $assoc, $ownerId); + + return; + } + + $output->writeln(sprintf('Clearing second-level cache for collection "%s#%s"', $ownerClass, $assoc)); + $cache->evictCollectionRegion($ownerClass, $assoc); + } +} \ No newline at end of file diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/EntityRegionCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/EntityRegionCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..21f6e9de9ee5e60624273ace7f8b108ae25f77ac --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/EntityRegionCommand.php @@ -0,0 +1,132 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\ClearCache; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Cache\Region\DefaultRegion; +use Doctrine\ORM\Cache; + +/** + * Command to clear a entity cache region. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class EntityRegionCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:clear-cache:region:entity') + ->setDescription('Clear a second-level cache entity region.') + ->addArgument('entity-class', InputArgument::OPTIONAL, 'The entity name.') + ->addArgument('entity-id', InputArgument::OPTIONAL, 'The entity identifier.') + ->addOption('all', null, InputOption::VALUE_NONE, 'If defined, all entity regions will be deleted/invalidated.') + ->addOption('flush', null, InputOption::VALUE_NONE,'If defined, all cache entries will be flushed.'); + + + $this->setHelp(<<%command.name% command is meant to clear a second-level cache entity region for an associated Entity Manager. +It is possible to delete/invalidate all entity region, a specific entity region or flushes the cache provider. + +The execution type differ on how you execute the command. +If you want to invalidate all entries for an entity region this command would do the work: + +%command.name% 'Entities\MyEntity' + +To invalidate a specific entry you should use : + +%command.name% 'Entities\MyEntity' 1 + +If you want to invalidate all entries for the all entity regions: + +%command.name% --all + +Alternatively, if you want to flush the configured cache provider for an entity region use this command: + +%command.name% 'Entities\MyEntity' --flush + +Finally, be aware that if --flush option is passed, +not all cache providers are able to flush entries, because of a limitation of its execution nature. +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $em = $this->getHelper('em')->getEntityManager(); + $entityClass = $input->getArgument('entity-class'); + $entityId = $input->getArgument('entity-id'); + $cache = $em->getCache(); + + if ( ! $cache instanceof Cache) { + throw new \InvalidArgumentException('No second-level cache is configured on the given EntityManager.'); + } + + if ( ! $entityClass && ! $input->getOption('all')) { + throw new \InvalidArgumentException('Invalid argument "--entity-class"'); + } + + if ($input->getOption('flush')) { + $entityRegion = $cache->getEntityCacheRegion($entityClass); + + if ( ! $entityRegion instanceof DefaultRegion) { + throw new \InvalidArgumentException(sprintf( + 'The option "--flush" expects a "Doctrine\ORM\Cache\Region\DefaultRegion", but got "%s".', + is_object($entityRegion) ? get_class($entityRegion) : gettype($entityRegion) + )); + } + + $entityRegion->getCache()->flushAll(); + + $output->writeln(sprintf('Flushing cache provider configured for entity named "%s"', $entityClass)); + + return; + } + + if ($input->getOption('all')) { + $output->writeln('Clearing all second-level cache entity regions'); + + $cache->evictEntityRegions(); + + return; + } + + if ($entityId) { + $output->writeln(sprintf('Clearing second-level cache entry for entity "%s" identified by "%s"', $entityClass, $entityId)); + $cache->evictEntity($entityClass, $entityId); + + return; + } + + $output->writeln(sprintf('Clearing second-level cache for entity "%s"', $entityClass)); + $cache->evictEntityRegion($entityClass); + } +} \ No newline at end of file diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..e23d36b24c16d80a563230286e41d0d0311fbd25 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php @@ -0,0 +1,109 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\ClearCache; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\Common\Cache\ApcCache; +use Doctrine\Common\Cache\XcacheCache; + +/** + * Command to clear the metadata cache of the various cache drivers. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class MetadataCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:clear-cache:metadata') + ->setDescription('Clear all metadata cache of the various cache drivers.') + ->setDefinition(array( + new InputOption( + 'flush', null, InputOption::VALUE_NONE, + 'If defined, cache entries will be flushed instead of deleted/invalidated.' + ) + )); + + $this->setHelp(<<%command.name% command is meant to clear the metadata cache of associated Entity Manager. +It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider +instance completely. + +The execution type differ on how you execute the command. +If you want to invalidate the entries (and not delete from cache instance), this command would do the work: + +%command.name% + +Alternatively, if you want to flush the cache provider using this command: + +%command.name% --flush + +Finally, be aware that if --flush option is passed, not all cache providers are able to flush entries, +because of a limitation of its execution nature. +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $em = $this->getHelper('em')->getEntityManager(); + $cacheDriver = $em->getConfiguration()->getMetadataCacheImpl(); + + if ( ! $cacheDriver) { + throw new \InvalidArgumentException('No Metadata cache driver is configured on given EntityManager.'); + } + + if ($cacheDriver instanceof ApcCache) { + throw new \LogicException("Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI."); + } + + if ($cacheDriver instanceof XcacheCache) { + throw new \LogicException("Cannot clear XCache Cache from Console, its shared in the Webserver memory and not accessible from the CLI."); + } + + + $output->writeln('Clearing ALL Metadata cache entries'); + + $result = $cacheDriver->deleteAll(); + $message = ($result) ? 'Successfully deleted cache entries.' : 'No cache entries were deleted.'; + + if (true === $input->getOption('flush')) { + $result = $cacheDriver->flushAll(); + $message = ($result) ? 'Successfully flushed cache entries.' : $message; + } + + $output->writeln($message); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..f1be98d30fa48a023fe5397dbc9934bbbd7c89a5 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php @@ -0,0 +1,107 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\ClearCache; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\Common\Cache\ApcCache; +use Doctrine\Common\Cache\XcacheCache; + +/** + * Command to clear the query cache of the various cache drivers. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class QueryCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:clear-cache:query') + ->setDescription('Clear all query cache of the various cache drivers.') + ->setDefinition(array( + new InputOption( + 'flush', null, InputOption::VALUE_NONE, + 'If defined, cache entries will be flushed instead of deleted/invalidated.' + ) + )); + + $this->setHelp(<<%command.name% command is meant to clear the query cache of associated Entity Manager. +It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider +instance completely. + +The execution type differ on how you execute the command. +If you want to invalidate the entries (and not delete from cache instance), this command would do the work: + +%command.name% + +Alternatively, if you want to flush the cache provider using this command: + +%command.name% --flush + +Finally, be aware that if --flush option is passed, not all cache providers are able to flush entries, +because of a limitation of its execution nature. +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $em = $this->getHelper('em')->getEntityManager(); + $cacheDriver = $em->getConfiguration()->getQueryCacheImpl(); + + if ( ! $cacheDriver) { + throw new \InvalidArgumentException('No Query cache driver is configured on given EntityManager.'); + } + + if ($cacheDriver instanceof ApcCache) { + throw new \LogicException("Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI."); + } + if ($cacheDriver instanceof XcacheCache) { + throw new \LogicException("Cannot clear XCache Cache from Console, its shared in the Webserver memory and not accessible from the CLI."); + } + + $output->write('Clearing ALL Query cache entries' . PHP_EOL); + + $result = $cacheDriver->deleteAll(); + $message = ($result) ? 'Successfully deleted cache entries.' : 'No cache entries were deleted.'; + + if (true === $input->getOption('flush')) { + $result = $cacheDriver->flushAll(); + $message = ($result) ? 'Successfully flushed cache entries.' : $message; + } + + $output->write($message . PHP_EOL); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryRegionCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryRegionCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..b5d75d3b3c1ff7e32c3ee9488a01066530c6ba20 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryRegionCommand.php @@ -0,0 +1,124 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\ClearCache; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Cache\Region\DefaultRegion; +use Doctrine\ORM\Cache; + +/** + * Command to clear a query cache region. + * + * @since 2.5 + * @author Fabio B. Silva + */ +class QueryRegionCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:clear-cache:region:query') + ->setDescription('Clear a second-level cache query region.') + ->addArgument('region-name', InputArgument::OPTIONAL, 'The query region to clear.') + ->addOption('all', null, InputOption::VALUE_NONE, 'If defined, all query regions will be deleted/invalidated.') + ->addOption('flush', null, InputOption::VALUE_NONE,'If defined, all cache entries will be flushed.'); + + + $this->setHelp(<<%command.name% command is meant to clear a second-level cache query region for an associated Entity Manager. +It is possible to delete/invalidate all query region, a specific query region or flushes the cache provider. + +The execution type differ on how you execute the command. +If you want to invalidate all entries for the default query region this command would do the work: + +%command.name% + +To invalidate entries for a specific query region you should use : + +%command.name% my_region_name + +If you want to invalidate all entries for the all query region: + +%command.name% --all + +Alternatively, if you want to flush the configured cache provider use this command: + +%command.name% my_region_name --flush + +Finally, be aware that if --flush option is passed, +not all cache providers are able to flush entries, because of a limitation of its execution nature. +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $em = $this->getHelper('em')->getEntityManager(); + $name = $input->getArgument('region-name'); + $cache = $em->getCache(); + + if ($name === null) { + $name = Cache::DEFAULT_QUERY_REGION_NAME; + } + + if ( ! $cache instanceof Cache) { + throw new \InvalidArgumentException('No second-level cache is configured on the given EntityManager.'); + } + + if ($input->getOption('flush')) { + $queryCache = $cache->getQueryCache($name); + $queryRegion = $queryCache->getRegion(); + + if ( ! $queryRegion instanceof DefaultRegion) { + throw new \InvalidArgumentException(sprintf( + 'The option "--flush" expects a "Doctrine\ORM\Cache\Region\DefaultRegion", but got "%s".', + is_object($queryRegion) ? get_class($queryRegion) : gettype($queryRegion) + )); + } + + $queryRegion->getCache()->flushAll(); + + $output->writeln(sprintf('Flushing cache provider configured for second-level cache query region named "%s"', $name)); + + return; + } + + if ($input->getOption('all')) { + $output->writeln('Clearing all second-level cache query regions'); + + $cache->evictQueryRegions(); + + return; + } + + $output->writeln(sprintf('Clearing second-level cache query region named "%s"', $name)); + $cache->evictQueryRegion($name); + } +} \ No newline at end of file diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..c21f55452700fd9e1755ff10900845be0d3da05e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php @@ -0,0 +1,108 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\ClearCache; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\Common\Cache\ApcCache; +use Doctrine\Common\Cache\XcacheCache; + +/** + * Command to clear the result cache of the various cache drivers. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ResultCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:clear-cache:result') + ->setDescription('Clear all result cache of the various cache drivers.') + ->setDefinition(array( + new InputOption( + 'flush', null, InputOption::VALUE_NONE, + 'If defined, cache entries will be flushed instead of deleted/invalidated.' + ) + )); + + $this->setHelp(<<%command.name% command is meant to clear the result cache of associated Entity Manager. +It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider +instance completely. + +The execution type differ on how you execute the command. +If you want to invalidate the entries (and not delete from cache instance), this command would do the work: + +%command.name% + +Alternatively, if you want to flush the cache provider using this command: + +%command.name% --flush + +Finally, be aware that if --flush option is passed, not all cache providers are able to flush entries, +because of a limitation of its execution nature. +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $em = $this->getHelper('em')->getEntityManager(); + $cacheDriver = $em->getConfiguration()->getResultCacheImpl(); + + if ( ! $cacheDriver) { + throw new \InvalidArgumentException('No Result cache driver is configured on given EntityManager.'); + } + + if ($cacheDriver instanceof ApcCache) { + throw new \LogicException("Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI."); + } + + if ($cacheDriver instanceof XcacheCache) { + throw new \LogicException("Cannot clear XCache Cache from Console, its shared in the Webserver memory and not accessible from the CLI."); + } + + $output->writeln('Clearing ALL Result cache entries'); + + $result = $cacheDriver->deleteAll(); + $message = ($result) ? 'Successfully deleted cache entries.' : 'No cache entries were deleted.'; + + if (true === $input->getOption('flush')) { + $result = $cacheDriver->flushAll(); + $message = ($result) ? 'Successfully flushed cache entries.' : $message; + } + + $output->writeln($message); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..71d72deb84d98ce09cf55c25ed5001066f1c3acc --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php @@ -0,0 +1,230 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console; +use Doctrine\ORM\Tools\Export\ClassMetadataExporter; +use Doctrine\ORM\Tools\ConvertDoctrine1Schema; +use Doctrine\ORM\Tools\EntityGenerator; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Command\Command; + +/** + * Command to convert a Doctrine 1 schema to a Doctrine 2 mapping file. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ConvertDoctrine1SchemaCommand extends Command +{ + /** + * @var EntityGenerator|null + */ + private $entityGenerator = null; + + /** + * @var ClassMetadataExporter|null + */ + private $metadataExporter = null; + + /** + * @return EntityGenerator + */ + public function getEntityGenerator() + { + if ($this->entityGenerator == null) { + $this->entityGenerator = new EntityGenerator(); + } + + return $this->entityGenerator; + } + + /** + * @param EntityGenerator $entityGenerator + * + * @return void + */ + public function setEntityGenerator(EntityGenerator $entityGenerator) + { + $this->entityGenerator = $entityGenerator; + } + + /** + * @return ClassMetadataExporter + */ + public function getMetadataExporter() + { + if ($this->metadataExporter == null) { + $this->metadataExporter = new ClassMetadataExporter(); + } + + return $this->metadataExporter; + } + + /** + * @param ClassMetadataExporter $metadataExporter + * + * @return void + */ + public function setMetadataExporter(ClassMetadataExporter $metadataExporter) + { + $this->metadataExporter = $metadataExporter; + } + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:convert-d1-schema') + ->setAliases(array('orm:convert:d1-schema')) + ->setDescription('Converts Doctrine 1.X schema into a Doctrine 2.X schema.') + ->setDefinition(array( + new InputArgument( + 'from-path', InputArgument::REQUIRED, 'The path of Doctrine 1.X schema information.' + ), + new InputArgument( + 'to-type', InputArgument::REQUIRED, 'The destination Doctrine 2.X mapping type.' + ), + new InputArgument( + 'dest-path', InputArgument::REQUIRED, + 'The path to generate your Doctrine 2.X mapping information.' + ), + new InputOption( + 'from', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, + 'Optional paths of Doctrine 1.X schema information.', + array() + ), + new InputOption( + 'extend', null, InputOption::VALUE_OPTIONAL, + 'Defines a base class to be extended by generated entity classes.' + ), + new InputOption( + 'num-spaces', null, InputOption::VALUE_OPTIONAL, + 'Defines the number of indentation spaces', 4 + ) + )) + ->setHelp(<<getArgument('from-path')), $input->getOption('from')); + + // Process destination directory + $destPath = realpath($input->getArgument('dest-path')); + + $toType = $input->getArgument('to-type'); + $extend = $input->getOption('extend'); + $numSpaces = $input->getOption('num-spaces'); + + $this->convertDoctrine1Schema($fromPaths, $destPath, $toType, $numSpaces, $extend, $output); + } + + /** + * @param array $fromPaths + * @param string $destPath + * @param string $toType + * @param int $numSpaces + * @param string|null $extend + * @param OutputInterface $output + * + * @throws \InvalidArgumentException + */ + public function convertDoctrine1Schema(array $fromPaths, $destPath, $toType, $numSpaces, $extend, OutputInterface $output) + { + foreach ($fromPaths as &$dirName) { + $dirName = realpath($dirName); + + if ( ! file_exists($dirName)) { + throw new \InvalidArgumentException( + sprintf("Doctrine 1.X schema directory '%s' does not exist.", $dirName) + ); + } + + if ( ! is_readable($dirName)) { + throw new \InvalidArgumentException( + sprintf("Doctrine 1.X schema directory '%s' does not have read permissions.", $dirName) + ); + } + } + + if ( ! file_exists($destPath)) { + throw new \InvalidArgumentException( + sprintf("Doctrine 2.X mapping destination directory '%s' does not exist.", $destPath) + ); + } + + if ( ! is_writable($destPath)) { + throw new \InvalidArgumentException( + sprintf("Doctrine 2.X mapping destination directory '%s' does not have write permissions.", $destPath) + ); + } + + $cme = $this->getMetadataExporter(); + $exporter = $cme->getExporter($toType, $destPath); + + if (strtolower($toType) === 'annotation') { + $entityGenerator = $this->getEntityGenerator(); + $exporter->setEntityGenerator($entityGenerator); + + $entityGenerator->setNumSpaces($numSpaces); + + if ($extend !== null) { + $entityGenerator->setClassToExtend($extend); + } + } + + $converter = new ConvertDoctrine1Schema($fromPaths); + $metadata = $converter->getMetadata(); + + if ($metadata) { + $output->writeln(''); + + foreach ($metadata as $class) { + $output->writeln(sprintf('Processing entity "%s"', $class->name)); + } + + $exporter->setMetadata($metadata); + $exporter->export(); + + $output->writeln(PHP_EOL . sprintf( + 'Converting Doctrine 1.X schema to "%s" mapping type in "%s"', $toType, $destPath + )); + } else { + $output->writeln('No Metadata Classes to process.'); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..b229f4a6c08a7ad32fd74080bebd46e5221bd651 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php @@ -0,0 +1,200 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Doctrine\ORM\Tools\Console\MetadataFilter; +use Doctrine\ORM\Tools\Export\ClassMetadataExporter; +use Doctrine\ORM\Tools\EntityGenerator; +use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory; +use Doctrine\ORM\Mapping\Driver\DatabaseDriver; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Command\Command; + +/** + * Command to convert your mapping information between the various formats. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ConvertMappingCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:convert-mapping') + ->setAliases(array('orm:convert:mapping')) + ->setDescription('Convert mapping information between supported formats.') + ->setDefinition(array( + new InputOption( + 'filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, + 'A string pattern used to match entities that should be processed.' + ), + new InputArgument( + 'to-type', InputArgument::REQUIRED, 'The mapping type to be converted.' + ), + new InputArgument( + 'dest-path', InputArgument::REQUIRED, + 'The path to generate your entities classes.' + ), + new InputOption( + 'force', 'f', InputOption::VALUE_NONE, + 'Force to overwrite existing mapping files.' + ), + new InputOption( + 'from-database', null, null, 'Whether or not to convert mapping information from existing database.' + ), + new InputOption( + 'extend', null, InputOption::VALUE_OPTIONAL, + 'Defines a base class to be extended by generated entity classes.' + ), + new InputOption( + 'num-spaces', null, InputOption::VALUE_OPTIONAL, + 'Defines the number of indentation spaces', 4 + ), + new InputOption( + 'namespace', null, InputOption::VALUE_OPTIONAL, + 'Defines a namespace for the generated entity classes, if converted from database.' + ), + )) + ->setHelp(<<one-time command. It should not be necessary for +you to call this method multiple times, especially when using the --from-database +flag. + +Converting an existing database schema into mapping files only solves about 70-80% +of the necessary mapping information. Additionally the detection from an existing +database cannot detect inverse associations, inheritance types, +entities with foreign keys as primary keys and many of the +semantical operations on associations such as cascade. + +Hint: There is no need to convert YAML or XML mapping files to annotations +every time you make changes. All mapping drivers are first class citizens +in Doctrine 2 and can be used as runtime mapping for the ORM. + +Hint: If you have a database with tables that should not be managed +by the ORM, you can use a DBAL functionality to filter the tables and sequences down +on a global level: + + \$config->setFilterSchemaAssetsExpression(\$regexp); +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $em = $this->getHelper('em')->getEntityManager(); + + if ($input->getOption('from-database') === true) { + $databaseDriver = new DatabaseDriver( + $em->getConnection()->getSchemaManager() + ); + + $em->getConfiguration()->setMetadataDriverImpl( + $databaseDriver + ); + + if (($namespace = $input->getOption('namespace')) !== null) { + $databaseDriver->setNamespace($namespace); + } + } + + $cmf = new DisconnectedClassMetadataFactory(); + $cmf->setEntityManager($em); + $metadata = $cmf->getAllMetadata(); + $metadata = MetadataFilter::filter($metadata, $input->getOption('filter')); + + // Process destination directory + if ( ! is_dir($destPath = $input->getArgument('dest-path'))) { + mkdir($destPath, 0775, true); + } + $destPath = realpath($destPath); + + if ( ! file_exists($destPath)) { + throw new \InvalidArgumentException( + sprintf("Mapping destination directory '%s' does not exist.", $input->getArgument('dest-path')) + ); + } + + if ( ! is_writable($destPath)) { + throw new \InvalidArgumentException( + sprintf("Mapping destination directory '%s' does not have write permissions.", $destPath) + ); + } + + $toType = strtolower($input->getArgument('to-type')); + + $exporter = $this->getExporter($toType, $destPath); + $exporter->setOverwriteExistingFiles($input->getOption('force')); + + if ($toType == 'annotation') { + $entityGenerator = new EntityGenerator(); + $exporter->setEntityGenerator($entityGenerator); + + $entityGenerator->setNumSpaces($input->getOption('num-spaces')); + + if (($extend = $input->getOption('extend')) !== null) { + $entityGenerator->setClassToExtend($extend); + } + } + + if (count($metadata)) { + foreach ($metadata as $class) { + $output->writeln(sprintf('Processing entity "%s"', $class->name)); + } + + $exporter->setMetadata($metadata); + $exporter->export(); + + $output->writeln(PHP_EOL . sprintf( + 'Exporting "%s" mapping information to "%s"', $toType, $destPath + )); + } else { + $output->writeln('No Metadata Classes to process.'); + } + } + + /** + * @param string $toType + * @param string $destPath + * + * @return \Doctrine\ORM\Tools\Export\Driver\AbstractExporter + */ + protected function getExporter($toType, $destPath) + { + $cme = new ClassMetadataExporter(); + + return $cme->getExporter($toType, $destPath); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..3601570eb32f6043ff9ab4fe0db68fbbf2290851 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php @@ -0,0 +1,81 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Command to ensure that Doctrine is properly configured for a production environment. + * + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class EnsureProductionSettingsCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:ensure-production-settings') + ->setDescription('Verify that Doctrine is properly configured for a production environment.') + ->setDefinition(array( + new InputOption( + 'complete', null, InputOption::VALUE_NONE, + 'Flag to also inspect database connection existence.' + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + + try { + $em->getConfiguration()->ensureProductionSettings(); + + if ($input->getOption('complete') !== null) { + $em->getConnection()->connect(); + } + } catch (\Exception $e) { + $output->writeln('' . $e->getMessage() . ''); + + return 1; + } + + $output->writeln('Environment is correctly configured for production.'); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..bca32b7ec93130016c4b36cd97e48fe195374094 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php @@ -0,0 +1,169 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Doctrine\ORM\Tools\Console\MetadataFilter; +use Doctrine\ORM\Tools\EntityGenerator; +use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Command\Command; + +/** + * Command to generate entity classes and method stubs from your mapping information. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class GenerateEntitiesCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:generate-entities') + ->setAliases(array('orm:generate:entities')) + ->setDescription('Generate entity classes and method stubs from your mapping information.') + ->setDefinition(array( + new InputOption( + 'filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, + 'A string pattern used to match entities that should be processed.' + ), + new InputArgument( + 'dest-path', InputArgument::REQUIRED, 'The path to generate your entity classes.' + ), + new InputOption( + 'generate-annotations', null, InputOption::VALUE_OPTIONAL, + 'Flag to define if generator should generate annotation metadata on entities.', false + ), + new InputOption( + 'generate-methods', null, InputOption::VALUE_OPTIONAL, + 'Flag to define if generator should generate stub methods on entities.', true + ), + new InputOption( + 'regenerate-entities', null, InputOption::VALUE_OPTIONAL, + 'Flag to define if generator should regenerate entity if it exists.', false + ), + new InputOption( + 'update-entities', null, InputOption::VALUE_OPTIONAL, + 'Flag to define if generator should only update entity if it exists.', true + ), + new InputOption( + 'extend', null, InputOption::VALUE_REQUIRED, + 'Defines a base class to be extended by generated entity classes.' + ), + new InputOption( + 'num-spaces', null, InputOption::VALUE_REQUIRED, + 'Defines the number of indentation spaces', 4 + ), + new InputOption( + 'no-backup', null, InputOption::VALUE_NONE, + 'Flag to define if generator should avoid backuping existing entity file if it exists.' + ) + )) + ->setHelp(<<--update-entities or --regenerate-entities flags your existing +code gets overwritten. The EntityGenerator will only append new code to your +file and will not delete the old code. However this approach may still be prone +to error and we suggest you use code repositories such as GIT or SVN to make +backups of your code. + +It makes sense to generate the entity code if you are using entities as Data +Access Objects only and don't put much additional logic on them. If you are +however putting much more logic on the entities you should refrain from using +the entity-generator and code your entities manually. + +Important: Even if you specified Inheritance options in your +XML or YAML Mapping files the generator cannot generate the base and +child classes for you correctly, because it doesn't know which +class is supposed to extend which. You have to adjust the entity +code manually for inheritance to work! +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $em = $this->getHelper('em')->getEntityManager(); + + $cmf = new DisconnectedClassMetadataFactory(); + $cmf->setEntityManager($em); + $metadatas = $cmf->getAllMetadata(); + $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); + + // Process destination directory + $destPath = realpath($input->getArgument('dest-path')); + + if ( ! file_exists($destPath)) { + throw new \InvalidArgumentException( + sprintf("Entities destination directory '%s' does not exist.", $input->getArgument('dest-path')) + ); + } + + if ( ! is_writable($destPath)) { + throw new \InvalidArgumentException( + sprintf("Entities destination directory '%s' does not have write permissions.", $destPath) + ); + } + + if (count($metadatas)) { + // Create EntityGenerator + $entityGenerator = new EntityGenerator(); + + $entityGenerator->setGenerateAnnotations($input->getOption('generate-annotations')); + $entityGenerator->setGenerateStubMethods($input->getOption('generate-methods')); + $entityGenerator->setRegenerateEntityIfExists($input->getOption('regenerate-entities')); + $entityGenerator->setUpdateEntityIfExists($input->getOption('update-entities')); + $entityGenerator->setNumSpaces($input->getOption('num-spaces')); + $entityGenerator->setBackupExisting(!$input->getOption('no-backup')); + + if (($extend = $input->getOption('extend')) !== null) { + $entityGenerator->setClassToExtend($extend); + } + + foreach ($metadatas as $metadata) { + $output->writeln( + sprintf('Processing entity "%s"', $metadata->name) + ); + } + + // Generating Entities + $entityGenerator->generate($metadatas, $destPath); + + // Outputting information message + $output->writeln(PHP_EOL . sprintf('Entity classes generated to "%s"', $destPath)); + } else { + $output->writeln('No Metadata Classes to process.'); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..21edb9dab83119cf02e51f2587678b1825546c60 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php @@ -0,0 +1,115 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Doctrine\ORM\Tools\Console\MetadataFilter; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Command\Command; + +/** + * Command to (re)generate the proxy classes used by doctrine. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class GenerateProxiesCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:generate-proxies') + ->setAliases(array('orm:generate:proxies')) + ->setDescription('Generates proxy classes for entity classes.') + ->setDefinition(array( + new InputOption( + 'filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, + 'A string pattern used to match entities that should be processed.' + ), + new InputArgument( + 'dest-path', InputArgument::OPTIONAL, + 'The path to generate your proxy classes. If none is provided, it will attempt to grab from configuration.' + ), + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + + $metadatas = $em->getMetadataFactory()->getAllMetadata(); + $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); + + // Process destination directory + if (($destPath = $input->getArgument('dest-path')) === null) { + $destPath = $em->getConfiguration()->getProxyDir(); + } + + if ( ! is_dir($destPath)) { + mkdir($destPath, 0775, true); + } + + $destPath = realpath($destPath); + + if ( ! file_exists($destPath)) { + throw new \InvalidArgumentException( + sprintf("Proxies destination directory '%s' does not exist.", $em->getConfiguration()->getProxyDir()) + ); + } + + if ( ! is_writable($destPath)) { + throw new \InvalidArgumentException( + sprintf("Proxies destination directory '%s' does not have write permissions.", $destPath) + ); + } + + if ( count($metadatas)) { + foreach ($metadatas as $metadata) { + $output->writeln( + sprintf('Processing entity "%s"', $metadata->name) + ); + } + + // Generating Proxies + $em->getProxyFactory()->generateProxyClasses($metadatas, $destPath); + + // Outputting information message + $output->writeln(PHP_EOL . sprintf('Proxy classes generated to "%s"', $destPath)); + } else { + $output->writeln('No Metadata Classes to process.'); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..c6c139914275859f2db42e655bac932222ec7497 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php @@ -0,0 +1,121 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Doctrine\ORM\Tools\Console\MetadataFilter; +use Doctrine\ORM\Tools\EntityRepositoryGenerator; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Command\Command; + +/** + * Command to generate repository classes for mapping information. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class GenerateRepositoriesCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:generate-repositories') + ->setAliases(array('orm:generate:repositories')) + ->setDescription('Generate repository classes from your mapping information.') + ->setDefinition(array( + new InputOption( + 'filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, + 'A string pattern used to match entities that should be processed.' + ), + new InputArgument( + 'dest-path', InputArgument::REQUIRED, 'The path to generate your repository classes.' + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + + $metadatas = $em->getMetadataFactory()->getAllMetadata(); + $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); + + $repositoryName = $em->getConfiguration()->getDefaultRepositoryClassName(); + + // Process destination directory + $destPath = realpath($input->getArgument('dest-path')); + + if ( ! file_exists($destPath)) { + throw new \InvalidArgumentException( + sprintf("Entities destination directory '%s' does not exist.", $input->getArgument('dest-path')) + ); + } + + if ( ! is_writable($destPath)) { + throw new \InvalidArgumentException( + sprintf("Entities destination directory '%s' does not have write permissions.", $destPath) + ); + } + + if (count($metadatas)) { + $numRepositories = 0; + $generator = new EntityRepositoryGenerator(); + + $generator->setDefaultRepositoryName($repositoryName); + + foreach ($metadatas as $metadata) { + if ($metadata->customRepositoryClassName) { + $output->writeln( + sprintf('Processing repository "%s"', $metadata->customRepositoryClassName) + ); + + $generator->writeEntityRepositoryClass($metadata->customRepositoryClassName, $destPath); + + $numRepositories++; + } + } + + if ($numRepositories) { + // Outputting information message + $output->writeln(PHP_EOL . sprintf('Repository classes generated to "%s"', $destPath) ); + } else { + $output->writeln('No Repository classes were found to be processed.' ); + } + } else { + $output->writeln('No Metadata Classes to process.' ); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..f23fe22c1bf801c96d045af6ac231abffce08968 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php @@ -0,0 +1,90 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Doctrine\ORM\Mapping\MappingException; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Command\Command; + +/** + * Show information about mapped entities. + * + * @link www.doctrine-project.org + * @since 2.1 + * @author Benjamin Eberlei + */ +class InfoCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:info') + ->setDescription('Show basic information about all mapped entities') + ->setHelp(<<%command.name% shows basic information about which +entities exist and possibly if their mapping information contains errors or +not. +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + /* @var $entityManager \Doctrine\ORM\EntityManager */ + $entityManager = $this->getHelper('em')->getEntityManager(); + + $entityClassNames = $entityManager->getConfiguration() + ->getMetadataDriverImpl() + ->getAllClassNames(); + + if (!$entityClassNames) { + throw new \Exception( + 'You do not have any mapped Doctrine ORM entities according to the current configuration. '. + 'If you have entities or mapping files you should check your mapping configuration for errors.' + ); + } + + $output->writeln(sprintf("Found %d mapped entities:", count($entityClassNames))); + + $failure = false; + + foreach ($entityClassNames as $entityClassName) { + try { + $entityManager->getClassMetadata($entityClassName); + $output->writeln(sprintf("[OK] %s", $entityClassName)); + } catch (MappingException $e) { + $output->writeln("[FAIL] ".$entityClassName); + $output->writeln(sprintf("%s", $e->getMessage())); + $output->writeln(''); + + $failure = true; + } + } + + return $failure ? 1 : 0; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/MappingDescribeCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/MappingDescribeCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..ab7ea5577ea24a0d6cb900817581e11a127f5f1a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/MappingDescribeCommand.php @@ -0,0 +1,298 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Doctrine\Common\Persistence\Mapping\MappingException; +use Doctrine\ORM\EntityManagerInterface; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Show information about mapped entities. + * + * @link www.doctrine-project.org + * @since 2.4 + * @author Daniel Leech + */ +final class MappingDescribeCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:mapping:describe') + ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity') + ->setDescription('Display information about mapped objects') + ->setHelp(<<%command.full_name% My\Namespace\Entity\MyEntity + +Or: + + %command.full_name% MyEntity +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + /* @var $entityManager \Doctrine\ORM\EntityManagerInterface */ + $entityManager = $this->getHelper('em')->getEntityManager(); + + $this->displayEntity($input->getArgument('entityName'), $entityManager, $output); + + return 0; + } + + /** + * Display all the mapping information for a single Entity. + * + * @param string $entityName Full or partial entity class name + * @param EntityManagerInterface $entityManager + * @param OutputInterface $output + */ + private function displayEntity($entityName, EntityManagerInterface $entityManager, OutputInterface $output) + { + $table = new Table($output); + + $table->setHeaders(array('Field', 'Value')); + + $metadata = $this->getClassMetadata($entityName, $entityManager); + + array_map( + array($table, 'addRow'), + array_merge( + array( + $this->formatField('Name', $metadata->name), + $this->formatField('Root entity name', $metadata->rootEntityName), + $this->formatField('Custom generator definition', $metadata->customGeneratorDefinition), + $this->formatField('Custom repository class', $metadata->customRepositoryClassName), + $this->formatField('Mapped super class?', $metadata->isMappedSuperclass), + $this->formatField('Embedded class?', $metadata->isEmbeddedClass), + $this->formatField('Parent classes', $metadata->parentClasses), + $this->formatField('Sub classes', $metadata->subClasses), + $this->formatField('Embedded classes', $metadata->subClasses), + $this->formatField('Named queries', $metadata->namedQueries), + $this->formatField('Named native queries', $metadata->namedNativeQueries), + $this->formatField('SQL result set mappings', $metadata->sqlResultSetMappings), + $this->formatField('Identifier', $metadata->identifier), + $this->formatField('Inheritance type', $metadata->inheritanceType), + $this->formatField('Discriminator column', $metadata->discriminatorColumn), + $this->formatField('Discriminator value', $metadata->discriminatorValue), + $this->formatField('Discriminator map', $metadata->discriminatorMap), + $this->formatField('Generator type', $metadata->generatorType), + $this->formatField('Table', $metadata->table), + $this->formatField('Composite identifier?', $metadata->isIdentifierComposite), + $this->formatField('Foreign identifier?', $metadata->containsForeignIdentifier), + $this->formatField('Sequence generator definition', $metadata->sequenceGeneratorDefinition), + $this->formatField('Table generator definition', $metadata->tableGeneratorDefinition), + $this->formatField('Change tracking policy', $metadata->changeTrackingPolicy), + $this->formatField('Versioned?', $metadata->isVersioned), + $this->formatField('Version field', $metadata->versionField), + $this->formatField('Read only?', $metadata->isReadOnly), + + $this->formatEntityListeners($metadata->entityListeners), + ), + array($this->formatField('Association mappings:', '')), + $this->formatMappings($metadata->associationMappings), + array($this->formatField('Field mappings:', '')), + $this->formatMappings($metadata->fieldMappings) + ) + ); + + $table->render(); + } + + /** + * Return all mapped entity class names + * + * @param EntityManagerInterface $entityManager + * + * @return string[] + */ + private function getMappedEntities(EntityManagerInterface $entityManager) + { + $entityClassNames = $entityManager + ->getConfiguration() + ->getMetadataDriverImpl() + ->getAllClassNames(); + + if ( ! $entityClassNames) { + throw new \InvalidArgumentException( + 'You do not have any mapped Doctrine ORM entities according to the current configuration. '. + 'If you have entities or mapping files you should check your mapping configuration for errors.' + ); + } + + return $entityClassNames; + } + + /** + * Return the class metadata for the given entity + * name + * + * @param string $entityName Full or partial entity name + * @param EntityManagerInterface $entityManager + * + * @return \Doctrine\ORM\Mapping\ClassMetadata + */ + private function getClassMetadata($entityName, EntityManagerInterface $entityManager) + { + try { + return $entityManager->getClassMetadata($entityName); + } catch (MappingException $e) { + } + + $matches = array_filter( + $this->getMappedEntities($entityManager), + function ($mappedEntity) use ($entityName) { + return preg_match('{' . preg_quote($entityName) . '}', $mappedEntity); + } + ); + + if ( ! $matches) { + throw new \InvalidArgumentException(sprintf( + 'Could not find any mapped Entity classes matching "%s"', + $entityName + )); + } + + if (count($matches) > 1) { + throw new \InvalidArgumentException(sprintf( + 'Entity name "%s" is ambigous, possible matches: "%s"', + $entityName, implode(', ', $matches) + )); + } + + return $entityManager->getClassMetadata(current($matches)); + } + + /** + * Format the given value for console output + * + * @param mixed $value + * + * @return string + */ + private function formatValue($value) + { + if ('' === $value) { + return ''; + } + + if (null === $value) { + return 'Null'; + } + + if (is_bool($value)) { + return '' . ($value ? 'True' : 'False') . ''; + } + + if (empty($value)) { + return 'Empty'; + } + + if (is_array($value)) { + if (defined('JSON_UNESCAPED_UNICODE') && defined('JSON_UNESCAPED_SLASHES')) { + return json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); + } + + return json_encode($value); + } + + if (is_object($value)) { + return sprintf('<%s>', get_class($value)); + } + + if (is_scalar($value)) { + return $value; + } + + throw new \InvalidArgumentException(sprintf('Do not know how to format value "%s"', print_r($value, true))); + } + + /** + * Add the given label and value to the two column table output + * + * @param string $label Label for the value + * @param mixed $value A Value to show + * + * @return array + */ + private function formatField($label, $value) + { + if (null === $value) { + $value = 'None'; + } + + return array(sprintf('%s', $label), $this->formatValue($value)); + } + + /** + * Format the association mappings + * + * @param array + * + * @return array + */ + private function formatMappings(array $propertyMappings) + { + $output = array(); + + foreach ($propertyMappings as $propertyName => $mapping) { + $output[] = $this->formatField(sprintf(' %s', $propertyName), ''); + + foreach ($mapping as $field => $value) { + $output[] = $this->formatField(sprintf(' %s', $field), $this->formatValue($value)); + } + } + + return $output; + } + + /** + * Format the entity listeners + * + * @param array $entityListeners + * + * @return array + */ + private function formatEntityListeners(array $entityListeners) + { + return $this->formatField( + 'Entity listeners', + array_map( + function ($entityListener) { + return get_class($entityListener); + }, + $entityListeners + ) + ); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..abd999aef09f6baf5e34f1915c8f5e4b9a30d524 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php @@ -0,0 +1,133 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\Common\Util\Debug; + +/** + * Command to execute DQL queries in a given EntityManager. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class RunDqlCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:run-dql') + ->setDescription('Executes arbitrary DQL directly from the command line.') + ->setDefinition(array( + new InputArgument('dql', InputArgument::REQUIRED, 'The DQL to execute.'), + new InputOption( + 'hydrate', null, InputOption::VALUE_REQUIRED, + 'Hydration mode of result set. Should be either: object, array, scalar or single-scalar.', + 'object' + ), + new InputOption( + 'first-result', null, InputOption::VALUE_REQUIRED, + 'The first result in the result set.' + ), + new InputOption( + 'max-result', null, InputOption::VALUE_REQUIRED, + 'The maximum number of results in the result set.' + ), + new InputOption( + 'depth', null, InputOption::VALUE_REQUIRED, + 'Dumping depth of Entity graph.', 7 + ), + new InputOption( + 'show-sql', null, InputOption::VALUE_NONE, + 'Dump generated SQL instead of executing query' + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + + if (($dql = $input->getArgument('dql')) === null) { + throw new \RuntimeException("Argument 'DQL' is required in order to execute this command correctly."); + } + + $depth = $input->getOption('depth'); + + if ( ! is_numeric($depth)) { + throw new \LogicException("Option 'depth' must contains an integer value"); + } + + $hydrationModeName = $input->getOption('hydrate'); + $hydrationMode = 'Doctrine\ORM\Query::HYDRATE_' . strtoupper(str_replace('-', '_', $hydrationModeName)); + + if ( ! defined($hydrationMode)) { + throw new \RuntimeException( + "Hydration mode '$hydrationModeName' does not exist. It should be either: object. array, scalar or single-scalar." + ); + } + + $query = $em->createQuery($dql); + + if (($firstResult = $input->getOption('first-result')) !== null) { + if ( ! is_numeric($firstResult)) { + throw new \LogicException("Option 'first-result' must contains an integer value"); + } + + $query->setFirstResult((int) $firstResult); + } + + if (($maxResult = $input->getOption('max-result')) !== null) { + if ( ! is_numeric($maxResult)) { + throw new \LogicException("Option 'max-result' must contains an integer value"); + } + + $query->setMaxResults((int) $maxResult); + } + + if ($input->getOption('show-sql')) { + $output->writeln(Debug::dump($query->getSQL(), 2, true, false)); + return; + } + + $resultSet = $query->execute(array(), constant($hydrationMode)); + + $output->writeln(Debug::dump($resultSet, $input->getOption('depth'), true, false)); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..0aabd630c51d1c168d0bbe2fe259b3c199349939 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php @@ -0,0 +1,71 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\SchemaTool; + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Command\Command; +use Doctrine\ORM\Tools\SchemaTool; + +/** + * Base class for CreateCommand, DropCommand and UpdateCommand. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +abstract class AbstractCommand extends Command +{ + /** + * @param InputInterface $input + * @param OutputInterface $output + * @param SchemaTool $schemaTool + * @param array $metadatas + * + * @return null|int Null or 0 if everything went fine, or an error code. + */ + abstract protected function executeSchemaCommand(InputInterface $input, OutputInterface $output, SchemaTool $schemaTool, array $metadatas); + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $emHelper = $this->getHelper('em'); + + /* @var $em \Doctrine\ORM\EntityManager */ + $em = $emHelper->getEntityManager(); + + $metadatas = $em->getMetadataFactory()->getAllMetadata(); + + if ( ! empty($metadatas)) { + // Create SchemaTool + $tool = new SchemaTool($em); + + return $this->executeSchemaCommand($input, $output, $tool, $metadatas); + } else { + $output->writeln('No Metadata Classes to process.'); + return 0; + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..b2af0ca2cfdc83d7e170e578594282a6de5a18ba --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php @@ -0,0 +1,85 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\SchemaTool; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\SchemaTool; + +/** + * Command to create the database schema for a set of classes based on their mappings. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class CreateCommand extends AbstractCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:schema-tool:create') + ->setDescription( + 'Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output.' + ) + ->setDefinition(array( + new InputOption( + 'dump-sql', null, InputOption::VALUE_NONE, + 'Instead of trying to apply generated SQLs into EntityManager Storage Connection, output them.' + ) + )) + ->setHelp(<<Hint: If you have a database with tables that should not be managed +by the ORM, you can use a DBAL functionality to filter the tables and sequences down +on a global level: + + \$config->setFilterSchemaAssetsExpression(\$regexp); +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function executeSchemaCommand(InputInterface $input, OutputInterface $output, SchemaTool $schemaTool, array $metadatas) + { + if ($input->getOption('dump-sql')) { + $sqls = $schemaTool->getCreateSchemaSql($metadatas); + $output->writeln(implode(';' . PHP_EOL, $sqls) . ';'); + } else { + $output->writeln('ATTENTION: This operation should not be executed in a production environment.' . PHP_EOL); + + $output->writeln('Creating database schema...'); + $schemaTool->createSchema($metadatas); + $output->writeln('Database schema created successfully!'); + } + + return 0; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..b22237831ee90485cf518a27fbef69e5aeee771f --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php @@ -0,0 +1,130 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\SchemaTool; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\SchemaTool; + +/** + * Command to drop the database schema for a set of classes based on their mappings. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class DropCommand extends AbstractCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:schema-tool:drop') + ->setDescription( + 'Drop the complete database schema of EntityManager Storage Connection or generate the corresponding SQL output.' + ) + ->setDefinition(array( + new InputOption( + 'dump-sql', null, InputOption::VALUE_NONE, + 'Instead of trying to apply generated SQLs into EntityManager Storage Connection, output them.' + ), + new InputOption( + 'force', 'f', InputOption::VALUE_NONE, + "Don't ask for the deletion of the database, but force the operation to run." + ), + new InputOption( + 'full-database', null, InputOption::VALUE_NONE, + 'Instead of using the Class Metadata to detect the database table schema, drop ALL assets that the database contains.' + ), + )) + ->setHelp(<<Hint: If you have a database with tables that should not be managed +by the ORM, you can use a DBAL functionality to filter the tables and sequences down +on a global level: + + \$config->setFilterSchemaAssetsExpression(\$regexp); +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function executeSchemaCommand(InputInterface $input, OutputInterface $output, SchemaTool $schemaTool, array $metadatas) + { + $isFullDatabaseDrop = $input->getOption('full-database'); + + if ($input->getOption('dump-sql')) { + if ($isFullDatabaseDrop) { + $sqls = $schemaTool->getDropDatabaseSQL(); + } else { + $sqls = $schemaTool->getDropSchemaSQL($metadatas); + } + $output->writeln(implode(';' . PHP_EOL, $sqls)); + + return 0; + } + + if ($input->getOption('force')) { + $output->writeln('Dropping database schema...'); + + if ($isFullDatabaseDrop) { + $schemaTool->dropDatabase(); + } else { + $schemaTool->dropSchema($metadatas); + } + + $output->writeln('Database schema dropped successfully!'); + + return 0; + } + + $output->writeln('ATTENTION: This operation should not be executed in a production environment.' . PHP_EOL); + + if ($isFullDatabaseDrop) { + $sqls = $schemaTool->getDropDatabaseSQL(); + } else { + $sqls = $schemaTool->getDropSchemaSQL($metadatas); + } + + if (count($sqls)) { + $output->writeln(sprintf('The Schema-Tool would execute "%s" queries to update the database.', count($sqls))); + $output->writeln('Please run the operation by passing one - or both - of the following options:'); + + $output->writeln(sprintf(' %s --force to execute the command', $this->getName())); + $output->writeln(sprintf(' %s --dump-sql to dump the SQL statements to the screen', $this->getName())); + + return 1; + } + + $output->writeln('Nothing to drop. The database is empty!'); + + return 0; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..a0e942a344d5bfbadc95fe5a0e159ea7257b68c9 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php @@ -0,0 +1,157 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\SchemaTool; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\SchemaTool; + +/** + * Command to generate the SQL needed to update the database schema to match + * the current mapping information. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Ryan Weaver + */ +class UpdateCommand extends AbstractCommand +{ + /** + * @var string + */ + protected $name = 'orm:schema-tool:update'; + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName($this->name) + ->setDescription( + 'Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata.' + ) + ->setDefinition(array( + new InputOption( + 'complete', null, InputOption::VALUE_NONE, + 'If defined, all assets of the database which are not relevant to the current metadata will be dropped.' + ), + + new InputOption( + 'dump-sql', null, InputOption::VALUE_NONE, + 'Dumps the generated SQL statements to the screen (does not execute them).' + ), + new InputOption( + 'force', 'f', InputOption::VALUE_NONE, + 'Causes the generated SQL statements to be physically executed against your database.' + ), + )); + + $this->setHelp(<<%command.name% command generates the SQL needed to +synchronize the database schema with the current mapping metadata of the +default entity manager. + +For example, if you add metadata for a new column to an entity, this command +would generate and output the SQL needed to add the new column to the database: + +%command.name% --dump-sql + +Alternatively, you can execute the generated queries: + +%command.name% --force + +If both options are specified, the queries are output and then executed: + +%command.name% --dump-sql --force + +Finally, be aware that if the --complete option is passed, this +task will drop all database assets (e.g. tables, etc) that are *not* described +by the current metadata. In other words, without this option, this task leaves +untouched any "extra" tables that exist in the database, but which aren't +described by any metadata. + +Hint: If you have a database with tables that should not be managed +by the ORM, you can use a DBAL functionality to filter the tables and sequences down +on a global level: + + \$config->setFilterSchemaAssetsExpression(\$regexp); +EOT + ); + } + + /** + * {@inheritdoc} + */ + protected function executeSchemaCommand(InputInterface $input, OutputInterface $output, SchemaTool $schemaTool, array $metadatas) + { + // Defining if update is complete or not (--complete not defined means $saveMode = true) + $saveMode = ! $input->getOption('complete'); + + $sqls = $schemaTool->getUpdateSchemaSql($metadatas, $saveMode); + + if (0 === count($sqls)) { + $output->writeln('Nothing to update - your database is already in sync with the current entity metadata.'); + + return 0; + } + + $dumpSql = true === $input->getOption('dump-sql'); + $force = true === $input->getOption('force'); + + if ($dumpSql) { + $output->writeln(implode(';' . PHP_EOL, $sqls) . ';'); + } + + if ($force) { + if ($dumpSql) { + $output->writeln(''); + } + $output->writeln('Updating database schema...'); + $schemaTool->updateSchema($metadatas, $saveMode); + + $pluralization = (1 === count($sqls)) ? 'query was' : 'queries were'; + + $output->writeln(sprintf('Database schema updated successfully! "%s" %s executed', count($sqls), $pluralization)); + } + + if ($dumpSql || $force) { + return 0; + } + + $output->writeln('ATTENTION: This operation should not be executed in a production environment.'); + $output->writeln(' Use the incremental update to detect changes during development and use'); + $output->writeln(' the SQL DDL provided to manually update your database in production.'); + $output->writeln(''); + + $output->writeln(sprintf('The Schema-Tool would execute "%s" queries to update the database.', count($sqls))); + $output->writeln('Please run the operation by passing one - or both - of the following options:'); + + $output->writeln(sprintf(' %s --force to execute the command', $this->getName())); + $output->writeln(sprintf(' %s --dump-sql to dump the SQL statements to the screen', $this->getName())); + + return 1; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..eb7697ccb73a52161f6f5727f351ae9b24241e23 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php @@ -0,0 +1,106 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\ORM\Tools\SchemaValidator; + +/** + * Command to validate that the current mapping is valid. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 1.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ValidateSchemaCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('orm:validate-schema') + ->setDescription('Validate the mapping files.') + ->addOption( + 'skip-mapping', + null, + InputOption::VALUE_NONE, + 'Skip the mapping validation check' + ) + ->addOption( + 'skip-sync', + null, + InputOption::VALUE_NONE, + 'Skip checking if the mapping is in sync with the database' + ) + ->setHelp( + <<getHelper('em')->getEntityManager(); + $validator = new SchemaValidator($em); + $exit = 0; + + if ($input->getOption('skip-mapping')) { + $output->writeln('[Mapping] Skipped mapping check.'); + } elseif ($errors = $validator->validateMapping()) { + foreach ($errors as $className => $errorMessages) { + $output->writeln("[Mapping] FAIL - The entity-class '" . $className . "' mapping is invalid:"); + + foreach ($errorMessages as $errorMessage) { + $output->writeln('* ' . $errorMessage); + } + + $output->writeln(''); + } + + $exit += 1; + } else { + $output->writeln('[Mapping] OK - The mapping files are correct.'); + } + + if ($input->getOption('skip-sync')) { + $output->writeln('[Database] SKIPPED - The database was not checked for synchronicity.'); + } elseif (!$validator->schemaInSyncWithMetadata()) { + $output->writeln('[Database] FAIL - The database schema is not in sync with the current mapping file.'); + $exit += 2; + } else { + $output->writeln('[Database] OK - The database schema is in sync with the mapping files.'); + } + + return $exit; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php new file mode 100644 index 0000000000000000000000000000000000000000..55ec3791c14752f61cc94abeaa705e2c72487de1 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php @@ -0,0 +1,136 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console; + +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Helper\HelperSet; +use Doctrine\ORM\Version; +use Doctrine\ORM\EntityManagerInterface; + +use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper; +use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper; + +/** + * Handles running the Console Tools inside Symfony Console context. + */ +class ConsoleRunner +{ + /** + * Create a Symfony Console HelperSet + * + * @param EntityManagerInterface $entityManager + * @return HelperSet + */ + public static function createHelperSet(EntityManagerInterface $entityManager) + { + return new HelperSet(array( + 'db' => new ConnectionHelper($entityManager->getConnection()), + 'em' => new EntityManagerHelper($entityManager) + )); + } + + /** + * Runs console with the given helperset. + * + * @param \Symfony\Component\Console\Helper\HelperSet $helperSet + * @param \Symfony\Component\Console\Command\Command[] $commands + * + * @return void + */ + static public function run(HelperSet $helperSet, $commands = array()) + { + $cli = self::createApplication($helperSet, $commands); + $cli->run(); + } + + /** + * Creates a console application with the given helperset and + * optional commands. + * + * @param \Symfony\Component\Console\Helper\HelperSet $helperSet + * @param array $commands + * + * @return \Symfony\Component\Console\Application + */ + static public function createApplication(HelperSet $helperSet, $commands = array()) + { + $cli = new Application('Doctrine Command Line Interface', Version::VERSION); + $cli->setCatchExceptions(true); + $cli->setHelperSet($helperSet); + self::addCommands($cli); + $cli->addCommands($commands); + + return $cli; + } + + /** + * @param Application $cli + * + * @return void + */ + static public function addCommands(Application $cli) + { + $cli->addCommands(array( + // DBAL Commands + new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(), + new \Doctrine\DBAL\Tools\Console\Command\ImportCommand(), + + // ORM Commands + new \Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand(), + new \Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand(), + new \Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand(), + new \Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand(), + new \Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand(), + new \Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand(), + new \Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand(), + new \Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand(), + new \Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand(), + new \Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand(), + new \Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand(), + new \Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand(), + new \Doctrine\ORM\Tools\Console\Command\RunDqlCommand(), + new \Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand(), + new \Doctrine\ORM\Tools\Console\Command\InfoCommand(), + new \Doctrine\ORM\Tools\Console\Command\MappingDescribeCommand(), + )); + } + + static public function printCliConfigTemplate() + { + echo <<<'HELP' +You are missing a "cli-config.php" or "config/cli-config.php" file in your +project, which is required to get the Doctrine Console working. You can use the +following sample as a template: + +. + */ + +namespace Doctrine\ORM\Tools\Console\Helper; + +use Doctrine\ORM\EntityManagerInterface; +use Symfony\Component\Console\Helper\Helper; + + +/** + * Doctrine CLI Connection Helper. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class EntityManagerHelper extends Helper +{ + /** + * Doctrine ORM EntityManagerInterface. + * + * @var EntityManagerInterface + */ + protected $_em; + + /** + * Constructor. + * + * @param EntityManagerInterface $em + */ + public function __construct(EntityManagerInterface $em) + { + $this->_em = $em; + } + + /** + * Retrieves Doctrine ORM EntityManager. + * + * @return EntityManagerInterface + */ + public function getEntityManager() + { + return $this->_em; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'entityManager'; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php new file mode 100644 index 0000000000000000000000000000000000000000..5a72b7d6d00095c5b8a2ddcf5f88d6d1a8a51d66 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php @@ -0,0 +1,106 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console; + +/** + * Used by CLI Tools to restrict entity-based commands to given patterns. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 1.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class MetadataFilter extends \FilterIterator implements \Countable +{ + /** + * @var array + */ + private $filter = array(); + + /** + * Filter Metadatas by one or more filter options. + * + * @param array $metadatas + * @param array|string $filter + * + * @return array + */ + static public function filter(array $metadatas, $filter) + { + $metadatas = new MetadataFilter(new \ArrayIterator($metadatas), $filter); + + return iterator_to_array($metadatas); + } + + /** + * @param \ArrayIterator $metadata + * @param array|string $filter + */ + public function __construct(\ArrayIterator $metadata, $filter) + { + $this->filter = (array) $filter; + + parent::__construct($metadata); + } + + /** + * @return bool + */ + public function accept() + { + if (count($this->filter) == 0) { + return true; + } + + $it = $this->getInnerIterator(); + $metadata = $it->current(); + + foreach ($this->filter as $filter) { + $pregResult = preg_match("/$filter/", $metadata->name); + + if ($pregResult === false) { + throw new \RuntimeException( + sprintf("Error while evaluating regex '/%s/'.", $filter) + ); + } + + if ($pregResult === 0) { + return false; + } + + if ($pregResult) { + return true; + } + } + + return false; + } + + /** + * @return int + */ + public function count() + { + return count($this->getInnerIterator()); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php new file mode 100644 index 0000000000000000000000000000000000000000..52f3c92b972187e3760990ae271dcfec61530a79 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php @@ -0,0 +1,344 @@ +. + */ + +namespace Doctrine\ORM\Tools; + +use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\Common\Util\Inflector; +use Doctrine\DBAL\Types\Type; +use Symfony\Component\Yaml\Yaml; + +/** + * Class to help with converting Doctrine 1 schema files to Doctrine 2 mapping files + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ConvertDoctrine1Schema +{ + /** + * @var array + */ + private $from; + + /** + * @var array + */ + private $legacyTypeMap = array( + // TODO: This list may need to be updated + 'clob' => 'text', + 'timestamp' => 'datetime', + 'enum' => 'string' + ); + + /** + * Constructor passes the directory or array of directories + * to convert the Doctrine 1 schema files from. + * + * @param array $from + * + * @author Jonathan Wage + */ + public function __construct($from) + { + $this->from = (array) $from; + } + + /** + * Gets an array of ClassMetadataInfo instances from the passed + * Doctrine 1 schema. + * + * @return array An array of ClassMetadataInfo instances + */ + public function getMetadata() + { + $schema = array(); + foreach ($this->from as $path) { + if (is_dir($path)) { + $files = glob($path . '/*.yml'); + foreach ($files as $file) { + $schema = array_merge($schema, (array) Yaml::parse(file_get_contents($file))); + } + } else { + $schema = array_merge($schema, (array) Yaml::parse(file_get_contents($path))); + } + } + + $metadatas = array(); + foreach ($schema as $className => $mappingInformation) { + $metadatas[] = $this->convertToClassMetadataInfo($className, $mappingInformation); + } + + return $metadatas; + } + + /** + * @param string $className + * @param array $mappingInformation + * + * @return \Doctrine\ORM\Mapping\ClassMetadataInfo + */ + private function convertToClassMetadataInfo($className, $mappingInformation) + { + $metadata = new ClassMetadataInfo($className); + + $this->convertTableName($className, $mappingInformation, $metadata); + $this->convertColumns($className, $mappingInformation, $metadata); + $this->convertIndexes($className, $mappingInformation, $metadata); + $this->convertRelations($className, $mappingInformation, $metadata); + + return $metadata; + } + + /** + * @param string $className + * @param array $model + * @param ClassMetadataInfo $metadata + * + * @return void + */ + private function convertTableName($className, array $model, ClassMetadataInfo $metadata) + { + if (isset($model['tableName']) && $model['tableName']) { + $e = explode('.', $model['tableName']); + + if (count($e) > 1) { + $metadata->table['schema'] = $e[0]; + $metadata->table['name'] = $e[1]; + } else { + $metadata->table['name'] = $e[0]; + } + } + } + + /** + * @param string $className + * @param array $model + * @param ClassMetadataInfo $metadata + * + * @return void + */ + private function convertColumns($className, array $model, ClassMetadataInfo $metadata) + { + $id = false; + + if (isset($model['columns']) && $model['columns']) { + foreach ($model['columns'] as $name => $column) { + $fieldMapping = $this->convertColumn($className, $name, $column, $metadata); + + if (isset($fieldMapping['id']) && $fieldMapping['id']) { + $id = true; + } + } + } + + if ( ! $id) { + $fieldMapping = array( + 'fieldName' => 'id', + 'columnName' => 'id', + 'type' => 'integer', + 'id' => true + ); + $metadata->mapField($fieldMapping); + $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO); + } + } + + /** + * @param string $className + * @param string $name + * @param string|array $column + * @param ClassMetadataInfo $metadata + * + * @return array + * + * @throws ToolsException + */ + private function convertColumn($className, $name, $column, ClassMetadataInfo $metadata) + { + if (is_string($column)) { + $string = $column; + $column = array(); + $column['type'] = $string; + } + + if ( ! isset($column['name'])) { + $column['name'] = $name; + } + + // check if a column alias was used (column_name as field_name) + if (preg_match("/(\w+)\sas\s(\w+)/i", $column['name'], $matches)) { + $name = $matches[1]; + $column['name'] = $name; + $column['alias'] = $matches[2]; + } + + if (preg_match("/([a-zA-Z]+)\(([0-9]+)\)/", $column['type'], $matches)) { + $column['type'] = $matches[1]; + $column['length'] = $matches[2]; + } + + $column['type'] = strtolower($column['type']); + // check if legacy column type (1.x) needs to be mapped to a 2.0 one + if (isset($this->legacyTypeMap[$column['type']])) { + $column['type'] = $this->legacyTypeMap[$column['type']]; + } + + if ( ! Type::hasType($column['type'])) { + throw ToolsException::couldNotMapDoctrine1Type($column['type']); + } + + $fieldMapping = array(); + + if (isset($column['primary'])) { + $fieldMapping['id'] = true; + } + + $fieldMapping['fieldName'] = isset($column['alias']) ? $column['alias'] : $name; + $fieldMapping['columnName'] = $column['name']; + $fieldMapping['type'] = $column['type']; + + if (isset($column['length'])) { + $fieldMapping['length'] = $column['length']; + } + + $allowed = array('precision', 'scale', 'unique', 'options', 'notnull', 'version'); + + foreach ($column as $key => $value) { + if (in_array($key, $allowed)) { + $fieldMapping[$key] = $value; + } + } + + $metadata->mapField($fieldMapping); + + if (isset($column['autoincrement'])) { + $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO); + } elseif (isset($column['sequence'])) { + $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE); + + $definition = array( + 'sequenceName' => is_array($column['sequence']) ? $column['sequence']['name']:$column['sequence'] + ); + + if (isset($column['sequence']['size'])) { + $definition['allocationSize'] = $column['sequence']['size']; + } + + if (isset($column['sequence']['value'])) { + $definition['initialValue'] = $column['sequence']['value']; + } + + $metadata->setSequenceGeneratorDefinition($definition); + } + + return $fieldMapping; + } + + /** + * @param string $className + * @param array $model + * @param ClassMetadataInfo $metadata + * + * @return void + */ + private function convertIndexes($className, array $model, ClassMetadataInfo $metadata) + { + if (empty($model['indexes'])) { + return; + } + + foreach ($model['indexes'] as $name => $index) { + $type = (isset($index['type']) && $index['type'] == 'unique') + ? 'uniqueConstraints' : 'indexes'; + + $metadata->table[$type][$name] = array( + 'columns' => $index['fields'] + ); + } + } + + /** + * @param string $className + * @param array $model + * @param ClassMetadataInfo $metadata + * + * @return void + */ + private function convertRelations($className, array $model, ClassMetadataInfo $metadata) + { + if (empty($model['relations'])) { + return; + } + + foreach ($model['relations'] as $name => $relation) { + if ( ! isset($relation['alias'])) { + $relation['alias'] = $name; + } + if ( ! isset($relation['class'])) { + $relation['class'] = $name; + } + if ( ! isset($relation['local'])) { + $relation['local'] = Inflector::tableize($relation['class']); + } + if ( ! isset($relation['foreign'])) { + $relation['foreign'] = 'id'; + } + if ( ! isset($relation['foreignAlias'])) { + $relation['foreignAlias'] = $className; + } + + if (isset($relation['refClass'])) { + $type = 'many'; + $foreignType = 'many'; + $joinColumns = array(); + } else { + $type = isset($relation['type']) ? $relation['type'] : 'one'; + $foreignType = isset($relation['foreignType']) ? $relation['foreignType'] : 'many'; + $joinColumns = array( + array( + 'name' => $relation['local'], + 'referencedColumnName' => $relation['foreign'], + 'onDelete' => isset($relation['onDelete']) ? $relation['onDelete'] : null, + ) + ); + } + + if ($type == 'one' && $foreignType == 'one') { + $method = 'mapOneToOne'; + } elseif ($type == 'many' && $foreignType == 'many') { + $method = 'mapManyToMany'; + } else { + $method = 'mapOneToMany'; + } + + $associationMapping = array(); + $associationMapping['fieldName'] = $relation['alias']; + $associationMapping['targetEntity'] = $relation['class']; + $associationMapping['mappedBy'] = $relation['foreignAlias']; + $associationMapping['joinColumns'] = $joinColumns; + + $metadata->$method($associationMapping); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php new file mode 100644 index 0000000000000000000000000000000000000000..5196dc3391c4ac8443924edcfca6221296ab8f01 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php @@ -0,0 +1,184 @@ +. + */ + +namespace Doctrine\ORM\Tools; + +use Doctrine\Common\Persistence\Proxy; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Event\OnFlushEventArgs; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\PersistentCollection; +use Doctrine\ORM\UnitOfWork; + +/** + * Use this logger to dump the identity map during the onFlush event. This is useful for debugging + * weird UnitOfWork behavior with complex operations. + */ +class DebugUnitOfWorkListener +{ + /** + * @var string + */ + private $file; + + /** + * @var string + */ + private $context; + + /** + * Pass a stream and context information for the debugging session. + * + * The stream can be php://output to print to the screen. + * + * @param string $file + * @param string $context + */ + public function __construct($file = 'php://output', $context = '') + { + $this->file = $file; + $this->context = $context; + } + + /** + * @param \Doctrine\ORM\Event\OnFlushEventArgs $args + * + * @return void + */ + public function onFlush(OnFlushEventArgs $args) + { + $this->dumpIdentityMap($args->getEntityManager()); + } + + /** + * Dumps the contents of the identity map into a stream. + * + * @param EntityManagerInterface $em + * + * @return void + */ + public function dumpIdentityMap(EntityManagerInterface $em) + { + $uow = $em->getUnitOfWork(); + $identityMap = $uow->getIdentityMap(); + + $fh = fopen($this->file, "x+"); + if (count($identityMap) == 0) { + fwrite($fh, "Flush Operation [".$this->context."] - Empty identity map.\n"); + return; + } + + fwrite($fh, "Flush Operation [".$this->context."] - Dumping identity map:\n"); + foreach ($identityMap as $className => $map) { + fwrite($fh, "Class: ". $className . "\n"); + + foreach ($map as $entity) { + fwrite($fh, " Entity: " . $this->getIdString($entity, $uow) . " " . spl_object_hash($entity)."\n"); + fwrite($fh, " Associations:\n"); + + $cm = $em->getClassMetadata($className); + + foreach ($cm->associationMappings as $field => $assoc) { + fwrite($fh, " " . $field . " "); + $value = $cm->getFieldValue($entity, $field); + + if ($assoc['type'] & ClassMetadata::TO_ONE) { + if ($value === null) { + fwrite($fh, " NULL\n"); + } else { + if ($value instanceof Proxy && !$value->__isInitialized()) { + fwrite($fh, "[PROXY] "); + } + + fwrite($fh, $this->getIdString($value, $uow) . " " . spl_object_hash($value) . "\n"); + } + } else { + $initialized = !($value instanceof PersistentCollection) || $value->isInitialized(); + if ($value === null) { + fwrite($fh, " NULL\n"); + } elseif ($initialized) { + fwrite($fh, "[INITIALIZED] " . $this->getType($value). " " . count($value) . " elements\n"); + + foreach ($value as $obj) { + fwrite($fh, " " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n"); + } + } else { + fwrite($fh, "[PROXY] " . $this->getType($value) . " unknown element size\n"); + foreach ($value->unwrap() as $obj) { + fwrite($fh, " " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n"); + } + } + } + } + } + } + + fclose($fh); + } + + /** + * @param mixed $var + * + * @return string + */ + private function getType($var) + { + if (is_object($var)) { + $refl = new \ReflectionObject($var); + + return $refl->getShortname(); + } + + return gettype($var); + } + + /** + * @param object $entity + * @param UnitOfWork $uow + * + * @return string + */ + private function getIdString($entity, UnitOfWork $uow) + { + if ($uow->isInIdentityMap($entity)) { + $ids = $uow->getEntityIdentifier($entity); + $idstring = ""; + + foreach ($ids as $k => $v) { + $idstring .= $k."=".$v; + } + } else { + $idstring = "NEWOBJECT "; + } + + $state = $uow->getEntityState($entity); + + if ($state == UnitOfWork::STATE_NEW) { + $idstring .= " [NEW]"; + } elseif ($state == UnitOfWork::STATE_REMOVED) { + $idstring .= " [REMOVED]"; + } elseif ($state == UnitOfWork::STATE_MANAGED) { + $idstring .= " [MANAGED]"; + } elseif ($state == UnitOfwork::STATE_DETACHED) { + $idstring .= " [DETACHED]"; + } + + return $idstring; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..7a3ec6f893c1f9f9a33a3c7c8d78e05ebabc702a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php @@ -0,0 +1,48 @@ +. + */ + +namespace Doctrine\ORM\Tools; + +use Doctrine\Common\Persistence\Mapping\StaticReflectionService; +use Doctrine\ORM\Mapping\ClassMetadataFactory; + +/** + * The DisconnectedClassMetadataFactory is used to create ClassMetadataInfo objects + * that do not require the entity class actually exist. This allows us to + * load some mapping information and use it to do things like generate code + * from the mapping information. + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class DisconnectedClassMetadataFactory extends ClassMetadataFactory +{ + /** + * @return \Doctrine\Common\Persistence\Mapping\StaticReflectionService + */ + public function getReflectionService() + { + return new StaticReflectionService(); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/EntityGenerator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/EntityGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..9027d9aa5b7816980fc4a8c593e44edf8fe20244 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -0,0 +1,1819 @@ +. + */ + +namespace Doctrine\ORM\Tools; + +use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\Common\Util\Inflector; +use Doctrine\DBAL\Types\Type; + +/** + * Generic class used to generate PHP5 entity classes from ClassMetadataInfo instances. + * + * [php] + * $classes = $em->getClassMetadataFactory()->getAllMetadata(); + * + * $generator = new \Doctrine\ORM\Tools\EntityGenerator(); + * $generator->setGenerateAnnotations(true); + * $generator->setGenerateStubMethods(true); + * $generator->setRegenerateEntityIfExists(false); + * $generator->setUpdateEntityIfExists(true); + * $generator->generate($classes, '/path/to/generate/entities'); + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class EntityGenerator +{ + /** + * Specifies class fields should be protected. + */ + const FIELD_VISIBLE_PROTECTED = 'protected'; + + /** + * Specifies class fields should be private. + */ + const FIELD_VISIBLE_PRIVATE = 'private'; + + /** + * @var bool + */ + protected $backupExisting = true; + + /** + * The extension to use for written php files. + * + * @var string + */ + protected $extension = '.php'; + + /** + * Whether or not the current ClassMetadataInfo instance is new or old. + * + * @var boolean + */ + protected $isNew = true; + + /** + * @var array + */ + protected $staticReflection = array(); + + /** + * Number of spaces to use for indention in generated code. + */ + protected $numSpaces = 4; + + /** + * The actual spaces to use for indention. + * + * @var string + */ + protected $spaces = ' '; + + /** + * The class all generated entities should extend. + * + * @var string + */ + protected $classToExtend; + + /** + * Whether or not to generation annotations. + * + * @var boolean + */ + protected $generateAnnotations = false; + + /** + * @var string + */ + protected $annotationsPrefix = ''; + + /** + * Whether or not to generate sub methods. + * + * @var boolean + */ + protected $generateEntityStubMethods = false; + + /** + * Whether or not to update the entity class if it exists already. + * + * @var boolean + */ + protected $updateEntityIfExists = false; + + /** + * Whether or not to re-generate entity class if it exists already. + * + * @var boolean + */ + protected $regenerateEntityIfExists = false; + + /** + * Visibility of the field + * + * @var string + */ + protected $fieldVisibility = 'private'; + + /** + * Whether or not to make generated embeddables immutable. + * + * @var boolean. + */ + protected $embeddablesImmutable = false; + + /** + * Hash-map for handle types. + * + * @var array + */ + protected $typeAlias = array( + Type::DATETIMETZ => '\DateTime', + Type::DATETIME => '\DateTime', + Type::DATE => '\DateTime', + Type::TIME => '\DateTime', + Type::OBJECT => '\stdClass', + Type::BIGINT => 'integer', + Type::SMALLINT => 'integer', + Type::TEXT => 'string', + Type::BLOB => 'string', + Type::DECIMAL => 'string', + Type::JSON_ARRAY => 'array', + Type::SIMPLE_ARRAY => 'array', + ); + + /** + * Hash-map to handle generator types string. + * + * @var array + */ + protected static $generatorStrategyMap = array( + ClassMetadataInfo::GENERATOR_TYPE_AUTO => 'AUTO', + ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE => 'SEQUENCE', + ClassMetadataInfo::GENERATOR_TYPE_TABLE => 'TABLE', + ClassMetadataInfo::GENERATOR_TYPE_IDENTITY => 'IDENTITY', + ClassMetadataInfo::GENERATOR_TYPE_NONE => 'NONE', + ClassMetadataInfo::GENERATOR_TYPE_UUID => 'UUID', + ClassMetadataInfo::GENERATOR_TYPE_CUSTOM => 'CUSTOM' + ); + + /** + * Hash-map to handle the change tracking policy string. + * + * @var array + */ + protected static $changeTrackingPolicyMap = array( + ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT => 'DEFERRED_IMPLICIT', + ClassMetadataInfo::CHANGETRACKING_DEFERRED_EXPLICIT => 'DEFERRED_EXPLICIT', + ClassMetadataInfo::CHANGETRACKING_NOTIFY => 'NOTIFY', + ); + + /** + * Hash-map to handle the inheritance type string. + * + * @var array + */ + protected static $inheritanceTypeMap = array( + ClassMetadataInfo::INHERITANCE_TYPE_NONE => 'NONE', + ClassMetadataInfo::INHERITANCE_TYPE_JOINED => 'JOINED', + ClassMetadataInfo::INHERITANCE_TYPE_SINGLE_TABLE => 'SINGLE_TABLE', + ClassMetadataInfo::INHERITANCE_TYPE_TABLE_PER_CLASS => 'TABLE_PER_CLASS', + ); + + /** + * @var string + */ + protected static $classTemplate = +' + + + +{ + +} +'; + + /** + * @var string + */ + protected static $getMethodTemplate = +'/** + * + * + * @return + */ +public function () +{ +return $this->; +}'; + + /** + * @var string + */ + protected static $setMethodTemplate = +'/** + * + * + * @param $ + * + * @return + */ +public function ($) +{ +$this-> = $; + +return $this; +}'; + + /** + * @var string + */ + protected static $addMethodTemplate = +'/** + * + * + * @param $ + * + * @return + */ +public function ($) +{ +$this->[] = $; + +return $this; +}'; + + /** + * @var string + */ + protected static $removeMethodTemplate = +'/** + * + * + * @param $ + */ +public function ($) +{ +$this->->removeElement($); +}'; + + /** + * @var string + */ + protected static $lifecycleCallbackMethodTemplate = +'/** + * @ + */ +public function () +{ +// Add your code here +}'; + + /** + * @var string + */ + protected static $constructorMethodTemplate = +'/** + * Constructor + */ +public function __construct() +{ + +} +'; + + /** + * @var string + */ + protected static $embeddableConstructorMethodTemplate = +'/** + * Constructor + * + * + */ +public function __construct() +{ + +} +'; + + /** + * Constructor. + */ + public function __construct() + { + if (version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')) { + $this->annotationsPrefix = 'ORM\\'; + } + } + + /** + * Generates and writes entity classes for the given array of ClassMetadataInfo instances. + * + * @param array $metadatas + * @param string $outputDirectory + * + * @return void + */ + public function generate(array $metadatas, $outputDirectory) + { + foreach ($metadatas as $metadata) { + $this->writeEntityClass($metadata, $outputDirectory); + } + } + + /** + * Generates and writes entity class to disk for the given ClassMetadataInfo instance. + * + * @param ClassMetadataInfo $metadata + * @param string $outputDirectory + * + * @return void + * + * @throws \RuntimeException + */ + public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory) + { + $path = $outputDirectory . '/' . str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name) . $this->extension; + $dir = dirname($path); + + if ( ! is_dir($dir)) { + mkdir($dir, 0775, true); + } + + $this->isNew = !file_exists($path) || (file_exists($path) && $this->regenerateEntityIfExists); + + if ( ! $this->isNew) { + $this->parseTokensInEntityFile(file_get_contents($path)); + } else { + $this->staticReflection[$metadata->name] = array('properties' => array(), 'methods' => array()); + } + + if ($this->backupExisting && file_exists($path)) { + $backupPath = dirname($path) . DIRECTORY_SEPARATOR . basename($path) . "~"; + if (!copy($path, $backupPath)) { + throw new \RuntimeException("Attempt to backup overwritten entity file but copy operation failed."); + } + } + + // If entity doesn't exist or we're re-generating the entities entirely + if ($this->isNew) { + file_put_contents($path, $this->generateEntityClass($metadata)); + // If entity exists and we're allowed to update the entity class + } elseif ( ! $this->isNew && $this->updateEntityIfExists) { + file_put_contents($path, $this->generateUpdatedEntityClass($metadata, $path)); + } + chmod($path, 0664); + } + + /** + * Generates a PHP5 Doctrine 2 entity class from the given ClassMetadataInfo instance. + * + * @param ClassMetadataInfo $metadata + * + * @return string + */ + public function generateEntityClass(ClassMetadataInfo $metadata) + { + $placeHolders = array( + '', + '', + '', + '', + '' + ); + + $replacements = array( + $this->generateEntityNamespace($metadata), + $this->generateEntityUse(), + $this->generateEntityDocBlock($metadata), + $this->generateEntityClassName($metadata), + $this->generateEntityBody($metadata) + ); + + $code = str_replace($placeHolders, $replacements, static::$classTemplate) . "\n"; + + return str_replace('', $this->spaces, $code); + } + + /** + * Generates the updated code for the given ClassMetadataInfo and entity at path. + * + * @param ClassMetadataInfo $metadata + * @param string $path + * + * @return string + */ + public function generateUpdatedEntityClass(ClassMetadataInfo $metadata, $path) + { + $currentCode = file_get_contents($path); + + $body = $this->generateEntityBody($metadata); + $body = str_replace('', $this->spaces, $body); + $last = strrpos($currentCode, '}'); + + return substr($currentCode, 0, $last) . $body . (strlen($body) > 0 ? "\n" : '') . "}\n"; + } + + /** + * Sets the number of spaces the exported class should have. + * + * @param integer $numSpaces + * + * @return void + */ + public function setNumSpaces($numSpaces) + { + $this->spaces = str_repeat(' ', $numSpaces); + $this->numSpaces = $numSpaces; + } + + /** + * Sets the extension to use when writing php files to disk. + * + * @param string $extension + * + * @return void + */ + public function setExtension($extension) + { + $this->extension = $extension; + } + + /** + * Sets the name of the class the generated classes should extend from. + * + * @param string $classToExtend + * + * @return void + */ + public function setClassToExtend($classToExtend) + { + $this->classToExtend = $classToExtend; + } + + /** + * Sets whether or not to generate annotations for the entity. + * + * @param bool $bool + * + * @return void + */ + public function setGenerateAnnotations($bool) + { + $this->generateAnnotations = $bool; + } + + /** + * Sets the class fields visibility for the entity (can either be private or protected). + * + * @param bool $visibility + * + * @return void + * + * @throws \InvalidArgumentException + */ + public function setFieldVisibility($visibility) + { + if ($visibility !== static::FIELD_VISIBLE_PRIVATE && $visibility !== static::FIELD_VISIBLE_PROTECTED) { + throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): ' . $visibility); + } + + $this->fieldVisibility = $visibility; + } + + /** + * Sets whether or not to generate immutable embeddables. + * + * @param boolean $embeddablesImmutable + */ + public function setEmbeddablesImmutable($embeddablesImmutable) + { + $this->embeddablesImmutable = (boolean) $embeddablesImmutable; + } + + /** + * Sets an annotation prefix. + * + * @param string $prefix + * + * @return void + */ + public function setAnnotationPrefix($prefix) + { + $this->annotationsPrefix = $prefix; + } + + /** + * Sets whether or not to try and update the entity if it already exists. + * + * @param bool $bool + * + * @return void + */ + public function setUpdateEntityIfExists($bool) + { + $this->updateEntityIfExists = $bool; + } + + /** + * Sets whether or not to regenerate the entity if it exists. + * + * @param bool $bool + * + * @return void + */ + public function setRegenerateEntityIfExists($bool) + { + $this->regenerateEntityIfExists = $bool; + } + + /** + * Sets whether or not to generate stub methods for the entity. + * + * @param bool $bool + * + * @return void + */ + public function setGenerateStubMethods($bool) + { + $this->generateEntityStubMethods = $bool; + } + + /** + * Should an existing entity be backed up if it already exists? + * + * @param bool $bool + * + * @return void + */ + public function setBackupExisting($bool) + { + $this->backupExisting = $bool; + } + + /** + * @param string $type + * + * @return string + */ + protected function getType($type) + { + if (isset($this->typeAlias[$type])) { + return $this->typeAlias[$type]; + } + + return $type; + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateEntityNamespace(ClassMetadataInfo $metadata) + { + if ($this->hasNamespace($metadata)) { + return 'namespace ' . $this->getNamespace($metadata) .';'; + } + } + + protected function generateEntityUse() + { + if ($this->generateAnnotations) { + return "\n".'use Doctrine\ORM\Mapping as ORM;'."\n"; + } else { + return ""; + } + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateEntityClassName(ClassMetadataInfo $metadata) + { + return 'class ' . $this->getClassName($metadata) . + ($this->extendsClass() ? ' extends ' . $this->getClassToExtendName() : null); + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateEntityBody(ClassMetadataInfo $metadata) + { + $fieldMappingProperties = $this->generateEntityFieldMappingProperties($metadata); + $embeddedProperties = $this->generateEntityEmbeddedProperties($metadata); + $associationMappingProperties = $this->generateEntityAssociationMappingProperties($metadata); + $stubMethods = $this->generateEntityStubMethods ? $this->generateEntityStubMethods($metadata) : null; + $lifecycleCallbackMethods = $this->generateEntityLifecycleCallbackMethods($metadata); + + $code = array(); + + if ($fieldMappingProperties) { + $code[] = $fieldMappingProperties; + } + + if ($embeddedProperties) { + $code[] = $embeddedProperties; + } + + if ($associationMappingProperties) { + $code[] = $associationMappingProperties; + } + + $code[] = $this->generateEntityConstructor($metadata); + + if ($stubMethods) { + $code[] = $stubMethods; + } + + if ($lifecycleCallbackMethods) { + $code[] = $lifecycleCallbackMethods; + } + + return implode("\n", $code); + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateEntityConstructor(ClassMetadataInfo $metadata) + { + if ($this->hasMethod('__construct', $metadata)) { + return ''; + } + + if ($metadata->isEmbeddedClass && $this->embeddablesImmutable) { + return $this->generateEmbeddableConstructor($metadata); + } + + $collections = array(); + + foreach ($metadata->associationMappings as $mapping) { + if ($mapping['type'] & ClassMetadataInfo::TO_MANY) { + $collections[] = '$this->'.$mapping['fieldName'].' = new \Doctrine\Common\Collections\ArrayCollection();'; + } + } + + if ($collections) { + return $this->prefixCodeWithSpaces(str_replace("", implode("\n".$this->spaces, $collections), static::$constructorMethodTemplate)); + } + + return ''; + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + private function generateEmbeddableConstructor(ClassMetadataInfo $metadata) + { + $paramTypes = array(); + $paramVariables = array(); + $params = array(); + $fields = array(); + + // Resort fields to put optional fields at the end of the method signature. + $requiredFields = array(); + $optionalFields = array(); + + foreach ($metadata->fieldMappings as $fieldMapping) { + if (empty($fieldMapping['nullable'])) { + $requiredFields[] = $fieldMapping; + + continue; + } + + $optionalFields[] = $fieldMapping; + } + + $fieldMappings = array_merge($requiredFields, $optionalFields); + + foreach ($metadata->embeddedClasses as $fieldName => $embeddedClass) { + $paramType = '\\' . ltrim($embeddedClass['class'], '\\'); + $paramVariable = '$' . $fieldName; + + $paramTypes[] = $paramType; + $paramVariables[] = $paramVariable; + $params[] = $paramType . ' ' . $paramVariable; + $fields[] = '$this->' . $fieldName . ' = ' . $paramVariable . ';'; + } + + foreach ($fieldMappings as $fieldMapping) { + if (isset($fieldMapping['declaredField']) && + isset($metadata->embeddedClasses[$fieldMapping['declaredField']]) + ) { + continue; + } + + $paramTypes[] = $this->getType($fieldMapping['type']) . (!empty($fieldMapping['nullable']) ? '|null' : ''); + $param = '$' . $fieldMapping['fieldName']; + $paramVariables[] = $param; + + if ($fieldMapping['type'] === 'datetime') { + $param = $this->getType($fieldMapping['type']) . ' ' . $param; + } + + if (!empty($fieldMapping['nullable'])) { + $param .= ' = null'; + } + + $params[] = $param; + + $fields[] = '$this->' . $fieldMapping['fieldName'] . ' = $' . $fieldMapping['fieldName'] . ';'; + } + + $maxParamTypeLength = max(array_map('strlen', $paramTypes)); + $paramTags = array_map( + function ($type, $variable) use ($maxParamTypeLength) { + return '@param ' . $type . str_repeat(' ', $maxParamTypeLength - strlen($type) + 1) . $variable; + }, + $paramTypes, + $paramVariables + ); + + // Generate multi line constructor if the signature exceeds 120 characters. + if (array_sum(array_map('strlen', $params)) + count($params) * 2 + 29 > 120) { + $delimiter = "\n" . $this->spaces; + $params = $delimiter . implode(',' . $delimiter, $params) . "\n"; + } else { + $params = implode(', ', $params); + } + + $replacements = array( + '' => implode("\n * ", $paramTags), + '' => $params, + '' => implode("\n" . $this->spaces, $fields), + ); + + $constructor = str_replace( + array_keys($replacements), + array_values($replacements), + static::$embeddableConstructorMethodTemplate + ); + + return $this->prefixCodeWithSpaces($constructor); + } + + /** + * @todo this won't work if there is a namespace in brackets and a class outside of it. + * + * @param string $src + * + * @return void + */ + protected function parseTokensInEntityFile($src) + { + $tokens = token_get_all($src); + $lastSeenNamespace = ""; + $lastSeenClass = false; + + $inNamespace = false; + $inClass = false; + + for ($i = 0; $i < count($tokens); $i++) { + $token = $tokens[$i]; + if (in_array($token[0], array(T_WHITESPACE, T_COMMENT, T_DOC_COMMENT))) { + continue; + } + + if ($inNamespace) { + if ($token[0] == T_NS_SEPARATOR || $token[0] == T_STRING) { + $lastSeenNamespace .= $token[1]; + } elseif (is_string($token) && in_array($token, array(';', '{'))) { + $inNamespace = false; + } + } + + if ($inClass) { + $inClass = false; + $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1]; + $this->staticReflection[$lastSeenClass]['properties'] = array(); + $this->staticReflection[$lastSeenClass]['methods'] = array(); + } + + if ($token[0] == T_NAMESPACE) { + $lastSeenNamespace = ""; + $inNamespace = true; + } elseif ($token[0] == T_CLASS && $tokens[$i-1][0] != T_DOUBLE_COLON) { + $inClass = true; + } elseif ($token[0] == T_FUNCTION) { + if ($tokens[$i+2][0] == T_STRING) { + $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+2][1]); + } elseif ($tokens[$i+2] == "&" && $tokens[$i+3][0] == T_STRING) { + $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+3][1]); + } + } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i+2][0] != T_FUNCTION) { + $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1); + } + } + } + + /** + * @param string $property + * @param ClassMetadataInfo $metadata + * + * @return bool + */ + protected function hasProperty($property, ClassMetadataInfo $metadata) + { + if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) { + // don't generate property if its already on the base class. + $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name); + if ($reflClass->hasProperty($property)) { + return true; + } + } + + // check traits for existing property + foreach ($this->getTraits($metadata) as $trait) { + if ($trait->hasProperty($property)) { + return true; + } + } + + return ( + isset($this->staticReflection[$metadata->name]) && + in_array($property, $this->staticReflection[$metadata->name]['properties']) + ); + } + + /** + * @param string $method + * @param ClassMetadataInfo $metadata + * + * @return bool + */ + protected function hasMethod($method, ClassMetadataInfo $metadata) + { + if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) { + // don't generate method if its already on the base class. + $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name); + + if ($reflClass->hasMethod($method)) { + return true; + } + } + + // check traits for existing method + foreach ($this->getTraits($metadata) as $trait) { + if ($trait->hasMethod($method)) { + return true; + } + } + + return ( + isset($this->staticReflection[$metadata->name]) && + in_array(strtolower($method), $this->staticReflection[$metadata->name]['methods']) + ); + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return array + */ + protected function getTraits(ClassMetadataInfo $metadata) + { + if (! ($metadata->reflClass !== null || class_exists($metadata->name))) { + return []; + } + + $reflClass = $metadata->reflClass === null + ? new \ReflectionClass($metadata->name) + : $metadata->reflClass; + + $traits = array(); + + while ($reflClass !== false) { + $traits = array_merge($traits, $reflClass->getTraits()); + + $reflClass = $reflClass->getParentClass(); + } + + return $traits; + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return bool + */ + protected function hasNamespace(ClassMetadataInfo $metadata) + { + return strpos($metadata->name, '\\') ? true : false; + } + + /** + * @return bool + */ + protected function extendsClass() + { + return $this->classToExtend ? true : false; + } + + /** + * @return string + */ + protected function getClassToExtend() + { + return $this->classToExtend; + } + + /** + * @return string + */ + protected function getClassToExtendName() + { + $refl = new \ReflectionClass($this->getClassToExtend()); + + return '\\' . $refl->getName(); + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function getClassName(ClassMetadataInfo $metadata) + { + return ($pos = strrpos($metadata->name, '\\')) + ? substr($metadata->name, $pos + 1, strlen($metadata->name)) : $metadata->name; + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function getNamespace(ClassMetadataInfo $metadata) + { + return substr($metadata->name, 0, strrpos($metadata->name, '\\')); + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateEntityDocBlock(ClassMetadataInfo $metadata) + { + $lines = array(); + $lines[] = '/**'; + $lines[] = ' * ' . $this->getClassName($metadata); + + if ($this->generateAnnotations) { + $lines[] = ' *'; + + $methods = array( + 'generateTableAnnotation', + 'generateInheritanceAnnotation', + 'generateDiscriminatorColumnAnnotation', + 'generateDiscriminatorMapAnnotation', + 'generateEntityAnnotation', + ); + + foreach ($methods as $method) { + if ($code = $this->$method($metadata)) { + $lines[] = ' * ' . $code; + } + } + + if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) { + $lines[] = ' * @' . $this->annotationsPrefix . 'HasLifecycleCallbacks'; + } + } + + $lines[] = ' */'; + + return implode("\n", $lines); + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateEntityAnnotation(ClassMetadataInfo $metadata) + { + $prefix = '@' . $this->annotationsPrefix; + + if ($metadata->isEmbeddedClass) { + return $prefix . 'Embeddable'; + } + + $customRepository = $metadata->customRepositoryClassName + ? '(repositoryClass="' . $metadata->customRepositoryClassName . '")' + : ''; + + return $prefix . ($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity') . $customRepository; + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateTableAnnotation($metadata) + { + if ($metadata->isEmbeddedClass) { + return ''; + } + + $table = array(); + + if (isset($metadata->table['schema'])) { + $table[] = 'schema="' . $metadata->table['schema'] . '"'; + } + + if (isset($metadata->table['name'])) { + $table[] = 'name="' . $metadata->table['name'] . '"'; + } + + if (isset($metadata->table['options']) && $metadata->table['options']) { + $table[] = 'options={' . $this->exportTableOptions((array) $metadata->table['options']) . '}'; + } + + if (isset($metadata->table['uniqueConstraints']) && $metadata->table['uniqueConstraints']) { + $constraints = $this->generateTableConstraints('UniqueConstraint', $metadata->table['uniqueConstraints']); + $table[] = 'uniqueConstraints={' . $constraints . '}'; + } + + if (isset($metadata->table['indexes']) && $metadata->table['indexes']) { + $constraints = $this->generateTableConstraints('Index', $metadata->table['indexes']); + $table[] = 'indexes={' . $constraints . '}'; + } + + return '@' . $this->annotationsPrefix . 'Table(' . implode(', ', $table) . ')'; + } + + /** + * @param string $constraintName + * @param array $constraints + * + * @return string + */ + protected function generateTableConstraints($constraintName, $constraints) + { + $annotations = array(); + foreach ($constraints as $name => $constraint) { + $columns = array(); + foreach ($constraint['columns'] as $column) { + $columns[] = '"' . $column . '"'; + } + $annotations[] = '@' . $this->annotationsPrefix . $constraintName . '(name="' . $name . '", columns={' . implode(', ', $columns) . '})'; + } + return implode(', ', $annotations); + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateInheritanceAnnotation($metadata) + { + if ($metadata->inheritanceType != ClassMetadataInfo::INHERITANCE_TYPE_NONE) { + return '@' . $this->annotationsPrefix . 'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")'; + } + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateDiscriminatorColumnAnnotation($metadata) + { + if ($metadata->inheritanceType != ClassMetadataInfo::INHERITANCE_TYPE_NONE) { + $discrColumn = $metadata->discriminatorColumn; + $columnDefinition = 'name="' . $discrColumn['name'] + . '", type="' . $discrColumn['type'] + . '", length=' . $discrColumn['length']; + + return '@' . $this->annotationsPrefix . 'DiscriminatorColumn(' . $columnDefinition . ')'; + } + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateDiscriminatorMapAnnotation($metadata) + { + if ($metadata->inheritanceType != ClassMetadataInfo::INHERITANCE_TYPE_NONE) { + $inheritanceClassMap = array(); + + foreach ($metadata->discriminatorMap as $type => $class) { + $inheritanceClassMap[] .= '"' . $type . '" = "' . $class . '"'; + } + + return '@' . $this->annotationsPrefix . 'DiscriminatorMap({' . implode(', ', $inheritanceClassMap) . '})'; + } + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateEntityStubMethods(ClassMetadataInfo $metadata) + { + $methods = array(); + + foreach ($metadata->fieldMappings as $fieldMapping) { + if (isset($fieldMapping['declaredField']) && + isset($metadata->embeddedClasses[$fieldMapping['declaredField']]) + ) { + continue; + } + + if (( ! isset($fieldMapping['id']) || + ! $fieldMapping['id'] || + $metadata->generatorType == ClassMetadataInfo::GENERATOR_TYPE_NONE + ) && (! $metadata->isEmbeddedClass || ! $this->embeddablesImmutable) + ) { + if ($code = $this->generateEntityStubMethod($metadata, 'set', $fieldMapping['fieldName'], $fieldMapping['type'])) { + $methods[] = $code; + } + } + + if ($code = $this->generateEntityStubMethod($metadata, 'get', $fieldMapping['fieldName'], $fieldMapping['type'])) { + $methods[] = $code; + } + } + + foreach ($metadata->embeddedClasses as $fieldName => $embeddedClass) { + if (isset($embeddedClass['declaredField'])) { + continue; + } + + if ( ! $metadata->isEmbeddedClass || ! $this->embeddablesImmutable) { + if ($code = $this->generateEntityStubMethod($metadata, 'set', $fieldName, $embeddedClass['class'])) { + $methods[] = $code; + } + } + + if ($code = $this->generateEntityStubMethod($metadata, 'get', $fieldName, $embeddedClass['class'])) { + $methods[] = $code; + } + } + + foreach ($metadata->associationMappings as $associationMapping) { + if ($associationMapping['type'] & ClassMetadataInfo::TO_ONE) { + $nullable = $this->isAssociationIsNullable($associationMapping) ? 'null' : null; + if ($code = $this->generateEntityStubMethod($metadata, 'set', $associationMapping['fieldName'], $associationMapping['targetEntity'], $nullable)) { + $methods[] = $code; + } + if ($code = $this->generateEntityStubMethod($metadata, 'get', $associationMapping['fieldName'], $associationMapping['targetEntity'])) { + $methods[] = $code; + } + } elseif ($associationMapping['type'] & ClassMetadataInfo::TO_MANY) { + if ($code = $this->generateEntityStubMethod($metadata, 'add', $associationMapping['fieldName'], $associationMapping['targetEntity'])) { + $methods[] = $code; + } + if ($code = $this->generateEntityStubMethod($metadata, 'remove', $associationMapping['fieldName'], $associationMapping['targetEntity'])) { + $methods[] = $code; + } + if ($code = $this->generateEntityStubMethod($metadata, 'get', $associationMapping['fieldName'], 'Doctrine\Common\Collections\Collection')) { + $methods[] = $code; + } + } + } + + return implode("\n\n", $methods); + } + + /** + * @param array $associationMapping + * + * @return bool + */ + protected function isAssociationIsNullable($associationMapping) + { + if (isset($associationMapping['id']) && $associationMapping['id']) { + return false; + } + + if (isset($associationMapping['joinColumns'])) { + $joinColumns = $associationMapping['joinColumns']; + } else { + //@todo there is no way to retrieve targetEntity metadata + $joinColumns = array(); + } + + foreach ($joinColumns as $joinColumn) { + if(isset($joinColumn['nullable']) && !$joinColumn['nullable']) { + return false; + } + } + + return true; + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateEntityLifecycleCallbackMethods(ClassMetadataInfo $metadata) + { + if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) { + $methods = array(); + + foreach ($metadata->lifecycleCallbacks as $name => $callbacks) { + foreach ($callbacks as $callback) { + if ($code = $this->generateLifecycleCallbackMethod($name, $callback, $metadata)) { + $methods[] = $code; + } + } + } + + return implode("\n\n", $methods); + } + + return ""; + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateEntityAssociationMappingProperties(ClassMetadataInfo $metadata) + { + $lines = array(); + + foreach ($metadata->associationMappings as $associationMapping) { + if ($this->hasProperty($associationMapping['fieldName'], $metadata)) { + continue; + } + + $lines[] = $this->generateAssociationMappingPropertyDocBlock($associationMapping, $metadata); + $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $associationMapping['fieldName'] + . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n"; + } + + return implode("\n", $lines); + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateEntityFieldMappingProperties(ClassMetadataInfo $metadata) + { + $lines = array(); + + foreach ($metadata->fieldMappings as $fieldMapping) { + if ($this->hasProperty($fieldMapping['fieldName'], $metadata) || + $metadata->isInheritedField($fieldMapping['fieldName']) || + ( + isset($fieldMapping['declaredField']) && + isset($metadata->embeddedClasses[$fieldMapping['declaredField']]) + ) + ) { + continue; + } + + $lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata); + $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldMapping['fieldName'] + . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n"; + } + + return implode("\n", $lines); + } + + /** + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateEntityEmbeddedProperties(ClassMetadataInfo $metadata) + { + $lines = array(); + + foreach ($metadata->embeddedClasses as $fieldName => $embeddedClass) { + if (isset($embeddedClass['declaredField']) || $this->hasProperty($fieldName, $metadata)) { + continue; + } + + $lines[] = $this->generateEmbeddedPropertyDocBlock($embeddedClass); + $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldName . ";\n"; + } + + return implode("\n", $lines); + } + + /** + * @param ClassMetadataInfo $metadata + * @param string $type + * @param string $fieldName + * @param string|null $typeHint + * @param string|null $defaultValue + * + * @return string + */ + protected function generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null, $defaultValue = null) + { + $methodName = $type . Inflector::classify($fieldName); + $variableName = Inflector::camelize($fieldName); + if (in_array($type, array("add", "remove"))) { + $methodName = Inflector::singularize($methodName); + $variableName = Inflector::singularize($variableName); + } + + if ($this->hasMethod($methodName, $metadata)) { + return ''; + } + $this->staticReflection[$metadata->name]['methods'][] = strtolower($methodName); + + $var = sprintf('%sMethodTemplate', $type); + $template = static::$$var; + + $methodTypeHint = null; + $types = Type::getTypesMap(); + $variableType = $typeHint ? $this->getType($typeHint) : null; + + if ($typeHint && ! isset($types[$typeHint])) { + $variableType = '\\' . ltrim($variableType, '\\'); + $methodTypeHint = '\\' . $typeHint . ' '; + } + + $replacements = array( + '' => ucfirst($type) . ' ' . $variableName, + '' => $methodTypeHint, + '' => $variableType, + '' => $variableName, + '' => $methodName, + '' => $fieldName, + '' => ($defaultValue !== null ) ? (' = '.$defaultValue) : '', + '' => $this->getClassName($metadata) + ); + + $method = str_replace( + array_keys($replacements), + array_values($replacements), + $template + ); + + return $this->prefixCodeWithSpaces($method); + } + + /** + * @param string $name + * @param string $methodName + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateLifecycleCallbackMethod($name, $methodName, $metadata) + { + if ($this->hasMethod($methodName, $metadata)) { + return ''; + } + $this->staticReflection[$metadata->name]['methods'][] = $methodName; + + $replacements = array( + '' => $this->annotationsPrefix . ucfirst($name), + '' => $methodName, + ); + + $method = str_replace( + array_keys($replacements), + array_values($replacements), + static::$lifecycleCallbackMethodTemplate + ); + + return $this->prefixCodeWithSpaces($method); + } + + /** + * @param array $joinColumn + * + * @return string + */ + protected function generateJoinColumnAnnotation(array $joinColumn) + { + $joinColumnAnnot = array(); + + if (isset($joinColumn['name'])) { + $joinColumnAnnot[] = 'name="' . $joinColumn['name'] . '"'; + } + + if (isset($joinColumn['referencedColumnName'])) { + $joinColumnAnnot[] = 'referencedColumnName="' . $joinColumn['referencedColumnName'] . '"'; + } + + if (isset($joinColumn['unique']) && $joinColumn['unique']) { + $joinColumnAnnot[] = 'unique=' . ($joinColumn['unique'] ? 'true' : 'false'); + } + + if (isset($joinColumn['nullable'])) { + $joinColumnAnnot[] = 'nullable=' . ($joinColumn['nullable'] ? 'true' : 'false'); + } + + if (isset($joinColumn['onDelete'])) { + $joinColumnAnnot[] = 'onDelete="' . ($joinColumn['onDelete'] . '"'); + } + + if (isset($joinColumn['columnDefinition'])) { + $joinColumnAnnot[] = 'columnDefinition="' . $joinColumn['columnDefinition'] . '"'; + } + + return '@' . $this->annotationsPrefix . 'JoinColumn(' . implode(', ', $joinColumnAnnot) . ')'; + } + + /** + * @param array $associationMapping + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateAssociationMappingPropertyDocBlock(array $associationMapping, ClassMetadataInfo $metadata) + { + $lines = array(); + $lines[] = $this->spaces . '/**'; + + if ($associationMapping['type'] & ClassMetadataInfo::TO_MANY) { + $lines[] = $this->spaces . ' * @var \Doctrine\Common\Collections\Collection'; + } else { + $lines[] = $this->spaces . ' * @var \\' . ltrim($associationMapping['targetEntity'], '\\'); + } + + if ($this->generateAnnotations) { + $lines[] = $this->spaces . ' *'; + + if (isset($associationMapping['id']) && $associationMapping['id']) { + $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id'; + + if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) { + $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")'; + } + } + + $type = null; + switch ($associationMapping['type']) { + case ClassMetadataInfo::ONE_TO_ONE: + $type = 'OneToOne'; + break; + case ClassMetadataInfo::MANY_TO_ONE: + $type = 'ManyToOne'; + break; + case ClassMetadataInfo::ONE_TO_MANY: + $type = 'OneToMany'; + break; + case ClassMetadataInfo::MANY_TO_MANY: + $type = 'ManyToMany'; + break; + } + $typeOptions = array(); + + if (isset($associationMapping['targetEntity'])) { + $typeOptions[] = 'targetEntity="' . $associationMapping['targetEntity'] . '"'; + } + + if (isset($associationMapping['inversedBy'])) { + $typeOptions[] = 'inversedBy="' . $associationMapping['inversedBy'] . '"'; + } + + if (isset($associationMapping['mappedBy'])) { + $typeOptions[] = 'mappedBy="' . $associationMapping['mappedBy'] . '"'; + } + + if ($associationMapping['cascade']) { + $cascades = array(); + + if ($associationMapping['isCascadePersist']) $cascades[] = '"persist"'; + if ($associationMapping['isCascadeRemove']) $cascades[] = '"remove"'; + if ($associationMapping['isCascadeDetach']) $cascades[] = '"detach"'; + if ($associationMapping['isCascadeMerge']) $cascades[] = '"merge"'; + if ($associationMapping['isCascadeRefresh']) $cascades[] = '"refresh"'; + + if (count($cascades) === 5) { + $cascades = array('"all"'); + } + + $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}'; + } + + if (isset($associationMapping['orphanRemoval']) && $associationMapping['orphanRemoval']) { + $typeOptions[] = 'orphanRemoval=' . ($associationMapping['orphanRemoval'] ? 'true' : 'false'); + } + + if (isset($associationMapping['fetch']) && $associationMapping['fetch'] !== ClassMetadataInfo::FETCH_LAZY) { + $fetchMap = array( + ClassMetadataInfo::FETCH_EXTRA_LAZY => 'EXTRA_LAZY', + ClassMetadataInfo::FETCH_EAGER => 'EAGER', + ); + + $typeOptions[] = 'fetch="' . $fetchMap[$associationMapping['fetch']] . '"'; + } + + $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . '' . $type . '(' . implode(', ', $typeOptions) . ')'; + + if (isset($associationMapping['joinColumns']) && $associationMapping['joinColumns']) { + $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinColumns({'; + + $joinColumnsLines = array(); + + foreach ($associationMapping['joinColumns'] as $joinColumn) { + if ($joinColumnAnnot = $this->generateJoinColumnAnnotation($joinColumn)) { + $joinColumnsLines[] = $this->spaces . ' * ' . $joinColumnAnnot; + } + } + + $lines[] = implode(",\n", $joinColumnsLines); + $lines[] = $this->spaces . ' * })'; + } + + if (isset($associationMapping['joinTable']) && $associationMapping['joinTable']) { + $joinTable = array(); + $joinTable[] = 'name="' . $associationMapping['joinTable']['name'] . '"'; + + if (isset($associationMapping['joinTable']['schema'])) { + $joinTable[] = 'schema="' . $associationMapping['joinTable']['schema'] . '"'; + } + + $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinTable(' . implode(', ', $joinTable) . ','; + $lines[] = $this->spaces . ' * joinColumns={'; + + $joinColumnsLines = array(); + + foreach ($associationMapping['joinTable']['joinColumns'] as $joinColumn) { + $joinColumnsLines[] = $this->spaces . ' * ' . $this->generateJoinColumnAnnotation($joinColumn); + } + + $lines[] = implode(",". PHP_EOL, $joinColumnsLines); + $lines[] = $this->spaces . ' * },'; + $lines[] = $this->spaces . ' * inverseJoinColumns={'; + + $inverseJoinColumnsLines = array(); + + foreach ($associationMapping['joinTable']['inverseJoinColumns'] as $joinColumn) { + $inverseJoinColumnsLines[] = $this->spaces . ' * ' . $this->generateJoinColumnAnnotation($joinColumn); + } + + $lines[] = implode(",". PHP_EOL, $inverseJoinColumnsLines); + $lines[] = $this->spaces . ' * }'; + $lines[] = $this->spaces . ' * )'; + } + + if (isset($associationMapping['orderBy'])) { + $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'OrderBy({'; + + foreach ($associationMapping['orderBy'] as $name => $direction) { + $lines[] = $this->spaces . ' * "' . $name . '"="' . $direction . '",'; + } + + $lines[count($lines) - 1] = substr($lines[count($lines) - 1], 0, strlen($lines[count($lines) - 1]) - 1); + $lines[] = $this->spaces . ' * })'; + } + } + + $lines[] = $this->spaces . ' */'; + + return implode("\n", $lines); + } + + /** + * @param array $fieldMapping + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function generateFieldMappingPropertyDocBlock(array $fieldMapping, ClassMetadataInfo $metadata) + { + $lines = array(); + $lines[] = $this->spaces . '/**'; + $lines[] = $this->spaces . ' * @var ' . $this->getType($fieldMapping['type']); + + if ($this->generateAnnotations) { + $lines[] = $this->spaces . ' *'; + + $column = array(); + if (isset($fieldMapping['columnName'])) { + $column[] = 'name="' . $fieldMapping['columnName'] . '"'; + } + + if (isset($fieldMapping['type'])) { + $column[] = 'type="' . $fieldMapping['type'] . '"'; + } + + if (isset($fieldMapping['length'])) { + $column[] = 'length=' . $fieldMapping['length']; + } + + if (isset($fieldMapping['precision'])) { + $column[] = 'precision=' . $fieldMapping['precision']; + } + + if (isset($fieldMapping['scale'])) { + $column[] = 'scale=' . $fieldMapping['scale']; + } + + if (isset($fieldMapping['nullable'])) { + $column[] = 'nullable=' . var_export($fieldMapping['nullable'], true); + } + + if (isset($fieldMapping['unsigned']) && $fieldMapping['unsigned']) { + $column[] = 'options={"unsigned"=true}'; + } + + if (isset($fieldMapping['columnDefinition'])) { + $column[] = 'columnDefinition="' . $fieldMapping['columnDefinition'] . '"'; + } + + if (isset($fieldMapping['unique'])) { + $column[] = 'unique=' . var_export($fieldMapping['unique'], true); + } + + $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Column(' . implode(', ', $column) . ')'; + + if (isset($fieldMapping['id']) && $fieldMapping['id']) { + $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id'; + + if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) { + $lines[] = $this->spaces.' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")'; + } + + if ($metadata->sequenceGeneratorDefinition) { + $sequenceGenerator = array(); + + if (isset($metadata->sequenceGeneratorDefinition['sequenceName'])) { + $sequenceGenerator[] = 'sequenceName="' . $metadata->sequenceGeneratorDefinition['sequenceName'] . '"'; + } + + if (isset($metadata->sequenceGeneratorDefinition['allocationSize'])) { + $sequenceGenerator[] = 'allocationSize=' . $metadata->sequenceGeneratorDefinition['allocationSize']; + } + + if (isset($metadata->sequenceGeneratorDefinition['initialValue'])) { + $sequenceGenerator[] = 'initialValue=' . $metadata->sequenceGeneratorDefinition['initialValue']; + } + + $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'SequenceGenerator(' . implode(', ', $sequenceGenerator) . ')'; + } + } + + if (isset($fieldMapping['version']) && $fieldMapping['version']) { + $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Version'; + } + } + + $lines[] = $this->spaces . ' */'; + + return implode("\n", $lines); + } + + /** + * @param array $embeddedClass + * + * @return string + */ + protected function generateEmbeddedPropertyDocBlock(array $embeddedClass) + { + $lines = array(); + $lines[] = $this->spaces . '/**'; + $lines[] = $this->spaces . ' * @var \\' . ltrim($embeddedClass['class'], '\\'); + + if ($this->generateAnnotations) { + $lines[] = $this->spaces . ' *'; + + $embedded = array('class="' . $embeddedClass['class'] . '"'); + + if (isset($fieldMapping['columnPrefix'])) { + $embedded[] = 'columnPrefix=' . var_export($embeddedClass['columnPrefix'], true); + } + + $lines[] = $this->spaces . ' * @' . + $this->annotationsPrefix . 'Embedded(' . implode(', ', $embedded) . ')'; + } + + $lines[] = $this->spaces . ' */'; + + return implode("\n", $lines); + } + + /** + * @param string $code + * @param int $num + * + * @return string + */ + protected function prefixCodeWithSpaces($code, $num = 1) + { + $lines = explode("\n", $code); + + foreach ($lines as $key => $value) { + if ( ! empty($value)) { + $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key]; + } + } + + return implode("\n", $lines); + } + + /** + * @param integer $type The inheritance type used by the class and its subclasses. + * + * @return string The literal string for the inheritance type. + * + * @throws \InvalidArgumentException When the inheritance type does not exist. + */ + protected function getInheritanceTypeString($type) + { + if ( ! isset(static::$inheritanceTypeMap[$type])) { + throw new \InvalidArgumentException(sprintf('Invalid provided InheritanceType: %s', $type)); + } + + return static::$inheritanceTypeMap[$type]; + } + + /** + * @param integer $type The policy used for change-tracking for the mapped class. + * + * @return string The literal string for the change-tracking type. + * + * @throws \InvalidArgumentException When the change-tracking type does not exist. + */ + protected function getChangeTrackingPolicyString($type) + { + if ( ! isset(static::$changeTrackingPolicyMap[$type])) { + throw new \InvalidArgumentException(sprintf('Invalid provided ChangeTrackingPolicy: %s', $type)); + } + + return static::$changeTrackingPolicyMap[$type]; + } + + /** + * @param integer $type The generator to use for the mapped class. + * + * @return string The literal string for the generator type. + * + * @throws \InvalidArgumentException When the generator type does not exist. + */ + protected function getIdGeneratorTypeString($type) + { + if ( ! isset(static::$generatorStrategyMap[$type])) { + throw new \InvalidArgumentException(sprintf('Invalid provided IdGeneratorType: %s', $type)); + } + + return static::$generatorStrategyMap[$type]; + } + + /** + * Exports (nested) option elements. + * + * @param array $options + */ + private function exportTableOptions(array $options) + { + $optionsStr = array(); + + foreach($options as $name => $option) { + if (is_array($option)) { + $optionsStr[] = '"' . $name . '"={' . $this->exportTableOptions($option) . '}'; + } else { + $optionsStr[] = '"' . $name . '"="' . (string) $option . '"'; + } + } + + return implode(',', $optionsStr); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..f431588fb098cb8c2fb72564e74020bb5145c575 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php @@ -0,0 +1,171 @@ +. + */ + +namespace Doctrine\ORM\Tools; + +/** + * Class to generate entity repository classes + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class EntityRepositoryGenerator +{ + private $repositoryName; + + protected static $_template = +' + +/** + * + * + * This class was generated by the Doctrine ORM. Add your own custom + * repository methods below. + */ +class extends +{ +} +'; + + /** + * @param string $fullClassName + * + * @return string + */ + public function generateEntityRepositoryClass($fullClassName) + { + $variables = array( + '' => $this->generateEntityRepositoryNamespace($fullClassName), + '' => $this->generateEntityRepositoryName($fullClassName), + '' => $this->generateClassName($fullClassName) + ); + + return str_replace(array_keys($variables), array_values($variables), self::$_template); + } + + /** + * Generates the namespace, if class do not have namespace, return empty string instead. + * + * @param string $fullClassName + * + * @return string $namespace + */ + private function getClassNamespace($fullClassName) + { + $namespace = substr($fullClassName, 0, strrpos($fullClassName, '\\')); + + return $namespace; + } + + /** + * Generates the class name + * + * @param string $fullClassName + * + * @return string + */ + private function generateClassName($fullClassName) + { + $namespace = $this->getClassNamespace($fullClassName); + + $className = $fullClassName; + + if ($namespace) { + $className = substr($fullClassName, strrpos($fullClassName, '\\') + 1, strlen($fullClassName)); + } + + return $className; + } + + /** + * Generates the namespace statement, if class do not have namespace, return empty string instead. + * + * @param string $fullClassName The full repository class name. + * + * @return string $namespace + */ + private function generateEntityRepositoryNamespace($fullClassName) + { + $namespace = $this->getClassNamespace($fullClassName); + + return $namespace ? 'namespace ' . $namespace . ';' : ''; + } + + /** + * @param string $fullClassName + * + * @return string $repositoryName + */ + private function generateEntityRepositoryName($fullClassName) + { + $namespace = $this->getClassNamespace($fullClassName); + + $repositoryName = $this->repositoryName ?: 'Doctrine\ORM\EntityRepository'; + + if ($namespace && $repositoryName[0] !== '\\') { + $repositoryName = '\\' . $repositoryName; + } + + return $repositoryName; + } + + /** + * @param string $fullClassName + * @param string $outputDirectory + * + * @return void + */ + public function writeEntityRepositoryClass($fullClassName, $outputDirectory) + { + $code = $this->generateEntityRepositoryClass($fullClassName); + + $path = $outputDirectory . DIRECTORY_SEPARATOR + . str_replace('\\', \DIRECTORY_SEPARATOR, $fullClassName) . '.php'; + $dir = dirname($path); + + if ( ! is_dir($dir)) { + mkdir($dir, 0775, true); + } + + if ( ! file_exists($path)) { + file_put_contents($path, $code); + chmod($path, 0664); + } + } + + /** + * @param string $repositoryName + * + * @return \Doctrine\ORM\Tools\EntityRepositoryGenerator + */ + public function setDefaultRepositoryName($repositoryName) + { + $this->repositoryName = $repositoryName; + + return $this; + } + +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Event/GenerateSchemaEventArgs.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Event/GenerateSchemaEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..ed03e32d9dc5f7cbe0dcae2c6c1b174e8da24c07 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Event/GenerateSchemaEventArgs.php @@ -0,0 +1,71 @@ +. + */ + +namespace Doctrine\ORM\Tools\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\DBAL\Schema\Schema; +use Doctrine\ORM\EntityManagerInterface; + +/** + * Event Args used for the Events::postGenerateSchema event. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 1.0 + * @author Benjamin Eberlei + */ +class GenerateSchemaEventArgs extends EventArgs +{ + /** + * @var \Doctrine\ORM\EntityManagerInterface + */ + private $em; + + /** + * @var \Doctrine\DBAL\Schema\Schema + */ + private $schema; + + /** + * @param EntityManagerInterface $em + * @param Schema $schema + */ + public function __construct(EntityManagerInterface $em, Schema $schema) + { + $this->em = $em; + $this->schema = $schema; + } + + /** + * @return EntityManagerInterface + */ + public function getEntityManager() + { + return $this->em; + } + + /** + * @return Schema + */ + public function getSchema() + { + return $this->schema; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Event/GenerateSchemaTableEventArgs.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Event/GenerateSchemaTableEventArgs.php new file mode 100644 index 0000000000000000000000000000000000000000..e2c38f9c592a4d6df255f17c797bbdaa1f603b34 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Event/GenerateSchemaTableEventArgs.php @@ -0,0 +1,86 @@ +. + */ +namespace Doctrine\ORM\Tools\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Schema\Table; + +/** + * Event Args used for the Events::postGenerateSchemaTable event. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 1.0 + * @author Benjamin Eberlei + */ +class GenerateSchemaTableEventArgs extends EventArgs +{ + /** + * @var \Doctrine\ORM\Mapping\ClassMetadata + */ + private $classMetadata; + + /** + * @var \Doctrine\DBAL\Schema\Schema + */ + private $schema; + + /** + * @var \Doctrine\DBAL\Schema\Table + */ + private $classTable; + + /** + * @param ClassMetadata $classMetadata + * @param Schema $schema + * @param Table $classTable + */ + public function __construct(ClassMetadata $classMetadata, Schema $schema, Table $classTable) + { + $this->classMetadata = $classMetadata; + $this->schema = $schema; + $this->classTable = $classTable; + } + + /** + * @return ClassMetadata + */ + public function getClassMetadata() + { + return $this->classMetadata; + } + + /** + * @return Schema + */ + public function getSchema() + { + return $this->schema; + } + + /** + * @return Table + */ + public function getClassTable() + { + return $this->classTable; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php new file mode 100644 index 0000000000000000000000000000000000000000..1ea2a3735a93b7cdaa1e925d6bc2e5ebc20c825b --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php @@ -0,0 +1,76 @@ +. + */ + +namespace Doctrine\ORM\Tools\Export; + +/** + * Class used for converting your mapping information between the + * supported formats: yaml, xml, and php/annotation. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Jonathan Wage + */ +class ClassMetadataExporter +{ + /** + * @var array + */ + private static $_exporterDrivers = array( + 'xml' => 'Doctrine\ORM\Tools\Export\Driver\XmlExporter', + 'yaml' => 'Doctrine\ORM\Tools\Export\Driver\YamlExporter', + 'yml' => 'Doctrine\ORM\Tools\Export\Driver\YamlExporter', + 'php' => 'Doctrine\ORM\Tools\Export\Driver\PhpExporter', + 'annotation' => 'Doctrine\ORM\Tools\Export\Driver\AnnotationExporter' + ); + + /** + * Registers a new exporter driver class under a specified name. + * + * @param string $name + * @param string $class + * + * @return void + */ + public static function registerExportDriver($name, $class) + { + self::$_exporterDrivers[$name] = $class; + } + + /** + * Gets an exporter driver instance. + * + * @param string $type The type to get (yml, xml, etc.). + * @param string|null $dest The directory where the exporter will export to. + * + * @return Driver\AbstractExporter + * + * @throws ExportException + */ + public function getExporter($type, $dest = null) + { + if ( ! isset(self::$_exporterDrivers[$type])) { + throw ExportException::invalidExporterDriverType($type); + } + + $class = self::$_exporterDrivers[$type]; + + return new $class($dest); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php new file mode 100644 index 0000000000000000000000000000000000000000..b2ed435bc42bb38bb344d2605fcbc2f59ec144b3 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php @@ -0,0 +1,269 @@ +. + */ + +namespace Doctrine\ORM\Tools\Export\Driver; + +use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\ORM\Tools\Export\ExportException; + +/** + * Abstract base class which is to be used for the Exporter drivers + * which can be found in \Doctrine\ORM\Tools\Export\Driver. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Jonathan Wage + */ +abstract class AbstractExporter +{ + /** + * @var array + */ + protected $_metadata = array(); + + /** + * @var string|null + */ + protected $_outputDir; + + /** + * @var string|null + */ + protected $_extension; + + /** + * @var bool + */ + protected $_overwriteExistingFiles = false; + + /** + * @param string|null $dir + */ + public function __construct($dir = null) + { + $this->_outputDir = $dir; + } + + /** + * @param bool $overwrite + * + * @return void + */ + public function setOverwriteExistingFiles($overwrite) + { + $this->_overwriteExistingFiles = $overwrite; + } + + /** + * Converts a single ClassMetadata instance to the exported format + * and returns it. + * + * @param ClassMetadataInfo $metadata + * + * @return string + */ + abstract public function exportClassMetadata(ClassMetadataInfo $metadata); + + /** + * Sets the array of ClassMetadataInfo instances to export. + * + * @param array $metadata + * + * @return void + */ + public function setMetadata(array $metadata) + { + $this->_metadata = $metadata; + } + + /** + * Gets the extension used to generated the path to a class. + * + * @return string|null + */ + public function getExtension() + { + return $this->_extension; + } + + /** + * Sets the directory to output the mapping files to. + * + * [php] + * $exporter = new YamlExporter($metadata); + * $exporter->setOutputDir(__DIR__ . '/yaml'); + * $exporter->export(); + * + * @param string $dir + * + * @return void + */ + public function setOutputDir($dir) + { + $this->_outputDir = $dir; + } + + /** + * Exports each ClassMetadata instance to a single Doctrine Mapping file + * named after the entity. + * + * @return void + * + * @throws \Doctrine\ORM\Tools\Export\ExportException + */ + public function export() + { + if ( ! is_dir($this->_outputDir)) { + mkdir($this->_outputDir, 0775, true); + } + + foreach ($this->_metadata as $metadata) { + // In case output is returned, write it to a file, skip otherwise + if($output = $this->exportClassMetadata($metadata)){ + $path = $this->_generateOutputPath($metadata); + $dir = dirname($path); + if ( ! is_dir($dir)) { + mkdir($dir, 0775, true); + } + if (file_exists($path) && !$this->_overwriteExistingFiles) { + throw ExportException::attemptOverwriteExistingFile($path); + } + file_put_contents($path, $output); + chmod($path, 0664); + } + } + } + + /** + * Generates the path to write the class for the given ClassMetadataInfo instance. + * + * @param ClassMetadataInfo $metadata + * + * @return string + */ + protected function _generateOutputPath(ClassMetadataInfo $metadata) + { + return $this->_outputDir . '/' . str_replace('\\', '.', $metadata->name) . $this->_extension; + } + + /** + * Sets the directory to output the mapping files to. + * + * [php] + * $exporter = new YamlExporter($metadata, __DIR__ . '/yaml'); + * $exporter->setExtension('.yml'); + * $exporter->export(); + * + * @param string $extension + * + * @return void + */ + public function setExtension($extension) + { + $this->_extension = $extension; + } + + /** + * @param int $type + * + * @return string + */ + protected function _getInheritanceTypeString($type) + { + switch ($type) { + case ClassMetadataInfo::INHERITANCE_TYPE_NONE: + return 'NONE'; + + case ClassMetadataInfo::INHERITANCE_TYPE_JOINED: + return 'JOINED'; + + case ClassMetadataInfo::INHERITANCE_TYPE_SINGLE_TABLE: + return 'SINGLE_TABLE'; + + case ClassMetadataInfo::INHERITANCE_TYPE_TABLE_PER_CLASS: + return 'PER_CLASS'; + } + } + + /** + * @param int $mode + * + * @return string + */ + protected function _getFetchModeString($mode) + { + switch ($mode) { + case ClassMetadataInfo::FETCH_EAGER: + return 'EAGER'; + + case ClassMetadataInfo::FETCH_EXTRA_LAZY: + return 'EXTRA_LAZY'; + + case ClassMetadataInfo::FETCH_LAZY: + return 'LAZY'; + } + } + + /** + * @param int $policy + * + * @return string + */ + protected function _getChangeTrackingPolicyString($policy) + { + switch ($policy) { + case ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT: + return 'DEFERRED_IMPLICIT'; + + case ClassMetadataInfo::CHANGETRACKING_DEFERRED_EXPLICIT: + return 'DEFERRED_EXPLICIT'; + + case ClassMetadataInfo::CHANGETRACKING_NOTIFY: + return 'NOTIFY'; + } + } + + /** + * @param int $type + * + * @return string + */ + protected function _getIdGeneratorTypeString($type) + { + switch ($type) { + case ClassMetadataInfo::GENERATOR_TYPE_AUTO: + return 'AUTO'; + + case ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE: + return 'SEQUENCE'; + + case ClassMetadataInfo::GENERATOR_TYPE_TABLE: + return 'TABLE'; + + case ClassMetadataInfo::GENERATOR_TYPE_IDENTITY: + return 'IDENTITY'; + + case ClassMetadataInfo::GENERATOR_TYPE_UUID: + return 'UUID'; + + case ClassMetadataInfo::GENERATOR_TYPE_CUSTOM: + return 'CUSTOM'; + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php new file mode 100644 index 0000000000000000000000000000000000000000..044a1da53a82d08867083dcb229dd152d865da98 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php @@ -0,0 +1,80 @@ +. + */ + +namespace Doctrine\ORM\Tools\Export\Driver; + +use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\ORM\Tools\EntityGenerator; + +/** + * ClassMetadata exporter for PHP classes with annotations. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Jonathan Wage + */ +class AnnotationExporter extends AbstractExporter +{ + /** + * @var string + */ + protected $_extension = '.php'; + + /** + * @var EntityGenerator|null + */ + private $_entityGenerator; + + /** + * {@inheritdoc} + */ + public function exportClassMetadata(ClassMetadataInfo $metadata) + { + if ( ! $this->_entityGenerator) { + throw new \RuntimeException('For the AnnotationExporter you must set an EntityGenerator instance with the setEntityGenerator() method.'); + } + + $this->_entityGenerator->setGenerateAnnotations(true); + $this->_entityGenerator->setGenerateStubMethods(false); + $this->_entityGenerator->setRegenerateEntityIfExists(false); + $this->_entityGenerator->setUpdateEntityIfExists(false); + + return $this->_entityGenerator->generateEntityClass($metadata); + } + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadataInfo $metadata + * + * @return string + */ + protected function _generateOutputPath(ClassMetadataInfo $metadata) + { + return $this->_outputDir . '/' . str_replace('\\', '/', $metadata->name) . $this->_extension; + } + + /** + * @param \Doctrine\ORM\Tools\EntityGenerator $entityGenerator + * + * @return void + */ + public function setEntityGenerator(EntityGenerator $entityGenerator) + { + $this->_entityGenerator = $entityGenerator; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php new file mode 100644 index 0000000000000000000000000000000000000000..5d88901a56ab90e555b16b01ba4b3ad92098dcae --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php @@ -0,0 +1,177 @@ +. + */ + +namespace Doctrine\ORM\Tools\Export\Driver; + +use Doctrine\ORM\Mapping\ClassMetadataInfo; + +/** + * ClassMetadata exporter for PHP code. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Jonathan Wage + */ +class PhpExporter extends AbstractExporter +{ + /** + * @var string + */ + protected $_extension = '.php'; + + /** + * {@inheritdoc} + */ + public function exportClassMetadata(ClassMetadataInfo $metadata) + { + $lines = array(); + $lines[] = 'isMappedSuperclass) { + $lines[] = '$metadata->isMappedSuperclass = true;'; + } + + if ($metadata->inheritanceType) { + $lines[] = '$metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_' . $this->_getInheritanceTypeString($metadata->inheritanceType) . ');'; + } + + if ($metadata->customRepositoryClassName) { + $lines[] = "\$metadata->customRepositoryClassName = '" . $metadata->customRepositoryClassName . "';"; + } + + if ($metadata->table) { + $lines[] = '$metadata->setPrimaryTable(' . $this->_varExport($metadata->table) . ');'; + } + + if ($metadata->discriminatorColumn) { + $lines[] = '$metadata->setDiscriminatorColumn(' . $this->_varExport($metadata->discriminatorColumn) . ');'; + } + + if ($metadata->discriminatorMap) { + $lines[] = '$metadata->setDiscriminatorMap(' . $this->_varExport($metadata->discriminatorMap) . ');'; + } + + if ($metadata->changeTrackingPolicy) { + $lines[] = '$metadata->setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_' . $this->_getChangeTrackingPolicyString($metadata->changeTrackingPolicy) . ');'; + } + + if ($metadata->lifecycleCallbacks) { + foreach ($metadata->lifecycleCallbacks as $event => $callbacks) { + foreach ($callbacks as $callback) { + $lines[] = "\$metadata->addLifecycleCallback('$callback', '$event');"; + } + } + } + + foreach ($metadata->fieldMappings as $fieldMapping) { + $lines[] = '$metadata->mapField(' . $this->_varExport($fieldMapping) . ');'; + } + + if ( ! $metadata->isIdentifierComposite && $generatorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) { + $lines[] = '$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_' . $generatorType . ');'; + } + + foreach ($metadata->associationMappings as $associationMapping) { + $cascade = array('remove', 'persist', 'refresh', 'merge', 'detach'); + foreach ($cascade as $key => $value) { + if ( ! $associationMapping['isCascade'.ucfirst($value)]) { + unset($cascade[$key]); + } + } + + if (count($cascade) === 5) { + $cascade = array('all'); + } + + $associationMappingArray = array( + 'fieldName' => $associationMapping['fieldName'], + 'targetEntity' => $associationMapping['targetEntity'], + 'cascade' => $cascade, + ); + + if (isset($associationMapping['fetch'])) { + $associationMappingArray['fetch'] = $associationMapping['fetch']; + } + + if ($associationMapping['type'] & ClassMetadataInfo::TO_ONE) { + $method = 'mapOneToOne'; + $oneToOneMappingArray = array( + 'mappedBy' => $associationMapping['mappedBy'], + 'inversedBy' => $associationMapping['inversedBy'], + 'joinColumns' => $associationMapping['isOwningSide'] ? $associationMapping['joinColumns'] : [], + 'orphanRemoval' => $associationMapping['orphanRemoval'], + ); + + $associationMappingArray = array_merge($associationMappingArray, $oneToOneMappingArray); + } elseif ($associationMapping['type'] == ClassMetadataInfo::ONE_TO_MANY) { + $method = 'mapOneToMany'; + $potentialAssociationMappingIndexes = array( + 'mappedBy', + 'orphanRemoval', + 'orderBy', + ); + foreach ($potentialAssociationMappingIndexes as $index) { + if (isset($associationMapping[$index])) { + $oneToManyMappingArray[$index] = $associationMapping[$index]; + } + } + $associationMappingArray = array_merge($associationMappingArray, $oneToManyMappingArray); + } elseif ($associationMapping['type'] == ClassMetadataInfo::MANY_TO_MANY) { + $method = 'mapManyToMany'; + $potentialAssociationMappingIndexes = array( + 'mappedBy', + 'joinTable', + 'orderBy', + ); + foreach ($potentialAssociationMappingIndexes as $index) { + if (isset($associationMapping[$index])) { + $manyToManyMappingArray[$index] = $associationMapping[$index]; + } + } + $associationMappingArray = array_merge($associationMappingArray, $manyToManyMappingArray); + } + + $lines[] = '$metadata->' . $method . '(' . $this->_varExport($associationMappingArray) . ');'; + } + + return implode("\n", $lines); + } + + /** + * @param mixed $var + * + * @return string + */ + protected function _varExport($var) + { + $export = var_export($var, true); + $export = str_replace("\n", PHP_EOL . str_repeat(' ', 8), $export); + $export = str_replace(' ', ' ', $export); + $export = str_replace('array (', 'array(', $export); + $export = str_replace('array( ', 'array(', $export); + $export = str_replace(',)', ')', $export); + $export = str_replace(', )', ')', $export); + $export = str_replace(' ', ' ', $export); + + return $export; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php new file mode 100644 index 0000000000000000000000000000000000000000..6b53cbbaf32572198d4d18a64a41d941e3a8673b --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php @@ -0,0 +1,453 @@ +. + */ + +namespace Doctrine\ORM\Tools\Export\Driver; + +use Doctrine\ORM\Mapping\ClassMetadataInfo; + +/** + * ClassMetadata exporter for Doctrine XML mapping files. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Jonathan Wage + */ +class XmlExporter extends AbstractExporter +{ + /** + * @var string + */ + protected $_extension = '.dcm.xml'; + + /** + * {@inheritdoc} + */ + public function exportClassMetadata(ClassMetadataInfo $metadata) + { + $xml = new \SimpleXmlElement(""); + + if ($metadata->isMappedSuperclass) { + $root = $xml->addChild('mapped-superclass'); + } else { + $root = $xml->addChild('entity'); + } + + if ($metadata->customRepositoryClassName) { + $root->addAttribute('repository-class', $metadata->customRepositoryClassName); + } + + $root->addAttribute('name', $metadata->name); + + if (isset($metadata->table['name'])) { + $root->addAttribute('table', $metadata->table['name']); + } + + if (isset($metadata->table['schema'])) { + $root->addAttribute('schema', $metadata->table['schema']); + } + + if ($metadata->inheritanceType && $metadata->inheritanceType !== ClassMetadataInfo::INHERITANCE_TYPE_NONE) { + $root->addAttribute('inheritance-type', $this->_getInheritanceTypeString($metadata->inheritanceType)); + } + + if (isset($metadata->table['options'])) { + $optionsXml = $root->addChild('options'); + + $this->exportTableOptions($optionsXml, $metadata->table['options']); + } + + if ($metadata->discriminatorColumn) { + $discriminatorColumnXml = $root->addChild('discriminator-column'); + $discriminatorColumnXml->addAttribute('name', $metadata->discriminatorColumn['name']); + $discriminatorColumnXml->addAttribute('type', $metadata->discriminatorColumn['type']); + + if (isset($metadata->discriminatorColumn['length'])) { + $discriminatorColumnXml->addAttribute('length', $metadata->discriminatorColumn['length']); + } + } + + if ($metadata->discriminatorMap) { + $discriminatorMapXml = $root->addChild('discriminator-map'); + + foreach ($metadata->discriminatorMap as $value => $className) { + $discriminatorMappingXml = $discriminatorMapXml->addChild('discriminator-mapping'); + $discriminatorMappingXml->addAttribute('value', $value); + $discriminatorMappingXml->addAttribute('class', $className); + } + } + + $trackingPolicy = $this->_getChangeTrackingPolicyString($metadata->changeTrackingPolicy); + + if ( $trackingPolicy != 'DEFERRED_IMPLICIT') { + $root->addChild('change-tracking-policy', $trackingPolicy); + } + + if (isset($metadata->table['indexes'])) { + $indexesXml = $root->addChild('indexes'); + + foreach ($metadata->table['indexes'] as $name => $index) { + $indexXml = $indexesXml->addChild('index'); + $indexXml->addAttribute('name', $name); + $indexXml->addAttribute('columns', implode(',', $index['columns'])); + if(isset($index['flags'])) { + $indexXml->addAttribute('flags', implode(',', $index['flags'])); + } + } + } + + if (isset($metadata->table['uniqueConstraints'])) { + $uniqueConstraintsXml = $root->addChild('unique-constraints'); + + foreach ($metadata->table['uniqueConstraints'] as $name => $unique) { + $uniqueConstraintXml = $uniqueConstraintsXml->addChild('unique-constraint'); + $uniqueConstraintXml->addAttribute('name', $name); + $uniqueConstraintXml->addAttribute('columns', implode(',', $unique['columns'])); + } + } + + $fields = $metadata->fieldMappings; + + $id = array(); + foreach ($fields as $name => $field) { + if (isset($field['id']) && $field['id']) { + $id[$name] = $field; + unset($fields[$name]); + } + } + + foreach ($metadata->associationMappings as $name => $assoc) { + if (isset($assoc['id']) && $assoc['id']) { + $id[$name] = array( + 'fieldName' => $name, + 'associationKey' => true + ); + } + } + + if ( ! $metadata->isIdentifierComposite && $idGeneratorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) { + $id[$metadata->getSingleIdentifierFieldName()]['generator']['strategy'] = $idGeneratorType; + } + + if ($id) { + foreach ($id as $field) { + $idXml = $root->addChild('id'); + $idXml->addAttribute('name', $field['fieldName']); + + if (isset($field['type'])) { + $idXml->addAttribute('type', $field['type']); + } + + if (isset($field['columnName'])) { + $idXml->addAttribute('column', $field['columnName']); + } + + if (isset($field['length'])) { + $idXml->addAttribute('length', $field['length']); + } + + if (isset($field['associationKey']) && $field['associationKey']) { + $idXml->addAttribute('association-key', 'true'); + } + + if ($idGeneratorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) { + $generatorXml = $idXml->addChild('generator'); + $generatorXml->addAttribute('strategy', $idGeneratorType); + + $this->exportSequenceInformation($idXml, $metadata); + } + } + } + + if ($fields) { + foreach ($fields as $field) { + $fieldXml = $root->addChild('field'); + $fieldXml->addAttribute('name', $field['fieldName']); + $fieldXml->addAttribute('type', $field['type']); + + if (isset($field['columnName'])) { + $fieldXml->addAttribute('column', $field['columnName']); + } + + if (isset($field['length'])) { + $fieldXml->addAttribute('length', $field['length']); + } + + if (isset($field['precision'])) { + $fieldXml->addAttribute('precision', $field['precision']); + } + + if (isset($field['scale'])) { + $fieldXml->addAttribute('scale', $field['scale']); + } + + if (isset($field['unique']) && $field['unique']) { + $fieldXml->addAttribute('unique', $field['unique'] ? 'true' : 'false'); + } + + if (isset($field['options'])) { + $optionsXml = $fieldXml->addChild('options'); + foreach ($field['options'] as $key => $value) { + $optionXml = $optionsXml->addChild('option', $value); + $optionXml->addAttribute('name', $key); + } + } + + if (isset($field['version'])) { + $fieldXml->addAttribute('version', $field['version']); + } + + if (isset($field['columnDefinition'])) { + $fieldXml->addAttribute('column-definition', $field['columnDefinition']); + } + + if (isset($field['nullable'])) { + $fieldXml->addAttribute('nullable', $field['nullable'] ? 'true' : 'false'); + } + } + } + + $orderMap = array( + ClassMetadataInfo::ONE_TO_ONE, + ClassMetadataInfo::ONE_TO_MANY, + ClassMetadataInfo::MANY_TO_ONE, + ClassMetadataInfo::MANY_TO_MANY, + ); + + uasort($metadata->associationMappings, function($m1, $m2) use (&$orderMap){ + $a1 = array_search($m1['type'], $orderMap); + $a2 = array_search($m2['type'], $orderMap); + + return strcmp($a1, $a2); + }); + + foreach ($metadata->associationMappings as $associationMapping) { + if ($associationMapping['type'] == ClassMetadataInfo::ONE_TO_ONE) { + $associationMappingXml = $root->addChild('one-to-one'); + } elseif ($associationMapping['type'] == ClassMetadataInfo::MANY_TO_ONE) { + $associationMappingXml = $root->addChild('many-to-one'); + } elseif ($associationMapping['type'] == ClassMetadataInfo::ONE_TO_MANY) { + $associationMappingXml = $root->addChild('one-to-many'); + } elseif ($associationMapping['type'] == ClassMetadataInfo::MANY_TO_MANY) { + $associationMappingXml = $root->addChild('many-to-many'); + } + + $associationMappingXml->addAttribute('field', $associationMapping['fieldName']); + $associationMappingXml->addAttribute('target-entity', $associationMapping['targetEntity']); + + if (isset($associationMapping['mappedBy'])) { + $associationMappingXml->addAttribute('mapped-by', $associationMapping['mappedBy']); + } + + if (isset($associationMapping['inversedBy'])) { + $associationMappingXml->addAttribute('inversed-by', $associationMapping['inversedBy']); + } + + if (isset($associationMapping['indexBy'])) { + $associationMappingXml->addAttribute('index-by', $associationMapping['indexBy']); + } + + if (isset($associationMapping['orphanRemoval']) && $associationMapping['orphanRemoval'] !== false) { + $associationMappingXml->addAttribute('orphan-removal', 'true'); + } + + if (isset($associationMapping['fetch'])) { + $associationMappingXml->addAttribute('fetch', $this->_getFetchModeString($associationMapping['fetch'])); + } + + $cascade = array(); + if ($associationMapping['isCascadeRemove']) { + $cascade[] = 'cascade-remove'; + } + + if ($associationMapping['isCascadePersist']) { + $cascade[] = 'cascade-persist'; + } + + if ($associationMapping['isCascadeRefresh']) { + $cascade[] = 'cascade-refresh'; + } + + if ($associationMapping['isCascadeMerge']) { + $cascade[] = 'cascade-merge'; + } + + if ($associationMapping['isCascadeDetach']) { + $cascade[] = 'cascade-detach'; + } + + if (count($cascade) === 5) { + $cascade = array('cascade-all'); + } + + if ($cascade) { + $cascadeXml = $associationMappingXml->addChild('cascade'); + + foreach ($cascade as $type) { + $cascadeXml->addChild($type); + } + } + + if (isset($associationMapping['joinTable']) && $associationMapping['joinTable']) { + $joinTableXml = $associationMappingXml->addChild('join-table'); + $joinTableXml->addAttribute('name', $associationMapping['joinTable']['name']); + $joinColumnsXml = $joinTableXml->addChild('join-columns'); + + foreach ($associationMapping['joinTable']['joinColumns'] as $joinColumn) { + $joinColumnXml = $joinColumnsXml->addChild('join-column'); + $joinColumnXml->addAttribute('name', $joinColumn['name']); + $joinColumnXml->addAttribute('referenced-column-name', $joinColumn['referencedColumnName']); + + if (isset($joinColumn['onDelete'])) { + $joinColumnXml->addAttribute('on-delete', $joinColumn['onDelete']); + } + } + + $inverseJoinColumnsXml = $joinTableXml->addChild('inverse-join-columns'); + + foreach ($associationMapping['joinTable']['inverseJoinColumns'] as $inverseJoinColumn) { + $inverseJoinColumnXml = $inverseJoinColumnsXml->addChild('join-column'); + $inverseJoinColumnXml->addAttribute('name', $inverseJoinColumn['name']); + $inverseJoinColumnXml->addAttribute('referenced-column-name', $inverseJoinColumn['referencedColumnName']); + + if (isset($inverseJoinColumn['onDelete'])) { + $inverseJoinColumnXml->addAttribute('on-delete', $inverseJoinColumn['onDelete']); + } + + if (isset($inverseJoinColumn['columnDefinition'])) { + $inverseJoinColumnXml->addAttribute('column-definition', $inverseJoinColumn['columnDefinition']); + } + + if (isset($inverseJoinColumn['nullable'])) { + $inverseJoinColumnXml->addAttribute('nullable', $inverseJoinColumn['nullable']); + } + + if (isset($inverseJoinColumn['orderBy'])) { + $inverseJoinColumnXml->addAttribute('order-by', $inverseJoinColumn['orderBy']); + } + } + } + if (isset($associationMapping['joinColumns'])) { + $joinColumnsXml = $associationMappingXml->addChild('join-columns'); + + foreach ($associationMapping['joinColumns'] as $joinColumn) { + $joinColumnXml = $joinColumnsXml->addChild('join-column'); + $joinColumnXml->addAttribute('name', $joinColumn['name']); + $joinColumnXml->addAttribute('referenced-column-name', $joinColumn['referencedColumnName']); + + if (isset($joinColumn['onDelete'])) { + $joinColumnXml->addAttribute('on-delete', $joinColumn['onDelete']); + } + + if (isset($joinColumn['columnDefinition'])) { + $joinColumnXml->addAttribute('column-definition', $joinColumn['columnDefinition']); + } + + if (isset($joinColumn['nullable'])) { + $joinColumnXml->addAttribute('nullable', $joinColumn['nullable']); + } + } + } + if (isset($associationMapping['orderBy'])) { + $orderByXml = $associationMappingXml->addChild('order-by'); + + foreach ($associationMapping['orderBy'] as $name => $direction) { + $orderByFieldXml = $orderByXml->addChild('order-by-field'); + $orderByFieldXml->addAttribute('name', $name); + $orderByFieldXml->addAttribute('direction', $direction); + } + } + } + + if (isset($metadata->lifecycleCallbacks) && count($metadata->lifecycleCallbacks)>0) { + $lifecycleCallbacksXml = $root->addChild('lifecycle-callbacks'); + + foreach ($metadata->lifecycleCallbacks as $name => $methods) { + foreach ($methods as $method) { + $lifecycleCallbackXml = $lifecycleCallbacksXml->addChild('lifecycle-callback'); + $lifecycleCallbackXml->addAttribute('type', $name); + $lifecycleCallbackXml->addAttribute('method', $method); + } + } + } + + return $this->_asXml($xml); + } + + /** + * Exports (nested) option elements. + * + * @param \SimpleXMLElement $parentXml + * @param array $options + */ + private function exportTableOptions(\SimpleXMLElement $parentXml, array $options) + { + foreach ($options as $name => $option) { + $isArray = is_array($option); + $optionXml = $isArray + ? $parentXml->addChild('option') + : $parentXml->addChild('option', (string) $option); + + $optionXml->addAttribute('name', (string) $name); + + if ($isArray) { + $this->exportTableOptions($optionXml, $option); + } + } + } + + /** + * Export sequence information (if available/configured) into the current identifier XML node + * + * @param \SimpleXMLElement $identifierXmlNode + * @param ClassMetadataInfo $metadata + * + * @return void + */ + private function exportSequenceInformation(\SimpleXMLElement $identifierXmlNode, ClassMetadataInfo $metadata) + { + $sequenceDefinition = $metadata->sequenceGeneratorDefinition; + + if (! ($metadata->generatorType === ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE && $sequenceDefinition)) { + return; + } + + $sequenceGeneratorXml = $identifierXmlNode->addChild('sequence-generator'); + + $sequenceGeneratorXml->addAttribute('sequence-name', $sequenceDefinition['sequenceName']); + $sequenceGeneratorXml->addAttribute('allocation-size', $sequenceDefinition['allocationSize']); + $sequenceGeneratorXml->addAttribute('initial-value', $sequenceDefinition['initialValue']); + } + + /** + * @param \SimpleXMLElement $simpleXml + * + * @return string $xml + */ + private function _asXml($simpleXml) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->loadXML($simpleXml->asXML()); + $dom->formatOutput = true; + + return $dom->saveXML(); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php new file mode 100644 index 0000000000000000000000000000000000000000..7677ad9501e7007a1a239dfe285050323d5b8445 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php @@ -0,0 +1,235 @@ +. + */ + +namespace Doctrine\ORM\Tools\Export\Driver; + +use Symfony\Component\Yaml\Yaml; +use Doctrine\ORM\Mapping\ClassMetadataInfo; + +/** + * ClassMetadata exporter for Doctrine YAML mapping files. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Jonathan Wage + */ +class YamlExporter extends AbstractExporter +{ + /** + * @var string + */ + protected $_extension = '.dcm.yml'; + + /** + * {@inheritdoc} + */ + public function exportClassMetadata(ClassMetadataInfo $metadata) + { + $array = array(); + + if ($metadata->isMappedSuperclass) { + $array['type'] = 'mappedSuperclass'; + } else { + $array['type'] = 'entity'; + } + + $array['table'] = $metadata->table['name']; + + if (isset($metadata->table['schema'])) { + $array['schema'] = $metadata->table['schema']; + } + + $inheritanceType = $metadata->inheritanceType; + + if ($inheritanceType !== ClassMetadataInfo::INHERITANCE_TYPE_NONE) { + $array['inheritanceType'] = $this->_getInheritanceTypeString($inheritanceType); + } + + if ($column = $metadata->discriminatorColumn) { + $array['discriminatorColumn'] = $column; + } + + if ($map = $metadata->discriminatorMap) { + $array['discriminatorMap'] = $map; + } + + if ($metadata->changeTrackingPolicy !== ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT) { + $array['changeTrackingPolicy'] = $this->_getChangeTrackingPolicyString($metadata->changeTrackingPolicy); + } + + if (isset($metadata->table['indexes'])) { + $array['indexes'] = $metadata->table['indexes']; + } + + if ($metadata->customRepositoryClassName) { + $array['repositoryClass'] = $metadata->customRepositoryClassName; + } + + if (isset($metadata->table['uniqueConstraints'])) { + $array['uniqueConstraints'] = $metadata->table['uniqueConstraints']; + } + + if (isset($metadata->table['options'])) { + $array['options'] = $metadata->table['options']; + } + + $fieldMappings = $metadata->fieldMappings; + + $ids = array(); + foreach ($fieldMappings as $name => $fieldMapping) { + $fieldMapping['column'] = $fieldMapping['columnName']; + + unset($fieldMapping['columnName'], $fieldMapping['fieldName']); + + if ($fieldMapping['column'] == $name) { + unset($fieldMapping['column']); + } + + if (isset($fieldMapping['id']) && $fieldMapping['id']) { + $ids[$name] = $fieldMapping; + unset($fieldMappings[$name]); + continue; + } + + $fieldMappings[$name] = $fieldMapping; + } + + if ( ! $metadata->isIdentifierComposite && $idGeneratorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) { + $ids[$metadata->getSingleIdentifierFieldName()]['generator']['strategy'] = $idGeneratorType; + } + + $array['id'] = $ids; + + if ($fieldMappings) { + if ( ! isset($array['fields'])) { + $array['fields'] = array(); + } + $array['fields'] = array_merge($array['fields'], $fieldMappings); + } + + foreach ($metadata->associationMappings as $name => $associationMapping) { + $cascade = array(); + + if ($associationMapping['isCascadeRemove']) { + $cascade[] = 'remove'; + } + + if ($associationMapping['isCascadePersist']) { + $cascade[] = 'persist'; + } + + if ($associationMapping['isCascadeRefresh']) { + $cascade[] = 'refresh'; + } + + if ($associationMapping['isCascadeMerge']) { + $cascade[] = 'merge'; + } + + if ($associationMapping['isCascadeDetach']) { + $cascade[] = 'detach'; + } + if (count($cascade) === 5) { + $cascade = array('all'); + } + + $associationMappingArray = array( + 'targetEntity' => $associationMapping['targetEntity'], + 'cascade' => $cascade, + ); + + if (isset($associationMapping['fetch'])) { + $associationMappingArray['fetch'] = $this->_getFetchModeString($associationMapping['fetch']); + } + + if (isset($mapping['id']) && $mapping['id'] === true) { + $array['id'][$name]['associationKey'] = true; + } + + if ($associationMapping['type'] & ClassMetadataInfo::TO_ONE) { + $joinColumns = $associationMapping['isOwningSide'] ? $associationMapping['joinColumns'] : []; + $newJoinColumns = array(); + + foreach ($joinColumns as $joinColumn) { + $newJoinColumns[$joinColumn['name']]['referencedColumnName'] = $joinColumn['referencedColumnName']; + + if (isset($joinColumn['onDelete'])) { + $newJoinColumns[$joinColumn['name']]['onDelete'] = $joinColumn['onDelete']; + } + } + + $oneToOneMappingArray = array( + 'mappedBy' => $associationMapping['mappedBy'], + 'inversedBy' => $associationMapping['inversedBy'], + 'joinColumns' => $newJoinColumns, + 'orphanRemoval' => $associationMapping['orphanRemoval'], + ); + + $associationMappingArray = array_merge($associationMappingArray, $oneToOneMappingArray); + + if ($associationMapping['type'] & ClassMetadataInfo::ONE_TO_ONE) { + $array['oneToOne'][$name] = $associationMappingArray; + } else { + $array['manyToOne'][$name] = $associationMappingArray; + } + } elseif ($associationMapping['type'] == ClassMetadataInfo::ONE_TO_MANY) { + $oneToManyMappingArray = array( + 'mappedBy' => $associationMapping['mappedBy'], + 'inversedBy' => $associationMapping['inversedBy'], + 'orphanRemoval' => $associationMapping['orphanRemoval'], + 'orderBy' => isset($associationMapping['orderBy']) ? $associationMapping['orderBy'] : null + ); + + $associationMappingArray = array_merge($associationMappingArray, $oneToManyMappingArray); + $array['oneToMany'][$name] = $associationMappingArray; + } elseif ($associationMapping['type'] == ClassMetadataInfo::MANY_TO_MANY) { + $manyToManyMappingArray = array( + 'mappedBy' => $associationMapping['mappedBy'], + 'inversedBy' => $associationMapping['inversedBy'], + 'joinTable' => isset($associationMapping['joinTable']) ? $associationMapping['joinTable'] : null, + 'orderBy' => isset($associationMapping['orderBy']) ? $associationMapping['orderBy'] : null + ); + + $associationMappingArray = array_merge($associationMappingArray, $manyToManyMappingArray); + $array['manyToMany'][$name] = $associationMappingArray; + } + } + if (isset($metadata->lifecycleCallbacks)) { + $array['lifecycleCallbacks'] = $metadata->lifecycleCallbacks; + } + + return $this->yamlDump(array($metadata->name => $array), 10); + } + + /** + * Dumps a PHP array to a YAML string. + * + * The yamlDump method, when supplied with an array, will do its best + * to convert the array into friendly YAML. + * + * @param array $array PHP array + * @param integer $inline [optional] The level where you switch to inline YAML + * + * @return string A YAML string representing the original PHP array + */ + protected function yamlDump($array, $inline = 2) + { + return Yaml::dump($array, $inline); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/ExportException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/ExportException.php new file mode 100644 index 0000000000000000000000000000000000000000..89ddfe22eb00ebd504fdb36b42477996c7997511 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Export/ExportException.php @@ -0,0 +1,38 @@ + FROM ()) + * + * Works with composite keys but cannot deal with queries that have multiple + * root entities (e.g. `SELECT f, b from Foo, Bar`) + * + * @author Sander Marechal + */ +class CountOutputWalker extends SqlWalker +{ + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $platform; + + /** + * @var \Doctrine\ORM\Query\ResultSetMapping + */ + private $rsm; + + /** + * @var array + */ + private $queryComponents; + + /** + * Constructor. + * + * Stores various parameters that are otherwise unavailable + * because Doctrine\ORM\Query\SqlWalker keeps everything private without + * accessors. + * + * @param \Doctrine\ORM\Query $query + * @param \Doctrine\ORM\Query\ParserResult $parserResult + * @param array $queryComponents + */ + public function __construct($query, $parserResult, array $queryComponents) + { + $this->platform = $query->getEntityManager()->getConnection()->getDatabasePlatform(); + $this->rsm = $parserResult->getResultSetMapping(); + $this->queryComponents = $queryComponents; + + parent::__construct($query, $parserResult, $queryComponents); + } + + /** + * Walks down a SelectStatement AST node, wrapping it in a COUNT (SELECT DISTINCT). + * + * Note that the ORDER BY clause is not removed. Many SQL implementations (e.g. MySQL) + * are able to cache subqueries. By keeping the ORDER BY clause intact, the limitSubQuery + * that will most likely be executed next can be read from the native SQL cache. + * + * @param SelectStatement $AST + * + * @return string + * + * @throws \RuntimeException + */ + public function walkSelectStatement(SelectStatement $AST) + { + if ($this->platform->getName() === "mssql") { + $AST->orderByClause = null; + } + + $sql = parent::walkSelectStatement($AST); + + // Find out the SQL alias of the identifier column of the root entity + // It may be possible to make this work with multiple root entities but that + // would probably require issuing multiple queries or doing a UNION SELECT + // so for now, It's not supported. + + // Get the root entity and alias from the AST fromClause + $from = $AST->fromClause->identificationVariableDeclarations; + if (count($from) > 1) { + throw new \RuntimeException("Cannot count query which selects two FROM components, cannot make distinction"); + } + + $fromRoot = reset($from); + $rootAlias = $fromRoot->rangeVariableDeclaration->aliasIdentificationVariable; + $rootClass = $this->queryComponents[$rootAlias]['metadata']; + $rootIdentifier = $rootClass->identifier; + + // For every identifier, find out the SQL alias by combing through the ResultSetMapping + $sqlIdentifier = array(); + foreach ($rootIdentifier as $property) { + if (isset($rootClass->fieldMappings[$property])) { + foreach (array_keys($this->rsm->fieldMappings, $property) as $alias) { + if ($this->rsm->columnOwnerMap[$alias] == $rootAlias) { + $sqlIdentifier[$property] = $alias; + } + } + } + + if (isset($rootClass->associationMappings[$property])) { + $joinColumn = $rootClass->associationMappings[$property]['joinColumns'][0]['name']; + + foreach (array_keys($this->rsm->metaMappings, $joinColumn) as $alias) { + if ($this->rsm->columnOwnerMap[$alias] == $rootAlias) { + $sqlIdentifier[$property] = $alias; + } + } + } + } + + if (count($rootIdentifier) != count($sqlIdentifier)) { + throw new \RuntimeException(sprintf( + 'Not all identifier properties can be found in the ResultSetMapping: %s', + implode(', ', array_diff($rootIdentifier, array_keys($sqlIdentifier))) + )); + } + + // Build the counter query + return sprintf('SELECT %s AS dctrn_count FROM (SELECT DISTINCT %s FROM (%s) dctrn_result) dctrn_table', + $this->platform->getCountExpression('*'), + implode(', ', $sqlIdentifier), + $sql + ); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/CountWalker.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/CountWalker.php new file mode 100644 index 0000000000000000000000000000000000000000..ff0c6b363313ea36cfce3adaa84cd863e83dce88 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/CountWalker.php @@ -0,0 +1,88 @@ + + * @copyright Copyright (c) 2010 David Abdemoulaie (http://hobodave.com/) + * @license http://hobodave.com/license.txt New BSD License + */ +class CountWalker extends TreeWalkerAdapter +{ + /** + * Distinct mode hint name. + */ + const HINT_DISTINCT = 'doctrine_paginator.distinct'; + + /** + * Walks down a SelectStatement AST node, modifying it to retrieve a COUNT. + * + * @param SelectStatement $AST + * + * @return void + * + * @throws \RuntimeException + */ + public function walkSelectStatement(SelectStatement $AST) + { + if ($AST->havingClause) { + throw new \RuntimeException('Cannot count query that uses a HAVING clause. Use the output walkers for pagination'); + } + + $queryComponents = $this->_getQueryComponents(); + // Get the root entity and alias from the AST fromClause + $from = $AST->fromClause->identificationVariableDeclarations; + + if (count($from) > 1) { + throw new \RuntimeException("Cannot count query which selects two FROM components, cannot make distinction"); + } + + $fromRoot = reset($from); + $rootAlias = $fromRoot->rangeVariableDeclaration->aliasIdentificationVariable; + $rootClass = $queryComponents[$rootAlias]['metadata']; + $identifierFieldName = $rootClass->getSingleIdentifierFieldName(); + + $pathType = PathExpression::TYPE_STATE_FIELD; + if (isset($rootClass->associationMappings[$identifierFieldName])) { + $pathType = PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION; + } + + $pathExpression = new PathExpression( + PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias, + $identifierFieldName + ); + $pathExpression->type = $pathType; + + $distinct = $this->_getQuery()->getHint(self::HINT_DISTINCT); + $AST->selectClause->selectExpressions = array( + new SelectExpression( + new AggregateExpression('count', $pathExpression, $distinct), null + ) + ); + + // ORDER BY is not needed, only increases query execution through unnecessary sorting. + $AST->orderByClause = null; + } +} + diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php new file mode 100644 index 0000000000000000000000000000000000000000..b1d7bd9eb8d3cd82c8e9a7768e29cf44d6df41cc --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php @@ -0,0 +1,589 @@ + FROM () LIMIT x OFFSET y + * + * Works with composite keys but cannot deal with queries that have multiple + * root entities (e.g. `SELECT f, b from Foo, Bar`) + * + * @author Sander Marechal + */ +class LimitSubqueryOutputWalker extends SqlWalker +{ + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $platform; + + /** + * @var \Doctrine\ORM\Query\ResultSetMapping + */ + private $rsm; + + /** + * @var array + */ + private $queryComponents; + + /** + * @var int + */ + private $firstResult; + + /** + * @var int + */ + private $maxResults; + + /** + * @var \Doctrine\ORM\EntityManager + */ + private $em; + + /** + * The quote strategy. + * + * @var \Doctrine\ORM\Mapping\QuoteStrategy + */ + private $quoteStrategy; + + /** + * @var array + */ + private $orderByPathExpressions = []; + + /** + * @var bool We don't want to add path expressions from sub-selects into the select clause of the containing query. + * This state flag simply keeps track on whether we are walking on a subquery or not + */ + private $inSubSelect = false; + + /** + * Constructor. + * + * Stores various parameters that are otherwise unavailable + * because Doctrine\ORM\Query\SqlWalker keeps everything private without + * accessors. + * + * @param \Doctrine\ORM\Query $query + * @param \Doctrine\ORM\Query\ParserResult $parserResult + * @param array $queryComponents + */ + public function __construct($query, $parserResult, array $queryComponents) + { + $this->platform = $query->getEntityManager()->getConnection()->getDatabasePlatform(); + $this->rsm = $parserResult->getResultSetMapping(); + $this->queryComponents = $queryComponents; + + // Reset limit and offset + $this->firstResult = $query->getFirstResult(); + $this->maxResults = $query->getMaxResults(); + $query->setFirstResult(null)->setMaxResults(null); + + $this->em = $query->getEntityManager(); + $this->quoteStrategy = $this->em->getConfiguration()->getQuoteStrategy(); + + parent::__construct($query, $parserResult, $queryComponents); + } + + /** + * Check if the platform supports the ROW_NUMBER window function. + * + * @return bool + */ + private function platformSupportsRowNumber() + { + return $this->platform instanceof PostgreSqlPlatform + || $this->platform instanceof SQLServerPlatform + || $this->platform instanceof OraclePlatform + || $this->platform instanceof SQLAnywherePlatform + || $this->platform instanceof DB2Platform + || (method_exists($this->platform, 'supportsRowNumberFunction') + && $this->platform->supportsRowNumberFunction()); + } + + /** + * Rebuilds a select statement's order by clause for use in a + * ROW_NUMBER() OVER() expression. + * + * @param SelectStatement $AST + */ + private function rebuildOrderByForRowNumber(SelectStatement $AST) + { + $orderByClause = $AST->orderByClause; + $selectAliasToExpressionMap = []; + // Get any aliases that are available for select expressions. + foreach ($AST->selectClause->selectExpressions as $selectExpression) { + $selectAliasToExpressionMap[$selectExpression->fieldIdentificationVariable] = $selectExpression->expression; + } + + // Rebuild string orderby expressions to use the select expression they're referencing + foreach ($orderByClause->orderByItems as $orderByItem) { + if (is_string($orderByItem->expression) && isset($selectAliasToExpressionMap[$orderByItem->expression])) { + $orderByItem->expression = $selectAliasToExpressionMap[$orderByItem->expression]; + } + } + $func = new RowNumberOverFunction('dctrn_rownum'); + $func->orderByClause = $AST->orderByClause; + $AST->selectClause->selectExpressions[] = new SelectExpression($func, 'dctrn_rownum', true); + + // No need for an order by clause, we'll order by rownum in the outer query. + $AST->orderByClause = null; + } + + /** + * Walks down a SelectStatement AST node, wrapping it in a SELECT DISTINCT. + * + * @param SelectStatement $AST + * + * @return string + * + * @throws \RuntimeException + */ + public function walkSelectStatement(SelectStatement $AST) + { + if ($this->platformSupportsRowNumber()) { + return $this->walkSelectStatementWithRowNumber($AST); + } + return $this->walkSelectStatementWithoutRowNumber($AST); + } + + /** + * Walks down a SelectStatement AST node, wrapping it in a SELECT DISTINCT. + * This method is for use with platforms which support ROW_NUMBER. + * + * @param SelectStatement $AST + * + * @return string + * + * @throws \RuntimeException + */ + public function walkSelectStatementWithRowNumber(SelectStatement $AST) + { + $hasOrderBy = false; + $outerOrderBy = ' ORDER BY dctrn_minrownum ASC'; + $orderGroupBy = ''; + if ($AST->orderByClause instanceof OrderByClause) { + $hasOrderBy = true; + $this->rebuildOrderByForRowNumber($AST); + } + + $innerSql = $this->getInnerSQL($AST); + + $sqlIdentifier = $this->getSQLIdentifier($AST); + + if ($hasOrderBy) { + $orderGroupBy = ' GROUP BY ' . implode(', ', $sqlIdentifier); + $sqlIdentifier[] = 'MIN(' . $this->walkResultVariable('dctrn_rownum') . ') AS dctrn_minrownum'; + } + + // Build the counter query + $sql = sprintf( + 'SELECT DISTINCT %s FROM (%s) dctrn_result', + implode(', ', $sqlIdentifier), + $innerSql + ); + + if ($hasOrderBy) { + $sql .= $orderGroupBy . $outerOrderBy; + } + + // Apply the limit and offset. + $sql = $this->platform->modifyLimitQuery( + $sql, + $this->maxResults, + $this->firstResult + ); + + // Add the columns to the ResultSetMapping. It's not really nice but + // it works. Preferably I'd clear the RSM or simply create a new one + // but that is not possible from inside the output walker, so we dirty + // up the one we have. + foreach ($sqlIdentifier as $property => $alias) { + $this->rsm->addScalarResult($alias, $property); + } + + return $sql; + } + + /** + * Walks down a SelectStatement AST node, wrapping it in a SELECT DISTINCT. + * This method is for platforms which DO NOT support ROW_NUMBER. + * + * @param SelectStatement $AST + * @param bool $addMissingItemsFromOrderByToSelect + * + * @return string + * + * @throws \RuntimeException + */ + public function walkSelectStatementWithoutRowNumber(SelectStatement $AST, $addMissingItemsFromOrderByToSelect = true) + { + // We don't want to call this recursively! + if ($AST->orderByClause instanceof OrderByClause && $addMissingItemsFromOrderByToSelect) { + // In the case of ordering a query by columns from joined tables, we + // must add those columns to the select clause of the query BEFORE + // the SQL is generated. + $this->addMissingItemsFromOrderByToSelect($AST); + } + + // Remove order by clause from the inner query + // It will be re-appended in the outer select generated by this method + $orderByClause = $AST->orderByClause; + $AST->orderByClause = null; + + $innerSql = $this->getInnerSQL($AST); + + $sqlIdentifier = $this->getSQLIdentifier($AST); + + // Build the counter query + $sql = sprintf('SELECT DISTINCT %s FROM (%s) dctrn_result', + implode(', ', $sqlIdentifier), $innerSql); + + // http://www.doctrine-project.org/jira/browse/DDC-1958 + $sql = $this->preserveSqlOrdering($sqlIdentifier, $innerSql, $sql, $orderByClause); + + // Apply the limit and offset. + $sql = $this->platform->modifyLimitQuery( + $sql, $this->maxResults, $this->firstResult + ); + + // Add the columns to the ResultSetMapping. It's not really nice but + // it works. Preferably I'd clear the RSM or simply create a new one + // but that is not possible from inside the output walker, so we dirty + // up the one we have. + foreach ($sqlIdentifier as $property => $alias) { + $this->rsm->addScalarResult($alias, $property); + } + + // Restore orderByClause + $AST->orderByClause = $orderByClause; + + return $sql; + } + + /** + * Finds all PathExpressions in an AST's OrderByClause, and ensures that + * the referenced fields are present in the SelectClause of the passed AST. + * + * @param SelectStatement $AST + */ + private function addMissingItemsFromOrderByToSelect(SelectStatement $AST) + { + $this->orderByPathExpressions = []; + + // We need to do this in another walker because otherwise we'll end up + // polluting the state of this one. + $walker = clone $this; + + // This will populate $orderByPathExpressions via + // LimitSubqueryOutputWalker::walkPathExpression, which will be called + // as the select statement is walked. We'll end up with an array of all + // path expressions referenced in the query. + $walker->walkSelectStatementWithoutRowNumber($AST, false); + $orderByPathExpressions = $walker->getOrderByPathExpressions(); + + // Get a map of referenced identifiers to field names. + $selects = []; + foreach ($orderByPathExpressions as $pathExpression) { + $idVar = $pathExpression->identificationVariable; + $field = $pathExpression->field; + if (!isset($selects[$idVar])) { + $selects[$idVar] = []; + } + $selects[$idVar][$field] = true; + } + + // Loop the select clause of the AST and exclude items from $select + // that are already being selected in the query. + foreach ($AST->selectClause->selectExpressions as $selectExpression) { + if ($selectExpression instanceof SelectExpression) { + $idVar = $selectExpression->expression; + if (!is_string($idVar)) { + continue; + } + $field = $selectExpression->fieldIdentificationVariable; + if ($field === null) { + // No need to add this select, as we're already fetching the whole object. + unset($selects[$idVar]); + } else { + unset($selects[$idVar][$field]); + } + } + } + + // Add select items which were not excluded to the AST's select clause. + foreach ($selects as $idVar => $fields) { + $AST->selectClause->selectExpressions[] = new SelectExpression(new PartialObjectExpression($idVar, array_keys($fields)), null, true); + } + } + + /** + * Generates new SQL for statements with an order by clause + * + * @param array $sqlIdentifier + * @param string $innerSql + * @param string $sql + * @param OrderByClause $orderByClause + * + * @return string + */ + private function preserveSqlOrdering(array $sqlIdentifier, $innerSql, $sql, $orderByClause) + { + // If the sql statement has an order by clause, we need to wrap it in a new select distinct + // statement + if (! $orderByClause instanceof OrderByClause) { + return $sql; + } + + // Rebuild the order by clause to work in the scope of the new select statement + /* @var array $orderBy an array of rebuilt order by items */ + $orderBy = $this->rebuildOrderByClauseForOuterScope($orderByClause); + + // Build the select distinct statement + $sql = sprintf( + 'SELECT DISTINCT %s FROM (%s) dctrn_result ORDER BY %s', + implode(', ', $sqlIdentifier), + $innerSql, + implode(', ', $orderBy) + ); + + return $sql; + } + + /** + * Generates a new order by clause that works in the scope of a select query wrapping the original + * + * @param OrderByClause $orderByClause + * @return array + */ + private function rebuildOrderByClauseForOuterScope(OrderByClause $orderByClause) + { + $dqlAliasToSqlTableAliasMap + = $searchPatterns + = $replacements + = $dqlAliasToClassMap + = $selectListAdditions + = $orderByItems + = []; + + // Generate DQL alias -> SQL table alias mapping + foreach(array_keys($this->rsm->aliasMap) as $dqlAlias) { + $dqlAliasToClassMap[$dqlAlias] = $class = $this->queryComponents[$dqlAlias]['metadata']; + $dqlAliasToSqlTableAliasMap[$dqlAlias] = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); + } + + // Pattern to find table path expressions in the order by clause + $fieldSearchPattern = '/(?rsm->fieldMappings as $fieldAlias => $fieldName) { + $dqlAliasForFieldAlias = $this->rsm->columnOwnerMap[$fieldAlias]; + $class = $dqlAliasToClassMap[$dqlAliasForFieldAlias]; + + // If the field is from a joined child table, we won't be ordering + // on it. + if (!isset($class->fieldMappings[$fieldName])) { + continue; + } + + $fieldMapping = $class->fieldMappings[$fieldName]; + + // Get the proper column name as will appear in the select list + $columnName = $this->quoteStrategy->getColumnName( + $fieldName, + $dqlAliasToClassMap[$dqlAliasForFieldAlias], + $this->em->getConnection()->getDatabasePlatform() + ); + + // Get the SQL table alias for the entity and field + $sqlTableAliasForFieldAlias = $dqlAliasToSqlTableAliasMap[$dqlAliasForFieldAlias]; + if (isset($fieldMapping['declared']) && $fieldMapping['declared'] !== $class->name) { + // Field was declared in a parent class, so we need to get the proper SQL table alias + // for the joined parent table. + $otherClassMetadata = $this->em->getClassMetadata($fieldMapping['declared']); + if (!$otherClassMetadata->isMappedSuperclass) { + $sqlTableAliasForFieldAlias = $this->getSQLTableAlias($otherClassMetadata->getTableName(), $dqlAliasForFieldAlias); + + } + } + + // Compose search/replace patterns + $searchPatterns[] = sprintf($fieldSearchPattern, $sqlTableAliasForFieldAlias, $columnName); + $replacements[] = $fieldAlias; + } + + foreach($orderByClause->orderByItems as $orderByItem) { + // Walk order by item to get string representation of it + $orderByItemString = $this->walkOrderByItem($orderByItem); + + // Replace path expressions in the order by clause with their column alias + $orderByItemString = preg_replace($searchPatterns, $replacements, $orderByItemString); + + $orderByItems[] = $orderByItemString; + } + + return $orderByItems; + } + + /** + * getter for $orderByPathExpressions + * + * @return array + */ + public function getOrderByPathExpressions() + { + return $this->orderByPathExpressions; + } + + /** + * @param SelectStatement $AST + * + * @return string + * + * @throws \Doctrine\ORM\OptimisticLockException + * @throws \Doctrine\ORM\Query\QueryException + */ + private function getInnerSQL(SelectStatement $AST) + { + // Set every select expression as visible(hidden = false) to + // make $AST have scalar mappings properly - this is relevant for referencing selected + // fields from outside the subquery, for example in the ORDER BY segment + $hiddens = []; + + foreach ($AST->selectClause->selectExpressions as $idx => $expr) { + $hiddens[$idx] = $expr->hiddenAliasResultVariable; + $expr->hiddenAliasResultVariable = false; + } + + $innerSql = parent::walkSelectStatement($AST); + + // Restore hiddens + foreach ($AST->selectClause->selectExpressions as $idx => $expr) { + $expr->hiddenAliasResultVariable = $hiddens[$idx]; + } + + return $innerSql; + } + + /** + * @param SelectStatement $AST + * + * @return array + */ + private function getSQLIdentifier(SelectStatement $AST) + { + // Find out the SQL alias of the identifier column of the root entity. + // It may be possible to make this work with multiple root entities but that + // would probably require issuing multiple queries or doing a UNION SELECT. + // So for now, it's not supported. + + // Get the root entity and alias from the AST fromClause. + $from = $AST->fromClause->identificationVariableDeclarations; + if (count($from) !== 1) { + throw new \RuntimeException('Cannot count query which selects two FROM components, cannot make distinction'); + } + + $fromRoot = reset($from); + $rootAlias = $fromRoot->rangeVariableDeclaration->aliasIdentificationVariable; + $rootClass = $this->queryComponents[$rootAlias]['metadata']; + $rootIdentifier = $rootClass->identifier; + + // For every identifier, find out the SQL alias by combing through the ResultSetMapping + $sqlIdentifier = []; + foreach ($rootIdentifier as $property) { + if (isset($rootClass->fieldMappings[$property])) { + foreach (array_keys($this->rsm->fieldMappings, $property) as $alias) { + if ($this->rsm->columnOwnerMap[$alias] == $rootAlias) { + $sqlIdentifier[$property] = $alias; + } + } + } + + if (isset($rootClass->associationMappings[$property])) { + $joinColumn = $rootClass->associationMappings[$property]['joinColumns'][0]['name']; + + foreach (array_keys($this->rsm->metaMappings, $joinColumn) as $alias) { + if ($this->rsm->columnOwnerMap[$alias] == $rootAlias) { + $sqlIdentifier[$property] = $alias; + } + } + } + } + + if (count($sqlIdentifier) === 0) { + throw new \RuntimeException('The Paginator does not support Queries which only yield ScalarResults.'); + } + + if (count($rootIdentifier) != count($sqlIdentifier)) { + throw new \RuntimeException(sprintf( + 'Not all identifier properties can be found in the ResultSetMapping: %s', + implode(', ', array_diff($rootIdentifier, array_keys($sqlIdentifier))) + )); + } + + return $sqlIdentifier; + } + + /** + * {@inheritdoc} + */ + public function walkPathExpression($pathExpr) + { + if (!$this->inSubSelect && !$this->platformSupportsRowNumber() && !in_array($pathExpr, $this->orderByPathExpressions)) { + $this->orderByPathExpressions[] = $pathExpr; + } + + return parent::walkPathExpression($pathExpr); + } + + /** + * {@inheritdoc} + */ + public function walkSubSelect($subselect) + { + $this->inSubSelect = true; + + $sql = parent::walkSubselect($subselect); + + $this->inSubSelect = false; + + return $sql; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php new file mode 100644 index 0000000000000000000000000000000000000000..e65cfcaeb6ebc9dbb74bf56415eca42ea0ca1ae4 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php @@ -0,0 +1,175 @@ + + * @copyright Copyright (c) 2010 David Abdemoulaie (http://hobodave.com/) + * @license http://hobodave.com/license.txt New BSD License + */ + +namespace Doctrine\ORM\Tools\Pagination; + +use Doctrine\DBAL\Types\Type; +use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\ORM\ORMException; +use Doctrine\ORM\Query; +use Doctrine\ORM\Query\TreeWalkerAdapter; +use Doctrine\ORM\Query\AST\Functions\IdentityFunction; +use Doctrine\ORM\Query\AST\PathExpression; +use Doctrine\ORM\Query\AST\SelectExpression; +use Doctrine\ORM\Query\AST\SelectStatement; + +/** + * Replaces the selectClause of the AST with a SELECT DISTINCT root.id equivalent. + * + * @category DoctrineExtensions + * @package DoctrineExtensions\Paginate + * @author David Abdemoulaie + * @copyright Copyright (c) 2010 David Abdemoulaie (http://hobodave.com/) + * @license http://hobodave.com/license.txt New BSD License + */ +class LimitSubqueryWalker extends TreeWalkerAdapter +{ + /** + * ID type hint. + */ + const IDENTIFIER_TYPE = 'doctrine_paginator.id.type'; + + /** + * Counter for generating unique order column aliases. + * + * @var int + */ + private $_aliasCounter = 0; + + /** + * Walks down a SelectStatement AST node, modifying it to retrieve DISTINCT ids + * of the root Entity. + * + * @param SelectStatement $AST + * + * @return void + * + * @throws \RuntimeException + */ + public function walkSelectStatement(SelectStatement $AST) + { + $queryComponents = $this->_getQueryComponents(); + // Get the root entity and alias from the AST fromClause + $from = $AST->fromClause->identificationVariableDeclarations; + $fromRoot = reset($from); + $rootAlias = $fromRoot->rangeVariableDeclaration->aliasIdentificationVariable; + $rootClass = $queryComponents[$rootAlias]['metadata']; + $selectExpressions = array(); + + $this->validate($AST); + + foreach ($queryComponents as $dqlAlias => $qComp) { + // Preserve mixed data in query for ordering. + if (isset($qComp['resultVariable'])) { + $selectExpressions[] = new SelectExpression($qComp['resultVariable'], $dqlAlias); + continue; + } + } + + $identifier = $rootClass->getSingleIdentifierFieldName(); + + if (isset($rootClass->associationMappings[$identifier])) { + throw new \RuntimeException("Paginating an entity with foreign key as identifier only works when using the Output Walkers. Call Paginator#setUseOutputWalkers(true) before iterating the paginator."); + } + + $this->_getQuery()->setHint( + self::IDENTIFIER_TYPE, + Type::getType($rootClass->getTypeOfField($identifier)) + ); + + $pathExpression = new PathExpression( + PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, + $rootAlias, + $identifier + ); + $pathExpression->type = PathExpression::TYPE_STATE_FIELD; + + array_unshift($selectExpressions, new SelectExpression($pathExpression, '_dctrn_id')); + $AST->selectClause->selectExpressions = $selectExpressions; + + if (isset($AST->orderByClause)) { + foreach ($AST->orderByClause->orderByItems as $item) { + if ( ! $item->expression instanceof PathExpression) { + continue; + } + + $AST->selectClause->selectExpressions[] = new SelectExpression( + $this->createSelectExpressionItem($item->expression), + '_dctrn_ord' . $this->_aliasCounter++ + ); + } + } + + $AST->selectClause->isDistinct = true; + } + + /** + * Validate the AST to ensure that this walker is able to properly manipulate it. + * + * @param SelectStatement $AST + */ + private function validate(SelectStatement $AST) + { + // Prevent LimitSubqueryWalker from being used with queries that include + // a limit, a fetched to-many join, and an order by condition that + // references a column from the fetch joined table. + $queryComponents = $this->getQueryComponents(); + $query = $this->_getQuery(); + $from = $AST->fromClause->identificationVariableDeclarations; + $fromRoot = reset($from); + + if ($query instanceof Query + && $query->getMaxResults() + && $AST->orderByClause + && count($fromRoot->joins)) { + // Check each orderby item. + // TODO: check complex orderby items too... + foreach ($AST->orderByClause->orderByItems as $orderByItem) { + $expression = $orderByItem->expression; + if ($orderByItem->expression instanceof PathExpression + && isset($queryComponents[$expression->identificationVariable])) { + $queryComponent = $queryComponents[$expression->identificationVariable]; + if (isset($queryComponent['parent']) + && $queryComponent['relation']['type'] & ClassMetadataInfo::TO_MANY) { + throw new \RuntimeException("Cannot select distinct identifiers from query with LIMIT and ORDER BY on a column from a fetch joined to-many association. Use output walkers."); + } + } + } + } + } + + /** + * Retrieve either an IdentityFunction (IDENTITY(u.assoc)) or a state field (u.name). + * + * @param \Doctrine\ORM\Query\AST\PathExpression $pathExpression + * + * @return \Doctrine\ORM\Query\AST\Functions\IdentityFunction + */ + private function createSelectExpressionItem(PathExpression $pathExpression) + { + if ($pathExpression->type === PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION) { + $identity = new IdentityFunction('identity'); + + $identity->pathExpression = clone $pathExpression; + + return $identity; + } + + return clone $pathExpression; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php new file mode 100644 index 0000000000000000000000000000000000000000..c5b0b368600fe98d70769723c0a842f78e4c7673 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php @@ -0,0 +1,279 @@ +. + */ + +namespace Doctrine\ORM\Tools\Pagination; + +use Doctrine\ORM\Query\Parser; +use Doctrine\ORM\QueryBuilder; +use Doctrine\ORM\Query; +use Doctrine\ORM\Query\ResultSetMapping; +use Doctrine\ORM\NoResultException; + +/** + * The paginator can handle various complex scenarios with DQL. + * + * @author Pablo Díez + * @author Benjamin Eberlei + * @license New BSD + */ +class Paginator implements \Countable, \IteratorAggregate +{ + /** + * @var Query + */ + private $query; + + /** + * @var bool + */ + private $fetchJoinCollection; + + /** + * @var bool|null + */ + private $useOutputWalkers; + + /** + * @var int + */ + private $count; + + /** + * Constructor. + * + * @param Query|QueryBuilder $query A Doctrine ORM query or query builder. + * @param boolean $fetchJoinCollection Whether the query joins a collection (true by default). + */ + public function __construct($query, $fetchJoinCollection = true) + { + if ($query instanceof QueryBuilder) { + $query = $query->getQuery(); + } + + $this->query = $query; + $this->fetchJoinCollection = (Boolean) $fetchJoinCollection; + } + + /** + * Returns the query. + * + * @return Query + */ + public function getQuery() + { + return $this->query; + } + + /** + * Returns whether the query joins a collection. + * + * @return boolean Whether the query joins a collection. + */ + public function getFetchJoinCollection() + { + return $this->fetchJoinCollection; + } + + /** + * Returns whether the paginator will use an output walker. + * + * @return bool|null + */ + public function getUseOutputWalkers() + { + return $this->useOutputWalkers; + } + + /** + * Sets whether the paginator will use an output walker. + * + * @param bool|null $useOutputWalkers + * + * @return $this + */ + public function setUseOutputWalkers($useOutputWalkers) + { + $this->useOutputWalkers = $useOutputWalkers; + return $this; + } + + /** + * {@inheritdoc} + */ + public function count() + { + if ($this->count === null) { + try { + $this->count = array_sum(array_map('current', $this->getCountQuery()->getScalarResult())); + } catch(NoResultException $e) { + $this->count = 0; + } + } + + return $this->count; + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + $offset = $this->query->getFirstResult(); + $length = $this->query->getMaxResults(); + + if ($this->fetchJoinCollection) { + $subQuery = $this->cloneQuery($this->query); + + if ($this->useOutputWalker($subQuery)) { + $subQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, 'Doctrine\ORM\Tools\Pagination\LimitSubqueryOutputWalker'); + } else { + $this->appendTreeWalker($subQuery, 'Doctrine\ORM\Tools\Pagination\LimitSubqueryWalker'); + } + + $subQuery->setFirstResult($offset)->setMaxResults($length); + + $ids = array_map('current', $subQuery->getScalarResult()); + + $whereInQuery = $this->cloneQuery($this->query); + // don't do this for an empty id array + if (count($ids) == 0) { + return new \ArrayIterator(array()); + } + + $this->appendTreeWalker($whereInQuery, 'Doctrine\ORM\Tools\Pagination\WhereInWalker'); + $whereInQuery->setHint(WhereInWalker::HINT_PAGINATOR_ID_COUNT, count($ids)); + $whereInQuery->setFirstResult(null)->setMaxResults(null); + $whereInQuery->setParameter(WhereInWalker::PAGINATOR_ID_ALIAS, $ids); + $whereInQuery->setCacheable($this->query->isCacheable()); + + $result = $whereInQuery->getResult($this->query->getHydrationMode()); + } else { + $result = $this->cloneQuery($this->query) + ->setMaxResults($length) + ->setFirstResult($offset) + ->setCacheable($this->query->isCacheable()) + ->getResult($this->query->getHydrationMode()) + ; + } + + return new \ArrayIterator($result); + } + + /** + * Clones a query. + * + * @param Query $query The query. + * + * @return Query The cloned query. + */ + private function cloneQuery(Query $query) + { + /* @var $cloneQuery Query */ + $cloneQuery = clone $query; + + $cloneQuery->setParameters(clone $query->getParameters()); + $cloneQuery->setCacheable(false); + + foreach ($query->getHints() as $name => $value) { + $cloneQuery->setHint($name, $value); + } + + return $cloneQuery; + } + + /** + * Determines whether to use an output walker for the query. + * + * @param Query $query The query. + * + * @return bool + */ + private function useOutputWalker(Query $query) + { + if ($this->useOutputWalkers === null) { + return (Boolean) $query->getHint(Query::HINT_CUSTOM_OUTPUT_WALKER) == false; + } + + return $this->useOutputWalkers; + } + + /** + * Appends a custom tree walker to the tree walkers hint. + * + * @param Query $query + * @param string $walkerClass + */ + private function appendTreeWalker(Query $query, $walkerClass) + { + $hints = $query->getHint(Query::HINT_CUSTOM_TREE_WALKERS); + + if ($hints === false) { + $hints = array(); + } + + $hints[] = $walkerClass; + $query->setHint(Query::HINT_CUSTOM_TREE_WALKERS, $hints); + } + + /** + * Returns Query prepared to count. + * + * @return Query + */ + private function getCountQuery() + { + /* @var $countQuery Query */ + $countQuery = $this->cloneQuery($this->query); + + if ( ! $countQuery->hasHint(CountWalker::HINT_DISTINCT)) { + $countQuery->setHint(CountWalker::HINT_DISTINCT, true); + } + + if ($this->useOutputWalker($countQuery)) { + $platform = $countQuery->getEntityManager()->getConnection()->getDatabasePlatform(); // law of demeter win + + $rsm = new ResultSetMapping(); + $rsm->addScalarResult($platform->getSQLResultCasing('dctrn_count'), 'count'); + + $countQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, 'Doctrine\ORM\Tools\Pagination\CountOutputWalker'); + $countQuery->setResultSetMapping($rsm); + } else { + $this->appendTreeWalker($countQuery, 'Doctrine\ORM\Tools\Pagination\CountWalker'); + } + + $countQuery->setFirstResult(null)->setMaxResults(null); + + $parser = new Parser($countQuery); + $parameterMappings = $parser->parse()->getParameterMappings(); + /* @var $parameters \Doctrine\Common\Collections\Collection|\Doctrine\ORM\Query\Parameter[] */ + $parameters = $countQuery->getParameters(); + + foreach ($parameters as $key => $parameter) { + $parameterName = $parameter->getName(); + + if( ! (isset($parameterMappings[$parameterName]) || array_key_exists($parameterName, $parameterMappings))) { + unset($parameters[$key]); + } + } + + $countQuery->setParameters($parameters); + + return $countQuery; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/RowNumberOverFunction.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/RowNumberOverFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..ca3e57bea0aa259fbf581ef591326a87a3f2a73e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/RowNumberOverFunction.php @@ -0,0 +1,61 @@ +. + */ + +namespace Doctrine\ORM\Tools\Pagination; + +use Doctrine\ORM\ORMException; +use Doctrine\ORM\Query\AST\Functions\FunctionNode; + + +/** + * RowNumberOverFunction + * + * Provides ROW_NUMBER() OVER(ORDER BY...) construct for use in LimitSubqueryOutputWalker + * + * @since 2.5 + * @author Bill Schaller + */ +class RowNumberOverFunction extends FunctionNode +{ + /** + * @var \Doctrine\ORM\Query\AST\OrderByClause + */ + public $orderByClause; + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return 'ROW_NUMBER() OVER(' . trim($sqlWalker->walkOrderByClause( + $this->orderByClause + )) . ')'; + } + + /** + * @override + * + * @throws ORMException + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + throw new ORMException("The RowNumberOverFunction is not intended for, nor is it enabled for use in DQL."); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php new file mode 100644 index 0000000000000000000000000000000000000000..9f42a1eea7ad17e19743e544c88105582529c8b4 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php @@ -0,0 +1,142 @@ + + * @copyright Copyright (c) 2010 David Abdemoulaie (http://hobodave.com/) + * @license http://hobodave.com/license.txt New BSD License + */ + +namespace Doctrine\ORM\Tools\Pagination; + +use Doctrine\ORM\Query\AST\ArithmeticExpression; +use Doctrine\ORM\Query\AST\SimpleArithmeticExpression; +use Doctrine\ORM\Query\TreeWalkerAdapter; +use Doctrine\ORM\Query\AST\SelectStatement; +use Doctrine\ORM\Query\AST\PathExpression; +use Doctrine\ORM\Query\AST\InExpression; +use Doctrine\ORM\Query\AST\NullComparisonExpression; +use Doctrine\ORM\Query\AST\InputParameter; +use Doctrine\ORM\Query\AST\ConditionalPrimary; +use Doctrine\ORM\Query\AST\ConditionalTerm; +use Doctrine\ORM\Query\AST\ConditionalExpression; +use Doctrine\ORM\Query\AST\ConditionalFactor; +use Doctrine\ORM\Query\AST\WhereClause; + +/** + * Replaces the whereClause of the AST with a WHERE id IN (:foo_1, :foo_2) equivalent. + * + * @category DoctrineExtensions + * @package DoctrineExtensions\Paginate + * @author David Abdemoulaie + * @copyright Copyright (c) 2010 David Abdemoulaie (http://hobodave.com/) + * @license http://hobodave.com/license.txt New BSD License + */ +class WhereInWalker extends TreeWalkerAdapter +{ + /** + * ID Count hint name. + */ + const HINT_PAGINATOR_ID_COUNT = 'doctrine.id.count'; + + /** + * Primary key alias for query. + */ + const PAGINATOR_ID_ALIAS = 'dpid'; + + /** + * Replaces the whereClause in the AST. + * + * Generates a clause equivalent to WHERE IN (:dpid_1, :dpid_2, ...) + * + * The parameter namespace (dpid) is defined by + * the PAGINATOR_ID_ALIAS + * + * The total number of parameters is retrieved from + * the HINT_PAGINATOR_ID_COUNT query hint. + * + * @param SelectStatement $AST + * + * @return void + * + * @throws \RuntimeException + */ + public function walkSelectStatement(SelectStatement $AST) + { + $queryComponents = $this->_getQueryComponents(); + // Get the root entity and alias from the AST fromClause + $from = $AST->fromClause->identificationVariableDeclarations; + + if (count($from) > 1) { + throw new \RuntimeException("Cannot count query which selects two FROM components, cannot make distinction"); + } + + $fromRoot = reset($from); + $rootAlias = $fromRoot->rangeVariableDeclaration->aliasIdentificationVariable; + $rootClass = $queryComponents[$rootAlias]['metadata']; + $identifierFieldName = $rootClass->getSingleIdentifierFieldName(); + + $pathType = PathExpression::TYPE_STATE_FIELD; + if (isset($rootClass->associationMappings[$identifierFieldName])) { + $pathType = PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION; + } + + $pathExpression = new PathExpression(PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias, $identifierFieldName); + $pathExpression->type = $pathType; + + $count = $this->_getQuery()->getHint(self::HINT_PAGINATOR_ID_COUNT); + + if ($count > 0) { + $arithmeticExpression = new ArithmeticExpression(); + $arithmeticExpression->simpleArithmeticExpression = new SimpleArithmeticExpression( + array($pathExpression) + ); + $expression = new InExpression($arithmeticExpression); + $expression->literals[] = new InputParameter(":" . self::PAGINATOR_ID_ALIAS); + + } else { + $expression = new NullComparisonExpression($pathExpression); + $expression->not = false; + } + + $conditionalPrimary = new ConditionalPrimary; + $conditionalPrimary->simpleConditionalExpression = $expression; + if ($AST->whereClause) { + if ($AST->whereClause->conditionalExpression instanceof ConditionalTerm) { + $AST->whereClause->conditionalExpression->conditionalFactors[] = $conditionalPrimary; + } elseif ($AST->whereClause->conditionalExpression instanceof ConditionalPrimary) { + $AST->whereClause->conditionalExpression = new ConditionalExpression(array( + new ConditionalTerm(array( + $AST->whereClause->conditionalExpression, + $conditionalPrimary + )) + )); + } elseif ($AST->whereClause->conditionalExpression instanceof ConditionalExpression + || $AST->whereClause->conditionalExpression instanceof ConditionalFactor + ) { + $tmpPrimary = new ConditionalPrimary; + $tmpPrimary->conditionalExpression = $AST->whereClause->conditionalExpression; + $AST->whereClause->conditionalExpression = new ConditionalTerm(array( + $tmpPrimary, + $conditionalPrimary + )); + } + } else { + $AST->whereClause = new WhereClause( + new ConditionalExpression(array( + new ConditionalTerm(array( + $conditionalPrimary + )) + )) + ); + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php new file mode 100644 index 0000000000000000000000000000000000000000..574c9c28e12cbfd90f037e45c4d4a0515f284d96 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php @@ -0,0 +1,144 @@ +. + */ + +namespace Doctrine\ORM\Tools; + +use Doctrine\ORM\Event\LoadClassMetadataEventArgs; +use Doctrine\ORM\Event\OnClassMetadataNotFoundEventArgs; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\Common\EventSubscriber; +use Doctrine\ORM\Events; + +/** + * ResolveTargetEntityListener + * + * Mechanism to overwrite interfaces or classes specified as association + * targets. + * + * @author Benjamin Eberlei + * @since 2.2 + */ +class ResolveTargetEntityListener implements EventSubscriber +{ + /** + * @var array[] indexed by original entity name + */ + private $resolveTargetEntities = array(); + + /** + * {@inheritDoc} + */ + public function getSubscribedEvents() + { + return array( + Events::loadClassMetadata, + Events::onClassMetadataNotFound + ); + } + + /** + * Adds a target-entity class name to resolve to a new class name. + * + * @param string $originalEntity + * @param string $newEntity + * @param array $mapping + * + * @return void + */ + public function addResolveTargetEntity($originalEntity, $newEntity, array $mapping) + { + $mapping['targetEntity'] = ltrim($newEntity, "\\"); + $this->resolveTargetEntities[ltrim($originalEntity, "\\")] = $mapping; + } + + /** + * @param OnClassMetadataNotFoundEventArgs $args + * + * @internal this is an event callback, and should not be called directly + * + * @return void + */ + public function onClassMetadataNotFound(OnClassMetadataNotFoundEventArgs $args) + { + if (array_key_exists($args->getClassName(), $this->resolveTargetEntities)) { + $args->setFoundMetadata( + $args + ->getObjectManager() + ->getClassMetadata($this->resolveTargetEntities[$args->getClassname()]['targetEntity']) + ); + } + } + + /** + * Processes event and resolves new target entity names. + * + * @param LoadClassMetadataEventArgs $args + * + * @return void + * + * @internal this is an event callback, and should not be called directly + */ + public function loadClassMetadata(LoadClassMetadataEventArgs $args) + { + /* @var $cm \Doctrine\ORM\Mapping\ClassMetadata */ + $cm = $args->getClassMetadata(); + + foreach ($cm->associationMappings as $mapping) { + if (isset($this->resolveTargetEntities[$mapping['targetEntity']])) { + $this->remapAssociation($cm, $mapping); + } + } + + foreach ($this->resolveTargetEntities as $interface => $data) { + if ($data['targetEntity'] == $cm->getName()) { + $args->getEntityManager()->getMetadataFactory()->setMetadataFor($interface, $cm); + } + } + } + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadataInfo $classMetadata + * @param array $mapping + * + * @return void + */ + private function remapAssociation($classMetadata, $mapping) + { + $newMapping = $this->resolveTargetEntities[$mapping['targetEntity']]; + $newMapping = array_replace_recursive($mapping, $newMapping); + $newMapping['fieldName'] = $mapping['fieldName']; + + unset($classMetadata->associationMappings[$mapping['fieldName']]); + + switch ($mapping['type']) { + case ClassMetadata::MANY_TO_MANY: + $classMetadata->mapManyToMany($newMapping); + break; + case ClassMetadata::MANY_TO_ONE: + $classMetadata->mapManyToOne($newMapping); + break; + case ClassMetadata::ONE_TO_MANY: + $classMetadata->mapOneToMany($newMapping); + break; + case ClassMetadata::ONE_TO_ONE: + $classMetadata->mapOneToOne($newMapping); + break; + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaTool.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaTool.php new file mode 100644 index 0000000000000000000000000000000000000000..b8e62739bd0dae9abf28937f01943d3b9f1b325c --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaTool.php @@ -0,0 +1,874 @@ +. + */ + +namespace Doctrine\ORM\Tools; + +use Doctrine\ORM\ORMException; +use Doctrine\DBAL\Schema\Comparator; +use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector; +use Doctrine\DBAL\Schema\Visitor\RemoveNamespacedAssets; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Tools\Event\GenerateSchemaTableEventArgs; +use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs; + +/** + * The SchemaTool is a tool to create/drop/update database schemas based on + * ClassMetadata class descriptors. + * + * @link www.doctrine-project.org + * @since 2.0 + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Benjamin Eberlei + * @author Stefano Rodriguez + */ +class SchemaTool +{ + /** + * @var \Doctrine\ORM\EntityManagerInterface + */ + private $em; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $platform; + + /** + * The quote strategy. + * + * @var \Doctrine\ORM\Mapping\QuoteStrategy + */ + private $quoteStrategy; + + /** + * Initializes a new SchemaTool instance that uses the connection of the + * provided EntityManager. + * + * @param \Doctrine\ORM\EntityManagerInterface $em + */ + public function __construct(EntityManagerInterface $em) + { + $this->em = $em; + $this->platform = $em->getConnection()->getDatabasePlatform(); + $this->quoteStrategy = $em->getConfiguration()->getQuoteStrategy(); + } + + /** + * Creates the database schema for the given array of ClassMetadata instances. + * + * @param array $classes + * + * @return void + * + * @throws ToolsException + */ + public function createSchema(array $classes) + { + $createSchemaSql = $this->getCreateSchemaSql($classes); + $conn = $this->em->getConnection(); + + foreach ($createSchemaSql as $sql) { + try { + $conn->executeQuery($sql); + } catch (\Exception $e) { + throw ToolsException::schemaToolFailure($sql, $e); + } + } + } + + /** + * Gets the list of DDL statements that are required to create the database schema for + * the given list of ClassMetadata instances. + * + * @param array $classes + * + * @return array The SQL statements needed to create the schema for the classes. + */ + public function getCreateSchemaSql(array $classes) + { + $schema = $this->getSchemaFromMetadata($classes); + return $schema->toSql($this->platform); + } + + /** + * Detects instances of ClassMetadata that don't need to be processed in the SchemaTool context. + * + * @param ClassMetadata $class + * @param array $processedClasses + * + * @return bool + */ + private function processingNotRequired($class, array $processedClasses) + { + return ( + isset($processedClasses[$class->name]) || + $class->isMappedSuperclass || + $class->isEmbeddedClass || + ($class->isInheritanceTypeSingleTable() && $class->name != $class->rootEntityName) + ); + } + + /** + * Creates a Schema instance from a given set of metadata classes. + * + * @param array $classes + * + * @return Schema + * + * @throws \Doctrine\ORM\ORMException + */ + public function getSchemaFromMetadata(array $classes) + { + // Reminder for processed classes, used for hierarchies + $processedClasses = array(); + $eventManager = $this->em->getEventManager(); + $schemaManager = $this->em->getConnection()->getSchemaManager(); + $metadataSchemaConfig = $schemaManager->createSchemaConfig(); + + $metadataSchemaConfig->setExplicitForeignKeyIndexes(false); + $schema = new Schema(array(), array(), $metadataSchemaConfig); + + $addedFks = array(); + $blacklistedFks = array(); + + foreach ($classes as $class) { + /** @var \Doctrine\ORM\Mapping\ClassMetadata $class */ + if ($this->processingNotRequired($class, $processedClasses)) { + continue; + } + + $table = $schema->createTable($this->quoteStrategy->getTableName($class, $this->platform)); + + if ($class->isInheritanceTypeSingleTable()) { + $this->gatherColumns($class, $table); + $this->gatherRelationsSql($class, $table, $schema, $addedFks, $blacklistedFks); + + // Add the discriminator column + $this->addDiscriminatorColumnDefinition($class, $table); + + // Aggregate all the information from all classes in the hierarchy + foreach ($class->parentClasses as $parentClassName) { + // Parent class information is already contained in this class + $processedClasses[$parentClassName] = true; + } + + foreach ($class->subClasses as $subClassName) { + $subClass = $this->em->getClassMetadata($subClassName); + $this->gatherColumns($subClass, $table); + $this->gatherRelationsSql($subClass, $table, $schema, $addedFks, $blacklistedFks); + $processedClasses[$subClassName] = true; + } + } elseif ($class->isInheritanceTypeJoined()) { + // Add all non-inherited fields as columns + $pkColumns = array(); + foreach ($class->fieldMappings as $fieldName => $mapping) { + if ( ! isset($mapping['inherited'])) { + $columnName = $this->quoteStrategy->getColumnName( + $mapping['fieldName'], + $class, + $this->platform + ); + $this->gatherColumn($class, $mapping, $table); + + if ($class->isIdentifier($fieldName)) { + $pkColumns[] = $columnName; + } + } + } + + $this->gatherRelationsSql($class, $table, $schema, $addedFks, $blacklistedFks); + + // Add the discriminator column only to the root table + if ($class->name == $class->rootEntityName) { + $this->addDiscriminatorColumnDefinition($class, $table); + } else { + // Add an ID FK column to child tables + $inheritedKeyColumns = array(); + foreach ($class->identifier as $identifierField) { + $idMapping = $class->fieldMappings[$identifierField]; + if (isset($idMapping['inherited'])) { + $this->gatherColumn($class, $idMapping, $table); + $columnName = $this->quoteStrategy->getColumnName( + $identifierField, + $class, + $this->platform + ); + // TODO: This seems rather hackish, can we optimize it? + $table->getColumn($columnName)->setAutoincrement(false); + + $pkColumns[] = $columnName; + $inheritedKeyColumns[] = $columnName; + } + } + if (!empty($inheritedKeyColumns)) { + // Add a FK constraint on the ID column + $table->addForeignKeyConstraint( + $this->quoteStrategy->getTableName( + $this->em->getClassMetadata($class->rootEntityName), + $this->platform + ), + $inheritedKeyColumns, + $inheritedKeyColumns, + array('onDelete' => 'CASCADE') + ); + } + + } + + $table->setPrimaryKey($pkColumns); + + } elseif ($class->isInheritanceTypeTablePerClass()) { + throw ORMException::notSupported(); + } else { + $this->gatherColumns($class, $table); + $this->gatherRelationsSql($class, $table, $schema, $addedFks, $blacklistedFks); + } + + $pkColumns = array(); + foreach ($class->identifier as $identifierField) { + if (isset($class->fieldMappings[$identifierField])) { + $pkColumns[] = $this->quoteStrategy->getColumnName($identifierField, $class, $this->platform); + } elseif (isset($class->associationMappings[$identifierField])) { + /* @var $assoc \Doctrine\ORM\Mapping\OneToOne */ + $assoc = $class->associationMappings[$identifierField]; + foreach ($assoc['joinColumns'] as $joinColumn) { + $pkColumns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); + } + } + } + + if ( ! $table->hasIndex('primary')) { + $table->setPrimaryKey($pkColumns); + } + + if (isset($class->table['indexes'])) { + foreach ($class->table['indexes'] as $indexName => $indexData) { + if( ! isset($indexData['flags'])) { + $indexData['flags'] = array(); + } + + $table->addIndex($indexData['columns'], is_numeric($indexName) ? null : $indexName, (array)$indexData['flags'], isset($indexData['options']) ? $indexData['options'] : array()); + } + } + + if (isset($class->table['uniqueConstraints'])) { + foreach ($class->table['uniqueConstraints'] as $indexName => $indexData) { + $uniqIndex = new Index($indexName, $indexData['columns'], true, false, [], isset($indexData['options']) ? $indexData['options'] : []); + + foreach ($table->getIndexes() as $tableIndexName => $tableIndex) { + if ($tableIndex->isFullfilledBy($uniqIndex)) { + $table->dropIndex($tableIndexName); + break; + } + } + + $table->addUniqueIndex($indexData['columns'], is_numeric($indexName) ? null : $indexName, isset($indexData['options']) ? $indexData['options'] : array()); + } + } + + if (isset($class->table['options'])) { + foreach ($class->table['options'] as $key => $val) { + $table->addOption($key, $val); + } + } + + $processedClasses[$class->name] = true; + + if ($class->isIdGeneratorSequence() && $class->name == $class->rootEntityName) { + $seqDef = $class->sequenceGeneratorDefinition; + $quotedName = $this->quoteStrategy->getSequenceName($seqDef, $class, $this->platform); + if ( ! $schema->hasSequence($quotedName)) { + $schema->createSequence( + $quotedName, + $seqDef['allocationSize'], + $seqDef['initialValue'] + ); + } + } + + if ($eventManager->hasListeners(ToolEvents::postGenerateSchemaTable)) { + $eventManager->dispatchEvent( + ToolEvents::postGenerateSchemaTable, + new GenerateSchemaTableEventArgs($class, $schema, $table) + ); + } + } + + if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas() ) { + $schema->visit(new RemoveNamespacedAssets()); + } + + if ($eventManager->hasListeners(ToolEvents::postGenerateSchema)) { + $eventManager->dispatchEvent( + ToolEvents::postGenerateSchema, + new GenerateSchemaEventArgs($this->em, $schema) + ); + } + + return $schema; + } + + /** + * Gets a portable column definition as required by the DBAL for the discriminator + * column of a class. + * + * @param ClassMetadata $class + * @param Table $table + * + * @return array The portable column definition of the discriminator column as required by + * the DBAL. + */ + private function addDiscriminatorColumnDefinition($class, Table $table) + { + $discrColumn = $class->discriminatorColumn; + + if ( ! isset($discrColumn['type']) || + (strtolower($discrColumn['type']) == 'string' && $discrColumn['length'] === null) + ) { + $discrColumn['type'] = 'string'; + $discrColumn['length'] = 255; + } + + $options = array( + 'length' => isset($discrColumn['length']) ? $discrColumn['length'] : null, + 'notnull' => true + ); + + if (isset($discrColumn['columnDefinition'])) { + $options['columnDefinition'] = $discrColumn['columnDefinition']; + } + + $table->addColumn($discrColumn['name'], $discrColumn['type'], $options); + } + + /** + * Gathers the column definitions as required by the DBAL of all field mappings + * found in the given class. + * + * @param ClassMetadata $class + * @param Table $table + * + * @return array The list of portable column definitions as required by the DBAL. + */ + private function gatherColumns($class, Table $table) + { + $pkColumns = array(); + + foreach ($class->fieldMappings as $mapping) { + if ($class->isInheritanceTypeSingleTable() && isset($mapping['inherited'])) { + continue; + } + + $this->gatherColumn($class, $mapping, $table); + + if ($class->isIdentifier($mapping['fieldName'])) { + $pkColumns[] = $this->quoteStrategy->getColumnName($mapping['fieldName'], $class, $this->platform); + } + } + + // For now, this is a hack required for single table inheritence, since this method is called + // twice by single table inheritence relations + if (!$table->hasIndex('primary')) { + //$table->setPrimaryKey($pkColumns); + } + } + + /** + * Creates a column definition as required by the DBAL from an ORM field mapping definition. + * + * @param ClassMetadata $class The class that owns the field mapping. + * @param array $mapping The field mapping. + * @param Table $table + * + * @return array The portable column definition as required by the DBAL. + */ + private function gatherColumn($class, array $mapping, Table $table) + { + $columnName = $this->quoteStrategy->getColumnName($mapping['fieldName'], $class, $this->platform); + $columnType = $mapping['type']; + + $options = array(); + $options['length'] = isset($mapping['length']) ? $mapping['length'] : null; + $options['notnull'] = isset($mapping['nullable']) ? ! $mapping['nullable'] : true; + if ($class->isInheritanceTypeSingleTable() && count($class->parentClasses) > 0) { + $options['notnull'] = false; + } + + $options['platformOptions'] = array(); + $options['platformOptions']['version'] = $class->isVersioned && $class->versionField == $mapping['fieldName'] ? true : false; + + if (strtolower($columnType) == 'string' && $options['length'] === null) { + $options['length'] = 255; + } + + if (isset($mapping['precision'])) { + $options['precision'] = $mapping['precision']; + } + + if (isset($mapping['scale'])) { + $options['scale'] = $mapping['scale']; + } + + if (isset($mapping['default'])) { + $options['default'] = $mapping['default']; + } + + if (isset($mapping['columnDefinition'])) { + $options['columnDefinition'] = $mapping['columnDefinition']; + } + + if (isset($mapping['options'])) { + $knownOptions = array('comment', 'unsigned', 'fixed', 'default'); + + foreach ($knownOptions as $knownOption) { + if (array_key_exists($knownOption, $mapping['options'])) { + $options[$knownOption] = $mapping['options'][$knownOption]; + + unset($mapping['options'][$knownOption]); + } + } + + $options['customSchemaOptions'] = $mapping['options']; + } + + if ($class->isIdGeneratorIdentity() && $class->getIdentifierFieldNames() == array($mapping['fieldName'])) { + $options['autoincrement'] = true; + } + if ($class->isInheritanceTypeJoined() && $class->name != $class->rootEntityName) { + $options['autoincrement'] = false; + } + + if ($table->hasColumn($columnName)) { + // required in some inheritance scenarios + $table->changeColumn($columnName, $options); + } else { + $table->addColumn($columnName, $columnType, $options); + } + + $isUnique = isset($mapping['unique']) ? $mapping['unique'] : false; + if ($isUnique) { + $table->addUniqueIndex(array($columnName)); + } + } + + /** + * Gathers the SQL for properly setting up the relations of the given class. + * This includes the SQL for foreign key constraints and join tables. + * + * @param ClassMetadata $class + * @param Table $table + * @param Schema $schema + * @param array $addedFks + * @param array $blacklistedFks + * + * @return void + * + * @throws \Doctrine\ORM\ORMException + */ + private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks) + { + foreach ($class->associationMappings as $mapping) { + if (isset($mapping['inherited'])) { + continue; + } + + $foreignClass = $this->em->getClassMetadata($mapping['targetEntity']); + + if ($mapping['type'] & ClassMetadata::TO_ONE && $mapping['isOwningSide']) { + $primaryKeyColumns = array(); // PK is unnecessary for this relation-type + + $this->gatherRelationJoinColumns( + $mapping['joinColumns'], + $table, + $foreignClass, + $mapping, + $primaryKeyColumns, + $addedFks, + $blacklistedFks + ); + } elseif ($mapping['type'] == ClassMetadata::ONE_TO_MANY && $mapping['isOwningSide']) { + //... create join table, one-many through join table supported later + throw ORMException::notSupported(); + } elseif ($mapping['type'] == ClassMetadata::MANY_TO_MANY && $mapping['isOwningSide']) { + // create join table + $joinTable = $mapping['joinTable']; + + $theJoinTable = $schema->createTable( + $this->quoteStrategy->getJoinTableName($mapping, $foreignClass, $this->platform) + ); + + $primaryKeyColumns = array(); + + // Build first FK constraint (relation table => source table) + $this->gatherRelationJoinColumns( + $joinTable['joinColumns'], + $theJoinTable, + $class, + $mapping, + $primaryKeyColumns, + $addedFks, + $blacklistedFks + ); + + // Build second FK constraint (relation table => target table) + $this->gatherRelationJoinColumns( + $joinTable['inverseJoinColumns'], + $theJoinTable, + $foreignClass, + $mapping, + $primaryKeyColumns, + $addedFks, + $blacklistedFks + ); + + $theJoinTable->setPrimaryKey($primaryKeyColumns); + } + } + } + + /** + * Gets the class metadata that is responsible for the definition of the referenced column name. + * + * Previously this was a simple task, but with DDC-117 this problem is actually recursive. If its + * not a simple field, go through all identifier field names that are associations recursively and + * find that referenced column name. + * + * TODO: Is there any way to make this code more pleasing? + * + * @param ClassMetadata $class + * @param string $referencedColumnName + * + * @return array (ClassMetadata, referencedFieldName) + */ + private function getDefiningClass($class, $referencedColumnName) + { + $referencedFieldName = $class->getFieldName($referencedColumnName); + + if ($class->hasField($referencedFieldName)) { + return array($class, $referencedFieldName); + } + + if (in_array($referencedColumnName, $class->getIdentifierColumnNames())) { + // it seems to be an entity as foreign key + foreach ($class->getIdentifierFieldNames() as $fieldName) { + if ($class->hasAssociation($fieldName) + && $class->getSingleAssociationJoinColumnName($fieldName) == $referencedColumnName) { + return $this->getDefiningClass( + $this->em->getClassMetadata($class->associationMappings[$fieldName]['targetEntity']), + $class->getSingleAssociationReferencedJoinColumnName($fieldName) + ); + } + } + } + + return null; + } + + /** + * Gathers columns and fk constraints that are required for one part of relationship. + * + * @param array $joinColumns + * @param Table $theJoinTable + * @param ClassMetadata $class + * @param array $mapping + * @param array $primaryKeyColumns + * @param array $addedFks + * @param array $blacklistedFks + * + * @return void + * + * @throws \Doctrine\ORM\ORMException + */ + private function gatherRelationJoinColumns( + $joinColumns, + $theJoinTable, + $class, + $mapping, + &$primaryKeyColumns, + &$addedFks, + &$blacklistedFks + ) { + $localColumns = array(); + $foreignColumns = array(); + $fkOptions = array(); + $foreignTableName = $this->quoteStrategy->getTableName($class, $this->platform); + $uniqueConstraints = array(); + + foreach ($joinColumns as $joinColumn) { + + list($definingClass, $referencedFieldName) = $this->getDefiningClass( + $class, + $joinColumn['referencedColumnName'] + ); + + if ( ! $definingClass) { + throw new \Doctrine\ORM\ORMException( + "Column name `".$joinColumn['referencedColumnName']."` referenced for relation from ". + $mapping['sourceEntity'] . " towards ". $mapping['targetEntity'] . " does not exist." + ); + } + + $quotedColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); + $quotedRefColumnName = $this->quoteStrategy->getReferencedJoinColumnName( + $joinColumn, + $class, + $this->platform + ); + + $primaryKeyColumns[] = $quotedColumnName; + $localColumns[] = $quotedColumnName; + $foreignColumns[] = $quotedRefColumnName; + + if ( ! $theJoinTable->hasColumn($quotedColumnName)) { + // Only add the column to the table if it does not exist already. + // It might exist already if the foreign key is mapped into a regular + // property as well. + + $fieldMapping = $definingClass->getFieldMapping($referencedFieldName); + + $columnDef = null; + if (isset($joinColumn['columnDefinition'])) { + $columnDef = $joinColumn['columnDefinition']; + } elseif (isset($fieldMapping['columnDefinition'])) { + $columnDef = $fieldMapping['columnDefinition']; + } + + $columnOptions = array('notnull' => false, 'columnDefinition' => $columnDef); + + if (isset($joinColumn['nullable'])) { + $columnOptions['notnull'] = !$joinColumn['nullable']; + } + + if (isset($fieldMapping['options'])) { + $columnOptions['options'] = $fieldMapping['options']; + } + + if ($fieldMapping['type'] == "string" && isset($fieldMapping['length'])) { + $columnOptions['length'] = $fieldMapping['length']; + } elseif ($fieldMapping['type'] == "decimal") { + $columnOptions['scale'] = $fieldMapping['scale']; + $columnOptions['precision'] = $fieldMapping['precision']; + } + + $theJoinTable->addColumn($quotedColumnName, $fieldMapping['type'], $columnOptions); + } + + if (isset($joinColumn['unique']) && $joinColumn['unique'] == true) { + $uniqueConstraints[] = array('columns' => array($quotedColumnName)); + } + + if (isset($joinColumn['onDelete'])) { + $fkOptions['onDelete'] = $joinColumn['onDelete']; + } + } + + // Prefer unique constraints over implicit simple indexes created for foreign keys. + // Also avoids index duplication. + foreach ($uniqueConstraints as $indexName => $unique) { + $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName); + } + + $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); + if (isset($addedFks[$compositeName]) + && ($foreignTableName != $addedFks[$compositeName]['foreignTableName'] + || 0 < count(array_diff($foreignColumns, $addedFks[$compositeName]['foreignColumns']))) + ) { + foreach ($theJoinTable->getForeignKeys() as $fkName => $key) { + if (0 === count(array_diff($key->getLocalColumns(), $localColumns)) + && (($key->getForeignTableName() != $foreignTableName) + || 0 < count(array_diff($key->getForeignColumns(), $foreignColumns))) + ) { + $theJoinTable->removeForeignKey($fkName); + break; + } + } + $blacklistedFks[$compositeName] = true; + } elseif (!isset($blacklistedFks[$compositeName])) { + $addedFks[$compositeName] = array('foreignTableName' => $foreignTableName, 'foreignColumns' => $foreignColumns); + $theJoinTable->addUnnamedForeignKeyConstraint( + $foreignTableName, + $localColumns, + $foreignColumns, + $fkOptions + ); + } + } + + /** + * Drops the database schema for the given classes. + * + * In any way when an exception is thrown it is suppressed since drop was + * issued for all classes of the schema and some probably just don't exist. + * + * @param array $classes + * + * @return void + */ + public function dropSchema(array $classes) + { + $dropSchemaSql = $this->getDropSchemaSQL($classes); + $conn = $this->em->getConnection(); + + foreach ($dropSchemaSql as $sql) { + try { + $conn->executeQuery($sql); + } catch (\Exception $e) { + + } + } + } + + /** + * Drops all elements in the database of the current connection. + * + * @return void + */ + public function dropDatabase() + { + $dropSchemaSql = $this->getDropDatabaseSQL(); + $conn = $this->em->getConnection(); + + foreach ($dropSchemaSql as $sql) { + $conn->executeQuery($sql); + } + } + + /** + * Gets the SQL needed to drop the database schema for the connections database. + * + * @return array + */ + public function getDropDatabaseSQL() + { + $sm = $this->em->getConnection()->getSchemaManager(); + $schema = $sm->createSchema(); + + $visitor = new DropSchemaSqlCollector($this->platform); + $schema->visit($visitor); + + return $visitor->getQueries(); + } + + /** + * Gets SQL to drop the tables defined by the passed classes. + * + * @param array $classes + * + * @return array + */ + public function getDropSchemaSQL(array $classes) + { + $visitor = new DropSchemaSqlCollector($this->platform); + $schema = $this->getSchemaFromMetadata($classes); + + $sm = $this->em->getConnection()->getSchemaManager(); + $fullSchema = $sm->createSchema(); + + foreach ($fullSchema->getTables() as $table) { + if ( ! $schema->hasTable($table->getName())) { + foreach ($table->getForeignKeys() as $foreignKey) { + /* @var $foreignKey \Doctrine\DBAL\Schema\ForeignKeyConstraint */ + if ($schema->hasTable($foreignKey->getForeignTableName())) { + $visitor->acceptForeignKey($table, $foreignKey); + } + } + } else { + $visitor->acceptTable($table); + foreach ($table->getForeignKeys() as $foreignKey) { + $visitor->acceptForeignKey($table, $foreignKey); + } + } + } + + if ($this->platform->supportsSequences()) { + foreach ($schema->getSequences() as $sequence) { + $visitor->acceptSequence($sequence); + } + + foreach ($schema->getTables() as $table) { + /* @var $sequence Table */ + if ($table->hasPrimaryKey()) { + $columns = $table->getPrimaryKey()->getColumns(); + if (count($columns) == 1) { + $checkSequence = $table->getName() . "_" . $columns[0] . "_seq"; + if ($fullSchema->hasSequence($checkSequence)) { + $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); + } + } + } + } + } + + return $visitor->getQueries(); + } + + /** + * Updates the database schema of the given classes by comparing the ClassMetadata + * instances to the current database schema that is inspected. If $saveMode is set + * to true the command is executed in the Database, else SQL is returned. + * + * @param array $classes + * @param boolean $saveMode + * + * @return void + */ + public function updateSchema(array $classes, $saveMode = false) + { + $updateSchemaSql = $this->getUpdateSchemaSql($classes, $saveMode); + $conn = $this->em->getConnection(); + + foreach ($updateSchemaSql as $sql) { + $conn->executeQuery($sql); + } + } + + /** + * Gets the sequence of SQL statements that need to be performed in order + * to bring the given class mappings in-synch with the relational schema. + * If $saveMode is set to true the command is executed in the Database, + * else SQL is returned. + * + * @param array $classes The classes to consider. + * @param boolean $saveMode True for writing to DB, false for SQL string. + * + * @return array The sequence of SQL statements. + */ + public function getUpdateSchemaSql(array $classes, $saveMode = false) + { + $sm = $this->em->getConnection()->getSchemaManager(); + + $fromSchema = $sm->createSchema(); + $toSchema = $this->getSchemaFromMetadata($classes); + + $comparator = new Comparator(); + $schemaDiff = $comparator->compare($fromSchema, $toSchema); + + if ($saveMode) { + return $schemaDiff->toSaveSql($this->platform); + } + + return $schemaDiff->toSql($this->platform); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaValidator.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..8f59ea72dfb7324633b7dff1ddd16d4dc469352e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaValidator.php @@ -0,0 +1,272 @@ +. +*/ + +namespace Doctrine\ORM\Tools; + +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\DBAL\Types\Type; + +/** + * Performs strict validation of the mapping schema + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 1.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class SchemaValidator +{ + /** + * @var EntityManagerInterface + */ + private $em; + + /** + * @param EntityManagerInterface $em + */ + public function __construct(EntityManagerInterface $em) + { + $this->em = $em; + } + + /** + * Checks the internal consistency of all mapping files. + * + * There are several checks that can't be done at runtime or are too expensive, which can be verified + * with this command. For example: + * + * 1. Check if a relation with "mappedBy" is actually connected to that specified field. + * 2. Check if "mappedBy" and "inversedBy" are consistent to each other. + * 3. Check if "referencedColumnName" attributes are really pointing to primary key columns. + * + * @return array + */ + public function validateMapping() + { + $errors = array(); + $cmf = $this->em->getMetadataFactory(); + $classes = $cmf->getAllMetadata(); + + foreach ($classes as $class) { + if ($ce = $this->validateClass($class)) { + $errors[$class->name] = $ce; + } + } + + return $errors; + } + + /** + * Validates a single class of the current. + * + * @param ClassMetadataInfo $class + * + * @return array + */ + public function validateClass(ClassMetadataInfo $class) + { + $ce = array(); + $cmf = $this->em->getMetadataFactory(); + + foreach ($class->fieldMappings as $fieldName => $mapping) { + if (!Type::hasType($mapping['type'])) { + $ce[] = "The field '" . $class->name . "#" . $fieldName."' uses a non-existant type '" . $mapping['type'] . "'."; + } + } + + foreach ($class->associationMappings as $fieldName => $assoc) { + if (!class_exists($assoc['targetEntity']) || $cmf->isTransient($assoc['targetEntity'])) { + $ce[] = "The target entity '" . $assoc['targetEntity'] . "' specified on " . $class->name . '#' . $fieldName . ' is unknown or not an entity.'; + return $ce; + } + + if ($assoc['mappedBy'] && $assoc['inversedBy']) { + $ce[] = "The association " . $class . "#" . $fieldName . " cannot be defined as both inverse and owning."; + } + + $targetMetadata = $cmf->getMetadataFor($assoc['targetEntity']); + + if (isset($assoc['id']) && $targetMetadata->containsForeignIdentifier) { + $ce[] = "Cannot map association '" . $class->name. "#". $fieldName ." as identifier, because " . + "the target entity '". $targetMetadata->name . "' also maps an association as identifier."; + } + + if ($assoc['mappedBy']) { + if ($targetMetadata->hasField($assoc['mappedBy'])) { + $ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the owning side ". + "field " . $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " which is not defined as association, but as field."; + } + if (!$targetMetadata->hasAssociation($assoc['mappedBy'])) { + $ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the owning side ". + "field " . $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " which does not exist."; + } elseif ($targetMetadata->associationMappings[$assoc['mappedBy']]['inversedBy'] == null) { + $ce[] = "The field " . $class->name . "#" . $fieldName . " is on the inverse side of a ". + "bi-directional relationship, but the specified mappedBy association on the target-entity ". + $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " does not contain the required ". + "'inversedBy=\"" . $fieldName . "\"' attribute."; + } elseif ($targetMetadata->associationMappings[$assoc['mappedBy']]['inversedBy'] != $fieldName) { + $ce[] = "The mappings " . $class->name . "#" . $fieldName . " and " . + $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " are ". + "inconsistent with each other."; + } + } + + if ($assoc['inversedBy']) { + if ($targetMetadata->hasField($assoc['inversedBy'])) { + $ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the inverse side ". + "field " . $assoc['targetEntity'] . "#" . $assoc['inversedBy'] . " which is not defined as association."; + } + + if (!$targetMetadata->hasAssociation($assoc['inversedBy'])) { + $ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the inverse side ". + "field " . $assoc['targetEntity'] . "#" . $assoc['inversedBy'] . " which does not exist."; + } elseif ($targetMetadata->associationMappings[$assoc['inversedBy']]['mappedBy'] == null) { + $ce[] = "The field " . $class->name . "#" . $fieldName . " is on the owning side of a ". + "bi-directional relationship, but the specified mappedBy association on the target-entity ". + $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " does not contain the required ". + "'inversedBy' attribute."; + } elseif ($targetMetadata->associationMappings[$assoc['inversedBy']]['mappedBy'] != $fieldName) { + $ce[] = "The mappings " . $class->name . "#" . $fieldName . " and " . + $assoc['targetEntity'] . "#" . $assoc['inversedBy'] . " are ". + "inconsistent with each other."; + } + + // Verify inverse side/owning side match each other + if (array_key_exists($assoc['inversedBy'], $targetMetadata->associationMappings)) { + $targetAssoc = $targetMetadata->associationMappings[$assoc['inversedBy']]; + if ($assoc['type'] == ClassMetadataInfo::ONE_TO_ONE && $targetAssoc['type'] !== ClassMetadataInfo::ONE_TO_ONE){ + $ce[] = "If association " . $class->name . "#" . $fieldName . " is one-to-one, then the inversed " . + "side " . $targetMetadata->name . "#" . $assoc['inversedBy'] . " has to be one-to-one as well."; + } elseif ($assoc['type'] == ClassMetadataInfo::MANY_TO_ONE && $targetAssoc['type'] !== ClassMetadataInfo::ONE_TO_MANY){ + $ce[] = "If association " . $class->name . "#" . $fieldName . " is many-to-one, then the inversed " . + "side " . $targetMetadata->name . "#" . $assoc['inversedBy'] . " has to be one-to-many."; + } elseif ($assoc['type'] == ClassMetadataInfo::MANY_TO_MANY && $targetAssoc['type'] !== ClassMetadataInfo::MANY_TO_MANY){ + $ce[] = "If association " . $class->name . "#" . $fieldName . " is many-to-many, then the inversed " . + "side " . $targetMetadata->name . "#" . $assoc['inversedBy'] . " has to be many-to-many as well."; + } + } + } + + if ($assoc['isOwningSide']) { + if ($assoc['type'] == ClassMetadataInfo::MANY_TO_MANY) { + $identifierColumns = $class->getIdentifierColumnNames(); + foreach ($assoc['joinTable']['joinColumns'] as $joinColumn) { + if (!in_array($joinColumn['referencedColumnName'], $identifierColumns)) { + $ce[] = "The referenced column name '" . $joinColumn['referencedColumnName'] . "' " . + "has to be a primary key column on the target entity class '".$class->name."'."; + break; + } + } + + $identifierColumns = $targetMetadata->getIdentifierColumnNames(); + foreach ($assoc['joinTable']['inverseJoinColumns'] as $inverseJoinColumn) { + if (!in_array($inverseJoinColumn['referencedColumnName'], $identifierColumns)) { + $ce[] = "The referenced column name '" . $joinColumn['referencedColumnName'] . "' " . + "has to be a primary key column on the target entity class '".$targetMetadata->name."'."; + break; + } + } + + if (count($targetMetadata->getIdentifierColumnNames()) != count($assoc['joinTable']['inverseJoinColumns'])) { + $ce[] = "The inverse join columns of the many-to-many table '" . $assoc['joinTable']['name'] . "' " . + "have to contain to ALL identifier columns of the target entity '". $targetMetadata->name . "', " . + "however '" . implode(", ", array_diff($targetMetadata->getIdentifierColumnNames(), array_values($assoc['relationToTargetKeyColumns']))) . + "' are missing."; + } + + if (count($class->getIdentifierColumnNames()) != count($assoc['joinTable']['joinColumns'])) { + $ce[] = "The join columns of the many-to-many table '" . $assoc['joinTable']['name'] . "' " . + "have to contain to ALL identifier columns of the source entity '". $class->name . "', " . + "however '" . implode(", ", array_diff($class->getIdentifierColumnNames(), array_values($assoc['relationToSourceKeyColumns']))) . + "' are missing."; + } + + } elseif ($assoc['type'] & ClassMetadataInfo::TO_ONE) { + $identifierColumns = $targetMetadata->getIdentifierColumnNames(); + foreach ($assoc['joinColumns'] as $joinColumn) { + if (!in_array($joinColumn['referencedColumnName'], $identifierColumns)) { + $ce[] = "The referenced column name '" . $joinColumn['referencedColumnName'] . "' " . + "has to be a primary key column on the target entity class '".$targetMetadata->name."'."; + } + } + + if (count($identifierColumns) != count($assoc['joinColumns'])) { + $ids = array(); + + foreach ($assoc['joinColumns'] as $joinColumn) { + $ids[] = $joinColumn['name']; + } + + $ce[] = "The join columns of the association '" . $assoc['fieldName'] . "' " . + "have to match to ALL identifier columns of the target entity '". $targetMetadata->name . "', " . + "however '" . implode(", ", array_diff($targetMetadata->getIdentifierColumnNames(), $ids)) . + "' are missing."; + } + } + } + + if (isset($assoc['orderBy']) && $assoc['orderBy'] !== null) { + foreach ($assoc['orderBy'] as $orderField => $orientation) { + if (!$targetMetadata->hasField($orderField) && !$targetMetadata->hasAssociation($orderField)) { + $ce[] = "The association " . $class->name."#".$fieldName." is ordered by a foreign field " . + $orderField . " that is not a field on the target entity " . $targetMetadata->name . "."; + continue; + } + if ($targetMetadata->isCollectionValuedAssociation($orderField)) { + $ce[] = "The association " . $class->name."#".$fieldName." is ordered by a field " . + $orderField . " on " . $targetMetadata->name . " that is a collection-valued association."; + continue; + } + if ($targetMetadata->isAssociationInverseSide($orderField)) { + $ce[] = "The association " . $class->name."#".$fieldName." is ordered by a field " . + $orderField . " on " . $targetMetadata->name . " that is the inverse side of an association."; + continue; + } + } + } + } + + foreach ($class->subClasses as $subClass) { + if (!in_array($class->name, class_parents($subClass))) { + $ce[] = "According to the discriminator map class '" . $subClass . "' has to be a child ". + "of '" . $class->name . "' but these entities are not related through inheritance."; + } + } + + return $ce; + } + + /** + * Checks if the Database Schema is in sync with the current metadata state. + * + * @return bool + */ + public function schemaInSyncWithMetadata() + { + $schemaTool = new SchemaTool($this->em); + + $allMetadata = $this->em->getMetadataFactory()->getAllMetadata(); + + return count($schemaTool->getUpdateSchemaSql($allMetadata, true)) == 0; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php new file mode 100644 index 0000000000000000000000000000000000000000..79d4670ad0f052c22813d343f3a84d81810f0628 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php @@ -0,0 +1,162 @@ +. +*/ + +namespace Doctrine\ORM\Tools; + +use Doctrine\Common\ClassLoader; +use Doctrine\Common\Cache\Cache; +use Doctrine\Common\Cache\CacheProvider; +use Doctrine\Common\Cache\ArrayCache; +use Doctrine\ORM\Configuration; +use Doctrine\ORM\Mapping\Driver\XmlDriver; +use Doctrine\ORM\Mapping\Driver\YamlDriver; + +/** + * Convenience class for setting up Doctrine from different installations and configurations. + * + * @author Benjamin Eberlei + */ +class Setup +{ + /** + * Use this method to register all autoloads for a downloaded Doctrine library. + * Pick the directory the library was uncompressed into. + * + * @param string $directory + * + * @return void + */ + public static function registerAutoloadDirectory($directory) + { + if (!class_exists('Doctrine\Common\ClassLoader', false)) { + require_once $directory . "/Doctrine/Common/ClassLoader.php"; + } + + $loader = new ClassLoader("Doctrine", $directory); + $loader->register(); + + $loader = new ClassLoader("Symfony\Component", $directory . "/Doctrine"); + $loader->register(); + } + + /** + * Creates a configuration with an annotation metadata driver. + * + * @param array $paths + * @param boolean $isDevMode + * @param string $proxyDir + * @param Cache $cache + * @param bool $useSimpleAnnotationReader + * + * @return Configuration + */ + public static function createAnnotationMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache $cache = null, $useSimpleAnnotationReader = true) + { + $config = self::createConfiguration($isDevMode, $proxyDir, $cache); + $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver($paths, $useSimpleAnnotationReader)); + + return $config; + } + + /** + * Creates a configuration with a xml metadata driver. + * + * @param array $paths + * @param boolean $isDevMode + * @param string $proxyDir + * @param Cache $cache + * + * @return Configuration + */ + public static function createXMLMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache $cache = null) + { + $config = self::createConfiguration($isDevMode, $proxyDir, $cache); + $config->setMetadataDriverImpl(new XmlDriver($paths)); + + return $config; + } + + /** + * Creates a configuration with a yaml metadata driver. + * + * @param array $paths + * @param boolean $isDevMode + * @param string $proxyDir + * @param Cache $cache + * + * @return Configuration + */ + public static function createYAMLMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache $cache = null) + { + $config = self::createConfiguration($isDevMode, $proxyDir, $cache); + $config->setMetadataDriverImpl(new YamlDriver($paths)); + + return $config; + } + + /** + * Creates a configuration without a metadata driver. + * + * @param bool $isDevMode + * @param string $proxyDir + * @param Cache $cache + * + * @return Configuration + */ + public static function createConfiguration($isDevMode = false, $proxyDir = null, Cache $cache = null) + { + $proxyDir = $proxyDir ?: sys_get_temp_dir(); + + if ($isDevMode === false && $cache === null) { + if (extension_loaded('apc')) { + $cache = new \Doctrine\Common\Cache\ApcCache(); + } elseif (extension_loaded('xcache')) { + $cache = new \Doctrine\Common\Cache\XcacheCache(); + } elseif (extension_loaded('memcache')) { + $memcache = new \Memcache(); + $memcache->connect('127.0.0.1'); + $cache = new \Doctrine\Common\Cache\MemcacheCache(); + $cache->setMemcache($memcache); + } elseif (extension_loaded('redis')) { + $redis = new \Redis(); + $redis->connect('127.0.0.1'); + $cache = new \Doctrine\Common\Cache\RedisCache(); + $cache->setRedis($redis); + } else { + $cache = new ArrayCache(); + } + } elseif ($cache === null) { + $cache = new ArrayCache(); + } + + if ($cache instanceof CacheProvider) { + $cache->setNamespace("dc2_" . md5($proxyDir) . "_"); // to avoid collisions + } + + $config = new Configuration(); + $config->setMetadataCacheImpl($cache); + $config->setQueryCacheImpl($cache); + $config->setResultCacheImpl($cache); + $config->setProxyDir($proxyDir); + $config->setProxyNamespace('DoctrineProxies'); + $config->setAutoGenerateProxyClasses($isDevMode); + + return $config; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ToolEvents.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ToolEvents.php new file mode 100644 index 0000000000000000000000000000000000000000..aebb5d8f37d41190003281d73b1fca85ef2bdc5a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ToolEvents.php @@ -0,0 +1,42 @@ +. + */ + +namespace Doctrine\ORM\Tools; + +class ToolEvents +{ + /** + * The postGenerateSchemaTable event occurs in SchemaTool#getSchemaFromMetadata() + * whenever an entity class is transformed into its table representation. It receives + * the current non-complete Schema instance, the Entity Metadata Class instance and + * the Schema Table instance of this entity. + * + * @var string + */ + const postGenerateSchemaTable = 'postGenerateSchemaTable'; + + /** + * The postGenerateSchema event is triggered in SchemaTool#getSchemaFromMetadata() + * after all entity classes have been transformed into the related Schema structure. + * The EventArgs contain the EntityManager and the created Schema instance. + * + * @var string + */ + const postGenerateSchema = 'postGenerateSchema'; +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ToolsException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ToolsException.php new file mode 100644 index 0000000000000000000000000000000000000000..0a461640491fc23a1f1e5043c247450367cf96af --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ToolsException.php @@ -0,0 +1,51 @@ +. + */ + +namespace Doctrine\ORM\Tools; + +use Doctrine\ORM\ORMException; + +/** + * Tools related Exceptions. + * + * @author Benjamin Eberlei + */ +class ToolsException extends ORMException +{ + /** + * @param string $sql + * @param \Exception $e + * + * @return ToolsException + */ + public static function schemaToolFailure($sql, \Exception $e) + { + return new self("Schema-Tool failed with Error '" . $e->getMessage() . "' while executing DDL: " . $sql, "0", $e); + } + + /** + * @param string $type + * + * @return ToolsException + */ + public static function couldNotMapDoctrine1Type($type) + { + return new self("Could not map doctrine 1 type '$type'!"); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/TransactionRequiredException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/TransactionRequiredException.php new file mode 100644 index 0000000000000000000000000000000000000000..c3417b674263691109f215534f23f204d07d5a8a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/TransactionRequiredException.php @@ -0,0 +1,40 @@ +. + */ + +namespace Doctrine\ORM; + +/** + * Is thrown when a transaction is required for the current operation, but there is none open. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link www.doctrine-project.com + * @since 1.0 + * @author Benjamin Eberlei + * @author Roman Borschel + */ +class TransactionRequiredException extends ORMException +{ + /** + * @return TransactionRequiredException + */ + static public function transactionRequired() + { + return new self('An open transaction is required for this operation.'); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/UnexpectedResultException.php b/vendor/doctrine/orm/lib/Doctrine/ORM/UnexpectedResultException.php new file mode 100644 index 0000000000000000000000000000000000000000..3cd561f096538da34a01f917d946c20134691d36 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/UnexpectedResultException.php @@ -0,0 +1,30 @@ +. + */ + +namespace Doctrine\ORM; + +/** + * Exception for a unexpected query result. + * + * @author Fabio B. Silva + * @since 2.3 + */ +class UnexpectedResultException extends ORMException +{ +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php b/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php new file mode 100644 index 0000000000000000000000000000000000000000..fcbd3ab942db51e6d72af77005000a664d8d5b62 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php @@ -0,0 +1,3508 @@ +. + */ + +namespace Doctrine\ORM; + +use Doctrine\Common\Persistence\Mapping\RuntimeReflectionService; +use Doctrine\DBAL\LockMode; +use Doctrine\ORM\Internal\HydrationCompleteHandler; +use Doctrine\ORM\Mapping\Reflection\ReflectionPropertiesGetter; +use Exception; +use InvalidArgumentException; +use UnexpectedValueException; + +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Collections\Collection; +use Doctrine\Common\NotifyPropertyChanged; +use Doctrine\Common\PropertyChangedListener; +use Doctrine\Common\Persistence\ObjectManagerAware; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Proxy\Proxy; + +use Doctrine\ORM\Event\LifecycleEventArgs; +use Doctrine\ORM\Event\PreUpdateEventArgs; +use Doctrine\ORM\Event\PreFlushEventArgs; +use Doctrine\ORM\Event\OnFlushEventArgs; +use Doctrine\ORM\Event\PostFlushEventArgs; +use Doctrine\ORM\Event\ListenersInvoker; + +use Doctrine\ORM\Cache\Persister\CachedPersister; +use Doctrine\ORM\Persisters\Entity\BasicEntityPersister; +use Doctrine\ORM\Persisters\Entity\SingleTablePersister; +use Doctrine\ORM\Persisters\Entity\JoinedSubclassPersister; +use Doctrine\ORM\Persisters\Collection\OneToManyPersister; +use Doctrine\ORM\Persisters\Collection\ManyToManyPersister; +use Doctrine\ORM\Utility\IdentifierFlattener; +use Doctrine\ORM\Cache\AssociationCacheEntry; + +/** + * The UnitOfWork is responsible for tracking changes to objects during an + * "object-level" transaction and for writing out changes to the database + * in the correct order. + * + * Internal note: This class contains highly performance-sensitive code. + * + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Rob Caiger + */ +class UnitOfWork implements PropertyChangedListener +{ + /** + * An entity is in MANAGED state when its persistence is managed by an EntityManager. + */ + const STATE_MANAGED = 1; + + /** + * An entity is new if it has just been instantiated (i.e. using the "new" operator) + * and is not (yet) managed by an EntityManager. + */ + const STATE_NEW = 2; + + /** + * A detached entity is an instance with persistent state and identity that is not + * (or no longer) associated with an EntityManager (and a UnitOfWork). + */ + const STATE_DETACHED = 3; + + /** + * A removed entity instance is an instance with a persistent identity, + * associated with an EntityManager, whose persistent state will be deleted + * on commit. + */ + const STATE_REMOVED = 4; + + /** + * Hint used to collect all primary keys of associated entities during hydration + * and execute it in a dedicated query afterwards + * @see https://doctrine-orm.readthedocs.org/en/latest/reference/dql-doctrine-query-language.html?highlight=eager#temporarily-change-fetch-mode-in-dql + */ + const HINT_DEFEREAGERLOAD = 'deferEagerLoad'; + + /** + * The identity map that holds references to all managed entities that have + * an identity. The entities are grouped by their class name. + * Since all classes in a hierarchy must share the same identifier set, + * we always take the root class name of the hierarchy. + * + * @var array + */ + private $identityMap = array(); + + /** + * Map of all identifiers of managed entities. + * Keys are object ids (spl_object_hash). + * + * @var array + */ + private $entityIdentifiers = array(); + + /** + * Map of the original entity data of managed entities. + * Keys are object ids (spl_object_hash). This is used for calculating changesets + * at commit time. + * + * Internal note: Note that PHPs "copy-on-write" behavior helps a lot with memory usage. + * A value will only really be copied if the value in the entity is modified + * by the user. + * + * @var array + */ + private $originalEntityData = array(); + + /** + * Map of entity changes. Keys are object ids (spl_object_hash). + * Filled at the beginning of a commit of the UnitOfWork and cleaned at the end. + * + * @var array + */ + private $entityChangeSets = array(); + + /** + * The (cached) states of any known entities. + * Keys are object ids (spl_object_hash). + * + * @var array + */ + private $entityStates = array(); + + /** + * Map of entities that are scheduled for dirty checking at commit time. + * This is only used for entities with a change tracking policy of DEFERRED_EXPLICIT. + * Keys are object ids (spl_object_hash). + * + * @var array + */ + private $scheduledForSynchronization = array(); + + /** + * A list of all pending entity insertions. + * + * @var array + */ + private $entityInsertions = array(); + + /** + * A list of all pending entity updates. + * + * @var array + */ + private $entityUpdates = array(); + + /** + * Any pending extra updates that have been scheduled by persisters. + * + * @var array + */ + private $extraUpdates = array(); + + /** + * A list of all pending entity deletions. + * + * @var array + */ + private $entityDeletions = array(); + + /** + * All pending collection deletions. + * + * @var array + */ + private $collectionDeletions = array(); + + /** + * All pending collection updates. + * + * @var array + */ + private $collectionUpdates = array(); + + /** + * List of collections visited during changeset calculation on a commit-phase of a UnitOfWork. + * At the end of the UnitOfWork all these collections will make new snapshots + * of their data. + * + * @var array + */ + private $visitedCollections = array(); + + /** + * The EntityManager that "owns" this UnitOfWork instance. + * + * @var EntityManagerInterface + */ + private $em; + + /** + * The calculator used to calculate the order in which changes to + * entities need to be written to the database. + * + * @var \Doctrine\ORM\Internal\CommitOrderCalculator + */ + private $commitOrderCalculator; + + /** + * The entity persister instances used to persist entity instances. + * + * @var array + */ + private $persisters = array(); + + /** + * The collection persister instances used to persist collections. + * + * @var array + */ + private $collectionPersisters = array(); + + /** + * The EventManager used for dispatching events. + * + * @var \Doctrine\Common\EventManager + */ + private $evm; + + /** + * The ListenersInvoker used for dispatching events. + * + * @var \Doctrine\ORM\Event\ListenersInvoker + */ + private $listenersInvoker; + + /** + * The IdentifierFlattener used for manipulating identifiers + * + * @var \Doctrine\ORM\Utility\IdentifierFlattener + */ + private $identifierFlattener; + + /** + * Orphaned entities that are scheduled for removal. + * + * @var array + */ + private $orphanRemovals = array(); + + /** + * Read-Only objects are never evaluated + * + * @var array + */ + private $readOnlyObjects = array(); + + /** + * Map of Entity Class-Names and corresponding IDs that should eager loaded when requested. + * + * @var array + */ + private $eagerLoadingEntities = array(); + + /** + * @var boolean + */ + protected $hasCache = false; + + /** + * Helper for handling completion of hydration + * + * @var HydrationCompleteHandler + */ + private $hydrationCompleteHandler; + + /** + * @var ReflectionPropertiesGetter + */ + private $reflectionPropertiesGetter; + + /** + * Initializes a new UnitOfWork instance, bound to the given EntityManager. + * + * @param EntityManagerInterface $em + */ + public function __construct(EntityManagerInterface $em) + { + $this->em = $em; + $this->evm = $em->getEventManager(); + $this->listenersInvoker = new ListenersInvoker($em); + $this->hasCache = $em->getConfiguration()->isSecondLevelCacheEnabled(); + $this->identifierFlattener = new IdentifierFlattener($this, $em->getMetadataFactory()); + $this->hydrationCompleteHandler = new HydrationCompleteHandler($this->listenersInvoker, $em); + $this->reflectionPropertiesGetter = new ReflectionPropertiesGetter(new RuntimeReflectionService()); + } + + /** + * Commits the UnitOfWork, executing all operations that have been postponed + * up to this point. The state of all managed entities will be synchronized with + * the database. + * + * The operations are executed in the following order: + * + * 1) All entity insertions + * 2) All entity updates + * 3) All collection deletions + * 4) All collection updates + * 5) All entity deletions + * + * @param null|object|array $entity + * + * @return void + * + * @throws \Exception + */ + public function commit($entity = null) + { + // Raise preFlush + if ($this->evm->hasListeners(Events::preFlush)) { + $this->evm->dispatchEvent(Events::preFlush, new PreFlushEventArgs($this->em)); + } + + // Compute changes done since last commit. + if ($entity === null) { + $this->computeChangeSets(); + } elseif (is_object($entity)) { + $this->computeSingleEntityChangeSet($entity); + } elseif (is_array($entity)) { + foreach ($entity as $object) { + $this->computeSingleEntityChangeSet($object); + } + } + + if ( ! ($this->entityInsertions || + $this->entityDeletions || + $this->entityUpdates || + $this->collectionUpdates || + $this->collectionDeletions || + $this->orphanRemovals)) { + $this->dispatchOnFlushEvent(); + $this->dispatchPostFlushEvent(); + + return; // Nothing to do. + } + + if ($this->orphanRemovals) { + foreach ($this->orphanRemovals as $orphan) { + $this->remove($orphan); + } + } + + $this->dispatchOnFlushEvent(); + + // Now we need a commit order to maintain referential integrity + $commitOrder = $this->getCommitOrder(); + + $conn = $this->em->getConnection(); + $conn->beginTransaction(); + + try { + if ($this->entityInsertions) { + foreach ($commitOrder as $class) { + $this->executeInserts($class); + } + } + + if ($this->entityUpdates) { + foreach ($commitOrder as $class) { + $this->executeUpdates($class); + } + } + + // Extra updates that were requested by persisters. + if ($this->extraUpdates) { + $this->executeExtraUpdates(); + } + + // Collection deletions (deletions of complete collections) + foreach ($this->collectionDeletions as $collectionToDelete) { + $this->getCollectionPersister($collectionToDelete->getMapping())->delete($collectionToDelete); + } + + // Collection updates (deleteRows, updateRows, insertRows) + foreach ($this->collectionUpdates as $collectionToUpdate) { + $this->getCollectionPersister($collectionToUpdate->getMapping())->update($collectionToUpdate); + } + + // Entity deletions come last and need to be in reverse commit order + if ($this->entityDeletions) { + for ($count = count($commitOrder), $i = $count - 1; $i >= 0 && $this->entityDeletions; --$i) { + $this->executeDeletions($commitOrder[$i]); + } + } + + $conn->commit(); + } catch (Exception $e) { + $this->em->close(); + $conn->rollback(); + + $this->afterTransactionRolledBack(); + + throw $e; + } + + $this->afterTransactionComplete(); + + // Take new snapshots from visited collections + foreach ($this->visitedCollections as $coll) { + $coll->takeSnapshot(); + } + + $this->dispatchPostFlushEvent(); + + // Clear up + $this->entityInsertions = + $this->entityUpdates = + $this->entityDeletions = + $this->extraUpdates = + $this->entityChangeSets = + $this->collectionUpdates = + $this->collectionDeletions = + $this->visitedCollections = + $this->scheduledForSynchronization = + $this->orphanRemovals = array(); + } + + /** + * Computes the changesets of all entities scheduled for insertion. + * + * @return void + */ + private function computeScheduleInsertsChangeSets() + { + foreach ($this->entityInsertions as $entity) { + $class = $this->em->getClassMetadata(get_class($entity)); + + $this->computeChangeSet($class, $entity); + } + } + + /** + * Only flushes the given entity according to a ruleset that keeps the UoW consistent. + * + * 1. All entities scheduled for insertion, (orphan) removals and changes in collections are processed as well! + * 2. Read Only entities are skipped. + * 3. Proxies are skipped. + * 4. Only if entity is properly managed. + * + * @param object $entity + * + * @return void + * + * @throws \InvalidArgumentException + */ + private function computeSingleEntityChangeSet($entity) + { + $state = $this->getEntityState($entity); + + if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) { + throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation " . self::objToStr($entity)); + } + + $class = $this->em->getClassMetadata(get_class($entity)); + + if ($state === self::STATE_MANAGED && $class->isChangeTrackingDeferredImplicit()) { + $this->persist($entity); + } + + // Compute changes for INSERTed entities first. This must always happen even in this case. + $this->computeScheduleInsertsChangeSets(); + + if ($class->isReadOnly) { + return; + } + + // Ignore uninitialized proxy objects + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { + return; + } + + // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION OR DELETION are processed here. + $oid = spl_object_hash($entity); + + if ( ! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) { + $this->computeChangeSet($class, $entity); + } + } + + /** + * Executes any extra updates that have been scheduled. + */ + private function executeExtraUpdates() + { + foreach ($this->extraUpdates as $oid => $update) { + list ($entity, $changeset) = $update; + + $this->entityChangeSets[$oid] = $changeset; + $this->getEntityPersister(get_class($entity))->update($entity); + } + + $this->extraUpdates = array(); + } + + /** + * Gets the changeset for an entity. + * + * @param object $entity + * + * @return array + */ + public function getEntityChangeSet($entity) + { + $oid = spl_object_hash($entity); + + if (isset($this->entityChangeSets[$oid])) { + return $this->entityChangeSets[$oid]; + } + + return array(); + } + + /** + * Computes the changes that happened to a single entity. + * + * Modifies/populates the following properties: + * + * {@link _originalEntityData} + * If the entity is NEW or MANAGED but not yet fully persisted (only has an id) + * then it was not fetched from the database and therefore we have no original + * entity data yet. All of the current entity data is stored as the original entity data. + * + * {@link _entityChangeSets} + * The changes detected on all properties of the entity are stored there. + * A change is a tuple array where the first entry is the old value and the second + * entry is the new value of the property. Changesets are used by persisters + * to INSERT/UPDATE the persistent entity state. + * + * {@link _entityUpdates} + * If the entity is already fully MANAGED (has been fetched from the database before) + * and any changes to its properties are detected, then a reference to the entity is stored + * there to mark it for an update. + * + * {@link _collectionDeletions} + * If a PersistentCollection has been de-referenced in a fully MANAGED entity, + * then this collection is marked for deletion. + * + * @ignore + * + * @internal Don't call from the outside. + * + * @param ClassMetadata $class The class descriptor of the entity. + * @param object $entity The entity for which to compute the changes. + * + * @return void + */ + public function computeChangeSet(ClassMetadata $class, $entity) + { + $oid = spl_object_hash($entity); + + if (isset($this->readOnlyObjects[$oid])) { + return; + } + + if ( ! $class->isInheritanceTypeNone()) { + $class = $this->em->getClassMetadata(get_class($entity)); + } + + $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::preFlush) & ~ListenersInvoker::INVOKE_MANAGER; + + if ($invoke !== ListenersInvoker::INVOKE_NONE) { + $this->listenersInvoker->invoke($class, Events::preFlush, $entity, new PreFlushEventArgs($this->em), $invoke); + } + + $actualData = array(); + + foreach ($class->reflFields as $name => $refProp) { + $value = $refProp->getValue($entity); + + if ($class->isCollectionValuedAssociation($name) && $value !== null) { + if ($value instanceof PersistentCollection) { + if ($value->getOwner() === $entity) { + continue; + } + + $value = new ArrayCollection($value->getValues()); + } + + // If $value is not a Collection then use an ArrayCollection. + if ( ! $value instanceof Collection) { + $value = new ArrayCollection($value); + } + + $assoc = $class->associationMappings[$name]; + + // Inject PersistentCollection + $value = new PersistentCollection( + $this->em, $this->em->getClassMetadata($assoc['targetEntity']), $value + ); + $value->setOwner($entity, $assoc); + $value->setDirty( ! $value->isEmpty()); + + $class->reflFields[$name]->setValue($entity, $value); + + $actualData[$name] = $value; + + continue; + } + + if (( ! $class->isIdentifier($name) || ! $class->isIdGeneratorIdentity()) && ($name !== $class->versionField)) { + $actualData[$name] = $value; + } + } + + if ( ! isset($this->originalEntityData[$oid])) { + // Entity is either NEW or MANAGED but not yet fully persisted (only has an id). + // These result in an INSERT. + $this->originalEntityData[$oid] = $actualData; + $changeSet = array(); + + foreach ($actualData as $propName => $actualValue) { + if ( ! isset($class->associationMappings[$propName])) { + $changeSet[$propName] = array(null, $actualValue); + + continue; + } + + $assoc = $class->associationMappings[$propName]; + + if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) { + $changeSet[$propName] = array(null, $actualValue); + } + } + + $this->entityChangeSets[$oid] = $changeSet; + } else { + // Entity is "fully" MANAGED: it was already fully persisted before + // and we have a copy of the original data + $originalData = $this->originalEntityData[$oid]; + $isChangeTrackingNotify = $class->isChangeTrackingNotify(); + $changeSet = ($isChangeTrackingNotify && isset($this->entityChangeSets[$oid])) + ? $this->entityChangeSets[$oid] + : array(); + + foreach ($actualData as $propName => $actualValue) { + // skip field, its a partially omitted one! + if ( ! (isset($originalData[$propName]) || array_key_exists($propName, $originalData))) { + continue; + } + + $orgValue = $originalData[$propName]; + + // skip if value haven't changed + if ($orgValue === $actualValue) { + continue; + } + + // if regular field + if ( ! isset($class->associationMappings[$propName])) { + if ($isChangeTrackingNotify) { + continue; + } + + $changeSet[$propName] = array($orgValue, $actualValue); + + continue; + } + + $assoc = $class->associationMappings[$propName]; + + // Persistent collection was exchanged with the "originally" + // created one. This can only mean it was cloned and replaced + // on another entity. + if ($actualValue instanceof PersistentCollection) { + $owner = $actualValue->getOwner(); + if ($owner === null) { // cloned + $actualValue->setOwner($entity, $assoc); + } else if ($owner !== $entity) { // no clone, we have to fix + if (!$actualValue->isInitialized()) { + $actualValue->initialize(); // we have to do this otherwise the cols share state + } + $newValue = clone $actualValue; + $newValue->setOwner($entity, $assoc); + $class->reflFields[$propName]->setValue($entity, $newValue); + } + } + + if ($orgValue instanceof PersistentCollection) { + // A PersistentCollection was de-referenced, so delete it. + $coid = spl_object_hash($orgValue); + + if (isset($this->collectionDeletions[$coid])) { + continue; + } + + $this->collectionDeletions[$coid] = $orgValue; + $changeSet[$propName] = $orgValue; // Signal changeset, to-many assocs will be ignored. + + continue; + } + + if ($assoc['type'] & ClassMetadata::TO_ONE) { + if ($assoc['isOwningSide']) { + $changeSet[$propName] = array($orgValue, $actualValue); + } + + if ($orgValue !== null && $assoc['orphanRemoval']) { + $this->scheduleOrphanRemoval($orgValue); + } + } + } + + if ($changeSet) { + $this->entityChangeSets[$oid] = $changeSet; + $this->originalEntityData[$oid] = $actualData; + $this->entityUpdates[$oid] = $entity; + } + } + + // Look for changes in associations of the entity + foreach ($class->associationMappings as $field => $assoc) { + if (($val = $class->reflFields[$field]->getValue($entity)) === null) { + continue; + } + + $this->computeAssociationChanges($assoc, $val); + + if ( ! isset($this->entityChangeSets[$oid]) && + $assoc['isOwningSide'] && + $assoc['type'] == ClassMetadata::MANY_TO_MANY && + $val instanceof PersistentCollection && + $val->isDirty()) { + + $this->entityChangeSets[$oid] = array(); + $this->originalEntityData[$oid] = $actualData; + $this->entityUpdates[$oid] = $entity; + } + } + } + + /** + * Computes all the changes that have been done to entities and collections + * since the last commit and stores these changes in the _entityChangeSet map + * temporarily for access by the persisters, until the UoW commit is finished. + * + * @return void + */ + public function computeChangeSets() + { + // Compute changes for INSERTed entities first. This must always happen. + $this->computeScheduleInsertsChangeSets(); + + // Compute changes for other MANAGED entities. Change tracking policies take effect here. + foreach ($this->identityMap as $className => $entities) { + $class = $this->em->getClassMetadata($className); + + // Skip class if instances are read-only + if ($class->isReadOnly) { + continue; + } + + // If change tracking is explicit or happens through notification, then only compute + // changes on entities of that type that are explicitly marked for synchronization. + switch (true) { + case ($class->isChangeTrackingDeferredImplicit()): + $entitiesToProcess = $entities; + break; + + case (isset($this->scheduledForSynchronization[$className])): + $entitiesToProcess = $this->scheduledForSynchronization[$className]; + break; + + default: + $entitiesToProcess = array(); + + } + + foreach ($entitiesToProcess as $entity) { + // Ignore uninitialized proxy objects + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { + continue; + } + + // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION OR DELETION are processed here. + $oid = spl_object_hash($entity); + + if ( ! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) { + $this->computeChangeSet($class, $entity); + } + } + } + } + + /** + * Computes the changes of an association. + * + * @param array $assoc The association mapping. + * @param mixed $value The value of the association. + * + * @throws ORMInvalidArgumentException + * @throws ORMException + * + * @return void + */ + private function computeAssociationChanges($assoc, $value) + { + if ($value instanceof Proxy && ! $value->__isInitialized__) { + return; + } + + if ($value instanceof PersistentCollection && $value->isDirty()) { + $coid = spl_object_hash($value); + + $this->collectionUpdates[$coid] = $value; + $this->visitedCollections[$coid] = $value; + } + + // Look through the entities, and in any of their associations, + // for transient (new) entities, recursively. ("Persistence by reachability") + // Unwrap. Uninitialized collections will simply be empty. + $unwrappedValue = ($assoc['type'] & ClassMetadata::TO_ONE) ? array($value) : $value->unwrap(); + $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); + + foreach ($unwrappedValue as $key => $entry) { + if (! ($entry instanceof $targetClass->name)) { + throw ORMInvalidArgumentException::invalidAssociation($targetClass, $assoc, $entry); + } + + $state = $this->getEntityState($entry, self::STATE_NEW); + + if ( ! ($entry instanceof $assoc['targetEntity'])) { + throw ORMException::unexpectedAssociationValue($assoc['sourceEntity'], $assoc['fieldName'], get_class($entry), $assoc['targetEntity']); + } + + switch ($state) { + case self::STATE_NEW: + if ( ! $assoc['isCascadePersist']) { + throw ORMInvalidArgumentException::newEntityFoundThroughRelationship($assoc, $entry); + } + + $this->persistNew($targetClass, $entry); + $this->computeChangeSet($targetClass, $entry); + break; + + case self::STATE_REMOVED: + // Consume the $value as array (it's either an array or an ArrayAccess) + // and remove the element from Collection. + if ($assoc['type'] & ClassMetadata::TO_MANY) { + unset($value[$key]); + } + break; + + case self::STATE_DETACHED: + // Can actually not happen right now as we assume STATE_NEW, + // so the exception will be raised from the DBAL layer (constraint violation). + throw ORMInvalidArgumentException::detachedEntityFoundThroughRelationship($assoc, $entry); + break; + + default: + // MANAGED associated entities are already taken into account + // during changeset calculation anyway, since they are in the identity map. + } + } + } + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadata $class + * @param object $entity + * + * @return void + */ + private function persistNew($class, $entity) + { + $oid = spl_object_hash($entity); + $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::prePersist); + + if ($invoke !== ListenersInvoker::INVOKE_NONE) { + $this->listenersInvoker->invoke($class, Events::prePersist, $entity, new LifecycleEventArgs($entity, $this->em), $invoke); + } + + $idGen = $class->idGenerator; + + if ( ! $idGen->isPostInsertGenerator()) { + $idValue = $idGen->generate($this->em, $entity); + + if ( ! $idGen instanceof \Doctrine\ORM\Id\AssignedGenerator) { + $idValue = array($class->identifier[0] => $idValue); + + $class->setIdentifierValues($entity, $idValue); + } + + $this->entityIdentifiers[$oid] = $idValue; + } + + $this->entityStates[$oid] = self::STATE_MANAGED; + + $this->scheduleForInsert($entity); + } + + /** + * INTERNAL: + * Computes the changeset of an individual entity, independently of the + * computeChangeSets() routine that is used at the beginning of a UnitOfWork#commit(). + * + * The passed entity must be a managed entity. If the entity already has a change set + * because this method is invoked during a commit cycle then the change sets are added. + * whereby changes detected in this method prevail. + * + * @ignore + * + * @param ClassMetadata $class The class descriptor of the entity. + * @param object $entity The entity for which to (re)calculate the change set. + * + * @return void + * + * @throws ORMInvalidArgumentException If the passed entity is not MANAGED. + */ + public function recomputeSingleEntityChangeSet(ClassMetadata $class, $entity) + { + $oid = spl_object_hash($entity); + + if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] != self::STATE_MANAGED) { + throw ORMInvalidArgumentException::entityNotManaged($entity); + } + + // skip if change tracking is "NOTIFY" + if ($class->isChangeTrackingNotify()) { + return; + } + + if ( ! $class->isInheritanceTypeNone()) { + $class = $this->em->getClassMetadata(get_class($entity)); + } + + $actualData = array(); + + foreach ($class->reflFields as $name => $refProp) { + if (( ! $class->isIdentifier($name) || ! $class->isIdGeneratorIdentity()) + && ($name !== $class->versionField) + && ! $class->isCollectionValuedAssociation($name)) { + $actualData[$name] = $refProp->getValue($entity); + } + } + + if ( ! isset($this->originalEntityData[$oid])) { + throw new \RuntimeException('Cannot call recomputeSingleEntityChangeSet before computeChangeSet on an entity.'); + } + + $originalData = $this->originalEntityData[$oid]; + $changeSet = array(); + + foreach ($actualData as $propName => $actualValue) { + $orgValue = isset($originalData[$propName]) ? $originalData[$propName] : null; + + if ($orgValue !== $actualValue) { + $changeSet[$propName] = array($orgValue, $actualValue); + } + } + + if ($changeSet) { + if (isset($this->entityChangeSets[$oid])) { + $this->entityChangeSets[$oid] = array_merge($this->entityChangeSets[$oid], $changeSet); + } else if ( ! isset($this->entityInsertions[$oid])) { + $this->entityChangeSets[$oid] = $changeSet; + $this->entityUpdates[$oid] = $entity; + } + $this->originalEntityData[$oid] = $actualData; + } + } + + /** + * Executes all entity insertions for entities of the specified type. + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $class + * + * @return void + */ + private function executeInserts($class) + { + $entities = array(); + $className = $class->name; + $persister = $this->getEntityPersister($className); + $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::postPersist); + + foreach ($this->entityInsertions as $oid => $entity) { + + if ($this->em->getClassMetadata(get_class($entity))->name !== $className) { + continue; + } + + $persister->addInsert($entity); + + unset($this->entityInsertions[$oid]); + + if ($invoke !== ListenersInvoker::INVOKE_NONE) { + $entities[] = $entity; + } + } + + $postInsertIds = $persister->executeInserts(); + + if ($postInsertIds) { + // Persister returned post-insert IDs + foreach ($postInsertIds as $postInsertId) { + $id = $postInsertId['generatedId']; + $entity = $postInsertId['entity']; + $oid = spl_object_hash($entity); + $idField = $class->identifier[0]; + + $class->reflFields[$idField]->setValue($entity, $id); + + $this->entityIdentifiers[$oid] = array($idField => $id); + $this->entityStates[$oid] = self::STATE_MANAGED; + $this->originalEntityData[$oid][$idField] = $id; + + $this->addToIdentityMap($entity); + } + } + + foreach ($entities as $entity) { + $this->listenersInvoker->invoke($class, Events::postPersist, $entity, new LifecycleEventArgs($entity, $this->em), $invoke); + } + } + + /** + * Executes all entity updates for entities of the specified type. + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $class + * + * @return void + */ + private function executeUpdates($class) + { + $className = $class->name; + $persister = $this->getEntityPersister($className); + $preUpdateInvoke = $this->listenersInvoker->getSubscribedSystems($class, Events::preUpdate); + $postUpdateInvoke = $this->listenersInvoker->getSubscribedSystems($class, Events::postUpdate); + + foreach ($this->entityUpdates as $oid => $entity) { + + if ($this->em->getClassMetadata(get_class($entity))->name !== $className) { + continue; + } + + if ($preUpdateInvoke != ListenersInvoker::INVOKE_NONE) { + $this->listenersInvoker->invoke($class, Events::preUpdate, $entity, new PreUpdateEventArgs($entity, $this->em, $this->entityChangeSets[$oid]), $preUpdateInvoke); + $this->recomputeSingleEntityChangeSet($class, $entity); + } + + if ( ! empty($this->entityChangeSets[$oid])) { + $persister->update($entity); + } + + unset($this->entityUpdates[$oid]); + + if ($postUpdateInvoke != ListenersInvoker::INVOKE_NONE) { + $this->listenersInvoker->invoke($class, Events::postUpdate, $entity, new LifecycleEventArgs($entity, $this->em), $postUpdateInvoke); + } + } + } + + /** + * Executes all entity deletions for entities of the specified type. + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $class + * + * @return void + */ + private function executeDeletions($class) + { + $className = $class->name; + $persister = $this->getEntityPersister($className); + $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::postRemove); + + foreach ($this->entityDeletions as $oid => $entity) { + if ($this->em->getClassMetadata(get_class($entity))->name !== $className) { + continue; + } + + $persister->delete($entity); + + unset( + $this->entityDeletions[$oid], + $this->entityIdentifiers[$oid], + $this->originalEntityData[$oid], + $this->entityStates[$oid] + ); + + // Entity with this $oid after deletion treated as NEW, even if the $oid + // is obtained by a new entity because the old one went out of scope. + //$this->entityStates[$oid] = self::STATE_NEW; + if ( ! $class->isIdentifierNatural()) { + $class->reflFields[$class->identifier[0]]->setValue($entity, null); + } + + if ($invoke !== ListenersInvoker::INVOKE_NONE) { + $this->listenersInvoker->invoke($class, Events::postRemove, $entity, new LifecycleEventArgs($entity, $this->em), $invoke); + } + } + } + + /** + * Gets the commit order. + * + * @param array|null $entityChangeSet + * + * @return array + */ + private function getCommitOrder(array $entityChangeSet = null) + { + if ($entityChangeSet === null) { + $entityChangeSet = array_merge($this->entityInsertions, $this->entityUpdates, $this->entityDeletions); + } + + $calc = $this->getCommitOrderCalculator(); + + // See if there are any new classes in the changeset, that are not in the + // commit order graph yet (don't have a node). + // We have to inspect changeSet to be able to correctly build dependencies. + // It is not possible to use IdentityMap here because post inserted ids + // are not yet available. + $newNodes = array(); + + foreach ($entityChangeSet as $entity) { + $class = $this->em->getClassMetadata(get_class($entity)); + + if ($calc->hasClass($class->name)) { + continue; + } + + $calc->addClass($class); + + $newNodes[] = $class; + } + + // Calculate dependencies for new nodes + while ($class = array_pop($newNodes)) { + foreach ($class->associationMappings as $assoc) { + if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) { + continue; + } + + $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); + + if ( ! $calc->hasClass($targetClass->name)) { + $calc->addClass($targetClass); + + $newNodes[] = $targetClass; + } + + $calc->addDependency($targetClass, $class); + + // If the target class has mapped subclasses, these share the same dependency. + if ( ! $targetClass->subClasses) { + continue; + } + + foreach ($targetClass->subClasses as $subClassName) { + $targetSubClass = $this->em->getClassMetadata($subClassName); + + if ( ! $calc->hasClass($subClassName)) { + $calc->addClass($targetSubClass); + + $newNodes[] = $targetSubClass; + } + + $calc->addDependency($targetSubClass, $class); + } + } + } + + return $calc->getCommitOrder(); + } + + /** + * Schedules an entity for insertion into the database. + * If the entity already has an identifier, it will be added to the identity map. + * + * @param object $entity The entity to schedule for insertion. + * + * @return void + * + * @throws ORMInvalidArgumentException + * @throws \InvalidArgumentException + */ + public function scheduleForInsert($entity) + { + $oid = spl_object_hash($entity); + + if (isset($this->entityUpdates[$oid])) { + throw new InvalidArgumentException("Dirty entity can not be scheduled for insertion."); + } + + if (isset($this->entityDeletions[$oid])) { + throw ORMInvalidArgumentException::scheduleInsertForRemovedEntity($entity); + } + if (isset($this->originalEntityData[$oid]) && ! isset($this->entityInsertions[$oid])) { + throw ORMInvalidArgumentException::scheduleInsertForManagedEntity($entity); + } + + if (isset($this->entityInsertions[$oid])) { + throw ORMInvalidArgumentException::scheduleInsertTwice($entity); + } + + $this->entityInsertions[$oid] = $entity; + + if (isset($this->entityIdentifiers[$oid])) { + $this->addToIdentityMap($entity); + } + + if ($entity instanceof NotifyPropertyChanged) { + $entity->addPropertyChangedListener($this); + } + } + + /** + * Checks whether an entity is scheduled for insertion. + * + * @param object $entity + * + * @return boolean + */ + public function isScheduledForInsert($entity) + { + return isset($this->entityInsertions[spl_object_hash($entity)]); + } + + /** + * Schedules an entity for being updated. + * + * @param object $entity The entity to schedule for being updated. + * + * @return void + * + * @throws ORMInvalidArgumentException + */ + public function scheduleForUpdate($entity) + { + $oid = spl_object_hash($entity); + + if ( ! isset($this->entityIdentifiers[$oid])) { + throw ORMInvalidArgumentException::entityHasNoIdentity($entity, "scheduling for update"); + } + + if (isset($this->entityDeletions[$oid])) { + throw ORMInvalidArgumentException::entityIsRemoved($entity, "schedule for update"); + } + + if ( ! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) { + $this->entityUpdates[$oid] = $entity; + } + } + + /** + * INTERNAL: + * Schedules an extra update that will be executed immediately after the + * regular entity updates within the currently running commit cycle. + * + * Extra updates for entities are stored as (entity, changeset) tuples. + * + * @ignore + * + * @param object $entity The entity for which to schedule an extra update. + * @param array $changeset The changeset of the entity (what to update). + * + * @return void + */ + public function scheduleExtraUpdate($entity, array $changeset) + { + $oid = spl_object_hash($entity); + $extraUpdate = array($entity, $changeset); + + if (isset($this->extraUpdates[$oid])) { + list($ignored, $changeset2) = $this->extraUpdates[$oid]; + + $extraUpdate = array($entity, $changeset + $changeset2); + } + + $this->extraUpdates[$oid] = $extraUpdate; + } + + /** + * Checks whether an entity is registered as dirty in the unit of work. + * Note: Is not very useful currently as dirty entities are only registered + * at commit time. + * + * @param object $entity + * + * @return boolean + */ + public function isScheduledForUpdate($entity) + { + return isset($this->entityUpdates[spl_object_hash($entity)]); + } + + /** + * Checks whether an entity is registered to be checked in the unit of work. + * + * @param object $entity + * + * @return boolean + */ + public function isScheduledForDirtyCheck($entity) + { + $rootEntityName = $this->em->getClassMetadata(get_class($entity))->rootEntityName; + + return isset($this->scheduledForSynchronization[$rootEntityName][spl_object_hash($entity)]); + } + + /** + * INTERNAL: + * Schedules an entity for deletion. + * + * @param object $entity + * + * @return void + */ + public function scheduleForDelete($entity) + { + $oid = spl_object_hash($entity); + + if (isset($this->entityInsertions[$oid])) { + if ($this->isInIdentityMap($entity)) { + $this->removeFromIdentityMap($entity); + } + + unset($this->entityInsertions[$oid], $this->entityStates[$oid]); + + return; // entity has not been persisted yet, so nothing more to do. + } + + if ( ! $this->isInIdentityMap($entity)) { + return; + } + + $this->removeFromIdentityMap($entity); + + if (isset($this->entityUpdates[$oid])) { + unset($this->entityUpdates[$oid]); + } + + if ( ! isset($this->entityDeletions[$oid])) { + $this->entityDeletions[$oid] = $entity; + $this->entityStates[$oid] = self::STATE_REMOVED; + } + } + + /** + * Checks whether an entity is registered as removed/deleted with the unit + * of work. + * + * @param object $entity + * + * @return boolean + */ + public function isScheduledForDelete($entity) + { + return isset($this->entityDeletions[spl_object_hash($entity)]); + } + + /** + * Checks whether an entity is scheduled for insertion, update or deletion. + * + * @param object $entity + * + * @return boolean + */ + public function isEntityScheduled($entity) + { + $oid = spl_object_hash($entity); + + return isset($this->entityInsertions[$oid]) + || isset($this->entityUpdates[$oid]) + || isset($this->entityDeletions[$oid]); + } + + /** + * INTERNAL: + * Registers an entity in the identity map. + * Note that entities in a hierarchy are registered with the class name of + * the root entity. + * + * @ignore + * + * @param object $entity The entity to register. + * + * @return boolean TRUE if the registration was successful, FALSE if the identity of + * the entity in question is already managed. + * + * @throws ORMInvalidArgumentException + */ + public function addToIdentityMap($entity) + { + $classMetadata = $this->em->getClassMetadata(get_class($entity)); + $idHash = implode(' ', $this->entityIdentifiers[spl_object_hash($entity)]); + + if ($idHash === '') { + throw ORMInvalidArgumentException::entityWithoutIdentity($classMetadata->name, $entity); + } + + $className = $classMetadata->rootEntityName; + + if (isset($this->identityMap[$className][$idHash])) { + return false; + } + + $this->identityMap[$className][$idHash] = $entity; + + return true; + } + + /** + * Gets the state of an entity with regard to the current unit of work. + * + * @param object $entity + * @param int|null $assume The state to assume if the state is not yet known (not MANAGED or REMOVED). + * This parameter can be set to improve performance of entity state detection + * by potentially avoiding a database lookup if the distinction between NEW and DETACHED + * is either known or does not matter for the caller of the method. + * + * @return int The entity state. + */ + public function getEntityState($entity, $assume = null) + { + $oid = spl_object_hash($entity); + + if (isset($this->entityStates[$oid])) { + return $this->entityStates[$oid]; + } + + if ($assume !== null) { + return $assume; + } + + // State can only be NEW or DETACHED, because MANAGED/REMOVED states are known. + // Note that you can not remember the NEW or DETACHED state in _entityStates since + // the UoW does not hold references to such objects and the object hash can be reused. + // More generally because the state may "change" between NEW/DETACHED without the UoW being aware of it. + $class = $this->em->getClassMetadata(get_class($entity)); + $id = $class->getIdentifierValues($entity); + + if ( ! $id) { + return self::STATE_NEW; + } + + if ($class->containsForeignIdentifier) { + $id = $this->identifierFlattener->flattenIdentifier($class, $id); + } + + switch (true) { + case ($class->isIdentifierNatural()): + // Check for a version field, if available, to avoid a db lookup. + if ($class->isVersioned) { + return ($class->getFieldValue($entity, $class->versionField)) + ? self::STATE_DETACHED + : self::STATE_NEW; + } + + // Last try before db lookup: check the identity map. + if ($this->tryGetById($id, $class->rootEntityName)) { + return self::STATE_DETACHED; + } + + // db lookup + if ($this->getEntityPersister($class->name)->exists($entity)) { + return self::STATE_DETACHED; + } + + return self::STATE_NEW; + + case ( ! $class->idGenerator->isPostInsertGenerator()): + // if we have a pre insert generator we can't be sure that having an id + // really means that the entity exists. We have to verify this through + // the last resort: a db lookup + + // Last try before db lookup: check the identity map. + if ($this->tryGetById($id, $class->rootEntityName)) { + return self::STATE_DETACHED; + } + + // db lookup + if ($this->getEntityPersister($class->name)->exists($entity)) { + return self::STATE_DETACHED; + } + + return self::STATE_NEW; + + default: + return self::STATE_DETACHED; + } + } + + /** + * INTERNAL: + * Removes an entity from the identity map. This effectively detaches the + * entity from the persistence management of Doctrine. + * + * @ignore + * + * @param object $entity + * + * @return boolean + * + * @throws ORMInvalidArgumentException + */ + public function removeFromIdentityMap($entity) + { + $oid = spl_object_hash($entity); + $classMetadata = $this->em->getClassMetadata(get_class($entity)); + $idHash = implode(' ', $this->entityIdentifiers[$oid]); + + if ($idHash === '') { + throw ORMInvalidArgumentException::entityHasNoIdentity($entity, "remove from identity map"); + } + + $className = $classMetadata->rootEntityName; + + if (isset($this->identityMap[$className][$idHash])) { + unset($this->identityMap[$className][$idHash]); + unset($this->readOnlyObjects[$oid]); + + //$this->entityStates[$oid] = self::STATE_DETACHED; + + return true; + } + + return false; + } + + /** + * INTERNAL: + * Gets an entity in the identity map by its identifier hash. + * + * @ignore + * + * @param string $idHash + * @param string $rootClassName + * + * @return object + */ + public function getByIdHash($idHash, $rootClassName) + { + return $this->identityMap[$rootClassName][$idHash]; + } + + /** + * INTERNAL: + * Tries to get an entity by its identifier hash. If no entity is found for + * the given hash, FALSE is returned. + * + * @ignore + * + * @param mixed $idHash (must be possible to cast it to string) + * @param string $rootClassName + * + * @return object|bool The found entity or FALSE. + */ + public function tryGetByIdHash($idHash, $rootClassName) + { + $stringIdHash = (string) $idHash; + + if (isset($this->identityMap[$rootClassName][$stringIdHash])) { + return $this->identityMap[$rootClassName][$stringIdHash]; + } + + return false; + } + + /** + * Checks whether an entity is registered in the identity map of this UnitOfWork. + * + * @param object $entity + * + * @return boolean + */ + public function isInIdentityMap($entity) + { + $oid = spl_object_hash($entity); + + if ( ! isset($this->entityIdentifiers[$oid])) { + return false; + } + + $classMetadata = $this->em->getClassMetadata(get_class($entity)); + $idHash = implode(' ', $this->entityIdentifiers[$oid]); + + if ($idHash === '') { + return false; + } + + return isset($this->identityMap[$classMetadata->rootEntityName][$idHash]); + } + + /** + * INTERNAL: + * Checks whether an identifier hash exists in the identity map. + * + * @ignore + * + * @param string $idHash + * @param string $rootClassName + * + * @return boolean + */ + public function containsIdHash($idHash, $rootClassName) + { + return isset($this->identityMap[$rootClassName][$idHash]); + } + + /** + * Persists an entity as part of the current unit of work. + * + * @param object $entity The entity to persist. + * + * @return void + */ + public function persist($entity) + { + $visited = array(); + + $this->doPersist($entity, $visited); + } + + /** + * Persists an entity as part of the current unit of work. + * + * This method is internally called during persist() cascades as it tracks + * the already visited entities to prevent infinite recursions. + * + * @param object $entity The entity to persist. + * @param array $visited The already visited entities. + * + * @return void + * + * @throws ORMInvalidArgumentException + * @throws UnexpectedValueException + */ + private function doPersist($entity, array &$visited) + { + $oid = spl_object_hash($entity); + + if (isset($visited[$oid])) { + return; // Prevent infinite recursion + } + + $visited[$oid] = $entity; // Mark visited + + $class = $this->em->getClassMetadata(get_class($entity)); + + // We assume NEW, so DETACHED entities result in an exception on flush (constraint violation). + // If we would detect DETACHED here we would throw an exception anyway with the same + // consequences (not recoverable/programming error), so just assuming NEW here + // lets us avoid some database lookups for entities with natural identifiers. + $entityState = $this->getEntityState($entity, self::STATE_NEW); + + switch ($entityState) { + case self::STATE_MANAGED: + // Nothing to do, except if policy is "deferred explicit" + if ($class->isChangeTrackingDeferredExplicit()) { + $this->scheduleForDirtyCheck($entity); + } + break; + + case self::STATE_NEW: + $this->persistNew($class, $entity); + break; + + case self::STATE_REMOVED: + // Entity becomes managed again + unset($this->entityDeletions[$oid]); + $this->addToIdentityMap($entity); + + $this->entityStates[$oid] = self::STATE_MANAGED; + break; + + case self::STATE_DETACHED: + // Can actually not happen right now since we assume STATE_NEW. + throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted"); + + default: + throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); + } + + $this->cascadePersist($entity, $visited); + } + + /** + * Deletes an entity as part of the current unit of work. + * + * @param object $entity The entity to remove. + * + * @return void + */ + public function remove($entity) + { + $visited = array(); + + $this->doRemove($entity, $visited); + } + + /** + * Deletes an entity as part of the current unit of work. + * + * This method is internally called during delete() cascades as it tracks + * the already visited entities to prevent infinite recursions. + * + * @param object $entity The entity to delete. + * @param array $visited The map of the already visited entities. + * + * @return void + * + * @throws ORMInvalidArgumentException If the instance is a detached entity. + * @throws UnexpectedValueException + */ + private function doRemove($entity, array &$visited) + { + $oid = spl_object_hash($entity); + + if (isset($visited[$oid])) { + return; // Prevent infinite recursion + } + + $visited[$oid] = $entity; // mark visited + + // Cascade first, because scheduleForDelete() removes the entity from the identity map, which + // can cause problems when a lazy proxy has to be initialized for the cascade operation. + $this->cascadeRemove($entity, $visited); + + $class = $this->em->getClassMetadata(get_class($entity)); + $entityState = $this->getEntityState($entity); + + switch ($entityState) { + case self::STATE_NEW: + case self::STATE_REMOVED: + // nothing to do + break; + + case self::STATE_MANAGED: + $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::preRemove); + + if ($invoke !== ListenersInvoker::INVOKE_NONE) { + $this->listenersInvoker->invoke($class, Events::preRemove, $entity, new LifecycleEventArgs($entity, $this->em), $invoke); + } + + $this->scheduleForDelete($entity); + break; + + case self::STATE_DETACHED: + throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed"); + default: + throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); + } + + } + + /** + * Merges the state of the given detached entity into this UnitOfWork. + * + * @param object $entity + * + * @return object The managed copy of the entity. + * + * @throws OptimisticLockException If the entity uses optimistic locking through a version + * attribute and the version check against the managed copy fails. + * + * @todo Require active transaction!? OptimisticLockException may result in undefined state!? + */ + public function merge($entity) + { + $visited = array(); + + return $this->doMerge($entity, $visited); + } + + /** + * Executes a merge operation on an entity. + * + * @param object $entity + * @param array $visited + * @param object|null $prevManagedCopy + * @param array|null $assoc + * + * @return object The managed copy of the entity. + * + * @throws OptimisticLockException If the entity uses optimistic locking through a version + * attribute and the version check against the managed copy fails. + * @throws ORMInvalidArgumentException If the entity instance is NEW. + * @throws EntityNotFoundException if an assigned identifier is used in the entity, but none is provided + */ + private function doMerge($entity, array &$visited, $prevManagedCopy = null, $assoc = null) + { + $oid = spl_object_hash($entity); + + if (isset($visited[$oid])) { + $managedCopy = $visited[$oid]; + + if ($prevManagedCopy !== null) { + $this->updateAssociationWithMergedEntity($entity, $assoc, $prevManagedCopy, $managedCopy); + } + + return $managedCopy; + } + + $class = $this->em->getClassMetadata(get_class($entity)); + + // First we assume DETACHED, although it can still be NEW but we can avoid + // an extra db-roundtrip this way. If it is not MANAGED but has an identity, + // we need to fetch it from the db anyway in order to merge. + // MANAGED entities are ignored by the merge operation. + $managedCopy = $entity; + + if ($this->getEntityState($entity, self::STATE_DETACHED) !== self::STATE_MANAGED) { + // Try to look the entity up in the identity map. + $id = $class->getIdentifierValues($entity); + + // If there is no ID, it is actually NEW. + if ( ! $id) { + $managedCopy = $this->newInstance($class); + + $this->mergeEntityStateIntoManagedCopy($entity, $managedCopy); + $this->persistNew($class, $managedCopy); + } else { + $flatId = ($class->containsForeignIdentifier) + ? $this->identifierFlattener->flattenIdentifier($class, $id) + : $id; + + $managedCopy = $this->tryGetById($flatId, $class->rootEntityName); + + if ($managedCopy) { + // We have the entity in-memory already, just make sure its not removed. + if ($this->getEntityState($managedCopy) == self::STATE_REMOVED) { + throw ORMInvalidArgumentException::entityIsRemoved($managedCopy, "merge"); + } + } else { + // We need to fetch the managed copy in order to merge. + $managedCopy = $this->em->find($class->name, $flatId); + } + + if ($managedCopy === null) { + // If the identifier is ASSIGNED, it is NEW, otherwise an error + // since the managed entity was not found. + if ( ! $class->isIdentifierNatural()) { + throw EntityNotFoundException::fromClassNameAndIdentifier( + $class->getName(), + $this->identifierFlattener->flattenIdentifier($class, $id) + ); + } + + $managedCopy = $this->newInstance($class); + $class->setIdentifierValues($managedCopy, $id); + + $this->mergeEntityStateIntoManagedCopy($entity, $managedCopy); + $this->persistNew($class, $managedCopy); + } else { + $this->ensureVersionMatch($class, $entity, $managedCopy); + $this->mergeEntityStateIntoManagedCopy($entity, $managedCopy); + } + } + + $visited[$oid] = $managedCopy; // mark visited + + if ($class->isChangeTrackingDeferredExplicit()) { + $this->scheduleForDirtyCheck($entity); + } + } + + if ($prevManagedCopy !== null) { + $this->updateAssociationWithMergedEntity($entity, $assoc, $prevManagedCopy, $managedCopy); + } + + // Mark the managed copy visited as well + $visited[spl_object_hash($managedCopy)] = $managedCopy; + + $this->cascadeMerge($entity, $managedCopy, $visited); + + return $managedCopy; + } + + /** + * @param ClassMetadata $class + * @param object $entity + * @param object $managedCopy + * + * @return void + * + * @throws OptimisticLockException + */ + private function ensureVersionMatch(ClassMetadata $class, $entity, $managedCopy) + { + if (! ($class->isVersioned && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) { + return; + } + + $reflField = $class->reflFields[$class->versionField]; + $managedCopyVersion = $reflField->getValue($managedCopy); + $entityVersion = $reflField->getValue($entity); + + // Throw exception if versions don't match. + if ($managedCopyVersion == $entityVersion) { + return; + } + + throw OptimisticLockException::lockFailedVersionMismatch($entity, $entityVersion, $managedCopyVersion); + } + + /** + * Tests if an entity is loaded - must either be a loaded proxy or not a proxy + * + * @param object $entity + * + * @return bool + */ + private function isLoaded($entity) + { + return !($entity instanceof Proxy) || $entity->__isInitialized(); + } + + /** + * Sets/adds associated managed copies into the previous entity's association field + * + * @param object $entity + * @param array $association + * @param object $previousManagedCopy + * @param object $managedCopy + * + * @return void + */ + private function updateAssociationWithMergedEntity($entity, array $association, $previousManagedCopy, $managedCopy) + { + $assocField = $association['fieldName']; + $prevClass = $this->em->getClassMetadata(get_class($previousManagedCopy)); + + if ($association['type'] & ClassMetadata::TO_ONE) { + $prevClass->reflFields[$assocField]->setValue($previousManagedCopy, $managedCopy); + + return; + } + + $value = $prevClass->reflFields[$assocField]->getValue($previousManagedCopy); + $value[] = $managedCopy; + + if ($association['type'] == ClassMetadata::ONE_TO_MANY) { + $class = $this->em->getClassMetadata(get_class($entity)); + + $class->reflFields[$association['mappedBy']]->setValue($managedCopy, $previousManagedCopy); + } + } + + /** + * Detaches an entity from the persistence management. It's persistence will + * no longer be managed by Doctrine. + * + * @param object $entity The entity to detach. + * + * @return void + */ + public function detach($entity) + { + $visited = array(); + + $this->doDetach($entity, $visited); + } + + /** + * Executes a detach operation on the given entity. + * + * @param object $entity + * @param array $visited + * @param boolean $noCascade if true, don't cascade detach operation. + * + * @return void + */ + private function doDetach($entity, array &$visited, $noCascade = false) + { + $oid = spl_object_hash($entity); + + if (isset($visited[$oid])) { + return; // Prevent infinite recursion + } + + $visited[$oid] = $entity; // mark visited + + switch ($this->getEntityState($entity, self::STATE_DETACHED)) { + case self::STATE_MANAGED: + if ($this->isInIdentityMap($entity)) { + $this->removeFromIdentityMap($entity); + } + + unset( + $this->entityInsertions[$oid], + $this->entityUpdates[$oid], + $this->entityDeletions[$oid], + $this->entityIdentifiers[$oid], + $this->entityStates[$oid], + $this->originalEntityData[$oid] + ); + break; + case self::STATE_NEW: + case self::STATE_DETACHED: + return; + } + + if ( ! $noCascade) { + $this->cascadeDetach($entity, $visited); + } + } + + /** + * Refreshes the state of the given entity from the database, overwriting + * any local, unpersisted changes. + * + * @param object $entity The entity to refresh. + * + * @return void + * + * @throws InvalidArgumentException If the entity is not MANAGED. + */ + public function refresh($entity) + { + $visited = array(); + + $this->doRefresh($entity, $visited); + } + + /** + * Executes a refresh operation on an entity. + * + * @param object $entity The entity to refresh. + * @param array $visited The already visited entities during cascades. + * + * @return void + * + * @throws ORMInvalidArgumentException If the entity is not MANAGED. + */ + private function doRefresh($entity, array &$visited) + { + $oid = spl_object_hash($entity); + + if (isset($visited[$oid])) { + return; // Prevent infinite recursion + } + + $visited[$oid] = $entity; // mark visited + + $class = $this->em->getClassMetadata(get_class($entity)); + + if ($this->getEntityState($entity) !== self::STATE_MANAGED) { + throw ORMInvalidArgumentException::entityNotManaged($entity); + } + + $this->getEntityPersister($class->name)->refresh( + array_combine($class->getIdentifierFieldNames(), $this->entityIdentifiers[$oid]), + $entity + ); + + $this->cascadeRefresh($entity, $visited); + } + + /** + * Cascades a refresh operation to associated entities. + * + * @param object $entity + * @param array $visited + * + * @return void + */ + private function cascadeRefresh($entity, array &$visited) + { + $class = $this->em->getClassMetadata(get_class($entity)); + + $associationMappings = array_filter( + $class->associationMappings, + function ($assoc) { return $assoc['isCascadeRefresh']; } + ); + + foreach ($associationMappings as $assoc) { + $relatedEntities = $class->reflFields[$assoc['fieldName']]->getValue($entity); + + switch (true) { + case ($relatedEntities instanceof PersistentCollection): + // Unwrap so that foreach() does not initialize + $relatedEntities = $relatedEntities->unwrap(); + // break; is commented intentionally! + + case ($relatedEntities instanceof Collection): + case (is_array($relatedEntities)): + foreach ($relatedEntities as $relatedEntity) { + $this->doRefresh($relatedEntity, $visited); + } + break; + + case ($relatedEntities !== null): + $this->doRefresh($relatedEntities, $visited); + break; + + default: + // Do nothing + } + } + } + + /** + * Cascades a detach operation to associated entities. + * + * @param object $entity + * @param array $visited + * + * @return void + */ + private function cascadeDetach($entity, array &$visited) + { + $class = $this->em->getClassMetadata(get_class($entity)); + + $associationMappings = array_filter( + $class->associationMappings, + function ($assoc) { return $assoc['isCascadeDetach']; } + ); + + foreach ($associationMappings as $assoc) { + $relatedEntities = $class->reflFields[$assoc['fieldName']]->getValue($entity); + + switch (true) { + case ($relatedEntities instanceof PersistentCollection): + // Unwrap so that foreach() does not initialize + $relatedEntities = $relatedEntities->unwrap(); + // break; is commented intentionally! + + case ($relatedEntities instanceof Collection): + case (is_array($relatedEntities)): + foreach ($relatedEntities as $relatedEntity) { + $this->doDetach($relatedEntity, $visited); + } + break; + + case ($relatedEntities !== null): + $this->doDetach($relatedEntities, $visited); + break; + + default: + // Do nothing + } + } + } + + /** + * Cascades a merge operation to associated entities. + * + * @param object $entity + * @param object $managedCopy + * @param array $visited + * + * @return void + */ + private function cascadeMerge($entity, $managedCopy, array &$visited) + { + $class = $this->em->getClassMetadata(get_class($entity)); + + $associationMappings = array_filter( + $class->associationMappings, + function ($assoc) { return $assoc['isCascadeMerge']; } + ); + + foreach ($associationMappings as $assoc) { + $relatedEntities = $class->reflFields[$assoc['fieldName']]->getValue($entity); + + if ($relatedEntities instanceof Collection) { + if ($relatedEntities === $class->reflFields[$assoc['fieldName']]->getValue($managedCopy)) { + continue; + } + + if ($relatedEntities instanceof PersistentCollection) { + // Unwrap so that foreach() does not initialize + $relatedEntities = $relatedEntities->unwrap(); + } + + foreach ($relatedEntities as $relatedEntity) { + $this->doMerge($relatedEntity, $visited, $managedCopy, $assoc); + } + } else if ($relatedEntities !== null) { + $this->doMerge($relatedEntities, $visited, $managedCopy, $assoc); + } + } + } + + /** + * Cascades the save operation to associated entities. + * + * @param object $entity + * @param array $visited + * + * @return void + */ + private function cascadePersist($entity, array &$visited) + { + $class = $this->em->getClassMetadata(get_class($entity)); + + $associationMappings = array_filter( + $class->associationMappings, + function ($assoc) { return $assoc['isCascadePersist']; } + ); + + foreach ($associationMappings as $assoc) { + $relatedEntities = $class->reflFields[$assoc['fieldName']]->getValue($entity); + + switch (true) { + case ($relatedEntities instanceof PersistentCollection): + // Unwrap so that foreach() does not initialize + $relatedEntities = $relatedEntities->unwrap(); + // break; is commented intentionally! + + case ($relatedEntities instanceof Collection): + case (is_array($relatedEntities)): + if (($assoc['type'] & ClassMetadata::TO_MANY) <= 0) { + throw ORMInvalidArgumentException::invalidAssociation( + $this->em->getClassMetadata($assoc['targetEntity']), + $assoc, + $relatedEntities + ); + } + + foreach ($relatedEntities as $relatedEntity) { + $this->doPersist($relatedEntity, $visited); + } + + break; + + case ($relatedEntities !== null): + if (! $relatedEntities instanceof $assoc['targetEntity']) { + throw ORMInvalidArgumentException::invalidAssociation( + $this->em->getClassMetadata($assoc['targetEntity']), + $assoc, + $relatedEntities + ); + } + + $this->doPersist($relatedEntities, $visited); + break; + + default: + // Do nothing + } + } + } + + /** + * Cascades the delete operation to associated entities. + * + * @param object $entity + * @param array $visited + * + * @return void + */ + private function cascadeRemove($entity, array &$visited) + { + $class = $this->em->getClassMetadata(get_class($entity)); + + $associationMappings = array_filter( + $class->associationMappings, + function ($assoc) { return $assoc['isCascadeRemove']; } + ); + + $entitiesToCascade = array(); + + foreach ($associationMappings as $assoc) { + if ($entity instanceof Proxy && !$entity->__isInitialized__) { + $entity->__load(); + } + + $relatedEntities = $class->reflFields[$assoc['fieldName']]->getValue($entity); + + switch (true) { + case ($relatedEntities instanceof Collection): + case (is_array($relatedEntities)): + // If its a PersistentCollection initialization is intended! No unwrap! + foreach ($relatedEntities as $relatedEntity) { + $entitiesToCascade[] = $relatedEntity; + } + break; + + case ($relatedEntities !== null): + $entitiesToCascade[] = $relatedEntities; + break; + + default: + // Do nothing + } + } + + foreach ($entitiesToCascade as $relatedEntity) { + $this->doRemove($relatedEntity, $visited); + } + } + + /** + * Acquire a lock on the given entity. + * + * @param object $entity + * @param int $lockMode + * @param int $lockVersion + * + * @return void + * + * @throws ORMInvalidArgumentException + * @throws TransactionRequiredException + * @throws OptimisticLockException + */ + public function lock($entity, $lockMode, $lockVersion = null) + { + if ($entity === null) { + throw new \InvalidArgumentException("No entity passed to UnitOfWork#lock()."); + } + + if ($this->getEntityState($entity, self::STATE_DETACHED) != self::STATE_MANAGED) { + throw ORMInvalidArgumentException::entityNotManaged($entity); + } + + $class = $this->em->getClassMetadata(get_class($entity)); + + switch (true) { + case LockMode::OPTIMISTIC === $lockMode: + if ( ! $class->isVersioned) { + throw OptimisticLockException::notVersioned($class->name); + } + + if ($lockVersion === null) { + return; + } + + if ($entity instanceof Proxy && !$entity->__isInitialized__) { + $entity->__load(); + } + + $entityVersion = $class->reflFields[$class->versionField]->getValue($entity); + + if ($entityVersion != $lockVersion) { + throw OptimisticLockException::lockFailedVersionMismatch($entity, $lockVersion, $entityVersion); + } + + break; + + case LockMode::NONE === $lockMode: + case LockMode::PESSIMISTIC_READ === $lockMode: + case LockMode::PESSIMISTIC_WRITE === $lockMode: + if (!$this->em->getConnection()->isTransactionActive()) { + throw TransactionRequiredException::transactionRequired(); + } + + $oid = spl_object_hash($entity); + + $this->getEntityPersister($class->name)->lock( + array_combine($class->getIdentifierFieldNames(), $this->entityIdentifiers[$oid]), + $lockMode + ); + break; + + default: + // Do nothing + } + } + + /** + * Gets the CommitOrderCalculator used by the UnitOfWork to order commits. + * + * @return \Doctrine\ORM\Internal\CommitOrderCalculator + */ + public function getCommitOrderCalculator() + { + if ($this->commitOrderCalculator === null) { + $this->commitOrderCalculator = new Internal\CommitOrderCalculator; + } + + return $this->commitOrderCalculator; + } + + /** + * Clears the UnitOfWork. + * + * @param string|null $entityName if given, only entities of this type will get detached. + * + * @return void + */ + public function clear($entityName = null) + { + if ($entityName === null) { + $this->identityMap = + $this->entityIdentifiers = + $this->originalEntityData = + $this->entityChangeSets = + $this->entityStates = + $this->scheduledForSynchronization = + $this->entityInsertions = + $this->entityUpdates = + $this->entityDeletions = + $this->collectionDeletions = + $this->collectionUpdates = + $this->extraUpdates = + $this->readOnlyObjects = + $this->visitedCollections = + $this->orphanRemovals = array(); + + if ($this->commitOrderCalculator !== null) { + $this->commitOrderCalculator->clear(); + } + } else { + $this->clearIdentityMapForEntityName($entityName); + $this->clearEntityInsertionsForEntityName($entityName); + } + + if ($this->evm->hasListeners(Events::onClear)) { + $this->evm->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this->em, $entityName)); + } + } + + /** + * INTERNAL: + * Schedules an orphaned entity for removal. The remove() operation will be + * invoked on that entity at the beginning of the next commit of this + * UnitOfWork. + * + * @ignore + * + * @param object $entity + * + * @return void + */ + public function scheduleOrphanRemoval($entity) + { + $this->orphanRemovals[spl_object_hash($entity)] = $entity; + } + + /** + * INTERNAL: + * Schedules a complete collection for removal when this UnitOfWork commits. + * + * @param PersistentCollection $coll + * + * @return void + */ + public function scheduleCollectionDeletion(PersistentCollection $coll) + { + $coid = spl_object_hash($coll); + + // TODO: if $coll is already scheduled for recreation ... what to do? + // Just remove $coll from the scheduled recreations? + if (isset($this->collectionUpdates[$coid])) { + unset($this->collectionUpdates[$coid]); + } + + $this->collectionDeletions[$coid] = $coll; + } + + /** + * @param PersistentCollection $coll + * + * @return bool + */ + public function isCollectionScheduledForDeletion(PersistentCollection $coll) + { + return isset($this->collectionDeletions[spl_object_hash($coll)]); + } + + /** + * @param ClassMetadata $class + * + * @return \Doctrine\Common\Persistence\ObjectManagerAware|object + */ + private function newInstance($class) + { + $entity = $class->newInstance(); + + if ($entity instanceof \Doctrine\Common\Persistence\ObjectManagerAware) { + $entity->injectObjectManager($this->em, $class); + } + + return $entity; + } + + /** + * INTERNAL: + * Creates an entity. Used for reconstitution of persistent entities. + * + * Internal note: Highly performance-sensitive method. + * + * @ignore + * + * @param string $className The name of the entity class. + * @param array $data The data for the entity. + * @param array $hints Any hints to account for during reconstitution/lookup of the entity. + * + * @return object The managed entity instance. + * + * @todo Rename: getOrCreateEntity + */ + public function createEntity($className, array $data, &$hints = array()) + { + $class = $this->em->getClassMetadata($className); + //$isReadOnly = isset($hints[Query::HINT_READ_ONLY]); + + $id = $this->identifierFlattener->flattenIdentifier($class, $data); + $idHash = implode(' ', $id); + + if (isset($this->identityMap[$class->rootEntityName][$idHash])) { + $entity = $this->identityMap[$class->rootEntityName][$idHash]; + $oid = spl_object_hash($entity); + + if ( + isset($hints[Query::HINT_REFRESH]) + && isset($hints[Query::HINT_REFRESH_ENTITY]) + && ($unmanagedProxy = $hints[Query::HINT_REFRESH_ENTITY]) !== $entity + && $unmanagedProxy instanceof Proxy + && $this->isIdentifierEquals($unmanagedProxy, $entity) + ) { + // DDC-1238 - we have a managed instance, but it isn't the provided one. + // Therefore we clear its identifier. Also, we must re-fetch metadata since the + // refreshed object may be anything + + foreach ($class->identifier as $fieldName) { + $class->reflFields[$fieldName]->setValue($unmanagedProxy, null); + } + + return $unmanagedProxy; + } + + if ($entity instanceof Proxy && ! $entity->__isInitialized()) { + $entity->__setInitialized(true); + + $overrideLocalValues = true; + + if ($entity instanceof NotifyPropertyChanged) { + $entity->addPropertyChangedListener($this); + } + } else { + $overrideLocalValues = isset($hints[Query::HINT_REFRESH]); + + // If only a specific entity is set to refresh, check that it's the one + if (isset($hints[Query::HINT_REFRESH_ENTITY])) { + $overrideLocalValues = $hints[Query::HINT_REFRESH_ENTITY] === $entity; + } + } + + if ($overrideLocalValues) { + // inject ObjectManager upon refresh. + if ($entity instanceof ObjectManagerAware) { + $entity->injectObjectManager($this->em, $class); + } + + $this->originalEntityData[$oid] = $data; + } + } else { + $entity = $this->newInstance($class); + $oid = spl_object_hash($entity); + + $this->entityIdentifiers[$oid] = $id; + $this->entityStates[$oid] = self::STATE_MANAGED; + $this->originalEntityData[$oid] = $data; + + $this->identityMap[$class->rootEntityName][$idHash] = $entity; + + if ($entity instanceof NotifyPropertyChanged) { + $entity->addPropertyChangedListener($this); + } + + $overrideLocalValues = true; + } + + if ( ! $overrideLocalValues) { + return $entity; + } + + foreach ($data as $field => $value) { + if (isset($class->fieldMappings[$field])) { + $class->reflFields[$field]->setValue($entity, $value); + } + } + + // Loading the entity right here, if its in the eager loading map get rid of it there. + unset($this->eagerLoadingEntities[$class->rootEntityName][$idHash]); + + if (isset($this->eagerLoadingEntities[$class->rootEntityName]) && ! $this->eagerLoadingEntities[$class->rootEntityName]) { + unset($this->eagerLoadingEntities[$class->rootEntityName]); + } + + // Properly initialize any unfetched associations, if partial objects are not allowed. + if (isset($hints[Query::HINT_FORCE_PARTIAL_LOAD])) { + return $entity; + } + + foreach ($class->associationMappings as $field => $assoc) { + // Check if the association is not among the fetch-joined associations already. + if (isset($hints['fetchAlias']) && isset($hints['fetched'][$hints['fetchAlias']][$field])) { + continue; + } + + $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); + + switch (true) { + case ($assoc['type'] & ClassMetadata::TO_ONE): + if ( ! $assoc['isOwningSide']) { + + // use the given entity association + if (isset($data[$field]) && is_object($data[$field]) && isset($this->entityStates[spl_object_hash($data[$field])])) { + + $this->originalEntityData[$oid][$field] = $data[$field]; + + $class->reflFields[$field]->setValue($entity, $data[$field]); + $targetClass->reflFields[$assoc['mappedBy']]->setValue($data[$field], $entity); + + continue 2; + } + + // Inverse side of x-to-one can never be lazy + $class->reflFields[$field]->setValue($entity, $this->getEntityPersister($assoc['targetEntity'])->loadOneToOneEntity($assoc, $entity)); + + continue 2; + } + + // use the entity association + if (isset($data[$field]) && is_object($data[$field]) && isset($this->entityStates[spl_object_hash($data[$field])])) { + $class->reflFields[$field]->setValue($entity, $data[$field]); + $this->originalEntityData[$oid][$field] = $data[$field]; + + continue; + } + + $associatedId = array(); + + // TODO: Is this even computed right in all cases of composite keys? + foreach ($assoc['targetToSourceKeyColumns'] as $targetColumn => $srcColumn) { + $joinColumnValue = isset($data[$srcColumn]) ? $data[$srcColumn] : null; + + if ($joinColumnValue !== null) { + if ($targetClass->containsForeignIdentifier) { + $associatedId[$targetClass->getFieldForColumn($targetColumn)] = $joinColumnValue; + } else { + $associatedId[$targetClass->fieldNames[$targetColumn]] = $joinColumnValue; + } + } elseif ($targetClass->containsForeignIdentifier + && in_array($targetClass->getFieldForColumn($targetColumn), $targetClass->identifier, true) + ) { + // the missing key is part of target's entity primary key + $associatedId = array(); + break; + } + } + + if ( ! $associatedId) { + // Foreign key is NULL + $class->reflFields[$field]->setValue($entity, null); + $this->originalEntityData[$oid][$field] = null; + + continue; + } + + if ( ! isset($hints['fetchMode'][$class->name][$field])) { + $hints['fetchMode'][$class->name][$field] = $assoc['fetch']; + } + + // Foreign key is set + // Check identity map first + // FIXME: Can break easily with composite keys if join column values are in + // wrong order. The correct order is the one in ClassMetadata#identifier. + $relatedIdHash = implode(' ', $associatedId); + + switch (true) { + case (isset($this->identityMap[$targetClass->rootEntityName][$relatedIdHash])): + $newValue = $this->identityMap[$targetClass->rootEntityName][$relatedIdHash]; + + // If this is an uninitialized proxy, we are deferring eager loads, + // this association is marked as eager fetch, and its an uninitialized proxy (wtf!) + // then we can append this entity for eager loading! + if ($hints['fetchMode'][$class->name][$field] == ClassMetadata::FETCH_EAGER && + isset($hints[self::HINT_DEFEREAGERLOAD]) && + !$targetClass->isIdentifierComposite && + $newValue instanceof Proxy && + $newValue->__isInitialized__ === false) { + + $this->eagerLoadingEntities[$targetClass->rootEntityName][$relatedIdHash] = current($associatedId); + } + + break; + + case ($targetClass->subClasses): + // If it might be a subtype, it can not be lazy. There isn't even + // a way to solve this with deferred eager loading, which means putting + // an entity with subclasses at a *-to-one location is really bad! (performance-wise) + $newValue = $this->getEntityPersister($assoc['targetEntity'])->loadOneToOneEntity($assoc, $entity, $associatedId); + break; + + default: + switch (true) { + // We are negating the condition here. Other cases will assume it is valid! + case ($hints['fetchMode'][$class->name][$field] !== ClassMetadata::FETCH_EAGER): + $newValue = $this->em->getProxyFactory()->getProxy($assoc['targetEntity'], $associatedId); + break; + + // Deferred eager load only works for single identifier classes + case (isset($hints[self::HINT_DEFEREAGERLOAD]) && ! $targetClass->isIdentifierComposite): + // TODO: Is there a faster approach? + $this->eagerLoadingEntities[$targetClass->rootEntityName][$relatedIdHash] = current($associatedId); + + $newValue = $this->em->getProxyFactory()->getProxy($assoc['targetEntity'], $associatedId); + break; + + default: + // TODO: This is very imperformant, ignore it? + $newValue = $this->em->find($assoc['targetEntity'], $associatedId); + break; + } + + // PERF: Inlined & optimized code from UnitOfWork#registerManaged() + $newValueOid = spl_object_hash($newValue); + $this->entityIdentifiers[$newValueOid] = $associatedId; + $this->identityMap[$targetClass->rootEntityName][$relatedIdHash] = $newValue; + + if ( + $newValue instanceof NotifyPropertyChanged && + ( ! $newValue instanceof Proxy || $newValue->__isInitialized()) + ) { + $newValue->addPropertyChangedListener($this); + } + $this->entityStates[$newValueOid] = self::STATE_MANAGED; + // make sure that when an proxy is then finally loaded, $this->originalEntityData is set also! + break; + } + + $this->originalEntityData[$oid][$field] = $newValue; + $class->reflFields[$field]->setValue($entity, $newValue); + + if ($assoc['inversedBy'] && $assoc['type'] & ClassMetadata::ONE_TO_ONE) { + $inverseAssoc = $targetClass->associationMappings[$assoc['inversedBy']]; + $targetClass->reflFields[$inverseAssoc['fieldName']]->setValue($newValue, $entity); + } + + break; + + default: + // Ignore if its a cached collection + if (isset($hints[Query::HINT_CACHE_ENABLED]) && $class->getFieldValue($entity, $field) instanceof PersistentCollection) { + break; + } + + // use the given collection + if (isset($data[$field]) && $data[$field] instanceof PersistentCollection) { + + $data[$field]->setOwner($entity, $assoc); + + $class->reflFields[$field]->setValue($entity, $data[$field]); + $this->originalEntityData[$oid][$field] = $data[$field]; + + break; + } + + // Inject collection + $pColl = new PersistentCollection($this->em, $targetClass, new ArrayCollection); + $pColl->setOwner($entity, $assoc); + $pColl->setInitialized(false); + + $reflField = $class->reflFields[$field]; + $reflField->setValue($entity, $pColl); + + if ($assoc['fetch'] == ClassMetadata::FETCH_EAGER) { + $this->loadCollection($pColl); + $pColl->takeSnapshot(); + } + + $this->originalEntityData[$oid][$field] = $pColl; + break; + } + } + + if ($overrideLocalValues) { + // defer invoking of postLoad event to hydration complete step + $this->hydrationCompleteHandler->deferPostLoadInvoking($class, $entity); + } + + return $entity; + } + + /** + * @return void + */ + public function triggerEagerLoads() + { + if ( ! $this->eagerLoadingEntities) { + return; + } + + // avoid infinite recursion + $eagerLoadingEntities = $this->eagerLoadingEntities; + $this->eagerLoadingEntities = array(); + + foreach ($eagerLoadingEntities as $entityName => $ids) { + if ( ! $ids) { + continue; + } + + $class = $this->em->getClassMetadata($entityName); + + $this->getEntityPersister($entityName)->loadAll( + array_combine($class->identifier, array(array_values($ids))) + ); + } + } + + /** + * Initializes (loads) an uninitialized persistent collection of an entity. + * + * @param \Doctrine\ORM\PersistentCollection $collection The collection to initialize. + * + * @return void + * + * @todo Maybe later move to EntityManager#initialize($proxyOrCollection). See DDC-733. + */ + public function loadCollection(PersistentCollection $collection) + { + $assoc = $collection->getMapping(); + $persister = $this->getEntityPersister($assoc['targetEntity']); + + switch ($assoc['type']) { + case ClassMetadata::ONE_TO_MANY: + $persister->loadOneToManyCollection($assoc, $collection->getOwner(), $collection); + break; + + case ClassMetadata::MANY_TO_MANY: + $persister->loadManyToManyCollection($assoc, $collection->getOwner(), $collection); + break; + } + + $collection->setInitialized(true); + } + + /** + * Gets the identity map of the UnitOfWork. + * + * @return array + */ + public function getIdentityMap() + { + return $this->identityMap; + } + + /** + * Gets the original data of an entity. The original data is the data that was + * present at the time the entity was reconstituted from the database. + * + * @param object $entity + * + * @return array + */ + public function getOriginalEntityData($entity) + { + $oid = spl_object_hash($entity); + + if (isset($this->originalEntityData[$oid])) { + return $this->originalEntityData[$oid]; + } + + return array(); + } + + /** + * @ignore + * + * @param object $entity + * @param array $data + * + * @return void + */ + public function setOriginalEntityData($entity, array $data) + { + $this->originalEntityData[spl_object_hash($entity)] = $data; + } + + /** + * INTERNAL: + * Sets a property value of the original data array of an entity. + * + * @ignore + * + * @param string $oid + * @param string $property + * @param mixed $value + * + * @return void + */ + public function setOriginalEntityProperty($oid, $property, $value) + { + $this->originalEntityData[$oid][$property] = $value; + } + + /** + * Gets the identifier of an entity. + * The returned value is always an array of identifier values. If the entity + * has a composite identifier then the identifier values are in the same + * order as the identifier field names as returned by ClassMetadata#getIdentifierFieldNames(). + * + * @param object $entity + * + * @return array The identifier values. + */ + public function getEntityIdentifier($entity) + { + return $this->entityIdentifiers[spl_object_hash($entity)]; + } + + /** + * Processes an entity instance to extract their identifier values. + * + * @param object $entity The entity instance. + * + * @return mixed A scalar value. + * + * @throws \Doctrine\ORM\ORMInvalidArgumentException + */ + public function getSingleIdentifierValue($entity) + { + $class = $this->em->getClassMetadata(get_class($entity)); + + if ($class->isIdentifierComposite) { + throw ORMInvalidArgumentException::invalidCompositeIdentifier(); + } + + $values = $this->isInIdentityMap($entity) + ? $this->getEntityIdentifier($entity) + : $class->getIdentifierValues($entity); + + return isset($values[$class->identifier[0]]) ? $values[$class->identifier[0]] : null; + } + + /** + * Tries to find an entity with the given identifier in the identity map of + * this UnitOfWork. + * + * @param mixed $id The entity identifier to look for. + * @param string $rootClassName The name of the root class of the mapped entity hierarchy. + * + * @return object|bool Returns the entity with the specified identifier if it exists in + * this UnitOfWork, FALSE otherwise. + */ + public function tryGetById($id, $rootClassName) + { + $idHash = implode(' ', (array) $id); + + if (isset($this->identityMap[$rootClassName][$idHash])) { + return $this->identityMap[$rootClassName][$idHash]; + } + + return false; + } + + /** + * Schedules an entity for dirty-checking at commit-time. + * + * @param object $entity The entity to schedule for dirty-checking. + * + * @return void + * + * @todo Rename: scheduleForSynchronization + */ + public function scheduleForDirtyCheck($entity) + { + $rootClassName = $this->em->getClassMetadata(get_class($entity))->rootEntityName; + + $this->scheduledForSynchronization[$rootClassName][spl_object_hash($entity)] = $entity; + } + + /** + * Checks whether the UnitOfWork has any pending insertions. + * + * @return boolean TRUE if this UnitOfWork has pending insertions, FALSE otherwise. + */ + public function hasPendingInsertions() + { + return ! empty($this->entityInsertions); + } + + /** + * Calculates the size of the UnitOfWork. The size of the UnitOfWork is the + * number of entities in the identity map. + * + * @return integer + */ + public function size() + { + $countArray = array_map(function ($item) { return count($item); }, $this->identityMap); + + return array_sum($countArray); + } + + /** + * Gets the EntityPersister for an Entity. + * + * @param string $entityName The name of the Entity. + * + * @return \Doctrine\ORM\Persisters\Entity\EntityPersister + */ + public function getEntityPersister($entityName) + { + if (isset($this->persisters[$entityName])) { + return $this->persisters[$entityName]; + } + + $class = $this->em->getClassMetadata($entityName); + + switch (true) { + case ($class->isInheritanceTypeNone()): + $persister = new BasicEntityPersister($this->em, $class); + break; + + case ($class->isInheritanceTypeSingleTable()): + $persister = new SingleTablePersister($this->em, $class); + break; + + case ($class->isInheritanceTypeJoined()): + $persister = new JoinedSubclassPersister($this->em, $class); + break; + + default: + throw new \RuntimeException('No persister found for entity.'); + } + + if ($this->hasCache && $class->cache !== null) { + $persister = $this->em->getConfiguration() + ->getSecondLevelCacheConfiguration() + ->getCacheFactory() + ->buildCachedEntityPersister($this->em, $persister, $class); + } + + $this->persisters[$entityName] = $persister; + + return $this->persisters[$entityName]; + } + + /** + * Gets a collection persister for a collection-valued association. + * + * @param array $association + * + * @return \Doctrine\ORM\Persisters\Collection\CollectionPersister + */ + public function getCollectionPersister(array $association) + { + $role = isset($association['cache']) + ? $association['sourceEntity'] . '::' . $association['fieldName'] + : $association['type']; + + if (isset($this->collectionPersisters[$role])) { + return $this->collectionPersisters[$role]; + } + + $persister = ClassMetadata::ONE_TO_MANY === $association['type'] + ? new OneToManyPersister($this->em) + : new ManyToManyPersister($this->em); + + if ($this->hasCache && isset($association['cache'])) { + $persister = $this->em->getConfiguration() + ->getSecondLevelCacheConfiguration() + ->getCacheFactory() + ->buildCachedCollectionPersister($this->em, $persister, $association); + } + + $this->collectionPersisters[$role] = $persister; + + return $this->collectionPersisters[$role]; + } + + /** + * INTERNAL: + * Registers an entity as managed. + * + * @param object $entity The entity. + * @param array $id The identifier values. + * @param array $data The original entity data. + * + * @return void + */ + public function registerManaged($entity, array $id, array $data) + { + $oid = spl_object_hash($entity); + + $this->entityIdentifiers[$oid] = $id; + $this->entityStates[$oid] = self::STATE_MANAGED; + $this->originalEntityData[$oid] = $data; + + $this->addToIdentityMap($entity); + + if ($entity instanceof NotifyPropertyChanged && ( ! $entity instanceof Proxy || $entity->__isInitialized())) { + $entity->addPropertyChangedListener($this); + } + } + + /** + * INTERNAL: + * Clears the property changeset of the entity with the given OID. + * + * @param string $oid The entity's OID. + * + * @return void + */ + public function clearEntityChangeSet($oid) + { + $this->entityChangeSets[$oid] = array(); + } + + /* PropertyChangedListener implementation */ + + /** + * Notifies this UnitOfWork of a property change in an entity. + * + * @param object $entity The entity that owns the property. + * @param string $propertyName The name of the property that changed. + * @param mixed $oldValue The old value of the property. + * @param mixed $newValue The new value of the property. + * + * @return void + */ + public function propertyChanged($entity, $propertyName, $oldValue, $newValue) + { + $oid = spl_object_hash($entity); + $class = $this->em->getClassMetadata(get_class($entity)); + + $isAssocField = isset($class->associationMappings[$propertyName]); + + if ( ! $isAssocField && ! isset($class->fieldMappings[$propertyName])) { + return; // ignore non-persistent fields + } + + // Update changeset and mark entity for synchronization + $this->entityChangeSets[$oid][$propertyName] = array($oldValue, $newValue); + + if ( ! isset($this->scheduledForSynchronization[$class->rootEntityName][$oid])) { + $this->scheduleForDirtyCheck($entity); + } + } + + /** + * Gets the currently scheduled entity insertions in this UnitOfWork. + * + * @return array + */ + public function getScheduledEntityInsertions() + { + return $this->entityInsertions; + } + + /** + * Gets the currently scheduled entity updates in this UnitOfWork. + * + * @return array + */ + public function getScheduledEntityUpdates() + { + return $this->entityUpdates; + } + + /** + * Gets the currently scheduled entity deletions in this UnitOfWork. + * + * @return array + */ + public function getScheduledEntityDeletions() + { + return $this->entityDeletions; + } + + /** + * Gets the currently scheduled complete collection deletions + * + * @return array + */ + public function getScheduledCollectionDeletions() + { + return $this->collectionDeletions; + } + + /** + * Gets the currently scheduled collection inserts, updates and deletes. + * + * @return array + */ + public function getScheduledCollectionUpdates() + { + return $this->collectionUpdates; + } + + /** + * Helper method to initialize a lazy loading proxy or persistent collection. + * + * @param object $obj + * + * @return void + */ + public function initializeObject($obj) + { + if ($obj instanceof Proxy) { + $obj->__load(); + + return; + } + + if ($obj instanceof PersistentCollection) { + $obj->initialize(); + } + } + + /** + * Helper method to show an object as string. + * + * @param object $obj + * + * @return string + */ + private static function objToStr($obj) + { + return method_exists($obj, '__toString') ? (string)$obj : get_class($obj).'@'.spl_object_hash($obj); + } + + /** + * Marks an entity as read-only so that it will not be considered for updates during UnitOfWork#commit(). + * + * This operation cannot be undone as some parts of the UnitOfWork now keep gathering information + * on this object that might be necessary to perform a correct update. + * + * @param object $object + * + * @return void + * + * @throws ORMInvalidArgumentException + */ + public function markReadOnly($object) + { + if ( ! is_object($object) || ! $this->isInIdentityMap($object)) { + throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object); + } + + $this->readOnlyObjects[spl_object_hash($object)] = true; + } + + /** + * Is this entity read only? + * + * @param object $object + * + * @return bool + * + * @throws ORMInvalidArgumentException + */ + public function isReadOnly($object) + { + if ( ! is_object($object)) { + throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object); + } + + return isset($this->readOnlyObjects[spl_object_hash($object)]); + } + + /** + * Perform whatever processing is encapsulated here after completion of the transaction. + */ + private function afterTransactionComplete() + { + if ( ! $this->hasCache) { + return; + } + + foreach ($this->persisters as $persister) { + if ($persister instanceof CachedPersister) { + $persister->afterTransactionComplete(); + } + } + + foreach ($this->collectionPersisters as $persister) { + if ($persister instanceof CachedPersister) { + $persister->afterTransactionComplete(); + } + } + } + + /** + * Perform whatever processing is encapsulated here after completion of the rolled-back. + */ + private function afterTransactionRolledBack() + { + if ( ! $this->hasCache) { + return; + } + + foreach ($this->persisters as $persister) { + if ($persister instanceof CachedPersister) { + $persister->afterTransactionRolledBack(); + } + } + + foreach ($this->collectionPersisters as $persister) { + if ($persister instanceof CachedPersister) { + $persister->afterTransactionRolledBack(); + } + } + } + + private function dispatchOnFlushEvent() + { + if ($this->evm->hasListeners(Events::onFlush)) { + $this->evm->dispatchEvent(Events::onFlush, new OnFlushEventArgs($this->em)); + } + } + + private function dispatchPostFlushEvent() + { + if ($this->evm->hasListeners(Events::postFlush)) { + $this->evm->dispatchEvent(Events::postFlush, new PostFlushEventArgs($this->em)); + } + } + + /** + * Verifies if two given entities actually are the same based on identifier comparison + * + * @param object $entity1 + * @param object $entity2 + * + * @return bool + */ + private function isIdentifierEquals($entity1, $entity2) + { + if ($entity1 === $entity2) { + return true; + } + + $class = $this->em->getClassMetadata(get_class($entity1)); + + if ($class !== $this->em->getClassMetadata(get_class($entity2))) { + return false; + } + + $oid1 = spl_object_hash($entity1); + $oid2 = spl_object_hash($entity2); + + $id1 = isset($this->entityIdentifiers[$oid1]) + ? $this->entityIdentifiers[$oid1] + : $this->identifierFlattener->flattenIdentifier($class, $class->getIdentifierValues($entity1)); + $id2 = isset($this->entityIdentifiers[$oid2]) + ? $this->entityIdentifiers[$oid2] + : $this->identifierFlattener->flattenIdentifier($class, $class->getIdentifierValues($entity2)); + + return $id1 === $id2 || implode(' ', $id1) === implode(' ', $id2); + } + + /** + * @param object $entity + * @param object $managedCopy + * + * @throws ORMException + * @throws OptimisticLockException + * @throws TransactionRequiredException + */ + private function mergeEntityStateIntoManagedCopy($entity, $managedCopy) + { + if (! $this->isLoaded($entity)) { + return; + } + + if (! $this->isLoaded($managedCopy)) { + $managedCopy->__load(); + } + + $class = $this->em->getClassMetadata(get_class($entity)); + + foreach ($this->reflectionPropertiesGetter->getProperties($class->name) as $prop) { + $name = $prop->name; + + $prop->setAccessible(true); + + if ( ! isset($class->associationMappings[$name])) { + if ( ! $class->isIdentifier($name)) { + $prop->setValue($managedCopy, $prop->getValue($entity)); + } + } else { + $assoc2 = $class->associationMappings[$name]; + + if ($assoc2['type'] & ClassMetadata::TO_ONE) { + $other = $prop->getValue($entity); + if ($other === null) { + $prop->setValue($managedCopy, null); + } else { + if ($other instanceof Proxy && !$other->__isInitialized()) { + // do not merge fields marked lazy that have not been fetched. + continue; + } + + if ( ! $assoc2['isCascadeMerge']) { + if ($this->getEntityState($other) === self::STATE_DETACHED) { + $targetClass = $this->em->getClassMetadata($assoc2['targetEntity']); + $relatedId = $targetClass->getIdentifierValues($other); + + if ($targetClass->subClasses) { + $other = $this->em->find($targetClass->name, $relatedId); + } else { + $other = $this->em->getProxyFactory()->getProxy( + $assoc2['targetEntity'], + $relatedId + ); + $this->registerManaged($other, $relatedId, array()); + } + } + + $prop->setValue($managedCopy, $other); + } + } + } else { + $mergeCol = $prop->getValue($entity); + + if ($mergeCol instanceof PersistentCollection && ! $mergeCol->isInitialized()) { + // do not merge fields marked lazy that have not been fetched. + // keep the lazy persistent collection of the managed copy. + continue; + } + + $managedCol = $prop->getValue($managedCopy); + + if ( ! $managedCol) { + $managedCol = new PersistentCollection( + $this->em, + $this->em->getClassMetadata($assoc2['targetEntity']), + new ArrayCollection + ); + $managedCol->setOwner($managedCopy, $assoc2); + $prop->setValue($managedCopy, $managedCol); + } + + if ($assoc2['isCascadeMerge']) { + $managedCol->initialize(); + + // clear and set dirty a managed collection if its not also the same collection to merge from. + if ( ! $managedCol->isEmpty() && $managedCol !== $mergeCol) { + $managedCol->unwrap()->clear(); + $managedCol->setDirty(true); + + if ($assoc2['isOwningSide'] + && $assoc2['type'] == ClassMetadata::MANY_TO_MANY + && $class->isChangeTrackingNotify() + ) { + $this->scheduleForDirtyCheck($managedCopy); + } + } + } + } + } + + if ($class->isChangeTrackingNotify()) { + // Just treat all properties as changed, there is no other choice. + $this->propertyChanged($managedCopy, $name, null, $prop->getValue($managedCopy)); + } + } + } + + /** + * This method called by hydrators, and indicates that hydrator totally completed current hydration cycle. + * Unit of work able to fire deferred events, related to loading events here. + * + * @internal should be called internally from object hydrators + */ + public function hydrationComplete() + { + $this->hydrationCompleteHandler->hydrationComplete(); + } + + /** + * @param string $entityName + */ + private function clearIdentityMapForEntityName($entityName) + { + if (! isset($this->identityMap[$entityName])) { + return; + } + + $visited = []; + + foreach ($this->identityMap[$entityName] as $entity) { + $this->doDetach($entity, $visited, false); + } + } + + /** + * @param string $entityName + */ + private function clearEntityInsertionsForEntityName($entityName) + { + foreach ($this->entityInsertions as $hash => $entity) { + if (get_class($entity) === $entityName) { + unset($this->entityInsertions[$hash]); + } + } + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Utility/IdentifierFlattener.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Utility/IdentifierFlattener.php new file mode 100644 index 0000000000000000000000000000000000000000..4a58dfeda1baf10004e5387d36caf49216c7aa85 --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Utility/IdentifierFlattener.php @@ -0,0 +1,103 @@ +. + */ + + +namespace Doctrine\ORM\Utility; + +use Doctrine\ORM\UnitOfWork; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\Common\Persistence\Mapping\ClassMetadataFactory; + +/** + * The IdentifierFlattener utility now houses some of the identifier manipulation logic from unit of work, so that it + * can be re-used elsewhere. + * + * @since 2.5 + * @author Rob Caiger + */ +final class IdentifierFlattener +{ + /** + * The UnitOfWork used to coordinate object-level transactions. + * + * @var UnitOfWork + */ + private $unitOfWork; + + /** + * The metadata factory, used to retrieve the ORM metadata of entity classes. + * + * @var ClassMetadataFactory + */ + private $metadataFactory; + + /** + * Initializes a new IdentifierFlattener instance, bound to the given EntityManager. + * + * @param UnitOfWork $unitOfWork + * @param ClassMetadataFactory $metadataFactory + */ + public function __construct(UnitOfWork $unitOfWork, ClassMetadataFactory $metadataFactory) + { + $this->unitOfWork = $unitOfWork; + $this->metadataFactory = $metadataFactory; + } + + /** + * convert foreign identifiers into scalar foreign key values to avoid object to string conversion failures. + * + * @param ClassMetadata $class + * @param array $id + * + * @return array + */ + public function flattenIdentifier(ClassMetadata $class, array $id) + { + $flatId = array(); + + foreach ($class->identifier as $field) { + if (isset($class->associationMappings[$field]) && isset($id[$field]) && is_object($id[$field])) { + /* @var $targetClassMetadata ClassMetadata */ + $targetClassMetadata = $this->metadataFactory->getMetadataFor( + $class->associationMappings[$field]['targetEntity'] + ); + + if ($this->unitOfWork->isInIdentityMap($id[$field])) { + $associatedId = $this->flattenIdentifier($targetClassMetadata, $this->unitOfWork->getEntityIdentifier($id[$field])); + } else { + $associatedId = $this->flattenIdentifier($targetClassMetadata, $targetClassMetadata->getIdentifierValues($id[$field])); + } + + $flatId[$field] = implode(' ', $associatedId); + } elseif (isset($class->associationMappings[$field])) { + $associatedId = array(); + + foreach ($class->associationMappings[$field]['joinColumns'] as $joinColumn) { + $associatedId[] = $id[$joinColumn['name']]; + } + + $flatId[$field] = implode(' ', $associatedId); + } else { + $flatId[$field] = $id[$field]; + } + } + + return $flatId; + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Utility/PersisterHelper.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Utility/PersisterHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..6fe7545eab64a8361674700a5bf89ce6b327559e --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Utility/PersisterHelper.php @@ -0,0 +1,136 @@ +. + */ + +namespace Doctrine\ORM\Utility; + +use Doctrine\Common\Util\ClassUtils; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Query\QueryException; + +/** + * The PersisterHelper contains logic to infer binding types which is used in + * several persisters. + * + * @link www.doctrine-project.org + * @since 2.5 + * @author Jasper N. Brouwer + */ +class PersisterHelper +{ + /** + * @param string $fieldName + * @param ClassMetadata $class + * @param EntityManagerInterface $em + * + * @return array + * + * @throws QueryException + */ + public static function getTypeOfField($fieldName, ClassMetadata $class, EntityManagerInterface $em) + { + if (isset($class->fieldMappings[$fieldName])) { + return array($class->fieldMappings[$fieldName]['type']); + } + + if ( ! isset($class->associationMappings[$fieldName])) { + return array(); + } + + $assoc = $class->associationMappings[$fieldName]; + + if (! $assoc['isOwningSide']) { + return self::getTypeOfField($assoc['mappedBy'], $em->getClassMetadata($assoc['targetEntity']), $em); + } + + if ($assoc['type'] & ClassMetadata::MANY_TO_MANY) { + $joinData = $assoc['joinTable']; + } else { + $joinData = $assoc; + } + + $types = array(); + $targetClass = $em->getClassMetadata($assoc['targetEntity']); + + foreach ($joinData['joinColumns'] as $joinColumn) { + $types[] = self::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $em); + } + + return $types; + } + + /** + * @param string $columnName + * @param ClassMetadata $class + * @param EntityManagerInterface $em + * + * @return string + * + * @throws \RuntimeException + */ + public static function getTypeOfColumn($columnName, ClassMetadata $class, EntityManagerInterface $em) + { + if (isset($class->fieldNames[$columnName])) { + $fieldName = $class->fieldNames[$columnName]; + + if (isset($class->fieldMappings[$fieldName])) { + return $class->fieldMappings[$fieldName]['type']; + } + } + + // iterate over to-one association mappings + foreach ($class->associationMappings as $assoc) { + if ( ! isset($assoc['joinColumns'])) { + continue; + } + + foreach ($assoc['joinColumns'] as $joinColumn) { + if ($joinColumn['name'] == $columnName) { + $targetColumnName = $joinColumn['referencedColumnName']; + $targetClass = $em->getClassMetadata($assoc['targetEntity']); + + return self::getTypeOfColumn($targetColumnName, $targetClass, $em); + } + } + } + + // iterate over to-many association mappings + foreach ($class->associationMappings as $assoc) { + if ( ! (isset($assoc['joinTable']) && isset($assoc['joinTable']['joinColumns']))) { + continue; + } + + foreach ($assoc['joinTable']['joinColumns'] as $joinColumn) { + if ($joinColumn['name'] == $columnName) { + $targetColumnName = $joinColumn['referencedColumnName']; + $targetClass = $em->getClassMetadata($assoc['targetEntity']); + + return self::getTypeOfColumn($targetColumnName, $targetClass, $em); + } + } + } + + throw new \RuntimeException(sprintf( + 'Could not resolve type of column "%s" of class "%s"', + $columnName, + $class->getName() + )); + } +} diff --git a/vendor/doctrine/orm/lib/Doctrine/ORM/Version.php b/vendor/doctrine/orm/lib/Doctrine/ORM/Version.php new file mode 100644 index 0000000000000000000000000000000000000000..44de432175d1448b203affb453bde227f29aee3a --- /dev/null +++ b/vendor/doctrine/orm/lib/Doctrine/ORM/Version.php @@ -0,0 +1,56 @@ +. + */ + +namespace Doctrine\ORM; + +/** + * Class to store and retrieve the version of Doctrine + * + * + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class Version +{ + /** + * Current Doctrine Version + */ + const VERSION = '2.5.5-DEV'; + + /** + * Compares a Doctrine version with the current one. + * + * @param string $version Doctrine version to compare. + * + * @return int Returns -1 if older, 0 if it is the same, 1 if version + * passed as argument is newer. + */ + public static function compare($version) + { + $currentVersion = str_replace(' ', '', strtolower(self::VERSION)); + $version = str_replace(' ', '', $version); + + return version_compare($version, $currentVersion); + } +} diff --git a/vendor/incenteev/composer-parameter-handler/.travis.yml b/vendor/incenteev/composer-parameter-handler/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..92d9e5232283e0b103148bebd7265321c3e80f0f --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/.travis.yml @@ -0,0 +1,27 @@ +language: php + +sudo: false + +cache: + directories: + - $HOME/.composer/cache/files + +matrix: + include: + - php: 5.3 + env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' + - php: 5.4 + - php: 5.5 + - php: 5.6 + - php: 7.0 + env: DEPENDENCIES=dev + - php: hhvm + +before_script: + - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; + - composer update $COMPOSER_FLAGS + +script: phpunit --coverage-text --coverage-clover=coverage.clover + +after_script: + - wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover diff --git a/vendor/incenteev/composer-parameter-handler/CHANGELOG.md b/vendor/incenteev/composer-parameter-handler/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..1f1ca25a7aa53c5060c78ad59eeb86687cbbc816 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/CHANGELOG.md @@ -0,0 +1,27 @@ +## 2.1.2 (2015-11-10) + +* Mark symfony/yaml 3 as supported to be compatible with Symfony 3 +* Dropped support for symfony/yaml 2.2 and older (which are long unmaintained) +* Added testing on PHP 7 + +## 2.1.1 (2015-06-03) + +* Removed usage of a deprecated way to use the Yaml parser +* Added a more detailed exception message when the top-level key is missing + +## 2.1.0 (2013-12-07) + +* Move most of the logic to a ``Processor`` class which does not depend on the composer event and package. Ref #30 +* Add the support of existing empty file for Capifony compatibility +* Add the support of multiple managed files +* Preserve other top-level keys than the configured one in the file +* Add a rename map used to rename parameters when updating the parameters file +* Add the possibility to use another top-level key than ``parameters`` + +## 2.0.0 (2013-04-06) + +* BC BREAK the env map has been changed, inverting the keys and the values. Refs #14 + +## 1.0.0 (2013-04-06) + +Initial release of the library. diff --git a/vendor/incenteev/composer-parameter-handler/LICENSE b/vendor/incenteev/composer-parameter-handler/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..72adcbf24b797db7d520a961c74040ac16a85040 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Christophe Coevoet + +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/vendor/incenteev/composer-parameter-handler/Processor.php b/vendor/incenteev/composer-parameter-handler/Processor.php new file mode 100644 index 0000000000000000000000000000000000000000..6dc208ff597ba19748a20baa380fab3aead1fbf4 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Processor.php @@ -0,0 +1,167 @@ +io = $io; + } + + public function processFile(array $config) + { + $config = $this->processConfig($config); + + $realFile = $config['file']; + $parameterKey = $config['parameter-key']; + + $exists = is_file($realFile); + + $yamlParser = new Parser(); + + $action = $exists ? 'Updating' : 'Creating'; + $this->io->write(sprintf('%s the "%s" file', $action, $realFile)); + + // Find the expected params + $expectedValues = $yamlParser->parse(file_get_contents($config['dist-file'])); + if (!isset($expectedValues[$parameterKey])) { + throw new \InvalidArgumentException(sprintf('The top-level key %s is missing.', $parameterKey)); + } + $expectedParams = (array) $expectedValues[$parameterKey]; + + // find the actual params + $actualValues = array_merge( + // Preserve other top-level keys than `$parameterKey` in the file + $expectedValues, + array($parameterKey => array()) + ); + if ($exists) { + $existingValues = $yamlParser->parse(file_get_contents($realFile)); + if ($existingValues === null) { + $existingValues = array(); + } + if (!is_array($existingValues)) { + throw new \InvalidArgumentException(sprintf('The existing "%s" file does not contain an array', $realFile)); + } + $actualValues = array_merge($actualValues, $existingValues); + } + + $actualValues[$parameterKey] = $this->processParams($config, $expectedParams, (array) $actualValues[$parameterKey]); + + if (!is_dir($dir = dirname($realFile))) { + mkdir($dir, 0755, true); + } + + file_put_contents($realFile, "# This file is auto-generated during the composer install\n" . Yaml::dump($actualValues, 99)); + } + + private function processConfig(array $config) + { + if (empty($config['file'])) { + throw new \InvalidArgumentException('The extra.incenteev-parameters.file setting is required to use this script handler.'); + } + + if (empty($config['dist-file'])) { + $config['dist-file'] = $config['file'].'.dist'; + } + + if (!is_file($config['dist-file'])) { + throw new \InvalidArgumentException(sprintf('The dist file "%s" does not exist. Check your dist-file config or create it.', $config['dist-file'])); + } + + if (empty($config['parameter-key'])) { + $config['parameter-key'] = 'parameters'; + } + + return $config; + } + + private function processParams(array $config, array $expectedParams, array $actualParams) + { + // Grab values for parameters that were renamed + $renameMap = empty($config['rename-map']) ? array() : (array) $config['rename-map']; + $actualParams = array_replace($actualParams, $this->processRenamedValues($renameMap, $actualParams)); + + $keepOutdatedParams = false; + if (isset($config['keep-outdated'])) { + $keepOutdatedParams = (boolean) $config['keep-outdated']; + } + + if (!$keepOutdatedParams) { + $actualParams = array_intersect_key($actualParams, $expectedParams); + } + + $envMap = empty($config['env-map']) ? array() : (array) $config['env-map']; + + // Add the params coming from the environment values + $actualParams = array_replace($actualParams, $this->getEnvValues($envMap)); + + return $this->getParams($expectedParams, $actualParams); + } + + private function getEnvValues(array $envMap) + { + $params = array(); + foreach ($envMap as $param => $env) { + $value = getenv($env); + if ($value) { + $params[$param] = Inline::parse($value); + } + } + + return $params; + } + + private function processRenamedValues(array $renameMap, array $actualParams) + { + foreach ($renameMap as $param => $oldParam) { + if (array_key_exists($param, $actualParams)) { + continue; + } + + if (!array_key_exists($oldParam, $actualParams)) { + continue; + } + + $actualParams[$param] = $actualParams[$oldParam]; + } + + return $actualParams; + } + + private function getParams(array $expectedParams, array $actualParams) + { + // Simply use the expectedParams value as default for the missing params. + if (!$this->io->isInteractive()) { + return array_replace($expectedParams, $actualParams); + } + + $isStarted = false; + + foreach ($expectedParams as $key => $message) { + if (array_key_exists($key, $actualParams)) { + continue; + } + + if (!$isStarted) { + $isStarted = true; + $this->io->write('Some parameters are missing. Please provide them.'); + } + + $default = Inline::dump($message); + $value = $this->io->ask(sprintf('%s (%s): ', $key, $default), $default); + + $actualParams[$key] = Inline::parse($value); + } + + return $actualParams; + } +} diff --git a/vendor/incenteev/composer-parameter-handler/README.md b/vendor/incenteev/composer-parameter-handler/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0f42600fc848807644c1bea93577a880fe04a6b0 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/README.md @@ -0,0 +1,174 @@ +# Managing your ignored parameters with Composer + +This tool allows you to manage your ignored parameters when running a composer +install or update. It works when storing the parameters in a Yaml file under +a single top-level key (named ``parameters`` by default). Other keys are +copied without change. + +[![Build Status](https://travis-ci.org/Incenteev/ParameterHandler.png)](https://travis-ci.org/Incenteev/ParameterHandler) +[![Code Coverage](https://scrutinizer-ci.com/g/Incenteev/ParameterHandler/badges/coverage.png?s=ea5de28d9764fdcb6a576a41e244c0ac537b3c81)](https://scrutinizer-ci.com/g/Incenteev/ParameterHandler/) +[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/Incenteev/ParameterHandler/badges/quality-score.png?s=6143d945bbdfac5c1114d4fe5d0f4ee737db18bf)](https://scrutinizer-ci.com/g/Incenteev/ParameterHandler/) +[![SensioLabsInsight](https://insight.sensiolabs.com/projects/3a432e49-6018-41a5-a37b-b7fb151706c1/mini.png)](https://insight.sensiolabs.com/projects/3a432e49-6018-41a5-a37b-b7fb151706c1) +[![Latest Stable Version](https://poser.pugx.org/incenteev/composer-parameter-handler/v/stable.png)](https://packagist.org/packages/incenteev/composer-parameter-handler) +[![Latest Unstable Version](https://poser.pugx.org/incenteev/composer-parameter-handler/v/unstable.png)](https://packagist.org/packages/incenteev/composer-parameter-handler) + +## Usage + +Add the following in your root composer.json file: + +```json +{ + "require": { + "incenteev/composer-parameter-handler": "~2.0" + }, + "scripts": { + "post-install-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters" + ], + "post-update-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters" + ] + }, + "extra": { + "incenteev-parameters": { + "file": "app/config/parameters.yml" + } + } +} +``` + +The ``app/config/parameters.yml`` will then be created or updated by the +composer script, to match the structure of the dist file ``app/config/parameters.yml.dist`` +by asking you the missing parameters. + +By default, the dist file is assumed to be in the same place than the parameters +file, suffixed by ``.dist``. This can be changed in the configuration: + +```json +{ + "extra": { + "incenteev-parameters": { + "file": "app/config/parameters.yml", + "dist-file": "some/other/folder/to/other/parameters/file/parameters.yml.dist" + } + } +} +``` + +The script handler will ask you interactively for parameters which are missing +in the parameters file, using the value of the dist file as default value. +All prompted values are parsed as inline Yaml, to allow you to define ``true``, +``false``, ``null`` or numbers easily. +If composer is run in a non-interactive mode, the values of the dist file +will be used for missing parameters. + +**Warning:** This parameters handler will overwrite any comments or spaces into +your parameters.yml file so handle with care. If you want to give format +and comments to your parameter's file you should do it on your dist version. + +### Keeping outdated parameters + +Warning: This script removes outdated params from ``parameters.yml`` which are not in ``parameters.yml.dist`` +If you need to keep outdated params you can use `keep-outdated` param in the configuration: + +```json +{ + "extra": { + "incenteev-parameters": { + "keep-outdated": true + } + } +} +``` + +### Using a different top-level key + +The script handler looks for a ``parameters`` key in your dist file. You can change this by using the +`parameter-key` param in the configuration: +```json +{ + "extra": { + "incenteev-parameters": { + "parameter-key": "config" + } + } +} +``` + +### Using environment variables to set the parameters + +For your prod environment, using an interactive prompt may not be possible +when deploying. In this case, you can rely on environment variables to provide +the parameters. This is achieved by providing a map between environment variables +and the parameters they should fill: + +```json +{ + "extra": { + "incenteev-parameters": { + "env-map": { + "my_first_param": "MY_FIRST_PARAM", + "my_second_param": "MY_SECOND_PARAM" + } + } + } +} +``` + +If an environment variable is set, its value will always replace the value +set in the existing parameters file. + +As environment variables can only be strings, they are also parsed as inline +Yaml values to allows specifying ``null``, ``false``, ``true`` or numbers +easily. + +### Renaming parameters + +If you are renaming a parameter, the new key will be set according to the usual +routine (prompt if possible, use environment variables, use default). +To have the parameters handler use the value of an (obsolete) parameter, specify +a rename-map: +```json +{ + "extra": { + "incenteev-parameters": { + "rename-map": { + "new_param_1": "old_param_1", + "new_param_2": "old_param_2" + } + } + } +} +``` + +This will create the new parameters new_param_1 and new_param_2 while using the +values from old_param_1 and old_param_2, respectively. It will not remove the +old parameters unless you've also removed them from the dist version. + +If the old parameter is no longer present (maybe because it has been renamed and +removed already), no parameters are overwritten. You don't need to remove obsolete +parameters from the rename map once they have been renamed. + +### Managing multiple ignored files + +The parameter handler can manage multiple ignored files. To use this feature, +the ``incenteev-parameters`` extra should contain a JSON array with multiple +configurations inside it instead of a configuration object: + +```json +{ + "extra": { + "incenteev-parameters": [ + { + "file": "app/config/parameters.yml", + "env-map": {} + }, + { + "file": "app/config/databases.yml", + "dist-file": "app/config/databases.dist.yml", + "parameter-key": "config" + } + ] + } +} +``` diff --git a/vendor/incenteev/composer-parameter-handler/ScriptHandler.php b/vendor/incenteev/composer-parameter-handler/ScriptHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..165064aad7c37e328bcd53884bc2727cbec294f9 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/ScriptHandler.php @@ -0,0 +1,37 @@ +getComposer()->getPackage()->getExtra(); + + if (!isset($extras['incenteev-parameters'])) { + throw new \InvalidArgumentException('The parameter handler needs to be configured through the extra.incenteev-parameters setting.'); + } + + $configs = $extras['incenteev-parameters']; + + if (!is_array($configs)) { + throw new \InvalidArgumentException('The extra.incenteev-parameters setting must be an array or a configuration object.'); + } + + if (array_keys($configs) !== range(0, count($configs) - 1)) { + $configs = array($configs); + } + + $processor = new Processor($event->getIO()); + + foreach ($configs as $config) { + if (!is_array($config)) { + throw new \InvalidArgumentException('The extra.incenteev-parameters setting must be an array of configuration objects.'); + } + + $processor->processFile($config); + } + } +} diff --git a/vendor/incenteev/composer-parameter-handler/Tests/ProcessorTest.php b/vendor/incenteev/composer-parameter-handler/Tests/ProcessorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..babf44a9ca0d18ca7e90fedfde143c428af020b2 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/ProcessorTest.php @@ -0,0 +1,174 @@ +io = $this->prophesize('Composer\IO\IOInterface'); + $this->processor = new Processor($this->io->reveal()); + } + + protected function tearDown() + { + parent::tearDown(); + + foreach ($this->environmentBackup as $var => $value) { + if (false === $value) { + putenv($var); + } else { + putenv($var.'='.$value); + } + } + } + + /** + * @dataProvider provideInvalidConfiguration + */ + public function testInvalidConfiguration(array $config, $exceptionMessage) + { + chdir(__DIR__); + + $this->setExpectedException('InvalidArgumentException', $exceptionMessage); + + $this->processor->processFile($config); + } + + public function provideInvalidConfiguration() + { + return array( + 'no file' => array( + array(), + 'The extra.incenteev-parameters.file setting is required to use this script handler.', + ), + 'missing default dist file' => array( + array( + 'file' => 'fixtures/invalid/missing.yml', + ), + 'The dist file "fixtures/invalid/missing.yml.dist" does not exist. Check your dist-file config or create it.', + ), + 'missing custom dist file' => array( + array( + 'file' => 'fixtures/invalid/missing.yml', + 'dist-file' => 'fixtures/invalid/non-existent.dist.yml', + ), + 'The dist file "fixtures/invalid/non-existent.dist.yml" does not exist. Check your dist-file config or create it.', + ), + 'missing top level key in dist file' => array( + array( + 'file' => 'fixtures/invalid/missing_top_level.yml', + ), + 'The top-level key parameters is missing.', + ), + 'invalid values in the existing file' => array( + array( + 'file' => 'fixtures/invalid/invalid_existing_values.yml', + ), + 'The existing "fixtures/invalid/invalid_existing_values.yml" file does not contain an array', + ), + ); + } + + /** + * @dataProvider provideParameterHandlingTestCases + */ + public function testParameterHandling($testCaseName) + { + $dataDir = __DIR__.'/fixtures/testcases/'.$testCaseName; + + $testCase = array_replace_recursive( + array( + 'title' => 'unknown test', + 'config' => array( + 'file' => 'parameters.yml', + ), + 'dist-file' => 'parameters.yml.dist', + 'environment' => array(), + 'interactive' => false, + ), + (array) Yaml::parse(file_get_contents($dataDir.'/setup.yml')) + ); + + $workingDir = sys_get_temp_dir() . '/incenteev_parameter_handler'; + $exists = $this->initializeTestCase($testCase, $dataDir, $workingDir); + + $message = sprintf('%s the "%s" file', $exists ? 'Updating' : 'Creating', $testCase['config']['file']); + $this->io->write($message)->shouldBeCalled(); + + $this->setInteractionExpectations($testCase); + + $this->processor->processFile($testCase['config']); + + $this->assertFileEquals($dataDir.'/expected.yml', $workingDir.'/'.$testCase['config']['file'], $testCase['title']); + } + + private function initializeTestCase(array $testCase, $dataDir, $workingDir) + { + $fs = new Filesystem(); + + if (is_dir($workingDir)) { + $fs->remove($workingDir); + } + + $fs->copy($dataDir.'/dist.yml', $workingDir.'/'. $testCase['dist-file']); + + if ($exists = file_exists($dataDir.'/existing.yml')) { + $fs->copy($dataDir.'/existing.yml', $workingDir.'/'.$testCase['config']['file']); + } + + foreach ($testCase['environment'] as $var => $value) { + $this->environmentBackup[$var] = getenv($var); + putenv($var.'='.$value); + }; + + chdir($workingDir); + + return $exists; + } + + private function setInteractionExpectations(array $testCase) + { + $this->io->isInteractive()->willReturn($testCase['interactive']); + + if (!$testCase['interactive']) { + return; + } + + if (!empty($testCase['requested_params'])) { + $this->io->write('Some parameters are missing. Please provide them.')->shouldBeCalledTimes(1); + } + + foreach ($testCase['requested_params'] as $param => $settings) { + $this->io->ask(sprintf('%s (%s): ', $param, $settings['default']), $settings['default']) + ->willReturn($settings['input']) + ->shouldBeCalled(); + } + } + + public function provideParameterHandlingTestCases() + { + $tests = array(); + + foreach (glob(__DIR__.'/fixtures/testcases/*/') as $folder) { + $tests[] = array(basename($folder)); + } + + return $tests; + } +} diff --git a/vendor/incenteev/composer-parameter-handler/Tests/ScriptHandlerTest.php b/vendor/incenteev/composer-parameter-handler/Tests/ScriptHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b77e76a10c1ce518b0c62ad0e9df866073754411 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/ScriptHandlerTest.php @@ -0,0 +1,63 @@ +event = $this->prophesize('Composer\Script\Event'); + $this->io = $this->prophesize('Composer\IO\IOInterface'); + $this->package = $this->prophesize('Composer\Package\PackageInterface'); + $composer = $this->prophesize('Composer\Composer'); + + $composer->getPackage()->willReturn($this->package); + $this->event->getComposer()->willReturn($composer); + $this->event->getIO()->willReturn($this->io); + } + + /** + * @dataProvider provideInvalidConfiguration + */ + public function testInvalidConfiguration(array $extras, $exceptionMessage) + { + $this->package->getExtra()->willReturn($extras); + + chdir(__DIR__); + + $this->setExpectedException('InvalidArgumentException', $exceptionMessage); + + ScriptHandler::buildParameters($this->event->reveal()); + } + + public function provideInvalidConfiguration() + { + return array( + 'no extra' => array( + array(), + 'The parameter handler needs to be configured through the extra.incenteev-parameters setting.', + ), + 'invalid type' => array( + array('incenteev-parameters' => 'not an array'), + 'The extra.incenteev-parameters setting must be an array or a configuration object.', + ), + 'invalid type for multiple file' => array( + array('incenteev-parameters' => array('not an array')), + 'The extra.incenteev-parameters setting must be an array of configuration objects.', + ), + 'no file' => array( + array('incenteev-parameters' => array()), + 'The extra.incenteev-parameters.file setting is required to use this script handler.', + ), + ); + } +} diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/invalid/invalid_existing_values.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/invalid/invalid_existing_values.yml new file mode 100644 index 0000000000000000000000000000000000000000..fbbc579826f6b67210993394d43368b37e6b63ee --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/invalid/invalid_existing_values.yml @@ -0,0 +1 @@ +not an array diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/invalid/invalid_existing_values.yml.dist b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/invalid/invalid_existing_values.yml.dist new file mode 100644 index 0000000000000000000000000000000000000000..d426a85eb5d6f09bb10ca450ff98410bc36cd5b5 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/invalid/invalid_existing_values.yml.dist @@ -0,0 +1,2 @@ +parameters: + foo: bar diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/invalid/missing_top_level.yml.dist b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/invalid/missing_top_level.yml.dist new file mode 100644 index 0000000000000000000000000000000000000000..a0242f2e468f63726728e0f31aef8b66dee90eed --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/invalid/missing_top_level.yml.dist @@ -0,0 +1 @@ +another: The parameters key is missing diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_dist_file/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_dist_file/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..df4994f32750cc35829d5d96f28caf1ad2ffd203 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_dist_file/dist.yml @@ -0,0 +1,3 @@ +parameters: + foo: bar + boolean: false diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_dist_file/existing.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_dist_file/existing.yml new file mode 100644 index 0000000000000000000000000000000000000000..f4b75e87a15f4df844a1d289e6beb49e7ef8eddc --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_dist_file/existing.yml @@ -0,0 +1,4 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo + boolean: false diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_dist_file/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_dist_file/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..f4b75e87a15f4df844a1d289e6beb49e7ef8eddc --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_dist_file/expected.yml @@ -0,0 +1,4 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo + boolean: false diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_dist_file/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_dist_file/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..a06a62d542ad8b42ee8f85bb7d3a6d11bd7ebedc --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_dist_file/setup.yml @@ -0,0 +1,6 @@ +title: Existing values are kept + +config: + dist-file: parameters.dist.yml + +dist-file: parameters.dist.yml diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_key/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_key/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..3ff809393bcfba72e3d8711bf7ad82997ea8210d --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_key/dist.yml @@ -0,0 +1,7 @@ +config: + foo: bar + boolean: false + another: ~ + nested: + foo: bar + bar: baz diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_key/existing.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_key/existing.yml new file mode 100644 index 0000000000000000000000000000000000000000..dd272fe9099837d97a2a3cab9970e1a01aa13a77 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_key/existing.yml @@ -0,0 +1,8 @@ +# This file is auto-generated during the composer install +config: + foo: existing_foo + boolean: false + another: ~ + nested: + foo: bar + bar: baz diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_key/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_key/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..7f985cb85515e32cb6be655582c3168db3501fc1 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_key/expected.yml @@ -0,0 +1,8 @@ +# This file is auto-generated during the composer install +config: + foo: existing_foo + boolean: false + another: null + nested: + foo: bar + bar: baz diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_key/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_key/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..6611ac71012924474e6356c4f1f672884906b413 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/custom_key/setup.yml @@ -0,0 +1,5 @@ +title: Using a custom parameter key + +config: + parameter-key: config + diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..45f3fddefb3a4cffa6524761ced6e8c2e15538b5 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent/dist.yml @@ -0,0 +1,7 @@ +parameters: + foo: bar + boolean: false + another: ~ + nested: + foo: bar + bar: baz diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent/existing.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent/existing.yml new file mode 100644 index 0000000000000000000000000000000000000000..60e3bbe7210b8153ee8a1b4e647dd8f8836fa123 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent/existing.yml @@ -0,0 +1,8 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo + boolean: false + another: ~ + nested: + foo: bar + bar: baz diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..31ff131317852c7380dfc663382923df5cb37f18 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent/expected.yml @@ -0,0 +1,8 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo + boolean: false + another: null + nested: + foo: bar + bar: baz diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..b72f1b54c2f50596da6dbcdb16625c5cedebd22c --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent/setup.yml @@ -0,0 +1 @@ +title: Existing values are kept diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_empty/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_empty/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..d426a85eb5d6f09bb10ca450ff98410bc36cd5b5 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_empty/dist.yml @@ -0,0 +1,2 @@ +parameters: + foo: bar diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_empty/existing.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_empty/existing.yml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_empty/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_empty/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..367f8eb5b48d087920d1b96538f0fdfe401d7b6e --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_empty/expected.yml @@ -0,0 +1,3 @@ +# This file is auto-generated during the composer install +parameters: + foo: bar diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_empty/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_empty/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..dedcd0fc4ff2004bc324bacb52c8c210260389e1 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_empty/setup.yml @@ -0,0 +1 @@ +title: Existing empty files are valid (Capifony compatibility) diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_without_key/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_without_key/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..d426a85eb5d6f09bb10ca450ff98410bc36cd5b5 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_without_key/dist.yml @@ -0,0 +1,2 @@ +parameters: + foo: bar diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_without_key/existing.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_without_key/existing.yml new file mode 100644 index 0000000000000000000000000000000000000000..678ab283bee04e36d9af676a5f649de9a3fc959c --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_without_key/existing.yml @@ -0,0 +1,2 @@ +# This file is auto-generated during the composer install +foobar: baz diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_without_key/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_without_key/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..76f04cf7e8cbb61267c59f344620984c2e911183 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_without_key/expected.yml @@ -0,0 +1,4 @@ +# This file is auto-generated during the composer install +parameters: + foo: bar +foobar: baz diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_without_key/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_without_key/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..3797a0b5ef34ac9b3b3b382811c5e4aa7193ffc0 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/existent_without_key/setup.yml @@ -0,0 +1 @@ +title: Existing files without the parameters key are valid diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/extra_keys/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/extra_keys/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..fbc0b90846ac8aa6b294f104bfc7fdb30ca1b1a6 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/extra_keys/dist.yml @@ -0,0 +1,5 @@ +parameters: + foo: bar + boolean: false + +extra_key: a new extra key diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/extra_keys/existing.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/extra_keys/existing.yml new file mode 100644 index 0000000000000000000000000000000000000000..2e08a16d548ff5948638a62a6b7eab3073c51f20 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/extra_keys/existing.yml @@ -0,0 +1,4 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo +another_key: foo diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/extra_keys/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/extra_keys/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..4ede434a2a7a2ac1f9d41e1ff669a40428a743bc --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/extra_keys/expected.yml @@ -0,0 +1,6 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo + boolean: false +extra_key: 'a new extra key' +another_key: foo diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/extra_keys/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/extra_keys/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..50666fdb7cd9c1b118849ae16268c44ea9f78935 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/extra_keys/setup.yml @@ -0,0 +1 @@ +title: Extra top level keys are preserved diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_existent/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_existent/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..4134d19194d94d554c37c19be378e6b1d9578798 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_existent/dist.yml @@ -0,0 +1,4 @@ +parameters: + foo: bar + boolean: false + another: ~ diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_existent/existing.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_existent/existing.yml new file mode 100644 index 0000000000000000000000000000000000000000..c31530c1d6a71eac37dd6e84350f6da322fc1333 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_existent/existing.yml @@ -0,0 +1,3 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_existent/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_existent/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..73f278e96debe8440368ac480d9fca269cdcd1ab --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_existent/expected.yml @@ -0,0 +1,5 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo + boolean: false + another: 'null' diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_existent/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_existent/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..79664cb12579d04007f55c11db0cdac5908e04db --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_existent/setup.yml @@ -0,0 +1,11 @@ +title: Existing values are not asked interactively again + +interactive: true + +requested_params: + boolean: + default: 'false' + input: 'false' + another: + default: 'null' + input: '"null"' diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_non_existent/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_non_existent/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..c6e5b2ce3ca7acc99522cfec22a2d78bded4f645 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_non_existent/dist.yml @@ -0,0 +1,4 @@ +parameters: + boolean: false + another: test + nested: nested diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_non_existent/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_non_existent/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..84b8ddd6dc93b950752960457518a0d533674253 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_non_existent/expected.yml @@ -0,0 +1,10 @@ +# This file is auto-generated during the composer install +parameters: + boolean: true + another: null + nested: + foo: bar + bar: + - foo + - test + - null diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_non_existent/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_non_existent/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..40effce4d99a3514c2f4f9b30703cfda7ad2d638 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_non_existent/setup.yml @@ -0,0 +1,14 @@ +title: Missing keys are asked interactively + +interactive: true + +requested_params: + boolean: + default: 'false' + input: 'true' + nested: + default: nested + input: '{foo: bar, bar: [foo, test, null]}' + another: + default: test + input: 'null' diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_with_environment/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_with_environment/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..c6e5b2ce3ca7acc99522cfec22a2d78bded4f645 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_with_environment/dist.yml @@ -0,0 +1,4 @@ +parameters: + boolean: false + another: test + nested: nested diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_with_environment/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_with_environment/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..e693c312ff7ebd5982ac5ffd99442823bc972851 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_with_environment/expected.yml @@ -0,0 +1,10 @@ +# This file is auto-generated during the composer install +parameters: + boolean: true + nested: + foo: env_foo + bar: + - env + - test + - null + another: null diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_with_environment/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_with_environment/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..80e2585c9cde79cb807391ed76566e87be437feb --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/interaction_with_environment/setup.yml @@ -0,0 +1,17 @@ +title: Values provided by the environment are not asked interactively + +config: + env-map: + boolean: IC_TEST_BOOL + nested: IC_TEST_NESTED + +environment: + IC_TEST_BOOL: 'true' + IC_TEST_NESTED: '{foo: env_foo, bar: [env, test, null]}' + +interactive: true + +requested_params: + another: + default: test + input: 'null' diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/keep_outdated/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/keep_outdated/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..d426a85eb5d6f09bb10ca450ff98410bc36cd5b5 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/keep_outdated/dist.yml @@ -0,0 +1,2 @@ +parameters: + foo: bar diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/keep_outdated/existing.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/keep_outdated/existing.yml new file mode 100644 index 0000000000000000000000000000000000000000..a5cd5190073f224aa087a0f2687dba0e7ce2300d --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/keep_outdated/existing.yml @@ -0,0 +1,4 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo + outdated: outdated_param diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/keep_outdated/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/keep_outdated/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..a5cd5190073f224aa087a0f2687dba0e7ce2300d --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/keep_outdated/expected.yml @@ -0,0 +1,4 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo + outdated: outdated_param diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/keep_outdated/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/keep_outdated/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..d3f2eec1fc6a18447287220fef6eaeb474215eb4 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/keep_outdated/setup.yml @@ -0,0 +1,4 @@ +title: Outdated keys can be kept in the parameters file + +config: + keep-outdated: true diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..45f3fddefb3a4cffa6524761ced6e8c2e15538b5 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent/dist.yml @@ -0,0 +1,7 @@ +parameters: + foo: bar + boolean: false + another: ~ + nested: + foo: bar + bar: baz diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..9084edcf28242ef7fefcd951c1b0998ffcd451d9 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent/expected.yml @@ -0,0 +1,8 @@ +# This file is auto-generated during the composer install +parameters: + foo: bar + boolean: false + another: null + nested: + foo: bar + bar: baz diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..9c33d2d48a5074fb91b86fcbe32997b0a9687c94 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent/setup.yml @@ -0,0 +1 @@ +title: Non existent files are created diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent_with_environment/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent_with_environment/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..45f3fddefb3a4cffa6524761ced6e8c2e15538b5 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent_with_environment/dist.yml @@ -0,0 +1,7 @@ +parameters: + foo: bar + boolean: false + another: ~ + nested: + foo: bar + bar: baz diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent_with_environment/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent_with_environment/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..45b12e2df27df5c239446d05b628a7eb1a10b863 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent_with_environment/expected.yml @@ -0,0 +1,11 @@ +# This file is auto-generated during the composer install +parameters: + foo: foobar + boolean: true + another: null + nested: + foo: env_foo + bar: + - env + - test + - null diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent_with_environment/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent_with_environment/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..684e4de752a285dc3a36db0ea6251920a0de47e0 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/non_existent_with_environment/setup.yml @@ -0,0 +1,13 @@ +title: Environment variables are used over dist file defaults + +config: + env-map: + boolean: IC_TEST_BOOL + foo: IC_TEST_FOO + nested: IC_TEST_NESTED + another: IC_TEST_NOT_SET + +environment: + IC_TEST_BOOL: 'true' + IC_TEST_FOO: 'foobar' + IC_TEST_NESTED: '{foo: env_foo, bar: [env, test, null]}' diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/remove_outdated/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/remove_outdated/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..d426a85eb5d6f09bb10ca450ff98410bc36cd5b5 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/remove_outdated/dist.yml @@ -0,0 +1,2 @@ +parameters: + foo: bar diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/remove_outdated/existing.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/remove_outdated/existing.yml new file mode 100644 index 0000000000000000000000000000000000000000..a5cd5190073f224aa087a0f2687dba0e7ce2300d --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/remove_outdated/existing.yml @@ -0,0 +1,4 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo + outdated: outdated_param diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/remove_outdated/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/remove_outdated/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..c31530c1d6a71eac37dd6e84350f6da322fc1333 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/remove_outdated/expected.yml @@ -0,0 +1,3 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/remove_outdated/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/remove_outdated/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..183e5cdac19356dddd104e4110dd19734dac98e4 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/remove_outdated/setup.yml @@ -0,0 +1 @@ +title: Outdated keys are removed from the parameters file diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..9e4d0aa86ebeb61004254e29dbe8c23e2c29539b --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed/dist.yml @@ -0,0 +1,6 @@ +parameters: + new: bar + new2: new2 + new3: test + new4: test4 + new5: test5 diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed/existing.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed/existing.yml new file mode 100644 index 0000000000000000000000000000000000000000..be294b3ad594edda90abdff4556bc2330b324a57 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed/existing.yml @@ -0,0 +1,6 @@ +# This file is auto-generated during the composer install +parameters: + old: old_value + new2: foo + old2: bar + old4: old4 diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..b7d7fcdb277eef1bbe7643fe28455e69817725ac --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed/expected.yml @@ -0,0 +1,7 @@ +# This file is auto-generated during the composer install +parameters: + new: old_value + new2: foo + new3: test + new4: old4 + new5: old4 diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..153ed8cfc414fe88cb4c362e303037104f1c9302 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed/setup.yml @@ -0,0 +1,9 @@ +title: Key can be renamed and the value is reused + +config: + rename-map: + new: old + new2: old2 + new3: old3 + new4: old4 + new5: new4 # Cascade renaming diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed_and_environment/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed_and_environment/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..be0c21665acf163a4fb6c760c0dc01db29fb26c1 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed_and_environment/dist.yml @@ -0,0 +1,3 @@ +parameters: + new: bar + new2: new2 diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed_and_environment/existing.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed_and_environment/existing.yml new file mode 100644 index 0000000000000000000000000000000000000000..b27e31b4867a1f7fb029fdb35324fbece85663cd --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed_and_environment/existing.yml @@ -0,0 +1,4 @@ +# This file is auto-generated during the composer install +parameters: + old: old_value + old2: old_value2 diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed_and_environment/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed_and_environment/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..5e24ba6c4a21d718d2c36a7a08172e248371bdc0 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed_and_environment/expected.yml @@ -0,0 +1,4 @@ +# This file is auto-generated during the composer install +parameters: + new: new_env_value + new2: old_value2 diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed_and_environment/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed_and_environment/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..7c3853f1de46a072603db29fdb32a20d71dcd8d3 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/renamed_and_environment/setup.yml @@ -0,0 +1,11 @@ +title: Environment variables win over renamed keys + +config: + rename-map: + new: old + new2: old2 + env-map: + new: IC_TEST_NEW + +environment: + IC_TEST_NEW: 'new_env_value' diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..df4994f32750cc35829d5d96f28caf1ad2ffd203 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder/dist.yml @@ -0,0 +1,3 @@ +parameters: + foo: bar + boolean: false diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder/existing.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder/existing.yml new file mode 100644 index 0000000000000000000000000000000000000000..f4b75e87a15f4df844a1d289e6beb49e7ef8eddc --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder/existing.yml @@ -0,0 +1,4 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo + boolean: false diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..f4b75e87a15f4df844a1d289e6beb49e7ef8eddc --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder/expected.yml @@ -0,0 +1,4 @@ +# This file is auto-generated during the composer install +parameters: + foo: existing_foo + boolean: false diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..21a4b0066262c7550a19eb0b9e56445f201dc0ad --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder/setup.yml @@ -0,0 +1,6 @@ +title: Files can be located in subfolders + +config: + file: 'app/parameters.yml' + +dist-file: 'app/parameters.yml.dist' diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder_created/dist.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder_created/dist.yml new file mode 100644 index 0000000000000000000000000000000000000000..d426a85eb5d6f09bb10ca450ff98410bc36cd5b5 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder_created/dist.yml @@ -0,0 +1,2 @@ +parameters: + foo: bar diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder_created/expected.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder_created/expected.yml new file mode 100644 index 0000000000000000000000000000000000000000..367f8eb5b48d087920d1b96538f0fdfe401d7b6e --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder_created/expected.yml @@ -0,0 +1,3 @@ +# This file is auto-generated during the composer install +parameters: + foo: bar diff --git a/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder_created/setup.yml b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder_created/setup.yml new file mode 100644 index 0000000000000000000000000000000000000000..c30049a6509fb36daaf7b9414a3e88a698584e0f --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/Tests/fixtures/testcases/subfolder_created/setup.yml @@ -0,0 +1,7 @@ +title: Files can be located in different folders than the dist and the folder is created + +config: + file: 'app/parameters.yml' + dist-file: 'dist/parameters.yml' + +dist-file: 'dist/parameters.yml' diff --git a/vendor/incenteev/composer-parameter-handler/composer.json b/vendor/incenteev/composer-parameter-handler/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..784ccfd7a07ae4f1981c9f95374b30d0de08c519 --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/composer.json @@ -0,0 +1,30 @@ +{ + "name": "incenteev/composer-parameter-handler", + "description": "Composer script handling your ignored parameter file", + "keywords": ["parameters management"], + "homepage": "https://github.com/Incenteev/ParameterHandler", + "license": "MIT", + "authors": [ + { + "name": "Christophe Coevoet", + "email": "stof@notk.org" + } + ], + "require": { + "php": ">=5.3.3", + "symfony/yaml": "~2.3|~3.0" + }, + "require-dev": { + "composer/composer": "1.0.*@dev", + "phpspec/prophecy-phpunit": "~1.0", + "symfony/filesystem": "~2.2" + }, + "autoload": { + "psr-4": { "Incenteev\\ParameterHandler\\": "" } + }, + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + } +} diff --git a/vendor/incenteev/composer-parameter-handler/phpunit.xml.dist b/vendor/incenteev/composer-parameter-handler/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..a274a5ff080460745f61bb0a16f1691662beee6d --- /dev/null +++ b/vendor/incenteev/composer-parameter-handler/phpunit.xml.dist @@ -0,0 +1,19 @@ + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/jdorn/sql-formatter/.travis.yml b/vendor/jdorn/sql-formatter/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..310d8e0db79cf8f0c7a52f14b8c29d2a54a62df2 --- /dev/null +++ b/vendor/jdorn/sql-formatter/.travis.yml @@ -0,0 +1,5 @@ +language: php +php: + - 5.4 + - 5.3 +script: phpunit --coverage-text diff --git a/vendor/jdorn/sql-formatter/LICENSE.txt b/vendor/jdorn/sql-formatter/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..e822279b4693e265a5227cf117b972726779b6dc --- /dev/null +++ b/vendor/jdorn/sql-formatter/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Jeremy Dorn + +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/vendor/jdorn/sql-formatter/README.md b/vendor/jdorn/sql-formatter/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a144323cf86f676a12461b8960ecc9b961039272 --- /dev/null +++ b/vendor/jdorn/sql-formatter/README.md @@ -0,0 +1,185 @@ +SqlFormatter +============= + +A lightweight php class for formatting sql statements. + +It can automatically indent and add line breaks in addition to syntax highlighting. + +History +============ + +I found myself having to debug auto-generated SQL statements all the time and +wanted some way to easily output formatted HTML without having to include a +huge library or copy and paste into online formatters. + +I was originally planning to extract the formatting code from PhpMyAdmin, +but that was 10,000+ lines of code and used global variables. + +I saw that other people had the same problem and used Stack Overflow user +losif's answer as a starting point. http://stackoverflow.com/a/3924147 + +Usage +============ + +The SqlFormatter class has a static method 'format' which takes a SQL string +as input and returns a formatted HTML block inside a pre tag. + +Sample usage: + +```php += NOW()) ) + GROUP BY Column1 ORDER BY Column3 DESC LIMIT 5,10"; + +echo SqlFormatter::format($query); +``` + +Output: + +![](http://jdorn.github.com/sql-formatter/format-highlight.png) + +Formatting Only +------------------------- +If you don't want syntax highlighting and only want the indentations and +line breaks, pass in false as the second parameter. + +This is useful for outputting to error logs or other non-html formats. + +```php +=5.2.4" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, + "authors": [ + { + "name": "Jeremy Dorn", + "email": "jeremy@jeremydorn.com", + "homepage": "http://jeremydorn.com/" + } + ], + "autoload": { + "classmap": ["lib"] + }, + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + } +} diff --git a/vendor/jdorn/sql-formatter/composer.lock b/vendor/jdorn/sql-formatter/composer.lock new file mode 100644 index 0000000000000000000000000000000000000000..379ab134794bc8e4eb15eb072b4a1831d61ac527 --- /dev/null +++ b/vendor/jdorn/sql-formatter/composer.lock @@ -0,0 +1,422 @@ +{ + "hash": "a709b40d4a35e7077aa40fbd0f78f6c6", + "packages": [ + + ], + "packages-dev": [ + { + "name": "phpunit/php-code-coverage", + "version": "1.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "1.2.9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1.2.9", + "reference": "1.2.9", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": ">=1.3.0@stable", + "phpunit/php-text-template": ">=1.1.1@stable", + "phpunit/php-token-stream": ">=1.1.3@stable" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.0.5" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2013-02-26 18:55:56" + }, + { + "name": "phpunit/php-file-iterator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "2deb24c65ea78e126daa8d45b2089ddc29ec1d26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/2deb24c65ea78e126daa8d45b2089ddc29ec1d26", + "reference": "2deb24c65ea78e126daa8d45b2089ddc29ec1d26", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "File/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2013-01-07 10:47:05" + }, + { + "name": "phpunit/php-text-template", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "1eeef106193d2f8c539728e566bb4793071a9e18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/1eeef106193d2f8c539728e566bb4793071a9e18", + "reference": "1eeef106193d2f8c539728e566bb4793071a9e18", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "Text/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2013-01-07 10:56:17" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "ecf7920b27003a9412b07dad79dbb5ad1249e6c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/ecf7920b27003a9412b07dad79dbb5ad1249e6c3", + "reference": "ecf7920b27003a9412b07dad79dbb5ad1249e6c3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2013-01-30 06:08:51" + }, + { + "name": "phpunit/php-token-stream", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "c25dd88e1592e66dee2553c99ef244203d5a1b98" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c25dd88e1592e66dee2553c99ef244203d5a1b98", + "reference": "c25dd88e1592e66dee2553c99ef244203d5a1b98", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2013-01-07 10:56:35" + }, + { + "name": "phpunit/phpunit", + "version": "3.7.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "2c67e52445416bb7c14046b432acd7eb79e4e612" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2c67e52445416bb7c14046b432acd7eb79e4e612", + "reference": "2c67e52445416bb7c14046b432acd7eb79e4e612", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpunit/php-code-coverage": ">=1.2.1,<1.3.0", + "phpunit/php-file-iterator": ">=1.3.1", + "phpunit/php-text-template": ">=1.1.1", + "phpunit/php-timer": ">=1.0.2,<1.1.0", + "phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0", + "symfony/yaml": ">=2.2.0" + }, + "require-dev": { + "pear-pear/pear": "1.9.4" + }, + "suggest": { + "ext-json": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "phpunit/php-invoker": ">=1.1.0,<1.2.0" + }, + "bin": [ + "composer/bin/phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.7.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "", + "../../symfony/yaml/" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2013-03-11 07:06:05" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "1.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "d49b5683200b5db9b1c64cb06f52f50d147891c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/d49b5683200b5db9b1c64cb06f52f50d147891c4", + "reference": "d49b5683200b5db9b1c64cb06f52f50d147891c4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-text-template": ">=1.1.1@stable" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2013-02-05 07:46:41" + }, + { + "name": "symfony/yaml", + "version": "dev-master", + "target-dir": "Symfony/Component/Yaml", + "source": { + "type": "git", + "url": "https://github.com/symfony/Yaml.git", + "reference": "f198ac28048eeceae852419c076123aaee59cd1c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/f198ac28048eeceae852419c076123aaee59cd1c", + "reference": "f198ac28048eeceae852419c076123aaee59cd1c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Yaml\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "http://symfony.com", + "time": "2013-01-31 21:39:01" + } + ], + "aliases": [ + + ], + "minimum-stability": "dev", + "stability-flags": [ + + ], + "platform": { + "php": ">=5.2.4" + }, + "platform-dev": [ + + ] +} diff --git a/vendor/jdorn/sql-formatter/examples/cli.php b/vendor/jdorn/sql-formatter/examples/cli.php new file mode 100644 index 0000000000000000000000000000000000000000..17ee0e104189247fb63852a0dd077bd3f181567f --- /dev/null +++ b/vendor/jdorn/sql-formatter/examples/cli.php @@ -0,0 +1,17 @@ +Run this php script from the command line to see CLI syntax highlighting and formatting. It support Unix pipes or command line argument style.

"; + echo "
php examples/cli.php \"SELECT * FROM MyTable WHERE (id>5 AND \\`name\\` LIKE \\"testing\\");\"
"; + echo "
echo \"SELECT * FROM MyTable WHERE (id>5 AND \\`name\\` LIKE \\"testing\\");\" | php examples/cli.php
"; +} + +if(isset($argv[1])) { + $sql = $argv[1]; +} +else { + $sql = stream_get_contents(fopen("php://stdin", "r")); +} + +require_once(__DIR__.'/../lib/SqlFormatter.php'); + +echo SqlFormatter::format($sql); diff --git a/vendor/jdorn/sql-formatter/examples/examples.php b/vendor/jdorn/sql-formatter/examples/examples.php new file mode 100644 index 0000000000000000000000000000000000000000..f54cfb080b6e7b227c1bf434ca2f0a3c1fc7b5d9 --- /dev/null +++ b/vendor/jdorn/sql-formatter/examples/examples.php @@ -0,0 +1,270 @@ + + + + SqlFormatter Examples + + + += + DATE_FORMAT((DATE_SUB(NOW(),INTERVAL 1 DAY)),'%Y-%c-%d') AND t_create + < DATE_FORMAT(NOW(), '%Y-%c-%d') ORDER BY d.id LIMIT 2,10) a, + orc_scheme_detail b WHERE a.id = b.id", + + "SELECT * from Table1 LEFT + OUTER JOIN Table2 on Table1.id = Table2.id", + + "SELECT * FROM MyTable WHERE id = 46", + + "SELECT count(*),`Column1` as count,`Testing`, `Testing Three` FROM `Table1` + WHERE Column1 = 'testing' AND ( (`Column2` = `Column3` OR Column4 >= NOW()) ) + GROUP BY Column1 ORDER BY Column3 DESC LIMIT 5,10", + + "select * from `Table`, (SELECT group_concat(column1) as col FROM Table2 GROUP BY category) + Table2, Table3 where Table2.col = (Table3.col2 - `Table`.id)", + + "insert ignore into Table3 (column1, column2) VALUES ('test1','test2'), ('test3','test4');", + + "UPDATE MyTable SET name='sql', category='databases' WHERE id > '65'", + + "delete from MyTable WHERE name LIKE \"test%\"", + + "SELECT * FROM UnmatchedParens WHERE ( A = B)) AND (((Test=1)", + + "-- This is a comment + SELECT + /* This is another comment + On more than one line */ + Id #This is one final comment + as temp, DateCreated as Created FROM MyTable;", +); + +// Example statements for splitting SQL strings into individual queries +$split_statements = array( + "DROP TABLE IF EXISTS MyTable; + CREATE TABLE MyTable ( id int ); + INSERT INTO MyTable (id) + VALUES + (1),(2),(3),(4); + SELECT * FROM MyTable;", + + "SELECT \";\"; SELECT \";\\\"; a;\"; + SELECT \"; + abc\"; + SELECT a,b #comment; + FROM test;", + + " + -- Drop the table first if it exists + DROP TABLE IF EXISTS MyTable; + + -- Create the table + CREATE TABLE MyTable ( id int ); + + -- Insert values + INSERT INTO MyTable (id) + VALUES + (1),(2),(3),(4); + + -- Done", +); + +// Example statements for removing comments +$comment_statements = array( + "-- This is a comment + SELECT + /* This is another comment + On more than one line */ + Id #This is one final comment + as temp, DateCreated as Created FROM MyTable;", +); +?> + + +

Formatting And Syntax Highlighting

+ +
+ Usage: +
+    '); ?>
+    
+
+ + + + + + + + + + + +
OriginalFormatted And Highlighted
+
+
+ + +

Formatting Only

+ +
+ Usage: +
+    '); ?>
+    
+
+ + + + + + + + + + + +
OriginalFormatted
+
+
+ + +

Syntax Highlighting Only

+ +
+ Usage: +
+    '); ?>
+    
+
+ + + + + + + + + + + +
OriginalHighlighted
+
+
+ + +

Compress Query

+ +
+ Usage: +
+    '); ?>
+    
+
+ + + + + + + + + + + +
OriginalCompressed
+
+
+ + +

Splitting SQL Strings Into Individual Queries

+ +
+ Usage: +
+    '); ?>
+    
+
+ + + + + + + + + + + +
OriginalSplit
+
+
"; + foreach ($queries as $query) { + echo "
  • " . SqlFormatter::highlight($query) . "
  • "; + } + echo ""; + ?>
    + + +

    Removing Comments

    + +
    + Usage: +
    +    '); ?>
    +    
    +
    + + + + + + + + + + + +
    OriginalComments Removed
    +
    +
    +
    +
    + + + diff --git a/vendor/jdorn/sql-formatter/lib/SqlFormatter.php b/vendor/jdorn/sql-formatter/lib/SqlFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..e569682bf198e4088f348303cecc50f3a2b831fd --- /dev/null +++ b/vendor/jdorn/sql-formatter/lib/SqlFormatter.php @@ -0,0 +1,1080 @@ + + * @author Florin Patan + * @copyright 2013 Jeremy Dorn + * @license http://opensource.org/licenses/MIT + * @link http://github.com/jdorn/sql-formatter + * @version 1.2.17 + */ +class SqlFormatter +{ + // Constants for token types + const TOKEN_TYPE_WHITESPACE = 0; + const TOKEN_TYPE_WORD = 1; + const TOKEN_TYPE_QUOTE = 2; + const TOKEN_TYPE_BACKTICK_QUOTE = 3; + const TOKEN_TYPE_RESERVED = 4; + const TOKEN_TYPE_RESERVED_TOPLEVEL = 5; + const TOKEN_TYPE_RESERVED_NEWLINE = 6; + const TOKEN_TYPE_BOUNDARY = 7; + const TOKEN_TYPE_COMMENT = 8; + const TOKEN_TYPE_BLOCK_COMMENT = 9; + const TOKEN_TYPE_NUMBER = 10; + const TOKEN_TYPE_ERROR = 11; + const TOKEN_TYPE_VARIABLE = 12; + + // Constants for different components of a token + const TOKEN_TYPE = 0; + const TOKEN_VALUE = 1; + + // Reserved words (for syntax highlighting) + protected static $reserved = array( + 'ACCESSIBLE', 'ACTION', 'AGAINST', 'AGGREGATE', 'ALGORITHM', 'ALL', 'ALTER', 'ANALYSE', 'ANALYZE', 'AS', 'ASC', + 'AUTOCOMMIT', 'AUTO_INCREMENT', 'BACKUP', 'BEGIN', 'BETWEEN', 'BINLOG', 'BOTH', 'CASCADE', 'CASE', 'CHANGE', 'CHANGED', 'CHARACTER SET', + 'CHARSET', 'CHECK', 'CHECKSUM', 'COLLATE', 'COLLATION', 'COLUMN', 'COLUMNS', 'COMMENT', 'COMMIT', 'COMMITTED', 'COMPRESSED', 'CONCURRENT', + 'CONSTRAINT', 'CONTAINS', 'CONVERT', 'CREATE', 'CROSS', 'CURRENT_TIMESTAMP', 'DATABASE', 'DATABASES', 'DAY', 'DAY_HOUR', 'DAY_MINUTE', + 'DAY_SECOND', 'DEFAULT', 'DEFINER', 'DELAYED', 'DELETE', 'DESC', 'DESCRIBE', 'DETERMINISTIC', 'DISTINCT', 'DISTINCTROW', 'DIV', + 'DO', 'DUMPFILE', 'DUPLICATE', 'DYNAMIC', 'ELSE', 'ENCLOSED', 'END', 'ENGINE', 'ENGINE_TYPE', 'ENGINES', 'ESCAPE', 'ESCAPED', 'EVENTS', 'EXECUTE', + 'EXISTS', 'EXPLAIN', 'EXTENDED', 'FAST', 'FIELDS', 'FILE', 'FIRST', 'FIXED', 'FLUSH', 'FOR', 'FORCE', 'FOREIGN', 'FULL', 'FULLTEXT', + 'FUNCTION', 'GLOBAL', 'GRANT', 'GRANTS', 'GROUP_CONCAT', 'HEAP', 'HIGH_PRIORITY', 'HOSTS', 'HOUR', 'HOUR_MINUTE', + 'HOUR_SECOND', 'IDENTIFIED', 'IF', 'IFNULL', 'IGNORE', 'IN', 'INDEX', 'INDEXES', 'INFILE', 'INSERT', 'INSERT_ID', 'INSERT_METHOD', 'INTERVAL', + 'INTO', 'INVOKER', 'IS', 'ISOLATION', 'KEY', 'KEYS', 'KILL', 'LAST_INSERT_ID', 'LEADING', 'LEVEL', 'LIKE', 'LINEAR', + 'LINES', 'LOAD', 'LOCAL', 'LOCK', 'LOCKS', 'LOGS', 'LOW_PRIORITY', 'MARIA', 'MASTER', 'MASTER_CONNECT_RETRY', 'MASTER_HOST', 'MASTER_LOG_FILE', + 'MATCH','MAX_CONNECTIONS_PER_HOUR', 'MAX_QUERIES_PER_HOUR', 'MAX_ROWS', 'MAX_UPDATES_PER_HOUR', 'MAX_USER_CONNECTIONS', + 'MEDIUM', 'MERGE', 'MINUTE', 'MINUTE_SECOND', 'MIN_ROWS', 'MODE', 'MODIFY', + 'MONTH', 'MRG_MYISAM', 'MYISAM', 'NAMES', 'NATURAL', 'NOT', 'NOW()','NULL', 'OFFSET', 'ON', 'OPEN', 'OPTIMIZE', 'OPTION', 'OPTIONALLY', + 'ON UPDATE', 'ON DELETE', 'OUTFILE', 'PACK_KEYS', 'PAGE', 'PARTIAL', 'PARTITION', 'PARTITIONS', 'PASSWORD', 'PRIMARY', 'PRIVILEGES', 'PROCEDURE', + 'PROCESS', 'PROCESSLIST', 'PURGE', 'QUICK', 'RANGE', 'RAID0', 'RAID_CHUNKS', 'RAID_CHUNKSIZE','RAID_TYPE', 'READ', 'READ_ONLY', + 'READ_WRITE', 'REFERENCES', 'REGEXP', 'RELOAD', 'RENAME', 'REPAIR', 'REPEATABLE', 'REPLACE', 'REPLICATION', 'RESET', 'RESTORE', 'RESTRICT', + 'RETURN', 'RETURNS', 'REVOKE', 'RLIKE', 'ROLLBACK', 'ROW', 'ROWS', 'ROW_FORMAT', 'SECOND', 'SECURITY', 'SEPARATOR', + 'SERIALIZABLE', 'SESSION', 'SHARE', 'SHOW', 'SHUTDOWN', 'SLAVE', 'SONAME', 'SOUNDS', 'SQL', 'SQL_AUTO_IS_NULL', 'SQL_BIG_RESULT', + 'SQL_BIG_SELECTS', 'SQL_BIG_TABLES', 'SQL_BUFFER_RESULT', 'SQL_CALC_FOUND_ROWS', 'SQL_LOG_BIN', 'SQL_LOG_OFF', 'SQL_LOG_UPDATE', + 'SQL_LOW_PRIORITY_UPDATES', 'SQL_MAX_JOIN_SIZE', 'SQL_QUOTE_SHOW_CREATE', 'SQL_SAFE_UPDATES', 'SQL_SELECT_LIMIT', 'SQL_SLAVE_SKIP_COUNTER', + 'SQL_SMALL_RESULT', 'SQL_WARNINGS', 'SQL_CACHE', 'SQL_NO_CACHE', 'START', 'STARTING', 'STATUS', 'STOP', 'STORAGE', + 'STRAIGHT_JOIN', 'STRING', 'STRIPED', 'SUPER', 'TABLE', 'TABLES', 'TEMPORARY', 'TERMINATED', 'THEN', 'TO', 'TRAILING', 'TRANSACTIONAL', 'TRUE', + 'TRUNCATE', 'TYPE', 'TYPES', 'UNCOMMITTED', 'UNIQUE', 'UNLOCK', 'UNSIGNED', 'USAGE', 'USE', 'USING', 'VARIABLES', + 'VIEW', 'WHEN', 'WITH', 'WORK', 'WRITE', 'YEAR_MONTH' + ); + + // For SQL formatting + // These keywords will all be on their own line + protected static $reserved_toplevel = array( + 'SELECT', 'FROM', 'WHERE', 'SET', 'ORDER BY', 'GROUP BY', 'LIMIT', 'DROP', + 'VALUES', 'UPDATE', 'HAVING', 'ADD', 'AFTER', 'ALTER TABLE', 'DELETE FROM', 'UNION ALL', 'UNION', 'EXCEPT', 'INTERSECT' + ); + + protected static $reserved_newline = array( + 'LEFT OUTER JOIN', 'RIGHT OUTER JOIN', 'LEFT JOIN', 'RIGHT JOIN', 'OUTER JOIN', 'INNER JOIN', 'JOIN', 'XOR', 'OR', 'AND' + ); + + protected static $functions = array ( + 'ABS', 'ACOS', 'ADDDATE', 'ADDTIME', 'AES_DECRYPT', 'AES_ENCRYPT', 'AREA', 'ASBINARY', 'ASCII', 'ASIN', 'ASTEXT', 'ATAN', 'ATAN2', + 'AVG', 'BDMPOLYFROMTEXT', 'BDMPOLYFROMWKB', 'BDPOLYFROMTEXT', 'BDPOLYFROMWKB', 'BENCHMARK', 'BIN', 'BIT_AND', 'BIT_COUNT', 'BIT_LENGTH', + 'BIT_OR', 'BIT_XOR', 'BOUNDARY', 'BUFFER', 'CAST', 'CEIL', 'CEILING', 'CENTROID', 'CHAR', 'CHARACTER_LENGTH', 'CHARSET', 'CHAR_LENGTH', + 'COALESCE', 'COERCIBILITY', 'COLLATION', 'COMPRESS', 'CONCAT', 'CONCAT_WS', 'CONNECTION_ID', 'CONTAINS', 'CONV', 'CONVERT', 'CONVERT_TZ', + 'CONVEXHULL', 'COS', 'COT', 'COUNT', 'CRC32', 'CROSSES', 'CURDATE', 'CURRENT_DATE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', + 'CURTIME', 'DATABASE', 'DATE', 'DATEDIFF', 'DATE_ADD', 'DATE_DIFF', 'DATE_FORMAT', 'DATE_SUB', 'DAY', 'DAYNAME', 'DAYOFMONTH', 'DAYOFWEEK', + 'DAYOFYEAR', 'DECODE', 'DEFAULT', 'DEGREES', 'DES_DECRYPT', 'DES_ENCRYPT', 'DIFFERENCE', 'DIMENSION', 'DISJOINT', 'DISTANCE', 'ELT', 'ENCODE', + 'ENCRYPT', 'ENDPOINT', 'ENVELOPE', 'EQUALS', 'EXP', 'EXPORT_SET', 'EXTERIORRING', 'EXTRACT', 'EXTRACTVALUE', 'FIELD', 'FIND_IN_SET', 'FLOOR', + 'FORMAT', 'FOUND_ROWS', 'FROM_DAYS', 'FROM_UNIXTIME', 'GEOMCOLLFROMTEXT', 'GEOMCOLLFROMWKB', 'GEOMETRYCOLLECTION', 'GEOMETRYCOLLECTIONFROMTEXT', + 'GEOMETRYCOLLECTIONFROMWKB', 'GEOMETRYFROMTEXT', 'GEOMETRYFROMWKB', 'GEOMETRYN', 'GEOMETRYTYPE', 'GEOMFROMTEXT', 'GEOMFROMWKB', 'GET_FORMAT', + 'GET_LOCK', 'GLENGTH', 'GREATEST', 'GROUP_CONCAT', 'GROUP_UNIQUE_USERS', 'HEX', 'HOUR', 'IF', 'IFNULL', 'INET_ATON', 'INET_NTOA', 'INSERT', 'INSTR', + 'INTERIORRINGN', 'INTERSECTION', 'INTERSECTS', 'INTERVAL', 'ISCLOSED', 'ISEMPTY', 'ISNULL', 'ISRING', 'ISSIMPLE', 'IS_FREE_LOCK', 'IS_USED_LOCK', + 'LAST_DAY', 'LAST_INSERT_ID', 'LCASE', 'LEAST', 'LEFT', 'LENGTH', 'LINEFROMTEXT', 'LINEFROMWKB', 'LINESTRING', 'LINESTRINGFROMTEXT', 'LINESTRINGFROMWKB', + 'LN', 'LOAD_FILE', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATE', 'LOG', 'LOG10', 'LOG2', 'LOWER', 'LPAD', 'LTRIM', 'MAKEDATE', 'MAKETIME', 'MAKE_SET', + 'MASTER_POS_WAIT', 'MAX', 'MBRCONTAINS', 'MBRDISJOINT', 'MBREQUAL', 'MBRINTERSECTS', 'MBROVERLAPS', 'MBRTOUCHES', 'MBRWITHIN', 'MD5', 'MICROSECOND', + 'MID', 'MIN', 'MINUTE', 'MLINEFROMTEXT', 'MLINEFROMWKB', 'MOD', 'MONTH', 'MONTHNAME', 'MPOINTFROMTEXT', 'MPOINTFROMWKB', 'MPOLYFROMTEXT', 'MPOLYFROMWKB', + 'MULTILINESTRING', 'MULTILINESTRINGFROMTEXT', 'MULTILINESTRINGFROMWKB', 'MULTIPOINT', 'MULTIPOINTFROMTEXT', 'MULTIPOINTFROMWKB', 'MULTIPOLYGON', + 'MULTIPOLYGONFROMTEXT', 'MULTIPOLYGONFROMWKB', 'NAME_CONST', 'NULLIF', 'NUMGEOMETRIES', 'NUMINTERIORRINGS', 'NUMPOINTS', 'OCT', 'OCTET_LENGTH', + 'OLD_PASSWORD', 'ORD', 'OVERLAPS', 'PASSWORD', 'PERIOD_ADD', 'PERIOD_DIFF', 'PI', 'POINT', 'POINTFROMTEXT', 'POINTFROMWKB', 'POINTN', 'POINTONSURFACE', + 'POLYFROMTEXT', 'POLYFROMWKB', 'POLYGON', 'POLYGONFROMTEXT', 'POLYGONFROMWKB', 'POSITION', 'POW', 'POWER', 'QUARTER', 'QUOTE', 'RADIANS', 'RAND', + 'RELATED', 'RELEASE_LOCK', 'REPEAT', 'REPLACE', 'REVERSE', 'RIGHT', 'ROUND', 'ROW_COUNT', 'RPAD', 'RTRIM', 'SCHEMA', 'SECOND', 'SEC_TO_TIME', + 'SESSION_USER', 'SHA', 'SHA1', 'SIGN', 'SIN', 'SLEEP', 'SOUNDEX', 'SPACE', 'SQRT', 'SRID', 'STARTPOINT', 'STD', 'STDDEV', 'STDDEV_POP', 'STDDEV_SAMP', + 'STRCMP', 'STR_TO_DATE', 'SUBDATE', 'SUBSTR', 'SUBSTRING', 'SUBSTRING_INDEX', 'SUBTIME', 'SUM', 'SYMDIFFERENCE', 'SYSDATE', 'SYSTEM_USER', 'TAN', + 'TIME', 'TIMEDIFF', 'TIMESTAMP', 'TIMESTAMPADD', 'TIMESTAMPDIFF', 'TIME_FORMAT', 'TIME_TO_SEC', 'TOUCHES', 'TO_DAYS', 'TRIM', 'TRUNCATE', 'UCASE', + 'UNCOMPRESS', 'UNCOMPRESSED_LENGTH', 'UNHEX', 'UNIQUE_USERS', 'UNIX_TIMESTAMP', 'UPDATEXML', 'UPPER', 'USER', 'UTC_DATE', 'UTC_TIME', 'UTC_TIMESTAMP', + 'UUID', 'VARIANCE', 'VAR_POP', 'VAR_SAMP', 'VERSION', 'WEEK', 'WEEKDAY', 'WEEKOFYEAR', 'WITHIN', 'X', 'Y', 'YEAR', 'YEARWEEK' + ); + + // Punctuation that can be used as a boundary between other tokens + protected static $boundaries = array(',', ';',':', ')', '(', '.', '=', '<', '>', '+', '-', '*', '/', '!', '^', '%', '|', '&', '#'); + + // For HTML syntax highlighting + // Styles applied to different token types + public static $quote_attributes = 'style="color: blue;"'; + public static $backtick_quote_attributes = 'style="color: purple;"'; + public static $reserved_attributes = 'style="font-weight:bold;"'; + public static $boundary_attributes = ''; + public static $number_attributes = 'style="color: green;"'; + public static $word_attributes = 'style="color: #333;"'; + public static $error_attributes = 'style="background-color: red;"'; + public static $comment_attributes = 'style="color: #aaa;"'; + public static $variable_attributes = 'style="color: orange;"'; + public static $pre_attributes = 'style="color: black; background-color: white;"'; + + // Boolean - whether or not the current environment is the CLI + // This affects the type of syntax highlighting + // If not defined, it will be determined automatically + public static $cli; + + // For CLI syntax highlighting + public static $cli_quote = "\x1b[34;1m"; + public static $cli_backtick_quote = "\x1b[35;1m"; + public static $cli_reserved = "\x1b[37m"; + public static $cli_boundary = ""; + public static $cli_number = "\x1b[32;1m"; + public static $cli_word = ""; + public static $cli_error = "\x1b[31;1;7m"; + public static $cli_comment = "\x1b[30;1m"; + public static $cli_functions = "\x1b[37m"; + public static $cli_variable = "\x1b[36;1m"; + + // The tab character to use when formatting SQL + public static $tab = ' '; + + // This flag tells us if queries need to be enclosed in
     tags
    +    public static $use_pre = true;
    +
    +    // This flag tells us if SqlFormatted has been initialized
    +    protected static $init;
    +
    +    // Regular expressions for tokenizing
    +    protected static $regex_boundaries;
    +    protected static $regex_reserved;
    +    protected static $regex_reserved_newline;
    +    protected static $regex_reserved_toplevel;
    +    protected static $regex_function;
    +
    +    // Cache variables
    +    // Only tokens shorter than this size will be cached.  Somewhere between 10 and 20 seems to work well for most cases.
    +    public static $max_cachekey_size = 15;
    +    protected static $token_cache = array();
    +    protected static $cache_hits = 0;
    +    protected static $cache_misses = 0;
    +
    +    /**
    +     * Get stats about the token cache
    +     * @return Array An array containing the keys 'hits', 'misses', 'entries', and 'size' in bytes
    +     */
    +    public static function getCacheStats()
    +    {
    +        return array(
    +            'hits'=>self::$cache_hits,
    +            'misses'=>self::$cache_misses,
    +            'entries'=>count(self::$token_cache),
    +            'size'=>strlen(serialize(self::$token_cache))
    +        );
    +    }
    +
    +    /**
    +     * Stuff that only needs to be done once.  Builds regular expressions and sorts the reserved words.
    +     */
    +    protected static function init()
    +    {
    +        if (self::$init) return;
    +
    +        // Sort reserved word list from longest word to shortest, 3x faster than usort
    +        $reservedMap = array_combine(self::$reserved, array_map('strlen', self::$reserved));
    +        arsort($reservedMap);
    +        self::$reserved = array_keys($reservedMap);
    +
    +        // Set up regular expressions
    +        self::$regex_boundaries = '('.implode('|',array_map(array(__CLASS__, 'quote_regex'),self::$boundaries)).')';
    +        self::$regex_reserved = '('.implode('|',array_map(array(__CLASS__, 'quote_regex'),self::$reserved)).')';
    +        self::$regex_reserved_toplevel = str_replace(' ','\\s+','('.implode('|',array_map(array(__CLASS__, 'quote_regex'),self::$reserved_toplevel)).')');
    +        self::$regex_reserved_newline = str_replace(' ','\\s+','('.implode('|',array_map(array(__CLASS__, 'quote_regex'),self::$reserved_newline)).')');
    +
    +        self::$regex_function = '('.implode('|',array_map(array(__CLASS__, 'quote_regex'),self::$functions)).')';
    +
    +        self::$init = true;
    +    }
    +
    +    /**
    +     * Return the next token and token type in a SQL string.
    +     * Quoted strings, comments, reserved words, whitespace, and punctuation are all their own tokens.
    +     *
    +     * @param String $string   The SQL string
    +     * @param array  $previous The result of the previous getNextToken() call
    +     *
    +     * @return Array An associative array containing the type and value of the token.
    +     */
    +    protected static function getNextToken($string, $previous = null)
    +    {
    +        // Whitespace
    +        if (preg_match('/^\s+/',$string,$matches)) {
    +            return array(
    +                self::TOKEN_VALUE => $matches[0],
    +                self::TOKEN_TYPE=>self::TOKEN_TYPE_WHITESPACE
    +            );
    +        }
    +
    +        // Comment
    +        if ($string[0] === '#' || (isset($string[1])&&($string[0]==='-'&&$string[1]==='-') || ($string[0]==='/'&&$string[1]==='*'))) {
    +            // Comment until end of line
    +            if ($string[0] === '-' || $string[0] === '#') {
    +                $last = strpos($string, "\n");
    +                $type = self::TOKEN_TYPE_COMMENT;
    +            } else { // Comment until closing comment tag
    +                $last = strpos($string, "*/", 2) + 2;
    +                $type = self::TOKEN_TYPE_BLOCK_COMMENT;
    +            }
    +
    +            if ($last === false) {
    +                $last = strlen($string);
    +            }
    +
    +            return array(
    +                self::TOKEN_VALUE => substr($string, 0, $last),
    +                self::TOKEN_TYPE  => $type
    +            );
    +        }
    +
    +        // Quoted String
    +        if ($string[0]==='"' || $string[0]==='\'' || $string[0]==='`') {
    +            $return = array(
    +                self::TOKEN_TYPE => ($string[0]==='`'? self::TOKEN_TYPE_BACKTICK_QUOTE : self::TOKEN_TYPE_QUOTE),
    +                self::TOKEN_VALUE => self::getQuotedString($string)
    +            );
    +
    +            return $return;
    +        }
    +
    +        // User-defined Variable
    +        if ($string[0] === '@' && isset($string[1])) {
    +            $ret = array(
    +                self::TOKEN_VALUE => null,
    +                self::TOKEN_TYPE => self::TOKEN_TYPE_VARIABLE
    +            );
    +            
    +            // If the variable name is quoted
    +            if ($string[1]==='"' || $string[1]==='\'' || $string[1]==='`') {
    +                $ret[self::TOKEN_VALUE] = '@'.self::getQuotedString(substr($string,1));
    +            }
    +            // Non-quoted variable name
    +            else {
    +                preg_match('/^(@[a-zA-Z0-9\._\$]+)/',$string,$matches);
    +                if ($matches) {
    +                    $ret[self::TOKEN_VALUE] = $matches[1];
    +                }
    +            }
    +            
    +            if($ret[self::TOKEN_VALUE] !== null) return $ret;
    +        }
    +
    +        // Number (decimal, binary, or hex)
    +        if (preg_match('/^([0-9]+(\.[0-9]+)?|0x[0-9a-fA-F]+|0b[01]+)($|\s|"\'`|'.self::$regex_boundaries.')/',$string,$matches)) {
    +            return array(
    +                self::TOKEN_VALUE => $matches[1],
    +                self::TOKEN_TYPE=>self::TOKEN_TYPE_NUMBER
    +            );
    +        }
    +
    +        // Boundary Character (punctuation and symbols)
    +        if (preg_match('/^('.self::$regex_boundaries.')/',$string,$matches)) {
    +            return array(
    +                self::TOKEN_VALUE => $matches[1],
    +                self::TOKEN_TYPE  => self::TOKEN_TYPE_BOUNDARY
    +            );
    +        }
    +
    +        // A reserved word cannot be preceded by a '.'
    +        // this makes it so in "mytable.from", "from" is not considered a reserved word
    +        if (!$previous || !isset($previous[self::TOKEN_VALUE]) || $previous[self::TOKEN_VALUE] !== '.') {
    +            $upper = strtoupper($string);
    +            // Top Level Reserved Word
    +            if (preg_match('/^('.self::$regex_reserved_toplevel.')($|\s|'.self::$regex_boundaries.')/', $upper,$matches)) {
    +                return array(
    +                    self::TOKEN_TYPE=>self::TOKEN_TYPE_RESERVED_TOPLEVEL,
    +                    self::TOKEN_VALUE=>substr($string,0,strlen($matches[1]))
    +                );
    +            }
    +            // Newline Reserved Word
    +            if (preg_match('/^('.self::$regex_reserved_newline.')($|\s|'.self::$regex_boundaries.')/', $upper,$matches)) {
    +                return array(
    +                    self::TOKEN_TYPE=>self::TOKEN_TYPE_RESERVED_NEWLINE,
    +                    self::TOKEN_VALUE=>substr($string,0,strlen($matches[1]))
    +                );
    +            }
    +            // Other Reserved Word
    +            if (preg_match('/^('.self::$regex_reserved.')($|\s|'.self::$regex_boundaries.')/', $upper,$matches)) {
    +                return array(
    +                    self::TOKEN_TYPE=>self::TOKEN_TYPE_RESERVED,
    +                    self::TOKEN_VALUE=>substr($string,0,strlen($matches[1]))
    +                );
    +            }
    +        }
    +
    +        // A function must be suceeded by '('
    +        // this makes it so "count(" is considered a function, but "count" alone is not
    +        $upper = strtoupper($string);
    +        // function
    +        if (preg_match('/^('.self::$regex_function.'[(]|\s|[)])/', $upper,$matches)) {
    +            return array(
    +                self::TOKEN_TYPE=>self::TOKEN_TYPE_RESERVED,
    +                self::TOKEN_VALUE=>substr($string,0,strlen($matches[1])-1)
    +            );
    +        }
    +
    +        // Non reserved word
    +        preg_match('/^(.*?)($|\s|["\'`]|'.self::$regex_boundaries.')/',$string,$matches);
    +
    +        return array(
    +            self::TOKEN_VALUE => $matches[1],
    +            self::TOKEN_TYPE  => self::TOKEN_TYPE_WORD
    +        );
    +    }
    +
    +    protected static function getQuotedString($string)
    +    {
    +        $ret = null;
    +        
    +        // This checks for the following patterns:
    +        // 1. backtick quoted string using `` to escape
    +        // 2. double quoted string using "" or \" to escape
    +        // 3. single quoted string using '' or \' to escape
    +        if ( preg_match('/^(((`[^`]*($|`))+)|(("[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)|((\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*(\'|$))+))/s', $string, $matches)) {
    +            $ret = $matches[1];
    +        }
    +        
    +        return $ret;
    +    }
    +
    +    /**
    +     * Takes a SQL string and breaks it into tokens.
    +     * Each token is an associative array with type and value.
    +     *
    +     * @param String $string The SQL string
    +     *
    +     * @return Array An array of tokens.
    +     */
    +    protected static function tokenize($string)
    +    {
    +        self::init();
    +
    +        $tokens = array();
    +
    +        // Used for debugging if there is an error while tokenizing the string
    +        $original_length = strlen($string);
    +
    +        // Used to make sure the string keeps shrinking on each iteration
    +        $old_string_len = strlen($string) + 1;
    +
    +        $token = null;
    +
    +        $current_length = strlen($string);
    +
    +        // Keep processing the string until it is empty
    +        while ($current_length) {
    +            // If the string stopped shrinking, there was a problem
    +            if ($old_string_len <= $current_length) {
    +                $tokens[] = array(
    +                    self::TOKEN_VALUE=>$string,
    +                    self::TOKEN_TYPE=>self::TOKEN_TYPE_ERROR
    +                );
    +
    +                return $tokens;
    +            }
    +            $old_string_len =  $current_length;
    +
    +            // Determine if we can use caching
    +            if ($current_length >= self::$max_cachekey_size) {
    +                $cacheKey = substr($string,0,self::$max_cachekey_size);
    +            } else {
    +                $cacheKey = false;
    +            }
    +
    +            // See if the token is already cached
    +            if ($cacheKey && isset(self::$token_cache[$cacheKey])) {
    +                // Retrieve from cache
    +                $token = self::$token_cache[$cacheKey];
    +                $token_length = strlen($token[self::TOKEN_VALUE]);
    +                self::$cache_hits++;
    +            } else {
    +                // Get the next token and the token type
    +                $token = self::getNextToken($string, $token);
    +                $token_length = strlen($token[self::TOKEN_VALUE]);
    +                self::$cache_misses++;
    +
    +                // If the token is shorter than the max length, store it in cache
    +                if ($cacheKey && $token_length < self::$max_cachekey_size) {
    +                    self::$token_cache[$cacheKey] = $token;
    +                }
    +            }
    +
    +            $tokens[] = $token;
    +
    +            // Advance the string
    +            $string = substr($string, $token_length);
    +
    +            $current_length -= $token_length;
    +        }
    +
    +        return $tokens;
    +    }
    +
    +    /**
    +     * Format the whitespace in a SQL string to make it easier to read.
    +     *
    +     * @param String  $string    The SQL string
    +     * @param boolean $highlight If true, syntax highlighting will also be performed
    +     *
    +     * @return String The SQL string with HTML styles and formatting wrapped in a 
     tag
    +     */
    +    public static function format($string, $highlight=true)
    +    {
    +        // This variable will be populated with formatted html
    +        $return = '';
    +
    +        // Use an actual tab while formatting and then switch out with self::$tab at the end
    +        $tab = "\t";
    +
    +        $indent_level = 0;
    +        $newline = false;
    +        $inline_parentheses = false;
    +        $increase_special_indent = false;
    +        $increase_block_indent = false;
    +        $indent_types = array();
    +        $added_newline = false;
    +        $inline_count = 0;
    +        $inline_indented = false;
    +        $clause_limit = false;
    +
    +        // Tokenize String
    +        $original_tokens = self::tokenize($string);
    +
    +        // Remove existing whitespace
    +        $tokens = array();
    +        foreach ($original_tokens as $i=>$token) {
    +            if ($token[self::TOKEN_TYPE] !== self::TOKEN_TYPE_WHITESPACE) {
    +                $token['i'] = $i;
    +                $tokens[] = $token;
    +            }
    +        }
    +
    +        // Format token by token
    +        foreach ($tokens as $i=>$token) {
    +            // Get highlighted token if doing syntax highlighting
    +            if ($highlight) {
    +                $highlighted = self::highlightToken($token);
    +            } else { // If returning raw text
    +                $highlighted = $token[self::TOKEN_VALUE];
    +            }
    +
    +            // If we are increasing the special indent level now
    +            if ($increase_special_indent) {
    +                $indent_level++;
    +                $increase_special_indent = false;
    +                array_unshift($indent_types,'special');
    +            }
    +            // If we are increasing the block indent level now
    +            if ($increase_block_indent) {
    +                $indent_level++;
    +                $increase_block_indent = false;
    +                array_unshift($indent_types,'block');
    +            }
    +
    +            // If we need a new line before the token
    +            if ($newline) {
    +                $return .= "\n" . str_repeat($tab, $indent_level);
    +                $newline = false;
    +                $added_newline = true;
    +            } else {
    +                $added_newline = false;
    +            }
    +
    +            // Display comments directly where they appear in the source
    +            if ($token[self::TOKEN_TYPE] === self::TOKEN_TYPE_COMMENT || $token[self::TOKEN_TYPE] === self::TOKEN_TYPE_BLOCK_COMMENT) {
    +                if ($token[self::TOKEN_TYPE] === self::TOKEN_TYPE_BLOCK_COMMENT) {
    +                    $indent = str_repeat($tab,$indent_level);
    +                    $return .= "\n" . $indent;
    +                    $highlighted = str_replace("\n","\n".$indent,$highlighted);
    +                }
    +
    +                $return .= $highlighted;
    +                $newline = true;
    +                continue;
    +            }
    +
    +            if ($inline_parentheses) {
    +                // End of inline parentheses
    +                if ($token[self::TOKEN_VALUE] === ')') {
    +                    $return = rtrim($return,' ');
    +
    +                    if ($inline_indented) {
    +                        array_shift($indent_types);
    +                        $indent_level --;
    +                        $return .= "\n" . str_repeat($tab, $indent_level);
    +                    }
    +
    +                    $inline_parentheses = false;
    +
    +                    $return .= $highlighted . ' ';
    +                    continue;
    +                }
    +
    +                if ($token[self::TOKEN_VALUE] === ',') {
    +                    if ($inline_count >= 30) {
    +                        $inline_count = 0;
    +                        $newline = true;
    +                    }
    +                }
    +
    +                $inline_count += strlen($token[self::TOKEN_VALUE]);
    +            }
    +
    +            // Opening parentheses increase the block indent level and start a new line
    +            if ($token[self::TOKEN_VALUE] === '(') {
    +                // First check if this should be an inline parentheses block
    +                // Examples are "NOW()", "COUNT(*)", "int(10)", key(`somecolumn`), DECIMAL(7,2)
    +                // Allow up to 3 non-whitespace tokens inside inline parentheses
    +                $length = 0;
    +                for ($j=1;$j<=250;$j++) {
    +                    // Reached end of string
    +                    if (!isset($tokens[$i+$j])) break;
    +
    +                    $next = $tokens[$i+$j];
    +
    +                    // Reached closing parentheses, able to inline it
    +                    if ($next[self::TOKEN_VALUE] === ')') {
    +                        $inline_parentheses = true;
    +                        $inline_count = 0;
    +                        $inline_indented = false;
    +                        break;
    +                    }
    +
    +                    // Reached an invalid token for inline parentheses
    +                    if ($next[self::TOKEN_VALUE]===';' || $next[self::TOKEN_VALUE]==='(') {
    +                        break;
    +                    }
    +
    +                    // Reached an invalid token type for inline parentheses
    +                    if ($next[self::TOKEN_TYPE]===self::TOKEN_TYPE_RESERVED_TOPLEVEL || $next[self::TOKEN_TYPE]===self::TOKEN_TYPE_RESERVED_NEWLINE || $next[self::TOKEN_TYPE]===self::TOKEN_TYPE_COMMENT || $next[self::TOKEN_TYPE]===self::TOKEN_TYPE_BLOCK_COMMENT) {
    +                        break;
    +                    }
    +
    +                    $length += strlen($next[self::TOKEN_VALUE]);
    +                }
    +
    +                if ($inline_parentheses && $length > 30) {
    +                    $increase_block_indent = true;
    +                    $inline_indented = true;
    +                    $newline = true;
    +                }
    +
    +                // Take out the preceding space unless there was whitespace there in the original query
    +                if (isset($original_tokens[$token['i']-1]) && $original_tokens[$token['i']-1][self::TOKEN_TYPE] !== self::TOKEN_TYPE_WHITESPACE) {
    +                    $return = rtrim($return,' ');
    +                }
    +
    +                if (!$inline_parentheses) {
    +                    $increase_block_indent = true;
    +                    // Add a newline after the parentheses
    +                    $newline = true;
    +                }
    +
    +            }
    +
    +            // Closing parentheses decrease the block indent level
    +            elseif ($token[self::TOKEN_VALUE] === ')') {
    +                // Remove whitespace before the closing parentheses
    +                $return = rtrim($return,' ');
    +
    +                $indent_level--;
    +
    +                // Reset indent level
    +                while ($j=array_shift($indent_types)) {
    +                    if ($j==='special') {
    +                        $indent_level--;
    +                    } else {
    +                        break;
    +                    }
    +                }
    +
    +                if ($indent_level < 0) {
    +                    // This is an error
    +                    $indent_level = 0;
    +
    +                    if ($highlight) {
    +                        $return .= "\n".self::highlightError($token[self::TOKEN_VALUE]);
    +                        continue;
    +                    }
    +                }
    +
    +                // Add a newline before the closing parentheses (if not already added)
    +                if (!$added_newline) {
    +                    $return .= "\n" . str_repeat($tab, $indent_level);
    +                }
    +            }
    +
    +            // Top level reserved words start a new line and increase the special indent level
    +            elseif ($token[self::TOKEN_TYPE] === self::TOKEN_TYPE_RESERVED_TOPLEVEL) {
    +                $increase_special_indent = true;
    +
    +                // If the last indent type was 'special', decrease the special indent for this round
    +                reset($indent_types);
    +                if (current($indent_types)==='special') {
    +                    $indent_level--;
    +                    array_shift($indent_types);
    +                }
    +
    +                // Add a newline after the top level reserved word
    +                $newline = true;
    +                // Add a newline before the top level reserved word (if not already added)
    +                if (!$added_newline) {
    +                    $return .= "\n" . str_repeat($tab, $indent_level);
    +                }
    +                // If we already added a newline, redo the indentation since it may be different now
    +                else {
    +                    $return = rtrim($return,$tab).str_repeat($tab, $indent_level);
    +                }
    +
    +                // If the token may have extra whitespace
    +                if (strpos($token[self::TOKEN_VALUE],' ')!==false || strpos($token[self::TOKEN_VALUE],"\n")!==false || strpos($token[self::TOKEN_VALUE],"\t")!==false) {
    +                    $highlighted = preg_replace('/\s+/',' ',$highlighted);
    +                }
    +                //if SQL 'LIMIT' clause, start variable to reset newline
    +                if ($token[self::TOKEN_VALUE] === 'LIMIT' && !$inline_parentheses) {
    +                    $clause_limit = true;
    +                }
    +            }
    +
    +            // Checks if we are out of the limit clause
    +            elseif ($clause_limit && $token[self::TOKEN_VALUE] !== "," && $token[self::TOKEN_TYPE] !== self::TOKEN_TYPE_NUMBER && $token[self::TOKEN_TYPE] !== self::TOKEN_TYPE_WHITESPACE) {
    +                $clause_limit = false;
    +            }
    +
    +            // Commas start a new line (unless within inline parentheses or SQL 'LIMIT' clause)
    +            elseif ($token[self::TOKEN_VALUE] === ',' && !$inline_parentheses) {
    +                //If the previous TOKEN_VALUE is 'LIMIT', resets new line
    +                if ($clause_limit === true) {
    +                    $newline = false;
    +                    $clause_limit = false;
    +                }
    +                // All other cases of commas
    +                else {
    +                    $newline = true;
    +                }
    +            }
    +
    +            // Newline reserved words start a new line
    +            elseif ($token[self::TOKEN_TYPE] === self::TOKEN_TYPE_RESERVED_NEWLINE) {
    +                // Add a newline before the reserved word (if not already added)
    +                if (!$added_newline) {
    +                    $return .= "\n" . str_repeat($tab, $indent_level);
    +                }
    +
    +                // If the token may have extra whitespace
    +                if (strpos($token[self::TOKEN_VALUE],' ')!==false || strpos($token[self::TOKEN_VALUE],"\n")!==false || strpos($token[self::TOKEN_VALUE],"\t")!==false) {
    +                    $highlighted = preg_replace('/\s+/',' ',$highlighted);
    +                }
    +            }
    +
    +            // Multiple boundary characters in a row should not have spaces between them (not including parentheses)
    +            elseif ($token[self::TOKEN_TYPE] === self::TOKEN_TYPE_BOUNDARY) {
    +                if (isset($tokens[$i-1]) && $tokens[$i-1][self::TOKEN_TYPE] === self::TOKEN_TYPE_BOUNDARY) {
    +                    if (isset($original_tokens[$token['i']-1]) && $original_tokens[$token['i']-1][self::TOKEN_TYPE] !== self::TOKEN_TYPE_WHITESPACE) {
    +                        $return = rtrim($return,' ');
    +                    }
    +                }
    +            }
    +
    +            // If the token shouldn't have a space before it
    +            if ($token[self::TOKEN_VALUE] === '.' || $token[self::TOKEN_VALUE] === ',' || $token[self::TOKEN_VALUE] === ';') {
    +                $return = rtrim($return, ' ');
    +            }
    +
    +            $return .= $highlighted.' ';
    +
    +            // If the token shouldn't have a space after it
    +            if ($token[self::TOKEN_VALUE] === '(' || $token[self::TOKEN_VALUE] === '.') {
    +                $return = rtrim($return,' ');
    +            }
    +            
    +            // If this is the "-" of a negative number, it shouldn't have a space after it
    +            if($token[self::TOKEN_VALUE] === '-' && isset($tokens[$i+1]) && $tokens[$i+1][self::TOKEN_TYPE] === self::TOKEN_TYPE_NUMBER && isset($tokens[$i-1])) {
    +                $prev = $tokens[$i-1][self::TOKEN_TYPE];
    +                if($prev !== self::TOKEN_TYPE_QUOTE && $prev !== self::TOKEN_TYPE_BACKTICK_QUOTE && $prev !== self::TOKEN_TYPE_WORD && $prev !== self::TOKEN_TYPE_NUMBER) {
    +                    $return = rtrim($return,' ');
    +                }
    +            } 
    +        }
    +
    +        // If there are unmatched parentheses
    +        if ($highlight && array_search('block',$indent_types) !== false) {
    +            $return .= "\n".self::highlightError("WARNING: unclosed parentheses or section");
    +        }
    +
    +        // Replace tab characters with the configuration tab character
    +        $return = trim(str_replace("\t",self::$tab,$return));
    +
    +        if ($highlight) {
    +            $return = self::output($return);
    +        }
    +
    +        return $return;
    +    }
    +
    +    /**
    +     * Add syntax highlighting to a SQL string
    +     *
    +     * @param String $string The SQL string
    +     *
    +     * @return String The SQL string with HTML styles applied
    +     */
    +    public static function highlight($string)
    +    {
    +        $tokens = self::tokenize($string);
    +
    +        $return = '';
    +
    +        foreach ($tokens as $token) {
    +            $return .= self::highlightToken($token);
    +        }
    +
    +        return self::output($return);
    +    }
    +
    +    /**
    +     * Split a SQL string into multiple queries.
    +     * Uses ";" as a query delimiter.
    +     *
    +     * @param String $string The SQL string
    +     *
    +     * @return Array An array of individual query strings without trailing semicolons
    +     */
    +    public static function splitQuery($string)
    +    {
    +        $queries = array();
    +        $current_query = '';
    +        $empty = true;
    +
    +        $tokens = self::tokenize($string);
    +
    +        foreach ($tokens as $token) {
    +            // If this is a query separator
    +            if ($token[self::TOKEN_VALUE] === ';') {
    +                if (!$empty) {
    +                    $queries[] = $current_query.';';
    +                }
    +                $current_query = '';
    +                $empty = true;
    +                continue;
    +            }
    +
    +            // If this is a non-empty character
    +            if ($token[self::TOKEN_TYPE] !== self::TOKEN_TYPE_WHITESPACE && $token[self::TOKEN_TYPE] !== self::TOKEN_TYPE_COMMENT && $token[self::TOKEN_TYPE] !== self::TOKEN_TYPE_BLOCK_COMMENT) {
    +                $empty = false;
    +            }
    +
    +            $current_query .= $token[self::TOKEN_VALUE];
    +        }
    +
    +        if (!$empty) {
    +            $queries[] = trim($current_query);
    +        }
    +
    +        return $queries;
    +    }
    +
    +    /**
    +     * Remove all comments from a SQL string
    +     *
    +     * @param String $string The SQL string
    +     *
    +     * @return String The SQL string without comments
    +     */
    +    public static function removeComments($string)
    +    {
    +        $result = '';
    +
    +        $tokens = self::tokenize($string);
    +
    +        foreach ($tokens as $token) {
    +            // Skip comment tokens
    +            if ($token[self::TOKEN_TYPE] === self::TOKEN_TYPE_COMMENT || $token[self::TOKEN_TYPE] === self::TOKEN_TYPE_BLOCK_COMMENT) {
    +                continue;
    +            }
    +
    +            $result .= $token[self::TOKEN_VALUE];
    +        }
    +        $result = self::format( $result,false);
    +
    +        return $result;
    +    }
    +
    +    /**
    +     * Compress a query by collapsing white space and removing comments
    +     *
    +     * @param String $string The SQL string
    +     *
    +     * @return String The SQL string without comments
    +     */
    +    public static function compress($string)
    +    {
    +        $result = '';
    +
    +        $tokens = self::tokenize($string);
    +
    +        $whitespace = true;
    +        foreach ($tokens as $token) {
    +            // Skip comment tokens
    +            if ($token[self::TOKEN_TYPE] === self::TOKEN_TYPE_COMMENT || $token[self::TOKEN_TYPE] === self::TOKEN_TYPE_BLOCK_COMMENT) {
    +                continue;
    +            }
    +            // Remove extra whitespace in reserved words (e.g "OUTER     JOIN" becomes "OUTER JOIN")
    +            elseif ($token[self::TOKEN_TYPE] === self::TOKEN_TYPE_RESERVED || $token[self::TOKEN_TYPE] === self::TOKEN_TYPE_RESERVED_NEWLINE || $token[self::TOKEN_TYPE] === self::TOKEN_TYPE_RESERVED_TOPLEVEL) {
    +                $token[self::TOKEN_VALUE] = preg_replace('/\s+/',' ',$token[self::TOKEN_VALUE]);
    +            }
    +
    +            if ($token[self::TOKEN_TYPE] === self::TOKEN_TYPE_WHITESPACE) {
    +                // If the last token was whitespace, don't add another one
    +                if ($whitespace) {
    +                    continue;
    +                } else {
    +                    $whitespace = true;
    +                    // Convert all whitespace to a single space
    +                    $token[self::TOKEN_VALUE] = ' ';
    +                }
    +            } else {
    +                $whitespace = false;
    +            }
    +
    +            $result .= $token[self::TOKEN_VALUE];
    +        }
    +
    +        return rtrim($result);
    +    }
    +
    +    /**
    +     * Highlights a token depending on its type.
    +     *
    +     * @param Array $token An associative array containing type and value.
    +     *
    +     * @return String HTML code of the highlighted token.
    +     */
    +    protected static function highlightToken($token)
    +    {
    +        $type = $token[self::TOKEN_TYPE];
    +
    +        if (self::is_cli()) {
    +            $token = $token[self::TOKEN_VALUE];
    +        } else {
    +            $token = htmlentities($token[self::TOKEN_VALUE],ENT_COMPAT,'UTF-8');
    +        }
    +
    +        if ($type===self::TOKEN_TYPE_BOUNDARY) {
    +            return self::highlightBoundary($token);
    +        } elseif ($type===self::TOKEN_TYPE_WORD) {
    +            return self::highlightWord($token);
    +        } elseif ($type===self::TOKEN_TYPE_BACKTICK_QUOTE) {
    +            return self::highlightBacktickQuote($token);
    +        } elseif ($type===self::TOKEN_TYPE_QUOTE) {
    +            return self::highlightQuote($token);
    +        } elseif ($type===self::TOKEN_TYPE_RESERVED) {
    +            return self::highlightReservedWord($token);
    +        } elseif ($type===self::TOKEN_TYPE_RESERVED_TOPLEVEL) {
    +            return self::highlightReservedWord($token);
    +        } elseif ($type===self::TOKEN_TYPE_RESERVED_NEWLINE) {
    +            return self::highlightReservedWord($token);
    +        } elseif ($type===self::TOKEN_TYPE_NUMBER) {
    +            return self::highlightNumber($token);
    +        } elseif ($type===self::TOKEN_TYPE_VARIABLE) {
    +            return self::highlightVariable($token);
    +        } elseif ($type===self::TOKEN_TYPE_COMMENT || $type===self::TOKEN_TYPE_BLOCK_COMMENT) {
    +            return self::highlightComment($token);
    +        }
    +
    +        return $token;
    +    }
    +
    +    /**
    +     * Highlights a quoted string
    +     *
    +     * @param String $value The token's value
    +     *
    +     * @return String HTML code of the highlighted token.
    +     */
    +    protected static function highlightQuote($value)
    +    {
    +        if (self::is_cli()) {
    +            return self::$cli_quote . $value . "\x1b[0m";
    +        } else {
    +            return '' . $value . '';
    +        }
    +    }
    +
    +    /**
    +     * Highlights a backtick quoted string
    +     *
    +     * @param String $value The token's value
    +     *
    +     * @return String HTML code of the highlighted token.
    +     */
    +    protected static function highlightBacktickQuote($value)
    +    {
    +        if (self::is_cli()) {
    +            return self::$cli_backtick_quote . $value . "\x1b[0m";
    +        } else {
    +            return '' . $value . '';
    +        }
    +    }
    +
    +    /**
    +     * Highlights a reserved word
    +     *
    +     * @param String $value The token's value
    +     *
    +     * @return String HTML code of the highlighted token.
    +     */
    +    protected static function highlightReservedWord($value)
    +    {
    +        if (self::is_cli()) {
    +            return self::$cli_reserved . $value . "\x1b[0m";
    +        } else {
    +            return '' . $value . '';
    +        }
    +    }
    +
    +    /**
    +     * Highlights a boundary token
    +     *
    +     * @param String $value The token's value
    +     *
    +     * @return String HTML code of the highlighted token.
    +     */
    +    protected static function highlightBoundary($value)
    +    {
    +        if ($value==='(' || $value===')') return $value;
    +
    +        if (self::is_cli()) {
    +            return self::$cli_boundary . $value . "\x1b[0m";
    +        } else {
    +            return '' . $value . '';
    +        }
    +    }
    +
    +    /**
    +     * Highlights a number
    +     *
    +     * @param String $value The token's value
    +     *
    +     * @return String HTML code of the highlighted token.
    +     */
    +    protected static function highlightNumber($value)
    +    {
    +        if (self::is_cli()) {
    +            return self::$cli_number . $value . "\x1b[0m";
    +        } else {
    +            return '' . $value . '';
    +        }
    +    }
    +
    +    /**
    +     * Highlights an error
    +     *
    +     * @param String $value The token's value
    +     *
    +     * @return String HTML code of the highlighted token.
    +     */
    +    protected static function highlightError($value)
    +    {
    +        if (self::is_cli()) {
    +            return self::$cli_error . $value . "\x1b[0m";
    +        } else {
    +            return '' . $value . '';
    +        }
    +    }
    +
    +    /**
    +     * Highlights a comment
    +     *
    +     * @param String $value The token's value
    +     *
    +     * @return String HTML code of the highlighted token.
    +     */
    +    protected static function highlightComment($value)
    +    {
    +        if (self::is_cli()) {
    +            return self::$cli_comment . $value . "\x1b[0m";
    +        } else {
    +            return '' . $value . '';
    +        }
    +    }
    +
    +    /**
    +     * Highlights a word token
    +     *
    +     * @param String $value The token's value
    +     *
    +     * @return String HTML code of the highlighted token.
    +     */
    +    protected static function highlightWord($value)
    +    {
    +        if (self::is_cli()) {
    +            return self::$cli_word . $value . "\x1b[0m";
    +        } else {
    +            return '' . $value . '';
    +        }
    +    }
    +
    +    /**
    +     * Highlights a variable token
    +     *
    +     * @param String $value The token's value
    +     *
    +     * @return String HTML code of the highlighted token.
    +     */
    +    protected static function highlightVariable($value)
    +    {
    +        if (self::is_cli()) {
    +            return self::$cli_variable . $value . "\x1b[0m";
    +        } else {
    +            return '' . $value . '';
    +        }
    +    }
    +
    +    /**
    +     * Helper function for building regular expressions for reserved words and boundary characters
    +     *
    +     * @param String $a The string to be quoted
    +     *
    +     * @return String The quoted string
    +     */
    +    private static function quote_regex($a)
    +    {
    +        return preg_quote($a,'/');
    +    }
    +
    +    /**
    +     * Helper function for building string output
    +     *
    +     * @param String $string The string to be quoted
    +     *
    +     * @return String The quoted string
    +     */
    +    private static function output($string)
    +    {
    +        if (self::is_cli()) {
    +            return $string."\n";
    +        } else {
    +            $string=trim($string);
    +            if (!self::$use_pre) {
    +                return $string;
    +            }
    +
    +            return '
    ' . $string . '
    '; + } + } + + private static function is_cli() + { + if (isset(self::$cli)) return self::$cli; + else return php_sapi_name() === 'cli'; + } + +} diff --git a/vendor/jdorn/sql-formatter/phpunit.xml.dist b/vendor/jdorn/sql-formatter/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..ebfda97163911ac076b8aa056e5f9ee6831c6dd9 --- /dev/null +++ b/vendor/jdorn/sql-formatter/phpunit.xml.dist @@ -0,0 +1,20 @@ + + + + + + ./tests + + + + + + ./ + + ./tests + ./vendor + ./examples + + + + diff --git a/vendor/jdorn/sql-formatter/tests/SqlFormatterTest.php b/vendor/jdorn/sql-formatter/tests/SqlFormatterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ca535cf34c303e346d7d315560cdcfe5f8af6c54 --- /dev/null +++ b/vendor/jdorn/sql-formatter/tests/SqlFormatterTest.php @@ -0,0 +1,197 @@ +assertEquals(trim($html), trim(SqlFormatter::format($sql))); + } + /** + * @dataProvider formatData + */ + function testFormat($sql, $html) { + $this->assertEquals(trim($html), trim(SqlFormatter::format($sql, false))); + } + /** + * @dataProvider highlightData + */ + function testHighlight($sql, $html) { + $this->assertEquals(trim($html), trim(SqlFormatter::highlight($sql))); + } + /** + * @dataProvider highlightCliData + */ + function testCliHighlight($sql, $html) { + SqlFormatter::$cli = true; + $this->assertEquals(trim($html), trim(SqlFormatter::format($sql))); + SqlFormatter::$cli = false; + } + /** + * @dataProvider compressData + */ + function testCompress($sql, $html) { + $this->assertEquals(trim($html), trim(SqlFormatter::compress($sql))); + } + + function testUsePre() { + SqlFormatter::$use_pre = false; + $actual = SqlFormatter::highlight("test"); + $expected = 'test'; + $this->assertEquals($actual,$expected); + + SqlFormatter::$use_pre = true; + $actual = SqlFormatter::highlight("test"); + $expected = '
    test
    '; + $this->assertEquals($actual,$expected); + } + + function testSplitQuery() { + $expected = array( + "SELECT 'test' FROM MyTable;", + "SELECT Column2 FROM SomeOther Table WHERE (test = true);" + ); + + $actual = SqlFormatter::splitQuery(implode(';',$expected)); + + $this->assertEquals($expected, $actual); + } + + function testSplitQueryEmpty() { + $sql = "SELECT 1;SELECT 2;\n-- This is a comment\n;SELECT 3"; + $expected = array("SELECT 1;","SELECT 2;","SELECT 3"); + $actual = SqlFormatter::splitQuery($sql); + + $this->assertEquals($expected, $actual); + } + + function testRemoveComments() { + $expected = SqlFormatter::format("SELECT\n * FROM\n MyTable",false); + $sql = "/* this is a comment */SELECT#This is another comment\n * FROM-- One final comment\n MyTable"; + $actual = SqlFormatter::removeComments($sql); + + $this->assertEquals($expected, $actual); + } + + function testCacheStats() { + $stats = SqlFormatter::getCacheStats(); + $this->assertGreaterThan(1,$stats['hits']); + } + + function formatHighlightData() { + $formatHighlightData = explode("\n\n",file_get_contents(__DIR__."/format-highlight.html")); + $sqlData = $this->sqlData(); + + $return = array(); + foreach($formatHighlightData as $i=>$data) { + $return[] = array( + $sqlData[$i], + $data + ); + } + + return $return; + } + + function highlightCliData() { + $clidata = explode("\n\n",file_get_contents(__DIR__."/clihighlight.html")); + $sqlData = $this->sqlData(); + + $return = array(); + foreach($clidata as $i=>$data) { + $return[] = array( + $sqlData[$i], + $data + ); + } + + return $return; + } + + function formatData() { + $formatData = explode("\n\n",file_get_contents(__DIR__."/format.html")); + $sqlData = $this->sqlData(); + + $return = array(); + foreach($formatData as $i=>$data) { + $return[] = array( + $sqlData[$i], + $data + ); + } + + return $return; + } + + function compressData() { + $compressData = explode("\n\n",file_get_contents(__DIR__."/compress.html")); + $sqlData = $this->sqlData(); + + $return = array(); + foreach($compressData as $i=>$data) { + $return[] = array( + $sqlData[$i], + $data + ); + } + + return $return; + } + + function highlightData() { + $highlightData = explode("\n\n",file_get_contents(__DIR__."/highlight.html")); + $sqlData = $this->sqlData(); + + $return = array(); + foreach($highlightData as $i=>$data) { + $return[] = array( + $sqlData[$i], + $data + ); + } + + return $return; + } + + + + function sqlData() { + if(!$this->sqlData) { + $this->sqlData = explode("\n\n",file_get_contents(__DIR__."/sql.sql")); + } + + /** + $formatHighlight = array(); + $highlight = array(); + $format = array(); + $compress = array(); + $clihighlight = array(); + + foreach($this->sqlData as $sql) { + $formatHighlight[] = trim(SqlFormatter::format($sql)); + $highlight[] = trim(SqlFormatter::highlight($sql)); + $format[] = trim(SqlFormatter::format($sql, false)); + $compress[] = trim(SqlFormatter::compress($sql)); + + SqlFormatter::$cli = true; + $clihighlight[] = trim(SqlFormatter::format($sql)); + SqlFormatter::$cli = false; + } + + file_put_contents(__DIR__."/format-highlight.html", implode("\n\n",$formatHighlight)); + file_put_contents(__DIR__."/highlight.html", implode("\n\n",$highlight)); + file_put_contents(__DIR__."/format.html", implode("\n\n",$format)); + file_put_contents(__DIR__."/compress.html", implode("\n\n",$compress)); + file_put_contents(__DIR__."/clihighlight.html", implode("\n\n",$clihighlight)); + /**/ + + return $this->sqlData; + } + +} diff --git a/vendor/jdorn/sql-formatter/tests/clihighlight.html b/vendor/jdorn/sql-formatter/tests/clihighlight.html new file mode 100644 index 0000000000000000000000000000000000000000..6ccfc12f0b047a9475d44cb28948038ad4786d55 --- /dev/null +++ b/vendor/jdorn/sql-formatter/tests/clihighlight.html @@ -0,0 +1,809 @@ +SELECT + customer_id, + customer_name, + COUNT(order_id) as total +FROM + customers + INNER JOIN orders ON customers.customer_id = orders.customer_id +GROUP BY + customer_id, + customer_name +HAVING + COUNT(order_id) > 5 +ORDER BY + COUNT(order_id) DESC; + +UPDATE + customers +SET + totalorders = ordersummary.total +FROM + ( + SELECT + customer_id, + count(order_id) As total + FROM + orders + GROUP BY + customer_id + ) As ordersummary +WHERE + customers.customer_id = ordersummary.customer_id + +SELECT + * +FROM + sometable +UNION ALL +SELECT + * +FROM + someothertable; + +SET + NAMES 'utf8'; + +CREATE TABLE `PREFIX_address` ( + `id_address` int(10) unsigned NOT NULL auto_increment, + `id_country` int(10) unsigned NOT NULL, + `id_state` int(10) unsigned default NULL, + `id_customer` int(10) unsigned NOT NULL default '0', + `id_manufacturer` int(10) unsigned NOT NULL default '0', + `id_supplier` int(10) unsigned NOT NULL default '0', + `id_warehouse` int(10) unsigned NOT NULL default '0', + `alias` varchar(32) NOT NULL, + `company` varchar(64) default NULL, + `lastname` varchar(32) NOT NULL, + `firstname` varchar(32) NOT NULL, + `address1` varchar(128) NOT NULL, + `address2` varchar(128) default NULL, + `postcode` varchar(12) default NULL, + `city` varchar(64) NOT NULL, + `other` text, + `phone` varchar(16) default NULL, + `phone_mobile` varchar(16) default NULL, + `vat_number` varchar(32) default NULL, + `dni` varchar(16) DEFAULT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + `active` tinyint(1) unsigned NOT NULL default '1', + `deleted` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`id_address`), + KEY `address_customer` (`id_customer`), + KEY `id_country` (`id_country`), + KEY `id_state` (`id_state`), + KEY `id_manufacturer` (`id_manufacturer`), + KEY `id_supplier` (`id_supplier`), + KEY `id_warehouse` (`id_warehouse`) +) ENGINE = ENGINE_TYPE DEFAULT CHARSET = utf8 + +CREATE TABLE `PREFIX_alias` ( + `id_alias` int(10) unsigned NOT NULL auto_increment, + `alias` varchar(255) NOT NULL, + `search` varchar(255) NOT NULL, + `active` tinyint(1) NOT NULL default '1', + PRIMARY KEY (`id_alias`), + UNIQUE KEY `alias` (`alias`) +) ENGINE = ENGINE_TYPE DEFAULT CHARSET = utf8 + +CREATE TABLE `PREFIX_carrier` ( + `id_carrier` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_reference` int(10) unsigned NOT NULL, + `id_tax_rules_group` int(10) unsigned DEFAULT '0', + `name` varchar(64) NOT NULL, + `url` varchar(255) DEFAULT NULL, + `active` tinyint(1) unsigned NOT NULL DEFAULT '0', + `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0', + `shipping_handling` tinyint(1) unsigned NOT NULL DEFAULT '1', + `range_behavior` tinyint(1) unsigned NOT NULL DEFAULT '0', + `is_module` tinyint(1) unsigned NOT NULL DEFAULT '0', + `is_free` tinyint(1) unsigned NOT NULL DEFAULT '0', + `shipping_external` tinyint(1) unsigned NOT NULL DEFAULT '0', + `need_range` tinyint(1) unsigned NOT NULL DEFAULT '0', + `external_module_name` varchar(64) DEFAULT NULL, + `shipping_method` int(2) NOT NULL DEFAULT '0', + `position` int(10) unsigned NOT NULL default '0', + `max_width` int(10) DEFAULT 0, + `max_height` int(10) DEFAULT 0, + `max_depth` int(10) DEFAULT 0, + `max_weight` int(10) DEFAULT 0, + `grade` int(10) DEFAULT 0, + PRIMARY KEY (`id_carrier`), + KEY `deleted` (`deleted`, `active`), + KEY `id_tax_rules_group` (`id_tax_rules_group`) +) ENGINE = ENGINE_TYPE DEFAULT CHARSET = utf8 + +CREATE TABLE IF NOT EXISTS `PREFIX_specific_price_rule` ( + `id_specific_price_rule` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` VARCHAR(255) NOT NULL, + `id_shop` int(11) unsigned NOT NULL DEFAULT '1', + `id_currency` int(10) unsigned NOT NULL, + `id_country` int(10) unsigned NOT NULL, + `id_group` int(10) unsigned NOT NULL, + `from_quantity` mediumint(8) unsigned NOT NULL, + `price` DECIMAL(20, 6), + `reduction` decimal(20, 6) NOT NULL, + `reduction_type` enum('amount', 'percentage') NOT NULL, + `from` datetime NOT NULL, + `to` datetime NOT NULL, + PRIMARY KEY (`id_specific_price_rule`), + KEY `id_product` ( + `id_shop`, `id_currency`, `id_country`, + `id_group`, `from_quantity`, `from`, + `to` + ) +) ENGINE = ENGINE_TYPE DEFAULT CHARSET = utf8 + +UPDATE + `PREFIX_configuration` +SET + value = '6' +WHERE + name = 'PS_SEARCH_WEIGHT_PNAME' + +UPDATE + `PREFIX_hook_module` +SET + position = 1 +WHERE + id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayPayment' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'cheque' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayPaymentReturn' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'cheque' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayHome' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'homeslider' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionAuthentication' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'statsdata' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionShopDataDuplication' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'homeslider' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayTop' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blocklanguages' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionCustomerAccountAdd' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'statsdata' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayCustomerAccount' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'favoriteproducts' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayAdminStatsModules' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'statsvisits' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayAdminStatsGraphEngine' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'graphvisifire' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayAdminStatsGridEngine' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'gridhtml' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayLeftColumnProduct' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blocksharefb' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionSearch' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'statssearch' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionCategoryAdd' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blockcategories' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionCategoryUpdate' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blockcategories' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionCategoryDelete' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blockcategories' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionAdminMetaSave' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blockcategories' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayMyAccountBlock' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'favoriteproducts' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayFooter' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blockreinsurance' + ) + +ALTER TABLE + `PREFIX_employee` +ADD + `bo_color` varchar(32) default NULL +AFTER + `stats_date_to` + +INSERT INTO `PREFIX_cms_category_lang` +VALUES + ( + 1, 3, 'Inicio', '', 'home', NULL, NULL, + NULL + ) + +INSERT INTO `PREFIX_cms_category` +VALUES + (1, 0, 0, 1, NOW(), NOW(), 0) + +UPDATE + `PREFIX_cms_category` +SET + `position` = 0 + +ALTER TABLE + `PREFIX_customer` +ADD + `note` text +AFTER + `secure_key` + +ALTER TABLE + `PREFIX_contact` +ADD + `customer_service` tinyint(1) NOT NULL DEFAULT 0 +AFTER + `email` + +INSERT INTO `PREFIX_specific_price` ( + `id_product`, `id_shop`, `id_currency`, + `id_country`, `id_group`, `priority`, + `price`, `from_quantity`, `reduction`, + `reduction_type`, `from`, `to` +) ( + SELECT + dq.`id_product`, + 1, + 1, + 0, + 1, + 0, + 0.00, + dq.`quantity`, + IF( + dq.`id_discount_type` = 2, dq.`value`, + dq.`value` / 100 + ), + IF ( + dq.`id_discount_type` = 2, 'amount', + 'percentage' + ), + '0000-00-00 00:00:00', + '0000-00-00 00:00:00' + FROM + `PREFIX_discount_quantity` dq + INNER JOIN `PREFIX_product` p ON (p.`id_product` = dq.`id_product`) +) + +DROP + TABLE `PREFIX_discount_quantity` + +INSERT INTO `PREFIX_specific_price` ( + `id_product`, `id_shop`, `id_currency`, + `id_country`, `id_group`, `priority`, + `price`, `from_quantity`, `reduction`, + `reduction_type`, `from`, `to` +) ( + SELECT + p.`id_product`, + 1, + 0, + 0, + 0, + 0, + 0.00, + 1, + IF( + p.`reduction_price` > 0, p.`reduction_price`, + p.`reduction_percent` / 100 + ), + IF( + p.`reduction_price` > 0, 'amount', + 'percentage' + ), + IF ( + p.`reduction_from` = p.`reduction_to`, + '0000-00-00 00:00:00', p.`reduction_from` + ), + IF ( + p.`reduction_from` = p.`reduction_to`, + '0000-00-00 00:00:00', p.`reduction_to` + ) + FROM + `PREFIX_product` p + WHERE + p.`reduction_price` + OR p.`reduction_percent` +) + +ALTER TABLE + `PREFIX_product` +DROP + `reduction_price`, +DROP + `reduction_percent`, +DROP + `reduction_from`, +DROP + `reduction_to` + +INSERT INTO `PREFIX_configuration` ( + `name`, `value`, `date_add`, `date_upd` +) +VALUES + ( + 'PS_SPECIFIC_PRICE_PRIORITIES', + 'id_shop;id_currency;id_country;id_group', + NOW(), NOW() + ), + ('PS_TAX_DISPLAY', 0, NOW(), NOW()), + ( + 'PS_SMARTY_FORCE_COMPILE', 1, NOW(), + NOW() + ), + ( + 'PS_DISTANCE_UNIT', 'km', NOW(), NOW() + ), + ( + 'PS_STORES_DISPLAY_CMS', 0, NOW(), + NOW() + ), + ( + 'PS_STORES_DISPLAY_FOOTER', 0, NOW(), + NOW() + ), + ( + 'PS_STORES_SIMPLIFIED', 0, NOW(), + NOW() + ), + ( + 'PS_STATSDATA_CUSTOMER_PAGESVIEWS', + 1, NOW(), NOW() + ), + ( + 'PS_STATSDATA_PAGESVIEWS', 1, NOW(), + NOW() + ), + ( + 'PS_STATSDATA_PLUGINS', 1, NOW(), + NOW() + ) + +INSERT INTO `PREFIX_configuration` ( + `name`, `value`, `date_add`, `date_upd` +) +VALUES + ( + 'PS_CONDITIONS_CMS_ID', + IFNULL( + ( + SELECT + `id_cms` + FROM + `PREFIX_cms` + WHERE + `id_cms` = 3 + ), + 0 + ), + NOW(), + NOW() + ) + +CREATE TEMPORARY TABLE `PREFIX_configuration_tmp` (`value` text) + +SET + @defaultOOS = ( + SELECT + value + FROM + `PREFIX_configuration` + WHERE + name = 'PS_ORDER_OUT_OF_STOCK' + ) + +UPDATE + `PREFIX_product` p +SET + `cache_default_attribute` = 0 +WHERE + `id_product` NOT IN ( + SELECT + `id_product` + FROM + `PREFIX_product_attribute` + ) + +INSERT INTO `PREFIX_hook` ( + `name`, `title`, `description`, `position` +) +VALUES + ( + 'processCarrier', 'Carrier Process', + NULL, 0 + ) + +INSERT INTO `PREFIX_stock_mvt_reason_lang` ( + `id_stock_mvt_reason`, `id_lang`, + `name` +) +VALUES + (1, 1, 'Order'), + (1, 2, 'Commande'), + (2, 1, 'Missing Stock Movement'), + ( + 2, 2, 'Mouvement de stock manquant' + ), + (3, 1, 'Restocking'), + (3, 2, 'Réassort') + +INSERT INTO `PREFIX_meta_lang` ( + `id_lang`, `id_meta`, `title`, `url_rewrite` +) +VALUES + ( + 1, + ( + SELECT + `id_meta` + FROM + `PREFIX_meta` + WHERE + `page` = 'authentication' + ), + 'Authentication', + 'authentication' + ), + ( + 2, + ( + SELECT + `id_meta` + FROM + `PREFIX_meta` + WHERE + `page` = 'authentication' + ), + 'Authentification', + 'authentification' + ), + ( + 3, + ( + SELECT + `id_meta` + FROM + `PREFIX_meta` + WHERE + `page` = 'authentication' + ), + 'Autenticación', + 'autenticacion' + ) + +LOCK TABLES `admin_assert` WRITE + +UNLOCK TABLES + +DROP + TABLE IF EXISTS `admin_role` + +SELECT + * +FROM + -- This is another comment + MyTable # One final comment + + /* This is a block comment + */ +WHERE + 1 = 2; + +SELECT + -- This is a test + +SELECT + Test +FROM + Test +WHERE + (MyColumn = 1) +) +AND ( + ( + (SomeOtherColumn = 2); +WARNING: unclosed parentheses or section + +SELECT + * +LIMIT + 1; +SELECT + a, + b, + c, + d +FROM + e +LIMIT + 1, 2; +SELECT + 1, + 2, + 3 +WHERE + a in (1, 2, 3, 4, 5) + and b = 5; + +SELECT + count - 50 +WHERE + a - 50 = b +WHERE + 1 + and -50 +WHERE + -50 = a +WHERE + a = -50 +WHERE + 1 + /*test*/ + -50 +WHERE + 1 + and -50; + +SELECT + @ + and b; + +SELECT + @"weird variable name"; + +SELECT + "no closing quote + \ No newline at end of file diff --git a/vendor/jdorn/sql-formatter/tests/compress.html b/vendor/jdorn/sql-formatter/tests/compress.html new file mode 100644 index 0000000000000000000000000000000000000000..bb2fcf7a2c30488f11c2112ab965b8a1e453d502 --- /dev/null +++ b/vendor/jdorn/sql-formatter/tests/compress.html @@ -0,0 +1,77 @@ +SELECT customer_id, customer_name, COUNT(order_id) as total FROM customers INNER JOIN orders ON customers.customer_id = orders.customer_id GROUP BY customer_id, customer_name HAVING COUNT(order_id) > 5 ORDER BY COUNT(order_id) DESC; + +UPDATE customers SET totalorders = ordersummary.total FROM (SELECT customer_id, count(order_id) As total FROM orders GROUP BY customer_id) As ordersummary WHERE customers.customer_id = ordersummary.customer_id + +SELECT * FROM sometable UNION ALL SELECT * FROM someothertable; + +SET NAMES 'utf8'; + +CREATE TABLE `PREFIX_address` ( `id_address` int(10) unsigned NOT NULL auto_increment, `id_country` int(10) unsigned NOT NULL, `id_state` int(10) unsigned default NULL, `id_customer` int(10) unsigned NOT NULL default '0', `id_manufacturer` int(10) unsigned NOT NULL default '0', `id_supplier` int(10) unsigned NOT NULL default '0', `id_warehouse` int(10) unsigned NOT NULL default '0', `alias` varchar(32) NOT NULL, `company` varchar(64) default NULL, `lastname` varchar(32) NOT NULL, `firstname` varchar(32) NOT NULL, `address1` varchar(128) NOT NULL, `address2` varchar(128) default NULL, `postcode` varchar(12) default NULL, `city` varchar(64) NOT NULL, `other` text, `phone` varchar(16) default NULL, `phone_mobile` varchar(16) default NULL, `vat_number` varchar(32) default NULL, `dni` varchar(16) DEFAULT NULL, `date_add` datetime NOT NULL, `date_upd` datetime NOT NULL, `active` tinyint(1) unsigned NOT NULL default '1', `deleted` tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (`id_address`), KEY `address_customer` (`id_customer`), KEY `id_country` (`id_country`), KEY `id_state` (`id_state`), KEY `id_manufacturer` (`id_manufacturer`), KEY `id_supplier` (`id_supplier`), KEY `id_warehouse` (`id_warehouse`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 + +CREATE TABLE `PREFIX_alias` ( `id_alias` int(10) unsigned NOT NULL auto_increment, `alias` varchar(255) NOT NULL, `search` varchar(255) NOT NULL, `active` tinyint(1) NOT NULL default '1', PRIMARY KEY (`id_alias`), UNIQUE KEY `alias` (`alias`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 + +CREATE TABLE `PREFIX_carrier` ( `id_carrier` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_reference` int(10) unsigned NOT NULL, `id_tax_rules_group` int(10) unsigned DEFAULT '0', `name` varchar(64) NOT NULL, `url` varchar(255) DEFAULT NULL, `active` tinyint(1) unsigned NOT NULL DEFAULT '0', `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0', `shipping_handling` tinyint(1) unsigned NOT NULL DEFAULT '1', `range_behavior` tinyint(1) unsigned NOT NULL DEFAULT '0', `is_module` tinyint(1) unsigned NOT NULL DEFAULT '0', `is_free` tinyint(1) unsigned NOT NULL DEFAULT '0', `shipping_external` tinyint(1) unsigned NOT NULL DEFAULT '0', `need_range` tinyint(1) unsigned NOT NULL DEFAULT '0', `external_module_name` varchar(64) DEFAULT NULL, `shipping_method` int(2) NOT NULL DEFAULT '0', `position` int(10) unsigned NOT NULL default '0', `max_width` int(10) DEFAULT 0, `max_height` int(10) DEFAULT 0, `max_depth` int(10) DEFAULT 0, `max_weight` int(10) DEFAULT 0, `grade` int(10) DEFAULT 0, PRIMARY KEY (`id_carrier`), KEY `deleted` (`deleted`,`active`), KEY `id_tax_rules_group` (`id_tax_rules_group`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 + +CREATE TABLE IF NOT EXISTS `PREFIX_specific_price_rule` ( `id_specific_price_rule` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, `id_shop` int(11) unsigned NOT NULL DEFAULT '1', `id_currency` int(10) unsigned NOT NULL, `id_country` int(10) unsigned NOT NULL, `id_group` int(10) unsigned NOT NULL, `from_quantity` mediumint(8) unsigned NOT NULL, `price` DECIMAL(20,6), `reduction` decimal(20,6) NOT NULL, `reduction_type` enum('amount','percentage') NOT NULL, `from` datetime NOT NULL, `to` datetime NOT NULL, PRIMARY KEY (`id_specific_price_rule`), KEY `id_product` (`id_shop`,`id_currency`,`id_country`,`id_group`,`from_quantity`,`from`,`to`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 + +UPDATE `PREFIX_configuration` SET value = '6' WHERE name = 'PS_SEARCH_WEIGHT_PNAME' + +UPDATE `PREFIX_hook_module` SET position = 1 WHERE id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayPayment') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'cheque') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayPaymentReturn') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'cheque') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayHome') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'homeslider') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionAuthentication') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'statsdata') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionShopDataDuplication') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'homeslider') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayTop') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocklanguages') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionCustomerAccountAdd') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'statsdata') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayCustomerAccount') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'favoriteproducts') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayAdminStatsModules') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'statsvisits') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayAdminStatsGraphEngine') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'graphvisifire') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayAdminStatsGridEngine') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'gridhtml') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayLeftColumnProduct') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocksharefb') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionSearch') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'statssearch') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionCategoryAdd') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionCategoryUpdate') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionCategoryDelete') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionAdminMetaSave') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayMyAccountBlock') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'favoriteproducts') OR id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayFooter') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockreinsurance') + +ALTER TABLE `PREFIX_employee` ADD `bo_color` varchar(32) default NULL AFTER `stats_date_to` + +INSERT INTO `PREFIX_cms_category_lang` VALUES(1, 3, 'Inicio', '', 'home', NULL, NULL, NULL) + +INSERT INTO `PREFIX_cms_category` VALUES(1, 0, 0, 1, NOW(), NOW(),0) + +UPDATE `PREFIX_cms_category` SET `position` = 0 + +ALTER TABLE `PREFIX_customer` ADD `note` text AFTER `secure_key` + +ALTER TABLE `PREFIX_contact` ADD `customer_service` tinyint(1) NOT NULL DEFAULT 0 AFTER `email` + +INSERT INTO `PREFIX_specific_price` (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `priority`, `price`, `from_quantity`, `reduction`, `reduction_type`, `from`, `to`) ( SELECT dq.`id_product`, 1, 1, 0, 1, 0, 0.00, dq.`quantity`, IF(dq.`id_discount_type` = 2, dq.`value`, dq.`value` / 100), IF (dq.`id_discount_type` = 2, 'amount', 'percentage'), '0000-00-00 00:00:00', '0000-00-00 00:00:00' FROM `PREFIX_discount_quantity` dq INNER JOIN `PREFIX_product` p ON (p.`id_product` = dq.`id_product`) ) + +DROP TABLE `PREFIX_discount_quantity` + +INSERT INTO `PREFIX_specific_price` (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `priority`, `price`, `from_quantity`, `reduction`, `reduction_type`, `from`, `to`) ( SELECT p.`id_product`, 1, 0, 0, 0, 0, 0.00, 1, IF(p.`reduction_price` > 0, p.`reduction_price`, p.`reduction_percent` / 100), IF(p.`reduction_price` > 0, 'amount', 'percentage'), IF (p.`reduction_from` = p.`reduction_to`, '0000-00-00 00:00:00', p.`reduction_from`), IF (p.`reduction_from` = p.`reduction_to`, '0000-00-00 00:00:00', p.`reduction_to`) FROM `PREFIX_product` p WHERE p.`reduction_price` OR p.`reduction_percent` ) + +ALTER TABLE `PREFIX_product` DROP `reduction_price`, DROP `reduction_percent`, DROP `reduction_from`, DROP `reduction_to` + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_SPECIFIC_PRICE_PRIORITIES', 'id_shop;id_currency;id_country;id_group', NOW(), NOW()), ('PS_TAX_DISPLAY', 0, NOW(), NOW()), ('PS_SMARTY_FORCE_COMPILE', 1, NOW(), NOW()), ('PS_DISTANCE_UNIT', 'km', NOW(), NOW()), ('PS_STORES_DISPLAY_CMS', 0, NOW(), NOW()), ('PS_STORES_DISPLAY_FOOTER', 0, NOW(), NOW()), ('PS_STORES_SIMPLIFIED', 0, NOW(), NOW()), ('PS_STATSDATA_CUSTOMER_PAGESVIEWS', 1, NOW(), NOW()), ('PS_STATSDATA_PAGESVIEWS', 1, NOW(), NOW()), ('PS_STATSDATA_PLUGINS', 1, NOW(), NOW()) + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_CONDITIONS_CMS_ID', IFNULL((SELECT `id_cms` FROM `PREFIX_cms` WHERE `id_cms` = 3), 0), NOW(), NOW()) + +CREATE TEMPORARY TABLE `PREFIX_configuration_tmp` ( `value` text ) + +SET @defaultOOS = (SELECT value FROM `PREFIX_configuration` WHERE name = 'PS_ORDER_OUT_OF_STOCK') + +UPDATE `PREFIX_product` p SET `cache_default_attribute` = 0 WHERE `id_product` NOT IN (SELECT `id_product` FROM `PREFIX_product_attribute`) + +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('processCarrier', 'Carrier Process', NULL, 0) + +INSERT INTO `PREFIX_stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) VALUES (1, 1, 'Order'), (1, 2, 'Commande'), (2, 1, 'Missing Stock Movement'), (2, 2, 'Mouvement de stock manquant'), (3, 1, 'Restocking'), (3, 2, 'Réassort') + +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES (1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'authentication'), 'Authentication', 'authentication'), (2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'authentication'), 'Authentification', 'authentification'), (3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'authentication'), 'Autenticación', 'autenticacion') + +LOCK TABLES `admin_assert` WRITE + +UNLOCK TABLES + +DROP TABLE IF EXISTS `admin_role` + +SELECT * FROM MyTable WHERE 1 = 2; + +SELECT + +SELECT Test FROM Test WHERE ( MyColumn = 1 )) AND ((( SomeOtherColumn = 2); + +SELECT * LIMIT 1; SELECT a,b,c,d FROM e LIMIT 1, 2; SELECT 1,2,3 WHERE a in (1,2,3,4,5) and b=5; + +SELECT count - 50 WHERE a-50 = b WHERE 1 and - 50 WHERE -50 = a WHERE a = -50 WHERE 1 - 50 WHERE 1 and -50; + +SELECT @ and b; + +SELECT @"weird variable name"; + +SELECT "no closing quote \ No newline at end of file diff --git a/vendor/jdorn/sql-formatter/tests/format-highlight.html b/vendor/jdorn/sql-formatter/tests/format-highlight.html new file mode 100644 index 0000000000000000000000000000000000000000..73af2538ac23fcf5f2c2b7de99a3a97db9c640ea --- /dev/null +++ b/vendor/jdorn/sql-formatter/tests/format-highlight.html @@ -0,0 +1,809 @@ +
    SELECT 
    +  customer_id, 
    +  customer_name, 
    +  COUNT(order_id) as total 
    +FROM 
    +  customers 
    +  INNER JOIN orders ON customers.customer_id = orders.customer_id 
    +GROUP BY 
    +  customer_id, 
    +  customer_name 
    +HAVING 
    +  COUNT(order_id) > 5 
    +ORDER BY 
    +  COUNT(order_id) DESC;
    + +
    UPDATE 
    +  customers 
    +SET 
    +  totalorders = ordersummary.total 
    +FROM 
    +  (
    +    SELECT 
    +      customer_id, 
    +      count(order_id) As total 
    +    FROM 
    +      orders 
    +    GROUP BY 
    +      customer_id
    +  ) As ordersummary 
    +WHERE 
    +  customers.customer_id = ordersummary.customer_id
    + +
    SELECT 
    +  * 
    +FROM 
    +  sometable 
    +UNION ALL 
    +SELECT 
    +  * 
    +FROM 
    +  someothertable;
    + +
    SET 
    +  NAMES 'utf8';
    + +
    CREATE TABLE `PREFIX_address` (
    +  `id_address` int(10) unsigned NOT NULL auto_increment, 
    +  `id_country` int(10) unsigned NOT NULL, 
    +  `id_state` int(10) unsigned default NULL, 
    +  `id_customer` int(10) unsigned NOT NULL default '0', 
    +  `id_manufacturer` int(10) unsigned NOT NULL default '0', 
    +  `id_supplier` int(10) unsigned NOT NULL default '0', 
    +  `id_warehouse` int(10) unsigned NOT NULL default '0', 
    +  `alias` varchar(32) NOT NULL, 
    +  `company` varchar(64) default NULL, 
    +  `lastname` varchar(32) NOT NULL, 
    +  `firstname` varchar(32) NOT NULL, 
    +  `address1` varchar(128) NOT NULL, 
    +  `address2` varchar(128) default NULL, 
    +  `postcode` varchar(12) default NULL, 
    +  `city` varchar(64) NOT NULL, 
    +  `other` text, 
    +  `phone` varchar(16) default NULL, 
    +  `phone_mobile` varchar(16) default NULL, 
    +  `vat_number` varchar(32) default NULL, 
    +  `dni` varchar(16) DEFAULT NULL, 
    +  `date_add` datetime NOT NULL, 
    +  `date_upd` datetime NOT NULL, 
    +  `active` tinyint(1) unsigned NOT NULL default '1', 
    +  `deleted` tinyint(1) unsigned NOT NULL default '0', 
    +  PRIMARY KEY (`id_address`), 
    +  KEY `address_customer` (`id_customer`), 
    +  KEY `id_country` (`id_country`), 
    +  KEY `id_state` (`id_state`), 
    +  KEY `id_manufacturer` (`id_manufacturer`), 
    +  KEY `id_supplier` (`id_supplier`), 
    +  KEY `id_warehouse` (`id_warehouse`)
    +) ENGINE = ENGINE_TYPE DEFAULT CHARSET = utf8
    + +
    CREATE TABLE `PREFIX_alias` (
    +  `id_alias` int(10) unsigned NOT NULL auto_increment, 
    +  `alias` varchar(255) NOT NULL, 
    +  `search` varchar(255) NOT NULL, 
    +  `active` tinyint(1) NOT NULL default '1', 
    +  PRIMARY KEY (`id_alias`), 
    +  UNIQUE KEY `alias` (`alias`)
    +) ENGINE = ENGINE_TYPE DEFAULT CHARSET = utf8
    + +
    CREATE TABLE `PREFIX_carrier` (
    +  `id_carrier` int(10) unsigned NOT NULL AUTO_INCREMENT, 
    +  `id_reference` int(10) unsigned NOT NULL, 
    +  `id_tax_rules_group` int(10) unsigned DEFAULT '0', 
    +  `name` varchar(64) NOT NULL, 
    +  `url` varchar(255) DEFAULT NULL, 
    +  `active` tinyint(1) unsigned NOT NULL DEFAULT '0', 
    +  `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0', 
    +  `shipping_handling` tinyint(1) unsigned NOT NULL DEFAULT '1', 
    +  `range_behavior` tinyint(1) unsigned NOT NULL DEFAULT '0', 
    +  `is_module` tinyint(1) unsigned NOT NULL DEFAULT '0', 
    +  `is_free` tinyint(1) unsigned NOT NULL DEFAULT '0', 
    +  `shipping_external` tinyint(1) unsigned NOT NULL DEFAULT '0', 
    +  `need_range` tinyint(1) unsigned NOT NULL DEFAULT '0', 
    +  `external_module_name` varchar(64) DEFAULT NULL, 
    +  `shipping_method` int(2) NOT NULL DEFAULT '0', 
    +  `position` int(10) unsigned NOT NULL default '0', 
    +  `max_width` int(10) DEFAULT 0, 
    +  `max_height` int(10) DEFAULT 0, 
    +  `max_depth` int(10) DEFAULT 0, 
    +  `max_weight` int(10) DEFAULT 0, 
    +  `grade` int(10) DEFAULT 0, 
    +  PRIMARY KEY (`id_carrier`), 
    +  KEY `deleted` (`deleted`, `active`), 
    +  KEY `id_tax_rules_group` (`id_tax_rules_group`)
    +) ENGINE = ENGINE_TYPE DEFAULT CHARSET = utf8
    + +
    CREATE TABLE IF NOT EXISTS `PREFIX_specific_price_rule` (
    +  `id_specific_price_rule` int(10) unsigned NOT NULL AUTO_INCREMENT, 
    +  `name` VARCHAR(255) NOT NULL, 
    +  `id_shop` int(11) unsigned NOT NULL DEFAULT '1', 
    +  `id_currency` int(10) unsigned NOT NULL, 
    +  `id_country` int(10) unsigned NOT NULL, 
    +  `id_group` int(10) unsigned NOT NULL, 
    +  `from_quantity` mediumint(8) unsigned NOT NULL, 
    +  `price` DECIMAL(20, 6), 
    +  `reduction` decimal(20, 6) NOT NULL, 
    +  `reduction_type` enum('amount', 'percentage') NOT NULL, 
    +  `from` datetime NOT NULL, 
    +  `to` datetime NOT NULL, 
    +  PRIMARY KEY (`id_specific_price_rule`), 
    +  KEY `id_product` (
    +    `id_shop`, `id_currency`, `id_country`, 
    +    `id_group`, `from_quantity`, `from`, 
    +    `to`
    +  )
    +) ENGINE = ENGINE_TYPE DEFAULT CHARSET = utf8
    + +
    UPDATE 
    +  `PREFIX_configuration` 
    +SET 
    +  value = '6' 
    +WHERE 
    +  name = 'PS_SEARCH_WEIGHT_PNAME'
    + +
    UPDATE 
    +  `PREFIX_hook_module` 
    +SET 
    +  position = 1 
    +WHERE 
    +  id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'displayPayment'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'cheque'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'displayPaymentReturn'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'cheque'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'displayHome'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'homeslider'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'actionAuthentication'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'statsdata'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'actionShopDataDuplication'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'homeslider'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'displayTop'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'blocklanguages'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'actionCustomerAccountAdd'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'statsdata'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'displayCustomerAccount'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'favoriteproducts'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'displayAdminStatsModules'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'statsvisits'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'displayAdminStatsGraphEngine'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'graphvisifire'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'displayAdminStatsGridEngine'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'gridhtml'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'displayLeftColumnProduct'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'blocksharefb'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'actionSearch'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'statssearch'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'actionCategoryAdd'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'blockcategories'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'actionCategoryUpdate'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'blockcategories'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'actionCategoryDelete'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'blockcategories'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'actionAdminMetaSave'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'blockcategories'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'displayMyAccountBlock'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'favoriteproducts'
    +  ) 
    +  OR id_hook = (
    +    SELECT 
    +      id_hook 
    +    FROM 
    +      `PREFIX_hook` 
    +    WHERE 
    +      name = 'displayFooter'
    +  ) 
    +  AND id_module = (
    +    SELECT 
    +      id_module 
    +    FROM 
    +      `PREFIX_module` 
    +    WHERE 
    +      name = 'blockreinsurance'
    +  )
    + +
    ALTER TABLE 
    +  `PREFIX_employee` 
    +ADD 
    +  `bo_color` varchar(32) default NULL 
    +AFTER 
    +  `stats_date_to`
    + +
    INSERT INTO `PREFIX_cms_category_lang` 
    +VALUES 
    +  (
    +    1, 3, 'Inicio', '', 'home', NULL, NULL, 
    +    NULL
    +  )
    + +
    INSERT INTO `PREFIX_cms_category` 
    +VALUES 
    +  (1, 0, 0, 1, NOW(), NOW(), 0)
    + +
    UPDATE 
    +  `PREFIX_cms_category` 
    +SET 
    +  `position` = 0
    + +
    ALTER TABLE 
    +  `PREFIX_customer` 
    +ADD 
    +  `note` text 
    +AFTER 
    +  `secure_key`
    + +
    ALTER TABLE 
    +  `PREFIX_contact` 
    +ADD 
    +  `customer_service` tinyint(1) NOT NULL DEFAULT 0 
    +AFTER 
    +  `email`
    + +
    INSERT INTO `PREFIX_specific_price` (
    +  `id_product`, `id_shop`, `id_currency`, 
    +  `id_country`, `id_group`, `priority`, 
    +  `price`, `from_quantity`, `reduction`, 
    +  `reduction_type`, `from`, `to`
    +) (
    +  SELECT 
    +    dq.`id_product`, 
    +    1, 
    +    1, 
    +    0, 
    +    1, 
    +    0, 
    +    0.00, 
    +    dq.`quantity`, 
    +    IF(
    +      dq.`id_discount_type` = 2, dq.`value`, 
    +      dq.`value` / 100
    +    ), 
    +    IF (
    +      dq.`id_discount_type` = 2, 'amount', 
    +      'percentage'
    +    ), 
    +    '0000-00-00 00:00:00', 
    +    '0000-00-00 00:00:00' 
    +  FROM 
    +    `PREFIX_discount_quantity` dq 
    +    INNER JOIN `PREFIX_product` p ON (p.`id_product` = dq.`id_product`)
    +)
    + +
    DROP 
    +  TABLE `PREFIX_discount_quantity`
    + +
    INSERT INTO `PREFIX_specific_price` (
    +  `id_product`, `id_shop`, `id_currency`, 
    +  `id_country`, `id_group`, `priority`, 
    +  `price`, `from_quantity`, `reduction`, 
    +  `reduction_type`, `from`, `to`
    +) (
    +  SELECT 
    +    p.`id_product`, 
    +    1, 
    +    0, 
    +    0, 
    +    0, 
    +    0, 
    +    0.00, 
    +    1, 
    +    IF(
    +      p.`reduction_price` > 0, p.`reduction_price`, 
    +      p.`reduction_percent` / 100
    +    ), 
    +    IF(
    +      p.`reduction_price` > 0, 'amount', 
    +      'percentage'
    +    ), 
    +    IF (
    +      p.`reduction_from` = p.`reduction_to`, 
    +      '0000-00-00 00:00:00', p.`reduction_from`
    +    ), 
    +    IF (
    +      p.`reduction_from` = p.`reduction_to`, 
    +      '0000-00-00 00:00:00', p.`reduction_to`
    +    ) 
    +  FROM 
    +    `PREFIX_product` p 
    +  WHERE 
    +    p.`reduction_price` 
    +    OR p.`reduction_percent`
    +)
    + +
    ALTER TABLE 
    +  `PREFIX_product` 
    +DROP 
    +  `reduction_price`, 
    +DROP 
    +  `reduction_percent`, 
    +DROP 
    +  `reduction_from`, 
    +DROP 
    +  `reduction_to`
    + +
    INSERT INTO `PREFIX_configuration` (
    +  `name`, `value`, `date_add`, `date_upd`
    +) 
    +VALUES 
    +  (
    +    'PS_SPECIFIC_PRICE_PRIORITIES', 
    +    'id_shop;id_currency;id_country;id_group', 
    +    NOW(), NOW()
    +  ), 
    +  ('PS_TAX_DISPLAY', 0, NOW(), NOW()), 
    +  (
    +    'PS_SMARTY_FORCE_COMPILE', 1, NOW(), 
    +    NOW()
    +  ), 
    +  (
    +    'PS_DISTANCE_UNIT', 'km', NOW(), NOW()
    +  ), 
    +  (
    +    'PS_STORES_DISPLAY_CMS', 0, NOW(), 
    +    NOW()
    +  ), 
    +  (
    +    'PS_STORES_DISPLAY_FOOTER', 0, NOW(), 
    +    NOW()
    +  ), 
    +  (
    +    'PS_STORES_SIMPLIFIED', 0, NOW(), 
    +    NOW()
    +  ), 
    +  (
    +    'PS_STATSDATA_CUSTOMER_PAGESVIEWS', 
    +    1, NOW(), NOW()
    +  ), 
    +  (
    +    'PS_STATSDATA_PAGESVIEWS', 1, NOW(), 
    +    NOW()
    +  ), 
    +  (
    +    'PS_STATSDATA_PLUGINS', 1, NOW(), 
    +    NOW()
    +  )
    + +
    INSERT INTO `PREFIX_configuration` (
    +  `name`, `value`, `date_add`, `date_upd`
    +) 
    +VALUES 
    +  (
    +    'PS_CONDITIONS_CMS_ID', 
    +    IFNULL(
    +      (
    +        SELECT 
    +          `id_cms` 
    +        FROM 
    +          `PREFIX_cms` 
    +        WHERE 
    +          `id_cms` = 3
    +      ), 
    +      0
    +    ), 
    +    NOW(), 
    +    NOW()
    +  )
    + +
    CREATE TEMPORARY TABLE `PREFIX_configuration_tmp` (`value` text)
    + +
    SET 
    +  @defaultOOS = (
    +    SELECT 
    +      value 
    +    FROM 
    +      `PREFIX_configuration` 
    +    WHERE 
    +      name = 'PS_ORDER_OUT_OF_STOCK'
    +  )
    + +
    UPDATE 
    +  `PREFIX_product` p 
    +SET 
    +  `cache_default_attribute` = 0 
    +WHERE 
    +  `id_product` NOT IN (
    +    SELECT 
    +      `id_product` 
    +    FROM 
    +      `PREFIX_product_attribute`
    +  )
    + +
    INSERT INTO `PREFIX_hook` (
    +  `name`, `title`, `description`, `position`
    +) 
    +VALUES 
    +  (
    +    'processCarrier', 'Carrier Process', 
    +    NULL, 0
    +  )
    + +
    INSERT INTO `PREFIX_stock_mvt_reason_lang` (
    +  `id_stock_mvt_reason`, `id_lang`, 
    +  `name`
    +) 
    +VALUES 
    +  (1, 1, 'Order'), 
    +  (1, 2, 'Commande'), 
    +  (2, 1, 'Missing Stock Movement'), 
    +  (
    +    2, 2, 'Mouvement de stock manquant'
    +  ), 
    +  (3, 1, 'Restocking'), 
    +  (3, 2, 'Réassort')
    + +
    INSERT INTO `PREFIX_meta_lang` (
    +  `id_lang`, `id_meta`, `title`, `url_rewrite`
    +) 
    +VALUES 
    +  (
    +    1, 
    +    (
    +      SELECT 
    +        `id_meta` 
    +      FROM 
    +        `PREFIX_meta` 
    +      WHERE 
    +        `page` = 'authentication'
    +    ), 
    +    'Authentication', 
    +    'authentication'
    +  ), 
    +  (
    +    2, 
    +    (
    +      SELECT 
    +        `id_meta` 
    +      FROM 
    +        `PREFIX_meta` 
    +      WHERE 
    +        `page` = 'authentication'
    +    ), 
    +    'Authentification', 
    +    'authentification'
    +  ), 
    +  (
    +    3, 
    +    (
    +      SELECT 
    +        `id_meta` 
    +      FROM 
    +        `PREFIX_meta` 
    +      WHERE 
    +        `page` = 'authentication'
    +    ), 
    +    'Autenticación', 
    +    'autenticacion'
    +  )
    + +
    LOCK TABLES `admin_assert` WRITE
    + +
    UNLOCK TABLES
    + +
    DROP 
    +  TABLE IF EXISTS `admin_role`
    + +
    SELECT 
    +  * 
    +FROM 
    +  -- This is another comment
    +  MyTable # One final comment
    +  
    +  /* This is a block comment 
    +  */
    +WHERE 
    +  1 = 2;
    + +
    SELECT 
    +  -- This is a test
    + +
    SELECT 
    +  Test 
    +FROM 
    +  Test 
    +WHERE 
    +  (MyColumn = 1)
    +)
    +AND (
    +  (
    +    (SomeOtherColumn = 2); 
    +WARNING: unclosed parentheses or section
    + +
    SELECT 
    +  * 
    +LIMIT 
    +  1; 
    +SELECT 
    +  a, 
    +  b, 
    +  c, 
    +  d 
    +FROM 
    +  e 
    +LIMIT 
    +  1, 2; 
    +SELECT 
    +  1, 
    +  2, 
    +  3 
    +WHERE 
    +  a in (1, 2, 3, 4, 5) 
    +  and b = 5;
    + +
    SELECT 
    +  count - 50 
    +WHERE 
    +  a - 50 = b 
    +WHERE 
    +  1 
    +  and -50 
    +WHERE 
    +  -50 = a 
    +WHERE 
    +  a = -50 
    +WHERE 
    +  1 
    +  /*test*/
    +  -50 
    +WHERE 
    +  1 
    +  and -50;
    + +
    SELECT 
    +  @ 
    +  and b;
    + +
    SELECT 
    +  @"weird variable name";
    + +
    SELECT 
    +  "no closing quote
    +
    \ No newline at end of file diff --git a/vendor/jdorn/sql-formatter/tests/format.html b/vendor/jdorn/sql-formatter/tests/format.html new file mode 100644 index 0000000000000000000000000000000000000000..dcbac03b8eb51d0614d040f90051f780bdceaa2d --- /dev/null +++ b/vendor/jdorn/sql-formatter/tests/format.html @@ -0,0 +1,807 @@ +SELECT + customer_id, + customer_name, + COUNT(order_id) as total +FROM + customers + INNER JOIN orders ON customers.customer_id = orders.customer_id +GROUP BY + customer_id, + customer_name +HAVING + COUNT(order_id) > 5 +ORDER BY + COUNT(order_id) DESC; + +UPDATE + customers +SET + totalorders = ordersummary.total +FROM + ( + SELECT + customer_id, + count(order_id) As total + FROM + orders + GROUP BY + customer_id + ) As ordersummary +WHERE + customers.customer_id = ordersummary.customer_id + +SELECT + * +FROM + sometable +UNION ALL +SELECT + * +FROM + someothertable; + +SET + NAMES 'utf8'; + +CREATE TABLE `PREFIX_address` ( + `id_address` int(10) unsigned NOT NULL auto_increment, + `id_country` int(10) unsigned NOT NULL, + `id_state` int(10) unsigned default NULL, + `id_customer` int(10) unsigned NOT NULL default '0', + `id_manufacturer` int(10) unsigned NOT NULL default '0', + `id_supplier` int(10) unsigned NOT NULL default '0', + `id_warehouse` int(10) unsigned NOT NULL default '0', + `alias` varchar(32) NOT NULL, + `company` varchar(64) default NULL, + `lastname` varchar(32) NOT NULL, + `firstname` varchar(32) NOT NULL, + `address1` varchar(128) NOT NULL, + `address2` varchar(128) default NULL, + `postcode` varchar(12) default NULL, + `city` varchar(64) NOT NULL, + `other` text, + `phone` varchar(16) default NULL, + `phone_mobile` varchar(16) default NULL, + `vat_number` varchar(32) default NULL, + `dni` varchar(16) DEFAULT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + `active` tinyint(1) unsigned NOT NULL default '1', + `deleted` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`id_address`), + KEY `address_customer` (`id_customer`), + KEY `id_country` (`id_country`), + KEY `id_state` (`id_state`), + KEY `id_manufacturer` (`id_manufacturer`), + KEY `id_supplier` (`id_supplier`), + KEY `id_warehouse` (`id_warehouse`) +) ENGINE = ENGINE_TYPE DEFAULT CHARSET = utf8 + +CREATE TABLE `PREFIX_alias` ( + `id_alias` int(10) unsigned NOT NULL auto_increment, + `alias` varchar(255) NOT NULL, + `search` varchar(255) NOT NULL, + `active` tinyint(1) NOT NULL default '1', + PRIMARY KEY (`id_alias`), + UNIQUE KEY `alias` (`alias`) +) ENGINE = ENGINE_TYPE DEFAULT CHARSET = utf8 + +CREATE TABLE `PREFIX_carrier` ( + `id_carrier` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_reference` int(10) unsigned NOT NULL, + `id_tax_rules_group` int(10) unsigned DEFAULT '0', + `name` varchar(64) NOT NULL, + `url` varchar(255) DEFAULT NULL, + `active` tinyint(1) unsigned NOT NULL DEFAULT '0', + `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0', + `shipping_handling` tinyint(1) unsigned NOT NULL DEFAULT '1', + `range_behavior` tinyint(1) unsigned NOT NULL DEFAULT '0', + `is_module` tinyint(1) unsigned NOT NULL DEFAULT '0', + `is_free` tinyint(1) unsigned NOT NULL DEFAULT '0', + `shipping_external` tinyint(1) unsigned NOT NULL DEFAULT '0', + `need_range` tinyint(1) unsigned NOT NULL DEFAULT '0', + `external_module_name` varchar(64) DEFAULT NULL, + `shipping_method` int(2) NOT NULL DEFAULT '0', + `position` int(10) unsigned NOT NULL default '0', + `max_width` int(10) DEFAULT 0, + `max_height` int(10) DEFAULT 0, + `max_depth` int(10) DEFAULT 0, + `max_weight` int(10) DEFAULT 0, + `grade` int(10) DEFAULT 0, + PRIMARY KEY (`id_carrier`), + KEY `deleted` (`deleted`, `active`), + KEY `id_tax_rules_group` (`id_tax_rules_group`) +) ENGINE = ENGINE_TYPE DEFAULT CHARSET = utf8 + +CREATE TABLE IF NOT EXISTS `PREFIX_specific_price_rule` ( + `id_specific_price_rule` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` VARCHAR(255) NOT NULL, + `id_shop` int(11) unsigned NOT NULL DEFAULT '1', + `id_currency` int(10) unsigned NOT NULL, + `id_country` int(10) unsigned NOT NULL, + `id_group` int(10) unsigned NOT NULL, + `from_quantity` mediumint(8) unsigned NOT NULL, + `price` DECIMAL(20, 6), + `reduction` decimal(20, 6) NOT NULL, + `reduction_type` enum('amount', 'percentage') NOT NULL, + `from` datetime NOT NULL, + `to` datetime NOT NULL, + PRIMARY KEY (`id_specific_price_rule`), + KEY `id_product` ( + `id_shop`, `id_currency`, `id_country`, + `id_group`, `from_quantity`, `from`, + `to` + ) +) ENGINE = ENGINE_TYPE DEFAULT CHARSET = utf8 + +UPDATE + `PREFIX_configuration` +SET + value = '6' +WHERE + name = 'PS_SEARCH_WEIGHT_PNAME' + +UPDATE + `PREFIX_hook_module` +SET + position = 1 +WHERE + id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayPayment' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'cheque' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayPaymentReturn' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'cheque' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayHome' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'homeslider' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionAuthentication' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'statsdata' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionShopDataDuplication' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'homeslider' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayTop' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blocklanguages' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionCustomerAccountAdd' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'statsdata' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayCustomerAccount' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'favoriteproducts' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayAdminStatsModules' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'statsvisits' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayAdminStatsGraphEngine' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'graphvisifire' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayAdminStatsGridEngine' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'gridhtml' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayLeftColumnProduct' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blocksharefb' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionSearch' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'statssearch' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionCategoryAdd' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blockcategories' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionCategoryUpdate' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blockcategories' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionCategoryDelete' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blockcategories' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'actionAdminMetaSave' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blockcategories' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayMyAccountBlock' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'favoriteproducts' + ) + OR id_hook = ( + SELECT + id_hook + FROM + `PREFIX_hook` + WHERE + name = 'displayFooter' + ) + AND id_module = ( + SELECT + id_module + FROM + `PREFIX_module` + WHERE + name = 'blockreinsurance' + ) + +ALTER TABLE + `PREFIX_employee` +ADD + `bo_color` varchar(32) default NULL +AFTER + `stats_date_to` + +INSERT INTO `PREFIX_cms_category_lang` +VALUES + ( + 1, 3, 'Inicio', '', 'home', NULL, NULL, + NULL + ) + +INSERT INTO `PREFIX_cms_category` +VALUES + (1, 0, 0, 1, NOW(), NOW(), 0) + +UPDATE + `PREFIX_cms_category` +SET + `position` = 0 + +ALTER TABLE + `PREFIX_customer` +ADD + `note` text +AFTER + `secure_key` + +ALTER TABLE + `PREFIX_contact` +ADD + `customer_service` tinyint(1) NOT NULL DEFAULT 0 +AFTER + `email` + +INSERT INTO `PREFIX_specific_price` ( + `id_product`, `id_shop`, `id_currency`, + `id_country`, `id_group`, `priority`, + `price`, `from_quantity`, `reduction`, + `reduction_type`, `from`, `to` +) ( + SELECT + dq.`id_product`, + 1, + 1, + 0, + 1, + 0, + 0.00, + dq.`quantity`, + IF( + dq.`id_discount_type` = 2, dq.`value`, + dq.`value` / 100 + ), + IF ( + dq.`id_discount_type` = 2, 'amount', + 'percentage' + ), + '0000-00-00 00:00:00', + '0000-00-00 00:00:00' + FROM + `PREFIX_discount_quantity` dq + INNER JOIN `PREFIX_product` p ON (p.`id_product` = dq.`id_product`) +) + +DROP + TABLE `PREFIX_discount_quantity` + +INSERT INTO `PREFIX_specific_price` ( + `id_product`, `id_shop`, `id_currency`, + `id_country`, `id_group`, `priority`, + `price`, `from_quantity`, `reduction`, + `reduction_type`, `from`, `to` +) ( + SELECT + p.`id_product`, + 1, + 0, + 0, + 0, + 0, + 0.00, + 1, + IF( + p.`reduction_price` > 0, p.`reduction_price`, + p.`reduction_percent` / 100 + ), + IF( + p.`reduction_price` > 0, 'amount', + 'percentage' + ), + IF ( + p.`reduction_from` = p.`reduction_to`, + '0000-00-00 00:00:00', p.`reduction_from` + ), + IF ( + p.`reduction_from` = p.`reduction_to`, + '0000-00-00 00:00:00', p.`reduction_to` + ) + FROM + `PREFIX_product` p + WHERE + p.`reduction_price` + OR p.`reduction_percent` +) + +ALTER TABLE + `PREFIX_product` +DROP + `reduction_price`, +DROP + `reduction_percent`, +DROP + `reduction_from`, +DROP + `reduction_to` + +INSERT INTO `PREFIX_configuration` ( + `name`, `value`, `date_add`, `date_upd` +) +VALUES + ( + 'PS_SPECIFIC_PRICE_PRIORITIES', + 'id_shop;id_currency;id_country;id_group', + NOW(), NOW() + ), + ('PS_TAX_DISPLAY', 0, NOW(), NOW()), + ( + 'PS_SMARTY_FORCE_COMPILE', 1, NOW(), + NOW() + ), + ( + 'PS_DISTANCE_UNIT', 'km', NOW(), NOW() + ), + ( + 'PS_STORES_DISPLAY_CMS', 0, NOW(), + NOW() + ), + ( + 'PS_STORES_DISPLAY_FOOTER', 0, NOW(), + NOW() + ), + ( + 'PS_STORES_SIMPLIFIED', 0, NOW(), + NOW() + ), + ( + 'PS_STATSDATA_CUSTOMER_PAGESVIEWS', + 1, NOW(), NOW() + ), + ( + 'PS_STATSDATA_PAGESVIEWS', 1, NOW(), + NOW() + ), + ( + 'PS_STATSDATA_PLUGINS', 1, NOW(), + NOW() + ) + +INSERT INTO `PREFIX_configuration` ( + `name`, `value`, `date_add`, `date_upd` +) +VALUES + ( + 'PS_CONDITIONS_CMS_ID', + IFNULL( + ( + SELECT + `id_cms` + FROM + `PREFIX_cms` + WHERE + `id_cms` = 3 + ), + 0 + ), + NOW(), + NOW() + ) + +CREATE TEMPORARY TABLE `PREFIX_configuration_tmp` (`value` text) + +SET + @defaultOOS = ( + SELECT + value + FROM + `PREFIX_configuration` + WHERE + name = 'PS_ORDER_OUT_OF_STOCK' + ) + +UPDATE + `PREFIX_product` p +SET + `cache_default_attribute` = 0 +WHERE + `id_product` NOT IN ( + SELECT + `id_product` + FROM + `PREFIX_product_attribute` + ) + +INSERT INTO `PREFIX_hook` ( + `name`, `title`, `description`, `position` +) +VALUES + ( + 'processCarrier', 'Carrier Process', + NULL, 0 + ) + +INSERT INTO `PREFIX_stock_mvt_reason_lang` ( + `id_stock_mvt_reason`, `id_lang`, + `name` +) +VALUES + (1, 1, 'Order'), + (1, 2, 'Commande'), + (2, 1, 'Missing Stock Movement'), + ( + 2, 2, 'Mouvement de stock manquant' + ), + (3, 1, 'Restocking'), + (3, 2, 'Réassort') + +INSERT INTO `PREFIX_meta_lang` ( + `id_lang`, `id_meta`, `title`, `url_rewrite` +) +VALUES + ( + 1, + ( + SELECT + `id_meta` + FROM + `PREFIX_meta` + WHERE + `page` = 'authentication' + ), + 'Authentication', + 'authentication' + ), + ( + 2, + ( + SELECT + `id_meta` + FROM + `PREFIX_meta` + WHERE + `page` = 'authentication' + ), + 'Authentification', + 'authentification' + ), + ( + 3, + ( + SELECT + `id_meta` + FROM + `PREFIX_meta` + WHERE + `page` = 'authentication' + ), + 'Autenticación', + 'autenticacion' + ) + +LOCK TABLES `admin_assert` WRITE + +UNLOCK TABLES + +DROP + TABLE IF EXISTS `admin_role` + +SELECT + * +FROM + -- This is another comment + MyTable # One final comment + + /* This is a block comment + */ +WHERE + 1 = 2; + +SELECT + -- This is a test + +SELECT + Test +FROM + Test +WHERE + (MyColumn = 1) +) +AND ( + ( + (SomeOtherColumn = 2); + +SELECT + * +LIMIT + 1; +SELECT + a, + b, + c, + d +FROM + e +LIMIT + 1, 2; +SELECT + 1, + 2, + 3 +WHERE + a in (1, 2, 3, 4, 5) + and b = 5; + +SELECT + count - 50 +WHERE + a - 50 = b +WHERE + 1 + and -50 +WHERE + -50 = a +WHERE + a = -50 +WHERE + 1 + /*test*/ + -50 +WHERE + 1 + and -50; + +SELECT + @ + and b; + +SELECT + @"weird variable name"; + +SELECT + "no closing quote \ No newline at end of file diff --git a/vendor/jdorn/sql-formatter/tests/highlight.html b/vendor/jdorn/sql-formatter/tests/highlight.html new file mode 100644 index 0000000000000000000000000000000000000000..e26af9a9f1d974806f57254abb90c61094645897 --- /dev/null +++ b/vendor/jdorn/sql-formatter/tests/highlight.html @@ -0,0 +1,262 @@ +
    SELECT customer_id, customer_name, COUNT(order_id) as total
    +FROM customers INNER JOIN orders ON customers.customer_id = orders.customer_id
    +GROUP BY customer_id, customer_name
    +HAVING COUNT(order_id) > 5
    +ORDER BY COUNT(order_id) DESC;
    + +
    UPDATE customers
    +        SET totalorders = ordersummary.total
    +        FROM (SELECT customer_id, count(order_id) As total 
    +FROM orders GROUP BY customer_id) As ordersummary
    +        WHERE customers.customer_id = ordersummary.customer_id
    + +
    SELECT * FROM sometable
    +UNION ALL
    +SELECT * FROM someothertable;
    + +
    SET NAMES 'utf8';
    + +
    CREATE TABLE `PREFIX_address` (
    +  `id_address` int(10) unsigned NOT NULL auto_increment,
    +  `id_country` int(10) unsigned NOT NULL,
    +  `id_state` int(10) unsigned default NULL,
    +  `id_customer` int(10) unsigned NOT NULL default '0',
    +  `id_manufacturer` int(10) unsigned NOT NULL default '0',
    +  `id_supplier` int(10) unsigned NOT NULL default '0',
    +  `id_warehouse` int(10) unsigned NOT NULL default '0',
    +  `alias` varchar(32) NOT NULL,
    +  `company` varchar(64) default NULL,
    +  `lastname` varchar(32) NOT NULL,
    +  `firstname` varchar(32) NOT NULL,
    +  `address1` varchar(128) NOT NULL,
    +  `address2` varchar(128) default NULL,
    +  `postcode` varchar(12) default NULL,
    +  `city` varchar(64) NOT NULL,
    +  `other` text,
    +  `phone` varchar(16) default NULL,
    +  `phone_mobile` varchar(16) default NULL,
    +  `vat_number` varchar(32) default NULL,
    +  `dni` varchar(16) DEFAULT NULL,
    +  `date_add` datetime NOT NULL,
    +  `date_upd` datetime NOT NULL,
    +  `active` tinyint(1) unsigned NOT NULL default '1',
    +  `deleted` tinyint(1) unsigned NOT NULL default '0',
    +  PRIMARY KEY (`id_address`),
    +  KEY `address_customer` (`id_customer`),
    +  KEY `id_country` (`id_country`),
    +  KEY `id_state` (`id_state`),
    +  KEY `id_manufacturer` (`id_manufacturer`),
    +  KEY `id_supplier` (`id_supplier`),
    +  KEY `id_warehouse` (`id_warehouse`)
    +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8
    + +
    CREATE TABLE `PREFIX_alias` (
    +  `id_alias` int(10) unsigned NOT NULL auto_increment,
    +  `alias` varchar(255) NOT NULL,
    +  `search` varchar(255) NOT NULL,
    +  `active` tinyint(1) NOT NULL default '1',
    +  PRIMARY KEY (`id_alias`),
    +  UNIQUE KEY `alias` (`alias`)
    +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8
    + +
    CREATE TABLE `PREFIX_carrier` (
    +  `id_carrier` int(10) unsigned NOT NULL AUTO_INCREMENT,
    +  `id_reference` int(10) unsigned NOT NULL,
    +  `id_tax_rules_group` int(10) unsigned DEFAULT '0',
    +  `name` varchar(64) NOT NULL,
    +  `url` varchar(255) DEFAULT NULL,
    +  `active` tinyint(1) unsigned NOT NULL DEFAULT '0',
    +  `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0',
    +  `shipping_handling` tinyint(1) unsigned NOT NULL DEFAULT '1',
    +  `range_behavior` tinyint(1) unsigned NOT NULL DEFAULT '0',
    +  `is_module` tinyint(1) unsigned NOT NULL DEFAULT '0',
    +  `is_free` tinyint(1) unsigned NOT NULL DEFAULT '0',
    +  `shipping_external` tinyint(1) unsigned NOT NULL DEFAULT '0',
    +  `need_range` tinyint(1) unsigned NOT NULL DEFAULT '0',
    +  `external_module_name` varchar(64) DEFAULT NULL,
    +  `shipping_method` int(2) NOT NULL DEFAULT '0',
    +  `position` int(10) unsigned NOT NULL default '0',
    +  `max_width` int(10) DEFAULT 0,
    +  `max_height` int(10)  DEFAULT 0,
    +  `max_depth` int(10)  DEFAULT 0,
    +  `max_weight` int(10)  DEFAULT 0,
    +  `grade` int(10)  DEFAULT 0,
    +  PRIMARY KEY (`id_carrier`),
    +  KEY `deleted` (`deleted`,`active`),
    +  KEY `id_tax_rules_group` (`id_tax_rules_group`)
    +) ENGINE=ENGINE_TYPE  DEFAULT CHARSET=utf8
    + +
    CREATE TABLE IF NOT EXISTS `PREFIX_specific_price_rule` (
    +	`id_specific_price_rule` int(10) unsigned NOT NULL AUTO_INCREMENT,
    +	`name` VARCHAR(255) NOT NULL,
    +	`id_shop` int(11) unsigned NOT NULL DEFAULT '1',
    +	`id_currency` int(10) unsigned NOT NULL,
    +	`id_country` int(10) unsigned NOT NULL,
    +	`id_group` int(10) unsigned NOT NULL,
    +	`from_quantity` mediumint(8) unsigned NOT NULL,
    +	`price` DECIMAL(20,6),
    +	`reduction` decimal(20,6) NOT NULL,
    +	`reduction_type` enum('amount','percentage') NOT NULL,
    +	`from` datetime NOT NULL,
    +	`to` datetime NOT NULL,
    +	PRIMARY KEY (`id_specific_price_rule`),
    +	KEY `id_product` (`id_shop`,`id_currency`,`id_country`,`id_group`,`from_quantity`,`from`,`to`)
    +) ENGINE=ENGINE_TYPE  DEFAULT CHARSET=utf8
    + +
    UPDATE `PREFIX_configuration` SET value = '6' WHERE name = 'PS_SEARCH_WEIGHT_PNAME'
    + +
    UPDATE `PREFIX_hook_module` SET position = 1
    +WHERE
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayPayment') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'cheque')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayPaymentReturn') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'cheque')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayHome') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'homeslider')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionAuthentication') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'statsdata')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionShopDataDuplication') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'homeslider')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayTop') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocklanguages')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionCustomerAccountAdd') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'statsdata')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayCustomerAccount') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'favoriteproducts')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayAdminStatsModules') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'statsvisits')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayAdminStatsGraphEngine') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'graphvisifire')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayAdminStatsGridEngine') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'gridhtml')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayLeftColumnProduct') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocksharefb')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionSearch') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'statssearch')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionCategoryAdd') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionCategoryUpdate') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionCategoryDelete') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionAdminMetaSave') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayMyAccountBlock') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'favoriteproducts')
    +	OR
    +	id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayFooter') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockreinsurance')
    + +
    ALTER TABLE `PREFIX_employee` ADD `bo_color` varchar(32) default NULL AFTER `stats_date_to`
    + +
    INSERT INTO `PREFIX_cms_category_lang` VALUES(1, 3, 'Inicio', '', 'home', NULL, NULL, NULL)
    + +
    INSERT INTO `PREFIX_cms_category` VALUES(1, 0, 0, 1, NOW(), NOW(),0)
    + +
    UPDATE `PREFIX_cms_category` SET `position` = 0
    + +
    ALTER TABLE `PREFIX_customer` ADD `note` text AFTER `secure_key`
    + +
    ALTER TABLE `PREFIX_contact` ADD `customer_service` tinyint(1) NOT NULL DEFAULT 0 AFTER `email`
    + +
    INSERT INTO `PREFIX_specific_price` (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `priority`, `price`, `from_quantity`, `reduction`, `reduction_type`, `from`, `to`)
    +	(	SELECT dq.`id_product`, 1, 1, 0, 1, 0, 0.00, dq.`quantity`, IF(dq.`id_discount_type` = 2, dq.`value`, dq.`value` / 100), IF (dq.`id_discount_type` = 2, 'amount', 'percentage'), '0000-00-00 00:00:00', '0000-00-00 00:00:00'
    +		FROM `PREFIX_discount_quantity` dq
    +		INNER JOIN `PREFIX_product` p ON (p.`id_product` = dq.`id_product`)
    +	)
    + +
    DROP TABLE `PREFIX_discount_quantity`
    + +
    INSERT INTO `PREFIX_specific_price` (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `priority`, `price`, `from_quantity`, `reduction`, `reduction_type`, `from`, `to`) (
    +	SELECT
    +		p.`id_product`,
    +		1,
    +		0,
    +		0,
    +		0,
    +		0,
    +		0.00,
    +		1,
    +		IF(p.`reduction_price` > 0, p.`reduction_price`, p.`reduction_percent` / 100),
    +		IF(p.`reduction_price` > 0, 'amount', 'percentage'),
    +		IF (p.`reduction_from` = p.`reduction_to`, '0000-00-00 00:00:00', p.`reduction_from`),
    +		IF (p.`reduction_from` = p.`reduction_to`, '0000-00-00 00:00:00', p.`reduction_to`)
    +	FROM `PREFIX_product` p
    +	WHERE p.`reduction_price` OR p.`reduction_percent`
    +)
    + +
    ALTER TABLE `PREFIX_product`
    +	DROP `reduction_price`,
    +	DROP `reduction_percent`,
    +	DROP `reduction_from`,
    +	DROP `reduction_to`
    + +
    INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES
    +('PS_SPECIFIC_PRICE_PRIORITIES', 'id_shop;id_currency;id_country;id_group', NOW(), NOW()),
    +('PS_TAX_DISPLAY', 0, NOW(), NOW()),
    +('PS_SMARTY_FORCE_COMPILE', 1, NOW(), NOW()),
    +('PS_DISTANCE_UNIT', 'km', NOW(), NOW()),
    +('PS_STORES_DISPLAY_CMS', 0, NOW(), NOW()),
    +('PS_STORES_DISPLAY_FOOTER', 0, NOW(), NOW()),
    +('PS_STORES_SIMPLIFIED', 0, NOW(), NOW()),
    +('PS_STATSDATA_CUSTOMER_PAGESVIEWS', 1, NOW(), NOW()),
    +('PS_STATSDATA_PAGESVIEWS', 1, NOW(), NOW()),
    +('PS_STATSDATA_PLUGINS', 1, NOW(), NOW())
    + +
    INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_CONDITIONS_CMS_ID', IFNULL((SELECT `id_cms` FROM `PREFIX_cms` WHERE `id_cms` = 3), 0), NOW(), NOW())
    + +
    CREATE TEMPORARY TABLE `PREFIX_configuration_tmp` (
    +	`value` text
    +)
    + +
    SET @defaultOOS = (SELECT value FROM `PREFIX_configuration` WHERE name = 'PS_ORDER_OUT_OF_STOCK')
    + +
    UPDATE `PREFIX_product` p SET `cache_default_attribute` =  0 WHERE `id_product` NOT IN (SELECT `id_product` FROM `PREFIX_product_attribute`)
    + +
    INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('processCarrier', 'Carrier Process', NULL, 0)
    + +
    INSERT INTO `PREFIX_stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) VALUES
    +(1, 1, 'Order'),
    +(1, 2, 'Commande'),
    +(2, 1, 'Missing Stock Movement'),
    +(2, 2, 'Mouvement de stock manquant'),
    +(3, 1, 'Restocking'),
    +(3, 2, 'Réassort')
    + +
    INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES
    +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'authentication'), 'Authentication', 'authentication'),
    +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'authentication'), 'Authentification', 'authentification'),
    +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'authentication'), 'Autenticación', 'autenticacion')
    + +
    LOCK TABLES `admin_assert` WRITE
    + +
    UNLOCK TABLES
    + +
    DROP TABLE IF EXISTS `admin_role`
    + +
    SELECT * FROM
    +-- This is another comment
    +MyTable # One final comment
    +/* This is a block comment 
    +*/ WHERE 1 = 2;
    + +
    SELECT -- This is a test
    + +
    SELECT Test FROM Test WHERE
    +(
    + MyColumn = 1 )) AND ((( SomeOtherColumn = 2);
    + +
    SELECT * LIMIT 1; SELECT a,b,c,d FROM e LIMIT 1, 2; SELECT 1,2,3 WHERE a in (1,2,3,4,5) and b=5;
    + +
    SELECT count - 50
    +WHERE a-50 = b
    +WHERE 1 and - 50
    +WHERE -50 = a
    +WHERE a = -50
    +WHERE 1 /*test*/ - 50
    +WHERE 1 and -50;
    + +
    SELECT @ and b;
    + +
    SELECT @"weird variable name";
    + +
    SELECT "no closing quote
    +
    \ No newline at end of file diff --git a/vendor/jdorn/sql-formatter/tests/performance.php b/vendor/jdorn/sql-formatter/tests/performance.php new file mode 100644 index 0000000000000000000000000000000000000000..6c9eb97c89a8d64d174bc4d37f3b9e98d11da258 --- /dev/null +++ b/vendor/jdorn/sql-formatter/tests/performance.php @@ -0,0 +1,44 @@ +Formatted ".$num." queries using a max_cachekey_size of ".SqlFormatter::$max_cachekey_size."

    "; + +echo "

    Average query length of ".number_format($chars/$num,5)." characters

    "; + +echo "

    Took ".number_format($end-$start,5)." seconds total, ".number_format(($end-$start)/$num,5)." seconds per query, ".number_format(1000*($end-$start)/$chars,5)." seconds per 1000 characters

    "; + +echo "

    Used ".number_format($uend-$ustart)." bytes of memory

    "; + +echo "

    Cache Stats

    ".print_r(SqlFormatter::getCacheStats(),true)."
    "; + diff --git a/vendor/jdorn/sql-formatter/tests/sql.sql b/vendor/jdorn/sql-formatter/tests/sql.sql new file mode 100644 index 0000000000000000000000000000000000000000..4e2d988c9dec4c420bf3977a869f237d6465aeb1 --- /dev/null +++ b/vendor/jdorn/sql-formatter/tests/sql.sql @@ -0,0 +1,261 @@ +SELECT customer_id, customer_name, COUNT(order_id) as total +FROM customers INNER JOIN orders ON customers.customer_id = orders.customer_id +GROUP BY customer_id, customer_name +HAVING COUNT(order_id) > 5 +ORDER BY COUNT(order_id) DESC; + +UPDATE customers + SET totalorders = ordersummary.total + FROM (SELECT customer_id, count(order_id) As total +FROM orders GROUP BY customer_id) As ordersummary + WHERE customers.customer_id = ordersummary.customer_id + +SELECT * FROM sometable +UNION ALL +SELECT * FROM someothertable; + +SET NAMES 'utf8'; + +CREATE TABLE `PREFIX_address` ( + `id_address` int(10) unsigned NOT NULL auto_increment, + `id_country` int(10) unsigned NOT NULL, + `id_state` int(10) unsigned default NULL, + `id_customer` int(10) unsigned NOT NULL default '0', + `id_manufacturer` int(10) unsigned NOT NULL default '0', + `id_supplier` int(10) unsigned NOT NULL default '0', + `id_warehouse` int(10) unsigned NOT NULL default '0', + `alias` varchar(32) NOT NULL, + `company` varchar(64) default NULL, + `lastname` varchar(32) NOT NULL, + `firstname` varchar(32) NOT NULL, + `address1` varchar(128) NOT NULL, + `address2` varchar(128) default NULL, + `postcode` varchar(12) default NULL, + `city` varchar(64) NOT NULL, + `other` text, + `phone` varchar(16) default NULL, + `phone_mobile` varchar(16) default NULL, + `vat_number` varchar(32) default NULL, + `dni` varchar(16) DEFAULT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + `active` tinyint(1) unsigned NOT NULL default '1', + `deleted` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`id_address`), + KEY `address_customer` (`id_customer`), + KEY `id_country` (`id_country`), + KEY `id_state` (`id_state`), + KEY `id_manufacturer` (`id_manufacturer`), + KEY `id_supplier` (`id_supplier`), + KEY `id_warehouse` (`id_warehouse`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 + +CREATE TABLE `PREFIX_alias` ( + `id_alias` int(10) unsigned NOT NULL auto_increment, + `alias` varchar(255) NOT NULL, + `search` varchar(255) NOT NULL, + `active` tinyint(1) NOT NULL default '1', + PRIMARY KEY (`id_alias`), + UNIQUE KEY `alias` (`alias`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 + +CREATE TABLE `PREFIX_carrier` ( + `id_carrier` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_reference` int(10) unsigned NOT NULL, + `id_tax_rules_group` int(10) unsigned DEFAULT '0', + `name` varchar(64) NOT NULL, + `url` varchar(255) DEFAULT NULL, + `active` tinyint(1) unsigned NOT NULL DEFAULT '0', + `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0', + `shipping_handling` tinyint(1) unsigned NOT NULL DEFAULT '1', + `range_behavior` tinyint(1) unsigned NOT NULL DEFAULT '0', + `is_module` tinyint(1) unsigned NOT NULL DEFAULT '0', + `is_free` tinyint(1) unsigned NOT NULL DEFAULT '0', + `shipping_external` tinyint(1) unsigned NOT NULL DEFAULT '0', + `need_range` tinyint(1) unsigned NOT NULL DEFAULT '0', + `external_module_name` varchar(64) DEFAULT NULL, + `shipping_method` int(2) NOT NULL DEFAULT '0', + `position` int(10) unsigned NOT NULL default '0', + `max_width` int(10) DEFAULT 0, + `max_height` int(10) DEFAULT 0, + `max_depth` int(10) DEFAULT 0, + `max_weight` int(10) DEFAULT 0, + `grade` int(10) DEFAULT 0, + PRIMARY KEY (`id_carrier`), + KEY `deleted` (`deleted`,`active`), + KEY `id_tax_rules_group` (`id_tax_rules_group`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 + +CREATE TABLE IF NOT EXISTS `PREFIX_specific_price_rule` ( + `id_specific_price_rule` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` VARCHAR(255) NOT NULL, + `id_shop` int(11) unsigned NOT NULL DEFAULT '1', + `id_currency` int(10) unsigned NOT NULL, + `id_country` int(10) unsigned NOT NULL, + `id_group` int(10) unsigned NOT NULL, + `from_quantity` mediumint(8) unsigned NOT NULL, + `price` DECIMAL(20,6), + `reduction` decimal(20,6) NOT NULL, + `reduction_type` enum('amount','percentage') NOT NULL, + `from` datetime NOT NULL, + `to` datetime NOT NULL, + PRIMARY KEY (`id_specific_price_rule`), + KEY `id_product` (`id_shop`,`id_currency`,`id_country`,`id_group`,`from_quantity`,`from`,`to`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 + +UPDATE `PREFIX_configuration` SET value = '6' WHERE name = 'PS_SEARCH_WEIGHT_PNAME' + +UPDATE `PREFIX_hook_module` SET position = 1 +WHERE + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayPayment') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'cheque') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayPaymentReturn') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'cheque') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayHome') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'homeslider') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionAuthentication') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'statsdata') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionShopDataDuplication') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'homeslider') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayTop') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocklanguages') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionCustomerAccountAdd') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'statsdata') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayCustomerAccount') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'favoriteproducts') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayAdminStatsModules') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'statsvisits') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayAdminStatsGraphEngine') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'graphvisifire') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayAdminStatsGridEngine') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'gridhtml') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayLeftColumnProduct') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocksharefb') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionSearch') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'statssearch') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionCategoryAdd') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionCategoryUpdate') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionCategoryDelete') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'actionAdminMetaSave') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayMyAccountBlock') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'favoriteproducts') + OR + id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayFooter') AND id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockreinsurance') + +ALTER TABLE `PREFIX_employee` ADD `bo_color` varchar(32) default NULL AFTER `stats_date_to` + +INSERT INTO `PREFIX_cms_category_lang` VALUES(1, 3, 'Inicio', '', 'home', NULL, NULL, NULL) + +INSERT INTO `PREFIX_cms_category` VALUES(1, 0, 0, 1, NOW(), NOW(),0) + +UPDATE `PREFIX_cms_category` SET `position` = 0 + +ALTER TABLE `PREFIX_customer` ADD `note` text AFTER `secure_key` + +ALTER TABLE `PREFIX_contact` ADD `customer_service` tinyint(1) NOT NULL DEFAULT 0 AFTER `email` + +INSERT INTO `PREFIX_specific_price` (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `priority`, `price`, `from_quantity`, `reduction`, `reduction_type`, `from`, `to`) + ( SELECT dq.`id_product`, 1, 1, 0, 1, 0, 0.00, dq.`quantity`, IF(dq.`id_discount_type` = 2, dq.`value`, dq.`value` / 100), IF (dq.`id_discount_type` = 2, 'amount', 'percentage'), '0000-00-00 00:00:00', '0000-00-00 00:00:00' + FROM `PREFIX_discount_quantity` dq + INNER JOIN `PREFIX_product` p ON (p.`id_product` = dq.`id_product`) + ) + +DROP TABLE `PREFIX_discount_quantity` + +INSERT INTO `PREFIX_specific_price` (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `priority`, `price`, `from_quantity`, `reduction`, `reduction_type`, `from`, `to`) ( + SELECT + p.`id_product`, + 1, + 0, + 0, + 0, + 0, + 0.00, + 1, + IF(p.`reduction_price` > 0, p.`reduction_price`, p.`reduction_percent` / 100), + IF(p.`reduction_price` > 0, 'amount', 'percentage'), + IF (p.`reduction_from` = p.`reduction_to`, '0000-00-00 00:00:00', p.`reduction_from`), + IF (p.`reduction_from` = p.`reduction_to`, '0000-00-00 00:00:00', p.`reduction_to`) + FROM `PREFIX_product` p + WHERE p.`reduction_price` OR p.`reduction_percent` +) + +ALTER TABLE `PREFIX_product` + DROP `reduction_price`, + DROP `reduction_percent`, + DROP `reduction_from`, + DROP `reduction_to` + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_SPECIFIC_PRICE_PRIORITIES', 'id_shop;id_currency;id_country;id_group', NOW(), NOW()), +('PS_TAX_DISPLAY', 0, NOW(), NOW()), +('PS_SMARTY_FORCE_COMPILE', 1, NOW(), NOW()), +('PS_DISTANCE_UNIT', 'km', NOW(), NOW()), +('PS_STORES_DISPLAY_CMS', 0, NOW(), NOW()), +('PS_STORES_DISPLAY_FOOTER', 0, NOW(), NOW()), +('PS_STORES_SIMPLIFIED', 0, NOW(), NOW()), +('PS_STATSDATA_CUSTOMER_PAGESVIEWS', 1, NOW(), NOW()), +('PS_STATSDATA_PAGESVIEWS', 1, NOW(), NOW()), +('PS_STATSDATA_PLUGINS', 1, NOW(), NOW()) + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_CONDITIONS_CMS_ID', IFNULL((SELECT `id_cms` FROM `PREFIX_cms` WHERE `id_cms` = 3), 0), NOW(), NOW()) + +CREATE TEMPORARY TABLE `PREFIX_configuration_tmp` ( + `value` text +) + +SET @defaultOOS = (SELECT value FROM `PREFIX_configuration` WHERE name = 'PS_ORDER_OUT_OF_STOCK') + +UPDATE `PREFIX_product` p SET `cache_default_attribute` = 0 WHERE `id_product` NOT IN (SELECT `id_product` FROM `PREFIX_product_attribute`) + +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('processCarrier', 'Carrier Process', NULL, 0) + +INSERT INTO `PREFIX_stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) VALUES +(1, 1, 'Order'), +(1, 2, 'Commande'), +(2, 1, 'Missing Stock Movement'), +(2, 2, 'Mouvement de stock manquant'), +(3, 1, 'Restocking'), +(3, 2, 'Réassort') + +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'authentication'), 'Authentication', 'authentication'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'authentication'), 'Authentification', 'authentification'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'authentication'), 'Autenticación', 'autenticacion') + +LOCK TABLES `admin_assert` WRITE + +UNLOCK TABLES + +DROP TABLE IF EXISTS `admin_role` + +SELECT * FROM +-- This is another comment +MyTable # One final comment +/* This is a block comment +*/ WHERE 1 = 2; + +SELECT -- This is a test + +SELECT Test FROM Test WHERE +( + MyColumn = 1 )) AND ((( SomeOtherColumn = 2); + +SELECT * LIMIT 1; SELECT a,b,c,d FROM e LIMIT 1, 2; SELECT 1,2,3 WHERE a in (1,2,3,4,5) and b=5; + +SELECT count - 50 +WHERE a-50 = b +WHERE 1 and - 50 +WHERE -50 = a +WHERE a = -50 +WHERE 1 /*test*/ - 50 +WHERE 1 and -50; + +SELECT @ and b; + +SELECT @"weird variable name"; + +SELECT "no closing quote diff --git a/vendor/monolog/monolog/.php_cs b/vendor/monolog/monolog/.php_cs new file mode 100644 index 0000000000000000000000000000000000000000..366ccd08b657f3d66a5aeabdb001e761813d1540 --- /dev/null +++ b/vendor/monolog/monolog/.php_cs @@ -0,0 +1,59 @@ + + +For the full copyright and license information, please view the LICENSE +file that was distributed with this source code. +EOF; + +$finder = Symfony\CS\Finder::create() + ->files() + ->name('*.php') + ->exclude('Fixtures') + ->in(__DIR__.'/src') + ->in(__DIR__.'/tests') +; + +return Symfony\CS\Config::create() + ->setUsingCache(true) + //->setUsingLinter(false) + ->setRiskyAllowed(true) + ->setRules(array( + '@PSR2' => true, + 'binary_operator_spaces' => true, + 'blank_line_before_return' => true, + 'header_comment' => array('header' => $header), + 'include' => true, + 'long_array_syntax' => true, + 'method_separation' => true, + 'no_blank_lines_after_class_opening' => true, + 'no_blank_lines_after_phpdoc' => true, + 'no_blank_lines_between_uses' => true, + 'no_duplicate_semicolons' => true, + 'no_extra_consecutive_blank_lines' => true, + 'no_leading_import_slash' => true, + 'no_leading_namespace_whitespace' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_unused_imports' => true, + 'object_operator_without_whitespace' => true, + 'phpdoc_align' => true, + 'phpdoc_indent' => true, + 'phpdoc_no_access' => true, + 'phpdoc_no_package' => true, + 'phpdoc_order' => true, + 'phpdoc_scalar' => true, + 'phpdoc_trim' => true, + 'phpdoc_type_to_var' => true, + 'psr0' => true, + 'single_blank_line_before_namespace' => true, + 'spaces_cast' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'whitespacy_lines' => true, + )) + ->finder($finder) +; diff --git a/vendor/monolog/monolog/CHANGELOG.mdown b/vendor/monolog/monolog/CHANGELOG.mdown new file mode 100644 index 0000000000000000000000000000000000000000..76ea0eadaaa1cf5ffb7c81cd5fef412b82ea6d05 --- /dev/null +++ b/vendor/monolog/monolog/CHANGELOG.mdown @@ -0,0 +1,328 @@ +### 1.22.0 (2016-11-26) + + * Added SlackbotHandler and SlackWebhookHandler to set up Slack integration more easily + * Added MercurialProcessor to add mercurial revision and branch names to log records + * Added support for AWS SDK v3 in DynamoDbHandler + * Fixed fatal errors occuring when normalizing generators that have been fully consumed + * Fixed RollbarHandler to include a level (rollbar level), monolog_level (original name), channel and datetime (unix) + * Fixed RollbarHandler not flushing records automatically, calling close() explicitly is not necessary anymore + * Fixed SyslogUdpHandler to avoid sending empty frames + * Fixed a few PHP 7.0 and 7.1 compatibility issues + +### 1.21.0 (2016-07-29) + + * Break: Reverted the addition of $context when the ErrorHandler handles regular php errors from 1.20.0 as it was causing issues + * Added support for more formats in RotatingFileHandler::setFilenameFormat as long as they have Y, m and d in order + * Added ability to format the main line of text the SlackHandler sends by explictly setting a formatter on the handler + * Added information about SoapFault instances in NormalizerFormatter + * Added $handleOnlyReportedErrors option on ErrorHandler::registerErrorHandler (default true) to allow logging of all errors no matter the error_reporting level + +### 1.20.0 (2016-07-02) + + * Added FingersCrossedHandler::activate() to manually trigger the handler regardless of the activation policy + * Added StreamHandler::getUrl to retrieve the stream's URL + * Added ability to override addRow/addTitle in HtmlFormatter + * Added the $context to context information when the ErrorHandler handles a regular php error + * Deprecated RotatingFileHandler::setFilenameFormat to only support 3 formats: Y, Y-m and Y-m-d + * Fixed WhatFailureGroupHandler to work with PHP7 throwables + * Fixed a few minor bugs + +### 1.19.0 (2016-04-12) + + * Break: StreamHandler will not close streams automatically that it does not own. If you pass in a stream (not a path/url), then it will not close it for you. You can retrieve those using getStream() if needed + * Added DeduplicationHandler to remove duplicate records from notifications across multiple requests, useful for email or other notifications on errors + * Added ability to use `%message%` and other LineFormatter replacements in the subject line of emails sent with NativeMailHandler and SwiftMailerHandler + * Fixed HipChatHandler handling of long messages + +### 1.18.2 (2016-04-02) + + * Fixed ElasticaFormatter to use more precise dates + * Fixed GelfMessageFormatter sending too long messages + +### 1.18.1 (2016-03-13) + + * Fixed SlackHandler bug where slack dropped messages randomly + * Fixed RedisHandler issue when using with the PHPRedis extension + * Fixed AmqpHandler content-type being incorrectly set when using with the AMQP extension + * Fixed BrowserConsoleHandler regression + +### 1.18.0 (2016-03-01) + + * Added optional reduction of timestamp precision via `Logger->useMicrosecondTimestamps(false)`, disabling it gets you a bit of performance boost but reduces the precision to the second instead of microsecond + * Added possibility to skip some extra stack frames in IntrospectionProcessor if you have some library wrapping Monolog that is always adding frames + * Added `Logger->withName` to clone a logger (keeping all handlers) with a new name + * Added FluentdFormatter for the Fluentd unix socket protocol + * Added HandlerWrapper base class to ease the creation of handler wrappers, just extend it and override as needed + * Added support for replacing context sub-keys using `%context.*%` in LineFormatter + * Added support for `payload` context value in RollbarHandler + * Added setRelease to RavenHandler to describe the application version, sent with every log + * Added support for `fingerprint` context value in RavenHandler + * Fixed JSON encoding errors that would gobble up the whole log record, we now handle those more gracefully by dropping chars as needed + * Fixed write timeouts in SocketHandler and derivatives, set to 10sec by default, lower it with `setWritingTimeout()` + * Fixed PHP7 compatibility with regard to Exception/Throwable handling in a few places + +### 1.17.2 (2015-10-14) + + * Fixed ErrorHandler compatibility with non-Monolog PSR-3 loggers + * Fixed SlackHandler handling to use slack functionalities better + * Fixed SwiftMailerHandler bug when sending multiple emails they all had the same id + * Fixed 5.3 compatibility regression + +### 1.17.1 (2015-08-31) + + * Fixed RollbarHandler triggering PHP notices + +### 1.17.0 (2015-08-30) + + * Added support for `checksum` and `release` context/extra values in RavenHandler + * Added better support for exceptions in RollbarHandler + * Added UidProcessor::getUid + * Added support for showing the resource type in NormalizedFormatter + * Fixed IntrospectionProcessor triggering PHP notices + +### 1.16.0 (2015-08-09) + + * Added IFTTTHandler to notify ifttt.com triggers + * Added Logger::setHandlers() to allow setting/replacing all handlers + * Added $capSize in RedisHandler to cap the log size + * Fixed StreamHandler creation of directory to only trigger when the first log write happens + * Fixed bug in the handling of curl failures + * Fixed duplicate logging of fatal errors when both error and fatal error handlers are registered in monolog's ErrorHandler + * Fixed missing fatal errors records with handlers that need to be closed to flush log records + * Fixed TagProcessor::addTags support for associative arrays + +### 1.15.0 (2015-07-12) + + * Added addTags and setTags methods to change a TagProcessor + * Added automatic creation of directories if they are missing for a StreamHandler to open a log file + * Added retry functionality to Loggly, Cube and Mandrill handlers so they retry up to 5 times in case of network failure + * Fixed process exit code being incorrectly reset to 0 if ErrorHandler::registerExceptionHandler was used + * Fixed HTML/JS escaping in BrowserConsoleHandler + * Fixed JSON encoding errors being silently suppressed (PHP 5.5+ only) + +### 1.14.0 (2015-06-19) + + * Added PHPConsoleHandler to send record to Chrome's PHP Console extension and library + * Added support for objects implementing __toString in the NormalizerFormatter + * Added support for HipChat's v2 API in HipChatHandler + * Added Logger::setTimezone() to initialize the timezone monolog should use in case date.timezone isn't correct for your app + * Added an option to send formatted message instead of the raw record on PushoverHandler via ->useFormattedMessage(true) + * Fixed curl errors being silently suppressed + +### 1.13.1 (2015-03-09) + + * Fixed regression in HipChat requiring a new token to be created + +### 1.13.0 (2015-03-05) + + * Added Registry::hasLogger to check for the presence of a logger instance + * Added context.user support to RavenHandler + * Added HipChat API v2 support in the HipChatHandler + * Added NativeMailerHandler::addParameter to pass params to the mail() process + * Added context data to SlackHandler when $includeContextAndExtra is true + * Added ability to customize the Swift_Message per-email in SwiftMailerHandler + * Fixed SwiftMailerHandler to lazily create message instances if a callback is provided + * Fixed serialization of INF and NaN values in Normalizer and LineFormatter + +### 1.12.0 (2014-12-29) + + * Break: HandlerInterface::isHandling now receives a partial record containing only a level key. This was always the intent and does not break any Monolog handler but is strictly speaking a BC break and you should check if you relied on any other field in your own handlers. + * Added PsrHandler to forward records to another PSR-3 logger + * Added SamplingHandler to wrap around a handler and include only every Nth record + * Added MongoDBFormatter to support better storage with MongoDBHandler (it must be enabled manually for now) + * Added exception codes in the output of most formatters + * Added LineFormatter::includeStacktraces to enable exception stack traces in logs (uses more than one line) + * Added $useShortAttachment to SlackHandler to minify attachment size and $includeExtra to append extra data + * Added $host to HipChatHandler for users of private instances + * Added $transactionName to NewRelicHandler and support for a transaction_name context value + * Fixed MandrillHandler to avoid outputing API call responses + * Fixed some non-standard behaviors in SyslogUdpHandler + +### 1.11.0 (2014-09-30) + + * Break: The NewRelicHandler extra and context data are now prefixed with extra_ and context_ to avoid clashes. Watch out if you have scripts reading those from the API and rely on names + * Added WhatFailureGroupHandler to suppress any exception coming from the wrapped handlers and avoid chain failures if a logging service fails + * Added MandrillHandler to send emails via the Mandrillapp.com API + * Added SlackHandler to log records to a Slack.com account + * Added FleepHookHandler to log records to a Fleep.io account + * Added LogglyHandler::addTag to allow adding tags to an existing handler + * Added $ignoreEmptyContextAndExtra to LineFormatter to avoid empty [] at the end + * Added $useLocking to StreamHandler and RotatingFileHandler to enable flock() while writing + * Added support for PhpAmqpLib in the AmqpHandler + * Added FingersCrossedHandler::clear and BufferHandler::clear to reset them between batches in long running jobs + * Added support for adding extra fields from $_SERVER in the WebProcessor + * Fixed support for non-string values in PrsLogMessageProcessor + * Fixed SwiftMailer messages being sent with the wrong date in long running scripts + * Fixed minor PHP 5.6 compatibility issues + * Fixed BufferHandler::close being called twice + +### 1.10.0 (2014-06-04) + + * Added Logger::getHandlers() and Logger::getProcessors() methods + * Added $passthruLevel argument to FingersCrossedHandler to let it always pass some records through even if the trigger level is not reached + * Added support for extra data in NewRelicHandler + * Added $expandNewlines flag to the ErrorLogHandler to create multiple log entries when a message has multiple lines + +### 1.9.1 (2014-04-24) + + * Fixed regression in RotatingFileHandler file permissions + * Fixed initialization of the BufferHandler to make sure it gets flushed after receiving records + * Fixed ChromePHPHandler and FirePHPHandler's activation strategies to be more conservative + +### 1.9.0 (2014-04-20) + + * Added LogEntriesHandler to send logs to a LogEntries account + * Added $filePermissions to tweak file mode on StreamHandler and RotatingFileHandler + * Added $useFormatting flag to MemoryProcessor to make it send raw data in bytes + * Added support for table formatting in FirePHPHandler via the table context key + * Added a TagProcessor to add tags to records, and support for tags in RavenHandler + * Added $appendNewline flag to the JsonFormatter to enable using it when logging to files + * Added sound support to the PushoverHandler + * Fixed multi-threading support in StreamHandler + * Fixed empty headers issue when ChromePHPHandler received no records + * Fixed default format of the ErrorLogHandler + +### 1.8.0 (2014-03-23) + + * Break: the LineFormatter now strips newlines by default because this was a bug, set $allowInlineLineBreaks to true if you need them + * Added BrowserConsoleHandler to send logs to any browser's console via console.log() injection in the output + * Added FilterHandler to filter records and only allow those of a given list of levels through to the wrapped handler + * Added FlowdockHandler to send logs to a Flowdock account + * Added RollbarHandler to send logs to a Rollbar account + * Added HtmlFormatter to send prettier log emails with colors for each log level + * Added GitProcessor to add the current branch/commit to extra record data + * Added a Monolog\Registry class to allow easier global access to pre-configured loggers + * Added support for the new official graylog2/gelf-php lib for GelfHandler, upgrade if you can by replacing the mlehner/gelf-php requirement + * Added support for HHVM + * Added support for Loggly batch uploads + * Added support for tweaking the content type and encoding in NativeMailerHandler + * Added $skipClassesPartials to tweak the ignored classes in the IntrospectionProcessor + * Fixed batch request support in GelfHandler + +### 1.7.0 (2013-11-14) + + * Added ElasticSearchHandler to send logs to an Elastic Search server + * Added DynamoDbHandler and ScalarFormatter to send logs to Amazon's Dynamo DB + * Added SyslogUdpHandler to send logs to a remote syslogd server + * Added LogglyHandler to send logs to a Loggly account + * Added $level to IntrospectionProcessor so it only adds backtraces when needed + * Added $version to LogstashFormatter to allow using the new v1 Logstash format + * Added $appName to NewRelicHandler + * Added configuration of Pushover notification retries/expiry + * Added $maxColumnWidth to NativeMailerHandler to change the 70 chars default + * Added chainability to most setters for all handlers + * Fixed RavenHandler batch processing so it takes the message from the record with highest priority + * Fixed HipChatHandler batch processing so it sends all messages at once + * Fixed issues with eAccelerator + * Fixed and improved many small things + +### 1.6.0 (2013-07-29) + + * Added HipChatHandler to send logs to a HipChat chat room + * Added ErrorLogHandler to send logs to PHP's error_log function + * Added NewRelicHandler to send logs to NewRelic's service + * Added Monolog\ErrorHandler helper class to register a Logger as exception/error/fatal handler + * Added ChannelLevelActivationStrategy for the FingersCrossedHandler to customize levels by channel + * Added stack traces output when normalizing exceptions (json output & co) + * Added Monolog\Logger::API constant (currently 1) + * Added support for ChromePHP's v4.0 extension + * Added support for message priorities in PushoverHandler, see $highPriorityLevel and $emergencyLevel + * Added support for sending messages to multiple users at once with the PushoverHandler + * Fixed RavenHandler's support for batch sending of messages (when behind a Buffer or FingersCrossedHandler) + * Fixed normalization of Traversables with very large data sets, only the first 1000 items are shown now + * Fixed issue in RotatingFileHandler when an open_basedir restriction is active + * Fixed minor issues in RavenHandler and bumped the API to Raven 0.5.0 + * Fixed SyslogHandler issue when many were used concurrently with different facilities + +### 1.5.0 (2013-04-23) + + * Added ProcessIdProcessor to inject the PID in log records + * Added UidProcessor to inject a unique identifier to all log records of one request/run + * Added support for previous exceptions in the LineFormatter exception serialization + * Added Monolog\Logger::getLevels() to get all available levels + * Fixed ChromePHPHandler so it avoids sending headers larger than Chrome can handle + +### 1.4.1 (2013-04-01) + + * Fixed exception formatting in the LineFormatter to be more minimalistic + * Fixed RavenHandler's handling of context/extra data, requires Raven client >0.1.0 + * Fixed log rotation in RotatingFileHandler to work with long running scripts spanning multiple days + * Fixed WebProcessor array access so it checks for data presence + * Fixed Buffer, Group and FingersCrossed handlers to make use of their processors + +### 1.4.0 (2013-02-13) + + * Added RedisHandler to log to Redis via the Predis library or the phpredis extension + * Added ZendMonitorHandler to log to the Zend Server monitor + * Added the possibility to pass arrays of handlers and processors directly in the Logger constructor + * Added `$useSSL` option to the PushoverHandler which is enabled by default + * Fixed ChromePHPHandler and FirePHPHandler issue when multiple instances are used simultaneously + * Fixed header injection capability in the NativeMailHandler + +### 1.3.1 (2013-01-11) + + * Fixed LogstashFormatter to be usable with stream handlers + * Fixed GelfMessageFormatter levels on Windows + +### 1.3.0 (2013-01-08) + + * Added PSR-3 compliance, the `Monolog\Logger` class is now an instance of `Psr\Log\LoggerInterface` + * Added PsrLogMessageProcessor that you can selectively enable for full PSR-3 compliance + * Added LogstashFormatter (combine with SocketHandler or StreamHandler to send logs to Logstash) + * Added PushoverHandler to send mobile notifications + * Added CouchDBHandler and DoctrineCouchDBHandler + * Added RavenHandler to send data to Sentry servers + * Added support for the new MongoClient class in MongoDBHandler + * Added microsecond precision to log records' timestamps + * Added `$flushOnOverflow` param to BufferHandler to flush by batches instead of losing + the oldest entries + * Fixed normalization of objects with cyclic references + +### 1.2.1 (2012-08-29) + + * Added new $logopts arg to SyslogHandler to provide custom openlog options + * Fixed fatal error in SyslogHandler + +### 1.2.0 (2012-08-18) + + * Added AmqpHandler (for use with AMQP servers) + * Added CubeHandler + * Added NativeMailerHandler::addHeader() to send custom headers in mails + * Added the possibility to specify more than one recipient in NativeMailerHandler + * Added the possibility to specify float timeouts in SocketHandler + * Added NOTICE and EMERGENCY levels to conform with RFC 5424 + * Fixed the log records to use the php default timezone instead of UTC + * Fixed BufferHandler not being flushed properly on PHP fatal errors + * Fixed normalization of exotic resource types + * Fixed the default format of the SyslogHandler to avoid duplicating datetimes in syslog + +### 1.1.0 (2012-04-23) + + * Added Monolog\Logger::isHandling() to check if a handler will + handle the given log level + * Added ChromePHPHandler + * Added MongoDBHandler + * Added GelfHandler (for use with Graylog2 servers) + * Added SocketHandler (for use with syslog-ng for example) + * Added NormalizerFormatter + * Added the possibility to change the activation strategy of the FingersCrossedHandler + * Added possibility to show microseconds in logs + * Added `server` and `referer` to WebProcessor output + +### 1.0.2 (2011-10-24) + + * Fixed bug in IE with large response headers and FirePHPHandler + +### 1.0.1 (2011-08-25) + + * Added MemoryPeakUsageProcessor and MemoryUsageProcessor + * Added Monolog\Logger::getName() to get a logger's channel name + +### 1.0.0 (2011-07-06) + + * Added IntrospectionProcessor to get info from where the logger was called + * Fixed WebProcessor in CLI + +### 1.0.0-RC1 (2011-07-01) + + * Initial release diff --git a/vendor/monolog/monolog/LICENSE b/vendor/monolog/monolog/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..16473219bfcb9d27a4f2622340b15d652d68730c --- /dev/null +++ b/vendor/monolog/monolog/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011-2016 Jordi Boggiano + +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/vendor/monolog/monolog/README.mdown b/vendor/monolog/monolog/README.mdown new file mode 100644 index 0000000000000000000000000000000000000000..7d8ade5268dc6c4ef3bee2f8612a0b839845bdcb --- /dev/null +++ b/vendor/monolog/monolog/README.mdown @@ -0,0 +1,95 @@ +# Monolog - Logging for PHP [![Build Status](https://img.shields.io/travis/Seldaek/monolog.svg)](https://travis-ci.org/Seldaek/monolog) + +[![Total Downloads](https://img.shields.io/packagist/dt/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog) +[![Latest Stable Version](https://img.shields.io/packagist/v/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog) +[![Reference Status](https://www.versioneye.com/php/monolog:monolog/reference_badge.svg)](https://www.versioneye.com/php/monolog:monolog/references) + + +Monolog sends your logs to files, sockets, inboxes, databases and various +web services. See the complete list of handlers below. Special handlers +allow you to build advanced logging strategies. + +This library implements the [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) +interface that you can type-hint against in your own libraries to keep +a maximum of interoperability. You can also use it in your applications to +make sure you can always use another compatible logger at a later time. +As of 1.11.0 Monolog public APIs will also accept PSR-3 log levels. +Internally Monolog still uses its own level scheme since it predates PSR-3. + +## Installation + +Install the latest version with + +```bash +$ composer require monolog/monolog +``` + +## Basic Usage + +```php +pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING)); + +// add records to the log +$log->addWarning('Foo'); +$log->addError('Bar'); +``` + +## Documentation + +- [Usage Instructions](doc/01-usage.md) +- [Handlers, Formatters and Processors](doc/02-handlers-formatters-processors.md) +- [Utility classes](doc/03-utilities.md) +- [Extending Monolog](doc/04-extending.md) + +## Third Party Packages + +Third party handlers, formatters and processors are +[listed in the wiki](https://github.com/Seldaek/monolog/wiki/Third-Party-Packages). You +can also add your own there if you publish one. + +## About + +### Requirements + +- Monolog works with PHP 5.3 or above, and is also tested to work with HHVM. + +### Submitting bugs and feature requests + +Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues) + +### Framework Integrations + +- Frameworks and libraries using [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) + can be used very easily with Monolog since it implements the interface. +- [Symfony2](http://symfony.com) comes out of the box with Monolog. +- [Silex](http://silex.sensiolabs.org/) comes out of the box with Monolog. +- [Laravel 4 & 5](http://laravel.com/) come out of the box with Monolog. +- [Lumen](http://lumen.laravel.com/) comes out of the box with Monolog. +- [PPI](http://www.ppi.io/) comes out of the box with Monolog. +- [CakePHP](http://cakephp.org/) is usable with Monolog via the [cakephp-monolog](https://github.com/jadb/cakephp-monolog) plugin. +- [Slim](http://www.slimframework.com/) is usable with Monolog via the [Slim-Monolog](https://github.com/Flynsarmy/Slim-Monolog) log writer. +- [XOOPS 2.6](http://xoops.org/) comes out of the box with Monolog. +- [Aura.Web_Project](https://github.com/auraphp/Aura.Web_Project) comes out of the box with Monolog. +- [Nette Framework](http://nette.org/en/) can be used with Monolog via [Kdyby/Monolog](https://github.com/Kdyby/Monolog) extension. +- [Proton Micro Framework](https://github.com/alexbilbie/Proton) comes out of the box with Monolog. + +### Author + +Jordi Boggiano - -
    +See also the list of [contributors](https://github.com/Seldaek/monolog/contributors) which participated in this project. + +### License + +Monolog is licensed under the MIT License - see the `LICENSE` file for details + +### Acknowledgements + +This library is heavily inspired by Python's [Logbook](http://packages.python.org/Logbook/) +library, although most concepts have been adjusted to fit to the PHP world. diff --git a/vendor/monolog/monolog/composer.json b/vendor/monolog/monolog/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..f74b7b97f3f7474143b175d2492db20928b83920 --- /dev/null +++ b/vendor/monolog/monolog/composer.json @@ -0,0 +1,66 @@ +{ + "name": "monolog/monolog", + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "keywords": ["log", "logging", "psr-3"], + "homepage": "http://github.com/Seldaek/monolog", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.5", + "graylog2/gelf-php": "~1.0", + "sentry/sentry": "^0.13", + "ruflin/elastica": ">=0.90 <3.0", + "doctrine/couchdb": "~1.0@dev", + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "php-amqplib/php-amqplib": "~2.4", + "swiftmailer/swiftmailer": "~5.3", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit-mock-objects": "2.3.0", + "jakub-onderka/php-parallel-lint": "0.9" + }, + "_": "phpunit/phpunit-mock-objects required in 2.3.0 due to https://github.com/sebastianbergmann/phpunit-mock-objects/issues/223 - needs hhvm 3.8+ on travis", + "suggest": { + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "sentry/sentry": "Allow sending log messages to a Sentry server", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "php-console/php-console": "Allow sending log messages to Google Chrome" + }, + "autoload": { + "psr-4": {"Monolog\\": "src/Monolog"} + }, + "autoload-dev": { + "psr-4": {"Monolog\\": "tests/Monolog"} + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "scripts": { + "test": [ + "parallel-lint . --exclude vendor", + "phpunit" + ] + } +} diff --git a/vendor/monolog/monolog/doc/01-usage.md b/vendor/monolog/monolog/doc/01-usage.md new file mode 100644 index 0000000000000000000000000000000000000000..8e2551f38db248bf418d915aa3802fe2f5ebad16 --- /dev/null +++ b/vendor/monolog/monolog/doc/01-usage.md @@ -0,0 +1,231 @@ +# Using Monolog + +- [Installation](#installation) +- [Core Concepts](#core-concepts) +- [Log Levels](#log-levels) +- [Configuring a logger](#configuring-a-logger) +- [Adding extra data in the records](#adding-extra-data-in-the-records) +- [Leveraging channels](#leveraging-channels) +- [Customizing the log format](#customizing-the-log-format) + +## Installation + +Monolog is available on Packagist ([monolog/monolog](http://packagist.org/packages/monolog/monolog)) +and as such installable via [Composer](http://getcomposer.org/). + +```bash +composer require monolog/monolog +``` + +If you do not use Composer, you can grab the code from GitHub, and use any +PSR-0 compatible autoloader (e.g. the [Symfony2 ClassLoader component](https://github.com/symfony/ClassLoader)) +to load Monolog classes. + +## Core Concepts + +Every `Logger` instance has a channel (name) and a stack of handlers. Whenever +you add a record to the logger, it traverses the handler stack. Each handler +decides whether it fully handled the record, and if so, the propagation of the +record ends there. + +This allows for flexible logging setups, for example having a `StreamHandler` at +the bottom of the stack that will log anything to disk, and on top of that add +a `MailHandler` that will send emails only when an error message is logged. +Handlers also have a `$bubble` property which defines whether they block the +record or not if they handled it. In this example, setting the `MailHandler`'s +`$bubble` argument to false means that records handled by the `MailHandler` will +not propagate to the `StreamHandler` anymore. + +You can create many `Logger`s, each defining a channel (e.g.: db, request, +router, ..) and each of them combining various handlers, which can be shared +or not. The channel is reflected in the logs and allows you to easily see or +filter records. + +Each Handler also has a Formatter, a default one with settings that make sense +will be created if you don't set one. The formatters normalize and format +incoming records so that they can be used by the handlers to output useful +information. + +Custom severity levels are not available. Only the eight +[RFC 5424](http://tools.ietf.org/html/rfc5424) levels (debug, info, notice, +warning, error, critical, alert, emergency) are present for basic filtering +purposes, but for sorting and other use cases that would require +flexibility, you should add Processors to the Logger that can add extra +information (tags, user ip, ..) to the records before they are handled. + +## Log Levels + +Monolog supports the logging levels described by [RFC 5424](http://tools.ietf.org/html/rfc5424). + +- **DEBUG** (100): Detailed debug information. + +- **INFO** (200): Interesting events. Examples: User logs in, SQL logs. + +- **NOTICE** (250): Normal but significant events. + +- **WARNING** (300): Exceptional occurrences that are not errors. Examples: + Use of deprecated APIs, poor use of an API, undesirable things that are not + necessarily wrong. + +- **ERROR** (400): Runtime errors that do not require immediate action but + should typically be logged and monitored. + +- **CRITICAL** (500): Critical conditions. Example: Application component + unavailable, unexpected exception. + +- **ALERT** (550): Action must be taken immediately. Example: Entire website + down, database unavailable, etc. This should trigger the SMS alerts and wake + you up. + +- **EMERGENCY** (600): Emergency: system is unusable. + +## Configuring a logger + +Here is a basic setup to log to a file and to firephp on the DEBUG level: + +```php +pushHandler(new StreamHandler(__DIR__.'/my_app.log', Logger::DEBUG)); +$logger->pushHandler(new FirePHPHandler()); + +// You can now use your logger +$logger->addInfo('My logger is now ready'); +``` + +Let's explain it. The first step is to create the logger instance which will +be used in your code. The argument is a channel name, which is useful when +you use several loggers (see below for more details about it). + +The logger itself does not know how to handle a record. It delegates it to +some handlers. The code above registers two handlers in the stack to allow +handling records in two different ways. + +Note that the FirePHPHandler is called first as it is added on top of the +stack. This allows you to temporarily add a logger with bubbling disabled if +you want to override other configured loggers. + +> If you use Monolog standalone and are looking for an easy way to +> configure many handlers, the [theorchard/monolog-cascade](https://github.com/theorchard/monolog-cascade) +> can help you build complex logging configs via PHP arrays, yaml or json configs. + +## Adding extra data in the records + +Monolog provides two different ways to add extra informations along the simple +textual message. + +### Using the logging context + +The first way is the context, allowing to pass an array of data along the +record: + +```php +addInfo('Adding a new user', array('username' => 'Seldaek')); +``` + +Simple handlers (like the StreamHandler for instance) will simply format +the array to a string but richer handlers can take advantage of the context +(FirePHP is able to display arrays in pretty way for instance). + +### Using processors + +The second way is to add extra data for all records by using a processor. +Processors can be any callable. They will get the record as parameter and +must return it after having eventually changed the `extra` part of it. Let's +write a processor adding some dummy data in the record: + +```php +pushProcessor(function ($record) { + $record['extra']['dummy'] = 'Hello world!'; + + return $record; +}); +``` + +Monolog provides some built-in processors that can be used in your project. +Look at the [dedicated chapter](https://github.com/Seldaek/monolog/blob/master/doc/02-handlers-formatters-processors.md#processors) for the list. + +> Tip: processors can also be registered on a specific handler instead of + the logger to apply only for this handler. + +## Leveraging channels + +Channels are a great way to identify to which part of the application a record +is related. This is useful in big applications (and is leveraged by +MonologBundle in Symfony2). + +Picture two loggers sharing a handler that writes to a single log file. +Channels would allow you to identify the logger that issued every record. +You can easily grep through the log files filtering this or that channel. + +```php +pushHandler($stream); +$logger->pushHandler($firephp); + +// Create a logger for the security-related stuff with a different channel +$securityLogger = new Logger('security'); +$securityLogger->pushHandler($stream); +$securityLogger->pushHandler($firephp); + +// Or clone the first one to only change the channel +$securityLogger = $logger->withName('security'); +``` + +## Customizing the log format + +In Monolog it's easy to customize the format of the logs written into files, +sockets, mails, databases and other handlers. Most of the handlers use the + +```php +$record['formatted'] +``` + +value to be automatically put into the log device. This value depends on the +formatter settings. You can choose between predefined formatter classes or +write your own (e.g. a multiline text file for human-readable output). + +To configure a predefined formatter class, just set it as the handler's field: + +```php +// the default date format is "Y-m-d H:i:s" +$dateFormat = "Y n j, g:i a"; +// the default output format is "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n" +$output = "%datetime% > %level_name% > %message% %context% %extra%\n"; +// finally, create a formatter +$formatter = new LineFormatter($output, $dateFormat); + +// Create a handler +$stream = new StreamHandler(__DIR__.'/my_app.log', Logger::DEBUG); +$stream->setFormatter($formatter); +// bind it to a logger object +$securityLogger = new Logger('security'); +$securityLogger->pushHandler($stream); +``` + +You may also reuse the same formatter between multiple handlers and share those +handlers between multiple loggers. + +[Handlers, Formatters and Processors](02-handlers-formatters-processors.md) → diff --git a/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md b/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md new file mode 100644 index 0000000000000000000000000000000000000000..bea968ace8b43be5566b511dfa32e04757d39a65 --- /dev/null +++ b/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md @@ -0,0 +1,157 @@ +# Handlers, Formatters and Processors + +- [Handlers](#handlers) + - [Log to files and syslog](#log-to-files-and-syslog) + - [Send alerts and emails](#send-alerts-and-emails) + - [Log specific servers and networked logging](#log-specific-servers-and-networked-logging) + - [Logging in development](#logging-in-development) + - [Log to databases](#log-to-databases) + - [Wrappers / Special Handlers](#wrappers--special-handlers) +- [Formatters](#formatters) +- [Processors](#processors) +- [Third Party Packages](#third-party-packages) + +## Handlers + +### Log to files and syslog + +- _StreamHandler_: Logs records into any PHP stream, use this for log files. +- _RotatingFileHandler_: Logs records to a file and creates one logfile per day. + It will also delete files older than `$maxFiles`. You should use + [logrotate](http://linuxcommand.org/man_pages/logrotate8.html) for high profile + setups though, this is just meant as a quick and dirty solution. +- _SyslogHandler_: Logs records to the syslog. +- _ErrorLogHandler_: Logs records to PHP's + [`error_log()`](http://docs.php.net/manual/en/function.error-log.php) function. + +### Send alerts and emails + +- _NativeMailerHandler_: Sends emails using PHP's + [`mail()`](http://php.net/manual/en/function.mail.php) function. +- _SwiftMailerHandler_: Sends emails using a [`Swift_Mailer`](http://swiftmailer.org/) instance. +- _PushoverHandler_: Sends mobile notifications via the [Pushover](https://www.pushover.net/) API. +- _HipChatHandler_: Logs records to a [HipChat](http://hipchat.com) chat room using its API. +- _FlowdockHandler_: Logs records to a [Flowdock](https://www.flowdock.com/) account. +- _SlackHandler_: Logs records to a [Slack](https://www.slack.com/) account using the Slack API. +- _SlackbotHandler_: Logs records to a [Slack](https://www.slack.com/) account using the Slackbot incoming hook. +- _SlackWebhookHandler_: Logs records to a [Slack](https://www.slack.com/) account using Slack Webhooks. +- _MandrillHandler_: Sends emails via the Mandrill API using a [`Swift_Message`](http://swiftmailer.org/) instance. +- _FleepHookHandler_: Logs records to a [Fleep](https://fleep.io/) conversation using Webhooks. +- _IFTTTHandler_: Notifies an [IFTTT](https://ifttt.com/maker) trigger with the log channel, level name and message. + +### Log specific servers and networked logging + +- _SocketHandler_: Logs records to [sockets](http://php.net/fsockopen), use this + for UNIX and TCP sockets. See an [example](sockets.md). +- _AmqpHandler_: Logs records to an [amqp](http://www.amqp.org/) compatible + server. Requires the [php-amqp](http://pecl.php.net/package/amqp) extension (1.0+). +- _GelfHandler_: Logs records to a [Graylog2](http://www.graylog2.org) server. +- _CubeHandler_: Logs records to a [Cube](http://square.github.com/cube/) server. +- _RavenHandler_: Logs records to a [Sentry](http://getsentry.com/) server using + [raven](https://packagist.org/packages/raven/raven). +- _ZendMonitorHandler_: Logs records to the Zend Monitor present in Zend Server. +- _NewRelicHandler_: Logs records to a [NewRelic](http://newrelic.com/) application. +- _LogglyHandler_: Logs records to a [Loggly](http://www.loggly.com/) account. +- _RollbarHandler_: Logs records to a [Rollbar](https://rollbar.com/) account. +- _SyslogUdpHandler_: Logs records to a remote [Syslogd](http://www.rsyslog.com/) server. +- _LogEntriesHandler_: Logs records to a [LogEntries](http://logentries.com/) account. + +### Logging in development + +- _FirePHPHandler_: Handler for [FirePHP](http://www.firephp.org/), providing + inline `console` messages within [FireBug](http://getfirebug.com/). +- _ChromePHPHandler_: Handler for [ChromePHP](http://www.chromephp.com/), providing + inline `console` messages within Chrome. +- _BrowserConsoleHandler_: Handler to send logs to browser's Javascript `console` with + no browser extension required. Most browsers supporting `console` API are supported. +- _PHPConsoleHandler_: Handler for [PHP Console](https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef), providing + inline `console` and notification popup messages within Chrome. + +### Log to databases + +- _RedisHandler_: Logs records to a [redis](http://redis.io) server. +- _MongoDBHandler_: Handler to write records in MongoDB via a + [Mongo](http://pecl.php.net/package/mongo) extension connection. +- _CouchDBHandler_: Logs records to a CouchDB server. +- _DoctrineCouchDBHandler_: Logs records to a CouchDB server via the Doctrine CouchDB ODM. +- _ElasticSearchHandler_: Logs records to an Elastic Search server. +- _DynamoDbHandler_: Logs records to a DynamoDB table with the [AWS SDK](https://github.com/aws/aws-sdk-php). + +### Wrappers / Special Handlers + +- _FingersCrossedHandler_: A very interesting wrapper. It takes a logger as + parameter and will accumulate log records of all levels until a record + exceeds the defined severity level. At which point it delivers all records, + including those of lower severity, to the handler it wraps. This means that + until an error actually happens you will not see anything in your logs, but + when it happens you will have the full information, including debug and info + records. This provides you with all the information you need, but only when + you need it. +- _DeduplicationHandler_: Useful if you are sending notifications or emails + when critical errors occur. It takes a logger as parameter and will + accumulate log records of all levels until the end of the request (or + `flush()` is called). At that point it delivers all records to the handler + it wraps, but only if the records are unique over a given time period + (60seconds by default). If the records are duplicates they are simply + discarded. The main use of this is in case of critical failure like if your + database is unreachable for example all your requests will fail and that + can result in a lot of notifications being sent. Adding this handler reduces + the amount of notifications to a manageable level. +- _WhatFailureGroupHandler_: This handler extends the _GroupHandler_ ignoring + exceptions raised by each child handler. This allows you to ignore issues + where a remote tcp connection may have died but you do not want your entire + application to crash and may wish to continue to log to other handlers. +- _BufferHandler_: This handler will buffer all the log records it receives + until `close()` is called at which point it will call `handleBatch()` on the + handler it wraps with all the log messages at once. This is very useful to + send an email with all records at once for example instead of having one mail + for every log record. +- _GroupHandler_: This handler groups other handlers. Every record received is + sent to all the handlers it is configured with. +- _FilterHandler_: This handler only lets records of the given levels through + to the wrapped handler. +- _SamplingHandler_: Wraps around another handler and lets you sample records + if you only want to store some of them. +- _NullHandler_: Any record it can handle will be thrown away. This can be used + to put on top of an existing handler stack to disable it temporarily. +- _PsrHandler_: Can be used to forward log records to an existing PSR-3 logger +- _TestHandler_: Used for testing, it records everything that is sent to it and + has accessors to read out the information. +- _HandlerWrapper_: A simple handler wrapper you can inherit from to create + your own wrappers easily. + +## Formatters + +- _LineFormatter_: Formats a log record into a one-line string. +- _HtmlFormatter_: Used to format log records into a human readable html table, mainly suitable for emails. +- _NormalizerFormatter_: Normalizes objects/resources down to strings so a record can easily be serialized/encoded. +- _ScalarFormatter_: Used to format log records into an associative array of scalar values. +- _JsonFormatter_: Encodes a log record into json. +- _WildfireFormatter_: Used to format log records into the Wildfire/FirePHP protocol, only useful for the FirePHPHandler. +- _ChromePHPFormatter_: Used to format log records into the ChromePHP format, only useful for the ChromePHPHandler. +- _GelfMessageFormatter_: Used to format log records into Gelf message instances, only useful for the GelfHandler. +- _LogstashFormatter_: Used to format log records into [logstash](http://logstash.net/) event json, useful for any handler listed under inputs [here](http://logstash.net/docs/latest). +- _ElasticaFormatter_: Used to format log records into an Elastica\Document object, only useful for the ElasticSearchHandler. +- _LogglyFormatter_: Used to format log records into Loggly messages, only useful for the LogglyHandler. +- _FlowdockFormatter_: Used to format log records into Flowdock messages, only useful for the FlowdockHandler. +- _MongoDBFormatter_: Converts \DateTime instances to \MongoDate and objects recursively to arrays, only useful with the MongoDBHandler. + +## Processors + +- _PsrLogMessageProcessor_: Processes a log record's message according to PSR-3 rules, replacing `{foo}` with the value from `$context['foo']`. +- _IntrospectionProcessor_: Adds the line/file/class/method from which the log call originated. +- _WebProcessor_: Adds the current request URI, request method and client IP to a log record. +- _MemoryUsageProcessor_: Adds the current memory usage to a log record. +- _MemoryPeakUsageProcessor_: Adds the peak memory usage to a log record. +- _ProcessIdProcessor_: Adds the process id to a log record. +- _UidProcessor_: Adds a unique identifier to a log record. +- _GitProcessor_: Adds the current git branch and commit to a log record. +- _TagProcessor_: Adds an array of predefined tags to a log record. + +## Third Party Packages + +Third party handlers, formatters and processors are +[listed in the wiki](https://github.com/Seldaek/monolog/wiki/Third-Party-Packages). You +can also add your own there if you publish one. + +← [Usage](01-usage.md) | [Utility classes](03-utilities.md) → diff --git a/vendor/monolog/monolog/doc/03-utilities.md b/vendor/monolog/monolog/doc/03-utilities.md new file mode 100644 index 0000000000000000000000000000000000000000..c62aa41611dbc7a0c9fecc423723dd3c88640ccb --- /dev/null +++ b/vendor/monolog/monolog/doc/03-utilities.md @@ -0,0 +1,13 @@ +# Utilities + +- _Registry_: The `Monolog\Registry` class lets you configure global loggers that you + can then statically access from anywhere. It is not really a best practice but can + help in some older codebases or for ease of use. +- _ErrorHandler_: The `Monolog\ErrorHandler` class allows you to easily register + a Logger instance as an exception handler, error handler or fatal error handler. +- _ErrorLevelActivationStrategy_: Activates a FingersCrossedHandler when a certain log + level is reached. +- _ChannelLevelActivationStrategy_: Activates a FingersCrossedHandler when a certain + log level is reached, depending on which channel received the log record. + +← [Handlers, Formatters and Processors](02-handlers-formatters-processors.md) | [Extending Monolog](04-extending.md) → diff --git a/vendor/monolog/monolog/doc/04-extending.md b/vendor/monolog/monolog/doc/04-extending.md new file mode 100644 index 0000000000000000000000000000000000000000..ebd9104db6c82c55ea3593ffd5e34ad06529f5e0 --- /dev/null +++ b/vendor/monolog/monolog/doc/04-extending.md @@ -0,0 +1,76 @@ +# Extending Monolog + +Monolog is fully extensible, allowing you to adapt your logger to your needs. + +## Writing your own handler + +Monolog provides many built-in handlers. But if the one you need does not +exist, you can write it and use it in your logger. The only requirement is +to implement `Monolog\Handler\HandlerInterface`. + +Let's write a PDOHandler to log records to a database. We will extend the +abstract class provided by Monolog to keep things DRY. + +```php +pdo = $pdo; + parent::__construct($level, $bubble); + } + + protected function write(array $record) + { + if (!$this->initialized) { + $this->initialize(); + } + + $this->statement->execute(array( + 'channel' => $record['channel'], + 'level' => $record['level'], + 'message' => $record['formatted'], + 'time' => $record['datetime']->format('U'), + )); + } + + private function initialize() + { + $this->pdo->exec( + 'CREATE TABLE IF NOT EXISTS monolog ' + .'(channel VARCHAR(255), level INTEGER, message LONGTEXT, time INTEGER UNSIGNED)' + ); + $this->statement = $this->pdo->prepare( + 'INSERT INTO monolog (channel, level, message, time) VALUES (:channel, :level, :message, :time)' + ); + + $this->initialized = true; + } +} +``` + +You can now use this handler in your logger: + +```php +pushHandler(new PDOHandler(new PDO('sqlite:logs.sqlite'))); + +// You can now use your logger +$logger->addInfo('My logger is now ready'); +``` + +The `Monolog\Handler\AbstractProcessingHandler` class provides most of the +logic needed for the handler, including the use of processors and the formatting +of the record (which is why we use ``$record['formatted']`` instead of ``$record['message']``). + +← [Utility classes](03-utilities.md) diff --git a/vendor/monolog/monolog/doc/sockets.md b/vendor/monolog/monolog/doc/sockets.md new file mode 100644 index 0000000000000000000000000000000000000000..ea9cf0ea76f184248bf6515658cb99fb5778fdd8 --- /dev/null +++ b/vendor/monolog/monolog/doc/sockets.md @@ -0,0 +1,39 @@ +Sockets Handler +=============== + +This handler allows you to write your logs to sockets using [fsockopen](http://php.net/fsockopen) +or [pfsockopen](http://php.net/pfsockopen). + +Persistent sockets are mainly useful in web environments where you gain some performance not closing/opening +the connections between requests. + +You can use a `unix://` prefix to access unix sockets and `udp://` to open UDP sockets instead of the default TCP. + +Basic Example +------------- + +```php +setPersistent(true); + +// Now add the handler +$logger->pushHandler($handler, Logger::DEBUG); + +// You can now use your logger +$logger->addInfo('My logger is now ready'); + +``` + +In this example, using syslog-ng, you should see the log on the log server: + + cweb1 [2012-02-26 00:12:03] my_logger.INFO: My logger is now ready [] [] + diff --git a/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..0152298d19641a0dec0787f5be3b5fdd5cfd03d2 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php @@ -0,0 +1,227 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Psr\Log\LoggerInterface; +use Psr\Log\LogLevel; +use Monolog\Handler\AbstractHandler; + +/** + * Monolog error handler + * + * A facility to enable logging of runtime errors, exceptions and fatal errors. + * + * Quick setup: ErrorHandler::register($logger); + * + * @author Jordi Boggiano + */ +class ErrorHandler +{ + private $logger; + + private $previousExceptionHandler; + private $uncaughtExceptionLevel; + + private $previousErrorHandler; + private $errorLevelMap; + private $handleOnlyReportedErrors; + + private $hasFatalErrorHandler; + private $fatalLevel; + private $reservedMemory; + private static $fatalErrors = array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR); + + public function __construct(LoggerInterface $logger) + { + $this->logger = $logger; + } + + /** + * Registers a new ErrorHandler for a given Logger + * + * By default it will handle errors, exceptions and fatal errors + * + * @param LoggerInterface $logger + * @param array|false $errorLevelMap an array of E_* constant to LogLevel::* constant mapping, or false to disable error handling + * @param int|false $exceptionLevel a LogLevel::* constant, or false to disable exception handling + * @param int|false $fatalLevel a LogLevel::* constant, or false to disable fatal error handling + * @return ErrorHandler + */ + public static function register(LoggerInterface $logger, $errorLevelMap = array(), $exceptionLevel = null, $fatalLevel = null) + { + $handler = new static($logger); + if ($errorLevelMap !== false) { + $handler->registerErrorHandler($errorLevelMap); + } + if ($exceptionLevel !== false) { + $handler->registerExceptionHandler($exceptionLevel); + } + if ($fatalLevel !== false) { + $handler->registerFatalHandler($fatalLevel); + } + + return $handler; + } + + public function registerExceptionHandler($level = null, $callPrevious = true) + { + $prev = set_exception_handler(array($this, 'handleException')); + $this->uncaughtExceptionLevel = $level; + if ($callPrevious && $prev) { + $this->previousExceptionHandler = $prev; + } + } + + public function registerErrorHandler(array $levelMap = array(), $callPrevious = true, $errorTypes = -1, $handleOnlyReportedErrors = true) + { + $prev = set_error_handler(array($this, 'handleError'), $errorTypes); + $this->errorLevelMap = array_replace($this->defaultErrorLevelMap(), $levelMap); + if ($callPrevious) { + $this->previousErrorHandler = $prev ?: true; + } + + $this->handleOnlyReportedErrors = $handleOnlyReportedErrors; + } + + public function registerFatalHandler($level = null, $reservedMemorySize = 20) + { + register_shutdown_function(array($this, 'handleFatalError')); + + $this->reservedMemory = str_repeat(' ', 1024 * $reservedMemorySize); + $this->fatalLevel = $level; + $this->hasFatalErrorHandler = true; + } + + protected function defaultErrorLevelMap() + { + return array( + E_ERROR => LogLevel::CRITICAL, + E_WARNING => LogLevel::WARNING, + E_PARSE => LogLevel::ALERT, + E_NOTICE => LogLevel::NOTICE, + E_CORE_ERROR => LogLevel::CRITICAL, + E_CORE_WARNING => LogLevel::WARNING, + E_COMPILE_ERROR => LogLevel::ALERT, + E_COMPILE_WARNING => LogLevel::WARNING, + E_USER_ERROR => LogLevel::ERROR, + E_USER_WARNING => LogLevel::WARNING, + E_USER_NOTICE => LogLevel::NOTICE, + E_STRICT => LogLevel::NOTICE, + E_RECOVERABLE_ERROR => LogLevel::ERROR, + E_DEPRECATED => LogLevel::NOTICE, + E_USER_DEPRECATED => LogLevel::NOTICE, + ); + } + + /** + * @private + */ + public function handleException($e) + { + $this->logger->log( + $this->uncaughtExceptionLevel === null ? LogLevel::ERROR : $this->uncaughtExceptionLevel, + sprintf('Uncaught Exception %s: "%s" at %s line %s', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine()), + array('exception' => $e) + ); + + if ($this->previousExceptionHandler) { + call_user_func($this->previousExceptionHandler, $e); + } + + exit(255); + } + + /** + * @private + */ + public function handleError($code, $message, $file = '', $line = 0, $context = array()) + { + if ($this->handleOnlyReportedErrors && !(error_reporting() & $code)) { + return; + } + + // fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries + if (!$this->hasFatalErrorHandler || !in_array($code, self::$fatalErrors, true)) { + $level = isset($this->errorLevelMap[$code]) ? $this->errorLevelMap[$code] : LogLevel::CRITICAL; + $this->logger->log($level, self::codeToString($code).': '.$message, array('code' => $code, 'message' => $message, 'file' => $file, 'line' => $line)); + } + + if ($this->previousErrorHandler === true) { + return false; + } elseif ($this->previousErrorHandler) { + return call_user_func($this->previousErrorHandler, $code, $message, $file, $line, $context); + } + } + + /** + * @private + */ + public function handleFatalError() + { + $this->reservedMemory = null; + + $lastError = error_get_last(); + if ($lastError && in_array($lastError['type'], self::$fatalErrors, true)) { + $this->logger->log( + $this->fatalLevel === null ? LogLevel::ALERT : $this->fatalLevel, + 'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'], + array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line']) + ); + + if ($this->logger instanceof Logger) { + foreach ($this->logger->getHandlers() as $handler) { + if ($handler instanceof AbstractHandler) { + $handler->close(); + } + } + } + } + } + + private static function codeToString($code) + { + switch ($code) { + case E_ERROR: + return 'E_ERROR'; + case E_WARNING: + return 'E_WARNING'; + case E_PARSE: + return 'E_PARSE'; + case E_NOTICE: + return 'E_NOTICE'; + case E_CORE_ERROR: + return 'E_CORE_ERROR'; + case E_CORE_WARNING: + return 'E_CORE_WARNING'; + case E_COMPILE_ERROR: + return 'E_COMPILE_ERROR'; + case E_COMPILE_WARNING: + return 'E_COMPILE_WARNING'; + case E_USER_ERROR: + return 'E_USER_ERROR'; + case E_USER_WARNING: + return 'E_USER_WARNING'; + case E_USER_NOTICE: + return 'E_USER_NOTICE'; + case E_STRICT: + return 'E_STRICT'; + case E_RECOVERABLE_ERROR: + return 'E_RECOVERABLE_ERROR'; + case E_DEPRECATED: + return 'E_DEPRECATED'; + case E_USER_DEPRECATED: + return 'E_USER_DEPRECATED'; + } + + return 'Unknown PHP error'; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..9beda1e7634d4a198f4d52ebbb2efe0978c29e91 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; + +/** + * Formats a log message according to the ChromePHP array format + * + * @author Christophe Coevoet + */ +class ChromePHPFormatter implements FormatterInterface +{ + /** + * Translates Monolog log levels to Wildfire levels. + */ + private $logLevels = array( + Logger::DEBUG => 'log', + Logger::INFO => 'info', + Logger::NOTICE => 'info', + Logger::WARNING => 'warn', + Logger::ERROR => 'error', + Logger::CRITICAL => 'error', + Logger::ALERT => 'error', + Logger::EMERGENCY => 'error', + ); + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + // Retrieve the line and file if set and remove them from the formatted extra + $backtrace = 'unknown'; + if (isset($record['extra']['file'], $record['extra']['line'])) { + $backtrace = $record['extra']['file'].' : '.$record['extra']['line']; + unset($record['extra']['file'], $record['extra']['line']); + } + + $message = array('message' => $record['message']); + if ($record['context']) { + $message['context'] = $record['context']; + } + if ($record['extra']) { + $message['extra'] = $record['extra']; + } + if (count($message) === 1) { + $message = reset($message); + } + + return array( + $record['channel'], + $message, + $backtrace, + $this->logLevels[$record['level']], + ); + } + + public function formatBatch(array $records) + { + $formatted = array(); + + foreach ($records as $record) { + $formatted[] = $this->format($record); + } + + return $formatted; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..4c556cf178d4d2b8a9b0aa45efedd17d807c88db --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Elastica\Document; + +/** + * Format a log message into an Elastica Document + * + * @author Jelle Vink + */ +class ElasticaFormatter extends NormalizerFormatter +{ + /** + * @var string Elastic search index name + */ + protected $index; + + /** + * @var string Elastic search document type + */ + protected $type; + + /** + * @param string $index Elastic Search index name + * @param string $type Elastic Search document type + */ + public function __construct($index, $type) + { + // elasticsearch requires a ISO 8601 format date with optional millisecond precision. + parent::__construct('Y-m-d\TH:i:s.uP'); + + $this->index = $index; + $this->type = $type; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $record = parent::format($record); + + return $this->getDocument($record); + } + + /** + * Getter index + * @return string + */ + public function getIndex() + { + return $this->index; + } + + /** + * Getter type + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Convert a log message into an Elastica Document + * + * @param array $record Log message + * @return Document + */ + protected function getDocument($record) + { + $document = new Document(); + $document->setData($record); + $document->setType($this->type); + $document->setIndex($this->index); + + return $document; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..5094af3c7772a5707e0981fa9f860aea02eafc18 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * formats the record to be used in the FlowdockHandler + * + * @author Dominik Liebler + */ +class FlowdockFormatter implements FormatterInterface +{ + /** + * @var string + */ + private $source; + + /** + * @var string + */ + private $sourceEmail; + + /** + * @param string $source + * @param string $sourceEmail + */ + public function __construct($source, $sourceEmail) + { + $this->source = $source; + $this->sourceEmail = $sourceEmail; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $tags = array( + '#logs', + '#' . strtolower($record['level_name']), + '#' . $record['channel'], + ); + + foreach ($record['extra'] as $value) { + $tags[] = '#' . $value; + } + + $subject = sprintf( + 'in %s: %s - %s', + $this->source, + $record['level_name'], + $this->getShortMessage($record['message']) + ); + + $record['flowdock'] = array( + 'source' => $this->source, + 'from_address' => $this->sourceEmail, + 'subject' => $subject, + 'content' => $record['message'], + 'tags' => $tags, + 'project' => $this->source, + ); + + return $record; + } + + /** + * {@inheritdoc} + */ + public function formatBatch(array $records) + { + $formatted = array(); + + foreach ($records as $record) { + $formatted[] = $this->format($record); + } + + return $formatted; + } + + /** + * @param string $message + * + * @return string + */ + public function getShortMessage($message) + { + static $hasMbString; + + if (null === $hasMbString) { + $hasMbString = function_exists('mb_strlen'); + } + + $maxLength = 45; + + if ($hasMbString) { + if (mb_strlen($message, 'UTF-8') > $maxLength) { + $message = mb_substr($message, 0, $maxLength - 4, 'UTF-8') . ' ...'; + } + } else { + if (strlen($message) > $maxLength) { + $message = substr($message, 0, $maxLength - 4) . ' ...'; + } + } + + return $message; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..02632bb56fd3f06d8ab433232d53e2376a6319b2 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Class FluentdFormatter + * + * Serializes a log message to Fluentd unix socket protocol + * + * Fluentd config: + * + * + * type unix + * path /var/run/td-agent/td-agent.sock + * + * + * Monolog setup: + * + * $logger = new Monolog\Logger('fluent.tag'); + * $fluentHandler = new Monolog\Handler\SocketHandler('unix:///var/run/td-agent/td-agent.sock'); + * $fluentHandler->setFormatter(new Monolog\Formatter\FluentdFormatter()); + * $logger->pushHandler($fluentHandler); + * + * @author Andrius Putna + */ +class FluentdFormatter implements FormatterInterface +{ + /** + * @var bool $levelTag should message level be a part of the fluentd tag + */ + protected $levelTag = false; + + public function __construct($levelTag = false) + { + if (!function_exists('json_encode')) { + throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s FluentdUnixFormatter'); + } + + $this->levelTag = (bool) $levelTag; + } + + public function isUsingLevelsInTag() + { + return $this->levelTag; + } + + public function format(array $record) + { + $tag = $record['channel']; + if ($this->levelTag) { + $tag .= '.' . strtolower($record['level_name']); + } + + $message = array( + 'message' => $record['message'], + 'extra' => $record['extra'], + ); + + if (!$this->levelTag) { + $message['level'] = $record['level']; + $message['level_name'] = $record['level_name']; + } + + return json_encode(array($tag, $record['datetime']->getTimestamp(), $message)); + } + + public function formatBatch(array $records) + { + $message = ''; + foreach ($records as $record) { + $message .= $this->format($record); + } + + return $message; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php b/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b5de751112bd2cfc59b86ed40515c5b9d33b7af0 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.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 Monolog\Formatter; + +/** + * Interface for formatters + * + * @author Jordi Boggiano + */ +interface FormatterInterface +{ + /** + * Formats a log record. + * + * @param array $record A record to format + * @return mixed The formatted record + */ + public function format(array $record); + + /** + * Formats a set of log records. + * + * @param array $records A set of records to format + * @return mixed The formatted set of records + */ + public function formatBatch(array $records); +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..64e76652012815351022427d61cf0f6a91be5127 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php @@ -0,0 +1,137 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; +use Gelf\Message; + +/** + * Serializes a log message to GELF + * @see http://www.graylog2.org/about/gelf + * + * @author Matt Lehner + */ +class GelfMessageFormatter extends NormalizerFormatter +{ + const MAX_LENGTH = 32766; + + /** + * @var string the name of the system for the Gelf log message + */ + protected $systemName; + + /** + * @var string a prefix for 'extra' fields from the Monolog record (optional) + */ + protected $extraPrefix; + + /** + * @var string a prefix for 'context' fields from the Monolog record (optional) + */ + protected $contextPrefix; + + /** + * Translates Monolog log levels to Graylog2 log priorities. + */ + private $logLevels = array( + Logger::DEBUG => 7, + Logger::INFO => 6, + Logger::NOTICE => 5, + Logger::WARNING => 4, + Logger::ERROR => 3, + Logger::CRITICAL => 2, + Logger::ALERT => 1, + Logger::EMERGENCY => 0, + ); + + public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_') + { + parent::__construct('U.u'); + + $this->systemName = $systemName ?: gethostname(); + + $this->extraPrefix = $extraPrefix; + $this->contextPrefix = $contextPrefix; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $record = parent::format($record); + + if (!isset($record['datetime'], $record['message'], $record['level'])) { + throw new \InvalidArgumentException('The record should at least contain datetime, message and level keys, '.var_export($record, true).' given'); + } + + $message = new Message(); + $message + ->setTimestamp($record['datetime']) + ->setShortMessage((string) $record['message']) + ->setHost($this->systemName) + ->setLevel($this->logLevels[$record['level']]); + + // start count with message length + system name length + 200 for padding / metadata + $len = 200 + strlen((string) $record['message']) + strlen($this->systemName); + + if ($len > self::MAX_LENGTH) { + $message->setShortMessage(substr($record['message'], 0, self::MAX_LENGTH - 200)); + + return $message; + } + + if (isset($record['channel'])) { + $message->setFacility($record['channel']); + $len += strlen($record['channel']); + } + if (isset($record['extra']['line'])) { + $message->setLine($record['extra']['line']); + $len += 10; + unset($record['extra']['line']); + } + if (isset($record['extra']['file'])) { + $message->setFile($record['extra']['file']); + $len += strlen($record['extra']['file']); + unset($record['extra']['file']); + } + + foreach ($record['extra'] as $key => $val) { + $val = is_scalar($val) || null === $val ? $val : $this->toJson($val); + $len += strlen($this->extraPrefix . $key . $val); + if ($len > self::MAX_LENGTH) { + $message->setAdditional($this->extraPrefix . $key, substr($val, 0, self::MAX_LENGTH - $len)); + break; + } + $message->setAdditional($this->extraPrefix . $key, $val); + } + + foreach ($record['context'] as $key => $val) { + $val = is_scalar($val) || null === $val ? $val : $this->toJson($val); + $len += strlen($this->contextPrefix . $key . $val); + if ($len > self::MAX_LENGTH) { + $message->setAdditional($this->contextPrefix . $key, substr($val, 0, self::MAX_LENGTH - $len)); + break; + } + $message->setAdditional($this->contextPrefix . $key, $val); + } + + if (null === $message->getFile() && isset($record['context']['exception']['file'])) { + if (preg_match("/^(.+):([0-9]+)$/", $record['context']['exception']['file'], $matches)) { + $message->setFile($matches[1]); + $message->setLine($matches[2]); + } + } + + return $message; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..3eec95f6cc7929118e11bfc427d163c353bad449 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.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 Monolog\Formatter; + +use Monolog\Logger; + +/** + * Formats incoming records into an HTML table + * + * This is especially useful for html email logging + * + * @author Tiago Brito + */ +class HtmlFormatter extends NormalizerFormatter +{ + /** + * Translates Monolog log levels to html color priorities. + */ + protected $logLevels = array( + Logger::DEBUG => '#cccccc', + Logger::INFO => '#468847', + Logger::NOTICE => '#3a87ad', + Logger::WARNING => '#c09853', + Logger::ERROR => '#f0ad4e', + Logger::CRITICAL => '#FF7708', + Logger::ALERT => '#C12A19', + Logger::EMERGENCY => '#000000', + ); + + /** + * @param string $dateFormat The format of the timestamp: one supported by DateTime::format + */ + public function __construct($dateFormat = null) + { + parent::__construct($dateFormat); + } + + /** + * Creates an HTML table row + * + * @param string $th Row header content + * @param string $td Row standard cell content + * @param bool $escapeTd false if td content must not be html escaped + * @return string + */ + protected function addRow($th, $td = ' ', $escapeTd = true) + { + $th = htmlspecialchars($th, ENT_NOQUOTES, 'UTF-8'); + if ($escapeTd) { + $td = '
    '.htmlspecialchars($td, ENT_NOQUOTES, 'UTF-8').'
    '; + } + + return "\n$th:\n".$td."\n"; + } + + /** + * Create a HTML h1 tag + * + * @param string $title Text to be in the h1 + * @param int $level Error level + * @return string + */ + protected function addTitle($title, $level) + { + $title = htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8'); + + return '

    '.$title.'

    '; + } + + /** + * Formats a log record. + * + * @param array $record A record to format + * @return mixed The formatted record + */ + public function format(array $record) + { + $output = $this->addTitle($record['level_name'], $record['level']); + $output .= ''; + + $output .= $this->addRow('Message', (string) $record['message']); + $output .= $this->addRow('Time', $record['datetime']->format($this->dateFormat)); + $output .= $this->addRow('Channel', $record['channel']); + if ($record['context']) { + $embeddedTable = '
    '; + foreach ($record['context'] as $key => $value) { + $embeddedTable .= $this->addRow($key, $this->convertToString($value)); + } + $embeddedTable .= '
    '; + $output .= $this->addRow('Context', $embeddedTable, false); + } + if ($record['extra']) { + $embeddedTable = ''; + foreach ($record['extra'] as $key => $value) { + $embeddedTable .= $this->addRow($key, $this->convertToString($value)); + } + $embeddedTable .= '
    '; + $output .= $this->addRow('Extra', $embeddedTable, false); + } + + return $output.''; + } + + /** + * Formats a set of log records. + * + * @param array $records A set of records to format + * @return mixed The formatted set of records + */ + public function formatBatch(array $records) + { + $message = ''; + foreach ($records as $record) { + $message .= $this->format($record); + } + + return $message; + } + + protected function convertToString($data) + { + if (null === $data || is_scalar($data)) { + return (string) $data; + } + + $data = $this->normalize($data); + if (version_compare(PHP_VERSION, '5.4.0', '>=')) { + return json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); + } + + return str_replace('\\/', '/', json_encode($data)); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..4b2be77d8cb0f8c69872bcd960e68e835cfb9a6e --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php @@ -0,0 +1,206 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Exception; +use Throwable; + +/** + * Encodes whatever record data is passed to it as json + * + * This can be useful to log to databases or remote APIs + * + * @author Jordi Boggiano + */ +class JsonFormatter extends NormalizerFormatter +{ + const BATCH_MODE_JSON = 1; + const BATCH_MODE_NEWLINES = 2; + + protected $batchMode; + protected $appendNewline; + /** + * @var bool + */ + protected $includeStacktraces = false; + + /** + * @param int $batchMode + */ + public function __construct($batchMode = self::BATCH_MODE_JSON, $appendNewline = true) + { + $this->batchMode = $batchMode; + $this->appendNewline = $appendNewline; + } + + /** + * The batch mode option configures the formatting style for + * multiple records. By default, multiple records will be + * formatted as a JSON-encoded array. However, for + * compatibility with some API endpoints, alternative styles + * are available. + * + * @return int + */ + public function getBatchMode() + { + return $this->batchMode; + } + + /** + * True if newlines are appended to every formatted record + * + * @return bool + */ + public function isAppendingNewlines() + { + return $this->appendNewline; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + return $this->toJson($this->normalize($record), true) . ($this->appendNewline ? "\n" : ''); + } + + /** + * {@inheritdoc} + */ + public function formatBatch(array $records) + { + switch ($this->batchMode) { + case static::BATCH_MODE_NEWLINES: + return $this->formatBatchNewlines($records); + + case static::BATCH_MODE_JSON: + default: + return $this->formatBatchJson($records); + } + } + + /** + * @param bool $include + */ + public function includeStacktraces($include = true) + { + $this->includeStacktraces = $include; + } + + /** + * Return a JSON-encoded array of records. + * + * @param array $records + * @return string + */ + protected function formatBatchJson(array $records) + { + return $this->toJson($this->normalize($records), true); + } + + /** + * Use new lines to separate records instead of a + * JSON-encoded array. + * + * @param array $records + * @return string + */ + protected function formatBatchNewlines(array $records) + { + $instance = $this; + + $oldNewline = $this->appendNewline; + $this->appendNewline = false; + array_walk($records, function (&$value, $key) use ($instance) { + $value = $instance->format($value); + }); + $this->appendNewline = $oldNewline; + + return implode("\n", $records); + } + + /** + * Normalizes given $data. + * + * @param mixed $data + * + * @return mixed + */ + protected function normalize($data) + { + if (is_array($data) || $data instanceof \Traversable) { + $normalized = array(); + + $count = 1; + foreach ($data as $key => $value) { + if ($count++ >= 1000) { + $normalized['...'] = 'Over 1000 items, aborting normalization'; + break; + } + $normalized[$key] = $this->normalize($value); + } + + return $normalized; + } + + if ($data instanceof Exception || $data instanceof Throwable) { + return $this->normalizeException($data); + } + + return $data; + } + + /** + * Normalizes given exception with or without its own stack trace based on + * `includeStacktraces` property. + * + * @param Exception|Throwable $e + * + * @return array + */ + protected function normalizeException($e) + { + // TODO 2.0 only check for Throwable + if (!$e instanceof Exception && !$e instanceof Throwable) { + throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.get_class($e)); + } + + $data = array( + 'class' => get_class($e), + 'message' => $e->getMessage(), + 'code' => $e->getCode(), + 'file' => $e->getFile().':'.$e->getLine(), + ); + + if ($this->includeStacktraces) { + $trace = $e->getTrace(); + foreach ($trace as $frame) { + if (isset($frame['file'])) { + $data['trace'][] = $frame['file'].':'.$frame['line']; + } elseif (isset($frame['function']) && $frame['function'] === '{closure}') { + // We should again normalize the frames, because it might contain invalid items + $data['trace'][] = $frame['function']; + } else { + // We should again normalize the frames, because it might contain invalid items + $data['trace'][] = $this->normalize($frame); + } + } + } + + if ($previous = $e->getPrevious()) { + $data['previous'] = $this->normalizeException($previous); + } + + return $data; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..8ffe60120c14cabd9e1dcb0651144e9ddc9c04f0 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.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 Monolog\Formatter; + +/** + * Formats incoming records into a one-line string + * + * This is especially useful for logging to files + * + * @author Jordi Boggiano + * @author Christophe Coevoet + */ +class LineFormatter extends NormalizerFormatter +{ + const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"; + + protected $format; + protected $allowInlineLineBreaks; + protected $ignoreEmptyContextAndExtra; + protected $includeStacktraces; + + /** + * @param string $format The format of the message + * @param string $dateFormat The format of the timestamp: one supported by DateTime::format + * @param bool $allowInlineLineBreaks Whether to allow inline line breaks in log entries + * @param bool $ignoreEmptyContextAndExtra + */ + public function __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = false, $ignoreEmptyContextAndExtra = false) + { + $this->format = $format ?: static::SIMPLE_FORMAT; + $this->allowInlineLineBreaks = $allowInlineLineBreaks; + $this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra; + parent::__construct($dateFormat); + } + + public function includeStacktraces($include = true) + { + $this->includeStacktraces = $include; + if ($this->includeStacktraces) { + $this->allowInlineLineBreaks = true; + } + } + + public function allowInlineLineBreaks($allow = true) + { + $this->allowInlineLineBreaks = $allow; + } + + public function ignoreEmptyContextAndExtra($ignore = true) + { + $this->ignoreEmptyContextAndExtra = $ignore; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $vars = parent::format($record); + + $output = $this->format; + + foreach ($vars['extra'] as $var => $val) { + if (false !== strpos($output, '%extra.'.$var.'%')) { + $output = str_replace('%extra.'.$var.'%', $this->stringify($val), $output); + unset($vars['extra'][$var]); + } + } + + + foreach ($vars['context'] as $var => $val) { + if (false !== strpos($output, '%context.'.$var.'%')) { + $output = str_replace('%context.'.$var.'%', $this->stringify($val), $output); + unset($vars['context'][$var]); + } + } + + if ($this->ignoreEmptyContextAndExtra) { + if (empty($vars['context'])) { + unset($vars['context']); + $output = str_replace('%context%', '', $output); + } + + if (empty($vars['extra'])) { + unset($vars['extra']); + $output = str_replace('%extra%', '', $output); + } + } + + foreach ($vars as $var => $val) { + if (false !== strpos($output, '%'.$var.'%')) { + $output = str_replace('%'.$var.'%', $this->stringify($val), $output); + } + } + + // remove leftover %extra.xxx% and %context.xxx% if any + if (false !== strpos($output, '%')) { + $output = preg_replace('/%(?:extra|context)\..+?%/', '', $output); + } + + return $output; + } + + public function formatBatch(array $records) + { + $message = ''; + foreach ($records as $record) { + $message .= $this->format($record); + } + + return $message; + } + + public function stringify($value) + { + return $this->replaceNewlines($this->convertToString($value)); + } + + protected function normalizeException($e) + { + // TODO 2.0 only check for Throwable + if (!$e instanceof \Exception && !$e instanceof \Throwable) { + throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.get_class($e)); + } + + $previousText = ''; + if ($previous = $e->getPrevious()) { + do { + $previousText .= ', '.get_class($previous).'(code: '.$previous->getCode().'): '.$previous->getMessage().' at '.$previous->getFile().':'.$previous->getLine(); + } while ($previous = $previous->getPrevious()); + } + + $str = '[object] ('.get_class($e).'(code: '.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')'; + if ($this->includeStacktraces) { + $str .= "\n[stacktrace]\n".$e->getTraceAsString(); + } + + return $str; + } + + protected function convertToString($data) + { + if (null === $data || is_bool($data)) { + return var_export($data, true); + } + + if (is_scalar($data)) { + return (string) $data; + } + + if (version_compare(PHP_VERSION, '5.4.0', '>=')) { + return $this->toJson($data, true); + } + + return str_replace('\\/', '/', @json_encode($data)); + } + + protected function replaceNewlines($str) + { + if ($this->allowInlineLineBreaks) { + return $str; + } + + return str_replace(array("\r\n", "\r", "\n"), ' ', $str); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..401859bba6fbafd5eab9442b1842cb867c20abfa --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Encodes message information into JSON in a format compatible with Loggly. + * + * @author Adam Pancutt + */ +class LogglyFormatter extends JsonFormatter +{ + /** + * Overrides the default batch mode to new lines for compatibility with the + * Loggly bulk API. + * + * @param int $batchMode + */ + public function __construct($batchMode = self::BATCH_MODE_NEWLINES, $appendNewline = false) + { + parent::__construct($batchMode, $appendNewline); + } + + /** + * Appends the 'timestamp' parameter for indexing by Loggly. + * + * @see https://www.loggly.com/docs/automated-parsing/#json + * @see \Monolog\Formatter\JsonFormatter::format() + */ + public function format(array $record) + { + if (isset($record["datetime"]) && ($record["datetime"] instanceof \DateTime)) { + $record["timestamp"] = $record["datetime"]->format("Y-m-d\TH:i:s.uO"); + // TODO 2.0 unset the 'datetime' parameter, retained for BC + } + + return parent::format($record); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..8f83bec041b717c1bfb735e57a0f9119d3f8d58f --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php @@ -0,0 +1,166 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Serializes a log message to Logstash Event Format + * + * @see http://logstash.net/ + * @see https://github.com/logstash/logstash/blob/master/lib/logstash/event.rb + * + * @author Tim Mower + */ +class LogstashFormatter extends NormalizerFormatter +{ + const V0 = 0; + const V1 = 1; + + /** + * @var string the name of the system for the Logstash log message, used to fill the @source field + */ + protected $systemName; + + /** + * @var string an application name for the Logstash log message, used to fill the @type field + */ + protected $applicationName; + + /** + * @var string a prefix for 'extra' fields from the Monolog record (optional) + */ + protected $extraPrefix; + + /** + * @var string a prefix for 'context' fields from the Monolog record (optional) + */ + protected $contextPrefix; + + /** + * @var int logstash format version to use + */ + protected $version; + + /** + * @param string $applicationName the application that sends the data, used as the "type" field of logstash + * @param string $systemName the system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine + * @param string $extraPrefix prefix for extra keys inside logstash "fields" + * @param string $contextPrefix prefix for context keys inside logstash "fields", defaults to ctxt_ + * @param int $version the logstash format version to use, defaults to 0 + */ + public function __construct($applicationName, $systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $version = self::V0) + { + // logstash requires a ISO 8601 format date with optional millisecond precision. + parent::__construct('Y-m-d\TH:i:s.uP'); + + $this->systemName = $systemName ?: gethostname(); + $this->applicationName = $applicationName; + $this->extraPrefix = $extraPrefix; + $this->contextPrefix = $contextPrefix; + $this->version = $version; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $record = parent::format($record); + + if ($this->version === self::V1) { + $message = $this->formatV1($record); + } else { + $message = $this->formatV0($record); + } + + return $this->toJson($message) . "\n"; + } + + protected function formatV0(array $record) + { + if (empty($record['datetime'])) { + $record['datetime'] = gmdate('c'); + } + $message = array( + '@timestamp' => $record['datetime'], + '@source' => $this->systemName, + '@fields' => array(), + ); + if (isset($record['message'])) { + $message['@message'] = $record['message']; + } + if (isset($record['channel'])) { + $message['@tags'] = array($record['channel']); + $message['@fields']['channel'] = $record['channel']; + } + if (isset($record['level'])) { + $message['@fields']['level'] = $record['level']; + } + if ($this->applicationName) { + $message['@type'] = $this->applicationName; + } + if (isset($record['extra']['server'])) { + $message['@source_host'] = $record['extra']['server']; + } + if (isset($record['extra']['url'])) { + $message['@source_path'] = $record['extra']['url']; + } + if (!empty($record['extra'])) { + foreach ($record['extra'] as $key => $val) { + $message['@fields'][$this->extraPrefix . $key] = $val; + } + } + if (!empty($record['context'])) { + foreach ($record['context'] as $key => $val) { + $message['@fields'][$this->contextPrefix . $key] = $val; + } + } + + return $message; + } + + protected function formatV1(array $record) + { + if (empty($record['datetime'])) { + $record['datetime'] = gmdate('c'); + } + $message = array( + '@timestamp' => $record['datetime'], + '@version' => 1, + 'host' => $this->systemName, + ); + if (isset($record['message'])) { + $message['message'] = $record['message']; + } + if (isset($record['channel'])) { + $message['type'] = $record['channel']; + $message['channel'] = $record['channel']; + } + if (isset($record['level_name'])) { + $message['level'] = $record['level_name']; + } + if ($this->applicationName) { + $message['type'] = $this->applicationName; + } + if (!empty($record['extra'])) { + foreach ($record['extra'] as $key => $val) { + $message[$this->extraPrefix . $key] = $val; + } + } + if (!empty($record['context'])) { + foreach ($record['context'] as $key => $val) { + $message[$this->contextPrefix . $key] = $val; + } + } + + return $message; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..eb067bb7265db201dc28b9950ca9ca5baa0fd9ea --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php @@ -0,0 +1,105 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Formats a record for use with the MongoDBHandler. + * + * @author Florian Plattner + */ +class MongoDBFormatter implements FormatterInterface +{ + private $exceptionTraceAsString; + private $maxNestingLevel; + + /** + * @param int $maxNestingLevel 0 means infinite nesting, the $record itself is level 1, $record['context'] is 2 + * @param bool $exceptionTraceAsString set to false to log exception traces as a sub documents instead of strings + */ + public function __construct($maxNestingLevel = 3, $exceptionTraceAsString = true) + { + $this->maxNestingLevel = max($maxNestingLevel, 0); + $this->exceptionTraceAsString = (bool) $exceptionTraceAsString; + } + + /** + * {@inheritDoc} + */ + public function format(array $record) + { + return $this->formatArray($record); + } + + /** + * {@inheritDoc} + */ + public function formatBatch(array $records) + { + foreach ($records as $key => $record) { + $records[$key] = $this->format($record); + } + + return $records; + } + + protected function formatArray(array $record, $nestingLevel = 0) + { + if ($this->maxNestingLevel == 0 || $nestingLevel <= $this->maxNestingLevel) { + foreach ($record as $name => $value) { + if ($value instanceof \DateTime) { + $record[$name] = $this->formatDate($value, $nestingLevel + 1); + } elseif ($value instanceof \Exception) { + $record[$name] = $this->formatException($value, $nestingLevel + 1); + } elseif (is_array($value)) { + $record[$name] = $this->formatArray($value, $nestingLevel + 1); + } elseif (is_object($value)) { + $record[$name] = $this->formatObject($value, $nestingLevel + 1); + } + } + } else { + $record = '[...]'; + } + + return $record; + } + + protected function formatObject($value, $nestingLevel) + { + $objectVars = get_object_vars($value); + $objectVars['class'] = get_class($value); + + return $this->formatArray($objectVars, $nestingLevel); + } + + protected function formatException(\Exception $exception, $nestingLevel) + { + $formattedException = array( + 'class' => get_class($exception), + 'message' => $exception->getMessage(), + 'code' => $exception->getCode(), + 'file' => $exception->getFile() . ':' . $exception->getLine(), + ); + + if ($this->exceptionTraceAsString === true) { + $formattedException['trace'] = $exception->getTraceAsString(); + } else { + $formattedException['trace'] = $exception->getTrace(); + } + + return $this->formatArray($formattedException, $nestingLevel); + } + + protected function formatDate(\DateTime $value, $nestingLevel) + { + return new \MongoDate($value->getTimestamp()); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..d44148823a4cba68d47fe5d92f41e6781bef11f2 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php @@ -0,0 +1,297 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Exception; + +/** + * Normalizes incoming records to remove objects/resources so it's easier to dump to various targets + * + * @author Jordi Boggiano + */ +class NormalizerFormatter implements FormatterInterface +{ + const SIMPLE_DATE = "Y-m-d H:i:s"; + + protected $dateFormat; + + /** + * @param string $dateFormat The format of the timestamp: one supported by DateTime::format + */ + public function __construct($dateFormat = null) + { + $this->dateFormat = $dateFormat ?: static::SIMPLE_DATE; + if (!function_exists('json_encode')) { + throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s NormalizerFormatter'); + } + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + return $this->normalize($record); + } + + /** + * {@inheritdoc} + */ + public function formatBatch(array $records) + { + foreach ($records as $key => $record) { + $records[$key] = $this->format($record); + } + + return $records; + } + + protected function normalize($data) + { + if (null === $data || is_scalar($data)) { + if (is_float($data)) { + if (is_infinite($data)) { + return ($data > 0 ? '' : '-') . 'INF'; + } + if (is_nan($data)) { + return 'NaN'; + } + } + + return $data; + } + + if (is_array($data)) { + $normalized = array(); + + $count = 1; + foreach ($data as $key => $value) { + if ($count++ >= 1000) { + $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization'; + break; + } + $normalized[$key] = $this->normalize($value); + } + + return $normalized; + } + + if ($data instanceof \DateTime) { + return $data->format($this->dateFormat); + } + + if (is_object($data)) { + // TODO 2.0 only check for Throwable + if ($data instanceof Exception || (PHP_VERSION_ID > 70000 && $data instanceof \Throwable)) { + return $this->normalizeException($data); + } + + // non-serializable objects that implement __toString stringified + if (method_exists($data, '__toString') && !$data instanceof \JsonSerializable) { + $value = $data->__toString(); + } else { + // the rest is json-serialized in some way + $value = $this->toJson($data, true); + } + + return sprintf("[object] (%s: %s)", get_class($data), $value); + } + + if (is_resource($data)) { + return sprintf('[resource] (%s)', get_resource_type($data)); + } + + return '[unknown('.gettype($data).')]'; + } + + protected function normalizeException($e) + { + // TODO 2.0 only check for Throwable + if (!$e instanceof Exception && !$e instanceof \Throwable) { + throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.get_class($e)); + } + + $data = array( + 'class' => get_class($e), + 'message' => $e->getMessage(), + 'code' => $e->getCode(), + 'file' => $e->getFile().':'.$e->getLine(), + ); + + if ($e instanceof \SoapFault) { + if (isset($e->faultcode)) { + $data['faultcode'] = $e->faultcode; + } + + if (isset($e->faultactor)) { + $data['faultactor'] = $e->faultactor; + } + + if (isset($e->detail)) { + $data['detail'] = $e->detail; + } + } + + $trace = $e->getTrace(); + foreach ($trace as $frame) { + if (isset($frame['file'])) { + $data['trace'][] = $frame['file'].':'.$frame['line']; + } elseif (isset($frame['function']) && $frame['function'] === '{closure}') { + // We should again normalize the frames, because it might contain invalid items + $data['trace'][] = $frame['function']; + } else { + // We should again normalize the frames, because it might contain invalid items + $data['trace'][] = $this->toJson($this->normalize($frame), true); + } + } + + if ($previous = $e->getPrevious()) { + $data['previous'] = $this->normalizeException($previous); + } + + return $data; + } + + /** + * Return the JSON representation of a value + * + * @param mixed $data + * @param bool $ignoreErrors + * @throws \RuntimeException if encoding fails and errors are not ignored + * @return string + */ + protected function toJson($data, $ignoreErrors = false) + { + // suppress json_encode errors since it's twitchy with some inputs + if ($ignoreErrors) { + return @$this->jsonEncode($data); + } + + $json = $this->jsonEncode($data); + + if ($json === false) { + $json = $this->handleJsonError(json_last_error(), $data); + } + + return $json; + } + + /** + * @param mixed $data + * @return string JSON encoded data or null on failure + */ + private function jsonEncode($data) + { + if (version_compare(PHP_VERSION, '5.4.0', '>=')) { + return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); + } + + return json_encode($data); + } + + /** + * Handle a json_encode failure. + * + * If the failure is due to invalid string encoding, try to clean the + * input and encode again. If the second encoding attempt fails, the + * inital error is not encoding related or the input can't be cleaned then + * raise a descriptive exception. + * + * @param int $code return code of json_last_error function + * @param mixed $data data that was meant to be encoded + * @throws \RuntimeException if failure can't be corrected + * @return string JSON encoded data after error correction + */ + private function handleJsonError($code, $data) + { + if ($code !== JSON_ERROR_UTF8) { + $this->throwEncodeError($code, $data); + } + + if (is_string($data)) { + $this->detectAndCleanUtf8($data); + } elseif (is_array($data)) { + array_walk_recursive($data, array($this, 'detectAndCleanUtf8')); + } else { + $this->throwEncodeError($code, $data); + } + + $json = $this->jsonEncode($data); + + if ($json === false) { + $this->throwEncodeError(json_last_error(), $data); + } + + return $json; + } + + /** + * Throws an exception according to a given code with a customized message + * + * @param int $code return code of json_last_error function + * @param mixed $data data that was meant to be encoded + * @throws \RuntimeException + */ + private function throwEncodeError($code, $data) + { + switch ($code) { + case JSON_ERROR_DEPTH: + $msg = 'Maximum stack depth exceeded'; + break; + case JSON_ERROR_STATE_MISMATCH: + $msg = 'Underflow or the modes mismatch'; + break; + case JSON_ERROR_CTRL_CHAR: + $msg = 'Unexpected control character found'; + break; + case JSON_ERROR_UTF8: + $msg = 'Malformed UTF-8 characters, possibly incorrectly encoded'; + break; + default: + $msg = 'Unknown error'; + } + + throw new \RuntimeException('JSON encoding failed: '.$msg.'. Encoding: '.var_export($data, true)); + } + + /** + * Detect invalid UTF-8 string characters and convert to valid UTF-8. + * + * Valid UTF-8 input will be left unmodified, but strings containing + * invalid UTF-8 codepoints will be reencoded as UTF-8 with an assumed + * original encoding of ISO-8859-15. This conversion may result in + * incorrect output if the actual encoding was not ISO-8859-15, but it + * will be clean UTF-8 output and will not rely on expensive and fragile + * detection algorithms. + * + * Function converts the input in place in the passed variable so that it + * can be used as a callback for array_walk_recursive. + * + * @param mixed &$data Input to check and convert if needed + * @private + */ + public function detectAndCleanUtf8(&$data) + { + if (is_string($data) && !preg_match('//u', $data)) { + $data = preg_replace_callback( + '/[\x80-\xFF]+/', + function ($m) { return utf8_encode($m[0]); }, + $data + ); + $data = str_replace( + array('¤', '¦', '¨', '´', '¸', '¼', '½', '¾'), + array('€', 'Š', 'š', 'Ž', 'ž', 'Œ', 'œ', 'Ÿ'), + $data + ); + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..5d345d53c6d0fdc9896e2a3a206858a2259c5880 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Formats data into an associative array of scalar values. + * Objects and arrays will be JSON encoded. + * + * @author Andrew Lawson + */ +class ScalarFormatter extends NormalizerFormatter +{ + /** + * {@inheritdoc} + */ + public function format(array $record) + { + foreach ($record as $key => $value) { + $record[$key] = $this->normalizeValue($value); + } + + return $record; + } + + /** + * @param mixed $value + * @return mixed + */ + protected function normalizeValue($value) + { + $normalized = $this->normalize($value); + + if (is_array($normalized) || is_object($normalized)) { + return $this->toJson($normalized, true); + } + + return $normalized; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..654710a8d15d7ecf6d607112878dc3dffc0e8379 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; + +/** + * Serializes a log message according to Wildfire's header requirements + * + * @author Eric Clemmons (@ericclemmons) + * @author Christophe Coevoet + * @author Kirill chEbba Chebunin + */ +class WildfireFormatter extends NormalizerFormatter +{ + const TABLE = 'table'; + + /** + * Translates Monolog log levels to Wildfire levels. + */ + private $logLevels = array( + Logger::DEBUG => 'LOG', + Logger::INFO => 'INFO', + Logger::NOTICE => 'INFO', + Logger::WARNING => 'WARN', + Logger::ERROR => 'ERROR', + Logger::CRITICAL => 'ERROR', + Logger::ALERT => 'ERROR', + Logger::EMERGENCY => 'ERROR', + ); + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + // Retrieve the line and file if set and remove them from the formatted extra + $file = $line = ''; + if (isset($record['extra']['file'])) { + $file = $record['extra']['file']; + unset($record['extra']['file']); + } + if (isset($record['extra']['line'])) { + $line = $record['extra']['line']; + unset($record['extra']['line']); + } + + $record = $this->normalize($record); + $message = array('message' => $record['message']); + $handleError = false; + if ($record['context']) { + $message['context'] = $record['context']; + $handleError = true; + } + if ($record['extra']) { + $message['extra'] = $record['extra']; + $handleError = true; + } + if (count($message) === 1) { + $message = reset($message); + } + + if (isset($record['context'][self::TABLE])) { + $type = 'TABLE'; + $label = $record['channel'] .': '. $record['message']; + $message = $record['context'][self::TABLE]; + } else { + $type = $this->logLevels[$record['level']]; + $label = $record['channel']; + } + + // Create JSON object describing the appearance of the message in the console + $json = $this->toJson(array( + array( + 'Type' => $type, + 'File' => $file, + 'Line' => $line, + 'Label' => $label, + ), + $message, + ), $handleError); + + // The message itself is a serialization of the above JSON object + it's length + return sprintf( + '%s|%s|', + strlen($json), + $json + ); + } + + public function formatBatch(array $records) + { + throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter'); + } + + protected function normalize($data) + { + if (is_object($data) && !$data instanceof \DateTime) { + return $data; + } + + return parent::normalize($data); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..758a425c3bdf81272a38e4cac16766393acfaab7 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php @@ -0,0 +1,186 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LineFormatter; + +/** + * Base Handler class providing the Handler structure + * + * @author Jordi Boggiano + */ +abstract class AbstractHandler implements HandlerInterface +{ + protected $level = Logger::DEBUG; + protected $bubble = true; + + /** + * @var FormatterInterface + */ + protected $formatter; + protected $processors = array(); + + /** + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($level = Logger::DEBUG, $bubble = true) + { + $this->setLevel($level); + $this->bubble = $bubble; + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return $record['level'] >= $this->level; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + foreach ($records as $record) { + $this->handle($record); + } + } + + /** + * Closes the handler. + * + * This will be called automatically when the object is destroyed + */ + public function close() + { + } + + /** + * {@inheritdoc} + */ + public function pushProcessor($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given'); + } + array_unshift($this->processors, $callback); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function popProcessor() + { + if (!$this->processors) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + + return array_shift($this->processors); + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->formatter = $formatter; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + if (!$this->formatter) { + $this->formatter = $this->getDefaultFormatter(); + } + + return $this->formatter; + } + + /** + * Sets minimum logging level at which this handler will be triggered. + * + * @param int|string $level Level or level name + * @return self + */ + public function setLevel($level) + { + $this->level = Logger::toMonologLevel($level); + + return $this; + } + + /** + * Gets minimum logging level at which this handler will be triggered. + * + * @return int + */ + public function getLevel() + { + return $this->level; + } + + /** + * Sets the bubbling behavior. + * + * @param Boolean $bubble true means that this handler allows bubbling. + * false means that bubbling is not permitted. + * @return self + */ + public function setBubble($bubble) + { + $this->bubble = $bubble; + + return $this; + } + + /** + * Gets the bubbling behavior. + * + * @return Boolean true means that this handler allows bubbling. + * false means that bubbling is not permitted. + */ + public function getBubble() + { + return $this->bubble; + } + + public function __destruct() + { + try { + $this->close(); + } catch (\Exception $e) { + // do nothing + } catch (\Throwable $e) { + // do nothing + } + } + + /** + * Gets the default formatter. + * + * @return FormatterInterface + */ + protected function getDefaultFormatter() + { + return new LineFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..6f18f72e139e26ca9b42be369e3435ced5ba5c00 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Base Handler class providing the Handler structure + * + * Classes extending it should (in most cases) only implement write($record) + * + * @author Jordi Boggiano + * @author Christophe Coevoet + */ +abstract class AbstractProcessingHandler extends AbstractHandler +{ + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if (!$this->isHandling($record)) { + return false; + } + + $record = $this->processRecord($record); + + $record['formatted'] = $this->getFormatter()->format($record); + + $this->write($record); + + return false === $this->bubble; + } + + /** + * Writes the record down to the log of the implementing handler + * + * @param array $record + * @return void + */ + abstract protected function write(array $record); + + /** + * Processes a record. + * + * @param array $record + * @return array + */ + protected function processRecord(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..e2b2832d04c615f5b23206d0dfa91910aea3984e --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\LineFormatter; + +/** + * Common syslog functionality + */ +abstract class AbstractSyslogHandler extends AbstractProcessingHandler +{ + protected $facility; + + /** + * Translates Monolog log levels to syslog log priorities. + */ + protected $logLevels = array( + Logger::DEBUG => LOG_DEBUG, + Logger::INFO => LOG_INFO, + Logger::NOTICE => LOG_NOTICE, + Logger::WARNING => LOG_WARNING, + Logger::ERROR => LOG_ERR, + Logger::CRITICAL => LOG_CRIT, + Logger::ALERT => LOG_ALERT, + Logger::EMERGENCY => LOG_EMERG, + ); + + /** + * List of valid log facility names. + */ + protected $facilities = array( + 'auth' => LOG_AUTH, + 'authpriv' => LOG_AUTHPRIV, + 'cron' => LOG_CRON, + 'daemon' => LOG_DAEMON, + 'kern' => LOG_KERN, + 'lpr' => LOG_LPR, + 'mail' => LOG_MAIL, + 'news' => LOG_NEWS, + 'syslog' => LOG_SYSLOG, + 'user' => LOG_USER, + 'uucp' => LOG_UUCP, + ); + + /** + * @param mixed $facility + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($facility = LOG_USER, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + + if (!defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->facilities['local0'] = LOG_LOCAL0; + $this->facilities['local1'] = LOG_LOCAL1; + $this->facilities['local2'] = LOG_LOCAL2; + $this->facilities['local3'] = LOG_LOCAL3; + $this->facilities['local4'] = LOG_LOCAL4; + $this->facilities['local5'] = LOG_LOCAL5; + $this->facilities['local6'] = LOG_LOCAL6; + $this->facilities['local7'] = LOG_LOCAL7; + } else { + $this->facilities['local0'] = 128; // LOG_LOCAL0 + $this->facilities['local1'] = 136; // LOG_LOCAL1 + $this->facilities['local2'] = 144; // LOG_LOCAL2 + $this->facilities['local3'] = 152; // LOG_LOCAL3 + $this->facilities['local4'] = 160; // LOG_LOCAL4 + $this->facilities['local5'] = 168; // LOG_LOCAL5 + $this->facilities['local6'] = 176; // LOG_LOCAL6 + $this->facilities['local7'] = 184; // LOG_LOCAL7 + } + + // convert textual description of facility to syslog constant + if (array_key_exists(strtolower($facility), $this->facilities)) { + $facility = $this->facilities[strtolower($facility)]; + } elseif (!in_array($facility, array_values($this->facilities), true)) { + throw new \UnexpectedValueException('Unknown facility value "'.$facility.'" given'); + } + + $this->facility = $facility; + } + + /** + * {@inheritdoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('%channel%.%level_name%: %message% %context% %extra%'); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..e5a46bc0d5dbea67a26b0f8f907886dcbe86723a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php @@ -0,0 +1,148 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\JsonFormatter; +use PhpAmqpLib\Message\AMQPMessage; +use PhpAmqpLib\Channel\AMQPChannel; +use AMQPExchange; + +class AmqpHandler extends AbstractProcessingHandler +{ + /** + * @var AMQPExchange|AMQPChannel $exchange + */ + protected $exchange; + + /** + * @var string + */ + protected $exchangeName; + + /** + * @param AMQPExchange|AMQPChannel $exchange AMQPExchange (php AMQP ext) or PHP AMQP lib channel, ready for use + * @param string $exchangeName + * @param int $level + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($exchange, $exchangeName = 'log', $level = Logger::DEBUG, $bubble = true) + { + if ($exchange instanceof AMQPExchange) { + $exchange->setName($exchangeName); + } elseif ($exchange instanceof AMQPChannel) { + $this->exchangeName = $exchangeName; + } else { + throw new \InvalidArgumentException('PhpAmqpLib\Channel\AMQPChannel or AMQPExchange instance required'); + } + $this->exchange = $exchange; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + $data = $record["formatted"]; + $routingKey = $this->getRoutingKey($record); + + if ($this->exchange instanceof AMQPExchange) { + $this->exchange->publish( + $data, + $routingKey, + 0, + array( + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ) + ); + } else { + $this->exchange->basic_publish( + $this->createAmqpMessage($data), + $this->exchangeName, + $routingKey + ); + } + } + + /** + * {@inheritDoc} + */ + public function handleBatch(array $records) + { + if ($this->exchange instanceof AMQPExchange) { + parent::handleBatch($records); + + return; + } + + foreach ($records as $record) { + if (!$this->isHandling($record)) { + continue; + } + + $record = $this->processRecord($record); + $data = $this->getFormatter()->format($record); + + $this->exchange->batch_basic_publish( + $this->createAmqpMessage($data), + $this->exchangeName, + $this->getRoutingKey($record) + ); + } + + $this->exchange->publish_batch(); + } + + /** + * Gets the routing key for the AMQP exchange + * + * @param array $record + * @return string + */ + protected function getRoutingKey(array $record) + { + $routingKey = sprintf( + '%s.%s', + // TODO 2.0 remove substr call + substr($record['level_name'], 0, 4), + $record['channel'] + ); + + return strtolower($routingKey); + } + + /** + * @param string $data + * @return AMQPMessage + */ + private function createAmqpMessage($data) + { + return new AMQPMessage( + (string) $data, + array( + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ) + ); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..b3a21bd4080de34bde109637a2672f41a81f9a63 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php @@ -0,0 +1,230 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; + +/** + * Handler sending logs to browser's javascript console with no browser extension required + * + * @author Olivier Poitrey + */ +class BrowserConsoleHandler extends AbstractProcessingHandler +{ + protected static $initialized = false; + protected static $records = array(); + + /** + * {@inheritDoc} + * + * Formatted output may contain some formatting markers to be transferred to `console.log` using the %c format. + * + * Example of formatted string: + * + * You can do [[blue text]]{color: blue} or [[green background]]{background-color: green; color: white} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('[[%channel%]]{macro: autolabel} [[%level_name%]]{font-weight: bold} %message%'); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + // Accumulate records + self::$records[] = $record; + + // Register shutdown handler if not already done + if (!self::$initialized) { + self::$initialized = true; + $this->registerShutdownFunction(); + } + } + + /** + * Convert records to javascript console commands and send it to the browser. + * This method is automatically called on PHP shutdown if output is HTML or Javascript. + */ + public static function send() + { + $format = self::getResponseFormat(); + if ($format === 'unknown') { + return; + } + + if (count(self::$records)) { + if ($format === 'html') { + self::writeOutput(''); + } elseif ($format === 'js') { + self::writeOutput(self::generateScript()); + } + self::reset(); + } + } + + /** + * Forget all logged records + */ + public static function reset() + { + self::$records = array(); + } + + /** + * Wrapper for register_shutdown_function to allow overriding + */ + protected function registerShutdownFunction() + { + if (PHP_SAPI !== 'cli') { + register_shutdown_function(array('Monolog\Handler\BrowserConsoleHandler', 'send')); + } + } + + /** + * Wrapper for echo to allow overriding + * + * @param string $str + */ + protected static function writeOutput($str) + { + echo $str; + } + + /** + * Checks the format of the response + * + * If Content-Type is set to application/javascript or text/javascript -> js + * If Content-Type is set to text/html, or is unset -> html + * If Content-Type is anything else -> unknown + * + * @return string One of 'js', 'html' or 'unknown' + */ + protected static function getResponseFormat() + { + // Check content type + foreach (headers_list() as $header) { + if (stripos($header, 'content-type:') === 0) { + // This handler only works with HTML and javascript outputs + // text/javascript is obsolete in favour of application/javascript, but still used + if (stripos($header, 'application/javascript') !== false || stripos($header, 'text/javascript') !== false) { + return 'js'; + } + if (stripos($header, 'text/html') === false) { + return 'unknown'; + } + break; + } + } + + return 'html'; + } + + private static function generateScript() + { + $script = array(); + foreach (self::$records as $record) { + $context = self::dump('Context', $record['context']); + $extra = self::dump('Extra', $record['extra']); + + if (empty($context) && empty($extra)) { + $script[] = self::call_array('log', self::handleStyles($record['formatted'])); + } else { + $script = array_merge($script, + array(self::call_array('groupCollapsed', self::handleStyles($record['formatted']))), + $context, + $extra, + array(self::call('groupEnd')) + ); + } + } + + return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);"; + } + + private static function handleStyles($formatted) + { + $args = array(self::quote('font-weight: normal')); + $format = '%c' . $formatted; + preg_match_all('/\[\[(.*?)\]\]\{([^}]*)\}/s', $format, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); + + foreach (array_reverse($matches) as $match) { + $args[] = self::quote(self::handleCustomStyles($match[2][0], $match[1][0])); + $args[] = '"font-weight: normal"'; + + $pos = $match[0][1]; + $format = substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . substr($format, $pos + strlen($match[0][0])); + } + + array_unshift($args, self::quote($format)); + + return $args; + } + + private static function handleCustomStyles($style, $string) + { + static $colors = array('blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey'); + static $labels = array(); + + return preg_replace_callback('/macro\s*:(.*?)(?:;|$)/', function ($m) use ($string, &$colors, &$labels) { + if (trim($m[1]) === 'autolabel') { + // Format the string as a label with consistent auto assigned background color + if (!isset($labels[$string])) { + $labels[$string] = $colors[count($labels) % count($colors)]; + } + $color = $labels[$string]; + + return "background-color: $color; color: white; border-radius: 3px; padding: 0 2px 0 2px"; + } + + return $m[1]; + }, $style); + } + + private static function dump($title, array $dict) + { + $script = array(); + $dict = array_filter($dict); + if (empty($dict)) { + return $script; + } + $script[] = self::call('log', self::quote('%c%s'), self::quote('font-weight: bold'), self::quote($title)); + foreach ($dict as $key => $value) { + $value = json_encode($value); + if (empty($value)) { + $value = self::quote(''); + } + $script[] = self::call('log', self::quote('%s: %o'), self::quote($key), $value); + } + + return $script; + } + + private static function quote($arg) + { + return '"' . addcslashes($arg, "\"\n\\") . '"'; + } + + private static function call() + { + $args = func_get_args(); + $method = array_shift($args); + + return self::call_array($method, $args); + } + + private static function call_array($method, array $args) + { + return 'c.' . $method . '(' . implode(', ', $args) . ');'; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..72f895357a3dd99ca3e90a9d3ac8b47d65db88f4 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Buffers all records until closing the handler and then pass them as batch. + * + * This is useful for a MailHandler to send only one mail per request instead of + * sending one per log message. + * + * @author Christophe Coevoet + */ +class BufferHandler extends AbstractHandler +{ + protected $handler; + protected $bufferSize = 0; + protected $bufferLimit; + protected $flushOnOverflow; + protected $buffer = array(); + protected $initialized = false; + + /** + * @param HandlerInterface $handler Handler. + * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param Boolean $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded + */ + public function __construct(HandlerInterface $handler, $bufferLimit = 0, $level = Logger::DEBUG, $bubble = true, $flushOnOverflow = false) + { + parent::__construct($level, $bubble); + $this->handler = $handler; + $this->bufferLimit = (int) $bufferLimit; + $this->flushOnOverflow = $flushOnOverflow; + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($record['level'] < $this->level) { + return false; + } + + if (!$this->initialized) { + // __destructor() doesn't get called on Fatal errors + register_shutdown_function(array($this, 'close')); + $this->initialized = true; + } + + if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) { + if ($this->flushOnOverflow) { + $this->flush(); + } else { + array_shift($this->buffer); + $this->bufferSize--; + } + } + + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + $this->buffer[] = $record; + $this->bufferSize++; + + return false === $this->bubble; + } + + public function flush() + { + if ($this->bufferSize === 0) { + return; + } + + $this->handler->handleBatch($this->buffer); + $this->clear(); + } + + public function __destruct() + { + // suppress the parent behavior since we already have register_shutdown_function() + // to call close(), and the reference contained there will prevent this from being + // GC'd until the end of the request + } + + /** + * {@inheritdoc} + */ + public function close() + { + $this->flush(); + } + + /** + * Clears the buffer without flushing any messages down to the wrapped handler. + */ + public function clear() + { + $this->bufferSize = 0; + $this->buffer = array(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..b00fa844c38254a25372b99ae101f57c420bd773 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php @@ -0,0 +1,211 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\ChromePHPFormatter; +use Monolog\Logger; + +/** + * Handler sending logs to the ChromePHP extension (http://www.chromephp.com/) + * + * This also works out of the box with Firefox 43+ + * + * @author Christophe Coevoet + */ +class ChromePHPHandler extends AbstractProcessingHandler +{ + /** + * Version of the extension + */ + const VERSION = '4.0'; + + /** + * Header name + */ + const HEADER_NAME = 'X-ChromeLogger-Data'; + + /** + * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+) + */ + const USER_AGENT_REGEX = '{\b(?:Chrome/\d+(?:\.\d+)*|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}'; + + protected static $initialized = false; + + /** + * Tracks whether we sent too much data + * + * Chrome limits the headers to 256KB, so when we sent 240KB we stop sending + * + * @var Boolean + */ + protected static $overflowed = false; + + protected static $json = array( + 'version' => self::VERSION, + 'columns' => array('label', 'log', 'backtrace', 'type'), + 'rows' => array(), + ); + + protected static $sendHeaders = true; + + /** + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + if (!function_exists('json_encode')) { + throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s ChromePHPHandler'); + } + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $messages = array(); + + foreach ($records as $record) { + if ($record['level'] < $this->level) { + continue; + } + $messages[] = $this->processRecord($record); + } + + if (!empty($messages)) { + $messages = $this->getFormatter()->formatBatch($messages); + self::$json['rows'] = array_merge(self::$json['rows'], $messages); + $this->send(); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new ChromePHPFormatter(); + } + + /** + * Creates & sends header for a record + * + * @see sendHeader() + * @see send() + * @param array $record + */ + protected function write(array $record) + { + self::$json['rows'][] = $record['formatted']; + + $this->send(); + } + + /** + * Sends the log header + * + * @see sendHeader() + */ + protected function send() + { + if (self::$overflowed || !self::$sendHeaders) { + return; + } + + if (!self::$initialized) { + self::$initialized = true; + + self::$sendHeaders = $this->headersAccepted(); + if (!self::$sendHeaders) { + return; + } + + self::$json['request_uri'] = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; + } + + $json = @json_encode(self::$json); + $data = base64_encode(utf8_encode($json)); + if (strlen($data) > 240 * 1024) { + self::$overflowed = true; + + $record = array( + 'message' => 'Incomplete logs, chrome header size limit reached', + 'context' => array(), + 'level' => Logger::WARNING, + 'level_name' => Logger::getLevelName(Logger::WARNING), + 'channel' => 'monolog', + 'datetime' => new \DateTime(), + 'extra' => array(), + ); + self::$json['rows'][count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); + $json = @json_encode(self::$json); + $data = base64_encode(utf8_encode($json)); + } + + if (trim($data) !== '') { + $this->sendHeader(self::HEADER_NAME, $data); + } + } + + /** + * Send header string to the client + * + * @param string $header + * @param string $content + */ + protected function sendHeader($header, $content) + { + if (!headers_sent() && self::$sendHeaders) { + header(sprintf('%s: %s', $header, $content)); + } + } + + /** + * Verifies if the headers are accepted by the current user agent + * + * @return Boolean + */ + protected function headersAccepted() + { + if (empty($_SERVER['HTTP_USER_AGENT'])) { + return false; + } + + return preg_match(self::USER_AGENT_REGEX, $_SERVER['HTTP_USER_AGENT']); + } + + /** + * BC getter for the sendHeaders property that has been made static + */ + public function __get($property) + { + if ('sendHeaders' !== $property) { + throw new \InvalidArgumentException('Undefined property '.$property); + } + + return static::$sendHeaders; + } + + /** + * BC setter for the sendHeaders property that has been made static + */ + public function __set($property, $value) + { + if ('sendHeaders' !== $property) { + throw new \InvalidArgumentException('Undefined property '.$property); + } + + static::$sendHeaders = $value; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..cc98697199af56ddddb00f8046343edab3139eb9 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\JsonFormatter; +use Monolog\Logger; + +/** + * CouchDB handler + * + * @author Markus Bachmann + */ +class CouchDBHandler extends AbstractProcessingHandler +{ + private $options; + + public function __construct(array $options = array(), $level = Logger::DEBUG, $bubble = true) + { + $this->options = array_merge(array( + 'host' => 'localhost', + 'port' => 5984, + 'dbname' => 'logger', + 'username' => null, + 'password' => null, + ), $options); + + parent::__construct($level, $bubble); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + $basicAuth = null; + if ($this->options['username']) { + $basicAuth = sprintf('%s:%s@', $this->options['username'], $this->options['password']); + } + + $url = 'http://'.$basicAuth.$this->options['host'].':'.$this->options['port'].'/'.$this->options['dbname']; + $context = stream_context_create(array( + 'http' => array( + 'method' => 'POST', + 'content' => $record['formatted'], + 'ignore_errors' => true, + 'max_redirects' => 0, + 'header' => 'Content-type: application/json', + ), + )); + + if (false === @file_get_contents($url, null, $context)) { + throw new \RuntimeException(sprintf('Could not connect to %s', $url)); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..96b3ca0c57ae9573ab4ca6d0326dd4ab206323c1 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.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 Monolog\Handler; + +use Monolog\Logger; + +/** + * Logs to Cube. + * + * @link http://square.github.com/cube/ + * @author Wan Chen + */ +class CubeHandler extends AbstractProcessingHandler +{ + private $udpConnection; + private $httpConnection; + private $scheme; + private $host; + private $port; + private $acceptedSchemes = array('http', 'udp'); + + /** + * Create a Cube handler + * + * @throws \UnexpectedValueException when given url is not a valid url. + * A valid url must consist of three parts : protocol://host:port + * Only valid protocols used by Cube are http and udp + */ + public function __construct($url, $level = Logger::DEBUG, $bubble = true) + { + $urlInfo = parse_url($url); + + if (!isset($urlInfo['scheme'], $urlInfo['host'], $urlInfo['port'])) { + throw new \UnexpectedValueException('URL "'.$url.'" is not valid'); + } + + if (!in_array($urlInfo['scheme'], $this->acceptedSchemes)) { + throw new \UnexpectedValueException( + 'Invalid protocol (' . $urlInfo['scheme'] . ').' + . ' Valid options are ' . implode(', ', $this->acceptedSchemes)); + } + + $this->scheme = $urlInfo['scheme']; + $this->host = $urlInfo['host']; + $this->port = $urlInfo['port']; + + parent::__construct($level, $bubble); + } + + /** + * Establish a connection to an UDP socket + * + * @throws \LogicException when unable to connect to the socket + * @throws MissingExtensionException when there is no socket extension + */ + protected function connectUdp() + { + if (!extension_loaded('sockets')) { + throw new MissingExtensionException('The sockets extension is required to use udp URLs with the CubeHandler'); + } + + $this->udpConnection = socket_create(AF_INET, SOCK_DGRAM, 0); + if (!$this->udpConnection) { + throw new \LogicException('Unable to create a socket'); + } + + if (!socket_connect($this->udpConnection, $this->host, $this->port)) { + throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port); + } + } + + /** + * Establish a connection to a http server + * @throws \LogicException when no curl extension + */ + protected function connectHttp() + { + if (!extension_loaded('curl')) { + throw new \LogicException('The curl extension is needed to use http URLs with the CubeHandler'); + } + + $this->httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put'); + + if (!$this->httpConnection) { + throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port); + } + + curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, "POST"); + curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $date = $record['datetime']; + + $data = array('time' => $date->format('Y-m-d\TH:i:s.uO')); + unset($record['datetime']); + + if (isset($record['context']['type'])) { + $data['type'] = $record['context']['type']; + unset($record['context']['type']); + } else { + $data['type'] = $record['channel']; + } + + $data['data'] = $record['context']; + $data['data']['level'] = $record['level']; + + if ($this->scheme === 'http') { + $this->writeHttp(json_encode($data)); + } else { + $this->writeUdp(json_encode($data)); + } + } + + private function writeUdp($data) + { + if (!$this->udpConnection) { + $this->connectUdp(); + } + + socket_send($this->udpConnection, $data, strlen($data), 0); + } + + private function writeHttp($data) + { + if (!$this->httpConnection) { + $this->connectHttp(); + } + + curl_setopt($this->httpConnection, CURLOPT_POSTFIELDS, '['.$data.']'); + curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, array( + 'Content-Type: application/json', + 'Content-Length: ' . strlen('['.$data.']'), + )); + + Curl\Util::execute($this->httpConnection, 5, false); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php b/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php new file mode 100644 index 0000000000000000000000000000000000000000..48d30b3586f1ecf152209c5dc98fd7d21ec22e55 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\Curl; + +class Util +{ + private static $retriableErrorCodes = array( + CURLE_COULDNT_RESOLVE_HOST, + CURLE_COULDNT_CONNECT, + CURLE_HTTP_NOT_FOUND, + CURLE_READ_ERROR, + CURLE_OPERATION_TIMEOUTED, + CURLE_HTTP_POST_ERROR, + CURLE_SSL_CONNECT_ERROR, + ); + + /** + * Executes a CURL request with optional retries and exception on failure + * + * @param resource $ch curl handler + * @throws \RuntimeException + */ + public static function execute($ch, $retries = 5, $closeAfterDone = true) + { + while ($retries--) { + if (curl_exec($ch) === false) { + $curlErrno = curl_errno($ch); + + if (false === in_array($curlErrno, self::$retriableErrorCodes, true) || !$retries) { + $curlError = curl_error($ch); + + if ($closeAfterDone) { + curl_close($ch); + } + + throw new \RuntimeException(sprintf('Curl error (code %s): %s', $curlErrno, $curlError)); + } + + continue; + } + + if ($closeAfterDone) { + curl_close($ch); + } + break; + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..7778c22a6809765b78ee4a5351bca963589fc17f --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php @@ -0,0 +1,169 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Simple handler wrapper that deduplicates log records across multiple requests + * + * It also includes the BufferHandler functionality and will buffer + * all messages until the end of the request or flush() is called. + * + * This works by storing all log records' messages above $deduplicationLevel + * to the file specified by $deduplicationStore. When further logs come in at the end of the + * request (or when flush() is called), all those above $deduplicationLevel are checked + * against the existing stored logs. If they match and the timestamps in the stored log is + * not older than $time seconds, the new log record is discarded. If no log record is new, the + * whole data set is discarded. + * + * This is mainly useful in combination with Mail handlers or things like Slack or HipChat handlers + * that send messages to people, to avoid spamming with the same message over and over in case of + * a major component failure like a database server being down which makes all requests fail in the + * same way. + * + * @author Jordi Boggiano + */ +class DeduplicationHandler extends BufferHandler +{ + /** + * @var string + */ + protected $deduplicationStore; + + /** + * @var int + */ + protected $deduplicationLevel; + + /** + * @var int + */ + protected $time; + + /** + * @var bool + */ + private $gc = false; + + /** + * @param HandlerInterface $handler Handler. + * @param string $deduplicationStore The file/path where the deduplication log should be kept + * @param int $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes + * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(HandlerInterface $handler, $deduplicationStore = null, $deduplicationLevel = Logger::ERROR, $time = 60, $bubble = true) + { + parent::__construct($handler, 0, Logger::DEBUG, $bubble, false); + + $this->deduplicationStore = $deduplicationStore === null ? sys_get_temp_dir() . '/monolog-dedup-' . substr(md5(__FILE__), 0, 20) .'.log' : $deduplicationStore; + $this->deduplicationLevel = Logger::toMonologLevel($deduplicationLevel); + $this->time = $time; + } + + public function flush() + { + if ($this->bufferSize === 0) { + return; + } + + $passthru = null; + + foreach ($this->buffer as $record) { + if ($record['level'] >= $this->deduplicationLevel) { + + $passthru = $passthru || !$this->isDuplicate($record); + if ($passthru) { + $this->appendRecord($record); + } + } + } + + // default of null is valid as well as if no record matches duplicationLevel we just pass through + if ($passthru === true || $passthru === null) { + $this->handler->handleBatch($this->buffer); + } + + $this->clear(); + + if ($this->gc) { + $this->collectLogs(); + } + } + + private function isDuplicate(array $record) + { + if (!file_exists($this->deduplicationStore)) { + return false; + } + + $store = file($this->deduplicationStore, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + if (!is_array($store)) { + return false; + } + + $yesterday = time() - 86400; + $timestampValidity = $record['datetime']->getTimestamp() - $this->time; + $expectedMessage = preg_replace('{[\r\n].*}', '', $record['message']); + + for ($i = count($store) - 1; $i >= 0; $i--) { + list($timestamp, $level, $message) = explode(':', $store[$i], 3); + + if ($level === $record['level_name'] && $message === $expectedMessage && $timestamp > $timestampValidity) { + return true; + } + + if ($timestamp < $yesterday) { + $this->gc = true; + } + } + + return false; + } + + private function collectLogs() + { + if (!file_exists($this->deduplicationStore)) { + return false; + } + + $handle = fopen($this->deduplicationStore, 'rw+'); + flock($handle, LOCK_EX); + $validLogs = array(); + + $timestampValidity = time() - $this->time; + + while (!feof($handle)) { + $log = fgets($handle); + if (substr($log, 0, 10) >= $timestampValidity) { + $validLogs[] = $log; + } + } + + ftruncate($handle, 0); + rewind($handle); + foreach ($validLogs as $log) { + fwrite($handle, $log); + } + + flock($handle, LOCK_UN); + fclose($handle); + + $this->gc = false; + } + + private function appendRecord(array $record) + { + file_put_contents($this->deduplicationStore, $record['datetime']->getTimestamp() . ':' . $record['level_name'] . ':' . preg_replace('{[\r\n].*}', '', $record['message']) . "\n", FILE_APPEND); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..b91ffec90530cb31633d302e9c5fe13177e39256 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.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 Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\NormalizerFormatter; +use Doctrine\CouchDB\CouchDBClient; + +/** + * CouchDB handler for Doctrine CouchDB ODM + * + * @author Markus Bachmann + */ +class DoctrineCouchDBHandler extends AbstractProcessingHandler +{ + private $client; + + public function __construct(CouchDBClient $client, $level = Logger::DEBUG, $bubble = true) + { + $this->client = $client; + parent::__construct($level, $bubble); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + $this->client->postDocument($record['formatted']); + } + + protected function getDefaultFormatter() + { + return new NormalizerFormatter; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..ad1011d3ef9a8c2423858ae2a326d8d73e884099 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Aws\Common\Aws; +use Aws\DynamoDb\DynamoDbClient; +use Aws\DynamoDb\Marshaler; +use Monolog\Formatter\ScalarFormatter; +use Monolog\Logger; + +/** + * Amazon DynamoDB handler (http://aws.amazon.com/dynamodb/) + * + * @link https://github.com/aws/aws-sdk-php/ + * @author Andrew Lawson + */ +class DynamoDbHandler extends AbstractProcessingHandler +{ + const DATE_FORMAT = 'Y-m-d\TH:i:s.uO'; + + /** + * @var DynamoDbClient + */ + protected $client; + + /** + * @var string + */ + protected $table; + + /** + * @var int + */ + protected $version; + + /** + * @var Marshaler + */ + protected $marshaler; + + /** + * @param DynamoDbClient $client + * @param string $table + * @param int $level + * @param bool $bubble + */ + public function __construct(DynamoDbClient $client, $table, $level = Logger::DEBUG, $bubble = true) + { + if (defined('Aws\Common\Aws::VERSION') && version_compare(Aws::VERSION, '3.0', '>=')) { + $this->version = 3; + $this->marshaler = new Marshaler; + } else { + $this->version = 2; + } + + $this->client = $client; + $this->table = $table; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $filtered = $this->filterEmptyFields($record['formatted']); + if ($this->version === 3) { + $formatted = $this->marshaler->marshalItem($filtered); + } else { + $formatted = $this->client->formatAttributes($filtered); + } + + $this->client->putItem(array( + 'TableName' => $this->table, + 'Item' => $formatted, + )); + } + + /** + * @param array $record + * @return array + */ + protected function filterEmptyFields(array $record) + { + return array_filter($record, function ($value) { + return !empty($value) || false === $value || 0 === $value; + }); + } + + /** + * {@inheritdoc} + */ + protected function getDefaultFormatter() + { + return new ScalarFormatter(self::DATE_FORMAT); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..819674069148f3269c5e8d82c65c39d5d852a052 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php @@ -0,0 +1,128 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\ElasticaFormatter; +use Monolog\Logger; +use Elastica\Client; +use Elastica\Exception\ExceptionInterface; + +/** + * Elastic Search handler + * + * Usage example: + * + * $client = new \Elastica\Client(); + * $options = array( + * 'index' => 'elastic_index_name', + * 'type' => 'elastic_doc_type', + * ); + * $handler = new ElasticSearchHandler($client, $options); + * $log = new Logger('application'); + * $log->pushHandler($handler); + * + * @author Jelle Vink + */ +class ElasticSearchHandler extends AbstractProcessingHandler +{ + /** + * @var Client + */ + protected $client; + + /** + * @var array Handler config options + */ + protected $options = array(); + + /** + * @param Client $client Elastica Client object + * @param array $options Handler configuration + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(Client $client, array $options = array(), $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + $this->client = $client; + $this->options = array_merge( + array( + 'index' => 'monolog', // Elastic index name + 'type' => 'record', // Elastic document type + 'ignore_error' => false, // Suppress Elastica exceptions + ), + $options + ); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + $this->bulkSend(array($record['formatted'])); + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + if ($formatter instanceof ElasticaFormatter) { + return parent::setFormatter($formatter); + } + throw new \InvalidArgumentException('ElasticSearchHandler is only compatible with ElasticaFormatter'); + } + + /** + * Getter options + * @return array + */ + public function getOptions() + { + return $this->options; + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new ElasticaFormatter($this->options['index'], $this->options['type']); + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $documents = $this->getFormatter()->formatBatch($records); + $this->bulkSend($documents); + } + + /** + * Use Elasticsearch bulk API to send list of documents + * @param array $documents + * @throws \RuntimeException + */ + protected function bulkSend(array $documents) + { + try { + $this->client->addDocuments($documents); + } catch (ExceptionInterface $e) { + if (!$this->options['ignore_error']) { + throw new \RuntimeException("Error sending messages to Elasticsearch", 0, $e); + } + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..1447a584b3fb5db1fc862cd3b43a312c58bec0bf --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Logger; + +/** + * Stores to PHP error_log() handler. + * + * @author Elan Ruusamäe + */ +class ErrorLogHandler extends AbstractProcessingHandler +{ + const OPERATING_SYSTEM = 0; + const SAPI = 4; + + protected $messageType; + protected $expandNewlines; + + /** + * @param int $messageType Says where the error should go. + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param Boolean $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries + */ + public function __construct($messageType = self::OPERATING_SYSTEM, $level = Logger::DEBUG, $bubble = true, $expandNewlines = false) + { + parent::__construct($level, $bubble); + + if (false === in_array($messageType, self::getAvailableTypes())) { + $message = sprintf('The given message type "%s" is not supported', print_r($messageType, true)); + throw new \InvalidArgumentException($message); + } + + $this->messageType = $messageType; + $this->expandNewlines = $expandNewlines; + } + + /** + * @return array With all available types + */ + public static function getAvailableTypes() + { + return array( + self::OPERATING_SYSTEM, + self::SAPI, + ); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('[%datetime%] %channel%.%level_name%: %message% %context% %extra%'); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + if ($this->expandNewlines) { + $lines = preg_split('{[\r\n]+}', (string) $record['formatted']); + foreach ($lines as $line) { + error_log($line, $this->messageType); + } + } else { + error_log((string) $record['formatted'], $this->messageType); + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..2a0f7fd15f4f1db65b9e265fc4cb21d5d3d03e25 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Simple handler wrapper that filters records based on a list of levels + * + * It can be configured with an exact list of levels to allow, or a min/max level. + * + * @author Hennadiy Verkh + * @author Jordi Boggiano + */ +class FilterHandler extends AbstractHandler +{ + /** + * Handler or factory callable($record, $this) + * + * @var callable|\Monolog\Handler\HandlerInterface + */ + protected $handler; + + /** + * Minimum level for logs that are passed to handler + * + * @var int[] + */ + protected $acceptedLevels; + + /** + * Whether the messages that are handled can bubble up the stack or not + * + * @var Boolean + */ + protected $bubble; + + /** + * @param callable|HandlerInterface $handler Handler or factory callable($record, $this). + * @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided + * @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($handler, $minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY, $bubble = true) + { + $this->handler = $handler; + $this->bubble = $bubble; + $this->setAcceptedLevels($minLevelOrList, $maxLevel); + + if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { + throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); + } + } + + /** + * @return array + */ + public function getAcceptedLevels() + { + return array_flip($this->acceptedLevels); + } + + /** + * @param int|string|array $minLevelOrList A list of levels to accept or a minimum level or level name if maxLevel is provided + * @param int|string $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array + */ + public function setAcceptedLevels($minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY) + { + if (is_array($minLevelOrList)) { + $acceptedLevels = array_map('Monolog\Logger::toMonologLevel', $minLevelOrList); + } else { + $minLevelOrList = Logger::toMonologLevel($minLevelOrList); + $maxLevel = Logger::toMonologLevel($maxLevel); + $acceptedLevels = array_values(array_filter(Logger::getLevels(), function ($level) use ($minLevelOrList, $maxLevel) { + return $level >= $minLevelOrList && $level <= $maxLevel; + })); + } + $this->acceptedLevels = array_flip($acceptedLevels); + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return isset($this->acceptedLevels[$record['level']]); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if (!$this->isHandling($record)) { + return false; + } + + // The same logic as in FingersCrossedHandler + if (!$this->handler instanceof HandlerInterface) { + $this->handler = call_user_func($this->handler, $record, $this); + if (!$this->handler instanceof HandlerInterface) { + throw new \RuntimeException("The factory callable should return a HandlerInterface"); + } + } + + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + $this->handler->handle($record); + + return false === $this->bubble; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $filtered = array(); + foreach ($records as $record) { + if ($this->isHandling($record)) { + $filtered[] = $record; + } + } + + $this->handler->handleBatch($filtered); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c3e42efefaa657b73ca43d9893fca40cbc88d6cd --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\FingersCrossed; + +/** + * Interface for activation strategies for the FingersCrossedHandler. + * + * @author Johannes M. Schmitt + */ +interface ActivationStrategyInterface +{ + /** + * Returns whether the given record activates the handler. + * + * @param array $record + * @return Boolean + */ + public function isHandlerActivated(array $record); +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..2a2a64d940c10c860d30a5bf065717cc9f3805f5 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\FingersCrossed; + +use Monolog\Logger; + +/** + * Channel and Error level based monolog activation strategy. Allows to trigger activation + * based on level per channel. e.g. trigger activation on level 'ERROR' by default, except + * for records of the 'sql' channel; those should trigger activation on level 'WARN'. + * + * Example: + * + * + * $activationStrategy = new ChannelLevelActivationStrategy( + * Logger::CRITICAL, + * array( + * 'request' => Logger::ALERT, + * 'sensitive' => Logger::ERROR, + * ) + * ); + * $handler = new FingersCrossedHandler(new StreamHandler('php://stderr'), $activationStrategy); + * + * + * @author Mike Meessen + */ +class ChannelLevelActivationStrategy implements ActivationStrategyInterface +{ + private $defaultActionLevel; + private $channelToActionLevel; + + /** + * @param int $defaultActionLevel The default action level to be used if the record's category doesn't match any + * @param array $channelToActionLevel An array that maps channel names to action levels. + */ + public function __construct($defaultActionLevel, $channelToActionLevel = array()) + { + $this->defaultActionLevel = Logger::toMonologLevel($defaultActionLevel); + $this->channelToActionLevel = array_map('Monolog\Logger::toMonologLevel', $channelToActionLevel); + } + + public function isHandlerActivated(array $record) + { + if (isset($this->channelToActionLevel[$record['channel']])) { + return $record['level'] >= $this->channelToActionLevel[$record['channel']]; + } + + return $record['level'] >= $this->defaultActionLevel; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..6e630852fcf42f59c9ddb1f460115da6cc3a5481 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\FingersCrossed; + +use Monolog\Logger; + +/** + * Error level based activation strategy. + * + * @author Johannes M. Schmitt + */ +class ErrorLevelActivationStrategy implements ActivationStrategyInterface +{ + private $actionLevel; + + public function __construct($actionLevel) + { + $this->actionLevel = Logger::toMonologLevel($actionLevel); + } + + public function isHandlerActivated(array $record) + { + return $record['level'] >= $this->actionLevel; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..d1dcaacf0186cc8448ff65572feb5f60507280c1 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php @@ -0,0 +1,163 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; +use Monolog\Handler\FingersCrossed\ActivationStrategyInterface; +use Monolog\Logger; + +/** + * Buffers all records until a certain level is reached + * + * The advantage of this approach is that you don't get any clutter in your log files. + * Only requests which actually trigger an error (or whatever your actionLevel is) will be + * in the logs, but they will contain all records, not only those above the level threshold. + * + * You can find the various activation strategies in the + * Monolog\Handler\FingersCrossed\ namespace. + * + * @author Jordi Boggiano + */ +class FingersCrossedHandler extends AbstractHandler +{ + protected $handler; + protected $activationStrategy; + protected $buffering = true; + protected $bufferSize; + protected $buffer = array(); + protected $stopBuffering; + protected $passthruLevel; + + /** + * @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler). + * @param int|ActivationStrategyInterface $activationStrategy Strategy which determines when this handler takes action + * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param Boolean $stopBuffering Whether the handler should stop buffering after being triggered (default true) + * @param int $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered + */ + public function __construct($handler, $activationStrategy = null, $bufferSize = 0, $bubble = true, $stopBuffering = true, $passthruLevel = null) + { + if (null === $activationStrategy) { + $activationStrategy = new ErrorLevelActivationStrategy(Logger::WARNING); + } + + // convert simple int activationStrategy to an object + if (!$activationStrategy instanceof ActivationStrategyInterface) { + $activationStrategy = new ErrorLevelActivationStrategy($activationStrategy); + } + + $this->handler = $handler; + $this->activationStrategy = $activationStrategy; + $this->bufferSize = $bufferSize; + $this->bubble = $bubble; + $this->stopBuffering = $stopBuffering; + + if ($passthruLevel !== null) { + $this->passthruLevel = Logger::toMonologLevel($passthruLevel); + } + + if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { + throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); + } + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return true; + } + + /** + * Manually activate this logger regardless of the activation strategy + */ + public function activate() + { + if ($this->stopBuffering) { + $this->buffering = false; + } + if (!$this->handler instanceof HandlerInterface) { + $record = end($this->buffer) ?: null; + + $this->handler = call_user_func($this->handler, $record, $this); + if (!$this->handler instanceof HandlerInterface) { + throw new \RuntimeException("The factory callable should return a HandlerInterface"); + } + } + $this->handler->handleBatch($this->buffer); + $this->buffer = array(); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + if ($this->buffering) { + $this->buffer[] = $record; + if ($this->bufferSize > 0 && count($this->buffer) > $this->bufferSize) { + array_shift($this->buffer); + } + if ($this->activationStrategy->isHandlerActivated($record)) { + $this->activate(); + } + } else { + $this->handler->handle($record); + } + + return false === $this->bubble; + } + + /** + * {@inheritdoc} + */ + public function close() + { + if (null !== $this->passthruLevel) { + $level = $this->passthruLevel; + $this->buffer = array_filter($this->buffer, function ($record) use ($level) { + return $record['level'] >= $level; + }); + if (count($this->buffer) > 0) { + $this->handler->handleBatch($this->buffer); + $this->buffer = array(); + } + } + } + + /** + * Resets the state of the handler. Stops forwarding records to the wrapped handler. + */ + public function reset() + { + $this->buffering = true; + } + + /** + * Clears the buffer without flushing any messages down to the wrapped handler. + * + * It also resets the handler to its initial buffering state. + */ + public function clear() + { + $this->buffer = array(); + $this->reset(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..fee479508882d28192a795a09394d9b7f88d8e2f --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php @@ -0,0 +1,195 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\WildfireFormatter; + +/** + * Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol. + * + * @author Eric Clemmons (@ericclemmons) + */ +class FirePHPHandler extends AbstractProcessingHandler +{ + /** + * WildFire JSON header message format + */ + const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'; + + /** + * FirePHP structure for parsing messages & their presentation + */ + const STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'; + + /** + * Must reference a "known" plugin, otherwise headers won't display in FirePHP + */ + const PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'; + + /** + * Header prefix for Wildfire to recognize & parse headers + */ + const HEADER_PREFIX = 'X-Wf'; + + /** + * Whether or not Wildfire vendor-specific headers have been generated & sent yet + */ + protected static $initialized = false; + + /** + * Shared static message index between potentially multiple handlers + * @var int + */ + protected static $messageIndex = 1; + + protected static $sendHeaders = true; + + /** + * Base header creation function used by init headers & record headers + * + * @param array $meta Wildfire Plugin, Protocol & Structure Indexes + * @param string $message Log message + * @return array Complete header string ready for the client as key and message as value + */ + protected function createHeader(array $meta, $message) + { + $header = sprintf('%s-%s', self::HEADER_PREFIX, join('-', $meta)); + + return array($header => $message); + } + + /** + * Creates message header from record + * + * @see createHeader() + * @param array $record + * @return string + */ + protected function createRecordHeader(array $record) + { + // Wildfire is extensible to support multiple protocols & plugins in a single request, + // but we're not taking advantage of that (yet), so we're using "1" for simplicity's sake. + return $this->createHeader( + array(1, 1, 1, self::$messageIndex++), + $record['formatted'] + ); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new WildfireFormatter(); + } + + /** + * Wildfire initialization headers to enable message parsing + * + * @see createHeader() + * @see sendHeader() + * @return array + */ + protected function getInitHeaders() + { + // Initial payload consists of required headers for Wildfire + return array_merge( + $this->createHeader(array('Protocol', 1), self::PROTOCOL_URI), + $this->createHeader(array(1, 'Structure', 1), self::STRUCTURE_URI), + $this->createHeader(array(1, 'Plugin', 1), self::PLUGIN_URI) + ); + } + + /** + * Send header string to the client + * + * @param string $header + * @param string $content + */ + protected function sendHeader($header, $content) + { + if (!headers_sent() && self::$sendHeaders) { + header(sprintf('%s: %s', $header, $content)); + } + } + + /** + * Creates & sends header for a record, ensuring init headers have been sent prior + * + * @see sendHeader() + * @see sendInitHeaders() + * @param array $record + */ + protected function write(array $record) + { + if (!self::$sendHeaders) { + return; + } + + // WildFire-specific headers must be sent prior to any messages + if (!self::$initialized) { + self::$initialized = true; + + self::$sendHeaders = $this->headersAccepted(); + if (!self::$sendHeaders) { + return; + } + + foreach ($this->getInitHeaders() as $header => $content) { + $this->sendHeader($header, $content); + } + } + + $header = $this->createRecordHeader($record); + if (trim(current($header)) !== '') { + $this->sendHeader(key($header), current($header)); + } + } + + /** + * Verifies if the headers are accepted by the current user agent + * + * @return Boolean + */ + protected function headersAccepted() + { + if (!empty($_SERVER['HTTP_USER_AGENT']) && preg_match('{\bFirePHP/\d+\.\d+\b}', $_SERVER['HTTP_USER_AGENT'])) { + return true; + } + + return isset($_SERVER['HTTP_X_FIREPHP_VERSION']); + } + + /** + * BC getter for the sendHeaders property that has been made static + */ + public function __get($property) + { + if ('sendHeaders' !== $property) { + throw new \InvalidArgumentException('Undefined property '.$property); + } + + return static::$sendHeaders; + } + + /** + * BC setter for the sendHeaders property that has been made static + */ + public function __set($property, $value) + { + if ('sendHeaders' !== $property) { + throw new \InvalidArgumentException('Undefined property '.$property); + } + + static::$sendHeaders = $value; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..c43c0134ff5130b3a463671e82612cbc5ed7601e --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Logger; + +/** + * Sends logs to Fleep.io using Webhook integrations + * + * You'll need a Fleep.io account to use this handler. + * + * @see https://fleep.io/integrations/webhooks/ Fleep Webhooks Documentation + * @author Ando Roots + */ +class FleepHookHandler extends SocketHandler +{ + const FLEEP_HOST = 'fleep.io'; + + const FLEEP_HOOK_URI = '/hook/'; + + /** + * @var string Webhook token (specifies the conversation where logs are sent) + */ + protected $token; + + /** + * Construct a new Fleep.io Handler. + * + * For instructions on how to create a new web hook in your conversations + * see https://fleep.io/integrations/webhooks/ + * + * @param string $token Webhook token + * @param bool|int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @throws MissingExtensionException + */ + public function __construct($token, $level = Logger::DEBUG, $bubble = true) + { + if (!extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FleepHookHandler'); + } + + $this->token = $token; + + $connectionString = 'ssl://' . self::FLEEP_HOST . ':443'; + parent::__construct($connectionString, $level, $bubble); + } + + /** + * Returns the default formatter to use with this handler + * + * Overloaded to remove empty context and extra arrays from the end of the log message. + * + * @return LineFormatter + */ + protected function getDefaultFormatter() + { + return new LineFormatter(null, null, true, true); + } + + /** + * Handles a log record + * + * @param array $record + */ + public function write(array $record) + { + parent::write($record); + $this->closeSocket(); + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the header of the API Call + * + * @param string $content + * @return string + */ + private function buildHeader($content) + { + $header = "POST " . self::FLEEP_HOOK_URI . $this->token . " HTTP/1.1\r\n"; + $header .= "Host: " . self::FLEEP_HOST . "\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + /** + * Builds the body of API call + * + * @param array $record + * @return string + */ + private function buildContent($record) + { + $dataArray = array( + 'message' => $record['formatted'], + ); + + return http_build_query($dataArray); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..dd9a361c2aba6d5d6ff4c55dd94a8e1991bab2a3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\FlowdockFormatter; +use Monolog\Formatter\FormatterInterface; + +/** + * Sends notifications through the Flowdock push API + * + * This must be configured with a FlowdockFormatter instance via setFormatter() + * + * Notes: + * API token - Flowdock API token + * + * @author Dominik Liebler + * @see https://www.flowdock.com/api/push + */ +class FlowdockHandler extends SocketHandler +{ + /** + * @var string + */ + protected $apiToken; + + /** + * @param string $apiToken + * @param bool|int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * + * @throws MissingExtensionException if OpenSSL is missing + */ + public function __construct($apiToken, $level = Logger::DEBUG, $bubble = true) + { + if (!extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FlowdockHandler'); + } + + parent::__construct('ssl://api.flowdock.com:443', $level, $bubble); + $this->apiToken = $apiToken; + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + if (!$formatter instanceof FlowdockFormatter) { + throw new \InvalidArgumentException('The FlowdockHandler requires an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); + } + + return parent::setFormatter($formatter); + } + + /** + * Gets the default formatter. + * + * @return FormatterInterface + */ + protected function getDefaultFormatter() + { + throw new \InvalidArgumentException('The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + parent::write($record); + + $this->closeSocket(); + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the body of API call + * + * @param array $record + * @return string + */ + private function buildContent($record) + { + return json_encode($record['formatted']['flowdock']); + } + + /** + * Builds the header of the API Call + * + * @param string $content + * @return string + */ + private function buildHeader($content) + { + $header = "POST /v1/messages/team_inbox/" . $this->apiToken . " HTTP/1.1\r\n"; + $header .= "Host: api.flowdock.com\r\n"; + $header .= "Content-Type: application/json\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..d3847d828f7cf52a4ef713ba5803605d2ccba7ee --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.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 Monolog\Handler; + +use Gelf\IMessagePublisher; +use Gelf\PublisherInterface; +use Gelf\Publisher; +use InvalidArgumentException; +use Monolog\Logger; +use Monolog\Formatter\GelfMessageFormatter; + +/** + * Handler to send messages to a Graylog2 (http://www.graylog2.org) server + * + * @author Matt Lehner + * @author Benjamin Zikarsky + */ +class GelfHandler extends AbstractProcessingHandler +{ + /** + * @var Publisher the publisher object that sends the message to the server + */ + protected $publisher; + + /** + * @param PublisherInterface|IMessagePublisher|Publisher $publisher a publisher object + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($publisher, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + + if (!$publisher instanceof Publisher && !$publisher instanceof IMessagePublisher && !$publisher instanceof PublisherInterface) { + throw new InvalidArgumentException('Invalid publisher, expected a Gelf\Publisher, Gelf\IMessagePublisher or Gelf\PublisherInterface instance'); + } + + $this->publisher = $publisher; + } + + /** + * {@inheritdoc} + */ + public function close() + { + $this->publisher = null; + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $this->publisher->publish($record['formatted']); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new GelfMessageFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..663f5a923d94e33e81561f6b77fb45c5b0daed76 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; + +/** + * Forwards records to multiple handlers + * + * @author Lenar Lõhmus + */ +class GroupHandler extends AbstractHandler +{ + protected $handlers; + + /** + * @param array $handlers Array of Handlers. + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(array $handlers, $bubble = true) + { + foreach ($handlers as $handler) { + if (!$handler instanceof HandlerInterface) { + throw new \InvalidArgumentException('The first argument of the GroupHandler must be an array of HandlerInterface instances.'); + } + } + + $this->handlers = $handlers; + $this->bubble = $bubble; + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + foreach ($this->handlers as $handler) { + if ($handler->isHandling($record)) { + return true; + } + } + + return false; + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + foreach ($this->handlers as $handler) { + $handler->handle($record); + } + + return false === $this->bubble; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + if ($this->processors) { + $processed = array(); + foreach ($records as $record) { + foreach ($this->processors as $processor) { + $processed[] = call_user_func($processor, $record); + } + } + $records = $processed; + } + + foreach ($this->handlers as $handler) { + $handler->handleBatch($records); + } + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + foreach ($this->handlers as $handler) { + $handler->setFormatter($formatter); + } + + return $this; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d920c4ba0496272156d9db556d1f46aa26eca6f7 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; + +/** + * Interface that all Monolog Handlers must implement + * + * @author Jordi Boggiano + */ +interface HandlerInterface +{ + /** + * Checks whether the given record will be handled by this handler. + * + * This is mostly done for performance reasons, to avoid calling processors for nothing. + * + * Handlers should still check the record levels within handle(), returning false in isHandling() + * is no guarantee that handle() will not be called, and isHandling() might not be called + * for a given record. + * + * @param array $record Partial log record containing only a level key + * + * @return Boolean + */ + public function isHandling(array $record); + + /** + * Handles a record. + * + * All records may be passed to this method, and the handler should discard + * those that it does not want to handle. + * + * The return value of this function controls the bubbling process of the handler stack. + * Unless the bubbling is interrupted (by returning true), the Logger class will keep on + * calling further handlers in the stack with a given log record. + * + * @param array $record The record to handle + * @return Boolean true means that this handler handled the record, and that bubbling is not permitted. + * false means the record was either not processed or that this handler allows bubbling. + */ + public function handle(array $record); + + /** + * Handles a set of records at once. + * + * @param array $records The records to handle (an array of record arrays) + */ + public function handleBatch(array $records); + + /** + * Adds a processor in the stack. + * + * @param callable $callback + * @return self + */ + public function pushProcessor($callback); + + /** + * Removes the processor on top of the stack and returns it. + * + * @return callable + */ + public function popProcessor(); + + /** + * Sets the formatter. + * + * @param FormatterInterface $formatter + * @return self + */ + public function setFormatter(FormatterInterface $formatter); + + /** + * Gets the formatter. + * + * @return FormatterInterface + */ + public function getFormatter(); +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php new file mode 100644 index 0000000000000000000000000000000000000000..56bc2704faa14868edc78fa974884305e26067bf --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; + +/** + * This simple wrapper class can be used to extend handlers functionality. + * + * Example: A filtering handle. Inherit from this class, override isHandling() like this + * + * public function isHandling(array $record) + * { + * if ($record meets certain conditions) { + * return false; + * } + * return $this->handler->isHandling($record); + * } + * + * @author Alexey Karapetov + */ +class HandlerWrapper implements HandlerInterface +{ + /** + * @var HandlerInterface + */ + protected $handler; + + /** + * HandlerWrapper constructor. + * @param HandlerInterface $handler + */ + public function __construct(HandlerInterface $handler) + { + $this->handler = $handler; + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return $this->handler->isHandling($record); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + return $this->handler->handle($record); + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + return $this->handler->handleBatch($records); + } + + /** + * {@inheritdoc} + */ + public function pushProcessor($callback) + { + $this->handler->pushProcessor($callback); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function popProcessor() + { + return $this->handler->popProcessor(); + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->handler->setFormatter($formatter); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + return $this->handler->getFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..73049f369b194f7ea910ca225771733843f1d904 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php @@ -0,0 +1,350 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Sends notifications through the hipchat api to a hipchat room + * + * Notes: + * API token - HipChat API token + * Room - HipChat Room Id or name, where messages are sent + * Name - Name used to send the message (from) + * notify - Should the message trigger a notification in the clients + * version - The API version to use (HipChatHandler::API_V1 | HipChatHandler::API_V2) + * + * @author Rafael Dohms + * @see https://www.hipchat.com/docs/api + */ +class HipChatHandler extends SocketHandler +{ + /** + * Use API version 1 + */ + const API_V1 = 'v1'; + + /** + * Use API version v2 + */ + const API_V2 = 'v2'; + + /** + * The maximum allowed length for the name used in the "from" field. + */ + const MAXIMUM_NAME_LENGTH = 15; + + /** + * The maximum allowed length for the message. + */ + const MAXIMUM_MESSAGE_LENGTH = 9500; + + /** + * @var string + */ + private $token; + + /** + * @var string + */ + private $room; + + /** + * @var string + */ + private $name; + + /** + * @var bool + */ + private $notify; + + /** + * @var string + */ + private $format; + + /** + * @var string + */ + private $host; + + /** + * @var string + */ + private $version; + + /** + * @param string $token HipChat API Token + * @param string $room The room that should be alerted of the message (Id or Name) + * @param string $name Name used in the "from" field. + * @param bool $notify Trigger a notification in clients or not + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $useSSL Whether to connect via SSL. + * @param string $format The format of the messages (default to text, can be set to html if you have html in the messages) + * @param string $host The HipChat server hostname. + * @param string $version The HipChat API version (default HipChatHandler::API_V1) + */ + public function __construct($token, $room, $name = 'Monolog', $notify = false, $level = Logger::CRITICAL, $bubble = true, $useSSL = true, $format = 'text', $host = 'api.hipchat.com', $version = self::API_V1) + { + if ($version == self::API_V1 && !$this->validateStringLength($name, static::MAXIMUM_NAME_LENGTH)) { + throw new \InvalidArgumentException('The supplied name is too long. HipChat\'s v1 API supports names up to 15 UTF-8 characters.'); + } + + $connectionString = $useSSL ? 'ssl://'.$host.':443' : $host.':80'; + parent::__construct($connectionString, $level, $bubble); + + $this->token = $token; + $this->name = $name; + $this->notify = $notify; + $this->room = $room; + $this->format = $format; + $this->host = $host; + $this->version = $version; + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the body of API call + * + * @param array $record + * @return string + */ + private function buildContent($record) + { + $dataArray = array( + 'notify' => $this->version == self::API_V1 ? + ($this->notify ? 1 : 0) : + ($this->notify ? 'true' : 'false'), + 'message' => $record['formatted'], + 'message_format' => $this->format, + 'color' => $this->getAlertColor($record['level']), + ); + + if (!$this->validateStringLength($dataArray['message'], static::MAXIMUM_MESSAGE_LENGTH)) { + if (function_exists('mb_substr')) { + $dataArray['message'] = mb_substr($dataArray['message'], 0, static::MAXIMUM_MESSAGE_LENGTH).' [truncated]'; + } else { + $dataArray['message'] = substr($dataArray['message'], 0, static::MAXIMUM_MESSAGE_LENGTH).' [truncated]'; + } + } + + // if we are using the legacy API then we need to send some additional information + if ($this->version == self::API_V1) { + $dataArray['room_id'] = $this->room; + } + + // append the sender name if it is set + // always append it if we use the v1 api (it is required in v1) + if ($this->version == self::API_V1 || $this->name !== null) { + $dataArray['from'] = (string) $this->name; + } + + return http_build_query($dataArray); + } + + /** + * Builds the header of the API Call + * + * @param string $content + * @return string + */ + private function buildHeader($content) + { + if ($this->version == self::API_V1) { + $header = "POST /v1/rooms/message?format=json&auth_token={$this->token} HTTP/1.1\r\n"; + } else { + // needed for rooms with special (spaces, etc) characters in the name + $room = rawurlencode($this->room); + $header = "POST /v2/room/{$room}/notification?auth_token={$this->token} HTTP/1.1\r\n"; + } + + $header .= "Host: {$this->host}\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + /** + * Assigns a color to each level of log records. + * + * @param int $level + * @return string + */ + protected function getAlertColor($level) + { + switch (true) { + case $level >= Logger::ERROR: + return 'red'; + case $level >= Logger::WARNING: + return 'yellow'; + case $level >= Logger::INFO: + return 'green'; + case $level == Logger::DEBUG: + return 'gray'; + default: + return 'yellow'; + } + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + parent::write($record); + $this->closeSocket(); + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + if (count($records) == 0) { + return true; + } + + $batchRecords = $this->combineRecords($records); + + $handled = false; + foreach ($batchRecords as $batchRecord) { + if ($this->isHandling($batchRecord)) { + $this->write($batchRecord); + $handled = true; + } + } + + if (!$handled) { + return false; + } + + return false === $this->bubble; + } + + /** + * Combines multiple records into one. Error level of the combined record + * will be the highest level from the given records. Datetime will be taken + * from the first record. + * + * @param $records + * @return array + */ + private function combineRecords($records) + { + $batchRecord = null; + $batchRecords = array(); + $messages = array(); + $formattedMessages = array(); + $level = 0; + $levelName = null; + $datetime = null; + + foreach ($records as $record) { + $record = $this->processRecord($record); + + if ($record['level'] > $level) { + $level = $record['level']; + $levelName = $record['level_name']; + } + + if (null === $datetime) { + $datetime = $record['datetime']; + } + + $messages[] = $record['message']; + $messageStr = implode(PHP_EOL, $messages); + $formattedMessages[] = $this->getFormatter()->format($record); + $formattedMessageStr = implode('', $formattedMessages); + + $batchRecord = array( + 'message' => $messageStr, + 'formatted' => $formattedMessageStr, + 'context' => array(), + 'extra' => array(), + ); + + if (!$this->validateStringLength($batchRecord['formatted'], static::MAXIMUM_MESSAGE_LENGTH)) { + // Pop the last message and implode the remaining messages + $lastMessage = array_pop($messages); + $lastFormattedMessage = array_pop($formattedMessages); + $batchRecord['message'] = implode(PHP_EOL, $messages); + $batchRecord['formatted'] = implode('', $formattedMessages); + + $batchRecords[] = $batchRecord; + $messages = array($lastMessage); + $formattedMessages = array($lastFormattedMessage); + + $batchRecord = null; + } + } + + if (null !== $batchRecord) { + $batchRecords[] = $batchRecord; + } + + // Set the max level and datetime for all records + foreach ($batchRecords as &$batchRecord) { + $batchRecord = array_merge( + $batchRecord, + array( + 'level' => $level, + 'level_name' => $levelName, + 'datetime' => $datetime, + ) + ); + } + + return $batchRecords; + } + + /** + * Validates the length of a string. + * + * If the `mb_strlen()` function is available, it will use that, as HipChat + * allows UTF-8 characters. Otherwise, it will fall back to `strlen()`. + * + * Note that this might cause false failures in the specific case of using + * a valid name with less than 16 characters, but 16 or more bytes, on a + * system where `mb_strlen()` is unavailable. + * + * @param string $str + * @param int $length + * + * @return bool + */ + private function validateStringLength($str, $length) + { + if (function_exists('mb_strlen')) { + return (mb_strlen($str) <= $length); + } + + return (strlen($str) <= $length); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..d60a3c82515b2374635d9112962f86695e33031b --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * IFTTTHandler uses cURL to trigger IFTTT Maker actions + * + * Register a secret key and trigger/event name at https://ifttt.com/maker + * + * value1 will be the channel from monolog's Logger constructor, + * value2 will be the level name (ERROR, WARNING, ..) + * value3 will be the log record's message + * + * @author Nehal Patel + */ +class IFTTTHandler extends AbstractProcessingHandler +{ + private $eventName; + private $secretKey; + + /** + * @param string $eventName The name of the IFTTT Maker event that should be triggered + * @param string $secretKey A valid IFTTT secret key + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($eventName, $secretKey, $level = Logger::ERROR, $bubble = true) + { + $this->eventName = $eventName; + $this->secretKey = $secretKey; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritdoc} + */ + public function write(array $record) + { + $postData = array( + "value1" => $record["channel"], + "value2" => $record["level_name"], + "value3" => $record["message"], + ); + $postString = json_encode($postData); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $postString); + curl_setopt($ch, CURLOPT_HTTPHEADER, array( + "Content-Type: application/json", + )); + + Curl\Util::execute($ch); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..494c605bc98521efca1c271dad637fdca015d686 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * @author Robert Kaufmann III + */ +class LogEntriesHandler extends SocketHandler +{ + /** + * @var string + */ + protected $logToken; + + /** + * @param string $token Log token supplied by LogEntries + * @param bool $useSSL Whether or not SSL encryption should be used. + * @param int $level The minimum logging level to trigger this handler + * @param bool $bubble Whether or not messages that are handled should bubble up the stack. + * + * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing + */ + public function __construct($token, $useSSL = true, $level = Logger::DEBUG, $bubble = true) + { + if ($useSSL && !extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler'); + } + + $endpoint = $useSSL ? 'ssl://data.logentries.com:443' : 'data.logentries.com:80'; + parent::__construct($endpoint, $level, $bubble); + $this->logToken = $token; + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + return $this->logToken . ' ' . $record['formatted']; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..bcd62e1c55cab2aedccba5a1f01ca53ce0bd2a83 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\LogglyFormatter; + +/** + * Sends errors to Loggly. + * + * @author Przemek Sobstel + * @author Adam Pancutt + * @author Gregory Barchard + */ +class LogglyHandler extends AbstractProcessingHandler +{ + const HOST = 'logs-01.loggly.com'; + const ENDPOINT_SINGLE = 'inputs'; + const ENDPOINT_BATCH = 'bulk'; + + protected $token; + + protected $tag = array(); + + public function __construct($token, $level = Logger::DEBUG, $bubble = true) + { + if (!extension_loaded('curl')) { + throw new \LogicException('The curl extension is needed to use the LogglyHandler'); + } + + $this->token = $token; + + parent::__construct($level, $bubble); + } + + public function setTag($tag) + { + $tag = !empty($tag) ? $tag : array(); + $this->tag = is_array($tag) ? $tag : array($tag); + } + + public function addTag($tag) + { + if (!empty($tag)) { + $tag = is_array($tag) ? $tag : array($tag); + $this->tag = array_unique(array_merge($this->tag, $tag)); + } + } + + protected function write(array $record) + { + $this->send($record["formatted"], self::ENDPOINT_SINGLE); + } + + public function handleBatch(array $records) + { + $level = $this->level; + + $records = array_filter($records, function ($record) use ($level) { + return ($record['level'] >= $level); + }); + + if ($records) { + $this->send($this->getFormatter()->formatBatch($records), self::ENDPOINT_BATCH); + } + } + + protected function send($data, $endpoint) + { + $url = sprintf("https://%s/%s/%s/", self::HOST, $endpoint, $this->token); + + $headers = array('Content-Type: application/json'); + + if (!empty($this->tag)) { + $headers[] = 'X-LOGGLY-TAG: '.implode(',', $this->tag); + } + + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $data); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + + Curl\Util::execute($ch); + } + + protected function getDefaultFormatter() + { + return new LogglyFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..9e23283852ac2aa297da4a93503597b78a897d2b --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Base class for all mail handlers + * + * @author Gyula Sallai + */ +abstract class MailHandler extends AbstractProcessingHandler +{ + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $messages = array(); + + foreach ($records as $record) { + if ($record['level'] < $this->level) { + continue; + } + $messages[] = $this->processRecord($record); + } + + if (!empty($messages)) { + $this->send((string) $this->getFormatter()->formatBatch($messages), $messages); + } + } + + /** + * Send a mail with the given content + * + * @param string $content formatted email body to be sent + * @param array $records the array of log records that formed this content + */ + abstract protected function send($content, array $records); + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $this->send((string) $record['formatted'], array($record)); + } + + protected function getHighestRecord(array $records) + { + $highestRecord = null; + foreach ($records as $record) { + if ($highestRecord === null || $highestRecord['level'] < $record['level']) { + $highestRecord = $record; + } + } + + return $highestRecord; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..ab95924f9c1c58c3e983a00ae65478a8d58b6f7a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * MandrillHandler uses cURL to send the emails to the Mandrill API + * + * @author Adam Nicholson + */ +class MandrillHandler extends MailHandler +{ + protected $message; + protected $apiKey; + + /** + * @param string $apiKey A valid Mandrill API key + * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($apiKey, $message, $level = Logger::ERROR, $bubble = true) + { + parent::__construct($level, $bubble); + + if (!$message instanceof \Swift_Message && is_callable($message)) { + $message = call_user_func($message); + } + if (!$message instanceof \Swift_Message) { + throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it'); + } + $this->message = $message; + $this->apiKey = $apiKey; + } + + /** + * {@inheritdoc} + */ + protected function send($content, array $records) + { + $message = clone $this->message; + $message->setBody($content); + $message->setDate(time()); + + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json'); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array( + 'key' => $this->apiKey, + 'raw_message' => (string) $message, + 'async' => false, + ))); + + Curl\Util::execute($ch); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php b/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php new file mode 100644 index 0000000000000000000000000000000000000000..4724a7e2d07a5a25ef4d10abffe40bb0374bc3c9 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Exception can be thrown if an extension for an handler is missing + * + * @author Christian Bergau + */ +class MissingExtensionException extends \Exception +{ +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..56fe755b96c3a2d8e498a19f77f81bb574b08d5a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\NormalizerFormatter; + +/** + * Logs to a MongoDB database. + * + * usage example: + * + * $log = new Logger('application'); + * $mongodb = new MongoDBHandler(new \Mongo("mongodb://localhost:27017"), "logs", "prod"); + * $log->pushHandler($mongodb); + * + * @author Thomas Tourlourat + */ +class MongoDBHandler extends AbstractProcessingHandler +{ + protected $mongoCollection; + + public function __construct($mongo, $database, $collection, $level = Logger::DEBUG, $bubble = true) + { + if (!($mongo instanceof \MongoClient || $mongo instanceof \Mongo || $mongo instanceof \MongoDB\Client)) { + throw new \InvalidArgumentException('MongoClient, Mongo or MongoDB\Client instance required'); + } + + $this->mongoCollection = $mongo->selectCollection($database, $collection); + + parent::__construct($level, $bubble); + } + + protected function write(array $record) + { + if ($this->mongoCollection instanceof \MongoDB\Collection) { + $this->mongoCollection->insertOne($record["formatted"]); + } else { + $this->mongoCollection->save($record["formatted"]); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new NormalizerFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..d7807fd11629aeacc805f54ac646f6c9c5e3d09d --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php @@ -0,0 +1,185 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\LineFormatter; + +/** + * NativeMailerHandler uses the mail() function to send the emails + * + * @author Christophe Coevoet + * @author Mark Garrett + */ +class NativeMailerHandler extends MailHandler +{ + /** + * The email addresses to which the message will be sent + * @var array + */ + protected $to; + + /** + * The subject of the email + * @var string + */ + protected $subject; + + /** + * Optional headers for the message + * @var array + */ + protected $headers = array(); + + /** + * Optional parameters for the message + * @var array + */ + protected $parameters = array(); + + /** + * The wordwrap length for the message + * @var int + */ + protected $maxColumnWidth; + + /** + * The Content-type for the message + * @var string + */ + protected $contentType = 'text/plain'; + + /** + * The encoding for the message + * @var string + */ + protected $encoding = 'utf-8'; + + /** + * @param string|array $to The receiver of the mail + * @param string $subject The subject of the mail + * @param string $from The sender of the mail + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param int $maxColumnWidth The maximum column width that the message lines will have + */ + public function __construct($to, $subject, $from, $level = Logger::ERROR, $bubble = true, $maxColumnWidth = 70) + { + parent::__construct($level, $bubble); + $this->to = is_array($to) ? $to : array($to); + $this->subject = $subject; + $this->addHeader(sprintf('From: %s', $from)); + $this->maxColumnWidth = $maxColumnWidth; + } + + /** + * Add headers to the message + * + * @param string|array $headers Custom added headers + * @return self + */ + public function addHeader($headers) + { + foreach ((array) $headers as $header) { + if (strpos($header, "\n") !== false || strpos($header, "\r") !== false) { + throw new \InvalidArgumentException('Headers can not contain newline characters for security reasons'); + } + $this->headers[] = $header; + } + + return $this; + } + + /** + * Add parameters to the message + * + * @param string|array $parameters Custom added parameters + * @return self + */ + public function addParameter($parameters) + { + $this->parameters = array_merge($this->parameters, (array) $parameters); + + return $this; + } + + /** + * {@inheritdoc} + */ + protected function send($content, array $records) + { + $content = wordwrap($content, $this->maxColumnWidth); + $headers = ltrim(implode("\r\n", $this->headers) . "\r\n", "\r\n"); + $headers .= 'Content-type: ' . $this->getContentType() . '; charset=' . $this->getEncoding() . "\r\n"; + if ($this->getContentType() == 'text/html' && false === strpos($headers, 'MIME-Version:')) { + $headers .= 'MIME-Version: 1.0' . "\r\n"; + } + + $subject = $this->subject; + if ($records) { + $subjectFormatter = new LineFormatter($this->subject); + $subject = $subjectFormatter->format($this->getHighestRecord($records)); + } + + $parameters = implode(' ', $this->parameters); + foreach ($this->to as $to) { + mail($to, $subject, $content, $headers, $parameters); + } + } + + /** + * @return string $contentType + */ + public function getContentType() + { + return $this->contentType; + } + + /** + * @return string $encoding + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML + * messages. + * @return self + */ + public function setContentType($contentType) + { + if (strpos($contentType, "\n") !== false || strpos($contentType, "\r") !== false) { + throw new \InvalidArgumentException('The content type can not contain newline characters to prevent email header injection'); + } + + $this->contentType = $contentType; + + return $this; + } + + /** + * @param string $encoding + * @return self + */ + public function setEncoding($encoding) + { + if (strpos($encoding, "\n") !== false || strpos($encoding, "\r") !== false) { + throw new \InvalidArgumentException('The encoding can not contain newline characters to prevent email header injection'); + } + + $this->encoding = $encoding; + + return $this; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..6718e9e09d839f79dc66d5c3ab3d4312cd8cabc1 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php @@ -0,0 +1,202 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\NormalizerFormatter; + +/** + * Class to record a log on a NewRelic application. + * Enabling New Relic High Security mode may prevent capture of useful information. + * + * @see https://docs.newrelic.com/docs/agents/php-agent + * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security + */ +class NewRelicHandler extends AbstractProcessingHandler +{ + /** + * Name of the New Relic application that will receive logs from this handler. + * + * @var string + */ + protected $appName; + + /** + * Name of the current transaction + * + * @var string + */ + protected $transactionName; + + /** + * Some context and extra data is passed into the handler as arrays of values. Do we send them as is + * (useful if we are using the API), or explode them for display on the NewRelic RPM website? + * + * @var bool + */ + protected $explodeArrays; + + /** + * {@inheritDoc} + * + * @param string $appName + * @param bool $explodeArrays + * @param string $transactionName + */ + public function __construct( + $level = Logger::ERROR, + $bubble = true, + $appName = null, + $explodeArrays = false, + $transactionName = null + ) { + parent::__construct($level, $bubble); + + $this->appName = $appName; + $this->explodeArrays = $explodeArrays; + $this->transactionName = $transactionName; + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + if (!$this->isNewRelicEnabled()) { + throw new MissingExtensionException('The newrelic PHP extension is required to use the NewRelicHandler'); + } + + if ($appName = $this->getAppName($record['context'])) { + $this->setNewRelicAppName($appName); + } + + if ($transactionName = $this->getTransactionName($record['context'])) { + $this->setNewRelicTransactionName($transactionName); + unset($record['formatted']['context']['transaction_name']); + } + + if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Exception) { + newrelic_notice_error($record['message'], $record['context']['exception']); + unset($record['formatted']['context']['exception']); + } else { + newrelic_notice_error($record['message']); + } + + if (isset($record['formatted']['context']) && is_array($record['formatted']['context'])) { + foreach ($record['formatted']['context'] as $key => $parameter) { + if (is_array($parameter) && $this->explodeArrays) { + foreach ($parameter as $paramKey => $paramValue) { + $this->setNewRelicParameter('context_' . $key . '_' . $paramKey, $paramValue); + } + } else { + $this->setNewRelicParameter('context_' . $key, $parameter); + } + } + } + + if (isset($record['formatted']['extra']) && is_array($record['formatted']['extra'])) { + foreach ($record['formatted']['extra'] as $key => $parameter) { + if (is_array($parameter) && $this->explodeArrays) { + foreach ($parameter as $paramKey => $paramValue) { + $this->setNewRelicParameter('extra_' . $key . '_' . $paramKey, $paramValue); + } + } else { + $this->setNewRelicParameter('extra_' . $key, $parameter); + } + } + } + } + + /** + * Checks whether the NewRelic extension is enabled in the system. + * + * @return bool + */ + protected function isNewRelicEnabled() + { + return extension_loaded('newrelic'); + } + + /** + * Returns the appname where this log should be sent. Each log can override the default appname, set in this + * handler's constructor, by providing the appname in it's context. + * + * @param array $context + * @return null|string + */ + protected function getAppName(array $context) + { + if (isset($context['appname'])) { + return $context['appname']; + } + + return $this->appName; + } + + /** + * Returns the name of the current transaction. Each log can override the default transaction name, set in this + * handler's constructor, by providing the transaction_name in it's context + * + * @param array $context + * + * @return null|string + */ + protected function getTransactionName(array $context) + { + if (isset($context['transaction_name'])) { + return $context['transaction_name']; + } + + return $this->transactionName; + } + + /** + * Sets the NewRelic application that should receive this log. + * + * @param string $appName + */ + protected function setNewRelicAppName($appName) + { + newrelic_set_appname($appName); + } + + /** + * Overwrites the name of the current transaction + * + * @param string $transactionName + */ + protected function setNewRelicTransactionName($transactionName) + { + newrelic_name_transaction($transactionName); + } + + /** + * @param string $key + * @param mixed $value + */ + protected function setNewRelicParameter($key, $value) + { + if (null === $value || is_scalar($value)) { + newrelic_add_custom_parameter($key, $value); + } else { + newrelic_add_custom_parameter($key, @json_encode($value)); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new NormalizerFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..4b8458833cae1b0c2ac4c3738ec01d1134bf3fd4 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.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 Monolog\Handler; + +use Monolog\Logger; + +/** + * Blackhole + * + * Any record it can handle will be thrown away. This can be used + * to put on top of an existing stack to override it temporarily. + * + * @author Jordi Boggiano + */ +class NullHandler extends AbstractHandler +{ + /** + * @param int $level The minimum logging level at which this handler will be triggered + */ + public function __construct($level = Logger::DEBUG) + { + parent::__construct($level, false); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($record['level'] < $this->level) { + return false; + } + + return true; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..1f2076a49d114af741151896336393ac0b25d09a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php @@ -0,0 +1,242 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Exception; +use Monolog\Formatter\LineFormatter; +use Monolog\Logger; +use PhpConsole\Connector; +use PhpConsole\Handler; +use PhpConsole\Helper; + +/** + * Monolog handler for Google Chrome extension "PHP Console" + * + * Display PHP error/debug log messages in Google Chrome console and notification popups, executes PHP code remotely + * + * Usage: + * 1. Install Google Chrome extension https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef + * 2. See overview https://github.com/barbushin/php-console#overview + * 3. Install PHP Console library https://github.com/barbushin/php-console#installation + * 4. Example (result will looks like http://i.hizliresim.com/vg3Pz4.png) + * + * $logger = new \Monolog\Logger('all', array(new \Monolog\Handler\PHPConsoleHandler())); + * \Monolog\ErrorHandler::register($logger); + * echo $undefinedVar; + * $logger->addDebug('SELECT * FROM users', array('db', 'time' => 0.012)); + * PC::debug($_SERVER); // PHP Console debugger for any type of vars + * + * @author Sergey Barbushin https://www.linkedin.com/in/barbushin + */ +class PHPConsoleHandler extends AbstractProcessingHandler +{ + private $options = array( + 'enabled' => true, // bool Is PHP Console server enabled + 'classesPartialsTraceIgnore' => array('Monolog\\'), // array Hide calls of classes started with... + 'debugTagsKeysInContext' => array(0, 'tag'), // bool Is PHP Console server enabled + 'useOwnErrorsHandler' => false, // bool Enable errors handling + 'useOwnExceptionsHandler' => false, // bool Enable exceptions handling + 'sourcesBasePath' => null, // string Base path of all project sources to strip in errors source paths + 'registerHelper' => true, // bool Register PhpConsole\Helper that allows short debug calls like PC::debug($var, 'ta.g.s') + 'serverEncoding' => null, // string|null Server internal encoding + 'headersLimit' => null, // int|null Set headers size limit for your web-server + 'password' => null, // string|null Protect PHP Console connection by password + 'enableSslOnlyMode' => false, // bool Force connection by SSL for clients with PHP Console installed + 'ipMasks' => array(), // array Set IP masks of clients that will be allowed to connect to PHP Console: array('192.168.*.*', '127.0.0.1') + 'enableEvalListener' => false, // bool Enable eval request to be handled by eval dispatcher(if enabled, 'password' option is also required) + 'dumperDetectCallbacks' => false, // bool Convert callback items in dumper vars to (callback SomeClass::someMethod) strings + 'dumperLevelLimit' => 5, // int Maximum dumped vars array or object nested dump level + 'dumperItemsCountLimit' => 100, // int Maximum dumped var same level array items or object properties number + 'dumperItemSizeLimit' => 5000, // int Maximum length of any string or dumped array item + 'dumperDumpSizeLimit' => 500000, // int Maximum approximate size of dumped vars result formatted in JSON + 'detectDumpTraceAndSource' => false, // bool Autodetect and append trace data to debug + 'dataStorage' => null, // PhpConsole\Storage|null Fixes problem with custom $_SESSION handler(see http://goo.gl/Ne8juJ) + ); + + /** @var Connector */ + private $connector; + + /** + * @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details + * @param Connector|null $connector Instance of \PhpConsole\Connector class (optional) + * @param int $level + * @param bool $bubble + * @throws Exception + */ + public function __construct(array $options = array(), Connector $connector = null, $level = Logger::DEBUG, $bubble = true) + { + if (!class_exists('PhpConsole\Connector')) { + throw new Exception('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); + } + parent::__construct($level, $bubble); + $this->options = $this->initOptions($options); + $this->connector = $this->initConnector($connector); + } + + private function initOptions(array $options) + { + $wrongOptions = array_diff(array_keys($options), array_keys($this->options)); + if ($wrongOptions) { + throw new Exception('Unknown options: ' . implode(', ', $wrongOptions)); + } + + return array_replace($this->options, $options); + } + + private function initConnector(Connector $connector = null) + { + if (!$connector) { + if ($this->options['dataStorage']) { + Connector::setPostponeStorage($this->options['dataStorage']); + } + $connector = Connector::getInstance(); + } + + if ($this->options['registerHelper'] && !Helper::isRegistered()) { + Helper::register(); + } + + if ($this->options['enabled'] && $connector->isActiveClient()) { + if ($this->options['useOwnErrorsHandler'] || $this->options['useOwnExceptionsHandler']) { + $handler = Handler::getInstance(); + $handler->setHandleErrors($this->options['useOwnErrorsHandler']); + $handler->setHandleExceptions($this->options['useOwnExceptionsHandler']); + $handler->start(); + } + if ($this->options['sourcesBasePath']) { + $connector->setSourcesBasePath($this->options['sourcesBasePath']); + } + if ($this->options['serverEncoding']) { + $connector->setServerEncoding($this->options['serverEncoding']); + } + if ($this->options['password']) { + $connector->setPassword($this->options['password']); + } + if ($this->options['enableSslOnlyMode']) { + $connector->enableSslOnlyMode(); + } + if ($this->options['ipMasks']) { + $connector->setAllowedIpMasks($this->options['ipMasks']); + } + if ($this->options['headersLimit']) { + $connector->setHeadersLimit($this->options['headersLimit']); + } + if ($this->options['detectDumpTraceAndSource']) { + $connector->getDebugDispatcher()->detectTraceAndSource = true; + } + $dumper = $connector->getDumper(); + $dumper->levelLimit = $this->options['dumperLevelLimit']; + $dumper->itemsCountLimit = $this->options['dumperItemsCountLimit']; + $dumper->itemSizeLimit = $this->options['dumperItemSizeLimit']; + $dumper->dumpSizeLimit = $this->options['dumperDumpSizeLimit']; + $dumper->detectCallbacks = $this->options['dumperDetectCallbacks']; + if ($this->options['enableEvalListener']) { + $connector->startEvalRequestsListener(); + } + } + + return $connector; + } + + public function getConnector() + { + return $this->connector; + } + + public function getOptions() + { + return $this->options; + } + + public function handle(array $record) + { + if ($this->options['enabled'] && $this->connector->isActiveClient()) { + return parent::handle($record); + } + + return !$this->bubble; + } + + /** + * Writes the record down to the log of the implementing handler + * + * @param array $record + * @return void + */ + protected function write(array $record) + { + if ($record['level'] < Logger::NOTICE) { + $this->handleDebugRecord($record); + } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof Exception) { + $this->handleExceptionRecord($record); + } else { + $this->handleErrorRecord($record); + } + } + + private function handleDebugRecord(array $record) + { + $tags = $this->getRecordTags($record); + $message = $record['message']; + if ($record['context']) { + $message .= ' ' . json_encode($this->connector->getDumper()->dump(array_filter($record['context']))); + } + $this->connector->getDebugDispatcher()->dispatchDebug($message, $tags, $this->options['classesPartialsTraceIgnore']); + } + + private function handleExceptionRecord(array $record) + { + $this->connector->getErrorsDispatcher()->dispatchException($record['context']['exception']); + } + + private function handleErrorRecord(array $record) + { + $context = $record['context']; + + $this->connector->getErrorsDispatcher()->dispatchError( + isset($context['code']) ? $context['code'] : null, + isset($context['message']) ? $context['message'] : $record['message'], + isset($context['file']) ? $context['file'] : null, + isset($context['line']) ? $context['line'] : null, + $this->options['classesPartialsTraceIgnore'] + ); + } + + private function getRecordTags(array &$record) + { + $tags = null; + if (!empty($record['context'])) { + $context = & $record['context']; + foreach ($this->options['debugTagsKeysInContext'] as $key) { + if (!empty($context[$key])) { + $tags = $context[$key]; + if ($key === 0) { + array_shift($context); + } else { + unset($context[$key]); + } + break; + } + } + } + + return $tags ?: strtolower($record['level_name']); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('%message%'); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..1ae85845d86dcd9748496ea548c0158ce166293e --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Psr\Log\LoggerInterface; + +/** + * Proxies log messages to an existing PSR-3 compliant logger. + * + * @author Michael Moussa + */ +class PsrHandler extends AbstractHandler +{ + /** + * PSR-3 compliant logger + * + * @var LoggerInterface + */ + protected $logger; + + /** + * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(LoggerInterface $logger, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->logger = $logger; + } + + /** + * {@inheritDoc} + */ + public function handle(array $record) + { + if (!$this->isHandling($record)) { + return false; + } + + $this->logger->log(strtolower($record['level_name']), $record['message'], $record['context']); + + return false === $this->bubble; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..bba72005927c0007dd53310c21b20446067f7924 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php @@ -0,0 +1,185 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Sends notifications through the pushover api to mobile phones + * + * @author Sebastian Göttschkes + * @see https://www.pushover.net/api + */ +class PushoverHandler extends SocketHandler +{ + private $token; + private $users; + private $title; + private $user; + private $retry; + private $expire; + + private $highPriorityLevel; + private $emergencyLevel; + private $useFormattedMessage = false; + + /** + * All parameters that can be sent to Pushover + * @see https://pushover.net/api + * @var array + */ + private $parameterNames = array( + 'token' => true, + 'user' => true, + 'message' => true, + 'device' => true, + 'title' => true, + 'url' => true, + 'url_title' => true, + 'priority' => true, + 'timestamp' => true, + 'sound' => true, + 'retry' => true, + 'expire' => true, + 'callback' => true, + ); + + /** + * Sounds the api supports by default + * @see https://pushover.net/api#sounds + * @var array + */ + private $sounds = array( + 'pushover', 'bike', 'bugle', 'cashregister', 'classical', 'cosmic', 'falling', 'gamelan', 'incoming', + 'intermission', 'magic', 'mechanical', 'pianobar', 'siren', 'spacealarm', 'tugboat', 'alien', 'climb', + 'persistent', 'echo', 'updown', 'none', + ); + + /** + * @param string $token Pushover api token + * @param string|array $users Pushover user id or array of ids the message will be sent to + * @param string $title Title sent to the Pushover API + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param Boolean $useSSL Whether to connect via SSL. Required when pushing messages to users that are not + * the pushover.net app owner. OpenSSL is required for this option. + * @param int $highPriorityLevel The minimum logging level at which this handler will start + * sending "high priority" requests to the Pushover API + * @param int $emergencyLevel The minimum logging level at which this handler will start + * sending "emergency" requests to the Pushover API + * @param int $retry The retry parameter specifies how often (in seconds) the Pushover servers will send the same notification to the user. + * @param int $expire The expire parameter specifies how many seconds your notification will continue to be retried for (every retry seconds). + */ + public function __construct($token, $users, $title = null, $level = Logger::CRITICAL, $bubble = true, $useSSL = true, $highPriorityLevel = Logger::CRITICAL, $emergencyLevel = Logger::EMERGENCY, $retry = 30, $expire = 25200) + { + $connectionString = $useSSL ? 'ssl://api.pushover.net:443' : 'api.pushover.net:80'; + parent::__construct($connectionString, $level, $bubble); + + $this->token = $token; + $this->users = (array) $users; + $this->title = $title ?: gethostname(); + $this->highPriorityLevel = Logger::toMonologLevel($highPriorityLevel); + $this->emergencyLevel = Logger::toMonologLevel($emergencyLevel); + $this->retry = $retry; + $this->expire = $expire; + } + + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + private function buildContent($record) + { + // Pushover has a limit of 512 characters on title and message combined. + $maxMessageLength = 512 - strlen($this->title); + + $message = ($this->useFormattedMessage) ? $record['formatted'] : $record['message']; + $message = substr($message, 0, $maxMessageLength); + + $timestamp = $record['datetime']->getTimestamp(); + + $dataArray = array( + 'token' => $this->token, + 'user' => $this->user, + 'message' => $message, + 'title' => $this->title, + 'timestamp' => $timestamp, + ); + + if (isset($record['level']) && $record['level'] >= $this->emergencyLevel) { + $dataArray['priority'] = 2; + $dataArray['retry'] = $this->retry; + $dataArray['expire'] = $this->expire; + } elseif (isset($record['level']) && $record['level'] >= $this->highPriorityLevel) { + $dataArray['priority'] = 1; + } + + // First determine the available parameters + $context = array_intersect_key($record['context'], $this->parameterNames); + $extra = array_intersect_key($record['extra'], $this->parameterNames); + + // Least important info should be merged with subsequent info + $dataArray = array_merge($extra, $context, $dataArray); + + // Only pass sounds that are supported by the API + if (isset($dataArray['sound']) && !in_array($dataArray['sound'], $this->sounds)) { + unset($dataArray['sound']); + } + + return http_build_query($dataArray); + } + + private function buildHeader($content) + { + $header = "POST /1/messages.json HTTP/1.1\r\n"; + $header .= "Host: api.pushover.net\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + protected function write(array $record) + { + foreach ($this->users as $user) { + $this->user = $user; + + parent::write($record); + $this->closeSocket(); + } + + $this->user = null; + } + + public function setHighPriorityLevel($value) + { + $this->highPriorityLevel = $value; + } + + public function setEmergencyLevel($value) + { + $this->emergencyLevel = $value; + } + + /** + * Use the formatted message? + * @param bool $value + */ + public function useFormattedMessage($value) + { + $this->useFormattedMessage = (boolean) $value; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..d3f9ed8ff5518ff458707c5e6fa9451a277c25cf --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php @@ -0,0 +1,231 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Formatter\FormatterInterface; +use Monolog\Logger; +use Raven_Client; + +/** + * Handler to send messages to a Sentry (https://github.com/getsentry/sentry) server + * using raven-php (https://github.com/getsentry/raven-php) + * + * @author Marc Abramowitz + */ +class RavenHandler extends AbstractProcessingHandler +{ + /** + * Translates Monolog log levels to Raven log levels. + */ + private $logLevels = array( + Logger::DEBUG => Raven_Client::DEBUG, + Logger::INFO => Raven_Client::INFO, + Logger::NOTICE => Raven_Client::INFO, + Logger::WARNING => Raven_Client::WARNING, + Logger::ERROR => Raven_Client::ERROR, + Logger::CRITICAL => Raven_Client::FATAL, + Logger::ALERT => Raven_Client::FATAL, + Logger::EMERGENCY => Raven_Client::FATAL, + ); + + /** + * @var string should represent the current version of the calling + * software. Can be any string (git commit, version number) + */ + private $release; + + /** + * @var Raven_Client the client object that sends the message to the server + */ + protected $ravenClient; + + /** + * @var LineFormatter The formatter to use for the logs generated via handleBatch() + */ + protected $batchFormatter; + + /** + * @param Raven_Client $ravenClient + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(Raven_Client $ravenClient, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->ravenClient = $ravenClient; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $level = $this->level; + + // filter records based on their level + $records = array_filter($records, function ($record) use ($level) { + return $record['level'] >= $level; + }); + + if (!$records) { + return; + } + + // the record with the highest severity is the "main" one + $record = array_reduce($records, function ($highest, $record) { + if ($record['level'] > $highest['level']) { + return $record; + } + + return $highest; + }); + + // the other ones are added as a context item + $logs = array(); + foreach ($records as $r) { + $logs[] = $this->processRecord($r); + } + + if ($logs) { + $record['context']['logs'] = (string) $this->getBatchFormatter()->formatBatch($logs); + } + + $this->handle($record); + } + + /** + * Sets the formatter for the logs generated by handleBatch(). + * + * @param FormatterInterface $formatter + */ + public function setBatchFormatter(FormatterInterface $formatter) + { + $this->batchFormatter = $formatter; + } + + /** + * Gets the formatter for the logs generated by handleBatch(). + * + * @return FormatterInterface + */ + public function getBatchFormatter() + { + if (!$this->batchFormatter) { + $this->batchFormatter = $this->getDefaultBatchFormatter(); + } + + return $this->batchFormatter; + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $previousUserContext = false; + $options = array(); + $options['level'] = $this->logLevels[$record['level']]; + $options['tags'] = array(); + if (!empty($record['extra']['tags'])) { + $options['tags'] = array_merge($options['tags'], $record['extra']['tags']); + unset($record['extra']['tags']); + } + if (!empty($record['context']['tags'])) { + $options['tags'] = array_merge($options['tags'], $record['context']['tags']); + unset($record['context']['tags']); + } + if (!empty($record['context']['fingerprint'])) { + $options['fingerprint'] = $record['context']['fingerprint']; + unset($record['context']['fingerprint']); + } + if (!empty($record['context']['logger'])) { + $options['logger'] = $record['context']['logger']; + unset($record['context']['logger']); + } else { + $options['logger'] = $record['channel']; + } + foreach ($this->getExtraParameters() as $key) { + foreach (array('extra', 'context') as $source) { + if (!empty($record[$source][$key])) { + $options[$key] = $record[$source][$key]; + unset($record[$source][$key]); + } + } + } + if (!empty($record['context'])) { + $options['extra']['context'] = $record['context']; + if (!empty($record['context']['user'])) { + $previousUserContext = $this->ravenClient->context->user; + $this->ravenClient->user_context($record['context']['user']); + unset($options['extra']['context']['user']); + } + } + if (!empty($record['extra'])) { + $options['extra']['extra'] = $record['extra']; + } + + if (!empty($this->release) && !isset($options['release'])) { + $options['release'] = $this->release; + } + + if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { + $options['extra']['message'] = $record['formatted']; + $this->ravenClient->captureException($record['context']['exception'], $options); + } else { + $this->ravenClient->captureMessage($record['formatted'], array(), $options); + } + + if ($previousUserContext !== false) { + $this->ravenClient->user_context($previousUserContext); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('[%channel%] %message%'); + } + + /** + * Gets the default formatter for the logs generated by handleBatch(). + * + * @return FormatterInterface + */ + protected function getDefaultBatchFormatter() + { + return new LineFormatter(); + } + + /** + * Gets extra parameters supported by Raven that can be found in "extra" and "context" + * + * @return array + */ + protected function getExtraParameters() + { + return array('checksum', 'release'); + } + + /** + * @param string $value + */ + public function setRelease($value) + { + $this->release = $value; + + return $this; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..590f99657e17916fad4a8dfca9776b37eda4e37c --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Logger; + +/** + * Logs to a Redis key using rpush + * + * usage example: + * + * $log = new Logger('application'); + * $redis = new RedisHandler(new Predis\Client("tcp://localhost:6379"), "logs", "prod"); + * $log->pushHandler($redis); + * + * @author Thomas Tourlourat + */ +class RedisHandler extends AbstractProcessingHandler +{ + private $redisClient; + private $redisKey; + protected $capSize; + + /** + * @param \Predis\Client|\Redis $redis The redis instance + * @param string $key The key name to push records to + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param int $capSize Number of entries to limit list size to + */ + public function __construct($redis, $key, $level = Logger::DEBUG, $bubble = true, $capSize = false) + { + if (!(($redis instanceof \Predis\Client) || ($redis instanceof \Redis))) { + throw new \InvalidArgumentException('Predis\Client or Redis instance required'); + } + + $this->redisClient = $redis; + $this->redisKey = $key; + $this->capSize = $capSize; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + if ($this->capSize) { + $this->writeCapped($record); + } else { + $this->redisClient->rpush($this->redisKey, $record["formatted"]); + } + } + + /** + * Write and cap the collection + * Writes the record to the redis list and caps its + * + * @param array $record associative record array + * @return void + */ + protected function writeCapped(array $record) + { + if ($this->redisClient instanceof \Redis) { + $this->redisClient->multi() + ->rpush($this->redisKey, $record["formatted"]) + ->ltrim($this->redisKey, -$this->capSize, -1) + ->exec(); + } else { + $redisKey = $this->redisKey; + $capSize = $this->capSize; + $this->redisClient->transaction(function ($tx) use ($record, $redisKey, $capSize) { + $tx->rpush($redisKey, $record["formatted"]); + $tx->ltrim($redisKey, -$capSize, -1); + }); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..0d9de1a2152390516e620e137325ab53fec4bc62 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use RollbarNotifier; +use Exception; +use Monolog\Logger; + +/** + * Sends errors to Rollbar + * + * If the context data contains a `payload` key, that is used as an array + * of payload options to RollbarNotifier's report_message/report_exception methods. + * + * Rollbar's context info will contain the context + extra keys from the log record + * merged, and then on top of that a few keys: + * + * - level (rollbar level name) + * - monolog_level (monolog level name, raw level, as rollbar only has 5 but monolog 8) + * - channel + * - datetime (unix timestamp) + * + * @author Paul Statezny + */ +class RollbarHandler extends AbstractProcessingHandler +{ + /** + * Rollbar notifier + * + * @var RollbarNotifier + */ + protected $rollbarNotifier; + + protected $levelMap = array( + Logger::DEBUG => 'debug', + Logger::INFO => 'info', + Logger::NOTICE => 'info', + Logger::WARNING => 'warning', + Logger::ERROR => 'error', + Logger::CRITICAL => 'critical', + Logger::ALERT => 'critical', + Logger::EMERGENCY => 'critical', + ); + + /** + * Records whether any log records have been added since the last flush of the rollbar notifier + * + * @var bool + */ + private $hasRecords = false; + + protected $initialized = false; + + /** + * @param RollbarNotifier $rollbarNotifier RollbarNotifier object constructed with valid token + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(RollbarNotifier $rollbarNotifier, $level = Logger::ERROR, $bubble = true) + { + $this->rollbarNotifier = $rollbarNotifier; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + if (!$this->initialized) { + // __destructor() doesn't get called on Fatal errors + register_shutdown_function(array($this, 'close')); + $this->initialized = true; + } + + $context = $record['context']; + $payload = array(); + if (isset($context['payload'])) { + $payload = $context['payload']; + unset($context['payload']); + } + $context = array_merge($context, $record['extra'], array( + 'level' => $this->levelMap[$record['level']], + 'monolog_level' => $record['level_name'], + 'channel' => $record['channel'], + 'datetime' => $record['datetime']->format('U'), + )); + + if (isset($context['exception']) && $context['exception'] instanceof Exception) { + $exception = $context['exception']; + unset($context['exception']); + + $this->rollbarNotifier->report_exception($exception, $context, $payload); + } else { + $this->rollbarNotifier->report_message( + $record['message'], + $context['level'], + $context, + $payload + ); + } + + $this->hasRecords = true; + } + + public function flush() + { + if ($this->hasRecords) { + $this->rollbarNotifier->flush(); + $this->hasRecords = false; + } + } + + /** + * {@inheritdoc} + */ + public function close() + { + $this->flush(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..3b60b3d15cd375d527ea72d494948c82f95ba6eb --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php @@ -0,0 +1,178 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Stores logs to files that are rotated every day and a limited number of files are kept. + * + * This rotation is only intended to be used as a workaround. Using logrotate to + * handle the rotation is strongly encouraged when you can use it. + * + * @author Christophe Coevoet + * @author Jordi Boggiano + */ +class RotatingFileHandler extends StreamHandler +{ + const FILE_PER_DAY = 'Y-m-d'; + const FILE_PER_MONTH = 'Y-m'; + const FILE_PER_YEAR = 'Y'; + + protected $filename; + protected $maxFiles; + protected $mustRotate; + protected $nextRotation; + protected $filenameFormat; + protected $dateFormat; + + /** + * @param string $filename + * @param int $maxFiles The maximal amount of files to keep (0 means unlimited) + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) + * @param Boolean $useLocking Try to lock log file before doing any writes + */ + public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) + { + $this->filename = $filename; + $this->maxFiles = (int) $maxFiles; + $this->nextRotation = new \DateTime('tomorrow'); + $this->filenameFormat = '{filename}-{date}'; + $this->dateFormat = 'Y-m-d'; + + parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking); + } + + /** + * {@inheritdoc} + */ + public function close() + { + parent::close(); + + if (true === $this->mustRotate) { + $this->rotate(); + } + } + + public function setFilenameFormat($filenameFormat, $dateFormat) + { + if (!preg_match('{^Y(([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) { + trigger_error( + 'Invalid date format - format must be one of '. + 'RotatingFileHandler::FILE_PER_DAY ("Y-m-d"), RotatingFileHandler::FILE_PER_MONTH ("Y-m") '. + 'or RotatingFileHandler::FILE_PER_YEAR ("Y"), or you can set one of the '. + 'date formats using slashes, underscores and/or dots instead of dashes.', + E_USER_DEPRECATED + ); + } + if (substr_count($filenameFormat, '{date}') === 0) { + trigger_error( + 'Invalid filename format - format should contain at least `{date}`, because otherwise rotating is impossible.', + E_USER_DEPRECATED + ); + } + $this->filenameFormat = $filenameFormat; + $this->dateFormat = $dateFormat; + $this->url = $this->getTimedFilename(); + $this->close(); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + // on the first record written, if the log is new, we should rotate (once per day) + if (null === $this->mustRotate) { + $this->mustRotate = !file_exists($this->url); + } + + if ($this->nextRotation < $record['datetime']) { + $this->mustRotate = true; + $this->close(); + } + + parent::write($record); + } + + /** + * Rotates the files. + */ + protected function rotate() + { + // update filename + $this->url = $this->getTimedFilename(); + $this->nextRotation = new \DateTime('tomorrow'); + + // skip GC of old logs if files are unlimited + if (0 === $this->maxFiles) { + return; + } + + $logFiles = glob($this->getGlobPattern()); + if ($this->maxFiles >= count($logFiles)) { + // no files to remove + return; + } + + // Sorting the files by name to remove the older ones + usort($logFiles, function ($a, $b) { + return strcmp($b, $a); + }); + + foreach (array_slice($logFiles, $this->maxFiles) as $file) { + if (is_writable($file)) { + // suppress errors here as unlink() might fail if two processes + // are cleaning up/rotating at the same time + set_error_handler(function ($errno, $errstr, $errfile, $errline) {}); + unlink($file); + restore_error_handler(); + } + } + + $this->mustRotate = false; + } + + protected function getTimedFilename() + { + $fileInfo = pathinfo($this->filename); + $timedFilename = str_replace( + array('{filename}', '{date}'), + array($fileInfo['filename'], date($this->dateFormat)), + $fileInfo['dirname'] . '/' . $this->filenameFormat + ); + + if (!empty($fileInfo['extension'])) { + $timedFilename .= '.'.$fileInfo['extension']; + } + + return $timedFilename; + } + + protected function getGlobPattern() + { + $fileInfo = pathinfo($this->filename); + $glob = str_replace( + array('{filename}', '{date}'), + array($fileInfo['filename'], '*'), + $fileInfo['dirname'] . '/' . $this->filenameFormat + ); + if (!empty($fileInfo['extension'])) { + $glob .= '.'.$fileInfo['extension']; + } + + return $glob; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..9509ae3785bd4ab11774e9772211f0b046a5c78b --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Sampling handler + * + * A sampled event stream can be useful for logging high frequency events in + * a production environment where you only need an idea of what is happening + * and are not concerned with capturing every occurrence. Since the decision to + * handle or not handle a particular event is determined randomly, the + * resulting sampled log is not guaranteed to contain 1/N of the events that + * occurred in the application, but based on the Law of large numbers, it will + * tend to be close to this ratio with a large number of attempts. + * + * @author Bryan Davis + * @author Kunal Mehta + */ +class SamplingHandler extends AbstractHandler +{ + /** + * @var callable|HandlerInterface $handler + */ + protected $handler; + + /** + * @var int $factor + */ + protected $factor; + + /** + * @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler). + * @param int $factor Sample factor + */ + public function __construct($handler, $factor) + { + parent::__construct(); + $this->handler = $handler; + $this->factor = $factor; + + if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { + throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); + } + } + + public function isHandling(array $record) + { + return $this->handler->isHandling($record); + } + + public function handle(array $record) + { + if ($this->isHandling($record) && mt_rand(1, $this->factor) === 1) { + // The same logic as in FingersCrossedHandler + if (!$this->handler instanceof HandlerInterface) { + $this->handler = call_user_func($this->handler, $record, $this); + if (!$this->handler instanceof HandlerInterface) { + throw new \RuntimeException("The factory callable should return a HandlerInterface"); + } + } + + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + $this->handler->handle($record); + } + + return false === $this->bubble; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php b/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php new file mode 100644 index 0000000000000000000000000000000000000000..cb0b8717205f59d385259991f888dac72da35bac --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php @@ -0,0 +1,248 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\Slack; + +use Monolog\Logger; +use Monolog\Formatter\LineFormatter; +use Monolog\Formatter\FormatterInterface; + +/** + * Slack record utility helping to log to Slack webhooks or API. + * + * @author Greg Kedzierski + * @author Haralan Dobrev + * @see https://api.slack.com/incoming-webhooks + * @see https://api.slack.com/docs/message-attachments + */ +class SlackRecord +{ + const COLOR_DANGER = 'danger'; + + const COLOR_WARNING = 'warning'; + + const COLOR_GOOD = 'good'; + + const COLOR_DEFAULT = '#e3e4e6'; + + /** + * Slack channel (encoded ID or name) + * @var string|null + */ + private $channel; + + /** + * Name of a bot + * @var string + */ + private $username; + + /** + * Emoji icon name + * @var string + */ + private $iconEmoji; + + /** + * Whether the message should be added to Slack as attachment (plain text otherwise) + * @var bool + */ + private $useAttachment; + + /** + * Whether the the context/extra messages added to Slack as attachments are in a short style + * @var bool + */ + private $useShortAttachment; + + /** + * Whether the attachment should include context and extra data + * @var bool + */ + private $includeContextAndExtra; + + /** + * @var FormatterInterface + */ + private $formatter; + + /** + * @var LineFormatter + */ + private $lineFormatter; + + public function __construct($channel = null, $username = 'Monolog', $useAttachment = true, $iconEmoji = null, $useShortAttachment = false, $includeContextAndExtra = false, FormatterInterface $formatter = null) + { + $this->channel = $channel; + $this->username = $username; + $this->iconEmoji = trim($iconEmoji, ':'); + $this->useAttachment = $useAttachment; + $this->useShortAttachment = $useShortAttachment; + $this->includeContextAndExtra = $includeContextAndExtra; + $this->formatter = $formatter; + + if ($this->includeContextAndExtra) { + $this->lineFormatter = new LineFormatter(); + } + } + + public function getSlackData(array $record) + { + $dataArray = array( + 'username' => $this->username, + 'text' => '', + ); + + if ($this->channel) { + $dataArray['channel'] = $this->channel; + } + + if ($this->formatter) { + $message = $this->formatter->format($record); + } else { + $message = $record['message']; + } + + if ($this->useAttachment) { + $attachment = array( + 'fallback' => $message, + 'text' => $message, + 'color' => $this->getAttachmentColor($record['level']), + 'fields' => array(), + ); + + if ($this->useShortAttachment) { + $attachment['title'] = $record['level_name']; + } else { + $attachment['title'] = 'Message'; + $attachment['fields'][] = $this->generateAttachmentField('Level', $record['level_name'], true); + } + + if ($this->includeContextAndExtra) { + foreach (array('extra', 'context') as $key) { + if (empty($record[$key])) { + continue; + } + + if ($this->useShortAttachment) { + $attachment['fields'][] = $this->generateAttachmentField( + ucfirst($key), + $this->stringify($record[$key]), + true + ); + } else { + // Add all extra fields as individual fields in attachment + $attachment['fields'] = array_merge( + $attachment['fields'], + $this->generateAttachmentFields($record[$key]) + ); + } + } + } + + $dataArray['attachments'] = array($attachment); + } else { + $dataArray['text'] = $message; + } + + if ($this->iconEmoji) { + $dataArray['icon_emoji'] = ":{$this->iconEmoji}:"; + } + + return $dataArray; + } + + /** + * Returned a Slack message attachment color associated with + * provided level. + * + * @param int $level + * @return string + */ + public function getAttachmentColor($level) + { + switch (true) { + case $level >= Logger::ERROR: + return self::COLOR_DANGER; + case $level >= Logger::WARNING: + return self::COLOR_WARNING; + case $level >= Logger::INFO: + return self::COLOR_GOOD; + default: + return self::COLOR_DEFAULT; + } + } + + /** + * Stringifies an array of key/value pairs to be used in attachment fields + * + * @param array $fields + * @return string|null + */ + public function stringify($fields) + { + if (!$this->lineFormatter) { + return null; + } + + $string = ''; + foreach ($fields as $var => $val) { + $string .= $var.': '.$this->lineFormatter->stringify($val)." | "; + } + + $string = rtrim($string, " |"); + + return $string; + } + + /** + * Sets the formatter + * + * @param FormatterInterface $formatter + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->formatter = $formatter; + } + + /** + * Generates attachment field + * + * @param string $title + * @param string|array $value + * @param bool $short + * @return array + */ + private function generateAttachmentField($title, $value, $short) + { + return array( + 'title' => $title, + 'value' => is_array($value) ? $this->lineFormatter->stringify($value) : $value, + 'short' => $short + ); + } + + /** + * Generates a collection of attachment fields from array + * + * @param array $data + * @return array + */ + private function generateAttachmentFields(array $data) + { + $fields = array(); + foreach ($data as $key => $value) { + $fields[] = $this->generateAttachmentField($key, $value, false); + } + + return $fields; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..c2cca0c829406351940cfdaecdd4959826e78427 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php @@ -0,0 +1,202 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Logger; +use Monolog\Handler\Slack\SlackRecord; + +/** + * Sends notifications through Slack API + * + * @author Greg Kedzierski + * @see https://api.slack.com/ + */ +class SlackHandler extends SocketHandler +{ + /** + * Slack API token + * @var string + */ + private $token; + + /** + * Instance of the SlackRecord util class preparing data for Slack API. + * @var SlackRecord + */ + private $slackRecord; + + /** + * @param string $token Slack API token + * @param string $channel Slack channel (encoded ID or name) + * @param string $username Name of a bot + * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) + * @param string|null $iconEmoji The emoji name to use (or null) + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style + * @param bool $includeContextAndExtra Whether the attachment should include context and extra data + * @throws MissingExtensionException If no OpenSSL PHP extension configured + */ + public function __construct($token, $channel, $username = 'Monolog', $useAttachment = true, $iconEmoji = null, $level = Logger::CRITICAL, $bubble = true, $useShortAttachment = false, $includeContextAndExtra = false) + { + if (!extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler'); + } + + parent::__construct('ssl://slack.com:443', $level, $bubble); + + $this->slackRecord = new SlackRecord( + $channel, + $username, + $useAttachment, + $iconEmoji, + $useShortAttachment, + $includeContextAndExtra, + $this->formatter + ); + + $this->token = $token; + } + + public function getSlackRecord() + { + return $this->slackRecord; + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the body of API call + * + * @param array $record + * @return string + */ + private function buildContent($record) + { + $dataArray = $this->prepareContentData($record); + + return http_build_query($dataArray); + } + + /** + * Prepares content data + * + * @param array $record + * @return array + */ + protected function prepareContentData($record) + { + $dataArray = $this->slackRecord->getSlackData($record); + $dataArray['token'] = $this->token; + + if (!empty($dataArray['attachments'])) { + $dataArray['attachments'] = json_encode($dataArray['attachments']); + } + + return $dataArray; + } + + /** + * Builds the header of the API Call + * + * @param string $content + * @return string + */ + private function buildHeader($content) + { + $header = "POST /api/chat.postMessage HTTP/1.1\r\n"; + $header .= "Host: slack.com\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + parent::write($record); + $res = $this->getResource(); + if (is_resource($res)) { + @fread($res, 2048); + } + $this->closeSocket(); + } + + /** + * Returned a Slack message attachment color associated with + * provided level. + * + * @param int $level + * @return string + * @deprecated Use underlying SlackRecord instead + */ + protected function getAttachmentColor($level) + { + trigger_error( + 'SlackHandler::getAttachmentColor() is deprecated. Use underlying SlackRecord instead.', + E_USER_DEPRECATED + ); + + return $this->slackRecord->getAttachmentColor($level); + } + + /** + * Stringifies an array of key/value pairs to be used in attachment fields + * + * @param array $fields + * @return string + * @deprecated Use underlying SlackRecord instead + */ + protected function stringify($fields) + { + trigger_error( + 'SlackHandler::stringify() is deprecated. Use underlying SlackRecord instead.', + E_USER_DEPRECATED + ); + + return $this->slackRecord->stringify($fields); + } + + public function setFormatter(FormatterInterface $formatter) + { + parent::setFormatter($formatter); + $this->slackRecord->setFormatter($formatter); + + return $this; + } + + public function getFormatter() + { + $formatter = parent::getFormatter(); + $this->slackRecord->setFormatter($formatter); + + return $formatter; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..a2df0f1a3c54736817d557afde2a9b0cbc666825 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php @@ -0,0 +1,108 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Logger; +use Monolog\Handler\Slack\SlackRecord; + +/** + * Sends notifications through Slack Webhooks + * + * @author Haralan Dobrev + * @see https://api.slack.com/incoming-webhooks + */ +class SlackWebhookHandler extends AbstractProcessingHandler +{ + /** + * Slack Webhook token + * @var string + */ + private $webhookUrl; + + /** + * Instance of the SlackRecord util class preparing data for Slack API. + * @var SlackRecord + */ + private $slackRecord; + + /** + * @param string $webhookUrl Slack Webhook URL + * @param string|null $channel Slack channel (encoded ID or name) + * @param string $username Name of a bot + * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) + * @param string|null $iconEmoji The emoji name to use (or null) + * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style + * @param bool $includeContextAndExtra Whether the attachment should include context and extra data + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($webhookUrl, $channel = null, $username = 'Monolog', $useAttachment = true, $iconEmoji = null, $useShortAttachment = false, $includeContextAndExtra = false, $level = Logger::CRITICAL, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->webhookUrl = $webhookUrl; + + $this->slackRecord = new SlackRecord( + $channel, + $username, + $useAttachment, + $iconEmoji, + $useShortAttachment, + $includeContextAndExtra, + $this->formatter + ); + } + + public function getSlackRecord() + { + return $this->slackRecord; + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + $postData = $this->slackRecord->getSlackData($record); + $postString = json_encode($postData); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $this->webhookUrl); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + if (defined('CURLOPT_SAFE_UPLOAD')) { + curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true); + } + curl_setopt($ch, CURLOPT_POSTFIELDS, array('payload' => $postString)); + + Curl\Util::execute($ch); + } + + public function setFormatter(FormatterInterface $formatter) + { + parent::setFormatter($formatter); + $this->slackRecord->setFormatter($formatter); + + return $this; + } + + public function getFormatter() + { + $formatter = parent::getFormatter(); + $this->slackRecord->setFormatter($formatter); + + return $formatter; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..baead52523f5e3bb596f31499be60b8d298fe4fa --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Sends notifications through Slack's Slackbot + * + * @author Haralan Dobrev + * @see https://slack.com/apps/A0F81R8ET-slackbot + */ +class SlackbotHandler extends AbstractProcessingHandler +{ + /** + * The slug of the Slack team + * @var string + */ + private $slackTeam; + + /** + * Slackbot token + * @var string + */ + private $token; + + /** + * Slack channel name + * @var string + */ + private $channel; + + /** + * @param string $slackTeam Slack team slug + * @param string $token Slackbot token + * @param string $channel Slack channel (encoded ID or name) + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($slackTeam, $token, $channel, $level = Logger::CRITICAL, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->slackTeam = $slackTeam; + $this->token = $token; + $this->channel = $channel; + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + $slackbotUrl = sprintf( + 'https://%s.slack.com/services/hooks/slackbot?token=%s&channel=%s', + $this->slackTeam, + $this->token, + $this->channel + ); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $slackbotUrl); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $record['message']); + + Curl\Util::execute($ch); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..7a61bf4e047e626d8159c2abef5e656befb02cd9 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php @@ -0,0 +1,346 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Stores to any socket - uses fsockopen() or pfsockopen(). + * + * @author Pablo de Leon Belloc + * @see http://php.net/manual/en/function.fsockopen.php + */ +class SocketHandler extends AbstractProcessingHandler +{ + private $connectionString; + private $connectionTimeout; + private $resource; + private $timeout = 0; + private $writingTimeout = 10; + private $lastSentBytes = null; + private $persistent = false; + private $errno; + private $errstr; + private $lastWritingAt; + + /** + * @param string $connectionString Socket connection string + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($connectionString, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + $this->connectionString = $connectionString; + $this->connectionTimeout = (float) ini_get('default_socket_timeout'); + } + + /** + * Connect (if necessary) and write to the socket + * + * @param array $record + * + * @throws \UnexpectedValueException + * @throws \RuntimeException + */ + protected function write(array $record) + { + $this->connectIfNotConnected(); + $data = $this->generateDataStream($record); + $this->writeToSocket($data); + } + + /** + * We will not close a PersistentSocket instance so it can be reused in other requests. + */ + public function close() + { + if (!$this->isPersistent()) { + $this->closeSocket(); + } + } + + /** + * Close socket, if open + */ + public function closeSocket() + { + if (is_resource($this->resource)) { + fclose($this->resource); + $this->resource = null; + } + } + + /** + * Set socket connection to nbe persistent. It only has effect before the connection is initiated. + * + * @param bool $persistent + */ + public function setPersistent($persistent) + { + $this->persistent = (boolean) $persistent; + } + + /** + * Set connection timeout. Only has effect before we connect. + * + * @param float $seconds + * + * @see http://php.net/manual/en/function.fsockopen.php + */ + public function setConnectionTimeout($seconds) + { + $this->validateTimeout($seconds); + $this->connectionTimeout = (float) $seconds; + } + + /** + * Set write timeout. Only has effect before we connect. + * + * @param float $seconds + * + * @see http://php.net/manual/en/function.stream-set-timeout.php + */ + public function setTimeout($seconds) + { + $this->validateTimeout($seconds); + $this->timeout = (float) $seconds; + } + + /** + * Set writing timeout. Only has effect during connection in the writing cycle. + * + * @param float $seconds 0 for no timeout + */ + public function setWritingTimeout($seconds) + { + $this->validateTimeout($seconds); + $this->writingTimeout = (float) $seconds; + } + + /** + * Get current connection string + * + * @return string + */ + public function getConnectionString() + { + return $this->connectionString; + } + + /** + * Get persistent setting + * + * @return bool + */ + public function isPersistent() + { + return $this->persistent; + } + + /** + * Get current connection timeout setting + * + * @return float + */ + public function getConnectionTimeout() + { + return $this->connectionTimeout; + } + + /** + * Get current in-transfer timeout + * + * @return float + */ + public function getTimeout() + { + return $this->timeout; + } + + /** + * Get current local writing timeout + * + * @return float + */ + public function getWritingTimeout() + { + return $this->writingTimeout; + } + + /** + * Check to see if the socket is currently available. + * + * UDP might appear to be connected but might fail when writing. See http://php.net/fsockopen for details. + * + * @return bool + */ + public function isConnected() + { + return is_resource($this->resource) + && !feof($this->resource); // on TCP - other party can close connection. + } + + /** + * Wrapper to allow mocking + */ + protected function pfsockopen() + { + return @pfsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); + } + + /** + * Wrapper to allow mocking + */ + protected function fsockopen() + { + return @fsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); + } + + /** + * Wrapper to allow mocking + * + * @see http://php.net/manual/en/function.stream-set-timeout.php + */ + protected function streamSetTimeout() + { + $seconds = floor($this->timeout); + $microseconds = round(($this->timeout - $seconds) * 1e6); + + return stream_set_timeout($this->resource, $seconds, $microseconds); + } + + /** + * Wrapper to allow mocking + */ + protected function fwrite($data) + { + return @fwrite($this->resource, $data); + } + + /** + * Wrapper to allow mocking + */ + protected function streamGetMetadata() + { + return stream_get_meta_data($this->resource); + } + + private function validateTimeout($value) + { + $ok = filter_var($value, FILTER_VALIDATE_FLOAT); + if ($ok === false || $value < 0) { + throw new \InvalidArgumentException("Timeout must be 0 or a positive float (got $value)"); + } + } + + private function connectIfNotConnected() + { + if ($this->isConnected()) { + return; + } + $this->connect(); + } + + protected function generateDataStream($record) + { + return (string) $record['formatted']; + } + + /** + * @return resource|null + */ + protected function getResource() + { + return $this->resource; + } + + private function connect() + { + $this->createSocketResource(); + $this->setSocketTimeout(); + } + + private function createSocketResource() + { + if ($this->isPersistent()) { + $resource = $this->pfsockopen(); + } else { + $resource = $this->fsockopen(); + } + if (!$resource) { + throw new \UnexpectedValueException("Failed connecting to $this->connectionString ($this->errno: $this->errstr)"); + } + $this->resource = $resource; + } + + private function setSocketTimeout() + { + if (!$this->streamSetTimeout()) { + throw new \UnexpectedValueException("Failed setting timeout with stream_set_timeout()"); + } + } + + private function writeToSocket($data) + { + $length = strlen($data); + $sent = 0; + $this->lastSentBytes = $sent; + while ($this->isConnected() && $sent < $length) { + if (0 == $sent) { + $chunk = $this->fwrite($data); + } else { + $chunk = $this->fwrite(substr($data, $sent)); + } + if ($chunk === false) { + throw new \RuntimeException("Could not write to socket"); + } + $sent += $chunk; + $socketInfo = $this->streamGetMetadata(); + if ($socketInfo['timed_out']) { + throw new \RuntimeException("Write timed-out"); + } + + if ($this->writingIsTimedOut($sent)) { + throw new \RuntimeException("Write timed-out, no data sent for `{$this->writingTimeout}` seconds, probably we got disconnected (sent $sent of $length)"); + } + } + if (!$this->isConnected() && $sent < $length) { + throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent $sent of $length)"); + } + } + + private function writingIsTimedOut($sent) + { + $writingTimeout = (int) floor($this->writingTimeout); + if (0 === $writingTimeout) { + return false; + } + + if ($sent !== $this->lastSentBytes) { + $this->lastWritingAt = time(); + $this->lastSentBytes = $sent; + + return false; + } else { + usleep(100); + } + + if ((time() - $this->lastWritingAt) >= $writingTimeout) { + $this->closeSocket(); + + return true; + } + + return false; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..09a157387d86732d72225bef21d0d69de614f507 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php @@ -0,0 +1,176 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Stores to any stream resource + * + * Can be used to store into php://stderr, remote and local files, etc. + * + * @author Jordi Boggiano + */ +class StreamHandler extends AbstractProcessingHandler +{ + protected $stream; + protected $url; + private $errorMessage; + protected $filePermission; + protected $useLocking; + private $dirCreated; + + /** + * @param resource|string $stream + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) + * @param Boolean $useLocking Try to lock log file before doing any writes + * + * @throws \Exception If a missing directory is not buildable + * @throws \InvalidArgumentException If stream is not a resource or string + */ + public function __construct($stream, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) + { + parent::__construct($level, $bubble); + if (is_resource($stream)) { + $this->stream = $stream; + } elseif (is_string($stream)) { + $this->url = $stream; + } else { + throw new \InvalidArgumentException('A stream must either be a resource or a string.'); + } + + $this->filePermission = $filePermission; + $this->useLocking = $useLocking; + } + + /** + * {@inheritdoc} + */ + public function close() + { + if ($this->url && is_resource($this->stream)) { + fclose($this->stream); + } + $this->stream = null; + } + + /** + * Return the currently active stream if it is open + * + * @return resource|null + */ + public function getStream() + { + return $this->stream; + } + + /** + * Return the stream URL if it was configured with a URL and not an active resource + * + * @return string|null + */ + public function getUrl() + { + return $this->url; + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + if (!is_resource($this->stream)) { + if (null === $this->url || '' === $this->url) { + throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().'); + } + $this->createDir(); + $this->errorMessage = null; + set_error_handler(array($this, 'customErrorHandler')); + $this->stream = fopen($this->url, 'a'); + if ($this->filePermission !== null) { + @chmod($this->url, $this->filePermission); + } + restore_error_handler(); + if (!is_resource($this->stream)) { + $this->stream = null; + throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: '.$this->errorMessage, $this->url)); + } + } + + if ($this->useLocking) { + // ignoring errors here, there's not much we can do about them + flock($this->stream, LOCK_EX); + } + + $this->streamWrite($this->stream, $record); + + if ($this->useLocking) { + flock($this->stream, LOCK_UN); + } + } + + /** + * Write to stream + * @param resource $stream + * @param array $record + */ + protected function streamWrite($stream, array $record) + { + fwrite($stream, (string) $record['formatted']); + } + + private function customErrorHandler($code, $msg) + { + $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); + } + + /** + * @param string $stream + * + * @return null|string + */ + private function getDirFromStream($stream) + { + $pos = strpos($stream, '://'); + if ($pos === false) { + return dirname($stream); + } + + if ('file://' === substr($stream, 0, 7)) { + return dirname(substr($stream, 7)); + } + + return; + } + + private function createDir() + { + // Do not try to create dir if it has already been tried. + if ($this->dirCreated) { + return; + } + + $dir = $this->getDirFromStream($this->url); + if (null !== $dir && !is_dir($dir)) { + $this->errorMessage = null; + set_error_handler(array($this, 'customErrorHandler')); + $status = mkdir($dir, 0777, true); + restore_error_handler(); + if (false === $status) { + throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and its not buildable: '.$this->errorMessage, $dir)); + } + } + $this->dirCreated = true; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..aba139679c4303c3994a0630d53637452fe42006 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.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 Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\LineFormatter; + +/** + * SwiftMailerHandler uses Swift_Mailer to send the emails + * + * @author Gyula Sallai + */ +class SwiftMailerHandler extends MailHandler +{ + protected $mailer; + private $messageTemplate; + + /** + * @param \Swift_Mailer $mailer The mailer to use + * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->mailer = $mailer; + $this->messageTemplate = $message; + } + + /** + * {@inheritdoc} + */ + protected function send($content, array $records) + { + $this->mailer->send($this->buildMessage($content, $records)); + } + + /** + * Creates instance of Swift_Message to be sent + * + * @param string $content formatted email body to be sent + * @param array $records Log records that formed the content + * @return \Swift_Message + */ + protected function buildMessage($content, array $records) + { + $message = null; + if ($this->messageTemplate instanceof \Swift_Message) { + $message = clone $this->messageTemplate; + $message->generateId(); + } elseif (is_callable($this->messageTemplate)) { + $message = call_user_func($this->messageTemplate, $content, $records); + } + + if (!$message instanceof \Swift_Message) { + throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it'); + } + + if ($records) { + $subjectFormatter = new LineFormatter($message->getSubject()); + $message->setSubject($subjectFormatter->format($this->getHighestRecord($records))); + } + + $message->setBody($content); + $message->setDate(time()); + + return $message; + } + + /** + * BC getter, to be removed in 2.0 + */ + public function __get($name) + { + if ($name === 'message') { + trigger_error('SwiftMailerHandler->message is deprecated, use ->buildMessage() instead to retrieve the message', E_USER_DEPRECATED); + + return $this->buildMessage(null, array()); + } + + throw new \InvalidArgumentException('Invalid property '.$name); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..376bc3b24db1798143cae87a6fe20f6d46d81998 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Logs to syslog service. + * + * usage example: + * + * $log = new Logger('application'); + * $syslog = new SyslogHandler('myfacility', 'local6'); + * $formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%"); + * $syslog->setFormatter($formatter); + * $log->pushHandler($syslog); + * + * @author Sven Paulus + */ +class SyslogHandler extends AbstractSyslogHandler +{ + protected $ident; + protected $logopts; + + /** + * @param string $ident + * @param mixed $facility + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID + */ + public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $logopts = LOG_PID) + { + parent::__construct($facility, $level, $bubble); + + $this->ident = $ident; + $this->logopts = $logopts; + } + + /** + * {@inheritdoc} + */ + public function close() + { + closelog(); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + if (!openlog($this->ident, $this->logopts, $this->facility)) { + throw new \LogicException('Can\'t open syslog for ident "'.$this->ident.'" and facility "'.$this->facility.'"'); + } + syslog($this->logLevels[$record['level']], (string) $record['formatted']); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php new file mode 100644 index 0000000000000000000000000000000000000000..3bff085bfa13dbe7acbef398488954204dec02f3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\SyslogUdp; + +class UdpSocket +{ + const DATAGRAM_MAX_LENGTH = 65023; + + protected $ip; + protected $port; + protected $socket; + + public function __construct($ip, $port = 514) + { + $this->ip = $ip; + $this->port = $port; + $this->socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); + } + + public function write($line, $header = "") + { + $this->send($this->assembleMessage($line, $header)); + } + + public function close() + { + if (is_resource($this->socket)) { + socket_close($this->socket); + $this->socket = null; + } + } + + protected function send($chunk) + { + if (!is_resource($this->socket)) { + throw new \LogicException('The UdpSocket to '.$this->ip.':'.$this->port.' has been closed and can not be written to anymore'); + } + socket_sendto($this->socket, $chunk, strlen($chunk), $flags = 0, $this->ip, $this->port); + } + + protected function assembleMessage($line, $header) + { + $chunkSize = self::DATAGRAM_MAX_LENGTH - strlen($header); + + return $header . substr($line, 0, $chunkSize); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..74d946a57dd15bdc1ba2060eb29463235f405faa --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Handler\SyslogUdp\UdpSocket; + +/** + * A Handler for logging to a remote syslogd server. + * + * @author Jesper Skovgaard Nielsen + */ +class SyslogUdpHandler extends AbstractSyslogHandler +{ + protected $socket; + + /** + * @param string $host + * @param int $port + * @param mixed $facility + * @param int $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($host, $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($facility, $level, $bubble); + + $this->socket = new UdpSocket($host, $port ?: 514); + } + + protected function write(array $record) + { + $lines = $this->splitMessageIntoLines($record['formatted']); + + $header = $this->makeCommonSyslogHeader($this->logLevels[$record['level']]); + + foreach ($lines as $line) { + $this->socket->write($line, $header); + } + } + + public function close() + { + $this->socket->close(); + } + + private function splitMessageIntoLines($message) + { + if (is_array($message)) { + $message = implode("\n", $message); + } + + return preg_split('/$\R?^/m', $message, -1, PREG_SPLIT_NO_EMPTY); + } + + /** + * Make common syslog header (see rfc5424) + */ + protected function makeCommonSyslogHeader($severity) + { + $priority = $severity + $this->facility; + + return "<$priority>1 "; + } + + /** + * Inject your own socket, mainly used for testing + */ + public function setSocket($socket) + { + $this->socket = $socket; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..e39cfc667a6b78840fbb0fba6dd40de58dff3a2c --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php @@ -0,0 +1,154 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Used for testing purposes. + * + * It records all records and gives you access to them for verification. + * + * @author Jordi Boggiano + * + * @method bool hasEmergency($record) + * @method bool hasAlert($record) + * @method bool hasCritical($record) + * @method bool hasError($record) + * @method bool hasWarning($record) + * @method bool hasNotice($record) + * @method bool hasInfo($record) + * @method bool hasDebug($record) + * + * @method bool hasEmergencyRecords() + * @method bool hasAlertRecords() + * @method bool hasCriticalRecords() + * @method bool hasErrorRecords() + * @method bool hasWarningRecords() + * @method bool hasNoticeRecords() + * @method bool hasInfoRecords() + * @method bool hasDebugRecords() + * + * @method bool hasEmergencyThatContains($message) + * @method bool hasAlertThatContains($message) + * @method bool hasCriticalThatContains($message) + * @method bool hasErrorThatContains($message) + * @method bool hasWarningThatContains($message) + * @method bool hasNoticeThatContains($message) + * @method bool hasInfoThatContains($message) + * @method bool hasDebugThatContains($message) + * + * @method bool hasEmergencyThatMatches($message) + * @method bool hasAlertThatMatches($message) + * @method bool hasCriticalThatMatches($message) + * @method bool hasErrorThatMatches($message) + * @method bool hasWarningThatMatches($message) + * @method bool hasNoticeThatMatches($message) + * @method bool hasInfoThatMatches($message) + * @method bool hasDebugThatMatches($message) + * + * @method bool hasEmergencyThatPasses($message) + * @method bool hasAlertThatPasses($message) + * @method bool hasCriticalThatPasses($message) + * @method bool hasErrorThatPasses($message) + * @method bool hasWarningThatPasses($message) + * @method bool hasNoticeThatPasses($message) + * @method bool hasInfoThatPasses($message) + * @method bool hasDebugThatPasses($message) + */ +class TestHandler extends AbstractProcessingHandler +{ + protected $records = array(); + protected $recordsByLevel = array(); + + public function getRecords() + { + return $this->records; + } + + public function clear() + { + $this->records = array(); + $this->recordsByLevel = array(); + } + + public function hasRecords($level) + { + return isset($this->recordsByLevel[$level]); + } + + public function hasRecord($record, $level) + { + if (is_array($record)) { + $record = $record['message']; + } + + return $this->hasRecordThatPasses(function ($rec) use ($record) { + return $rec['message'] === $record; + }, $level); + } + + public function hasRecordThatContains($message, $level) + { + return $this->hasRecordThatPasses(function ($rec) use ($message) { + return strpos($rec['message'], $message) !== false; + }, $level); + } + + public function hasRecordThatMatches($regex, $level) + { + return $this->hasRecordThatPasses(function ($rec) use ($regex) { + return preg_match($regex, $rec['message']) > 0; + }, $level); + } + + public function hasRecordThatPasses($predicate, $level) + { + if (!is_callable($predicate)) { + throw new \InvalidArgumentException("Expected a callable for hasRecordThatSucceeds"); + } + + if (!isset($this->recordsByLevel[$level])) { + return false; + } + + foreach ($this->recordsByLevel[$level] as $i => $rec) { + if (call_user_func($predicate, $rec, $i)) { + return true; + } + } + + return false; + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $this->recordsByLevel[$record['level']][] = $record; + $this->records[] = $record; + } + + public function __call($method, $args) + { + if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { + $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; + $level = constant('Monolog\Logger::' . strtoupper($matches[2])); + if (method_exists($this, $genericMethod)) { + $args[] = $level; + + return call_user_func_array(array($this, $genericMethod), $args); + } + } + + throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..2732ba3d6218305c90e2eec11f9c98d5fc156c0b --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Forwards records to multiple handlers suppressing failures of each handler + * and continuing through to give every handler a chance to succeed. + * + * @author Craig D'Amelio + */ +class WhatFailureGroupHandler extends GroupHandler +{ + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + foreach ($this->handlers as $handler) { + try { + $handler->handle($record); + } catch (\Exception $e) { + // What failure? + } catch (\Throwable $e) { + // What failure? + } + } + + return false === $this->bubble; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + foreach ($this->handlers as $handler) { + try { + $handler->handleBatch($records); + } catch (\Exception $e) { + // What failure? + } catch (\Throwable $e) { + // What failure? + } + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..f22cf218745bcfe22f6208dc4fc897e9a0ecc2bf --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\NormalizerFormatter; +use Monolog\Logger; + +/** + * Handler sending logs to Zend Monitor + * + * @author Christian Bergau + */ +class ZendMonitorHandler extends AbstractProcessingHandler +{ + /** + * Monolog level / ZendMonitor Custom Event priority map + * + * @var array + */ + protected $levelMap = array( + Logger::DEBUG => 1, + Logger::INFO => 2, + Logger::NOTICE => 3, + Logger::WARNING => 4, + Logger::ERROR => 5, + Logger::CRITICAL => 6, + Logger::ALERT => 7, + Logger::EMERGENCY => 0, + ); + + /** + * Construct + * + * @param int $level + * @param bool $bubble + * @throws MissingExtensionException + */ + public function __construct($level = Logger::DEBUG, $bubble = true) + { + if (!function_exists('zend_monitor_custom_event')) { + throw new MissingExtensionException('You must have Zend Server installed in order to use this handler'); + } + parent::__construct($level, $bubble); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $this->writeZendMonitorCustomEvent( + $this->levelMap[$record['level']], + $record['message'], + $record['formatted'] + ); + } + + /** + * Write a record to Zend Monitor + * + * @param int $level + * @param string $message + * @param array $formatted + */ + protected function writeZendMonitorCustomEvent($level, $message, $formatted) + { + zend_monitor_custom_event($level, $message, $formatted); + } + + /** + * {@inheritdoc} + */ + public function getDefaultFormatter() + { + return new NormalizerFormatter(); + } + + /** + * Get the level map + * + * @return array + */ + public function getLevelMap() + { + return $this->levelMap; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Logger.php b/vendor/monolog/monolog/src/Monolog/Logger.php new file mode 100644 index 0000000000000000000000000000000000000000..49d00af1f2426d7dcb2c03964e404bab8ecc4e34 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Logger.php @@ -0,0 +1,700 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Monolog\Handler\HandlerInterface; +use Monolog\Handler\StreamHandler; +use Psr\Log\LoggerInterface; +use Psr\Log\InvalidArgumentException; + +/** + * Monolog log channel + * + * It contains a stack of Handlers and a stack of Processors, + * and uses them to store records that are added to it. + * + * @author Jordi Boggiano + */ +class Logger implements LoggerInterface +{ + /** + * Detailed debug information + */ + const DEBUG = 100; + + /** + * Interesting events + * + * Examples: User logs in, SQL logs. + */ + const INFO = 200; + + /** + * Uncommon events + */ + const NOTICE = 250; + + /** + * Exceptional occurrences that are not errors + * + * Examples: Use of deprecated APIs, poor use of an API, + * undesirable things that are not necessarily wrong. + */ + const WARNING = 300; + + /** + * Runtime errors + */ + const ERROR = 400; + + /** + * Critical conditions + * + * Example: Application component unavailable, unexpected exception. + */ + const CRITICAL = 500; + + /** + * Action must be taken immediately + * + * Example: Entire website down, database unavailable, etc. + * This should trigger the SMS alerts and wake you up. + */ + const ALERT = 550; + + /** + * Urgent alert. + */ + const EMERGENCY = 600; + + /** + * Monolog API version + * + * This is only bumped when API breaks are done and should + * follow the major version of the library + * + * @var int + */ + const API = 1; + + /** + * Logging levels from syslog protocol defined in RFC 5424 + * + * @var array $levels Logging levels + */ + protected static $levels = array( + self::DEBUG => 'DEBUG', + self::INFO => 'INFO', + self::NOTICE => 'NOTICE', + self::WARNING => 'WARNING', + self::ERROR => 'ERROR', + self::CRITICAL => 'CRITICAL', + self::ALERT => 'ALERT', + self::EMERGENCY => 'EMERGENCY', + ); + + /** + * @var \DateTimeZone + */ + protected static $timezone; + + /** + * @var string + */ + protected $name; + + /** + * The handler stack + * + * @var HandlerInterface[] + */ + protected $handlers; + + /** + * Processors that will process all log records + * + * To process records of a single handler instead, add the processor on that specific handler + * + * @var callable[] + */ + protected $processors; + + /** + * @var bool + */ + protected $microsecondTimestamps = true; + + /** + * @param string $name The logging channel + * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc. + * @param callable[] $processors Optional array of processors + */ + public function __construct($name, array $handlers = array(), array $processors = array()) + { + $this->name = $name; + $this->handlers = $handlers; + $this->processors = $processors; + } + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Return a new cloned instance with the name changed + * + * @return static + */ + public function withName($name) + { + $new = clone $this; + $new->name = $name; + + return $new; + } + + /** + * Pushes a handler on to the stack. + * + * @param HandlerInterface $handler + * @return $this + */ + public function pushHandler(HandlerInterface $handler) + { + array_unshift($this->handlers, $handler); + + return $this; + } + + /** + * Pops a handler from the stack + * + * @return HandlerInterface + */ + public function popHandler() + { + if (!$this->handlers) { + throw new \LogicException('You tried to pop from an empty handler stack.'); + } + + return array_shift($this->handlers); + } + + /** + * Set handlers, replacing all existing ones. + * + * If a map is passed, keys will be ignored. + * + * @param HandlerInterface[] $handlers + * @return $this + */ + public function setHandlers(array $handlers) + { + $this->handlers = array(); + foreach (array_reverse($handlers) as $handler) { + $this->pushHandler($handler); + } + + return $this; + } + + /** + * @return HandlerInterface[] + */ + public function getHandlers() + { + return $this->handlers; + } + + /** + * Adds a processor on to the stack. + * + * @param callable $callback + * @return $this + */ + public function pushProcessor($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given'); + } + array_unshift($this->processors, $callback); + + return $this; + } + + /** + * Removes the processor on top of the stack and returns it. + * + * @return callable + */ + public function popProcessor() + { + if (!$this->processors) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + + return array_shift($this->processors); + } + + /** + * @return callable[] + */ + public function getProcessors() + { + return $this->processors; + } + + /** + * Control the use of microsecond resolution timestamps in the 'datetime' + * member of new records. + * + * Generating microsecond resolution timestamps by calling + * microtime(true), formatting the result via sprintf() and then parsing + * the resulting string via \DateTime::createFromFormat() can incur + * a measurable runtime overhead vs simple usage of DateTime to capture + * a second resolution timestamp in systems which generate a large number + * of log events. + * + * @param bool $micro True to use microtime() to create timestamps + */ + public function useMicrosecondTimestamps($micro) + { + $this->microsecondTimestamps = (bool) $micro; + } + + /** + * Adds a log record. + * + * @param int $level The logging level + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function addRecord($level, $message, array $context = array()) + { + if (!$this->handlers) { + $this->pushHandler(new StreamHandler('php://stderr', static::DEBUG)); + } + + $levelName = static::getLevelName($level); + + // check if any handler will handle this message so we can return early and save cycles + $handlerKey = null; + reset($this->handlers); + while ($handler = current($this->handlers)) { + if ($handler->isHandling(array('level' => $level))) { + $handlerKey = key($this->handlers); + break; + } + + next($this->handlers); + } + + if (null === $handlerKey) { + return false; + } + + if (!static::$timezone) { + static::$timezone = new \DateTimeZone(date_default_timezone_get() ?: 'UTC'); + } + + // php7.1+ always has microseconds enabled, so we do not need this hack + if ($this->microsecondTimestamps && PHP_VERSION_ID < 70100) { + $ts = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone); + } else { + $ts = new \DateTime(null, static::$timezone); + } + $ts->setTimezone(static::$timezone); + + $record = array( + 'message' => (string) $message, + 'context' => $context, + 'level' => $level, + 'level_name' => $levelName, + 'channel' => $this->name, + 'datetime' => $ts, + 'extra' => array(), + ); + + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + + while ($handler = current($this->handlers)) { + if (true === $handler->handle($record)) { + break; + } + + next($this->handlers); + } + + return true; + } + + /** + * Adds a log record at the DEBUG level. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function addDebug($message, array $context = array()) + { + return $this->addRecord(static::DEBUG, $message, $context); + } + + /** + * Adds a log record at the INFO level. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function addInfo($message, array $context = array()) + { + return $this->addRecord(static::INFO, $message, $context); + } + + /** + * Adds a log record at the NOTICE level. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function addNotice($message, array $context = array()) + { + return $this->addRecord(static::NOTICE, $message, $context); + } + + /** + * Adds a log record at the WARNING level. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function addWarning($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + + /** + * Adds a log record at the ERROR level. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function addError($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + + /** + * Adds a log record at the CRITICAL level. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function addCritical($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + + /** + * Adds a log record at the ALERT level. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function addAlert($message, array $context = array()) + { + return $this->addRecord(static::ALERT, $message, $context); + } + + /** + * Adds a log record at the EMERGENCY level. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function addEmergency($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + + /** + * Gets all supported logging levels. + * + * @return array Assoc array with human-readable level names => level codes. + */ + public static function getLevels() + { + return array_flip(static::$levels); + } + + /** + * Gets the name of the logging level. + * + * @param int $level + * @return string + */ + public static function getLevelName($level) + { + if (!isset(static::$levels[$level])) { + throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', array_keys(static::$levels))); + } + + return static::$levels[$level]; + } + + /** + * Converts PSR-3 levels to Monolog ones if necessary + * + * @param string|int Level number (monolog) or name (PSR-3) + * @return int + */ + public static function toMonologLevel($level) + { + if (is_string($level) && defined(__CLASS__.'::'.strtoupper($level))) { + return constant(__CLASS__.'::'.strtoupper($level)); + } + + return $level; + } + + /** + * Checks whether the Logger has a handler that listens on the given level + * + * @param int $level + * @return Boolean + */ + public function isHandling($level) + { + $record = array( + 'level' => $level, + ); + + foreach ($this->handlers as $handler) { + if ($handler->isHandling($record)) { + return true; + } + } + + return false; + } + + /** + * Adds a log record at an arbitrary level. + * + * This method allows for compatibility with common interfaces. + * + * @param mixed $level The log level + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function log($level, $message, array $context = array()) + { + $level = static::toMonologLevel($level); + + return $this->addRecord($level, $message, $context); + } + + /** + * Adds a log record at the DEBUG level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function debug($message, array $context = array()) + { + return $this->addRecord(static::DEBUG, $message, $context); + } + + /** + * Adds a log record at the INFO level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function info($message, array $context = array()) + { + return $this->addRecord(static::INFO, $message, $context); + } + + /** + * Adds a log record at the NOTICE level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function notice($message, array $context = array()) + { + return $this->addRecord(static::NOTICE, $message, $context); + } + + /** + * Adds a log record at the WARNING level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function warn($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + + /** + * Adds a log record at the WARNING level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function warning($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + + /** + * Adds a log record at the ERROR level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function err($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + + /** + * Adds a log record at the ERROR level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function error($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + + /** + * Adds a log record at the CRITICAL level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function crit($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + + /** + * Adds a log record at the CRITICAL level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function critical($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + + /** + * Adds a log record at the ALERT level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function alert($message, array $context = array()) + { + return $this->addRecord(static::ALERT, $message, $context); + } + + /** + * Adds a log record at the EMERGENCY level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function emerg($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + + /** + * Adds a log record at the EMERGENCY level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return Boolean Whether the record has been processed + */ + public function emergency($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + + /** + * Set the timezone to be used for the timestamp of log records. + * + * This is stored globally for all Logger instances + * + * @param \DateTimeZone $tz Timezone object + */ + public static function setTimezone(\DateTimeZone $tz) + { + self::$timezone = $tz; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..1899400dcaa57149433bfb9f80198687e2fd8c11 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\Logger; + +/** + * Injects Git branch and Git commit SHA in all records + * + * @author Nick Otter + * @author Jordi Boggiano + */ +class GitProcessor +{ + private $level; + private static $cache; + + public function __construct($level = Logger::DEBUG) + { + $this->level = Logger::toMonologLevel($level); + } + + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + // return if the level is not high enough + if ($record['level'] < $this->level) { + return $record; + } + + $record['extra']['git'] = self::getGitInfo(); + + return $record; + } + + private static function getGitInfo() + { + if (self::$cache) { + return self::$cache; + } + + $branches = `git branch -v --no-abbrev`; + if (preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { + return self::$cache = array( + 'branch' => $matches[1], + 'commit' => $matches[2], + ); + } + + return self::$cache = array(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..2691630afd29a66e8bd5c9e87aae0baf2ea9ab65 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\Logger; + +/** + * Injects line/file:class/function where the log message came from + * + * Warning: This only works if the handler processes the logs directly. + * If you put the processor on a handler that is behind a FingersCrossedHandler + * for example, the processor will only be called once the trigger level is reached, + * and all the log records will have the same file/line/.. data from the call that + * triggered the FingersCrossedHandler. + * + * @author Jordi Boggiano + */ +class IntrospectionProcessor +{ + private $level; + + private $skipClassesPartials; + + private $skipStackFramesCount; + + private $skipFunctions = array( + 'call_user_func', + 'call_user_func_array', + ); + + public function __construct($level = Logger::DEBUG, array $skipClassesPartials = array(), $skipStackFramesCount = 0) + { + $this->level = Logger::toMonologLevel($level); + $this->skipClassesPartials = array_merge(array('Monolog\\'), $skipClassesPartials); + $this->skipStackFramesCount = $skipStackFramesCount; + } + + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + // return if the level is not high enough + if ($record['level'] < $this->level) { + return $record; + } + + $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + + // skip first since it's always the current method + array_shift($trace); + // the call_user_func call is also skipped + array_shift($trace); + + $i = 0; + + while ($this->isTraceClassOrSkippedFunction($trace, $i)) { + if (isset($trace[$i]['class'])) { + foreach ($this->skipClassesPartials as $part) { + if (strpos($trace[$i]['class'], $part) !== false) { + $i++; + continue 2; + } + } + } elseif (in_array($trace[$i]['function'], $this->skipFunctions)) { + $i++; + continue; + } + + break; + } + + $i += $this->skipStackFramesCount; + + // we should have the call source now + $record['extra'] = array_merge( + $record['extra'], + array( + 'file' => isset($trace[$i - 1]['file']) ? $trace[$i - 1]['file'] : null, + 'line' => isset($trace[$i - 1]['line']) ? $trace[$i - 1]['line'] : null, + 'class' => isset($trace[$i]['class']) ? $trace[$i]['class'] : null, + 'function' => isset($trace[$i]['function']) ? $trace[$i]['function'] : null, + ) + ); + + return $record; + } + + private function isTraceClassOrSkippedFunction(array $trace, $index) + { + if (!isset($trace[$index])) { + return false; + } + + return isset($trace[$index]['class']) || in_array($trace[$index]['function'], $this->skipFunctions); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..0543e9292f762b9aa60e788f862e956e43ccf359 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Injects memory_get_peak_usage in all records + * + * @see Monolog\Processor\MemoryProcessor::__construct() for options + * @author Rob Jensen + */ +class MemoryPeakUsageProcessor extends MemoryProcessor +{ + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + $bytes = memory_get_peak_usage($this->realUsage); + $formatted = $this->formatBytes($bytes); + + $record['extra']['memory_peak_usage'] = $formatted; + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..85f9dc5e73d3ec81e6b7c539dc2716237ec29fa3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.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 Monolog\Processor; + +/** + * Some methods that are common for all memory processors + * + * @author Rob Jensen + */ +abstract class MemoryProcessor +{ + /** + * @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported. + */ + protected $realUsage; + + /** + * @var bool If true, then format memory size to human readable string (MB, KB, B depending on size) + */ + protected $useFormatting; + + /** + * @param bool $realUsage Set this to true to get the real size of memory allocated from system. + * @param bool $useFormatting If true, then format memory size to human readable string (MB, KB, B depending on size) + */ + public function __construct($realUsage = true, $useFormatting = true) + { + $this->realUsage = (boolean) $realUsage; + $this->useFormatting = (boolean) $useFormatting; + } + + /** + * Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes as is + * + * @param int $bytes + * @return string|int Formatted string if $this->useFormatting is true, otherwise return $bytes as is + */ + protected function formatBytes($bytes) + { + $bytes = (int) $bytes; + + if (!$this->useFormatting) { + return $bytes; + } + + if ($bytes > 1024 * 1024) { + return round($bytes / 1024 / 1024, 2).' MB'; + } elseif ($bytes > 1024) { + return round($bytes / 1024, 2).' KB'; + } + + return $bytes . ' B'; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..2783d656baba655ff466f6bec58b84b9c464b7a4 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Injects memory_get_usage in all records + * + * @see Monolog\Processor\MemoryProcessor::__construct() for options + * @author Rob Jensen + */ +class MemoryUsageProcessor extends MemoryProcessor +{ + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + $bytes = memory_get_usage($this->realUsage); + $formatted = $this->formatBytes($bytes); + + $record['extra']['memory_usage'] = $formatted; + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..7c07a7e994e7729acee0ffdc03866e18d83685a5 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.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 Monolog\Processor; + +use Monolog\Logger; + +/** + * Injects Hg branch and Hg revision number in all records + * + * @author Jonathan A. Schweder + */ +class MercurialProcessor +{ + private $level; + private static $cache; + + public function __construct($level = Logger::DEBUG) + { + $this->level = Logger::toMonologLevel($level); + } + + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + // return if the level is not high enough + if ($record['level'] < $this->level) { + return $record; + } + + $record['extra']['hg'] = self::getMercurialInfo(); + + return $record; + } + + private static function getMercurialInfo() + { + if (self::$cache) { + return self::$cache; + } + + $result = explode(' ', trim(`hg id -nb`)); + if (count($result) >= 3) { + return self::$cache = array( + 'branch' => $result[1], + 'revision' => $result[2], + ); + } + + return self::$cache = array(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..9d3f5590fdf30d89d548e642c81bebc725fc105c --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Adds value of getmypid into records + * + * @author Andreas Hörnicke + */ +class ProcessIdProcessor +{ + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + $record['extra']['process_id'] = getmypid(); + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..c2686ce5b18deb1032a6d557dd144d69f9a79bb8 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Processes a record's message according to PSR-3 rules + * + * It replaces {foo} with the value from $context['foo'] + * + * @author Jordi Boggiano + */ +class PsrLogMessageProcessor +{ + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + if (false === strpos($record['message'], '{')) { + return $record; + } + + $replacements = array(); + foreach ($record['context'] as $key => $val) { + if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) { + $replacements['{'.$key.'}'] = $val; + } elseif (is_object($val)) { + $replacements['{'.$key.'}'] = '[object '.get_class($val).']'; + } else { + $replacements['{'.$key.'}'] = '['.gettype($val).']'; + } + } + + $record['message'] = strtr($record['message'], $replacements); + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..7e2df2acb604766b5481bd19e6228f9fe1b5caf7 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Adds a tags array into record + * + * @author Martijn Riemers + */ +class TagProcessor +{ + private $tags; + + public function __construct(array $tags = array()) + { + $this->setTags($tags); + } + + public function addTags(array $tags = array()) + { + $this->tags = array_merge($this->tags, $tags); + } + + public function setTags(array $tags = array()) + { + $this->tags = $tags; + } + + public function __invoke(array $record) + { + $record['extra']['tags'] = $this->tags; + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..812707cdbaa5d05fac82d9b67c3cddb2fcdfd511 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Adds a unique identifier into records + * + * @author Simon Mönch + */ +class UidProcessor +{ + private $uid; + + public function __construct($length = 7) + { + if (!is_int($length) || $length > 32 || $length < 1) { + throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32'); + } + + $this->uid = substr(hash('md5', uniqid('', true)), 0, $length); + } + + public function __invoke(array $record) + { + $record['extra']['uid'] = $this->uid; + + return $record; + } + + /** + * @return string + */ + public function getUid() + { + return $this->uid; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..ea1d89782982c9749ccbb5d025416f38923f57eb --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Injects url/method and remote IP of the current web request in all records + * + * @author Jordi Boggiano + */ +class WebProcessor +{ + /** + * @var array|\ArrayAccess + */ + protected $serverData; + + /** + * Default fields + * + * Array is structured as [key in record.extra => key in $serverData] + * + * @var array + */ + protected $extraFields = array( + 'url' => 'REQUEST_URI', + 'ip' => 'REMOTE_ADDR', + 'http_method' => 'REQUEST_METHOD', + 'server' => 'SERVER_NAME', + 'referrer' => 'HTTP_REFERER', + ); + + /** + * @param array|\ArrayAccess $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data + * @param array|null $extraFields Field names and the related key inside $serverData to be added. If not provided it defaults to: url, ip, http_method, server, referrer + */ + public function __construct($serverData = null, array $extraFields = null) + { + if (null === $serverData) { + $this->serverData = &$_SERVER; + } elseif (is_array($serverData) || $serverData instanceof \ArrayAccess) { + $this->serverData = $serverData; + } else { + throw new \UnexpectedValueException('$serverData must be an array or object implementing ArrayAccess.'); + } + + if (null !== $extraFields) { + if (isset($extraFields[0])) { + foreach (array_keys($this->extraFields) as $fieldName) { + if (!in_array($fieldName, $extraFields)) { + unset($this->extraFields[$fieldName]); + } + } + } else { + $this->extraFields = $extraFields; + } + } + } + + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + // skip processing if for some reason request data + // is not present (CLI or wonky SAPIs) + if (!isset($this->serverData['REQUEST_URI'])) { + return $record; + } + + $record['extra'] = $this->appendExtraFields($record['extra']); + + return $record; + } + + /** + * @param string $extraName + * @param string $serverName + * @return $this + */ + public function addExtraField($extraName, $serverName) + { + $this->extraFields[$extraName] = $serverName; + + return $this; + } + + /** + * @param array $extra + * @return array + */ + private function appendExtraFields(array $extra) + { + foreach ($this->extraFields as $extraName => $serverName) { + $extra[$extraName] = isset($this->serverData[$serverName]) ? $this->serverData[$serverName] : null; + } + + if (isset($this->serverData['UNIQUE_ID'])) { + $extra['unique_id'] = $this->serverData['UNIQUE_ID']; + } + + return $extra; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Registry.php b/vendor/monolog/monolog/src/Monolog/Registry.php new file mode 100644 index 0000000000000000000000000000000000000000..159b751cdbc463ce0134003bf2e4d7703c9cdafc --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Registry.php @@ -0,0 +1,134 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use InvalidArgumentException; + +/** + * Monolog log registry + * + * Allows to get `Logger` instances in the global scope + * via static method calls on this class. + * + * + * $application = new Monolog\Logger('application'); + * $api = new Monolog\Logger('api'); + * + * Monolog\Registry::addLogger($application); + * Monolog\Registry::addLogger($api); + * + * function testLogger() + * { + * Monolog\Registry::api()->addError('Sent to $api Logger instance'); + * Monolog\Registry::application()->addError('Sent to $application Logger instance'); + * } + * + * + * @author Tomas Tatarko + */ +class Registry +{ + /** + * List of all loggers in the registry (by named indexes) + * + * @var Logger[] + */ + private static $loggers = array(); + + /** + * Adds new logging channel to the registry + * + * @param Logger $logger Instance of the logging channel + * @param string|null $name Name of the logging channel ($logger->getName() by default) + * @param bool $overwrite Overwrite instance in the registry if the given name already exists? + * @throws \InvalidArgumentException If $overwrite set to false and named Logger instance already exists + */ + public static function addLogger(Logger $logger, $name = null, $overwrite = false) + { + $name = $name ?: $logger->getName(); + + if (isset(self::$loggers[$name]) && !$overwrite) { + throw new InvalidArgumentException('Logger with the given name already exists'); + } + + self::$loggers[$name] = $logger; + } + + /** + * Checks if such logging channel exists by name or instance + * + * @param string|Logger $logger Name or logger instance + */ + public static function hasLogger($logger) + { + if ($logger instanceof Logger) { + $index = array_search($logger, self::$loggers, true); + + return false !== $index; + } else { + return isset(self::$loggers[$logger]); + } + } + + /** + * Removes instance from registry by name or instance + * + * @param string|Logger $logger Name or logger instance + */ + public static function removeLogger($logger) + { + if ($logger instanceof Logger) { + if (false !== ($idx = array_search($logger, self::$loggers, true))) { + unset(self::$loggers[$idx]); + } + } else { + unset(self::$loggers[$logger]); + } + } + + /** + * Clears the registry + */ + public static function clear() + { + self::$loggers = array(); + } + + /** + * Gets Logger instance from the registry + * + * @param string $name Name of the requested Logger instance + * @throws \InvalidArgumentException If named Logger instance is not in the registry + * @return Logger Requested instance of Logger + */ + public static function getInstance($name) + { + if (!isset(self::$loggers[$name])) { + throw new InvalidArgumentException(sprintf('Requested "%s" logger instance is not in the registry', $name)); + } + + return self::$loggers[$name]; + } + + /** + * Gets Logger instance from the registry via static method call + * + * @param string $name Name of the requested Logger instance + * @param array $arguments Arguments passed to static method call + * @throws \InvalidArgumentException If named Logger instance is not in the registry + * @return Logger Requested instance of Logger + */ + public static function __callStatic($name, $arguments) + { + return self::getInstance($name); + } +} diff --git a/vendor/paragonie/random_compat/LICENSE b/vendor/paragonie/random_compat/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..45c7017dfb33dd003ee038cc9232d2430ffbf9a2 --- /dev/null +++ b/vendor/paragonie/random_compat/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Paragon Initiative Enterprises + +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/vendor/paragonie/random_compat/build-phar.sh b/vendor/paragonie/random_compat/build-phar.sh new file mode 100755 index 0000000000000000000000000000000000000000..b4a5ba31cc7bbd042027b4c111e224c4c99f4fc5 --- /dev/null +++ b/vendor/paragonie/random_compat/build-phar.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +basedir=$( dirname $( readlink -f ${BASH_SOURCE[0]} ) ) + +php -dphar.readonly=0 "$basedir/other/build_phar.php" $* \ No newline at end of file diff --git a/vendor/paragonie/random_compat/composer.json b/vendor/paragonie/random_compat/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c5978c6fbce9c3466a223748b85bc05a9682221 --- /dev/null +++ b/vendor/paragonie/random_compat/composer.json @@ -0,0 +1,37 @@ +{ + "name": "paragonie/random_compat", + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "random", + "pseudorandom" + ], + "license": "MIT", + "type": "library", + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "support": { + "issues": "https://github.com/paragonie/random_compat/issues", + "email": "info@paragonie.com", + "source": "https://github.com/paragonie/random_compat" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "autoload": { + "files": [ + "lib/random.php" + ] + } +} diff --git a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey new file mode 100644 index 0000000000000000000000000000000000000000..eb50ebfcd6d53169b6ddcf0013977f3ffa1542e8 --- /dev/null +++ b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey @@ -0,0 +1,5 @@ +-----BEGIN PUBLIC KEY----- +MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm +pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p ++h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc +-----END PUBLIC KEY----- diff --git a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc new file mode 100644 index 0000000000000000000000000000000000000000..6a1d7f300675f3b42775d0b5aae49fc40768bc56 --- /dev/null +++ b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (MingW32) + +iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip +QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg +1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW +NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA +NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV +JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74= +=B6+8 +-----END PGP SIGNATURE----- diff --git a/vendor/paragonie/random_compat/lib/byte_safe_strings.php b/vendor/paragonie/random_compat/lib/byte_safe_strings.php new file mode 100644 index 0000000000000000000000000000000000000000..6de294f845abf714f9914b8ce5e80a0094a59900 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/byte_safe_strings.php @@ -0,0 +1,181 @@ + RandomCompat_strlen($binary_string)) { + return ''; + } + + return (string) mb_substr($binary_string, $start, $length, '8bit'); + } + + } else { + + /** + * substr() implementation that isn't brittle to mbstring.func_overload + * + * This version just uses the default substr() + * + * @param string $binary_string + * @param int $start + * @param int $length (optional) + * + * @throws TypeError + * + * @return string + */ + function RandomCompat_substr($binary_string, $start, $length = null) + { + if (!is_string($binary_string)) { + throw new TypeError( + 'RandomCompat_substr(): First argument should be a string' + ); + } + + if (!is_int($start)) { + throw new TypeError( + 'RandomCompat_substr(): Second argument should be an integer' + ); + } + + if ($length !== null) { + if (!is_int($length)) { + throw new TypeError( + 'RandomCompat_substr(): Third argument should be an integer, or omitted' + ); + } + + return (string) substr($binary_string, $start, $length); + } + + return (string) substr($binary_string, $start); + } + } +} diff --git a/vendor/paragonie/random_compat/lib/cast_to_int.php b/vendor/paragonie/random_compat/lib/cast_to_int.php new file mode 100644 index 0000000000000000000000000000000000000000..5a57a55723bffa8452065006151777433ac6d060 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/cast_to_int.php @@ -0,0 +1,74 @@ + operators might accidentally let a float + * through. + * + * @param int|float $number The number we want to convert to an int + * @param boolean $fail_open Set to true to not throw an exception + * + * @return float|int + * + * @throws TypeError + */ + function RandomCompat_intval($number, $fail_open = false) + { + if (is_int($number) || is_float($number)) { + $number += 0; + } elseif (is_numeric($number)) { + $number += 0; + } + + if ( + is_float($number) + && + $number > ~PHP_INT_MAX + && + $number < PHP_INT_MAX + ) { + $number = (int) $number; + } + + if (is_int($number)) { + return (int) $number; + } elseif (!$fail_open) { + throw new TypeError( + 'Expected an integer.' + ); + } + return $number; + } +} diff --git a/vendor/paragonie/random_compat/lib/error_polyfill.php b/vendor/paragonie/random_compat/lib/error_polyfill.php new file mode 100644 index 0000000000000000000000000000000000000000..69ee3794d9e6d5e767604a8dc674048344b98179 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/error_polyfill.php @@ -0,0 +1,49 @@ += 70000) { + return; +} + +if (!defined('RANDOM_COMPAT_READ_BUFFER')) { + define('RANDOM_COMPAT_READ_BUFFER', 8); +} + +$RandomCompatDIR = dirname(__FILE__); + +require_once $RandomCompatDIR.'/byte_safe_strings.php'; +require_once $RandomCompatDIR.'/cast_to_int.php'; +require_once $RandomCompatDIR.'/error_polyfill.php'; + +if (!is_callable('random_bytes')) { + /** + * PHP 5.2.0 - 5.6.x way to implement random_bytes() + * + * We use conditional statements here to define the function in accordance + * to the operating environment. It's a micro-optimization. + * + * In order of preference: + * 1. Use libsodium if available. + * 2. fread() /dev/urandom if available (never on Windows) + * 3. mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM) + * 4. COM('CAPICOM.Utilities.1')->GetRandom() + * + * See RATIONALE.md for our reasoning behind this particular order + */ + if (extension_loaded('libsodium')) { + // See random_bytes_libsodium.php + if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) { + require_once $RandomCompatDIR.'/random_bytes_libsodium.php'; + } elseif (method_exists('Sodium', 'randombytes_buf')) { + require_once $RandomCompatDIR.'/random_bytes_libsodium_legacy.php'; + } + } + + /** + * Reading directly from /dev/urandom: + */ + if (DIRECTORY_SEPARATOR === '/') { + // DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast + // way to exclude Windows. + $RandomCompatUrandom = true; + $RandomCompat_basedir = ini_get('open_basedir'); + + if (!empty($RandomCompat_basedir)) { + $RandomCompat_open_basedir = explode( + PATH_SEPARATOR, + strtolower($RandomCompat_basedir) + ); + $RandomCompatUrandom = (array() !== array_intersect( + array('/dev', '/dev/', '/dev/urandom'), + $RandomCompat_open_basedir + )); + $RandomCompat_open_basedir = null; + } + + if ( + !is_callable('random_bytes') + && + $RandomCompatUrandom + && + @is_readable('/dev/urandom') + ) { + // Error suppression on is_readable() in case of an open_basedir + // or safe_mode failure. All we care about is whether or not we + // can read it at this point. If the PHP environment is going to + // panic over trying to see if the file can be read in the first + // place, that is not helpful to us here. + + // See random_bytes_dev_urandom.php + require_once $RandomCompatDIR.'/random_bytes_dev_urandom.php'; + } + // Unset variables after use + $RandomCompat_basedir = null; + } else { + $RandomCompatUrandom = false; + } + + /** + * mcrypt_create_iv() + * + * We only want to use mcypt_create_iv() if: + * + * - random_bytes() hasn't already been defined + * - PHP >= 5.3.7 + * - the mcrypt extensions is loaded + * - One of these two conditions is true: + * - We're on Windows (DIRECTORY_SEPARATOR !== '/') + * - We're not on Windows and /dev/urandom is readabale + * (i.e. we're not in a chroot jail) + * - Special case: + * - If we're not on Windows, but the PHP version is between + * 5.6.10 and 5.6.12, we don't want to use mcrypt. It will + * hang indefinitely. This is bad. + */ + if ( + !is_callable('random_bytes') + && + PHP_VERSION_ID >= 50307 + && + extension_loaded('mcrypt') + ) { + // Prevent this code from hanging indefinitely on non-Windows; + // see https://bugs.php.net/bug.php?id=69833 + if ( + DIRECTORY_SEPARATOR !== '/' || + (PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613) + ) { + // See random_bytes_mcrypt.php + require_once $RandomCompatDIR.'/random_bytes_mcrypt.php'; + } + } + $RandomCompatUrandom = null; + + /** + * This is a Windows-specific fallback, for when the mcrypt extension + * isn't loaded. + */ + if ( + !is_callable('random_bytes') + && + extension_loaded('com_dotnet') + && + class_exists('COM') + ) { + $RandomCompat_disabled_classes = preg_split( + '#\s*,\s*#', + strtolower(ini_get('disable_classes')) + ); + + if (!in_array('com', $RandomCompat_disabled_classes)) { + try { + $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1'); + if (method_exists($RandomCompatCOMtest, 'GetRandom')) { + // See random_bytes_com_dotnet.php + require_once $RandomCompatDIR.'/random_bytes_com_dotnet.php'; + } + } catch (com_exception $e) { + // Don't try to use it. + } + } + $RandomCompat_disabled_classes = null; + $RandomCompatCOMtest = null; + } + + /** + * throw new Exception + */ + if (!is_callable('random_bytes')) { + /** + * We don't have any more options, so let's throw an exception right now + * and hope the developer won't let it fail silently. + * + * @param mixed $length + * @return void + * @throws Exception + */ + function random_bytes($length) + { + throw new Exception( + 'There is no suitable CSPRNG installed on your system' + ); + } + } +} + +if (!is_callable('random_int')) { + require_once $RandomCompatDIR.'/random_int.php'; +} + +$RandomCompatDIR = null; diff --git a/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php new file mode 100644 index 0000000000000000000000000000000000000000..97df3f324aa65e52b2a0935fd0bb3c7f23fcbd56 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php @@ -0,0 +1,88 @@ +GetRandom($bytes, 0)); + if (RandomCompat_strlen($buf) >= $bytes) { + /** + * Return our random entropy buffer here: + */ + return RandomCompat_substr($buf, 0, $bytes); + } + ++$execCount; + } while ($execCount < $bytes); + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); + } +} \ No newline at end of file diff --git a/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php new file mode 100644 index 0000000000000000000000000000000000000000..05a96932b024d687e1850e6053c03300b7fd991c --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php @@ -0,0 +1,167 @@ + 0); + + /** + * Is our result valid? + */ + if (is_string($buf)) { + if (RandomCompat_strlen($buf) === $bytes) { + /** + * Return our random entropy buffer here: + */ + return $buf; + } + } + } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Error reading from source device' + ); + } +} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php new file mode 100644 index 0000000000000000000000000000000000000000..025b90076289b4e0d3cba2a243ddb15c456c5ea3 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php @@ -0,0 +1,88 @@ + 2147483647) { + $buf = ''; + for ($i = 0; $i < $bytes; $i += 1073741824) { + $n = ($bytes - $i) > 1073741824 + ? 1073741824 + : $bytes - $i; + $buf .= \Sodium\randombytes_buf($n); + } + } else { + $buf = \Sodium\randombytes_buf($bytes); + } + + if ($buf !== false) { + if (RandomCompat_strlen($buf) === $bytes) { + return $buf; + } + } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); + } +} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php new file mode 100644 index 0000000000000000000000000000000000000000..81023b965cb1481ffb35f5a4cf23a2b6795f975a --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php @@ -0,0 +1,92 @@ + 2147483647) { + for ($i = 0; $i < $bytes; $i += 1073741824) { + $n = ($bytes - $i) > 1073741824 + ? 1073741824 + : $bytes - $i; + $buf .= Sodium::randombytes_buf($n); + } + } else { + $buf .= Sodium::randombytes_buf($bytes); + } + + if (is_string($buf)) { + if (RandomCompat_strlen($buf) === $bytes) { + return $buf; + } + } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); + } +} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php new file mode 100644 index 0000000000000000000000000000000000000000..f18736dc9206a23115a3d6080763ccacf0e5e622 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php @@ -0,0 +1,77 @@ + operators might accidentally let a float + * through. + */ + + try { + $min = RandomCompat_intval($min); + } catch (TypeError $ex) { + throw new TypeError( + 'random_int(): $min must be an integer' + ); + } + + try { + $max = RandomCompat_intval($max); + } catch (TypeError $ex) { + throw new TypeError( + 'random_int(): $max must be an integer' + ); + } + + /** + * Now that we've verified our weak typing system has given us an integer, + * let's validate the logic then we can move forward with generating random + * integers along a given range. + */ + if ($min > $max) { + throw new Error( + 'Minimum value must be less than or equal to the maximum value' + ); + } + + if ($max === $min) { + return $min; + } + + /** + * Initialize variables to 0 + * + * We want to store: + * $bytes => the number of random bytes we need + * $mask => an integer bitmask (for use with the &) operator + * so we can minimize the number of discards + */ + $attempts = $bits = $bytes = $mask = $valueShift = 0; + + /** + * At this point, $range is a positive number greater than 0. It might + * overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to + * a float and we will lose some precision. + */ + $range = $max - $min; + + /** + * Test for integer overflow: + */ + if (!is_int($range)) { + + /** + * Still safely calculate wider ranges. + * Provided by @CodesInChaos, @oittaa + * + * @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435 + * + * We use ~0 as a mask in this case because it generates all 1s + * + * @ref https://eval.in/400356 (32-bit) + * @ref http://3v4l.org/XX9r5 (64-bit) + */ + $bytes = PHP_INT_SIZE; + $mask = ~0; + + } else { + + /** + * $bits is effectively ceil(log($range, 2)) without dealing with + * type juggling + */ + while ($range > 0) { + if ($bits % 8 === 0) { + ++$bytes; + } + ++$bits; + $range >>= 1; + $mask = $mask << 1 | 1; + } + $valueShift = $min; + } + + $val = 0; + /** + * Now that we have our parameters set up, let's begin generating + * random integers until one falls between $min and $max + */ + do { + /** + * The rejection probability is at most 0.5, so this corresponds + * to a failure probability of 2^-128 for a working RNG + */ + if ($attempts > 128) { + throw new Exception( + 'random_int: RNG is broken - too many rejections' + ); + } + + /** + * Let's grab the necessary number of random bytes + */ + $randomByteString = random_bytes($bytes); + + /** + * Let's turn $randomByteString into an integer + * + * This uses bitwise operators (<< and |) to build an integer + * out of the values extracted from ord() + * + * Example: [9F] | [6D] | [32] | [0C] => + * 159 + 27904 + 3276800 + 201326592 => + * 204631455 + */ + $val &= 0; + for ($i = 0; $i < $bytes; ++$i) { + $val |= ord($randomByteString[$i]) << ($i * 8); + } + + /** + * Apply mask + */ + $val &= $mask; + $val += $valueShift; + + ++$attempts; + /** + * If $val overflows to a floating point number, + * ... or is larger than $max, + * ... or smaller than $min, + * then try again. + */ + } while (!is_int($val) || $val > $max || $val < $min); + + return (int)$val; + } +} diff --git a/vendor/paragonie/random_compat/other/build_phar.php b/vendor/paragonie/random_compat/other/build_phar.php new file mode 100644 index 0000000000000000000000000000000000000000..70ef4b2ed838a6bf32d64e3da4c26f9d367e6ab5 --- /dev/null +++ b/vendor/paragonie/random_compat/other/build_phar.php @@ -0,0 +1,57 @@ +buildFromDirectory(dirname(__DIR__).'/lib'); +rename( + dirname(__DIR__).'/lib/index.php', + dirname(__DIR__).'/lib/random.php' +); + +/** + * If we pass an (optional) path to a private key as a second argument, we will + * sign the Phar with OpenSSL. + * + * If you leave this out, it will produce an unsigned .phar! + */ +if ($argc > 1) { + if (!@is_readable($argv[1])) { + echo 'Could not read the private key file:', $argv[1], "\n"; + exit(255); + } + $pkeyFile = file_get_contents($argv[1]); + + $private = openssl_get_privatekey($pkeyFile); + if ($private !== false) { + $pkey = ''; + openssl_pkey_export($private, $pkey); + $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); + + /** + * Save the corresponding public key to the file + */ + if (!@is_readable($dist.'/random_compat.phar.pubkey')) { + $details = openssl_pkey_get_details($private); + file_put_contents( + $dist.'/random_compat.phar.pubkey', + $details['key'] + ); + } + } else { + echo 'An error occurred reading the private key from OpenSSL.', "\n"; + exit(255); + } +} diff --git a/vendor/paragonie/random_compat/psalm-autoload.php b/vendor/paragonie/random_compat/psalm-autoload.php new file mode 100644 index 0000000000000000000000000000000000000000..d71d1b818c311072207e3ee4abff9f82a10d2fa9 --- /dev/null +++ b/vendor/paragonie/random_compat/psalm-autoload.php @@ -0,0 +1,9 @@ + + + + + + + + + + + diff --git a/vendor/psr/cache/CHANGELOG.md b/vendor/psr/cache/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..58ddab05aa1466153e77c25abbb4e7eb7905171a --- /dev/null +++ b/vendor/psr/cache/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +All notable changes to this project will be documented in this file, in reverse chronological order by release. + +## 1.0.1 - 2016-08-06 + +### Fixed + +- Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr +- Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr +- Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell +- For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell + +## 1.0.0 - 2015-12-11 + +Initial stable release; reflects accepted PSR-6 specification diff --git a/vendor/psr/cache/LICENSE.txt b/vendor/psr/cache/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..b1c2c97b9d42af7147b9a1a56848d7c746418f8c --- /dev/null +++ b/vendor/psr/cache/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (c) 2015 PHP Framework Interoperability Group + +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/vendor/psr/cache/README.md b/vendor/psr/cache/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c8706ceea6625ab367583434c1b640af977c61ba --- /dev/null +++ b/vendor/psr/cache/README.md @@ -0,0 +1,9 @@ +PSR Cache +========= + +This repository holds all interfaces defined by +[PSR-6](http://www.php-fig.org/psr/psr-6/). + +Note that this is not a Cache implementation of its own. It is merely an +interface that describes a Cache implementation. See the specification for more +details. diff --git a/vendor/psr/cache/composer.json b/vendor/psr/cache/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..e828fec9430d6397ab4b17eb8c384e4db381e245 --- /dev/null +++ b/vendor/psr/cache/composer.json @@ -0,0 +1,25 @@ +{ + "name": "psr/cache", + "description": "Common interface for caching libraries", + "keywords": ["psr", "psr-6", "cache"], + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/vendor/psr/cache/src/CacheException.php b/vendor/psr/cache/src/CacheException.php new file mode 100644 index 0000000000000000000000000000000000000000..e27f22f8d6026cfa5bcb94bba6f316a88cb722b4 --- /dev/null +++ b/vendor/psr/cache/src/CacheException.php @@ -0,0 +1,10 @@ +log(LogLevel::EMERGENCY, $message, $context); + } + + /** + * Action must be taken immediately. + * + * Example: Entire website down, database unavailable, etc. This should + * trigger the SMS alerts and wake you up. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function alert($message, array $context = array()) + { + $this->log(LogLevel::ALERT, $message, $context); + } + + /** + * Critical conditions. + * + * Example: Application component unavailable, unexpected exception. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function critical($message, array $context = array()) + { + $this->log(LogLevel::CRITICAL, $message, $context); + } + + /** + * Runtime errors that do not require immediate action but should typically + * be logged and monitored. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function error($message, array $context = array()) + { + $this->log(LogLevel::ERROR, $message, $context); + } + + /** + * Exceptional occurrences that are not errors. + * + * Example: Use of deprecated APIs, poor use of an API, undesirable things + * that are not necessarily wrong. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function warning($message, array $context = array()) + { + $this->log(LogLevel::WARNING, $message, $context); + } + + /** + * Normal but significant events. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function notice($message, array $context = array()) + { + $this->log(LogLevel::NOTICE, $message, $context); + } + + /** + * Interesting events. + * + * Example: User logs in, SQL logs. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function info($message, array $context = array()) + { + $this->log(LogLevel::INFO, $message, $context); + } + + /** + * Detailed debug information. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function debug($message, array $context = array()) + { + $this->log(LogLevel::DEBUG, $message, $context); + } +} diff --git a/vendor/psr/log/Psr/Log/InvalidArgumentException.php b/vendor/psr/log/Psr/Log/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..67f852d1dbc660ba05e703fe9b727727da2b3f78 --- /dev/null +++ b/vendor/psr/log/Psr/Log/InvalidArgumentException.php @@ -0,0 +1,7 @@ +logger = $logger; + } +} diff --git a/vendor/psr/log/Psr/Log/LoggerInterface.php b/vendor/psr/log/Psr/Log/LoggerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5ea72438b56694639c13101cbc3c82339a6e96a8 --- /dev/null +++ b/vendor/psr/log/Psr/Log/LoggerInterface.php @@ -0,0 +1,123 @@ +log(LogLevel::EMERGENCY, $message, $context); + } + + /** + * Action must be taken immediately. + * + * Example: Entire website down, database unavailable, etc. This should + * trigger the SMS alerts and wake you up. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function alert($message, array $context = array()) + { + $this->log(LogLevel::ALERT, $message, $context); + } + + /** + * Critical conditions. + * + * Example: Application component unavailable, unexpected exception. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function critical($message, array $context = array()) + { + $this->log(LogLevel::CRITICAL, $message, $context); + } + + /** + * Runtime errors that do not require immediate action but should typically + * be logged and monitored. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function error($message, array $context = array()) + { + $this->log(LogLevel::ERROR, $message, $context); + } + + /** + * Exceptional occurrences that are not errors. + * + * Example: Use of deprecated APIs, poor use of an API, undesirable things + * that are not necessarily wrong. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function warning($message, array $context = array()) + { + $this->log(LogLevel::WARNING, $message, $context); + } + + /** + * Normal but significant events. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function notice($message, array $context = array()) + { + $this->log(LogLevel::NOTICE, $message, $context); + } + + /** + * Interesting events. + * + * Example: User logs in, SQL logs. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function info($message, array $context = array()) + { + $this->log(LogLevel::INFO, $message, $context); + } + + /** + * Detailed debug information. + * + * @param string $message + * @param array $context + * + * @return void + */ + public function debug($message, array $context = array()) + { + $this->log(LogLevel::DEBUG, $message, $context); + } + + /** + * Logs with an arbitrary level. + * + * @param mixed $level + * @param string $message + * @param array $context + * + * @return void + */ + abstract public function log($level, $message, array $context = array()); +} diff --git a/vendor/psr/log/Psr/Log/NullLogger.php b/vendor/psr/log/Psr/Log/NullLogger.php new file mode 100644 index 0000000000000000000000000000000000000000..d8cd682c8f963e8f5e04f46a4a57308cc8d9ecf0 --- /dev/null +++ b/vendor/psr/log/Psr/Log/NullLogger.php @@ -0,0 +1,28 @@ +logger) { }` + * blocks. + */ +class NullLogger extends AbstractLogger +{ + /** + * Logs with an arbitrary level. + * + * @param mixed $level + * @param string $message + * @param array $context + * + * @return void + */ + public function log($level, $message, array $context = array()) + { + // noop + } +} diff --git a/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php b/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a0391a52b8fc10b727c2258a19520c65791fc1ae --- /dev/null +++ b/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php @@ -0,0 +1,140 @@ + ". + * + * Example ->error('Foo') would yield "error Foo". + * + * @return string[] + */ + abstract public function getLogs(); + + public function testImplements() + { + $this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger()); + } + + /** + * @dataProvider provideLevelsAndMessages + */ + public function testLogsAtAllLevels($level, $message) + { + $logger = $this->getLogger(); + $logger->{$level}($message, array('user' => 'Bob')); + $logger->log($level, $message, array('user' => 'Bob')); + + $expected = array( + $level.' message of level '.$level.' with context: Bob', + $level.' message of level '.$level.' with context: Bob', + ); + $this->assertEquals($expected, $this->getLogs()); + } + + public function provideLevelsAndMessages() + { + return array( + LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'), + LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'), + LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'), + LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'), + LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'), + LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'), + LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'), + LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'), + ); + } + + /** + * @expectedException \Psr\Log\InvalidArgumentException + */ + public function testThrowsOnInvalidLevel() + { + $logger = $this->getLogger(); + $logger->log('invalid level', 'Foo'); + } + + public function testContextReplacement() + { + $logger = $this->getLogger(); + $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar')); + + $expected = array('info {Message {nothing} Bob Bar a}'); + $this->assertEquals($expected, $this->getLogs()); + } + + public function testObjectCastToString() + { + if (method_exists($this, 'createPartialMock')) { + $dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString')); + } else { + $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString')); + } + $dummy->expects($this->once()) + ->method('__toString') + ->will($this->returnValue('DUMMY')); + + $this->getLogger()->warning($dummy); + + $expected = array('warning DUMMY'); + $this->assertEquals($expected, $this->getLogs()); + } + + public function testContextCanContainAnything() + { + $context = array( + 'bool' => true, + 'null' => null, + 'string' => 'Foo', + 'int' => 0, + 'float' => 0.5, + 'nested' => array('with object' => new DummyTest), + 'object' => new \DateTime, + 'resource' => fopen('php://memory', 'r'), + ); + + $this->getLogger()->warning('Crazy context data', $context); + + $expected = array('warning Crazy context data'); + $this->assertEquals($expected, $this->getLogs()); + } + + public function testContextExceptionKeyCanBeExceptionOrOtherValues() + { + $logger = $this->getLogger(); + $logger->warning('Random message', array('exception' => 'oops')); + $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); + + $expected = array( + 'warning Random message', + 'critical Uncaught Exception!' + ); + $this->assertEquals($expected, $this->getLogs()); + } +} + +class DummyTest +{ + public function __toString() + { + } +} diff --git a/vendor/psr/log/README.md b/vendor/psr/log/README.md new file mode 100644 index 0000000000000000000000000000000000000000..574bc1cb2a82ffa07bcc2f7ffee3656eb086ba29 --- /dev/null +++ b/vendor/psr/log/README.md @@ -0,0 +1,45 @@ +PSR Log +======= + +This repository holds all interfaces/classes/traits related to +[PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md). + +Note that this is not a logger of its own. It is merely an interface that +describes a logger. See the specification for more details. + +Usage +----- + +If you need a logger, you can use the interface like this: + +```php +logger = $logger; + } + + public function doSomething() + { + if ($this->logger) { + $this->logger->info('Doing work'); + } + + // do something useful + } +} +``` + +You can then pick one of the implementations of the interface to get a logger. + +If you want to implement the interface, you can require this package and +implement `Psr\Log\LoggerInterface` in your code. Please read the +[specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) +for details. diff --git a/vendor/psr/log/composer.json b/vendor/psr/log/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..87934d707e7a37325a0ec6afe4b63aaa4ca6337c --- /dev/null +++ b/vendor/psr/log/composer.json @@ -0,0 +1,26 @@ +{ + "name": "psr/log", + "description": "Common interface for logging libraries", + "keywords": ["psr", "psr-3", "log"], + "homepage": "https://github.com/php-fig/log", + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/vendor/sensio/distribution-bundle/Composer/ScriptHandler.php b/vendor/sensio/distribution-bundle/Composer/ScriptHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..47a2fc17bd30cfa71996a35b0ac25b1413023dbb --- /dev/null +++ b/vendor/sensio/distribution-bundle/Composer/ScriptHandler.php @@ -0,0 +1,456 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\DistributionBundle\Composer; + +use Symfony\Component\ClassLoader\ClassCollectionLoader; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Process\Process; +use Symfony\Component\Process\PhpExecutableFinder; +use Composer\Script\Event; + +/** + * @author Jordi Boggiano + */ +class ScriptHandler +{ + /** + * Composer variables are declared static so that an event could update + * a composer.json and set new options, making them immediately available + * to forthcoming listeners. + */ + protected static $options = array( + 'symfony-app-dir' => 'app', + 'symfony-web-dir' => 'web', + 'symfony-assets-install' => 'hard', + 'symfony-cache-warmup' => false, + ); + + /** + * Asks if the new directory structure should be used, installs the structure if needed. + * + * @param Event $event + */ + public static function defineDirectoryStructure(Event $event) + { + $options = static::getOptions($event); + + if (!getenv('SENSIOLABS_ENABLE_NEW_DIRECTORY_STRUCTURE') || !$event->getIO()->askConfirmation('Would you like to use Symfony 3 directory structure? [y/N] ', false)) { + return; + } + + $rootDir = getcwd(); + $appDir = $options['symfony-app-dir']; + $webDir = $options['symfony-web-dir']; + $binDir = static::$options['symfony-bin-dir'] = 'bin'; + $varDir = static::$options['symfony-var-dir'] = 'var'; + + static::updateDirectoryStructure($event, $rootDir, $appDir, $binDir, $varDir, $webDir); + } + + /** + * Builds the bootstrap file. + * + * The bootstrap file contains PHP file that are always needed by the application. + * It speeds up the application bootstrapping. + * + * @param Event $event + */ + public static function buildBootstrap(Event $event) + { + $options = static::getOptions($event); + $bootstrapDir = $autoloadDir = $options['symfony-app-dir']; + + if (static::useNewDirectoryStructure($options)) { + $bootstrapDir = $options['symfony-var-dir']; + if (!static::hasDirectory($event, 'symfony-var-dir', $bootstrapDir, 'build bootstrap file')) { + return; + } + } + if (!static::hasDirectory($event, 'symfony-app-dir', $autoloadDir, 'build bootstrap file')) { + return; + } + + static::executeBuildBootstrap($event, $bootstrapDir, $autoloadDir, $options['process-timeout']); + } + + protected static function hasDirectory(Event $event, $configName, $path, $actionName) + { + if (!is_dir($path)) { + $event->getIO()->write(sprintf('The %s (%s) specified in composer.json was not found in %s, can not %s.', $configName, $path, getcwd(), $actionName)); + + return false; + } + + return true; + } + + /** + * Sets up deployment target specific features. + * Could be custom web server configs, boot command files etc. + * + * @param Event $event + */ + public static function prepareDeploymentTarget(Event $event) + { + static::prepareDeploymentTargetHeroku($event); + } + + protected static function prepareDeploymentTargetHeroku(Event $event) + { + $options = static::getOptions($event); + if (($stack = getenv('STACK')) && ($stack == 'cedar' || $stack == 'cedar-14')) { + $fs = new Filesystem(); + if (!$fs->exists('Procfile')) { + $event->getIO()->write('Heroku deploy detected; creating default Procfile for "web" dyno'); + $fs->dumpFile('Procfile', sprintf('web: $(composer config bin-dir)/heroku-php-apache2 %s/', $options['symfony-web-dir'])); + } + } + } + + /** + * Clears the Symfony cache. + * + * @param Event $event + */ + public static function clearCache(Event $event) + { + $options = static::getOptions($event); + $consoleDir = static::getConsoleDir($event, 'clear the cache'); + + if (null === $consoleDir) { + return; + } + + $warmup = ''; + if (!$options['symfony-cache-warmup']) { + $warmup = ' --no-warmup'; + } + + static::executeCommand($event, $consoleDir, 'cache:clear'.$warmup, $options['process-timeout']); + } + + /** + * Installs the assets under the web root directory. + * + * For better interoperability, assets are copied instead of symlinked by default. + * + * Even if symlinks work on Windows, this is only true on Windows Vista and later, + * but then, only when running the console with admin rights or when disabling the + * strict user permission checks (which can be done on Windows 7 but not on Windows + * Vista). + * + * @param Event $event + */ + public static function installAssets(Event $event) + { + $options = static::getOptions($event); + $consoleDir = static::getConsoleDir($event, 'install assets'); + + if (null === $consoleDir) { + return; + } + + $webDir = $options['symfony-web-dir']; + + $symlink = ''; + if ('symlink' == $options['symfony-assets-install']) { + $symlink = '--symlink '; + } elseif ('relative' == $options['symfony-assets-install']) { + $symlink = '--symlink --relative '; + } + + if (!static::hasDirectory($event, 'symfony-web-dir', $webDir, 'install assets')) { + return; + } + + static::executeCommand($event, $consoleDir, 'assets:install '.$symlink.escapeshellarg($webDir), $options['process-timeout']); + } + + /** + * Updated the requirements file. + * + * @param Event $event + */ + public static function installRequirementsFile(Event $event) + { + $options = static::getOptions($event); + $appDir = $options['symfony-app-dir']; + $fs = new Filesystem(); + + $newDirectoryStructure = static::useNewDirectoryStructure($options); + + if (!$newDirectoryStructure) { + if (!static::hasDirectory($event, 'symfony-app-dir', $appDir, 'install the requirements files')) { + return; + } + $fs->copy(__DIR__.'/../Resources/skeleton/app/SymfonyRequirements.php', $appDir.'/SymfonyRequirements.php', true); + $fs->copy(__DIR__.'/../Resources/skeleton/app/check.php', $appDir.'/check.php', true); + } else { + $binDir = $options['symfony-bin-dir']; + $varDir = $options['symfony-var-dir']; + if (!static::hasDirectory($event, 'symfony-var-dir', $varDir, 'install the requirements files')) { + return; + } + if (!static::hasDirectory($event, 'symfony-bin-dir', $binDir, 'install the requirements files')) { + return; + } + $fs->copy(__DIR__.'/../Resources/skeleton/app/SymfonyRequirements.php', $varDir.'/SymfonyRequirements.php', true); + $fs->copy(__DIR__.'/../Resources/skeleton/app/check.php', $binDir.'/symfony_requirements', true); + $fs->remove(array($appDir.'/check.php', $appDir.'/SymfonyRequirements.php', true)); + + $fs->dumpFile($binDir.'/symfony_requirements', '#!/usr/bin/env php'."\n".str_replace(".'/SymfonyRequirements.php'", ".'/".$fs->makePathRelative($varDir, $binDir)."SymfonyRequirements.php'", file_get_contents($binDir.'/symfony_requirements'))); + $fs->chmod($binDir.'/symfony_requirements', 0755); + } + + $webDir = $options['symfony-web-dir']; + + // if the user has already removed the config.php file, do nothing + // as the file must be removed for production use + if ($fs->exists($webDir.'/config.php')) { + $requiredDir = $newDirectoryStructure ? $varDir : $appDir; + + $fs->dumpFile($webDir.'/config.php', str_replace('/../app/SymfonyRequirements.php', '/'.$fs->makePathRelative($requiredDir, $webDir).'SymfonyRequirements.php', file_get_contents(__DIR__.'/../Resources/skeleton/web/config.php'))); + } + } + + public static function removeSymfonyStandardFiles(Event $event) + { + $options = static::getOptions($event); + $appDir = $options['symfony-app-dir']; + + if (!is_dir($appDir)) { + return; + } + + if (!is_dir($appDir.'/SymfonyStandard')) { + return; + } + + $fs = new Filesystem(); + $fs->remove($appDir.'/SymfonyStandard'); + } + + public static function doBuildBootstrap($bootstrapDir) + { + $file = $bootstrapDir.'/bootstrap.php.cache'; + if (file_exists($file)) { + unlink($file); + } + + $classes = array( + 'Symfony\\Component\\HttpFoundation\\ParameterBag', + 'Symfony\\Component\\HttpFoundation\\HeaderBag', + 'Symfony\\Component\\HttpFoundation\\FileBag', + 'Symfony\\Component\\HttpFoundation\\ServerBag', + 'Symfony\\Component\\HttpFoundation\\Request', + + 'Symfony\\Component\\ClassLoader\\ClassCollectionLoader', + ); + + if (method_exists('Symfony\Component\ClassLoader\ClassCollectionLoader', 'inline')) { + ClassCollectionLoader::inline($classes, $file, array()); + } else { + ClassCollectionLoader::load($classes, dirname($file), basename($file, '.php.cache'), false, false, '.php.cache'); + } + + $bootstrapContent = substr(file_get_contents($file), 5); + + file_put_contents($file, sprintf(<<<'EOF' +getIO()->isDecorated()) { + $console .= ' --ansi'; + } + + $process = new Process($php.($phpArgs ? ' '.$phpArgs : '').' '.$console.' '.$cmd, null, null, null, $timeout); + $process->run(function ($type, $buffer) use ($event) { $event->getIO()->write($buffer, false); }); + if (!$process->isSuccessful()) { + throw new \RuntimeException(sprintf("An error occurred when executing the \"%s\" command:\n\n%s\n\n%s.", escapeshellarg($cmd), $process->getOutput(), $process->getErrorOutput())); + } + } + + protected static function executeBuildBootstrap(Event $event, $bootstrapDir, $autoloadDir, $timeout = 300) + { + $php = escapeshellarg(static::getPhp(false)); + $phpArgs = implode(' ', array_map('escapeshellarg', static::getPhpArguments())); + $cmd = escapeshellarg(__DIR__.'/../Resources/bin/build_bootstrap.php'); + $bootstrapDir = escapeshellarg($bootstrapDir); + $autoloadDir = escapeshellarg($autoloadDir); + $useNewDirectoryStructure = ''; + if (static::useNewDirectoryStructure(static::getOptions($event))) { + $useNewDirectoryStructure = escapeshellarg('--use-new-directory-structure'); + } + + $process = new Process($php.($phpArgs ? ' '.$phpArgs : '').' '.$cmd.' '.$bootstrapDir.' '.$autoloadDir.' '.$useNewDirectoryStructure, getcwd(), null, null, $timeout); + $process->run(function ($type, $buffer) use ($event) { $event->getIO()->write($buffer, false); }); + if (!$process->isSuccessful()) { + throw new \RuntimeException('An error occurred when generating the bootstrap file.'); + } + } + + protected static function updateDirectoryStructure(Event $event, $rootDir, $appDir, $binDir, $varDir, $webDir) + { + $event->getIO()->write('Updating Symfony directory structure...'); + + $fs = new Filesystem(); + + $fs->mkdir(array($binDir, $varDir)); + + foreach (array( + $appDir.'/console' => $binDir.'/console', + $appDir.'/phpunit.xml.dist' => $rootDir.'/phpunit.xml.dist', + ) as $source => $target) { + $fs->rename($source, $target, true); + } + + foreach (array('/logs', '/cache') as $dir) { + $fs->rename($appDir.$dir, $varDir.$dir); + } + + $gitignore = << + + + --> +EOF; + $phpunitKernelAfter = << + + +EOF; + $phpunit = str_replace(array('../src', '"bootstrap.php.cache"', $phpunitKernelBefore), array('src', '"'.$varDir.'/bootstrap.php.cache"', $phpunitKernelAfter), file_get_contents($rootDir.'/phpunit.xml.dist')); + $composer = str_replace('"symfony-app-dir": "app",', "\"symfony-app-dir\": \"app\",\n \"symfony-bin-dir\": \"bin\",\n \"symfony-var-dir\": \"var\",", file_get_contents($rootDir.'/composer.json')); + + $fs->dumpFile($webDir.'/app.php', str_replace($appDir.'/bootstrap.php.cache', $varDir.'/bootstrap.php.cache', file_get_contents($webDir.'/app.php'))); + $fs->dumpFile($webDir.'/app_dev.php', str_replace($appDir.'/bootstrap.php.cache', $varDir.'/bootstrap.php.cache', file_get_contents($webDir.'/app_dev.php'))); + $fs->dumpFile($binDir.'/console', str_replace(array(".'/bootstrap.php.cache'", ".'/AppKernel.php'"), array(".'/".$fs->makePathRelative($varDir, $binDir)."bootstrap.php.cache'", ".'/".$fs->makePathRelative($appDir, $binDir)."AppKernel.php'"), file_get_contents($binDir.'/console'))); + $fs->dumpFile($rootDir.'/phpunit.xml.dist', $phpunit); + $fs->dumpFile($rootDir.'/composer.json', $composer); + + $fs->dumpFile($rootDir.'/.gitignore', $gitignore); + + $fs->chmod($binDir.'/console', 0755); + } + + protected static function getOptions(Event $event) + { + $options = array_merge(static::$options, $event->getComposer()->getPackage()->getExtra()); + + $options['symfony-assets-install'] = getenv('SYMFONY_ASSETS_INSTALL') ?: $options['symfony-assets-install']; + $options['symfony-cache-warmup'] = getenv('SYMFONY_CACHE_WARMUP') ?: $options['symfony-cache-warmup']; + + $options['process-timeout'] = $event->getComposer()->getConfig()->get('process-timeout'); + + return $options; + } + + protected static function getPhp($includeArgs = true) + { + $phpFinder = new PhpExecutableFinder(); + if (!$phpPath = $phpFinder->find($includeArgs)) { + throw new \RuntimeException('The php executable could not be found, add it to your PATH environment variable and try again'); + } + + return $phpPath; + } + + protected static function getPhpArguments() + { + $ini = null; + $arguments = array(); + + $phpFinder = new PhpExecutableFinder(); + if (method_exists($phpFinder, 'findArguments')) { + $arguments = $phpFinder->findArguments(); + } + + if ($env = strval(getenv('COMPOSER_ORIGINAL_INIS'))) { + $paths = explode(PATH_SEPARATOR, $env); + $ini = array_shift($paths); + } else { + $ini = php_ini_loaded_file(); + } + + if ($ini) { + $arguments[] = '--php-ini='.$ini; + } + + return $arguments; + } + + /** + * Returns a relative path to the directory that contains the `console` command. + * + * @param Event $event The command event + * @param string $actionName The name of the action + * + * @return string|null The path to the console directory, null if not found. + */ + protected static function getConsoleDir(Event $event, $actionName) + { + $options = static::getOptions($event); + + if (static::useNewDirectoryStructure($options)) { + if (!static::hasDirectory($event, 'symfony-bin-dir', $options['symfony-bin-dir'], $actionName)) { + return; + } + + return $options['symfony-bin-dir']; + } + + if (!static::hasDirectory($event, 'symfony-app-dir', $options['symfony-app-dir'], 'execute command')) { + return; + } + + return $options['symfony-app-dir']; + } + + /** + * Returns true if the new directory structure is used. + * + * @param array $options Composer options + * + * @return bool + */ + protected static function useNewDirectoryStructure(array $options) + { + return isset($options['symfony-var-dir']) && is_dir($options['symfony-var-dir']); + } +} diff --git a/vendor/sensio/distribution-bundle/DependencyInjection/SensioDistributionExtension.php b/vendor/sensio/distribution-bundle/DependencyInjection/SensioDistributionExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..bcee5e3201d25c9f588272494cb0dc2fa89a5692 --- /dev/null +++ b/vendor/sensio/distribution-bundle/DependencyInjection/SensioDistributionExtension.php @@ -0,0 +1,33 @@ + + */ +class SensioDistributionExtension extends Extension +{ + public function load(array $configs, ContainerBuilder $container) + { + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + + $loader->load('security.xml'); + } + + public function getNamespace() + { + return 'http://symfony.com/schema/dic/symfony/sensiodistribution'; + } + + public function getAlias() + { + return 'sensio_distribution'; + } +} diff --git a/vendor/sensio/distribution-bundle/LICENSE b/vendor/sensio/distribution-bundle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..b420d7195911b2ee5ab9eb7f1c4fcbe263b8732b --- /dev/null +++ b/vendor/sensio/distribution-bundle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010-2017 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/vendor/sensio/distribution-bundle/README.rst b/vendor/sensio/distribution-bundle/README.rst new file mode 100644 index 0000000000000000000000000000000000000000..575f0a91a1374213e64749466d2d9cfaf85b2cd8 --- /dev/null +++ b/vendor/sensio/distribution-bundle/README.rst @@ -0,0 +1,43 @@ +SensioDistributionBundle +======================== + +SensioDistributionBundle provides useful developer features that can be re-used +amongst several Symfony Distributions. + +Composer Hooks +-------------- + +The bundle hooks up into the Composer process to automate the following actions +when running an install or an update: + +* Update the ``bootstrap.php.cache`` file (and clears the cache); + +* Install the assets under the web root directory; + +* Update the requirements file. + +Security +-------- + +The bundle includes the SensioLabs Security Checker. When included in a Symfony +application, the check is available: + +.. code-block:: bash + + // In Symfony 2.x + $ ./app/console security:check + + // As of Symfony 2.8 and 3.x + $ ./bin/console security:check + +Contributing +------------ + +To contribute to this bundle, you just need a GitHub account. +If you need some help to start, you can check the `Symfony guidelines`_ and `code style conventions`_. +Bug fixes should be submitted against the 4.0 branch when possible, and new features are accepted on master only. + +Pull requests are welcome! + +.. _Symfony guidelines: https://symfony.com/doc/current/contributing/code/patches.html +.. _code style conventions: https://symfony.com/doc/current/contributing/code/standards.html diff --git a/vendor/sensio/distribution-bundle/Resources/bin/build.sh b/vendor/sensio/distribution-bundle/Resources/bin/build.sh new file mode 100755 index 0000000000000000000000000000000000000000..b1f920354655d3ea9b61ea6bede81a21692ef909 --- /dev/null +++ b/vendor/sensio/distribution-bundle/Resources/bin/build.sh @@ -0,0 +1,140 @@ +#!/bin/bash + +# This file is part of the Symfony Standard Edition. +# +# (c) Fabien Potencier +# +# For the full copyright and license information, please view the LICENSE +# file that was distributed with this source code. + +if [ ! $1 ]; then + echo "\033[37;41mYou must pass the build dir as an absolute path\033[0m" + exit 1 +fi + +if [ ! $2 ]; then + echo "\033[37;41mYou must pass the version to build\033[0m" + exit 1 +fi + +DIR=$1 +CURRENT=`php -r "echo realpath(dirname(\\$_SERVER['argv'][0]));"` + +if [[ ! "$DIR" = /* ]]; then + DIR="$CURRENT/$DIR" +fi + +if [ ! -d $DIR ]; then + echo "\033[37;41mThe build dir does not exist\033[0m" + exit 1 +fi + +# avoid the creation of ._* files +export COPY_EXTENDED_ATTRIBUTES_DISABLE=true +export COPYFILE_DISABLE=true + +# Temp dir +rm -rf /tmp/Symfony +mkdir /tmp/Symfony + +# Create project +composer create-project --prefer-dist --no-interaction symfony/framework-standard-edition /tmp/Symfony $2 + +if [ 0 -ne $? ]; then + echo "\033[37;41mVersion $2 does not exist\033[0m" + exit 1 +fi + +cd /tmp/Symfony + +# cleanup +rm -rf app/cache/* app/logs/* var/cache/* var/logs/* +chmod 777 app/cache app/logs var/cache var/logs +find . -name .DS_Store | xargs rm -rf - + +VERSION=`grep ' VERSION ' vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php | sed -E "s/.*'(.+)'.*/\1/g"` + +# With vendors +cd /tmp/Symfony +TARGET=/tmp/Symfony/vendor + +# Doctrine +cd $TARGET/doctrine/orm && rm -rf UPGRADE* build* tests tools lib/vendor +cd $TARGET/doctrine/dbal && rm -rf build* tests lib/vendor +cd $TARGET/doctrine/common && rm -rf build* tests lib/vendor +if [ -d $TARGET/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle ]; then + cd $TARGET/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle && rm -rf Tests Resources/doc +else + cd $TARGET/doctrine/doctrine-bundle && rm -rf Tests Resources/doc +fi + +# kriswallsmith +if [ -d $TARGET/kriswallsmith/assetic ]; then + cd $TARGET/kriswallsmith/assetic && rm -rf CHANGELOG* phpunit.xml* tests docs +fi + +# Monolog +cd $TARGET/monolog/monolog && rm -rf README.markdown phpunit.xml* tests + +# Sensio +if [ -d $TARGET/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle ]; then + cd $TARGET/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle && rm -rf phpunit.xml* Tests CHANGELOG* Resources/doc +else + cd $TARGET/sensio/distribution-bundle && rm -rf phpunit.xml* Tests CHANGELOG* Resources/doc +fi +if [ -d $TARGET/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle ]; then + cd $TARGET/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle && rm -rf phpunit.xml* Tests CHANGELOG* Resources/doc +else + cd $TARGET/sensio/framework-extra-bundle && rm -rf phpunit.xml* Tests CHANGELOG* Resources/doc +fi +if [ -d $TARGET/sensio/generator-bundle/Sensio/Bundle/GeneratorBundle ]; then + cd $TARGET/sensio/generator-bundle/Sensio/Bundle/GeneratorBundle && rm -rf phpunit.xml* Tests CHANGELOG* Resources/doc +else + cd $TARGET/sensio/generator-bundle && rm -rf phpunit.xml* Tests CHANGELOG* Resources/doc +fi + +# Swiftmailer +cd $TARGET/swiftmailer/swiftmailer && rm -rf CHANGES README* build* docs notes test-suite tests create_pear_package.php package* + +# Symfony +cd $TARGET/symfony/symfony && rm -rf README.md phpunit.xml* tests *.sh vendor + +if [ -d $TARGET/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle ]; then + cd $TARGET/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle && rm -rf Tests Resources/doc +elif [ -d $TARGET/symfony/assetic-bundle ]; then + cd $TARGET/symfony/assetic-bundle && rm -rf Tests Resources/doc +fi + +if [ -d $TARGET/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle ]; then + cd $TARGET/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle && rm -rf Tests Resources/doc +else + cd $TARGET/symfony/swiftmailer-bundle && rm -rf Tests Resources/doc +fi + +if [ -d $TARGET/symfony/monolog-bundle/Symfony/Bundle/MonologBundle ]; then + cd $TARGET/symfony/monolog-bundle/Symfony/Bundle/MonologBundle && rm -rf Tests Resources/doc +else + cd $TARGET/symfony/monolog-bundle && rm -rf Tests Resources/doc +fi + +# Twig +cd $TARGET/twig/twig && rm -rf AUTHORS CHANGELOG README.markdown bin doc package.xml.tpl phpunit.xml* test + +# cleanup +find $TARGET -name .git | xargs rm -rf - +find $TARGET -name .gitignore | xargs rm -rf - +find $TARGET -name .gitmodules | xargs rm -rf - +find $TARGET -name .svn | xargs rm -rf - + +# With vendors +cd /tmp +tar zcpf $DIR/Symfony_Standard_Vendors_$VERSION.tgz Symfony +rm -f $DIR/Symfony_Standard_Vendors_$VERSION.zip +zip -rq $DIR/Symfony_Standard_Vendors_$VERSION.zip Symfony + +# Without vendors +cd /tmp +rm -rf Symfony/vendor +tar zcpf $DIR/Symfony_Standard_$VERSION.tgz Symfony +rm -f $DIR/Symfony_Standard_$VERSION.zip +zip -rq $DIR/Symfony_Standard_$VERSION.zip Symfony diff --git a/vendor/sensio/distribution-bundle/Resources/bin/build_bootstrap.php b/vendor/sensio/distribution-bundle/Resources/bin/build_bootstrap.php new file mode 100755 index 0000000000000000000000000000000000000000..8adf9b4c94edd109e7899ac4924a0dc56b43656b --- /dev/null +++ b/vendor/sensio/distribution-bundle/Resources/bin/build_bootstrap.php @@ -0,0 +1,59 @@ +#!/usr/bin/env php + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler; + +if (PHP_SAPI !== 'cli') { + echo 'Warning: '.__FILE__.' should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL; +} + +function getRealpath($path, $message = 'Directory %s does not seem to be valid.') +{ + if (!$path = realpath($path)) { + exit(sprintf($message, $path)); + } + + return $path; +} + +$argv = $_SERVER['argv']; +$autoloadDir = $bootstrapDir = null; +$useNewDirectoryStructure = false; + +// allow the base path to be passed as the first argument, or default +if (!empty($argv[1])) { + $bootstrapDir = getRealpath($argv[1]); +} + +if (!empty($argv[2])) { + $autoloadDir = getRealpath($argv[2]); +} + +if (!empty($argv[3])) { + $useNewDirectoryStructure = true; +} + +$rootDir = __DIR__.'/../../../../..'; +if (null === $autoloadDir) { + $autoloadDir = getRealpath($rootDir.'/app', 'Looks like you don\'t have a standard layout.'); +} +if (null === $bootstrapDir) { + $bootstrapDir = $autoloadDir; + if ($useNewDirectoryStructure) { + $bootstrapDir = getRealpath($rootDir.'/var'); + } +} + +require_once $autoloadDir.'/autoload.php'; + +// here we pass realpaths as resolution between absolute and relative path can be wrong +ScriptHandler::doBuildBootstrap($bootstrapDir); diff --git a/vendor/sensio/distribution-bundle/Resources/bin/build_demo.sh b/vendor/sensio/distribution-bundle/Resources/bin/build_demo.sh new file mode 100755 index 0000000000000000000000000000000000000000..60cfc3192af3a4ec8e16dc44e40c1ce7e4e2e5e6 --- /dev/null +++ b/vendor/sensio/distribution-bundle/Resources/bin/build_demo.sh @@ -0,0 +1,112 @@ +#!/bin/bash + +# This file is part of the Symfony Standard Edition. +# +# (c) Fabien Potencier +# +# For the full copyright and license information, please view the LICENSE +# file that was distributed with this source code. + +if [ ! $1 ]; then + echo "\033[37;41mYou must pass the build dir as an absolute path\033[0m" + exit 1 +fi + +DIR=$1 +CURRENT=`php -r "echo realpath(dirname(\\$_SERVER['argv'][0]));"` + +if [[ ! "$DIR" = /* ]]; then + DIR="$CURRENT/$DIR" +fi + +if [ ! -d $DIR ]; then + echo "\033[37;41mThe build dir does not exist\033[0m" + exit 1 +fi + +# avoid the creation of ._* files +export COPY_EXTENDED_ATTRIBUTES_DISABLE=true +export COPYFILE_DISABLE=true + +# Prepare temp. dir +rm -rf /tmp/Symfony +mkdir /tmp/Symfony + +# Clone demo application and install its dependencies +git clone https://github.com/symfony/symfony-demo /tmp/Symfony +cd /tmp/Symfony +composer install --prefer-dist --no-interaction --ignore-platform-reqs --no-plugins --optimize-autoloader + +# cleanup +cd /tmp/Symfony +rm -f UPGRADE* +mv .gitignore keep.gitignore +rm -rf app/cache/* app/logs/* .git* +mv keep.gitignore .gitignore +chmod 777 app/cache app/logs +find . -name .DS_Store | xargs rm -rf - + +# remove unneded dependencies files +cd /tmp/Symfony +TARGET=/tmp/Symfony/vendor + +# Doctrine +cd $TARGET/doctrine/orm && rm -rf UPGRADE* build* bin tests tools lib/vendor +cd $TARGET/doctrine/dbal && rm -rf bin build* tests lib/vendor +cd $TARGET/doctrine/common && rm -rf build* tests lib/vendor +if [ -d $TARGET/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle ]; then + cd $TARGET/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle && rm -rf Tests Resources/doc +else + cd $TARGET/doctrine/doctrine-bundle && rm -rf Tests Resources/doc +fi + +# kriswallsmith +cd $TARGET/kriswallsmith/assetic && rm -rf CHANGELOG* phpunit.xml* tests docs + +# Monolog +cd $TARGET/monolog/monolog && rm -rf README.markdown phpunit.xml* tests + +# Sensio +cd $TARGET/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle && rm -rf phpunit.xml* Tests CHANGELOG* Resources/doc +cd $TARGET/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle && rm -rf phpunit.xml* Tests CHANGELOG* Resources/doc +cd $TARGET/sensio/generator-bundle/Sensio/Bundle/GeneratorBundle && rm -rf phpunit.xml* Tests CHANGELOG* Resources/doc + +# Swiftmailer +cd $TARGET/swiftmailer/swiftmailer && rm -rf CHANGES README* build* docs notes test-suite tests create_pear_package.php package* + +# Symfony +cd $TARGET/symfony/symfony && rm -rf README.md phpunit.xml* tests *.sh vendor + +if [ -d $TARGET/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle ]; then + cd $TARGET/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle && rm -rf Tests Resources/doc +else + cd $TARGET/symfony/assetic-bundle && rm -rf Tests Resources/doc +fi + +if [ -d $TARGET/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle ]; then + cd $TARGET/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle && rm -rf Tests Resources/doc +else + cd $TARGET/symfony/swiftmailer-bundle && rm -rf Tests Resources/doc +fi + +if [ -d $TARGET/symfony/monolog-bundle/Symfony/Bundle/MonologBundle ]; then + cd $TARGET/symfony/monolog-bundle/Symfony/Bundle/MonologBundle && rm -rf Tests Resources/doc +else + cd $TARGET/symfony/monolog-bundle && rm -rf Tests Resources/doc +fi + +# Twig +cd $TARGET/twig/twig && rm -rf AUTHORS CHANGELOG README.markdown bin doc package.xml.tpl phpunit.xml* test +cd $TARGET/twig/extensions && rm -rf README doc phpunit.xml* test + +# final cleanup +find $TARGET -name .git | xargs rm -rf - +find $TARGET -name .gitignore | xargs rm -rf - +find $TARGET -name .gitmodules | xargs rm -rf - +find $TARGET -name .svn | xargs rm -rf - + +# build ZIP and TGZ packages +cd /tmp +tar zcpf $DIR/Symfony_Demo.tgz Symfony +rm -f $DIR/Symfony_Demo.zip +zip -rq $DIR/Symfony_Demo.zip Symfony diff --git a/vendor/sensio/distribution-bundle/Resources/config/security.xml b/vendor/sensio/distribution-bundle/Resources/config/security.xml new file mode 100644 index 0000000000000000000000000000000000000000..933e253bd996394afa63096483c86f2efa2dc5e2 --- /dev/null +++ b/vendor/sensio/distribution-bundle/Resources/config/security.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/vendor/sensio/distribution-bundle/Resources/skeleton/app/SymfonyRequirements.php b/vendor/sensio/distribution-bundle/Resources/skeleton/app/SymfonyRequirements.php new file mode 100644 index 0000000000000000000000000000000000000000..7e7a99de92d58a6cca19a9884165d5bbb4073a37 --- /dev/null +++ b/vendor/sensio/distribution-bundle/Resources/skeleton/app/SymfonyRequirements.php @@ -0,0 +1,823 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Users of PHP 5.2 should be able to run the requirements checks. + * This is why the file and all classes must be compatible with PHP 5.2+ + * (e.g. not using namespaces and closures). + * + * ************** CAUTION ************** + * + * DO NOT EDIT THIS FILE as it will be overridden by Composer as part of + * the installation/update process. The original file resides in the + * SensioDistributionBundle. + * + * ************** CAUTION ************** + */ + +/** + * Represents a single PHP requirement, e.g. an installed extension. + * It can be a mandatory requirement or an optional recommendation. + * There is a special subclass, named PhpIniRequirement, to check a php.ini configuration. + * + * @author Tobias Schultze + */ +class Requirement +{ + private $fulfilled; + private $testMessage; + private $helpText; + private $helpHtml; + private $optional; + + /** + * Constructor that initializes the requirement. + * + * @param bool $fulfilled Whether the requirement is fulfilled + * @param string $testMessage The message for testing the requirement + * @param string $helpHtml The help text formatted in HTML for resolving the problem + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + * @param bool $optional Whether this is only an optional recommendation not a mandatory requirement + */ + public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false) + { + $this->fulfilled = (bool) $fulfilled; + $this->testMessage = (string) $testMessage; + $this->helpHtml = (string) $helpHtml; + $this->helpText = null === $helpText ? strip_tags($this->helpHtml) : (string) $helpText; + $this->optional = (bool) $optional; + } + + /** + * Returns whether the requirement is fulfilled. + * + * @return bool true if fulfilled, otherwise false + */ + public function isFulfilled() + { + return $this->fulfilled; + } + + /** + * Returns the message for testing the requirement. + * + * @return string The test message + */ + public function getTestMessage() + { + return $this->testMessage; + } + + /** + * Returns the help text for resolving the problem. + * + * @return string The help text + */ + public function getHelpText() + { + return $this->helpText; + } + + /** + * Returns the help text formatted in HTML. + * + * @return string The HTML help + */ + public function getHelpHtml() + { + return $this->helpHtml; + } + + /** + * Returns whether this is only an optional recommendation and not a mandatory requirement. + * + * @return bool true if optional, false if mandatory + */ + public function isOptional() + { + return $this->optional; + } +} + +/** + * Represents a PHP requirement in form of a php.ini configuration. + * + * @author Tobias Schultze + */ +class PhpIniRequirement extends Requirement +{ + /** + * Constructor that initializes the requirement. + * + * @param string $cfgName The configuration name used for ini_get() + * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, + * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement + * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. + * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. + * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) + * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + * @param bool $optional Whether this is only an optional recommendation not a mandatory requirement + */ + public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false) + { + $cfgValue = ini_get($cfgName); + + if (is_callable($evaluation)) { + if (null === $testMessage || null === $helpHtml) { + throw new InvalidArgumentException('You must provide the parameters testMessage and helpHtml for a callback evaluation.'); + } + + $fulfilled = call_user_func($evaluation, $cfgValue); + } else { + if (null === $testMessage) { + $testMessage = sprintf('%s %s be %s in php.ini', + $cfgName, + $optional ? 'should' : 'must', + $evaluation ? 'enabled' : 'disabled' + ); + } + + if (null === $helpHtml) { + $helpHtml = sprintf('Set %s to %s in php.ini*.', + $cfgName, + $evaluation ? 'on' : 'off' + ); + } + + $fulfilled = $evaluation == $cfgValue; + } + + parent::__construct($fulfilled || ($approveCfgAbsence && false === $cfgValue), $testMessage, $helpHtml, $helpText, $optional); + } +} + +/** + * A RequirementCollection represents a set of Requirement instances. + * + * @author Tobias Schultze + */ +class RequirementCollection implements IteratorAggregate +{ + /** + * @var Requirement[] + */ + private $requirements = array(); + + /** + * Gets the current RequirementCollection as an Iterator. + * + * @return Traversable A Traversable interface + */ + public function getIterator() + { + return new ArrayIterator($this->requirements); + } + + /** + * Adds a Requirement. + * + * @param Requirement $requirement A Requirement instance + */ + public function add(Requirement $requirement) + { + $this->requirements[] = $requirement; + } + + /** + * Adds a mandatory requirement. + * + * @param bool $fulfilled Whether the requirement is fulfilled + * @param string $testMessage The message for testing the requirement + * @param string $helpHtml The help text formatted in HTML for resolving the problem + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + */ + public function addRequirement($fulfilled, $testMessage, $helpHtml, $helpText = null) + { + $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, false)); + } + + /** + * Adds an optional recommendation. + * + * @param bool $fulfilled Whether the recommendation is fulfilled + * @param string $testMessage The message for testing the recommendation + * @param string $helpHtml The help text formatted in HTML for resolving the problem + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + */ + public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText = null) + { + $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, true)); + } + + /** + * Adds a mandatory requirement in form of a php.ini configuration. + * + * @param string $cfgName The configuration name used for ini_get() + * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, + * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement + * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. + * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. + * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) + * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + */ + public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) + { + $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, false)); + } + + /** + * Adds an optional recommendation in form of a php.ini configuration. + * + * @param string $cfgName The configuration name used for ini_get() + * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, + * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement + * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. + * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. + * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) + * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + */ + public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) + { + $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, true)); + } + + /** + * Adds a requirement collection to the current set of requirements. + * + * @param RequirementCollection $collection A RequirementCollection instance + */ + public function addCollection(RequirementCollection $collection) + { + $this->requirements = array_merge($this->requirements, $collection->all()); + } + + /** + * Returns both requirements and recommendations. + * + * @return Requirement[] + */ + public function all() + { + return $this->requirements; + } + + /** + * Returns all mandatory requirements. + * + * @return Requirement[] + */ + public function getRequirements() + { + $array = array(); + foreach ($this->requirements as $req) { + if (!$req->isOptional()) { + $array[] = $req; + } + } + + return $array; + } + + /** + * Returns the mandatory requirements that were not met. + * + * @return Requirement[] + */ + public function getFailedRequirements() + { + $array = array(); + foreach ($this->requirements as $req) { + if (!$req->isFulfilled() && !$req->isOptional()) { + $array[] = $req; + } + } + + return $array; + } + + /** + * Returns all optional recommendations. + * + * @return Requirement[] + */ + public function getRecommendations() + { + $array = array(); + foreach ($this->requirements as $req) { + if ($req->isOptional()) { + $array[] = $req; + } + } + + return $array; + } + + /** + * Returns the recommendations that were not met. + * + * @return Requirement[] + */ + public function getFailedRecommendations() + { + $array = array(); + foreach ($this->requirements as $req) { + if (!$req->isFulfilled() && $req->isOptional()) { + $array[] = $req; + } + } + + return $array; + } + + /** + * Returns whether a php.ini configuration is not correct. + * + * @return bool php.ini configuration problem? + */ + public function hasPhpIniConfigIssue() + { + foreach ($this->requirements as $req) { + if (!$req->isFulfilled() && $req instanceof PhpIniRequirement) { + return true; + } + } + + return false; + } + + /** + * Returns the PHP configuration file (php.ini) path. + * + * @return string|false php.ini file path + */ + public function getPhpIniConfigPath() + { + return get_cfg_var('cfg_file_path'); + } +} + +/** + * This class specifies all requirements and optional recommendations that + * are necessary to run the Symfony Standard Edition. + * + * @author Tobias Schultze + * @author Fabien Potencier + */ +class SymfonyRequirements extends RequirementCollection +{ + const LEGACY_REQUIRED_PHP_VERSION = '5.3.3'; + const REQUIRED_PHP_VERSION = '5.5.9'; + + /** + * Constructor that initializes the requirements. + */ + public function __construct() + { + /* mandatory requirements follow */ + + $installedPhpVersion = phpversion(); + $requiredPhpVersion = $this->getPhpRequiredVersion(); + + $this->addRecommendation( + $requiredPhpVersion, + 'Vendors should be installed in order to check all requirements.', + 'Run the composer install command.', + 'Run the "composer install" command.' + ); + + if (false !== $requiredPhpVersion) { + $this->addRequirement( + version_compare($installedPhpVersion, $requiredPhpVersion, '>='), + sprintf('PHP version must be at least %s (%s installed)', $requiredPhpVersion, $installedPhpVersion), + sprintf('You are running PHP version "%s", but Symfony needs at least PHP "%s" to run. + Before using Symfony, upgrade your PHP installation, preferably to the latest version.', + $installedPhpVersion, $requiredPhpVersion), + sprintf('Install PHP %s or newer (installed version is %s)', $requiredPhpVersion, $installedPhpVersion) + ); + } + + $this->addRequirement( + version_compare($installedPhpVersion, '5.3.16', '!='), + 'PHP version must not be 5.3.16 as Symfony won\'t work properly with it', + 'Install PHP 5.3.17 or newer (or downgrade to an earlier PHP version)' + ); + + $this->addRequirement( + is_dir(__DIR__.'/../vendor/composer'), + 'Vendor libraries must be installed', + 'Vendor libraries are missing. Install composer following instructions from http://getcomposer.org/. '. + 'Then run "php composer.phar install" to install them.' + ); + + $cacheDir = is_dir(__DIR__.'/../var/cache') ? __DIR__.'/../var/cache' : __DIR__.'/cache'; + + $this->addRequirement( + is_writable($cacheDir), + 'app/cache/ or var/cache/ directory must be writable', + 'Change the permissions of either "app/cache/" or "var/cache/" directory so that the web server can write into it.' + ); + + $logsDir = is_dir(__DIR__.'/../var/logs') ? __DIR__.'/../var/logs' : __DIR__.'/logs'; + + $this->addRequirement( + is_writable($logsDir), + 'app/logs/ or var/logs/ directory must be writable', + 'Change the permissions of either "app/logs/" or "var/logs/" directory so that the web server can write into it.' + ); + + if (version_compare($installedPhpVersion, '7.0.0', '<')) { + $this->addPhpIniRequirement( + 'date.timezone', true, false, + 'date.timezone setting must be set', + 'Set the "date.timezone" setting in php.ini* (like Europe/Paris).' + ); + } + + if (false !== $requiredPhpVersion && version_compare($installedPhpVersion, $requiredPhpVersion, '>=')) { + $timezones = array(); + foreach (DateTimeZone::listAbbreviations() as $abbreviations) { + foreach ($abbreviations as $abbreviation) { + $timezones[$abbreviation['timezone_id']] = true; + } + } + + $this->addRequirement( + isset($timezones[@date_default_timezone_get()]), + sprintf('Configured default timezone "%s" must be supported by your installation of PHP', @date_default_timezone_get()), + 'Your default timezone is not supported by PHP. Check for typos in your php.ini file and have a look at the list of deprecated timezones at http://php.net/manual/en/timezones.others.php.' + ); + } + + $this->addRequirement( + function_exists('iconv'), + 'iconv() must be available', + 'Install and enable the iconv extension.' + ); + + $this->addRequirement( + function_exists('json_encode'), + 'json_encode() must be available', + 'Install and enable the JSON extension.' + ); + + $this->addRequirement( + function_exists('session_start'), + 'session_start() must be available', + 'Install and enable the session extension.' + ); + + $this->addRequirement( + function_exists('ctype_alpha'), + 'ctype_alpha() must be available', + 'Install and enable the ctype extension.' + ); + + $this->addRequirement( + function_exists('token_get_all'), + 'token_get_all() must be available', + 'Install and enable the Tokenizer extension.' + ); + + $this->addRequirement( + function_exists('simplexml_import_dom'), + 'simplexml_import_dom() must be available', + 'Install and enable the SimpleXML extension.' + ); + + if (function_exists('apc_store') && ini_get('apc.enabled')) { + if (version_compare($installedPhpVersion, '5.4.0', '>=')) { + $this->addRequirement( + version_compare(phpversion('apc'), '3.1.13', '>='), + 'APC version must be at least 3.1.13 when using PHP 5.4', + 'Upgrade your APC extension (3.1.13+).' + ); + } else { + $this->addRequirement( + version_compare(phpversion('apc'), '3.0.17', '>='), + 'APC version must be at least 3.0.17', + 'Upgrade your APC extension (3.0.17+).' + ); + } + } + + $this->addPhpIniRequirement('detect_unicode', false); + + if (extension_loaded('suhosin')) { + $this->addPhpIniRequirement( + 'suhosin.executor.include.whitelist', + create_function('$cfgValue', 'return false !== stripos($cfgValue, "phar");'), + false, + 'suhosin.executor.include.whitelist must be configured correctly in php.ini', + 'Add "phar" to suhosin.executor.include.whitelist in php.ini*.' + ); + } + + if (extension_loaded('xdebug')) { + $this->addPhpIniRequirement( + 'xdebug.show_exception_trace', false, true + ); + + $this->addPhpIniRequirement( + 'xdebug.scream', false, true + ); + + $this->addPhpIniRecommendation( + 'xdebug.max_nesting_level', + create_function('$cfgValue', 'return $cfgValue > 100;'), + true, + 'xdebug.max_nesting_level should be above 100 in php.ini', + 'Set "xdebug.max_nesting_level" to e.g. "250" in php.ini* to stop Xdebug\'s infinite recursion protection erroneously throwing a fatal error in your project.' + ); + } + + $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null; + + $this->addRequirement( + null !== $pcreVersion, + 'PCRE extension must be available', + 'Install the PCRE extension (version 8.0+).' + ); + + if (extension_loaded('mbstring')) { + $this->addPhpIniRequirement( + 'mbstring.func_overload', + create_function('$cfgValue', 'return (int) $cfgValue === 0;'), + true, + 'string functions should not be overloaded', + 'Set "mbstring.func_overload" to 0 in php.ini* to disable function overloading by the mbstring extension.' + ); + } + + /* optional recommendations follow */ + + if (file_exists(__DIR__.'/../vendor/composer')) { + require_once __DIR__.'/../vendor/autoload.php'; + + try { + $r = new ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle'); + + $contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php'); + } catch (ReflectionException $e) { + $contents = ''; + } + $this->addRecommendation( + file_get_contents(__FILE__) === $contents, + 'Requirements file should be up-to-date', + 'Your requirements file is outdated. Run composer install and re-check your configuration.' + ); + } + + $this->addRecommendation( + version_compare($installedPhpVersion, '5.3.4', '>='), + 'You should use at least PHP 5.3.4 due to PHP bug #52083 in earlier versions', + 'Your project might malfunction randomly due to PHP bug #52083 ("Notice: Trying to get property of non-object"). Install PHP 5.3.4 or newer.' + ); + + $this->addRecommendation( + version_compare($installedPhpVersion, '5.3.8', '>='), + 'When using annotations you should have at least PHP 5.3.8 due to PHP bug #55156', + 'Install PHP 5.3.8 or newer if your project uses annotations.' + ); + + $this->addRecommendation( + version_compare($installedPhpVersion, '5.4.0', '!='), + 'You should not use PHP 5.4.0 due to the PHP bug #61453', + 'Your project might not work properly due to the PHP bug #61453 ("Cannot dump definitions which have method calls"). Install PHP 5.4.1 or newer.' + ); + + $this->addRecommendation( + version_compare($installedPhpVersion, '5.4.11', '>='), + 'When using the logout handler from the Symfony Security Component, you should have at least PHP 5.4.11 due to PHP bug #63379 (as a workaround, you can also set invalidate_session to false in the security logout handler configuration)', + 'Install PHP 5.4.11 or newer if your project uses the logout handler from the Symfony Security Component.' + ); + + $this->addRecommendation( + (version_compare($installedPhpVersion, '5.3.18', '>=') && version_compare($installedPhpVersion, '5.4.0', '<')) + || + version_compare($installedPhpVersion, '5.4.8', '>='), + 'You should use PHP 5.3.18+ or PHP 5.4.8+ to always get nice error messages for fatal errors in the development environment due to PHP bug #61767/#60909', + 'Install PHP 5.3.18+ or PHP 5.4.8+ if you want nice error messages for all fatal errors in the development environment.' + ); + + if (null !== $pcreVersion) { + $this->addRecommendation( + $pcreVersion >= 8.0, + sprintf('PCRE extension should be at least version 8.0 (%s installed)', $pcreVersion), + 'PCRE 8.0+ is preconfigured in PHP since 5.3.2 but you are using an outdated version of it. Symfony probably works anyway but it is recommended to upgrade your PCRE extension.' + ); + } + + $this->addRecommendation( + class_exists('DomDocument'), + 'PHP-DOM and PHP-XML modules should be installed', + 'Install and enable the PHP-DOM and the PHP-XML modules.' + ); + + $this->addRecommendation( + function_exists('mb_strlen'), + 'mb_strlen() should be available', + 'Install and enable the mbstring extension.' + ); + + $this->addRecommendation( + function_exists('iconv'), + 'iconv() should be available', + 'Install and enable the iconv extension.' + ); + + $this->addRecommendation( + function_exists('utf8_decode'), + 'utf8_decode() should be available', + 'Install and enable the XML extension.' + ); + + $this->addRecommendation( + function_exists('filter_var'), + 'filter_var() should be available', + 'Install and enable the filter extension.' + ); + + if (!defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->addRecommendation( + function_exists('posix_isatty'), + 'posix_isatty() should be available', + 'Install and enable the php_posix extension (used to colorize the CLI output).' + ); + } + + $this->addRecommendation( + extension_loaded('intl'), + 'intl extension should be available', + 'Install and enable the intl extension (used for validators).' + ); + + if (extension_loaded('intl')) { + // in some WAMP server installations, new Collator() returns null + $this->addRecommendation( + null !== new Collator('fr_FR'), + 'intl extension should be correctly configured', + 'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds.' + ); + + // check for compatible ICU versions (only done when you have the intl extension) + if (defined('INTL_ICU_VERSION')) { + $version = INTL_ICU_VERSION; + } else { + $reflector = new ReflectionExtension('intl'); + + ob_start(); + $reflector->info(); + $output = strip_tags(ob_get_clean()); + + preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches); + $version = $matches[1]; + } + + $this->addRecommendation( + version_compare($version, '4.0', '>='), + 'intl ICU version should be at least 4+', + 'Upgrade your intl extension with a newer ICU version (4+).' + ); + + if (class_exists('Symfony\Component\Intl\Intl')) { + $this->addRecommendation( + \Symfony\Component\Intl\Intl::getIcuDataVersion() <= \Symfony\Component\Intl\Intl::getIcuVersion(), + sprintf('intl ICU version installed on your system is outdated (%s) and does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()), + 'To get the latest internationalization data upgrade the ICU system package and the intl PHP extension.' + ); + if (\Symfony\Component\Intl\Intl::getIcuDataVersion() <= \Symfony\Component\Intl\Intl::getIcuVersion()) { + $this->addRecommendation( + \Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(), + sprintf('intl ICU version installed on your system (%s) does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()), + 'To avoid internationalization data inconsistencies upgrade the symfony/intl component.' + ); + } + } + + $this->addPhpIniRecommendation( + 'intl.error_level', + create_function('$cfgValue', 'return (int) $cfgValue === 0;'), + true, + 'intl.error_level should be 0 in php.ini', + 'Set "intl.error_level" to "0" in php.ini* to inhibit the messages when an error occurs in ICU functions.' + ); + } + + $accelerator = + (extension_loaded('eaccelerator') && ini_get('eaccelerator.enable')) + || + (extension_loaded('apc') && ini_get('apc.enabled')) + || + (extension_loaded('Zend Optimizer+') && ini_get('zend_optimizerplus.enable')) + || + (extension_loaded('Zend OPcache') && ini_get('opcache.enable')) + || + (extension_loaded('xcache') && ini_get('xcache.cacher')) + || + (extension_loaded('wincache') && ini_get('wincache.ocenabled')) + ; + + $this->addRecommendation( + $accelerator, + 'a PHP accelerator should be installed', + 'Install and/or enable a PHP accelerator (highly recommended).' + ); + + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $this->addRecommendation( + $this->getRealpathCacheSize() >= 5 * 1024 * 1024, + 'realpath_cache_size should be at least 5M in php.ini', + 'Setting "realpath_cache_size" to e.g. "5242880" or "5M" in php.ini* may improve performance on Windows significantly in some cases.' + ); + } + + $this->addPhpIniRecommendation('short_open_tag', false); + + $this->addPhpIniRecommendation('magic_quotes_gpc', false, true); + + $this->addPhpIniRecommendation('register_globals', false, true); + + $this->addPhpIniRecommendation('session.auto_start', false); + + $this->addRecommendation( + class_exists('PDO'), + 'PDO should be installed', + 'Install PDO (mandatory for Doctrine).' + ); + + if (class_exists('PDO')) { + $drivers = PDO::getAvailableDrivers(); + $this->addRecommendation( + count($drivers) > 0, + sprintf('PDO should have some drivers installed (currently available: %s)', count($drivers) ? implode(', ', $drivers) : 'none'), + 'Install PDO drivers (mandatory for Doctrine).' + ); + } + } + + /** + * Loads realpath_cache_size from php.ini and converts it to int. + * + * (e.g. 16k is converted to 16384 int) + * + * @return int + */ + protected function getRealpathCacheSize() + { + $size = ini_get('realpath_cache_size'); + $size = trim($size); + $unit = ''; + if (!ctype_digit($size)) { + $unit = strtolower(substr($size, -1, 1)); + $size = (int) substr($size, 0, -1); + } + switch ($unit) { + case 'g': + return $size * 1024 * 1024 * 1024; + case 'm': + return $size * 1024 * 1024; + case 'k': + return $size * 1024; + default: + return (int) $size; + } + } + + /** + * Defines PHP required version from Symfony version. + * + * @return string|false The PHP required version or false if it could not be guessed + */ + protected function getPhpRequiredVersion() + { + if (!file_exists($path = __DIR__.'/../composer.lock')) { + return false; + } + + $composerLock = json_decode(file_get_contents($path), true); + foreach ($composerLock['packages'] as $package) { + $name = $package['name']; + if ('symfony/symfony' !== $name && 'symfony/http-kernel' !== $name) { + continue; + } + + return (int) $package['version'][1] > 2 ? self::REQUIRED_PHP_VERSION : self::LEGACY_REQUIRED_PHP_VERSION; + } + + return false; + } +} diff --git a/vendor/sensio/distribution-bundle/Resources/skeleton/app/check.php b/vendor/sensio/distribution-bundle/Resources/skeleton/app/check.php new file mode 100644 index 0000000000000000000000000000000000000000..2cf2dcec2b6f12272366efb5808061051cdd26d7 --- /dev/null +++ b/vendor/sensio/distribution-bundle/Resources/skeleton/app/check.php @@ -0,0 +1,145 @@ +getPhpIniConfigPath(); + +echo_title('Symfony Requirements Checker'); + +echo '> PHP is using the following php.ini file:'.PHP_EOL; +if ($iniPath) { + echo_style('green', ' '.$iniPath); +} else { + echo_style('yellow', ' WARNING: No configuration file (php.ini) used by PHP!'); +} + +echo PHP_EOL.PHP_EOL; + +echo '> Checking Symfony requirements:'.PHP_EOL.' '; + +$messages = array(); +foreach ($symfonyRequirements->getRequirements() as $req) { + if ($helpText = get_error_message($req, $lineSize)) { + echo_style('red', 'E'); + $messages['error'][] = $helpText; + } else { + echo_style('green', '.'); + } +} + +$checkPassed = empty($messages['error']); + +foreach ($symfonyRequirements->getRecommendations() as $req) { + if ($helpText = get_error_message($req, $lineSize)) { + echo_style('yellow', 'W'); + $messages['warning'][] = $helpText; + } else { + echo_style('green', '.'); + } +} + +if ($checkPassed) { + echo_block('success', 'OK', 'Your system is ready to run Symfony projects'); +} else { + echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects'); + + echo_title('Fix the following mandatory requirements', 'red'); + + foreach ($messages['error'] as $helpText) { + echo ' * '.$helpText.PHP_EOL; + } +} + +if (!empty($messages['warning'])) { + echo_title('Optional recommendations to improve your setup', 'yellow'); + + foreach ($messages['warning'] as $helpText) { + echo ' * '.$helpText.PHP_EOL; + } +} + +echo PHP_EOL; +echo_style('title', 'Note'); +echo ' The command console could use a different php.ini file'.PHP_EOL; +echo_style('title', '~~~~'); +echo ' than the one used with your web server. To be on the'.PHP_EOL; +echo ' safe side, please check the requirements from your web'.PHP_EOL; +echo ' server using the '; +echo_style('yellow', 'web/config.php'); +echo ' script.'.PHP_EOL; +echo PHP_EOL; + +exit($checkPassed ? 0 : 1); + +function get_error_message(Requirement $requirement, $lineSize) +{ + if ($requirement->isFulfilled()) { + return; + } + + $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL; + $errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL; + + return $errorMessage; +} + +function echo_title($title, $style = null) +{ + $style = $style ?: 'title'; + + echo PHP_EOL; + echo_style($style, $title.PHP_EOL); + echo_style($style, str_repeat('~', strlen($title)).PHP_EOL); + echo PHP_EOL; +} + +function echo_style($style, $message) +{ + // ANSI color codes + $styles = array( + 'reset' => "\033[0m", + 'red' => "\033[31m", + 'green' => "\033[32m", + 'yellow' => "\033[33m", + 'error' => "\033[37;41m", + 'success' => "\033[37;42m", + 'title' => "\033[34m", + ); + $supports = has_color_support(); + + echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : ''); +} + +function echo_block($style, $title, $message) +{ + $message = ' '.trim($message).' '; + $width = strlen($message); + + echo PHP_EOL.PHP_EOL; + + echo_style($style, str_repeat(' ', $width)); + echo PHP_EOL; + echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT)); + echo PHP_EOL; + echo_style($style, $message); + echo PHP_EOL; + echo_style($style, str_repeat(' ', $width)); + echo PHP_EOL; +} + +function has_color_support() +{ + static $support; + + if (null === $support) { + if (DIRECTORY_SEPARATOR == '\\') { + $support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); + } else { + $support = function_exists('posix_isatty') && @posix_isatty(STDOUT); + } + } + + return $support; +} diff --git a/vendor/sensio/distribution-bundle/Resources/skeleton/web/config.php b/vendor/sensio/distribution-bundle/Resources/skeleton/web/config.php new file mode 100644 index 0000000000000000000000000000000000000000..b5e0ef9110fb3e1e09bf89296d29563a23ebdf69 --- /dev/null +++ b/vendor/sensio/distribution-bundle/Resources/skeleton/web/config.php @@ -0,0 +1,422 @@ +getFailedRequirements(); +$minorProblems = $symfonyRequirements->getFailedRecommendations(); +$hasMajorProblems = (bool) count($majorProblems); +$hasMinorProblems = (bool) count($minorProblems); + +?> + + + + + + Symfony Configuration Checker + + + +
    +
    + + + +
    + +
    +
    +
    +

    Configuration Checker

    +

    + This script analyzes your system to check whether is + ready to run Symfony applications. +

    + + +

    Major problems

    +

    Major problems have been detected and must be fixed before continuing:

    +
      + +
    1. getTestMessage() ?> +

      getHelpHtml() ?>

      +
    2. + +
    + + + +

    Recommendations

    +

    + Additionally, toTo enhance your Symfony experience, + it’s recommended that you fix the following: +

    +
      + +
    1. getTestMessage() ?> +

      getHelpHtml() ?>

      +
    2. + +
    + + + hasPhpIniConfigIssue()): ?> +

    * + getPhpIniConfigPath()): ?> + Changes to the php.ini file must be done in "getPhpIniConfigPath() ?>". + + To change settings, create a "php.ini". + +

    + + + +

    All checks passed successfully. Your system is ready to run Symfony applications.

    + + + +
    +
    +
    +
    Symfony Standard Edition
    +
    + + diff --git a/vendor/sensio/distribution-bundle/SensioDistributionBundle.php b/vendor/sensio/distribution-bundle/SensioDistributionBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..92abd88830ca822897ea4ccf5a71fdffb201e715 --- /dev/null +++ b/vendor/sensio/distribution-bundle/SensioDistributionBundle.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\DistributionBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +/** + * SensioDistributionBundle. + * + * @author Fabien Potencier + * @author Marc Weistroff + * @author Jérôme Vieilledent + */ +class SensioDistributionBundle extends Bundle +{ +} diff --git a/vendor/sensio/distribution-bundle/UPGRADE.md b/vendor/sensio/distribution-bundle/UPGRADE.md new file mode 100644 index 0000000000000000000000000000000000000000..f8756c3ab6b186126a74c201f68570557874ae31 --- /dev/null +++ b/vendor/sensio/distribution-bundle/UPGRADE.md @@ -0,0 +1,14 @@ +UPGRADE FROM 4.0 to 5.0 +======================= + + * The web configurator got removed. So you need to remove the `_configurator` + routing entry from `app/config/routing_dev.yml`. + + * The generated `app/bootstrap.php.cache` does not include autoloading anymore. + So you need to add the autoloading code in your front controllers `web/app.php`, + `web/app_dev.php`, `app/console` and `app/phpunit.xml.dist` (bootstrap config). + + * If you have been using the Symfony 3 directory structure already, you need to + overwrite the cache and log directories in your `AppKernel` as it is also done + in Symfony 3 now (see + [`app/AppKernel.php`](https://github.com/symfony/symfony-standard/blob/master/app/AppKernel.php#L31-L44)). diff --git a/vendor/sensio/distribution-bundle/composer.json b/vendor/sensio/distribution-bundle/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..edb26a3c6d2daab852edfc11f07351f83d777493 --- /dev/null +++ b/vendor/sensio/distribution-bundle/composer.json @@ -0,0 +1,32 @@ +{ + "name": "sensio/distribution-bundle", + "description": "Base bundle for Symfony Distributions", + "keywords": ["distribution","configuration"], + "type": "symfony-bundle", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "require": { + "php": ">=5.3.9", + "symfony/dependency-injection": "~2.3|~3.0", + "symfony/config": "~2.3|~3.0", + "symfony/filesystem": "~2.3|~3.0", + "symfony/http-kernel": "~2.3|~3.0", + "symfony/class-loader": "~2.3|~3.0", + "symfony/process": "~2.3|~3.0", + "sensiolabs/security-checker": "~3.0|~4.0" + }, + "autoload": { + "psr-4": { "Sensio\\Bundle\\DistributionBundle\\": "" } + }, + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "minimum-stability": "dev" +} diff --git a/vendor/sensio/framework-extra-bundle/.travis.yml b/vendor/sensio/framework-extra-bundle/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..770e49f19f6cafd0c73cea763496be54678e674f --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/.travis.yml @@ -0,0 +1,45 @@ +language: php + +sudo: false + +cache: + directories: + - $HOME/.composer/cache/files + - .phpunit + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - 7.1 + +matrix: + include: + - php: 7.0 + env: deps=low + # Use the newer stack for HHVM as HHVM does not support Precise anymore since a long time and so Precise has an outdated version + - php: hhvm-3.12 + sudo: required + dist: trusty + group: edge + fast_finish: true + +env: + global: + - deps=no + +before_install: + - export SYMFONY_PHPUNIT_DIR="$(pwd)/.phpunit" + - if [[ ! $TRAVIS_PHP_VERSION = hhvm* ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi + - echo memory_limit = -1 >> $INI_FILE + - if [[ ! $TRAVIS_PHP_VERSION = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi + +install: + - if [[ "$TRAVIS_PHP_VERSION" == "5.3" ]]; then composer remove --dev --no-update symfony/psr-http-message-bridge zendframework/zend-diactoros; fi; + - if [ "$deps" = "no" ]; then composer install; fi; + - if [ "$deps" = "low" ]; then composer --prefer-lowest --prefer-stable update; fi; + +script: + - ./vendor/bin/simple-phpunit diff --git a/vendor/sensio/framework-extra-bundle/Configuration/Cache.php b/vendor/sensio/framework-extra-bundle/Configuration/Cache.php new file mode 100644 index 0000000000000000000000000000000000000000..db1100cb5c8700f8a3bfe4e5a8731b63c0391a99 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Configuration/Cache.php @@ -0,0 +1,248 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Configuration; + +/** + * The Cache class handles the Cache annotation parts. + * + * @author Fabien Potencier + * @Annotation + */ +class Cache extends ConfigurationAnnotation +{ + /** + * The expiration date as a valid date for the strtotime() function. + * + * @var string + */ + protected $expires; + + /** + * The number of seconds that the response is considered fresh by a private + * cache like a web browser. + * + * @var int + */ + protected $maxage; + + /** + * The number of seconds that the response is considered fresh by a public + * cache like a reverse proxy cache. + * + * @var int + */ + protected $smaxage; + + /** + * Whether the response is public or not. + * + * @var bool + */ + protected $public; + + /** + * Additional "Vary:"-headers. + * + * @var array + */ + protected $vary; + + /** + * An expression to compute the Last-Modified HTTP header. + * + * @var string + */ + protected $lastModified; + + /** + * An expression to compute the ETag HTTP header. + * + * @var string + */ + protected $etag; + + /** + * Returns the expiration date for the Expires header field. + * + * @return string + */ + public function getExpires() + { + return $this->expires; + } + + /** + * Sets the expiration date for the Expires header field. + * + * @param string $expires A valid php date + */ + public function setExpires($expires) + { + $this->expires = $expires; + } + + /** + * Sets the number of seconds for the max-age cache-control header field. + * + * @param int $maxage A number of seconds + */ + public function setMaxAge($maxage) + { + $this->maxage = $maxage; + } + + /** + * Returns the number of seconds the response is considered fresh by a + * private cache. + * + * @return int + */ + public function getMaxAge() + { + return $this->maxage; + } + + /** + * Sets the number of seconds for the s-maxage cache-control header field. + * + * @param int $smaxage A number of seconds + */ + public function setSMaxAge($smaxage) + { + $this->smaxage = $smaxage; + } + + /** + * Returns the number of seconds the response is considered fresh by a + * public cache. + * + * @return int + */ + public function getSMaxAge() + { + return $this->smaxage; + } + + /** + * Returns whether or not a response is public. + * + * @return bool + */ + public function isPublic() + { + return $this->public === true; + } + + /** + * Returns whether or not a response is private. + * + * @return bool + */ + public function isPrivate() + { + return $this->public === false; + } + + /** + * Sets a response public. + * + * @param bool $public A boolean value + */ + public function setPublic($public) + { + $this->public = (bool) $public; + } + + /** + * Returns the custom "Vary"-headers. + * + * @return array + */ + public function getVary() + { + return $this->vary; + } + + /** + * Add additional "Vary:"-headers. + * + * @param array $vary + */ + public function setVary($vary) + { + $this->vary = $vary; + } + + /** + * Sets the "Last-Modified"-header expression. + * + * @param string $expression + */ + public function setLastModified($expression) + { + $this->lastModified = $expression; + } + + /** + * Returns the "Last-Modified"-header expression. + * + * @return string + */ + public function getLastModified() + { + return $this->lastModified; + } + + /** + * Sets the "ETag"-header expression. + * + * @param string $expression + */ + public function setETag($expression) + { + $this->etag = $expression; + } + + /** + * Returns the "ETag"-header expression. + * + * @return string + */ + public function getETag() + { + return $this->etag; + } + + /** + * Returns the annotation alias name. + * + * @return string + * + * @see ConfigurationInterface + */ + public function getAliasName() + { + return 'cache'; + } + + /** + * Only one cache directive is allowed. + * + * @return bool + * + * @see ConfigurationInterface + */ + public function allowArray() + { + return false; + } +} diff --git a/vendor/sensio/framework-extra-bundle/Configuration/ConfigurationAnnotation.php b/vendor/sensio/framework-extra-bundle/Configuration/ConfigurationAnnotation.php new file mode 100644 index 0000000000000000000000000000000000000000..9c7eb275d6a2714b72ead0f0d2cdaae6f67f1519 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Configuration/ConfigurationAnnotation.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Configuration; + +/** + * Base configuration annotation. + * + * @author Johannes M. Schmitt + */ +abstract class ConfigurationAnnotation implements ConfigurationInterface +{ + public function __construct(array $values) + { + foreach ($values as $k => $v) { + if (!method_exists($this, $name = 'set'.$k)) { + throw new \RuntimeException(sprintf('Unknown key "%s" for annotation "@%s".', $k, get_class($this))); + } + + $this->$name($v); + } + } +} diff --git a/vendor/sensio/framework-extra-bundle/Configuration/ConfigurationInterface.php b/vendor/sensio/framework-extra-bundle/Configuration/ConfigurationInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..98dbbb87281aa617f5cfc8d57f3f7990b5d9be78 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Configuration/ConfigurationInterface.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Configuration; + +/** + * ConfigurationInterface. + * + * @author Fabien Potencier + */ +interface ConfigurationInterface +{ + /** + * Returns the alias name for an annotated configuration. + * + * @return string + */ + public function getAliasName(); + + /** + * Returns whether multiple annotations of this type are allowed. + * + * @return bool + */ + public function allowArray(); +} diff --git a/vendor/sensio/framework-extra-bundle/Configuration/Method.php b/vendor/sensio/framework-extra-bundle/Configuration/Method.php new file mode 100644 index 0000000000000000000000000000000000000000..1232a5be1dea3a2ae89da0b6d5cc23a5be8e8dca --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Configuration/Method.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Configuration; + +/** + * The Method class handles the Method annotation parts. + * + * @author Fabien Potencier + * @Annotation + */ +class Method extends ConfigurationAnnotation +{ + /** + * An array of restricted HTTP methods. + * + * @var array + */ + protected $methods = array(); + + /** + * Returns the array of HTTP methods. + * + * @return array + */ + public function getMethods() + { + return $this->methods; + } + + /** + * Sets the HTTP methods. + * + * @param array|string $methods An HTTP method or an array of HTTP methods + */ + public function setMethods($methods) + { + $this->methods = is_array($methods) ? $methods : array($methods); + } + + /** + * Sets the HTTP methods. + * + * @param array|string $methods An HTTP method or an array of HTTP methods + */ + public function setValue($methods) + { + $this->setMethods($methods); + } + + /** + * Returns the annotation alias name. + * + * @return string + * + * @see ConfigurationInterface + */ + public function getAliasName() + { + return 'method'; + } + + /** + * Only one method directive is allowed. + * + * @return bool + * + * @see ConfigurationInterface + */ + public function allowArray() + { + return false; + } +} diff --git a/vendor/sensio/framework-extra-bundle/Configuration/ParamConverter.php b/vendor/sensio/framework-extra-bundle/Configuration/ParamConverter.php new file mode 100644 index 0000000000000000000000000000000000000000..d4713c016e42e5c8f89b688e87b9a9b928bba4be --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Configuration/ParamConverter.php @@ -0,0 +1,190 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Configuration; + +/** + * The ParamConverter class handles the ParamConverter annotation parts. + * + * @author Fabien Potencier + * @Annotation + */ +class ParamConverter extends ConfigurationAnnotation +{ + /** + * The parameter name. + * + * @var string + */ + protected $name; + + /** + * The parameter class. + * + * @var string + */ + protected $class; + + /** + * An array of options. + * + * @var array + */ + protected $options = array(); + + /** + * Whether or not the parameter is optional. + * + * @var bool + */ + protected $optional = false; + + /** + * Use explicitly named converter instead of iterating by priorities. + * + * @var string + */ + protected $converter; + + /** + * Returns the parameter name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Sets the parameter name. + * + * @param string $name The parameter name + */ + public function setValue($name) + { + $this->setName($name); + } + + /** + * Sets the parameter name. + * + * @param string $name The parameter name + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * Returns the parameter class name. + * + * @return string $name + */ + public function getClass() + { + return $this->class; + } + + /** + * Sets the parameter class name. + * + * @param string $class The parameter class name + */ + public function setClass($class) + { + $this->class = $class; + } + + /** + * Returns an array of options. + * + * @return array + */ + public function getOptions() + { + return $this->options; + } + + /** + * Sets an array of options. + * + * @param array $options An array of options + */ + public function setOptions($options) + { + $this->options = $options; + } + + /** + * Sets whether or not the parameter is optional. + * + * @param bool $optional Whether the parameter is optional + */ + public function setIsOptional($optional) + { + $this->optional = (bool) $optional; + } + + /** + * Returns whether or not the parameter is optional. + * + * @return bool + */ + public function isOptional() + { + return $this->optional; + } + + /** + * Get explicit converter name. + * + * @return string + */ + public function getConverter() + { + return $this->converter; + } + + /** + * Set explicit converter name. + * + * @param string $converter + */ + public function setConverter($converter) + { + $this->converter = $converter; + } + + /** + * Returns the annotation alias name. + * + * @return string + * + * @see ConfigurationInterface + */ + public function getAliasName() + { + return 'converters'; + } + + /** + * Multiple ParamConverters are allowed. + * + * @return bool + * + * @see ConfigurationInterface + */ + public function allowArray() + { + return true; + } +} diff --git a/vendor/sensio/framework-extra-bundle/Configuration/Route.php b/vendor/sensio/framework-extra-bundle/Configuration/Route.php new file mode 100644 index 0000000000000000000000000000000000000000..1f8e1238434c8d9739921db3145369fb3081c026 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Configuration/Route.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Configuration; + +use Symfony\Component\Routing\Annotation\Route as BaseRoute; + +/** + * @author Kris Wallsmith + * @Annotation + */ +class Route extends BaseRoute +{ + protected $service; + + public function setService($service) + { + // avoid a BC notice in case of @Route(service="") with sf ^2.7 + if (null === $this->getPath()) { + $this->setPath(''); + } + $this->service = $service; + } + + public function getService() + { + return $this->service; + } + + /** + * Multiple route annotations are allowed. + * + * @return bool + * + * @see ConfigurationInterface + */ + public function allowArray() + { + return true; + } +} diff --git a/vendor/sensio/framework-extra-bundle/Configuration/Security.php b/vendor/sensio/framework-extra-bundle/Configuration/Security.php new file mode 100644 index 0000000000000000000000000000000000000000..692c28ed3f1fb94c758fa1a4e7554a0fefa6f907 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Configuration/Security.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Configuration; + +/** + * The Security class handles the Security annotation. + * + * @author Fabien Potencier + * @Annotation + */ +class Security extends ConfigurationAnnotation +{ + protected $expression; + + public function getExpression() + { + return $this->expression; + } + + public function setExpression($expression) + { + $this->expression = $expression; + } + + public function setValue($expression) + { + $this->setExpression($expression); + } + + public function getAliasName() + { + return 'security'; + } + + public function allowArray() + { + return false; + } +} diff --git a/vendor/sensio/framework-extra-bundle/Configuration/Template.php b/vendor/sensio/framework-extra-bundle/Configuration/Template.php new file mode 100644 index 0000000000000000000000000000000000000000..98e6a1eaa217374eaeaf4d96c484d47ccca2cad3 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Configuration/Template.php @@ -0,0 +1,186 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Configuration; + +use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; + +/** + * The Template class handles the Template annotation parts. + * + * @author Fabien Potencier + * @Annotation + */ +class Template extends ConfigurationAnnotation +{ + /** + * The template reference. + * + * @var TemplateReference|string + */ + protected $template; + + /** + * The template engine used when a specific template isn't specified. + * + * @var string + */ + protected $engine = 'twig'; + + /** + * The associative array of template variables. + * + * @var array + */ + protected $vars = array(); + + /** + * Should the template be streamed? + * + * @var bool + */ + protected $streamable = false; + + /** + * The controller (+action) this annotation is set to. + * + * @var array + */ + private $owner; + + /** + * Returns the array of templates variables. + * + * @return array + */ + public function getVars() + { + return $this->vars; + } + + /** + * @param bool $streamable + */ + public function setIsStreamable($streamable) + { + $this->streamable = $streamable; + } + + /** + * @return bool + */ + public function isStreamable() + { + return (bool) $this->streamable; + } + + /** + * Sets the template variables. + * + * @param array $vars The template variables + */ + public function setVars($vars) + { + $this->vars = $vars; + } + + /** + * Returns the engine used when guessing template names. + * + * @return string + */ + public function getEngine() + { + return $this->engine; + } + + /** + * Sets the engine used when guessing template names. + * + * @param string + */ + public function setEngine($engine) + { + $this->engine = $engine; + } + + /** + * Sets the template logic name. + * + * @param string $template The template logic name + */ + public function setValue($template) + { + $this->setTemplate($template); + } + + /** + * Returns the template reference. + * + * @return TemplateReference + */ + public function getTemplate() + { + return $this->template; + } + + /** + * Sets the template reference. + * + * @param TemplateReference|string $template The template reference + */ + public function setTemplate($template) + { + $this->template = $template; + } + + /** + * Returns the annotation alias name. + * + * @return string + * + * @see ConfigurationInterface + */ + public function getAliasName() + { + return 'template'; + } + + /** + * Only one template directive is allowed. + * + * @return bool + * + * @see ConfigurationInterface + */ + public function allowArray() + { + return false; + } + + /** + * @param array $owner + */ + public function setOwner(array $owner) + { + $this->owner = $owner; + } + + /** + * The controller (+action) this annotation is attached to. + * + * @return array + */ + public function getOwner() + { + return $this->owner; + } +} diff --git a/vendor/sensio/framework-extra-bundle/DependencyInjection/Compiler/AddParamConverterPass.php b/vendor/sensio/framework-extra-bundle/DependencyInjection/Compiler/AddParamConverterPass.php new file mode 100644 index 0000000000000000000000000000000000000000..b36543059f59d93733b896a7aa9375d375eab842 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/DependencyInjection/Compiler/AddParamConverterPass.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; + +/** + * Adds tagged request.param_converter services to converter.manager service. + * + * @author Fabien Potencier + */ +class AddParamConverterPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (false === $container->hasDefinition('sensio_framework_extra.converter.manager')) { + return; + } + + $definition = $container->getDefinition('sensio_framework_extra.converter.manager'); + + foreach ($container->findTaggedServiceIds('request.param_converter') as $id => $converters) { + foreach ($converters as $converter) { + $name = isset($converter['converter']) ? $converter['converter'] : null; + $priority = isset($converter['priority']) ? $converter['priority'] : 0; + + if ($priority === 'false' || $priority === false) { + $priority = null; + } + + $definition->addMethodCall('add', array(new Reference($id), $priority, $name)); + } + } + } +} diff --git a/vendor/sensio/framework-extra-bundle/DependencyInjection/Compiler/LegacyPass.php b/vendor/sensio/framework-extra-bundle/DependencyInjection/Compiler/LegacyPass.php new file mode 100644 index 0000000000000000000000000000000000000000..c78b912f7a71c10e5d00bfcfe3de974974d44a19 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/DependencyInjection/Compiler/LegacyPass.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; + +/** + * @author Fabien Potencier + */ +class LegacyPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (false === $container->hasDefinition('sensio_framework_extra.security.listener')) { + return; + } + + $definition = $container->getDefinition('sensio_framework_extra.security.listener'); + + if ($container->hasDefinition('security.token_storage')) { + $definition->replaceArgument(0, null); + } + } +} diff --git a/vendor/sensio/framework-extra-bundle/DependencyInjection/Configuration.php b/vendor/sensio/framework-extra-bundle/DependencyInjection/Configuration.php new file mode 100644 index 0000000000000000000000000000000000000000..56cc521cad133f33954b056245ea2f31d77eee2a --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/DependencyInjection/Configuration.php @@ -0,0 +1,88 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\DependencyInjection; + +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; +use Symfony\Component\Config\Definition\NodeInterface; + +/** + * FrameworkExtraBundle configuration structure. + * + * @author Henrik Bjornskov + */ +class Configuration implements ConfigurationInterface +{ + /** + * Generates the configuration tree. + * + * @return NodeInterface + */ + public function getConfigTreeBuilder() + { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('sensio_framework_extra', 'array'); + + $rootNode + ->children() + ->arrayNode('router') + ->addDefaultsIfNotSet() + ->children() + ->booleanNode('annotations')->defaultTrue()->end() + ->end() + ->end() + ->arrayNode('request') + ->addDefaultsIfNotSet() + ->children() + ->booleanNode('converters')->defaultTrue()->end() + ->booleanNode('auto_convert')->defaultTrue()->end() + ->end() + ->end() + ->arrayNode('view') + ->addDefaultsIfNotSet() + ->children() + ->booleanNode('annotations')->defaultTrue()->end() + ->end() + ->end() + ->arrayNode('cache') + ->addDefaultsIfNotSet() + ->children() + ->booleanNode('annotations')->defaultTrue()->end() + ->end() + ->end() + ->arrayNode('security') + ->addDefaultsIfNotSet() + ->children() + ->booleanNode('annotations')->defaultTrue()->end() + ->scalarNode('expression_language')->defaultValue('sensio_framework_extra.security.expression_language.default')->end() + ->end() + ->end() + ->arrayNode('psr_message') + ->addDefaultsIfNotSet() + ->children() + ->booleanNode('enabled')->defaultValue(interface_exists('Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface') && class_exists('Zend\Diactoros\ServerRequestFactory'))->end() + ->end() + ->end() + ->arrayNode('templating') + ->fixXmlConfig('controller_pattern') + ->children() + ->arrayNode('controller_patterns') + ->prototype('scalar') + ->end() + ->end() + ->end() + ->end() + ; + + return $treeBuilder; + } +} diff --git a/vendor/sensio/framework-extra-bundle/DependencyInjection/SensioFrameworkExtraExtension.php b/vendor/sensio/framework-extra-bundle/DependencyInjection/SensioFrameworkExtraExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..a8ba091e438de6e6366ad729508af2249a8a1e8c --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/DependencyInjection/SensioFrameworkExtraExtension.php @@ -0,0 +1,143 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\DependencyInjection; + +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\FileLocator; + +/** + * SensioFrameworkExtraExtension. + * + * @author Fabien Potencier + */ +class SensioFrameworkExtraExtension extends Extension +{ + public function load(array $configs, ContainerBuilder $container) + { + $configuration = $this->getConfiguration($configs, $container); + $config = $this->processConfiguration($configuration, $configs); + + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('services.xml'); + + if (!empty($config['templating']['controller_patterns'])) { + $container + ->getDefinition('sensio_framework_extra.view.guesser') + ->addArgument($config['templating']['controller_patterns']); + } + + $annotationsToLoad = array(); + + if ($config['router']['annotations']) { + $annotationsToLoad[] = 'routing.xml'; + + if (PHP_VERSION_ID < 70000) { + $this->addClassesToCompile(array( + 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener', + )); + } + } + + if ($config['request']['converters']) { + $annotationsToLoad[] = 'converters.xml'; + + if (PHP_VERSION_ID < 70000) { + $this->addClassesToCompile(array( + // cannot be added because it has some annotations + //'Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ParamConverter', + 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener', + 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\DateTimeParamConverter', + 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\DoctrineParamConverter', + 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface', + 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterManager', + )); + } + } + + if ($config['view']['annotations']) { + $annotationsToLoad[] = 'view.xml'; + + if (PHP_VERSION_ID < 70000) { + $this->addClassesToCompile(array( + 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\TemplateListener', + )); + } + } + + if ($config['cache']['annotations']) { + $annotationsToLoad[] = 'cache.xml'; + + if (PHP_VERSION_ID < 70000) { + $this->addClassesToCompile(array( + 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener', + )); + } + } + + if ($config['security']['annotations']) { + $annotationsToLoad[] = 'security.xml'; + + if (class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage') && class_exists('Symfony\Component\Security\Core\Authorization\ExpressionLanguage')) { + $container->setAlias('sensio_framework_extra.security.expression_language', new Alias($config['security']['expression_language'], false)); + } else { + $container->removeDefinition('sensio_framework_extra.security.expression_language.default'); + } + + if (PHP_VERSION_ID < 70000) { + $this->addClassesToCompile(array( + 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener', + )); + } + } + + if ($annotationsToLoad) { + // must be first + $loader->load('annotations.xml'); + + foreach ($annotationsToLoad as $configFile) { + $loader->load($configFile); + } + + if (PHP_VERSION_ID < 70000) { + $this->addClassesToCompile(array( + 'Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ConfigurationAnnotation', + )); + } + + if ($config['request']['converters']) { + $container->getDefinition('sensio_framework_extra.converter.listener')->replaceArgument(1, $config['request']['auto_convert']); + } + } + + if ($config['psr_message']['enabled']) { + $loader->load('psr7.xml'); + } + } + + /** + * Returns the base path for the XSD files. + * + * @return string The XSD base path + */ + public function getXsdValidationBasePath() + { + return __DIR__.'/../Resources/config/schema'; + } + + public function getNamespace() + { + return 'http://symfony.com/schema/dic/symfony_extra'; + } +} diff --git a/vendor/sensio/framework-extra-bundle/EventListener/CacheListener.php b/vendor/sensio/framework-extra-bundle/EventListener/CacheListener.php new file mode 100644 index 0000000000000000000000000000000000000000..7d64fdb78a9bcd286c4513033186acb02784e572 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/EventListener/CacheListener.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\EventListener; + +/** + * CacheListener handles HTTP cache headers. + * + * It can be configured via the Cache, LastModified, and Etag annotations. + * + * @author Fabien Potencier + * + * @deprecated Deprecated since 3.0, to be removed in 4.0. Use the HttpCacheListener instead. + */ +class CacheListener extends HttpCacheListener +{ +} diff --git a/vendor/sensio/framework-extra-bundle/EventListener/ControllerListener.php b/vendor/sensio/framework-extra-bundle/EventListener/ControllerListener.php new file mode 100644 index 0000000000000000000000000000000000000000..50712901b85d336dccbbbd740763cc9a183bfbe9 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/EventListener/ControllerListener.php @@ -0,0 +1,119 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\EventListener; + +use Doctrine\Common\Annotations\Reader; +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationInterface; +use Doctrine\Common\Util\ClassUtils; + +/** + * The ControllerListener class parses annotation blocks located in + * controller classes. + * + * @author Fabien Potencier + */ +class ControllerListener implements EventSubscriberInterface +{ + /** + * @var Reader + */ + protected $reader; + + /** + * Constructor. + * + * @param Reader $reader An Reader instance + */ + public function __construct(Reader $reader) + { + $this->reader = $reader; + } + + /** + * Modifies the Request object to apply configuration information found in + * controllers annotations like the template to render or HTTP caching + * configuration. + * + * @param FilterControllerEvent $event A FilterControllerEvent instance + */ + public function onKernelController(FilterControllerEvent $event) + { + $controller = $event->getController(); + + if (!is_array($controller) && method_exists($controller, '__invoke')) { + $controller = array($controller, '__invoke'); + } + + if (!is_array($controller)) { + return; + } + + $className = class_exists('Doctrine\Common\Util\ClassUtils') ? ClassUtils::getClass($controller[0]) : get_class($controller[0]); + $object = new \ReflectionClass($className); + $method = $object->getMethod($controller[1]); + + $classConfigurations = $this->getConfigurations($this->reader->getClassAnnotations($object)); + $methodConfigurations = $this->getConfigurations($this->reader->getMethodAnnotations($method)); + + $configurations = array(); + foreach (array_merge(array_keys($classConfigurations), array_keys($methodConfigurations)) as $key) { + if (!array_key_exists($key, $classConfigurations)) { + $configurations[$key] = $methodConfigurations[$key]; + } elseif (!array_key_exists($key, $methodConfigurations)) { + $configurations[$key] = $classConfigurations[$key]; + } else { + if (is_array($classConfigurations[$key])) { + if (!is_array($methodConfigurations[$key])) { + throw new \UnexpectedValueException('Configurations should both be an array or both not be an array'); + } + $configurations[$key] = array_merge($classConfigurations[$key], $methodConfigurations[$key]); + } else { + // method configuration overrides class configuration + $configurations[$key] = $methodConfigurations[$key]; + } + } + } + + $request = $event->getRequest(); + foreach ($configurations as $key => $attributes) { + $request->attributes->set($key, $attributes); + } + } + + protected function getConfigurations(array $annotations) + { + $configurations = array(); + foreach ($annotations as $configuration) { + if ($configuration instanceof ConfigurationInterface) { + if ($configuration->allowArray()) { + $configurations['_'.$configuration->getAliasName()][] = $configuration; + } elseif (!isset($configurations['_'.$configuration->getAliasName()])) { + $configurations['_'.$configuration->getAliasName()] = $configuration; + } else { + throw new \LogicException(sprintf('Multiple "%s" annotations are not allowed.', $configuration->getAliasName())); + } + } + } + + return $configurations; + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::CONTROLLER => 'onKernelController', + ); + } +} diff --git a/vendor/sensio/framework-extra-bundle/EventListener/HttpCacheListener.php b/vendor/sensio/framework-extra-bundle/EventListener/HttpCacheListener.php new file mode 100644 index 0000000000000000000000000000000000000000..2119d10a208053abf7bf765ad6d1a50d7e6cb729 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/EventListener/HttpCacheListener.php @@ -0,0 +1,168 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\EventListener; + +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\ExpressionLanguage\ExpressionLanguage; + +/** + * HttpCacheListener handles HTTP cache headers. + * + * It can be configured via the Cache annotation. + * + * @author Fabien Potencier + */ +class HttpCacheListener implements EventSubscriberInterface +{ + private $lastModifiedDates; + private $etags; + private $expressionLanguage; + + public function __construct() + { + $this->lastModifiedDates = new \SplObjectStorage(); + $this->etags = new \SplObjectStorage(); + } + + /** + * Handles HTTP validation headers. + */ + public function onKernelController(FilterControllerEvent $event) + { + $request = $event->getRequest(); + if (!$configuration = $request->attributes->get('_cache')) { + return; + } + + $response = new Response(); + + $lastModifiedDate = ''; + if ($configuration->getLastModified()) { + $lastModifiedDate = $this->getExpressionLanguage()->evaluate($configuration->getLastModified(), $request->attributes->all()); + $response->setLastModified($lastModifiedDate); + } + + $etag = ''; + if ($configuration->getETag()) { + $etag = hash('sha256', $this->getExpressionLanguage()->evaluate($configuration->getETag(), $request->attributes->all())); + $response->setETag($etag); + } + + if ($response->isNotModified($request)) { + $event->setController(function () use ($response) { + return $response; + }); + $event->stopPropagation(); + } else { + if ($etag) { + $this->etags[$request] = $etag; + } + if ($lastModifiedDate) { + $this->lastModifiedDates[$request] = $lastModifiedDate; + } + } + } + + /** + * Modifies the response to apply HTTP cache headers when needed. + */ + public function onKernelResponse(FilterResponseEvent $event) + { + $request = $event->getRequest(); + + if (!$configuration = $request->attributes->get('_cache')) { + return; + } + + $response = $event->getResponse(); + + // http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-12#section-3.1 + if (!in_array($response->getStatusCode(), array(200, 203, 300, 301, 302, 304, 404, 410))) { + return; + } + + if (null !== $age = $configuration->getSMaxAge()) { + if (!is_numeric($age)) { + $now = microtime(true); + + $age = ceil(strtotime($configuration->getSMaxAge(), $now) - $now); + } + + $response->setSharedMaxAge($age); + } + + if (null !== $age = $configuration->getMaxAge()) { + if (!is_numeric($age)) { + $now = microtime(true); + + $age = ceil(strtotime($configuration->getMaxAge(), $now) - $now); + } + + $response->setMaxAge($age); + } + + if (null !== $configuration->getExpires()) { + $date = \DateTime::createFromFormat('U', strtotime($configuration->getExpires()), new \DateTimeZone('UTC')); + $response->setExpires($date); + } + + if (null !== $configuration->getVary()) { + $response->setVary($configuration->getVary()); + } + + if ($configuration->isPublic()) { + $response->setPublic(); + } + + if ($configuration->isPrivate()) { + $response->setPrivate(); + } + + if (isset($this->lastModifiedDates[$request])) { + $response->setLastModified($this->lastModifiedDates[$request]); + + unset($this->lastModifiedDates[$request]); + } + + if (isset($this->etags[$request])) { + $response->setETag($this->etags[$request]); + + unset($this->etags[$request]); + } + + $event->setResponse($response); + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::CONTROLLER => 'onKernelController', + KernelEvents::RESPONSE => 'onKernelResponse', + ); + } + + private function getExpressionLanguage() + { + if (null === $this->expressionLanguage) { + if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) { + throw new \RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); + } + $this->expressionLanguage = new ExpressionLanguage(); + } + + return $this->expressionLanguage; + } +} diff --git a/vendor/sensio/framework-extra-bundle/EventListener/ParamConverterListener.php b/vendor/sensio/framework-extra-bundle/EventListener/ParamConverterListener.php new file mode 100644 index 0000000000000000000000000000000000000000..eadc67956a281a66670f32f6db7afd011f8c95ba --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/EventListener/ParamConverterListener.php @@ -0,0 +1,129 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\EventListener; + +use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; +use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterManager; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * The ParamConverterListener handles the ParamConverter annotation. + * + * @author Fabien Potencier + */ +class ParamConverterListener implements EventSubscriberInterface +{ + /** + * @var ParamConverterManager + */ + protected $manager; + + protected $autoConvert; + + /** + * @var bool + */ + private $isParameterTypeSupported; + + /** + * Constructor. + * + * @param ParamConverterManager $manager A ParamConverterManager instance + * @param bool $autoConvert Auto convert non-configured objects + */ + public function __construct(ParamConverterManager $manager, $autoConvert = true) + { + $this->manager = $manager; + $this->autoConvert = $autoConvert; + $this->isParameterTypeSupported = method_exists('ReflectionParameter', 'getType'); + } + + /** + * Modifies the ParamConverterManager instance. + * + * @param FilterControllerEvent $event A FilterControllerEvent instance + */ + public function onKernelController(FilterControllerEvent $event) + { + $controller = $event->getController(); + $request = $event->getRequest(); + $configurations = array(); + + if ($configuration = $request->attributes->get('_converters')) { + foreach (is_array($configuration) ? $configuration : array($configuration) as $configuration) { + $configurations[$configuration->getName()] = $configuration; + } + } + + if (is_array($controller)) { + $r = new \ReflectionMethod($controller[0], $controller[1]); + } elseif (is_object($controller) && is_callable($controller, '__invoke')) { + $r = new \ReflectionMethod($controller, '__invoke'); + } else { + $r = new \ReflectionFunction($controller); + } + + // automatically apply conversion for non-configured objects + if ($this->autoConvert) { + $configurations = $this->autoConfigure($r, $request, $configurations); + } + + $this->manager->apply($request, $configurations); + } + + private function autoConfigure(\ReflectionFunctionAbstract $r, Request $request, $configurations) + { + foreach ($r->getParameters() as $param) { + if ($param->getClass() && $param->getClass()->isInstance($request)) { + continue; + } + + $name = $param->getName(); + $class = $param->getClass(); + $hasType = $this->isParameterTypeSupported && $param->hasType(); + + if ($class || $hasType) { + if (!isset($configurations[$name])) { + $configuration = new ParamConverter(array()); + $configuration->setName($name); + + $configurations[$name] = $configuration; + } + + if ($class && null === $configurations[$name]->getClass()) { + $configurations[$name]->setClass($class->getName()); + } + } + + if (isset($configurations[$name])) { + $configurations[$name]->setIsOptional($param->isOptional() || $param->isDefaultValueAvailable() || $hasType && $param->getType()->allowsNull()); + } + } + + return $configurations; + } + + /** + * Get subscribed events. + * + * @return array Subscribed events + */ + public static function getSubscribedEvents() + { + return array( + KernelEvents::CONTROLLER => 'onKernelController', + ); + } +} diff --git a/vendor/sensio/framework-extra-bundle/EventListener/PsrResponseListener.php b/vendor/sensio/framework-extra-bundle/EventListener/PsrResponseListener.php new file mode 100644 index 0000000000000000000000000000000000000000..24b6bd45a4423ea0f64f2fd0c56e4d7ca1333b63 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/EventListener/PsrResponseListener.php @@ -0,0 +1,63 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\EventListener; + +use Psr\Http\Message\ResponseInterface; +use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory; +use Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent; +use Symfony\Component\HttpKernel\KernelEvents; + +/** + * Converts PSR-7 Response to HttpFoundation Response using the bridge. + * + * @author Kévin Dunglas + */ +class PsrResponseListener implements EventSubscriberInterface +{ + /** + * @var HttpFoundationFactoryInterface + */ + private $httpFoundationFactory; + + public function __construct(HttpFoundationFactoryInterface $httpFoundationFactory) + { + $this->httpFoundationFactory = $httpFoundationFactory; + } + + /** + * Do the conversion if applicable and update the response of the event. + * + * @param GetResponseForControllerResultEvent $event + */ + public function onKernelView(GetResponseForControllerResultEvent $event) + { + $controllerResult = $event->getControllerResult(); + + if (!$controllerResult instanceof ResponseInterface) { + return; + } + + $event->setResponse($this->httpFoundationFactory->createResponse($controllerResult)); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents() + { + return array( + KernelEvents::VIEW => 'onKernelView', + ); + } +} diff --git a/vendor/sensio/framework-extra-bundle/EventListener/SecurityListener.php b/vendor/sensio/framework-extra-bundle/EventListener/SecurityListener.php new file mode 100644 index 0000000000000000000000000000000000000000..d2e01b9bca959280dcc42081b6fff4dc5bcf4cd2 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/EventListener/SecurityListener.php @@ -0,0 +1,102 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\EventListener; + +use Sensio\Bundle\FrameworkExtraBundle\Security\ExpressionLanguage; +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; +use Symfony\Component\Security\Core\SecurityContextInterface; +use Symfony\Component\Security\Core\Exception\AccessDeniedException; +use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; + +/** + * SecurityListener handles security restrictions on controllers. + * + * @author Fabien Potencier + */ +class SecurityListener implements EventSubscriberInterface +{ + private $tokenStorage; + private $authChecker; + private $language; + private $trustResolver; + private $roleHierarchy; + + public function __construct(SecurityContextInterface $securityContext = null, ExpressionLanguage $language = null, AuthenticationTrustResolverInterface $trustResolver = null, RoleHierarchyInterface $roleHierarchy = null, TokenStorageInterface $tokenStorage = null, AuthorizationCheckerInterface $authChecker = null) + { + $this->tokenStorage = $tokenStorage ?: $securityContext; + $this->authChecker = $authChecker ?: $securityContext; + $this->language = $language; + $this->trustResolver = $trustResolver; + $this->roleHierarchy = $roleHierarchy; + } + + public function onKernelController(FilterControllerEvent $event) + { + $request = $event->getRequest(); + if (!$configuration = $request->attributes->get('_security')) { + return; + } + + if (null === $this->tokenStorage || null === $this->trustResolver) { + throw new \LogicException('To use the @Security tag, you need to install the Symfony Security bundle.'); + } + + if (null === $this->tokenStorage->getToken()) { + throw new \LogicException('To use the @Security tag, your controller needs to be behind a firewall.'); + } + + if (null === $this->language) { + throw new \LogicException('To use the @Security tag, you need to use the Security component 2.4 or newer and install the ExpressionLanguage component.'); + } + + if (!$this->language->evaluate($configuration->getExpression(), $this->getVariables($request))) { + throw new AccessDeniedException(sprintf('Expression "%s" denied access.', $configuration->getExpression())); + } + } + + // code should be sync with Symfony\Component\Security\Core\Authorization\Voter\ExpressionVoter + private function getVariables(Request $request) + { + $token = $this->tokenStorage->getToken(); + + if (null !== $this->roleHierarchy) { + $roles = $this->roleHierarchy->getReachableRoles($token->getRoles()); + } else { + $roles = $token->getRoles(); + } + + $variables = array( + 'token' => $token, + 'user' => $token->getUser(), + 'object' => $request, + 'request' => $request, + 'roles' => array_map(function ($role) { return $role->getRole(); }, $roles), + 'trust_resolver' => $this->trustResolver, + // needed for the is_granted expression function + 'auth_checker' => $this->authChecker, + ); + + // controller variables should also be accessible + return array_merge($request->attributes->all(), $variables); + } + + public static function getSubscribedEvents() + { + return array(KernelEvents::CONTROLLER => 'onKernelController'); + } +} diff --git a/vendor/sensio/framework-extra-bundle/EventListener/TemplateListener.php b/vendor/sensio/framework-extra-bundle/EventListener/TemplateListener.php new file mode 100644 index 0000000000000000000000000000000000000000..0a5f95947196224a47ca834aed4b32aa3e72ea32 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/EventListener/TemplateListener.php @@ -0,0 +1,162 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\EventListener; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; +use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpFoundation\StreamedResponse; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; + +/** + * Handles the Template annotation for actions. + * + * Depends on pre-processing of the ControllerListener. + * + * @author Fabien Potencier + */ +class TemplateListener implements EventSubscriberInterface +{ + /** + * @var ContainerInterface + */ + protected $container; + + /** + * Constructor. + * + * @param ContainerInterface $container The service container instance + */ + public function __construct(ContainerInterface $container) + { + $this->container = $container; + } + + /** + * Guesses the template name to render and its variables and adds them to + * the request object. + * + * @param FilterControllerEvent $event A FilterControllerEvent instance + */ + public function onKernelController(FilterControllerEvent $event) + { + $request = $event->getRequest(); + $template = $request->attributes->get('_template'); + + // no @Template present + if (null === $template) { + return; + } + + // we need the @Template annotation object or we cannot continue + if (!$template instanceof Template) { + return; + } + + $template->setOwner($controller = $event->getController()); + + // when no template has been given, try to resolve it based on the controller + if (null === $template->getTemplate()) { + $guesser = $this->container->get('sensio_framework_extra.view.guesser'); + $template->setTemplate($guesser->guessTemplateName($controller, $request, $template->getEngine())); + } + } + + /** + * Renders the template and initializes a new response object with the + * rendered template content. + * + * @param GetResponseForControllerResultEvent $event + */ + public function onKernelView(GetResponseForControllerResultEvent $event) + { + /* @var Template $template */ + $request = $event->getRequest(); + $template = $request->attributes->get('_template'); + + if (null === $template) { + return; + } + + $parameters = $event->getControllerResult(); + $owner = $template->getOwner(); + list($controller, $action) = $owner; + + // when the annotation declares no default vars and the action returns + // null, all action method arguments are used as default vars + if (null === $parameters) { + $parameters = $this->resolveDefaultParameters($request, $template, $controller, $action); + } + + // attempt to render the actual response + $templating = $this->container->get('templating'); + + if ($template->isStreamable()) { + $callback = function () use ($templating, $template, $parameters) { + return $templating->stream($template->getTemplate(), $parameters); + }; + + $event->setResponse(new StreamedResponse($callback)); + } + + // make sure the owner (controller+dependencies) is not cached or stored elsewhere + $template->setOwner(array()); + + $event->setResponse($templating->renderResponse($template->getTemplate(), $parameters)); + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::CONTROLLER => array('onKernelController', -128), + KernelEvents::VIEW => 'onKernelView', + ); + } + + /** + * @param Request $request + * @param Template $template + * @param object $controller + * @param string $action + * + * @return array + */ + private function resolveDefaultParameters(Request $request, Template $template, $controller, $action) + { + $parameters = array(); + $arguments = $template->getVars(); + + if (0 === count($arguments)) { + $r = new \ReflectionObject($controller); + + $arguments = array(); + foreach ($r->getMethod($action)->getParameters() as $param) { + $arguments[] = $param; + } + } + + // fetch the arguments of @Template.vars or everything if desired + // and assign them to the designated template + foreach ($arguments as $argument) { + if ($argument instanceof \ReflectionParameter) { + $parameters[$name = $argument->getName()] = !$request->attributes->has($name) && $argument->isDefaultValueAvailable() ? $argument->getDefaultValue() : $request->attributes->get($name); + } else { + $parameters[$argument] = $request->attributes->get($argument); + } + } + + return $parameters; + } +} diff --git a/vendor/sensio/framework-extra-bundle/LICENSE b/vendor/sensio/framework-extra-bundle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..b420d7195911b2ee5ab9eb7f1c4fcbe263b8732b --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010-2017 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/vendor/sensio/framework-extra-bundle/README.md b/vendor/sensio/framework-extra-bundle/README.md new file mode 100644 index 0000000000000000000000000000000000000000..255e6dfa5fd431e3b105ec0b39533a7d768e43d2 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/README.md @@ -0,0 +1,12 @@ +SensioFrameworkExtraBundle +========================== + +This bundle provides a way to configure your controllers with annotations. + +Read about it on its [official homepage](http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html). + +As of v3.0.0 of the bundle, the release cycle is de-synchronized from the +framework's. It means you can just require "sensio/framework-extra-bundle": +"~3.0" in your composer.json and Composer will automatically pick the latest +version of the bundle that works with your current version of Symfony. The +minimum version of Symfony for this workflow is 2.3. diff --git a/vendor/sensio/framework-extra-bundle/Request/ParamConverter/DateTimeParamConverter.php b/vendor/sensio/framework-extra-bundle/Request/ParamConverter/DateTimeParamConverter.php new file mode 100644 index 0000000000000000000000000000000000000000..176a7424c46476786c91f67a01e1c49f1b3fcf5e --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Request/ParamConverter/DateTimeParamConverter.php @@ -0,0 +1,76 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter; + +use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use DateTime; + +/** + * Convert DateTime instances from request attribute variable. + * + * @author Benjamin Eberlei + */ +class DateTimeParamConverter implements ParamConverterInterface +{ + /** + * {@inheritdoc} + * + * @throws NotFoundHttpException When invalid date given + */ + public function apply(Request $request, ParamConverter $configuration) + { + $param = $configuration->getName(); + + if (!$request->attributes->has($param)) { + return false; + } + + $options = $configuration->getOptions(); + $value = $request->attributes->get($param); + + if (!$value && $configuration->isOptional()) { + return false; + } + + if (isset($options['format'])) { + $date = DateTime::createFromFormat($options['format'], $value); + + if (!$date) { + throw new NotFoundHttpException(sprintf('Invalid date given for parameter "%s".', $param)); + } + } else { + if (false === strtotime($value)) { + throw new NotFoundHttpException(sprintf('Invalid date given for parameter "%s".', $param)); + } + + $date = new DateTime($value); + } + + $request->attributes->set($param, $date); + + return true; + } + + /** + * {@inheritdoc} + */ + public function supports(ParamConverter $configuration) + { + if (null === $configuration->getClass()) { + return false; + } + + return 'DateTime' === $configuration->getClass(); + } +} diff --git a/vendor/sensio/framework-extra-bundle/Request/ParamConverter/DoctrineParamConverter.php b/vendor/sensio/framework-extra-bundle/Request/ParamConverter/DoctrineParamConverter.php new file mode 100644 index 0000000000000000000000000000000000000000..c44558f19e141e323602ce774a98aa13f768d815 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Request/ParamConverter/DoctrineParamConverter.php @@ -0,0 +1,248 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter; + +use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpFoundation\Request; +use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\ORM\NoResultException; + +/** + * DoctrineParamConverter. + * + * @author Fabien Potencier + */ +class DoctrineParamConverter implements ParamConverterInterface +{ + /** + * @var ManagerRegistry + */ + protected $registry; + + public function __construct(ManagerRegistry $registry = null) + { + $this->registry = $registry; + } + + /** + * {@inheritdoc} + * + * @throws \LogicException When unable to guess how to get a Doctrine instance from the request information + * @throws NotFoundHttpException When object not found + */ + public function apply(Request $request, ParamConverter $configuration) + { + $name = $configuration->getName(); + $class = $configuration->getClass(); + $options = $this->getOptions($configuration); + + if (null === $request->attributes->get($name, false)) { + $configuration->setIsOptional(true); + } + + // find by identifier? + if (false === $object = $this->find($class, $request, $options, $name)) { + // find by criteria + if (false === $object = $this->findOneBy($class, $request, $options)) { + if ($configuration->isOptional()) { + $object = null; + } else { + throw new \LogicException(sprintf('Unable to guess how to get a Doctrine instance from the request information for parameter "%s".', $name)); + } + } + } + + if (null === $object && false === $configuration->isOptional()) { + throw new NotFoundHttpException(sprintf('%s object not found.', $class)); + } + + $request->attributes->set($name, $object); + + return true; + } + + protected function find($class, Request $request, $options, $name) + { + if ($options['mapping'] || $options['exclude']) { + return false; + } + + $id = $this->getIdentifier($request, $options, $name); + + if (false === $id || null === $id) { + return false; + } + + if (isset($options['repository_method'])) { + $method = $options['repository_method']; + } else { + $method = 'find'; + } + + try { + return $this->getManager($options['entity_manager'], $class)->getRepository($class)->$method($id); + } catch (NoResultException $e) { + return; + } + } + + protected function getIdentifier(Request $request, $options, $name) + { + if (isset($options['id'])) { + if (!is_array($options['id'])) { + $name = $options['id']; + } elseif (is_array($options['id'])) { + $id = array(); + foreach ($options['id'] as $field) { + $id[$field] = $request->attributes->get($field); + } + + return $id; + } + } + + if ($request->attributes->has($name)) { + return $request->attributes->get($name); + } + + if ($request->attributes->has('id') && !isset($options['id'])) { + return $request->attributes->get('id'); + } + + return false; + } + + protected function findOneBy($class, Request $request, $options) + { + if (!$options['mapping']) { + $keys = $request->attributes->keys(); + $options['mapping'] = $keys ? array_combine($keys, $keys) : array(); + } + + foreach ($options['exclude'] as $exclude) { + unset($options['mapping'][$exclude]); + } + + if (!$options['mapping']) { + return false; + } + + // if a specific id has been defined in the options and there is no corresponding attribute + // return false in order to avoid a fallback to the id which might be of another object + if (isset($options['id']) && null === $request->attributes->get($options['id'])) { + return false; + } + + $criteria = array(); + $em = $this->getManager($options['entity_manager'], $class); + $metadata = $em->getClassMetadata($class); + + $mapMethodSignature = isset($options['repository_method']) + && isset($options['map_method_signature']) + && $options['map_method_signature'] === true; + + foreach ($options['mapping'] as $attribute => $field) { + if ($metadata->hasField($field) + || ($metadata->hasAssociation($field) && $metadata->isSingleValuedAssociation($field)) + || $mapMethodSignature) { + $criteria[$field] = $request->attributes->get($attribute); + } + } + + if ($options['strip_null']) { + $criteria = array_filter($criteria, function ($value) { return !is_null($value); }); + } + + if (!$criteria) { + return false; + } + + if (isset($options['repository_method'])) { + $repositoryMethod = $options['repository_method']; + } else { + $repositoryMethod = 'findOneBy'; + } + + try { + if ($mapMethodSignature) { + return $this->findDataByMapMethodSignature($em, $class, $repositoryMethod, $criteria); + } + + return $em->getRepository($class)->$repositoryMethod($criteria); + } catch (NoResultException $e) { + return; + } + } + + private function findDataByMapMethodSignature($em, $class, $repositoryMethod, $criteria) + { + $arguments = array(); + $repository = $em->getRepository($class); + $ref = new \ReflectionMethod($repository, $repositoryMethod); + foreach ($ref->getParameters() as $parameter) { + if (array_key_exists($parameter->name, $criteria)) { + $arguments[] = $criteria[$parameter->name]; + } elseif ($parameter->isDefaultValueAvailable()) { + $arguments[] = $parameter->getDefaultValue(); + } else { + throw new \InvalidArgumentException(sprintf('Repository method "%s::%s" requires that you provide a value for the "$%s" argument.', get_class($repository), $repositoryMethod, $parameter->name)); + } + } + + return $ref->invokeArgs($repository, $arguments); + } + + /** + * {@inheritdoc} + */ + public function supports(ParamConverter $configuration) + { + // if there is no manager, this means that only Doctrine DBAL is configured + if (null === $this->registry || !count($this->registry->getManagers())) { + return false; + } + + if (null === $configuration->getClass()) { + return false; + } + + $options = $this->getOptions($configuration); + + // Doctrine Entity? + $em = $this->getManager($options['entity_manager'], $configuration->getClass()); + if (null === $em) { + return false; + } + + return !$em->getMetadataFactory()->isTransient($configuration->getClass()); + } + + protected function getOptions(ParamConverter $configuration) + { + return array_replace(array( + 'entity_manager' => null, + 'exclude' => array(), + 'mapping' => array(), + 'strip_null' => false, + ), $configuration->getOptions()); + } + + private function getManager($name, $class) + { + if (null === $name) { + return $this->registry->getManagerForClass($class); + } + + return $this->registry->getManager($name); + } +} diff --git a/vendor/sensio/framework-extra-bundle/Request/ParamConverter/ParamConverterInterface.php b/vendor/sensio/framework-extra-bundle/Request/ParamConverter/ParamConverterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d54abba6ca0fefc08d5a966c8fd5e9128867d6d8 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Request/ParamConverter/ParamConverterInterface.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 Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter; + +use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; +use Symfony\Component\HttpFoundation\Request; + +/** + * Converts request parameters to objects and stores them as request + * attributes, so they can be injected as controller method arguments. + * + * @author Fabien Potencier + */ +interface ParamConverterInterface +{ + /** + * Stores the object in the request. + * + * @param Request $request The request + * @param ParamConverter $configuration Contains the name, class and options of the object + * + * @return bool True if the object has been successfully set, else false + */ + public function apply(Request $request, ParamConverter $configuration); + + /** + * Checks if the object is supported. + * + * @param ParamConverter $configuration Should be an instance of ParamConverter + * + * @return bool True if the object is supported, else false + */ + public function supports(ParamConverter $configuration); +} diff --git a/vendor/sensio/framework-extra-bundle/Request/ParamConverter/ParamConverterManager.php b/vendor/sensio/framework-extra-bundle/Request/ParamConverter/ParamConverterManager.php new file mode 100644 index 0000000000000000000000000000000000000000..58421075c67631e2aa296d15c8c411110d969b67 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Request/ParamConverter/ParamConverterManager.php @@ -0,0 +1,144 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter; + +use Symfony\Component\HttpFoundation\Request; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationInterface; + +/** + * Managers converters. + * + * @author Fabien Potencier + * @author Henrik Bjornskov + */ +class ParamConverterManager +{ + /** + * @var array + */ + protected $converters = array(); + + /** + * @var array + */ + protected $namedConverters = array(); + + /** + * Applies all converters to the passed configurations and stops when a + * converter is applied it will move on to the next configuration and so on. + * + * @param Request $request + * @param array|object $configurations + */ + public function apply(Request $request, $configurations) + { + if (is_object($configurations)) { + $configurations = array($configurations); + } + + foreach ($configurations as $configuration) { + $this->applyConverter($request, $configuration); + } + } + + /** + * Apply converter on request based on the given configuration. + * + * @param Request $request + * @param ConfigurationInterface $configuration + */ + protected function applyConverter(Request $request, ConfigurationInterface $configuration) + { + $value = $request->attributes->get($configuration->getName()); + $className = $configuration->getClass(); + + // If the value is already an instance of the class we are trying to convert it into + // we should continue as no conversion is required + if (is_object($value) && $value instanceof $className) { + return; + } + + if ($converterName = $configuration->getConverter()) { + if (!isset($this->namedConverters[$converterName])) { + throw new \RuntimeException(sprintf( + "No converter named '%s' found for conversion of parameter '%s'.", + $converterName, $configuration->getName() + )); + } + + $converter = $this->namedConverters[$converterName]; + + if (!$converter->supports($configuration)) { + throw new \RuntimeException(sprintf( + "Converter '%s' does not support conversion of parameter '%s'.", + $converterName, $configuration->getName() + )); + } + + $converter->apply($request, $configuration); + + return; + } + + foreach ($this->all() as $converter) { + if ($converter->supports($configuration)) { + if ($converter->apply($request, $configuration)) { + return; + } + } + } + } + + /** + * Adds a parameter converter. + * + * Converters match either explicitly via $name or by iteration over all + * converters with a $priority. If you pass a $priority = null then the + * added converter will not be part of the iteration chain and can only + * be invoked explicitly. + * + * @param ParamConverterInterface $converter A ParamConverterInterface instance + * @param int $priority The priority (between -10 and 10). + * @param string $name Name of the converter. + */ + public function add(ParamConverterInterface $converter, $priority = 0, $name = null) + { + if ($priority !== null) { + if (!isset($this->converters[$priority])) { + $this->converters[$priority] = array(); + } + + $this->converters[$priority][] = $converter; + } + + if (null !== $name) { + $this->namedConverters[$name] = $converter; + } + } + + /** + * Returns all registered param converters. + * + * @return array An array of param converters + */ + public function all() + { + krsort($this->converters); + + $converters = array(); + foreach ($this->converters as $all) { + $converters = array_merge($converters, $all); + } + + return $converters; + } +} diff --git a/vendor/sensio/framework-extra-bundle/Request/ParamConverter/PsrServerRequestParamConverter.php b/vendor/sensio/framework-extra-bundle/Request/ParamConverter/PsrServerRequestParamConverter.php new file mode 100644 index 0000000000000000000000000000000000000000..a336674e5dc4b303efd44de159c2303c66b33fb0 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Request/ParamConverter/PsrServerRequestParamConverter.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter; + +use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; +use Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * Converts HttpFoundation Request to PSR-7 ServerRequest using the bridge. + * + * @author Kévin Dunglas + */ +class PsrServerRequestParamConverter implements ParamConverterInterface +{ + /** + * @var array + */ + private static $supportedTypes = array( + 'Psr\Http\Message\ServerRequestInterface' => true, + 'Psr\Http\Message\RequestInterface' => true, + 'Psr\Http\Message\MessageInterface' => true, + ); + /** + * @var HttpMessageFactoryInterface + */ + private $httpMessageFactory; + + public function __construct(HttpMessageFactoryInterface $httpMessageFactory) + { + $this->httpMessageFactory = $httpMessageFactory; + } + + /** + * {@inheritdoc} + */ + public function apply(Request $request, ParamConverter $configuration) + { + $request->attributes->set($configuration->getName(), $this->httpMessageFactory->createRequest($request)); + } + + /** + * {@inheritdoc} + */ + public function supports(ParamConverter $configuration) + { + if (null === $configuration->getClass()) { + return false; + } + + return isset(self::$supportedTypes[$configuration->getClass()]); + } +} diff --git a/vendor/sensio/framework-extra-bundle/Resources/config/annotations.xml b/vendor/sensio/framework-extra-bundle/Resources/config/annotations.xml new file mode 100644 index 0000000000000000000000000000000000000000..4e0c5b4884111ba08ff092e07086724719af3222 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Resources/config/annotations.xml @@ -0,0 +1,17 @@ + + + + + + Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener + + + + + + + + + diff --git a/vendor/sensio/framework-extra-bundle/Resources/config/cache.xml b/vendor/sensio/framework-extra-bundle/Resources/config/cache.xml new file mode 100644 index 0000000000000000000000000000000000000000..dd069733da3638269f03e4ff8769003c3a4331d6 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Resources/config/cache.xml @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/vendor/sensio/framework-extra-bundle/Resources/config/converters.xml b/vendor/sensio/framework-extra-bundle/Resources/config/converters.xml new file mode 100644 index 0000000000000000000000000000000000000000..1f951343cbddc77503e820d6f59fbc80c58b39c7 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Resources/config/converters.xml @@ -0,0 +1,32 @@ + + + + + + Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener + Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterManager + Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\DoctrineParamConverter + Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\DateTimeParamConverter + + + + + + + true + + + + + + + + + + + + + + diff --git a/vendor/sensio/framework-extra-bundle/Resources/config/psr7.xml b/vendor/sensio/framework-extra-bundle/Resources/config/psr7.xml new file mode 100644 index 0000000000000000000000000000000000000000..214119f52f12508829e3ed754508c0f138ad6895 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Resources/config/psr7.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/sensio/framework-extra-bundle/Resources/config/routing.xml b/vendor/sensio/framework-extra-bundle/Resources/config/routing.xml new file mode 100644 index 0000000000000000000000000000000000000000..b3b58cd7cfcfa25cb50557a23ee8219d42592228 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Resources/config/routing.xml @@ -0,0 +1,31 @@ + + + + + + Symfony\Component\Routing\Loader\AnnotationDirectoryLoader + Symfony\Component\Routing\Loader\AnnotationFileLoader + Sensio\Bundle\FrameworkExtraBundle\Routing\AnnotatedRouteControllerLoader + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/sensio/framework-extra-bundle/Resources/config/security.xml b/vendor/sensio/framework-extra-bundle/Resources/config/security.xml new file mode 100644 index 0000000000000000000000000000000000000000..dd2edbaf37e844eeef041575cb4a89080a982e98 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Resources/config/security.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/vendor/sensio/framework-extra-bundle/Resources/config/services.xml b/vendor/sensio/framework-extra-bundle/Resources/config/services.xml new file mode 100644 index 0000000000000000000000000000000000000000..6c76e61865da7d90d0ac2547b13a7fc9c2e93102 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Resources/config/services.xml @@ -0,0 +1,17 @@ + + + + + + Sensio\Bundle\FrameworkExtraBundle\Templating\TemplateGuesser + + + + + + + + + diff --git a/vendor/sensio/framework-extra-bundle/Resources/config/view.xml b/vendor/sensio/framework-extra-bundle/Resources/config/view.xml new file mode 100644 index 0000000000000000000000000000000000000000..350b6a1460ed9eb8b7af9f3e20e2c8f7c79052bb --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Resources/config/view.xml @@ -0,0 +1,17 @@ + + + + + + Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener + + + + + + + + + diff --git a/vendor/sensio/framework-extra-bundle/Routing/AnnotatedRouteControllerLoader.php b/vendor/sensio/framework-extra-bundle/Routing/AnnotatedRouteControllerLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..bd47bf82f9d135e38d9d76e68302d10fbb22130f --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Routing/AnnotatedRouteControllerLoader.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Routing; + +use Symfony\Component\Routing\Loader\AnnotationClassLoader; +use Symfony\Component\Routing\Route; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route as FrameworkExtraBundleRoute; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; + +/** + * AnnotatedRouteControllerLoader is an implementation of AnnotationClassLoader + * that sets the '_controller' default based on the class and method names. + * + * It also parse the @Method annotation. + * + * @author Fabien Potencier + */ +class AnnotatedRouteControllerLoader extends AnnotationClassLoader +{ + /** + * Configures the _controller default parameter and eventually the HTTP method + * requirement of a given Route instance. + * + * @param Route $route A route instance + * @param \ReflectionClass $class A ReflectionClass instance + * @param \ReflectionMethod $method A ReflectionClass method + * @param mixed $annot The annotation class instance + * + * @throws \LogicException When the service option is specified on a method + */ + protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot) + { + // controller + $classAnnot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass); + if ($classAnnot instanceof FrameworkExtraBundleRoute && $service = $classAnnot->getService()) { + $route->setDefault('_controller', $service.':'.$method->getName()); + } else { + $route->setDefault('_controller', $class->getName().'::'.$method->getName()); + } + + // requirements (@Method) + foreach ($this->reader->getMethodAnnotations($method) as $configuration) { + if ($configuration instanceof Method) { + $route->setMethods(implode('|', $configuration->getMethods())); + } elseif ($configuration instanceof FrameworkExtraBundleRoute && $configuration->getService()) { + throw new \LogicException('The service option can only be specified at class level.'); + } + } + } + + protected function getGlobals(\ReflectionClass $class) + { + $globals = parent::getGlobals($class); + + foreach ($this->reader->getClassAnnotations($class) as $configuration) { + if ($configuration instanceof Method) { + $globals['methods'] = array_merge($globals['methods'], $configuration->getMethods()); + } + } + + return $globals; + } + + /** + * Makes the default route name more sane by removing common keywords. + * + * @param \ReflectionClass $class A ReflectionClass instance + * @param \ReflectionMethod $method A ReflectionMethod instance + * + * @return string The default route name + */ + protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) + { + $routeName = parent::getDefaultRouteName($class, $method); + + return preg_replace(array( + '/(bundle|controller)_/', + '/action(_\d+)?$/', + '/__/', + ), array( + '_', + '\\1', + '_', + ), $routeName); + } +} diff --git a/vendor/sensio/framework-extra-bundle/Security/ExpressionLanguage.php b/vendor/sensio/framework-extra-bundle/Security/ExpressionLanguage.php new file mode 100644 index 0000000000000000000000000000000000000000..86b64177890719cad6918814f25ad20f48729975 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Security/ExpressionLanguage.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Security; + +use Symfony\Component\Security\Core\Authorization\ExpressionLanguage as BaseExpressionLanguage; + +/** + * Adds some function to the default Symfony Security ExpressionLanguage. + * + * @author Fabien Potencier + */ +class ExpressionLanguage extends BaseExpressionLanguage +{ + protected function registerFunctions() + { + parent::registerFunctions(); + + $this->register('is_granted', function ($attributes, $object = 'null') { + return sprintf('$auth_checker->isGranted(%s, %s)', $attributes, $object); + }, function (array $variables, $attributes, $object = null) { + return $variables['auth_checker']->isGranted($attributes, $object); + }); + } +} diff --git a/vendor/sensio/framework-extra-bundle/SensioFrameworkExtraBundle.php b/vendor/sensio/framework-extra-bundle/SensioFrameworkExtraBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..5c95a150ec7a083f80f0826443178b5e2f6c4bf8 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/SensioFrameworkExtraBundle.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * SensioFrameworkExtraBundle. + * + * @author Fabien Potencier + */ +class SensioFrameworkExtraBundle extends Bundle +{ + public function build(ContainerBuilder $container) + { + parent::build($container); + + $container->addCompilerPass(new AddParamConverterPass()); + $container->addCompilerPass(new LegacyPass()); + } +} diff --git a/vendor/sensio/framework-extra-bundle/Templating/TemplateGuesser.php b/vendor/sensio/framework-extra-bundle/Templating/TemplateGuesser.php new file mode 100644 index 0000000000000000000000000000000000000000..f281324e86ad8889277b6be147ef434753ec9eed --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/Templating/TemplateGuesser.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\FrameworkExtraBundle\Templating; + +use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\HttpKernel\KernelInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; +use Doctrine\Common\Util\ClassUtils; + +/** + * The TemplateGuesser class handles the guessing of template name based on controller. + * + * @author Fabien Potencier + */ +class TemplateGuesser +{ + /** + * @var KernelInterface + */ + protected $kernel; + + /** + * @var string[] + */ + private $controllerPatterns; + + /** + * Constructor. + * + * @param KernelInterface $kernel A KernelInterface instance + * @param string[] $controllerPatterns Regexps extracting the controller name from its FQN. + */ + public function __construct(KernelInterface $kernel, array $controllerPatterns = array()) + { + $controllerPatterns[] = '/Controller\\\(.+)Controller$/'; + + $this->kernel = $kernel; + $this->controllerPatterns = $controllerPatterns; + } + + /** + * Guesses and returns the template name to render based on the controller + * and action names. + * + * @param callable $controller An array storing the controller object and action method + * @param Request $request A Request instance + * @param string $engine + * + * @return TemplateReference template reference + * + * @throws \InvalidArgumentException + */ + public function guessTemplateName($controller, Request $request, $engine = 'twig') + { + if (is_object($controller) && method_exists($controller, '__invoke')) { + $controller = array($controller, '__invoke'); + } elseif (!is_array($controller)) { + throw new \InvalidArgumentException(sprintf('First argument of %s must be an array callable or an object defining the magic method __invoke. "%s" given.', __METHOD__, gettype($controller))); + } + + $className = class_exists('Doctrine\Common\Util\ClassUtils') ? ClassUtils::getClass($controller[0]) : get_class($controller[0]); + + $matchController = null; + foreach ($this->controllerPatterns as $pattern) { + if (preg_match($pattern, $className, $tempMatch)) { + $matchController = $tempMatch; + break; + } + } + if (null === $matchController) { + throw new \InvalidArgumentException(sprintf('The "%s" class does not look like a controller class (its FQN must match one of the following regexps: "%s")', get_class($controller[0]), implode('", "', $this->controllerPatterns))); + } + + if ($controller[1] === '__invoke') { + $matchAction = $matchController; + $matchController = null; + } elseif (!preg_match('/^(.+)Action$/', $controller[1], $matchAction)) { + $matchAction = array(null, $controller[1]); + } + + $bundle = $this->getBundleForClass($className); + + if ($bundle) { + while ($bundleName = $bundle->getName()) { + if (null === $parentBundleName = $bundle->getParent()) { + $bundleName = $bundle->getName(); + + break; + } + + $bundles = $this->kernel->getBundle($parentBundleName, false); + $bundle = array_pop($bundles); + } + } else { + $bundleName = null; + } + + return new TemplateReference($bundleName, $matchController[1], $matchAction[1], $request->getRequestFormat(), $engine); + } + + /** + * Returns the Bundle instance in which the given class name is located. + * + * @param string $class A fully qualified controller class name + * + * @return Bundle|null $bundle A Bundle instance + */ + protected function getBundleForClass($class) + { + $reflectionClass = new \ReflectionClass($class); + $bundles = $this->kernel->getBundles(); + + do { + $namespace = $reflectionClass->getNamespaceName(); + foreach ($bundles as $bundle) { + if (0 === strpos($namespace, $bundle->getNamespace())) { + return $bundle; + } + } + $reflectionClass = $reflectionClass->getParentClass(); + } while ($reflectionClass); + } +} diff --git a/vendor/sensio/framework-extra-bundle/UPGRADE.md b/vendor/sensio/framework-extra-bundle/UPGRADE.md new file mode 100644 index 0000000000000000000000000000000000000000..692f1f1d478a87a8acb3ad4da1bf2b336034fc2f --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/UPGRADE.md @@ -0,0 +1,50 @@ +UPGRADE FROM 2.0 to 2.1 +======================= + +### DoctrineParamConverter: Request Attributes with same name as Arguments + +Previously the DoctrineParamConverter defaulted to finding objects by 'id' +parameter. This is unintuitive and is now overwritten by a behavior where +the request attributes with the same name as entity arguments is matched +with higher priority. + +This might cause problems if you are using this parameter for another object conversion. + +### DoctrineParamConverter with multiple Arguments may clash + +In 2.0 the parameter converter matched only entity fields against route parameters. +With 2.1, the matching now also includes single-valued associations. Depending +on fields in entities this might lead to clashes when you update to the latest version. + +Example that may break with the latest (2.1) version: + + /** + * @Route("/user/{email}/{address}") + * @ParamConverter("address", class="MyBundle:Address", options={"id": "address"}) + */ + public function showAction(User $user, Address $address) + { + } + + class User + { + /** @ORM\Column(type="string") */ + public $email; + /** @ORM\ManyToOne(targetEntity="Address") */ + public $address; + } + +Since address exists as field in `User` and User is not searched by primary key but +by field, this scenario now adds `address` to the criteria to find a user instance. +In scenarios of related entities this might even (just) work, but you never know. + +You can fix this by configuring explicit mapping for `User`: + + /** + * @Route("/user/{email}/{address}") + * @ParamConverter("address", options={"id": "address"}) + * @ParamConverter("email", options={"exclude": ["address"]}) + */ + public function showAction(User $user, Address $address) + { + } diff --git a/vendor/sensio/framework-extra-bundle/composer.json b/vendor/sensio/framework-extra-bundle/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..243fafaaf015a04e61e0af7e9fc8145a393981e9 --- /dev/null +++ b/vendor/sensio/framework-extra-bundle/composer.json @@ -0,0 +1,53 @@ +{ + "name": "sensio/framework-extra-bundle", + "description": "This bundle provides a way to configure your controllers with annotations", + "keywords": ["annotations","controllers"], + "type": "symfony-bundle", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "require": { + "symfony/framework-bundle": "~2.3|~3.0", + "symfony/dependency-injection": "~2.3|~3.0", + "doctrine/common": "~2.2" + }, + "require-dev": { + "symfony/expression-language": "~2.4|~3.0", + "symfony/finder": "~2.3|~3.0", + "symfony/psr-http-message-bridge": "^0.3", + "symfony/security-bundle": "~2.4|~3.0", + "symfony/yaml": "~2.3|~3.0", + "symfony/twig-bundle": "~2.3|~3.0", + "twig/twig": "~1.12|~2.0", + "symfony/asset": "~2.7|~3.0", + "symfony/browser-kit": "~2.3|~3.0", + "symfony/phpunit-bridge": "~3.2", + "symfony/dom-crawler": "~2.3|~3.0", + "symfony/templating": "~2.3|~3.0", + "symfony/translation": "~2.3|~3.0", + "zendframework/zend-diactoros": "^1.3", + "doctrine/doctrine-bundle": "~1.5", + "doctrine/orm": "~2.4,>=2.4.5" + }, + "suggest": { + "symfony/psr-http-message-bridge": "To use the PSR-7 converters", + "symfony/expression-language": "", + "symfony/security-bundle": "" + }, + "autoload": { + "psr-4": { "Sensio\\Bundle\\FrameworkExtraBundle\\": "" } + }, + "autoload-dev": { + "psr-4": { "Tests\\Fixtures\\": "Tests/Fixtures/" } + }, + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "minimum-stability": "dev" +} diff --git a/vendor/sensio/generator-bundle/.travis.yml b/vendor/sensio/generator-bundle/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..d598e4604a3c54c79a9183a543f0abace07b3c69 --- /dev/null +++ b/vendor/sensio/generator-bundle/.travis.yml @@ -0,0 +1,21 @@ +language: php + +sudo: false + +cache: + directories: + - $HOME/.composer/cache/files + +matrix: + include: + - php: hhvm + - php: 5.3 + - php: 5.4 + - php: 5.5 + - php: 5.6 + - php: 7.0 + env: composer_extra="--prefer-lowest --prefer-stable" + fast_finish: true + +install: + - composer --prefer-source $composer_extra update diff --git a/vendor/sensio/generator-bundle/Command/AutoComplete/EntitiesAutoCompleter.php b/vendor/sensio/generator-bundle/Command/AutoComplete/EntitiesAutoCompleter.php new file mode 100644 index 0000000000000000000000000000000000000000..c14d64aa396d841ec68a63cc3fbbb746ab3033df --- /dev/null +++ b/vendor/sensio/generator-bundle/Command/AutoComplete/EntitiesAutoCompleter.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Command\AutoComplete; + +use Doctrine\ORM\EntityManagerInterface; + +/** + * Provides auto-completion suggestions for entities. + * + * @author Charles Sarrazin + */ +class EntitiesAutoCompleter +{ + private $manager; + + public function __construct(EntityManagerInterface $manager) + { + $this->manager = $manager; + } + + public function getSuggestions() + { + $configuration = $this->manager + ->getConfiguration() + ; + + $namespaceReplacements = array(); + + foreach ($configuration->getEntityNamespaces() as $alias => $namespace) { + $namespaceReplacements[$namespace.'\\'] = $alias.':'; + } + + $entities = $configuration + ->getMetadataDriverImpl() + ->getAllClassNames() + ; + + return array_map(function ($entity) use ($namespaceReplacements) { + return strtr($entity, $namespaceReplacements); + }, $entities); + } +} diff --git a/vendor/sensio/generator-bundle/Command/GenerateBundleCommand.php b/vendor/sensio/generator-bundle/Command/GenerateBundleCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..c628f4a71638e17bdea2ee9b14af900285cfa2b3 --- /dev/null +++ b/vendor/sensio/generator-bundle/Command/GenerateBundleCommand.php @@ -0,0 +1,418 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Command; + +use Sensio\Bundle\GeneratorBundle\Manipulator\ConfigurationManipulator; +use Sensio\Bundle\GeneratorBundle\Model\Bundle; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Question\Question; +use Symfony\Component\Console\Question\ConfirmationQuestion; +use Symfony\Component\HttpKernel\KernelInterface; +use Sensio\Bundle\GeneratorBundle\Generator\BundleGenerator; +use Sensio\Bundle\GeneratorBundle\Manipulator\KernelManipulator; +use Sensio\Bundle\GeneratorBundle\Manipulator\RoutingManipulator; + +/** + * Generates bundles. + * + * @author Fabien Potencier + */ +class GenerateBundleCommand extends GeneratorCommand +{ + /** + * @see Command + */ + protected function configure() + { + $this + ->setName('generate:bundle') + ->setDescription('Generates a bundle') + ->setDefinition(array( + new InputOption('namespace', '', InputOption::VALUE_REQUIRED, 'The namespace of the bundle to create'), + new InputOption('dir', '', InputOption::VALUE_REQUIRED, 'The directory where to create the bundle', 'src/'), + new InputOption('bundle-name', '', InputOption::VALUE_REQUIRED, 'The optional bundle name'), + new InputOption('format', '', InputOption::VALUE_REQUIRED, 'Use the format for configuration files (php, xml, yml, or annotation)'), + new InputOption('shared', '', InputOption::VALUE_NONE, 'Are you planning on sharing this bundle across multiple applications?'), + )) + ->setHelp(<<%command.name% command helps you generates new bundles. + +By default, the command interacts with the developer to tweak the generation. +Any passed option will be used as a default value for the interaction +(--namespace is the only one needed if you follow the +conventions): + +php %command.full_name% --namespace=Acme/BlogBundle + +Note that you can use / instead of \\ for the namespace delimiter to avoid any +problems. + +If you want to disable any user interaction, use --no-interaction but don't forget to pass all needed options: + +php %command.full_name% --namespace=Acme/BlogBundle --dir=src [--bundle-name=...] --no-interaction + +Note that the bundle namespace must end with "Bundle". +EOT + ) + ; + } + + /** + * @see Command + * + * @throws \InvalidArgumentException When namespace doesn't end with Bundle + * @throws \RuntimeException When bundle can't be executed + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $questionHelper = $this->getQuestionHelper(); + + $bundle = $this->createBundleObject($input); + $questionHelper->writeSection($output, 'Bundle generation'); + + /** @var BundleGenerator $generator */ + $generator = $this->getGenerator(); + + $output->writeln(sprintf( + '> Generating a sample bundle skeleton into %s', + $this->makePathRelative($bundle->getTargetDirectory()) + )); + $generator->generateBundle($bundle); + + $errors = array(); + + // check that the namespace is already autoloaded + $this->checkAutoloader($output, $bundle); + + // register the bundle in the Kernel class + $this->updateKernel($output, $this->getContainer()->get('kernel'), $bundle); + + // routing importing + $this->updateRouting($output, $bundle); + + if (!$bundle->shouldGenerateDependencyInjectionDirectory()) { + // we need to import their services.yml manually! + $this->updateConfiguration($output, $bundle); + } + + $questionHelper->writeGeneratorSummary($output, $errors); + } + + protected function interact(InputInterface $input, OutputInterface $output) + { + $questionHelper = $this->getQuestionHelper(); + $questionHelper->writeSection($output, 'Welcome to the Symfony bundle generator!'); + + /* + * shared option + */ + $shared = $input->getOption('shared'); + // ask, but use $shared as the default + $question = new ConfirmationQuestion($questionHelper->getQuestion( + 'Are you planning on sharing this bundle across multiple applications?', + $shared ? 'yes' : 'no' + ), $shared); + $shared = $questionHelper->ask($input, $output, $question); + $input->setOption('shared', $shared); + + /* + * namespace option + */ + $namespace = $input->getOption('namespace'); + $output->writeln(array( + '', + 'Your application code must be written in bundles. This command helps', + 'you generate them easily.', + '', + )); + + $askForBundleName = true; + if ($shared) { + // a shared bundle, so it should probably have a vendor namespace + $output->writeln(array( + 'Each bundle is hosted under a namespace (like Acme/BlogBundle).', + 'The namespace should begin with a "vendor" name like your company name, your', + 'project name, or your client name, followed by one or more optional category', + 'sub-namespaces, and it should end with the bundle name itself', + '(which must have Bundle as a suffix).', + '', + 'See http://symfony.com/doc/current/cookbook/bundles/best_practices.html#bundle-name for more', + 'details on bundle naming conventions.', + '', + 'Use / instead of \\ for the namespace delimiter to avoid any problem.', + '', + )); + + $question = new Question($questionHelper->getQuestion( + 'Bundle namespace', + $namespace + ), $namespace); + $question->setValidator(function ($answer) { + return Validators::validateBundleNamespace($answer, true); + }); + $namespace = $questionHelper->ask($input, $output, $question); + } else { + // a simple application bundle + $output->writeln(array( + 'Give your bundle a descriptive name, like BlogBundle.', + )); + + $question = new Question($questionHelper->getQuestion( + 'Bundle name', + $namespace + ), $namespace); + $question->setValidator(function ($inputNamespace) { + return Validators::validateBundleNamespace($inputNamespace, false); + }); + $namespace = $questionHelper->ask($input, $output, $question); + + if (strpos($namespace, '\\') === false) { + // this is a bundle name (FooBundle) not a namespace (Acme\FooBundle) + // so this is the bundle name (and it is also the namespace) + $input->setOption('bundle-name', $namespace); + $askForBundleName = false; + } + } + $input->setOption('namespace', $namespace); + + /* + * bundle-name option + */ + if ($askForBundleName) { + $bundle = $input->getOption('bundle-name'); + // no bundle yet? Get a default from the namespace + if (!$bundle) { + $bundle = strtr($namespace, array('\\Bundle\\' => '', '\\' => '')); + } + + $output->writeln(array( + '', + 'In your code, a bundle is often referenced by its name. It can be the', + 'concatenation of all namespace parts but it\'s really up to you to come', + 'up with a unique name (a good practice is to start with the vendor name).', + 'Based on the namespace, we suggest '.$bundle.'.', + '', + )); + $question = new Question($questionHelper->getQuestion( + 'Bundle name', + $bundle + ), $bundle); + $question->setValidator( + array('Sensio\Bundle\GeneratorBundle\Command\Validators', 'validateBundleName') + ); + $bundle = $questionHelper->ask($input, $output, $question); + $input->setOption('bundle-name', $bundle); + } + + /* + * dir option + */ + // defaults to src/ in the option + $dir = $input->getOption('dir'); + $output->writeln(array( + '', + 'Bundles are usually generated into the src/ directory. Unless you\'re', + 'doing something custom, hit enter to keep this default!', + '', + )); + + $question = new Question($questionHelper->getQuestion( + 'Target Directory', + $dir + ), $dir); + $dir = $questionHelper->ask($input, $output, $question); + $input->setOption('dir', $dir); + + /* + * format option + */ + $format = $input->getOption('format'); + if (!$format) { + $format = $shared ? 'xml' : 'annotation'; + } + $output->writeln(array( + '', + 'What format do you want to use for your generated configuration?', + '', + )); + + $question = new Question($questionHelper->getQuestion( + 'Configuration format (annotation, yml, xml, php)', + $format + ), $format); + $question->setValidator(function ($format) { + return Validators::validateFormat($format); + }); + $question->setAutocompleterValues(array('annotation', 'yml', 'xml', 'php')); + $format = $questionHelper->ask($input, $output, $question); + $input->setOption('format', $format); + } + + protected function checkAutoloader(OutputInterface $output, Bundle $bundle) + { + $output->writeln('> Checking that the bundle is autoloaded'); + if (!class_exists($bundle->getBundleClassName())) { + return array( + '- Edit the composer.json file and register the bundle', + ' namespace in the "autoload" section:', + '', + ); + } + } + + protected function updateKernel(OutputInterface $output, KernelInterface $kernel, Bundle $bundle) + { + $kernelManipulator = new KernelManipulator($kernel); + + $output->writeln(sprintf( + '> Enabling the bundle inside %s', + $this->makePathRelative($kernelManipulator->getFilename()) + )); + + try { + $ret = $kernelManipulator->addBundle($bundle->getBundleClassName()); + + if (!$ret) { + $reflected = new \ReflectionObject($kernel); + + return array( + sprintf('- Edit %s', $reflected->getFilename()), + ' and add the following bundle in the AppKernel::registerBundles() method:', + '', + sprintf(' new %s(),', $bundle->getBundleClassName()), + '', + ); + } + } catch (\RuntimeException $e) { + return array( + sprintf('Bundle %s is already defined in AppKernel::registerBundles().', $bundle->getBundleClassName()), + '', + ); + } + } + + protected function updateRouting(OutputInterface $output, Bundle $bundle) + { + $targetRoutingPath = $this->getContainer()->getParameter('kernel.root_dir').'/config/routing.yml'; + $output->writeln(sprintf( + '> Importing the bundle\'s routes from the %s file', + $this->makePathRelative($targetRoutingPath) + )); + $routing = new RoutingManipulator($targetRoutingPath); + try { + $ret = $routing->addResource($bundle->getName(), $bundle->getConfigurationFormat()); + if (!$ret) { + if ('annotation' === $bundle->getConfigurationFormat()) { + $help = sprintf(" resource: \"@%s/Controller/\"\n type: annotation\n", $bundle->getName()); + } else { + $help = sprintf(" resource: \"@%s/Resources/config/routing.%s\"\n", $bundle->getName(), $bundle->getConfigurationFormat()); + } + $help .= " prefix: /\n"; + + return array( + '- Import the bundle\'s routing resource in the app\'s main routing file:', + '', + sprintf(' %s:', $bundle->getName()), + $help, + '', + ); + } + } catch (\RuntimeException $e) { + return array( + sprintf('Bundle %s is already imported.', $bundle->getName()), + '', + ); + } + } + + protected function updateConfiguration(OutputInterface $output, Bundle $bundle) + { + $targetConfigurationPath = $this->getContainer()->getParameter('kernel.root_dir').'/config/config.yml'; + $output->writeln(sprintf( + '> Importing the bundle\'s %s from the %s file', + $bundle->getServicesConfigurationFilename(), + $this->makePathRelative($targetConfigurationPath) + )); + $manipulator = new ConfigurationManipulator($targetConfigurationPath); + try { + $manipulator->addResource($bundle); + } catch (\RuntimeException $e) { + return array( + sprintf('- Import the bundle\'s "%s" resource in the app\'s main configuration file:', $bundle->getServicesConfigurationFilename()), + '', + $manipulator->getImportCode($bundle), + '', + ); + } + } + + /** + * Creates the Bundle object based on the user's (non-interactive) input. + * + * @param InputInterface $input + * + * @return Bundle + */ + protected function createBundleObject(InputInterface $input) + { + foreach (array('namespace', 'dir') as $option) { + if (null === $input->getOption($option)) { + throw new \RuntimeException(sprintf('The "%s" option must be provided.', $option)); + } + } + + $shared = $input->getOption('shared'); + + $namespace = Validators::validateBundleNamespace($input->getOption('namespace'), $shared); + if (!$bundleName = $input->getOption('bundle-name')) { + $bundleName = strtr($namespace, array('\\' => '')); + } + $bundleName = Validators::validateBundleName($bundleName); + $dir = $input->getOption('dir'); + if (null === $input->getOption('format')) { + $input->setOption('format', 'annotation'); + } + $format = Validators::validateFormat($input->getOption('format')); + + // an assumption that the kernel root dir is in a directory (like app/) + $projectRootDirectory = $this->getContainer()->getParameter('kernel.root_dir').'/..'; + + if (!$this->getContainer()->get('filesystem')->isAbsolutePath($dir)) { + $dir = $projectRootDirectory.'/'.$dir; + } + // add trailing / if necessary + $dir = '/' === substr($dir, -1, 1) ? $dir : $dir.'/'; + + $bundle = new Bundle( + $namespace, + $bundleName, + $dir, + $format, + $shared + ); + + // not shared - put the tests in the root + if (!$shared) { + $testsDir = $projectRootDirectory.'/tests/'.$bundleName; + $bundle->setTestsDirectory($testsDir); + } + + return $bundle; + } + + protected function createGenerator() + { + return new BundleGenerator($this->getContainer()->get('filesystem')); + } +} diff --git a/vendor/sensio/generator-bundle/Command/GenerateCommandCommand.php b/vendor/sensio/generator-bundle/Command/GenerateCommandCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..bd772469c451a4064184d1073e000b8087431a66 --- /dev/null +++ b/vendor/sensio/generator-bundle/Command/GenerateCommandCommand.php @@ -0,0 +1,169 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Question\Question; +use Sensio\Bundle\GeneratorBundle\Generator\CommandGenerator; + +/** + * Generates commands. + * + * @author Javier Eguiluz + */ +class GenerateCommandCommand extends GeneratorCommand +{ + const MAX_ATTEMPTS = 5; + + /** + * @see Command + */ + public function configure() + { + $this + ->setName('generate:command') + ->setDescription('Generates a console command') + ->setDefinition(array( + new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle where the command is generated'), + new InputArgument('name', InputArgument::OPTIONAL, 'The command\'s name (e.g. app:my-command)'), + )) + ->setHelp(<<generate:command command helps you generate new commands +inside bundles. Provide the bundle name as the first argument and the command +name as the second argument: + +php app/console generate:command AppBundle blog:publish-posts + +If any of the arguments is missing, the command will ask for their values +interactively. If you want to disable any user interaction, use +--no-interaction, but don't forget to pass all needed arguments. + +Every generated file is based on a template. There are default templates but they can +be overridden by placing custom templates in one of the following locations, by order of priority: + +BUNDLE_PATH/Resources/SensioGeneratorBundle/skeleton/command +APP_PATH/Resources/SensioGeneratorBundle/skeleton/command + +You can check https://github.com/sensio/SensioGeneratorBundle/tree/master/Resources/skeleton +in order to know the file structure of the skeleton. +EOT + ) + ; + } + + public function interact(InputInterface $input, OutputInterface $output) + { + $bundle = $input->getArgument('bundle'); + $name = $input->getArgument('name'); + + if (null !== $bundle && null !== $name) { + return; + } + + $questionHelper = $this->getQuestionHelper(); + $questionHelper->writeSection($output, 'Welcome to the Symfony command generator'); + + // bundle + if (null !== $bundle) { + $output->writeln(sprintf('Bundle name: %s', $bundle)); + } else { + $output->writeln(array( + '', + 'First, you need to give the name of the bundle where the command will', + 'be generated (e.g. AppBundle)', + '', + )); + + $bundleNames = array_keys($this->getContainer()->get('kernel')->getBundles()); + + $question = new Question($questionHelper->getQuestion('Bundle name', $bundle), $bundle); + $question->setAutocompleterValues($bundleNames); + $question->setValidator(function ($answer) use ($bundleNames) { + if (!in_array($answer, $bundleNames)) { + throw new \RuntimeException(sprintf('Bundle "%s" does not exist.', $answer)); + } + + return $answer; + }); + $question->setMaxAttempts(self::MAX_ATTEMPTS); + + $bundle = $questionHelper->ask($input, $output, $question); + $input->setArgument('bundle', $bundle); + } + + // command name + if (null !== $name) { + $output->writeln(sprintf('Command name: %s', $name)); + } else { + $output->writeln(array( + '', + 'Now, provide the name of the command as you type it in the console', + '(e.g. app:my-command)', + '', + )); + + $question = new Question($questionHelper->getQuestion('Command name', $name), $name); + $question->setValidator(function ($answer) { + if (empty($answer)) { + throw new \RuntimeException('The command name cannot be empty.'); + } + + return $answer; + }); + $question->setMaxAttempts(self::MAX_ATTEMPTS); + + $name = $questionHelper->ask($input, $output, $question); + $input->setArgument('name', $name); + } + + // summary and confirmation + $output->writeln(array( + '', + $this->getHelper('formatter')->formatBlock('Summary before generation', 'bg=blue;fg-white', true), + '', + sprintf('You are going to generate a %s command inside %s bundle.', $name, $bundle), + )); + + $question = new Question($questionHelper->getQuestion('Do you confirm generation', 'yes', '?'), true); + if (!$questionHelper->ask($input, $output, $question)) { + $output->writeln('Command aborted'); + + return 1; + } + } + + public function execute(InputInterface $input, OutputInterface $output) + { + $questionHelper = $this->getQuestionHelper(); + $bundle = $input->getArgument('bundle'); + $name = $input->getArgument('name'); + + try { + $bundle = $this->getContainer()->get('kernel')->getBundle($bundle); + } catch (\Exception $e) { + $output->writeln(sprintf('Bundle "%s" does not exist.', $bundle)); + } + + $generator = $this->getGenerator($bundle); + $generator->generate($bundle, $name); + + $output->writeln(sprintf('Generated the %s command in %s', $name, $bundle->getName())); + $questionHelper->writeGeneratorSummary($output, array()); + } + + protected function createGenerator() + { + return new CommandGenerator($this->getContainer()->get('filesystem')); + } +} diff --git a/vendor/sensio/generator-bundle/Command/GenerateControllerCommand.php b/vendor/sensio/generator-bundle/Command/GenerateControllerCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..32b7e5978f327f02ef1526fceb1467b17a80d97d --- /dev/null +++ b/vendor/sensio/generator-bundle/Command/GenerateControllerCommand.php @@ -0,0 +1,336 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Command; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Question\ConfirmationQuestion; +use Symfony\Component\Console\Question\Question; +use Sensio\Bundle\GeneratorBundle\Command\Helper\QuestionHelper; +use Sensio\Bundle\GeneratorBundle\Generator\ControllerGenerator; + +/** + * Generates controllers. + * + * @author Wouter J + */ +class GenerateControllerCommand extends GeneratorCommand +{ + /** + * @see Command + */ + public function configure() + { + $this + ->setName('generate:controller') + ->setDescription('Generates a controller') + ->setDefinition(array( + new InputOption('controller', '', InputOption::VALUE_REQUIRED, 'The name of the controller to create'), + new InputOption('route-format', '', InputOption::VALUE_REQUIRED, 'The format that is used for the routing (yml, xml, php, annotation)', 'annotation'), + new InputOption('template-format', '', InputOption::VALUE_REQUIRED, 'The format that is used for templating (twig, php)', 'twig'), + new InputOption('actions', '', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'The actions in the controller'), + )) + ->setHelp(<<%command.name% command helps you generates new controllers +inside bundles. + +By default, the command interacts with the developer to tweak the generation. +Any passed option will be used as a default value for the interaction +(--controller is the only one needed if you follow the conventions): + +php %command.full_name% --controller=AcmeBlogBundle:Post + +If you want to disable any user interaction, use --no-interaction +but don't forget to pass all needed options: + +php %command.full_name% --controller=AcmeBlogBundle:Post --no-interaction + +Every generated file is based on a template. There are default templates but they can +be overridden by placing custom templates in one of the following locations, by order of priority: + +BUNDLE_PATH/Resources/SensioGeneratorBundle/skeleton/controller +APP_PATH/Resources/SensioGeneratorBundle/skeleton/controller + +You can check https://github.com/sensio/SensioGeneratorBundle/tree/master/Resources/skeleton +in order to know the file structure of the skeleton +EOT + ) + ; + } + + public function execute(InputInterface $input, OutputInterface $output) + { + $questionHelper = $this->getQuestionHelper(); + + if ($input->isInteractive()) { + $question = new ConfirmationQuestion($questionHelper->getQuestion('Do you confirm generation', 'yes', '?'), true); + if (!$questionHelper->ask($input, $output, $question)) { + $output->writeln('Command aborted'); + + return 1; + } + } + + if (null === $input->getOption('controller')) { + throw new \RuntimeException('The controller option must be provided.'); + } + + list($bundle, $controller) = $this->parseShortcutNotation($input->getOption('controller')); + if (is_string($bundle)) { + $bundle = Validators::validateBundleName($bundle); + + try { + $bundle = $this->getContainer()->get('kernel')->getBundle($bundle); + } catch (\Exception $e) { + $output->writeln(sprintf('Bundle "%s" does not exist.', $bundle)); + } + } + + $questionHelper->writeSection($output, 'Controller generation'); + + $generator = $this->getGenerator($bundle); + $generator->generate($bundle, $controller, $input->getOption('route-format'), $input->getOption('template-format'), $this->parseActions($input->getOption('actions'))); + + $output->writeln('Generating the bundle code: OK'); + + $questionHelper->writeGeneratorSummary($output, array()); + } + + public function interact(InputInterface $input, OutputInterface $output) + { + $questionHelper = $this->getQuestionHelper(); + $questionHelper->writeSection($output, 'Welcome to the Symfony controller generator'); + + // namespace + $output->writeln(array( + '', + 'Every page, and even sections of a page, are rendered by a controller.', + 'This command helps you generate them easily.', + '', + 'First, you need to give the controller name you want to generate.', + 'You must use the shortcut notation like AcmeBlogBundle:Post', + '', + )); + + $bundleNames = array_keys($this->getContainer()->get('kernel')->getBundles()); + + while (true) { + $question = new Question($questionHelper->getQuestion('Controller name', $input->getOption('controller')), $input->getOption('controller')); + $question->setAutocompleterValues($bundleNames); + $question->setValidator(array('Sensio\Bundle\GeneratorBundle\Command\Validators', 'validateControllerName')); + $controller = $questionHelper->ask($input, $output, $question); + list($bundle, $controller) = $this->parseShortcutNotation($controller); + + try { + $b = $this->getContainer()->get('kernel')->getBundle($bundle); + + if (!file_exists($b->getPath().'/Controller/'.$controller.'Controller.php')) { + break; + } + + $output->writeln(sprintf('Controller "%s:%s" already exists.', $bundle, $controller)); + } catch (\Exception $e) { + $output->writeln(sprintf('Bundle "%s" does not exist.', $bundle)); + } + } + $input->setOption('controller', $bundle.':'.$controller); + + // routing format + $defaultFormat = (null !== $input->getOption('route-format') ? $input->getOption('route-format') : 'annotation'); + $output->writeln(array( + '', + 'Determine the format to use for the routing.', + '', + )); + $question = new Question($questionHelper->getQuestion('Routing format (php, xml, yml, annotation)', $defaultFormat), $defaultFormat); + $question->setValidator(array('Sensio\Bundle\GeneratorBundle\Command\Validators', 'validateFormat')); + $routeFormat = $questionHelper->ask($input, $output, $question); + $input->setOption('route-format', $routeFormat); + + // templating format + $validateTemplateFormat = function ($format) { + if (!in_array($format, array('twig', 'php'))) { + throw new \InvalidArgumentException(sprintf('The template format must be twig or php, "%s" given', $format)); + } + + return $format; + }; + + $defaultFormat = (null !== $input->getOption('template-format') ? $input->getOption('template-format') : 'twig'); + $output->writeln(array( + '', + 'Determine the format to use for templating.', + '', + )); + $question = new Question($questionHelper->getQuestion('Template format (twig, php)', $defaultFormat), $defaultFormat); + $question->setValidator($validateTemplateFormat); + + $templateFormat = $questionHelper->ask($input, $output, $question); + $input->setOption('template-format', $templateFormat); + + // actions + $input->setOption('actions', $this->addActions($input, $output, $questionHelper)); + + // summary + $output->writeln(array( + '', + $this->getHelper('formatter')->formatBlock('Summary before generation', 'bg=blue;fg-white', true), + '', + sprintf('You are going to generate a "%s:%s" controller', $bundle, $controller), + sprintf('using the "%s" format for the routing and the "%s" format', $routeFormat, $templateFormat), + 'for templating', + )); + } + + public function addActions(InputInterface $input, OutputInterface $output, QuestionHelper $questionHelper) + { + $output->writeln(array( + '', + 'Instead of starting with a blank controller, you can add some actions now. An action', + 'is a PHP function or method that executes, for example, when a given route is matched.', + 'Actions should be suffixed by Action.', + '', + )); + + $templateNameValidator = function ($name) { + if ('default' == $name) { + return $name; + } + + if (2 != substr_count($name, ':')) { + throw new \InvalidArgumentException(sprintf('Template name "%s" does not have 2 colons', $name)); + } + + return $name; + }; + + $actions = $this->parseActions($input->getOption('actions')); + + while (true) { + // name + $output->writeln(''); + $question = new Question($questionHelper->getQuestion('New action name (press to stop adding actions)', null), null); + $question->setValidator(function ($name) use ($actions) { + if (null == $name) { + return $name; + } + + if (isset($actions[$name])) { + throw new \InvalidArgumentException(sprintf('Action "%s" is already defined', $name)); + } + + if ('Action' != substr($name, -6)) { + throw new \InvalidArgumentException(sprintf('Name "%s" is not suffixed by Action', $name)); + } + + return $name; + }); + + $actionName = $questionHelper->ask($input, $output, $question); + if (!$actionName) { + break; + } + + // route + $question = new Question($questionHelper->getQuestion('Action route', '/'.substr($actionName, 0, -6)), '/'.substr($actionName, 0, -6)); + $route = $questionHelper->ask($input, $output, $question); + $placeholders = $this->getPlaceholdersFromRoute($route); + + // template + $defaultTemplate = $input->getOption('controller').':'. + strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr(substr($actionName, 0, -6), '_', '.'))) + .'.html.'.$input->getOption('template-format'); + $question = new Question($questionHelper->getQuestion('Template name (optional)', $defaultTemplate), $defaultTemplate); + $template = $questionHelper->ask($input, $output, $question); + + // adding action + $actions[$actionName] = array( + 'name' => $actionName, + 'route' => $route, + 'placeholders' => $placeholders, + 'template' => $template, + ); + } + + return $actions; + } + + public function parseActions($actions) + { + if (empty($actions) || $actions !== array_values($actions)) { + return $actions; + } + + // '$actions' can be an array with just 1 element defining several actions + // separated by white spaces: $actions = array('... ... ...'); + if (1 === count($actions)) { + $actions = explode(' ', $actions[0]); + } + + $parsedActions = array(); + + foreach ($actions as $action) { + $data = explode(':', $action); + + // name + if (!isset($data[0])) { + throw new \InvalidArgumentException('An action must have a name'); + } + $name = array_shift($data); + + // route + $route = (isset($data[0]) && '' != $data[0]) ? array_shift($data) : '/'.substr($name, 0, -6); + if ($route) { + $placeholders = $this->getPlaceholdersFromRoute($route); + } else { + $placeholders = array(); + } + + // template + $template = (0 < count($data) && '' != $data[0]) ? implode(':', $data) : 'default'; + + $parsedActions[$name] = array( + 'name' => $name, + 'route' => $route, + 'placeholders' => $placeholders, + 'template' => $template, + ); + } + + return $parsedActions; + } + + public function getPlaceholdersFromRoute($route) + { + preg_match_all('/{(.*?)}/', $route, $placeholders); + $placeholders = $placeholders[1]; + + return $placeholders; + } + + public function parseShortcutNotation($shortcut) + { + $entity = str_replace('/', '\\', $shortcut); + + if (false === $pos = strpos($entity, ':')) { + throw new \InvalidArgumentException(sprintf('The controller name must contain a : ("%s" given, expecting something like AcmeBlogBundle:Post)', $entity)); + } + + return array(substr($entity, 0, $pos), substr($entity, $pos + 1)); + } + + protected function createGenerator() + { + return new ControllerGenerator($this->getContainer()->get('filesystem')); + } +} diff --git a/vendor/sensio/generator-bundle/Command/GenerateDoctrineCommand.php b/vendor/sensio/generator-bundle/Command/GenerateDoctrineCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..11ac15ae38decb8d91a3322216f33d33c0effb98 --- /dev/null +++ b/vendor/sensio/generator-bundle/Command/GenerateDoctrineCommand.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Command; + +use Doctrine\Bundle\DoctrineBundle\Mapping\DisconnectedMetadataFactory; + +abstract class GenerateDoctrineCommand extends GeneratorCommand +{ + public function isEnabled() + { + return class_exists('Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle'); + } + + protected function parseShortcutNotation($shortcut) + { + $entity = str_replace('/', '\\', $shortcut); + + if (false === $pos = strpos($entity, ':')) { + throw new \InvalidArgumentException(sprintf('The entity name must contain a : ("%s" given, expecting something like AcmeBlogBundle:Blog/Post)', $entity)); + } + + return array(substr($entity, 0, $pos), substr($entity, $pos + 1)); + } + + protected function getEntityMetadata($entity) + { + $factory = new DisconnectedMetadataFactory($this->getContainer()->get('doctrine')); + + return $factory->getClassMetadata($entity)->getMetadata(); + } +} diff --git a/vendor/sensio/generator-bundle/Command/GenerateDoctrineCrudCommand.php b/vendor/sensio/generator-bundle/Command/GenerateDoctrineCrudCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..f30ec4d086ada90572f421e7a7f3cf4018347961 --- /dev/null +++ b/vendor/sensio/generator-bundle/Command/GenerateDoctrineCrudCommand.php @@ -0,0 +1,346 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Command; + +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; +use Symfony\Component\Console\Question\Question; +use Symfony\Component\Console\Question\ConfirmationQuestion; +use Sensio\Bundle\GeneratorBundle\Command\AutoComplete\EntitiesAutoCompleter; +use Sensio\Bundle\GeneratorBundle\Command\Helper\QuestionHelper; +use Sensio\Bundle\GeneratorBundle\Generator\DoctrineCrudGenerator; +use Sensio\Bundle\GeneratorBundle\Generator\DoctrineFormGenerator; +use Sensio\Bundle\GeneratorBundle\Manipulator\RoutingManipulator; + +/** + * Generates a CRUD for a Doctrine entity. + * + * @author Fabien Potencier + */ +class GenerateDoctrineCrudCommand extends GenerateDoctrineCommand +{ + private $formGenerator; + + /** + * @see Command + */ + protected function configure() + { + $this + ->setName('doctrine:generate:crud') + ->setAliases(array('generate:doctrine:crud')) + ->setDescription('Generates a CRUD based on a Doctrine entity') + ->setDefinition(array( + new InputArgument('entity', InputArgument::OPTIONAL, 'The entity class name to initialize (shortcut notation)'), + new InputOption('entity', '', InputOption::VALUE_REQUIRED, 'The entity class name to initialize (shortcut notation)'), + new InputOption('route-prefix', '', InputOption::VALUE_REQUIRED, 'The route prefix'), + new InputOption('with-write', '', InputOption::VALUE_NONE, 'Whether or not to generate create, new and delete actions'), + new InputOption('format', '', InputOption::VALUE_REQUIRED, 'The format used for configuration files (php, xml, yml, or annotation)', 'annotation'), + new InputOption('overwrite', '', InputOption::VALUE_NONE, 'Overwrite any existing controller or form class when generating the CRUD contents'), + )) + ->setHelp(<<%command.name% command generates a CRUD based on a Doctrine entity. + +The default command only generates the list and show actions. + +php %command.full_name% --entity=AcmeBlogBundle:Post --route-prefix=post_admin + +Using the --with-write option allows to generate the new, edit and delete actions. + +php %command.full_name% --entity=AcmeBlogBundle:Post --route-prefix=post_admin --with-write + +Every generated file is based on a template. There are default templates but they can be overridden by placing custom templates in one of the following locations, by order of priority: + +BUNDLE_PATH/Resources/SensioGeneratorBundle/skeleton/crud +APP_PATH/Resources/SensioGeneratorBundle/skeleton/crud + +And + +__bundle_path__/Resources/SensioGeneratorBundle/skeleton/form +__project_root__/app/Resources/SensioGeneratorBundle/skeleton/form + +You can check https://github.com/sensio/SensioGeneratorBundle/tree/master/Resources/skeleton +in order to know the file structure of the skeleton +EOT + ) + ; + } + + /** + * @see Command + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $questionHelper = $this->getQuestionHelper(); + + if ($input->isInteractive()) { + $question = new ConfirmationQuestion($questionHelper->getQuestion('Do you confirm generation', 'yes', '?'), true); + if (!$questionHelper->ask($input, $output, $question)) { + $output->writeln('Command aborted'); + + return 1; + } + } + + $entity = Validators::validateEntityName($input->getOption('entity')); + list($bundle, $entity) = $this->parseShortcutNotation($entity); + + $format = Validators::validateFormat($input->getOption('format')); + $prefix = $this->getRoutePrefix($input, $entity); + $withWrite = $input->getOption('with-write'); + $forceOverwrite = $input->getOption('overwrite'); + + $questionHelper->writeSection($output, 'CRUD generation'); + + try { + $entityClass = $this->getContainer()->get('doctrine')->getAliasNamespace($bundle).'\\'.$entity; + $metadata = $this->getEntityMetadata($entityClass); + } catch (\Exception $e) { + throw new \RuntimeException(sprintf('Entity "%s" does not exist in the "%s" bundle. Create it with the "doctrine:generate:entity" command and then execute this command again.', $entity, $bundle)); + } + + $bundle = $this->getContainer()->get('kernel')->getBundle($bundle); + + $generator = $this->getGenerator($bundle); + $generator->generate($bundle, $entity, $metadata[0], $format, $prefix, $withWrite, $forceOverwrite); + + $output->writeln('Generating the CRUD code: OK'); + + $errors = array(); + $runner = $questionHelper->getRunner($output, $errors); + + // form + if ($withWrite) { + $this->generateForm($bundle, $entity, $metadata, $forceOverwrite); + $output->writeln('Generating the Form code: OK'); + } + + // routing + $output->write('Updating the routing: '); + if ('annotation' != $format) { + $runner($this->updateRouting($questionHelper, $input, $output, $bundle, $format, $entity, $prefix)); + } else { + $runner($this->updateAnnotationRouting($bundle, $entity, $prefix)); + } + + $questionHelper->writeGeneratorSummary($output, $errors); + } + + protected function interact(InputInterface $input, OutputInterface $output) + { + $questionHelper = $this->getQuestionHelper(); + $questionHelper->writeSection($output, 'Welcome to the Doctrine2 CRUD generator'); + + // namespace + $output->writeln(array( + '', + 'This command helps you generate CRUD controllers and templates.', + '', + 'First, give the name of the existing entity for which you want to generate a CRUD', + '(use the shortcut notation like AcmeBlogBundle:Post)', + '', + )); + + if ($input->hasArgument('entity') && $input->getArgument('entity') != '') { + $input->setOption('entity', $input->getArgument('entity')); + } + + $question = new Question($questionHelper->getQuestion('The Entity shortcut name', $input->getOption('entity')), $input->getOption('entity')); + $question->setValidator(array('Sensio\Bundle\GeneratorBundle\Command\Validators', 'validateEntityName')); + + $autocompleter = new EntitiesAutoCompleter($this->getContainer()->get('doctrine')->getManager()); + $autocompleteEntities = $autocompleter->getSuggestions(); + $question->setAutocompleterValues($autocompleteEntities); + $entity = $questionHelper->ask($input, $output, $question); + + $input->setOption('entity', $entity); + list($bundle, $entity) = $this->parseShortcutNotation($entity); + + try { + $entityClass = $this->getContainer()->get('doctrine')->getAliasNamespace($bundle).'\\'.$entity; + $metadata = $this->getEntityMetadata($entityClass); + } catch (\Exception $e) { + throw new \RuntimeException(sprintf('Entity "%s" does not exist in the "%s" bundle. You may have mistyped the bundle name or maybe the entity doesn\'t exist yet (create it first with the "doctrine:generate:entity" command).', $entity, $bundle)); + } + + // write? + $withWrite = $input->getOption('with-write') ?: false; + $output->writeln(array( + '', + 'By default, the generator creates two actions: list and show.', + 'You can also ask it to generate "write" actions: new, update, and delete.', + '', + )); + $question = new ConfirmationQuestion($questionHelper->getQuestion('Do you want to generate the "write" actions', $withWrite ? 'yes' : 'no', '?', $withWrite), $withWrite); + + $withWrite = $questionHelper->ask($input, $output, $question); + $input->setOption('with-write', $withWrite); + + // format + $format = $input->getOption('format'); + $output->writeln(array( + '', + 'Determine the format to use for the generated CRUD.', + '', + )); + $question = new Question($questionHelper->getQuestion('Configuration format (yml, xml, php, or annotation)', $format), $format); + $question->setValidator(array('Sensio\Bundle\GeneratorBundle\Command\Validators', 'validateFormat')); + $format = $questionHelper->ask($input, $output, $question); + $input->setOption('format', $format); + + // route prefix + $prefix = $this->getRoutePrefix($input, $entity); + $output->writeln(array( + '', + 'Determine the routes prefix (all the routes will be "mounted" under this', + 'prefix: /prefix/, /prefix/new, ...).', + '', + )); + $prefix = $questionHelper->ask($input, $output, new Question($questionHelper->getQuestion('Routes prefix', '/'.$prefix), '/'.$prefix)); + $input->setOption('route-prefix', $prefix); + + // summary + $output->writeln(array( + '', + $this->getHelper('formatter')->formatBlock('Summary before generation', 'bg=blue;fg=white', true), + '', + sprintf('You are going to generate a CRUD controller for "%s:%s"', $bundle, $entity), + sprintf('using the "%s" format.', $format), + '', + )); + } + + /** + * Tries to generate forms if they don't exist yet and if we need write operations on entities. + */ + protected function generateForm($bundle, $entity, $metadata, $forceOverwrite = false) + { + $this->getFormGenerator($bundle)->generate($bundle, $entity, $metadata[0], $forceOverwrite); + } + + protected function updateRouting(QuestionHelper $questionHelper, InputInterface $input, OutputInterface $output, BundleInterface $bundle, $format, $entity, $prefix) + { + $auto = true; + if ($input->isInteractive()) { + $question = new ConfirmationQuestion($questionHelper->getQuestion('Confirm automatic update of the Routing', 'yes', '?'), true); + $auto = $questionHelper->ask($input, $output, $question); + } + + $output->write('Importing the CRUD routes: '); + $this->getContainer()->get('filesystem')->mkdir($bundle->getPath().'/Resources/config/'); + + // first, import the routing file from the bundle's main routing.yml file + $routing = new RoutingManipulator($bundle->getPath().'/Resources/config/routing.yml'); + try { + $ret = $auto ? $routing->addResource($bundle->getName(), $format, '/'.$prefix, 'routing/'.strtolower(str_replace('\\', '_', $entity))) : false; + } catch (\RuntimeException $exc) { + $ret = false; + } + + if (!$ret) { + $help = sprintf(" resource: \"@%s/Resources/config/routing/%s.%s\"\n", $bundle->getName(), strtolower(str_replace('\\', '_', $entity)), $format); + $help .= sprintf(" prefix: /%s\n", $prefix); + + return array( + '- Import the bundle\'s routing resource in the bundle routing file', + sprintf(' (%s).', $bundle->getPath().'/Resources/config/routing.yml'), + '', + sprintf(' %s:', $routing->getImportedResourceYamlKey($bundle->getName(), $prefix)), + $help, + '', + ); + } + + // second, import the bundle's routing.yml file from the application's routing.yml file + $routing = new RoutingManipulator($this->getContainer()->getParameter('kernel.root_dir').'/config/routing.yml'); + try { + $ret = $auto ? $routing->addResource($bundle->getName(), 'yml') : false; + } catch (\RuntimeException $e) { + // the bundle is already imported form app's routing.yml file + $errorMessage = sprintf( + "\n\n[ERROR] The bundle's \"Resources/config/routing.yml\" file cannot be imported\n". + "from \"app/config/routing.yml\" because the \"%s\" bundle is\n". + "already imported. Make sure you are not using two different\n". + "configuration/routing formats in the same bundle because it won't work.\n", + $bundle->getName() + ); + $output->write($errorMessage); + $ret = true; + } catch (\Exception $e) { + $ret = false; + } + + if (!$ret) { + return array( + '- Import the bundle\'s routing.yml file in the application routing.yml file', + sprintf('# app/config/routing.yml'), + sprintf('%s:', $bundle->getName()), + sprintf(' resource: "@%s/Resources/config/routing.yml"', $bundle->getName()), + '', + '# ...', + '', + ); + } + } + + protected function updateAnnotationRouting(BundleInterface $bundle, $entity, $prefix) + { + $rootDir = $this->getContainer()->getParameter('kernel.root_dir'); + + $routing = new RoutingManipulator($rootDir.'/config/routing.yml'); + + if (!$routing->hasResourceInAnnotation($bundle->getName())) { + $parts = explode('\\', $entity); + $controller = array_pop($parts); + + $ret = $routing->addAnnotationController($bundle->getName(), $controller); + } + } + + protected function getRoutePrefix(InputInterface $input, $entity) + { + $prefix = $input->getOption('route-prefix') ?: strtolower(str_replace(array('\\', '/'), '_', $entity)); + + if ($prefix && '/' === $prefix[0]) { + $prefix = substr($prefix, 1); + } + + return $prefix; + } + + protected function createGenerator($bundle = null) + { + return new DoctrineCrudGenerator( + $this->getContainer()->get('filesystem'), + $this->getContainer()->getParameter('kernel.root_dir') + ); + } + + protected function getFormGenerator($bundle = null) + { + if (null === $this->formGenerator) { + $this->formGenerator = new DoctrineFormGenerator($this->getContainer()->get('filesystem')); + $this->formGenerator->setSkeletonDirs($this->getSkeletonDirs($bundle)); + } + + return $this->formGenerator; + } + + public function setFormGenerator(DoctrineFormGenerator $formGenerator) + { + $this->formGenerator = $formGenerator; + } +} diff --git a/vendor/sensio/generator-bundle/Command/GenerateDoctrineEntityCommand.php b/vendor/sensio/generator-bundle/Command/GenerateDoctrineEntityCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..e3e58caddd27f90ce61b4cbf49ae1818a9d045a2 --- /dev/null +++ b/vendor/sensio/generator-bundle/Command/GenerateDoctrineEntityCommand.php @@ -0,0 +1,399 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Command; + +use Sensio\Bundle\GeneratorBundle\Generator\DoctrineEntityGenerator; +use Sensio\Bundle\GeneratorBundle\Command\Helper\QuestionHelper; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\Console\Question\Question; +use Doctrine\DBAL\Types\Type; + +/** + * Initializes a Doctrine entity inside a bundle. + * + * @author Fabien Potencier + */ +class GenerateDoctrineEntityCommand extends GenerateDoctrineCommand +{ + protected function configure() + { + $this + ->setName('doctrine:generate:entity') + ->setAliases(array('generate:doctrine:entity')) + ->setDescription('Generates a new Doctrine entity inside a bundle') + ->addOption('entity', null, InputOption::VALUE_REQUIRED, 'The entity class name to initialize (shortcut notation)') + ->addOption('fields', null, InputOption::VALUE_REQUIRED, 'The fields to create with the new entity') + ->addOption('format', null, InputOption::VALUE_REQUIRED, 'Use the format for configuration files (php, xml, yml, or annotation)', 'annotation') + ->setHelp(<<%command.name% task generates a new Doctrine +entity inside a bundle: + +php %command.full_name% --entity=AcmeBlogBundle:Blog/Post + +The above command would initialize a new entity in the following entity +namespace Acme\BlogBundle\Entity\Blog\Post. + +You can also optionally specify the fields you want to generate in the new +entity: + +php %command.full_name% --entity=AcmeBlogBundle:Blog/Post --fields="title:string(255) body:text" + +By default, the command uses annotations for the mapping information; change it +with --format: + +php %command.full_name% --entity=AcmeBlogBundle:Blog/Post --format=yml + +To deactivate the interaction mode, simply use the --no-interaction option +without forgetting to pass all needed options: + +php %command.full_name% --entity=AcmeBlogBundle:Blog/Post --format=annotation --fields="title:string(255) body:text" --no-interaction + +This also has support for passing field specific attributes: + +php %command.full_name% --entity=AcmeBlogBundle:Blog/Post --format=annotation --fields="title:string(length=255 nullable=true unique=true) body:text ranking:decimal(precision:10 scale:0)" --no-interaction +EOT + ); + } + + /** + * @throws \InvalidArgumentException When the bundle doesn't end with Bundle (Example: "Bundle/MySampleBundle") + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $questionHelper = $this->getQuestionHelper(); + + $entity = Validators::validateEntityName($input->getOption('entity')); + list($bundle, $entity) = $this->parseShortcutNotation($entity); + $format = Validators::validateFormat($input->getOption('format')); + $fields = $this->parseFields($input->getOption('fields')); + + $questionHelper->writeSection($output, 'Entity generation'); + + $bundle = $this->getContainer()->get('kernel')->getBundle($bundle); + + /** @var DoctrineEntityGenerator $generator */ + $generator = $this->getGenerator(); + $generatorResult = $generator->generate($bundle, $entity, $format, array_values($fields)); + + $output->writeln(sprintf( + '> Generating entity class %s: OK!', + $this->makePathRelative($generatorResult->getEntityPath()) + )); + $output->writeln(sprintf( + '> Generating repository class %s: OK!', + $this->makePathRelative($generatorResult->getRepositoryPath()) + )); + if ($generatorResult->getMappingPath()) { + $output->writeln(sprintf( + '> Generating mapping file %s: OK!', + $this->makePathRelative($generatorResult->getMappingPath()) + )); + } + + $questionHelper->writeGeneratorSummary($output, array()); + } + + protected function interact(InputInterface $input, OutputInterface $output) + { + $questionHelper = $this->getQuestionHelper(); + $questionHelper->writeSection($output, 'Welcome to the Doctrine2 entity generator'); + + // namespace + $output->writeln(array( + '', + 'This command helps you generate Doctrine2 entities.', + '', + 'First, you need to give the entity name you want to generate.', + 'You must use the shortcut notation like AcmeBlogBundle:Post.', + '', + )); + + $bundleNames = array_keys($this->getContainer()->get('kernel')->getBundles()); + + while (true) { + $question = new Question($questionHelper->getQuestion('The Entity shortcut name', $input->getOption('entity')), $input->getOption('entity')); + $question->setValidator(array('Sensio\Bundle\GeneratorBundle\Command\Validators', 'validateEntityName')); + $question->setAutocompleterValues($bundleNames); + $entity = $questionHelper->ask($input, $output, $question); + + list($bundle, $entity) = $this->parseShortcutNotation($entity); + + // check reserved words + if ($this->getGenerator()->isReservedKeyword($entity)) { + $output->writeln(sprintf(' "%s" is a reserved word.', $entity)); + continue; + } + + try { + $b = $this->getContainer()->get('kernel')->getBundle($bundle); + + if (!file_exists($b->getPath().'/Entity/'.str_replace('\\', '/', $entity).'.php')) { + break; + } + + $output->writeln(sprintf('Entity "%s:%s" already exists.', $bundle, $entity)); + } catch (\Exception $e) { + $output->writeln(sprintf('Bundle "%s" does not exist.', $bundle)); + } + } + $input->setOption('entity', $bundle.':'.$entity); + + // format + $output->writeln(array( + '', + 'Determine the format to use for the mapping information.', + '', + )); + + $formats = array('yml', 'xml', 'php', 'annotation'); + + $question = new Question($questionHelper->getQuestion('Configuration format (yml, xml, php, or annotation)', $input->getOption('format')), $input->getOption('format')); + $question->setValidator(array('Sensio\Bundle\GeneratorBundle\Command\Validators', 'validateFormat')); + $question->setAutocompleterValues($formats); + $format = $questionHelper->ask($input, $output, $question); + $input->setOption('format', $format); + + // fields + $input->setOption('fields', $this->addFields($input, $output, $questionHelper)); + } + + private function parseFields($input) + { + if (is_array($input)) { + return $input; + } + + $fields = array(); + foreach (preg_split('{(?:\([^\(]*\))(*SKIP)(*F)|\s+}', $input) as $value) { + $elements = explode(':', $value); + $name = $elements[0]; + $fieldAttributes = array(); + if (strlen($name)) { + $fieldAttributes['fieldName'] = $name; + $type = isset($elements[1]) ? $elements[1] : 'string'; + preg_match_all('{(.*)\((.*)\)}', $type, $matches); + $fieldAttributes['type'] = isset($matches[1][0]) ? $matches[1][0] : $type; + $length = null; + if ('string' === $fieldAttributes['type']) { + $fieldAttributes['length'] = $length; + } + if (isset($matches[2][0]) && $length = $matches[2][0]) { + $attributesFound = array(); + if (false !== strpos($length, '=')) { + preg_match_all('{([^,= ]+)=([^,= ]+)}', $length, $result); + $attributesFound = array_combine($result[1], $result[2]); + } else { + $fieldAttributes['length'] = $length; + } + $fieldAttributes = array_merge($fieldAttributes, $attributesFound); + foreach (array('length', 'precision', 'scale') as $intAttribute) { + if (isset($fieldAttributes[$intAttribute])) { + $fieldAttributes[$intAttribute] = (int) $fieldAttributes[$intAttribute]; + } + } + foreach (array('nullable', 'unique') as $boolAttribute) { + if (isset($fieldAttributes[$boolAttribute])) { + $fieldAttributes[$boolAttribute] = filter_var($fieldAttributes[$boolAttribute], FILTER_VALIDATE_BOOLEAN); + } + } + } + + $fields[$name] = $fieldAttributes; + } + } + + return $fields; + } + + private function addFields(InputInterface $input, OutputInterface $output, QuestionHelper $questionHelper) + { + $fields = $this->parseFields($input->getOption('fields')); + $output->writeln(array( + '', + 'Instead of starting with a blank entity, you can add some fields now.', + 'Note that the primary key will be added automatically (named id).', + '', + )); + $output->write('Available types: '); + + $types = array_keys(Type::getTypesMap()); + $count = 20; + foreach ($types as $i => $type) { + if ($count > 50) { + $count = 0; + $output->writeln(''); + } + $count += strlen($type); + $output->write(sprintf('%s', $type)); + if (count($types) != $i + 1) { + $output->write(', '); + } else { + $output->write('.'); + } + } + $output->writeln(''); + + $fieldValidator = function ($type) use ($types) { + if (!in_array($type, $types)) { + throw new \InvalidArgumentException(sprintf('Invalid type "%s".', $type)); + } + + return $type; + }; + + $lengthValidator = function ($length) { + if (!$length) { + return $length; + } + + $result = filter_var($length, FILTER_VALIDATE_INT, array( + 'options' => array('min_range' => 1), + )); + + if (false === $result) { + throw new \InvalidArgumentException(sprintf('Invalid length "%s".', $length)); + } + + return $length; + }; + + $boolValidator = function ($value) { + if (null === $valueAsBool = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)) { + throw new \InvalidArgumentException(sprintf('Invalid bool value "%s".', $value)); + } + + return $valueAsBool; + }; + + $precisionValidator = function ($precision) { + if (!$precision) { + return $precision; + } + + $result = filter_var($precision, FILTER_VALIDATE_INT, array( + 'options' => array('min_range' => 1, 'max_range' => 65), + )); + + if (false === $result) { + throw new \InvalidArgumentException(sprintf('Invalid precision "%s".', $precision)); + } + + return $precision; + }; + + $scaleValidator = function ($scale) { + if (!$scale) { + return $scale; + } + + $result = filter_var($scale, FILTER_VALIDATE_INT, array( + 'options' => array('min_range' => 0, 'max_range' => 30), + )); + + if (false === $result) { + throw new \InvalidArgumentException(sprintf('Invalid scale "%s".', $scale)); + } + + return $scale; + }; + + while (true) { + $output->writeln(''); + $generator = $this->getGenerator(); + $question = new Question($questionHelper->getQuestion('New field name (press to stop adding fields)', null), null); + $question->setValidator(function ($name) use ($fields, $generator) { + if (isset($fields[$name]) || 'id' == $name) { + throw new \InvalidArgumentException(sprintf('Field "%s" is already defined.', $name)); + } + + // check reserved words + if ($generator->isReservedKeyword($name)) { + throw new \InvalidArgumentException(sprintf('Name "%s" is a reserved word.', $name)); + } + + // check for valid PHP variable name + if (!is_null($name) && !$generator->isValidPhpVariableName($name)) { + throw new \InvalidArgumentException(sprintf('"%s" is not a valid PHP variable name.', $name)); + } + + return $name; + }); + + $columnName = $questionHelper->ask($input, $output, $question); + if (!$columnName) { + break; + } + + $defaultType = 'string'; + + // try to guess the type by the column name prefix/suffix + if (substr($columnName, -3) == '_at') { + $defaultType = 'datetime'; + } elseif (substr($columnName, -3) == '_id') { + $defaultType = 'integer'; + } elseif (substr($columnName, 0, 3) == 'is_') { + $defaultType = 'boolean'; + } elseif (substr($columnName, 0, 4) == 'has_') { + $defaultType = 'boolean'; + } + + $question = new Question($questionHelper->getQuestion('Field type', $defaultType), $defaultType); + $question->setValidator($fieldValidator); + $question->setAutocompleterValues($types); + $type = $questionHelper->ask($input, $output, $question); + + $data = array('columnName' => $columnName, 'fieldName' => lcfirst(Container::camelize($columnName)), 'type' => $type); + + if ($type == 'string') { + $question = new Question($questionHelper->getQuestion('Field length', 255), 255); + $question->setValidator($lengthValidator); + $data['length'] = $questionHelper->ask($input, $output, $question); + } elseif ('decimal' === $type) { + // 10 is the default value given in \Doctrine\DBAL\Schema\Column::$_precision + $question = new Question($questionHelper->getQuestion('Precision', 10), 10); + $question->setValidator($precisionValidator); + $data['precision'] = $questionHelper->ask($input, $output, $question); + + // 0 is the default value given in \Doctrine\DBAL\Schema\Column::$_scale + $question = new Question($questionHelper->getQuestion('Scale', 0), 0); + $question->setValidator($scaleValidator); + $data['scale'] = $questionHelper->ask($input, $output, $question); + } + + $question = new Question($questionHelper->getQuestion('Is nullable', 'false'), false); + $question->setValidator($boolValidator); + $question->setAutocompleterValues(array('true', 'false')); + if ($nullable = $questionHelper->ask($input, $output, $question)) { + $data['nullable'] = $nullable; + } + + $question = new Question($questionHelper->getQuestion('Unique', 'false'), false); + $question->setValidator($boolValidator); + $question->setAutocompleterValues(array('true', 'false')); + if ($unique = $questionHelper->ask($input, $output, $question)) { + $data['unique'] = $unique; + } + + $fields[$columnName] = $data; + } + + return $fields; + } + + protected function createGenerator() + { + return new DoctrineEntityGenerator($this->getContainer()->get('filesystem'), $this->getContainer()->get('doctrine')); + } +} diff --git a/vendor/sensio/generator-bundle/Command/GenerateDoctrineFormCommand.php b/vendor/sensio/generator-bundle/Command/GenerateDoctrineFormCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..299de61026945ed6c35c4e5f26e0091d01d5cb6f --- /dev/null +++ b/vendor/sensio/generator-bundle/Command/GenerateDoctrineFormCommand.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Command\Command; +use Sensio\Bundle\GeneratorBundle\Generator\DoctrineFormGenerator; + +/** + * Generates a form type class for a given Doctrine entity. + * + * @author Fabien Potencier + * @author Hugo Hamon + */ +class GenerateDoctrineFormCommand extends GenerateDoctrineCommand +{ + /** + * @see Command + */ + protected function configure() + { + $this + ->setName('doctrine:generate:form') + ->setAliases(array('generate:doctrine:form')) + ->setDescription('Generates a form type class based on a Doctrine entity') + ->setDefinition(array( + new InputArgument('entity', InputArgument::REQUIRED, 'The entity class name to initialize (shortcut notation)'), + )) + ->setHelp(<<%command.name% command generates a form class based on a Doctrine entity. + +php %command.full_name% AcmeBlogBundle:Post + +Every generated file is based on a template. There are default templates but they can be overridden by placing custom templates in one of the following locations, by order of priority: + +BUNDLE_PATH/Resources/SensioGeneratorBundle/skeleton/form +APP_PATH/Resources/SensioGeneratorBundle/skeleton/form + +You can check https://github.com/sensio/SensioGeneratorBundle/tree/master/Resources/skeleton +in order to know the file structure of the skeleton +EOT + ) + ; + } + + /** + * @see Command + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $entity = Validators::validateEntityName($input->getArgument('entity')); + list($bundle, $entity) = $this->parseShortcutNotation($entity); + + $entityClass = $this->getContainer()->get('doctrine')->getAliasNamespace($bundle).'\\'.$entity; + $metadata = $this->getEntityMetadata($entityClass); + $bundle = $this->getApplication()->getKernel()->getBundle($bundle); + $generator = $this->getGenerator($bundle); + + $generator->generate($bundle, $entity, $metadata[0]); + + $output->writeln(sprintf( + 'The new %s.php class file has been created under %s.', + $generator->getClassName(), + $generator->getClassPath() + )); + } + + protected function createGenerator() + { + return new DoctrineFormGenerator($this->getContainer()->get('filesystem')); + } +} diff --git a/vendor/sensio/generator-bundle/Command/GeneratorCommand.php b/vendor/sensio/generator-bundle/Command/GeneratorCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..5f175f9ad48d85a3c11df6028de0a50a95888cdb --- /dev/null +++ b/vendor/sensio/generator-bundle/Command/GeneratorCommand.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Command; + +use Symfony\Component\HttpKernel\Bundle\BundleInterface; +use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Sensio\Bundle\GeneratorBundle\Generator\Generator; +use Sensio\Bundle\GeneratorBundle\Command\Helper\QuestionHelper; + +/** + * Base class for generator commands. + * + * @author Fabien Potencier + */ +abstract class GeneratorCommand extends ContainerAwareCommand +{ + /** + * @var Generator + */ + private $generator; + + // only useful for unit tests + public function setGenerator(Generator $generator) + { + $this->generator = $generator; + } + + abstract protected function createGenerator(); + + protected function getGenerator(BundleInterface $bundle = null) + { + if (null === $this->generator) { + $this->generator = $this->createGenerator(); + $this->generator->setSkeletonDirs($this->getSkeletonDirs($bundle)); + } + + return $this->generator; + } + + protected function getSkeletonDirs(BundleInterface $bundle = null) + { + $skeletonDirs = array(); + + if (isset($bundle) && is_dir($dir = $bundle->getPath().'/Resources/SensioGeneratorBundle/skeleton')) { + $skeletonDirs[] = $dir; + } + + if (is_dir($dir = $this->getContainer()->get('kernel')->getRootdir().'/Resources/SensioGeneratorBundle/skeleton')) { + $skeletonDirs[] = $dir; + } + + $skeletonDirs[] = __DIR__.'/../Resources/skeleton'; + $skeletonDirs[] = __DIR__.'/../Resources'; + + return $skeletonDirs; + } + + protected function getQuestionHelper() + { + $question = $this->getHelperSet()->get('question'); + if (!$question || get_class($question) !== 'Sensio\Bundle\GeneratorBundle\Command\Helper\QuestionHelper') { + $this->getHelperSet()->set($question = new QuestionHelper()); + } + + return $question; + } + + /** + * Tries to make a path relative to the project, which prints nicer. + * + * @param string $absolutePath + * + * @return string + */ + protected function makePathRelative($absolutePath) + { + $projectRootDir = dirname($this->getContainer()->getParameter('kernel.root_dir')); + + return str_replace($projectRootDir.'/', '', realpath($absolutePath) ?: $absolutePath); + } +} diff --git a/vendor/sensio/generator-bundle/Command/Helper/QuestionHelper.php b/vendor/sensio/generator-bundle/Command/Helper/QuestionHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..b4d3e59343f529e7acbd112b152fe022b7fde43e --- /dev/null +++ b/vendor/sensio/generator-bundle/Command/Helper/QuestionHelper.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 Sensio\Bundle\GeneratorBundle\Command\Helper; + +use Symfony\Component\Console\Helper\QuestionHelper as BaseQuestionHelper; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Generates bundles. + * + * @author Fabien Potencier + */ +class QuestionHelper extends BaseQuestionHelper +{ + public function writeGeneratorSummary(OutputInterface $output, $errors) + { + if (!$errors) { + $this->writeSection($output, 'Everything is OK! Now get to work :).'); + } else { + $this->writeSection($output, array( + 'The command was not able to configure everything automatically.', + 'You\'ll need to make the following changes manually.', + ), 'error'); + + $output->writeln($errors); + } + } + + public function getRunner(OutputInterface $output, &$errors) + { + $runner = function ($err) use ($output, &$errors) { + if ($err) { + $output->writeln('FAILED'); + $errors = array_merge($errors, $err); + } else { + $output->writeln('OK'); + } + }; + + return $runner; + } + + public function writeSection(OutputInterface $output, $text, $style = 'bg=blue;fg=white') + { + $output->writeln(array( + '', + $this->getHelperSet()->get('formatter')->formatBlock($text, $style, true), + '', + )); + } + + public function getQuestion($question, $default, $sep = ':') + { + return $default ? sprintf('%s [%s]%s ', $question, $default, $sep) : sprintf('%s%s ', $question, $sep); + } +} diff --git a/vendor/sensio/generator-bundle/Command/Validators.php b/vendor/sensio/generator-bundle/Command/Validators.php new file mode 100644 index 0000000000000000000000000000000000000000..7fd18a30291e24afabb9c8d962d3244169e8d743 --- /dev/null +++ b/vendor/sensio/generator-bundle/Command/Validators.php @@ -0,0 +1,210 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Command; + +/** + * Validator functions. + * + * @author Fabien Potencier + */ +class Validators +{ + /** + * Validates that the given namespace (e.g. Acme\FooBundle) is a valid format. + * + * If $requireVendorNamespace is true, then we require you to have a vendor + * namespace (e.g. Acme). + * + * @param $namespace + * @param bool $requireVendorNamespace + * + * @return string + */ + public static function validateBundleNamespace($namespace, $requireVendorNamespace = true) + { + if (!preg_match('/Bundle$/', $namespace)) { + throw new \InvalidArgumentException('The namespace must end with Bundle.'); + } + + $namespace = strtr($namespace, '/', '\\'); + if (!preg_match('/^(?:[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\\?)+$/', $namespace)) { + throw new \InvalidArgumentException('The namespace contains invalid characters.'); + } + + // validate reserved keywords + $reserved = self::getReservedWords(); + foreach (explode('\\', $namespace) as $word) { + if (in_array(strtolower($word), $reserved)) { + throw new \InvalidArgumentException(sprintf('The namespace cannot contain PHP reserved words ("%s").', $word)); + } + } + + // validate that the namespace is at least one level deep + if ($requireVendorNamespace && false === strpos($namespace, '\\')) { + $msg = array(); + $msg[] = sprintf('The namespace must contain a vendor namespace (e.g. "VendorName\%s" instead of simply "%s").', $namespace, $namespace); + $msg[] = 'If you\'ve specified a vendor namespace, did you forget to surround it with quotes (init:bundle "Acme\BlogBundle")?'; + + throw new \InvalidArgumentException(implode("\n\n", $msg)); + } + + return $namespace; + } + + public static function validateBundleName($bundle) + { + if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $bundle)) { + throw new \InvalidArgumentException(sprintf('The bundle name %s contains invalid characters.', $bundle)); + } + + if (!preg_match('/Bundle$/', $bundle)) { + throw new \InvalidArgumentException('The bundle name must end with Bundle.'); + } + + return $bundle; + } + + public static function validateControllerName($controller) + { + try { + self::validateEntityName($controller); + } catch (\InvalidArgumentException $e) { + throw new \InvalidArgumentException( + sprintf( + 'The controller name must contain a : ("%s" given, expecting something like AcmeBlogBundle:Post)', + $controller + ) + ); + } + + return $controller; + } + + public static function validateFormat($format) + { + if (!$format) { + throw new \RuntimeException('Please enter a configuration format.'); + } + + $format = strtolower($format); + + // in case they typed "yaml", but ok with that + if ($format == 'yaml') { + $format = 'yml'; + } + + if (!in_array($format, array('php', 'xml', 'yml', 'annotation'))) { + throw new \RuntimeException(sprintf('Format "%s" is not supported.', $format)); + } + + return $format; + } + + /** + * Performs basic checks in entity name. + * + * @param string $entity + * + * @return string + * + * @throws \InvalidArgumentException + */ + public static function validateEntityName($entity) + { + if (!preg_match('{^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*:[a-zA-Z0-9_\x7f-\xff\\\/]+$}', $entity)) { + throw new \InvalidArgumentException(sprintf('The entity name isn\'t valid ("%s" given, expecting something like AcmeBlogBundle:Blog/Post)', $entity)); + } + + return $entity; + } + + public static function getReservedWords() + { + return array( + 'abstract', + 'and', + 'array', + 'as', + 'break', + 'callable', + 'case', + 'catch', + 'class', + 'clone', + 'const', + 'continue', + 'declare', + 'default', + 'do', + 'else', + 'elseif', + 'enddeclare', + 'endfor', + 'endforeach', + 'endif', + 'endswitch', + 'endwhile', + 'extends', + 'final', + 'finally', + 'for', + 'foreach', + 'function', + 'global', + 'goto', + 'if', + 'implements', + 'interface', + 'instanceof', + 'insteadof', + 'namespace', + 'new', + 'or', + 'private', + 'protected', + 'public', + 'static', + 'switch', + 'throw', + 'trait', + 'try', + 'use', + 'var', + 'while', + 'xor', + 'yield', + '__CLASS__', + '__DIR__', + '__FILE__', + '__LINE__', + '__FUNCTION__', + '__METHOD__', + '__NAMESPACE__', + '__TRAIT__', + '__halt_compiler', + 'die', + 'echo', + 'empty', + 'exit', + 'eval', + 'include', + 'include_once', + 'isset', + 'list', + 'require', + 'require_once', + 'return', + 'print', + 'unset', + ); + } +} diff --git a/vendor/sensio/generator-bundle/Generator/BundleGenerator.php b/vendor/sensio/generator-bundle/Generator/BundleGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..d49bce5325a0ea7b4ec37d76ffffba931b35f2fd --- /dev/null +++ b/vendor/sensio/generator-bundle/Generator/BundleGenerator.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Generator; + +use Sensio\Bundle\GeneratorBundle\Model\Bundle; +use Symfony\Component\Filesystem\Filesystem; + +/** + * Generates a bundle. + * + * @author Fabien Potencier + */ +class BundleGenerator extends Generator +{ + private $filesystem; + + public function __construct(Filesystem $filesystem) + { + $this->filesystem = $filesystem; + } + + public function generateBundle(Bundle $bundle) + { + $dir = $bundle->getTargetDirectory(); + + if (file_exists($dir)) { + if (!is_dir($dir)) { + throw new \RuntimeException(sprintf('Unable to generate the bundle as the target directory "%s" exists but is a file.', realpath($dir))); + } + $files = scandir($dir); + if ($files != array('.', '..')) { + throw new \RuntimeException(sprintf('Unable to generate the bundle as the target directory "%s" is not empty.', realpath($dir))); + } + if (!is_writable($dir)) { + throw new \RuntimeException(sprintf('Unable to generate the bundle as the target directory "%s" is not writable.', realpath($dir))); + } + } + + $parameters = array( + 'namespace' => $bundle->getNamespace(), + 'bundle' => $bundle->getName(), + 'format' => $bundle->getConfigurationFormat(), + 'bundle_basename' => $bundle->getBasename(), + 'extension_alias' => $bundle->getExtensionAlias(), + ); + + $this->renderFile('bundle/Bundle.php.twig', $dir.'/'.$bundle->getName().'.php', $parameters); + if ($bundle->shouldGenerateDependencyInjectionDirectory()) { + $this->renderFile('bundle/Extension.php.twig', $dir.'/DependencyInjection/'.$bundle->getBasename().'Extension.php', $parameters); + $this->renderFile('bundle/Configuration.php.twig', $dir.'/DependencyInjection/Configuration.php', $parameters); + } + $this->renderFile('bundle/DefaultController.php.twig', $dir.'/Controller/DefaultController.php', $parameters); + $this->renderFile('bundle/DefaultControllerTest.php.twig', $bundle->getTestsDirectory().'/Controller/DefaultControllerTest.php', $parameters); + $this->renderFile('bundle/index.html.twig.twig', $dir.'/Resources/views/Default/index.html.twig', $parameters); + + // render the services.yml/xml file + $servicesFilename = $bundle->getServicesConfigurationFilename(); + $this->renderFile( + sprintf('bundle/%s.twig', $servicesFilename), + $dir.'/Resources/config/'.$servicesFilename, $parameters + ); + + if ($routingFilename = $bundle->getRoutingConfigurationFilename()) { + $this->renderFile( + sprintf('bundle/%s.twig', $routingFilename), + $dir.'/Resources/config/'.$routingFilename, $parameters + ); + } + } +} diff --git a/vendor/sensio/generator-bundle/Generator/CommandGenerator.php b/vendor/sensio/generator-bundle/Generator/CommandGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..09e90038605e816ae31174c1dab835cd2ee06239 --- /dev/null +++ b/vendor/sensio/generator-bundle/Generator/CommandGenerator.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Generator; + +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; + +/** + * Generates a Command inside a bundle. + * + * @author Javier Eguiluz + */ +class CommandGenerator extends Generator +{ + private $filesystem; + + public function __construct(Filesystem $filesystem) + { + $this->filesystem = $filesystem; + } + + public function generate(BundleInterface $bundle, $name) + { + $bundleDir = $bundle->getPath(); + $commandDir = $bundleDir.'/Command'; + self::mkdir($commandDir); + + $commandClassName = $this->classify($name).'Command'; + $commandFile = $commandDir.'/'.$commandClassName.'.php'; + if ($this->filesystem->exists($commandFile)) { + throw new \RuntimeException(sprintf('Command "%s" already exists', $name)); + } + + $parameters = array( + 'namespace' => $bundle->getNamespace(), + 'class_name' => $commandClassName, + 'name' => $name, + ); + + $this->renderFile('command/Command.php.twig', $commandFile, $parameters); + } + + /** + * Transforms the given string to a new string valid as a PHP class name + * ('app:my-project' -> 'AppMyProject', 'app:namespace:name' -> 'AppNamespaceName'). + * + * @param string $string + * + * @return string The string transformed to be a valid PHP class name + */ + public function classify($string) + { + return str_replace(' ', '', ucwords(strtr($string, '_-:', ' '))); + } +} diff --git a/vendor/sensio/generator-bundle/Generator/ControllerGenerator.php b/vendor/sensio/generator-bundle/Generator/ControllerGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..86269643a7acb7b65938dbeb9a0d49df594f957e --- /dev/null +++ b/vendor/sensio/generator-bundle/Generator/ControllerGenerator.php @@ -0,0 +1,196 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Generator; + +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; + +/** + * Generates a Controller inside a bundle. + * + * @author Wouter J + */ +class ControllerGenerator extends Generator +{ + private $filesystem; + + public function __construct(Filesystem $filesystem) + { + $this->filesystem = $filesystem; + } + + public function generate(BundleInterface $bundle, $controller, $routeFormat, $templateFormat, array $actions = array()) + { + $dir = $bundle->getPath(); + $controllerFile = $dir.'/Controller/'.$controller.'Controller.php'; + if (file_exists($controllerFile)) { + throw new \RuntimeException(sprintf('Controller "%s" already exists', $controller)); + } + + $parameters = array( + 'namespace' => $bundle->getNamespace(), + 'bundle' => $bundle->getName(), + 'format' => array( + 'routing' => $routeFormat, + 'templating' => $templateFormat, + ), + 'controller' => $controller, + ); + + foreach ($actions as $i => $action) { + // get the action name without the suffix Action (for the template logical name) + $actions[$i]['basename'] = substr($action['name'], 0, -6); + $params = $parameters; + $params['action'] = $actions[$i]; + + // create a template + $template = $actions[$i]['template']; + if ('default' == $template) { + @trigger_error('The use of the "default" keyword is deprecated. Use the real template name instead.', E_USER_DEPRECATED); + $template = $bundle->getName().':'.$controller.':'. + strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr(substr($action['name'], 0, -6), '_', '.'))) + .'.html.'.$templateFormat; + } + + if ('twig' == $templateFormat) { + $this->renderFile('controller/Template.html.twig.twig', $dir.'/Resources/views/'.$this->parseTemplatePath($template), $params); + } else { + $this->renderFile('controller/Template.html.php.twig', $dir.'/Resources/views/'.$this->parseTemplatePath($template), $params); + } + + $this->generateRouting($bundle, $controller, $actions[$i], $routeFormat); + } + + $parameters['actions'] = $actions; + + $this->renderFile('controller/Controller.php.twig', $controllerFile, $parameters); + $this->renderFile('controller/ControllerTest.php.twig', $dir.'/Tests/Controller/'.$controller.'ControllerTest.php', $parameters); + } + + public function generateRouting(BundleInterface $bundle, $controller, array $action, $format) + { + // annotation is generated in the templates + if ('annotation' == $format) { + return true; + } + + $file = $bundle->getPath().'/Resources/config/routing.'.$format; + if (file_exists($file)) { + $content = file_get_contents($file); + } elseif (!is_dir($dir = $bundle->getPath().'/Resources/config')) { + self::mkdir($dir); + } + + $controller = $bundle->getName().':'.$controller.':'.$action['basename']; + $name = strtolower(preg_replace('/([A-Z])/', '_\\1', $action['basename'])); + + if ('yml' == $format) { + // yaml + if (!isset($content)) { + $content = ''; + } + + $content .= sprintf( + "\n%s:\n path: %s\n defaults: { _controller: %s }\n", + $name, + $action['route'], + $controller + ); + } elseif ('xml' == $format) { + // xml + if (!isset($content)) { + // new file + $content = << + + +EOT; + } + + $sxe = simplexml_load_string($content); + + $route = $sxe->addChild('route'); + $route->addAttribute('id', $name); + $route->addAttribute('path', $action['route']); + + $default = $route->addChild('default', $controller); + $default->addAttribute('key', '_controller'); + + $dom = new \DOMDocument('1.0'); + $dom->preserveWhiteSpace = false; + $dom->formatOutput = true; + $dom->loadXML($sxe->asXML()); + $content = $dom->saveXML(); + } elseif ('php' == $format) { + // php + if (isset($content)) { + // edit current file + $pointer = strpos($content, 'return'); + if (!preg_match('/(\$[^ ]*).*?new RouteCollection\(\)/', $content, $collection) || false === $pointer) { + throw new \RuntimeException('Routing.php file is not correct, please initialize RouteCollection.'); + } + + $content = substr($content, 0, $pointer); + $content .= sprintf("%s->add('%s', new Route('%s', array(", $collection[1], $name, $action['route']); + $content .= sprintf("\n '_controller' => '%s',", $controller); + $content .= "\n)));\n\nreturn ".$collection[1].';'; + } else { + // new file + $content = <<add('%s', new Route('%s', array(", $name, $action['route']); + $content .= sprintf("\n '_controller' => '%s',", $controller); + $content .= "\n)));\n\nreturn \$collection;"; + } + } + + $flink = fopen($file, 'w'); + if ($flink) { + $write = fwrite($flink, $content); + + if ($write) { + fclose($flink); + } else { + throw new \RuntimeException(sprintf('We cannot write into file "%s", has that file the correct access level?', $file)); + } + } else { + throw new \RuntimeException(sprintf('Problems with generating file "%s", did you gave write access to that directory?', $file)); + } + } + + protected function parseTemplatePath($template) + { + $data = $this->parseLogicalTemplateName($template); + + return $data['controller'].'/'.$data['template']; + } + + protected function parseLogicalTemplateName($logicalName, $part = '') + { + if (2 !== substr_count($logicalName, ':')) { + throw new \RuntimeException(sprintf('The given template name ("%s") is not correct (it must contain two colons).', $logicalName)); + } + + $data = array(); + + list($data['bundle'], $data['controller'], $data['template']) = explode(':', $logicalName); + + return $part ? $data[$part] : $data; + } +} diff --git a/vendor/sensio/generator-bundle/Generator/DoctrineCrudGenerator.php b/vendor/sensio/generator-bundle/Generator/DoctrineCrudGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..ef7bdbd5005f44bb5819cd6e1b6f28e6da835d45 --- /dev/null +++ b/vendor/sensio/generator-bundle/Generator/DoctrineCrudGenerator.php @@ -0,0 +1,314 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Generator; + +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; +use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\Common\Inflector\Inflector; + +/** + * Generates a CRUD controller. + * + * @author Fabien Potencier + */ +class DoctrineCrudGenerator extends Generator +{ + protected $filesystem; + protected $rootDir; + protected $routePrefix; + protected $routeNamePrefix; + protected $bundle; + protected $entity; + protected $entitySingularized; + protected $entityPluralized; + protected $metadata; + protected $format; + protected $actions; + + /** + * @param Filesystem $filesystem + * @param string $rootDir + */ + public function __construct(Filesystem $filesystem, $rootDir) + { + $this->filesystem = $filesystem; + $this->rootDir = $rootDir; + } + + /** + * Generate the CRUD controller. + * + * @param BundleInterface $bundle A bundle object + * @param string $entity The entity relative class name + * @param ClassMetadataInfo $metadata The entity class metadata + * @param string $format The configuration format (xml, yaml, annotation) + * @param string $routePrefix The route name prefix + * @param bool $needWriteActions Whether or not to generate write actions + * @param bool $forceOverwrite Whether or not to overwrite the controller + * + * @throws \RuntimeException + */ + public function generate(BundleInterface $bundle, $entity, ClassMetadataInfo $metadata, $format, $routePrefix, $needWriteActions, $forceOverwrite) + { + $this->routePrefix = $routePrefix; + $this->routeNamePrefix = self::getRouteNamePrefix($routePrefix); + $this->actions = $needWriteActions ? array('index', 'show', 'new', 'edit', 'delete') : array('index', 'show'); + + if (count($metadata->identifier) != 1) { + throw new \RuntimeException('The CRUD generator does not support entity classes with multiple or no primary keys.'); + } + + $this->entity = $entity; + $entity = str_replace('\\', '/', $entity); + $entityParts = explode('/', $entity); + $entityName = end($entityParts); + $this->entitySingularized = lcfirst(Inflector::singularize($entityName)); + $this->entityPluralized = lcfirst(Inflector::pluralize($entityName)); + $this->bundle = $bundle; + $this->metadata = $metadata; + $this->setFormat($format); + + $this->generateControllerClass($forceOverwrite); + + $dir = sprintf('%s/Resources/views/%s', $this->rootDir, strtolower($entity)); + + if (!file_exists($dir)) { + self::mkdir($dir); + } + + $this->generateIndexView($dir); + + if (in_array('show', $this->actions)) { + $this->generateShowView($dir); + } + + if (in_array('new', $this->actions)) { + $this->generateNewView($dir); + } + + if (in_array('edit', $this->actions)) { + $this->generateEditView($dir); + } + + $this->generateTestClass(); + $this->generateConfiguration(); + } + + /** + * Sets the configuration format. + * + * @param string $format The configuration format + */ + protected function setFormat($format) + { + switch ($format) { + case 'yml': + case 'xml': + case 'php': + case 'annotation': + $this->format = $format; + break; + default: + $this->format = 'yml'; + break; + } + } + + /** + * Generates the routing configuration. + */ + protected function generateConfiguration() + { + if (!in_array($this->format, array('yml', 'xml', 'php'))) { + return; + } + + $target = sprintf( + '%s/Resources/config/routing/%s.%s', + $this->bundle->getPath(), + strtolower(str_replace('\\', '_', $this->entity)), + $this->format + ); + + $this->renderFile('crud/config/routing.'.$this->format.'.twig', $target, array( + 'actions' => $this->actions, + 'route_prefix' => $this->routePrefix, + 'route_name_prefix' => $this->routeNamePrefix, + 'bundle' => $this->bundle->getName(), + 'entity' => $this->entity, + )); + } + + /** + * Generates the controller class only. + */ + protected function generateControllerClass($forceOverwrite) + { + $dir = $this->bundle->getPath(); + + $parts = explode('\\', $this->entity); + $entityClass = array_pop($parts); + $entityNamespace = implode('\\', $parts); + + $target = sprintf( + '%s/Controller/%s/%sController.php', + $dir, + str_replace('\\', '/', $entityNamespace), + $entityClass + ); + + if (!$forceOverwrite && file_exists($target)) { + throw new \RuntimeException('Unable to generate the controller as it already exists.'); + } + + $this->renderFile('crud/controller.php.twig', $target, array( + 'actions' => $this->actions, + 'route_prefix' => $this->routePrefix, + 'route_name_prefix' => $this->routeNamePrefix, + 'bundle' => $this->bundle->getName(), + 'entity' => $this->entity, + 'entity_singularized' => $this->entitySingularized, + 'entity_pluralized' => $this->entityPluralized, + 'entity_class' => $entityClass, + 'namespace' => $this->bundle->getNamespace(), + 'entity_namespace' => $entityNamespace, + 'format' => $this->format, + // BC with Symfony 2.7 + 'use_form_type_instance' => !method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix'), + )); + } + + /** + * Generates the functional test class only. + */ + protected function generateTestClass() + { + $parts = explode('\\', $this->entity); + $entityClass = array_pop($parts); + $entityNamespace = implode('\\', $parts); + + $dir = $this->bundle->getPath().'/Tests/Controller'; + $target = $dir.'/'.str_replace('\\', '/', $entityNamespace).'/'.$entityClass.'ControllerTest.php'; + + $this->renderFile('crud/tests/test.php.twig', $target, array( + 'route_prefix' => $this->routePrefix, + 'route_name_prefix' => $this->routeNamePrefix, + 'entity' => $this->entity, + 'bundle' => $this->bundle->getName(), + 'entity_class' => $entityClass, + 'namespace' => $this->bundle->getNamespace(), + 'entity_namespace' => $entityNamespace, + 'actions' => $this->actions, + 'form_type_name' => strtolower(str_replace('\\', '_', $this->bundle->getNamespace()).($parts ? '_' : '').implode('_', $parts).'_'.$entityClass), + )); + } + + /** + * Generates the index.html.twig template in the final bundle. + * + * @param string $dir The path to the folder that hosts templates in the bundle + */ + protected function generateIndexView($dir) + { + $this->renderFile('crud/views/index.html.twig.twig', $dir.'/index.html.twig', array( + 'bundle' => $this->bundle->getName(), + 'entity' => $this->entity, + 'entity_pluralized' => $this->entityPluralized, + 'entity_singularized' => $this->entitySingularized, + 'identifier' => $this->metadata->identifier[0], + 'fields' => $this->metadata->fieldMappings, + 'actions' => $this->actions, + 'record_actions' => $this->getRecordActions(), + 'route_prefix' => $this->routePrefix, + 'route_name_prefix' => $this->routeNamePrefix, + )); + } + + /** + * Generates the show.html.twig template in the final bundle. + * + * @param string $dir The path to the folder that hosts templates in the bundle + */ + protected function generateShowView($dir) + { + $this->renderFile('crud/views/show.html.twig.twig', $dir.'/show.html.twig', array( + 'bundle' => $this->bundle->getName(), + 'entity' => $this->entity, + 'entity_singularized' => $this->entitySingularized, + 'identifier' => $this->metadata->identifier[0], + 'fields' => $this->metadata->fieldMappings, + 'actions' => $this->actions, + 'route_prefix' => $this->routePrefix, + 'route_name_prefix' => $this->routeNamePrefix, + )); + } + + /** + * Generates the new.html.twig template in the final bundle. + * + * @param string $dir The path to the folder that hosts templates in the bundle + */ + protected function generateNewView($dir) + { + $this->renderFile('crud/views/new.html.twig.twig', $dir.'/new.html.twig', array( + 'bundle' => $this->bundle->getName(), + 'entity' => $this->entity, + 'entity_singularized' => $this->entitySingularized, + 'route_prefix' => $this->routePrefix, + 'route_name_prefix' => $this->routeNamePrefix, + 'actions' => $this->actions, + 'fields' => $this->metadata->fieldMappings, + )); + } + + /** + * Generates the edit.html.twig template in the final bundle. + * + * @param string $dir The path to the folder that hosts templates in the bundle + */ + protected function generateEditView($dir) + { + $this->renderFile('crud/views/edit.html.twig.twig', $dir.'/edit.html.twig', array( + 'route_prefix' => $this->routePrefix, + 'route_name_prefix' => $this->routeNamePrefix, + 'identifier' => $this->metadata->identifier[0], + 'entity' => $this->entity, + 'entity_singularized' => $this->entitySingularized, + 'fields' => $this->metadata->fieldMappings, + 'bundle' => $this->bundle->getName(), + 'actions' => $this->actions, + )); + } + + /** + * Returns an array of record actions to generate (edit, show). + * + * @return array + */ + protected function getRecordActions() + { + return array_filter($this->actions, function ($item) { + return in_array($item, array('show', 'edit')); + }); + } + + public static function getRouteNamePrefix($prefix) + { + $prefix = preg_replace('/{(.*?)}/', '', $prefix); // {foo}_bar -> _bar + $prefix = str_replace('/', '_', $prefix); + $prefix = preg_replace('/_+/', '_', $prefix); // foo__bar -> foo_bar + $prefix = trim($prefix, '_'); + + return $prefix; + } +} diff --git a/vendor/sensio/generator-bundle/Generator/DoctrineEntityGenerator.php b/vendor/sensio/generator-bundle/Generator/DoctrineEntityGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..b6c5d6f41ee7d783a6b4249a87f48a3110d92ad7 --- /dev/null +++ b/vendor/sensio/generator-bundle/Generator/DoctrineEntityGenerator.php @@ -0,0 +1,150 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Generator; + +use Sensio\Bundle\GeneratorBundle\Model\EntityGeneratorResult; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; +use Symfony\Bridge\Doctrine\RegistryInterface; +use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\ORM\Tools\EntityGenerator; +use Doctrine\ORM\Tools\EntityRepositoryGenerator; +use Doctrine\ORM\Tools\Export\ClassMetadataExporter; +use Doctrine\Common\Util\Inflector; + +/** + * Generates a Doctrine entity class based on its name, fields and format. + * + * @author Fabien Potencier + * @author Jonathan H. Wage + */ +class DoctrineEntityGenerator extends Generator +{ + private $filesystem; + private $registry; + + public function __construct(Filesystem $filesystem, RegistryInterface $registry) + { + $this->filesystem = $filesystem; + $this->registry = $registry; + } + + /** + * @param BundleInterface $bundle + * @param string $entity + * @param string $format + * @param array $fields + * + * @return EntityGeneratorResult + * + * @throws \Doctrine\ORM\Tools\Export\ExportException + */ + public function generate(BundleInterface $bundle, $entity, $format, array $fields) + { + // configure the bundle (needed if the bundle does not contain any Entities yet) + $config = $this->registry->getManager(null)->getConfiguration(); + $config->setEntityNamespaces(array_merge( + array($bundle->getName() => $bundle->getNamespace().'\\Entity'), + $config->getEntityNamespaces() + )); + + $entityClass = $this->registry->getAliasNamespace($bundle->getName()).'\\'.$entity; + $entityPath = $bundle->getPath().'/Entity/'.str_replace('\\', '/', $entity).'.php'; + if (file_exists($entityPath)) { + throw new \RuntimeException(sprintf('Entity "%s" already exists.', $entityClass)); + } + + $class = new ClassMetadataInfo($entityClass, $config->getNamingStrategy()); + $class->customRepositoryClassName = str_replace('\\Entity\\', '\\Repository\\', $entityClass).'Repository'; + $class->mapField(array('fieldName' => 'id', 'type' => 'integer', 'id' => true)); + $class->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO); + foreach ($fields as $field) { + $class->mapField($field); + } + + $entityGenerator = $this->getEntityGenerator(); + if ('annotation' === $format) { + $entityGenerator->setGenerateAnnotations(true); + $class->setPrimaryTable(array('name' => Inflector::tableize(str_replace('\\', '', $entity)))); + $entityCode = $entityGenerator->generateEntityClass($class); + $mappingPath = $mappingCode = false; + } else { + $cme = new ClassMetadataExporter(); + $exporter = $cme->getExporter('yml' == $format ? 'yaml' : $format); + $mappingPath = $bundle->getPath().'/Resources/config/doctrine/'.str_replace('\\', '.', $entity).'.orm.'.$format; + + if (file_exists($mappingPath)) { + throw new \RuntimeException(sprintf('Cannot generate entity when mapping "%s" already exists.', $mappingPath)); + } + + $mappingCode = $exporter->exportClassMetadata($class); + $entityGenerator->setGenerateAnnotations(false); + $entityCode = $entityGenerator->generateEntityClass($class); + } + $entityCode = str_replace( + array("@var integer\n", "@var boolean\n", "@param integer\n", "@param boolean\n", "@return integer\n", "@return boolean\n"), + array("@var int\n", "@var bool\n", "@param int\n", "@param bool\n", "@return int\n", "@return bool\n"), + $entityCode + ); + + self::mkdir(dirname($entityPath)); + self::dump($entityPath, $entityCode); + + if ($mappingPath) { + self::mkdir(dirname($mappingPath)); + self::dump($mappingPath, $mappingCode); + } + + $path = $bundle->getPath().str_repeat('/..', substr_count(get_class($bundle), '\\')); + $this->getRepositoryGenerator()->writeEntityRepositoryClass($class->customRepositoryClassName, $path); + $repositoryPath = $path.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $class->customRepositoryClassName).'.php'; + + return new EntityGeneratorResult($entityPath, $repositoryPath, $mappingPath); + } + + public function isReservedKeyword($keyword) + { + return $this->registry->getConnection()->getDatabasePlatform()->getReservedKeywordsList()->isKeyword($keyword); + } + + protected function getEntityGenerator() + { + $entityGenerator = new EntityGenerator(); + $entityGenerator->setGenerateAnnotations(false); + $entityGenerator->setGenerateStubMethods(true); + $entityGenerator->setRegenerateEntityIfExists(false); + $entityGenerator->setUpdateEntityIfExists(true); + $entityGenerator->setNumSpaces(4); + $entityGenerator->setAnnotationPrefix('ORM\\'); + + return $entityGenerator; + } + + protected function getRepositoryGenerator() + { + return new EntityRepositoryGenerator(); + } + + /** + * Checks if the given name is a valid PHP variable name. + * + * @see http://php.net/manual/en/language.variables.basics.php + * + * @param $name string + * + * @return bool + */ + public function isValidPhpVariableName($name) + { + return (bool) preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name, $matches); + } +} diff --git a/vendor/sensio/generator-bundle/Generator/DoctrineFormGenerator.php b/vendor/sensio/generator-bundle/Generator/DoctrineFormGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..3933a478c50caab4b58c0f3e460a4e6001067e87 --- /dev/null +++ b/vendor/sensio/generator-bundle/Generator/DoctrineFormGenerator.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Generator; + +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; +use Doctrine\ORM\Mapping\ClassMetadataInfo; + +/** + * Generates a form class based on a Doctrine entity. + * + * @author Fabien Potencier + * @author Hugo Hamon + */ +class DoctrineFormGenerator extends Generator +{ + private $filesystem; + private $className; + private $classPath; + + /** + * Constructor. + * + * @param Filesystem $filesystem A Filesystem instance + */ + public function __construct(Filesystem $filesystem) + { + $this->filesystem = $filesystem; + } + + public function getClassName() + { + return $this->className; + } + + public function getClassPath() + { + return $this->classPath; + } + + /** + * Generates the entity form class. + * + * @param BundleInterface $bundle The bundle in which to create the class + * @param string $entity The entity relative class name + * @param ClassMetadataInfo $metadata The entity metadata class + * @param bool $forceOverwrite If true, remove any existing form class before generating it again + */ + public function generate(BundleInterface $bundle, $entity, ClassMetadataInfo $metadata, $forceOverwrite = false) + { + $parts = explode('\\', $entity); + $entityClass = array_pop($parts); + + $this->className = $entityClass.'Type'; + $dirPath = $bundle->getPath().'/Form'; + $this->classPath = $dirPath.'/'.str_replace('\\', '/', $entity).'Type.php'; + + if (!$forceOverwrite && file_exists($this->classPath)) { + throw new \RuntimeException(sprintf('Unable to generate the %s form class as it already exists under the %s file', $this->className, $this->classPath)); + } + + if (count($metadata->identifier) > 1) { + throw new \RuntimeException('The form generator does not support entity classes with multiple primary keys.'); + } + + $parts = explode('\\', $entity); + array_pop($parts); + + $this->renderFile('form/FormType.php.twig', $this->classPath, array( + 'fields' => $this->getFieldsFromMetadata($metadata), + 'namespace' => $bundle->getNamespace(), + 'entity_namespace' => implode('\\', $parts), + 'entity_class' => $entityClass, + 'bundle' => $bundle->getName(), + 'form_class' => $this->className, + 'form_type_name' => strtolower(str_replace('\\', '_', $bundle->getNamespace()).($parts ? '_' : '').implode('_', $parts).'_'.substr($this->className, 0, -4)), + // BC with Symfony 2.7 + 'get_name_required' => !method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix'), + )); + } + + /** + * Returns an array of fields. Fields can be both column fields and + * association fields. + * + * @param ClassMetadataInfo $metadata + * + * @return array $fields + */ + private function getFieldsFromMetadata(ClassMetadataInfo $metadata) + { + $fields = (array) $metadata->fieldNames; + + // Remove the primary key field if it's not managed manually + if (!$metadata->isIdentifierNatural()) { + $fields = array_diff($fields, $metadata->identifier); + } + + foreach ($metadata->associationMappings as $fieldName => $relation) { + if ($relation['type'] !== ClassMetadataInfo::ONE_TO_MANY) { + $fields[] = $fieldName; + } + } + + return $fields; + } +} diff --git a/vendor/sensio/generator-bundle/Generator/Generator.php b/vendor/sensio/generator-bundle/Generator/Generator.php new file mode 100644 index 0000000000000000000000000000000000000000..0a54d9451d40494173fbeab32130e44655771dff --- /dev/null +++ b/vendor/sensio/generator-bundle/Generator/Generator.php @@ -0,0 +1,108 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Generator; + +use Symfony\Component\Console\Output\ConsoleOutput; + +/** + * Generator is the base class for all generators. + * + * @author Fabien Potencier + */ +class Generator +{ + private $skeletonDirs; + private static $output; + + /** + * Sets an array of directories to look for templates. + * + * The directories must be sorted from the most specific to the most + * directory. + * + * @param array $skeletonDirs An array of skeleton dirs + */ + public function setSkeletonDirs($skeletonDirs) + { + $this->skeletonDirs = is_array($skeletonDirs) ? $skeletonDirs : array($skeletonDirs); + } + + protected function render($template, $parameters) + { + $twig = $this->getTwigEnvironment(); + + return $twig->render($template, $parameters); + } + + /** + * Gets the twig environment that will render skeletons. + * + * @return \Twig_Environment + */ + protected function getTwigEnvironment() + { + return new \Twig_Environment(new \Twig_Loader_Filesystem($this->skeletonDirs), array( + 'debug' => true, + 'cache' => false, + 'strict_variables' => true, + 'autoescape' => false, + )); + } + + protected function renderFile($template, $target, $parameters) + { + self::mkdir(dirname($target)); + + return self::dump($target, $this->render($template, $parameters)); + } + + /** + * @internal + */ + public static function mkdir($dir, $mode = 0777, $recursive = true) + { + if (!is_dir($dir)) { + mkdir($dir, $mode, $recursive); + self::writeln(sprintf(' created %s', self::relativizePath($dir))); + } + } + + /** + * @internal + */ + public static function dump($filename, $content) + { + if (file_exists($filename)) { + self::writeln(sprintf(' updated %s', self::relativizePath($filename))); + } else { + self::writeln(sprintf(' created %s', self::relativizePath($filename))); + } + + return file_put_contents($filename, $content); + } + + private static function writeln($message) + { + if (null === self::$output) { + self::$output = new ConsoleOutput(); + } + + self::$output->writeln($message); + } + + private static function relativizePath($absolutePath) + { + $relativePath = str_replace(getcwd(), '.', $absolutePath); + + return is_dir($absolutePath) ? rtrim($relativePath, '/').'/' : $relativePath; + } +} diff --git a/vendor/sensio/generator-bundle/LICENSE b/vendor/sensio/generator-bundle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f8fc9009d38c647fdb45f282ece6e3fbdac18f88 --- /dev/null +++ b/vendor/sensio/generator-bundle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011-2017 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/vendor/sensio/generator-bundle/Manipulator/ConfigurationManipulator.php b/vendor/sensio/generator-bundle/Manipulator/ConfigurationManipulator.php new file mode 100644 index 0000000000000000000000000000000000000000..efea9d6439309a0381f1f6b342eabc8075e7fef3 --- /dev/null +++ b/vendor/sensio/generator-bundle/Manipulator/ConfigurationManipulator.php @@ -0,0 +1,111 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Manipulator; + +use Sensio\Bundle\GeneratorBundle\Generator\Generator; +use Sensio\Bundle\GeneratorBundle\Model\Bundle; +use Symfony\Component\Yaml\Yaml; + +/** + * Changes the PHP code of a YAML services configuration file. + * + * @author Fabien Potencier + * @author Ryan Weaver + */ +class ConfigurationManipulator extends Manipulator +{ + private $file; + + /** + * @param string $file The YAML configuration file path + */ + public function __construct($file) + { + $this->file = $file; + } + + /** + * Adds a configuration resource at the top of the existing ones. + * + * @param Bundle $bundle + * + * @throws \RuntimeException If this process fails for any reason + */ + public function addResource(Bundle $bundle) + { + // if the config.yml file doesn't exist, don't even try. + if (!file_exists($this->file)) { + throw new \RuntimeException(sprintf('The target config file %s does not exist', $this->file)); + } + + $code = $this->getImportCode($bundle); + + $currentContents = file_get_contents($this->file); + // Don't add same bundle twice + if (false !== strpos($currentContents, $code)) { + throw new \RuntimeException(sprintf('The %s configuration file from %s is already imported', $bundle->getServicesConfigurationFilename(), $bundle->getName())); + } + + // find the "imports" line and add this at the end of that list + $lastImportedPath = $this->findLastImportedPath($currentContents); + if (!$lastImportedPath) { + throw new \RuntimeException(sprintf('Could not find the imports key in %s', $this->file)); + } + + // find imports: + $importsPosition = strpos($currentContents, 'imports:'); + // find the last import + $lastImportPosition = strpos($currentContents, $lastImportedPath, $importsPosition); + // find the line break after the last import + $targetLinebreakPosition = strpos($currentContents, "\n", $lastImportPosition); + + $newContents = substr($currentContents, 0, $targetLinebreakPosition)."\n".$code.substr($currentContents, $targetLinebreakPosition); + + if (false === Generator::dump($this->file, $newContents)) { + throw new \RuntimeException(sprintf('Could not write file %s ', $this->file)); + } + } + + public function getImportCode(Bundle $bundle) + { + return sprintf(<<getName(), + $bundle->getServicesConfigurationFilename() + ); + } + + /** + * Finds the last imported resource path in the YAML file. + * + * @param $yamlContents + * + * @return bool|string + */ + private function findLastImportedPath($yamlContents) + { + $data = Yaml::parse($yamlContents); + if (!isset($data['imports'])) { + return false; + } + + // find the last imports entry + $lastImport = end($data['imports']); + if (!isset($lastImport['resource'])) { + return false; + } + + return $lastImport['resource']; + } +} diff --git a/vendor/sensio/generator-bundle/Manipulator/KernelManipulator.php b/vendor/sensio/generator-bundle/Manipulator/KernelManipulator.php new file mode 100644 index 0000000000000000000000000000000000000000..92899cb7cc84c30ab1d127691213142d68dc32ac --- /dev/null +++ b/vendor/sensio/generator-bundle/Manipulator/KernelManipulator.php @@ -0,0 +1,125 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Manipulator; + +use Symfony\Component\HttpKernel\KernelInterface; +use Sensio\Bundle\GeneratorBundle\Generator\Generator; + +/** + * Changes the PHP code of a Kernel. + * + * @author Fabien Potencier + */ +class KernelManipulator extends Manipulator +{ + protected $kernel; + protected $reflected; + + public function __construct(KernelInterface $kernel) + { + $this->kernel = $kernel; + $this->reflected = new \ReflectionObject($kernel); + } + + /** + * Adds a bundle at the end of the existing ones. + * + * @param string $bundle The bundle class name + * + * @return bool Whether the operation succeeded + * + * @throws \RuntimeException If bundle is already defined + */ + public function addBundle($bundle) + { + if (!$this->getFilename()) { + return false; + } + + $src = file($this->getFilename()); + $method = $this->reflected->getMethod('registerBundles'); + $lines = array_slice($src, $method->getStartLine() - 1, $method->getEndLine() - $method->getStartLine() + 1); + + // Don't add same bundle twice + if (false !== strpos(implode('', $lines), $bundle)) { + throw new \RuntimeException(sprintf('Bundle "%s" is already defined in "AppKernel::registerBundles()".', $bundle)); + } + + $this->setCode(token_get_all('getStartLine()); + + while ($token = $this->next()) { + // $bundles + if (T_VARIABLE !== $token[0] || '$bundles' !== $token[1]) { + continue; + } + + // = + $this->next(); + + // array start with traditional or short syntax + $token = $this->next(); + if (T_ARRAY !== $token[0] && '[' !== $this->value($token)) { + return false; + } + + // add the bundle at the end of the array + while ($token = $this->next()) { + // look for ); or ]; + if (')' !== $this->value($token) && ']' !== $this->value($token)) { + continue; + } + + if (';' !== $this->value($this->peek())) { + continue; + } + + $this->next(); + + $leadingContent = implode('', array_slice($src, 0, $this->line)); + + // trim semicolon + $leadingContent = rtrim(rtrim($leadingContent), ';'); + + // We want to match ) & ] + $closingSymbolRegex = '#(\)|])$#'; + + // get closing symbol used + preg_match($closingSymbolRegex, $leadingContent, $matches); + $closingSymbol = $matches[0]; + + // remove last close parentheses + $leadingContent = rtrim(preg_replace($closingSymbolRegex, '', rtrim($leadingContent))); + + if ('(' !== substr($leadingContent, -1) && '[' !== substr($leadingContent, -1)) { + // end of leading content is not open parentheses or bracket, then assume that array contains at least one element + $leadingContent = rtrim($leadingContent, ',').','; + } + + $lines = array_merge( + array($leadingContent, "\n"), + array(str_repeat(' ', 12), sprintf('new %s(),', $bundle), "\n"), + array(str_repeat(' ', 8), $closingSymbol.';', "\n"), + array_slice($src, $this->line) + ); + + Generator::dump($this->getFilename(), implode('', $lines)); + + return true; + } + } + } + + public function getFilename() + { + return $this->reflected->getFileName(); + } +} diff --git a/vendor/sensio/generator-bundle/Manipulator/Manipulator.php b/vendor/sensio/generator-bundle/Manipulator/Manipulator.php new file mode 100644 index 0000000000000000000000000000000000000000..d0475ae3c5509eba62897892ccd05317f84a0377 --- /dev/null +++ b/vendor/sensio/generator-bundle/Manipulator/Manipulator.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sensio\Bundle\GeneratorBundle\Manipulator; + +/** + * Changes the PHP code of a Kernel. + * + * @author Fabien Potencier + */ +class Manipulator +{ + protected $tokens; + protected $line; + + /** + * Sets the code to manipulate. + * + * @param array $tokens An array of PHP tokens + * @param int $line The start line of the code + */ + protected function setCode(array $tokens, $line = 0) + { + $this->tokens = $tokens; + $this->line = $line; + } + + /** + * Gets the next token. + * + * @return string|null + */ + protected function next() + { + while ($token = array_shift($this->tokens)) { + $this->line += substr_count($this->value($token), "\n"); + + if (is_array($token) && in_array($token[0], array(T_WHITESPACE, T_COMMENT, T_DOC_COMMENT))) { + continue; + } + + return $token; + } + } + + /** + * Peeks the next token. + * + * @param int $nb + * + * @return string|null + */ + protected function peek($nb = 1) + { + $i = 0; + $tokens = $this->tokens; + while ($token = array_shift($tokens)) { + if (is_array($token) && in_array($token[0], array(T_WHITESPACE, T_COMMENT, T_DOC_COMMENT))) { + continue; + } + + ++$i; + if ($i == $nb) { + return $token; + } + } + } + + /** + * Gets the value of a token. + * + * @param string|string[] $token The token value + * + * @return string + */ + protected function value($token) + { + return is_array($token) ? $token[1] : $token; + } +} diff --git a/vendor/sensio/generator-bundle/Manipulator/RoutingManipulator.php b/vendor/sensio/generator-bundle/Manipulator/RoutingManipulator.php new file mode 100644 index 0000000000000000000000000000000000000000..891f77177070154c9f1fb61043fa8b6cd528ceff --- /dev/null +++ b/vendor/sensio/generator-bundle/Manipulator/RoutingManipulator.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 Sensio\Bundle\GeneratorBundle\Manipulator; + +use Symfony\Component\DependencyInjection\Container; +use Sensio\Bundle\GeneratorBundle\Generator\DoctrineCrudGenerator; +use Sensio\Bundle\GeneratorBundle\Generator\Generator; +use Symfony\Component\Yaml\Yaml; + +/** + * Changes the PHP code of a YAML routing file. + * + * @author Fabien Potencier + */ +class RoutingManipulator extends Manipulator +{ + private $file; + + /** + * @param string $file The YAML routing file path + */ + public function __construct($file) + { + $this->file = $file; + } + + /** + * Adds a routing resource at the top of the existing ones. + * + * @param string $bundle + * @param string $format + * @param string $prefix + * @param string $path + * + * @return bool Whether the operation succeeded + * + * @throws \RuntimeException If bundle is already imported + */ + public function addResource($bundle, $format, $prefix = '/', $path = 'routing') + { + $current = ''; + $code = sprintf("%s:\n", $this->getImportedResourceYamlKey($bundle, $prefix)); + + if (file_exists($this->file)) { + $current = file_get_contents($this->file); + + // Don't add same bundle twice + if (false !== strpos($current, '@'.$bundle)) { + throw new \RuntimeException(sprintf('Bundle "%s" is already imported.', $bundle)); + } + } elseif (!is_dir($dir = dirname($this->file))) { + Generator::mkdir($dir); + } + + if ('annotation' == $format) { + $code .= sprintf(" resource: \"@%s/Controller/\"\n type: annotation\n", $bundle); + } else { + $code .= sprintf(" resource: \"@%s/Resources/config/%s.%s\"\n", $bundle, $path, $format); + } + $code .= sprintf(" prefix: %s\n", $prefix); + $code .= "\n"; + $code .= $current; + + if (false === Generator::dump($this->file, $code)) { + return false; + } + + return true; + } + + /** + * Checks if the routing file contains a line for the bundle. + * + * @param string $bundle + * + * @return bool + */ + public function hasResourceInAnnotation($bundle) + { + if (!file_exists($this->file)) { + return false; + } + + $config = Yaml::parse(file_get_contents($this->file)); + + $search = sprintf('@%s/Controller/', $bundle); + + foreach ($config as $resource) { + if (array_key_exists('resource', $resource)) { + return $resource['resource'] === $search; + } + } + + return false; + } + + /** + * Adds an annotation controller resource. + * + * @param string $bundle + * @param string $controller + * + * @return bool + */ + public function addAnnotationController($bundle, $controller) + { + $current = ''; + + if (file_exists($this->file)) { + $current = file_get_contents($this->file); + } elseif (!is_dir($dir = dirname($this->file))) { + mkdir($dir, 0777, true); + } + + $code = sprintf("%s:\n", Container::underscore(substr($bundle, 0, -6)).'_'.Container::underscore($controller)); + + $code .= sprintf(" resource: \"@%s/Controller/%sController.php\"\n type: annotation\n", $bundle, $controller); + + $code .= "\n"; + $code .= $current; + + return false !== file_put_contents($this->file, $code); + } + + public function getImportedResourceYamlKey($bundle, $prefix) + { + $snakeCasedBundleName = Container::underscore(substr($bundle, 0, -6)); + $routePrefix = DoctrineCrudGenerator::getRouteNamePrefix($prefix); + + return sprintf('%s%s%s', $snakeCasedBundleName, '' !== $routePrefix ? '_' : '', $routePrefix); + } +} diff --git a/vendor/sensio/generator-bundle/Model/Bundle.php b/vendor/sensio/generator-bundle/Model/Bundle.php new file mode 100644 index 0000000000000000000000000000000000000000..d26279c0aea3ed4f3b7e4fe71b36512cd3374e6a --- /dev/null +++ b/vendor/sensio/generator-bundle/Model/Bundle.php @@ -0,0 +1,143 @@ +namespace = $namespace; + $this->name = $name; + $this->targetDirectory = $targetDirectory; + $this->configurationFormat = $configurationFormat; + $this->isShared = $isShared; + $this->testsDirectory = $this->getTargetDirectory().'/Tests'; + } + + public function getNamespace() + { + return $this->namespace; + } + + public function getName() + { + return $this->name; + } + + public function getConfigurationFormat() + { + return $this->configurationFormat; + } + + public function isShared() + { + return $this->isShared; + } + + /** + * Returns the directory where the bundle will be generated. + * + * @return string + */ + public function getTargetDirectory() + { + return rtrim($this->targetDirectory, '/').'/'.trim(strtr($this->namespace, '\\', '/'), '/'); + } + + /** + * Returns the name of the bundle without the Bundle suffix. + * + * @return string + */ + public function getBasename() + { + return substr($this->name, 0, -6); + } + + /** + * Returns the dependency injection extension alias for this bundle. + * + * @return string + */ + public function getExtensionAlias() + { + return Container::underscore($this->getBasename()); + } + + /** + * Should a DependencyInjection directory be generated for this bundle? + * + * @return bool + */ + public function shouldGenerateDependencyInjectionDirectory() + { + return $this->isShared; + } + + /** + * What is the filename for the services.yml/xml file? + * + * @return string + */ + public function getServicesConfigurationFilename() + { + if ('yml' === $this->getConfigurationFormat() || 'annotation' === $this->configurationFormat) { + return 'services.yml'; + } else { + return 'services.'.$this->getConfigurationFormat(); + } + } + + /** + * What is the filename for the routing.yml/xml file? + * + * If false, no routing file will be generated + * + * @return string|bool + */ + public function getRoutingConfigurationFilename() + { + if ($this->getConfigurationFormat() == 'annotation') { + return false; + } + + return 'routing.'.$this->getConfigurationFormat(); + } + + /** + * Returns the class name of the Bundle class. + * + * @return string + */ + public function getBundleClassName() + { + return $this->namespace.'\\'.$this->name; + } + + public function setTestsDirectory($testsDirectory) + { + $this->testsDirectory = $testsDirectory; + } + + public function getTestsDirectory() + { + return $this->testsDirectory; + } +} diff --git a/vendor/sensio/generator-bundle/Model/EntityGeneratorResult.php b/vendor/sensio/generator-bundle/Model/EntityGeneratorResult.php new file mode 100644 index 0000000000000000000000000000000000000000..843e6c0871bb69c857a2a5967bfbac85d1dac30e --- /dev/null +++ b/vendor/sensio/generator-bundle/Model/EntityGeneratorResult.php @@ -0,0 +1,51 @@ +entityPath = $entityPath; + $this->repositoryPath = $repositoryPath; + $this->mappingPath = $mappingPath; + } + + /** + * @return string + */ + public function getEntityPath() + { + return $this->entityPath; + } + + /** + * @return string + */ + public function getRepositoryPath() + { + return $this->repositoryPath; + } + + /** + * @return string + */ + public function getMappingPath() + { + return $this->mappingPath; + } +} diff --git a/vendor/sensio/generator-bundle/README.md b/vendor/sensio/generator-bundle/README.md new file mode 100644 index 0000000000000000000000000000000000000000..587d58e295a19dee0b82cbd3f6d2b30201cae5ca --- /dev/null +++ b/vendor/sensio/generator-bundle/README.md @@ -0,0 +1,10 @@ +SensioGeneratorBundle +===================== + +The `SensioGeneratorBundle` extends the default Symfony command line +interface by providing new interactive and intuitive commands for generating +code skeletons like bundles, form classes, or CRUD controllers based on a +Doctrine 2 schema. + +More information in the official +[documentation](http://symfony.com/doc/current/bundles/SensioGeneratorBundle/index.html). diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/bundle/Bundle.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/Bundle.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..2f26597ea850918a8a94697902827b2ac5a99d29 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/Bundle.php.twig @@ -0,0 +1,15 @@ +root('{{ extension_alias }}'); + + // Here you should define the parameters that are allowed to + // configure your bundle. See the documentation linked above for + // more information on that topic. + + return $treeBuilder; + } +{% endblock class_body %} +} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/bundle/DefaultController.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/DefaultController.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..8b9fe28df617f9c6694b3ad973ade4010310e2c2 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/DefaultController.php.twig @@ -0,0 +1,27 @@ +render('{{ bundle }}:Default:index.html.twig'); + } +{% endblock class_body %} +} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/bundle/DefaultControllerTest.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/DefaultControllerTest.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..16e3fc438c01760e1204b4bf5dbc31aef48df3d1 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/DefaultControllerTest.php.twig @@ -0,0 +1,23 @@ +request('GET', '/'); + + $this->assertContains('Hello World', $client->getResponse()->getContent()); + } +{% endblock class_body %} +} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/bundle/Extension.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/Extension.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..be45f1dce500b3819b18dc3e97ed756a55d044b4 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/Extension.php.twig @@ -0,0 +1,45 @@ +processConfiguration($configuration, $configs); + + {% if format == 'yml' or format == 'annotation' -%} + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('services.yml'); + {%- elseif format == 'xml' -%} + $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('services.xml'); + {%- elseif format == 'php' -%} + $loader = new Loader\PhpFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('services.php'); + {%- endif %} + + } +{% endblock class_body %} +} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/bundle/index.html.twig.twig b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/index.html.twig.twig new file mode 100644 index 0000000000000000000000000000000000000000..980a0d5f19a64b4b30a87d4206aade58726b60e3 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/index.html.twig.twig @@ -0,0 +1 @@ +Hello World! diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/bundle/routing.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/routing.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..2e17c464e7df365085e08718d17fcf2485726066 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/routing.php.twig @@ -0,0 +1,20 @@ +add('{{ extension_alias }}_homepage', new Route('/', array( + '_controller' => '{{ bundle }}:Default:index', +))); +{% endblock body %} + +{% block return %} +return $collection; +{% endblock return %} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/bundle/routing.xml.twig b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/routing.xml.twig new file mode 100644 index 0000000000000000000000000000000000000000..21fbb1d30b5388d6bf0e1b4d610f9c818144e1c9 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/routing.xml.twig @@ -0,0 +1,12 @@ + + + + +{% block body %} + + {{ bundle }}:Default:index + +{% endblock body %} + diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/bundle/routing.yml.twig b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/routing.yml.twig new file mode 100644 index 0000000000000000000000000000000000000000..662bffdc05cff30e3bae0605c3aa9dc1ca14fb9f --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/routing.yml.twig @@ -0,0 +1,3 @@ +{{ extension_alias }}_homepage: + path: / + defaults: { _controller: {{ bundle }}:Default:index } diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/bundle/services.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/services.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..c7b80d2c9366d01be788710c1cc44242f7f84cff --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/services.php.twig @@ -0,0 +1,25 @@ +setDefinition( + '{{ extension_alias }}.example', + new Definition( + '{{ namespace }}\Example', + array( + new Reference('service_id'), + "plain_value", + new Parameter('parameter_name'), + ) + ) +); +{% endblock services %} + +*/ diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/bundle/services.xml.twig b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/services.xml.twig new file mode 100644 index 0000000000000000000000000000000000000000..62d71a3c4b21c3e13e4660c2c7363d0094dca0d7 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/services.xml.twig @@ -0,0 +1,18 @@ + + + + + + diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/bundle/services.yml.twig b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/services.yml.twig new file mode 100644 index 0000000000000000000000000000000000000000..fef6d92ca35b24ea07ed6a1e8cedc96b76bac448 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/bundle/services.yml.twig @@ -0,0 +1,6 @@ +services: +{% block services %} +# {{ extension_alias }}.example: +# class: {{ namespace }}\Example +# arguments: ["@service_id", "plain_value", "%parameter%"] +{% endblock services %} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/command/Command.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/command/Command.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..0a5d1f6a8cd1d97fd45409de15b02a4ee8b0a823 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/command/Command.php.twig @@ -0,0 +1,40 @@ +setName('{{ name }}') + ->setDescription('...') + ->addArgument('argument', InputArgument::OPTIONAL, 'Argument description') + ->addOption('option', null, InputOption::VALUE_NONE, 'Option description') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $argument = $input->getArgument('argument'); + + if ($input->getOption('option')) { + // ... + } + + $output->writeln('Command result.'); + } + +{% endblock class_body %} +} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/controller/Controller.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/controller/Controller.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..9d6e43ea4d33b091310527447fa7b9ae7fbf8436 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/controller/Controller.php.twig @@ -0,0 +1,42 @@ + 0 -%} + ${{- action.placeholders|join(', $') -}} + {%- endif -%}) + { + {% if 'default' == action.template -%} + return $this->render('{{ bundle }}:{{ controller }}:{{ action.name|slice(0, -6) }}.html.{{ format.templating }}', array( + // ... + )); + {%- else -%} + return $this->render('{{ action.template }}', array( + // ... + )); + {%- endif %} + + } + +{% endfor -%} +{% endblock class_body %} +} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/controller/ControllerTest.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/controller/ControllerTest.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..b824d7d315f5cb5a5ea9554bbeac1df5a04d144a --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/controller/ControllerTest.php.twig @@ -0,0 +1,24 @@ +request('GET', '{{ action.route }}'); + } + +{% endfor -%} +{% endblock class_body %} +} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/controller/Template.html.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/controller/Template.html.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..0652eb559dbf010a29ed21aff416ace18c0a2c26 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/controller/Template.html.php.twig @@ -0,0 +1,7 @@ +extend('::base.html.twig') ?> + +set('title', '{{ bundle }}:{{ controller }}:{{ action.basename }}') ?> + +start('body') ?> +

    Welcome to the {{ controller }}:{{ action.basename }} page

    +stop() ?> diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/controller/Template.html.twig.twig b/vendor/sensio/generator-bundle/Resources/skeleton/controller/Template.html.twig.twig new file mode 100644 index 0000000000000000000000000000000000000000..03ced82f0f156aa2bd85ab61b68f8c4a28f468a2 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/controller/Template.html.twig.twig @@ -0,0 +1,9 @@ +{{ '{% extends "::base.html.twig" %}' }} + +{{ '{% block title %}' -}} +{{ bundle }}:{{ controller }}:{{ action.basename }} +{{- '{% endblock %}' }} + +{{ '{% block body %}' }} +

    Welcome to the {{ controller }}:{{ action.basename }} page

    +{{ '{% endblock %}' }} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/delete.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/delete.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..6fd78b72b8483cdfbddaee83f0fdfb80ec31ce07 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/delete.php.twig @@ -0,0 +1,50 @@ + + /** +{% block phpdoc_method_header %} + * Deletes a {{ entity_singularized }} entity. +{% endblock phpdoc_method_header %} + * +{% block phpdoc_method_annotations %} +{% if 'annotation' == format %} + * @Route("/{id}", name="{{ route_name_prefix }}_delete") + * @Method("DELETE") +{% endif %} +{% endblock phpdoc_method_annotations %} + */ +{% block method_definition %} + public function deleteAction(Request $request, {{ entity_class }} ${{ entity_singularized }}) +{% endblock method_definition %} + { +{% block method_body %} + $form = $this->createDeleteForm(${{ entity_singularized }}); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $em = $this->getDoctrine()->getManager(); + $em->remove(${{ entity_singularized }}); + $em->flush(); + } +{% endblock method_body %} + +{% block method_return %} + return $this->redirectToRoute('{{ route_name_prefix }}_index'); +{% endblock method_return %} + } + +{% block form %} + /** + * Creates a form to delete a {{ entity_singularized }} entity. + * + * @param {{ entity_class }} ${{ entity_singularized }} The {{ entity_singularized }} entity + * + * @return \Symfony\Component\Form\Form The form + */ + private function createDeleteForm({{ entity_class }} ${{ entity_singularized }}) + { + return $this->createFormBuilder() + ->setAction($this->generateUrl('{{ route_name_prefix }}_delete', array('id' => ${{ entity_singularized }}->getId()))) + ->setMethod('DELETE') + ->getForm() + ; + } +{% endblock form %} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/edit.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/edit.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..9d55556a17e4ee0f036e4d7f01695e8dbd99faad --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/edit.php.twig @@ -0,0 +1,41 @@ + + /** +{% block phpdoc_method_header %} + * Displays a form to edit an existing {{ entity_singularized }} entity. +{% endblock phpdoc_method_header %} + * +{% block phpdoc_method_annotations %} +{% if 'annotation' == format %} + * @Route("/{id}/edit", name="{{ route_name_prefix }}_edit") + * @Method({"GET", "POST"}) +{% endif %} +{% endblock phpdoc_method_annotations %} + */ +{% block method_definition %} + public function editAction(Request $request, {{ entity_class }} ${{ entity_singularized }}) +{% endblock method_definition %} + { +{% block method_body %} + $deleteForm = $this->createDeleteForm(${{ entity_singularized }}); + {% if use_form_type_instance -%} + $editForm = $this->createForm(new {{ entity_singularized|capitalize }}Type(), ${{ entity_singularized }}); + {% else -%} + $editForm = $this->createForm('{{ namespace }}\Form\{{ entity }}Type', ${{ entity_singularized }}); + {% endif -%} + $editForm->handleRequest($request); + + if ($editForm->isSubmitted() && $editForm->isValid()) { + $this->getDoctrine()->getManager()->flush(); + + return $this->redirectToRoute('{{ route_name_prefix }}_edit', array('id' => ${{ entity_singularized }}->getId())); + } +{% endblock method_body %} + +{% block method_return %} + return $this->render('{{ entity|lower|replace({'\\': '/'}) }}/edit.html.twig', array( + '{{ entity_singularized }}' => ${{ entity_singularized }}, + 'edit_form' => $editForm->createView(), + 'delete_form' => $deleteForm->createView(), + )); +{% endblock method_return %} + } diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/index.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/index.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..1a31a3bbde7b007a6d539721072d76377f02b723 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/index.php.twig @@ -0,0 +1,28 @@ + /** +{% block phpdoc_method_header %} + * Lists all {{ entity_singularized }} entities. +{% endblock phpdoc_method_header %} + * +{% block phpdoc_method_annotations %} +{% if 'annotation' == format %} + * @Route("/", name="{{ route_name_prefix }}_index") + * @Method("GET") +{% endif %} +{% endblock phpdoc_method_annotations %} + */ +{% block method_definition %} + public function indexAction() +{% endblock method_definition %} + { +{% block method_body %} + $em = $this->getDoctrine()->getManager(); + + ${{ entity_pluralized }} = $em->getRepository('{{ bundle }}:{{ entity }}')->findAll(); +{% endblock method_body %} + +{% block method_return %} + return $this->render('{{ entity|lower|replace({'\\': '/'}) }}/index.html.twig', array( + '{{ entity_pluralized }}' => ${{ entity_pluralized }}, + )); +{% endblock method_return %} + } diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/new.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/new.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..1beffd00bc365f72e4afb0aafad9ccd3234bc1ae --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/new.php.twig @@ -0,0 +1,47 @@ + + /** +{% block phpdoc_method_header %} + * Creates a new {{ entity_singularized }} entity. +{% endblock phpdoc_method_header %} + * +{% block phpdoc_method_annotations %} +{% if 'annotation' == format %} + * @Route("/new", name="{{ route_name_prefix }}_new") + * @Method({"GET", "POST"}) +{% endif %} +{% endblock phpdoc_method_annotations %} + */ +{% block method_definition %} + public function newAction(Request $request) +{% endblock method_definition %} + { +{% block method_body %} + ${{ entity_singularized }} = new {{ entity_singularized|capitalize }}(); + {% if use_form_type_instance -%} + $form = $this->createForm(new {{ entity_singularized|capitalize }}Type(), ${{ entity_singularized }}); + {% else -%} + $form = $this->createForm('{{ namespace }}\Form\{{ entity }}Type', ${{ entity_singularized }}); + {% endif -%} + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $em = $this->getDoctrine()->getManager(); + $em->persist(${{ entity_singularized }}); + $em->flush(${{ entity_singularized }}); + + {% if 'show' in actions -%} + return $this->redirectToRoute('{{ route_name_prefix }}_show', array('id' => ${{ entity_singularized }}->getId())); + {%- else -%} + return $this->redirectToRoute('{{ route_name_prefix }}_index')); + {%- endif %} + + } +{% endblock method_body %} + +{% block method_return %} + return $this->render('{{ entity|lower|replace({'\\': '/'}) }}/new.html.twig', array( + '{{ entity_singularized }}' => ${{ entity_singularized }}, + 'form' => $form->createView(), + )); +{% endblock method_return %} + } diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/show.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/show.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..ed08b15a74af375d5a4df06a6df4a57b50d67a4f --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/actions/show.php.twig @@ -0,0 +1,32 @@ + + /** +{% block phpdoc_method_header %} + * Finds and displays a {{ entity_singularized }} entity. +{% endblock phpdoc_method_header %} + * +{% block phpdoc_method_annotations %} +{% if 'annotation' == format %} + * @Route("/{id}", name="{{ route_name_prefix }}_show") + * @Method("GET") +{% endif %} +{% endblock phpdoc_method_annotations %} + */ +{% block method_definition %} + public function showAction({{ entity_class }} ${{ entity_singularized }}) +{% endblock method_definition %} + { +{% block method_body %} +{% if 'delete' in actions %} + $deleteForm = $this->createDeleteForm(${{ entity_singularized }}); +{% endif %} +{% endblock method_body %} + +{% block method_return %} + return $this->render('{{ entity|lower|replace({'\\': '/'}) }}/show.html.twig', array( + '{{ entity_singularized }}' => ${{ entity_singularized }}, +{% if 'delete' in actions %} + 'delete_form' => $deleteForm->createView(), +{% endif %} + )); +{% endblock method_return %} + } diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/config/routing.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/config/routing.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..ba226ab6cad4520e6073300804e38697d29d6940 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/config/routing.php.twig @@ -0,0 +1,76 @@ +add('{{ route_name_prefix }}_index', new Route( + '/', + array('_controller' => '{{ bundle }}:{{ entity }}:index'), + array(), + array(), + '', + array(), + array('GET') +)); +{% endif %} + +{% if 'show' in actions %} +$collection->add('{{ route_name_prefix }}_show', new Route( + '/{id}/show', + array('_controller' => '{{ bundle }}:{{ entity }}:show'), + array(), + array(), + '', + array(), + array('GET') +)); +{% endif %} + +{% if 'new' in actions %} +$collection->add('{{ route_name_prefix }}_new', new Route( + '/new', + array('_controller' => '{{ bundle }}:{{ entity }}:new'), + array(), + array(), + '', + array(), + array('GET', 'POST') +)); +{% endif %} + +{% if 'edit' in actions %} +$collection->add('{{ route_name_prefix }}_edit', new Route( + '/{id}/edit', + array('_controller' => '{{ bundle }}:{{ entity }}:edit'), + array(), + array(), + '', + array(), + array('GET', 'POST') +)); +{% endif %} + +{% if 'delete' in actions %} +$collection->add('{{ route_name_prefix }}_delete', new Route( + '/{id}/delete', + array('_controller' => '{{ bundle }}:{{ entity }}:delete'), + array(), + array(), + '', + array(), + array('DELETE') +)); +{% endif %} +{% endblock body %} + +{% block return %} +return $collection; +{% endblock return %} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/config/routing.xml.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/config/routing.xml.twig new file mode 100644 index 0000000000000000000000000000000000000000..dfe6ed36d5494c02585904e10fe8e8086270824a --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/config/routing.xml.twig @@ -0,0 +1,35 @@ + + + + +{% block body %} + + {{ bundle }}:{{ entity }}:index + + + + {{ bundle }}:{{ entity }}:show + + +{% if 'new' in actions %} + + {{ bundle }}:{{ entity }}:new + +{% endif %} + +{% if 'edit' in actions %} + + {{ bundle }}:{{ entity }}:edit + +{% endif %} + +{% if 'delete' in actions %} + + {{ bundle }}:{{ entity }}:delete + +{% endif %} +{% endblock body %} + + diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/config/routing.yml.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/config/routing.yml.twig new file mode 100644 index 0000000000000000000000000000000000000000..33ee1a8b0851632636449b30482e5409d4675659 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/config/routing.yml.twig @@ -0,0 +1,34 @@ +{% if 'index' in actions %} +{{ route_name_prefix }}_index: + path: / + defaults: { _controller: "{{ bundle }}:{{ entity }}:index" } + methods: GET +{% endif %} + +{% if 'show' in actions %} +{{ route_name_prefix }}_show: + path: /{id}/show + defaults: { _controller: "{{ bundle }}:{{ entity }}:show" } + methods: GET +{% endif %} + +{% if 'new' in actions %} +{{ route_name_prefix }}_new: + path: /new + defaults: { _controller: "{{ bundle }}:{{ entity }}:new" } + methods: [GET, POST] +{% endif %} + +{% if 'edit' in actions %} +{{ route_name_prefix }}_edit: + path: /{id}/edit + defaults: { _controller: "{{ bundle }}:{{ entity }}:edit" } + methods: [GET, POST] +{% endif %} + +{% if 'delete' in actions %} +{{ route_name_prefix }}_delete: + path: /{id}/delete + defaults: { _controller: "{{ bundle }}:{{ entity }}:delete" } + methods: DELETE +{% endif %} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/controller.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/controller.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..2f74bfc25eb86d21f871f4ff41418c7dec685496 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/controller.php.twig @@ -0,0 +1,57 @@ +request('GET', '/{{ route_prefix }}/'); + $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /{{ route_prefix }}/"); + $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); + + // Fill in the form and submit it + $form = $crawler->selectButton('Create')->form(array( + '{{ form_type_name|lower }}[field_name]' => 'Test', + // ... other fields to fill + )); + + $client->submit($form); + $crawler = $client->followRedirect(); + + // Check data in the show view + $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); + + // Edit the entity + $crawler = $client->click($crawler->selectLink('Edit')->link()); + + $form = $crawler->selectButton('Update')->form(array( + '{{ form_type_name|lower }}[field_name]' => 'Foo', + // ... other fields to fill + )); + + $client->submit($form); + $crawler = $client->followRedirect(); + + // Check the element contains an attribute with value equals "Foo" + $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); + + // Delete the entity + $client->submit($crawler->selectButton('Delete')->form()); + $crawler = $client->followRedirect(); + + // Check the entity has been delete on the list + $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + } diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/tests/others/short_scenario.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/tests/others/short_scenario.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..9e1b1a47a07c3c656ea6df6b3ac2158571959225 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/tests/others/short_scenario.php.twig @@ -0,0 +1,14 @@ + + public function testCompleteScenario() + { + // Create a new client to browse the application + $client = static::createClient(); + + // Go to the list view + $crawler = $client->request('GET', '/{{ route_prefix }}/'); + $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /{{ route_prefix }}/"); + + // Go to the show view + $crawler = $client->click($crawler->selectLink('show')->link()); + $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code"); + } diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/tests/test.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/tests/test.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..c07a8fc409ed0c558d42f7f8f79f54e815193444 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/tests/test.php.twig @@ -0,0 +1,24 @@ +{{ entity_singularized|capitalize }} edit + + {{ '{{ form_start(edit_form) }}' }} + {{ '{{ form_widget(edit_form) }}' }} + + {{ '{{ form_end(edit_form) }}' }} + +{% set hide_edit, hide_delete = true, false %} +{{ include('crud/views/others/record_actions.html.twig.twig') -}} +{{ "{% endblock %}" }} +{% endblock body %} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/views/index.html.twig.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/views/index.html.twig.twig new file mode 100644 index 0000000000000000000000000000000000000000..6f344ac21f9fd4e5cfb9250f7065f6d7de98fecb --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/views/index.html.twig.twig @@ -0,0 +1,89 @@ +{% block extends %} +{{ "{% extends 'base.html.twig' %}" }} +{% endblock extends %} + +{% block body %} +{{ "{% block body %}" }} +

    {{ entity_pluralized|capitalize }} list

    + + + + + {%- for field, metadata in fields %} + + + + {%- endfor %} + + + + + + {{ '{% for ' ~ entity_singularized ~ ' in ' ~ entity_pluralized ~ ' %}' }} + + + {%- for field, metadata in fields %} + {%- if loop.first and ('show' in actions) %} + + + + {%- elseif metadata.type in ['datetime'] %} + + + + {%- elseif metadata.type in ['date'] %} + + + + {%- elseif metadata.type in ['time'] %} + + + + {%- elseif metadata.type in ['array'] %} + + + + {%- elseif metadata.type in ['boolean'] %} + + + + {%- else %} + + + + {%- endif %} + + {%- if loop.last %} + + + + {%- endif %} + {%- endfor %} + + + {{ '{% endfor %}' }} + +
    {{ field|capitalize }}Actions
    {{ '{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' }}' }}{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ '|date(\'Y-m-d H:i:s\') }}{% endif %}' }}{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ '|date(\'Y-m-d\') }}{% endif %}' }}{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ '|date(\'H:i:s\') }}{% endif %}' }}{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ '|join(\', \') }}{% endif %}' }}{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}Yes{% else %}No{% endif %}' }}{{ '{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' }}' }} +
      + + {%- for action in record_actions %} + +
    • + {{ action }} +
    • + + {%- endfor %} + +
    +
    + + {% if 'new' in actions -%} + + {%- endif %} + +{{ "{% endblock %}" }} +{% endblock body %} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/views/new.html.twig.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/views/new.html.twig.twig new file mode 100644 index 0000000000000000000000000000000000000000..cfdf57e16f0a24d2dda1724d0ea9fba12083cdd2 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/views/new.html.twig.twig @@ -0,0 +1,17 @@ +{% block extends %} +{{ "{% extends 'base.html.twig' %}" }} +{% endblock extends %} + +{% block body %} +{{ "{% block body %}" }} +

    {{ entity_singularized|capitalize }} creation

    + + {{ '{{ form_start(form) }}' }} + {{ '{{ form_widget(form) }}' }} + + {{ '{{ form_end(form) }}' }} + +{% set hide_edit, hide_delete = true, true %} +{{ include('crud/views/others/record_actions.html.twig.twig') -}} +{{ "{% endblock %}" }} +{% endblock body %} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/views/others/record_actions.html.twig.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/views/others/record_actions.html.twig.twig new file mode 100644 index 0000000000000000000000000000000000000000..05b4f5389a8ce42e219f7ae4a7cd43ed9fb209ae --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/views/others/record_actions.html.twig.twig @@ -0,0 +1,24 @@ +
      +
    • + Back to the list +
    • + + {%- if ('edit' in actions) and (not hide_edit) %} + +
    • + Edit +
    • + + {%- endif %} + + {%- if ('delete' in actions) and (not hide_delete) %} + +
    • + {{ '{{ form_start(delete_form) }}' }} + + {{ '{{ form_end(delete_form) }}' }} +
    • + + {%- endif %} + +
    diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/crud/views/show.html.twig.twig b/vendor/sensio/generator-bundle/Resources/skeleton/crud/views/show.html.twig.twig new file mode 100644 index 0000000000000000000000000000000000000000..ecc2c15c8cfb8df8f209539ef9e36a057f43bf61 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/crud/views/show.html.twig.twig @@ -0,0 +1,52 @@ +{% block extends %} +{{ "{% extends 'base.html.twig' %}" }} +{% endblock extends %} + +{% block body %} +{{ "{% block body %}" }} +

    {{ entity_singularized|capitalize }}

    + + + + {%- for field, metadata in fields %} + + + + + {%- if metadata.type in ['datetime'] %} + + + + {%- elseif metadata.type in ['date'] %} + + + + {%- elseif metadata.type in ['time'] %} + + + + {%- elseif metadata.type in ['array'] %} + + + + {%- elseif metadata.type in ['boolean'] %} + + + + {%- else %} + + + + {%- endif %} + + + + {%- endfor %} + + +
    {{ field|capitalize }}{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ '|date(\'Y-m-d H:i:s\') }}{% endif %}' }}{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ '|date(\'Y-m-d\') }}{% endif %}' }}{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ '|date(\'H:i:s\') }}{% endif %}' }}{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ '|join(\', \') }}{% endif %}' }}{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}Yes{% else %}No{% endif %}' }}{{ '{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' }}' }}
    + +{% set hide_edit, hide_delete = false, false %} +{{ include('crud/views/others/record_actions.html.twig.twig') -}} +{{ "{% endblock %}" }} +{% endblock body %} diff --git a/vendor/sensio/generator-bundle/Resources/skeleton/form/FormType.php.twig b/vendor/sensio/generator-bundle/Resources/skeleton/form/FormType.php.twig new file mode 100644 index 0000000000000000000000000000000000000000..d257ae2f239d30d24b862ff1e2307e39852eefa5 --- /dev/null +++ b/vendor/sensio/generator-bundle/Resources/skeleton/form/FormType.php.twig @@ -0,0 +1,61 @@ + 0 %} + /** + * {@inheritdoc} + */ + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder + {%- for field in fields -%} + + ->add('{{ field }}') + + {%- endfor %}; + } + {% endif %} + + /** + * {@inheritdoc} + */ + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults(array( + 'data_class' => '{{ namespace }}\Entity{{ entity_namespace ? '\\' ~ entity_namespace : '' }}\{{ entity_class }}' + )); + } + + /** + * {@inheritdoc} + */ + public function getBlockPrefix() + { + return '{{ form_type_name }}'; + } + +{# BC with Symfony 2.7 #} +{%- if get_name_required %} + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->getBlockPrefix(); + } +{% endif %} + +{% endblock class_body %} +} diff --git a/vendor/sensio/generator-bundle/SensioGeneratorBundle.php b/vendor/sensio/generator-bundle/SensioGeneratorBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..5c4e7995735f9f08bd899ac13295cdee72c775fd --- /dev/null +++ b/vendor/sensio/generator-bundle/SensioGeneratorBundle.php @@ -0,0 +1,23 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Sensio\Bundle\GeneratorBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +/** + * SensioGeneratorBundle. + * + * @author Fabien Potencier + */ +class SensioGeneratorBundle extends Bundle +{ +} diff --git a/vendor/sensio/generator-bundle/composer.json b/vendor/sensio/generator-bundle/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..3d9c8c29fcf54ce947401309172e9af601b6680f --- /dev/null +++ b/vendor/sensio/generator-bundle/composer.json @@ -0,0 +1,36 @@ +{ + "name": "sensio/generator-bundle", + "description": "This bundle generates code for you", + "keywords": [], + "type": "symfony-bundle", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "require": { + "symfony/framework-bundle": "~2.7|~3.0", + "symfony/console": "~2.7|~3.0", + "symfony/process": "~2.7|~3.0", + "symfony/yaml": "~2.7|~3.0", + "twig/twig": "^1.28.2|^2.0" + }, + "require-dev": { + "symfony/doctrine-bridge": "~2.7|~3.0", + "doctrine/orm": "~2.4" + }, + "autoload": { + "psr-4": { "Sensio\\Bundle\\GeneratorBundle\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + } +} diff --git a/vendor/sensiolabs/security-checker/LICENSE b/vendor/sensiolabs/security-checker/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..fd6ed99994bf2af977aadc0e9e1b786b616d0c7d --- /dev/null +++ b/vendor/sensiolabs/security-checker/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013-2017 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/vendor/sensiolabs/security-checker/README.md b/vendor/sensiolabs/security-checker/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8595121eaa2a05624bffda4d849283723fcb3d66 --- /dev/null +++ b/vendor/sensiolabs/security-checker/README.md @@ -0,0 +1,38 @@ +SensioLabs Security Checker +=========================== + +The SensioLabs Security Checker is a command line tool that checks if your +application uses dependencies with known security vulnerabilities. It uses the +[SensioLabs Security Check Web service][1] and the [Security Advisories Database][2]. + +Usage +----- + +Download the [security-checker.phar][3] file: + + $ php security-checker.phar security:check /path/to/composer.lock + +Use the code from the repository directly: + + $ composer install + $ php security-checker security:check /path/to/composer.lock + +Integration +----------- + +The checker uses the Symfony Console component; so, you can easily integrate +the checker into your own project: + + * by using the `SecurityCheckerCommand` class into your Symfony Console + application; + + * by using the `SecurityChecker` class directly into your own code: + + use SensioLabs\Security\SecurityChecker; + + $checker = new SecurityChecker(); + $alerts = $checker->check('/path/to/composer.lock'); + +[1]: http://security.sensiolabs.org/ +[2]: https://github.com/FriendsOfPHP/security-advisories +[3]: http://get.sensiolabs.org/security-checker.phar diff --git a/vendor/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php b/vendor/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..e8effc52f4f901ab2c1cddb9e613467919de1d81 --- /dev/null +++ b/vendor/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php @@ -0,0 +1,108 @@ +checker = $checker; + + parent::__construct(); + } + + /** + * @see Command + */ + protected function configure() + { + $this + ->setName('security:check') + ->setDefinition(array( + new InputArgument('lockfile', InputArgument::OPTIONAL, 'The path to the composer.lock file', 'composer.lock'), + new InputOption('format', '', InputOption::VALUE_REQUIRED, 'The output format', 'text'), + new InputOption('end-point', '', InputOption::VALUE_REQUIRED, 'The security checker server URL'), + new InputOption('timeout', '', InputOption::VALUE_REQUIRED, 'The HTTP timeout in seconds'), + )) + ->setDescription('Checks security issues in your project dependencies') + ->setHelp(<<%command.name% command looks for security issues in the +project dependencies: + +php %command.full_name% + +You can also pass the path to a composer.lock file as an argument: + +php %command.full_name% /path/to/composer.lock + +By default, the command displays the result in plain text, but you can also +configure it to output JSON instead by using the --format option: + +php %command.full_name% /path/to/composer.lock --format=json +EOF + ); + } + + /** + * @see Command + * @see SecurityChecker + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + if ($endPoint = $input->getOption('end-point')) { + $this->checker->getCrawler()->setEndPoint($endPoint); + } + + if ($timeout = $input->getOption('timeout')) { + $this->checker->getCrawler()->setTimeout($timeout); + } + + try { + $vulnerabilities = $this->checker->check($input->getArgument('lockfile')); + } catch (ExceptionInterface $e) { + $output->writeln($this->getHelperSet()->get('formatter')->formatBlock($e->getMessage(), 'error', true)); + + return 1; + } + + switch ($input->getOption('format')) { + case 'json': + $formatter = new JsonFormatter(); + break; + case 'simple': + $formatter = new SimpleFormatter($this->getHelperSet()->get('formatter')); + break; + case 'text': + default: + $formatter = new TextFormatter($this->getHelperSet()->get('formatter')); + } + + $formatter->displayResults($output, $input->getArgument('lockfile'), $vulnerabilities); + + if ($this->checker->getLastVulnerabilityCount() > 0) { + return 1; + } + } +} diff --git a/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/BaseCrawler.php b/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/BaseCrawler.php new file mode 100644 index 0000000000000000000000000000000000000000..785ed079dda87b7b70a3ac42728121a2a8277ce7 --- /dev/null +++ b/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/BaseCrawler.php @@ -0,0 +1,83 @@ +timeout = $timeout; + } + + /** + * {@inheritdoc} + */ + public function setEndPoint($endPoint) + { + $this->endPoint = $endPoint; + } + + /** + * {@inheritdoc} + */ + public function check($lock) + { + $certFile = $this->getCertFile(); + + try { + list($headers, $body) = $this->doCheck($lock, $certFile); + } catch (\Exception $e) { + if (__DIR__.'/../Resources/security.sensiolabs.org.crt' !== $certFile) { + unlink($certFile); + } + + throw $e; + } + + if (!(preg_match('/X-Alerts: (\d+)/', $headers, $matches) || 2 == count($matches))) { + throw new RuntimeException('The web service did not return alerts count.'); + } + + return array(intval($matches[1]), json_decode($body, true)); + } + + /** + * @return array An array where the first element is a headers string and second one the response body + */ + abstract protected function doCheck($lock, $certFile); + + private function getCertFile() + { + $certFile = __DIR__.'/../Resources/security.sensiolabs.org.crt'; + if ('phar://' !== substr(__FILE__, 0, 7)) { + return $certFile; + } + + $tmpFile = tempnam(sys_get_temp_dir(), 'sls'); + if (false === @copy($certFile, $tmpFile)) { + throw new RuntimeException(sprintf('Unable to copy the certificate in "%s".', $tmpFile)); + } + + return $tmpFile; + } +} diff --git a/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/CrawlerInterface.php b/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/CrawlerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..14d0b67cf1fa048b1e16f8dfa3d59051b95e07eb --- /dev/null +++ b/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/CrawlerInterface.php @@ -0,0 +1,31 @@ + PHP_VERSION_ID >= 50500 ? new \CurlFile($lock) : '@'.$lock); + + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + curl_setopt($curl, CURLOPT_HEADER, true); + curl_setopt($curl, CURLOPT_URL, $this->endPoint); + curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/json')); + curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields); + curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $this->timeout); + curl_setopt($curl, CURLOPT_TIMEOUT, 10); + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, ini_get('open_basedir') ? 0 : 1); + curl_setopt($curl, CURLOPT_MAXREDIRS, 3); + curl_setopt($curl, CURLOPT_FAILONERROR, false); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 1); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); + curl_setopt($curl, CURLOPT_CAINFO, $certFile); + curl_setopt($curl, CURLOPT_USERAGENT, 'SecurityChecker-CLI/4 CURL PHP'); + + $response = curl_exec($curl); + + if (false === $response) { + $error = curl_error($curl); + curl_close($curl); + + throw new RuntimeException(sprintf('An error occurred: %s.', $error)); + } + + $headersSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE); + $headers = substr($response, 0, $headersSize); + $body = substr($response, $headersSize); + + $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); + curl_close($curl); + + if (400 == $statusCode) { + $data = json_decode($body, true); + $error = $data['error']; + + throw new RuntimeException($error); + } + + if (200 != $statusCode) { + throw new RuntimeException(sprintf('The web service failed for an unknown reason (HTTP %s).', $statusCode)); + } + + return array($headers, $body); + } +} diff --git a/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/DefaultCrawler.php b/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/DefaultCrawler.php new file mode 100644 index 0000000000000000000000000000000000000000..af06a9b5c3777fba831321a59a615ef123f00c5a --- /dev/null +++ b/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/DefaultCrawler.php @@ -0,0 +1,49 @@ +crawler = function_exists('curl_init') ? new CurlCrawler() : new FileGetContentsCrawler(); + } + + /** + * {@inheritdoc} + */ + public function check($lock) + { + return $this->crawler->check($lock); + } + + /** + * {@inheritdoc} + */ + public function setTimeout($timeout) + { + $this->crawler->setTimeout($timeout); + } + + /** + * {@inheritdoc} + */ + public function setEndPoint($endPoint) + { + $this->crawler->setEndPoint($endPoint); + } +} diff --git a/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/FileGetContentsCrawler.php b/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/FileGetContentsCrawler.php new file mode 100644 index 0000000000000000000000000000000000000000..489483c57f82b6f10f63917f307b5aed0ebf6e56 --- /dev/null +++ b/vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/FileGetContentsCrawler.php @@ -0,0 +1,79 @@ + array( + 'method' => 'POST', + 'header' => "Content-Type: multipart/form-data; boundary=$boundary\r\nAccept: application/json", + 'content' => "--$boundary\r\nContent-Disposition: form-data; name=\"lock\"; filename=\"$lock\"\r\nContent-Type: application/octet-stream\r\n\r\n".file_get_contents($lock)."\r\n--$boundary\r\n--\r\n", + 'ignore_errors' => true, + 'follow_location' => true, + 'max_redirects' => 3, + 'timeout' => $this->timeout, + 'user_agent' => 'SecurityChecker-CLI/4 FGC PHP', + ), + 'ssl' => array( + 'cafile' => $certFile, + 'verify_peer' => 1, + 'verify_host' => 2, + ), + )); + + $level = error_reporting(0); + $body = file_get_contents($this->endPoint, 0, $context); + error_reporting($level); + if (false === $body) { + $error = error_get_last(); + + throw new RuntimeException(sprintf('An error occurred: %s.', $error['message'])); + } + + // status code + if (!preg_match('{HTTP/\d\.\d (\d+) }i', $http_response_header[0], $match)) { + throw new RuntimeException('An unknown error occurred.'); + } + + $statusCode = $match[1]; + if (400 == $statusCode) { + $data = json_decode($body, true); + + throw new RuntimeException($data['error']); + } + + if (200 != $statusCode) { + throw new RuntimeException(sprintf('The web service failed for an unknown reason (HTTP %s).', $statusCode)); + } + + $headers = ''; + foreach ($http_response_header as $header) { + if (false !== strpos($header, 'X-Alerts: ')) { + $headers = $header; + } + } + + return array($headers, $body); + } +} diff --git a/vendor/sensiolabs/security-checker/SensioLabs/Security/Exception/ExceptionInterface.php b/vendor/sensiolabs/security-checker/SensioLabs/Security/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..df9d8a0069412847cd02b9f0e323e529b07d7e09 --- /dev/null +++ b/vendor/sensiolabs/security-checker/SensioLabs/Security/Exception/ExceptionInterface.php @@ -0,0 +1,16 @@ +write(json_encode($vulnerabilities, JSON_PRETTY_PRINT)); + } else { + $output->write(json_encode($vulnerabilities)); + } + } +} diff --git a/vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/SimpleFormatter.php b/vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/SimpleFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..9f3fa467ebeb3bdd6840223d0f0bd706d1f89581 --- /dev/null +++ b/vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/SimpleFormatter.php @@ -0,0 +1,68 @@ +formatter = $formatter; + } + + /** + * Displays a security report as simple plain text. + * + * @param OutputInterface $output + * @param string $lockFilePath The file path to the checked lock file + * @param array $vulnerabilities An array of vulnerabilities + */ + public function displayResults(OutputInterface $output, $lockFilePath, array $vulnerabilities) + { + $output->writeln(sprintf('Security Check Report: %s', realpath($lockFilePath))); + + if ($count = count($vulnerabilities)) { + $status = 'CRITICAL'; + $style = 'error'; + } else { + $status = 'OK'; + $style = 'info'; + } + + $output->writeln(sprintf('<%s>[%s] %d %s known vulnerabilities', $style, $status, $count, 1 === $count ? 'package has' : 'packages have')); + + if (0 !== $count) { + $output->write("\n"); + + foreach ($vulnerabilities as $dependency => $issues) { + $dependencyFullName = $dependency.' ('.$issues['version'].')'; + $output->writeln(''.$dependencyFullName."\n".str_repeat('-', strlen($dependencyFullName))."\n"); + + foreach ($issues['advisories'] as $issue => $details) { + $output->write(' * '); + if ($details['cve']) { + $output->write(''.$details['cve'].': '); + } + $output->writeln($details['title']); + + if ('' !== $details['link']) { + $output->writeln(' '.$details['link']); + } + + $output->writeln(''); + } + } + } + } +} diff --git a/vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/TextFormatter.php b/vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/TextFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..652bcc0fafad3c765c284398150cf60f5e76e1e5 --- /dev/null +++ b/vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/TextFormatter.php @@ -0,0 +1,60 @@ +formatter = $formatter; + } + + /** + * Displays a security report as plain text. + * + * @param OutputInterface $output + * @param string $lockFilePath The file path to the checked lock file + * @param array $vulnerabilities An array of vulnerabilities + */ + public function displayResults(OutputInterface $output, $lockFilePath, array $vulnerabilities) + { + $output = new SymfonyStyle(new ArrayInput(array()), $output); + $output->title('Symfony Security Check Report'); + // use ->comment when bumping console to 2.8+ + $output->writeln(sprintf(' // Checked file: %s', realpath($lockFilePath))); + + if ($count = count($vulnerabilities)) { + $output->error(sprintf('%d packages have known vulnerabilities.', $count)); + } else { + $output->success('No packages have known vulnerabilities.'); + } + + if (0 !== $count) { + foreach ($vulnerabilities as $dependency => $issues) { + $output->section(sprintf('%s (%s)', $dependency, $issues['version'])); + + $details = array_map(function ($value) { + return sprintf("%s: %s\n %s", $value['cve'] ?: '(no CVE ID)', $value['title'], $value['link']); + }, $issues['advisories']); + + $output->listing($details); + } + } + + $output->note('This checker can only detect vulnerabilities that are referenced in the SensioLabs security advisories database. Execute this command regularly to check the newly discovered vulnerabilities.'); + } +} diff --git a/vendor/sensiolabs/security-checker/SensioLabs/Security/Resources/security.sensiolabs.org.crt b/vendor/sensiolabs/security-checker/SensioLabs/Security/Resources/security.sensiolabs.org.crt new file mode 100644 index 0000000000000000000000000000000000000000..20585f1c01e18763b9deb2f6186e6b6f3446a397 --- /dev/null +++ b/vendor/sensiolabs/security-checker/SensioLabs/Security/Resources/security.sensiolabs.org.crt @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU +MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs +IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290 +MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux +FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h +bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt +H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9 +uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX +mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX +a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN +E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0 +WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD +VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0 +Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU +cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx +IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN +AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH +YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5 +6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC +Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX +c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a +mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= +-----END CERTIFICATE----- diff --git a/vendor/sensiolabs/security-checker/SensioLabs/Security/SecurityChecker.php b/vendor/sensiolabs/security-checker/SensioLabs/Security/SecurityChecker.php new file mode 100644 index 0000000000000000000000000000000000000000..0f71c1c783e7e3e16e3b7e3c6d9903a37ceac6a4 --- /dev/null +++ b/vendor/sensiolabs/security-checker/SensioLabs/Security/SecurityChecker.php @@ -0,0 +1,67 @@ +crawler = null === $crawler ? new DefaultCrawler() : $crawler; + } + + /** + * Checks a composer.lock file. + * + * @param string $lock The path to the composer.lock file + * + * @return array An array of vulnerabilities + * + * @throws RuntimeException When the lock file does not exist + * @throws RuntimeException When the certificate can not be copied + */ + public function check($lock) + { + if (is_dir($lock) && file_exists($lock.'/composer.lock')) { + $lock = $lock.'/composer.lock'; + } elseif (preg_match('/composer\.json$/', $lock)) { + $lock = str_replace('composer.json', 'composer.lock', $lock); + } + + if (!is_file($lock)) { + throw new RuntimeException('Lock file does not exist.'); + } + + list($this->vulnerabilityCount, $vulnerabilities) = $this->crawler->check($lock); + + return $vulnerabilities; + } + + public function getLastVulnerabilityCount() + { + return $this->vulnerabilityCount; + } + + /** + * @return CrawlerInterface + */ + public function getCrawler() + { + return $this->crawler; + } +} diff --git a/vendor/sensiolabs/security-checker/box.json b/vendor/sensiolabs/security-checker/box.json new file mode 100644 index 0000000000000000000000000000000000000000..fd3d64203dacfd061e07f41f0d2dae88fcfea30f --- /dev/null +++ b/vendor/sensiolabs/security-checker/box.json @@ -0,0 +1,25 @@ +{ + "output": "security-checker.phar", + "chmod": "0755", + "compactors": [ + "Herrera\\Box\\Compactor\\Php" + ], + "extract": false, + "main": "security-checker", + "files": [ + "LICENSE" + ], + "finder": [ + { + "name": "*.*", + "exclude": ["Tests"], + "in": "vendor" + }, + { + "name": ["*.*", "*.crt"], + "in": "SensioLabs" + } + ], + "stub": true, + "web": false +} diff --git a/vendor/sensiolabs/security-checker/composer.json b/vendor/sensiolabs/security-checker/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..1efd473099b945a73538bc9585d4479192218441 --- /dev/null +++ b/vendor/sensiolabs/security-checker/composer.json @@ -0,0 +1,23 @@ +{ + "name": "sensiolabs/security-checker", + "description": "A security checker for your composer.lock", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "require": { + "symfony/console": "~2.7|~3.0" + }, + "bin": ["security-checker"], + "autoload": { + "psr-0": { "SensioLabs\\Security": "" } + }, + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + } +} diff --git a/vendor/sensiolabs/security-checker/security-checker b/vendor/sensiolabs/security-checker/security-checker new file mode 100755 index 0000000000000000000000000000000000000000..96eaf86518aac7270e0a54d95b56e1a2854a8589 --- /dev/null +++ b/vendor/sensiolabs/security-checker/security-checker @@ -0,0 +1,32 @@ +#!/usr/bin/env php +add(new SecurityCheckerCommand(new SecurityChecker())); +$console->run(); diff --git a/vendor/swiftmailer/swiftmailer/.gitattributes b/vendor/swiftmailer/swiftmailer/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..33b8efdb8736c42f8660241e8a96f45f8ec9591e --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/.gitattributes @@ -0,0 +1,9 @@ +*.crt -crlf +*.key -crlf +*.srl -crlf +*.pub -crlf +*.priv -crlf +*.txt -crlf + +# ignore /notes in the git-generated distributed .zip archive +/notes export-ignore diff --git a/vendor/swiftmailer/swiftmailer/.php_cs.dist b/vendor/swiftmailer/swiftmailer/.php_cs.dist new file mode 100644 index 0000000000000000000000000000000000000000..f18d65d42888714896292ac80b34fd1eb7da6298 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/.php_cs.dist @@ -0,0 +1,15 @@ +setRules(array( + '@Symfony' => true, + '@Symfony:risky' => true, + 'array_syntax' => array('syntax' => 'long'), + 'no_unreachable_default_argument_value' => false, + 'braces' => array('allow_single_line_closure' => true), + 'heredoc_to_nowdoc' => false, + 'phpdoc_annotation_without_dot' => false, + )) + ->setRiskyAllowed(true) + ->setFinder(PhpCsFixer\Finder::create()->in(__DIR__)) +; diff --git a/vendor/swiftmailer/swiftmailer/.travis.yml b/vendor/swiftmailer/swiftmailer/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..0adf8d54c2f9f74c96f2711e7055998902abaa3d --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/.travis.yml @@ -0,0 +1,27 @@ +language: php + +sudo: false + +before_script: + - cp tests/acceptance.conf.php.default tests/acceptance.conf.php + - cp tests/smoke.conf.php.default tests/smoke.conf.php + - composer self-update + - composer update --no-interaction --prefer-source + - gem install mime-types -v 2.99.1 + - gem install mailcatcher + - mailcatcher --smtp-port 4456 + +script: + - phpunit --verbose + +matrix: + include: + - php: 5.3 + - php: 5.4 + - php: 5.5 + - php: 5.6 + - php: 7.0 + - php: hhvm + allow_failures: + - php: hhvm + fast_finish: true diff --git a/vendor/swiftmailer/swiftmailer/LICENSE b/vendor/swiftmailer/swiftmailer/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..485f1d6d6ca447fefde9dedad711f39665eaf28f --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013-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/vendor/swiftmailer/swiftmailer/VERSION b/vendor/swiftmailer/swiftmailer/VERSION new file mode 100644 index 0000000000000000000000000000000000000000..ec48d808ec95cd5226b619828c5e2b2dc5d70e22 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/VERSION @@ -0,0 +1 @@ +Swift-5.4.6 diff --git a/vendor/swiftmailer/swiftmailer/composer.json b/vendor/swiftmailer/swiftmailer/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..8335f58aca8a09938ca092509cc21599a406ab41 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/composer.json @@ -0,0 +1,37 @@ +{ + "name": "swiftmailer/swiftmailer", + "type": "library", + "description": "Swiftmailer, free feature-rich PHP mailer", + "keywords": ["mail","mailer","email"], + "homepage": "http://swiftmailer.org", + "license": "MIT", + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "~3.2" + }, + "autoload": { + "files": ["lib/swift_required.php"] + }, + "autoload-dev": { + "psr-0": { + "Swift_": "tests/unit" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/doc/headers.rst b/vendor/swiftmailer/swiftmailer/doc/headers.rst new file mode 100644 index 0000000000000000000000000000000000000000..6aec23ff3880e44a3256837c32a661781dd1934f --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/doc/headers.rst @@ -0,0 +1,742 @@ +Message Headers +=============== + +Sometimes you'll want to add your own headers to a message or modify/remove +headers that are already present. You work with the message's HeaderSet to do +this. + +Header Basics +------------- + +All MIME entities in Swift Mailer -- including the message itself -- +store their headers in a single object called a HeaderSet. This HeaderSet is +retrieved with the ``getHeaders()`` method. + +As mentioned in the previous chapter, everything that forms a part of a message +in Swift Mailer is a MIME entity that is represented by an instance of +``Swift_Mime_MimeEntity``. This includes -- most notably -- the message object +itself, attachments, MIME parts and embedded images. Each of these MIME entities +consists of a body and a set of headers that describe the body. + +For all of the "standard" headers in these MIME entities, such as the +``Content-Type``, there are named methods for working with them, such as +``setContentType()`` and ``getContentType()``. This is because headers are a +moderately complex area of the library. Each header has a slightly different +required structure that it must meet in order to comply with the standards that +govern email (and that are checked by spam blockers etc). + +You fetch the HeaderSet from a MIME entity like so: + +.. code-block:: php + + $message = Swift_Message::newInstance(); + + // Fetch the HeaderSet from a Message object + $headers = $message->getHeaders(); + + $attachment = Swift_Attachment::fromPath('document.pdf'); + + // Fetch the HeaderSet from an attachment object + $headers = $attachment->getHeaders(); + +The job of the HeaderSet is to contain and manage instances of Header objects. +Depending upon the MIME entity the HeaderSet came from, the contents of the +HeaderSet will be different, since an attachment for example has a different +set of headers to those in a message. + +You can find out what the HeaderSet contains with a quick loop, dumping out +the names of the headers: + +.. code-block:: php + + foreach ($headers->getAll() as $header) { + printf("%s
    \n", $header->getFieldName()); + } + + /* + Content-Transfer-Encoding + Content-Type + MIME-Version + Date + Message-ID + From + Subject + To + */ + +You can also dump out the rendered HeaderSet by calling its ``toString()`` +method: + +.. code-block:: php + + echo $headers->toString(); + + /* + Message-ID: <1234869991.499a9ee7f1d5e@swift.generated> + Date: Tue, 17 Feb 2009 22:26:31 +1100 + Subject: Awesome subject! + From: sender@example.org + To: recipient@example.org + MIME-Version: 1.0 + Content-Type: text/plain; charset=utf-8 + Content-Transfer-Encoding: quoted-printable + */ + +Where the complexity comes in is when you want to modify an existing header. +This complexity comes from the fact that each header can be of a slightly +different type (such as a Date header, or a header that contains email +addresses, or a header that has key-value parameters on it!). Each header in the +HeaderSet is an instance of ``Swift_Mime_Header``. They all have common +functionality, but knowing exactly what type of header you're working with will +allow you a little more control. + +You can determine the type of header by comparing the return value of its +``getFieldType()`` method with the constants ``TYPE_TEXT``, +``TYPE_PARAMETERIZED``, ``TYPE_DATE``, ``TYPE_MAILBOX``, ``TYPE_ID`` and +``TYPE_PATH`` which are defined in ``Swift_Mime_Header``. + + +.. code-block:: php + + foreach ($headers->getAll() as $header) { + switch ($header->getFieldType()) { + case Swift_Mime_Header::TYPE_TEXT: $type = 'text'; + break; + case Swift_Mime_Header::TYPE_PARAMETERIZED: $type = 'parameterized'; + break; + case Swift_Mime_Header::TYPE_MAILBOX: $type = 'mailbox'; + break; + case Swift_Mime_Header::TYPE_DATE: $type = 'date'; + break; + case Swift_Mime_Header::TYPE_ID: $type = 'ID'; + break; + case Swift_Mime_Header::TYPE_PATH: $type = 'path'; + break; + } + printf("%s: is a %s header
    \n", $header->getFieldName(), $type); + } + + /* + Content-Transfer-Encoding: is a text header + Content-Type: is a parameterized header + MIME-Version: is a text header + Date: is a date header + Message-ID: is a ID header + From: is a mailbox header + Subject: is a text header + To: is a mailbox header + */ + +Headers can be removed from the set, modified within the set, or added to the +set. + +The following sections show you how to work with the HeaderSet and explain the +details of each implementation of ``Swift_Mime_Header`` that may +exist within the HeaderSet. + +Header Types +------------ + +Because all headers are modeled on different data (dates, addresses, text!) +there are different types of Header in Swift Mailer. Swift Mailer attempts to +categorize all possible MIME headers into more general groups, defined by a +small number of classes. + +Text Headers +~~~~~~~~~~~~ + +Text headers are the simplest type of Header. They contain textual information +with no special information included within it -- for example the Subject +header in a message. + +There's nothing particularly interesting about a text header, though it is +probably the one you'd opt to use if you need to add a custom header to a +message. It represents text just like you'd think it does. If the text +contains characters that are not permitted in a message header (such as new +lines, or non-ascii characters) then the header takes care of encoding the +text so that it can be used. + +No header -- including text headers -- in Swift Mailer is vulnerable to +header-injection attacks. Swift Mailer breaks any attempt at header injection by +encoding the dangerous data into a non-dangerous form. + +It's easy to add a new text header to a HeaderSet. You do this by calling the +HeaderSet's ``addTextHeader()`` method. + +.. code-block:: php + + $message = Swift_Message::newInstance(); + + $headers = $message->getHeaders(); + + $headers->addTextHeader('Your-Header-Name', 'the header value'); + +Changing the value of an existing text header is done by calling it's +``setValue()`` method. + +.. code-block:: php + + $subject = $message->getHeaders()->get('Subject'); + + $subject->setValue('new subject'); + +When output via ``toString()``, a text header produces something like the +following: + +.. code-block:: php + + $subject = $message->getHeaders()->get('Subject'); + + $subject->setValue('amazing subject line'); + + echo $subject->toString(); + + /* + + Subject: amazing subject line + + */ + +If the header contains any characters that are outside of the US-ASCII range +however, they will be encoded. This is nothing to be concerned about since +mail clients will decode them back. + +.. code-block:: php + + $subject = $message->getHeaders()->get('Subject'); + + $subject->setValue('contains – dash'); + + echo $subject->toString(); + + /* + + Subject: contains =?utf-8?Q?=E2=80=93?= dash + + */ + +Parameterized Headers +~~~~~~~~~~~~~~~~~~~~~ + +Parameterized headers are text headers that contain key-value parameters +following the textual content. The Content-Type header of a message is a +parameterized header since it contains charset information after the content +type. + +The parameterized header type is a special type of text header. It extends the +text header by allowing additional information to follow it. All of the methods +from text headers are available in addition to the methods described here. + +Adding a parameterized header to a HeaderSet is done by using the +``addParameterizedHeader()`` method which takes a text value like +``addTextHeader()`` but it also accepts an associative array of +key-value parameters. + +.. code-block:: php + + $message = Swift_Message::newInstance(); + + $headers = $message->getHeaders(); + + $headers->addParameterizedHeader( + 'Header-Name', 'header value', + array('foo' => 'bar') + ); + +To change the text value of the header, call it's ``setValue()`` method just as +you do with text headers. + +To change the parameters in the header, call the header's ``setParameters()`` +method or the ``setParameter()`` method (note the pluralization). + +.. code-block:: php + + $type = $message->getHeaders()->get('Content-Type'); + + // setParameters() takes an associative array + $type->setParameters(array( + 'name' => 'file.txt', + 'charset' => 'iso-8859-1' + )); + + // setParameter() takes two args for $key and $value + $type->setParameter('charset', 'iso-8859-1'); + +When output via ``toString()``, a parameterized header produces something like +the following: + +.. code-block:: php + + $type = $message->getHeaders()->get('Content-Type'); + + $type->setValue('text/html'); + $type->setParameter('charset', 'utf-8'); + + echo $type->toString(); + + /* + + Content-Type: text/html; charset=utf-8 + + */ + +If the header contains any characters that are outside of the US-ASCII range +however, they will be encoded, just like they are for text headers. This is +nothing to be concerned about since mail clients will decode them back. +Likewise, if the parameters contain any non-ascii characters they will be +encoded so that they can be transmitted safely. + +.. code-block:: php + + $attachment = Swift_Attachment::newInstance(); + + $disp = $attachment->getHeaders()->get('Content-Disposition'); + + $disp->setValue('attachment'); + $disp->setParameter('filename', 'report–may.pdf'); + + echo $disp->toString(); + + /* + + Content-Disposition: attachment; filename*=utf-8''report%E2%80%93may.pdf + + */ + +Date Headers +~~~~~~~~~~~~ + +Date headers contains an RFC 2822 formatted date (i.e. what PHP's ``date('r')`` +returns). They are used anywhere a date or time is needed to be presented as a +message header. + +The data on which a date header is modeled is simply a UNIX timestamp such as +that returned by ``time()`` or ``strtotime()``. The timestamp is used to create +a correctly structured RFC 2822 formatted date such as +``Tue, 17 Feb 2009 22:26:31 +1100``. + +The obvious place this header type is used is in the ``Date:`` header of the +message itself. + +It's easy to add a new date header to a HeaderSet. You do this by calling +the HeaderSet's ``addDateHeader()`` method. + +.. code-block:: php + + $message = Swift_Message::newInstance(); + + $headers = $message->getHeaders(); + + $headers->addDateHeader('Your-Header-Name', strtotime('3 days ago')); + +Changing the value of an existing date header is done by calling it's +``setTimestamp()`` method. + +.. code-block:: php + + $date = $message->getHeaders()->get('Date'); + + $date->setTimestamp(time()); + +When output via ``toString()``, a date header produces something like the +following: + +.. code-block:: php + + $date = $message->getHeaders()->get('Date'); + + echo $date->toString(); + + /* + + Date: Wed, 18 Feb 2009 13:35:02 +1100 + + */ + +Mailbox (e-mail address) Headers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Mailbox headers contain one or more email addresses, possibly with +personalized names attached to them. The data on which they are modeled is +represented by an associative array of email addresses and names. + +Mailbox headers are probably the most complex header type to understand in +Swift Mailer because they accept their input as an array which can take various +forms, as described in the previous chapter. + +All of the headers that contain e-mail addresses in a message -- with the +exception of ``Return-Path:`` which has a stricter syntax -- use this header +type. That is, ``To:``, ``From:`` etc. + +You add a new mailbox header to a HeaderSet by calling the HeaderSet's +``addMailboxHeader()`` method. + +.. code-block:: php + + $message = Swift_Message::newInstance(); + + $headers = $message->getHeaders(); + + $headers->addMailboxHeader('Your-Header-Name', array( + 'person1@example.org' => 'Person Name One', + 'person2@example.org', + 'person3@example.org', + 'person4@example.org' => 'Another named person' + )); + +Changing the value of an existing mailbox header is done by calling it's +``setNameAddresses()`` method. + +.. code-block:: php + + $to = $message->getHeaders()->get('To'); + + $to->setNameAddresses(array( + 'joe@example.org' => 'Joe Bloggs', + 'john@example.org' => 'John Doe', + 'no-name@example.org' + )); + +If you don't wish to concern yourself with the complicated accepted input +formats accepted by ``setNameAddresses()`` as described in the previous chapter +and you only want to set one or more addresses (not names) then you can just +use the ``setAddresses()`` method instead. + +.. code-block:: php + + $to = $message->getHeaders()->get('To'); + + $to->setAddresses(array( + 'joe@example.org', + 'john@example.org', + 'no-name@example.org' + )); + +.. note:: + + Both methods will accept the above input format in practice. + +If all you want to do is set a single address in the header, you can use a +string as the input parameter to ``setAddresses()`` and/or +``setNameAddresses()``. + +.. code-block:: php + + $to = $message->getHeaders()->get('To'); + + $to->setAddresses('joe-bloggs@example.org'); + +When output via ``toString()``, a mailbox header produces something like the +following: + +.. code-block:: php + + $to = $message->getHeaders()->get('To'); + + $to->setNameAddresses(array( + 'person1@example.org' => 'Name of Person', + 'person2@example.org', + 'person3@example.org' => 'Another Person' + )); + + echo $to->toString(); + + /* + + To: Name of Person , person2@example.org, Another Person + + + */ + +ID Headers +~~~~~~~~~~ + +ID headers contain identifiers for the entity (or the message). The most +notable ID header is the Message-ID header on the message itself. + +An ID that exists inside an ID header looks more-or-less less like an email +address. For example, ``<1234955437.499becad62ec2@example.org>``. +The part to the left of the @ sign is usually unique, based on the current time +and some random factor. The part on the right is usually a domain name. + +Any ID passed to the header's ``setId()`` method absolutely MUST conform to +this structure, otherwise you'll get an Exception thrown at you by Swift Mailer +(a ``Swift_RfcComplianceException``). This is to ensure that the generated +email complies with relevant RFC documents and therefore is less likely to be +blocked as spam. + +It's easy to add a new ID header to a HeaderSet. You do this by calling +the HeaderSet's ``addIdHeader()`` method. + +.. code-block:: php + + $message = Swift_Message::newInstance(); + + $headers = $message->getHeaders(); + + $headers->addIdHeader('Your-Header-Name', '123456.unqiue@example.org'); + +Changing the value of an existing date header is done by calling its +``setId()`` method. + +.. code-block:: php + + $msgId = $message->getHeaders()->get('Message-ID'); + + $msgId->setId(time() . '.' . uniqid('thing') . '@example.org'); + +When output via ``toString()``, an ID header produces something like the +following: + +.. code-block:: php + + $msgId = $message->getHeaders()->get('Message-ID'); + + echo $msgId->toString(); + + /* + + Message-ID: <1234955437.499becad62ec2@example.org> + + */ + +Path Headers +~~~~~~~~~~~~ + +Path headers are like very-restricted mailbox headers. They contain a single +email address with no associated name. The Return-Path header of a message is +a path header. + +You add a new path header to a HeaderSet by calling the HeaderSet's +``addPathHeader()`` method. + +.. code-block:: php + + $message = Swift_Message::newInstance(); + + $headers = $message->getHeaders(); + + $headers->addPathHeader('Your-Header-Name', 'person@example.org'); + + +Changing the value of an existing path header is done by calling its +``setAddress()`` method. + +.. code-block:: php + + $return = $message->getHeaders()->get('Return-Path'); + + $return->setAddress('my-address@example.org'); + +When output via ``toString()``, a path header produces something like the +following: + +.. code-block:: php + + $return = $message->getHeaders()->get('Return-Path'); + + $return->setAddress('person@example.org'); + + echo $return->toString(); + + /* + + Return-Path: + + */ + +Header Operations +----------------- + +Working with the headers in a message involves knowing how to use the methods +on the HeaderSet and on the individual Headers within the HeaderSet. + +Adding new Headers +~~~~~~~~~~~~~~~~~~ + +New headers can be added to the HeaderSet by using one of the provided +``add..Header()`` methods. + +To add a header to a MIME entity (such as the message): + +Get the HeaderSet from the entity by via its ``getHeaders()`` method. + +* Add the header to the HeaderSet by calling one of the ``add..Header()`` + methods. + +The added header will appear in the message when it is sent. + +.. code-block:: php + + // Adding a custom header to a message + $message = Swift_Message::newInstance(); + $headers = $message->getHeaders(); + $headers->addTextHeader('X-Mine', 'something here'); + + // Adding a custom header to an attachment + $attachment = Swift_Attachment::fromPath('/path/to/doc.pdf'); + $attachment->getHeaders()->addDateHeader('X-Created-Time', time()); + +Retrieving Headers +~~~~~~~~~~~~~~~~~~ + +Headers are retrieved through the HeaderSet's ``get()`` and ``getAll()`` +methods. + +To get a header, or several headers from a MIME entity: + +* Get the HeaderSet from the entity by via its ``getHeaders()`` method. + +* Get the header(s) from the HeaderSet by calling either ``get()`` or + ``getAll()``. + +When using ``get()`` a single header is returned that matches the name (case +insensitive) that is passed to it. When using ``getAll()`` with a header name, +an array of headers with that name are returned. Calling ``getAll()`` with no +arguments returns an array of all headers present in the entity. + +.. note:: + + It's valid for some headers to appear more than once in a message (e.g. + the Received header). For this reason ``getAll()`` exists to fetch all + headers with a specified name. In addition, ``get()`` accepts an optional + numerical index, starting from zero to specify which header you want more + specifically. + +.. note:: + + If you want to modify the contents of the header and you don't know for + sure what type of header it is then you may need to check the type by + calling its ``getFieldType()`` method. + + .. code-block:: php + + $headers = $message->getHeaders(); + + // Get the To: header + $toHeader = $headers->get('To'); + + // Get all headers named "X-Foo" + $fooHeaders = $headers->getAll('X-Foo'); + + // Get the second header named "X-Foo" + $foo = $headers->get('X-Foo', 1); + + // Get all headers that are present + $all = $headers->getAll(); + +Check if a Header Exists +~~~~~~~~~~~~~~~~~~~~~~~~ + +You can check if a named header is present in a HeaderSet by calling its +``has()`` method. + +To check if a header exists: + +* Get the HeaderSet from the entity by via its ``getHeaders()`` method. + +* Call the HeaderSet's ``has()`` method specifying the header you're looking + for. + +If the header exists, ``true`` will be returned or ``false`` if not. + +.. note:: + + It's valid for some headers to appear more than once in a message (e.g. + the Received header). For this reason ``has()`` accepts an optional + numerical index, starting from zero to specify which header you want to + check more specifically. + + .. code-block:: php + + $headers = $message->getHeaders(); + + // Check if the To: header exists + if ($headers->has('To')) { + echo 'To: exists'; + } + + // Check if an X-Foo header exists twice (i.e. check for the 2nd one) + if ($headers->has('X-Foo', 1)) { + echo 'Second X-Foo header exists'; + } + +Removing Headers +~~~~~~~~~~~~~~~~ + +Removing a Header from the HeaderSet is done by calling the HeaderSet's +``remove()`` or ``removeAll()`` methods. + +To remove an existing header: + +* Get the HeaderSet from the entity by via its ``getHeaders()`` method. + +* Call the HeaderSet's ``remove()`` or ``removeAll()`` methods specifying the + header you want to remove. + +When calling ``remove()`` a single header will be removed. When calling +``removeAll()`` all headers with the given name will be removed. If no headers +exist with the given name, no errors will occur. + +.. note:: + + It's valid for some headers to appear more than once in a message (e.g. + the Received header). For this reason ``remove()`` accepts an optional + numerical index, starting from zero to specify which header you want to + check more specifically. For the same reason, ``removeAll()`` exists to + remove all headers that have the given name. + + .. code-block:: php + + $headers = $message->getHeaders(); + + // Remove the Subject: header + $headers->remove('Subject'); + + // Remove all X-Foo headers + $headers->removeAll('X-Foo'); + + // Remove only the second X-Foo header + $headers->remove('X-Foo', 1); + +Modifying a Header's Content +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To change a Header's content you should know what type of header it is and then +call it's appropriate setter method. All headers also have a +``setFieldBodyModel()`` method that accepts a mixed parameter and delegates to +the correct setter. + +To modify an existing header: + +* Get the HeaderSet from the entity by via its ``getHeaders()`` method. + +* Get the Header by using the HeaderSet's ``get()``. + +* Call the Header's appropriate setter method or call the header's + ``setFieldBodyModel()`` method. + +The header will be updated inside the HeaderSet and the changes will be seen +when the message is sent. + +.. code-block:: php + + $headers = $message->getHeaders(); + + // Change the Subject: header + $subj = $headers->get('Subject'); + $subj->setValue('new subject here'); + + // Change the To: header + $to = $headers->get('To'); + $to->setNameAddresses(array( + 'person@example.org' => 'Person', + 'thing@example.org' + )); + + // Using the setFieldBodyModel() just delegates to the correct method + // So here to calls setNameAddresses() + $to->setFieldBodyModel(array( + 'person@example.org' => 'Person', + 'thing@example.org' + )); diff --git a/vendor/swiftmailer/swiftmailer/doc/help-resources.rst b/vendor/swiftmailer/swiftmailer/doc/help-resources.rst new file mode 100644 index 0000000000000000000000000000000000000000..420893590a9dd101b23d27537c18e0b4b29c8bb2 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/doc/help-resources.rst @@ -0,0 +1,44 @@ +Getting Help +============ + +There are a number of ways you can get help when using Swift Mailer, depending +upon the nature of your problem. For bug reports and feature requests create a +new ticket in GitHub. For general advice ask on the Google Group +(swiftmailer). + +Submitting Bugs & Feature Requests +---------------------------------- + +Bugs and feature requests should be posted on GitHub. + +If you post a bug or request a feature in the forum, or on the Google Group +you will most likely be asked to create a ticket in `GitHub`_ since it is +simply not feasible to manage such requests from a number of a different +sources. + +When you go to GitHub you will be asked to create a username and password +before you can create a ticket. This is free and takes very little time. + +When you create your ticket, do not assign it to any milestones. A developer +will assess your ticket and re-assign it as needed. + +If your ticket is reporting a bug present in the current version, which was +not present in the previous version please include the tag "regression" in +your ticket. + +GitHub will update you when work is performed on your ticket. + +Ask on the Google Group +----------------------- + +You can seek advice at Google Groups, within the "swiftmailer" `group`_. + +You can post messages to this group if you want help, or there's something you +wish to discuss with the developers and with other users. + +This is probably the fastest way to get help since it is primarily email-based +for most users, though bug reports should not be posted here since they may +not be resolved. + +.. _`GitHub`: https://github.com/swiftmailer/swiftmailer/issues +.. _`group`: http://groups.google.com/group/swiftmailer diff --git a/vendor/swiftmailer/swiftmailer/doc/including-the-files.rst b/vendor/swiftmailer/swiftmailer/doc/including-the-files.rst new file mode 100644 index 0000000000000000000000000000000000000000..978dca206affa47202b97045945e06858a52860e --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/doc/including-the-files.rst @@ -0,0 +1,46 @@ +Including Swift Mailer (Autoloading) +==================================== + +If you are using Composer, Swift Mailer will be automatically autoloaded. + +If not, you can use the built-in autoloader by requiring the +``swift_required.php`` file:: + + require_once '/path/to/swift-mailer/lib/swift_required.php'; + + /* rest of code goes here */ + +If you want to override the default Swift Mailer configuration, call the +``init()`` method on the ``Swift`` class and pass it a valid PHP callable (a +PHP function name, a PHP 5.3 anonymous function, ...):: + + require_once '/path/to/swift-mailer/lib/swift_required.php'; + + function swiftmailer_configurator() { + // configure Swift Mailer + + Swift_DependencyContainer::getInstance()->... + Swift_Preferences::getInstance()->... + } + + Swift::init('swiftmailer_configurator'); + + /* rest of code goes here */ + +The advantage of using the ``init()`` method is that your code will be +executed only if you use Swift Mailer in your script. + +.. note:: + + While Swift Mailer's autoloader is designed to play nicely with other + autoloaders, sometimes you may have a need to avoid using Swift Mailer's + autoloader and use your own instead. Include the ``swift_init.php`` + instead of the ``swift_required.php`` if you need to do this. The very + minimum include is the ``swift_init.php`` file since Swift Mailer will not + work without the dependency injection this file sets up: + + .. code-block:: php + + require_once '/path/to/swift-mailer/lib/swift_init.php'; + + /* rest of code goes here */ diff --git a/vendor/swiftmailer/swiftmailer/doc/index.rst b/vendor/swiftmailer/swiftmailer/doc/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..a1a0a92464103d23321e8537f601b6413ec014bd --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/doc/index.rst @@ -0,0 +1,16 @@ +Swiftmailer +=========== + +.. toctree:: + :maxdepth: 2 + + introduction + overview + installing + help-resources + including-the-files + messages + headers + sending + plugins + japanese diff --git a/vendor/swiftmailer/swiftmailer/doc/installing.rst b/vendor/swiftmailer/swiftmailer/doc/installing.rst new file mode 100644 index 0000000000000000000000000000000000000000..557211d48b2faedca150842d5efc95339940cb7a --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/doc/installing.rst @@ -0,0 +1,89 @@ +Installing the Library +====================== + +Installing with Composer +------------------------ + +The recommended way to install Swiftmailer is via Composer: + +.. code-block:: bash + + $ php composer.phar require swiftmailer/swiftmailer @stable + +Installing from Git +------------------- + +It's possible to download and install Swift Mailer directly from github.com if +you want to keep up-to-date with ease. + +Swift Mailer's source code is kept in a git repository at github.com so you +can get the source directly from the repository. + +.. note:: + + You do not need to have git installed to use Swift Mailer from GitHub. If + you don't have git installed, go to `GitHub`_ and click the "Download" + button. + +Cloning the Repository +~~~~~~~~~~~~~~~~~~~~~~ + +The repository can be cloned from git://github.com/swiftmailer/swiftmailer.git +using the ``git clone`` command. + +You will need to have ``git`` installed before you can use the +``git clone`` command. + +To clone the repository: + +* Open your favorite terminal environment (command line). + +* Move to the directory you want to clone to. + +* Run the command ``git clone git://github.com/swiftmailer/swiftmailer.git + swiftmailer``. + +The source code will be downloaded into a directory called "swiftmailer". + +The example shows the process on a UNIX-like system such as Linux, BSD or Mac +OS X. + +.. code-block:: bash + + $ cd source_code/ + $ git clone git://github.com/swiftmailer/swiftmailer.git swiftmailer + Initialized empty Git repository in /Users/chris/source_code/swiftmailer/.git/ + remote: Counting objects: 6815, done. + remote: Compressing objects: 100% (2761/2761), done. + remote: Total 6815 (delta 3641), reused 6326 (delta 3286) + Receiving objects: 100% (6815/6815), 4.35 MiB | 162 KiB/s, done. + Resolving deltas: 100% (3641/3641), done. + Checking out files: 100% (1847/1847), done. + $ cd swiftmailer/ + $ ls + CHANGES LICENSE ... + $ + +Troubleshooting +--------------- + +Swift Mailer does not work when used with function overloading as implemented +by ``mbstring`` (``mbstring.func_overload`` set to ``2``). A workaround is to +temporarily change the internal encoding to ``ASCII`` when sending an email: + +.. code-block:: php + + if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) + { + $mbEncoding = mb_internal_encoding(); + mb_internal_encoding('ASCII'); + } + + // Create your message and send it with Swift Mailer + + if (isset($mbEncoding)) + { + mb_internal_encoding($mbEncoding); + } + +.. _`GitHub`: http://github.com/swiftmailer/swiftmailer diff --git a/vendor/swiftmailer/swiftmailer/doc/introduction.rst b/vendor/swiftmailer/swiftmailer/doc/introduction.rst new file mode 100644 index 0000000000000000000000000000000000000000..a85336b7ce14090caf930822e890c4f2a1485e5c --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/doc/introduction.rst @@ -0,0 +1,135 @@ +Introduction +============ + +Swift Mailer is a component-based library for sending e-mails from PHP +applications. + +Organization of this Book +------------------------- + +This book has been written so that those who need information quickly are able +to find what they need, and those who wish to learn more advanced topics can +read deeper into each chapter. + +The book begins with an overview of Swift Mailer, discussing what's included +in the package and preparing you for the remainder of the book. + +It is possible to read this user guide just like any other book (from +beginning to end). Each chapter begins with a discussion of the contents it +contains, followed by a short code sample designed to give you a head start. +As you get further into a chapter you will learn more about Swift Mailer's +capabilities, but often you will be able to head directly to the topic you +wish to learn about. + +Throughout this book you will be presented with code samples, which most +people should find ample to implement Swift Mailer appropriately in their own +projects. We will also use diagrams where appropriate, and where we believe +readers may find it helpful we will discuss some related theory, including +reference to certain documents you are able to find online. + +Code Samples +------------ + +Code samples presented in this book will be displayed on a different colored +background in a monospaced font. Samples are not to be taken as copy & paste +code snippets. + +Code examples are used through the book to clarify what is written in text. +They will sometimes be usable as-is, but they should always be taken as +outline/pseudo code only. + +A code sample will look like this:: + + class AClass + { + ... + } + + // A Comment + $obj = new AClass($arg1, $arg2, ... ); + + /* A note about another way of doing something + $obj = AClass::newInstance($arg1, $arg2, ... ); + + */ + +The presence of 3 dots ``...`` in a code sample indicates that we have left +out a chunk of the code for brevity, they are not actually part of the code. + +We will often place multi-line comments ``/* ... */`` in the code so that we +can show alternative ways of achieving the same result. + +You should read the code examples given and try to understand them. They are +kept concise so that you are not overwhelmed with information. + +History of Swift Mailer +----------------------- + +Swift Mailer began back in 2005 as a one-class project for sending mail over +SMTP. It has since grown into the flexible component-based library that is in +development today. + +Chris Corbyn first posted Swift Mailer on a web forum asking for comments from +other developers. It was never intended as a fully supported open source +project, but members of the forum began to adopt it and make use of it. + +Very quickly feature requests were coming for the ability to add attachments +and use SMTP authentication, along with a number of other "obvious" missing +features. Considering the only alternative was PHPMailer it seemed like a good +time to bring some fresh tools to the table. Chris began working towards a +more component based, PHP5-like approach unlike the existing single-class, +legacy PHP4 approach taken by PHPMailer. + +Members of the forum offered a lot of advice and critique on the code as he +worked through this project and released versions 2 and 3 of the library in +2005 and 2006, which by then had been broken down into smaller classes +offering more flexibility and supporting plugins. To this day the Swift Mailer +team still receive a lot of feature requests from users both on the forum and +in by email. + +Until 2008 Chris was the sole developer of Swift Mailer, but entering 2009 he +gained the support of two experienced developers well-known to him: Paul +Annesley and Christopher Thompson. This has been an extremely welcome change. + +As of September 2009, Chris handed over the maintenance of Swift Mailer to +Fabien Potencier. + +Now 2009 and in its fourth major version Swift Mailer is more object-oriented +and flexible than ever, both from a usability standpoint and from a +development standpoint. + +By no means is Swift Mailer ready to call "finished". There are still many +features that can be added to the library along with the constant refactoring +that happens behind the scenes. + +It's a Library! +--------------- + +Swift Mailer is not an application - it's a library. + +To most experienced developers this is probably an obvious point to make, but +it's certainly worth mentioning. Many people often contact us having gotten +the completely wrong end of the stick in terms of what Swift Mailer is +actually for. + +It's not an application. It does not have a graphical user interface. It +cannot be opened in your web browser directly. + +It's a library (or a framework if you like). It provides a whole lot of +classes that do some very complicated things, so that you don't have to. You +"use" Swift Mailer within an application so that your application can have the +ability to send emails. + +The component-based structure of the library means that you are free to +implement it in a number of different ways and that you can pick and choose +what you want to use. + +An application on the other hand (such as a blog or a forum) is already "put +together" in a particular way, (usually) provides a graphical user interface +and most likely doesn't offer a great deal of integration with your own +application. + +Embrace the structure of the library and use the components it offers to your +advantage. Learning what the components do, rather than blindly copying and +pasting existing code will put you in a great position to build a powerful +application! diff --git a/vendor/swiftmailer/swiftmailer/doc/japanese.rst b/vendor/swiftmailer/swiftmailer/doc/japanese.rst new file mode 100644 index 0000000000000000000000000000000000000000..34afa7b8fba578ae3f531a4618effbf7a56e4c8c --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/doc/japanese.rst @@ -0,0 +1,22 @@ +Using Swift Mailer for Japanese Emails +====================================== + +To send emails in Japanese, you need to tweak the default configuration. + +After requiring the Swift Mailer autoloader (by including the +``swift_required.php`` file), call the ``Swift::init()`` method with the +following code:: + + require_once '/path/to/swift-mailer/lib/swift_required.php'; + + Swift::init(function () { + Swift_DependencyContainer::getInstance() + ->register('mime.qpheaderencoder') + ->asAliasOf('mime.base64headerencoder'); + + Swift_Preferences::getInstance()->setCharset('iso-2022-jp'); + }); + + /* rest of code goes here */ + +That's all! diff --git a/vendor/swiftmailer/swiftmailer/doc/messages.rst b/vendor/swiftmailer/swiftmailer/doc/messages.rst new file mode 100644 index 0000000000000000000000000000000000000000..fb5e7fc390b7b8bbc082c17f25052f5d4a1b0d2f --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/doc/messages.rst @@ -0,0 +1,1061 @@ +Creating Messages +================= + +Creating messages in Swift Mailer is done by making use of the various MIME +entities provided with the library. Complex messages can be quickly created +with very little effort. + +Quick Reference for Creating a Message +--------------------------------------- + +You can think of creating a Message as being similar to the steps you perform +when you click the Compose button in your mail client. You give it a subject, +specify some recipients, add any attachments and write your message. + +To create a Message: + +* Call the ``newInstance()`` method of ``Swift_Message``. + +* Set your sender address (``From:``) with ``setFrom()`` or ``setSender()``. + +* Set a subject line with ``setSubject()``. + +* Set recipients with ``setTo()``, ``setCc()`` and/or ``setBcc()``. + +* Set a body with ``setBody()``. + +* Add attachments with ``attach()``. + +.. code-block:: php + + require_once 'lib/swift_required.php'; + + // Create the message + $message = Swift_Message::newInstance() + + // Give the message a subject + ->setSubject('Your subject') + + // Set the From address with an associative array + ->setFrom(array('john@doe.com' => 'John Doe')) + + // Set the To addresses with an associative array + ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) + + // Give it a body + ->setBody('Here is the message itself') + + // And optionally an alternative body + ->addPart('Here is the message itself', 'text/html') + + // Optionally add any attachments + ->attach(Swift_Attachment::fromPath('my-document.pdf')) + ; + +Message Basics +-------------- + +A message is a container for anything you want to send to somebody else. There +are several basic aspects of a message that you should know. + +An e-mail message is made up of several relatively simple entities that are +combined in different ways to achieve different results. All of these entities +have the same fundamental outline but serve a different purpose. The Message +itself can be defined as a MIME entity, an Attachment is a MIME entity, all +MIME parts are MIME entities -- and so on! + +The basic units of each MIME entity -- be it the Message itself, or an +Attachment -- are its Headers and its body: + +.. code-block:: text + + Header-Name: A header value + Other-Header: Another value + + The body content itself + +The Headers of a MIME entity, and its body must conform to some strict +standards defined by various RFC documents. Swift Mailer ensures that these +specifications are followed by using various types of object, including +Encoders and different Header types to generate the entity. + +The Structure of a Message +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Of all of the MIME entities, a message -- ``Swift_Message`` +is the largest and most complex. It has many properties that can be updated +and it can contain other MIME entities -- attachments for example -- +nested inside it. + +A Message has a lot of different Headers which are there to present +information about the message to the recipients' mail client. Most of these +headers will be familiar to the majority of users, but we'll list the basic +ones. Although it's possible to work directly with the Headers of a Message +(or other MIME entity), the standard Headers have accessor methods provided to +abstract away the complex details for you. For example, although the Date on a +message is written with a strict format, you only need to pass a UNIX +timestamp to ``setDate()``. + ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| Header | Description | Accessors | ++===============================+====================================================================================================================================+=============================================+ +| ``Message-ID`` | Identifies this message with a unique ID, usually containing the domain name and time generated | ``getId()`` / ``setId()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Return-Path`` | Specifies where bounces should go (Swift Mailer reads this for other uses) | ``getReturnPath()`` / ``setReturnPath()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``From`` | Specifies the address of the person who the message is from. This can be multiple addresses if multiple people wrote the message. | ``getFrom()`` / ``setFrom()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Sender`` | Specifies the address of the person who physically sent the message (higher precedence than ``From:``) | ``getSender()`` / ``setSender()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``To`` | Specifies the addresses of the intended recipients | ``getTo()`` / ``setTo()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Cc`` | Specifies the addresses of recipients who will be copied in on the message | ``getCc()`` / ``setCc()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Bcc`` | Specifies the addresses of recipients who the message will be blind-copied to. Other recipients will not be aware of these copies. | ``getBcc()`` / ``setBcc()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Reply-To`` | Specifies the address where replies are sent to | ``getReplyTo()`` / ``setReplyTo()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Subject`` | Specifies the subject line that is displayed in the recipients' mail client | ``getSubject()`` / ``setSubject()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Date`` | Specifies the date at which the message was sent | ``getDate()`` / ``setDate()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Content-Type`` | Specifies the format of the message (usually text/plain or text/html) | ``getContentType()`` / ``setContentType()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Content-Transfer-Encoding`` | Specifies the encoding scheme in the message | ``getEncoder()`` / ``setEncoder()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ + +Working with a Message Object +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Although there are a lot of available methods on a message object, you only +need to make use of a small subset of them. Usually you'll use +``setSubject()``, ``setTo()`` and +``setFrom()`` before setting the body of your message with +``setBody()``. + +Calling methods is simple. You just call them like functions, but using the +object operator "``->``" to do so. If you've created +a message object and called it ``$message`` then you'd set a +subject on it like so: + +.. code-block:: php + + require_once 'lib/swift_required.php'; + + $message = Swift_Message::newInstance(); + $message->setSubject('My subject'); + +All MIME entities (including a message) have a ``toString()`` +method that you can call if you want to take a look at what is going to be +sent. For example, if you ``echo +$message->toString();`` you would see something like this: + +.. code-block:: bash + + Message-ID: <1230173678.4952f5eeb1432@swift.generated> + Date: Thu, 25 Dec 2008 13:54:38 +1100 + Subject: Example subject + From: Chris Corbyn + To: Receiver Name + MIME-Version: 1.0 + Content-Type: text/plain; charset=utf-8 + Content-Transfer-Encoding: quoted-printable + + Here is the message + +We'll take a closer look at the methods you use to create your message in the +following sections. + +Adding Content to Your Message +------------------------------ + +Rich content can be added to messages in Swift Mailer with relative ease by +calling methods such as ``setSubject()``, ``setBody()``, ``addPart()`` and +``attach()``. + +Setting the Subject Line +~~~~~~~~~~~~~~~~~~~~~~~~ + +The subject line, displayed in the recipients' mail client can be set with the +``setSubject()`` method, or as a parameter to ``Swift_Message::newInstance()``. + +To set the subject of your Message: + +* Call the ``setSubject()`` method of the Message, or specify it at the time + you create the message. + + .. code-block:: php + + // Pass it as a parameter when you create the message + $message = Swift_Message::newInstance('My amazing subject'); + + // Or set it after like this + $message->setSubject('My amazing subject'); + +Setting the Body Content +~~~~~~~~~~~~~~~~~~~~~~~~ + +The body of the message -- seen when the user opens the message -- +is specified by calling the ``setBody()`` method. If an alternative body is to +be included ``addPart()`` can be used. + +The body of a message is the main part that is read by the user. Often people +want to send a message in HTML format (``text/html``), other +times people want to send in plain text (``text/plain``), or +sometimes people want to send both versions and allow the recipient to choose +how they view the message. + +As a rule of thumb, if you're going to send a HTML email, always include a +plain-text equivalent of the same content so that users who prefer to read +plain text can do so. + +To set the body of your Message: + +* Call the ``setBody()`` method of the Message, or specify it at the time you + create the message. + +* Add any alternative bodies with ``addPart()``. + +If the recipient's mail client offers preferences for displaying text vs. HTML +then the mail client will present that part to the user where available. In +other cases the mail client will display the "best" part it can - usually HTML +if you've included HTML. + +.. code-block:: php + + // Pass it as a parameter when you create the message + $message = Swift_Message::newInstance('Subject here', 'My amazing body'); + + // Or set it after like this + $message->setBody('My amazing body', 'text/html'); + + // Add alternative parts with addPart() + $message->addPart('My amazing body in plain text', 'text/plain'); + +Attaching Files +--------------- + +Attachments are downloadable parts of a message and can be added by calling +the ``attach()`` method on the message. You can add attachments that exist on +disk, or you can create attachments on-the-fly. + +Attachments are actually an interesting area of Swift Mailer and something +that could put a lot of power at your fingertips if you grasp the concept +behind the way a message is held together. + +Although we refer to files sent over e-mails as "attachments" -- because +they're attached to the message -- lots of other parts of the message are +actually "attached" even if we don't refer to these parts as attachments. + +File attachments are created by the ``Swift_Attachment`` class +and then attached to the message via the ``attach()`` method on +it. For all of the "every day" MIME types such as all image formats, word +documents, PDFs and spreadsheets you don't need to explicitly set the +content-type of the attachment, though it would do no harm to do so. For less +common formats you should set the content-type -- which we'll cover in a +moment. + +Attaching Existing Files +~~~~~~~~~~~~~~~~~~~~~~~~ + +Files that already exist, either on disk or at a URL can be attached to a +message with just one line of code, using ``Swift_Attachment::fromPath()``. + +You can attach files that exist locally, or if your PHP installation has +``allow_url_fopen`` turned on you can attach files from other +websites. + +To attach an existing file: + +* Create an attachment with ``Swift_Attachment::fromPath()``. + +* Add the attachment to the message with ``attach()``. + +The attachment will be presented to the recipient as a downloadable file with +the same filename as the one you attached. + +.. code-block:: php + + // Create the attachment + // * Note that you can technically leave the content-type parameter out + $attachment = Swift_Attachment::fromPath('/path/to/image.jpg', 'image/jpeg'); + + // Attach it to the message + $message->attach($attachment); + + + // The two statements above could be written in one line instead + $message->attach(Swift_Attachment::fromPath('/path/to/image.jpg')); + + + // You can attach files from a URL if allow_url_fopen is on in php.ini + $message->attach(Swift_Attachment::fromPath('http://site.tld/logo.png')); + +Setting the Filename +~~~~~~~~~~~~~~~~~~~~ + +Usually you don't need to explicitly set the filename of an attachment because +the name of the attached file will be used by default, but if you want to set +the filename you use the ``setFilename()`` method of the Attachment. + +To change the filename of an attachment: + +* Call its ``setFilename()`` method. + +The attachment will be attached in the normal way, but meta-data sent inside +the email will rename the file to something else. + +.. code-block:: php + + // Create the attachment and call its setFilename() method + $attachment = Swift_Attachment::fromPath('/path/to/image.jpg') + ->setFilename('cool.jpg'); + + + // Because there's a fluid interface, you can do this in one statement + $message->attach( + Swift_Attachment::fromPath('/path/to/image.jpg')->setFilename('cool.jpg') + ); + +Attaching Dynamic Content +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Files that are generated at runtime, such as PDF documents or images created +via GD can be attached directly to a message without writing them out to disk. +Use the standard ``Swift_Attachment::newInstance()`` method. + +To attach dynamically created content: + +* Create your content as you normally would. + +* Create an attachment with ``Swift_Attachment::newInstance()``, specifying + the source data of your content along with a name and the content-type. + +* Add the attachment to the message with ``attach()``. + +The attachment will be presented to the recipient as a downloadable file +with the filename and content-type you specify. + +.. note:: + + If you would usually write the file to disk anyway you should just attach + it with ``Swift_Attachment::fromPath()`` since this will use less memory: + + .. code-block:: php + + // Create your file contents in the normal way, but don't write them to disk + $data = create_my_pdf_data(); + + // Create the attachment with your data + $attachment = Swift_Attachment::newInstance($data, 'my-file.pdf', 'application/pdf'); + + // Attach it to the message + $message->attach($attachment); + + + // You can alternatively use method chaining to build the attachment + $attachment = Swift_Attachment::newInstance() + ->setFilename('my-file.pdf') + ->setContentType('application/pdf') + ->setBody($data) + ; + +Changing the Disposition +~~~~~~~~~~~~~~~~~~~~~~~~ + +Attachments just appear as files that can be saved to the Desktop if desired. +You can make attachment appear inline where possible by using the +``setDisposition()`` method of an attachment. + +To make an attachment appear inline: + +* Call its ``setDisposition()`` method. + +The attachment will be displayed within the email viewing window if the mail +client knows how to display it. + +.. note:: + + If you try to create an inline attachment for a non-displayable file type + such as a ZIP file, the mail client should just present the attachment as + normal: + + .. code-block:: php + + // Create the attachment and call its setDisposition() method + $attachment = Swift_Attachment::fromPath('/path/to/image.jpg') + ->setDisposition('inline'); + + + // Because there's a fluid interface, you can do this in one statement + $message->attach( + Swift_Attachment::fromPath('/path/to/image.jpg')->setDisposition('inline') + ); + +Embedding Inline Media Files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Often people want to include an image or other content inline with a HTML +message. It's easy to do this with HTML linking to remote resources, but this +approach is usually blocked by mail clients. Swift Mailer allows you to embed +your media directly into the message. + +Mail clients usually block downloads from remote resources because this +technique was often abused as a mean of tracking who opened an email. If +you're sending a HTML email and you want to include an image in the message +another approach you can take is to embed the image directly. + +Swift Mailer makes embedding files into messages extremely streamlined. You +embed a file by calling the ``embed()`` method of the message, +which returns a value you can use in a ``src`` or +``href`` attribute in your HTML. + +Just like with attachments, it's possible to embed dynamically generated +content without having an existing file available. + +The embedded files are sent in the email as a special type of attachment that +has a unique ID used to reference them within your HTML attributes. On mail +clients that do not support embedded files they may appear as attachments. + +Although this is commonly done for images, in theory it will work for any +displayable (or playable) media type. Support for other media types (such as +video) is dependent on the mail client however. + +Embedding Existing Files +........................ + +Files that already exist, either on disk or at a URL can be embedded in a +message with just one line of code, using ``Swift_EmbeddedFile::fromPath()``. + +You can embed files that exist locally, or if your PHP installation has +``allow_url_fopen`` turned on you can embed files from other websites. + +To embed an existing file: + +* Create a message object with ``Swift_Message::newInstance()``. + +* Set the body as HTML, and embed a file at the correct point in the message with ``embed()``. + +The file will be displayed with the message inline with the HTML wherever its ID +is used as a ``src`` attribute. + +.. note:: + + ``Swift_Image`` and ``Swift_EmbeddedFile`` are just aliases of one + another. ``Swift_Image`` exists for semantic purposes. + +.. note:: + + You can embed files in two stages if you prefer. Just capture the return + value of ``embed()`` in a variable and use that as the ``src`` attribute. + + .. code-block:: php + + // Create the message + $message = Swift_Message::newInstance('My subject'); + + // Set the body + $message->setBody( + '' . + ' ' . + ' ' . + ' Here is an image Image' . + ' Rest of message' . + ' ' . + '', + 'text/html' // Mark the content-type as HTML + ); + + // You can embed files from a URL if allow_url_fopen is on in php.ini + $message->setBody( + '' . + ' ' . + ' ' . + ' Here is an image Image' . + ' Rest of message' . + ' ' . + '', + 'text/html' + ); + + + // If placing the embed() code inline becomes cumbersome + // it's easy to do this in two steps + $cid = $message->embed(Swift_Image::fromPath('image.png')); + + $message->setBody( + '' . + ' ' . + ' ' . + ' Here is an image Image' . + ' Rest of message' . + ' ' . + '', + 'text/html' // Mark the content-type as HTML + ); + +Embedding Dynamic Content +......................... + +Images that are generated at runtime, such as images created via GD can be +embedded directly to a message without writing them out to disk. Use the +standard ``Swift_Image::newInstance()`` method. + +To embed dynamically created content: + +* Create a message object with ``Swift_Message::newInstance()``. + +* Set the body as HTML, and embed a file at the correct point in the message + with ``embed()``. You will need to specify a filename and a content-type. + +The file will be displayed with the message inline with the HTML wherever its ID +is used as a ``src`` attribute. + +.. note:: + + ``Swift_Image`` and ``Swift_EmbeddedFile`` are just aliases of one + another. ``Swift_Image`` exists for semantic purposes. + +.. note:: + + You can embed files in two stages if you prefer. Just capture the return + value of ``embed()`` in a variable and use that as the ``src`` attribute. + + .. code-block:: php + + // Create your file contents in the normal way, but don't write them to disk + $img_data = create_my_image_data(); + + // Create the message + $message = Swift_Message::newInstance('My subject'); + + // Set the body + $message->setBody( + '' . + ' ' . + ' ' . + ' Here is an image Image' . + ' Rest of message' . + ' ' . + '', + 'text/html' // Mark the content-type as HTML + ); + + + // If placing the embed() code inline becomes cumbersome + // it's easy to do this in two steps + $cid = $message->embed(Swift_Image::newInstance($img_data, 'image.jpg', 'image/jpeg')); + + $message->setBody( + '' . + ' ' . + ' ' . + ' Here is an image Image' . + ' Rest of message' . + ' ' . + '', + 'text/html' // Mark the content-type as HTML + ); + +Adding Recipients to Your Message +--------------------------------- + +Recipients are specified within the message itself via ``setTo()``, ``setCc()`` +and ``setBcc()``. Swift Mailer reads these recipients from the message when it +gets sent so that it knows where to send the message to. + +Message recipients are one of three types: + +* ``To:`` recipients -- the primary recipients (required) + +* ``Cc:`` recipients -- receive a copy of the message (optional) + +* ``Bcc:`` recipients -- hidden from other recipients (optional) + +Each type can contain one, or several addresses. It's possible to list only +the addresses of the recipients, or you can personalize the address by +providing the real name of the recipient. + +Make sure to add only valid email addresses as recipients. If you try to add an +invalid email address with ``setTo()``, ``setCc()`` or ``setBcc()``, Swift +Mailer will throw a ``Swift_RfcComplianceException``. + +If you add recipients automatically based on a data source that may contain +invalid email addresses, you can prevent possible exceptions by validating the +addresses using ``Swift_Validate::email($email)`` and only adding addresses +that validate. Another way would be to wrap your ``setTo()``, ``setCc()`` and +``setBcc()`` calls in a try-catch block and handle the +``Swift_RfcComplianceException`` in the catch block. + +.. sidebar:: Syntax for Addresses + + If you only wish to refer to a single email address (for example your + ``From:`` address) then you can just use a string. + + .. code-block:: php + + $message->setFrom('some@address.tld'); + + If you want to include a name then you must use an associative array. + + .. code-block:: php + + $message->setFrom(array('some@address.tld' => 'The Name')); + + If you want to include multiple addresses then you must use an array. + + .. code-block:: php + + $message->setTo(array('some@address.tld', 'other@address.tld')); + + You can mix personalized (addresses with a name) and non-personalized + addresses in the same list by mixing the use of associative and + non-associative array syntax. + + .. code-block:: php + + $message->setTo(array( + 'recipient-with-name@example.org' => 'Recipient Name One', + 'no-name@example.org', // Note that this is not a key-value pair + 'named-recipient@example.org' => 'Recipient Name Two' + )); + +Setting ``To:`` Recipients +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``To:`` recipients are required in a message and are set with the +``setTo()`` or ``addTo()`` methods of the message. + +To set ``To:`` recipients, create the message object using either +``new Swift_Message( ... )`` or ``Swift_Message::newInstance( ... )``, +then call the ``setTo()`` method with a complete array of addresses, or use the +``addTo()`` method to iteratively add recipients. + +The ``setTo()`` method accepts input in various formats as described earlier in +this chapter. The ``addTo()`` method takes either one or two parameters. The +first being the email address and the second optional parameter being the name +of the recipient. + +``To:`` recipients are visible in the message headers and will be +seen by the other recipients. + +.. note:: + + Multiple calls to ``setTo()`` will not add new recipients -- each + call overrides the previous calls. If you want to iteratively add + recipients, use the ``addTo()`` method. + + .. code-block:: php + + // Using setTo() to set all recipients in one go + $message->setTo(array( + 'person1@example.org', + 'person2@otherdomain.org' => 'Person 2 Name', + 'person3@example.org', + 'person4@example.org', + 'person5@example.org' => 'Person 5 Name' + )); + + // Using addTo() to add recipients iteratively + $message->addTo('person1@example.org'); + $message->addTo('person2@example.org', 'Person 2 Name'); + +Setting ``Cc:`` Recipients +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``Cc:`` recipients are set with the ``setCc()`` or ``addCc()`` methods of the +message. + +To set ``Cc:`` recipients, create the message object using either +``new Swift_Message( ... )`` or ``Swift_Message::newInstance( ... )``, then call +the ``setCc()`` method with a complete array of addresses, or use the +``addCc()`` method to iteratively add recipients. + +The ``setCc()`` method accepts input in various formats as described earlier in +this chapter. The ``addCc()`` method takes either one or two parameters. The +first being the email address and the second optional parameter being the name +of the recipient. + +``Cc:`` recipients are visible in the message headers and will be +seen by the other recipients. + +.. note:: + + Multiple calls to ``setCc()`` will not add new recipients -- each + call overrides the previous calls. If you want to iteratively add Cc: + recipients, use the ``addCc()`` method. + + .. code-block:: php + + // Using setCc() to set all recipients in one go + $message->setCc(array( + 'person1@example.org', + 'person2@otherdomain.org' => 'Person 2 Name', + 'person3@example.org', + 'person4@example.org', + 'person5@example.org' => 'Person 5 Name' + )); + + // Using addCc() to add recipients iteratively + $message->addCc('person1@example.org'); + $message->addCc('person2@example.org', 'Person 2 Name'); + +Setting ``Bcc:`` Recipients +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``Bcc:`` recipients receive a copy of the message without anybody else knowing +it, and are set with the ``setBcc()`` or ``addBcc()`` methods of the message. + +To set ``Bcc:`` recipients, create the message object using either ``new +Swift_Message( ... )`` or ``Swift_Message::newInstance( ... )``, then call the +``setBcc()`` method with a complete array of addresses, or use +the ``addBcc()`` method to iteratively add recipients. + +The ``setBcc()`` method accepts input in various formats as described earlier in +this chapter. The ``addBcc()`` method takes either one or two parameters. The +first being the email address and the second optional parameter being the name +of the recipient. + +Only the individual ``Bcc:`` recipient will see their address in the message +headers. Other recipients (including other ``Bcc:`` recipients) will not see the +address. + +.. note:: + + Multiple calls to ``setBcc()`` will not add new recipients -- each + call overrides the previous calls. If you want to iteratively add Bcc: + recipients, use the ``addBcc()`` method. + + .. code-block:: php + + // Using setBcc() to set all recipients in one go + $message->setBcc(array( + 'person1@example.org', + 'person2@otherdomain.org' => 'Person 2 Name', + 'person3@example.org', + 'person4@example.org', + 'person5@example.org' => 'Person 5 Name' + )); + + // Using addBcc() to add recipients iteratively + $message->addBcc('person1@example.org'); + $message->addBcc('person2@example.org', 'Person 2 Name'); + +Specifying Sender Details +------------------------- + +An email must include information about who sent it. Usually this is managed +by the ``From:`` address, however there are other options. + +The sender information is contained in three possible places: + +* ``From:`` -- the address(es) of who wrote the message (required) + +* ``Sender:`` -- the address of the single person who sent the message + (optional) + +* ``Return-Path:`` -- the address where bounces should go to (optional) + +You must always include a ``From:`` address by using ``setFrom()`` on the +message. Swift Mailer will use this as the default ``Return-Path:`` unless +otherwise specified. + +The ``Sender:`` address exists because the person who actually sent the email +may not be the person who wrote the email. It has a higher precedence than the +``From:`` address and will be used as the ``Return-Path:`` unless otherwise +specified. + +Setting the ``From:`` Address +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A ``From:`` address is required and is set with the ``setFrom()`` method of the +message. ``From:`` addresses specify who actually wrote the email, and usually who sent it. + +What most people probably don't realise is that you can have more than one +``From:`` address if more than one person wrote the email -- for example if an +email was put together by a committee. + +To set the ``From:`` address(es): + +* Call the ``setFrom()`` method on the Message. + +The ``From:`` address(es) are visible in the message headers and +will be seen by the recipients. + +.. note:: + + If you set multiple ``From:`` addresses then you absolutely must set a + ``Sender:`` address to indicate who physically sent the message. + + .. code-block:: php + + // Set a single From: address + $message->setFrom('your@address.tld'); + + // Set a From: address including a name + $message->setFrom(array('your@address.tld' => 'Your Name')); + + // Set multiple From: addresses if multiple people wrote the email + $message->setFrom(array( + 'person1@example.org' => 'Sender One', + 'person2@example.org' => 'Sender Two' + )); + +Setting the ``Sender:`` Address +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A ``Sender:`` address specifies who sent the message and is set with the +``setSender()`` method of the message. + +To set the ``Sender:`` address: + +* Call the ``setSender()`` method on the Message. + +The ``Sender:`` address is visible in the message headers and will be seen by +the recipients. + +This address will be used as the ``Return-Path:`` unless otherwise specified. + +.. note:: + + If you set multiple ``From:`` addresses then you absolutely must set a + ``Sender:`` address to indicate who physically sent the message. + +You must not set more than one sender address on a message because it's not +possible for more than one person to send a single message. + +.. code-block:: php + + $message->setSender('your@address.tld'); + +Setting the ``Return-Path:`` (Bounce) Address +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``Return-Path:`` address specifies where bounce notifications should +be sent and is set with the ``setReturnPath()`` method of the message. + +You can only have one ``Return-Path:`` and it must not include +a personal name. + +To set the ``Return-Path:`` address: + +* Call the ``setReturnPath()`` method on the Message. + +Bounce notifications will be sent to this address. + +.. code-block:: php + + $message->setReturnPath('bounces@address.tld'); + + +Signed/Encrypted Message +------------------------ + +To increase the integrity/security of a message it is possible to sign and/or +encrypt an message using one or multiple signers. + +S/MIME +~~~~~~ + +S/MIME can sign and/or encrypt a message using the OpenSSL extension. + +When signing a message, the signer creates a signature of the entire content of the message (including attachments). + +The certificate and private key must be PEM encoded, and can be either created using for example OpenSSL or +obtained at an official Certificate Authority (CA). + +**The recipient must have the CA certificate in the list of trusted issuers in order to verify the signature.** + +**Make sure the certificate supports emailProtection.** + +When using OpenSSL this can done by the including the *-addtrust emailProtection* parameter when creating the certificate. + +.. code-block:: php + + $message = Swift_Message::newInstance(); + + $smimeSigner = Swift_Signers_SMimeSigner::newInstance(); + $smimeSigner->setSignCertificate('/path/to/certificate.pem', '/path/to/private-key.pem'); + $message->attachSigner($smimeSigner); + +When the private key is secured using a passphrase use the following instead. + +.. code-block:: php + + $message = Swift_Message::newInstance(); + + $smimeSigner = Swift_Signers_SMimeSigner::newInstance(); + $smimeSigner->setSignCertificate('/path/to/certificate.pem', array('/path/to/private-key.pem', 'passphrase')); + $message->attachSigner($smimeSigner); + +By default the signature is added as attachment, +making the message still readable for mailing agents not supporting signed messages. + +Storing the message as binary is also possible but not recommended. + +.. code-block:: php + + $smimeSigner->setSignCertificate('/path/to/certificate.pem', '/path/to/private-key.pem', PKCS7_BINARY); + +When encrypting the message (also known as enveloping), the entire message (including attachments) +is encrypted using a certificate, and the recipient can then decrypt the message using corresponding private key. + +Encrypting ensures nobody can read the contents of the message without the private key. + +Normally the recipient provides a certificate for encrypting and keeping the decryption key private. + +Using both signing and encrypting is also possible. + +.. code-block:: php + + $message = Swift_Message::newInstance(); + + $smimeSigner = Swift_Signers_SMimeSigner::newInstance(); + $smimeSigner->setSignCertificate('/path/to/sign-certificate.pem', '/path/to/private-key.pem'); + $smimeSigner->setEncryptCertificate('/path/to/encrypt-certificate.pem'); + $message->attachSigner($smimeSigner); + +The used encryption cipher can be set as the second parameter of setEncryptCertificate() + +See http://php.net/manual/openssl.ciphers for a list of supported ciphers. + +By default the message is first signed and then encrypted, this can be changed by adding. + +.. code-block:: php + + $smimeSigner->setSignThenEncrypt(false); + +**Changing this is not recommended as most mail agents don't support this none-standard way.** + +Only when having trouble with sign then encrypt method, this should be changed. + +Requesting a Read Receipt +------------------------- + +It is possible to request a read-receipt to be sent to an address when the +email is opened. To request a read receipt set the address with +``setReadReceiptTo()``. + +To request a read receipt: + +* Set the address you want the receipt to be sent to with the + ``setReadReceiptTo()`` method on the Message. + +When the email is opened, if the mail client supports it a notification will be sent to this address. + +.. note:: + + Read receipts won't work for the majority of recipients since many mail + clients auto-disable them. Those clients that will send a read receipt + will make the user aware that one has been requested. + + .. code-block:: php + + $message->setReadReceiptTo('your@address.tld'); + +Setting the Character Set +------------------------- + +The character set of the message (and it's MIME parts) is set with the +``setCharset()`` method. You can also change the global default of UTF-8 by +working with the ``Swift_Preferences`` class. + +Swift Mailer will default to the UTF-8 character set unless otherwise +overridden. UTF-8 will work in most instances since it includes all of the +standard US keyboard characters in addition to most international characters. + +It is absolutely vital however that you know what character set your message +(or it's MIME parts) are written in otherwise your message may be received +completely garbled. + +There are two places in Swift Mailer where you can change the character set: + +* In the ``Swift_Preferences`` class + +* On each individual message and/or MIME part + +To set the character set of your Message: + +* Change the global UTF-8 setting by calling + ``Swift_Preferences::setCharset()``; or + +* Call the ``setCharset()`` method on the message or the MIME part. + + .. code-block:: php + + // Approach 1: Change the global setting (suggested) + Swift_Preferences::getInstance()->setCharset('iso-8859-2'); + + // Approach 2: Call the setCharset() method of the message + $message = Swift_Message::newInstance() + ->setCharset('iso-8859-2'); + + // Approach 3: Specify the charset when setting the body + $message->setBody('My body', 'text/html', 'iso-8859-2'); + + // Approach 4: Specify the charset for each part added + $message->addPart('My part', 'text/plain', 'iso-8859-2'); + +Setting the Line Length +----------------------- + +The length of lines in a message can be changed by using the ``setMaxLineLength()`` method on the message. It should be kept to less than +1000 characters. + +Swift Mailer defaults to using 78 characters per line in a message. This is +done for historical reasons and so that the message can be easily viewed in +plain-text terminals. + +To change the maximum length of lines in your Message: + +* Call the ``setMaxLineLength()`` method on the Message. + +Lines that are longer than the line length specified will be wrapped between +words. + +.. note:: + + You should never set a maximum length longer than 1000 characters + according to RFC 2822. Doing so could have unspecified side-effects such + as truncating parts of your message when it is transported between SMTP + servers. + + .. code-block:: php + + $message->setMaxLineLength(1000); + +Setting the Message Priority +---------------------------- + +You can change the priority of the message with ``setPriority()``. Setting the +priority will not change the way your email is sent -- it is purely an +indicative setting for the recipient. + +The priority of a message is an indication to the recipient what significance +it has. Swift Mailer allows you to set the priority by calling the +``setPriority`` method. This method takes an integer value between 1 and 5: + +* `Swift_Mime_SimpleMessage::PRIORITY_HIGHEST`: 1 +* `Swift_Mime_SimpleMessage::PRIORITY_HIGH`: 2 +* `Swift_Mime_SimpleMessage::PRIORITY_NORMAL`: 3 +* `Swift_Mime_SimpleMessage::PRIORITY_LOW`: 4 +* `Swift_Mime_SimpleMessage::PRIORITY_LOWEST`: 5 + +To set the message priority: + +* Set the priority as an integer between 1 and 5 with the ``setPriority()`` + method on the Message. + +.. code-block:: php + + // Indicate "High" priority + $message->setPriority(2); + + // Or use the constant to be more explicit + $message->setPriority(Swift_Mime_SimpleMessage::PRIORITY_HIGH); diff --git a/vendor/swiftmailer/swiftmailer/doc/overview.rst b/vendor/swiftmailer/swiftmailer/doc/overview.rst new file mode 100644 index 0000000000000000000000000000000000000000..ebfe0083608f854e26b3d6d07b533cb56de65635 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/doc/overview.rst @@ -0,0 +1,159 @@ +Library Overview +================ + +Most features (and more) of your every day mail client software are provided +by Swift Mailer, using object-oriented PHP code as the interface. + +In this chapter we will take a short tour of the various components, which put +together form the Swift Mailer library as a whole. You will learn key +terminology used throughout the rest of this book and you will gain a little +understanding of the classes you will work with as you integrate Swift Mailer +into your application. + +This chapter is intended to prepare you for the information contained in the +subsequent chapters of this book. You may choose to skip this chapter if you +are fairly technically minded, though it is likely to save you some time in +the long run if you at least read between the lines here. + +System Requirements +------------------- + +The basic requirements to operate Swift Mailer are extremely minimal and +easily achieved. Historically, Swift Mailer has supported both PHP 4 and PHP 5 +by following a parallel development workflow. Now in it's fourth major +version, and Swift Mailer operates on servers running PHP 5.3.3 or higher. + +The library aims to work with as many PHP 5 projects as possible: + +* PHP 5.3.3 or higher, with the SPL extension (standard) + +* Limited network access to connect to remote SMTP servers + +* 8 MB or more memory limit (Swift Mailer uses around 2 MB) + +Component Breakdown +------------------- + +Swift Mailer is made up of many classes. Each of these classes can be grouped +into a general "component" group which describes the task it is designed to +perform. + +We'll take a brief look at the components which form Swift Mailer in this +section of the book. + +The Mailer +~~~~~~~~~~ + +The mailer class, ``Swift_Mailer`` is the central class in the library where +all of the other components meet one another. ``Swift_Mailer`` acts as a sort +of message dispatcher, communicating with the underlying Transport to deliver +your Message to all intended recipients. + +If you were to dig around in the source code for Swift Mailer you'd notice +that ``Swift_Mailer`` itself is pretty bare. It delegates to other objects for +most tasks and in theory, if you knew the internals of Swift Mailer well you +could by-pass this class entirely. We wouldn't advise doing such a thing +however -- there are reasons this class exists: + +* for consistency, regardless of the Transport used + +* to provide abstraction from the internals in the event internal API changes + are made + +* to provide convenience wrappers around aspects of the internal API + +An instance of ``Swift_Mailer`` is created by the developer before sending any +Messages. + +Transports +~~~~~~~~~~ + +Transports are the classes in Swift Mailer that are responsible for +communicating with a service in order to deliver a Message. There are several +types of Transport in Swift Mailer, all of which implement the Swift_Transport +interface and offer underlying start(), stop() and send() methods. + +Typically you will not need to know how a Transport works under-the-surface, +you will only need to know how to create an instance of one, and which one to +use for your environment. + ++---------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| Class | Features | Pros/cons | ++=================================+=============================================================================================+===============================================================================================================================================+ +| ``Swift_SmtpTransport`` | Sends messages over SMTP; Supports Authentication; Supports Encryption | Very portable; Pleasingly predictable results; Provides good feedback | ++---------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| ``Swift_SendmailTransport`` | Communicates with a locally installed ``sendmail`` executable (Linux/UNIX) | Quick time-to-run; Provides less-accurate feedback than SMTP; Requires ``sendmail`` installation | ++---------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| ``Swift_LoadBalancedTransport`` | Cycles through a collection of the other Transports to manage load-reduction | Provides graceful fallback if one Transport fails (e.g. an SMTP server is down); Keeps the load on remote services down by spreading the work | ++---------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| ``Swift_FailoverTransport`` | Works in conjunction with a collection of the other Transports to provide high-availability | Provides graceful fallback if one Transport fails (e.g. an SMTP server is down) | ++---------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +MIME Entities +~~~~~~~~~~~~~ + +Everything that forms part of a Message is called a MIME Entity. All MIME +entities in Swift Mailer share a common set of features. There are various +types of MIME entity that serve different purposes such as Attachments and +MIME parts. + +An e-mail message is made up of several relatively simple entities that are +combined in different ways to achieve different results. All of these entities +have the same fundamental outline but serve a different purpose. The Message +itself can be defined as a MIME entity, an Attachment is a MIME entity, all +MIME parts are MIME entities -- and so on! + +The basic units of each MIME entity -- be it the Message itself, or an +Attachment -- are its Headers and its body: + +.. code-block:: text + + Other-Header: Another value + + The body content itself + +The Headers of a MIME entity, and its body must conform to some strict +standards defined by various RFC documents. Swift Mailer ensures that these +specifications are followed by using various types of object, including +Encoders and different Header types to generate the entity. + +Each MIME component implements the base ``Swift_Mime_MimeEntity`` interface, +which offers methods for retrieving Headers, adding new Headers, changing the +Encoder, updating the body and so on! + +All MIME entities have one Header in common -- the Content-Type Header, +updated with the entity's ``setContentType()`` method. + +Encoders +~~~~~~~~ + +Encoders are used to transform the content of Messages generated in Swift +Mailer into a format that is safe to send across the internet and that +conforms to RFC specifications. + +Generally speaking you will not need to interact with the Encoders in Swift +Mailer -- the correct settings will be handled by the library itself. +However they are probably worth a brief mention in the event that you do want +to play with them. + +Both the Headers and the body of all MIME entities (including the Message +itself) use Encoders to ensure the data they contain can be sent over the +internet without becoming corrupted or misinterpreted. + +There are two types of Encoder: Base64 and Quoted-Printable. + +Plugins +~~~~~~~ + +Plugins exist to extend, or modify the behaviour of Swift Mailer. They respond +to Events that are fired within the Transports during sending. + +There are a number of Plugins provided as part of the base Swift Mailer +package and they all follow a common interface to respond to Events fired +within the library. Interfaces are provided to "listen" to each type of Event +fired and to act as desired when a listened-to Event occurs. + +Although several plugins are provided with Swift Mailer out-of-the-box, the +Events system has been specifically designed to make it easy for experienced +object-oriented developers to write their own plugins in order to achieve +goals that may not be possible with the base library. diff --git a/vendor/swiftmailer/swiftmailer/doc/plugins.rst b/vendor/swiftmailer/swiftmailer/doc/plugins.rst new file mode 100644 index 0000000000000000000000000000000000000000..16ae3356f389810e71d529aa9785cc334a64ab8b --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/doc/plugins.rst @@ -0,0 +1,385 @@ +Plugins +======= + +Plugins are provided with Swift Mailer and can be used to extend the behavior +of the library in situations where using simple class inheritance would be more complex. + +AntiFlood Plugin +---------------- + +Many SMTP servers have limits on the number of messages that may be sent +during any single SMTP connection. The AntiFlood plugin provides a way to stay +within this limit while still managing a large number of emails. + +A typical limit for a single connection is 100 emails. If the server you +connect to imposes such a limit, it expects you to disconnect after that +number of emails has been sent. You could manage this manually within a loop, +but the AntiFlood plugin provides the necessary wrapper code so that you don't +need to worry about this logic. + +Regardless of limits imposed by the server, it's usually a good idea to be +conservative with the resources of the SMTP server. Sending will become +sluggish if the server is being over-used so using the AntiFlood plugin will +not be a bad idea even if no limits exist. + +The AntiFlood plugin's logic is basically to disconnect and the immediately +re-connect with the SMTP server every X number of emails sent, where X is a +number you specify to the plugin. + +You can also specify a time period in seconds that Swift Mailer should pause +for between the disconnect/re-connect process. It's a good idea to pause for a +short time (say 30 seconds every 100 emails) simply to give the SMTP server a +chance to process its queue and recover some resources. + +Using the AntiFlood Plugin +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The AntiFlood Plugin -- like all plugins -- is added with the Mailer class's +``registerPlugin()`` method. It takes two constructor parameters: the number of +emails to pause after, and optionally the number of seconds to pause for. + +To use the AntiFlood plugin: + +* Create an instance of the Mailer using any Transport you choose. + +* Create an instance of the ``Swift_Plugins_AntiFloodPlugin`` class, passing + in one or two constructor parameters. + +* Register the plugin using the Mailer's ``registerPlugin()`` method. + +* Continue using Swift Mailer to send messages as normal. + +When Swift Mailer sends messages it will count the number of messages that +have been sent since the last re-connect. Once the number hits your specified +threshold it will disconnect and re-connect, optionally pausing for a +specified amount of time. + +.. code-block:: php + + require_once 'lib/swift_required.php'; + + // Create the Mailer using any Transport + $mailer = Swift_Mailer::newInstance( + Swift_SmtpTransport::newInstance('smtp.example.org', 25) + ); + + // Use AntiFlood to re-connect after 100 emails + $mailer->registerPlugin(new Swift_Plugins_AntiFloodPlugin(100)); + + // And specify a time in seconds to pause for (30 secs) + $mailer->registerPlugin(new Swift_Plugins_AntiFloodPlugin(100, 30)); + + // Continue sending as normal + for ($lotsOfRecipients as $recipient) { + ... + + $mailer->send( ... ); + } + +Throttler Plugin +---------------- + +If your SMTP server has restrictions in place to limit the rate at which you +send emails, then your code will need to be aware of this rate-limiting. The +Throttler plugin makes Swift Mailer run at a rate-limited speed. + +Many shared hosts don't open their SMTP servers as a free-for-all. Usually +they have policies in place (probably to discourage spammers) that only allow +you to send a fixed number of emails per-hour/day. + +The Throttler plugin supports two modes of rate-limiting and with each, you +will need to do that math to figure out the values you want. The plugin can +limit based on the number of emails per minute, or the number of +bytes-transferred per-minute. + +Using the Throttler Plugin +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Throttler Plugin -- like all plugins -- is added with the Mailer class' +``registerPlugin()`` method. It has two required constructor parameters that +tell it how to do its rate-limiting. + +To use the Throttler plugin: + +* Create an instance of the Mailer using any Transport you choose. + +* Create an instance of the ``Swift_Plugins_ThrottlerPlugin`` class, passing + the number of emails, or bytes you wish to limit by, along with the mode + you're using. + +* Register the plugin using the Mailer's ``registerPlugin()`` method. + +* Continue using Swift Mailer to send messages as normal. + +When Swift Mailer sends messages it will keep track of the rate at which sending +messages is occurring. If it realises that sending is happening too fast, it +will cause your program to ``sleep()`` for enough time to average out the rate. + +.. code-block:: php + + require_once 'lib/swift_required.php'; + + // Create the Mailer using any Transport + $mailer = Swift_Mailer::newInstance( + Swift_SmtpTransport::newInstance('smtp.example.org', 25) + ); + + // Rate limit to 100 emails per-minute + $mailer->registerPlugin(new Swift_Plugins_ThrottlerPlugin( + 100, Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE + )); + + // Rate limit to 10MB per-minute + $mailer->registerPlugin(new Swift_Plugins_ThrottlerPlugin( + 1024 * 1024 * 10, Swift_Plugins_ThrottlerPlugin::BYTES_PER_MINUTE + )); + + // Continue sending as normal + for ($lotsOfRecipients as $recipient) { + ... + + $mailer->send( ... ); + } + +Logger Plugin +------------- + +The Logger plugins helps with debugging during the process of sending. It can +help to identify why an SMTP server is rejecting addresses, or any other +hard-to-find problems that may arise. + +The Logger plugin comes in two parts. There's the plugin itself, along with +one of a number of possible Loggers that you may choose to use. For example, +the logger may output messages directly in realtime, or it may capture +messages in an array. + +One other notable feature is the way in which the Logger plugin changes +Exception messages. If Exceptions are being thrown but the error message does +not provide conclusive information as to the source of the problem (such as an +ambiguous SMTP error) the Logger plugin includes the entire SMTP transcript in +the error message so that debugging becomes a simpler task. + +There are a few available Loggers included with Swift Mailer, but writing your +own implementation is incredibly simple and is achieved by creating a short +class that implements the ``Swift_Plugins_Logger`` interface. + +* ``Swift_Plugins_Loggers_ArrayLogger``: Keeps a collection of log messages + inside an array. The array content can be cleared or dumped out to the + screen. + +* ``Swift_Plugins_Loggers_EchoLogger``: Prints output to the screen in + realtime. Handy for very rudimentary debug output. + +Using the Logger Plugin +~~~~~~~~~~~~~~~~~~~~~~~ + +The Logger Plugin -- like all plugins -- is added with the Mailer class' +``registerPlugin()`` method. It accepts an instance of ``Swift_Plugins_Logger`` +in its constructor. + +To use the Logger plugin: + +* Create an instance of the Mailer using any Transport you choose. + +* Create an instance of the a Logger implementation of + ``Swift_Plugins_Logger``. + +* Create an instance of the ``Swift_Plugins_LoggerPlugin`` class, passing the + created Logger instance to its constructor. + +* Register the plugin using the Mailer's ``registerPlugin()`` method. + +* Continue using Swift Mailer to send messages as normal. + +* Dump the contents of the log with the logger's ``dump()`` method. + +When Swift Mailer sends messages it will keep a log of all the interactions +with the underlying Transport being used. Depending upon the Logger that has +been used the behaviour will differ, but all implementations offer a way to +get the contents of the log. + +.. code-block:: php + + require_once 'lib/swift_required.php'; + + // Create the Mailer using any Transport + $mailer = Swift_Mailer::newInstance( + Swift_SmtpTransport::newInstance('smtp.example.org', 25) + ); + + // To use the ArrayLogger + $logger = new Swift_Plugins_Loggers_ArrayLogger(); + $mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($logger)); + + // Or to use the Echo Logger + $logger = new Swift_Plugins_Loggers_EchoLogger(); + $mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($logger)); + + // Continue sending as normal + for ($lotsOfRecipients as $recipient) { + ... + + $mailer->send( ... ); + } + + // Dump the log contents + // NOTE: The EchoLogger dumps in realtime so dump() does nothing for it + echo $logger->dump(); + +Decorator Plugin +---------------- + +Often there's a need to send the same message to multiple recipients, but with +tiny variations such as the recipient's name being used inside the message +body. The Decorator plugin aims to provide a solution for allowing these small +differences. + +The decorator plugin works by intercepting the sending process of Swift +Mailer, reading the email address in the To: field and then looking up a set +of replacements for a template. + +While the use of this plugin is simple, it is probably the most commonly +misunderstood plugin due to the way in which it works. The typical mistake +users make is to try registering the plugin multiple times (once for each +recipient) -- inside a loop for example. This is incorrect. + +The Decorator plugin should be registered just once, but containing the list +of all recipients prior to sending. It will use this list of recipients to +find the required replacements during sending. + +Using the Decorator Plugin +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To use the Decorator plugin, simply create an associative array of replacements +based on email addresses and then use the mailer's ``registerPlugin()`` method +to add the plugin. + +First create an associative array of replacements based on the email addresses +you'll be sending the message to. + +.. note:: + + The replacements array becomes a 2-dimensional array whose keys are the + email addresses and whose values are an associative array of replacements + for that email address. The curly braces used in this example can be any + type of syntax you choose, provided they match the placeholders in your + email template. + + .. code-block:: php + + $replacements = array(); + foreach ($users as $user) { + $replacements[$user['email']] = array( + '{username}'=>$user['username'], + '{password}'=>$user['password'] + ); + } + +Now create an instance of the Decorator plugin using this array of replacements +and then register it with the Mailer. Do this only once! + +.. code-block:: php + + $decorator = new Swift_Plugins_DecoratorPlugin($replacements); + + $mailer->registerPlugin($decorator); + +When you create your message, replace elements in the body (and/or the subject +line) with your placeholders. + +.. code-block:: php + + $message = Swift_Message::newInstance() + ->setSubject('Important notice for {username}') + ->setBody( + "Hello {username}, we have reset your password to {password}\n" . + "Please log in and change it at your earliest convenience." + ) + ; + + foreach ($users as $user) { + $message->addTo($user['email']); + } + +When you send this message to each of your recipients listed in your +``$replacements`` array they will receive a message customized for just +themselves. For example, the message used above when received may appear like +this to one user: + +.. code-block:: text + + Subject: Important notice for smilingsunshine2009 + + Hello smilingsunshine2009, we have reset your password to rainyDays + Please log in and change it at your earliest convenience. + +While another use may receive the message as: + +.. code-block:: text + + Subject: Important notice for billy-bo-bob + + Hello billy-bo-bob, we have reset your password to dancingOctopus + Please log in and change it at your earliest convenience. + +While the decorator plugin provides a means to solve this problem, there are +various ways you could tackle this problem without the need for a plugin. +We're trying to come up with a better way ourselves and while we have several +(obvious) ideas we don't quite have the perfect solution to go ahead and +implement it. Watch this space. + +Providing Your Own Replacements Lookup for the Decorator +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Filling an array with replacements may not be the best solution for providing +replacement information to the decorator. If you have a more elegant algorithm +that performs replacement lookups on-the-fly you may provide your own +implementation. + +Providing your own replacements lookup implementation for the Decorator is +simply a matter of passing an instance of ``Swift_Plugins_Decorator_Replacements`` to the decorator plugin's constructor, +rather than passing in an array. + +The Replacements interface is very simple to implement since it has just one +method: ``getReplacementsFor($address)``. + +Imagine you want to look up replacements from a database on-the-fly, you might +provide an implementation that does this. You need to create a small class. + +.. code-block:: php + + class DbReplacements implements Swift_Plugins_Decorator_Replacements { + public function getReplacementsFor($address) { + $sql = sprintf( + "SELECT * FROM user WHERE email = '%s'", + mysql_real_escape_string($address) + ); + + $result = mysql_query($sql); + + if ($row = mysql_fetch_assoc($result)) { + return array( + '{username}'=>$row['username'], + '{password}'=>$row['password'] + ); + } + } + } + +Now all you need to do is pass an instance of your class into the Decorator +plugin's constructor instead of passing an array. + +.. code-block:: php + + $decorator = new Swift_Plugins_DecoratorPlugin(new DbReplacements()); + + $mailer->registerPlugin($decorator); + +For each message sent, the plugin will call your class' ``getReplacementsFor()`` +method to find the array of replacements it needs. + +.. note:: + + If your lookup algorithm is case sensitive, you should transform the + ``$address`` argument as appropriate -- for example by passing it + through ``strtolower()``. diff --git a/vendor/swiftmailer/swiftmailer/doc/sending.rst b/vendor/swiftmailer/swiftmailer/doc/sending.rst new file mode 100644 index 0000000000000000000000000000000000000000..f340404cad48a9fd1b44601a8973001ede23f072 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/doc/sending.rst @@ -0,0 +1,571 @@ +Sending Messages +================ + +Quick Reference for Sending a Message +------------------------------------- + +Sending a message is very straightforward. You create a Transport, use it to +create the Mailer, then you use the Mailer to send the message. + +To send a Message: + +* Create a Transport from one of the provided Transports -- + ``Swift_SmtpTransport``, ``Swift_SendmailTransport`` + or one of the aggregate Transports. + +* Create an instance of the ``Swift_Mailer`` class, using the Transport as + it's constructor parameter. + +* Create a Message. + +* Send the message via the ``send()`` method on the Mailer object. + +.. caution:: + + The ``Swift_SmtpTransport`` and ``Swift_SendmailTransport`` transports use + ``proc_*`` PHP functions, which might not be available on your PHP + installation. You can easily check if that's the case by running the + following PHP script: ``setUsername('your username') + ->setPassword('your password') + ; + + /* + You could alternatively use a different transport such as Sendmail: + + // Sendmail + $transport = Swift_SendmailTransport::newInstance('/usr/sbin/sendmail -bs'); + */ + + // Create the Mailer using your created Transport + $mailer = Swift_Mailer::newInstance($transport); + + // Create a message + $message = Swift_Message::newInstance('Wonderful Subject') + ->setFrom(array('john@doe.com' => 'John Doe')) + ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) + ->setBody('Here is the message itself') + ; + + // Send the message + $result = $mailer->send($message); + +Transport Types +~~~~~~~~~~~~~~~ + +A Transport is the component which actually does the sending. You need to +provide a Transport object to the Mailer class and there are several possible +options. + +Typically you will not need to know how a Transport works under-the-surface, +you will only need to know how to create an instance of one, and which one to +use for your environment. + +The SMTP Transport +.................. + +The SMTP Transport sends messages over the (standardized) Simple Message +Transfer Protocol. It can deal with encryption and authentication. + +The SMTP Transport, ``Swift_SmtpTransport`` is without doubt the most commonly +used Transport because it will work on 99% of web servers (I just made that +number up, but you get the idea). All the server needs is the ability to +connect to a remote (or even local) SMTP server on the correct port number +(usually 25). + +SMTP servers often require users to authenticate with a username and password +before any mail can be sent to other domains. This is easily achieved using +Swift Mailer with the SMTP Transport. + +SMTP is a protocol -- in other words it's a "way" of communicating a job +to be done (i.e. sending a message). The SMTP protocol is the fundamental +basis on which messages are delivered all over the internet 7 days a week, 365 +days a year. For this reason it's the most "direct" method of sending messages +you can use and it's the one that will give you the most power and feedback +(such as delivery failures) when using Swift Mailer. + +Because SMTP is generally run as a remote service (i.e. you connect to it over +the network/internet) it's extremely portable from server-to-server. You can +easily store the SMTP server address and port number in a configuration file +within your application and adjust the settings accordingly if the code is +moved or if the SMTP server is changed. + +Some SMTP servers -- Google for example -- use encryption for security reasons. +Swift Mailer supports using both SSL and TLS encryption settings. + +Using the SMTP Transport +^^^^^^^^^^^^^^^^^^^^^^^^ + +The SMTP Transport is easy to use. Most configuration options can be set with +the constructor. + +To use the SMTP Transport you need to know which SMTP server your code needs +to connect to. Ask your web host if you're not sure. Lots of people ask me who +to connect to -- I really can't answer that since it's a setting that's +extremely specific to your hosting environment. + +To use the SMTP Transport: + +* Call ``Swift_SmtpTransport::newInstance()`` with the SMTP server name and + optionally with a port number (defaults to 25). + +* Use the returned object to create the Mailer. + +A connection to the SMTP server will be established upon the first call to +``send()``. + +.. code-block:: php + + require_once 'lib/swift_required.php'; + + // Create the Transport + $transport = Swift_SmtpTransport::newInstance('smtp.example.org', 25); + + // Create the Mailer using your created Transport + $mailer = Swift_Mailer::newInstance($transport); + + /* + It's also possible to use multiple method calls + + $transport = Swift_SmtpTransport::newInstance() + ->setHost('smtp.example.org') + ->setPort(25) + ; + */ + +Encrypted SMTP +^^^^^^^^^^^^^^ + +You can use SSL or TLS encryption with the SMTP Transport by specifying it as +a parameter or with a method call. + +To use encryption with the SMTP Transport: + +* Pass the encryption setting as a third parameter to + ``Swift_SmtpTransport::newInstance()``; or + +* Call the ``setEncryption()`` method on the Transport. + +A connection to the SMTP server will be established upon the first call to +``send()``. The connection will be initiated with the correct encryption +settings. + +.. note:: + + For SSL or TLS encryption to work your PHP installation must have + appropriate OpenSSL transports wrappers. You can check if "tls" and/or + "ssl" are present in your PHP installation by using the PHP function + ``stream_get_transports()`` + + .. code-block:: php + + require_once 'lib/swift_required.php'; + + // Create the Transport + $transport = Swift_SmtpTransport::newInstance('smtp.example.org', 587, 'ssl'); + + // Create the Mailer using your created Transport + $mailer = Swift_Mailer::newInstance($transport); + + /* + It's also possible to use multiple method calls + + $transport = Swift_SmtpTransport::newInstance() + ->setHost('smtp.example.org') + ->setPort(587) + ->setEncryption('ssl') + ; + */ + +SMTP with a Username and Password +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Some servers require authentication. You can provide a username and password +with ``setUsername()`` and ``setPassword()`` methods. + +To use a username and password with the SMTP Transport: + +* Create the Transport with ``Swift_SmtpTransport::newInstance()``. + +* Call the ``setUsername()`` and ``setPassword()`` methods on the Transport. + +Your username and password will be used to authenticate upon first connect +when ``send()`` are first used on the Mailer. + +If authentication fails, an Exception of type ``Swift_TransportException`` will +be thrown. + +.. note:: + + If you need to know early whether or not authentication has failed and an + Exception is going to be thrown, call the ``start()`` method on the + created Transport. + + .. code-block:: php + + require_once 'lib/swift_required.php'; + + // Create the Transport the call setUsername() and setPassword() + $transport = Swift_SmtpTransport::newInstance('smtp.example.org', 25) + ->setUsername('username') + ->setPassword('password') + ; + + // Create the Mailer using your created Transport + $mailer = Swift_Mailer::newInstance($transport); + +The Sendmail Transport +...................... + +The Sendmail Transport sends messages by communicating with a locally +installed MTA -- such as ``sendmail``. + +The Sendmail Transport, ``Swift_SendmailTransport`` does not directly connect to +any remote services. It is designed for Linux servers that have ``sendmail`` +installed. The Transport starts a local ``sendmail`` process and sends messages +to it. Usually the ``sendmail`` process will respond quickly as it spools your +messages to disk before sending them. + +The Transport is named the Sendmail Transport for historical reasons +(``sendmail`` was the "standard" UNIX tool for sending e-mail for years). It +will send messages using other transfer agents such as Exim or Postfix despite +its name, provided they have the relevant sendmail wrappers so that they can be +started with the correct command-line flags. + +It's a common misconception that because the Sendmail Transport returns a +result very quickly it must therefore deliver messages to recipients quickly +-- this is not true. It's not slow by any means, but it's certainly not +faster than SMTP when it comes to getting messages to the intended recipients. +This is because sendmail itself sends the messages over SMTP once they have +been quickly spooled to disk. + +The Sendmail Transport has the potential to be just as smart of the SMTP +Transport when it comes to notifying Swift Mailer about which recipients were +rejected, but in reality the majority of locally installed ``sendmail`` +instances are not configured well enough to provide any useful feedback. As such +Swift Mailer may report successful deliveries where they did in fact fail before +they even left your server. + +You can run the Sendmail Transport in two different modes specified by command +line flags: + +* "``-bs``" runs in SMTP mode so theoretically it will act like the SMTP + Transport + +* "``-t``" runs in piped mode with no feedback, but theoretically faster, + though not advised + +You can think of the Sendmail Transport as a sort of asynchronous SMTP Transport +-- though if you have problems with delivery failures you should try using the +SMTP Transport instead. Swift Mailer isn't doing the work here, it's simply +passing the work to somebody else (i.e. ``sendmail``). + +Using the Sendmail Transport +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +To use the Sendmail Transport you simply need to call +``Swift_SendmailTransport::newInstance()`` with the command as a parameter. + +To use the Sendmail Transport you need to know where ``sendmail`` or another MTA +exists on the server. Swift Mailer uses a default value of +``/usr/sbin/sendmail``, which should work on most systems. + +You specify the entire command as a parameter (i.e. including the command line +flags). Swift Mailer supports operational modes of "``-bs``" (default) and +"``-t``". + +.. note:: + + If you run sendmail in "``-t``" mode you will get no feedback as to whether + or not sending has succeeded. Use "``-bs``" unless you have a reason not to. + +To use the Sendmail Transport: + +* Call ``Swift_SendmailTransport::newInstance()`` with the command, including + the correct command line flags. The default is to use ``/usr/sbin/sendmail + -bs`` if this is not specified. + +* Use the returned object to create the Mailer. + +A sendmail process will be started upon the first call to ``send()``. If the +process cannot be started successfully an Exception of type +``Swift_TransportException`` will be thrown. + +.. code-block:: php + + require_once 'lib/swift_required.php'; + + // Create the Transport + $transport = Swift_SendmailTransport::newInstance('/usr/sbin/exim -bs'); + + // Create the Mailer using your created Transport + $mailer = Swift_Mailer::newInstance($transport); + +The Mail Transport +.................. + +The Mail Transport sends messages by delegating to PHP's internal +``mail()`` function. + +In my experience -- and others' -- the ``mail()`` function is not particularly +predictable, or helpful. + +Quite notably, the ``mail()`` function behaves entirely differently between +Linux and Windows servers. On linux it uses ``sendmail``, but on Windows it uses +SMTP. + +In order for the ``mail()`` function to even work at all ``php.ini`` needs to be +configured correctly, specifying the location of sendmail or of an SMTP server. + +The problem with ``mail()`` is that it "tries" to simplify things to the point +that it actually makes things more complex due to poor interface design. The +developers of Swift Mailer have gone to a lot of effort to make the Mail +Transport work with a reasonable degree of consistency. + +Serious drawbacks when using this Transport are: + +* Unpredictable message headers + +* Lack of feedback regarding delivery failures + +* Lack of support for several plugins that require real-time delivery feedback + +It's a last resort, and we say that with a passion! + +Available Methods for Sending Messages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Mailer class offers two methods for sending Messages -- ``send()``. +Each behaves in a slightly different way. + +When a message is sent in Swift Mailer, the Mailer class communicates with +whichever Transport class you have chosen to use. + +Each recipient in the message should either be accepted or rejected by the +Transport. For example, if the domain name on the email address is not +reachable the SMTP Transport may reject the address because it cannot process +it. Whichever method you use -- ``send()`` -- Swift Mailer will return +an integer indicating the number of accepted recipients. + +.. note:: + + It's possible to find out which recipients were rejected -- we'll cover that + later in this chapter. + +Using the ``send()`` Method +........................... + +The ``send()`` method of the ``Swift_Mailer`` class sends a message using +exactly the same logic as your Desktop mail client would use. Just pass it a +Message and get a result. + +To send a Message with ``send()``: + +* Create a Transport from one of the provided Transports -- + ``Swift_SmtpTransport``, ``Swift_SendmailTransport``, + or one of the aggregate Transports. + +* Create an instance of the ``Swift_Mailer`` class, using the Transport as + it's constructor parameter. + +* Create a Message. + +* Send the message via the ``send()`` method on the Mailer object. + +The message will be sent just like it would be sent if you used your mail +client. An integer is returned which includes the number of successful +recipients. If none of the recipients could be sent to then zero will be +returned, which equates to a boolean ``false``. If you set two +``To:`` recipients and three ``Bcc:`` recipients in the message and all of the +recipients are delivered to successfully then the value 5 will be returned. + +.. code-block:: php + + require_once 'lib/swift_required.php'; + + // Create the Transport + $transport = Swift_SmtpTransport::newInstance('localhost', 25); + + // Create the Mailer using your created Transport + $mailer = Swift_Mailer::newInstance($transport); + + // Create a message + $message = Swift_Message::newInstance('Wonderful Subject') + ->setFrom(array('john@doe.com' => 'John Doe')) + ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) + ->setBody('Here is the message itself') + ; + + // Send the message + $numSent = $mailer->send($message); + + printf("Sent %d messages\n", $numSent); + + /* Note that often that only the boolean equivalent of the + return value is of concern (zero indicates FALSE) + + if ($mailer->send($message)) + { + echo "Sent\n"; + } + else + { + echo "Failed\n"; + } + + */ + +Sending Emails in Batch +....................... + +If you want to send a separate message to each recipient so that only their +own address shows up in the ``To:`` field, follow the following recipe: + +* Create a Transport from one of the provided Transports -- + ``Swift_SmtpTransport``, ``Swift_SendmailTransport``, + or one of the aggregate Transports. + +* Create an instance of the ``Swift_Mailer`` class, using the Transport as + it's constructor parameter. + +* Create a Message. + +* Iterate over the recipients and send message via the ``send()`` method on + the Mailer object. + +Each recipient of the messages receives a different copy with only their own +email address on the ``To:`` field. + +Make sure to add only valid email addresses as recipients. If you try to add an +invalid email address with ``setTo()``, ``setCc()`` or ``setBcc()``, Swift +Mailer will throw a ``Swift_RfcComplianceException``. + +If you add recipients automatically based on a data source that may contain +invalid email addresses, you can prevent possible exceptions by validating the +addresses using ``Swift_Validate::email($email)`` and only adding addresses +that validate. Another way would be to wrap your ``setTo()``, ``setCc()`` and +``setBcc()`` calls in a try-catch block and handle the +``Swift_RfcComplianceException`` in the catch block. + +Handling invalid addresses properly is especially important when sending emails +in large batches since a single invalid address might cause an unhandled +exception and stop the execution or your script early. + +.. note:: + + In the following example, two emails are sent. One to each of + ``receiver@domain.org`` and ``other@domain.org``. These recipients will + not be aware of each other. + + .. code-block:: php + + require_once 'lib/swift_required.php'; + + // Create the Transport + $transport = Swift_SmtpTransport::newInstance('localhost', 25); + + // Create the Mailer using your created Transport + $mailer = Swift_Mailer::newInstance($transport); + + // Create a message + $message = Swift_Message::newInstance('Wonderful Subject') + ->setFrom(array('john@doe.com' => 'John Doe')) + ->setBody('Here is the message itself') + ; + + // Send the message + $failedRecipients = array(); + $numSent = 0; + $to = array('receiver@domain.org', 'other@domain.org' => 'A name'); + + foreach ($to as $address => $name) + { + if (is_int($address)) { + $message->setTo($name); + } else { + $message->setTo(array($address => $name)); + } + + $numSent += $mailer->send($message, $failedRecipients); + } + + printf("Sent %d messages\n", $numSent); + +Finding out Rejected Addresses +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It's possible to get a list of addresses that were rejected by the Transport +by using a by-reference parameter to ``send()``. + +As Swift Mailer attempts to send the message to each address given to it, if a +recipient is rejected it will be added to the array. You can pass an existing +array, otherwise one will be created by-reference. + +Collecting the list of recipients that were rejected can be useful in +circumstances where you need to "prune" a mailing list for example when some +addresses cannot be delivered to. + +Getting Failures By-reference +............................. + +Collecting delivery failures by-reference with the ``send()`` method is as +simple as passing a variable name to the method call. + +To get failed recipients by-reference: + +* Pass a by-reference variable name to the ``send()`` method of the Mailer + class. + +If the Transport rejects any of the recipients, the culprit addresses will be +added to the array provided by-reference. + +.. note:: + + If the variable name does not yet exist, it will be initialized as an + empty array and then failures will be added to that array. If the variable + already exists it will be type-cast to an array and failures will be added + to it. + + .. code-block:: php + + $mailer = Swift_Mailer::newInstance( ... ); + + $message = Swift_Message::newInstance( ... ) + ->setFrom( ... ) + ->setTo(array( + 'receiver@bad-domain.org' => 'Receiver Name', + 'other@domain.org' => 'A name', + 'other-receiver@bad-domain.org' => 'Other Name' + )) + ->setBody( ... ) + ; + + // Pass a variable name to the send() method + if (!$mailer->send($message, $failures)) + { + echo "Failures:"; + print_r($failures); + } + + /* + Failures: + Array ( + 0 => receiver@bad-domain.org, + 1 => other-receiver@bad-domain.org + ) + */ diff --git a/vendor/swiftmailer/swiftmailer/doc/uml/Encoders.graffle b/vendor/swiftmailer/swiftmailer/doc/uml/Encoders.graffle new file mode 100644 index 0000000000000000000000000000000000000000..f895752b70947592db74b6a3b8a6bd135a9fd150 Binary files /dev/null and b/vendor/swiftmailer/swiftmailer/doc/uml/Encoders.graffle differ diff --git a/vendor/swiftmailer/swiftmailer/doc/uml/Mime.graffle b/vendor/swiftmailer/swiftmailer/doc/uml/Mime.graffle new file mode 100644 index 0000000000000000000000000000000000000000..e1e33cbf16ea45d29ad48eb9b2f37959292881b2 Binary files /dev/null and b/vendor/swiftmailer/swiftmailer/doc/uml/Mime.graffle differ diff --git a/vendor/swiftmailer/swiftmailer/doc/uml/Transports.graffle b/vendor/swiftmailer/swiftmailer/doc/uml/Transports.graffle new file mode 100644 index 0000000000000000000000000000000000000000..5670e2b65ada6e01406334a4b462f58e8f48f4fd Binary files /dev/null and b/vendor/swiftmailer/swiftmailer/doc/uml/Transports.graffle differ diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php new file mode 100644 index 0000000000000000000000000000000000000000..82c381b73d6dece6d259a5178db633c88f0ffb55 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php @@ -0,0 +1,80 @@ +createDependenciesFor('mime.attachment') + ); + + $this->setBody($data); + $this->setFilename($filename); + if ($contentType) { + $this->setContentType($contentType); + } + } + + /** + * Create a new Attachment. + * + * @param string|Swift_OutputByteStream $data + * @param string $filename + * @param string $contentType + * + * @return Swift_Mime_Attachment + */ + public static function newInstance($data = null, $filename = null, $contentType = null) + { + return new self($data, $filename, $contentType); + } + + /** + * Create a new Attachment from a filesystem path. + * + * @param string $path + * @param string $contentType optional + * + * @return Swift_Mime_Attachment + */ + public static function fromPath($path, $contentType = null) + { + return self::newInstance()->setFile( + new Swift_ByteStream_FileByteStream($path), + $contentType + ); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php new file mode 100644 index 0000000000000000000000000000000000000000..a7b0e3a62072ee833c9621c67bc3ffb8469cf36c --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php @@ -0,0 +1,181 @@ +_filters[$key] = $filter; + } + + /** + * Remove an already present StreamFilter based on its $key. + * + * @param string $key + */ + public function removeFilter($key) + { + unset($this->_filters[$key]); + } + + /** + * Writes $bytes to the end of the stream. + * + * @param string $bytes + * + * @throws Swift_IoException + * + * @return int + */ + public function write($bytes) + { + $this->_writeBuffer .= $bytes; + foreach ($this->_filters as $filter) { + if ($filter->shouldBuffer($this->_writeBuffer)) { + return; + } + } + $this->_doWrite($this->_writeBuffer); + + return ++$this->_sequence; + } + + /** + * For any bytes that are currently buffered inside the stream, force them + * off the buffer. + * + * @throws Swift_IoException + */ + public function commit() + { + $this->_doWrite($this->_writeBuffer); + } + + /** + * Attach $is to this stream. + * + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + * + * @param Swift_InputByteStream $is + */ + public function bind(Swift_InputByteStream $is) + { + $this->_mirrors[] = $is; + } + + /** + * Remove an already bound stream. + * + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + * + * @param Swift_InputByteStream $is + */ + public function unbind(Swift_InputByteStream $is) + { + foreach ($this->_mirrors as $k => $stream) { + if ($is === $stream) { + if ($this->_writeBuffer !== '') { + $stream->write($this->_writeBuffer); + } + unset($this->_mirrors[$k]); + } + } + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + * + * @throws Swift_IoException + */ + public function flushBuffers() + { + if ($this->_writeBuffer !== '') { + $this->_doWrite($this->_writeBuffer); + } + $this->_flush(); + + foreach ($this->_mirrors as $stream) { + $stream->flushBuffers(); + } + } + + /** Run $bytes through all filters */ + private function _filter($bytes) + { + foreach ($this->_filters as $filter) { + $bytes = $filter->filter($bytes); + } + + return $bytes; + } + + /** Just write the bytes to the stream */ + private function _doWrite($bytes) + { + $this->_commit($this->_filter($bytes)); + + foreach ($this->_mirrors as $stream) { + $stream->write($bytes); + } + + $this->_writeBuffer = ''; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php new file mode 100644 index 0000000000000000000000000000000000000000..ef05a6d5e6e963d6efb046864a8766aef5e8ef93 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php @@ -0,0 +1,182 @@ +_array = $stack; + $this->_arraySize = count($stack); + } elseif (is_string($stack)) { + $this->write($stack); + } else { + $this->_array = array(); + } + } + + /** + * Reads $length bytes from the stream into a string and moves the pointer + * through the stream by $length. + * + * If less bytes exist than are requested the + * remaining bytes are given instead. If no bytes are remaining at all, boolean + * false is returned. + * + * @param int $length + * + * @return string + */ + public function read($length) + { + if ($this->_offset == $this->_arraySize) { + return false; + } + + // Don't use array slice + $end = $length + $this->_offset; + $end = $this->_arraySize < $end ? $this->_arraySize : $end; + $ret = ''; + for (; $this->_offset < $end; ++$this->_offset) { + $ret .= $this->_array[$this->_offset]; + } + + return $ret; + } + + /** + * Writes $bytes to the end of the stream. + * + * @param string $bytes + */ + public function write($bytes) + { + $to_add = str_split($bytes); + foreach ($to_add as $value) { + $this->_array[] = $value; + } + $this->_arraySize = count($this->_array); + + foreach ($this->_mirrors as $stream) { + $stream->write($bytes); + } + } + + /** + * Not used. + */ + public function commit() + { + } + + /** + * Attach $is to this stream. + * + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + * + * @param Swift_InputByteStream $is + */ + public function bind(Swift_InputByteStream $is) + { + $this->_mirrors[] = $is; + } + + /** + * Remove an already bound stream. + * + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + * + * @param Swift_InputByteStream $is + */ + public function unbind(Swift_InputByteStream $is) + { + foreach ($this->_mirrors as $k => $stream) { + if ($is === $stream) { + unset($this->_mirrors[$k]); + } + } + } + + /** + * Move the internal read pointer to $byteOffset in the stream. + * + * @param int $byteOffset + * + * @return bool + */ + public function setReadPointer($byteOffset) + { + if ($byteOffset > $this->_arraySize) { + $byteOffset = $this->_arraySize; + } elseif ($byteOffset < 0) { + $byteOffset = 0; + } + + $this->_offset = $byteOffset; + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + */ + public function flushBuffers() + { + $this->_offset = 0; + $this->_array = array(); + $this->_arraySize = 0; + + foreach ($this->_mirrors as $stream) { + $stream->flushBuffers(); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php new file mode 100644 index 0000000000000000000000000000000000000000..9ed8523107eb10c079cfd5e656dd45cd44b0e8dd --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php @@ -0,0 +1,231 @@ +_path = $path; + $this->_mode = $writable ? 'w+b' : 'rb'; + + if (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime() == 1) { + $this->_quotes = true; + } + } + + /** + * Get the complete path to the file. + * + * @return string + */ + public function getPath() + { + return $this->_path; + } + + /** + * Reads $length bytes from the stream into a string and moves the pointer + * through the stream by $length. + * + * If less bytes exist than are requested the + * remaining bytes are given instead. If no bytes are remaining at all, boolean + * false is returned. + * + * @param int $length + * + * @throws Swift_IoException + * + * @return string|bool + */ + public function read($length) + { + $fp = $this->_getReadHandle(); + if (!feof($fp)) { + if ($this->_quotes) { + ini_set('magic_quotes_runtime', 0); + } + $bytes = fread($fp, $length); + if ($this->_quotes) { + ini_set('magic_quotes_runtime', 1); + } + $this->_offset = ftell($fp); + + // If we read one byte after reaching the end of the file + // feof() will return false and an empty string is returned + if ($bytes === '' && feof($fp)) { + $this->_resetReadHandle(); + + return false; + } + + return $bytes; + } + + $this->_resetReadHandle(); + + return false; + } + + /** + * Move the internal read pointer to $byteOffset in the stream. + * + * @param int $byteOffset + * + * @return bool + */ + public function setReadPointer($byteOffset) + { + if (isset($this->_reader)) { + $this->_seekReadStreamToPosition($byteOffset); + } + $this->_offset = $byteOffset; + } + + /** Just write the bytes to the file */ + protected function _commit($bytes) + { + fwrite($this->_getWriteHandle(), $bytes); + $this->_resetReadHandle(); + } + + /** Not used */ + protected function _flush() + { + } + + /** Get the resource for reading */ + private function _getReadHandle() + { + if (!isset($this->_reader)) { + $pointer = @fopen($this->_path, 'rb'); + if (!$pointer) { + throw new Swift_IoException( + 'Unable to open file for reading ['.$this->_path.']' + ); + } + $this->_reader = $pointer; + if ($this->_offset != 0) { + $this->_getReadStreamSeekableStatus(); + $this->_seekReadStreamToPosition($this->_offset); + } + } + + return $this->_reader; + } + + /** Get the resource for writing */ + private function _getWriteHandle() + { + if (!isset($this->_writer)) { + if (!$this->_writer = fopen($this->_path, $this->_mode)) { + throw new Swift_IoException( + 'Unable to open file for writing ['.$this->_path.']' + ); + } + } + + return $this->_writer; + } + + /** Force a reload of the resource for reading */ + private function _resetReadHandle() + { + if (isset($this->_reader)) { + fclose($this->_reader); + $this->_reader = null; + } + } + + /** Check if ReadOnly Stream is seekable */ + private function _getReadStreamSeekableStatus() + { + $metas = stream_get_meta_data($this->_reader); + $this->_seekable = $metas['seekable']; + } + + /** Streams in a readOnly stream ensuring copy if needed */ + private function _seekReadStreamToPosition($offset) + { + if ($this->_seekable === null) { + $this->_getReadStreamSeekableStatus(); + } + if ($this->_seekable === false) { + $currentPos = ftell($this->_reader); + if ($currentPos < $offset) { + $toDiscard = $offset - $currentPos; + fread($this->_reader, $toDiscard); + + return; + } + $this->_copyReadStream(); + } + fseek($this->_reader, $offset, SEEK_SET); + } + + /** Copy a readOnly Stream to ensure seekability */ + private function _copyReadStream() + { + if ($tmpFile = fopen('php://temp/maxmemory:4096', 'w+b')) { + /* We have opened a php:// Stream Should work without problem */ + } elseif (function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir()) && ($tmpFile = tmpfile())) { + /* We have opened a tmpfile */ + } else { + throw new Swift_IoException('Unable to copy the file to make it seekable, sys_temp_dir is not writable, php://memory not available'); + } + $currentPos = ftell($this->_reader); + fclose($this->_reader); + $source = fopen($this->_path, 'rb'); + if (!$source) { + throw new Swift_IoException('Unable to open file for copying ['.$this->_path.']'); + } + fseek($tmpFile, 0, SEEK_SET); + while (!feof($source)) { + fwrite($tmpFile, fread($source, 4096)); + } + fseek($tmpFile, $currentPos, SEEK_SET); + fclose($source); + $this->_reader = $tmpFile; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php new file mode 100644 index 0000000000000000000000000000000000000000..1c9a80c0376f53bf1a5417887bc25e0d56edc06d --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php @@ -0,0 +1,42 @@ +getPath())) === false) { + throw new Swift_IoException('Failed to get temporary file content.'); + } + + return $content; + } + + public function __destruct() + { + if (file_exists($this->getPath())) { + @unlink($this->getPath()); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader.php new file mode 100644 index 0000000000000000000000000000000000000000..4267adbc5937917b0419ef3878410f3c965df72f --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader.php @@ -0,0 +1,67 @@ + + */ +interface Swift_CharacterReader +{ + const MAP_TYPE_INVALID = 0x01; + const MAP_TYPE_FIXED_LEN = 0x02; + const MAP_TYPE_POSITIONS = 0x03; + + /** + * Returns the complete character map. + * + * @param string $string + * @param int $startOffset + * @param array $currentMap + * @param mixed $ignoredChars + * + * @return int + */ + public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars); + + /** + * Returns the mapType, see constants. + * + * @return int + */ + public function getMapType(); + + /** + * Returns an integer which specifies how many more bytes to read. + * + * A positive integer indicates the number of more bytes to fetch before invoking + * this method again. + * + * A value of zero means this is already a valid character. + * A value of -1 means this cannot possibly be a valid character. + * + * @param int[] $bytes + * @param int $size + * + * @return int + */ + public function validateByteSequence($bytes, $size); + + /** + * Returns the number of bytes which should be read to start each character. + * + * For fixed width character sets this should be the number of octets-per-character. + * For multibyte character sets this will probably be 1. + * + * @return int + */ + public function getInitialByteSize(); +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php new file mode 100644 index 0000000000000000000000000000000000000000..6a18e1dd1fafbe35d177d6ba98a07781a67b238d --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php @@ -0,0 +1,97 @@ + + */ +class Swift_CharacterReader_GenericFixedWidthReader implements Swift_CharacterReader +{ + /** + * The number of bytes in a single character. + * + * @var int + */ + private $_width; + + /** + * Creates a new GenericFixedWidthReader using $width bytes per character. + * + * @param int $width + */ + public function __construct($width) + { + $this->_width = $width; + } + + /** + * Returns the complete character map. + * + * @param string $string + * @param int $startOffset + * @param array $currentMap + * @param mixed $ignoredChars + * + * @return int + */ + public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) + { + $strlen = strlen($string); + // % and / are CPU intensive, so, maybe find a better way + $ignored = $strlen % $this->_width; + $ignoredChars = $ignored ? substr($string, -$ignored) : ''; + $currentMap = $this->_width; + + return ($strlen - $ignored) / $this->_width; + } + + /** + * Returns the mapType. + * + * @return int + */ + public function getMapType() + { + return self::MAP_TYPE_FIXED_LEN; + } + + /** + * Returns an integer which specifies how many more bytes to read. + * + * A positive integer indicates the number of more bytes to fetch before invoking + * this method again. + * + * A value of zero means this is already a valid character. + * A value of -1 means this cannot possibly be a valid character. + * + * @param string $bytes + * @param int $size + * + * @return int + */ + public function validateByteSequence($bytes, $size) + { + $needed = $this->_width - $size; + + return $needed > -1 ? $needed : -1; + } + + /** + * Returns the number of bytes which should be read to start each character. + * + * @return int + */ + public function getInitialByteSize() + { + return $this->_width; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php new file mode 100644 index 0000000000000000000000000000000000000000..67da48f6cb0b7ac008ae7a02c9c71ba4ecc6256f --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php @@ -0,0 +1,84 @@ + "\x07F") { + // Invalid char + $currentMap[$i + $startOffset] = $string[$i]; + } + } + + return $strlen; + } + + /** + * Returns mapType. + * + * @return int mapType + */ + public function getMapType() + { + return self::MAP_TYPE_INVALID; + } + + /** + * Returns an integer which specifies how many more bytes to read. + * + * A positive integer indicates the number of more bytes to fetch before invoking + * this method again. + * A value of zero means this is already a valid character. + * A value of -1 means this cannot possibly be a valid character. + * + * @param string $bytes + * @param int $size + * + * @return int + */ + public function validateByteSequence($bytes, $size) + { + $byte = reset($bytes); + if (1 == count($bytes) && $byte >= 0x00 && $byte <= 0x7F) { + return 0; + } + + return -1; + } + + /** + * Returns the number of bytes which should be read to start each character. + * + * @return int + */ + public function getInitialByteSize() + { + return 1; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php new file mode 100644 index 0000000000000000000000000000000000000000..22746bd857571c2ec0e6104c035aa832dbcf4902 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php @@ -0,0 +1,176 @@ + + */ +class Swift_CharacterReader_Utf8Reader implements Swift_CharacterReader +{ + /** Pre-computed for optimization */ + private static $length_map = array( + // N=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x0N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x1N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x2N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x3N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x4N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x5N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x6N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x7N + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x8N + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x9N + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0xAN + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0xBN + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xCN + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xDN + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xEN + 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 0, 0, // 0xFN + ); + + private static $s_length_map = array( + "\x00" => 1, "\x01" => 1, "\x02" => 1, "\x03" => 1, "\x04" => 1, "\x05" => 1, "\x06" => 1, "\x07" => 1, + "\x08" => 1, "\x09" => 1, "\x0a" => 1, "\x0b" => 1, "\x0c" => 1, "\x0d" => 1, "\x0e" => 1, "\x0f" => 1, + "\x10" => 1, "\x11" => 1, "\x12" => 1, "\x13" => 1, "\x14" => 1, "\x15" => 1, "\x16" => 1, "\x17" => 1, + "\x18" => 1, "\x19" => 1, "\x1a" => 1, "\x1b" => 1, "\x1c" => 1, "\x1d" => 1, "\x1e" => 1, "\x1f" => 1, + "\x20" => 1, "\x21" => 1, "\x22" => 1, "\x23" => 1, "\x24" => 1, "\x25" => 1, "\x26" => 1, "\x27" => 1, + "\x28" => 1, "\x29" => 1, "\x2a" => 1, "\x2b" => 1, "\x2c" => 1, "\x2d" => 1, "\x2e" => 1, "\x2f" => 1, + "\x30" => 1, "\x31" => 1, "\x32" => 1, "\x33" => 1, "\x34" => 1, "\x35" => 1, "\x36" => 1, "\x37" => 1, + "\x38" => 1, "\x39" => 1, "\x3a" => 1, "\x3b" => 1, "\x3c" => 1, "\x3d" => 1, "\x3e" => 1, "\x3f" => 1, + "\x40" => 1, "\x41" => 1, "\x42" => 1, "\x43" => 1, "\x44" => 1, "\x45" => 1, "\x46" => 1, "\x47" => 1, + "\x48" => 1, "\x49" => 1, "\x4a" => 1, "\x4b" => 1, "\x4c" => 1, "\x4d" => 1, "\x4e" => 1, "\x4f" => 1, + "\x50" => 1, "\x51" => 1, "\x52" => 1, "\x53" => 1, "\x54" => 1, "\x55" => 1, "\x56" => 1, "\x57" => 1, + "\x58" => 1, "\x59" => 1, "\x5a" => 1, "\x5b" => 1, "\x5c" => 1, "\x5d" => 1, "\x5e" => 1, "\x5f" => 1, + "\x60" => 1, "\x61" => 1, "\x62" => 1, "\x63" => 1, "\x64" => 1, "\x65" => 1, "\x66" => 1, "\x67" => 1, + "\x68" => 1, "\x69" => 1, "\x6a" => 1, "\x6b" => 1, "\x6c" => 1, "\x6d" => 1, "\x6e" => 1, "\x6f" => 1, + "\x70" => 1, "\x71" => 1, "\x72" => 1, "\x73" => 1, "\x74" => 1, "\x75" => 1, "\x76" => 1, "\x77" => 1, + "\x78" => 1, "\x79" => 1, "\x7a" => 1, "\x7b" => 1, "\x7c" => 1, "\x7d" => 1, "\x7e" => 1, "\x7f" => 1, + "\x80" => 0, "\x81" => 0, "\x82" => 0, "\x83" => 0, "\x84" => 0, "\x85" => 0, "\x86" => 0, "\x87" => 0, + "\x88" => 0, "\x89" => 0, "\x8a" => 0, "\x8b" => 0, "\x8c" => 0, "\x8d" => 0, "\x8e" => 0, "\x8f" => 0, + "\x90" => 0, "\x91" => 0, "\x92" => 0, "\x93" => 0, "\x94" => 0, "\x95" => 0, "\x96" => 0, "\x97" => 0, + "\x98" => 0, "\x99" => 0, "\x9a" => 0, "\x9b" => 0, "\x9c" => 0, "\x9d" => 0, "\x9e" => 0, "\x9f" => 0, + "\xa0" => 0, "\xa1" => 0, "\xa2" => 0, "\xa3" => 0, "\xa4" => 0, "\xa5" => 0, "\xa6" => 0, "\xa7" => 0, + "\xa8" => 0, "\xa9" => 0, "\xaa" => 0, "\xab" => 0, "\xac" => 0, "\xad" => 0, "\xae" => 0, "\xaf" => 0, + "\xb0" => 0, "\xb1" => 0, "\xb2" => 0, "\xb3" => 0, "\xb4" => 0, "\xb5" => 0, "\xb6" => 0, "\xb7" => 0, + "\xb8" => 0, "\xb9" => 0, "\xba" => 0, "\xbb" => 0, "\xbc" => 0, "\xbd" => 0, "\xbe" => 0, "\xbf" => 0, + "\xc0" => 2, "\xc1" => 2, "\xc2" => 2, "\xc3" => 2, "\xc4" => 2, "\xc5" => 2, "\xc6" => 2, "\xc7" => 2, + "\xc8" => 2, "\xc9" => 2, "\xca" => 2, "\xcb" => 2, "\xcc" => 2, "\xcd" => 2, "\xce" => 2, "\xcf" => 2, + "\xd0" => 2, "\xd1" => 2, "\xd2" => 2, "\xd3" => 2, "\xd4" => 2, "\xd5" => 2, "\xd6" => 2, "\xd7" => 2, + "\xd8" => 2, "\xd9" => 2, "\xda" => 2, "\xdb" => 2, "\xdc" => 2, "\xdd" => 2, "\xde" => 2, "\xdf" => 2, + "\xe0" => 3, "\xe1" => 3, "\xe2" => 3, "\xe3" => 3, "\xe4" => 3, "\xe5" => 3, "\xe6" => 3, "\xe7" => 3, + "\xe8" => 3, "\xe9" => 3, "\xea" => 3, "\xeb" => 3, "\xec" => 3, "\xed" => 3, "\xee" => 3, "\xef" => 3, + "\xf0" => 4, "\xf1" => 4, "\xf2" => 4, "\xf3" => 4, "\xf4" => 4, "\xf5" => 4, "\xf6" => 4, "\xf7" => 4, + "\xf8" => 5, "\xf9" => 5, "\xfa" => 5, "\xfb" => 5, "\xfc" => 6, "\xfd" => 6, "\xfe" => 0, "\xff" => 0, + ); + + /** + * Returns the complete character map. + * + * @param string $string + * @param int $startOffset + * @param array $currentMap + * @param mixed $ignoredChars + * + * @return int + */ + public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) + { + if (!isset($currentMap['i']) || !isset($currentMap['p'])) { + $currentMap['p'] = $currentMap['i'] = array(); + } + + $strlen = strlen($string); + $charPos = count($currentMap['p']); + $foundChars = 0; + $invalid = false; + for ($i = 0; $i < $strlen; ++$i) { + $char = $string[$i]; + $size = self::$s_length_map[$char]; + if ($size == 0) { + /* char is invalid, we must wait for a resync */ + $invalid = true; + continue; + } else { + if ($invalid == true) { + /* We mark the chars as invalid and start a new char */ + $currentMap['p'][$charPos + $foundChars] = $startOffset + $i; + $currentMap['i'][$charPos + $foundChars] = true; + ++$foundChars; + $invalid = false; + } + if (($i + $size) > $strlen) { + $ignoredChars = substr($string, $i); + break; + } + for ($j = 1; $j < $size; ++$j) { + $char = $string[$i + $j]; + if ($char > "\x7F" && $char < "\xC0") { + // Valid - continue parsing + } else { + /* char is invalid, we must wait for a resync */ + $invalid = true; + continue 2; + } + } + /* Ok we got a complete char here */ + $currentMap['p'][$charPos + $foundChars] = $startOffset + $i + $size; + $i += $j - 1; + ++$foundChars; + } + } + + return $foundChars; + } + + /** + * Returns mapType. + * + * @return int mapType + */ + public function getMapType() + { + return self::MAP_TYPE_POSITIONS; + } + + /** + * Returns an integer which specifies how many more bytes to read. + * + * A positive integer indicates the number of more bytes to fetch before invoking + * this method again. + * A value of zero means this is already a valid character. + * A value of -1 means this cannot possibly be a valid character. + * + * @param string $bytes + * @param int $size + * + * @return int + */ + public function validateByteSequence($bytes, $size) + { + if ($size < 1) { + return -1; + } + $needed = self::$length_map[$bytes[0]] - $size; + + return $needed > -1 ? $needed : -1; + } + + /** + * Returns the number of bytes which should be read to start each character. + * + * @return int + */ + public function getInitialByteSize() + { + return 1; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..15b6c6920f480f43ea5f643c7bed0de6765c0b28 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php @@ -0,0 +1,26 @@ +init(); + } + + public function __wakeup() + { + $this->init(); + } + + public function init() + { + if (count(self::$_map) > 0) { + return; + } + + $prefix = 'Swift_CharacterReader_'; + + $singleByte = array( + 'class' => $prefix.'GenericFixedWidthReader', + 'constructor' => array(1), + ); + + $doubleByte = array( + 'class' => $prefix.'GenericFixedWidthReader', + 'constructor' => array(2), + ); + + $fourBytes = array( + 'class' => $prefix.'GenericFixedWidthReader', + 'constructor' => array(4), + ); + + // Utf-8 + self::$_map['utf-?8'] = array( + 'class' => $prefix.'Utf8Reader', + 'constructor' => array(), + ); + + //7-8 bit charsets + self::$_map['(us-)?ascii'] = $singleByte; + self::$_map['(iso|iec)-?8859-?[0-9]+'] = $singleByte; + self::$_map['windows-?125[0-9]'] = $singleByte; + self::$_map['cp-?[0-9]+'] = $singleByte; + self::$_map['ansi'] = $singleByte; + self::$_map['macintosh'] = $singleByte; + self::$_map['koi-?7'] = $singleByte; + self::$_map['koi-?8-?.+'] = $singleByte; + self::$_map['mik'] = $singleByte; + self::$_map['(cork|t1)'] = $singleByte; + self::$_map['v?iscii'] = $singleByte; + + //16 bits + self::$_map['(ucs-?2|utf-?16)'] = $doubleByte; + + //32 bits + self::$_map['(ucs-?4|utf-?32)'] = $fourBytes; + + // Fallback + self::$_map['.*'] = $singleByte; + } + + /** + * Returns a CharacterReader suitable for the charset applied. + * + * @param string $charset + * + * @return Swift_CharacterReader + */ + public function getReaderFor($charset) + { + $charset = trim(strtolower($charset)); + foreach (self::$_map as $pattern => $spec) { + $re = '/^'.$pattern.'$/D'; + if (preg_match($re, $charset)) { + if (!array_key_exists($pattern, self::$_loaded)) { + $reflector = new ReflectionClass($spec['class']); + if ($reflector->getConstructor()) { + $reader = $reflector->newInstanceArgs($spec['constructor']); + } else { + $reader = $reflector->newInstance(); + } + self::$_loaded[$pattern] = $reader; + } + + return self::$_loaded[$pattern]; + } + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php new file mode 100644 index 0000000000000000000000000000000000000000..717924f5d6383b918225667170743bc61275c131 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php @@ -0,0 +1,89 @@ +setCharacterReaderFactory($factory); + $this->setCharacterSet($charset); + } + + /** + * Set the character set used in this CharacterStream. + * + * @param string $charset + */ + public function setCharacterSet($charset) + { + $this->_charset = $charset; + $this->_charReader = null; + } + + /** + * Set the CharacterReaderFactory for multi charset support. + * + * @param Swift_CharacterReaderFactory $factory + */ + public function setCharacterReaderFactory(Swift_CharacterReaderFactory $factory) + { + $this->_charReaderFactory = $factory; + } + + /** + * Overwrite this character stream using the byte sequence in the byte stream. + * + * @param Swift_OutputByteStream $os output stream to read from + */ + public function importByteStream(Swift_OutputByteStream $os) + { + if (!isset($this->_charReader)) { + $this->_charReader = $this->_charReaderFactory + ->getReaderFor($this->_charset); + } + + $startLength = $this->_charReader->getInitialByteSize(); + while (false !== $bytes = $os->read($startLength)) { + $c = array(); + for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) { + $c[] = self::$_byteMap[$bytes[$i]]; + } + $size = count($c); + $need = $this->_charReader + ->validateByteSequence($c, $size); + if ($need > 0 && + false !== $bytes = $os->read($need)) { + for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) { + $c[] = self::$_byteMap[$bytes[$i]]; + } + } + $this->_array[] = $c; + ++$this->_array_size; + } + } + + /** + * Import a string a bytes into this CharacterStream, overwriting any existing + * data in the stream. + * + * @param string $string + */ + public function importString($string) + { + $this->flushContents(); + $this->write($string); + } + + /** + * Read $length characters from the stream and move the internal pointer + * $length further into the stream. + * + * @param int $length + * + * @return string + */ + public function read($length) + { + if ($this->_offset == $this->_array_size) { + return false; + } + + // Don't use array slice + $arrays = array(); + $end = $length + $this->_offset; + for ($i = $this->_offset; $i < $end; ++$i) { + if (!isset($this->_array[$i])) { + break; + } + $arrays[] = $this->_array[$i]; + } + $this->_offset += $i - $this->_offset; // Limit function calls + $chars = false; + foreach ($arrays as $array) { + $chars .= implode('', array_map('chr', $array)); + } + + return $chars; + } + + /** + * Read $length characters from the stream and return a 1-dimensional array + * containing there octet values. + * + * @param int $length + * + * @return int[] + */ + public function readBytes($length) + { + if ($this->_offset == $this->_array_size) { + return false; + } + $arrays = array(); + $end = $length + $this->_offset; + for ($i = $this->_offset; $i < $end; ++$i) { + if (!isset($this->_array[$i])) { + break; + } + $arrays[] = $this->_array[$i]; + } + $this->_offset += ($i - $this->_offset); // Limit function calls + + return call_user_func_array('array_merge', $arrays); + } + + /** + * Write $chars to the end of the stream. + * + * @param string $chars + */ + public function write($chars) + { + if (!isset($this->_charReader)) { + $this->_charReader = $this->_charReaderFactory->getReaderFor( + $this->_charset); + } + + $startLength = $this->_charReader->getInitialByteSize(); + + $fp = fopen('php://memory', 'w+b'); + fwrite($fp, $chars); + unset($chars); + fseek($fp, 0, SEEK_SET); + + $buffer = array(0); + $buf_pos = 1; + $buf_len = 1; + $has_datas = true; + do { + $bytes = array(); + // Buffer Filing + if ($buf_len - $buf_pos < $startLength) { + $buf = array_splice($buffer, $buf_pos); + $new = $this->_reloadBuffer($fp, 100); + if ($new) { + $buffer = array_merge($buf, $new); + $buf_len = count($buffer); + $buf_pos = 0; + } else { + $has_datas = false; + } + } + if ($buf_len - $buf_pos > 0) { + $size = 0; + for ($i = 0; $i < $startLength && isset($buffer[$buf_pos]); ++$i) { + ++$size; + $bytes[] = $buffer[$buf_pos++]; + } + $need = $this->_charReader->validateByteSequence( + $bytes, $size); + if ($need > 0) { + if ($buf_len - $buf_pos < $need) { + $new = $this->_reloadBuffer($fp, $need); + + if ($new) { + $buffer = array_merge($buffer, $new); + $buf_len = count($buffer); + } + } + for ($i = 0; $i < $need && isset($buffer[$buf_pos]); ++$i) { + $bytes[] = $buffer[$buf_pos++]; + } + } + $this->_array[] = $bytes; + ++$this->_array_size; + } + } while ($has_datas); + + fclose($fp); + } + + /** + * Move the internal pointer to $charOffset in the stream. + * + * @param int $charOffset + */ + public function setPointer($charOffset) + { + if ($charOffset > $this->_array_size) { + $charOffset = $this->_array_size; + } elseif ($charOffset < 0) { + $charOffset = 0; + } + $this->_offset = $charOffset; + } + + /** + * Empty the stream and reset the internal pointer. + */ + public function flushContents() + { + $this->_offset = 0; + $this->_array = array(); + $this->_array_size = 0; + } + + private function _reloadBuffer($fp, $len) + { + if (!feof($fp) && ($bytes = fread($fp, $len)) !== false) { + $buf = array(); + for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) { + $buf[] = self::$_byteMap[$bytes[$i]]; + } + + return $buf; + } + + return false; + } + + private static function _initializeMaps() + { + if (!isset(self::$_charMap)) { + self::$_charMap = array(); + for ($byte = 0; $byte < 256; ++$byte) { + self::$_charMap[$byte] = chr($byte); + } + self::$_byteMap = array_flip(self::$_charMap); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php new file mode 100644 index 0000000000000000000000000000000000000000..58bd140fd207e039795fe25dcbf49a7214c1f39b --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php @@ -0,0 +1,267 @@ + + */ +class Swift_CharacterStream_NgCharacterStream implements Swift_CharacterStream +{ + /** + * The char reader (lazy-loaded) for the current charset. + * + * @var Swift_CharacterReader + */ + private $_charReader; + + /** + * A factory for creating CharacterReader instances. + * + * @var Swift_CharacterReaderFactory + */ + private $_charReaderFactory; + + /** + * The character set this stream is using. + * + * @var string + */ + private $_charset; + + /** + * The data's stored as-is. + * + * @var string + */ + private $_datas = ''; + + /** + * Number of bytes in the stream. + * + * @var int + */ + private $_datasSize = 0; + + /** + * Map. + * + * @var mixed + */ + private $_map; + + /** + * Map Type. + * + * @var int + */ + private $_mapType = 0; + + /** + * Number of characters in the stream. + * + * @var int + */ + private $_charCount = 0; + + /** + * Position in the stream. + * + * @var int + */ + private $_currentPos = 0; + + /** + * Constructor. + * + * @param Swift_CharacterReaderFactory $factory + * @param string $charset + */ + public function __construct(Swift_CharacterReaderFactory $factory, $charset) + { + $this->setCharacterReaderFactory($factory); + $this->setCharacterSet($charset); + } + + /* -- Changing parameters of the stream -- */ + + /** + * Set the character set used in this CharacterStream. + * + * @param string $charset + */ + public function setCharacterSet($charset) + { + $this->_charset = $charset; + $this->_charReader = null; + $this->_mapType = 0; + } + + /** + * Set the CharacterReaderFactory for multi charset support. + * + * @param Swift_CharacterReaderFactory $factory + */ + public function setCharacterReaderFactory(Swift_CharacterReaderFactory $factory) + { + $this->_charReaderFactory = $factory; + } + + /** + * @see Swift_CharacterStream::flushContents() + */ + public function flushContents() + { + $this->_datas = null; + $this->_map = null; + $this->_charCount = 0; + $this->_currentPos = 0; + $this->_datasSize = 0; + } + + /** + * @see Swift_CharacterStream::importByteStream() + * + * @param Swift_OutputByteStream $os + */ + public function importByteStream(Swift_OutputByteStream $os) + { + $this->flushContents(); + $blocks = 512; + $os->setReadPointer(0); + while (false !== ($read = $os->read($blocks))) { + $this->write($read); + } + } + + /** + * @see Swift_CharacterStream::importString() + * + * @param string $string + */ + public function importString($string) + { + $this->flushContents(); + $this->write($string); + } + + /** + * @see Swift_CharacterStream::read() + * + * @param int $length + * + * @return string + */ + public function read($length) + { + if ($this->_currentPos >= $this->_charCount) { + return false; + } + $ret = false; + $length = $this->_currentPos + $length > $this->_charCount ? $this->_charCount - $this->_currentPos : $length; + switch ($this->_mapType) { + case Swift_CharacterReader::MAP_TYPE_FIXED_LEN: + $len = $length * $this->_map; + $ret = substr($this->_datas, + $this->_currentPos * $this->_map, + $len); + $this->_currentPos += $length; + break; + + case Swift_CharacterReader::MAP_TYPE_INVALID: + $ret = ''; + for (; $this->_currentPos < $length; ++$this->_currentPos) { + if (isset($this->_map[$this->_currentPos])) { + $ret .= '?'; + } else { + $ret .= $this->_datas[$this->_currentPos]; + } + } + break; + + case Swift_CharacterReader::MAP_TYPE_POSITIONS: + $end = $this->_currentPos + $length; + $end = $end > $this->_charCount ? $this->_charCount : $end; + $ret = ''; + $start = 0; + if ($this->_currentPos > 0) { + $start = $this->_map['p'][$this->_currentPos - 1]; + } + $to = $start; + for (; $this->_currentPos < $end; ++$this->_currentPos) { + if (isset($this->_map['i'][$this->_currentPos])) { + $ret .= substr($this->_datas, $start, $to - $start).'?'; + $start = $this->_map['p'][$this->_currentPos]; + } else { + $to = $this->_map['p'][$this->_currentPos]; + } + } + $ret .= substr($this->_datas, $start, $to - $start); + break; + } + + return $ret; + } + + /** + * @see Swift_CharacterStream::readBytes() + * + * @param int $length + * + * @return int[] + */ + public function readBytes($length) + { + $read = $this->read($length); + if ($read !== false) { + $ret = array_map('ord', str_split($read, 1)); + + return $ret; + } + + return false; + } + + /** + * @see Swift_CharacterStream::setPointer() + * + * @param int $charOffset + */ + public function setPointer($charOffset) + { + if ($this->_charCount < $charOffset) { + $charOffset = $this->_charCount; + } + $this->_currentPos = $charOffset; + } + + /** + * @see Swift_CharacterStream::write() + * + * @param string $chars + */ + public function write($chars) + { + if (!isset($this->_charReader)) { + $this->_charReader = $this->_charReaderFactory->getReaderFor( + $this->_charset); + $this->_map = array(); + $this->_mapType = $this->_charReader->getMapType(); + } + $ignored = ''; + $this->_datas .= $chars; + $this->_charCount += $this->_charReader->getCharPositions(substr($this->_datas, $this->_datasSize), $this->_datasSize, $this->_map, $ignored); + if ($ignored !== false) { + $this->_datasSize = strlen($this->_datas) - strlen($ignored); + } else { + $this->_datasSize = strlen($this->_datas); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ConfigurableSpool.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ConfigurableSpool.php new file mode 100644 index 0000000000000000000000000000000000000000..4ae5bacfc40d16d1945485b0392b7a5ea9ed68e7 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ConfigurableSpool.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Base class for Spools (implements time and message limits). + * + * @author Fabien Potencier + */ +abstract class Swift_ConfigurableSpool implements Swift_Spool +{ + /** The maximum number of messages to send per flush */ + private $_message_limit; + + /** The time limit per flush */ + private $_time_limit; + + /** + * Sets the maximum number of messages to send per flush. + * + * @param int $limit + */ + public function setMessageLimit($limit) + { + $this->_message_limit = (int) $limit; + } + + /** + * Gets the maximum number of messages to send per flush. + * + * @return int The limit + */ + public function getMessageLimit() + { + return $this->_message_limit; + } + + /** + * Sets the time limit (in seconds) per flush. + * + * @param int $limit The limit + */ + public function setTimeLimit($limit) + { + $this->_time_limit = (int) $limit; + } + + /** + * Gets the time limit (in seconds) per flush. + * + * @return int The limit + */ + public function getTimeLimit() + { + return $this->_time_limit; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php new file mode 100644 index 0000000000000000000000000000000000000000..8c1074a3a37318d21d656b09ffa4dda859c6af5a --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php @@ -0,0 +1,373 @@ +_store); + } + + /** + * Test if an item is registered in this container with the given name. + * + * @see register() + * + * @param string $itemName + * + * @return bool + */ + public function has($itemName) + { + return array_key_exists($itemName, $this->_store) + && isset($this->_store[$itemName]['lookupType']); + } + + /** + * Lookup the item with the given $itemName. + * + * @see register() + * + * @param string $itemName + * + * @throws Swift_DependencyException If the dependency is not found + * + * @return mixed + */ + public function lookup($itemName) + { + if (!$this->has($itemName)) { + throw new Swift_DependencyException( + 'Cannot lookup dependency "'.$itemName.'" since it is not registered.' + ); + } + + switch ($this->_store[$itemName]['lookupType']) { + case self::TYPE_ALIAS: + return $this->_createAlias($itemName); + case self::TYPE_VALUE: + return $this->_getValue($itemName); + case self::TYPE_INSTANCE: + return $this->_createNewInstance($itemName); + case self::TYPE_SHARED: + return $this->_createSharedInstance($itemName); + } + } + + /** + * Create an array of arguments passed to the constructor of $itemName. + * + * @param string $itemName + * + * @return array + */ + public function createDependenciesFor($itemName) + { + $args = array(); + if (isset($this->_store[$itemName]['args'])) { + $args = $this->_resolveArgs($this->_store[$itemName]['args']); + } + + return $args; + } + + /** + * Register a new dependency with $itemName. + * + * This method returns the current DependencyContainer instance because it + * requires the use of the fluid interface to set the specific details for the + * dependency. + * + * @see asNewInstanceOf(), asSharedInstanceOf(), asValue() + * + * @param string $itemName + * + * @return Swift_DependencyContainer + */ + public function register($itemName) + { + $this->_store[$itemName] = array(); + $this->_endPoint = &$this->_store[$itemName]; + + return $this; + } + + /** + * Specify the previously registered item as a literal value. + * + * {@link register()} must be called before this will work. + * + * @param mixed $value + * + * @return Swift_DependencyContainer + */ + public function asValue($value) + { + $endPoint = &$this->_getEndPoint(); + $endPoint['lookupType'] = self::TYPE_VALUE; + $endPoint['value'] = $value; + + return $this; + } + + /** + * Specify the previously registered item as an alias of another item. + * + * @param string $lookup + * + * @return Swift_DependencyContainer + */ + public function asAliasOf($lookup) + { + $endPoint = &$this->_getEndPoint(); + $endPoint['lookupType'] = self::TYPE_ALIAS; + $endPoint['ref'] = $lookup; + + return $this; + } + + /** + * Specify the previously registered item as a new instance of $className. + * + * {@link register()} must be called before this will work. + * Any arguments can be set with {@link withDependencies()}, + * {@link addConstructorValue()} or {@link addConstructorLookup()}. + * + * @see withDependencies(), addConstructorValue(), addConstructorLookup() + * + * @param string $className + * + * @return Swift_DependencyContainer + */ + public function asNewInstanceOf($className) + { + $endPoint = &$this->_getEndPoint(); + $endPoint['lookupType'] = self::TYPE_INSTANCE; + $endPoint['className'] = $className; + + return $this; + } + + /** + * Specify the previously registered item as a shared instance of $className. + * + * {@link register()} must be called before this will work. + * + * @param string $className + * + * @return Swift_DependencyContainer + */ + public function asSharedInstanceOf($className) + { + $endPoint = &$this->_getEndPoint(); + $endPoint['lookupType'] = self::TYPE_SHARED; + $endPoint['className'] = $className; + + return $this; + } + + /** + * Specify a list of injected dependencies for the previously registered item. + * + * This method takes an array of lookup names. + * + * @see addConstructorValue(), addConstructorLookup() + * + * @param array $lookups + * + * @return Swift_DependencyContainer + */ + public function withDependencies(array $lookups) + { + $endPoint = &$this->_getEndPoint(); + $endPoint['args'] = array(); + foreach ($lookups as $lookup) { + $this->addConstructorLookup($lookup); + } + + return $this; + } + + /** + * Specify a literal (non looked up) value for the constructor of the + * previously registered item. + * + * @see withDependencies(), addConstructorLookup() + * + * @param mixed $value + * + * @return Swift_DependencyContainer + */ + public function addConstructorValue($value) + { + $endPoint = &$this->_getEndPoint(); + if (!isset($endPoint['args'])) { + $endPoint['args'] = array(); + } + $endPoint['args'][] = array('type' => 'value', 'item' => $value); + + return $this; + } + + /** + * Specify a dependency lookup for the constructor of the previously + * registered item. + * + * @see withDependencies(), addConstructorValue() + * + * @param string $lookup + * + * @return Swift_DependencyContainer + */ + public function addConstructorLookup($lookup) + { + $endPoint = &$this->_getEndPoint(); + if (!isset($this->_endPoint['args'])) { + $endPoint['args'] = array(); + } + $endPoint['args'][] = array('type' => 'lookup', 'item' => $lookup); + + return $this; + } + + /** Get the literal value with $itemName */ + private function _getValue($itemName) + { + return $this->_store[$itemName]['value']; + } + + /** Resolve an alias to another item */ + private function _createAlias($itemName) + { + return $this->lookup($this->_store[$itemName]['ref']); + } + + /** Create a fresh instance of $itemName */ + private function _createNewInstance($itemName) + { + $reflector = new ReflectionClass($this->_store[$itemName]['className']); + if ($reflector->getConstructor()) { + return $reflector->newInstanceArgs( + $this->createDependenciesFor($itemName) + ); + } + + return $reflector->newInstance(); + } + + /** Create and register a shared instance of $itemName */ + private function _createSharedInstance($itemName) + { + if (!isset($this->_store[$itemName]['instance'])) { + $this->_store[$itemName]['instance'] = $this->_createNewInstance($itemName); + } + + return $this->_store[$itemName]['instance']; + } + + /** Get the current endpoint in the store */ + private function &_getEndPoint() + { + if (!isset($this->_endPoint)) { + throw new BadMethodCallException( + 'Component must first be registered by calling register()' + ); + } + + return $this->_endPoint; + } + + /** Get an argument list with dependencies resolved */ + private function _resolveArgs(array $args) + { + $resolved = array(); + foreach ($args as $argDefinition) { + switch ($argDefinition['type']) { + case 'lookup': + $resolved[] = $this->_lookupRecursive($argDefinition['item']); + break; + case 'value': + $resolved[] = $argDefinition['item']; + break; + } + } + + return $resolved; + } + + /** Resolve a single dependency with an collections */ + private function _lookupRecursive($item) + { + if (is_array($item)) { + $collection = array(); + foreach ($item as $k => $v) { + $collection[$k] = $this->_lookupRecursive($v); + } + + return $collection; + } + + return $this->lookup($item); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyException.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyException.php new file mode 100644 index 0000000000000000000000000000000000000000..799d38d8334af095a2b983438278acdfe6368c03 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyException.php @@ -0,0 +1,27 @@ +createDependenciesFor('mime.embeddedfile') + ); + + $this->setBody($data); + $this->setFilename($filename); + if ($contentType) { + $this->setContentType($contentType); + } + } + + /** + * Create a new EmbeddedFile. + * + * @param string|Swift_OutputByteStream $data + * @param string $filename + * @param string $contentType + * + * @return Swift_Mime_EmbeddedFile + */ + public static function newInstance($data = null, $filename = null, $contentType = null) + { + return new self($data, $filename, $contentType); + } + + /** + * Create a new EmbeddedFile from a filesystem path. + * + * @param string $path + * + * @return Swift_Mime_EmbeddedFile + */ + public static function fromPath($path) + { + return self::newInstance()->setFile( + new Swift_ByteStream_FileByteStream($path) + ); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder.php new file mode 100644 index 0000000000000000000000000000000000000000..2073abca1b1f9ba139c66e0ed0706e7292d19577 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder.php @@ -0,0 +1,28 @@ += $maxLineLength || 76 < $maxLineLength) { + $maxLineLength = 76; + } + + $encodedString = base64_encode($string); + $firstLine = ''; + + if (0 != $firstLineOffset) { + $firstLine = substr( + $encodedString, 0, $maxLineLength - $firstLineOffset + )."\r\n"; + $encodedString = substr( + $encodedString, $maxLineLength - $firstLineOffset + ); + } + + return $firstLine.trim(chunk_split($encodedString, $maxLineLength, "\r\n")); + } + + /** + * Does nothing. + */ + public function charsetChanged($charset) + { + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..edec10c5173c0c7e755b69ec1167d91378313a77 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php @@ -0,0 +1,300 @@ + '=00', 1 => '=01', 2 => '=02', 3 => '=03', 4 => '=04', + 5 => '=05', 6 => '=06', 7 => '=07', 8 => '=08', 9 => '=09', + 10 => '=0A', 11 => '=0B', 12 => '=0C', 13 => '=0D', 14 => '=0E', + 15 => '=0F', 16 => '=10', 17 => '=11', 18 => '=12', 19 => '=13', + 20 => '=14', 21 => '=15', 22 => '=16', 23 => '=17', 24 => '=18', + 25 => '=19', 26 => '=1A', 27 => '=1B', 28 => '=1C', 29 => '=1D', + 30 => '=1E', 31 => '=1F', 32 => '=20', 33 => '=21', 34 => '=22', + 35 => '=23', 36 => '=24', 37 => '=25', 38 => '=26', 39 => '=27', + 40 => '=28', 41 => '=29', 42 => '=2A', 43 => '=2B', 44 => '=2C', + 45 => '=2D', 46 => '=2E', 47 => '=2F', 48 => '=30', 49 => '=31', + 50 => '=32', 51 => '=33', 52 => '=34', 53 => '=35', 54 => '=36', + 55 => '=37', 56 => '=38', 57 => '=39', 58 => '=3A', 59 => '=3B', + 60 => '=3C', 61 => '=3D', 62 => '=3E', 63 => '=3F', 64 => '=40', + 65 => '=41', 66 => '=42', 67 => '=43', 68 => '=44', 69 => '=45', + 70 => '=46', 71 => '=47', 72 => '=48', 73 => '=49', 74 => '=4A', + 75 => '=4B', 76 => '=4C', 77 => '=4D', 78 => '=4E', 79 => '=4F', + 80 => '=50', 81 => '=51', 82 => '=52', 83 => '=53', 84 => '=54', + 85 => '=55', 86 => '=56', 87 => '=57', 88 => '=58', 89 => '=59', + 90 => '=5A', 91 => '=5B', 92 => '=5C', 93 => '=5D', 94 => '=5E', + 95 => '=5F', 96 => '=60', 97 => '=61', 98 => '=62', 99 => '=63', + 100 => '=64', 101 => '=65', 102 => '=66', 103 => '=67', 104 => '=68', + 105 => '=69', 106 => '=6A', 107 => '=6B', 108 => '=6C', 109 => '=6D', + 110 => '=6E', 111 => '=6F', 112 => '=70', 113 => '=71', 114 => '=72', + 115 => '=73', 116 => '=74', 117 => '=75', 118 => '=76', 119 => '=77', + 120 => '=78', 121 => '=79', 122 => '=7A', 123 => '=7B', 124 => '=7C', + 125 => '=7D', 126 => '=7E', 127 => '=7F', 128 => '=80', 129 => '=81', + 130 => '=82', 131 => '=83', 132 => '=84', 133 => '=85', 134 => '=86', + 135 => '=87', 136 => '=88', 137 => '=89', 138 => '=8A', 139 => '=8B', + 140 => '=8C', 141 => '=8D', 142 => '=8E', 143 => '=8F', 144 => '=90', + 145 => '=91', 146 => '=92', 147 => '=93', 148 => '=94', 149 => '=95', + 150 => '=96', 151 => '=97', 152 => '=98', 153 => '=99', 154 => '=9A', + 155 => '=9B', 156 => '=9C', 157 => '=9D', 158 => '=9E', 159 => '=9F', + 160 => '=A0', 161 => '=A1', 162 => '=A2', 163 => '=A3', 164 => '=A4', + 165 => '=A5', 166 => '=A6', 167 => '=A7', 168 => '=A8', 169 => '=A9', + 170 => '=AA', 171 => '=AB', 172 => '=AC', 173 => '=AD', 174 => '=AE', + 175 => '=AF', 176 => '=B0', 177 => '=B1', 178 => '=B2', 179 => '=B3', + 180 => '=B4', 181 => '=B5', 182 => '=B6', 183 => '=B7', 184 => '=B8', + 185 => '=B9', 186 => '=BA', 187 => '=BB', 188 => '=BC', 189 => '=BD', + 190 => '=BE', 191 => '=BF', 192 => '=C0', 193 => '=C1', 194 => '=C2', + 195 => '=C3', 196 => '=C4', 197 => '=C5', 198 => '=C6', 199 => '=C7', + 200 => '=C8', 201 => '=C9', 202 => '=CA', 203 => '=CB', 204 => '=CC', + 205 => '=CD', 206 => '=CE', 207 => '=CF', 208 => '=D0', 209 => '=D1', + 210 => '=D2', 211 => '=D3', 212 => '=D4', 213 => '=D5', 214 => '=D6', + 215 => '=D7', 216 => '=D8', 217 => '=D9', 218 => '=DA', 219 => '=DB', + 220 => '=DC', 221 => '=DD', 222 => '=DE', 223 => '=DF', 224 => '=E0', + 225 => '=E1', 226 => '=E2', 227 => '=E3', 228 => '=E4', 229 => '=E5', + 230 => '=E6', 231 => '=E7', 232 => '=E8', 233 => '=E9', 234 => '=EA', + 235 => '=EB', 236 => '=EC', 237 => '=ED', 238 => '=EE', 239 => '=EF', + 240 => '=F0', 241 => '=F1', 242 => '=F2', 243 => '=F3', 244 => '=F4', + 245 => '=F5', 246 => '=F6', 247 => '=F7', 248 => '=F8', 249 => '=F9', + 250 => '=FA', 251 => '=FB', 252 => '=FC', 253 => '=FD', 254 => '=FE', + 255 => '=FF', + ); + + protected static $_safeMapShare = array(); + + /** + * A map of non-encoded ascii characters. + * + * @var string[] + */ + protected $_safeMap = array(); + + /** + * Creates a new QpEncoder for the given CharacterStream. + * + * @param Swift_CharacterStream $charStream to use for reading characters + * @param Swift_StreamFilter $filter if input should be canonicalized + */ + public function __construct(Swift_CharacterStream $charStream, Swift_StreamFilter $filter = null) + { + $this->_charStream = $charStream; + if (!isset(self::$_safeMapShare[$this->getSafeMapShareId()])) { + $this->initSafeMap(); + self::$_safeMapShare[$this->getSafeMapShareId()] = $this->_safeMap; + } else { + $this->_safeMap = self::$_safeMapShare[$this->getSafeMapShareId()]; + } + $this->_filter = $filter; + } + + public function __sleep() + { + return array('_charStream', '_filter'); + } + + public function __wakeup() + { + if (!isset(self::$_safeMapShare[$this->getSafeMapShareId()])) { + $this->initSafeMap(); + self::$_safeMapShare[$this->getSafeMapShareId()] = $this->_safeMap; + } else { + $this->_safeMap = self::$_safeMapShare[$this->getSafeMapShareId()]; + } + } + + protected function getSafeMapShareId() + { + return get_class($this); + } + + protected function initSafeMap() + { + foreach (array_merge( + array(0x09, 0x20), range(0x21, 0x3C), range(0x3E, 0x7E)) as $byte) { + $this->_safeMap[$byte] = chr($byte); + } + } + + /** + * Takes an unencoded string and produces a QP encoded string from it. + * + * QP encoded strings have a maximum line length of 76 characters. + * If the first line needs to be shorter, indicate the difference with + * $firstLineOffset. + * + * @param string $string to encode + * @param int $firstLineOffset, optional + * @param int $maxLineLength, optional 0 indicates the default of 76 chars + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + if ($maxLineLength > 76 || $maxLineLength <= 0) { + $maxLineLength = 76; + } + + $thisLineLength = $maxLineLength - $firstLineOffset; + + $lines = array(); + $lNo = 0; + $lines[$lNo] = ''; + $currentLine = &$lines[$lNo++]; + $size = $lineLen = 0; + + $this->_charStream->flushContents(); + $this->_charStream->importString($string); + + // Fetching more than 4 chars at one is slower, as is fetching fewer bytes + // Conveniently 4 chars is the UTF-8 safe number since UTF-8 has up to 6 + // bytes per char and (6 * 4 * 3 = 72 chars per line) * =NN is 3 bytes + while (false !== $bytes = $this->_nextSequence()) { + // If we're filtering the input + if (isset($this->_filter)) { + // If we can't filter because we need more bytes + while ($this->_filter->shouldBuffer($bytes)) { + // Then collect bytes into the buffer + if (false === $moreBytes = $this->_nextSequence(1)) { + break; + } + + foreach ($moreBytes as $b) { + $bytes[] = $b; + } + } + // And filter them + $bytes = $this->_filter->filter($bytes); + } + + $enc = $this->_encodeByteSequence($bytes, $size); + + $i = strpos($enc, '=0D=0A'); + $newLineLength = $lineLen + ($i === false ? $size : $i); + + if ($currentLine && $newLineLength >= $thisLineLength) { + $lines[$lNo] = ''; + $currentLine = &$lines[$lNo++]; + $thisLineLength = $maxLineLength; + $lineLen = 0; + } + + $currentLine .= $enc; + + if ($i === false) { + $lineLen += $size; + } else { + // 6 is the length of '=0D=0A'. + $lineLen = $size - strrpos($enc, '=0D=0A') - 6; + } + } + + return $this->_standardize(implode("=\r\n", $lines)); + } + + /** + * Updates the charset used. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->_charStream->setCharacterSet($charset); + } + + /** + * Encode the given byte array into a verbatim QP form. + * + * @param int[] $bytes + * @param int $size + * + * @return string + */ + protected function _encodeByteSequence(array $bytes, &$size) + { + $ret = ''; + $size = 0; + foreach ($bytes as $b) { + if (isset($this->_safeMap[$b])) { + $ret .= $this->_safeMap[$b]; + ++$size; + } else { + $ret .= self::$_qpMap[$b]; + $size += 3; + } + } + + return $ret; + } + + /** + * Get the next sequence of bytes to read from the char stream. + * + * @param int $size number of bytes to read + * + * @return int[] + */ + protected function _nextSequence($size = 4) + { + return $this->_charStream->readBytes($size); + } + + /** + * Make sure CRLF is correct and HT/SPACE are in valid places. + * + * @param string $string + * + * @return string + */ + protected function _standardize($string) + { + $string = str_replace(array("\t=0D=0A", ' =0D=0A', '=0D=0A'), + array("=09\r\n", "=20\r\n", "\r\n"), $string + ); + switch ($end = ord(substr($string, -1))) { + case 0x09: + case 0x20: + $string = substr_replace($string, self::$_qpMap[$end], -1); + } + + return $string; + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + $this->_charStream = clone $this->_charStream; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php new file mode 100644 index 0000000000000000000000000000000000000000..b0215e883801449c470563b3a15dfa763c95873f --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php @@ -0,0 +1,92 @@ +_charStream = $charStream; + } + + /** + * Takes an unencoded string and produces a string encoded according to + * RFC 2231 from it. + * + * @param string $string + * @param int $firstLineOffset + * @param int $maxLineLength optional, 0 indicates the default of 75 bytes + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + $lines = array(); + $lineCount = 0; + $lines[] = ''; + $currentLine = &$lines[$lineCount++]; + + if (0 >= $maxLineLength) { + $maxLineLength = 75; + } + + $this->_charStream->flushContents(); + $this->_charStream->importString($string); + + $thisLineLength = $maxLineLength - $firstLineOffset; + + while (false !== $char = $this->_charStream->read(4)) { + $encodedChar = rawurlencode($char); + if (0 != strlen($currentLine) + && strlen($currentLine.$encodedChar) > $thisLineLength) { + $lines[] = ''; + $currentLine = &$lines[$lineCount++]; + $thisLineLength = $maxLineLength; + } + $currentLine .= $encodedChar; + } + + return implode("\r\n", $lines); + } + + /** + * Updates the charset used. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->_charStream->setCharacterSet($charset); + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + $this->_charStream = clone $this->_charStream; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoding.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoding.php new file mode 100644 index 0000000000000000000000000000000000000000..245878706db9265f715cbaa90a1a66cadcec2958 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoding.php @@ -0,0 +1,62 @@ +lookup($key); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandEvent.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..674e6b5e41d50d82ddf0b9b45191c619791b0ead --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandEvent.php @@ -0,0 +1,65 @@ +_command = $command; + $this->_successCodes = $successCodes; + } + + /** + * Get the command which was sent to the server. + * + * @return string + */ + public function getCommand() + { + return $this->_command; + } + + /** + * Get the numeric response codes which indicate success for this command. + * + * @return int[] + */ + public function getSuccessCodes() + { + return $this->_successCodes; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php new file mode 100644 index 0000000000000000000000000000000000000000..7545404e765ebceae0c213bb41452a09cc2552be --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php @@ -0,0 +1,24 @@ +_source = $source; + } + + /** + * Get the source object of this event. + * + * @return object + */ + public function getSource() + { + return $this->_source; + } + + /** + * Prevent this Event from bubbling any further up the stack. + * + * @param bool $cancel, optional + */ + public function cancelBubble($cancel = true) + { + $this->_bubbleCancelled = $cancel; + } + + /** + * Returns true if this Event will not bubble any further up the stack. + * + * @return bool + */ + public function bubbleCancelled() + { + return $this->_bubbleCancelled; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..2e92ba9404f0a5523f16b9544e2650304404b798 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php @@ -0,0 +1,65 @@ +_response = $response; + $this->_valid = $valid; + } + + /** + * Get the response which was received from the server. + * + * @return string + */ + public function getResponse() + { + return $this->_response; + } + + /** + * Get the success status of this Event. + * + * @return bool + */ + public function isValid() + { + return $this->_valid; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php new file mode 100644 index 0000000000000000000000000000000000000000..c40919d210fcc7aa523eb7fa227b3353d46d3b84 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php @@ -0,0 +1,24 @@ +_message = $message; + $this->_result = self::RESULT_PENDING; + } + + /** + * Get the Transport used to send the Message. + * + * @return Swift_Transport + */ + public function getTransport() + { + return $this->getSource(); + } + + /** + * Get the Message being sent. + * + * @return Swift_Mime_Message + */ + public function getMessage() + { + return $this->_message; + } + + /** + * Set the array of addresses that failed in sending. + * + * @param array $recipients + */ + public function setFailedRecipients($recipients) + { + $this->_failedRecipients = $recipients; + } + + /** + * Get an recipient addresses which were not accepted for delivery. + * + * @return string[] + */ + public function getFailedRecipients() + { + return $this->_failedRecipients; + } + + /** + * Set the result of sending. + * + * @param int $result + */ + public function setResult($result) + { + $this->_result = $result; + } + + /** + * Get the result of this Event. + * + * The return value is a bitmask from + * {@see RESULT_PENDING, RESULT_SUCCESS, RESULT_TENTATIVE, RESULT_FAILED} + * + * @return int + */ + public function getResult() + { + return $this->_result; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php new file mode 100644 index 0000000000000000000000000000000000000000..d922e1bfa966530734e7257e944e24779469e690 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php @@ -0,0 +1,31 @@ +_eventMap = array( + 'Swift_Events_CommandEvent' => 'Swift_Events_CommandListener', + 'Swift_Events_ResponseEvent' => 'Swift_Events_ResponseListener', + 'Swift_Events_SendEvent' => 'Swift_Events_SendListener', + 'Swift_Events_TransportChangeEvent' => 'Swift_Events_TransportChangeListener', + 'Swift_Events_TransportExceptionEvent' => 'Swift_Events_TransportExceptionListener', + ); + } + + /** + * Create a new SendEvent for $source and $message. + * + * @param Swift_Transport $source + * @param Swift_Mime_Message + * + * @return Swift_Events_SendEvent + */ + public function createSendEvent(Swift_Transport $source, Swift_Mime_Message $message) + { + return new Swift_Events_SendEvent($source, $message); + } + + /** + * Create a new CommandEvent for $source and $command. + * + * @param Swift_Transport $source + * @param string $command That will be executed + * @param array $successCodes That are needed + * + * @return Swift_Events_CommandEvent + */ + public function createCommandEvent(Swift_Transport $source, $command, $successCodes = array()) + { + return new Swift_Events_CommandEvent($source, $command, $successCodes); + } + + /** + * Create a new ResponseEvent for $source and $response. + * + * @param Swift_Transport $source + * @param string $response + * @param bool $valid If the response is valid + * + * @return Swift_Events_ResponseEvent + */ + public function createResponseEvent(Swift_Transport $source, $response, $valid) + { + return new Swift_Events_ResponseEvent($source, $response, $valid); + } + + /** + * Create a new TransportChangeEvent for $source. + * + * @param Swift_Transport $source + * + * @return Swift_Events_TransportChangeEvent + */ + public function createTransportChangeEvent(Swift_Transport $source) + { + return new Swift_Events_TransportChangeEvent($source); + } + + /** + * Create a new TransportExceptionEvent for $source. + * + * @param Swift_Transport $source + * @param Swift_TransportException $ex + * + * @return Swift_Events_TransportExceptionEvent + */ + public function createTransportExceptionEvent(Swift_Transport $source, Swift_TransportException $ex) + { + return new Swift_Events_TransportExceptionEvent($source, $ex); + } + + /** + * Bind an event listener to this dispatcher. + * + * @param Swift_Events_EventListener $listener + */ + public function bindEventListener(Swift_Events_EventListener $listener) + { + foreach ($this->_listeners as $l) { + // Already loaded + if ($l === $listener) { + return; + } + } + $this->_listeners[] = $listener; + } + + /** + * Dispatch the given Event to all suitable listeners. + * + * @param Swift_Events_EventObject $evt + * @param string $target method + */ + public function dispatchEvent(Swift_Events_EventObject $evt, $target) + { + $this->_prepareBubbleQueue($evt); + $this->_bubble($evt, $target); + } + + /** Queue listeners on a stack ready for $evt to be bubbled up it */ + private function _prepareBubbleQueue(Swift_Events_EventObject $evt) + { + $this->_bubbleQueue = array(); + $evtClass = get_class($evt); + foreach ($this->_listeners as $listener) { + if (array_key_exists($evtClass, $this->_eventMap) + && ($listener instanceof $this->_eventMap[$evtClass])) { + $this->_bubbleQueue[] = $listener; + } + } + } + + /** Bubble $evt up the stack calling $target() on each listener */ + private function _bubble(Swift_Events_EventObject $evt, $target) + { + if (!$evt->bubbleCancelled() && $listener = array_shift($this->_bubbleQueue)) { + $listener->$target($evt); + $this->_bubble($evt, $target); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..a8972fda9a4ff11f92deea9fb5ece48533405400 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php @@ -0,0 +1,27 @@ +getSource(); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php new file mode 100644 index 0000000000000000000000000000000000000000..253165de89f10f0e2f39aaf3f6e4f099b620853b --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php @@ -0,0 +1,45 @@ +_exception = $ex; + } + + /** + * Get the TransportException thrown. + * + * @return Swift_TransportException + */ + public function getException() + { + return $this->_exception; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php new file mode 100644 index 0000000000000000000000000000000000000000..cc3c0993793f308f4dd264d0f4c59d79b36fde99 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php @@ -0,0 +1,24 @@ +createDependenciesFor('transport.failover') + ); + + $this->setTransports($transports); + } + + /** + * Create a new FailoverTransport instance. + * + * @param Swift_Transport[] $transports + * + * @return Swift_FailoverTransport + */ + public static function newInstance($transports = array()) + { + return new self($transports); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php new file mode 100644 index 0000000000000000000000000000000000000000..c82c5dbf11e6a8c41597fa9f93358b100b65da09 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php @@ -0,0 +1,208 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Stores Messages on the filesystem. + * + * @author Fabien Potencier + * @author Xavier De Cock + */ +class Swift_FileSpool extends Swift_ConfigurableSpool +{ + /** The spool directory */ + private $_path; + + /** + * File WriteRetry Limit. + * + * @var int + */ + private $_retryLimit = 10; + + /** + * Create a new FileSpool. + * + * @param string $path + * + * @throws Swift_IoException + */ + public function __construct($path) + { + $this->_path = $path; + + if (!file_exists($this->_path)) { + if (!mkdir($this->_path, 0777, true)) { + throw new Swift_IoException(sprintf('Unable to create path "%s".', $this->_path)); + } + } + } + + /** + * Tests if this Spool mechanism has started. + * + * @return bool + */ + public function isStarted() + { + return true; + } + + /** + * Starts this Spool mechanism. + */ + public function start() + { + } + + /** + * Stops this Spool mechanism. + */ + public function stop() + { + } + + /** + * Allow to manage the enqueuing retry limit. + * + * Default, is ten and allows over 64^20 different fileNames + * + * @param int $limit + */ + public function setRetryLimit($limit) + { + $this->_retryLimit = $limit; + } + + /** + * Queues a message. + * + * @param Swift_Mime_Message $message The message to store + * + * @throws Swift_IoException + * + * @return bool + */ + public function queueMessage(Swift_Mime_Message $message) + { + $ser = serialize($message); + $fileName = $this->_path.'/'.$this->getRandomString(10); + for ($i = 0; $i < $this->_retryLimit; ++$i) { + /* We try an exclusive creation of the file. This is an atomic operation, it avoid locking mechanism */ + $fp = @fopen($fileName.'.message', 'x'); + if (false !== $fp) { + if (false === fwrite($fp, $ser)) { + return false; + } + + return fclose($fp); + } else { + /* The file already exists, we try a longer fileName */ + $fileName .= $this->getRandomString(1); + } + } + + throw new Swift_IoException(sprintf('Unable to create a file for enqueuing Message in "%s".', $this->_path)); + } + + /** + * Execute a recovery if for any reason a process is sending for too long. + * + * @param int $timeout in second Defaults is for very slow smtp responses + */ + public function recover($timeout = 900) + { + foreach (new DirectoryIterator($this->_path) as $file) { + $file = $file->getRealPath(); + + if (substr($file, -16) == '.message.sending') { + $lockedtime = filectime($file); + if ((time() - $lockedtime) > $timeout) { + rename($file, substr($file, 0, -8)); + } + } + } + } + + /** + * Sends messages using the given transport instance. + * + * @param Swift_Transport $transport A transport instance + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int The number of sent e-mail's + */ + public function flushQueue(Swift_Transport $transport, &$failedRecipients = null) + { + $directoryIterator = new DirectoryIterator($this->_path); + + /* Start the transport only if there are queued files to send */ + if (!$transport->isStarted()) { + foreach ($directoryIterator as $file) { + if (substr($file->getRealPath(), -8) == '.message') { + $transport->start(); + break; + } + } + } + + $failedRecipients = (array) $failedRecipients; + $count = 0; + $time = time(); + foreach ($directoryIterator as $file) { + $file = $file->getRealPath(); + + if (substr($file, -8) != '.message') { + continue; + } + + /* We try a rename, it's an atomic operation, and avoid locking the file */ + if (rename($file, $file.'.sending')) { + $message = unserialize(file_get_contents($file.'.sending')); + + $count += $transport->send($message, $failedRecipients); + + unlink($file.'.sending'); + } else { + /* This message has just been catched by another process */ + continue; + } + + if ($this->getMessageLimit() && $count >= $this->getMessageLimit()) { + break; + } + + if ($this->getTimeLimit() && (time() - $time) >= $this->getTimeLimit()) { + break; + } + } + + return $count; + } + + /** + * Returns a random string needed to generate a fileName for the queue. + * + * @param int $count + * + * @return string + */ + protected function getRandomString($count) + { + // This string MUST stay FS safe, avoid special chars + $base = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-'; + $ret = ''; + $strlen = strlen($base); + for ($i = 0; $i < $count; ++$i) { + $ret .= $base[((int) rand(0, $strlen - 1))]; + } + + return $ret; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileStream.php new file mode 100644 index 0000000000000000000000000000000000000000..0b24db1ce41217709bfc4073ef445f5b34f477ee --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileStream.php @@ -0,0 +1,24 @@ +setFile( + new Swift_ByteStream_FileByteStream($path) + ); + + return $image; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/InputByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/InputByteStream.php new file mode 100644 index 0000000000000000000000000000000000000000..56efc7593acbe773003647ace4ed0bd21ebe6f27 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/InputByteStream.php @@ -0,0 +1,75 @@ +_stream = $stream; + } + + /** + * Set a string into the cache under $itemKey for the namespace $nsKey. + * + * @see MODE_WRITE, MODE_APPEND + * + * @param string $nsKey + * @param string $itemKey + * @param string $string + * @param int $mode + */ + public function setString($nsKey, $itemKey, $string, $mode) + { + $this->_prepareCache($nsKey); + switch ($mode) { + case self::MODE_WRITE: + $this->_contents[$nsKey][$itemKey] = $string; + break; + case self::MODE_APPEND: + if (!$this->hasKey($nsKey, $itemKey)) { + $this->_contents[$nsKey][$itemKey] = ''; + } + $this->_contents[$nsKey][$itemKey] .= $string; + break; + default: + throw new Swift_SwiftException( + 'Invalid mode ['.$mode.'] used to set nsKey='. + $nsKey.', itemKey='.$itemKey + ); + } + } + + /** + * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. + * + * @see MODE_WRITE, MODE_APPEND + * + * @param string $nsKey + * @param string $itemKey + * @param Swift_OutputByteStream $os + * @param int $mode + */ + public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode) + { + $this->_prepareCache($nsKey); + switch ($mode) { + case self::MODE_WRITE: + $this->clearKey($nsKey, $itemKey); + case self::MODE_APPEND: + if (!$this->hasKey($nsKey, $itemKey)) { + $this->_contents[$nsKey][$itemKey] = ''; + } + while (false !== $bytes = $os->read(8192)) { + $this->_contents[$nsKey][$itemKey] .= $bytes; + } + break; + default: + throw new Swift_SwiftException( + 'Invalid mode ['.$mode.'] used to set nsKey='. + $nsKey.', itemKey='.$itemKey + ); + } + } + + /** + * Provides a ByteStream which when written to, writes data to $itemKey. + * + * NOTE: The stream will always write in append mode. + * + * @param string $nsKey + * @param string $itemKey + * @param Swift_InputByteStream $writeThrough + * + * @return Swift_InputByteStream + */ + public function getInputByteStream($nsKey, $itemKey, Swift_InputByteStream $writeThrough = null) + { + $is = clone $this->_stream; + $is->setKeyCache($this); + $is->setNsKey($nsKey); + $is->setItemKey($itemKey); + if (isset($writeThrough)) { + $is->setWriteThroughStream($writeThrough); + } + + return $is; + } + + /** + * Get data back out of the cache as a string. + * + * @param string $nsKey + * @param string $itemKey + * + * @return string + */ + public function getString($nsKey, $itemKey) + { + $this->_prepareCache($nsKey); + if ($this->hasKey($nsKey, $itemKey)) { + return $this->_contents[$nsKey][$itemKey]; + } + } + + /** + * Get data back out of the cache as a ByteStream. + * + * @param string $nsKey + * @param string $itemKey + * @param Swift_InputByteStream $is to write the data to + */ + public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) + { + $this->_prepareCache($nsKey); + $is->write($this->getString($nsKey, $itemKey)); + } + + /** + * Check if the given $itemKey exists in the namespace $nsKey. + * + * @param string $nsKey + * @param string $itemKey + * + * @return bool + */ + public function hasKey($nsKey, $itemKey) + { + $this->_prepareCache($nsKey); + + return array_key_exists($itemKey, $this->_contents[$nsKey]); + } + + /** + * Clear data for $itemKey in the namespace $nsKey if it exists. + * + * @param string $nsKey + * @param string $itemKey + */ + public function clearKey($nsKey, $itemKey) + { + unset($this->_contents[$nsKey][$itemKey]); + } + + /** + * Clear all data in the namespace $nsKey if it exists. + * + * @param string $nsKey + */ + public function clearAll($nsKey) + { + unset($this->_contents[$nsKey]); + } + + /** + * Initialize the namespace of $nsKey if needed. + * + * @param string $nsKey + */ + private function _prepareCache($nsKey) + { + if (!array_key_exists($nsKey, $this->_contents)) { + $this->_contents[$nsKey] = array(); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php new file mode 100644 index 0000000000000000000000000000000000000000..453f50a15db4bf036ee242d27a376e794ac54cca --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php @@ -0,0 +1,321 @@ +_stream = $stream; + $this->_path = $path; + + if (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime() == 1) { + $this->_quotes = true; + } + } + + /** + * Set a string into the cache under $itemKey for the namespace $nsKey. + * + * @see MODE_WRITE, MODE_APPEND + * + * @param string $nsKey + * @param string $itemKey + * @param string $string + * @param int $mode + * + * @throws Swift_IoException + */ + public function setString($nsKey, $itemKey, $string, $mode) + { + $this->_prepareCache($nsKey); + switch ($mode) { + case self::MODE_WRITE: + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); + break; + case self::MODE_APPEND: + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_END); + break; + default: + throw new Swift_SwiftException( + 'Invalid mode ['.$mode.'] used to set nsKey='. + $nsKey.', itemKey='.$itemKey + ); + break; + } + fwrite($fp, $string); + $this->_freeHandle($nsKey, $itemKey); + } + + /** + * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. + * + * @see MODE_WRITE, MODE_APPEND + * + * @param string $nsKey + * @param string $itemKey + * @param Swift_OutputByteStream $os + * @param int $mode + * + * @throws Swift_IoException + */ + public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode) + { + $this->_prepareCache($nsKey); + switch ($mode) { + case self::MODE_WRITE: + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); + break; + case self::MODE_APPEND: + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_END); + break; + default: + throw new Swift_SwiftException( + 'Invalid mode ['.$mode.'] used to set nsKey='. + $nsKey.', itemKey='.$itemKey + ); + break; + } + while (false !== $bytes = $os->read(8192)) { + fwrite($fp, $bytes); + } + $this->_freeHandle($nsKey, $itemKey); + } + + /** + * Provides a ByteStream which when written to, writes data to $itemKey. + * + * NOTE: The stream will always write in append mode. + * + * @param string $nsKey + * @param string $itemKey + * @param Swift_InputByteStream $writeThrough + * + * @return Swift_InputByteStream + */ + public function getInputByteStream($nsKey, $itemKey, Swift_InputByteStream $writeThrough = null) + { + $is = clone $this->_stream; + $is->setKeyCache($this); + $is->setNsKey($nsKey); + $is->setItemKey($itemKey); + if (isset($writeThrough)) { + $is->setWriteThroughStream($writeThrough); + } + + return $is; + } + + /** + * Get data back out of the cache as a string. + * + * @param string $nsKey + * @param string $itemKey + * + * @throws Swift_IoException + * + * @return string + */ + public function getString($nsKey, $itemKey) + { + $this->_prepareCache($nsKey); + if ($this->hasKey($nsKey, $itemKey)) { + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); + if ($this->_quotes) { + ini_set('magic_quotes_runtime', 0); + } + $str = ''; + while (!feof($fp) && false !== $bytes = fread($fp, 8192)) { + $str .= $bytes; + } + if ($this->_quotes) { + ini_set('magic_quotes_runtime', 1); + } + $this->_freeHandle($nsKey, $itemKey); + + return $str; + } + } + + /** + * Get data back out of the cache as a ByteStream. + * + * @param string $nsKey + * @param string $itemKey + * @param Swift_InputByteStream $is to write the data to + */ + public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) + { + if ($this->hasKey($nsKey, $itemKey)) { + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); + if ($this->_quotes) { + ini_set('magic_quotes_runtime', 0); + } + while (!feof($fp) && false !== $bytes = fread($fp, 8192)) { + $is->write($bytes); + } + if ($this->_quotes) { + ini_set('magic_quotes_runtime', 1); + } + $this->_freeHandle($nsKey, $itemKey); + } + } + + /** + * Check if the given $itemKey exists in the namespace $nsKey. + * + * @param string $nsKey + * @param string $itemKey + * + * @return bool + */ + public function hasKey($nsKey, $itemKey) + { + return is_file($this->_path.'/'.$nsKey.'/'.$itemKey); + } + + /** + * Clear data for $itemKey in the namespace $nsKey if it exists. + * + * @param string $nsKey + * @param string $itemKey + */ + public function clearKey($nsKey, $itemKey) + { + if ($this->hasKey($nsKey, $itemKey)) { + $this->_freeHandle($nsKey, $itemKey); + unlink($this->_path.'/'.$nsKey.'/'.$itemKey); + } + } + + /** + * Clear all data in the namespace $nsKey if it exists. + * + * @param string $nsKey + */ + public function clearAll($nsKey) + { + if (array_key_exists($nsKey, $this->_keys)) { + foreach ($this->_keys[$nsKey] as $itemKey => $null) { + $this->clearKey($nsKey, $itemKey); + } + if (is_dir($this->_path.'/'.$nsKey)) { + rmdir($this->_path.'/'.$nsKey); + } + unset($this->_keys[$nsKey]); + } + } + + /** + * Initialize the namespace of $nsKey if needed. + * + * @param string $nsKey + */ + private function _prepareCache($nsKey) + { + $cacheDir = $this->_path.'/'.$nsKey; + if (!is_dir($cacheDir)) { + if (!mkdir($cacheDir)) { + throw new Swift_IoException('Failed to create cache directory '.$cacheDir); + } + $this->_keys[$nsKey] = array(); + } + } + + /** + * Get a file handle on the cache item. + * + * @param string $nsKey + * @param string $itemKey + * @param int $position + * + * @return resource + */ + private function _getHandle($nsKey, $itemKey, $position) + { + if (!isset($this->_keys[$nsKey][$itemKey])) { + $openMode = $this->hasKey($nsKey, $itemKey) ? 'r+b' : 'w+b'; + $fp = fopen($this->_path.'/'.$nsKey.'/'.$itemKey, $openMode); + $this->_keys[$nsKey][$itemKey] = $fp; + } + if (self::POSITION_START == $position) { + fseek($this->_keys[$nsKey][$itemKey], 0, SEEK_SET); + } elseif (self::POSITION_END == $position) { + fseek($this->_keys[$nsKey][$itemKey], 0, SEEK_END); + } + + return $this->_keys[$nsKey][$itemKey]; + } + + private function _freeHandle($nsKey, $itemKey) + { + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_CURRENT); + fclose($fp); + $this->_keys[$nsKey][$itemKey] = null; + } + + /** + * Destructor. + */ + public function __destruct() + { + foreach ($this->_keys as $nsKey => $null) { + $this->clearAll($nsKey); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php new file mode 100644 index 0000000000000000000000000000000000000000..af80bdca6bf533ef3915d66cf495c2a720ea275f --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php @@ -0,0 +1,51 @@ +_keyCache = $keyCache; + } + + /** + * Specify a stream to write through for each write(). + * + * @param Swift_InputByteStream $is + */ + public function setWriteThroughStream(Swift_InputByteStream $is) + { + $this->_writeThrough = $is; + } + + /** + * Writes $bytes to the end of the stream. + * + * @param string $bytes + * @param Swift_InputByteStream $is optional + */ + public function write($bytes, Swift_InputByteStream $is = null) + { + $this->_keyCache->setString( + $this->_nsKey, $this->_itemKey, $bytes, Swift_KeyCache::MODE_APPEND + ); + if (isset($is)) { + $is->write($bytes); + } + if (isset($this->_writeThrough)) { + $this->_writeThrough->write($bytes); + } + } + + /** + * Not used. + */ + public function commit() + { + } + + /** + * Not used. + */ + public function bind(Swift_InputByteStream $is) + { + } + + /** + * Not used. + */ + public function unbind(Swift_InputByteStream $is) + { + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + */ + public function flushBuffers() + { + $this->_keyCache->clearKey($this->_nsKey, $this->_itemKey); + } + + /** + * Set the nsKey which will be written to. + * + * @param string $nsKey + */ + public function setNsKey($nsKey) + { + $this->_nsKey = $nsKey; + } + + /** + * Set the itemKey which will be written to. + * + * @param string $itemKey + */ + public function setItemKey($itemKey) + { + $this->_itemKey = $itemKey; + } + + /** + * Any implementation should be cloneable, allowing the clone to access a + * separate $nsKey and $itemKey. + */ + public function __clone() + { + $this->_writeThrough = null; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php new file mode 100644 index 0000000000000000000000000000000000000000..fdba9df50dc139bbf4fd8b1247e4d92b45091644 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php @@ -0,0 +1,45 @@ +createDependenciesFor('transport.loadbalanced') + ); + + $this->setTransports($transports); + } + + /** + * Create a new LoadBalancedTransport instance. + * + * @param array $transports + * + * @return Swift_LoadBalancedTransport + */ + public static function newInstance($transports = array()) + { + return new self($transports); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php new file mode 100644 index 0000000000000000000000000000000000000000..994df3ec2b2edc54c1c0c6230ceb3102aa18961a --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php @@ -0,0 +1,47 @@ +createDependenciesFor('transport.mail') + ); + + $this->setExtraParams($extraParams); + } + + /** + * Create a new MailTransport instance. + * + * @param string $extraParams To be passed to mail() + * + * @return Swift_MailTransport + */ + public static function newInstance($extraParams = '-f%s') + { + return new self($extraParams); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php new file mode 100644 index 0000000000000000000000000000000000000000..641154627b99b9a8f4375ca939564cfaebd507bf --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php @@ -0,0 +1,114 @@ +_transport = $transport; + } + + /** + * Create a new Mailer instance. + * + * @param Swift_Transport $transport + * + * @return Swift_Mailer + */ + public static function newInstance(Swift_Transport $transport) + { + return new self($transport); + } + + /** + * Create a new class instance of one of the message services. + * + * For example 'mimepart' would create a 'message.mimepart' instance + * + * @param string $service + * + * @return object + */ + public function createMessage($service = 'message') + { + return Swift_DependencyContainer::getInstance() + ->lookup('message.'.$service); + } + + /** + * Send the given Message like it would be sent in a mail client. + * + * All recipients (with the exception of Bcc) will be able to see the other + * recipients this message was sent to. + * + * Recipient/sender data will be retrieved from the Message object. + * + * The return value is the number of recipients who were accepted for + * delivery. + * + * @param Swift_Mime_Message $message + * @param array $failedRecipients An array of failures by-reference + * + * @return int The number of successful recipients. Can be 0 which indicates failure + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $failedRecipients = (array) $failedRecipients; + + if (!$this->_transport->isStarted()) { + $this->_transport->start(); + } + + $sent = 0; + + try { + $sent = $this->_transport->send($message, $failedRecipients); + } catch (Swift_RfcComplianceException $e) { + foreach ($message->getTo() as $address => $name) { + $failedRecipients[] = $address; + } + } + + return $sent; + } + + /** + * Register a plugin using a known unique key (e.g. myPlugin). + * + * @param Swift_Events_EventListener $plugin + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + $this->_transport->registerPlugin($plugin); + } + + /** + * The Transport used to send messages. + * + * @return Swift_Transport + */ + public function getTransport() + { + return $this->_transport; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php new file mode 100644 index 0000000000000000000000000000000000000000..e3e6cad05bdf7982abe5596f878f0acd464c119e --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php @@ -0,0 +1,55 @@ +_recipients = $recipients; + } + + /** + * Returns true only if there are more recipients to send to. + * + * @return bool + */ + public function hasNext() + { + return !empty($this->_recipients); + } + + /** + * Returns an array where the keys are the addresses of recipients and the + * values are the names. e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL). + * + * @return array + */ + public function nextRecipient() + { + return array_splice($this->_recipients, 0, 1); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php new file mode 100644 index 0000000000000000000000000000000000000000..650f3ec3df4816072e6720351141c0b58ae3936a --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php @@ -0,0 +1,32 @@ + 'Foo') or ('foo@bar' => NULL). + * + * @return array + */ + public function nextRecipient(); +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MemorySpool.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MemorySpool.php new file mode 100644 index 0000000000000000000000000000000000000000..2cafb6751793e15e710b2494ba2b9993e030af2e --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MemorySpool.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Stores Messages in memory. + * + * @author Fabien Potencier + */ +class Swift_MemorySpool implements Swift_Spool +{ + protected $messages = array(); + private $flushRetries = 3; + + /** + * Tests if this Transport mechanism has started. + * + * @return bool + */ + public function isStarted() + { + return true; + } + + /** + * Starts this Transport mechanism. + */ + public function start() + { + } + + /** + * Stops this Transport mechanism. + */ + public function stop() + { + } + + /** + * @param int $retries + */ + public function setFlushRetries($retries) + { + $this->flushRetries = $retries; + } + + /** + * Stores a message in the queue. + * + * @param Swift_Mime_Message $message The message to store + * + * @return bool Whether the operation has succeeded + */ + public function queueMessage(Swift_Mime_Message $message) + { + //clone the message to make sure it is not changed while in the queue + $this->messages[] = clone $message; + + return true; + } + + /** + * Sends messages using the given transport instance. + * + * @param Swift_Transport $transport A transport instance + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int The number of sent emails + */ + public function flushQueue(Swift_Transport $transport, &$failedRecipients = null) + { + if (!$this->messages) { + return 0; + } + + if (!$transport->isStarted()) { + $transport->start(); + } + + $count = 0; + $retries = $this->flushRetries; + while ($retries--) { + try { + while ($message = array_pop($this->messages)) { + $count += $transport->send($message, $failedRecipients); + } + } catch (Swift_TransportException $exception) { + if ($retries) { + // re-queue the message at the end of the queue to give a chance + // to the other messages to be sent, in case the failure was due to + // this message and not just the transport failing + array_unshift($this->messages, $message); + + // wait half a second before we try again + usleep(500000); + } else { + throw $exception; + } + } + } + + return $count; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php new file mode 100644 index 0000000000000000000000000000000000000000..a6bb659300314c0dfdaf8037fd9c5e5eb6d1fc68 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php @@ -0,0 +1,291 @@ +createDependenciesFor('mime.message') + ); + + if (!isset($charset)) { + $charset = Swift_DependencyContainer::getInstance() + ->lookup('properties.charset'); + } + $this->setSubject($subject); + $this->setBody($body); + $this->setCharset($charset); + if ($contentType) { + $this->setContentType($contentType); + } + } + + /** + * Create a new Message. + * + * @param string $subject + * @param string $body + * @param string $contentType + * @param string $charset + * + * @return $this + */ + public static function newInstance($subject = null, $body = null, $contentType = null, $charset = null) + { + return new self($subject, $body, $contentType, $charset); + } + + /** + * Add a MimePart to this Message. + * + * @param string|Swift_OutputByteStream $body + * @param string $contentType + * @param string $charset + * + * @return $this + */ + public function addPart($body, $contentType = null, $charset = null) + { + return $this->attach(Swift_MimePart::newInstance( + $body, $contentType, $charset + )); + } + + /** + * Detach a signature handler from a message. + * + * @param Swift_Signer $signer + * + * @return $this + */ + public function attachSigner(Swift_Signer $signer) + { + if ($signer instanceof Swift_Signers_HeaderSigner) { + $this->headerSigners[] = $signer; + } elseif ($signer instanceof Swift_Signers_BodySigner) { + $this->bodySigners[] = $signer; + } + + return $this; + } + + /** + * Attach a new signature handler to the message. + * + * @param Swift_Signer $signer + * + * @return $this + */ + public function detachSigner(Swift_Signer $signer) + { + if ($signer instanceof Swift_Signers_HeaderSigner) { + foreach ($this->headerSigners as $k => $headerSigner) { + if ($headerSigner === $signer) { + unset($this->headerSigners[$k]); + + return $this; + } + } + } elseif ($signer instanceof Swift_Signers_BodySigner) { + foreach ($this->bodySigners as $k => $bodySigner) { + if ($bodySigner === $signer) { + unset($this->bodySigners[$k]); + + return $this; + } + } + } + + return $this; + } + + /** + * Get this message as a complete string. + * + * @return string + */ + public function toString() + { + if (empty($this->headerSigners) && empty($this->bodySigners)) { + return parent::toString(); + } + + $this->saveMessage(); + + $this->doSign(); + + $string = parent::toString(); + + $this->restoreMessage(); + + return $string; + } + + /** + * Write this message to a {@link Swift_InputByteStream}. + * + * @param Swift_InputByteStream $is + */ + public function toByteStream(Swift_InputByteStream $is) + { + if (empty($this->headerSigners) && empty($this->bodySigners)) { + parent::toByteStream($is); + + return; + } + + $this->saveMessage(); + + $this->doSign(); + + parent::toByteStream($is); + + $this->restoreMessage(); + } + + public function __wakeup() + { + Swift_DependencyContainer::getInstance()->createDependenciesFor('mime.message'); + } + + /** + * loops through signers and apply the signatures. + */ + protected function doSign() + { + foreach ($this->bodySigners as $signer) { + $altered = $signer->getAlteredHeaders(); + $this->saveHeaders($altered); + $signer->signMessage($this); + } + + foreach ($this->headerSigners as $signer) { + $altered = $signer->getAlteredHeaders(); + $this->saveHeaders($altered); + $signer->reset(); + + $signer->setHeaders($this->getHeaders()); + + $signer->startBody(); + $this->_bodyToByteStream($signer); + $signer->endBody(); + + $signer->addSignature($this->getHeaders()); + } + } + + /** + * save the message before any signature is applied. + */ + protected function saveMessage() + { + $this->savedMessage = array('headers' => array()); + $this->savedMessage['body'] = $this->getBody(); + $this->savedMessage['children'] = $this->getChildren(); + if (count($this->savedMessage['children']) > 0 && $this->getBody() != '') { + $this->setChildren(array_merge(array($this->_becomeMimePart()), $this->savedMessage['children'])); + $this->setBody(''); + } + } + + /** + * save the original headers. + * + * @param array $altered + */ + protected function saveHeaders(array $altered) + { + foreach ($altered as $head) { + $lc = strtolower($head); + + if (!isset($this->savedMessage['headers'][$lc])) { + $this->savedMessage['headers'][$lc] = $this->getHeaders()->getAll($head); + } + } + } + + /** + * Remove or restore altered headers. + */ + protected function restoreHeaders() + { + foreach ($this->savedMessage['headers'] as $name => $savedValue) { + $headers = $this->getHeaders()->getAll($name); + + foreach ($headers as $key => $value) { + if (!isset($savedValue[$key])) { + $this->getHeaders()->remove($name, $key); + } + } + } + } + + /** + * Restore message body. + */ + protected function restoreMessage() + { + $this->setBody($this->savedMessage['body']); + $this->setChildren($this->savedMessage['children']); + + $this->restoreHeaders(); + $this->savedMessage = array(); + } + + /** + * Clone Message Signers. + * + * @see Swift_Mime_SimpleMimeEntity::__clone() + */ + public function __clone() + { + parent::__clone(); + foreach ($this->bodySigners as $key => $bodySigner) { + $this->bodySigners[$key] = clone $bodySigner; + } + + foreach ($this->headerSigners as $key => $headerSigner) { + $this->headerSigners[$key] = clone $headerSigner; + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php new file mode 100644 index 0000000000000000000000000000000000000000..46a5e8da9468230471472a129ec5a0c49b9f95db --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php @@ -0,0 +1,149 @@ +setDisposition('attachment'); + $this->setContentType('application/octet-stream'); + $this->_mimeTypes = $mimeTypes; + } + + /** + * Get the nesting level used for this attachment. + * + * Always returns {@link LEVEL_MIXED}. + * + * @return int + */ + public function getNestingLevel() + { + return self::LEVEL_MIXED; + } + + /** + * Get the Content-Disposition of this attachment. + * + * By default attachments have a disposition of "attachment". + * + * @return string + */ + public function getDisposition() + { + return $this->_getHeaderFieldModel('Content-Disposition'); + } + + /** + * Set the Content-Disposition of this attachment. + * + * @param string $disposition + * + * @return Swift_Mime_Attachment + */ + public function setDisposition($disposition) + { + if (!$this->_setHeaderFieldModel('Content-Disposition', $disposition)) { + $this->getHeaders()->addParameterizedHeader('Content-Disposition', $disposition); + } + + return $this; + } + + /** + * Get the filename of this attachment when downloaded. + * + * @return string + */ + public function getFilename() + { + return $this->_getHeaderParameter('Content-Disposition', 'filename'); + } + + /** + * Set the filename of this attachment. + * + * @param string $filename + * + * @return Swift_Mime_Attachment + */ + public function setFilename($filename) + { + $this->_setHeaderParameter('Content-Disposition', 'filename', $filename); + $this->_setHeaderParameter('Content-Type', 'name', $filename); + + return $this; + } + + /** + * Get the file size of this attachment. + * + * @return int + */ + public function getSize() + { + return $this->_getHeaderParameter('Content-Disposition', 'size'); + } + + /** + * Set the file size of this attachment. + * + * @param int $size + * + * @return Swift_Mime_Attachment + */ + public function setSize($size) + { + $this->_setHeaderParameter('Content-Disposition', 'size', $size); + + return $this; + } + + /** + * Set the file that this attachment is for. + * + * @param Swift_FileStream $file + * @param string $contentType optional + * + * @return Swift_Mime_Attachment + */ + public function setFile(Swift_FileStream $file, $contentType = null) + { + $this->setFilename(basename($file->getPath())); + $this->setBody($file, $contentType); + if (!isset($contentType)) { + $extension = strtolower(substr($file->getPath(), strrpos($file->getPath(), '.') + 1)); + + if (array_key_exists($extension, $this->_mimeTypes)) { + $this->setContentType($this->_mimeTypes[$extension]); + } + } + + return $this; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php new file mode 100644 index 0000000000000000000000000000000000000000..b49c3a873b157949cbbd3854c2c5a6c6c9ae5f3c --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php @@ -0,0 +1,24 @@ += $maxLineLength || 76 < $maxLineLength) { + $maxLineLength = 76; + } + + $remainder = 0; + $base64ReadBufferRemainderBytes = null; + + // To reduce memory usage, the output buffer is streamed to the input buffer like so: + // Output Stream => base64encode => wrap line length => Input Stream + // HOWEVER it's important to note that base64_encode() should only be passed whole triplets of data (except for the final chunk of data) + // otherwise it will assume the input data has *ended* and it will incorrectly pad/terminate the base64 data mid-stream. + // We use $base64ReadBufferRemainderBytes to carry over 1-2 "remainder" bytes from the each chunk from OutputStream and pre-pend those onto the + // chunk of bytes read in the next iteration. + // When the OutputStream is empty, we must flush any remainder bytes. + while (true) { + $readBytes = $os->read(8192); + $atEOF = ($readBytes === false); + + if ($atEOF) { + $streamTheseBytes = $base64ReadBufferRemainderBytes; + } else { + $streamTheseBytes = $base64ReadBufferRemainderBytes.$readBytes; + } + $base64ReadBufferRemainderBytes = null; + $bytesLength = strlen($streamTheseBytes); + + if ($bytesLength === 0) { // no data left to encode + break; + } + + // if we're not on the last block of the ouput stream, make sure $streamTheseBytes ends with a complete triplet of data + // and carry over remainder 1-2 bytes to the next loop iteration + if (!$atEOF) { + $excessBytes = $bytesLength % 3; + if ($excessBytes !== 0) { + $base64ReadBufferRemainderBytes = substr($streamTheseBytes, -$excessBytes); + $streamTheseBytes = substr($streamTheseBytes, 0, $bytesLength - $excessBytes); + } + } + + $encoded = base64_encode($streamTheseBytes); + $encodedTransformed = ''; + $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset; + + while ($thisMaxLineLength < strlen($encoded)) { + $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength)."\r\n"; + $firstLineOffset = 0; + $encoded = substr($encoded, $thisMaxLineLength); + $thisMaxLineLength = $maxLineLength; + $remainder = 0; + } + + if (0 < $remainingLength = strlen($encoded)) { + $remainder += $remainingLength; + $encodedTransformed .= $encoded; + $encoded = null; + } + + $is->write($encodedTransformed); + + if ($atEOF) { + break; + } + } + } + + /** + * Get the name of this encoding scheme. + * Returns the string 'base64'. + * + * @return string + */ + public function getName() + { + return 'base64'; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..710b5ac9edccad605d877d91bf878f61cf841c0c --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php @@ -0,0 +1,123 @@ +charset = $charset ? $charset : 'utf-8'; + } + + /** + * Notify this observer that the entity's charset has changed. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->charset = $charset; + } + + /** + * Encode $in to $out. + * + * @param Swift_OutputByteStream $os to read from + * @param Swift_InputByteStream $is to write to + * @param int $firstLineOffset + * @param int $maxLineLength 0 indicates the default length for this encoding + * + * @throws RuntimeException + */ + public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) + { + if ($this->charset !== 'utf-8') { + throw new RuntimeException( + sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset)); + } + + $string = ''; + + while (false !== $bytes = $os->read(8192)) { + $string .= $bytes; + } + + $is->write($this->encodeString($string)); + } + + /** + * Get the MIME name of this content encoding scheme. + * + * @return string + */ + public function getName() + { + return 'quoted-printable'; + } + + /** + * Encode a given string to produce an encoded string. + * + * @param string $string + * @param int $firstLineOffset if first line needs to be shorter + * @param int $maxLineLength 0 indicates the default length for this encoding + * + * @throws RuntimeException + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + if ($this->charset !== 'utf-8') { + throw new RuntimeException( + sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset)); + } + + return $this->_standardize(quoted_printable_encode($string)); + } + + /** + * Make sure CRLF is correct and HT/SPACE are in valid places. + * + * @param string $string + * + * @return string + */ + protected function _standardize($string) + { + // transform CR or LF to CRLF + $string = preg_replace('~=0D(?!=0A)|(?_name = $name; + $this->_canonical = $canonical; + } + + /** + * Encode a given string to produce an encoded string. + * + * @param string $string + * @param int $firstLineOffset ignored + * @param int $maxLineLength - 0 means no wrapping will occur + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + if ($this->_canonical) { + $string = $this->_canonicalize($string); + } + + return $this->_safeWordWrap($string, $maxLineLength, "\r\n"); + } + + /** + * Encode stream $in to stream $out. + * + * @param Swift_OutputByteStream $os + * @param Swift_InputByteStream $is + * @param int $firstLineOffset ignored + * @param int $maxLineLength optional, 0 means no wrapping will occur + */ + public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) + { + $leftOver = ''; + while (false !== $bytes = $os->read(8192)) { + $toencode = $leftOver.$bytes; + if ($this->_canonical) { + $toencode = $this->_canonicalize($toencode); + } + $wrapped = $this->_safeWordWrap($toencode, $maxLineLength, "\r\n"); + $lastLinePos = strrpos($wrapped, "\r\n"); + $leftOver = substr($wrapped, $lastLinePos); + $wrapped = substr($wrapped, 0, $lastLinePos); + + $is->write($wrapped); + } + if (strlen($leftOver)) { + $is->write($leftOver); + } + } + + /** + * Get the name of this encoding scheme. + * + * @return string + */ + public function getName() + { + return $this->_name; + } + + /** + * Not used. + */ + public function charsetChanged($charset) + { + } + + /** + * A safer (but weaker) wordwrap for unicode. + * + * @param string $string + * @param int $length + * @param string $le + * + * @return string + */ + private function _safeWordwrap($string, $length = 75, $le = "\r\n") + { + if (0 >= $length) { + return $string; + } + + $originalLines = explode($le, $string); + + $lines = array(); + $lineCount = 0; + + foreach ($originalLines as $originalLine) { + $lines[] = ''; + $currentLine = &$lines[$lineCount++]; + + //$chunks = preg_split('/(?<=[\ \t,\.!\?\-&\+\/])/', $originalLine); + $chunks = preg_split('/(?<=\s)/', $originalLine); + + foreach ($chunks as $chunk) { + if (0 != strlen($currentLine) + && strlen($currentLine.$chunk) > $length) { + $lines[] = ''; + $currentLine = &$lines[$lineCount++]; + } + $currentLine .= $chunk; + } + } + + return implode("\r\n", $lines); + } + + /** + * Canonicalize string input (fix CRLF). + * + * @param string $string + * + * @return string + */ + private function _canonicalize($string) + { + return str_replace( + array("\r\n", "\r", "\n"), + array("\n", "\n", "\r\n"), + $string + ); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..5cc907b8e7e10035aff56382ac130f15a4a50084 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php @@ -0,0 +1,134 @@ +_dotEscape = $dotEscape; + parent::__construct($charStream, $filter); + } + + public function __sleep() + { + return array('_charStream', '_filter', '_dotEscape'); + } + + protected function getSafeMapShareId() + { + return get_class($this).($this->_dotEscape ? '.dotEscape' : ''); + } + + protected function initSafeMap() + { + parent::initSafeMap(); + if ($this->_dotEscape) { + /* Encode . as =2e for buggy remote servers */ + unset($this->_safeMap[0x2e]); + } + } + + /** + * Encode stream $in to stream $out. + * + * QP encoded strings have a maximum line length of 76 characters. + * If the first line needs to be shorter, indicate the difference with + * $firstLineOffset. + * + * @param Swift_OutputByteStream $os output stream + * @param Swift_InputByteStream $is input stream + * @param int $firstLineOffset + * @param int $maxLineLength + */ + public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) + { + if ($maxLineLength > 76 || $maxLineLength <= 0) { + $maxLineLength = 76; + } + + $thisLineLength = $maxLineLength - $firstLineOffset; + + $this->_charStream->flushContents(); + $this->_charStream->importByteStream($os); + + $currentLine = ''; + $prepend = ''; + $size = $lineLen = 0; + + while (false !== $bytes = $this->_nextSequence()) { + // If we're filtering the input + if (isset($this->_filter)) { + // If we can't filter because we need more bytes + while ($this->_filter->shouldBuffer($bytes)) { + // Then collect bytes into the buffer + if (false === $moreBytes = $this->_nextSequence(1)) { + break; + } + + foreach ($moreBytes as $b) { + $bytes[] = $b; + } + } + // And filter them + $bytes = $this->_filter->filter($bytes); + } + + $enc = $this->_encodeByteSequence($bytes, $size); + + $i = strpos($enc, '=0D=0A'); + $newLineLength = $lineLen + ($i === false ? $size : $i); + + if ($currentLine && $newLineLength >= $thisLineLength) { + $is->write($prepend.$this->_standardize($currentLine)); + $currentLine = ''; + $prepend = "=\r\n"; + $thisLineLength = $maxLineLength; + $lineLen = 0; + } + + $currentLine .= $enc; + + if ($i === false) { + $lineLen += $size; + } else { + // 6 is the length of '=0D=0A'. + $lineLen = $size - strrpos($enc, '=0D=0A') - 6; + } + } + if (strlen($currentLine)) { + $is->write($prepend.$this->_standardize($currentLine)); + } + } + + /** + * Get the name of this encoding scheme. + * Returns the string 'quoted-printable'. + * + * @return string + */ + public function getName() + { + return 'quoted-printable'; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php new file mode 100644 index 0000000000000000000000000000000000000000..3214e1cf3fd11aee463de7b831d0df971712f60b --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php @@ -0,0 +1,98 @@ + + */ +class Swift_Mime_ContentEncoder_QpContentEncoderProxy implements Swift_Mime_ContentEncoder +{ + /** + * @var Swift_Mime_ContentEncoder_QpContentEncoder + */ + private $safeEncoder; + + /** + * @var Swift_Mime_ContentEncoder_NativeQpContentEncoder + */ + private $nativeEncoder; + + /** + * @var null|string + */ + private $charset; + + /** + * Constructor. + * + * @param Swift_Mime_ContentEncoder_QpContentEncoder $safeEncoder + * @param Swift_Mime_ContentEncoder_NativeQpContentEncoder $nativeEncoder + * @param string|null $charset + */ + public function __construct(Swift_Mime_ContentEncoder_QpContentEncoder $safeEncoder, Swift_Mime_ContentEncoder_NativeQpContentEncoder $nativeEncoder, $charset) + { + $this->safeEncoder = $safeEncoder; + $this->nativeEncoder = $nativeEncoder; + $this->charset = $charset; + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + $this->safeEncoder = clone $this->safeEncoder; + $this->nativeEncoder = clone $this->nativeEncoder; + } + + /** + * {@inheritdoc} + */ + public function charsetChanged($charset) + { + $this->charset = $charset; + $this->safeEncoder->charsetChanged($charset); + } + + /** + * {@inheritdoc} + */ + public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) + { + $this->getEncoder()->encodeByteStream($os, $is, $firstLineOffset, $maxLineLength); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'quoted-printable'; + } + + /** + * {@inheritdoc} + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + return $this->getEncoder()->encodeString($string, $firstLineOffset, $maxLineLength); + } + + /** + * @return Swift_Mime_ContentEncoder + */ + private function getEncoder() + { + return 'utf-8' === $this->charset ? $this->nativeEncoder : $this->safeEncoder; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..0b8526e38c34ae9302915515a96e80caa6f70244 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php @@ -0,0 +1,64 @@ + + */ +class Swift_Mime_ContentEncoder_RawContentEncoder implements Swift_Mime_ContentEncoder +{ + /** + * Encode a given string to produce an encoded string. + * + * @param string $string + * @param int $firstLineOffset ignored + * @param int $maxLineLength ignored + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + return $string; + } + + /** + * Encode stream $in to stream $out. + * + * @param Swift_OutputByteStream $in + * @param Swift_InputByteStream $out + * @param int $firstLineOffset ignored + * @param int $maxLineLength ignored + */ + public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) + { + while (false !== ($bytes = $os->read(8192))) { + $is->write($bytes); + } + } + + /** + * Get the name of this encoding scheme. + * + * @return string + */ + public function getName() + { + return 'raw'; + } + + /** + * Not used. + */ + public function charsetChanged($charset) + { + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php new file mode 100644 index 0000000000000000000000000000000000000000..6af757124d302a6f19d6e1d39e19a90b42830334 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php @@ -0,0 +1,45 @@ +setDisposition('inline'); + $this->setId($this->getId()); + } + + /** + * Get the nesting level of this EmbeddedFile. + * + * Returns {@see LEVEL_RELATED}. + * + * @return int + */ + public function getNestingLevel() + { + return self::LEVEL_RELATED; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php new file mode 100644 index 0000000000000000000000000000000000000000..cc44a6efb976496a95ee67ebf149a996536b6cc1 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php @@ -0,0 +1,24 @@ +init(); + } + + public function __wakeup() + { + $this->init(); + } + + protected function init() + { + if (count(self::$_specials) > 0) { + return; + } + + self::$_specials = array( + '(', ')', '<', '>', '[', ']', + ':', ';', '@', ',', '.', '"', + ); + + /*** Refer to RFC 2822 for ABNF grammar ***/ + + // All basic building blocks + self::$_grammar['NO-WS-CTL'] = '[\x01-\x08\x0B\x0C\x0E-\x19\x7F]'; + self::$_grammar['WSP'] = '[ \t]'; + self::$_grammar['CRLF'] = '(?:\r\n)'; + self::$_grammar['FWS'] = '(?:(?:'.self::$_grammar['WSP'].'*'. + self::$_grammar['CRLF'].')?'.self::$_grammar['WSP'].')'; + self::$_grammar['text'] = '[\x00-\x08\x0B\x0C\x0E-\x7F]'; + self::$_grammar['quoted-pair'] = '(?:\\\\'.self::$_grammar['text'].')'; + self::$_grammar['ctext'] = '(?:'.self::$_grammar['NO-WS-CTL']. + '|[\x21-\x27\x2A-\x5B\x5D-\x7E])'; + // Uses recursive PCRE (?1) -- could be a weak point?? + self::$_grammar['ccontent'] = '(?:'.self::$_grammar['ctext'].'|'. + self::$_grammar['quoted-pair'].'|(?1))'; + self::$_grammar['comment'] = '(\((?:'.self::$_grammar['FWS'].'|'. + self::$_grammar['ccontent'].')*'.self::$_grammar['FWS'].'?\))'; + self::$_grammar['CFWS'] = '(?:(?:'.self::$_grammar['FWS'].'?'. + self::$_grammar['comment'].')*(?:(?:'.self::$_grammar['FWS'].'?'. + self::$_grammar['comment'].')|'.self::$_grammar['FWS'].'))'; + self::$_grammar['qtext'] = '(?:'.self::$_grammar['NO-WS-CTL']. + '|[\x21\x23-\x5B\x5D-\x7E])'; + self::$_grammar['qcontent'] = '(?:'.self::$_grammar['qtext'].'|'. + self::$_grammar['quoted-pair'].')'; + self::$_grammar['quoted-string'] = '(?:'.self::$_grammar['CFWS'].'?"'. + '('.self::$_grammar['FWS'].'?'.self::$_grammar['qcontent'].')*'. + self::$_grammar['FWS'].'?"'.self::$_grammar['CFWS'].'?)'; + self::$_grammar['atext'] = '[a-zA-Z0-9!#\$%&\'\*\+\-\/=\?\^_`\{\}\|~]'; + self::$_grammar['atom'] = '(?:'.self::$_grammar['CFWS'].'?'. + self::$_grammar['atext'].'+'.self::$_grammar['CFWS'].'?)'; + self::$_grammar['dot-atom-text'] = '(?:'.self::$_grammar['atext'].'+'. + '(\.'.self::$_grammar['atext'].'+)*)'; + self::$_grammar['dot-atom'] = '(?:'.self::$_grammar['CFWS'].'?'. + self::$_grammar['dot-atom-text'].'+'.self::$_grammar['CFWS'].'?)'; + self::$_grammar['word'] = '(?:'.self::$_grammar['atom'].'|'. + self::$_grammar['quoted-string'].')'; + self::$_grammar['phrase'] = '(?:'.self::$_grammar['word'].'+?)'; + self::$_grammar['no-fold-quote'] = '(?:"(?:'.self::$_grammar['qtext']. + '|'.self::$_grammar['quoted-pair'].')*")'; + self::$_grammar['dtext'] = '(?:'.self::$_grammar['NO-WS-CTL']. + '|[\x21-\x5A\x5E-\x7E])'; + self::$_grammar['no-fold-literal'] = '(?:\[(?:'.self::$_grammar['dtext']. + '|'.self::$_grammar['quoted-pair'].')*\])'; + + // Message IDs + self::$_grammar['id-left'] = '(?:'.self::$_grammar['dot-atom-text'].'|'. + self::$_grammar['no-fold-quote'].')'; + self::$_grammar['id-right'] = '(?:'.self::$_grammar['dot-atom-text'].'|'. + self::$_grammar['no-fold-literal'].')'; + + // Addresses, mailboxes and paths + self::$_grammar['local-part'] = '(?:'.self::$_grammar['dot-atom'].'|'. + self::$_grammar['quoted-string'].')'; + self::$_grammar['dcontent'] = '(?:'.self::$_grammar['dtext'].'|'. + self::$_grammar['quoted-pair'].')'; + self::$_grammar['domain-literal'] = '(?:'.self::$_grammar['CFWS'].'?\[('. + self::$_grammar['FWS'].'?'.self::$_grammar['dcontent'].')*?'. + self::$_grammar['FWS'].'?\]'.self::$_grammar['CFWS'].'?)'; + self::$_grammar['domain'] = '(?:'.self::$_grammar['dot-atom'].'|'. + self::$_grammar['domain-literal'].')'; + self::$_grammar['addr-spec'] = '(?:'.self::$_grammar['local-part'].'@'. + self::$_grammar['domain'].')'; + } + + /** + * Get the grammar defined for $name token. + * + * @param string $name exactly as written in the RFC + * + * @return string + */ + public function getDefinition($name) + { + if (array_key_exists($name, self::$_grammar)) { + return self::$_grammar[$name]; + } + + throw new Swift_RfcComplianceException( + "No such grammar '".$name."' defined." + ); + } + + /** + * Returns the tokens defined in RFC 2822 (and some related RFCs). + * + * @return array + */ + public function getGrammarDefinitions() + { + return self::$_grammar; + } + + /** + * Returns the current special characters used in the syntax which need to be escaped. + * + * @return array + */ + public function getSpecials() + { + return self::$_specials; + } + + /** + * Escape special characters in a string (convert to quoted-pairs). + * + * @param string $token + * @param string[] $include additional chars to escape + * @param string[] $exclude chars from escaping + * + * @return string + */ + public function escapeSpecials($token, $include = array(), $exclude = array()) + { + foreach (array_merge(array('\\'), array_diff(self::$_specials, $exclude), $include) as $char) { + $token = str_replace($char, '\\'.$char, $token); + } + + return $token; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Header.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Header.php new file mode 100644 index 0000000000000000000000000000000000000000..a8ddd272165f1375580f36ef3dca2aba42cff2c1 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Header.php @@ -0,0 +1,93 @@ +getName(), "\r\n"); + mb_internal_encoding($old); + + return $newstring; + } + + return parent::encodeString($string, $firstLineOffset, $maxLineLength); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..510dd6637b3ad7faaec4626040677acb148bbdef --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php @@ -0,0 +1,65 @@ +_safeMap[$byte] = chr($byte); + } + } + + /** + * Get the name of this encoding scheme. + * + * Returns the string 'Q'. + * + * @return string + */ + public function getName() + { + return 'Q'; + } + + /** + * Takes an unencoded string and produces a QP encoded string from it. + * + * @param string $string string to encode + * @param int $firstLineOffset optional + * @param int $maxLineLength optional, 0 indicates the default of 76 chars + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + return str_replace(array(' ', '=20', "=\r\n"), array('_', '_', "\r\n"), + parent::encodeString($string, $firstLineOffset, $maxLineLength) + ); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..c65f26d72133c7b73047ee57bb24b11943b2e38f --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderFactory.php @@ -0,0 +1,78 @@ +setGrammar($grammar); + } + + /** + * Set the character set used in this Header. + * + * @param string $charset + */ + public function setCharset($charset) + { + $this->clearCachedValueIf($charset != $this->_charset); + $this->_charset = $charset; + if (isset($this->_encoder)) { + $this->_encoder->charsetChanged($charset); + } + } + + /** + * Get the character set used in this Header. + * + * @return string + */ + public function getCharset() + { + return $this->_charset; + } + + /** + * Set the language used in this Header. + * + * For example, for US English, 'en-us'. + * This can be unspecified. + * + * @param string $lang + */ + public function setLanguage($lang) + { + $this->clearCachedValueIf($this->_lang != $lang); + $this->_lang = $lang; + } + + /** + * Get the language used in this Header. + * + * @return string + */ + public function getLanguage() + { + return $this->_lang; + } + + /** + * Set the encoder used for encoding the header. + * + * @param Swift_Mime_HeaderEncoder $encoder + */ + public function setEncoder(Swift_Mime_HeaderEncoder $encoder) + { + $this->_encoder = $encoder; + $this->setCachedValue(null); + } + + /** + * Get the encoder used for encoding this Header. + * + * @return Swift_Mime_HeaderEncoder + */ + public function getEncoder() + { + return $this->_encoder; + } + + /** + * Set the grammar used for the header. + * + * @param Swift_Mime_Grammar $grammar + */ + public function setGrammar(Swift_Mime_Grammar $grammar) + { + $this->_grammar = $grammar; + $this->setCachedValue(null); + } + + /** + * Get the grammar used for this Header. + * + * @return Swift_Mime_Grammar + */ + public function getGrammar() + { + return $this->_grammar; + } + + /** + * Get the name of this header (e.g. charset). + * + * @return string + */ + public function getFieldName() + { + return $this->_name; + } + + /** + * Set the maximum length of lines in the header (excluding EOL). + * + * @param int $lineLength + */ + public function setMaxLineLength($lineLength) + { + $this->clearCachedValueIf($this->_lineLength != $lineLength); + $this->_lineLength = $lineLength; + } + + /** + * Get the maximum permitted length of lines in this Header. + * + * @return int + */ + public function getMaxLineLength() + { + return $this->_lineLength; + } + + /** + * Get this Header rendered as a RFC 2822 compliant string. + * + * @throws Swift_RfcComplianceException + * + * @return string + */ + public function toString() + { + return $this->_tokensToString($this->toTokens()); + } + + /** + * Returns a string representation of this object. + * + * @return string + * + * @see toString() + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Set the name of this Header field. + * + * @param string $name + */ + protected function setFieldName($name) + { + $this->_name = $name; + } + + /** + * Produces a compliant, formatted RFC 2822 'phrase' based on the string given. + * + * @param Swift_Mime_Header $header + * @param string $string as displayed + * @param string $charset of the text + * @param Swift_Mime_HeaderEncoder $encoder + * @param bool $shorten the first line to make remove for header name + * + * @return string + */ + protected function createPhrase(Swift_Mime_Header $header, $string, $charset, Swift_Mime_HeaderEncoder $encoder = null, $shorten = false) + { + // Treat token as exactly what was given + $phraseStr = $string; + // If it's not valid + if (!preg_match('/^'.$this->getGrammar()->getDefinition('phrase').'$/D', $phraseStr)) { + // .. but it is just ascii text, try escaping some characters + // and make it a quoted-string + if (preg_match('/^'.$this->getGrammar()->getDefinition('text').'*$/D', $phraseStr)) { + $phraseStr = $this->getGrammar()->escapeSpecials( + $phraseStr, array('"'), $this->getGrammar()->getSpecials() + ); + $phraseStr = '"'.$phraseStr.'"'; + } else { + // ... otherwise it needs encoding + // Determine space remaining on line if first line + if ($shorten) { + $usedLength = strlen($header->getFieldName().': '); + } else { + $usedLength = 0; + } + $phraseStr = $this->encodeWords($header, $string, $usedLength); + } + } + + return $phraseStr; + } + + /** + * Encode needed word tokens within a string of input. + * + * @param Swift_Mime_Header $header + * @param string $input + * @param string $usedLength optional + * + * @return string + */ + protected function encodeWords(Swift_Mime_Header $header, $input, $usedLength = -1) + { + $value = ''; + + $tokens = $this->getEncodableWordTokens($input); + + foreach ($tokens as $token) { + // See RFC 2822, Sect 2.2 (really 2.2 ??) + if ($this->tokenNeedsEncoding($token)) { + // Don't encode starting WSP + $firstChar = substr($token, 0, 1); + switch ($firstChar) { + case ' ': + case "\t": + $value .= $firstChar; + $token = substr($token, 1); + } + + if (-1 == $usedLength) { + $usedLength = strlen($header->getFieldName().': ') + strlen($value); + } + $value .= $this->getTokenAsEncodedWord($token, $usedLength); + + $header->setMaxLineLength(76); // Forcefully override + } else { + $value .= $token; + } + } + + return $value; + } + + /** + * Test if a token needs to be encoded or not. + * + * @param string $token + * + * @return bool + */ + protected function tokenNeedsEncoding($token) + { + return preg_match('~[\x00-\x08\x10-\x19\x7F-\xFF\r\n]~', $token); + } + + /** + * Splits a string into tokens in blocks of words which can be encoded quickly. + * + * @param string $string + * + * @return string[] + */ + protected function getEncodableWordTokens($string) + { + $tokens = array(); + + $encodedToken = ''; + // Split at all whitespace boundaries + foreach (preg_split('~(?=[\t ])~', $string) as $token) { + if ($this->tokenNeedsEncoding($token)) { + $encodedToken .= $token; + } else { + if (strlen($encodedToken) > 0) { + $tokens[] = $encodedToken; + $encodedToken = ''; + } + $tokens[] = $token; + } + } + if (strlen($encodedToken)) { + $tokens[] = $encodedToken; + } + + return $tokens; + } + + /** + * Get a token as an encoded word for safe insertion into headers. + * + * @param string $token token to encode + * @param int $firstLineOffset optional + * + * @return string + */ + protected function getTokenAsEncodedWord($token, $firstLineOffset = 0) + { + // Adjust $firstLineOffset to account for space needed for syntax + $charsetDecl = $this->_charset; + if (isset($this->_lang)) { + $charsetDecl .= '*'.$this->_lang; + } + $encodingWrapperLength = strlen( + '=?'.$charsetDecl.'?'.$this->_encoder->getName().'??=' + ); + + if ($firstLineOffset >= 75) { + //Does this logic need to be here? + $firstLineOffset = 0; + } + + $encodedTextLines = explode("\r\n", + $this->_encoder->encodeString( + $token, $firstLineOffset, 75 - $encodingWrapperLength, $this->_charset + ) + ); + + if (strtolower($this->_charset) !== 'iso-2022-jp') { + // special encoding for iso-2022-jp using mb_encode_mimeheader + foreach ($encodedTextLines as $lineNum => $line) { + $encodedTextLines[$lineNum] = '=?'.$charsetDecl. + '?'.$this->_encoder->getName(). + '?'.$line.'?='; + } + } + + return implode("\r\n ", $encodedTextLines); + } + + /** + * Generates tokens from the given string which include CRLF as individual tokens. + * + * @param string $token + * + * @return string[] + */ + protected function generateTokenLines($token) + { + return preg_split('~(\r\n)~', $token, -1, PREG_SPLIT_DELIM_CAPTURE); + } + + /** + * Set a value into the cache. + * + * @param string $value + */ + protected function setCachedValue($value) + { + $this->_cachedValue = $value; + } + + /** + * Get the value in the cache. + * + * @return string + */ + protected function getCachedValue() + { + return $this->_cachedValue; + } + + /** + * Clear the cached value if $condition is met. + * + * @param bool $condition + */ + protected function clearCachedValueIf($condition) + { + if ($condition) { + $this->setCachedValue(null); + } + } + + /** + * Generate a list of all tokens in the final header. + * + * @param string $string The string to tokenize + * + * @return array An array of tokens as strings + */ + protected function toTokens($string = null) + { + if (null === $string) { + $string = $this->getFieldBody(); + } + + $tokens = array(); + + // Generate atoms; split at all invisible boundaries followed by WSP + foreach (preg_split('~(?=[ \t])~', $string) as $token) { + $newTokens = $this->generateTokenLines($token); + foreach ($newTokens as $newToken) { + $tokens[] = $newToken; + } + } + + return $tokens; + } + + /** + * Takes an array of tokens which appear in the header and turns them into + * an RFC 2822 compliant string, adding FWSP where needed. + * + * @param string[] $tokens + * + * @return string + */ + private function _tokensToString(array $tokens) + { + $lineCount = 0; + $headerLines = array(); + $headerLines[] = $this->_name.': '; + $currentLine = &$headerLines[$lineCount++]; + + // Build all tokens back into compliant header + foreach ($tokens as $i => $token) { + // Line longer than specified maximum or token was just a new line + if (("\r\n" == $token) || + ($i > 0 && strlen($currentLine.$token) > $this->_lineLength) + && 0 < strlen($currentLine)) { + $headerLines[] = ''; + $currentLine = &$headerLines[$lineCount++]; + } + + // Append token to the line + if ("\r\n" != $token) { + $currentLine .= $token; + } + } + + // Implode with FWS (RFC 2822, 2.2.3) + return implode("\r\n", $headerLines)."\r\n"; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php new file mode 100644 index 0000000000000000000000000000000000000000..4075cbfa112b87d4445ab86c37fa92e68a365f4a --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php @@ -0,0 +1,125 @@ + + * + * + * + * @param string $name of Header + * @param Swift_Mime_Grammar $grammar + */ + public function __construct($name, Swift_Mime_Grammar $grammar) + { + $this->setFieldName($name); + parent::__construct($grammar); + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_DATE; + } + + /** + * Set the model for the field body. + * + * This method takes a UNIX timestamp. + * + * @param int $model + */ + public function setFieldBodyModel($model) + { + $this->setTimestamp($model); + } + + /** + * Get the model for the field body. + * + * This method returns a UNIX timestamp. + * + * @return mixed + */ + public function getFieldBodyModel() + { + return $this->getTimestamp(); + } + + /** + * Get the UNIX timestamp of the Date in this Header. + * + * @return int + */ + public function getTimestamp() + { + return $this->_timestamp; + } + + /** + * Set the UNIX timestamp of the Date in this Header. + * + * @param int $timestamp + */ + public function setTimestamp($timestamp) + { + if (null !== $timestamp) { + $timestamp = (int) $timestamp; + } + $this->clearCachedValueIf($this->_timestamp != $timestamp); + $this->_timestamp = $timestamp; + } + + /** + * Get the string value of the body in this Header. + * + * This is not necessarily RFC 2822 compliant since folding white space will + * not be added at this stage (see {@link toString()} for that). + * + * @see toString() + * + * @return string + */ + public function getFieldBody() + { + if (!$this->getCachedValue()) { + if (isset($this->_timestamp)) { + $this->setCachedValue(date('r', $this->_timestamp)); + } + } + + return $this->getCachedValue(); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php new file mode 100644 index 0000000000000000000000000000000000000000..b114506b4a4b1a4f323934a725fafdeeebd48668 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php @@ -0,0 +1,180 @@ +setFieldName($name); + parent::__construct($grammar); + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_ID; + } + + /** + * Set the model for the field body. + * + * This method takes a string ID, or an array of IDs. + * + * @param mixed $model + * + * @throws Swift_RfcComplianceException + */ + public function setFieldBodyModel($model) + { + $this->setId($model); + } + + /** + * Get the model for the field body. + * + * This method returns an array of IDs + * + * @return array + */ + public function getFieldBodyModel() + { + return $this->getIds(); + } + + /** + * Set the ID used in the value of this header. + * + * @param string|array $id + * + * @throws Swift_RfcComplianceException + */ + public function setId($id) + { + $this->setIds(is_array($id) ? $id : array($id)); + } + + /** + * Get the ID used in the value of this Header. + * + * If multiple IDs are set only the first is returned. + * + * @return string + */ + public function getId() + { + if (count($this->_ids) > 0) { + return $this->_ids[0]; + } + } + + /** + * Set a collection of IDs to use in the value of this Header. + * + * @param string[] $ids + * + * @throws Swift_RfcComplianceException + */ + public function setIds(array $ids) + { + $actualIds = array(); + + foreach ($ids as $id) { + $this->_assertValidId($id); + $actualIds[] = $id; + } + + $this->clearCachedValueIf($this->_ids != $actualIds); + $this->_ids = $actualIds; + } + + /** + * Get the list of IDs used in this Header. + * + * @return string[] + */ + public function getIds() + { + return $this->_ids; + } + + /** + * Get the string value of the body in this Header. + * + * This is not necessarily RFC 2822 compliant since folding white space will + * not be added at this stage (see {@see toString()} for that). + * + * @see toString() + * + * @throws Swift_RfcComplianceException + * + * @return string + */ + public function getFieldBody() + { + if (!$this->getCachedValue()) { + $angleAddrs = array(); + + foreach ($this->_ids as $id) { + $angleAddrs[] = '<'.$id.'>'; + } + + $this->setCachedValue(implode(' ', $angleAddrs)); + } + + return $this->getCachedValue(); + } + + /** + * Throws an Exception if the id passed does not comply with RFC 2822. + * + * @param string $id + * + * @throws Swift_RfcComplianceException + */ + private function _assertValidId($id) + { + if (!preg_match( + '/^'.$this->getGrammar()->getDefinition('id-left').'@'. + $this->getGrammar()->getDefinition('id-right').'$/D', + $id + )) { + throw new Swift_RfcComplianceException( + 'Invalid ID given <'.$id.'>' + ); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php new file mode 100644 index 0000000000000000000000000000000000000000..e4567fc80dc65f536e0fcbcf3f261d019fa73b5b --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php @@ -0,0 +1,351 @@ +setFieldName($name); + $this->setEncoder($encoder); + parent::__construct($grammar); + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_MAILBOX; + } + + /** + * Set the model for the field body. + * + * This method takes a string, or an array of addresses. + * + * @param mixed $model + * + * @throws Swift_RfcComplianceException + */ + public function setFieldBodyModel($model) + { + $this->setNameAddresses($model); + } + + /** + * Get the model for the field body. + * + * This method returns an associative array like {@link getNameAddresses()} + * + * @throws Swift_RfcComplianceException + * + * @return array + */ + public function getFieldBodyModel() + { + return $this->getNameAddresses(); + } + + /** + * Set a list of mailboxes to be shown in this Header. + * + * The mailboxes can be a simple array of addresses, or an array of + * key=>value pairs where (email => personalName). + * Example: + * + * setNameAddresses(array( + * 'chris@swiftmailer.org' => 'Chris Corbyn', + * 'mark@swiftmailer.org' //No associated personal name + * )); + * ?> + * + * + * @see __construct() + * @see setAddresses() + * @see setValue() + * + * @param string|string[] $mailboxes + * + * @throws Swift_RfcComplianceException + */ + public function setNameAddresses($mailboxes) + { + $this->_mailboxes = $this->normalizeMailboxes((array) $mailboxes); + $this->setCachedValue(null); //Clear any cached value + } + + /** + * Get the full mailbox list of this Header as an array of valid RFC 2822 strings. + * + * Example: + * + * 'Chris Corbyn', + * 'mark@swiftmailer.org' => 'Mark Corbyn') + * ); + * print_r($header->getNameAddressStrings()); + * // array ( + * // 0 => Chris Corbyn , + * // 1 => Mark Corbyn + * // ) + * ?> + * + * + * @see getNameAddresses() + * @see toString() + * + * @throws Swift_RfcComplianceException + * + * @return string[] + */ + public function getNameAddressStrings() + { + return $this->_createNameAddressStrings($this->getNameAddresses()); + } + + /** + * Get all mailboxes in this Header as key=>value pairs. + * + * The key is the address and the value is the name (or null if none set). + * Example: + * + * 'Chris Corbyn', + * 'mark@swiftmailer.org' => 'Mark Corbyn') + * ); + * print_r($header->getNameAddresses()); + * // array ( + * // chris@swiftmailer.org => Chris Corbyn, + * // mark@swiftmailer.org => Mark Corbyn + * // ) + * ?> + * + * + * @see getAddresses() + * @see getNameAddressStrings() + * + * @return string[] + */ + public function getNameAddresses() + { + return $this->_mailboxes; + } + + /** + * Makes this Header represent a list of plain email addresses with no names. + * + * Example: + * + * setAddresses( + * array('one@domain.tld', 'two@domain.tld', 'three@domain.tld') + * ); + * ?> + * + * + * @see setNameAddresses() + * @see setValue() + * + * @param string[] $addresses + * + * @throws Swift_RfcComplianceException + */ + public function setAddresses($addresses) + { + $this->setNameAddresses(array_values((array) $addresses)); + } + + /** + * Get all email addresses in this Header. + * + * @see getNameAddresses() + * + * @return string[] + */ + public function getAddresses() + { + return array_keys($this->_mailboxes); + } + + /** + * Remove one or more addresses from this Header. + * + * @param string|string[] $addresses + */ + public function removeAddresses($addresses) + { + $this->setCachedValue(null); + foreach ((array) $addresses as $address) { + unset($this->_mailboxes[$address]); + } + } + + /** + * Get the string value of the body in this Header. + * + * This is not necessarily RFC 2822 compliant since folding white space will + * not be added at this stage (see {@link toString()} for that). + * + * @see toString() + * + * @throws Swift_RfcComplianceException + * + * @return string + */ + public function getFieldBody() + { + // Compute the string value of the header only if needed + if (null === $this->getCachedValue()) { + $this->setCachedValue($this->createMailboxListString($this->_mailboxes)); + } + + return $this->getCachedValue(); + } + + /** + * Normalizes a user-input list of mailboxes into consistent key=>value pairs. + * + * @param string[] $mailboxes + * + * @return string[] + */ + protected function normalizeMailboxes(array $mailboxes) + { + $actualMailboxes = array(); + + foreach ($mailboxes as $key => $value) { + if (is_string($key)) { + //key is email addr + $address = $key; + $name = $value; + } else { + $address = $value; + $name = null; + } + $this->_assertValidAddress($address); + $actualMailboxes[$address] = $name; + } + + return $actualMailboxes; + } + + /** + * Produces a compliant, formatted display-name based on the string given. + * + * @param string $displayName as displayed + * @param bool $shorten the first line to make remove for header name + * + * @return string + */ + protected function createDisplayNameString($displayName, $shorten = false) + { + return $this->createPhrase($this, $displayName, $this->getCharset(), $this->getEncoder(), $shorten); + } + + /** + * Creates a string form of all the mailboxes in the passed array. + * + * @param string[] $mailboxes + * + * @throws Swift_RfcComplianceException + * + * @return string + */ + protected function createMailboxListString(array $mailboxes) + { + return implode(', ', $this->_createNameAddressStrings($mailboxes)); + } + + /** + * Redefine the encoding requirements for mailboxes. + * + * All "specials" must be encoded as the full header value will not be quoted + * + * @see RFC 2822 3.2.1 + * + * @param string $token + * + * @return bool + */ + protected function tokenNeedsEncoding($token) + { + return preg_match('/[()<>\[\]:;@\,."]/', $token) || parent::tokenNeedsEncoding($token); + } + + /** + * Return an array of strings conforming the the name-addr spec of RFC 2822. + * + * @param string[] $mailboxes + * + * @return string[] + */ + private function _createNameAddressStrings(array $mailboxes) + { + $strings = array(); + + foreach ($mailboxes as $email => $name) { + $mailboxStr = $email; + if (null !== $name) { + $nameStr = $this->createDisplayNameString($name, empty($strings)); + $mailboxStr = $nameStr.' <'.$mailboxStr.'>'; + } + $strings[] = $mailboxStr; + } + + return $strings; + } + + /** + * Throws an Exception if the address passed does not comply with RFC 2822. + * + * @param string $address + * + * @throws Swift_RfcComplianceException If invalid. + */ + private function _assertValidAddress($address) + { + if (!preg_match('/^'.$this->getGrammar()->getDefinition('addr-spec').'$/D', + $address)) { + throw new Swift_RfcComplianceException( + 'Address in mailbox given ['.$address. + '] does not comply with RFC 2822, 3.6.2.' + ); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/OpenDKIMHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/OpenDKIMHeader.php new file mode 100644 index 0000000000000000000000000000000000000000..d749550079e7bdaf7908565952114d8833bcf992 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/OpenDKIMHeader.php @@ -0,0 +1,133 @@ + + */ +class Swift_Mime_Headers_OpenDKIMHeader implements Swift_Mime_Header +{ + /** + * The value of this Header. + * + * @var string + */ + private $_value; + + /** + * The name of this Header. + * + * @var string + */ + private $_fieldName; + + /** + * @param string $name + */ + public function __construct($name) + { + $this->_fieldName = $name; + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_TEXT; + } + + /** + * Set the model for the field body. + * + * This method takes a string for the field value. + * + * @param string $model + */ + public function setFieldBodyModel($model) + { + $this->setValue($model); + } + + /** + * Get the model for the field body. + * + * This method returns a string. + * + * @return string + */ + public function getFieldBodyModel() + { + return $this->getValue(); + } + + /** + * Get the (unencoded) value of this header. + * + * @return string + */ + public function getValue() + { + return $this->_value; + } + + /** + * Set the (unencoded) value of this header. + * + * @param string $value + */ + public function setValue($value) + { + $this->_value = $value; + } + + /** + * Get the value of this header prepared for rendering. + * + * @return string + */ + public function getFieldBody() + { + return $this->_value; + } + + /** + * Get this Header rendered as a RFC 2822 compliant string. + * + * @return string + */ + public function toString() + { + return $this->_fieldName.': '.$this->_value; + } + + /** + * Set the Header FieldName. + * + * @see Swift_Mime_Header::getFieldName() + */ + public function getFieldName() + { + return $this->_fieldName; + } + + /** + * Ignored. + */ + public function setCharset($charset) + { + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php new file mode 100644 index 0000000000000000000000000000000000000000..c1777d33368ca96f6da1a0a00b01856ac2b2fd74 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php @@ -0,0 +1,258 @@ +_paramEncoder = $paramEncoder; + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_PARAMETERIZED; + } + + /** + * Set the character set used in this Header. + * + * @param string $charset + */ + public function setCharset($charset) + { + parent::setCharset($charset); + if (isset($this->_paramEncoder)) { + $this->_paramEncoder->charsetChanged($charset); + } + } + + /** + * Set the value of $parameter. + * + * @param string $parameter + * @param string $value + */ + public function setParameter($parameter, $value) + { + $this->setParameters(array_merge($this->getParameters(), array($parameter => $value))); + } + + /** + * Get the value of $parameter. + * + * @param string $parameter + * + * @return string + */ + public function getParameter($parameter) + { + $params = $this->getParameters(); + + return array_key_exists($parameter, $params) ? $params[$parameter] : null; + } + + /** + * Set an associative array of parameter names mapped to values. + * + * @param string[] $parameters + */ + public function setParameters(array $parameters) + { + $this->clearCachedValueIf($this->_params != $parameters); + $this->_params = $parameters; + } + + /** + * Returns an associative array of parameter names mapped to values. + * + * @return string[] + */ + public function getParameters() + { + return $this->_params; + } + + /** + * Get the value of this header prepared for rendering. + * + * @return string + */ + public function getFieldBody() //TODO: Check caching here + { + $body = parent::getFieldBody(); + foreach ($this->_params as $name => $value) { + if (null !== $value) { + // Add the parameter + $body .= '; '.$this->_createParameter($name, $value); + } + } + + return $body; + } + + /** + * Generate a list of all tokens in the final header. + * + * This doesn't need to be overridden in theory, but it is for implementation + * reasons to prevent potential breakage of attributes. + * + * @param string $string The string to tokenize + * + * @return array An array of tokens as strings + */ + protected function toTokens($string = null) + { + $tokens = parent::toTokens(parent::getFieldBody()); + + // Try creating any parameters + foreach ($this->_params as $name => $value) { + if (null !== $value) { + // Add the semi-colon separator + $tokens[count($tokens) - 1] .= ';'; + $tokens = array_merge($tokens, $this->generateTokenLines( + ' '.$this->_createParameter($name, $value) + )); + } + } + + return $tokens; + } + + /** + * Render a RFC 2047 compliant header parameter from the $name and $value. + * + * @param string $name + * @param string $value + * + * @return string + */ + private function _createParameter($name, $value) + { + $origValue = $value; + + $encoded = false; + // Allow room for parameter name, indices, "=" and DQUOTEs + $maxValueLength = $this->getMaxLineLength() - strlen($name.'=*N"";') - 1; + $firstLineOffset = 0; + + // If it's not already a valid parameter value... + if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) { + // TODO: text, or something else?? + // ... and it's not ascii + if (!preg_match('/^'.$this->getGrammar()->getDefinition('text').'*$/D', $value)) { + $encoded = true; + // Allow space for the indices, charset and language + $maxValueLength = $this->getMaxLineLength() - strlen($name.'*N*="";') - 1; + $firstLineOffset = strlen( + $this->getCharset()."'".$this->getLanguage()."'" + ); + } + } + + // Encode if we need to + if ($encoded || strlen($value) > $maxValueLength) { + if (isset($this->_paramEncoder)) { + $value = $this->_paramEncoder->encodeString( + $origValue, $firstLineOffset, $maxValueLength, $this->getCharset() + ); + } else { + // We have to go against RFC 2183/2231 in some areas for interoperability + $value = $this->getTokenAsEncodedWord($origValue); + $encoded = false; + } + } + + $valueLines = isset($this->_paramEncoder) ? explode("\r\n", $value) : array($value); + + // Need to add indices + if (count($valueLines) > 1) { + $paramLines = array(); + foreach ($valueLines as $i => $line) { + $paramLines[] = $name.'*'.$i. + $this->_getEndOfParameterValue($line, true, $i == 0); + } + + return implode(";\r\n ", $paramLines); + } else { + return $name.$this->_getEndOfParameterValue( + $valueLines[0], $encoded, true + ); + } + } + + /** + * Returns the parameter value from the "=" and beyond. + * + * @param string $value to append + * @param bool $encoded + * @param bool $firstLine + * + * @return string + */ + private function _getEndOfParameterValue($value, $encoded = false, $firstLine = false) + { + if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) { + $value = '"'.$value.'"'; + } + $prepend = '='; + if ($encoded) { + $prepend = '*='; + if ($firstLine) { + $prepend = '*='.$this->getCharset()."'".$this->getLanguage(). + "'"; + } + } + + return $prepend.$value; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php new file mode 100644 index 0000000000000000000000000000000000000000..4a814b122ad3ace2c5ada1ce0f66d93b0fedf00a --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php @@ -0,0 +1,143 @@ +setFieldName($name); + parent::__construct($grammar); + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_PATH; + } + + /** + * Set the model for the field body. + * This method takes a string for an address. + * + * @param string $model + * + * @throws Swift_RfcComplianceException + */ + public function setFieldBodyModel($model) + { + $this->setAddress($model); + } + + /** + * Get the model for the field body. + * This method returns a string email address. + * + * @return mixed + */ + public function getFieldBodyModel() + { + return $this->getAddress(); + } + + /** + * Set the Address which should appear in this Header. + * + * @param string $address + * + * @throws Swift_RfcComplianceException + */ + public function setAddress($address) + { + if (null === $address) { + $this->_address = null; + } elseif ('' == $address) { + $this->_address = ''; + } else { + $this->_assertValidAddress($address); + $this->_address = $address; + } + $this->setCachedValue(null); + } + + /** + * Get the address which is used in this Header (if any). + * + * Null is returned if no address is set. + * + * @return string + */ + public function getAddress() + { + return $this->_address; + } + + /** + * Get the string value of the body in this Header. + * + * This is not necessarily RFC 2822 compliant since folding white space will + * not be added at this stage (see {@link toString()} for that). + * + * @see toString() + * + * @return string + */ + public function getFieldBody() + { + if (!$this->getCachedValue()) { + if (isset($this->_address)) { + $this->setCachedValue('<'.$this->_address.'>'); + } + } + + return $this->getCachedValue(); + } + + /** + * Throws an Exception if the address passed does not comply with RFC 2822. + * + * @param string $address + * + * @throws Swift_RfcComplianceException If address is invalid + */ + private function _assertValidAddress($address) + { + if (!preg_match('/^'.$this->getGrammar()->getDefinition('addr-spec').'$/D', + $address)) { + throw new Swift_RfcComplianceException( + 'Address set in PathHeader does not comply with addr-spec of RFC 2822.' + ); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php new file mode 100644 index 0000000000000000000000000000000000000000..86177f14a1f2067cdbcafe8c659e2ff2e98fdb38 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php @@ -0,0 +1,112 @@ +setFieldName($name); + $this->setEncoder($encoder); + parent::__construct($grammar); + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_TEXT; + } + + /** + * Set the model for the field body. + * + * This method takes a string for the field value. + * + * @param string $model + */ + public function setFieldBodyModel($model) + { + $this->setValue($model); + } + + /** + * Get the model for the field body. + * + * This method returns a string. + * + * @return string + */ + public function getFieldBodyModel() + { + return $this->getValue(); + } + + /** + * Get the (unencoded) value of this header. + * + * @return string + */ + public function getValue() + { + return $this->_value; + } + + /** + * Set the (unencoded) value of this header. + * + * @param string $value + */ + public function setValue($value) + { + $this->clearCachedValueIf($this->_value != $value); + $this->_value = $value; + } + + /** + * Get the value of this header prepared for rendering. + * + * @return string + */ + public function getFieldBody() + { + if (!$this->getCachedValue()) { + $this->setCachedValue( + $this->encodeWords($this, $this->_value) + ); + } + + return $this->getCachedValue(); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Message.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Message.php new file mode 100644 index 0000000000000000000000000000000000000000..9b36d216271e680e68649ed8cf45a611fcc43529 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Message.php @@ -0,0 +1,223 @@ + 'Real Name'). + * + * If the second parameter is provided and the first is a string, then $name + * is associated with the address. + * + * @param mixed $address + * @param string $name optional + */ + public function setSender($address, $name = null); + + /** + * Get the sender address for this message. + * + * This has a higher significance than the From address. + * + * @return string + */ + public function getSender(); + + /** + * Set the From address of this message. + * + * It is permissible for multiple From addresses to be set using an array. + * + * If multiple From addresses are used, you SHOULD set the Sender address and + * according to RFC 2822, MUST set the sender address. + * + * An array can be used if display names are to be provided: i.e. + * array('email@address.com' => 'Real Name'). + * + * If the second parameter is provided and the first is a string, then $name + * is associated with the address. + * + * @param mixed $addresses + * @param string $name optional + */ + public function setFrom($addresses, $name = null); + + /** + * Get the From address(es) of this message. + * + * This method always returns an associative array where the keys are the + * addresses. + * + * @return string[] + */ + public function getFrom(); + + /** + * Set the Reply-To address(es). + * + * Any replies from the receiver will be sent to this address. + * + * It is permissible for multiple reply-to addresses to be set using an array. + * + * This method has the same synopsis as {@link setFrom()} and {@link setTo()}. + * + * If the second parameter is provided and the first is a string, then $name + * is associated with the address. + * + * @param mixed $addresses + * @param string $name optional + */ + public function setReplyTo($addresses, $name = null); + + /** + * Get the Reply-To addresses for this message. + * + * This method always returns an associative array where the keys provide the + * email addresses. + * + * @return string[] + */ + public function getReplyTo(); + + /** + * Set the To address(es). + * + * Recipients set in this field will receive a copy of this message. + * + * This method has the same synopsis as {@link setFrom()} and {@link setCc()}. + * + * If the second parameter is provided and the first is a string, then $name + * is associated with the address. + * + * @param mixed $addresses + * @param string $name optional + */ + public function setTo($addresses, $name = null); + + /** + * Get the To addresses for this message. + * + * This method always returns an associative array, whereby the keys provide + * the actual email addresses. + * + * @return string[] + */ + public function getTo(); + + /** + * Set the Cc address(es). + * + * Recipients set in this field will receive a 'carbon-copy' of this message. + * + * This method has the same synopsis as {@link setFrom()} and {@link setTo()}. + * + * @param mixed $addresses + * @param string $name optional + */ + public function setCc($addresses, $name = null); + + /** + * Get the Cc addresses for this message. + * + * This method always returns an associative array, whereby the keys provide + * the actual email addresses. + * + * @return string[] + */ + public function getCc(); + + /** + * Set the Bcc address(es). + * + * Recipients set in this field will receive a 'blind-carbon-copy' of this + * message. + * + * In other words, they will get the message, but any other recipients of the + * message will have no such knowledge of their receipt of it. + * + * This method has the same synopsis as {@link setFrom()} and {@link setTo()}. + * + * @param mixed $addresses + * @param string $name optional + */ + public function setBcc($addresses, $name = null); + + /** + * Get the Bcc addresses for this message. + * + * This method always returns an associative array, whereby the keys provide + * the actual email addresses. + * + * @return string[] + */ + public function getBcc(); +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..30f460cdcdb7f73a73fd9c3927d1253dacc83fc3 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php @@ -0,0 +1,117 @@ +setContentType('text/plain'); + if (null !== $charset) { + $this->setCharset($charset); + } + } + + /** + * Set the body of this entity, either as a string, or as an instance of + * {@link Swift_OutputByteStream}. + * + * @param mixed $body + * @param string $contentType optional + * @param string $charset optional + * + * @return Swift_Mime_MimePart + */ + public function setBody($body, $contentType = null, $charset = null) + { + if (isset($charset)) { + $this->setCharset($charset); + } + $body = $this->_convertString($body); + + parent::setBody($body, $contentType); + + return $this; + } + + /** + * Get the character set of this entity. + * + * @return string + */ + public function getCharset() + { + return $this->_getHeaderParameter('Content-Type', 'charset'); + } + + /** + * Set the character set of this entity. + * + * @param string $charset + * + * @return Swift_Mime_MimePart + */ + public function setCharset($charset) + { + $this->_setHeaderParameter('Content-Type', 'charset', $charset); + if ($charset !== $this->_userCharset) { + $this->_clearCache(); + } + $this->_userCharset = $charset; + parent::charsetChanged($charset); + + return $this; + } + + /** + * Get the format of this entity (i.e. flowed or fixed). + * + * @return string + */ + public function getFormat() + { + return $this->_getHeaderParameter('Content-Type', 'format'); + } + + /** + * Set the format of this entity (flowed or fixed). + * + * @param string $format + * + * @return Swift_Mime_MimePart + */ + public function setFormat($format) + { + $this->_setHeaderParameter('Content-Type', 'format', $format); + $this->_userFormat = $format; + + return $this; + } + + /** + * Test if delsp is being used for this entity. + * + * @return bool + */ + public function getDelSp() + { + return 'yes' == $this->_getHeaderParameter('Content-Type', 'delsp') ? true : false; + } + + /** + * Turn delsp on or off for this entity. + * + * @param bool $delsp + * + * @return Swift_Mime_MimePart + */ + public function setDelSp($delsp = true) + { + $this->_setHeaderParameter('Content-Type', 'delsp', $delsp ? 'yes' : null); + $this->_userDelSp = $delsp; + + return $this; + } + + /** + * Get the nesting level of this entity. + * + * @see LEVEL_TOP, LEVEL_ALTERNATIVE, LEVEL_MIXED, LEVEL_RELATED + * + * @return int + */ + public function getNestingLevel() + { + return $this->_nestingLevel; + } + + /** + * Receive notification that the charset has changed on this document, or a + * parent document. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->setCharset($charset); + } + + /** Fix the content-type and encoding of this entity */ + protected function _fixHeaders() + { + parent::_fixHeaders(); + if (count($this->getChildren())) { + $this->_setHeaderParameter('Content-Type', 'charset', null); + $this->_setHeaderParameter('Content-Type', 'format', null); + $this->_setHeaderParameter('Content-Type', 'delsp', null); + } else { + $this->setCharset($this->_userCharset); + $this->setFormat($this->_userFormat); + $this->setDelSp($this->_userDelSp); + } + } + + /** Set the nesting level of this entity */ + protected function _setNestingLevel($level) + { + $this->_nestingLevel = $level; + } + + /** Encode charset when charset is not utf-8 */ + protected function _convertString($string) + { + $charset = strtolower($this->getCharset()); + if (!in_array($charset, array('utf-8', 'iso-8859-1', 'iso-8859-15', ''))) { + // mb_convert_encoding must be the first one to check, since iconv cannot convert some words. + if (function_exists('mb_convert_encoding')) { + $string = mb_convert_encoding($string, $charset, 'utf-8'); + } elseif (function_exists('iconv')) { + $string = iconv('utf-8//TRANSLIT//IGNORE', $charset, $string); + } else { + throw new Swift_SwiftException('No suitable convert encoding function (use UTF-8 as your charset or install the mbstring or iconv extension).'); + } + + return $string; + } + + return $string; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ParameterizedHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ParameterizedHeader.php new file mode 100644 index 0000000000000000000000000000000000000000..e15c6ef95b1bc60153f8cfb5cd7bc3dafd7af5a0 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ParameterizedHeader.php @@ -0,0 +1,34 @@ +_encoder = $encoder; + $this->_paramEncoder = $paramEncoder; + $this->_grammar = $grammar; + $this->_charset = $charset; + } + + /** + * Create a new Mailbox Header with a list of $addresses. + * + * @param string $name + * @param array|string|null $addresses + * + * @return Swift_Mime_Header + */ + public function createMailboxHeader($name, $addresses = null) + { + $header = new Swift_Mime_Headers_MailboxHeader($name, $this->_encoder, $this->_grammar); + if (isset($addresses)) { + $header->setFieldBodyModel($addresses); + } + $this->_setHeaderCharset($header); + + return $header; + } + + /** + * Create a new Date header using $timestamp (UNIX time). + * + * @param string $name + * @param int|null $timestamp + * + * @return Swift_Mime_Header + */ + public function createDateHeader($name, $timestamp = null) + { + $header = new Swift_Mime_Headers_DateHeader($name, $this->_grammar); + if (isset($timestamp)) { + $header->setFieldBodyModel($timestamp); + } + $this->_setHeaderCharset($header); + + return $header; + } + + /** + * Create a new basic text header with $name and $value. + * + * @param string $name + * @param string $value + * + * @return Swift_Mime_Header + */ + public function createTextHeader($name, $value = null) + { + $header = new Swift_Mime_Headers_UnstructuredHeader($name, $this->_encoder, $this->_grammar); + if (isset($value)) { + $header->setFieldBodyModel($value); + } + $this->_setHeaderCharset($header); + + return $header; + } + + /** + * Create a new ParameterizedHeader with $name, $value and $params. + * + * @param string $name + * @param string $value + * @param array $params + * + * @return Swift_Mime_ParameterizedHeader + */ + public function createParameterizedHeader($name, $value = null, + $params = array()) + { + $header = new Swift_Mime_Headers_ParameterizedHeader($name, $this->_encoder, strtolower($name) == 'content-disposition' ? $this->_paramEncoder : null, $this->_grammar); + if (isset($value)) { + $header->setFieldBodyModel($value); + } + foreach ($params as $k => $v) { + $header->setParameter($k, $v); + } + $this->_setHeaderCharset($header); + + return $header; + } + + /** + * Create a new ID header for Message-ID or Content-ID. + * + * @param string $name + * @param string|array $ids + * + * @return Swift_Mime_Header + */ + public function createIdHeader($name, $ids = null) + { + $header = new Swift_Mime_Headers_IdentificationHeader($name, $this->_grammar); + if (isset($ids)) { + $header->setFieldBodyModel($ids); + } + $this->_setHeaderCharset($header); + + return $header; + } + + /** + * Create a new Path header with an address (path) in it. + * + * @param string $name + * @param string $path + * + * @return Swift_Mime_Header + */ + public function createPathHeader($name, $path = null) + { + $header = new Swift_Mime_Headers_PathHeader($name, $this->_grammar); + if (isset($path)) { + $header->setFieldBodyModel($path); + } + $this->_setHeaderCharset($header); + + return $header; + } + + /** + * Notify this observer that the entity's charset has changed. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->_charset = $charset; + $this->_encoder->charsetChanged($charset); + $this->_paramEncoder->charsetChanged($charset); + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + $this->_encoder = clone $this->_encoder; + $this->_paramEncoder = clone $this->_paramEncoder; + } + + /** Apply the charset to the Header */ + private function _setHeaderCharset(Swift_Mime_Header $header) + { + if (isset($this->_charset)) { + $header->setCharset($this->_charset); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php new file mode 100644 index 0000000000000000000000000000000000000000..e2d0e87466551fd28b9a03d84f425b208be66952 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php @@ -0,0 +1,414 @@ +_factory = $factory; + if (isset($charset)) { + $this->setCharset($charset); + } + } + + /** + * Set the charset used by these headers. + * + * @param string $charset + */ + public function setCharset($charset) + { + $this->_charset = $charset; + $this->_factory->charsetChanged($charset); + $this->_notifyHeadersOfCharset($charset); + } + + /** + * Add a new Mailbox Header with a list of $addresses. + * + * @param string $name + * @param array|string $addresses + */ + public function addMailboxHeader($name, $addresses = null) + { + $this->_storeHeader($name, + $this->_factory->createMailboxHeader($name, $addresses)); + } + + /** + * Add a new Date header using $timestamp (UNIX time). + * + * @param string $name + * @param int $timestamp + */ + public function addDateHeader($name, $timestamp = null) + { + $this->_storeHeader($name, + $this->_factory->createDateHeader($name, $timestamp)); + } + + /** + * Add a new basic text header with $name and $value. + * + * @param string $name + * @param string $value + */ + public function addTextHeader($name, $value = null) + { + $this->_storeHeader($name, + $this->_factory->createTextHeader($name, $value)); + } + + /** + * Add a new ParameterizedHeader with $name, $value and $params. + * + * @param string $name + * @param string $value + * @param array $params + */ + public function addParameterizedHeader($name, $value = null, $params = array()) + { + $this->_storeHeader($name, $this->_factory->createParameterizedHeader($name, $value, $params)); + } + + /** + * Add a new ID header for Message-ID or Content-ID. + * + * @param string $name + * @param string|array $ids + */ + public function addIdHeader($name, $ids = null) + { + $this->_storeHeader($name, $this->_factory->createIdHeader($name, $ids)); + } + + /** + * Add a new Path header with an address (path) in it. + * + * @param string $name + * @param string $path + */ + public function addPathHeader($name, $path = null) + { + $this->_storeHeader($name, $this->_factory->createPathHeader($name, $path)); + } + + /** + * Returns true if at least one header with the given $name exists. + * + * If multiple headers match, the actual one may be specified by $index. + * + * @param string $name + * @param int $index + * + * @return bool + */ + public function has($name, $index = 0) + { + $lowerName = strtolower($name); + + if (!array_key_exists($lowerName, $this->_headers)) { + return false; + } + + if (func_num_args() < 2) { + // index was not specified, so we only need to check that there is at least one header value set + return (bool) count($this->_headers[$lowerName]); + } + + return array_key_exists($index, $this->_headers[$lowerName]); + } + + /** + * Set a header in the HeaderSet. + * + * The header may be a previously fetched header via {@link get()} or it may + * be one that has been created separately. + * + * If $index is specified, the header will be inserted into the set at this + * offset. + * + * @param Swift_Mime_Header $header + * @param int $index + */ + public function set(Swift_Mime_Header $header, $index = 0) + { + $this->_storeHeader($header->getFieldName(), $header, $index); + } + + /** + * Get the header with the given $name. + * + * If multiple headers match, the actual one may be specified by $index. + * Returns NULL if none present. + * + * @param string $name + * @param int $index + * + * @return Swift_Mime_Header + */ + public function get($name, $index = 0) + { + $name = strtolower($name); + + if (func_num_args() < 2) { + if ($this->has($name)) { + $values = array_values($this->_headers[$name]); + + return array_shift($values); + } + } else { + if ($this->has($name, $index)) { + return $this->_headers[$name][$index]; + } + } + } + + /** + * Get all headers with the given $name. + * + * @param string $name + * + * @return array + */ + public function getAll($name = null) + { + if (!isset($name)) { + $headers = array(); + foreach ($this->_headers as $collection) { + $headers = array_merge($headers, $collection); + } + + return $headers; + } + + $lowerName = strtolower($name); + if (!array_key_exists($lowerName, $this->_headers)) { + return array(); + } + + return $this->_headers[$lowerName]; + } + + /** + * Return the name of all Headers. + * + * @return array + */ + public function listAll() + { + $headers = $this->_headers; + if ($this->_canSort()) { + uksort($headers, array($this, '_sortHeaders')); + } + + return array_keys($headers); + } + + /** + * Remove the header with the given $name if it's set. + * + * If multiple headers match, the actual one may be specified by $index. + * + * @param string $name + * @param int $index + */ + public function remove($name, $index = 0) + { + $lowerName = strtolower($name); + unset($this->_headers[$lowerName][$index]); + } + + /** + * Remove all headers with the given $name. + * + * @param string $name + */ + public function removeAll($name) + { + $lowerName = strtolower($name); + unset($this->_headers[$lowerName]); + } + + /** + * Create a new instance of this HeaderSet. + * + * @return Swift_Mime_HeaderSet + */ + public function newInstance() + { + return new self($this->_factory); + } + + /** + * Define a list of Header names as an array in the correct order. + * + * These Headers will be output in the given order where present. + * + * @param array $sequence + */ + public function defineOrdering(array $sequence) + { + $this->_order = array_flip(array_map('strtolower', $sequence)); + } + + /** + * Set a list of header names which must always be displayed when set. + * + * Usually headers without a field value won't be output unless set here. + * + * @param array $names + */ + public function setAlwaysDisplayed(array $names) + { + $this->_required = array_flip(array_map('strtolower', $names)); + } + + /** + * Notify this observer that the entity's charset has changed. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->setCharset($charset); + } + + /** + * Returns a string with a representation of all headers. + * + * @return string + */ + public function toString() + { + $string = ''; + $headers = $this->_headers; + if ($this->_canSort()) { + uksort($headers, array($this, '_sortHeaders')); + } + foreach ($headers as $collection) { + foreach ($collection as $header) { + if ($this->_isDisplayed($header) || $header->getFieldBody() != '') { + $string .= $header->toString(); + } + } + } + + return $string; + } + + /** + * Returns a string representation of this object. + * + * @return string + * + * @see toString() + */ + public function __toString() + { + return $this->toString(); + } + + /** Save a Header to the internal collection */ + private function _storeHeader($name, Swift_Mime_Header $header, $offset = null) + { + if (!isset($this->_headers[strtolower($name)])) { + $this->_headers[strtolower($name)] = array(); + } + if (!isset($offset)) { + $this->_headers[strtolower($name)][] = $header; + } else { + $this->_headers[strtolower($name)][$offset] = $header; + } + } + + /** Test if the headers can be sorted */ + private function _canSort() + { + return count($this->_order) > 0; + } + + /** uksort() algorithm for Header ordering */ + private function _sortHeaders($a, $b) + { + $lowerA = strtolower($a); + $lowerB = strtolower($b); + $aPos = array_key_exists($lowerA, $this->_order) ? $this->_order[$lowerA] : -1; + $bPos = array_key_exists($lowerB, $this->_order) ? $this->_order[$lowerB] : -1; + + if (-1 === $aPos && -1 === $bPos) { + // just be sure to be determinist here + return $a > $b ? -1 : 1; + } + + if ($aPos == -1) { + return 1; + } elseif ($bPos == -1) { + return -1; + } + + return $aPos < $bPos ? -1 : 1; + } + + /** Test if the given Header is always displayed */ + private function _isDisplayed(Swift_Mime_Header $header) + { + return array_key_exists(strtolower($header->getFieldName()), $this->_required); + } + + /** Notify all Headers of the new charset */ + private function _notifyHeadersOfCharset($charset) + { + foreach ($this->_headers as $headerGroup) { + foreach ($headerGroup as $header) { + $header->setCharset($charset); + } + } + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + $this->_factory = clone $this->_factory; + foreach ($this->_headers as $groupKey => $headerGroup) { + foreach ($headerGroup as $key => $header) { + $this->_headers[$groupKey][$key] = clone $header; + } + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php new file mode 100644 index 0000000000000000000000000000000000000000..72d40cee02d2293e1b09eabb868340efece234bb --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php @@ -0,0 +1,655 @@ +getHeaders()->defineOrdering(array( + 'Return-Path', + 'Received', + 'DKIM-Signature', + 'DomainKey-Signature', + 'Sender', + 'Message-ID', + 'Date', + 'Subject', + 'From', + 'Reply-To', + 'To', + 'Cc', + 'Bcc', + 'MIME-Version', + 'Content-Type', + 'Content-Transfer-Encoding', + )); + $this->getHeaders()->setAlwaysDisplayed(array('Date', 'Message-ID', 'From')); + $this->getHeaders()->addTextHeader('MIME-Version', '1.0'); + $this->setDate(time()); + $this->setId($this->getId()); + $this->getHeaders()->addMailboxHeader('From'); + } + + /** + * Always returns {@link LEVEL_TOP} for a message instance. + * + * @return int + */ + public function getNestingLevel() + { + return self::LEVEL_TOP; + } + + /** + * Set the subject of this message. + * + * @param string $subject + * + * @return $this + */ + public function setSubject($subject) + { + if (!$this->_setHeaderFieldModel('Subject', $subject)) { + $this->getHeaders()->addTextHeader('Subject', $subject); + } + + return $this; + } + + /** + * Get the subject of this message. + * + * @return string + */ + public function getSubject() + { + return $this->_getHeaderFieldModel('Subject'); + } + + /** + * Set the date at which this message was created. + * + * @param int $date + * + * @return $this + */ + public function setDate($date) + { + if (!$this->_setHeaderFieldModel('Date', $date)) { + $this->getHeaders()->addDateHeader('Date', $date); + } + + return $this; + } + + /** + * Get the date at which this message was created. + * + * @return int + */ + public function getDate() + { + return $this->_getHeaderFieldModel('Date'); + } + + /** + * Set the return-path (the bounce address) of this message. + * + * @param string $address + * + * @return $this + */ + public function setReturnPath($address) + { + if (!$this->_setHeaderFieldModel('Return-Path', $address)) { + $this->getHeaders()->addPathHeader('Return-Path', $address); + } + + return $this; + } + + /** + * Get the return-path (bounce address) of this message. + * + * @return string + */ + public function getReturnPath() + { + return $this->_getHeaderFieldModel('Return-Path'); + } + + /** + * Set the sender of this message. + * + * This does not override the From field, but it has a higher significance. + * + * @param string $address + * @param string $name optional + * + * @return $this + */ + public function setSender($address, $name = null) + { + if (!is_array($address) && isset($name)) { + $address = array($address => $name); + } + + if (!$this->_setHeaderFieldModel('Sender', (array) $address)) { + $this->getHeaders()->addMailboxHeader('Sender', (array) $address); + } + + return $this; + } + + /** + * Get the sender of this message. + * + * @return string + */ + public function getSender() + { + return $this->_getHeaderFieldModel('Sender'); + } + + /** + * Add a From: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + * + * @return $this + */ + public function addFrom($address, $name = null) + { + $current = $this->getFrom(); + $current[$address] = $name; + + return $this->setFrom($current); + } + + /** + * Set the from address of this message. + * + * You may pass an array of addresses if this message is from multiple people. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param string|array $addresses + * @param string $name optional + * + * @return $this + */ + public function setFrom($addresses, $name = null) + { + if (!is_array($addresses) && isset($name)) { + $addresses = array($addresses => $name); + } + + if (!$this->_setHeaderFieldModel('From', (array) $addresses)) { + $this->getHeaders()->addMailboxHeader('From', (array) $addresses); + } + + return $this; + } + + /** + * Get the from address of this message. + * + * @return mixed + */ + public function getFrom() + { + return $this->_getHeaderFieldModel('From'); + } + + /** + * Add a Reply-To: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + * + * @return $this + */ + public function addReplyTo($address, $name = null) + { + $current = $this->getReplyTo(); + $current[$address] = $name; + + return $this->setReplyTo($current); + } + + /** + * Set the reply-to address of this message. + * + * You may pass an array of addresses if replies will go to multiple people. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param mixed $addresses + * @param string $name optional + * + * @return $this + */ + public function setReplyTo($addresses, $name = null) + { + if (!is_array($addresses) && isset($name)) { + $addresses = array($addresses => $name); + } + + if (!$this->_setHeaderFieldModel('Reply-To', (array) $addresses)) { + $this->getHeaders()->addMailboxHeader('Reply-To', (array) $addresses); + } + + return $this; + } + + /** + * Get the reply-to address of this message. + * + * @return string + */ + public function getReplyTo() + { + return $this->_getHeaderFieldModel('Reply-To'); + } + + /** + * Add a To: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + * + * @return $this + */ + public function addTo($address, $name = null) + { + $current = $this->getTo(); + $current[$address] = $name; + + return $this->setTo($current); + } + + /** + * Set the to addresses of this message. + * + * If multiple recipients will receive the message an array should be used. + * Example: array('receiver@domain.org', 'other@domain.org' => 'A name') + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param mixed $addresses + * @param string $name optional + * + * @return $this + */ + public function setTo($addresses, $name = null) + { + if (!is_array($addresses) && isset($name)) { + $addresses = array($addresses => $name); + } + + if (!$this->_setHeaderFieldModel('To', (array) $addresses)) { + $this->getHeaders()->addMailboxHeader('To', (array) $addresses); + } + + return $this; + } + + /** + * Get the To addresses of this message. + * + * @return array + */ + public function getTo() + { + return $this->_getHeaderFieldModel('To'); + } + + /** + * Add a Cc: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + * + * @return $this + */ + public function addCc($address, $name = null) + { + $current = $this->getCc(); + $current[$address] = $name; + + return $this->setCc($current); + } + + /** + * Set the Cc addresses of this message. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param mixed $addresses + * @param string $name optional + * + * @return $this + */ + public function setCc($addresses, $name = null) + { + if (!is_array($addresses) && isset($name)) { + $addresses = array($addresses => $name); + } + + if (!$this->_setHeaderFieldModel('Cc', (array) $addresses)) { + $this->getHeaders()->addMailboxHeader('Cc', (array) $addresses); + } + + return $this; + } + + /** + * Get the Cc address of this message. + * + * @return array + */ + public function getCc() + { + return $this->_getHeaderFieldModel('Cc'); + } + + /** + * Add a Bcc: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + * + * @return $this + */ + public function addBcc($address, $name = null) + { + $current = $this->getBcc(); + $current[$address] = $name; + + return $this->setBcc($current); + } + + /** + * Set the Bcc addresses of this message. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param mixed $addresses + * @param string $name optional + * + * @return $this + */ + public function setBcc($addresses, $name = null) + { + if (!is_array($addresses) && isset($name)) { + $addresses = array($addresses => $name); + } + + if (!$this->_setHeaderFieldModel('Bcc', (array) $addresses)) { + $this->getHeaders()->addMailboxHeader('Bcc', (array) $addresses); + } + + return $this; + } + + /** + * Get the Bcc addresses of this message. + * + * @return array + */ + public function getBcc() + { + return $this->_getHeaderFieldModel('Bcc'); + } + + /** + * Set the priority of this message. + * + * The value is an integer where 1 is the highest priority and 5 is the lowest. + * + * @param int $priority + * + * @return $this + */ + public function setPriority($priority) + { + $priorityMap = array( + self::PRIORITY_HIGHEST => 'Highest', + self::PRIORITY_HIGH => 'High', + self::PRIORITY_NORMAL => 'Normal', + self::PRIORITY_LOW => 'Low', + self::PRIORITY_LOWEST => 'Lowest', + ); + $pMapKeys = array_keys($priorityMap); + if ($priority > max($pMapKeys)) { + $priority = max($pMapKeys); + } elseif ($priority < min($pMapKeys)) { + $priority = min($pMapKeys); + } + if (!$this->_setHeaderFieldModel('X-Priority', + sprintf('%d (%s)', $priority, $priorityMap[$priority]))) { + $this->getHeaders()->addTextHeader('X-Priority', + sprintf('%d (%s)', $priority, $priorityMap[$priority])); + } + + return $this; + } + + /** + * Get the priority of this message. + * + * The returned value is an integer where 1 is the highest priority and 5 + * is the lowest. + * + * @return int + */ + public function getPriority() + { + list($priority) = sscanf($this->_getHeaderFieldModel('X-Priority'), + '%[1-5]' + ); + + return isset($priority) ? $priority : 3; + } + + /** + * Ask for a delivery receipt from the recipient to be sent to $addresses. + * + * @param array $addresses + * + * @return $this + */ + public function setReadReceiptTo($addresses) + { + if (!$this->_setHeaderFieldModel('Disposition-Notification-To', $addresses)) { + $this->getHeaders() + ->addMailboxHeader('Disposition-Notification-To', $addresses); + } + + return $this; + } + + /** + * Get the addresses to which a read-receipt will be sent. + * + * @return string + */ + public function getReadReceiptTo() + { + return $this->_getHeaderFieldModel('Disposition-Notification-To'); + } + + /** + * Attach a {@link Swift_Mime_MimeEntity} such as an Attachment or MimePart. + * + * @param Swift_Mime_MimeEntity $entity + * + * @return $this + */ + public function attach(Swift_Mime_MimeEntity $entity) + { + $this->setChildren(array_merge($this->getChildren(), array($entity))); + + return $this; + } + + /** + * Remove an already attached entity. + * + * @param Swift_Mime_MimeEntity $entity + * + * @return $this + */ + public function detach(Swift_Mime_MimeEntity $entity) + { + $newChildren = array(); + foreach ($this->getChildren() as $child) { + if ($entity !== $child) { + $newChildren[] = $child; + } + } + $this->setChildren($newChildren); + + return $this; + } + + /** + * Attach a {@link Swift_Mime_MimeEntity} and return it's CID source. + * This method should be used when embedding images or other data in a message. + * + * @param Swift_Mime_MimeEntity $entity + * + * @return string + */ + public function embed(Swift_Mime_MimeEntity $entity) + { + $this->attach($entity); + + return 'cid:'.$entity->getId(); + } + + /** + * Get this message as a complete string. + * + * @return string + */ + public function toString() + { + if (count($children = $this->getChildren()) > 0 && $this->getBody() != '') { + $this->setChildren(array_merge(array($this->_becomeMimePart()), $children)); + $string = parent::toString(); + $this->setChildren($children); + } else { + $string = parent::toString(); + } + + return $string; + } + + /** + * Returns a string representation of this object. + * + * @see toString() + * + * @return string + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Write this message to a {@link Swift_InputByteStream}. + * + * @param Swift_InputByteStream $is + */ + public function toByteStream(Swift_InputByteStream $is) + { + if (count($children = $this->getChildren()) > 0 && $this->getBody() != '') { + $this->setChildren(array_merge(array($this->_becomeMimePart()), $children)); + parent::toByteStream($is); + $this->setChildren($children); + } else { + parent::toByteStream($is); + } + } + + /** @see Swift_Mime_SimpleMimeEntity::_getIdField() */ + protected function _getIdField() + { + return 'Message-ID'; + } + + /** Turn the body of this message into a child of itself if needed */ + protected function _becomeMimePart() + { + $part = new parent($this->getHeaders()->newInstance(), $this->getEncoder(), + $this->_getCache(), $this->_getGrammar(), $this->_userCharset + ); + $part->setContentType($this->_userContentType); + $part->setBody($this->getBody()); + $part->setFormat($this->_userFormat); + $part->setDelSp($this->_userDelSp); + $part->_setNestingLevel($this->_getTopNestingLevel()); + + return $part; + } + + /** Get the highest nesting level nested inside this message */ + private function _getTopNestingLevel() + { + $highestLevel = $this->getNestingLevel(); + foreach ($this->getChildren() as $child) { + $childLevel = $child->getNestingLevel(); + if ($highestLevel < $childLevel) { + $highestLevel = $childLevel; + } + } + + return $highestLevel; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..2f33c8d3bfc895b07d4580911b790473e8e9c81f --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php @@ -0,0 +1,843 @@ + array(self::LEVEL_TOP, self::LEVEL_MIXED), + 'multipart/alternative' => array(self::LEVEL_MIXED, self::LEVEL_ALTERNATIVE), + 'multipart/related' => array(self::LEVEL_ALTERNATIVE, self::LEVEL_RELATED), + ); + + /** A set of filter rules to define what level an entity should be nested at */ + private $_compoundLevelFilters = array(); + + /** The nesting level of this entity */ + private $_nestingLevel = self::LEVEL_ALTERNATIVE; + + /** A KeyCache instance used during encoding and streaming */ + private $_cache; + + /** Direct descendants of this entity */ + private $_immediateChildren = array(); + + /** All descendants of this entity */ + private $_children = array(); + + /** The maximum line length of the body of this entity */ + private $_maxLineLength = 78; + + /** The order in which alternative mime types should appear */ + private $_alternativePartOrder = array( + 'text/plain' => 1, + 'text/html' => 2, + 'multipart/related' => 3, + ); + + /** The CID of this entity */ + private $_id; + + /** The key used for accessing the cache */ + private $_cacheKey; + + protected $_userContentType; + + /** + * Create a new SimpleMimeEntity with $headers, $encoder and $cache. + * + * @param Swift_Mime_HeaderSet $headers + * @param Swift_Mime_ContentEncoder $encoder + * @param Swift_KeyCache $cache + * @param Swift_Mime_Grammar $grammar + */ + public function __construct(Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar) + { + $this->_cacheKey = md5(uniqid(getmypid().mt_rand(), true)); + $this->_cache = $cache; + $this->_headers = $headers; + $this->_grammar = $grammar; + $this->setEncoder($encoder); + $this->_headers->defineOrdering(array('Content-Type', 'Content-Transfer-Encoding')); + + // This array specifies that, when the entire MIME document contains + // $compoundLevel, then for each child within $level, if its Content-Type + // is $contentType then it should be treated as if it's level is + // $neededLevel instead. I tried to write that unambiguously! :-\ + // Data Structure: + // array ( + // $compoundLevel => array( + // $level => array( + // $contentType => $neededLevel + // ) + // ) + // ) + + $this->_compoundLevelFilters = array( + (self::LEVEL_ALTERNATIVE + self::LEVEL_RELATED) => array( + self::LEVEL_ALTERNATIVE => array( + 'text/plain' => self::LEVEL_ALTERNATIVE, + 'text/html' => self::LEVEL_RELATED, + ), + ), + ); + + $this->_id = $this->getRandomId(); + } + + /** + * Generate a new Content-ID or Message-ID for this MIME entity. + * + * @return string + */ + public function generateId() + { + $this->setId($this->getRandomId()); + + return $this->_id; + } + + /** + * Get the {@link Swift_Mime_HeaderSet} for this entity. + * + * @return Swift_Mime_HeaderSet + */ + public function getHeaders() + { + return $this->_headers; + } + + /** + * Get the nesting level of this entity. + * + * @see LEVEL_TOP, LEVEL_MIXED, LEVEL_RELATED, LEVEL_ALTERNATIVE + * + * @return int + */ + public function getNestingLevel() + { + return $this->_nestingLevel; + } + + /** + * Get the Content-type of this entity. + * + * @return string + */ + public function getContentType() + { + return $this->_getHeaderFieldModel('Content-Type'); + } + + /** + * Set the Content-type of this entity. + * + * @param string $type + * + * @return $this + */ + public function setContentType($type) + { + $this->_setContentTypeInHeaders($type); + // Keep track of the value so that if the content-type changes automatically + // due to added child entities, it can be restored if they are later removed + $this->_userContentType = $type; + + return $this; + } + + /** + * Get the CID of this entity. + * + * The CID will only be present in headers if a Content-ID header is present. + * + * @return string + */ + public function getId() + { + $tmp = (array) $this->_getHeaderFieldModel($this->_getIdField()); + + return $this->_headers->has($this->_getIdField()) ? current($tmp) : $this->_id; + } + + /** + * Set the CID of this entity. + * + * @param string $id + * + * @return $this + */ + public function setId($id) + { + if (!$this->_setHeaderFieldModel($this->_getIdField(), $id)) { + $this->_headers->addIdHeader($this->_getIdField(), $id); + } + $this->_id = $id; + + return $this; + } + + /** + * Get the description of this entity. + * + * This value comes from the Content-Description header if set. + * + * @return string + */ + public function getDescription() + { + return $this->_getHeaderFieldModel('Content-Description'); + } + + /** + * Set the description of this entity. + * + * This method sets a value in the Content-ID header. + * + * @param string $description + * + * @return $this + */ + public function setDescription($description) + { + if (!$this->_setHeaderFieldModel('Content-Description', $description)) { + $this->_headers->addTextHeader('Content-Description', $description); + } + + return $this; + } + + /** + * Get the maximum line length of the body of this entity. + * + * @return int + */ + public function getMaxLineLength() + { + return $this->_maxLineLength; + } + + /** + * Set the maximum line length of lines in this body. + * + * Though not enforced by the library, lines should not exceed 1000 chars. + * + * @param int $length + * + * @return $this + */ + public function setMaxLineLength($length) + { + $this->_maxLineLength = $length; + + return $this; + } + + /** + * Get all children added to this entity. + * + * @return Swift_Mime_MimeEntity[] + */ + public function getChildren() + { + return $this->_children; + } + + /** + * Set all children of this entity. + * + * @param Swift_Mime_MimeEntity[] $children + * @param int $compoundLevel For internal use only + * + * @return $this + */ + public function setChildren(array $children, $compoundLevel = null) + { + // TODO: Try to refactor this logic + + $compoundLevel = isset($compoundLevel) ? $compoundLevel : $this->_getCompoundLevel($children); + $immediateChildren = array(); + $grandchildren = array(); + $newContentType = $this->_userContentType; + + foreach ($children as $child) { + $level = $this->_getNeededChildLevel($child, $compoundLevel); + if (empty($immediateChildren)) { + //first iteration + $immediateChildren = array($child); + } else { + $nextLevel = $this->_getNeededChildLevel($immediateChildren[0], $compoundLevel); + if ($nextLevel == $level) { + $immediateChildren[] = $child; + } elseif ($level < $nextLevel) { + // Re-assign immediateChildren to grandchildren + $grandchildren = array_merge($grandchildren, $immediateChildren); + // Set new children + $immediateChildren = array($child); + } else { + $grandchildren[] = $child; + } + } + } + + if ($immediateChildren) { + $lowestLevel = $this->_getNeededChildLevel($immediateChildren[0], $compoundLevel); + + // Determine which composite media type is needed to accommodate the + // immediate children + foreach ($this->_compositeRanges as $mediaType => $range) { + if ($lowestLevel > $range[0] && $lowestLevel <= $range[1]) { + $newContentType = $mediaType; + + break; + } + } + + // Put any grandchildren in a subpart + if (!empty($grandchildren)) { + $subentity = $this->_createChild(); + $subentity->_setNestingLevel($lowestLevel); + $subentity->setChildren($grandchildren, $compoundLevel); + array_unshift($immediateChildren, $subentity); + } + } + + $this->_immediateChildren = $immediateChildren; + $this->_children = $children; + $this->_setContentTypeInHeaders($newContentType); + $this->_fixHeaders(); + $this->_sortChildren(); + + return $this; + } + + /** + * Get the body of this entity as a string. + * + * @return string + */ + public function getBody() + { + return $this->_body instanceof Swift_OutputByteStream ? $this->_readStream($this->_body) : $this->_body; + } + + /** + * Set the body of this entity, either as a string, or as an instance of + * {@link Swift_OutputByteStream}. + * + * @param mixed $body + * @param string $contentType optional + * + * @return $this + */ + public function setBody($body, $contentType = null) + { + if ($body !== $this->_body) { + $this->_clearCache(); + } + + $this->_body = $body; + if (isset($contentType)) { + $this->setContentType($contentType); + } + + return $this; + } + + /** + * Get the encoder used for the body of this entity. + * + * @return Swift_Mime_ContentEncoder + */ + public function getEncoder() + { + return $this->_encoder; + } + + /** + * Set the encoder used for the body of this entity. + * + * @param Swift_Mime_ContentEncoder $encoder + * + * @return $this + */ + public function setEncoder(Swift_Mime_ContentEncoder $encoder) + { + if ($encoder !== $this->_encoder) { + $this->_clearCache(); + } + + $this->_encoder = $encoder; + $this->_setEncoding($encoder->getName()); + $this->_notifyEncoderChanged($encoder); + + return $this; + } + + /** + * Get the boundary used to separate children in this entity. + * + * @return string + */ + public function getBoundary() + { + if (!isset($this->_boundary)) { + $this->_boundary = '_=_swift_v4_'.time().'_'.md5(getmypid().mt_rand().uniqid('', true)).'_=_'; + } + + return $this->_boundary; + } + + /** + * Set the boundary used to separate children in this entity. + * + * @param string $boundary + * + * @throws Swift_RfcComplianceException + * + * @return $this + */ + public function setBoundary($boundary) + { + $this->_assertValidBoundary($boundary); + $this->_boundary = $boundary; + + return $this; + } + + /** + * Receive notification that the charset of this entity, or a parent entity + * has changed. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->_notifyCharsetChanged($charset); + } + + /** + * Receive notification that the encoder of this entity or a parent entity + * has changed. + * + * @param Swift_Mime_ContentEncoder $encoder + */ + public function encoderChanged(Swift_Mime_ContentEncoder $encoder) + { + $this->_notifyEncoderChanged($encoder); + } + + /** + * Get this entire entity as a string. + * + * @return string + */ + public function toString() + { + $string = $this->_headers->toString(); + $string .= $this->_bodyToString(); + + return $string; + } + + /** + * Get this entire entity as a string. + * + * @return string + */ + protected function _bodyToString() + { + $string = ''; + + if (isset($this->_body) && empty($this->_immediateChildren)) { + if ($this->_cache->hasKey($this->_cacheKey, 'body')) { + $body = $this->_cache->getString($this->_cacheKey, 'body'); + } else { + $body = "\r\n".$this->_encoder->encodeString($this->getBody(), 0, $this->getMaxLineLength()); + $this->_cache->setString($this->_cacheKey, 'body', $body, Swift_KeyCache::MODE_WRITE); + } + $string .= $body; + } + + if (!empty($this->_immediateChildren)) { + foreach ($this->_immediateChildren as $child) { + $string .= "\r\n\r\n--".$this->getBoundary()."\r\n"; + $string .= $child->toString(); + } + $string .= "\r\n\r\n--".$this->getBoundary()."--\r\n"; + } + + return $string; + } + + /** + * Returns a string representation of this object. + * + * @see toString() + * + * @return string + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Write this entire entity to a {@see Swift_InputByteStream}. + * + * @param Swift_InputByteStream + */ + public function toByteStream(Swift_InputByteStream $is) + { + $is->write($this->_headers->toString()); + $is->commit(); + + $this->_bodyToByteStream($is); + } + + /** + * Write this entire entity to a {@link Swift_InputByteStream}. + * + * @param Swift_InputByteStream + */ + protected function _bodyToByteStream(Swift_InputByteStream $is) + { + if (empty($this->_immediateChildren)) { + if (isset($this->_body)) { + if ($this->_cache->hasKey($this->_cacheKey, 'body')) { + $this->_cache->exportToByteStream($this->_cacheKey, 'body', $is); + } else { + $cacheIs = $this->_cache->getInputByteStream($this->_cacheKey, 'body'); + if ($cacheIs) { + $is->bind($cacheIs); + } + + $is->write("\r\n"); + + if ($this->_body instanceof Swift_OutputByteStream) { + $this->_body->setReadPointer(0); + + $this->_encoder->encodeByteStream($this->_body, $is, 0, $this->getMaxLineLength()); + } else { + $is->write($this->_encoder->encodeString($this->getBody(), 0, $this->getMaxLineLength())); + } + + if ($cacheIs) { + $is->unbind($cacheIs); + } + } + } + } + + if (!empty($this->_immediateChildren)) { + foreach ($this->_immediateChildren as $child) { + $is->write("\r\n\r\n--".$this->getBoundary()."\r\n"); + $child->toByteStream($is); + } + $is->write("\r\n\r\n--".$this->getBoundary()."--\r\n"); + } + } + + /** + * Get the name of the header that provides the ID of this entity. + */ + protected function _getIdField() + { + return 'Content-ID'; + } + + /** + * Get the model data (usually an array or a string) for $field. + */ + protected function _getHeaderFieldModel($field) + { + if ($this->_headers->has($field)) { + return $this->_headers->get($field)->getFieldBodyModel(); + } + } + + /** + * Set the model data for $field. + */ + protected function _setHeaderFieldModel($field, $model) + { + if ($this->_headers->has($field)) { + $this->_headers->get($field)->setFieldBodyModel($model); + + return true; + } + + return false; + } + + /** + * Get the parameter value of $parameter on $field header. + */ + protected function _getHeaderParameter($field, $parameter) + { + if ($this->_headers->has($field)) { + return $this->_headers->get($field)->getParameter($parameter); + } + } + + /** + * Set the parameter value of $parameter on $field header. + */ + protected function _setHeaderParameter($field, $parameter, $value) + { + if ($this->_headers->has($field)) { + $this->_headers->get($field)->setParameter($parameter, $value); + + return true; + } + + return false; + } + + /** + * Re-evaluate what content type and encoding should be used on this entity. + */ + protected function _fixHeaders() + { + if (count($this->_immediateChildren)) { + $this->_setHeaderParameter('Content-Type', 'boundary', + $this->getBoundary() + ); + $this->_headers->remove('Content-Transfer-Encoding'); + } else { + $this->_setHeaderParameter('Content-Type', 'boundary', null); + $this->_setEncoding($this->_encoder->getName()); + } + } + + /** + * Get the KeyCache used in this entity. + * + * @return Swift_KeyCache + */ + protected function _getCache() + { + return $this->_cache; + } + + /** + * Get the grammar used for validation. + * + * @return Swift_Mime_Grammar + */ + protected function _getGrammar() + { + return $this->_grammar; + } + + /** + * Empty the KeyCache for this entity. + */ + protected function _clearCache() + { + $this->_cache->clearKey($this->_cacheKey, 'body'); + } + + /** + * Returns a random Content-ID or Message-ID. + * + * @return string + */ + protected function getRandomId() + { + $idLeft = md5(getmypid().'.'.time().'.'.uniqid(mt_rand(), true)); + $idRight = !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'swift.generated'; + $id = $idLeft.'@'.$idRight; + + try { + $this->_assertValidId($id); + } catch (Swift_RfcComplianceException $e) { + $id = $idLeft.'@swift.generated'; + } + + return $id; + } + + private function _readStream(Swift_OutputByteStream $os) + { + $string = ''; + while (false !== $bytes = $os->read(8192)) { + $string .= $bytes; + } + + $os->setReadPointer(0); + + return $string; + } + + private function _setEncoding($encoding) + { + if (!$this->_setHeaderFieldModel('Content-Transfer-Encoding', $encoding)) { + $this->_headers->addTextHeader('Content-Transfer-Encoding', $encoding); + } + } + + private function _assertValidBoundary($boundary) + { + if (!preg_match('/^[a-z0-9\'\(\)\+_\-,\.\/:=\?\ ]{0,69}[a-z0-9\'\(\)\+_\-,\.\/:=\?]$/Di', $boundary)) { + throw new Swift_RfcComplianceException('Mime boundary set is not RFC 2046 compliant.'); + } + } + + private function _setContentTypeInHeaders($type) + { + if (!$this->_setHeaderFieldModel('Content-Type', $type)) { + $this->_headers->addParameterizedHeader('Content-Type', $type); + } + } + + private function _setNestingLevel($level) + { + $this->_nestingLevel = $level; + } + + private function _getCompoundLevel($children) + { + $level = 0; + foreach ($children as $child) { + $level |= $child->getNestingLevel(); + } + + return $level; + } + + private function _getNeededChildLevel($child, $compoundLevel) + { + $filter = array(); + foreach ($this->_compoundLevelFilters as $bitmask => $rules) { + if (($compoundLevel & $bitmask) === $bitmask) { + $filter = $rules + $filter; + } + } + + $realLevel = $child->getNestingLevel(); + $lowercaseType = strtolower($child->getContentType()); + + if (isset($filter[$realLevel]) && isset($filter[$realLevel][$lowercaseType])) { + return $filter[$realLevel][$lowercaseType]; + } + + return $realLevel; + } + + private function _createChild() + { + return new self($this->_headers->newInstance(), $this->_encoder, $this->_cache, $this->_grammar); + } + + private function _notifyEncoderChanged(Swift_Mime_ContentEncoder $encoder) + { + foreach ($this->_immediateChildren as $child) { + $child->encoderChanged($encoder); + } + } + + private function _notifyCharsetChanged($charset) + { + $this->_encoder->charsetChanged($charset); + $this->_headers->charsetChanged($charset); + foreach ($this->_immediateChildren as $child) { + $child->charsetChanged($charset); + } + } + + private function _sortChildren() + { + $shouldSort = false; + foreach ($this->_immediateChildren as $child) { + // NOTE: This include alternative parts moved into a related part + if ($child->getNestingLevel() == self::LEVEL_ALTERNATIVE) { + $shouldSort = true; + break; + } + } + + // Sort in order of preference, if there is one + if ($shouldSort) { + usort($this->_immediateChildren, array($this, '_childSortAlgorithm')); + } + } + + private function _childSortAlgorithm($a, $b) + { + $typePrefs = array(); + $types = array(strtolower($a->getContentType()), strtolower($b->getContentType())); + + foreach ($types as $type) { + $typePrefs[] = array_key_exists($type, $this->_alternativePartOrder) ? $this->_alternativePartOrder[$type] : max($this->_alternativePartOrder) + 1; + } + + return $typePrefs[0] >= $typePrefs[1] ? 1 : -1; + } + + /** + * Empties it's own contents from the cache. + */ + public function __destruct() + { + if ($this->_cache instanceof Swift_KeyCache) { + $this->_cache->clearAll($this->_cacheKey); + } + } + + /** + * Throws an Exception if the id passed does not comply with RFC 2822. + * + * @param string $id + * + * @throws Swift_RfcComplianceException + */ + private function _assertValidId($id) + { + if (!preg_match('/^'.$this->_grammar->getDefinition('id-left').'@'.$this->_grammar->getDefinition('id-right').'$/D', $id)) { + throw new Swift_RfcComplianceException('Invalid ID given <'.$id.'>'); + } + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + $this->_headers = clone $this->_headers; + $this->_encoder = clone $this->_encoder; + $this->_cacheKey = md5(uniqid(getmypid().mt_rand(), true)); + $children = array(); + foreach ($this->_children as $pos => $child) { + $children[$pos] = clone $child; + } + $this->setChildren($children); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php new file mode 100644 index 0000000000000000000000000000000000000000..215f8db348a4667a4f82af8f9ff0feb00adf60f0 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php @@ -0,0 +1,59 @@ +createDependenciesFor('mime.part') + ); + + if (!isset($charset)) { + $charset = Swift_DependencyContainer::getInstance() + ->lookup('properties.charset'); + } + $this->setBody($body); + $this->setCharset($charset); + if ($contentType) { + $this->setContentType($contentType); + } + } + + /** + * Create a new MimePart. + * + * @param string $body + * @param string $contentType + * @param string $charset + * + * @return Swift_Mime_MimePart + */ + public static function newInstance($body = null, $contentType = null, $charset = null) + { + return new self($body, $contentType, $charset); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php new file mode 100644 index 0000000000000000000000000000000000000000..b38e1cf769763e8f9f25144ae2ccda530dfd9848 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Pretends messages have been sent, but just ignores them. + * + * @author Fabien Potencier + */ +class Swift_NullTransport extends Swift_Transport_NullTransport +{ + /** + * Create a new NullTransport. + */ + public function __construct() + { + call_user_func_array( + array($this, 'Swift_Transport_NullTransport::__construct'), + Swift_DependencyContainer::getInstance() + ->createDependenciesFor('transport.null') + ); + } + + /** + * Create a new NullTransport instance. + * + * @return Swift_NullTransport + */ + public static function newInstance() + { + return new self(); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/OutputByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/OutputByteStream.php new file mode 100644 index 0000000000000000000000000000000000000000..1f26f9be5297e0cb5815df9504ccec8c67eaf07d --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/OutputByteStream.php @@ -0,0 +1,46 @@ +setThreshold($threshold); + $this->setSleepTime($sleep); + $this->_sleeper = $sleeper; + } + + /** + * Set the number of emails to send before restarting. + * + * @param int $threshold + */ + public function setThreshold($threshold) + { + $this->_threshold = $threshold; + } + + /** + * Get the number of emails to send before restarting. + * + * @return int + */ + public function getThreshold() + { + return $this->_threshold; + } + + /** + * Set the number of seconds to sleep for during a restart. + * + * @param int $sleep time + */ + public function setSleepTime($sleep) + { + $this->_sleep = $sleep; + } + + /** + * Get the number of seconds to sleep for during a restart. + * + * @return int + */ + public function getSleepTime() + { + return $this->_sleep; + } + + /** + * Invoked immediately before the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + } + + /** + * Invoked immediately after the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + ++$this->_counter; + if ($this->_counter >= $this->_threshold) { + $transport = $evt->getTransport(); + $transport->stop(); + if ($this->_sleep) { + $this->sleep($this->_sleep); + } + $transport->start(); + $this->_counter = 0; + } + } + + /** + * Sleep for $seconds. + * + * @param int $seconds + */ + public function sleep($seconds) + { + if (isset($this->_sleeper)) { + $this->_sleeper->sleep($seconds); + } else { + sleep($seconds); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php new file mode 100644 index 0000000000000000000000000000000000000000..f7e18d0ebea9a76848b02676387af516911916a6 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php @@ -0,0 +1,164 @@ +getMessage(); + $message->toByteStream($this); + } + + /** + * Invoked immediately following a command being sent. + * + * @param Swift_Events_CommandEvent $evt + */ + public function commandSent(Swift_Events_CommandEvent $evt) + { + $command = $evt->getCommand(); + $this->_out += strlen($command); + } + + /** + * Invoked immediately following a response coming back. + * + * @param Swift_Events_ResponseEvent $evt + */ + public function responseReceived(Swift_Events_ResponseEvent $evt) + { + $response = $evt->getResponse(); + $this->_in += strlen($response); + } + + /** + * Called when a message is sent so that the outgoing counter can be increased. + * + * @param string $bytes + */ + public function write($bytes) + { + $this->_out += strlen($bytes); + foreach ($this->_mirrors as $stream) { + $stream->write($bytes); + } + } + + /** + * Not used. + */ + public function commit() + { + } + + /** + * Attach $is to this stream. + * + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + * + * @param Swift_InputByteStream $is + */ + public function bind(Swift_InputByteStream $is) + { + $this->_mirrors[] = $is; + } + + /** + * Remove an already bound stream. + * + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + * + * @param Swift_InputByteStream $is + */ + public function unbind(Swift_InputByteStream $is) + { + foreach ($this->_mirrors as $k => $stream) { + if ($is === $stream) { + unset($this->_mirrors[$k]); + } + } + } + + /** + * Not used. + */ + public function flushBuffers() + { + foreach ($this->_mirrors as $stream) { + $stream->flushBuffers(); + } + } + + /** + * Get the total number of bytes sent to the server. + * + * @return int + */ + public function getBytesOut() + { + return $this->_out; + } + + /** + * Get the total number of bytes received from the server. + * + * @return int + */ + public function getBytesIn() + { + return $this->_in; + } + + /** + * Reset the internal counters to zero. + */ + public function reset() + { + $this->_out = 0; + $this->_in = 0; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php new file mode 100644 index 0000000000000000000000000000000000000000..9f9f08b5674e2114de66514e4db76f9e2b042d8a --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php @@ -0,0 +1,31 @@ + + * $replacements = array( + * "address1@domain.tld" => array("{a}" => "b", "{c}" => "d"), + * "address2@domain.tld" => array("{a}" => "x", "{c}" => "y") + * ) + * + * + * When using an instance of {@link Swift_Plugins_Decorator_Replacements}, + * the object should return just the array of replacements for the address + * given to {@link Swift_Plugins_Decorator_Replacements::getReplacementsFor()}. + * + * @param mixed $replacements Array or Swift_Plugins_Decorator_Replacements + */ + public function __construct($replacements) + { + $this->setReplacements($replacements); + } + + /** + * Sets replacements. + * + * @param mixed $replacements Array or Swift_Plugins_Decorator_Replacements + * + * @see __construct() + */ + public function setReplacements($replacements) + { + if (!($replacements instanceof Swift_Plugins_Decorator_Replacements)) { + $this->_replacements = (array) $replacements; + } else { + $this->_replacements = $replacements; + } + } + + /** + * Invoked immediately before the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + $this->_restoreMessage($message); + $to = array_keys($message->getTo()); + $address = array_shift($to); + if ($replacements = $this->getReplacementsFor($address)) { + $body = $message->getBody(); + $search = array_keys($replacements); + $replace = array_values($replacements); + $bodyReplaced = str_replace( + $search, $replace, $body + ); + if ($body != $bodyReplaced) { + $this->_originalBody = $body; + $message->setBody($bodyReplaced); + } + + foreach ($message->getHeaders()->getAll() as $header) { + $body = $header->getFieldBodyModel(); + $count = 0; + if (is_array($body)) { + $bodyReplaced = array(); + foreach ($body as $key => $value) { + $count1 = 0; + $count2 = 0; + $key = is_string($key) ? str_replace($search, $replace, $key, $count1) : $key; + $value = is_string($value) ? str_replace($search, $replace, $value, $count2) : $value; + $bodyReplaced[$key] = $value; + + if (!$count && ($count1 || $count2)) { + $count = 1; + } + } + } else { + $bodyReplaced = str_replace($search, $replace, $body, $count); + } + + if ($count) { + $this->_originalHeaders[$header->getFieldName()] = $body; + $header->setFieldBodyModel($bodyReplaced); + } + } + + $children = (array) $message->getChildren(); + foreach ($children as $child) { + list($type) = sscanf($child->getContentType(), '%[^/]/%s'); + if ('text' == $type) { + $body = $child->getBody(); + $bodyReplaced = str_replace( + $search, $replace, $body + ); + if ($body != $bodyReplaced) { + $child->setBody($bodyReplaced); + $this->_originalChildBodies[$child->getId()] = $body; + } + } + } + $this->_lastMessage = $message; + } + } + + /** + * Find a map of replacements for the address. + * + * If this plugin was provided with a delegate instance of + * {@link Swift_Plugins_Decorator_Replacements} then the call will be + * delegated to it. Otherwise, it will attempt to find the replacements + * from the array provided in the constructor. + * + * If no replacements can be found, an empty value (NULL) is returned. + * + * @param string $address + * + * @return array + */ + public function getReplacementsFor($address) + { + if ($this->_replacements instanceof Swift_Plugins_Decorator_Replacements) { + return $this->_replacements->getReplacementsFor($address); + } + + return isset($this->_replacements[$address]) ? $this->_replacements[$address] : null; + } + + /** + * Invoked immediately after the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + $this->_restoreMessage($evt->getMessage()); + } + + /** Restore a changed message back to its original state */ + private function _restoreMessage(Swift_Mime_Message $message) + { + if ($this->_lastMessage === $message) { + if (isset($this->_originalBody)) { + $message->setBody($this->_originalBody); + $this->_originalBody = null; + } + if (!empty($this->_originalHeaders)) { + foreach ($message->getHeaders()->getAll() as $header) { + if (array_key_exists($header->getFieldName(), $this->_originalHeaders)) { + $header->setFieldBodyModel($this->_originalHeaders[$header->getFieldName()]); + } + } + $this->_originalHeaders = array(); + } + if (!empty($this->_originalChildBodies)) { + $children = (array) $message->getChildren(); + foreach ($children as $child) { + $id = $child->getId(); + if (array_key_exists($id, $this->_originalChildBodies)) { + $child->setBody($this->_originalChildBodies[$id]); + } + } + $this->_originalChildBodies = array(); + } + $this->_lastMessage = null; + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ImpersonatePlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ImpersonatePlugin.php new file mode 100644 index 0000000000000000000000000000000000000000..58344405349d5e340bcdbe5fb7aecdeb5150cc34 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ImpersonatePlugin.php @@ -0,0 +1,69 @@ +_sender = $sender; + } + + /** + * Invoked immediately before the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + $headers = $message->getHeaders(); + + // save current recipients + $headers->addPathHeader('X-Swift-Return-Path', $message->getReturnPath()); + + // replace them with the one to send to + $message->setReturnPath($this->_sender); + } + + /** + * Invoked immediately after the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + + // restore original headers + $headers = $message->getHeaders(); + + if ($headers->has('X-Swift-Return-Path')) { + $message->setReturnPath($headers->get('X-Swift-Return-Path')->getAddress()); + $headers->removeAll('X-Swift-Return-Path'); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Logger.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Logger.php new file mode 100644 index 0000000000000000000000000000000000000000..d9bce8935d550f52ec2412a0fc7cf03c32a1a384 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Logger.php @@ -0,0 +1,36 @@ +_logger = $logger; + } + + /** + * Add a log entry. + * + * @param string $entry + */ + public function add($entry) + { + $this->_logger->add($entry); + } + + /** + * Clear the log contents. + */ + public function clear() + { + $this->_logger->clear(); + } + + /** + * Get this log as a string. + * + * @return string + */ + public function dump() + { + return $this->_logger->dump(); + } + + /** + * Invoked immediately following a command being sent. + * + * @param Swift_Events_CommandEvent $evt + */ + public function commandSent(Swift_Events_CommandEvent $evt) + { + $command = $evt->getCommand(); + $this->_logger->add(sprintf('>> %s', $command)); + } + + /** + * Invoked immediately following a response coming back. + * + * @param Swift_Events_ResponseEvent $evt + */ + public function responseReceived(Swift_Events_ResponseEvent $evt) + { + $response = $evt->getResponse(); + $this->_logger->add(sprintf('<< %s', $response)); + } + + /** + * Invoked just before a Transport is started. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) + { + $transportName = get_class($evt->getSource()); + $this->_logger->add(sprintf('++ Starting %s', $transportName)); + } + + /** + * Invoked immediately after the Transport is started. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function transportStarted(Swift_Events_TransportChangeEvent $evt) + { + $transportName = get_class($evt->getSource()); + $this->_logger->add(sprintf('++ %s started', $transportName)); + } + + /** + * Invoked just before a Transport is stopped. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) + { + $transportName = get_class($evt->getSource()); + $this->_logger->add(sprintf('++ Stopping %s', $transportName)); + } + + /** + * Invoked immediately after the Transport is stopped. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function transportStopped(Swift_Events_TransportChangeEvent $evt) + { + $transportName = get_class($evt->getSource()); + $this->_logger->add(sprintf('++ %s stopped', $transportName)); + } + + /** + * Invoked as a TransportException is thrown in the Transport system. + * + * @param Swift_Events_TransportExceptionEvent $evt + */ + public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt) + { + $e = $evt->getException(); + $message = $e->getMessage(); + $code = $e->getCode(); + $this->_logger->add(sprintf('!! %s (code: %s)', $message, $code)); + $message .= PHP_EOL; + $message .= 'Log data:'.PHP_EOL; + $message .= $this->_logger->dump(); + $evt->cancelBubble(); + throw new Swift_TransportException($message, $code, $e->getPrevious()); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php new file mode 100644 index 0000000000000000000000000000000000000000..865bb0aa3b9c78b28d3f8f9242dd6891df97fc84 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php @@ -0,0 +1,72 @@ +_size = $size; + } + + /** + * Add a log entry. + * + * @param string $entry + */ + public function add($entry) + { + $this->_log[] = $entry; + while (count($this->_log) > $this->_size) { + array_shift($this->_log); + } + } + + /** + * Clear the log contents. + */ + public function clear() + { + $this->_log = array(); + } + + /** + * Get this log as a string. + * + * @return string + */ + public function dump() + { + return implode(PHP_EOL, $this->_log); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php new file mode 100644 index 0000000000000000000000000000000000000000..3583297ab10291ad99c4aec7a8464f0e6308b8c9 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php @@ -0,0 +1,58 @@ +_isHtml = $isHtml; + } + + /** + * Add a log entry. + * + * @param string $entry + */ + public function add($entry) + { + if ($this->_isHtml) { + printf('%s%s%s', htmlspecialchars($entry, ENT_QUOTES), '
    ', PHP_EOL); + } else { + printf('%s%s', $entry, PHP_EOL); + } + } + + /** + * Not implemented. + */ + public function clear() + { + } + + /** + * Not implemented. + */ + public function dump() + { + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php new file mode 100644 index 0000000000000000000000000000000000000000..5ff1d9321c0b8a64ee8e1ade39232fe024dff2ac --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php @@ -0,0 +1,74 @@ +messages = array(); + } + + /** + * Get the message list. + * + * @return Swift_Mime_Message[] + */ + public function getMessages() + { + return $this->messages; + } + + /** + * Get the message count. + * + * @return int count + */ + public function countMessages() + { + return count($this->messages); + } + + /** + * Empty the message list. + */ + public function clear() + { + $this->messages = array(); + } + + /** + * Invoked immediately before the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + $this->messages[] = clone $evt->getMessage(); + } + + /** + * Invoked immediately after the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..fb99e4c942b4692c94b49ca4805073a2a1498733 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php @@ -0,0 +1,31 @@ +_host = $host; + $this->_port = $port; + $this->_crypto = $crypto; + } + + /** + * Create a new PopBeforeSmtpPlugin for $host and $port. + * + * @param string $host + * @param int $port + * @param string $crypto as "tls" or "ssl" + * + * @return Swift_Plugins_PopBeforeSmtpPlugin + */ + public static function newInstance($host, $port = 110, $crypto = null) + { + return new self($host, $port, $crypto); + } + + /** + * Set a Pop3Connection to delegate to instead of connecting directly. + * + * @param Swift_Plugins_Pop_Pop3Connection $connection + * + * @return Swift_Plugins_PopBeforeSmtpPlugin + */ + public function setConnection(Swift_Plugins_Pop_Pop3Connection $connection) + { + $this->_connection = $connection; + + return $this; + } + + /** + * Bind this plugin to a specific SMTP transport instance. + * + * @param Swift_Transport + */ + public function bindSmtp(Swift_Transport $smtp) + { + $this->_transport = $smtp; + } + + /** + * Set the connection timeout in seconds (default 10). + * + * @param int $timeout + * + * @return Swift_Plugins_PopBeforeSmtpPlugin + */ + public function setTimeout($timeout) + { + $this->_timeout = (int) $timeout; + + return $this; + } + + /** + * Set the username to use when connecting (if needed). + * + * @param string $username + * + * @return Swift_Plugins_PopBeforeSmtpPlugin + */ + public function setUsername($username) + { + $this->_username = $username; + + return $this; + } + + /** + * Set the password to use when connecting (if needed). + * + * @param string $password + * + * @return Swift_Plugins_PopBeforeSmtpPlugin + */ + public function setPassword($password) + { + $this->_password = $password; + + return $this; + } + + /** + * Connect to the POP3 host and authenticate. + * + * @throws Swift_Plugins_Pop_Pop3Exception if connection fails + */ + public function connect() + { + if (isset($this->_connection)) { + $this->_connection->connect(); + } else { + if (!isset($this->_socket)) { + if (!$socket = fsockopen( + $this->_getHostString(), $this->_port, $errno, $errstr, $this->_timeout)) { + throw new Swift_Plugins_Pop_Pop3Exception( + sprintf('Failed to connect to POP3 host [%s]: %s', $this->_host, $errstr) + ); + } + $this->_socket = $socket; + + if (false === $greeting = fgets($this->_socket)) { + throw new Swift_Plugins_Pop_Pop3Exception( + sprintf('Failed to connect to POP3 host [%s]', trim($greeting)) + ); + } + + $this->_assertOk($greeting); + + if ($this->_username) { + $this->_command(sprintf("USER %s\r\n", $this->_username)); + $this->_command(sprintf("PASS %s\r\n", $this->_password)); + } + } + } + } + + /** + * Disconnect from the POP3 host. + */ + public function disconnect() + { + if (isset($this->_connection)) { + $this->_connection->disconnect(); + } else { + $this->_command("QUIT\r\n"); + if (!fclose($this->_socket)) { + throw new Swift_Plugins_Pop_Pop3Exception( + sprintf('POP3 host [%s] connection could not be stopped', $this->_host) + ); + } + $this->_socket = null; + } + } + + /** + * Invoked just before a Transport is started. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) + { + if (isset($this->_transport)) { + if ($this->_transport !== $evt->getTransport()) { + return; + } + } + + $this->connect(); + $this->disconnect(); + } + + /** + * Not used. + */ + public function transportStarted(Swift_Events_TransportChangeEvent $evt) + { + } + + /** + * Not used. + */ + public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) + { + } + + /** + * Not used. + */ + public function transportStopped(Swift_Events_TransportChangeEvent $evt) + { + } + + private function _command($command) + { + if (!fwrite($this->_socket, $command)) { + throw new Swift_Plugins_Pop_Pop3Exception( + sprintf('Failed to write command [%s] to POP3 host', trim($command)) + ); + } + + if (false === $response = fgets($this->_socket)) { + throw new Swift_Plugins_Pop_Pop3Exception( + sprintf('Failed to read from POP3 host after command [%s]', trim($command)) + ); + } + + $this->_assertOk($response); + + return $response; + } + + private function _assertOk($response) + { + if (substr($response, 0, 3) != '+OK') { + throw new Swift_Plugins_Pop_Pop3Exception( + sprintf('POP3 command failed [%s]', trim($response)) + ); + } + } + + private function _getHostString() + { + $host = $this->_host; + switch (strtolower($this->_crypto)) { + case 'ssl': + $host = 'ssl://'.$host; + break; + + case 'tls': + $host = 'tls://'.$host; + break; + } + + return $host; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php new file mode 100644 index 0000000000000000000000000000000000000000..c3a1f86854406637c3ffc99ad4d261abd484a793 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php @@ -0,0 +1,213 @@ +_recipient = $recipient; + $this->_whitelist = $whitelist; + } + + /** + * Set the recipient of all messages. + * + * @param mixed $recipient + */ + public function setRecipient($recipient) + { + $this->_recipient = $recipient; + } + + /** + * Get the recipient of all messages. + * + * @return mixed + */ + public function getRecipient() + { + return $this->_recipient; + } + + /** + * Set a list of regular expressions to whitelist certain recipients. + * + * @param array $whitelist + */ + public function setWhitelist(array $whitelist) + { + $this->_whitelist = $whitelist; + } + + /** + * Get the whitelist. + * + * @return array + */ + public function getWhitelist() + { + return $this->_whitelist; + } + + /** + * Invoked immediately before the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + $headers = $message->getHeaders(); + + // conditionally save current recipients + + if ($headers->has('to')) { + $headers->addMailboxHeader('X-Swift-To', $message->getTo()); + } + + if ($headers->has('cc')) { + $headers->addMailboxHeader('X-Swift-Cc', $message->getCc()); + } + + if ($headers->has('bcc')) { + $headers->addMailboxHeader('X-Swift-Bcc', $message->getBcc()); + } + + // Filter remaining headers against whitelist + $this->_filterHeaderSet($headers, 'To'); + $this->_filterHeaderSet($headers, 'Cc'); + $this->_filterHeaderSet($headers, 'Bcc'); + + // Add each hard coded recipient + $to = $message->getTo(); + if (null === $to) { + $to = array(); + } + + foreach ((array) $this->_recipient as $recipient) { + if (!array_key_exists($recipient, $to)) { + $message->addTo($recipient); + } + } + } + + /** + * Filter header set against a whitelist of regular expressions. + * + * @param Swift_Mime_HeaderSet $headerSet + * @param string $type + */ + private function _filterHeaderSet(Swift_Mime_HeaderSet $headerSet, $type) + { + foreach ($headerSet->getAll($type) as $headers) { + $headers->setNameAddresses($this->_filterNameAddresses($headers->getNameAddresses())); + } + } + + /** + * Filtered list of addresses => name pairs. + * + * @param array $recipients + * + * @return array + */ + private function _filterNameAddresses(array $recipients) + { + $filtered = array(); + + foreach ($recipients as $address => $name) { + if ($this->_isWhitelisted($address)) { + $filtered[$address] = $name; + } + } + + return $filtered; + } + + /** + * Matches address against whitelist of regular expressions. + * + * @param $recipient + * + * @return bool + */ + protected function _isWhitelisted($recipient) + { + if (in_array($recipient, (array) $this->_recipient)) { + return true; + } + + foreach ($this->_whitelist as $pattern) { + if (preg_match($pattern, $recipient)) { + return true; + } + } + + return false; + } + + /** + * Invoked immediately after the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + $this->_restoreMessage($evt->getMessage()); + } + + private function _restoreMessage(Swift_Mime_Message $message) + { + // restore original headers + $headers = $message->getHeaders(); + + if ($headers->has('X-Swift-To')) { + $message->setTo($headers->get('X-Swift-To')->getNameAddresses()); + $headers->removeAll('X-Swift-To'); + } else { + $message->setTo(null); + } + + if ($headers->has('X-Swift-Cc')) { + $message->setCc($headers->get('X-Swift-Cc')->getNameAddresses()); + $headers->removeAll('X-Swift-Cc'); + } + + if ($headers->has('X-Swift-Bcc')) { + $message->setBcc($headers->get('X-Swift-Bcc')->getNameAddresses()); + $headers->removeAll('X-Swift-Bcc'); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php new file mode 100644 index 0000000000000000000000000000000000000000..0f21b7d6052cfa637d04747ac1a2d6f94e9eb2c0 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php @@ -0,0 +1,32 @@ +_reporter = $reporter; + } + + /** + * Not used. + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + } + + /** + * Invoked immediately after the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + $failures = array_flip($evt->getFailedRecipients()); + foreach ((array) $message->getTo() as $address => $null) { + $this->_reporter->notify($message, $address, array_key_exists($address, $failures) ? Swift_Plugins_Reporter::RESULT_FAIL : Swift_Plugins_Reporter::RESULT_PASS); + } + foreach ((array) $message->getCc() as $address => $null) { + $this->_reporter->notify($message, $address, array_key_exists($address, $failures) ? Swift_Plugins_Reporter::RESULT_FAIL : Swift_Plugins_Reporter::RESULT_PASS); + } + foreach ((array) $message->getBcc() as $address => $null) { + $this->_reporter->notify($message, $address, array_key_exists($address, $failures) ? Swift_Plugins_Reporter::RESULT_FAIL : Swift_Plugins_Reporter::RESULT_PASS); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php new file mode 100644 index 0000000000000000000000000000000000000000..cad9d168ef228f877250feeeeef7fa841f7d2f80 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php @@ -0,0 +1,59 @@ +_failures_cache[$address])) { + $this->_failures[] = $address; + $this->_failures_cache[$address] = true; + } + } + + /** + * Get an array of addresses for which delivery failed. + * + * @return array + */ + public function getFailedRecipients() + { + return $this->_failures; + } + + /** + * Clear the buffer (empty the list). + */ + public function clear() + { + $this->_failures = $this->_failures_cache = array(); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php new file mode 100644 index 0000000000000000000000000000000000000000..c62593557e3d66bd605d062a1b995e6f75279d14 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php @@ -0,0 +1,39 @@ +'.PHP_EOL; + echo 'PASS '.$address.PHP_EOL; + echo ''.PHP_EOL; + flush(); + } else { + echo '
    '.PHP_EOL; + echo 'FAIL '.$address.PHP_EOL; + echo '
    '.PHP_EOL; + flush(); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php new file mode 100644 index 0000000000000000000000000000000000000000..595c0f603b0e0a563cdc52e3c79353c68dde6b32 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php @@ -0,0 +1,24 @@ +_rate = $rate; + $this->_mode = $mode; + $this->_sleeper = $sleeper; + $this->_timer = $timer; + } + + /** + * Invoked immediately before the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + $time = $this->getTimestamp(); + if (!isset($this->_start)) { + $this->_start = $time; + } + $duration = $time - $this->_start; + + switch ($this->_mode) { + case self::BYTES_PER_MINUTE: + $sleep = $this->_throttleBytesPerMinute($duration); + break; + case self::MESSAGES_PER_SECOND: + $sleep = $this->_throttleMessagesPerSecond($duration); + break; + case self::MESSAGES_PER_MINUTE: + $sleep = $this->_throttleMessagesPerMinute($duration); + break; + default: + $sleep = 0; + break; + } + + if ($sleep > 0) { + $this->sleep($sleep); + } + } + + /** + * Invoked when a Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + parent::sendPerformed($evt); + ++$this->_messages; + } + + /** + * Sleep for $seconds. + * + * @param int $seconds + */ + public function sleep($seconds) + { + if (isset($this->_sleeper)) { + $this->_sleeper->sleep($seconds); + } else { + sleep($seconds); + } + } + + /** + * Get the current UNIX timestamp. + * + * @return int + */ + public function getTimestamp() + { + if (isset($this->_timer)) { + return $this->_timer->getTimestamp(); + } + + return time(); + } + + /** + * Get a number of seconds to sleep for. + * + * @param int $timePassed + * + * @return int + */ + private function _throttleBytesPerMinute($timePassed) + { + $expectedDuration = $this->getBytesOut() / ($this->_rate / 60); + + return (int) ceil($expectedDuration - $timePassed); + } + + /** + * Get a number of seconds to sleep for. + * + * @param int $timePassed + * + * @return int + */ + private function _throttleMessagesPerSecond($timePassed) + { + $expectedDuration = $this->_messages / ($this->_rate); + + return (int) ceil($expectedDuration - $timePassed); + } + + /** + * Get a number of seconds to sleep for. + * + * @param int $timePassed + * + * @return int + */ + private function _throttleMessagesPerMinute($timePassed) + { + $expectedDuration = $this->_messages / ($this->_rate / 60); + + return (int) ceil($expectedDuration - $timePassed); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Timer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Timer.php new file mode 100644 index 0000000000000000000000000000000000000000..9c8deb38ac4a70293aa744c86a00d51493be383d --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Timer.php @@ -0,0 +1,24 @@ +register('properties.charset')->asValue($charset); + + return $this; + } + + /** + * Set the directory where temporary files can be saved. + * + * @param string $dir + * + * @return Swift_Preferences + */ + public function setTempDir($dir) + { + Swift_DependencyContainer::getInstance() + ->register('tempdir')->asValue($dir); + + return $this; + } + + /** + * Set the type of cache to use (i.e. "disk" or "array"). + * + * @param string $type + * + * @return Swift_Preferences + */ + public function setCacheType($type) + { + Swift_DependencyContainer::getInstance() + ->register('cache')->asAliasOf(sprintf('cache.%s', $type)); + + return $this; + } + + /** + * Set the QuotedPrintable dot escaper preference. + * + * @param bool $dotEscape + * + * @return Swift_Preferences + */ + public function setQPDotEscape($dotEscape) + { + $dotEscape = !empty($dotEscape); + Swift_DependencyContainer::getInstance() + ->register('mime.qpcontentencoder') + ->asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder') + ->withDependencies(array('mime.charstream', 'mime.bytecanonicalizer')) + ->addConstructorValue($dotEscape); + + return $this; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..2897474e7b35c429e2ac1a6e9c671509c2261dbb --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php @@ -0,0 +1,27 @@ +createDependenciesFor('transport.sendmail') + ); + + $this->setCommand($command); + } + + /** + * Create a new SendmailTransport instance. + * + * @param string $command + * + * @return Swift_SendmailTransport + */ + public static function newInstance($command = '/usr/sbin/sendmail -bs') + { + return new self($command); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SignedMessage.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SignedMessage.php new file mode 100644 index 0000000000000000000000000000000000000000..2e7a8726d2186aecbd003b9a93a9b47b6e23f75c --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SignedMessage.php @@ -0,0 +1,23 @@ + + * + * @deprecated + */ +class Swift_SignedMessage extends Swift_Message +{ +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signer.php new file mode 100644 index 0000000000000000000000000000000000000000..2d8176d905ccf29e5c7f988e5328216960c5244d --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signer.php @@ -0,0 +1,20 @@ + + */ +interface Swift_Signer +{ + public function reset(); +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php new file mode 100644 index 0000000000000000000000000000000000000000..9ffcef39c9f7373c27a8c182c6ce8d99b7763aa5 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php @@ -0,0 +1,33 @@ + + */ +interface Swift_Signers_BodySigner extends Swift_Signer +{ + /** + * Change the Swift_Signed_Message to apply the singing. + * + * @param Swift_Message $message + * + * @return Swift_Signers_BodySigner + */ + public function signMessage(Swift_Message $message); + + /** + * Return the list of header a signer might tamper. + * + * @return array + */ + public function getAlteredHeaders(); +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php new file mode 100644 index 0000000000000000000000000000000000000000..9d0a45d88995f3935368705fa5ffab0fccde343c --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php @@ -0,0 +1,712 @@ + + */ +class Swift_Signers_DKIMSigner implements Swift_Signers_HeaderSigner +{ + /** + * PrivateKey. + * + * @var string + */ + protected $_privateKey; + + /** + * DomainName. + * + * @var string + */ + protected $_domainName; + + /** + * Selector. + * + * @var string + */ + protected $_selector; + + /** + * Hash algorithm used. + * + * @see RFC6376 3.3: Signers MUST implement and SHOULD sign using rsa-sha256. + * + * @var string + */ + protected $_hashAlgorithm = 'rsa-sha256'; + + /** + * Body canon method. + * + * @var string + */ + protected $_bodyCanon = 'simple'; + + /** + * Header canon method. + * + * @var string + */ + protected $_headerCanon = 'simple'; + + /** + * Headers not being signed. + * + * @var array + */ + protected $_ignoredHeaders = array('return-path' => true); + + /** + * Signer identity. + * + * @var string + */ + protected $_signerIdentity; + + /** + * BodyLength. + * + * @var int + */ + protected $_bodyLen = 0; + + /** + * Maximum signedLen. + * + * @var int + */ + protected $_maxLen = PHP_INT_MAX; + + /** + * Embbed bodyLen in signature. + * + * @var bool + */ + protected $_showLen = false; + + /** + * When the signature has been applied (true means time()), false means not embedded. + * + * @var mixed + */ + protected $_signatureTimestamp = true; + + /** + * When will the signature expires false means not embedded, if sigTimestamp is auto + * Expiration is relative, otherwise it's absolute. + * + * @var int + */ + protected $_signatureExpiration = false; + + /** + * Must we embed signed headers? + * + * @var bool + */ + protected $_debugHeaders = false; + + // work variables + /** + * Headers used to generate hash. + * + * @var array + */ + protected $_signedHeaders = array(); + + /** + * If debugHeaders is set store debugData here. + * + * @var string + */ + private $_debugHeadersData = ''; + + /** + * Stores the bodyHash. + * + * @var string + */ + private $_bodyHash = ''; + + /** + * Stores the signature header. + * + * @var Swift_Mime_Headers_ParameterizedHeader + */ + protected $_dkimHeader; + + private $_bodyHashHandler; + + private $_headerHash; + + private $_headerCanonData = ''; + + private $_bodyCanonEmptyCounter = 0; + + private $_bodyCanonIgnoreStart = 2; + + private $_bodyCanonSpace = false; + + private $_bodyCanonLastChar = null; + + private $_bodyCanonLine = ''; + + private $_bound = array(); + + /** + * Constructor. + * + * @param string $privateKey + * @param string $domainName + * @param string $selector + */ + public function __construct($privateKey, $domainName, $selector) + { + $this->_privateKey = $privateKey; + $this->_domainName = $domainName; + $this->_signerIdentity = '@'.$domainName; + $this->_selector = $selector; + + // keep fallback hash algorithm sha1 if php version is lower than 5.4.8 + if (PHP_VERSION_ID < 50408) { + $this->_hashAlgorithm = 'rsa-sha1'; + } + } + + /** + * Instanciate DKIMSigner. + * + * @param string $privateKey + * @param string $domainName + * @param string $selector + * + * @return Swift_Signers_DKIMSigner + */ + public static function newInstance($privateKey, $domainName, $selector) + { + return new static($privateKey, $domainName, $selector); + } + + /** + * Reset the Signer. + * + * @see Swift_Signer::reset() + */ + public function reset() + { + $this->_headerHash = null; + $this->_signedHeaders = array(); + $this->_bodyHash = null; + $this->_bodyHashHandler = null; + $this->_bodyCanonIgnoreStart = 2; + $this->_bodyCanonEmptyCounter = 0; + $this->_bodyCanonLastChar = null; + $this->_bodyCanonSpace = false; + } + + /** + * Writes $bytes to the end of the stream. + * + * Writing may not happen immediately if the stream chooses to buffer. If + * you want to write these bytes with immediate effect, call {@link commit()} + * after calling write(). + * + * This method returns the sequence ID of the write (i.e. 1 for first, 2 for + * second, etc etc). + * + * @param string $bytes + * + * @throws Swift_IoException + * + * @return int + */ + // TODO fix return + public function write($bytes) + { + $this->_canonicalizeBody($bytes); + foreach ($this->_bound as $is) { + $is->write($bytes); + } + } + + /** + * For any bytes that are currently buffered inside the stream, force them + * off the buffer. + */ + public function commit() + { + // Nothing to do + return; + } + + /** + * Attach $is to this stream. + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + * + * @param Swift_InputByteStream $is + */ + public function bind(Swift_InputByteStream $is) + { + // Don't have to mirror anything + $this->_bound[] = $is; + + return; + } + + /** + * Remove an already bound stream. + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + * + * @param Swift_InputByteStream $is + */ + public function unbind(Swift_InputByteStream $is) + { + // Don't have to mirror anything + foreach ($this->_bound as $k => $stream) { + if ($stream === $is) { + unset($this->_bound[$k]); + + return; + } + } + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + * + * @throws Swift_IoException + */ + public function flushBuffers() + { + $this->reset(); + } + + /** + * Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1. + * + * @param string $hash 'rsa-sha1' or 'rsa-sha256' + * + * @throws Swift_SwiftException + * + * @return Swift_Signers_DKIMSigner + */ + public function setHashAlgorithm($hash) + { + switch ($hash) { + case 'rsa-sha1': + $this->_hashAlgorithm = 'rsa-sha1'; + break; + case 'rsa-sha256': + $this->_hashAlgorithm = 'rsa-sha256'; + if (!defined('OPENSSL_ALGO_SHA256')) { + throw new Swift_SwiftException('Unable to set sha256 as it is not supported by OpenSSL.'); + } + break; + default: + throw new Swift_SwiftException('Unable to set the hash algorithm, must be one of rsa-sha1 or rsa-sha256 (%s given).', $hash); + } + + return $this; + } + + /** + * Set the body canonicalization algorithm. + * + * @param string $canon + * + * @return Swift_Signers_DKIMSigner + */ + public function setBodyCanon($canon) + { + if ($canon == 'relaxed') { + $this->_bodyCanon = 'relaxed'; + } else { + $this->_bodyCanon = 'simple'; + } + + return $this; + } + + /** + * Set the header canonicalization algorithm. + * + * @param string $canon + * + * @return Swift_Signers_DKIMSigner + */ + public function setHeaderCanon($canon) + { + if ($canon == 'relaxed') { + $this->_headerCanon = 'relaxed'; + } else { + $this->_headerCanon = 'simple'; + } + + return $this; + } + + /** + * Set the signer identity. + * + * @param string $identity + * + * @return Swift_Signers_DKIMSigner + */ + public function setSignerIdentity($identity) + { + $this->_signerIdentity = $identity; + + return $this; + } + + /** + * Set the length of the body to sign. + * + * @param mixed $len (bool or int) + * + * @return Swift_Signers_DKIMSigner + */ + public function setBodySignedLen($len) + { + if ($len === true) { + $this->_showLen = true; + $this->_maxLen = PHP_INT_MAX; + } elseif ($len === false) { + $this->_showLen = false; + $this->_maxLen = PHP_INT_MAX; + } else { + $this->_showLen = true; + $this->_maxLen = (int) $len; + } + + return $this; + } + + /** + * Set the signature timestamp. + * + * @param int $time A timestamp + * + * @return Swift_Signers_DKIMSigner + */ + public function setSignatureTimestamp($time) + { + $this->_signatureTimestamp = $time; + + return $this; + } + + /** + * Set the signature expiration timestamp. + * + * @param int $time A timestamp + * + * @return Swift_Signers_DKIMSigner + */ + public function setSignatureExpiration($time) + { + $this->_signatureExpiration = $time; + + return $this; + } + + /** + * Enable / disable the DebugHeaders. + * + * @param bool $debug + * + * @return Swift_Signers_DKIMSigner + */ + public function setDebugHeaders($debug) + { + $this->_debugHeaders = (bool) $debug; + + return $this; + } + + /** + * Start Body. + */ + public function startBody() + { + // Init + switch ($this->_hashAlgorithm) { + case 'rsa-sha256': + $this->_bodyHashHandler = hash_init('sha256'); + break; + case 'rsa-sha1': + $this->_bodyHashHandler = hash_init('sha1'); + break; + } + $this->_bodyCanonLine = ''; + } + + /** + * End Body. + */ + public function endBody() + { + $this->_endOfBody(); + } + + /** + * Returns the list of Headers Tampered by this plugin. + * + * @return array + */ + public function getAlteredHeaders() + { + if ($this->_debugHeaders) { + return array('DKIM-Signature', 'X-DebugHash'); + } else { + return array('DKIM-Signature'); + } + } + + /** + * Adds an ignored Header. + * + * @param string $header_name + * + * @return Swift_Signers_DKIMSigner + */ + public function ignoreHeader($header_name) + { + $this->_ignoredHeaders[strtolower($header_name)] = true; + + return $this; + } + + /** + * Set the headers to sign. + * + * @param Swift_Mime_HeaderSet $headers + * + * @return Swift_Signers_DKIMSigner + */ + public function setHeaders(Swift_Mime_HeaderSet $headers) + { + $this->_headerCanonData = ''; + // Loop through Headers + $listHeaders = $headers->listAll(); + foreach ($listHeaders as $hName) { + // Check if we need to ignore Header + if (!isset($this->_ignoredHeaders[strtolower($hName)])) { + if ($headers->has($hName)) { + $tmp = $headers->getAll($hName); + foreach ($tmp as $header) { + if ($header->getFieldBody() != '') { + $this->_addHeader($header->toString()); + $this->_signedHeaders[] = $header->getFieldName(); + } + } + } + } + } + + return $this; + } + + /** + * Add the signature to the given Headers. + * + * @param Swift_Mime_HeaderSet $headers + * + * @return Swift_Signers_DKIMSigner + */ + public function addSignature(Swift_Mime_HeaderSet $headers) + { + // Prepare the DKIM-Signature + $params = array('v' => '1', 'a' => $this->_hashAlgorithm, 'bh' => base64_encode($this->_bodyHash), 'd' => $this->_domainName, 'h' => implode(': ', $this->_signedHeaders), 'i' => $this->_signerIdentity, 's' => $this->_selector); + if ($this->_bodyCanon != 'simple') { + $params['c'] = $this->_headerCanon.'/'.$this->_bodyCanon; + } elseif ($this->_headerCanon != 'simple') { + $params['c'] = $this->_headerCanon; + } + if ($this->_showLen) { + $params['l'] = $this->_bodyLen; + } + if ($this->_signatureTimestamp === true) { + $params['t'] = time(); + if ($this->_signatureExpiration !== false) { + $params['x'] = $params['t'] + $this->_signatureExpiration; + } + } else { + if ($this->_signatureTimestamp !== false) { + $params['t'] = $this->_signatureTimestamp; + } + if ($this->_signatureExpiration !== false) { + $params['x'] = $this->_signatureExpiration; + } + } + if ($this->_debugHeaders) { + $params['z'] = implode('|', $this->_debugHeadersData); + } + $string = ''; + foreach ($params as $k => $v) { + $string .= $k.'='.$v.'; '; + } + $string = trim($string); + $headers->addTextHeader('DKIM-Signature', $string); + // Add the last DKIM-Signature + $tmp = $headers->getAll('DKIM-Signature'); + $this->_dkimHeader = end($tmp); + $this->_addHeader(trim($this->_dkimHeader->toString())."\r\n b=", true); + $this->_endOfHeaders(); + if ($this->_debugHeaders) { + $headers->addTextHeader('X-DebugHash', base64_encode($this->_headerHash)); + } + $this->_dkimHeader->setValue($string.' b='.trim(chunk_split(base64_encode($this->_getEncryptedHash()), 73, ' '))); + + return $this; + } + + /* Private helpers */ + + protected function _addHeader($header, $is_sig = false) + { + switch ($this->_headerCanon) { + case 'relaxed': + // Prepare Header and cascade + $exploded = explode(':', $header, 2); + $name = strtolower(trim($exploded[0])); + $value = str_replace("\r\n", '', $exploded[1]); + $value = preg_replace("/[ \t][ \t]+/", ' ', $value); + $header = $name.':'.trim($value).($is_sig ? '' : "\r\n"); + case 'simple': + // Nothing to do + } + $this->_addToHeaderHash($header); + } + + /** + * @deprecated This method is currently useless in this class but it must be + * kept for BC reasons due to its "protected" scope. This method + * might be overridden by custom client code. + */ + protected function _endOfHeaders() + { + } + + protected function _canonicalizeBody($string) + { + $len = strlen($string); + $canon = ''; + $method = ($this->_bodyCanon == 'relaxed'); + for ($i = 0; $i < $len; ++$i) { + if ($this->_bodyCanonIgnoreStart > 0) { + --$this->_bodyCanonIgnoreStart; + continue; + } + switch ($string[$i]) { + case "\r": + $this->_bodyCanonLastChar = "\r"; + break; + case "\n": + if ($this->_bodyCanonLastChar == "\r") { + if ($method) { + $this->_bodyCanonSpace = false; + } + if ($this->_bodyCanonLine == '') { + ++$this->_bodyCanonEmptyCounter; + } else { + $this->_bodyCanonLine = ''; + $canon .= "\r\n"; + } + } else { + // Wooops Error + // todo handle it but should never happen + } + break; + case ' ': + case "\t": + if ($method) { + $this->_bodyCanonSpace = true; + break; + } + default: + if ($this->_bodyCanonEmptyCounter > 0) { + $canon .= str_repeat("\r\n", $this->_bodyCanonEmptyCounter); + $this->_bodyCanonEmptyCounter = 0; + } + if ($this->_bodyCanonSpace) { + $this->_bodyCanonLine .= ' '; + $canon .= ' '; + $this->_bodyCanonSpace = false; + } + $this->_bodyCanonLine .= $string[$i]; + $canon .= $string[$i]; + } + } + $this->_addToBodyHash($canon); + } + + protected function _endOfBody() + { + // Add trailing Line return if last line is non empty + if (strlen($this->_bodyCanonLine) > 0) { + $this->_addToBodyHash("\r\n"); + } + $this->_bodyHash = hash_final($this->_bodyHashHandler, true); + } + + private function _addToBodyHash($string) + { + $len = strlen($string); + if ($len > ($new_len = ($this->_maxLen - $this->_bodyLen))) { + $string = substr($string, 0, $new_len); + $len = $new_len; + } + hash_update($this->_bodyHashHandler, $string); + $this->_bodyLen += $len; + } + + private function _addToHeaderHash($header) + { + if ($this->_debugHeaders) { + $this->_debugHeadersData[] = trim($header); + } + $this->_headerCanonData .= $header; + } + + /** + * @throws Swift_SwiftException + * + * @return string + */ + private function _getEncryptedHash() + { + $signature = ''; + + switch ($this->_hashAlgorithm) { + case 'rsa-sha1': + $algorithm = OPENSSL_ALGO_SHA1; + break; + case 'rsa-sha256': + $algorithm = OPENSSL_ALGO_SHA256; + break; + } + $pkeyId = openssl_get_privatekey($this->_privateKey); + if (!$pkeyId) { + throw new Swift_SwiftException('Unable to load DKIM Private Key ['.openssl_error_string().']'); + } + if (openssl_sign($this->_headerCanonData, $signature, $pkeyId, $algorithm)) { + return $signature; + } + throw new Swift_SwiftException('Unable to sign DKIM Hash ['.openssl_error_string().']'); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php new file mode 100644 index 0000000000000000000000000000000000000000..786cee7b7a2434e53b974dd9747afbc509f22bd7 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php @@ -0,0 +1,525 @@ + + */ +class Swift_Signers_DomainKeySigner implements Swift_Signers_HeaderSigner +{ + /** + * PrivateKey. + * + * @var string + */ + protected $_privateKey; + + /** + * DomainName. + * + * @var string + */ + protected $_domainName; + + /** + * Selector. + * + * @var string + */ + protected $_selector; + + /** + * Hash algorithm used. + * + * @var string + */ + protected $_hashAlgorithm = 'rsa-sha1'; + + /** + * Canonisation method. + * + * @var string + */ + protected $_canon = 'simple'; + + /** + * Headers not being signed. + * + * @var array + */ + protected $_ignoredHeaders = array(); + + /** + * Signer identity. + * + * @var string + */ + protected $_signerIdentity; + + /** + * Must we embed signed headers? + * + * @var bool + */ + protected $_debugHeaders = false; + + // work variables + /** + * Headers used to generate hash. + * + * @var array + */ + private $_signedHeaders = array(); + + /** + * Stores the signature header. + * + * @var Swift_Mime_Headers_ParameterizedHeader + */ + protected $_domainKeyHeader; + + /** + * Hash Handler. + * + * @var resource|null + */ + private $_hashHandler; + + private $_hash; + + private $_canonData = ''; + + private $_bodyCanonEmptyCounter = 0; + + private $_bodyCanonIgnoreStart = 2; + + private $_bodyCanonSpace = false; + + private $_bodyCanonLastChar = null; + + private $_bodyCanonLine = ''; + + private $_bound = array(); + + /** + * Constructor. + * + * @param string $privateKey + * @param string $domainName + * @param string $selector + */ + public function __construct($privateKey, $domainName, $selector) + { + $this->_privateKey = $privateKey; + $this->_domainName = $domainName; + $this->_signerIdentity = '@'.$domainName; + $this->_selector = $selector; + } + + /** + * Instanciate DomainKeySigner. + * + * @param string $privateKey + * @param string $domainName + * @param string $selector + * + * @return Swift_Signers_DomainKeySigner + */ + public static function newInstance($privateKey, $domainName, $selector) + { + return new static($privateKey, $domainName, $selector); + } + + /** + * Resets internal states. + * + * @return Swift_Signers_DomainKeySigner + */ + public function reset() + { + $this->_hash = null; + $this->_hashHandler = null; + $this->_bodyCanonIgnoreStart = 2; + $this->_bodyCanonEmptyCounter = 0; + $this->_bodyCanonLastChar = null; + $this->_bodyCanonSpace = false; + + return $this; + } + + /** + * Writes $bytes to the end of the stream. + * + * Writing may not happen immediately if the stream chooses to buffer. If + * you want to write these bytes with immediate effect, call {@link commit()} + * after calling write(). + * + * This method returns the sequence ID of the write (i.e. 1 for first, 2 for + * second, etc etc). + * + * @param string $bytes + * + * @throws Swift_IoException + * + * @return int + * @return Swift_Signers_DomainKeySigner + */ + public function write($bytes) + { + $this->_canonicalizeBody($bytes); + foreach ($this->_bound as $is) { + $is->write($bytes); + } + + return $this; + } + + /** + * For any bytes that are currently buffered inside the stream, force them + * off the buffer. + * + * @throws Swift_IoException + * + * @return Swift_Signers_DomainKeySigner + */ + public function commit() + { + // Nothing to do + return $this; + } + + /** + * Attach $is to this stream. + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + * + * @param Swift_InputByteStream $is + * + * @return Swift_Signers_DomainKeySigner + */ + public function bind(Swift_InputByteStream $is) + { + // Don't have to mirror anything + $this->_bound[] = $is; + + return $this; + } + + /** + * Remove an already bound stream. + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + * + * @param Swift_InputByteStream $is + * + * @return Swift_Signers_DomainKeySigner + */ + public function unbind(Swift_InputByteStream $is) + { + // Don't have to mirror anything + foreach ($this->_bound as $k => $stream) { + if ($stream === $is) { + unset($this->_bound[$k]); + + return; + } + } + + return $this; + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + * + * @throws Swift_IoException + * + * @return Swift_Signers_DomainKeySigner + */ + public function flushBuffers() + { + $this->reset(); + + return $this; + } + + /** + * Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1 defaults to rsa-sha256. + * + * @param string $hash + * + * @return Swift_Signers_DomainKeySigner + */ + public function setHashAlgorithm($hash) + { + $this->_hashAlgorithm = 'rsa-sha1'; + + return $this; + } + + /** + * Set the canonicalization algorithm. + * + * @param string $canon simple | nofws defaults to simple + * + * @return Swift_Signers_DomainKeySigner + */ + public function setCanon($canon) + { + if ($canon == 'nofws') { + $this->_canon = 'nofws'; + } else { + $this->_canon = 'simple'; + } + + return $this; + } + + /** + * Set the signer identity. + * + * @param string $identity + * + * @return Swift_Signers_DomainKeySigner + */ + public function setSignerIdentity($identity) + { + $this->_signerIdentity = $identity; + + return $this; + } + + /** + * Enable / disable the DebugHeaders. + * + * @param bool $debug + * + * @return Swift_Signers_DomainKeySigner + */ + public function setDebugHeaders($debug) + { + $this->_debugHeaders = (bool) $debug; + + return $this; + } + + /** + * Start Body. + */ + public function startBody() + { + } + + /** + * End Body. + */ + public function endBody() + { + $this->_endOfBody(); + } + + /** + * Returns the list of Headers Tampered by this plugin. + * + * @return array + */ + public function getAlteredHeaders() + { + if ($this->_debugHeaders) { + return array('DomainKey-Signature', 'X-DebugHash'); + } + + return array('DomainKey-Signature'); + } + + /** + * Adds an ignored Header. + * + * @param string $header_name + * + * @return Swift_Signers_DomainKeySigner + */ + public function ignoreHeader($header_name) + { + $this->_ignoredHeaders[strtolower($header_name)] = true; + + return $this; + } + + /** + * Set the headers to sign. + * + * @param Swift_Mime_HeaderSet $headers + * + * @return Swift_Signers_DomainKeySigner + */ + public function setHeaders(Swift_Mime_HeaderSet $headers) + { + $this->_startHash(); + $this->_canonData = ''; + // Loop through Headers + $listHeaders = $headers->listAll(); + foreach ($listHeaders as $hName) { + // Check if we need to ignore Header + if (!isset($this->_ignoredHeaders[strtolower($hName)])) { + if ($headers->has($hName)) { + $tmp = $headers->getAll($hName); + foreach ($tmp as $header) { + if ($header->getFieldBody() != '') { + $this->_addHeader($header->toString()); + $this->_signedHeaders[] = $header->getFieldName(); + } + } + } + } + } + $this->_endOfHeaders(); + + return $this; + } + + /** + * Add the signature to the given Headers. + * + * @param Swift_Mime_HeaderSet $headers + * + * @return Swift_Signers_DomainKeySigner + */ + public function addSignature(Swift_Mime_HeaderSet $headers) + { + // Prepare the DomainKey-Signature Header + $params = array('a' => $this->_hashAlgorithm, 'b' => chunk_split(base64_encode($this->_getEncryptedHash()), 73, ' '), 'c' => $this->_canon, 'd' => $this->_domainName, 'h' => implode(': ', $this->_signedHeaders), 'q' => 'dns', 's' => $this->_selector); + $string = ''; + foreach ($params as $k => $v) { + $string .= $k.'='.$v.'; '; + } + $string = trim($string); + $headers->addTextHeader('DomainKey-Signature', $string); + + return $this; + } + + /* Private helpers */ + + protected function _addHeader($header) + { + switch ($this->_canon) { + case 'nofws': + // Prepare Header and cascade + $exploded = explode(':', $header, 2); + $name = strtolower(trim($exploded[0])); + $value = str_replace("\r\n", '', $exploded[1]); + $value = preg_replace("/[ \t][ \t]+/", ' ', $value); + $header = $name.':'.trim($value)."\r\n"; + case 'simple': + // Nothing to do + } + $this->_addToHash($header); + } + + protected function _endOfHeaders() + { + $this->_bodyCanonEmptyCounter = 1; + } + + protected function _canonicalizeBody($string) + { + $len = strlen($string); + $canon = ''; + $nofws = ($this->_canon == 'nofws'); + for ($i = 0; $i < $len; ++$i) { + if ($this->_bodyCanonIgnoreStart > 0) { + --$this->_bodyCanonIgnoreStart; + continue; + } + switch ($string[$i]) { + case "\r": + $this->_bodyCanonLastChar = "\r"; + break; + case "\n": + if ($this->_bodyCanonLastChar == "\r") { + if ($nofws) { + $this->_bodyCanonSpace = false; + } + if ($this->_bodyCanonLine == '') { + ++$this->_bodyCanonEmptyCounter; + } else { + $this->_bodyCanonLine = ''; + $canon .= "\r\n"; + } + } else { + // Wooops Error + throw new Swift_SwiftException('Invalid new line sequence in mail found \n without preceding \r'); + } + break; + case ' ': + case "\t": + case "\x09": //HTAB + if ($nofws) { + $this->_bodyCanonSpace = true; + break; + } + default: + if ($this->_bodyCanonEmptyCounter > 0) { + $canon .= str_repeat("\r\n", $this->_bodyCanonEmptyCounter); + $this->_bodyCanonEmptyCounter = 0; + } + $this->_bodyCanonLine .= $string[$i]; + $canon .= $string[$i]; + } + } + $this->_addToHash($canon); + } + + protected function _endOfBody() + { + if (strlen($this->_bodyCanonLine) > 0) { + $this->_addToHash("\r\n"); + } + $this->_hash = hash_final($this->_hashHandler, true); + } + + private function _addToHash($string) + { + $this->_canonData .= $string; + hash_update($this->_hashHandler, $string); + } + + private function _startHash() + { + // Init + switch ($this->_hashAlgorithm) { + case 'rsa-sha1': + $this->_hashHandler = hash_init('sha1'); + break; + } + $this->_bodyCanonLine = ''; + } + + /** + * @throws Swift_SwiftException + * + * @return string + */ + private function _getEncryptedHash() + { + $signature = ''; + $pkeyId = openssl_get_privatekey($this->_privateKey); + if (!$pkeyId) { + throw new Swift_SwiftException('Unable to load DomainKey Private Key ['.openssl_error_string().']'); + } + if (openssl_sign($this->_canonData, $signature, $pkeyId, OPENSSL_ALGO_SHA1)) { + return $signature; + } + throw new Swift_SwiftException('Unable to sign DomainKey Hash ['.openssl_error_string().']'); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php new file mode 100644 index 0000000000000000000000000000000000000000..c75cb08a51824a370e9a7e4f8cb7b6ffc23f5996 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php @@ -0,0 +1,65 @@ + + */ +interface Swift_Signers_HeaderSigner extends Swift_Signer, Swift_InputByteStream +{ + /** + * Exclude an header from the signed headers. + * + * @param string $header_name + * + * @return Swift_Signers_HeaderSigner + */ + public function ignoreHeader($header_name); + + /** + * Prepare the Signer to get a new Body. + * + * @return Swift_Signers_HeaderSigner + */ + public function startBody(); + + /** + * Give the signal that the body has finished streaming. + * + * @return Swift_Signers_HeaderSigner + */ + public function endBody(); + + /** + * Give the headers already given. + * + * @param Swift_Mime_SimpleHeaderSet $headers + * + * @return Swift_Signers_HeaderSigner + */ + public function setHeaders(Swift_Mime_HeaderSet $headers); + + /** + * Add the header(s) to the headerSet. + * + * @param Swift_Mime_HeaderSet $headers + * + * @return Swift_Signers_HeaderSigner + */ + public function addSignature(Swift_Mime_HeaderSet $headers); + + /** + * Return the list of header a signer might tamper. + * + * @return array + */ + public function getAlteredHeaders(); +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php new file mode 100644 index 0000000000000000000000000000000000000000..3a35ad55d07f58834cc0307b3c4c0756f336d8ca --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php @@ -0,0 +1,190 @@ + + */ +class Swift_Signers_OpenDKIMSigner extends Swift_Signers_DKIMSigner +{ + private $_peclLoaded = false; + + private $_dkimHandler = null; + + private $dropFirstLF = true; + + const CANON_RELAXED = 1; + const CANON_SIMPLE = 2; + const SIG_RSA_SHA1 = 3; + const SIG_RSA_SHA256 = 4; + + public function __construct($privateKey, $domainName, $selector) + { + if (!extension_loaded('opendkim')) { + throw new Swift_SwiftException('php-opendkim extension not found'); + } + + $this->_peclLoaded = true; + + parent::__construct($privateKey, $domainName, $selector); + } + + public static function newInstance($privateKey, $domainName, $selector) + { + return new static($privateKey, $domainName, $selector); + } + + public function addSignature(Swift_Mime_HeaderSet $headers) + { + $header = new Swift_Mime_Headers_OpenDKIMHeader('DKIM-Signature'); + $headerVal = $this->_dkimHandler->getSignatureHeader(); + if (!$headerVal) { + throw new Swift_SwiftException('OpenDKIM Error: '.$this->_dkimHandler->getError()); + } + $header->setValue($headerVal); + $headers->set($header); + + return $this; + } + + public function setHeaders(Swift_Mime_HeaderSet $headers) + { + $bodyLen = $this->_bodyLen; + if (is_bool($bodyLen)) { + $bodyLen = -1; + } + $hash = $this->_hashAlgorithm == 'rsa-sha1' ? OpenDKIMSign::ALG_RSASHA1 : OpenDKIMSign::ALG_RSASHA256; + $bodyCanon = $this->_bodyCanon == 'simple' ? OpenDKIMSign::CANON_SIMPLE : OpenDKIMSign::CANON_RELAXED; + $headerCanon = $this->_headerCanon == 'simple' ? OpenDKIMSign::CANON_SIMPLE : OpenDKIMSign::CANON_RELAXED; + $this->_dkimHandler = new OpenDKIMSign($this->_privateKey, $this->_selector, $this->_domainName, $headerCanon, $bodyCanon, $hash, $bodyLen); + // Hardcode signature Margin for now + $this->_dkimHandler->setMargin(78); + + if (!is_numeric($this->_signatureTimestamp)) { + OpenDKIM::setOption(OpenDKIM::OPTS_FIXEDTIME, time()); + } else { + if (!OpenDKIM::setOption(OpenDKIM::OPTS_FIXEDTIME, $this->_signatureTimestamp)) { + throw new Swift_SwiftException('Unable to force signature timestamp ['.openssl_error_string().']'); + } + } + if (isset($this->_signerIdentity)) { + $this->_dkimHandler->setSigner($this->_signerIdentity); + } + $listHeaders = $headers->listAll(); + foreach ($listHeaders as $hName) { + // Check if we need to ignore Header + if (!isset($this->_ignoredHeaders[strtolower($hName)])) { + $tmp = $headers->getAll($hName); + if ($headers->has($hName)) { + foreach ($tmp as $header) { + if ($header->getFieldBody() != '') { + $htosign = $header->toString(); + $this->_dkimHandler->header($htosign); + $this->_signedHeaders[] = $header->getFieldName(); + } + } + } + } + } + + return $this; + } + + public function startBody() + { + if (!$this->_peclLoaded) { + return parent::startBody(); + } + $this->dropFirstLF = true; + $this->_dkimHandler->eoh(); + + return $this; + } + + public function endBody() + { + if (!$this->_peclLoaded) { + return parent::endBody(); + } + $this->_dkimHandler->eom(); + + return $this; + } + + public function reset() + { + $this->_dkimHandler = null; + parent::reset(); + + return $this; + } + + /** + * Set the signature timestamp. + * + * @param int $time + * + * @return Swift_Signers_DKIMSigner + */ + public function setSignatureTimestamp($time) + { + $this->_signatureTimestamp = $time; + + return $this; + } + + /** + * Set the signature expiration timestamp. + * + * @param int $time + * + * @return Swift_Signers_DKIMSigner + */ + public function setSignatureExpiration($time) + { + $this->_signatureExpiration = $time; + + return $this; + } + + /** + * Enable / disable the DebugHeaders. + * + * @param bool $debug + * + * @return Swift_Signers_DKIMSigner + */ + public function setDebugHeaders($debug) + { + $this->_debugHeaders = (bool) $debug; + + return $this; + } + + // Protected + + protected function _canonicalizeBody($string) + { + if (!$this->_peclLoaded) { + return parent::_canonicalizeBody($string); + } + if (false && $this->dropFirstLF === true) { + if ($string[0] == "\r" && $string[1] == "\n") { + $string = substr($string, 2); + } + } + $this->dropFirstLF = false; + if (strlen($string)) { + $this->_dkimHandler->body($string); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php new file mode 100644 index 0000000000000000000000000000000000000000..80d39841cea910761689353e852e0d09a34de4f5 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php @@ -0,0 +1,436 @@ + + */ +class Swift_Signers_SMimeSigner implements Swift_Signers_BodySigner +{ + protected $signCertificate; + protected $signPrivateKey; + protected $encryptCert; + protected $signThenEncrypt = true; + protected $signLevel; + protected $encryptLevel; + protected $signOptions; + protected $encryptOptions; + protected $encryptCipher; + protected $extraCerts = null; + + /** + * @var Swift_StreamFilters_StringReplacementFilterFactory + */ + protected $replacementFactory; + + /** + * @var Swift_Mime_HeaderFactory + */ + protected $headerFactory; + + /** + * Constructor. + * + * @param string|null $signCertificate + * @param string|null $signPrivateKey + * @param string|null $encryptCertificate + */ + public function __construct($signCertificate = null, $signPrivateKey = null, $encryptCertificate = null) + { + if (null !== $signPrivateKey) { + $this->setSignCertificate($signCertificate, $signPrivateKey); + } + + if (null !== $encryptCertificate) { + $this->setEncryptCertificate($encryptCertificate); + } + + $this->replacementFactory = Swift_DependencyContainer::getInstance() + ->lookup('transport.replacementfactory'); + + $this->signOptions = PKCS7_DETACHED; + + // Supported since php5.4 + if (defined('OPENSSL_CIPHER_AES_128_CBC')) { + $this->encryptCipher = OPENSSL_CIPHER_AES_128_CBC; + } else { + $this->encryptCipher = OPENSSL_CIPHER_RC2_128; + } + } + + /** + * Returns an new Swift_Signers_SMimeSigner instance. + * + * @param string $certificate + * @param string $privateKey + * + * @return Swift_Signers_SMimeSigner + */ + public static function newInstance($certificate = null, $privateKey = null) + { + return new self($certificate, $privateKey); + } + + /** + * Set the certificate location to use for signing. + * + * @see http://www.php.net/manual/en/openssl.pkcs7.flags.php + * + * @param string $certificate + * @param string|array $privateKey If the key needs an passphrase use array('file-location', 'passphrase') instead + * @param int $signOptions Bitwise operator options for openssl_pkcs7_sign() + * @param string $extraCerts A file containing intermediate certificates needed by the signing certificate + * + * @return Swift_Signers_SMimeSigner + */ + public function setSignCertificate($certificate, $privateKey = null, $signOptions = PKCS7_DETACHED, $extraCerts = null) + { + $this->signCertificate = 'file://'.str_replace('\\', '/', realpath($certificate)); + + if (null !== $privateKey) { + if (is_array($privateKey)) { + $this->signPrivateKey = $privateKey; + $this->signPrivateKey[0] = 'file://'.str_replace('\\', '/', realpath($privateKey[0])); + } else { + $this->signPrivateKey = 'file://'.str_replace('\\', '/', realpath($privateKey)); + } + } + + $this->signOptions = $signOptions; + if (null !== $extraCerts) { + $this->extraCerts = str_replace('\\', '/', realpath($extraCerts)); + } + + return $this; + } + + /** + * Set the certificate location to use for encryption. + * + * @see http://www.php.net/manual/en/openssl.pkcs7.flags.php + * @see http://nl3.php.net/manual/en/openssl.ciphers.php + * + * @param string|array $recipientCerts Either an single X.509 certificate, or an assoc array of X.509 certificates. + * @param int $cipher + * + * @return Swift_Signers_SMimeSigner + */ + public function setEncryptCertificate($recipientCerts, $cipher = null) + { + if (is_array($recipientCerts)) { + $this->encryptCert = array(); + + foreach ($recipientCerts as $cert) { + $this->encryptCert[] = 'file://'.str_replace('\\', '/', realpath($cert)); + } + } else { + $this->encryptCert = 'file://'.str_replace('\\', '/', realpath($recipientCerts)); + } + + if (null !== $cipher) { + $this->encryptCipher = $cipher; + } + + return $this; + } + + /** + * @return string + */ + public function getSignCertificate() + { + return $this->signCertificate; + } + + /** + * @return string + */ + public function getSignPrivateKey() + { + return $this->signPrivateKey; + } + + /** + * Set perform signing before encryption. + * + * The default is to first sign the message and then encrypt. + * But some older mail clients, namely Microsoft Outlook 2000 will work when the message first encrypted. + * As this goes against the official specs, its recommended to only use 'encryption -> signing' when specifically targeting these 'broken' clients. + * + * @param bool $signThenEncrypt + * + * @return Swift_Signers_SMimeSigner + */ + public function setSignThenEncrypt($signThenEncrypt = true) + { + $this->signThenEncrypt = $signThenEncrypt; + + return $this; + } + + /** + * @return bool + */ + public function isSignThenEncrypt() + { + return $this->signThenEncrypt; + } + + /** + * Resets internal states. + * + * @return Swift_Signers_SMimeSigner + */ + public function reset() + { + return $this; + } + + /** + * Change the Swift_Message to apply the signing. + * + * @param Swift_Message $message + * + * @return Swift_Signers_SMimeSigner + */ + public function signMessage(Swift_Message $message) + { + if (null === $this->signCertificate && null === $this->encryptCert) { + return $this; + } + + // Store the message using ByteStream to a file{1} + // Remove all Children + // Sign file{1}, parse the new MIME headers and set them on the primary MimeEntity + // Set the singed-body as the new body (without boundary) + + $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); + $this->toSMimeByteStream($messageStream, $message); + $message->setEncoder(Swift_DependencyContainer::getInstance()->lookup('mime.rawcontentencoder')); + + $message->setChildren(array()); + $this->streamToMime($messageStream, $message); + } + + /** + * Return the list of header a signer might tamper. + * + * @return array + */ + public function getAlteredHeaders() + { + return array('Content-Type', 'Content-Transfer-Encoding', 'Content-Disposition'); + } + + /** + * @param Swift_InputByteStream $inputStream + * @param Swift_Message $mimeEntity + */ + protected function toSMimeByteStream(Swift_InputByteStream $inputStream, Swift_Message $message) + { + $mimeEntity = $this->createMessage($message); + $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); + + $mimeEntity->toByteStream($messageStream); + $messageStream->commit(); + + if (null !== $this->signCertificate && null !== $this->encryptCert) { + $temporaryStream = new Swift_ByteStream_TemporaryFileByteStream(); + + if ($this->signThenEncrypt) { + $this->messageStreamToSignedByteStream($messageStream, $temporaryStream); + $this->messageStreamToEncryptedByteStream($temporaryStream, $inputStream); + } else { + $this->messageStreamToEncryptedByteStream($messageStream, $temporaryStream); + $this->messageStreamToSignedByteStream($temporaryStream, $inputStream); + } + } elseif ($this->signCertificate !== null) { + $this->messageStreamToSignedByteStream($messageStream, $inputStream); + } else { + $this->messageStreamToEncryptedByteStream($messageStream, $inputStream); + } + } + + /** + * @param Swift_Message $message + * + * @return Swift_Message + */ + protected function createMessage(Swift_Message $message) + { + $mimeEntity = new Swift_Message('', $message->getBody(), $message->getContentType(), $message->getCharset()); + $mimeEntity->setChildren($message->getChildren()); + + $messageHeaders = $mimeEntity->getHeaders(); + $messageHeaders->remove('Message-ID'); + $messageHeaders->remove('Date'); + $messageHeaders->remove('Subject'); + $messageHeaders->remove('MIME-Version'); + $messageHeaders->remove('To'); + $messageHeaders->remove('From'); + + return $mimeEntity; + } + + /** + * @param Swift_FileStream $outputStream + * @param Swift_InputByteStream $inputStream + * + * @throws Swift_IoException + */ + protected function messageStreamToSignedByteStream(Swift_FileStream $outputStream, Swift_InputByteStream $inputStream) + { + $signedMessageStream = new Swift_ByteStream_TemporaryFileByteStream(); + + $args = array($outputStream->getPath(), $signedMessageStream->getPath(), $this->signCertificate, $this->signPrivateKey, array(), $this->signOptions); + if (null !== $this->extraCerts) { + $args[] = $this->extraCerts; + } + + if (!call_user_func_array('openssl_pkcs7_sign', $args)) { + throw new Swift_IoException(sprintf('Failed to sign S/Mime message. Error: "%s".', openssl_error_string())); + } + + $this->copyFromOpenSSLOutput($signedMessageStream, $inputStream); + } + + /** + * @param Swift_FileStream $outputStream + * @param Swift_InputByteStream $is + * + * @throws Swift_IoException + */ + protected function messageStreamToEncryptedByteStream(Swift_FileStream $outputStream, Swift_InputByteStream $is) + { + $encryptedMessageStream = new Swift_ByteStream_TemporaryFileByteStream(); + + if (!openssl_pkcs7_encrypt($outputStream->getPath(), $encryptedMessageStream->getPath(), $this->encryptCert, array(), 0, $this->encryptCipher)) { + throw new Swift_IoException(sprintf('Failed to encrypt S/Mime message. Error: "%s".', openssl_error_string())); + } + + $this->copyFromOpenSSLOutput($encryptedMessageStream, $is); + } + + /** + * @param Swift_OutputByteStream $fromStream + * @param Swift_InputByteStream $toStream + */ + protected function copyFromOpenSSLOutput(Swift_OutputByteStream $fromStream, Swift_InputByteStream $toStream) + { + $bufferLength = 4096; + $filteredStream = new Swift_ByteStream_TemporaryFileByteStream(); + $filteredStream->addFilter($this->replacementFactory->createFilter("\r\n", "\n"), 'CRLF to LF'); + $filteredStream->addFilter($this->replacementFactory->createFilter("\n", "\r\n"), 'LF to CRLF'); + + while (false !== ($buffer = $fromStream->read($bufferLength))) { + $filteredStream->write($buffer); + } + + $filteredStream->flushBuffers(); + + while (false !== ($buffer = $filteredStream->read($bufferLength))) { + $toStream->write($buffer); + } + + $toStream->commit(); + } + + /** + * Merges an OutputByteStream to Swift_Message. + * + * @param Swift_OutputByteStream $fromStream + * @param Swift_Message $message + */ + protected function streamToMime(Swift_OutputByteStream $fromStream, Swift_Message $message) + { + $bufferLength = 78; + $headerData = ''; + + $fromStream->setReadPointer(0); + + while (($buffer = $fromStream->read($bufferLength)) !== false) { + $headerData .= $buffer; + + if (false !== strpos($buffer, "\r\n\r\n")) { + break; + } + } + + $headersPosEnd = strpos($headerData, "\r\n\r\n"); + $headerData = trim($headerData); + $headerData = substr($headerData, 0, $headersPosEnd); + $headerLines = explode("\r\n", $headerData); + unset($headerData); + + $headers = array(); + $currentHeaderName = ''; + + foreach ($headerLines as $headerLine) { + // Line separated + if (ctype_space($headerLines[0]) || false === strpos($headerLine, ':')) { + $headers[$currentHeaderName] .= ' '.trim($headerLine); + continue; + } + + $header = explode(':', $headerLine, 2); + $currentHeaderName = strtolower($header[0]); + $headers[$currentHeaderName] = trim($header[1]); + } + + $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); + $messageStream->addFilter($this->replacementFactory->createFilter("\r\n", "\n"), 'CRLF to LF'); + $messageStream->addFilter($this->replacementFactory->createFilter("\n", "\r\n"), 'LF to CRLF'); + + $messageHeaders = $message->getHeaders(); + + // No need to check for 'application/pkcs7-mime', as this is always base64 + if ('multipart/signed;' === substr($headers['content-type'], 0, 17)) { + if (!preg_match('/boundary=("[^"]+"|(?:[^\s]+|$))/is', $headers['content-type'], $contentTypeData)) { + throw new Swift_SwiftException('Failed to find Boundary parameter'); + } + + $boundary = trim($contentTypeData['1'], '"'); + + // Skip the header and CRLF CRLF + $fromStream->setReadPointer($headersPosEnd + 4); + + while (false !== ($buffer = $fromStream->read($bufferLength))) { + $messageStream->write($buffer); + } + + $messageStream->commit(); + + $messageHeaders->remove('Content-Transfer-Encoding'); + $message->setContentType($headers['content-type']); + $message->setBoundary($boundary); + $message->setBody($messageStream); + } else { + $fromStream->setReadPointer($headersPosEnd + 4); + + if (null === $this->headerFactory) { + $this->headerFactory = Swift_DependencyContainer::getInstance()->lookup('mime.headerfactory'); + } + + $message->setContentType($headers['content-type']); + $messageHeaders->set($this->headerFactory->createTextHeader('Content-Transfer-Encoding', $headers['content-transfer-encoding'])); + $messageHeaders->set($this->headerFactory->createTextHeader('Content-Disposition', $headers['content-disposition'])); + + while (false !== ($buffer = $fromStream->read($bufferLength))) { + $messageStream->write($buffer); + } + + $messageStream->commit(); + $message->setBody($messageStream); + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php new file mode 100644 index 0000000000000000000000000000000000000000..625161140199e187ed6dee049df25281da544630 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php @@ -0,0 +1,58 @@ +createDependenciesFor('transport.smtp') + ); + + $this->setHost($host); + $this->setPort($port); + $this->setEncryption($security); + } + + /** + * Create a new SmtpTransport instance. + * + * @param string $host + * @param int $port + * @param string $security + * + * @return Swift_SmtpTransport + */ + public static function newInstance($host = 'localhost', $port = 25, $security = null) + { + return new self($host, $port, $security); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Spool.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Spool.php new file mode 100644 index 0000000000000000000000000000000000000000..c16ab4b38eb4d62ed803421880db8f3da6c0ec4d --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Spool.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Interface for spools. + * + * @author Fabien Potencier + */ +interface Swift_Spool +{ + /** + * Starts this Spool mechanism. + */ + public function start(); + + /** + * Stops this Spool mechanism. + */ + public function stop(); + + /** + * Tests if this Spool mechanism has started. + * + * @return bool + */ + public function isStarted(); + + /** + * Queues a message. + * + * @param Swift_Mime_Message $message The message to store + * + * @return bool Whether the operation has succeeded + */ + public function queueMessage(Swift_Mime_Message $message); + + /** + * Sends messages using the given transport instance. + * + * @param Swift_Transport $transport A transport instance + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int The number of sent emails + */ + public function flushQueue(Swift_Transport $transport, &$failedRecipients = null); +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php new file mode 100644 index 0000000000000000000000000000000000000000..cf9bf78fb8f74e801c2a534d1d05a67286b4316a --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Stores Messages in a queue. + * + * @author Fabien Potencier + */ +class Swift_SpoolTransport extends Swift_Transport_SpoolTransport +{ + /** + * Create a new SpoolTransport. + * + * @param Swift_Spool $spool + */ + public function __construct(Swift_Spool $spool) + { + $arguments = Swift_DependencyContainer::getInstance() + ->createDependenciesFor('transport.spool'); + + $arguments[] = $spool; + + call_user_func_array( + array($this, 'Swift_Transport_SpoolTransport::__construct'), + $arguments + ); + } + + /** + * Create a new SpoolTransport instance. + * + * @param Swift_Spool $spool + * + * @return Swift_SpoolTransport + */ + public static function newInstance(Swift_Spool $spool) + { + return new self($spool); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilter.php new file mode 100644 index 0000000000000000000000000000000000000000..362be2e8d475158ccb60ea1d74ad16910e5696a8 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilter.php @@ -0,0 +1,35 @@ +_search = $search; + $this->_index = array(); + $this->_tree = array(); + $this->_replace = array(); + $this->_repSize = array(); + + $tree = null; + $i = null; + $last_size = $size = 0; + foreach ($search as $i => $search_element) { + if ($tree !== null) { + $tree[-1] = min(count($replace) - 1, $i - 1); + $tree[-2] = $last_size; + } + $tree = &$this->_tree; + if (is_array($search_element)) { + foreach ($search_element as $k => $char) { + $this->_index[$char] = true; + if (!isset($tree[$char])) { + $tree[$char] = array(); + } + $tree = &$tree[$char]; + } + $last_size = $k + 1; + $size = max($size, $last_size); + } else { + $last_size = 1; + if (!isset($tree[$search_element])) { + $tree[$search_element] = array(); + } + $tree = &$tree[$search_element]; + $size = max($last_size, $size); + $this->_index[$search_element] = true; + } + } + if ($i !== null) { + $tree[-1] = min(count($replace) - 1, $i); + $tree[-2] = $last_size; + $this->_treeMaxLen = $size; + } + foreach ($replace as $rep) { + if (!is_array($rep)) { + $rep = array($rep); + } + $this->_replace[] = $rep; + } + for ($i = count($this->_replace) - 1; $i >= 0; --$i) { + $this->_replace[$i] = $rep = $this->filter($this->_replace[$i], $i); + $this->_repSize[$i] = count($rep); + } + } + + /** + * Returns true if based on the buffer passed more bytes should be buffered. + * + * @param array $buffer + * + * @return bool + */ + public function shouldBuffer($buffer) + { + $endOfBuffer = end($buffer); + + return isset($this->_index[$endOfBuffer]); + } + + /** + * Perform the actual replacements on $buffer and return the result. + * + * @param array $buffer + * @param int $_minReplaces + * + * @return array + */ + public function filter($buffer, $_minReplaces = -1) + { + if ($this->_treeMaxLen == 0) { + return $buffer; + } + + $newBuffer = array(); + $buf_size = count($buffer); + $last_size = 0; + for ($i = 0; $i < $buf_size; ++$i) { + $search_pos = $this->_tree; + $last_found = PHP_INT_MAX; + // We try to find if the next byte is part of a search pattern + for ($j = 0; $j <= $this->_treeMaxLen; ++$j) { + // We have a new byte for a search pattern + if (isset($buffer[$p = $i + $j]) && isset($search_pos[$buffer[$p]])) { + $search_pos = $search_pos[$buffer[$p]]; + // We have a complete pattern, save, in case we don't find a better match later + if (isset($search_pos[-1]) && $search_pos[-1] < $last_found + && $search_pos[-1] > $_minReplaces) { + $last_found = $search_pos[-1]; + $last_size = $search_pos[-2]; + } + } + // We got a complete pattern + elseif ($last_found !== PHP_INT_MAX) { + // Adding replacement datas to output buffer + $rep_size = $this->_repSize[$last_found]; + for ($j = 0; $j < $rep_size; ++$j) { + $newBuffer[] = $this->_replace[$last_found][$j]; + } + // We Move cursor forward + $i += $last_size - 1; + // Edge Case, last position in buffer + if ($i >= $buf_size) { + $newBuffer[] = $buffer[$i]; + } + + // We start the next loop + continue 2; + } else { + // this byte is not in a pattern and we haven't found another pattern + break; + } + } + // Normal byte, move it to output buffer + $newBuffer[] = $buffer[$i]; + } + + return $newBuffer; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php new file mode 100644 index 0000000000000000000000000000000000000000..f64144af2d537a61dcc09cce170f710a8e3bacf3 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php @@ -0,0 +1,70 @@ +_search = $search; + $this->_replace = $replace; + } + + /** + * Returns true if based on the buffer passed more bytes should be buffered. + * + * @param string $buffer + * + * @return bool + */ + public function shouldBuffer($buffer) + { + if ('' === $buffer) { + return false; + } + + $endOfBuffer = substr($buffer, -1); + foreach ((array) $this->_search as $needle) { + if (false !== strpos($needle, $endOfBuffer)) { + return true; + } + } + + return false; + } + + /** + * Perform the actual replacements on $buffer and return the result. + * + * @param string $buffer + * + * @return string + */ + public function filter($buffer) + { + return str_replace($this->_search, $this->_replace, $buffer); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..e98240b5bc5a56bdbd96c38553f733361c110847 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php @@ -0,0 +1,45 @@ +_filters[$search][$replace])) { + if (!isset($this->_filters[$search])) { + $this->_filters[$search] = array(); + } + + if (!isset($this->_filters[$search][$replace])) { + $this->_filters[$search][$replace] = array(); + } + + $this->_filters[$search][$replace] = new Swift_StreamFilters_StringReplacementFilter($search, $replace); + } + + return $this->_filters[$search][$replace]; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php new file mode 100644 index 0000000000000000000000000000000000000000..db3d31093ef352d0cdecd2644989154c0c2d3c2f --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php @@ -0,0 +1,29 @@ +_eventDispatcher = $dispatcher; + $this->_buffer = $buf; + $this->_lookupHostname(); + } + + /** + * Set the name of the local domain which Swift will identify itself as. + * + * This should be a fully-qualified domain name and should be truly the domain + * you're using. + * + * If your server doesn't have a domain name, use the IP in square + * brackets (i.e. [127.0.0.1]). + * + * @param string $domain + * + * @return Swift_Transport_AbstractSmtpTransport + */ + public function setLocalDomain($domain) + { + $this->_domain = $domain; + + return $this; + } + + /** + * Get the name of the domain Swift will identify as. + * + * @return string + */ + public function getLocalDomain() + { + return $this->_domain; + } + + /** + * Sets the source IP. + * + * @param string $source + */ + public function setSourceIp($source) + { + $this->_sourceIp = $source; + } + + /** + * Returns the IP used to connect to the destination. + * + * @return string + */ + public function getSourceIp() + { + return $this->_sourceIp; + } + + /** + * Start the SMTP connection. + */ + public function start() + { + if (!$this->_started) { + if ($evt = $this->_eventDispatcher->createTransportChangeEvent($this)) { + $this->_eventDispatcher->dispatchEvent($evt, 'beforeTransportStarted'); + if ($evt->bubbleCancelled()) { + return; + } + } + + try { + $this->_buffer->initialize($this->_getBufferParams()); + } catch (Swift_TransportException $e) { + $this->_throwException($e); + } + $this->_readGreeting(); + $this->_doHeloCommand(); + + if ($evt) { + $this->_eventDispatcher->dispatchEvent($evt, 'transportStarted'); + } + + $this->_started = true; + } + } + + /** + * Test if an SMTP connection has been established. + * + * @return bool + */ + public function isStarted() + { + return $this->_started; + } + + /** + * Send the given Message. + * + * Recipient/sender data will be retrieved from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * + * @param Swift_Mime_Message $message + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $sent = 0; + $failedRecipients = (array) $failedRecipients; + + if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) { + $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); + if ($evt->bubbleCancelled()) { + return 0; + } + } + + if (!$reversePath = $this->_getReversePath($message)) { + $this->_throwException(new Swift_TransportException( + 'Cannot send message without a sender address' + ) + ); + } + + $to = (array) $message->getTo(); + $cc = (array) $message->getCc(); + $tos = array_merge($to, $cc); + $bcc = (array) $message->getBcc(); + + $message->setBcc(array()); + + try { + $sent += $this->_sendTo($message, $reversePath, $tos, $failedRecipients); + $sent += $this->_sendBcc($message, $reversePath, $bcc, $failedRecipients); + } catch (Exception $e) { + $message->setBcc($bcc); + throw $e; + } + + $message->setBcc($bcc); + + if ($evt) { + if ($sent == count($to) + count($cc) + count($bcc)) { + $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); + } elseif ($sent > 0) { + $evt->setResult(Swift_Events_SendEvent::RESULT_TENTATIVE); + } else { + $evt->setResult(Swift_Events_SendEvent::RESULT_FAILED); + } + $evt->setFailedRecipients($failedRecipients); + $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + + $message->generateId(); //Make sure a new Message ID is used + + return $sent; + } + + /** + * Stop the SMTP connection. + */ + public function stop() + { + if ($this->_started) { + if ($evt = $this->_eventDispatcher->createTransportChangeEvent($this)) { + $this->_eventDispatcher->dispatchEvent($evt, 'beforeTransportStopped'); + if ($evt->bubbleCancelled()) { + return; + } + } + + try { + $this->executeCommand("QUIT\r\n", array(221)); + } catch (Swift_TransportException $e) { + } + + try { + $this->_buffer->terminate(); + + if ($evt) { + $this->_eventDispatcher->dispatchEvent($evt, 'transportStopped'); + } + } catch (Swift_TransportException $e) { + $this->_throwException($e); + } + } + $this->_started = false; + } + + /** + * Register a plugin. + * + * @param Swift_Events_EventListener $plugin + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + $this->_eventDispatcher->bindEventListener($plugin); + } + + /** + * Reset the current mail transaction. + */ + public function reset() + { + $this->executeCommand("RSET\r\n", array(250)); + } + + /** + * Get the IoBuffer where read/writes are occurring. + * + * @return Swift_Transport_IoBuffer + */ + public function getBuffer() + { + return $this->_buffer; + } + + /** + * Run a command against the buffer, expecting the given response codes. + * + * If no response codes are given, the response will not be validated. + * If codes are given, an exception will be thrown on an invalid response. + * + * @param string $command + * @param int[] $codes + * @param string[] $failures An array of failures by-reference + * + * @return string + */ + public function executeCommand($command, $codes = array(), &$failures = null) + { + $failures = (array) $failures; + $seq = $this->_buffer->write($command); + $response = $this->_getFullResponse($seq); + if ($evt = $this->_eventDispatcher->createCommandEvent($this, $command, $codes)) { + $this->_eventDispatcher->dispatchEvent($evt, 'commandSent'); + } + $this->_assertResponseCode($response, $codes); + + return $response; + } + + /** Read the opening SMTP greeting */ + protected function _readGreeting() + { + $this->_assertResponseCode($this->_getFullResponse(0), array(220)); + } + + /** Send the HELO welcome */ + protected function _doHeloCommand() + { + $this->executeCommand( + sprintf("HELO %s\r\n", $this->_domain), array(250) + ); + } + + /** Send the MAIL FROM command */ + protected function _doMailFromCommand($address) + { + $this->executeCommand( + sprintf("MAIL FROM:<%s>\r\n", $address), array(250) + ); + } + + /** Send the RCPT TO command */ + protected function _doRcptToCommand($address) + { + $this->executeCommand( + sprintf("RCPT TO:<%s>\r\n", $address), array(250, 251, 252) + ); + } + + /** Send the DATA command */ + protected function _doDataCommand() + { + $this->executeCommand("DATA\r\n", array(354)); + } + + /** Stream the contents of the message over the buffer */ + protected function _streamMessage(Swift_Mime_Message $message) + { + $this->_buffer->setWriteTranslations(array("\r\n." => "\r\n..")); + try { + $message->toByteStream($this->_buffer); + $this->_buffer->flushBuffers(); + } catch (Swift_TransportException $e) { + $this->_throwException($e); + } + $this->_buffer->setWriteTranslations(array()); + $this->executeCommand("\r\n.\r\n", array(250)); + } + + /** Determine the best-use reverse path for this message */ + protected function _getReversePath(Swift_Mime_Message $message) + { + $return = $message->getReturnPath(); + $sender = $message->getSender(); + $from = $message->getFrom(); + $path = null; + if (!empty($return)) { + $path = $return; + } elseif (!empty($sender)) { + // Don't use array_keys + reset($sender); // Reset Pointer to first pos + $path = key($sender); // Get key + } elseif (!empty($from)) { + reset($from); // Reset Pointer to first pos + $path = key($from); // Get key + } + + return $path; + } + + /** Throw a TransportException, first sending it to any listeners */ + protected function _throwException(Swift_TransportException $e) + { + if ($evt = $this->_eventDispatcher->createTransportExceptionEvent($this, $e)) { + $this->_eventDispatcher->dispatchEvent($evt, 'exceptionThrown'); + if (!$evt->bubbleCancelled()) { + throw $e; + } + } else { + throw $e; + } + } + + /** Throws an Exception if a response code is incorrect */ + protected function _assertResponseCode($response, $wanted) + { + list($code) = sscanf($response, '%3d'); + $valid = (empty($wanted) || in_array($code, $wanted)); + + if ($evt = $this->_eventDispatcher->createResponseEvent($this, $response, + $valid)) { + $this->_eventDispatcher->dispatchEvent($evt, 'responseReceived'); + } + + if (!$valid) { + $this->_throwException( + new Swift_TransportException( + 'Expected response code '.implode('/', $wanted).' but got code '. + '"'.$code.'", with message "'.$response.'"', + $code) + ); + } + } + + /** Get an entire multi-line response using its sequence number */ + protected function _getFullResponse($seq) + { + $response = ''; + try { + do { + $line = $this->_buffer->readLine($seq); + $response .= $line; + } while (null !== $line && false !== $line && ' ' != $line[3]); + } catch (Swift_TransportException $e) { + $this->_throwException($e); + } catch (Swift_IoException $e) { + $this->_throwException( + new Swift_TransportException( + $e->getMessage()) + ); + } + + return $response; + } + + /** Send an email to the given recipients from the given reverse path */ + private function _doMailTransaction($message, $reversePath, array $recipients, array &$failedRecipients) + { + $sent = 0; + $this->_doMailFromCommand($reversePath); + foreach ($recipients as $forwardPath) { + try { + $this->_doRcptToCommand($forwardPath); + ++$sent; + } catch (Swift_TransportException $e) { + $failedRecipients[] = $forwardPath; + } + } + + if ($sent != 0) { + $this->_doDataCommand(); + $this->_streamMessage($message); + } else { + $this->reset(); + } + + return $sent; + } + + /** Send a message to the given To: recipients */ + private function _sendTo(Swift_Mime_Message $message, $reversePath, array $to, array &$failedRecipients) + { + if (empty($to)) { + return 0; + } + + return $this->_doMailTransaction($message, $reversePath, array_keys($to), + $failedRecipients); + } + + /** Send a message to all Bcc: recipients */ + private function _sendBcc(Swift_Mime_Message $message, $reversePath, array $bcc, array &$failedRecipients) + { + $sent = 0; + foreach ($bcc as $forwardPath => $name) { + $message->setBcc(array($forwardPath => $name)); + $sent += $this->_doMailTransaction( + $message, $reversePath, array($forwardPath), $failedRecipients + ); + } + + return $sent; + } + + /** Try to determine the hostname of the server this is run on */ + private function _lookupHostname() + { + if (!empty($_SERVER['SERVER_NAME']) && $this->_isFqdn($_SERVER['SERVER_NAME'])) { + $this->_domain = $_SERVER['SERVER_NAME']; + } elseif (!empty($_SERVER['SERVER_ADDR'])) { + // Set the address literal tag (See RFC 5321, section: 4.1.3) + if (false === strpos($_SERVER['SERVER_ADDR'], ':')) { + $prefix = ''; // IPv4 addresses are not tagged. + } else { + $prefix = 'IPv6:'; // Adding prefix in case of IPv6. + } + + $this->_domain = sprintf('[%s%s]', $prefix, $_SERVER['SERVER_ADDR']); + } + } + + /** Determine is the $hostname is a fully-qualified name */ + private function _isFqdn($hostname) + { + // We could do a really thorough check, but there's really no point + if (false !== $dotPos = strpos($hostname, '.')) { + return ($dotPos > 0) && ($dotPos != strlen($hostname) - 1); + } + + return false; + } + + /** + * Destructor. + */ + public function __destruct() + { + try { + $this->stop(); + } catch (Exception $e) { + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php new file mode 100644 index 0000000000000000000000000000000000000000..53f721d03c6429fcd26ead9bbdc49743d2446bbc --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php @@ -0,0 +1,81 @@ +executeCommand("AUTH CRAM-MD5\r\n", array(334)); + $challenge = base64_decode(substr($challenge, 4)); + $message = base64_encode( + $username.' '.$this->_getResponse($password, $challenge) + ); + $agent->executeCommand(sprintf("%s\r\n", $message), array(235)); + + return true; + } catch (Swift_TransportException $e) { + $agent->executeCommand("RSET\r\n", array(250)); + + return false; + } + } + + /** + * Generate a CRAM-MD5 response from a server challenge. + * + * @param string $secret + * @param string $challenge + * + * @return string + */ + private function _getResponse($secret, $challenge) + { + if (strlen($secret) > 64) { + $secret = pack('H32', md5($secret)); + } + + if (strlen($secret) < 64) { + $secret = str_pad($secret, 64, chr(0)); + } + + $k_ipad = substr($secret, 0, 64) ^ str_repeat(chr(0x36), 64); + $k_opad = substr($secret, 0, 64) ^ str_repeat(chr(0x5C), 64); + + $inner = pack('H32', md5($k_ipad.$challenge)); + $digest = md5($k_opad.$inner); + + return $digest; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php new file mode 100644 index 0000000000000000000000000000000000000000..6ab6e3337e26f7543b9b62517848aa7283320191 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php @@ -0,0 +1,51 @@ +executeCommand("AUTH LOGIN\r\n", array(334)); + $agent->executeCommand(sprintf("%s\r\n", base64_encode($username)), array(334)); + $agent->executeCommand(sprintf("%s\r\n", base64_encode($password)), array(235)); + + return true; + } catch (Swift_TransportException $e) { + $agent->executeCommand("RSET\r\n", array(250)); + + return false; + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php new file mode 100644 index 0000000000000000000000000000000000000000..2c7deb19a93b543b1c59426cf425d1ab09c836c2 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php @@ -0,0 +1,727 @@ + + */ +class Swift_Transport_Esmtp_Auth_NTLMAuthenticator implements Swift_Transport_Esmtp_Authenticator +{ + const NTLMSIG = "NTLMSSP\x00"; + const DESCONST = 'KGS!@#$%'; + + /** + * Get the name of the AUTH mechanism this Authenticator handles. + * + * @return string + */ + public function getAuthKeyword() + { + return 'NTLM'; + } + + /** + * Try to authenticate the user with $username and $password. + * + * @param Swift_Transport_SmtpAgent $agent + * @param string $username + * @param string $password + * + * @return bool + */ + public function authenticate(Swift_Transport_SmtpAgent $agent, $username, $password) + { + if (!function_exists('openssl_random_pseudo_bytes') || !function_exists('openssl_encrypt')) { + throw new LogicException('The OpenSSL extension must be enabled to use the NTLM authenticator.'); + } + + if (!function_exists('bcmul')) { + throw new LogicException('The BCMath functions must be enabled to use the NTLM authenticator.'); + } + + try { + // execute AUTH command and filter out the code at the beginning + // AUTH NTLM xxxx + $response = base64_decode(substr(trim($this->sendMessage1($agent)), 4)); + + // extra parameters for our unit cases + $timestamp = func_num_args() > 3 ? func_get_arg(3) : $this->getCorrectTimestamp(bcmul(microtime(true), '1000')); + $client = func_num_args() > 4 ? func_get_arg(4) : $this->getRandomBytes(8); + + // Message 3 response + $this->sendMessage3($response, $username, $password, $timestamp, $client, $agent); + + return true; + } catch (Swift_TransportException $e) { + $agent->executeCommand("RSET\r\n", array(250)); + + return false; + } + } + + protected function si2bin($si, $bits = 32) + { + $bin = null; + if ($si >= -pow(2, $bits - 1) && ($si <= pow(2, $bits - 1))) { + // positive or zero + if ($si >= 0) { + $bin = base_convert($si, 10, 2); + // pad to $bits bit + $bin_length = strlen($bin); + if ($bin_length < $bits) { + $bin = str_repeat('0', $bits - $bin_length).$bin; + } + } else { + // negative + $si = -$si - pow(2, $bits); + $bin = base_convert($si, 10, 2); + $bin_length = strlen($bin); + if ($bin_length > $bits) { + $bin = str_repeat('1', $bits - $bin_length).$bin; + } + } + } + + return $bin; + } + + /** + * Send our auth message and returns the response. + * + * @param Swift_Transport_SmtpAgent $agent + * + * @return string SMTP Response + */ + protected function sendMessage1(Swift_Transport_SmtpAgent $agent) + { + $message = $this->createMessage1(); + + return $agent->executeCommand(sprintf("AUTH %s %s\r\n", $this->getAuthKeyword(), base64_encode($message)), array(334)); + } + + /** + * Fetch all details of our response (message 2). + * + * @param string $response + * + * @return array our response parsed + */ + protected function parseMessage2($response) + { + $responseHex = bin2hex($response); + $length = floor(hexdec(substr($responseHex, 28, 4)) / 256) * 2; + $offset = floor(hexdec(substr($responseHex, 32, 4)) / 256) * 2; + $challenge = $this->hex2bin(substr($responseHex, 48, 16)); + $context = $this->hex2bin(substr($responseHex, 64, 16)); + $targetInfoH = $this->hex2bin(substr($responseHex, 80, 16)); + $targetName = $this->hex2bin(substr($responseHex, $offset, $length)); + $offset = floor(hexdec(substr($responseHex, 88, 4)) / 256) * 2; + $targetInfoBlock = substr($responseHex, $offset); + list($domainName, $serverName, $DNSDomainName, $DNSServerName, $terminatorByte) = $this->readSubBlock($targetInfoBlock); + + return array( + $challenge, + $context, + $targetInfoH, + $targetName, + $domainName, + $serverName, + $DNSDomainName, + $DNSServerName, + $this->hex2bin($targetInfoBlock), + $terminatorByte, + ); + } + + /** + * Read the blob information in from message2. + * + * @param $block + * + * @return array + */ + protected function readSubBlock($block) + { + // remove terminatorByte cause it's always the same + $block = substr($block, 0, -8); + + $length = strlen($block); + $offset = 0; + $data = array(); + while ($offset < $length) { + $blockLength = hexdec(substr(substr($block, $offset, 8), -4)) / 256; + $offset += 8; + $data[] = $this->hex2bin(substr($block, $offset, $blockLength * 2)); + $offset += $blockLength * 2; + } + + if (count($data) == 3) { + $data[] = $data[2]; + $data[2] = ''; + } + + $data[] = $this->createByte('00'); + + return $data; + } + + /** + * Send our final message with all our data. + * + * @param string $response Message 1 response (message 2) + * @param string $username + * @param string $password + * @param string $timestamp + * @param string $client + * @param Swift_Transport_SmtpAgent $agent + * @param bool $v2 Use version2 of the protocol + * + * @return string + */ + protected function sendMessage3($response, $username, $password, $timestamp, $client, Swift_Transport_SmtpAgent $agent, $v2 = true) + { + list($domain, $username) = $this->getDomainAndUsername($username); + //$challenge, $context, $targetInfoH, $targetName, $domainName, $workstation, $DNSDomainName, $DNSServerName, $blob, $ter + list($challenge, , , , , $workstation, , , $blob) = $this->parseMessage2($response); + + if (!$v2) { + // LMv1 + $lmResponse = $this->createLMPassword($password, $challenge); + // NTLMv1 + $ntlmResponse = $this->createNTLMPassword($password, $challenge); + } else { + // LMv2 + $lmResponse = $this->createLMv2Password($password, $username, $domain, $challenge, $client); + // NTLMv2 + $ntlmResponse = $this->createNTLMv2Hash($password, $username, $domain, $challenge, $blob, $timestamp, $client); + } + + $message = $this->createMessage3($domain, $username, $workstation, $lmResponse, $ntlmResponse); + + return $agent->executeCommand(sprintf("%s\r\n", base64_encode($message)), array(235)); + } + + /** + * Create our message 1. + * + * @return string + */ + protected function createMessage1() + { + return self::NTLMSIG + .$this->createByte('01') // Message 1 +.$this->createByte('0702'); // Flags + } + + /** + * Create our message 3. + * + * @param string $domain + * @param string $username + * @param string $workstation + * @param string $lmResponse + * @param string $ntlmResponse + * + * @return string + */ + protected function createMessage3($domain, $username, $workstation, $lmResponse, $ntlmResponse) + { + // Create security buffers + $domainSec = $this->createSecurityBuffer($domain, 64); + $domainInfo = $this->readSecurityBuffer(bin2hex($domainSec)); + $userSec = $this->createSecurityBuffer($username, ($domainInfo[0] + $domainInfo[1]) / 2); + $userInfo = $this->readSecurityBuffer(bin2hex($userSec)); + $workSec = $this->createSecurityBuffer($workstation, ($userInfo[0] + $userInfo[1]) / 2); + $workInfo = $this->readSecurityBuffer(bin2hex($workSec)); + $lmSec = $this->createSecurityBuffer($lmResponse, ($workInfo[0] + $workInfo[1]) / 2, true); + $lmInfo = $this->readSecurityBuffer(bin2hex($lmSec)); + $ntlmSec = $this->createSecurityBuffer($ntlmResponse, ($lmInfo[0] + $lmInfo[1]) / 2, true); + + return self::NTLMSIG + .$this->createByte('03') // TYPE 3 message +.$lmSec // LM response header +.$ntlmSec // NTLM response header +.$domainSec // Domain header +.$userSec // User header +.$workSec // Workstation header +.$this->createByte('000000009a', 8) // session key header (empty) +.$this->createByte('01020000') // FLAGS +.$this->convertTo16bit($domain) // domain name +.$this->convertTo16bit($username) // username +.$this->convertTo16bit($workstation) // workstation +.$lmResponse + .$ntlmResponse; + } + + /** + * @param string $timestamp Epoch timestamp in microseconds + * @param string $client Random bytes + * @param string $targetInfo + * + * @return string + */ + protected function createBlob($timestamp, $client, $targetInfo) + { + return $this->createByte('0101') + .$this->createByte('00') + .$timestamp + .$client + .$this->createByte('00') + .$targetInfo + .$this->createByte('00'); + } + + /** + * Get domain and username from our username. + * + * @example DOMAIN\username + * + * @param string $name + * + * @return array + */ + protected function getDomainAndUsername($name) + { + if (strpos($name, '\\') !== false) { + return explode('\\', $name); + } + + if (false !== strpos($name, '@')) { + list($user, $domain) = explode('@', $name); + + return array($domain, $user); + } + + // no domain passed + return array('', $name); + } + + /** + * Create LMv1 response. + * + * @param string $password + * @param string $challenge + * + * @return string + */ + protected function createLMPassword($password, $challenge) + { + // FIRST PART + $password = $this->createByte(strtoupper($password), 14, false); + list($key1, $key2) = str_split($password, 7); + + $desKey1 = $this->createDesKey($key1); + $desKey2 = $this->createDesKey($key2); + + $constantDecrypt = $this->createByte($this->desEncrypt(self::DESCONST, $desKey1).$this->desEncrypt(self::DESCONST, $desKey2), 21, false); + + // SECOND PART + list($key1, $key2, $key3) = str_split($constantDecrypt, 7); + + $desKey1 = $this->createDesKey($key1); + $desKey2 = $this->createDesKey($key2); + $desKey3 = $this->createDesKey($key3); + + return $this->desEncrypt($challenge, $desKey1).$this->desEncrypt($challenge, $desKey2).$this->desEncrypt($challenge, $desKey3); + } + + /** + * Create NTLMv1 response. + * + * @param string $password + * @param string $challenge + * + * @return string + */ + protected function createNTLMPassword($password, $challenge) + { + // FIRST PART + $ntlmHash = $this->createByte($this->md4Encrypt($password), 21, false); + list($key1, $key2, $key3) = str_split($ntlmHash, 7); + + $desKey1 = $this->createDesKey($key1); + $desKey2 = $this->createDesKey($key2); + $desKey3 = $this->createDesKey($key3); + + return $this->desEncrypt($challenge, $desKey1).$this->desEncrypt($challenge, $desKey2).$this->desEncrypt($challenge, $desKey3); + } + + /** + * Convert a normal timestamp to a tenth of a microtime epoch time. + * + * @param string $time + * + * @return string + */ + protected function getCorrectTimestamp($time) + { + // Get our timestamp (tricky!) + bcscale(0); + + $time = number_format($time, 0, '.', ''); // save microtime to string + $time = bcadd($time, '11644473600000'); // add epoch time + $time = bcmul($time, 10000); // tenths of a microsecond. + + $binary = $this->si2bin($time, 64); // create 64 bit binary string + $timestamp = ''; + for ($i = 0; $i < 8; ++$i) { + $timestamp .= chr(bindec(substr($binary, -(($i + 1) * 8), 8))); + } + + return $timestamp; + } + + /** + * Create LMv2 response. + * + * @param string $password + * @param string $username + * @param string $domain + * @param string $challenge NTLM Challenge + * @param string $client Random string + * + * @return string + */ + protected function createLMv2Password($password, $username, $domain, $challenge, $client) + { + $lmPass = '00'; // by default 00 + // if $password > 15 than we can't use this method + if (strlen($password) <= 15) { + $ntlmHash = $this->md4Encrypt($password); + $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username).$domain)); + + $lmPass = bin2hex($this->md5Encrypt($ntml2Hash, $challenge.$client).$client); + } + + return $this->createByte($lmPass, 24); + } + + /** + * Create NTLMv2 response. + * + * @param string $password + * @param string $username + * @param string $domain + * @param string $challenge Hex values + * @param string $targetInfo Hex values + * @param string $timestamp + * @param string $client Random bytes + * + * @return string + * + * @see http://davenport.sourceforge.net/ntlm.html#theNtlmResponse + */ + protected function createNTLMv2Hash($password, $username, $domain, $challenge, $targetInfo, $timestamp, $client) + { + $ntlmHash = $this->md4Encrypt($password); + $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username).$domain)); + + // create blob + $blob = $this->createBlob($timestamp, $client, $targetInfo); + + $ntlmv2Response = $this->md5Encrypt($ntml2Hash, $challenge.$blob); + + return $ntlmv2Response.$blob; + } + + protected function createDesKey($key) + { + $material = array(bin2hex($key[0])); + $len = strlen($key); + for ($i = 1; $i < $len; ++$i) { + list($high, $low) = str_split(bin2hex($key[$i])); + $v = $this->castToByte(ord($key[$i - 1]) << (7 + 1 - $i) | $this->uRShift(hexdec(dechex(hexdec($high) & 0xf).dechex(hexdec($low) & 0xf)), $i)); + $material[] = str_pad(substr(dechex($v), -2), 2, '0', STR_PAD_LEFT); // cast to byte + } + $material[] = str_pad(substr(dechex($this->castToByte(ord($key[6]) << 1)), -2), 2, '0'); + + // odd parity + foreach ($material as $k => $v) { + $b = $this->castToByte(hexdec($v)); + $needsParity = (($this->uRShift($b, 7) ^ $this->uRShift($b, 6) ^ $this->uRShift($b, 5) + ^ $this->uRShift($b, 4) ^ $this->uRShift($b, 3) ^ $this->uRShift($b, 2) + ^ $this->uRShift($b, 1)) & 0x01) == 0; + + list($high, $low) = str_split($v); + if ($needsParity) { + $material[$k] = dechex(hexdec($high) | 0x0).dechex(hexdec($low) | 0x1); + } else { + $material[$k] = dechex(hexdec($high) & 0xf).dechex(hexdec($low) & 0xe); + } + } + + return $this->hex2bin(implode('', $material)); + } + + /** HELPER FUNCTIONS */ + + /** + * Create our security buffer depending on length and offset. + * + * @param string $value Value we want to put in + * @param int $offset start of value + * @param bool $is16 Do we 16bit string or not? + * + * @return string + */ + protected function createSecurityBuffer($value, $offset, $is16 = false) + { + $length = strlen(bin2hex($value)); + $length = $is16 ? $length / 2 : $length; + $length = $this->createByte(str_pad(dechex($length), 2, '0', STR_PAD_LEFT), 2); + + return $length.$length.$this->createByte(dechex($offset), 4); + } + + /** + * Read our security buffer to fetch length and offset of our value. + * + * @param string $value Securitybuffer in hex + * + * @return array array with length and offset + */ + protected function readSecurityBuffer($value) + { + $length = floor(hexdec(substr($value, 0, 4)) / 256) * 2; + $offset = floor(hexdec(substr($value, 8, 4)) / 256) * 2; + + return array($length, $offset); + } + + /** + * Cast to byte java equivalent to (byte). + * + * @param int $v + * + * @return int + */ + protected function castToByte($v) + { + return (($v + 128) % 256) - 128; + } + + /** + * Java unsigned right bitwise + * $a >>> $b. + * + * @param int $a + * @param int $b + * + * @return int + */ + protected function uRShift($a, $b) + { + if ($b == 0) { + return $a; + } + + return ($a >> $b) & ~(1 << (8 * PHP_INT_SIZE - 1) >> ($b - 1)); + } + + /** + * Right padding with 0 to certain length. + * + * @param string $input + * @param int $bytes Length of bytes + * @param bool $isHex Did we provided hex value + * + * @return string + */ + protected function createByte($input, $bytes = 4, $isHex = true) + { + if ($isHex) { + $byte = $this->hex2bin(str_pad($input, $bytes * 2, '00')); + } else { + $byte = str_pad($input, $bytes, "\x00"); + } + + return $byte; + } + + /** + * Create random bytes. + * + * @param $length + * + * @return string + */ + protected function getRandomBytes($length) + { + $bytes = openssl_random_pseudo_bytes($length, $strong); + + if (false !== $bytes && true === $strong) { + return $bytes; + } + + throw new RuntimeException('OpenSSL did not produce a secure random number.'); + } + + /** ENCRYPTION ALGORITHMS */ + + /** + * DES Encryption. + * + * @param string $value An 8-byte string + * @param string $key + * + * @return string + */ + protected function desEncrypt($value, $key) + { + // 1 == OPENSSL_RAW_DATA - but constant is only available as of PHP 5.4. + return substr(openssl_encrypt($value, 'DES-ECB', $key, 1), 0, 8); + } + + /** + * MD5 Encryption. + * + * @param string $key Encryption key + * @param string $msg Message to encrypt + * + * @return string + */ + protected function md5Encrypt($key, $msg) + { + $blocksize = 64; + if (strlen($key) > $blocksize) { + $key = pack('H*', md5($key)); + } + + $key = str_pad($key, $blocksize, "\0"); + $ipadk = $key ^ str_repeat("\x36", $blocksize); + $opadk = $key ^ str_repeat("\x5c", $blocksize); + + return pack('H*', md5($opadk.pack('H*', md5($ipadk.$msg)))); + } + + /** + * MD4 Encryption. + * + * @param string $input + * + * @return string + * + * @see http://php.net/manual/en/ref.hash.php + */ + protected function md4Encrypt($input) + { + $input = $this->convertTo16bit($input); + + return function_exists('hash') ? $this->hex2bin(hash('md4', $input)) : mhash(MHASH_MD4, $input); + } + + /** + * Convert UTF-8 to UTF-16. + * + * @param string $input + * + * @return string + */ + protected function convertTo16bit($input) + { + return iconv('UTF-8', 'UTF-16LE', $input); + } + + /** + * Hex2bin replacement for < PHP 5.4. + * + * @param string $hex + * + * @return string Binary + */ + protected function hex2bin($hex) + { + if (function_exists('hex2bin')) { + return hex2bin($hex); + } else { + return pack('H*', $hex); + } + } + + /** + * @param string $message + */ + protected function debug($message) + { + $message = bin2hex($message); + $messageId = substr($message, 16, 8); + echo substr($message, 0, 16)." NTLMSSP Signature
    \n"; + echo $messageId." Type Indicator
    \n"; + + if ($messageId == '02000000') { + $map = array( + 'Challenge', + 'Context', + 'Target Information Security Buffer', + 'Target Name Data', + 'NetBIOS Domain Name', + 'NetBIOS Server Name', + 'DNS Domain Name', + 'DNS Server Name', + 'BLOB', + 'Target Information Terminator', + ); + + $data = $this->parseMessage2($this->hex2bin($message)); + + foreach ($map as $key => $value) { + echo bin2hex($data[$key]).' - '.$data[$key].' ||| '.$value."
    \n"; + } + } elseif ($messageId == '03000000') { + $i = 0; + $data[$i++] = substr($message, 24, 16); + list($lmLength, $lmOffset) = $this->readSecurityBuffer($data[$i - 1]); + + $data[$i++] = substr($message, 40, 16); + list($ntmlLength, $ntmlOffset) = $this->readSecurityBuffer($data[$i - 1]); + + $data[$i++] = substr($message, 56, 16); + list($targetLength, $targetOffset) = $this->readSecurityBuffer($data[$i - 1]); + + $data[$i++] = substr($message, 72, 16); + list($userLength, $userOffset) = $this->readSecurityBuffer($data[$i - 1]); + + $data[$i++] = substr($message, 88, 16); + list($workLength, $workOffset) = $this->readSecurityBuffer($data[$i - 1]); + + $data[$i++] = substr($message, 104, 16); + $data[$i++] = substr($message, 120, 8); + $data[$i++] = substr($message, $targetOffset, $targetLength); + $data[$i++] = substr($message, $userOffset, $userLength); + $data[$i++] = substr($message, $workOffset, $workLength); + $data[$i++] = substr($message, $lmOffset, $lmLength); + $data[$i] = substr($message, $ntmlOffset, $ntmlLength); + + $map = array( + 'LM Response Security Buffer', + 'NTLM Response Security Buffer', + 'Target Name Security Buffer', + 'User Name Security Buffer', + 'Workstation Name Security Buffer', + 'Session Key Security Buffer', + 'Flags', + 'Target Name Data', + 'User Name Data', + 'Workstation Name Data', + 'LM Response Data', + 'NTLM Response Data', + ); + + foreach ($map as $key => $value) { + echo $data[$key].' - '.$this->hex2bin($data[$key]).' ||| '.$value."
    \n"; + } + } + + echo '

    '; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php new file mode 100644 index 0000000000000000000000000000000000000000..43219f934451af0d801c2c4a1121bd96f0a995e9 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php @@ -0,0 +1,50 @@ +executeCommand(sprintf("AUTH PLAIN %s\r\n", $message), array(235)); + + return true; + } catch (Swift_TransportException $e) { + $agent->executeCommand("RSET\r\n", array(250)); + + return false; + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/XOAuth2Authenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/XOAuth2Authenticator.php new file mode 100644 index 0000000000000000000000000000000000000000..ca35e7b83adf49b0e1b2a2529e374be44a42378e --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/XOAuth2Authenticator.php @@ -0,0 +1,70 @@ + + * $transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 587, 'tls') + * ->setAuthMode('XOAUTH2') + * ->setUsername('YOUR_EMAIL_ADDRESS') + * ->setPassword('YOUR_ACCESS_TOKEN'); + * + * + * @author xu.li + * + * @see https://developers.google.com/google-apps/gmail/xoauth2_protocol + */ +class Swift_Transport_Esmtp_Auth_XOAuth2Authenticator implements Swift_Transport_Esmtp_Authenticator +{ + /** + * Get the name of the AUTH mechanism this Authenticator handles. + * + * @return string + */ + public function getAuthKeyword() + { + return 'XOAUTH2'; + } + + /** + * Try to authenticate the user with $email and $token. + * + * @param Swift_Transport_SmtpAgent $agent + * @param string $email + * @param string $token + * + * @return bool + */ + public function authenticate(Swift_Transport_SmtpAgent $agent, $email, $token) + { + try { + $param = $this->constructXOAuth2Params($email, $token); + $agent->executeCommand('AUTH XOAUTH2 '.$param."\r\n", array(235)); + + return true; + } catch (Swift_TransportException $e) { + $agent->executeCommand("RSET\r\n", array(250)); + + return false; + } + } + + /** + * Construct the auth parameter. + * + * @see https://developers.google.com/google-apps/gmail/xoauth2_protocol#the_sasl_xoauth2_mechanism + */ + protected function constructXOAuth2Params($email, $token) + { + return base64_encode("user=$email\1auth=Bearer $token\1\1"); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..cb36133c94d594d5a7adf4f6186e11bbba16c872 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php @@ -0,0 +1,263 @@ +setAuthenticators($authenticators); + } + + /** + * Set the Authenticators which can process a login request. + * + * @param Swift_Transport_Esmtp_Authenticator[] $authenticators + */ + public function setAuthenticators(array $authenticators) + { + $this->_authenticators = $authenticators; + } + + /** + * Get the Authenticators which can process a login request. + * + * @return Swift_Transport_Esmtp_Authenticator[] + */ + public function getAuthenticators() + { + return $this->_authenticators; + } + + /** + * Set the username to authenticate with. + * + * @param string $username + */ + public function setUsername($username) + { + $this->_username = $username; + } + + /** + * Get the username to authenticate with. + * + * @return string + */ + public function getUsername() + { + return $this->_username; + } + + /** + * Set the password to authenticate with. + * + * @param string $password + */ + public function setPassword($password) + { + $this->_password = $password; + } + + /** + * Get the password to authenticate with. + * + * @return string + */ + public function getPassword() + { + return $this->_password; + } + + /** + * Set the auth mode to use to authenticate. + * + * @param string $mode + */ + public function setAuthMode($mode) + { + $this->_auth_mode = $mode; + } + + /** + * Get the auth mode to use to authenticate. + * + * @return string + */ + public function getAuthMode() + { + return $this->_auth_mode; + } + + /** + * Get the name of the ESMTP extension this handles. + * + * @return bool + */ + public function getHandledKeyword() + { + return 'AUTH'; + } + + /** + * Set the parameters which the EHLO greeting indicated. + * + * @param string[] $parameters + */ + public function setKeywordParams(array $parameters) + { + $this->_esmtpParams = $parameters; + } + + /** + * Runs immediately after a EHLO has been issued. + * + * @param Swift_Transport_SmtpAgent $agent to read/write + */ + public function afterEhlo(Swift_Transport_SmtpAgent $agent) + { + if ($this->_username) { + $count = 0; + foreach ($this->_getAuthenticatorsForAgent() as $authenticator) { + if (in_array(strtolower($authenticator->getAuthKeyword()), + array_map('strtolower', $this->_esmtpParams))) { + ++$count; + if ($authenticator->authenticate($agent, $this->_username, $this->_password)) { + return; + } + } + } + throw new Swift_TransportException( + 'Failed to authenticate on SMTP server with username "'. + $this->_username.'" using '.$count.' possible authenticators' + ); + } + } + + /** + * Not used. + */ + public function getMailParams() + { + return array(); + } + + /** + * Not used. + */ + public function getRcptParams() + { + return array(); + } + + /** + * Not used. + */ + public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = array(), &$failedRecipients = null, &$stop = false) + { + } + + /** + * Returns +1, -1 or 0 according to the rules for usort(). + * + * This method is called to ensure extensions can be execute in an appropriate order. + * + * @param string $esmtpKeyword to compare with + * + * @return int + */ + public function getPriorityOver($esmtpKeyword) + { + return 0; + } + + /** + * Returns an array of method names which are exposed to the Esmtp class. + * + * @return string[] + */ + public function exposeMixinMethods() + { + return array('setUsername', 'getUsername', 'setPassword', 'getPassword', 'setAuthMode', 'getAuthMode'); + } + + /** + * Not used. + */ + public function resetState() + { + } + + /** + * Returns the authenticator list for the given agent. + * + * @param Swift_Transport_SmtpAgent $agent + * + * @return array + */ + protected function _getAuthenticatorsForAgent() + { + if (!$mode = strtolower($this->_auth_mode)) { + return $this->_authenticators; + } + + foreach ($this->_authenticators as $authenticator) { + if (strtolower($authenticator->getAuthKeyword()) == $mode) { + return array($authenticator); + } + } + + throw new Swift_TransportException('Auth mode '.$mode.' is invalid'); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php new file mode 100644 index 0000000000000000000000000000000000000000..12a9abf81998f209c3311a59938d8069a3ee4345 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php @@ -0,0 +1,35 @@ +. + * + * @return string[] + */ + public function getMailParams(); + + /** + * Get params which are appended to RCPT TO:<>. + * + * @return string[] + */ + public function getRcptParams(); + + /** + * Runs when a command is due to be sent. + * + * @param Swift_Transport_SmtpAgent $agent to read/write + * @param string $command to send + * @param int[] $codes expected in response + * @param string[] $failedRecipients to collect failures + * @param bool $stop to be set true by-reference if the command is now sent + */ + public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = array(), &$failedRecipients = null, &$stop = false); + + /** + * Returns +1, -1 or 0 according to the rules for usort(). + * + * This method is called to ensure extensions can be execute in an appropriate order. + * + * @param string $esmtpKeyword to compare with + * + * @return int + */ + public function getPriorityOver($esmtpKeyword); + + /** + * Returns an array of method names which are exposed to the Esmtp class. + * + * @return string[] + */ + public function exposeMixinMethods(); + + /** + * Tells this handler to clear any buffers and reset its state. + */ + public function resetState(); +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php new file mode 100644 index 0000000000000000000000000000000000000000..e1f471a0ec23890f0b9c26bb096c929629d91722 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php @@ -0,0 +1,411 @@ + 'tcp', + 'host' => 'localhost', + 'port' => 25, + 'timeout' => 30, + 'blocking' => 1, + 'tls' => false, + 'type' => Swift_Transport_IoBuffer::TYPE_SOCKET, + 'stream_context_options' => array(), + ); + + /** + * Creates a new EsmtpTransport using the given I/O buffer. + * + * @param Swift_Transport_IoBuffer $buf + * @param Swift_Transport_EsmtpHandler[] $extensionHandlers + * @param Swift_Events_EventDispatcher $dispatcher + */ + public function __construct(Swift_Transport_IoBuffer $buf, array $extensionHandlers, Swift_Events_EventDispatcher $dispatcher) + { + parent::__construct($buf, $dispatcher); + $this->setExtensionHandlers($extensionHandlers); + } + + /** + * Set the host to connect to. + * + * @param string $host + * + * @return Swift_Transport_EsmtpTransport + */ + public function setHost($host) + { + $this->_params['host'] = $host; + + return $this; + } + + /** + * Get the host to connect to. + * + * @return string + */ + public function getHost() + { + return $this->_params['host']; + } + + /** + * Set the port to connect to. + * + * @param int $port + * + * @return Swift_Transport_EsmtpTransport + */ + public function setPort($port) + { + $this->_params['port'] = (int) $port; + + return $this; + } + + /** + * Get the port to connect to. + * + * @return int + */ + public function getPort() + { + return $this->_params['port']; + } + + /** + * Set the connection timeout. + * + * @param int $timeout seconds + * + * @return Swift_Transport_EsmtpTransport + */ + public function setTimeout($timeout) + { + $this->_params['timeout'] = (int) $timeout; + $this->_buffer->setParam('timeout', (int) $timeout); + + return $this; + } + + /** + * Get the connection timeout. + * + * @return int + */ + public function getTimeout() + { + return $this->_params['timeout']; + } + + /** + * Set the encryption type (tls or ssl). + * + * @param string $encryption + * + * @return Swift_Transport_EsmtpTransport + */ + public function setEncryption($encryption) + { + $encryption = strtolower($encryption); + if ('tls' == $encryption) { + $this->_params['protocol'] = 'tcp'; + $this->_params['tls'] = true; + } else { + $this->_params['protocol'] = $encryption; + $this->_params['tls'] = false; + } + + return $this; + } + + /** + * Get the encryption type. + * + * @return string + */ + public function getEncryption() + { + return $this->_params['tls'] ? 'tls' : $this->_params['protocol']; + } + + /** + * Sets the stream context options. + * + * @param array $options + * + * @return Swift_Transport_EsmtpTransport + */ + public function setStreamOptions($options) + { + $this->_params['stream_context_options'] = $options; + + return $this; + } + + /** + * Returns the stream context options. + * + * @return array + */ + public function getStreamOptions() + { + return $this->_params['stream_context_options']; + } + + /** + * Sets the source IP. + * + * @param string $source + * + * @return Swift_Transport_EsmtpTransport + */ + public function setSourceIp($source) + { + $this->_params['sourceIp'] = $source; + + return $this; + } + + /** + * Returns the IP used to connect to the destination. + * + * @return string + */ + public function getSourceIp() + { + return isset($this->_params['sourceIp']) ? $this->_params['sourceIp'] : null; + } + + /** + * Set ESMTP extension handlers. + * + * @param Swift_Transport_EsmtpHandler[] $handlers + * + * @return Swift_Transport_EsmtpTransport + */ + public function setExtensionHandlers(array $handlers) + { + $assoc = array(); + foreach ($handlers as $handler) { + $assoc[$handler->getHandledKeyword()] = $handler; + } + + @uasort($assoc, array($this, '_sortHandlers')); + $this->_handlers = $assoc; + $this->_setHandlerParams(); + + return $this; + } + + /** + * Get ESMTP extension handlers. + * + * @return Swift_Transport_EsmtpHandler[] + */ + public function getExtensionHandlers() + { + return array_values($this->_handlers); + } + + /** + * Run a command against the buffer, expecting the given response codes. + * + * If no response codes are given, the response will not be validated. + * If codes are given, an exception will be thrown on an invalid response. + * + * @param string $command + * @param int[] $codes + * @param string[] $failures An array of failures by-reference + * + * @return string + */ + public function executeCommand($command, $codes = array(), &$failures = null) + { + $failures = (array) $failures; + $stopSignal = false; + $response = null; + foreach ($this->_getActiveHandlers() as $handler) { + $response = $handler->onCommand( + $this, $command, $codes, $failures, $stopSignal + ); + if ($stopSignal) { + return $response; + } + } + + return parent::executeCommand($command, $codes, $failures); + } + + /** Mixin handling method for ESMTP handlers */ + public function __call($method, $args) + { + foreach ($this->_handlers as $handler) { + if (in_array(strtolower($method), + array_map('strtolower', (array) $handler->exposeMixinMethods()) + )) { + $return = call_user_func_array(array($handler, $method), $args); + // Allow fluid method calls + if (null === $return && substr($method, 0, 3) == 'set') { + return $this; + } else { + return $return; + } + } + } + trigger_error('Call to undefined method '.$method, E_USER_ERROR); + } + + /** Get the params to initialize the buffer */ + protected function _getBufferParams() + { + return $this->_params; + } + + /** Overridden to perform EHLO instead */ + protected function _doHeloCommand() + { + try { + $response = $this->executeCommand( + sprintf("EHLO %s\r\n", $this->_domain), array(250) + ); + } catch (Swift_TransportException $e) { + return parent::_doHeloCommand(); + } + + if ($this->_params['tls']) { + try { + $this->executeCommand("STARTTLS\r\n", array(220)); + + if (!$this->_buffer->startTLS()) { + throw new Swift_TransportException('Unable to connect with TLS encryption'); + } + + try { + $response = $this->executeCommand( + sprintf("EHLO %s\r\n", $this->_domain), array(250) + ); + } catch (Swift_TransportException $e) { + return parent::_doHeloCommand(); + } + } catch (Swift_TransportException $e) { + $this->_throwException($e); + } + } + + $this->_capabilities = $this->_getCapabilities($response); + $this->_setHandlerParams(); + foreach ($this->_getActiveHandlers() as $handler) { + $handler->afterEhlo($this); + } + } + + /** Overridden to add Extension support */ + protected function _doMailFromCommand($address) + { + $handlers = $this->_getActiveHandlers(); + $params = array(); + foreach ($handlers as $handler) { + $params = array_merge($params, (array) $handler->getMailParams()); + } + $paramStr = !empty($params) ? ' '.implode(' ', $params) : ''; + $this->executeCommand( + sprintf("MAIL FROM:<%s>%s\r\n", $address, $paramStr), array(250) + ); + } + + /** Overridden to add Extension support */ + protected function _doRcptToCommand($address) + { + $handlers = $this->_getActiveHandlers(); + $params = array(); + foreach ($handlers as $handler) { + $params = array_merge($params, (array) $handler->getRcptParams()); + } + $paramStr = !empty($params) ? ' '.implode(' ', $params) : ''; + $this->executeCommand( + sprintf("RCPT TO:<%s>%s\r\n", $address, $paramStr), array(250, 251, 252) + ); + } + + /** Determine ESMTP capabilities by function group */ + private function _getCapabilities($ehloResponse) + { + $capabilities = array(); + $ehloResponse = trim($ehloResponse); + $lines = explode("\r\n", $ehloResponse); + array_shift($lines); + foreach ($lines as $line) { + if (preg_match('/^[0-9]{3}[ -]([A-Z0-9-]+)((?:[ =].*)?)$/Di', $line, $matches)) { + $keyword = strtoupper($matches[1]); + $paramStr = strtoupper(ltrim($matches[2], ' =')); + $params = !empty($paramStr) ? explode(' ', $paramStr) : array(); + $capabilities[$keyword] = $params; + } + } + + return $capabilities; + } + + /** Set parameters which are used by each extension handler */ + private function _setHandlerParams() + { + foreach ($this->_handlers as $keyword => $handler) { + if (array_key_exists($keyword, $this->_capabilities)) { + $handler->setKeywordParams($this->_capabilities[$keyword]); + } + } + } + + /** Get ESMTP handlers which are currently ok to use */ + private function _getActiveHandlers() + { + $handlers = array(); + foreach ($this->_handlers as $keyword => $handler) { + if (array_key_exists($keyword, $this->_capabilities)) { + $handlers[] = $handler; + } + } + + return $handlers; + } + + /** Custom sort for extension handler ordering */ + private function _sortHandlers($a, $b) + { + return $a->getPriorityOver($b->getHandledKeyword()); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php new file mode 100644 index 0000000000000000000000000000000000000000..311a0f2addf2f95d741137b665d98470c83c5b56 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php @@ -0,0 +1,88 @@ +_transports); + $sent = 0; + $this->_lastUsedTransport = null; + + for ($i = 0; $i < $maxTransports + && $transport = $this->_getNextTransport(); ++$i) { + try { + if (!$transport->isStarted()) { + $transport->start(); + } + + if ($sent = $transport->send($message, $failedRecipients)) { + $this->_lastUsedTransport = $transport; + + return $sent; + } + } catch (Swift_TransportException $e) { + $this->_killCurrentTransport(); + } + } + + if (count($this->_transports) == 0) { + throw new Swift_TransportException( + 'All Transports in FailoverTransport failed, or no Transports available' + ); + } + + return $sent; + } + + protected function _getNextTransport() + { + if (!isset($this->_currentTransport)) { + $this->_currentTransport = parent::_getNextTransport(); + } + + return $this->_currentTransport; + } + + protected function _killCurrentTransport() + { + $this->_currentTransport = null; + parent::_killCurrentTransport(); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php new file mode 100644 index 0000000000000000000000000000000000000000..af97adf1f8fabde11c8ebacb3b24fba045245ded --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php @@ -0,0 +1,67 @@ +_transports = $transports; + $this->_deadTransports = array(); + } + + /** + * Get $transports to delegate to. + * + * @return Swift_Transport[] + */ + public function getTransports() + { + return array_merge($this->_transports, $this->_deadTransports); + } + + /** + * Get the Transport used in the last successful send operation. + * + * @return Swift_Transport + */ + public function getLastUsedTransport() + { + return $this->_lastUsedTransport; + } + + /** + * Test if this Transport mechanism has started. + * + * @return bool + */ + public function isStarted() + { + return count($this->_transports) > 0; + } + + /** + * Start this Transport mechanism. + */ + public function start() + { + $this->_transports = array_merge($this->_transports, $this->_deadTransports); + } + + /** + * Stop this Transport mechanism. + */ + public function stop() + { + foreach ($this->_transports as $transport) { + $transport->stop(); + } + } + + /** + * Send the given Message. + * + * Recipient/sender data will be retrieved from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * + * @param Swift_Mime_Message $message + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $maxTransports = count($this->_transports); + $sent = 0; + $this->_lastUsedTransport = null; + + for ($i = 0; $i < $maxTransports + && $transport = $this->_getNextTransport(); ++$i) { + try { + if (!$transport->isStarted()) { + $transport->start(); + } + if ($sent = $transport->send($message, $failedRecipients)) { + $this->_lastUsedTransport = $transport; + break; + } + } catch (Swift_TransportException $e) { + $this->_killCurrentTransport(); + } + } + + if (count($this->_transports) == 0) { + throw new Swift_TransportException( + 'All Transports in LoadBalancedTransport failed, or no Transports available' + ); + } + + return $sent; + } + + /** + * Register a plugin. + * + * @param Swift_Events_EventListener $plugin + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + foreach ($this->_transports as $transport) { + $transport->registerPlugin($plugin); + } + } + + /** + * Rotates the transport list around and returns the first instance. + * + * @return Swift_Transport + */ + protected function _getNextTransport() + { + if ($next = array_shift($this->_transports)) { + $this->_transports[] = $next; + } + + return $next; + } + + /** + * Tag the currently used (top of stack) transport as dead/useless. + */ + protected function _killCurrentTransport() + { + if ($transport = array_pop($this->_transports)) { + try { + $transport->stop(); + } catch (Exception $e) { + } + $this->_deadTransports[] = $transport; + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php new file mode 100644 index 0000000000000000000000000000000000000000..77489cedc68c12ecdfa28416039128aff67ef83a --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php @@ -0,0 +1,32 @@ +_invoker = $invoker; + $this->_eventDispatcher = $eventDispatcher; + } + + /** + * Not used. + */ + public function isStarted() + { + return false; + } + + /** + * Not used. + */ + public function start() + { + } + + /** + * Not used. + */ + public function stop() + { + } + + /** + * Set the additional parameters used on the mail() function. + * + * This string is formatted for sprintf() where %s is the sender address. + * + * @param string $params + * + * @return Swift_Transport_MailTransport + */ + public function setExtraParams($params) + { + $this->_extraParams = $params; + + return $this; + } + + /** + * Get the additional parameters used on the mail() function. + * + * This string is formatted for sprintf() where %s is the sender address. + * + * @return string + */ + public function getExtraParams() + { + return $this->_extraParams; + } + + /** + * Send the given Message. + * + * Recipient/sender data will be retrieved from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * + * @param Swift_Mime_Message $message + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $failedRecipients = (array) $failedRecipients; + + if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) { + $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); + if ($evt->bubbleCancelled()) { + return 0; + } + } + + $count = ( + count((array) $message->getTo()) + + count((array) $message->getCc()) + + count((array) $message->getBcc()) + ); + + $toHeader = $message->getHeaders()->get('To'); + $subjectHeader = $message->getHeaders()->get('Subject'); + + if (0 === $count) { + $this->_throwException(new Swift_TransportException('Cannot send message without a recipient')); + } + $to = $toHeader ? $toHeader->getFieldBody() : ''; + $subject = $subjectHeader ? $subjectHeader->getFieldBody() : ''; + + $reversePath = $this->_getReversePath($message); + + // Remove headers that would otherwise be duplicated + $message->getHeaders()->remove('To'); + $message->getHeaders()->remove('Subject'); + + $messageStr = $message->toString(); + + if ($toHeader) { + $message->getHeaders()->set($toHeader); + } + $message->getHeaders()->set($subjectHeader); + + // Separate headers from body + if (false !== $endHeaders = strpos($messageStr, "\r\n\r\n")) { + $headers = substr($messageStr, 0, $endHeaders)."\r\n"; //Keep last EOL + $body = substr($messageStr, $endHeaders + 4); + } else { + $headers = $messageStr."\r\n"; + $body = ''; + } + + unset($messageStr); + + if ("\r\n" != PHP_EOL) { + // Non-windows (not using SMTP) + $headers = str_replace("\r\n", PHP_EOL, $headers); + $subject = str_replace("\r\n", PHP_EOL, $subject); + $body = str_replace("\r\n", PHP_EOL, $body); + $to = str_replace("\r\n", PHP_EOL, $to); + } else { + // Windows, using SMTP + $headers = str_replace("\r\n.", "\r\n..", $headers); + $subject = str_replace("\r\n.", "\r\n..", $subject); + $body = str_replace("\r\n.", "\r\n..", $body); + $to = str_replace("\r\n.", "\r\n..", $to); + } + + if ($this->_invoker->mail($to, $subject, $body, $headers, $this->_formatExtraParams($this->_extraParams, $reversePath))) { + if ($evt) { + $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); + $evt->setFailedRecipients($failedRecipients); + $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + } else { + $failedRecipients = array_merge( + $failedRecipients, + array_keys((array) $message->getTo()), + array_keys((array) $message->getCc()), + array_keys((array) $message->getBcc()) + ); + + if ($evt) { + $evt->setResult(Swift_Events_SendEvent::RESULT_FAILED); + $evt->setFailedRecipients($failedRecipients); + $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + + $message->generateId(); + + $count = 0; + } + + return $count; + } + + /** + * Register a plugin. + * + * @param Swift_Events_EventListener $plugin + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + $this->_eventDispatcher->bindEventListener($plugin); + } + + /** Throw a TransportException, first sending it to any listeners */ + protected function _throwException(Swift_TransportException $e) + { + if ($evt = $this->_eventDispatcher->createTransportExceptionEvent($this, $e)) { + $this->_eventDispatcher->dispatchEvent($evt, 'exceptionThrown'); + if (!$evt->bubbleCancelled()) { + throw $e; + } + } else { + throw $e; + } + } + + /** Determine the best-use reverse path for this message */ + private function _getReversePath(Swift_Mime_Message $message) + { + $return = $message->getReturnPath(); + $sender = $message->getSender(); + $from = $message->getFrom(); + $path = null; + if (!empty($return)) { + $path = $return; + } elseif (!empty($sender)) { + $keys = array_keys($sender); + $path = array_shift($keys); + } elseif (!empty($from)) { + $keys = array_keys($from); + $path = array_shift($keys); + } + + return $path; + } + + /** + * Fix CVE-2016-10074 by disallowing potentially unsafe shell characters. + * + * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. + * + * @param string $string The string to be validated + * + * @return bool + */ + private function _isShellSafe($string) + { + // Future-proof + if (escapeshellcmd($string) !== $string || !in_array(escapeshellarg($string), array("'$string'", "\"$string\""))) { + return false; + } + + $length = strlen($string); + for ($i = 0; $i < $length; ++$i) { + $c = $string[$i]; + // All other characters have a special meaning in at least one common shell, including = and +. + // Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here. + // Note that this does permit non-Latin alphanumeric characters based on the current locale. + if (!ctype_alnum($c) && strpos('@_-.', $c) === false) { + return false; + } + } + + return true; + } + + /** + * Return php mail extra params to use for invoker->mail. + * + * @param $extraParams + * @param $reversePath + * + * @return string|null + */ + private function _formatExtraParams($extraParams, $reversePath) + { + if (false !== strpos($extraParams, '-f%s')) { + if (empty($reversePath) || false === $this->_isShellSafe($reversePath)) { + $extraParams = str_replace('-f%s', '', $extraParams); + } else { + $extraParams = sprintf($extraParams, $reversePath); + } + } + + return !empty($extraParams) ? $extraParams : null; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php new file mode 100644 index 0000000000000000000000000000000000000000..ad20e0e535f2562cb4bf67ec163c3044279fdf3d --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Pretends messages have been sent, but just ignores them. + * + * @author Fabien Potencier + */ +class Swift_Transport_NullTransport implements Swift_Transport +{ + /** The event dispatcher from the plugin API */ + private $_eventDispatcher; + + /** + * Constructor. + */ + public function __construct(Swift_Events_EventDispatcher $eventDispatcher) + { + $this->_eventDispatcher = $eventDispatcher; + } + + /** + * Tests if this Transport mechanism has started. + * + * @return bool + */ + public function isStarted() + { + return true; + } + + /** + * Starts this Transport mechanism. + */ + public function start() + { + } + + /** + * Stops this Transport mechanism. + */ + public function stop() + { + } + + /** + * Sends the given message. + * + * @param Swift_Mime_Message $message + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int The number of sent emails + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) { + $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); + if ($evt->bubbleCancelled()) { + return 0; + } + } + + if ($evt) { + $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); + $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + + $count = ( + count((array) $message->getTo()) + + count((array) $message->getCc()) + + count((array) $message->getBcc()) + ); + + return $count; + } + + /** + * Register a plugin. + * + * @param Swift_Events_EventListener $plugin + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + $this->_eventDispatcher->bindEventListener($plugin); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php new file mode 100644 index 0000000000000000000000000000000000000000..34ac4ce3af84bcc94b81e611967bdc5e23a9d819 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php @@ -0,0 +1,160 @@ + 30, + 'blocking' => 1, + 'command' => '/usr/sbin/sendmail -bs', + 'type' => Swift_Transport_IoBuffer::TYPE_PROCESS, + ); + + /** + * Create a new SendmailTransport with $buf for I/O. + * + * @param Swift_Transport_IoBuffer $buf + * @param Swift_Events_EventDispatcher $dispatcher + */ + public function __construct(Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher) + { + parent::__construct($buf, $dispatcher); + } + + /** + * Start the standalone SMTP session if running in -bs mode. + */ + public function start() + { + if (false !== strpos($this->getCommand(), ' -bs')) { + parent::start(); + } + } + + /** + * Set the command to invoke. + * + * If using -t mode you are strongly advised to include -oi or -i in the flags. + * For example: /usr/sbin/sendmail -oi -t + * Swift will append a -f flag if one is not present. + * + * The recommended mode is "-bs" since it is interactive and failure notifications + * are hence possible. + * + * @param string $command + * + * @return Swift_Transport_SendmailTransport + */ + public function setCommand($command) + { + $this->_params['command'] = $command; + + return $this; + } + + /** + * Get the sendmail command which will be invoked. + * + * @return string + */ + public function getCommand() + { + return $this->_params['command']; + } + + /** + * Send the given Message. + * + * Recipient/sender data will be retrieved from the Message API. + * + * The return value is the number of recipients who were accepted for delivery. + * NOTE: If using 'sendmail -t' you will not be aware of any failures until + * they bounce (i.e. send() will always return 100% success). + * + * @param Swift_Mime_Message $message + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $failedRecipients = (array) $failedRecipients; + $command = $this->getCommand(); + $buffer = $this->getBuffer(); + $count = 0; + + if (false !== strpos($command, ' -t')) { + if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) { + $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); + if ($evt->bubbleCancelled()) { + return 0; + } + } + + if (false === strpos($command, ' -f')) { + $command .= ' -f'.escapeshellarg($this->_getReversePath($message)); + } + + $buffer->initialize(array_merge($this->_params, array('command' => $command))); + + if (false === strpos($command, ' -i') && false === strpos($command, ' -oi')) { + $buffer->setWriteTranslations(array("\r\n" => "\n", "\n." => "\n..")); + } else { + $buffer->setWriteTranslations(array("\r\n" => "\n")); + } + + $count = count((array) $message->getTo()) + + count((array) $message->getCc()) + + count((array) $message->getBcc()) + ; + $message->toByteStream($buffer); + $buffer->flushBuffers(); + $buffer->setWriteTranslations(array()); + $buffer->terminate(); + + if ($evt) { + $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); + $evt->setFailedRecipients($failedRecipients); + $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + + $message->generateId(); + } elseif (false !== strpos($command, ' -bs')) { + $count = parent::send($message, $failedRecipients); + } else { + $this->_throwException(new Swift_TransportException( + 'Unsupported sendmail command flags ['.$command.']. '. + 'Must be one of "-bs" or "-t" but can include additional flags.' + )); + } + + return $count; + } + + /** Get the params to initialize the buffer */ + protected function _getBufferParams() + { + return $this->_params; + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php new file mode 100644 index 0000000000000000000000000000000000000000..4cab66bd6bf5ae8dd83f205cfef79ee5f9d58b16 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Stores Messages in a queue. + * + * @author Fabien Potencier + */ +class Swift_Transport_SpoolTransport implements Swift_Transport +{ + /** The spool instance */ + private $_spool; + + /** The event dispatcher from the plugin API */ + private $_eventDispatcher; + + /** + * Constructor. + */ + public function __construct(Swift_Events_EventDispatcher $eventDispatcher, Swift_Spool $spool = null) + { + $this->_eventDispatcher = $eventDispatcher; + $this->_spool = $spool; + } + + /** + * Sets the spool object. + * + * @param Swift_Spool $spool + * + * @return Swift_Transport_SpoolTransport + */ + public function setSpool(Swift_Spool $spool) + { + $this->_spool = $spool; + + return $this; + } + + /** + * Get the spool object. + * + * @return Swift_Spool + */ + public function getSpool() + { + return $this->_spool; + } + + /** + * Tests if this Transport mechanism has started. + * + * @return bool + */ + public function isStarted() + { + return true; + } + + /** + * Starts this Transport mechanism. + */ + public function start() + { + } + + /** + * Stops this Transport mechanism. + */ + public function stop() + { + } + + /** + * Sends the given message. + * + * @param Swift_Mime_Message $message + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int The number of sent e-mail's + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) { + $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); + if ($evt->bubbleCancelled()) { + return 0; + } + } + + $success = $this->_spool->queueMessage($message); + + if ($evt) { + $evt->setResult($success ? Swift_Events_SendEvent::RESULT_SPOOLED : Swift_Events_SendEvent::RESULT_FAILED); + $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + + return 1; + } + + /** + * Register a plugin. + * + * @param Swift_Events_EventListener $plugin + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + $this->_eventDispatcher->bindEventListener($plugin); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php new file mode 100644 index 0000000000000000000000000000000000000000..9f2fff4bfccc7cc68fcd42765e1928773c614fcd --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php @@ -0,0 +1,325 @@ +_replacementFactory = $replacementFactory; + } + + /** + * Perform any initialization needed, using the given $params. + * + * Parameters will vary depending upon the type of IoBuffer used. + * + * @param array $params + */ + public function initialize(array $params) + { + $this->_params = $params; + switch ($params['type']) { + case self::TYPE_PROCESS: + $this->_establishProcessConnection(); + break; + case self::TYPE_SOCKET: + default: + $this->_establishSocketConnection(); + break; + } + } + + /** + * Set an individual param on the buffer (e.g. switching to SSL). + * + * @param string $param + * @param mixed $value + */ + public function setParam($param, $value) + { + if (isset($this->_stream)) { + switch ($param) { + case 'timeout': + if ($this->_stream) { + stream_set_timeout($this->_stream, $value); + } + break; + + case 'blocking': + if ($this->_stream) { + stream_set_blocking($this->_stream, 1); + } + } + } + $this->_params[$param] = $value; + } + + public function startTLS() + { + return stream_socket_enable_crypto($this->_stream, true, STREAM_CRYPTO_METHOD_TLS_CLIENT); + } + + /** + * Perform any shutdown logic needed. + */ + public function terminate() + { + if (isset($this->_stream)) { + switch ($this->_params['type']) { + case self::TYPE_PROCESS: + fclose($this->_in); + fclose($this->_out); + proc_close($this->_stream); + break; + case self::TYPE_SOCKET: + default: + fclose($this->_stream); + break; + } + } + $this->_stream = null; + $this->_out = null; + $this->_in = null; + } + + /** + * Set an array of string replacements which should be made on data written + * to the buffer. + * + * This could replace LF with CRLF for example. + * + * @param string[] $replacements + */ + public function setWriteTranslations(array $replacements) + { + foreach ($this->_translations as $search => $replace) { + if (!isset($replacements[$search])) { + $this->removeFilter($search); + unset($this->_translations[$search]); + } + } + + foreach ($replacements as $search => $replace) { + if (!isset($this->_translations[$search])) { + $this->addFilter( + $this->_replacementFactory->createFilter($search, $replace), $search + ); + $this->_translations[$search] = true; + } + } + } + + /** + * Get a line of output (including any CRLF). + * + * The $sequence number comes from any writes and may or may not be used + * depending upon the implementation. + * + * @param int $sequence of last write to scan from + * + * @throws Swift_IoException + * + * @return string + */ + public function readLine($sequence) + { + if (isset($this->_out) && !feof($this->_out)) { + $line = fgets($this->_out); + if (strlen($line) == 0) { + $metas = stream_get_meta_data($this->_out); + if ($metas['timed_out']) { + throw new Swift_IoException( + 'Connection to '. + $this->_getReadConnectionDescription(). + ' Timed Out' + ); + } + } + + return $line; + } + } + + /** + * Reads $length bytes from the stream into a string and moves the pointer + * through the stream by $length. + * + * If less bytes exist than are requested the remaining bytes are given instead. + * If no bytes are remaining at all, boolean false is returned. + * + * @param int $length + * + * @throws Swift_IoException + * + * @return string|bool + */ + public function read($length) + { + if (isset($this->_out) && !feof($this->_out)) { + $ret = fread($this->_out, $length); + if (strlen($ret) == 0) { + $metas = stream_get_meta_data($this->_out); + if ($metas['timed_out']) { + throw new Swift_IoException( + 'Connection to '. + $this->_getReadConnectionDescription(). + ' Timed Out' + ); + } + } + + return $ret; + } + } + + /** Not implemented */ + public function setReadPointer($byteOffset) + { + } + + /** Flush the stream contents */ + protected function _flush() + { + if (isset($this->_in)) { + fflush($this->_in); + } + } + + /** Write this bytes to the stream */ + protected function _commit($bytes) + { + if (isset($this->_in)) { + $bytesToWrite = strlen($bytes); + $totalBytesWritten = 0; + + while ($totalBytesWritten < $bytesToWrite) { + $bytesWritten = fwrite($this->_in, substr($bytes, $totalBytesWritten)); + if (false === $bytesWritten || 0 === $bytesWritten) { + break; + } + + $totalBytesWritten += $bytesWritten; + } + + if ($totalBytesWritten > 0) { + return ++$this->_sequence; + } + } + } + + /** + * Establishes a connection to a remote server. + */ + private function _establishSocketConnection() + { + $host = $this->_params['host']; + if (!empty($this->_params['protocol'])) { + $host = $this->_params['protocol'].'://'.$host; + } + $timeout = 15; + if (!empty($this->_params['timeout'])) { + $timeout = $this->_params['timeout']; + } + $options = array(); + if (!empty($this->_params['sourceIp'])) { + $options['socket']['bindto'] = $this->_params['sourceIp'].':0'; + } + if (isset($this->_params['stream_context_options'])) { + $options = array_merge($options, $this->_params['stream_context_options']); + } + $streamContext = stream_context_create($options); + $this->_stream = @stream_socket_client($host.':'.$this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext); + if (false === $this->_stream) { + throw new Swift_TransportException( + 'Connection could not be established with host '.$this->_params['host']. + ' ['.$errstr.' #'.$errno.']' + ); + } + if (!empty($this->_params['blocking'])) { + stream_set_blocking($this->_stream, 1); + } else { + stream_set_blocking($this->_stream, 0); + } + stream_set_timeout($this->_stream, $timeout); + $this->_in = &$this->_stream; + $this->_out = &$this->_stream; + } + + /** + * Opens a process for input/output. + */ + private function _establishProcessConnection() + { + $command = $this->_params['command']; + $descriptorSpec = array( + 0 => array('pipe', 'r'), + 1 => array('pipe', 'w'), + 2 => array('pipe', 'w'), + ); + $pipes = array(); + $this->_stream = proc_open($command, $descriptorSpec, $pipes); + stream_set_blocking($pipes[2], 0); + if ($err = stream_get_contents($pipes[2])) { + throw new Swift_TransportException( + 'Process could not be started ['.$err.']' + ); + } + $this->_in = &$pipes[0]; + $this->_out = &$pipes[1]; + } + + private function _getReadConnectionDescription() + { + switch ($this->_params['type']) { + case self::TYPE_PROCESS: + return 'Process '.$this->_params['command']; + break; + + case self::TYPE_SOCKET: + default: + $host = $this->_params['host']; + if (!empty($this->_params['protocol'])) { + $host = $this->_params['protocol'].'://'.$host; + } + $host .= ':'.$this->_params['port']; + + return $host; + break; + } + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/TransportException.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/TransportException.php new file mode 100644 index 0000000000000000000000000000000000000000..4ae2412e62a94880573ee474eb34db04cf601174 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/TransportException.php @@ -0,0 +1,29 @@ + + */ +class Swift_Validate +{ + /** + * Grammar Object. + * + * @var Swift_Mime_Grammar + */ + private static $grammar = null; + + /** + * Checks if an e-mail address matches the current grammars. + * + * @param string $email + * + * @return bool + */ + public static function email($email) + { + if (self::$grammar === null) { + self::$grammar = Swift_DependencyContainer::getInstance() + ->lookup('mime.grammar'); + } + + return (bool) preg_match( + '/^'.self::$grammar->getDefinition('addr-spec').'$/D', + $email + ); + } +} diff --git a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/cache_deps.php b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/cache_deps.php new file mode 100644 index 0000000000000000000000000000000000000000..6023448e85e015546c27742e66ae9ff625de04e9 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/cache_deps.php @@ -0,0 +1,23 @@ +register('cache') + ->asAliasOf('cache.array') + + ->register('tempdir') + ->asValue('/tmp') + + ->register('cache.null') + ->asSharedInstanceOf('Swift_KeyCache_NullKeyCache') + + ->register('cache.array') + ->asSharedInstanceOf('Swift_KeyCache_ArrayKeyCache') + ->withDependencies(array('cache.inputstream')) + + ->register('cache.disk') + ->asSharedInstanceOf('Swift_KeyCache_DiskKeyCache') + ->withDependencies(array('cache.inputstream', 'tempdir')) + + ->register('cache.inputstream') + ->asNewInstanceOf('Swift_KeyCache_SimpleKeyCacheInputStream') +; diff --git a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php new file mode 100644 index 0000000000000000000000000000000000000000..64d69d2159183beb68c5112ca6ce5d4bfe80b4a1 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php @@ -0,0 +1,9 @@ +register('message.message') + ->asNewInstanceOf('Swift_Message') + + ->register('message.mimepart') + ->asNewInstanceOf('Swift_MimePart') +; diff --git a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php new file mode 100644 index 0000000000000000000000000000000000000000..d575e4f2dea949839e97d4cabae2180ece91bbdd --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php @@ -0,0 +1,123 @@ +register('properties.charset') + ->asValue('utf-8') + + ->register('mime.grammar') + ->asSharedInstanceOf('Swift_Mime_Grammar') + + ->register('mime.message') + ->asNewInstanceOf('Swift_Mime_SimpleMessage') + ->withDependencies(array( + 'mime.headerset', + 'mime.qpcontentencoder', + 'cache', + 'mime.grammar', + 'properties.charset', + )) + + ->register('mime.part') + ->asNewInstanceOf('Swift_Mime_MimePart') + ->withDependencies(array( + 'mime.headerset', + 'mime.qpcontentencoder', + 'cache', + 'mime.grammar', + 'properties.charset', + )) + + ->register('mime.attachment') + ->asNewInstanceOf('Swift_Mime_Attachment') + ->withDependencies(array( + 'mime.headerset', + 'mime.base64contentencoder', + 'cache', + 'mime.grammar', + )) + ->addConstructorValue($swift_mime_types) + + ->register('mime.embeddedfile') + ->asNewInstanceOf('Swift_Mime_EmbeddedFile') + ->withDependencies(array( + 'mime.headerset', + 'mime.base64contentencoder', + 'cache', + 'mime.grammar', + )) + ->addConstructorValue($swift_mime_types) + + ->register('mime.headerfactory') + ->asNewInstanceOf('Swift_Mime_SimpleHeaderFactory') + ->withDependencies(array( + 'mime.qpheaderencoder', + 'mime.rfc2231encoder', + 'mime.grammar', + 'properties.charset', + )) + + ->register('mime.headerset') + ->asNewInstanceOf('Swift_Mime_SimpleHeaderSet') + ->withDependencies(array('mime.headerfactory', 'properties.charset')) + + ->register('mime.qpheaderencoder') + ->asNewInstanceOf('Swift_Mime_HeaderEncoder_QpHeaderEncoder') + ->withDependencies(array('mime.charstream')) + + ->register('mime.base64headerencoder') + ->asNewInstanceOf('Swift_Mime_HeaderEncoder_Base64HeaderEncoder') + ->withDependencies(array('mime.charstream')) + + ->register('mime.charstream') + ->asNewInstanceOf('Swift_CharacterStream_NgCharacterStream') + ->withDependencies(array('mime.characterreaderfactory', 'properties.charset')) + + ->register('mime.bytecanonicalizer') + ->asSharedInstanceOf('Swift_StreamFilters_ByteArrayReplacementFilter') + ->addConstructorValue(array(array(0x0D, 0x0A), array(0x0D), array(0x0A))) + ->addConstructorValue(array(array(0x0A), array(0x0A), array(0x0D, 0x0A))) + + ->register('mime.characterreaderfactory') + ->asSharedInstanceOf('Swift_CharacterReaderFactory_SimpleCharacterReaderFactory') + + ->register('mime.safeqpcontentencoder') + ->asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder') + ->withDependencies(array('mime.charstream', 'mime.bytecanonicalizer')) + + ->register('mime.rawcontentencoder') + ->asNewInstanceOf('Swift_Mime_ContentEncoder_RawContentEncoder') + + ->register('mime.nativeqpcontentencoder') + ->withDependencies(array('properties.charset')) + ->asNewInstanceOf('Swift_Mime_ContentEncoder_NativeQpContentEncoder') + + ->register('mime.qpcontentencoderproxy') + ->asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoderProxy') + ->withDependencies(array('mime.safeqpcontentencoder', 'mime.nativeqpcontentencoder', 'properties.charset')) + + ->register('mime.7bitcontentencoder') + ->asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder') + ->addConstructorValue('7bit') + ->addConstructorValue(true) + + ->register('mime.8bitcontentencoder') + ->asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder') + ->addConstructorValue('8bit') + ->addConstructorValue(true) + + ->register('mime.base64contentencoder') + ->asSharedInstanceOf('Swift_Mime_ContentEncoder_Base64ContentEncoder') + + ->register('mime.rfc2231encoder') + ->asNewInstanceOf('Swift_Encoder_Rfc2231Encoder') + ->withDependencies(array('mime.charstream')) + + // As of PHP 5.4.7, the quoted_printable_encode() function behaves correctly. + // see https://github.com/php/php-src/commit/18bb426587d62f93c54c40bf8535eb8416603629 + ->register('mime.qpcontentencoder') + ->asAliasOf(PHP_VERSION_ID >= 50407 ? 'mime.qpcontentencoderproxy' : 'mime.safeqpcontentencoder') +; + +unset($swift_mime_types); diff --git a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php new file mode 100644 index 0000000000000000000000000000000000000000..77e432cfac0501bd4abdbf319ddfeb3f419d4418 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php @@ -0,0 +1,76 @@ +register('transport.smtp') + ->asNewInstanceOf('Swift_Transport_EsmtpTransport') + ->withDependencies(array( + 'transport.buffer', + array('transport.authhandler'), + 'transport.eventdispatcher', + )) + + ->register('transport.sendmail') + ->asNewInstanceOf('Swift_Transport_SendmailTransport') + ->withDependencies(array( + 'transport.buffer', + 'transport.eventdispatcher', + )) + + ->register('transport.mail') + ->asNewInstanceOf('Swift_Transport_MailTransport') + ->withDependencies(array('transport.mailinvoker', 'transport.eventdispatcher')) + + ->register('transport.loadbalanced') + ->asNewInstanceOf('Swift_Transport_LoadBalancedTransport') + + ->register('transport.failover') + ->asNewInstanceOf('Swift_Transport_FailoverTransport') + + ->register('transport.spool') + ->asNewInstanceOf('Swift_Transport_SpoolTransport') + ->withDependencies(array('transport.eventdispatcher')) + + ->register('transport.null') + ->asNewInstanceOf('Swift_Transport_NullTransport') + ->withDependencies(array('transport.eventdispatcher')) + + ->register('transport.mailinvoker') + ->asSharedInstanceOf('Swift_Transport_SimpleMailInvoker') + + ->register('transport.buffer') + ->asNewInstanceOf('Swift_Transport_StreamBuffer') + ->withDependencies(array('transport.replacementfactory')) + + ->register('transport.authhandler') + ->asNewInstanceOf('Swift_Transport_Esmtp_AuthHandler') + ->withDependencies(array( + array( + 'transport.crammd5auth', + 'transport.loginauth', + 'transport.plainauth', + 'transport.ntlmauth', + 'transport.xoauth2auth', + ), + )) + + ->register('transport.crammd5auth') + ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_CramMd5Authenticator') + + ->register('transport.loginauth') + ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_LoginAuthenticator') + + ->register('transport.plainauth') + ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_PlainAuthenticator') + + ->register('transport.xoauth2auth') + ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_XOAuth2Authenticator') + + ->register('transport.ntlmauth') + ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_NTLMAuthenticator') + + ->register('transport.eventdispatcher') + ->asNewInstanceOf('Swift_Events_SimpleEventDispatcher') + + ->register('transport.replacementfactory') + ->asSharedInstanceOf('Swift_StreamFilters_StringReplacementFilterFactory') +; diff --git a/vendor/swiftmailer/swiftmailer/lib/mime_types.php b/vendor/swiftmailer/swiftmailer/lib/mime_types.php new file mode 100644 index 0000000000000000000000000000000000000000..2d7b98dc1aabc1ef2b7ba5abacfe2ed0eb8f31e2 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/mime_types.php @@ -0,0 +1,1007 @@ + 'text/vnd.in3d.3dml', + '3ds' => 'image/x-3ds', + '3g2' => 'video/3gpp2', + '3gp' => 'video/3gpp', + '7z' => 'application/x-7z-compressed', + 'aab' => 'application/x-authorware-bin', + 'aac' => 'audio/x-aac', + 'aam' => 'application/x-authorware-map', + 'aas' => 'application/x-authorware-seg', + 'abw' => 'application/x-abiword', + 'ac' => 'application/pkix-attr-cert', + 'acc' => 'application/vnd.americandynamics.acc', + 'ace' => 'application/x-ace-compressed', + 'acu' => 'application/vnd.acucobol', + 'acutc' => 'application/vnd.acucorp', + 'adp' => 'audio/adpcm', + 'aep' => 'application/vnd.audiograph', + 'afm' => 'application/x-font-type1', + 'afp' => 'application/vnd.ibm.modcap', + 'ahead' => 'application/vnd.ahead.space', + 'ai' => 'application/postscript', + 'aif' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'air' => 'application/vnd.adobe.air-application-installer-package+zip', + 'ait' => 'application/vnd.dvb.ait', + 'ami' => 'application/vnd.amiga.ami', + 'apk' => 'application/vnd.android.package-archive', + 'appcache' => 'text/cache-manifest', + 'apr' => 'application/vnd.lotus-approach', + 'aps' => 'application/postscript', + 'arc' => 'application/x-freearc', + 'asc' => 'application/pgp-signature', + 'asf' => 'video/x-ms-asf', + 'asm' => 'text/x-asm', + 'aso' => 'application/vnd.accpac.simply.aso', + 'asx' => 'video/x-ms-asf', + 'atc' => 'application/vnd.acucorp', + 'atom' => 'application/atom+xml', + 'atomcat' => 'application/atomcat+xml', + 'atomsvc' => 'application/atomsvc+xml', + 'atx' => 'application/vnd.antix.game-component', + 'au' => 'audio/basic', + 'avi' => 'video/x-msvideo', + 'aw' => 'application/applixware', + 'azf' => 'application/vnd.airzip.filesecure.azf', + 'azs' => 'application/vnd.airzip.filesecure.azs', + 'azw' => 'application/vnd.amazon.ebook', + 'bat' => 'application/x-msdownload', + 'bcpio' => 'application/x-bcpio', + 'bdf' => 'application/x-font-bdf', + 'bdm' => 'application/vnd.syncml.dm+wbxml', + 'bed' => 'application/vnd.realvnc.bed', + 'bh2' => 'application/vnd.fujitsu.oasysprs', + 'bin' => 'application/octet-stream', + 'blb' => 'application/x-blorb', + 'blorb' => 'application/x-blorb', + 'bmi' => 'application/vnd.bmi', + 'bmp' => 'image/bmp', + 'book' => 'application/vnd.framemaker', + 'box' => 'application/vnd.previewsystems.box', + 'boz' => 'application/x-bzip2', + 'bpk' => 'application/octet-stream', + 'btif' => 'image/prs.btif', + 'bz' => 'application/x-bzip', + 'bz2' => 'application/x-bzip2', + 'c' => 'text/x-c', + 'c11amc' => 'application/vnd.cluetrust.cartomobile-config', + 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg', + 'c4d' => 'application/vnd.clonk.c4group', + 'c4f' => 'application/vnd.clonk.c4group', + 'c4g' => 'application/vnd.clonk.c4group', + 'c4p' => 'application/vnd.clonk.c4group', + 'c4u' => 'application/vnd.clonk.c4group', + 'cab' => 'application/vnd.ms-cab-compressed', + 'caf' => 'audio/x-caf', + 'cap' => 'application/vnd.tcpdump.pcap', + 'car' => 'application/vnd.curl.car', + 'cat' => 'application/vnd.ms-pki.seccat', + 'cb7' => 'application/x-cbr', + 'cba' => 'application/x-cbr', + 'cbr' => 'application/x-cbr', + 'cbt' => 'application/x-cbr', + 'cbz' => 'application/x-cbr', + 'cc' => 'text/x-c', + 'cct' => 'application/x-director', + 'ccxml' => 'application/ccxml+xml', + 'cdbcmsg' => 'application/vnd.contact.cmsg', + 'cdf' => 'application/x-netcdf', + 'cdkey' => 'application/vnd.mediastation.cdkey', + 'cdmia' => 'application/cdmi-capability', + 'cdmic' => 'application/cdmi-container', + 'cdmid' => 'application/cdmi-domain', + 'cdmio' => 'application/cdmi-object', + 'cdmiq' => 'application/cdmi-queue', + 'cdx' => 'chemical/x-cdx', + 'cdxml' => 'application/vnd.chemdraw+xml', + 'cdy' => 'application/vnd.cinderella', + 'cer' => 'application/pkix-cert', + 'cfs' => 'application/x-cfs-compressed', + 'cgm' => 'image/cgm', + 'chat' => 'application/x-chat', + 'chm' => 'application/vnd.ms-htmlhelp', + 'chrt' => 'application/vnd.kde.kchart', + 'cif' => 'chemical/x-cif', + 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', + 'cil' => 'application/vnd.ms-artgalry', + 'cla' => 'application/vnd.claymore', + 'class' => 'application/java-vm', + 'clkk' => 'application/vnd.crick.clicker.keyboard', + 'clkp' => 'application/vnd.crick.clicker.palette', + 'clkt' => 'application/vnd.crick.clicker.template', + 'clkw' => 'application/vnd.crick.clicker.wordbank', + 'clkx' => 'application/vnd.crick.clicker', + 'clp' => 'application/x-msclip', + 'cmc' => 'application/vnd.cosmocaller', + 'cmdf' => 'chemical/x-cmdf', + 'cml' => 'chemical/x-cml', + 'cmp' => 'application/vnd.yellowriver-custom-menu', + 'cmx' => 'image/x-cmx', + 'cod' => 'application/vnd.rim.cod', + 'com' => 'application/x-msdownload', + 'conf' => 'text/plain', + 'cpio' => 'application/x-cpio', + 'cpp' => 'text/x-c', + 'cpt' => 'application/mac-compactpro', + 'crd' => 'application/x-mscardfile', + 'crl' => 'application/pkix-crl', + 'crt' => 'application/x-x509-ca-cert', + 'csh' => 'application/x-csh', + 'csml' => 'chemical/x-csml', + 'csp' => 'application/vnd.commonspace', + 'css' => 'text/css', + 'cst' => 'application/x-director', + 'csv' => 'text/csv', + 'cu' => 'application/cu-seeme', + 'curl' => 'text/vnd.curl', + 'cww' => 'application/prs.cww', + 'cxt' => 'application/x-director', + 'cxx' => 'text/x-c', + 'dae' => 'model/vnd.collada+xml', + 'daf' => 'application/vnd.mobius.daf', + 'dart' => 'application/vnd.dart', + 'dataless' => 'application/vnd.fdsn.seed', + 'davmount' => 'application/davmount+xml', + 'dbk' => 'application/docbook+xml', + 'dcr' => 'application/x-director', + 'dcurl' => 'text/vnd.curl.dcurl', + 'dd2' => 'application/vnd.oma.dd2+xml', + 'ddd' => 'application/vnd.fujixerox.ddd', + 'deb' => 'application/x-debian-package', + 'def' => 'text/plain', + 'deploy' => 'application/octet-stream', + 'der' => 'application/x-x509-ca-cert', + 'dfac' => 'application/vnd.dreamfactory', + 'dgc' => 'application/x-dgc-compressed', + 'dic' => 'text/x-c', + 'dir' => 'application/x-director', + 'dis' => 'application/vnd.mobius.dis', + 'dist' => 'application/octet-stream', + 'distz' => 'application/octet-stream', + 'djv' => 'image/vnd.djvu', + 'djvu' => 'image/vnd.djvu', + 'dll' => 'application/x-msdownload', + 'dmg' => 'application/x-apple-diskimage', + 'dmp' => 'application/vnd.tcpdump.pcap', + 'dms' => 'application/octet-stream', + 'dna' => 'application/vnd.dna', + 'doc' => 'application/msword', + 'docm' => 'application/vnd.ms-word.document.macroenabled.12', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dot' => 'application/msword', + 'dotm' => 'application/vnd.ms-word.template.macroenabled.12', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'dp' => 'application/vnd.osgi.dp', + 'dpg' => 'application/vnd.dpgraph', + 'dra' => 'audio/vnd.dra', + 'dsc' => 'text/prs.lines.tag', + 'dssc' => 'application/dssc+der', + 'dtb' => 'application/x-dtbook+xml', + 'dtd' => 'application/xml-dtd', + 'dts' => 'audio/vnd.dts', + 'dtshd' => 'audio/vnd.dts.hd', + 'dump' => 'application/octet-stream', + 'dvb' => 'video/vnd.dvb.file', + 'dvi' => 'application/x-dvi', + 'dwf' => 'model/vnd.dwf', + 'dwg' => 'image/vnd.dwg', + 'dxf' => 'image/vnd.dxf', + 'dxp' => 'application/vnd.spotfire.dxp', + 'dxr' => 'application/x-director', + 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', + 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', + 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', + 'ecma' => 'application/ecmascript', + 'edm' => 'application/vnd.novadigm.edm', + 'edx' => 'application/vnd.novadigm.edx', + 'efif' => 'application/vnd.picsel', + 'ei6' => 'application/vnd.pg.osasli', + 'elc' => 'application/octet-stream', + 'emf' => 'application/x-msmetafile', + 'eml' => 'message/rfc822', + 'emma' => 'application/emma+xml', + 'emz' => 'application/x-msmetafile', + 'eol' => 'audio/vnd.digital-winds', + 'eot' => 'application/vnd.ms-fontobject', + 'eps' => 'application/postscript', + 'epub' => 'application/epub+zip', + 'es3' => 'application/vnd.eszigno3+xml', + 'esa' => 'application/vnd.osgi.subsystem', + 'esf' => 'application/vnd.epson.esf', + 'et3' => 'application/vnd.eszigno3+xml', + 'etx' => 'text/x-setext', + 'eva' => 'application/x-eva', + 'evy' => 'application/x-envoy', + 'exe' => 'application/x-msdownload', + 'exi' => 'application/exi', + 'ext' => 'application/vnd.novadigm.ext', + 'ez' => 'application/andrew-inset', + 'ez2' => 'application/vnd.ezpix-album', + 'ez3' => 'application/vnd.ezpix-package', + 'f' => 'text/x-fortran', + 'f4v' => 'video/x-f4v', + 'f77' => 'text/x-fortran', + 'f90' => 'text/x-fortran', + 'fbs' => 'image/vnd.fastbidsheet', + 'fcdt' => 'application/vnd.adobe.formscentral.fcdt', + 'fcs' => 'application/vnd.isac.fcs', + 'fdf' => 'application/vnd.fdf', + 'fe_launch' => 'application/vnd.denovo.fcselayout-link', + 'fg5' => 'application/vnd.fujitsu.oasysgp', + 'fgd' => 'application/x-director', + 'fh' => 'image/x-freehand', + 'fh4' => 'image/x-freehand', + 'fh5' => 'image/x-freehand', + 'fh7' => 'image/x-freehand', + 'fhc' => 'image/x-freehand', + 'fig' => 'application/x-xfig', + 'flac' => 'audio/x-flac', + 'fli' => 'video/x-fli', + 'flo' => 'application/vnd.micrografx.flo', + 'flv' => 'video/x-flv', + 'flw' => 'application/vnd.kde.kivio', + 'flx' => 'text/vnd.fmi.flexstor', + 'fly' => 'text/vnd.fly', + 'fm' => 'application/vnd.framemaker', + 'fnc' => 'application/vnd.frogans.fnc', + 'for' => 'text/x-fortran', + 'fpx' => 'image/vnd.fpx', + 'frame' => 'application/vnd.framemaker', + 'fsc' => 'application/vnd.fsc.weblaunch', + 'fst' => 'image/vnd.fst', + 'ftc' => 'application/vnd.fluxtime.clip', + 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', + 'fvt' => 'video/vnd.fvt', + 'fxp' => 'application/vnd.adobe.fxp', + 'fxpl' => 'application/vnd.adobe.fxp', + 'fzs' => 'application/vnd.fuzzysheet', + 'g2w' => 'application/vnd.geoplan', + 'g3' => 'image/g3fax', + 'g3w' => 'application/vnd.geospace', + 'gac' => 'application/vnd.groove-account', + 'gam' => 'application/x-tads', + 'gbr' => 'application/rpki-ghostbusters', + 'gca' => 'application/x-gca-compressed', + 'gdl' => 'model/vnd.gdl', + 'geo' => 'application/vnd.dynageo', + 'gex' => 'application/vnd.geometry-explorer', + 'ggb' => 'application/vnd.geogebra.file', + 'ggt' => 'application/vnd.geogebra.tool', + 'ghf' => 'application/vnd.groove-help', + 'gif' => 'image/gif', + 'gim' => 'application/vnd.groove-identity-message', + 'gml' => 'application/gml+xml', + 'gmx' => 'application/vnd.gmx', + 'gnumeric' => 'application/x-gnumeric', + 'gph' => 'application/vnd.flographit', + 'gpx' => 'application/gpx+xml', + 'gqf' => 'application/vnd.grafeq', + 'gqs' => 'application/vnd.grafeq', + 'gram' => 'application/srgs', + 'gramps' => 'application/x-gramps-xml', + 'gre' => 'application/vnd.geometry-explorer', + 'grv' => 'application/vnd.groove-injector', + 'grxml' => 'application/srgs+xml', + 'gsf' => 'application/x-font-ghostscript', + 'gtar' => 'application/x-gtar', + 'gtm' => 'application/vnd.groove-tool-message', + 'gtw' => 'model/vnd.gtw', + 'gv' => 'text/vnd.graphviz', + 'gxf' => 'application/gxf', + 'gxt' => 'application/vnd.geonext', + 'gz' => 'application/x-gzip', + 'h' => 'text/x-c', + 'h261' => 'video/h261', + 'h263' => 'video/h263', + 'h264' => 'video/h264', + 'hal' => 'application/vnd.hal+xml', + 'hbci' => 'application/vnd.hbci', + 'hdf' => 'application/x-hdf', + 'hh' => 'text/x-c', + 'hlp' => 'application/winhlp', + 'hpgl' => 'application/vnd.hp-hpgl', + 'hpid' => 'application/vnd.hp-hpid', + 'hps' => 'application/vnd.hp-hps', + 'hqx' => 'application/mac-binhex40', + 'htke' => 'application/vnd.kenameaapp', + 'htm' => 'text/html', + 'html' => 'text/html', + 'hvd' => 'application/vnd.yamaha.hv-dic', + 'hvp' => 'application/vnd.yamaha.hv-voice', + 'hvs' => 'application/vnd.yamaha.hv-script', + 'i2g' => 'application/vnd.intergeo', + 'icc' => 'application/vnd.iccprofile', + 'ice' => 'x-conference/x-cooltalk', + 'icm' => 'application/vnd.iccprofile', + 'ico' => 'image/x-icon', + 'ics' => 'text/calendar', + 'ief' => 'image/ief', + 'ifb' => 'text/calendar', + 'ifm' => 'application/vnd.shana.informed.formdata', + 'iges' => 'model/iges', + 'igl' => 'application/vnd.igloader', + 'igm' => 'application/vnd.insors.igm', + 'igs' => 'model/iges', + 'igx' => 'application/vnd.micrografx.igx', + 'iif' => 'application/vnd.shana.informed.interchange', + 'imp' => 'application/vnd.accpac.simply.imp', + 'ims' => 'application/vnd.ms-ims', + 'in' => 'text/plain', + 'ink' => 'application/inkml+xml', + 'inkml' => 'application/inkml+xml', + 'install' => 'application/x-install-instructions', + 'iota' => 'application/vnd.astraea-software.iota', + 'ipfix' => 'application/ipfix', + 'ipk' => 'application/vnd.shana.informed.package', + 'irm' => 'application/vnd.ibm.rights-management', + 'irp' => 'application/vnd.irepository.package+xml', + 'iso' => 'application/x-iso9660-image', + 'itp' => 'application/vnd.shana.informed.formtemplate', + 'ivp' => 'application/vnd.immervision-ivp', + 'ivu' => 'application/vnd.immervision-ivu', + 'jad' => 'text/vnd.sun.j2me.app-descriptor', + 'jam' => 'application/vnd.jam', + 'jar' => 'application/java-archive', + 'java' => 'text/x-java-source', + 'jisp' => 'application/vnd.jisp', + 'jlt' => 'application/vnd.hp-jlyt', + 'jnlp' => 'application/x-java-jnlp-file', + 'joda' => 'application/vnd.joost.joda-archive', + 'jpe' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'jpgm' => 'video/jpm', + 'jpgv' => 'video/jpeg', + 'jpm' => 'video/jpm', + 'js' => 'application/javascript', + 'json' => 'application/json', + 'jsonml' => 'application/jsonml+json', + 'kar' => 'audio/midi', + 'karbon' => 'application/vnd.kde.karbon', + 'kfo' => 'application/vnd.kde.kformula', + 'kia' => 'application/vnd.kidspiration', + 'kml' => 'application/vnd.google-earth.kml+xml', + 'kmz' => 'application/vnd.google-earth.kmz', + 'kne' => 'application/vnd.kinar', + 'knp' => 'application/vnd.kinar', + 'kon' => 'application/vnd.kde.kontour', + 'kpr' => 'application/vnd.kde.kpresenter', + 'kpt' => 'application/vnd.kde.kpresenter', + 'kpxx' => 'application/vnd.ds-keypoint', + 'ksp' => 'application/vnd.kde.kspread', + 'ktr' => 'application/vnd.kahootz', + 'ktx' => 'image/ktx', + 'ktz' => 'application/vnd.kahootz', + 'kwd' => 'application/vnd.kde.kword', + 'kwt' => 'application/vnd.kde.kword', + 'lasxml' => 'application/vnd.las.las+xml', + 'latex' => 'application/x-latex', + 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', + 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', + 'les' => 'application/vnd.hhe.lesson-player', + 'lha' => 'application/x-lzh-compressed', + 'link66' => 'application/vnd.route66.link66+xml', + 'list' => 'text/plain', + 'list3820' => 'application/vnd.ibm.modcap', + 'listafp' => 'application/vnd.ibm.modcap', + 'lnk' => 'application/x-ms-shortcut', + 'log' => 'text/plain', + 'lostxml' => 'application/lost+xml', + 'lrf' => 'application/octet-stream', + 'lrm' => 'application/vnd.ms-lrm', + 'ltf' => 'application/vnd.frogans.ltf', + 'lvp' => 'audio/vnd.lucent.voice', + 'lwp' => 'application/vnd.lotus-wordpro', + 'lzh' => 'application/x-lzh-compressed', + 'm13' => 'application/x-msmediaview', + 'm14' => 'application/x-msmediaview', + 'm1v' => 'video/mpeg', + 'm21' => 'application/mp21', + 'm2a' => 'audio/mpeg', + 'm2v' => 'video/mpeg', + 'm3a' => 'audio/mpeg', + 'm3u' => 'audio/x-mpegurl', + 'm3u8' => 'application/vnd.apple.mpegurl', + 'm4a' => 'audio/mp4', + 'm4u' => 'video/vnd.mpegurl', + 'm4v' => 'video/x-m4v', + 'ma' => 'application/mathematica', + 'mads' => 'application/mads+xml', + 'mag' => 'application/vnd.ecowin.chart', + 'maker' => 'application/vnd.framemaker', + 'man' => 'text/troff', + 'mar' => 'application/octet-stream', + 'mathml' => 'application/mathml+xml', + 'mb' => 'application/mathematica', + 'mbk' => 'application/vnd.mobius.mbk', + 'mbox' => 'application/mbox', + 'mc1' => 'application/vnd.medcalcdata', + 'mcd' => 'application/vnd.mcd', + 'mcurl' => 'text/vnd.curl.mcurl', + 'mdb' => 'application/x-msaccess', + 'mdi' => 'image/vnd.ms-modi', + 'me' => 'text/troff', + 'mesh' => 'model/mesh', + 'meta4' => 'application/metalink4+xml', + 'metalink' => 'application/metalink+xml', + 'mets' => 'application/mets+xml', + 'mfm' => 'application/vnd.mfmp', + 'mft' => 'application/rpki-manifest', + 'mgp' => 'application/vnd.osgeo.mapguide.package', + 'mgz' => 'application/vnd.proteus.magazine', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mie' => 'application/x-mie', + 'mif' => 'application/vnd.mif', + 'mime' => 'message/rfc822', + 'mj2' => 'video/mj2', + 'mjp2' => 'video/mj2', + 'mk3d' => 'video/x-matroska', + 'mka' => 'audio/x-matroska', + 'mks' => 'video/x-matroska', + 'mkv' => 'video/x-matroska', + 'mlp' => 'application/vnd.dolby.mlp', + 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', + 'mmf' => 'application/vnd.smaf', + 'mmr' => 'image/vnd.fujixerox.edmics-mmr', + 'mng' => 'video/x-mng', + 'mny' => 'application/x-msmoney', + 'mobi' => 'application/x-mobipocket-ebook', + 'mods' => 'application/mods+xml', + 'mov' => 'video/quicktime', + 'movie' => 'video/x-sgi-movie', + 'mp2' => 'audio/mpeg', + 'mp21' => 'application/mp21', + 'mp2a' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mp4a' => 'audio/mp4', + 'mp4s' => 'application/mp4', + 'mp4v' => 'video/mp4', + 'mpc' => 'application/vnd.mophun.certificate', + 'mpe' => 'video/mpeg', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpg4' => 'video/mp4', + 'mpga' => 'audio/mpeg', + 'mpkg' => 'application/vnd.apple.installer+xml', + 'mpm' => 'application/vnd.blueice.multipass', + 'mpn' => 'application/vnd.mophun.application', + 'mpp' => 'application/vnd.ms-project', + 'mpt' => 'application/vnd.ms-project', + 'mpy' => 'application/vnd.ibm.minipay', + 'mqy' => 'application/vnd.mobius.mqy', + 'mrc' => 'application/marc', + 'mrcx' => 'application/marcxml+xml', + 'ms' => 'text/troff', + 'mscml' => 'application/mediaservercontrol+xml', + 'mseed' => 'application/vnd.fdsn.mseed', + 'mseq' => 'application/vnd.mseq', + 'msf' => 'application/vnd.epson.msf', + 'msh' => 'model/mesh', + 'msi' => 'application/x-msdownload', + 'msl' => 'application/vnd.mobius.msl', + 'msty' => 'application/vnd.muvee.style', + 'mts' => 'model/vnd.mts', + 'mus' => 'application/vnd.musician', + 'musicxml' => 'application/vnd.recordare.musicxml+xml', + 'mvb' => 'application/x-msmediaview', + 'mwf' => 'application/vnd.mfer', + 'mxf' => 'application/mxf', + 'mxl' => 'application/vnd.recordare.musicxml', + 'mxml' => 'application/xv+xml', + 'mxs' => 'application/vnd.triscape.mxs', + 'mxu' => 'video/vnd.mpegurl', + 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', + 'n3' => 'text/n3', + 'nb' => 'application/mathematica', + 'nbp' => 'application/vnd.wolfram.player', + 'nc' => 'application/x-netcdf', + 'ncx' => 'application/x-dtbncx+xml', + 'nfo' => 'text/x-nfo', + 'ngdat' => 'application/vnd.nokia.n-gage.data', + 'nitf' => 'application/vnd.nitf', + 'nlu' => 'application/vnd.neurolanguage.nlu', + 'nml' => 'application/vnd.enliven', + 'nnd' => 'application/vnd.noblenet-directory', + 'nns' => 'application/vnd.noblenet-sealer', + 'nnw' => 'application/vnd.noblenet-web', + 'npx' => 'image/vnd.net-fpx', + 'nsc' => 'application/x-conference', + 'nsf' => 'application/vnd.lotus-notes', + 'ntf' => 'application/vnd.nitf', + 'nzb' => 'application/x-nzb', + 'oa2' => 'application/vnd.fujitsu.oasys2', + 'oa3' => 'application/vnd.fujitsu.oasys3', + 'oas' => 'application/vnd.fujitsu.oasys', + 'obd' => 'application/x-msbinder', + 'obj' => 'application/x-tgif', + 'oda' => 'application/oda', + 'odb' => 'application/vnd.oasis.opendocument.database', + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'odft' => 'application/vnd.oasis.opendocument.formula-template', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'odi' => 'application/vnd.oasis.opendocument.image', + 'odm' => 'application/vnd.oasis.opendocument.text-master', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'oga' => 'audio/ogg', + 'ogg' => 'audio/ogg', + 'ogv' => 'video/ogg', + 'ogx' => 'application/ogg', + 'omdoc' => 'application/omdoc+xml', + 'onepkg' => 'application/onenote', + 'onetmp' => 'application/onenote', + 'onetoc' => 'application/onenote', + 'onetoc2' => 'application/onenote', + 'opf' => 'application/oebps-package+xml', + 'opml' => 'text/x-opml', + 'oprc' => 'application/vnd.palm', + 'org' => 'application/vnd.lotus-organizer', + 'osf' => 'application/vnd.yamaha.openscoreformat', + 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', + 'otc' => 'application/vnd.oasis.opendocument.chart-template', + 'otf' => 'application/x-font-otf', + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + 'oth' => 'application/vnd.oasis.opendocument.text-web', + 'oti' => 'application/vnd.oasis.opendocument.image-template', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'oxps' => 'application/oxps', + 'oxt' => 'application/vnd.openofficeorg.extension', + 'p' => 'text/x-pascal', + 'p10' => 'application/pkcs10', + 'p12' => 'application/x-pkcs12', + 'p7b' => 'application/x-pkcs7-certificates', + 'p7c' => 'application/pkcs7-mime', + 'p7m' => 'application/pkcs7-mime', + 'p7r' => 'application/x-pkcs7-certreqresp', + 'p7s' => 'application/pkcs7-signature', + 'p8' => 'application/pkcs8', + 'pas' => 'text/x-pascal', + 'paw' => 'application/vnd.pawaafile', + 'pbd' => 'application/vnd.powerbuilder6', + 'pbm' => 'image/x-portable-bitmap', + 'pcap' => 'application/vnd.tcpdump.pcap', + 'pcf' => 'application/x-font-pcf', + 'pcl' => 'application/vnd.hp-pcl', + 'pclxl' => 'application/vnd.hp-pclxl', + 'pct' => 'image/x-pict', + 'pcurl' => 'application/vnd.curl.pcurl', + 'pcx' => 'image/x-pcx', + 'pdb' => 'application/vnd.palm', + 'pdf' => 'application/pdf', + 'pfa' => 'application/x-font-type1', + 'pfb' => 'application/x-font-type1', + 'pfm' => 'application/x-font-type1', + 'pfr' => 'application/font-tdpfr', + 'pfx' => 'application/x-pkcs12', + 'pgm' => 'image/x-portable-graymap', + 'pgn' => 'application/x-chess-pgn', + 'pgp' => 'application/pgp-encrypted', + 'php' => 'application/x-php', + 'php3' => 'application/x-php', + 'php4' => 'application/x-php', + 'php5' => 'application/x-php', + 'pic' => 'image/x-pict', + 'pkg' => 'application/octet-stream', + 'pki' => 'application/pkixcmp', + 'pkipath' => 'application/pkix-pkipath', + 'plb' => 'application/vnd.3gpp.pic-bw-large', + 'plc' => 'application/vnd.mobius.plc', + 'plf' => 'application/vnd.pocketlearn', + 'pls' => 'application/pls+xml', + 'pml' => 'application/vnd.ctc-posml', + 'png' => 'image/png', + 'pnm' => 'image/x-portable-anymap', + 'portpkg' => 'application/vnd.macports.portpkg', + 'pot' => 'application/vnd.ms-powerpoint', + 'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12', + 'ppd' => 'application/vnd.cups-ppd', + 'ppm' => 'image/x-portable-pixmap', + 'pps' => 'application/vnd.ms-powerpoint', + 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'pqa' => 'application/vnd.palm', + 'prc' => 'application/x-mobipocket-ebook', + 'pre' => 'application/vnd.lotus-freelance', + 'prf' => 'application/pics-rules', + 'ps' => 'application/postscript', + 'psb' => 'application/vnd.3gpp.pic-bw-small', + 'psd' => 'image/vnd.adobe.photoshop', + 'psf' => 'application/x-font-linux-psf', + 'pskcxml' => 'application/pskc+xml', + 'ptid' => 'application/vnd.pvi.ptid1', + 'pub' => 'application/x-mspublisher', + 'pvb' => 'application/vnd.3gpp.pic-bw-var', + 'pwn' => 'application/vnd.3m.post-it-notes', + 'pya' => 'audio/vnd.ms-playready.media.pya', + 'pyv' => 'video/vnd.ms-playready.media.pyv', + 'qam' => 'application/vnd.epson.quickanime', + 'qbo' => 'application/vnd.intu.qbo', + 'qfx' => 'application/vnd.intu.qfx', + 'qps' => 'application/vnd.publishare-delta-tree', + 'qt' => 'video/quicktime', + 'qwd' => 'application/vnd.quark.quarkxpress', + 'qwt' => 'application/vnd.quark.quarkxpress', + 'qxb' => 'application/vnd.quark.quarkxpress', + 'qxd' => 'application/vnd.quark.quarkxpress', + 'qxl' => 'application/vnd.quark.quarkxpress', + 'qxt' => 'application/vnd.quark.quarkxpress', + 'ra' => 'audio/x-pn-realaudio', + 'ram' => 'audio/x-pn-realaudio', + 'rar' => 'application/x-rar-compressed', + 'ras' => 'image/x-cmu-raster', + 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', + 'rdf' => 'application/rdf+xml', + 'rdz' => 'application/vnd.data-vision.rdz', + 'rep' => 'application/vnd.businessobjects', + 'res' => 'application/x-dtbresource+xml', + 'rgb' => 'image/x-rgb', + 'rif' => 'application/reginfo+xml', + 'rip' => 'audio/vnd.rip', + 'ris' => 'application/x-research-info-systems', + 'rl' => 'application/resource-lists+xml', + 'rlc' => 'image/vnd.fujixerox.edmics-rlc', + 'rld' => 'application/resource-lists-diff+xml', + 'rm' => 'application/vnd.rn-realmedia', + 'rmi' => 'audio/midi', + 'rmp' => 'audio/x-pn-realaudio-plugin', + 'rms' => 'application/vnd.jcp.javame.midlet-rms', + 'rmvb' => 'application/vnd.rn-realmedia-vbr', + 'rnc' => 'application/relax-ng-compact-syntax', + 'roa' => 'application/rpki-roa', + 'roff' => 'text/troff', + 'rp9' => 'application/vnd.cloanto.rp9', + 'rpss' => 'application/vnd.nokia.radio-presets', + 'rpst' => 'application/vnd.nokia.radio-preset', + 'rq' => 'application/sparql-query', + 'rs' => 'application/rls-services+xml', + 'rsd' => 'application/rsd+xml', + 'rss' => 'application/rss+xml', + 'rtf' => 'application/rtf', + 'rtx' => 'text/richtext', + 's' => 'text/x-asm', + 's3m' => 'audio/s3m', + 'saf' => 'application/vnd.yamaha.smaf-audio', + 'sbml' => 'application/sbml+xml', + 'sc' => 'application/vnd.ibm.secure-container', + 'scd' => 'application/x-msschedule', + 'scm' => 'application/vnd.lotus-screencam', + 'scq' => 'application/scvp-cv-request', + 'scs' => 'application/scvp-cv-response', + 'scurl' => 'text/vnd.curl.scurl', + 'sda' => 'application/vnd.stardivision.draw', + 'sdc' => 'application/vnd.stardivision.calc', + 'sdd' => 'application/vnd.stardivision.impress', + 'sdkd' => 'application/vnd.solent.sdkm+xml', + 'sdkm' => 'application/vnd.solent.sdkm+xml', + 'sdp' => 'application/sdp', + 'sdw' => 'application/vnd.stardivision.writer', + 'see' => 'application/vnd.seemail', + 'seed' => 'application/vnd.fdsn.seed', + 'sema' => 'application/vnd.sema', + 'semd' => 'application/vnd.semd', + 'semf' => 'application/vnd.semf', + 'ser' => 'application/java-serialized-object', + 'setpay' => 'application/set-payment-initiation', + 'setreg' => 'application/set-registration-initiation', + 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', + 'sfs' => 'application/vnd.spotfire.sfs', + 'sfv' => 'text/x-sfv', + 'sgi' => 'image/sgi', + 'sgl' => 'application/vnd.stardivision.writer-global', + 'sgm' => 'text/sgml', + 'sgml' => 'text/sgml', + 'sh' => 'application/x-sh', + 'shar' => 'application/x-shar', + 'shf' => 'application/shf+xml', + 'sid' => 'image/x-mrsid-image', + 'sig' => 'application/pgp-signature', + 'sil' => 'audio/silk', + 'silo' => 'model/mesh', + 'sis' => 'application/vnd.symbian.install', + 'sisx' => 'application/vnd.symbian.install', + 'sit' => 'application/x-stuffit', + 'sitx' => 'application/x-stuffitx', + 'skd' => 'application/vnd.koan', + 'skm' => 'application/vnd.koan', + 'skp' => 'application/vnd.koan', + 'skt' => 'application/vnd.koan', + 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'slt' => 'application/vnd.epson.salt', + 'sm' => 'application/vnd.stepmania.stepchart', + 'smf' => 'application/vnd.stardivision.math', + 'smi' => 'application/smil+xml', + 'smil' => 'application/smil+xml', + 'smv' => 'video/x-smv', + 'smzip' => 'application/vnd.stepmania.package', + 'snd' => 'audio/basic', + 'snf' => 'application/x-font-snf', + 'so' => 'application/octet-stream', + 'spc' => 'application/x-pkcs7-certificates', + 'spf' => 'application/vnd.yamaha.smaf-phrase', + 'spl' => 'application/x-futuresplash', + 'spot' => 'text/vnd.in3d.spot', + 'spp' => 'application/scvp-vp-response', + 'spq' => 'application/scvp-vp-request', + 'spx' => 'audio/ogg', + 'sql' => 'application/x-sql', + 'src' => 'application/x-wais-source', + 'srt' => 'application/x-subrip', + 'sru' => 'application/sru+xml', + 'srx' => 'application/sparql-results+xml', + 'ssdl' => 'application/ssdl+xml', + 'sse' => 'application/vnd.kodak-descriptor', + 'ssf' => 'application/vnd.epson.ssf', + 'ssml' => 'application/ssml+xml', + 'st' => 'application/vnd.sailingtracker.track', + 'stc' => 'application/vnd.sun.xml.calc.template', + 'std' => 'application/vnd.sun.xml.draw.template', + 'stf' => 'application/vnd.wt.stf', + 'sti' => 'application/vnd.sun.xml.impress.template', + 'stk' => 'application/hyperstudio', + 'stl' => 'application/vnd.ms-pki.stl', + 'str' => 'application/vnd.pg.format', + 'stw' => 'application/vnd.sun.xml.writer.template', + 'sub' => 'text/vnd.dvb.subtitle', + 'sus' => 'application/vnd.sus-calendar', + 'susp' => 'application/vnd.sus-calendar', + 'sv4cpio' => 'application/x-sv4cpio', + 'sv4crc' => 'application/x-sv4crc', + 'svc' => 'application/vnd.dvb.service', + 'svd' => 'application/vnd.svd', + 'svg' => 'image/svg+xml', + 'svgz' => 'image/svg+xml', + 'swa' => 'application/x-director', + 'swf' => 'application/x-shockwave-flash', + 'swi' => 'application/vnd.aristanetworks.swi', + 'sxc' => 'application/vnd.sun.xml.calc', + 'sxd' => 'application/vnd.sun.xml.draw', + 'sxg' => 'application/vnd.sun.xml.writer.global', + 'sxi' => 'application/vnd.sun.xml.impress', + 'sxm' => 'application/vnd.sun.xml.math', + 'sxw' => 'application/vnd.sun.xml.writer', + 't' => 'text/troff', + 't3' => 'application/x-t3vm-image', + 'taglet' => 'application/vnd.mynfc', + 'tao' => 'application/vnd.tao.intent-module-archive', + 'tar' => 'application/x-tar', + 'tcap' => 'application/vnd.3gpp2.tcap', + 'tcl' => 'application/x-tcl', + 'teacher' => 'application/vnd.smart.teacher', + 'tei' => 'application/tei+xml', + 'teicorpus' => 'application/tei+xml', + 'tex' => 'application/x-tex', + 'texi' => 'application/x-texinfo', + 'texinfo' => 'application/x-texinfo', + 'text' => 'text/plain', + 'tfi' => 'application/thraud+xml', + 'tfm' => 'application/x-tex-tfm', + 'tga' => 'image/x-tga', + 'thmx' => 'application/vnd.ms-officetheme', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'tmo' => 'application/vnd.tmobile-livetv', + 'torrent' => 'application/x-bittorrent', + 'tpl' => 'application/vnd.groove-tool-template', + 'tpt' => 'application/vnd.trid.tpt', + 'tr' => 'text/troff', + 'tra' => 'application/vnd.trueapp', + 'trm' => 'application/x-msterminal', + 'tsd' => 'application/timestamped-data', + 'tsv' => 'text/tab-separated-values', + 'ttc' => 'application/x-font-ttf', + 'ttf' => 'application/x-font-ttf', + 'ttl' => 'text/turtle', + 'twd' => 'application/vnd.simtech-mindmapper', + 'twds' => 'application/vnd.simtech-mindmapper', + 'txd' => 'application/vnd.genomatix.tuxedo', + 'txf' => 'application/vnd.mobius.txf', + 'txt' => 'text/plain', + 'u32' => 'application/x-authorware-bin', + 'udeb' => 'application/x-debian-package', + 'ufd' => 'application/vnd.ufdl', + 'ufdl' => 'application/vnd.ufdl', + 'ulx' => 'application/x-glulx', + 'umj' => 'application/vnd.umajin', + 'unityweb' => 'application/vnd.unity', + 'uoml' => 'application/vnd.uoml+xml', + 'uri' => 'text/uri-list', + 'uris' => 'text/uri-list', + 'urls' => 'text/uri-list', + 'ustar' => 'application/x-ustar', + 'utz' => 'application/vnd.uiq.theme', + 'uu' => 'text/x-uuencode', + 'uva' => 'audio/vnd.dece.audio', + 'uvd' => 'application/vnd.dece.data', + 'uvf' => 'application/vnd.dece.data', + 'uvg' => 'image/vnd.dece.graphic', + 'uvh' => 'video/vnd.dece.hd', + 'uvi' => 'image/vnd.dece.graphic', + 'uvm' => 'video/vnd.dece.mobile', + 'uvp' => 'video/vnd.dece.pd', + 'uvs' => 'video/vnd.dece.sd', + 'uvt' => 'application/vnd.dece.ttml+xml', + 'uvu' => 'video/vnd.uvvu.mp4', + 'uvv' => 'video/vnd.dece.video', + 'uvva' => 'audio/vnd.dece.audio', + 'uvvd' => 'application/vnd.dece.data', + 'uvvf' => 'application/vnd.dece.data', + 'uvvg' => 'image/vnd.dece.graphic', + 'uvvh' => 'video/vnd.dece.hd', + 'uvvi' => 'image/vnd.dece.graphic', + 'uvvm' => 'video/vnd.dece.mobile', + 'uvvp' => 'video/vnd.dece.pd', + 'uvvs' => 'video/vnd.dece.sd', + 'uvvt' => 'application/vnd.dece.ttml+xml', + 'uvvu' => 'video/vnd.uvvu.mp4', + 'uvvv' => 'video/vnd.dece.video', + 'uvvx' => 'application/vnd.dece.unspecified', + 'uvvz' => 'application/vnd.dece.zip', + 'uvx' => 'application/vnd.dece.unspecified', + 'uvz' => 'application/vnd.dece.zip', + 'vcard' => 'text/vcard', + 'vcd' => 'application/x-cdlink', + 'vcf' => 'text/x-vcard', + 'vcg' => 'application/vnd.groove-vcard', + 'vcs' => 'text/x-vcalendar', + 'vcx' => 'application/vnd.vcx', + 'vis' => 'application/vnd.visionary', + 'viv' => 'video/vnd.vivo', + 'vob' => 'video/x-ms-vob', + 'vor' => 'application/vnd.stardivision.writer', + 'vox' => 'application/x-authorware-bin', + 'vrml' => 'model/vrml', + 'vsd' => 'application/vnd.visio', + 'vsf' => 'application/vnd.vsf', + 'vss' => 'application/vnd.visio', + 'vst' => 'application/vnd.visio', + 'vsw' => 'application/vnd.visio', + 'vtu' => 'model/vnd.vtu', + 'vxml' => 'application/voicexml+xml', + 'w3d' => 'application/x-director', + 'wad' => 'application/x-doom', + 'wav' => 'audio/x-wav', + 'wax' => 'audio/x-ms-wax', + 'wbmp' => 'image/vnd.wap.wbmp', + 'wbs' => 'application/vnd.criticaltools.wbs+xml', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wcm' => 'application/vnd.ms-works', + 'wdb' => 'application/vnd.ms-works', + 'wdp' => 'image/vnd.ms-photo', + 'weba' => 'audio/webm', + 'webm' => 'video/webm', + 'webp' => 'image/webp', + 'wg' => 'application/vnd.pmi.widget', + 'wgt' => 'application/widget', + 'wks' => 'application/vnd.ms-works', + 'wm' => 'video/x-ms-wm', + 'wma' => 'audio/x-ms-wma', + 'wmd' => 'application/x-ms-wmd', + 'wmf' => 'application/x-msmetafile', + 'wml' => 'text/vnd.wap.wml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'wmls' => 'text/vnd.wap.wmlscript', + 'wmlsc' => 'application/vnd.wap.wmlscriptc', + 'wmv' => 'video/x-ms-wmv', + 'wmx' => 'video/x-ms-wmx', + 'wmz' => 'application/x-msmetafile', + 'woff' => 'application/font-woff', + 'wpd' => 'application/vnd.wordperfect', + 'wpl' => 'application/vnd.ms-wpl', + 'wps' => 'application/vnd.ms-works', + 'wqd' => 'application/vnd.wqd', + 'wri' => 'application/x-mswrite', + 'wrl' => 'model/vrml', + 'wsdl' => 'application/wsdl+xml', + 'wspolicy' => 'application/wspolicy+xml', + 'wtb' => 'application/vnd.webturbo', + 'wvx' => 'video/x-ms-wvx', + 'x32' => 'application/x-authorware-bin', + 'x3d' => 'model/x3d+xml', + 'x3db' => 'model/x3d+binary', + 'x3dbz' => 'model/x3d+binary', + 'x3dv' => 'model/x3d+vrml', + 'x3dvz' => 'model/x3d+vrml', + 'x3dz' => 'model/x3d+xml', + 'xaml' => 'application/xaml+xml', + 'xap' => 'application/x-silverlight-app', + 'xar' => 'application/vnd.xara', + 'xbap' => 'application/x-ms-xbap', + 'xbd' => 'application/vnd.fujixerox.docuworks.binder', + 'xbm' => 'image/x-xbitmap', + 'xdf' => 'application/xcap-diff+xml', + 'xdm' => 'application/vnd.syncml.dm+xml', + 'xdp' => 'application/vnd.adobe.xdp+xml', + 'xdssc' => 'application/dssc+xml', + 'xdw' => 'application/vnd.fujixerox.docuworks', + 'xenc' => 'application/xenc+xml', + 'xer' => 'application/patch-ops-error+xml', + 'xfdf' => 'application/vnd.adobe.xfdf', + 'xfdl' => 'application/vnd.xfdl', + 'xht' => 'application/xhtml+xml', + 'xhtml' => 'application/xhtml+xml', + 'xhvml' => 'application/xv+xml', + 'xif' => 'image/vnd.xiff', + 'xla' => 'application/vnd.ms-excel', + 'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12', + 'xlc' => 'application/vnd.ms-excel', + 'xlf' => 'application/x-xliff+xml', + 'xlm' => 'application/vnd.ms-excel', + 'xls' => 'application/vnd.ms-excel', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12', + 'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xlt' => 'application/vnd.ms-excel', + 'xltm' => 'application/vnd.ms-excel.template.macroenabled.12', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'xlw' => 'application/vnd.ms-excel', + 'xm' => 'audio/xm', + 'xml' => 'application/xml', + 'xo' => 'application/vnd.olpc-sugar', + 'xop' => 'application/xop+xml', + 'xpi' => 'application/x-xpinstall', + 'xpl' => 'application/xproc+xml', + 'xpm' => 'image/x-xpixmap', + 'xpr' => 'application/vnd.is-xpr', + 'xps' => 'application/vnd.ms-xpsdocument', + 'xpw' => 'application/vnd.intercon.formnet', + 'xpx' => 'application/vnd.intercon.formnet', + 'xsl' => 'application/xml', + 'xslt' => 'application/xslt+xml', + 'xsm' => 'application/vnd.syncml+xml', + 'xspf' => 'application/xspf+xml', + 'xul' => 'application/vnd.mozilla.xul+xml', + 'xvm' => 'application/xv+xml', + 'xvml' => 'application/xv+xml', + 'xwd' => 'image/x-xwindowdump', + 'xyz' => 'chemical/x-xyz', + 'xz' => 'application/x-xz', + 'yang' => 'application/yang', + 'yin' => 'application/yin+xml', + 'z1' => 'application/x-zmachine', + 'z2' => 'application/x-zmachine', + 'z3' => 'application/x-zmachine', + 'z4' => 'application/x-zmachine', + 'z5' => 'application/x-zmachine', + 'z6' => 'application/x-zmachine', + 'z7' => 'application/x-zmachine', + 'z8' => 'application/x-zmachine', + 'zaz' => 'application/vnd.zzazz.deck+xml', + 'zip' => 'application/zip', + 'zir' => 'application/vnd.zul', + 'zirz' => 'application/vnd.zul', + 'zmm' => 'application/vnd.handheld-entertainment+xml', + '123' => 'application/vnd.lotus-1-2-3', +); diff --git a/vendor/swiftmailer/swiftmailer/lib/preferences.php b/vendor/swiftmailer/swiftmailer/lib/preferences.php new file mode 100644 index 0000000000000000000000000000000000000000..0b430e67de3913501ffabe706e634d41695a31b9 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/preferences.php @@ -0,0 +1,25 @@ +setCharset('utf-8'); + +// Without these lines the default caching mechanism is "array" but this uses a lot of memory. +// If possible, use a disk cache to enable attaching large attachments etc. +// You can override the default temporary directory by setting the TMPDIR environment variable. +if (@is_writable($tmpDir = sys_get_temp_dir())) { + $preferences->setTempDir($tmpDir)->setCacheType('disk'); +} + +// this should only be done when Swiftmailer won't use the native QP content encoder +// see mime_deps.php +if (PHP_VERSION_ID < 50407) { + $preferences->setQPDotEscape(false); +} diff --git a/vendor/swiftmailer/swiftmailer/lib/swift_init.php b/vendor/swiftmailer/swiftmailer/lib/swift_init.php new file mode 100644 index 0000000000000000000000000000000000000000..ff7196344b58a676e20e86f0dc9812427847ad3a --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/lib/swift_init.php @@ -0,0 +1,28 @@ + 'application/x-php', + 'php3' => 'application/x-php', + 'php4' => 'application/x-php', + 'php5' => 'application/x-php', + 'zip' => 'application/zip', + 'gif' => 'image/gif', + 'png' => 'image/png', + 'css' => 'text/css', + 'js' => 'text/javascript', + 'txt' => 'text/plain', + 'aif' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'avi' => 'video/avi', + 'bmp' => 'image/bmp', + 'bz2' => 'application/x-bz2', + 'csv' => 'text/csv', + 'dmg' => 'application/x-apple-diskimage', + 'doc' => 'application/msword', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'eml' => 'message/rfc822', + 'aps' => 'application/postscript', + 'exe' => 'application/x-ms-dos-executable', + 'flv' => 'video/x-flv', + 'gz' => 'application/x-gzip', + 'hqx' => 'application/stuffit', + 'htm' => 'text/html', + 'html' => 'text/html', + 'jar' => 'application/x-java-archive', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'm3u' => 'audio/x-mpegurl', + 'm4a' => 'audio/mp4', + 'mdb' => 'application/x-msaccess', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mov' => 'video/quicktime', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'odg' => 'vnd.oasis.opendocument.graphics', + 'odp' => 'vnd.oasis.opendocument.presentation', + 'odt' => 'vnd.oasis.opendocument.text', + 'ods' => 'vnd.oasis.opendocument.spreadsheet', + 'ogg' => 'audio/ogg', + 'pdf' => 'application/pdf', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'ps' => 'application/postscript', + 'rar' => 'application/x-rar-compressed', + 'rtf' => 'application/rtf', + 'tar' => 'application/x-tar', + 'sit' => 'application/x-stuffit', + 'svg' => 'image/svg+xml', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'ttf' => 'application/x-font-truetype', + 'vcf' => 'text/x-vcard', + 'wav' => 'audio/wav', + 'wma' => 'audio/x-ms-wma', + 'wmv' => 'audio/x-ms-wmv', + 'xls' => 'application/excel', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xml' => 'application/xml', + ); + + // wrap array for generating file + foreach ($valid_mime_types_preset as $extension => $mime_type) { + // generate array for mimetype to extension resolver (only first match) + $valid_mime_types[$extension] = "'{$extension}' => '{$mime_type}'"; + } + + // collect extensions + $valid_extensions = array(); + + // all extensions from second match + foreach ($matches[2] as $i => $extensions) { + // explode multiple extensions from string + $extensions = explode(' ', strtolower($extensions)); + + // force array for foreach + if (!is_array($extensions)) { + $extensions = array($extensions); + } + + foreach ($extensions as $extension) { + // get mime type + $mime_type = $matches[1][$i]; + + // check if string length lower than 10 + if (strlen($extension) < 10) { + // add extension + $valid_extensions[] = $extension; + + if (!isset($valid_mime_types[$mime_type])) { + // generate array for mimetype to extension resolver (only first match) + $valid_mime_types[$extension] = "'{$extension}' => '{$mime_type}'"; + } + } + } + } + } + + $xml = simplexml_load_string($mime_xml); + + foreach ($xml as $node) { + // check if there is no pattern + if (!isset($node->glob['pattern'])) { + continue; + } + + // get all matching extensions from match + foreach ((array) $node->glob['pattern'] as $extension) { + // skip none glob extensions + if (strpos($extension, '.') === false) { + continue; + } + + // remove get only last part + $extension = explode('.', strtolower($extension)); + $extension = end($extension); + + // maximum length in database column + if (strlen($extension) <= 9) { + $valid_extensions[] = $extension; + } + } + + if (isset($node->glob['pattern'][0])) { + // mime type + $mime_type = strtolower((string) $node['type']); + + // get first extension + $extension = strtolower(trim($node->glob['ddpattern'][0], '*.')); + + // skip none glob extensions and check if string length between 1 and 10 + if (strpos($extension, '.') !== false || strlen($extension) < 1 || strlen($extension) > 9) { + continue; + } + + // check if string length lower than 10 + if (!isset($valid_mime_types[$mime_type])) { + // generate array for mimetype to extension resolver (only first match) + $valid_mime_types[$extension] = "'{$extension}' => '{$mime_type}'"; + } + } + } + + // full list of valid extensions only + $valid_mime_types = array_unique($valid_mime_types); + ksort($valid_mime_types); + + // combine mime types and extensions array + $output = "$preamble\$swift_mime_types = array(\n ".implode($valid_mime_types, ",\n ")."\n);"; + + // write mime_types.php config file + @file_put_contents('./mime_types.php', $output); +} + +generateUpToDateMimeArray(); diff --git a/vendor/swiftmailer/swiftmailer/phpunit.xml.dist b/vendor/swiftmailer/swiftmailer/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..606c5b4495a128ed63f728c96cd6a45b5fc1faf0 --- /dev/null +++ b/vendor/swiftmailer/swiftmailer/phpunit.xml.dist @@ -0,0 +1,39 @@ + + + + + + + + + + + + tests/unit + + + tests/acceptance + + + tests/bug + + + tests/smoke + + + + + + + + diff --git a/vendor/symfony/monolog-bundle/.travis.yml b/vendor/symfony/monolog-bundle/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..f4d2e4d0722fa2a716d9912eb745eac896dfc9d2 --- /dev/null +++ b/vendor/symfony/monolog-bundle/.travis.yml @@ -0,0 +1,40 @@ +sudo: false + +language: php + +cache: + directories: + - $HOME/.composer/cache/files + +php: + - 5.3 + - 5.4 + - 5.5 + - 7.0 + - hhvm + +matrix: + fast_finish: true + include: + - php: 5.3 + env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak + # Test against Symfony LTS versions + - php: 5.6 + env: SYMFONY_VERSION="2.7.*" + - php: 5.6 + env: SYMFONY_VERSION="2.8.*" DEPENDENCIES=dev + # Test against dev versions + - php: 5.6 + env: DEPENDENCIES=dev + allow_failures: + - env: DEPENDENCIES=dev + +before_install: + - composer self-update + - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; + - if [ "$SYMFONY_VERSION" != "" ]; then composer require --dev --no-update symfony/symfony:"$SYMFONY_VERSION"; fi + +install: + - composer update $COMPOSER_FLAGS + +script: phpunit -v --coverage-text diff --git a/vendor/symfony/monolog-bundle/CHANGELOG.md b/vendor/symfony/monolog-bundle/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..b373039bd1ae9add8d9c44efc718aa22923e6001 --- /dev/null +++ b/vendor/symfony/monolog-bundle/CHANGELOG.md @@ -0,0 +1,19 @@ +## 3.0.3 (2017-01-10) + +* Fixed deprecation notices when using Symfony 3.3+ and PHP7+ + +## 3.0.2 (2017-01-03) + +* Revert disabling DebugHandler in CLI environments +* Update configuration for slack handlers for Monolog 1.22 new options +* Revert the removal of the DebugHandlerPass (needed for Symfony <3.2) + +## 3.0.1 (2016-11-15) + +* Removed obsolete code (DebugHandlerPass) + +## 3.0.0 (2016-11-06) + +* Removed class parameters for the container configuration +* Bumped minimum version of supported Symfony version to 2.7 +* Removed `NotFoundActivationStrategy` (the bundle now uses the class from MonologBridge) diff --git a/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/AddProcessorsPass.php b/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/AddProcessorsPass.php new file mode 100644 index 0000000000000000000000000000000000000000..21b51a939c14a8a5e774d759fc0e53a05a21bd40 --- /dev/null +++ b/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/AddProcessorsPass.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\MonologBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Registers processors in Monolog loggers or handlers. + * + * @author Christophe Coevoet + */ +class AddProcessorsPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('monolog.logger')) { + return; + } + + foreach ($container->findTaggedServiceIds('monolog.processor') as $id => $tags) { + foreach ($tags as $tag) { + if (!empty($tag['channel']) && !empty($tag['handler'])) { + throw new \InvalidArgumentException(sprintf('you cannot specify both the "handler" and "channel" attributes for the "monolog.processor" tag on service "%s"', $id)); + } + + if (!empty($tag['handler'])) { + $definition = $container->findDefinition(sprintf('monolog.handler.%s', $tag['handler'])); + } elseif (!empty($tag['channel'])) { + if ('app' === $tag['channel']) { + $definition = $container->getDefinition('monolog.logger'); + } else { + $definition = $container->getDefinition(sprintf('monolog.logger.%s', $tag['channel'])); + } + } else { + $definition = $container->getDefinition('monolog.logger_prototype'); + } + + if (!empty($tag['method'])) { + $processor = array(new Reference($id), $tag['method']); + } else { + // If no method is defined, fallback to use __invoke + $processor = new Reference($id); + } + $definition->addMethodCall('pushProcessor', array($processor)); + } + } + } +} diff --git a/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/AddSwiftMailerTransportPass.php b/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/AddSwiftMailerTransportPass.php new file mode 100644 index 0000000000000000000000000000000000000000..bee1d1953ec466781c6960ed6032deed75f19f3e --- /dev/null +++ b/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/AddSwiftMailerTransportPass.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\MonologBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Sets the transport for Swiftmailer handlers depending on the existing + * container definitions. + * + * @author Christian Flothmann + */ +class AddSwiftMailerTransportPass implements CompilerPassInterface +{ + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + $handlers = $container->getParameter('monolog.swift_mailer.handlers'); + + foreach ($handlers as $id) { + $definition = $container->getDefinition($id); + $mailerId = (string) $definition->getArgument(0); + + // Try to fetch the transport for a non-default mailer first, then go with the default swiftmailer + $possibleServices = array( + $mailerId.'.transport.real', + $mailerId.'.transport', + 'swiftmailer.transport.real', + 'swiftmailer.transport', + ); + + foreach ($possibleServices as $serviceId) { + if ($container->hasAlias($serviceId) || $container->hasDefinition($serviceId)) { + $definition->addMethodCall( + 'setTransport', + array(new Reference($serviceId)) + ); + + break; + } + } + } + } +} diff --git a/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/DebugHandlerPass.php b/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/DebugHandlerPass.php new file mode 100644 index 0000000000000000000000000000000000000000..de10a713a8a32c943ca467d24d7d7e04cb9061ff --- /dev/null +++ b/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/DebugHandlerPass.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\MonologBundle\DependencyInjection\Compiler; + + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Definition; +use Monolog\Logger; + +/** + * Adds the DebugHandler when the profiler is enabled and kernel.debug is true. + * + * @author Christophe Coevoet + * @author Jordi Boggiano + * + * @deprecated since version 2.12, to be removed in 4.0. Use AddDebugLogProcessorPass in FrameworkBundle instead. + */ +class DebugHandlerPass implements CompilerPassInterface +{ + private $channelPass; + + public function __construct(LoggerChannelPass $channelPass) + { + // Trigger the deprecation only when using a Symfony version supporting the new feature (i.e. 3.2+) + if (class_exists('Symfony\Bridge\Monolog\Processor\DebugProcessor') && class_exists('Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddDebugLogProcessorPass')) { + @trigger_error('The '.__CLASS__.' class is deprecated since version 2.12 and will be removed in 4.0. Use AddDebugLogProcessorPass in FrameworkBundle instead.', E_USER_DEPRECATED); + } + + $this->channelPass = $channelPass; + } + + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('profiler')) { + return; + } + + if (!$container->getParameter('kernel.debug')) { + return; + } + + $debugHandler = new Definition('Symfony\Bridge\Monolog\Handler\DebugHandler', array(Logger::DEBUG, true)); + $container->setDefinition('monolog.handler.debug', $debugHandler); + + foreach ($this->channelPass->getChannels() as $channel) { + $container + ->getDefinition($channel === 'app' ? 'monolog.logger' : 'monolog.logger.'.$channel) + ->addMethodCall('pushHandler', array(new Reference('monolog.handler.debug'))); + } + } +} diff --git a/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/FixEmptyLoggerPass.php b/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/FixEmptyLoggerPass.php new file mode 100644 index 0000000000000000000000000000000000000000..224a2c513bafc69ddb36a6e243f412e8274f2e3c --- /dev/null +++ b/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/FixEmptyLoggerPass.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\MonologBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Fixes loggers with no handlers (by registering a "null" one). + * + * Monolog 1.x adds a default handler logging on STDERR when a logger has + * no registered handlers. This is NOT what what we want in Symfony, so in such + * cases, we add a "null" handler to avoid the issue. + * + * Note that Monolog 2.x does not register a default handler anymore, so this pass can + * be removed when MonologBundle minimum version of Monolog is bumped to 2.0. + * + * @author Fabien Potencier + * + * @see https://github.com/Seldaek/monolog/commit/ad37b7b2d11f300cbace9f5e84f855d329519e28 + */ +class FixEmptyLoggerPass implements CompilerPassInterface +{ + private $channelPass; + + public function __construct(LoggerChannelPass $channelPass) + { + $this->channelPass = $channelPass; + } + + public function process(ContainerBuilder $container) + { + $container->register('monolog.handler.null_internal', 'Monolog\Handler\NullHandler'); + foreach ($this->channelPass->getChannels() as $channel) { + $def = $container->getDefinition($channel === 'app' ? 'monolog.logger' : 'monolog.logger.'.$channel); + foreach ($def->getMethodCalls() as $method) { + if ('pushHandler' === $method[0]) { + continue 2; + } + } + + $def->addMethodCall('pushHandler', array(new Reference('monolog.handler.null_internal'))); + } + } +} diff --git a/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/LoggerChannelPass.php b/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/LoggerChannelPass.php new file mode 100644 index 0000000000000000000000000000000000000000..9f1aba1ff40f100d5851c621689c0a8e3250e423 --- /dev/null +++ b/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/LoggerChannelPass.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\MonologBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * Replaces the default logger by another one with its own channel for tagged services. + * + * @author Christophe Coevoet + */ +class LoggerChannelPass implements CompilerPassInterface +{ + protected $channels = array('app'); + + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('monolog.logger')) { + return; + } + + // create channels necessary for the handlers + foreach ($container->findTaggedServiceIds('monolog.logger') as $id => $tags) { + foreach ($tags as $tag) { + if (empty($tag['channel']) || 'app' === $tag['channel']) { + continue; + } + + $resolvedChannel = $container->getParameterBag()->resolveValue($tag['channel']); + + $definition = $container->getDefinition($id); + $loggerId = sprintf('monolog.logger.%s', $resolvedChannel); + $this->createLogger($resolvedChannel, $loggerId, $container); + + foreach ($definition->getArguments() as $index => $argument) { + if ($argument instanceof Reference && 'logger' === (string) $argument) { + $definition->replaceArgument($index, $this->changeReference($argument, $loggerId)); + } + } + + $calls = $definition->getMethodCalls(); + foreach ($calls as $i => $call) { + foreach ($call[1] as $index => $argument) { + if ($argument instanceof Reference && 'logger' === (string) $argument) { + $calls[$i][1][$index] = $this->changeReference($argument, $loggerId); + } + } + } + $definition->setMethodCalls($calls); + } + } + + // create additional channels + foreach ($container->getParameter('monolog.additional_channels') as $chan) { + $loggerId = sprintf('monolog.logger.%s', $chan); + $this->createLogger($chan, $loggerId, $container); + } + $container->getParameterBag()->remove('monolog.additional_channels'); + + // wire handlers to channels + $handlersToChannels = $container->getParameter('monolog.handlers_to_channels'); + foreach ($handlersToChannels as $handler => $channels) { + foreach ($this->processChannels($channels) as $channel) { + try { + $logger = $container->getDefinition($channel === 'app' ? 'monolog.logger' : 'monolog.logger.'.$channel); + } catch (InvalidArgumentException $e) { + $msg = 'Monolog configuration error: The logging channel "'.$channel.'" assigned to the "'.substr($handler, 16).'" handler does not exist.'; + throw new \InvalidArgumentException($msg, 0, $e); + } + $logger->addMethodCall('pushHandler', array(new Reference($handler))); + } + } + } + + public function getChannels() + { + return $this->channels; + } + + protected function processChannels($configuration) + { + if (null === $configuration) { + return $this->channels; + } + + if ('inclusive' === $configuration['type']) { + return $configuration['elements'] ?: $this->channels; + } + + return array_diff($this->channels, $configuration['elements']); + } + + protected function createLogger($channel, $loggerId, ContainerBuilder $container) + { + if (!in_array($channel, $this->channels)) { + $logger = new DefinitionDecorator('monolog.logger_prototype'); + $logger->replaceArgument(0, $channel); + $container->setDefinition($loggerId, $logger); + $this->channels[] = $channel; + } + } + + /** + * Creates a copy of a reference and alters the service ID. + * + * @param Reference $reference + * @param string $serviceId + * + * @return Reference + */ + private function changeReference(Reference $reference, $serviceId) + { + if (method_exists($reference, 'isStrict')) { + // Stay compatible with Symfony 2 + return new Reference($serviceId, $reference->getInvalidBehavior(), $reference->isStrict(false)); + } + + return new Reference($serviceId, $reference->getInvalidBehavior()); + } +} diff --git a/vendor/symfony/monolog-bundle/DependencyInjection/Configuration.php b/vendor/symfony/monolog-bundle/DependencyInjection/Configuration.php new file mode 100644 index 0000000000000000000000000000000000000000..70473fe995e6ea9b67836b0ab6fb6071fa08c7d4 --- /dev/null +++ b/vendor/symfony/monolog-bundle/DependencyInjection/Configuration.php @@ -0,0 +1,800 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\MonologBundle\DependencyInjection; + +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; +use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; +use Monolog\Logger; + +/** + * This class contains the configuration information for the bundle + * + * This information is solely responsible for how the different configuration + * sections are normalized, and merged. + * + * Possible handler types and related configurations (brackets indicate optional params): + * + * - service: + * - id + * + * - stream: + * - path: string + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - console: + * - [verbosity_levels]: level => verbosity configuration + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - firephp: + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - browser_console: + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - gelf: + * - publisher: {id: ...} or {hostname: ..., port: ..., chunk_size: ...} + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - chromephp: + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - rotating_file: + * - path: string + * - [max_files]: files to keep, defaults to zero (infinite) + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * - [file_permission]: string|null, defaults to null + * - [filename_format]: string, defaults to '{filename}-{date}' + * - [date_format]: string, defaults to 'Y-m-d' + * + * - mongo: + * - mongo: + * - id: optional if host is given + * - host: database host name, optional if id is given + * - [port]: defaults to 27017 + * - [user]: database user name + * - pass: mandatory only if user is present + * - [database]: defaults to monolog + * - [collection]: defaults to logs + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - elasticsearch: + * - elasticsearch: + * - id: optional if host is given + * - host: elastic search host name + * - [port]: defaults to 9200 + * - [index]: index name, defaults to monolog + * - [document_type]: document_type, defaults to logs + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - fingers_crossed: + * - handler: the wrapped handler's name + * - [action_level|activation_strategy]: minimum level or service id to activate the handler, defaults to WARNING + * - [excluded_404s]: if set, the strategy will be changed to one that excludes 404s coming from URLs matching any of those patterns + * - [buffer_size]: defaults to 0 (unlimited) + * - [stop_buffering]: bool to disable buffering once the handler has been activated, defaults to true + * - [passthru_level]: level name or int value for messages to always flush, disabled by default + * - [bubble]: bool, defaults to true + * + * - filter: + * - handler: the wrapped handler's name + * - [accepted_levels]: list of levels to accept + * - [min_level]: minimum level to accept (only used if accepted_levels not specified) + * - [max_level]: maximum level to accept (only used if accepted_levels not specified) + * - [bubble]: bool, defaults to true + * + * - buffer: + * - handler: the wrapped handler's name + * - [buffer_size]: defaults to 0 (unlimited) + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * - [flush_on_overflow]: bool, defaults to false + * + * - deduplication: + * - handler: the wrapper handler's name + * - [store]: The file/path where the deduplication log should be kept, defaults to %kernel.cache_dir%/monolog_dedup_* + * - [deduplication_level]: The minimum logging level for log records to be looked at for deduplication purposes, defaults to ERROR + * - [time]: The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through, defaults to 60 + * - [bubble]: bool, defaults to true + * + * - group: + * - members: the wrapped handlers by name + * - [bubble]: bool, defaults to true + * + * - whatfailuregroup: + * - members: the wrapped handlers by name + * - [bubble]: bool, defaults to true + * + * - syslog: + * - ident: string + * - [facility]: defaults to 'user', use any of the LOG_* facility constant but without LOG_ prefix, e.g. user for LOG_USER + * - [logopts]: defaults to LOG_PID + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - syslogudp: + * - host: syslogd host name + * - [port]: defaults to 514 + * - [facility]: defaults to 'user', use any of the LOG_* facility constant but without LOG_ prefix, e.g. user for LOG_USER + * - [logopts]: defaults to LOG_PID + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - swift_mailer: + * - from_email: optional if email_prototype is given + * - to_email: optional if email_prototype is given + * - subject: optional if email_prototype is given + * - [email_prototype]: service id of a message, defaults to a default message with the three fields above + * - [content_type]: optional if email_prototype is given, defaults to text/plain + * - [mailer]: mailer service, defaults to mailer + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * - [lazy]: use service lazy loading, bool, defaults to true + * + * - native_mailer: + * - from_email: string + * - to_email: string + * - subject: string + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - socket: + * - connection_string: string + * - [timeout]: float + * - [connection_timeout]: float + * - [persistent]: bool + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - pushover: + * - token: pushover api token + * - user: user id or array of ids + * - [title]: optional title for messages, defaults to the server hostname + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - raven: + * - dsn: connection string + * - client_id: Raven client custom service id (optional) + * - [release]: release number of the application that will be attached to logs, defaults to null + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * - [auto_stack_logs]: bool, defaults to false + * + * - newrelic: + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * - [app_name]: new relic app name, default null + * + * - hipchat: + * - token: hipchat api token + * - room: room id or name + * - [notify]: defaults to false + * - [nickname]: defaults to Monolog + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * - [use_ssl]: bool, defaults to true + * - [message_format]: text or html, defaults to text + * - [host]: defaults to "api.hipchat.com" + * - [api_version]: defaults to "v1" + * + * - slack: + * - token: slack api token + * - channel: channel name (with starting #) + * - [bot_name]: defaults to Monolog + * - [icon_emoji]: defaults to null + * - [use_attachment]: bool, defaults to true + * - [use_short_attachment]: bool, defaults to false + * - [include_extra]: bool, defaults to false + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - slackwebhook: + * - webhook_url: slack webhook URL + * - channel: channel name (with starting #) + * - [bot_name]: defaults to Monolog + * - [icon_emoji]: defaults to null + * - [use_attachment]: bool, defaults to true + * - [use_short_attachment]: bool, defaults to false + * - [include_extra]: bool, defaults to false + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - slackbot: + * - team: slack team slug + * - token: slackbot token + * - channel: channel name (with starting #) + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - cube: + * - url: http/udp url to the cube server + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - amqp: + * - exchange: service id of an AMQPExchange + * - [exchange_name]: string, defaults to log + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - error_log: + * - [message_type]: int 0 or 4, defaults to 0 + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - null: + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - test: + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - debug: + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - loggly: + * - token: loggly api token + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * - [tags]: tag names + * + * - logentries: + * - token: logentries api token + * - [use_ssl]: whether or not SSL encryption should be used, defaults to true + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * - [timeout]: float + * - [connection_timeout]: float + * + * - flowdock: + * - token: flowdock api token + * - source: human readable identifier of the application + * - from_email: email address of the message sender + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * - rollbar: + * - id: RollbarNotifier service (mandatory if token is not provided) + * - token: rollbar api token (skip if you provide a RollbarNotifier service id) + * - [config]: config values from https://github.com/rollbar/rollbar-php#configuration-reference + * - [level]: level name or int value, defaults to DEBUG + * - [bubble]: bool, defaults to true + * + * @author Jordi Boggiano + * @author Christophe Coevoet + */ +class Configuration implements ConfigurationInterface +{ + /** + * Generates the configuration tree builder. + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder + */ + public function getConfigTreeBuilder() + { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('monolog'); + + $rootNode + ->fixXmlConfig('channel') + ->fixXmlConfig('handler') + ->children() + ->scalarNode('use_microseconds')->defaultTrue()->end() + ->arrayNode('channels') + ->canBeUnset() + ->prototype('scalar')->end() + ->end() + ->arrayNode('handlers') + ->canBeUnset() + ->useAttributeAsKey('name') + ->prototype('array') + ->fixXmlConfig('member') + ->fixXmlConfig('excluded_404') + ->fixXmlConfig('tag') + ->fixXmlConfig('accepted_level') + ->canBeUnset() + ->children() + ->scalarNode('type') + ->isRequired() + ->treatNullLike('null') + ->beforeNormalization() + ->always() + ->then(function ($v) { return strtolower($v); }) + ->end() + ->end() + ->scalarNode('id')->end() // service & rollbar + ->scalarNode('priority')->defaultValue(0)->end() + ->scalarNode('level')->defaultValue('DEBUG')->end() + ->booleanNode('bubble')->defaultTrue()->end() + ->scalarNode('app_name')->defaultNull()->end() + ->booleanNode('include_stacktraces')->defaultFalse()->end() + ->booleanNode('process_psr_3_messages')->defaultTrue()->end() + ->scalarNode('path')->defaultValue('%kernel.logs_dir%/%kernel.environment%.log')->end() // stream and rotating + ->scalarNode('file_permission') // stream and rotating + ->defaultNull() + ->beforeNormalization() + ->ifString() + ->then(function ($v) { + if (substr($v, 0, 1) === '0') { + return octdec($v); + } + + return (int) $v; + }) + ->end() + ->end() + ->scalarNode('filename_format')->defaultValue('{filename}-{date}')->end() //rotating + ->scalarNode('date_format')->defaultValue('Y-m-d')->end() //rotating + ->scalarNode('ident')->defaultFalse()->end() // syslog + ->scalarNode('logopts')->defaultValue(LOG_PID)->end() // syslog + ->scalarNode('facility')->defaultValue('user')->end() // syslog + ->scalarNode('max_files')->defaultValue(0)->end() // rotating + ->scalarNode('action_level')->defaultValue('WARNING')->end() // fingers_crossed + ->scalarNode('activation_strategy')->defaultNull()->end() // fingers_crossed + ->booleanNode('stop_buffering')->defaultTrue()->end()// fingers_crossed + ->scalarNode('passthru_level')->defaultNull()->end() // fingers_crossed + ->arrayNode('excluded_404s') // fingers_crossed + ->canBeUnset() + ->prototype('scalar')->end() + ->end() + ->arrayNode('accepted_levels') // filter + ->canBeUnset() + ->prototype('scalar')->end() + ->end() + ->scalarNode('min_level')->defaultValue('DEBUG')->end() // filter + ->scalarNode('max_level')->defaultValue('EMERGENCY')->end() //filter + ->scalarNode('buffer_size')->defaultValue(0)->end() // fingers_crossed and buffer + ->booleanNode('flush_on_overflow')->defaultFalse()->end() // buffer + ->scalarNode('handler')->end() // fingers_crossed and buffer + ->scalarNode('url')->end() // cube + ->scalarNode('exchange')->end() // amqp + ->scalarNode('exchange_name')->defaultValue('log')->end() // amqp + ->scalarNode('room')->end() // hipchat + ->scalarNode('message_format')->defaultValue('text')->end() // hipchat + ->scalarNode('api_version')->defaultNull()->end() // hipchat + ->scalarNode('channel')->defaultNull()->end() // slack & slackwebhook & slackbot + ->scalarNode('bot_name')->defaultValue('Monolog')->end() // slack & slackwebhook + ->scalarNode('use_attachment')->defaultTrue()->end() // slack & slackwebhook + ->scalarNode('use_short_attachment')->defaultFalse()->end() // slack & slackwebhook + ->scalarNode('include_extra')->defaultFalse()->end() // slack & slackwebhook + ->scalarNode('icon_emoji')->defaultNull()->end() // slack & slackwebhook + ->scalarNode('webhook_url')->end() // slackwebhook + ->scalarNode('slack_team')->end() // slackbot + ->scalarNode('notify')->defaultFalse()->end() // hipchat + ->scalarNode('nickname')->defaultValue('Monolog')->end() // hipchat + ->scalarNode('token')->end() // pushover & hipchat & loggly & logentries & flowdock & rollbar & slack & slackbot + ->scalarNode('source')->end() // flowdock + ->booleanNode('use_ssl')->defaultTrue()->end() // logentries & hipchat + ->variableNode('user') // pushover + ->validate() + ->ifTrue(function ($v) { + return !is_string($v) && !is_array($v); + }) + ->thenInvalid('User must be a string or an array.') + ->end() + ->end() + ->scalarNode('title')->defaultNull()->end() // pushover + ->scalarNode('host')->defaultNull()->end() // syslogudp & hipchat + ->scalarNode('port')->defaultValue(514)->end() // syslogudp + ->arrayNode('publisher') + ->canBeUnset() + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array('id'=> $v); }) + ->end() + ->children() + ->scalarNode('id')->end() + ->scalarNode('hostname')->end() + ->scalarNode('port')->defaultValue(12201)->end() + ->scalarNode('chunk_size')->defaultValue(1420)->end() + ->end() + ->validate() + ->ifTrue(function ($v) { + return !isset($v['id']) && !isset($v['hostname']); + }) + ->thenInvalid('What must be set is either the hostname or the id.') + ->end() + ->end() // gelf + ->arrayNode('mongo') + ->canBeUnset() + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array('id'=> $v); }) + ->end() + ->children() + ->scalarNode('id')->end() + ->scalarNode('host')->end() + ->scalarNode('port')->defaultValue(27017)->end() + ->scalarNode('user')->end() + ->scalarNode('pass')->end() + ->scalarNode('database')->defaultValue('monolog')->end() + ->scalarNode('collection')->defaultValue('logs')->end() + ->end() + ->validate() + ->ifTrue(function ($v) { + return !isset($v['id']) && !isset($v['host']); + }) + ->thenInvalid('What must be set is either the host or the id.') + ->end() + ->validate() + ->ifTrue(function ($v) { + return isset($v['user']) && !isset($v['pass']); + }) + ->thenInvalid('If you set user, you must provide a password.') + ->end() + ->end() // mongo + ->arrayNode('elasticsearch') + ->canBeUnset() + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array('id'=> $v); }) + ->end() + ->children() + ->scalarNode('id')->end() + ->scalarNode('host')->end() + ->scalarNode('port')->defaultValue(9200)->end() + ->scalarNode('transport')->defaultValue('Http')->end() + ->scalarNode('user')->defaultNull()->end() + ->scalarNode('password')->defaultNull()->end() + ->end() + ->validate() + ->ifTrue(function ($v) { + return !isset($v['id']) && !isset($v['host']); + }) + ->thenInvalid('What must be set is either the host or the id.') + ->end() + ->end() // elasticsearch + ->scalarNode('index')->defaultValue('monolog')->end() // elasticsearch + ->scalarNode('document_type')->defaultValue('logs')->end() // elasticsearch + ->scalarNode('ignore_error')->defaultValue(false)->end() // elasticsearch + ->arrayNode('config') + ->canBeUnset() + ->prototype('scalar')->end() + ->end() // rollbar + ->arrayNode('members') // group, whatfailuregroup + ->canBeUnset() + ->performNoDeepMerging() + ->prototype('scalar')->end() + ->end() + ->scalarNode('from_email')->end() // swift_mailer, native_mailer and flowdock + ->arrayNode('to_email') // swift_mailer and native_mailer + ->prototype('scalar')->end() + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array($v); }) + ->end() + ->end() + ->scalarNode('subject')->end() // swift_mailer and native_mailer + ->scalarNode('content_type')->defaultNull()->end() // swift_mailer + ->scalarNode('mailer')->defaultValue('mailer')->end() // swift_mailer + ->arrayNode('email_prototype') // swift_mailer + ->canBeUnset() + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array('id' => $v); }) + ->end() + ->children() + ->scalarNode('id')->isRequired()->end() + ->scalarNode('method')->defaultNull()->end() + ->end() + ->end() + ->booleanNode('lazy')->defaultValue(true)->end() // swift_mailer + ->scalarNode('connection_string')->end() // socket_handler + ->scalarNode('timeout')->end() // socket_handler & logentries + ->scalarNode('time')->defaultValue(60)->end() // deduplication + ->scalarNode('deduplication_level')->defaultValue(Logger::ERROR)->end() // deduplication + ->scalarNode('store')->defaultNull()->end() // deduplication + ->scalarNode('connection_timeout')->end() // socket_handler & logentries + ->booleanNode('persistent')->end() // socket_handler + ->scalarNode('dsn')->end() // raven_handler + ->scalarNode('client_id')->defaultNull()->end() // raven_handler + ->scalarNode('auto_log_stacks')->defaultFalse()->end() // raven_handler + ->scalarNode('release')->defaultNull()->end() // raven_handler + ->scalarNode('message_type')->defaultValue(0)->end() // error_log + ->arrayNode('tags') // loggly + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return explode(',', $v); }) + ->end() + ->beforeNormalization() + ->ifArray() + ->then(function ($v) { return array_filter(array_map('trim', $v)); }) + ->end() + ->prototype('scalar')->end() + ->end() + ->arrayNode('verbosity_levels') // console + ->beforeNormalization() + ->ifArray() + ->then(function ($v) { + $map = array(); + $verbosities = array('VERBOSITY_NORMAL', 'VERBOSITY_VERBOSE', 'VERBOSITY_VERY_VERBOSE', 'VERBOSITY_DEBUG'); + // allow numeric indexed array with ascendning verbosity and lowercase names of the constants + foreach ($v as $verbosity => $level) { + if (is_int($verbosity) && isset($verbosities[$verbosity])) { + $map[$verbosities[$verbosity]] = strtoupper($level); + } else { + $map[strtoupper($verbosity)] = strtoupper($level); + } + } + + return $map; + }) + ->end() + ->children() + ->scalarNode('VERBOSITY_NORMAL')->defaultValue('WARNING')->end() + ->scalarNode('VERBOSITY_VERBOSE')->defaultValue('NOTICE')->end() + ->scalarNode('VERBOSITY_VERY_VERBOSE')->defaultValue('INFO')->end() + ->scalarNode('VERBOSITY_DEBUG')->defaultValue('DEBUG')->end() + ->end() + ->validate() + ->always(function ($v) { + $map = array(); + foreach ($v as $verbosity => $level) { + $verbosityConstant = 'Symfony\Component\Console\Output\OutputInterface::'.$verbosity; + + if (!defined($verbosityConstant)) { + throw new InvalidConfigurationException(sprintf( + 'The configured verbosity "%s" is invalid as it is not defined in Symfony\Component\Console\Output\OutputInterface.', + $verbosity + )); + } + if (!is_numeric($level)) { + $levelConstant = 'Monolog\Logger::'.$level; + if (!defined($levelConstant)) { + throw new InvalidConfigurationException(sprintf( + 'The configured minimum log level "%s" for verbosity "%s" is invalid as it is not defined in Monolog\Logger.', + $level, $verbosity + )); + } + $level = constant($levelConstant); + } else { + $level = (int) $level; + } + + $map[constant($verbosityConstant)] = $level; + } + + return $map; + }) + ->end() + ->end() + ->arrayNode('channels') + ->fixXmlConfig('channel', 'elements') + ->canBeUnset() + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array('elements' => array($v)); }) + ->end() + ->beforeNormalization() + ->ifTrue(function ($v) { return is_array($v) && is_numeric(key($v)); }) + ->then(function ($v) { return array('elements' => $v); }) + ->end() + ->validate() + ->ifTrue(function ($v) { return empty($v); }) + ->thenUnset() + ->end() + ->validate() + ->always(function ($v) { + $isExclusive = null; + if (isset($v['type'])) { + $isExclusive = 'exclusive' === $v['type']; + } + + $elements = array(); + foreach ($v['elements'] as $element) { + if (0 === strpos($element, '!')) { + if (false === $isExclusive) { + throw new InvalidConfigurationException('Cannot combine exclusive/inclusive definitions in channels list.'); + } + $elements[] = substr($element, 1); + $isExclusive = true; + } else { + if (true === $isExclusive) { + throw new InvalidConfigurationException('Cannot combine exclusive/inclusive definitions in channels list'); + } + $elements[] = $element; + $isExclusive = false; + } + } + + if (!count($elements)) { + return null; + } + + return array('type' => $isExclusive ? 'exclusive' : 'inclusive', 'elements' => $elements); + }) + ->end() + ->children() + ->scalarNode('type') + ->validate() + ->ifNotInArray(array('inclusive', 'exclusive')) + ->thenInvalid('The type of channels has to be inclusive or exclusive') + ->end() + ->end() + ->arrayNode('elements') + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->scalarNode('formatter')->end() + ->booleanNode('nested')->defaultFalse()->end() + ->end() + ->validate() + ->ifTrue(function ($v) { return 'service' === $v['type'] && !empty($v['formatter']); }) + ->thenInvalid('Service handlers can not have a formatter configured in the bundle, you must reconfigure the service itself instead') + ->end() + ->validate() + ->ifTrue(function ($v) { return ('fingers_crossed' === $v['type'] || 'buffer' === $v['type'] || 'filter' === $v['type']) && 1 !== count($v['handler']); }) + ->thenInvalid('The handler has to be specified to use a FingersCrossedHandler or BufferHandler or FilterHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'fingers_crossed' === $v['type'] && !empty($v['excluded_404s']) && !empty($v['activation_strategy']); }) + ->thenInvalid('You can not use excluded_404s together with a custom activation_strategy in a FingersCrossedHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'filter' === $v['type'] && "DEBUG" !== $v['min_level'] && !empty($v['accepted_levels']); }) + ->thenInvalid('You can not use min_level together with accepted_levels in a FilterHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'filter' === $v['type'] && "EMERGENCY" !== $v['max_level'] && !empty($v['accepted_levels']); }) + ->thenInvalid('You can not use max_level together with accepted_levels in a FilterHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'rollbar' === $v['type'] && !empty($v['id']) && !empty($v['token']); }) + ->thenInvalid('You can not use both an id and a token in a RollbarHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'rollbar' === $v['type'] && empty($v['id']) && empty($v['token']); }) + ->thenInvalid('The id or the token has to be specified to use a RollbarHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'swift_mailer' === $v['type'] && empty($v['email_prototype']) && (empty($v['from_email']) || empty($v['to_email']) || empty($v['subject'])); }) + ->thenInvalid('The sender, recipient and subject or an email prototype have to be specified to use a SwiftMailerHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'native_mailer' === $v['type'] && (empty($v['from_email']) || empty($v['to_email']) || empty($v['subject'])); }) + ->thenInvalid('The sender, recipient and subject have to be specified to use a NativeMailerHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'service' === $v['type'] && !isset($v['id']); }) + ->thenInvalid('The id has to be specified to use a service as handler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'syslogudp' === $v['type'] && !isset($v['host']); }) + ->thenInvalid('The host has to be specified to use a syslogudp as handler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'gelf' === $v['type'] && !isset($v['publisher']); }) + ->thenInvalid('The publisher has to be specified to use a GelfHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'socket' === $v['type'] && !isset($v['connection_string']); }) + ->thenInvalid('The connection_string has to be specified to use a SocketHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'pushover' === $v['type'] && (empty($v['token']) || empty($v['user'])); }) + ->thenInvalid('The token and user have to be specified to use a PushoverHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'raven' === $v['type'] && !array_key_exists('dsn', $v) && null === $v['client_id']; }) + ->thenInvalid('The DSN has to be specified to use a RavenHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'hipchat' === $v['type'] && (empty($v['token']) || empty($v['room'])); }) + ->thenInvalid('The token and room have to be specified to use a HipChatHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'hipchat' === $v['type'] && !in_array($v['message_format'], array('text', 'html')); }) + ->thenInvalid('The message_format has to be "text" or "html" in a HipChatHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'hipchat' === $v['type'] && null !== $v['api_version'] && !in_array($v['api_version'], array('v1', 'v2'), true); }) + ->thenInvalid('The api_version has to be "v1" or "v2" in a HipChatHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'slack' === $v['type'] && (empty($v['token']) || empty($v['channel'])); }) + ->thenInvalid('The token and channel have to be specified to use a SlackHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'slackwebhook' === $v['type'] && (empty($v['webhook_url'])); }) + ->thenInvalid('The webhook_url have to be specified to use a SlackWebhookHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'slackbot' === $v['type'] && (empty($v['stack_team']) || empty($v['token']) || empty($v['channel'])); }) + ->thenInvalid('The stack_team, token and channel have to be specified to use a SlackbotHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'cube' === $v['type'] && empty($v['url']); }) + ->thenInvalid('The url has to be specified to use a CubeHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'mongo' === $v['type'] && !isset($v['mongo']); }) + ->thenInvalid('The mongo configuration has to be specified to use a MongoHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'amqp' === $v['type'] && empty($v['exchange']); }) + ->thenInvalid('The exchange has to be specified to use a AmqpHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'loggly' === $v['type'] && empty($v['token']); }) + ->thenInvalid('The token has to be specified to use a LogglyHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'loggly' === $v['type'] && !empty($v['tags']); }) + ->then(function ($v) { + $invalidTags = preg_grep('/^[a-z0-9][a-z0-9\.\-_]*$/i', $v['tags'], PREG_GREP_INVERT); + if (!empty($invalidTags)) { + throw new InvalidConfigurationException(sprintf('The following Loggly tags are invalid: %s.', implode(', ', $invalidTags))); + } + + return $v; + }) + ->end() + ->validate() + ->ifTrue(function ($v) { return 'logentries' === $v['type'] && empty($v['token']); }) + ->thenInvalid('The token has to be specified to use a LogEntriesHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'flowdock' === $v['type'] && empty($v['token']); }) + ->thenInvalid('The token has to be specified to use a FlowdockHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'flowdock' === $v['type'] && empty($v['from_email']); }) + ->thenInvalid('The from_email has to be specified to use a FlowdockHandler') + ->end() + ->validate() + ->ifTrue(function ($v) { return 'flowdock' === $v['type'] && empty($v['source']); }) + ->thenInvalid('The source has to be specified to use a FlowdockHandler') + ->end() + ->end() + ->validate() + ->ifTrue(function ($v) { return isset($v['debug']); }) + ->thenInvalid('The "debug" name cannot be used as it is reserved for the handler of the profiler') + ->end() + ->example(array( + 'syslog' => array( + 'type' => 'stream', + 'path' => '/var/log/symfony.log', + 'level' => 'ERROR', + 'bubble' => 'false', + 'formatter' => 'my_formatter', + ), + 'main' => array( + 'type' => 'fingers_crossed', + 'action_level' => 'WARNING', + 'buffer_size' => 30, + 'handler' => 'custom', + ), + 'custom' => array( + 'type' => 'service', + 'id' => 'my_handler', + ) + )) + ->end() + ->end() + ; + + return $treeBuilder; + } +} diff --git a/vendor/symfony/monolog-bundle/DependencyInjection/MonologExtension.php b/vendor/symfony/monolog-bundle/DependencyInjection/MonologExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..09d7b54cad0198f6cfcc1fc5474382cce8829d74 --- /dev/null +++ b/vendor/symfony/monolog-bundle/DependencyInjection/MonologExtension.php @@ -0,0 +1,771 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\MonologBundle\DependencyInjection; + +use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Elastica\Client; + +/** + * MonologExtension is an extension for the Monolog library. + * + * @author Jordi Boggiano + * @author Christophe Coevoet + */ +class MonologExtension extends Extension +{ + private $nestedHandlers = array(); + + private $swiftMailerHandlers = array(); + + private function levelToMonologConst($level) + { + return is_int($level) ? $level : constant('Monolog\Logger::'.strtoupper($level)); + } + + /** + * Loads the Monolog configuration. + * + * @param array $configs An array of configuration settings + * @param ContainerBuilder $container A ContainerBuilder instance + */ + public function load(array $configs, ContainerBuilder $container) + { + $configuration = $this->getConfiguration($configs, $container); + $config = $this->processConfiguration($configuration, $configs); + + + if (isset($config['handlers'])) { + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('monolog.xml'); + $container->setAlias('logger', 'monolog.logger'); + + $container->setParameter('monolog.use_microseconds', $config['use_microseconds']); + + // always autowire the main logger, require Symfony >= 2.8 + if (method_exists('Symfony\Component\DependencyInjection\Definition', 'addAutowiringType')) { + $container->getDefinition('monolog.logger')->addAutowiringType('Psr\Log\LoggerInterface'); + } + + $handlers = array(); + + foreach ($config['handlers'] as $name => $handler) { + $handlers[$handler['priority']][] = array( + 'id' => $this->buildHandler($container, $name, $handler), + 'channels' => empty($handler['channels']) ? null : $handler['channels'], + ); + } + + $container->setParameter( + 'monolog.swift_mailer.handlers', + $this->swiftMailerHandlers + ); + + ksort($handlers); + $sortedHandlers = array(); + foreach ($handlers as $priorityHandlers) { + foreach (array_reverse($priorityHandlers) as $handler) { + $sortedHandlers[] = $handler; + } + } + + $handlersToChannels = array(); + foreach ($sortedHandlers as $handler) { + if (!in_array($handler['id'], $this->nestedHandlers)) { + $handlersToChannels[$handler['id']] = $handler['channels']; + } + } + $container->setParameter('monolog.handlers_to_channels', $handlersToChannels); + + if (PHP_VERSION_ID < 70000) { + $this->addClassesToCompile(array( + 'Monolog\\Formatter\\FormatterInterface', + 'Monolog\\Formatter\\LineFormatter', + 'Monolog\\Handler\\HandlerInterface', + 'Monolog\\Handler\\AbstractHandler', + 'Monolog\\Handler\\AbstractProcessingHandler', + 'Monolog\\Handler\\StreamHandler', + 'Monolog\\Handler\\FingersCrossedHandler', + 'Monolog\\Handler\\FilterHandler', + 'Monolog\\Handler\\TestHandler', + 'Monolog\\Logger', + 'Symfony\\Bridge\\Monolog\\Logger', + 'Monolog\\Handler\\FingersCrossed\\ActivationStrategyInterface', + 'Monolog\\Handler\\FingersCrossed\\ErrorLevelActivationStrategy', + )); + } + } + + $container->setParameter('monolog.additional_channels', isset($config['channels']) ? $config['channels'] : array()); + } + + /** + * Returns the base path for the XSD files. + * + * @return string The XSD base path + */ + public function getXsdValidationBasePath() + { + return __DIR__.'/../Resources/config/schema'; + } + + public function getNamespace() + { + return 'http://symfony.com/schema/dic/monolog'; + } + + private function buildHandler(ContainerBuilder $container, $name, array $handler) + { + $handlerId = $this->getHandlerId($name); + if ('service' === $handler['type']) { + $container->setAlias($handlerId, $handler['id']); + + return $handlerId; + } + + $definition = new Definition($this->getHandlerClassByType($handler['type'])); + + $handler['level'] = $this->levelToMonologConst($handler['level']); + + if ($handler['include_stacktraces']) { + $definition->setConfigurator(array('Symfony\\Bundle\\MonologBundle\\MonologBundle', 'includeStacktraces')); + } + + if ($handler['process_psr_3_messages']) { + $processorId = 'monolog.processor.psr_log_message'; + if (!$container->hasDefinition($processorId)) { + $processor = new Definition('Monolog\\Processor\\PsrLogMessageProcessor'); + $processor->setPublic(false); + $container->setDefinition($processorId, $processor); + } + + $definition->addMethodCall('pushProcessor', array(new Reference($processorId))); + } + + switch ($handler['type']) { + case 'stream': + $definition->setArguments(array( + $handler['path'], + $handler['level'], + $handler['bubble'], + $handler['file_permission'], + )); + break; + + case 'console': + $definition->setArguments(array( + null, + $handler['bubble'], + isset($handler['verbosity_levels']) ? $handler['verbosity_levels'] : array(), + )); + $definition->addTag('kernel.event_subscriber'); + break; + + case 'firephp': + $definition->setArguments(array( + $handler['level'], + $handler['bubble'], + )); + $definition->addTag('kernel.event_listener', array('event' => 'kernel.response', 'method' => 'onKernelResponse')); + break; + + case 'gelf': + if (isset($handler['publisher']['id'])) { + $publisherId = $handler['publisher']['id']; + } elseif (class_exists('Gelf\Transport\UdpTransport')) { + $transport = new Definition("Gelf\Transport\UdpTransport", array( + $handler['publisher']['hostname'], + $handler['publisher']['port'], + $handler['publisher']['chunk_size'], + )); + $transportId = uniqid('monolog.gelf.transport.', true); + $transport->setPublic(false); + $container->setDefinition($transportId, $transport); + + $publisher = new Definition('Gelf\Publisher', array()); + $publisher->addMethodCall('addTransport', array(new Reference($transportId))); + $publisherId = uniqid('monolog.gelf.publisher.', true); + $publisher->setPublic(false); + $container->setDefinition($publisherId, $publisher); + } elseif (class_exists('Gelf\MessagePublisher')) { + $publisher = new Definition('Gelf\MessagePublisher', array( + $handler['publisher']['hostname'], + $handler['publisher']['port'], + $handler['publisher']['chunk_size'], + )); + + $publisherId = uniqid('monolog.gelf.publisher.', true); + $publisher->setPublic(false); + $container->setDefinition($publisherId, $publisher); + } else { + throw new \RuntimeException('The gelf handler requires the graylog2/gelf-php package to be installed'); + } + + $definition->setArguments(array( + new Reference($publisherId), + $handler['level'], + $handler['bubble'], + )); + break; + + case 'mongo': + if (isset($handler['mongo']['id'])) { + $clientId = $handler['mongo']['id']; + } else { + $server = 'mongodb://'; + + if (isset($handler['mongo']['user'])) { + $server .= $handler['mongo']['user'].':'.$handler['mongo']['pass'].'@'; + } + + $server .= $handler['mongo']['host'].':'.$handler['mongo']['port']; + + $client = new Definition('MongoClient', array( + $server, + )); + + $clientId = uniqid('monolog.mongo.client.', true); + $client->setPublic(false); + $container->setDefinition($clientId, $client); + } + + $definition->setArguments(array( + new Reference($clientId), + $handler['mongo']['database'], + $handler['mongo']['collection'], + $handler['level'], + $handler['bubble'], + )); + break; + + case 'elasticsearch': + if (isset($handler['elasticsearch']['id'])) { + $clientId = $handler['elasticsearch']['id']; + } else { + // elastica client new definition + $elasticaClient = new Definition('Elastica\Client'); + $elasticaClientArguments = array( + 'host' => $handler['elasticsearch']['host'], + 'port' => $handler['elasticsearch']['port'], + 'transport' => $handler['elasticsearch']['transport'], + ); + + if (isset($handler['elasticsearch']['user']) && isset($handler['elasticsearch']['password'])) { + $elasticaClientArguments = array_merge( + $elasticaClientArguments, + array( + 'headers' => array( + 'Authorization ' => 'Basic ' . base64_encode($handler['elasticsearch']['user'] . ':' . $handler['elasticsearch']['password']) + ) + ) + ); + } + + $elasticaClient->setArguments(array( + $elasticaClientArguments + )); + + $clientId = uniqid('monolog.elastica.client.', true); + $elasticaClient->setPublic(false); + $container->setDefinition($clientId, $elasticaClient); + } + + // elastica handler definition + $definition->setArguments(array( + new Reference($clientId), + array( + 'index' => $handler['index'], + 'type' => $handler['document_type'], + 'ignore_error' => $handler['ignore_error'] + ), + $handler['level'], + $handler['bubble'], + )); + break; + + case 'chromephp': + $definition->setArguments(array( + $handler['level'], + $handler['bubble'], + )); + $definition->addTag('kernel.event_listener', array('event' => 'kernel.response', 'method' => 'onKernelResponse')); + break; + + case 'rotating_file': + $definition->setArguments(array( + $handler['path'], + $handler['max_files'], + $handler['level'], + $handler['bubble'], + $handler['file_permission'], + )); + $definition->addMethodCall('setFilenameFormat', array( + $handler['filename_format'], + $handler['date_format'], + )); + break; + + case 'fingers_crossed': + $handler['action_level'] = $this->levelToMonologConst($handler['action_level']); + if (null !== $handler['passthru_level']) { + $handler['passthru_level'] = $this->levelToMonologConst($handler['passthru_level']); + } + $nestedHandlerId = $this->getHandlerId($handler['handler']); + $this->markNestedHandler($nestedHandlerId); + + if (isset($handler['activation_strategy'])) { + $activation = new Reference($handler['activation_strategy']); + } elseif (!empty($handler['excluded_404s'])) { + $activationDef = new Definition('Symfony\Bridge\Monolog\Handler\FingersCrossed\NotFoundActivationStrategy', array( + new Reference('request_stack'), + $handler['excluded_404s'], + $handler['action_level'] + )); + $container->setDefinition($handlerId.'.not_found_strategy', $activationDef); + $activation = new Reference($handlerId.'.not_found_strategy'); + } else { + $activation = $handler['action_level']; + } + + $definition->setArguments(array( + new Reference($nestedHandlerId), + $activation, + $handler['buffer_size'], + $handler['bubble'], + $handler['stop_buffering'], + $handler['passthru_level'], + )); + break; + + case 'filter': + $handler['min_level'] = $this->levelToMonologConst($handler['min_level']); + $handler['max_level'] = $this->levelToMonologConst($handler['max_level']); + foreach (array_keys($handler['accepted_levels']) as $k) { + $handler['accepted_levels'][$k] = $this->levelToMonologConst($handler['accepted_levels'][$k]); + } + + $nestedHandlerId = $this->getHandlerId($handler['handler']); + $this->markNestedHandler($nestedHandlerId); + $minLevelOrList = !empty($handler['accepted_levels']) ? $handler['accepted_levels'] : $handler['min_level']; + + $definition->setArguments(array( + new Reference($nestedHandlerId), + $minLevelOrList, + $handler['max_level'], + $handler['bubble'], + )); + break; + + case 'buffer': + $nestedHandlerId = $this->getHandlerId($handler['handler']); + $this->markNestedHandler($nestedHandlerId); + + $definition->setArguments(array( + new Reference($nestedHandlerId), + $handler['buffer_size'], + $handler['level'], + $handler['bubble'], + $handler['flush_on_overflow'], + )); + break; + + case 'deduplication': + $nestedHandlerId = $this->getHandlerId($handler['handler']); + $this->markNestedHandler($nestedHandlerId); + $defaultStore = '%kernel.cache_dir%/monolog_dedup_'.sha1($handlerId); + + $definition->setArguments(array( + new Reference($nestedHandlerId), + isset($handler['store']) ? $handler['store'] : $defaultStore, + $handler['deduplication_level'], + $handler['time'], + $handler['bubble'], + )); + break; + + case 'group': + case 'whatfailuregroup': + $references = array(); + foreach ($handler['members'] as $nestedHandler) { + $nestedHandlerId = $this->getHandlerId($nestedHandler); + $this->markNestedHandler($nestedHandlerId); + $references[] = new Reference($nestedHandlerId); + } + + $definition->setArguments(array( + $references, + $handler['bubble'], + )); + break; + + case 'syslog': + $definition->setArguments(array( + $handler['ident'], + $handler['facility'], + $handler['level'], + $handler['bubble'], + $handler['logopts'], + )); + break; + + case 'syslogudp': + $definition->setArguments(array( + $handler['host'], + $handler['port'], + $handler['facility'], + $handler['level'], + $handler['bubble'], + )); + break; + + case 'swift_mailer': + if (isset($handler['email_prototype'])) { + if (!empty($handler['email_prototype']['method'])) { + $prototype = array(new Reference($handler['email_prototype']['id']), $handler['email_prototype']['method']); + } else { + $prototype = new Reference($handler['email_prototype']['id']); + } + } else { + $messageFactory = new Definition('Symfony\Bundle\MonologBundle\SwiftMailer\MessageFactory'); + $messageFactory->setLazy(true); + $messageFactory->setPublic(false); + $messageFactory->setArguments(array( + new Reference($handler['mailer']), + $handler['from_email'], + $handler['to_email'], + $handler['subject'], + $handler['content_type'] + )); + + $messageFactoryId = sprintf('%s.mail_message_factory', $handlerId); + $container->setDefinition($messageFactoryId, $messageFactory); + // set the prototype as a callable + $prototype = array(new Reference($messageFactoryId), 'createMessage'); + } + $definition->setArguments(array( + new Reference($handler['mailer']), + $prototype, + $handler['level'], + $handler['bubble'], + )); + + $this->swiftMailerHandlers[] = $handlerId; + $definition->addTag('kernel.event_listener', array('event' => 'kernel.terminate', 'method' => 'onKernelTerminate')); + $definition->addTag('kernel.event_listener', array('event' => 'console.terminate', 'method' => 'onCliTerminate')); + break; + + case 'native_mailer': + $definition->setArguments(array( + $handler['to_email'], + $handler['subject'], + $handler['from_email'], + $handler['level'], + $handler['bubble'], + )); + break; + + case 'socket': + $definition->setArguments(array( + $handler['connection_string'], + $handler['level'], + $handler['bubble'], + )); + if (isset($handler['timeout'])) { + $definition->addMethodCall('setTimeout', array($handler['timeout'])); + } + if (isset($handler['connection_timeout'])) { + $definition->addMethodCall('setConnectionTimeout', array($handler['connection_timeout'])); + } + if (isset($handler['persistent'])) { + $definition->addMethodCall('setPersistent', array($handler['persistent'])); + } + break; + + case 'pushover': + $definition->setArguments(array( + $handler['token'], + $handler['user'], + $handler['title'], + $handler['level'], + $handler['bubble'], + )); + break; + + case 'hipchat': + $definition->setArguments(array( + $handler['token'], + $handler['room'], + $handler['nickname'], + $handler['notify'], + $handler['level'], + $handler['bubble'], + $handler['use_ssl'], + $handler['message_format'], + !empty($handler['host']) ? $handler['host'] : 'api.hipchat.com', + !empty($handler['api_version']) ? $handler['api_version'] : 'v1', + )); + break; + + case 'slack': + $definition->setArguments(array( + $handler['token'], + $handler['channel'], + $handler['bot_name'], + $handler['use_attachment'], + $handler['icon_emoji'], + $handler['level'], + $handler['bubble'], + $handler['use_short_attachment'], + $handler['include_extra'], + )); + break; + + case 'slackwebhook': + $definition->setArguments(array( + $handler['webhook_url'], + $handler['channel'], + $handler['bot_name'], + $handler['use_attachment'], + $handler['icon_emoji'], + $handler['use_short_attachment'], + $handler['include_extra'], + $handler['level'], + $handler['bubble'], + )); + break; + + case 'slackbot': + $definition->setArguments(array( + $handler['slack_team'], + $handler['token'], + $handler['channel'], + $handler['level'], + $handler['bubble'], + )); + break; + + case 'cube': + $definition->setArguments(array( + $handler['url'], + $handler['level'], + $handler['bubble'], + )); + break; + + case 'amqp': + $definition->setArguments(array( + new Reference($handler['exchange']), + $handler['exchange_name'], + $handler['level'], + $handler['bubble'], + )); + break; + + case 'error_log': + $definition->setArguments(array( + $handler['message_type'], + $handler['level'], + $handler['bubble'], + )); + break; + + case 'raven': + if (null !== $handler['client_id']) { + $clientId = $handler['client_id']; + } else { + $client = new Definition('Raven_Client', array( + $handler['dsn'], + array('auto_log_stacks' => $handler['auto_log_stacks']) + )); + $client->setPublic(false); + $clientId = 'monolog.raven.client.'.sha1($handler['dsn']); + $container->setDefinition($clientId, $client); + } + $definition->setArguments(array( + new Reference($clientId), + $handler['level'], + $handler['bubble'], + )); + if (!empty($handler['release'])) { + $definition->addMethodCall('setRelease', array($handler['release'])); + } + break; + + case 'loggly': + $definition->setArguments(array( + $handler['token'], + $handler['level'], + $handler['bubble'], + )); + if (!empty($handler['tags'])) { + $definition->addMethodCall('setTag', array(implode(',', $handler['tags']))); + } + break; + + case 'logentries': + $definition->setArguments(array( + $handler['token'], + $handler['use_ssl'], + $handler['level'], + $handler['bubble'], + )); + if (isset($handler['timeout'])) { + $definition->addMethodCall('setTimeout', array($handler['timeout'])); + } + if (isset($handler['connection_timeout'])) { + $definition->addMethodCall('setConnectionTimeout', array($handler['connection_timeout'])); + } + break; + + case 'flowdock': + $definition->setArguments(array( + $handler['token'], + $handler['level'], + $handler['bubble'], + )); + + if (empty($handler['formatter'])) { + $formatter = new Definition("Monolog\Formatter\FlowdockFormatter", array( + $handler['source'], + $handler['from_email'], + )); + $formatterId = 'monolog.flowdock.formatter.'.sha1($handler['source'].'|'.$handler['from_email']); + $formatter->setPublic(false); + $container->setDefinition($formatterId, $formatter); + + $definition->addMethodCall('setFormatter', array(new Reference($formatterId))); + } + break; + + case 'rollbar': + if (!empty($handler['id'])) { + $rollbarId = $handler['id']; + } else { + $config = $handler['config'] ?: array(); + $config['access_token'] = $handler['token']; + $rollbar = new Definition('RollbarNotifier', array( + $config, + )); + $rollbarId = 'monolog.rollbar.notifier.'.sha1(json_encode($config)); + $rollbar->setPublic(false); + $container->setDefinition($rollbarId, $rollbar); + } + + $definition->setArguments(array( + new Reference($rollbarId), + $handler['level'], + $handler['bubble'], + )); + break; + case 'newrelic': + $definition->setArguments(array( + $handler['level'], + $handler['bubble'], + $handler['app_name'], + )); + break; + + // Handlers using the constructor of AbstractHandler without adding their own arguments + case 'browser_console': + case 'test': + case 'null': + case 'debug': + $definition->setArguments(array( + $handler['level'], + $handler['bubble'], + )); + break; + + default: + throw new \InvalidArgumentException(sprintf('Invalid handler type "%s" given for handler "%s"', $handler['type'], $name)); + } + + if (!empty($handler['nested']) && true === $handler['nested']) { + $this->markNestedHandler($handlerId); + } + + if (!empty($handler['formatter'])) { + $definition->addMethodCall('setFormatter', array(new Reference($handler['formatter']))); + } + $container->setDefinition($handlerId, $definition); + + return $handlerId; + } + + private function markNestedHandler($nestedHandlerId) + { + if (in_array($nestedHandlerId, $this->nestedHandlers)) { + return; + } + + $this->nestedHandlers[] = $nestedHandlerId; + } + + private function getHandlerId($name) + { + return sprintf('monolog.handler.%s', $name); + } + + private function getHandlerClassByType($handlerType) + { + $typeToClassMapping = array( + 'stream' => 'Monolog\Handler\StreamHandler', + 'console' => 'Symfony\Bridge\Monolog\Handler\ConsoleHandler', + 'group' => 'Monolog\Handler\GroupHandler', + 'buffer' => 'Monolog\Handler\BufferHandler', + 'deduplication' => 'Monolog\Handler\DeduplicationHandler', + 'rotating_file' => 'Monolog\Handler\RotatingFileHandler', + 'syslog' => 'Monolog\Handler\SyslogHandler', + 'syslogudp' => 'Monolog\Handler\SyslogUdpHandler', + 'null' => 'Monolog\Handler\NullHandler', + 'test' => 'Monolog\Handler\TestHandler', + 'gelf' => 'Monolog\Handler\GelfHandler', + 'rollbar' => 'Monolog\Handler\RollbarHandler', + 'flowdock' => 'Monolog\Handler\FlowdockHandler', + 'browser_console' => 'Monolog\Handler\BrowserConsoleHandler', + 'firephp' => 'Symfony\Bridge\Monolog\Handler\FirePHPHandler', + 'chromephp' => 'Symfony\Bridge\Monolog\Handler\ChromePhpHandler', + 'debug' => 'Symfony\Bridge\Monolog\Handler\DebugHandler', + 'swift_mailer' => 'Symfony\Bridge\Monolog\Handler\SwiftMailerHandler', + 'native_mailer' => 'Monolog\Handler\NativeMailerHandler', + 'socket' => 'Monolog\Handler\SocketHandler', + 'pushover' => 'Monolog\Handler\PushoverHandler', + 'raven' => 'Monolog\Handler\RavenHandler', + 'newrelic' => 'Monolog\Handler\NewRelicHandler', + 'hipchat' => 'Monolog\Handler\HipChatHandler', + 'slack' => 'Monolog\Handler\SlackHandler', + 'slackwebhook' => 'Monolog\Handler\SlackWebhookHandler', + 'slackbot' => 'Monolog\Handler\SlackbotHandler', + 'cube' => 'Monolog\Handler\CubeHandler', + 'amqp' => 'Monolog\Handler\AmqpHandler', + 'error_log' => 'Monolog\Handler\ErrorLogHandler', + 'loggly' => 'Monolog\Handler\LogglyHandler', + 'logentries' => 'Monolog\Handler\LogEntriesHandler', + 'whatfailuregroup' => 'Monolog\Handler\WhatFailureGroupHandler', + 'fingers_crossed' => 'Monolog\Handler\FingersCrossedHandler', + 'filter' => 'Monolog\Handler\FilterHandler', + 'mongo' => 'Monolog\Handler\MongoDBHandler', + 'elasticsearch' => 'Monolog\Handler\ElasticSearchHandler', + ); + + if (!isset($typeToClassMapping[$handlerType])) { + throw new \InvalidArgumentException(sprintf('There is no handler class defined for handler "%s".', $handlerType)); + } + + return $typeToClassMapping[$handlerType]; + } +} diff --git a/vendor/symfony/monolog-bundle/LICENSE b/vendor/symfony/monolog-bundle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..cdffe7aebc04acd5c2b9c3042a0923d8e8f31998 --- /dev/null +++ b/vendor/symfony/monolog-bundle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2012 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/vendor/symfony/monolog-bundle/MonologBundle.php b/vendor/symfony/monolog-bundle/MonologBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..ba159196d042481cdcae09041d8ec2394ea519f9 --- /dev/null +++ b/vendor/symfony/monolog-bundle/MonologBundle.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\MonologBundle; + +use Monolog\Formatter\JsonFormatter; +use Monolog\Formatter\LineFormatter; +use Monolog\Handler\HandlerInterface; +use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\AddSwiftMailerTransportPass; +use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\LoggerChannelPass; +use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\DebugHandlerPass; +use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\AddProcessorsPass; +use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\FixEmptyLoggerPass; + +/** + * Bundle. + * + * @author Jordi Boggiano + */ +class MonologBundle extends Bundle +{ + public function build(ContainerBuilder $container) + { + parent::build($container); + + $container->addCompilerPass($channelPass = new LoggerChannelPass()); + if (!class_exists('Symfony\Bridge\Monolog\Processor\DebugProcessor') || !class_exists('Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddDebugLogProcessorPass')) { + $container->addCompilerPass(new DebugHandlerPass($channelPass)); + } + $container->addCompilerPass(new FixEmptyLoggerPass($channelPass)); + $container->addCompilerPass(new AddProcessorsPass()); + $container->addCompilerPass(new AddSwiftMailerTransportPass()); + } + + /** + * @internal + */ + public static function includeStacktraces(HandlerInterface $handler) + { + $formatter = $handler->getFormatter(); + if ($formatter instanceof LineFormatter || $formatter instanceof JsonFormatter) { + $formatter->includeStacktraces(); + } + } +} diff --git a/vendor/symfony/monolog-bundle/README.md b/vendor/symfony/monolog-bundle/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e8fd02aacf275fb66b6f81ba5af49d6aa08fa662 --- /dev/null +++ b/vendor/symfony/monolog-bundle/README.md @@ -0,0 +1,18 @@ +MonologBundle +============= + +The `MonologBundle` provides integration of the [Monolog](https://github.com/Seldaek/monolog) +library into the Symfony2 framework. + +As of v2.4.0 of the bundle, the release cycle is de-synchronized from the framework's. +It means you can just require `"symfony/monolog-bundle": "~2.4"` in your composer.json +and Composer will automatically pick the latest version of the bundle that works with +your current version of Symfony. The minimum version of Symfony2 for this workflow +is 2.3.0. + +More information in the official [documentation](http://symfony.com/doc/current/cookbook/logging/index.html). + +License +======= + +This bundle is released under the [MIT license](LICENSE) diff --git a/vendor/symfony/monolog-bundle/Resources/config/monolog.xml b/vendor/symfony/monolog-bundle/Resources/config/monolog.xml new file mode 100644 index 0000000000000000000000000000000000000000..ae5a6cec58d3dd732c75da676c94c63cd9533021 --- /dev/null +++ b/vendor/symfony/monolog-bundle/Resources/config/monolog.xml @@ -0,0 +1,38 @@ + + + + + + + app + + %monolog.use_microseconds% + + + + + + + + + + + + + + + + + + + + + + + + app + + + diff --git a/vendor/symfony/monolog-bundle/Resources/config/schema/monolog-1.0.xsd b/vendor/symfony/monolog-bundle/Resources/config/schema/monolog-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..12fe3f8a8220099989d8c25c368090dec6a0341d --- /dev/null +++ b/vendor/symfony/monolog-bundle/Resources/config/schema/monolog-1.0.xsd @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/monolog-bundle/SwiftMailer/MessageFactory.php b/vendor/symfony/monolog-bundle/SwiftMailer/MessageFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..f2db249758fbef66fad5fa55cf0f088b293f331d --- /dev/null +++ b/vendor/symfony/monolog-bundle/SwiftMailer/MessageFactory.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\MonologBundle\SwiftMailer; + +/** + * Helps create Swift_Message objects, lazily + * + * @author Ryan Weaver + */ +class MessageFactory +{ + private $mailer; + + private $fromEmail; + + private $toEmail; + + private $subject; + + private $contentType; + + public function __construct(\Swift_Mailer $mailer, $fromEmail, $toEmail, $subject, $contentType = null) + { + $this->mailer = $mailer; + $this->fromEmail = $fromEmail; + $this->toEmail = $toEmail; + $this->subject = $subject; + $this->contentType = $contentType; + } + + /** + * Creates a Swift_Message template that will be used to send the log message + * + * @param string $content formatted email body to be sent + * @param array $records Log records that formed the content + * @return \Swift_Message + */ + public function createMessage($content, array $records) + { + /** @var \Swift_Message $message */ + $message = $this->mailer->createMessage(); + $message->setTo($this->toEmail); + $message->setFrom($this->fromEmail); + $message->setSubject($this->subject); + + if ($this->contentType) { + $message->setContentType($this->contentType); + } + + return $message; + } +} diff --git a/vendor/symfony/monolog-bundle/composer.json b/vendor/symfony/monolog-bundle/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..1e4f120f5c343bc857b4b04852ccdb4977f548e2 --- /dev/null +++ b/vendor/symfony/monolog-bundle/composer.json @@ -0,0 +1,39 @@ +{ + "name": "symfony/monolog-bundle", + "type": "symfony-bundle", + "description": "Symfony MonologBundle", + "keywords": ["log", "logging"], + "homepage": "http://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.2", + "symfony/monolog-bridge": "~2.7|~3.0", + "symfony/dependency-injection": "~2.7|~3.0", + "symfony/config": "~2.7|~3.0", + "symfony/http-kernel": "~2.7|~3.0", + "monolog/monolog": "~1.22" + }, + "require-dev": { + "symfony/yaml": "~2.3|~3.0", + "symfony/console": "~2.3|~3.0", + "phpunit/phpunit": "^4.8" + }, + "autoload": { + "psr-4": { "Symfony\\Bundle\\MonologBundle\\": "" } + }, + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + } +} diff --git a/vendor/symfony/monolog-bundle/phpunit.xml.dist b/vendor/symfony/monolog-bundle/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..90560f7764204e1824065302942536e2d5f732b0 --- /dev/null +++ b/vendor/symfony/monolog-bundle/phpunit.xml.dist @@ -0,0 +1,20 @@ + + + + + + ./Tests + + + + + + . + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/phpunit-bridge/ClockMock.php b/vendor/symfony/phpunit-bridge/ClockMock.php new file mode 100644 index 0000000000000000000000000000000000000000..60d19ffc5f0c75826e9f05c9debc4c0289b56d43 --- /dev/null +++ b/vendor/symfony/phpunit-bridge/ClockMock.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\Bridge\PhpUnit; + +/** + * @author Nicolas Grekas + */ +class ClockMock +{ + private static $now; + + public static function withClockMock($enable = null) + { + if (null === $enable) { + return null !== self::$now; + } + + self::$now = is_numeric($enable) ? (float) $enable : ($enable ? microtime(true) : null); + } + + public static function time() + { + if (null === self::$now) { + return \time(); + } + + return (int) self::$now; + } + + public static function sleep($s) + { + if (null === self::$now) { + return \sleep($s); + } + + self::$now += (int) $s; + + return 0; + } + + public static function usleep($us) + { + if (null === self::$now) { + return \usleep($us); + } + + self::$now += $us / 1000000; + } + + public static function microtime($asFloat = false) + { + if (null === self::$now) { + return \microtime($asFloat); + } + + if ($asFloat) { + return self::$now; + } + + return sprintf("%0.6f %d\n", self::$now - (int) self::$now, (int) self::$now); + } + + public static function register($class) + { + $self = get_called_class(); + + $mockedNs = array(substr($class, 0, strrpos($class, '\\'))); + if (0 < strpos($class, '\\Tests\\')) { + $ns = str_replace('\\Tests\\', '\\', $class); + $mockedNs[] = substr($ns, 0, strrpos($ns, '\\')); + } elseif (0 === strpos($class, 'Tests\\')) { + $mockedNs[] = substr($class, 6, strrpos($class, '\\') - 6); + } + foreach ($mockedNs as $ns) { + if (function_exists($ns.'\time')) { + continue; + } + eval(<< + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit; + +/** + * Catch deprecation notices and print a summary report at the end of the test suite. + * + * @author Nicolas Grekas + */ +class DeprecationErrorHandler +{ + const MODE_WEAK = 'weak'; + const MODE_DISABLED = 'disabled'; + + private static $isRegistered = false; + + /** + * Registers and configures the deprecation handler. + * + * The following reporting modes are supported: + * - use "weak" to hide the deprecation report but keep a global count; + * - use "/some-regexp/" to stop the test suite whenever a deprecation + * message matches the given regular expression; + * - use a number to define the upper bound of allowed deprecations, + * making the test suite fail whenever more notices are trigerred. + * + * @param int|string|false $mode The reporting mode, defaults to not allowing any deprecations + */ + public static function register($mode = 0) + { + if (self::$isRegistered) { + return; + } + + $getMode = function () use ($mode) { + static $memoizedMode = false; + + if (false !== $memoizedMode) { + return $memoizedMode; + } + if (false === $mode) { + $mode = getenv('SYMFONY_DEPRECATIONS_HELPER'); + } + if (DeprecationErrorHandler::MODE_WEAK !== $mode && (!isset($mode[0]) || '/' !== $mode[0])) { + $mode = preg_match('/^[1-9][0-9]*$/', $mode) ? (int) $mode : 0; + } + + return $memoizedMode = $mode; + }; + + $deprecations = array( + 'unsilencedCount' => 0, + 'remainingCount' => 0, + 'legacyCount' => 0, + 'otherCount' => 0, + 'unsilenced' => array(), + 'remaining' => array(), + 'legacy' => array(), + 'other' => array(), + ); + $deprecationHandler = function ($type, $msg, $file, $line, $context) use (&$deprecations, $getMode) { + $mode = $getMode(); + if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === $mode) { + return \PHPUnit_Util_ErrorHandler::handleError($type, $msg, $file, $line, $context); + } + + $trace = debug_backtrace(true); + $group = 'other'; + + $i = count($trace); + while (1 < $i && (!isset($trace[--$i]['class']) || ('ReflectionMethod' === $trace[$i]['class'] || 0 === strpos($trace[$i]['class'], 'PHPUnit_')))) { + // No-op + } + + if (isset($trace[$i]['object']) || isset($trace[$i]['class'])) { + $class = isset($trace[$i]['object']) ? get_class($trace[$i]['object']) : $trace[$i]['class']; + $method = $trace[$i]['function']; + + if (0 !== error_reporting()) { + $group = 'unsilenced'; + } elseif (0 === strpos($method, 'testLegacy') + || 0 === strpos($method, 'provideLegacy') + || 0 === strpos($method, 'getLegacy') + || strpos($class, '\Legacy') + || in_array('legacy', \PHPUnit_Util_Test::getGroups($class, $method), true) + ) { + $group = 'legacy'; + } else { + $group = 'remaining'; + } + + if (isset($mode[0]) && '/' === $mode[0] && preg_match($mode, $msg)) { + $e = new \Exception($msg); + $r = new \ReflectionProperty($e, 'trace'); + $r->setAccessible(true); + $r->setValue($e, array_slice($trace, 1, $i)); + + echo "\n".ucfirst($group).' deprecation triggered by '.$class.'::'.$method.':'; + echo "\n".$msg; + echo "\nStack trace:"; + echo "\n".str_replace(' '.getcwd().DIRECTORY_SEPARATOR, ' ', $e->getTraceAsString()); + echo "\n"; + + exit(1); + } + if ('legacy' !== $group && DeprecationErrorHandler::MODE_WEAK !== $mode) { + $ref = &$deprecations[$group][$msg]['count']; + ++$ref; + $ref = &$deprecations[$group][$msg][$class.'::'.$method]; + ++$ref; + } + } elseif (DeprecationErrorHandler::MODE_WEAK !== $mode) { + $ref = &$deprecations[$group][$msg]['count']; + ++$ref; + } + ++$deprecations[$group.'Count']; + }; + $oldErrorHandler = set_error_handler($deprecationHandler); + + if (null !== $oldErrorHandler) { + restore_error_handler(); + if (array('PHPUnit_Util_ErrorHandler', 'handleError') === $oldErrorHandler) { + restore_error_handler(); + self::register($mode); + } + } else { + self::$isRegistered = true; + if (self::hasColorSupport()) { + $colorize = function ($str, $red) { + $color = $red ? '41;37' : '43;30'; + + return "\x1B[{$color}m{$str}\x1B[0m"; + }; + } else { + $colorize = function ($str) { return $str; }; + } + register_shutdown_function(function () use ($getMode, &$deprecations, $deprecationHandler, $colorize) { + $mode = $getMode(); + if (isset($mode[0]) && '/' === $mode[0]) { + return; + } + $currErrorHandler = set_error_handler('var_dump'); + restore_error_handler(); + + if (DeprecationErrorHandler::MODE_WEAK === $mode) { + $colorize = function ($str) { return $str; }; + } + if ($currErrorHandler !== $deprecationHandler) { + echo "\n", $colorize('THE ERROR HANDLER HAS CHANGED!', true), "\n"; + } + + $cmp = function ($a, $b) { + return $b['count'] - $a['count']; + }; + + foreach (array('unsilenced', 'remaining', 'legacy', 'other') as $group) { + if ($deprecations[$group.'Count']) { + echo "\n", $colorize(sprintf('%s deprecation notices (%d)', ucfirst($group), $deprecations[$group.'Count']), 'legacy' !== $group), "\n"; + + uasort($deprecations[$group], $cmp); + + foreach ($deprecations[$group] as $msg => $notices) { + echo "\n", rtrim($msg, '.'), ': ', $notices['count'], "x\n"; + + arsort($notices); + + foreach ($notices as $method => $count) { + if ('count' !== $method) { + echo ' ', $count, 'x in ', preg_replace('/(.*)\\\\(.*?::.*?)$/', '$2 from $1', $method), "\n"; + } + } + } + } + } + if (!empty($notices)) { + echo "\n"; + } + + if (DeprecationErrorHandler::MODE_WEAK !== $mode && $mode < $deprecations['unsilencedCount'] + $deprecations['remainingCount'] + $deprecations['otherCount']) { + exit(1); + } + }); + } + } + + private static function hasColorSupport() + { + if ('\\' === DIRECTORY_SEPARATOR) { + return + '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM'); + } + + return defined('STDOUT') && function_exists('posix_isatty') && @posix_isatty(STDOUT); + } +} diff --git a/vendor/symfony/phpunit-bridge/DnsMock.php b/vendor/symfony/phpunit-bridge/DnsMock.php new file mode 100644 index 0000000000000000000000000000000000000000..a85ec977c71ddbf71cd1312cc3f4c461c0dfde36 --- /dev/null +++ b/vendor/symfony/phpunit-bridge/DnsMock.php @@ -0,0 +1,226 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit; + +/** + * @author Nicolas Grekas + */ +class DnsMock +{ + private static $hosts = array(); + private static $dnsTypes = array( + 'A' => DNS_A, + 'MX' => DNS_MX, + 'NS' => DNS_NS, + 'SOA' => DNS_SOA, + 'PTR' => DNS_PTR, + 'CNAME' => DNS_CNAME, + 'AAAA' => DNS_AAAA, + 'A6' => DNS_A6, + 'SRV' => DNS_SRV, + 'NAPTR' => DNS_NAPTR, + 'TXT' => DNS_TXT, + 'HINFO' => DNS_HINFO, + ); + + /** + * Configures the mock values for DNS queries. + * + * @param array $hosts Mocked hosts as keys, arrays of DNS records as returned by dns_get_record() as values + */ + public static function withMockedHosts(array $hosts) + { + self::$hosts = $hosts; + } + + public static function checkdnsrr($hostname, $type = 'MX') + { + if (!self::$hosts) { + return \checkdnsrr($hostname, $type); + } + if (isset(self::$hosts[$hostname])) { + $type = strtoupper($type); + + foreach (self::$hosts[$hostname] as $record) { + if ($record['type'] === $type) { + return true; + } + if ('ANY' === $type && isset(self::$dnsTypes[$record['type']]) && 'HINFO' !== $record['type']) { + return true; + } + } + } + + return false; + } + + public static function getmxrr($hostname, &$mxhosts, &$weight = null) + { + if (!self::$hosts) { + return \getmxrr($hostname, $mxhosts, $weight); + } + $mxhosts = $weight = array(); + + if (isset(self::$hosts[$hostname])) { + foreach (self::$hosts[$hostname] as $record) { + if ('MX' === $record['type']) { + $mxhosts[] = $record['host']; + $weight[] = $record['pri']; + } + } + } + + return (bool) $mxhosts; + } + + public static function gethostbyaddr($ipAddress) + { + if (!self::$hosts) { + return \gethostbyaddr($ipAddress); + } + foreach (self::$hosts as $hostname => $records) { + foreach ($records as $record) { + if ('A' === $record['type'] && $ipAddress === $record['ip']) { + return $hostname; + } + if ('AAAA' === $record['type'] && $ipAddress === $record['ipv6']) { + return $hostname; + } + } + } + + return $ipAddress; + } + + public static function gethostbyname($hostname) + { + if (!self::$hosts) { + return \gethostbyname($hostname); + } + if (isset(self::$hosts[$hostname])) { + foreach (self::$hosts[$hostname] as $record) { + if ('A' === $record['type']) { + return $record['ip']; + } + } + } + + return $hostname; + } + + public static function gethostbynamel($hostname) + { + if (!self::$hosts) { + return \gethostbynamel($hostname); + } + $ips = false; + + if (isset(self::$hosts[$hostname])) { + $ips = array(); + + foreach (self::$hosts[$hostname] as $record) { + if ('A' === $record['type']) { + $ips[] = $record['ip']; + } + } + } + + return $ips; + } + + public static function dns_get_record($hostname, $type = DNS_ANY, &$authns = null, &$addtl = null, $raw = false) + { + if (!self::$hosts) { + return \dns_get_record($hostname, $type, $authns, $addtl, $raw); + } + + $records = false; + + if (isset(self::$hosts[$hostname])) { + if (DNS_ANY === $type) { + $type = DNS_ALL; + } + $records = array(); + + foreach (self::$hosts[$hostname] as $record) { + if (isset(self::$dnsTypes[$record['type']]) && (self::$dnsTypes[$record['type']] & $type)) { + $records[] = array_merge(array('host' => $hostname, 'class' => 'IN', 'ttl' => 1, 'type' => $record['type']), $record); + } + } + } + + return $records; + } + + public static function register($class) + { + $self = get_called_class(); + + $mockedNs = array(substr($class, 0, strrpos($class, '\\'))); + if (0 < strpos($class, '\\Tests\\')) { + $ns = str_replace('\\Tests\\', '\\', $class); + $mockedNs[] = substr($ns, 0, strrpos($ns, '\\')); + } elseif (0 === strpos($class, 'Tests\\')) { + $mockedNs[] = substr($class, 6, strrpos($class, '\\') - 6); + } + foreach ($mockedNs as $ns) { + if (function_exists($ns.'\checkdnsrr')) { + continue; + } + eval(<< + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit; + +use Doctrine\Common\Annotations\AnnotationRegistry; + +if (!class_exists('PHPUnit_Framework_BaseTestListener')) { + return; +} + +/** + * Collects and replays skipped tests. + * + * @author Nicolas Grekas + */ +class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener +{ + private static $globallyEnabled = false; + private $state = -1; + private $skippedFile = false; + private $wasSkipped = array(); + private $isSkipped = array(); + private $expectedDeprecations = array(); + private $gatheredDeprecations = array(); + private $previousErrorHandler; + + /** + * @param array $mockedNamespaces List of namespaces, indexed by mocked features (time-sensitive or dns-sensitive) + */ + public function __construct(array $mockedNamespaces = array()) + { + \PHPUnit_Util_Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\DeprecationErrorHandler'] = 1; + \PHPUnit_Util_Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\SymfonyTestsListener'] = 1; + + $warn = false; + foreach ($mockedNamespaces as $type => $namespaces) { + if (!is_array($namespaces)) { + $namespaces = array($namespaces); + } + if (is_int($type)) { + // @deprecated BC with v2.8 to v3.0 + $type = 'time-sensitive'; + $warn = true; + } + if ('time-sensitive' === $type) { + foreach ($namespaces as $ns) { + ClockMock::register($ns.'\DummyClass'); + } + } + if ('dns-sensitive' === $type) { + foreach ($namespaces as $ns) { + DnsMock::register($ns.'\DummyClass'); + } + } + } + if (self::$globallyEnabled) { + $this->state = -2; + } else { + self::$globallyEnabled = true; + if ($warn) { + echo "Clock-mocked namespaces for SymfonyTestsListener need to be nested in a \"time-sensitive\" key. This will be enforced in Symfony 4.0.\n"; + } + } + } + + public function __destruct() + { + if (0 < $this->state) { + file_put_contents($this->skippedFile, 'isSkipped, true).';'); + } + } + + public function globalListenerDisabled() + { + self::$globallyEnabled = false; + $this->state = -1; + } + + public function startTestSuite(\PHPUnit_Framework_TestSuite $suite) + { + $suiteName = $suite->getName(); + + if (-1 === $this->state) { + echo "Testing $suiteName\n"; + $this->state = 0; + + if (!class_exists('Doctrine\Common\Annotations\AnnotationRegistry', false) && class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) { + AnnotationRegistry::registerLoader('class_exists'); + } + + if ($this->skippedFile = getenv('SYMFONY_PHPUNIT_SKIPPED_TESTS')) { + $this->state = 1; + + if (file_exists($this->skippedFile)) { + $this->state = 2; + + if (!$this->wasSkipped = require $this->skippedFile) { + echo "All tests already ran successfully.\n"; + $suite->setTests(array()); + } + } + } + $testSuites = array($suite); + for ($i = 0; isset($testSuites[$i]); ++$i) { + foreach ($testSuites[$i]->tests() as $test) { + if ($test instanceof \PHPUnit_Framework_TestSuite) { + if (!class_exists($test->getName(), false)) { + $testSuites[] = $test; + continue; + } + $groups = \PHPUnit_Util_Test::getGroups($test->getName()); + if (in_array('time-sensitive', $groups, true)) { + ClockMock::register($test->getName()); + } + if (in_array('dns-sensitive', $groups, true)) { + DnsMock::register($test->getName()); + } + } + } + } + } elseif (2 === $this->state) { + $skipped = array(); + foreach ($suite->tests() as $test) { + if (!$test instanceof \PHPUnit_Framework_TestCase + || isset($this->wasSkipped[$suiteName]['*']) + || isset($this->wasSkipped[$suiteName][$test->getName()])) { + $skipped[] = $test; + } + } + $suite->setTests($skipped); + } + } + + public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $time) + { + if (0 < $this->state) { + if ($test instanceof \PHPUnit_Framework_TestCase) { + $class = get_class($test); + $method = $test->getName(); + } else { + $class = $test->getName(); + $method = '*'; + } + + $this->isSkipped[$class][$method] = 1; + } + } + + public function startTest(\PHPUnit_Framework_Test $test) + { + if (-2 < $this->state && $test instanceof \PHPUnit_Framework_TestCase) { + $groups = \PHPUnit_Util_Test::getGroups(get_class($test), $test->getName(false)); + + if (in_array('time-sensitive', $groups, true)) { + ClockMock::register(get_class($test)); + ClockMock::withClockMock(true); + } + if (in_array('dns-sensitive', $groups, true)) { + DnsMock::register(get_class($test)); + } + + $annotations = \PHPUnit_Util_Test::parseTestMethodAnnotations(get_class($test), $test->getName(false)); + + if (isset($annotations['class']['expectedDeprecation'])) { + $test->getTestResultObject()->addError($test, new \PHPUnit_Framework_AssertionFailedError('`@expectedDeprecation` annotations are not allowed at the class level.'), 0); + } + if (isset($annotations['method']['expectedDeprecation'])) { + if (!in_array('legacy', $groups, true)) { + $test->getTestResultObject()->addError($test, new \PHPUnit_Framework_AssertionFailedError('Only tests with the `@group legacy` annotation can have `@expectedDeprecation`.'), 0); + } + $this->expectedDeprecations = $annotations['method']['expectedDeprecation']; + $this->previousErrorHandler = set_error_handler(array($this, 'handleError')); + } + } + } + + public function endTest(\PHPUnit_Framework_Test $test, $time) + { + if ($this->expectedDeprecations) { + if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE), true)) { + $test->addToAssertionCount(count($this->expectedDeprecations)); + } + + restore_error_handler(); + + if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE, \PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE, \PHPUnit_Runner_BaseTestRunner::STATUS_ERROR), true)) { + try { + $prefix = "@expectedDeprecation:\n"; + $test->assertStringMatchesFormat($prefix.'%A '.implode("\n%A ", $this->expectedDeprecations)."\n%A", $prefix.' '.implode("\n ", $this->gatheredDeprecations)."\n"); + } catch (\PHPUnit_Framework_AssertionFailedError $e) { + $test->getTestResultObject()->addFailure($test, $e, $time); + } + } + + $this->expectedDeprecations = $this->gatheredDeprecations = array(); + $this->previousErrorHandler = null; + } + if (-2 < $this->state && $test instanceof \PHPUnit_Framework_TestCase) { + $groups = \PHPUnit_Util_Test::getGroups(get_class($test), $test->getName(false)); + + if (in_array('time-sensitive', $groups, true)) { + ClockMock::withClockMock(false); + } + if (in_array('dns-sensitive', $groups, true)) { + DnsMock::withMockedHosts(array()); + } + } + } + + public function handleError($type, $msg, $file, $line, $context) + { + if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) { + $h = $this->previousErrorHandler; + + return $h ? $h($type, $msg, $file, $line, $context) : false; + } + if (error_reporting()) { + $msg = 'Unsilenced deprecation: '.$msg; + } + $this->gatheredDeprecations[] = $msg; + } +} diff --git a/vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/default.phpt b/vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/default.phpt new file mode 100644 index 0000000000000000000000000000000000000000..cd733724870cdb0f252b9b42b86e4d64a4ec7b89 --- /dev/null +++ b/vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/default.phpt @@ -0,0 +1,82 @@ +--TEST-- +Test DeprecationErrorHandler in default mode +--FILE-- +testLegacyFoo(); +$foo->testNonLegacyBar(); + +?> +--EXPECTF-- +Unsilenced deprecation notices (3) + +unsilenced foo deprecation: 2x + 2x in FooTestCase::testLegacyFoo + +unsilenced bar deprecation: 1x + 1x in FooTestCase::testNonLegacyBar + +Remaining deprecation notices (1) + +silenced bar deprecation: 1x + 1x in FooTestCase::testNonLegacyBar + +Legacy deprecation notices (1) + +Other deprecation notices (1) + +root deprecation: 1x + diff --git a/vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/disabled.phpt b/vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/disabled.phpt new file mode 100644 index 0000000000000000000000000000000000000000..0115bbd24259a8c949c356863c35d872acdfc2f0 --- /dev/null +++ b/vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/disabled.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test DeprecationErrorHandler in weak mode +--FILE-- + +--EXPECTF-- +00 diff --git a/vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/regexp.phpt b/vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/regexp.phpt new file mode 100644 index 0000000000000000000000000000000000000000..3b7207b85f8ee01d5641640722bf11e4ecd5039c --- /dev/null +++ b/vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/regexp.phpt @@ -0,0 +1,40 @@ +--TEST-- +Test DeprecationErrorHandler in weak mode +--FILE-- +testLegacyFoo(); + +?> +--EXPECTF-- +Legacy deprecation triggered by FooTestCase::testLegacyFoo: +silenced foo deprecation +Stack trace: +#%A(%d): FooTestCase->testLegacyFoo() +#%d {main} + diff --git a/vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/weak.phpt b/vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/weak.phpt new file mode 100644 index 0000000000000000000000000000000000000000..9e78d96e70efb0cb9bddbf0a7de674a4972dcba5 --- /dev/null +++ b/vendor/symfony/phpunit-bridge/Tests/DeprecationErrorHandler/weak.phpt @@ -0,0 +1,40 @@ +--TEST-- +Test DeprecationErrorHandler in weak mode +--FILE-- +testLegacyFoo(); + +?> +--EXPECTF-- +Unsilenced deprecation notices (1) + +Legacy deprecation notices (1) + +Other deprecation notices (1) + diff --git a/vendor/symfony/phpunit-bridge/Tests/DnsMockTest.php b/vendor/symfony/phpunit-bridge/Tests/DnsMockTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a178ac7e898c7621f939f730cc1f56a6f397a472 --- /dev/null +++ b/vendor/symfony/phpunit-bridge/Tests/DnsMockTest.php @@ -0,0 +1,148 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\PhpUnit\DnsMock; + +class DnsMockTest extends TestCase +{ + protected function tearDown() + { + DnsMock::withMockedHosts(array()); + } + + public function testCheckdnsrr() + { + DnsMock::withMockedHosts(array('example.com' => array(array('type' => 'MX')))); + $this->assertTrue(DnsMock::checkdnsrr('example.com')); + + DnsMock::withMockedHosts(array('example.com' => array(array('type' => 'A')))); + $this->assertFalse(DnsMock::checkdnsrr('example.com')); + $this->assertTrue(DnsMock::checkdnsrr('example.com', 'a')); + $this->assertTrue(DnsMock::checkdnsrr('example.com', 'any')); + $this->assertFalse(DnsMock::checkdnsrr('foobar.com', 'ANY')); + } + + public function testGetmxrr() + { + DnsMock::withMockedHosts(array( + 'example.com' => array(array( + 'type' => 'MX', + 'host' => 'mx.example.com', + 'pri' => 10, + )), + )); + + $this->assertFalse(DnsMock::getmxrr('foobar.com', $mxhosts, $weight)); + $this->assertTrue(DnsMock::getmxrr('example.com', $mxhosts, $weight)); + $this->assertSame(array('mx.example.com'), $mxhosts); + $this->assertSame(array(10), $weight); + } + + public function testGethostbyaddr() + { + DnsMock::withMockedHosts(array( + 'example.com' => array( + array( + 'type' => 'A', + 'ip' => '1.2.3.4', + ), + array( + 'type' => 'AAAA', + 'ipv6' => '::12', + ), + ), + )); + + $this->assertSame('::21', DnsMock::gethostbyaddr('::21')); + $this->assertSame('example.com', DnsMock::gethostbyaddr('::12')); + $this->assertSame('example.com', DnsMock::gethostbyaddr('1.2.3.4')); + } + + public function testGethostbyname() + { + DnsMock::withMockedHosts(array( + 'example.com' => array( + array( + 'type' => 'AAAA', + 'ipv6' => '::12', + ), + array( + 'type' => 'A', + 'ip' => '1.2.3.4', + ), + ), + )); + + $this->assertSame('foobar.com', DnsMock::gethostbyname('foobar.com')); + $this->assertSame('1.2.3.4', DnsMock::gethostbyname('example.com')); + } + + public function testGethostbynamel() + { + DnsMock::withMockedHosts(array( + 'example.com' => array( + array( + 'type' => 'A', + 'ip' => '1.2.3.4', + ), + array( + 'type' => 'A', + 'ip' => '2.3.4.5', + ), + ), + )); + + $this->assertFalse(DnsMock::gethostbynamel('foobar.com')); + $this->assertSame(array('1.2.3.4', '2.3.4.5'), DnsMock::gethostbynamel('example.com')); + } + + public function testDnsGetRecord() + { + DnsMock::withMockedHosts(array( + 'example.com' => array( + array( + 'type' => 'A', + 'ip' => '1.2.3.4', + ), + array( + 'type' => 'PTR', + 'ip' => '2.3.4.5', + ), + ), + )); + + $records = array( + array( + 'host' => 'example.com', + 'class' => 'IN', + 'ttl' => 1, + 'type' => 'A', + 'ip' => '1.2.3.4', + ), + $ptr = array( + 'host' => 'example.com', + 'class' => 'IN', + 'ttl' => 1, + 'type' => 'PTR', + 'ip' => '2.3.4.5', + ), + ); + + $this->assertFalse(DnsMock::dns_get_record('foobar.com')); + $this->assertSame($records, DnsMock::dns_get_record('example.com')); + $this->assertSame($records, DnsMock::dns_get_record('example.com', DNS_ALL)); + $this->assertSame($records, DnsMock::dns_get_record('example.com', DNS_A | DNS_PTR)); + $this->assertSame(array($ptr), DnsMock::dns_get_record('example.com', DNS_PTR)); + } +} diff --git a/vendor/symfony/phpunit-bridge/TextUI/Command.php b/vendor/symfony/phpunit-bridge/TextUI/Command.php new file mode 100644 index 0000000000000000000000000000000000000000..d4ffeac3fd9828103a4f3a0823f8ccb6f89ac664 --- /dev/null +++ b/vendor/symfony/phpunit-bridge/TextUI/Command.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\Bridge\PhpUnit\TextUI; + +if (!class_exists('PHPUnit_TextUI_Command')) { + return; +} + +/** + * {@inheritdoc} + */ +class Command extends \PHPUnit_TextUI_Command +{ + /** + * {@inheritdoc} + */ + protected function createRunner() + { + return new TestRunner($this->arguments['loader']); + } +} diff --git a/vendor/symfony/phpunit-bridge/TextUI/TestRunner.php b/vendor/symfony/phpunit-bridge/TextUI/TestRunner.php new file mode 100644 index 0000000000000000000000000000000000000000..eaad394d980f012b00ccf8f73668f7dbce501ddc --- /dev/null +++ b/vendor/symfony/phpunit-bridge/TextUI/TestRunner.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit\TextUI; + +use Symfony\Bridge\PhpUnit\SymfonyTestsListener; + +if (!class_exists('PHPUnit_TextUI_TestRunner')) { + return; +} + +/** + * {@inheritdoc} + */ +class TestRunner extends \PHPUnit_TextUI_TestRunner +{ + /** + * {@inheritdoc} + */ + protected function handleConfiguration(array &$arguments) + { + $listener = new SymfonyTestsListener(); + + $result = parent::handleConfiguration($arguments); + + $arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : array(); + + $registeredLocally = false; + + foreach ($arguments['listeners'] as $registeredListener) { + if ($registeredListener instanceof SymfonyTestsListener) { + $registeredListener->globalListenerDisabled(); + $registeredLocally = true; + break; + } + } + + if (!$registeredLocally) { + $arguments['listeners'][] = $listener; + } + + return $result; + } +} diff --git a/vendor/symfony/phpunit-bridge/bin/simple-phpunit b/vendor/symfony/phpunit-bridge/bin/simple-phpunit new file mode 100755 index 0000000000000000000000000000000000000000..17e971bb432d477622c434a82fb9cc41e5a8fc19 --- /dev/null +++ b/vendor/symfony/phpunit-bridge/bin/simple-phpunit @@ -0,0 +1,212 @@ +#!/usr/bin/env php + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +// Please update when phpunit needs to be reinstalled with fresh deps: +// Cache-Id-Version: 2016-10-20 14:00 UTC + +error_reporting(-1); + +// PHPUnit 4.8 does not support PHP 7, while 5.1 requires PHP 5.6+ +$PHPUNIT_VERSION = PHP_VERSION_ID >= 50600 ? getenv('SYMFONY_PHPUNIT_VERSION') ?: '5.4' : '4.8'; +$oldPwd = getcwd(); +$PHPUNIT_DIR = getenv('SYMFONY_PHPUNIT_DIR') ?: (__DIR__.'/.phpunit'); +$PHP = defined('PHP_BINARY') ? PHP_BINARY : 'php'; +$PHP = escapeshellarg($PHP); +if ('phpdbg' === PHP_SAPI) { + $PHP .= ' -qrr'; +} + +$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar') || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar`)) + ? $PHP.' '.escapeshellarg($COMPOSER) + : 'composer'; + +if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__FILE__)."\n".getenv('SYMFONY_PHPUNIT_REMOVE') !== @file_get_contents("$PHPUNIT_DIR/.$PHPUNIT_VERSION.md5")) { + // Build a standalone phpunit without symfony/yaml nor prophecy by default + + @mkdir($PHPUNIT_DIR); + chdir($PHPUNIT_DIR); + if (file_exists("phpunit-$PHPUNIT_VERSION")) { + passthru(sprintf('\\' === DIRECTORY_SEPARATOR ? '(del /S /F /Q %s & rmdir %1$s) >nul': 'rm -rf %s', "phpunit-$PHPUNIT_VERSION")); + } + if (extension_loaded('openssl') && ini_get('allow_url_fopen') && !isset($_SERVER['http_proxy']) && !isset($_SERVER['https_proxy'])) { + stream_copy_to_stream(fopen("https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip", 'rb'), fopen("$PHPUNIT_VERSION.zip", 'wb')); + } else { + @unlink("$PHPUNIT_VERSION.zip"); + passthru("wget https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip"); + } + if (!class_exists('ZipArchive')) { + throw new \Exception('simple-phpunit requires the "zip" PHP extension to be installed and enabled in order to uncompress the downloaded PHPUnit packages.'); + } + $zip = new ZipArchive(); + $zip->open("$PHPUNIT_VERSION.zip"); + $zip->extractTo(getcwd()); + $zip->close(); + chdir("phpunit-$PHPUNIT_VERSION"); + passthru("$COMPOSER remove --no-update ".(getenv('SYMFONY_PHPUNIT_REMOVE') ?: 'phpspec/prophecy symfony/yaml')); + if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) { + passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\""); + } + passthru("$COMPOSER require --no-update symfony/phpunit-bridge \">=3.2@dev\""); + $prevRoot = getenv('COMPOSER_ROOT_VERSION'); + putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION"); + $exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", array(), $p, getcwd(), null, array('bypass_shell' => true))); + putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : '')); + if ($exit) { + exit($exit); + } + file_put_contents('phpunit', <<<'EOPHP' +setMaxDepth(getenv('SYMFONY_PHPUNIT_MAX_DEPTH') ?: 3); + + foreach ($finder as $file => $fileInfo) { + if ('phpunit.xml.dist' === $file) { + $components[] = dirname($fileInfo->getPathname()); + } + } + if ($components) { + array_shift($cmd); + } +} + +$cmd[0] = sprintf('%s %s --colors=always', $PHP, escapeshellarg("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit")); +$cmd = str_replace('%', '%%', implode(' ', $cmd)).' %1$s'; + +if ('\\' === DIRECTORY_SEPARATOR) { + $cmd = 'cmd /v:on /d /c "('.$cmd.')%2$s"'; +} else { + $cmd .= '%2$s'; +} + +if ($components) { + $skippedTests = isset($_SERVER['SYMFONY_PHPUNIT_SKIPPED_TESTS']) ? $_SERVER['SYMFONY_PHPUNIT_SKIPPED_TESTS'] : false; + $runningProcs = array(); + + foreach ($components as $component) { + // Run phpunit tests in parallel + + if ($skippedTests) { + putenv("SYMFONY_PHPUNIT_SKIPPED_TESTS=$component/$skippedTests"); + } + + $c = escapeshellarg($component); + + if ($proc = proc_open(sprintf($cmd, $c, " > $c/phpunit.stdout 2> $c/phpunit.stderr"), array(), $pipes)) { + $runningProcs[$component] = $proc; + } else { + $exit = 1; + echo "\033[41mKO\033[0m $component\n\n"; + } + } + + // Fixes for colors support on appveyor + // See https://github.com/appveyor/ci/issues/373 + $colorFixes = array( + array("S\033[0m\033[0m\033[36m\033[1mS", "E\033[0m\033[0m\033[31m\033[1mE", "I\033[0m\033[0m\033[33m\033[1mI", "F\033[0m\033[0m\033[41m\033[37mF"), + array("SS", "EE", "II", "FF"), + ); + $colorFixes[0] = array_merge($colorFixes[0], $colorFixes[0]); + $colorFixes[1] = array_merge($colorFixes[1], $colorFixes[1]); + + while ($runningProcs) { + usleep(300000); + $terminatedProcs = array(); + foreach ($runningProcs as $component => $proc) { + $procStatus = proc_get_status($proc); + if (!$procStatus['running']) { + $terminatedProcs[$component] = $procStatus['exitcode']; + unset($runningProcs[$component]); + proc_close($proc); + } + } + + foreach ($terminatedProcs as $component => $procStatus) { + foreach (array('out', 'err') as $file) { + $file = "$component/phpunit.std$file"; + + if ('\\' === DIRECTORY_SEPARATOR) { + $h = fopen($file, 'rb'); + while (false !== $line = fgets($h)) { + echo str_replace($colorFixes[0], $colorFixes[1], preg_replace( + '/(\033\[[0-9]++);([0-9]++m)(?:(.)(\033\[0m))?/', + "$1m\033[$2$3$4$4", + $line + )); + } + fclose($h); + } else { + readfile($file); + } + unlink($file); + } + + // Fail on any individual component failures but ignore some error codes on Windows when APCu is enabled: + // STATUS_STACK_BUFFER_OVERRUN (-1073740791/0xC0000409) + // STATUS_ACCESS_VIOLATION (-1073741819/0xC0000005) + // STATUS_HEAP_CORRUPTION (-1073740940/0xC0000374) + if ($procStatus && ('\\' !== DIRECTORY_SEPARATOR || !extension_loaded('apcu') || !ini_get('apc.enable_cli') || !in_array($procStatus, array(-1073740791, -1073741819, -1073740940)))) { + $exit = $procStatus; + echo "\033[41mKO\033[0m $component\n\n"; + } else { + echo "\033[32mOK\033[0m $component\n\n"; + } + } + } +} elseif (!isset($argv[1]) || 'install' !== $argv[1] || file_exists('install')) { + // Run regular phpunit in a subprocess + + $errFile = tempnam(sys_get_temp_dir(), 'phpunit.stderr.'); + if ($proc = proc_open(sprintf($cmd, '', ' 2> '.escapeshellarg($errFile)), array(1 => array('pipe', 'w')), $pipes)) { + stream_copy_to_stream($pipes[1], STDOUT); + fclose($pipes[1]); + $exit = proc_close($proc); + + readfile($errFile); + unlink($errFile); + } + + if (!file_exists($component = array_pop($argv))) { + $component = basename($oldPwd); + } + + if ($exit) { + echo "\033[41mKO\033[0m $component\n\n"; + } else { + echo "\033[32mOK\033[0m $component\n\n"; + } +} + +exit($exit); diff --git a/vendor/symfony/phpunit-bridge/bootstrap.php b/vendor/symfony/phpunit-bridge/bootstrap.php new file mode 100644 index 0000000000000000000000000000000000000000..5e2ed0ca85f82767879a2f0abe899ea4caa38114 --- /dev/null +++ b/vendor/symfony/phpunit-bridge/bootstrap.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Doctrine\Common\Annotations\AnnotationRegistry; +use Symfony\Bridge\PhpUnit\DeprecationErrorHandler; + +// Detect if we're loaded by an actual run of phpunit +if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists('PHPUnit_TextUI_Command', false)) { + return; +} + +// Enforce a consistent locale +setlocale(LC_ALL, 'C'); + +if (!class_exists('Doctrine\Common\Annotations\AnnotationRegistry', false) && class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) { + AnnotationRegistry::registerLoader('class_exists'); +} + +if ('disabled' !== getenv('SYMFONY_DEPRECATIONS_HELPER')) { + DeprecationErrorHandler::register(getenv('SYMFONY_DEPRECATIONS_HELPER')); +} diff --git a/vendor/symfony/phpunit-bridge/composer.json b/vendor/symfony/phpunit-bridge/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..9918f85fc734c9fad51033931b12e5bc5346ce41 --- /dev/null +++ b/vendor/symfony/phpunit-bridge/composer.json @@ -0,0 +1,46 @@ +{ + "name": "symfony/phpunit-bridge", + "type": "symfony-bridge", + "description": "Symfony PHPUnit Bridge", + "keywords": [], + "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 EVEN ON LATEST SYMFONY VERSIONS TO ALLOW USING", + "php": "THIS BRIDGE WHEN TESTING LOWEST SYMFONY VERSIONS.", + "php": ">=5.3.3" + }, + "suggest": { + "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader", + "ext-zip": "Zip support is required when using bin/simple-phpunit" + }, + "conflict": { + "phpunit/phpunit": ">=6.0" + }, + "autoload": { + "files": [ "bootstrap.php" ], + "psr-4": { "Symfony\\Bridge\\PhpUnit\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "bin": [ + "bin/simple-phpunit" + ], + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/phpunit-bridge/phpunit.xml.dist b/vendor/symfony/phpunit-bridge/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..9b64b02947c0e55b3ff42909a36de0d432d6f8a6 --- /dev/null +++ b/vendor/symfony/phpunit-bridge/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + ./Tests/DeprecationErrorHandler/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/polyfill-apcu/LICENSE b/vendor/symfony/polyfill-apcu/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..0564c5a9b7f1feca345587b3472dc56d062e2c48 --- /dev/null +++ b/vendor/symfony/polyfill-apcu/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 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/vendor/symfony/polyfill-apcu/README.md b/vendor/symfony/polyfill-apcu/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e614bcab51c12ff5b22e60223566c81302d08542 --- /dev/null +++ b/vendor/symfony/polyfill-apcu/README.md @@ -0,0 +1,12 @@ +Symfony Polyfill / APCu +======================== + +This component provides `apcu_*` functions and the `APCUIterator` class to users of the legacy APC 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/vendor/symfony/polyfill-apcu/bootstrap.php b/vendor/symfony/polyfill-apcu/bootstrap.php new file mode 100644 index 0000000000000000000000000000000000000000..a5682af55ddf0fdd85d798c007606e210ad888be --- /dev/null +++ b/vendor/symfony/polyfill-apcu/bootstrap.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (!extension_loaded('apc')) { + return; +} + +if (!function_exists('apcu_add')) { + function apcu_add($key, $var = null, $ttl = 0) { return apc_add($key, $var, $ttl); } + function apcu_cache_info($limited = false) { return apc_cache_info('user', $limited); } + function apcu_cas($key, $old, $new) { return apc_cas($key, $old, $new); } + function apcu_clear_cache() { return apc_clear_cache('user'); } + function apcu_dec($key, $step = 1, &$success = false) { return apc_dec($key, $step, $success); } + function apcu_delete($key) { return apc_delete($key); } + function apcu_exists($keys) { return apc_exists($keys); } + function apcu_fetch($key, &$success = false) { return apc_fetch($key, $success); } + function apcu_inc($key, $step = 1, &$success = false) { return apc_inc($key, $step, $success); } + function apcu_sma_info($limited = false) { return apc_sma_info($limited); } + function apcu_store($key, $var = null, $ttl = 0) { return apc_store($key, $var, $ttl); } +} + +if (!class_exists('APCUIterator', false) && class_exists('APCIterator', false)) { + class APCUIterator extends APCIterator + { + public function __construct($search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE) + { + parent::__construct('user', $search, $format, $chunk_size, $list); + } + } +} diff --git a/vendor/symfony/polyfill-apcu/composer.json b/vendor/symfony/polyfill-apcu/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..cb8df8bdb21f030aa4faa4786ad8a6686f43f56a --- /dev/null +++ b/vendor/symfony/polyfill-apcu/composer.json @@ -0,0 +1,30 @@ +{ + "name": "symfony/polyfill-apcu", + "type": "library", + "description": "Symfony polyfill backporting apcu_* functions to lower PHP versions", + "keywords": ["polyfill", "shim", "compatibility", "portable", "apcu"], + "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": { + "files": [ "bootstrap.php" ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + } +} diff --git a/vendor/symfony/polyfill-intl-icu/LICENSE b/vendor/symfony/polyfill-intl-icu/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..39fa189d2b5fc989ceb996d94bb19b91bd4a7866 --- /dev/null +++ b/vendor/symfony/polyfill-intl-icu/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-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/vendor/symfony/polyfill-intl-icu/README.md b/vendor/symfony/polyfill-intl-icu/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e7768aaace4074ffc39bf973fe8c9d776410b635 --- /dev/null +++ b/vendor/symfony/polyfill-intl-icu/README.md @@ -0,0 +1,23 @@ +Symfony Polyfill / Intl: ICU +============================ + +This component provides a collection of functions/classes using the +[`symfony/intl`](https://github.com/symfony/intl) package when the +[Intl](http://php.net/intl) extension is not installed, including: + +- [`intl_is_failure()`](http://php.net/manual/en/function.intl-is-failure.php) +- [`intl_get_error_code()`](http://php.net/manual/en/function.intl-get-error-code.php) +- [`intl_get_error_message()`](http://php.net/manual/en/function.intl-get-error-message.php) +- [`intl_error_name()`](http://php.net/manual/en/function.intl-error-name.php) +- [`Collator`](http://php.net/Collator) +- [`NumberFormatter`](http://php.net/NumberFormatter) +- [`Locale`](http://php.net/Locale) +- [`IntlDateFormatter`](http://php.net/IntlDateFormatter) + +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/vendor/symfony/polyfill-intl-icu/bootstrap.php b/vendor/symfony/polyfill-intl-icu/bootstrap.php new file mode 100644 index 0000000000000000000000000000000000000000..e51ba5e593adfb77bc4cba64b889622d44f2ca36 --- /dev/null +++ b/vendor/symfony/polyfill-intl-icu/bootstrap.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Component\Intl\Globals\IntlGlobals; + +if (!function_exists('intl_is_failure')) { + function intl_is_failure($errorCode) { return IntlGlobals::isFailure($errorCode); } + function intl_get_error_code() { return IntlGlobals::getErrorCode(); } + function intl_get_error_message() { return IntlGlobals::getErrorMessage(); } + function intl_error_name($errorCode) { return IntlGlobals::getErrorName($errorCode); } +} diff --git a/vendor/symfony/polyfill-intl-icu/composer.json b/vendor/symfony/polyfill-intl-icu/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..896aca220d02d2b3b784db508914a3101dd8ead1 --- /dev/null +++ b/vendor/symfony/polyfill-intl-icu/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/polyfill-intl-icu", + "type": "library", + "description": "Symfony polyfill for intl's ICU-related data and classes", + "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "icu"], + "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", + "symfony/intl": "~2.3|~3.0" + }, + "autoload": { + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-intl": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + } +} diff --git a/vendor/symfony/polyfill-mbstring/LICENSE b/vendor/symfony/polyfill-mbstring/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..39fa189d2b5fc989ceb996d94bb19b91bd4a7866 --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-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/vendor/symfony/polyfill-mbstring/Mbstring.php b/vendor/symfony/polyfill-mbstring/Mbstring.php new file mode 100644 index 0000000000000000000000000000000000000000..934cfcff07b22db90d1a4a7e9cc59f0c6c6b3ce8 --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -0,0 +1,650 @@ + + * + * 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_convert_case - Perform case folding on a string + * - 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_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 anothers + * - 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_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference + * - 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_convert_case($s, $mode, $encoding = null) + { + if ('' === $s .= '') { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + if (MB_CASE_TITLE == $mode) { + $s = preg_replace_callback('/\b\p{Ll}/u', array(__CLASS__, 'title_case_upper'), $s); + $s = preg_replace_callback('/\B[\p{Lu}\p{Lt}]+/u', array(__CLASS__, 'title_case_lower'), $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; + } + case 'ASCII': + case 'UTF8': + case 'UTF-8': + } + } + + self::$encodingList = $encodingList; + + return true; + } + + public static function mb_strlen($s, $encoding = null) + { + switch ($encoding = self::getEncoding($encoding)) { + case 'ASCII': + case 'CP850': + return strlen($s); + } + + return @iconv_strlen($s, $encoding); + } + + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + + 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 ($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_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 ($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 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); + $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); + } + + $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($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_lower($s) + { + return self::mb_convert_case($s[0], MB_CASE_LOWER, 'UTF-8'); + } + + private static function title_case_upper($s) + { + return self::mb_convert_case($s[0], MB_CASE_UPPER, '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/vendor/symfony/polyfill-mbstring/README.md b/vendor/symfony/polyfill-mbstring/README.md new file mode 100644 index 0000000000000000000000000000000000000000..342e8286dbf694422c31e61b1a5bdf16f71785b4 --- /dev/null +++ b/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/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100644 index 0000000000000000000000000000000000000000..3ca16416a82580b15bd446ba5cf75dc3d87fa922 --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1101 @@ + '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', + 'Ä´' => 'ĵ', + 'Ķ' => 'Ä·', + 'Ĺ' => 'ĺ', + 'Ä»' => 'ļ', + 'Ľ' => 'ľ', + 'Ä¿' => 'Å€', + 'Å' => 'Å‚', + 'Ń' => 'Å„', + 'Å…' => 'ņ', + 'Ň' => 'ň', + 'ÅŠ' => 'Å‹', + 'ÅŒ' => 'Å', + 'ÅŽ' => 'Å', + 'Å' => 'Å‘', + 'Å’' => 'Å“', + 'Å”' => 'Å•', + 'Å–' => 'Å—', + 'Ř' => 'Å™', + 'Åš' => 'Å›', + 'Åœ' => 'Å', + 'Åž' => 'ÅŸ', + 'Å ' => 'Å¡', + 'Å¢' => 'Å£', + 'Ť' => 'Å¥', + 'Ŧ' => 'ŧ', + 'Ũ' => 'Å©', + 'Ū' => 'Å«', + 'Ŭ' => 'Å­', + 'Å®' => 'ů', + 'Ű' => 'ű', + 'Ų' => 'ų', + 'Å´' => 'ŵ', + 'Ŷ' => 'Å·', + 'Ÿ' => 'ÿ', + 'Ź' => 'ź', + 'Å»' => 'ż', + 'Ž' => 'ž', + 'Æ' => 'É“', + 'Æ‚' => 'ƃ', + 'Æ„' => 'Æ…', + 'Ɔ' => 'É”', + 'Ƈ' => 'ƈ', + 'Ɖ' => 'É–', + 'ÆŠ' => 'É—', + 'Æ‹' => 'ÆŒ', + 'ÆŽ' => 'Ç', + 'Æ' => 'É™', + 'Æ' => 'É›', + 'Æ‘' => 'Æ’', + 'Æ“' => 'É ', + 'Æ”' => 'É£', + 'Æ–' => 'É©', + 'Æ—' => 'ɨ', + 'Ƙ' => 'Æ™', + 'Æœ' => 'ɯ', + 'Æ' => 'ɲ', + 'ÆŸ' => 'ɵ', + 'Æ ' => 'Æ¡', + 'Æ¢' => 'Æ£', + 'Ƥ' => 'Æ¥', + 'Ʀ' => 'Ê€', + 'Ƨ' => 'ƨ', + 'Æ©' => 'ʃ', + 'Ƭ' => 'Æ­', + 'Æ®' => 'ʈ', + 'Ư' => 'ư', + 'Ʊ' => 'ÊŠ', + 'Ʋ' => 'Ê‹', + 'Ƴ' => 'Æ´', + 'Ƶ' => 'ƶ', + 'Æ·' => 'Ê’', + 'Ƹ' => 'ƹ', + 'Ƽ' => 'ƽ', + 'Ç„' => 'dž', + 'Ç…' => 'dž', + 'LJ' => 'lj', + 'Lj' => 'lj', + 'ÇŠ' => 'ÇŒ', + 'Ç‹' => 'ÇŒ', + 'Ç' => 'ÇŽ', + 'Ç' => 'Ç', + 'Ç‘' => 'Ç’', + 'Ç“' => 'Ç”', + 'Ç•' => 'Ç–', + 'Ç—' => 'ǘ', + 'Ç™' => 'Çš', + 'Ç›' => 'Çœ', + 'Çž' => 'ÇŸ', + 'Ç ' => 'Ç¡', + 'Ç¢' => 'Ç£', + 'Ǥ' => 'Ç¥', + 'Ǧ' => 'ǧ', + 'Ǩ' => 'Ç©', + 'Ǫ' => 'Ç«', + 'Ǭ' => 'Ç­', + 'Ç®' => 'ǯ', + 'DZ' => 'dz', + 'Dz' => 'dz', + 'Ç´' => 'ǵ', + 'Ƕ' => 'Æ•', + 'Ç·' => 'Æ¿', + 'Ǹ' => 'ǹ', + 'Ǻ' => 'Ç»', + 'Ǽ' => 'ǽ', + 'Ǿ' => 'Ç¿', + 'È€' => 'È', + 'È‚' => 'ȃ', + 'È„' => 'È…', + 'Ȇ' => 'ȇ', + 'Ȉ' => 'ȉ', + 'ÈŠ' => 'È‹', + 'ÈŒ' => 'È', + 'ÈŽ' => 'È', + 'È' => 'È‘', + 'È’' => 'È“', + 'È”' => 'È•', + 'È–' => 'È—', + 'Ș' => 'È™', + 'Èš' => 'È›', + 'Èœ' => 'È', + 'Èž' => 'ÈŸ', + 'È ' => 'Æž', + 'È¢' => 'È£', + 'Ȥ' => 'È¥', + 'Ȧ' => 'ȧ', + 'Ȩ' => 'È©', + 'Ȫ' => 'È«', + 'Ȭ' => 'È­', + 'È®' => 'ȯ', + 'Ȱ' => 'ȱ', + 'Ȳ' => 'ȳ', + 'Ⱥ' => 'â±¥', + 'È»' => 'ȼ', + 'Ƚ' => 'Æš', + 'Ⱦ' => 'ⱦ', + 'É' => 'É‚', + 'Ƀ' => 'Æ€', + 'É„' => 'ʉ', + 'É…' => 'ÊŒ', + 'Ɇ' => 'ɇ', + 'Ɉ' => 'ɉ', + 'ÉŠ' => 'É‹', + 'ÉŒ' => 'É', + 'ÉŽ' => 'É', + 'Ͱ' => 'ͱ', + 'Ͳ' => 'ͳ', + 'Ͷ' => 'Í·', + 'Í¿' => 'ϳ', + 'Ά' => 'ά', + 'Έ' => 'έ', + 'Ή' => 'ή', + 'Ί' => 'ί', + 'ÎŒ' => 'ÏŒ', + 'ÎŽ' => 'Ï', + 'Î' => 'ÏŽ', + 'Α' => 'α', + 'Î’' => 'β', + 'Γ' => 'γ', + 'Δ' => 'δ', + 'Ε' => 'ε', + 'Ζ' => 'ζ', + 'Η' => 'η', + 'Θ' => 'θ', + 'Ι' => 'ι', + 'Κ' => 'κ', + 'Λ' => 'λ', + 'Μ' => 'μ', + 'Î' => 'ν', + 'Ξ' => 'ξ', + 'Ο' => 'ο', + 'Π' => 'Ï€', + 'Ρ' => 'Ï', + 'Σ' => 'σ', + 'Τ' => 'Ï„', + 'Î¥' => 'Ï…', + 'Φ' => 'φ', + 'Χ' => 'χ', + 'Ψ' => 'ψ', + 'Ω' => 'ω', + 'Ϊ' => 'ÏŠ', + 'Ϋ' => 'Ï‹', + 'Ï' => 'Ï—', + 'Ϙ' => 'Ï™', + 'Ïš' => 'Ï›', + 'Ïœ' => 'Ï', + 'Ïž' => 'ÏŸ', + 'Ï ' => 'Ï¡', + 'Ï¢' => 'Ï£', + 'Ϥ' => 'Ï¥', + 'Ϧ' => 'ϧ', + 'Ϩ' => 'Ï©', + 'Ϫ' => 'Ï«', + 'Ϭ' => 'Ï­', + 'Ï®' => 'ϯ', + 'Ï´' => 'θ', + 'Ï·' => 'ϸ', + 'Ϲ' => 'ϲ', + 'Ϻ' => 'Ï»', + 'Ͻ' => 'Í»', + 'Ͼ' => 'ͼ', + 'Ï¿' => 'ͽ', + 'Ѐ' => 'Ñ', + 'Ð' => 'Ñ‘', + 'Ђ' => 'Ñ’', + 'Ѓ' => 'Ñ“', + 'Є' => 'Ñ”', + 'Ð…' => 'Ñ•', + 'І' => 'Ñ–', + 'Ї' => 'Ñ—', + 'Ј' => 'ј', + 'Љ' => 'Ñ™', + 'Њ' => 'Ñš', + 'Ћ' => 'Ñ›', + 'ÐŒ' => 'Ñœ', + 'Ð' => 'Ñ', + 'ÐŽ' => 'Ñž', + 'Ð' => 'ÑŸ', + 'Ð' => 'а', + 'Б' => 'б', + 'Ð’' => 'в', + 'Г' => 'г', + 'Д' => 'д', + 'Е' => 'е', + 'Ж' => 'ж', + 'З' => 'з', + 'И' => 'и', + 'Й' => 'й', + 'К' => 'к', + 'Л' => 'л', + 'М' => 'м', + 'Ð' => 'н', + 'О' => 'о', + 'П' => 'п', + 'Р' => 'Ñ€', + 'С' => 'Ñ', + 'Т' => 'Ñ‚', + 'У' => 'у', + 'Ф' => 'Ñ„', + 'Ð¥' => 'Ñ…', + 'Ц' => 'ц', + 'Ч' => 'ч', + 'Ш' => 'ш', + 'Щ' => 'щ', + 'Ъ' => 'ÑŠ', + 'Ы' => 'Ñ‹', + 'Ь' => 'ÑŒ', + 'Э' => 'Ñ', + 'Ю' => 'ÑŽ', + 'Я' => 'Ñ', + 'Ñ ' => 'Ñ¡', + 'Ñ¢' => 'Ñ£', + 'Ѥ' => 'Ñ¥', + 'Ѧ' => 'ѧ', + 'Ѩ' => 'Ñ©', + 'Ѫ' => 'Ñ«', + 'Ѭ' => 'Ñ­', + 'Ñ®' => 'ѯ', + 'Ѱ' => 'ѱ', + 'Ѳ' => 'ѳ', + 'Ñ´' => 'ѵ', + 'Ѷ' => 'Ñ·', + 'Ѹ' => 'ѹ', + 'Ѻ' => 'Ñ»', + 'Ѽ' => 'ѽ', + 'Ѿ' => 'Ñ¿', + 'Ò€' => 'Ò', + 'ÒŠ' => 'Ò‹', + 'ÒŒ' => 'Ò', + 'ÒŽ' => 'Ò', + 'Ò' => 'Ò‘', + 'Ò’' => 'Ò“', + 'Ò”' => 'Ò•', + 'Ò–' => 'Ò—', + 'Ò˜' => 'Ò™', + 'Òš' => 'Ò›', + 'Òœ' => 'Ò', + 'Òž' => 'ÒŸ', + 'Ò ' => 'Ò¡', + 'Ò¢' => 'Ò£', + 'Ò¤' => 'Ò¥', + 'Ò¦' => 'Ò§', + 'Ò¨' => 'Ò©', + 'Òª' => 'Ò«', + 'Ò¬' => 'Ò­', + 'Ò®' => 'Ò¯', + 'Ò°' => 'Ò±', + 'Ò²' => 'Ò³', + 'Ò´' => 'Òµ', + 'Ò¶' => 'Ò·', + 'Ò¸' => 'Ò¹', + 'Òº' => 'Ò»', + 'Ò¼' => 'Ò½', + 'Ò¾' => 'Ò¿', + 'Ó€' => 'Ó', + 'Ó' => 'Ó‚', + 'Óƒ' => 'Ó„', + 'Ó…' => 'Ó†', + 'Ó‡' => 'Óˆ', + 'Ó‰' => 'ÓŠ', + 'Ó‹' => 'ÓŒ', + 'Ó' => 'ÓŽ', + 'Ó' => 'Ó‘', + 'Ó’' => 'Ó“', + 'Ó”' => 'Ó•', + 'Ó–' => 'Ó—', + 'Ó˜' => 'Ó™', + 'Óš' => 'Ó›', + 'Óœ' => 'Ó', + 'Óž' => 'ÓŸ', + 'Ó ' => 'Ó¡', + 'Ó¢' => 'Ó£', + 'Ó¤' => 'Ó¥', + 'Ó¦' => 'Ó§', + 'Ó¨' => 'Ó©', + 'Óª' => 'Ó«', + 'Ó¬' => 'Ó­', + 'Ó®' => 'Ó¯', + 'Ó°' => 'Ó±', + 'Ó²' => 'Ó³', + 'Ó´' => 'Óµ', + 'Ó¶' => 'Ó·', + 'Ó¸' => 'Ó¹', + 'Óº' => 'Ó»', + 'Ó¼' => 'Ó½', + 'Ó¾' => 'Ó¿', + 'Ô€' => 'Ô', + 'Ô‚' => 'Ôƒ', + 'Ô„' => 'Ô…', + 'Ô†' => 'Ô‡', + 'Ôˆ' => 'Ô‰', + 'ÔŠ' => 'Ô‹', + 'ÔŒ' => 'Ô', + 'ÔŽ' => 'Ô', + 'Ô' => 'Ô‘', + 'Ô’' => 'Ô“', + 'Ô”' => 'Ô•', + 'Ô–' => 'Ô—', + 'Ô˜' => 'Ô™', + 'Ôš' => 'Ô›', + 'Ôœ' => 'Ô', + 'Ôž' => 'ÔŸ', + 'Ô ' => 'Ô¡', + 'Ô¢' => 'Ô£', + 'Ô¤' => 'Ô¥', + 'Ô¦' => 'Ô§', + 'Ô¨' => 'Ô©', + 'Ôª' => 'Ô«', + 'Ô¬' => 'Ô­', + 'Ô®' => 'Ô¯', + 'Ô±' => 'Õ¡', + 'Ô²' => 'Õ¢', + 'Ô³' => 'Õ£', + 'Ô´' => 'Õ¤', + 'Ôµ' => 'Õ¥', + 'Ô¶' => 'Õ¦', + 'Ô·' => 'Õ§', + 'Ô¸' => 'Õ¨', + 'Ô¹' => 'Õ©', + 'Ôº' => 'Õª', + 'Ô»' => 'Õ«', + 'Ô¼' => 'Õ¬', + 'Ô½' => 'Õ­', + 'Ô¾' => 'Õ®', + 'Ô¿' => 'Õ¯', + 'Õ€' => 'Õ°', + 'Õ' => 'Õ±', + 'Õ‚' => 'Õ²', + 'Õƒ' => 'Õ³', + 'Õ„' => 'Õ´', + 'Õ…' => 'Õµ', + 'Õ†' => 'Õ¶', + 'Õ‡' => 'Õ·', + 'Õˆ' => 'Õ¸', + 'Õ‰' => 'Õ¹', + 'ÕŠ' => 'Õº', + 'Õ‹' => 'Õ»', + 'ÕŒ' => 'Õ¼', + 'Õ' => 'Õ½', + 'ÕŽ' => 'Õ¾', + 'Õ' => 'Õ¿', + 'Õ' => 'Ö€', + 'Õ‘' => 'Ö', + 'Õ’' => 'Ö‚', + 'Õ“' => 'Öƒ', + 'Õ”' => 'Ö„', + 'Õ•' => 'Ö…', + 'Õ–' => 'Ö†', + 'á‚ ' => 'â´€', + 'á‚¡' => 'â´', + 'á‚¢' => 'â´‚', + 'á‚£' => 'â´ƒ', + 'Ⴄ' => 'â´„', + 'á‚¥' => 'â´…', + 'Ⴆ' => 'â´†', + 'á‚§' => 'â´‡', + 'Ⴈ' => 'â´ˆ', + 'á‚©' => 'â´‰', + 'Ⴊ' => 'â´Š', + 'á‚«' => 'â´‹', + 'Ⴌ' => 'â´Œ', + 'á‚­' => 'â´', + 'á‚®' => 'â´Ž', + 'Ⴏ' => 'â´', + 'á‚°' => 'â´', + 'Ⴑ' => 'â´‘', + 'Ⴒ' => 'â´’', + 'Ⴓ' => 'â´“', + 'á‚´' => 'â´”', + 'Ⴕ' => 'â´•', + 'á‚¶' => 'â´–', + 'á‚·' => 'â´—', + 'Ⴘ' => 'â´˜', + 'Ⴙ' => 'â´™', + 'Ⴚ' => 'â´š', + 'á‚»' => 'â´›', + 'Ⴜ' => 'â´œ', + 'Ⴝ' => 'â´', + 'Ⴞ' => 'â´ž', + 'á‚¿' => 'â´Ÿ', + 'Ⴠ' => 'â´ ', + 'áƒ' => 'â´¡', + 'Ⴢ' => 'â´¢', + 'Ⴣ' => 'â´£', + 'Ⴤ' => 'â´¤', + 'Ⴥ' => 'â´¥', + 'Ⴧ' => 'â´§', + 'áƒ' => 'â´­', + 'Ḁ' => 'á¸', + 'Ḃ' => 'ḃ', + 'Ḅ' => 'ḅ', + 'Ḇ' => 'ḇ', + 'Ḉ' => 'ḉ', + 'Ḋ' => 'ḋ', + 'Ḍ' => 'á¸', + 'Ḏ' => 'á¸', + 'á¸' => 'ḑ', + 'Ḓ' => 'ḓ', + 'Ḕ' => 'ḕ', + 'Ḗ' => 'ḗ', + 'Ḙ' => 'ḙ', + 'Ḛ' => 'ḛ', + 'Ḝ' => 'á¸', + 'Ḟ' => 'ḟ', + 'Ḡ' => 'ḡ', + 'Ḣ' => 'ḣ', + 'Ḥ' => 'ḥ', + 'Ḧ' => 'ḧ', + 'Ḩ' => 'ḩ', + 'Ḫ' => 'ḫ', + 'Ḭ' => 'ḭ', + 'Ḯ' => 'ḯ', + 'Ḱ' => 'ḱ', + 'Ḳ' => 'ḳ', + 'Ḵ' => 'ḵ', + 'Ḷ' => 'ḷ', + 'Ḹ' => 'ḹ', + 'Ḻ' => 'ḻ', + 'Ḽ' => 'ḽ', + 'Ḿ' => 'ḿ', + 'á¹€' => 'á¹', + 'Ṃ' => 'ṃ', + 'Ṅ' => 'á¹…', + 'Ṇ' => 'ṇ', + 'Ṉ' => 'ṉ', + 'Ṋ' => 'ṋ', + 'Ṍ' => 'á¹', + 'Ṏ' => 'á¹', + 'á¹' => 'ṑ', + 'á¹’' => 'ṓ', + 'á¹”' => 'ṕ', + 'á¹–' => 'á¹—', + 'Ṙ' => 'á¹™', + 'Ṛ' => 'á¹›', + 'Ṝ' => 'á¹', + 'Ṟ' => 'ṟ', + 'á¹ ' => 'ṡ', + 'á¹¢' => 'á¹£', + 'Ṥ' => 'á¹¥', + 'Ṧ' => 'á¹§', + 'Ṩ' => 'ṩ', + 'Ṫ' => 'ṫ', + 'Ṭ' => 'á¹­', + 'á¹®' => 'ṯ', + 'á¹°' => 'á¹±', + 'á¹²' => 'á¹³', + 'á¹´' => 'á¹µ', + 'á¹¶' => 'á¹·', + 'Ṹ' => 'á¹¹', + 'Ṻ' => 'á¹»', + 'á¹¼' => 'á¹½', + 'á¹¾' => 'ṿ', + 'Ẁ' => 'áº', + 'Ẃ' => 'ẃ', + 'Ẅ' => 'ẅ', + 'Ẇ' => 'ẇ', + 'Ẉ' => 'ẉ', + 'Ẋ' => 'ẋ', + 'Ẍ' => 'áº', + 'Ẏ' => 'áº', + 'áº' => 'ẑ', + 'Ẓ' => 'ẓ', + 'Ẕ' => 'ẕ', + 'ẞ' => 'ß', + 'Ạ' => 'ạ', + 'Ả' => 'ả', + 'Ấ' => 'ấ', + 'Ầ' => 'ầ', + 'Ẩ' => 'ẩ', + 'Ẫ' => 'ẫ', + 'Ậ' => 'ậ', + 'Ắ' => 'ắ', + 'Ằ' => 'ằ', + 'Ẳ' => 'ẳ', + 'Ẵ' => 'ẵ', + 'Ặ' => 'ặ', + 'Ẹ' => 'ẹ', + 'Ẻ' => 'ẻ', + 'Ẽ' => 'ẽ', + 'Ế' => 'ế', + 'Ề' => 'á»', + 'Ể' => 'ể', + 'Ễ' => 'á»…', + 'Ệ' => 'ệ', + 'Ỉ' => 'ỉ', + 'Ị' => 'ị', + 'Ọ' => 'á»', + 'Ỏ' => 'á»', + 'á»' => 'ố', + 'á»’' => 'ồ', + 'á»”' => 'ổ', + 'á»–' => 'á»—', + 'Ộ' => 'á»™', + 'Ớ' => 'á»›', + 'Ờ' => 'á»', + 'Ở' => 'ở', + 'á» ' => 'ỡ', + 'Ợ' => 'ợ', + 'Ụ' => 'ụ', + 'Ủ' => 'á»§', + 'Ứ' => 'ứ', + 'Ừ' => 'ừ', + 'Ử' => 'á»­', + 'á»®' => 'ữ', + 'á»°' => 'á»±', + 'Ỳ' => 'ỳ', + 'á»´' => 'ỵ', + 'á»¶' => 'á»·', + 'Ỹ' => 'ỹ', + 'Ỻ' => 'á»»', + 'Ỽ' => 'ỽ', + 'Ỿ' => 'ỿ', + 'Ἀ' => 'á¼€', + 'Ἁ' => 'á¼', + 'Ἂ' => 'ἂ', + 'Ἃ' => 'ἃ', + 'Ἄ' => 'ἄ', + 'á¼' => 'á¼…', + 'Ἆ' => 'ἆ', + 'á¼' => 'ἇ', + 'Ἐ' => 'á¼', + 'á¼™' => 'ἑ', + 'Ἒ' => 'á¼’', + 'á¼›' => 'ἓ', + 'Ἔ' => 'á¼”', + 'á¼' => 'ἕ', + 'Ἠ' => 'á¼ ', + 'Ἡ' => 'ἡ', + 'Ἢ' => 'á¼¢', + 'Ἣ' => 'á¼£', + 'Ἤ' => 'ἤ', + 'á¼­' => 'á¼¥', + 'á¼®' => 'ἦ', + 'Ἧ' => 'á¼§', + 'Ἰ' => 'á¼°', + 'á¼¹' => 'á¼±', + 'Ἲ' => 'á¼²', + 'á¼»' => 'á¼³', + 'á¼¼' => 'á¼´', + 'á¼½' => 'á¼µ', + 'á¼¾' => 'á¼¶', + 'Ἷ' => 'á¼·', + 'Ὀ' => 'á½€', + 'Ὁ' => 'á½', + 'Ὂ' => 'ὂ', + 'Ὃ' => 'ὃ', + 'Ὄ' => 'ὄ', + 'á½' => 'á½…', + 'á½™' => 'ὑ', + 'á½›' => 'ὓ', + 'á½' => 'ὕ', + 'Ὗ' => 'á½—', + 'Ὠ' => 'á½ ', + 'Ὡ' => 'ὡ', + 'Ὢ' => 'á½¢', + 'Ὣ' => 'á½£', + 'Ὤ' => 'ὤ', + 'á½­' => 'á½¥', + 'á½®' => 'ὦ', + 'Ὧ' => 'á½§', + 'ᾈ' => 'á¾€', + 'ᾉ' => 'á¾', + 'ᾊ' => 'ᾂ', + 'ᾋ' => 'ᾃ', + 'ᾌ' => 'ᾄ', + 'á¾' => 'á¾…', + 'ᾎ' => 'ᾆ', + 'á¾' => 'ᾇ', + 'ᾘ' => 'á¾', + 'á¾™' => 'ᾑ', + 'ᾚ' => 'á¾’', + 'á¾›' => 'ᾓ', + 'ᾜ' => 'á¾”', + 'á¾' => 'ᾕ', + 'ᾞ' => 'á¾–', + 'ᾟ' => 'á¾—', + 'ᾨ' => 'á¾ ', + 'ᾩ' => 'ᾡ', + 'ᾪ' => 'á¾¢', + 'ᾫ' => 'á¾£', + 'ᾬ' => 'ᾤ', + 'á¾­' => 'á¾¥', + 'á¾®' => 'ᾦ', + 'ᾯ' => 'á¾§', + 'Ᾰ' => 'á¾°', + 'á¾¹' => 'á¾±', + 'Ὰ' => 'á½°', + 'á¾»' => 'á½±', + 'á¾¼' => 'á¾³', + 'Ὲ' => 'á½²', + 'Έ' => 'á½³', + 'Ὴ' => 'á½´', + 'á¿‹' => 'á½µ', + 'ῌ' => 'ῃ', + 'Ῐ' => 'á¿', + 'á¿™' => 'á¿‘', + 'Ὶ' => 'á½¶', + 'á¿›' => 'á½·', + 'Ῠ' => 'á¿ ', + 'á¿©' => 'á¿¡', + 'Ὺ' => 'ὺ', + 'á¿«' => 'á½»', + 'Ῥ' => 'á¿¥', + 'Ὸ' => 'ὸ', + 'Ό' => 'á½¹', + 'Ὼ' => 'á½¼', + 'á¿»' => 'á½½', + 'ῼ' => 'ῳ', + 'Ω' => 'ω', + 'K' => 'k', + 'â„«' => 'Ã¥', + 'Ⅎ' => 'â…Ž', + 'â… ' => 'â…°', + 'â…¡' => 'â…±', + 'â…¢' => 'â…²', + 'â…£' => 'â…³', + 'â…¤' => 'â…´', + 'â…¥' => 'â…µ', + 'â…¦' => 'â…¶', + 'â…§' => 'â…·', + 'â…¨' => 'â…¸', + 'â…©' => 'â…¹', + 'â…ª' => 'â…º', + 'â…«' => 'â…»', + 'â…¬' => 'â…¼', + 'â…­' => 'â…½', + 'â…®' => 'â…¾', + 'â…¯' => 'â…¿', + 'Ↄ' => 'ↄ', + 'â’¶' => 'â“', + 'â’·' => 'â“‘', + 'â’¸' => 'â“’', + 'â’¹' => 'â““', + 'â’º' => 'â“”', + 'â’»' => 'â“•', + 'â’¼' => 'â“–', + 'â’½' => 'â“—', + 'â’¾' => 'ⓘ', + 'â’¿' => 'â“™', + 'â“€' => 'ⓚ', + 'â“' => 'â“›', + 'â“‚' => 'ⓜ', + 'Ⓝ' => 'â“', + 'â“„' => 'ⓞ', + 'â“…' => 'ⓟ', + 'Ⓠ' => 'â“ ', + 'Ⓡ' => 'â“¡', + 'Ⓢ' => 'â“¢', + 'Ⓣ' => 'â“£', + 'Ⓤ' => 'ⓤ', + 'â“‹' => 'â“¥', + 'Ⓦ' => 'ⓦ', + 'â“' => 'â“§', + 'Ⓨ' => 'ⓨ', + 'â“' => 'â“©', + 'â°€' => 'â°°', + 'â°' => 'â°±', + 'â°‚' => 'â°²', + 'â°ƒ' => 'â°³', + 'â°„' => 'â°´', + 'â°…' => 'â°µ', + 'â°†' => 'â°¶', + 'â°‡' => 'â°·', + 'â°ˆ' => 'â°¸', + 'â°‰' => 'â°¹', + 'â°Š' => 'â°º', + 'â°‹' => 'â°»', + 'â°Œ' => 'â°¼', + 'â°' => 'â°½', + 'â°Ž' => 'â°¾', + 'â°' => 'â°¿', + 'â°' => 'â±€', + 'â°‘' => 'â±', + 'â°’' => 'ⱂ', + 'â°“' => 'ⱃ', + 'â°”' => 'ⱄ', + 'â°•' => 'â±…', + 'â°–' => 'ⱆ', + 'â°—' => 'ⱇ', + 'â°˜' => 'ⱈ', + 'â°™' => 'ⱉ', + 'â°š' => 'ⱊ', + 'â°›' => 'ⱋ', + 'â°œ' => 'ⱌ', + 'â°' => 'â±', + 'â°ž' => 'ⱎ', + 'â°Ÿ' => 'â±', + 'â° ' => 'â±', + 'â°¡' => 'ⱑ', + 'â°¢' => 'â±’', + 'â°£' => 'ⱓ', + 'â°¤' => 'â±”', + 'â°¥' => 'ⱕ', + 'â°¦' => 'â±–', + 'â°§' => 'â±—', + 'â°¨' => 'ⱘ', + 'â°©' => 'â±™', + 'â°ª' => 'ⱚ', + 'â°«' => 'â±›', + 'â°¬' => 'ⱜ', + 'â°­' => 'â±', + 'â°®' => 'ⱞ', + 'â± ' => 'ⱡ', + 'â±¢' => 'É«', + 'â±£' => 'áµ½', + 'Ɽ' => 'ɽ', + 'â±§' => 'ⱨ', + 'Ⱪ' => 'ⱪ', + 'Ⱬ' => 'ⱬ', + 'â±­' => 'É‘', + 'â±®' => 'ɱ', + 'Ɐ' => 'É', + 'â±°' => 'É’', + 'â±²' => 'â±³', + 'â±µ' => 'â±¶', + 'â±¾' => 'È¿', + 'Ɀ' => 'É€', + 'â²€' => 'â²', + 'Ⲃ' => 'ⲃ', + 'Ⲅ' => 'â²…', + 'Ⲇ' => 'ⲇ', + 'Ⲉ' => 'ⲉ', + 'Ⲋ' => 'ⲋ', + 'Ⲍ' => 'â²', + 'Ⲏ' => 'â²', + 'â²' => 'ⲑ', + 'â²’' => 'ⲓ', + 'â²”' => 'ⲕ', + 'â²–' => 'â²—', + 'Ⲙ' => 'â²™', + 'Ⲛ' => 'â²›', + 'Ⲝ' => 'â²', + 'Ⲟ' => 'ⲟ', + 'â² ' => 'ⲡ', + 'â²¢' => 'â²£', + 'Ⲥ' => 'â²¥', + 'Ⲧ' => 'â²§', + 'Ⲩ' => 'ⲩ', + 'Ⲫ' => 'ⲫ', + 'Ⲭ' => 'â²­', + 'â²®' => 'ⲯ', + 'â²°' => 'â²±', + 'â²²' => 'â²³', + 'â²´' => 'â²µ', + 'â²¶' => 'â²·', + 'Ⲹ' => 'â²¹', + 'Ⲻ' => 'â²»', + 'â²¼' => 'â²½', + 'â²¾' => 'ⲿ', + 'â³€' => 'â³', + 'Ⳃ' => 'ⳃ', + 'Ⳅ' => 'â³…', + 'Ⳇ' => 'ⳇ', + 'Ⳉ' => 'ⳉ', + 'Ⳋ' => 'ⳋ', + 'Ⳍ' => 'â³', + 'Ⳏ' => 'â³', + 'â³' => 'ⳑ', + 'â³’' => 'ⳓ', + 'â³”' => 'ⳕ', + 'â³–' => 'â³—', + 'Ⳙ' => 'â³™', + 'Ⳛ' => 'â³›', + 'Ⳝ' => 'â³', + 'Ⳟ' => 'ⳟ', + 'â³ ' => 'ⳡ', + 'â³¢' => 'â³£', + 'Ⳬ' => 'ⳬ', + 'â³­' => 'â³®', + 'â³²' => 'â³³', + 'Ꙁ' => 'ê™', + 'Ꙃ' => 'ꙃ', + 'Ꙅ' => 'ê™…', + 'Ꙇ' => 'ꙇ', + 'Ꙉ' => 'ꙉ', + 'Ꙋ' => 'ꙋ', + 'Ꙍ' => 'ê™', + 'Ꙏ' => 'ê™', + 'ê™' => 'ꙑ', + 'ê™’' => 'ꙓ', + 'ê™”' => 'ꙕ', + 'ê™–' => 'ê™—', + 'Ꙙ' => 'ê™™', + 'Ꙛ' => 'ê™›', + 'Ꙝ' => 'ê™', + 'Ꙟ' => 'ꙟ', + 'ê™ ' => 'ꙡ', + 'Ꙣ' => 'ꙣ', + 'Ꙥ' => 'ꙥ', + 'Ꙧ' => 'ê™§', + 'Ꙩ' => 'ꙩ', + 'Ꙫ' => 'ꙫ', + 'Ꙭ' => 'ê™­', + 'Ꚁ' => 'êš', + 'êš‚' => 'ꚃ', + 'êš„' => 'êš…', + 'Ꚇ' => 'ꚇ', + 'Ꚉ' => 'ꚉ', + 'Ꚋ' => 'êš‹', + 'Ꚍ' => 'êš', + 'Ꚏ' => 'êš', + 'êš' => 'êš‘', + 'êš’' => 'êš“', + 'êš”' => 'êš•', + 'êš–' => 'êš—', + 'Ꚙ' => 'êš™', + 'êšš' => 'êš›', + 'Ꜣ' => 'ꜣ', + 'Ꜥ' => 'ꜥ', + 'Ꜧ' => 'ꜧ', + 'Ꜩ' => 'ꜩ', + 'Ꜫ' => 'ꜫ', + 'Ꜭ' => 'ꜭ', + 'Ꜯ' => 'ꜯ', + 'Ꜳ' => 'ꜳ', + 'Ꜵ' => 'ꜵ', + 'Ꜷ' => 'ꜷ', + 'Ꜹ' => 'ꜹ', + 'Ꜻ' => 'ꜻ', + 'Ꜽ' => 'ꜽ', + 'Ꜿ' => 'ꜿ', + 'ê€' => 'ê', + 'ê‚' => 'êƒ', + 'ê„' => 'ê…', + 'ê†' => 'ê‡', + 'êˆ' => 'ê‰', + 'êŠ' => 'ê‹', + 'êŒ' => 'ê', + 'êŽ' => 'ê', + 'ê' => 'ê‘', + 'ê’' => 'ê“', + 'ê”' => 'ê•', + 'ê–' => 'ê—', + 'ê˜' => 'ê™', + 'êš' => 'ê›', + 'êœ' => 'ê', + 'êž' => 'êŸ', + 'ê ' => 'ê¡', + 'ê¢' => 'ê£', + 'ê¤' => 'ê¥', + 'ê¦' => 'ê§', + 'ê¨' => 'ê©', + 'êª' => 'ê«', + 'ê¬' => 'ê­', + 'ê®' => 'ê¯', + 'ê¹' => 'êº', + 'ê»' => 'ê¼', + 'ê½' => 'áµ¹', + 'ê¾' => 'ê¿', + 'Ꞁ' => 'êž', + 'êž‚' => 'ꞃ', + 'êž„' => 'êž…', + 'Ꞇ' => 'ꞇ', + 'êž‹' => 'ꞌ', + 'êž' => 'É¥', + 'êž' => 'êž‘', + 'êž’' => 'êž“', + 'êž–' => 'êž—', + 'Ꞙ' => 'êž™', + 'êžš' => 'êž›', + 'êžœ' => 'êž', + 'êžž' => 'ꞟ', + 'êž ' => 'êž¡', + 'Ꞣ' => 'ꞣ', + 'Ꞥ' => 'ꞥ', + 'Ꞧ' => 'êž§', + 'Ꞩ' => 'êž©', + 'Ɦ' => 'ɦ', + 'êž«' => 'Éœ', + 'Ɡ' => 'É¡', + 'êž­' => 'ɬ', + 'êž°' => 'Êž', + 'êž±' => 'ʇ', + 'A' => 'ï½', + 'ï¼¢' => 'b', + 'ï¼£' => 'c', + 'D' => 'd', + 'ï¼¥' => 'ï½…', + 'F' => 'f', + 'ï¼§' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'ï¼­' => 'ï½', + 'ï¼®' => 'n', + 'O' => 'ï½', + 'ï¼°' => 'ï½', + 'ï¼±' => 'q', + 'ï¼²' => 'ï½’', + 'ï¼³' => 's', + 'ï¼´' => 'ï½”', + 'ï¼µ' => 'u', + 'ï¼¶' => 'ï½–', + 'ï¼·' => 'ï½—', + 'X' => 'x', + 'ï¼¹' => 'ï½™', + 'Z' => 'z', + 'ð€' => 'ð¨', + 'ð' => 'ð©', + 'ð‚' => 'ðª', + 'ðƒ' => 'ð«', + 'ð„' => 'ð¬', + 'ð…' => 'ð­', + 'ð†' => 'ð®', + 'ð‡' => 'ð¯', + 'ðˆ' => 'ð°', + 'ð‰' => 'ð±', + 'ðŠ' => 'ð²', + 'ð‹' => 'ð³', + 'ðŒ' => 'ð´', + 'ð' => 'ðµ', + 'ðŽ' => 'ð¶', + 'ð' => 'ð·', + 'ð' => 'ð¸', + 'ð‘' => 'ð¹', + 'ð’' => 'ðº', + 'ð“' => 'ð»', + 'ð”' => 'ð¼', + 'ð•' => 'ð½', + 'ð–' => 'ð¾', + 'ð—' => 'ð¿', + 'ð˜' => 'ð‘€', + 'ð™' => 'ð‘', + 'ðš' => 'ð‘‚', + 'ð›' => 'ð‘ƒ', + 'ðœ' => 'ð‘„', + 'ð' => 'ð‘…', + 'ðž' => 'ð‘†', + 'ðŸ' => 'ð‘‡', + 'ð ' => 'ð‘ˆ', + 'ð¡' => 'ð‘‰', + 'ð¢' => 'ð‘Š', + 'ð£' => 'ð‘‹', + 'ð¤' => 'ð‘Œ', + 'ð¥' => 'ð‘', + 'ð¦' => 'ð‘Ž', + 'ð§' => 'ð‘', + 'ð‘¢ ' => 'ð‘£€', + '𑢡' => 'ð‘£', + 'ð‘¢¢' => '𑣂', + 'ð‘¢£' => '𑣃', + '𑢤' => '𑣄', + 'ð‘¢¥' => 'ð‘£…', + '𑢦' => '𑣆', + 'ð‘¢§' => '𑣇', + '𑢨' => '𑣈', + '𑢩' => '𑣉', + '𑢪' => '𑣊', + '𑢫' => '𑣋', + '𑢬' => '𑣌', + 'ð‘¢­' => 'ð‘£', + 'ð‘¢®' => '𑣎', + '𑢯' => 'ð‘£', + 'ð‘¢°' => 'ð‘£', + 'ð‘¢±' => '𑣑', + 'ð‘¢²' => 'ð‘£’', + 'ð‘¢³' => '𑣓', + 'ð‘¢´' => 'ð‘£”', + 'ð‘¢µ' => '𑣕', + 'ð‘¢¶' => 'ð‘£–', + 'ð‘¢·' => 'ð‘£—', + '𑢸' => '𑣘', + 'ð‘¢¹' => 'ð‘£™', + '𑢺' => '𑣚', + 'ð‘¢»' => 'ð‘£›', + 'ð‘¢¼' => '𑣜', + 'ð‘¢½' => 'ð‘£', + 'ð‘¢¾' => '𑣞', + '𑢿' => '𑣟', +); + +$result =& $data; +unset($data); + +return $result; diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php new file mode 100644 index 0000000000000000000000000000000000000000..ec9422121cae73c8baa8d0cfc695897a5c091961 --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php @@ -0,0 +1,1109 @@ + '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', + 'ĵ' => 'Ä´', + 'Ä·' => 'Ķ', + 'ĺ' => 'Ĺ', + 'ļ' => 'Ä»', + 'ľ' => 'Ľ', + 'Å€' => 'Ä¿', + 'Å‚' => 'Å', + 'Å„' => 'Ń', + 'ņ' => 'Å…', + 'ň' => 'Ň', + 'Å‹' => 'ÅŠ', + 'Å' => 'ÅŒ', + 'Å' => 'ÅŽ', + 'Å‘' => 'Å', + 'Å“' => 'Å’', + 'Å•' => 'Å”', + 'Å—' => 'Å–', + 'Å™' => 'Ř', + 'Å›' => 'Åš', + 'Å' => 'Åœ', + 'ÅŸ' => 'Åž', + 'Å¡' => 'Å ', + 'Å£' => 'Å¢', + 'Å¥' => 'Ť', + 'ŧ' => 'Ŧ', + 'Å©' => 'Ũ', + 'Å«' => 'Ū', + 'Å­' => 'Ŭ', + 'ů' => 'Å®', + 'ű' => 'Ű', + 'ų' => 'Ų', + 'ŵ' => 'Å´', + 'Å·' => 'Ŷ', + 'ź' => 'Ź', + 'ż' => 'Å»', + 'ž' => 'Ž', + 'Å¿' => 'S', + 'Æ€' => 'Ƀ', + 'ƃ' => 'Æ‚', + 'Æ…' => 'Æ„', + 'ƈ' => 'Ƈ', + 'ÆŒ' => 'Æ‹', + 'Æ’' => 'Æ‘', + 'Æ•' => 'Ƕ', + 'Æ™' => 'Ƙ', + 'Æš' => 'Ƚ', + 'Æž' => 'È ', + 'Æ¡' => 'Æ ', + 'Æ£' => 'Æ¢', + 'Æ¥' => 'Ƥ', + 'ƨ' => 'Ƨ', + 'Æ­' => 'Ƭ', + 'ư' => 'Ư', + 'Æ´' => 'Ƴ', + 'ƶ' => 'Ƶ', + 'ƹ' => 'Ƹ', + 'ƽ' => 'Ƽ', + 'Æ¿' => 'Ç·', + 'Ç…' => 'Ç„', + 'dž' => 'Ç„', + 'Lj' => 'LJ', + 'lj' => 'LJ', + 'Ç‹' => 'ÇŠ', + 'ÇŒ' => 'ÇŠ', + 'ÇŽ' => 'Ç', + 'Ç' => 'Ç', + 'Ç’' => 'Ç‘', + 'Ç”' => 'Ç“', + 'Ç–' => 'Ç•', + 'ǘ' => 'Ç—', + 'Çš' => 'Ç™', + 'Çœ' => 'Ç›', + 'Ç' => 'ÆŽ', + 'ÇŸ' => 'Çž', + 'Ç¡' => 'Ç ', + 'Ç£' => 'Ç¢', + 'Ç¥' => 'Ǥ', + 'ǧ' => 'Ǧ', + 'Ç©' => 'Ǩ', + 'Ç«' => 'Ǫ', + 'Ç­' => 'Ǭ', + 'ǯ' => 'Ç®', + 'Dz' => 'DZ', + 'dz' => 'DZ', + 'ǵ' => 'Ç´', + 'ǹ' => 'Ǹ', + 'Ç»' => 'Ǻ', + 'ǽ' => 'Ǽ', + 'Ç¿' => 'Ǿ', + 'È' => 'È€', + 'ȃ' => 'È‚', + 'È…' => 'È„', + 'ȇ' => 'Ȇ', + 'ȉ' => 'Ȉ', + 'È‹' => 'ÈŠ', + 'È' => 'ÈŒ', + 'È' => 'ÈŽ', + 'È‘' => 'È', + 'È“' => 'È’', + 'È•' => 'È”', + 'È—' => 'È–', + 'È™' => 'Ș', + 'È›' => 'Èš', + 'È' => 'Èœ', + 'ÈŸ' => 'Èž', + 'È£' => 'È¢', + 'È¥' => 'Ȥ', + 'ȧ' => 'Ȧ', + 'È©' => 'Ȩ', + 'È«' => 'Ȫ', + 'È­' => 'Ȭ', + 'ȯ' => 'È®', + 'ȱ' => 'Ȱ', + 'ȳ' => 'Ȳ', + 'ȼ' => 'È»', + 'È¿' => 'â±¾', + 'É€' => 'Ɀ', + 'É‚' => 'É', + 'ɇ' => 'Ɇ', + 'ɉ' => 'Ɉ', + 'É‹' => 'ÉŠ', + 'É' => 'ÉŒ', + 'É' => 'ÉŽ', + 'É' => 'Ɐ', + 'É‘' => 'â±­', + 'É’' => 'â±°', + 'É“' => 'Æ', + 'É”' => 'Ɔ', + 'É–' => 'Ɖ', + 'É—' => 'ÆŠ', + 'É™' => 'Æ', + 'É›' => 'Æ', + 'Éœ' => 'êž«', + 'É ' => 'Æ“', + 'É¡' => 'Ɡ', + 'É£' => 'Æ”', + 'É¥' => 'êž', + 'ɦ' => 'Ɦ', + 'ɨ' => 'Æ—', + 'É©' => 'Æ–', + 'É«' => 'â±¢', + 'ɬ' => 'êž­', + 'ɯ' => 'Æœ', + 'ɱ' => 'â±®', + 'ɲ' => 'Æ', + 'ɵ' => 'ÆŸ', + 'ɽ' => 'Ɽ', + 'Ê€' => 'Ʀ', + 'ʃ' => 'Æ©', + 'ʇ' => 'êž±', + 'ʈ' => 'Æ®', + 'ʉ' => 'É„', + 'ÊŠ' => 'Ʊ', + 'Ê‹' => 'Ʋ', + 'ÊŒ' => 'É…', + 'Ê’' => 'Æ·', + 'Êž' => 'êž°', + 'Í…' => 'Ι', + 'ͱ' => 'Ͱ', + 'ͳ' => 'Ͳ', + 'Í·' => 'Ͷ', + 'Í»' => 'Ͻ', + 'ͼ' => 'Ͼ', + 'ͽ' => 'Ï¿', + 'ά' => 'Ά', + 'έ' => 'Έ', + 'ή' => 'Ή', + 'ί' => 'Ί', + 'α' => 'Α', + 'β' => 'Î’', + 'γ' => 'Γ', + 'δ' => 'Δ', + 'ε' => 'Ε', + 'ζ' => 'Ζ', + 'η' => 'Η', + 'θ' => 'Θ', + 'ι' => 'Ι', + 'κ' => 'Κ', + 'λ' => 'Λ', + 'μ' => 'Μ', + 'ν' => 'Î', + 'ξ' => 'Ξ', + 'ο' => 'Ο', + 'Ï€' => 'Π', + 'Ï' => 'Ρ', + 'Ï‚' => 'Σ', + 'σ' => 'Σ', + 'Ï„' => 'Τ', + 'Ï…' => 'Î¥', + 'φ' => 'Φ', + 'χ' => 'Χ', + 'ψ' => 'Ψ', + 'ω' => 'Ω', + 'ÏŠ' => 'Ϊ', + 'Ï‹' => 'Ϋ', + 'ÏŒ' => 'ÎŒ', + 'Ï' => 'ÎŽ', + 'ÏŽ' => 'Î', + 'Ï' => 'Î’', + 'Ï‘' => 'Θ', + 'Ï•' => 'Φ', + 'Ï–' => 'Π', + 'Ï—' => 'Ï', + 'Ï™' => 'Ϙ', + 'Ï›' => 'Ïš', + 'Ï' => 'Ïœ', + 'ÏŸ' => 'Ïž', + 'Ï¡' => 'Ï ', + 'Ï£' => 'Ï¢', + 'Ï¥' => 'Ϥ', + 'ϧ' => 'Ϧ', + 'Ï©' => 'Ϩ', + 'Ï«' => 'Ϫ', + 'Ï­' => 'Ϭ', + 'ϯ' => 'Ï®', + 'ϰ' => 'Κ', + 'ϱ' => 'Ρ', + 'ϲ' => 'Ϲ', + 'ϳ' => 'Í¿', + 'ϵ' => 'Ε', + 'ϸ' => 'Ï·', + 'Ï»' => 'Ϻ', + 'а' => 'Ð', + 'б' => 'Б', + 'в' => 'Ð’', + 'г' => 'Г', + 'д' => 'Д', + 'е' => 'Е', + 'ж' => 'Ж', + 'з' => 'З', + 'и' => 'И', + 'й' => 'Й', + 'к' => 'К', + 'л' => 'Л', + 'м' => 'М', + 'н' => 'Ð', + 'о' => 'О', + 'п' => 'П', + 'Ñ€' => 'Р', + 'Ñ' => 'С', + 'Ñ‚' => 'Т', + 'у' => 'У', + 'Ñ„' => 'Ф', + 'Ñ…' => 'Ð¥', + 'ц' => 'Ц', + 'ч' => 'Ч', + 'ш' => 'Ш', + 'щ' => 'Щ', + 'ÑŠ' => 'Ъ', + 'Ñ‹' => 'Ы', + 'ÑŒ' => 'Ь', + 'Ñ' => 'Э', + 'ÑŽ' => 'Ю', + 'Ñ' => 'Я', + 'Ñ' => 'Ѐ', + 'Ñ‘' => 'Ð', + 'Ñ’' => 'Ђ', + 'Ñ“' => 'Ѓ', + 'Ñ”' => 'Є', + 'Ñ•' => 'Ð…', + 'Ñ–' => 'І', + 'Ñ—' => 'Ї', + 'ј' => 'Ј', + 'Ñ™' => 'Љ', + 'Ñš' => 'Њ', + 'Ñ›' => 'Ћ', + 'Ñœ' => 'ÐŒ', + 'Ñ' => 'Ð', + 'Ñž' => 'ÐŽ', + 'ÑŸ' => 'Ð', + 'Ñ¡' => 'Ñ ', + 'Ñ£' => 'Ñ¢', + 'Ñ¥' => 'Ѥ', + 'ѧ' => 'Ѧ', + 'Ñ©' => 'Ѩ', + 'Ñ«' => 'Ѫ', + 'Ñ­' => 'Ѭ', + 'ѯ' => 'Ñ®', + 'ѱ' => 'Ѱ', + 'ѳ' => 'Ѳ', + 'ѵ' => 'Ñ´', + 'Ñ·' => 'Ѷ', + 'ѹ' => 'Ѹ', + 'Ñ»' => 'Ѻ', + 'ѽ' => 'Ѽ', + 'Ñ¿' => 'Ѿ', + 'Ò' => 'Ò€', + 'Ò‹' => 'ÒŠ', + 'Ò' => 'ÒŒ', + 'Ò' => 'ÒŽ', + 'Ò‘' => 'Ò', + 'Ò“' => 'Ò’', + 'Ò•' => 'Ò”', + 'Ò—' => 'Ò–', + 'Ò™' => 'Ò˜', + 'Ò›' => 'Òš', + 'Ò' => 'Òœ', + 'ÒŸ' => 'Òž', + 'Ò¡' => 'Ò ', + 'Ò£' => 'Ò¢', + 'Ò¥' => 'Ò¤', + 'Ò§' => 'Ò¦', + 'Ò©' => 'Ò¨', + 'Ò«' => 'Òª', + 'Ò­' => 'Ò¬', + 'Ò¯' => 'Ò®', + 'Ò±' => 'Ò°', + 'Ò³' => 'Ò²', + 'Òµ' => 'Ò´', + 'Ò·' => 'Ò¶', + 'Ò¹' => 'Ò¸', + 'Ò»' => 'Òº', + 'Ò½' => 'Ò¼', + 'Ò¿' => 'Ò¾', + 'Ó‚' => 'Ó', + 'Ó„' => 'Óƒ', + 'Ó†' => 'Ó…', + 'Óˆ' => 'Ó‡', + 'ÓŠ' => 'Ó‰', + 'ÓŒ' => 'Ó‹', + 'ÓŽ' => 'Ó', + 'Ó' => 'Ó€', + 'Ó‘' => 'Ó', + 'Ó“' => 'Ó’', + 'Ó•' => 'Ó”', + 'Ó—' => 'Ó–', + 'Ó™' => 'Ó˜', + 'Ó›' => 'Óš', + 'Ó' => 'Óœ', + 'ÓŸ' => 'Óž', + 'Ó¡' => 'Ó ', + 'Ó£' => 'Ó¢', + 'Ó¥' => 'Ó¤', + 'Ó§' => 'Ó¦', + 'Ó©' => 'Ó¨', + 'Ó«' => 'Óª', + 'Ó­' => 'Ó¬', + 'Ó¯' => 'Ó®', + 'Ó±' => 'Ó°', + 'Ó³' => 'Ó²', + 'Óµ' => 'Ó´', + 'Ó·' => 'Ó¶', + 'Ó¹' => 'Ó¸', + 'Ó»' => 'Óº', + 'Ó½' => 'Ó¼', + 'Ó¿' => 'Ó¾', + 'Ô' => 'Ô€', + 'Ôƒ' => 'Ô‚', + 'Ô…' => 'Ô„', + 'Ô‡' => 'Ô†', + 'Ô‰' => 'Ôˆ', + 'Ô‹' => 'ÔŠ', + 'Ô' => 'ÔŒ', + 'Ô' => 'ÔŽ', + 'Ô‘' => 'Ô', + 'Ô“' => 'Ô’', + 'Ô•' => 'Ô”', + 'Ô—' => 'Ô–', + 'Ô™' => 'Ô˜', + 'Ô›' => 'Ôš', + 'Ô' => 'Ôœ', + 'ÔŸ' => 'Ôž', + 'Ô¡' => 'Ô ', + 'Ô£' => 'Ô¢', + 'Ô¥' => 'Ô¤', + 'Ô§' => 'Ô¦', + 'Ô©' => 'Ô¨', + 'Ô«' => 'Ôª', + 'Ô­' => 'Ô¬', + 'Ô¯' => 'Ô®', + 'Õ¡' => 'Ô±', + 'Õ¢' => 'Ô²', + 'Õ£' => 'Ô³', + 'Õ¤' => 'Ô´', + 'Õ¥' => 'Ôµ', + 'Õ¦' => 'Ô¶', + 'Õ§' => 'Ô·', + 'Õ¨' => 'Ô¸', + 'Õ©' => 'Ô¹', + 'Õª' => 'Ôº', + 'Õ«' => 'Ô»', + 'Õ¬' => 'Ô¼', + 'Õ­' => 'Ô½', + 'Õ®' => 'Ô¾', + 'Õ¯' => 'Ô¿', + 'Õ°' => 'Õ€', + 'Õ±' => 'Õ', + 'Õ²' => 'Õ‚', + 'Õ³' => 'Õƒ', + 'Õ´' => 'Õ„', + 'Õµ' => 'Õ…', + 'Õ¶' => 'Õ†', + 'Õ·' => 'Õ‡', + 'Õ¸' => 'Õˆ', + 'Õ¹' => 'Õ‰', + 'Õº' => 'ÕŠ', + 'Õ»' => 'Õ‹', + 'Õ¼' => 'ÕŒ', + 'Õ½' => 'Õ', + 'Õ¾' => 'ÕŽ', + 'Õ¿' => 'Õ', + 'Ö€' => 'Õ', + 'Ö' => 'Õ‘', + 'Ö‚' => 'Õ’', + 'Öƒ' => 'Õ“', + 'Ö„' => 'Õ”', + 'Ö…' => 'Õ•', + 'Ö†' => 'Õ–', + 'áµ¹' => 'ê½', + 'áµ½' => 'â±£', + 'á¸' => 'Ḁ', + 'ḃ' => 'Ḃ', + 'ḅ' => 'Ḅ', + 'ḇ' => 'Ḇ', + 'ḉ' => 'Ḉ', + 'ḋ' => 'Ḋ', + 'á¸' => 'Ḍ', + 'á¸' => 'Ḏ', + 'ḑ' => 'á¸', + 'ḓ' => 'Ḓ', + 'ḕ' => 'Ḕ', + 'ḗ' => 'Ḗ', + 'ḙ' => 'Ḙ', + 'ḛ' => 'Ḛ', + 'á¸' => 'Ḝ', + 'ḟ' => 'Ḟ', + 'ḡ' => 'Ḡ', + 'ḣ' => 'Ḣ', + 'ḥ' => 'Ḥ', + 'ḧ' => 'Ḧ', + 'ḩ' => 'Ḩ', + 'ḫ' => 'Ḫ', + 'ḭ' => 'Ḭ', + 'ḯ' => 'Ḯ', + 'ḱ' => 'Ḱ', + 'ḳ' => 'Ḳ', + 'ḵ' => 'Ḵ', + 'ḷ' => 'Ḷ', + 'ḹ' => 'Ḹ', + 'ḻ' => 'Ḻ', + 'ḽ' => 'Ḽ', + 'ḿ' => 'Ḿ', + 'á¹' => 'á¹€', + 'ṃ' => 'Ṃ', + 'á¹…' => 'Ṅ', + 'ṇ' => 'Ṇ', + 'ṉ' => 'Ṉ', + 'ṋ' => 'Ṋ', + 'á¹' => 'Ṍ', + 'á¹' => 'Ṏ', + 'ṑ' => 'á¹', + 'ṓ' => 'á¹’', + 'ṕ' => 'á¹”', + 'á¹—' => 'á¹–', + 'á¹™' => 'Ṙ', + 'á¹›' => 'Ṛ', + 'á¹' => 'Ṝ', + 'ṟ' => 'Ṟ', + 'ṡ' => 'á¹ ', + 'á¹£' => 'á¹¢', + 'á¹¥' => 'Ṥ', + 'á¹§' => 'Ṧ', + 'ṩ' => 'Ṩ', + 'ṫ' => 'Ṫ', + 'á¹­' => 'Ṭ', + 'ṯ' => 'á¹®', + 'á¹±' => 'á¹°', + 'á¹³' => 'á¹²', + 'á¹µ' => 'á¹´', + 'á¹·' => 'á¹¶', + 'á¹¹' => 'Ṹ', + 'á¹»' => 'Ṻ', + 'á¹½' => 'á¹¼', + 'ṿ' => 'á¹¾', + 'áº' => 'Ẁ', + 'ẃ' => 'Ẃ', + 'ẅ' => 'Ẅ', + 'ẇ' => 'Ẇ', + 'ẉ' => 'Ẉ', + 'ẋ' => 'Ẋ', + 'áº' => 'Ẍ', + 'áº' => 'Ẏ', + 'ẑ' => 'áº', + 'ẓ' => 'Ẓ', + 'ẕ' => 'Ẕ', + 'ẛ' => 'á¹ ', + 'ạ' => 'Ạ', + 'ả' => 'Ả', + 'ấ' => 'Ấ', + 'ầ' => 'Ầ', + 'ẩ' => 'Ẩ', + 'ẫ' => 'Ẫ', + 'ậ' => 'Ậ', + 'ắ' => 'Ắ', + 'ằ' => 'Ằ', + 'ẳ' => 'Ẳ', + 'ẵ' => 'Ẵ', + 'ặ' => 'Ặ', + 'ẹ' => 'Ẹ', + 'ẻ' => 'Ẻ', + 'ẽ' => 'Ẽ', + 'ế' => 'Ế', + 'á»' => 'Ề', + 'ể' => 'Ể', + 'á»…' => 'Ễ', + 'ệ' => 'Ệ', + 'ỉ' => 'Ỉ', + 'ị' => 'Ị', + 'á»' => 'Ọ', + 'á»' => 'Ỏ', + 'ố' => 'á»', + 'ồ' => 'á»’', + 'ổ' => 'á»”', + 'á»—' => 'á»–', + 'á»™' => 'Ộ', + 'á»›' => 'Ớ', + 'á»' => 'Ờ', + 'ở' => 'Ở', + 'ỡ' => 'á» ', + 'ợ' => 'Ợ', + 'ụ' => 'Ụ', + 'á»§' => 'Ủ', + 'ứ' => 'Ứ', + 'ừ' => 'Ừ', + 'á»­' => 'Ử', + 'ữ' => 'á»®', + 'á»±' => 'á»°', + 'ỳ' => 'Ỳ', + 'ỵ' => 'á»´', + 'á»·' => 'á»¶', + 'ỹ' => 'Ỹ', + 'á»»' => 'Ỻ', + 'ỽ' => 'Ỽ', + 'ỿ' => 'Ỿ', + 'á¼€' => 'Ἀ', + 'á¼' => 'Ἁ', + 'ἂ' => 'Ἂ', + 'ἃ' => 'Ἃ', + 'ἄ' => 'Ἄ', + 'á¼…' => 'á¼', + 'ἆ' => 'Ἆ', + 'ἇ' => 'á¼', + 'á¼' => 'Ἐ', + 'ἑ' => 'á¼™', + 'á¼’' => 'Ἒ', + 'ἓ' => 'á¼›', + 'á¼”' => 'Ἔ', + 'ἕ' => 'á¼', + 'á¼ ' => 'Ἠ', + 'ἡ' => 'Ἡ', + 'á¼¢' => 'Ἢ', + 'á¼£' => 'Ἣ', + 'ἤ' => 'Ἤ', + 'á¼¥' => 'á¼­', + 'ἦ' => 'á¼®', + 'á¼§' => 'Ἧ', + 'á¼°' => 'Ἰ', + 'á¼±' => 'á¼¹', + 'á¼²' => 'Ἲ', + 'á¼³' => 'á¼»', + 'á¼´' => 'á¼¼', + 'á¼µ' => 'á¼½', + 'á¼¶' => 'á¼¾', + 'á¼·' => 'Ἷ', + 'á½€' => 'Ὀ', + 'á½' => 'Ὁ', + 'ὂ' => 'Ὂ', + 'ὃ' => 'Ὃ', + 'ὄ' => 'Ὄ', + 'á½…' => 'á½', + 'ὑ' => 'á½™', + 'ὓ' => 'á½›', + 'ὕ' => 'á½', + 'á½—' => 'Ὗ', + 'á½ ' => 'Ὠ', + 'ὡ' => 'Ὡ', + 'á½¢' => 'Ὢ', + 'á½£' => 'Ὣ', + 'ὤ' => 'Ὤ', + 'á½¥' => 'á½­', + 'ὦ' => 'á½®', + 'á½§' => 'Ὧ', + 'á½°' => 'Ὰ', + 'á½±' => 'á¾»', + 'á½²' => 'Ὲ', + 'á½³' => 'Έ', + 'á½´' => 'Ὴ', + 'á½µ' => 'á¿‹', + 'á½¶' => 'Ὶ', + 'á½·' => 'á¿›', + 'ὸ' => 'Ὸ', + 'á½¹' => 'Ό', + 'ὺ' => 'Ὺ', + 'á½»' => 'á¿«', + 'á½¼' => 'Ὼ', + 'á½½' => 'á¿»', + 'á¾€' => 'ᾈ', + 'á¾' => 'ᾉ', + 'ᾂ' => 'ᾊ', + 'ᾃ' => 'ᾋ', + 'ᾄ' => 'ᾌ', + 'á¾…' => 'á¾', + 'ᾆ' => 'ᾎ', + 'ᾇ' => 'á¾', + 'á¾' => 'ᾘ', + 'ᾑ' => 'á¾™', + 'á¾’' => 'ᾚ', + 'ᾓ' => 'á¾›', + 'á¾”' => 'ᾜ', + 'ᾕ' => 'á¾', + 'á¾–' => 'ᾞ', + 'á¾—' => 'ᾟ', + 'á¾ ' => 'ᾨ', + 'ᾡ' => 'ᾩ', + 'á¾¢' => 'ᾪ', + 'á¾£' => 'ᾫ', + 'ᾤ' => 'ᾬ', + 'á¾¥' => 'á¾­', + 'ᾦ' => 'á¾®', + 'á¾§' => 'ᾯ', + 'á¾°' => 'Ᾰ', + 'á¾±' => 'á¾¹', + 'á¾³' => 'á¾¼', + 'á¾¾' => 'Ι', + 'ῃ' => 'ῌ', + 'á¿' => 'Ῐ', + 'á¿‘' => 'á¿™', + 'á¿ ' => 'Ῠ', + 'á¿¡' => 'á¿©', + 'á¿¥' => 'Ῥ', + 'ῳ' => 'ῼ', + 'â…Ž' => 'Ⅎ', + 'â…°' => 'â… ', + 'â…±' => 'â…¡', + 'â…²' => 'â…¢', + 'â…³' => 'â…£', + 'â…´' => 'â…¤', + 'â…µ' => 'â…¥', + 'â…¶' => 'â…¦', + 'â…·' => 'â…§', + 'â…¸' => 'â…¨', + 'â…¹' => 'â…©', + 'â…º' => 'â…ª', + 'â…»' => 'â…«', + 'â…¼' => 'â…¬', + 'â…½' => 'â…­', + 'â…¾' => 'â…®', + 'â…¿' => 'â…¯', + 'ↄ' => 'Ↄ', + 'â“' => 'â’¶', + 'â“‘' => 'â’·', + 'â“’' => 'â’¸', + 'â““' => 'â’¹', + 'â“”' => 'â’º', + 'â“•' => 'â’»', + 'â“–' => 'â’¼', + 'â“—' => 'â’½', + 'ⓘ' => 'â’¾', + 'â“™' => 'â’¿', + 'ⓚ' => 'â“€', + 'â“›' => 'â“', + 'ⓜ' => 'â“‚', + 'â“' => 'Ⓝ', + 'ⓞ' => 'â“„', + 'ⓟ' => 'â“…', + 'â“ ' => 'Ⓠ', + 'â“¡' => 'Ⓡ', + 'â“¢' => 'Ⓢ', + 'â“£' => 'Ⓣ', + 'ⓤ' => 'Ⓤ', + 'â“¥' => 'â“‹', + 'ⓦ' => 'Ⓦ', + 'â“§' => 'â“', + 'ⓨ' => 'Ⓨ', + 'â“©' => 'â“', + 'â°°' => 'â°€', + 'â°±' => 'â°', + 'â°²' => 'â°‚', + 'â°³' => 'â°ƒ', + 'â°´' => 'â°„', + 'â°µ' => 'â°…', + 'â°¶' => 'â°†', + 'â°·' => 'â°‡', + 'â°¸' => 'â°ˆ', + 'â°¹' => 'â°‰', + 'â°º' => 'â°Š', + 'â°»' => 'â°‹', + 'â°¼' => 'â°Œ', + 'â°½' => 'â°', + 'â°¾' => 'â°Ž', + 'â°¿' => 'â°', + 'â±€' => 'â°', + 'â±' => 'â°‘', + 'ⱂ' => 'â°’', + 'ⱃ' => 'â°“', + 'ⱄ' => 'â°”', + 'â±…' => 'â°•', + 'ⱆ' => 'â°–', + 'ⱇ' => 'â°—', + 'ⱈ' => 'â°˜', + 'ⱉ' => 'â°™', + 'ⱊ' => 'â°š', + 'ⱋ' => 'â°›', + 'ⱌ' => 'â°œ', + 'â±' => 'â°', + 'ⱎ' => 'â°ž', + 'â±' => 'â°Ÿ', + 'â±' => 'â° ', + 'ⱑ' => 'â°¡', + 'â±’' => 'â°¢', + 'ⱓ' => 'â°£', + 'â±”' => 'â°¤', + 'ⱕ' => 'â°¥', + 'â±–' => 'â°¦', + 'â±—' => 'â°§', + 'ⱘ' => 'â°¨', + 'â±™' => 'â°©', + 'ⱚ' => 'â°ª', + 'â±›' => 'â°«', + 'ⱜ' => 'â°¬', + 'â±' => 'â°­', + 'ⱞ' => 'â°®', + 'ⱡ' => 'â± ', + 'â±¥' => 'Ⱥ', + 'ⱦ' => 'Ⱦ', + 'ⱨ' => 'â±§', + 'ⱪ' => 'Ⱪ', + 'ⱬ' => 'Ⱬ', + 'â±³' => 'â±²', + 'â±¶' => 'â±µ', + 'â²' => 'â²€', + 'ⲃ' => 'Ⲃ', + 'â²…' => 'Ⲅ', + 'ⲇ' => 'Ⲇ', + 'ⲉ' => 'Ⲉ', + 'ⲋ' => 'Ⲋ', + 'â²' => 'Ⲍ', + 'â²' => 'Ⲏ', + 'ⲑ' => 'â²', + 'ⲓ' => 'â²’', + 'ⲕ' => 'â²”', + 'â²—' => 'â²–', + 'â²™' => 'Ⲙ', + 'â²›' => 'Ⲛ', + 'â²' => 'Ⲝ', + 'ⲟ' => 'Ⲟ', + 'ⲡ' => 'â² ', + 'â²£' => 'â²¢', + 'â²¥' => 'Ⲥ', + 'â²§' => 'Ⲧ', + 'ⲩ' => 'Ⲩ', + 'ⲫ' => 'Ⲫ', + 'â²­' => 'Ⲭ', + 'ⲯ' => 'â²®', + 'â²±' => 'â²°', + 'â²³' => 'â²²', + 'â²µ' => 'â²´', + 'â²·' => 'â²¶', + 'â²¹' => 'Ⲹ', + 'â²»' => 'Ⲻ', + 'â²½' => 'â²¼', + 'ⲿ' => 'â²¾', + 'â³' => 'â³€', + 'ⳃ' => 'Ⳃ', + 'â³…' => 'Ⳅ', + 'ⳇ' => 'Ⳇ', + 'ⳉ' => 'Ⳉ', + 'ⳋ' => 'Ⳋ', + 'â³' => 'Ⳍ', + 'â³' => 'Ⳏ', + 'ⳑ' => 'â³', + 'ⳓ' => 'â³’', + 'ⳕ' => 'â³”', + 'â³—' => 'â³–', + 'â³™' => 'Ⳙ', + 'â³›' => 'Ⳛ', + 'â³' => 'Ⳝ', + 'ⳟ' => 'Ⳟ', + 'ⳡ' => 'â³ ', + 'â³£' => 'â³¢', + 'ⳬ' => 'Ⳬ', + 'â³®' => 'â³­', + 'â³³' => 'â³²', + 'â´€' => 'á‚ ', + 'â´' => 'á‚¡', + 'â´‚' => 'á‚¢', + 'â´ƒ' => 'á‚£', + 'â´„' => 'Ⴄ', + 'â´…' => 'á‚¥', + 'â´†' => 'Ⴆ', + 'â´‡' => 'á‚§', + 'â´ˆ' => 'Ⴈ', + 'â´‰' => 'á‚©', + 'â´Š' => 'Ⴊ', + 'â´‹' => 'á‚«', + 'â´Œ' => 'Ⴌ', + 'â´' => 'á‚­', + 'â´Ž' => 'á‚®', + 'â´' => 'Ⴏ', + 'â´' => 'á‚°', + 'â´‘' => 'Ⴑ', + 'â´’' => 'Ⴒ', + 'â´“' => 'Ⴓ', + 'â´”' => 'á‚´', + 'â´•' => 'Ⴕ', + 'â´–' => 'á‚¶', + 'â´—' => 'á‚·', + 'â´˜' => 'Ⴘ', + 'â´™' => 'Ⴙ', + 'â´š' => 'Ⴚ', + 'â´›' => 'á‚»', + 'â´œ' => 'Ⴜ', + 'â´' => 'Ⴝ', + 'â´ž' => 'Ⴞ', + 'â´Ÿ' => 'á‚¿', + 'â´ ' => 'Ⴠ', + 'â´¡' => 'áƒ', + 'â´¢' => 'Ⴢ', + 'â´£' => 'Ⴣ', + 'â´¤' => 'Ⴤ', + 'â´¥' => 'Ⴥ', + 'â´§' => 'Ⴧ', + 'â´­' => 'áƒ', + 'ê™' => 'Ꙁ', + 'ꙃ' => 'Ꙃ', + 'ê™…' => 'Ꙅ', + 'ꙇ' => 'Ꙇ', + 'ꙉ' => 'Ꙉ', + 'ꙋ' => 'Ꙋ', + 'ê™' => 'Ꙍ', + 'ê™' => 'Ꙏ', + 'ꙑ' => 'ê™', + 'ꙓ' => 'ê™’', + 'ꙕ' => 'ê™”', + 'ê™—' => 'ê™–', + 'ê™™' => 'Ꙙ', + 'ê™›' => 'Ꙛ', + 'ê™' => 'Ꙝ', + 'ꙟ' => 'Ꙟ', + 'ꙡ' => 'ê™ ', + 'ꙣ' => 'Ꙣ', + 'ꙥ' => 'Ꙥ', + 'ê™§' => 'Ꙧ', + 'ꙩ' => 'Ꙩ', + 'ꙫ' => 'Ꙫ', + 'ê™­' => 'Ꙭ', + 'êš' => 'Ꚁ', + 'ꚃ' => 'êš‚', + 'êš…' => 'êš„', + 'ꚇ' => 'Ꚇ', + 'ꚉ' => 'Ꚉ', + 'êš‹' => 'Ꚋ', + 'êš' => 'Ꚍ', + 'êš' => 'Ꚏ', + 'êš‘' => 'êš', + 'êš“' => 'êš’', + 'êš•' => 'êš”', + 'êš—' => 'êš–', + 'êš™' => 'Ꚙ', + 'êš›' => 'êšš', + 'ꜣ' => 'Ꜣ', + 'ꜥ' => 'Ꜥ', + 'ꜧ' => 'Ꜧ', + 'ꜩ' => 'Ꜩ', + 'ꜫ' => 'Ꜫ', + 'ꜭ' => 'Ꜭ', + 'ꜯ' => 'Ꜯ', + 'ꜳ' => 'Ꜳ', + 'ꜵ' => 'Ꜵ', + 'ꜷ' => 'Ꜷ', + 'ꜹ' => 'Ꜹ', + 'ꜻ' => 'Ꜻ', + 'ꜽ' => 'Ꜽ', + 'ꜿ' => 'Ꜿ', + 'ê' => 'ê€', + 'êƒ' => 'ê‚', + 'ê…' => 'ê„', + 'ê‡' => 'ê†', + 'ê‰' => 'êˆ', + 'ê‹' => 'êŠ', + 'ê' => 'êŒ', + 'ê' => 'êŽ', + 'ê‘' => 'ê', + 'ê“' => 'ê’', + 'ê•' => 'ê”', + 'ê—' => 'ê–', + 'ê™' => 'ê˜', + 'ê›' => 'êš', + 'ê' => 'êœ', + 'êŸ' => 'êž', + 'ê¡' => 'ê ', + 'ê£' => 'ê¢', + 'ê¥' => 'ê¤', + 'ê§' => 'ê¦', + 'ê©' => 'ê¨', + 'ê«' => 'êª', + 'ê­' => 'ê¬', + 'ê¯' => 'ê®', + 'êº' => 'ê¹', + 'ê¼' => 'ê»', + 'ê¿' => 'ê¾', + 'êž' => 'Ꞁ', + 'ꞃ' => 'êž‚', + 'êž…' => 'êž„', + 'ꞇ' => 'Ꞇ', + 'ꞌ' => 'êž‹', + 'êž‘' => 'êž', + 'êž“' => 'êž’', + 'êž—' => 'êž–', + 'êž™' => 'Ꞙ', + 'êž›' => 'êžš', + 'êž' => 'êžœ', + 'ꞟ' => 'êžž', + 'êž¡' => 'êž ', + 'ꞣ' => 'Ꞣ', + 'ꞥ' => 'Ꞥ', + 'êž§' => 'Ꞧ', + 'êž©' => 'Ꞩ', + 'ï½' => 'A', + 'b' => 'ï¼¢', + 'c' => 'ï¼£', + 'd' => 'D', + 'ï½…' => 'ï¼¥', + 'f' => 'F', + 'g' => 'ï¼§', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'ï½' => 'ï¼­', + 'n' => 'ï¼®', + 'ï½' => 'O', + 'ï½' => 'ï¼°', + 'q' => 'ï¼±', + 'ï½’' => 'ï¼²', + 's' => 'ï¼³', + 'ï½”' => 'ï¼´', + 'u' => 'ï¼µ', + 'ï½–' => 'ï¼¶', + 'ï½—' => 'ï¼·', + 'x' => 'X', + 'ï½™' => 'ï¼¹', + 'z' => 'Z', + 'ð¨' => 'ð€', + 'ð©' => 'ð', + 'ðª' => 'ð‚', + 'ð«' => 'ðƒ', + 'ð¬' => 'ð„', + 'ð­' => 'ð…', + 'ð®' => 'ð†', + 'ð¯' => 'ð‡', + 'ð°' => 'ðˆ', + 'ð±' => 'ð‰', + 'ð²' => 'ðŠ', + 'ð³' => 'ð‹', + 'ð´' => 'ðŒ', + 'ðµ' => 'ð', + 'ð¶' => 'ðŽ', + 'ð·' => 'ð', + 'ð¸' => 'ð', + 'ð¹' => 'ð‘', + 'ðº' => 'ð’', + 'ð»' => 'ð“', + 'ð¼' => 'ð”', + 'ð½' => 'ð•', + 'ð¾' => 'ð–', + 'ð¿' => 'ð—', + 'ð‘€' => 'ð˜', + 'ð‘' => 'ð™', + 'ð‘‚' => 'ðš', + 'ð‘ƒ' => 'ð›', + 'ð‘„' => 'ðœ', + 'ð‘…' => 'ð', + 'ð‘†' => 'ðž', + 'ð‘‡' => 'ðŸ', + 'ð‘ˆ' => 'ð ', + 'ð‘‰' => 'ð¡', + 'ð‘Š' => 'ð¢', + 'ð‘‹' => 'ð£', + 'ð‘Œ' => 'ð¤', + 'ð‘' => 'ð¥', + 'ð‘Ž' => 'ð¦', + 'ð‘' => 'ð§', + 'ð‘£€' => 'ð‘¢ ', + 'ð‘£' => '𑢡', + '𑣂' => 'ð‘¢¢', + '𑣃' => 'ð‘¢£', + '𑣄' => '𑢤', + 'ð‘£…' => 'ð‘¢¥', + '𑣆' => '𑢦', + '𑣇' => 'ð‘¢§', + '𑣈' => '𑢨', + '𑣉' => '𑢩', + '𑣊' => '𑢪', + '𑣋' => '𑢫', + '𑣌' => '𑢬', + 'ð‘£' => 'ð‘¢­', + '𑣎' => 'ð‘¢®', + 'ð‘£' => '𑢯', + 'ð‘£' => 'ð‘¢°', + '𑣑' => 'ð‘¢±', + 'ð‘£’' => 'ð‘¢²', + '𑣓' => 'ð‘¢³', + 'ð‘£”' => 'ð‘¢´', + '𑣕' => 'ð‘¢µ', + 'ð‘£–' => 'ð‘¢¶', + 'ð‘£—' => 'ð‘¢·', + '𑣘' => '𑢸', + 'ð‘£™' => 'ð‘¢¹', + '𑣚' => '𑢺', + 'ð‘£›' => 'ð‘¢»', + '𑣜' => 'ð‘¢¼', + 'ð‘£' => 'ð‘¢½', + '𑣞' => 'ð‘¢¾', + '𑣟' => '𑢿', +); + +$result =& $data; +unset($data); + +return $result; diff --git a/vendor/symfony/polyfill-mbstring/bootstrap.php b/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100644 index 0000000000000000000000000000000000000000..3372291064dbc95ab34717fa4c9fc15662bb916a --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,56 @@ + + * + * 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_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); } +} diff --git a/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..24eefbde1bd8ac20c7391f5feecab6ca714ab241 --- /dev/null +++ b/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.3-dev" + } + } +} diff --git a/vendor/symfony/polyfill-php56/LICENSE b/vendor/symfony/polyfill-php56/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..39fa189d2b5fc989ceb996d94bb19b91bd4a7866 --- /dev/null +++ b/vendor/symfony/polyfill-php56/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-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/vendor/symfony/polyfill-php56/Php56.php b/vendor/symfony/polyfill-php56/Php56.php new file mode 100644 index 0000000000000000000000000000000000000000..a7dd9a28ea2b2b8adf6d5b9a55da4feeb56ceff5 --- /dev/null +++ b/vendor/symfony/polyfill-php56/Php56.php @@ -0,0 +1,138 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Php56; + +use Symfony\Polyfill\Util\Binary; + +/** + * @internal + */ +final class Php56 +{ + const LDAP_ESCAPE_FILTER = 1; + const LDAP_ESCAPE_DN = 2; + + public static function hash_equals($knownString, $userInput) + { + if (!is_string($knownString)) { + trigger_error('Expected known_string to be a string, '.gettype($knownString).' given', E_USER_WARNING); + + return false; + } + + if (!is_string($userInput)) { + trigger_error('Expected user_input to be a string, '.gettype($userInput).' given', E_USER_WARNING); + + return false; + } + + $knownLen = Binary::strlen($knownString); + $userLen = Binary::strlen($userInput); + + if ($knownLen !== $userLen) { + return false; + } + + $result = 0; + + for ($i = 0; $i < $knownLen; ++$i) { + $result |= ord($knownString[$i]) ^ ord($userInput[$i]); + } + + return 0 === $result; + } + + /** + * Stub implementation of the {@link ldap_escape()} function of the ldap + * extension. + * + * Escape strings for safe use in LDAP filters and DNs. + * + * @author Chris Wright + * + * @param string $subject + * @param string $ignore + * @param int $flags + * + * @return string + * + * @see http://stackoverflow.com/a/8561604 + */ + public static function ldap_escape($subject, $ignore = '', $flags = 0) + { + static $charMaps = null; + + if (null === $charMaps) { + $charMaps = array( + self::LDAP_ESCAPE_FILTER => array('\\', '*', '(', ')', "\x00"), + self::LDAP_ESCAPE_DN => array('\\', ',', '=', '+', '<', '>', ';', '"', '#', "\r"), + ); + + $charMaps[0] = array(); + + for ($i = 0; $i < 256; ++$i) { + $charMaps[0][chr($i)] = sprintf('\\%02x', $i); + } + + for ($i = 0, $l = count($charMaps[self::LDAP_ESCAPE_FILTER]); $i < $l; ++$i) { + $chr = $charMaps[self::LDAP_ESCAPE_FILTER][$i]; + unset($charMaps[self::LDAP_ESCAPE_FILTER][$i]); + $charMaps[self::LDAP_ESCAPE_FILTER][$chr] = $charMaps[0][$chr]; + } + + for ($i = 0, $l = count($charMaps[self::LDAP_ESCAPE_DN]); $i < $l; ++$i) { + $chr = $charMaps[self::LDAP_ESCAPE_DN][$i]; + unset($charMaps[self::LDAP_ESCAPE_DN][$i]); + $charMaps[self::LDAP_ESCAPE_DN][$chr] = $charMaps[0][$chr]; + } + } + + // Create the base char map to escape + $flags = (int) $flags; + $charMap = array(); + + if ($flags & self::LDAP_ESCAPE_FILTER) { + $charMap += $charMaps[self::LDAP_ESCAPE_FILTER]; + } + + if ($flags & self::LDAP_ESCAPE_DN) { + $charMap += $charMaps[self::LDAP_ESCAPE_DN]; + } + + if (!$charMap) { + $charMap = $charMaps[0]; + } + + // Remove any chars to ignore from the list + $ignore = (string) $ignore; + + for ($i = 0, $l = strlen($ignore); $i < $l; ++$i) { + unset($charMap[$ignore[$i]]); + } + + // Do the main replacement + $result = strtr($subject, $charMap); + + // Encode leading/trailing spaces if self::LDAP_ESCAPE_DN is passed + if ($flags & self::LDAP_ESCAPE_DN) { + if ($result[0] === ' ') { + $result = '\\20'.substr($result, 1); + } + + if ($result[strlen($result) - 1] === ' ') { + $result = substr($result, 0, -1).'\\20'; + } + } + + return $result; + } +} diff --git a/vendor/symfony/polyfill-php56/README.md b/vendor/symfony/polyfill-php56/README.md new file mode 100644 index 0000000000000000000000000000000000000000..307ce5bc5cec1cc39444bf6a70983aed4ebc5644 --- /dev/null +++ b/vendor/symfony/polyfill-php56/README.md @@ -0,0 +1,15 @@ +Symfony Polyfill / Php56 +======================== + +This component provides functions unavailable in releases prior to PHP 5.6: + +- [`hash_equals`](http://php.net/hash_equals) (part of [hash](http://php.net/hash) extension) +- [`ldap_escape`](http://php.net/ldap_escape) (part of [ldap](http://php.net/ldap) 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/vendor/symfony/polyfill-php56/bootstrap.php b/vendor/symfony/polyfill-php56/bootstrap.php new file mode 100644 index 0000000000000000000000000000000000000000..587c2a81c5255b0c6208e70bb0372ec0852260c6 --- /dev/null +++ b/vendor/symfony/polyfill-php56/bootstrap.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Php56 as p; + +if (PHP_VERSION_ID < 50600) { + if (!function_exists('hash_equals')) { + function hash_equals($knownString, $userInput) { return p\Php56::hash_equals($knownString, $userInput); } + } + if (extension_loaded('ldap') && !function_exists('ldap_escape')) { + define('LDAP_ESCAPE_FILTER', 1); + define('LDAP_ESCAPE_DN', 2); + + function ldap_escape($subject, $ignore = '', $flags = 0) { return p\Php56::ldap_escape($subject, $ignore, $flags); } + } + + if (50509 === PHP_VERSION_ID && 4 === PHP_INT_SIZE) { + // Missing functions in PHP 5.5.9 - affects 32 bit builds of Ubuntu 14.04LTS + // See https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1315888 + if (!function_exists('gzopen') && function_exists('gzopen64')) { + function gzopen($filename, $mode, $use_include_path = 0) { return gzopen64($filename, $mode, $use_include_path); } + } + if (!function_exists('gzseek') && function_exists('gzseek64')) { + function gzseek($zp, $offset, $whence = SEEK_SET) { return gzseek64($zp, $offset, $whence); } + } + if (!function_exists('gztell') && function_exists('gztell64')) { + function gztell($zp) { return gztell64($zp); } + } + } +} diff --git a/vendor/symfony/polyfill-php56/composer.json b/vendor/symfony/polyfill-php56/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..ccf6c86792989d7dc16742f8cd3ab53020f995e3 --- /dev/null +++ b/vendor/symfony/polyfill-php56/composer.json @@ -0,0 +1,32 @@ +{ + "name": "symfony/polyfill-php56", + "type": "library", + "description": "Symfony polyfill backporting some PHP 5.6+ 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", + "symfony/polyfill-util": "~1.0" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Php56\\": "" }, + "files": [ "bootstrap.php" ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + } +} diff --git a/vendor/symfony/polyfill-php70/LICENSE b/vendor/symfony/polyfill-php70/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..39fa189d2b5fc989ceb996d94bb19b91bd4a7866 --- /dev/null +++ b/vendor/symfony/polyfill-php70/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-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/vendor/symfony/polyfill-php70/Php70.php b/vendor/symfony/polyfill-php70/Php70.php new file mode 100644 index 0000000000000000000000000000000000000000..e7ff0b26d88252ee6cacd367ece740762d2e26de --- /dev/null +++ b/vendor/symfony/polyfill-php70/Php70.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Php70; + +/** + * @author Nicolas Grekas + * + * @internal + */ +final class Php70 +{ + public static function intdiv($dividend, $divisor) + { + $dividend = self::intArg($dividend, __FUNCTION__, 1); + $divisor = self::intArg($divisor, __FUNCTION__, 2); + + if (0 === $divisor) { + throw new \DivisionByZeroError('Division by zero'); + } + if (-1 === $divisor && ~PHP_INT_MAX === $dividend) { + throw new \ArithmeticError('Division of PHP_INT_MIN by -1 is not an integer'); + } + + return ($dividend - ($dividend % $divisor)) / $divisor; + } + + public static function preg_replace_callback_array(array $patterns, $subject, $limit = -1, &$count = 0) + { + $count = 0; + $result = ''.$subject; + if (0 === $limit = self::intArg($limit, __FUNCTION__, 3)) { + return $result; + } + + foreach ($patterns as $pattern => $callback) { + $result = preg_replace_callback($pattern, $callback, $result, $limit, $c); + $count += $c; + } + + return $result; + } + + public static function error_clear_last() + { + static $handler; + if (!$handler) { + $handler = function() { return false; }; + } + set_error_handler($handler); + @trigger_error(''); + restore_error_handler(); + } + + public static function intArg($value, $caller, $pos) + { + if (is_int($value)) { + return $value; + } + if (!is_numeric($value) || PHP_INT_MAX <= ($value += 0) || ~PHP_INT_MAX >= $value) { + throw new \TypeError(sprintf('%s() expects parameter %d to be integer, %s given', $caller, $pos, gettype($value))); + } + + return (int) $value; + } +} diff --git a/vendor/symfony/polyfill-php70/README.md b/vendor/symfony/polyfill-php70/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d3a3a532896535f4843ed7d4dc1f51d580244d4a --- /dev/null +++ b/vendor/symfony/polyfill-php70/README.md @@ -0,0 +1,26 @@ +Symfony Polyfill / Php70 +======================== + +This component provides functions unavailable in releases prior to PHP 7.0: + +- [`intdiv`](http://php.net/intdiv) +- [`preg_replace_callback_array`](http://php.net/preg_replace_callback_array) +- [`error_clear_last`](http://php.net/error_clear_last) +- `random_bytes` and `random_int` (from [paragonie/random_compat](https://github.com/paragonie/random_compat)) +- [`*Error` throwable classes](http://php.net/Error) + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +Compatibility notes +=================== + +To write portable code between PHP5 and PHP7, some care must be taken: +- `\*Error` exceptions must be caught before `\Exception`; +- after calling `error_clear_last()`, the result of `$e = error_get_last()` must be + verified using `isset($e['message'][0])` instead of `null === $e`. + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php b/vendor/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php new file mode 100644 index 0000000000000000000000000000000000000000..68191244625989ccc21e579a4b321b5e79d6660c --- /dev/null +++ b/vendor/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php @@ -0,0 +1,5 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Php70 as p; + +if (PHP_VERSION_ID < 70000) { + if (!function_exists('intdiv')) { + function intdiv($dividend, $divisor) { return p\Php70::intdiv($dividend, $divisor); } + } + if (!function_exists('preg_replace_callback_array')) { + function preg_replace_callback_array(array $patterns, $subject, $limit = -1, &$count = 0) { return p\Php70::preg_replace_callback_array($patterns, $subject, $limit, $count); } + } + if (!function_exists('error_clear_last')) { + function error_clear_last() { return p\Php70::error_clear_last(); } + } +} diff --git a/vendor/symfony/polyfill-php70/composer.json b/vendor/symfony/polyfill-php70/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..d68f6ea9502a541a27629ed85387db9d8bf5e96d --- /dev/null +++ b/vendor/symfony/polyfill-php70/composer.json @@ -0,0 +1,33 @@ +{ + "name": "symfony/polyfill-php70", + "type": "library", + "description": "Symfony polyfill backporting some PHP 7.0+ 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", + "paragonie/random_compat": "~1.0|~2.0" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Php70\\": "" }, + "files": [ "bootstrap.php" ], + "classmap": [ "Resources/stubs" ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + } +} diff --git a/vendor/symfony/polyfill-util/Binary.php b/vendor/symfony/polyfill-util/Binary.php new file mode 100644 index 0000000000000000000000000000000000000000..815bc750cbd4e44fed8fd6be550e6b8387389eaf --- /dev/null +++ b/vendor/symfony/polyfill-util/Binary.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Util; + +if (extension_loaded('mbstring')) { + class Binary extends BinaryOnFuncOverload {} +} else { + class Binary extends BinaryNoFuncOverload {} +} diff --git a/vendor/symfony/polyfill-util/BinaryNoFuncOverload.php b/vendor/symfony/polyfill-util/BinaryNoFuncOverload.php new file mode 100644 index 0000000000000000000000000000000000000000..5ef3c6c2c22c2ecf685acd724f3205d8c46175ad --- /dev/null +++ b/vendor/symfony/polyfill-util/BinaryNoFuncOverload.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\Polyfill\Util; + +/** + * @author Nicolas Grekas + * + * @internal + */ +class BinaryNoFuncOverload +{ + public static function strlen($s) + { + return strlen($s); + } + + public static function strpos($haystack, $needle, $offset = 0) + { + return strpos($haystack, $needle, $offset); + } + + public static function strrpos($haystack, $needle, $offset = 0) + { + return strrpos($haystack, $needle, $offset); + } + + public static function substr($string, $start, $length = PHP_INT_MAX) + { + return substr($string, $start, $length); + } + + public static function stripos($s, $needle, $offset = 0) + { + return stripos($s, $needle, $offset); + } + + public static function stristr($s, $needle, $part = false) + { + return stristr($s, $needle, $part); + } + + public static function strrchr($s, $needle, $part = false) + { + return strrchr($s, $needle, $part); + } + + public static function strripos($s, $needle, $offset = 0) + { + return strripos($s, $needle, $offset); + } + + public static function strstr($s, $needle, $part = false) + { + return strstr($s, $needle, $part); + } +} diff --git a/vendor/symfony/polyfill-util/BinaryOnFuncOverload.php b/vendor/symfony/polyfill-util/BinaryOnFuncOverload.php new file mode 100644 index 0000000000000000000000000000000000000000..e1b886eaca34879d62fc1291ba954bbc17216d49 --- /dev/null +++ b/vendor/symfony/polyfill-util/BinaryOnFuncOverload.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Util; + +/** + * Binary safe version of string functions overloaded when MB_OVERLOAD_STRING is enabled. + * + * @author Nicolas Grekas + * + * @internal + */ +class BinaryOnFuncOverload +{ + public static function strlen($s) + { + return mb_strlen($s, '8bit'); + } + + public static function strpos($haystack, $needle, $offset = 0) + { + return mb_strpos($haystack, $needle, $offset, '8bit'); + } + + public static function strrpos($haystack, $needle, $offset = 0) + { + return mb_strrpos($haystack, $needle, $offset, '8bit'); + } + + public static function substr($string, $start, $length = 2147483647) + { + return mb_substr($string, $start, $length, '8bit'); + } + + public static function stripos($s, $needle, $offset = 0) + { + return mb_stripos($s, $needle, $offset, '8bit'); + } + + public static function stristr($s, $needle, $part = false) + { + return mb_stristr($s, $needle, $part, '8bit'); + } + + public static function strrchr($s, $needle, $part = false) + { + return mb_strrchr($s, $needle, $part, '8bit'); + } + + public static function strripos($s, $needle, $offset = 0) + { + return mb_strripos($s, $needle, $offset, '8bit'); + } + + public static function strstr($s, $needle, $part = false) + { + return mb_strstr($s, $needle, $part, '8bit'); + } +} diff --git a/vendor/symfony/polyfill-util/LICENSE b/vendor/symfony/polyfill-util/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..39fa189d2b5fc989ceb996d94bb19b91bd4a7866 --- /dev/null +++ b/vendor/symfony/polyfill-util/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-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/vendor/symfony/polyfill-util/README.md b/vendor/symfony/polyfill-util/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1c655fce376c8a5532c763b44c85120817d7bba2 --- /dev/null +++ b/vendor/symfony/polyfill-util/README.md @@ -0,0 +1,13 @@ +Symfony Polyfill / Util +======================= + +This component provides binary-safe string functions, using the +[mbstring](https://php.net/mbstring) extension when available. + +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/vendor/symfony/polyfill-util/TestListener.php b/vendor/symfony/polyfill-util/TestListener.php new file mode 100644 index 0000000000000000000000000000000000000000..966aefc9e4788864846240730c5349ee415d726d --- /dev/null +++ b/vendor/symfony/polyfill-util/TestListener.php @@ -0,0 +1,154 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Util; + +/** + * @author Nicolas Grekas + */ +class TestListener extends \PHPUnit_Framework_TestSuite implements \PHPUnit_Framework_TestListener +{ + public static $enabledPolyfills; + private $suite; + + public function __construct(\PHPUnit_Framework_TestSuite $suite = null) + { + if ($suite) { + $this->suite = $suite; + $this->setName($suite->getName().' with polyfills enabled'); + $this->addTest($suite); + } + } + + public function startTestSuite(\PHPUnit_Framework_TestSuite $mainSuite) + { + if (null !== self::$enabledPolyfills) { + return; + } + self::$enabledPolyfills = false; + + foreach ($mainSuite->tests() as $suite) { + $testClass = $suite->getName(); + if (!$tests = $suite->tests()) { + continue; + } + if (!preg_match('/^(.+)\\\\Tests(\\\\.*)Test$/', $testClass, $m)) { + $mainSuite->addTest(self::warning('Unknown naming convention for '.$testClass)); + continue; + } + if (!class_exists($m[1].$m[2])) { + continue; + } + $testedClass = new \ReflectionClass($m[1].$m[2]); + $bootstrap = new \SplFileObject(dirname($testedClass->getFileName()).'/bootstrap.php'); + $warnings = array(); + $defLine = null; + + foreach (new \RegexIterator($bootstrap, '/return p\\\\'.$testedClass->getShortName().'::/') as $defLine) { + if (!preg_match('/^\s*function (?P[^\(]++)(?P\([^\)]*+\)) \{ (?return p\\\\'.$testedClass->getShortName().'::[^\(]++)(?P\([^\)]*+\)); \}$/', $defLine, $f)) { + $warnings[] = self::warning('Invalid line in bootstrap.php: '.trim($defLine)); + continue; + } + $testNamespace = substr($testClass, 0, strrpos($testClass, '\\')); + if (function_exists($testNamespace.'\\'.$f['name'])) { + continue; + } + + try { + $r = new \ReflectionFunction($f['name']); + if ($r->isUserDefined()) { + throw new \ReflectionException(); + } + if (false !== strpos($f['signature'], '&')) { + $defLine = sprintf('return \\%s%s', $f['name'], $f['args']); + } else { + $defLine = sprintf("return \\call_user_func_array('%s', func_get_args())", $f['name']); + } + } catch (\ReflectionException $e) { + $defLine = sprintf("throw new \PHPUnit_Framework_SkippedTestError('Internal function not found: %s')", $f['name']); + } + + eval(<<getNamespaceName()} as p; + +function {$f['name']}{$f['signature']} +{ + if ('{$testClass}' === TestListener::\$enabledPolyfills) { + {$f['return']}{$f['args']}; + } + + {$defLine}; +} +EOPHP + ); + } + if (!$warnings && null === $defLine) { + $warnings[] = new \PHPUnit_Framework_SkippedTestCase('No Polyfills found in bootstrap.php for '.$testClass); + } else { + $mainSuite->addTest(new static($suite)); + } + } + foreach ($warnings as $w) { + $mainSuite->addTest($w); + } + } + + protected function setUp() + { + self::$enabledPolyfills = $this->suite->getName(); + } + + protected function tearDown() + { + self::$enabledPolyfills = false; + } + + public function addError(\PHPUnit_Framework_Test $test, \Exception $e, $time) + { + if (false !== self::$enabledPolyfills) { + $r = new \ReflectionProperty('Exception', 'message'); + $r->setAccessible(true); + $r->setValue($e, 'Polyfills enabled, '.$r->getValue($e)); + } + } + + public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, $time) + { + $this->addError($test, $e, $time); + } + + public function addIncompleteTest(\PHPUnit_Framework_Test $test, \Exception $e, $time) + { + } + + public function addRiskyTest(\PHPUnit_Framework_Test $test, \Exception $e, $time) + { + } + + public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $time) + { + } + + public function endTestSuite(\PHPUnit_Framework_TestSuite $suite) + { + } + + public function startTest(\PHPUnit_Framework_Test $test) + { + } + + public function endTest(\PHPUnit_Framework_Test $test, $time) + { + } +} diff --git a/vendor/symfony/polyfill-util/composer.json b/vendor/symfony/polyfill-util/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..b6ece90174ae0179860f98d0066b252f68083d0e --- /dev/null +++ b/vendor/symfony/polyfill-util/composer.json @@ -0,0 +1,30 @@ +{ + "name": "symfony/polyfill-util", + "type": "library", + "description": "Symfony utilities for portability of PHP codes", + "keywords": ["polyfill", "shim", "compat", "compatibility"], + "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\\Util\\": "" } + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + } +} diff --git a/vendor/symfony/swiftmailer-bundle/.travis.yml b/vendor/symfony/swiftmailer-bundle/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..84d57ae8234dc1329bf4b7e6fbe7349a032581dc --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/.travis.yml @@ -0,0 +1,32 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - hhvm + +sudo: false + +cache: + directories: + - $HOME/.composer/cache/files + +matrix: + fast_finish: true + include: + - php: 5.3 + env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak + - php: 5.6 + env: SYMFONY_VERSION=2.8.*@dev + - php: 5.6 + env: DEPENDENCIES=dev + +before_install: + - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi + - if [ "$SYMFONY_VERSION" != "" ]; then composer require --dev --no-update "symfony/symfony:$SYMFONY_VERSION"; fi + - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; + +install: composer update $COMPOSER_FLAGS diff --git a/vendor/symfony/swiftmailer-bundle/CHANGELOG b/vendor/symfony/swiftmailer-bundle/CHANGELOG new file mode 100644 index 0000000000000000000000000000000000000000..eabcd8e09cb1fc36814b6b2fe3980ad327b1ce01 --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/CHANGELOG @@ -0,0 +1,22 @@ +* 2.5.0 (2017-XX-XX) + + * n/a + +* 2.4.2 (2016-12-20) + + * fixed compatibility with Symfony 3.3 + +* 2.4.1 (2016-12-20) + + * added missing attachments in the web profiler + +* 2.4.0 (2016-10-09) + + * added support for setLocalDomain() and setStreamOptions() + * updated the styles of the SwiftMailer commands + * removed support for deprecated versions of Symfony + * added support for LoadBalancedTransport in SendEmailCommand + * fixed messagePart.charset not defined in the web profiler + * fixed performance on Symfony 3 (IntrospectableContainerInterface does not exist anymore) + * allowed empty transport configs + * added a priority flag on plugins tag diff --git a/vendor/symfony/swiftmailer-bundle/Command/DebugCommand.php b/vendor/symfony/swiftmailer-bundle/Command/DebugCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..392989cb1f29c0073cffe8c77619f7844855ba61 --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/Command/DebugCommand.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\Bundle\SwiftmailerBundle\Command; + +use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; + +/** + * A console command for retrieving information about mailers. + * + * @author Jérémy Romey + */ +class DebugCommand extends ContainerAwareCommand +{ + /** @var SymfonyStyle */ + private $io; + + /** + * @see Command + */ + protected function configure() + { + $this + ->setName('debug:swiftmailer') + ->setAliases(array( + 'swiftmailer:debug', + )) + ->setDefinition(array( + new InputArgument('name', InputArgument::OPTIONAL, 'A mailer name'), + )) + ->setDescription('Displays current mailers for an application') + ->setHelp(<<%command.name%
    displays the configured mailers: + + php %command.full_name% mailer-name +EOF + ) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $this->io = new SymfonyStyle($input, $output); + $name = $input->getArgument('name'); + + if ($name) { + $this->outputMailer($name); + } else { + $this->outputMailers(); + } + } + + protected function outputMailers($routes = null) + { + $this->io->title('Configured SwiftMailer Mailers'); + + $tableHeaders = array('Name', 'Transport', 'Spool', 'Delivery', 'Single Address'); + $tableRows = array(); + + $mailers = $this->getContainer()->getParameter('swiftmailer.mailers'); + foreach ($mailers as $name => $mailer) { + $mailer = $this->getContainer()->get($mailer); + $transport = $this->getContainer()->getParameter(sprintf('swiftmailer.mailer.%s.transport.name', $name)); + $spool = $this->getContainer()->getParameter(sprintf('swiftmailer.mailer.%s.spool.enabled', $name)) ? 'YES' : 'NO'; + $delivery = $this->getContainer()->getParameter(sprintf('swiftmailer.mailer.%s.delivery.enabled', $name)) ? 'YES' : 'NO'; + $singleAddress = $this->getContainer()->getParameter(sprintf('swiftmailer.mailer.%s.single_address', $name)); + + if ($this->isDefaultMailer($name)) { + $name = sprintf('%s (default mailer)', $name); + } + + $tableRows[] = array($name, $transport, $spool, $delivery, $singleAddress); + } + + $this->io->table($tableHeaders, $tableRows); + } + + /** + * @throws \InvalidArgumentException When route does not exist + */ + protected function outputMailer($name) + { + try { + $service = sprintf('swiftmailer.mailer.%s', $name); + $mailer = $this->getContainer()->get($service); + } catch (ServiceNotFoundException $e) { + throw new \InvalidArgumentException(sprintf('The mailer "%s" does not exist.', $name)); + } + + $tableHeaders = array('Property', 'Value'); + $tableRows = array(); + + $transport = $mailer->getTransport(); + $spool = $this->getContainer()->getParameter(sprintf('swiftmailer.mailer.%s.spool.enabled', $name)) ? 'YES' : 'NO'; + $delivery = $this->getContainer()->getParameter(sprintf('swiftmailer.mailer.%s.delivery.enabled', $name)) ? 'YES' : 'NO'; + $singleAddress = $this->getContainer()->getParameter(sprintf('swiftmailer.mailer.%s.single_address', $name)); + + $this->io->title(sprintf('Configuration of the Mailer "%s"', $name)); + if ($this->isDefaultMailer($name)) { + $this->io->comment('This is the default mailer'); + } + + $tableRows[] = array('Name', $name); + $tableRows[] = array('Service', $service); + $tableRows[] = array('Class', get_class($mailer)); + $tableRows[] = array('Transport', sprintf('%s (%s)', sprintf('swiftmailer.mailer.%s.transport.name', $name), get_class($transport))); + $tableRows[] = array('Spool', $spool); + if ($this->getContainer()->hasParameter(sprintf('swiftmailer.spool.%s.file.path', $name))) { + $tableRows[] = array('Spool file', $this->getContainer()->getParameter(sprintf('swiftmailer.spool.%s.file.path', $name))); + } + $tableRows[] = array('Delivery', $delivery); + $tableRows[] = array('Single Address', $singleAddress); + + $this->io->table($tableHeaders, $tableRows); + } + + private function isDefaultMailer($name) + { + return $this->getContainer()->getParameter('swiftmailer.default_mailer') === $name || 'default' === $name; + } +} diff --git a/vendor/symfony/swiftmailer-bundle/Command/NewEmailCommand.php b/vendor/symfony/swiftmailer-bundle/Command/NewEmailCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..a7dcdd5421eafa44933bd69f5a40b85d17114417 --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/Command/NewEmailCommand.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SwiftmailerBundle\Command; + +use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; + +/** + * A console command for creating and sending simple emails. + * + * @author Gusakov Nikita + */ +class NewEmailCommand extends ContainerAwareCommand +{ + /** @var SymfonyStyle */ + private $io; + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('swiftmailer:email:send') + ->setDescription('Send simple email message') + ->addOption('from', null, InputOption::VALUE_REQUIRED, 'The from address of the message') + ->addOption('to', null, InputOption::VALUE_REQUIRED, 'The to address of the message') + ->addOption('subject', null, InputOption::VALUE_REQUIRED, 'The subject of the message') + ->addOption('body', null, InputOption::VALUE_REQUIRED, 'The body of the message') + ->addOption('mailer', null, InputOption::VALUE_REQUIRED, 'The mailer name', 'default') + ->addOption('content-type', null, InputOption::VALUE_REQUIRED, 'The body content type of the message', 'text/html') + ->addOption('charset', null, InputOption::VALUE_REQUIRED, 'The body charset of the message', 'UTF8') + ->addOption('body-source', null, InputOption::VALUE_REQUIRED, 'The source where body come from [stdin|file]', 'stdin') + ->setHelp(<<%command.name%
    command creates and sends a simple email message. + +php %command.full_name% --mailer=custom_mailer --content-type=text/xml + +You can get body of message from a file: +php %command.full_name% --body-source=file --body=/path/to/file + +EOF + ); + } + + /** + * {@inheritdoc} + */ + protected function initialize(InputInterface $input, OutputInterface $output) + { + $this->io = new SymfonyStyle($input, $output); + $this->io->title('SwiftMailer\'s Interactive Email Sender'); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $mailerServiceName = sprintf('swiftmailer.mailer.%s', $input->getOption('mailer')); + if (!$this->getContainer()->has($mailerServiceName)) { + throw new \InvalidArgumentException(sprintf('The mailer "%s" does not exist.', $input->getOption('mailer'))); + } + + switch ($input->getOption('body-source')) { + case 'file': + $filename = $input->getOption('body'); + $content = file_get_contents($filename); + if ($content === false) { + throw new \Exception(sprintf('Could not get contents from "%s".', $filename)); + } + $input->setOption('body', $content); + break; + case 'stdin': + break; + default: + throw new \InvalidArgumentException('Body-input option should be "stdin" or "file".'); + } + + $message = $this->createMessage($input); + $mailer = $this->getContainer()->get($mailerServiceName); + $sentMessages = $mailer->send($message); + + $this->io->success(sprintf('%s emails were successfully sent.', $sentMessages)); + } + + /** + * {@inheritdoc} + */ + protected function interact(InputInterface $input, OutputInterface $output) + { + foreach ($input->getOptions() as $option => $value) { + if ($value === null) { + $input->setOption($option, $this->io->ask(sprintf('%s', ucfirst($option)))); + } + } + } + + /** + * {@inheritdoc} + */ + public function isEnabled() + { + return $this->getContainer()->has('mailer'); + } + + /** + * Creates new message from input options. + * + * @param InputInterface $input An InputInterface instance + * + * @return \Swift_Message New message + */ + private function createMessage(InputInterface $input) + { + $message = \Swift_Message::newInstance( + $input->getOption('subject'), + $input->getOption('body'), + $input->getOption('content-type'), + $input->getOption('charset') + ); + $message->setFrom($input->getOption('from')); + $message->setTo($input->getOption('to')); + + return $message; + } +} diff --git a/vendor/symfony/swiftmailer-bundle/Command/SendEmailCommand.php b/vendor/symfony/swiftmailer-bundle/Command/SendEmailCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..eb402924d0122365e37b2c4e8a13a8281e8a69dc --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/Command/SendEmailCommand.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SwiftmailerBundle\Command; + +use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; + +/** + * Send Emails from the spool. + * + * @author Fabien Potencier + * @author Clément JOBEILI + * @author Toni Uebernickel + */ +class SendEmailCommand extends ContainerAwareCommand +{ + /** @var SymfonyStyle */ + private $io; + + protected function configure() + { + $this + ->setName('swiftmailer:spool:send') + ->setDescription('Sends emails from the spool') + ->addOption('message-limit', null, InputOption::VALUE_REQUIRED, 'The maximum number of messages to send.') + ->addOption('time-limit', null, InputOption::VALUE_REQUIRED, 'The time limit for sending messages (in seconds).') + ->addOption('recover-timeout', null, InputOption::VALUE_REQUIRED, 'The timeout for recovering messages that have taken too long to send (in seconds).') + ->addOption('mailer', null, InputOption::VALUE_REQUIRED, 'The mailer name.') + ->addOption('transport', null, InputOption::VALUE_REQUIRED, 'The service of the transport to use to send the messages.') + ->setHelp(<<%command.name% command sends all emails from the spool. + +php %command.full_name% --message-limit=10 --time-limit=10 --recover-timeout=900 --mailer=default + +EOF + ) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $this->io = new SymfonyStyle($input, $output); + + $name = $input->getOption('mailer'); + if ($name) { + $this->processMailer($name, $input, $output); + } else { + $mailers = array_keys($this->getContainer()->getParameter('swiftmailer.mailers')); + foreach ($mailers as $name) { + $this->processMailer($name, $input, $output); + } + } + } + + private function processMailer($name, InputInterface $input, OutputInterface $output) + { + if (!$this->getContainer()->has(sprintf('swiftmailer.mailer.%s', $name))) { + throw new \InvalidArgumentException(sprintf('The mailer "%s" does not exist.', $name)); + } + + $this->io->text(sprintf('[%s] Processing %s mailer spool... ', date('Y-m-d H:i:s'), $name)); + if ($this->getContainer()->getParameter(sprintf('swiftmailer.mailer.%s.spool.enabled', $name))) { + $mailer = $this->getContainer()->get(sprintf('swiftmailer.mailer.%s', $name)); + $transport = $mailer->getTransport(); + + if ($transport instanceof \Swift_Transport_LoadBalancedTransport) { + foreach ($transport->getTransports() as $eachTransport) { + $this->recoverSpool($name, $eachTransport, $input, $output); + } + } else { + $this->recoverSpool($name, $transport, $input, $output); + } + } else { + $this->io->warning('There are no emails to send because the spool is disabled.'); + } + } + + private function recoverSpool($name, \Swift_Transport $transport, InputInterface $input, OutputInterface $output) + { + if ($transport instanceof \Swift_Transport_SpoolTransport) { + $spool = $transport->getSpool(); + if ($spool instanceof \Swift_ConfigurableSpool) { + $spool->setMessageLimit($input->getOption('message-limit')); + $spool->setTimeLimit($input->getOption('time-limit')); + } + + if ($spool instanceof \Swift_FileSpool) { + if (null !== $input->getOption('recover-timeout')) { + $spool->recover($input->getOption('recover-timeout')); + } else { + $spool->recover(); + } + } + + $transportService = $input->getOption('transport') ?: sprintf('swiftmailer.mailer.%s.transport.real', $name); + $sent = $spool->flushQueue($this->getContainer()->get($transportService)); + + $this->io->text(sprintf('%d emails sent', $sent)); + } + } +} diff --git a/vendor/symfony/swiftmailer-bundle/DataCollector/MessageDataCollector.php b/vendor/symfony/swiftmailer-bundle/DataCollector/MessageDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..9b9079a1349f24f045969df7270c34d496571185 --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/DataCollector/MessageDataCollector.php @@ -0,0 +1,168 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SwiftmailerBundle\DataCollector; + +use Symfony\Component\HttpKernel\DataCollector\DataCollector; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\DependencyInjection\ContainerInterface; + +/** + * MessageDataCollector. + * + * @author Fabien Potencier + * @author Clément JOBEILI + * @author Jérémy Romey + */ +class MessageDataCollector extends DataCollector +{ + private $container; + + /** + * We don't inject the message logger and mailer here + * to avoid the creation of these objects when no emails are sent. + */ + public function __construct(ContainerInterface $container) + { + $this->container = $container; + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + $this->data = array( + 'mailer' => array(), + 'messageCount' => 0, + 'defaultMailer' => '', + ); + // only collect when Swiftmailer has already been initialized + if (class_exists('Swift_Mailer', false)) { + $mailers = $this->container->getParameter('swiftmailer.mailers'); + foreach ($mailers as $name => $mailer) { + if ($this->container->getParameter('swiftmailer.default_mailer') == $name) { + $this->data['defaultMailer'] = $name; + } + $loggerName = sprintf('swiftmailer.mailer.%s.plugin.messagelogger', $name); + if ($this->container->has($loggerName)) { + $logger = $this->container->get($loggerName); + $this->data['mailer'][$name] = array( + 'messages' => $logger->getMessages(), + 'messageCount' => $logger->countMessages(), + 'isSpool' => $this->container->getParameter(sprintf('swiftmailer.mailer.%s.spool.enabled', $name)), + ); + $this->data['messageCount'] += $logger->countMessages(); + } + } + } + } + + /** + * Returns the mailer names. + * + * @return array The mailer names. + */ + public function getMailers() + { + return array_keys($this->data['mailer']); + } + + /** + * Returns the data collected of a mailer. + * + * @return array The data of the mailer. + */ + public function getMailerData($name) + { + if (!isset($this->data['mailer'][$name])) { + throw new \LogicException(sprintf('Missing "%s" data in "%s".', $name, get_class($this))); + } + + return $this->data['mailer'][$name]; + } + + /** + * Returns the message count of a mailer or the total. + * + * @return int The number of messages. + */ + public function getMessageCount($name = null) + { + if (is_null($name)) { + return $this->data['messageCount']; + } elseif ($data = $this->getMailerData($name)) { + return $data['messageCount']; + } + + return; + } + + /** + * Returns the messages of a mailer. + * + * @return array The messages. + */ + public function getMessages($name = 'default') + { + if ($data = $this->getMailerData($name)) { + return $data['messages']; + } + + return array(); + } + + /** + * Returns if the mailer has spool. + * + * @return bool + */ + public function isSpool($name) + { + if ($data = $this->getMailerData($name)) { + return $data['isSpool']; + } + + return; + } + + /** + * Returns if the mailer is the default mailer. + * + * @return bool + */ + public function isDefaultMailer($name) + { + return $this->data['defaultMailer'] == $name; + } + + public function extractAttachments(\Swift_Message $message) + { + $attachments = array(); + + foreach ($message->getChildren() as $child) { + if ($child instanceof \Swift_Attachment) { + $attachments[] = $child; + } + } + + return $attachments; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'swiftmailer'; + } +} diff --git a/vendor/symfony/swiftmailer-bundle/DependencyInjection/Compiler/RegisterPluginsPass.php b/vendor/symfony/swiftmailer-bundle/DependencyInjection/Compiler/RegisterPluginsPass.php new file mode 100644 index 0000000000000000000000000000000000000000..4f37e4f4af6cf33c1b74852d37fb6d460e15caf1 --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/DependencyInjection/Compiler/RegisterPluginsPass.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SwiftmailerBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * RegisterPluginsPass registers Swiftmailer plugins. + * + * @author Fabien Potencier + */ +class RegisterPluginsPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!$container->findDefinition('swiftmailer.mailer') || !$container->getParameter('swiftmailer.mailers')) { + return; + } + + $mailers = $container->getParameter('swiftmailer.mailers'); + foreach ($mailers as $name => $mailer) { + $plugins = $this->findSortedByPriorityTaggedServiceIds($container, sprintf('swiftmailer.%s.plugin', $name)); + $transport = sprintf('swiftmailer.mailer.%s.transport', $name); + $definition = $container->findDefinition($transport); + foreach ($plugins as $id => $args) { + $definition->addMethodCall('registerPlugin', array(new Reference($id))); + } + } + } + + /** + * @return array + */ + private function findSortedByPriorityTaggedServiceIds(ContainerBuilder $container, $tag) + { + $taggedServices = $container->findTaggedServiceIds($tag); + uasort( + $taggedServices, + function ($tagA, $tagB) { + $priorityTagA = isset($tagA[0]['priority']) ? $tagA[0]['priority'] : 0; + $priorityTagB = isset($tagB[0]['priority']) ? $tagB[0]['priority'] : 0; + + return $priorityTagA - $priorityTagB; + } + ); + + return $taggedServices; + } +} diff --git a/vendor/symfony/swiftmailer-bundle/DependencyInjection/Configuration.php b/vendor/symfony/swiftmailer-bundle/DependencyInjection/Configuration.php new file mode 100644 index 0000000000000000000000000000000000000000..4db775952d7a7eb54e96c6d5264ac2289633cf6a --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/DependencyInjection/Configuration.php @@ -0,0 +1,197 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SwiftmailerBundle\DependencyInjection; + +use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +/** + * This class contains the configuration information for the bundle. + * + * This information is solely responsible for how the different configuration + * sections are normalized, and merged. + * + * @author Christophe Coevoet + */ +class Configuration implements ConfigurationInterface +{ + private $debug; + + /** + * @param bool $debug The kernel.debug value + */ + public function __construct($debug) + { + $this->debug = (Boolean) $debug; + } + + /** + * {@inheritdoc} + */ + public function getConfigTreeBuilder() + { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('swiftmailer'); + + $rootNode + ->beforeNormalization() + ->ifTrue(function ($v) { return is_array($v) && !array_key_exists('mailers', $v) && !array_key_exists('mailer', $v); }) + ->then(function ($v) { + $mailer = array(); + foreach ($v as $key => $value) { + if ('default_mailer' == $key) { + continue; + } + $mailer[$key] = $v[$key]; + unset($v[$key]); + } + $v['default_mailer'] = isset($v['default_mailer']) ? (string) $v['default_mailer'] : 'default'; + $v['mailers'] = array($v['default_mailer'] => $mailer); + + return $v; + }) + ->end() + ->children() + ->scalarNode('default_mailer')->end() + ->append($this->getMailersNode()) + ->end() + ->fixXmlConfig('mailer') + ; + + return $treeBuilder; + } + + /** + * @return ArrayNodeDefinition + */ + private function getMailersNode() + { + $treeBuilder = new TreeBuilder(); + $node = $treeBuilder->root('mailers'); + + $node + ->requiresAtLeastOneElement() + ->useAttributeAsKey('name') + ->prototype('array') + // BC layer for "delivery_address: null" (the case of a string goes through the XML normalization too) + ->beforeNormalization() + ->ifTrue(function ($v) { + return is_array($v) && array_key_exists('delivery_address', $v) && null === $v['delivery_address']; + }) + ->then(function ($v) { + @trigger_error('The swiftmailer.delivery_address configuration key is deprecated since version 2.3.10 and will be removed in 3.0. Use the swiftmailer.delivery_addresses configuration key instead (or remove the empty setting)', E_USER_DEPRECATED); + unset($v['delivery_address']); + + if (!isset($v['delivery_addresses'])) { + $v['delivery_addresses'] = array(); + } + + return $v; + }) + ->end() + ->children() + ->scalarNode('url')->defaultNull()->end() + ->scalarNode('transport')->defaultValue('smtp')->end() + ->scalarNode('username')->defaultNull()->end() + ->scalarNode('password')->defaultNull()->end() + ->scalarNode('host')->defaultValue('localhost')->end() + ->scalarNode('port')->defaultNull()->end() + ->scalarNode('timeout')->defaultValue(30)->end() + ->scalarNode('source_ip')->defaultNull()->end() + ->scalarNode('local_domain')->defaultNull()->end() + ->arrayNode('stream_options') + ->ignoreExtraKeys(false) + ->normalizeKeys(false) + ->beforeNormalization() + ->ifTrue(function ($v) { return isset($v['stream-option']); }) + ->then(function ($v) { + $recurse = function ($array) use (&$recurse) { + if (isset($array['name'])) { + $array = array($array); + } + $n = array(); + foreach ($array as $v) { + $k = $v['name']; + if (isset($v['value'])) { + $n[$k] = $v['value']; + } elseif (isset($v['stream-option'])) { + $n[$k] = $recurse($v['stream-option']); + } + } + return $n; + }; + return $recurse($v['stream-option']); + }) + ->end() + ->validate() + ->ifTrue(function ($v) { return !method_exists('Swift_Transport_EsmtpTransport', 'setStreamOptions'); }) + ->thenInvalid('stream_options is only available in Swiftmailer 5.4.2 or later.') + ->end() + ->end() + ->scalarNode('encryption') + ->defaultNull() + ->validate() + ->ifNotInArray(array('tls', 'ssl', null)) + ->thenInvalid('The %s encryption is not supported') + ->end() + ->end() + ->scalarNode('auth_mode') + ->defaultNull() + ->validate() + ->ifNotInArray(array('plain', 'login', 'cram-md5', null)) + ->thenInvalid('The %s authentication mode is not supported') + ->end() + ->end() + ->scalarNode('sender_address')->end() + ->arrayNode('delivery_addresses') + ->performNoDeepMerging() + ->beforeNormalization() + ->ifArray() + ->then(function ($v) { return array_values($v); }) + ->end() + ->prototype('scalar') + ->end() + ->end() + ->arrayNode('antiflood') + ->children() + ->scalarNode('threshold')->defaultValue(99)->end() + ->scalarNode('sleep')->defaultValue(0)->end() + ->end() + ->end() + ->booleanNode('logging')->defaultValue($this->debug)->end() + ->arrayNode('spool') + ->children() + ->scalarNode('type')->defaultValue('file')->end() + ->scalarNode('path')->defaultValue('%kernel.cache_dir%/swiftmailer/spool')->end() + ->scalarNode('id')->defaultNull()->info('Used by "service" type')->end() + ->end() + ->validate() + ->ifTrue(function ($v) { return 'service' === $v['type'] && empty($v['id']); }) + ->thenInvalid('You have to configure the service id') + ->end() + ->end() + ->end() + ->fixXmlConfig('delivery_whitelist_pattern', 'delivery_whitelist') + ->fixXmlConfig('delivery_address', 'delivery_addresses') + ->children() + ->arrayNode('delivery_whitelist') + ->prototype('scalar') + ->end() + ->end() + ->booleanNode('disable_delivery')->end() + ->end() + ; + + return $node; + } +} diff --git a/vendor/symfony/swiftmailer-bundle/DependencyInjection/SmtpTransportConfigurator.php b/vendor/symfony/swiftmailer-bundle/DependencyInjection/SmtpTransportConfigurator.php new file mode 100644 index 0000000000000000000000000000000000000000..6135d1cf2ef1b8d72741d6ddd3f6aee5119869fd --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/DependencyInjection/SmtpTransportConfigurator.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SwiftmailerBundle\DependencyInjection; + +use Symfony\Component\Routing\RequestContext; + +class SmtpTransportConfigurator +{ + private $localDomain; + + private $requestContext; + + public function __construct($localDomain, RequestContext $requestContext = null) + { + $this->localDomain = $localDomain; + $this->requestContext = $requestContext; + } + + /** + * Sets the local domain based on the current request context. + */ + public function configure(\Swift_Transport_AbstractSmtpTransport $transport) + { + if ($this->localDomain) { + $transport->setLocalDomain($this->localDomain); + } elseif ($this->requestContext) { + $transport->setLocalDomain($this->requestContext->getHost()); + } + } +} diff --git a/vendor/symfony/swiftmailer-bundle/DependencyInjection/SwiftmailerExtension.php b/vendor/symfony/swiftmailer-bundle/DependencyInjection/SwiftmailerExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..dbe195f84d20a0d6debf3193e65dbd8a5879b8a5 --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/DependencyInjection/SwiftmailerExtension.php @@ -0,0 +1,395 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SwiftmailerBundle\DependencyInjection; + +use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ChildDefinition; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\FileLocator; + +/** + * SwiftmailerExtension is an extension for the SwiftMailer library. + * + * @author Fabien Potencier + */ +class SwiftmailerExtension extends Extension +{ + /** + * Loads the Swift Mailer configuration. + * + * Usage example: + * + * + * fabien + * xxxxx + * + * + * + * @param array $configs An array of configuration settings + * @param ContainerBuilder $container A ContainerBuilder instance + */ + public function load(array $configs, ContainerBuilder $container) + { + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('swiftmailer.xml'); + + $configuration = $this->getConfiguration($configs, $container); + $config = $this->processConfiguration($configuration, $configs); + + $mailers = array(); + foreach ($config['mailers'] as $name => $mailer) { + $isDefaultMailer = $config['default_mailer'] === $name; + $this->configureMailer($name, $mailer, $container, $isDefaultMailer); + $mailers[$name] = sprintf('swiftmailer.mailer.%s', $name); + } + ksort($mailers); + $container->setParameter('swiftmailer.mailers', $mailers); + $container->setParameter('swiftmailer.default_mailer', $config['default_mailer']); + + $container->findDefinition('swiftmailer.data_collector')->addTag('data_collector', array('template' => '@Swiftmailer/Collector/swiftmailer.html.twig', 'id' => 'swiftmailer', 'priority' => 245)); + + $container->setAlias('mailer', 'swiftmailer.mailer'); + } + + protected function configureMailer($name, array $mailer, ContainerBuilder $container, $isDefaultMailer = false) + { + $definitionDecorator = $this->createChildDefinition('swiftmailer.transport.eventdispatcher.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.transport.eventdispatcher', $name), $definitionDecorator) + ; + + $usedEnvs = null; + $disableDelivery = isset($mailer['disable_delivery']) && $mailer['disable_delivery']; + + if (method_exists($container, 'resolveEnvPlaceholders')) { + $options = array(); + $envVariablesAllowed = array('transport', 'url', 'username', 'password', 'host', 'port', 'timeout', 'source_ip', 'local_domain', 'encryption', 'auth_mode'); + foreach ($envVariablesAllowed as $key) { + $container->resolveEnvPlaceholders($mailer[$key], null, $usedEnvs); + $options[$key] = $mailer[$key]; + } + } + if ($usedEnvs && !$disableDelivery) { + $transportId = sprintf('swiftmailer.mailer.%s.transport.dynamic', $name); + $definitionDecorator = new Definition('\Swift_Transport'); + $definitionDecorator->setFactory(array('Symfony\Bundle\SwiftmailerBundle\DependencyInjection\SwiftmailerTransportFactory', 'createTransport')); + $definitionDecorator->setArguments(array( + $options, + new Reference('router.request_context', ContainerInterface::NULL_ON_INVALID_REFERENCE), + new Reference(sprintf('swiftmailer.mailer.%s.transport.eventdispatcher', $name)), + )); + $container->setDefinition(sprintf('swiftmailer.mailer.%s.transport.dynamic', $name), $definitionDecorator); + $container->setAlias(sprintf('swiftmailer.mailer.%s.transport', $name), $transportId); + + $definitionDecorator = $this->createChildDefinition('swiftmailer.mailer.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s', $name), $definitionDecorator) + ->replaceArgument(0, new Reference(sprintf('swiftmailer.mailer.%s.transport', $name))) + ; + + $container->setParameter(sprintf('swiftmailer.mailer.%s.transport.name', $name), 'dynamic'); + } else { + $mailer = SwiftmailerTransportFactory::resolveOptions($mailer); + $transport = $disableDelivery ? 'null' : $mailer['transport']; + + $container->setParameter(sprintf('swiftmailer.mailer.%s.transport.name', $name), $transport); + + $transportId = in_array($transport, array('smtp', 'sendmail', 'null', 'mail')) + ? sprintf('swiftmailer.mailer.%s.transport.%s', $name, $transport) + : $transport; + + $this->configureMailerTransport($name, $mailer, $container, $transport, $isDefaultMailer); + } + $this->configureMailerSpool($name, $mailer, $container, $transportId, $isDefaultMailer); + $this->configureMailerSenderAddress($name, $mailer, $container, $isDefaultMailer); + $this->configureMailerAntiFlood($name, $mailer, $container, $isDefaultMailer); + $this->configureMailerDeliveryAddress($name, $mailer, $container, $isDefaultMailer); + $this->configureMailerLogging($name, $mailer, $container, $isDefaultMailer); + + $container->setParameter(sprintf('swiftmailer.mailer.%s.delivery.enabled', $name), !$disableDelivery); + + // alias + if ($isDefaultMailer) { + $container->setAlias('swiftmailer.mailer', sprintf('swiftmailer.mailer.%s', $name)); + $container->setAlias('swiftmailer.transport', sprintf('swiftmailer.mailer.%s.transport', $name)); + $container->setParameter('swiftmailer.spool.enabled', $container->getParameter(sprintf('swiftmailer.mailer.%s.spool.enabled', $name))); + $container->setParameter('swiftmailer.delivery.enabled', $container->getParameter(sprintf('swiftmailer.mailer.%s.delivery.enabled', $name))); + $container->setParameter('swiftmailer.single_address', $container->getParameter(sprintf('swiftmailer.mailer.%s.single_address', $name))); + } + } + + protected function configureMailerTransport($name, array $mailer, ContainerBuilder $container, $transport, $isDefaultMailer = false) + { + foreach (array('encryption', 'port', 'host', 'username', 'password', 'auth_mode', 'timeout', 'source_ip', 'local_domain') as $key) { + $container->setParameter(sprintf('swiftmailer.mailer.%s.transport.smtp.%s', $name, $key), $mailer[$key]); + } + + if ('smtp' === $transport) { + $authDecorator = $this->createChildDefinition('swiftmailer.transport.authhandler.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.transport.authhandler', $name), $authDecorator) + ->addMethodCall('setUsername', array(sprintf('%%swiftmailer.mailer.%s.transport.smtp.username%%', $name))) + ->addMethodCall('setPassword', array(sprintf('%%swiftmailer.mailer.%s.transport.smtp.password%%', $name))) + ->addMethodCall('setAuthMode', array(sprintf('%%swiftmailer.mailer.%s.transport.smtp.auth_mode%%', $name))); + + $bufferDecorator = $this->createChildDefinition('swiftmailer.transport.buffer.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.transport.buffer', $name), $bufferDecorator); + + $configuratorDecorator = $this->createChildDefinition('swiftmailer.transport.smtp.configurator.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.transport.configurator.%s', $name), $configuratorDecorator) + ->setArguments(array( + sprintf('%%swiftmailer.mailer.%s.transport.smtp.local_domain%%', $name), + new Reference('router.request_context', ContainerInterface::NULL_ON_INVALID_REFERENCE), + )) + ; + + $definitionDecorator = $this->createChildDefinition('swiftmailer.transport.smtp.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.transport.smtp', $name), $definitionDecorator) + ->setArguments(array( + new Reference(sprintf('swiftmailer.mailer.%s.transport.buffer', $name)), + array(new Reference(sprintf('swiftmailer.mailer.%s.transport.authhandler', $name))), + new Reference(sprintf('swiftmailer.mailer.%s.transport.eventdispatcher', $name)), + )) + ->addMethodCall('setHost', array(sprintf('%%swiftmailer.mailer.%s.transport.smtp.host%%', $name))) + ->addMethodCall('setPort', array(sprintf('%%swiftmailer.mailer.%s.transport.smtp.port%%', $name))) + ->addMethodCall('setEncryption', array(sprintf('%%swiftmailer.mailer.%s.transport.smtp.encryption%%', $name))) + ->addMethodCall('setTimeout', array(sprintf('%%swiftmailer.mailer.%s.transport.smtp.timeout%%', $name))) + ->addMethodCall('setSourceIp', array(sprintf('%%swiftmailer.mailer.%s.transport.smtp.source_ip%%', $name))) + ->setConfigurator(array(new Reference(sprintf('swiftmailer.transport.configurator.%s', $name)), 'configure')) + ; + + if (isset($mailer['stream_options'])) { + $container->setParameter(sprintf('swiftmailer.mailer.%s.transport.smtp.stream_options', $name), $mailer['stream_options']); + $definitionDecorator->addMethodCall('setStreamOptions', array(sprintf('%%swiftmailer.mailer.%s.transport.smtp.stream_options%%', $name))); + } + + $container->setAlias(sprintf('swiftmailer.mailer.%s.transport', $name), sprintf('swiftmailer.mailer.%s.transport.%s', $name, $transport)); + } elseif ('sendmail' === $transport) { + $bufferDecorator = $this->createChildDefinition('swiftmailer.transport.buffer.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.transport.buffer', $name), $bufferDecorator); + + $configuratorDecorator = $this->createChildDefinition('swiftmailer.transport.smtp.configurator.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.transport.configurator.%s', $name), $configuratorDecorator) + ->setArguments(array( + sprintf('%%swiftmailer.mailer.%s.transport.smtp.local_domain%%', $name), + new Reference('router.request_context', ContainerInterface::NULL_ON_INVALID_REFERENCE), + )) + ; + + $definitionDecorator = $this->createChildDefinition(sprintf('swiftmailer.transport.%s.abstract', $transport)); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.transport.%s', $name, $transport), $definitionDecorator) + ->setArguments(array( + new Reference(sprintf('swiftmailer.mailer.%s.transport.buffer', $name)), + new Reference(sprintf('swiftmailer.mailer.%s.transport.eventdispatcher', $name)), + )) + ->setConfigurator(array(new Reference(sprintf('swiftmailer.transport.configurator.%s', $name)), 'configure')) + ; + + $container->setAlias(sprintf('swiftmailer.mailer.%s.transport', $name), sprintf('swiftmailer.mailer.%s.transport.%s', $name, $transport)); + } elseif ('mail' === $transport) { + // deprecated + $definitionDecorator = $this->createChildDefinition(sprintf('swiftmailer.transport.%s.abstract', $transport)); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.transport.%s', $name, $transport), $definitionDecorator) + ->addArgument(new Reference(sprintf('swiftmailer.mailer.%s.transport.eventdispatcher', $name))) + ; + $container->setAlias(sprintf('swiftmailer.mailer.%s.transport', $name), sprintf('swiftmailer.mailer.%s.transport.%s', $name, $transport)); + } elseif ('null' === $transport) { + $definitionDecorator = $this->createChildDefinition('swiftmailer.transport.null.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.transport.null', $name, $transport), $definitionDecorator) + ->setArguments(array( + new Reference(sprintf('swiftmailer.mailer.%s.transport.eventdispatcher', $name)), + )) + ; + $container->setAlias(sprintf('swiftmailer.mailer.%s.transport', $name), sprintf('swiftmailer.mailer.%s.transport.%s', $name, $transport)); + } else { + $container->setAlias(sprintf('swiftmailer.mailer.%s.transport', $name), sprintf('swiftmailer.mailer.transport.%s', $transport)); + } + + $definitionDecorator = $this->createChildDefinition('swiftmailer.mailer.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s', $name), $definitionDecorator) + ->replaceArgument(0, new Reference(sprintf('swiftmailer.mailer.%s.transport', $name))) + ; + } + + protected function configureMailerSpool($name, array $mailer, ContainerBuilder $container, $transport, $isDefaultMailer = false) + { + if (isset($mailer['spool'])) { + $type = $mailer['spool']['type']; + if ('service' === $type) { + $container->setAlias(sprintf('swiftmailer.mailer.%s.spool.service', $name), $mailer['spool']['id']); + } else { + foreach (array('path') as $key) { + $container->setParameter(sprintf('swiftmailer.spool.%s.%s.%s', $name, $type, $key), $mailer['spool'][$key].'/'.$name); + } + } + + $definitionDecorator = $this->createChildDefinition(sprintf('swiftmailer.spool.%s.abstract', $type)); + if ('file' === $type) { + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.spool.file', $name), $definitionDecorator) + ->replaceArgument(0, sprintf('%%swiftmailer.spool.%s.file.path%%', $name)) + ; + } elseif ('memory' === $type) { + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.spool.memory', $name), $definitionDecorator) + ; + } + $container->setAlias(sprintf('swiftmailer.mailer.%s.spool', $name), sprintf('swiftmailer.mailer.%s.spool.%s', $name, $type)); + + $definitionDecorator = $this->createChildDefinition('swiftmailer.transport.spool.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.transport.spool', $name), $definitionDecorator) + ->setArguments(array( + new Reference(sprintf('swiftmailer.mailer.%s.transport.eventdispatcher', $name)), + new Reference(sprintf('swiftmailer.mailer.%s.spool', $name)), + )) + ; + + $container->setAlias(sprintf('swiftmailer.mailer.%s.transport.real', $name), $transport); + $container->setAlias(sprintf('swiftmailer.mailer.%s.transport', $name), sprintf('swiftmailer.mailer.%s.transport.spool', $name)); + $container->setParameter(sprintf('swiftmailer.mailer.%s.spool.enabled', $name), true); + if (true === $isDefaultMailer) { + $container->setAlias('swiftmailer.spool', sprintf('swiftmailer.mailer.%s.spool', $name)); + $container->setAlias('swiftmailer.transport.real', sprintf('swiftmailer.mailer.%s.transport.real', $name)); + } + } else { + $container->setParameter(sprintf('swiftmailer.mailer.%s.spool.enabled', $name), false); + } + } + + protected function configureMailerSenderAddress($name, array $mailer, ContainerBuilder $container, $isDefaultMailer = false) + { + if (isset($mailer['sender_address']) && $mailer['sender_address']) { + $container->setParameter(sprintf('swiftmailer.mailer.%s.sender_address', $name), $mailer['sender_address']); + $definitionDecorator = $this->createChildDefinition('swiftmailer.plugin.impersonate.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.plugin.impersonate', $name), $definitionDecorator) + ->setArguments(array( + sprintf('%%swiftmailer.mailer.%s.sender_address%%', $name), + )) + ; + $container->getDefinition(sprintf('swiftmailer.mailer.%s.plugin.impersonate', $name))->addTag(sprintf('swiftmailer.%s.plugin', $name)); + if (true === $isDefaultMailer) { + $container->setAlias('swiftmailer.plugin.impersonate', sprintf('swiftmailer.mailer.%s.plugin.impersonate', $name)); + $container->setParameter('swiftmailer.sender_address', $container->getParameter(sprintf('swiftmailer.mailer.%s.sender_address', $name))); + } + } else { + $container->setParameter(sprintf('swiftmailer.mailer.%s.plugin.impersonate', $name), null); + } + } + + protected function configureMailerAntiFlood($name, array $mailer, ContainerBuilder $container, $isDefaultMailer = false) + { + if (isset($mailer['antiflood'])) { + $container->setParameter(sprintf('swiftmailer.mailer.%s.antiflood.threshold', $name), $mailer['antiflood']['threshold']); + $container->setParameter(sprintf('swiftmailer.mailer.%s.antiflood.sleep', $name), $mailer['antiflood']['sleep']); + $definitionDecorator = $this->createChildDefinition('swiftmailer.plugin.antiflood.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.plugin.antiflood', $name), $definitionDecorator) + ->setArguments(array( + sprintf('%%swiftmailer.mailer.%s.antiflood.threshold%%', $name), + sprintf('%%swiftmailer.mailer.%s.antiflood.sleep%%', $name), + )) + ; + $container->getDefinition(sprintf('swiftmailer.mailer.%s.plugin.antiflood', $name))->addTag(sprintf('swiftmailer.%s.plugin', $name)); + if (true === $isDefaultMailer) { + $container->setAlias('swiftmailer.mailer.plugin.antiflood', sprintf('swiftmailer.mailer.%s.plugin.antiflood', $name)); + } + } + } + + protected function configureMailerDeliveryAddress($name, array $mailer, ContainerBuilder $container, $isDefaultMailer = false) + { + if (count($mailer['delivery_addresses']) > 0) { + $container->setParameter(sprintf('swiftmailer.mailer.%s.single_address', $name), $mailer['delivery_addresses'][0]); + $container->setParameter(sprintf('swiftmailer.mailer.%s.delivery_addresses', $name), $mailer['delivery_addresses']); + $container->setParameter(sprintf('swiftmailer.mailer.%s.delivery_whitelist', $name), $mailer['delivery_whitelist']); + $definitionDecorator = $this->createChildDefinition('swiftmailer.plugin.redirecting.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.plugin.redirecting', $name), $definitionDecorator) + ->setArguments(array( + sprintf('%%swiftmailer.mailer.%s.delivery_addresses%%', $name), + sprintf('%%swiftmailer.mailer.%s.delivery_whitelist%%', $name), + )) + ; + $container->getDefinition(sprintf('swiftmailer.mailer.%s.plugin.redirecting', $name))->addTag(sprintf('swiftmailer.%s.plugin', $name)); + if (true === $isDefaultMailer) { + $container->setAlias('swiftmailer.plugin.redirecting', sprintf('swiftmailer.mailer.%s.plugin.redirecting', $name)); + } + } else { + $container->setParameter(sprintf('swiftmailer.mailer.%s.single_address', $name), null); + } + } + + protected function configureMailerLogging($name, array $mailer, ContainerBuilder $container, $isDefaultMailer = false) + { + if ($mailer['logging']) { + $container->getDefinition('swiftmailer.plugin.messagelogger.abstract'); + $definitionDecorator = $this->createChildDefinition('swiftmailer.plugin.messagelogger.abstract'); + $container + ->setDefinition(sprintf('swiftmailer.mailer.%s.plugin.messagelogger', $name), $definitionDecorator) + ; + $container->getDefinition(sprintf('swiftmailer.mailer.%s.plugin.messagelogger', $name))->addTag(sprintf('swiftmailer.%s.plugin', $name)); + if (true === $isDefaultMailer) { + $container->setAlias('swiftmailer.plugin.messagelogger', sprintf('swiftmailer.mailer.%s.plugin.messagelogger', $name)); + } + } + } + + /** + * Returns the base path for the XSD files. + * + * @return string The XSD base path + */ + public function getXsdValidationBasePath() + { + return __DIR__.'/../Resources/config/schema'; + } + + /** + * Returns the namespace to be used for this extension (XML namespace). + * + * @return string The XML namespace + */ + public function getNamespace() + { + return 'http://symfony.com/schema/dic/swiftmailer'; + } + + public function getConfiguration(array $config, ContainerBuilder $container) + { + return new Configuration($container->getParameter('kernel.debug')); + } + + private function createChildDefinition($id) + { + if (class_exists('Symfony\Component\DependencyInjection\ChildDefinition')) { + return new ChildDefinition($id); + } + + return new DefinitionDecorator($id); + } +} diff --git a/vendor/symfony/swiftmailer-bundle/DependencyInjection/SwiftmailerTransportFactory.php b/vendor/symfony/swiftmailer-bundle/DependencyInjection/SwiftmailerTransportFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..8ad4daa25d7b9d726a2139c984915967b9f5d321 --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/DependencyInjection/SwiftmailerTransportFactory.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SwiftmailerBundle\DependencyInjection; + +use Symfony\Component\Routing\RequestContext; + +/** + * Factory to create a \Swift_Transport object. + * + * @author Romain Gautier + */ +class SwiftmailerTransportFactory +{ + /** + * @param array $options + * @param RequestContext|null $requestContext + * @param \Swift_Events_EventDispatcher $eventDispatcher + * + * @return \Swift_Transport + * + * @throws \InvalidArgumentException if the scheme is not a built-in Swiftmailer transport + */ + public static function createTransport(array $options, RequestContext $requestContext = null, \Swift_Events_EventDispatcher $eventDispatcher) + { + $options = static::resolveOptions($options); + + if ('smtp' === $options['transport']) { + $smtpAuthHandler = new \Swift_Transport_Esmtp_AuthHandler(array( + new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), + new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), + new \Swift_Transport_Esmtp_Auth_PlainAuthenticator(), + )); + $smtpAuthHandler->setUsername($options['username']); + $smtpAuthHandler->setPassword($options['password']); + $smtpAuthHandler->setAuthMode($options['auth_mode']); + + $transport = new \Swift_Transport_EsmtpTransport( + new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), + array($smtpAuthHandler), + $eventDispatcher + ); + $transport->setHost($options['host']); + $transport->setPort($options['port']); + $transport->setEncryption($options['encryption']); + $transport->setTimeout($options['timeout']); + $transport->setSourceIp($options['source_ip']); + + $smtpTransportConfigurator = new SmtpTransportConfigurator(null, $requestContext); + $smtpTransportConfigurator->configure($transport); + } elseif ('sendmail' === $options['transport']) { + $transport = new \Swift_Transport_SendmailTransport( + new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), + $eventDispatcher + ); + + $smtpTransportConfigurator = new SmtpTransportConfigurator(null, $requestContext); + $smtpTransportConfigurator->configure($transport); + } elseif ('mail' === $options['transport']) { + $transport = new \Swift_Transport_MailTransport(new \Swift_Transport_SimpleMailInvoker(), $eventDispatcher); + } elseif ('null' === $options['transport']) { + $transport = new \Swift_Transport_NullTransport($eventDispatcher); + } else { + throw new \InvalidArgumentException(sprintf('Not a built-in Swiftmailer transport: %s.', $options['transport'])); + } + + return $transport; + } + + /** + * @param array $options + * + * @return array options + */ + public static function resolveOptions(array $options) + { + $options += array( + 'transport' => null, + 'username' => null, + 'password' => null, + 'host' => null, + 'port' => null, + 'timeout' => null, + 'source_ip' => null, + 'local_domain' => null, + 'encryption' => null, + 'auth_mode' => null, + ); + + if (isset($options['url'])) { + $parts = parse_url($options['url']); + if (isset($parts['scheme'])) { + $options['transport'] = $parts['scheme']; + } + if (isset($parts['user'])) { + $options['username'] = $parts['user']; + } + if (isset($parts['pass'])) { + $options['password'] = $parts['pass']; + } + if (isset($parts['host'])) { + $options['host'] = $parts['host']; + } + if (isset($parts['port'])) { + $options['port'] = $parts['port']; + } + if (isset($parts['query'])) { + parse_str($parts['query'], $query); + foreach ($options as $key => $value) { + if (isset($query[$key])) { + $options[$key] = $query[$key]; + } + } + } + } + + if (!isset($options['transport'])) { + $options['transport'] = 'null'; + } elseif ('gmail' === $options['transport']) { + $options['encryption'] = 'ssl'; + $options['auth_mode'] = 'login'; + $options['host'] = 'smtp.gmail.com'; + $options['transport'] = 'smtp'; + } + + if (!isset($options['port'])) { + $options['port'] = 'ssl' === $options['encryption'] ? 465 : 25; + } + + return $options; + } +} diff --git a/vendor/symfony/swiftmailer-bundle/EventListener/EmailSenderListener.php b/vendor/symfony/swiftmailer-bundle/EventListener/EmailSenderListener.php new file mode 100644 index 0000000000000000000000000000000000000000..b106d44cef5b6e4cf74f0701e6b7d9121408ac4c --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/EventListener/EmailSenderListener.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SwiftmailerBundle\EventListener; + +use Psr\Log\LoggerInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\Console\ConsoleEvents; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Sends emails for the memory spool. + * + * Emails are sent on the kernel.terminate event. + * + * @author Fabien Potencier + */ +class EmailSenderListener implements EventSubscriberInterface +{ + private $container; + + private $logger; + + public function __construct(ContainerInterface $container, LoggerInterface $logger = null) + { + $this->container = $container; + $this->logger = $logger; + } + + public function onTerminate() + { + if (!$this->container->has('mailer')) { + return; + } + $mailers = array_keys($this->container->getParameter('swiftmailer.mailers')); + foreach ($mailers as $name) { + if (method_exists($this->container, 'initialized') ? $this->container->initialized(sprintf('swiftmailer.mailer.%s', $name)) : true) { + if ($this->container->getParameter(sprintf('swiftmailer.mailer.%s.spool.enabled', $name))) { + $mailer = $this->container->get(sprintf('swiftmailer.mailer.%s', $name)); + $transport = $mailer->getTransport(); + if ($transport instanceof \Swift_Transport_SpoolTransport) { + $spool = $transport->getSpool(); + if ($spool instanceof \Swift_MemorySpool) { + try { + $spool->flushQueue($this->container->get(sprintf('swiftmailer.mailer.%s.transport.real', $name))); + } catch (\Swift_TransportException $exception) { + if (null !== $this->logger) { + $this->logger->error(sprintf('Exception occurred while flushing email queue: %s', $exception->getMessage())); + } + } + } + } + } + } + } + } + + public static function getSubscribedEvents() + { + $listeners = array(KernelEvents::TERMINATE => 'onTerminate'); + + if (class_exists('Symfony\Component\Console\ConsoleEvents')) { + $listeners[ConsoleEvents::TERMINATE] = 'onTerminate'; + } + + return $listeners; + } +} diff --git a/vendor/symfony/swiftmailer-bundle/Resources/config/schema/swiftmailer-1.0.xsd b/vendor/symfony/swiftmailer-bundle/Resources/config/schema/swiftmailer-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..eb02fa5d2e1c1998e63e8353f2b36bc2916115bd --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/Resources/config/schema/swiftmailer-1.0.xsd @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/swiftmailer-bundle/Resources/config/swiftmailer.xml b/vendor/symfony/swiftmailer-bundle/Resources/config/swiftmailer.xml new file mode 100644 index 0000000000000000000000000000000000000000..1e5312eaf788e1ef5ac667f9e29e4832dc3e3949 --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/Resources/config/swiftmailer.xml @@ -0,0 +1,97 @@ + + + + + + Swift_Mailer + + Swift_Transport_SendmailTransport + Swift_Transport_MailTransport + + Swift_Transport_FailoverTransport + + Swift_Plugins_RedirectingPlugin + Swift_Plugins_ImpersonatePlugin + Swift_Plugins_MessageLogger + Swift_Plugins_AntiFloodPlugin + + Swift_Transport_EsmtpTransport + + Swift_Plugins_BlackholePlugin + + Swift_FileSpool + + Swift_MemorySpool + Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener + + Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %kernel.root_dir%/../data/swiftmailer/spool + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/swiftmailer-bundle/Resources/meta/LICENSE b/vendor/symfony/swiftmailer-bundle/Resources/meta/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..0b3292cf9023507c2f1f93ddfee7dd8e15838048 --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/Resources/meta/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2014 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/vendor/symfony/swiftmailer-bundle/Resources/views/Collector/icon.svg b/vendor/symfony/swiftmailer-bundle/Resources/views/Collector/icon.svg new file mode 100644 index 0000000000000000000000000000000000000000..2618a67fa82ac1d6e29d0eddac6303fbbb422bef --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/Resources/views/Collector/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/vendor/symfony/swiftmailer-bundle/Resources/views/Collector/swiftmailer.html.twig b/vendor/symfony/swiftmailer-bundle/Resources/views/Collector/swiftmailer.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..4a1547c81dbd659a66ef7b1910349a7a49e330ab --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/Resources/views/Collector/swiftmailer.html.twig @@ -0,0 +1,204 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block toolbar %} + {% set profiler_markup_version = profiler_markup_version|default(1) %} + + {% if collector.messageCount %} + {% set icon %} + {% if profiler_markup_version == 1 %} + Swiftmailer + {{ collector.messageCount }} + {% else %} + {{ include('@Swiftmailer/Collector/icon.svg') }} + {{ collector.messageCount }} + {% endif %} + {% endset %} + + {% set text %} +
    + Sent messages + {{ collector.messageCount }} +
    + + {% if profiler_markup_version == 1 %} + {% for name in collector.mailers %} +
    + {{ name }} + {{ collector.messageCount(name) }} +
    +
    + Is spooled? + {{ collector.isSpool(name) ? 'yes' : 'no' }} +
    + + {% if not loop.first %} +
    + {% endif %} + {% endfor %} + {% else %} + {% for name in collector.mailers %} +
    + {{ name }} mailer + {{ collector.messageCount(name)|default(0) }} +   ({{ collector.isSpool(name) ? 'spooled' : 'sent' }}) +
    + {% endfor %} + {% endif %} + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': profiler_url }) }} + {% endif %} +{% endblock %} + +{% block menu %} + {% set profiler_markup_version = profiler_markup_version|default(1) %} + + + {% if profiler_markup_version == 1 %} + Swiftmailer + {% else %} + {{ include('@Swiftmailer/Collector/icon.svg') }} + {% endif %} + + E-Mails + {% if collector.messageCount > 0 %} + + {{ collector.messageCount }} + + {% endif %} + +{% endblock %} + +{% block panel %} + {% set profiler_markup_version = profiler_markup_version|default(1) %} + + {% if profiler_markup_version == 1 %} + + {% endif %} + +

    E-mails

    + + {% if not collector.mailers %} +
    +

    No e-mail messages were sent.

    +
    + {% endif %} + + {% if profiler_markup_version == 1 or collector.mailers|length > 1 %} + + + + + + + + + + + {% for name in collector.mailers %} + + + + + + + {% endfor %} + +
    Mailer NameNum. of messagesMessages statusNotes
    {{ name }}{{ collector.messageCount(name) }}{{ collector.isSpool(name) ? 'spooled' : 'sent' }}{{ collector.isDefaultMailer(name) ? 'This is the default mailer' }}
    + {% else %} +
    + {% for name in collector.mailers %} +
    + {{ collector.messageCount(name) }} + {{ collector.isSpool(name) ? 'spooled' : 'sent' }} {{ collector.messageCount(name) == 1 ? 'message' : 'messages' }} +
    + {% endfor %} +
    + {% endif %} + + {% for name in collector.mailers %} + {% if collector.mailers|length > 1 %} +

    + {{ name }} mailer + {{ collector.isDefaultMailer(name) ? '(default app mailer)' }} +

    + {% endif %} + + {% if not collector.messages(name) %} +
    +

    No e-mail messages were sent.

    +
    + {% else %} + {% for message in collector.messages(name) %} + {% if loop.length > 1 %} +

    E-mail #{{ loop.index }} details

    + {% else %} +

    E-mail details

    + {% endif %} + +
    +
    + Message headers +
    {% for header in message.headers.all %}
    +                            {{- header -}}
    +                        {% endfor %}
    +
    + +
    + Message body +
    +                            {%- if messagePart.charset is defined and message.charset %}
    +                                {{- message.body|convert_encoding('UTF-8', message.charset) }}
    +                            {%- else %}
    +                                {{- message.body }}
    +                            {%- endif -%}
    +                        
    +
    + + {% for messagePart in message.children if messagePart.contentType in ['text/plain', 'text/html'] %} +
    + Alternative part ({{ messagePart.contentType }}) +
    +                                {%- if messagePart.charset is defined and messagePart.charset %}
    +                                    {{- messagePart.body|convert_encoding('UTF-8', messagePart.charset) }}
    +                                {%- else %}
    +                                    {{- messagePart.body }}
    +                                {%- endif -%}
    +                            
    +
    + {% endfor %} + + {% set attachments = collector.extractAttachments(message) %} + {% if attachments %} +
    + + {% if attachments|length > 1 %} + {{ attachments|length }} Attachments + {% else %} + 1 Attachment + {% endif %} + + +
      + {% for attachment in attachments %} +
    1. + Filename: + {{ attachment.filename }} +
    2. + {% endfor %} +
    +
    + {% endif %} +
    + {% endfor %} + {% endif %} + {% endfor %} +{% endblock %} diff --git a/vendor/symfony/swiftmailer-bundle/SwiftmailerBundle.php b/vendor/symfony/swiftmailer-bundle/SwiftmailerBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..2cbce40fe6ab57c8be033a9e63f86e51f7756f4f --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/SwiftmailerBundle.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\Bundle\SwiftmailerBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Bundle\SwiftmailerBundle\DependencyInjection\Compiler\RegisterPluginsPass; + +/** + * @author Fabien Potencier + */ +class SwiftmailerBundle extends Bundle +{ + public function build(ContainerBuilder $container) + { + parent::build($container); + + $container->addCompilerPass(new RegisterPluginsPass()); + } +} diff --git a/vendor/symfony/swiftmailer-bundle/composer.json b/vendor/symfony/swiftmailer-bundle/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..a7f661c19d16c62dd3176d7f1ccdaa23c44af7bf --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/composer.json @@ -0,0 +1,42 @@ +{ + "name": "symfony/swiftmailer-bundle", + "type": "symfony-bundle", + "description": "Symfony SwiftmailerBundle", + "keywords": [], + "homepage": "http://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.2", + "swiftmailer/swiftmailer": ">=4.2.0,~5.0", + "symfony/dependency-injection": "~2.7|~3.0", + "symfony/http-kernel": "~2.7|~3.0", + "symfony/config": "~2.7|~3.0" + }, + "require-dev": { + "symfony/console": "~2.7|~3.0", + "symfony/framework-bundle": "~2.7|~3.0", + "symfony/phpunit-bridge": "~2.7|~3.0", + "symfony/yaml": "~2.7|~3.0" + }, + "suggest": { + "psr/log": "Allows logging" + }, + "autoload": { + "psr-4": { "Symfony\\Bundle\\SwiftmailerBundle\\": "" } + }, + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + } +} diff --git a/vendor/symfony/swiftmailer-bundle/phpunit.xml.dist b/vendor/symfony/swiftmailer-bundle/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..67d0dc9431c33381f33e46d5bbb0f2d2d46201b9 --- /dev/null +++ b/vendor/symfony/swiftmailer-bundle/phpunit.xml.dist @@ -0,0 +1,20 @@ + + + + + + ./Tests + + + + + + . + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/.composer/config.json b/vendor/symfony/symfony/.composer/config.json new file mode 100644 index 0000000000000000000000000000000000000000..941bc3b56e8cda329aa2478acb40527b37faa30c --- /dev/null +++ b/vendor/symfony/symfony/.composer/config.json @@ -0,0 +1,7 @@ +{ + "config": { + "preferred-install": { + "*": "dist" + } + } +} diff --git a/vendor/symfony/symfony/.editorconfig b/vendor/symfony/symfony/.editorconfig new file mode 100644 index 0000000000000000000000000000000000000000..153cf3ef5bd040f196bf7ede995e02e896cbdb95 --- /dev/null +++ b/vendor/symfony/symfony/.editorconfig @@ -0,0 +1,10 @@ +; top-most EditorConfig file +root = true + +; Unix-style newlines +[*] +end_of_line = LF + +[*.php] +indent_style = space +indent_size = 4 diff --git a/vendor/symfony/symfony/.github/ISSUE_TEMPLATE.md b/vendor/symfony/symfony/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000000000000000000000000000000000000..6eaec7c81da9afcdb34296edae692d5703358ec2 --- /dev/null +++ b/vendor/symfony/symfony/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,13 @@ +| Q | A +| ---------------- | ----- +| Bug report? | yes/no +| Feature request? | yes/no +| BC Break report? | yes/no +| RFC? | yes/no +| Symfony version | x.y.z + + diff --git a/vendor/symfony/symfony/.github/PULL_REQUEST_TEMPLATE.md b/vendor/symfony/symfony/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000000000000000000000000000000..d35bbdeb69e23b448d0c60b3e4936e7eb3af2a09 --- /dev/null +++ b/vendor/symfony/symfony/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ +| Q | A +| ------------- | --- +| Branch? | master / 2.7, 2.8 or 3.2 +| Bug fix? | yes/no +| New feature? | yes/no +| BC breaks? | yes/no +| Deprecations? | yes/no +| Tests pass? | yes/no +| Fixed tickets | #... +| License | MIT +| Doc PR | symfony/symfony-docs#... + + diff --git a/vendor/symfony/symfony/.github/build-packages.php b/vendor/symfony/symfony/.github/build-packages.php new file mode 100644 index 0000000000000000000000000000000000000000..02a2239732be264cf47e96df90fde56990a78a74 --- /dev/null +++ b/vendor/symfony/symfony/.github/build-packages.php @@ -0,0 +1,81 @@ + $_SERVER['argc']) { + echo "Usage: branch dir1 dir2 ... dirN\n"; + exit(1); +} +chdir(dirname(__DIR__)); + +$dirs = $_SERVER['argv']; +array_shift($dirs); +$mergeBase = trim(shell_exec(sprintf('git merge-base %s HEAD', array_shift($dirs)))); + +$packages = array(); +$flags = PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0; + +foreach ($dirs as $k => $dir) { + if (!system("git diff --name-only $mergeBase -- $dir", $exitStatus)) { + if ($exitStatus) { + exit($exitStatus); + } + unset($dirs[$k]); + continue; + } + echo "$dir\n"; + + $json = ltrim(file_get_contents($dir.'/composer.json')); + if (null === $package = json_decode($json)) { + passthru("composer validate $dir/composer.json"); + exit(1); + } + + $package->repositories = array(array( + 'type' => 'composer', + 'url' => 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__)).'/', + )); + if (false === strpos($json, "\n \"repositories\": [\n")) { + $json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1); + file_put_contents($dir.'/composer.json', $json); + } + passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *"); + + if (!isset($package->extra->{'branch-alias'}->{'dev-master'})) { + echo "Missing \"dev-master\" branch-alias in composer.json extra.\n"; + exit(1); + } + $package->version = str_replace('-dev', '.x-dev', $package->extra->{'branch-alias'}->{'dev-master'}); + $package->dist['type'] = 'tar'; + $package->dist['url'] = 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__))."/$dir/package.tar"; + + $packages[$package->name][$package->version] = $package; + + $versions = file_get_contents('https://packagist.org/packages/'.$package->name.'.json'); + $versions = json_decode($versions)->package->versions; + + if ($package->version === str_replace('-dev', '.x-dev', $versions->{'dev-master'}->extra->{'branch-alias'}->{'dev-master'})) { + unset($versions->{'dev-master'}); + } + + foreach ($versions as $v => $package) { + $packages[$package->name] += array($v => $package); + } +} + +file_put_contents('packages.json', json_encode(compact('packages'), $flags)); + +if ($dirs) { + $json = ltrim(file_get_contents('composer.json')); + if (null === $package = json_decode($json)) { + passthru("composer validate $dir/composer.json"); + exit(1); + } + + $package->repositories = array(array( + 'type' => 'composer', + 'url' => 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__)).'/', + )); + if (false === strpos($json, "\n \"repositories\": [\n")) { + $json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1); + file_put_contents('composer.json', $json); + } +} diff --git a/vendor/symfony/symfony/.php_cs.dist b/vendor/symfony/symfony/.php_cs.dist new file mode 100644 index 0000000000000000000000000000000000000000..71c4a35f5883bc3f397f3c3ac7dca3833755cd18 --- /dev/null +++ b/vendor/symfony/symfony/.php_cs.dist @@ -0,0 +1,41 @@ +setRules(array( + '@Symfony' => true, + '@Symfony:risky' => true, + 'array_syntax' => array('syntax' => 'long'), + 'no_unreachable_default_argument_value' => false, + 'braces' => array('allow_single_line_closure' => true), + 'heredoc_to_nowdoc' => false, + 'phpdoc_annotation_without_dot' => false, + )) + ->setRiskyAllowed(true) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__.'/src') + ->exclude(array( + // directories containing files with content that is autogenerated by `var_export`, which breaks CS in output code + 'Symfony/Component/DependencyInjection/Tests/Fixtures', + 'Symfony/Component/Routing/Tests/Fixtures/dumper', + // fixture templates + 'Symfony/Component/Templating/Tests/Fixtures/templates', + 'Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom', + // generated fixtures + 'Symfony/Component/VarDumper/Tests/Fixtures', + // resource templates + 'Symfony/Bundle/FrameworkBundle/Resources/views/Form', + )) + // file content autogenerated by `var_export` + ->notPath('Symfony/Component/Translation/Tests/fixtures/resources.php') + // autogenerated xmls + ->notPath('Symfony/Component/Console/Tests/Fixtures/application_1.xml') + ->notPath('Symfony/Component/Console/Tests/Fixtures/application_2.xml') + // yml + ->notPath('Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml') + // test template + ->notPath('Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php') + // explicit heredoc test + ->notPath('Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php') + ) +; diff --git a/vendor/symfony/symfony/.travis.yml b/vendor/symfony/symfony/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..cc4e8671f2333c7bb4b1a771e7bb5917a47de670 --- /dev/null +++ b/vendor/symfony/symfony/.travis.yml @@ -0,0 +1,104 @@ +language: php + +sudo: false + +git: + depth: 1 + +addons: + apt_packages: + - parallel + - language-pack-fr-base + - ldap-utils + - slapd + +env: + global: + - MIN_PHP=5.5.9 + - SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/versions/5.6/bin/php + +matrix: + include: + # Use the newer stack for HHVM as HHVM does not support Precise anymore since a long time and so Precise has an outdated version + - php: hhvm-3.18 + sudo: required + dist: trusty + group: edge + - php: 5.5 + - php: 5.6 + - php: 7.0 + env: deps=high + - php: 7.1 + env: deps=low + fast_finish: true + +cache: + directories: + - .phpunit + - php-$MIN_PHP + +services: + - mongodb + - redis-server + +before_install: + - stty cols 120 + - mkdir /tmp/slapd + - slapd -f src/Symfony/Component/Ldap/Tests/Fixtures/conf/slapd.conf -h ldap://localhost:3389 & + - PHP=$TRAVIS_PHP_VERSION + # Matrix lines for intermediate PHP versions are skipped for pull requests + - if [[ ! $deps && ! $PHP = ${MIN_PHP%.*} && ! $PHP = hhvm* && $TRAVIS_PULL_REQUEST != false ]]; then deps=skip; skip=1; fi + # A sigchild-enabled-PHP is used to test the Process component on the lowest PHP matrix line + - if [[ ! $deps && $PHP = ${MIN_PHP%.*} && ! -d php-$MIN_PHP/sapi ]]; then wget http://museum.php.net/php5/php-$MIN_PHP.tar.bz2 -O - | tar -xj; (cd php-$MIN_PHP; ./configure --enable-sigchild --enable-pcntl; make -j2); fi + - if [[ ! $PHP = hhvm* ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi + - if [[ ! $skip ]]; then echo date.timezone = Europe/Paris >> $INI_FILE; fi + - if [[ ! $skip ]]; then echo memory_limit = -1 >> $INI_FILE; fi + - if [[ ! $skip ]]; then echo session.gc_probability = 0 >> $INI_FILE; fi + - if [[ ! $skip ]]; then echo opcache.enable_cli = 1 >> $INI_FILE; fi + - if [[ ! $skip ]]; then echo hhvm.jit = 0 >> $INI_FILE; fi + - if [[ ! $skip && $PHP = 5.* ]]; then echo extension = mongo.so >> $INI_FILE; fi + - if [[ ! $skip && $PHP = 5.* ]]; then echo extension = memcache.so >> $INI_FILE; fi + - if [[ ! $skip && $PHP = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.11 && echo apc.enable_cli = 1 >> $INI_FILE); fi + - if [[ ! $skip && $PHP = 7.* ]]; then (echo yes | pecl install -f apcu-5.1.6 && echo apc.enable_cli = 1 >> $INI_FILE); fi + - if [[ ! $deps && $PHP = 5.* ]]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo extension = $(pwd)/modules/symfony_debug.so >> $INI_FILE); fi + - if [[ ! $skip && $PHP = 5.* ]]; then pecl install -f memcached-2.1.0; fi + - if [[ ! $skip && ! $PHP = hhvm* ]]; then echo extension = ldap.so >> $INI_FILE; fi + - if [[ ! $skip && ! $PHP = hhvm* ]]; then echo extension = redis.so >> $INI_FILE; fi; + - if [[ ! $skip && ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi + - if [[ ! $skip ]]; then [ -d ~/.composer ] || mkdir ~/.composer; cp .composer/* ~/.composer/; fi + - if [[ ! $skip ]]; then export PHPUNIT=$(readlink -f ./phpunit); fi + - if [[ ! $skip ]]; then ldapadd -h localhost:3389 -D cn=admin,dc=symfony,dc=com -w symfony -f src/Symfony/Component/Ldap/Tests/Fixtures/data/base.ldif; fi + - if [[ ! $skip ]]; then ldapadd -h localhost:3389 -D cn=admin,dc=symfony,dc=com -w symfony -f src/Symfony/Component/Ldap/Tests/Fixtures/data/fixtures.ldif; fi + +install: + - if [[ ! $skip && $deps ]]; then cp composer.json composer.json.orig; fi + - if [[ ! $skip && $deps ]]; then echo -e '{\n"require":{'"$(grep phpunit-bridge composer.json)"'"php":"*"},"minimum-stability":"dev"}' > composer.json; fi + - if [[ ! $skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi + # Create local composer packages for each patched components and reference them in composer.json files when cross-testing components + - if [[ ! $skip && $deps ]]; then php .github/build-packages.php HEAD^ $COMPONENTS; fi + - if [[ ! $skip && $deps ]]; then mv composer.json composer.json.phpunit; mv composer.json.orig composer.json; fi + - if [[ ! $skip && ! $deps ]]; then php .github/build-packages.php HEAD^ src/Symfony/Bridge/PhpUnit; fi + # For the master branch when deps=high, the version before master is checked out and tested with the locally patched components + - if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//); else SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*'); fi + - if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then git fetch origin $SYMFONY_VERSION; git checkout -m FETCH_HEAD; COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi + # Legacy tests are skipped when deps=high and when the current branch version has not the same major version number than the next one + - if [[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git ls-remote --heads | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]]; then LEGACY=,legacy; fi + - export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev + - if [[ ! $skip && $deps ]]; then export SYMFONY_DEPRECATIONS_HELPER=weak; fi + - if [[ ! $skip && $deps ]]; then mv composer.json.phpunit composer.json; fi + - if [[ ! $skip ]]; then composer update; fi + - if [[ ! $skip ]]; then ./phpunit install; fi + - if [[ ! $skip && ! $PHP = hhvm* ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi + +script: + - REPORT=' && echo -e "\\e[32mOK\\e[0m {}\\n\\n" || (echo -e "\\e[41mKO\\e[0m {}\\n\\n" && $(exit 1))' + - if [[ $skip ]]; then echo -e "\\n\\e[1;34mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"; fi + - if [[ ! $deps && ! $PHP = hhvm* ]]; then echo "$COMPONENTS" | parallel --gnu '$PHPUNIT --exclude-group tty,benchmark,intl-data {}'"$REPORT"; fi + - if [[ ! $deps && ! $PHP = hhvm* ]]; then echo -e "\\nRunning tests requiring tty"; $PHPUNIT --group tty; fi + - if [[ ! $deps && $PHP = hhvm* ]]; then $PHPUNIT --exclude-group benchmark,intl-data; fi + - if [[ ! $deps && $PHP = ${MIN_PHP%.*} ]]; then echo -e "1\\n0" | xargs -I{} sh -c 'echo "\\nPHP --enable-sigchild enhanced={}" && ENHANCE_SIGCHLD={} php-$MIN_PHP/sapi/cli/php .phpunit/phpunit-4.8/phpunit --colors=always src/Symfony/Component/Process/'; fi + - if [[ $deps = high ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer update --no-progress --ansi; $PHPUNIT --exclude-group tty,benchmark,intl-data'$LEGACY"$REPORT"; fi + - if [[ $deps = low ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer update --no-progress --ansi --prefer-lowest --prefer-stable; $PHPUNIT --exclude-group tty,benchmark,intl-data'"$REPORT"; fi + # Test the PhpUnit bridge using the original phpunit script + - if [[ $deps = low ]]; then (cd src/Symfony/Bridge/PhpUnit && wget https://phar.phpunit.de/phpunit-4.8.phar); fi + - if [[ $deps = low ]]; then (cd src/Symfony/Bridge/PhpUnit && phpenv global 5.3 && php --version && composer update && php phpunit-4.8.phar); fi diff --git a/vendor/symfony/symfony/CHANGELOG-3.0.md b/vendor/symfony/symfony/CHANGELOG-3.0.md new file mode 100644 index 0000000000000000000000000000000000000000..6269bd60d37aabc16601b03dc86dce86e91a9a6c --- /dev/null +++ b/vendor/symfony/symfony/CHANGELOG-3.0.md @@ -0,0 +1,566 @@ +CHANGELOG for 3.0.x +=================== + +This changelog references the relevant changes (bug and security fixes) done +in 3.0 minor versions. + +To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash +To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v3.0.0...v3.0.1 + +* 3.0.9 (2016-07-30) + + * bug #19470 undefined offset fix (#19406) (ReenExe) + * bug #19300 [HttpKernel] Use flock() for HttpCache's lock files (mpdude) + * bug #19428 [Process] Fix write access check for pipes on Windows (nicolas-grekas) + * bug #19439 [DependencyInjection] Fixed deprecated default message template with XML (jeremyFreeAgent) + * bug #19397 [HttpFoundation] HttpCache refresh stale responses containing an ETag (maennchen) + * bug #19426 [Form] Fix the money form type render with Bootstrap3 (Th3Mouk) + * bug #19422 [DomCrawler] Inherit the namespace cache in subcrawlers (stof) + * bug #19425 [BrowserKit] Uppercase the "GET" method in redirects (jakzal) + * bug #19384 Fix PHP 7.1 related failures (nicolas-grekas) + * bug #19379 [VarDumper] Fix for PHP 7.1 (nicolas-grekas) + * bug #19342 Added class existence check if is_subclass_of() fails in compiler passes (SCIF) + * bug #19369 Fix the DBAL session handler version check for Postgresql (stof) + * bug #19368 [VarDumper] Fix dumping jsons casted as arrays (nicolas-grekas) + * bug #19334 [Security] Fix the retrieval of the last username when using forwarding (stof) + * bug #19321 [HttpFoundation] Add OPTIONS and TRACE to the list of safe methods (dunglas) + * bug #19317 [BrowserKit] Update Client::getAbsoluteUri() for query string only URIs (georaldc) + * bug #19298 [ClassLoader] Fix declared classes being computed when not needed (nicolas-grekas) + * bug #19316 [Validator] Added additional MasterCard range to the CardSchemeValidator (Dennis Væversted) + * bug #19290 [HttpKernel] fixed internal subrequests having an if-modified-since-header (MalteWunsch) + * bug #19307 [Security] Fix deprecated usage of DigestAuthenticationEntryPoint::getKey() in DigestAuthenticationListener (Maxime STEINHAUSSER) + * bug #19309 [DoctrineBridge] added missing error code for constraint. (Koc) + * bug #19306 [Form] fixed bug - name in ButtonBuilder (cheprasov) + * bug #19292 [varDumper] Fix missing usage of ExceptionCaster::$traceArgs (nicolas-grekas) + * bug #19288 [VarDumper] Fix indentation trimming in ExceptionCaster (nicolas-grekas) + * bug #19267 [Validator] UuidValidator must accept a Uuid constraint. (hhamon) + * bug #19186 Fix for #19183 to add support for new PHP MongoDB extension in sessions. (omanizer) + * bug #19253 [Console] Fix block() padding formatting after #19189 (chalasr) + * bug #19218 [Security][Guard] check if session exist before using it (pasdeloup) + +* 3.0.8 (2016-06-30) + + * bug #19217 [HttpKernel] Inline ValidateRequestListener logic into HttpKernel (nicolas-grekas) + * bug #18688 [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For (magnusnordlander) + * bug #19173 [Console] Decouple SymfonyStyle from TableCell (ro0NL) + * bug #19189 [Console] Fix formatting of SymfonyStyle::comment() (chalasr) + * bug #19211 [Form] fix post max size translation type extension for >= 2.8 (Tobion) + * bug #17822 [WIP] [Form] fix `empty_data` option in expanded `ChoiceType` (HeahDude) + * bug #19134 Distinguish between first and subsequent progress bar displays (rquadling) + * bug #19061 [FORM] fix post_max_size_message translation (alt. 2) (David Badura) + * bug #19100 [Console] Fixed SymfonyQuestionHelper multi-choice with defaults (sstok) + * bug #18924 [DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure (webmozart) + * bug #19138 [DomCrawler] No more exception on field name with strange format (guiled, fabpot) + * bug #18935 [Form] Consider a violation even if the form is not submitted (egeloen) + * bug #19127 [Form] Add exception to FormRenderer about non-unique block names (enumag) + * bug #19118 [Process] Fix pipes cleaning on Windows (nicolas-grekas) + * bug #19128 Avoid phpunit 5.4 warnings on getMock (2.7+) (iltar) + * bug #19114 [HttpKernel] Dont close the reponse stream in debug (nicolas-grekas) + * bug #19101 [Session] fix PDO transaction aborted under PostgreSQL (Tobion) + * bug #18501 [HttpFoundation] changed MERGE queries (hjkl) + * bug #19062 [HttpFoundation] Fix UPSERT for PgSql >= 9.5 (nicolas-grekas) + * bug #18548 [Form] minor fixes in DateTime transformers (HeahDude) + * bug #18732 [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't (nykopol) + * bug #19048 [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5 (nicolas-grekas) + * bug #19038 Fix feature detection for IE (Alsciende) + * bug #18915 [DependencyInjection] force enabling the external XML entity loaders (xabbuh) + * bug #19020 [Form] Fixed collapsed choice attributes (HeahDude) + * bug #19028 [Yaml] properly count skipped comment lines (xabbuh) + * bug #19009 [WebProfilerBundle] Fix invalid CSS style (romainneutron) + * bug #17733 [Yaml] Fix wrong line number when comments are inserted in the middle of a block. (paradajozsef) + * bug #18911 Fixed singular of committee (peterrehm) + * bug #18971 Do not inject web debug toolbar on attachments (peterrehm) + +* 3.0.7 (2016-06-06) + + * bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh) + * bug #18893 [DependencyInjection] Skip deep reference check for 'service_container' (RobertMe) + * bug #18812 Catch \Throwable (fprochazka) + * bug #18821 [Form] Removed UTC specification with timestamp (francisbesset) + * bug #18861 Fix for #18843 (inso) + * bug #18889 [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments (chalasr) + * bug #18907 [Routing] Fix the annotation loader taking a class constant as a beginning of a class name (jakzal, nicolas-grekas) + * bug #18879 [Console] SymfonyStyle: Align multi-line/very-long-line blocks (chalasr) + * bug #18864 [Console][DX] Fixed ambiguous error message when using a duplicate option shortcut (peterrehm) + * bug #18883 Fix js comment in profiler (linnaea) + * bug #18844 [Yaml] fix exception contexts (xabbuh) + * bug #18840 [Yaml] properly handle unindented collections (xabbuh) + * bug #18765 Catch \Throwable (fprochazka) + * bug #18813 Catch \Throwable (fprochazka) + * bug #18839 People - person singularization (Keeo) + * bug #18828 [Yaml] chomp newlines only at the end of YAML documents (xabbuh) + * bug #18814 Fixed server status command when port has been omitted (peterrehm) + * bug #18759 [Validator] Support for DateTimeImmutable (krzysiekpiasecki) + * bug #18799 Use levenshtein level for better Bundle matching (j0k3r) + * bug #18413 [WebProfilerBundle] Fix CORS ajax security issues (romainneutron) + * bug #18774 [console][table] adjust width of colspanned cell. (aitboudad) + * bug #18507 [BUG] Delete class 'control-group' in bootstrap 3 (Philippe Degeeter) + * bug #18747 [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper (issei-m) + * bug #18635 [Console] Prevent fatal error when calling Command::getHelper without helperSet (chalasr) + * bug #18686 [console][table] adjust width of colspanned cell. (aitboudad) + * bug #18761 [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper (issei-m) + * bug #18745 [MonologBridge] Uninstallable together with symfony/http-kernel in 3.0.6 (ymc-dabe) + * bug #18737 [Debug] Fix fatal error handlers on PHP 7 (nicolas-grekas) + +* 3.0.6 (2016-05-10) + + * security #18736 Fixed issue with blank password with Ldap (csarrazi) + * security #18733 limited the maximum length of a submitted username (fabpot) + * bug #18730 [FrameworkBundle] prevent calling get() for service_container service (xabbuh) + * bug #18705 added a conflict between Monolog bridge 2.8 and HTTP Kernel 3.0+ (fabpot) + * bug #18709 [DependencyInjection] top-level anonymous services must be public (xabbuh) + * bug #18388 [EventDispatcher] check for method to exist (xabbuh) + * bug #18699 [DependencyInjection] Use the priority of service decoration on service with parent (hason) + * bug #18692 add @Event annotation for KernelEvents (Haehnchen) + * bug #18246 [DependencyInjection] fix ambiguous services schema (backbone87) + +* 3.0.5 (2016-05-03) + + * bug #18180 [Form] fixed BC break with pre selection of choices with `ChoiceType` and its children (HeahDude) + * bug #18645 [Console] Fix wrong exceptions being thrown (JhonnyL) + * bug #18562 [WebProfilerBunde] Give an absolute url in case the request occured from another domain (romainneutron) + * bug #18600 [DI] Fix AutowirePass fatal error with classes that have non-existing parents (hason, nicolas-grekas) + * bug #18556 [FrameworkBundle] Better output for user in ContainerDebugCommand (JhonnyL) + * bug #18603 [PropertyAccess] ->getValue() should be read-only (nicolas-grekas) + * bug #18593 [VarDumper] Fix dumping type hints for non-existing parent classes (nicolas-grekas) + * bug #18596 [DI] Fix internal caching in AutowirePass (nicolas-grekas) + * bug #18581 [Console] [TableHelper] make it work with SymfonyStyle. (aitboudad) + * bug #18280 [Routing] add query param if value is different from default (Tobion) + * bug #18540 Replace iconv_*() uses by mb_*(), add mbstring polyfill when required (nicolas-grekas) + * bug #18496 [Console] use ANSI escape sequences in ProgressBar overwrite method (alekitto) + * bug #18490 [LDAP] Free the search result after a search to free memory (hiddewie) + * bug #18491 [DependencyInjection] anonymous services are always private (xabbuh) + * bug #18515 [Filesystem] Better error handling in remove() (nicolas-grekas) + * bug #18081 [Form] FormValidator removed code related to removed `cascade_validation` option (peterrehm) + * bug #18360 [PropertyInfo] Extract nullable and collection key type for Doctrine associations (teohhanhui) + * bug #18449 [PropertyAccess] Fix regression (nicolas-grekas) + * bug #18429 [Console] Correct time formatting. (camporter) + * bug #18457 [WebProfilerBundle] Fixed error from unset twig variable (simonsargeant) + * bug #18467 [DependencyInjection] Resolve aliases before removing abstract services + add tests (nicolas-grekas) + * bug #18469 Force profiler toolbar svg display (pyrech) + * bug #18460 [DomCrawler] Fix select option with empty value (Matt Wells) + * bug #18425 [Security] Fixed SwitchUserListener when exiting an impersonation with AnonymousToken (lyrixx) + * bug #18317 [Form] fix "prototype" not required when parent form is not required (HeahDude) + * bug #18439 [Logging] Add support for Firefox (43+) in ChromePhpHandler (arjenm) + * bug #18385 Detect CLI color support for Windows 10 build 10586 (mlocati) + * bug #18426 [EventDispatcher] Try first if the event is Stopped (lyrixx) + * bug #18407 Fixed the "hover" state of the profiler sidebar menu (javiereguiluz) + * bug #18399 [Intl] Fix int32 min boundary check (nicolas-grekas) + * bug #18394 [FrameworkBundle] Return the invokable service if its name is the class name (dunglas) + * bug #18347 Fixed the styles of the Symfony icon in the web debug toolbar (javiereguiluz) + * bug #18265 Optimize ReplaceAliasByActualDefinitionPass (ajb-in) + * bug #18349 [Process] Fix stream_select priority when writing to stdin (nicolas-grekas) + * bug #18358 [Form] NumberToLocalizedStringTransformer should return floats when possible (nicolas-grekas) + * bug #17926 [DependencyInjection] Enable alias for service_container (hason) + +* 3.0.4 (2016-03-30) + + * bug #18352 [Debug] Fix case sensitivity checks (nicolas-grekas) + * bug #18336 [Debug] Fix handling of php7 throwables (nicolas-grekas) + * bug #18354 [FrameworkBundle][TwigBridge] fix high deps tests (xabbuh) + * bug #18312 [ClassLoader] Fix storing not-found classes in APC cache (nicolas-grekas) + * bug #18298 [Validator] do not treat payload as callback (xabbuh) + * bug #18275 [Form] Fix BC break introduced in #14403 (HeahDude) + * bug #18271 [FileSystem] Google app engine filesystem (swordbeta) + * bug #18255 [HttpFoundation] Fix support of custom mime types with parameters (Ener-Getick) + * bug #18272 [Bridge\PhpUnit] Workaround old phpunit bug, no colors in weak mode, add tests (nicolas-grekas) + * bug #18259 [PropertyAccess] Backport fixes from 2.7 (nicolas-grekas) + * bug #18261 [PropertyAccess] Fix isPropertyWritable not using the reflection cache (nicolas-grekas) + * bug #18224 [PropertyAccess] Remove most ref mismatches to improve perf (nicolas-grekas) + * bug #18237 [WebProfilerBundle] Added table-layout property to AJAX toolbar css (kevintweber) + * bug #18209 [PropertyInfo] Support Doctrine custom mapping type in DoctrineExtractor (teohhanhui) + * bug #18210 [PropertyAccess] Throw an UnexpectedTypeException when the type do not match (dunglas, nicolas-grekas) + * bug #18216 [Intl] Fix invalid numeric literal on PHP 7 (nicolas-grekas) + * bug #18147 [Validator] EmailValidator cannot extract hostname if email contains multiple @ symbols (natechicago) + * bug #18023 [Process] getIncrementalOutput should work without calling getOutput (romainneutron) + * bug #18175 [Translation] Add support for fuzzy tags in PoFileLoader (nud) + * bug #18179 [Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers (ovrflo, nicolas-grekas) + * bug #18164 [HttpKernel] set s-maxage only if all responses are cacheable (xabbuh) + * bug #18150 [Process] Wait a bit less on Windows (nicolas-grekas) + * bug #18130 [Debug] Replaced logic for detecting filesystem case sensitivity (Dan Blows) + * bug #18137 Autowiring the concrete class too - consistent with behavior of other services (weaverryan) + * bug #18087 [WebProfiler] Sidebar button padding (rvanlaak) + * bug #18080 [HttpFoundation] Set the Content-Range header if the requested Range is unsatisfied (jakzal) + * bug #18084 [HttpFoundation] Avoid warnings when checking malicious IPs (jakzal) + * bug #18066 [Process] Fix pipes handling (nicolas-grekas) + * bug #18078 [Console] Fix an autocompletion question helper issue with non-sequentially indexed choices (jakzal) + * bug #18048 [HttpKernel] Fix mem usage when stripping the prod container (nicolas-grekas) + * bug #18065 [Finder] Partially revert #17134 to fix a regression (jakzal) + * bug #18018 [HttpFoundation] exception when registering bags for started sessions (xabbuh) + * bug #18054 [Filesystem] Fix false positive in ->remove() (nicolas-grekas) + * bug #18049 [Validator] Fix the locale validator so it treats a locale alias as a valid locale (jakzal) + * bug #18019 [Intl] Update ICU to version 55 (jakzal) + * bug #18015 [Process] Fix memory issue when using large input streams (romainneutron) + * bug #16656 [HttpFoundation] automatically generate safe fallback filename (xabbuh) + * bug #15794 [Console] default to stderr in the console helpers (alcohol) + * bug #17984 Allow to normalize \Traversable when serializing xml (Ener-Getick) + * bug #17434 Improved the error message when a template is not found (rvanginneken, javiereguiluz) + * bug #17687 Improved the error message when using "@" in a decorated service (javiereguiluz) + * bug #17744 Improve error reporting in router panel of web profiler (javiereguiluz) + * bug #17894 [FrameworkBundle] Fix a regression in handling absolute template paths (jakzal) + * bug #17990 [DoctrineBridge][Form] Fix performance regression in EntityType (kimlai) + * bug #17595 [HttpKernel] Remove _path from query parameters when fragment is a subrequest (cmenning) + * bug #17986 [DomCrawler] Dont use LIBXML_PARSEHUGE by default (nicolas-grekas) + * bug #17668 add 'guid' to list of exception to filter out (garak) + * bug #17615 Ensure backend slashes for symlinks on Windows systems (cpsitgmbh) + * bug #17626 Try to delete broken symlinks (IchHabRecht) + * bug #17978 [Yaml] ensure dump indentation to be greather than zero (xabbuh) + * bug #16886 [Form] [ChoiceType] Prefer placeholder to empty_value (boite) + * bug #17976 [WebProfilerBundle] fix debug toolbar rendering by removing inadvertently added links (craue) + * bug #17971 Variadic controller params (NiR-, fabpot) + * bug #17876 [DependencyInjection] Fixing autowiring bug when some args are set (weaverryan) + * bug #17568 Improved Bootstrap form theme for hidden fields (javiereguiluz) + * bug #17561 [WebProfilerBundle] Fix design issue in profiler when having errors in forms (Pierstoval) + * bug #17925 [Bridge] The WebProcessor now forwards the client IP (magnetik) + +* 3.0.3 (2016-02-28) + + * bug #17919 #17676 - making the proxy instantiation compatible with ProxyManager 2.x by detecting proxy features (Ocramius) + * bug #17947 Fix - #17676 (backport #17919 to 2.3) (Ocramius) + * bug #17942 Fix bug when using an private aliased factory service (WouterJ) + * bug #17798 [Form] Fix BC break by allowing 'choice_label' option to be 'false' in ChoiceType (HeahDude) + * bug #17542 ChoiceFormField of type "select" could be "disabled" (bouland) + * bug #17602 [HttpFoundation] Fix BinaryFileResponse incorrect behavior with if-range header (bburnichon) + * bug #17760 [Form] fix choice value "false" in ChoiceType (HeahDude) + * bug #17914 [Console] Fix escaping of trailing backslashes (nicolas-grekas) + * bug #17074 Fix constraint validator alias being required (Triiistan) + * bug #17866 [DependencyInjection] replace alias in factories (xabbuh) + * bug #17867 [DependencyInjection] replace alias in factory services (xabbuh) + * bug #17865 [FrameworkBundle] disable the assets helper when assets are disabled (xabbuh) + * bug #17860 Fixed the antialiasing of the toolbar text (javiereguiluz) + * bug #17569 [FrameworkBundle] read commands from bundles when accessing list (havvg) + * bug #16987 [FileSystem] Windows fix (flip111) + * bug #17787 [Form] Fix choice placeholder edge cases (Tobion) + * bug #17835 [Yaml] fix default timezone to be UTC (xabbuh) + * bug #17823 [DependencyInjection] fix dumped YAML string (xabbuh) + * bug #17818 [Console] InvalidArgumentException is thrown under wrong condition (robinkanters) + * bug #17819 [HttpKernel] Prevent a fatal error when DebugHandlersListener is used with a kernel with no terminateWithException() method (jakzal) + * bug #17814 [DependencyInjection] fix dumped YAML snytax (xabbuh) + * bug #17099 [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path (alekitto) + * bug #17694 [DoctrineBridge] [Form] fix choice_value in EntityType (HeahDude) + * bug #17790 [Config] Fix EnumNodeDefinition to allow building enum nodes with one element (ogizanagi) + * bug #17729 [Yaml] properly parse lists in object maps (xabbuh) + * bug #17719 [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder (lukaszmakuch) + * bug #17742 [DependencyInjection] Fix #16461 Container::set() replace aliases (mnapoli) + * bug #17745 Added more exceptions to singularify method (javiereguiluz) + * bug #17691 Fixed (string) catchable fatal error for PHP Incomplete Class instances (yceruto) + * bug #17766 Fixed (string) catchable fatal error for PHP Incomplete Class instances (yceruto) + * bug #17757 [HttpFoundation] BinaryFileResponse sendContent return as parent. (2.3) (SpacePossum) + * bug #17748 [DomCrawler] Remove the overridden getHash() method to prevent problems when cloning the crawler (jakzal) + * bug #17725 [WebProfilerBundle] Add width attribute on SVG - Fix toolbar profiler on microsoft edge (AlexandrePavy) + * bug #17703 [FrameworkBundle] Support autowiring for TranslationInterface (dunglas) + * bug #17613 [WebProfiler] Fixed logo and menu profiler for Microsoft Edge (WhiteEagle88) + * bug #17702 [TwigBridge] forward compatibility with Yaml 3.1 (xabbuh) + * bug #17673 [Routing] add files used in FileResource objects (xabbuh) + * bug #17672 [DependencyInjection][Routing] add files used in FileResource objects (xabbuh) + * bug #17669 [Console] remove readline support (xabbuh) + * bug #17600 Fixed the Bootstrap form theme for inlined checkbox/radio (javiereguiluz) + +* 3.0.2 (2016-02-03) + + * bug #17658 [FrameworkBundle] fix assets and templating tests (xabbuh) + * bug #17596 [Translation] Add resources from fallback locale to parent catalogue (c960657) + * bug #17605 [FrameworkBundle] remove default null value for asset version (xabbuh) + * bug #17606 [DependencyInjection] pass triggerDeprecationError arg to parent class (xabbuh) + * bug #16956 [DependencyInjection] XmlFileLoader: enforce tags to have a name (xabbuh) + * bug #16265 [BrowserKit] Corrected HTTP_HOST logic (Naktibalda) + * bug #17559 [SecurityBundle] Fix HTTP Digest auth not being passed user checker (SamFleming) + * bug #17554 [DependencyInjection] resolve aliases in factories (xabbuh) + * bug #17555 [DependencyInjection] resolve aliases in factory services (xabbuh) + * bug #17511 [Form] ArrayChoiceList can now deal with a null in choices (issei-m) + * bug #17430 [Serializer] Ensure that groups are strings (dunglas) + * bug #16795 [FrameworkBundle][Validator] Fix apc cache service & config (ogizanagi) + * bug #15272 [FrameworkBundle] Fix template location for PHP templates (jakzal) + * bug #11232 [Routing] Fixes fatal errors with object resources in AnnotationDirectoryLoader::supports (Tischoi) + * bug #17526 Escape the delimiter in Glob::toRegex (javiereguiluz) + * bug #17527 fixed undefined variable (fabpot) + * bug #15706 [framework-bundle] Added support for the `0.0.0.0/0` trusted proxy (zerkms) + * bug #16274 [HttpKernel] Lookup the response even if the lock was released after two second wait (jakzal) + * bug #16954 [TranslationUpdateCommand] fixed undefined resultMessage var. (aitboudad) + * bug #17355 [DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument (xavismeh) + * bug #17330 Limit the max height/width of icons in the profiler menu (javiereguiluz) + * bug #17454 Allow absolute URLs to be displayed in the debug toolbar (javiereguiluz) + * bug #16736 [Request] Ignore invalid IP addresses sent by proxies (GromNaN) + * bug #17459 [EventDispatcher] TraceableEventDispatcher resets event listener priorities (c960657) + * bug #17486 [FrameworkBundle] Throw for missing container extensions (kix) + * bug #16961 Overriding profiler position in CSS breaks JS positioning (aschempp) + * bug #16873 Able to load big xml files with DomCrawler (zorn-v) + * bug #16897 [Form] Fix constraints could be null if not set (DZunke) + * bug #16912 [Translation][Writer] avoid calling setBackup if the dumper is not FileDumper (aitboudad) + * bug #17505 sort bundles in config:dump-reference command (xabbuh) + * bug #17506 [FrameworkBundle] enable assets when templates are enabled (xabbuh) + * bug #17514 [Asset] Add defaultNull to version configuration (ewgRa) + * bug #16511 [Asset] Ability to set empty version strategy in packages (ewgRa) + * bug #17457 Display Ajax requests from newest to oldest in the toolbar (javiereguiluz) + * bug #17503 [Asset] CLI: use request context to generate absolute URLs (xabbuh) + * bug #17478 [HttpFoundation] Do not overwrite the Authorization header if it is already set (jakzal) + * bug #17461 [Yaml] tag for dumped PHP objects must be a local one (xabbuh) + * bug #16822 [FrameworkBundle][Validator] Fix apc cache service deprecation (ogizanagi) + * bug #17463 [Form] make tests compatible with Symfony 2.8 and 3.0 (xabbuh) + * bug #17456 [DX] Remove default match from AbstractConfigCommand::findExtension (kix) + * bug #17455 Fixed form types in profiler (javiereguiluz) + * bug #17424 [Process] Update in 2.7 for stream-based output storage (romainneutron) + * bug #17417 Fixed the form profiler when using long form types (javiereguiluz) + * bug #17423 [Process] Use stream based storage to avoid memory issues (romainneutron) + * bug #17041 [FrameworkBundle] Added the assets helper again (dosten) + * bug #17406 [Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced (paradajozsef) + * bug #17433 [FrameworkBundle] Don't log twice with the error handler (nicolas-grekas) + * bug #17418 Fixed Bootstrap form theme form "reset" buttons (javiereguiluz) + * bug #17416 [PropertyInfo] PhpDocExtractor: Fix a notice when the property doesn'… (dunglas) + * bug #17404 fix merge 2.3 into 2.7 for SecureRandom dependency (Tobion) + * bug #17373 [SecurityBundle] fix SecureRandom service constructor args (Tobion) + * bug #17397 Remove remaining calls to non-existing method (paradajozsef) + * bug #17382 [TwigBridge] Use label_format option for checkbox and radio labels (enumag) + * bug #17380 [TwigBridge] Use label_format option for checkbox and radio labels (enumag) + * bug #17377 Fix performance (PHP5) and memory (PHP7) issues when using token_get_all (nicolas-grekas, peteward) + * bug #17389 [Routing] Fixed correct class name in thrown exception (fixes #17388) (robinvdvleuten) + * bug #17358 [ClassLoader] Use symfony/polyfill-apcu (nicolas-grekas) + * bug #17370 [HttpFoundation][Cookie] Cookie DateTimeInterface fix (wildewouter) + * security #17359 do not ship with a custom rng implementation (xabbuh, fabpot) + * bug #17253 [Console] HHVM read input stream bug (mbutkereit) + * bug #17314 Fix max width for multibyte keys in choice question (mheki) + * bug #17326 [Console] Display console application name even when no version set (polc) + * bug #17328 [Serializer] Allow to use proxies in object_to_populate (dunglas) + * bug #17202 [FrameworkBundle] Don't log twice with the error handler (nicolas-grekas) + * bug #17347 Workaround https://bugs.php.net/63206 (nicolas-grekas) + * bug #17340 [HttpFoundation] Fixed Request HTTP_USER_AGENT on 3.X versions (davelima) + * bug #17199 [Serializer] Allow context to contain not serializable data (dunglas, nicolas-grekas) + * bug #17334 [WebProfiler] Fixed sf-minitoolbar height (yceruto) + * bug #17140 [Serializer] Remove normalizer cache in Serializer class (jvasseur) + * bug #17320 [Debug] Fixed erroneous deprecation notice for extended Interfaces (peterrehm) + * bug #17307 [FrameworkBundle] Fix paths with % in it (like urlencoded) (scaytrase) + * bug #17078 [Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator (Disparity) + * bug #17298 [FrameworkBundle] Use proper class to fetch $versionStrategy property (dosten) + * bug #17287 [HttpKernel] Forcing string comparison on query parameters sort in UriSigner (Tim van Densen) + * bug #17279 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin) + * bug #17278 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin) + * bug #17063 bug #14246 [Filesystem] dumpFile() negates default file permissions (Hidde Boomsma) + * bug #17283 [WebProfilerBundle] Remove loading status from AJAX toolbar after error (kucharovic) + * bug #17275 [PhpUnitBridge] Re-enable the garbage collector (nicolas-grekas) + * bug #17276 [Process] Fix potential race condition (nicolas-grekas) + * bug #17261 [FrameworkBundle] Allow to autowire service_container (dunglas) + * bug #17183 [FrameworkBundle] Set the kernel.name properly after a cache warmup (jakzal) + * bug #17197 [Yaml] cast arrays to objects after parsing has finished (xabbuh) + * bug #17247 Fix toolbar display when nvd3 is loaded on page (Seldaek) + * bug #17159 [Yaml] recognize when a block scalar is left (xabbuh) + * bug #17195 bug #14246 [Filesystem] dumpFile() non atomic (Hidde Boomsma) + * feature #16747 [Form] Improved performance of ChoiceType and its subtypes (webmozart) + * bug #17179 [WebProfiler] Removed an object as route generator argument (iltar) + * bug #17177 [Process] Fix potential race condition leading to transient tests (nicolas-grekas) + * bug #17163 [Form] fix Catchable Fatal Error if choices is not an array (Gladhon, nicolas-grekas) + * bug #17152 [DoctrineBridge] [PropertyInfo] Catch Doctrine\ORM\Mapping\MappingException (dunglas) + * bug #17119 [Form] improve deprecation message for "empty_value" and "choice_list" options. (hhamon) + * bug #17156 [HttpFoundation] add missing symfony/polyfill-php55 dependency (xabbuh) + * bug #17162 [Form] Fix regression on Collection type (hason) + +* 3.0.1 (2015-12-26) + + * bug #16864 [Yaml] fix indented line handling in folded blocks (xabbuh) + * bug #17052 Fixed flatten exception recursion with errors (GrahamCampbell) + * bug #16826 Embedded identifier support (mihai-stancu) + * bug #17079 Also transform inline mappings to objects (WouterJ) + * bug #17129 [Config] Fix array sort on normalization in edge case (romainneutron) + * feature #17035 [DomCrawler] Revert previous restriction, allow selection of every DOMNode object (EdgarPE) + * bug #17094 [Process] More robustness and deterministic tests (nicolas-grekas) + * bug #17112 [PropertyAccess] Reorder elements array after PropertyPathBuilder::replace (alekitto) + * bug #17109 Improved the design of the web debug toolbar (javiereguiluz) + * bug #16797 [Filesystem] Recursively widen non-executable directories (Slamdunk) + * bug #16926 [DependencyInjection] fixed definition loosing property shared when decorated by a parent definition (wahler) + * bug #17040 [Console] Avoid extra blank lines when rendering exceptions (ogizanagi) + * bug #17044 [Form] fix BC break introduced with prototype_data option (memphys) + * bug #17055 [Security] Verify if a password encoded with bcrypt is no longer than 72 characters (jakzal) + * bug #16959 [Form] fix #15544 when a collection type attribute "required" is false, "prototype" should too (HeahDude) + * bug #16806 [Validator] BicValidator - fixed raising violations to a maximum of one (mvhirsch) + * bug #16842 [Ldap] Escape carriage returns in LDAP DNs. (ChadSikorra) + * bug #16860 [Yaml] do not remove "comments" in scalar blocks (xabbuh) + * bug #17002 [Console][Table] fixed render row that contains multiple cells. (aitboudad) + * bug #16964 CSS min-height and min-width should not be "auto" (aschempp) + * bug #16971 [HttpFoundation] Added the ability of using BinaryFileResponse with stream wrappers (jakzal, Sander-Toonen) + * bug #17048 Fix the logout path when not using the router (stof) + * bug #17049 Fix the logout path when not using the router (stof) + * bug #17057 [FrameworkBundle][HttpKernel] the finder is required to discover bundle commands (xabbuh) + * bug #17059 [HttpFoundation] fix error level for deprecation (xabbuh) + * bug #17006 [Form] Fix casting regression in DoctrineChoiceLoader (bendavies) + * bug #16911 [PropertyInfo] Update List Information from ReflectionExtractor (zanderbaldwin) + * bug #16955 [FrameworkBundle] ContainerDebugCommand: pass the right object to the descriptors (xabbuh) + * bug #16970 [HttpKernel] HttpCache: remove an ESI instance checking (voronkovich) + * feature #16760 Show silenced errors in separate tab (peterrehm) + * feature #16937 [PhpUnitBridge] Replace "weak-verbose" by "deprecations upper bound" mode (nicolas-grekas) + * bug #16953 return ajax collector to collectors.php (NothingWeAre) + * bug #16915 [Process] Enhance compatiblity with --enable-sigchild (nicolas-grekas) + * bug #16829 [FrameworkBundle] prevent cache:clear creating too long paths (Tobion) + * bug #16922 [FrameworkBundle] [Bug] Fixes new InputStyle bug #16920 (AlmogBaku) + * bug #16921 Fix short array syntax for php 5.3 (ewgRa) + * bug #16450 [Serializer] Fixed `array_unique` on array of objects in `getAllowedAttributes`. (CornyPhoenix) + * bug #16757 [FrameworkBundle] [Translation] Fixed translations not written when no translations directory in update command (jeremyFreeAgent) + * bug #16902 [Security] Fix a Polyfill import statement in StringUtils (magnetik) + * bug #16871 [FrameworkBundle] Disable built-in server commands when Process component is missing (gnugat, xabbuh) + * bug #16870 [FrameworkBundle] Disable the server:run command when Process component is missing (gnugat, xabbuh) + * feature #16789 [PhpUnitBridge] Add weak-verbose mode and match against message instead of test name (nicolas-grekas) + * minor #16850 [MonologBridge] Added a test case for the Logger class (derrabus) + * bug #16796 [Form] Fix choices defined as Traversable (nicolas-grekas) + * bug #16742 [Console][ProgressBar] redrawFrequency should never be 0 (dritter) + * bug #16846 [MonologBridge] Monolog Bridge 2.8 is incompatible with HttpKernel 3.0 (derrabus) + * bug #16816 [Config] Throw an exception when using cannotBeEmpty() with numeric or boolean nodes (Ener-Getick) + * bug #16799 Improve error message for undefined DIC aliases (mpdude) + * bug #16825 [VarDumper] fix .sf-dump z-index (debug bar conflict) (Antoine LA) + * bug #16772 Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error (weaverryan) + * bug #16788 Reapply the Yaml bugfix of #16745 (stof) + +* 3.0.0 (2015-11-30) + + * bug #16758 Fix BC for the default root form name (stof) + * feature #16754 [Security] allow arbitrary types in VoterInterface::vote() (xabbuh) + * bug #16753 [Process] Fix signaling/stopping logic on Windows (nicolas-grekas) + * feature #16755 [Security] add subject variable to expression context (xabbuh) + * bug #16642 [DI][autowiring] throw exception when many services use the same class. (aitboudad) + * bug #16745 [Yaml] look for colon in parsed inline string (xabbuh) + * bug #16733 [Console] do not encode backslashes in console default description (Tobion) + * feature #16735 [WIP] [Ldap] Marked the Ldap component as internal (csarrazi) + * bug #16734 Make sure security.role_hierarchy.roles always exists (WouterJ) + * feature #16723 [Form] remove deprecated CSRF options (xabbuh) + * feature #16725 [Form] Removed useless code (webmozart) + * feature #16724 Added getBlockPrefix to FormTypeInterface (WouterJ) + * feature #16722 [Security][SecurityBundle] Use csrf_token_id instead of deprecated intention (jakzal) + * feature #16727 [Form] remove deprecated getTimezones() method (xabbuh) + * bug #16312 [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released (mpdude) + * bug #16351 [WIP] [Form] [TwigBridge] Bootstrap horizontal theme missing tests (pieter2627) + * feature #16715 [Form] Remove choices_as_values option on ChoiceType (nicolas-grekas) + * feature #16692 [Form] Drop remaining CsrfProviderAdapter/Interface mentions (nicolas-grekas) + * feature #16719 [Security] remove deprecated HTTP digest auth key (xabbuh) + * bug #16685 [Form] Fixed: Duplicate choice labels are remembered when using "choices_as_values" = false (webmozart) + * feature #16709 [Bridge\PhpUnit] Display the stack trace of a deprecation on-demand (nicolas-grekas) + * bug #16704 [Form+SecurityBundle] Trigger deprecation for csrf_provider+intention options (nicolas-grekas) + * feature #16629 [HttpFoundation] Remove deprecated class method parameter (belka-ew) + * feature #16706 [HttpFoundation] Deprecate $deep parameter on ParameterBag (nicolas-grekas) + * bug #16705 [Form] Deprecated setting "choices_as_values" to "false" (webmozart) + * feature #16690 [Form] Deprecated ArrayKeyChoiceList (webmozart) + * feature #16687 [Form] Deprecated TimezoneType::getTimezones() (webmozart) + * bug #16681 [Form] Deprecated setting "choices_as_values" to "false" (webmozart) + * feature #16694 [SecurityBundle] make ACL an optional dependency (Tobion) + * bug #16695 [SecurityBundle] disable the init:acl command if ACL is not used (Tobion) + * bug #16677 [Form] Fixed wrong usages of the "text" type (webmozart) + * bug #16679 [Form] Disabled view data validation if "data_class" is set to null (webmozart) + * bug #16621 [Console] Fix bug with $output overloading (WouterJ) + * feature #16601 [Security] Deprecate "AbstractVoter" in favor of "Voter" (nicolas-grekas, lyrixx) + * bug #16676 [HttpFoundation] Workaround HHVM rewriting HTTP response line (nicolas-grekas) + * bug #16668 [ClassLoader] Fix parsing namespace when token_get_all() is missing (nicolas-grekas) + * bug #16615 fix type assignement (rande) + * bug #16386 Bug #16343 [Router] Too many Routes ? (jelte) + * bug #16498 fix unused variable warning (eventhorizonpl) + * feature #16031 [Translation][Form] Do not translate form labels and placeholders when 'translation_domain' is false (Restless-ET) + * bug #16651 [Debug] Ensure class declarations are loaded only once (nicolas-grekas) + * feature #16637 Removed unneeded polyfill (GrahamCampbell) + * security #16631 n/a (xabbuh) + * security #16630 n/a (xabbuh) + * bug #16633 [Filesystem] Fixed failing test due to tempdir symlink (toretto460) + * bug #16607 [HttpFoundation] Delete not existing session handler proxy member (belka-ew) + * bug #16609 [HttpKernel] Don't reset on shutdown but in FrameworkBundle/Test/KernelTestCase (nicolas-grekas) + * bug #16477 [Routing] Changing RouteCollectionBuilder::import() behavior to add to the builder (weaverryan) + * bug #16588 Sent out a status text for unknown HTTP headers. (dawehner) + * bug #16295 [DependencyInjection] Unescape parameters for all types of injection (Nicofuma) + * bug #16377 [WebProfilerBundle] Fix minitoolbar height (rvanlaak) + * bug #16585 Add support for HTTP status code 418 back (dawehner) + * bug #16574 [Process] Fix PhpProcess with phpdbg runtime (nicolas-grekas) + * bug #16581 Fix call to undefined function json_last_error_message (dawehner) + * bug #16573 [FrameworkBundle] Fix PropertyInfo extractor namespace in framework bundle (jvasseur) + * bug #16578 [Console] Fix bug in windows detection (kbond) + * bug #16546 [Serializer] ObjectNormalizer: don't serialize static methods and props (dunglas) + * bug #16352 Fix the server variables in the router_*.php files (leofeyer) + * bug #16537 [Validator] Allow an empty path with a non empty fragment or a query (jakzal) + * bug #16528 [Translation] Add support for Armenian pluralization. (marcosdsanchez) + * bug #16510 [Process] fix Proccess run with pts enabled (ewgRa) + +* 3.0.0-BETA1 (2015-11-16) + + * feature #16516 Remove some more legacy code (nicolas-grekas) + * feature #11431 [Console] End of options (--) signal support (Seldaek) + * feature #16411 [3.0] use ContainerAwareTrait (blanchonvincent, Tobion) + * feature #16400 [3.0] [Templating] remove deprecated method (TomasVotruba) + * feature #16381 remove polyfills for unsupported php versions (Tobion) + * feature #16392 [3.0] [Security] remove deprecated SrtingUtils class (TomasVotruba) + * feature #16390 [3.0] [Serializer] JsonEncoder: remove deprecated method (TomasVotruba) + * feature #16301 [EventDispatcher] add method getListenerPriority() to interface (xabbuh) + * feature #12119 [Console] Add progress indicator helper (kbond) + * feature #16203 [Yaml] removed YAML parser \ escaping in double-quotes (fabpot) + * feature #16107 [3.0] Various deprecations cleanups (nicolas-grekas) + * feature #16125 Replace is_callable checks with type hints (mpajunen, nicolas-grekas) + * feature #16076 [HttpFoundation] change precedence of parameters in Request::get (Tobion) + * feature #16075 [3.0] Clean Form, Validator, DowCrawler and some more (nicolas-grekas) + * feature #16035 [3.0][Security] Remove deprecated features (follow up of #15899) (Koc) + * feature #8967 [HttpFoundation] Request->getRequestFormat should only rely on the request attributes (pvandommelen) + * feature #16067 [3.0] Remove more deprecated interfaces in Form and Validator (nicolas-grekas) + * feature #16020 [CssSelector] removed the deprecated CssSelector class (fabpot) + * feature #15196 [HttpKernel] make RequestStack parameter required (Tobion) + * feature #16024 [Validator] removed deprecated features in Validator and Form (fabpot) + * feature #15900 [3.0][DoctrineBridge] Removed deprecated features (WouterJ) + * feature #15904 [3.0][FrameworkBundle] Removed deprecated features (WouterJ) + * feature #16019 [HttpFoundation] removed the ParameterBag::get() deep argument (fabpot) + * feature #16018 [HttpKernel] removed deprecated profiler storages (fabpot) + * feature #15899 [3.0][Security] Remove deprecated features (WouterJ) + * feature #15929 [3.0][Config] Remove ResourceInterface::getResource() which was deprecated in 2.8 (mpdude) + * feature #15965 [Finder] removed obsolete code (fabpot) + * feature #15905 [3.0][Config] Removed isFresh() related functionality (WouterJ) + * feature #15936 [Console] remove deprecated shell (Tobion) + * feature #10788 [HttpKernel] Add better error message when controller action isn't callable (pierredup) + * feature #15868 [Finder] Remove deprecated classes (nicolas-grekas) + * feature #15869 [Translation][file dump] remove deprecated format method. (aitboudad) + * feature #15801 [WebProfilerBundle][HttpKernel] removed import/export commands (jakzal) + * feature #15759 [3.0][Translator] remove deprecated DiffOperation class. (aitboudad) + * feature #15684 [Security] Remove deprecated interfaces (nicolas-grekas) + * feature #15685 [3.0] Various deprecation removal (nicolas-grekas) + * feature #15693 [DI] Remove deprecated scope concept (nicolas-grekas) + * feature #15695 [FrameworkBundle] Removed deprecated code paths (nicolas-grekas) + * feature #15430 [SecurityBundle] Remove deprecated code (dosten) + * feature #15422 [Debug] Remove deprecated ExceptionHandler::createResponse (nicolas-grekas) + * feature #15347 [DependencyInjection][3.0] Add initialized to container interface (znerol) + * feature #15219 [DependencyInjection] Added ParameterBagInterface::remove (lyrixx) + * feature #14927 Removed deprecated stuff from the Config component (dosten) + * feature #14693 [3.0][Translator] changed the visibility of the locale from protected to private. (aitboudad) + * feature #14979 [Security] removed obsolete translations (fabpot) + * feature #14928 Removed deprecated stuff from the Console component (dosten) + * feature #14155 Removed deprecations in DependencyInjection component (dosten) + * feature #14145 Removed deprecations in Filesystem component (dosten) + * feature #14153 Remove the legacy PDO session handler (dosten) + * feature #14634 [3.0][HttpKernel] remove deprecated functions and classes (vincentaubert) + * feature #14317 [3.0][FrameworkBundle][lint commands ] remove deprecated alias. (vincentaubert) + * feature #14220 [3.0][Console][OutputStyle] Implements verbosity levels methods (ogizanagi) + * feature #14169 [Debug] Removed deprecated interfaces (nicolas-grekas) + * feature #14147 Removed deprecations in Process component (dosten) + * feature #14150 Removed deprecations in Templating component (dosten) + * feature #14156 Remove deprecated Locale component (stloyd) + * feature #14120 Removed deprecation in translation component (saro0h) + * feature #14118 Removed deprecations in Console component (saro0h) + * feature #14119 Removed deprecation in YAML component (saro0h) + * feature #14091 [3.0] [FrameworkBundle] Drop backward compatibility for debug commands (matthieuauger) + * feature #14070 removed all *.class parameters (fabpot) + * feature #13808 [OptionsResolver] removed deprecated functionality (Tobion) + * feature #13756 [3.0][Console] Added type hint (francisbesset) + * feature #13752 [PropertyAccess] remove deprecations for 3.0 (Tobion) + * feature #13666 removed deprecated asset feature (fabpot) + * feature #13407 [Form] Remove deprecated setDefaultOptions and OptionsResolverInterface (peterrehm) + * feature #13396 [Routing] remove deprecations for 3.0 (Tobion) + * feature #13444 [Serializer] Remove deprecated JSON error methods (dunglas) + * feature #13258 [HttpFoundation] remove deprecated : FlashBag don't implement anymore IteratorAggregate (FlorianLB) + * feature #13086 [Console] Define isVerbose(), etc. methods in OutputInterface (frne) + * feature #13348 [3.0][Monolog] Remove deprecated interface and deprecated methods (rosier) + * feature #13260 [3.0][EventDispatcher][Event] removed deprecated methods (aitboudad) + * feature #13203 [3.0] [ClassLoader] removed deprecated UniversalClassLoader and DebugClassLoader classes. (hhamon) + * feature #13409 removed deprecated Twig features (fabpot) + * feature #13233 [TwigBundle] removed deprecated ActionsExtension (fabpot) + * feature #12663 [FrameworkBundle] remove deprecated method 'createEsi' (FlorianLB) + * feature #13122 [3.0][Form] Removed depracted events PRE_BIND, BIND and POST_BIND (saro0h) + * feature #13216 [3.0] [Config] removed deprecated ReferenceDumper class. (hhamon) + * feature #12457 [FrameworkBundle] REFS #11294 Controller class become abstract (mickaelandrieu) + * feature #12460 [3.0] [FrameworkBundle] removed request service occurrences. (hhamon) + * feature #13121 [Console] Removed DialogHelper, ProgressHelper and TableHelper (saro0h) + * feature #13127 [FrameworkBundle] Removed the deprecated RouterApacheDumperCommand (saro0h) + * feature #13128 [Form] Removed deprecated form_enctype() (saro0h) + * feature #13130 [HttpKernel] Removed deprecated ErrorHandler and ExceptionHandler classes (saro0h) + * feature #13129 [Yaml] Removed the ability to parse a file in Yaml::parse() (saro0h) + * feature #12994 Add LegacyPdoSessionHandler class (jeremylivingston) + * feature #13046 [3.0] [Bridge] [Swiftmailer] removed Swiftmailer bridge namespace. (hhamon) + * feature #12854 [3.0][HttpKernel] Remove unused method Kernel::isClassInActiveBundle (hacfi) + * feature #12697 [3.0][Process] Remove deprecated methods (romainneutron) + * feature #12731 [Monolog Bridge] Remove deprecated log methods + add unit tests (FlorianLB) + * feature #12461 [HttpKernel] Removed deprecated Kernel::init() method (saro0h) diff --git a/vendor/symfony/symfony/CHANGELOG-3.1.md b/vendor/symfony/symfony/CHANGELOG-3.1.md new file mode 100644 index 0000000000000000000000000000000000000000..36efff588f4d8afd09265716c430d71e83c79402 --- /dev/null +++ b/vendor/symfony/symfony/CHANGELOG-3.1.md @@ -0,0 +1,478 @@ +CHANGELOG for 3.1.x +=================== + +This changelog references the relevant changes (bug and security fixes) done +in 3.1 minor versions. + +To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash +To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v3.1.0...v3.1.1 + +* 3.1.9 (2017-01-12) + + * bug #21218 [Form] DateTimeToLocalizedStringTransformer does not use timezone when using date only (magnetik) + * bug #20605 [Ldap] Always have a valid connection when using the EntryManager (bobvandevijver) + * bug #21104 [FrameworkBundle] fix IPv6 address handling in server commands (xabbuh) + * bug #20793 [Validator] Fix caching of constraints derived from non-serializable parents (uwej711) + * bug #19586 [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account (wesleylancel) + * bug #21237 [FrameworkBundle] Fix relative paths used as cache keys (nicolas-grekas) + * bug #21183 [Validator] respect groups when merging constraints (xabbuh) + * bug #21179 [TwigBundle] Fixing regression in TwigEngine exception handling (Bertalan Attila) + * bug #21220 [DI] Fix missing new line after private alias (ogizanagi) + * bug #21211 Classloader tmpname (lyrixx) + * bug #21205 [TwigBundle] fixed usage when Templating is not installed (fabpot) + * bug #21155 [Validator] Check cascasdedGroups for being countable (scaytrase) + * bug #21200 [Filesystem] Check that directory is writable after created it in dumpFile() (chalasr) + * bug #21165 [Serializer] int is valid when float is expected when deserializing JSON (dunglas) + * bug #21166 [Cache] Fix order of writes in ChainAdapter (nicolas-grekas) + * bug #21113 [FrameworkBundle][HttpKernel] Fix resources loading for bundles with custom structure (chalasr) + * bug #21084 [Yaml] handle empty lines inside unindented collection (xabbuh) + * bug #20925 [HttpFoundation] Validate/cast cookie expire time (ro0NL) + * bug #21032 [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService (lyrixx) + * bug #21078 [Console] Escape default value when dumping help (lyrixx) + * bug #21076 [Console] OS X Can't call cli_set_process_title php without superuser (ogizanagi) + * bug #20900 [Console] Descriptors should use Helper::strlen (ogizanagi) + * bug #21025 [Cache] remove is_writable check on filesystem cache (4rthem) + * bug #21064 [Debug] Wrap call to ->log in a try catch block (lyrixx) + * bug #21010 [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes (SpacePossum) + * bug #20991 [cache] Bump RedisAdapter default timeout to 5s (Nicofuma) + * bug #20859 Avoid warning in PHP 7.2 because of non-countable data (wouterj) + * bug #21053 [Validator] override property constraints in child class (xabbuh) + * bug #21034 [FrameworkBundle] Make TemplateController working without the Templating component (dunglas) + * bug #20970 [Console] Fix question formatting using SymfonyStyle::ask() (chalasr, ogizanagi) + * bug #20999 [HttpKernel] Continuation of #20599 for 3.1 (ro0NL) + * bug #20975 [Form] fix group sequence based validation (xabbuh) + * bug #20599 [WebProfilerBundle] Display multiple HTTP headers in WDT (ro0NL) + * bug #20799 [TwigBundle] do not try to register incomplete definitions (xabbuh) + * bug #20961 [Validator] phpize default option values (xabbuh) + * bug #20934 [FrameworkBundle] Fix PHP form templates on translatable attributes (ro0NL) + * bug #20957 [FrameworkBundle] test for the Validator component to be present (xabbuh) + * bug #20936 [DependencyInjection] Fix on-invalid attribute type in xsd (ogizanagi) + * bug #20931 [VarDumper] Fix dumping by-ref variadics (nicolas-grekas) + * bug #20734 [Security] AbstractVoter->supportsAttribute gives false positive if attribute is zero (0) (martynas-foodpanda) + * bug #14082 [config] Fix issue when key removed and left value only (zerustech) + * bug #20910 [HttpFoundation] Fix cookie to string conversion for raw cookies (ro0NL) + * bug #20847 [Console] fixed BC issue with static closures (araines) + +* 3.1.8 (2016-12-13) + + * bug #20714 [FrameworkBundle] Fix unresolved parameters from default configs in debug:config (chalasr) + * bug #20442 [FrameworkBundle] Bundle commands are not available via find() (julienfalque) + * bug #20840 [WebProfilerBundle] add dependency on Twig (xabbuh) + * bug #20828 [Validator] Fix init of YamlFileLoader::$classes for empty files (nicolas-grekas) + * bug #20745 [Validator] add class name to the cache key (Simperfit) + * bug #20530 [Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize (dunglas) + * bug #19141 Throw less misleading exception when property access not found (bramtweedegolf) + * bug #20539 Cast result to int before adding to it (alcaeus) + * bug #20831 [Twig] Fix deprecations with Twig 1.29 (nicolas-grekas) + * bug #20816 [FrameworkBundle] Removed kernel.debug from the cache pool namespace seed (Sander Toonen) + * bug #20646 Maintain the selected panel when redirecting to another profile (javiereguiluz) + * bug #20767 [Cache] Fix dumping SplDoublyLinkedList iter mode (nicolas-grekas) + * bug #20736 [Console] fixed PHP7 Errors when not using Dispatcher (keradus) + * bug #20756 [HttpKernel] Regression test for missing controller arguments (iltar) + * bug #20755 [HttpKernel] Regression test for missing controller arguments (iltar) + * bug #20732 fix the inline level for dumped multi-line strings (xabbuh) + * bug #20418 [Form][DX] FileType "multiple" fixes (yceruto) + * bug #19902 [DependencyInjection] PhpDumper.php: hasReference() shouldn't search references in lazy service. (antanas-arvasevicius) + * bug #20704 [Console] Fix wrong handling of multiline arg/opt descriptions (ogizanagi) + * bug #20712 [TwigBundle] Fix twig loader registered twice (ogizanagi) + * bug #20716 [WebProfilerBundle] Fix dump block is unfairly restrained (ogizanagi) + * bug #20671 [Config] ConfigCache::isFresh() should return false when unserialize() fails (nicolas-grekas) + * bug #20676 [ClassLoader] Use only forward slashes in generated class map (nicolas-grekas) + * bug #20664 [Validator] ensure the proper context for nested validations (xabbuh) + * bug #20661 bug #20653 [WebProfilerBundle] Profiler includes ghost panels (jzawadzki) + * bug #20374 [FrameworkBundle] Improve performance of ControllerNameParser (enumag) + * bug #20474 [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name (fancyweb) + * bug #20566 [DI] Initialize properties before method calls (ro0NL) + * bug #20609 [DI] Fixed custom services definition BC break introduced in ec7e70fb… (kiler129) + * bug #20598 [DI] Aliases should preserve the aliased invalid behavior (nicolas-grekas) + * bug #20600 [Process] Fix process continuing after reached timeout using getIterator() (chalasr) + * bug #20602 [HttpKernel] Revert BC breaking change of Request::isMethodSafe() (nicolas-grekas) + * bug #20499 [Doctrine][Form] support large integers (xabbuh) + * bug #20576 [Process] Do feat test before enabling TTY mode (nicolas-grekas) + * bug #20577 [FrameworkBundle] Mark cache.default_*_provider services private (nicolas-grekas) + +* 3.1.7 (2016-11-21) + + * bug #20550 [YAML] Fix processing timestamp strings with timezone (myesain) + * bug #20543 [DI] Fix error when trying to resolve a DefinitionDecorator (nicolas-grekas) + * bug #20544 [PhpUnitBridge] Fix time-sensitive tests that use data providers (julienfalque) + * bug #20484 bumped min version of Twig to 1.28 (fabpot) + * bug #20519 [Debug] Remove GLOBALS from exception context to avoid endless recursion (Seldaek) + * bug #20455 [ClassLoader] Fix ClassCollectionLoader inlining with __halt_compiler (giosh94mhz) + * bug #20307 [Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds (LuisDeimos) + * bug #20480 [FrameworkBundle] Register the ArrayDenormalizer (dunglas) + * bug #20286 [Serializer] Fix DataUriNormalizer's regex (dunglas) + * bug #20466 [Translation] fixed nested fallback catalogue using multiple locales. (aitboudad) + * bug #20465 [#18637][TranslationDebug] workaround for getFallbackLocales. (aitboudad) + * bug #20453 [Cache] Make directory hashing case insensitive (nicolas-grekas) + * bug #20440 [TwigBridge][TwigBundle][HttpKernel] prefer getSourceContext() over getSource() (xabbuh) + * bug #20287 Properly format value in UniqueEntityValidator (alcaeus) + * bug #20422 [Translation][fallback] add missing resources in parent catalogues. (aitboudad) + * bug #20378 [Form] Fixed show float values as choice value in ChoiceType (yceruto) + * bug #20294 Improved the design of the metrics in the profiler (javiereguiluz) + * bug #20375 [HttpFoundation][Session] Fix memcache session handler (klandaika) + * bug #20377 [Console] Fix infinite loop on missing input (chalasr) + * bug #20372 [Console] simplified code (fabpot) + * bug #20342 [Form] Fix UrlType transforms valid protocols (ogizanagi) + * bug #20292 Enhance GAE compat by removing some realpath() (nicolas-grekas) + * bug #20326 [VarDumper] Fix dumping Twig source in stack traces (nicolas-grekas) + * bug #20321 Compatibility with Twig 1.27 (xkobal) + +* 3.1.6 (2016-10-27) + + * bug #20291 [Yaml] Fix 7.1 compat (nicolas-grekas) + * bug #20289 Fix edge case with StreamedResponse where headers are sent twice (Nicofuma) + * bug #20267 [DependencyInjection] A decorated service should not keep the autowiring types (chalasr) + * bug #20278 [DependencyInjection] merge tags instead of completely replacing them (xabbuh) + * bug #20271 Changes related to Twig 1.27 (fabpot) + * bug #20252 Trim constant values in XmlFileLoader (lstrojny) + * bug #20239 [HttpKernel] Fix a regression in the RequestDataCollector (jakzal) + * bug #20253 [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine() (fabpot) + * bug #20243 [WebProfilerBundle][btn-link] add `cursor: pointer` (aitboudad) + * bug #20175 [VarDumper] Fix source links with latests Twig versions (nicolas-grekas) + * bug #20235 [DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions (klausi, nicolas-grekas) + * bug #20224 [Twig] removed deprecations added in Twig 1.27 (fabpot) + * bug #19478 fixed Filesystem:makePathRelative and added 2 more testcases (muhammedeminakbulut) + * bug #20218 [HttpFoundation] no 304 response if method is not cacheable (xabbuh) + * bug #20207 [DependencyInjection] move tags from decorated to decorating service (xabbuh) + * bug #20205 [HttpCache] fix: do not cache OPTIONS request (dmaicher) + * bug #20146 [Validator] Prevent infinite loop in PropertyMetadata (wesleylancel) + * bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr) + * bug #20154 [PropertyInfo] Fix edge cases in ReflectionExtractor (nicolas-grekas) + * bug #19725 [Security] $attributes can be anything, but RoleVoter assumes strings (Jonatan Männchen) + * bug #20127 [HttpFoundation] JSONP callback validation (ro0NL) + * bug #20163 add missing use statement (xabbuh) + * bug #19961 [Console] Escape question text and default value in SymfonyStyle::ask() (chalasr) + * bug #20141 [Console] Fix validation of empty values using SymfonyQuestionHelper::ask() (chalasr) + * bug #20147 [FrameworkBundle] Alter container class instead of kernel name in cache:clear command (nicolas-grekas) + * bug #20156 Fix event annotation for arguments resolving event (Koc) + * bug #20152 [HttpKernel] Fix nullable types handling (nicolas-grekas) + +* 3.1.5 (2016-10-03) + + * bug #20102 [Validator] Url validator not validating hosts ending in a number (gwkunze) + * bug #20132 Use "more entropy" option for uniqid() (javiereguiluz) + * bug #20122 [Validator] Reset constraint options (ro0NL) + * bug #20116 fixed AddConstraintValidatorsPass config (fabpot) + * bug #20078 Fix #19943 Make sure to process each interface metadata only once (lemoinem) + * bug #20080 [Form] compound forms without children should be considered rendered implicitly (backbone87) + * bug #20087 [VarDumper] Fix PHP 7.1 compat (nicolas-grekas) + * bug #20086 [VarDumper] Fix PHP 7.1 compat (nicolas-grekas) + * bug #20077 [Process] silent file operation to avoid open basedir issues (xabbuh) + * bug #20079 fixed Twig support for 1.26 and 2.0 (fabpot) + * bug #20051 Fix indexBy type extraction (lemoinem) + * bug #19951 [Finder] Trim trailing directory slash in ExcludeDirectoryFilterIterator (ro0NL) + * bug #19980 [Ldap] Fixed issue with legacy find() method not working as expected (csarrazi) + * bug #20026 [Cache] Fixed password used to make the redis connection. (ErikSaunier) + * bug #20018 [VarDumper] Fix test (nicolas-grekas) + * bug #20011 Use UUID for error codes for Form validator. (Koc) + * bug #20010 [DX] Fixed regression when exception message swallowed when logging it. (Koc) + * bug #19983 [TwigBridge] removed Twig null nodes (deprecated as of Twig 1.25) (fabpot) + * bug #19946 [Console] Fix parsing optionnal options with empty value in argv (chalasr) + * bug #19636 [Finder] no PHP warning on empty directory iteration (ggottwald) + * bug #19784 [HttpKernel] Fixed the nullable support for php 7.1 and below (iltar) + * bug #19923 [bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level (phansys) + * bug #19811 Fixed the nullable support for php 7.1 and below (2.7, 2.8, 3.0) (iltar) + * bug #19853 [PropertyInfo] Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1 (teohhanhui) + * bug #19904 [Form] Fixed collapsed ChoiceType options attributes (HeahDude) + * bug #19872 [Filesystem] Consider the umask setting when dumping a file (leofeyer) + * bug #19908 [Config] Handle open_basedir restrictions in FileLocator (Nicofuma) + * bug #19893 [FrameworkBundle] Remove cache clearer default value in config (nicolas-grekas) + * bug #19924 [DoctrineBridge][PropertyInfo] Treat Doctrine decimal type as string (teohhanhui) + * bug #19932 Fixed bad merge (GrahamCampbell) + * bug #19922 [Yaml][TwigBridge] Use JSON_UNESCAPED_SLASHES for lint commands output (chalasr) + * bug #19928 [Validator] Update IpValidatorTest data set with a valid reserved IP (jakzal) + * bug #19813 [Console] fixed PHP7 Errors are now handled and converted to Exceptions (fonsecas72) + * bug #19879 [Form] Incorrect timezone with DateTimeLocalizedStringTransformer (mbeccati) + * bug #19878 Fix translation:update command count (tgalopin) + * bug #19859 [ClassLoader] Fix ClassCollectionLoader inlining with declare(strict_types=1) (nicolas-grekas) + * bug #19780 [FrameworkBundle] Incorrect line break in exception message (500 debug page) (pedroresende) + * bug #19595 [form] lazy trans `post_max_size_message`. (aitboudad) + * bug #19870 [DI] Fix setting synthetic services on ContainerBuilder (nicolas-grekas) + * bug #19848 Revert "minor #19689 [DI] Cleanup array_key_exists (ro0NL)" (nicolas-grekas) + * bug #19842 [FrameworkBundle] Check for class existence before is_subclass_of (chalasr) + * bug #19827 [BrowserKit] Fix cookie expiration on 32 bit systems (jameshalsall) + +* 3.1.4 (2016-09-03) + + * bug #19812 [WebProfilerBundle] Fix margin on toolbar route panel when no route is found in the request (jameshalsall) + * bug #19786 Update profiler's layout to use flexbox (javiereguiluz) + * bug #19794 [VarDumper] Various minor fixes & cleanups (nicolas-grekas) + * bug #19751 Fixes the calendar in constructor to handle null (wakqasahmed) + * bug #19743 [symfony/symfony] add "provides" for psr/cache-implementation (alcohol) + * bug #19388 [Validator][GroupSequence] fixed GroupSequence validation ignores PropetyMetadata of parent classes (Sandro Hopf) + * bug #19729 Add symfony/inflector to composer.json "replaces" (teohhanhui) + * bug #19601 [FrameworkBundle] Added friendly exception when constraint validator class does not exist (yceruto) + * bug #19580 [Validator] fixed duplicate constraints with parent class interfaces (dmaicher) + * bug #19647 [Debug] Swap dumper services at bootstrap (lyrixx) + * bug #19685 [DI] Include dynamic services in alternatives (ro0NL) + * bug #19702 [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes (aka "small-bc-breaks") (nicolas-grekas) + * bug #19704 [DependencyInjection] PhpDumper::isFrozen inconsistency (allflame) + * bug #19643 [DependencyInjection] Fix service autowiring inheritance (chalasr) + * bug #19649 [Serializer] Fix denormalization of arrays (dunglas) + * bug #19667 [SecurityBundle] Add missing deprecation notice for form_login.intention (ro0NL) + * bug #19666 Verify explicitly that the request IP is a valid IPv4 address (nesk) + * bug #19660 Disable CLI color for Windows 10 greater than 10.0.10586 (mlocati) + * bug #19663 Exception details break the layout (Dionysis Arvanitis) + * bug #19651 [HttpKernel] Fix HttpCache validation HTTP method (tgalopin) + * bug #19650 [FrameworkBundle] Fix default lifetime of cache pools (nicolas-grekas) + * bug #19623 [VarDumper] Fix dumping continuations (nicolas-grekas) + * bug #19437 [PropertyInfo] Fix an error in PropertyInfoCacheExtractor (Ener-Getick) + * bug #19549 [HttpFoundation] fixed Request::getContent() reusage bug (1ma) + * bug #19373 [Form] Skip CSRF validation on form when POST max size is exceeded (jameshalsall) + * bug #19541 Fix #19531 [Form] DateType fails parsing when midnight is not a valid time (mbeccati) + * bug #19567 [Cache] Handle unserialize() failures gracefully (nicolas-grekas) + * bug #19579 [Process] Strengthen Windows pipe files opening (again...) (nicolas-grekas) + * bug #19564 Added class existence check if is_subclass_of() fails in compiler passes (SCIF) + * bug #19551 [Cache] Use SCAN instead of KEYS with Redis >= 2.8 (nicolas-grekas) + * bug #19522 [SwiftMailerBridge] Fix flawed deprecation message (chalasr) + * bug #19510 [Process] Fix double-fread() when reading unix pipes (nicolas-grekas) + * bug #19508 [Process] Fix AbstractPipes::write() for a situation seen on HHVM (at least) (nicolas-grekas) + * bug #19470 undefined offset fix (#19406) (ReenExe) + +* 3.1.3 (2016-07-30) + + * bug #19300 [HttpKernel] Use flock() for HttpCache's lock files (mpdude) + * bug #19428 [Process] Fix write access check for pipes on Windows (nicolas-grekas) + * bug #19442 [Cache] Fix default lifetime being ignored (nicolas-grekas) + * bug #19435 [Cache] Fix incorrect timestamps generated by FilesystemAdapter (nicolas-grekas) + * bug #19434 [Serializer] enable property info in framework bundle (David Badura) + * bug #19439 [DependencyInjection] Fixed deprecated default message template with XML (jeremyFreeAgent) + * bug #19397 [HttpFoundation] HttpCache refresh stale responses containing an ETag (maennchen) + * bug #19426 [Form] Fix the money form type render with Bootstrap3 (Th3Mouk) + * bug #19422 [DomCrawler] Inherit the namespace cache in subcrawlers (stof) + * bug #19425 [BrowserKit] Uppercase the "GET" method in redirects (jakzal) + * bug #19384 Fix PHP 7.1 related failures (nicolas-grekas) + * bug #19379 [VarDumper] Fix for PHP 7.1 (nicolas-grekas) + * bug #19342 Added class existence check if is_subclass_of() fails in compiler passes (SCIF) + * bug #19369 Fix the DBAL session handler version check for Postgresql (stof) + * bug #19368 [VarDumper] Fix dumping jsons casted as arrays (nicolas-grekas) + * bug #19334 [Security] Fix the retrieval of the last username when using forwarding (stof) + * bug #19352 [Serializer] Include the format in the cache key (dunglas) + * bug #19321 [HttpFoundation] Add OPTIONS and TRACE to the list of safe methods (dunglas) + * bug #19317 [BrowserKit] Update Client::getAbsoluteUri() for query string only URIs (georaldc) + * bug #19298 [ClassLoader] Fix declared classes being computed when not needed (nicolas-grekas) + * bug #19316 [Validator] Added additional MasterCard range to the CardSchemeValidator (Dennis Væversted) + * bug #19290 [HttpKernel] fixed internal subrequests having an if-modified-since-header (MalteWunsch) + * bug #19307 [Security] Fix deprecated usage of DigestAuthenticationEntryPoint::getKey() in DigestAuthenticationListener (Maxime STEINHAUSSER) + * bug #19309 [DoctrineBridge] added missing error code for constraint. (Koc) + * bug #19306 [Form] fixed bug - name in ButtonBuilder (cheprasov) + * bug #19292 [varDumper] Fix missing usage of ExceptionCaster::$traceArgs (nicolas-grekas) + * bug #19288 [VarDumper] Fix indentation trimming in ExceptionCaster (nicolas-grekas) + * bug #19267 [Validator] UuidValidator must accept a Uuid constraint. (hhamon) + * bug #19272 [Security] fixed DebugAccessDecisionManager::setVoters() (HeahDude) + * bug #19260 [Form] Fix depreciation triggers (tgalopin) + * bug #19186 Fix for #19183 to add support for new PHP MongoDB extension in sessions. (omanizer) + * bug #19253 [Console] Fix block() padding formatting after #19189 (chalasr) + * bug #19218 [Security][Guard] check if session exist before using it (pasdeloup) + +* 3.1.2 (2016-06-30) + + * bug #19227 [DoctrineBridge] fixed default parameter value in UniqueEntityValidator (HeahDude) + * bug #18934 Fixed some issues of the AccessDecisionManager profiler (javiereguiluz) + * bug #19217 [HttpKernel] Inline ValidateRequestListener logic into HttpKernel (nicolas-grekas) + * bug #18688 [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For (magnusnordlander) + * bug #19173 [Console] Decouple SymfonyStyle from TableCell (ro0NL) + * bug #19204 [Security] Allow LDAP loadUser override (tucksaun) + * bug #19189 [Console] Fix formatting of SymfonyStyle::comment() (chalasr) + * bug #19211 [Form] fix post max size translation type extension for >= 2.8 (Tobion) + * bug #17822 [WIP] [Form] fix `empty_data` option in expanded `ChoiceType` (HeahDude) + * bug #19159 [WebProfilerBundle] Added a conflict for Http-Kernel < 3.1 (HeahDude) + * bug #19134 Distinguish between first and subsequent progress bar displays (rquadling) + * bug #19061 [FORM] fix post_max_size_message translation (alt. 2) (David Badura) + * bug #19100 [Console] Fixed SymfonyQuestionHelper multi-choice with defaults (sstok) + * bug #18924 [DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure (webmozart) + * bug #19138 [DomCrawler] No more exception on field name with strange format (guiled, fabpot) + * bug #18935 [Form] Consider a violation even if the form is not submitted (egeloen) + * bug #19127 [Form] Add exception to FormRenderer about non-unique block names (enumag) + * bug #19118 [Process] Fix pipes cleaning on Windows (nicolas-grekas) + * bug #19128 Avoid phpunit 5.4 warnings on getMock (2.7+) (iltar) + * bug #19120 [FrameworkBundle] templating can be fully disabled (xabbuh) + * bug #19114 [HttpKernel] Dont close the reponse stream in debug (nicolas-grekas) + * bug #19101 [Session] fix PDO transaction aborted under PostgreSQL (Tobion) + * bug #18501 [HttpFoundation] changed MERGE queries (hjkl) + * bug #19081 [YAML] Fixed parsing problem with nested DateTime lists (jkphl, xabbuh) + * bug #19062 [HttpFoundation] Fix UPSERT for PgSql >= 9.5 (nicolas-grekas) + * bug #18548 [Form] minor fixes in DateTime transformers (HeahDude) + * bug #18732 [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't (nykopol) + +* 3.1.1 (2016-06-15) + + * bug #19048 [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5 (nicolas-grekas) + * bug #19042 [Cache] Fix double fetch in ProxyAdapter (nicolas-grekas) + * bug #19038 Fix feature detection for IE (Alsciende) + * bug #18915 [DependencyInjection] force enabling the external XML entity loaders (xabbuh) + * bug #19020 [Form] Fixed collapsed choice attributes (HeahDude) + * bug #19028 [Yaml] properly count skipped comment lines (xabbuh) + * bug #19009 [WebProfilerBundle] Fix invalid CSS style (romainneutron) + * bug #17733 [Yaml] Fix wrong line number when comments are inserted in the middle of a block. (paradajozsef) + * bug #18909 Fixed singular of committee (peterrehm) + * bug #18911 Fixed singular of committee (peterrehm) + * bug #18971 Do not inject web debug toolbar on attachments (peterrehm) + * bug #18944 [Ldap] Fixed issue with legacy client initialisation (csarrazi) + * bug #18974 Added missing APCU CacheProvider of doctrine/cache 1.6.x (Carsten Eilers) + * bug #18954 [HttpKernel] Fix RequestDataCollector starting the session (romainneutron) + * bug #18949 [Security] Fix DebugAccessDecisionManager when object is not a scalar (romainneutron) + * bug #18959 [WebProfilerBundle] Fixed forwarded request data in templates (HeahDude) + * bug #18943 [Ldap][Security] The Ldap user provider abstract service now has the correct number of arguments (csarrazi) + * bug #18925 [Console] Fix BC break introduced by #18101 (dunglas) + * bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh) + * bug #18893 [DependencyInjection] Skip deep reference check for 'service_container' (RobertMe) + * bug #18812 Catch \Throwable (fprochazka) + * bug #18821 [Form] Removed UTC specification with timestamp (francisbesset) + * bug #18861 Fix for #18843 (inso) + +* 3.1.0 (2016-05-30) + + * bug #18889 [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments (chalasr) + * bug #18907 [Routing] Fix the annotation loader taking a class constant as a beginning of a class name (jakzal, nicolas-grekas) + * bug #18899 [Yaml] search for colons in strings only (xabbuh) + +* 3.1.0-RC1 (2016-05-26) + + * bug #18879 [Console] SymfonyStyle: Align multi-line/very-long-line blocks (chalasr) + * bug #18881 [Security][Ldap] Fixed issue with password attribute containing an array of values. (csarrazi) + * bug #18864 [Console][DX] Fixed ambiguous error message when using a duplicate option shortcut (peterrehm) + * bug #18883 Fix js comment in profiler (linnaea) + * feature #18867 [Cache] Drop counting hit/miss in ProxyAdapter (nicolas-grekas) + * bug #18837 [Serializer] AbstractObjectNormalizer: be sure that isAllowedAttribute is called (dunglas) + * bug #18838 [Serializer] ObjectNormalizer: add missing parameters (dunglas) + * bug #18844 [Yaml] fix exception contexts (xabbuh) + * bug #18840 [Yaml] properly handle unindented collections (xabbuh) + * bug #18765 Catch \Throwable (fprochazka) + * bug #18813 Catch \Throwable (fprochazka) + * bug #18839 People - person singularization (Keeo) + * bug #18820 [Config] Allow schemed paths in FileResource (nicolas-grekas) + * bug #18828 [Yaml] chomp newlines only at the end of YAML documents (xabbuh) + * bug #18814 Fixed server status command when port has been omitted (peterrehm) + * bug #18759 [Validator] Support for DateTimeImmutable (krzysiekpiasecki) + * bug #18799 Use levenshtein level for better Bundle matching (j0k3r) + * bug #18413 [WebProfilerBundle] Fix CORS ajax security issues (romainneutron) + +* 3.1.0-BETA1 (2016-05-13) + + * feature #18725 [Ldap] Added the possibility to configure all available Ldap options for connection (csarrazi) + * feature #18715 [FrameworkBundle] Default to Apcu+Filesystem cache chain (nicolas-grekas) + * feature #18184 [DomCrawler] Expose getter for uri (hason) + * feature #18654 [Bridge/Doctrine] Use better exception in the register mapping pass (dantleech) + * feature #18676 [HttpKernel] Add request method to logger messages (gnat42) + * feature #18716 [Cache] Add nonce based cache invalidation to ApcuAdapter (nicolas-grekas) + * feature #18762 [Translation] XLIFF Add `id` to meta data. (SpacePossum) + * feature #18689 [Cache] Add support for Predis, RedisArray and RedisCluster (nicolas-grekas) + * feature #18667 [FrameworkBundle] Semantic config for app/system/pool caches (tgalopin, nicolas-grekas) + * feature #18685 move event listener method type hint docs to @Event annotations defau… (Haehnchen) + * feature #18681 [Cache] Add DSN based Redis connection factory (nicolas-grekas) + * feature #18656 Updating the error message of an AuthenticationEntryPointInterface (weaverryan) + * feature #18069 [DoctrineBridge] deprecate `MergeDoctrineCollectionListener::onBind()` (HeahDude) + * feature #18492 [LDAP] Check whether an entry attribute exists (hiddewie) + * feature #18359 [Form] [DoctrineBridge] optimized LazyChoiceList and DoctrineChoiceLoader (HeahDude) + * feature #18357 [Form] Let `TextType` implement `DataTransformerInterface` (HeahDude) + * feature #18631 [FrameworkBundle] Add optional logger to cache pools (nicolas-grekas) + * feature #18597 [Cache] Add CacheItem::validateKey utility method (nicolas-grekas) + * feature #17660 [Serializer] Integrate the PropertyInfo Component (recursive denormalization and hardening) (mihai-stancu, dunglas) + * feature #18561 [FrameworkBundle] Fallback to default cache system in production for serializer (tgalopin) + * feature #18567 [FrameworkBundle][Serializer] Fix APC cache service name (tgalopin) + * feature #17959 [Serializer] Harden the ObjectNormalizer (dunglas) + * feature #18547 DX: better error message if factory class is empty (dbu) + * feature #18020 fix #17993 - Deprecated callable strings (hamza) + * feature #18487 [Cache] Add DoctrineProvider, for using PSR-6 pools in Doctrine Cache (nicolas-grekas) + * feature #18544 [FrameworkBundle] Fallback to default cache system in production for validation (tgalopin) + * feature #18416 [FrameworkBundle] Calls support for debug:container (JhonnyL) + * feature #18513 [Process] Turn getIterator() args to flags & add ITER_SKIP_OUT/ERR modes (nicolas-grekas) + * feature #18371 [FrameworkBundle] integrate the Cache component (xabbuh, nicolas-grekas) + * feature #18440 Add the kernel.controller_arguments event (stof) + * feature #18308 Added an ArgumentResolver with clean extension point (iltar, HeahDude) + * feature #18414 [Process] Implement IteratorAggregate to stream output (nicolas-grekas) + * feature #18144 [DI] Only rebuild autowiring cache when actually needed (weaverryan) + * feature #18386 [Process] Add InputStream to seamlessly feed running processes (nicolas-grekas) + * feature #18167 [DependencyInjection] Fix a limitation of the PhpDumper (Ener-Getick) + * feature #18387 [DX] [LDAP] Added default service name for the Security component's Ldap providers (csarrazi) + * feature #18290 [Translation] deprecate the backup feature (xabbuh) + * feature #18036 [Serializer] XmlEncoder: Make load flags configurable (dunglas) + * feature #17589 [WebProfilerBundle] [DX] Feature allow forward and redirection detection in wdt (HeahDude) + * feature #18260 Add Inflector component (from StringUtil of PropertyAccess) (teohhanhui) + * feature #18356 [FrameworkBundle] Deprecated form types as services (HeahDude) + * feature #17458 Add strict image validation (Koc) + * feature #18350 [Process] Accept Traversable input (nicolas-grekas) + * feature #18135 [Security] Deprecate onAuthenticationSuccess() (weaverryan) + * feature #18294 [Yaml] dump non UTF-8 encoded strings as binary data (xabbuh) + * feature #18215 [Cache] Add a Chain adapter (dunglas, nicolas-grekas) + * feature #18242 [FrameworkBundle][TwigBundle] Make EngineInterface autowirable (dunglas) + * feature #18197 Make Request::isFromTrustedProxy() public. (Peter Bex) + * feature #18211 [Security] Use auth trust resolver to determine anonymous in ContextListener (WouterJ) + * feature #18232 [Bridge\PhpUnit] Add "disabled" mode to SYMFONY_DEPRECATIONS_HELPER (nicolas-grekas) + * feature #18181 [PhpUnitBridge] Mock DNS functions (nicolas-grekas) + * feature #18176 [Cache] Restrict flushes to namespace scopes (nicolas-grekas) + * feature #18172 [Cache] Redis adapter (gcds, nicolas-grekas) + * feature #18101 [Console] Allow to register commands privately (Ener-Getick) + * feature #18143 [DomCrawler] Exposed getter for baseHref (AAstakhov) + * feature #18034 [FrameworkBundle] Deprecate absolute template paths (jakzal) + * feature #18105 [HttpFoundation] Add support for sending raw cookies in the response (jakzal) + * feature #17255 [Console] ApplicationTester - test stdout and stderr (SpacePossum) + * feature #18024 [Cache] Add namespace handling to all adapters (nicolas-grekas) + * feature #17734 [Cache] Count cache hits/misses in ProxyAdapter (nicolas-grekas) + * feature #17887 Show more information in the security profiler (javiereguiluz) + * feature #17642 [FrameworkBundle] [DX] Add `Controller::json` method to make it easy to send json (mcfedr) + * feature #17484 [FrameworkBundle][DX] Add Levenshtein suggesters to AbstractConfigCommand (kix) + * feature #17690 [FrameworkBundle] Use canBeEnabled() instead of canBeUnset() for consistency (Ener-Getick) + * feature #17714 Adding new TargetPathTrait to get/set the authentication "target_path" (weaverryan) + * feature #17852 Improved the logger panel when the log context is very long (javiereguiluz) + * feature #17761 [Console] Add non-auto column width functionality (akeeman) + * feature #17943 [Yaml] option to dump multi line strings as scalar blocks (xabbuh) + * feature #17553 [Validator] Added a format option to the DateTime constraint. (dosten) + * feature #17728 [Yaml] add option to dump objects as maps (xabbuh) + * feature #17863 [Yaml] add support for parsing the !!binary tag (xabbuh) + * feature #17738 [PropertyAccess] Throw an InvalidArgumentException when the type do not match (dunglas) + * feature #17531 [PropertyInfo] Use last version of reflection docblock (joelwurtz) + * feature #17782 Support autowiring for Doctrine\Common\Annotations\Reader (maryo) + * feature #17603 [Serializer] Add a normalizer that support JsonSerializable objects (mcfedr) + * feature #17630 [FrameworkBundle] Register the DateTimeNormalizer (dunglas) + * feature #17631 [FrameworkBundle] Register the DataUriNormalizer (dunglas) + * feature #17545 [Serializer] Add normalizer / denormalizer awarness (joelwurtz) + * feature #17877 [DependencyInjection] Improving autowiring error messages (weaverryan) + * feature #17732 [DEPRECATION] : deprecated support for Traversable in method ResizeFormListener::PreSubmit (ybensacq) + * feature #17721 [Cache] Add FilesystemAdapter (nicolas-grekas) + * feature #17836 [Yaml] support to parse and dump DateTime objects (xabbuh) + * feature #17809 [Yaml] deprecate starting plain scalars with characters (xabbuh) + * feature #17817 [Ldap] Add write support for the Ldap component (csarrazi) + * feature #17560 [Ldap] Improving the LDAP component (csarrazi) + * feature #17726 [FrameworkBundle] Improve debug:container command (voronkovich) + * feature #17743 [Yaml] dumper flag for enabling exceptions on invalid type (xabbuh) + * feature #17746 [Yaml] deprecate the Dumper::setIndentation() method (xabbuh) + * feature #17730 [Yaml] introduce flags to customize the parser behavior (xabbuh) + * feature #17125 Webprofiler add status code to search form (oktapodia) + * feature #17705 [TwigBridge] deprecate the boolean object support trigger (xabbuh) + * feature #17578 [Yaml] dump customization option with dumper flags (xabbuh) + * feature #17585 [DomCrawler] Abstract URI logic and crawl images (valeriangalliat) + * feature #17654 [Cache] Don't clone, serialize (nicolas-grekas) + * feature #16947 [FrameworkBundle] PropertyInfo: register the SerializerExtractor (dunglas) + * feature #17611 [HttpKernel] Deprecate passing objects as URI attributes to the ESI and SSI renderers (jakzal) + * feature #14288 [Console] Add getters for Application::$autoExit and $catchExceptions (VasekPurchart) + * feature #17504 [Console] Show code when an exception is thrown (maidmaid) + * feature #17540 [WebProfilerBundle] Add HTTP return code in the Ajax request list table (kucharovic) + * feature #17446 [Serializer] Add PSR-6 adapter (dunglas) + * feature #16917 [PropertyInfo] Cache support (dunglas) + * feature #17532 [Asset] Version as service (ewgRa) + * feature #17440 [Validator] Add a PSR-6 adapter (dunglas) + * feature #17113 [Serializer] Add a MaxDepth option (dunglas) + * feature #17530 [Cache] Handle and log errors properly (nicolas-grekas) + * feature #17522 [Cache] Use generator in ArrayAdapter (gcds) + * feature #16164 [Serializer] Add a data: URI normalizer (dunglas) + * feature #15279 Added {{ value }} message placeholder to UniqueEntityValidator (jperovic) + * feature #16652 [console] Add truncate method to FormatterHelper (mheki) + * feature #17438 [Cache] Allow and use generators in AbstractAdapter (nicolas-grekas) + * feature #17111 [HttpKernel] added a setter for the headers property in the HttpException (smatyas) + * feature #17132 [DependencyInjection] Properly ignore invalid reference arguments in collection arguments (ogizanagi) + * feature #17427 [Process] Allow a callback whenever the output is disabled (romainneutron) + * feature #17327 Added support links to exception and toolbar (peterrehm) + * feature #16909 Allows access to payload in callback validator (conradkleinespel) + * feature #17402 [Profiler] make it possible to omit the link var (xabbuh) + * feature #17411 [Serializer] Add a new DateTime normalizer (dunglas) + * feature #17462 [Yaml] deprecate parsing the !!php/object tag (xabbuh) + * feature #17408 [Cache] Symfony PSR-6 implementation (nicolas-grekas) + * feature #17323 [DependencyInjection] Deprecate unsupported attributes/elements for alias (Ener-Getick) + * feature #17305 [VarDumper] Add flags to allow fine tuning dumps representation (nicolas-grekas) + * feature #17318 [HttpFoundation] Allow to get all the mime types associated to a format in the Request (Ener-Getick) + * feature #17133 [DependencyInjection] Make YamlFileLoader raise a deprecation notice if a service definition contains unsupported keywords. (hhamon) + * feature #17191 [Serializer] Move the normalization logic in an abstract class (dunglas) + * feature #16994 [Form] Deprecate the "choices_as_values" option of ChoiceType (nicolas-grekas) diff --git a/vendor/symfony/symfony/CHANGELOG-3.2.md b/vendor/symfony/symfony/CHANGELOG-3.2.md new file mode 100644 index 0000000000000000000000000000000000000000..71a26930ea92b8abced9d5547087431c9adba873 --- /dev/null +++ b/vendor/symfony/symfony/CHANGELOG-3.2.md @@ -0,0 +1,457 @@ +CHANGELOG for 3.2.x +=================== + +This changelog references the relevant changes (bug and security fixes) done +in 3.2 minor versions. + +To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash +To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v3.2.0...v3.2.1 + +* 3.2.6 (2017-03-10) + + * bug #21930 [Cache] Cached files rely on umask (4rthem) + * bug #21946 Use PHPUnit 5.4 instead of 5.3 (j0k3r) + * bug #21936 [PropertyAccess] Use ArrayAdapter in debug mode (chalasr) + +* 3.2.5 (2017-03-09) + + * bug #21923 [travis] Test with hhvm 3.18 (nicolas-grekas) + * bug #21793 [Workflow] Fixed marking state on leave and enter events (HeahDude) + * bug #21912 [Yaml] dump escape sequences when possible (xabbuh) + * bug #21908 [Cache] Fix Redis pipelining/multi-ops (nicolas-grekas) + * bug #21823 dumpFile(), preserve existing file permissions (chs2) + * bug #21880 [Form] Fixed overridden choices option in extended choice types (HeahDude) + * bug #21896 [PHPunitBridge] Count @expectedDeprecation as an assertion (wouterj) + * bug #21865 [Security] context listener: hardening user provider handling (xabbuh) + * bug #21883 [HttpKernel] fix Kernel name when stored in a directory starting with a number (fabpot) + * bug #21841 [Console] Do not squash input changes made from console.command event (chalasr) + * bug #21481 [Form] Fixed empty conversion of Intl types (HeahDude) + * bug #21671 [Serializer] Xml encoder throws exception for valid data (gr1ev0us) + * bug #21805 Provide less state in getRequestFormat (dawehner) + * bug #21851 Adding use statement for InvalidArgumentException (Nyholm) + * bug #21832 [Routing] Ignore hidden directories when loading routes from annotations (jakzal) + * bug #21769 [Form] Improve rounding precision (foaly-nr1) + * bug #21825 [PhpUnitBridge] disable global test listener when not registered (xabbuh) + * bug #21267 [Form] Fix ChoiceType to ensure submitted data is not nested unnecessarily (issei-m) + * bug #21813 Update phpstorm helper to the official format (pierredup) + * bug #21731 Fix emacs link (rubenrua) + * bug #21802 Fix issues reported by static analyse (romainneutron) + * bug #21800 Fix issues reported by static analyze (romainneutron) + * bug #21782 [DependencyInjection] add missing dumped private services list in a container frozen constructor. (hhamon) + * bug #21798 Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)" (xabbuh) + * bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh) + * bug #21776 [Process] Fix ignoring of bad env var names (nicolas-grekas) + * bug #21787 [PhpUnitBridge] do not register the test listener twice (xabbuh) + * bug #21756 [Yaml] Stop replacing NULLs when merging (gadelat) + * bug #21689 [WebServerBundle] fixed html attribute escape (Seb33300) + * bug #21722 [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported (maidmaid) + * bug #21679 [SecurityBundle] fix priority ordering of security voters (xabbuh) + * bug #21656 [DoctrineBridge] Fixed validating custom doctrine type columns (dmaicher) + * bug #21115 [Validator] do not guess getter method names (xabbuh) + * bug #21670 [DependencyInjection] Fix autowiring types when there are more than 2 services colliding (GuilhemN) + * bug #21665 [DependencyInjection] Fix autowiring collisions detection (nicolas-grekas, GuilhemN) + * bug #21661 Fix Composer constraints (fabpot) + * bug #21582 [HttpCache] purge both http and https from http cache (dbu) + * bug #21637 [FrameworkBundle] remove translation data collector when not usable (xabbuh) + * bug #21647 [Yaml] consistently parse omitted keys as the colon (xabbuh) + +* 3.2.4 (2017-02-16) + + * bug #21634 [VarDumper] Added missing persistent stream cast (lyrixx) + * bug #21436 [DependencyInjection] check for circular refs caused by method calls (xabbuh) + * bug #21400 [Serializer] fix upper camel case conversion (see #21399) (markusu49) + * bug #21599 [Console][Table] fixed render when using multiple rowspans. (aitboudad) + * bug #21613 [Process] Permit empty suffix on Windows (Bilge) + * bug #21057 [DI] Auto register extension configuration classes as a resource (ro0NL) + * bug #21607 Improve tracking of environment variables in the case of private services (tgalopin) + * bug #21592 [Validator] property constraints can be added in child classes (angelk, xabbuh) + * bug #21458 [Config] Early return for DirectoryResource (robfrawley) + * bug #21562 [DoctrineBridge] make sure that null can be the invalid value (xabbuh) + * bug #21556 [FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap (nicolas-grekas) + * bug #21584 [WebProfilerBundle] Readd Symfony version status in the toolbar (wouterj) + * bug #21557 [VarDumper] Improve dump of AMQP* Object (lyrixx) + * bug #21579 [Security] LdapUserProvider should not throw an exception if the UID key does not exist in an LDAP entry (csarrazi) + * bug #21552 [FrameworkBundle] Fix annotations cache folder path (akeeman) + * bug #21542 [VarDumper] Fixed dumping of terminated generator (lyrixx) + * bug #21292 Ignore missing 'debug.file_link_formatter' service in Debug bundle (core23) + +* 3.2.3 (2017-02-06) + + * bug #21528 [Cache] Fix class exists checks in PhpArrayAdapter (nicolas-grekas) + * bug #20844 [Config] Fix checking cache for non existing meta file (hason) + * bug #21063 [Form] Fixed DateType format option for single text widget (HeahDude) + * bug #21430 Casting TableCell value to string. (jaydiablo) + * bug #21359 [FrameworkBundle] fixed custom domain for translations in php templates (robinlehrmann) + * bug #21485 [Process] Non ASCII characters disappearing during the escapeshellarg (GuillaumeVerdon) + * bug #21370 [FrameworkBundle] Execute the PhpDocExtractor earlier (GuilhemN) + * bug #21462 [BrowserKit] ignore invalid cookies expires date format (xabbuh) + * bug #21438 [Console] Fix TableCell issues with decoration (ogizanagi) + * bug #21431 [DoctrineBridge] always check for all fields to be mapped (xabbuh) + * bug #21360 [PropertyAccess] Handle interfaces in the invalid argument exception (fancyweb) + * bug #21403 [DI] Fix defaults overriding empty strings in AutowirePass (nicolas-grekas) + * bug #21401 [Debug] Workaround "null" $context (nicolas-grekas) + * bug #21381 [FrameworkBundle] Dont wire "annotations.cached_reader" before removing passes (nicolas-grekas) + * bug #21387 Fix double escaping of the decision attributes in the profiler (stof) + * bug #21372 [DependencyInjection] Fixed variadic method parameter in autowired classes (brainexe) + * bug #21338 [Cache] Fix tags expiration (nicolas-grekas) + * bug #21333 [HttpKernel] Fix ArgumentValueResolver for arguments default null (chalasr) + * bug #20871 [HttpKernel] Give higher priority to adding request formats (akeeman) + * bug #21332 [PropertyInfo] Don't try to access a property thru a static method (dunglas) + * bug #21336 [PhpUnit] Blacklist DeprecationErrorHandler in stack traces (nicolas-grekas) + * bug #21331 [PropertyInfo] Exclude static methods form properties guessing (dunglas) + * bug #21280 [Workflow] Fixed support of multiple transitions with the same name. (lyrixx) + * bug #21271 [Workflow] Added new validator to make sure each place has unique translation names (Nyholm) + * bug #21323 [Cache] [PdoAdapter] Fix MySQL 1170 error (blob as primary key) (akeeman) + * bug #21318 Don't add csp-headers if none are required (arjenm) + * bug #21291 [Ldap] Ldap username case fix (quentinus95) + * bug #21311 [Debug] Fix fatal error when changing ErrorHandler loggers if an exception is buffered (skalpa) + * bug #21288 [Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys (dmaicher, HeahDude) + * bug #21285 [TwigBundle] do not lose already set method calls (xabbuh) + * bug #21279 #20411 fix Yaml parsing for very long quoted strings (RichardBradley) + * bug #21276 [Cache] Fix missing use statement in FilesystemAdapter (Lctrs) + * bug #21269 [Cache] Using strpbrk() instead of strcspn() is faster (nicolas-grekas) + +* 3.2.2 (2017-01-12) + + * bug #21257 [Profiler][Form] Fix form profiler errors profiler_dump (ogizanagi) + * bug #21243 [FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers (nicolas-grekas, mpajunen) + * bug #21218 [Form] DateTimeToLocalizedStringTransformer does not use timezone when using date only (magnetik) + * bug #20605 [Ldap] Always have a valid connection when using the EntryManager (bobvandevijver) + * bug #21104 [FrameworkBundle] fix IPv6 address handling in server commands (xabbuh) + * bug #20793 [Validator] Fix caching of constraints derived from non-serializable parents (uwej711) + * bug #19586 [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account (wesleylancel) + * bug #21237 [FrameworkBundle] Fix relative paths used as cache keys (nicolas-grekas) + * bug #21183 [Validator] respect groups when merging constraints (xabbuh) + * bug #21179 [TwigBundle] Fixing regression in TwigEngine exception handling (Bertalan Attila) + * bug #21220 [DI] Fix missing new line after private alias (ogizanagi) + * bug #21211 Classloader tmpname (lyrixx) + * bug #21205 [TwigBundle] fixed usage when Templating is not installed (fabpot) + * bug #21155 [Validator] Check cascasdedGroups for being countable (scaytrase) + * bug #21200 [Filesystem] Check that directory is writable after created it in dumpFile() (chalasr) + * bug #21186 [Bridge/PhpUnit] Relax expectedDeprecation for forward compat (nicolas-grekas) + * bug #21184 [FrameworkBundle] Remove Response* from classes to compile (nicolas-grekas) + * bug #21165 [Serializer] int is valid when float is expected when deserializing JSON (dunglas) + * bug #21167 [Cache] Remove silenced warning tiggered by PhpArrayAdapter (nicolas-grekas) + * bug #21166 [Cache] Fix order of writes in ChainAdapter (nicolas-grekas) + * bug #21113 [FrameworkBundle][HttpKernel] Fix resources loading for bundles with custom structure (chalasr) + * bug #20995 [DependencyInjection] Fix the priority order of compiler pass trait (francoispluchino) + * bug #21084 [Yaml] handle empty lines inside unindented collection (xabbuh) + * bug #21143 [PhpUnitBridge] Set COMPOSER_ROOT_VERSION while installing (nicolas-grekas) + * bug #20925 [HttpFoundation] Validate/cast cookie expire time (ro0NL) + * bug #21138 [PhpUnitBridge] skip tests with failure and error states too (xabbuh) + * bug #21135 [PhpUnitBridge] hide stack trace of expected deprecation failures (xabbuh) + * bug #21117 [Yaml] add missing indicator character (xabbuh) + * bug #21121 [PhpUnitBridge] respect skipped and incomplete tests (xabbuh) + * bug #21032 [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService (lyrixx) + * bug #21078 [Console] Escape default value when dumping help (lyrixx) + * bug #21076 [Console] OS X Can't call cli_set_process_title php without superuser (ogizanagi) + * bug #20900 [Console] Descriptors should use Helper::strlen (ogizanagi) + * bug #21025 [Cache] remove is_writable check on filesystem cache (4rthem) + * bug #21064 [Debug] Wrap call to ->log in a try catch block (lyrixx) + * bug #21069 [Debug] Fixed cast of stream (lyrixx) + * bug #21010 [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes (SpacePossum) + * bug #20991 [cache] Bump RedisAdapter default timeout to 5s (Nicofuma) + * bug #20959 [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer (fancyweb) + * bug #20795 [FrameworkBundle] Allow multiple transitions with the same name (Padam87) + * bug #20859 Avoid warning in PHP 7.2 because of non-countable data (wouterj) + * bug #21053 [Validator] override property constraints in child class (xabbuh) + * bug #21034 [FrameworkBundle] Make TemplateController working without the Templating component (dunglas) + * bug #20970 [Console] Fix question formatting using SymfonyStyle::ask() (chalasr, ogizanagi) + * bug #20999 [HttpKernel] Continuation of #20599 for 3.1 (ro0NL) + * bug #20975 [Form] fix group sequence based validation (xabbuh) + * bug #20599 [WebProfilerBundle] Display multiple HTTP headers in WDT (ro0NL) + * bug #20799 [TwigBundle] do not try to register incomplete definitions (xabbuh) + * bug #20961 [Validator] phpize default option values (xabbuh) + * bug #20934 [FrameworkBundle] Fix PHP form templates on translatable attributes (ro0NL) + * bug #20957 [FrameworkBundle] test for the Validator component to be present (xabbuh) + * bug #20936 [DependencyInjection] Fix on-invalid attribute type in xsd (ogizanagi) + * bug #20931 [VarDumper] Fix dumping by-ref variadics (nicolas-grekas) + * bug #20749 [FrameworkBundle] Smarter default for framework.annotations (ogizanagi) + * bug #20734 [Security] AbstractVoter->supportsAttribute gives false positive if attribute is zero (0) (martynas-foodpanda) + * bug #14082 [config] Fix issue when key removed and left value only (zerustech) + * bug #20910 [HttpFoundation] Fix cookie to string conversion for raw cookies (ro0NL) + * bug #20909 Fix misresolved parameters in debug:config on 3.2 (chalasr) + * bug #20904 [TwigBundle] Config is now a hard dependency (dunglas) + * bug #20847 [Console] fixed BC issue with static closures (araines) + +* 3.2.1 (2016-12-13) + + * bug #20891 Add support for REDIS_URL environment variables. (robinvdvleuten) + * bug #20724 [WebProfilerBundle] Fix AJAX panel with fetch requests (OnekO) + * bug #20883 Don’t compile when Opcache is not enabled on CLI (ruudk) + * bug #20877 DateIntervalType: 'invert' should not inherit the 'required' option (galeaspablo) + * bug #20886 [Form] DateIntervalType: Do not try to translate choices (ogizanagi) + * bug #20855 [Yaml] do not trigger deprecations for valid YAML (xabbuh) + * bug #20714 [FrameworkBundle] Fix unresolved parameters from default configs in debug:config (chalasr) + * bug #20862 Allow simple-phpunit to be used with an HTTP proxy (Cydonia7) + * bug #20882 [TwigBridge] fix constructor args check (xabbuh) + * bug #20860 [WebProfilerBundle] Fix a web profiler form issue with fields added to the form after the form was built (tgalopin) + * bug #20442 [FrameworkBundle] Bundle commands are not available via find() (julienfalque) + * bug #20840 [WebProfilerBundle] add dependency on Twig (xabbuh) + * bug #20833 [HttpKernel] Fix open_basedir compat in DataCollector (nicolas-grekas) + * bug #20828 [Validator] Fix init of YamlFileLoader::$classes for empty files (nicolas-grekas) + * bug #20688 [FrameworkBundle] Resolve env params in debug:config command (nicolas-grekas) + * bug #20725 [HttpKernel] Fix annotation cache warmer with failing or missing classes (nicolas-grekas) + * bug #20830 [FrameworkBundle] Fix validation cache warmer with failing or missing classes (nicolas-grekas) + * bug #20760 [FrameworkBundle] [Workflow] Fix service marking store configuration (fduch) + * bug #20745 [Validator] add class name to the cache key (Simperfit) + * bug #20530 [Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize (dunglas) + * bug #19141 Throw less misleading exception when property access not found (bramtweedegolf) + * bug #20539 Cast result to int before adding to it (alcaeus) + * bug #20831 [Twig] Fix deprecations with Twig 1.29 (nicolas-grekas) + * bug #20701 Ignore missing 'debug.file_link_formatter' service in Debug and Twig bundles (mbabker) + * bug #20816 [FrameworkBundle] Removed kernel.debug from the cache pool namespace seed (Sander Toonen) + * bug #20769 [Bridge\Twig] Trigger deprecation when using FormExtension::$renderer (nicolas-grekas) + * bug #20646 Maintain the selected panel when redirecting to another profile (javiereguiluz) + * bug #20767 [Cache] Fix dumping SplDoublyLinkedList iter mode (nicolas-grekas) + * bug #20690 [Serializer] Fix argument object denormalization (ogizanagi) + * bug #20762 [Form] Fix FormDataCollector (nicolas-grekas, Padam87) + * bug #20747 [HttpKernel] Fixed RequestDataCollector handling of null header values. (Gabriel Moreira) + * bug #20727 [TwigBundle] Inject project root path into twig filesystem loader (4rthem) + * bug #20736 [Console] fixed PHP7 Errors when not using Dispatcher (keradus) + * bug #20756 [HttpKernel] Regression test for missing controller arguments (iltar) + * bug #20755 [HttpKernel] Regression test for missing controller arguments (iltar) + * bug #20732 fix the inline level for dumped multi-line strings (xabbuh) + * bug #20418 [Form][DX] FileType "multiple" fixes (yceruto) + * bug #19902 [DependencyInjection] PhpDumper.php: hasReference() shouldn't search references in lazy service. (antanas-arvasevicius) + * bug #20704 [Console] Fix wrong handling of multiline arg/opt descriptions (ogizanagi) + * bug #20700 [WebProfilerBundle][Translator] Fix TranslationDataCollector should use cloneVar (ogizanagi) + * bug #20712 [TwigBundle] Fix twig loader registered twice (ogizanagi) + * bug #20716 [WebProfilerBundle] Fix dump block is unfairly restrained (ogizanagi) + * bug #20717 Fix hide button in toolbar (nicolasdewez) + +* 3.2.0 (2016-11-30) + + * bug #20687 [FrameworkBundle] Forbid env parameters in routing configuration (nicolas-grekas) + * bug #20607 [Validator] Bring egulias/email-validator ~2.0 to parity with ~1.2 (Lctrs) + * bug #20671 [Config] ConfigCache::isFresh() should return false when unserialize() fails (nicolas-grekas) + * bug #20679 [VarDumper] Use default color for ellipsed namespaces/paths (nicolas-grekas) + * bug #20676 [ClassLoader] Use only forward slashes in generated class map (nicolas-grekas) + * bug #20664 [Validator] ensure the proper context for nested validations (xabbuh) + * bug #20661 bug #20653 [WebProfilerBundle] Profiler includes ghost panels (jzawadzki) + * bug #20652 Fixed getRouteParams() when no parameters are available (wouterj) + +* 3.2.0-RC2 (2016-11-27) + + * bug #20601 [FrameworkBundle] Don't rely on any parent definition for "cache.annotations" (nicolas-grekas) + * bug #20638 Fix legacy tests that do not trigger any depreciation (julienfalque) + * bug #20374 [FrameworkBundle] Improve performance of ControllerNameParser (enumag) + * bug #20474 [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name (fancyweb) + * bug #20616 [Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace (nicolas-grekas) + * bug #20566 [DI] Initialize properties before method calls (ro0NL) + * bug #20583 [Workflow] Fixed graphviz dumper for state machine (lyrixx) + * bug #20621 [HttpKernel] Fix exception when serializing request attributes (nicolas-grekas) + * bug #20609 [DI] Fixed custom services definition BC break introduced in ec7e70fb… (kiler129) + * bug #20598 [DI] Aliases should preserve the aliased invalid behavior (nicolas-grekas) + * bug #20600 [Process] Fix process continuing after reached timeout using getIterator() (chalasr) + * bug #20603 [HttpKernel] Deprecate checking for cacheable HTTP methods in Request::isMethodSafe() (nicolas-grekas) + * bug #20602 [HttpKernel] Revert BC breaking change of Request::isMethodSafe() (nicolas-grekas) + * bug #20610 [FrameworkBundle] Add framework.cache.prefix_seed for predictible cache key prefixes (nicolas-grekas) + * bug #20595 [WebProfilerBundle] Fix deprecated uses of profiler_dump (nicolas-grekas) + * bug #20589 [SecurityBundle] Fix FirewallConfig nullable arguments (ogizanagi) + * bug #20590 [DI] Allow null as default env value (sroze) + * bug #20499 [Doctrine][Form] support large integers (xabbuh) + * bug #20559 [FrameworkBundle] Avoid warming up the validator cache for non-existent class (Seldaek) + * bug #20576 [Process] Do feat test before enabling TTY mode (nicolas-grekas) + * bug #20577 [FrameworkBundle] Mark cache.default_*_provider services private (nicolas-grekas) + * bug #20550 [YAML] Fix processing timestamp strings with timezone (myesain) + * bug #20543 [DI] Fix error when trying to resolve a DefinitionDecorator (nicolas-grekas) + * bug #20544 [PhpUnitBridge] Fix time-sensitive tests that use data providers (julienfalque) + +* 3.2.0-RC1 (2016-11-17) + + * feature #20533 [DI] Revert "deprecate get() for uncompiled container builders" (nicolas-grekas) + * bug #20525 [TwigBundle] Give some love to exception pages (nicolas-grekas) + * bug #20484 bumped min version of Twig to 1.28 (fabpot) + * bug #20512 [DI] Fix accepting null as default env param value (nicolas-grekas) + * bug #20519 [Debug] Remove GLOBALS from exception context to avoid endless recursion (Seldaek) + * bug #20455 [ClassLoader] Fix ClassCollectionLoader inlining with __halt_compiler (giosh94mhz) + * bug #20307 [Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds (LuisDeimos) + * bug #20432 [FrameworkBundle] Add --no-prefix option to translation:update (chalasr) + * bug #20480 [FrameworkBundle] Register the ArrayDenormalizer (dunglas) + * bug #20286 [Serializer] Fix DataUriNormalizer's regex (dunglas) + * bug #20466 [Translation] fixed nested fallback catalogue using multiple locales. (aitboudad) + * bug #20465 [#18637][TranslationDebug] workaround for getFallbackLocales. (aitboudad) + * bug #20453 [Cache] Make directory hashing case insensitive (nicolas-grekas) + * bug #20428 [TwigBundle] fixed template root path (fabpot) + * feature #20447 [DI] Force env params to be string|null (nicolas-grekas) + * feature #20451 [Workflow] Added Definition builder (Nyholm) + * bug #20460 [FrameworkBundle] Fixed WorkflowCommand to support state machines (HeahDude) + * bug #20440 [TwigBridge][TwigBundle][HttpKernel] prefer getSourceContext() over getSource() (xabbuh) + * feature #19629 [Workflow] Make the Workflow support State Machines (Nyholm, lyrixx) + * bug #20287 Properly format value in UniqueEntityValidator (alcaeus) + * bug #20422 [Translation][fallback] add missing resources in parent catalogues. (aitboudad) + * bug #20378 [Form] Fixed show float values as choice value in ChoiceType (yceruto) + * feature #20416 [Bridge\Monolog][FrameworkBundle] Add & wire a DebugProcessor (nicolas-grekas) + * bug #20415 [DI][Serializer] Add missing deprecations (nicolas-grekas) + * bug #20294 Improved the design of the metrics in the profiler (javiereguiluz) + * bug #20375 [HttpFoundation][Session] Fix memcache session handler (klandaika) + * bug #20377 [Console] Fix infinite loop on missing input (chalasr) + * feature #20232 [DependencyInjection] fixed ini file values conversion (fabpot) + * feature #19490 [SecurityBundle] Integrate current firewall in Profiler (chalasr) + * feature #19398 [DX][SecurityBundle] Introduce a FirewallConfig class accessible from FirewallContext (chalasr) + * bug #20336 [HttpKernel] Base DataCollector throws warning on unsupported scheme strings (ogizanagi) + * bug #20335 [Yaml] Fix String offset cast error in Inline parser (romainneutron) + * bug #20372 [Console] simplified code (fabpot) + * bug #20342 [Form] Fix UrlType transforms valid protocols (ogizanagi) + * bug #20341 Fix YamlReferenceDumper unnamed nested prototypes (ogizanagi) + * bug #20292 Enhance GAE compat by removing some realpath() (nicolas-grekas) + * bug #20325 [VarDumper] Fix source links to Twig files (nicolas-grekas) + * bug #20328 [Console] Fix empty COLUMNS/LINES env vars (nicolas-grekas) + * bug #20326 [VarDumper] Fix dumping Twig source in stack traces (nicolas-grekas) + * bug #20321 Compatibility with Twig 1.27 (xkobal) + +* 3.2.0-BETA1 (2016-10-27) + + * feature #19973 Added a default ide file link web view (jeremyFreeAgent) + * feature #20285 [TwigBundle] made Twig cache independent of the project root directory (fabpot) + * feature #20266 [Console] rename Command::private to Command::hidden (xabbuh) + * feature #20270 [PhpUnitBridge] Drop ErrorAssert (nicolas-grekas) + * feature #20256 [PhpUnitBridge] Allow configuring removed deps and phpunit versions (nicolas-grekas) + * feature #20255 [PhpUnitBridge] Replace ErrorAssert by `@expectedDeprecation` (nicolas-grekas) + * feature #20047 [Form] Change FormTypeGuesserChain to accept Traversable (enumag) + * feature #19982 [Validator] Allow validating multiple groups in one GroupSequence step (enumag) + * feature #19741 [ExpressionLanguage] Making cache PSR6 compliant (Alexandre GESLIN) + * feature #20217 [Serializer] Support specifying format for DateTimeNormalizer::denormalize (teohhanhui) + * feature #19452 Remove the new SecurityUserValueResolver (weaverryan) + * feature #15002 [DoctrineBridge] Add a way to select the repository used by the UniqueEntity validator (ogizanagi) + * feature #20113 Use the method map as authoritative list of factories for dumped containers (stof) + * feature #19576 [WebProfiler] added support for window.fetch calls in ajax section (ivoba) + * feature #19991 [TwigBridge] Added access to token from twig AppVariable (HeahDude) + * feature #20029 Hide commands from ApplicationDescriptor, but allow invoking (jwdeitch, Jordan Deitch) + * feature #20121 Class existence resource (fabpot) + * feature #20119 [TwigBundle] changed the runtime loader to return null if there is no match (fabpot) + * feature #20093 Twig extensions refatoring to decouple definitions from implementations (fabpot) + * feature #20094 added Twig runtimes for "critical" Twig extensions (fabpot) + * feature #20097 [FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle (fabpot) + * feature #20019 [FrameworkBundle] Add phpstorm ide (hason) + * feature #20092 added a Twig runtime loader (fabpot) + * feature #20075 [FrameworkBundle] removed the Security Core and Security CSRF component dependencies on FrameworkBundle (fabpot) + * feature #20072 [FrameworkBundle] removed the Templating component dependency on FrameworkBundle (fabpot) + * feature #20070 [FrameworkBundle] removed the Translation component dependency on FrameworkBundle (fabpot) + * feature #20067 [FrameworkBundle] removed the Asset component dependency on FrameworkBundle (fabpot) + * feature #20037 [Cache] Handle arbitrary key length when the backend cant using hashing (nicolas-grekas) + * feature #20040 [Bridge/PhpUnit] Handle native E_DEPRECATED (nicolas-grekas) + * feature #19987 [VarDumper] Use ClassStub for reflected types (nicolas-grekas) + * feature #20012 [Translation] added Base Exception for the component. (aitboudad) + * feature #19996 removed obsolete images (since 2.2) (fabpot) + * feature #19997 inlined some CSS (fabpot) + * feature #19304 [Yaml] fix parsing multi-line mapping values (xabbuh) + * feature #19191 [DependencyInjection] Automatically detect the definitions class when possible (Ener-Getick) + * feature #19745 [Validator] Added context object method callback to choice validator (Peter Bouwdewijn) + * feature #19614 [HttpKernel] Use VarDumper in the profiler (wouterj, nicolas-grekas) + * feature #19480 [Config] Fix (Yaml|Xml)ReferenceDumper for nested prototypes (ogizanagi) + * feature #19681 [DI] Allow injecting ENV parameters at runtime using env(MY_ENV_VAR) (nicolas-grekas) + * feature #19197 [Serializer][FrameworkBundle] Add a CSV encoder (dunglas) + * feature #19257 [Validator][Choice] Make strict the default option for choice validation (peterrehm) + * feature #19326 [Serializer][FrameworkBundle] Add a YAML encoder (dunglas) + * feature #19484 [PropertyInfo] Extract the logic converting a php doc to a Type (Ener-Getick) + * feature #19495 [master][console] Allow multiple options to be set. (SpacePossum) + * feature #19584 [DependencyInjection] Improve ParameterNotFoundException when accessing a nested parameter (wouterj) + * feature #19485 [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter (tgalopin) + * feature #19790 [FrameworkBundle] add support for prioritizing form type extension tags (dmaicher) + * feature #19507 [FrameworkBundle] Introduce a cache warmer for Serializer based on PhpArrayAdapter (tgalopin) + * feature #19734 [HttpFoundation] Deprecate extending some methods (Ener-Getick) + * feature #19795 Replace count with a given number out of the box (bocharsky-bw) + * feature #19807 [FrameworkBundle] Add debug.file_link_format with remapping for IDE links (nicolas-grekas) + * feature #19891 [FrameworkBundle] Add cache:pool:clear command (nicolas-grekas) + * feature #19900 [FrameworkBundle] Add CachePoolClearerPass for weak cache pool refs in cache clearers (nicolas-grekas) + * feature #19570 [Config] Fix YamlReferenceDumper prototyped array support (ogizanagi) + * feature #19824 [Console] Add ability to regress the ProgressBar (jameshalsall) + * feature #19892 [DI] Add corresponding service id in some exception messages (nicolas-grekas) + * feature #19843 [Security] Allow run-time configuration of hash algo (nicolas-grekas) + * feature #19894 [Cache] Add "persistent_id" option to RedisAdapter::createConnection() (nicolas-grekas) + * feature #19915 [Bridge/PhpUnit] Add bin/simple-phpunit wrapper (=phpunit - yaml - prophecy) (nicolas-grekas) + * feature #19826 [VarDumper] Add ClassStub for clickable & shorter PHP identifiers (nicolas-grekas) + * feature #19816 [VarDumper] Add LinkStub to create links in HTML dumps (nicolas-grekas) + * feature #19768 [VarDumper] Enhance dumping arguments in stack traces (nicolas-grekas) + * feature #19796 [VarDumper] Make the line clickable to toggle dumps (nicolas-grekas) + * feature #19764 [Config] Add ExprBuilder::ifEmpty() (ogizanagi) + * feature #19797 [VarDumper] Handle attributes in Data clones for more semantic dumps (nicolas-grekas) + * feature #19755 [VarDumper] Get dump as string with `$dumper->dump(..., true);` (nicolas-grekas) + * feature #19604 [Routing] Add seamless support for unicode requirements (nicolas-grekas) + * feature #19714 [VarDumper] Handle "title" attribute on virtual properties (nicolas-grekas) + * feature #19687 [FrameworkBundle] Use relative paths in templates paths cache (tgalopin) + * feature #19339 [WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errors (yceruto) + * feature #19519 [Cache] Add PDO + Doctrine DBAL adapter (nicolas-grekas) + * feature #19672 [VarDumper] Allow dumping subparts of cloned Data structures (nicolas-grekas) + * feature #19657 [VarDumper] Add line in trace indexes (nicolas-grekas) + * feature #19639 [Routing] Generate URLs in compliance with PHP_QUERY_RFC3986 (jameshalsall) + * feature #19568 [Debug] Better error handling (lyrixx) + * feature #19552 [HttpFoundation] Add named constructor on JsonResponse (tyx) + * feature #19630 [VarDumper] Enhance dumping __PHP_Incomplete_Class objects (nicolas-grekas) + * feature #19515 [Cache] Drop TaggedCacheItemInterface (nicolas-grekas) + * feature #19511 Use a dedicated exception in the file locator (leofeyer) + * feature #19529 Add Yaml::PARSE_EXCEPTION_ON_DUPLICATE to throw exceptions on duplicates (Alex Pott) + * feature #19473 [Security] Expose the required roles in AccessDeniedException (Nicofuma) + * feature #19524 [Cache] Add generic TagAwareAdapter wrapper (replaces TagAwareRedisAdapter) (nicolas-grekas) + * feature #19504 [Yaml] deprecate missing space after mapping key colon (xabbuh) + * feature #19430 [DomCrawler] Add support for XPath expression evaluation (jakzal) + * feature #19205 [HttpKernel] Allow bundles to declare classes and annotated classes to compile using patterns (tgalopin) + * feature #18533 [FrameworkBundle] Wire PhpArrayAdapter with a new cache warmer for annotations (tgalopin) + * feature #17498 [Filesystem] Add a cross-platform readlink method (tgalopin) + * feature #19289 [VarDumper] Dumping exceptions is now more compact (nicolas-grekas) + * feature #19276 [ClassLoader] Add ClassCollectionLoader::inline() to generate inlined-classes files (nicolas-grekas) + * feature #19325 [FrameworkBundle] Allow to specify a domain when updating translations (antograssiot) + * feature #19277 [Serializer] Argument objects (theofidry, dunglas) + * feature #19322 [HttpFoundation] Add Request::isMethodIdempotent method (dunglas) + * feature #18510 Added a SecurityUserValueResolver for controllers (iltar) + * feature #19203 [Bridge/Doctrine] Reset the EM lazy-proxy instead of the EM service (nicolas-grekas) + * feature #19236 [FrameworkBundle] Deprecate the service serializer.mapping.cache.doctrine.apc (Ener-Getick) + * feature #19174 [FrameworkBundle] Show server:run logs by default (nicolas-grekas) + * feature #19137 [Serializer] Allow to use easily static constructors (Ener-Getick) + * feature #19146 [DependencyInjection] deprecate access to private shared services. (hhamon) + * feature #19190 [DependencyInjection] Add support for short services configurators syntax (voronkovich) + * feature #18823 [Cache] Add PhpArrayAdapter to use shared memory on PHP 7.0 (tgalopin) + * feature #18948 [VarDumper] Add maxDepth & maxStringLength display options (MGDSoft, nicolas-grekas) + * feature #18626 [Yaml] Added support for parsing PHP constants (HeahDude) + * feature #19104 Adds support for the SameSite attribute in cookies. (iangcarroll) + * feature #19153 [Validator] support egulias/email-validator 2.x (xabbuh) + * feature #11394 [Routing] support for array values in route defaults (xabbuh) + * feature #11882 [Workflow] Introducing the workflow component (fabpot, lyrixx) + * feature #19151 [VarDumper] Add support for XmlReader objects (Taluu) + * feature #18471 [Console] Add Lockable trait (geoffrey-brier) + * feature #19139 [FrameworkBundle][Yaml] Move YamlLintCommand to the Yaml component (chalasr) + * feature #19143 Response headers fix (fabpot) + * feature #16809 [Form][FrameworkBundle][Bridge] Add a DateInterval form type (MisatoTremor) + * feature #18466 [Bridge][Twig] Optionally pass dumper into DumpExtension (CarsonF) + * feature #18022 [DependencyInjection] Sort the CompilerPass by priority (Ener-Getick) + * feature #19090 [Console] Add ConsoleLogger::hasErrored() (nicolas-grekas) + * feature #19079 [Debug] Do not quote numbers in stack trace (c960657) + * feature #19012 [Console] progress bar fix (TomasVotruba, fabpot) + * feature #19047 [Cache] Add tags based invalidation + TagAwareRedisAdapter (nicolas-grekas) + * feature #17644 Deprecate using Form::isValid() with an unsubmitted form (Ener-Getick) + * feature #12979 [Router] added appending of new optional document fragment (rodnaph) + * feature #18710 [Console] Simplify simulation of user inputs in CommandTester (chalasr) + * feature #18999 [Console] Centralize input stream in base Input class (chalasr) + * feature #19060 [ExpressionLanguage] Add a way to hook on each node when dumping the AST (nicolas-grekas) + * feature #18880 [PhpUnitBridge] add a triggered errors assertion helper (xabbuh) + * feature #16906 [Console] Better support for one command app (lyrixx) + * feature #17203 Move Constraint validator test case to Test namespace (WouterJ) + * feature #18502 [FrameworkBundle] Add file helper to Controller (dfridrich) + * feature #19053 [Process] Allow inheriting env vars instead of replacing them (nicolas-grekas) + * feature #18833 [HttpKernel] Move duplicated logic from Esi/Ssi to an AbstractSurrogate (chalasr) + * feature #18220 Don't send default cache header for 301 redirects (e-moe) + * feature #17662 [Translation][transChoice] allows escaping the pipe character. (aitboudad) + * feature #18322 [DomCrawler] Attach label to form fields (carlosV2) + * feature #18482 Created a trait to sort tagged services (iltar) + * feature #15458 [Filesystem] Add feature to create hardlinks for files (andrerom) + * feature #18940 [Console] Add path argument to dump a specific option in debug:config (chalasr) + * feature #19013 [ExpressionLanguage] Added a way to dump the AST (lyrixx) + * feature #18332 [Form] added `CallbackChoiceLoader` and refactored ChoiceType's children (HeahDude) + * feature #18869 [Routing] Throw exception when PHP start tag is missing (WouterJ) + * feature #18781 [Console] Display errors in quiet mode (multi-io) + * feature #19011 [HttpKernel] Add convenient method ArgumentResolver:: getDefaultArgumentValueResolvers (romainneutron) + * feature #18568 [WebProfilerBundle] Fix bundle usage in Content-Security-Policy context without unsafe-inline (romainneutron) + * feature #16838 [PropertyAccess] Add PSR-6 cache (dunglas) + * feature #18790 [Console] Show aliases in command description instead of in different lines in application description (juanmirod) + * feature #18728 deprecate get() for uncompiled container builders (xabbuh) + * feature #18483 [Serializer] Deprecate SerializerAwareEncoder (JhonnyL) + * feature #18337 [PropertyInfo] Support singular adder and remover (dunglas) + * feature #18894 [Cache] Added PhpFilesAdapter (trakos, nicolas-grekas) + * feature #18964 [PhpUnitBridge] Make DnsMock match namespaces that begin with Tests\\ (teohhanhui) + * feature #18726 [PhpUnitBridge] Make ClockMock match namespaces that begin with Tests\\ (teohhanhui) + * feature #18825 [Cache] Create NullAdapter to disable cache if needed (tgalopin) + * feature #18675 [VarDumper] Add Redis caster (nicolas-grekas) + * feature #18785 [Yaml] deprecate comma separators in floats (xabbuh) + * feature #18486 [Yaml] Allow using _ in some numeric notations (Taluu) diff --git a/vendor/symfony/symfony/CONTRIBUTING.md b/vendor/symfony/symfony/CONTRIBUTING.md new file mode 100644 index 0000000000000000000000000000000000000000..7902d9aff3a77d9f566dbbf173a7095132dac8fd --- /dev/null +++ b/vendor/symfony/symfony/CONTRIBUTING.md @@ -0,0 +1,26 @@ +Contributing +------------ + +Symfony is an open source, community-driven project. + +If you'd like to contribute, please read the following documents: + +* [Reviewing issues/pull requests][0] +* [Reporting a Bug][1] +* [Submitting a Patch][2] +* [Symfony Core Team][3] +* [Security Issues][4] +* [Running Symfony Tests][5] +* [Our Backwards Compatibility Promise][6] +* [Coding Standards][7] +* [Conventions][8] + +[0]: https://symfony.com/doc/current/contributing/community/reviews.html +[1]: https://symfony.com/doc/current/contributing/code/bugs.html +[2]: https://symfony.com/doc/current/contributing/code/patches.html +[3]: https://symfony.com/doc/current/contributing/code/core_team.html +[4]: https://symfony.com/doc/current/contributing/code/security.html +[5]: https://symfony.com/doc/current/contributing/code/tests.html +[6]: https://symfony.com/doc/current/contributing/code/bc.html +[7]: https://symfony.com/doc/current/contributing/code/standards.html +[8]: https://symfony.com/doc/current/contributing/code/conventions.html diff --git a/vendor/symfony/symfony/CONTRIBUTORS.md b/vendor/symfony/symfony/CONTRIBUTORS.md new file mode 100644 index 0000000000000000000000000000000000000000..e0f9ec4c5ab301b6b2941ec9b9e7a830e0d138c0 --- /dev/null +++ b/vendor/symfony/symfony/CONTRIBUTORS.md @@ -0,0 +1,1657 @@ +CONTRIBUTORS +============ + +Symfony is the result of the work of many people who made the code better +(see https://symfony.com/contributors for more information): + + - Fabien Potencier (fabpot) + - Nicolas Grekas (nicolas-grekas) + - Bernhard Schussek (bschussek) + - Tobias Schultze (tobion) + - Christian Flothmann (xabbuh) + - Christophe Coevoet (stof) + - Jordi Boggiano (seldaek) + - Victor Berchet (victor) + - Johannes S (johannes) + - Kris Wallsmith (kriswallsmith) + - Jakub Zalas (jakubzalas) + - Kévin Dunglas (dunglas) + - Ryan Weaver (weaverryan) + - Javier Eguiluz (javier.eguiluz) + - Hugo Hamon (hhamon) + - Abdellatif Ait boudad (aitboudad) + - Pascal Borreli (pborreli) + - Wouter De Jong (wouterj) + - Romain Neutron (romain) + - Joseph Bielawski (stloyd) + - Karma Dordrak (drak) + - Lukas Kahwe Smith (lsmith) + - Grégoire Pineau (lyrixx) + - Martin Hasoň (hason) + - Jeremy Mikola (jmikola) + - Maxime Steinhausser (ogizanagi) + - Jean-François Simon (jfsimon) + - Benjamin Eberlei (beberlei) + - Igor Wiedler (igorw) + - Robin Chalas (chalas_r) + - Eriksen Costa (eriksencosta) + - Jules Pietri (heah) + - Sarah Khalil (saro0h) + - Jonathan Wage (jwage) + - Diego Saint Esteben (dosten) + - Alexandre Salomé (alexandresalome) + - William Durand (couac) + - Guilhem Niot (energetick) + - ornicar + - Francis Besset (francisbesset) + - stealth35 †(stealth35) + - Alexander Mols (asm89) + - Bulat Shakirzyanov (avalanche123) + - Peter Rehm (rpet) + - SaÅ¡a Stamenković (umpirsky) + - Henrik Bjørnskov (henrikbjorn) + - Roland Franssen (ro0) + - Miha Vrhovnik + - Roland Franssen (ro0) + - Diego Saint Esteben (dii3g0) + - Konstantin Kudryashov (everzet) + - Bilal Amarni (bamarni) + - Florin Patan (florinpatan) + - Kevin Bond (kbond) + - Andrej Hudec (pulzarraider) + - Gábor Egyed (1ed) + - Michel Weimerskirch (mweimerskirch) + - Eric Clemmons (ericclemmons) + - Charles Sarrazin (csarrazi) + - Matthias Pigulla (mpdude) + - Christian Raue + - Arnout Boks (aboks) + - Deni + - Henrik Westphal (snc) + - Dariusz Górecki (canni) + - Titouan Galopin (tgalopin) + - Douglas Greenshields (shieldo) + - Pierre du Plessis (pierredup) + - Konstantin Myakshin (koc) + - Lee McDermott + - Brandon Turner + - Luis Cordova (cordoval) + - Graham Campbell (graham) + - Daniel Holmes (dholmes) + - Toni Uebernickel (havvg) + - Bart van den Burg (burgov) + - Jordan Alliot (jalliot) + - John Wards (johnwards) + - Fran Moreno (franmomu) + - Jáchym TouÅ¡ek (enumag) + - Antoine Hérault (herzult) + - Paráda József (paradajozsef) + - Dariusz Ruminski + - Arnaud Le Blanc (arnaud-lb) + - Jérôme Tamarelle (gromnan) + - Michal Piotrowski (eventhorizon) + - Tim Nagel (merk) + - Maxime STEINHAUSSER + - Issei Murasawa (issei_m) + - Brice BERNARD (brikou) + - Alexander M. Turek (derrabus) + - marc.weistroff + - lenar + - WÅ‚odzimierz Gajda (gajdaw) + - Baptiste Clavié (talus) + - Vladimir Reznichenko (kalessil) + - Alexander Schwenn (xelaris) + - Florian Voutzinos (florianv) + - Colin Frei + - Jérémy DERUSSÉ (jderusse) + - Adrien Brault (adrienbrault) + - Joshua Thijssen + - Peter Kokot (maastermedia) + - David Buchmann (dbu) + - excelwebzone + - Jacob Dreesen (jdreesen) + - Tobias Nyholm (tobias) + - Tomáš Votruba (tomas_votruba) + - Fabien Pennequin (fabienpennequin) + - Gordon Franke (gimler) + - Eric GELOEN (gelo) + - Daniel Wehner (dawehner) + - Tugdual Saunier (tucksaun) + - Théo FIDRY (theofidry) + - Robert Schönthal (digitalkaoz) + - Florian Lonqueu-Brochard (florianlb) + - Stefano Sala (stefano.sala) + - Yonel Ceruto González (yonelceruto) + - Evgeniy (ewgraf) + - Juti Noppornpitak (shiroyuki) + - Tigran Azatyan (tigranazatyan) + - Sebastian Hörl (blogsh) + - Daniel Gomes (danielcsgomes) + - Hidenori Goto (hidenorigoto) + - Sebastiaan Stok (sstok) + - Guilherme Blanco (guilhermeblanco) + - Pablo Godel (pgodel) + - Jérémie Augustin (jaugustin) + - Andréia Bohner (andreia) + - Rafael Dohms (rdohms) + - Arnaud Kleinpeter (nanocom) + - jwdeitch + - Mikael Pajunen + - Joel Wurtz (brouznouf) + - Philipp Wahala (hifi) + - Vyacheslav Pavlov + - Javier Spagnoletti (phansys) + - Richard Shank (iampersistent) + - Thomas Rabaix (rande) + - Vincent AUBERT (vincent) + - Rouven Weßling (realityking) + - Teoh Han Hui (teohhanhui) + - Clemens Tolboom + - Helmer Aaviksoo + - Hiromi Hishida (77web) + - Richard van Laak (rvanlaak) + - Matthieu Ouellette-Vachon (maoueh) + - MichaÅ‚ Pipa (michal.pipa) + - Amal Raghav (kertz) + - Jonathan Ingram (jonathaningram) + - Artur Kotyrba + - jeremyFreeAgent (Jérémy Romey) (jeremyfreeagent) + - James Halsall (jaitsu) + - Warnar Boekkooi (boekkooi) + - Dmitrii Chekaliuk (lazyhammer) + - Clément JOBEILI (dator) + - Grégoire Paris (greg0ire) + - Possum + - Dorian Villet (gnutix) + - Richard Miller (mr_r_miller) + - Mario A. Alvarez Garcia (nomack84) + - Dennis Benkert (denderello) + - Benjamin Dulau (dbenjamin) + - James Halsall (jaitsu) + - Mathieu Lemoine (lemoinem) + - Andreas Hucks (meandmymonkey) + - Noel Guilbert (noel) + - Lars Strojny (lstrojny) + - Stepan Anchugov (kix) + - bronze1man + - Daniel Espendiller + - sun (sun) + - Larry Garfield (crell) + - Martin Schuhfuß (usefulthink) + - Matthieu Bontemps (mbontemps) + - Pierre Minnieur (pminnieur) + - fivestar + - Dominique Bongiraud + - Jeremy Livingston (jeremylivingston) + - Michael Lee (zerustech) + - Matthieu Auger (matthieuauger) + - Leszek Prabucki (l3l0) + - François Zaninotto (fzaninotto) + - Dustin Whittle (dustinwhittle) + - jeff + - John Kary (johnkary) + - Justin Hileman (bobthecow) + - Blanchon Vincent (blanchonvincent) + - Chris Wilkinson (thewilkybarkid) + - Christian Schmidt + - Michele Orselli (orso) + - Tom Van Looy (tvlooy) + - Sven Paulus (subsven) + - Rui Marinho (ruimarinho) + - SpacePossum + - Dawid Nowak + - Eugene Wissner + - Julien Brochet (mewt) + - Tristan Darricau (nicofuma) + - Grégoire Paris (greg0ire) + - Sergey Linnik (linniksa) + - Michaël Perrin (michael.perrin) + - Marcel Beerta (mazen) + - Loïc Faugeron + - Jannik Zschiesche (apfelbox) + - Marco Pivetta (ocramius) + - julien pauli (jpauli) + - Lorenz Schori + - Sébastien Lavoie (lavoiesl) + - Francois Zaninotto + - Alexander Kotynia (olden) + - Daniel Tschinder + - Marcos Sánchez + - Elnur Abdurrakhimov (elnur) + - Manuel Reinhard (sprain) + - Danny Berger (dpb587) + - Jérôme Vasseur + - Adam Prager (padam87) + - Roman MarintÅ¡enko (inori) + - Xavier Montaña Carreras (xmontana) + - Mickaël Andrieu (mickaelandrieu) + - Xavier Perez + - Arjen Brouwer (arjenjb) + - Katsuhiro OGAWA + - Patrick McDougle (patrick-mcdougle) + - Alif Rachmawadi + - Kristen Gilden (kgilden) + - Pierre-Yves LEBECQ (pylebecq) + - Alex Pott + - Jakub Kucharovic (jkucharovic) + - Uwe Jäger (uwej711) + - Eugene Leonovich (rybakit) + - Filippo Tessarotto + - Julien Falque (julienfalque) + - Joseph Rouff (rouffj) + - Félix Labrecque (woodspire) + - GordonsLondon + - Jan Sorgalla (jsor) + - Ray + - Leo Feyer + - Chekote + - Thomas Adam + - Albert Casademont (acasademont) + - Jhonny Lidfors (jhonne) + - Diego Agulló (aeoris) + - jdhoek + - Pavel Batanov (scaytrase) + - Nikita Konstantinov + - Wodor Wodorski + - Thomas Lallement (raziel057) + - Giorgio Premi + - Matthieu Napoli (mnapoli) + - Beau Simensen (simensen) + - Michael Hirschler (mvhirsch) + - Robert Kiss (kepten) + - David Maicher (dmaicher) + - Roumen Damianoff (roumen) + - Antonio J. García Lagar (ajgarlag) + - Kim Hemsø Rasmussen (kimhemsoe) + - Wouter Van Hecke + - Peter Kruithof (pkruithof) + - Michael Holm (hollo) + - Marc Weistroff (futurecat) + - Christian Schmidt + - Hidde Wieringa (hiddewie) + - Chris Smith (cs278) + - Florian Klein (docteurklein) + - Oleg Voronkovich + - Manuel Kiessling (manuelkiessling) + - Atsuhiro KUBO (iteman) + - Andrew Moore (finewolf) + - Bertrand Zuchuat (garfield-fr) + - Gabor Toth (tgabi333) + - realmfoo + - Thomas Tourlourat (armetiz) + - Andrey Esaulov (andremaha) + - Grégoire Passault (gregwar) + - Ismael Ambrosi (iambrosi) + - Baptiste Lafontaine + - Aurelijus ValeiÅ¡a (aurelijus) + - Victor Bocharsky (bocharsky_bw) + - Jan Decavele (jandc) + - Gustavo Piltcher + - Stepan Tanasiychuk (stfalcon) + - Tiago Ribeiro (fixe) + - Hidde Boomsma (hboomsma) + - John Bafford (jbafford) + - Bob den Otter (bopp) + - Adrian Rudnik (kreischweide) + - Francesc Rosàs (frosas) + - Massimiliano Arione (garak) + - Julien Galenski (ruian) + - Andreas Schempp (aschempp) + - Bongiraud Dominique + - janschoenherr + - Thomas Schulz (king2500) + - Berny Cantos (xphere81) + - Ricard Clau (ricardclau) + - Mark Challoner (markchalloner) + - Gregor Harlan (gharlan) + - Gennady Telegin (gtelegin) + - Ben Davies (bendavies) + - Erin Millard + - Artur Melo (restless) + - Matthew Lewinski (lewinski) + - Magnus Nordlander (magnusnordlander) + - alquerci + - Francesco Levorato + - Rob Frawley 2nd (robfrawley) + - Vitaliy Zakharov (zakharovvi) + - Tobias Sjösten (tobiassjosten) + - Gyula Sallai (salla) + - Inal DJAFAR (inalgnu) + - Christian Gärtner (dagardner) + - Tomasz Kowalczyk (thunderer) + - François-Xavier de Guillebon (de-gui_f) + - Damien Alexandre (damienalexandre) + - Felix Labrecque + - Yaroslav Kiliba + - Terje BrÃ¥ten + - Robbert Klarenbeek (robbertkl) + - Marek Å típek (maryo) + - Alessandro Chitolina + - JhonnyL + - hossein zolfi (ocean) + - Clément Gautier (clementgautier) + - Eduardo Gulias (egulias) + - giulio de donato (liuggio) + - ShinDarth + - Stéphane PY (steph_py) + - Philipp Kräutli (pkraeutli) + - Kirill chEbba Chebunin (chebba) + - Greg Thornton (xdissent) + - Costin Bereveanu (schniper) + - Loïc Chardonnet (gnusat) + - Marek Kalnik (marekkalnik) + - Vyacheslav Salakhutdinov (megazoll) + - Jerzy Zawadzki (jzawadzki) + - Hassan Amouhzi + - gadelat (gadelat) + - Tamas Szijarto + - Pavel Volokitin (pvolok) + - François Pluchino (francoispluchino) + - Nicolas Dewez (nicolas_dewez) + - Endre Fejes + - Tobias Naumann (tna) + - Daniel Beyer + - Shein Alexey + - Romain Gautier (mykiwi) + - Joe Lencioni + - Daniel Tschinder + - Kai + - Lee Rowlands + - Krzysztof Piasecki (krzysztek) + - Maximilian Reichel (phramz) + - Loick Piera (pyrech) + - Karoly Negyesi (chx) + - Ivan Kurnosov + - Xavier HAUSHERR + - Albert Jessurum (ajessu) + - Laszlo Korte + - Miha Vrhovnik + - Alessandro Desantis + - hubert lecorche (hlecorche) + - Marc Morales Valldepérez (kuert) + - Jean-Baptiste GOMOND (mjbgo) + - Vadim Kharitonov (virtuozzz) + - Oscar Cubo Medina (ocubom) + - Karel Souffriau + - Christophe L. (christophelau) + - Anthon Pang (robocoder) + - Emanuele Gaspari (inmarelibero) + - Dariusz RumiÅ„ski + - Sébastien Santoro (dereckson) + - Brian King + - Michel Salib (michelsalib) + - geoffrey + - Steffen Roßkamp + - Valentin Jonovs (valentins-jonovs) + - Jeanmonod David (jeanmonod) + - Jan Schumann + - Niklas Fiekas + - Markus Bachmann (baachi) + - lancergr + - Mihai Stancu + - Olivier Dolbeau (odolbeau) + - Jan Rosier (rosier) + - Thomas Royer (cydonia7) + - Josip Kruslin + - vagrant + - EdgarPE + - Florian Pfitzer (marmelatze) + - Asier Illarramendi (doup) + - Chris Sedlmayr (catchamonkey) + - Seb Koelen + - Dany Maillard (maidmaid) + - Christoph Mewes (xrstf) + - Vitaliy Tverdokhlib (vitaliytv) + - Ariel Ferrandini (aferrandini) + - Dirk Pahl (dirkaholic) + - cedric lombardot (cedriclombardot) + - Jonas Flodén (flojon) + - Amrouche Hamza + - Marcin SikoÅ„ (marphi) + - Dominik Zogg (dominik.zogg) + - Marek Pietrzak + - Chad Sikorra (chadsikorra) + - franek (franek) + - Christian Wahler + - Gintautas Miselis + - Rob Bast + - David Badura (davidbadura) + - Zander Baldwin + - Adam Harvey + - Alex Bakhturin + - Alexander Obuhovich (aik099) + - boombatower + - Fabrice Bernhard (fabriceb) + - Jérôme Macias (jeromemacias) + - Andrey Astakhov (aast) + - Thomas Calvet + - Fabian Lange (codingfabian) + - Frank Neff (fneff) + - Roman Lapin (memphys) + - Yoshio HANAWA + - Gladhon + - Benoît Burnichon (bburnichon) + - Sebastian Bergmann + - Pablo Díez (pablodip) + - Kevin McBride + - Sergio Santoro + - Robin van der Vleuten (robinvdvleuten) + - Philipp Rieber (bicpi) + - Manuel de Ruiter (manuel) + - Eduardo Oliveira (entering) + - Ilya Antipenko (aivus) + - Iker Ibarguren (ikerib) + - Ricardo Oliveira (ricardolotr) + - Roy Van Ginneken (rvanginneken) + - ondrowan + - Barry vd. Heuvel (barryvdh) + - Wouter J + - Evan S Kaufman (evanskaufman) + - mcben + - Jérôme Vieilledent (lolautruche) + - Maks Slesarenko + - Filip Procházka (fprochazka) + - mmoreram + - Markus Lanthaler (lanthaler) + - Remi Collet + - Vicent Soria Durá (vicentgodella) + - Anthony Ferrara + - Ioan Negulescu + - Jakub Å kvára (jskvara) + - Andrew Udvare (audvare) + - alexpods + - Arjen van der Meijden + - Michele Locati + - Dariusz Ruminski + - Erik Trapman (eriktrapman) + - De Cock Xavier (xdecock) + - Almog Baku (almogbaku) + - Scott Arciszewski + - Norbert Orzechowicz (norzechowicz) + - Denis Charrier (brucewouaigne) + - Matthijs van den Bos (matthijs) + - Lenard Palko + - Nils Adermann (naderman) + - Gábor Fási + - DUPUCH (bdupuch) + - Benjamin Leveque (benji07) + - Nate (frickenate) + - Timothée Barray (tyx) + - jhonnyL + - sasezaki + - Dawid PakuÅ‚a (zulusx) + - Florian Rey (nervo) + - Oskar Stark (oskarstark) + - Rodrigo Borrego Bernabé (rodrigobb) + - MatTheCat + - Denis Gorbachev (starfall) + - Peter van Dommelen + - Tim van Densen + - Martin Morávek (keeo) + - Steven Surowiec + - Kevin Saliou (kbsali) + - NothingWeAre + - Ryan + - Alexander Deruwe (aderuwe) + - Alain Hippolyte (aloneh) + - Dave Hulbert (dave1010) + - Ivan Rey (ivanrey) + - Marcin ChyÅ‚ek (songoq) + - Ned Schwartz + - Ziumin + - Jeremy Benoist + - Lenar Lõhmus + - Sander Toonen (xatoo) + - Benjamin Laugueux (yzalis) + - Zach Badgett (zachbadgett) + - Aurélien Fredouelle + - Jérôme Parmentier (lctrs) + - Pavel Campr (pcampr) + - Johnny Robeson (johnny) + - Disquedur + - Michiel Boeckaert (milio) + - Geoffrey Tran (geoff) + - Jan Behrens + - Mantas Var (mvar) + - Sebastian Krebs + - Jean-Christophe Cuvelier [Artack] + - Christopher Davis (chrisguitarguy) + - alcaeus + - vitaliytv + - Sebastian Blum + - aubx + - Marvin Butkereit + - Ricky Su (ricky) + - Gildas Quéméner (gquemener) + - Charles-Henri Bruyand + - Max Rath (drak3) + - Stéphane Escandell (sescandell) + - Konstantin S. M. Möllers (ksmmoellers) + - Sinan Eldem + - Alexandre Dupuy (satchette) + - Andre Rømcke (andrerom) + - Nahuel Cuesta (ncuesta) + - Chris Boden (cboden) + - Asmir Mustafic (goetas) + - Stefan Gehrig (sgehrig) + - Hany el-Kerdany + - Wang Jingyu + - Ã…smund Garfors + - Maxime Douailin + - Jean Pasdeloup (pasdeloup) + - Benjamin Cremer (bcremer) + - Javier López (loalf) + - Andreas Braun + - Reinier Kip + - Geoffrey Brier (geoffrey-brier) + - Dustin Dobervich (dustin10) + - dantleech + - Anne-Sophie Bachelard (annesophie) + - Sebastian Marek (proofek) + - Erkhembayar Gantulga (erheme318) + - Michal Trojanowski + - David Fuhr + - Kamil Kokot (pamil) + - Aurimas Niekis (gcds) + - Max Grigorian (maxakawizard) + - Rostyslav Kinash + - Maciej Malarz (malarzm) + - Daisuke Ohata + - Vincent Simonin + - Alex Bogomazov (alebo) + - maxime.steinhausser + - Stefan Warman + - Tristan Maindron (tmaindron) + - Wesley Lancel + - Ke WANG (yktd26) + - Strate + - Miquel Rodríguez Telep (mrtorrent) + - Sergey Kolodyazhnyy (skolodyazhnyy) + - umpirski + - Denis Brumann (dbrumann) + - Quentin de Longraye (quentinus95) + - Chris Heng (gigablah) + - Ulumuddin Yunus (joenoez) + - Luc Vieillescazes (iamluc) + - Johann Saunier (prophet777) + - Samuel ROZE (sroze) + - Michael Devery (mickadoo) + - Antoine Corcy + - Artur Eshenbrener + - Arturs Vonda + - Sascha Grossenbacher + - Szijarto Tamas + - Catalin Dan + - Stephan Vock + - Benjamin Zikarsky (bzikarsky) + - Anton Bakai + - Simon Schick (simonsimcity) + - redstar504 + - Tristan Roussel + - Cameron Porter + - Hossein Bukhamsin + - Oliver Hoff + - Disparity + - origaminal + - Matteo Beccati (matteobeccati) + - Kevin (oxfouzer) + - PaweÅ‚ WacÅ‚awczyk (pwc) + - Oleg Zinchenko (cystbear) + - Johannes Klauss (cloppy) + - Evan Villemez + - fzerorubigd + - Thomas Ploch + - Benjamin Grandfond (benjamin) + - Tiago Brito (blackmx) + - Richard van den Brand (ricbra) + - develop + - ReenExe + - Mark Sonnabaum + - Richard Quadling + - jochenvdv + - Arturas Smorgun (asarturas) + - Alexander Volochnev (exelenz) + - Michael Piecko + - yclian + - twifty + - Indra Gunawan (guind) + - Peter Ward + - Julien DIDIER (juliendidier) + - Dominik Ritter (dritter) + - Sebastian Grodzicki (sgrodzicki) + - Martin Hujer (martinhujer) + - Pascal Helfenstein + - Baldur Rensch (brensch) + - Vladyslav Petrovych + - Alex Xandra Albert Sim + - Carson Full + - Trent Steel (trsteel88) + - Yuen-Chi Lian + - Besnik Br + - Dariusz Ruminski + - Joshua Nye + - Dave Marshall (davedevelopment) + - avorobiev + - Venu + - Lars Vierbergen + - Jonatan Männchen + - Dennis Hotson + - Andrew Tchircoff (andrewtch) + - michaelwilliams + - 1emming + - Leevi Graham (leevigraham) + - Nykopol (nykopol) + - Jordan Deitch + - Casper Valdemar Poulsen + - Josiah (josiah) + - Joschi Kuphal + - John Bohn (jbohn) + - Marc Morera (mmoreram) + - Andrew Hilobok (hilobok) + - Christian Soronellas (theunic) + - Yosmany Garcia (yosmanyga) + - Wouter de Wild + - Miroslav Sustek + - Degory Valentine + - Benoit Lévêque (benoit_leveque) + - Jeroen Fiege (fieg) + - Arthur de Moulins (4rthem) + - Krzysiek ÅabuÅ› + - Xavier Lacot (xavier) + - possum + - Denis Zunke (donalberto) + - Olivier Maisonneuve (olineuve) + - Masterklavi + - Francis Turmel (fturmel) + - Nikita Nefedov (nikita2206) + - cgonzalez + - Ben + - Jayson Xu (superjavason) + - Jaik Dean (jaikdean) + - fago + - Harm van Tilborg + - Jan Prieser + - Adrien Lucas (adrienlucas) + - Zhuravlev Alexander (scif) + - James Michael DuPont + - Tom Klingenberg + - Christopher Hall (mythmakr) + - Paul Kamer (pkamer) + - RafaÅ‚ Wrzeszcz (rafalwrzeszcz) + - Reen Lokum + - Martin Parsiegla (spea) + - Quentin Schuler + - Pierre Vanliefland (pvanliefland) + - Sofiane HADDAG (sofhad) + - frost-nzcr4 + - Abhoryo + - Fabian Vogler (fabian) + - Korvin Szanto + - Arjan Keeman + - Alaattin Kahramanlar (alaattin) + - Sergey Zolotov (enleur) + - Maksim Kotlyar (makasim) + - Neil Ferreira + - Nathanael Noblet (gnat) + - Dmitry Parnas (parnas) + - Paul LE CORRE + - DQNEO + - Emanuele Iannone + - Tony Malzhacker + - Mathieu MARCHOIS + - Cyril Quintin (cyqui) + - Gerard van Helden (drm) + - Johnny Peck (johnnypeck) + - Ivan Menshykov + - David RomaniÌ + - Patrick Allaert + - Fabien Bourigault (fbourigault) + - Gustavo Falco (gfalco) + - Matt Robinson (inanimatt) + - Ruud Kamphuis (ruudk) + - Aleksey Podskrebyshev + - Calin Mihai Pristavu + - David Marín Carreño (davefx) + - Jörn Lang (j.lang) + - Omar Yepez (oyepez003) + - mwsaz + - Jelle Kapitein + - Benoît Bourgeois + - mantulo + - corphi + - grizlik + - Derek ROTH + - Shin Ohno (ganchiku) + - Geert De Deckere (geertdd) + - Jan Kramer (jankramer) + - abdul malik ikhsan (samsonasik) + - Henry Snoek (snoek09) + - Simone Di Maulo (toretto460) + - Christian Morgan + - Alexander Miehe (engerim) + - Morgan Auchede (mauchede) + - Don Pinkster + - Maksim Muruev + - Emil Einarsson + - Thomas Landauer + - Thibault Duplessis + - Marc Abramowitz + - Martijn Evers + - Jacques Moati + - Balazs Csaba (balazscsaba2006) + - Harry Walter (haswalt) + - Johnson Page (jwpage) + - Michael Roterman (wtfzdotnet) + - Arno Geurts + - Adán Lobato (adanlobato) + - Matthew Davis (mdavis1982) + - Maks + - Antoine LA + - pawel-lewtak + - omerida + - Gábor Tóth + - Daniel Cestari + - David Lima + - Jérôme Vasseur + - Brunet Laurent (lbrunet) + - Mikhail Yurasov (mym) + - LOUARDI Abdeltif (ouardisoft) + - Robert Gruendler (pulse00) + - Simon Terrien (sterrien) + - Benoît Merlet (trompette) + - Koen Kuipers + - datibbaw + - Erik Saunier (snickers) + - Rootie + - Raul Fraile (raulfraile) + - sensio + - Patrick Kaufmann + - Piotr Stankowski + - Reece Fowell (reecefowell) + - Mátyás Somfai (smatyas) + - stefan.r + - Valérian Galliat + - Rikijs Murgs + - Alexandru Furculita (afurculita) + - Ben Ramsey (ramsey) + - Christian Jul Jensen + - Alexandre GESLIN (alexandregeslin) + - The Whole Life to Learn + - Farhad Safarov + - Liverbool (liverbool) + - Sam Malone + - Phan Thanh Ha (haphan) + - Chris Jones (leek) + - Colin O'Dell (colinodell) + - Frank de Jonge (frenkynet) + - xaav + - Mahmoud Mostafa (mahmoud) + - Alessandro Lai + - Pieter + - Michael Tibben + - Sander Marechal + - RadosÅ‚aw Benkel + - jean pasqualini (darkilliant) + - ttomor + - Mei Gwilym (meigwilym) + - Michael H. Arieli (excelwebzone) + - Fred Cox + - Luciano Mammino (loige) + - fabios + - Sander Coolen (scoolen) + - Nicolas Le Goff (nlegoff) + - Ben Oman + - Andreas Kleemann + - Manuele Menozzi + - Anton Babenko (antonbabenko) + - Irmantas Å iupÅ¡inskas (irmantas) + - Danilo Silva + - Zachary Tong (polyfractal) + - Hryhorii Hrebiniuk + - Dennis Fridrich (dfridrich) + - mcfedr (mcfedr) + - hamza + - dantleech + - Bastien DURAND (deamon) + - Xavier Leune + - Tero Alén (tero) + - DerManoMann + - Guillaume Royer + - Artem (digi) + - boite + - MGDSoft + - Vadim Tyukov (vatson) + - David Wolter (davewww) + - Sortex + - chispita + - Wojciech Sznapka + - Ariel J. Birnbaum + - Arjan Keeman + - Máximo Cuadros (mcuadros) + - tamirvs + - julien.galenski + - Bob van de Vijver + - Christian Neff + - Per Sandström (per) + - Goran Juric + - Laurent Ghirardotti (laurentg) + - Nicolas Macherey + - Lin Clark + - Jeremy David (jeremy.david) + - Robin Lehrmann (robinlehrmann) + - Troy McCabe + - Ville Mattila + - ilyes kooli + - Boris Vujicic (boris.vujicic) + - Max Beutel + - Antanas Arvasevicius + - nacho + - Piotr Antosik (antek88) + - Artem Lopata + - Sergey Novikov (s12v) + - Marcos Quesada (marcos_quesada) + - Matthew Vickery (mattvick) + - Angel Koilov (po_taka) + - Dan Finnie + - Ken Marfilla (marfillaster) + - benatespina (benatespina) + - Denis Kop + - jfcixmedia + - Martijn Evers + - Benjamin Paap (benjaminpaap) + - Christian + - Sergii Smertin (nfx) + - hugofonseca (fonsecas72) + - Martynas Narbutas + - Bailey Parker + - Eddie Jaoude + - Haritz Iturbe (hizai) + - Nerijus Arlauskas (nercury) + - SPolischook + - Diego Sapriza + - Joan Cruz + - inspiran + - Cristobal Dabed + - Daniel Mecke (daniel_mecke) + - Matteo Giachino (matteosister) + - Alex Demchenko (pilot) + - Tadas Gliaubicas (tadcka) + - Benoit Garret + - DerManoMann + - Olaf Klischat + - orlovv + - Jhonny Lidfors (jhonny) + - Julien Bianchi (jubianchi) + - Robert Meijers + - Marcin Chwedziak + - hjkl + - Tony Cosentino (tony-co) + - Alexander Cheprasov + - Rodrigo Díez Villamuera (rodrigodiez) + - e-ivanov + - Jochen Bayer (jocl) + - Jeremy Bush + - wizhippo + - Viacheslav Sychov + - Carlos Ortega Huetos + - rpg600 + - Péter Buri (burci) + - Davide Borsatto (davide.borsatto) + - kaiwa + - Charles Sanquer (csanquer) + - Albert Ganiev (helios-ag) + - Neil Katin + - David Otton + - Will Donohoe + - peter + - flip111 + - Jérémy Jourdin (jjk801) + - BRAMILLE Sébastien (oktapodia) + - Artem Kolesnikov (tyomo4ka) + - Gustavo Adrian + - Yannick + - spdionis + - Taras Girnyk + - Eduardo García Sanz (coma) + - James Gilliland + - fduch (fduch) + - Rhodri Pugh (rodnaph) + - David de Boer (ddeboer) + - Klaus Purer + - Gilles Doge (gido) + - abulford + - antograssiot + - Brooks Boyd + - Roger Webb + - Dmitriy Simushev + - Ivo Bathke (ivoba) + - Max Voloshin (maxvoloshin) + - Nicolas Fabre (nfabre) + - Raul Rodriguez (raul782) + - Patrick Landolt (scube) + - WybrenKoelmans + - Derek Lambert + - MightyBranch + - Kacper Gunia (cakper) + - Peter Thompson (petert82) + - Felicitus + - Krzysztof Przybyszewski + - Paul Matthews + - Juan Traverso + - Tarjei Huse (tarjei) + - Philipp Strube + - Christian Sciberras + - Clement Herreman (clemherreman) + - Dan Ionut Dumitriu (danionut90) + - Vladislav Rastrusny (fractalizer) + - Nyro (nyro) + - Marco + - Marc Torres + - Alberto Aldegheri + - heccjj + - Alexandre Melard + - Jay Klehr + - Sergey Yuferev + - Tobias Stöckler + - Mario Young + - Jakub Kulhan + - Mo Di (modi) + - Jeroen van den Enden (stoefke) + - Jelte Steijaert (jelte) + - Quique Porta (quiqueporta) + - Tomasz Szymczyk (karion) + - Xavier Coureau + - ConneXNL + - Aharon Perkel + - matze + - Abdul.Mohsen B. A. A + - Benoît Burnichon + - pthompson + - Malaney J. Hill + - Alexandre Pavy + - Christian Flach (cmfcmf) + - Cédric Girard (enk_) + - Lars Ambrosius Wallenborn (larsborn) + - Oriol Mangas Abellan (oriolman) + - Sebastian Göttschkes (sgoettschkes) + - Tatsuya Tsuruoka + - Ross Tuck + - Kévin Gomez (kevin) + - azine + - Dawid Sajdak + - Ludek Stepan + - Aaron Stephens (astephens) + - Craig Menning (cmenning) + - Balázs Benyó (duplabe) + - Erika Heidi Reinaldo (erikaheidi) + - Pierre Tachoire (krichprollsch) + - Marc J. Schmidt (marcjs) + - Marco Jantke + - Saem Ghani + - Conrad Kleinespel + - Sebastian Utz + - Adrien Gallou (agallou) + - Karol Sójko (karolsojko) + - Grzegorz Zdanowski (kiler129) + - sl_toto (sl_toto) + - Walter Dal Mut (wdalmut) + - Albin Kerouaton + - SeÌbastien HOUZEÌ + - Jingyu Wang + - steveYeah + - Samy Dindane (dinduks) + - Keri Henare (kerihenare) + - Cédric Lahouste (rapotor) + - Samuel Vogel (samuelvogel) + - Berat DoÄŸan + - Juanmi Rodriguez Cerón + - Andy Raines + - Anthony Ferrara + - Klaas Cuvelier (kcuvelier) + - markusu49 + - Steve Frécinaux + - ShiraNai7 + - VaÅ¡ek Purchart (vasek-purchart) + - Janusz JabÅ‚oÅ„ski (yanoosh) + - Sandro Hopf + - Åukasz Makuch + - George Giannoulopoulos + - Luis Ramirez (luisdeimos) + - Daniel Richter (richtermeister) + - ChrisC + - Ilya Biryukov + - Kim Laï Trinh + - Jason Desrosiers + - m.chwedziak + - Philip Frank + - Lance McNearney + - Giorgio Premi + - Ian Carroll + - caponica + - Matt Daum (daum) + - Alberto Pirovano (geezmo) + - Pete Mitchell (peterjmit) + - Tom Corrigan (tomcorrigan) + - Luis Galeas + - Martin Pärtel + - George Mponos (gmponos) + - Noah Heck (myesain) + - Patrick Daley (padrig) + - Xavier Briand (xavierbriand) + - Max Summe + - WedgeSama + - Felds Liscia + - Ahmed TAILOULOUTE (ahmedtai) + - Maxime Veber (nek-) + - Sullivan SENECHAL + - Tadcka + - Beth Binkovitz + - Romain Geissler + - Adrien Moiruad + - Tomaz Ahlin + - Marcus Stöhr (dafish) + - Emmanuel Vella (emmanuel.vella) + - Carsten Nielsen (phreaknerd) + - Mathieu Rochette + - Jay Severson + - René Kerner + - Nathaniel Catchpole + - Jose Gonzalez + - Adrien Samson (adriensamson) + - Samuel Gordalina (gordalina) + - Max Romanovsky (maxromanovsky) + - Mathieu Morlon + - Daniel Tschinder + - RafaÅ‚ MuszyÅ„ski (rafmus90) + - Timothy Anido (xanido) + - Rick Prent + - skalpa + - Martin Eckhardt + - Pieter Jordaan + - Damien Tournoud + - Jon Gotlin (jongotlin) + - Michael Dowling (mtdowling) + - Karlos Presumido (oneko) + - BilgeXA + - r1pp3rj4ck + - Robert Queck + - Peter Bouwdewijn + - mlively + - Amine Matmati + - Fabian Steiner (fabstei) + - Klaus Silveira (klaussilveira) + - Thomas Chmielowiec (chmielot) + - JÄnis Lukss + - rkerner + - Alex Silcock + - Matthew J Mucklo + - fdgdfg (psampaz) + - Stéphane Seng + - Maxwell Vandervelde + - kaywalker + - Mike Meier + - Sebastian Ionescu + - Thomas Ploch + - Simon Neidhold + - Xavier HAUSHERR + - Valentin VALCIU + - Kevin Dew + - James Cowgill + - 1ma (jautenim) + - Nicolas Schwartz (nicoschwartz) + - Patrik Gmitter (patie) + - Jonathan Gough + - Benjamin Bender + - Konrad Mohrfeldt + - Lance Chen + - Andrew (drew) + - Nikolay Labinskiy (e-moe) + - kor3k kor3k (kor3k) + - Stelian Mocanita (stelian) + - Flavian (2much) + - mike + - Keith Maika + - Mephistofeles + - Hoffmann András + - Olivier + - pscheit + - ZdeneÌŒk DrahosÌŒ + - Dan Harper + - moldcraft + - Ramon Kleiss (akathos) + - César Suárez (csuarez) + - Nicolas Badey (nico-b) + - Shane Preece (shane) + - Geoff + - georaldc + - Malte Wunsch + - wusuopu + - povilas + - Alessandro Tagliapietra (alex88) + - Biji (biji) + - Gunnar Lium (gunnarlium) + - Tiago Garcia (tiagojsag) + - Artiom + - Jakub Simon + - Bouke Haarsma + - Martin Eckhardt + - natechicago + - Jonathan Poston + - Adrian Olek (adrianolek) + - PrzemysÅ‚aw Piechota (kibao) + - Leonid Terentyev (li0n) + - ryunosuke + - victoria + - Francisco Facioni (fran6co) + - Iwan van Staveren (istaveren) + - Thierry Thuon (lepiaf) + - Povilas S. (povilas) + - pborreli + - Eric Caron + - Richard Bradley + - 2manypeople + - Wing + - Thomas Bibb + - Matt Farmer + - catch + - Alexandre Segura + - Josef Cech + - Arnau González (arnaugm) + - Simon Bouland (bouland) + - Matthew Foster (mfoster) + - Paul Seiffert (seiffert) + - Vasily Khayrulin (sirian) + - Stefan Koopmanschap (skoop) + - Stefan Hüsges (tronsha) + - Dan Blows + - Matt Wells + - stloyd + - Chris Tickner + - Andrew Coulton + - Jeremy Benoist + - Michal Gebauer + - Gleb Sidora + - David Stone + - Jovan Perovic (jperovic) + - Pablo Maria Martelletti (pmartelletti) + - Yassine Guedidi (yguedidi) + - Waqas Ahmed + - Luis Muñoz + - Andreas + - Thomas Chmielowiec + - Andrey Ryaguzov + - Peter Bex + - Manatsawin Hanmongkolchai + - Gunther Konig + - Maciej Schmidt + - Dennis Væversted + - nuncanada + - flack + - izzyp + - FrantiÅ¡ek Bereň + - Christoph Nissle (derstoffel) + - Ionel Scutelnicu (ionelscutelnicu) + - Nicolas Tallefourtané (nicolab) + - Botond Dani (picur) + - Thierry Marianne (thierrymarianne) + - Nick Stemerdink + - David Stone + - jjanvier + - Julius Beckmann + - Romain Dorgueil + - Grayson Koonce (breerly) + - Fabien LUCAS (flucas2) + - Karim Cassam Chenaï (ka) + - Nicolas Bastien (nicolas_bastien) + - Denis (yethee) + - Andrew Zhilin (zhil) + - Andy Stanberry + - Luiz “Felds†Liscia + - Thomas Rothe + - nietonfir + - alefranz + - avi123 + - alsar + - Aarón Nieves Fernández + - Mike Meier + - Kirill Saksin + - Koalabaerchen + - michalmarcinkowski + - Warwick + - VJ + - Chris + - JakeFr + - Simon Sargeant + - efeen + - Muhammed Akbulut + - MichaÅ‚ DÄ…browski (defrag) + - Simone Fumagalli (hpatoio) + - Brian Graham (incognito) + - Kevin Vergauwen (innocenzo) + - Alessio Baglio (ioalessio) + - Jordi Llonch (jordillonch) + - Cédric Dugat (ph3nol) + - Philip Dahlstrøm (phidah) + - Alex Rock Ancelet (pierstoval) + - Milos Colakovic (project2481) + - Rénald Casagraude (rcasagraude) + - Robin Duval (robin-duval) + - Grinbergs Reinis (shima5) + - Artem Lopata (bumz) + - Nicole Cordes + - Alexey Popkov + - Gijs Kunze + - Artyom Protaskin + - Nathanael d. Noblet + - helmer + - ged15 + - Daan van Renterghem + - Nicole Cordes + - Bram Van der Sype (brammm) + - Guile (guile) + - Julien Moulin (lizjulien) + - Mauro Foti (skler) + - Yannick Warnier (ywarnier) + - Kevin Decherf + - Jason Woods + - klemens + - dened + - Dmitry Korotovsky + - Michael van Tricht + - Sam Ward + - Walther Lalk + - Adam + - devel + - taiiiraaa + - Johann Pardanaud + - Trevor Suarez + - gedrox + - dropfen + - Andrey Chernykh + - Edvinas Klovas + - Drew Butler + - Peter Breuls + - Tischoi + - J Bruni + - Alexey Prilipko + - vlakoff + - bertillon + - Bertalan Attila + - Yannick Bensacq (cibou) + - Luca Genuzio (genuzio) + - Hans Nilsson (hansnilsson) + - Andrew MarcinkeviÄius (ifdattic) + - Ioana Hazsda (ioana-hazsda) + - Jan Marek (janmarek) + - Mark de Haan (markdehaan) + - Dan Patrick (mdpatrick) + - Rares Vlaseanu (raresvla) + - tante kinast (tante) + - Jérémy M (th3mouk) + - Vincent LEFORT (vlefort) + - Sadicov Vladimir (xtech) + - Alexander Zogheb + - Rémi Blaise + - Joel Marcey + - David Christmann + - root + - James Hudson + - Tom Maguire + - David Zuelke + - Pierre Rineau + - adenkejawen + - Ari Pringle (apringle) + - Dan Ordille (dordille) + - Dmytro Boiko (eagle) + - Jan Eichhorn (exeu) + - Grégory Pelletier (ip512) + - John Nickell (jrnickell) + - Martin Mayer (martin) + - Grzegorz Åukaszewicz (newicz) + - Jonny Schmid (schmidjon) + - Götz Gottwald + - Veres Lajos + - Michael Babker + - grifx + - Robert Campbell + - Matt Lehner + - Hein Zaw Htetâ„¢ + - Ruben Kruiswijk + - Michael J + - Joseph Maarek + - Alexander Menk + - Alex Pods + - hadriengem + - timaschew + - Ian Phillips + - Haritz + - Matthieu Prat + - Grummfy + - Filipe Guerra + - Gerben Wijnja + - Rowan Manning + - Per Modin + - David Windell + - Gabriel Birke + - skafandri + - Alan Chen + - Maerlyn + - Even AndreÌ Fiskvik + - Arjan Keeman + - Erik van Wingerden + - Dane Powell + - Gerrit Drost + - Linnaea Von Lavia + - Lenar Lõhmus + - Cristian Gonzalez + - AlberT + - hainey + - Juan M Martínez + - Gilles Gauthier + - ddebree + - Tomas Liubinas + - Alex + - Patrick Dawkins + - Klaas Naaijkens + - Daniel González Cerviño + - RafaÅ‚ + - Adria Lopez (adlpz) + - Rosio (ben-rosio) + - Simon Paarlberg (blamh) + - Jeroen Thora (bolle) + - Masao Maeda (brtriver) + - Darius Leskauskas (darles) + - David Joos (djoos) + - Denis Klementjev (dklementjev) + - Tomáš Polívka (draczris) + - Vincent Composieux (eko) + - Franz Liedke (franzliedke) + - Christophe BECKER (goabonga) + - gondo (gondo) + - Gusakov Nikita (hell0w0rd) + - Osman Üngür (import) + - Javier Núñez Berrocoso (javiernuber) + - Jelle Bekker (jbekker) + - Ian Jenkins (jenkoian) + - Jorge Martin (jorgemartind) + - Joeri Verdeyen (jverdeyen) + - Kevin Herrera (kherge) + - Luis Ramón López López (lrlopez) + - Muriel (metalmumu) + - Michael Pohlers (mick_the_big) + - mlpo (mlpo) + - Cayetano Soriano Gallego (neoshadybeat) + - Ondrej Machulda (ondram) + - Pablo Monterde Perez (plebs) + - Jimmy Leger (redpanda) + - Marcin Szepczynski (szepczynski) + - Cyrille Jouineau (tuxosaurus) + - Yorkie Chadwick (yorkie76) + - GuillaumeVerdon + - Yanick Witschi + - Ondrej Mirtes + - akimsko + - Youpie + - srsbiz + - Taylan Kasap + - Nicolas A. Bérard-Nault + - Saem Ghani + - Stefan Oderbolz + - Curtis + - Gabriel Moreira + - Alexey Popkov + - Joseph Deray + - Damian Sromek + - Ben + - Evgeniy Tetenchuk + - dasmfm + - Arnaud Buathier (arnapou) + - chesteroni (chesteroni) + - Mauricio Lopez (diaspar) + - HADJEDJ Vincent (hadjedjvincent) + - Daniele Cesarini (ijanki) + - Ismail Asci (ismailasci) + - Simon CONSTANS (kosssi) + - Kristof Van Cauwenbergh (kristofvc) + - Ramon Henrique Ornelas (ramonornela) + - Markus S. (staabm) + - Till Klampaeckel (till) + - Tobias Weinert (tweini) + - Ulf Reimers (ureimers) + - Wotre + - goohib + - Xavier HAUSHERR + - Edwin Hageman + - Mantas Urnieža + - Cas + - Dusan Kasan + - Myke79 + - Brian Debuire + - Piers Warmers + - Guilliam Xavier + - Sylvain Lorinet + - klyk50 + - Andreas Lutro + - jc + - BenjaminBeck + - Aurelijus Rožėnas + - znerol + - Christian Eikermann + - Antonio Angelino + - Shawn Iwinski + - Niklas Keller + - Vladimir Sazhin + - lol768 + - jamogon + - Vyacheslav Slinko + - Johannes + - Jörg Rühl + - wesleyh + - sergey + - Karim Miladi + - Michael Genereux + - patrick-mcdougle + - Dariusz Czech + - Anonymous User + - Eric J. Duran + - Alexandru Bucur + - cmfcmf + - Drew Butler + - Steve Müller + - Andras Ratz + - andreabreu98 + - Michael Schneider + - Cédric Bertolini + - n-aleha + - Şəhriyar İmanov + - Kaipi Yann + - Sam Williams + - Adrian Philipp + - James Michael DuPont + - Kasperki + - Tammy D + - Ondrej Slinták + - vlechemin + - Brian Corrigan + - Ladislav Tánczos + - Brian Freytag + - Skorney + - mieszko4 + - Steve Preston + - Neophy7e + - bokonet + - Arrilot + - Markus Staab + - Pierre-Louis LAUNAY + - djama + - Eduardo Conceição + - Jon Cave + - Sébastien HOUZE + - Abdulkadir N. A. + - Yevgen Kovalienia + - Lebnik + - Sema + - Elan Ruusamäe + - Thorsten Hallwas + - Michael Squires + - Norman Soetbeer + - zorn + - Benjamin Long + - Matt Janssen + - Peter Gribanov + - Ben Johnson + - kwiateusz + - David Soria Parra + - Sergiy Sokolenko + - dinitrol + - Penny Leach + - Richard Trebichavský + - g123456789l + - oscartv + - DanSync + - Peter Zwosta + - parhs + - Diego Campoy + - TeLiXj + - Oncle Tom + - Christian Stocker + - Dawid Nowak + - Karolis Daužickas + - Sergio Santoro + - tirnanog06 + - phc + - Дмитрий Пацура + - ilyes kooli + - Matthias Althaus + - Michaël VEROUX + - Julia + - Lin Lu + - arduanov + - sualko + - Bilge + - Nicolas Roudaire + - Alfonso (afgar) + - Andreas Forsblom (aforsblo) + - Alex Olmos (alexolmos) + - Antonio Mansilla (amansilla) + - Robin Kanters (anddarerobin) + - Juan Ases García (ases) + - Siragusa (asiragusa) + - Daniel Basten (axhm3a) + - Bill Hance (billhance) + - Bernd Matzner (bmatzner) + - Bram Tweedegolf (bram_tweedegolf) + - Choong Wei Tjeng (choonge) + - Kousuke Ebihara (co3k) + - Loïc Vernet (coil) + - Christian Gripp (core23) + - Christoph Schaefer (cvschaefer) + - Damon Jones (damon__jones) + - Åukasz Giza (destroyer) + - Daniel Londero (dlondero) + - Sebastian Landwehr (dword123) + - Adel ELHAIBA (eadel) + - Damián Nohales (eagleoneraptor) + - Elliot Anderson (elliot) + - Fabien D. (fabd) + - Carsten Eilers (fnc) + - Sorin Gitlan (forapathy) + - Yohan Giarelli (frequence-web) + - Gerry Vandermaesen (gerryvdm) + - Ghazy Ben Ahmed (ghazy) + - Arash Tabriziyan (ghost098) + - ibasaw (ibasaw) + - Vladislav Krupenkin (ideea) + - Imangazaliev Muhammad (imangazaliev) + - joris de wit (jdewit) + - Jérémy CROMBEZ (jeremy) + - Jose Manuel Gonzalez (jgonzalez) + - Jorge Maiden (jorgemaiden) + - Justin Rainbow (jrainbow) + - Juan Luis (juanlugb) + - JuntaTom (juntatom) + - Ismail Faizi (kanafghan) + - Sébastien Armand (khepin) + - Pierre-Chanel Gauthier (kmecnin) + - Krzysztof Menżyk (krymen) + - samuel laulhau (lalop) + - Laurent Bachelier (laurentb) + - Florent Viel (luxifer) + - Matthieu Moquet (mattketmo) + - Moritz Borgmann (mborgmann) + - Matt Drollette (mdrollette) + - Adam Monsen (meonkeys) + - Ala Eddine Khefifi (nayzo) + - emilienbouard (neime) + - Nicholas Byfleet (nickbyfleet) + - Tomas NorkÅ«nas (norkunas) + - ollie harridge (ollietb) + - Paul Andrieux (paulandrieux) + - PaweÅ‚ Szczepanek (pauluz) + - Philippe Degeeter (pdegeeter) + - Pedro Miguel Maymone de Resende (pedroresende) + - Christian López Espínola (penyaskito) + - Petr JaroÅ¡ (petajaros) + - Philipp Hoffmann (philipphoffmann) + - Alex Carol (picard89) + - Daniel Perez Pinazo (pitiflautico) + - Brayden Williams (redstar504) + - Rich Sage (richsage) + - Bart Ruysseveldt (ruyss) + - Sascha Dens (saschadens) + - scourgen hung (scourgen) + - Sébastien Alfaiate (seb33300) + - Sebastian Busch (sebu) + - André Filipe Gonçalves Neves (seven) + - Bruno Ziegler (sfcoder) + - Andrea Giuliano (shark) + - Schuyler Jager (sjager) + - Volker (skydiablo) + - Julien Sanchez (sumbobyboys) + - Guillermo Gisinger (t3chn0r) + - Markus Tacker (tacker) + - Tyler Stroud (tystr) + - Moritz Kraft (userfriendly) + - Víctor Mateo (victormateo) + - Vincent (vincent1870) + - Valentin Udaltsov (vudaltsov) + - Eugene Babushkin (warl) + - Wouter Sioen (wouter_sioen) + - Xavier Amado (xamado) + - Jesper Søndergaard Pedersen (zerrvox) + - Florent Cailhol + - szymek + - Kovacs Nicolas + - craigmarvelley + - Stano Turza + - simpson + - drublic + - Andreas Streichardt + - Pascal Hofmann + - smokeybear87 + - Gustavo Adrian + - Kevin Weber + - Dionysis Arvanitis + - Sergey Fedotov + - Michael + - fh-github@fholzhauer.de + - Jan Emrich + - Mark Topper + - Xavier REN + - Zander Baldwin + - Philipp Scheit + - max + - Mohamed Karnichi (amiral) + - Andrew Carter (andrewcarteruk) + - Adam Elsodaney (archfizz) + - Daniel Kolvik (dkvk) + - Jeroen De Dauw (jeroendedauw) + - Maxime COLIN (maximecolin) + - Muharrem Demirci (mdemirci) + - Evgeny Z (meze) + - Nicolas de Marqué (nicola) + - Pierre Geyer (ptheg) + - Sam Fleming (sam_fleming) + - Thomas BERTRAND (sevrahk) + - Matej Žilák (teo_sk) + - Vladislav Vlastovskiy (vlastv) diff --git a/vendor/symfony/symfony/LICENSE b/vendor/symfony/symfony/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/UPGRADE-3.0.md b/vendor/symfony/symfony/UPGRADE-3.0.md new file mode 100644 index 0000000000000000000000000000000000000000..cda0f4a0f5399fbb36ac47f84751212b710cfe68 --- /dev/null +++ b/vendor/symfony/symfony/UPGRADE-3.0.md @@ -0,0 +1,1915 @@ +UPGRADE FROM 2.x to 3.0 +======================= + +# Table of Contents + +- [ClassLoader](#classloader) +- [Config](#config) +- [Console](#console) +- [DependencyInjection](#dependencyinjection) +- [DoctrineBridge](#doctrinebridge) +- [DomCrawler](#domcrawler) +- [EventDispatcher](#eventdispatcher) +- [Form](#form) +- [FrameworkBundle](#frameworkbundle) +- [HttpFoundation](#httpfoundation) +- [HttpKernel](#httpkernel) +- [Locale](#locale) +- [Monolog Bridge](#monolog-bridge) +- [Process](#process) +- [PropertyAccess](#propertyaccess) +- [Routing](#routing) +- [Security](#security) +- [SecurityBundle](#securitybundle) +- [Serializer](#serializer) +- [Swiftmailer Bridge](#swiftmailer-bridge) +- [Translator](#translator) +- [Twig Bridge](#twig-bridge) +- [TwigBundle](#twigbundle) +- [Validator](#validator) +- [WebProfiler](#webprofiler) +- [Yaml](#yaml) + +### ClassLoader + + * The `UniversalClassLoader` class has been removed in favor of + `ClassLoader`. The only difference is that some method names are different: + + | Old name | New name + | -------- | --- + | `registerNamespaces()` | `addPrefixes()` + | `registerPrefixes()` | `addPrefixes()` + | `registerNamespace()` | `addPrefix()` + | `registerPrefix()` | `addPrefix()` + | `getNamespaces()` | `getPrefixes()` + | `getNamespaceFallbacks()` | `getFallbackDirs()` + | `getPrefixFallbacks()` | `getFallbackDirs()` + + * The `DebugUniversalClassLoader` class has been removed in favor of + `DebugClassLoader`. The difference is that the constructor now takes a + loader to wrap. + +### Config + + * `\Symfony\Component\Config\Resource\ResourceInterface::isFresh()` has been removed. Also, + cache validation through this method (which was still supported in 2.8 for BC) does no longer + work because the `\Symfony\Component\Config\Resource\BCResourceInterfaceChecker` helper class + has been removed as well. + + * The `__toString()` method of the `\Symfony\Component\Config\ConfigCache` class + was removed in favor of the new `getPath()` method. + +### Console + + * The `dialog` helper has been removed in favor of the `question` helper. + + * The methods `isQuiet`, `isVerbose`, `isVeryVerbose` and `isDebug` were added + to `Symfony\Component\Console\Output\OutputInterface`. + + * `ProgressHelper` has been removed in favor of `ProgressBar`. + + Before: + + ```php + $h = new ProgressHelper(); + $h->start($output, 10); + for ($i = 1; $i < 5; $i++) { + usleep(200000); + $h->advance(); + } + $h->finish(); + ``` + + After: + + ```php + $bar = new ProgressBar($output, 10); + $bar->start(); + for ($i = 1; $i < 5; $i++) { + usleep(200000); + $bar->advance(); + } + ``` + + * `TableHelper` has been removed in favor of `Table`. + + Before: + + ```php + $table = $app->getHelperSet()->get('table'); + $table + ->setHeaders(array('ISBN', 'Title', 'Author')) + ->setRows(array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), + array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), + array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), + )) + ; + $table->render($output); + ``` + + After: + + ```php + use Symfony\Component\Console\Helper\Table; + + $table = new Table($output); + $table + ->setHeaders(array('ISBN', 'Title', 'Author')) + ->setRows(array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), + array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), + array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), + )) + ; + $table->render(); + ``` + +* Parameters of `renderException()` method of the + `Symfony\Component\Console\Application` are type hinted. + You must add the type hint to your implementations. + +### DependencyInjection + + * The method `remove` was added to `Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface`. + + * The concept of scopes was removed, the removed methods are: + + - `Symfony\Component\DependencyInjection\ContainerBuilder::getScopes()` + - `Symfony\Component\DependencyInjection\ContainerBuilder::getScopeChildren()` + - `Symfony\Component\DependencyInjection\ContainerInterface::enterScope()` + - `Symfony\Component\DependencyInjection\ContainerInterface::leaveScope()` + - `Symfony\Component\DependencyInjection\ContainerInterface::addScope()` + - `Symfony\Component\DependencyInjection\ContainerInterface::hasScope()` + - `Symfony\Component\DependencyInjection\ContainerInterface::isScopeActive()` + - `Symfony\Component\DependencyInjection\Definition::setScope()` + - `Symfony\Component\DependencyInjection\Definition::getScope()` + - `Symfony\Component\DependencyInjection\Reference::isStrict()` + + Also, the `$scope` and `$strict` parameters of `Symfony\Component\DependencyInjection\ContainerInterface::set()` + and `Symfony\Component\DependencyInjection\Reference` respectively were removed. + + * A new `shared` flag has been added to the service definition + in replacement of the `prototype` scope. + + Before: + + ```php + use Symfony\Component\DependencyInjection\ContainerBuilder; + + $container = new ContainerBuilder(); + $container + ->register('foo', 'stdClass') + ->setScope(ContainerBuilder::SCOPE_PROTOTYPE) + ; + ``` + + ```yml + services: + foo: + class: stdClass + scope: prototype + ``` + + ```xml + + + + ``` + + After: + + ```php + use Symfony\Component\DependencyInjection\ContainerBuilder; + + $container = new ContainerBuilder(); + $container + ->register('foo', 'stdClass') + ->setShared(false) + ; + ``` + + ```yml + services: + foo: + class: stdClass + shared: false + ``` + + ```xml + + + + ``` + + * `Symfony\Component\DependencyInjection\ContainerAware` was removed, use + `Symfony\Component\DependencyInjection\ContainerAwareTrait` or implement + `Symfony\Component\DependencyInjection\ContainerAwareInterface` manually + + * The methods `Definition::setFactoryClass()`, + `Definition::setFactoryMethod()`, and `Definition::setFactoryService()` have + been removed in favor of `Definition::setFactory()`. Services defined using + YAML or XML use the same syntax as configurators. + + * Synchronized services are deprecated and the following methods have been + removed: `ContainerBuilder::synchronize()`, `Definition::isSynchronized()`, + and `Definition::setSynchronized()`. + +### DomCrawler + + * The interface of the `Symfony\Component\DomCrawler\Crawler` changed. It does no longer implement `\Iterator` but `\IteratorAggregate`. If you rely on methods of the `\Iterator` interface, call the `getIterator` method of the `\IteratorAggregate` interface before. No changes are required in a `\Traversable`-aware control structure, such as `foreach`. + + Before: + + ```php + $crawler->current(); + ``` + + After: + + ```php + $crawler->getIterator()->current(); + ``` + +### DoctrineBridge + + * The `property` option of `DoctrineType` was removed in favor of the `choice_label` option. + + * The `loader` option of `DoctrineType` was removed. You now have to override the `getLoader()` + method in your custom type. + + * The `Symfony\Bridge\Doctrine\Form\ChoiceList\EntityChoiceList` was removed in favor + of `Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader`. + + * Passing a query builder closure to `ORMQueryBuilderLoader` is not supported anymore. + You should pass resolved query builders only. + + Consequently, the arguments `$manager` and `$class` of `ORMQueryBuilderLoader` + have been removed as well. + + Note that the `query_builder` option of `DoctrineType` *does* support + closures, but the closure is now resolved in the type instead of in the + loader. + + * Using the entity provider with a Doctrine repository implementing `UserProviderInterface` is not supported anymore. + You should make the repository implement `UserLoaderInterface` instead. + +### EventDispatcher + + * The method `getListenerPriority($eventName, $listener)` has been added to the + `EventDispatcherInterface`. + * The interface `Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface` + extends `Symfony\Component\EventDispatcher\EventDispatcherInterface`. + +### Form + + * The `getBlockPrefix()` method was added to the `FormTypeInterface` in replacement of + the `getName()` method which has been removed. + + * The `configureOptions()` method was added to the `FormTypeInterface` in replacement + of the `setDefaultOptions()` method which has been removed. + + * The `getBlockPrefix()` method was added to the `ResolvedFormTypeInterface` in + replacement of the `getName()` method which has been removed. + + * The option `options` of the `CollectionType` has been removed in favor + of the `entry_options` option. + + * The `cascade_validation` option was removed. Use the `constraints` option + together with the `Valid` constraint instead. + + * Type names were removed. Instead of referencing types by name, you must + reference them by their fully-qualified class name (FQCN) instead: + + Before: + + ```php + $form = $this->createFormBuilder() + ->add('name', 'text') + ->add('age', 'integer') + ->getForm(); + ``` + + After: + + ```php + use Symfony\Component\Form\Extension\Core\Type\IntegerType; + use Symfony\Component\Form\Extension\Core\Type\TextType; + + $form = $this->createFormBuilder() + ->add('name', TextType::class) + ->add('age', IntegerType::class) + ->getForm(); + ``` + + If you want to customize the block prefix of a type in Twig, you must now + implement `FormTypeInterface::getBlockPrefix()`: + + Before: + + ```php + class UserProfileType extends AbstractType + { + public function getName() + { + return 'profile'; + } + } + ``` + + After: + + ```php + class UserProfileType extends AbstractType + { + public function getBlockPrefix() + { + return 'profile'; + } + } + ``` + + If you don't customize `getBlockPrefix()`, it defaults to the class name + without "Type" suffix in underscore notation (here: "user_profile"). + + Type extension must return the fully-qualified class name of the extended + type from `FormTypeExtensionInterface::getExtendedType()` now. + + Before: + + ```php + class MyTypeExtension extends AbstractTypeExtension + { + public function getExtendedType() + { + return 'form'; + } + } + ``` + + After: + + ```php + use Symfony\Component\Form\Extension\Core\Type\FormType; + + class MyTypeExtension extends AbstractTypeExtension + { + public function getExtendedType() + { + return FormType::class; + } + } + ``` + + * The `FormTypeInterface::getName()` method was removed. + + * Returning type instances from `FormTypeInterface::getParent()` is not + supported anymore. Return the fully-qualified class name of the parent + type class instead. + + Before: + + ```php + class MyType + { + public function getParent() + { + return new ParentType(); + } + } + ``` + + After: + + ```php + class MyType + { + public function getParent() + { + return ParentType::class; + } + } + ``` + + * The option `type` of the `CollectionType` has been removed in favor of + the `entry_type` option. The value for the `entry_type` option must be + the fully-qualified class name (FQCN). + + * Passing type instances to `Form::add()`, `FormBuilder::add()` and the + `FormFactory::create*()` methods is not supported anymore. Pass the + fully-qualified class name of the type instead. + + Before: + + ```php + $form = $this->createForm(new MyType()); + ``` + + After: + + ```php + $form = $this->createForm(MyType::class); + ``` + + * Passing custom data to forms now needs to be done + through the options resolver. + + In the controller: + + Before: + ```php + $form = $this->createForm(new MyType($variable), $entity, array( + 'action' => $this->generateUrl('action_route'), + 'method' => 'PUT', + )); + ``` + After: + ```php + $form = $this->createForm(MyType::class, $entity, array( + 'action' => $this->generateUrl('action_route'), + 'method' => 'PUT', + 'custom_value' => $variable, + )); + ``` + In the form type: + + Before: + ```php + class MyType extends AbstractType + { + private $value; + + public function __construct($variableValue) + { + $this->value = $value; + } + // ... + } + ``` + + After: + ```php + public function buildForm(FormBuilderInterface $builder, array $options) + { + $value = $options['custom_value']; + // ... + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults(array( + 'custom_value' => null, + )); + } + ``` + + * The alias option of the `form.type_extension` tag was removed in favor of + the `extended_type`/`extended-type` option. + + Before: + ```xml + + + + ``` + + After: + ```xml + + + + ``` + + * The `max_length` option was removed. Use the `attr` option instead by setting it to + an `array` with a `maxlength` key. + + * The `ChoiceToBooleanArrayTransformer`, `ChoicesToBooleanArrayTransformer`, + `FixRadioInputListener`, and `FixCheckboxInputListener` classes were removed. + + * The `choice_list` option of `ChoiceType` was removed. + + * The option "precision" was renamed to "scale". + + Before: + + ```php + use Symfony\Component\Form\Extension\Core\Type\NumberType; + + $builder->add('length', NumberType::class, array( + 'precision' => 3, + )); + ``` + + After: + + ```php + use Symfony\Component\Form\Extension\Core\Type\NumberType; + + $builder->add('length', NumberType::class, array( + 'scale' => 3, + )); + ``` + + * The option "`virtual`" was renamed to "`inherit_data`". + + Before: + + ```php + use Symfony\Component\Form\Extension\Core\Type\FormType; + + $builder->add('address', FormType::class, array( + 'virtual' => true, + )); + ``` + + After: + + ```php + use Symfony\Component\Form\Extension\Core\Type\FormType; + + $builder->add('address', FormType::class, array( + 'inherit_data' => true, + )); + ``` + + * The method `AbstractType::setDefaultOptions(OptionsResolverInterface $resolver)` and + `AbstractTypeExtension::setDefaultOptions(OptionsResolverInterface $resolver)` have been + renamed. You should use `AbstractType::configureOptions(OptionsResolver $resolver)` and + `AbstractTypeExtension::configureOptions(OptionsResolver $resolver)` instead. + + * The methods `Form::bind()` and `Form::isBound()` were removed. You should + use `Form::submit()` and `Form::isSubmitted()` instead. + + Before: + + ```php + $form->bind(array(...)); + ``` + + After: + + ```php + $form->submit(array(...)); + ``` + + * Passing a `Symfony\Component\HttpFoundation\Request` instance, as was + supported by `FormInterface::bind()`, is not possible with + `FormInterface::submit()` anymore. You should use `FormInterface::handleRequest()` + instead. + + Before: + + ```php + if ('POST' === $request->getMethod()) { + $form->bind($request); + + if ($form->isValid()) { + // ... + } + } + ``` + + After: + + ```php + $form->handleRequest($request); + + if ($form->isValid()) { + // ... + } + ``` + + If you want to test whether the form was submitted separately, you can use + the method `isSubmitted()`: + + ```php + $form->handleRequest($request); + + if ($form->isSubmitted()) { + // ... + + if ($form->isValid()) { + // ... + } + } + ``` + + * The events `PRE_BIND`, `BIND` and `POST_BIND` were renamed to `PRE_SUBMIT`, `SUBMIT` + and `POST_SUBMIT`. + + Before: + + ```php + $builder->addEventListener(FormEvents::PRE_BIND, function (FormEvent $event) { + // ... + }); + ``` + + After: + + ```php + $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { + // ... + }); + ``` + + * The class `VirtualFormAwareIterator` was renamed to `InheritDataAwareIterator`. + + Before: + + ```php + use Symfony\Component\Form\Util\VirtualFormAwareIterator; + + $iterator = new VirtualFormAwareIterator($forms); + ``` + + After: + + ```php + use Symfony\Component\Form\Util\InheritDataAwareIterator; + + $iterator = new InheritDataAwareIterator($forms); + ``` + + * The `TypeTestCase` class was moved from the `Symfony\Component\Form\Tests\Extension\Core\Type` namespace to the `Symfony\Component\Form\Test` namespace. + + Before: + + ```php + use Symfony\Component\Form\Tests\Extension\Core\Type\TypeTestCase + + class MyTypeTest extends TypeTestCase + { + // ... + } + ``` + + After: + + ```php + use Symfony\Component\Form\Test\TypeTestCase; + + class MyTypeTest extends TypeTestCase + { + // ... + } + ``` + + * The option "options" of the CollectionType has been renamed to "entry_options". + + * The option "type" of the CollectionType has been renamed to "entry_type". + As a value for the option you must provide the fully-qualified class name (FQCN) + now as well. + + * The `FormIntegrationTestCase` and `FormPerformanceTestCase` classes were moved form the `Symfony\Component\Form\Tests` namespace to the `Symfony\Component\Form\Test` namespace. + + * The constants `ROUND_HALFEVEN`, `ROUND_HALFUP` and `ROUND_HALFDOWN` in class + `NumberToLocalizedStringTransformer` were renamed to `ROUND_HALF_EVEN`, + `ROUND_HALF_UP` and `ROUND_HALF_DOWN`. + + * The `Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface` was + removed in favor of `Symfony\Component\Form\ChoiceList\ChoiceListInterface`. + + * `Symfony\Component\Form\Extension\Core\View\ChoiceView` was removed in favor of + `Symfony\Component\Form\ChoiceList\View\ChoiceView`. + + * The interface `Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface` + and all of its implementations were removed. Use the new interface + `Symfony\Component\Security\Csrf\CsrfTokenManagerInterface` instead. + + * The options "`csrf_provider`" and "`intention`" were renamed to "`csrf_token_generator`" + and "`csrf_token_id`". + + * The method `Form::getErrorsAsString()` was removed. Use `Form::getErrors()` + instead with the argument `$deep` set to true and `$flatten` set to false + and cast the returned iterator to a string (if not done implicitly by PHP). + + Before: + + ```php + echo $form->getErrorsAsString(); + ``` + + After: + + ```php + echo $form->getErrors(true, false); + ``` + + * The `Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceList` class has been removed in + favor of `Symfony\Component\Form\ChoiceList\ArrayChoiceList`. + + * The `Symfony\Component\Form\Extension\Core\ChoiceList\LazyChoiceList` class has been removed in + favor of `Symfony\Component\Form\ChoiceList\LazyChoiceList`. + + * The `Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList` class has been removed in + favor of `Symfony\Component\Form\ChoiceList\ArrayChoiceList`. + + * The `Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList` class has been removed in + favor of `Symfony\Component\Form\ChoiceList\ArrayChoiceList`. + + * The `TimezoneType::getTimezones()` method was removed. You should not use + this method. + + * The `Symfony\Component\Form\ChoiceList\ArrayKeyChoiceList` class has been removed in + favor of `Symfony\Component\Form\ChoiceList\ArrayChoiceList`. + +### FrameworkBundle + + * The `config:debug`, `container:debug`, `router:debug`, `translation:debug` + and `yaml:lint` commands have been deprecated since Symfony 2.7 and will + be removed in Symfony 3.0. Use the `debug:config`, `debug:container`, + `debug:router`, `debug:translation` and `lint:yaml` commands instead. + + * The base `Controller`class is now abstract. + + * The visibility of all methods of the base `Controller` class has been changed from + `public` to `protected`. + + * The `getRequest` method of the base `Controller` class has been deprecated + since Symfony 2.4 and must be therefore removed in 3.0. The only reliable + way to get the `Request` object is to inject it in the action method. + + Before: + + ```php + namespace Acme\FooBundle\Controller; + + class DemoController + { + public function showAction() + { + $request = $this->getRequest(); + // ... + } + } + ``` + + After: + + ```php + namespace Acme\FooBundle\Controller; + + use Symfony\Component\HttpFoundation\Request; + + class DemoController + { + public function showAction(Request $request) + { + // ... + } + } + ``` + + * In Symfony 2.7 a small BC break was introduced with the new choices_as_values + option. In order to have the choice values populated to the html value attribute + you had to define the choice_value option. This is now not any more needed. + + Before: + + ```php + $form->add('status', 'choice', array( + 'choices' => array( + 'Enabled' => Status::ENABLED, + 'Disabled' => Status::DISABLED, + 'Ignored' => Status::IGNORED, + ), + // choices_as_values defaults to true in Symfony 3.0 + // and setting it to anything else is deprecated as of 3.0 + 'choices_as_values' => true, + // important if you rely on your option value attribute (e.g. for JavaScript) + // this will keep the same functionality as before + 'choice_value' => function ($choice) { + return $choice; + }, + )); + ``` + + After: + + ```php + $form->add('status', ChoiceType::class, array( + 'choices' => array( + 'Enabled' => Status::ENABLED, + 'Disabled' => Status::DISABLED, + 'Ignored' => Status::IGNORED, + ) + )); + ``` + + * The `request` service was removed. You must inject the `request_stack` + service instead. + + * The `enctype` method of the `form` helper was removed. You should use the + new method `start` instead. + + Before: + + ```php +
    enctype($form) ?>> + ... +
    + ``` + + After: + + ```php + start($form) ?> + ... + end($form) ?> + ``` + + The method and action of the form default to "POST" and the current + document. If you want to change these values, you can set them explicitly in + the controller. + + Alternative 1: + + ```php + $form = $this->createForm('my_form', $formData, array( + 'method' => 'PUT', + 'action' => $this->generateUrl('target_route'), + )); + ``` + + Alternative 2: + + ```php + $form = $this->createFormBuilder($formData) + // ... + ->setMethod('PUT') + ->setAction($this->generateUrl('target_route')) + ->getForm(); + ``` + + It is also possible to override the method and the action in the template: + + ```php + start($form, array('method' => 'GET', 'action' => 'http://example.com')) ?> + ... + end($form) ?> + ``` + + * The `RouterApacheDumperCommand` was removed. + + * The `createEsi` method of `Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache` was removed. Use `createSurrogate` instead. + + * The `templating.helper.router` service was moved to `templating_php.xml`. You + have to ensure that the PHP templating engine is enabled to be able to use it: + + ```yaml + framework: + templating: + engines: ['php'] + ``` + + * The `form.csrf_provider` service is removed as it implements an adapter for + the new token manager to the deprecated + `Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface` + interface. + The `security.csrf.token_manager` should be used instead. + + * The `validator.mapping.cache.apc` service has been removed in favor of the `validator.mapping.cache.doctrine.apc` one. + + * The ability to pass `apc` as the `framework.validation.cache` configuration key value has been removed. + Use `validator.mapping.cache.doctrine.apc` instead: + + Before: + + ```yaml + framework: + validation: + cache: apc + ``` + + After: + + ```yaml + framework: + validation: + cache: validator.mapping.cache.doctrine.apc + ``` + +### HttpKernel + + * The `Symfony\Component\HttpKernel\Log\LoggerInterface` has been removed in + favor of `Psr\Log\LoggerInterface`. The only difference is that some method + names are different: + + | Old name | New name + | -------- | --- + | `emerg()` | `emergency()` + | `crit()` | `critical()` + | `err()` | `error()` + | `warn()` | `warning()` + + The previous method renames also happened to the following classes: + + * `Symfony\Bridge\Monolog\Logger` + * `Symfony\Component\HttpKernel\Log\NullLogger` + + * The `Symfony\Component\HttpKernel\Kernel::init()` method has been removed. + + * The following classes have been renamed as they have been moved to the + Debug component: + + | Old name | New name + | -------- | --- + | `Symfony\Component\HttpKernel\Debug\ErrorHandler` | `Symfony\Component\Debug\ErrorHandler` + | `Symfony\Component\HttpKernel\Debug\ExceptionHandler` | `Symfony\Component\Debug\ExceptionHandler` + | `Symfony\Component\HttpKernel\Exception\FatalErrorException` | `Symfony\Component\Debug\Exception\FatalErrorException` + | `Symfony\Component\HttpKernel\Exception\FlattenException` | `Symfony\Component\Debug\Exception\FlattenException` + + * The `Symfony\Component\HttpKernel\EventListener\ExceptionListener` now + passes the Request format as the `_format` argument instead of `format`. + + * The `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass` has been renamed to + `Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass` and moved to the EventDispatcher component. + +### Locale + + * The Locale component was removed and replaced by the Intl component. + Instead of the methods in `Symfony\Component\Locale\Locale`, you should use + these equivalent methods in `Symfony\Component\Intl\Intl` now: + + | Old way | New way + | ------- | --- + | `Locale::getDisplayCountries()` | `Intl::getRegionBundle()->getCountryNames()` + | `Locale::getCountries()` | `array_keys(Intl::getRegionBundle()->getCountryNames())` + | `Locale::getDisplayLanguages()` | `Intl::getLanguageBundle()->getLanguageNames()` + | `Locale::getLanguages()` | `array_keys(Intl::getLanguageBundle()->getLanguageNames())` + | `Locale::getDisplayLocales()` | `Intl::getLocaleBundle()->getLocaleNames()` + | `Locale::getLocales()` | `array_keys(Intl::getLocaleBundle()->getLocaleNames())` + +### PropertyAccess + + * Renamed `PropertyAccess::getPropertyAccessor` to `createPropertyAccessor`. + + Before: + + ```php + use Symfony\Component\PropertyAccess\PropertyAccess; + + $accessor = PropertyAccess::getPropertyAccessor(); + ``` + + After: + + ```php + use Symfony\Component\PropertyAccess\PropertyAccess; + + $accessor = PropertyAccess::createPropertyAccessor(); + ``` + +### Routing + + * Some route settings have been renamed: + + * The `pattern` setting has been removed in favor of `path` + * The `_scheme` and `_method` requirements have been moved to the `schemes` and `methods` settings + + Before: + + ```yaml + article_edit: + pattern: /article/{id} + requirements: { '_method': 'POST|PUT', '_scheme': 'https', 'id': '\d+' } + ``` + + ```xml + + POST|PUT + https + \d+ + + ``` + + ```php + $route = new Route(); + $route->setPattern('/article/{id}'); + $route->setRequirement('_method', 'POST|PUT'); + $route->setRequirement('_scheme', 'https'); + ``` + + After: + + ```yaml + article_edit: + path: /article/{id} + methods: [POST, PUT] + schemes: https + requirements: { 'id': '\d+' } + ``` + + ```xml + + \d+ + + ``` + + ```php + $route = new Route(); + $route->setPath('/article/{id}'); + $route->setMethods(array('POST', 'PUT')); + $route->setSchemes('https'); + ``` + + * The `ApacheMatcherDumper` and `ApacheUrlMatcher` were removed since + the performance gains were minimal and it's hard to replicate the behaviour + of PHP implementation. + + * The `getMatcherDumperInstance()` and `getGeneratorDumperInstance()` methods in the + `Symfony\Component\Routing\Router` have been changed from `public` to `protected`. + + * Use the constants defined in the UrlGeneratorInterface for the $referenceType argument of the UrlGeneratorInterface::generate method. + + Before: + + ```php + // url generated in controller + $this->generateUrl('blog_show', array('slug' => 'my-blog-post'), true); + + // url generated in @router service + $router->generate('blog_show', array('slug' => 'my-blog-post'), true); + ``` + + After: + + ```php + use Symfony\Component\Routing\Generator\UrlGeneratorInterface; + + // url generated in controller + $this->generateUrl('blog_show', array('slug' => 'my-blog-post'), UrlGeneratorInterface::ABSOLUTE_URL); + + // url generated in @router service + $router->generate('blog_show', array('slug' => 'my-blog-post'), UrlGeneratorInterface::ABSOLUTE_URL); + ``` + +### Security + + * The `vote()` method from the `VoterInterface` was changed to now accept arbitrary + types and not only objects. You can rely on the new abstract `Voter` class introduced + in 2.8 to ease integrating your own voters. + + * The `AbstractVoter` class was removed in favor of the new `Voter` class. + + * The `Resources/` directory was moved to `Core/Resources/` + + * The `key` settings of `anonymous`, `remember_me` and `http_digest` are + renamed to `secret`. + + Before: + + ```yaml + security: + # ... + firewalls: + default: + # ... + anonymous: { key: "%secret%" } + remember_me: + key: "%secret%" + http_digest: + key: "%secret%" + ``` + + ```xml + + + + + + + + + + + + + ``` + + ```php + // ... + $container->loadFromExtension('security', array( + // ... + 'firewalls' => array( + // ... + 'anonymous' => array('key' => '%secret%'), + 'remember_me' => array('key' => '%secret%'), + 'http_digest' => array('key' => '%secret%'), + ), + )); + ``` + + After: + + ```yaml + security: + # ... + firewalls: + default: + # ... + anonymous: { secret: "%secret%" } + remember_me: + secret: "%secret%" + http_digest: + secret: "%secret%" + ``` + + ```xml + + + + + + + + + + + + + ``` + + ```php + // ... + $container->loadFromExtension('security', array( + // ... + 'firewalls' => array( + // ... + 'anonymous' => array('secret' => '%secret%'), + 'remember_me' => array('secret' => '%secret%'), + 'http_digest' => array('secret' => '%secret%'), + ), + )); + ``` + + * The `AbstractVoter` class was removed. Instead, extend the new `Voter` class, + introduced in 2.8, and move your voting logic to the to the `supports($attribute, $subject)` + and `voteOnAttribute($attribute, $object, TokenInterface $token)` methods. + + * The `vote()` method from the `VoterInterface` was changed to now accept arbitrary + types, and not only objects. + + * The `supportsClass` and `supportsAttribute` methods were + removed from the `VoterInterface` interface. + + Before: + + ```php + class MyVoter extends AbstractVoter + { + protected function getSupportedAttributes() + { + return array('CREATE', 'EDIT'); + } + + protected function getSupportedClasses() + { + return array('AppBundle\Entity\Post'); + } + + // ... + } + ``` + + After: + + ```php + use Symfony\Component\Security\Core\Authorization\Voter\Voter; + + class MyVoter extends Voter + { + protected function supports($attribute, $object) + { + return $object instanceof Post && in_array($attribute, array('CREATE', 'EDIT')); + } + + protected function voteOnAttribute($attribute, $object, TokenInterface $token) + { + // Return true or false + } + } + ``` + + * The `AbstractVoter::isGranted()` method has been replaced by `Voter::voteOnAttribute()`. + + Before: + + ```php + class MyVoter extends AbstractVoter + { + protected function isGranted($attribute, $object, $user = null) + { + return 'EDIT' === $attribute && $user === $object->getAuthor(); + } + + // ... + } + ``` + + After: + + ```php + class MyVoter extends Voter + { + protected function voteOnAttribute($attribute, $object, TokenInterface $token) + { + return 'EDIT' === $attribute && $token->getUser() === $object->getAuthor(); + } + + // ... + } + ``` + + * The `supportsAttribute()` and `supportsClass()` methods of the `AuthenticatedVoter`, `ExpressionVoter`, + and `RoleVoter` classes have been removed. + + * The `intention` option was renamed to `csrf_token_id` for all the authentication listeners. + + * The `csrf_provider` option was renamed to `csrf_token_generator` for all the authentication listeners. + +### SecurityBundle + + * The `intention` firewall listener setting was renamed to `csrf_token_id`. + + * The `csrf_provider` firewall listener setting was renamed to `csrf_token_generator`. + +### Serializer + + * The `setCamelizedAttributes()` method of the + `Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer` and + `Symfony\Component\Serializer\Normalizer\PropertyNormalizer` classes + was removed. + + * The `Symfony\Component\Serializer\Exception\Exception` interface was removed + in favor of the new `Symfony\Component\Serializer\Exception\ExceptionInterface`. + +### Translator + + * The `Translator::setFallbackLocale()` method has been removed in favor of + `Translator::setFallbackLocales()`. + + * The visibility of the `locale` property has been changed from protected to private. Rely on `getLocale` and `setLocale` + instead. + + Before: + + ```php + class CustomTranslator extends Translator + { + public function fooMethod() + { + // get locale + $locale = $this->locale; + + // update locale + $this->locale = $locale; + } + } + ``` + + After: + + ```php + class CustomTranslator extends Translator + { + public function fooMethod() + { + // get locale + $locale = $this->getLocale(); + + // update locale + $this->setLocale($locale); + } + } + ``` + + * The method `FileDumper::format()` was removed. You should use + `FileDumper::formatCatalogue()` instead. + + Before: + + ```php + class CustomDumper extends FileDumper + { + protected function format(MessageCatalogue $messages, $domain) + { + ... + } + } + ``` + + After: + + ```php + class CustomDumper extends FileDumper + { + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + ... + } + } + ``` + + * The `getMessages()` method of the `Symfony\Component\Translation\Translator` + class was removed. You should use the `getCatalogue()` method of the + `Symfony\Component\Translation\TranslatorBagInterface`. + +### Twig Bridge + + * The `twig:lint` command has been deprecated since Symfony 2.7 and will be + removed in Symfony 3.0. Use the `lint:twig` command instead. + + * The `render` tag is deprecated in favor of the `render` function. + + * The `form_enctype` helper was removed. You should use the new `form_start` + function instead. + + Before: + + ```php +
    + ... +
    + ``` + + After: + + ```jinja + {{ form_start(form) }} + ... + {{ form_end(form) }} + ``` + + The method and action of the form default to "POST" and the current + document. If you want to change these values, you can set them explicitly in + the controller. + + Alternative 1: + + ```php + $form = $this->createForm('my_form', $formData, array( + 'method' => 'PUT', + 'action' => $this->generateUrl('target_route'), + )); + ``` + + Alternative 2: + + ```php + $form = $this->createFormBuilder($formData) + // ... + ->setMethod('PUT') + ->setAction($this->generateUrl('target_route')) + ->getForm(); + ``` + + It is also possible to override the method and the action in the template: + + ```jinja + {{ form_start(form, {'method': 'GET', 'action': 'http://example.com'}) }} + ... + {{ form_end(form) }} + ``` + +### TwigBundle + + * The `Symfony\Bundle\TwigBundle\TwigDefaultEscapingStrategy` was removed + in favor of `Twig_FileExtensionEscapingStrategy`. + + * The `twig:debug` command has been deprecated since Symfony 2.7 and will be + removed in Symfony 3.0. Use the `debug:twig` command instead. + +### Validator + + * The PHP7-incompatible constraints (`Null`, `True`, `False`) and their related + validators (`NullValidator`, `TrueValidator`, `FalseValidator`) have been + removed in favor of their `Is`-prefixed equivalent. + + * The class `Symfony\Component\Validator\Mapping\Cache\ApcCache` has been removed in favor + of `Symfony\Component\Validator\Mapping\Cache\DoctrineCache`. + + Before: + + ```php + use Symfony\Component\Validator\Mapping\Cache\ApcCache; + + $cache = new ApcCache('symfony.validator'); + ``` + + After: + + ```php + use Symfony\Component\Validator\Mapping\Cache\DoctrineCache; + use Doctrine\Common\Cache\ApcCache; + + $apcCache = new ApcCache(); + $apcCache->setNamespace('symfony.validator'); + + $cache = new DoctrineCache($apcCache); + ``` + + * The constraints `Optional` and `Required` were moved to the + `Symfony\Component\Validator\Constraints\` namespace. You should adapt + the path wherever you used them. + + Before: + + ```php + use Symfony\Component\Validator\Constraints as Assert; + + /** + * @Assert\Collection({ + * "foo" = @Assert\Collection\Required(), + * "bar" = @Assert\Collection\Optional(), + * }) + */ + private $property; + ``` + + After: + + ```php + use Symfony\Component\Validator\Constraints as Assert; + + /** + * @Assert\Collection({ + * "foo" = @Assert\Required(), + * "bar" = @Assert\Optional(), + * }) + */ + private $property; + ``` + + * The option "`methods`" of the `Callback` constraint was removed. You should + use the option "`callback`" instead. If you have multiple callbacks, add + multiple callback constraints instead. + + Before (YAML): + + ```yaml + constraints: + - Callback: [firstCallback, secondCallback] + ``` + + After (YAML): + + ```yaml + constraints: + - Callback: firstCallback + - Callback: secondCallback + ``` + + When using annotations, you can now put the `Callback` constraint directly on + the method that should be executed. + + Before (Annotations): + + ```php + use Symfony\Component\Validator\Constraints as Assert; + use Symfony\Component\Validator\ExecutionContextInterface; + + /** + * @Assert\Callback({"callback"}) + */ + class MyClass + { + public function callback(ExecutionContextInterface $context) + { + // ... + } + } + ``` + + After (Annotations): + + ```php + use Symfony\Component\Validator\Constraints as Assert; + use Symfony\Component\Validator\ExecutionContextInterface; + + class MyClass + { + /** + * @Assert\Callback + */ + public function callback(ExecutionContextInterface $context) + { + // ... + } + } + ``` + + * The interface `ValidatorInterface` was replaced by the more powerful + interface `Validator\ValidatorInterface`. The signature of the `validate()` + method is slightly different in that interface and accepts a value, zero + or more constraints and validation group. It replaces both + `validate()` and `validateValue()` in the previous interface. + + Before: + + ```php + $validator->validate($object, 'Strict'); + + $validator->validateValue($value, new NotNull()); + ``` + + After: + + ```php + $validator->validate($object, null, 'Strict'); + + $validator->validate($value, new NotNull()); + ``` + + Apart from this change, the new methods `startContext()` and `inContext()` + were added. The first of them allows to run multiple validations in the + same context and aggregate their violations: + + ```php + $violations = $validator->startContext() + ->atPath('firstName')->validate($firstName, new NotNull()) + ->atPath('age')->validate($age, new Type('integer')) + ->getViolations(); + ``` + + The second allows to run validation in an existing context. This is + especially useful when calling the validator from within constraint + validators: + + ```php + $validator->inContext($context)->validate($object); + ``` + + Instead of a `Validator`, the validator builder now returns a + `Validator\RecursiveValidator` instead. + + * The interface `ValidationVisitorInterface` and its implementation + `ValidationVisitor` were removed. The implementation of the visitor pattern + was flawed. Fixing that implementation would have drastically slowed down + the validator execution, so the visitor was removed completely instead. + + Along with the visitor, the method `accept()` was removed from + `MetadataInterface`. + + * The interface `MetadataInterface` was moved to the `Mapping` namespace. + + Before: + + ```php + use Symfony\Component\Validator\MetadataInterface; + ``` + + After: + + ```php + use Symfony\Component\Validator\Mapping\MetadataInterface; + ``` + + The methods `getCascadingStrategy()` and `getTraversalStrategy()` were + added to the interface. The first method should return a bit mask of the + constants in class `CascadingStrategy`. The second should return a bit + mask of the constants in `TraversalStrategy`. + + Example: + + ```php + use Symfony\Component\Validator\Mapping\TraversalStrategy; + + public function getTraversalStrategy() + { + return TraversalStrategy::TRAVERSE; + } + ``` + + * The interface `PropertyMetadataInterface` was moved to the `Mapping` + namespace. + + Before: + + ```php + use Symfony\Component\Validator\PropertyMetadataInterface; + ``` + + After: + + ```php + use Symfony\Component\Validator\Mapping\PropertyMetadataInterface; + ``` + + * The interface `PropertyMetadataContainerInterface` was moved to the `Mapping` + namespace and renamed to `ClassMetadataInterface`. + + Before: + + ```php + use Symfony\Component\Validator\PropertyMetadataContainerInterface; + ``` + + After: + + ```php + use Symfony\Component\Validator\Mapping\ClassMetadataInterface; + ``` + + The interface now contains four additional methods: + + * `getConstrainedProperties()` + * `hasGroupSequence()` + * `getGroupSequence()` + * `isGroupSequenceProvider()` + + See the inline documentation of these methods for more information. + + * The interface `ClassBasedInterface` was removed. You should use + `Mapping\ClassMetadataInterface` instead: + + Before: + + ```php + use Symfony\Component\Validator\ClassBasedInterface; + + class MyClassMetadata implements ClassBasedInterface + { + // ... + } + ``` + + After: + + ```php + use Symfony\Component\Validator\Mapping\ClassMetadataInterface; + + class MyClassMetadata implements ClassMetadataInterface + { + // ... + } + ``` + + * The class `ElementMetadata` was renamed to `GenericMetadata`. + + Before: + + ```php + use Symfony\Component\Validator\Mapping\ElementMetadata; + + class MyMetadata extends ElementMetadata + { + } + ``` + + After: + + ```php + use Symfony\Component\Validator\Mapping\GenericMetadata; + + class MyMetadata extends GenericMetadata + { + } + ``` + + * The interface `ExecutionContextInterface` and its implementation + `ExecutionContext` were moved to the `Context` namespace. + + Before: + + ```php + use Symfony\Component\Validator\ExecutionContextInterface; + ``` + + After: + + ```php + use Symfony\Component\Validator\Context\ExecutionContextInterface; + ``` + + The interface now contains the following additional methods: + + * `getValidator()` + * `getObject()` + * `setNode()` + * `setGroup()` + * `markGroupAsValidated()` + * `isGroupValidated()` + * `markConstraintAsValidated()` + * `isConstraintValidated()` + + See the inline documentation of these methods for more information. + + The method `addViolationAt()` was removed. You should use `buildViolation()` + instead. + + Before: + + ```php + $context->addViolationAt('property', 'The value {{ value }} is invalid.', array( + '{{ value }}' => $invalidValue, + )); + ``` + + After: + + ```php + $context->buildViolation('The value {{ value }} is invalid.') + ->atPath('property') + ->setParameter('{{ value }}', $invalidValue) + ->addViolation(); + ``` + + The methods `validate()` and `validateValue()` were removed. You should use + `getValidator()` together with `inContext()` instead. + + Before: + + ```php + $context->validate($object); + ``` + + After: + + ```php + $context->getValidator() + ->inContext($context) + ->validate($object); + ``` + + The parameters `$invalidValue`, `$plural` and `$code` were removed from + `addViolation()`. You should use `buildViolation()` instead. See above for + an example. + + The method `getMetadataFactory()` was removed. You can use `getValidator()` + instead and use the methods `getMetadataFor()` or `hasMetadataFor()` on the + validator instance. + + Before: + + ```php + $metadata = $context->getMetadataFactory()->getMetadataFor($myClass); + ``` + + After: + + ```php + $metadata = $context->getValidator()->getMetadataFor($myClass); + ``` + + * The interface `GlobalExecutionContextInterface` was removed. Most of the + information provided by that interface can be queried from + `Context\ExecutionContextInterface` instead. + + * The interface `MetadataFactoryInterface` was moved to the `Mapping\Factory` + namespace along with its implementations `BlackholeMetadataFactory` and + `ClassMetadataFactory`. These classes were furthermore renamed to + `BlackHoleMetadataFactory` and `LazyLoadingMetadataFactory`. + + Before: + + ```php + use Symfony\Component\Validator\Mapping\ClassMetadataFactory; + + $factory = new ClassMetadataFactory($loader); + ``` + + After: + + ```php + use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; + + $factory = new LazyLoadingMetadataFactory($loader); + ``` + + * The option `$deep` was removed from the constraint `Valid`. When traversing + arrays, nested arrays are always traversed (same behavior as before). When + traversing nested objects, their traversal strategy is used. + + * The method `ValidatorBuilder::setPropertyAccessor()` was removed. The + validator now functions without a property accessor. + + * The methods `getMessageParameters()` and `getMessagePluralization()` in + `ConstraintViolation` were renamed to `getParameters()` and `getPlural()`. + + Before: + + ```php + $parameters = $violation->getMessageParameters(); + $plural = $violation->getMessagePluralization(); + ``` + + After: + + ```php + $parameters = $violation->getParameters(); + $plural = $violation->getPlural(); + ``` + + * The class `Symfony\Component\Validator\DefaultTranslator` was removed. You + should use `Symfony\Component\Translation\IdentityTranslator` instead. + + Before: + + ```php + $translator = new \Symfony\Component\Validator\DefaultTranslator(); + ``` + + After: + + ```php + $translator = new \Symfony\Component\Translation\IdentityTranslator(); + $translator->setLocale('en'); + ``` + +### Yaml + + * Using a colon in an unquoted mapping value leads to a `ParseException`. + * Starting an unquoted string with `@`, `` ` ``, `|`, or `>` leads to a `ParseException`. + * When surrounding strings with double-quotes, you must now escape `\` characters. Not + escaping those characters (when surrounded by double-quotes) leads to a `ParseException`. + + Before: + + ```yml + class: "Foo\Var" + ``` + + After: + + ```yml + class: "Foo\\Var" + ``` + + + * The ability to pass file names to `Yaml::parse()` has been removed. + + Before: + + ```php + Yaml::parse($fileName); + ``` + + After: + + ```php + Yaml::parse(file_get_contents($fileName)); + ``` + +### WebProfiler + + * The `profiler:import` and `profiler:export` commands have been removed. + + * All the profiler storages different than `FileProfilerStorage` have been + removed. The removed classes are: + + - `Symfony\Component\HttpKernel\Profiler\BaseMemcacheProfilerStorage` + - `Symfony\Component\HttpKernel\Profiler\MemcachedProfilerStorage` + - `Symfony\Component\HttpKernel\Profiler\MemcacheProfilerStorage` + - `Symfony\Component\HttpKernel\Profiler\MongoDbProfilerStorage` + - `Symfony\Component\HttpKernel\Profiler\MysqlProfilerStorage` + - `Symfony\Component\HttpKernel\Profiler\PdoProfilerStorage` + - `Symfony\Component\HttpKernel\Profiler\RedisProfilerStorage` + - `Symfony\Component\HttpKernel\Profiler\SqliteProfilerStorage` + +### Process + + * `Process::setStdin()` and `Process::getStdin()` have been removed. Use + `Process::setInput()` and `Process::getInput()` that works the same way. + * `Process::setInput()` and `ProcessBuilder::setInput()` do not accept non-scalar types. + +### Monolog Bridge + + * `Symfony\Bridge\Monolog\Logger::emerg()` was removed. Use `emergency()` which is PSR-3 compatible. + * `Symfony\Bridge\Monolog\Logger::crit()` was removed. Use `critical()` which is PSR-3 compatible. + * `Symfony\Bridge\Monolog\Logger::err()` was removed. Use `error()` which is PSR-3 compatible. + * `Symfony\Bridge\Monolog\Logger::warn()` was removed. Use `warning()` which is PSR-3 compatible. + +### Swiftmailer Bridge + + * `Symfony\Bridge\Swiftmailer\DataCollector\MessageDataCollector` was removed. Use the `Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector` class instead. + +### HttpFoundation + + * The precedence of parameters returned from `Request::get()` changed from "GET, PATH, BODY" to "PATH, GET, BODY" + + * `Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface` no longer implements the `IteratorAggregate` interface. Use the `all()` method instead of iterating over the flash bag. + + * Removed the feature that allowed finding deep items in `ParameterBag::get()`. + This may affect you when getting parameters from the `Request` class: + + Before: + + ```php + $request->query->get('foo[bar]', null, true); + ``` + + After: + + ```php + $request->query->get('foo')['bar']; + ``` +### Monolog Bridge + + * `Symfony\Bridge\Monolog\Logger::emerg()` was removed. Use `emergency()` which is PSR-3 compatible. + * `Symfony\Bridge\Monolog\Logger::crit()` was removed. Use `critical()` which is PSR-3 compatible. + * `Symfony\Bridge\Monolog\Logger::err()` was removed. Use `error()` which is PSR-3 compatible. + * `Symfony\Bridge\Monolog\Logger::warn()` was removed. Use `warning()` which is PSR-3 compatible. diff --git a/vendor/symfony/symfony/UPGRADE-3.1.md b/vendor/symfony/symfony/UPGRADE-3.1.md new file mode 100644 index 0000000000000000000000000000000000000000..58ce838cfb71450f62a2ff0cad7fdf8559622add --- /dev/null +++ b/vendor/symfony/symfony/UPGRADE-3.1.md @@ -0,0 +1,215 @@ +UPGRADE FROM 3.0 to 3.1 +======================= + +DependencyInjection +------------------- + + * Using unsupported configuration keys in YAML configuration files has been + deprecated and will raise an exception in Symfony 4.0. + + * Using unsupported options to configure service aliases has been deprecated + and will raise an exception in Symfony 4.0. + +Form +---- + + * The `choices_as_values` option of the `ChoiceType` has been deprecated and + will be removed in Symfony 4.0. + + * Support for data objects that implements both `Traversable` and `ArrayAccess` + in `ResizeFormListener::preSubmit` method has been deprecated and will be + removed in Symfony 4.0. + * `TextType` now implements `DataTransformerInterface` and will always return + an empty string when `empty_data` option is explicitly assigned to it. + + * Using callable strings as choice options in ChoiceType has been deprecated + in favor of `PropertyPath` in Symfony 4.0 use a "\Closure" instead. + + Before: + + ```php + 'choice_value' => new PropertyPath('range'), + 'choice_label' => 'strtoupper', + ``` + + After: + + ```php + 'choice_value' => 'range', + 'choice_label' => function ($choice) { + return strtoupper($choice); + }, + ``` + + * Caching of the loaded `ChoiceListInterface` in the `LazyChoiceList` has been deprecated, + it must be cached in the `ChoiceLoaderInterface` implementation instead. + +FrameworkBundle +--------------- + + * As it was never an officially supported feature, the support for absolute + template paths has been deprecated and will be removed in Symfony 4.0. + + * The abstract `Controller` class now has a `json()` helper method that creates + a `JsonResponse`. If you have existing controllers extending `Controller` + that contain a method with this name, you need to rename that method to avoid + conflicts. + + * The following form types registered as services have been deprecated and + will be removed in Symfony 4.0; use their fully-qualified class name instead: + + - `"form.type.birthday"` + - `"form.type.checkbox"` + - `"form.type.collection"` + - `"form.type.country"` + - `"form.type.currency"` + - `"form.type.date"` + - `"form.type.datetime"` + - `"form.type.email"` + - `"form.type.file"` + - `"form.type.hidden"` + - `"form.type.integer"` + - `"form.type.language"` + - `"form.type.locale"` + - `"form.type.money"` + - `"form.type.number"` + - `"form.type.password"` + - `"form.type.percent"` + - `"form.type.radio"` + - `"form.type.range"` + - `"form.type.repeated"` + - `"form.type.search"` + - `"form.type.textarea"` + - `"form.type.text"` + - `"form.type.time"` + - `"form.type.timezone"` + - `"form.type.url"` + - `"form.type.button"` + - `"form.type.submit"` + - `"form.type.reset"` + + * The `framework.serializer.cache` option and the service + `serializer.mapping.cache.apc` have been deprecated. APCu should now be + automatically used when available. + +HttpKernel +---------- + + * Passing non-scalar values as URI attributes to the ESI and SSI renderers has been + deprecated and will be removed in Symfony 4.0. The inline fragment + renderer should be used with non-scalar attributes. + + * The `ControllerResolver::getArguments()` method has been deprecated and will + be removed in 4.0. If you have your own `ControllerResolverInterface` + implementation, you should inject either an `ArgumentResolverInterface` + instance or the new `ArgumentResolver` in the `HttpKernel`. + +Serializer +---------- + + * Passing a Doctrine `Cache` instance to the `ClassMetadataFactory` has been + deprecated and will not be supported in Symfony 4.0. You should use the + `CacheClassMetadataFactory` class instead. + + * The `AbstractObjectNormalizer::isAttributeToNormalize()` method has been removed + because it was initially added by mistake, has never been used and is not tested + nor documented. + +Translation +----------- + + * Deprecated the backup feature of the file dumper classes. It will be removed + in Symfony 4.0. + +Yaml +---- + + * Usage of `%` at the beginning of an unquoted string has been deprecated and + will lead to a `ParseException` in Symfony 4.0. + + * The `Dumper::setIndentation()` method is deprecated and will be removed in + Symfony 4.0. Pass the indentation level to the constructor instead. + + * Deprecated support for passing `true`/`false` as the second argument to the + `parse()` method to trigger exceptions when an invalid type was passed. + + Before: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', true); + ``` + + After: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE); + ``` + + * Deprecated support for passing `true`/`false` as the third argument to the + `parse()` method to toggle object support. + + Before: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', false, true); + ``` + + After: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', Yaml::PARSE_OBJECT); + ``` + + * Deprecated support for passing `true`/`false` as the fourth argument to the + `parse()` method to parse objects as maps. + + Before: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', false, false, true); + ``` + + After: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', Yaml::PARSE_OBJECT_FOR_MAP); + ``` + + * Deprecated support for passing `true`/`false` as the fourth argument to the + `dump()` method to trigger exceptions when an invalid type was passed. + + Before: + + ```php + Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, true); + ``` + + After: + + ```php + Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE); + ``` + + * Deprecated support for passing `true`/`false` as the fifth argument to the + `dump()` method to toggle object support. + + Before: + + ```php + Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, true); + ``` + + After: + + ```php + Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_OBJECT); + ``` + + * The `!!php/object` tag to indicate dumped PHP objects has been deprecated + and will be removed in Symfony 4.0. Use the `!php/object` tag instead. + +Validator +--------- + + * The `DateTimeValidator::PATTERN` constant has been deprecated and will be + removed in Symfony 4.0. diff --git a/vendor/symfony/symfony/UPGRADE-3.2.md b/vendor/symfony/symfony/UPGRADE-3.2.md new file mode 100644 index 0000000000000000000000000000000000000000..e151275472755ef6e0b4f4a77066e3796a0fc600 --- /dev/null +++ b/vendor/symfony/symfony/UPGRADE-3.2.md @@ -0,0 +1,267 @@ +UPGRADE FROM 3.1 to 3.2 +======================= + +BrowserKit +---------- + + * Client HTTP user agent has been changed to 'Symfony BrowserKit' (was 'Symfony2 BrowserKit' before). + +Console +------- + + * Setting unknown style options is deprecated and will throw an exception in + Symfony 4.0. + + * The `QuestionHelper::setInputStream()` method is deprecated and will be + removed in Symfony 4.0. Use `StreamableInputInterface::setStream()` or + `CommandTester::setInputs()` instead. + + Before: + + ```php + $input = new ArrayInput(); + + $questionHelper->setInputStream($stream); + $questionHelper->ask($input, $output, $question); + ``` + + After: + + ```php + $input = new ArrayInput(); + $input->setStream($stream); + + $questionHelper->ask($input, $output, $question); + ``` + + Before: + + ```php + $commandTester = new CommandTester($command); + + $stream = fopen('php://memory', 'r+', false); + fputs($stream, "AppBundle\nYes"); + rewind($stream); + + $command->getHelper('question')->setInputStream($stream); + + $commandTester->execute(); + ``` + + After: + + ```php + $commandTester = new CommandTester($command); + + $commandTester->setInputs(array('AppBundle', 'Yes')); + + $commandTester->execute(); + ``` + +DependencyInjection +------------------- + + * Calling `get()` on a `ContainerBuilder` instance before compiling the + container is deprecated and will throw an exception in Symfony 4.0. + +ExpressionLanguage +------------------- + + * Passing a `ParserCacheInterface` instance to the `ExpressionLanguage` has been + deprecated and will not be supported in Symfony 4.0. You should use the + `CacheItemPoolInterface` interface instead. + +Form +---- + + * Calling `isValid()` on a `Form` instance before submitting it + is deprecated and will throw an exception in Symfony 4.0. + + Before: + + ```php + if ($form->isValid()) { + // ... + } + ``` + + After: + + ```php + if ($form->isSubmitted() && $form->isValid()) { + // ... + } + ``` + +FrameworkBundle +--------------- + + * The `doctrine/annotations` dependency has been removed; require it via `composer + require doctrine/annotations` if you are using annotations in your project + * The `symfony/security-core` and `symfony/security-csrf` dependencies have + been removed; require them via `composer require symfony/security-core + symfony/security-csrf` if you depend on them and don't already depend on + `symfony/symfony` + * The `symfony/templating` dependency has been removed; require it via `composer + require symfony/templating` if you depend on it and don't already depend on + `symfony/symfony` + * The `symfony/translation` dependency has been removed; require it via `composer + require symfony/translation` if you depend on it and don't already depend on + `symfony/symfony` + * The `symfony/asset` dependency has been removed; require it via `composer + require symfony/asset` if you depend on it and don't already depend on + `symfony/symfony` + * The `Resources/public/images/*` files have been removed. + * The `Resources/public/css/*.css` files have been removed (they are now inlined + in TwigBundle). + * The service `serializer.mapping.cache.doctrine.apc` is deprecated. APCu should now + be automatically used when available. + +HttpFoundation +--------------- + + * Extending the following methods of `Response` + is deprecated (these methods will be `final` in 4.0): + + - `setDate`/`getDate` + - `setExpires`/`getExpires` + - `setLastModified`/`getLastModified` + - `setProtocolVersion`/`getProtocolVersion` + - `setStatusCode`/`getStatusCode` + - `setCharset`/`getCharset` + - `setPrivate`/`setPublic` + - `getAge` + - `getMaxAge`/`setMaxAge` + - `setSharedMaxAge` + - `getTtl`/`setTtl` + - `setClientTtl` + - `getEtag`/`setEtag` + - `hasVary`/`getVary`/`setVary` + - `isInvalid`/`isSuccessful`/`isRedirection`/`isClientError`/`isServerError` + - `isOk`/`isForbidden`/`isNotFound`/`isRedirect`/`isEmpty` + + * Checking only for cacheable HTTP methods with `Request::isMethodSafe()` is deprecated + since version 3.2 and will throw an exception in 4.0. Disable checking only for + cacheable methods by calling the method with `false` as first argument or use + `Request::isMethodCacheable()` instead. + +HttpKernel +---------- + + * `DataCollector::varToString()` is deprecated and will be removed in Symfony + 4.0. Use the `cloneVar()` method instead. + + * Surrogate name in a `Surrogate-Capability` HTTP request header has been changed to 'symfony'. + + Before: + ``` + Surrogate-Capability: symfony2="ESI/1.0" + ``` + + After: + ``` + Surrogate-Capability: symfony="ESI/1.0" + ``` + +Router +------ + + * `UrlGenerator` now generates URLs in compliance with [`RFC 3986`](https://www.ietf.org/rfc/rfc3986.txt), + which means spaces will be percent encoded (%20) inside query strings. + +Serializer +---------- + + * Method `AbstractNormalizer::instantiateObject()` will have a 6th + `$format = null` argument in Symfony 4.0. Not defining it when overriding + the method is deprecated. + +TwigBridge +---------- + + * Injecting the Form `TwigRenderer` into the `FormExtension` is deprecated and has no more effect. + Upgrade Twig to `^1.30`, inject the `Twig_Environment` into the `TwigRendererEngine` and load + the `TwigRenderer` using the `Twig_FactoryRuntimeLoader` instead. + + Before: + + ```php + use Symfony\Bridge\Twig\Extension\FormExtension; + use Symfony\Bridge\Twig\Form\TwigRenderer; + use Symfony\Bridge\Twig\Form\TwigRendererEngine; + + // ... + $rendererEngine = new TwigRendererEngine(array('form_div_layout.html.twig')); + $rendererEngine->setEnvironment($twig); + $twig->addExtension(new FormExtension(new TwigRenderer($rendererEngine, $csrfTokenManager))); + ``` + + After: + + ```php + $rendererEngine = new TwigRendererEngine(array('form_div_layout.html.twig'), $twig); + $twig->addRuntimeLoader(new \Twig_FactoryRuntimeLoader(array( + TwigRenderer::class => function () use ($rendererEngine, $csrfTokenManager) { + return new TwigRenderer($rendererEngine, $csrfTokenManager); + }, + ))); + $twig->addExtension(new FormExtension()); + ``` + + * Deprecated the `TwigRendererEngineInterface` interface, it will be removed in 4.0. + +Validator +--------- + + * `Tests\Constraints\AbstractConstraintValidatorTest` has been deprecated in + favor of `Test\ConstraintValidatorTestCase`. + + Before: + + ```php + // ... + use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest; + + class MyCustomValidatorTest extends AbstractConstraintValidatorTest + { + // ... + } + ``` + + After: + + ```php + // ... + use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + + class MyCustomValidatorTest extends ConstraintValidatorTestCase + { + // ... + } + ``` + + * Setting the strict option of the `Choice` Constraint to `false` has been + deprecated and the option will be changed to `true` as of 4.0. + + ```php + // ... + use Symfony\Component\Validator\Constraints as Assert; + + class MyEntity + { + /** + * @Assert\Choice(choices={"MR", "MRS"}, strict=true) + */ + private $salutation; + } + ``` + +Yaml +---- + + * Support for silently ignoring duplicate mapping keys in YAML has been + deprecated and will lead to a `ParseException` in Symfony 4.0. + + * Mappings with a colon (`:`) that is not followed by a whitespace are deprecated + and will lead to a `ParseException` in Symfony 4.0 (e.g. `foo:bar` must be + `foo: bar`). diff --git a/vendor/symfony/symfony/UPGRADE-4.0.md b/vendor/symfony/symfony/UPGRADE-4.0.md new file mode 100644 index 0000000000000000000000000000000000000000..72274830a24f70e9ec05b5e0a426275040f5946f --- /dev/null +++ b/vendor/symfony/symfony/UPGRADE-4.0.md @@ -0,0 +1,392 @@ +UPGRADE FROM 3.x to 4.0 +======================= + +Console +------- + + * Setting unknown style options is not supported anymore and throws an + exception. + + * The `QuestionHelper::setInputStream()` method is removed. Use + `StreamableInputInterface::setStream()` or `CommandTester::setInputs()` + instead. + + Before: + + ```php + $input = new ArrayInput(); + + $questionHelper->setInputStream($stream); + $questionHelper->ask($input, $output, $question); + ``` + + After: + + ```php + $input = new ArrayInput(); + $input->setStream($stream); + + $questionHelper->ask($input, $output, $question); + ``` + + Before: + + ```php + $commandTester = new CommandTester($command); + + $stream = fopen('php://memory', 'r+', false); + fputs($stream, "AppBundle\nYes"); + rewind($stream); + + $command->getHelper('question')->setInputStream($stream); + + $commandTester->execute(); + ``` + + After: + + ```php + $commandTester = new CommandTester($command); + + $commandTester->setInputs(array('AppBundle', 'Yes')); + + $commandTester->execute(); + ``` + +Debug +----- + + * `FlattenException::getTrace()` now returns additional type descriptions + `integer` and `float`. + +DependencyInjection +------------------- + + * Using unsupported configuration keys in YAML configuration files raises an + exception. + + * Using unsupported options to configure service aliases raises an exception. + + * Setting or unsetting a private service with the `Container::set()` method is + no longer supported. Only public services can be set or unset. + + * Checking the existence of a private service with the `Container::has()` + method is no longer supported and will return `false`. + + * Requesting a private service with the `Container::get()` method is no longer + supported. + +ExpressionLanguage +---------- + + * The ability to pass a `ParserCacheInterface` instance to the `ExpressionLanguage` + class has been removed. You should use the `CacheItemPoolInterface` interface + instead. + +Form +---- + + * The `choices_as_values` option of the `ChoiceType` has been removed. + + * Support for data objects that implements both `Traversable` and + `ArrayAccess` in `ResizeFormListener::preSubmit` method has been removed. + + * Using callable strings as choice options in ChoiceType is not supported + anymore in favor of passing PropertyPath instances. + + Before: + + ```php + 'choice_value' => new PropertyPath('range'), + 'choice_label' => 'strtoupper', + ``` + + After: + + ```php + 'choice_value' => 'range', + 'choice_label' => function ($choice) { + return strtoupper($choice); + }, + ``` + + * Caching of the loaded `ChoiceListInterface` in the `LazyChoiceList` has been removed, + it must be cached in the `ChoiceLoaderInterface` implementation instead. + + * Calling `isValid()` on a `Form` instance before submitting it is not supported + anymore and raises an exception. + + Before: + + ```php + if ($form->isValid()) { + // ... + } + ``` + + After: + + ```php + if ($form->isSubmitted() && $form->isValid()) { + // ... + } + ``` + +FrameworkBundle +--------------- + + * Support for absolute template paths has been removed. + + * The following form types registered as services have been removed; use their + fully-qualified class name instead: + + - `"form.type.birthday"` + - `"form.type.checkbox"` + - `"form.type.collection"` + - `"form.type.country"` + - `"form.type.currency"` + - `"form.type.date"` + - `"form.type.datetime"` + - `"form.type.email"` + - `"form.type.file"` + - `"form.type.hidden"` + - `"form.type.integer"` + - `"form.type.language"` + - `"form.type.locale"` + - `"form.type.money"` + - `"form.type.number"` + - `"form.type.password"` + - `"form.type.percent"` + - `"form.type.radio"` + - `"form.type.range"` + - `"form.type.repeated"` + - `"form.type.search"` + - `"form.type.textarea"` + - `"form.type.text"` + - `"form.type.time"` + - `"form.type.timezone"` + - `"form.type.url"` + - `"form.type.button"` + - `"form.type.submit"` + - `"form.type.reset"` + + * The `framework.serializer.cache` option and the services + `serializer.mapping.cache.apc` and `serializer.mapping.cache.doctrine.apc` + have been removed. APCu should now be automatically used when available. + +HttpFoundation +--------------- + + * Extending the following methods of `Response` + is no longer possible (these methods are now `final`): + + - `setDate`/`getDate` + - `setExpires`/`getExpires` + - `setLastModified`/`getLastModified` + - `setProtocolVersion`/`getProtocolVersion` + - `setStatusCode`/`getStatusCode` + - `setCharset`/`getCharset` + - `setPrivate`/`setPublic` + - `getAge` + - `getMaxAge`/`setMaxAge` + - `setSharedMaxAge` + - `getTtl`/`setTtl` + - `setClientTtl` + - `getEtag`/`setEtag` + - `hasVary`/`getVary`/`setVary` + - `isInvalid`/`isSuccessful`/`isRedirection`/`isClientError`/`isServerError` + - `isOk`/`isForbidden`/`isNotFound`/`isRedirect`/`isEmpty` + + * The ability to check only for cacheable HTTP methods using `Request::isMethodSafe()` is + not supported anymore, use `Request::isMethodCacheable()` instead. + +HttpKernel +---------- + + * Possibility to pass non-scalar values as URI attributes to the ESI and SSI + renderers has been removed. The inline fragment renderer should be used with + non-scalar attributes. + + * The `ControllerResolver::getArguments()` method has been removed. If you + have your own `ControllerResolverInterface` implementation, you should + inject an `ArgumentResolverInterface` instance. + + * The `DataCollector::varToString()` method has been removed in favor of `cloneVar()`. + +Serializer +---------- + + * The ability to pass a Doctrine `Cache` instance to the `ClassMetadataFactory` + class has been removed. You should use the `CacheClassMetadataFactory` class + instead. + + * Not defining the 6th argument `$format = null` of the + `AbstractNormalizer::instantiateObject()` method when overriding it is not + supported anymore. + +Translation +----------- + + * Removed the backup feature from the file dumper classes. + +TwigBridge +---------- + + * Removed the possibility to inject the Form `TwigRenderer` into the `FormExtension`. + Upgrade Twig to `^1.30`, inject the `Twig_Environment` into the `TwigRendererEngine` and load + the `TwigRenderer` using the `Twig_FactoryRuntimeLoader` instead. + + Before: + + ```php + use Symfony\Bridge\Twig\Extension\FormExtension; + use Symfony\Bridge\Twig\Form\TwigRenderer; + use Symfony\Bridge\Twig\Form\TwigRendererEngine; + + // ... + $rendererEngine = new TwigRendererEngine(array('form_div_layout.html.twig')); + $rendererEngine->setEnvironment($twig); + $twig->addExtension(new FormExtension(new TwigRenderer($rendererEngine, $csrfTokenManager))); + ``` + + After: + + ```php + $rendererEngine = new TwigRendererEngine(array('form_div_layout.html.twig'), $twig); + $twig->addRuntimeLoader(new \Twig_FactoryRuntimeLoader(array( + TwigRenderer::class => function () use ($rendererEngine, $csrfTokenManager) { + return new TwigRenderer($rendererEngine, $csrfTokenManager); + }, + ))); + $twig->addExtension(new FormExtension()); + ``` + + * Removed the `TwigRendererEngineInterface` interface. + +Validator +--------- + + * The `DateTimeValidator::PATTERN` constant was removed. + + * `Tests\Constraints\AbstractConstraintValidatorTest` has been removed in + favor of `Test\ConstraintValidatorTestCase`. + + Before: + + ```php + // ... + use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest; + + class MyCustomValidatorTest extends AbstractConstraintValidatorTest + { + // ... + } + ``` + + After: + + ```php + // ... + use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + + class MyCustomValidatorTest extends ConstraintValidatorTestCase + { + // ... + } + ``` + + * The default value of the strict option of the `Choice` Constraint has been + changed to `true` as of 4.0. If you need the previous behaviour ensure to + set the option to `false`. + +Yaml +---- + + * Mappings with a colon (`:`) that is not followed by a whitespace are not + supported anymore and lead to a `ParseException`(e.g. `foo:bar` must be + `foo: bar`). + + * Starting an unquoted string with `%` leads to a `ParseException`. + + * The `Dumper::setIndentation()` method was removed. Pass the indentation + level to the constructor instead. + + * Removed support for passing `true`/`false` as the second argument to the + `parse()` method to trigger exceptions when an invalid type was passed. + + Before: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', true); + ``` + + After: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE); + ``` + + * Removed support for passing `true`/`false` as the third argument to the + `parse()` method to toggle object support. + + Before: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', false, true); + ``` + + After: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', Yaml::PARSE_OBJECT); + ``` + + * Removed support for passing `true`/`false` as the fourth argument to the + `parse()` method to parse objects as maps. + + Before: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', false, false, true); + ``` + + After: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', Yaml::PARSE_OBJECT_FOR_MAP); + ``` + + * Removed support for passing `true`/`false` as the fourth argument to the + `dump()` method to trigger exceptions when an invalid type was passed. + + Before: + + ```php + Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, true); + ``` + + After: + + ```php + Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE); + ``` + + * Removed support for passing `true`/`false` as the fifth argument to the + `dump()` method to toggle object support. + + Before: + + ```php + Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, true); + ``` + + After: + + ```php + Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, Yaml::DUMP_OBJECT); + ``` + + * The `!!php/object` tag to indicate dumped PHP objects was removed in favor of + the `!php/object` tag. + + * Duplicate mapping keys lead to a `ParseException`. diff --git a/vendor/symfony/symfony/appveyor.yml b/vendor/symfony/symfony/appveyor.yml new file mode 100644 index 0000000000000000000000000000000000000000..d5c663d5a041e7a2ca78fa8e9cd12bf4739e1c54 --- /dev/null +++ b/vendor/symfony/symfony/appveyor.yml @@ -0,0 +1,64 @@ +build: false +clone_depth: 1 +clone_folder: c:\projects\symfony + +cache: + - composer.phar + - .phpunit -> phpunit + +init: + - SET PATH=c:\php;%PATH% + - SET COMPOSER_NO_INTERACTION=1 + - SET SYMFONY_DEPRECATIONS_HELPER=strict + - SET ANSICON=121x90 (121x90) + - SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped + - REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f + +install: + - mkdir c:\php && cd c:\php + - appveyor DownloadFile https://raw.githubusercontent.com/symfony/binary-utils/master/cacert.pem + - appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-5.5.9-nts-Win32-VC11-x86.zip + - 7z x php-5.5.9-nts-Win32-VC11-x86.zip -y >nul + - del /Q *.zip + - cd ext + - appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/apcu/4.0.10/php_apcu-4.0.10-5.5-nts-vc11-x86.zip + - 7z x php_apcu-4.0.10-5.5-nts-vc11-x86.zip -y >nul + - appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/php_memcache-3.0.8-5.5-nts-vc11-x86.zip + - 7z x php_memcache-3.0.8-5.5-nts-vc11-x86.zip -y >nul + - del /Q *.zip + - cd .. + - copy /Y php.ini-development php.ini-min + - echo max_execution_time=1200 >> php.ini-min + - echo date.timezone="America/Los_Angeles" >> php.ini-min + - echo extension_dir=ext >> php.ini-min + - copy /Y php.ini-min php.ini-max + - echo zend_extension=php_opcache.dll >> php.ini-max + - echo opcache.enable_cli=1 >> php.ini-max + - echo extension=php_openssl.dll >> php.ini-max + - echo extension=php_apcu.dll >> php.ini-max + - echo apc.enable_cli=1 >> php.ini-max + - echo extension=php_memcache.dll >> php.ini-max + - echo extension=php_intl.dll >> php.ini-max + - echo extension=php_mbstring.dll >> php.ini-max + - echo extension=php_fileinfo.dll >> php.ini-max + - echo extension=php_pdo_sqlite.dll >> php.ini-max + - echo extension=php_curl.dll >> php.ini-max + - echo curl.cainfo=c:\php\cacert.pem >> php.ini-max + - copy /Y php.ini-max php.ini + - cd c:\projects\symfony + - IF NOT EXIST composer.phar (appveyor DownloadFile https://getcomposer.org/download/1.3.0/composer.phar) + - php composer.phar self-update + - copy /Y .composer\* %APPDATA%\Composer\ + - php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit + - IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev) + - php composer.phar update --no-progress --ansi + - php phpunit install + +test_script: + - cd c:\projects\symfony + - SET X=0 + - copy /Y c:\php\php.ini-min c:\php\php.ini + - php phpunit src\Symfony --exclude-group benchmark,intl-data || SET X=!errorlevel! + - copy /Y c:\php\php.ini-max c:\php\php.ini + - php phpunit src\Symfony --exclude-group benchmark,intl-data || SET X=!errorlevel! + - exit %X% diff --git a/vendor/symfony/symfony/composer.json b/vendor/symfony/symfony/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..607d4f2b6e3cc89a26e18a6738fdc58f8a5e45ed --- /dev/null +++ b/vendor/symfony/symfony/composer.json @@ -0,0 +1,130 @@ +{ + "name": "symfony/symfony", + "type": "library", + "description": "The Symfony PHP framework", + "keywords": ["framework"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "doctrine/common": "~2.4", + "twig/twig": "~1.28|~2.0", + "psr/cache": "~1.0", + "psr/log": "~1.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php56": "~1.0", + "symfony/polyfill-php70": "~1.0", + "symfony/polyfill-util": "~1.0" + }, + "replace": { + "symfony/asset": "self.version", + "symfony/browser-kit": "self.version", + "symfony/cache": "self.version", + "symfony/class-loader": "self.version", + "symfony/config": "self.version", + "symfony/console": "self.version", + "symfony/css-selector": "self.version", + "symfony/dependency-injection": "self.version", + "symfony/debug": "self.version", + "symfony/debug-bundle": "self.version", + "symfony/doctrine-bridge": "self.version", + "symfony/dom-crawler": "self.version", + "symfony/event-dispatcher": "self.version", + "symfony/expression-language": "self.version", + "symfony/filesystem": "self.version", + "symfony/finder": "self.version", + "symfony/form": "self.version", + "symfony/framework-bundle": "self.version", + "symfony/http-foundation": "self.version", + "symfony/http-kernel": "self.version", + "symfony/inflector": "self.version", + "symfony/intl": "self.version", + "symfony/ldap": "self.version", + "symfony/monolog-bridge": "self.version", + "symfony/options-resolver": "self.version", + "symfony/process": "self.version", + "symfony/property-access": "self.version", + "symfony/property-info": "self.version", + "symfony/proxy-manager-bridge": "self.version", + "symfony/routing": "self.version", + "symfony/security": "self.version", + "symfony/security-core": "self.version", + "symfony/security-csrf": "self.version", + "symfony/security-guard": "self.version", + "symfony/security-http": "self.version", + "symfony/security-bundle": "self.version", + "symfony/serializer": "self.version", + "symfony/stopwatch": "self.version", + "symfony/templating": "self.version", + "symfony/translation": "self.version", + "symfony/twig-bridge": "self.version", + "symfony/twig-bundle": "self.version", + "symfony/validator": "self.version", + "symfony/var-dumper": "self.version", + "symfony/web-profiler-bundle": "self.version", + "symfony/workflow": "self.version", + "symfony/yaml": "self.version" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "~1.6", + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": "~2.4", + "doctrine/orm": "~2.4,>=2.4.5", + "doctrine/doctrine-bundle": "~1.4", + "monolog/monolog": "~1.11", + "ocramius/proxy-manager": "~0.4|~1.0|~2.0", + "predis/predis": "~1.0", + "egulias/email-validator": "~1.2,>=1.2.8|~2.0", + "symfony/phpunit-bridge": "~3.2", + "symfony/polyfill-apcu": "~1.1", + "symfony/security-acl": "~2.8|~3.0", + "phpdocumentor/reflection-docblock": "^3.0", + "sensio/framework-extra-bundle": "^3.0.2" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.0", + "phpdocumentor/type-resolver": "<0.2.0", + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "provide": { + "psr/cache-implementation": "1.0" + }, + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", + "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", + "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/", + "Symfony\\Bridge\\Swiftmailer\\": "src/Symfony/Bridge/Swiftmailer/", + "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", + "Symfony\\Bundle\\": "src/Symfony/Bundle/", + "Symfony\\Component\\": "src/Symfony/Component/" + }, + "classmap": [ + "src/Symfony/Component/Intl/Resources/stubs" + ], + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "autoload-dev": { + "files": [ "src/Symfony/Component/VarDumper/Resources/functions/dump.php" ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/phpunit b/vendor/symfony/symfony/phpunit new file mode 100755 index 0000000000000000000000000000000000000000..466f8fbbc2356eeae94b63c5a0285f4f2534e4fc --- /dev/null +++ b/vendor/symfony/symfony/phpunit @@ -0,0 +1,14 @@ +#!/usr/bin/env php += 70000 && !getenv('SYMFONY_PHPUNIT_VERSION')) { + putenv('SYMFONY_PHPUNIT_VERSION=6.0'); +} +putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit'); +require __DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit'; diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..3dcb8770ec8cc8bb9423f2f70f27a4fd65f20ea2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CHANGELOG.md @@ -0,0 +1,58 @@ +CHANGELOG +========= + +3.1.0 +----- + + * added "{{ value }}" message placeholder to UniqueEntityValidator + * deprecated `MergeDoctrineCollectionListener::onBind` in favor of + `MergeDoctrineCollectionListener::onSubmit` + * deprecated passing `ChoiceListFactoryInterface` as first argument of + `DoctrineChoiceLoader`'s constructor + +3.0.0 +----- + + * removed `EntityChoiceList` + * removed `$manager` (2nd) and `$class` (3th) arguments of `ORMQueryBuilderLoader` + * removed passing a query builder closure to `ORMQueryBuilderLoader` + * removed `loader` and `property` options of the `DoctrineType` + +2.8.0 +----- + + * deprecated using the entity provider with a Doctrine repository implementing UserProviderInterface + * added UserLoaderInterface for loading users through Doctrine. + +2.7.0 +----- + + * added DoctrineChoiceLoader + * deprecated EntityChoiceList + * deprecated passing a query builder closure to ORMQueryBuilderLoader + * deprecated $manager and $em arguments of ORMQueryBuilderLoader + * added optional arguments $propertyAccessor and $choiceListFactory to DoctrineOrmExtension constructor + * deprecated "loader" and "property" options of DoctrineType + +2.4.0 +----- + + * deprecated DoctrineOrmTestCase class + +2.2.0 +----- + + * added an optional PropertyAccessorInterface parameter to DoctrineType, + EntityType and EntityChoiceList + +2.1.0 +----- + + * added a default implementation of the ManagerRegistry + * added a session storage for Doctrine DBAL + * DoctrineOrmTypeGuesser now guesses "collection" for array Doctrine type + * DoctrineType now caches its choice lists in order to improve performance + * DoctrineType now uses ManagerRegistry::getManagerForClass() if the option "em" is not set + * UniqueEntity validation constraint now accepts a "repositoryMethod" option that will be used to check for uniqueness instead of the default "findBy" + * [BC BREAK] the DbalLogger::log() visibility has been changed from public to + protected diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php new file mode 100644 index 0000000000000000000000000000000000000000..b1e4f6a9d93b199e0db77072a1b7dc26e8908a19 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\CacheWarmer; + +use Doctrine\Common\Persistence\ManagerRegistry; +use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; + +/** + * The proxy generator cache warmer generates all entity proxies. + * + * In the process of generating proxies the cache for all the metadata is primed also, + * since this information is necessary to build the proxies in the first place. + * + * @author Benjamin Eberlei + */ +class ProxyCacheWarmer implements CacheWarmerInterface +{ + private $registry; + + /** + * Constructor. + * + * @param ManagerRegistry $registry A ManagerRegistry instance + */ + public function __construct(ManagerRegistry $registry) + { + $this->registry = $registry; + } + + /** + * This cache warmer is not optional, without proxies fatal error occurs! + * + * @return false + */ + public function isOptional() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function warmUp($cacheDir) + { + foreach ($this->registry->getManagers() as $em) { + // we need the directory no matter the proxy cache generation strategy + if (!is_dir($proxyCacheDir = $em->getConfiguration()->getProxyDir())) { + if (false === @mkdir($proxyCacheDir, 0777, true)) { + throw new \RuntimeException(sprintf('Unable to create the Doctrine Proxy directory "%s".', $proxyCacheDir)); + } + } elseif (!is_writable($proxyCacheDir)) { + throw new \RuntimeException(sprintf('The Doctrine Proxy directory "%s" is not writeable for the current system user.', $proxyCacheDir)); + } + + // if proxies are autogenerated we don't need to generate them in the cache warmer + if ($em->getConfiguration()->getAutoGenerateProxyClasses()) { + continue; + } + + $classes = $em->getMetadataFactory()->getAllMetadata(); + + $em->getProxyFactory()->generateProxyClasses($classes); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php new file mode 100644 index 0000000000000000000000000000000000000000..0888f97ca91d8d5d47c3ae39d4f68770e56c06ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine; + +use Doctrine\Common\EventArgs; +use Doctrine\Common\EventManager; +use Symfony\Component\DependencyInjection\ContainerInterface; + +/** + * Allows lazy loading of listener services. + * + * @author Johannes M. Schmitt + */ +class ContainerAwareEventManager extends EventManager +{ + /** + * Map of registered listeners. + * + * => + * + * @var array + */ + private $listeners = array(); + private $initialized = array(); + private $container; + + public function __construct(ContainerInterface $container) + { + $this->container = $container; + } + + /** + * Dispatches an event to all registered listeners. + * + * @param string $eventName The name of the event to dispatch. The name of the event is + * the name of the method that is invoked on listeners. + * @param EventArgs $eventArgs The event arguments to pass to the event handlers/listeners. + * If not supplied, the single empty EventArgs instance is used. + * + * @return bool + */ + public function dispatchEvent($eventName, EventArgs $eventArgs = null) + { + if (isset($this->listeners[$eventName])) { + $eventArgs = null === $eventArgs ? EventArgs::getEmptyInstance() : $eventArgs; + + $initialized = isset($this->initialized[$eventName]); + + foreach ($this->listeners[$eventName] as $hash => $listener) { + if (!$initialized && is_string($listener)) { + $this->listeners[$eventName][$hash] = $listener = $this->container->get($listener); + } + + $listener->$eventName($eventArgs); + } + $this->initialized[$eventName] = true; + } + } + + /** + * Gets the listeners of a specific event or all listeners. + * + * @param string $event The name of the event + * + * @return array The event listeners for the specified event, or all event listeners + */ + public function getListeners($event = null) + { + return $event ? $this->listeners[$event] : $this->listeners; + } + + /** + * Checks whether an event has any registered listeners. + * + * @param string $event + * + * @return bool TRUE if the specified event has any listeners, FALSE otherwise + */ + public function hasListeners($event) + { + return isset($this->listeners[$event]) && $this->listeners[$event]; + } + + /** + * Adds an event listener that listens on the specified events. + * + * @param string|array $events The event(s) to listen on + * @param object|string $listener The listener object + * + * @throws \RuntimeException + */ + public function addEventListener($events, $listener) + { + if (is_string($listener)) { + if ($this->initialized) { + throw new \RuntimeException('Adding lazy-loading listeners after construction is not supported.'); + } + + $hash = '_service_'.$listener; + } else { + // Picks the hash code related to that listener + $hash = spl_object_hash($listener); + } + + foreach ((array) $events as $event) { + // Overrides listener if a previous one was associated already + // Prevents duplicate listeners on same event (same instance only) + $this->listeners[$event][$hash] = $listener; + } + } + + /** + * Removes an event listener from the specified events. + * + * @param string|array $events + * @param object|string $listener + */ + public function removeEventListener($events, $listener) + { + if (is_string($listener)) { + $hash = '_service_'.$listener; + } else { + // Picks the hash code related to that listener + $hash = spl_object_hash($listener); + } + + foreach ((array) $events as $event) { + // Check if actually have this listener associated + if (isset($this->listeners[$event][$hash])) { + unset($this->listeners[$event][$hash]); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..a57b9ae6ea1512341aa2f469cd7d2bd3942b33d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php @@ -0,0 +1,183 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\DataCollector; + +use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\DBAL\Logging\DebugStack; +use Doctrine\DBAL\Types\Type; +use Symfony\Component\HttpKernel\DataCollector\DataCollector; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * DoctrineDataCollector. + * + * @author Fabien Potencier + */ +class DoctrineDataCollector extends DataCollector +{ + private $registry; + private $connections; + private $managers; + private $loggers = array(); + + public function __construct(ManagerRegistry $registry) + { + $this->registry = $registry; + $this->connections = $registry->getConnectionNames(); + $this->managers = $registry->getManagerNames(); + } + + /** + * Adds the stack logger for a connection. + * + * @param string $name + * @param DebugStack $logger + */ + public function addLogger($name, DebugStack $logger) + { + $this->loggers[$name] = $logger; + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + $queries = array(); + foreach ($this->loggers as $name => $logger) { + $queries[$name] = $this->sanitizeQueries($name, $logger->queries); + } + + $this->data = array( + 'queries' => $queries, + 'connections' => $this->connections, + 'managers' => $this->managers, + ); + } + + public function getManagers() + { + return $this->data['managers']; + } + + public function getConnections() + { + return $this->data['connections']; + } + + public function getQueryCount() + { + return array_sum(array_map('count', $this->data['queries'])); + } + + public function getQueries() + { + return $this->data['queries']; + } + + public function getTime() + { + $time = 0; + foreach ($this->data['queries'] as $queries) { + foreach ($queries as $query) { + $time += $query['executionMS']; + } + } + + return $time; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'db'; + } + + private function sanitizeQueries($connectionName, $queries) + { + foreach ($queries as $i => $query) { + $queries[$i] = $this->sanitizeQuery($connectionName, $query); + } + + return $queries; + } + + private function sanitizeQuery($connectionName, $query) + { + $query['explainable'] = true; + if (null === $query['params']) { + $query['params'] = array(); + } + if (!is_array($query['params'])) { + $query['params'] = array($query['params']); + } + foreach ($query['params'] as $j => $param) { + if (isset($query['types'][$j])) { + // Transform the param according to the type + $type = $query['types'][$j]; + if (is_string($type)) { + $type = Type::getType($type); + } + if ($type instanceof Type) { + $query['types'][$j] = $type->getBindingType(); + $param = $type->convertToDatabaseValue($param, $this->registry->getConnection($connectionName)->getDatabasePlatform()); + } + } + + list($query['params'][$j], $explainable) = $this->sanitizeParam($param); + if (!$explainable) { + $query['explainable'] = false; + } + } + + return $query; + } + + /** + * Sanitizes a param. + * + * The return value is an array with the sanitized value and a boolean + * indicating if the original value was kept (allowing to use the sanitized + * value to explain the query). + * + * @param mixed $var + * + * @return array + */ + private function sanitizeParam($var) + { + if (is_object($var)) { + return array(sprintf('Object(%s)', get_class($var)), false); + } + + if (is_array($var)) { + $a = array(); + $original = true; + foreach ($var as $k => $v) { + list($value, $orig) = $this->sanitizeParam($v); + $original = $original && $orig; + $a[$k] = $value; + } + + return array($a, $original); + } + + if (is_resource($var)) { + return array(sprintf('Resource(%s)', get_resource_type($var)), false); + } + + return array($var, true); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..0b1052719f5595d466bf1cba4727d948ebff67fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\DataFixtures; + +use Doctrine\Common\DataFixtures\FixtureInterface; +use Doctrine\Common\DataFixtures\Loader; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; + +/** + * Doctrine data fixtures loader that injects the service container into + * fixture objects that implement ContainerAwareInterface. + * + * Note: Use of this class requires the Doctrine data fixtures extension, which + * is a suggested dependency for Symfony. + */ +class ContainerAwareLoader extends Loader +{ + /** + * @var ContainerInterface + */ + private $container; + + /** + * Constructor. + * + * @param ContainerInterface $container A ContainerInterface instance + */ + public function __construct(ContainerInterface $container) + { + $this->container = $container; + } + + /** + * {@inheritdoc} + */ + public function addFixture(FixtureInterface $fixture) + { + if ($fixture instanceof ContainerAwareInterface) { + $fixture->setContainer($this->container); + } + + parent::addFixture($fixture); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..b9cac9f71845a6250e56670ae64ada68b3b1bb54 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php @@ -0,0 +1,496 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\DependencyInjection; + +use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\Config\Resource\FileResource; + +/** + * This abstract classes groups common code that Doctrine Object Manager extensions (ORM, MongoDB, CouchDB) need. + * + * @author Benjamin Eberlei + */ +abstract class AbstractDoctrineExtension extends Extension +{ + /** + * Used inside metadata driver method to simplify aggregation of data. + * + * @var array + */ + protected $aliasMap = array(); + + /** + * Used inside metadata driver method to simplify aggregation of data. + * + * @var array + */ + protected $drivers = array(); + + /** + * @param array $objectManager A configured object manager + * @param ContainerBuilder $container A ContainerBuilder instance + * + * @throws \InvalidArgumentException + */ + protected function loadMappingInformation(array $objectManager, ContainerBuilder $container) + { + if ($objectManager['auto_mapping']) { + // automatically register bundle mappings + foreach (array_keys($container->getParameter('kernel.bundles')) as $bundle) { + if (!isset($objectManager['mappings'][$bundle])) { + $objectManager['mappings'][$bundle] = array( + 'mapping' => true, + 'is_bundle' => true, + ); + } + } + } + + foreach ($objectManager['mappings'] as $mappingName => $mappingConfig) { + if (null !== $mappingConfig && false === $mappingConfig['mapping']) { + continue; + } + + $mappingConfig = array_replace(array( + 'dir' => false, + 'type' => false, + 'prefix' => false, + ), (array) $mappingConfig); + + $mappingConfig['dir'] = $container->getParameterBag()->resolveValue($mappingConfig['dir']); + // a bundle configuration is detected by realizing that the specified dir is not absolute and existing + if (!isset($mappingConfig['is_bundle'])) { + $mappingConfig['is_bundle'] = !is_dir($mappingConfig['dir']); + } + + if ($mappingConfig['is_bundle']) { + $bundle = null; + foreach ($container->getParameter('kernel.bundles') as $name => $class) { + if ($mappingName === $name) { + $bundle = new \ReflectionClass($class); + + break; + } + } + + if (null === $bundle) { + throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled.', $mappingName)); + } + + $mappingConfig = $this->getMappingDriverBundleConfigDefaults($mappingConfig, $bundle, $container); + if (!$mappingConfig) { + continue; + } + } + + $this->assertValidMappingConfiguration($mappingConfig, $objectManager['name']); + $this->setMappingDriverConfig($mappingConfig, $mappingName); + $this->setMappingDriverAlias($mappingConfig, $mappingName); + } + } + + /** + * Register the alias for this mapping driver. + * + * Aliases can be used in the Query languages of all the Doctrine object managers to simplify writing tasks. + * + * @param array $mappingConfig + * @param string $mappingName + */ + protected function setMappingDriverAlias($mappingConfig, $mappingName) + { + if (isset($mappingConfig['alias'])) { + $this->aliasMap[$mappingConfig['alias']] = $mappingConfig['prefix']; + } else { + $this->aliasMap[$mappingName] = $mappingConfig['prefix']; + } + } + + /** + * Register the mapping driver configuration for later use with the object managers metadata driver chain. + * + * @param array $mappingConfig + * @param string $mappingName + * + * @throws \InvalidArgumentException + */ + protected function setMappingDriverConfig(array $mappingConfig, $mappingName) + { + $mappingDirectory = $mappingConfig['dir']; + if (!is_dir($mappingDirectory)) { + throw new \InvalidArgumentException(sprintf('Invalid Doctrine mapping path given. Cannot load Doctrine mapping/bundle named "%s".', $mappingName)); + } + + $this->drivers[$mappingConfig['type']][$mappingConfig['prefix']] = realpath($mappingDirectory) ?: $mappingDirectory; + } + + /** + * If this is a bundle controlled mapping all the missing information can be autodetected by this method. + * + * Returns false when autodetection failed, an array of the completed information otherwise. + * + * @param array $bundleConfig + * @param \ReflectionClass $bundle + * @param ContainerBuilder $container A ContainerBuilder instance + * + * @return array|false + */ + protected function getMappingDriverBundleConfigDefaults(array $bundleConfig, \ReflectionClass $bundle, ContainerBuilder $container) + { + $bundleDir = dirname($bundle->getFileName()); + + if (!$bundleConfig['type']) { + $bundleConfig['type'] = $this->detectMetadataDriver($bundleDir, $container); + } + + if (!$bundleConfig['type']) { + // skip this bundle, no mapping information was found. + return false; + } + + if (!$bundleConfig['dir']) { + if (in_array($bundleConfig['type'], array('annotation', 'staticphp'))) { + $bundleConfig['dir'] = $bundleDir.'/'.$this->getMappingObjectDefaultName(); + } else { + $bundleConfig['dir'] = $bundleDir.'/'.$this->getMappingResourceConfigDirectory(); + } + } else { + $bundleConfig['dir'] = $bundleDir.'/'.$bundleConfig['dir']; + } + + if (!$bundleConfig['prefix']) { + $bundleConfig['prefix'] = $bundle->getNamespaceName().'\\'.$this->getMappingObjectDefaultName(); + } + + return $bundleConfig; + } + + /** + * Register all the collected mapping information with the object manager by registering the appropriate mapping drivers. + * + * @param array $objectManager + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function registerMappingDrivers($objectManager, ContainerBuilder $container) + { + // configure metadata driver for each bundle based on the type of mapping files found + if ($container->hasDefinition($this->getObjectManagerElementName($objectManager['name'].'_metadata_driver'))) { + $chainDriverDef = $container->getDefinition($this->getObjectManagerElementName($objectManager['name'].'_metadata_driver')); + } else { + $chainDriverDef = new Definition('%'.$this->getObjectManagerElementName('metadata.driver_chain.class%')); + $chainDriverDef->setPublic(false); + } + + foreach ($this->drivers as $driverType => $driverPaths) { + $mappingService = $this->getObjectManagerElementName($objectManager['name'].'_'.$driverType.'_metadata_driver'); + if ($container->hasDefinition($mappingService)) { + $mappingDriverDef = $container->getDefinition($mappingService); + $args = $mappingDriverDef->getArguments(); + if ($driverType == 'annotation') { + $args[1] = array_merge(array_values($driverPaths), $args[1]); + } else { + $args[0] = array_merge(array_values($driverPaths), $args[0]); + } + $mappingDriverDef->setArguments($args); + } elseif ($driverType == 'annotation') { + $mappingDriverDef = new Definition('%'.$this->getObjectManagerElementName('metadata.'.$driverType.'.class%'), array( + new Reference($this->getObjectManagerElementName('metadata.annotation_reader')), + array_values($driverPaths), + )); + } else { + $mappingDriverDef = new Definition('%'.$this->getObjectManagerElementName('metadata.'.$driverType.'.class%'), array( + array_values($driverPaths), + )); + } + $mappingDriverDef->setPublic(false); + if (false !== strpos($mappingDriverDef->getClass(), 'yml') || false !== strpos($mappingDriverDef->getClass(), 'xml')) { + $mappingDriverDef->setArguments(array(array_flip($driverPaths))); + $mappingDriverDef->addMethodCall('setGlobalBasename', array('mapping')); + } + + $container->setDefinition($mappingService, $mappingDriverDef); + + foreach ($driverPaths as $prefix => $driverPath) { + $chainDriverDef->addMethodCall('addDriver', array(new Reference($mappingService), $prefix)); + } + } + + $container->setDefinition($this->getObjectManagerElementName($objectManager['name'].'_metadata_driver'), $chainDriverDef); + } + + /** + * Assertion if the specified mapping information is valid. + * + * @param array $mappingConfig + * @param string $objectManagerName + * + * @throws \InvalidArgumentException + */ + protected function assertValidMappingConfiguration(array $mappingConfig, $objectManagerName) + { + if (!$mappingConfig['type'] || !$mappingConfig['dir'] || !$mappingConfig['prefix']) { + throw new \InvalidArgumentException(sprintf('Mapping definitions for Doctrine manager "%s" require at least the "type", "dir" and "prefix" options.', $objectManagerName)); + } + + if (!is_dir($mappingConfig['dir'])) { + throw new \InvalidArgumentException(sprintf('Specified non-existing directory "%s" as Doctrine mapping source.', $mappingConfig['dir'])); + } + + if (!in_array($mappingConfig['type'], array('xml', 'yml', 'annotation', 'php', 'staticphp'))) { + throw new \InvalidArgumentException(sprintf('Can only configure "xml", "yml", "annotation", "php" or '. + '"staticphp" through the DoctrineBundle. Use your own bundle to configure other metadata drivers. '. + 'You can register them by adding a new driver to the '. + '"%s" service definition.', $this->getObjectManagerElementName($objectManagerName.'_metadata_driver') + )); + } + } + + /** + * Detects what metadata driver to use for the supplied directory. + * + * @param string $dir A directory path + * @param ContainerBuilder $container A ContainerBuilder instance + * + * @return string|null A metadata driver short name, if one can be detected + */ + protected function detectMetadataDriver($dir, ContainerBuilder $container) + { + // add the closest existing directory as a resource + $configPath = $this->getMappingResourceConfigDirectory(); + $resource = $dir.'/'.$configPath; + while (!is_dir($resource)) { + $resource = dirname($resource); + } + + $container->addResource(new FileResource($resource)); + + $extension = $this->getMappingResourceExtension(); + if (($files = glob($dir.'/'.$configPath.'/*.'.$extension.'.xml')) && count($files)) { + return 'xml'; + } elseif (($files = glob($dir.'/'.$configPath.'/*.'.$extension.'.yml')) && count($files)) { + return 'yml'; + } elseif (($files = glob($dir.'/'.$configPath.'/*.'.$extension.'.php')) && count($files)) { + return 'php'; + } + + // add the directory itself as a resource + $container->addResource(new FileResource($dir)); + + if (is_dir($dir.'/'.$this->getMappingObjectDefaultName())) { + return 'annotation'; + } + } + + /** + * Loads a configured object manager metadata, query or result cache driver. + * + * @param array $objectManager A configured object manager + * @param ContainerBuilder $container A ContainerBuilder instance + * @param string $cacheName + * + * @throws \InvalidArgumentException In case of unknown driver type. + */ + protected function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, $cacheName) + { + $this->loadCacheDriver($cacheName, $objectManager['name'], $objectManager[$cacheName.'_driver'], $container); + } + + /** + * Loads a cache driver. + * + * @param string $cacheName The cache driver name + * @param string $objectManagerName The object manager name + * @param array $cacheDriver The cache driver mapping + * @param ContainerBuilder $container The ContainerBuilder instance + * + * @return string + * + * @throws \InvalidArgumentException + */ + protected function loadCacheDriver($cacheName, $objectManagerName, array $cacheDriver, ContainerBuilder $container) + { + $cacheDriverServiceId = $this->getObjectManagerElementName($objectManagerName.'_'.$cacheName); + + switch ($cacheDriver['type']) { + case 'service': + $container->setAlias($cacheDriverServiceId, new Alias($cacheDriver['id'], false)); + + return $cacheDriverServiceId; + case 'memcache': + $memcacheClass = !empty($cacheDriver['class']) ? $cacheDriver['class'] : '%'.$this->getObjectManagerElementName('cache.memcache.class').'%'; + $memcacheInstanceClass = !empty($cacheDriver['instance_class']) ? $cacheDriver['instance_class'] : '%'.$this->getObjectManagerElementName('cache.memcache_instance.class').'%'; + $memcacheHost = !empty($cacheDriver['host']) ? $cacheDriver['host'] : '%'.$this->getObjectManagerElementName('cache.memcache_host').'%'; + $memcachePort = !empty($cacheDriver['port']) || (isset($cacheDriver['port']) && $cacheDriver['port'] === 0) ? $cacheDriver['port'] : '%'.$this->getObjectManagerElementName('cache.memcache_port').'%'; + $cacheDef = new Definition($memcacheClass); + $memcacheInstance = new Definition($memcacheInstanceClass); + $memcacheInstance->addMethodCall('connect', array( + $memcacheHost, $memcachePort, + )); + $container->setDefinition($this->getObjectManagerElementName(sprintf('%s_memcache_instance', $objectManagerName)), $memcacheInstance); + $cacheDef->addMethodCall('setMemcache', array(new Reference($this->getObjectManagerElementName(sprintf('%s_memcache_instance', $objectManagerName))))); + break; + case 'memcached': + $memcachedClass = !empty($cacheDriver['class']) ? $cacheDriver['class'] : '%'.$this->getObjectManagerElementName('cache.memcached.class').'%'; + $memcachedInstanceClass = !empty($cacheDriver['instance_class']) ? $cacheDriver['instance_class'] : '%'.$this->getObjectManagerElementName('cache.memcached_instance.class').'%'; + $memcachedHost = !empty($cacheDriver['host']) ? $cacheDriver['host'] : '%'.$this->getObjectManagerElementName('cache.memcached_host').'%'; + $memcachedPort = !empty($cacheDriver['port']) ? $cacheDriver['port'] : '%'.$this->getObjectManagerElementName('cache.memcached_port').'%'; + $cacheDef = new Definition($memcachedClass); + $memcachedInstance = new Definition($memcachedInstanceClass); + $memcachedInstance->addMethodCall('addServer', array( + $memcachedHost, $memcachedPort, + )); + $container->setDefinition($this->getObjectManagerElementName(sprintf('%s_memcached_instance', $objectManagerName)), $memcachedInstance); + $cacheDef->addMethodCall('setMemcached', array(new Reference($this->getObjectManagerElementName(sprintf('%s_memcached_instance', $objectManagerName))))); + break; + case 'redis': + $redisClass = !empty($cacheDriver['class']) ? $cacheDriver['class'] : '%'.$this->getObjectManagerElementName('cache.redis.class').'%'; + $redisInstanceClass = !empty($cacheDriver['instance_class']) ? $cacheDriver['instance_class'] : '%'.$this->getObjectManagerElementName('cache.redis_instance.class').'%'; + $redisHost = !empty($cacheDriver['host']) ? $cacheDriver['host'] : '%'.$this->getObjectManagerElementName('cache.redis_host').'%'; + $redisPort = !empty($cacheDriver['port']) ? $cacheDriver['port'] : '%'.$this->getObjectManagerElementName('cache.redis_port').'%'; + $cacheDef = new Definition($redisClass); + $redisInstance = new Definition($redisInstanceClass); + $redisInstance->addMethodCall('connect', array( + $redisHost, $redisPort, + )); + $container->setDefinition($this->getObjectManagerElementName(sprintf('%s_redis_instance', $objectManagerName)), $redisInstance); + $cacheDef->addMethodCall('setRedis', array(new Reference($this->getObjectManagerElementName(sprintf('%s_redis_instance', $objectManagerName))))); + break; + case 'apc': + case 'apcu': + case 'array': + case 'xcache': + case 'wincache': + case 'zenddata': + $cacheDef = new Definition('%'.$this->getObjectManagerElementName(sprintf('cache.%s.class', $cacheDriver['type'])).'%'); + break; + default: + throw new \InvalidArgumentException(sprintf('"%s" is an unrecognized Doctrine cache driver.', $cacheDriver['type'])); + } + + $cacheDef->setPublic(false); + + if (!isset($cacheDriver['namespace'])) { + // generate a unique namespace for the given application + if ($container->hasParameter('cache.prefix.seed')) { + $seed = '.'.$container->getParameterBag()->resolveValue($container->getParameter('cache.prefix.seed')); + } else { + $seed = '_'.$container->getParameter('kernel.root_dir'); + } + $seed .= '.'.$container->getParameter('kernel.name').'.'.$container->getParameter('kernel.environment').'.'.$container->getParameter('kernel.debug'); + $hash = hash('sha256', $seed); + $namespace = 'sf_'.$this->getMappingResourceExtension().'_'.$objectManagerName.'_'.$hash; + + $cacheDriver['namespace'] = $namespace; + } + + $cacheDef->addMethodCall('setNamespace', array($cacheDriver['namespace'])); + + $container->setDefinition($cacheDriverServiceId, $cacheDef); + + return $cacheDriverServiceId; + } + + /** + * Returns a modified version of $managerConfigs. + * + * The manager called $autoMappedManager will map all bundles that are not mapped by other managers. + * + * @param array $managerConfigs + * @param array $bundles + * + * @return array The modified version of $managerConfigs + */ + protected function fixManagersAutoMappings(array $managerConfigs, array $bundles) + { + if ($autoMappedManager = $this->validateAutoMapping($managerConfigs)) { + foreach (array_keys($bundles) as $bundle) { + foreach ($managerConfigs as $manager) { + if (isset($manager['mappings'][$bundle])) { + continue 2; + } + } + $managerConfigs[$autoMappedManager]['mappings'][$bundle] = array( + 'mapping' => true, + 'is_bundle' => true, + ); + } + $managerConfigs[$autoMappedManager]['auto_mapping'] = false; + } + + return $managerConfigs; + } + + /** + * Prefixes the relative dependency injection container path with the object manager prefix. + * + * @example $name is 'entity_manager' then the result would be 'doctrine.orm.entity_manager' + * + * @param string $name + * + * @return string + */ + abstract protected function getObjectManagerElementName($name); + + /** + * Noun that describes the mapped objects such as Entity or Document. + * + * Will be used for autodetection of persistent objects directory. + * + * @return string + */ + abstract protected function getMappingObjectDefaultName(); + + /** + * Relative path from the bundle root to the directory where mapping files reside. + * + * @return string + */ + abstract protected function getMappingResourceConfigDirectory(); + + /** + * Extension used by the mapping files. + * + * @return string + */ + abstract protected function getMappingResourceExtension(); + + /** + * Search for a manager that is declared as 'auto_mapping' = true. + * + * @param array $managerConfigs + * + * @return null|string The name of the manager. If no one manager is found, returns null + * + * @throws \LogicException + */ + private function validateAutoMapping(array $managerConfigs) + { + $autoMappedManager = null; + foreach ($managerConfigs as $name => $manager) { + if (!$manager['auto_mapping']) { + continue; + } + + if (null !== $autoMappedManager) { + throw new \LogicException(sprintf('You cannot enable "auto_mapping" on more than one manager at the same time (found in "%s" and %s").', $autoMappedManager, $name)); + } + + $autoMappedManager = $name; + } + + return $autoMappedManager; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php new file mode 100644 index 0000000000000000000000000000000000000000..f8382ed2ebfb832a72db5f743c5b5c0c917450b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\Config\Resource\FileResource; + +/** + * Registers additional validators. + * + * @author Benjamin Eberlei + */ +class DoctrineValidationPass implements CompilerPassInterface +{ + /** + * @var string + */ + private $managerType; + + public function __construct($managerType) + { + $this->managerType = $managerType; + } + + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + $this->updateValidatorMappingFiles($container, 'xml', 'xml'); + $this->updateValidatorMappingFiles($container, 'yaml', 'yml'); + } + + /** + * Gets the validation mapping files for the format and extends them with + * files matching a doctrine search pattern (Resources/config/validation.orm.xml). + * + * @param ContainerBuilder $container + * @param string $mapping + * @param string $extension + */ + private function updateValidatorMappingFiles(ContainerBuilder $container, $mapping, $extension) + { + if (!$container->hasParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files')) { + return; + } + + $files = $container->getParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files'); + $validationPath = 'Resources/config/validation.'.$this->managerType.'.'.$extension; + + foreach ($container->getParameter('kernel.bundles') as $bundle) { + $reflection = new \ReflectionClass($bundle); + if (is_file($file = dirname($reflection->getFileName()).'/'.$validationPath)) { + $files[] = $file; + $container->addResource(new FileResource($file)); + } + } + + $container->setParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files', $files); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php new file mode 100644 index 0000000000000000000000000000000000000000..1739dc3aea92cf05e2aeb3c6283ae19a858c8fdc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php @@ -0,0 +1,159 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; + +/** + * Registers event listeners and subscribers to the available doctrine connections. + * + * @author Jeremy Mikola + * @author Alexander + */ +class RegisterEventListenersAndSubscribersPass implements CompilerPassInterface +{ + private $connections; + private $container; + private $eventManagers; + private $managerTemplate; + private $tagPrefix; + + /** + * Constructor. + * + * @param string $connections Parameter ID for connections + * @param string $managerTemplate sprintf() template for generating the event + * manager's service ID for a connection name + * @param string $tagPrefix Tag prefix for listeners and subscribers + */ + public function __construct($connections, $managerTemplate, $tagPrefix) + { + $this->connections = $connections; + $this->managerTemplate = $managerTemplate; + $this->tagPrefix = $tagPrefix; + } + + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + if (!$container->hasParameter($this->connections)) { + return; + } + + $taggedSubscribers = $container->findTaggedServiceIds($this->tagPrefix.'.event_subscriber'); + $taggedListeners = $container->findTaggedServiceIds($this->tagPrefix.'.event_listener'); + + if (empty($taggedSubscribers) && empty($taggedListeners)) { + return; + } + + $this->container = $container; + $this->connections = $container->getParameter($this->connections); + $sortFunc = function ($a, $b) { + $a = isset($a['priority']) ? $a['priority'] : 0; + $b = isset($b['priority']) ? $b['priority'] : 0; + + return $a > $b ? -1 : 1; + }; + + if (!empty($taggedSubscribers)) { + $subscribersPerCon = $this->groupByConnection($taggedSubscribers); + foreach ($subscribersPerCon as $con => $subscribers) { + $em = $this->getEventManager($con); + + uasort($subscribers, $sortFunc); + foreach ($subscribers as $id => $instance) { + if ($container->getDefinition($id)->isAbstract()) { + throw new InvalidArgumentException(sprintf('The abstract service "%s" cannot be tagged as a doctrine event subscriber.', $id)); + } + + $em->addMethodCall('addEventSubscriber', array(new Reference($id))); + } + } + } + + if (!empty($taggedListeners)) { + $listenersPerCon = $this->groupByConnection($taggedListeners, true); + foreach ($listenersPerCon as $con => $listeners) { + $em = $this->getEventManager($con); + + uasort($listeners, $sortFunc); + foreach ($listeners as $id => $instance) { + if ($container->getDefinition($id)->isAbstract()) { + throw new InvalidArgumentException(sprintf('The abstract service "%s" cannot be tagged as a doctrine event listener.', $id)); + } + + $em->addMethodCall('addEventListener', array( + array_unique($instance['event']), + isset($instance['lazy']) && $instance['lazy'] ? $id : new Reference($id), + )); + } + } + } + } + + private function groupByConnection(array $services, $isListener = false) + { + $grouped = array(); + foreach ($allCons = array_keys($this->connections) as $con) { + $grouped[$con] = array(); + } + + foreach ($services as $id => $instances) { + foreach ($instances as $instance) { + if ($isListener) { + if (!isset($instance['event'])) { + throw new InvalidArgumentException(sprintf('Doctrine event listener "%s" must specify the "event" attribute.', $id)); + } + $instance['event'] = array($instance['event']); + + if (isset($instance['lazy']) && $instance['lazy']) { + $this->container->getDefinition($id)->setPublic(true); + } + } + + $cons = isset($instance['connection']) ? array($instance['connection']) : $allCons; + foreach ($cons as $con) { + if (!isset($grouped[$con])) { + throw new RuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: %s', $con, $id, implode(', ', array_keys($this->connections)))); + } + + if ($isListener && isset($grouped[$con][$id])) { + $grouped[$con][$id]['event'] = array_merge($grouped[$con][$id]['event'], $instance['event']); + } else { + $grouped[$con][$id] = $instance; + } + } + } + } + + return $grouped; + } + + private function getEventManager($name) + { + if (null === $this->eventManagers) { + $this->eventManagers = array(); + foreach ($this->connections as $n => $id) { + $this->eventManagers[$n] = $this->container->getDefinition(sprintf($this->managerTemplate, $n)); + } + } + + return $this->eventManagers[$name]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php new file mode 100644 index 0000000000000000000000000000000000000000..d47843a6800ae630cc1b83b5418c5b76003e2b32 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php @@ -0,0 +1,256 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * Base class for the doctrine bundles to provide a compiler pass class that + * helps to register doctrine mappings. + * + * The compiler pass is meant to register the mappings with the metadata + * chain driver corresponding to one of the object managers. + * + * For concrete implementations that are easy to use, see the + * RegisterXyMappingsPass classes in the DoctrineBundle resp. + * DoctrineMongodbBundle, DoctrineCouchdbBundle and DoctrinePhpcrBundle. + * + * @author David Buchmann + */ +abstract class RegisterMappingsPass implements CompilerPassInterface +{ + /** + * DI object for the driver to use, either a service definition for a + * private service or a reference for a public service. + * + * @var Definition|Reference + */ + protected $driver; + + /** + * List of namespaces handled by the driver. + * + * @var string[] + */ + protected $namespaces; + + /** + * List of potential container parameters that hold the object manager name + * to register the mappings with the correct metadata driver, for example + * array('acme.manager', 'doctrine.default_entity_manager'). + * + * @var string[] + */ + protected $managerParameters; + + /** + * Naming pattern of the metadata chain driver service ids, for example + * 'doctrine.orm.%s_metadata_driver'. + * + * @var string + */ + protected $driverPattern; + + /** + * A name for a parameter in the container. If set, this compiler pass will + * only do anything if the parameter is present. (But regardless of the + * value of that parameter. + * + * @var string + */ + protected $enabledParameter; + + /** + * Naming pattern for the configuration service id, for example + * 'doctrine.orm.%s_configuration'. + * + * @var string + */ + private $configurationPattern; + + /** + * Method name to call on the configuration service. This depends on the + * Doctrine implementation. For example addEntityNamespace. + * + * @var string + */ + private $registerAliasMethodName; + + /** + * Map of alias to namespace. + * + * @var string[] + */ + private $aliasMap; + + /** + * Constructor. + * + * The $managerParameters is an ordered list of container parameters that could provide the + * name of the manager to register these namespaces and alias on. The first non-empty name + * is used, the others skipped. + * + * The $aliasMap parameter can be used to define bundle namespace shortcuts like the + * DoctrineBundle provides automatically for objects in the default Entity/Document folder. + * + * @param Definition|Reference $driver Driver DI definition or reference + * @param string[] $namespaces List of namespaces handled by $driver + * @param string[] $managerParameters List of container parameters that could + * hold the manager name. + * @param string $driverPattern Pattern for the metadata driver service name + * @param string|false $enabledParameter Service container parameter that must be + * present to enable the mapping. Set to false + * to not do any check, optional. + * @param string $configurationPattern Pattern for the Configuration service name + * @param string $registerAliasMethodName Name of Configuration class method to + * register alias. + * @param string[] $aliasMap Map of alias to namespace + */ + public function __construct($driver, array $namespaces, array $managerParameters, $driverPattern, $enabledParameter = false, $configurationPattern = '', $registerAliasMethodName = '', array $aliasMap = array()) + { + $this->driver = $driver; + $this->namespaces = $namespaces; + $this->managerParameters = $managerParameters; + $this->driverPattern = $driverPattern; + $this->enabledParameter = $enabledParameter; + if (count($aliasMap) && (!$configurationPattern || !$registerAliasMethodName)) { + throw new \InvalidArgumentException('configurationPattern and registerAliasMethodName are required to register namespace alias'); + } + $this->configurationPattern = $configurationPattern; + $this->registerAliasMethodName = $registerAliasMethodName; + $this->aliasMap = $aliasMap; + } + + /** + * Register mappings and alias with the metadata drivers. + * + * @param ContainerBuilder $container + */ + public function process(ContainerBuilder $container) + { + if (!$this->enabled($container)) { + return; + } + + $mappingDriverDef = $this->getDriver($container); + $chainDriverDefService = $this->getChainDriverServiceName($container); + // Definition for a Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain + $chainDriverDef = $container->getDefinition($chainDriverDefService); + foreach ($this->namespaces as $namespace) { + $chainDriverDef->addMethodCall('addDriver', array($mappingDriverDef, $namespace)); + } + + if (!count($this->aliasMap)) { + return; + } + + $configurationServiceName = $this->getConfigurationServiceName($container); + // Definition of the Doctrine\...\Configuration class specific to the Doctrine flavour. + $configurationServiceDefinition = $container->getDefinition($configurationServiceName); + foreach ($this->aliasMap as $alias => $namespace) { + $configurationServiceDefinition->addMethodCall($this->registerAliasMethodName, array($alias, $namespace)); + } + } + + /** + * Get the service name of the metadata chain driver that the mappings + * should be registered with. + * + * @param ContainerBuilder $container + * + * @return string The name of the chain driver service + * + * @throws InvalidArgumentException if non of the managerParameters has a + * non-empty value. + */ + protected function getChainDriverServiceName(ContainerBuilder $container) + { + return sprintf($this->driverPattern, $this->getManagerName($container)); + } + + /** + * Create the service definition for the metadata driver. + * + * @param ContainerBuilder $container passed on in case an extending class + * needs access to the container. + * + * @return Definition|Reference the metadata driver to add to all chain drivers + */ + protected function getDriver(ContainerBuilder $container) + { + return $this->driver; + } + + /** + * Get the service name from the pattern and the configured manager name. + * + * @param ContainerBuilder $container + * + * @return string a service definition name + * + * @throws InvalidArgumentException if none of the managerParameters has a + * non-empty value. + */ + private function getConfigurationServiceName(ContainerBuilder $container) + { + return sprintf($this->configurationPattern, $this->getManagerName($container)); + } + + /** + * Determine the manager name. + * + * The default implementation loops over the managerParameters and returns + * the first non-empty parameter. + * + * @param ContainerBuilder $container + * + * @return string The name of the active manager + * + * @throws InvalidArgumentException If none of the managerParameters is found in the container. + */ + private function getManagerName(ContainerBuilder $container) + { + foreach ($this->managerParameters as $param) { + if ($container->hasParameter($param)) { + $name = $container->getParameter($param); + if ($name) { + return $name; + } + } + } + + throw new InvalidArgumentException(sprintf( + 'Could not find the manager name parameter in the container. Tried the following parameter names: "%s"', + implode('", "', $this->managerParameters) + )); + } + + /** + * Determine whether this mapping should be activated or not. This allows + * to take this decision with the container builder available. + * + * This default implementation checks if the class has the enabledParameter + * configured and if so if that parameter is present in the container. + * + * @param ContainerBuilder $container + * + * @return bool whether this compiler pass really should register the mappings + */ + protected function enabled(ContainerBuilder $container) + { + return !$this->enabledParameter || $container->hasParameter($this->enabledParameter); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..ebcdf82f585a3693b6496ebd5fec2a70470212a0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\DependencyInjection\Security\UserProvider; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider\UserProviderFactoryInterface; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * EntityFactory creates services for Doctrine user provider. + * + * @author Fabien Potencier + * @author Christophe Coevoet + */ +class EntityFactory implements UserProviderFactoryInterface +{ + private $key; + private $providerId; + + public function __construct($key, $providerId) + { + $this->key = $key; + $this->providerId = $providerId; + } + + public function create(ContainerBuilder $container, $id, $config) + { + $container + ->setDefinition($id, new DefinitionDecorator($this->providerId)) + ->addArgument($config['class']) + ->addArgument($config['property']) + ->addArgument($config['manager_name']) + ; + } + + public function getKey() + { + return $this->key; + } + + public function addConfiguration(NodeDefinition $node) + { + $node + ->children() + ->scalarNode('class')->isRequired()->cannotBeEmpty()->end() + ->scalarNode('property')->defaultNull()->end() + ->scalarNode('manager_name')->defaultNull()->end() + ->end() + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ExpressionLanguage/DoctrineParserCache.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ExpressionLanguage/DoctrineParserCache.php new file mode 100644 index 0000000000000000000000000000000000000000..e2eb6e664557bafdb83cfd313b7dd19e12823c93 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ExpressionLanguage/DoctrineParserCache.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\ExpressionLanguage; + +@trigger_error('The '.__NAMESPACE__.'\DoctrineParserCache class is deprecated since version 3.2 and will be removed in 4.0. Use the Symfony\Component\Cache\Adapter\DoctrineAdapter class instead.', E_USER_DEPRECATED); + +use Doctrine\Common\Cache\Cache; +use Symfony\Component\ExpressionLanguage\ParsedExpression; +use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface; + +/** + * @author Adrien Brault + * + * @deprecated DoctrineParserCache class is deprecated since version 3.2 and will be removed in 4.0. Use the Symfony\Component\Cache\Adapter\DoctrineAdapter class instead. + */ +class DoctrineParserCache implements ParserCacheInterface +{ + /** + * @var Cache + */ + private $cache; + + public function __construct(Cache $cache) + { + $this->cache = $cache; + } + + /** + * {@inheritdoc} + */ + public function fetch($key) + { + if (false === $value = $this->cache->fetch($key)) { + return; + } + + return $value; + } + + /** + * {@inheritdoc} + */ + public function save($key, ParsedExpression $expression) + { + $this->cache->save($key, $expression); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..9477d8265529df853b1967ca9eb5ef25b98af6e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php @@ -0,0 +1,181 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Form\ChoiceList; + +use Doctrine\Common\Persistence\ObjectManager; +use Symfony\Component\Form\ChoiceList\ArrayChoiceList; +use Symfony\Component\Form\ChoiceList\ChoiceListInterface; +use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface; +use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; + +/** + * Loads choices using a Doctrine object manager. + * + * @author Bernhard Schussek + */ +class DoctrineChoiceLoader implements ChoiceLoaderInterface +{ + /** + * @var ObjectManager + */ + private $manager; + + /** + * @var string + */ + private $class; + + /** + * @var IdReader + */ + private $idReader; + + /** + * @var null|EntityLoaderInterface + */ + private $objectLoader; + + /** + * @var ChoiceListInterface + */ + private $choiceList; + + /** + * Creates a new choice loader. + * + * Optionally, an implementation of {@link EntityLoaderInterface} can be + * passed which optimizes the object loading for one of the Doctrine + * mapper implementations. + * + * @param ObjectManager $manager The object manager + * @param string $class The class name of the + * loaded objects + * @param IdReader $idReader The reader for the object + * IDs. + * @param ChoiceListFactoryInterface $factory The factory for creating + * the loaded choice list + * @param null|EntityLoaderInterface $objectLoader The objects loader + */ + public function __construct($manager, $class, $idReader = null, $objectLoader = null, $factory = null) + { + // BC to be removed and replace with type hints in 4.0 + if ($manager instanceof ChoiceListFactoryInterface) { + @trigger_error(sprintf('Passing a ChoiceListFactoryInterface to %s is deprecated since version 3.1 and will no longer be supported in 4.0. You should either call "%s::loadChoiceList" or override it to return a ChoiceListInterface.', __CLASS__, __CLASS__), E_USER_DEPRECATED); + + // Provide a BC layer since $factory has changed + // form first to last argument as of 3.1 + $manager = $class; + $class = $idReader; + $idReader = $objectLoader; + $objectLoader = $factory; + } + + $classMetadata = $manager->getClassMetadata($class); + + $this->manager = $manager; + $this->class = $classMetadata->getName(); + $this->idReader = $idReader ?: new IdReader($manager, $classMetadata); + $this->objectLoader = $objectLoader; + } + + /** + * {@inheritdoc} + */ + public function loadChoiceList($value = null) + { + if ($this->choiceList) { + return $this->choiceList; + } + + $objects = $this->objectLoader + ? $this->objectLoader->getEntities() + : $this->manager->getRepository($this->class)->findAll(); + + return $this->choiceList = new ArrayChoiceList($objects, $value); + } + + /** + * {@inheritdoc} + */ + public function loadValuesForChoices(array $choices, $value = null) + { + // Performance optimization + if (empty($choices)) { + return array(); + } + + // Optimize performance for single-field identifiers. We already + // know that the IDs are used as values + $optimize = null === $value || is_array($value) && $value[0] === $this->idReader; + + // Attention: This optimization does not check choices for existence + if ($optimize && !$this->choiceList && $this->idReader->isSingleId()) { + $values = array(); + + // Maintain order and indices of the given objects + foreach ($choices as $i => $object) { + if ($object instanceof $this->class) { + // Make sure to convert to the right format + $values[$i] = (string) $this->idReader->getIdValue($object); + } + } + + return $values; + } + + return $this->loadChoiceList($value)->getValuesForChoices($choices); + } + + /** + * {@inheritdoc} + */ + public function loadChoicesForValues(array $values, $value = null) + { + // Performance optimization + // Also prevents the generation of "WHERE id IN ()" queries through the + // object loader. At least with MySQL and on the development machine + // this was tested on, no exception was thrown for such invalid + // statements, consequently no test fails when this code is removed. + // https://github.com/symfony/symfony/pull/8981#issuecomment-24230557 + if (empty($values)) { + return array(); + } + + // Optimize performance in case we have an object loader and + // a single-field identifier + $optimize = null === $value || is_array($value) && $this->idReader === $value[0]; + + if ($optimize && !$this->choiceList && $this->objectLoader && $this->idReader->isSingleId()) { + $unorderedObjects = $this->objectLoader->getEntitiesByIds($this->idReader->getIdField(), $values); + $objectsById = array(); + $objects = array(); + + // Maintain order and indices from the given $values + // An alternative approach to the following loop is to add the + // "INDEX BY" clause to the Doctrine query in the loader, + // but I'm not sure whether that's doable in a generic fashion. + foreach ($unorderedObjects as $object) { + $objectsById[(string) $this->idReader->getIdValue($object)] = $object; + } + + foreach ($values as $i => $id) { + if (isset($objectsById[$id])) { + $objects[$i] = $objectsById[$id]; + } + } + + return $objects; + } + + return $this->loadChoiceList($value)->getChoicesForValues($values); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityLoaderInterface.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityLoaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e36043af63cb8abb207672793fa5291004cacba9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityLoaderInterface.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Form\ChoiceList; + +/** + * Custom loader for entities in the choice list. + * + * @author Benjamin Eberlei + */ +interface EntityLoaderInterface +{ + /** + * Returns an array of entities that are valid choices in the corresponding choice list. + * + * @return array The entities + */ + public function getEntities(); + + /** + * Returns an array of entities matching the given identifiers. + * + * @param string $identifier The identifier field of the object. This method + * is not applicable for fields with multiple + * identifiers. + * @param array $values The values of the identifiers + * + * @return array The entities + */ + public function getEntitiesByIds($identifier, array $values); +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php new file mode 100644 index 0000000000000000000000000000000000000000..cd966ea986f79eac741348a59da056c7e76aee2c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php @@ -0,0 +1,145 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Form\ChoiceList; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Persistence\ObjectManager; +use Symfony\Component\Form\Exception\RuntimeException; + +/** + * A utility for reading object IDs. + * + * @author Bernhard Schussek + * + * @internal This class is meant for internal use only. + */ +class IdReader +{ + /** + * @var ObjectManager + */ + private $om; + + /** + * @var ClassMetadata + */ + private $classMetadata; + + /** + * @var bool + */ + private $singleId; + + /** + * @var bool + */ + private $intId; + + /** + * @var string + */ + private $idField; + + /** + * @var IdReader|null + */ + private $associationIdReader; + + public function __construct(ObjectManager $om, ClassMetadata $classMetadata) + { + $ids = $classMetadata->getIdentifierFieldNames(); + $idType = $classMetadata->getTypeOfField(current($ids)); + + $this->om = $om; + $this->classMetadata = $classMetadata; + $this->singleId = 1 === count($ids); + $this->intId = $this->singleId && in_array($idType, array('integer', 'smallint', 'bigint')); + $this->idField = current($ids); + + // single field association are resolved, since the schema column could be an int + if ($this->singleId && $classMetadata->hasAssociation($this->idField)) { + $this->associationIdReader = new self($om, $om->getClassMetadata( + $classMetadata->getAssociationTargetClass($this->idField) + )); + + $this->singleId = $this->associationIdReader->isSingleId(); + $this->intId = $this->associationIdReader->isIntId(); + } + } + + /** + * Returns whether the class has a single-column ID. + * + * @return bool Returns `true` if the class has a single-column ID and + * `false` otherwise. + */ + public function isSingleId() + { + return $this->singleId; + } + + /** + * Returns whether the class has a single-column integer ID. + * + * @return bool Returns `true` if the class has a single-column integer ID + * and `false` otherwise. + */ + public function isIntId() + { + return $this->intId; + } + + /** + * Returns the ID value for an object. + * + * This method assumes that the object has a single-column ID. + * + * @param object $object The object + * + * @return mixed The ID value + */ + public function getIdValue($object) + { + if (!$object) { + return; + } + + if (!$this->om->contains($object)) { + throw new RuntimeException( + 'Entities passed to the choice field must be managed. Maybe '. + 'persist them in the entity manager?' + ); + } + + $this->om->initializeObject($object); + + $idValue = current($this->classMetadata->getIdentifierValues($object)); + + if ($this->associationIdReader) { + $idValue = $this->associationIdReader->getIdValue($idValue); + } + + return $idValue; + } + + /** + * Returns the name of the ID field. + * + * This method assumes that the object has a single-column ID. + * + * @return string The name of the ID field + */ + public function getIdField() + { + return $this->idField; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..6501f8393e9942999a46ad13c2a2567419497b63 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.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\Bridge\Doctrine\Form\ChoiceList; + +use Doctrine\ORM\QueryBuilder; +use Doctrine\DBAL\Connection; + +/** + * Loads entities using a {@link QueryBuilder} instance. + * + * @author Benjamin Eberlei + * @author Bernhard Schussek + */ +class ORMQueryBuilderLoader implements EntityLoaderInterface +{ + /** + * Contains the query builder that builds the query for fetching the + * entities. + * + * This property should only be accessed through queryBuilder. + * + * @var QueryBuilder + */ + private $queryBuilder; + + /** + * Construct an ORM Query Builder Loader. + * + * @param QueryBuilder $queryBuilder The query builder for creating the query builder + */ + public function __construct(QueryBuilder $queryBuilder) + { + $this->queryBuilder = $queryBuilder; + } + + /** + * {@inheritdoc} + */ + public function getEntities() + { + return $this->queryBuilder->getQuery()->execute(); + } + + /** + * {@inheritdoc} + */ + public function getEntitiesByIds($identifier, array $values) + { + $qb = clone $this->queryBuilder; + $alias = current($qb->getRootAliases()); + $parameter = 'ORMQueryBuilderLoader_getEntitiesByIds_'.$identifier; + $parameter = str_replace('.', '_', $parameter); + $where = $qb->expr()->in($alias.'.'.$identifier, ':'.$parameter); + + // Guess type + $entity = current($qb->getRootEntities()); + $metadata = $qb->getEntityManager()->getClassMetadata($entity); + if (in_array($metadata->getTypeOfField($identifier), array('integer', 'bigint', 'smallint'))) { + $parameterType = Connection::PARAM_INT_ARRAY; + + // Filter out non-integer values (e.g. ""). If we don't, some + // databases such as PostgreSQL fail. + $values = array_values(array_filter($values, function ($v) { + return (string) $v === (string) (int) $v || ctype_digit($v); + })); + } elseif ('guid' === $metadata->getTypeOfField($identifier)) { + $parameterType = Connection::PARAM_STR_ARRAY; + + // Like above, but we just filter out empty strings. + $values = array_values(array_filter($values, function ($v) { + return (string) $v !== ''; + })); + } else { + $parameterType = Connection::PARAM_STR_ARRAY; + } + if (!$values) { + return array(); + } + + return $qb->andWhere($where) + ->getQuery() + ->setParameter($parameter, $values, $parameterType) + ->getResult(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..e56674be351c533ddf5a77424bcbe0fa4dbf8da9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Form\DataTransformer; + +use Symfony\Component\Form\Exception\TransformationFailedException; +use Symfony\Component\Form\DataTransformerInterface; +use Doctrine\Common\Collections\Collection; +use Doctrine\Common\Collections\ArrayCollection; + +/** + * @author Bernhard Schussek + */ +class CollectionToArrayTransformer implements DataTransformerInterface +{ + /** + * Transforms a collection into an array. + * + * @param Collection $collection A collection of entities + * + * @return mixed An array of entities + * + * @throws TransformationFailedException + */ + public function transform($collection) + { + if (null === $collection) { + return array(); + } + + // For cases when the collection getter returns $collection->toArray() + // in order to prevent modifications of the returned collection + if (is_array($collection)) { + return $collection; + } + + if (!$collection instanceof Collection) { + throw new TransformationFailedException('Expected a Doctrine\Common\Collections\Collection object.'); + } + + return $collection->toArray(); + } + + /** + * Transforms choice keys into entities. + * + * @param mixed $array An array of entities + * + * @return Collection A collection of entities + */ + public function reverseTransform($array) + { + if ('' === $array || null === $array) { + $array = array(); + } else { + $array = (array) $array; + } + + return new ArrayCollection($array); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..fe86b103cbb347541da90160ead3a0ff2265b107 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Form; + +use Doctrine\Common\Persistence\ManagerRegistry; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Symfony\Component\Form\AbstractExtension; + +class DoctrineOrmExtension extends AbstractExtension +{ + protected $registry; + + public function __construct(ManagerRegistry $registry) + { + $this->registry = $registry; + } + + protected function loadTypes() + { + return array( + new EntityType($this->registry), + ); + } + + protected function loadTypeGuesser() + { + return new DoctrineOrmTypeGuesser($this->registry); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php new file mode 100644 index 0000000000000000000000000000000000000000..2e6af7a0d6a45e58d2bae89ad7752a415f93eff6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php @@ -0,0 +1,173 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Form; + +use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\Common\Persistence\Mapping\MappingException; +use Doctrine\DBAL\Types\Type; +use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\ORM\Mapping\MappingException as LegacyMappingException; +use Symfony\Component\Form\FormTypeGuesserInterface; +use Symfony\Component\Form\Guess\Guess; +use Symfony\Component\Form\Guess\TypeGuess; +use Symfony\Component\Form\Guess\ValueGuess; +use Doctrine\Common\Util\ClassUtils; + +class DoctrineOrmTypeGuesser implements FormTypeGuesserInterface +{ + protected $registry; + + private $cache = array(); + + public function __construct(ManagerRegistry $registry) + { + $this->registry = $registry; + } + + /** + * {@inheritdoc} + */ + public function guessType($class, $property) + { + if (!$ret = $this->getMetadata($class)) { + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', array(), Guess::LOW_CONFIDENCE); + } + + list($metadata, $name) = $ret; + + if ($metadata->hasAssociation($property)) { + $multiple = $metadata->isCollectionValuedAssociation($property); + $mapping = $metadata->getAssociationMapping($property); + + return new TypeGuess('Symfony\Bridge\Doctrine\Form\Type\EntityType', array('em' => $name, 'class' => $mapping['targetEntity'], 'multiple' => $multiple), Guess::HIGH_CONFIDENCE); + } + + switch ($metadata->getTypeOfField($property)) { + case Type::TARRAY: + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), Guess::MEDIUM_CONFIDENCE); + case Type::BOOLEAN: + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CheckboxType', array(), Guess::HIGH_CONFIDENCE); + case Type::DATETIME: + case Type::DATETIMETZ: + case 'vardatetime': + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateTimeType', array(), Guess::HIGH_CONFIDENCE); + case Type::DATE: + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateType', array(), Guess::HIGH_CONFIDENCE); + case Type::TIME: + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TimeType', array(), Guess::HIGH_CONFIDENCE); + case Type::DECIMAL: + case Type::FLOAT: + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', array(), Guess::MEDIUM_CONFIDENCE); + case Type::INTEGER: + case Type::BIGINT: + case Type::SMALLINT: + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\IntegerType', array(), Guess::MEDIUM_CONFIDENCE); + case Type::STRING: + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', array(), Guess::MEDIUM_CONFIDENCE); + case Type::TEXT: + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextareaType', array(), Guess::MEDIUM_CONFIDENCE); + default: + return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', array(), Guess::LOW_CONFIDENCE); + } + } + + /** + * {@inheritdoc} + */ + public function guessRequired($class, $property) + { + $classMetadatas = $this->getMetadata($class); + + if (!$classMetadatas) { + return; + } + + /** @var ClassMetadataInfo $classMetadata */ + $classMetadata = $classMetadatas[0]; + + // Check whether the field exists and is nullable or not + if ($classMetadata->hasField($property)) { + if (!$classMetadata->isNullable($property) && Type::BOOLEAN !== $classMetadata->getTypeOfField($property)) { + return new ValueGuess(true, Guess::HIGH_CONFIDENCE); + } + + return new ValueGuess(false, Guess::MEDIUM_CONFIDENCE); + } + + // Check whether the association exists, is a to-one association and its + // join column is nullable or not + if ($classMetadata->isAssociationWithSingleJoinColumn($property)) { + $mapping = $classMetadata->getAssociationMapping($property); + + if (!isset($mapping['joinColumns'][0]['nullable'])) { + // The "nullable" option defaults to true, in that case the + // field should not be required. + return new ValueGuess(false, Guess::HIGH_CONFIDENCE); + } + + return new ValueGuess(!$mapping['joinColumns'][0]['nullable'], Guess::HIGH_CONFIDENCE); + } + } + + /** + * {@inheritdoc} + */ + public function guessMaxLength($class, $property) + { + $ret = $this->getMetadata($class); + if ($ret && $ret[0]->hasField($property) && !$ret[0]->hasAssociation($property)) { + $mapping = $ret[0]->getFieldMapping($property); + + if (isset($mapping['length'])) { + return new ValueGuess($mapping['length'], Guess::HIGH_CONFIDENCE); + } + + if (in_array($ret[0]->getTypeOfField($property), array(Type::DECIMAL, Type::FLOAT))) { + return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE); + } + } + } + + /** + * {@inheritdoc} + */ + public function guessPattern($class, $property) + { + $ret = $this->getMetadata($class); + if ($ret && $ret[0]->hasField($property) && !$ret[0]->hasAssociation($property)) { + if (in_array($ret[0]->getTypeOfField($property), array(Type::DECIMAL, Type::FLOAT))) { + return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE); + } + } + } + + protected function getMetadata($class) + { + // normalize class name + $class = ClassUtils::getRealClass(ltrim($class, '\\')); + + if (array_key_exists($class, $this->cache)) { + return $this->cache[$class]; + } + + $this->cache[$class] = null; + foreach ($this->registry->getManagers() as $name => $em) { + try { + return $this->cache[$class] = array($em->getClassMetadata($class), $name); + } catch (MappingException $e) { + // not an entity or mapped super class + } catch (LegacyMappingException $e) { + // not an entity or mapped super class, using Doctrine ORM 2.2 + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php new file mode 100644 index 0000000000000000000000000000000000000000..ca837e64283ae262d73226acd022418ae60d1431 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Form\EventListener; + +use Doctrine\Common\Collections\Collection; +use Symfony\Component\Form\FormEvents; +use Symfony\Component\Form\FormEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Merge changes from the request to a Doctrine\Common\Collections\Collection instance. + * + * This works with ORM, MongoDB and CouchDB instances of the collection interface. + * + * @author Bernhard Schussek + * + * @see Collection + */ +class MergeDoctrineCollectionListener implements EventSubscriberInterface +{ + // Keep BC. To be removed in 4.0 + private $bc = true; + private $bcLayer = false; + + public static function getSubscribedEvents() + { + // Higher priority than core MergeCollectionListener so that this one + // is called before + return array( + FormEvents::SUBMIT => array( + array('onBind', 10), // deprecated + array('onSubmit', 5), + ), + ); + } + + public function onSubmit(FormEvent $event) + { + if ($this->bc) { + // onBind() has been overridden from a child class + @trigger_error('The onBind() method is deprecated since version 3.1 and will be removed in 4.0. Use the onSubmit() method instead.', E_USER_DEPRECATED); + + if (!$this->bcLayer) { + // If parent::onBind() has not been called, then logic has been executed + return; + } + } + + $collection = $event->getForm()->getData(); + $data = $event->getData(); + + // If all items were removed, call clear which has a higher + // performance on persistent collections + if ($collection instanceof Collection && count($data) === 0) { + $collection->clear(); + } + } + + /** + * Alias of {@link onSubmit()}. + * + * @deprecated since version 3.1, to be removed in 4.0. + * Use {@link onSubmit()} instead. + */ + public function onBind(FormEvent $event) + { + if (__CLASS__ === get_class($this)) { + $this->bc = false; + } else { + // parent::onBind() has been called + $this->bcLayer = true; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php new file mode 100644 index 0000000000000000000000000000000000000000..b28b9d51ad67b20ad41139ddbd9b852477eaa185 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php @@ -0,0 +1,283 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Form\Type; + +use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\Common\Persistence\ObjectManager; +use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader; +use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityLoaderInterface; +use Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader; +use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; +use Symfony\Bridge\Doctrine\Form\EventListener\MergeDoctrineCollectionListener; +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; +use Symfony\Component\Form\Exception\RuntimeException; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\Options; +use Symfony\Component\OptionsResolver\OptionsResolver; + +abstract class DoctrineType extends AbstractType +{ + /** + * @var ManagerRegistry + */ + protected $registry; + + /** + * @var IdReader[] + */ + private $idReaders = array(); + + /** + * @var DoctrineChoiceLoader[] + */ + private $choiceLoaders = array(); + + /** + * Creates the label for a choice. + * + * For backwards compatibility, objects are cast to strings by default. + * + * @param object $choice The object + * + * @return string The string representation of the object + * + * @internal This method is public to be usable as callback. It should not + * be used in user code. + */ + public static function createChoiceLabel($choice) + { + return (string) $choice; + } + + /** + * Creates the field name for a choice. + * + * This method is used to generate field names if the underlying object has + * a single-column integer ID. In that case, the value of the field is + * the ID of the object. That ID is also used as field name. + * + * @param object $choice The object + * @param int|string $key The choice key + * @param string $value The choice value. Corresponds to the object's + * ID here. + * + * @return string The field name + * + * @internal This method is public to be usable as callback. It should not + * be used in user code. + */ + public static function createChoiceName($choice, $key, $value) + { + return str_replace('-', '_', (string) $value); + } + + /** + * Gets important parts from QueryBuilder that will allow to cache its results. + * For instance in ORM two query builders with an equal SQL string and + * equal parameters are considered to be equal. + * + * @param object $queryBuilder + * + * @return array|false Array with important QueryBuilder parts or false if + * they can't be determined + * + * @internal This method is public to be usable as callback. It should not + * be used in user code. + */ + public function getQueryBuilderPartsForCachingHash($queryBuilder) + { + return false; + } + + public function __construct(ManagerRegistry $registry) + { + $this->registry = $registry; + } + + public function buildForm(FormBuilderInterface $builder, array $options) + { + if ($options['multiple']) { + $builder + ->addEventSubscriber(new MergeDoctrineCollectionListener()) + ->addViewTransformer(new CollectionToArrayTransformer(), true) + ; + } + } + + public function configureOptions(OptionsResolver $resolver) + { + $choiceLoader = function (Options $options) { + // Unless the choices are given explicitly, load them on demand + if (null === $options['choices']) { + $hash = null; + $qbParts = null; + + // If there is no QueryBuilder we can safely cache DoctrineChoiceLoader, + // also if concrete Type can return important QueryBuilder parts to generate + // hash key we go for it as well + if (!$options['query_builder'] || false !== ($qbParts = $this->getQueryBuilderPartsForCachingHash($options['query_builder']))) { + $hash = CachingFactoryDecorator::generateHash(array( + $options['em'], + $options['class'], + $qbParts, + )); + + if (isset($this->choiceLoaders[$hash])) { + return $this->choiceLoaders[$hash]; + } + } + + if (null !== $options['query_builder']) { + $entityLoader = $this->getLoader($options['em'], $options['query_builder'], $options['class']); + } else { + $queryBuilder = $options['em']->getRepository($options['class'])->createQueryBuilder('e'); + $entityLoader = $this->getLoader($options['em'], $queryBuilder, $options['class']); + } + + $doctrineChoiceLoader = new DoctrineChoiceLoader( + $options['em'], + $options['class'], + $options['id_reader'], + $entityLoader + ); + + if ($hash !== null) { + $this->choiceLoaders[$hash] = $doctrineChoiceLoader; + } + + return $doctrineChoiceLoader; + } + }; + + $choiceName = function (Options $options) { + /** @var IdReader $idReader */ + $idReader = $options['id_reader']; + + // If the object has a single-column, numeric ID, use that ID as + // field name. We can only use numeric IDs as names, as we cannot + // guarantee that a non-numeric ID contains a valid form name + if ($idReader->isIntId()) { + return array(__CLASS__, 'createChoiceName'); + } + + // Otherwise, an incrementing integer is used as name automatically + }; + + // The choices are always indexed by ID (see "choices" normalizer + // and DoctrineChoiceLoader), unless the ID is composite. Then they + // are indexed by an incrementing integer. + // Use the ID/incrementing integer as choice value. + $choiceValue = function (Options $options) { + /** @var IdReader $idReader */ + $idReader = $options['id_reader']; + + // If the entity has a single-column ID, use that ID as value + if ($idReader->isSingleId()) { + return array($idReader, 'getIdValue'); + } + + // Otherwise, an incrementing integer is used as value automatically + }; + + $emNormalizer = function (Options $options, $em) { + /* @var ManagerRegistry $registry */ + if (null !== $em) { + if ($em instanceof ObjectManager) { + return $em; + } + + return $this->registry->getManager($em); + } + + $em = $this->registry->getManagerForClass($options['class']); + + if (null === $em) { + throw new RuntimeException(sprintf( + 'Class "%s" seems not to be a managed Doctrine entity. '. + 'Did you forget to map it?', + $options['class'] + )); + } + + return $em; + }; + + // Invoke the query builder closure so that we can cache choice lists + // for equal query builders + $queryBuilderNormalizer = function (Options $options, $queryBuilder) { + if (is_callable($queryBuilder)) { + $queryBuilder = call_user_func($queryBuilder, $options['em']->getRepository($options['class'])); + } + + return $queryBuilder; + }; + + // Set the "id_reader" option via the normalizer. This option is not + // supposed to be set by the user. + $idReaderNormalizer = function (Options $options) { + $hash = CachingFactoryDecorator::generateHash(array( + $options['em'], + $options['class'], + )); + + // The ID reader is a utility that is needed to read the object IDs + // when generating the field values. The callback generating the + // field values has no access to the object manager or the class + // of the field, so we store that information in the reader. + // The reader is cached so that two choice lists for the same class + // (and hence with the same reader) can successfully be cached. + if (!isset($this->idReaders[$hash])) { + $classMetadata = $options['em']->getClassMetadata($options['class']); + $this->idReaders[$hash] = new IdReader($options['em'], $classMetadata); + } + + return $this->idReaders[$hash]; + }; + + $resolver->setDefaults(array( + 'em' => null, + 'query_builder' => null, + 'choices' => null, + 'choice_loader' => $choiceLoader, + 'choice_label' => array(__CLASS__, 'createChoiceLabel'), + 'choice_name' => $choiceName, + 'choice_value' => $choiceValue, + 'id_reader' => null, // internal + 'choice_translation_domain' => false, + )); + + $resolver->setRequired(array('class')); + + $resolver->setNormalizer('em', $emNormalizer); + $resolver->setNormalizer('query_builder', $queryBuilderNormalizer); + $resolver->setNormalizer('id_reader', $idReaderNormalizer); + + $resolver->setAllowedTypes('em', array('null', 'string', 'Doctrine\Common\Persistence\ObjectManager')); + } + + /** + * Return the default loader object. + * + * @param ObjectManager $manager + * @param mixed $queryBuilder + * @param string $class + * + * @return EntityLoaderInterface + */ + abstract public function getLoader(ObjectManager $manager, $queryBuilder, $class); + + public function getParent() + { + return 'Symfony\Component\Form\Extension\Core\Type\ChoiceType'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php new file mode 100644 index 0000000000000000000000000000000000000000..21f1860efd6e816aeb02298f5e456419f02f7bb9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Form\Type; + +use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\Query\Parameter; +use Doctrine\ORM\QueryBuilder; +use Symfony\Bridge\Doctrine\Form\ChoiceList\ORMQueryBuilderLoader; +use Symfony\Component\Form\Exception\UnexpectedTypeException; +use Symfony\Component\OptionsResolver\Options; +use Symfony\Component\OptionsResolver\OptionsResolver; + +class EntityType extends DoctrineType +{ + public function configureOptions(OptionsResolver $resolver) + { + parent::configureOptions($resolver); + + // Invoke the query builder closure so that we can cache choice lists + // for equal query builders + $queryBuilderNormalizer = function (Options $options, $queryBuilder) { + if (is_callable($queryBuilder)) { + $queryBuilder = call_user_func($queryBuilder, $options['em']->getRepository($options['class'])); + + if (null !== $queryBuilder && !$queryBuilder instanceof QueryBuilder) { + throw new UnexpectedTypeException($queryBuilder, 'Doctrine\ORM\QueryBuilder'); + } + } + + return $queryBuilder; + }; + + $resolver->setNormalizer('query_builder', $queryBuilderNormalizer); + $resolver->setAllowedTypes('query_builder', array('null', 'callable', 'Doctrine\ORM\QueryBuilder')); + } + + /** + * Return the default loader object. + * + * @param ObjectManager $manager + * @param QueryBuilder $queryBuilder + * @param string $class + * + * @return ORMQueryBuilderLoader + */ + public function getLoader(ObjectManager $manager, $queryBuilder, $class) + { + return new ORMQueryBuilderLoader($queryBuilder); + } + + /** + * {@inheritdoc} + */ + public function getBlockPrefix() + { + return 'entity'; + } + + /** + * We consider two query builders with an equal SQL string and + * equal parameters to be equal. + * + * @param QueryBuilder $queryBuilder + * + * @return array + * + * @internal This method is public to be usable as callback. It should not + * be used in user code. + */ + public function getQueryBuilderPartsForCachingHash($queryBuilder) + { + return array( + $queryBuilder->getQuery()->getSQL(), + array_map(array($this, 'parameterToArray'), $queryBuilder->getParameters()->toArray()), + ); + } + + /** + * Converts a query parameter to an array. + * + * @param Parameter $parameter The query parameter + * + * @return array The array representation of the parameter + */ + private function parameterToArray(Parameter $parameter) + { + return array($parameter->getName(), $parameter->getType(), $parameter->getValue()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandler.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..d819ff0a6c51e6e1838a0abdebb7426b792102c8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandler.php @@ -0,0 +1,274 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\HttpFoundation; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Driver\DriverException; +use Doctrine\DBAL\Driver\ServerInfoAwareConnection; +use Doctrine\DBAL\Platforms\SQLServer2008Platform; + +/** + * DBAL based session storage. + * + * This implementation is very similar to Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler + * but uses a Doctrine connection and thus also works with non-PDO-based drivers like mysqli and OCI8. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + * @author Tobias Schultze + */ +class DbalSessionHandler implements \SessionHandlerInterface +{ + /** + * @var Connection + */ + private $con; + + /** + * @var string + */ + private $table; + + /** + * @var string Column for session id + */ + private $idCol = 'sess_id'; + + /** + * @var string Column for session data + */ + private $dataCol = 'sess_data'; + + /** + * @var string Column for timestamp + */ + private $timeCol = 'sess_time'; + + /** + * Constructor. + * + * @param Connection $con A connection + * @param string $tableName Table name + */ + public function __construct(Connection $con, $tableName = 'sessions') + { + $this->con = $con; + $this->table = $tableName; + } + + /** + * {@inheritdoc} + */ + public function open($savePath, $sessionName) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function close() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function destroy($sessionId) + { + // delete the record associated with this id + $sql = "DELETE FROM $this->table WHERE $this->idCol = :id"; + + try { + $stmt = $this->con->prepare($sql); + $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + $stmt->execute(); + } catch (\Exception $e) { + throw new \RuntimeException(sprintf('Exception was thrown when trying to delete a session: %s', $e->getMessage()), 0, $e); + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function gc($maxlifetime) + { + // delete the session records that have expired + $sql = "DELETE FROM $this->table WHERE $this->timeCol < :time"; + + try { + $stmt = $this->con->prepare($sql); + $stmt->bindValue(':time', time() - $maxlifetime, \PDO::PARAM_INT); + $stmt->execute(); + } catch (\Exception $e) { + throw new \RuntimeException(sprintf('Exception was thrown when trying to delete expired sessions: %s', $e->getMessage()), 0, $e); + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function read($sessionId) + { + $sql = "SELECT $this->dataCol FROM $this->table WHERE $this->idCol = :id"; + + try { + $stmt = $this->con->prepare($sql); + $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + $stmt->execute(); + + // We use fetchAll instead of fetchColumn to make sure the DB cursor gets closed + $sessionRows = $stmt->fetchAll(\PDO::FETCH_NUM); + + if ($sessionRows) { + return base64_decode($sessionRows[0][0]); + } + + return ''; + } catch (\Exception $e) { + throw new \RuntimeException(sprintf('Exception was thrown when trying to read the session data: %s', $e->getMessage()), 0, $e); + } + } + + /** + * {@inheritdoc} + */ + public function write($sessionId, $data) + { + $encoded = base64_encode($data); + + try { + // We use a single MERGE SQL query when supported by the database. + $mergeSql = $this->getMergeSql(); + + if (null !== $mergeSql) { + $mergeStmt = $this->con->prepare($mergeSql); + $mergeStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + $mergeStmt->bindParam(':data', $encoded, \PDO::PARAM_STR); + $mergeStmt->bindValue(':time', time(), \PDO::PARAM_INT); + + // Oracle has a bug that will intermittently happen if you + // have only 1 bind on a CLOB field for 2 different statements + // (INSERT and UPDATE in this case) + if ('oracle' == $this->con->getDatabasePlatform()->getName()) { + $mergeStmt->bindParam(':data2', $encoded, \PDO::PARAM_STR); + } + + $mergeStmt->execute(); + + return true; + } + + $updateStmt = $this->con->prepare( + "UPDATE $this->table SET $this->dataCol = :data, $this->timeCol = :time WHERE $this->idCol = :id" + ); + $updateStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + $updateStmt->bindParam(':data', $encoded, \PDO::PARAM_STR); + $updateStmt->bindValue(':time', time(), \PDO::PARAM_INT); + $updateStmt->execute(); + + // When MERGE is not supported, like in Postgres < 9.5, we have to use this approach that can result in + // duplicate key errors when the same session is written simultaneously. We can just catch such an + // error and re-execute the update. This is similar to a serializable transaction with retry logic + // on serialization failures but without the overhead and without possible false positives due to + // longer gap locking. + if (!$updateStmt->rowCount()) { + try { + $insertStmt = $this->con->prepare( + "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time)" + ); + $insertStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + $insertStmt->bindParam(':data', $encoded, \PDO::PARAM_STR); + $insertStmt->bindValue(':time', time(), \PDO::PARAM_INT); + $insertStmt->execute(); + } catch (\Exception $e) { + $driverException = $e->getPrevious(); + // Handle integrity violation SQLSTATE 23000 (or a subclass like 23505 in Postgres) for duplicate keys + // DriverException only available since DBAL 2.5 + if ( + ($driverException instanceof DriverException && 0 === strpos($driverException->getSQLState(), '23')) || + ($driverException instanceof \PDOException && 0 === strpos($driverException->getCode(), '23')) + ) { + $updateStmt->execute(); + } else { + throw $e; + } + } + } + } catch (\Exception $e) { + throw new \RuntimeException(sprintf('Exception was thrown when trying to write the session data: %s', $e->getMessage()), 0, $e); + } + + return true; + } + + /** + * Returns a merge/upsert (i.e. insert or update) SQL query when supported by the database. + * + * @return string|null The SQL string or null when not supported + */ + private function getMergeSql() + { + $platform = $this->con->getDatabasePlatform()->getName(); + + switch (true) { + case 'mysql' === $platform: + return "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time) ". + "ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->timeCol = VALUES($this->timeCol)"; + case 'oracle' === $platform: + // DUAL is Oracle specific dummy table + return "MERGE INTO $this->table USING DUAL ON ($this->idCol = :id) ". + "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time) ". + "WHEN MATCHED THEN UPDATE SET $this->dataCol = :data2, $this->timeCol = :time"; + case $this->con->getDatabasePlatform() instanceof SQLServer2008Platform: + // MERGE is only available since SQL Server 2008 and must be terminated by semicolon + // It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx + return "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = :id) ". + "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time) ". + "WHEN MATCHED THEN UPDATE SET $this->dataCol = :data, $this->timeCol = :time;"; + case 'sqlite' === $platform: + return "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time)"; + case 'postgresql' === $platform && version_compare($this->getServerVersion(), '9.5', '>='): + return "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time) ". + "ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->timeCol)"; + } + } + + private function getServerVersion() + { + $params = $this->con->getParams(); + + // Explicit platform version requested (supersedes auto-detection), so we respect it. + if (isset($params['serverVersion'])) { + return $params['serverVersion']; + } + + $wrappedConnection = $this->con->getWrappedConnection(); + + if ($wrappedConnection instanceof ServerInfoAwareConnection) { + return $wrappedConnection->getServerVersion(); + } + + // Support DBAL 2.4 by accessing it directly when using PDO PgSQL + if ($wrappedConnection instanceof \PDO) { + return $wrappedConnection->getAttribute(\PDO::ATTR_SERVER_VERSION); + } + + // If we cannot guess the version, the empty string will mean we won't use the code for newer versions when doing version checks. + return ''; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandlerSchema.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandlerSchema.php new file mode 100644 index 0000000000000000000000000000000000000000..978373da0cbd059af6ed2021a4a227daf9c6968c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandlerSchema.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\Doctrine\HttpFoundation; + +use Doctrine\DBAL\Schema\Schema; + +/** + * DBAL Session Storage Schema. + * + * @author Johannes M. Schmitt + */ +final class DbalSessionHandlerSchema extends Schema +{ + public function __construct($tableName = 'sessions') + { + parent::__construct(); + + $this->addSessionTable($tableName); + } + + public function addToSchema(Schema $schema) + { + foreach ($this->getTables() as $table) { + $schema->_addTable($table); + } + } + + private function addSessionTable($tableName) + { + $table = $this->createTable($tableName); + $table->addColumn('sess_id', 'string'); + $table->addColumn('sess_data', 'text')->setNotNull(true); + $table->addColumn('sess_time', 'integer')->setNotNull(true)->setUnsigned(true); + $table->setPrimaryKey(array('sess_id')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/LICENSE b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php new file mode 100644 index 0000000000000000000000000000000000000000..88b48e1ddb47b130266b6d5fab0574ef0f71a64e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Logger; + +use Psr\Log\LoggerInterface; +use Symfony\Component\Stopwatch\Stopwatch; +use Doctrine\DBAL\Logging\SQLLogger; + +/** + * DbalLogger. + * + * @author Fabien Potencier + */ +class DbalLogger implements SQLLogger +{ + const MAX_STRING_LENGTH = 32; + const BINARY_DATA_VALUE = '(binary value)'; + + protected $logger; + protected $stopwatch; + + /** + * Constructor. + * + * @param LoggerInterface $logger A LoggerInterface instance + * @param Stopwatch $stopwatch A Stopwatch instance + */ + public function __construct(LoggerInterface $logger = null, Stopwatch $stopwatch = null) + { + $this->logger = $logger; + $this->stopwatch = $stopwatch; + } + + /** + * {@inheritdoc} + */ + public function startQuery($sql, array $params = null, array $types = null) + { + if (null !== $this->stopwatch) { + $this->stopwatch->start('doctrine', 'doctrine'); + } + + if (null !== $this->logger) { + $this->log($sql, null === $params ? array() : $this->normalizeParams($params)); + } + } + + /** + * {@inheritdoc} + */ + public function stopQuery() + { + if (null !== $this->stopwatch) { + $this->stopwatch->stop('doctrine'); + } + } + + /** + * Logs a message. + * + * @param string $message A message to log + * @param array $params The context + */ + protected function log($message, array $params) + { + $this->logger->debug($message, $params); + } + + private function normalizeParams(array $params) + { + foreach ($params as $index => $param) { + // normalize recursively + if (is_array($param)) { + $params[$index] = $this->normalizeParams($param); + continue; + } + + if (!is_string($params[$index])) { + continue; + } + + // non utf-8 strings break json encoding + if (!preg_match('//u', $params[$index])) { + $params[$index] = self::BINARY_DATA_VALUE; + continue; + } + + // detect if the too long string must be shorten + if (self::MAX_STRING_LENGTH < mb_strlen($params[$index], 'UTF-8')) { + $params[$index] = mb_substr($params[$index], 0, self::MAX_STRING_LENGTH - 6, 'UTF-8').' [...]'; + continue; + } + } + + return $params; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ManagerRegistry.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ManagerRegistry.php new file mode 100644 index 0000000000000000000000000000000000000000..d602bfc2acaad75e977d1cd9f76239ea4ac6dece --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ManagerRegistry.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine; + +use ProxyManager\Proxy\LazyLoadingInterface; +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Doctrine\Common\Persistence\AbstractManagerRegistry; + +/** + * References Doctrine connections and entity/document managers. + * + * @author Lukas Kahwe Smith + */ +abstract class ManagerRegistry extends AbstractManagerRegistry implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + /** + * {@inheritdoc} + */ + protected function getService($name) + { + return $this->container->get($name); + } + + /** + * {@inheritdoc} + */ + protected function resetService($name) + { + if (!$this->container->initialized($name)) { + return; + } + $manager = $this->container->get($name); + + if (!$manager instanceof LazyLoadingInterface) { + @trigger_error(sprintf('Resetting a non-lazy manager service is deprecated since Symfony 3.2 and will throw an exception in version 4.0. Set the "%s" service as lazy and require "symfony/proxy-manager-bridge" in your composer.json file instead.', $name), E_USER_DEPRECATED); + + $this->container->set($name, null); + + return; + } + $manager->setProxyInitializer(\Closure::bind( + function (&$wrappedInstance, LazyLoadingInterface $manager) use ($name) { + if (isset($this->aliases[$name = strtolower($name)])) { + $name = $this->aliases[$name]; + } + $method = !isset($this->methodMap[$name]) ? 'get'.strtr($name, $this->underscoreMap).'Service' : $this->methodMap[$name]; + $wrappedInstance = $this->{$method}(false); + + $manager->setProxyInitializer(null); + + return true; + }, + $this->container, + Container::class + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php new file mode 100644 index 0000000000000000000000000000000000000000..aba31792f99eefd261fd41a564ba72bcbca8455e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php @@ -0,0 +1,204 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\PropertyInfo; + +use Doctrine\Common\Persistence\Mapping\ClassMetadataFactory; +use Doctrine\Common\Persistence\Mapping\MappingException; +use Doctrine\DBAL\Types\Type as DBALType; +use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\ORM\Mapping\MappingException as OrmMappingException; +use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; +use Symfony\Component\PropertyInfo\Type; + +/** + * Extracts data using Doctrine ORM and ODM metadata. + * + * @author Kévin Dunglas + */ +class DoctrineExtractor implements PropertyListExtractorInterface, PropertyTypeExtractorInterface +{ + /** + * @var ClassMetadataFactory + */ + private $classMetadataFactory; + + public function __construct(ClassMetadataFactory $classMetadataFactory) + { + $this->classMetadataFactory = $classMetadataFactory; + } + + /** + * {@inheritdoc} + */ + public function getProperties($class, array $context = array()) + { + try { + $metadata = $this->classMetadataFactory->getMetadataFor($class); + } catch (MappingException $exception) { + return; + } catch (OrmMappingException $exception) { + return; + } + + return array_merge($metadata->getFieldNames(), $metadata->getAssociationNames()); + } + + /** + * {@inheritdoc} + */ + public function getTypes($class, $property, array $context = array()) + { + try { + $metadata = $this->classMetadataFactory->getMetadataFor($class); + } catch (MappingException $exception) { + return; + } catch (OrmMappingException $exception) { + return; + } + + if ($metadata->hasAssociation($property)) { + $class = $metadata->getAssociationTargetClass($property); + + if ($metadata->isSingleValuedAssociation($property)) { + if ($metadata instanceof ClassMetadataInfo) { + $associationMapping = $metadata->getAssociationMapping($property); + + $nullable = $this->isAssociationNullable($associationMapping); + } else { + $nullable = false; + } + + return array(new Type(Type::BUILTIN_TYPE_OBJECT, $nullable, $class)); + } + + $collectionKeyType = Type::BUILTIN_TYPE_INT; + + if ($metadata instanceof ClassMetadataInfo) { + $associationMapping = $metadata->getAssociationMapping($property); + + if (isset($associationMapping['indexBy'])) { + $indexProperty = $associationMapping['indexBy']; + $subMetadata = $this->classMetadataFactory->getMetadataFor($associationMapping['targetEntity']); + $typeOfField = $subMetadata->getTypeOfField($indexProperty); + + $collectionKeyType = $this->getPhpType($typeOfField); + } + } + + return array(new Type( + Type::BUILTIN_TYPE_OBJECT, + false, + 'Doctrine\Common\Collections\Collection', + true, + new Type($collectionKeyType), + new Type(Type::BUILTIN_TYPE_OBJECT, false, $class) + )); + } + + if ($metadata->hasField($property)) { + $typeOfField = $metadata->getTypeOfField($property); + $nullable = $metadata instanceof ClassMetadataInfo && $metadata->isNullable($property); + + switch ($typeOfField) { + case DBALType::DATE: + case DBALType::DATETIME: + case DBALType::DATETIMETZ: + case 'vardatetime': + case DBALType::TIME: + return array(new Type(Type::BUILTIN_TYPE_OBJECT, $nullable, 'DateTime')); + + case DBALType::TARRAY: + return array(new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true)); + + case DBALType::SIMPLE_ARRAY: + return array(new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING))); + + case DBALType::JSON_ARRAY: + return array(new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true)); + + default: + $builtinType = $this->getPhpType($typeOfField); + + return $builtinType ? array(new Type($builtinType, $nullable)) : null; + } + } + } + + /** + * Determines whether an association is nullable. + * + * @param array $associationMapping + * + * @return bool + * + * @see https://github.com/doctrine/doctrine2/blob/v2.5.4/lib/Doctrine/ORM/Tools/EntityGenerator.php#L1221-L1246 + */ + private function isAssociationNullable(array $associationMapping) + { + if (isset($associationMapping['id']) && $associationMapping['id']) { + return false; + } + + if (!isset($associationMapping['joinColumns'])) { + return true; + } + + $joinColumns = $associationMapping['joinColumns']; + foreach ($joinColumns as $joinColumn) { + if (isset($joinColumn['nullable']) && !$joinColumn['nullable']) { + return false; + } + } + + return true; + } + + /** + * Gets the corresponding built-in PHP type. + * + * @param string $doctrineType + * + * @return string|null + */ + private function getPhpType($doctrineType) + { + switch ($doctrineType) { + case DBALType::SMALLINT: + case DBALType::BIGINT: + case DBALType::INTEGER: + return Type::BUILTIN_TYPE_INT; + + case DBALType::FLOAT: + return Type::BUILTIN_TYPE_FLOAT; + + case DBALType::STRING: + case DBALType::TEXT: + case DBALType::GUID: + case DBALType::DECIMAL: + return Type::BUILTIN_TYPE_STRING; + + case DBALType::BOOLEAN: + return Type::BUILTIN_TYPE_BOOL; + + case DBALType::BLOB: + case 'binary': + return Type::BUILTIN_TYPE_RESOURCE; + + case DBALType::OBJECT: + return Type::BUILTIN_TYPE_OBJECT; + + default: + return; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/README.md b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/README.md new file mode 100644 index 0000000000000000000000000000000000000000..46d897d061e0fdc69390272ad42148de40e01fec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/README.md @@ -0,0 +1,13 @@ +Doctrine Bridge +=============== + +Provides integration for [Doctrine](http://www.doctrine-project.org/) with +various Symfony components. + +Resources +--------- + + * [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/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/RegistryInterface.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/RegistryInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..9bc98217c918fa1842f5c2f4e1c8bd615e57efb5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/RegistryInterface.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\Bridge\Doctrine; + +use Doctrine\Common\Persistence\ManagerRegistry as ManagerRegistryInterface; +use Doctrine\ORM\EntityManager; + +/** + * References Doctrine connections and entity managers. + * + * @author Fabien Potencier + */ +interface RegistryInterface extends ManagerRegistryInterface +{ + /** + * Gets the default entity manager name. + * + * @return string The default entity manager name + */ + public function getDefaultEntityManagerName(); + + /** + * Gets a named entity manager. + * + * @param string $name The entity manager name (null for the default one) + * + * @return EntityManager + */ + public function getEntityManager($name = null); + + /** + * Gets an array of all registered entity managers. + * + * @return array An array of EntityManager instances + */ + public function getEntityManagers(); + + /** + * Resets a named entity manager. + * + * This method is useful when an entity manager has been closed + * because of a rollbacked transaction AND when you think that + * it makes sense to get a new one to replace the closed one. + * + * Be warned that you will get a brand new entity manager as + * the existing one is not useable anymore. This means that any + * other object with a dependency on this entity manager will + * hold an obsolete reference. You can inject the registry instead + * to avoid this problem. + * + * @param string $name The entity manager name (null for the default one) + * + * @return EntityManager + */ + public function resetEntityManager($name = null); + + /** + * Resolves a registered namespace alias to the full namespace. + * + * This method looks for the alias in all registered entity managers. + * + * @param string $alias The alias + * + * @return string The full namespace + * + * @see Configuration::getEntityNamespace + */ + public function getEntityNamespace($alias); + + /** + * Gets all connection names. + * + * @return array An array of connection names + */ + public function getEntityManagerNames(); + + /** + * Gets the entity manager associated with a given class. + * + * @param string $class A Doctrine Entity class name + * + * @return EntityManager|null + */ + public function getEntityManagerForClass($class); +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..b2216b7ae31df213731005943a8486fdd14475c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.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\Doctrine\Security\RememberMe; + +use Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface; +use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentTokenInterface; +use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken; +use Symfony\Component\Security\Core\Exception\TokenNotFoundException; +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Types\Type as DoctrineType; + +/** + * This class provides storage for the tokens that is set in "remember me" + * cookies. This way no password secrets will be stored in the cookies on + * the client machine, and thus the security is improved. + * + * This depends only on doctrine in order to get a database connection + * and to do the conversion of the datetime column. + * + * In order to use this class, you need the following table in your database: + * CREATE TABLE `rememberme_token` ( + * `series` char(88) UNIQUE PRIMARY KEY NOT NULL, + * `value` char(88) NOT NULL, + * `lastUsed` datetime NOT NULL, + * `class` varchar(100) NOT NULL, + * `username` varchar(200) NOT NULL + * ); + */ +class DoctrineTokenProvider implements TokenProviderInterface +{ + /** + * Doctrine DBAL database connection + * F.ex. service id: doctrine.dbal.default_connection. + * + * @var Connection + */ + private $conn; + + /** + * new DoctrineTokenProvider for the RememberMe authentication service. + * + * @param Connection $conn + */ + public function __construct(Connection $conn) + { + $this->conn = $conn; + } + + /** + * {@inheritdoc} + */ + public function loadTokenBySeries($series) + { + $sql = 'SELECT class, username, value, lastUsed' + .' FROM rememberme_token WHERE series=:series'; + $paramValues = array('series' => $series); + $paramTypes = array('series' => \PDO::PARAM_STR); + $stmt = $this->conn->executeQuery($sql, $paramValues, $paramTypes); + $row = $stmt->fetch(\PDO::FETCH_ASSOC); + + if ($row) { + return new PersistentToken($row['class'], $row['username'], $series, $row['value'], new \DateTime($row['lastUsed'])); + } + + throw new TokenNotFoundException('No token found.'); + } + + /** + * {@inheritdoc} + */ + public function deleteTokenBySeries($series) + { + $sql = 'DELETE FROM rememberme_token WHERE series=:series'; + $paramValues = array('series' => $series); + $paramTypes = array('series' => \PDO::PARAM_STR); + $this->conn->executeUpdate($sql, $paramValues, $paramTypes); + } + + /** + * {@inheritdoc} + */ + public function updateToken($series, $tokenValue, \DateTime $lastUsed) + { + $sql = 'UPDATE rememberme_token SET value=:value, lastUsed=:lastUsed' + .' WHERE series=:series'; + $paramValues = array( + 'value' => $tokenValue, + 'lastUsed' => $lastUsed, + 'series' => $series, + ); + $paramTypes = array( + 'value' => \PDO::PARAM_STR, + 'lastUsed' => DoctrineType::DATETIME, + 'series' => \PDO::PARAM_STR, + ); + $updated = $this->conn->executeUpdate($sql, $paramValues, $paramTypes); + if ($updated < 1) { + throw new TokenNotFoundException('No token found.'); + } + } + + /** + * {@inheritdoc} + */ + public function createNewToken(PersistentTokenInterface $token) + { + $sql = 'INSERT INTO rememberme_token' + .' (class, username, series, value, lastUsed)' + .' VALUES (:class, :username, :series, :value, :lastUsed)'; + $paramValues = array( + 'class' => $token->getClass(), + 'username' => $token->getUsername(), + 'series' => $token->getSeries(), + 'value' => $token->getTokenValue(), + 'lastUsed' => $token->getLastUsed(), + ); + $paramTypes = array( + 'class' => \PDO::PARAM_STR, + 'username' => \PDO::PARAM_STR, + 'series' => \PDO::PARAM_STR, + 'value' => \PDO::PARAM_STR, + 'lastUsed' => DoctrineType::DATETIME, + ); + $this->conn->executeUpdate($sql, $paramValues, $paramTypes); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..22f6b388a1c4c868acb4da22dba03f76bd69f954 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Security\User; + +use Doctrine\Common\Persistence\ManagerRegistry; +use Symfony\Component\Security\Core\Exception\UnsupportedUserException; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Component\Security\Core\User\UserInterface; + +/** + * Wrapper around a Doctrine ObjectManager. + * + * Provides easy to use provisioning for Doctrine entity users. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class EntityUserProvider implements UserProviderInterface +{ + private $registry; + private $managerName; + private $classOrAlias; + private $class; + private $property; + + public function __construct(ManagerRegistry $registry, $classOrAlias, $property = null, $managerName = null) + { + $this->registry = $registry; + $this->managerName = $managerName; + $this->classOrAlias = $classOrAlias; + $this->property = $property; + } + + /** + * {@inheritdoc} + */ + public function loadUserByUsername($username) + { + $repository = $this->getRepository(); + if (null !== $this->property) { + $user = $repository->findOneBy(array($this->property => $username)); + } else { + if (!$repository instanceof UserLoaderInterface) { + throw new \InvalidArgumentException(sprintf('You must either make the "%s" entity Doctrine Repository ("%s") implement "Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface" or set the "property" option in the corresponding entity provider configuration.', $this->classOrAlias, get_class($repository))); + } + + $user = $repository->loadUserByUsername($username); + } + + if (null === $user) { + throw new UsernameNotFoundException(sprintf('User "%s" not found.', $username)); + } + + return $user; + } + + /** + * {@inheritdoc} + */ + public function refreshUser(UserInterface $user) + { + $class = $this->getClass(); + if (!$user instanceof $class) { + throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user))); + } + + $repository = $this->getRepository(); + if ($repository instanceof UserProviderInterface) { + $refreshedUser = $repository->refreshUser($user); + } else { + // The user must be reloaded via the primary key as all other data + // might have changed without proper persistence in the database. + // That's the case when the user has been changed by a form with + // validation errors. + if (!$id = $this->getClassMetadata()->getIdentifierValues($user)) { + throw new \InvalidArgumentException('You cannot refresh a user '. + 'from the EntityUserProvider that does not contain an identifier. '. + 'The user object has to be serialized with its own identifier '. + 'mapped by Doctrine.' + ); + } + + $refreshedUser = $repository->find($id); + if (null === $refreshedUser) { + throw new UsernameNotFoundException(sprintf('User with id %s not found', json_encode($id))); + } + } + + return $refreshedUser; + } + + /** + * {@inheritdoc} + */ + public function supportsClass($class) + { + return $class === $this->getClass() || is_subclass_of($class, $this->getClass()); + } + + private function getObjectManager() + { + return $this->registry->getManager($this->managerName); + } + + private function getRepository() + { + return $this->getObjectManager()->getRepository($this->classOrAlias); + } + + private function getClass() + { + if (null === $this->class) { + $class = $this->classOrAlias; + + if (false !== strpos($class, ':')) { + $class = $this->getClassMetadata()->getName(); + } + + $this->class = $class; + } + + return $this->class; + } + + private function getClassMetadata() + { + return $this->getObjectManager()->getClassMetadata($this->classOrAlias); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Security/User/UserLoaderInterface.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Security/User/UserLoaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..452939fa7934a33f2db34d1287d5dda8c18aaa59 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Security/User/UserLoaderInterface.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Security\User; + +use Symfony\Component\Security\Core\User\UserInterface; + +/** + * Represents a class that loads UserInterface objects from Doctrine source for the authentication system. + * + * This interface is meant to facilitate the loading of a User from Doctrine source using a custom method. + * If you want to implement your own logic of retrieving the user from Doctrine your repository should implement this + * interface. + * + * @see UserInterface + * + * @author Michal Trojanowski + */ +interface UserLoaderInterface +{ + /** + * Loads the user for the given username. + * + * This method must return null if the user is not found. + * + * @param string $username The username + * + * @return UserInterface|null + */ + public function loadUserByUsername($username); +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..ee1e36859ed145aaa402d6e14e6b377f33481e46 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Test; + +use Doctrine\Common\Annotations\AnnotationReader; +use Doctrine\Common\Cache\ArrayCache; +use Doctrine\ORM\Configuration; +use Doctrine\ORM\Mapping\Driver\AnnotationDriver; +use Doctrine\ORM\EntityManager; +use PHPUnit\Framework\TestCase; + +/** + * Provides utility functions needed in tests. + * + * @author Bernhard Schussek + */ +class DoctrineTestHelper +{ + /** + * Returns an entity manager for testing. + * + * @param Configuration|null $config + * + * @return EntityManager + */ + public static function createTestEntityManager(Configuration $config = null) + { + if (!extension_loaded('pdo_sqlite')) { + TestCase::markTestSkipped('Extension pdo_sqlite is required.'); + } + + if (null === $config) { + $config = self::createTestConfiguration(); + } + + $params = array( + 'driver' => 'pdo_sqlite', + 'memory' => true, + ); + + return EntityManager::create($params, $config); + } + + /** + * @return Configuration + */ + public static function createTestConfiguration() + { + $config = new Configuration(); + $config->setEntityNamespaces(array('SymfonyTestsDoctrine' => 'Symfony\Bridge\Doctrine\Tests\Fixtures')); + $config->setAutoGenerateProxyClasses(true); + $config->setProxyDir(\sys_get_temp_dir()); + $config->setProxyNamespace('SymfonyTests\Doctrine'); + $config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader())); + $config->setQueryCacheImpl(new ArrayCache()); + $config->setMetadataCacheImpl(new ArrayCache()); + + return $config; + } + + /** + * This class cannot be instantiated. + */ + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Test/TestRepositoryFactory.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Test/TestRepositoryFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..b7cbafa947aefe0adb36676f86ceb9085fa02809 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Test/TestRepositoryFactory.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Test; + +use Doctrine\Common\Persistence\ObjectRepository; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Repository\RepositoryFactory; + +/** + * @author Andreas Braun + */ +final class TestRepositoryFactory implements RepositoryFactory +{ + /** + * @var ObjectRepository[] + */ + private $repositoryList = array(); + + /** + * {@inheritdoc} + */ + public function getRepository(EntityManagerInterface $entityManager, $entityName) + { + $repositoryHash = $this->getRepositoryHash($entityManager, $entityName); + + if (isset($this->repositoryList[$repositoryHash])) { + return $this->repositoryList[$repositoryHash]; + } + + return $this->repositoryList[$repositoryHash] = $this->createRepository($entityManager, $entityName); + } + + public function setRepository(EntityManagerInterface $entityManager, $entityName, ObjectRepository $repository) + { + $repositoryHash = $this->getRepositoryHash($entityManager, $entityName); + + $this->repositoryList[$repositoryHash] = $repository; + } + + /** + * @return ObjectRepository + */ + private function createRepository(EntityManagerInterface $entityManager, $entityName) + { + /* @var $metadata ClassMetadata */ + $metadata = $entityManager->getClassMetadata($entityName); + $repositoryClassName = $metadata->customRepositoryClassName ?: $entityManager->getConfiguration()->getDefaultRepositoryClassName(); + + return new $repositoryClassName($entityManager, $metadata); + } + + private function getRepositoryHash(EntityManagerInterface $entityManager, $entityName) + { + return $entityManager->getClassMetadata($entityName)->getName().spl_object_hash($entityManager); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f40d1ca710ed16dc1f982991650c96cd0ae08610 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\ContainerAwareEventManager; +use Symfony\Component\DependencyInjection\Container; + +class ContainerAwareEventManagerTest extends TestCase +{ + private $container; + private $evm; + + protected function setUp() + { + $this->container = new Container(); + $this->evm = new ContainerAwareEventManager($this->container); + } + + public function testDispatchEvent() + { + $this->container->set('foobar', $listener1 = new MyListener()); + $this->evm->addEventListener('foo', 'foobar'); + $this->evm->addEventListener('foo', $listener2 = new MyListener()); + + $this->evm->dispatchEvent('foo'); + + $this->assertTrue($listener1->called); + $this->assertTrue($listener2->called); + } + + public function testRemoveEventListener() + { + $this->evm->addEventListener('foo', 'bar'); + $this->evm->addEventListener('foo', $listener = new MyListener()); + + $listeners = array('foo' => array('_service_bar' => 'bar', spl_object_hash($listener) => $listener)); + $this->assertSame($listeners, $this->evm->getListeners()); + $this->assertSame($listeners['foo'], $this->evm->getListeners('foo')); + + $this->evm->removeEventListener('foo', $listener); + $this->assertSame(array('_service_bar' => 'bar'), $this->evm->getListeners('foo')); + + $this->evm->removeEventListener('foo', 'bar'); + $this->assertSame(array(), $this->evm->getListeners('foo')); + } +} + +class MyListener +{ + public $called = false; + + public function foo() + { + $this->called = true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3059f8aba00a34f64a263acdc5c6ea2a2ace0383 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php @@ -0,0 +1,164 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\DataCollector; + +use Doctrine\DBAL\Platforms\MySqlPlatform; +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +class DoctrineDataCollectorTest extends TestCase +{ + public function testCollectConnections() + { + $c = $this->createCollector(array()); + $c->collect(new Request(), new Response()); + $this->assertEquals(array('default' => 'doctrine.dbal.default_connection'), $c->getConnections()); + } + + public function testCollectManagers() + { + $c = $this->createCollector(array()); + $c->collect(new Request(), new Response()); + $this->assertEquals(array('default' => 'doctrine.orm.default_entity_manager'), $c->getManagers()); + } + + public function testCollectQueryCount() + { + $c = $this->createCollector(array()); + $c->collect(new Request(), new Response()); + $this->assertEquals(0, $c->getQueryCount()); + + $queries = array( + array('sql' => 'SELECT * FROM table1', 'params' => array(), 'types' => array(), 'executionMS' => 0), + ); + $c = $this->createCollector($queries); + $c->collect(new Request(), new Response()); + $this->assertEquals(1, $c->getQueryCount()); + } + + public function testCollectTime() + { + $c = $this->createCollector(array()); + $c->collect(new Request(), new Response()); + $this->assertEquals(0, $c->getTime()); + + $queries = array( + array('sql' => 'SELECT * FROM table1', 'params' => array(), 'types' => array(), 'executionMS' => 1), + ); + $c = $this->createCollector($queries); + $c->collect(new Request(), new Response()); + $this->assertEquals(1, $c->getTime()); + + $queries = array( + array('sql' => 'SELECT * FROM table1', 'params' => array(), 'types' => array(), 'executionMS' => 1), + array('sql' => 'SELECT * FROM table2', 'params' => array(), 'types' => array(), 'executionMS' => 2), + ); + $c = $this->createCollector($queries); + $c->collect(new Request(), new Response()); + $this->assertEquals(3, $c->getTime()); + } + + /** + * @dataProvider paramProvider + */ + public function testCollectQueries($param, $types, $expected, $explainable) + { + $queries = array( + array('sql' => 'SELECT * FROM table1 WHERE field1 = ?1', 'params' => array($param), 'types' => $types, 'executionMS' => 1), + ); + $c = $this->createCollector($queries); + $c->collect(new Request(), new Response()); + + $collectedQueries = $c->getQueries(); + $this->assertEquals($expected, $collectedQueries['default'][0]['params'][0]); + $this->assertEquals($explainable, $collectedQueries['default'][0]['explainable']); + } + + public function testCollectQueryWithNoParams() + { + $queries = array( + array('sql' => 'SELECT * FROM table1', 'params' => array(), 'types' => array(), 'executionMS' => 1), + array('sql' => 'SELECT * FROM table1', 'params' => null, 'types' => null, 'executionMS' => 1), + ); + $c = $this->createCollector($queries); + $c->collect(new Request(), new Response()); + + $collectedQueries = $c->getQueries(); + $this->assertEquals(array(), $collectedQueries['default'][0]['params']); + $this->assertTrue($collectedQueries['default'][0]['explainable']); + $this->assertEquals(array(), $collectedQueries['default'][1]['params']); + $this->assertTrue($collectedQueries['default'][1]['explainable']); + } + + /** + * @dataProvider paramProvider + */ + public function testSerialization($param, $types, $expected, $explainable) + { + $queries = array( + array('sql' => 'SELECT * FROM table1 WHERE field1 = ?1', 'params' => array($param), 'types' => $types, 'executionMS' => 1), + ); + $c = $this->createCollector($queries); + $c->collect(new Request(), new Response()); + $c = unserialize(serialize($c)); + + $collectedQueries = $c->getQueries(); + $this->assertEquals($expected, $collectedQueries['default'][0]['params'][0]); + $this->assertEquals($explainable, $collectedQueries['default'][0]['explainable']); + } + + public function paramProvider() + { + return array( + array('some value', array(), 'some value', true), + array(1, array(), 1, true), + array(true, array(), true, true), + array(null, array(), null, true), + array(new \DateTime('2011-09-11'), array('date'), '2011-09-11', true), + array(fopen(__FILE__, 'r'), array(), 'Resource(stream)', false), + array(new \SplFileInfo(__FILE__), array(), 'Object(SplFileInfo)', false), + ); + } + + private function createCollector($queries) + { + $connection = $this->getMockBuilder('Doctrine\DBAL\Connection') + ->disableOriginalConstructor() + ->getMock(); + $connection->expects($this->any()) + ->method('getDatabasePlatform') + ->will($this->returnValue(new MySqlPlatform())); + + $registry = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')->getMock(); + $registry + ->expects($this->any()) + ->method('getConnectionNames') + ->will($this->returnValue(array('default' => 'doctrine.dbal.default_connection'))); + $registry + ->expects($this->any()) + ->method('getManagerNames') + ->will($this->returnValue(array('default' => 'doctrine.orm.default_entity_manager'))); + $registry->expects($this->any()) + ->method('getConnection') + ->will($this->returnValue($connection)); + + $logger = $this->getMockBuilder('Doctrine\DBAL\Logging\DebugStack')->getMock(); + $logger->queries = $queries; + + $collector = new DoctrineDataCollector($registry); + $collector->addLogger('default', $logger); + + return $collector; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DataFixtures/ContainerAwareLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DataFixtures/ContainerAwareLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..422c459b46afa24f105fe9aa87f96cf82a8c1dc7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DataFixtures/ContainerAwareLoaderTest.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\Bridge\Doctrine\Tests\DataFixtures; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader; +use Symfony\Bridge\Doctrine\Tests\Fixtures\ContainerAwareFixture; + +class ContainerAwareLoaderTest extends TestCase +{ + public function testShouldSetContainerOnContainerAwareFixture() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $loader = new ContainerAwareLoader($container); + $fixture = new ContainerAwareFixture(); + + $loader->addFixture($fixture); + + $this->assertSame($container, $fixture->container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..25776f86695af3f0361766f77c2ac700f75752e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php @@ -0,0 +1,198 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection\CompilerPass; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterEventListenersAndSubscribersPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; + +class RegisterEventListenersAndSubscribersPassTest extends TestCase +{ + /** + * @expectedException \InvalidArgumentException + */ + public function testExceptionOnAbstractTaggedSubscriber() + { + $container = $this->createBuilder(); + + $abstractDefinition = new Definition('stdClass'); + $abstractDefinition->setAbstract(true); + $abstractDefinition->addTag('doctrine.event_subscriber'); + + $container->setDefinition('a', $abstractDefinition); + + $this->process($container); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testExceptionOnAbstractTaggedListener() + { + $container = $this->createBuilder(); + + $abstractDefinition = new Definition('stdClass'); + $abstractDefinition->setAbstract(true); + $abstractDefinition->addTag('doctrine.event_listener', array('event' => 'test')); + + $container->setDefinition('a', $abstractDefinition); + + $this->process($container); + } + + public function testProcessEventListenersWithPriorities() + { + $container = $this->createBuilder(); + + $container + ->register('a', 'stdClass') + ->addTag('doctrine.event_listener', array( + 'event' => 'foo', + 'priority' => -5, + )) + ->addTag('doctrine.event_listener', array( + 'event' => 'bar', + )) + ; + $container + ->register('b', 'stdClass') + ->addTag('doctrine.event_listener', array( + 'event' => 'foo', + )) + ; + + $this->process($container); + $this->assertEquals(array('b', 'a'), $this->getServiceOrder($container, 'addEventListener')); + + $calls = $container->getDefinition('doctrine.dbal.default_connection.event_manager')->getMethodCalls(); + $this->assertEquals(array('foo', 'bar'), $calls[1][1][0]); + } + + public function testProcessEventListenersWithMultipleConnections() + { + $container = $this->createBuilder(true); + + $container + ->register('a', 'stdClass') + ->addTag('doctrine.event_listener', array( + 'event' => 'onFlush', + )) + ; + $this->process($container); + + $callsDefault = $container->getDefinition('doctrine.dbal.default_connection.event_manager')->getMethodCalls(); + + $this->assertEquals('addEventListener', $callsDefault[0][0]); + $this->assertEquals(array('onFlush'), $callsDefault[0][1][0]); + + $callsSecond = $container->getDefinition('doctrine.dbal.second_connection.event_manager')->getMethodCalls(); + $this->assertEquals($callsDefault, $callsSecond); + } + + public function testProcessEventSubscribersWithPriorities() + { + $container = $this->createBuilder(); + + $container + ->register('a', 'stdClass') + ->addTag('doctrine.event_subscriber') + ; + $container + ->register('b', 'stdClass') + ->addTag('doctrine.event_subscriber', array( + 'priority' => 5, + )) + ; + $container + ->register('c', 'stdClass') + ->addTag('doctrine.event_subscriber', array( + 'priority' => 10, + )) + ; + $container + ->register('d', 'stdClass') + ->addTag('doctrine.event_subscriber', array( + 'priority' => 10, + )) + ; + $container + ->register('e', 'stdClass') + ->addTag('doctrine.event_subscriber', array( + 'priority' => 10, + )) + ; + + $this->process($container); + $serviceOrder = $this->getServiceOrder($container, 'addEventSubscriber'); + $unordered = array_splice($serviceOrder, 0, 3); + sort($unordered); + $this->assertEquals(array('c', 'd', 'e'), $unordered); + $this->assertEquals(array('b', 'a'), $serviceOrder); + } + + public function testProcessNoTaggedServices() + { + $container = $this->createBuilder(true); + + $this->process($container); + + $this->assertEquals(array(), $container->getDefinition('doctrine.dbal.default_connection.event_manager')->getMethodCalls()); + + $this->assertEquals(array(), $container->getDefinition('doctrine.dbal.second_connection.event_manager')->getMethodCalls()); + } + + private function process(ContainerBuilder $container) + { + $pass = new RegisterEventListenersAndSubscribersPass('doctrine.connections', 'doctrine.dbal.%s_connection.event_manager', 'doctrine'); + $pass->process($container); + } + + private function getServiceOrder(ContainerBuilder $container, $method) + { + $order = array(); + foreach ($container->getDefinition('doctrine.dbal.default_connection.event_manager')->getMethodCalls() as list($name, $arguments)) { + if ($method !== $name) { + continue; + } + + if ('addEventListener' === $name) { + $order[] = (string) $arguments[1]; + continue; + } + + $order[] = (string) $arguments[0]; + } + + return $order; + } + + private function createBuilder($multipleConnections = false) + { + $container = new ContainerBuilder(); + + $connections = array('default' => 'doctrine.dbal.default_connection'); + + $container->register('doctrine.dbal.default_connection.event_manager', 'stdClass'); + $container->register('doctrine.dbal.default_connection', 'stdClass'); + + if ($multipleConnections) { + $container->register('doctrine.dbal.second_connection.event_manager', 'stdClass'); + $container->register('doctrine.dbal.second_connection', 'stdClass'); + $connections['second'] = 'doctrine.dbal.second_connection'; + } + + $container->setParameter('doctrine.connections', $connections); + + return $container; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterMappingsPassTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterMappingsPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ed76f8db68dfd8fc7bae4f54817d85ddebb6114d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterMappingsPassTest.php @@ -0,0 +1,48 @@ +createBuilder(array( + )); + $this->process($container, array( + 'manager.param.one', + 'manager.param.two', + )); + } + + private function process(ContainerBuilder $container, array $managerParamNames) + { + $pass = new ConcreteMappingsPass( + new Definition('\stdClass'), + array(), + $managerParamNames, + 'some.%s.metadata_driver' + ); + + $pass->process($container); + } + + private function createBuilder() + { + $container = new ContainerBuilder(); + + return $container; + } +} + +class ConcreteMappingsPass extends RegisterMappingsPass +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..135f53f493fc1768983886d7cdc722b369847331 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php @@ -0,0 +1,286 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; + +/** + * @author Fabio B. Silva + */ +class DoctrineExtensionTest extends TestCase +{ + /** + * @var \Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension + */ + private $extension; + + protected function setUp() + { + parent::setUp(); + + $this->extension = $this + ->getMockBuilder('Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension') + ->setMethods(array( + 'getMappingResourceConfigDirectory', + 'getObjectManagerElementName', + 'getMappingObjectDefaultName', + 'getMappingResourceExtension', + 'load', + )) + ->getMock() + ; + + $this->extension->expects($this->any()) + ->method('getObjectManagerElementName') + ->will($this->returnCallback(function ($name) { + return 'doctrine.orm.'.$name; + })); + } + + /** + * @expectedException \LogicException + */ + public function testFixManagersAutoMappingsWithTwoAutomappings() + { + $emConfigs = array( + 'em1' => array( + 'auto_mapping' => true, + ), + 'em2' => array( + 'auto_mapping' => true, + ), + ); + + $bundles = array( + 'FristBundle' => 'My\FristBundle', + 'SecondBundle' => 'My\SecondBundle', + ); + + $reflection = new \ReflectionClass(get_class($this->extension)); + $method = $reflection->getMethod('fixManagersAutoMappings'); + $method->setAccessible(true); + + $method->invoke($this->extension, $emConfigs, $bundles); + } + + public function getAutomappingData() + { + return array( + array( + array( // no auto mapping on em1 + 'auto_mapping' => false, + ), + array( // no auto mapping on em2 + 'auto_mapping' => false, + ), + array(), + array(), + ), + array( + array( // no auto mapping on em1 + 'auto_mapping' => false, + ), + array( // auto mapping enabled on em2 + 'auto_mapping' => true, + ), + array(), + array( + 'mappings' => array( + 'FristBundle' => array( + 'mapping' => true, + 'is_bundle' => true, + ), + 'SecondBundle' => array( + 'mapping' => true, + 'is_bundle' => true, + ), + ), + ), + ), + array( + array( // no auto mapping on em1, but it defines SecondBundle as own + 'auto_mapping' => false, + 'mappings' => array( + 'SecondBundle' => array( + 'mapping' => true, + 'is_bundle' => true, + ), + ), + ), + array( // auto mapping enabled on em2 + 'auto_mapping' => true, + ), + array( + 'mappings' => array( + 'SecondBundle' => array( + 'mapping' => true, + 'is_bundle' => true, + ), + ), + ), + array( + 'mappings' => array( + 'FristBundle' => array( + 'mapping' => true, + 'is_bundle' => true, + ), + ), + ), + ), + ); + } + + /** + * @dataProvider getAutomappingData + */ + public function testFixManagersAutoMappings(array $originalEm1, array $originalEm2, array $expectedEm1, array $expectedEm2) + { + $emConfigs = array( + 'em1' => $originalEm1, + 'em2' => $originalEm2, + ); + + $bundles = array( + 'FristBundle' => 'My\FristBundle', + 'SecondBundle' => 'My\SecondBundle', + ); + + $reflection = new \ReflectionClass(get_class($this->extension)); + $method = $reflection->getMethod('fixManagersAutoMappings'); + $method->setAccessible(true); + + $newEmConfigs = $method->invoke($this->extension, $emConfigs, $bundles); + + $this->assertEquals($newEmConfigs['em1'], array_merge(array( + 'auto_mapping' => false, + ), $expectedEm1)); + $this->assertEquals($newEmConfigs['em2'], array_merge(array( + 'auto_mapping' => false, + ), $expectedEm2)); + } + + public function providerBasicDrivers() + { + return array( + array('doctrine.orm.cache.apc.class', array('type' => 'apc')), + array('doctrine.orm.cache.apcu.class', array('type' => 'apcu')), + array('doctrine.orm.cache.array.class', array('type' => 'array')), + array('doctrine.orm.cache.xcache.class', array('type' => 'xcache')), + array('doctrine.orm.cache.wincache.class', array('type' => 'wincache')), + array('doctrine.orm.cache.zenddata.class', array('type' => 'zenddata')), + array('doctrine.orm.cache.redis.class', array('type' => 'redis'), array('setRedis')), + array('doctrine.orm.cache.memcache.class', array('type' => 'memcache'), array('setMemcache')), + array('doctrine.orm.cache.memcached.class', array('type' => 'memcached'), array('setMemcached')), + ); + } + + /** + * @param string $class + * @param array $config + * + * @dataProvider providerBasicDrivers + */ + public function testLoadBasicCacheDriver($class, array $config, array $expectedCalls = array()) + { + $container = $this->createContainer(); + $cacheName = 'metadata_cache'; + $objectManager = array( + 'name' => 'default', + 'metadata_cache_driver' => $config, + ); + + $this->invokeLoadCacheDriver($objectManager, $container, $cacheName); + + $this->assertTrue($container->hasDefinition('doctrine.orm.default_metadata_cache')); + + $definition = $container->getDefinition('doctrine.orm.default_metadata_cache'); + $defCalls = $definition->getMethodCalls(); + $expectedCalls[] = 'setNamespace'; + $actualCalls = array_map(function ($call) { + return $call[0]; + }, $defCalls); + + $this->assertFalse($definition->isPublic()); + $this->assertEquals("%$class%", $definition->getClass()); + + foreach (array_unique($expectedCalls) as $call) { + $this->assertContains($call, $actualCalls); + } + } + + public function testServiceCacheDriver() + { + $cacheName = 'metadata_cache'; + $container = $this->createContainer(); + $definition = new Definition('%doctrine.orm.cache.apc.class%'); + $objectManager = array( + 'name' => 'default', + 'metadata_cache_driver' => array( + 'type' => 'service', + 'id' => 'service_driver', + ), + ); + + $container->setDefinition('service_driver', $definition); + + $this->invokeLoadCacheDriver($objectManager, $container, $cacheName); + + $this->assertTrue($container->hasAlias('doctrine.orm.default_metadata_cache')); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage "unrecognized_type" is an unrecognized Doctrine cache driver. + */ + public function testUnrecognizedCacheDriverException() + { + $cacheName = 'metadata_cache'; + $container = $this->createContainer(); + $objectManager = array( + 'name' => 'default', + 'metadata_cache_driver' => array( + 'type' => 'unrecognized_type', + ), + ); + + $this->invokeLoadCacheDriver($objectManager, $container, $cacheName); + } + + protected function invokeLoadCacheDriver(array $objectManager, ContainerBuilder $container, $cacheName) + { + $method = new \ReflectionMethod($this->extension, 'loadObjectManagerCacheDriver'); + + $method->setAccessible(true); + + $method->invokeArgs($this->extension, array($objectManager, $container, $cacheName)); + } + + /** + * @param array $data + * + * @return \Symfony\Component\DependencyInjection\ContainerBuilder + */ + protected function createContainer(array $data = array()) + { + return new ContainerBuilder(new ParameterBag(array_merge(array( + 'kernel.bundles' => array('FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle'), + 'kernel.cache_dir' => __DIR__, + 'kernel.debug' => false, + 'kernel.environment' => 'test', + 'kernel.name' => 'kernel', + 'kernel.root_dir' => __DIR__, + ), $data))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/ExpressionLanguage/DoctrineParserCacheTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/ExpressionLanguage/DoctrineParserCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..394b1b0dfe9a297ab80fe6dd2d5f3597137d9dc7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/ExpressionLanguage/DoctrineParserCacheTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\ExpressionLanguage; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\ExpressionLanguage\DoctrineParserCache; + +/** + * @group legacy + */ +class DoctrineParserCacheTest extends TestCase +{ + public function testFetch() + { + $doctrineCacheMock = $this->getMockBuilder('Doctrine\Common\Cache\Cache')->getMock(); + $parserCache = new DoctrineParserCache($doctrineCacheMock); + + $doctrineCacheMock->expects($this->once()) + ->method('fetch') + ->will($this->returnValue('bar')); + + $result = $parserCache->fetch('foo'); + + $this->assertEquals('bar', $result); + } + + public function testFetchUnexisting() + { + $doctrineCacheMock = $this->getMockBuilder('Doctrine\Common\Cache\Cache')->getMock(); + $parserCache = new DoctrineParserCache($doctrineCacheMock); + + $doctrineCacheMock + ->expects($this->once()) + ->method('fetch') + ->will($this->returnValue(false)); + + $this->assertNull($parserCache->fetch('')); + } + + public function testSave() + { + $doctrineCacheMock = $this->getMockBuilder('Doctrine\Common\Cache\Cache')->getMock(); + $parserCache = new DoctrineParserCache($doctrineCacheMock); + + $expression = $this->getMockBuilder('Symfony\Component\ExpressionLanguage\ParsedExpression') + ->disableOriginalConstructor() + ->getMock(); + + $doctrineCacheMock->expects($this->once()) + ->method('save') + ->with('foo', $expression); + + $parserCache->save('foo', $expression); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..c6d689a96a68c78ba15a09fcb756eaa31d041f2e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity.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\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping as ORM; + +/** + * @ORM\Entity + */ +class AssociationEntity +{ + /** + * @var int + * @ORM\Id @ORM\GeneratedValue + * @ORM\Column(type="integer") + */ + private $id; + + /** + * @ORM\ManyToOne(targetEntity="SingleIntIdEntity") + * + * @var \Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity + */ + public $single; + + /** + * @ORM\ManyToOne(targetEntity="CompositeIntIdEntity") + * @ORM\JoinColumns({ + * @ORM\JoinColumn(name="composite_id1", referencedColumnName="id1"), + * @ORM\JoinColumn(name="composite_id2", referencedColumnName="id2") + * }) + * + * @var \Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity + */ + public $composite; +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity2.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity2.php new file mode 100644 index 0000000000000000000000000000000000000000..a0a76124583a07f3ca140551edfe13cf489ce008 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity2.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\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping as ORM; + +/** + * @ORM\Entity + */ +class AssociationEntity2 +{ + /** + * @var int + * @ORM\Id @ORM\GeneratedValue + * @ORM\Column(type="integer") + */ + private $id; + + /** + * @ORM\ManyToOne(targetEntity="SingleIntIdNoToStringEntity") + * + * @var \Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity + */ + public $single; + + /** + * @ORM\ManyToOne(targetEntity="CompositeIntIdEntity") + * @ORM\JoinColumns({ + * @ORM\JoinColumn(name="composite_id1", referencedColumnName="id1"), + * @ORM\JoinColumn(name="composite_id2", referencedColumnName="id2") + * }) + * + * @var \Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity + */ + public $composite; +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeIntIdEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeIntIdEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..740a4f55f49cd3f21df5975c7481dac23d91454e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeIntIdEntity.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; + +/** @Entity */ +class CompositeIntIdEntity +{ + /** @Id @Column(type="integer") */ + protected $id1; + + /** @Id @Column(type="integer") */ + protected $id2; + + /** @Column(type="string") */ + public $name; + + public function __construct($id1, $id2, $name) + { + $this->id1 = $id1; + $this->id2 = $id2; + $this->name = $name; + } + + public function __toString() + { + return $this->name; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..ac97367094bd56905bfdce923f380cf0334f5bbf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php @@ -0,0 +1,53 @@ +objectOne = $objectOne; + $this->objectTwo = $objectTwo; + } + + /** + * @return SingleIntIdNoToStringEntity + */ + public function getObjectOne() + { + return $this->objectOne; + } + + /** + * @return SingleIntIdNoToStringEntity + */ + public function getObjectTwo() + { + return $this->objectTwo; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeStringIdEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeStringIdEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..10e083a8f429865e2a4c9dfb4a8fd35e07338049 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeStringIdEntity.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; + +/** @Entity */ +class CompositeStringIdEntity +{ + /** @Id @Column(type="string") */ + protected $id1; + + /** @Id @Column(type="string") */ + protected $id2; + + /** @Column(type="string") */ + public $name; + + public function __construct($id1, $id2, $name) + { + $this->id1 = $id1; + $this->id2 = $id2; + $this->name = $name; + } + + public function __toString() + { + return $this->name; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/ContainerAwareFixture.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/ContainerAwareFixture.php new file mode 100644 index 0000000000000000000000000000000000000000..5141e1669c9f32ea66d6f3cf3d1345af93ad087a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/ContainerAwareFixture.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\Common\DataFixtures\FixtureInterface; +use Doctrine\Common\Persistence\ObjectManager; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; + +class ContainerAwareFixture implements FixtureInterface, ContainerAwareInterface +{ + public $container; + + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } + + public function load(ObjectManager $manager) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNameEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNameEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..cfb8e8b6664fff7892ff8540407ca696718bd133 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNameEntity.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\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; + +/** @Entity */ +class DoubleNameEntity +{ + /** @Id @Column(type="integer") */ + protected $id; + + /** @Column(type="string") */ + public $name; + + /** @Column(type="string", nullable=true) */ + public $name2; + + public function __construct($id, $name, $name2) + { + $this->id = $id; + $this->name = $name; + $this->name2 = $name2; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNullableNameEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNullableNameEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..29b247b9b1c368385a7c2b778f16ce9c6f08bb38 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNullableNameEntity.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\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; + +/** @Entity */ +class DoubleNullableNameEntity +{ + /** @Id @Column(type="integer") */ + protected $id; + + /** @Column(type="string", nullable=true) */ + public $name; + + /** @Column(type="string", nullable=true) */ + public $name2; + + public function __construct($id, $name, $name2) + { + $this->id = $id; + $this->name = $name; + $this->name2 = $name2; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Embeddable/Identifier.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Embeddable/Identifier.php new file mode 100644 index 0000000000000000000000000000000000000000..f8000dbfd9814e15aa492ee4f9fdfcbb8af4c445 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Embeddable/Identifier.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures\Embeddable; + +use Doctrine\ORM\Mapping as ORM; + +/** + * @ORM\Embeddable + */ +class Identifier +{ + /** + * @var int + * + * @ORM\Id + * @ORM\Column(type="integer") + */ + protected $value; +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/EmbeddedIdentifierEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/EmbeddedIdentifierEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..6d7b2670962c7cd669a7099966c8a100ab740f87 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/EmbeddedIdentifierEntity.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\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping as ORM; + +/** + * @ORM\Entity + */ +class EmbeddedIdentifierEntity +{ + /** + * @var Embeddable\Identifier + * + * @ORM\Embedded(class="Symfony\Bridge\Doctrine\Tests\Fixtures\Embeddable\Identifier") + */ + protected $id; +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Employee.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Employee.php new file mode 100644 index 0000000000000000000000000000000000000000..24f08b00d781af67e41fd051170eb215a7b93320 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Employee.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Entity; + +/** @Entity */ +class Employee extends Person +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GroupableEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GroupableEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..2e36204bdfdaddde8a208cb8e43a371b5f70c744 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GroupableEntity.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\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; + +/** @Entity */ +class GroupableEntity +{ + /** @Id @Column(type="integer") */ + protected $id; + + /** @Column(type="string", nullable=true) */ + public $name; + + /** @Column(type="string", nullable=true) */ + public $groupName; + + public function __construct($id, $name, $groupName) + { + $this->id = $id; + $this->name = $name; + $this->groupName = $groupName; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Person.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Person.php new file mode 100644 index 0000000000000000000000000000000000000000..19a5d8b9569f347bb24c88a858ba690700a12032 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Person.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\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\DiscriminatorColumn; +use Doctrine\ORM\Mapping\DiscriminatorMap; +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; +use Doctrine\ORM\Mapping\InheritanceType; + +/** + * @Entity + * @InheritanceType("SINGLE_TABLE") + * @DiscriminatorColumn(name="discr", type="string") + * @DiscriminatorMap({"person" = "Person", "employee" = "Employee"}) + */ +class Person +{ + /** @Id @Column(type="integer") */ + protected $id; + + /** @Column(type="string") */ + public $name; + + public function __construct($id, $name) + { + $this->id = $id; + $this->name = $name; + } + + public function __toString() + { + return (string) $this->name; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleAssociationToIntIdEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleAssociationToIntIdEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..954de338d3ca35ab441de46002bd11092917d4c9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleAssociationToIntIdEntity.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; +use Doctrine\ORM\Mapping\OneToOne; + +/** @Entity */ +class SingleAssociationToIntIdEntity +{ + /** @Id @OneToOne(targetEntity="SingleIntIdNoToStringEntity", cascade={"ALL"}) */ + protected $entity; + + /** @Column(type="string", nullable=true) */ + public $name; + + public function __construct(SingleIntIdNoToStringEntity $entity, $name) + { + $this->entity = $entity; + $this->name = $name; + } + + public function __toString() + { + return (string) $this->name; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..6ee360e6a10aaef0d36c6cd8d6d3b7c5bf5b2903 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdEntity.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; + +/** @Entity */ +class SingleIntIdEntity +{ + /** @Id @Column(type="integer") */ + protected $id; + + /** @Column(type="string", nullable=true) */ + public $name; + + /** @Column(type="array", nullable=true) */ + public $phoneNumbers = array(); + + public function __construct($id, $name) + { + $this->id = $id; + $this->name = $name; + } + + public function __toString() + { + return (string) $this->name; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdNoToStringEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdNoToStringEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..bcbe7a5f7bdebb0635e8590d3560d8b744d30159 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdNoToStringEntity.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\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; + +/** @Entity */ +class SingleIntIdNoToStringEntity +{ + /** @Id @Column(type="integer") */ + protected $id; + + /** @Column(type="string", nullable=true) */ + public $name; + + public function __construct($id, $name) + { + $this->id = $id; + $this->name = $name; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..d69d3de4b6f349e74121a121009daf2be8106978 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\Type\StringWrapper; + +/** @Entity */ +class SingleIntIdStringWrapperNameEntity +{ + /** @Id @Column(type="integer") */ + protected $id; + + /** @Column(type="string_wrapper", nullable=true) */ + public $name; + + public function __construct($id, $name) + { + $this->id = $id; + $this->name = $name; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringCastableIdEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringCastableIdEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..e457f69dd091bcdbffd3cad68a5c24dc5b51e71f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringCastableIdEntity.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; +use Doctrine\ORM\Mapping\GeneratedValue; +use Doctrine\ORM\Mapping\Id; + +/** @Entity */ +class SingleStringCastableIdEntity +{ + /** + * @Id + * @Column(type="string") + * @GeneratedValue(strategy="NONE") + */ + protected $id; + + /** @Column(type="string", nullable=true) */ + public $name; + + public function __construct($id, $name) + { + $this->id = new StringCastableObjectIdentity($id); + $this->name = $name; + } + + public function __toString() + { + return (string) $this->name; + } +} + +class StringCastableObjectIdentity +{ + protected $id; + + public function __construct($id) + { + $this->id = $id; + } + + public function __toString() + { + return (string) $this->id; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringIdEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringIdEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..258c5a65158e7376de6b4e72890188fcbbe44b62 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringIdEntity.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; + +/** @Entity */ +class SingleStringIdEntity +{ + /** @Id @Column(type="string") */ + protected $id; + + /** @Column(type="string") */ + public $name; + + public function __construct($id, $name) + { + $this->id = $id; + $this->name = $name; + } + + public function __toString() + { + return $this->name; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Type/StringWrapper.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Type/StringWrapper.php new file mode 100644 index 0000000000000000000000000000000000000000..13bb3703d78d8aa3f7b8a81a3f645a02bd289b80 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Type/StringWrapper.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\Bridge\Doctrine\Tests\Fixtures\Type; + +class StringWrapper +{ + /** + * @var string + */ + private $string; + + /** + * @param string $string + */ + public function __construct($string = null) + { + $this->string = $string; + } + + /** + * @return string + */ + public function getString() + { + return $this->string; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Type/StringWrapperType.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Type/StringWrapperType.php new file mode 100644 index 0000000000000000000000000000000000000000..0af4271ba73fa199d9895d144752bc407351da74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Type/StringWrapperType.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures\Type; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Types\StringType; + +class StringWrapperType extends StringType +{ + /** + * {@inheritdoc} + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + return $value instanceof StringWrapper ? $value->getString() : null; + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + return new StringWrapper($value); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'string_wrapper'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/User.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/User.php new file mode 100644 index 0000000000000000000000000000000000000000..e59e32c27e82c483fda59e4d9f6fff4a1483fb74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Fixtures/User.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; +use Symfony\Component\Security\Core\User\UserInterface; + +/** @Entity */ +class User implements UserInterface +{ + /** @Id @Column(type="integer") */ + protected $id1; + + /** @Id @Column(type="integer") */ + protected $id2; + + /** @Column(type="string") */ + public $name; + + public function __construct($id1, $id2, $name) + { + $this->id1 = $id1; + $this->id2 = $id2; + $this->name = $name; + } + + public function getRoles() + { + } + + public function getPassword() + { + } + + public function getSalt() + { + } + + public function getUsername() + { + return $this->name; + } + + public function eraseCredentials() + { + } + + public function equals(UserInterface $user) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dfe2b00cdfd564d48481954a0c2cbf56b6f1a9b6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php @@ -0,0 +1,421 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Form\ChoiceList; + +use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Common\Persistence\ObjectRepository; +use Doctrine\ORM\Mapping\ClassMetadata; +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader; +use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityLoaderInterface; +use Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader; +use Symfony\Component\Form\ChoiceList\ArrayChoiceList; + +/** + * @author Bernhard Schussek + */ +class DoctrineChoiceLoaderTest extends TestCase +{ + /** + * @var ObjectManager|\PHPUnit_Framework_MockObject_MockObject + */ + private $om; + + /** + * @var ObjectRepository|\PHPUnit_Framework_MockObject_MockObject + */ + private $repository; + + /** + * @var string + */ + private $class; + + /** + * @var IdReader|\PHPUnit_Framework_MockObject_MockObject + */ + private $idReader; + + /** + * @var EntityLoaderInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $objectLoader; + + /** + * @var \stdClass + */ + private $obj1; + + /** + * @var \stdClass + */ + private $obj2; + + /** + * @var \stdClass + */ + private $obj3; + + protected function setUp() + { + $this->factory = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface')->getMock(); + $this->om = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager')->getMock(); + $this->repository = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectRepository')->getMock(); + $this->class = 'stdClass'; + $this->idReader = $this->getMockBuilder('Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader') + ->disableOriginalConstructor() + ->getMock(); + $this->objectLoader = $this->getMockBuilder('Symfony\Bridge\Doctrine\Form\ChoiceList\EntityLoaderInterface')->getMock(); + $this->obj1 = (object) array('name' => 'A'); + $this->obj2 = (object) array('name' => 'B'); + $this->obj3 = (object) array('name' => 'C'); + + $this->om->expects($this->any()) + ->method('getRepository') + ->with($this->class) + ->willReturn($this->repository); + + $this->om->expects($this->any()) + ->method('getClassMetadata') + ->with($this->class) + ->willReturn(new ClassMetadata($this->class)); + } + + public function testLoadChoiceList() + { + $loader = new DoctrineChoiceLoader( + $this->om, + $this->class, + $this->idReader + ); + + $choices = array($this->obj1, $this->obj2, $this->obj3); + $value = function () {}; + $choiceList = new ArrayChoiceList($choices, $value); + + $this->repository->expects($this->once()) + ->method('findAll') + ->willReturn($choices); + + $this->assertEquals($choiceList, $loader->loadChoiceList($value)); + + // no further loads on subsequent calls + + $this->assertEquals($choiceList, $loader->loadChoiceList($value)); + } + + /** + * @group legacy + */ + public function testLegacyLoadChoiceList() + { + $factory = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface')->getMock(); + $loader = new DoctrineChoiceLoader( + $factory, + $this->om, + $this->class, + $this->idReader + ); + + $choices = array($this->obj1, $this->obj2, $this->obj3); + $value = function () {}; + $choiceList = new ArrayChoiceList($choices, $value); + + $this->repository->expects($this->once()) + ->method('findAll') + ->willReturn($choices); + + $factory->expects($this->never()) + ->method('createListFromChoices'); + + $this->assertEquals($choiceList, $loaded = $loader->loadChoiceList($value)); + + // no further loads on subsequent calls + + $this->assertSame($loaded, $loader->loadChoiceList($value)); + } + + public function testLoadChoiceListUsesObjectLoaderIfAvailable() + { + $loader = new DoctrineChoiceLoader( + $this->om, + $this->class, + $this->idReader, + $this->objectLoader + ); + + $choices = array($this->obj1, $this->obj2, $this->obj3); + $choiceList = new ArrayChoiceList($choices); + + $this->repository->expects($this->never()) + ->method('findAll'); + + $this->objectLoader->expects($this->once()) + ->method('getEntities') + ->willReturn($choices); + + $this->assertEquals($choiceList, $loaded = $loader->loadChoiceList()); + + // no further loads on subsequent calls + + $this->assertSame($loaded, $loader->loadChoiceList()); + } + + public function testLoadValuesForChoices() + { + $loader = new DoctrineChoiceLoader( + $this->om, + $this->class, + $this->idReader + ); + + $choices = array($this->obj1, $this->obj2, $this->obj3); + + $this->repository->expects($this->once()) + ->method('findAll') + ->willReturn($choices); + + $this->assertSame(array('1', '2'), $loader->loadValuesForChoices(array($this->obj2, $this->obj3))); + + // no further loads on subsequent calls + + $this->assertSame(array('1', '2'), $loader->loadValuesForChoices(array($this->obj2, $this->obj3))); + } + + public function testLoadValuesForChoicesDoesNotLoadIfEmptyChoices() + { + $loader = new DoctrineChoiceLoader( + $this->om, + $this->class, + $this->idReader + ); + + $this->repository->expects($this->never()) + ->method('findAll'); + + $this->assertSame(array(), $loader->loadValuesForChoices(array())); + } + + public function testLoadValuesForChoicesDoesNotLoadIfSingleIntId() + { + $loader = new DoctrineChoiceLoader( + $this->om, + $this->class, + $this->idReader + ); + + $this->idReader->expects($this->any()) + ->method('isSingleId') + ->willReturn(true); + + $this->repository->expects($this->never()) + ->method('findAll'); + + $this->idReader->expects($this->any()) + ->method('getIdValue') + ->with($this->obj2) + ->willReturn('2'); + + $this->assertSame(array('2'), $loader->loadValuesForChoices(array($this->obj2))); + } + + public function testLoadValuesForChoicesLoadsIfSingleIntIdAndValueGiven() + { + $loader = new DoctrineChoiceLoader( + $this->om, + $this->class, + $this->idReader + ); + + $choices = array($this->obj1, $this->obj2, $this->obj3); + $value = function (\stdClass $object) { return $object->name; }; + + $this->idReader->expects($this->any()) + ->method('isSingleId') + ->willReturn(true); + + $this->repository->expects($this->once()) + ->method('findAll') + ->willReturn($choices); + + $this->assertSame(array('B'), $loader->loadValuesForChoices( + array($this->obj2), + $value + )); + } + + public function testLoadValuesForChoicesDoesNotLoadIfValueIsIdReader() + { + $loader = new DoctrineChoiceLoader( + $this->om, + $this->class, + $this->idReader + ); + + $value = array($this->idReader, 'getIdValue'); + + $this->idReader->expects($this->any()) + ->method('isSingleId') + ->willReturn(true); + + $this->repository->expects($this->never()) + ->method('findAll'); + + $this->idReader->expects($this->any()) + ->method('getIdValue') + ->with($this->obj2) + ->willReturn('2'); + + $this->assertSame(array('2'), $loader->loadValuesForChoices( + array($this->obj2), + $value + )); + } + + public function testLoadChoicesForValues() + { + $loader = new DoctrineChoiceLoader( + $this->om, + $this->class, + $this->idReader + ); + + $choices = array($this->obj1, $this->obj2, $this->obj3); + + $this->repository->expects($this->once()) + ->method('findAll') + ->willReturn($choices); + + $this->assertSame(array($this->obj2, $this->obj3), $loader->loadChoicesForValues(array('1', '2'))); + + // no further loads on subsequent calls + + $this->assertSame(array($this->obj2, $this->obj3), $loader->loadChoicesForValues(array('1', '2'))); + } + + public function testLoadChoicesForValuesDoesNotLoadIfEmptyValues() + { + $loader = new DoctrineChoiceLoader( + $this->om, + $this->class, + $this->idReader + ); + + $this->repository->expects($this->never()) + ->method('findAll'); + + $this->assertSame(array(), $loader->loadChoicesForValues(array())); + } + + public function testLoadChoicesForValuesLoadsOnlyChoicesIfSingleIntId() + { + $loader = new DoctrineChoiceLoader( + $this->om, + $this->class, + $this->idReader, + $this->objectLoader + ); + + $choices = array($this->obj2, $this->obj3); + + $this->idReader->expects($this->any()) + ->method('isSingleId') + ->willReturn(true); + + $this->idReader->expects($this->any()) + ->method('getIdField') + ->willReturn('idField'); + + $this->repository->expects($this->never()) + ->method('findAll'); + + $this->objectLoader->expects($this->once()) + ->method('getEntitiesByIds') + ->with('idField', array(4 => '3', 7 => '2')) + ->willReturn($choices); + + $this->idReader->expects($this->any()) + ->method('getIdValue') + ->willReturnMap(array( + array($this->obj2, '2'), + array($this->obj3, '3'), + )); + + $this->assertSame( + array(4 => $this->obj3, 7 => $this->obj2), + $loader->loadChoicesForValues(array(4 => '3', 7 => '2') + )); + } + + public function testLoadChoicesForValuesLoadsAllIfSingleIntIdAndValueGiven() + { + $loader = new DoctrineChoiceLoader( + $this->om, + $this->class, + $this->idReader + ); + + $choices = array($this->obj1, $this->obj2, $this->obj3); + $value = function (\stdClass $object) { return $object->name; }; + + $this->idReader->expects($this->any()) + ->method('isSingleId') + ->willReturn(true); + + $this->repository->expects($this->once()) + ->method('findAll') + ->willReturn($choices); + + $this->assertSame(array($this->obj2), $loader->loadChoicesForValues( + array('B'), + $value + )); + } + + public function testLoadChoicesForValuesLoadsOnlyChoicesIfValueIsIdReader() + { + $loader = new DoctrineChoiceLoader( + $this->om, + $this->class, + $this->idReader, + $this->objectLoader + ); + + $choices = array($this->obj2, $this->obj3); + $value = array($this->idReader, 'getIdValue'); + + $this->idReader->expects($this->any()) + ->method('isSingleId') + ->willReturn(true); + + $this->idReader->expects($this->any()) + ->method('getIdField') + ->willReturn('idField'); + + $this->repository->expects($this->never()) + ->method('findAll'); + + $this->objectLoader->expects($this->once()) + ->method('getEntitiesByIds') + ->with('idField', array('2')) + ->willReturn($choices); + + $this->idReader->expects($this->any()) + ->method('getIdValue') + ->willReturnMap(array( + array($this->obj2, '2'), + array($this->obj3, '3'), + )); + + $this->assertSame(array($this->obj2), $loader->loadChoicesForValues(array('2'), $value)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..29486af84a541d5a701020af28f4849645f61ffb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Form\ChoiceList; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\Form\ChoiceList\ORMQueryBuilderLoader; +use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; +use Doctrine\DBAL\Connection; +use Doctrine\ORM\Version; + +class ORMQueryBuilderLoaderTest extends TestCase +{ + public function testIdentifierTypeIsStringArray() + { + $this->checkIdentifierType('Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringIdEntity', Connection::PARAM_STR_ARRAY); + } + + public function testIdentifierTypeIsIntegerArray() + { + $this->checkIdentifierType('Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity', Connection::PARAM_INT_ARRAY); + } + + protected function checkIdentifierType($classname, $expectedType) + { + $em = DoctrineTestHelper::createTestEntityManager(); + + $query = $this->getMockBuilder('QueryMock') + ->setMethods(array('setParameter', 'getResult', 'getSql', '_doExecute')) + ->getMock(); + + $query->expects($this->once()) + ->method('setParameter') + ->with('ORMQueryBuilderLoader_getEntitiesByIds_id', array(1, 2), $expectedType) + ->willReturn($query); + + $qb = $this->getMockBuilder('Doctrine\ORM\QueryBuilder') + ->setConstructorArgs(array($em)) + ->setMethods(array('getQuery')) + ->getMock(); + + $qb->expects($this->once()) + ->method('getQuery') + ->willReturn($query); + + $qb->select('e') + ->from($classname, 'e'); + + $loader = new ORMQueryBuilderLoader($qb); + $loader->getEntitiesByIds('id', array(1, 2)); + } + + public function testFilterNonIntegerValues() + { + $em = DoctrineTestHelper::createTestEntityManager(); + + $query = $this->getMockBuilder('QueryMock') + ->setMethods(array('setParameter', 'getResult', 'getSql', '_doExecute')) + ->getMock(); + + $query->expects($this->once()) + ->method('setParameter') + ->with('ORMQueryBuilderLoader_getEntitiesByIds_id', array(1, 2, 3, '9223372036854775808'), Connection::PARAM_INT_ARRAY) + ->willReturn($query); + + $qb = $this->getMockBuilder('Doctrine\ORM\QueryBuilder') + ->setConstructorArgs(array($em)) + ->setMethods(array('getQuery')) + ->getMock(); + + $qb->expects($this->once()) + ->method('getQuery') + ->willReturn($query); + + $qb->select('e') + ->from('Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity', 'e'); + + $loader = new ORMQueryBuilderLoader($qb); + $loader->getEntitiesByIds('id', array(1, '', 2, 3, 'foo', '9223372036854775808')); + } + + public function testEmbeddedIdentifierName() + { + if (Version::compare('2.5.0') > 0) { + $this->markTestSkipped('Applicable only for Doctrine >= 2.5.0'); + + return; + } + + $em = DoctrineTestHelper::createTestEntityManager(); + + $query = $this->getMockBuilder('QueryMock') + ->setMethods(array('setParameter', 'getResult', 'getSql', '_doExecute')) + ->getMock(); + + $query->expects($this->once()) + ->method('setParameter') + ->with('ORMQueryBuilderLoader_getEntitiesByIds_id_value', array(1, 2, 3), Connection::PARAM_INT_ARRAY) + ->willReturn($query); + + $qb = $this->getMockBuilder('Doctrine\ORM\QueryBuilder') + ->setConstructorArgs(array($em)) + ->setMethods(array('getQuery')) + ->getMock(); + $qb->expects($this->once()) + ->method('getQuery') + ->willReturn($query); + + $qb->select('e') + ->from('Symfony\Bridge\Doctrine\Tests\Fixtures\EmbeddedIdentifierEntity', 'e'); + + $loader = new ORMQueryBuilderLoader($qb); + $loader->getEntitiesByIds('id.value', array(1, '', 2, 3, 'foo')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fa3ff911ad35565bde630f6d7fc307c245922462 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.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\Bridge\Doctrine\Tests\Form\DataTransformer; + +use Doctrine\Common\Collections\ArrayCollection; +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; + +/** + * @author Bernhard Schussek + */ +class CollectionToArrayTransformerTest extends TestCase +{ + /** + * @var CollectionToArrayTransformer + */ + private $transformer; + + protected function setUp() + { + $this->transformer = new CollectionToArrayTransformer(); + } + + public function testTransform() + { + $array = array( + 2 => 'foo', + 3 => 'bar', + ); + + $this->assertSame($array, $this->transformer->transform(new ArrayCollection($array))); + } + + /** + * This test is needed for cases when getXxxs() in the entity returns the + * result of $collection->toArray(), in order to prevent modifications of + * the inner collection. + * + * See https://github.com/symfony/symfony/pull/9308 + */ + public function testTransformArray() + { + $array = array( + 2 => 'foo', + 3 => 'bar', + ); + + $this->assertSame($array, $this->transformer->transform($array)); + } + + public function testTransformNull() + { + $this->assertSame(array(), $this->transformer->transform(null)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testTransformExpectsArrayOrCollection() + { + $this->transformer->transform('Foo'); + } + + public function testReverseTransform() + { + $array = array( + 2 => 'foo', + 3 => 'bar', + ); + + $this->assertEquals(new ArrayCollection($array), $this->transformer->reverseTransform($array)); + } + + public function testReverseTransformEmpty() + { + $this->assertEquals(new ArrayCollection(), $this->transformer->reverseTransform('')); + } + + public function testReverseTransformNull() + { + $this->assertEquals(new ArrayCollection(), $this->transformer->reverseTransform(null)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..12296729e2d87f7bb1f9d709e19c85baf2c4938a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Form; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\Form\DoctrineOrmTypeGuesser; +use Symfony\Component\Form\Guess\Guess; +use Symfony\Component\Form\Guess\ValueGuess; + +class DoctrineOrmTypeGuesserTest extends TestCase +{ + /** + * @dataProvider requiredProvider + */ + public function testRequiredGuesser($classMetadata, $expected) + { + $this->assertEquals($expected, $this->getGuesser($classMetadata)->guessRequired('TestEntity', 'field')); + } + + public function requiredProvider() + { + $return = array(); + + // Simple field, not nullable + $classMetadata = $this->getMockBuilder('Doctrine\ORM\Mapping\ClassMetadata')->disableOriginalConstructor()->getMock(); + $classMetadata->expects($this->once())->method('hasField')->with('field')->will($this->returnValue(true)); + $classMetadata->expects($this->once())->method('isNullable')->with('field')->will($this->returnValue(false)); + + $return[] = array($classMetadata, new ValueGuess(true, Guess::HIGH_CONFIDENCE)); + + // Simple field, nullable + $classMetadata = $this->getMockBuilder('Doctrine\ORM\Mapping\ClassMetadata')->disableOriginalConstructor()->getMock(); + $classMetadata->expects($this->once())->method('hasField')->with('field')->will($this->returnValue(true)); + $classMetadata->expects($this->once())->method('isNullable')->with('field')->will($this->returnValue(true)); + + $return[] = array($classMetadata, new ValueGuess(false, Guess::MEDIUM_CONFIDENCE)); + + // One-to-one, nullable (by default) + $classMetadata = $this->getMockBuilder('Doctrine\ORM\Mapping\ClassMetadata')->disableOriginalConstructor()->getMock(); + $classMetadata->expects($this->once())->method('hasField')->with('field')->will($this->returnValue(false)); + $classMetadata->expects($this->once())->method('isAssociationWithSingleJoinColumn')->with('field')->will($this->returnValue(true)); + + $mapping = array('joinColumns' => array(array())); + $classMetadata->expects($this->once())->method('getAssociationMapping')->with('field')->will($this->returnValue($mapping)); + + $return[] = array($classMetadata, new ValueGuess(false, Guess::HIGH_CONFIDENCE)); + + // One-to-one, nullable (explicit) + $classMetadata = $this->getMockBuilder('Doctrine\ORM\Mapping\ClassMetadata')->disableOriginalConstructor()->getMock(); + $classMetadata->expects($this->once())->method('hasField')->with('field')->will($this->returnValue(false)); + $classMetadata->expects($this->once())->method('isAssociationWithSingleJoinColumn')->with('field')->will($this->returnValue(true)); + + $mapping = array('joinColumns' => array(array('nullable' => true))); + $classMetadata->expects($this->once())->method('getAssociationMapping')->with('field')->will($this->returnValue($mapping)); + + $return[] = array($classMetadata, new ValueGuess(false, Guess::HIGH_CONFIDENCE)); + + // One-to-one, not nullable + $classMetadata = $this->getMockBuilder('Doctrine\ORM\Mapping\ClassMetadata')->disableOriginalConstructor()->getMock(); + $classMetadata->expects($this->once())->method('hasField')->with('field')->will($this->returnValue(false)); + $classMetadata->expects($this->once())->method('isAssociationWithSingleJoinColumn')->with('field')->will($this->returnValue(true)); + + $mapping = array('joinColumns' => array(array('nullable' => false))); + $classMetadata->expects($this->once())->method('getAssociationMapping')->with('field')->will($this->returnValue($mapping)); + + $return[] = array($classMetadata, new ValueGuess(true, Guess::HIGH_CONFIDENCE)); + + // One-to-many, no clue + $classMetadata = $this->getMockBuilder('Doctrine\ORM\Mapping\ClassMetadata')->disableOriginalConstructor()->getMock(); + $classMetadata->expects($this->once())->method('hasField')->with('field')->will($this->returnValue(false)); + $classMetadata->expects($this->once())->method('isAssociationWithSingleJoinColumn')->with('field')->will($this->returnValue(false)); + + $return[] = array($classMetadata, null); + + return $return; + } + + private function getGuesser(ClassMetadata $classMetadata) + { + $em = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager')->getMock(); + $em->expects($this->once())->method('getClassMetaData')->with('TestEntity')->will($this->returnValue($classMetadata)); + + $registry = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')->getMock(); + $registry->expects($this->once())->method('getManagers')->will($this->returnValue(array($em))); + + return new DoctrineOrmTypeGuesser($registry); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/EventListener/MergeDoctrineCollectionListenerTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/EventListener/MergeDoctrineCollectionListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dbcbc0f325e4b1468c89557a0aa17122663af7eb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/EventListener/MergeDoctrineCollectionListenerTest.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\Bridge\Doctrine\Tests\Form\EventListener; + +use Doctrine\Common\Collections\ArrayCollection; +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\Form\EventListener\MergeDoctrineCollectionListener; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormEvent; +use Symfony\Component\Form\FormEvents; + +class MergeDoctrineCollectionListenerTest extends TestCase +{ + /** @var \Doctrine\Common\Collections\ArrayCollection */ + private $collection; + /** @var \Symfony\Component\EventDispatcher\EventDispatcher */ + private $dispatcher; + private $factory; + private $form; + + protected function setUp() + { + $this->collection = new ArrayCollection(array('test')); + $this->dispatcher = new EventDispatcher(); + $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $this->form = $this->getBuilder() + ->getForm(); + } + + protected function tearDown() + { + $this->collection = null; + $this->dispatcher = null; + $this->factory = null; + $this->form = null; + } + + protected function getBuilder($name = 'name') + { + return new FormBuilder($name, null, $this->dispatcher, $this->factory); + } + + protected function getForm($name = 'name') + { + return $this->getBuilder($name) + ->setData($this->collection) + ->addEventSubscriber(new MergeDoctrineCollectionListener()) + ->getForm(); + } + + public function testOnSubmitDoNothing() + { + $submittedData = array('test'); + $event = new FormEvent($this->getForm(), $submittedData); + + $this->dispatcher->dispatch(FormEvents::SUBMIT, $event); + + $this->assertTrue($this->collection->contains('test')); + $this->assertSame(1, $this->collection->count()); + } + + public function testOnSubmitNullClearCollection() + { + $submittedData = array(); + $event = new FormEvent($this->getForm(), $submittedData); + + $this->dispatcher->dispatch(FormEvents::SUBMIT, $event); + + $this->assertTrue($this->collection->isEmpty()); + } + + /** + * @group legacy + */ + public function testLegacyChildClassOnSubmitCallParent() + { + $form = $this->getBuilder('name') + ->setData($this->collection) + ->addEventSubscriber(new TestClassExtendingMergeDoctrineCollectionListener()) + ->getForm(); + $submittedData = array(); + $event = new FormEvent($form, $submittedData); + + $this->dispatcher->dispatch(FormEvents::SUBMIT, $event); + + $this->assertTrue($this->collection->isEmpty()); + $this->assertTrue(TestClassExtendingMergeDoctrineCollectionListener::$onBindCalled); + } +} + +/** + * @group legacy + */ +class TestClassExtendingMergeDoctrineCollectionListener extends MergeDoctrineCollectionListener +{ + public static $onBindCalled = false; + + public function onBind(FormEvent $event) + { + self::$onBindCalled = true; + + parent::onBind($event); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ac96ea21c531264050e52691b1f838caf037f35c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Form\Type; + +use Symfony\Component\Form\Test\FormPerformanceTestCase; +use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity; +use Doctrine\ORM\Tools\SchemaTool; +use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; +use Symfony\Component\Form\Extension\Core\CoreExtension; +use Symfony\Bridge\Doctrine\Form\DoctrineOrmExtension; + +/** + * @author Bernhard Schussek + */ +class EntityTypePerformanceTest extends FormPerformanceTestCase +{ + const ENTITY_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity'; + + /** + * @var \Doctrine\ORM\EntityManager + */ + private $em; + + protected function getExtensions() + { + $manager = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')->getMock(); + + $manager->expects($this->any()) + ->method('getManager') + ->will($this->returnValue($this->em)); + + $manager->expects($this->any()) + ->method('getManagerForClass') + ->will($this->returnValue($this->em)); + + return array( + new CoreExtension(), + new DoctrineOrmExtension($manager), + ); + } + + protected function setUp() + { + $this->em = DoctrineTestHelper::createTestEntityManager(); + + parent::setUp(); + + $schemaTool = new SchemaTool($this->em); + $classes = array( + $this->em->getClassMetadata(self::ENTITY_CLASS), + ); + + try { + $schemaTool->dropSchema($classes); + } catch (\Exception $e) { + } + + try { + $schemaTool->createSchema($classes); + } catch (\Exception $e) { + } + + $ids = range(1, 300); + + foreach ($ids as $id) { + $name = 65 + (int) chr($id % 57); + $this->em->persist(new SingleIntIdEntity($id, $name)); + } + + $this->em->flush(); + } + + /** + * This test case is realistic in collection forms where each + * row contains the same entity field. + * + * @group benchmark + */ + public function testCollapsedEntityField() + { + $this->setMaxRunningTime(1); + + for ($i = 0; $i < 40; ++$i) { + $form = $this->factory->create('Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array( + 'class' => self::ENTITY_CLASS, + )); + + // force loading of the choice list + $form->createView(); + } + } + + /** + * @group benchmark + */ + public function testCollapsedEntityFieldWithChoices() + { + $choices = $this->em->createQuery('SELECT c FROM '.self::ENTITY_CLASS.' c')->getResult(); + $this->setMaxRunningTime(1); + + for ($i = 0; $i < 40; ++$i) { + $form = $this->factory->create('Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array( + 'class' => self::ENTITY_CLASS, + 'choices' => $choices, + )); + + // force loading of the choice list + $form->createView(); + } + } + + /** + * @group benchmark + */ + public function testCollapsedEntityFieldWithPreferredChoices() + { + $choices = $this->em->createQuery('SELECT c FROM '.self::ENTITY_CLASS.' c')->getResult(); + $this->setMaxRunningTime(1); + + for ($i = 0; $i < 40; ++$i) { + $form = $this->factory->create('Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array( + 'class' => self::ENTITY_CLASS, + 'preferred_choices' => $choices, + )); + + // force loading of the choice list + $form->createView(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..065050199951ad75511d111aab3dc0fe915b83ae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -0,0 +1,1458 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Form\Type; + +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\ORM\EntityManager; +use Doctrine\ORM\EntityRepository; +use Doctrine\ORM\Tools\SchemaTool; +use Symfony\Bridge\Doctrine\Form\DoctrineOrmExtension; +use Symfony\Bridge\Doctrine\Form\DoctrineOrmTypeGuesser; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; +use Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeStringIdEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\GroupableEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringCastableIdEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringIdEntity; +use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView; +use Symfony\Component\Form\ChoiceList\View\ChoiceView; +use Symfony\Component\Form\Forms; +use Symfony\Component\Form\Tests\Extension\Core\Type\BaseTypeTest; +use Symfony\Component\Form\Tests\Extension\Core\Type\FormTypeTest; +use Symfony\Component\PropertyAccess\PropertyAccess; +use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleAssociationToIntIdEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity; + +class EntityTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Bridge\Doctrine\Form\Type\EntityType'; + + const ITEM_GROUP_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\GroupableEntity'; + const SINGLE_IDENT_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity'; + const SINGLE_IDENT_NO_TO_STRING_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity'; + const SINGLE_STRING_IDENT_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringIdEntity'; + const SINGLE_ASSOC_IDENT_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleAssociationToIntIdEntity'; + const SINGLE_STRING_CASTABLE_IDENT_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringCastableIdEntity'; + const COMPOSITE_IDENT_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity'; + const COMPOSITE_STRING_IDENT_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeStringIdEntity'; + + /** + * @var EntityManager + */ + private $em; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject|ManagerRegistry + */ + private $emRegistry; + + protected function setUp() + { + $this->em = DoctrineTestHelper::createTestEntityManager(); + $this->emRegistry = $this->createRegistryMock('default', $this->em); + + parent::setUp(); + + $schemaTool = new SchemaTool($this->em); + $classes = array( + $this->em->getClassMetadata(self::ITEM_GROUP_CLASS), + $this->em->getClassMetadata(self::SINGLE_IDENT_CLASS), + $this->em->getClassMetadata(self::SINGLE_IDENT_NO_TO_STRING_CLASS), + $this->em->getClassMetadata(self::SINGLE_STRING_IDENT_CLASS), + $this->em->getClassMetadata(self::SINGLE_ASSOC_IDENT_CLASS), + $this->em->getClassMetadata(self::SINGLE_STRING_CASTABLE_IDENT_CLASS), + $this->em->getClassMetadata(self::COMPOSITE_IDENT_CLASS), + $this->em->getClassMetadata(self::COMPOSITE_STRING_IDENT_CLASS), + ); + + try { + $schemaTool->dropSchema($classes); + } catch (\Exception $e) { + } + + try { + $schemaTool->createSchema($classes); + } catch (\Exception $e) { + } + } + + protected function tearDown() + { + parent::tearDown(); + + $this->em = null; + $this->emRegistry = null; + } + + protected function getExtensions() + { + return array_merge(parent::getExtensions(), array( + new DoctrineOrmExtension($this->emRegistry), + )); + } + + protected function persist(array $entities) + { + foreach ($entities as $entity) { + $this->em->persist($entity); + } + + $this->em->flush(); + // no clear, because entities managed by the choice field must + // be managed! + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\MissingOptionsException + */ + public function testClassOptionIsRequired() + { + $this->factory->createNamed('name', static::TESTED_TYPE); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\RuntimeException + */ + public function testInvalidClassOption() + { + $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'class' => 'foo', + )); + } + + public function testSetDataToUninitializedEntityWithNonRequired() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'required' => false, + 'choice_label' => 'name', + )); + + $this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']); + } + + public function testSetDataToUninitializedEntityWithNonRequiredToString() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + + $view = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'required' => false, + )) + ->createView(); + + $this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $view->vars['choices']); + } + + public function testSetDataToUninitializedEntityWithNonRequiredQueryBuilder() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + $qb = $this->em->createQueryBuilder()->select('e')->from(self::SINGLE_IDENT_CLASS, 'e'); + + $view = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'required' => false, + 'choice_label' => 'name', + 'query_builder' => $qb, + )) + ->createView(); + + $this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $view->vars['choices']); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testConfigureQueryBuilderWithNonQueryBuilderAndNonClosure() + { + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => new \stdClass(), + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException + */ + public function testConfigureQueryBuilderWithClosureReturningNonQueryBuilder() + { + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => function () { + return new \stdClass(); + }, + )); + + $field->submit('2'); + } + + public function testConfigureQueryBuilderWithClosureReturningNullUseDefault() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => function () { + return; + }, + )); + + $this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']); + } + + public function testSetDataSingleNull() + { + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => false, + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + )); + $field->setData(null); + + $this->assertNull($field->getData()); + $this->assertSame('', $field->getViewData()); + } + + public function testSetDataMultipleExpandedNull() + { + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + )); + $field->setData(null); + + $this->assertNull($field->getData()); + $this->assertSame(array(), $field->getViewData()); + } + + public function testSetDataMultipleNonExpandedNull() + { + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + )); + $field->setData(null); + + $this->assertNull($field->getData()); + $this->assertSame(array(), $field->getViewData()); + } + + public function testSubmitSingleNonExpandedSingleIdentifier() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit('2'); + + $this->assertTrue($field->isSynchronized()); + $this->assertSame($entity2, $field->getData()); + $this->assertSame('2', $field->getViewData()); + } + + public function testSubmitSingleNonExpandedSingleAssocIdentifier() + { + $innerEntity1 = new SingleIntIdNoToStringEntity(1, 'InFoo'); + $innerEntity2 = new SingleIntIdNoToStringEntity(2, 'InBar'); + + $entity1 = new SingleAssociationToIntIdEntity($innerEntity1, 'Foo'); + $entity2 = new SingleAssociationToIntIdEntity($innerEntity2, 'Bar'); + + $this->persist(array($innerEntity1, $innerEntity2, $entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'em' => 'default', + 'class' => self::SINGLE_ASSOC_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit('2'); + + $this->assertTrue($field->isSynchronized()); + $this->assertSame($entity2, $field->getData()); + $this->assertSame('2', $field->getViewData()); + } + + public function testSubmitSingleNonExpandedCompositeIdentifier() + { + $entity1 = new CompositeIntIdEntity(10, 20, 'Foo'); + $entity2 = new CompositeIntIdEntity(30, 40, 'Bar'); + + $this->persist(array($entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'em' => 'default', + 'class' => self::COMPOSITE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + // the collection key is used here + $field->submit('1'); + + $this->assertTrue($field->isSynchronized()); + $this->assertSame($entity2, $field->getData()); + $this->assertSame('1', $field->getViewData()); + } + + public function testSubmitMultipleNonExpandedSingleIdentifier() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + $entity3 = new SingleIntIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit(array('1', '3')); + + $expected = new ArrayCollection(array($entity1, $entity3)); + + $this->assertTrue($field->isSynchronized()); + $this->assertEquals($expected, $field->getData()); + $this->assertSame(array('1', '3'), $field->getViewData()); + } + + public function testSubmitMultipleNonExpandedSingleAssocIdentifier() + { + $innerEntity1 = new SingleIntIdNoToStringEntity(1, 'InFoo'); + $innerEntity2 = new SingleIntIdNoToStringEntity(2, 'InBar'); + $innerEntity3 = new SingleIntIdNoToStringEntity(3, 'InBaz'); + + $entity1 = new SingleAssociationToIntIdEntity($innerEntity1, 'Foo'); + $entity2 = new SingleAssociationToIntIdEntity($innerEntity2, 'Bar'); + $entity3 = new SingleAssociationToIntIdEntity($innerEntity3, 'Baz'); + + $this->persist(array($innerEntity1, $innerEntity2, $innerEntity3, $entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'em' => 'default', + 'class' => self::SINGLE_ASSOC_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit(array('1', '3')); + + $expected = new ArrayCollection(array($entity1, $entity3)); + + $this->assertTrue($field->isSynchronized()); + $this->assertEquals($expected, $field->getData()); + $this->assertSame(array('1', '3'), $field->getViewData()); + } + + public function testSubmitMultipleNonExpandedSingleIdentifierForExistingData() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + $entity3 = new SingleIntIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $existing = new ArrayCollection(array(0 => $entity2)); + + $field->setData($existing); + $field->submit(array('1', '3')); + + // entry with index 0 ($entity2) was replaced + $expected = new ArrayCollection(array(0 => $entity1, 1 => $entity3)); + + $this->assertTrue($field->isSynchronized()); + $this->assertEquals($expected, $field->getData()); + // same object still, useful if it is a PersistentCollection + $this->assertSame($existing, $field->getData()); + $this->assertSame(array('1', '3'), $field->getViewData()); + } + + public function testSubmitMultipleNonExpandedCompositeIdentifier() + { + $entity1 = new CompositeIntIdEntity(10, 20, 'Foo'); + $entity2 = new CompositeIntIdEntity(30, 40, 'Bar'); + $entity3 = new CompositeIntIdEntity(50, 60, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'em' => 'default', + 'class' => self::COMPOSITE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + // because of the composite key collection keys are used + $field->submit(array('0', '2')); + + $expected = new ArrayCollection(array($entity1, $entity3)); + + $this->assertTrue($field->isSynchronized()); + $this->assertEquals($expected, $field->getData()); + $this->assertSame(array('0', '2'), $field->getViewData()); + } + + public function testSubmitMultipleNonExpandedCompositeIdentifierExistingData() + { + $entity1 = new CompositeIntIdEntity(10, 20, 'Foo'); + $entity2 = new CompositeIntIdEntity(30, 40, 'Bar'); + $entity3 = new CompositeIntIdEntity(50, 60, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'em' => 'default', + 'class' => self::COMPOSITE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $existing = new ArrayCollection(array(0 => $entity2)); + + $field->setData($existing); + $field->submit(array('0', '2')); + + // entry with index 0 ($entity2) was replaced + $expected = new ArrayCollection(array(0 => $entity1, 1 => $entity3)); + + $this->assertTrue($field->isSynchronized()); + $this->assertEquals($expected, $field->getData()); + // same object still, useful if it is a PersistentCollection + $this->assertSame($existing, $field->getData()); + $this->assertSame(array('0', '2'), $field->getViewData()); + } + + public function testSubmitSingleExpanded() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit('2'); + + $this->assertTrue($field->isSynchronized()); + $this->assertSame($entity2, $field->getData()); + $this->assertFalse($field['1']->getData()); + $this->assertTrue($field['2']->getData()); + $this->assertNull($field['1']->getViewData()); + $this->assertSame('2', $field['2']->getViewData()); + } + + public function testSubmitMultipleExpanded() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + $entity3 = new SingleIntIdEntity(3, 'Bar'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit(array('1', '3')); + + $expected = new ArrayCollection(array($entity1, $entity3)); + + $this->assertTrue($field->isSynchronized()); + $this->assertEquals($expected, $field->getData()); + $this->assertTrue($field['1']->getData()); + $this->assertFalse($field['2']->getData()); + $this->assertTrue($field['3']->getData()); + $this->assertSame('1', $field['1']->getViewData()); + $this->assertNull($field['2']->getViewData()); + $this->assertSame('3', $field['3']->getViewData()); + } + + public function testSubmitMultipleExpandedWithNegativeIntegerId() + { + $entity1 = new SingleIntIdEntity(-1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit(array('-1')); + + $expected = new ArrayCollection(array($entity1)); + + $this->assertTrue($field->isSynchronized()); + $this->assertEquals($expected, $field->getData()); + $this->assertTrue($field['_1']->getData()); + $this->assertFalse($field['2']->getData()); + } + + public function testSubmitSingleNonExpandedStringCastableIdentifier() + { + $entity1 = new SingleStringCastableIdEntity(1, 'Foo'); + $entity2 = new SingleStringCastableIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'em' => 'default', + 'class' => self::SINGLE_STRING_CASTABLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit('2'); + + $this->assertTrue($field->isSynchronized()); + $this->assertSame($entity2, $field->getData()); + $this->assertSame('2', $field->getViewData()); + } + + public function testSubmitSingleStringCastableIdentifierExpanded() + { + $entity1 = new SingleStringCastableIdEntity(1, 'Foo'); + $entity2 = new SingleStringCastableIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'em' => 'default', + 'class' => self::SINGLE_STRING_CASTABLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit('2'); + + $this->assertTrue($field->isSynchronized()); + $this->assertSame($entity2, $field->getData()); + $this->assertFalse($field['0']->getData()); + $this->assertTrue($field['1']->getData()); + $this->assertNull($field['0']->getViewData()); + $this->assertSame('2', $field['1']->getViewData()); + } + + public function testSubmitMultipleNonExpandedStringCastableIdentifierForExistingData() + { + $entity1 = new SingleStringCastableIdEntity(1, 'Foo'); + $entity2 = new SingleStringCastableIdEntity(2, 'Bar'); + $entity3 = new SingleStringCastableIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'em' => 'default', + 'class' => self::SINGLE_STRING_CASTABLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $existing = new ArrayCollection(array(0 => $entity2)); + + $field->setData($existing); + $field->submit(array('1', '3')); + + // entry with index 0 ($entity2) was replaced + $expected = new ArrayCollection(array(0 => $entity1, 1 => $entity3)); + + $this->assertTrue($field->isSynchronized()); + $this->assertEquals($expected, $field->getData()); + // same object still, useful if it is a PersistentCollection + $this->assertSame($existing, $field->getData()); + $this->assertSame(array('1', '3'), $field->getViewData()); + } + + public function testSubmitMultipleNonExpandedStringCastableIdentifier() + { + $entity1 = new SingleStringCastableIdEntity(1, 'Foo'); + $entity2 = new SingleStringCastableIdEntity(2, 'Bar'); + $entity3 = new SingleStringCastableIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'em' => 'default', + 'class' => self::SINGLE_STRING_CASTABLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit(array('1', '3')); + + $expected = new ArrayCollection(array($entity1, $entity3)); + + $this->assertTrue($field->isSynchronized()); + $this->assertEquals($expected, $field->getData()); + $this->assertSame(array('1', '3'), $field->getViewData()); + } + + public function testSubmitMultipleStringCastableIdentifierExpanded() + { + $entity1 = new SingleStringCastableIdEntity(1, 'Foo'); + $entity2 = new SingleStringCastableIdEntity(2, 'Bar'); + $entity3 = new SingleStringCastableIdEntity(3, 'Bar'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'em' => 'default', + 'class' => self::SINGLE_STRING_CASTABLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit(array('1', '3')); + + $expected = new ArrayCollection(array($entity1, $entity3)); + + $this->assertTrue($field->isSynchronized()); + $this->assertEquals($expected, $field->getData()); + $this->assertTrue($field['0']->getData()); + $this->assertFalse($field['1']->getData()); + $this->assertTrue($field['2']->getData()); + $this->assertSame('1', $field['0']->getViewData()); + $this->assertNull($field['1']->getViewData()); + $this->assertSame('3', $field['2']->getViewData()); + } + + public function testOverrideChoices() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + $entity3 = new SingleIntIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + // not all persisted entities should be displayed + 'choices' => array($entity1, $entity2), + 'choice_label' => 'name', + )); + + $field->submit('2'); + + $this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']); + $this->assertTrue($field->isSynchronized()); + $this->assertSame($entity2, $field->getData()); + $this->assertSame('2', $field->getViewData()); + } + + public function testOverrideChoicesValues() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'choice_label' => 'name', + 'choice_value' => 'name', + )); + + $field->submit('Bar'); + + $this->assertEquals(array('Foo' => new ChoiceView($entity1, 'Foo', 'Foo'), 'Bar' => new ChoiceView($entity2, 'Bar', 'Bar')), $field->createView()->vars['choices']); + $this->assertTrue($field->isSynchronized(), 'Field should be synchronized.'); + $this->assertSame($entity2, $field->getData(), 'Entity should be loaded by custom value.'); + $this->assertSame('Bar', $field->getViewData()); + } + + public function testOverrideChoicesValuesWithCallable() + { + $entity1 = new GroupableEntity(1, 'Foo', 'BazGroup'); + $entity2 = new GroupableEntity(2, 'Bar', 'BooGroup'); + + $this->persist(array($entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::ITEM_GROUP_CLASS, + 'choice_label' => 'name', + 'choice_value' => function (GroupableEntity $entity = null) { + if (null === $entity) { + return ''; + } + + return $entity->groupName.'/'.$entity->name; + }, + )); + + $field->submit('BooGroup/Bar'); + + $this->assertEquals(array( + 'BazGroup/Foo' => new ChoiceView($entity1, 'BazGroup/Foo', 'Foo'), + 'BooGroup/Bar' => new ChoiceView($entity2, 'BooGroup/Bar', 'Bar'), + ), $field->createView()->vars['choices']); + $this->assertTrue($field->isSynchronized(), 'Field should be synchronized.'); + $this->assertSame($entity2, $field->getData(), 'Entity should be loaded by custom value.'); + $this->assertSame('BooGroup/Bar', $field->getViewData()); + } + + public function testChoicesForValuesOptimization() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $this->em->clear(); + + $field->submit(1); + + $unitOfWorkIdentityMap = $this->em->getUnitOfWork()->getIdentityMap(); + $managedEntitiesNames = array_map('strval', $unitOfWorkIdentityMap['Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity']); + + $this->assertContains((string) $entity1, $managedEntitiesNames); + $this->assertNotContains((string) $entity2, $managedEntitiesNames); + } + + public function testGroupByChoices() + { + $item1 = new GroupableEntity(1, 'Foo', 'Group1'); + $item2 = new GroupableEntity(2, 'Bar', 'Group1'); + $item3 = new GroupableEntity(3, 'Baz', 'Group2'); + $item4 = new GroupableEntity(4, 'Boo!', null); + + $this->persist(array($item1, $item2, $item3, $item4)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::ITEM_GROUP_CLASS, + 'choices' => array($item1, $item2, $item3, $item4), + 'choice_label' => 'name', + 'group_by' => 'groupName', + )); + + $field->submit('2'); + + $this->assertSame('2', $field->getViewData()); + $this->assertEquals(array( + 'Group1' => new ChoiceGroupView('Group1', array( + 1 => new ChoiceView($item1, '1', 'Foo'), + 2 => new ChoiceView($item2, '2', 'Bar'), + )), + 'Group2' => new ChoiceGroupView('Group2', array( + 3 => new ChoiceView($item3, '3', 'Baz'), + )), + 4 => new ChoiceView($item4, '4', 'Boo!'), + ), $field->createView()->vars['choices']); + } + + public function testPreferredChoices() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + $entity3 = new SingleIntIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'preferred_choices' => array($entity3, $entity2), + 'choice_label' => 'name', + )); + + $this->assertEquals(array(3 => new ChoiceView($entity3, '3', 'Baz'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['preferred_choices']); + $this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo')), $field->createView()->vars['choices']); + } + + public function testOverrideChoicesWithPreferredChoices() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + $entity3 = new SingleIntIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'choices' => array($entity2, $entity3), + 'preferred_choices' => array($entity3), + 'choice_label' => 'name', + )); + + $this->assertEquals(array(3 => new ChoiceView($entity3, '3', 'Baz')), $field->createView()->vars['preferred_choices']); + $this->assertEquals(array(2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']); + } + + public function testDisallowChoicesThatAreNotIncludedChoicesSingleIdentifier() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + $entity3 = new SingleIntIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'choices' => array($entity1, $entity2), + 'choice_label' => 'name', + )); + + $field->submit('3'); + + $this->assertFalse($field->isSynchronized()); + $this->assertNull($field->getData()); + } + + public function testDisallowChoicesThatAreNotIncludedChoicesSingleAssocIdentifier() + { + $innerEntity1 = new SingleIntIdNoToStringEntity(1, 'InFoo'); + $innerEntity2 = new SingleIntIdNoToStringEntity(2, 'InBar'); + + $entity1 = new SingleAssociationToIntIdEntity($innerEntity1, 'Foo'); + $entity2 = new SingleAssociationToIntIdEntity($innerEntity2, 'Bar'); + + $this->persist(array($innerEntity1, $innerEntity2, $entity1, $entity2)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_ASSOC_IDENT_CLASS, + 'choices' => array($entity1, $entity2), + 'choice_label' => 'name', + )); + + $field->submit('3'); + + $this->assertFalse($field->isSynchronized()); + $this->assertNull($field->getData()); + } + + public function testDisallowChoicesThatAreNotIncludedChoicesCompositeIdentifier() + { + $entity1 = new CompositeIntIdEntity(10, 20, 'Foo'); + $entity2 = new CompositeIntIdEntity(30, 40, 'Bar'); + $entity3 = new CompositeIntIdEntity(50, 60, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::COMPOSITE_IDENT_CLASS, + 'choices' => array($entity1, $entity2), + 'choice_label' => 'name', + )); + + $field->submit('2'); + + $this->assertFalse($field->isSynchronized()); + $this->assertNull($field->getData()); + } + + public function testDisallowChoicesThatAreNotIncludedQueryBuilderSingleIdentifier() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + $entity3 = new SingleIntIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $repository = $this->em->getRepository(self::SINGLE_IDENT_CLASS); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => $repository->createQueryBuilder('e') + ->where('e.id IN (1, 2)'), + 'choice_label' => 'name', + )); + + $field->submit('3'); + + $this->assertFalse($field->isSynchronized()); + $this->assertNull($field->getData()); + } + + public function testDisallowChoicesThatAreNotIncludedQueryBuilderSingleAssocIdentifier() + { + $innerEntity1 = new SingleIntIdNoToStringEntity(1, 'InFoo'); + $innerEntity2 = new SingleIntIdNoToStringEntity(2, 'InBar'); + $innerEntity3 = new SingleIntIdNoToStringEntity(3, 'InBaz'); + + $entity1 = new SingleAssociationToIntIdEntity($innerEntity1, 'Foo'); + $entity2 = new SingleAssociationToIntIdEntity($innerEntity2, 'Bar'); + $entity3 = new SingleAssociationToIntIdEntity($innerEntity3, 'Baz'); + + $this->persist(array($innerEntity1, $innerEntity2, $innerEntity3, $entity1, $entity2, $entity3)); + + $repository = $this->em->getRepository(self::SINGLE_ASSOC_IDENT_CLASS); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_ASSOC_IDENT_CLASS, + 'query_builder' => $repository->createQueryBuilder('e') + ->where('e.entity IN (1, 2)'), + 'choice_label' => 'name', + )); + + $field->submit('3'); + + $this->assertFalse($field->isSynchronized()); + $this->assertNull($field->getData()); + } + + public function testDisallowChoicesThatAreNotIncludedQueryBuilderAsClosureSingleIdentifier() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + $entity3 = new SingleIntIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => function (EntityRepository $repository) { + return $repository->createQueryBuilder('e') + ->where('e.id IN (1, 2)'); + }, + 'choice_label' => 'name', + )); + + $field->submit('3'); + + $this->assertFalse($field->isSynchronized()); + $this->assertNull($field->getData()); + } + + public function testDisallowChoicesThatAreNotIncludedQueryBuilderAsClosureCompositeIdentifier() + { + $entity1 = new CompositeIntIdEntity(10, 20, 'Foo'); + $entity2 = new CompositeIntIdEntity(30, 40, 'Bar'); + $entity3 = new CompositeIntIdEntity(50, 60, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::COMPOSITE_IDENT_CLASS, + 'query_builder' => function (EntityRepository $repository) { + return $repository->createQueryBuilder('e') + ->where('e.id1 IN (10, 50)'); + }, + 'choice_label' => 'name', + )); + + $field->submit('2'); + + $this->assertFalse($field->isSynchronized()); + $this->assertNull($field->getData()); + } + + public function testSubmitSingleStringIdentifier() + { + $entity1 = new SingleStringIdEntity('foo', 'Foo'); + + $this->persist(array($entity1)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'em' => 'default', + 'class' => self::SINGLE_STRING_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit('foo'); + + $this->assertTrue($field->isSynchronized()); + $this->assertSame($entity1, $field->getData()); + $this->assertSame('foo', $field->getViewData()); + } + + public function testSubmitCompositeStringIdentifier() + { + $entity1 = new CompositeStringIdEntity('foo1', 'foo2', 'Foo'); + + $this->persist(array($entity1)); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'em' => 'default', + 'class' => self::COMPOSITE_STRING_IDENT_CLASS, + 'choice_label' => 'name', + )); + + // the collection key is used here + $field->submit('0'); + + $this->assertTrue($field->isSynchronized()); + $this->assertSame($entity1, $field->getData()); + $this->assertSame('0', $field->getViewData()); + } + + public function testGetManagerForClassIfNoEm() + { + $this->emRegistry->expects($this->never()) + ->method('getManager'); + + $this->emRegistry->expects($this->once()) + ->method('getManagerForClass') + ->with(self::SINGLE_IDENT_CLASS) + ->will($this->returnValue($this->em)); + + $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'class' => self::SINGLE_IDENT_CLASS, + 'required' => false, + 'choice_label' => 'name', + )); + } + + public function testExplicitEm() + { + $this->emRegistry->expects($this->never()) + ->method('getManager'); + + $this->emRegistry->expects($this->never()) + ->method('getManagerForClass'); + + $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => $this->em, + 'class' => self::SINGLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + } + + public function testLoaderCaching() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + $entity3 = new SingleIntIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $repo = $this->em->getRepository(self::SINGLE_IDENT_CLASS); + + $entityType = new EntityType( + $this->emRegistry, + PropertyAccess::createPropertyAccessor() + ); + + $entityTypeGuesser = new DoctrineOrmTypeGuesser($this->emRegistry); + + $factory = Forms::createFormFactoryBuilder() + ->addType($entityType) + ->addTypeGuesser($entityTypeGuesser) + ->getFormFactory(); + + $formBuilder = $factory->createNamedBuilder('form', FormTypeTest::TESTED_TYPE); + + $formBuilder->add('property1', static::TESTED_TYPE, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => $repo->createQueryBuilder('e')->where('e.id IN (1, 2)'), + )); + + $formBuilder->add('property2', static::TESTED_TYPE, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => function (EntityRepository $repo) { + return $repo->createQueryBuilder('e')->where('e.id IN (1, 2)'); + }, + )); + + $formBuilder->add('property3', static::TESTED_TYPE, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => function (EntityRepository $repo) { + return $repo->createQueryBuilder('e')->where('e.id IN (1, 2)'); + }, + )); + + $form = $formBuilder->getForm(); + + $form->submit(array( + 'property1' => 1, + 'property2' => 1, + 'property3' => 2, + )); + + $choiceLoader1 = $form->get('property1')->getConfig()->getOption('choice_loader'); + $choiceLoader2 = $form->get('property2')->getConfig()->getOption('choice_loader'); + $choiceLoader3 = $form->get('property3')->getConfig()->getOption('choice_loader'); + + $this->assertInstanceOf('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface', $choiceLoader1); + $this->assertSame($choiceLoader1, $choiceLoader2); + $this->assertSame($choiceLoader1, $choiceLoader3); + } + + public function testLoaderCachingWithParameters() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + $entity3 = new SingleIntIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $repo = $this->em->getRepository(self::SINGLE_IDENT_CLASS); + + $entityType = new EntityType( + $this->emRegistry, + PropertyAccess::createPropertyAccessor() + ); + + $entityTypeGuesser = new DoctrineOrmTypeGuesser($this->emRegistry); + + $factory = Forms::createFormFactoryBuilder() + ->addType($entityType) + ->addTypeGuesser($entityTypeGuesser) + ->getFormFactory(); + + $formBuilder = $factory->createNamedBuilder('form', FormTypeTest::TESTED_TYPE); + + $formBuilder->add('property1', static::TESTED_TYPE, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => $repo->createQueryBuilder('e')->where('e.id = :id')->setParameter('id', 1), + )); + + $formBuilder->add('property2', static::TESTED_TYPE, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => function (EntityRepository $repo) { + return $repo->createQueryBuilder('e')->where('e.id = :id')->setParameter('id', 1); + }, + )); + + $formBuilder->add('property3', static::TESTED_TYPE, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => function (EntityRepository $repo) { + return $repo->createQueryBuilder('e')->where('e.id = :id')->setParameter('id', 1); + }, + )); + + $form = $formBuilder->getForm(); + + $form->submit(array( + 'property1' => 1, + 'property2' => 1, + 'property3' => 2, + )); + + $choiceLoader1 = $form->get('property1')->getConfig()->getOption('choice_loader'); + $choiceLoader2 = $form->get('property2')->getConfig()->getOption('choice_loader'); + $choiceLoader3 = $form->get('property3')->getConfig()->getOption('choice_loader'); + + $this->assertInstanceOf('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface', $choiceLoader1); + $this->assertSame($choiceLoader1, $choiceLoader2); + $this->assertSame($choiceLoader1, $choiceLoader3); + } + + protected function createRegistryMock($name, $em) + { + $registry = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')->getMock(); + $registry->expects($this->any()) + ->method('getManager') + ->with($this->equalTo($name)) + ->will($this->returnValue($em)); + + return $registry; + } + + public function testPassDisabledAsOption() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'em' => 'default', + 'disabled' => true, + 'class' => self::SINGLE_IDENT_CLASS, + )); + + $this->assertTrue($form->isDisabled()); + } + + public function testPassIdAndNameToView() + { + $view = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + )) + ->createView(); + + $this->assertEquals('name', $view->vars['id']); + $this->assertEquals('name', $view->vars['name']); + $this->assertEquals('name', $view->vars['full_name']); + } + + public function testStripLeadingUnderscoresAndDigitsFromId() + { + $view = $this->factory->createNamed('_09name', static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + )) + ->createView(); + + $this->assertEquals('name', $view->vars['id']); + $this->assertEquals('_09name', $view->vars['name']); + $this->assertEquals('_09name', $view->vars['full_name']); + } + + public function testPassIdAndNameToViewWithParent() + { + $view = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE) + ->add('child', static::TESTED_TYPE, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + )) + ->getForm() + ->createView(); + + $this->assertEquals('parent_child', $view['child']->vars['id']); + $this->assertEquals('child', $view['child']->vars['name']); + $this->assertEquals('parent[child]', $view['child']->vars['full_name']); + } + + public function testPassIdAndNameToViewWithGrandParent() + { + $builder = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE) + ->add('child', FormTypeTest::TESTED_TYPE); + $builder->get('child')->add('grand_child', static::TESTED_TYPE, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + )); + $view = $builder->getForm()->createView(); + + $this->assertEquals('parent_child_grand_child', $view['child']['grand_child']->vars['id']); + $this->assertEquals('grand_child', $view['child']['grand_child']->vars['name']); + $this->assertEquals('parent[child][grand_child]', $view['child']['grand_child']->vars['full_name']); + } + + public function testPassTranslationDomainToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'translation_domain' => 'domain', + )) + ->createView(); + + $this->assertSame('domain', $view->vars['translation_domain']); + } + + public function testInheritTranslationDomainFromParent() + { + $view = $this->factory + ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array( + 'translation_domain' => 'domain', + )) + ->add('child', static::TESTED_TYPE, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + )) + ->getForm() + ->createView(); + + $this->assertEquals('domain', $view['child']->vars['translation_domain']); + } + + public function testPreferOwnTranslationDomain() + { + $view = $this->factory + ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array( + 'translation_domain' => 'parent_domain', + )) + ->add('child', static::TESTED_TYPE, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'translation_domain' => 'domain', + )) + ->getForm() + ->createView(); + + $this->assertEquals('domain', $view['child']->vars['translation_domain']); + } + + public function testDefaultTranslationDomain() + { + $view = $this->factory + ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE) + ->add('child', static::TESTED_TYPE, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + )) + ->getForm() + ->createView(); + + $this->assertNull($view['child']->vars['translation_domain']); + } + + public function testPassLabelToView() + { + $view = $this->factory->createNamed('__test___field', static::TESTED_TYPE, null, array( + 'label' => 'My label', + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + )) + ->createView(); + + $this->assertSame('My label', $view->vars['label']); + } + + public function testPassMultipartFalseToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + )) + ->createView(); + + $this->assertFalse($view->vars['multipart']); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + )); + $form->submit(null); + + $this->assertNull($form->getData()); + $this->assertNull($form->getNormData()); + $this->assertSame('', $form->getViewData(), 'View data is always a string'); + } + + public function testSubmitNullExpanded() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'expanded' => true, + )); + $form->submit(null); + + $this->assertNull($form->getData()); + $this->assertNull($form->getNormData()); + $this->assertSame('', $form->getViewData(), 'View data is always a string'); + } + + public function testSubmitNullMultiple() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'multiple' => true, + )); + $form->submit(null); + + $collection = new ArrayCollection(); + + $this->assertEquals($collection, $form->getData()); + $this->assertEquals($collection, $form->getNormData()); + $this->assertSame(array(), $form->getViewData(), 'View data is always an array'); + } + + public function testSubmitNullExpandedMultiple() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'expanded' => true, + 'multiple' => true, + )); + $form->submit(null); + + $collection = new ArrayCollection(); + + $this->assertEquals($collection, $form->getData()); + $this->assertEquals($collection, $form->getNormData()); + $this->assertSame(array(), $form->getViewData(), 'View data is always an array'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/HttpFoundation/DbalSessionHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/HttpFoundation/DbalSessionHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..89ac999f20301f3631130f187c3f13f824ecf4cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/HttpFoundation/DbalSessionHandlerTest.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\Doctrine\Tests\HttpFoundation; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\HttpFoundation\DbalSessionHandler; + +/** + * Test class for DbalSessionHandler. + * + * @author Drak + */ +class DbalSessionHandlerTest extends TestCase +{ + public function testConstruct() + { + $connection = $this->getMockBuilder('Doctrine\DBAL\Connection')->disableOriginalConstructor()->getMock(); + $handler = new DbalSessionHandler($connection); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1e3e6ca6ec809db5d1c0eedb65b20af99e9c13f5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php @@ -0,0 +1,169 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Logger; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\Logger\DbalLogger; + +class DbalLoggerTest extends TestCase +{ + /** + * @dataProvider getLogFixtures + */ + public function testLog($sql, $params, $logParams) + { + $logger = $this->getMockBuilder('Psr\\Log\\LoggerInterface')->getMock(); + + $dbalLogger = $this + ->getMockBuilder('Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger') + ->setConstructorArgs(array($logger, null)) + ->setMethods(array('log')) + ->getMock() + ; + + $dbalLogger + ->expects($this->once()) + ->method('log') + ->with($sql, $logParams) + ; + + $dbalLogger->startQuery($sql, $params); + } + + public function getLogFixtures() + { + return array( + array('SQL', null, array()), + array('SQL', array(), array()), + array('SQL', array('foo' => 'bar'), array('foo' => 'bar')), + array('SQL', array('foo' => "\x7F\xFF"), array('foo' => DbalLogger::BINARY_DATA_VALUE)), + array('SQL', array('foo' => "bar\x7F\xFF"), array('foo' => DbalLogger::BINARY_DATA_VALUE)), + array('SQL', array('foo' => ''), array('foo' => '')), + ); + } + + public function testLogNonUtf8() + { + $logger = $this->getMockBuilder('Psr\\Log\\LoggerInterface')->getMock(); + + $dbalLogger = $this + ->getMockBuilder('Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger') + ->setConstructorArgs(array($logger, null)) + ->setMethods(array('log')) + ->getMock() + ; + + $dbalLogger + ->expects($this->once()) + ->method('log') + ->with('SQL', array('utf8' => 'foo', 'nonutf8' => DbalLogger::BINARY_DATA_VALUE)) + ; + + $dbalLogger->startQuery('SQL', array( + 'utf8' => 'foo', + 'nonutf8' => "\x7F\xFF", + )); + } + + public function testLogNonUtf8Array() + { + $logger = $this->getMockBuilder('Psr\\Log\\LoggerInterface')->getMock(); + + $dbalLogger = $this + ->getMockBuilder('Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger') + ->setConstructorArgs(array($logger, null)) + ->setMethods(array('log')) + ->getMock() + ; + + $dbalLogger + ->expects($this->once()) + ->method('log') + ->with('SQL', array( + 'utf8' => 'foo', + array( + 'nonutf8' => DbalLogger::BINARY_DATA_VALUE, + ), + ) + ) + ; + + $dbalLogger->startQuery('SQL', array( + 'utf8' => 'foo', + array( + 'nonutf8' => "\x7F\xFF", + ), + )); + } + + public function testLogLongString() + { + $logger = $this->getMockBuilder('Psr\\Log\\LoggerInterface')->getMock(); + + $dbalLogger = $this + ->getMockBuilder('Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger') + ->setConstructorArgs(array($logger, null)) + ->setMethods(array('log')) + ->getMock() + ; + + $testString = 'abc'; + + $shortString = str_pad('', DbalLogger::MAX_STRING_LENGTH, $testString); + $longString = str_pad('', DbalLogger::MAX_STRING_LENGTH + 1, $testString); + + $dbalLogger + ->expects($this->once()) + ->method('log') + ->with('SQL', array('short' => $shortString, 'long' => substr($longString, 0, DbalLogger::MAX_STRING_LENGTH - 6).' [...]')) + ; + + $dbalLogger->startQuery('SQL', array( + 'short' => $shortString, + 'long' => $longString, + )); + } + + public function testLogUTF8LongString() + { + $logger = $this->getMockBuilder('Psr\\Log\\LoggerInterface')->getMock(); + + $dbalLogger = $this + ->getMockBuilder('Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger') + ->setConstructorArgs(array($logger, null)) + ->setMethods(array('log')) + ->getMock() + ; + + $testStringArray = array('é', 'á', 'ű', 'ő', 'ú', 'ö', 'ü', 'ó', 'í'); + $testStringCount = count($testStringArray); + + $shortString = ''; + $longString = ''; + for ($i = 1; $i <= DbalLogger::MAX_STRING_LENGTH; ++$i) { + $shortString .= $testStringArray[$i % $testStringCount]; + $longString .= $testStringArray[$i % $testStringCount]; + } + $longString .= $testStringArray[$i % $testStringCount]; + + $dbalLogger + ->expects($this->once()) + ->method('log') + ->with('SQL', array('short' => $shortString, 'long' => mb_substr($longString, 0, DbalLogger::MAX_STRING_LENGTH - 6, 'UTF-8').' [...]')) + ; + + $dbalLogger->startQuery('SQL', array( + 'short' => $shortString, + 'long' => $longString, + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fa3037a609d8a24f1b1553efeb092e650b7fdb82 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.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\Bridge\Doctrine\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\ManagerRegistry; +use Symfony\Bridge\ProxyManager\Tests\LazyProxy\Dumper\PhpDumperTest; + +class ManagerRegistryTest extends TestCase +{ + public static function setUpBeforeClass() + { + if (!class_exists('PHPUnit_Framework_TestCase')) { + self::markTestSkipped('proxy-manager-bridge is not yet compatible with namespaced phpunit versions.'); + } + $test = new PhpDumperTest(); + $test->testDumpContainerWithProxyServiceWillShareProxies(); + } + + public function testResetService() + { + $container = new \LazyServiceProjectServiceContainer(); + + $registry = new TestManagerRegistry('name', array(), array('defaultManager' => 'foo'), 'defaultConnection', 'defaultManager', 'proxyInterfaceName'); + $registry->setContainer($container); + + $foo = $container->get('foo'); + $foo->bar = 123; + $this->assertTrue(isset($foo->bar)); + + $registry->resetManager(); + + $this->assertSame($foo, $container->get('foo')); + $this->assertFalse(isset($foo->bar)); + } +} + +class TestManagerRegistry extends ManagerRegistry +{ + public function getAliasNamespace($alias) + { + return 'Foo'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..277922daefd5191626a4383f2de36cb331f5659d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\PropertyInfo\Tests; + +use Doctrine\DBAL\Types\Type as DBALType; +use Doctrine\ORM\EntityManager; +use Doctrine\ORM\Tools\Setup; +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor; +use Symfony\Component\PropertyInfo\Type; + +/** + * @author Kévin Dunglas + */ +class DoctrineExtractorTest extends TestCase +{ + /** + * @var DoctrineExtractor + */ + private $extractor; + + protected function setUp() + { + $config = Setup::createAnnotationMetadataConfiguration(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'), true); + $entityManager = EntityManager::create(array('driver' => 'pdo_sqlite'), $config); + + if (!DBALType::hasType('foo')) { + DBALType::addType('foo', 'Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\DoctrineFooType'); + $entityManager->getConnection()->getDatabasePlatform()->registerDoctrineTypeMapping('custom_foo', 'foo'); + } + + $this->extractor = new DoctrineExtractor($entityManager->getMetadataFactory()); + } + + public function testGetProperties() + { + $this->assertEquals( + array( + 'id', + 'guid', + 'time', + 'json', + 'simpleArray', + 'float', + 'decimal', + 'bool', + 'binary', + 'customFoo', + 'foo', + 'bar', + 'indexedBar', + ), + $this->extractor->getProperties('Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\DoctrineDummy') + ); + } + + /** + * @dataProvider typesProvider + */ + public function testExtract($property, array $type = null) + { + $this->assertEquals($type, $this->extractor->getTypes('Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\DoctrineDummy', $property, array())); + } + + public function typesProvider() + { + return array( + array('id', array(new Type(Type::BUILTIN_TYPE_INT))), + array('guid', array(new Type(Type::BUILTIN_TYPE_STRING))), + array('float', array(new Type(Type::BUILTIN_TYPE_FLOAT))), + array('decimal', array(new Type(Type::BUILTIN_TYPE_STRING))), + array('bool', array(new Type(Type::BUILTIN_TYPE_BOOL))), + array('binary', array(new Type(Type::BUILTIN_TYPE_RESOURCE))), + array('json', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true))), + array('foo', array(new Type(Type::BUILTIN_TYPE_OBJECT, true, 'Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\DoctrineRelation'))), + array('bar', array(new Type( + Type::BUILTIN_TYPE_OBJECT, + false, + 'Doctrine\Common\Collections\Collection', + true, + new Type(Type::BUILTIN_TYPE_INT), + new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\DoctrineRelation') + ))), + array('indexedBar', array(new Type( + Type::BUILTIN_TYPE_OBJECT, + false, + 'Doctrine\Common\Collections\Collection', + true, + new Type(Type::BUILTIN_TYPE_STRING), + new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\DoctrineRelation') + ))), + array('simpleArray', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING)))), + array('customFoo', null), + array('notMapped', null), + ); + } + + public function testGetPropertiesCatchException() + { + $this->assertNull($this->extractor->getProperties('Not\Exist')); + } + + public function testGetTypesCatchException() + { + $this->assertNull($this->extractor->getTypes('Not\Exist', 'baz')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..ad3b7b9227652ce56e91c06a9b8ee36519445c7e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.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\Bridge\Doctrine\Tests\PropertyInfo\Fixtures; + +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; +use Doctrine\ORM\Mapping\Id; +use Doctrine\ORM\Mapping\ManyToMany; +use Doctrine\ORM\Mapping\ManyToOne; + +/** + * @Entity + * + * @author Kévin Dunglas + */ +class DoctrineDummy +{ + /** + * @Id + * @Column(type="smallint") + */ + public $id; + + /** + * @ManyToOne(targetEntity="DoctrineRelation") + */ + public $foo; + + /** + * @ManyToMany(targetEntity="DoctrineRelation") + */ + public $bar; + + /** + * @ManyToMany(targetEntity="DoctrineRelation", indexBy="rguid") + */ + protected $indexedBar; + + /** + * @Column(type="guid") + */ + protected $guid; + + /** + * @Column(type="time") + */ + private $time; + + /** + * @Column(type="json_array") + */ + private $json; + + /** + * @Column(type="simple_array") + */ + private $simpleArray; + + /** + * @Column(type="float") + */ + private $float; + + /** + * @Column(type="decimal", precision=10, scale=2) + */ + private $decimal; + + /** + * @Column(type="boolean") + */ + private $bool; + + /** + * @Column(type="binary") + */ + private $binary; + + /** + * @Column(type="custom_foo") + */ + private $customFoo; + + public $notMapped; +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineFooType.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineFooType.php new file mode 100644 index 0000000000000000000000000000000000000000..394eaebdefc6f9e4e08b91df40a41a040989dcab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineFooType.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures; + +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Types\ConversionException; +use Doctrine\DBAL\Types\Type; + +/** + * @author Teoh Han Hui + */ +class DoctrineFooType extends Type +{ + /** + * Type name. + */ + const NAME = 'foo'; + + /** + * {@inheritdoc} + */ + public function getName() + { + return self::NAME; + } + + /** + * {@inheritdoc} + */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getClobTypeDeclarationSQL(array()); + } + + /** + * {@inheritdoc} + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + if (null === $value) { + return; + } + if (!$value instanceof Foo) { + throw new ConversionException(sprintf('Expected %s, got %s', 'Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\Foo', gettype($value))); + } + + return $foo->bar; + } + + /** + * {@inheritdoc} + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if (null === $value) { + return; + } + if (!is_string($value)) { + throw ConversionException::conversionFailed($value, self::NAME); + } + + $foo = new Foo(); + $foo->bar = $value; + + return $foo; + } + + /** + * {@inheritdoc} + */ + public function requiresSQLCommentHint(AbstractPlatform $platform) + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php new file mode 100644 index 0000000000000000000000000000000000000000..6e94e028faa7d842d2983c662f62cb8181342d6f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures; + +use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Entity; +use Doctrine\ORM\Mapping\Id; + +/** + * @Entity + * + * @author Kévin Dunglas + */ +class DoctrineRelation +{ + /** + * @Id + * @Column(type="smallint") + */ + public $id; + + /** + * @Column(type="guid") + */ + protected $rguid; +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/Foo.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/Foo.php new file mode 100644 index 0000000000000000000000000000000000000000..3e4016cc56ab6d790b0a9eb1ac5ea54b2fd40b39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/Foo.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures; + +/** + * @author Teoh Han Hui + */ +class Foo +{ + /** + * @var string + */ + public $bar; +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..78a2cdb6f33b3f413fc99579ebe34172e83ab875 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php @@ -0,0 +1,215 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Security\User; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; +use Symfony\Bridge\Doctrine\Tests\Fixtures\User; +use Symfony\Bridge\Doctrine\Security\User\EntityUserProvider; +use Doctrine\ORM\Tools\SchemaTool; + +class EntityUserProviderTest extends TestCase +{ + public function testRefreshUserGetsUserByPrimaryKey() + { + $em = DoctrineTestHelper::createTestEntityManager(); + $this->createSchema($em); + + $user1 = new User(1, 1, 'user1'); + $user2 = new User(1, 2, 'user2'); + + $em->persist($user1); + $em->persist($user2); + $em->flush(); + + $provider = new EntityUserProvider($this->getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User', 'name'); + + // try to change the user identity + $user1->name = 'user2'; + + $this->assertSame($user1, $provider->refreshUser($user1)); + } + + public function testLoadUserByUsername() + { + $em = DoctrineTestHelper::createTestEntityManager(); + $this->createSchema($em); + + $user = new User(1, 1, 'user1'); + + $em->persist($user); + $em->flush(); + + $provider = new EntityUserProvider($this->getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User', 'name'); + + $this->assertSame($user, $provider->loadUserByUsername('user1')); + } + + public function testLoadUserByUsernameWithUserLoaderRepositoryAndWithoutProperty() + { + $user = new User(1, 1, 'user1'); + + $repository = $this->getMockBuilder('Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface') + ->disableOriginalConstructor() + ->getMock(); + $repository + ->expects($this->once()) + ->method('loadUserByUsername') + ->with('user1') + ->willReturn($user); + + $em = $this->getMockBuilder('Doctrine\ORM\EntityManager') + ->disableOriginalConstructor() + ->getMock(); + $em + ->expects($this->once()) + ->method('getRepository') + ->with('Symfony\Bridge\Doctrine\Tests\Fixtures\User') + ->willReturn($repository); + + $provider = new EntityUserProvider($this->getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User'); + $this->assertSame($user, $provider->loadUserByUsername('user1')); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage You must either make the "Symfony\Bridge\Doctrine\Tests\Fixtures\User" entity Doctrine Repository ("Doctrine\ORM\EntityRepository") implement "Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface" or set the "property" option in the corresponding entity provider configuration. + */ + public function testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty() + { + $em = DoctrineTestHelper::createTestEntityManager(); + $this->createSchema($em); + + $user = new User(1, 1, 'user1'); + + $em->persist($user); + $em->flush(); + + $provider = new EntityUserProvider($this->getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User'); + $provider->loadUserByUsername('user1'); + } + + public function testRefreshUserRequiresId() + { + $em = DoctrineTestHelper::createTestEntityManager(); + + $user1 = new User(null, null, 'user1'); + $provider = new EntityUserProvider($this->getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User', 'name'); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}( + 'InvalidArgumentException', + 'You cannot refresh a user from the EntityUserProvider that does not contain an identifier. The user object has to be serialized with its own identifier mapped by Doctrine' + ); + $provider->refreshUser($user1); + } + + public function testRefreshInvalidUser() + { + $em = DoctrineTestHelper::createTestEntityManager(); + $this->createSchema($em); + + $user1 = new User(1, 1, 'user1'); + + $em->persist($user1); + $em->flush(); + + $provider = new EntityUserProvider($this->getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User', 'name'); + + $user2 = new User(1, 2, 'user2'); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}( + 'Symfony\Component\Security\Core\Exception\UsernameNotFoundException', + 'User with id {"id1":1,"id2":2} not found' + ); + $provider->refreshUser($user2); + } + + public function testSupportProxy() + { + $em = DoctrineTestHelper::createTestEntityManager(); + $this->createSchema($em); + + $user1 = new User(1, 1, 'user1'); + + $em->persist($user1); + $em->flush(); + $em->clear(); + + $provider = new EntityUserProvider($this->getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User', 'name'); + + $user2 = $em->getReference('Symfony\Bridge\Doctrine\Tests\Fixtures\User', array('id1' => 1, 'id2' => 1)); + $this->assertTrue($provider->supportsClass(get_class($user2))); + } + + public function testLoadUserByUserNameShouldLoadUserWhenProperInterfaceProvided() + { + $repository = $this->getMockBuilder('\Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface')->getMock(); + $repository->expects($this->once()) + ->method('loadUserByUsername') + ->with('name') + ->willReturn( + $this->getMockBuilder('\Symfony\Component\Security\Core\User\UserInterface')->getMock() + ); + + $provider = new EntityUserProvider( + $this->getManager($this->getObjectManager($repository)), + 'Symfony\Bridge\Doctrine\Tests\Fixtures\User' + ); + + $provider->loadUserByUsername('name'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testLoadUserByUserNameShouldDeclineInvalidInterface() + { + $repository = $this->getMockBuilder('\Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); + + $provider = new EntityUserProvider( + $this->getManager($this->getObjectManager($repository)), + 'Symfony\Bridge\Doctrine\Tests\Fixtures\User' + ); + + $provider->loadUserByUsername('name'); + } + + private function getManager($em, $name = null) + { + $manager = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')->getMock(); + $manager->expects($this->any()) + ->method('getManager') + ->with($this->equalTo($name)) + ->will($this->returnValue($em)); + + return $manager; + } + + private function getObjectManager($repository) + { + $em = $this->getMockBuilder('\Doctrine\Common\Persistence\ObjectManager') + ->setMethods(array('getClassMetadata', 'getRepository')) + ->getMockForAbstractClass(); + $em->expects($this->any()) + ->method('getRepository') + ->willReturn($repository); + + return $em; + } + + private function createSchema($em) + { + $schemaTool = new SchemaTool($em); + $schemaTool->createSchema(array( + $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\User'), + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0045e76cbca83628564018ae0e7b0a33c700fb2a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php @@ -0,0 +1,738 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Validator\Constraints; + +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Common\Persistence\ObjectRepository; +use Doctrine\DBAL\Types\Type; +use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; +use Symfony\Bridge\Doctrine\Test\TestRepositoryFactory; +use Symfony\Bridge\Doctrine\Tests\Fixtures\Employee; +use Symfony\Bridge\Doctrine\Tests\Fixtures\Person; +use Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeObjectNoToStringIdEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNameEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNullableNameEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\AssociationEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\AssociationEntity2; +use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdStringWrapperNameEntity; +use Symfony\Bridge\Doctrine\Tests\Fixtures\Type\StringWrapper; +use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; +use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator; +use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest; +use Doctrine\ORM\Tools\SchemaTool; + +/** + * @author Bernhard Schussek + * + * @todo use ConstraintValidatorTestCase when symfony/validator ~3.2 is required. + */ +class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest +{ + const EM_NAME = 'foo'; + + /** + * @var ObjectManager + */ + protected $em; + + /** + * @var ManagerRegistry + */ + protected $registry; + + /** + * @var ObjectRepository + */ + protected $repository; + + protected $repositoryFactory; + + protected function setUp() + { + $this->repositoryFactory = new TestRepositoryFactory(); + + $config = DoctrineTestHelper::createTestConfiguration(); + $config->setRepositoryFactory($this->repositoryFactory); + + if (!Type::hasType('string_wrapper')) { + Type::addType('string_wrapper', 'Symfony\Bridge\Doctrine\Tests\Fixtures\Type\StringWrapperType'); + } + + $this->em = DoctrineTestHelper::createTestEntityManager($config); + $this->registry = $this->createRegistryMock($this->em); + $this->createSchema($this->em); + + parent::setUp(); + } + + protected function createRegistryMock(ObjectManager $em = null) + { + $registry = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')->getMock(); + $registry->expects($this->any()) + ->method('getManager') + ->with($this->equalTo(self::EM_NAME)) + ->will($this->returnValue($em)); + + return $registry; + } + + protected function createRepositoryMock() + { + $repository = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectRepository') + ->setMethods(array('findByCustom', 'find', 'findAll', 'findOneBy', 'findBy', 'getClassName')) + ->getMock() + ; + + return $repository; + } + + protected function createEntityManagerMock($repositoryMock) + { + $em = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager') + ->getMock() + ; + $em->expects($this->any()) + ->method('getRepository') + ->will($this->returnValue($repositoryMock)) + ; + + $classMetadata = $this->getMockBuilder('Doctrine\Common\Persistence\Mapping\ClassMetadata')->getMock(); + $classMetadata + ->expects($this->any()) + ->method('hasField') + ->will($this->returnValue(true)) + ; + $reflParser = $this->getMockBuilder('Doctrine\Common\Reflection\StaticReflectionParser') + ->disableOriginalConstructor() + ->getMock() + ; + $refl = $this->getMockBuilder('Doctrine\Common\Reflection\StaticReflectionProperty') + ->setConstructorArgs(array($reflParser, 'property-name')) + ->setMethods(array('getValue')) + ->getMock() + ; + $refl + ->expects($this->any()) + ->method('getValue') + ->will($this->returnValue(true)) + ; + $classMetadata->reflFields = array('name' => $refl); + $em->expects($this->any()) + ->method('getClassMetadata') + ->will($this->returnValue($classMetadata)) + ; + + return $em; + } + + protected function createValidator() + { + return new UniqueEntityValidator($this->registry); + } + + private function createSchema(ObjectManager $em) + { + $schemaTool = new SchemaTool($em); + $schemaTool->createSchema(array( + $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity'), + $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity'), + $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNameEntity'), + $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNullableNameEntity'), + $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity'), + $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\AssociationEntity'), + $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\AssociationEntity2'), + $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\Person'), + $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\Employee'), + $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeObjectNoToStringIdEntity'), + $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdStringWrapperNameEntity'), + )); + } + + /** + * This is a functional test as there is a large integration necessary to get the validator working. + */ + public function testValidateUniqueness() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name'), + 'em' => self::EM_NAME, + )); + + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Foo'); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + + $this->em->persist($entity1); + $this->em->flush(); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + + $this->validator->validate($entity2, $constraint); + + $this->buildViolation('myMessage') + ->atPath('property.path.name') + ->setParameter('{{ value }}', '"Foo"') + ->setInvalidValue($entity2) + ->setCode(UniqueEntity::NOT_UNIQUE_ERROR) + ->assertRaised(); + } + + public function testValidateCustomErrorPath() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name'), + 'em' => self::EM_NAME, + 'errorPath' => 'bar', + )); + + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Foo'); + + $this->em->persist($entity1); + $this->em->flush(); + + $this->validator->validate($entity2, $constraint); + + $this->buildViolation('myMessage') + ->atPath('property.path.bar') + ->setParameter('{{ value }}', '"Foo"') + ->setInvalidValue($entity2) + ->setCode(UniqueEntity::NOT_UNIQUE_ERROR) + ->assertRaised(); + } + + public function testValidateUniquenessWithNull() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name'), + 'em' => self::EM_NAME, + )); + + $entity1 = new SingleIntIdEntity(1, null); + $entity2 = new SingleIntIdEntity(2, null); + + $this->em->persist($entity1); + $this->em->persist($entity2); + $this->em->flush(); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + } + + public function testValidateUniquenessWithIgnoreNullDisabled() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name', 'name2'), + 'em' => self::EM_NAME, + 'ignoreNull' => false, + )); + + $entity1 = new DoubleNameEntity(1, 'Foo', null); + $entity2 = new DoubleNameEntity(2, 'Foo', null); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + + $this->em->persist($entity1); + $this->em->flush(); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + + $this->validator->validate($entity2, $constraint); + + $this->buildViolation('myMessage') + ->atPath('property.path.name') + ->setParameter('{{ value }}', '"Foo"') + ->setInvalidValue('Foo') + ->setCode(UniqueEntity::NOT_UNIQUE_ERROR) + ->assertRaised(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testAllConfiguredFieldsAreCheckedOfBeingMappedByDoctrineWithIgnoreNullEnabled() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name', 'name2'), + 'em' => self::EM_NAME, + 'ignoreNull' => true, + )); + + $entity1 = new SingleIntIdEntity(1, null); + + $this->validator->validate($entity1, $constraint); + } + + public function testNoValidationIfFirstFieldIsNullAndNullValuesAreIgnored() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name', 'name2'), + 'em' => self::EM_NAME, + 'ignoreNull' => true, + )); + + $entity1 = new DoubleNullableNameEntity(1, null, 'Foo'); + $entity2 = new DoubleNullableNameEntity(2, null, 'Foo'); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + + $this->em->persist($entity1); + $this->em->flush(); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + + $this->validator->validate($entity2, $constraint); + + $this->assertNoViolation(); + } + + public function testValidateUniquenessWithValidCustomErrorPath() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name', 'name2'), + 'em' => self::EM_NAME, + 'errorPath' => 'name2', + )); + + $entity1 = new DoubleNameEntity(1, 'Foo', 'Bar'); + $entity2 = new DoubleNameEntity(2, 'Foo', 'Bar'); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + + $this->em->persist($entity1); + $this->em->flush(); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + + $this->validator->validate($entity2, $constraint); + + $this->buildViolation('myMessage') + ->atPath('property.path.name2') + ->setParameter('{{ value }}', '"Bar"') + ->setInvalidValue('Bar') + ->setCode(UniqueEntity::NOT_UNIQUE_ERROR) + ->assertRaised(); + } + + public function testValidateUniquenessUsingCustomRepositoryMethod() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name'), + 'em' => self::EM_NAME, + 'repositoryMethod' => 'findByCustom', + )); + + $repository = $this->createRepositoryMock(); + $repository->expects($this->once()) + ->method('findByCustom') + ->will($this->returnValue(array())) + ; + $this->em = $this->createEntityManagerMock($repository); + $this->registry = $this->createRegistryMock($this->em); + $this->validator = $this->createValidator(); + $this->validator->initialize($this->context); + + $entity1 = new SingleIntIdEntity(1, 'foo'); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + } + + public function testValidateUniquenessWithUnrewoundArray() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name'), + 'em' => self::EM_NAME, + 'repositoryMethod' => 'findByCustom', + )); + + $entity = new SingleIntIdEntity(1, 'foo'); + + $repository = $this->createRepositoryMock(); + $repository->expects($this->once()) + ->method('findByCustom') + ->will( + $this->returnCallback(function () use ($entity) { + $returnValue = array( + $entity, + ); + next($returnValue); + + return $returnValue; + }) + ) + ; + $this->em = $this->createEntityManagerMock($repository); + $this->registry = $this->createRegistryMock($this->em); + $this->validator = $this->createValidator(); + $this->validator->initialize($this->context); + + $this->validator->validate($entity, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider resultTypesProvider + */ + public function testValidateResultTypes($entity1, $result) + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name'), + 'em' => self::EM_NAME, + 'repositoryMethod' => 'findByCustom', + )); + + $repository = $this->createRepositoryMock(); + $repository->expects($this->once()) + ->method('findByCustom') + ->will($this->returnValue($result)) + ; + $this->em = $this->createEntityManagerMock($repository); + $this->registry = $this->createRegistryMock($this->em); + $this->validator = $this->createValidator(); + $this->validator->initialize($this->context); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + } + + public function resultTypesProvider() + { + $entity = new SingleIntIdEntity(1, 'foo'); + + return array( + array($entity, array($entity)), + array($entity, new \ArrayIterator(array($entity))), + array($entity, new ArrayCollection(array($entity))), + ); + } + + public function testAssociatedEntity() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('single'), + 'em' => self::EM_NAME, + )); + + $entity1 = new SingleIntIdEntity(1, 'foo'); + $associated = new AssociationEntity(); + $associated->single = $entity1; + $associated2 = new AssociationEntity(); + $associated2->single = $entity1; + + $this->em->persist($entity1); + $this->em->persist($associated); + $this->em->flush(); + + $this->validator->validate($associated, $constraint); + + $this->assertNoViolation(); + + $this->em->persist($associated2); + $this->em->flush(); + + $this->validator->validate($associated2, $constraint); + + $this->buildViolation('myMessage') + ->atPath('property.path.single') + ->setParameter('{{ value }}', 'object("Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity") identified by (id => 1)') + ->setInvalidValue($entity1) + ->setCode(UniqueEntity::NOT_UNIQUE_ERROR) + ->assertRaised(); + } + + public function testValidateUniquenessNotToStringEntityWithAssociatedEntity() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('single'), + 'em' => self::EM_NAME, + )); + + $entity1 = new SingleIntIdNoToStringEntity(1, 'foo'); + $associated = new AssociationEntity2(); + $associated->single = $entity1; + $associated2 = new AssociationEntity2(); + $associated2->single = $entity1; + + $this->em->persist($entity1); + $this->em->persist($associated); + $this->em->flush(); + + $this->validator->validate($associated, $constraint); + + $this->assertNoViolation(); + + $this->em->persist($associated2); + $this->em->flush(); + + $this->validator->validate($associated2, $constraint); + + $expectedValue = 'object("Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity") identified by (id => 1)'; + + $this->buildViolation('myMessage') + ->atPath('property.path.single') + ->setParameter('{{ value }}', $expectedValue) + ->setInvalidValue($entity1) + ->setCode(UniqueEntity::NOT_UNIQUE_ERROR) + ->assertRaised(); + } + + public function testAssociatedEntityWithNull() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('single'), + 'em' => self::EM_NAME, + 'ignoreNull' => false, + )); + + $associated = new AssociationEntity(); + $associated->single = null; + + $this->em->persist($associated); + $this->em->flush(); + + $this->validator->validate($associated, $constraint); + + $this->assertNoViolation(); + } + + public function testValidateUniquenessWithArrayValue() + { + $repository = $this->createRepositoryMock(); + $this->repositoryFactory->setRepository($this->em, 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity', $repository); + + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('phoneNumbers'), + 'em' => self::EM_NAME, + 'repositoryMethod' => 'findByCustom', + )); + + $entity1 = new SingleIntIdEntity(1, 'foo'); + $entity1->phoneNumbers[] = 123; + + $repository->expects($this->once()) + ->method('findByCustom') + ->will($this->returnValue(array($entity1))) + ; + + $this->em->persist($entity1); + $this->em->flush(); + + $entity2 = new SingleIntIdEntity(2, 'bar'); + $entity2->phoneNumbers[] = 123; + $this->em->persist($entity2); + $this->em->flush(); + + $this->validator->validate($entity2, $constraint); + + $this->buildViolation('myMessage') + ->atPath('property.path.phoneNumbers') + ->setParameter('{{ value }}', 'array') + ->setInvalidValue(array(123)) + ->setCode(UniqueEntity::NOT_UNIQUE_ERROR) + ->assertRaised(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + * @expectedExceptionMessage Object manager "foo" does not exist. + */ + public function testDedicatedEntityManagerNullObject() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name'), + 'em' => self::EM_NAME, + )); + + $this->em = null; + $this->registry = $this->createRegistryMock($this->em); + $this->validator = $this->createValidator(); + $this->validator->initialize($this->context); + + $entity = new SingleIntIdEntity(1, null); + + $this->validator->validate($entity, $constraint); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + * @expectedExceptionMessage Unable to find the object manager associated with an entity of class "Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity" + */ + public function testEntityManagerNullObject() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name'), + // no "em" option set + )); + + $this->em = null; + $this->registry = $this->createRegistryMock($this->em); + $this->validator = $this->createValidator(); + $this->validator->initialize($this->context); + + $entity = new SingleIntIdEntity(1, null); + + $this->validator->validate($entity, $constraint); + } + + public function testValidateInheritanceUniqueness() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name'), + 'em' => self::EM_NAME, + 'entityClass' => 'Symfony\Bridge\Doctrine\Tests\Fixtures\Person', + )); + + $entity1 = new Person(1, 'Foo'); + $entity2 = new Employee(2, 'Foo'); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + + $this->em->persist($entity1); + $this->em->flush(); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + + $this->validator->validate($entity2, $constraint); + + $this->buildViolation('myMessage') + ->atPath('property.path.name') + ->setInvalidValue('Foo') + ->setCode('23bd9dbf-6b9b-41cd-a99e-4844bcf3077f') + ->setParameters(array('{{ value }}' => '"Foo"')) + ->assertRaised(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + * @expectedExceptionMessage The "Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringIdEntity" entity repository does not support the "Symfony\Bridge\Doctrine\Tests\Fixtures\Person" entity. The entity should be an instance of or extend "Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringIdEntity". + */ + public function testInvalidateRepositoryForInheritance() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name'), + 'em' => self::EM_NAME, + 'entityClass' => 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringIdEntity', + )); + + $entity = new Person(1, 'Foo'); + $this->validator->validate($entity, $constraint); + } + + public function testValidateUniquenessWithCompositeObjectNoToStringIdEntity() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('objectOne', 'objectTwo'), + 'em' => self::EM_NAME, + )); + + $objectOne = new SingleIntIdNoToStringEntity(1, 'foo'); + $objectTwo = new SingleIntIdNoToStringEntity(2, 'bar'); + + $this->em->persist($objectOne); + $this->em->persist($objectTwo); + $this->em->flush(); + + $entity = new CompositeObjectNoToStringIdEntity($objectOne, $objectTwo); + + $this->em->persist($entity); + $this->em->flush(); + + $newEntity = new CompositeObjectNoToStringIdEntity($objectOne, $objectTwo); + + $this->validator->validate($newEntity, $constraint); + + $expectedValue = 'object("Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity") identified by (id => 1)'; + + $this->buildViolation('myMessage') + ->atPath('property.path.objectOne') + ->setParameter('{{ value }}', $expectedValue) + ->setInvalidValue($objectOne) + ->setCode(UniqueEntity::NOT_UNIQUE_ERROR) + ->assertRaised(); + } + + public function testValidateUniquenessWithCustomDoctrineTypeValue() + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name'), + 'em' => self::EM_NAME, + )); + + $existingEntity = new SingleIntIdStringWrapperNameEntity(1, new StringWrapper('foo')); + + $this->em->persist($existingEntity); + $this->em->flush(); + + $newEntity = new SingleIntIdStringWrapperNameEntity(2, new StringWrapper('foo')); + + $this->validator->validate($newEntity, $constraint); + + $expectedValue = 'object("Symfony\Bridge\Doctrine\Tests\Fixtures\Type\StringWrapper")'; + + $this->buildViolation('myMessage') + ->atPath('property.path.name') + ->setParameter('{{ value }}', $expectedValue) + ->setInvalidValue($existingEntity->name) + ->setCode(UniqueEntity::NOT_UNIQUE_ERROR) + ->assertRaised(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..c9b13dcf59960dd21c8f95e4ea321d95d8c1937f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * Constraint for the Unique Entity validator. + * + * @Annotation + * @Target({"CLASS", "ANNOTATION"}) + * + * @author Benjamin Eberlei + */ +class UniqueEntity extends Constraint +{ + const NOT_UNIQUE_ERROR = '23bd9dbf-6b9b-41cd-a99e-4844bcf3077f'; + + public $message = 'This value is already used.'; + public $service = 'doctrine.orm.validator.unique'; + public $em = null; + public $entityClass = null; + public $repositoryMethod = 'findBy'; + public $fields = array(); + public $errorPath = null; + public $ignoreNull = true; + + protected static $errorNames = array( + self::NOT_UNIQUE_ERROR => 'NOT_UNIQUE_ERROR', + ); + + public function getRequiredOptions() + { + return array('fields'); + } + + /** + * The validator must be defined as a service with this name. + * + * @return string + */ + public function validatedBy() + { + return $this->service; + } + + /** + * {@inheritdoc} + */ + public function getTargets() + { + return self::CLASS_CONSTRAINT; + } + + public function getDefaultOption() + { + return 'fields'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..c2fcb520e10fe1869862403a30a8658bff3cea0b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php @@ -0,0 +1,208 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Validator\Constraints; + +use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Persistence\ObjectManager; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\ConstraintValidator; + +/** + * Unique Entity Validator checks if one or a set of fields contain unique values. + * + * @author Benjamin Eberlei + */ +class UniqueEntityValidator extends ConstraintValidator +{ + /** + * @var ManagerRegistry + */ + private $registry; + + public function __construct(ManagerRegistry $registry) + { + $this->registry = $registry; + } + + /** + * @param object $entity + * @param Constraint $constraint + * + * @throws UnexpectedTypeException + * @throws ConstraintDefinitionException + */ + public function validate($entity, Constraint $constraint) + { + if (!$constraint instanceof UniqueEntity) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\UniqueEntity'); + } + + if (!is_array($constraint->fields) && !is_string($constraint->fields)) { + throw new UnexpectedTypeException($constraint->fields, 'array'); + } + + if (null !== $constraint->errorPath && !is_string($constraint->errorPath)) { + throw new UnexpectedTypeException($constraint->errorPath, 'string or null'); + } + + $fields = (array) $constraint->fields; + + if (0 === count($fields)) { + throw new ConstraintDefinitionException('At least one field has to be specified.'); + } + + if ($constraint->em) { + $em = $this->registry->getManager($constraint->em); + + if (!$em) { + throw new ConstraintDefinitionException(sprintf('Object manager "%s" does not exist.', $constraint->em)); + } + } else { + $em = $this->registry->getManagerForClass(get_class($entity)); + + if (!$em) { + throw new ConstraintDefinitionException(sprintf('Unable to find the object manager associated with an entity of class "%s".', get_class($entity))); + } + } + + $class = $em->getClassMetadata(get_class($entity)); + /* @var $class \Doctrine\Common\Persistence\Mapping\ClassMetadata */ + + $criteria = array(); + $hasNullValue = false; + + foreach ($fields as $fieldName) { + if (!$class->hasField($fieldName) && !$class->hasAssociation($fieldName)) { + throw new ConstraintDefinitionException(sprintf('The field "%s" is not mapped by Doctrine, so it cannot be validated for uniqueness.', $fieldName)); + } + + $fieldValue = $class->reflFields[$fieldName]->getValue($entity); + + if (null === $fieldValue) { + $hasNullValue = true; + } + + if ($constraint->ignoreNull && null === $fieldValue) { + continue; + } + + $criteria[$fieldName] = $fieldValue; + + if (null !== $criteria[$fieldName] && $class->hasAssociation($fieldName)) { + /* Ensure the Proxy is initialized before using reflection to + * read its identifiers. This is necessary because the wrapped + * getter methods in the Proxy are being bypassed. + */ + $em->initializeObject($criteria[$fieldName]); + } + } + + // validation doesn't fail if one of the fields is null and if null values should be ignored + if ($hasNullValue && $constraint->ignoreNull) { + return; + } + + // skip validation if there are no criteria (this can happen when the + // "ignoreNull" option is enabled and fields to be checked are null + if (empty($criteria)) { + return; + } + + if (null !== $constraint->entityClass) { + /* Retrieve repository from given entity name. + * We ensure the retrieved repository can handle the entity + * by checking the entity is the same, or subclass of the supported entity. + */ + $repository = $em->getRepository($constraint->entityClass); + $supportedClass = $repository->getClassName(); + + if (!$entity instanceof $supportedClass) { + throw new ConstraintDefinitionException(sprintf('The "%s" entity repository does not support the "%s" entity. The entity should be an instance of or extend "%s".', $constraint->entityClass, $class->getName(), $supportedClass)); + } + } else { + $repository = $em->getRepository(get_class($entity)); + } + + $result = $repository->{$constraint->repositoryMethod}($criteria); + + if ($result instanceof \IteratorAggregate) { + $result = $result->getIterator(); + } + + /* If the result is a MongoCursor, it must be advanced to the first + * element. Rewinding should have no ill effect if $result is another + * iterator implementation. + */ + if ($result instanceof \Iterator) { + $result->rewind(); + } elseif (is_array($result)) { + reset($result); + } + + /* If no entity matched the query criteria or a single entity matched, + * which is the same as the entity being validated, the criteria is + * unique. + */ + if (0 === count($result) || (1 === count($result) && $entity === ($result instanceof \Iterator ? $result->current() : current($result)))) { + return; + } + + $errorPath = null !== $constraint->errorPath ? $constraint->errorPath : $fields[0]; + $invalidValue = isset($criteria[$errorPath]) ? $criteria[$errorPath] : $criteria[$fields[0]]; + + $this->context->buildViolation($constraint->message) + ->atPath($errorPath) + ->setParameter('{{ value }}', $this->formatWithIdentifiers($em, $class, $invalidValue)) + ->setInvalidValue($invalidValue) + ->setCode(UniqueEntity::NOT_UNIQUE_ERROR) + ->addViolation(); + } + + private function formatWithIdentifiers(ObjectManager $em, ClassMetadata $class, $value) + { + if (!is_object($value) || $value instanceof \DateTimeInterface) { + return $this->formatValue($value, self::PRETTY_DATE); + } + + if ($class->getName() !== $idClass = get_class($value)) { + // non unique value might be a composite PK that consists of other entity objects + if ($em->getMetadataFactory()->hasMetadataFor($idClass)) { + $identifiers = $em->getClassMetadata($idClass)->getIdentifierValues($value); + } else { + // this case might happen if the non unique column has a custom doctrine type and its value is an object + // in which case we cannot get any identifiers for it + $identifiers = array(); + } + } else { + $identifiers = $class->getIdentifierValues($value); + } + + if (!$identifiers) { + return sprintf('object("%s")', $idClass); + } + + array_walk($identifiers, function (&$id, $field) { + if (!is_object($id) || $id instanceof \DateTimeInterface) { + $idAsString = $this->formatValue($id, self::PRETTY_DATE); + } else { + $idAsString = sprintf('object("%s")', get_class($id)); + } + + $id = sprintf('%s => %s', $field, $idAsString); + }); + + return sprintf('object("%s") identified by (%s)', $idClass, implode(', ', $identifiers)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/DoctrineInitializer.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/DoctrineInitializer.php new file mode 100644 index 0000000000000000000000000000000000000000..42cafdd1294727bb6ea75090627ae70704270334 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/DoctrineInitializer.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Validator; + +use Doctrine\Common\Persistence\ManagerRegistry; +use Symfony\Component\Validator\ObjectInitializerInterface; + +/** + * Automatically loads proxy object before validation. + * + * @author Fabien Potencier + */ +class DoctrineInitializer implements ObjectInitializerInterface +{ + protected $registry; + + public function __construct(ManagerRegistry $registry) + { + $this->registry = $registry; + } + + public function initialize($object) + { + $manager = $this->registry->getManagerForClass(get_class($object)); + if (null !== $manager) { + $manager->initializeObject($object); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/composer.json b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..583eff0aad2bb7bf673544e23033de7e562ad6b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/composer.json @@ -0,0 +1,62 @@ +{ + "name": "symfony/doctrine-bridge", + "type": "symfony-bridge", + "description": "Symfony Doctrine Bridge", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "doctrine/common": "~2.4", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/stopwatch": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/form": "^3.2.5", + "symfony/http-kernel": "~2.8|~3.0", + "symfony/property-access": "~2.8|~3.0", + "symfony/property-info": "~2.8|3.0", + "symfony/proxy-manager-bridge": "~2.8|~3.0", + "symfony/security": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/validator": "^2.8.18|^3.2.5", + "symfony/translation": "~2.8|~3.0", + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": "~2.4", + "doctrine/orm": "^2.4.5" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "suggest": { + "symfony/form": "", + "symfony/validator": "", + "symfony/property-info": "", + "doctrine/data-fixtures": "", + "doctrine/dbal": "", + "doctrine/orm": "" + }, + "autoload": { + "psr-4": { "Symfony\\Bridge\\Doctrine\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..c006d232219a49a81b423405e3b8f923122b797e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..cb7deea2e90521d89ac4197d750ef09f006e231a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/CHANGELOG.md @@ -0,0 +1,19 @@ +CHANGELOG +========= + +3.0.0 +----- + + * deprecated interface `Symfony\Component\HttpKernel\Log\LoggerInterface` has been removed + * deprecated methods `Logger::crit()`, `Logger::emerg()`, `Logger::err()` and `Logger::warn()` have been removed + +2.4.0 +----- + + * added ConsoleHandler and ConsoleFormatter which can be used to show log messages + in the console output depending on the verbosity settings + +2.1.0 +----- + + * added ChromePhpHandler diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..1af93bc97aebe57979f0fdbcdbd2620d87f5b138 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Monolog\Formatter; + +use Monolog\Formatter\LineFormatter; +use Monolog\Logger; + +/** + * Formats incoming records for console output by coloring them depending on log level. + * + * @author Tobias Schultze + */ +class ConsoleFormatter extends LineFormatter +{ + const SIMPLE_FORMAT = "%start_tag%[%datetime%] %channel%.%level_name%:%end_tag% %message% %context% %extra%\n"; + + /** + * {@inheritdoc} + */ + public function __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = false, $ignoreEmptyContextAndExtra = true) + { + parent::__construct($format, $dateFormat, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra); + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + if ($record['level'] >= Logger::ERROR) { + $record['start_tag'] = ''; + $record['end_tag'] = ''; + } elseif ($record['level'] >= Logger::NOTICE) { + $record['start_tag'] = ''; + $record['end_tag'] = ''; + } elseif ($record['level'] >= Logger::INFO) { + $record['start_tag'] = ''; + $record['end_tag'] = ''; + } else { + $record['start_tag'] = ''; + $record['end_tag'] = ''; + } + + return parent::format($record); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..2636bc3b8980e4cbe752cdd930c307c5a4066e8b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Monolog\Handler; + +use Monolog\Handler\ChromePHPHandler as BaseChromePhpHandler; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; + +/** + * ChromePhpHandler. + * + * @author Christophe Coevoet + */ +class ChromePhpHandler extends BaseChromePhpHandler +{ + /** + * @var array + */ + private $headers = array(); + + /** + * @var Response + */ + private $response; + + /** + * Adds the headers to the response once it's created. + */ + public function onKernelResponse(FilterResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + + if (!preg_match('{\b(?:Chrome/\d+(?:\.\d+)*|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}', $event->getRequest()->headers->get('User-Agent'))) { + $this->sendHeaders = false; + $this->headers = array(); + + return; + } + + $this->response = $event->getResponse(); + foreach ($this->headers as $header => $content) { + $this->response->headers->set($header, $content); + } + $this->headers = array(); + } + + /** + * {@inheritdoc} + */ + protected function sendHeader($header, $content) + { + if (!$this->sendHeaders) { + return; + } + + if ($this->response) { + $this->response->headers->set($header, $content); + } else { + $this->headers[$header] = $content; + } + } + + /** + * Override default behavior since we check it in onKernelResponse. + */ + protected function headersAccepted() + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..24c79397cf9a23fee433abed6fb1b2b7dbdfc7fa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php @@ -0,0 +1,190 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Monolog\Handler; + +use Monolog\Handler\AbstractProcessingHandler; +use Monolog\Logger; +use Symfony\Bridge\Monolog\Formatter\ConsoleFormatter; +use Symfony\Component\Console\ConsoleEvents; +use Symfony\Component\Console\Event\ConsoleCommandEvent; +use Symfony\Component\Console\Event\ConsoleTerminateEvent; +use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Writes logs to the console output depending on its verbosity setting. + * + * It is disabled by default and gets activated as soon as a command is executed. + * Instead of listening to the console events, the output can also be set manually. + * + * The minimum logging level at which this handler will be triggered depends on the + * verbosity setting of the console output. The default mapping is: + * - OutputInterface::VERBOSITY_NORMAL will show all WARNING and higher logs + * - OutputInterface::VERBOSITY_VERBOSE (-v) will show all NOTICE and higher logs + * - OutputInterface::VERBOSITY_VERY_VERBOSE (-vv) will show all INFO and higher logs + * - OutputInterface::VERBOSITY_DEBUG (-vvv) will show all DEBUG and higher logs, i.e. all logs + * + * This mapping can be customized with the $verbosityLevelMap constructor parameter. + * + * @author Tobias Schultze + */ +class ConsoleHandler extends AbstractProcessingHandler implements EventSubscriberInterface +{ + /** + * @var OutputInterface|null + */ + private $output; + + /** + * @var array + */ + private $verbosityLevelMap = array( + OutputInterface::VERBOSITY_QUIET => Logger::ERROR, + OutputInterface::VERBOSITY_NORMAL => Logger::WARNING, + OutputInterface::VERBOSITY_VERBOSE => Logger::NOTICE, + OutputInterface::VERBOSITY_VERY_VERBOSE => Logger::INFO, + OutputInterface::VERBOSITY_DEBUG => Logger::DEBUG, + ); + + /** + * Constructor. + * + * @param OutputInterface|null $output The console output to use (the handler remains disabled when passing null + * until the output is set, e.g. by using console events) + * @param bool $bubble Whether the messages that are handled can bubble up the stack + * @param array $verbosityLevelMap Array that maps the OutputInterface verbosity to a minimum logging + * level (leave empty to use the default mapping) + */ + public function __construct(OutputInterface $output = null, $bubble = true, array $verbosityLevelMap = array()) + { + parent::__construct(Logger::DEBUG, $bubble); + $this->output = $output; + + if ($verbosityLevelMap) { + $this->verbosityLevelMap = $verbosityLevelMap; + } + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return $this->updateLevel() && parent::isHandling($record); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + // we have to update the logging level each time because the verbosity of the + // console output might have changed in the meantime (it is not immutable) + return $this->updateLevel() && parent::handle($record); + } + + /** + * Sets the console output to use for printing logs. + * + * @param OutputInterface $output The console output to use + */ + public function setOutput(OutputInterface $output) + { + $this->output = $output; + } + + /** + * Disables the output. + */ + public function close() + { + $this->output = null; + + parent::close(); + } + + /** + * Before a command is executed, the handler gets activated and the console output + * is set in order to know where to write the logs. + * + * @param ConsoleCommandEvent $event + */ + public function onCommand(ConsoleCommandEvent $event) + { + $output = $event->getOutput(); + if ($output instanceof ConsoleOutputInterface) { + $output = $output->getErrorOutput(); + } + + $this->setOutput($output); + } + + /** + * After a command has been executed, it disables the output. + * + * @param ConsoleTerminateEvent $event + */ + public function onTerminate(ConsoleTerminateEvent $event) + { + $this->close(); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents() + { + return array( + ConsoleEvents::COMMAND => array('onCommand', 255), + ConsoleEvents::TERMINATE => array('onTerminate', -255), + ); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + // at this point we've determined for sure that we want to output the record, so use the output's own verbosity + $this->output->write((string) $record['formatted'], false, $this->output->getVerbosity()); + } + + /** + * {@inheritdoc} + */ + protected function getDefaultFormatter() + { + return new ConsoleFormatter(); + } + + /** + * Updates the logging level based on the verbosity setting of the console output. + * + * @return bool Whether the handler is enabled and verbosity is not set to quiet + */ + private function updateLevel() + { + if (null === $this->output) { + return false; + } + + $verbosity = $this->output->getVerbosity(); + if (isset($this->verbosityLevelMap[$verbosity])) { + $this->setLevel($this->verbosityLevelMap[$verbosity]); + } else { + $this->setLevel(Logger::DEBUG); + } + + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..6032750ff6422243ce210b22fd9bb7060d5a5fd0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Monolog\Handler; + +@trigger_error('The '.__NAMESPACE__.'\DebugHandler class is deprecated since version 3.2 and will be removed in 4.0. Use Symfony\Bridge\Monolog\Processor\DebugProcessor instead.', E_USER_DEPRECATED); + +use Monolog\Logger; +use Monolog\Handler\TestHandler; +use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; + +/** + * DebugLogger. + * + * @author Jordi Boggiano + * + * @deprecated since version 3.2, to be removed in 4.0. Use Symfony\Bridge\Monolog\Processor\DebugProcessor instead. + */ +class DebugHandler extends TestHandler implements DebugLoggerInterface +{ + /** + * {@inheritdoc} + */ + public function getLogs() + { + $records = array(); + foreach ($this->records as $record) { + $records[] = array( + 'timestamp' => $record['datetime']->getTimestamp(), + 'message' => $record['message'], + 'priority' => $record['level'], + 'priorityName' => $record['level_name'], + 'context' => $record['context'], + 'channel' => isset($record['channel']) ? $record['channel'] : '', + ); + } + + return $records; + } + + /** + * {@inheritdoc} + */ + public function countErrors() + { + $cnt = 0; + $levels = array(Logger::ERROR, Logger::CRITICAL, Logger::ALERT, Logger::EMERGENCY); + foreach ($levels as $level) { + if (isset($this->recordsByLevel[$level])) { + $cnt += count($this->recordsByLevel[$level]); + } + } + + return $cnt; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/FingersCrossed/NotFoundActivationStrategy.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/FingersCrossed/NotFoundActivationStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..413b476f2938db2406f42cabd8ddd79df8bee236 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/FingersCrossed/NotFoundActivationStrategy.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\Bridge\Monolog\Handler\FingersCrossed; + +use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; +use Symfony\Component\HttpKernel\Exception\HttpException; +use Symfony\Component\HttpFoundation\RequestStack; + +/** + * Activation strategy that ignores 404s for certain URLs. + * + * @author Jordi Boggiano + * @author Fabien Potencier + */ +class NotFoundActivationStrategy extends ErrorLevelActivationStrategy +{ + private $blacklist; + private $requestStack; + + public function __construct(RequestStack $requestStack, array $excludedUrls, $actionLevel) + { + parent::__construct($actionLevel); + + $this->requestStack = $requestStack; + $this->blacklist = '{('.implode('|', $excludedUrls).')}i'; + } + + public function isHandlerActivated(array $record) + { + $isActivated = parent::isHandlerActivated($record); + + if ( + $isActivated + && isset($record['context']['exception']) + && $record['context']['exception'] instanceof HttpException + && $record['context']['exception']->getStatusCode() == 404 + && ($request = $this->requestStack->getMasterRequest()) + ) { + return !preg_match($this->blacklist, $request->getPathInfo()); + } + + return $isActivated; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..339843c1d4ff5e87fb3bc91204b1a9ceb9e2a6ce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Monolog\Handler; + +use Monolog\Handler\FirePHPHandler as BaseFirePHPHandler; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpFoundation\Response; + +/** + * FirePHPHandler. + * + * @author Jordi Boggiano + */ +class FirePHPHandler extends BaseFirePHPHandler +{ + /** + * @var array + */ + private $headers = array(); + + /** + * @var Response + */ + private $response; + + /** + * Adds the headers to the response once it's created. + */ + public function onKernelResponse(FilterResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + + if (!preg_match('{\bFirePHP/\d+\.\d+\b}', $event->getRequest()->headers->get('User-Agent')) + && !$event->getRequest()->headers->has('X-FirePHP-Version')) { + $this->sendHeaders = false; + $this->headers = array(); + + return; + } + + $this->response = $event->getResponse(); + foreach ($this->headers as $header => $content) { + $this->response->headers->set($header, $content); + } + $this->headers = array(); + } + + /** + * {@inheritdoc} + */ + protected function sendHeader($header, $content) + { + if (!$this->sendHeaders) { + return; + } + + if ($this->response) { + $this->response->headers->set($header, $content); + } else { + $this->headers[$header] = $content; + } + } + + /** + * Override default behavior since we check the user agent in onKernelResponse. + */ + protected function headersAccepted() + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..0412e94f223a305548e18159bed74fa7ec1a883a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Monolog\Handler; + +use Monolog\Handler\SwiftMailerHandler as BaseSwiftMailerHandler; +use Symfony\Component\Console\Event\ConsoleTerminateEvent; +use Symfony\Component\HttpKernel\Event\PostResponseEvent; + +/** + * Extended SwiftMailerHandler that flushes mail queue if necessary. + * + * @author Philipp Kräutli + */ +class SwiftMailerHandler extends BaseSwiftMailerHandler +{ + protected $transport; + + protected $instantFlush = false; + + /** + * @param \Swift_Transport $transport + */ + public function setTransport(\Swift_Transport $transport) + { + $this->transport = $transport; + } + + /** + * After the kernel has been terminated we will always flush messages. + * + * @param PostResponseEvent $event + */ + public function onKernelTerminate(PostResponseEvent $event) + { + $this->instantFlush = true; + } + + /** + * After the CLI application has been terminated we will always flush messages. + * + * @param ConsoleTerminateEvent $event + */ + public function onCliTerminate(ConsoleTerminateEvent $event) + { + $this->instantFlush = true; + } + + /** + * {@inheritdoc} + */ + protected function send($content, array $records) + { + parent::send($content, $records); + + if ($this->instantFlush) { + $this->flushMemorySpool(); + } + } + + /** + * Flushes the mail queue if a memory spool is used. + */ + private function flushMemorySpool() + { + $mailerTransport = $this->mailer->getTransport(); + if (!$mailerTransport instanceof \Swift_Transport_SpoolTransport) { + return; + } + + $spool = $mailerTransport->getSpool(); + if (!$spool instanceof \Swift_MemorySpool) { + return; + } + + if (null === $this->transport) { + throw new \Exception('No transport available to flush mail queue'); + } + + $spool->flushQueue($this->transport); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/LICENSE b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Logger.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Logger.php new file mode 100644 index 0000000000000000000000000000000000000000..ec6434fe791b8fb9af90557bf65e836f9775c0a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Logger.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Monolog; + +use Monolog\Logger as BaseLogger; +use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; + +/** + * Logger. + * + * @author Fabien Potencier + */ +class Logger extends BaseLogger implements DebugLoggerInterface +{ + /** + * {@inheritdoc} + */ + public function getLogs() + { + if ($logger = $this->getDebugLogger()) { + return $logger->getLogs(); + } + + return array(); + } + + /** + * {@inheritdoc} + */ + public function countErrors() + { + if ($logger = $this->getDebugLogger()) { + return $logger->countErrors(); + } + + return 0; + } + + /** + * Returns a DebugLoggerInterface instance if one is registered with this logger. + * + * @return DebugLoggerInterface|null A DebugLoggerInterface instance or null if none is registered + */ + private function getDebugLogger() + { + foreach ($this->processors as $processor) { + if ($processor instanceof DebugLoggerInterface) { + return $processor; + } + } + + foreach ($this->handlers as $handler) { + if ($handler instanceof DebugLoggerInterface) { + return $handler; + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..22a4faac5cc9ac4acad1bda8e05fdfc9ab95d685 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Processor/DebugProcessor.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\Bridge\Monolog\Processor; + +use Monolog\Logger; +use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; + +class DebugProcessor implements DebugLoggerInterface +{ + private $records = array(); + private $errorCount = 0; + + public function __invoke(array $record) + { + $this->records[] = array( + 'timestamp' => $record['datetime']->getTimestamp(), + 'message' => $record['message'], + 'priority' => $record['level'], + 'priorityName' => $record['level_name'], + 'context' => $record['context'], + 'channel' => isset($record['channel']) ? $record['channel'] : '', + ); + switch ($record['level']) { + case Logger::ERROR: + case Logger::CRITICAL: + case Logger::ALERT: + case Logger::EMERGENCY: + ++$this->errorCount; + } + + return $record; + } + + /** + * {@inheritdoc} + */ + public function getLogs() + { + return $this->records; + } + + /** + * {@inheritdoc} + */ + public function countErrors() + { + return $this->errorCount; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Processor/WebProcessor.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Processor/WebProcessor.php new file mode 100644 index 0000000000000000000000000000000000000000..5222258e469368efbb07e17ab3d4f5c450ce5dcb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Processor/WebProcessor.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Monolog\Processor; + +use Monolog\Processor\WebProcessor as BaseWebProcessor; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; + +/** + * WebProcessor override to read from the HttpFoundation's Request. + * + * @author Jordi Boggiano + */ +class WebProcessor extends BaseWebProcessor +{ + public function __construct(array $extraFields = null) + { + // Pass an empty array as the default null value would access $_SERVER + parent::__construct(array(), $extraFields); + } + + public function onKernelRequest(GetResponseEvent $event) + { + if ($event->isMasterRequest()) { + $this->serverData = $event->getRequest()->server->all(); + $this->serverData['REMOTE_ADDR'] = $event->getRequest()->getClientIp(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/README.md b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2d19b3e27cfd4f7cd13939bb06956faec3720eac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/README.md @@ -0,0 +1,12 @@ +Monolog Bridge +============== + +Provides integration for Monolog with various Symfony components. + +Resources +--------- + + * [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/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..60f57c39d085cf2ed846194f5534c01ba24bcc7c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php @@ -0,0 +1,202 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Monolog\Tests\Handler; + +use Monolog\Logger; +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Monolog\Handler\ConsoleHandler; +use Symfony\Component\Console\ConsoleEvents; +use Symfony\Component\Console\Event\ConsoleCommandEvent; +use Symfony\Component\Console\Event\ConsoleTerminateEvent; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Output\BufferedOutput; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\Console\Command\Command; + +/** + * Tests the ConsoleHandler and also the ConsoleFormatter. + * + * @author Tobias Schultze + */ +class ConsoleHandlerTest extends TestCase +{ + public function testConstructor() + { + $handler = new ConsoleHandler(null, false); + $this->assertFalse($handler->getBubble(), 'the bubble parameter gets propagated'); + } + + public function testIsHandling() + { + $handler = new ConsoleHandler(); + $this->assertFalse($handler->isHandling(array()), '->isHandling returns false when no output is set'); + } + + /** + * @dataProvider provideVerbosityMappingTests + */ + public function testVerbosityMapping($verbosity, $level, $isHandling, array $map = array()) + { + $output = $this->getMockBuilder('Symfony\Component\Console\Output\OutputInterface')->getMock(); + $output + ->expects($this->atLeastOnce()) + ->method('getVerbosity') + ->will($this->returnValue($verbosity)) + ; + $handler = new ConsoleHandler($output, true, $map); + $this->assertSame($isHandling, $handler->isHandling(array('level' => $level)), + '->isHandling returns correct value depending on console verbosity and log level' + ); + + // check that the handler actually outputs the record if it handles it + $levelName = Logger::getLevelName($level); + + $realOutput = $this->getMockBuilder('Symfony\Component\Console\Output\Output')->setMethods(array('doWrite'))->getMock(); + $realOutput->setVerbosity($verbosity); + $realOutput + ->expects($isHandling ? $this->once() : $this->never()) + ->method('doWrite') + ->with("[2013-05-29 16:21:54] app.$levelName: My info message \n", false); + $handler = new ConsoleHandler($realOutput, true, $map); + + $infoRecord = array( + 'message' => 'My info message', + 'context' => array(), + 'level' => $level, + 'level_name' => Logger::getLevelName($level), + 'channel' => 'app', + 'datetime' => new \DateTime('2013-05-29 16:21:54'), + 'extra' => array(), + ); + $this->assertFalse($handler->handle($infoRecord), 'The handler finished handling the log.'); + } + + public function provideVerbosityMappingTests() + { + return array( + array(OutputInterface::VERBOSITY_QUIET, Logger::ERROR, true), + array(OutputInterface::VERBOSITY_QUIET, Logger::WARNING, false), + array(OutputInterface::VERBOSITY_NORMAL, Logger::WARNING, true), + array(OutputInterface::VERBOSITY_NORMAL, Logger::NOTICE, false), + array(OutputInterface::VERBOSITY_VERBOSE, Logger::NOTICE, true), + array(OutputInterface::VERBOSITY_VERBOSE, Logger::INFO, false), + array(OutputInterface::VERBOSITY_VERY_VERBOSE, Logger::INFO, true), + array(OutputInterface::VERBOSITY_VERY_VERBOSE, Logger::DEBUG, false), + array(OutputInterface::VERBOSITY_DEBUG, Logger::DEBUG, true), + array(OutputInterface::VERBOSITY_DEBUG, Logger::EMERGENCY, true), + array(OutputInterface::VERBOSITY_NORMAL, Logger::NOTICE, true, array( + OutputInterface::VERBOSITY_NORMAL => Logger::NOTICE, + )), + array(OutputInterface::VERBOSITY_DEBUG, Logger::NOTICE, true, array( + OutputInterface::VERBOSITY_NORMAL => Logger::NOTICE, + )), + ); + } + + public function testVerbosityChanged() + { + $output = $this->getMockBuilder('Symfony\Component\Console\Output\OutputInterface')->getMock(); + $output + ->expects($this->at(0)) + ->method('getVerbosity') + ->will($this->returnValue(OutputInterface::VERBOSITY_QUIET)) + ; + $output + ->expects($this->at(1)) + ->method('getVerbosity') + ->will($this->returnValue(OutputInterface::VERBOSITY_DEBUG)) + ; + $handler = new ConsoleHandler($output); + $this->assertFalse($handler->isHandling(array('level' => Logger::NOTICE)), + 'when verbosity is set to quiet, the handler does not handle the log' + ); + $this->assertTrue($handler->isHandling(array('level' => Logger::NOTICE)), + 'since the verbosity of the output increased externally, the handler is now handling the log' + ); + } + + public function testGetFormatter() + { + $handler = new ConsoleHandler(); + $this->assertInstanceOf('Symfony\Bridge\Monolog\Formatter\ConsoleFormatter', $handler->getFormatter(), + '-getFormatter returns ConsoleFormatter by default' + ); + } + + public function testWritingAndFormatting() + { + $output = $this->getMockBuilder('Symfony\Component\Console\Output\OutputInterface')->getMock(); + $output + ->expects($this->any()) + ->method('getVerbosity') + ->will($this->returnValue(OutputInterface::VERBOSITY_DEBUG)) + ; + $output + ->expects($this->once()) + ->method('write') + ->with('[2013-05-29 16:21:54] app.INFO: My info message '."\n") + ; + + $handler = new ConsoleHandler(null, false); + $handler->setOutput($output); + + $infoRecord = array( + 'message' => 'My info message', + 'context' => array(), + 'level' => Logger::INFO, + 'level_name' => Logger::getLevelName(Logger::INFO), + 'channel' => 'app', + 'datetime' => new \DateTime('2013-05-29 16:21:54'), + 'extra' => array(), + ); + + $this->assertTrue($handler->handle($infoRecord), 'The handler finished handling the log as bubble is false.'); + } + + public function testLogsFromListeners() + { + $output = new BufferedOutput(); + $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); + + $handler = new ConsoleHandler(null, false); + + $logger = new Logger('app'); + $logger->pushHandler($handler); + + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(ConsoleEvents::COMMAND, function () use ($logger) { + $logger->addInfo('Before command message.'); + }); + $dispatcher->addListener(ConsoleEvents::TERMINATE, function () use ($logger) { + $logger->addInfo('Before terminate message.'); + }); + + $dispatcher->addSubscriber($handler); + + $dispatcher->addListener(ConsoleEvents::COMMAND, function () use ($logger) { + $logger->addInfo('After command message.'); + }); + $dispatcher->addListener(ConsoleEvents::TERMINATE, function () use ($logger) { + $logger->addInfo('After terminate message.'); + }); + + $event = new ConsoleCommandEvent(new Command('foo'), $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock(), $output); + $dispatcher->dispatch(ConsoleEvents::COMMAND, $event); + $this->assertContains('Before command message.', $out = $output->fetch()); + $this->assertContains('After command message.', $out); + + $event = new ConsoleTerminateEvent(new Command('foo'), $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock(), $output, 0); + $dispatcher->dispatch(ConsoleEvents::TERMINATE, $event); + $this->assertContains('Before terminate message.', $out = $output->fetch()); + $this->assertContains('After terminate message.', $out); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3c34f065eb0381ff1d9bd8efe54139aa971a8723 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Monolog\Tests\Handler\FingersCrossed; + +use Monolog\Logger; +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Monolog\Handler\FingersCrossed\NotFoundActivationStrategy; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpKernel\Exception\HttpException; + +class NotFoundActivationStrategyTest extends TestCase +{ + /** + * @dataProvider isActivatedProvider + */ + public function testIsActivated($url, $record, $expected) + { + $requestStack = new RequestStack(); + $requestStack->push(Request::create($url)); + + $strategy = new NotFoundActivationStrategy($requestStack, array('^/foo', 'bar'), Logger::WARNING); + + $this->assertEquals($expected, $strategy->isHandlerActivated($record)); + } + + public function isActivatedProvider() + { + return array( + array('/test', array('level' => Logger::DEBUG), false), + array('/foo', array('level' => Logger::DEBUG, 'context' => $this->getContextException(404)), false), + array('/baz/bar', array('level' => Logger::ERROR, 'context' => $this->getContextException(404)), false), + array('/foo', array('level' => Logger::ERROR, 'context' => $this->getContextException(404)), false), + array('/foo', array('level' => Logger::ERROR, 'context' => $this->getContextException(500)), true), + + array('/test', array('level' => Logger::ERROR), true), + array('/baz', array('level' => Logger::ERROR, 'context' => $this->getContextException(404)), true), + array('/baz', array('level' => Logger::ERROR, 'context' => $this->getContextException(500)), true), + ); + } + + protected function getContextException($code) + { + return array('exception' => new HttpException($code)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Tests/LoggerTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Tests/LoggerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c24c7a4133baf0c8332fcdbcbc01a0b10de44c01 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Tests/LoggerTest.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Monolog\Tests; + +use Monolog\Handler\TestHandler; +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Monolog\Handler\DebugHandler; +use Symfony\Bridge\Monolog\Processor\DebugProcessor; +use Symfony\Bridge\Monolog\Logger; + +class LoggerTest extends TestCase +{ + /** + * @group legacy + */ + public function testGetLogsWithDebugHandler() + { + $handler = new DebugHandler(); + $logger = new Logger(__METHOD__, array($handler)); + + $this->assertTrue($logger->error('error message')); + $this->assertSame(1, count($logger->getLogs())); + } + + public function testGetLogsWithoutDebugProcessor() + { + $handler = new TestHandler(); + $logger = new Logger(__METHOD__, array($handler)); + + $this->assertTrue($logger->error('error message')); + $this->assertSame(array(), $logger->getLogs()); + } + + /** + * @group legacy + */ + public function testCountErrorsWithDebugHandler() + { + $handler = new DebugHandler(); + $logger = new Logger(__METHOD__, array($handler)); + + $this->assertTrue($logger->debug('test message')); + $this->assertTrue($logger->info('test message')); + $this->assertTrue($logger->notice('test message')); + $this->assertTrue($logger->warning('test message')); + + $this->assertTrue($logger->error('test message')); + $this->assertTrue($logger->critical('test message')); + $this->assertTrue($logger->alert('test message')); + $this->assertTrue($logger->emergency('test message')); + + $this->assertSame(4, $logger->countErrors()); + } + + /** + * @group legacy + */ + public function testGetLogsWithDebugHandler2() + { + $logger = new Logger('test'); + $logger->pushHandler(new DebugHandler()); + + $logger->addInfo('test'); + $this->assertCount(1, $logger->getLogs()); + list($record) = $logger->getLogs(); + + $this->assertEquals('test', $record['message']); + $this->assertEquals(Logger::INFO, $record['priority']); + } + + public function testCountErrorsWithoutDebugProcessor() + { + $handler = new TestHandler(); + $logger = new Logger(__METHOD__, array($handler)); + + $this->assertTrue($logger->error('error message')); + $this->assertSame(0, $logger->countErrors()); + } + + public function testGetLogsWithDebugProcessor() + { + $handler = new TestHandler(); + $processor = new DebugProcessor(); + $logger = new Logger(__METHOD__, array($handler), array($processor)); + + $this->assertTrue($logger->error('error message')); + $this->assertSame(1, count($logger->getLogs())); + } + + public function testCountErrorsWithDebugProcessor() + { + $handler = new TestHandler(); + $processor = new DebugProcessor(); + $logger = new Logger(__METHOD__, array($handler), array($processor)); + + $this->assertTrue($logger->debug('test message')); + $this->assertTrue($logger->info('test message')); + $this->assertTrue($logger->notice('test message')); + $this->assertTrue($logger->warning('test message')); + + $this->assertTrue($logger->error('test message')); + $this->assertTrue($logger->critical('test message')); + $this->assertTrue($logger->alert('test message')); + $this->assertTrue($logger->emergency('test message')); + + $this->assertSame(4, $logger->countErrors()); + } + + public function testGetLogsWithDebugProcessor2() + { + $handler = new TestHandler(); + $logger = new Logger('test', array($handler)); + $logger->pushProcessor(new DebugProcessor()); + + $logger->addInfo('test'); + $this->assertCount(1, $logger->getLogs()); + list($record) = $logger->getLogs(); + + $this->assertEquals('test', $record['message']); + $this->assertEquals(Logger::INFO, $record['priority']); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Tests/Processor/WebProcessorTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Tests/Processor/WebProcessorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..51bddd1d9828cf9c41f4e7019de154de87962651 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Tests/Processor/WebProcessorTest.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\Monolog\Tests\Processor; + +use Monolog\Logger; +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Monolog\Processor\WebProcessor; +use Symfony\Component\HttpFoundation\Request; + +class WebProcessorTest extends TestCase +{ + public function testUsesRequestServerData() + { + list($event, $server) = $this->createRequestEvent(); + + $processor = new WebProcessor(); + $processor->onKernelRequest($event); + $record = $processor($this->getRecord()); + + $this->assertCount(5, $record['extra']); + $this->assertEquals($server['REQUEST_URI'], $record['extra']['url']); + $this->assertEquals($server['REMOTE_ADDR'], $record['extra']['ip']); + $this->assertEquals($server['REQUEST_METHOD'], $record['extra']['http_method']); + $this->assertEquals($server['SERVER_NAME'], $record['extra']['server']); + $this->assertEquals($server['HTTP_REFERER'], $record['extra']['referrer']); + } + + public function testUseRequestClientIp() + { + Request::setTrustedProxies(array('192.168.0.1')); + list($event, $server) = $this->createRequestEvent(array('X_FORWARDED_FOR' => '192.168.0.2')); + + $processor = new WebProcessor(); + $processor->onKernelRequest($event); + $record = $processor($this->getRecord()); + + $this->assertCount(5, $record['extra']); + $this->assertEquals($server['REQUEST_URI'], $record['extra']['url']); + $this->assertEquals($server['X_FORWARDED_FOR'], $record['extra']['ip']); + $this->assertEquals($server['REQUEST_METHOD'], $record['extra']['http_method']); + $this->assertEquals($server['SERVER_NAME'], $record['extra']['server']); + $this->assertEquals($server['HTTP_REFERER'], $record['extra']['referrer']); + } + + public function testCanBeConstructedWithExtraFields() + { + if (!$this->isExtraFieldsSupported()) { + $this->markTestSkipped('WebProcessor of the installed Monolog version does not support $extraFields parameter'); + } + + list($event, $server) = $this->createRequestEvent(); + + $processor = new WebProcessor(array('url', 'referrer')); + $processor->onKernelRequest($event); + $record = $processor($this->getRecord()); + + $this->assertCount(2, $record['extra']); + $this->assertEquals($server['REQUEST_URI'], $record['extra']['url']); + $this->assertEquals($server['HTTP_REFERER'], $record['extra']['referrer']); + } + + /** + * @return array + */ + private function createRequestEvent($additionalServerParameters = array()) + { + $server = array_merge( + array( + 'REQUEST_URI' => 'A', + 'REMOTE_ADDR' => '192.168.0.1', + 'REQUEST_METHOD' => 'C', + 'SERVER_NAME' => 'D', + 'HTTP_REFERER' => 'E', + ), + $additionalServerParameters + ); + + $request = new Request(); + $request->server->replace($server); + $request->headers->replace($server); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') + ->disableOriginalConstructor() + ->getMock(); + $event->expects($this->any()) + ->method('isMasterRequest') + ->will($this->returnValue(true)); + $event->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)); + + return array($event, $server); + } + + /** + * @param int $level + * @param string $message + * + * @return array Record + */ + private function getRecord($level = Logger::WARNING, $message = 'test') + { + return array( + 'message' => $message, + 'context' => array(), + 'level' => $level, + 'level_name' => Logger::getLevelName($level), + 'channel' => 'test', + 'datetime' => new \DateTime(), + 'extra' => array(), + ); + } + + private function isExtraFieldsSupported() + { + $monologWebProcessorClass = new \ReflectionClass('Monolog\Processor\WebProcessor'); + + foreach ($monologWebProcessorClass->getConstructor()->getParameters() as $parameter) { + if ('extraFields' === $parameter->getName()) { + return true; + } + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/composer.json b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..be0c3a529b46ad4d1b2915ab84f477aceb43ade7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/composer.json @@ -0,0 +1,44 @@ +{ + "name": "symfony/monolog-bridge", + "type": "symfony-bridge", + "description": "Symfony Monolog Bridge", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "monolog/monolog": "~1.11", + "symfony/http-kernel": "~2.8|~3.0" + }, + "require-dev": { + "symfony/console": "~2.8|~3.0", + "symfony/event-dispatcher": "~2.8|~3.0" + }, + "suggest": { + "symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.", + "symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings. You need version ~2.3 of the console for it.", + "symfony/event-dispatcher": "Needed when using log messages in console commands." + }, + "autoload": { + "psr-4": { "Symfony\\Bridge\\Monolog\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..8a60f06a7a310cb2f35c71aed837e9df366421fc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/ClockMock.php b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/ClockMock.php new file mode 100644 index 0000000000000000000000000000000000000000..60d19ffc5f0c75826e9f05c9debc4c0289b56d43 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/ClockMock.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\Bridge\PhpUnit; + +/** + * @author Nicolas Grekas + */ +class ClockMock +{ + private static $now; + + public static function withClockMock($enable = null) + { + if (null === $enable) { + return null !== self::$now; + } + + self::$now = is_numeric($enable) ? (float) $enable : ($enable ? microtime(true) : null); + } + + public static function time() + { + if (null === self::$now) { + return \time(); + } + + return (int) self::$now; + } + + public static function sleep($s) + { + if (null === self::$now) { + return \sleep($s); + } + + self::$now += (int) $s; + + return 0; + } + + public static function usleep($us) + { + if (null === self::$now) { + return \usleep($us); + } + + self::$now += $us / 1000000; + } + + public static function microtime($asFloat = false) + { + if (null === self::$now) { + return \microtime($asFloat); + } + + if ($asFloat) { + return self::$now; + } + + return sprintf("%0.6f %d\n", self::$now - (int) self::$now, (int) self::$now); + } + + public static function register($class) + { + $self = get_called_class(); + + $mockedNs = array(substr($class, 0, strrpos($class, '\\'))); + if (0 < strpos($class, '\\Tests\\')) { + $ns = str_replace('\\Tests\\', '\\', $class); + $mockedNs[] = substr($ns, 0, strrpos($ns, '\\')); + } elseif (0 === strpos($class, 'Tests\\')) { + $mockedNs[] = substr($class, 6, strrpos($class, '\\') - 6); + } + foreach ($mockedNs as $ns) { + if (function_exists($ns.'\time')) { + continue; + } + eval(<< + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit; + +/** + * Catch deprecation notices and print a summary report at the end of the test suite. + * + * @author Nicolas Grekas + */ +class DeprecationErrorHandler +{ + const MODE_WEAK = 'weak'; + const MODE_DISABLED = 'disabled'; + + private static $isRegistered = false; + + /** + * Registers and configures the deprecation handler. + * + * The following reporting modes are supported: + * - use "weak" to hide the deprecation report but keep a global count; + * - use "/some-regexp/" to stop the test suite whenever a deprecation + * message matches the given regular expression; + * - use a number to define the upper bound of allowed deprecations, + * making the test suite fail whenever more notices are trigerred. + * + * @param int|string|false $mode The reporting mode, defaults to not allowing any deprecations + */ + public static function register($mode = 0) + { + if (self::$isRegistered) { + return; + } + + $getMode = function () use ($mode) { + static $memoizedMode = false; + + if (false !== $memoizedMode) { + return $memoizedMode; + } + if (false === $mode) { + $mode = getenv('SYMFONY_DEPRECATIONS_HELPER'); + } + if (DeprecationErrorHandler::MODE_WEAK !== $mode && (!isset($mode[0]) || '/' !== $mode[0])) { + $mode = preg_match('/^[1-9][0-9]*$/', $mode) ? (int) $mode : 0; + } + + return $memoizedMode = $mode; + }; + + $deprecations = array( + 'unsilencedCount' => 0, + 'remainingCount' => 0, + 'legacyCount' => 0, + 'otherCount' => 0, + 'unsilenced' => array(), + 'remaining' => array(), + 'legacy' => array(), + 'other' => array(), + ); + $deprecationHandler = function ($type, $msg, $file, $line, $context) use (&$deprecations, $getMode) { + $mode = $getMode(); + if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === $mode) { + return \PHPUnit_Util_ErrorHandler::handleError($type, $msg, $file, $line, $context); + } + + $trace = debug_backtrace(true); + $group = 'other'; + + $i = count($trace); + while (1 < $i && (!isset($trace[--$i]['class']) || ('ReflectionMethod' === $trace[$i]['class'] || 0 === strpos($trace[$i]['class'], 'PHPUnit_')))) { + // No-op + } + + if (isset($trace[$i]['object']) || isset($trace[$i]['class'])) { + $class = isset($trace[$i]['object']) ? get_class($trace[$i]['object']) : $trace[$i]['class']; + $method = $trace[$i]['function']; + + if (0 !== error_reporting()) { + $group = 'unsilenced'; + } elseif (0 === strpos($method, 'testLegacy') + || 0 === strpos($method, 'provideLegacy') + || 0 === strpos($method, 'getLegacy') + || strpos($class, '\Legacy') + || in_array('legacy', \PHPUnit_Util_Test::getGroups($class, $method), true) + ) { + $group = 'legacy'; + } else { + $group = 'remaining'; + } + + if (isset($mode[0]) && '/' === $mode[0] && preg_match($mode, $msg)) { + $e = new \Exception($msg); + $r = new \ReflectionProperty($e, 'trace'); + $r->setAccessible(true); + $r->setValue($e, array_slice($trace, 1, $i)); + + echo "\n".ucfirst($group).' deprecation triggered by '.$class.'::'.$method.':'; + echo "\n".$msg; + echo "\nStack trace:"; + echo "\n".str_replace(' '.getcwd().DIRECTORY_SEPARATOR, ' ', $e->getTraceAsString()); + echo "\n"; + + exit(1); + } + if ('legacy' !== $group && DeprecationErrorHandler::MODE_WEAK !== $mode) { + $ref = &$deprecations[$group][$msg]['count']; + ++$ref; + $ref = &$deprecations[$group][$msg][$class.'::'.$method]; + ++$ref; + } + } elseif (DeprecationErrorHandler::MODE_WEAK !== $mode) { + $ref = &$deprecations[$group][$msg]['count']; + ++$ref; + } + ++$deprecations[$group.'Count']; + }; + $oldErrorHandler = set_error_handler($deprecationHandler); + + if (null !== $oldErrorHandler) { + restore_error_handler(); + if (array('PHPUnit_Util_ErrorHandler', 'handleError') === $oldErrorHandler) { + restore_error_handler(); + self::register($mode); + } + } else { + self::$isRegistered = true; + if (self::hasColorSupport()) { + $colorize = function ($str, $red) { + $color = $red ? '41;37' : '43;30'; + + return "\x1B[{$color}m{$str}\x1B[0m"; + }; + } else { + $colorize = function ($str) { return $str; }; + } + register_shutdown_function(function () use ($getMode, &$deprecations, $deprecationHandler, $colorize) { + $mode = $getMode(); + if (isset($mode[0]) && '/' === $mode[0]) { + return; + } + $currErrorHandler = set_error_handler('var_dump'); + restore_error_handler(); + + if (DeprecationErrorHandler::MODE_WEAK === $mode) { + $colorize = function ($str) { return $str; }; + } + if ($currErrorHandler !== $deprecationHandler) { + echo "\n", $colorize('THE ERROR HANDLER HAS CHANGED!', true), "\n"; + } + + $cmp = function ($a, $b) { + return $b['count'] - $a['count']; + }; + + foreach (array('unsilenced', 'remaining', 'legacy', 'other') as $group) { + if ($deprecations[$group.'Count']) { + echo "\n", $colorize(sprintf('%s deprecation notices (%d)', ucfirst($group), $deprecations[$group.'Count']), 'legacy' !== $group), "\n"; + + uasort($deprecations[$group], $cmp); + + foreach ($deprecations[$group] as $msg => $notices) { + echo "\n", rtrim($msg, '.'), ': ', $notices['count'], "x\n"; + + arsort($notices); + + foreach ($notices as $method => $count) { + if ('count' !== $method) { + echo ' ', $count, 'x in ', preg_replace('/(.*)\\\\(.*?::.*?)$/', '$2 from $1', $method), "\n"; + } + } + } + } + } + if (!empty($notices)) { + echo "\n"; + } + + if (DeprecationErrorHandler::MODE_WEAK !== $mode && $mode < $deprecations['unsilencedCount'] + $deprecations['remainingCount'] + $deprecations['otherCount']) { + exit(1); + } + }); + } + } + + private static function hasColorSupport() + { + if ('\\' === DIRECTORY_SEPARATOR) { + return + '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM'); + } + + return defined('STDOUT') && function_exists('posix_isatty') && @posix_isatty(STDOUT); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/DnsMock.php b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/DnsMock.php new file mode 100644 index 0000000000000000000000000000000000000000..a85ec977c71ddbf71cd1312cc3f4c461c0dfde36 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/DnsMock.php @@ -0,0 +1,226 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit; + +/** + * @author Nicolas Grekas + */ +class DnsMock +{ + private static $hosts = array(); + private static $dnsTypes = array( + 'A' => DNS_A, + 'MX' => DNS_MX, + 'NS' => DNS_NS, + 'SOA' => DNS_SOA, + 'PTR' => DNS_PTR, + 'CNAME' => DNS_CNAME, + 'AAAA' => DNS_AAAA, + 'A6' => DNS_A6, + 'SRV' => DNS_SRV, + 'NAPTR' => DNS_NAPTR, + 'TXT' => DNS_TXT, + 'HINFO' => DNS_HINFO, + ); + + /** + * Configures the mock values for DNS queries. + * + * @param array $hosts Mocked hosts as keys, arrays of DNS records as returned by dns_get_record() as values + */ + public static function withMockedHosts(array $hosts) + { + self::$hosts = $hosts; + } + + public static function checkdnsrr($hostname, $type = 'MX') + { + if (!self::$hosts) { + return \checkdnsrr($hostname, $type); + } + if (isset(self::$hosts[$hostname])) { + $type = strtoupper($type); + + foreach (self::$hosts[$hostname] as $record) { + if ($record['type'] === $type) { + return true; + } + if ('ANY' === $type && isset(self::$dnsTypes[$record['type']]) && 'HINFO' !== $record['type']) { + return true; + } + } + } + + return false; + } + + public static function getmxrr($hostname, &$mxhosts, &$weight = null) + { + if (!self::$hosts) { + return \getmxrr($hostname, $mxhosts, $weight); + } + $mxhosts = $weight = array(); + + if (isset(self::$hosts[$hostname])) { + foreach (self::$hosts[$hostname] as $record) { + if ('MX' === $record['type']) { + $mxhosts[] = $record['host']; + $weight[] = $record['pri']; + } + } + } + + return (bool) $mxhosts; + } + + public static function gethostbyaddr($ipAddress) + { + if (!self::$hosts) { + return \gethostbyaddr($ipAddress); + } + foreach (self::$hosts as $hostname => $records) { + foreach ($records as $record) { + if ('A' === $record['type'] && $ipAddress === $record['ip']) { + return $hostname; + } + if ('AAAA' === $record['type'] && $ipAddress === $record['ipv6']) { + return $hostname; + } + } + } + + return $ipAddress; + } + + public static function gethostbyname($hostname) + { + if (!self::$hosts) { + return \gethostbyname($hostname); + } + if (isset(self::$hosts[$hostname])) { + foreach (self::$hosts[$hostname] as $record) { + if ('A' === $record['type']) { + return $record['ip']; + } + } + } + + return $hostname; + } + + public static function gethostbynamel($hostname) + { + if (!self::$hosts) { + return \gethostbynamel($hostname); + } + $ips = false; + + if (isset(self::$hosts[$hostname])) { + $ips = array(); + + foreach (self::$hosts[$hostname] as $record) { + if ('A' === $record['type']) { + $ips[] = $record['ip']; + } + } + } + + return $ips; + } + + public static function dns_get_record($hostname, $type = DNS_ANY, &$authns = null, &$addtl = null, $raw = false) + { + if (!self::$hosts) { + return \dns_get_record($hostname, $type, $authns, $addtl, $raw); + } + + $records = false; + + if (isset(self::$hosts[$hostname])) { + if (DNS_ANY === $type) { + $type = DNS_ALL; + } + $records = array(); + + foreach (self::$hosts[$hostname] as $record) { + if (isset(self::$dnsTypes[$record['type']]) && (self::$dnsTypes[$record['type']] & $type)) { + $records[] = array_merge(array('host' => $hostname, 'class' => 'IN', 'ttl' => 1, 'type' => $record['type']), $record); + } + } + } + + return $records; + } + + public static function register($class) + { + $self = get_called_class(); + + $mockedNs = array(substr($class, 0, strrpos($class, '\\'))); + if (0 < strpos($class, '\\Tests\\')) { + $ns = str_replace('\\Tests\\', '\\', $class); + $mockedNs[] = substr($ns, 0, strrpos($ns, '\\')); + } elseif (0 === strpos($class, 'Tests\\')) { + $mockedNs[] = substr($class, 6, strrpos($class, '\\') - 6); + } + foreach ($mockedNs as $ns) { + if (function_exists($ns.'\checkdnsrr')) { + continue; + } + eval(<< + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit; + +use Doctrine\Common\Annotations\AnnotationRegistry; + +if (!class_exists('PHPUnit_Framework_BaseTestListener')) { + return; +} + +/** + * Collects and replays skipped tests. + * + * @author Nicolas Grekas + */ +class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener +{ + private static $globallyEnabled = false; + private $state = -1; + private $skippedFile = false; + private $wasSkipped = array(); + private $isSkipped = array(); + private $expectedDeprecations = array(); + private $gatheredDeprecations = array(); + private $previousErrorHandler; + + /** + * @param array $mockedNamespaces List of namespaces, indexed by mocked features (time-sensitive or dns-sensitive) + */ + public function __construct(array $mockedNamespaces = array()) + { + \PHPUnit_Util_Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\DeprecationErrorHandler'] = 1; + \PHPUnit_Util_Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\SymfonyTestsListener'] = 1; + + $warn = false; + foreach ($mockedNamespaces as $type => $namespaces) { + if (!is_array($namespaces)) { + $namespaces = array($namespaces); + } + if (is_int($type)) { + // @deprecated BC with v2.8 to v3.0 + $type = 'time-sensitive'; + $warn = true; + } + if ('time-sensitive' === $type) { + foreach ($namespaces as $ns) { + ClockMock::register($ns.'\DummyClass'); + } + } + if ('dns-sensitive' === $type) { + foreach ($namespaces as $ns) { + DnsMock::register($ns.'\DummyClass'); + } + } + } + if (self::$globallyEnabled) { + $this->state = -2; + } else { + self::$globallyEnabled = true; + if ($warn) { + echo "Clock-mocked namespaces for SymfonyTestsListener need to be nested in a \"time-sensitive\" key. This will be enforced in Symfony 4.0.\n"; + } + } + } + + public function __destruct() + { + if (0 < $this->state) { + file_put_contents($this->skippedFile, 'isSkipped, true).';'); + } + } + + public function globalListenerDisabled() + { + self::$globallyEnabled = false; + $this->state = -1; + } + + public function startTestSuite(\PHPUnit_Framework_TestSuite $suite) + { + $suiteName = $suite->getName(); + + if (-1 === $this->state) { + echo "Testing $suiteName\n"; + $this->state = 0; + + if (!class_exists('Doctrine\Common\Annotations\AnnotationRegistry', false) && class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) { + AnnotationRegistry::registerLoader('class_exists'); + } + + if ($this->skippedFile = getenv('SYMFONY_PHPUNIT_SKIPPED_TESTS')) { + $this->state = 1; + + if (file_exists($this->skippedFile)) { + $this->state = 2; + + if (!$this->wasSkipped = require $this->skippedFile) { + echo "All tests already ran successfully.\n"; + $suite->setTests(array()); + } + } + } + $testSuites = array($suite); + for ($i = 0; isset($testSuites[$i]); ++$i) { + foreach ($testSuites[$i]->tests() as $test) { + if ($test instanceof \PHPUnit_Framework_TestSuite) { + if (!class_exists($test->getName(), false)) { + $testSuites[] = $test; + continue; + } + $groups = \PHPUnit_Util_Test::getGroups($test->getName()); + if (in_array('time-sensitive', $groups, true)) { + ClockMock::register($test->getName()); + } + if (in_array('dns-sensitive', $groups, true)) { + DnsMock::register($test->getName()); + } + } + } + } + } elseif (2 === $this->state) { + $skipped = array(); + foreach ($suite->tests() as $test) { + if (!$test instanceof \PHPUnit_Framework_TestCase + || isset($this->wasSkipped[$suiteName]['*']) + || isset($this->wasSkipped[$suiteName][$test->getName()])) { + $skipped[] = $test; + } + } + $suite->setTests($skipped); + } + } + + public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $time) + { + if (0 < $this->state) { + if ($test instanceof \PHPUnit_Framework_TestCase) { + $class = get_class($test); + $method = $test->getName(); + } else { + $class = $test->getName(); + $method = '*'; + } + + $this->isSkipped[$class][$method] = 1; + } + } + + public function startTest(\PHPUnit_Framework_Test $test) + { + if (-2 < $this->state && $test instanceof \PHPUnit_Framework_TestCase) { + $groups = \PHPUnit_Util_Test::getGroups(get_class($test), $test->getName(false)); + + if (in_array('time-sensitive', $groups, true)) { + ClockMock::register(get_class($test)); + ClockMock::withClockMock(true); + } + if (in_array('dns-sensitive', $groups, true)) { + DnsMock::register(get_class($test)); + } + + $annotations = \PHPUnit_Util_Test::parseTestMethodAnnotations(get_class($test), $test->getName(false)); + + if (isset($annotations['class']['expectedDeprecation'])) { + $test->getTestResultObject()->addError($test, new \PHPUnit_Framework_AssertionFailedError('`@expectedDeprecation` annotations are not allowed at the class level.'), 0); + } + if (isset($annotations['method']['expectedDeprecation'])) { + if (!in_array('legacy', $groups, true)) { + $test->getTestResultObject()->addError($test, new \PHPUnit_Framework_AssertionFailedError('Only tests with the `@group legacy` annotation can have `@expectedDeprecation`.'), 0); + } + $this->expectedDeprecations = $annotations['method']['expectedDeprecation']; + $this->previousErrorHandler = set_error_handler(array($this, 'handleError')); + } + } + } + + public function endTest(\PHPUnit_Framework_Test $test, $time) + { + if ($this->expectedDeprecations) { + if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE), true)) { + $test->addToAssertionCount(count($this->expectedDeprecations)); + } + + restore_error_handler(); + + if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE, \PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE, \PHPUnit_Runner_BaseTestRunner::STATUS_ERROR), true)) { + try { + $prefix = "@expectedDeprecation:\n"; + $test->assertStringMatchesFormat($prefix.'%A '.implode("\n%A ", $this->expectedDeprecations)."\n%A", $prefix.' '.implode("\n ", $this->gatheredDeprecations)."\n"); + } catch (\PHPUnit_Framework_AssertionFailedError $e) { + $test->getTestResultObject()->addFailure($test, $e, $time); + } + } + + $this->expectedDeprecations = $this->gatheredDeprecations = array(); + $this->previousErrorHandler = null; + } + if (-2 < $this->state && $test instanceof \PHPUnit_Framework_TestCase) { + $groups = \PHPUnit_Util_Test::getGroups(get_class($test), $test->getName(false)); + + if (in_array('time-sensitive', $groups, true)) { + ClockMock::withClockMock(false); + } + if (in_array('dns-sensitive', $groups, true)) { + DnsMock::withMockedHosts(array()); + } + } + } + + public function handleError($type, $msg, $file, $line, $context) + { + if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) { + $h = $this->previousErrorHandler; + + return $h ? $h($type, $msg, $file, $line, $context) : false; + } + if (error_reporting()) { + $msg = 'Unsilenced deprecation: '.$msg; + } + $this->gatheredDeprecations[] = $msg; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt new file mode 100644 index 0000000000000000000000000000000000000000..cd733724870cdb0f252b9b42b86e4d64a4ec7b89 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt @@ -0,0 +1,82 @@ +--TEST-- +Test DeprecationErrorHandler in default mode +--FILE-- +testLegacyFoo(); +$foo->testNonLegacyBar(); + +?> +--EXPECTF-- +Unsilenced deprecation notices (3) + +unsilenced foo deprecation: 2x + 2x in FooTestCase::testLegacyFoo + +unsilenced bar deprecation: 1x + 1x in FooTestCase::testNonLegacyBar + +Remaining deprecation notices (1) + +silenced bar deprecation: 1x + 1x in FooTestCase::testNonLegacyBar + +Legacy deprecation notices (1) + +Other deprecation notices (1) + +root deprecation: 1x + diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt new file mode 100644 index 0000000000000000000000000000000000000000..0115bbd24259a8c949c356863c35d872acdfc2f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test DeprecationErrorHandler in weak mode +--FILE-- + +--EXPECTF-- +00 diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt new file mode 100644 index 0000000000000000000000000000000000000000..3b7207b85f8ee01d5641640722bf11e4ecd5039c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt @@ -0,0 +1,40 @@ +--TEST-- +Test DeprecationErrorHandler in weak mode +--FILE-- +testLegacyFoo(); + +?> +--EXPECTF-- +Legacy deprecation triggered by FooTestCase::testLegacyFoo: +silenced foo deprecation +Stack trace: +#%A(%d): FooTestCase->testLegacyFoo() +#%d {main} + diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt new file mode 100644 index 0000000000000000000000000000000000000000..9e78d96e70efb0cb9bddbf0a7de674a4972dcba5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt @@ -0,0 +1,40 @@ +--TEST-- +Test DeprecationErrorHandler in weak mode +--FILE-- +testLegacyFoo(); + +?> +--EXPECTF-- +Unsilenced deprecation notices (1) + +Legacy deprecation notices (1) + +Other deprecation notices (1) + diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a178ac7e898c7621f939f730cc1f56a6f397a472 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php @@ -0,0 +1,148 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\PhpUnit\DnsMock; + +class DnsMockTest extends TestCase +{ + protected function tearDown() + { + DnsMock::withMockedHosts(array()); + } + + public function testCheckdnsrr() + { + DnsMock::withMockedHosts(array('example.com' => array(array('type' => 'MX')))); + $this->assertTrue(DnsMock::checkdnsrr('example.com')); + + DnsMock::withMockedHosts(array('example.com' => array(array('type' => 'A')))); + $this->assertFalse(DnsMock::checkdnsrr('example.com')); + $this->assertTrue(DnsMock::checkdnsrr('example.com', 'a')); + $this->assertTrue(DnsMock::checkdnsrr('example.com', 'any')); + $this->assertFalse(DnsMock::checkdnsrr('foobar.com', 'ANY')); + } + + public function testGetmxrr() + { + DnsMock::withMockedHosts(array( + 'example.com' => array(array( + 'type' => 'MX', + 'host' => 'mx.example.com', + 'pri' => 10, + )), + )); + + $this->assertFalse(DnsMock::getmxrr('foobar.com', $mxhosts, $weight)); + $this->assertTrue(DnsMock::getmxrr('example.com', $mxhosts, $weight)); + $this->assertSame(array('mx.example.com'), $mxhosts); + $this->assertSame(array(10), $weight); + } + + public function testGethostbyaddr() + { + DnsMock::withMockedHosts(array( + 'example.com' => array( + array( + 'type' => 'A', + 'ip' => '1.2.3.4', + ), + array( + 'type' => 'AAAA', + 'ipv6' => '::12', + ), + ), + )); + + $this->assertSame('::21', DnsMock::gethostbyaddr('::21')); + $this->assertSame('example.com', DnsMock::gethostbyaddr('::12')); + $this->assertSame('example.com', DnsMock::gethostbyaddr('1.2.3.4')); + } + + public function testGethostbyname() + { + DnsMock::withMockedHosts(array( + 'example.com' => array( + array( + 'type' => 'AAAA', + 'ipv6' => '::12', + ), + array( + 'type' => 'A', + 'ip' => '1.2.3.4', + ), + ), + )); + + $this->assertSame('foobar.com', DnsMock::gethostbyname('foobar.com')); + $this->assertSame('1.2.3.4', DnsMock::gethostbyname('example.com')); + } + + public function testGethostbynamel() + { + DnsMock::withMockedHosts(array( + 'example.com' => array( + array( + 'type' => 'A', + 'ip' => '1.2.3.4', + ), + array( + 'type' => 'A', + 'ip' => '2.3.4.5', + ), + ), + )); + + $this->assertFalse(DnsMock::gethostbynamel('foobar.com')); + $this->assertSame(array('1.2.3.4', '2.3.4.5'), DnsMock::gethostbynamel('example.com')); + } + + public function testDnsGetRecord() + { + DnsMock::withMockedHosts(array( + 'example.com' => array( + array( + 'type' => 'A', + 'ip' => '1.2.3.4', + ), + array( + 'type' => 'PTR', + 'ip' => '2.3.4.5', + ), + ), + )); + + $records = array( + array( + 'host' => 'example.com', + 'class' => 'IN', + 'ttl' => 1, + 'type' => 'A', + 'ip' => '1.2.3.4', + ), + $ptr = array( + 'host' => 'example.com', + 'class' => 'IN', + 'ttl' => 1, + 'type' => 'PTR', + 'ip' => '2.3.4.5', + ), + ); + + $this->assertFalse(DnsMock::dns_get_record('foobar.com')); + $this->assertSame($records, DnsMock::dns_get_record('example.com')); + $this->assertSame($records, DnsMock::dns_get_record('example.com', DNS_ALL)); + $this->assertSame($records, DnsMock::dns_get_record('example.com', DNS_A | DNS_PTR)); + $this->assertSame(array($ptr), DnsMock::dns_get_record('example.com', DNS_PTR)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/TextUI/Command.php b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/TextUI/Command.php new file mode 100644 index 0000000000000000000000000000000000000000..d4ffeac3fd9828103a4f3a0823f8ccb6f89ac664 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/TextUI/Command.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\Bridge\PhpUnit\TextUI; + +if (!class_exists('PHPUnit_TextUI_Command')) { + return; +} + +/** + * {@inheritdoc} + */ +class Command extends \PHPUnit_TextUI_Command +{ + /** + * {@inheritdoc} + */ + protected function createRunner() + { + return new TestRunner($this->arguments['loader']); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/TextUI/TestRunner.php b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/TextUI/TestRunner.php new file mode 100644 index 0000000000000000000000000000000000000000..eaad394d980f012b00ccf8f73668f7dbce501ddc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/TextUI/TestRunner.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit\TextUI; + +use Symfony\Bridge\PhpUnit\SymfonyTestsListener; + +if (!class_exists('PHPUnit_TextUI_TestRunner')) { + return; +} + +/** + * {@inheritdoc} + */ +class TestRunner extends \PHPUnit_TextUI_TestRunner +{ + /** + * {@inheritdoc} + */ + protected function handleConfiguration(array &$arguments) + { + $listener = new SymfonyTestsListener(); + + $result = parent::handleConfiguration($arguments); + + $arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : array(); + + $registeredLocally = false; + + foreach ($arguments['listeners'] as $registeredListener) { + if ($registeredListener instanceof SymfonyTestsListener) { + $registeredListener->globalListenerDisabled(); + $registeredLocally = true; + break; + } + } + + if (!$registeredLocally) { + $arguments['listeners'][] = $listener; + } + + return $result; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit new file mode 100755 index 0000000000000000000000000000000000000000..17e971bb432d477622c434a82fb9cc41e5a8fc19 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit @@ -0,0 +1,212 @@ +#!/usr/bin/env php + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +// Please update when phpunit needs to be reinstalled with fresh deps: +// Cache-Id-Version: 2016-10-20 14:00 UTC + +error_reporting(-1); + +// PHPUnit 4.8 does not support PHP 7, while 5.1 requires PHP 5.6+ +$PHPUNIT_VERSION = PHP_VERSION_ID >= 50600 ? getenv('SYMFONY_PHPUNIT_VERSION') ?: '5.4' : '4.8'; +$oldPwd = getcwd(); +$PHPUNIT_DIR = getenv('SYMFONY_PHPUNIT_DIR') ?: (__DIR__.'/.phpunit'); +$PHP = defined('PHP_BINARY') ? PHP_BINARY : 'php'; +$PHP = escapeshellarg($PHP); +if ('phpdbg' === PHP_SAPI) { + $PHP .= ' -qrr'; +} + +$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar') || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar`)) + ? $PHP.' '.escapeshellarg($COMPOSER) + : 'composer'; + +if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__FILE__)."\n".getenv('SYMFONY_PHPUNIT_REMOVE') !== @file_get_contents("$PHPUNIT_DIR/.$PHPUNIT_VERSION.md5")) { + // Build a standalone phpunit without symfony/yaml nor prophecy by default + + @mkdir($PHPUNIT_DIR); + chdir($PHPUNIT_DIR); + if (file_exists("phpunit-$PHPUNIT_VERSION")) { + passthru(sprintf('\\' === DIRECTORY_SEPARATOR ? '(del /S /F /Q %s & rmdir %1$s) >nul': 'rm -rf %s', "phpunit-$PHPUNIT_VERSION")); + } + if (extension_loaded('openssl') && ini_get('allow_url_fopen') && !isset($_SERVER['http_proxy']) && !isset($_SERVER['https_proxy'])) { + stream_copy_to_stream(fopen("https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip", 'rb'), fopen("$PHPUNIT_VERSION.zip", 'wb')); + } else { + @unlink("$PHPUNIT_VERSION.zip"); + passthru("wget https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip"); + } + if (!class_exists('ZipArchive')) { + throw new \Exception('simple-phpunit requires the "zip" PHP extension to be installed and enabled in order to uncompress the downloaded PHPUnit packages.'); + } + $zip = new ZipArchive(); + $zip->open("$PHPUNIT_VERSION.zip"); + $zip->extractTo(getcwd()); + $zip->close(); + chdir("phpunit-$PHPUNIT_VERSION"); + passthru("$COMPOSER remove --no-update ".(getenv('SYMFONY_PHPUNIT_REMOVE') ?: 'phpspec/prophecy symfony/yaml')); + if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) { + passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\""); + } + passthru("$COMPOSER require --no-update symfony/phpunit-bridge \">=3.2@dev\""); + $prevRoot = getenv('COMPOSER_ROOT_VERSION'); + putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION"); + $exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", array(), $p, getcwd(), null, array('bypass_shell' => true))); + putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : '')); + if ($exit) { + exit($exit); + } + file_put_contents('phpunit', <<<'EOPHP' +setMaxDepth(getenv('SYMFONY_PHPUNIT_MAX_DEPTH') ?: 3); + + foreach ($finder as $file => $fileInfo) { + if ('phpunit.xml.dist' === $file) { + $components[] = dirname($fileInfo->getPathname()); + } + } + if ($components) { + array_shift($cmd); + } +} + +$cmd[0] = sprintf('%s %s --colors=always', $PHP, escapeshellarg("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit")); +$cmd = str_replace('%', '%%', implode(' ', $cmd)).' %1$s'; + +if ('\\' === DIRECTORY_SEPARATOR) { + $cmd = 'cmd /v:on /d /c "('.$cmd.')%2$s"'; +} else { + $cmd .= '%2$s'; +} + +if ($components) { + $skippedTests = isset($_SERVER['SYMFONY_PHPUNIT_SKIPPED_TESTS']) ? $_SERVER['SYMFONY_PHPUNIT_SKIPPED_TESTS'] : false; + $runningProcs = array(); + + foreach ($components as $component) { + // Run phpunit tests in parallel + + if ($skippedTests) { + putenv("SYMFONY_PHPUNIT_SKIPPED_TESTS=$component/$skippedTests"); + } + + $c = escapeshellarg($component); + + if ($proc = proc_open(sprintf($cmd, $c, " > $c/phpunit.stdout 2> $c/phpunit.stderr"), array(), $pipes)) { + $runningProcs[$component] = $proc; + } else { + $exit = 1; + echo "\033[41mKO\033[0m $component\n\n"; + } + } + + // Fixes for colors support on appveyor + // See https://github.com/appveyor/ci/issues/373 + $colorFixes = array( + array("S\033[0m\033[0m\033[36m\033[1mS", "E\033[0m\033[0m\033[31m\033[1mE", "I\033[0m\033[0m\033[33m\033[1mI", "F\033[0m\033[0m\033[41m\033[37mF"), + array("SS", "EE", "II", "FF"), + ); + $colorFixes[0] = array_merge($colorFixes[0], $colorFixes[0]); + $colorFixes[1] = array_merge($colorFixes[1], $colorFixes[1]); + + while ($runningProcs) { + usleep(300000); + $terminatedProcs = array(); + foreach ($runningProcs as $component => $proc) { + $procStatus = proc_get_status($proc); + if (!$procStatus['running']) { + $terminatedProcs[$component] = $procStatus['exitcode']; + unset($runningProcs[$component]); + proc_close($proc); + } + } + + foreach ($terminatedProcs as $component => $procStatus) { + foreach (array('out', 'err') as $file) { + $file = "$component/phpunit.std$file"; + + if ('\\' === DIRECTORY_SEPARATOR) { + $h = fopen($file, 'rb'); + while (false !== $line = fgets($h)) { + echo str_replace($colorFixes[0], $colorFixes[1], preg_replace( + '/(\033\[[0-9]++);([0-9]++m)(?:(.)(\033\[0m))?/', + "$1m\033[$2$3$4$4", + $line + )); + } + fclose($h); + } else { + readfile($file); + } + unlink($file); + } + + // Fail on any individual component failures but ignore some error codes on Windows when APCu is enabled: + // STATUS_STACK_BUFFER_OVERRUN (-1073740791/0xC0000409) + // STATUS_ACCESS_VIOLATION (-1073741819/0xC0000005) + // STATUS_HEAP_CORRUPTION (-1073740940/0xC0000374) + if ($procStatus && ('\\' !== DIRECTORY_SEPARATOR || !extension_loaded('apcu') || !ini_get('apc.enable_cli') || !in_array($procStatus, array(-1073740791, -1073741819, -1073740940)))) { + $exit = $procStatus; + echo "\033[41mKO\033[0m $component\n\n"; + } else { + echo "\033[32mOK\033[0m $component\n\n"; + } + } + } +} elseif (!isset($argv[1]) || 'install' !== $argv[1] || file_exists('install')) { + // Run regular phpunit in a subprocess + + $errFile = tempnam(sys_get_temp_dir(), 'phpunit.stderr.'); + if ($proc = proc_open(sprintf($cmd, '', ' 2> '.escapeshellarg($errFile)), array(1 => array('pipe', 'w')), $pipes)) { + stream_copy_to_stream($pipes[1], STDOUT); + fclose($pipes[1]); + $exit = proc_close($proc); + + readfile($errFile); + unlink($errFile); + } + + if (!file_exists($component = array_pop($argv))) { + $component = basename($oldPwd); + } + + if ($exit) { + echo "\033[41mKO\033[0m $component\n\n"; + } else { + echo "\033[32mOK\033[0m $component\n\n"; + } +} + +exit($exit); diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/bootstrap.php b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/bootstrap.php new file mode 100644 index 0000000000000000000000000000000000000000..5e2ed0ca85f82767879a2f0abe899ea4caa38114 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/bootstrap.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Doctrine\Common\Annotations\AnnotationRegistry; +use Symfony\Bridge\PhpUnit\DeprecationErrorHandler; + +// Detect if we're loaded by an actual run of phpunit +if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists('PHPUnit_TextUI_Command', false)) { + return; +} + +// Enforce a consistent locale +setlocale(LC_ALL, 'C'); + +if (!class_exists('Doctrine\Common\Annotations\AnnotationRegistry', false) && class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) { + AnnotationRegistry::registerLoader('class_exists'); +} + +if ('disabled' !== getenv('SYMFONY_DEPRECATIONS_HELPER')) { + DeprecationErrorHandler::register(getenv('SYMFONY_DEPRECATIONS_HELPER')); +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/composer.json b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..9918f85fc734c9fad51033931b12e5bc5346ce41 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/composer.json @@ -0,0 +1,46 @@ +{ + "name": "symfony/phpunit-bridge", + "type": "symfony-bridge", + "description": "Symfony PHPUnit Bridge", + "keywords": [], + "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 EVEN ON LATEST SYMFONY VERSIONS TO ALLOW USING", + "php": "THIS BRIDGE WHEN TESTING LOWEST SYMFONY VERSIONS.", + "php": ">=5.3.3" + }, + "suggest": { + "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader", + "ext-zip": "Zip support is required when using bin/simple-phpunit" + }, + "conflict": { + "phpunit/phpunit": ">=6.0" + }, + "autoload": { + "files": [ "bootstrap.php" ], + "psr-4": { "Symfony\\Bridge\\PhpUnit\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "bin": [ + "bin/simple-phpunit" + ], + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..9b64b02947c0e55b3ff42909a36de0d432d6f8a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + ./Tests/DeprecationErrorHandler/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..1f8f60c48bfed1838997f2c132f5bc7249fc8eaa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/CHANGELOG.md @@ -0,0 +1,7 @@ +CHANGELOG +========= + +2.3.0 +----- + + * First introduction of `Symfony\Bridge\ProxyManager` diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LICENSE b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php new file mode 100644 index 0000000000000000000000000000000000000000..0101026794c7ca11b42369dce633c9261f1920a2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.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\Bridge\ProxyManager\LazyProxy\Instantiator; + +use ProxyManager\Configuration; +use ProxyManager\Factory\LazyLoadingValueHolderFactory; +use ProxyManager\GeneratorStrategy\EvaluatingGeneratorStrategy; +use ProxyManager\Proxy\LazyLoadingInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface; + +/** + * Runtime lazy loading proxy generator. + * + * @author Marco Pivetta + */ +class RuntimeInstantiator implements InstantiatorInterface +{ + /** + * @var LazyLoadingValueHolderFactory + */ + private $factory; + + public function __construct() + { + $config = new Configuration(); + $config->setGeneratorStrategy(new EvaluatingGeneratorStrategy()); + + $this->factory = new LazyLoadingValueHolderFactory($config); + } + + /** + * {@inheritdoc} + */ + public function instantiateProxy(ContainerInterface $container, Definition $definition, $id, $realInstantiator) + { + return $this->factory->createProxy( + $definition->getClass(), + function (&$wrappedInstance, LazyLoadingInterface $proxy) use ($realInstantiator) { + $wrappedInstance = call_user_func($realInstantiator); + + $proxy->setProxyInitializer(null); + + return true; + } + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..447549b9704425ce329da7e5d809d896952abe82 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php @@ -0,0 +1,137 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper; + +use ProxyManager\Generator\ClassGenerator; +use ProxyManager\GeneratorStrategy\BaseGeneratorStrategy; +use ProxyManager\ProxyGenerator\LazyLoadingValueHolderGenerator; +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface; + +/** + * Generates dumped PHP code of proxies via reflection. + * + * @author Marco Pivetta + */ +class ProxyDumper implements DumperInterface +{ + /** + * @var string + */ + private $salt; + + /** + * @var LazyLoadingValueHolderGenerator + */ + private $proxyGenerator; + + /** + * @var BaseGeneratorStrategy + */ + private $classGenerator; + + /** + * Constructor. + * + * @param string $salt + */ + public function __construct($salt = '') + { + $this->salt = $salt; + $this->proxyGenerator = new LazyLoadingValueHolderGenerator(); + $this->classGenerator = new BaseGeneratorStrategy(); + } + + /** + * {@inheritdoc} + */ + public function isProxyCandidate(Definition $definition) + { + return $definition->isLazy() && ($class = $definition->getClass()) && class_exists($class); + } + + /** + * {@inheritdoc} + */ + public function getProxyFactoryCode(Definition $definition, $id) + { + $instantiation = 'return'; + + if ($definition->isShared()) { + $instantiation .= " \$this->services['$id'] ="; + } + + if (func_num_args() >= 3) { + $methodName = func_get_arg(2); + } else { + @trigger_error(sprintf('You must use the third argument of %s to define the method to call to construct your service since version 3.1, not using it won\'t be supported in 4.0.', __METHOD__), E_USER_DEPRECATED); + $methodName = 'get'.Container::camelize($id).'Service'; + } + $proxyClass = $this->getProxyClassName($definition); + + $generatedClass = $this->generateProxyClass($definition); + + $constructorCall = $generatedClass->hasMethod('staticProxyConstructor') + ? $proxyClass.'::staticProxyConstructor' + : 'new '.$proxyClass; + + return <<$methodName(false); + + \$proxy->setProxyInitializer(null); + + return true; + } + ); + } + + +EOF; + } + + /** + * {@inheritdoc} + */ + public function getProxyCode(Definition $definition) + { + return $this->classGenerator->generate($this->generateProxyClass($definition)); + } + + /** + * Produces the proxy class name for the given definition. + * + * @param Definition $definition + * + * @return string + */ + private function getProxyClassName(Definition $definition) + { + return str_replace('\\', '', $definition->getClass()).'_'.spl_object_hash($definition).$this->salt; + } + + /** + * @return ClassGenerator + */ + private function generateProxyClass(Definition $definition) + { + $generatedClass = new ClassGenerator($this->getProxyClassName($definition)); + + $this->proxyGenerator->generate(new \ReflectionClass($definition->getClass()), $generatedClass); + + return $generatedClass; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/README.md b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/README.md new file mode 100644 index 0000000000000000000000000000000000000000..38d3d6964527f91c21d7d612865196e7ad8e9c6e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/README.md @@ -0,0 +1,14 @@ +ProxyManager Bridge +=================== + +Provides integration for [ProxyManager][1] with various Symfony components. + +Resources +--------- + + * [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) + +[1]: https://github.com/Ocramius/ProxyManager diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b634a69488a34312a31a434bf3f76fafd90235e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy; + +require_once __DIR__.'/Fixtures/includes/foo.php'; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Integration tests for {@see \Symfony\Component\DependencyInjection\ContainerBuilder} combined + * with the ProxyManager bridge. + * + * @author Marco Pivetta + */ +class ContainerBuilderTest extends TestCase +{ + public function testCreateProxyServiceWithRuntimeInstantiator() + { + $builder = new ContainerBuilder(); + + $builder->setProxyInstantiator(new RuntimeInstantiator()); + + $builder->register('foo1', 'ProxyManagerBridgeFooClass')->setFile(__DIR__.'/Fixtures/includes/foo.php'); + $builder->getDefinition('foo1')->setLazy(true); + + $builder->compile(); + + /* @var $foo1 \ProxyManager\Proxy\LazyLoadingInterface|\ProxyManager\Proxy\ValueHolderInterface */ + $foo1 = $builder->get('foo1'); + + $this->assertSame($foo1, $builder->get('foo1'), 'The same proxy is retrieved on multiple subsequent calls'); + $this->assertInstanceOf('\ProxyManagerBridgeFooClass', $foo1); + $this->assertInstanceOf('\ProxyManager\Proxy\LazyLoadingInterface', $foo1); + $this->assertFalse($foo1->isProxyInitialized()); + + $foo1->initializeProxy(); + + $this->assertSame($foo1, $builder->get('foo1'), 'The same proxy is retrieved after initialization'); + $this->assertTrue($foo1->isProxyInitialized()); + $this->assertInstanceOf('\ProxyManagerBridgeFooClass', $foo1->getWrappedValueHolderValue()); + $this->assertNotInstanceOf('\ProxyManager\Proxy\LazyLoadingInterface', $foo1->getWrappedValueHolderValue()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Dumper/PhpDumperTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Dumper/PhpDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a191901753d24b5644fae23299b6d9bab628af11 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Dumper/PhpDumperTest.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\Dumper; + +use PHPUnit\Framework\TestCase; +use ProxyManager\ProxyGenerator\LazyLoading\MethodGenerator\StaticProxyConstructor; +use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Dumper\PhpDumper; + +/** + * Integration tests for {@see \Symfony\Component\DependencyInjection\Dumper\PhpDumper} combined + * with the ProxyManager bridge. + * + * @author Marco Pivetta + */ +class PhpDumperTest extends TestCase +{ + public function testDumpContainerWithProxyService() + { + $container = new ContainerBuilder(); + + $container->register('foo', 'stdClass'); + $container->getDefinition('foo')->setLazy(true); + $container->compile(); + + $dumper = new PhpDumper($container); + + $dumper->setProxyDumper(new ProxyDumper()); + + $dumpedString = $dumper->dump(); + + $this->assertStringMatchesFormatFile( + __DIR__.'/../Fixtures/php/lazy_service_structure.txt', + $dumpedString, + '->dump() does generate proxy lazy loading logic.' + ); + } + + /** + * Verifies that the generated container retrieves the same proxy instance on multiple subsequent requests. + */ + public function testDumpContainerWithProxyServiceWillShareProxies() + { + if (class_exists(StaticProxyConstructor::class)) { // detecting ProxyManager v2 + require_once __DIR__.'/../Fixtures/php/lazy_service_with_hints.php'; + } else { + require_once __DIR__.'/../Fixtures/php/lazy_service.php'; + } + + $container = new \LazyServiceProjectServiceContainer(); + + /* @var $proxy \stdClass_c1d194250ee2e2b7d2eab8b8212368a8 */ + $proxy = $container->get('foo'); + $this->assertInstanceOf('stdClass_c1d194250ee2e2b7d2eab8b8212368a8', $proxy); + $this->assertSame($proxy, $container->get('foo')); + + $this->assertFalse($proxy->isProxyInitialized()); + + $proxy->initializeProxy(); + + $this->assertTrue($proxy->isProxyInitialized()); + $this->assertSame($proxy, $container->get('foo')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/includes/foo.php b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/includes/foo.php new file mode 100644 index 0000000000000000000000000000000000000000..16c898a37084595811e94e9ad44e568e92d2180d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/includes/foo.php @@ -0,0 +1,41 @@ +arguments = $arguments; + } + + public static function getInstance($arguments = array()) + { + $obj = new self($arguments); + $obj->called = true; + + return $obj; + } + + public function initialize() + { + $this->initialized = true; + } + + public function configure() + { + $this->configured = true; + } + + public function setBar($value = null) + { + $this->bar = $value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php new file mode 100644 index 0000000000000000000000000000000000000000..77e04571e089c21df5281ac25b27a45be8e86aba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php @@ -0,0 +1,182 @@ + 'getFooService', + ); + + /** + * Constructor. + */ + public function __construct() + { + $this->services = array(); + } + + /** + * Gets the 'foo' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @param bool $lazyLoad whether to try lazy-loading the service with a proxy + * + * @return stdClass A stdClass instance + */ + public function getFooService($lazyLoad = true) + { + if ($lazyLoad) { + return $this->services['foo'] = new stdClass_c1d194250ee2e2b7d2eab8b8212368a8( + function (&$wrappedInstance, \ProxyManager\Proxy\LazyLoadingInterface $proxy) { + $wrappedInstance = $this->getFooService(false); + + $proxy->setProxyInitializer(null); + + return true; + } + ); + } + + return new \stdClass(); + } +} + +class stdClass_c1d194250ee2e2b7d2eab8b8212368a8 extends \stdClass implements \ProxyManager\Proxy\LazyLoadingInterface, \ProxyManager\Proxy\ValueHolderInterface +{ + /** + * @var \Closure|null initializer responsible for generating the wrapped object + */ + private $valueHolder5157dd96e88c0 = null; + + /** + * @var \Closure|null initializer responsible for generating the wrapped object + */ + private $initializer5157dd96e8924 = null; + + /** + * @override constructor for lazy initialization + * + * @param \Closure|null $initializer + */ + public function __construct($initializer) + { + $this->initializer5157dd96e8924 = $initializer; + } + + /** + * @param string $name + */ + public function __get($name) + { + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__get', array('name' => $name)); + + return $this->valueHolder5157dd96e88c0->$name; + } + + /** + * @param string $name + * @param mixed $value + */ + public function __set($name, $value) + { + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__set', array('name' => $name, 'value' => $value)); + + $this->valueHolder5157dd96e88c0->$name = $value; + } + + /** + * @param string $name + * + * @return bool + */ + public function __isset($name) + { + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__isset', array('name' => $name)); + + return isset($this->valueHolder5157dd96e88c0->$name); + } + + /** + * @param string $name + */ + public function __unset($name) + { + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__unset', array('name' => $name)); + + unset($this->valueHolder5157dd96e88c0->$name); + } + + public function __clone() + { + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__clone', array()); + + $this->valueHolder5157dd96e88c0 = clone $this->valueHolder5157dd96e88c0; + } + + public function __sleep() + { + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__sleep', array()); + + return array('valueHolder5157dd96e88c0'); + } + + public function __wakeup() + { + } + + /** + * {@inheritdoc} + */ + public function setProxyInitializer(\Closure $initializer = null) + { + $this->initializer5157dd96e8924 = $initializer; + } + + /** + * {@inheritdoc} + */ + public function getProxyInitializer() + { + return $this->initializer5157dd96e8924; + } + + /** + * {@inheritdoc} + */ + public function initializeProxy() + { + return $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, 'initializeProxy', array()); + } + + /** + * {@inheritdoc} + */ + public function isProxyInitialized() + { + return null !== $this->valueHolder5157dd96e88c0; + } + + /** + * {@inheritdoc} + */ + public function getWrappedValueHolderValue() + { + return $this->valueHolder5157dd96e88c0; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_structure.txt b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_structure.txt new file mode 100644 index 0000000000000000000000000000000000000000..496b0241a5ba73920164646e911811706c6ab36b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_structure.txt @@ -0,0 +1,26 @@ +services['foo'] =%sstdClass_%s( + function (&$wrappedInstance, \ProxyManager\Proxy\LazyLoadingInterface $proxy) { + $wrappedInstance = $this->getFooService(false); + + $proxy->setProxyInitializer(null); + + return true; + } + ); + } + + return new \stdClass(); + } +} + +class stdClass_%s extends %SstdClass implements \ProxyManager\%s +{%a}%A diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_with_hints.php b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_with_hints.php new file mode 100644 index 0000000000000000000000000000000000000000..6787b9ff8ed4584cf59bb35ccc4509e89e591bfc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_with_hints.php @@ -0,0 +1,182 @@ + 'getFooService', + ); + + /** + * Constructor. + */ + public function __construct() + { + $this->services = array(); + } + + /** + * Gets the 'foo' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @param bool $lazyLoad whether to try lazy-loading the service with a proxy + * + * @return stdClass A stdClass instance + */ + public function getFooService($lazyLoad = true) + { + if ($lazyLoad) { + return $this->services['foo'] = new stdClass_c1d194250ee2e2b7d2eab8b8212368a8( + function (&$wrappedInstance, \ProxyManager\Proxy\LazyLoadingInterface $proxy) { + $wrappedInstance = $this->getFooService(false); + + $proxy->setProxyInitializer(null); + + return true; + } + ); + } + + return new \stdClass(); + } +} + +class stdClass_c1d194250ee2e2b7d2eab8b8212368a8 extends \stdClass implements \ProxyManager\Proxy\LazyLoadingInterface, \ProxyManager\Proxy\ValueHolderInterface +{ + /** + * @var \Closure|null initializer responsible for generating the wrapped object + */ + private $valueHolder5157dd96e88c0 = null; + + /** + * @var \Closure|null initializer responsible for generating the wrapped object + */ + private $initializer5157dd96e8924 = null; + + /** + * @override constructor for lazy initialization + * + * @param \Closure|null $initializer + */ + public function __construct($initializer) + { + $this->initializer5157dd96e8924 = $initializer; + } + + /** + * @param string $name + */ + public function __get($name) + { + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__get', array('name' => $name)); + + return $this->valueHolder5157dd96e88c0->$name; + } + + /** + * @param string $name + * @param mixed $value + */ + public function __set($name, $value) + { + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__set', array('name' => $name, 'value' => $value)); + + $this->valueHolder5157dd96e88c0->$name = $value; + } + + /** + * @param string $name + * + * @return bool + */ + public function __isset($name) + { + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__isset', array('name' => $name)); + + return isset($this->valueHolder5157dd96e88c0->$name); + } + + /** + * @param string $name + */ + public function __unset($name) + { + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__unset', array('name' => $name)); + + unset($this->valueHolder5157dd96e88c0->$name); + } + + public function __clone() + { + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__clone', array()); + + $this->valueHolder5157dd96e88c0 = clone $this->valueHolder5157dd96e88c0; + } + + public function __sleep() + { + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__sleep', array()); + + return array('valueHolder5157dd96e88c0'); + } + + public function __wakeup() + { + } + + /** + * {@inheritdoc} + */ + public function setProxyInitializer(\Closure $initializer = null) + { + $this->initializer5157dd96e8924 = $initializer; + } + + /** + * {@inheritdoc} + */ + public function getProxyInitializer() + { + return $this->initializer5157dd96e8924; + } + + /** + * {@inheritdoc} + */ + public function initializeProxy(): bool + { + return $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, 'initializeProxy', array()); + } + + /** + * {@inheritdoc} + */ + public function isProxyInitialized(): bool + { + return null !== $this->valueHolder5157dd96e88c0; + } + + /** + * {@inheritdoc} + */ + public function getWrappedValueHolderValue() + { + return $this->valueHolder5157dd96e88c0; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e58b7d6356161863e0a745bcfc45197882fb4856 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.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\Bridge\ProxyManager\Tests\LazyProxy\Instantiator; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; +use Symfony\Component\DependencyInjection\Definition; + +/** + * Tests for {@see \Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator}. + * + * @author Marco Pivetta + */ +class RuntimeInstantiatorTest extends TestCase +{ + /** + * @var RuntimeInstantiator + */ + protected $instantiator; + + /** + * {@inheritdoc} + */ + protected function setUp() + { + $this->instantiator = new RuntimeInstantiator(); + } + + public function testInstantiateProxy() + { + $instance = new \stdClass(); + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $definition = new Definition('stdClass'); + $instantiator = function () use ($instance) { + return $instance; + }; + + /* @var $proxy \ProxyManager\Proxy\LazyLoadingInterface|\ProxyManager\Proxy\ValueHolderInterface */ + $proxy = $this->instantiator->instantiateProxy($container, $definition, 'foo', $instantiator); + + $this->assertInstanceOf('ProxyManager\Proxy\LazyLoadingInterface', $proxy); + $this->assertInstanceOf('ProxyManager\Proxy\ValueHolderInterface', $proxy); + $this->assertFalse($proxy->isProxyInitialized()); + + $proxy->initializeProxy(); + + $this->assertSame($instance, $proxy->getWrappedValueHolderValue()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..64082c8f7f3f10931315409a393b2e9a28aaf039 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\PhpDumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper; +use Symfony\Component\DependencyInjection\Definition; + +/** + * Tests for {@see \Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper}. + * + * @author Marco Pivetta + */ +class ProxyDumperTest extends TestCase +{ + /** + * @var ProxyDumper + */ + protected $dumper; + + /** + * {@inheritdoc} + */ + protected function setUp() + { + $this->dumper = new ProxyDumper(); + } + + /** + * @dataProvider getProxyCandidates + * + * @param Definition $definition + * @param bool $expected + */ + public function testIsProxyCandidate(Definition $definition, $expected) + { + $this->assertSame($expected, $this->dumper->isProxyCandidate($definition)); + } + + public function testGetProxyCode() + { + $definition = new Definition(__CLASS__); + + $definition->setLazy(true); + + $code = $this->dumper->getProxyCode($definition); + + $this->assertStringMatchesFormat( + '%Aclass SymfonyBridgeProxyManagerTestsLazyProxyPhpDumperProxyDumperTest%aextends%w' + .'\Symfony\Bridge\ProxyManager\Tests\LazyProxy\PhpDumper\ProxyDumperTest%a', + $code + ); + } + + public function testGetProxyFactoryCodeWithCustomMethod() + { + $definition = new Definition(__CLASS__); + + $definition->setLazy(true); + + $code = $this->dumper->getProxyFactoryCode($definition, 'foo', 'getFoo2Service'); + + $this->assertStringMatchesFormat( + '%wif ($lazyLoad) {%wreturn $this->services[\'foo\'] =%s' + .'SymfonyBridgeProxyManagerTestsLazyProxyPhpDumperProxyDumperTest_%s(%wfunction ' + .'(&$wrappedInstance, \ProxyManager\Proxy\LazyLoadingInterface $proxy) {' + .'%w$wrappedInstance = $this->getFoo2Service(false);%w$proxy->setProxyInitializer(null);' + .'%wreturn true;%w}%w);%w}%w', + $code + ); + } + + /** + * @group legacy + */ + public function testGetProxyFactoryCode() + { + $definition = new Definition(__CLASS__); + + $definition->setLazy(true); + + $code = $this->dumper->getProxyFactoryCode($definition, 'foo'); + + $this->assertStringMatchesFormat( + '%wif ($lazyLoad) {%wreturn $this->services[\'foo\'] =%s' + .'SymfonyBridgeProxyManagerTestsLazyProxyPhpDumperProxyDumperTest_%s(%wfunction ' + .'(&$wrappedInstance, \ProxyManager\Proxy\LazyLoadingInterface $proxy) {' + .'%w$wrappedInstance = $this->getFooService(false);%w$proxy->setProxyInitializer(null);' + .'%wreturn true;%w}%w);%w}%w', + $code + ); + } + + /** + * @return array + */ + public function getProxyCandidates() + { + $definitions = array( + array(new Definition(__CLASS__), true), + array(new Definition('stdClass'), true), + array(new Definition(uniqid('foo', true)), false), + array(new Definition(), false), + ); + + array_map( + function ($definition) { + $definition[0]->setLazy(true); + }, + $definitions + ); + + return $definitions; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/composer.json b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..f6d0d22aed9728807f05c39cbf87b27900e7f577 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/composer.json @@ -0,0 +1,38 @@ +{ + "name": "symfony/proxy-manager-bridge", + "type": "symfony-bridge", + "description": "Symfony ProxyManager Bridge", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/dependency-injection": "~2.8|~3.0", + "ocramius/proxy-manager": "~0.4|~1.0|~2.0" + }, + "require-dev": { + "symfony/config": "~2.8|~3.0" + }, + "autoload": { + "psr-4": { "Symfony\\Bridge\\ProxyManager\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..60980be9e531e0c185832e2addec4cd9aef1cf08 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/AppVariable.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/AppVariable.php new file mode 100644 index 0000000000000000000000000000000000000000..02fe5e5b68526ac70e4624f382dce46d40c6ca88 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/AppVariable.php @@ -0,0 +1,148 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * Exposes some Symfony parameters and services as an "app" global variable. + * + * @author Fabien Potencier + */ +class AppVariable +{ + private $tokenStorage; + private $requestStack; + private $environment; + private $debug; + + public function setTokenStorage(TokenStorageInterface $tokenStorage) + { + $this->tokenStorage = $tokenStorage; + } + + public function setRequestStack(RequestStack $requestStack) + { + $this->requestStack = $requestStack; + } + + public function setEnvironment($environment) + { + $this->environment = $environment; + } + + public function setDebug($debug) + { + $this->debug = (bool) $debug; + } + + /** + * Returns the current token. + * + * @return TokenInterface|null + * + * @throws \RuntimeException When the TokenStorage is not available + */ + public function getToken() + { + if (null === $tokenStorage = $this->tokenStorage) { + throw new \RuntimeException('The "app.token" variable is not available.'); + } + + return $tokenStorage->getToken(); + } + + /** + * Returns the current user. + * + * @return mixed + * + * @see TokenInterface::getUser() + */ + public function getUser() + { + if (null === $tokenStorage = $this->tokenStorage) { + throw new \RuntimeException('The "app.user" variable is not available.'); + } + + if (!$token = $tokenStorage->getToken()) { + return; + } + + $user = $token->getUser(); + if (is_object($user)) { + return $user; + } + } + + /** + * Returns the current request. + * + * @return Request|null The HTTP request object + */ + public function getRequest() + { + if (null === $this->requestStack) { + throw new \RuntimeException('The "app.request" variable is not available.'); + } + + return $this->requestStack->getCurrentRequest(); + } + + /** + * Returns the current session. + * + * @return Session|null The session + */ + public function getSession() + { + if (null === $this->requestStack) { + throw new \RuntimeException('The "app.session" variable is not available.'); + } + + if ($request = $this->getRequest()) { + return $request->getSession(); + } + } + + /** + * Returns the current app environment. + * + * @return string The current environment string (e.g 'dev') + */ + public function getEnvironment() + { + if (null === $this->environment) { + throw new \RuntimeException('The "app.environment" variable is not available.'); + } + + return $this->environment; + } + + /** + * Returns the current app debug mode. + * + * @return bool The current debug mode + */ + public function getDebug() + { + if (null === $this->debug) { + throw new \RuntimeException('The "app.debug" variable is not available.'); + } + + return $this->debug; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..dee3db5a37655ff0adfd3038fee103a347955627 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/CHANGELOG.md @@ -0,0 +1,83 @@ +CHANGELOG +========= + +3.2.0 +----- + + * added `AppVariable::getToken()` + * Deprecated the possibility to inject the Form `TwigRenderer` into the `FormExtension`. + * [BC BREAK] Registering the `FormExtension` without configuring a runtime loader for the `TwigRenderer` + doesn't work anymore. + + Before: + + ```php + use Symfony\Bridge\Twig\Extension\FormExtension; + use Symfony\Bridge\Twig\Form\TwigRenderer; + use Symfony\Bridge\Twig\Form\TwigRendererEngine; + + // ... + $rendererEngine = new TwigRendererEngine(array('form_div_layout.html.twig')); + $rendererEngine->setEnvironment($twig); + $twig->addExtension(new FormExtension(new TwigRenderer($rendererEngine, $csrfTokenManager))); + ``` + + After: + + ```php + // ... + $rendererEngine = new TwigRendererEngine(array('form_div_layout.html.twig'), $twig); + // require Twig 1.30+ + $twig->addRuntimeLoader(new \Twig_FactoryRuntimeLoader(array( + TwigRenderer::class => function () use ($rendererEngine, $csrfTokenManager) { + return new TwigRenderer($rendererEngine, $csrfTokenManager); + }, + ))); + $twig->addExtension(new FormExtension()); + ``` + * Deprecated the `TwigRendererEngineInterface` interface. + +2.7.0 +----- + + * added LogoutUrlExtension (provides `logout_url` and `logout_path`) + * added an HttpFoundation extension (provides the `absolute_url` and the `relative_path` functions) + * added AssetExtension (provides the `asset` and `asset_version` functions) + * Added possibility to extract translation messages from a file or files besides extracting from a directory + +2.5.0 +----- + + * moved command `twig:lint` from `TwigBundle` + +2.4.0 +----- + + * added stopwatch tag to time templates with the WebProfilerBundle + +2.3.0 +----- + + * added helpers form(), form_start() and form_end() + * deprecated form_enctype() in favor of form_start() + +2.2.0 +----- + + * added a `controller` function to help generating controller references + * added a `render_esi` and a `render_hinclude` function + * [BC BREAK] restricted the `render` tag to only accept URIs or ControllerReference instances (the signature changed) + * added a `render` function to render a request + * The `app` global variable is now injected even when using the twig service directly. + * Added an optional parameter to the `path` and `url` function which allows to generate + relative paths (e.g. "../parent-file") and scheme-relative URLs (e.g. "//example.com/dir/file"). + +2.1.0 +----- + + * added global variables access in a form theme + * added TwigEngine + * added TwigExtractor + * added a csrf_token function + * added a way to specify a default domain for a Twig template (via the + 'trans_default_domain' tag) diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Command/DebugCommand.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Command/DebugCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..d871a682f0a4cc17f886c43c690841625bdf12b0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Command/DebugCommand.php @@ -0,0 +1,219 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; + +/** + * Lists twig functions, filters, globals and tests present in the current project. + * + * @author Jordi Boggiano + */ +class DebugCommand extends Command +{ + private $twig; + + /** + * {@inheritdoc} + */ + public function __construct($name = 'debug:twig') + { + parent::__construct($name); + } + + /** + * Sets the twig environment. + * + * @param \Twig_Environment $twig + */ + public function setTwigEnvironment(\Twig_Environment $twig) + { + $this->twig = $twig; + } + + /** + * @return \Twig_Environment $twig + */ + protected function getTwigEnvironment() + { + return $this->twig; + } + + protected function configure() + { + $this + ->setDefinition(array( + new InputArgument('filter', InputArgument::OPTIONAL, 'Show details for all entries matching this filter'), + new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (text or json)', 'text'), + )) + ->setDescription('Shows a list of twig functions, filters, globals and tests') + ->setHelp(<<<'EOF' +The %command.name% command outputs a list of twig functions, +filters, globals and tests. Output can be filtered with an optional argument. + + php %command.full_name% + +The command lists all functions, filters, etc. + + php %command.full_name% date + +The command lists everything that contains the word date. + + php %command.full_name% --format=json + +The command lists everything in a machine readable json format. +EOF + ) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + $twig = $this->getTwigEnvironment(); + + if (null === $twig) { + $io->error('The Twig environment needs to be set.'); + + return 1; + } + + $types = array('functions', 'filters', 'tests', 'globals'); + + if ($input->getOption('format') === 'json') { + $data = array(); + foreach ($types as $type) { + foreach ($twig->{'get'.ucfirst($type)}() as $name => $entity) { + $data[$type][$name] = $this->getMetadata($type, $entity); + } + } + $data['tests'] = array_keys($data['tests']); + $io->writeln(json_encode($data)); + + return 0; + } + + $filter = $input->getArgument('filter'); + + foreach ($types as $index => $type) { + $items = array(); + foreach ($twig->{'get'.ucfirst($type)}() as $name => $entity) { + if (!$filter || false !== strpos($name, $filter)) { + $items[$name] = $name.$this->getPrettyMetadata($type, $entity); + } + } + + if (!$items) { + continue; + } + + $io->section(ucfirst($type)); + + ksort($items); + $io->listing($items); + } + + return 0; + } + + private function getMetadata($type, $entity) + { + if ($type === 'globals') { + return $entity; + } + if ($type === 'tests') { + return; + } + if ($type === 'functions' || $type === 'filters') { + $cb = $entity->getCallable(); + if (null === $cb) { + return; + } + if (is_array($cb)) { + if (!method_exists($cb[0], $cb[1])) { + return; + } + $refl = new \ReflectionMethod($cb[0], $cb[1]); + } elseif (is_object($cb) && method_exists($cb, '__invoke')) { + $refl = new \ReflectionMethod($cb, '__invoke'); + } elseif (function_exists($cb)) { + $refl = new \ReflectionFunction($cb); + } elseif (is_string($cb) && preg_match('{^(.+)::(.+)$}', $cb, $m) && method_exists($m[1], $m[2])) { + $refl = new \ReflectionMethod($m[1], $m[2]); + } else { + throw new \UnexpectedValueException('Unsupported callback type'); + } + + // filter out context/environment args + $args = array_filter($refl->getParameters(), function ($param) use ($entity) { + if ($entity->needsContext() && $param->getName() === 'context') { + return false; + } + + return !$param->getClass() || $param->getClass()->getName() !== 'Twig_Environment'; + }); + + // format args + $args = array_map(function ($param) { + if ($param->isDefaultValueAvailable()) { + return $param->getName().' = '.json_encode($param->getDefaultValue()); + } + + return $param->getName(); + }, $args); + + if ($type === 'filters') { + // remove the value the filter is applied on + array_shift($args); + } + + return $args; + } + } + + private function getPrettyMetadata($type, $entity) + { + if ($type === 'tests') { + return ''; + } + + try { + $meta = $this->getMetadata($type, $entity); + if ($meta === null) { + return '(unknown?)'; + } + } catch (\UnexpectedValueException $e) { + return ' '.$e->getMessage().''; + } + + if ($type === 'globals') { + if (is_object($meta)) { + return ' = object('.get_class($meta).')'; + } + + return ' = '.substr(@json_encode($meta), 0, 50); + } + + if ($type === 'functions') { + return '('.implode(', ', $meta).')'; + } + + if ($type === 'filters') { + return $meta ? '('.implode(', ', $meta).')' : ''; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Command/LintCommand.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Command/LintCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..ebbfde12c20585e5590bc13a7318c321e48932b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Command/LintCommand.php @@ -0,0 +1,248 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Finder\Finder; + +/** + * Command that will validate your template syntax and output encountered errors. + * + * @author Marc Weistroff + * @author Jérôme Tamarelle + */ +class LintCommand extends Command +{ + private $twig; + + /** + * {@inheritdoc} + */ + public function __construct($name = 'lint:twig') + { + parent::__construct($name); + } + + /** + * Sets the twig environment. + * + * @param \Twig_Environment $twig + */ + public function setTwigEnvironment(\Twig_Environment $twig) + { + $this->twig = $twig; + } + + /** + * @return \Twig_Environment $twig + */ + protected function getTwigEnvironment() + { + return $this->twig; + } + + protected function configure() + { + $this + ->setDescription('Lints a template and outputs encountered errors') + ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt') + ->addArgument('filename', InputArgument::IS_ARRAY) + ->setHelp(<<<'EOF' +The %command.name% command lints a template and outputs to STDOUT +the first encountered syntax error. + +You can validate the syntax of contents passed from STDIN: + + cat filename | php %command.full_name% + +Or the syntax of a file: + + php %command.full_name% filename + +Or of a whole directory: + + php %command.full_name% dirname + php %command.full_name% dirname --format=json + +EOF + ) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + + if (null === $twig = $this->getTwigEnvironment()) { + $io->error('The Twig environment needs to be set.'); + + return 1; + } + + $filenames = $input->getArgument('filename'); + + if (0 === count($filenames)) { + if (0 !== ftell(STDIN)) { + throw new \RuntimeException('Please provide a filename or pipe template content to STDIN.'); + } + + $template = ''; + while (!feof(STDIN)) { + $template .= fread(STDIN, 1024); + } + + return $this->display($input, $output, $io, array($this->validate($twig, $template, uniqid('sf_', true)))); + } + + $filesInfo = $this->getFilesInfo($twig, $filenames); + + return $this->display($input, $output, $io, $filesInfo); + } + + private function getFilesInfo(\Twig_Environment $twig, array $filenames) + { + $filesInfo = array(); + foreach ($filenames as $filename) { + foreach ($this->findFiles($filename) as $file) { + $filesInfo[] = $this->validate($twig, file_get_contents($file), $file); + } + } + + return $filesInfo; + } + + protected function findFiles($filename) + { + if (is_file($filename)) { + return array($filename); + } elseif (is_dir($filename)) { + return Finder::create()->files()->in($filename)->name('*.twig'); + } + + throw new \RuntimeException(sprintf('File or directory "%s" is not readable', $filename)); + } + + private function validate(\Twig_Environment $twig, $template, $file) + { + $realLoader = $twig->getLoader(); + try { + $temporaryLoader = new \Twig_Loader_Array(array((string) $file => $template)); + $twig->setLoader($temporaryLoader); + $nodeTree = $twig->parse($twig->tokenize(new \Twig_Source($template, (string) $file))); + $twig->compile($nodeTree); + $twig->setLoader($realLoader); + } catch (\Twig_Error $e) { + $twig->setLoader($realLoader); + + return array('template' => $template, 'file' => $file, 'valid' => false, 'exception' => $e); + } + + return array('template' => $template, 'file' => $file, 'valid' => true); + } + + private function display(InputInterface $input, OutputInterface $output, SymfonyStyle $io, $files) + { + switch ($input->getOption('format')) { + case 'txt': + return $this->displayTxt($output, $io, $files); + case 'json': + return $this->displayJson($output, $files); + default: + throw new \InvalidArgumentException(sprintf('The format "%s" is not supported.', $input->getOption('format'))); + } + } + + private function displayTxt(OutputInterface $output, SymfonyStyle $io, $filesInfo) + { + $errors = 0; + + foreach ($filesInfo as $info) { + if ($info['valid'] && $output->isVerbose()) { + $io->comment('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); + } elseif (!$info['valid']) { + ++$errors; + $this->renderException($io, $info['template'], $info['exception'], $info['file']); + } + } + + if ($errors === 0) { + $io->success(sprintf('All %d Twig files contain valid syntax.', count($filesInfo))); + } else { + $io->warning(sprintf('%d Twig files have valid syntax and %d contain errors.', count($filesInfo) - $errors, $errors)); + } + + return min($errors, 1); + } + + private function displayJson(OutputInterface $output, $filesInfo) + { + $errors = 0; + + array_walk($filesInfo, function (&$v) use (&$errors) { + $v['file'] = (string) $v['file']; + unset($v['template']); + if (!$v['valid']) { + $v['message'] = $v['exception']->getMessage(); + unset($v['exception']); + ++$errors; + } + }); + + $output->writeln(json_encode($filesInfo, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); + + return min($errors, 1); + } + + private function renderException(OutputInterface $output, $template, \Twig_Error $exception, $file = null) + { + $line = $exception->getTemplateLine(); + + if ($file) { + $output->text(sprintf(' ERROR in %s (line %s)', $file, $line)); + } else { + $output->text(sprintf(' ERROR (line %s)', $line)); + } + + foreach ($this->getContext($template, $line) as $lineNumber => $code) { + $output->text(sprintf( + '%s %-6s %s', + $lineNumber === $line ? ' >> ' : ' ', + $lineNumber, + $code + )); + if ($lineNumber === $line) { + $output->text(sprintf(' >> %s ', $exception->getRawMessage())); + } + } + } + + private function getContext($template, $line, $context = 3) + { + $lines = explode("\n", $template); + + $position = max(0, $line - $context); + $max = min(count($lines), $line - 1 + $context); + + $result = array(); + while ($position < $max) { + $result[$position + 1] = $lines[$position]; + ++$position; + } + + return $result; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..90b21d0495ff7c4d4a739b8cf37fcbfa01e7cf41 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php @@ -0,0 +1,155 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\DataCollector; + +use Symfony\Component\HttpKernel\DataCollector\DataCollector; +use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * TwigDataCollector. + * + * @author Fabien Potencier + */ +class TwigDataCollector extends DataCollector implements LateDataCollectorInterface +{ + private $profile; + private $computed; + + public function __construct(\Twig_Profiler_Profile $profile) + { + $this->profile = $profile; + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + } + + /** + * {@inheritdoc} + */ + public function lateCollect() + { + $this->data['profile'] = serialize($this->profile); + } + + public function getTime() + { + return $this->getProfile()->getDuration() * 1000; + } + + public function getTemplateCount() + { + return $this->getComputedData('template_count'); + } + + public function getTemplates() + { + return $this->getComputedData('templates'); + } + + public function getBlockCount() + { + return $this->getComputedData('block_count'); + } + + public function getMacroCount() + { + return $this->getComputedData('macro_count'); + } + + public function getHtmlCallGraph() + { + $dumper = new \Twig_Profiler_Dumper_Html(); + $dump = $dumper->dump($this->getProfile()); + + // needed to remove the hardcoded CSS styles + $dump = str_replace(array( + '', + '', + '', + ), array( + '', + '', + '', + ), $dump); + + return new \Twig_Markup($dump, 'UTF-8'); + } + + public function getProfile() + { + if (null === $this->profile) { + $this->profile = unserialize($this->data['profile']); + } + + return $this->profile; + } + + private function getComputedData($index) + { + if (null === $this->computed) { + $this->computed = $this->computeData($this->getProfile()); + } + + return $this->computed[$index]; + } + + private function computeData(\Twig_Profiler_Profile $profile) + { + $data = array( + 'template_count' => 0, + 'block_count' => 0, + 'macro_count' => 0, + ); + + $templates = array(); + foreach ($profile as $p) { + $d = $this->computeData($p); + + $data['template_count'] += ($p->isTemplate() ? 1 : 0) + $d['template_count']; + $data['block_count'] += ($p->isBlock() ? 1 : 0) + $d['block_count']; + $data['macro_count'] += ($p->isMacro() ? 1 : 0) + $d['macro_count']; + + if ($p->isTemplate()) { + if (!isset($templates[$p->getTemplate()])) { + $templates[$p->getTemplate()] = 1; + } else { + ++$templates[$p->getTemplate()]; + } + } + + foreach ($d['templates'] as $template => $count) { + if (!isset($templates[$template])) { + $templates[$template] = $count; + } else { + $templates[$template] += $count; + } + } + } + $data['templates'] = $templates; + + return $data; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'twig'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/AssetExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/AssetExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..f599a9eb5c9b655fecc895d1546ad4e3cab9405d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/AssetExtension.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Component\Asset\Packages; + +/** + * Twig extension for the Symfony Asset component. + * + * @author Fabien Potencier + */ +class AssetExtension extends \Twig_Extension +{ + private $packages; + + public function __construct(Packages $packages) + { + $this->packages = $packages; + } + + /** + * {@inheritdoc} + */ + public function getFunctions() + { + return array( + new \Twig_SimpleFunction('asset', array($this, 'getAssetUrl')), + new \Twig_SimpleFunction('asset_version', array($this, 'getAssetVersion')), + ); + } + + /** + * Returns the public url/path of an asset. + * + * If the package used to generate the path is an instance of + * UrlPackage, you will always get a URL and not a path. + * + * @param string $path A public path + * @param string $packageName The name of the asset package to use + * + * @return string The public path of the asset + */ + public function getAssetUrl($path, $packageName = null) + { + return $this->packages->getUrl($path, $packageName); + } + + /** + * Returns the version of an asset. + * + * @param string $path A public path + * @param string $packageName The name of the asset package to use + * + * @return string The asset version + */ + public function getAssetVersion($path, $packageName = null) + { + return $this->packages->getVersion($path, $packageName); + } + + /** + * Returns the name of the extension. + * + * @return string The extension name + */ + public function getName() + { + return 'asset'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/CodeExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/CodeExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..9861277db0f810421616a29fa57394ed114b6f0d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/CodeExtension.php @@ -0,0 +1,264 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; + +/** + * Twig extension relate to PHP code and used by the profiler and the default exception templates. + * + * @author Fabien Potencier + */ +class CodeExtension extends \Twig_Extension +{ + private $fileLinkFormat; + private $rootDir; + private $charset; + + /** + * Constructor. + * + * @param string|FileLinkFormatter $fileLinkFormat The format for links to source files + * @param string $rootDir The project root directory + * @param string $charset The charset + */ + public function __construct($fileLinkFormat, $rootDir, $charset) + { + $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + $this->rootDir = str_replace('/', DIRECTORY_SEPARATOR, dirname($rootDir)).DIRECTORY_SEPARATOR; + $this->charset = $charset; + } + + /** + * {@inheritdoc} + */ + public function getFilters() + { + return array( + new \Twig_SimpleFilter('abbr_class', array($this, 'abbrClass'), array('is_safe' => array('html'))), + new \Twig_SimpleFilter('abbr_method', array($this, 'abbrMethod'), array('is_safe' => array('html'))), + new \Twig_SimpleFilter('format_args', array($this, 'formatArgs'), array('is_safe' => array('html'))), + new \Twig_SimpleFilter('format_args_as_text', array($this, 'formatArgsAsText')), + new \Twig_SimpleFilter('file_excerpt', array($this, 'fileExcerpt'), array('is_safe' => array('html'))), + new \Twig_SimpleFilter('format_file', array($this, 'formatFile'), array('is_safe' => array('html'))), + new \Twig_SimpleFilter('format_file_from_text', array($this, 'formatFileFromText'), array('is_safe' => array('html'))), + new \Twig_SimpleFilter('format_log_message', array($this, 'formatLogMessage'), array('is_safe' => array('html'))), + new \Twig_SimpleFilter('file_link', array($this, 'getFileLink')), + ); + } + + public function abbrClass($class) + { + $parts = explode('\\', $class); + $short = array_pop($parts); + + return sprintf('%s', $class, $short); + } + + public function abbrMethod($method) + { + if (false !== strpos($method, '::')) { + list($class, $method) = explode('::', $method, 2); + $result = sprintf('%s::%s()', $this->abbrClass($class), $method); + } elseif ('Closure' === $method) { + $result = sprintf('%s', $method, $method); + } else { + $result = sprintf('%s()', $method, $method); + } + + return $result; + } + + /** + * Formats an array as a string. + * + * @param array $args The argument array + * + * @return string + */ + public function formatArgs($args) + { + $result = array(); + foreach ($args as $key => $item) { + if ('object' === $item[0]) { + $parts = explode('\\', $item[1]); + $short = array_pop($parts); + $formattedValue = sprintf('object(%s)', $item[1], $short); + } elseif ('array' === $item[0]) { + $formattedValue = sprintf('array(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); + } elseif ('null' === $item[0]) { + $formattedValue = 'null'; + } elseif ('boolean' === $item[0]) { + $formattedValue = ''.strtolower(var_export($item[1], true)).''; + } elseif ('resource' === $item[0]) { + $formattedValue = 'resource'; + } else { + $formattedValue = str_replace("\n", '', htmlspecialchars(var_export($item[1], true), ENT_COMPAT | ENT_SUBSTITUTE, $this->charset)); + } + + $result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue); + } + + return implode(', ', $result); + } + + /** + * Formats an array as a string. + * + * @param array $args The argument array + * + * @return string + */ + public function formatArgsAsText($args) + { + return strip_tags($this->formatArgs($args)); + } + + /** + * Returns an excerpt of a code file around the given line number. + * + * @param string $file A file path + * @param int $line The selected line number + * @param int $srcContext The number of displayed lines around or -1 for the whole file + * + * @return string An HTML string + */ + public function fileExcerpt($file, $line, $srcContext = 3) + { + if (is_readable($file)) { + // highlight_file could throw warnings + // see https://bugs.php.net/bug.php?id=25725 + $code = @highlight_file($file, true); + // remove main code/span tags + $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); + // split multiline spans + $code = preg_replace_callback('#]++)>((?:[^<]*+
    )++[^<]*+)
    #', function ($m) { + return "".str_replace('
    ', "

    ", $m[2]).''; + }, $code); + $content = explode('
    ', $code); + + $lines = array(); + if (0 > $srcContext) { + $srcContext = count($content); + } + + for ($i = max($line - $srcContext, 1), $max = min($line + $srcContext, count($content)); $i <= $max; ++$i) { + $lines[] = ''.self::fixCodeMarkup($content[$i - 1]).''; + } + + return '
      '.implode("\n", $lines).'
    '; + } + } + + /** + * Formats a file path. + * + * @param string $file An absolute file path + * @param int $line The line number + * @param string $text Use this text for the link rather than the file path + * + * @return string + */ + public function formatFile($file, $line, $text = null) + { + $file = trim($file); + + if (null === $text) { + $text = str_replace('/', DIRECTORY_SEPARATOR, $file); + if (0 === strpos($text, $this->rootDir)) { + $text = substr($text, strlen($this->rootDir)); + $text = explode(DIRECTORY_SEPARATOR, $text, 2); + $text = sprintf('%s%s', $this->rootDir, $text[0], isset($text[1]) ? DIRECTORY_SEPARATOR.$text[1] : ''); + } + } + + $text = "$text at line $line"; + + if (false !== $link = $this->getFileLink($file, $line)) { + return sprintf('%s', htmlspecialchars($link, ENT_COMPAT | ENT_SUBSTITUTE, $this->charset), $text); + } + + return $text; + } + + /** + * Returns the link for a given file/line pair. + * + * @param string $file An absolute file path + * @param int $line The line number + * + * @return string A link of false + */ + public function getFileLink($file, $line) + { + if ($fmt = $this->fileLinkFormat) { + return is_string($fmt) ? strtr($fmt, array('%f' => $file, '%l' => $line)) : $fmt->format($file, $line); + } + + return false; + } + + public function formatFileFromText($text) + { + return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', function ($match) { + return 'in '.$this->formatFile($match[2], $match[3]); + }, $text); + } + + /** + * @internal + */ + public function formatLogMessage($message, array $context) + { + if ($context && false !== strpos($message, '{')) { + $replacements = array(); + foreach ($context as $key => $val) { + if (is_scalar($val)) { + $replacements['{'.$key.'}'] = $val; + } + } + + if ($replacements) { + $message = strtr($message, $replacements); + } + } + + return htmlspecialchars($message, ENT_COMPAT | ENT_SUBSTITUTE, $this->charset); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'code'; + } + + protected static function fixCodeMarkup($line) + { + //
    ending tag from previous line + $opening = strpos($line, ''); + if (false !== $closing && (false === $opening || $closing < $opening)) { + $line = substr_replace($line, '', $closing, 7); + } + + // missing
    tag at the end of line + $opening = strpos($line, ''); + if (false !== $opening && (false === $closing || $closing > $opening)) { + $line .= '
    '; + } + + return $line; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/DumpExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/DumpExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..2407f61013e86f158b6957fded7f673515d2fa94 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/DumpExtension.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Bridge\Twig\TokenParser\DumpTokenParser; +use Symfony\Component\VarDumper\Cloner\ClonerInterface; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; + +/** + * Provides integration of the dump() function with Twig. + * + * @author Nicolas Grekas + */ +class DumpExtension extends \Twig_Extension +{ + private $cloner; + private $dumper; + + public function __construct(ClonerInterface $cloner, HtmlDumper $dumper = null) + { + $this->cloner = $cloner; + $this->dumper = $dumper ?: new HtmlDumper(); + } + + public function getFunctions() + { + return array( + new \Twig_SimpleFunction('dump', array($this, 'dump'), array('is_safe' => array('html'), 'needs_context' => true, 'needs_environment' => true)), + ); + } + + public function getTokenParsers() + { + return array(new DumpTokenParser()); + } + + public function getName() + { + return 'dump'; + } + + public function dump(\Twig_Environment $env, $context) + { + if (!$env->isDebug()) { + return; + } + + if (2 === func_num_args()) { + $vars = array(); + foreach ($context as $key => $value) { + if (!$value instanceof \Twig_Template) { + $vars[$key] = $value; + } + } + + $vars = array($vars); + } else { + $vars = func_get_args(); + unset($vars[0], $vars[1]); + } + + $dump = fopen('php://memory', 'r+b'); + $this->dumper->setCharset($env->getCharset()); + + foreach ($vars as $value) { + $this->dumper->dump($this->cloner->cloneVar($value), $dump); + } + + return stream_get_contents($dump, -1, 0); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/ExpressionExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/ExpressionExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..6b30a279419b76881961c685605cc971e6e0c330 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/ExpressionExtension.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Component\ExpressionLanguage\Expression; + +/** + * ExpressionExtension gives a way to create Expressions from a template. + * + * @author Fabien Potencier + */ +class ExpressionExtension extends \Twig_Extension +{ + /** + * {@inheritdoc} + */ + public function getFunctions() + { + return array( + new \Twig_SimpleFunction('expression', array($this, 'createExpression')), + ); + } + + public function createExpression($expression) + { + return new Expression($expression); + } + + /** + * Returns the name of the extension. + * + * @return string The extension name + */ + public function getName() + { + return 'expression'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/FormExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/FormExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..81a8683c35b97f497ff6a97ed2b563e3297b9f14 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/FormExtension.php @@ -0,0 +1,188 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Bridge\Twig\TokenParser\FormThemeTokenParser; +use Symfony\Bridge\Twig\Form\TwigRendererInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\Form\ChoiceList\View\ChoiceView; + +/** + * FormExtension extends Twig with form capabilities. + * + * @author Fabien Potencier + * @author Bernhard Schussek + */ +class FormExtension extends \Twig_Extension implements \Twig_Extension_InitRuntimeInterface +{ + /** + * @deprecated since version 3.2, to be removed in 4.0 alongside with magic methods below + */ + private $renderer; + + public function __construct($renderer = null) + { + if ($renderer instanceof TwigRendererInterface) { + @trigger_error(sprintf('Passing a Twig Form Renderer to the "%s" constructor is deprecated since version 3.2 and won\'t be possible in 4.0. Pass the Twig_Environment to the TwigRendererEngine constructor instead.', static::class), E_USER_DEPRECATED); + } elseif (null !== $renderer && !(is_array($renderer) && isset($renderer[0], $renderer[1]) && $renderer[0] instanceof ContainerInterface)) { + throw new \InvalidArgumentException(sprintf('Passing any arguments the constructor of %s is reserved for internal use.', __CLASS__)); + } + $this->renderer = $renderer; + } + + /** + * {@inheritdoc} + * + * To be removed in 4.0 + */ + public function initRuntime(\Twig_Environment $environment) + { + if ($this->renderer instanceof TwigRendererInterface) { + $this->renderer->setEnvironment($environment); + } elseif (null !== $this->renderer) { + $this->renderer[2] = $environment; + } + } + + /** + * {@inheritdoc} + */ + public function getTokenParsers() + { + return array( + // {% form_theme form "SomeBundle::widgets.twig" %} + new FormThemeTokenParser(), + ); + } + + /** + * {@inheritdoc} + */ + public function getFunctions() + { + return array( + new \Twig_SimpleFunction('form_widget', null, array('node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => array('html'))), + new \Twig_SimpleFunction('form_errors', null, array('node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => array('html'))), + new \Twig_SimpleFunction('form_label', null, array('node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => array('html'))), + new \Twig_SimpleFunction('form_row', null, array('node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => array('html'))), + new \Twig_SimpleFunction('form_rest', null, array('node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => array('html'))), + new \Twig_SimpleFunction('form', null, array('node_class' => 'Symfony\Bridge\Twig\Node\RenderBlockNode', 'is_safe' => array('html'))), + new \Twig_SimpleFunction('form_start', null, array('node_class' => 'Symfony\Bridge\Twig\Node\RenderBlockNode', 'is_safe' => array('html'))), + new \Twig_SimpleFunction('form_end', null, array('node_class' => 'Symfony\Bridge\Twig\Node\RenderBlockNode', 'is_safe' => array('html'))), + new \Twig_SimpleFunction('csrf_token', array('Symfony\Bridge\Twig\Form\TwigRenderer', 'renderCsrfToken')), + ); + } + + /** + * {@inheritdoc} + */ + public function getFilters() + { + return array( + new \Twig_SimpleFilter('humanize', array('Symfony\Bridge\Twig\Form\TwigRenderer', 'humanize')), + ); + } + + /** + * {@inheritdoc} + */ + public function getTests() + { + return array( + new \Twig_SimpleTest('selectedchoice', 'Symfony\Bridge\Twig\Extension\twig_is_selected_choice'), + ); + } + + /** + * @internal + */ + public function __get($name) + { + if ('renderer' === $name) { + @trigger_error(sprintf('Using the "%s::$renderer" property is deprecated since version 3.2 as it will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED); + + if (is_array($this->renderer)) { + $renderer = $this->renderer[0]->get($this->renderer[1]); + if (isset($this->renderer[2])) { + $renderer->setEnvironment($this->renderer[2]); + } + $this->renderer = $renderer; + } + } + + return $this->$name; + } + + /** + * @internal + */ + public function __set($name, $value) + { + if ('renderer' === $name) { + @trigger_error(sprintf('Using the "%s::$renderer" property is deprecated since version 3.2 as it will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED); + } + + $this->$name = $value; + } + + /** + * @internal + */ + public function __isset($name) + { + if ('renderer' === $name) { + @trigger_error(sprintf('Using the "%s::$renderer" property is deprecated since version 3.2 as it will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED); + } + + return isset($this->$name); + } + + /** + * @internal + */ + public function __unset($name) + { + if ('renderer' === $name) { + @trigger_error(sprintf('Using the "%s::$renderer" property is deprecated since version 3.2 as it will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED); + } + + unset($this->$name); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'form'; + } +} + +/** + * Returns whether a choice is selected for a given form value. + * + * This is a function and not callable due to performance reasons. + * + * @param string|array $selectedValue The selected value to compare + * + * @return bool Whether the choice is selected + * + * @see ChoiceView::isSelected() + */ +function twig_is_selected_choice(ChoiceView $choice, $selectedValue) +{ + if (is_array($selectedValue)) { + return in_array($choice->value, $selectedValue, true); + } + + return $choice->value === $selectedValue; +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/HttpFoundationExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/HttpFoundationExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..69d6d326f4d08e5ca7c9fd703f6a360a66418f86 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/HttpFoundationExtension.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\RequestContext; + +/** + * Twig extension for the Symfony HttpFoundation component. + * + * @author Fabien Potencier + */ +class HttpFoundationExtension extends \Twig_Extension +{ + private $requestStack; + private $requestContext; + + public function __construct(RequestStack $requestStack, RequestContext $requestContext = null) + { + $this->requestStack = $requestStack; + $this->requestContext = $requestContext; + } + + /** + * {@inheritdoc} + */ + public function getFunctions() + { + return array( + new \Twig_SimpleFunction('absolute_url', array($this, 'generateAbsoluteUrl')), + new \Twig_SimpleFunction('relative_path', array($this, 'generateRelativePath')), + ); + } + + /** + * Returns the absolute URL for the given absolute or relative path. + * + * This method returns the path unchanged if no request is available. + * + * @param string $path The path + * + * @return string The absolute URL + * + * @see Request::getUriForPath() + */ + public function generateAbsoluteUrl($path) + { + if (false !== strpos($path, '://') || '//' === substr($path, 0, 2)) { + return $path; + } + + if (!$request = $this->requestStack->getMasterRequest()) { + if (null !== $this->requestContext && '' !== $host = $this->requestContext->getHost()) { + $scheme = $this->requestContext->getScheme(); + $port = ''; + + if ('http' === $scheme && 80 != $this->requestContext->getHttpPort()) { + $port = ':'.$this->requestContext->getHttpPort(); + } elseif ('https' === $scheme && 443 != $this->requestContext->getHttpsPort()) { + $port = ':'.$this->requestContext->getHttpsPort(); + } + + if ('/' !== $path[0]) { + $path = rtrim($this->requestContext->getBaseUrl(), '/').'/'.$path; + } + + return $scheme.'://'.$host.$port.$path; + } + + return $path; + } + + if (!$path || '/' !== $path[0]) { + $prefix = $request->getPathInfo(); + $last = strlen($prefix) - 1; + if ($last !== $pos = strrpos($prefix, '/')) { + $prefix = substr($prefix, 0, $pos).'/'; + } + + return $request->getUriForPath($prefix.$path); + } + + return $request->getSchemeAndHttpHost().$path; + } + + /** + * Returns a relative path based on the current Request. + * + * This method returns the path unchanged if no request is available. + * + * @param string $path The path + * + * @return string The relative path + * + * @see Request::getRelativeUriForPath() + */ + public function generateRelativePath($path) + { + if (false !== strpos($path, '://') || '//' === substr($path, 0, 2)) { + return $path; + } + + if (!$request = $this->requestStack->getMasterRequest()) { + return $path; + } + + return $request->getRelativeUriForPath($path); + } + + /** + * Returns the name of the extension. + * + * @return string The extension name + */ + public function getName() + { + return 'request'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..43b23bb9f66952c16db7a5b253ccc48fb21e6a6c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Component\HttpKernel\Controller\ControllerReference; + +/** + * Provides integration with the HttpKernel component. + * + * @author Fabien Potencier + */ +class HttpKernelExtension extends \Twig_Extension +{ + public function getFunctions() + { + return array( + new \Twig_SimpleFunction('render', array(HttpKernelRuntime::class, 'renderFragment'), array('is_safe' => array('html'))), + new \Twig_SimpleFunction('render_*', array(HttpKernelRuntime::class, 'renderFragmentStrategy'), array('is_safe' => array('html'))), + new \Twig_SimpleFunction('controller', static::class.'::controller'), + ); + } + + public static function controller($controller, $attributes = array(), $query = array()) + { + return new ControllerReference($controller, $attributes, $query); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'http_kernel'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/HttpKernelRuntime.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/HttpKernelRuntime.php new file mode 100644 index 0000000000000000000000000000000000000000..3c1f1a015e10f9a1aa14581d50c45ea68b4e3170 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/HttpKernelRuntime.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Component\HttpKernel\Fragment\FragmentHandler; +use Symfony\Component\HttpKernel\Controller\ControllerReference; + +/** + * Provides integration with the HttpKernel component. + * + * @author Fabien Potencier + */ +class HttpKernelRuntime +{ + private $handler; + + public function __construct(FragmentHandler $handler) + { + $this->handler = $handler; + } + + /** + * Renders a fragment. + * + * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance + * @param array $options An array of options + * + * @return string The fragment content + * + * @see FragmentHandler::render() + */ + public function renderFragment($uri, $options = array()) + { + $strategy = isset($options['strategy']) ? $options['strategy'] : 'inline'; + unset($options['strategy']); + + return $this->handler->render($uri, $strategy, $options); + } + + /** + * Renders a fragment. + * + * @param string $strategy A strategy name + * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance + * @param array $options An array of options + * + * @return string The fragment content + * + * @see FragmentHandler::render() + */ + public function renderFragmentStrategy($strategy, $uri, $options = array()) + { + return $this->handler->render($uri, $strategy, $options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/LogoutUrlExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/LogoutUrlExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..ea105e8d955e42e83a39114af300dbf5de265a57 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/LogoutUrlExtension.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Component\Security\Http\Logout\LogoutUrlGenerator; + +/** + * LogoutUrlHelper provides generator functions for the logout URL to Twig. + * + * @author Jeremy Mikola + */ +class LogoutUrlExtension extends \Twig_Extension +{ + private $generator; + + public function __construct(LogoutUrlGenerator $generator) + { + $this->generator = $generator; + } + + /** + * {@inheritdoc} + */ + public function getFunctions() + { + return array( + new \Twig_SimpleFunction('logout_url', array($this, 'getLogoutUrl')), + new \Twig_SimpleFunction('logout_path', array($this, 'getLogoutPath')), + ); + } + + /** + * Generates the relative logout URL for the firewall. + * + * @param string|null $key The firewall key or null to use the current firewall key + * + * @return string The relative logout URL + */ + public function getLogoutPath($key = null) + { + return $this->generator->getLogoutPath($key); + } + + /** + * Generates the absolute logout URL for the firewall. + * + * @param string|null $key The firewall key or null to use the current firewall key + * + * @return string The absolute logout URL + */ + public function getLogoutUrl($key = null) + { + return $this->generator->getLogoutUrl($key); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'logout_url'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/ProfilerExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/ProfilerExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..648a6c8036d7554289fc59572b8c676157033aca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/ProfilerExtension.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\Bridge\Twig\Extension; + +use Symfony\Component\Stopwatch\Stopwatch; + +/** + * @author Fabien Potencier + */ +class ProfilerExtension extends \Twig_Extension_Profiler +{ + private $stopwatch; + private $events; + + public function __construct(\Twig_Profiler_Profile $profile, Stopwatch $stopwatch = null) + { + parent::__construct($profile); + + $this->stopwatch = $stopwatch; + $this->events = new \SplObjectStorage(); + } + + public function enter(\Twig_Profiler_Profile $profile) + { + if ($this->stopwatch && $profile->isTemplate()) { + $this->events[$profile] = $this->stopwatch->start($profile->getName(), 'template'); + } + + parent::enter($profile); + } + + public function leave(\Twig_Profiler_Profile $profile) + { + parent::leave($profile); + + if ($this->stopwatch && $profile->isTemplate()) { + $this->events[$profile]->stop(); + unset($this->events[$profile]); + } + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'native_profiler'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/RoutingExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/RoutingExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..81cef949c74082ba23772a8fd9beab166c128d09 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/RoutingExtension.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; + +/** + * Provides integration of the Routing component with Twig. + * + * @author Fabien Potencier + */ +class RoutingExtension extends \Twig_Extension +{ + private $generator; + + public function __construct(UrlGeneratorInterface $generator) + { + $this->generator = $generator; + } + + /** + * Returns a list of functions to add to the existing list. + * + * @return array An array of functions + */ + public function getFunctions() + { + return array( + new \Twig_SimpleFunction('url', array($this, 'getUrl'), array('is_safe_callback' => array($this, 'isUrlGenerationSafe'))), + new \Twig_SimpleFunction('path', array($this, 'getPath'), array('is_safe_callback' => array($this, 'isUrlGenerationSafe'))), + ); + } + + /** + * @param string $name + * @param array $parameters + * @param bool $relative + * + * @return string + */ + public function getPath($name, $parameters = array(), $relative = false) + { + return $this->generator->generate($name, $parameters, $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH); + } + + /** + * @param string $name + * @param array $parameters + * @param bool $schemeRelative + * + * @return string + */ + public function getUrl($name, $parameters = array(), $schemeRelative = false) + { + return $this->generator->generate($name, $parameters, $schemeRelative ? UrlGeneratorInterface::NETWORK_PATH : UrlGeneratorInterface::ABSOLUTE_URL); + } + + /** + * Determines at compile time whether the generated URL will be safe and thus + * saving the unneeded automatic escaping for performance reasons. + * + * The URL generation process percent encodes non-alphanumeric characters. So there is no risk + * that malicious/invalid characters are part of the URL. The only character within an URL that + * must be escaped in html is the ampersand ("&") which separates query params. So we cannot mark + * the URL generation as always safe, but only when we are sure there won't be multiple query + * params. This is the case when there are none or only one constant parameter given. + * E.g. we know beforehand this will be safe: + * - path('route') + * - path('route', {'param': 'value'}) + * But the following may not: + * - path('route', var) + * - path('route', {'param': ['val1', 'val2'] }) // a sub-array + * - path('route', {'param1': 'value1', 'param2': 'value2'}) + * If param1 and param2 reference placeholder in the route, it would still be safe. But we don't know. + * + * @param \Twig_Node $argsNode The arguments of the path/url function + * + * @return array An array with the contexts the URL is safe + */ + public function isUrlGenerationSafe(\Twig_Node $argsNode) + { + // support named arguments + $paramsNode = $argsNode->hasNode('parameters') ? $argsNode->getNode('parameters') : ( + $argsNode->hasNode(1) ? $argsNode->getNode(1) : null + ); + + if (null === $paramsNode || $paramsNode instanceof \Twig_Node_Expression_Array && count($paramsNode) <= 2 && + (!$paramsNode->hasNode(1) || $paramsNode->getNode(1) instanceof \Twig_Node_Expression_Constant) + ) { + return array('html'); + } + + return array(); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'routing'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/SecurityExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/SecurityExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..fa5fae2e77a01a8e3b63ce563939b884db93daaf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/SecurityExtension.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Component\Security\Acl\Voter\FieldVote; +use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException; + +/** + * SecurityExtension exposes security context features. + * + * @author Fabien Potencier + */ +class SecurityExtension extends \Twig_Extension +{ + private $securityChecker; + + public function __construct(AuthorizationCheckerInterface $securityChecker = null) + { + $this->securityChecker = $securityChecker; + } + + public function isGranted($role, $object = null, $field = null) + { + if (null === $this->securityChecker) { + return false; + } + + if (null !== $field) { + $object = new FieldVote($object, $field); + } + + try { + return $this->securityChecker->isGranted($role, $object); + } catch (AuthenticationCredentialsNotFoundException $e) { + return false; + } + } + + /** + * {@inheritdoc} + */ + public function getFunctions() + { + return array( + new \Twig_SimpleFunction('is_granted', array($this, 'isGranted')), + ); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'security'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/StopwatchExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/StopwatchExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..52af92324c22833510e098138b0f0289054446bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/StopwatchExtension.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\Bridge\Twig\Extension; + +use Symfony\Component\Stopwatch\Stopwatch; +use Symfony\Bridge\Twig\TokenParser\StopwatchTokenParser; + +/** + * Twig extension for the stopwatch helper. + * + * @author Wouter J + */ +class StopwatchExtension extends \Twig_Extension +{ + private $stopwatch; + + /** + * @var bool + */ + private $enabled; + + public function __construct(Stopwatch $stopwatch = null, $enabled = true) + { + $this->stopwatch = $stopwatch; + $this->enabled = $enabled; + } + + public function getStopwatch() + { + return $this->stopwatch; + } + + public function getTokenParsers() + { + return array( + /* + * {% stopwatch foo %} + * Some stuff which will be recorded on the timeline + * {% endstopwatch %} + */ + new StopwatchTokenParser($this->stopwatch !== null && $this->enabled), + ); + } + + public function getName() + { + return 'stopwatch'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/TranslationExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/TranslationExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..f1f2fbd20b82e1c91a65a177ef4289f7d80ad97e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/TranslationExtension.php @@ -0,0 +1,108 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Bridge\Twig\TokenParser\TransTokenParser; +use Symfony\Bridge\Twig\TokenParser\TransChoiceTokenParser; +use Symfony\Bridge\Twig\TokenParser\TransDefaultDomainTokenParser; +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Bridge\Twig\NodeVisitor\TranslationNodeVisitor; +use Symfony\Bridge\Twig\NodeVisitor\TranslationDefaultDomainNodeVisitor; + +/** + * Provides integration of the Translation component with Twig. + * + * @author Fabien Potencier + */ +class TranslationExtension extends \Twig_Extension +{ + private $translator; + private $translationNodeVisitor; + + public function __construct(TranslatorInterface $translator, \Twig_NodeVisitorInterface $translationNodeVisitor = null) + { + if (!$translationNodeVisitor) { + $translationNodeVisitor = new TranslationNodeVisitor(); + } + + $this->translator = $translator; + $this->translationNodeVisitor = $translationNodeVisitor; + } + + public function getTranslator() + { + return $this->translator; + } + + /** + * {@inheritdoc} + */ + public function getFilters() + { + return array( + new \Twig_SimpleFilter('trans', array($this, 'trans')), + new \Twig_SimpleFilter('transchoice', array($this, 'transchoice')), + ); + } + + /** + * Returns the token parser instance to add to the existing list. + * + * @return array An array of Twig_TokenParser instances + */ + public function getTokenParsers() + { + return array( + // {% trans %}Symfony is great!{% endtrans %} + new TransTokenParser(), + + // {% transchoice count %} + // {0} There is no apples|{1} There is one apple|]1,Inf] There is {{ count }} apples + // {% endtranschoice %} + new TransChoiceTokenParser(), + + // {% trans_default_domain "foobar" %} + new TransDefaultDomainTokenParser(), + ); + } + + /** + * {@inheritdoc} + */ + public function getNodeVisitors() + { + return array($this->translationNodeVisitor, new TranslationDefaultDomainNodeVisitor()); + } + + public function getTranslationNodeVisitor() + { + return $this->translationNodeVisitor; + } + + public function trans($message, array $arguments = array(), $domain = null, $locale = null) + { + return $this->translator->trans($message, $arguments, $domain, $locale); + } + + public function transchoice($message, $count, array $arguments = array(), $domain = null, $locale = null) + { + return $this->translator->transChoice($message, $count, array_merge(array('%count%' => $count), $arguments), $domain, $locale); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'translator'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..c2c5a55af954fdbdc95782b8dcece93c700292e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Component\Workflow\Registry; + +/** + * WorkflowExtension. + * + * @author Grégoire Pineau + */ +class WorkflowExtension extends \Twig_Extension +{ + private $workflowRegistry; + + public function __construct(Registry $workflowRegistry) + { + $this->workflowRegistry = $workflowRegistry; + } + + public function getFunctions() + { + return array( + new \Twig_SimpleFunction('workflow_can', array($this, 'canTransition')), + new \Twig_SimpleFunction('workflow_transitions', array($this, 'getEnabledTransitions')), + ); + } + + public function canTransition($object, $transition, $name = null) + { + return $this->workflowRegistry->get($object, $name)->can($object, $transition); + } + + public function getEnabledTransitions($object, $name = null) + { + return $this->workflowRegistry->get($object, $name)->getEnabledTransitions($object); + } + + public function getName() + { + return 'workflow'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/YamlExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/YamlExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..df33135db97f9f526cd2fd93e5946f3bb6efda7d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/YamlExtension.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Extension; + +use Symfony\Component\Yaml\Dumper as YamlDumper; +use Symfony\Component\Yaml\Yaml; + +/** + * Provides integration of the Yaml component with Twig. + * + * @author Fabien Potencier + */ +class YamlExtension extends \Twig_Extension +{ + /** + * {@inheritdoc} + */ + public function getFilters() + { + return array( + new \Twig_SimpleFilter('yaml_encode', array($this, 'encode')), + new \Twig_SimpleFilter('yaml_dump', array($this, 'dump')), + ); + } + + public function encode($input, $inline = 0, $dumpObjects = 0) + { + static $dumper; + + if (null === $dumper) { + $dumper = new YamlDumper(); + } + + if (defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT')) { + if (is_bool($dumpObjects)) { + @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::DUMP_OBJECT flag instead.', E_USER_DEPRECATED); + + $flags = $dumpObjects ? Yaml::DUMP_OBJECT : 0; + } else { + $flags = $dumpObjects; + } + + return $dumper->dump($input, $inline, 0, $flags); + } + + return $dumper->dump($input, $inline, 0, false, $dumpObjects); + } + + public function dump($value, $inline = 0, $dumpObjects = false) + { + if (is_resource($value)) { + return '%Resource%'; + } + + if (is_array($value) || is_object($value)) { + return '%'.gettype($value).'% '.$this->encode($value, $inline, $dumpObjects); + } + + return $this->encode($value, $inline, $dumpObjects); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'yaml'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRenderer.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRenderer.php new file mode 100644 index 0000000000000000000000000000000000000000..2f526100f58c3095446eb275affee905f449728a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRenderer.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Form; + +use Symfony\Component\Form\FormRenderer; +use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; + +/** + * @author Bernhard Schussek + */ +class TwigRenderer extends FormRenderer implements TwigRendererInterface +{ + /** + * @var TwigRendererEngineInterface + */ + private $engine; + + public function __construct(TwigRendererEngineInterface $engine, CsrfTokenManagerInterface $csrfTokenManager = null) + { + parent::__construct($engine, $csrfTokenManager); + + $this->engine = $engine; + } + + /** + * {@inheritdoc} + */ + public function setEnvironment(\Twig_Environment $environment) + { + $this->engine->setEnvironment($environment); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php new file mode 100644 index 0000000000000000000000000000000000000000..fe99929df0b3d768367382eff657942b1166332f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php @@ -0,0 +1,195 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Form; + +use Symfony\Component\Form\AbstractRendererEngine; +use Symfony\Component\Form\FormView; + +/** + * @author Bernhard Schussek + */ +class TwigRendererEngine extends AbstractRendererEngine implements TwigRendererEngineInterface +{ + /** + * @var \Twig_Environment + */ + private $environment; + + /** + * @var \Twig_Template + */ + private $template; + + public function __construct(array $defaultThemes = array(), \Twig_Environment $environment = null) + { + if (null === $environment) { + @trigger_error(sprintf('Not passing a Twig Environment as the second argument for "%s" constructor is deprecated since version 3.2 and won\'t be possible in 4.0.', static::class), E_USER_DEPRECATED); + } + + parent::__construct($defaultThemes); + $this->environment = $environment; + } + + /** + * {@inheritdoc} + */ + public function setEnvironment(\Twig_Environment $environment) + { + $this->environment = $environment; + } + + /** + * {@inheritdoc} + */ + public function renderBlock(FormView $view, $resource, $blockName, array $variables = array()) + { + $cacheKey = $view->vars[self::CACHE_KEY_VAR]; + + $context = $this->environment->mergeGlobals($variables); + + ob_start(); + + // By contract,This method can only be called after getting the resource + // (which is passed to the method). Getting a resource for the first time + // (with an empty cache) is guaranteed to invoke loadResourcesFromTheme(), + // where the property $template is initialized. + + // We do not call renderBlock here to avoid too many nested level calls + // (XDebug limits the level to 100 by default) + $this->template->displayBlock($blockName, $context, $this->resources[$cacheKey]); + + return ob_get_clean(); + } + + /** + * Loads the cache with the resource for a given block name. + * + * This implementation eagerly loads all blocks of the themes assigned to the given view + * and all of its ancestors views. This is necessary, because Twig receives the + * list of blocks later. At that point, all blocks must already be loaded, for the + * case that the function "block()" is used in the Twig template. + * + * @see getResourceForBlock() + * + * @param string $cacheKey The cache key of the form view + * @param FormView $view The form view for finding the applying themes + * @param string $blockName The name of the block to load + * + * @return bool True if the resource could be loaded, false otherwise + */ + protected function loadResourceForBlockName($cacheKey, FormView $view, $blockName) + { + // The caller guarantees that $this->resources[$cacheKey][$block] is + // not set, but it doesn't have to check whether $this->resources[$cacheKey] + // is set. If $this->resources[$cacheKey] is set, all themes for this + // $cacheKey are already loaded (due to the eager population, see doc comment). + if (isset($this->resources[$cacheKey])) { + // As said in the previous, the caller guarantees that + // $this->resources[$cacheKey][$block] is not set. Since the themes are + // already loaded, it can only be a non-existing block. + $this->resources[$cacheKey][$blockName] = false; + + return false; + } + + // Recursively try to find the block in the themes assigned to $view, + // then of its parent view, then of the parent view of the parent and so on. + // When the root view is reached in this recursion, also the default + // themes are taken into account. + + // Check each theme whether it contains the searched block + if (isset($this->themes[$cacheKey])) { + for ($i = count($this->themes[$cacheKey]) - 1; $i >= 0; --$i) { + $this->loadResourcesFromTheme($cacheKey, $this->themes[$cacheKey][$i]); + // CONTINUE LOADING (see doc comment) + } + } + + // Check the default themes once we reach the root view without success + if (!$view->parent) { + for ($i = count($this->defaultThemes) - 1; $i >= 0; --$i) { + $this->loadResourcesFromTheme($cacheKey, $this->defaultThemes[$i]); + // CONTINUE LOADING (see doc comment) + } + } + + // Proceed with the themes of the parent view + if ($view->parent) { + $parentCacheKey = $view->parent->vars[self::CACHE_KEY_VAR]; + + if (!isset($this->resources[$parentCacheKey])) { + $this->loadResourceForBlockName($parentCacheKey, $view->parent, $blockName); + } + + // EAGER CACHE POPULATION (see doc comment) + foreach ($this->resources[$parentCacheKey] as $nestedBlockName => $resource) { + if (!isset($this->resources[$cacheKey][$nestedBlockName])) { + $this->resources[$cacheKey][$nestedBlockName] = $resource; + } + } + } + + // Even though we loaded the themes, it can happen that none of them + // contains the searched block + if (!isset($this->resources[$cacheKey][$blockName])) { + // Cache that we didn't find anything to speed up further accesses + $this->resources[$cacheKey][$blockName] = false; + } + + return false !== $this->resources[$cacheKey][$blockName]; + } + + /** + * Loads the resources for all blocks in a theme. + * + * @param string $cacheKey The cache key for storing the resource + * @param mixed $theme The theme to load the block from. This parameter + * is passed by reference, because it might be necessary + * to initialize the theme first. Any changes made to + * this variable will be kept and be available upon + * further calls to this method using the same theme. + */ + protected function loadResourcesFromTheme($cacheKey, &$theme) + { + if (!$theme instanceof \Twig_Template) { + /* @var \Twig_Template $theme */ + $theme = $this->environment->loadTemplate($theme); + } + + if (null === $this->template) { + // Store the first \Twig_Template instance that we find so that + // we can call displayBlock() later on. It doesn't matter *which* + // template we use for that, since we pass the used blocks manually + // anyway. + $this->template = $theme; + } + + // Use a separate variable for the inheritance traversal, because + // theme is a reference and we don't want to change it. + $currentTheme = $theme; + + $context = $this->environment->mergeGlobals(array()); + + // The do loop takes care of template inheritance. + // Add blocks from all templates in the inheritance tree, but avoid + // overriding blocks already set. + do { + foreach ($currentTheme->getBlocks() as $block => $blockData) { + if (!isset($this->resources[$cacheKey][$block])) { + // The resource given back is the key to the bucket that + // contains this block. + $this->resources[$cacheKey][$block] = $blockData; + } + } + } while (false !== $currentTheme = $currentTheme->getParent($context)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRendererEngineInterface.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRendererEngineInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c5968a1fa7683d50cb0ace05d7daa1a835c92eb8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRendererEngineInterface.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\Twig\Form; + +use Symfony\Component\Form\FormRendererEngineInterface; + +/** + * @author Bernhard Schussek + * + * @deprecated Deprecated since version 3.2, to be removed in 4.0. + */ +interface TwigRendererEngineInterface extends FormRendererEngineInterface +{ + /** + * Sets Twig's environment. + * + * @param \Twig_Environment $environment + */ + public function setEnvironment(\Twig_Environment $environment); +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRendererInterface.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRendererInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..2b2172b8cce5ae5bd51f48623575fb2b9515c8e6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRendererInterface.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\Twig\Form; + +use Symfony\Component\Form\FormRendererInterface; + +/** + * @author Bernhard Schussek + * + * @deprecated Deprecated since version 3.2, to be removed in 4.0. + */ +interface TwigRendererInterface extends FormRendererInterface +{ + /** + * Sets Twig's environment. + * + * @param \Twig_Environment $environment + */ + public function setEnvironment(\Twig_Environment $environment); +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/LICENSE b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/DumpNode.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/DumpNode.php new file mode 100644 index 0000000000000000000000000000000000000000..a66781e36550a1035366c7ca984a9ec83a80b899 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/DumpNode.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Node; + +/** + * @author Julien Galenski + */ +class DumpNode extends \Twig_Node +{ + private $varPrefix; + + public function __construct($varPrefix, \Twig_Node $values = null, $lineno, $tag = null) + { + $nodes = array(); + if (null !== $values) { + $nodes['values'] = $values; + } + + parent::__construct($nodes, array(), $lineno, $tag); + $this->varPrefix = $varPrefix; + } + + /** + * {@inheritdoc} + */ + public function compile(\Twig_Compiler $compiler) + { + $compiler + ->write("if (\$this->env->isDebug()) {\n") + ->indent(); + + if (!$this->hasNode('values')) { + // remove embedded templates (macros) from the context + $compiler + ->write(sprintf('$%svars = array();'."\n", $this->varPrefix)) + ->write(sprintf('foreach ($context as $%1$skey => $%1$sval) {'."\n", $this->varPrefix)) + ->indent() + ->write(sprintf('if (!$%sval instanceof \Twig_Template) {'."\n", $this->varPrefix)) + ->indent() + ->write(sprintf('$%1$svars[$%1$skey] = $%1$sval;'."\n", $this->varPrefix)) + ->outdent() + ->write("}\n") + ->outdent() + ->write("}\n") + ->addDebugInfo($this) + ->write(sprintf('\Symfony\Component\VarDumper\VarDumper::dump($%svars);'."\n", $this->varPrefix)); + } elseif (($values = $this->getNode('values')) && 1 === $values->count()) { + $compiler + ->addDebugInfo($this) + ->write('\Symfony\Component\VarDumper\VarDumper::dump(') + ->subcompile($values->getNode(0)) + ->raw(");\n"); + } else { + $compiler + ->addDebugInfo($this) + ->write('\Symfony\Component\VarDumper\VarDumper::dump(array('."\n") + ->indent(); + foreach ($values as $node) { + $compiler->write(''); + if ($node->hasAttribute('name')) { + $compiler + ->string($node->getAttribute('name')) + ->raw(' => '); + } + $compiler + ->subcompile($node) + ->raw(",\n"); + } + $compiler + ->outdent() + ->write("));\n"); + } + + $compiler + ->outdent() + ->write("}\n"); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/FormThemeNode.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/FormThemeNode.php new file mode 100644 index 0000000000000000000000000000000000000000..a1330413e7225bc9931d93d3bbfbf270790a5d47 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/FormThemeNode.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Node; + +/** + * @author Fabien Potencier + */ +class FormThemeNode extends \Twig_Node +{ + public function __construct(\Twig_Node $form, \Twig_Node $resources, $lineno, $tag = null) + { + parent::__construct(array('form' => $form, 'resources' => $resources), array(), $lineno, $tag); + } + + /** + * Compiles the node to PHP. + * + * @param \Twig_Compiler $compiler A Twig_Compiler instance + */ + public function compile(\Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write('$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->setTheme(') + ->subcompile($this->getNode('form')) + ->raw(', ') + ->subcompile($this->getNode('resources')) + ->raw(");\n"); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/RenderBlockNode.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/RenderBlockNode.php new file mode 100644 index 0000000000000000000000000000000000000000..6c046c380192eceb693770e09e329bd14e1f2808 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/RenderBlockNode.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Node; + +/** + * Compiles a call to {@link \Symfony\Component\Form\FormRendererInterface::renderBlock()}. + * + * The function name is used as block name. For example, if the function name + * is "foo", the block "foo" will be rendered. + * + * @author Bernhard Schussek + */ +class RenderBlockNode extends \Twig_Node_Expression_Function +{ + public function compile(\Twig_Compiler $compiler) + { + $compiler->addDebugInfo($this); + $arguments = iterator_to_array($this->getNode('arguments')); + $compiler->write('$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->renderBlock('); + + if (isset($arguments[0])) { + $compiler->subcompile($arguments[0]); + $compiler->raw(', \''.$this->getAttribute('name').'\''); + + if (isset($arguments[1])) { + $compiler->raw(', '); + $compiler->subcompile($arguments[1]); + } + } + + $compiler->raw(')'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php new file mode 100644 index 0000000000000000000000000000000000000000..47457e2dc53ae3d7f3ac45fa1a6582cfadff5ad6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Node; + +/** + * @author Bernhard Schussek + */ +class SearchAndRenderBlockNode extends \Twig_Node_Expression_Function +{ + public function compile(\Twig_Compiler $compiler) + { + $compiler->addDebugInfo($this); + $compiler->raw('$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->searchAndRenderBlock('); + + preg_match('/_([^_]+)$/', $this->getAttribute('name'), $matches); + + $label = null; + $arguments = iterator_to_array($this->getNode('arguments')); + $blockNameSuffix = $matches[1]; + + if (isset($arguments[0])) { + $compiler->subcompile($arguments[0]); + $compiler->raw(', \''.$blockNameSuffix.'\''); + + if (isset($arguments[1])) { + if ('label' === $blockNameSuffix) { + // The "label" function expects the label in the second and + // the variables in the third argument + $label = $arguments[1]; + $variables = isset($arguments[2]) ? $arguments[2] : null; + $lineno = $label->getTemplateLine(); + + if ($label instanceof \Twig_Node_Expression_Constant) { + // If the label argument is given as a constant, we can either + // strip it away if it is empty, or integrate it into the array + // of variables at compile time. + $labelIsExpression = false; + + // Only insert the label into the array if it is not empty + if (!twig_test_empty($label->getAttribute('value'))) { + $originalVariables = $variables; + $variables = new \Twig_Node_Expression_Array(array(), $lineno); + $labelKey = new \Twig_Node_Expression_Constant('label', $lineno); + + if (null !== $originalVariables) { + foreach ($originalVariables->getKeyValuePairs() as $pair) { + // Don't copy the original label attribute over if it exists + if ((string) $labelKey !== (string) $pair['key']) { + $variables->addElement($pair['value'], $pair['key']); + } + } + } + + // Insert the label argument into the array + $variables->addElement($label, $labelKey); + } + } else { + // The label argument is not a constant, but some kind of + // expression. This expression needs to be evaluated at runtime. + // Depending on the result (whether it is null or not), the + // label in the arguments should take precedence over the label + // in the attributes or not. + $labelIsExpression = true; + } + } else { + // All other functions than "label" expect the variables + // in the second argument + $label = null; + $variables = $arguments[1]; + $labelIsExpression = false; + } + + if (null !== $variables || $labelIsExpression) { + $compiler->raw(', '); + + if (null !== $variables) { + $compiler->subcompile($variables); + } + + if ($labelIsExpression) { + if (null !== $variables) { + $compiler->raw(' + '); + } + + // Check at runtime whether the label is empty. + // If not, add it to the array at runtime. + $compiler->raw('(twig_test_empty($_label_ = '); + $compiler->subcompile($label); + $compiler->raw(') ? array() : array("label" => $_label_))'); + } + } + } + } + + $compiler->raw(')'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/StopwatchNode.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/StopwatchNode.php new file mode 100644 index 0000000000000000000000000000000000000000..95d755a78cdb070b199ba02ab68f11377a571f85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/StopwatchNode.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Node; + +/** + * Represents a stopwatch node. + * + * @author Wouter J + */ +class StopwatchNode extends \Twig_Node +{ + public function __construct(\Twig_Node $name, \Twig_Node $body, \Twig_Node_Expression_AssignName $var, $lineno = 0, $tag = null) + { + parent::__construct(array('body' => $body, 'name' => $name, 'var' => $var), array(), $lineno, $tag); + } + + public function compile(\Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write('') + ->subcompile($this->getNode('var')) + ->raw(' = ') + ->subcompile($this->getNode('name')) + ->write(";\n") + ->write("\$this->env->getExtension('Symfony\Bridge\Twig\Extension\StopwatchExtension')->getStopwatch()->start(") + ->subcompile($this->getNode('var')) + ->raw(", 'template');\n") + ->subcompile($this->getNode('body')) + ->write("\$this->env->getExtension('Symfony\Bridge\Twig\Extension\StopwatchExtension')->getStopwatch()->stop(") + ->subcompile($this->getNode('var')) + ->raw(");\n") + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/TransDefaultDomainNode.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/TransDefaultDomainNode.php new file mode 100644 index 0000000000000000000000000000000000000000..adee71ffc5dc4708a5233b674f2c949b20e4495a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/TransDefaultDomainNode.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Node; + +/** + * @author Fabien Potencier + */ +class TransDefaultDomainNode extends \Twig_Node +{ + public function __construct(\Twig_Node_Expression $expr, $lineno = 0, $tag = null) + { + parent::__construct(array('expr' => $expr), array(), $lineno, $tag); + } + + /** + * Compiles the node to PHP. + * + * @param \Twig_Compiler $compiler A Twig_Compiler instance + */ + public function compile(\Twig_Compiler $compiler) + { + // noop as this node is just a marker for TranslationDefaultDomainNodeVisitor + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/TransNode.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/TransNode.php new file mode 100644 index 0000000000000000000000000000000000000000..7b2f9c090405f61d0ac3335f043e2e0794fbc36b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Node/TransNode.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Node; + +/** + * @author Fabien Potencier + */ +class TransNode extends \Twig_Node +{ + public function __construct(\Twig_Node $body, \Twig_Node $domain = null, \Twig_Node_Expression $count = null, \Twig_Node_Expression $vars = null, \Twig_Node_Expression $locale = null, $lineno = 0, $tag = null) + { + $nodes = array('body' => $body); + if (null !== $domain) { + $nodes['domain'] = $domain; + } + if (null !== $count) { + $nodes['count'] = $count; + } + if (null !== $vars) { + $nodes['vars'] = $vars; + } + if (null !== $locale) { + $nodes['locale'] = $locale; + } + + parent::__construct($nodes, array(), $lineno, $tag); + } + + /** + * Compiles the node to PHP. + * + * @param \Twig_Compiler $compiler A Twig_Compiler instance + */ + public function compile(\Twig_Compiler $compiler) + { + $compiler->addDebugInfo($this); + + $defaults = new \Twig_Node_Expression_Array(array(), -1); + if ($this->hasNode('vars') && ($vars = $this->getNode('vars')) instanceof \Twig_Node_Expression_Array) { + $defaults = $this->getNode('vars'); + $vars = null; + } + list($msg, $defaults) = $this->compileString($this->getNode('body'), $defaults, (bool) $vars); + + $method = !$this->hasNode('count') ? 'trans' : 'transChoice'; + + $compiler + ->write('echo $this->env->getExtension(\'Symfony\Bridge\Twig\Extension\TranslationExtension\')->getTranslator()->'.$method.'(') + ->subcompile($msg) + ; + + $compiler->raw(', '); + + if ($this->hasNode('count')) { + $compiler + ->subcompile($this->getNode('count')) + ->raw(', ') + ; + } + + if (null !== $vars) { + $compiler + ->raw('array_merge(') + ->subcompile($defaults) + ->raw(', ') + ->subcompile($this->getNode('vars')) + ->raw(')') + ; + } else { + $compiler->subcompile($defaults); + } + + $compiler->raw(', '); + + if (!$this->hasNode('domain')) { + $compiler->repr('messages'); + } else { + $compiler->subcompile($this->getNode('domain')); + } + + if ($this->hasNode('locale')) { + $compiler + ->raw(', ') + ->subcompile($this->getNode('locale')) + ; + } + $compiler->raw(");\n"); + } + + protected function compileString(\Twig_Node $body, \Twig_Node_Expression_Array $vars, $ignoreStrictCheck = false) + { + if ($body instanceof \Twig_Node_Expression_Constant) { + $msg = $body->getAttribute('value'); + } elseif ($body instanceof \Twig_Node_Text) { + $msg = $body->getAttribute('data'); + } else { + return array($body, $vars); + } + + preg_match_all('/(?getTemplateLine()); + if (!$vars->hasElement($key)) { + if ('count' === $var && $this->hasNode('count')) { + $vars->addElement($this->getNode('count'), $key); + } else { + $varExpr = new \Twig_Node_Expression_Name($var, $body->getTemplateLine()); + $varExpr->setAttribute('ignore_strict_check', $ignoreStrictCheck); + $vars->addElement($varExpr, $key); + } + } + } + + return array(new \Twig_Node_Expression_Constant(str_replace('%%', '%', trim($msg)), $body->getTemplateLine()), $vars); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/NodeVisitor/Scope.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/NodeVisitor/Scope.php new file mode 100644 index 0000000000000000000000000000000000000000..1284cf52a20b7f42cc01cfae9fdb92bba497103e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/NodeVisitor/Scope.php @@ -0,0 +1,125 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\NodeVisitor; + +/** + * @author Jean-François Simon + */ +class Scope +{ + /** + * @var Scope|null + */ + private $parent; + + /** + * @var array + */ + private $data = array(); + + /** + * @var bool + */ + private $left = false; + + /** + * @param Scope $parent + */ + public function __construct(Scope $parent = null) + { + $this->parent = $parent; + } + + /** + * Opens a new child scope. + * + * @return self + */ + public function enter() + { + return new self($this); + } + + /** + * Closes current scope and returns parent one. + * + * @return self|null + */ + public function leave() + { + $this->left = true; + + return $this->parent; + } + + /** + * Stores data into current scope. + * + * @param string $key + * @param mixed $value + * + * @return $this + * + * @throws \LogicException + */ + public function set($key, $value) + { + if ($this->left) { + throw new \LogicException('Left scope is not mutable.'); + } + + $this->data[$key] = $value; + + return $this; + } + + /** + * Tests if a data is visible from current scope. + * + * @param string $key + * + * @return bool + */ + public function has($key) + { + if (array_key_exists($key, $this->data)) { + return true; + } + + if (null === $this->parent) { + return false; + } + + return $this->parent->has($key); + } + + /** + * Returns data visible from current scope. + * + * @param string $key + * @param mixed $default + * + * @return mixed + */ + public function get($key, $default = null) + { + if (array_key_exists($key, $this->data)) { + return $this->data[$key]; + } + + if (null === $this->parent) { + return $default; + } + + return $this->parent->get($key, $default); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php new file mode 100644 index 0000000000000000000000000000000000000000..e64d6eae2347d56b43a10ed03bece6ed253f667d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\NodeVisitor; + +use Symfony\Bridge\Twig\Node\TransNode; +use Symfony\Bridge\Twig\Node\TransDefaultDomainNode; + +/** + * TranslationDefaultDomainNodeVisitor. + * + * @author Fabien Potencier + */ +class TranslationDefaultDomainNodeVisitor extends \Twig_BaseNodeVisitor +{ + /** + * @var Scope + */ + private $scope; + + /** + * Constructor. + */ + public function __construct() + { + $this->scope = new Scope(); + } + + /** + * {@inheritdoc} + */ + protected function doEnterNode(\Twig_Node $node, \Twig_Environment $env) + { + if ($node instanceof \Twig_Node_Block || $node instanceof \Twig_Node_Module) { + $this->scope = $this->scope->enter(); + } + + if ($node instanceof TransDefaultDomainNode) { + if ($node->getNode('expr') instanceof \Twig_Node_Expression_Constant) { + $this->scope->set('domain', $node->getNode('expr')); + + return $node; + } else { + $var = $this->getVarName(); + $name = new \Twig_Node_Expression_AssignName($var, $node->getTemplateLine()); + $this->scope->set('domain', new \Twig_Node_Expression_Name($var, $node->getTemplateLine())); + + return new \Twig_Node_Set(false, new \Twig_Node(array($name)), new \Twig_Node(array($node->getNode('expr'))), $node->getTemplateLine()); + } + } + + if (!$this->scope->has('domain')) { + return $node; + } + + if ($node instanceof \Twig_Node_Expression_Filter && in_array($node->getNode('filter')->getAttribute('value'), array('trans', 'transchoice'))) { + $arguments = $node->getNode('arguments'); + $ind = 'trans' === $node->getNode('filter')->getAttribute('value') ? 1 : 2; + if ($this->isNamedArguments($arguments)) { + if (!$arguments->hasNode('domain') && !$arguments->hasNode($ind)) { + $arguments->setNode('domain', $this->scope->get('domain')); + } + } else { + if (!$arguments->hasNode($ind)) { + if (!$arguments->hasNode($ind - 1)) { + $arguments->setNode($ind - 1, new \Twig_Node_Expression_Array(array(), $node->getTemplateLine())); + } + + $arguments->setNode($ind, $this->scope->get('domain')); + } + } + } elseif ($node instanceof TransNode) { + if (!$node->hasNode('domain')) { + $node->setNode('domain', $this->scope->get('domain')); + } + } + + return $node; + } + + /** + * {@inheritdoc} + */ + protected function doLeaveNode(\Twig_Node $node, \Twig_Environment $env) + { + if ($node instanceof TransDefaultDomainNode) { + return false; + } + + if ($node instanceof \Twig_Node_Block || $node instanceof \Twig_Node_Module) { + $this->scope = $this->scope->leave(); + } + + return $node; + } + + /** + * {@inheritdoc} + */ + public function getPriority() + { + return -10; + } + + /** + * @return bool + */ + private function isNamedArguments($arguments) + { + foreach ($arguments as $name => $node) { + if (!is_int($name)) { + return true; + } + } + + return false; + } + + private function getVarName() + { + return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php new file mode 100644 index 0000000000000000000000000000000000000000..6e3880d09ed98dfd60b3c7c14648e06efec2c9b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\NodeVisitor; + +use Symfony\Bridge\Twig\Node\TransNode; + +/** + * TranslationNodeVisitor extracts translation messages. + * + * @author Fabien Potencier + */ +class TranslationNodeVisitor extends \Twig_BaseNodeVisitor +{ + const UNDEFINED_DOMAIN = '_undefined'; + + private $enabled = false; + private $messages = array(); + + public function enable() + { + $this->enabled = true; + $this->messages = array(); + } + + public function disable() + { + $this->enabled = false; + $this->messages = array(); + } + + public function getMessages() + { + return $this->messages; + } + + /** + * {@inheritdoc} + */ + protected function doEnterNode(\Twig_Node $node, \Twig_Environment $env) + { + if (!$this->enabled) { + return $node; + } + + if ( + $node instanceof \Twig_Node_Expression_Filter && + 'trans' === $node->getNode('filter')->getAttribute('value') && + $node->getNode('node') instanceof \Twig_Node_Expression_Constant + ) { + // extract constant nodes with a trans filter + $this->messages[] = array( + $node->getNode('node')->getAttribute('value'), + $this->getReadDomainFromArguments($node->getNode('arguments'), 1), + ); + } elseif ( + $node instanceof \Twig_Node_Expression_Filter && + 'transchoice' === $node->getNode('filter')->getAttribute('value') && + $node->getNode('node') instanceof \Twig_Node_Expression_Constant + ) { + // extract constant nodes with a trans filter + $this->messages[] = array( + $node->getNode('node')->getAttribute('value'), + $this->getReadDomainFromArguments($node->getNode('arguments'), 2), + ); + } elseif ($node instanceof TransNode) { + // extract trans nodes + $this->messages[] = array( + $node->getNode('body')->getAttribute('data'), + $node->hasNode('domain') ? $this->getReadDomainFromNode($node->getNode('domain')) : null, + ); + } + + return $node; + } + + /** + * {@inheritdoc} + */ + protected function doLeaveNode(\Twig_Node $node, \Twig_Environment $env) + { + return $node; + } + + /** + * {@inheritdoc} + */ + public function getPriority() + { + return 0; + } + + /** + * @param \Twig_Node $arguments + * @param int $index + * + * @return string|null + */ + private function getReadDomainFromArguments(\Twig_Node $arguments, $index) + { + if ($arguments->hasNode('domain')) { + $argument = $arguments->getNode('domain'); + } elseif ($arguments->hasNode($index)) { + $argument = $arguments->getNode($index); + } else { + return; + } + + return $this->getReadDomainFromNode($argument); + } + + /** + * @param \Twig_Node $node + * + * @return string|null + */ + private function getReadDomainFromNode(\Twig_Node $node) + { + if ($node instanceof \Twig_Node_Expression_Constant) { + return $node->getAttribute('value'); + } + + return self::UNDEFINED_DOMAIN; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/README.md b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/README.md new file mode 100644 index 0000000000000000000000000000000000000000..eb084147c37f852261a9348bafeeb53ea29d96ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/README.md @@ -0,0 +1,13 @@ +Twig Bridge +=========== + +Provides integration for [Twig](http://twig.sensiolabs.org/) with various +Symfony components. + +Resources +--------- + + * [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/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..5de20b1b8f181cc8977cead255478e406788bed1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig @@ -0,0 +1,81 @@ +{% use "bootstrap_3_layout.html.twig" %} + +{% block form_start -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-horizontal')|trim}) %} + {{- parent() -}} +{%- endblock form_start %} + +{# Labels #} + +{% block form_label -%} +{% spaceless %} + {% if label is same as(false) %} +
    + {% else %} + {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) %} + {{- parent() -}} + {% endif %} +{% endspaceless %} +{%- endblock form_label %} + +{% block form_label_class -%} +col-sm-2 +{%- endblock form_label_class %} + +{# Rows #} + +{% block form_row -%} +
    + {{- form_label(form) -}} +
    + {{- form_widget(form) -}} + {{- form_errors(form) -}} +
    +{##}
    +{%- endblock form_row %} + +{% block checkbox_row -%} + {{- block('checkbox_radio_row') -}} +{%- endblock checkbox_row %} + +{% block radio_row -%} + {{- block('checkbox_radio_row') -}} +{%- endblock radio_row %} + +{% block checkbox_radio_row -%} +{% spaceless %} +
    +
    +
    + {{ form_widget(form) }} + {{ form_errors(form) }} +
    +
    +{% endspaceless %} +{%- endblock checkbox_radio_row %} + +{% block submit_row -%} +{% spaceless %} +
    +
    +
    + {{ form_widget(form) }} +
    +
    +{% endspaceless %} +{% endblock submit_row %} + +{% block reset_row -%} +{% spaceless %} +
    +
    +
    + {{ form_widget(form) }} +
    +
    +{% endspaceless %} +{% endblock reset_row %} + +{% block form_group_class -%} +col-sm-10 +{%- endblock form_group_class %} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..5fb3a18f1d532602374c52a2c60ef9921d954676 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig @@ -0,0 +1,264 @@ +{% use "form_div_layout.html.twig" %} + +{# Widgets #} + +{% block form_widget_simple -%} + {% if type is not defined or type not in ['file', 'hidden'] %} + {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%} + {% endif %} + {{- parent() -}} +{%- endblock form_widget_simple %} + +{% block textarea_widget -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) %} + {{- parent() -}} +{%- endblock textarea_widget %} + +{% block button_widget -%} + {% set attr = attr|merge({class: (attr.class|default('btn-default') ~ ' btn')|trim}) %} + {{- parent() -}} +{%- endblock %} + +{% block money_widget -%} +
    + {% set append = money_pattern starts with '{{' %} + {% if not append %} + {{ money_pattern|replace({ '{{ widget }}':''}) }} + {% endif %} + {{- block('form_widget_simple') -}} + {% if append %} + {{ money_pattern|replace({ '{{ widget }}':''}) }} + {% endif %} +
    +{%- endblock money_widget %} + +{% block percent_widget -%} +
    + {{- block('form_widget_simple') -}} + % +
    +{%- endblock percent_widget %} + +{% block datetime_widget -%} + {% if widget == 'single_text' %} + {{- block('form_widget_simple') -}} + {% else -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} +
    + {{- form_errors(form.date) -}} + {{- form_errors(form.time) -}} + {{- form_widget(form.date, { datetime: true } ) -}} + {{- form_widget(form.time, { datetime: true } ) -}} +
    + {%- endif %} +{%- endblock datetime_widget %} + +{% block date_widget -%} + {% if widget == 'single_text' %} + {{- block('form_widget_simple') -}} + {% else -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} + {% if datetime is not defined or not datetime -%} +
    + {%- endif %} + {{- date_pattern|replace({ + '{{ year }}': form_widget(form.year), + '{{ month }}': form_widget(form.month), + '{{ day }}': form_widget(form.day), + })|raw -}} + {% if datetime is not defined or not datetime -%} +
    + {%- endif -%} + {% endif %} +{%- endblock date_widget %} + +{% block time_widget -%} + {% if widget == 'single_text' %} + {{- block('form_widget_simple') -}} + {% else -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} + {% if datetime is not defined or false == datetime -%} +
    + {%- endif -%} + {{- form_widget(form.hour) }}{% if with_minutes %}:{{ form_widget(form.minute) }}{% endif %}{% if with_seconds %}:{{ form_widget(form.second) }}{% endif %} + {% if datetime is not defined or false == datetime -%} +
    + {%- endif -%} + {% endif %} +{%- endblock time_widget %} + +{%- block dateinterval_widget -%} + {%- if widget == 'single_text' -%} + {{- block('form_widget_simple') -}} + {%- else -%} + {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} +
    + {{- form_errors(form) -}} + {%- if with_years %}{{ form_widget(form.years) }}{% endif -%} + {%- if with_months %}{{ form_widget(form.months) }}{% endif -%} + {%- if with_weeks %}{{ form_widget(form.weeks) }}{% endif -%} + {%- if with_days %}{{ form_widget(form.days) }}{% endif -%} + {%- if with_hours %}{{ form_widget(form.hours) }}{% endif -%} + {%- if with_minutes %}{{ form_widget(form.minutes) }}{% endif -%} + {%- if with_seconds %}{{ form_widget(form.seconds) }}{% endif -%} + {%- if with_invert %}{{ form_widget(form.invert) }}{% endif -%} +
    + {%- endif -%} +{%- endblock dateinterval_widget -%} + +{% block choice_widget_collapsed -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) %} + {{- parent() -}} +{%- endblock %} + +{% block choice_widget_expanded -%} + {% if '-inline' in label_attr.class|default('') -%} + {%- for child in form %} + {{- form_widget(child, { + parent_label_class: label_attr.class|default(''), + translation_domain: choice_translation_domain, + }) -}} + {% endfor -%} + {%- else -%} +
    + {%- for child in form %} + {{- form_widget(child, { + parent_label_class: label_attr.class|default(''), + translation_domain: choice_translation_domain, + }) -}} + {% endfor -%} +
    + {%- endif %} +{%- endblock choice_widget_expanded %} + +{% block checkbox_widget -%} + {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} + {% if 'checkbox-inline' in parent_label_class %} + {{- form_label(form, null, { widget: parent() }) -}} + {% else -%} +
    + {{- form_label(form, null, { widget: parent() }) -}} +
    + {%- endif %} +{%- endblock checkbox_widget %} + +{% block radio_widget -%} + {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} + {% if 'radio-inline' in parent_label_class %} + {{- form_label(form, null, { widget: parent() }) -}} + {% else -%} +
    + {{- form_label(form, null, { widget: parent() }) -}} +
    + {%- endif %} +{%- endblock radio_widget %} + +{# Labels #} + +{% block form_label -%} + {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' control-label')|trim}) -%} + {{- parent() -}} +{%- endblock form_label %} + +{% block choice_label -%} + {# remove the checkbox-inline and radio-inline class, it's only useful for embed labels #} + {%- set label_attr = label_attr|merge({class: label_attr.class|default('')|replace({'checkbox-inline': '', 'radio-inline': ''})|trim}) -%} + {{- block('form_label') -}} +{% endblock %} + +{% block checkbox_label -%} + {{- block('checkbox_radio_label') -}} +{%- endblock checkbox_label %} + +{% block radio_label -%} + {{- block('checkbox_radio_label') -}} +{%- endblock radio_label %} + +{% block checkbox_radio_label %} + {# Do not display the label if widget is not defined in order to prevent double label rendering #} + {% if widget is defined %} + {% if required %} + {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) %} + {% endif %} + {% if parent_label_class is defined %} + {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|trim}) %} + {% endif %} + {% if label is not same as(false) and label is empty %} + {%- if label_format is not empty -%} + {% set label = label_format|replace({ + '%name%': name, + '%id%': id, + }) %} + {%- else -%} + {% set label = name|humanize %} + {%- endif -%} + {% endif %} + + {{- widget|raw }} {{ label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans({}, translation_domain)) -}} + + {% endif %} +{% endblock checkbox_radio_label %} + +{# Rows #} + +{% block form_row -%} +
    + {{- form_label(form) -}} + {{- form_widget(form) -}} + {{- form_errors(form) -}} +
    +{%- endblock form_row %} + +{% block button_row -%} +
    + {{- form_widget(form) -}} +
    +{%- endblock button_row %} + +{% block choice_row -%} + {% set force_error = true %} + {{- block('form_row') }} +{%- endblock choice_row %} + +{% block date_row -%} + {% set force_error = true %} + {{- block('form_row') }} +{%- endblock date_row %} + +{% block time_row -%} + {% set force_error = true %} + {{- block('form_row') }} +{%- endblock time_row %} + +{% block datetime_row -%} + {% set force_error = true %} + {{- block('form_row') }} +{%- endblock datetime_row %} + +{% block checkbox_row -%} +
    + {{- form_widget(form) -}} + {{- form_errors(form) -}} +
    +{%- endblock checkbox_row %} + +{% block radio_row -%} +
    + {{- form_widget(form) -}} + {{- form_errors(form) -}} +
    +{%- endblock radio_row %} + +{# Errors #} + +{% block form_errors -%} + {% if errors|length > 0 -%} + {% if form.parent %}{% else %}
    {% endif %} +
      + {%- for error in errors -%} +
    • {{ error.message }}
    • + {%- endfor -%} +
    + {% if form.parent %}{% else %}
    {% endif %} + {%- endif %} +{%- endblock form_errors %} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..e1d09153dfe60e0408573d84ff0e3e648aa6dd94 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig @@ -0,0 +1,388 @@ +{# Widgets #} + +{%- block form_widget -%} + {% if compound %} + {{- block('form_widget_compound') -}} + {% else %} + {{- block('form_widget_simple') -}} + {% endif %} +{%- endblock form_widget -%} + +{%- block form_widget_simple -%} + {%- set type = type|default('text') -%} + +{%- endblock form_widget_simple -%} + +{%- block form_widget_compound -%} +
    + {%- if form.parent is empty -%} + {{ form_errors(form) }} + {%- endif -%} + {{- block('form_rows') -}} + {{- form_rest(form) -}} +
    +{%- endblock form_widget_compound -%} + +{%- block collection_widget -%} + {% if prototype is defined %} + {%- set attr = attr|merge({'data-prototype': form_row(prototype) }) -%} + {% endif %} + {{- block('form_widget') -}} +{%- endblock collection_widget -%} + +{%- block textarea_widget -%} + +{%- endblock textarea_widget -%} + +{%- block choice_widget -%} + {% if expanded %} + {{- block('choice_widget_expanded') -}} + {% else %} + {{- block('choice_widget_collapsed') -}} + {% endif %} +{%- endblock choice_widget -%} + +{%- block choice_widget_expanded -%} +
    + {%- for child in form %} + {{- form_widget(child) -}} + {{- form_label(child, null, {translation_domain: choice_translation_domain}) -}} + {% endfor -%} +
    +{%- endblock choice_widget_expanded -%} + +{%- block choice_widget_collapsed -%} + {%- if required and placeholder is none and not placeholder_in_choices and not multiple and (attr.size is not defined or attr.size <= 1) -%} + {% set required = false %} + {%- endif -%} + +{%- endblock choice_widget_collapsed -%} + +{%- block choice_widget_options -%} + {% for group_label, choice in options %} + {%- if choice is iterable -%} + + {% set options = choice %} + {{- block('choice_widget_options') -}} + + {%- else -%} + + {%- endif -%} + {% endfor %} +{%- endblock choice_widget_options -%} + +{%- block checkbox_widget -%} + +{%- endblock checkbox_widget -%} + +{%- block radio_widget -%} + +{%- endblock radio_widget -%} + +{%- block datetime_widget -%} + {% if widget == 'single_text' %} + {{- block('form_widget_simple') -}} + {%- else -%} +
    + {{- form_errors(form.date) -}} + {{- form_errors(form.time) -}} + {{- form_widget(form.date) -}} + {{- form_widget(form.time) -}} +
    + {%- endif -%} +{%- endblock datetime_widget -%} + +{%- block date_widget -%} + {%- if widget == 'single_text' -%} + {{ block('form_widget_simple') }} + {%- else -%} +
    + {{- date_pattern|replace({ + '{{ year }}': form_widget(form.year), + '{{ month }}': form_widget(form.month), + '{{ day }}': form_widget(form.day), + })|raw -}} +
    + {%- endif -%} +{%- endblock date_widget -%} + +{%- block time_widget -%} + {%- if widget == 'single_text' -%} + {{ block('form_widget_simple') }} + {%- else -%} + {%- set vars = widget == 'text' ? { 'attr': { 'size': 1 }} : {} -%} +
    + {{ form_widget(form.hour, vars) }}{% if with_minutes %}:{{ form_widget(form.minute, vars) }}{% endif %}{% if with_seconds %}:{{ form_widget(form.second, vars) }}{% endif %} +
    + {%- endif -%} +{%- endblock time_widget -%} + +{%- block dateinterval_widget -%} + {%- if widget == 'single_text' -%} + {{- block('form_widget_simple') -}} + {%- else -%} +
    + {{- form_errors(form) -}} + {%- if with_years %}{{ form_widget(form.years) }}{% endif -%} + {%- if with_months %}{{ form_widget(form.months) }}{% endif -%} + {%- if with_weeks %}{{ form_widget(form.weeks) }}{% endif -%} + {%- if with_days %}{{ form_widget(form.days) }}{% endif -%} + {%- if with_hours %}{{ form_widget(form.hours) }}{% endif -%} + {%- if with_minutes %}{{ form_widget(form.minutes) }}{% endif -%} + {%- if with_seconds %}{{ form_widget(form.seconds) }}{% endif -%} + {%- if with_invert %}{{ form_widget(form.invert) }}{% endif -%} +
    + {%- endif -%} +{%- endblock dateinterval_widget -%} + +{%- block number_widget -%} + {# type="number" doesn't work with floats #} + {%- set type = type|default('text') -%} + {{ block('form_widget_simple') }} +{%- endblock number_widget -%} + +{%- block integer_widget -%} + {%- set type = type|default('number') -%} + {{ block('form_widget_simple') }} +{%- endblock integer_widget -%} + +{%- block money_widget -%} + {{ money_pattern|replace({ '{{ widget }}': block('form_widget_simple') })|raw }} +{%- endblock money_widget -%} + +{%- block url_widget -%} + {%- set type = type|default('url') -%} + {{ block('form_widget_simple') }} +{%- endblock url_widget -%} + +{%- block search_widget -%} + {%- set type = type|default('search') -%} + {{ block('form_widget_simple') }} +{%- endblock search_widget -%} + +{%- block percent_widget -%} + {%- set type = type|default('text') -%} + {{ block('form_widget_simple') }} % +{%- endblock percent_widget -%} + +{%- block password_widget -%} + {%- set type = type|default('password') -%} + {{ block('form_widget_simple') }} +{%- endblock password_widget -%} + +{%- block hidden_widget -%} + {%- set type = type|default('hidden') -%} + {{ block('form_widget_simple') }} +{%- endblock hidden_widget -%} + +{%- block email_widget -%} + {%- set type = type|default('email') -%} + {{ block('form_widget_simple') }} +{%- endblock email_widget -%} + +{%- block range_widget -%} + {% set type = type|default('range') %} + {{- block('form_widget_simple') -}} +{%- endblock range_widget %} + +{%- block button_widget -%} + {%- if label is empty -%} + {%- if label_format is not empty -%} + {% set label = label_format|replace({ + '%name%': name, + '%id%': id, + }) %} + {%- else -%} + {% set label = name|humanize %} + {%- endif -%} + {%- endif -%} + +{%- endblock button_widget -%} + +{%- block submit_widget -%} + {%- set type = type|default('submit') -%} + {{ block('button_widget') }} +{%- endblock submit_widget -%} + +{%- block reset_widget -%} + {%- set type = type|default('reset') -%} + {{ block('button_widget') }} +{%- endblock reset_widget -%} + +{# Labels #} + +{%- block form_label -%} + {% if label is not same as(false) -%} + {% if not compound -%} + {% set label_attr = label_attr|merge({'for': id}) %} + {%- endif -%} + {% if required -%} + {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %} + {%- endif -%} + {% if label is empty -%} + {%- if label_format is not empty -%} + {% set label = label_format|replace({ + '%name%': name, + '%id%': id, + }) %} + {%- else -%} + {% set label = name|humanize %} + {%- endif -%} + {%- endif -%} + {{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }} + {%- endif -%} +{%- endblock form_label -%} + +{%- block button_label -%}{%- endblock -%} + +{# Rows #} + +{%- block repeated_row -%} + {# + No need to render the errors here, as all errors are mapped + to the first child (see RepeatedTypeValidatorExtension). + #} + {{- block('form_rows') -}} +{%- endblock repeated_row -%} + +{%- block form_row -%} +
    + {{- form_label(form) -}} + {{- form_errors(form) -}} + {{- form_widget(form) -}} +
    +{%- endblock form_row -%} + +{%- block button_row -%} +
    + {{- form_widget(form) -}} +
    +{%- endblock button_row -%} + +{%- block hidden_row -%} + {{ form_widget(form) }} +{%- endblock hidden_row -%} + +{# Misc #} + +{%- block form -%} + {{ form_start(form) }} + {{- form_widget(form) -}} + {{ form_end(form) }} +{%- endblock form -%} + +{%- block form_start -%} + {% set method = method|upper %} + {%- if method in ["GET", "POST"] -%} + {% set form_method = method %} + {%- else -%} + {% set form_method = "POST" %} + {%- endif -%} +
    + {%- if form_method != method -%} + + {%- endif -%} +{%- endblock form_start -%} + +{%- block form_end -%} + {%- if not render_rest is defined or render_rest -%} + {{ form_rest(form) }} + {%- endif -%} +
    +{%- endblock form_end -%} + +{%- block form_errors -%} + {%- if errors|length > 0 -%} +
      + {%- for error in errors -%} +
    • {{ error.message }}
    • + {%- endfor -%} +
    + {%- endif -%} +{%- endblock form_errors -%} + +{%- block form_rest -%} + {% for child in form -%} + {% if not child.rendered %} + {{- form_row(child) -}} + {% endif %} + {%- endfor %} +{% endblock form_rest %} + +{# Support #} + +{%- block form_rows -%} + {% for child in form %} + {{- form_row(child) -}} + {% endfor %} +{%- endblock form_rows -%} + +{%- block widget_attributes -%} + id="{{ id }}" name="{{ full_name }}" + {%- if disabled %} disabled="disabled"{% endif -%} + {%- if required %} required="required"{% endif -%} + {%- for attrname, attrvalue in attr -%} + {{- " " -}} + {%- if attrname in ['placeholder', 'title'] -%} + {{- attrname }}="{{ translation_domain is same as(false) ? attrvalue : attrvalue|trans({}, translation_domain) }}" + {%- elseif attrvalue is same as(true) -%} + {{- attrname }}="{{ attrname }}" + {%- elseif attrvalue is not same as(false) -%} + {{- attrname }}="{{ attrvalue }}" + {%- endif -%} + {%- endfor -%} +{%- endblock widget_attributes -%} + +{%- block widget_container_attributes -%} + {%- if id is not empty %}id="{{ id }}"{% endif -%} + {%- for attrname, attrvalue in attr -%} + {{- " " -}} + {%- if attrname in ['placeholder', 'title'] -%} + {{- attrname }}="{{ translation_domain is same as(false) ? attrvalue : attrvalue|trans({}, translation_domain) }}" + {%- elseif attrvalue is same as(true) -%} + {{- attrname }}="{{ attrname }}" + {%- elseif attrvalue is not same as(false) -%} + {{- attrname }}="{{ attrvalue }}" + {%- endif -%} + {%- endfor -%} +{%- endblock widget_container_attributes -%} + +{%- block button_attributes -%} + id="{{ id }}" name="{{ full_name }}"{% if disabled %} disabled="disabled"{% endif -%} + {%- for attrname, attrvalue in attr -%} + {{- " " -}} + {%- if attrname in ['placeholder', 'title'] -%} + {{- attrname }}="{{ translation_domain is same as(false) ? attrvalue : attrvalue|trans({}, translation_domain) }}" + {%- elseif attrvalue is same as(true) -%} + {{- attrname }}="{{ attrname }}" + {%- elseif attrvalue is not same as(false) -%} + {{- attrname }}="{{ attrvalue }}" + {%- endif -%} + {%- endfor -%} +{%- endblock button_attributes -%} + +{% block attributes -%} + {%- for attrname, attrvalue in attr -%} + {{- " " -}} + {%- if attrname in ['placeholder', 'title'] -%} + {{- attrname }}="{{ translation_domain is same as(false) ? attrvalue : attrvalue|trans({}, translation_domain) }}" + {%- elseif attrvalue is same as(true) -%} + {{- attrname }}="{{ attrname }}" + {%- elseif attrvalue is not same as(false) -%} + {{- attrname }}="{{ attrvalue }}" + {%- endif -%} + {%- endfor -%} +{%- endblock attributes -%} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/form_table_layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/form_table_layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..c7b3a4365b51b34616f6e3273d598bdcbdff9feb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/form_table_layout.html.twig @@ -0,0 +1,44 @@ +{% use "form_div_layout.html.twig" %} + +{%- block form_row -%} + + + {{- form_label(form) -}} + + + {{- form_errors(form) -}} + {{- form_widget(form) -}} + + +{%- endblock form_row -%} + +{%- block button_row -%} + + + + {{- form_widget(form) -}} + + +{%- endblock button_row -%} + +{%- block hidden_row -%} + + + {{- form_widget(form) -}} + + +{%- endblock hidden_row -%} + +{%- block form_widget_compound -%} + + {%- if form.parent is empty and errors|length > 0 -%} + + + + {%- endif -%} + {{- block('form_rows') -}} + {{- form_rest(form) -}} +
    + {{- form_errors(form) -}} +
    +{%- endblock form_widget_compound -%} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..dc7bec9fb6ccdb77a8e49748b61d06ef370a7e9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig @@ -0,0 +1,328 @@ +{% extends "form_div_layout.html.twig" %} + +{# Based on Foundation 5 Doc #} +{# Widgets #} + +{% block form_widget_simple -%} + {% if errors|length > 0 -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} + {% endif %} + {{- parent() -}} +{%- endblock form_widget_simple %} + +{% block textarea_widget -%} + {% if errors|length > 0 -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} + {% endif %} + {{- parent() -}} +{%- endblock textarea_widget %} + +{% block button_widget -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' button')|trim}) %} + {{- parent() -}} +{%- endblock %} + +{% block money_widget -%} +
    + {% set prepend = '{{' == money_pattern[0:2] %} + {% if not prepend %} +
    + {{ money_pattern|replace({ '{{ widget }}':''}) }} +
    + {% endif %} +
    + {{- block('form_widget_simple') -}} +
    + {% if prepend %} +
    + {{ money_pattern|replace({ '{{ widget }}':''}) }} +
    + {% endif %} +
    +{%- endblock money_widget %} + +{% block percent_widget -%} +
    +
    + {{- block('form_widget_simple') -}} +
    +
    + % +
    +
    +{%- endblock percent_widget %} + +{% block datetime_widget -%} + {% if widget == 'single_text' %} + {{- block('form_widget_simple') -}} + {% else %} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' row')|trim}) %} +
    +
    {{ form_errors(form.date) }}
    +
    {{ form_errors(form.time) }}
    +
    +
    +
    {{ form_widget(form.date, { datetime: true } ) }}
    +
    {{ form_widget(form.time, { datetime: true } ) }}
    +
    + {% endif %} +{%- endblock datetime_widget %} + +{% block date_widget -%} + {% if widget == 'single_text' %} + {{- block('form_widget_simple') -}} + {% else %} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' row')|trim}) %} + {% if datetime is not defined or not datetime %} +
    + {% endif %} + {{- date_pattern|replace({ + '{{ year }}': '
    ' ~ form_widget(form.year) ~ '
    ', + '{{ month }}': '
    ' ~ form_widget(form.month) ~ '
    ', + '{{ day }}': '
    ' ~ form_widget(form.day) ~ '
    ', + })|raw -}} + {% if datetime is not defined or not datetime %} +
    + {% endif %} + {% endif %} +{%- endblock date_widget %} + +{% block time_widget -%} + {% if widget == 'single_text' %} + {{- block('form_widget_simple') -}} + {% else %} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' row')|trim}) %} + {% if datetime is not defined or false == datetime %} +
    + {% endif %} + {% if with_seconds %} +
    {{ form_widget(form.hour) }}
    +
    +
    +
    + : +
    +
    + {{ form_widget(form.minute) }} +
    +
    +
    +
    +
    +
    + : +
    +
    + {{ form_widget(form.second) }} +
    +
    +
    + {% else %} +
    {{ form_widget(form.hour) }}
    +
    +
    +
    + : +
    +
    + {{ form_widget(form.minute) }} +
    +
    +
    + {% endif %} + {% if datetime is not defined or false == datetime %} +
    + {% endif %} + {% endif %} +{%- endblock time_widget %} + +{% block choice_widget_collapsed -%} + {% if errors|length > 0 -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} + {% endif %} + + {% if multiple -%} + {% set attr = attr|merge({style: (attr.style|default('') ~ ' height: auto; background-image: none;')|trim}) %} + {% endif %} + + {% if required and placeholder is none and not placeholder_in_choices and not multiple -%} + {% set required = false %} + {%- endif -%} + +{%- endblock choice_widget_collapsed %} + +{% block choice_widget_expanded -%} + {% if '-inline' in label_attr.class|default('') %} +
      + {% for child in form %} +
    • {{ form_widget(child, { + parent_label_class: label_attr.class|default(''), + }) }}
    • + {% endfor %} +
    + {% else %} +
    + {% for child in form %} + {{ form_widget(child, { + parent_label_class: label_attr.class|default(''), + }) }} + {% endfor %} +
    + {% endif %} +{%- endblock choice_widget_expanded %} + +{% block checkbox_widget -%} + {% set parent_label_class = parent_label_class|default('') %} + {% if errors|length > 0 -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} + {% endif %} + {% if 'checkbox-inline' in parent_label_class %} + {{ form_label(form, null, { widget: parent() }) }} + {% else %} +
    + {{ form_label(form, null, { widget: parent() }) }} +
    + {% endif %} +{%- endblock checkbox_widget %} + +{% block radio_widget -%} + {% set parent_label_class = parent_label_class|default('') %} + {% if 'radio-inline' in parent_label_class %} + {{ form_label(form, null, { widget: parent() }) }} + {% else %} + {% if errors|length > 0 -%} + {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} + {% endif %} +
    + {{ form_label(form, null, { widget: parent() }) }} +
    + {% endif %} +{%- endblock radio_widget %} + +{# Labels #} + +{% block form_label -%} + {% if errors|length > 0 -%} + {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' error')|trim}) %} + {% endif %} + {{- parent() -}} +{%- endblock form_label %} + +{% block choice_label -%} + {% if errors|length > 0 -%} + {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' error')|trim}) %} + {% endif %} + {# remove the checkbox-inline and radio-inline class, it's only useful for embed labels #} + {% set label_attr = label_attr|merge({class: label_attr.class|default('')|replace({'checkbox-inline': '', 'radio-inline': ''})|trim}) %} + {{- block('form_label') -}} +{%- endblock %} + +{% block checkbox_label -%} + {{- block('checkbox_radio_label') -}} +{%- endblock checkbox_label %} + +{% block radio_label -%} + {{- block('checkbox_radio_label') -}} +{%- endblock radio_label %} + +{% block checkbox_radio_label -%} + {% if required %} + {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) %} + {% endif %} + {% if errors|length > 0 -%} + {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' error')|trim}) %} + {% endif %} + {% if parent_label_class is defined %} + {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ parent_label_class)|trim}) %} + {% endif %} + {% if label is empty %} + {%- if label_format is not empty -%} + {% set label = label_format|replace({ + '%name%': name, + '%id%': id, + }) %} + {%- else -%} + {% set label = name|humanize %} + {%- endif -%} + {% endif %} + + {{ widget|raw }} + {{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }} + +{%- endblock checkbox_radio_label %} + +{# Rows #} + +{% block form_row -%} +
    +
    + {{ form_label(form) }} + {{ form_widget(form) }} + {{ form_errors(form) }} +
    +
    +{%- endblock form_row %} + +{% block choice_row -%} + {% set force_error = true %} + {{ block('form_row') }} +{%- endblock choice_row %} + +{% block date_row -%} + {% set force_error = true %} + {{ block('form_row') }} +{%- endblock date_row %} + +{% block time_row -%} + {% set force_error = true %} + {{ block('form_row') }} +{%- endblock time_row %} + +{% block datetime_row -%} + {% set force_error = true %} + {{ block('form_row') }} +{%- endblock datetime_row %} + +{% block checkbox_row -%} +
    +
    + {{ form_widget(form) }} + {{ form_errors(form) }} +
    +
    +{%- endblock checkbox_row %} + +{% block radio_row -%} +
    +
    + {{ form_widget(form) }} + {{ form_errors(form) }} +
    +
    +{%- endblock radio_row %} + +{# Errors #} + +{% block form_errors -%} + {% if errors|length > 0 -%} + {% if form.parent %}{% else %}
    {% endif %} + {%- for error in errors -%} + {{ error.message }} + {% if not loop.last %}, {% endif %} + {%- endfor -%} + {% if form.parent %}{% else %}
    {% endif %} + {%- endif %} +{%- endblock form_errors %} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php new file mode 100644 index 0000000000000000000000000000000000000000..000face7cf8199ef9ce7e290bb5d0afec0f684ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php @@ -0,0 +1,178 @@ +appVariable = new AppVariable(); + } + + /** + * @dataProvider debugDataProvider + */ + public function testDebug($debugFlag) + { + $this->appVariable->setDebug($debugFlag); + + $this->assertEquals($debugFlag, $this->appVariable->getDebug()); + } + + public function debugDataProvider() + { + return array( + 'debug on' => array(true), + 'debug off' => array(false), + ); + } + + public function testEnvironment() + { + $this->appVariable->setEnvironment('dev'); + + $this->assertEquals('dev', $this->appVariable->getEnvironment()); + } + + public function testGetSession() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $request->method('getSession')->willReturn($session = new Session()); + + $this->setRequestStack($request); + + $this->assertEquals($session, $this->appVariable->getSession()); + } + + public function testGetSessionWithNoRequest() + { + $this->setRequestStack(null); + + $this->assertNull($this->appVariable->getSession()); + } + + public function testGetRequest() + { + $this->setRequestStack($request = new Request()); + + $this->assertEquals($request, $this->appVariable->getRequest()); + } + + public function testGetToken() + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $this->appVariable->setTokenStorage($tokenStorage); + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $tokenStorage->method('getToken')->willReturn($token); + + $this->assertEquals($token, $this->appVariable->getToken()); + } + + public function testGetUser() + { + $this->setTokenStorage($user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock()); + + $this->assertEquals($user, $this->appVariable->getUser()); + } + + public function testGetUserWithUsernameAsTokenUser() + { + $this->setTokenStorage($user = 'username'); + + $this->assertNull($this->appVariable->getUser()); + } + + public function testGetTokenWithNoToken() + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $this->appVariable->setTokenStorage($tokenStorage); + + $this->assertNull($this->appVariable->getToken()); + } + + public function testGetUserWithNoToken() + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $this->appVariable->setTokenStorage($tokenStorage); + + $this->assertNull($this->appVariable->getUser()); + } + + /** + * @expectedException \RuntimeException + */ + public function testEnvironmentNotSet() + { + $this->appVariable->getEnvironment(); + } + + /** + * @expectedException \RuntimeException + */ + public function testDebugNotSet() + { + $this->appVariable->getDebug(); + } + + /** + * @expectedException \RuntimeException + */ + public function testGetTokenWithTokenStorageNotSet() + { + $this->appVariable->getToken(); + } + + /** + * @expectedException \RuntimeException + */ + public function testGetUserWithTokenStorageNotSet() + { + $this->appVariable->getUser(); + } + + /** + * @expectedException \RuntimeException + */ + public function testGetRequestWithRequestStackNotSet() + { + $this->appVariable->getRequest(); + } + + /** + * @expectedException \RuntimeException + */ + public function testGetSessionWithRequestStackNotSet() + { + $this->appVariable->getSession(); + } + + protected function setRequestStack($request) + { + $requestStackMock = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->getMock(); + $requestStackMock->method('getCurrentRequest')->willReturn($request); + + $this->appVariable->setRequestStack($requestStackMock); + } + + protected function setTokenStorage($user) + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $this->appVariable->setTokenStorage($tokenStorage); + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $tokenStorage->method('getToken')->willReturn($token); + + $token->method('getUser')->willReturn($user); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1b63cdd1b8daf758b3d6cb2ee1c0bfe48bfc5f6f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Command; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Command\LintCommand; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Tester\CommandTester; + +class LintCommandTest extends TestCase +{ + private $files; + + public function testLintCorrectFile() + { + $tester = $this->createCommandTester(); + $filename = $this->createFile('{{ foo }}'); + + $ret = $tester->execute(array('filename' => array($filename)), array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false)); + + $this->assertEquals(0, $ret, 'Returns 0 in case of success'); + $this->assertContains('OK in', trim($tester->getDisplay())); + } + + public function testLintIncorrectFile() + { + $tester = $this->createCommandTester(); + $filename = $this->createFile('{{ foo'); + + $ret = $tester->execute(array('filename' => array($filename)), array('decorated' => false)); + + $this->assertEquals(1, $ret, 'Returns 1 in case of error'); + $this->assertRegExp('/ERROR in \S+ \(line /', trim($tester->getDisplay())); + } + + /** + * @expectedException \RuntimeException + */ + public function testLintFileNotReadable() + { + $tester = $this->createCommandTester(); + $filename = $this->createFile(''); + unlink($filename); + + $ret = $tester->execute(array('filename' => array($filename)), array('decorated' => false)); + } + + public function testLintFileCompileTimeException() + { + $tester = $this->createCommandTester(); + $filename = $this->createFile("{{ 2|number_format(2, decimal_point='.', ',') }}"); + + $ret = $tester->execute(array('filename' => array($filename)), array('decorated' => false)); + + $this->assertEquals(1, $ret, 'Returns 1 in case of error'); + $this->assertRegExp('/ERROR in \S+ \(line /', trim($tester->getDisplay())); + } + + /** + * @return CommandTester + */ + private function createCommandTester() + { + $twig = new \Twig_Environment(new \Twig_Loader_Filesystem()); + + $command = new LintCommand(); + $command->setTwigEnvironment($twig); + + $application = new Application(); + $application->add($command); + $command = $application->find('lint:twig'); + + return new CommandTester($command); + } + + /** + * @return string Path to the new file + */ + private function createFile($content) + { + $filename = tempnam(sys_get_temp_dir(), 'sf-'); + file_put_contents($filename, $content); + + $this->files[] = $filename; + + return $filename; + } + + protected function setUp() + { + $this->files = array(); + } + + protected function tearDown() + { + foreach ($this->files as $file) { + if (file_exists($file)) { + unlink($file); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9458d2b0de8331f672b01538380cf42eee80a6ce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Extension; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Extension\CodeExtension; +use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; + +class CodeExtensionTest extends TestCase +{ + protected $helper; + + public function testFormatFile() + { + $expected = sprintf('%s at line 25', substr(__FILE__, 5), __FILE__); + $this->assertEquals($expected, $this->getExtension()->formatFile(__FILE__, 25)); + } + + /** + * @dataProvider getClassNameProvider + */ + public function testGettingClassAbbreviation($class, $abbr) + { + $this->assertEquals($this->getExtension()->abbrClass($class), $abbr); + } + + /** + * @dataProvider getMethodNameProvider + */ + public function testGettingMethodAbbreviation($method, $abbr) + { + $this->assertEquals($this->getExtension()->abbrMethod($method), $abbr); + } + + public function getClassNameProvider() + { + return array( + array('F\Q\N\Foo', 'Foo'), + array('Bare', 'Bare'), + ); + } + + public function getMethodNameProvider() + { + return array( + array('F\Q\N\Foo::Method', 'Foo::Method()'), + array('Bare::Method', 'Bare::Method()'), + array('Closure', 'Closure'), + array('Method', 'Method()'), + ); + } + + public function testGetName() + { + $this->assertEquals('code', $this->getExtension()->getName()); + } + + protected function getExtension() + { + return new CodeExtension(new FileLinkFormatter('proto://%f#&line=%l&'.substr(__FILE__, 0, 5).'>foobar'), '/root', 'UTF-8'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..df95e4b450b45c014aadbf6d51e69d3ae9debf7e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Extension; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Extension\DumpExtension; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; +use Symfony\Component\VarDumper\VarDumper; +use Symfony\Component\VarDumper\Cloner\VarCloner; + +class DumpExtensionTest extends TestCase +{ + /** + * @dataProvider getDumpTags + */ + public function testDumpTag($template, $debug, $expectedOutput, $expectedDumped) + { + $extension = new DumpExtension(new VarCloner()); + $twig = new \Twig_Environment(new \Twig_Loader_Array(array('template' => $template)), array( + 'debug' => $debug, + 'cache' => false, + 'optimizations' => 0, + )); + $twig->addExtension($extension); + + $dumped = null; + $exception = null; + $prevDumper = VarDumper::setHandler(function ($var) use (&$dumped) { $dumped = $var; }); + + try { + $this->assertEquals($expectedOutput, $twig->render('template')); + } catch (\Exception $exception) { + } + + VarDumper::setHandler($prevDumper); + + if (null !== $exception) { + throw $exception; + } + + $this->assertSame($expectedDumped, $dumped); + } + + public function getDumpTags() + { + return array( + array('A{% dump %}B', true, 'AB', array()), + array('A{% set foo="bar"%}B{% dump %}C', true, 'ABC', array('foo' => 'bar')), + array('A{% dump %}B', false, 'AB', null), + ); + } + + /** + * @dataProvider getDumpArgs + */ + public function testDump($context, $args, $expectedOutput, $debug = true) + { + $extension = new DumpExtension(new VarCloner()); + $twig = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array( + 'debug' => $debug, + 'cache' => false, + 'optimizations' => 0, + )); + + array_unshift($args, $context); + array_unshift($args, $twig); + + $dump = call_user_func_array(array($extension, 'dump'), $args); + + if ($debug) { + $this->assertStringStartsWith('\n"), + array( + array(), + array(123, 456), + "
    123\n
    \n" + ."
    456\n
    \n", + ), + array( + array('foo' => 'bar'), + array(), + "
    array:1 [\n"
    +                ."  \"foo\" => \"bar\"\n"
    +                ."]\n"
    +                ."
    \n", + ), + ); + } + + public function testCustomDumper() + { + $output = ''; + $lineDumper = function ($line) use (&$output) { + $output .= $line; + }; + + $dumper = new HtmlDumper($lineDumper); + + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries( + '
    ',
    +            '
    ' + ); + $extension = new DumpExtension(new VarCloner(), $dumper); + $twig = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array( + 'debug' => true, + 'cache' => false, + 'optimizations' => 0, + )); + + $dump = $extension->dump($twig, array(), 'foo'); + $dump = preg_replace('/sf-dump-\d+/', 'sf-dump', $dump); + + $this->assertEquals( + '
    "'.
    +            "foo\"\n".
    +            "
    \n", + $dump, + 'Custom dumper should be used to dump data.' + ); + + $this->assertEmpty($output, 'Dumper output should be ignored.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/ExpressionExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/ExpressionExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..597dfc75f4165e450ba76d73f96c7f0e823e7446 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/ExpressionExtensionTest.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\Bridge\Twig\Tests\Extension; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Extension\ExpressionExtension; + +class ExpressionExtensionTest extends TestCase +{ + protected $helper; + + public function testExpressionCreation() + { + $template = "{{ expression('1 == 1') }}"; + $twig = new \Twig_Environment(new \Twig_Loader_Array(array('template' => $template)), array('debug' => true, 'cache' => false, 'autoescape' => 'html', 'optimizations' => 0)); + $twig->addExtension(new ExpressionExtension()); + + $output = $twig->render('template'); + $this->assertEquals('1 == 1', $output); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubFilesystemLoader.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubFilesystemLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..1c8e5dcd490f75e9fe71e5fbdb62ad76cdde500b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubFilesystemLoader.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Extension\Fixtures; + +class StubFilesystemLoader extends \Twig_Loader_Filesystem +{ + protected function findTemplate($name, $throw = true) + { + // strip away bundle name + $parts = explode(':', $name); + + return parent::findTemplate(end($parts), $throw); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubTranslator.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubTranslator.php new file mode 100644 index 0000000000000000000000000000000000000000..b7d011b59940fc0de326e5ae7228853743aac03d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubTranslator.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Extension\Fixtures; + +use Symfony\Component\Translation\TranslatorInterface; + +class StubTranslator implements TranslatorInterface +{ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + return '[trans]'.$id.'[/trans]'; + } + + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + return '[trans]'.$id.'[/trans]'; + } + + public function setLocale($locale) + { + } + + public function getLocale() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/child_label.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/child_label.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..8c7c2489901db5f517eb4a52cf68d31f49588b09 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/child_label.html.twig @@ -0,0 +1,3 @@ +{% block form_label %} + +{% endblock form_label %} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/custom_widgets.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/custom_widgets.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..4eda8d76d37366af81e744ed54faa4744bc75cf5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/custom_widgets.html.twig @@ -0,0 +1,25 @@ +{% block _text_id_widget %} +{% spaceless %} +
    + {{ form_widget(form) }} +
    +{% endspaceless %} +{% endblock _text_id_widget %} + +{% block _names_entry_label %} +{% spaceless %} + {% if label is empty %} + {% set label = name|humanize %} + {% endif %} + +{% endspaceless %} +{% endblock _names_entry_label %} + +{% block _name_c_entry_label %} +{% spaceless %} + {% if label is empty %} + {% set label = name|humanize %} + {% endif %} + +{% endspaceless %} +{% endblock _name_c_entry_label %} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/page_dynamic_extends.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/page_dynamic_extends.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..ac166b7b600eec61590c22d14900eb220d63ebc0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/page_dynamic_extends.html.twig @@ -0,0 +1 @@ +{% extends dynamic_template_name ~ '.html.twig' %} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/parent_label.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/parent_label.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..e96278b8f6266625a4b07bfa3e16a9c3f587b039 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/parent_label.html.twig @@ -0,0 +1,3 @@ +{% block form_label %} + +{% endblock form_label %} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/theme.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/theme.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..da1c1b649b62c5ecaf38afa8da386f491d070e47 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/theme.html.twig @@ -0,0 +1,6 @@ +{% block form_widget_simple %} +{% spaceless %} + {% set type = type|default('text') %} + +{% endspaceless %} +{% endblock form_widget_simple %} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/theme_extends.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/theme_extends.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..8c719867ec5b0107c2e61a9b5315a738c9f88a61 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/theme_extends.html.twig @@ -0,0 +1,8 @@ +{% extends 'form_div_layout.html.twig' %} + +{% block form_widget_simple %} +{% spaceless %} + {% set type = type|default('text') %} + +{% endspaceless %} +{% endblock form_widget_simple %} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/theme_use.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/theme_use.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..d485b8d0e7d7d52923b394609f9333f1f7093e19 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/theme_use.html.twig @@ -0,0 +1,8 @@ +{% use 'form_div_layout.html.twig' %} + +{% block form_widget_simple %} +{% spaceless %} + {% set type = type|default('text') %} + +{% endspaceless %} +{% endblock form_widget_simple %} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php new file mode 100644 index 0000000000000000000000000000000000000000..614b59f5823ec3243452ffe08176a01054f5bf0a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Extension; + +use Symfony\Bridge\Twig\Extension\FormExtension; +use Symfony\Bridge\Twig\Form\TwigRenderer; +use Symfony\Bridge\Twig\Form\TwigRendererEngine; +use Symfony\Bridge\Twig\Extension\TranslationExtension; +use Symfony\Bridge\Twig\Tests\Extension\Fixtures\StubTranslator; +use Symfony\Bridge\Twig\Tests\Extension\Fixtures\StubFilesystemLoader; +use Symfony\Component\Form\FormView; +use Symfony\Component\Form\Tests\AbstractBootstrap3HorizontalLayoutTest; + +class FormExtensionBootstrap3HorizontalLayoutTest extends AbstractBootstrap3HorizontalLayoutTest +{ + use RuntimeLoaderProvider; + + protected $testableFeatures = array( + 'choice_attr', + ); + + private $renderer; + + protected function setUp() + { + parent::setUp(); + + $loader = new StubFilesystemLoader(array( + __DIR__.'/../../Resources/views/Form', + __DIR__.'/Fixtures/templates/form', + )); + + $environment = new \Twig_Environment($loader, array('strict_variables' => true)); + $environment->addExtension(new TranslationExtension(new StubTranslator())); + $environment->addExtension(new FormExtension()); + + $rendererEngine = new TwigRendererEngine(array( + 'bootstrap_3_horizontal_layout.html.twig', + 'custom_widgets.html.twig', + ), $environment); + $this->renderer = new TwigRenderer($rendererEngine, $this->getMockBuilder('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')->getMock()); + $this->registerTwigRuntimeLoader($environment, $this->renderer); + } + + protected function renderForm(FormView $view, array $vars = array()) + { + return (string) $this->renderer->renderBlock($view, 'form', $vars); + } + + protected function renderLabel(FormView $view, $label = null, array $vars = array()) + { + if ($label !== null) { + $vars += array('label' => $label); + } + + return (string) $this->renderer->searchAndRenderBlock($view, 'label', $vars); + } + + protected function renderErrors(FormView $view) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'errors'); + } + + protected function renderWidget(FormView $view, array $vars = array()) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'widget', $vars); + } + + protected function renderRow(FormView $view, array $vars = array()) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'row', $vars); + } + + protected function renderRest(FormView $view, array $vars = array()) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'rest', $vars); + } + + protected function renderStart(FormView $view, array $vars = array()) + { + return (string) $this->renderer->renderBlock($view, 'form_start', $vars); + } + + protected function renderEnd(FormView $view, array $vars = array()) + { + return (string) $this->renderer->renderBlock($view, 'form_end', $vars); + } + + protected function setTheme(FormView $view, array $themes) + { + $this->renderer->setTheme($view, $themes); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3LayoutTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3LayoutTest.php new file mode 100644 index 0000000000000000000000000000000000000000..aceda8153d434b7fd14a2d8b553dc511e6ead11e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3LayoutTest.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\Bridge\Twig\Tests\Extension; + +use Symfony\Bridge\Twig\Extension\FormExtension; +use Symfony\Bridge\Twig\Form\TwigRenderer; +use Symfony\Bridge\Twig\Form\TwigRendererEngine; +use Symfony\Bridge\Twig\Extension\TranslationExtension; +use Symfony\Bridge\Twig\Tests\Extension\Fixtures\StubTranslator; +use Symfony\Bridge\Twig\Tests\Extension\Fixtures\StubFilesystemLoader; +use Symfony\Component\Form\FormView; +use Symfony\Component\Form\Tests\AbstractBootstrap3LayoutTest; + +class FormExtensionBootstrap3LayoutTest extends AbstractBootstrap3LayoutTest +{ + use RuntimeLoaderProvider; + + private $renderer; + + protected function setUp() + { + parent::setUp(); + + $loader = new StubFilesystemLoader(array( + __DIR__.'/../../Resources/views/Form', + __DIR__.'/Fixtures/templates/form', + )); + + $environment = new \Twig_Environment($loader, array('strict_variables' => true)); + $environment->addExtension(new TranslationExtension(new StubTranslator())); + $environment->addExtension(new FormExtension()); + + $rendererEngine = new TwigRendererEngine(array( + 'bootstrap_3_layout.html.twig', + 'custom_widgets.html.twig', + ), $environment); + $this->renderer = new TwigRenderer($rendererEngine, $this->getMockBuilder('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')->getMock()); + $this->registerTwigRuntimeLoader($environment, $this->renderer); + } + + public function testStartTagHasNoActionAttributeWhenActionIsEmpty() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => '', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('
    ', $html); + } + + public function testStartTagHasActionAttributeWhenActionIsZero() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => '0', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('', $html); + } + + protected function renderForm(FormView $view, array $vars = array()) + { + return (string) $this->renderer->renderBlock($view, 'form', $vars); + } + + protected function renderLabel(FormView $view, $label = null, array $vars = array()) + { + if ($label !== null) { + $vars += array('label' => $label); + } + + return (string) $this->renderer->searchAndRenderBlock($view, 'label', $vars); + } + + protected function renderErrors(FormView $view) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'errors'); + } + + protected function renderWidget(FormView $view, array $vars = array()) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'widget', $vars); + } + + protected function renderRow(FormView $view, array $vars = array()) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'row', $vars); + } + + protected function renderRest(FormView $view, array $vars = array()) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'rest', $vars); + } + + protected function renderStart(FormView $view, array $vars = array()) + { + return (string) $this->renderer->renderBlock($view, 'form_start', $vars); + } + + protected function renderEnd(FormView $view, array $vars = array()) + { + return (string) $this->renderer->renderBlock($view, 'form_end', $vars); + } + + protected function setTheme(FormView $view, array $themes) + { + $this->renderer->setTheme($view, $themes); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php new file mode 100644 index 0000000000000000000000000000000000000000..34058749bca77c923f7a23d266ea8bd8f1b8dfbb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php @@ -0,0 +1,207 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Extension; + +use Symfony\Bridge\Twig\Extension\FormExtension; +use Symfony\Bridge\Twig\Form\TwigRenderer; +use Symfony\Bridge\Twig\Form\TwigRendererEngine; +use Symfony\Bridge\Twig\Extension\TranslationExtension; +use Symfony\Bridge\Twig\Tests\Extension\Fixtures\StubTranslator; +use Symfony\Bridge\Twig\Tests\Extension\Fixtures\StubFilesystemLoader; +use Symfony\Component\Form\ChoiceList\View\ChoiceView; +use Symfony\Component\Form\FormView; +use Symfony\Component\Form\Tests\AbstractDivLayoutTest; + +class FormExtensionDivLayoutTest extends AbstractDivLayoutTest +{ + use RuntimeLoaderProvider; + + private $renderer; + + protected function setUp() + { + parent::setUp(); + + $loader = new StubFilesystemLoader(array( + __DIR__.'/../../Resources/views/Form', + __DIR__.'/Fixtures/templates/form', + )); + + $environment = new \Twig_Environment($loader, array('strict_variables' => true)); + $environment->addExtension(new TranslationExtension(new StubTranslator())); + $environment->addGlobal('global', ''); + // the value can be any template that exists + $environment->addGlobal('dynamic_template_name', 'child_label'); + $environment->addExtension(new FormExtension()); + + $rendererEngine = new TwigRendererEngine(array( + 'form_div_layout.html.twig', + 'custom_widgets.html.twig', + ), $environment); + $this->renderer = new TwigRenderer($rendererEngine, $this->getMockBuilder('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')->getMock()); + $this->registerTwigRuntimeLoader($environment, $this->renderer); + } + + public function testThemeBlockInheritanceUsingUse() + { + $view = $this->factory + ->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\EmailType') + ->createView() + ; + + $this->setTheme($view, array('theme_use.html.twig')); + + $this->assertMatchesXpath( + $this->renderWidget($view), + '/input[@type="email"][@rel="theme"]' + ); + } + + public function testThemeBlockInheritanceUsingExtend() + { + $view = $this->factory + ->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\EmailType') + ->createView() + ; + + $this->setTheme($view, array('theme_extends.html.twig')); + + $this->assertMatchesXpath( + $this->renderWidget($view), + '/input[@type="email"][@rel="theme"]' + ); + } + + public function testThemeBlockInheritanceUsingDynamicExtend() + { + $view = $this->factory + ->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\EmailType') + ->createView() + ; + + $this->renderer->setTheme($view, array('page_dynamic_extends.html.twig')); + $this->renderer->searchAndRenderBlock($view, 'row'); + } + + public function isSelectedChoiceProvider() + { + return array( + array(true, '0', '0'), + array(true, '1', '1'), + array(true, '', ''), + array(true, '1.23', '1.23'), + array(true, 'foo', 'foo'), + array(true, 'foo10', 'foo10'), + array(true, 'foo', array(1, 'foo', 'foo10')), + + array(false, 10, array(1, 'foo', 'foo10')), + array(false, 0, array(1, 'foo', 'foo10')), + ); + } + + /** + * @dataProvider isSelectedChoiceProvider + */ + public function testIsChoiceSelected($expected, $choice, $value) + { + $choice = new ChoiceView($choice, $choice, $choice.' label'); + + $this->assertSame($expected, \Symfony\Bridge\Twig\Extension\twig_is_selected_choice($choice, $value)); + } + + public function testStartTagHasNoActionAttributeWhenActionIsEmpty() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => '', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('', $html); + } + + public function testStartTagHasActionAttributeWhenActionIsZero() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => '0', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('', $html); + } + + protected function renderForm(FormView $view, array $vars = array()) + { + return (string) $this->renderer->renderBlock($view, 'form', $vars); + } + + protected function renderLabel(FormView $view, $label = null, array $vars = array()) + { + if ($label !== null) { + $vars += array('label' => $label); + } + + return (string) $this->renderer->searchAndRenderBlock($view, 'label', $vars); + } + + protected function renderErrors(FormView $view) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'errors'); + } + + protected function renderWidget(FormView $view, array $vars = array()) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'widget', $vars); + } + + protected function renderRow(FormView $view, array $vars = array()) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'row', $vars); + } + + protected function renderRest(FormView $view, array $vars = array()) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'rest', $vars); + } + + protected function renderStart(FormView $view, array $vars = array()) + { + return (string) $this->renderer->renderBlock($view, 'form_start', $vars); + } + + protected function renderEnd(FormView $view, array $vars = array()) + { + return (string) $this->renderer->renderBlock($view, 'form_end', $vars); + } + + protected function setTheme(FormView $view, array $themes) + { + $this->renderer->setTheme($view, $themes); + } + + public static function themeBlockInheritanceProvider() + { + return array( + array(array('theme.html.twig')), + ); + } + + public static function themeInheritanceProvider() + { + return array( + array(array('parent_label.html.twig'), array('child_label.html.twig')), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8d4396a54c4ddeb2ec194db828ff210531d5b890 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Extension; + +use Symfony\Component\Form\FormView; +use Symfony\Bridge\Twig\Form\TwigRenderer; +use Symfony\Bridge\Twig\Form\TwigRendererEngine; +use Symfony\Bridge\Twig\Extension\FormExtension; +use Symfony\Bridge\Twig\Extension\TranslationExtension; +use Symfony\Component\Form\Tests\AbstractTableLayoutTest; +use Symfony\Bridge\Twig\Tests\Extension\Fixtures\StubTranslator; +use Symfony\Bridge\Twig\Tests\Extension\Fixtures\StubFilesystemLoader; + +class FormExtensionTableLayoutTest extends AbstractTableLayoutTest +{ + use RuntimeLoaderProvider; + + private $renderer; + + protected function setUp() + { + parent::setUp(); + + $loader = new StubFilesystemLoader(array( + __DIR__.'/../../Resources/views/Form', + __DIR__.'/Fixtures/templates/form', + )); + + $environment = new \Twig_Environment($loader, array('strict_variables' => true)); + $environment->addExtension(new TranslationExtension(new StubTranslator())); + $environment->addGlobal('global', ''); + $environment->addExtension(new FormExtension()); + + $rendererEngine = new TwigRendererEngine(array( + 'form_table_layout.html.twig', + 'custom_widgets.html.twig', + ), $environment); + $this->renderer = new TwigRenderer($rendererEngine, $this->getMockBuilder('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')->getMock()); + $this->registerTwigRuntimeLoader($environment, $this->renderer); + } + + public function testStartTagHasNoActionAttributeWhenActionIsEmpty() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => '', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('', $html); + } + + public function testStartTagHasActionAttributeWhenActionIsZero() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => '0', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('', $html); + } + + protected function renderForm(FormView $view, array $vars = array()) + { + return (string) $this->renderer->renderBlock($view, 'form', $vars); + } + + protected function renderLabel(FormView $view, $label = null, array $vars = array()) + { + if ($label !== null) { + $vars += array('label' => $label); + } + + return (string) $this->renderer->searchAndRenderBlock($view, 'label', $vars); + } + + protected function renderErrors(FormView $view) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'errors'); + } + + protected function renderWidget(FormView $view, array $vars = array()) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'widget', $vars); + } + + protected function renderRow(FormView $view, array $vars = array()) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'row', $vars); + } + + protected function renderRest(FormView $view, array $vars = array()) + { + return (string) $this->renderer->searchAndRenderBlock($view, 'rest', $vars); + } + + protected function renderStart(FormView $view, array $vars = array()) + { + return (string) $this->renderer->renderBlock($view, 'form_start', $vars); + } + + protected function renderEnd(FormView $view, array $vars = array()) + { + return (string) $this->renderer->renderBlock($view, 'form_end', $vars); + } + + protected function setTheme(FormView $view, array $themes) + { + $this->renderer->setTheme($view, $themes); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/HttpFoundationExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/HttpFoundationExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8f0c66ad78bb4f93781f034a4b7bd7b419e449f6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/HttpFoundationExtensionTest.php @@ -0,0 +1,134 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Extension; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Extension\HttpFoundationExtension; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\RequestContext; + +class HttpFoundationExtensionTest extends TestCase +{ + /** + * @dataProvider getGenerateAbsoluteUrlData() + */ + public function testGenerateAbsoluteUrl($expected, $path, $pathinfo) + { + $stack = new RequestStack(); + $stack->push(Request::create($pathinfo)); + $extension = new HttpFoundationExtension($stack); + + $this->assertEquals($expected, $extension->generateAbsoluteUrl($path)); + } + + public function getGenerateAbsoluteUrlData() + { + return array( + array('http://localhost/foo.png', '/foo.png', '/foo/bar.html'), + array('http://localhost/foo/foo.png', 'foo.png', '/foo/bar.html'), + array('http://localhost/foo/foo.png', 'foo.png', '/foo/bar'), + array('http://localhost/foo/bar/foo.png', 'foo.png', '/foo/bar/'), + + array('http://example.com/baz', 'http://example.com/baz', '/'), + array('https://example.com/baz', 'https://example.com/baz', '/'), + array('//example.com/baz', '//example.com/baz', '/'), + ); + } + + /** + * @dataProvider getGenerateAbsoluteUrlRequestContextData + */ + public function testGenerateAbsoluteUrlWithRequestContext($path, $baseUrl, $host, $scheme, $httpPort, $httpsPort, $expected) + { + if (!class_exists('Symfony\Component\Routing\RequestContext')) { + $this->markTestSkipped('The Routing component is needed to run tests that depend on its request context.'); + } + + $requestContext = new RequestContext($baseUrl, 'GET', $host, $scheme, $httpPort, $httpsPort, $path); + $extension = new HttpFoundationExtension(new RequestStack(), $requestContext); + + $this->assertEquals($expected, $extension->generateAbsoluteUrl($path)); + } + + /** + * @dataProvider getGenerateAbsoluteUrlRequestContextData + */ + public function testGenerateAbsoluteUrlWithoutRequestAndRequestContext($path) + { + if (!class_exists('Symfony\Component\Routing\RequestContext')) { + $this->markTestSkipped('The Routing component is needed to run tests that depend on its request context.'); + } + + $extension = new HttpFoundationExtension(new RequestStack()); + + $this->assertEquals($path, $extension->generateAbsoluteUrl($path)); + } + + public function getGenerateAbsoluteUrlRequestContextData() + { + return array( + array('/foo.png', '/foo', 'localhost', 'http', 80, 443, 'http://localhost/foo.png'), + array('foo.png', '/foo', 'localhost', 'http', 80, 443, 'http://localhost/foo/foo.png'), + array('foo.png', '/foo/bar/', 'localhost', 'http', 80, 443, 'http://localhost/foo/bar/foo.png'), + array('/foo.png', '/foo', 'localhost', 'https', 80, 443, 'https://localhost/foo.png'), + array('foo.png', '/foo', 'localhost', 'https', 80, 443, 'https://localhost/foo/foo.png'), + array('foo.png', '/foo/bar/', 'localhost', 'https', 80, 443, 'https://localhost/foo/bar/foo.png'), + array('/foo.png', '/foo', 'localhost', 'http', 443, 80, 'http://localhost:443/foo.png'), + array('/foo.png', '/foo', 'localhost', 'https', 443, 80, 'https://localhost:80/foo.png'), + ); + } + + public function testGenerateAbsoluteUrlWithScriptFileName() + { + $request = Request::create('http://localhost/app/web/app_dev.php'); + $request->server->set('SCRIPT_FILENAME', '/var/www/app/web/app_dev.php'); + + $stack = new RequestStack(); + $stack->push($request); + $extension = new HttpFoundationExtension($stack); + + $this->assertEquals( + 'http://localhost/app/web/bundles/framework/css/structure.css', + $extension->generateAbsoluteUrl('/app/web/bundles/framework/css/structure.css') + ); + } + + /** + * @dataProvider getGenerateRelativePathData() + */ + public function testGenerateRelativePath($expected, $path, $pathinfo) + { + if (!method_exists('Symfony\Component\HttpFoundation\Request', 'getRelativeUriForPath')) { + $this->markTestSkipped('Your version of Symfony HttpFoundation is too old.'); + } + + $stack = new RequestStack(); + $stack->push(Request::create($pathinfo)); + $extension = new HttpFoundationExtension($stack); + + $this->assertEquals($expected, $extension->generateRelativePath($path)); + } + + public function getGenerateRelativePathData() + { + return array( + array('../foo.png', '/foo.png', '/foo/bar.html'), + array('../baz/foo.png', '/baz/foo.png', '/foo/bar.html'), + array('baz/foo.png', 'baz/foo.png', '/foo/bar.html'), + + array('http://example.com/baz', 'http://example.com/baz', '/'), + array('https://example.com/baz', 'https://example.com/baz', '/'), + array('//example.com/baz', '//example.com/baz', '/'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8909b3e4e43b48eef1b7c18bffb2bc5e68402240 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Extension; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Extension\HttpKernelExtension; +use Symfony\Bridge\Twig\Extension\HttpKernelRuntime; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Fragment\FragmentHandler; + +class HttpKernelExtensionTest extends TestCase +{ + /** + * @expectedException \Twig_Error_Runtime + */ + public function testFragmentWithError() + { + $renderer = $this->getFragmentHandler($this->throwException(new \Exception('foo'))); + + $this->renderTemplate($renderer); + } + + public function testRenderFragment() + { + $renderer = $this->getFragmentHandler($this->returnValue(new Response('html'))); + + $response = $this->renderTemplate($renderer); + + $this->assertEquals('html', $response); + } + + public function testUnknownFragmentRenderer() + { + $context = $this->getMockBuilder('Symfony\\Component\\HttpFoundation\\RequestStack') + ->disableOriginalConstructor() + ->getMock() + ; + $renderer = new FragmentHandler($context); + + if (method_exists($this, 'expectException')) { + $this->expectException('InvalidArgumentException'); + $this->expectExceptionMessage('The "inline" renderer does not exist.'); + } else { + $this->setExpectedException('InvalidArgumentException', 'The "inline" renderer does not exist.'); + } + + $renderer->render('/foo'); + } + + protected function getFragmentHandler($return) + { + $strategy = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Fragment\\FragmentRendererInterface')->getMock(); + $strategy->expects($this->once())->method('getName')->will($this->returnValue('inline')); + $strategy->expects($this->once())->method('render')->will($return); + + $context = $this->getMockBuilder('Symfony\\Component\\HttpFoundation\\RequestStack') + ->disableOriginalConstructor() + ->getMock() + ; + + $context->expects($this->any())->method('getCurrentRequest')->will($this->returnValue(Request::create('/'))); + + return new FragmentHandler($context, array($strategy), false); + } + + protected function renderTemplate(FragmentHandler $renderer, $template = '{{ render("foo") }}') + { + $loader = new \Twig_Loader_Array(array('index' => $template)); + $twig = new \Twig_Environment($loader, array('debug' => true, 'cache' => false)); + $twig->addExtension(new HttpKernelExtension()); + + $loader = $this->getMockBuilder('Twig_RuntimeLoaderInterface')->getMock(); + $loader->expects($this->any())->method('load')->will($this->returnValueMap(array( + array('Symfony\Bridge\Twig\Extension\HttpKernelRuntime', new HttpKernelRuntime($renderer)), + ))); + $twig->addRuntimeLoader($loader); + + return $twig->render('index'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5fa4e9cd36b1c0b7888badfadcb42c94f1098e35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Extension; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Extension\RoutingExtension; + +class RoutingExtensionTest extends TestCase +{ + /** + * @dataProvider getEscapingTemplates + */ + public function testEscaping($template, $mustBeEscaped) + { + $twig = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('debug' => true, 'cache' => false, 'autoescape' => 'html', 'optimizations' => 0)); + $twig->addExtension(new RoutingExtension($this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->getMock())); + + $nodes = $twig->parse($twig->tokenize(new \Twig_Source($template, ''))); + + $this->assertSame($mustBeEscaped, $nodes->getNode('body')->getNode(0)->getNode('expr') instanceof \Twig_Node_Expression_Filter); + } + + public function getEscapingTemplates() + { + return array( + array('{{ path("foo") }}', false), + array('{{ path("foo", {}) }}', false), + array('{{ path("foo", { foo: "foo" }) }}', false), + array('{{ path("foo", foo) }}', true), + array('{{ path("foo", { foo: foo }) }}', true), + array('{{ path("foo", { foo: ["foo", "bar"] }) }}', true), + array('{{ path("foo", { foo: "foo", bar: "bar" }) }}', true), + + array('{{ path(name = "foo", parameters = {}) }}', false), + array('{{ path(name = "foo", parameters = { foo: "foo" }) }}', false), + array('{{ path(name = "foo", parameters = foo) }}', true), + array('{{ path(name = "foo", parameters = { foo: ["foo", "bar"] }) }}', true), + array('{{ path(name = "foo", parameters = { foo: foo }) }}', true), + array('{{ path(name = "foo", parameters = { foo: "foo", bar: "bar" }) }}', true), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/RuntimeLoaderProvider.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/RuntimeLoaderProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..a6c397ffd4d90397799c94c9cd313e75289cbf6b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/RuntimeLoaderProvider.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Extension; + +use Symfony\Bridge\Twig\Form\TwigRenderer; + +trait RuntimeLoaderProvider +{ + protected function registerTwigRuntimeLoader(\Twig_Environment $environment, TwigRenderer $renderer) + { + $loader = $this->getMockBuilder('Twig_RuntimeLoaderInterface')->getMock(); + $loader->expects($this->any())->method('load')->will($this->returnValueMap(array( + array('Symfony\Bridge\Twig\Form\TwigRenderer', $renderer), + ))); + $environment->addRuntimeLoader($loader); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c50252eaafcca0a5d8e77d4ea0b386027f2bd2bd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.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\Bridge\Twig\Tests\Extension; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Extension\StopwatchExtension; + +class StopwatchExtensionTest extends TestCase +{ + /** + * @expectedException \Twig_Error_Syntax + */ + public function testFailIfStoppingWrongEvent() + { + $this->testTiming('{% stopwatch "foo" %}{% endstopwatch "bar" %}', array()); + } + + /** + * @dataProvider getTimingTemplates + */ + public function testTiming($template, $events) + { + $twig = new \Twig_Environment(new \Twig_Loader_Array(array('template' => $template)), array('debug' => true, 'cache' => false, 'autoescape' => 'html', 'optimizations' => 0)); + $twig->addExtension(new StopwatchExtension($this->getStopwatch($events))); + + try { + $nodes = $twig->render('template'); + } catch (\Twig_Error_Runtime $e) { + throw $e->getPrevious(); + } + } + + public function getTimingTemplates() + { + return array( + array('{% stopwatch "foo" %}something{% endstopwatch %}', 'foo'), + array('{% stopwatch "foo" %}symfony is fun{% endstopwatch %}{% stopwatch "bar" %}something{% endstopwatch %}', array('foo', 'bar')), + array('{% set foo = "foo" %}{% stopwatch foo %}something{% endstopwatch %}', 'foo'), + array('{% set foo = "foo" %}{% stopwatch foo %}something {% set foo = "bar" %}{% endstopwatch %}', 'foo'), + array('{% stopwatch "foo.bar" %}something{% endstopwatch %}', 'foo.bar'), + array('{% stopwatch "foo" %}something{% endstopwatch %}{% stopwatch "foo" %}something else{% endstopwatch %}', array('foo', 'foo')), + ); + } + + protected function getStopwatch($events = array()) + { + $events = is_array($events) ? $events : array($events); + $stopwatch = $this->getMockBuilder('Symfony\Component\Stopwatch\Stopwatch')->getMock(); + + $i = -1; + foreach ($events as $eventName) { + $stopwatch->expects($this->at(++$i)) + ->method('start') + ->with($this->equalTo($eventName), 'template') + ; + $stopwatch->expects($this->at(++$i)) + ->method('stop') + ->with($this->equalTo($eventName)) + ; + } + + return $stopwatch; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..446697d3dd8b20c36474634538e055c368e74c34 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php @@ -0,0 +1,201 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Extension; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Extension\TranslationExtension; +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\MessageSelector; +use Symfony\Component\Translation\Loader\ArrayLoader; + +class TranslationExtensionTest extends TestCase +{ + public function testEscaping() + { + $output = $this->getTemplate('{% trans %}Percent: %value%%% (%msg%){% endtrans %}')->render(array('value' => 12, 'msg' => 'approx.')); + + $this->assertEquals('Percent: 12% (approx.)', $output); + } + + /** + * @dataProvider getTransTests + */ + public function testTrans($template, $expected, array $variables = array()) + { + if ($expected != $this->getTemplate($template)->render($variables)) { + echo $template."\n"; + $loader = new \Twig_Loader_Array(array('index' => $template)); + $twig = new \Twig_Environment($loader, array('debug' => true, 'cache' => false)); + $twig->addExtension(new TranslationExtension(new Translator('en', new MessageSelector()))); + + echo $twig->compile($twig->parse($twig->tokenize($twig->getLoader()->getSourceContext('index'))))."\n\n"; + $this->assertEquals($expected, $this->getTemplate($template)->render($variables)); + } + + $this->assertEquals($expected, $this->getTemplate($template)->render($variables)); + } + + /** + * @expectedException \Twig_Error_Syntax + * @expectedExceptionMessage Unexpected token. Twig was looking for the "with", "from", or "into" keyword in "index" at line 3. + */ + public function testTransUnknownKeyword() + { + $output = $this->getTemplate("{% trans \n\nfoo %}{% endtrans %}")->render(); + } + + /** + * @expectedException \Twig_Error_Syntax + * @expectedExceptionMessage A message inside a trans tag must be a simple text in "index" at line 2. + */ + public function testTransComplexBody() + { + $output = $this->getTemplate("{% trans %}\n{{ 1 + 2 }}{% endtrans %}")->render(); + } + + /** + * @expectedException \Twig_Error_Syntax + * @expectedExceptionMessage A message inside a transchoice tag must be a simple text in "index" at line 2. + */ + public function testTransChoiceComplexBody() + { + $output = $this->getTemplate("{% transchoice count %}\n{{ 1 + 2 }}{% endtranschoice %}")->render(); + } + + public function getTransTests() + { + return array( + // trans tag + array('{% trans %}Hello{% endtrans %}', 'Hello'), + array('{% trans %}%name%{% endtrans %}', 'Symfony', array('name' => 'Symfony')), + + array('{% trans from elsewhere %}Hello{% endtrans %}', 'Hello'), + + array('{% trans %}Hello %name%{% endtrans %}', 'Hello Symfony', array('name' => 'Symfony')), + array('{% trans with { \'%name%\': \'Symfony\' } %}Hello %name%{% endtrans %}', 'Hello Symfony'), + array('{% set vars = { \'%name%\': \'Symfony\' } %}{% trans with vars %}Hello %name%{% endtrans %}', 'Hello Symfony'), + + array('{% trans into "fr"%}Hello{% endtrans %}', 'Hello'), + + // transchoice + array('{% transchoice count from "messages" %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}', + 'There is no apples', array('count' => 0)), + array('{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}', + 'There is 5 apples', array('count' => 5)), + array('{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}', + 'There is 5 apples (Symfony)', array('count' => 5, 'name' => 'Symfony')), + array('{% transchoice count with { \'%name%\': \'Symfony\' } %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}', + 'There is 5 apples (Symfony)', array('count' => 5)), + array('{% transchoice count into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}', + 'There is no apples', array('count' => 0)), + array('{% transchoice 5 into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}', + 'There is 5 apples'), + + // trans filter + array('{{ "Hello"|trans }}', 'Hello'), + array('{{ name|trans }}', 'Symfony', array('name' => 'Symfony')), + array('{{ hello|trans({ \'%name%\': \'Symfony\' }) }}', 'Hello Symfony', array('hello' => 'Hello %name%')), + array('{% set vars = { \'%name%\': \'Symfony\' } %}{{ hello|trans(vars) }}', 'Hello Symfony', array('hello' => 'Hello %name%')), + array('{{ "Hello"|trans({}, "messages", "fr") }}', 'Hello'), + + // transchoice filter + array('{{ "{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples"|transchoice(count) }}', 'There is 5 apples', array('count' => 5)), + array('{{ text|transchoice(5, {\'%name%\': \'Symfony\'}) }}', 'There is 5 apples (Symfony)', array('text' => '{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%)')), + array('{{ "{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples"|transchoice(count, {}, "messages", "fr") }}', 'There is 5 apples', array('count' => 5)), + ); + } + + public function testDefaultTranslationDomain() + { + $templates = array( + 'index' => ' + {%- extends "base" %} + + {%- trans_default_domain "foo" %} + + {%- block content %} + {%- trans %}foo{% endtrans %} + {%- trans from "custom" %}foo{% endtrans %} + {{- "foo"|trans }} + {{- "foo"|trans({}, "custom") }} + {{- "foo"|transchoice(1) }} + {{- "foo"|transchoice(1, {}, "custom") }} + {% endblock %} + ', + + 'base' => ' + {%- block content "" %} + ', + ); + + $translator = new Translator('en', new MessageSelector()); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (messages)'), 'en'); + $translator->addResource('array', array('foo' => 'foo (custom)'), 'en', 'custom'); + $translator->addResource('array', array('foo' => 'foo (foo)'), 'en', 'foo'); + + $template = $this->getTemplate($templates, $translator); + + $this->assertEquals('foo (foo)foo (custom)foo (foo)foo (custom)foo (foo)foo (custom)', trim($template->render(array()))); + } + + public function testDefaultTranslationDomainWithNamedArguments() + { + $templates = array( + 'index' => ' + {%- trans_default_domain "foo" %} + + {%- block content %} + {{- "foo"|trans(arguments = {}, domain = "custom") }} + {{- "foo"|transchoice(count = 1) }} + {{- "foo"|transchoice(count = 1, arguments = {}, domain = "custom") }} + {{- "foo"|trans({}, domain = "custom") }} + {{- "foo"|trans({}, "custom", locale = "fr") }} + {{- "foo"|transchoice(1, arguments = {}, domain = "custom") }} + {{- "foo"|transchoice(1, {}, "custom", locale = "fr") }} + {% endblock %} + ', + + 'base' => ' + {%- block content "" %} + ', + ); + + $translator = new Translator('en', new MessageSelector()); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (messages)'), 'en'); + $translator->addResource('array', array('foo' => 'foo (custom)'), 'en', 'custom'); + $translator->addResource('array', array('foo' => 'foo (foo)'), 'en', 'foo'); + $translator->addResource('array', array('foo' => 'foo (fr)'), 'fr', 'custom'); + + $template = $this->getTemplate($templates, $translator); + + $this->assertEquals('foo (custom)foo (foo)foo (custom)foo (custom)foo (fr)foo (custom)foo (fr)', trim($template->render(array()))); + } + + protected function getTemplate($template, $translator = null) + { + if (null === $translator) { + $translator = new Translator('en', new MessageSelector()); + } + + if (is_array($template)) { + $loader = new \Twig_Loader_Array($template); + } else { + $loader = new \Twig_Loader_Array(array('index' => $template)); + } + $twig = new \Twig_Environment($loader, array('debug' => true, 'cache' => false)); + $twig->addExtension(new TranslationExtension($translator)); + + return $twig->loadTemplate('index'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Fixtures/extractor/syntax_error.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Fixtures/extractor/syntax_error.twig new file mode 100644 index 0000000000000000000000000000000000000000..b3e069870bdab2b0a91cf57d08b5ebe422c6beec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Fixtures/extractor/syntax_error.twig @@ -0,0 +1 @@ +{% syntax error diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Fixtures/extractor/with_translations.html.twig b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Fixtures/extractor/with_translations.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..8cdb42d293c2d68a5a18499aafe103808842670b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Fixtures/extractor/with_translations.html.twig @@ -0,0 +1 @@ +

    {{ 'Hi!'|trans }}

    diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Node/DumpNodeTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Node/DumpNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5e589c2db11dbe06c8b4006aedca0724c38f513c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Node/DumpNodeTest.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Node; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Node\DumpNode; + +class DumpNodeTest extends TestCase +{ + public function testNoVar() + { + $node = new DumpNode('bar', null, 7); + + $env = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); + $compiler = new \Twig_Compiler($env); + + $expected = <<<'EOTXT' +if ($this->env->isDebug()) { + $barvars = array(); + foreach ($context as $barkey => $barval) { + if (!$barval instanceof \Twig_Template) { + $barvars[$barkey] = $barval; + } + } + // line 7 + \Symfony\Component\VarDumper\VarDumper::dump($barvars); +} + +EOTXT; + + $this->assertSame($expected, $compiler->compile($node)->getSource()); + } + + public function testIndented() + { + $node = new DumpNode('bar', null, 7); + + $env = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); + $compiler = new \Twig_Compiler($env); + + $expected = <<<'EOTXT' + if ($this->env->isDebug()) { + $barvars = array(); + foreach ($context as $barkey => $barval) { + if (!$barval instanceof \Twig_Template) { + $barvars[$barkey] = $barval; + } + } + // line 7 + \Symfony\Component\VarDumper\VarDumper::dump($barvars); + } + +EOTXT; + + $this->assertSame($expected, $compiler->compile($node, 1)->getSource()); + } + + public function testOneVar() + { + $vars = new \Twig_Node(array( + new \Twig_Node_Expression_Name('foo', 7), + )); + $node = new DumpNode('bar', $vars, 7); + + $env = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); + $compiler = new \Twig_Compiler($env); + + $expected = <<<'EOTXT' +if ($this->env->isDebug()) { + // line 7 + \Symfony\Component\VarDumper\VarDumper::dump(%foo%); +} + +EOTXT; + + if (PHP_VERSION_ID >= 70000) { + $expected = preg_replace('/%(.*?)%/', '($context["$1"] ?? null)', $expected); + } else { + $expected = preg_replace('/%(.*?)%/', '(isset($context["$1"]) ? $context["$1"] : null)', $expected); + } + + $this->assertSame($expected, $compiler->compile($node)->getSource()); + } + + public function testMultiVars() + { + $vars = new \Twig_Node(array( + new \Twig_Node_Expression_Name('foo', 7), + new \Twig_Node_Expression_Name('bar', 7), + )); + $node = new DumpNode('bar', $vars, 7); + + $env = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); + $compiler = new \Twig_Compiler($env); + + $expected = <<<'EOTXT' +if ($this->env->isDebug()) { + // line 7 + \Symfony\Component\VarDumper\VarDumper::dump(array( + "foo" => %foo%, + "bar" => %bar%, + )); +} + +EOTXT; + + if (PHP_VERSION_ID >= 70000) { + $expected = preg_replace('/%(.*?)%/', '($context["$1"] ?? null)', $expected); + } else { + $expected = preg_replace('/%(.*?)%/', '(isset($context["$1"]) ? $context["$1"] : null)', $expected); + } + + $this->assertSame($expected, $compiler->compile($node)->getSource()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9d3576e0b4430c8baa56fc86b6d63f2822a15e42 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Node; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Node\FormThemeNode; + +class FormThemeTest extends TestCase +{ + public function testConstructor() + { + $form = new \Twig_Node_Expression_Name('form', 0); + $resources = new \Twig_Node(array( + new \Twig_Node_Expression_Constant('tpl1', 0), + new \Twig_Node_Expression_Constant('tpl2', 0), + )); + + $node = new FormThemeNode($form, $resources, 0); + + $this->assertEquals($form, $node->getNode('form')); + $this->assertEquals($resources, $node->getNode('resources')); + } + + public function testCompile() + { + $form = new \Twig_Node_Expression_Name('form', 0); + $resources = new \Twig_Node_Expression_Array(array( + new \Twig_Node_Expression_Constant(0, 0), + new \Twig_Node_Expression_Constant('tpl1', 0), + new \Twig_Node_Expression_Constant(1, 0), + new \Twig_Node_Expression_Constant('tpl2', 0), + ), 0); + + $node = new FormThemeNode($form, $resources, 0); + + $compiler = new \Twig_Compiler(new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); + + $this->assertEquals( + sprintf( + '$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->setTheme(%s, array(0 => "tpl1", 1 => "tpl2"));', + $this->getVariableGetter('form') + ), + trim($compiler->compile($node)->getSource()) + ); + + $resources = new \Twig_Node_Expression_Constant('tpl1', 0); + + $node = new FormThemeNode($form, $resources, 0); + + $this->assertEquals( + sprintf( + '$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->setTheme(%s, "tpl1");', + $this->getVariableGetter('form') + ), + trim($compiler->compile($node)->getSource()) + ); + } + + protected function getVariableGetter($name) + { + if (PHP_VERSION_ID >= 70000) { + return sprintf('($context["%s"] ?? null)', $name, $name); + } + + return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b292ef63f8555eee58acc8061ad89cc2f54e314c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php @@ -0,0 +1,273 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Node; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode; + +class SearchAndRenderBlockNodeTest extends TestCase +{ + public function testCompileWidget() + { + $arguments = new \Twig_Node(array( + new \Twig_Node_Expression_Name('form', 0), + )); + + $node = new SearchAndRenderBlockNode('form_widget', $arguments, 0); + + $compiler = new \Twig_Compiler(new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); + + $this->assertEquals( + sprintf( + '$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->searchAndRenderBlock(%s, \'widget\')', + $this->getVariableGetter('form') + ), + trim($compiler->compile($node)->getSource()) + ); + } + + public function testCompileWidgetWithVariables() + { + $arguments = new \Twig_Node(array( + new \Twig_Node_Expression_Name('form', 0), + new \Twig_Node_Expression_Array(array( + new \Twig_Node_Expression_Constant('foo', 0), + new \Twig_Node_Expression_Constant('bar', 0), + ), 0), + )); + + $node = new SearchAndRenderBlockNode('form_widget', $arguments, 0); + + $compiler = new \Twig_Compiler(new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); + + $this->assertEquals( + sprintf( + '$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->searchAndRenderBlock(%s, \'widget\', array("foo" => "bar"))', + $this->getVariableGetter('form') + ), + trim($compiler->compile($node)->getSource()) + ); + } + + public function testCompileLabelWithLabel() + { + $arguments = new \Twig_Node(array( + new \Twig_Node_Expression_Name('form', 0), + new \Twig_Node_Expression_Constant('my label', 0), + )); + + $node = new SearchAndRenderBlockNode('form_label', $arguments, 0); + + $compiler = new \Twig_Compiler(new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); + + $this->assertEquals( + sprintf( + '$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->searchAndRenderBlock(%s, \'label\', array("label" => "my label"))', + $this->getVariableGetter('form') + ), + trim($compiler->compile($node)->getSource()) + ); + } + + public function testCompileLabelWithNullLabel() + { + $arguments = new \Twig_Node(array( + new \Twig_Node_Expression_Name('form', 0), + new \Twig_Node_Expression_Constant(null, 0), + )); + + $node = new SearchAndRenderBlockNode('form_label', $arguments, 0); + + $compiler = new \Twig_Compiler(new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); + + // "label" => null must not be included in the output! + // Otherwise the default label is overwritten with null. + $this->assertEquals( + sprintf( + '$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->searchAndRenderBlock(%s, \'label\')', + $this->getVariableGetter('form') + ), + trim($compiler->compile($node)->getSource()) + ); + } + + public function testCompileLabelWithEmptyStringLabel() + { + $arguments = new \Twig_Node(array( + new \Twig_Node_Expression_Name('form', 0), + new \Twig_Node_Expression_Constant('', 0), + )); + + $node = new SearchAndRenderBlockNode('form_label', $arguments, 0); + + $compiler = new \Twig_Compiler(new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); + + // "label" => null must not be included in the output! + // Otherwise the default label is overwritten with null. + $this->assertEquals( + sprintf( + '$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->searchAndRenderBlock(%s, \'label\')', + $this->getVariableGetter('form') + ), + trim($compiler->compile($node)->getSource()) + ); + } + + public function testCompileLabelWithDefaultLabel() + { + $arguments = new \Twig_Node(array( + new \Twig_Node_Expression_Name('form', 0), + )); + + $node = new SearchAndRenderBlockNode('form_label', $arguments, 0); + + $compiler = new \Twig_Compiler(new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); + + $this->assertEquals( + sprintf( + '$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->searchAndRenderBlock(%s, \'label\')', + $this->getVariableGetter('form') + ), + trim($compiler->compile($node)->getSource()) + ); + } + + public function testCompileLabelWithAttributes() + { + $arguments = new \Twig_Node(array( + new \Twig_Node_Expression_Name('form', 0), + new \Twig_Node_Expression_Constant(null, 0), + new \Twig_Node_Expression_Array(array( + new \Twig_Node_Expression_Constant('foo', 0), + new \Twig_Node_Expression_Constant('bar', 0), + ), 0), + )); + + $node = new SearchAndRenderBlockNode('form_label', $arguments, 0); + + $compiler = new \Twig_Compiler(new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); + + // "label" => null must not be included in the output! + // Otherwise the default label is overwritten with null. + // https://github.com/symfony/symfony/issues/5029 + $this->assertEquals( + sprintf( + '$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->searchAndRenderBlock(%s, \'label\', array("foo" => "bar"))', + $this->getVariableGetter('form') + ), + trim($compiler->compile($node)->getSource()) + ); + } + + public function testCompileLabelWithLabelAndAttributes() + { + $arguments = new \Twig_Node(array( + new \Twig_Node_Expression_Name('form', 0), + new \Twig_Node_Expression_Constant('value in argument', 0), + new \Twig_Node_Expression_Array(array( + new \Twig_Node_Expression_Constant('foo', 0), + new \Twig_Node_Expression_Constant('bar', 0), + new \Twig_Node_Expression_Constant('label', 0), + new \Twig_Node_Expression_Constant('value in attributes', 0), + ), 0), + )); + + $node = new SearchAndRenderBlockNode('form_label', $arguments, 0); + + $compiler = new \Twig_Compiler(new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); + + $this->assertEquals( + sprintf( + '$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->searchAndRenderBlock(%s, \'label\', array("foo" => "bar", "label" => "value in argument"))', + $this->getVariableGetter('form') + ), + trim($compiler->compile($node)->getSource()) + ); + } + + public function testCompileLabelWithLabelThatEvaluatesToNull() + { + $arguments = new \Twig_Node(array( + new \Twig_Node_Expression_Name('form', 0), + new \Twig_Node_Expression_Conditional( + // if + new \Twig_Node_Expression_Constant(true, 0), + // then + new \Twig_Node_Expression_Constant(null, 0), + // else + new \Twig_Node_Expression_Constant(null, 0), + 0 + ), + )); + + $node = new SearchAndRenderBlockNode('form_label', $arguments, 0); + + $compiler = new \Twig_Compiler(new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); + + // "label" => null must not be included in the output! + // Otherwise the default label is overwritten with null. + // https://github.com/symfony/symfony/issues/5029 + $this->assertEquals( + sprintf( + '$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->searchAndRenderBlock(%s, \'label\', (twig_test_empty($_label_ = ((true) ? (null) : (null))) ? array() : array("label" => $_label_)))', + $this->getVariableGetter('form') + ), + trim($compiler->compile($node)->getSource()) + ); + } + + public function testCompileLabelWithLabelThatEvaluatesToNullAndAttributes() + { + $arguments = new \Twig_Node(array( + new \Twig_Node_Expression_Name('form', 0), + new \Twig_Node_Expression_Conditional( + // if + new \Twig_Node_Expression_Constant(true, 0), + // then + new \Twig_Node_Expression_Constant(null, 0), + // else + new \Twig_Node_Expression_Constant(null, 0), + 0 + ), + new \Twig_Node_Expression_Array(array( + new \Twig_Node_Expression_Constant('foo', 0), + new \Twig_Node_Expression_Constant('bar', 0), + new \Twig_Node_Expression_Constant('label', 0), + new \Twig_Node_Expression_Constant('value in attributes', 0), + ), 0), + )); + + $node = new SearchAndRenderBlockNode('form_label', $arguments, 0); + + $compiler = new \Twig_Compiler(new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); + + // "label" => null must not be included in the output! + // Otherwise the default label is overwritten with null. + // https://github.com/symfony/symfony/issues/5029 + $this->assertEquals( + sprintf( + '$this->env->getRuntime(\'Symfony\Bridge\Twig\Form\TwigRenderer\')->searchAndRenderBlock(%s, \'label\', array("foo" => "bar", "label" => "value in attributes") + (twig_test_empty($_label_ = ((true) ? (null) : (null))) ? array() : array("label" => $_label_)))', + $this->getVariableGetter('form') + ), + trim($compiler->compile($node)->getSource()) + ); + } + + protected function getVariableGetter($name) + { + if (PHP_VERSION_ID >= 70000) { + return sprintf('($context["%s"] ?? null)', $name, $name); + } + + return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5862006f3826a02b601580be9f654fdfacc391e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Node; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Node\TransNode; + +/** + * @author Asmir Mustafic + */ +class TransNodeTest extends TestCase +{ + public function testCompileStrict() + { + $body = new \Twig_Node_Text('trans %var%', 0); + $vars = new \Twig_Node_Expression_Name('foo', 0); + $node = new TransNode($body, null, null, $vars); + + $env = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('strict_variables' => true)); + $compiler = new \Twig_Compiler($env); + + $this->assertEquals( + sprintf( + 'echo $this->env->getExtension(\'Symfony\Bridge\Twig\Extension\TranslationExtension\')->getTranslator()->trans("trans %%var%%", array_merge(array("%%var%%" => %s), %s), "messages");', + $this->getVariableGetterWithoutStrictCheck('var'), + $this->getVariableGetterWithStrictCheck('foo') + ), + trim($compiler->compile($node)->getSource()) + ); + } + + protected function getVariableGetterWithoutStrictCheck($name) + { + if (PHP_VERSION_ID >= 70000) { + return sprintf('($context["%s"] ?? null)', $name, $name); + } + + return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name); + } + + protected function getVariableGetterWithStrictCheck($name) + { + if (\Twig_Environment::MAJOR_VERSION >= 2) { + return sprintf('(isset($context["%s"]) || array_key_exists("%s", $context) ? $context["%s"] : (function () { throw new Twig_Error_Runtime(\'Variable "%s" does not exist.\', 0, $this->getSourceContext()); })())', $name, $name, $name, $name); + } + + if (PHP_VERSION_ID >= 70000) { + return sprintf('($context["%s"] ?? $this->getContext($context, "%s"))', $name, $name, $name); + } + + return sprintf('(isset($context["%s"]) ? $context["%s"] : $this->getContext($context, "%s"))', $name, $name, $name); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/NodeVisitor/ScopeTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/NodeVisitor/ScopeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fad0e1f82976304451a9f69fcff679fc5db31566 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/NodeVisitor/ScopeTest.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\NodeVisitor; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\NodeVisitor\Scope; + +class ScopeTest extends TestCase +{ + public function testScopeInitiation() + { + $scope = new Scope(); + $scope->enter(); + $this->assertNull($scope->get('test')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..da9f43a6c4e0e633a013da2d39edff876ba2dee7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\NodeVisitor; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\NodeVisitor\TranslationDefaultDomainNodeVisitor; +use Symfony\Bridge\Twig\NodeVisitor\TranslationNodeVisitor; + +class TranslationDefaultDomainNodeVisitorTest extends TestCase +{ + private static $message = 'message'; + private static $domain = 'domain'; + + /** @dataProvider getDefaultDomainAssignmentTestData */ + public function testDefaultDomainAssignment(\Twig_Node $node) + { + $env = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false, 'optimizations' => 0)); + $visitor = new TranslationDefaultDomainNodeVisitor(); + + // visit trans_default_domain tag + $defaultDomain = TwigNodeProvider::getTransDefaultDomainTag(self::$domain); + $visitor->enterNode($defaultDomain, $env); + $visitor->leaveNode($defaultDomain, $env); + + // visit tested node + $enteredNode = $visitor->enterNode($node, $env); + $leavedNode = $visitor->leaveNode($node, $env); + $this->assertSame($node, $enteredNode); + $this->assertSame($node, $leavedNode); + + // extracting tested node messages + $visitor = new TranslationNodeVisitor(); + $visitor->enable(); + $visitor->enterNode($node, $env); + $visitor->leaveNode($node, $env); + + $this->assertEquals(array(array(self::$message, self::$domain)), $visitor->getMessages()); + } + + /** @dataProvider getDefaultDomainAssignmentTestData */ + public function testNewModuleWithoutDefaultDomainTag(\Twig_Node $node) + { + $env = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false, 'optimizations' => 0)); + $visitor = new TranslationDefaultDomainNodeVisitor(); + + // visit trans_default_domain tag + $newModule = TwigNodeProvider::getModule('test'); + $visitor->enterNode($newModule, $env); + $visitor->leaveNode($newModule, $env); + + // visit tested node + $enteredNode = $visitor->enterNode($node, $env); + $leavedNode = $visitor->leaveNode($node, $env); + $this->assertSame($node, $enteredNode); + $this->assertSame($node, $leavedNode); + + // extracting tested node messages + $visitor = new TranslationNodeVisitor(); + $visitor->enable(); + $visitor->enterNode($node, $env); + $visitor->leaveNode($node, $env); + + $this->assertEquals(array(array(self::$message, null)), $visitor->getMessages()); + } + + public function getDefaultDomainAssignmentTestData() + { + return array( + array(TwigNodeProvider::getTransFilter(self::$message)), + array(TwigNodeProvider::getTransChoiceFilter(self::$message)), + array(TwigNodeProvider::getTransTag(self::$message)), + // with named arguments + array(TwigNodeProvider::getTransFilter(self::$message, null, array( + 'arguments' => new \Twig_Node_Expression_Array(array(), 0), + ))), + array(TwigNodeProvider::getTransChoiceFilter(self::$message), null, array( + 'arguments' => new \Twig_Node_Expression_Array(array(), 0), + )), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d12fff532aaa187771c09f15eebbe67ed02d3d7a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\NodeVisitor; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\NodeVisitor\TranslationNodeVisitor; + +class TranslationNodeVisitorTest extends TestCase +{ + /** @dataProvider getMessagesExtractionTestData */ + public function testMessagesExtraction(\Twig_Node $node, array $expectedMessages) + { + $env = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false, 'optimizations' => 0)); + $visitor = new TranslationNodeVisitor(); + $visitor->enable(); + $visitor->enterNode($node, $env); + $visitor->leaveNode($node, $env); + $this->assertEquals($expectedMessages, $visitor->getMessages()); + } + + public function testMessageExtractionWithInvalidDomainNode() + { + $message = 'new key'; + + $node = new \Twig_Node_Expression_Filter( + new \Twig_Node_Expression_Constant($message, 0), + new \Twig_Node_Expression_Constant('trans', 0), + new \Twig_Node(array( + new \Twig_Node_Expression_Array(array(), 0), + new \Twig_Node_Expression_Name('variable', 0), + )), + 0 + ); + + $this->testMessagesExtraction($node, array(array($message, TranslationNodeVisitor::UNDEFINED_DOMAIN))); + } + + public function getMessagesExtractionTestData() + { + $message = 'new key'; + $domain = 'domain'; + + return array( + array(TwigNodeProvider::getTransFilter($message), array(array($message, null))), + array(TwigNodeProvider::getTransChoiceFilter($message), array(array($message, null))), + array(TwigNodeProvider::getTransTag($message), array(array($message, null))), + array(TwigNodeProvider::getTransFilter($message, $domain), array(array($message, $domain))), + array(TwigNodeProvider::getTransChoiceFilter($message, $domain), array(array($message, $domain))), + array(TwigNodeProvider::getTransTag($message, $domain), array(array($message, $domain))), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TwigNodeProvider.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TwigNodeProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..502cad38dec0bdc2fdbb70247b93702c0f638a76 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TwigNodeProvider.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\NodeVisitor; + +use Symfony\Bridge\Twig\Node\TransDefaultDomainNode; +use Symfony\Bridge\Twig\Node\TransNode; + +class TwigNodeProvider +{ + public static function getModule($content) + { + return new \Twig_Node_Module( + new \Twig_Node_Expression_Constant($content, 0), + null, + new \Twig_Node_Expression_Array(array(), 0), + new \Twig_Node_Expression_Array(array(), 0), + new \Twig_Node_Expression_Array(array(), 0), + null, + new \Twig_Source('', '') + ); + } + + public static function getTransFilter($message, $domain = null, $arguments = null) + { + if (!$arguments) { + $arguments = $domain ? array( + new \Twig_Node_Expression_Array(array(), 0), + new \Twig_Node_Expression_Constant($domain, 0), + ) : array(); + } + + return new \Twig_Node_Expression_Filter( + new \Twig_Node_Expression_Constant($message, 0), + new \Twig_Node_Expression_Constant('trans', 0), + new \Twig_Node($arguments), + 0 + ); + } + + public static function getTransChoiceFilter($message, $domain = null, $arguments = null) + { + if (!$arguments) { + $arguments = $domain ? array( + new \Twig_Node_Expression_Constant(0, 0), + new \Twig_Node_Expression_Array(array(), 0), + new \Twig_Node_Expression_Constant($domain, 0), + ) : array(); + } + + return new \Twig_Node_Expression_Filter( + new \Twig_Node_Expression_Constant($message, 0), + new \Twig_Node_Expression_Constant('transchoice', 0), + new \Twig_Node($arguments), + 0 + ); + } + + public static function getTransTag($message, $domain = null) + { + return new TransNode( + new \Twig_Node_Body(array(), array('data' => $message)), + $domain ? new \Twig_Node_Expression_Constant($domain, 0) : null + ); + } + + public static function getTransDefaultDomainTag($domain) + { + return new TransDefaultDomainNode( + new \Twig_Node_Expression_Constant($domain, 0) + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8931be061f9d24d05d04b0707473d63ee7bf22b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.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\Twig\Tests\TokenParser; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\TokenParser\FormThemeTokenParser; +use Symfony\Bridge\Twig\Node\FormThemeNode; + +class FormThemeTokenParserTest extends TestCase +{ + /** + * @dataProvider getTestsForFormTheme + */ + public function testCompile($source, $expected) + { + $env = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false, 'optimizations' => 0)); + $env->addTokenParser(new FormThemeTokenParser()); + $stream = $env->tokenize(new \Twig_Source($source, '')); + $parser = new \Twig_Parser($env); + + $this->assertEquals($expected, $parser->parse($stream)->getNode('body')->getNode(0)); + } + + public function getTestsForFormTheme() + { + return array( + array( + '{% form_theme form "tpl1" %}', + new FormThemeNode( + new \Twig_Node_Expression_Name('form', 1), + new \Twig_Node_Expression_Array(array( + new \Twig_Node_Expression_Constant(0, 1), + new \Twig_Node_Expression_Constant('tpl1', 1), + ), 1), + 1, + 'form_theme' + ), + ), + array( + '{% form_theme form "tpl1" "tpl2" %}', + new FormThemeNode( + new \Twig_Node_Expression_Name('form', 1), + new \Twig_Node_Expression_Array(array( + new \Twig_Node_Expression_Constant(0, 1), + new \Twig_Node_Expression_Constant('tpl1', 1), + new \Twig_Node_Expression_Constant(1, 1), + new \Twig_Node_Expression_Constant('tpl2', 1), + ), 1), + 1, + 'form_theme' + ), + ), + array( + '{% form_theme form with "tpl1" %}', + new FormThemeNode( + new \Twig_Node_Expression_Name('form', 1), + new \Twig_Node_Expression_Constant('tpl1', 1), + 1, + 'form_theme' + ), + ), + array( + '{% form_theme form with ["tpl1"] %}', + new FormThemeNode( + new \Twig_Node_Expression_Name('form', 1), + new \Twig_Node_Expression_Array(array( + new \Twig_Node_Expression_Constant(0, 1), + new \Twig_Node_Expression_Constant('tpl1', 1), + ), 1), + 1, + 'form_theme' + ), + ), + array( + '{% form_theme form with ["tpl1", "tpl2"] %}', + new FormThemeNode( + new \Twig_Node_Expression_Name('form', 1), + new \Twig_Node_Expression_Array(array( + new \Twig_Node_Expression_Constant(0, 1), + new \Twig_Node_Expression_Constant('tpl1', 1), + new \Twig_Node_Expression_Constant(1, 1), + new \Twig_Node_Expression_Constant('tpl2', 1), + ), 1), + 1, + 'form_theme' + ), + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0b1fb28b0e10c216e1bb935c737cec1de19aee04 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php @@ -0,0 +1,149 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests\Translation; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\Extension\TranslationExtension; +use Symfony\Bridge\Twig\Translation\TwigExtractor; +use Symfony\Component\Translation\MessageCatalogue; + +class TwigExtractorTest extends TestCase +{ + /** + * @dataProvider getExtractData + */ + public function testExtract($template, $messages) + { + $loader = $this->getMockBuilder('Twig_LoaderInterface')->getMock(); + $twig = new \Twig_Environment($loader, array( + 'strict_variables' => true, + 'debug' => true, + 'cache' => false, + 'autoescape' => false, + )); + $twig->addExtension(new TranslationExtension($this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock())); + + $extractor = new TwigExtractor($twig); + $extractor->setPrefix('prefix'); + $catalogue = new MessageCatalogue('en'); + + $m = new \ReflectionMethod($extractor, 'extractTemplate'); + $m->setAccessible(true); + $m->invoke($extractor, $template, $catalogue); + + foreach ($messages as $key => $domain) { + $this->assertTrue($catalogue->has($key, $domain)); + $this->assertEquals('prefix'.$key, $catalogue->get($key, $domain)); + } + } + + public function getExtractData() + { + return array( + array('{{ "new key" | trans() }}', array('new key' => 'messages')), + array('{{ "new key" | trans() | upper }}', array('new key' => 'messages')), + array('{{ "new key" | trans({}, "domain") }}', array('new key' => 'domain')), + array('{{ "new key" | transchoice(1) }}', array('new key' => 'messages')), + array('{{ "new key" | transchoice(1) | upper }}', array('new key' => 'messages')), + array('{{ "new key" | transchoice(1, {}, "domain") }}', array('new key' => 'domain')), + array('{% trans %}new key{% endtrans %}', array('new key' => 'messages')), + array('{% trans %} new key {% endtrans %}', array('new key' => 'messages')), + array('{% trans from "domain" %}new key{% endtrans %}', array('new key' => 'domain')), + array('{% set foo = "new key" | trans %}', array('new key' => 'messages')), + array('{{ 1 ? "new key" | trans : "another key" | trans }}', array('new key' => 'messages', 'another key' => 'messages')), + + // make sure 'trans_default_domain' tag is supported + array('{% trans_default_domain "domain" %}{{ "new key"|trans }}', array('new key' => 'domain')), + array('{% trans_default_domain "domain" %}{{ "new key"|transchoice }}', array('new key' => 'domain')), + array('{% trans_default_domain "domain" %}{% trans %}new key{% endtrans %}', array('new key' => 'domain')), + + // make sure this works with twig's named arguments + array('{{ "new key" | trans(domain="domain") }}', array('new key' => 'domain')), + array('{{ "new key" | transchoice(domain="domain", count=1) }}', array('new key' => 'domain')), + ); + } + + /** + * @expectedException \Twig_Error + * @dataProvider resourcesWithSyntaxErrorsProvider + */ + public function testExtractSyntaxError($resources) + { + $twig = new \Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); + $twig->addExtension(new TranslationExtension($this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock())); + + $extractor = new TwigExtractor($twig); + + try { + $extractor->extract($resources, new MessageCatalogue('en')); + } catch (\Twig_Error $e) { + if (method_exists($e, 'getSourceContext')) { + $this->assertSame(dirname(__DIR__).strtr('/Fixtures/extractor/syntax_error.twig', '/', DIRECTORY_SEPARATOR), $e->getFile()); + $this->assertSame(1, $e->getLine()); + $this->assertSame('Unclosed "block".', $e->getMessage()); + } else { + $this->expectExceptionMessageRegExp('/Unclosed "block" in ".*extractor(\\/|\\\\)syntax_error\\.twig" at line 1/'); + } + throw $e; + } + } + + /** + * @return array + */ + public function resourcesWithSyntaxErrorsProvider() + { + return array( + array(__DIR__.'/../Fixtures'), + array(__DIR__.'/../Fixtures/extractor/syntax_error.twig'), + array(new \SplFileInfo(__DIR__.'/../Fixtures/extractor/syntax_error.twig')), + ); + } + + /** + * @dataProvider resourceProvider + */ + public function testExtractWithFiles($resource) + { + $loader = new \Twig_Loader_Array(array()); + $twig = new \Twig_Environment($loader, array( + 'strict_variables' => true, + 'debug' => true, + 'cache' => false, + 'autoescape' => false, + )); + $twig->addExtension(new TranslationExtension($this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock())); + + $extractor = new TwigExtractor($twig); + $catalogue = new MessageCatalogue('en'); + $extractor->extract($resource, $catalogue); + + $this->assertTrue($catalogue->has('Hi!', 'messages')); + $this->assertEquals('Hi!', $catalogue->get('Hi!', 'messages')); + } + + /** + * @return array + */ + public function resourceProvider() + { + $directory = __DIR__.'/../Fixtures/extractor/'; + + return array( + array($directory.'with_translations.html.twig'), + array(array($directory.'with_translations.html.twig')), + array(array(new \SplFileInfo($directory.'with_translations.html.twig'))), + array(new \ArrayObject(array($directory.'with_translations.html.twig'))), + array(new \ArrayObject(array(new \SplFileInfo($directory.'with_translations.html.twig')))), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/TwigEngineTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/TwigEngineTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e2082df3dd75b11a270a9ac7386cfbb0f00276b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/TwigEngineTest.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\Twig\TwigEngine; +use Symfony\Component\Templating\TemplateReference; + +class TwigEngineTest extends TestCase +{ + public function testExistsWithTemplateInstances() + { + $engine = $this->getTwig(); + + $this->assertTrue($engine->exists($this->getMockForAbstractClass('Twig_Template', array(), '', false))); + } + + public function testExistsWithNonExistentTemplates() + { + $engine = $this->getTwig(); + + $this->assertFalse($engine->exists('foobar')); + $this->assertFalse($engine->exists(new TemplateReference('foorbar'))); + } + + public function testExistsWithTemplateWithSyntaxErrors() + { + $engine = $this->getTwig(); + + $this->assertTrue($engine->exists('error')); + $this->assertTrue($engine->exists(new TemplateReference('error'))); + } + + public function testExists() + { + $engine = $this->getTwig(); + + $this->assertTrue($engine->exists('index')); + $this->assertTrue($engine->exists(new TemplateReference('index'))); + } + + public function testRender() + { + $engine = $this->getTwig(); + + $this->assertSame('foo', $engine->render('index')); + $this->assertSame('foo', $engine->render(new TemplateReference('index'))); + } + + /** + * @expectedException \Twig_Error_Syntax + */ + public function testRenderWithError() + { + $engine = $this->getTwig(); + + $engine->render(new TemplateReference('error')); + } + + protected function getTwig() + { + $twig = new \Twig_Environment(new \Twig_Loader_Array(array( + 'index' => 'foo', + 'error' => '{{ foo }', + ))); + $parser = $this->getMockBuilder('Symfony\Component\Templating\TemplateNameParserInterface')->getMock(); + + return new TwigEngine($twig, $parser); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php new file mode 100644 index 0000000000000000000000000000000000000000..269ead64f5d40100cedf115e4652132a15e3aa66 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\TokenParser; + +use Symfony\Bridge\Twig\Node\DumpNode; + +/** + * Token Parser for the 'dump' tag. + * + * Dump variables with: + *
    + *  {% dump %}
    + *  {% dump foo %}
    + *  {% dump foo, bar %}
    + * 
    + * + * @author Julien Galenski + */ +class DumpTokenParser extends \Twig_TokenParser +{ + /** + * {@inheritdoc} + */ + public function parse(\Twig_Token $token) + { + $values = null; + if (!$this->parser->getStream()->test(\Twig_Token::BLOCK_END_TYPE)) { + $values = $this->parser->getExpressionParser()->parseMultitargetExpression(); + } + $this->parser->getStream()->expect(\Twig_Token::BLOCK_END_TYPE); + + return new DumpNode($this->parser->getVarName(), $values, $token->getLine(), $this->getTag()); + } + + /** + * {@inheritdoc} + */ + public function getTag() + { + return 'dump'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php new file mode 100644 index 0000000000000000000000000000000000000000..daf87824e7b218a27a8386a0b820f5abb6ad1ac0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\TokenParser; + +use Symfony\Bridge\Twig\Node\FormThemeNode; + +/** + * Token Parser for the 'form_theme' tag. + * + * @author Fabien Potencier + */ +class FormThemeTokenParser extends \Twig_TokenParser +{ + /** + * Parses a token and returns a node. + * + * @param \Twig_Token $token A Twig_Token instance + * + * @return \Twig_Node A Twig_Node instance + */ + public function parse(\Twig_Token $token) + { + $lineno = $token->getLine(); + $stream = $this->parser->getStream(); + + $form = $this->parser->getExpressionParser()->parseExpression(); + + if ($this->parser->getStream()->test(\Twig_Token::NAME_TYPE, 'with')) { + $this->parser->getStream()->next(); + $resources = $this->parser->getExpressionParser()->parseExpression(); + } else { + $resources = new \Twig_Node_Expression_Array(array(), $stream->getCurrent()->getLine()); + do { + $resources->addElement($this->parser->getExpressionParser()->parseExpression()); + } while (!$stream->test(\Twig_Token::BLOCK_END_TYPE)); + } + + $stream->expect(\Twig_Token::BLOCK_END_TYPE); + + return new FormThemeNode($form, $resources, $lineno, $this->getTag()); + } + + /** + * Gets the tag name associated with this token parser. + * + * @return string The tag name + */ + public function getTag() + { + return 'form_theme'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/StopwatchTokenParser.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/StopwatchTokenParser.php new file mode 100644 index 0000000000000000000000000000000000000000..2983e4cb6b03b19cfd111ce81b3d883d0d409554 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/StopwatchTokenParser.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\TokenParser; + +use Symfony\Bridge\Twig\Node\StopwatchNode; + +/** + * Token Parser for the stopwatch tag. + * + * @author Wouter J + */ +class StopwatchTokenParser extends \Twig_TokenParser +{ + protected $stopwatchIsAvailable; + + public function __construct($stopwatchIsAvailable) + { + $this->stopwatchIsAvailable = $stopwatchIsAvailable; + } + + public function parse(\Twig_Token $token) + { + $lineno = $token->getLine(); + $stream = $this->parser->getStream(); + + // {% stopwatch 'bar' %} + $name = $this->parser->getExpressionParser()->parseExpression(); + + $stream->expect(\Twig_Token::BLOCK_END_TYPE); + + // {% endstopwatch %} + $body = $this->parser->subparse(array($this, 'decideStopwatchEnd'), true); + $stream->expect(\Twig_Token::BLOCK_END_TYPE); + + if ($this->stopwatchIsAvailable) { + return new StopwatchNode($name, $body, new \Twig_Node_Expression_AssignName($this->parser->getVarName(), $token->getLine()), $lineno, $this->getTag()); + } + + return $body; + } + + public function decideStopwatchEnd(\Twig_Token $token) + { + return $token->test('endstopwatch'); + } + + public function getTag() + { + return 'stopwatch'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/TransChoiceTokenParser.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/TransChoiceTokenParser.php new file mode 100644 index 0000000000000000000000000000000000000000..fa61a2f1486c59ad6c4244404dc8bb536dc3ba34 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/TransChoiceTokenParser.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\TokenParser; + +use Symfony\Bridge\Twig\Node\TransNode; + +/** + * Token Parser for the 'transchoice' tag. + * + * @author Fabien Potencier + */ +class TransChoiceTokenParser extends TransTokenParser +{ + /** + * Parses a token and returns a node. + * + * @param \Twig_Token $token A Twig_Token instance + * + * @return \Twig_Node A Twig_Node instance + * + * @throws \Twig_Error_Syntax + */ + public function parse(\Twig_Token $token) + { + $lineno = $token->getLine(); + $stream = $this->parser->getStream(); + + $vars = new \Twig_Node_Expression_Array(array(), $lineno); + + $count = $this->parser->getExpressionParser()->parseExpression(); + + $domain = null; + $locale = null; + + if ($stream->test('with')) { + // {% transchoice count with vars %} + $stream->next(); + $vars = $this->parser->getExpressionParser()->parseExpression(); + } + + if ($stream->test('from')) { + // {% transchoice count from "messages" %} + $stream->next(); + $domain = $this->parser->getExpressionParser()->parseExpression(); + } + + if ($stream->test('into')) { + // {% transchoice count into "fr" %} + $stream->next(); + $locale = $this->parser->getExpressionParser()->parseExpression(); + } + + $stream->expect(\Twig_Token::BLOCK_END_TYPE); + + $body = $this->parser->subparse(array($this, 'decideTransChoiceFork'), true); + + if (!$body instanceof \Twig_Node_Text && !$body instanceof \Twig_Node_Expression) { + throw new \Twig_Error_Syntax('A message inside a transchoice tag must be a simple text.', $body->getTemplateLine(), $stream->getSourceContext()->getName()); + } + + $stream->expect(\Twig_Token::BLOCK_END_TYPE); + + return new TransNode($body, $domain, $count, $vars, $locale, $lineno, $this->getTag()); + } + + public function decideTransChoiceFork($token) + { + return $token->test(array('endtranschoice')); + } + + /** + * Gets the tag name associated with this token parser. + * + * @return string The tag name + */ + public function getTag() + { + return 'transchoice'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php new file mode 100644 index 0000000000000000000000000000000000000000..09832ea972d91dadfd1b9e82e0c5da7d6e7907f4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\TokenParser; + +use Symfony\Bridge\Twig\Node\TransDefaultDomainNode; + +/** + * Token Parser for the 'trans_default_domain' tag. + * + * @author Fabien Potencier + */ +class TransDefaultDomainTokenParser extends \Twig_TokenParser +{ + /** + * Parses a token and returns a node. + * + * @param \Twig_Token $token A Twig_Token instance + * + * @return \Twig_Node A Twig_Node instance + */ + public function parse(\Twig_Token $token) + { + $expr = $this->parser->getExpressionParser()->parseExpression(); + + $this->parser->getStream()->expect(\Twig_Token::BLOCK_END_TYPE); + + return new TransDefaultDomainNode($expr, $token->getLine(), $this->getTag()); + } + + /** + * Gets the tag name associated with this token parser. + * + * @return string The tag name + */ + public function getTag() + { + return 'trans_default_domain'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php new file mode 100644 index 0000000000000000000000000000000000000000..4c8e7d3eeea3867dcc39423afe6a56797290f477 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig\TokenParser; + +use Symfony\Bridge\Twig\Node\TransNode; + +/** + * Token Parser for the 'trans' tag. + * + * @author Fabien Potencier + */ +class TransTokenParser extends \Twig_TokenParser +{ + /** + * Parses a token and returns a node. + * + * @param \Twig_Token $token A Twig_Token instance + * + * @return \Twig_Node A Twig_Node instance + * + * @throws \Twig_Error_Syntax + */ + public function parse(\Twig_Token $token) + { + $lineno = $token->getLine(); + $stream = $this->parser->getStream(); + + $vars = new \Twig_Node_Expression_Array(array(), $lineno); + $domain = null; + $locale = null; + if (!$stream->test(\Twig_Token::BLOCK_END_TYPE)) { + if ($stream->test('with')) { + // {% trans with vars %} + $stream->next(); + $vars = $this->parser->getExpressionParser()->parseExpression(); + } + + if ($stream->test('from')) { + // {% trans from "messages" %} + $stream->next(); + $domain = $this->parser->getExpressionParser()->parseExpression(); + } + + if ($stream->test('into')) { + // {% trans into "fr" %} + $stream->next(); + $locale = $this->parser->getExpressionParser()->parseExpression(); + } elseif (!$stream->test(\Twig_Token::BLOCK_END_TYPE)) { + throw new \Twig_Error_Syntax('Unexpected token. Twig was looking for the "with", "from", or "into" keyword.', $stream->getCurrent()->getLine(), $stream->getSourceContext()->getName()); + } + } + + // {% trans %}message{% endtrans %} + $stream->expect(\Twig_Token::BLOCK_END_TYPE); + $body = $this->parser->subparse(array($this, 'decideTransFork'), true); + + if (!$body instanceof \Twig_Node_Text && !$body instanceof \Twig_Node_Expression) { + throw new \Twig_Error_Syntax('A message inside a trans tag must be a simple text.', $body->getTemplateLine(), $stream->getSourceContext()->getName()); + } + + $stream->expect(\Twig_Token::BLOCK_END_TYPE); + + return new TransNode($body, $domain, null, $vars, $locale, $lineno, $this->getTag()); + } + + public function decideTransFork($token) + { + return $token->test(array('endtrans')); + } + + /** + * Gets the tag name associated with this token parser. + * + * @return string The tag name + */ + public function getTag() + { + return 'trans'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Translation/TwigExtractor.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Translation/TwigExtractor.php new file mode 100644 index 0000000000000000000000000000000000000000..35995dbd6451833a6b001abb34b049fef3e842c9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Translation/TwigExtractor.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\Bridge\Twig\Translation; + +use Symfony\Component\Finder\Finder; +use Symfony\Component\Finder\SplFileInfo; +use Symfony\Component\Translation\Extractor\AbstractFileExtractor; +use Symfony\Component\Translation\Extractor\ExtractorInterface; +use Symfony\Component\Translation\MessageCatalogue; + +/** + * TwigExtractor extracts translation messages from a twig template. + * + * @author Michel Salib + * @author Fabien Potencier + */ +class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface +{ + /** + * Default domain for found messages. + * + * @var string + */ + private $defaultDomain = 'messages'; + + /** + * Prefix for found message. + * + * @var string + */ + private $prefix = ''; + + /** + * The twig environment. + * + * @var \Twig_Environment + */ + private $twig; + + public function __construct(\Twig_Environment $twig) + { + $this->twig = $twig; + } + + /** + * {@inheritdoc} + */ + public function extract($resource, MessageCatalogue $catalogue) + { + $files = $this->extractFiles($resource); + foreach ($files as $file) { + try { + $this->extractTemplate(file_get_contents($file->getPathname()), $catalogue); + } catch (\Twig_Error $e) { + if ($file instanceof \SplFileInfo) { + $path = $file->getRealPath() ?: $file->getPathname(); + $name = $file instanceof SplFileInfo ? $file->getRelativePathname() : $path; + if (method_exists($e, 'setSourceContext')) { + $e->setSourceContext(new \Twig_Source('', $name, $path)); + } else { + $e->setTemplateName($name); + } + } + + throw $e; + } + } + } + + /** + * {@inheritdoc} + */ + public function setPrefix($prefix) + { + $this->prefix = $prefix; + } + + protected function extractTemplate($template, MessageCatalogue $catalogue) + { + $visitor = $this->twig->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->getTranslationNodeVisitor(); + $visitor->enable(); + + $this->twig->parse($this->twig->tokenize(new \Twig_Source($template, ''))); + + foreach ($visitor->getMessages() as $message) { + $catalogue->set(trim($message[0]), $this->prefix.trim($message[0]), $message[1] ?: $this->defaultDomain); + } + + $visitor->disable(); + } + + /** + * @param string $file + * + * @return bool + */ + protected function canBeExtracted($file) + { + return $this->isFile($file) && 'twig' === pathinfo($file, PATHINFO_EXTENSION); + } + + /** + * @param string|array $directory + * + * @return array + */ + protected function extractFromDirectory($directory) + { + $finder = new Finder(); + + return $finder->files()->name('*.twig')->in($directory); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php new file mode 100644 index 0000000000000000000000000000000000000000..760461b5be5783c563e400e061e097296b172b22 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Twig; + +use Symfony\Component\Templating\EngineInterface; +use Symfony\Component\Templating\StreamingEngineInterface; +use Symfony\Component\Templating\TemplateNameParserInterface; +use Symfony\Component\Templating\TemplateReferenceInterface; + +/** + * This engine knows how to render Twig templates. + * + * @author Fabien Potencier + */ +class TwigEngine implements EngineInterface, StreamingEngineInterface +{ + protected $environment; + protected $parser; + + /** + * Constructor. + * + * @param \Twig_Environment $environment A \Twig_Environment instance + * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance + */ + public function __construct(\Twig_Environment $environment, TemplateNameParserInterface $parser) + { + $this->environment = $environment; + $this->parser = $parser; + } + + /** + * {@inheritdoc} + * + * It also supports \Twig_Template as name parameter. + * + * @throws \Twig_Error if something went wrong like a thrown exception while rendering the template + */ + public function render($name, array $parameters = array()) + { + return $this->load($name)->render($parameters); + } + + /** + * {@inheritdoc} + * + * It also supports \Twig_Template as name parameter. + * + * @throws \Twig_Error if something went wrong like a thrown exception while rendering the template + */ + public function stream($name, array $parameters = array()) + { + $this->load($name)->display($parameters); + } + + /** + * {@inheritdoc} + * + * It also supports \Twig_Template as name parameter. + */ + public function exists($name) + { + if ($name instanceof \Twig_Template) { + return true; + } + + $loader = $this->environment->getLoader(); + + if ($loader instanceof \Twig_ExistsLoaderInterface || method_exists($loader, 'exists')) { + return $loader->exists((string) $name); + } + + try { + // cast possible TemplateReferenceInterface to string because the + // EngineInterface supports them but Twig_LoaderInterface does not + $loader->getSourceContext((string) $name)->getCode(); + } catch (\Twig_Error_Loader $e) { + return false; + } + + return true; + } + + /** + * {@inheritdoc} + * + * It also supports \Twig_Template as name parameter. + */ + public function supports($name) + { + if ($name instanceof \Twig_Template) { + return true; + } + + $template = $this->parser->parse($name); + + return 'twig' === $template->get('engine'); + } + + /** + * Loads the given template. + * + * @param string|TemplateReferenceInterface|\Twig_Template $name A template name or an instance of + * TemplateReferenceInterface or \Twig_Template + * + * @return \Twig_Template A \Twig_Template instance + * + * @throws \InvalidArgumentException if the template does not exist + */ + protected function load($name) + { + if ($name instanceof \Twig_Template) { + return $name; + } + + try { + return $this->environment->loadTemplate((string) $name); + } catch (\Twig_Error_Loader $e) { + throw new \InvalidArgumentException($e->getMessage(), $e->getCode(), $e); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/composer.json b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..f92fa963232f31ddabf04ef48dd7da9409985a87 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/composer.json @@ -0,0 +1,65 @@ +{ + "name": "symfony/twig-bridge", + "type": "symfony-bridge", + "description": "Symfony Twig Bridge", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "twig/twig": "~1.28|~2.0" + }, + "require-dev": { + "symfony/asset": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/form": "^3.2.5", + "symfony/http-kernel": "~3.2", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/routing": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0", + "symfony/security": "~2.8|~3.0", + "symfony/security-acl": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0", + "symfony/console": "~2.8|~3.0", + "symfony/var-dumper": "~2.8.10|~3.1.4|~3.2", + "symfony/expression-language": "~2.8|~3.0" + }, + "suggest": { + "symfony/finder": "", + "symfony/asset": "For using the AssetExtension", + "symfony/form": "For using the FormExtension", + "symfony/http-kernel": "For using the HttpKernelExtension", + "symfony/routing": "For using the RoutingExtension", + "symfony/templating": "For using the TwigEngine", + "symfony/translation": "For using the TranslationExtension", + "symfony/yaml": "For using the YamlExtension", + "symfony/security": "For using the SecurityExtension", + "symfony/stopwatch": "For using the StopwatchExtension", + "symfony/var-dumper": "For using the DumpExtension", + "symfony/expression-language": "For using the ExpressionExtension" + }, + "autoload": { + "psr-4": { "Symfony\\Bridge\\Twig\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..10c0be114271216915cb92a6e4223d1353047bd7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/DebugBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/DebugBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..335ec5abd2541729fda81b6b285689ecb0254ae4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/DebugBundle.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\Bundle\DebugBundle; + +use Symfony\Bundle\DebugBundle\DependencyInjection\Compiler\DumpDataCollectorPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\VarDumper\VarDumper; + +/** + * @author Nicolas Grekas + */ +class DebugBundle extends Bundle +{ + public function boot() + { + if ($this->container->getParameter('kernel.debug')) { + $container = $this->container; + + // This code is here to lazy load the dump stack. This default + // configuration for CLI mode is overridden in HTTP mode on + // 'kernel.request' event + VarDumper::setHandler(function ($var) use ($container) { + $dumper = $container->get('data_collector.dump'); + $cloner = $container->get('var_dumper.cloner'); + $handler = function ($var) use ($dumper, $cloner) { + $dumper->dump($cloner->cloneVar($var)); + }; + VarDumper::setHandler($handler); + $handler($var); + }); + } + } + + /** + * {@inheritdoc} + */ + public function build(ContainerBuilder $container) + { + parent::build($container); + + $container->addCompilerPass(new DumpDataCollectorPass()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php new file mode 100644 index 0000000000000000000000000000000000000000..2579bf64eab13c8eee3df79abfd710c6fa81359e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\DebugBundle\DependencyInjection\Compiler; + +use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Registers the file link format for the {@link \Symfony\Component\HttpKernel\DataCollector\DumpDataCollector}. + * + * @author Christian Flothmann + */ +class DumpDataCollectorPass implements CompilerPassInterface +{ + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('data_collector.dump')) { + return; + } + + $definition = $container->getDefinition('data_collector.dump'); + + if (!$container->hasParameter('web_profiler.debug_toolbar.mode') || WebDebugToolbarListener::DISABLED === $container->getParameter('web_profiler.debug_toolbar.mode')) { + $definition->replaceArgument(3, null); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php new file mode 100644 index 0000000000000000000000000000000000000000..5761e62a72e1aa8aeb420bc288f7e22597b3628c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\DebugBundle\DependencyInjection; + +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +/** + * DebugExtension configuration structure. + * + * @author Nicolas Grekas + */ +class Configuration implements ConfigurationInterface +{ + /** + * {@inheritdoc} + */ + public function getConfigTreeBuilder() + { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('debug'); + + $rootNode + ->children() + ->integerNode('max_items') + ->info('Max number of displayed items past the first level, -1 means no limit') + ->min(-1) + ->defaultValue(2500) + ->end() + ->integerNode('max_string_length') + ->info('Max length of displayed strings, -1 means no limit') + ->min(-1) + ->defaultValue(-1) + ->end() + ->scalarNode('dump_destination') + ->info('A stream URL where dumps should be written to') + ->example('php://stderr') + ->defaultNull() + ->end() + ->end() + ; + + return $treeBuilder; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..ce6d1b7c677e488c67c0455f01c077cc0e9776f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\DebugBundle\DependencyInjection; + +use Symfony\Component\Config\FileLocator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\Extension; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\Reference; + +/** + * DebugExtension. + * + * @author Nicolas Grekas + */ +class DebugExtension extends Extension +{ + /** + * {@inheritdoc} + */ + public function load(array $configs, ContainerBuilder $container) + { + $configuration = new Configuration(); + $config = $this->processConfiguration($configuration, $configs); + + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('services.xml'); + + $container->getDefinition('var_dumper.cloner') + ->addMethodCall('setMaxItems', array($config['max_items'])) + ->addMethodCall('setMaxString', array($config['max_string_length'])); + + if (null !== $config['dump_destination']) { + $container->getDefinition('var_dumper.cli_dumper') + ->replaceArgument(0, $config['dump_destination']) + ; + $container->getDefinition('data_collector.dump') + ->replaceArgument(4, new Reference('var_dumper.cli_dumper')) + ; + } + } + + /** + * {@inheritdoc} + */ + public function getXsdValidationBasePath() + { + return __DIR__.'/../Resources/config/schema'; + } + + /** + * {@inheritdoc} + */ + public function getNamespace() + { + return 'http://symfony.com/schema/dic/debug'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/LICENSE b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..207646a052dcd5ad165e62c15ef3da92e4f61a05 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-2017 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/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a582ff8b2b70f424fee298b2cd9a42c3e7f3bc79 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Resources/config/services.xml b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Resources/config/services.xml new file mode 100644 index 0000000000000000000000000000000000000000..ae7d91add15d47cc352927518672c4e1b06dc82f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Resources/config/services.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + %kernel.charset% + + null + + + + + + + + + + + null + %kernel.charset% + 0 + + + null + %kernel.charset% + 0 + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..7f078b93ac34cf405c759467bf5c0444d4b9a9c4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig @@ -0,0 +1,75 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block toolbar %} + {% if collector.dumpsCount %} + {% set icon %} + {{ include('@Debug/Profiler/icon.svg') }} + {{ collector.dumpsCount }} + {% endset %} + + {% set text %} + {% for dump in collector.getDumps('html') %} +
    + + {% if dump.file %} + {% set link = dump.file|file_link(dump.line) %} + {% if link %} + {{ dump.name }} + {% else %} + {{ dump.name }} + {% endif %} + {% else %} + {{ dump.name }} + {% endif %} + + line {{ dump.line }} + + {{ dump.data|raw }} +
    + {% endfor %} + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': true }) }} + {% endif %} +{% endblock %} + +{% block menu %} + + {{ include('@Debug/Profiler/icon.svg') }} + Debug + +{% endblock %} + +{% block panel %} +

    Dumped Contents

    + + {% for dump in collector.getDumps('html') %} +
    + + + + + {{ dump.data|raw }} +
    + {% else %} +
    +

    No content was dumped.

    +
    + {% endfor %} +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/icon.svg b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/icon.svg new file mode 100644 index 0000000000000000000000000000000000000000..ac4ead8fbbf0f55a0ee168d6e98512519af44fb0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/Compiler/DumpDataCollectorPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/Compiler/DumpDataCollectorPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6f49c021260ed38916b32044b315b4a71d38bef3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/Compiler/DumpDataCollectorPassTest.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\DebugBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\DebugBundle\DependencyInjection\Compiler\DumpDataCollectorPass; +use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\HttpFoundation\RequestStack; + +class DumpDataCollectorPassTest extends TestCase +{ + public function testProcessWithoutFileLinkFormatParameter() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new DumpDataCollectorPass()); + + $definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, null)); + $container->setDefinition('data_collector.dump', $definition); + + $container->compile(); + + $this->assertNull($definition->getArgument(1)); + } + + public function testProcessWithToolbarEnabled() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new DumpDataCollectorPass()); + $requestStack = new RequestStack(); + + $definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, $requestStack)); + $container->setDefinition('data_collector.dump', $definition); + $container->setParameter('web_profiler.debug_toolbar.mode', WebDebugToolbarListener::ENABLED); + + $container->compile(); + + $this->assertSame($requestStack, $definition->getArgument(3)); + } + + public function testProcessWithToolbarDisabled() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new DumpDataCollectorPass()); + + $definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, new RequestStack())); + $container->setDefinition('data_collector.dump', $definition); + $container->setParameter('web_profiler.debug_toolbar.mode', WebDebugToolbarListener::DISABLED); + + $container->compile(); + + $this->assertNull($definition->getArgument(3)); + } + + public function testProcessWithoutToolbar() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new DumpDataCollectorPass()); + + $definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, new RequestStack())); + $container->setDefinition('data_collector.dump', $definition); + + $container->compile(); + + $this->assertNull($definition->getArgument(3)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9c03e9988224ac6265c6838f5e11e99f6124c217 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.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\Bundle\DebugBundle\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\DebugBundle\DependencyInjection\DebugExtension; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; + +class DebugExtensionTest extends TestCase +{ + public function testLoadWithoutConfiguration() + { + $container = $this->createContainer(); + $container->registerExtension(new DebugExtension()); + $container->loadFromExtension('debug', array()); + $this->compileContainer($container); + + $expectedTags = array( + array( + 'id' => 'dump', + 'template' => '@Debug/Profiler/dump.html.twig', + 'priority' => 240, + ), + ); + + $this->assertSame($expectedTags, $container->getDefinition('data_collector.dump')->getTag('data_collector')); + } + + private function createContainer() + { + $container = new ContainerBuilder(new ParameterBag(array( + 'kernel.cache_dir' => __DIR__, + 'kernel.root_dir' => __DIR__.'/Fixtures', + 'kernel.charset' => 'UTF-8', + 'kernel.debug' => true, + 'kernel.bundles' => array('DebugBundle' => 'Symfony\\Bundle\\DebugBundle\\DebugBundle'), + ))); + + return $container; + } + + private function compileContainer(ContainerBuilder $container) + { + $container->getCompilerPassConfig()->setOptimizationPasses(array()); + $container->getCompilerPassConfig()->setRemovingPasses(array()); + $container->compile(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/composer.json b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..e5fe6552964739a6084c0915656b580a98b4679d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/composer.json @@ -0,0 +1,45 @@ +{ + "name": "symfony/debug-bundle", + "type": "symfony-bundle", + "description": "Symfony DebugBundle", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/http-kernel": "~2.8|~3.0", + "symfony/twig-bridge": "~2.8|~3.0", + "symfony/var-dumper": "~2.8|~3.0" + }, + "require-dev": { + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/web-profiler-bundle": "~2.8|~3.0" + }, + "suggest": { + "symfony/config": "For service container configuration", + "symfony/dependency-injection": "For using as a service from the container" + }, + "autoload": { + "psr-4": { "Symfony\\Bundle\\DebugBundle\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..90ec0a5dba5142b36e437f099a74c6e2d07c04a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/DebugBundle/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..efee66b41cecf7d2f486b1320f7c2f58909df670 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md @@ -0,0 +1,155 @@ +CHANGELOG +========= + +3.2.0 +----- + + * Removed `doctrine/annotations` from the list of required dependencies in `composer.json` + * Removed `symfony/security-core` and `symfony/security-csrf` from the list of required dependencies in `composer.json` + * Removed `symfony/templating` from the list of required dependencies in `composer.json` + * Removed `symfony/translation` from the list of required dependencies in `composer.json` + * Removed `symfony/asset` from the list of required dependencies in `composer.json` + * The `Resources/public/images/*` files have been removed. + * The `Resources/public/css/*.css` files have been removed (they are now inlined in TwigBundle). + * Added possibility to prioritize form type extensions with `'priority'` attribute on tags `form.type_extension` + +3.1.0 +----- + + * Added `Controller::json` to simplify creating JSON responses when using the Serializer component + * Deprecated absolute template paths support in the template name parser + * Deprecated using core form types without dependencies as services + * Added `Symfony\Component\HttpHernel\DataCollector\RequestDataCollector::onKernelResponse()` + * Added `Symfony\Bundle\FrameworkBundle\DataCollector\RequestDataCollector` + * Deprecated service `serializer.mapping.cache.apc` (use `serializer.mapping.cache.doctrine.apc` instead) + +3.0.0 +----- + + * removed `validator.api` parameter + * removed `alias` option of the `form.type` tag + +2.8.0 +----- + + * Deprecated the `alias` option of the `form.type_extension` tag in favor of the + `extended_type`/`extended-type` option + * Deprecated the `alias` option of the `form.type` tag + * Deprecated the Shell + +2.7.0 +----- + + * Added possibility to extract translation messages from a file or files besides extracting from a directory + * Added `TranslationsCacheWarmer` to create catalogues at warmup + +2.6.0 +----- + + * Added helper commands (`server:start`, `server:stop` and `server:status`) to control the built-in web + server in the background + * Added `Controller::isCsrfTokenValid` helper + * Added configuration for the PropertyAccess component + * Added `Controller::redirectToRoute` helper + * Added `Controller::addFlash` helper + * Added `Controller::isGranted` helper + * Added `Controller::denyAccessUnlessGranted` helper + * Deprecated `app.security` in twig as `app.user` and `is_granted()` are already available + +2.5.0 +----- + + * Added `translation:debug` command + * Added `--no-backup` option to `translation:update` command + * Added `config:debug` command + * Added `yaml:lint` command + * Deprecated the `RouterApacheDumperCommand` which will be removed in Symfony 3.0. + +2.4.0 +----- + + * allowed multiple IP addresses in profiler matcher settings + * added stopwatch helper to time templates with the WebProfilerBundle + * added service definition for "security.secure_random" service + * added service definitions for the new Security CSRF sub-component + +2.3.0 +----- + + * [BC BREAK] added a way to disable the profiler (when disabling the profiler, it is now completely removed) + To get the same "disabled" behavior as before, set `enabled` to `true` and `collect` to `false` + * [BC BREAK] the `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RegisterKernelListenersPass` was moved + to `Component\HttpKernel\DependencyInjection\RegisterListenersPass` + * added ControllerNameParser::build() which converts a controller short notation (a:b:c) to a class::method notation + * added possibility to run PHP built-in server in production environment + * added possibility to load the serializer component in the service container + * added route debug information when using the `router:match` command + * added `TimedPhpEngine` + * added `--clean` option to the `translation:update` command + * added `http_method_override` option + * added support for default templates per render tag + * added FormHelper::form(), FormHelper::start() and FormHelper::end() + * deprecated FormHelper::enctype() in favor of FormHelper::start() + * RedirectController actions now receive the Request instance via the method signature. + +2.2.0 +----- + + * added a new `uri_signer` service to help sign URIs + * deprecated `Symfony\Bundle\FrameworkBundle\HttpKernel::render()` and `Symfony\Bundle\FrameworkBundle\HttpKernel::forward()` + * deprecated the `Symfony\Bundle\FrameworkBundle\HttpKernel` class in favor of `Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel` + * added support for adding new HTTP content rendering strategies (like ESI and Hinclude) + in the DIC via the `kernel.fragment_renderer` tag + * [BC BREAK] restricted the `Symfony\Bundle\FrameworkBundle\HttpKernel::render()` method to only accept URIs or ControllerReference instances + * `Symfony\Bundle\FrameworkBundle\HttpKernel::render()` method signature changed and the first argument + must now be a URI or a ControllerReference instance (the `generateInternalUri()` method was removed) + * The internal routes (`Resources/config/routing/internal.xml`) have been removed and replaced with a listener (`Symfony\Component\HttpKernel\EventListener\FragmentListener`) + * The `render` method of the `actions` templating helper signature and arguments changed + * replaced Symfony\Bundle\FrameworkBundle\Controller\TraceableControllerResolver by Symfony\Component\HttpKernel\Controller\TraceableControllerResolver + * replaced Symfony\Component\HttpKernel\Debug\ContainerAwareTraceableEventDispatcher by Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher + * added Client::enableProfiler() + * a new parameter has been added to the DIC: `router.request_context.base_url` + You can customize it for your functional tests or for generating URLs with + the right base URL when your are in the CLI context. + * added support for default templates per render tag + +2.1.0 +----- + + * moved the translation files to the Form and Validator components + * changed the default extension for XLIFF files from .xliff to .xlf + * moved Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher to Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher + * moved Symfony\Bundle\FrameworkBundle\Debug\TraceableEventDispatcher to Symfony\Component\EventDispatcher\ContainerAwareTraceableEventDispatcher + * added a router:match command + * added a config:dump-reference command + * added a server:run command + * added kernel.event_subscriber tag + * added a way to create relative symlinks when running assets:install command (--relative option) + * added Controller::getUser() + * [BC BREAK] assets_base_urls and base_urls merging strategy has changed + * changed the default profiler storage to use the filesystem instead of SQLite + * added support for placeholders in route defaults and requirements (replaced + by the value set in the service container) + * added Filesystem component as a dependency + * added support for hinclude (use ``standalone: 'js'`` in render tag) + * session options: lifetime, path, domain, secure, httponly were deprecated. + Prefixed versions should now be used instead: cookie_lifetime, cookie_path, + cookie_domain, cookie_secure, cookie_httponly + * [BC BREAK] following session options: 'lifetime', 'path', 'domain', 'secure', + 'httponly' are now prefixed with cookie_ when dumped to the container + * Added `handler_id` configuration under `session` key to represent `session.handler` + service, defaults to `session.handler.native_file`. + * Added `gc_maxlifetime`, `gc_probability`, and `gc_divisor` to session + configuration. This means session garbage collection has a + `gc_probability`/`gc_divisor` chance of being run. The `gc_maxlifetime` defines + how long a session can idle for. It is different from cookie lifetime which + declares how long a cookie can be stored on the remote client. + * Removed 'auto_start' configuration parameter from session config. The session will + start on demand. + * [BC BREAK] TemplateNameParser::parseFromFilename() has been moved to a dedicated + parser: TemplateFilenameParser::parse(). + * [BC BREAK] Kernel parameters are replaced by their value wherever they appear + in Route patterns, requirements and defaults. Use '%%' as the escaped value for '%'. + * [BC BREAK] Switched behavior of flash messages to expire flash messages on retrieval + using Symfony\Component\HttpFoundation\Session\Flash\FlashBag as opposed to on + next pageload regardless of whether they are displayed or not. diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AnnotationsCacheWarmer.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AnnotationsCacheWarmer.php new file mode 100644 index 0000000000000000000000000000000000000000..a6fb4ed095d2b3cfe6f3209be4499bdd1c2b51cb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AnnotationsCacheWarmer.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; + +use Doctrine\Common\Annotations\AnnotationException; +use Doctrine\Common\Annotations\CachedReader; +use Doctrine\Common\Annotations\Reader; +use Psr\Cache\CacheItemPoolInterface; +use Symfony\Component\Cache\Adapter\AdapterInterface; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\Cache\Adapter\PhpArrayAdapter; +use Symfony\Component\Cache\Adapter\ProxyAdapter; +use Symfony\Component\Cache\DoctrineProvider; +use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; + +/** + * Warms up annotation caches for classes found in composer's autoload class map + * and declared in DI bundle extensions using the addAnnotatedClassesToCache method. + * + * @author Titouan Galopin + */ +class AnnotationsCacheWarmer implements CacheWarmerInterface +{ + private $annotationReader; + private $phpArrayFile; + private $fallbackPool; + + /** + * @param Reader $annotationReader + * @param string $phpArrayFile The PHP file where annotations are cached + * @param CacheItemPoolInterface $fallbackPool The pool where runtime-discovered annotations are cached + */ + public function __construct(Reader $annotationReader, $phpArrayFile, CacheItemPoolInterface $fallbackPool) + { + $this->annotationReader = $annotationReader; + $this->phpArrayFile = $phpArrayFile; + if (!$fallbackPool instanceof AdapterInterface) { + $fallbackPool = new ProxyAdapter($fallbackPool); + } + $this->fallbackPool = $fallbackPool; + } + + /** + * {@inheritdoc} + */ + public function warmUp($cacheDir) + { + $adapter = new PhpArrayAdapter($this->phpArrayFile, $this->fallbackPool); + $annotatedClassPatterns = $cacheDir.'/annotations.map'; + + if (!is_file($annotatedClassPatterns)) { + $adapter->warmUp(array()); + + return; + } + + $annotatedClasses = include $annotatedClassPatterns; + + $arrayPool = new ArrayAdapter(0, false); + $reader = new CachedReader($this->annotationReader, new DoctrineProvider($arrayPool)); + + spl_autoload_register(array($adapter, 'throwOnRequiredClass')); + try { + foreach ($annotatedClasses as $class) { + try { + $this->readAllComponents($reader, $class); + } catch (\ReflectionException $e) { + // ignore failing reflection + } catch (AnnotationException $e) { + /* + * Ignore any AnnotationException to not break the cache warming process if an Annotation is badly + * configured or could not be found / read / etc. + * + * In particular cases, an Annotation in your code can be used and defined only for a specific + * environment but is always added to the annotations.map file by some Symfony default behaviors, + * and you always end up with a not found Annotation. + */ + } + } + } finally { + spl_autoload_unregister(array($adapter, 'throwOnRequiredClass')); + } + + $values = $arrayPool->getValues(); + $adapter->warmUp($values); + + foreach ($values as $k => $v) { + $item = $this->fallbackPool->getItem($k); + $this->fallbackPool->saveDeferred($item->set($v)); + } + $this->fallbackPool->commit(); + } + + /** + * {@inheritdoc} + */ + public function isOptional() + { + return true; + } + + private function readAllComponents(Reader $reader, $class) + { + $reflectionClass = new \ReflectionClass($class); + $reader->getClassAnnotations($reflectionClass); + + foreach ($reflectionClass->getMethods() as $reflectionMethod) { + $reader->getMethodAnnotations($reflectionMethod); + } + + foreach ($reflectionClass->getProperties() as $reflectionProperty) { + $reader->getPropertyAnnotations($reflectionProperty); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ClassCacheCacheWarmer.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ClassCacheCacheWarmer.php new file mode 100644 index 0000000000000000000000000000000000000000..b235c651365554cf919ba1d1f5a99b530dc2113a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ClassCacheCacheWarmer.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; + +use Symfony\Component\ClassLoader\ClassCollectionLoader; +use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; + +/** + * Generates the Class Cache (classes.php) file. + * + * @author Tugdual Saunier + */ +class ClassCacheCacheWarmer implements CacheWarmerInterface +{ + private $declaredClasses; + + public function __construct(array $declaredClasses = null) + { + $this->declaredClasses = $declaredClasses; + } + + /** + * Warms up the cache. + * + * @param string $cacheDir The cache directory + */ + public function warmUp($cacheDir) + { + $classmap = $cacheDir.'/classes.map'; + + if (!is_file($classmap)) { + return; + } + + if (file_exists($cacheDir.'/classes.php')) { + return; + } + $declared = null !== $this->declaredClasses ? $this->declaredClasses : array_merge(get_declared_classes(), get_declared_interfaces(), get_declared_traits()); + + ClassCollectionLoader::inline(include($classmap), $cacheDir.'/classes.php', $declared); + } + + /** + * Checks whether this warmer is optional or not. + * + * @return bool always true + */ + public function isOptional() + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php new file mode 100644 index 0000000000000000000000000000000000000000..256bebebe80b7fc8d8ba885ee0832a5401c002aa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.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\Bundle\FrameworkBundle\CacheWarmer; + +use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; +use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; +use Symfony\Component\Routing\RouterInterface; + +/** + * Generates the router matcher and generator classes. + * + * @author Fabien Potencier + */ +class RouterCacheWarmer implements CacheWarmerInterface +{ + protected $router; + + /** + * Constructor. + * + * @param RouterInterface $router A Router instance + */ + public function __construct(RouterInterface $router) + { + $this->router = $router; + } + + /** + * Warms up the cache. + * + * @param string $cacheDir The cache directory + */ + public function warmUp($cacheDir) + { + if ($this->router instanceof WarmableInterface) { + $this->router->warmUp($cacheDir); + } + } + + /** + * Checks whether this warmer is optional or not. + * + * @return bool always true + */ + public function isOptional() + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/SerializerCacheWarmer.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/SerializerCacheWarmer.php new file mode 100644 index 0000000000000000000000000000000000000000..c017f51268b3d6ae981b451bb6984915d37879f9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/SerializerCacheWarmer.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\Bundle\FrameworkBundle\CacheWarmer; + +use Doctrine\Common\Annotations\AnnotationException; +use Psr\Cache\CacheItemPoolInterface; +use Symfony\Component\Cache\Adapter\AdapterInterface; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\Cache\Adapter\PhpArrayAdapter; +use Symfony\Component\Cache\Adapter\ProxyAdapter; +use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; +use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; +use Symfony\Component\Serializer\Mapping\Loader\LoaderChain; +use Symfony\Component\Serializer\Mapping\Loader\LoaderInterface; +use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader; +use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader; + +/** + * Warms up XML and YAML serializer metadata. + * + * @author Titouan Galopin + */ +class SerializerCacheWarmer implements CacheWarmerInterface +{ + private $loaders; + private $phpArrayFile; + private $fallbackPool; + + /** + * @param LoaderInterface[] $loaders The serializer metadata loaders + * @param string $phpArrayFile The PHP file where metadata are cached + * @param CacheItemPoolInterface $fallbackPool The pool where runtime-discovered metadata are cached + */ + public function __construct(array $loaders, $phpArrayFile, CacheItemPoolInterface $fallbackPool) + { + $this->loaders = $loaders; + $this->phpArrayFile = $phpArrayFile; + if (!$fallbackPool instanceof AdapterInterface) { + $fallbackPool = new ProxyAdapter($fallbackPool); + } + $this->fallbackPool = $fallbackPool; + } + + /** + * {@inheritdoc} + */ + public function warmUp($cacheDir) + { + if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) { + return; + } + + $adapter = new PhpArrayAdapter($this->phpArrayFile, $this->fallbackPool); + $arrayPool = new ArrayAdapter(0, false); + + $metadataFactory = new CacheClassMetadataFactory(new ClassMetadataFactory(new LoaderChain($this->loaders)), $arrayPool); + + spl_autoload_register(array($adapter, 'throwOnRequiredClass')); + try { + foreach ($this->extractSupportedLoaders($this->loaders) as $loader) { + foreach ($loader->getMappedClasses() as $mappedClass) { + try { + $metadataFactory->getMetadataFor($mappedClass); + } catch (\ReflectionException $e) { + // ignore failing reflection + } catch (AnnotationException $e) { + // ignore failing annotations + } + } + } + } finally { + spl_autoload_unregister(array($adapter, 'throwOnRequiredClass')); + } + + $values = $arrayPool->getValues(); + $adapter->warmUp($values); + + foreach ($values as $k => $v) { + $item = $this->fallbackPool->getItem($k); + $this->fallbackPool->saveDeferred($item->set($v)); + } + $this->fallbackPool->commit(); + } + + /** + * {@inheritdoc} + */ + public function isOptional() + { + return true; + } + + /** + * @param LoaderInterface[] $loaders + * + * @return XmlFileLoader[]|YamlFileLoader[] + */ + private function extractSupportedLoaders(array $loaders) + { + $supportedLoaders = array(); + + foreach ($loaders as $loader) { + if ($loader instanceof XmlFileLoader || $loader instanceof YamlFileLoader) { + $supportedLoaders[] = $loader; + } elseif ($loader instanceof LoaderChain) { + $supportedLoaders = array_merge($supportedLoaders, $this->extractSupportedLoaders($loader->getDelegatedLoaders())); + } + } + + return $supportedLoaders; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php new file mode 100644 index 0000000000000000000000000000000000000000..afda1191777b8d713918f7f8a5e1b6a615192984 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.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\Bundle\FrameworkBundle\CacheWarmer; + +use Symfony\Component\HttpKernel\KernelInterface; +use Symfony\Component\Finder\Finder; +use Symfony\Component\Templating\TemplateNameParserInterface; +use Symfony\Component\Templating\TemplateReferenceInterface; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; + +/** + * Finds all the templates. + * + * @author Victor Berchet + */ +class TemplateFinder implements TemplateFinderInterface +{ + private $kernel; + private $parser; + private $rootDir; + private $templates; + + /** + * Constructor. + * + * @param KernelInterface $kernel A KernelInterface instance + * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance + * @param string $rootDir The directory where global templates can be stored + */ + public function __construct(KernelInterface $kernel, TemplateNameParserInterface $parser, $rootDir) + { + $this->kernel = $kernel; + $this->parser = $parser; + $this->rootDir = $rootDir; + } + + /** + * Find all the templates in the bundle and in the kernel Resources folder. + * + * @return TemplateReferenceInterface[] + */ + public function findAllTemplates() + { + if (null !== $this->templates) { + return $this->templates; + } + + $templates = array(); + + foreach ($this->kernel->getBundles() as $bundle) { + $templates = array_merge($templates, $this->findTemplatesInBundle($bundle)); + } + + $templates = array_merge($templates, $this->findTemplatesInFolder($this->rootDir.'/views')); + + return $this->templates = $templates; + } + + /** + * Find templates in the given directory. + * + * @param string $dir The folder where to look for templates + * + * @return TemplateReferenceInterface[] + */ + private function findTemplatesInFolder($dir) + { + $templates = array(); + + if (is_dir($dir)) { + $finder = new Finder(); + foreach ($finder->files()->followLinks()->in($dir) as $file) { + $template = $this->parser->parse($file->getRelativePathname()); + if (false !== $template) { + $templates[] = $template; + } + } + } + + return $templates; + } + + /** + * Find templates in the given bundle. + * + * @param BundleInterface $bundle The bundle where to look for templates + * + * @return TemplateReferenceInterface[] + */ + private function findTemplatesInBundle(BundleInterface $bundle) + { + $name = $bundle->getName(); + $templates = array_merge( + $this->findTemplatesInFolder($bundle->getPath().'/Resources/views'), + $this->findTemplatesInFolder($this->rootDir.'/'.$name.'/views') + ); + $templates = array_unique($templates); + + foreach ($templates as $i => $template) { + $templates[$i] = $template->set('bundle', $name); + } + + return $templates; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinderInterface.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..433ed8f54897a8969da7df17f90b5f74b8798bff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinderInterface.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\Bundle\FrameworkBundle\CacheWarmer; + +/** + * Interface for finding all the templates. + * + * @author Victor Berchet + */ +interface TemplateFinderInterface +{ + /** + * Find all the templates. + * + * @return array An array of templates of type TemplateReferenceInterface + */ + public function findAllTemplates(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php new file mode 100644 index 0000000000000000000000000000000000000000..4cb9f41b29556c07a32d8a6883824c4e853fe2ed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; + +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmer; +use Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator; + +/** + * Computes the association between template names and their paths on the disk. + * + * @author Fabien Potencier + */ +class TemplatePathsCacheWarmer extends CacheWarmer +{ + protected $finder; + protected $locator; + + /** + * Constructor. + * + * @param TemplateFinderInterface $finder A template finder + * @param TemplateLocator $locator The template locator + */ + public function __construct(TemplateFinderInterface $finder, TemplateLocator $locator) + { + $this->finder = $finder; + $this->locator = $locator; + } + + /** + * Warms up the cache. + * + * @param string $cacheDir The cache directory + */ + public function warmUp($cacheDir) + { + $filesystem = new Filesystem(); + $templates = array(); + + foreach ($this->finder->findAllTemplates() as $template) { + $templates[$template->getLogicalName()] = rtrim($filesystem->makePathRelative($this->locator->locate($template), $cacheDir), '/'); + } + + $templates = str_replace("' => '", "' => __DIR__.'/", var_export($templates, true)); + + $this->writeCacheFile($cacheDir.'/templates.php', sprintf(" + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; + +use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; +use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; +use Symfony\Component\Translation\TranslatorInterface; + +/** + * Generates the catalogues for translations. + * + * @author Xavier Leune + */ +class TranslationsCacheWarmer implements CacheWarmerInterface +{ + private $translator; + + public function __construct(TranslatorInterface $translator) + { + $this->translator = $translator; + } + + /** + * {@inheritdoc} + */ + public function warmUp($cacheDir) + { + if ($this->translator instanceof WarmableInterface) { + $this->translator->warmUp($cacheDir); + } + } + + /** + * {@inheritdoc} + */ + public function isOptional() + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ValidatorCacheWarmer.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ValidatorCacheWarmer.php new file mode 100644 index 0000000000000000000000000000000000000000..81291d772fbf0f4b4d699107c8e539dcd3c14532 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ValidatorCacheWarmer.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; + +use Doctrine\Common\Annotations\AnnotationException; +use Psr\Cache\CacheItemPoolInterface; +use Symfony\Component\Cache\Adapter\AdapterInterface; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\Cache\Adapter\PhpArrayAdapter; +use Symfony\Component\Cache\Adapter\ProxyAdapter; +use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; +use Symfony\Component\Validator\Mapping\Cache\Psr6Cache; +use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; +use Symfony\Component\Validator\Mapping\Loader\LoaderChain; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; +use Symfony\Component\Validator\Mapping\Loader\XmlFileLoader; +use Symfony\Component\Validator\Mapping\Loader\YamlFileLoader; +use Symfony\Component\Validator\ValidatorBuilderInterface; + +/** + * Warms up XML and YAML validator metadata. + * + * @author Titouan Galopin + */ +class ValidatorCacheWarmer implements CacheWarmerInterface +{ + private $validatorBuilder; + private $phpArrayFile; + private $fallbackPool; + + /** + * @param ValidatorBuilderInterface $validatorBuilder + * @param string $phpArrayFile The PHP file where metadata are cached + * @param CacheItemPoolInterface $fallbackPool The pool where runtime-discovered metadata are cached + */ + public function __construct(ValidatorBuilderInterface $validatorBuilder, $phpArrayFile, CacheItemPoolInterface $fallbackPool) + { + $this->validatorBuilder = $validatorBuilder; + $this->phpArrayFile = $phpArrayFile; + if (!$fallbackPool instanceof AdapterInterface) { + $fallbackPool = new ProxyAdapter($fallbackPool); + } + $this->fallbackPool = $fallbackPool; + } + + /** + * {@inheritdoc} + */ + public function warmUp($cacheDir) + { + if (!method_exists($this->validatorBuilder, 'getLoaders')) { + return; + } + + $adapter = new PhpArrayAdapter($this->phpArrayFile, $this->fallbackPool); + $arrayPool = new ArrayAdapter(0, false); + + $loaders = $this->validatorBuilder->getLoaders(); + $metadataFactory = new LazyLoadingMetadataFactory(new LoaderChain($loaders), new Psr6Cache($arrayPool)); + + spl_autoload_register(array($adapter, 'throwOnRequiredClass')); + try { + foreach ($this->extractSupportedLoaders($loaders) as $loader) { + foreach ($loader->getMappedClasses() as $mappedClass) { + try { + if ($metadataFactory->hasMetadataFor($mappedClass)) { + $metadataFactory->getMetadataFor($mappedClass); + } + } catch (\ReflectionException $e) { + // ignore failing reflection + } catch (AnnotationException $e) { + // ignore failing annotations + } + } + } + } finally { + spl_autoload_unregister(array($adapter, 'throwOnRequiredClass')); + } + + $values = $arrayPool->getValues(); + $adapter->warmUp(array_filter($values)); + + foreach ($values as $k => $v) { + $item = $this->fallbackPool->getItem($k); + $this->fallbackPool->saveDeferred($item->set($v)); + } + $this->fallbackPool->commit(); + } + + /** + * {@inheritdoc} + */ + public function isOptional() + { + return true; + } + + /** + * @param LoaderInterface[] $loaders + * + * @return XmlFileLoader[]|YamlFileLoader[] + */ + private function extractSupportedLoaders(array $loaders) + { + $supportedLoaders = array(); + + foreach ($loaders as $loader) { + if ($loader instanceof XmlFileLoader || $loader instanceof YamlFileLoader) { + $supportedLoaders[] = $loader; + } elseif ($loader instanceof LoaderChain) { + $supportedLoaders = array_merge($supportedLoaders, $this->extractSupportedLoaders($loader->getDelegatedLoaders())); + } + } + + return $supportedLoaders; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Client.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Client.php new file mode 100644 index 0000000000000000000000000000000000000000..04fbd3ab0fab29ca14fa8328058d18ad525db0ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Client.php @@ -0,0 +1,204 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpKernel\KernelInterface; +use Symfony\Component\HttpKernel\Client as BaseClient; +use Symfony\Component\HttpKernel\Profiler\Profile as HttpProfile; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\BrowserKit\History; +use Symfony\Component\BrowserKit\CookieJar; + +/** + * Client simulates a browser and makes requests to a Kernel object. + * + * @author Fabien Potencier + */ +class Client extends BaseClient +{ + private $hasPerformedRequest = false; + private $profiler = false; + private $reboot = true; + + /** + * {@inheritdoc} + */ + public function __construct(KernelInterface $kernel, array $server = array(), History $history = null, CookieJar $cookieJar = null) + { + parent::__construct($kernel, $server, $history, $cookieJar); + } + + /** + * Returns the container. + * + * @return ContainerInterface|null Returns null when the Kernel has been shutdown or not started yet + */ + public function getContainer() + { + return $this->kernel->getContainer(); + } + + /** + * Returns the kernel. + * + * @return KernelInterface + */ + public function getKernel() + { + return $this->kernel; + } + + /** + * Gets the profile associated with the current Response. + * + * @return HttpProfile A Profile instance + */ + public function getProfile() + { + if (!$this->kernel->getContainer()->has('profiler')) { + return false; + } + + return $this->kernel->getContainer()->get('profiler')->loadProfileFromResponse($this->response); + } + + /** + * Enables the profiler for the very next request. + * + * If the profiler is not enabled, the call to this method does nothing. + */ + public function enableProfiler() + { + if ($this->kernel->getContainer()->has('profiler')) { + $this->profiler = true; + } + } + + /** + * Disables kernel reboot between requests. + * + * By default, the Client reboots the Kernel for each request. This method + * allows to keep the same kernel across requests. + */ + public function disableReboot() + { + $this->reboot = false; + } + + /** + * Enables kernel reboot between requests. + */ + public function enableReboot() + { + $this->reboot = true; + } + + /** + * {@inheritdoc} + * + * @param Request $request A Request instance + * + * @return Response A Response instance + */ + protected function doRequest($request) + { + // avoid shutting down the Kernel if no request has been performed yet + // WebTestCase::createClient() boots the Kernel but do not handle a request + if ($this->hasPerformedRequest && $this->reboot) { + $this->kernel->shutdown(); + } else { + $this->hasPerformedRequest = true; + } + + if ($this->profiler) { + $this->profiler = false; + + $this->kernel->boot(); + $this->kernel->getContainer()->get('profiler')->enable(); + } + + return parent::doRequest($request); + } + + /** + * {@inheritdoc} + * + * @param Request $request A Request instance + * + * @return Response A Response instance + */ + protected function doRequestInProcess($request) + { + $response = parent::doRequestInProcess($request); + + $this->profiler = false; + + return $response; + } + + /** + * Returns the script to execute when the request must be insulated. + * + * It assumes that the autoloader is named 'autoload.php' and that it is + * stored in the same directory as the kernel (this is the case for the + * Symfony Standard Edition). If this is not your case, create your own + * client and override this method. + * + * @param Request $request A Request instance + * + * @return string The script content + */ + protected function getScript($request) + { + $kernel = str_replace("'", "\\'", serialize($this->kernel)); + $request = str_replace("'", "\\'", serialize($request)); + + $r = new \ReflectionObject($this->kernel); + + $autoloader = dirname($r->getFileName()).'/autoload.php'; + if (is_file($autoloader)) { + $autoloader = str_replace("'", "\\'", $autoloader); + } else { + $autoloader = ''; + } + + $path = str_replace("'", "\\'", $r->getFileName()); + + $profilerCode = ''; + if ($this->profiler) { + $profilerCode = '$kernel->getContainer()->get(\'profiler\')->enable();'; + } + + $errorReporting = error_reporting(); + + $code = <<boot(); +$profilerCode + +\$request = unserialize('$request'); +EOF; + + return $code.$this->getHandleScript(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..cdafcbd69b10142ff06c9d7fdb4786dd73d1b762 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Config\Definition\ConfigurationInterface; +use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Style\StyleInterface; +use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; + +/** + * A console command for dumping available configuration reference. + * + * @author Kevin Bond + * @author Wouter J + * @author Grégoire Pineau + */ +abstract class AbstractConfigCommand extends ContainerDebugCommand +{ + protected function listBundles($output) + { + $title = 'Available registered bundles with their extension alias if available'; + $headers = array('Bundle name', 'Extension alias'); + $rows = array(); + + $bundles = $this->getContainer()->get('kernel')->getBundles(); + usort($bundles, function ($bundleA, $bundleB) { + return strcmp($bundleA->getName(), $bundleB->getName()); + }); + + foreach ($bundles as $bundle) { + $extension = $bundle->getContainerExtension(); + $rows[] = array($bundle->getName(), $extension ? $extension->getAlias() : ''); + } + + if ($output instanceof StyleInterface) { + $output->title($title); + $output->table($headers, $rows); + } else { + $output->writeln($title); + $table = new Table($output); + $table->setHeaders($headers)->setRows($rows)->render(); + } + } + + protected function findExtension($name) + { + $bundles = $this->initializeBundles(); + $minScore = INF; + + foreach ($bundles as $bundle) { + if ($name === $bundle->getName()) { + if (!$bundle->getContainerExtension()) { + throw new \LogicException(sprintf('Bundle "%s" does not have a container extension.', $name)); + } + + return $bundle->getContainerExtension(); + } + + $distance = levenshtein($name, $bundle->getName()); + + if ($distance < $minScore) { + $guess = $bundle->getName(); + $minScore = $distance; + } + + $extension = $bundle->getContainerExtension(); + + if ($extension) { + if ($name === $extension->getAlias()) { + return $extension; + } + + $distance = levenshtein($name, $extension->getAlias()); + + if ($distance < $minScore) { + $guess = $extension->getAlias(); + $minScore = $distance; + } + } + } + + if ('Bundle' !== substr($name, -6)) { + $message = sprintf('No extensions with configuration available for "%s".', $name); + } else { + $message = sprintf('No extension with alias "%s" is enabled.', $name); + } + + if (isset($guess) && $minScore < 3) { + $message .= sprintf("\n\nDid you mean \"%s\"?", $guess); + } + + throw new \LogicException($message); + } + + public function validateConfiguration(ExtensionInterface $extension, $configuration) + { + if (!$configuration) { + throw new \LogicException(sprintf('The extension with alias "%s" does not have its getConfiguration() method setup', $extension->getAlias())); + } + + if (!$configuration instanceof ConfigurationInterface) { + throw new \LogicException(sprintf('Configuration class "%s" should implement ConfigurationInterface in order to be dumpable', get_class($configuration))); + } + } + + private function initializeBundles() + { + // Re-build bundle manually to initialize DI extensions that can be extended by other bundles in their build() method + // as this method is not called when the container is loaded from the cache. + $container = $this->getContainerBuilder(); + $bundles = $this->getContainer()->get('kernel')->registerBundles(); + foreach ($bundles as $bundle) { + if ($extension = $bundle->getContainerExtension()) { + $container->registerExtension($extension); + } + } + + foreach ($bundles as $bundle) { + $bundle->build($container); + } + + return $bundles; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..9f36c8d714d72a6d1876c744b8e4eec0d8f0108a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php @@ -0,0 +1,248 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Filesystem\Exception\IOException; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Finder\Finder; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; + +/** + * Command that places bundle web assets into a given directory. + * + * @author Fabien Potencier + * @author Gábor Egyed + */ +class AssetsInstallCommand extends ContainerAwareCommand +{ + const METHOD_COPY = 'copy'; + const METHOD_ABSOLUTE_SYMLINK = 'absolute symlink'; + const METHOD_RELATIVE_SYMLINK = 'relative symlink'; + + /** + * @var Filesystem + */ + private $filesystem; + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('assets:install') + ->setDefinition(array( + new InputArgument('target', InputArgument::OPTIONAL, 'The target directory', 'web'), + )) + ->addOption('symlink', null, InputOption::VALUE_NONE, 'Symlinks the assets instead of copying it') + ->addOption('relative', null, InputOption::VALUE_NONE, 'Make relative symlinks') + ->setDescription('Installs bundles web assets under a public web directory') + ->setHelp(<<<'EOT' +The %command.name% command installs bundle assets into a given +directory (e.g. the web directory). + + php %command.full_name% web + +A "bundles" directory will be created inside the target directory and the +"Resources/public" directory of each bundle will be copied into it. + +To create a symlink to each bundle instead of copying its assets, use the +--symlink option (will fall back to hard copies when symbolic links aren't possible: + + php %command.full_name% web --symlink + +To make symlink relative, add the --relative option: + + php %command.full_name% web --symlink --relative + +EOT + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $targetArg = rtrim($input->getArgument('target'), '/'); + + if (!is_dir($targetArg)) { + throw new \InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $input->getArgument('target'))); + } + + $this->filesystem = $this->getContainer()->get('filesystem'); + + // Create the bundles directory otherwise symlink will fail. + $bundlesDir = $targetArg.'/bundles/'; + $this->filesystem->mkdir($bundlesDir, 0777); + + $io = new SymfonyStyle($input, $output); + $io->newLine(); + + if ($input->getOption('relative')) { + $expectedMethod = self::METHOD_RELATIVE_SYMLINK; + $io->text('Trying to install assets as relative symbolic links.'); + } elseif ($input->getOption('symlink')) { + $expectedMethod = self::METHOD_ABSOLUTE_SYMLINK; + $io->text('Trying to install assets as absolute symbolic links.'); + } else { + $expectedMethod = self::METHOD_COPY; + $io->text('Installing assets as hard copies.'); + } + + $io->newLine(); + + $rows = array(); + $copyUsed = false; + $exitCode = 0; + /** @var BundleInterface $bundle */ + foreach ($this->getContainer()->get('kernel')->getBundles() as $bundle) { + if (!is_dir($originDir = $bundle->getPath().'/Resources/public')) { + continue; + } + + $targetDir = $bundlesDir.preg_replace('/bundle$/', '', strtolower($bundle->getName())); + + if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { + $message = sprintf("%s\n-> %s", $bundle->getName(), $targetDir); + } else { + $message = $bundle->getName(); + } + + try { + $this->filesystem->remove($targetDir); + + if (self::METHOD_RELATIVE_SYMLINK === $expectedMethod) { + $method = $this->relativeSymlinkWithFallback($originDir, $targetDir); + } elseif (self::METHOD_ABSOLUTE_SYMLINK === $expectedMethod) { + $method = $this->absoluteSymlinkWithFallback($originDir, $targetDir); + } else { + $method = $this->hardCopy($originDir, $targetDir); + } + + if (self::METHOD_COPY === $method) { + $copyUsed = true; + } + + if ($method === $expectedMethod) { + $rows[] = array(sprintf('%s', '\\' === DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */), $message, $method); + } else { + $rows[] = array(sprintf('%s', '\\' === DIRECTORY_SEPARATOR ? 'WARNING' : '!'), $message, $method); + } + } catch (\Exception $e) { + $exitCode = 1; + $rows[] = array(sprintf('%s', '\\' === DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */), $message, $e->getMessage()); + } + } + + $io->table(array('', 'Bundle', 'Method / Error'), $rows); + + if (0 !== $exitCode) { + $io->error('Some errors occurred while installing assets.'); + } else { + if ($copyUsed) { + $io->note('Some assets were installed via copy. If you make changes to these assets you have to run this command again.'); + } + $io->success('All assets were successfully installed.'); + } + + return $exitCode; + } + + /** + * Try to create relative symlink. + * + * Falling back to absolute symlink and finally hard copy. + * + * @param string $originDir + * @param string $targetDir + * + * @return string + */ + private function relativeSymlinkWithFallback($originDir, $targetDir) + { + try { + $this->symlink($originDir, $targetDir, true); + $method = self::METHOD_RELATIVE_SYMLINK; + } catch (IOException $e) { + $method = $this->absoluteSymlinkWithFallback($originDir, $targetDir); + } + + return $method; + } + + /** + * Try to create absolute symlink. + * + * Falling back to hard copy. + * + * @param string $originDir + * @param string $targetDir + * + * @return string + */ + private function absoluteSymlinkWithFallback($originDir, $targetDir) + { + try { + $this->symlink($originDir, $targetDir); + $method = self::METHOD_ABSOLUTE_SYMLINK; + } catch (IOException $e) { + // fall back to copy + $method = $this->hardCopy($originDir, $targetDir); + } + + return $method; + } + + /** + * Creates symbolic link. + * + * @param string $originDir + * @param string $targetDir + * @param bool $relative + * + * @throws IOException If link can not be created. + */ + private function symlink($originDir, $targetDir, $relative = false) + { + if ($relative) { + $originDir = $this->filesystem->makePathRelative($originDir, realpath(dirname($targetDir))); + } + $this->filesystem->symlink($originDir, $targetDir); + if (!file_exists($targetDir)) { + throw new IOException(sprintf('Symbolic link "%s" was created but appears to be broken.', $targetDir), 0, null, $targetDir); + } + } + + /** + * Copies origin to target. + * + * @param string $originDir + * @param string $targetDir + * + * @return string + */ + private function hardCopy($originDir, $targetDir) + { + $this->filesystem->mkdir($targetDir, 0777); + // We use a custom iterator to ignore VCS files + $this->filesystem->mirror($originDir, $targetDir, Finder::create()->ignoreDotFiles(false)->in($originDir)); + + return self::METHOD_COPY; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..f926b4153bcd5e3c1aa60cc17747239b157b1963 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php @@ -0,0 +1,251 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\HttpKernel\KernelInterface; +use Symfony\Component\Finder\Finder; + +/** + * Clear and Warmup the cache. + * + * @author Francis Besset + * @author Fabien Potencier + */ +class CacheClearCommand extends ContainerAwareCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('cache:clear') + ->setDefinition(array( + new InputOption('no-warmup', '', InputOption::VALUE_NONE, 'Do not warm up the cache'), + new InputOption('no-optional-warmers', '', InputOption::VALUE_NONE, 'Skip optional cache warmers (faster)'), + )) + ->setDescription('Clears the cache') + ->setHelp(<<<'EOF' +The %command.name% command clears the application cache for a given environment +and debug mode: + + php %command.full_name% --env=dev + php %command.full_name% --env=prod --no-debug +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $outputIsVerbose = $output->isVerbose(); + $io = new SymfonyStyle($input, $output); + + $realCacheDir = $this->getContainer()->getParameter('kernel.cache_dir'); + // the old cache dir name must not be longer than the real one to avoid exceeding + // the maximum length of a directory or file path within it (esp. Windows MAX_PATH) + $oldCacheDir = substr($realCacheDir, 0, -1).('~' === substr($realCacheDir, -1) ? '+' : '~'); + $filesystem = $this->getContainer()->get('filesystem'); + + if (!is_writable($realCacheDir)) { + throw new \RuntimeException(sprintf('Unable to write in the "%s" directory', $realCacheDir)); + } + + if ($filesystem->exists($oldCacheDir)) { + $filesystem->remove($oldCacheDir); + } + + $kernel = $this->getContainer()->get('kernel'); + $io->comment(sprintf('Clearing the cache for the %s environment with debug %s', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); + $this->getContainer()->get('cache_clearer')->clear($realCacheDir); + + if ($input->getOption('no-warmup')) { + $filesystem->rename($realCacheDir, $oldCacheDir); + } else { + // the warmup cache dir name must have the same length than the real one + // to avoid the many problems in serialized resources files + $realCacheDir = realpath($realCacheDir); + $warmupDir = substr($realCacheDir, 0, -1).('_' === substr($realCacheDir, -1) ? '-' : '_'); + + if ($filesystem->exists($warmupDir)) { + if ($outputIsVerbose) { + $io->comment('Clearing outdated warmup directory...'); + } + $filesystem->remove($warmupDir); + } + + if ($outputIsVerbose) { + $io->comment('Warming up cache...'); + } + $this->warmup($warmupDir, $realCacheDir, !$input->getOption('no-optional-warmers')); + + $filesystem->rename($realCacheDir, $oldCacheDir); + if ('\\' === DIRECTORY_SEPARATOR) { + sleep(1); // workaround for Windows PHP rename bug + } + $filesystem->rename($warmupDir, $realCacheDir); + } + + if ($outputIsVerbose) { + $io->comment('Removing old cache directory...'); + } + + $filesystem->remove($oldCacheDir); + + if ($outputIsVerbose) { + $io->comment('Finished'); + } + + $io->success(sprintf('Cache for the "%s" environment (debug=%s) was successfully cleared.', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); + } + + /** + * @param string $warmupDir + * @param string $realCacheDir + * @param bool $enableOptionalWarmers + */ + protected function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = true) + { + // create a temporary kernel + $realKernel = $this->getContainer()->get('kernel'); + $realKernelClass = get_class($realKernel); + $namespace = ''; + if (false !== $pos = strrpos($realKernelClass, '\\')) { + $namespace = substr($realKernelClass, 0, $pos); + $realKernelClass = substr($realKernelClass, $pos + 1); + } + $tempKernel = $this->getTempKernel($realKernel, $namespace, $realKernelClass, $warmupDir); + $tempKernel->boot(); + + $tempKernelReflection = new \ReflectionObject($tempKernel); + $tempKernelFile = $tempKernelReflection->getFileName(); + + // warmup temporary dir + $warmer = $tempKernel->getContainer()->get('cache_warmer'); + if ($enableOptionalWarmers) { + $warmer->enableOptionalWarmers(); + } + $warmer->warmUp($warmupDir); + + // fix references to the Kernel in .meta files + $safeTempKernel = str_replace('\\', '\\\\', get_class($tempKernel)); + $realKernelFQN = get_class($realKernel); + + foreach (Finder::create()->files()->name('*.meta')->in($warmupDir) as $file) { + file_put_contents($file, preg_replace( + '/(C\:\d+\:)"'.$safeTempKernel.'"/', + sprintf('$1"%s"', $realKernelFQN), + file_get_contents($file) + )); + } + + // fix references to cached files with the real cache directory name + $search = array($warmupDir, str_replace('\\', '\\\\', $warmupDir)); + $replace = str_replace('\\', '/', $realCacheDir); + foreach (Finder::create()->files()->in($warmupDir) as $file) { + $content = str_replace($search, $replace, file_get_contents($file)); + file_put_contents($file, $content); + } + + // fix references to container's class + $tempContainerClass = get_class($tempKernel->getContainer()); + $realContainerClass = get_class($realKernel->getContainer()); + foreach (Finder::create()->files()->name($tempContainerClass.'*')->in($warmupDir) as $file) { + $content = str_replace($tempContainerClass, $realContainerClass, file_get_contents($file)); + file_put_contents($file, $content); + rename($file, str_replace(DIRECTORY_SEPARATOR.$tempContainerClass, DIRECTORY_SEPARATOR.$realContainerClass, $file)); + } + + // remove temp kernel file after cache warmed up + @unlink($tempKernelFile); + } + + /** + * @param KernelInterface $parent + * @param string $namespace + * @param string $parentClass + * @param string $warmupDir + * + * @return KernelInterface + */ + protected function getTempKernel(KernelInterface $parent, $namespace, $parentClass, $warmupDir) + { + $cacheDir = var_export($warmupDir, true); + $rootDir = var_export(realpath($parent->getRootDir()), true); + $logDir = var_export(realpath($parent->getLogDir()), true); + // the temp kernel class name must have the same length than the real one + // to avoid the many problems in serialized resources files + $class = substr($parentClass, 0, -1).'_'; + // the temp container class must be changed too + $containerClass = var_export(substr(get_class($parent->getContainer()), 0, -1).'_', true); + $code = <<getResources(); + \$filteredResources = array(); + foreach (\$resources as \$resource) { + if ((string) \$resource !== __FILE__) { + \$filteredResources[] = \$resource; + } + } + + \$container->setResources(\$filteredResources); + + return \$container; + } + } +} +EOF; + $this->getContainer()->get('filesystem')->mkdir($warmupDir); + file_put_contents($file = $warmupDir.'/kernel.tmp', $code); + require_once $file; + $class = "$namespace\\$class"; + + return new $class($parent->getEnvironment(), $parent->isDebug()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolClearCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolClearCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..82934e1845feac0129a25d0544cbb86d035ccab3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CachePoolClearCommand.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Psr\Cache\CacheItemPoolInterface; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; + +/** + * Clear cache pools. + * + * @author Nicolas Grekas + */ +final class CachePoolClearCommand extends ContainerAwareCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('cache:pool:clear') + ->setDefinition(array( + new InputArgument('pools', InputArgument::IS_ARRAY, 'A list of cache pools or cache pool clearers'), + )) + ->setDescription('Clears cache pools') + ->setHelp(<<<'EOF' +The %command.name% command clears the given cache pools or cache pool clearers. + + %command.full_name% [...] +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + $pools = array(); + $clearers = array(); + $container = $this->getContainer(); + $cacheDir = $container->getParameter('kernel.cache_dir'); + + foreach ($input->getArgument('pools') as $id) { + $pool = $container->get($id); + + if ($pool instanceof CacheItemPoolInterface) { + $pools[$id] = $pool; + } elseif ($pool instanceof Psr6CacheClearer) { + $clearers[$id] = $pool; + } else { + throw new \InvalidArgumentException(sprintf('"%s" is not a cache pool nor a cache clearer.', $id)); + } + } + + foreach ($clearers as $id => $clearer) { + $io->comment(sprintf('Calling cache clearer: %s', $id)); + $clearer->clear($cacheDir); + } + + foreach ($pools as $id => $pool) { + $io->comment(sprintf('Clearing cache pool: %s', $id)); + $pool->clear(); + } + + $io->success('Cache was successfully cleared.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..1e0c4b6b3a251013b70fab5e035192bfb27c148f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; + +/** + * Warmup the cache. + * + * @author Fabien Potencier + */ +class CacheWarmupCommand extends ContainerAwareCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('cache:warmup') + ->setDefinition(array( + new InputOption('no-optional-warmers', '', InputOption::VALUE_NONE, 'Skip optional cache warmers (faster)'), + )) + ->setDescription('Warms up an empty cache') + ->setHelp(<<<'EOF' +The %command.name% command warms up the cache. + +Before running this command, the cache must be empty. + +This command does not generate the classes cache (as when executing this +command, too many classes that should be part of the cache are already loaded +in memory). Use curl or any other similar tool to warm up +the classes cache if you want. + +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + + $kernel = $this->getContainer()->get('kernel'); + $io->comment(sprintf('Warming up the cache for the %s environment with debug %s', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); + + $warmer = $this->getContainer()->get('cache_warmer'); + + if (!$input->getOption('no-optional-warmers')) { + $warmer->enableOptionalWarmers(); + } + + $warmer->warmUp($this->getContainer()->getParameter('kernel.cache_dir')); + + $io->success(sprintf('Cache for the "%s" environment (debug=%s) was successfully warmed.', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..921dba0dde977ea026715aed193bdec55e8ab39e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php @@ -0,0 +1,147 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Config\Definition\Processor; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Yaml\Yaml; + +/** + * A console command for dumping available configuration reference. + * + * @author Grégoire Pineau + */ +class ConfigDebugCommand extends AbstractConfigCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('debug:config') + ->setDefinition(array( + new InputArgument('name', InputArgument::OPTIONAL, 'The bundle name or the extension alias'), + new InputArgument('path', InputArgument::OPTIONAL, 'The configuration option path'), + )) + ->setDescription('Dumps the current configuration for an extension') + ->setHelp(<<<'EOF' +The %command.name% command dumps the current configuration for an +extension/bundle. + +Either the extension alias or bundle name can be used: + + php %command.full_name% framework + php %command.full_name% FrameworkBundle + +For dumping a specific option, add its path as second argument: + + php %command.full_name% framework serializer.enabled + +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + + if (null === $name = $input->getArgument('name')) { + $this->listBundles($io); + $io->comment('Provide the name of a bundle as the first argument of this command to dump its configuration. (e.g. debug:config FrameworkBundle)'); + $io->comment('For dumping a specific option, add its path as the second argument of this command. (e.g. debug:config FrameworkBundle serializer to dump the framework.serializer configuration)'); + + return; + } + + $extension = $this->findExtension($name); + $container = $this->compileContainer(); + + $extensionAlias = $extension->getAlias(); + $configs = $container->getExtensionConfig($extensionAlias); + $configuration = $extension->getConfiguration($configs, $container); + + $this->validateConfiguration($extension, $configuration); + + $configs = $container->resolveEnvPlaceholders($container->getParameterBag()->resolveValue($configs)); + + $processor = new Processor(); + $config = $container->resolveEnvPlaceholders($container->getParameterBag()->resolveValue($processor->processConfiguration($configuration, $configs))); + + if (null === $path = $input->getArgument('path')) { + $io->title( + sprintf('Current configuration for %s', ($name === $extensionAlias ? sprintf('extension with alias "%s"', $extensionAlias) : sprintf('"%s"', $name))) + ); + + $io->writeln(Yaml::dump(array($extensionAlias => $config), 10)); + + return; + } + + try { + $config = $this->getConfigForPath($config, $path, $extensionAlias); + } catch (LogicException $e) { + $io->error($e->getMessage()); + + return; + } + + $io->title(sprintf('Current configuration for "%s.%s"', $extensionAlias, $path)); + + $io->writeln(Yaml::dump($config, 10)); + } + + private function compileContainer() + { + $kernel = clone $this->getContainer()->get('kernel'); + $kernel->boot(); + + $method = new \ReflectionMethod($kernel, 'buildContainer'); + $method->setAccessible(true); + $container = $method->invoke($kernel); + $container->getCompiler()->compile($container); + + return $container; + } + + /** + * Iterate over configuration until the last step of the given path. + * + * @param array $config A bundle configuration + * + * @throws LogicException If the configuration does not exist + * + * @return mixed + */ + private function getConfigForPath(array $config, $path, $alias) + { + $steps = explode('.', $path); + + foreach ($steps as $step) { + if (!array_key_exists($step, $config)) { + throw new LogicException(sprintf('Unable to find configuration for "%s.%s"', $alias, $path)); + } + + $config = $config[$step]; + } + + return $config; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..dfa604f7a85ae156e83edf92b5ea5415e298d6b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper; +use Symfony\Component\Config\Definition\Dumper\XmlReferenceDumper; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; + +/** + * A console command for dumping available configuration reference. + * + * @author Kevin Bond + * @author Wouter J + * @author Grégoire Pineau + */ +class ConfigDumpReferenceCommand extends AbstractConfigCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('config:dump-reference') + ->setDefinition(array( + new InputArgument('name', InputArgument::OPTIONAL, 'The Bundle name or the extension alias'), + new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (yaml or xml)', 'yaml'), + )) + ->setDescription('Dumps the default configuration for an extension') + ->setHelp(<<<'EOF' +The %command.name% command dumps the default configuration for an +extension/bundle. + +Either the extension alias or bundle name can be used: + + php %command.full_name% framework + php %command.full_name% FrameworkBundle + +With the --format option specifies the format of the configuration, +this is either yaml or xml. +When the option is not provided, yaml is used. + + php %command.full_name% FrameworkBundle --format=xml + +EOF + ) + ; + } + + /** + * {@inheritdoc} + * + * @throws \LogicException + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + + if (null === $name = $input->getArgument('name')) { + $this->listBundles($io); + $io->comment('Provide the name of a bundle as the first argument of this command to dump its default configuration. (e.g. config:dump-reference FrameworkBundle)'); + + return; + } + + $extension = $this->findExtension($name); + + $configuration = $extension->getConfiguration(array(), $this->getContainerBuilder()); + + $this->validateConfiguration($extension, $configuration); + + if ($name === $extension->getAlias()) { + $message = sprintf('Default configuration for extension with alias: "%s"', $name); + } else { + $message = sprintf('Default configuration for "%s"', $name); + } + + switch ($input->getOption('format')) { + case 'yaml': + $io->writeln(sprintf('# %s', $message)); + $dumper = new YamlReferenceDumper(); + break; + case 'xml': + $io->writeln(sprintf('', $message)); + $dumper = new XmlReferenceDumper(); + break; + default: + $io->writeln($message); + throw new \InvalidArgumentException('Only the yaml and xml formats are supported.'); + } + + $io->writeln($dumper->dump($configuration, $extension->getNamespace())); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ContainerAwareCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ContainerAwareCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..218f816057dfd4a2bd607b39987ad8ba3ab1c7f6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ContainerAwareCommand.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; + +/** + * Command. + * + * @author Fabien Potencier + */ +abstract class ContainerAwareCommand extends Command implements ContainerAwareInterface +{ + /** + * @var ContainerInterface|null + */ + private $container; + + /** + * @return ContainerInterface + * + * @throws \LogicException + */ + protected function getContainer() + { + if (null === $this->container) { + $application = $this->getApplication(); + if (null === $application) { + throw new \LogicException('The container cannot be retrieved as the application instance is not yet set.'); + } + + $this->container = $application->getKernel()->getContainer(); + } + + return $this->container; + } + + /** + * {@inheritdoc} + */ + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..c9d0e419e290ea1a9a8430ca8ef84246085d6a8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -0,0 +1,221 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Bundle\FrameworkBundle\Console\Helper\DescriptorHelper; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\Config\FileLocator; + +/** + * A console command for retrieving information about services. + * + * @author Ryan Weaver + */ +class ContainerDebugCommand extends ContainerAwareCommand +{ + /** + * @var ContainerBuilder|null + */ + protected $containerBuilder; + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('debug:container') + ->setDefinition(array( + new InputArgument('name', InputArgument::OPTIONAL, 'A service name (foo)'), + new InputOption('show-private', null, InputOption::VALUE_NONE, 'Used to show public *and* private services'), + new InputOption('tag', null, InputOption::VALUE_REQUIRED, 'Shows all services with a specific tag'), + new InputOption('tags', null, InputOption::VALUE_NONE, 'Displays tagged services for an application'), + new InputOption('parameter', null, InputOption::VALUE_REQUIRED, 'Displays a specific parameter for an application'), + new InputOption('parameters', null, InputOption::VALUE_NONE, 'Displays parameters for an application'), + new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), + new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw description'), + )) + ->setDescription('Displays current services for an application') + ->setHelp(<<<'EOF' +The %command.name% command displays all configured public services: + + php %command.full_name% + +To get specific information about a service, specify its name: + + php %command.full_name% validator + +By default, private services are hidden. You can display all services by +using the --show-private flag: + + php %command.full_name% --show-private + +Use the --tags option to display tagged public services grouped by tag: + + php %command.full_name% --tags + +Find all services with a specific tag by specifying the tag name with the --tag option: + + php %command.full_name% --tag=form.type + +Use the --parameters option to display all parameters: + + php %command.full_name% --parameters + +Display a specific parameter by specifying its name with the --parameter option: + + php %command.full_name% --parameter=kernel.debug + +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + $this->validateInput($input); + $object = $this->getContainerBuilder(); + + if ($input->getOption('parameters')) { + $parameters = array(); + foreach ($object->getParameterBag()->all() as $k => $v) { + $parameters[$k] = $object->resolveEnvPlaceholders($v); + } + $object = new ParameterBag($parameters); + $options = array(); + } elseif ($parameter = $input->getOption('parameter')) { + $options = array('parameter' => $parameter); + } elseif ($input->getOption('tags')) { + $options = array('group_by' => 'tags', 'show_private' => $input->getOption('show-private')); + } elseif ($tag = $input->getOption('tag')) { + $options = array('tag' => $tag, 'show_private' => $input->getOption('show-private')); + } elseif ($name = $input->getArgument('name')) { + $name = $this->findProperServiceName($input, $io, $object, $name); + $options = array('id' => $name); + } else { + $options = array('show_private' => $input->getOption('show-private')); + } + + $helper = new DescriptorHelper(); + $options['format'] = $input->getOption('format'); + $options['raw_text'] = $input->getOption('raw'); + $options['output'] = $io; + $helper->describe($output, $object, $options); + + if (!$input->getArgument('name') && !$input->getOption('tag') && !$input->getOption('parameter') && $input->isInteractive()) { + if ($input->getOption('tags')) { + $io->comment('To search for a specific tag, re-run this command with a search term. (e.g. debug:container --tag=form.type)'); + } elseif ($input->getOption('parameters')) { + $io->comment('To search for a specific parameter, re-run this command with a search term. (e.g. debug:container --parameter=kernel.debug)'); + } else { + $io->comment('To search for a specific service, re-run this command with a search term. (e.g. debug:container log)'); + } + } + } + + /** + * Validates input arguments and options. + * + * @param InputInterface $input + * + * @throws \InvalidArgumentException + */ + protected function validateInput(InputInterface $input) + { + $options = array('tags', 'tag', 'parameters', 'parameter'); + + $optionsCount = 0; + foreach ($options as $option) { + if ($input->getOption($option)) { + ++$optionsCount; + } + } + + $name = $input->getArgument('name'); + if ((null !== $name) && ($optionsCount > 0)) { + throw new \InvalidArgumentException('The options tags, tag, parameters & parameter can not be combined with the service name argument.'); + } elseif ((null === $name) && $optionsCount > 1) { + throw new \InvalidArgumentException('The options tags, tag, parameters & parameter can not be combined together.'); + } + } + + /** + * Loads the ContainerBuilder from the cache. + * + * @return ContainerBuilder + * + * @throws \LogicException + */ + protected function getContainerBuilder() + { + if ($this->containerBuilder) { + return $this->containerBuilder; + } + + if (!$this->getApplication()->getKernel()->isDebug()) { + throw new \LogicException(sprintf('Debug information about the container is only available in debug mode.')); + } + + if (!is_file($cachedFile = $this->getContainer()->getParameter('debug.container.dump'))) { + throw new \LogicException(sprintf('Debug information about the container could not be found. Please clear the cache and try again.')); + } + + $container = new ContainerBuilder(); + + $loader = new XmlFileLoader($container, new FileLocator()); + $loader->load($cachedFile); + + return $this->containerBuilder = $container; + } + + private function findProperServiceName(InputInterface $input, SymfonyStyle $io, ContainerBuilder $builder, $name) + { + if ($builder->has($name) || !$input->isInteractive()) { + return $name; + } + + $matchingServices = $this->findServiceIdsContaining($builder, $name); + if (empty($matchingServices)) { + throw new \InvalidArgumentException(sprintf('No services found that match "%s".', $name)); + } + + $default = 1 === count($matchingServices) ? $matchingServices[0] : null; + + return $io->choice('Select one of the following services to display its information', $matchingServices, $default); + } + + private function findServiceIdsContaining(ContainerBuilder $builder, $name) + { + $serviceIds = $builder->getServiceIds(); + $foundServiceIds = array(); + $name = strtolower($name); + foreach ($serviceIds as $serviceId) { + if (false === strpos($serviceId, $name)) { + continue; + } + $foundServiceIds[] = $serviceId; + } + + return $foundServiceIds; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..2eb310ddf1701927e2ade604e763ef34dca59008 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.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\Bundle\FrameworkBundle\Command; + +use Symfony\Bundle\FrameworkBundle\Console\Helper\DescriptorHelper; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * A console command for retrieving information about event dispatcher. + * + * @author Matthieu Auger + */ +class EventDispatcherDebugCommand extends ContainerAwareCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('debug:event-dispatcher') + ->setDefinition(array( + new InputArgument('event', InputArgument::OPTIONAL, 'An event name'), + new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), + new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw description'), + )) + ->setDescription('Displays configured listeners for an application') + ->setHelp(<<<'EOF' +The %command.name% command displays all configured listeners: + + php %command.full_name% + +To get specific listeners for an event, specify its name: + + php %command.full_name% kernel.request +EOF + ) + ; + } + + /** + * {@inheritdoc} + * + * @throws \LogicException + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + $dispatcher = $this->getEventDispatcher(); + + $options = array(); + if ($event = $input->getArgument('event')) { + if (!$dispatcher->hasListeners($event)) { + $io->warning(sprintf('The event "%s" does not have any registered listeners.', $event)); + + return; + } + + $options = array('event' => $event); + } + + $helper = new DescriptorHelper(); + $options['format'] = $input->getOption('format'); + $options['raw_text'] = $input->getOption('raw'); + $options['output'] = $io; + $helper->describe($io, $dispatcher, $options); + } + + /** + * Loads the Event Dispatcher from the container. + * + * @return EventDispatcherInterface + */ + protected function getEventDispatcher() + { + return $this->getContainer()->get('event_dispatcher'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..97707e8798b5903c81d602668b100d7635ef5586 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Bundle\FrameworkBundle\Console\Helper\DescriptorHelper; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Routing\RouterInterface; +use Symfony\Component\Routing\Route; + +/** + * A console command for retrieving information about routes. + * + * @author Fabien Potencier + * @author Tobias Schultze + */ +class RouterDebugCommand extends ContainerAwareCommand +{ + /** + * {@inheritdoc} + */ + public function isEnabled() + { + if (!$this->getContainer()->has('router')) { + return false; + } + $router = $this->getContainer()->get('router'); + if (!$router instanceof RouterInterface) { + return false; + } + + return parent::isEnabled(); + } + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('debug:router') + ->setDefinition(array( + new InputArgument('name', InputArgument::OPTIONAL, 'A route name'), + new InputOption('show-controllers', null, InputOption::VALUE_NONE, 'Show assigned controllers in overview'), + new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), + new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw route(s)'), + )) + ->setDescription('Displays current routes for an application') + ->setHelp(<<<'EOF' +The %command.name% displays the configured routes: + + php %command.full_name% + +EOF + ) + ; + } + + /** + * {@inheritdoc} + * + * @throws \InvalidArgumentException When route does not exist + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + $name = $input->getArgument('name'); + $helper = new DescriptorHelper(); + $routes = $this->getContainer()->get('router')->getRouteCollection(); + + if ($name) { + if (!$route = $routes->get($name)) { + throw new \InvalidArgumentException(sprintf('The route "%s" does not exist.', $name)); + } + + $this->convertController($route); + + $helper->describe($io, $route, array( + 'format' => $input->getOption('format'), + 'raw_text' => $input->getOption('raw'), + 'name' => $name, + 'output' => $io, + )); + } else { + foreach ($routes as $route) { + $this->convertController($route); + } + + $helper->describe($io, $routes, array( + 'format' => $input->getOption('format'), + 'raw_text' => $input->getOption('raw'), + 'show_controllers' => $input->getOption('show-controllers'), + 'output' => $io, + )); + } + } + + private function convertController(Route $route) + { + $nameParser = $this->getContainer()->get('controller_name_converter'); + if ($route->hasDefault('_controller')) { + try { + $route->setDefault('_controller', $nameParser->build($route->getDefault('_controller'))); + } catch (\InvalidArgumentException $e) { + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..2e23ad72c2aef8f250d5c239a7ca75101a794c1d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Routing\RouterInterface; +use Symfony\Component\Routing\Matcher\TraceableUrlMatcher; + +/** + * A console command to test route matching. + * + * @author Fabien Potencier + */ +class RouterMatchCommand extends ContainerAwareCommand +{ + /** + * {@inheritdoc} + */ + public function isEnabled() + { + if (!$this->getContainer()->has('router')) { + return false; + } + $router = $this->getContainer()->get('router'); + if (!$router instanceof RouterInterface) { + return false; + } + + return parent::isEnabled(); + } + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('router:match') + ->setDefinition(array( + new InputArgument('path_info', InputArgument::REQUIRED, 'A path info'), + new InputOption('method', null, InputOption::VALUE_REQUIRED, 'Sets the HTTP method'), + new InputOption('scheme', null, InputOption::VALUE_REQUIRED, 'Sets the URI scheme (usually http or https)'), + new InputOption('host', null, InputOption::VALUE_REQUIRED, 'Sets the URI host'), + )) + ->setDescription('Helps debug routes by simulating a path info match') + ->setHelp(<<<'EOF' +The %command.name% shows which routes match a given request and which don't and for what reason: + + php %command.full_name% /foo + +or + + php %command.full_name% /foo --method POST --scheme https --host symfony.com --verbose + +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + + $router = $this->getContainer()->get('router'); + $context = $router->getContext(); + if (null !== $method = $input->getOption('method')) { + $context->setMethod($method); + } + if (null !== $scheme = $input->getOption('scheme')) { + $context->setScheme($scheme); + } + if (null !== $host = $input->getOption('host')) { + $context->setHost($host); + } + + $matcher = new TraceableUrlMatcher($router->getRouteCollection(), $context); + + $traces = $matcher->getTraces($input->getArgument('path_info')); + + $io->newLine(); + + $matches = false; + foreach ($traces as $trace) { + if (TraceableUrlMatcher::ROUTE_ALMOST_MATCHES == $trace['level']) { + $io->text(sprintf('Route "%s" almost matches but %s', $trace['name'], lcfirst($trace['log']))); + } elseif (TraceableUrlMatcher::ROUTE_MATCHES == $trace['level']) { + $io->success(sprintf('Route "%s" matches', $trace['name'])); + + $routerDebugCommand = $this->getApplication()->find('debug:router'); + $routerDebugCommand->run(new ArrayInput(array('name' => $trace['name'])), $output); + + $matches = true; + } elseif ($input->getOption('verbose')) { + $io->text(sprintf('Route "%s" does not match: %s', $trace['name'], $trace['log'])); + } + } + + if (!$matches) { + $io->error(sprintf('None of the routes match the path "%s"', $input->getArgument('path_info'))); + + return 1; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..72584377d7abfa5aa75e4cffe137ad9c2b89fc57 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +/** + * Base methods for commands related to PHP's built-in web server. + * + * @author Christian Flothmann + */ +abstract class ServerCommand extends ContainerAwareCommand +{ + /** + * {@inheritdoc} + */ + public function isEnabled() + { + if (defined('HHVM_VERSION')) { + return false; + } + + if (!class_exists('Symfony\Component\Process\Process')) { + return false; + } + + return parent::isEnabled(); + } + + /** + * Determines the name of the lock file for a particular PHP web server process. + * + * @param string $address An address/port tuple + * + * @return string The filename + */ + protected function getLockFile($address) + { + return sys_get_temp_dir().'/'.strtr($address, '.:', '--').'.pid'; + } + + protected function isOtherServerProcessRunning($address) + { + $lockFile = $this->getLockFile($address); + + if (file_exists($lockFile)) { + return true; + } + + $pos = strrpos($address, ':'); + $hostname = substr($address, 0, $pos); + $port = substr($address, $pos + 1); + + $fp = @fsockopen($hostname, $port, $errno, $errstr, 5); + + if (false !== $fp) { + fclose($fp); + + return true; + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..e7dec312f99ba594be480deab997a38e4274e3bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.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\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Process\PhpExecutableFinder; +use Symfony\Component\Process\Process; +use Symfony\Component\Process\ProcessBuilder; +use Symfony\Component\Process\Exception\RuntimeException; + +/** + * Runs Symfony application using PHP built-in web server. + * + * @author Michał Pipa + */ +class ServerRunCommand extends ServerCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setDefinition(array( + new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1'), + new InputOption('port', 'p', InputOption::VALUE_REQUIRED, 'Address port number', '8000'), + new InputOption('docroot', 'd', InputOption::VALUE_REQUIRED, 'Document root', null), + new InputOption('router', 'r', InputOption::VALUE_REQUIRED, 'Path to custom router script'), + )) + ->setName('server:run') + ->setDescription('Runs PHP built-in web server') + ->setHelp(<<<'EOF' +The %command.name% runs PHP built-in web server: + + %command.full_name% + +To change default bind address and port use the address argument: + + %command.full_name% 127.0.0.1:8080 + +To change default docroot directory use the --docroot option: + + %command.full_name% --docroot=htdocs/ + +If you have custom docroot directory layout, you can specify your own +router script using --router option: + + %command.full_name% --router=app/config/router.php + +Specifing a router script is required when the used environment is not "dev", +"prod", or "test". + +See also: http://www.php.net/manual/en/features.commandline.webserver.php + +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + $documentRoot = $input->getOption('docroot'); + + if (null === $documentRoot) { + $documentRoot = $this->getContainer()->getParameter('kernel.root_dir').'/../web'; + } + + if (!is_dir($documentRoot)) { + $io->error(sprintf('The given document root directory "%s" does not exist', $documentRoot)); + + return 1; + } + + $env = $this->getContainer()->getParameter('kernel.environment'); + $address = $input->getArgument('address'); + + if (false === strpos($address, ':')) { + $address = $address.':'.$input->getOption('port'); + } + + if ($this->isOtherServerProcessRunning($address)) { + $io->error(sprintf('A process is already listening on http://%s.', $address)); + + return 1; + } + + if ('prod' === $env) { + $io->error('Running PHP built-in server in production environment is NOT recommended!'); + } + + $io->success(sprintf('Server running on http://%s', $address)); + $io->comment('Quit the server with CONTROL-C.'); + + if (null === $builder = $this->createPhpProcessBuilder($io, $address, $input->getOption('router'), $env)) { + return 1; + } + + $builder->setWorkingDirectory($documentRoot); + $builder->setTimeout(null); + $process = $builder->getProcess(); + $callback = null; + + if (OutputInterface::VERBOSITY_NORMAL > $output->getVerbosity()) { + $process->disableOutput(); + } else { + try { + $process->setTty(true); + } catch (RuntimeException $e) { + $callback = function ($type, $buffer) use ($output) { + if (Process::ERR === $type && $output instanceof ConsoleOutputInterface) { + $output = $output->getErrorOutput(); + } + $output->write($buffer, false, OutputInterface::OUTPUT_RAW); + }; + } + } + $process->run($callback); + + if (!$process->isSuccessful()) { + $errorMessages = array('Built-in server terminated unexpectedly.'); + + if ($process->isOutputDisabled()) { + $errorMessages[] = 'Run the command again with -v option for more details.'; + } + + $io->error($errorMessages); + } + + return $process->getExitCode(); + } + + private function createPhpProcessBuilder(SymfonyStyle $io, $address, $router, $env) + { + $router = $router ?: $this + ->getContainer() + ->get('kernel') + ->locateResource(sprintf('@FrameworkBundle/Resources/config/router_%s.php', $env)) + ; + + if (!file_exists($router)) { + $io->error(sprintf('The given router script "%s" does not exist.', $router)); + + return; + } + + $router = realpath($router); + $finder = new PhpExecutableFinder(); + + if (false === $binary = $finder->find()) { + $io->error('Unable to find PHP binary to run server.'); + + return; + } + + return new ProcessBuilder(array($binary, '-S', $address, $router)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..5e2f273ac8784dd43f445d949086de209bd33e84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php @@ -0,0 +1,234 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Process\PhpExecutableFinder; +use Symfony\Component\Process\Process; + +/** + * Runs PHP's built-in web server in a background process. + * + * @author Christian Flothmann + */ +class ServerStartCommand extends ServerCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setDefinition(array( + new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1'), + new InputOption('port', 'p', InputOption::VALUE_REQUIRED, 'Address port number', '8000'), + new InputOption('docroot', 'd', InputOption::VALUE_REQUIRED, 'Document root', null), + new InputOption('router', 'r', InputOption::VALUE_REQUIRED, 'Path to custom router script'), + new InputOption('force', 'f', InputOption::VALUE_NONE, 'Force web server startup'), + )) + ->setName('server:start') + ->setDescription('Starts PHP built-in web server in the background') + ->setHelp(<<<'EOF' +The %command.name% runs PHP's built-in web server: + + php %command.full_name% + +To change the default bind address and the default port use the address argument: + + php %command.full_name% 127.0.0.1:8080 + +To change the default document root directory use the --docroot option: + + php %command.full_name% --docroot=htdocs/ + +If you have a custom document root directory layout, you can specify your own +router script using the --router option: + + php %command.full_name% --router=app/config/router.php + +Specifying a router script is required when the used environment is not "dev" or +"prod". + +See also: http://www.php.net/manual/en/features.commandline.webserver.php + +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $cliOutput = $output); + + if (!extension_loaded('pcntl')) { + $io->error(array( + 'This command needs the pcntl extension to run.', + 'You can either install it or use the "server:run" command instead to run the built-in web server.', + )); + + if ($io->ask('Do you want to execute server:run immediately? [Yn] ', true)) { + $command = $this->getApplication()->find('server:run'); + + return $command->run($input, $cliOutput); + } + + return 1; + } + + $documentRoot = $input->getOption('docroot'); + + if (null === $documentRoot) { + $documentRoot = $this->getContainer()->getParameter('kernel.root_dir').'/../web'; + } + + if (!is_dir($documentRoot)) { + $io->error(sprintf('The given document root directory "%s" does not exist.', $documentRoot)); + + return 1; + } + + $env = $this->getContainer()->getParameter('kernel.environment'); + + if (false === $router = $this->determineRouterScript($input->getOption('router'), $env, $io)) { + return 1; + } + + $address = $input->getArgument('address'); + + if (false === strpos($address, ':')) { + $address = $address.':'.$input->getOption('port'); + } + + if (!$input->getOption('force') && $this->isOtherServerProcessRunning($address)) { + $io->error(array( + sprintf('A process is already listening on http://%s.', $address), + 'Use the --force option if the server process terminated unexpectedly to start a new web server process.', + )); + + return 1; + } + + if ('prod' === $env) { + $io->error('Running PHP built-in server in production environment is NOT recommended!'); + } + + $pid = pcntl_fork(); + + if ($pid < 0) { + $io->error('Unable to start the server process.'); + + return 1; + } + + if ($pid > 0) { + $io->success(sprintf('Web server listening on http://%s', $address)); + + return; + } + + if (posix_setsid() < 0) { + $io->error('Unable to set the child process as session leader'); + + return 1; + } + + if (null === $process = $this->createServerProcess($io, $address, $documentRoot, $router)) { + return 1; + } + + $process->disableOutput(); + $process->start(); + $lockFile = $this->getLockFile($address); + touch($lockFile); + + if (!$process->isRunning()) { + $io->error('Unable to start the server process'); + unlink($lockFile); + + return 1; + } + + // stop the web server when the lock file is removed + while ($process->isRunning()) { + if (!file_exists($lockFile)) { + $process->stop(); + } + + sleep(1); + } + } + + /** + * Determine the absolute file path for the router script, using the environment to choose a standard script + * if no custom router script is specified. + * + * @param string|null $router File path of the custom router script, if set by the user; otherwise null + * @param string $env The application environment + * @param SymfonyStyle $io An SymfonyStyle instance + * + * @return string|bool The absolute file path of the router script, or false on failure + */ + private function determineRouterScript($router, $env, SymfonyStyle $io) + { + if (null === $router) { + $router = $this + ->getContainer() + ->get('kernel') + ->locateResource(sprintf('@FrameworkBundle/Resources/config/router_%s.php', $env)) + ; + } + + if (false === $path = realpath($router)) { + $io->error(sprintf('The given router script "%s" does not exist.', $router)); + + return false; + } + + return $path; + } + + /** + * Creates a process to start PHP's built-in web server. + * + * @param SymfonyStyle $io A SymfonyStyle instance + * @param string $address IP address and port to listen to + * @param string $documentRoot The application's document root + * @param string $router The router filename + * + * @return Process The process + */ + private function createServerProcess(SymfonyStyle $io, $address, $documentRoot, $router) + { + $finder = new PhpExecutableFinder(); + if (false === $binary = $finder->find()) { + $io->error('Unable to find PHP binary to start server.'); + + return; + } + + $script = implode(' ', array_map(array('Symfony\Component\Process\ProcessUtils', 'escapeArgument'), array( + $binary, + '-S', + $address, + $router, + ))); + + return new Process('exec '.$script, $documentRoot, null, null, null); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerStatusCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerStatusCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..d7cb9e7d0819751f4cb2ea0694b271667a607900 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerStatusCommand.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; + +/** + * Shows the status of a process that is running PHP's built-in web server in + * the background. + * + * @author Christian Flothmann + */ +class ServerStatusCommand extends ServerCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setDefinition(array( + new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1:8000'), + new InputOption('port', 'p', InputOption::VALUE_REQUIRED, 'Address port number', '8000'), + )) + ->setName('server:status') + ->setDescription('Outputs the status of the built-in web server for the given address') + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + $address = $input->getArgument('address'); + + if (false === strpos($address, ':')) { + $address = $address.':'.$input->getOption('port'); + } + + // remove an orphaned lock file + if (file_exists($this->getLockFile($address)) && !$this->isServerRunning($address)) { + unlink($this->getLockFile($address)); + } + + if (file_exists($this->getLockFile($address))) { + $io->success(sprintf('Web server still listening on http://%s', $address)); + } else { + $io->warning(sprintf('No web server is listening on http://%s', $address)); + } + } + + private function isServerRunning($address) + { + list($hostname, $port) = explode(':', $address); + + if (false !== $fp = @fsockopen($hostname, $port, $errno, $errstr, 1)) { + fclose($fp); + + return true; + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..8f79978a9a8454734ffd66e65259c5ad68764ca9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Style\SymfonyStyle; + +/** + * Stops a background process running PHP's built-in web server. + * + * @author Christian Flothmann + */ +class ServerStopCommand extends ServerCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setDefinition(array( + new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1'), + new InputOption('port', 'p', InputOption::VALUE_REQUIRED, 'Address port number', '8000'), + )) + ->setName('server:stop') + ->setDescription('Stops PHP\'s built-in web server that was started with the server:start command') + ->setHelp(<<<'EOF' +The %command.name% stops PHP's built-in web server: + + php %command.full_name% + +To change the default bind address and the default port use the address argument: + + php %command.full_name% 127.0.0.1:8080 + +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + + $address = $input->getArgument('address'); + if (false === strpos($address, ':')) { + $address = $address.':'.$input->getOption('port'); + } + + $lockFile = $this->getLockFile($address); + + if (!file_exists($lockFile)) { + $io->error(sprintf('No web server is listening on http://%s', $address)); + + return 1; + } + + unlink($lockFile); + $io->success(sprintf('Stopped the web server listening on http://%s', $address)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..299045d126b32648fe1299c9b8d435106f16c6a7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php @@ -0,0 +1,331 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Translation\Catalogue\MergeOperation; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\DataCollectorTranslator; +use Symfony\Component\Translation\LoggingTranslator; + +/** + * Helps finding unused or missing translation messages in a given locale + * and comparing them with the fallback ones. + * + * @author Florian Voutzinos + */ +class TranslationDebugCommand extends ContainerAwareCommand +{ + const MESSAGE_MISSING = 0; + const MESSAGE_UNUSED = 1; + const MESSAGE_EQUALS_FALLBACK = 2; + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('debug:translation') + ->setDefinition(array( + new InputArgument('locale', InputArgument::REQUIRED, 'The locale'), + new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages, defaults to app/Resources folder'), + new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'The messages domain'), + new InputOption('only-missing', null, InputOption::VALUE_NONE, 'Displays only missing messages'), + new InputOption('only-unused', null, InputOption::VALUE_NONE, 'Displays only unused messages'), + new InputOption('all', null, InputOption::VALUE_NONE, 'Load messages from all registered bundles'), + )) + ->setDescription('Displays translation messages information') + ->setHelp(<<<'EOF' +The %command.name% command helps finding unused or missing translation +messages and comparing them with the fallback ones by inspecting the +templates and translation files of a given bundle or the app folder. + +You can display information about bundle translations in a specific locale: + + php %command.full_name% en AcmeDemoBundle + +You can also specify a translation domain for the search: + + php %command.full_name% --domain=messages en AcmeDemoBundle + +You can only display missing messages: + + php %command.full_name% --only-missing en AcmeDemoBundle + +You can only display unused messages: + + php %command.full_name% --only-unused en AcmeDemoBundle + +You can display information about app translations in a specific locale: + + php %command.full_name% en + +You can display information about translations in all registered bundles in a specific locale: + + php %command.full_name% --all en + +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + public function isEnabled() + { + if (!class_exists('Symfony\Component\Translation\Translator')) { + return false; + } + + return parent::isEnabled(); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + + $locale = $input->getArgument('locale'); + $domain = $input->getOption('domain'); + /** @var TranslationLoader $loader */ + $loader = $this->getContainer()->get('translation.loader'); + /** @var Kernel $kernel */ + $kernel = $this->getContainer()->get('kernel'); + + // Define Root Path to App folder + $transPaths = array($kernel->getRootDir().'/Resources/'); + + // Override with provided Bundle info + if (null !== $input->getArgument('bundle')) { + try { + $bundle = $kernel->getBundle($input->getArgument('bundle')); + $transPaths = array( + $bundle->getPath().'/Resources/', + sprintf('%s/Resources/%s/', $kernel->getRootDir(), $bundle->getName()), + ); + } catch (\InvalidArgumentException $e) { + // such a bundle does not exist, so treat the argument as path + $transPaths = array($input->getArgument('bundle').'/Resources/'); + + if (!is_dir($transPaths[0])) { + throw new \InvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.', $transPaths[0])); + } + } + } elseif ($input->getOption('all')) { + foreach ($kernel->getBundles() as $bundle) { + $transPaths[] = $bundle->getPath().'/Resources/'; + $transPaths[] = sprintf('%s/Resources/%s/', $kernel->getRootDir(), $bundle->getName()); + } + } + + // Extract used messages + $extractedCatalogue = $this->extractMessages($locale, $transPaths); + + // Load defined messages + $currentCatalogue = $this->loadCurrentMessages($locale, $transPaths, $loader); + + // Merge defined and extracted messages to get all message ids + $mergeOperation = new MergeOperation($extractedCatalogue, $currentCatalogue); + $allMessages = $mergeOperation->getResult()->all($domain); + if (null !== $domain) { + $allMessages = array($domain => $allMessages); + } + + // No defined or extracted messages + if (empty($allMessages) || null !== $domain && empty($allMessages[$domain])) { + $outputMessage = sprintf('No defined or extracted messages for locale "%s"', $locale); + + if (null !== $domain) { + $outputMessage .= sprintf(' and domain "%s"', $domain); + } + + $io->warning($outputMessage); + + return; + } + + // Load the fallback catalogues + $fallbackCatalogues = $this->loadFallbackCatalogues($locale, $transPaths, $loader); + + // Display header line + $headers = array('State', 'Domain', 'Id', sprintf('Message Preview (%s)', $locale)); + foreach ($fallbackCatalogues as $fallbackCatalogue) { + $headers[] = sprintf('Fallback Message Preview (%s)', $fallbackCatalogue->getLocale()); + } + $rows = array(); + // Iterate all message ids and determine their state + foreach ($allMessages as $domain => $messages) { + foreach (array_keys($messages) as $messageId) { + $value = $currentCatalogue->get($messageId, $domain); + $states = array(); + + if ($extractedCatalogue->defines($messageId, $domain)) { + if (!$currentCatalogue->defines($messageId, $domain)) { + $states[] = self::MESSAGE_MISSING; + } + } elseif ($currentCatalogue->defines($messageId, $domain)) { + $states[] = self::MESSAGE_UNUSED; + } + + if (!in_array(self::MESSAGE_UNUSED, $states) && true === $input->getOption('only-unused') + || !in_array(self::MESSAGE_MISSING, $states) && true === $input->getOption('only-missing')) { + continue; + } + + foreach ($fallbackCatalogues as $fallbackCatalogue) { + if ($fallbackCatalogue->defines($messageId, $domain) && $value === $fallbackCatalogue->get($messageId, $domain)) { + $states[] = self::MESSAGE_EQUALS_FALLBACK; + + break; + } + } + + $row = array($this->formatStates($states), $domain, $this->formatId($messageId), $this->sanitizeString($value)); + foreach ($fallbackCatalogues as $fallbackCatalogue) { + $row[] = $this->sanitizeString($fallbackCatalogue->get($messageId, $domain)); + } + + $rows[] = $row; + } + } + + $io->table($headers, $rows); + } + + private function formatState($state) + { + if (self::MESSAGE_MISSING === $state) { + return ' missing '; + } + + if (self::MESSAGE_UNUSED === $state) { + return ' unused '; + } + + if (self::MESSAGE_EQUALS_FALLBACK === $state) { + return ' fallback '; + } + + return $state; + } + + private function formatStates(array $states) + { + $result = array(); + foreach ($states as $state) { + $result[] = $this->formatState($state); + } + + return implode(' ', $result); + } + + private function formatId($id) + { + return sprintf('%s', $id); + } + + private function sanitizeString($string, $length = 40) + { + $string = trim(preg_replace('/\s+/', ' ', $string)); + + if (false !== $encoding = mb_detect_encoding($string, null, true)) { + if (mb_strlen($string, $encoding) > $length) { + return mb_substr($string, 0, $length - 3, $encoding).'...'; + } + } elseif (strlen($string) > $length) { + return substr($string, 0, $length - 3).'...'; + } + + return $string; + } + + /** + * @param string $locale + * @param array $transPaths + * + * @return MessageCatalogue + */ + private function extractMessages($locale, $transPaths) + { + $extractedCatalogue = new MessageCatalogue($locale); + foreach ($transPaths as $path) { + $path = $path.'views'; + if (is_dir($path)) { + $this->getContainer()->get('translation.extractor')->extract($path, $extractedCatalogue); + } + } + + return $extractedCatalogue; + } + + /** + * @param string $locale + * @param array $transPaths + * @param TranslationLoader $loader + * + * @return MessageCatalogue + */ + private function loadCurrentMessages($locale, $transPaths, TranslationLoader $loader) + { + $currentCatalogue = new MessageCatalogue($locale); + foreach ($transPaths as $path) { + $path = $path.'translations'; + if (is_dir($path)) { + $loader->loadMessages($path, $currentCatalogue); + } + } + + return $currentCatalogue; + } + + /** + * @param string $locale + * @param array $transPaths + * @param TranslationLoader $loader + * + * @return MessageCatalogue[] + */ + private function loadFallbackCatalogues($locale, $transPaths, TranslationLoader $loader) + { + $fallbackCatalogues = array(); + $translator = $this->getContainer()->get('translator'); + if ($translator instanceof Translator || $translator instanceof DataCollectorTranslator || $translator instanceof LoggingTranslator) { + foreach ($translator->getFallbackLocales() as $fallbackLocale) { + if ($fallbackLocale === $locale) { + continue; + } + + $fallbackCatalogue = new MessageCatalogue($fallbackLocale); + foreach ($transPaths as $path) { + $path = $path.'translations'; + if (is_dir($path)) { + $loader->loadMessages($path, $fallbackCatalogue); + } + } + $fallbackCatalogues[] = $fallbackCatalogue; + } + } + + return $fallbackCatalogues; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..c2083e034e32cac517e95388e9a9cf2f1b81ad08 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php @@ -0,0 +1,256 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Translation\Catalogue\TargetOperation; +use Symfony\Component\Translation\Catalogue\MergeOperation; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Translation\MessageCatalogue; + +/** + * A command that parses templates to extract translation messages and adds them + * into the translation files. + * + * @author Michel Salib + */ +class TranslationUpdateCommand extends ContainerAwareCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('translation:update') + ->setDefinition(array( + new InputArgument('locale', InputArgument::REQUIRED, 'The locale'), + new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages, defaults to app/Resources folder'), + new InputOption('prefix', null, InputOption::VALUE_OPTIONAL, 'Override the default prefix', '__'), + new InputOption('no-prefix', null, InputOption::VALUE_NONE, 'If set, no prefix is added to the translations'), + new InputOption('output-format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format', 'yml'), + new InputOption('dump-messages', null, InputOption::VALUE_NONE, 'Should the messages be dumped in the console'), + new InputOption('force', null, InputOption::VALUE_NONE, 'Should the update be done'), + new InputOption('no-backup', null, InputOption::VALUE_NONE, 'Should backup be disabled'), + new InputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'), + new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'Specify the domain to update'), + )) + ->setDescription('Updates the translation file') + ->setHelp(<<<'EOF' +The %command.name% command extracts translation strings from templates +of a given bundle or the app folder. It can display them or merge the new ones into the translation files. + +When new translation strings are found it can automatically add a prefix to the translation +message. + +Example running against a Bundle (AcmeBundle) + php %command.full_name% --dump-messages en AcmeBundle + php %command.full_name% --force --prefix="new_" fr AcmeBundle + +Example running against app messages (app/Resources folder) + php %command.full_name% --dump-messages en + php %command.full_name% --force --prefix="new_" fr +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + public function isEnabled() + { + if (!class_exists('Symfony\Component\Translation\Translator')) { + return false; + } + + return parent::isEnabled(); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + + // check presence of force or dump-message + if ($input->getOption('force') !== true && $input->getOption('dump-messages') !== true) { + $io->error('You must choose one of --force or --dump-messages'); + + return 1; + } + + // check format + $writer = $this->getContainer()->get('translation.writer'); + $supportedFormats = $writer->getFormats(); + if (!in_array($input->getOption('output-format'), $supportedFormats)) { + $io->error(array('Wrong output format', 'Supported formats are: '.implode(', ', $supportedFormats).'.')); + + return 1; + } + $kernel = $this->getContainer()->get('kernel'); + + // Define Root Path to App folder + $transPaths = array($kernel->getRootDir().'/Resources/'); + $currentName = 'app folder'; + + // Override with provided Bundle info + if (null !== $input->getArgument('bundle')) { + try { + $foundBundle = $kernel->getBundle($input->getArgument('bundle')); + $transPaths = array( + $foundBundle->getPath().'/Resources/', + sprintf('%s/Resources/%s/', $kernel->getRootDir(), $foundBundle->getName()), + ); + $currentName = $foundBundle->getName(); + } catch (\InvalidArgumentException $e) { + // such a bundle does not exist, so treat the argument as path + $transPaths = array($input->getArgument('bundle').'/Resources/'); + $currentName = $transPaths[0]; + + if (!is_dir($transPaths[0])) { + throw new \InvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.', $transPaths[0])); + } + } + } + + $io->title('Translation Messages Extractor and Dumper'); + $io->comment(sprintf('Generating "%s" translation files for "%s"', $input->getArgument('locale'), $currentName)); + + // load any messages from templates + $extractedCatalogue = new MessageCatalogue($input->getArgument('locale')); + $io->comment('Parsing templates...'); + $extractor = $this->getContainer()->get('translation.extractor'); + $extractor->setPrefix($input->getOption('no-prefix') ? '' : $input->getOption('prefix')); + foreach ($transPaths as $path) { + $path .= 'views'; + if (is_dir($path)) { + $extractor->extract($path, $extractedCatalogue); + } + } + + // load any existing messages from the translation files + $currentCatalogue = new MessageCatalogue($input->getArgument('locale')); + $io->comment('Loading translation files...'); + $loader = $this->getContainer()->get('translation.loader'); + foreach ($transPaths as $path) { + $path .= 'translations'; + if (is_dir($path)) { + $loader->loadMessages($path, $currentCatalogue); + } + } + + if (null !== $domain = $input->getOption('domain')) { + $currentCatalogue = $this->filterCatalogue($currentCatalogue, $domain); + $extractedCatalogue = $this->filterCatalogue($extractedCatalogue, $domain); + } + + // process catalogues + $operation = $input->getOption('clean') + ? new TargetOperation($currentCatalogue, $extractedCatalogue) + : new MergeOperation($currentCatalogue, $extractedCatalogue); + + // Exit if no messages found. + if (!count($operation->getDomains())) { + $io->warning('No translation messages were found.'); + + return; + } + + $resultMessage = 'Translation files were successfully updated'; + + // show compiled list of messages + if (true === $input->getOption('dump-messages')) { + $extractedMessagesCount = 0; + $io->newLine(); + foreach ($operation->getDomains() as $domain) { + $newKeys = array_keys($operation->getNewMessages($domain)); + $allKeys = array_keys($operation->getMessages($domain)); + + $list = array_merge( + array_diff($allKeys, $newKeys), + array_map(function ($id) { + return sprintf('%s', $id); + }, $newKeys), + array_map(function ($id) { + return sprintf('%s', $id); + }, array_keys($operation->getObsoleteMessages($domain))) + ); + + $domainMessagesCount = count($list); + + $io->section(sprintf('Messages extracted for domain "%s" (%d message%s)', $domain, $domainMessagesCount, $domainMessagesCount > 1 ? 's' : '')); + $io->listing($list); + + $extractedMessagesCount += $domainMessagesCount; + } + + if ($input->getOption('output-format') == 'xlf') { + $io->comment('Xliff output version is 1.2'); + } + + $resultMessage = sprintf('%d message%s successfully extracted', $extractedMessagesCount, $extractedMessagesCount > 1 ? 's were' : ' was'); + } + + if ($input->getOption('no-backup') === true) { + $writer->disableBackup(); + } + + // save the files + if ($input->getOption('force') === true) { + $io->comment('Writing files...'); + + $bundleTransPath = false; + foreach ($transPaths as $path) { + $path .= 'translations'; + if (is_dir($path)) { + $bundleTransPath = $path; + } + } + + if (!$bundleTransPath) { + $bundleTransPath = end($transPaths).'translations'; + } + + $writer->writeTranslations($operation->getResult(), $input->getOption('output-format'), array('path' => $bundleTransPath, 'default_locale' => $this->getContainer()->getParameter('kernel.default_locale'))); + + if (true === $input->getOption('dump-messages')) { + $resultMessage .= ' and translation files were updated'; + } + } + + $io->success($resultMessage.'.'); + } + + private function filterCatalogue(MessageCatalogue $catalogue, $domain) + { + $filteredCatalogue = new MessageCatalogue($catalogue->getLocale()); + + if ($messages = $catalogue->all($domain)) { + $filteredCatalogue->add($messages, $domain); + } + foreach ($catalogue->getResources() as $resource) { + $filteredCatalogue->addResource($resource); + } + if ($metadata = $catalogue->getMetadata('', $domain)) { + foreach ($metadata as $k => $v) { + $filteredCatalogue->setMetadata($k, $v, $domain); + } + } + + return $filteredCatalogue; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..0287f42a8ed4dfb44f0640bce1d0171cde70c4b5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Workflow\Dumper\GraphvizDumper; +use Symfony\Component\Workflow\Dumper\StateMachineGraphvizDumper; +use Symfony\Component\Workflow\Marking; + +/** + * @author Grégoire Pineau + */ +class WorkflowDumpCommand extends ContainerAwareCommand +{ + public function isEnabled() + { + return $this->getContainer()->has('workflow.registry'); + } + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('workflow:dump') + ->setDefinition(array( + new InputArgument('name', InputArgument::REQUIRED, 'A workflow name'), + new InputArgument('marking', InputArgument::IS_ARRAY, 'A marking (a list of places)'), + )) + ->setDescription('Dump a workflow') + ->setHelp(<<<'EOF' +The %command.name% command dumps the graphical representation of a +workflow in DOT format + + %command.full_name% | dot -Tpng > workflow.png + +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $container = $this->getContainer(); + $serviceId = $input->getArgument('name'); + if ($container->has('workflow.'.$serviceId)) { + $workflow = $container->get('workflow.'.$serviceId); + $dumper = new GraphvizDumper(); + } elseif ($container->has('state_machine.'.$serviceId)) { + $workflow = $container->get('state_machine.'.$serviceId); + $dumper = new StateMachineGraphvizDumper(); + } else { + throw new \InvalidArgumentException(sprintf('No service found for "workflow.%1$s" nor "state_machine.%1$s".', $serviceId)); + } + + $marking = new Marking(); + + foreach ($input->getArgument('marking') as $place) { + $marking->mark($place); + } + + $output->writeln($dumper->dump($workflow->getDefinition(), $marking)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..41551acc3dc7aacc8174f50d91d22a6bfcf85e81 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Yaml\Command\LintCommand as BaseLintCommand; + +/** + * Validates YAML files syntax and outputs encountered errors. + * + * @author Grégoire Pineau + * @author Robin Chalas + */ +class YamlLintCommand extends Command +{ + private $command; + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this->setName('lint:yaml'); + + if (!$this->isEnabled()) { + return; + } + + $directoryIteratorProvider = function ($directory, $default) { + if (!is_dir($directory)) { + $directory = $this->getApplication()->getKernel()->locateResource($directory); + } + + return $default($directory); + }; + + $isReadableProvider = function ($fileOrDirectory, $default) { + return 0 === strpos($fileOrDirectory, '@') || $default($fileOrDirectory); + }; + + $this->command = new BaseLintCommand(null, $directoryIteratorProvider, $isReadableProvider); + + $this + ->setDescription($this->command->getDescription()) + ->setDefinition($this->command->getDefinition()) + ->setHelp($this->command->getHelp().<<<'EOF' + +Or find all files in a bundle: + + php %command.full_name% @AcmeDemoBundle + +EOF + ); + } + + /** + * {@inheritdoc} + */ + public function isEnabled() + { + return class_exists(BaseLintCommand::class) && parent::isEnabled(); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + return $this->command->execute($input, $output); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php new file mode 100644 index 0000000000000000000000000000000000000000..da28fc0294af2d0ab424cf695c642e527867a509 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php @@ -0,0 +1,145 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Console; + +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\Console\Application as BaseApplication; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\HttpKernel\KernelInterface; +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\HttpKernel\Bundle\Bundle; + +/** + * Application. + * + * @author Fabien Potencier + */ +class Application extends BaseApplication +{ + private $kernel; + private $commandsRegistered = false; + + /** + * Constructor. + * + * @param KernelInterface $kernel A KernelInterface instance + */ + public function __construct(KernelInterface $kernel) + { + $this->kernel = $kernel; + + parent::__construct('Symfony', Kernel::VERSION); + + $this->getDefinition()->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The environment name', $kernel->getEnvironment())); + $this->getDefinition()->addOption(new InputOption('--no-debug', null, InputOption::VALUE_NONE, 'Switches off debug mode')); + } + + /** + * Gets the Kernel associated with this Console. + * + * @return KernelInterface A KernelInterface instance + */ + public function getKernel() + { + return $this->kernel; + } + + /** + * Runs the current application. + * + * @param InputInterface $input An Input instance + * @param OutputInterface $output An Output instance + * + * @return int 0 if everything went fine, or an error code + */ + public function doRun(InputInterface $input, OutputInterface $output) + { + $this->kernel->boot(); + + $container = $this->kernel->getContainer(); + + foreach ($this->all() as $command) { + if ($command instanceof ContainerAwareInterface) { + $command->setContainer($container); + } + } + + $this->setDispatcher($container->get('event_dispatcher')); + + return parent::doRun($input, $output); + } + + /** + * {@inheritdoc} + */ + public function find($name) + { + $this->registerCommands(); + + return parent::find($name); + } + + /** + * {@inheritdoc} + */ + public function get($name) + { + $this->registerCommands(); + + return parent::get($name); + } + + /** + * {@inheritdoc} + */ + public function all($namespace = null) + { + $this->registerCommands(); + + return parent::all($namespace); + } + + /** + * {@inheritdoc} + */ + public function getLongVersion() + { + return parent::getLongVersion().sprintf(' (kernel: %s, env: %s, debug: %s)', $this->kernel->getName(), $this->kernel->getEnvironment(), $this->kernel->isDebug() ? 'true' : 'false'); + } + + protected function registerCommands() + { + if ($this->commandsRegistered) { + return; + } + + $this->commandsRegistered = true; + + $this->kernel->boot(); + + $container = $this->kernel->getContainer(); + + foreach ($this->kernel->getBundles() as $bundle) { + if ($bundle instanceof Bundle) { + $bundle->registerCommands($this); + } + } + + if ($container->hasParameter('console.command.ids')) { + foreach ($container->getParameter('console.command.ids') as $id) { + $this->add($container->get($id)); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php new file mode 100644 index 0000000000000000000000000000000000000000..95c93246624906f2fd32f27cc96086bf5270f6b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php @@ -0,0 +1,312 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; + +use Symfony\Component\Console\Descriptor\DescriptorInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +/** + * @author Jean-François Simon + * + * @internal + */ +abstract class Descriptor implements DescriptorInterface +{ + /** + * @var OutputInterface + */ + protected $output; + + /** + * {@inheritdoc} + */ + public function describe(OutputInterface $output, $object, array $options = array()) + { + $this->output = $output; + + switch (true) { + case $object instanceof RouteCollection: + $this->describeRouteCollection($object, $options); + break; + case $object instanceof Route: + $this->describeRoute($object, $options); + break; + case $object instanceof ParameterBag: + $this->describeContainerParameters($object, $options); + break; + case $object instanceof ContainerBuilder && isset($options['group_by']) && 'tags' === $options['group_by']: + $this->describeContainerTags($object, $options); + break; + case $object instanceof ContainerBuilder && isset($options['id']): + $this->describeContainerService($this->resolveServiceDefinition($object, $options['id']), $options); + break; + case $object instanceof ContainerBuilder && isset($options['parameter']): + $this->describeContainerParameter($object->resolveEnvPlaceholders($object->getParameter($options['parameter'])), $options); + break; + case $object instanceof ContainerBuilder: + $this->describeContainerServices($object, $options); + break; + case $object instanceof Definition: + $this->describeContainerDefinition($object, $options); + break; + case $object instanceof Alias: + $this->describeContainerAlias($object, $options); + break; + case $object instanceof EventDispatcherInterface: + $this->describeEventDispatcherListeners($object, $options); + break; + case is_callable($object): + $this->describeCallable($object, $options); + break; + default: + throw new \InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_class($object))); + } + } + + /** + * Returns the output. + * + * @return OutputInterface The output + */ + protected function getOutput() + { + return $this->output; + } + + /** + * Writes content to output. + * + * @param string $content + * @param bool $decorated + */ + protected function write($content, $decorated = false) + { + $this->output->write($content, false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW); + } + + /** + * Describes an InputArgument instance. + * + * @param RouteCollection $routes + * @param array $options + */ + abstract protected function describeRouteCollection(RouteCollection $routes, array $options = array()); + + /** + * Describes an InputOption instance. + * + * @param Route $route + * @param array $options + */ + abstract protected function describeRoute(Route $route, array $options = array()); + + /** + * Describes container parameters. + * + * @param ParameterBag $parameters + * @param array $options + */ + abstract protected function describeContainerParameters(ParameterBag $parameters, array $options = array()); + + /** + * Describes container tags. + * + * @param ContainerBuilder $builder + * @param array $options + */ + abstract protected function describeContainerTags(ContainerBuilder $builder, array $options = array()); + + /** + * Describes a container service by its name. + * + * Common options are: + * * name: name of described service + * + * @param Definition|Alias|object $service + * @param array $options + */ + abstract protected function describeContainerService($service, array $options = array()); + + /** + * Describes container services. + * + * Common options are: + * * tag: filters described services by given tag + * + * @param ContainerBuilder $builder + * @param array $options + */ + abstract protected function describeContainerServices(ContainerBuilder $builder, array $options = array()); + + /** + * Describes a service definition. + * + * @param Definition $definition + * @param array $options + */ + abstract protected function describeContainerDefinition(Definition $definition, array $options = array()); + + /** + * Describes a service alias. + * + * @param Alias $alias + * @param array $options + */ + abstract protected function describeContainerAlias(Alias $alias, array $options = array()); + + /** + * Describes a container parameter. + * + * @param string $parameter + * @param array $options + */ + abstract protected function describeContainerParameter($parameter, array $options = array()); + + /** + * Describes event dispatcher listeners. + * + * Common options are: + * * name: name of listened event + * + * @param EventDispatcherInterface $eventDispatcher + * @param array $options + */ + abstract protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = array()); + + /** + * Describes a callable. + * + * @param callable $callable + * @param array $options + */ + abstract protected function describeCallable($callable, array $options = array()); + + /** + * Formats a value as string. + * + * @param mixed $value + * + * @return string + */ + protected function formatValue($value) + { + if (is_object($value)) { + return sprintf('object(%s)', get_class($value)); + } + + if (is_string($value)) { + return $value; + } + + return preg_replace("/\n\s*/s", '', var_export($value, true)); + } + + /** + * Formats a parameter. + * + * @param mixed $value + * + * @return string + */ + protected function formatParameter($value) + { + if (is_bool($value) || is_array($value) || (null === $value)) { + $jsonString = json_encode($value); + + if (preg_match('/^(.{60})./us', $jsonString, $matches)) { + return $matches[1].'...'; + } + + return $jsonString; + } + + return (string) $value; + } + + /** + * @param ContainerBuilder $builder + * @param string $serviceId + * + * @return mixed + */ + protected function resolveServiceDefinition(ContainerBuilder $builder, $serviceId) + { + if ($builder->hasDefinition($serviceId)) { + return $builder->getDefinition($serviceId); + } + + // Some service IDs don't have a Definition, they're simply an Alias + if ($builder->hasAlias($serviceId)) { + return $builder->getAlias($serviceId); + } + + if ('service_container' === $serviceId) { + return $builder; + } + + // the service has been injected in some special way, just return the service + return $builder->get($serviceId); + } + + /** + * @param ContainerBuilder $builder + * @param bool $showPrivate + * + * @return array + */ + protected function findDefinitionsByTag(ContainerBuilder $builder, $showPrivate) + { + $definitions = array(); + $tags = $builder->findTags(); + asort($tags); + + foreach ($tags as $tag) { + foreach ($builder->findTaggedServiceIds($tag) as $serviceId => $attributes) { + $definition = $this->resolveServiceDefinition($builder, $serviceId); + + if (!$definition instanceof Definition || !$showPrivate && !$definition->isPublic()) { + continue; + } + + if (!isset($definitions[$tag])) { + $definitions[$tag] = array(); + } + + $definitions[$tag][$serviceId] = $definition; + } + } + + return $definitions; + } + + protected function sortParameters(ParameterBag $parameters) + { + $parameters = $parameters->all(); + ksort($parameters); + + return $parameters; + } + + protected function sortServiceIds(array $serviceIds) + { + asort($serviceIds); + + return $serviceIds; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php new file mode 100644 index 0000000000000000000000000000000000000000..3471f7d07507d5131496e0e1efe5facb32d07e9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php @@ -0,0 +1,365 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; + +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +/** + * @author Jean-François Simon + * + * @internal + */ +class JsonDescriptor extends Descriptor +{ + /** + * {@inheritdoc} + */ + protected function describeRouteCollection(RouteCollection $routes, array $options = array()) + { + $data = array(); + foreach ($routes->all() as $name => $route) { + $data[$name] = $this->getRouteData($route); + } + + $this->writeData($data, $options); + } + + /** + * {@inheritdoc} + */ + protected function describeRoute(Route $route, array $options = array()) + { + $this->writeData($this->getRouteData($route), $options); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerParameters(ParameterBag $parameters, array $options = array()) + { + $this->writeData($this->sortParameters($parameters), $options); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerTags(ContainerBuilder $builder, array $options = array()) + { + $showPrivate = isset($options['show_private']) && $options['show_private']; + $data = array(); + + foreach ($this->findDefinitionsByTag($builder, $showPrivate) as $tag => $definitions) { + $data[$tag] = array(); + foreach ($definitions as $definition) { + $data[$tag][] = $this->getContainerDefinitionData($definition, true); + } + } + + $this->writeData($data, $options); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerService($service, array $options = array()) + { + if (!isset($options['id'])) { + throw new \InvalidArgumentException('An "id" option must be provided.'); + } + + if ($service instanceof Alias) { + $this->writeData($this->getContainerAliasData($service), $options); + } elseif ($service instanceof Definition) { + $this->writeData($this->getContainerDefinitionData($service), $options); + } else { + $this->writeData(get_class($service), $options); + } + } + + /** + * {@inheritdoc} + */ + protected function describeContainerServices(ContainerBuilder $builder, array $options = array()) + { + $serviceIds = isset($options['tag']) && $options['tag'] ? array_keys($builder->findTaggedServiceIds($options['tag'])) : $builder->getServiceIds(); + $showPrivate = isset($options['show_private']) && $options['show_private']; + $data = array('definitions' => array(), 'aliases' => array(), 'services' => array()); + + foreach ($this->sortServiceIds($serviceIds) as $serviceId) { + $service = $this->resolveServiceDefinition($builder, $serviceId); + + if ($service instanceof Alias) { + $data['aliases'][$serviceId] = $this->getContainerAliasData($service); + } elseif ($service instanceof Definition) { + if (($showPrivate || $service->isPublic())) { + $data['definitions'][$serviceId] = $this->getContainerDefinitionData($service); + } + } else { + $data['services'][$serviceId] = get_class($service); + } + } + + $this->writeData($data, $options); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerDefinition(Definition $definition, array $options = array()) + { + $this->writeData($this->getContainerDefinitionData($definition, isset($options['omit_tags']) && $options['omit_tags']), $options); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerAlias(Alias $alias, array $options = array()) + { + $this->writeData($this->getContainerAliasData($alias), $options); + } + + /** + * {@inheritdoc} + */ + protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = array()) + { + $this->writeData($this->getEventDispatcherListenersData($eventDispatcher, array_key_exists('event', $options) ? $options['event'] : null), $options); + } + + /** + * {@inheritdoc} + */ + protected function describeCallable($callable, array $options = array()) + { + $this->writeData($this->getCallableData($callable, $options), $options); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerParameter($parameter, array $options = array()) + { + $key = isset($options['parameter']) ? $options['parameter'] : ''; + + $this->writeData(array($key => $parameter), $options); + } + + /** + * Writes data as json. + * + * @param array $data + * @param array $options + * + * @return array|string + */ + private function writeData(array $data, array $options) + { + $flags = isset($options['json_encoding']) ? $options['json_encoding'] : 0; + $this->write(json_encode($data, $flags | JSON_PRETTY_PRINT)."\n"); + } + + /** + * @param Route $route + * + * @return array + */ + protected function getRouteData(Route $route) + { + return array( + 'path' => $route->getPath(), + 'pathRegex' => $route->compile()->getRegex(), + 'host' => '' !== $route->getHost() ? $route->getHost() : 'ANY', + 'hostRegex' => '' !== $route->getHost() ? $route->compile()->getHostRegex() : '', + 'scheme' => $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY', + 'method' => $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY', + 'class' => get_class($route), + 'defaults' => $route->getDefaults(), + 'requirements' => $route->getRequirements() ?: 'NO CUSTOM', + 'options' => $route->getOptions(), + ); + } + + /** + * @param Definition $definition + * @param bool $omitTags + * + * @return array + */ + private function getContainerDefinitionData(Definition $definition, $omitTags = false) + { + $data = array( + 'class' => (string) $definition->getClass(), + 'public' => $definition->isPublic(), + 'synthetic' => $definition->isSynthetic(), + 'lazy' => $definition->isLazy(), + 'shared' => $definition->isShared(), + 'abstract' => $definition->isAbstract(), + 'autowire' => $definition->isAutowired(), + 'autowiring_types' => array(), + 'file' => $definition->getFile(), + ); + + foreach ($definition->getAutowiringTypes() as $autowiringType) { + $data['autowiring_types'][] = $autowiringType; + } + + if ($factory = $definition->getFactory()) { + if (is_array($factory)) { + if ($factory[0] instanceof Reference) { + $data['factory_service'] = (string) $factory[0]; + } elseif ($factory[0] instanceof Definition) { + throw new \InvalidArgumentException('Factory is not describable.'); + } else { + $data['factory_class'] = $factory[0]; + } + $data['factory_method'] = $factory[1]; + } else { + $data['factory_function'] = $factory; + } + } + + $calls = $definition->getMethodCalls(); + if (count($calls) > 0) { + $data['calls'] = array(); + foreach ($calls as $callData) { + $data['calls'][] = $callData[0]; + } + } + + if (!$omitTags) { + $data['tags'] = array(); + foreach ($definition->getTags() as $tagName => $tagData) { + foreach ($tagData as $parameters) { + $data['tags'][] = array('name' => $tagName, 'parameters' => $parameters); + } + } + } + + return $data; + } + + /** + * @param Alias $alias + * + * @return array + */ + private function getContainerAliasData(Alias $alias) + { + return array( + 'service' => (string) $alias, + 'public' => $alias->isPublic(), + ); + } + + /** + * @param EventDispatcherInterface $eventDispatcher + * @param string|null $event + * + * @return array + */ + private function getEventDispatcherListenersData(EventDispatcherInterface $eventDispatcher, $event = null) + { + $data = array(); + + $registeredListeners = $eventDispatcher->getListeners($event); + if (null !== $event) { + foreach ($registeredListeners as $listener) { + $l = $this->getCallableData($listener); + $l['priority'] = $eventDispatcher->getListenerPriority($event, $listener); + $data[] = $l; + } + } else { + ksort($registeredListeners); + + foreach ($registeredListeners as $eventListened => $eventListeners) { + foreach ($eventListeners as $eventListener) { + $l = $this->getCallableData($eventListener); + $l['priority'] = $eventDispatcher->getListenerPriority($eventListened, $eventListener); + $data[$eventListened][] = $l; + } + } + } + + return $data; + } + + /** + * @param callable $callable + * @param array $options + * + * @return array + */ + private function getCallableData($callable, array $options = array()) + { + $data = array(); + + if (is_array($callable)) { + $data['type'] = 'function'; + + if (is_object($callable[0])) { + $data['name'] = $callable[1]; + $data['class'] = get_class($callable[0]); + } else { + if (0 !== strpos($callable[1], 'parent::')) { + $data['name'] = $callable[1]; + $data['class'] = $callable[0]; + $data['static'] = true; + } else { + $data['name'] = substr($callable[1], 8); + $data['class'] = $callable[0]; + $data['static'] = true; + $data['parent'] = true; + } + } + + return $data; + } + + if (is_string($callable)) { + $data['type'] = 'function'; + + if (false === strpos($callable, '::')) { + $data['name'] = $callable; + } else { + $callableParts = explode('::', $callable); + + $data['name'] = $callableParts[1]; + $data['class'] = $callableParts[0]; + $data['static'] = true; + } + + return $data; + } + + if ($callable instanceof \Closure) { + $data['type'] = 'closure'; + + return $data; + } + + if (method_exists($callable, '__invoke')) { + $data['type'] = 'object'; + $data['name'] = get_class($callable); + + return $data; + } + + throw new \InvalidArgumentException('Callable is not describable.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php new file mode 100644 index 0000000000000000000000000000000000000000..2e63e6385f534f5e7061d1948b5fab96fe37642f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -0,0 +1,364 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; + +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +/** + * @author Jean-François Simon + * + * @internal + */ +class MarkdownDescriptor extends Descriptor +{ + /** + * {@inheritdoc} + */ + protected function describeRouteCollection(RouteCollection $routes, array $options = array()) + { + $first = true; + foreach ($routes->all() as $name => $route) { + if ($first) { + $first = false; + } else { + $this->write("\n\n"); + } + $this->describeRoute($route, array('name' => $name)); + } + $this->write("\n"); + } + + /** + * {@inheritdoc} + */ + protected function describeRoute(Route $route, array $options = array()) + { + $output = '- Path: '.$route->getPath() + ."\n".'- Path Regex: '.$route->compile()->getRegex() + ."\n".'- Host: '.('' !== $route->getHost() ? $route->getHost() : 'ANY') + ."\n".'- Host Regex: '.('' !== $route->getHost() ? $route->compile()->getHostRegex() : '') + ."\n".'- Scheme: '.($route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY') + ."\n".'- Method: '.($route->getMethods() ? implode('|', $route->getMethods()) : 'ANY') + ."\n".'- Class: '.get_class($route) + ."\n".'- Defaults: '.$this->formatRouterConfig($route->getDefaults()) + ."\n".'- Requirements: '.($route->getRequirements() ? $this->formatRouterConfig($route->getRequirements()) : 'NO CUSTOM') + ."\n".'- Options: '.$this->formatRouterConfig($route->getOptions()); + + $this->write(isset($options['name']) + ? $options['name']."\n".str_repeat('-', strlen($options['name']))."\n\n".$output + : $output); + $this->write("\n"); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerParameters(ParameterBag $parameters, array $options = array()) + { + $this->write("Container parameters\n====================\n"); + foreach ($this->sortParameters($parameters) as $key => $value) { + $this->write(sprintf("\n- `%s`: `%s`", $key, $this->formatParameter($value))); + } + } + + /** + * {@inheritdoc} + */ + protected function describeContainerTags(ContainerBuilder $builder, array $options = array()) + { + $showPrivate = isset($options['show_private']) && $options['show_private']; + $this->write("Container tags\n=============="); + + foreach ($this->findDefinitionsByTag($builder, $showPrivate) as $tag => $definitions) { + $this->write("\n\n".$tag."\n".str_repeat('-', strlen($tag))); + foreach ($definitions as $serviceId => $definition) { + $this->write("\n\n"); + $this->describeContainerDefinition($definition, array('omit_tags' => true, 'id' => $serviceId)); + } + } + } + + /** + * {@inheritdoc} + */ + protected function describeContainerService($service, array $options = array()) + { + if (!isset($options['id'])) { + throw new \InvalidArgumentException('An "id" option must be provided.'); + } + + $childOptions = array('id' => $options['id'], 'as_array' => true); + + if ($service instanceof Alias) { + $this->describeContainerAlias($service, $childOptions); + } elseif ($service instanceof Definition) { + $this->describeContainerDefinition($service, $childOptions); + } else { + $this->write(sprintf('**`%s`:** `%s`', $options['id'], get_class($service))); + } + } + + /** + * {@inheritdoc} + */ + protected function describeContainerServices(ContainerBuilder $builder, array $options = array()) + { + $showPrivate = isset($options['show_private']) && $options['show_private']; + + $title = $showPrivate ? 'Public and private services' : 'Public services'; + if (isset($options['tag'])) { + $title .= ' with tag `'.$options['tag'].'`'; + } + $this->write($title."\n".str_repeat('=', strlen($title))); + + $serviceIds = isset($options['tag']) && $options['tag'] ? array_keys($builder->findTaggedServiceIds($options['tag'])) : $builder->getServiceIds(); + $showPrivate = isset($options['show_private']) && $options['show_private']; + $services = array('definitions' => array(), 'aliases' => array(), 'services' => array()); + + foreach ($this->sortServiceIds($serviceIds) as $serviceId) { + $service = $this->resolveServiceDefinition($builder, $serviceId); + + if ($service instanceof Alias) { + $services['aliases'][$serviceId] = $service; + } elseif ($service instanceof Definition) { + if (($showPrivate || $service->isPublic())) { + $services['definitions'][$serviceId] = $service; + } + } else { + $services['services'][$serviceId] = $service; + } + } + + if (!empty($services['definitions'])) { + $this->write("\n\nDefinitions\n-----------\n"); + foreach ($services['definitions'] as $id => $service) { + $this->write("\n"); + $this->describeContainerDefinition($service, array('id' => $id)); + } + } + + if (!empty($services['aliases'])) { + $this->write("\n\nAliases\n-------\n"); + foreach ($services['aliases'] as $id => $service) { + $this->write("\n"); + $this->describeContainerAlias($service, array('id' => $id)); + } + } + + if (!empty($services['services'])) { + $this->write("\n\nServices\n--------\n"); + foreach ($services['services'] as $id => $service) { + $this->write("\n"); + $this->write(sprintf('- `%s`: `%s`', $id, get_class($service))); + } + } + } + + /** + * {@inheritdoc} + */ + protected function describeContainerDefinition(Definition $definition, array $options = array()) + { + $output = '- Class: `'.$definition->getClass().'`' + ."\n".'- Public: '.($definition->isPublic() ? 'yes' : 'no') + ."\n".'- Synthetic: '.($definition->isSynthetic() ? 'yes' : 'no') + ."\n".'- Lazy: '.($definition->isLazy() ? 'yes' : 'no') + ."\n".'- Shared: '.($definition->isShared() ? 'yes' : 'no') + ."\n".'- Abstract: '.($definition->isAbstract() ? 'yes' : 'no') + ."\n".'- Autowired: '.($definition->isAutowired() ? 'yes' : 'no') + ; + + foreach ($definition->getAutowiringTypes() as $autowiringType) { + $output .= "\n".'- Autowiring Type: `'.$autowiringType.'`'; + } + + if ($definition->getFile()) { + $output .= "\n".'- File: `'.$definition->getFile().'`'; + } + + if ($factory = $definition->getFactory()) { + if (is_array($factory)) { + if ($factory[0] instanceof Reference) { + $output .= "\n".'- Factory Service: `'.$factory[0].'`'; + } elseif ($factory[0] instanceof Definition) { + throw new \InvalidArgumentException('Factory is not describable.'); + } else { + $output .= "\n".'- Factory Class: `'.$factory[0].'`'; + } + $output .= "\n".'- Factory Method: `'.$factory[1].'`'; + } else { + $output .= "\n".'- Factory Function: `'.$factory.'`'; + } + } + + $calls = $definition->getMethodCalls(); + foreach ($calls as $callData) { + $output .= "\n".'- Call: `'.$callData[0].'`'; + } + + if (!(isset($options['omit_tags']) && $options['omit_tags'])) { + foreach ($definition->getTags() as $tagName => $tagData) { + foreach ($tagData as $parameters) { + $output .= "\n".'- Tag: `'.$tagName.'`'; + foreach ($parameters as $name => $value) { + $output .= "\n".' - '.ucfirst($name).': '.$value; + } + } + } + } + + $this->write(isset($options['id']) ? sprintf("### %s\n\n%s\n", $options['id'], $output) : $output); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerAlias(Alias $alias, array $options = array()) + { + $output = '- Service: `'.$alias.'`' + ."\n".'- Public: '.($alias->isPublic() ? 'yes' : 'no'); + + $this->write(isset($options['id']) ? sprintf("### %s\n\n%s\n", $options['id'], $output) : $output); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerParameter($parameter, array $options = array()) + { + $this->write(isset($options['parameter']) ? sprintf("%s\n%s\n\n%s", $options['parameter'], str_repeat('=', strlen($options['parameter'])), $this->formatParameter($parameter)) : $parameter); + } + + /** + * {@inheritdoc} + */ + protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = array()) + { + $event = array_key_exists('event', $options) ? $options['event'] : null; + + $title = 'Registered listeners'; + if (null !== $event) { + $title .= sprintf(' for event `%s` ordered by descending priority', $event); + } + + $this->write(sprintf('# %s', $title)."\n"); + + $registeredListeners = $eventDispatcher->getListeners($event); + if (null !== $event) { + foreach ($registeredListeners as $order => $listener) { + $this->write("\n".sprintf('## Listener %d', $order + 1)."\n"); + $this->describeCallable($listener); + $this->write(sprintf('- Priority: `%d`', $eventDispatcher->getListenerPriority($event, $listener))."\n"); + } + } else { + ksort($registeredListeners); + + foreach ($registeredListeners as $eventListened => $eventListeners) { + $this->write("\n".sprintf('## %s', $eventListened)."\n"); + + foreach ($eventListeners as $order => $eventListener) { + $this->write("\n".sprintf('### Listener %d', $order + 1)."\n"); + $this->describeCallable($eventListener); + $this->write(sprintf('- Priority: `%d`', $eventDispatcher->getListenerPriority($eventListened, $eventListener))."\n"); + } + } + } + } + + /** + * {@inheritdoc} + */ + protected function describeCallable($callable, array $options = array()) + { + $string = ''; + + if (is_array($callable)) { + $string .= "\n- Type: `function`"; + + if (is_object($callable[0])) { + $string .= "\n".sprintf('- Name: `%s`', $callable[1]); + $string .= "\n".sprintf('- Class: `%s`', get_class($callable[0])); + } else { + if (0 !== strpos($callable[1], 'parent::')) { + $string .= "\n".sprintf('- Name: `%s`', $callable[1]); + $string .= "\n".sprintf('- Class: `%s`', $callable[0]); + $string .= "\n- Static: yes"; + } else { + $string .= "\n".sprintf('- Name: `%s`', substr($callable[1], 8)); + $string .= "\n".sprintf('- Class: `%s`', $callable[0]); + $string .= "\n- Static: yes"; + $string .= "\n- Parent: yes"; + } + } + + return $this->write($string."\n"); + } + + if (is_string($callable)) { + $string .= "\n- Type: `function`"; + + if (false === strpos($callable, '::')) { + $string .= "\n".sprintf('- Name: `%s`', $callable); + } else { + $callableParts = explode('::', $callable); + + $string .= "\n".sprintf('- Name: `%s`', $callableParts[1]); + $string .= "\n".sprintf('- Class: `%s`', $callableParts[0]); + $string .= "\n- Static: yes"; + } + + return $this->write($string."\n"); + } + + if ($callable instanceof \Closure) { + $string .= "\n- Type: `closure`"; + + return $this->write($string."\n"); + } + + if (method_exists($callable, '__invoke')) { + $string .= "\n- Type: `object`"; + $string .= "\n".sprintf('- Name: `%s`', get_class($callable)); + + return $this->write($string."\n"); + } + + throw new \InvalidArgumentException('Callable is not describable.'); + } + + /** + * @param array $array + * + * @return string + */ + private function formatRouterConfig(array $array) + { + if (!$array) { + return 'NONE'; + } + + $string = ''; + ksort($array); + foreach ($array as $name => $value) { + $string .= "\n".' - `'.$name.'`: '.$this->formatValue($value); + } + + return $string; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php new file mode 100644 index 0000000000000000000000000000000000000000..93f1194072465ea77fcb0347c26f66d3a9531816 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -0,0 +1,451 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; + +use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +/** + * @author Jean-François Simon + * + * @internal + */ +class TextDescriptor extends Descriptor +{ + /** + * {@inheritdoc} + */ + protected function describeRouteCollection(RouteCollection $routes, array $options = array()) + { + $showControllers = isset($options['show_controllers']) && $options['show_controllers']; + + $tableHeaders = array('Name', 'Method', 'Scheme', 'Host', 'Path'); + if ($showControllers) { + $tableHeaders[] = 'Controller'; + } + + $tableRows = array(); + foreach ($routes->all() as $name => $route) { + $row = array( + $name, + $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY', + $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY', + '' !== $route->getHost() ? $route->getHost() : 'ANY', + $route->getPath(), + ); + + if ($showControllers) { + $controller = $route->getDefault('_controller'); + if ($controller instanceof \Closure) { + $controller = 'Closure'; + } elseif (is_object($controller)) { + $controller = get_class($controller); + } + $row[] = $controller; + } + + $tableRows[] = $row; + } + + if (isset($options['output'])) { + $options['output']->table($tableHeaders, $tableRows); + } else { + $table = new Table($this->getOutput()); + $table->setHeaders($tableHeaders)->setRows($tableRows); + $table->render(); + } + } + + /** + * {@inheritdoc} + */ + protected function describeRoute(Route $route, array $options = array()) + { + $tableHeaders = array('Property', 'Value'); + $tableRows = array( + array('Route Name', isset($options['name']) ? $options['name'] : ''), + array('Path', $route->getPath()), + array('Path Regex', $route->compile()->getRegex()), + array('Host', ('' !== $route->getHost() ? $route->getHost() : 'ANY')), + array('Host Regex', ('' !== $route->getHost() ? $route->compile()->getHostRegex() : '')), + array('Scheme', ($route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY')), + array('Method', ($route->getMethods() ? implode('|', $route->getMethods()) : 'ANY')), + array('Requirements', ($route->getRequirements() ? $this->formatRouterConfig($route->getRequirements()) : 'NO CUSTOM')), + array('Class', get_class($route)), + array('Defaults', $this->formatRouterConfig($route->getDefaults())), + array('Options', $this->formatRouterConfig($route->getOptions())), + ); + + $table = new Table($this->getOutput()); + $table->setHeaders($tableHeaders)->setRows($tableRows); + $table->render(); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerParameters(ParameterBag $parameters, array $options = array()) + { + $tableHeaders = array('Parameter', 'Value'); + + $tableRows = array(); + foreach ($this->sortParameters($parameters) as $parameter => $value) { + $tableRows[] = array($parameter, $this->formatParameter($value)); + } + + $options['output']->title('Symfony Container Parameters'); + $options['output']->table($tableHeaders, $tableRows); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerTags(ContainerBuilder $builder, array $options = array()) + { + $showPrivate = isset($options['show_private']) && $options['show_private']; + + if ($showPrivate) { + $options['output']->title('Symfony Container Public and Private Tags'); + } else { + $options['output']->title('Symfony Container Public Tags'); + } + + foreach ($this->findDefinitionsByTag($builder, $showPrivate) as $tag => $definitions) { + $options['output']->section(sprintf('"%s" tag', $tag)); + $options['output']->listing(array_keys($definitions)); + } + } + + /** + * {@inheritdoc} + */ + protected function describeContainerService($service, array $options = array()) + { + if (!isset($options['id'])) { + throw new \InvalidArgumentException('An "id" option must be provided.'); + } + + if ($service instanceof Alias) { + $this->describeContainerAlias($service, $options); + } elseif ($service instanceof Definition) { + $this->describeContainerDefinition($service, $options); + } else { + $options['output']->title(sprintf('Information for Service "%s"', $options['id'])); + $options['output']->table( + array('Service ID', 'Class'), + array( + array(isset($options['id']) ? $options['id'] : '-', get_class($service)), + ) + ); + } + } + + /** + * {@inheritdoc} + */ + protected function describeContainerServices(ContainerBuilder $builder, array $options = array()) + { + $showPrivate = isset($options['show_private']) && $options['show_private']; + $showTag = isset($options['tag']) ? $options['tag'] : null; + + if ($showPrivate) { + $title = 'Symfony Container Public and Private Services'; + } else { + $title = 'Symfony Container Public Services'; + } + + if ($showTag) { + $title .= sprintf(' Tagged with "%s" Tag', $options['tag']); + } + + $options['output']->title($title); + + $serviceIds = isset($options['tag']) && $options['tag'] ? array_keys($builder->findTaggedServiceIds($options['tag'])) : $builder->getServiceIds(); + $maxTags = array(); + + foreach ($serviceIds as $key => $serviceId) { + $definition = $this->resolveServiceDefinition($builder, $serviceId); + if ($definition instanceof Definition) { + // filter out private services unless shown explicitly + if (!$showPrivate && !$definition->isPublic()) { + unset($serviceIds[$key]); + continue; + } + if ($showTag) { + $tags = $definition->getTag($showTag); + foreach ($tags as $tag) { + foreach ($tag as $key => $value) { + if (!isset($maxTags[$key])) { + $maxTags[$key] = strlen($key); + } + if (strlen($value) > $maxTags[$key]) { + $maxTags[$key] = strlen($value); + } + } + } + } + } + } + + $tagsCount = count($maxTags); + $tagsNames = array_keys($maxTags); + + $tableHeaders = array_merge(array('Service ID'), $tagsNames, array('Class name')); + $tableRows = array(); + foreach ($this->sortServiceIds($serviceIds) as $serviceId) { + $definition = $this->resolveServiceDefinition($builder, $serviceId); + if ($definition instanceof Definition) { + if ($showTag) { + foreach ($definition->getTag($showTag) as $key => $tag) { + $tagValues = array(); + foreach ($tagsNames as $tagName) { + $tagValues[] = isset($tag[$tagName]) ? $tag[$tagName] : ''; + } + if (0 === $key) { + $tableRows[] = array_merge(array($serviceId), $tagValues, array($definition->getClass())); + } else { + $tableRows[] = array_merge(array(' "'), $tagValues, array('')); + } + } + } else { + $tableRows[] = array($serviceId, $definition->getClass()); + } + } elseif ($definition instanceof Alias) { + $alias = $definition; + $tableRows[] = array_merge(array($serviceId, sprintf('alias for "%s"', $alias)), $tagsCount ? array_fill(0, $tagsCount, '') : array()); + } else { + $tableRows[] = array_merge(array($serviceId, get_class($definition)), $tagsCount ? array_fill(0, $tagsCount, '') : array()); + } + } + + $options['output']->table($tableHeaders, $tableRows); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerDefinition(Definition $definition, array $options = array()) + { + if (isset($options['id'])) { + $options['output']->title(sprintf('Information for Service "%s"', $options['id'])); + } + + $tableHeaders = array('Option', 'Value'); + + $tableRows[] = array('Service ID', isset($options['id']) ? $options['id'] : '-'); + $tableRows[] = array('Class', $definition->getClass() ?: '-'); + + if ($tags = $definition->getTags()) { + $tagInformation = ''; + foreach ($tags as $tagName => $tagData) { + foreach ($tagData as $tagParameters) { + $parameters = array_map(function ($key, $value) { + return sprintf('%s: %s', $key, $value); + }, array_keys($tagParameters), array_values($tagParameters)); + $parameters = implode(', ', $parameters); + + if ('' === $parameters) { + $tagInformation .= sprintf('%s', $tagName); + } else { + $tagInformation .= sprintf('%s (%s)', $tagName, $parameters); + } + } + } + } else { + $tagInformation = '-'; + } + $tableRows[] = array('Tags', $tagInformation); + + $calls = $definition->getMethodCalls(); + if (count($calls) > 0) { + $callInformation = array(); + foreach ($calls as $call) { + $callInformation[] = $call[0]; + } + $tableRows[] = array('Calls', implode(', ', $callInformation)); + } + + $tableRows[] = array('Public', $definition->isPublic() ? 'yes' : 'no'); + $tableRows[] = array('Synthetic', $definition->isSynthetic() ? 'yes' : 'no'); + $tableRows[] = array('Lazy', $definition->isLazy() ? 'yes' : 'no'); + $tableRows[] = array('Shared', $definition->isShared() ? 'yes' : 'no'); + $tableRows[] = array('Abstract', $definition->isAbstract() ? 'yes' : 'no'); + $tableRows[] = array('Autowired', $definition->isAutowired() ? 'yes' : 'no'); + + $autowiringTypes = $definition->getAutowiringTypes(); + $tableRows[] = array('Autowiring Types', $autowiringTypes ? implode(', ', $autowiringTypes) : '-'); + + if ($definition->getFile()) { + $tableRows[] = array('Required File', $definition->getFile() ? $definition->getFile() : '-'); + } + + if ($factory = $definition->getFactory()) { + if (is_array($factory)) { + if ($factory[0] instanceof Reference) { + $tableRows[] = array('Factory Service', $factory[0]); + } elseif ($factory[0] instanceof Definition) { + throw new \InvalidArgumentException('Factory is not describable.'); + } else { + $tableRows[] = array('Factory Class', $factory[0]); + } + $tableRows[] = array('Factory Method', $factory[1]); + } else { + $tableRows[] = array('Factory Function', $factory); + } + } + + $options['output']->table($tableHeaders, $tableRows); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerAlias(Alias $alias, array $options = array()) + { + $options['output']->comment(sprintf('This service is an alias for the service %s', (string) $alias)); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerParameter($parameter, array $options = array()) + { + $options['output']->table( + array('Parameter', 'Value'), + array( + array($options['parameter'], $this->formatParameter($parameter), + ), + )); + } + + /** + * {@inheritdoc} + */ + protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = array()) + { + $event = array_key_exists('event', $options) ? $options['event'] : null; + + if (null !== $event) { + $title = sprintf('Registered Listeners for "%s" Event', $event); + } else { + $title = 'Registered Listeners Grouped by Event'; + } + + $options['output']->title($title); + + $registeredListeners = $eventDispatcher->getListeners($event); + if (null !== $event) { + $this->renderEventListenerTable($eventDispatcher, $event, $registeredListeners, $options['output']); + } else { + ksort($registeredListeners); + foreach ($registeredListeners as $eventListened => $eventListeners) { + $options['output']->section(sprintf('"%s" event', $eventListened)); + $this->renderEventListenerTable($eventDispatcher, $eventListened, $eventListeners, $options['output']); + } + } + } + + /** + * {@inheritdoc} + */ + protected function describeCallable($callable, array $options = array()) + { + $this->writeText($this->formatCallable($callable), $options); + } + + /** + * @param array $array + */ + private function renderEventListenerTable(EventDispatcherInterface $eventDispatcher, $event, array $eventListeners, SymfonyStyle $io) + { + $tableHeaders = array('Order', 'Callable', 'Priority'); + $tableRows = array(); + + $order = 1; + foreach ($eventListeners as $order => $listener) { + $tableRows[] = array(sprintf('#%d', $order + 1), $this->formatCallable($listener), $eventDispatcher->getListenerPriority($event, $listener)); + } + + $io->table($tableHeaders, $tableRows); + } + + /** + * @param array $config + * + * @return string + */ + private function formatRouterConfig(array $config) + { + if (empty($config)) { + return 'NONE'; + } + + ksort($config); + + $configAsString = ''; + foreach ($config as $key => $value) { + $configAsString .= sprintf("\n%s: %s", $key, $this->formatValue($value)); + } + + return trim($configAsString); + } + + /** + * @param callable $callable + * + * @return string + */ + private function formatCallable($callable) + { + if (is_array($callable)) { + if (is_object($callable[0])) { + return sprintf('%s::%s()', get_class($callable[0]), $callable[1]); + } + + return sprintf('%s::%s()', $callable[0], $callable[1]); + } + + if (is_string($callable)) { + return sprintf('%s()', $callable); + } + + if ($callable instanceof \Closure) { + return '\Closure()'; + } + + if (method_exists($callable, '__invoke')) { + return sprintf('%s::__invoke()', get_class($callable)); + } + + throw new \InvalidArgumentException('Callable is not describable.'); + } + + /** + * @param string $content + * @param array $options + */ + private function writeText($content, array $options = array()) + { + $this->write( + isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content, + isset($options['raw_output']) ? !$options['raw_output'] : true + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php new file mode 100644 index 0000000000000000000000000000000000000000..2c0b7d1669cbb407c82a23d6ba5c3566ade14d1c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -0,0 +1,534 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; + +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +/** + * @author Jean-François Simon + * + * @internal + */ +class XmlDescriptor extends Descriptor +{ + /** + * {@inheritdoc} + */ + protected function describeRouteCollection(RouteCollection $routes, array $options = array()) + { + $this->writeDocument($this->getRouteCollectionDocument($routes)); + } + + /** + * {@inheritdoc} + */ + protected function describeRoute(Route $route, array $options = array()) + { + $this->writeDocument($this->getRouteDocument($route, isset($options['name']) ? $options['name'] : null)); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerParameters(ParameterBag $parameters, array $options = array()) + { + $this->writeDocument($this->getContainerParametersDocument($parameters)); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerTags(ContainerBuilder $builder, array $options = array()) + { + $this->writeDocument($this->getContainerTagsDocument($builder, isset($options['show_private']) && $options['show_private'])); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerService($service, array $options = array()) + { + if (!isset($options['id'])) { + throw new \InvalidArgumentException('An "id" option must be provided.'); + } + + $this->writeDocument($this->getContainerServiceDocument($service, $options['id'])); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerServices(ContainerBuilder $builder, array $options = array()) + { + $this->writeDocument($this->getContainerServicesDocument($builder, isset($options['tag']) ? $options['tag'] : null, isset($options['show_private']) && $options['show_private'])); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerDefinition(Definition $definition, array $options = array()) + { + $this->writeDocument($this->getContainerDefinitionDocument($definition, isset($options['id']) ? $options['id'] : null, isset($options['omit_tags']) && $options['omit_tags'])); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerAlias(Alias $alias, array $options = array()) + { + $this->writeDocument($this->getContainerAliasDocument($alias, isset($options['id']) ? $options['id'] : null)); + } + + /** + * {@inheritdoc} + */ + protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = array()) + { + $this->writeDocument($this->getEventDispatcherListenersDocument($eventDispatcher, array_key_exists('event', $options) ? $options['event'] : null)); + } + + /** + * {@inheritdoc} + */ + protected function describeCallable($callable, array $options = array()) + { + $this->writeDocument($this->getCallableDocument($callable)); + } + + /** + * {@inheritdoc} + */ + protected function describeContainerParameter($parameter, array $options = array()) + { + $this->writeDocument($this->getContainerParameterDocument($parameter, $options)); + } + + /** + * Writes DOM document. + * + * @param \DOMDocument $dom + * + * @return \DOMDocument|string + */ + private function writeDocument(\DOMDocument $dom) + { + $dom->formatOutput = true; + $this->write($dom->saveXML()); + } + + /** + * @param RouteCollection $routes + * + * @return \DOMDocument + */ + private function getRouteCollectionDocument(RouteCollection $routes) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($routesXML = $dom->createElement('routes')); + + foreach ($routes->all() as $name => $route) { + $routeXML = $this->getRouteDocument($route, $name); + $routesXML->appendChild($routesXML->ownerDocument->importNode($routeXML->childNodes->item(0), true)); + } + + return $dom; + } + + /** + * @param Route $route + * @param string|null $name + * + * @return \DOMDocument + */ + private function getRouteDocument(Route $route, $name = null) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($routeXML = $dom->createElement('route')); + + if ($name) { + $routeXML->setAttribute('name', $name); + } + + $routeXML->setAttribute('class', get_class($route)); + + $routeXML->appendChild($pathXML = $dom->createElement('path')); + $pathXML->setAttribute('regex', $route->compile()->getRegex()); + $pathXML->appendChild(new \DOMText($route->getPath())); + + if ('' !== $route->getHost()) { + $routeXML->appendChild($hostXML = $dom->createElement('host')); + $hostXML->setAttribute('regex', $route->compile()->getHostRegex()); + $hostXML->appendChild(new \DOMText($route->getHost())); + } + + foreach ($route->getSchemes() as $scheme) { + $routeXML->appendChild($schemeXML = $dom->createElement('scheme')); + $schemeXML->appendChild(new \DOMText($scheme)); + } + + foreach ($route->getMethods() as $method) { + $routeXML->appendChild($methodXML = $dom->createElement('method')); + $methodXML->appendChild(new \DOMText($method)); + } + + if ($route->getDefaults()) { + $routeXML->appendChild($defaultsXML = $dom->createElement('defaults')); + foreach ($route->getDefaults() as $attribute => $value) { + $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); + $defaultXML->setAttribute('key', $attribute); + $defaultXML->appendChild(new \DOMText($this->formatValue($value))); + } + } + + $originRequirements = $requirements = $route->getRequirements(); + unset($requirements['_scheme'], $requirements['_method']); + if ($requirements) { + $routeXML->appendChild($requirementsXML = $dom->createElement('requirements')); + foreach ($originRequirements as $attribute => $pattern) { + $requirementsXML->appendChild($requirementXML = $dom->createElement('requirement')); + $requirementXML->setAttribute('key', $attribute); + $requirementXML->appendChild(new \DOMText($pattern)); + } + } + + if ($route->getOptions()) { + $routeXML->appendChild($optionsXML = $dom->createElement('options')); + foreach ($route->getOptions() as $name => $value) { + $optionsXML->appendChild($optionXML = $dom->createElement('option')); + $optionXML->setAttribute('key', $name); + $optionXML->appendChild(new \DOMText($this->formatValue($value))); + } + } + + return $dom; + } + + /** + * @param ParameterBag $parameters + * + * @return \DOMDocument + */ + private function getContainerParametersDocument(ParameterBag $parameters) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($parametersXML = $dom->createElement('parameters')); + + foreach ($this->sortParameters($parameters) as $key => $value) { + $parametersXML->appendChild($parameterXML = $dom->createElement('parameter')); + $parameterXML->setAttribute('key', $key); + $parameterXML->appendChild(new \DOMText($this->formatParameter($value))); + } + + return $dom; + } + + /** + * @param ContainerBuilder $builder + * @param bool $showPrivate + * + * @return \DOMDocument + */ + private function getContainerTagsDocument(ContainerBuilder $builder, $showPrivate = false) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($containerXML = $dom->createElement('container')); + + foreach ($this->findDefinitionsByTag($builder, $showPrivate) as $tag => $definitions) { + $containerXML->appendChild($tagXML = $dom->createElement('tag')); + $tagXML->setAttribute('name', $tag); + + foreach ($definitions as $serviceId => $definition) { + $definitionXML = $this->getContainerDefinitionDocument($definition, $serviceId, true); + $tagXML->appendChild($dom->importNode($definitionXML->childNodes->item(0), true)); + } + } + + return $dom; + } + + /** + * @param mixed $service + * @param string $id + * + * @return \DOMDocument + */ + private function getContainerServiceDocument($service, $id) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + + if ($service instanceof Alias) { + $dom->appendChild($dom->importNode($this->getContainerAliasDocument($service, $id)->childNodes->item(0), true)); + } elseif ($service instanceof Definition) { + $dom->appendChild($dom->importNode($this->getContainerDefinitionDocument($service, $id)->childNodes->item(0), true)); + } else { + $dom->appendChild($serviceXML = $dom->createElement('service')); + $serviceXML->setAttribute('id', $id); + $serviceXML->setAttribute('class', get_class($service)); + } + + return $dom; + } + + /** + * @param ContainerBuilder $builder + * @param string|null $tag + * @param bool $showPrivate + * + * @return \DOMDocument + */ + private function getContainerServicesDocument(ContainerBuilder $builder, $tag = null, $showPrivate = false) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($containerXML = $dom->createElement('container')); + + $serviceIds = $tag ? array_keys($builder->findTaggedServiceIds($tag)) : $builder->getServiceIds(); + + foreach ($this->sortServiceIds($serviceIds) as $serviceId) { + $service = $this->resolveServiceDefinition($builder, $serviceId); + + if ($service instanceof Definition && !($showPrivate || $service->isPublic())) { + continue; + } + + $serviceXML = $this->getContainerServiceDocument($service, $serviceId); + $containerXML->appendChild($containerXML->ownerDocument->importNode($serviceXML->childNodes->item(0), true)); + } + + return $dom; + } + + /** + * @param Definition $definition + * @param string|null $id + * @param bool $omitTags + * + * @return \DOMDocument + */ + private function getContainerDefinitionDocument(Definition $definition, $id = null, $omitTags = false) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($serviceXML = $dom->createElement('definition')); + + if ($id) { + $serviceXML->setAttribute('id', $id); + } + + $serviceXML->setAttribute('class', $definition->getClass()); + + if ($factory = $definition->getFactory()) { + $serviceXML->appendChild($factoryXML = $dom->createElement('factory')); + + if (is_array($factory)) { + if ($factory[0] instanceof Reference) { + $factoryXML->setAttribute('service', (string) $factory[0]); + } elseif ($factory[0] instanceof Definition) { + throw new \InvalidArgumentException('Factory is not describable.'); + } else { + $factoryXML->setAttribute('class', $factory[0]); + } + $factoryXML->setAttribute('method', $factory[1]); + } else { + $factoryXML->setAttribute('function', $factory); + } + } + + $serviceXML->setAttribute('public', $definition->isPublic() ? 'true' : 'false'); + $serviceXML->setAttribute('synthetic', $definition->isSynthetic() ? 'true' : 'false'); + $serviceXML->setAttribute('lazy', $definition->isLazy() ? 'true' : 'false'); + $serviceXML->setAttribute('shared', $definition->isShared() ? 'true' : 'false'); + $serviceXML->setAttribute('abstract', $definition->isAbstract() ? 'true' : 'false'); + $serviceXML->setAttribute('autowired', $definition->isAutowired() ? 'true' : 'false'); + $serviceXML->setAttribute('file', $definition->getFile()); + + $calls = $definition->getMethodCalls(); + if (count($calls) > 0) { + $serviceXML->appendChild($callsXML = $dom->createElement('calls')); + foreach ($calls as $callData) { + $callsXML->appendChild($callXML = $dom->createElement('call')); + $callXML->setAttribute('method', $callData[0]); + } + } + + if (!$omitTags) { + if ($tags = $definition->getTags()) { + $serviceXML->appendChild($tagsXML = $dom->createElement('tags')); + foreach ($tags as $tagName => $tagData) { + foreach ($tagData as $parameters) { + $tagsXML->appendChild($tagXML = $dom->createElement('tag')); + $tagXML->setAttribute('name', $tagName); + foreach ($parameters as $name => $value) { + $tagXML->appendChild($parameterXML = $dom->createElement('parameter')); + $parameterXML->setAttribute('name', $name); + $parameterXML->appendChild(new \DOMText($this->formatParameter($value))); + } + } + } + } + } + + return $dom; + } + + /** + * @param Alias $alias + * @param string|null $id + * + * @return \DOMDocument + */ + private function getContainerAliasDocument(Alias $alias, $id = null) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($aliasXML = $dom->createElement('alias')); + + if ($id) { + $aliasXML->setAttribute('id', $id); + } + + $aliasXML->setAttribute('service', (string) $alias); + $aliasXML->setAttribute('public', $alias->isPublic() ? 'true' : 'false'); + + return $dom; + } + + /** + * @param string $parameter + * @param array $options + * + * @return \DOMDocument + */ + private function getContainerParameterDocument($parameter, $options = array()) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($parameterXML = $dom->createElement('parameter')); + + if (isset($options['parameter'])) { + $parameterXML->setAttribute('key', $options['parameter']); + } + + $parameterXML->appendChild(new \DOMText($this->formatParameter($parameter))); + + return $dom; + } + + /** + * @param EventDispatcherInterface $eventDispatcher + * @param string|null $event + * + * @return \DOMDocument + */ + private function getEventDispatcherListenersDocument(EventDispatcherInterface $eventDispatcher, $event = null) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($eventDispatcherXML = $dom->createElement('event-dispatcher')); + + $registeredListeners = $eventDispatcher->getListeners($event); + if (null !== $event) { + $this->appendEventListenerDocument($eventDispatcher, $event, $eventDispatcherXML, $registeredListeners); + } else { + ksort($registeredListeners); + + foreach ($registeredListeners as $eventListened => $eventListeners) { + $eventDispatcherXML->appendChild($eventXML = $dom->createElement('event')); + $eventXML->setAttribute('name', $eventListened); + + $this->appendEventListenerDocument($eventDispatcher, $eventListened, $eventXML, $eventListeners); + } + } + + return $dom; + } + + /** + * @param \DOMElement $element + * @param array $eventListeners + */ + private function appendEventListenerDocument(EventDispatcherInterface $eventDispatcher, $event, \DOMElement $element, array $eventListeners) + { + foreach ($eventListeners as $listener) { + $callableXML = $this->getCallableDocument($listener); + $callableXML->childNodes->item(0)->setAttribute('priority', $eventDispatcher->getListenerPriority($event, $listener)); + + $element->appendChild($element->ownerDocument->importNode($callableXML->childNodes->item(0), true)); + } + } + + /** + * @param callable $callable + * + * @return \DOMDocument + */ + private function getCallableDocument($callable) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($callableXML = $dom->createElement('callable')); + + if (is_array($callable)) { + $callableXML->setAttribute('type', 'function'); + + if (is_object($callable[0])) { + $callableXML->setAttribute('name', $callable[1]); + $callableXML->setAttribute('class', get_class($callable[0])); + } else { + if (0 !== strpos($callable[1], 'parent::')) { + $callableXML->setAttribute('name', $callable[1]); + $callableXML->setAttribute('class', $callable[0]); + $callableXML->setAttribute('static', 'true'); + } else { + $callableXML->setAttribute('name', substr($callable[1], 8)); + $callableXML->setAttribute('class', $callable[0]); + $callableXML->setAttribute('static', 'true'); + $callableXML->setAttribute('parent', 'true'); + } + } + + return $dom; + } + + if (is_string($callable)) { + $callableXML->setAttribute('type', 'function'); + + if (false === strpos($callable, '::')) { + $callableXML->setAttribute('name', $callable); + } else { + $callableParts = explode('::', $callable); + + $callableXML->setAttribute('name', $callableParts[1]); + $callableXML->setAttribute('class', $callableParts[0]); + $callableXML->setAttribute('static', 'true'); + } + + return $dom; + } + + if ($callable instanceof \Closure) { + $callableXML->setAttribute('type', 'closure'); + + return $dom; + } + + if (method_exists($callable, '__invoke')) { + $callableXML->setAttribute('type', 'object'); + $callableXML->setAttribute('name', get_class($callable)); + + return $dom; + } + + throw new \InvalidArgumentException('Callable is not describable.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..2599f0090e5d3dc9806a644070c4296f9b2094be --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Console\Helper; + +use Symfony\Bundle\FrameworkBundle\Console\Descriptor\JsonDescriptor; +use Symfony\Bundle\FrameworkBundle\Console\Descriptor\MarkdownDescriptor; +use Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor; +use Symfony\Bundle\FrameworkBundle\Console\Descriptor\XmlDescriptor; +use Symfony\Component\Console\Helper\DescriptorHelper as BaseDescriptorHelper; + +/** + * @author Jean-François Simon + * + * @internal + */ +class DescriptorHelper extends BaseDescriptorHelper +{ + /** + * Constructor. + */ + public function __construct() + { + $this + ->register('txt', new TextDescriptor()) + ->register('xml', new XmlDescriptor()) + ->register('json', new JsonDescriptor()) + ->register('md', new MarkdownDescriptor()) + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php new file mode 100644 index 0000000000000000000000000000000000000000..90daa3eeadd00d7ed59f7a4ec42faed1410df760 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php @@ -0,0 +1,443 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Controller; + +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\HttpFoundation\BinaryFileResponse; +use Symfony\Component\HttpFoundation\JsonResponse; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\ResponseHeaderBag; +use Symfony\Component\HttpFoundation\StreamedResponse; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\Security\Core\Exception\AccessDeniedException; +use Symfony\Component\Security\Csrf\CsrfToken; +use Symfony\Component\Form\Extension\Core\Type\FormType; +use Symfony\Component\Form\Form; +use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Doctrine\Bundle\DoctrineBundle\Registry; + +/** + * Controller is a simple implementation of a Controller. + * + * It provides methods to common features needed in controllers. + * + * @author Fabien Potencier + */ +abstract class Controller implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + /** + * Generates a URL from the given parameters. + * + * @param string $route The name of the route + * @param mixed $parameters An array of parameters + * @param int $referenceType The type of reference (one of the constants in UrlGeneratorInterface) + * + * @return string The generated URL + * + * @see UrlGeneratorInterface + */ + protected function generateUrl($route, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) + { + return $this->container->get('router')->generate($route, $parameters, $referenceType); + } + + /** + * Forwards the request to another controller. + * + * @param string $controller The controller name (a string like BlogBundle:Post:index) + * @param array $path An array of path parameters + * @param array $query An array of query parameters + * + * @return Response A Response instance + */ + protected function forward($controller, array $path = array(), array $query = array()) + { + $request = $this->container->get('request_stack')->getCurrentRequest(); + $path['_forwarded'] = $request->attributes; + $path['_controller'] = $controller; + $subRequest = $request->duplicate($query, null, $path); + + return $this->container->get('http_kernel')->handle($subRequest, HttpKernelInterface::SUB_REQUEST); + } + + /** + * Returns a RedirectResponse to the given URL. + * + * @param string $url The URL to redirect to + * @param int $status The status code to use for the Response + * + * @return RedirectResponse + */ + protected function redirect($url, $status = 302) + { + return new RedirectResponse($url, $status); + } + + /** + * Returns a RedirectResponse to the given route with the given parameters. + * + * @param string $route The name of the route + * @param array $parameters An array of parameters + * @param int $status The status code to use for the Response + * + * @return RedirectResponse + */ + protected function redirectToRoute($route, array $parameters = array(), $status = 302) + { + return $this->redirect($this->generateUrl($route, $parameters), $status); + } + + /** + * Returns a JsonResponse that uses the serializer component if enabled, or json_encode. + * + * @param mixed $data The response data + * @param int $status The status code to use for the Response + * @param array $headers Array of extra headers to add + * @param array $context Context to pass to serializer when using serializer component + * + * @return JsonResponse + */ + protected function json($data, $status = 200, $headers = array(), $context = array()) + { + if ($this->container->has('serializer')) { + $json = $this->container->get('serializer')->serialize($data, 'json', array_merge(array( + 'json_encode_options' => JsonResponse::DEFAULT_ENCODING_OPTIONS, + ), $context)); + + return new JsonResponse($json, $status, $headers, true); + } + + return new JsonResponse($data, $status, $headers); + } + + /** + * Returns a BinaryFileResponse object with original or customized file name and disposition header. + * + * @param \SplFileInfo|string $file File object or path to file to be sent as response + * @param string|null $fileName File name to be sent to response or null (will use original file name) + * @param string $disposition Disposition of response ("attachment" is default, other type is "inline") + * + * @return BinaryFileResponse + */ + protected function file($file, $fileName = null, $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT) + { + $response = new BinaryFileResponse($file); + $response->setContentDisposition($disposition, $fileName === null ? $response->getFile()->getFilename() : $fileName); + + return $response; + } + + /** + * Adds a flash message to the current session for type. + * + * @param string $type The type + * @param string $message The message + * + * @throws \LogicException + */ + protected function addFlash($type, $message) + { + if (!$this->container->has('session')) { + throw new \LogicException('You can not use the addFlash method if sessions are disabled.'); + } + + $this->container->get('session')->getFlashBag()->add($type, $message); + } + + /** + * Checks if the attributes are granted against the current authentication token and optionally supplied object. + * + * @param mixed $attributes The attributes + * @param mixed $object The object + * + * @return bool + * + * @throws \LogicException + */ + protected function isGranted($attributes, $object = null) + { + if (!$this->container->has('security.authorization_checker')) { + throw new \LogicException('The SecurityBundle is not registered in your application.'); + } + + return $this->container->get('security.authorization_checker')->isGranted($attributes, $object); + } + + /** + * Throws an exception unless the attributes are granted against the current authentication token and optionally + * supplied object. + * + * @param mixed $attributes The attributes + * @param mixed $object The object + * @param string $message The message passed to the exception + * + * @throws AccessDeniedException + */ + protected function denyAccessUnlessGranted($attributes, $object = null, $message = 'Access Denied.') + { + if (!$this->isGranted($attributes, $object)) { + $exception = $this->createAccessDeniedException($message); + $exception->setAttributes($attributes); + $exception->setSubject($object); + + throw $exception; + } + } + + /** + * Returns a rendered view. + * + * @param string $view The view name + * @param array $parameters An array of parameters to pass to the view + * + * @return string The rendered view + */ + protected function renderView($view, array $parameters = array()) + { + if ($this->container->has('templating')) { + return $this->container->get('templating')->render($view, $parameters); + } + + if (!$this->container->has('twig')) { + throw new \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available.'); + } + + return $this->container->get('twig')->render($view, $parameters); + } + + /** + * Renders a view. + * + * @param string $view The view name + * @param array $parameters An array of parameters to pass to the view + * @param Response $response A response instance + * + * @return Response A Response instance + */ + protected function render($view, array $parameters = array(), Response $response = null) + { + if ($this->container->has('templating')) { + return $this->container->get('templating')->renderResponse($view, $parameters, $response); + } + + if (!$this->container->has('twig')) { + throw new \LogicException('You can not use the "render" method if the Templating Component or the Twig Bundle are not available.'); + } + + if (null === $response) { + $response = new Response(); + } + + $response->setContent($this->container->get('twig')->render($view, $parameters)); + + return $response; + } + + /** + * Streams a view. + * + * @param string $view The view name + * @param array $parameters An array of parameters to pass to the view + * @param StreamedResponse $response A response instance + * + * @return StreamedResponse A StreamedResponse instance + */ + protected function stream($view, array $parameters = array(), StreamedResponse $response = null) + { + if ($this->container->has('templating')) { + $templating = $this->container->get('templating'); + + $callback = function () use ($templating, $view, $parameters) { + $templating->stream($view, $parameters); + }; + } elseif ($this->container->has('twig')) { + $twig = $this->container->get('twig'); + + $callback = function () use ($twig, $view, $parameters) { + $twig->display($view, $parameters); + }; + } else { + throw new \LogicException('You can not use the "stream" method if the Templating Component or the Twig Bundle are not available.'); + } + + if (null === $response) { + return new StreamedResponse($callback); + } + + $response->setCallback($callback); + + return $response; + } + + /** + * Returns a NotFoundHttpException. + * + * This will result in a 404 response code. Usage example: + * + * throw $this->createNotFoundException('Page not found!'); + * + * @param string $message A message + * @param \Exception|null $previous The previous exception + * + * @return NotFoundHttpException + */ + protected function createNotFoundException($message = 'Not Found', \Exception $previous = null) + { + return new NotFoundHttpException($message, $previous); + } + + /** + * Returns an AccessDeniedException. + * + * This will result in a 403 response code. Usage example: + * + * throw $this->createAccessDeniedException('Unable to access this page!'); + * + * @param string $message A message + * @param \Exception|null $previous The previous exception + * + * @return AccessDeniedException + */ + protected function createAccessDeniedException($message = 'Access Denied.', \Exception $previous = null) + { + return new AccessDeniedException($message, $previous); + } + + /** + * Creates and returns a Form instance from the type of the form. + * + * @param string $type The fully qualified class name of the form type + * @param mixed $data The initial data for the form + * @param array $options Options for the form + * + * @return Form + */ + protected function createForm($type, $data = null, array $options = array()) + { + return $this->container->get('form.factory')->create($type, $data, $options); + } + + /** + * Creates and returns a form builder instance. + * + * @param mixed $data The initial data for the form + * @param array $options Options for the form + * + * @return FormBuilder + */ + protected function createFormBuilder($data = null, array $options = array()) + { + return $this->container->get('form.factory')->createBuilder(FormType::class, $data, $options); + } + + /** + * Shortcut to return the Doctrine Registry service. + * + * @return Registry + * + * @throws \LogicException If DoctrineBundle is not available + */ + protected function getDoctrine() + { + if (!$this->container->has('doctrine')) { + throw new \LogicException('The DoctrineBundle is not registered in your application.'); + } + + return $this->container->get('doctrine'); + } + + /** + * Get a user from the Security Token Storage. + * + * @return mixed + * + * @throws \LogicException If SecurityBundle is not available + * + * @see TokenInterface::getUser() + */ + protected function getUser() + { + if (!$this->container->has('security.token_storage')) { + throw new \LogicException('The SecurityBundle is not registered in your application.'); + } + + if (null === $token = $this->container->get('security.token_storage')->getToken()) { + return; + } + + if (!is_object($user = $token->getUser())) { + // e.g. anonymous authentication + return; + } + + return $user; + } + + /** + * Returns true if the service id is defined. + * + * @param string $id The service id + * + * @return bool true if the service id is defined, false otherwise + */ + protected function has($id) + { + return $this->container->has($id); + } + + /** + * Gets a container service by its id. + * + * @param string $id The service id + * + * @return object The service + */ + protected function get($id) + { + return $this->container->get($id); + } + + /** + * Gets a container configuration parameter by its name. + * + * @param string $name The parameter name + * + * @return mixed + */ + protected function getParameter($name) + { + return $this->container->getParameter($name); + } + + /** + * Checks the validity of a CSRF token. + * + * @param string $id The id used when generating the token + * @param string $token The actual token sent with the request that should be validated + * + * @return bool + */ + protected function isCsrfTokenValid($id, $token) + { + if (!$this->container->has('security.csrf.token_manager')) { + throw new \LogicException('CSRF protection is not enabled in your application.'); + } + + return $this->container->get('security.csrf.token_manager')->isTokenValid(new CsrfToken($id, $token)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php new file mode 100644 index 0000000000000000000000000000000000000000..989dc8cd23d7c32bcf64d421c8d6989fddb22831 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php @@ -0,0 +1,152 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Controller; + +use Symfony\Component\HttpKernel\KernelInterface; + +/** + * ControllerNameParser converts controller from the short notation a:b:c + * (BlogBundle:Post:index) to a fully-qualified class::method string + * (Bundle\BlogBundle\Controller\PostController::indexAction). + * + * @author Fabien Potencier + */ +class ControllerNameParser +{ + protected $kernel; + + /** + * Constructor. + * + * @param KernelInterface $kernel A KernelInterface instance + */ + public function __construct(KernelInterface $kernel) + { + $this->kernel = $kernel; + } + + /** + * Converts a short notation a:b:c to a class::method. + * + * @param string $controller A short notation controller (a:b:c) + * + * @return string A string in the class::method notation + * + * @throws \InvalidArgumentException when the specified bundle is not enabled + * or the controller cannot be found + */ + public function parse($controller) + { + $parts = explode(':', $controller); + if (3 !== count($parts) || in_array('', $parts, true)) { + throw new \InvalidArgumentException(sprintf('The "%s" controller is not a valid "a:b:c" controller string.', $controller)); + } + + $originalController = $controller; + list($bundle, $controller, $action) = $parts; + $controller = str_replace('/', '\\', $controller); + $bundles = array(); + + try { + // this throws an exception if there is no such bundle + $allBundles = $this->kernel->getBundle($bundle, false); + } catch (\InvalidArgumentException $e) { + $message = sprintf( + 'The "%s" (from the _controller value "%s") does not exist or is not enabled in your kernel!', + $bundle, + $originalController + ); + + if ($alternative = $this->findAlternative($bundle)) { + $message .= sprintf(' Did you mean "%s:%s:%s"?', $alternative, $controller, $action); + } + + throw new \InvalidArgumentException($message, 0, $e); + } + + foreach ($allBundles as $b) { + $try = $b->getNamespace().'\\Controller\\'.$controller.'Controller'; + if (class_exists($try)) { + return $try.'::'.$action.'Action'; + } + + $bundles[] = $b->getName(); + $msg = sprintf('The _controller value "%s:%s:%s" maps to a "%s" class, but this class was not found. Create this class or check the spelling of the class and its namespace.', $bundle, $controller, $action, $try); + } + + if (count($bundles) > 1) { + $msg = sprintf('Unable to find controller "%s:%s" in bundles %s.', $bundle, $controller, implode(', ', $bundles)); + } + + throw new \InvalidArgumentException($msg); + } + + /** + * Converts a class::method notation to a short one (a:b:c). + * + * @param string $controller A string in the class::method notation + * + * @return string A short notation controller (a:b:c) + * + * @throws \InvalidArgumentException when the controller is not valid or cannot be found in any bundle + */ + public function build($controller) + { + if (0 === preg_match('#^(.*?\\\\Controller\\\\(.+)Controller)::(.+)Action$#', $controller, $match)) { + throw new \InvalidArgumentException(sprintf('The "%s" controller is not a valid "class::method" string.', $controller)); + } + + $className = $match[1]; + $controllerName = $match[2]; + $actionName = $match[3]; + foreach ($this->kernel->getBundles() as $name => $bundle) { + if (0 !== strpos($className, $bundle->getNamespace())) { + continue; + } + + return sprintf('%s:%s:%s', $name, $controllerName, $actionName); + } + + throw new \InvalidArgumentException(sprintf('Unable to find a bundle that defines controller "%s".', $controller)); + } + + /** + * Attempts to find a bundle that is *similar* to the given bundle name. + * + * @param string $nonExistentBundleName + * + * @return string + */ + private function findAlternative($nonExistentBundleName) + { + $bundleNames = array_map(function ($b) { + return $b->getName(); + }, $this->kernel->getBundles()); + + $alternative = null; + $shortest = null; + foreach ($bundleNames as $bundleName) { + // if there's a partial match, return it immediately + if (false !== strpos($bundleName, $nonExistentBundleName)) { + return $bundleName; + } + + $lev = levenshtein($nonExistentBundleName, $bundleName); + if ($lev <= strlen($nonExistentBundleName) / 3 && ($alternative === null || $lev < $shortest)) { + $alternative = $bundleName; + $shortest = $lev; + } + } + + return $alternative; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..31593b9b80506036bf34c46ad396003e9fc0fa84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.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\Bundle\FrameworkBundle\Controller; + +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Controller\ControllerResolver as BaseControllerResolver; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; + +/** + * ControllerResolver. + * + * @author Fabien Potencier + */ +class ControllerResolver extends BaseControllerResolver +{ + protected $container; + protected $parser; + + /** + * Constructor. + * + * @param ContainerInterface $container A ContainerInterface instance + * @param ControllerNameParser $parser A ControllerNameParser instance + * @param LoggerInterface $logger A LoggerInterface instance + */ + public function __construct(ContainerInterface $container, ControllerNameParser $parser, LoggerInterface $logger = null) + { + $this->container = $container; + $this->parser = $parser; + + parent::__construct($logger); + } + + /** + * Returns a callable for the given controller. + * + * @param string $controller A Controller string + * + * @return mixed A PHP callable + * + * @throws \LogicException When the name could not be parsed + * @throws \InvalidArgumentException When the controller class does not exist + */ + protected function createController($controller) + { + if (false === strpos($controller, '::')) { + $count = substr_count($controller, ':'); + if (2 == $count) { + // controller in the a:b:c notation then + $controller = $this->parser->parse($controller); + } elseif (1 == $count) { + // controller in the service:method notation + list($service, $method) = explode(':', $controller, 2); + + return array($this->container->get($service), $method); + } elseif ($this->container->has($controller) && method_exists($service = $this->container->get($controller), '__invoke')) { + return $service; + } else { + throw new \LogicException(sprintf('Unable to parse the controller name "%s".', $controller)); + } + } + + return parent::createController($controller); + } + + /** + * {@inheritdoc} + */ + protected function instantiateController($class) + { + if ($this->container->has($class)) { + return $this->container->get($class); + } + + $controller = parent::instantiateController($class); + + if ($controller instanceof ContainerAwareInterface) { + $controller->setContainer($this->container); + } + + return $controller; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php new file mode 100644 index 0000000000000000000000000000000000000000..a1f1b0486bba8df8f67289045dc6124165667e40 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php @@ -0,0 +1,144 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Controller; + +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Exception\HttpException; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; + +/** + * Redirects a request to another URL. + * + * @author Fabien Potencier + */ +class RedirectController implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + /** + * Redirects to another route with the given name. + * + * The response status code is 302 if the permanent parameter is false (default), + * and 301 if the redirection is permanent. + * + * In case the route name is empty, the status code will be 404 when permanent is false + * and 410 otherwise. + * + * @param Request $request The request instance + * @param string $route The route name to redirect to + * @param bool $permanent Whether the redirection is permanent + * @param bool|array $ignoreAttributes Whether to ignore attributes or an array of attributes to ignore + * + * @return Response A Response instance + * + * @throws HttpException In case the route name is empty + */ + public function redirectAction(Request $request, $route, $permanent = false, $ignoreAttributes = false) + { + if ('' == $route) { + throw new HttpException($permanent ? 410 : 404); + } + + $attributes = array(); + if (false === $ignoreAttributes || is_array($ignoreAttributes)) { + $attributes = $request->attributes->get('_route_params'); + unset($attributes['route'], $attributes['permanent'], $attributes['ignoreAttributes']); + if ($ignoreAttributes) { + $attributes = array_diff_key($attributes, array_flip($ignoreAttributes)); + } + } + + return new RedirectResponse($this->container->get('router')->generate($route, $attributes, UrlGeneratorInterface::ABSOLUTE_URL), $permanent ? 301 : 302); + } + + /** + * Redirects to a URL. + * + * The response status code is 302 if the permanent parameter is false (default), + * and 301 if the redirection is permanent. + * + * In case the path is empty, the status code will be 404 when permanent is false + * and 410 otherwise. + * + * @param Request $request The request instance + * @param string $path The absolute path or URL to redirect to + * @param bool $permanent Whether the redirect is permanent or not + * @param string|null $scheme The URL scheme (null to keep the current one) + * @param int|null $httpPort The HTTP port (null to keep the current one for the same scheme or the configured port in the container) + * @param int|null $httpsPort The HTTPS port (null to keep the current one for the same scheme or the configured port in the container) + * + * @return Response A Response instance + * + * @throws HttpException In case the path is empty + */ + public function urlRedirectAction(Request $request, $path, $permanent = false, $scheme = null, $httpPort = null, $httpsPort = null) + { + if ('' == $path) { + throw new HttpException($permanent ? 410 : 404); + } + + $statusCode = $permanent ? 301 : 302; + + // redirect if the path is a full URL + if (parse_url($path, PHP_URL_SCHEME)) { + return new RedirectResponse($path, $statusCode); + } + + if (null === $scheme) { + $scheme = $request->getScheme(); + } + + $qs = $request->getQueryString(); + if ($qs) { + if (strpos($path, '?') === false) { + $qs = '?'.$qs; + } else { + $qs = '&'.$qs; + } + } + + $port = ''; + if ('http' === $scheme) { + if (null === $httpPort) { + if ('http' === $request->getScheme()) { + $httpPort = $request->getPort(); + } elseif ($this->container->hasParameter('request_listener.http_port')) { + $httpPort = $this->container->getParameter('request_listener.http_port'); + } + } + + if (null !== $httpPort && 80 != $httpPort) { + $port = ":$httpPort"; + } + } elseif ('https' === $scheme) { + if (null === $httpsPort) { + if ('https' === $request->getScheme()) { + $httpsPort = $request->getPort(); + } elseif ($this->container->hasParameter('request_listener.https_port')) { + $httpsPort = $this->container->getParameter('request_listener.https_port'); + } + } + + if (null !== $httpsPort && 443 != $httpsPort) { + $port = ":$httpsPort"; + } + } + + $url = $scheme.'://'.$request->getHost().$port.$request->getBaseUrl().$path.$qs; + + return new RedirectResponse($url, $statusCode); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php new file mode 100644 index 0000000000000000000000000000000000000000..1d4c44c6b4714dcebe5d1137e0119ca2215d9229 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.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\Bundle\FrameworkBundle\Controller; + +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\HttpFoundation\Response; + +/** + * TemplateController. + * + * @author Fabien Potencier + */ +class TemplateController implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + /** + * Renders a template. + * + * @param string $template The template name + * @param int|null $maxAge Max age for client caching + * @param int|null $sharedAge Max age for shared (proxy) caching + * @param bool|null $private Whether or not caching should apply for client caches only + * + * @return Response A Response instance + */ + public function templateAction($template, $maxAge = null, $sharedAge = null, $private = null) + { + if ($this->container->has('templating')) { + $response = $this->container->get('templating')->renderResponse($template); + } elseif ($this->container->has('twig')) { + $response = new Response($this->container->get('twig')->render($template)); + } else { + throw new \LogicException('You can not use the TemplateController if the Templating Component or the Twig Bundle are not available.'); + } + + if ($maxAge) { + $response->setMaxAge($maxAge); + } + + if ($sharedAge) { + $response->setSharedMaxAge($sharedAge); + } + + if ($private) { + $response->setPrivate(); + } elseif ($private === false || (null === $private && ($maxAge || $sharedAge))) { + $response->setPublic(); + } + + return $response; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DataCollector/RequestDataCollector.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DataCollector/RequestDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..55355bdee705eaea07fecd0b6dee2e5826fead9b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DataCollector/RequestDataCollector.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DataCollector; + +use Symfony\Component\HttpFoundation\ParameterBag; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector as BaseRequestCollector; +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * RequestDataCollector. + * + * @author Jules Pietri + */ +class RequestDataCollector extends BaseRequestCollector implements EventSubscriberInterface +{ + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + parent::collect($request, $response, $exception); + + if ($parentRequestAttributes = $request->attributes->get('_forwarded')) { + if ($parentRequestAttributes instanceof ParameterBag) { + $parentRequestAttributes->set('_forward_token', $response->headers->get('x-debug-token')); + } + } + if ($request->attributes->has('_forward_controller')) { + $this->data['forward'] = array( + 'token' => $request->attributes->get('_forward_token'), + 'controller' => $this->parseController($request->attributes->get('_forward_controller')), + ); + } + } + + /** + * Gets the parsed forward controller. + * + * @return array|bool An array with keys 'token' the forward profile token, and + * 'controller' the parsed forward controller, false otherwise + */ + public function getForward() + { + return isset($this->data['forward']) ? $this->data['forward'] : false; + } + + public function onKernelController(FilterControllerEvent $event) + { + $this->controllers[$event->getRequest()] = $event->getController(); + + if ($parentRequestAttributes = $event->getRequest()->attributes->get('_forwarded')) { + if ($parentRequestAttributes instanceof ParameterBag) { + $parentRequestAttributes->set('_forward_controller', $event->getController()); + } + } + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'request'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DataCollector/RouterDataCollector.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DataCollector/RouterDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..b7289e793dc0a1a653165f226e1db160f422ae62 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DataCollector/RouterDataCollector.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DataCollector; + +use Symfony\Component\HttpKernel\DataCollector\RouterDataCollector as BaseRouterDataCollector; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Bundle\FrameworkBundle\Controller\RedirectController; + +/** + * RouterDataCollector. + * + * @author Fabien Potencier + */ +class RouterDataCollector extends BaseRouterDataCollector +{ + public function guessRoute(Request $request, $controller) + { + if (is_array($controller)) { + $controller = $controller[0]; + } + + if ($controller instanceof RedirectController) { + return $request->attributes->get('_route'); + } + + return parent::guessRoute($request, $controller); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php new file mode 100644 index 0000000000000000000000000000000000000000..508899379f691ba0215eebbfeea6d12420574eec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.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\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * @internal + */ +class AddAnnotationsCachedReaderPass implements CompilerPassInterface +{ + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + // "annotations.cached_reader" is wired late so that any passes using + // "annotation_reader" at build time don't get any cache + if ($container->hasDefinition('annotations.cached_reader')) { + $reader = $container->getDefinition('annotations.cached_reader'); + $tags = $reader->getTags(); + + if (isset($tags['annotations.cached_reader'][0]['provider'])) { + if ($container->hasAlias($provider = $tags['annotations.cached_reader'][0]['provider'])) { + $provider = (string) $container->getAlias($provider); + } + $container->set('annotations.cached_reader', null); + $container->setDefinition('annotations.cached_reader', $reader->replaceArgument(1, new Reference($provider))); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddCacheClearerPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddCacheClearerPass.php new file mode 100644 index 0000000000000000000000000000000000000000..27b9b465c913c10aa089710e633a5cb9f82dfe50 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddCacheClearerPass.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Registers the cache clearers. + * + * @author Dustin Dobervich + */ +class AddCacheClearerPass implements CompilerPassInterface +{ + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('cache_clearer')) { + return; + } + + $clearers = array(); + foreach ($container->findTaggedServiceIds('kernel.cache_clearer') as $id => $attributes) { + $clearers[] = new Reference($id); + } + + $container->getDefinition('cache_clearer')->replaceArgument(0, $clearers); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddCacheWarmerPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddCacheWarmerPass.php new file mode 100644 index 0000000000000000000000000000000000000000..8f5353121ce8b0f839d7cc4769ef299dd0030fc6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddCacheWarmerPass.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; + +/** + * Registers the cache warmers. + * + * @author Fabien Potencier + */ +class AddCacheWarmerPass implements CompilerPassInterface +{ + use PriorityTaggedServiceTrait; + + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('cache_warmer')) { + return; + } + + $warmers = $this->findAndSortTaggedServices('kernel.cache_warmer', $container); + + if (empty($warmers)) { + return; + } + + $container->getDefinition('cache_warmer')->replaceArgument(0, $warmers); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConsoleCommandPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConsoleCommandPass.php new file mode 100644 index 0000000000000000000000000000000000000000..37d7810ecac7a707cd14fa7c2b82560fd31e1f2e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConsoleCommandPass.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * AddConsoleCommandPass. + * + * @author Grégoire Pineau + */ +class AddConsoleCommandPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + $commandServices = $container->findTaggedServiceIds('console.command'); + $serviceIds = array(); + + foreach ($commandServices as $id => $tags) { + $definition = $container->getDefinition($id); + + if ($definition->isAbstract()) { + throw new InvalidArgumentException(sprintf('The service "%s" tagged "console.command" must not be abstract.', $id)); + } + + $class = $container->getParameterBag()->resolveValue($definition->getClass()); + if (!is_subclass_of($class, 'Symfony\\Component\\Console\\Command\\Command')) { + if (!class_exists($class, false)) { + throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); + } + + throw new InvalidArgumentException(sprintf('The service "%s" tagged "console.command" must be a subclass of "Symfony\\Component\\Console\\Command\\Command".', $id)); + } + $container->setAlias($serviceId = 'console.command.'.strtolower(str_replace('\\', '_', $class)), $id); + $serviceIds[] = $definition->isPublic() ? $id : $serviceId; + } + + $container->setParameter('console.command.ids', $serviceIds); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConstraintValidatorsPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConstraintValidatorsPass.php new file mode 100644 index 0000000000000000000000000000000000000000..497ea08a4bf4e93a8e299e546b04ad54af2bf33c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConstraintValidatorsPass.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +class AddConstraintValidatorsPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('validator.validator_factory')) { + return; + } + + $validators = array(); + foreach ($container->findTaggedServiceIds('validator.constraint_validator') as $id => $attributes) { + if (isset($attributes[0]['alias'])) { + $validators[$attributes[0]['alias']] = $id; + } + + $definition = $container->getDefinition($id); + + if (!$definition->isPublic()) { + throw new InvalidArgumentException(sprintf('The service "%s" must be public as it can be lazy-loaded.', $id)); + } + + if ($definition->isAbstract()) { + throw new InvalidArgumentException(sprintf('The service "%s" must not be abstract as it can be lazy-loaded.', $id)); + } + + $validators[$definition->getClass()] = $id; + } + + $container->getDefinition('validator.validator_factory')->replaceArgument(1, $validators); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php new file mode 100644 index 0000000000000000000000000000000000000000..4d8e5175c673ad97bde56c0c63134edf1e189c22 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Reference; + +class AddDebugLogProcessorPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('profiler')) { + return; + } + if (!$container->hasDefinition('monolog.logger_prototype')) { + return; + } + if (!$container->hasDefinition('debug.log_processor')) { + return; + } + + $definition = $container->getDefinition('monolog.logger_prototype'); + $definition->addMethodCall('pushProcessor', array(new Reference('debug.log_processor'))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php new file mode 100644 index 0000000000000000000000000000000000000000..6510d02c83063401e5ba39860bd58a17e8ef91e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Registers the expression language providers. + * + * @author Fabien Potencier + */ +class AddExpressionLanguageProvidersPass implements CompilerPassInterface +{ + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + // routing + if ($container->has('router')) { + $definition = $container->findDefinition('router'); + foreach ($container->findTaggedServiceIds('routing.expression_language_provider') as $id => $attributes) { + $definition->addMethodCall('addExpressionLanguageProvider', array(new Reference($id))); + } + } + + // security + if ($container->has('security.access.expression_voter')) { + $definition = $container->findDefinition('security.access.expression_voter'); + foreach ($container->findTaggedServiceIds('security.expression_language_provider') as $id => $attributes) { + $definition->addMethodCall('addExpressionLanguageProvider', array(new Reference($id))); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddValidatorInitializersPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddValidatorInitializersPass.php new file mode 100644 index 0000000000000000000000000000000000000000..6f58fc21bebf12cb516b5d06924e8acc83e5518a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddValidatorInitializersPass.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; + +class AddValidatorInitializersPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('validator.builder')) { + return; + } + + $validatorBuilder = $container->getDefinition('validator.builder'); + + $initializers = array(); + foreach ($container->findTaggedServiceIds('validator.initializer') as $id => $attributes) { + $initializers[] = new Reference($id); + } + + $validatorBuilder->addMethodCall('addObjectInitializers', array($initializers)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CachePoolClearerPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CachePoolClearerPass.php new file mode 100644 index 0000000000000000000000000000000000000000..901722756bd4a56059b99a959ae6afdcf9bc2a90 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CachePoolClearerPass.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * @author Nicolas Grekas + */ +final class CachePoolClearerPass implements CompilerPassInterface +{ + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + $container->getParameterBag()->remove('cache.prefix.seed'); + + foreach ($container->findTaggedServiceIds('cache.pool') as $id => $attributes) { + foreach (array_reverse($attributes) as $attr) { + if (isset($attr['clearer'])) { + $clearer = $container->getDefinition($attr['clearer']); + $clearer->addMethodCall('addPool', array(new Reference($id))); + } + if (array_key_exists('clearer', $attr)) { + break; + } + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CachePoolPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CachePoolPass.php new file mode 100644 index 0000000000000000000000000000000000000000..db1430eb49b13324f950520eb014e8c9bc9dad73 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CachePoolPass.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\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\Cache\Adapter\RedisAdapter; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * @author Nicolas Grekas + */ +class CachePoolPass implements CompilerPassInterface +{ + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + if ($container->hasParameter('cache.prefix.seed')) { + $seed = '.'.$container->getParameterBag()->resolveValue($container->getParameter('cache.prefix.seed')); + } else { + $seed = '_'.$container->getParameter('kernel.root_dir'); + } + $seed .= '.'.$container->getParameter('kernel.name').'.'.$container->getParameter('kernel.environment'); + + $attributes = array( + 'provider', + 'namespace', + 'default_lifetime', + ); + foreach ($container->findTaggedServiceIds('cache.pool') as $id => $tags) { + $adapter = $pool = $container->getDefinition($id); + if ($pool->isAbstract()) { + continue; + } + while ($adapter instanceof DefinitionDecorator) { + $adapter = $container->findDefinition($adapter->getParent()); + if ($t = $adapter->getTag('cache.pool')) { + $tags[0] += $t[0]; + } + } + if (!isset($tags[0]['namespace'])) { + $tags[0]['namespace'] = $this->getNamespace($seed, $id); + } + if (isset($tags[0]['clearer'])) { + $clearer = $tags[0]['clearer']; + while ($container->hasAlias($clearer)) { + $clearer = (string) $container->getAlias($clearer); + } + } else { + $clearer = null; + } + unset($tags[0]['clearer']); + + if (isset($tags[0]['provider'])) { + $tags[0]['provider'] = new Reference(static::getServiceProvider($container, $tags[0]['provider'])); + } + $i = 0; + foreach ($attributes as $attr) { + if (isset($tags[0][$attr])) { + $pool->replaceArgument($i++, $tags[0][$attr]); + } + unset($tags[0][$attr]); + } + if (!empty($tags[0])) { + throw new InvalidArgumentException(sprintf('Invalid "cache.pool" tag for service "%s": accepted attributes are "clearer", "provider", "namespace" and "default_lifetime", found "%s".', $id, implode('", "', array_keys($tags[0])))); + } + + if (null !== $clearer) { + $pool->addTag('cache.pool', array('clearer' => $clearer)); + } + } + } + + private function getNamespace($seed, $id) + { + return substr(str_replace('/', '-', base64_encode(hash('sha256', $id.$seed, true))), 0, 10); + } + + /** + * @internal + */ + public static function getServiceProvider(ContainerBuilder $container, $name) + { + $container->resolveEnvPlaceholders($name, null, $usedEnvs); + + if (0 === strpos($name, 'redis://') || $usedEnvs) { + $dsn = $name; + + if (!$container->hasDefinition($name = md5($dsn))) { + $definition = new Definition(\Redis::class); + $definition->setPublic(false); + $definition->setFactory(array(RedisAdapter::class, 'createConnection')); + $definition->setArguments(array($dsn)); + $container->setDefinition($name, $definition); + } + } + + return $name; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CompilerDebugDumpPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CompilerDebugDumpPass.php new file mode 100644 index 0000000000000000000000000000000000000000..f152ce8c509cba13a792e428f6251b20df9b9442 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CompilerDebugDumpPass.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\Filesystem\Exception\IOException; +use Symfony\Component\Filesystem\Filesystem; + +class CompilerDebugDumpPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + $filename = self::getCompilerLogFilename($container); + + $filesystem = new Filesystem(); + $filesystem->dumpFile($filename, implode("\n", $container->getCompiler()->getLog()), null); + try { + $filesystem->chmod($filename, 0666, umask()); + } catch (IOException $e) { + // discard chmod failure (some filesystem may not support it) + } + } + + public static function getCompilerLogFilename(ContainerInterface $container) + { + $class = $container->getParameter('kernel.container_class'); + + return $container->getParameter('kernel.cache_dir').'/'.$class.'Compiler.log'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ConfigCachePass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ConfigCachePass.php new file mode 100644 index 0000000000000000000000000000000000000000..d73e941f427ba151af46d9b0449ab99aeb59ad4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ConfigCachePass.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Adds services tagged config_cache.resource_checker to the config_cache_factory service, ordering them by priority. + * + * @author Matthias Pigulla + * @author Benjamin Klotz + */ +class ConfigCachePass implements CompilerPassInterface +{ + use PriorityTaggedServiceTrait; + + public function process(ContainerBuilder $container) + { + $resourceCheckers = $this->findAndSortTaggedServices('config_cache.resource_checker', $container); + + if (empty($resourceCheckers)) { + return; + } + + $container->getDefinition('config_cache_factory')->replaceArgument(0, $resourceCheckers); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php new file mode 100644 index 0000000000000000000000000000000000000000..98fa5c95a15ec969d34a2b95c5f6b7893335ccbb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Dumper\XmlDumper; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\Filesystem\Exception\IOException; +use Symfony\Component\Filesystem\Filesystem; + +/** + * Dumps the ContainerBuilder to a cache file so that it can be used by + * debugging tools such as the debug:container console command. + * + * @author Ryan Weaver + * @author Fabien Potencier + */ +class ContainerBuilderDebugDumpPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + $dumper = new XmlDumper($container); + $filename = $container->getParameter('debug.container.dump'); + $filesystem = new Filesystem(); + $filesystem->dumpFile($filename, $dumper->dump(), null); + try { + $filesystem->chmod($filename, 0666, umask()); + } catch (IOException $e) { + // discard chmod failure (some filesystem may not support it) + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ControllerArgumentValueResolverPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ControllerArgumentValueResolverPass.php new file mode 100644 index 0000000000000000000000000000000000000000..e087e691440f90613a53820cd80d302c9f3d179e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ControllerArgumentValueResolverPass.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Gathers and configures the argument value resolvers. + * + * @author Iltar van der Berg + */ +class ControllerArgumentValueResolverPass implements CompilerPassInterface +{ + use PriorityTaggedServiceTrait; + + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('argument_resolver')) { + return; + } + + $definition = $container->getDefinition('argument_resolver'); + $argumentResolvers = $this->findAndSortTaggedServices('controller.argument_value_resolver', $container); + $definition->replaceArgument(1, $argumentResolvers); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php new file mode 100644 index 0000000000000000000000000000000000000000..ee2bbb6521b170d4adf7f3c0e0a80735b41f2fc8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * @author Christian Flothmann + */ +class DataCollectorTranslatorPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!$container->has('translator')) { + return; + } + + $translatorClass = $container->getParameterBag()->resolveValue($container->findDefinition('translator')->getClass()); + + if (!is_subclass_of($translatorClass, 'Symfony\Component\Translation\TranslatorBagInterface')) { + $container->removeDefinition('translator.data_collector'); + $container->removeDefinition('data_collector.translation'); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php new file mode 100644 index 0000000000000000000000000000000000000000..c248a079df2a98c06ea75b23b3a32d275672a00d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * Adds all services with the tags "form.type" and "form.type_guesser" as + * arguments of the "form.extension" service. + * + * @author Bernhard Schussek + */ +class FormPass implements CompilerPassInterface +{ + use PriorityTaggedServiceTrait; + + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('form.extension')) { + return; + } + + $definition = $container->getDefinition('form.extension'); + + // Builds an array with fully-qualified type class names as keys and service IDs as values + $types = array(); + + foreach ($container->findTaggedServiceIds('form.type') as $serviceId => $tag) { + $serviceDefinition = $container->getDefinition($serviceId); + if (!$serviceDefinition->isPublic()) { + throw new InvalidArgumentException(sprintf('The service "%s" must be public as form types are lazy-loaded.', $serviceId)); + } + + // Support type access by FQCN + $types[$serviceDefinition->getClass()] = $serviceId; + } + + $definition->replaceArgument(1, $types); + + $typeExtensions = array(); + + foreach ($this->findAndSortTaggedServices('form.type_extension', $container) as $reference) { + $serviceId = (string) $reference; + $serviceDefinition = $container->getDefinition($serviceId); + if (!$serviceDefinition->isPublic()) { + throw new InvalidArgumentException(sprintf('The service "%s" must be public as form type extensions are lazy-loaded.', $serviceId)); + } + + $tag = $serviceDefinition->getTag('form.type_extension'); + if (isset($tag[0]['extended_type'])) { + $extendedType = $tag[0]['extended_type']; + } else { + throw new InvalidArgumentException(sprintf('Tagged form type extension must have the extended type configured using the extended_type/extended-type attribute, none was configured for the "%s" service.', $serviceId)); + } + + $typeExtensions[$extendedType][] = $serviceId; + } + + $definition->replaceArgument(2, $typeExtensions); + + // Find all services annotated with "form.type_guesser" + $guessers = array_keys($container->findTaggedServiceIds('form.type_guesser')); + foreach ($guessers as $serviceId) { + $serviceDefinition = $container->getDefinition($serviceId); + if (!$serviceDefinition->isPublic()) { + throw new InvalidArgumentException(sprintf('The service "%s" must be public as form type guessers are lazy-loaded.', $serviceId)); + } + } + + $definition->replaceArgument(3, $guessers); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/LoggingTranslatorPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/LoggingTranslatorPass.php new file mode 100644 index 0000000000000000000000000000000000000000..74d586bf3b85267f1c2a3e6e9f75a1ca05830888 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/LoggingTranslatorPass.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Reference; + +/** + * @author Abdellatif Ait boudad + */ +class LoggingTranslatorPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!$container->hasAlias('logger') || !$container->hasAlias('translator')) { + return; + } + + if ($container->hasParameter('translator.logging') && $container->getParameter('translator.logging')) { + $translatorAlias = $container->getAlias('translator'); + $definition = $container->getDefinition((string) $translatorAlias); + $class = $container->getParameterBag()->resolveValue($definition->getClass()); + + if (is_subclass_of($class, 'Symfony\Component\Translation\TranslatorInterface') && is_subclass_of($class, 'Symfony\Component\Translation\TranslatorBagInterface')) { + $container->getDefinition('translator.logging')->setDecoratedService('translator'); + $container->getDefinition('translation.warmer')->replaceArgument(0, new Reference('translator.logging.inner')); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ProfilerPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ProfilerPass.php new file mode 100644 index 0000000000000000000000000000000000000000..046407351ceeb6916e32ab6ac8b622a2dc9d74cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ProfilerPass.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\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * Adds tagged data_collector services to profiler service. + * + * @author Fabien Potencier + */ +class ProfilerPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (false === $container->hasDefinition('profiler')) { + return; + } + + $definition = $container->getDefinition('profiler'); + + $collectors = new \SplPriorityQueue(); + $order = PHP_INT_MAX; + foreach ($container->findTaggedServiceIds('data_collector') as $id => $attributes) { + $priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0; + $template = null; + + if (isset($attributes[0]['template'])) { + if (!isset($attributes[0]['id'])) { + throw new InvalidArgumentException(sprintf('Data collector service "%s" must have an id attribute in order to specify a template', $id)); + } + $template = array($attributes[0]['id'], $attributes[0]['template']); + } + + $collectors->insert(array($id, $template), array($priority, --$order)); + } + + $templates = array(); + foreach ($collectors as $collector) { + $definition->addMethodCall('add', array(new Reference($collector[0]))); + $templates[$collector[0]] = $collector[1]; + } + + $container->setParameter('data_collector.templates', $templates); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/PropertyInfoPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/PropertyInfoPass.php new file mode 100644 index 0000000000000000000000000000000000000000..f05445f1a6276f5de7787c320c0ab9c462d8bcc4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/PropertyInfoPass.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Adds extractors to the property_info service. + * + * @author Kévin Dunglas + */ +class PropertyInfoPass implements CompilerPassInterface +{ + use PriorityTaggedServiceTrait; + + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('property_info')) { + return; + } + + $definition = $container->getDefinition('property_info'); + + $listExtractors = $this->findAndSortTaggedServices('property_info.list_extractor', $container); + $definition->replaceArgument(0, $listExtractors); + + $typeExtractors = $this->findAndSortTaggedServices('property_info.type_extractor', $container); + $definition->replaceArgument(1, $typeExtractors); + + $descriptionExtractors = $this->findAndSortTaggedServices('property_info.description_extractor', $container); + $definition->replaceArgument(2, $descriptionExtractors); + + $accessExtractors = $this->findAndSortTaggedServices('property_info.access_extractor', $container); + $definition->replaceArgument(3, $accessExtractors); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/RoutingResolverPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/RoutingResolverPass.php new file mode 100644 index 0000000000000000000000000000000000000000..6ff7c124cdac035eca3fa852f43115796d5212ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/RoutingResolverPass.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; + +/** + * Adds tagged routing.loader services to routing.resolver service. + * + * @author Fabien Potencier + */ +class RoutingResolverPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (false === $container->hasDefinition('routing.resolver')) { + return; + } + + $definition = $container->getDefinition('routing.resolver'); + + foreach ($container->findTaggedServiceIds('routing.loader') as $id => $attributes) { + $definition->addMethodCall('addLoader', array(new Reference($id))); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SerializerPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SerializerPass.php new file mode 100644 index 0000000000000000000000000000000000000000..d3d3019998c8429dc5693122f1eaa19c504f556c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SerializerPass.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; + +/** + * Adds all services with the tags "serializer.encoder" and "serializer.normalizer" as + * encoders and normalizers to the Serializer service. + * + * @author Javier Lopez + */ +class SerializerPass implements CompilerPassInterface +{ + use PriorityTaggedServiceTrait; + + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('serializer')) { + return; + } + + // Looks for all the services tagged "serializer.normalizer" and adds them to the Serializer service + $normalizers = $this->findAndSortTaggedServices('serializer.normalizer', $container); + + if (empty($normalizers)) { + throw new RuntimeException('You must tag at least one service as "serializer.normalizer" to use the Serializer service'); + } + $container->getDefinition('serializer')->replaceArgument(0, $normalizers); + + // Looks for all the services tagged "serializer.encoders" and adds them to the Serializer service + $encoders = $this->findAndSortTaggedServices('serializer.encoder', $container); + if (empty($encoders)) { + throw new RuntimeException('You must tag at least one service as "serializer.encoder" to use the Serializer service'); + } + $container->getDefinition('serializer')->replaceArgument(1, $encoders); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TemplatingPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TemplatingPass.php new file mode 100644 index 0000000000000000000000000000000000000000..4ef67a42b6fe6cd0975821c01b62eed1d387c350 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TemplatingPass.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface as FrameworkBundleEngineInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\Templating\EngineInterface as ComponentEngineInterface; + +class TemplatingPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if ($container->hasDefinition('templating')) { + return; + } + + if ($container->hasAlias('templating')) { + $definition = $container->findDefinition('templating'); + $definition->setAutowiringTypes(array(ComponentEngineInterface::class, FrameworkBundleEngineInterface::class)); + } + + if ($container->hasDefinition('templating.engine.php')) { + $helpers = array(); + foreach ($container->findTaggedServiceIds('templating.helper') as $id => $attributes) { + if (isset($attributes[0]['alias'])) { + $helpers[$attributes[0]['alias']] = $id; + } + } + + if (count($helpers) > 0) { + $definition = $container->getDefinition('templating.engine.php'); + $definition->addMethodCall('setHelpers', array($helpers)); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslationDumperPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslationDumperPass.php new file mode 100644 index 0000000000000000000000000000000000000000..f7c09748b4f7e9b97d76a6108854e717faf2fe3d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslationDumperPass.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; + +/** + * Adds tagged translation.formatter services to translation writer. + */ +class TranslationDumperPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('translation.writer')) { + return; + } + + $definition = $container->getDefinition('translation.writer'); + + foreach ($container->findTaggedServiceIds('translation.dumper') as $id => $attributes) { + $definition->addMethodCall('addDumper', array($attributes[0]['alias'], new Reference($id))); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslationExtractorPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslationExtractorPass.php new file mode 100644 index 0000000000000000000000000000000000000000..fc8a66d24fa06805d08b61a208c5856e2bc42b67 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslationExtractorPass.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; + +/** + * Adds tagged translation.extractor services to translation extractor. + */ +class TranslationExtractorPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('translation.extractor')) { + return; + } + + $definition = $container->getDefinition('translation.extractor'); + + foreach ($container->findTaggedServiceIds('translation.extractor') as $id => $attributes) { + if (!isset($attributes[0]['alias'])) { + throw new RuntimeException(sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id)); + } + + $definition->addMethodCall('addExtractor', array($attributes[0]['alias'], new Reference($id))); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslatorPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslatorPass.php new file mode 100644 index 0000000000000000000000000000000000000000..4e450166afa445c611bf441a7db23d8ba8ae9878 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslatorPass.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\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; + +class TranslatorPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('translator.default')) { + return; + } + + $loaders = array(); + foreach ($container->findTaggedServiceIds('translation.loader') as $id => $attributes) { + $loaders[$id][] = $attributes[0]['alias']; + if (isset($attributes[0]['legacy-alias'])) { + $loaders[$id][] = $attributes[0]['legacy-alias']; + } + } + + if ($container->hasDefinition('translation.loader')) { + $definition = $container->getDefinition('translation.loader'); + foreach ($loaders as $id => $formats) { + foreach ($formats as $format) { + $definition->addMethodCall('addLoader', array($format, new Reference($id))); + } + } + } + + $container->findDefinition('translator.default')->replaceArgument(2, $loaders); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php new file mode 100644 index 0000000000000000000000000000000000000000..ed852fd0419426d680f27579267fcff359f9dfcc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Find all service tags which are defined, but not used and yield a warning log message. + * + * @author Florian Pfitzer + */ +class UnusedTagsPass implements CompilerPassInterface +{ + private $whitelist = array( + 'console.command', + 'config_cache.resource_checker', + 'data_collector', + 'form.type', + 'form.type_extension', + 'form.type_guesser', + 'kernel.cache_clearer', + 'kernel.cache_warmer', + 'kernel.event_listener', + 'kernel.event_subscriber', + 'kernel.fragment_renderer', + 'monolog.logger', + 'routing.expression_language_provider', + 'routing.loader', + 'security.expression_language_provider', + 'security.remember_me_aware', + 'security.voter', + 'serializer.encoder', + 'serializer.normalizer', + 'templating.helper', + 'translation.dumper', + 'translation.extractor', + 'translation.loader', + 'twig.extension', + 'twig.loader', + 'validator.constraint_validator', + 'validator.initializer', + ); + + public function process(ContainerBuilder $container) + { + $compiler = $container->getCompiler(); + $formatter = $compiler->getLoggingFormatter(); + $tags = array_unique(array_merge($container->findTags(), $this->whitelist)); + + foreach ($container->findUnusedTags() as $tag) { + // skip whitelisted tags + if (in_array($tag, $this->whitelist)) { + continue; + } + + // check for typos + $candidates = array(); + foreach ($tags as $definedTag) { + if ($definedTag === $tag) { + continue; + } + + if (false !== strpos($definedTag, $tag) || levenshtein($tag, $definedTag) <= strlen($tag) / 3) { + $candidates[] = $definedTag; + } + } + + $services = array_keys($container->findTaggedServiceIds($tag)); + $message = sprintf('Tag "%s" was defined on service(s) "%s", but was never used.', $tag, implode('", "', $services)); + if (!empty($candidates)) { + $message .= sprintf(' Did you mean "%s"?', implode('", "', $candidates)); + } + + $compiler->addLogMessage($formatter->format($this, $message)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ValidateWorkflowsPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ValidateWorkflowsPass.php new file mode 100644 index 0000000000000000000000000000000000000000..a2f695992926da06e2ba2aede3520a202f0bf1c6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ValidateWorkflowsPass.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\Workflow\Validator\DefinitionValidatorInterface; +use Symfony\Component\Workflow\Validator\StateMachineValidator; +use Symfony\Component\Workflow\Validator\WorkflowValidator; + +/** + * @author Tobias Nyholm + */ +class ValidateWorkflowsPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + $taggedServices = $container->findTaggedServiceIds('workflow.definition'); + foreach ($taggedServices as $id => $tags) { + $definition = $container->get($id); + foreach ($tags as $tag) { + if (!array_key_exists('name', $tag)) { + throw new RuntimeException(sprintf('The "name" for the tag "workflow.definition" of service "%s" must be set.', $id)); + } + if (!array_key_exists('type', $tag)) { + throw new RuntimeException(sprintf('The "type" for the tag "workflow.definition" of service "%s" must be set.', $id)); + } + if (!array_key_exists('marking_store', $tag)) { + throw new RuntimeException(sprintf('The "marking_store" for the tag "workflow.definition" of service "%s" must be set.', $id)); + } + + $this->createValidator($tag)->validate($definition, $tag['name']); + } + } + } + + /** + * @param array $tag + * + * @return DefinitionValidatorInterface + */ + private function createValidator($tag) + { + if ('state_machine' === $tag['type']) { + return new StateMachineValidator(); + } + + if ('single_state' === $tag['marking_store']) { + return new WorkflowValidator(true); + } + + return new WorkflowValidator(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php new file mode 100644 index 0000000000000000000000000000000000000000..4a8fef38d3093611b6b9be2f12c94159b0110d30 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -0,0 +1,756 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection; + +use Doctrine\Common\Annotations\Annotation; +use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +/** + * FrameworkExtension configuration structure. + * + * @author Jeremy Mikola + */ +class Configuration implements ConfigurationInterface +{ + private $debug; + + /** + * @param bool $debug Whether debugging is enabled or not + */ + public function __construct($debug) + { + $this->debug = (bool) $debug; + } + + /** + * Generates the configuration tree builder. + * + * @return TreeBuilder The tree builder + */ + public function getConfigTreeBuilder() + { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('framework'); + + $rootNode + ->beforeNormalization() + ->ifTrue(function ($v) { return !isset($v['assets']) && isset($v['templating']); }) + ->then(function ($v) { + $v['assets'] = array(); + + return $v; + }) + ->end() + ->children() + ->scalarNode('secret')->end() + ->scalarNode('http_method_override') + ->info("Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. Note: When using the HttpCache, you need to call the method in your front controller instead") + ->defaultTrue() + ->end() + ->arrayNode('trusted_proxies') + ->beforeNormalization() + ->ifTrue(function ($v) { return !is_array($v) && null !== $v; }) + ->then(function ($v) { return is_bool($v) ? array() : preg_split('/\s*,\s*/', $v); }) + ->end() + ->prototype('scalar') + ->validate() + ->ifTrue(function ($v) { + if (empty($v)) { + return false; + } + + if (false !== strpos($v, '/')) { + if ('0.0.0.0/0' === $v) { + return false; + } + + list($v, $mask) = explode('/', $v, 2); + + if (strcmp($mask, (int) $mask) || $mask < 1 || $mask > (false !== strpos($v, ':') ? 128 : 32)) { + return true; + } + } + + return !filter_var($v, FILTER_VALIDATE_IP); + }) + ->thenInvalid('Invalid proxy IP "%s"') + ->end() + ->end() + ->end() + ->scalarNode('ide')->defaultNull()->end() + ->booleanNode('test')->end() + ->scalarNode('default_locale')->defaultValue('en')->end() + ->arrayNode('trusted_hosts') + ->beforeNormalization()->ifString()->then(function ($v) { return array($v); })->end() + ->prototype('scalar')->end() + ->end() + ->end() + ; + + $this->addCsrfSection($rootNode); + $this->addFormSection($rootNode); + $this->addEsiSection($rootNode); + $this->addSsiSection($rootNode); + $this->addFragmentsSection($rootNode); + $this->addProfilerSection($rootNode); + $this->addWorkflowSection($rootNode); + $this->addRouterSection($rootNode); + $this->addSessionSection($rootNode); + $this->addRequestSection($rootNode); + $this->addTemplatingSection($rootNode); + $this->addAssetsSection($rootNode); + $this->addTranslatorSection($rootNode); + $this->addValidationSection($rootNode); + $this->addAnnotationsSection($rootNode); + $this->addSerializerSection($rootNode); + $this->addPropertyAccessSection($rootNode); + $this->addPropertyInfoSection($rootNode); + $this->addCacheSection($rootNode); + $this->addPhpErrorsSection($rootNode); + + return $treeBuilder; + } + + private function addCsrfSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('csrf_protection') + ->canBeEnabled() + ->end() + ->end() + ; + } + + private function addFormSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('form') + ->info('form configuration') + ->canBeEnabled() + ->children() + ->arrayNode('csrf_protection') + ->treatFalseLike(array('enabled' => false)) + ->treatTrueLike(array('enabled' => true)) + ->treatNullLike(array('enabled' => true)) + ->addDefaultsIfNotSet() + ->children() + ->booleanNode('enabled')->defaultNull()->end() // defaults to framework.csrf_protection.enabled + ->scalarNode('field_name')->defaultValue('_token')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addEsiSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('esi') + ->info('esi configuration') + ->canBeEnabled() + ->end() + ->end() + ; + } + + private function addSsiSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('ssi') + ->info('ssi configuration') + ->canBeEnabled() + ->end() + ->end(); + } + + private function addFragmentsSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('fragments') + ->info('fragments configuration') + ->canBeEnabled() + ->children() + ->scalarNode('path')->defaultValue('/_fragment')->end() + ->end() + ->end() + ->end() + ; + } + + private function addProfilerSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('profiler') + ->info('profiler configuration') + ->canBeEnabled() + ->children() + ->booleanNode('collect')->defaultTrue()->end() + ->booleanNode('only_exceptions')->defaultFalse()->end() + ->booleanNode('only_master_requests')->defaultFalse()->end() + ->scalarNode('dsn')->defaultValue('file:%kernel.cache_dir%/profiler')->end() + ->arrayNode('matcher') + ->canBeEnabled() + ->performNoDeepMerging() + ->fixXmlConfig('ip') + ->children() + ->scalarNode('path') + ->info('use the urldecoded format') + ->example('^/path to resource/') + ->end() + ->scalarNode('service')->end() + ->arrayNode('ips') + ->beforeNormalization()->ifString()->then(function ($v) { return array($v); })->end() + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addWorkflowSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->fixXmlConfig('workflow') + ->children() + ->arrayNode('workflows') + ->useAttributeAsKey('name') + ->prototype('array') + ->fixXmlConfig('support') + ->fixXmlConfig('place') + ->fixXmlConfig('transition') + ->children() + ->enumNode('type') + ->values(array('workflow', 'state_machine')) + ->defaultValue('workflow') + ->end() + ->arrayNode('marking_store') + ->fixXmlConfig('argument') + ->children() + ->enumNode('type') + ->values(array('multiple_state', 'single_state')) + ->end() + ->arrayNode('arguments') + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array($v); }) + ->end() + ->requiresAtLeastOneElement() + ->prototype('scalar') + ->end() + ->end() + ->scalarNode('service') + ->cannotBeEmpty() + ->end() + ->end() + ->validate() + ->ifTrue(function ($v) { return isset($v['type']) && isset($v['service']); }) + ->thenInvalid('"type" and "service" cannot be used together.') + ->end() + ->validate() + ->ifTrue(function ($v) { return !empty($v['arguments']) && isset($v['service']); }) + ->thenInvalid('"arguments" and "service" cannot be used together.') + ->end() + ->end() + ->arrayNode('supports') + ->isRequired() + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array($v); }) + ->end() + ->prototype('scalar') + ->cannotBeEmpty() + ->validate() + ->ifTrue(function ($v) { return !class_exists($v); }) + ->thenInvalid('The supported class %s does not exist.') + ->end() + ->end() + ->end() + ->scalarNode('initial_place')->defaultNull()->end() + ->arrayNode('places') + ->isRequired() + ->requiresAtLeastOneElement() + ->prototype('scalar') + ->cannotBeEmpty() + ->end() + ->end() + ->arrayNode('transitions') + ->beforeNormalization() + ->always() + ->then(function ($transitions) { + // It's an indexed array, we let the validation occurs + if (isset($transitions[0])) { + return $transitions; + } + + foreach ($transitions as $name => $transition) { + if (array_key_exists('name', $transition)) { + continue; + } + $transition['name'] = $name; + $transitions[$name] = $transition; + } + + return $transitions; + }) + ->end() + ->isRequired() + ->requiresAtLeastOneElement() + ->prototype('array') + ->children() + ->scalarNode('name') + ->isRequired() + ->cannotBeEmpty() + ->end() + ->arrayNode('from') + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array($v); }) + ->end() + ->requiresAtLeastOneElement() + ->prototype('scalar') + ->cannotBeEmpty() + ->end() + ->end() + ->arrayNode('to') + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return array($v); }) + ->end() + ->requiresAtLeastOneElement() + ->prototype('scalar') + ->cannotBeEmpty() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addRouterSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('router') + ->info('router configuration') + ->canBeEnabled() + ->children() + ->scalarNode('resource')->isRequired()->end() + ->scalarNode('type')->end() + ->scalarNode('http_port')->defaultValue(80)->end() + ->scalarNode('https_port')->defaultValue(443)->end() + ->scalarNode('strict_requirements') + ->info( + "set to true to throw an exception when a parameter does not match the requirements\n". + "set to false to disable exceptions when a parameter does not match the requirements (and return null instead)\n". + "set to null to disable parameter checks against requirements\n". + "'true' is the preferred configuration in development mode, while 'false' or 'null' might be preferred in production" + ) + ->defaultTrue() + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addSessionSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('session') + ->info('session configuration') + ->canBeEnabled() + ->children() + ->scalarNode('storage_id')->defaultValue('session.storage.native')->end() + ->scalarNode('handler_id')->defaultValue('session.handler.native_file')->end() + ->scalarNode('name')->end() + ->scalarNode('cookie_lifetime')->end() + ->scalarNode('cookie_path')->end() + ->scalarNode('cookie_domain')->end() + ->booleanNode('cookie_secure')->end() + ->booleanNode('cookie_httponly')->defaultTrue()->end() + ->booleanNode('use_cookies')->end() + ->scalarNode('gc_divisor')->end() + ->scalarNode('gc_probability')->defaultValue(1)->end() + ->scalarNode('gc_maxlifetime')->end() + ->scalarNode('save_path')->defaultValue('%kernel.cache_dir%/sessions')->end() + ->integerNode('metadata_update_threshold') + ->defaultValue('0') + ->info('seconds to wait between 2 session metadata updates, it will also prevent the session handler to write if the session has not changed') + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addRequestSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('request') + ->info('request configuration') + ->canBeEnabled() + ->fixXmlConfig('format') + ->children() + ->arrayNode('formats') + ->useAttributeAsKey('name') + ->prototype('array') + ->beforeNormalization() + ->ifTrue(function ($v) { return is_array($v) && isset($v['mime_type']); }) + ->then(function ($v) { return $v['mime_type']; }) + ->end() + ->beforeNormalization() + ->ifTrue(function ($v) { return !is_array($v); }) + ->then(function ($v) { return array($v); }) + ->end() + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addTemplatingSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('templating') + ->info('templating configuration') + ->canBeEnabled() + ->beforeNormalization() + ->ifTrue(function ($v) { return false === $v || is_array($v) && false === $v['enabled']; }) + ->then(function () { return array('enabled' => false, 'engines' => false); }) + ->end() + ->children() + ->scalarNode('hinclude_default_template')->defaultNull()->end() + ->scalarNode('cache')->end() + ->arrayNode('form') + ->addDefaultsIfNotSet() + ->fixXmlConfig('resource') + ->children() + ->arrayNode('resources') + ->addDefaultChildrenIfNoneSet() + ->prototype('scalar')->defaultValue('FrameworkBundle:Form')->end() + ->validate() + ->ifTrue(function ($v) {return !in_array('FrameworkBundle:Form', $v); }) + ->then(function ($v) { + return array_merge(array('FrameworkBundle:Form'), $v); + }) + ->end() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('engine') + ->children() + ->arrayNode('engines') + ->example(array('twig')) + ->isRequired() + ->requiresAtLeastOneElement() + ->canBeUnset() + ->beforeNormalization() + ->ifTrue(function ($v) { return !is_array($v) && false !== $v; }) + ->then(function ($v) { return array($v); }) + ->end() + ->prototype('scalar')->end() + ->end() + ->end() + ->fixXmlConfig('loader') + ->children() + ->arrayNode('loaders') + ->beforeNormalization() + ->ifTrue(function ($v) { return !is_array($v); }) + ->then(function ($v) { return array($v); }) + ->end() + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addAssetsSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('assets') + ->info('assets configuration') + ->canBeEnabled() + ->fixXmlConfig('base_url') + ->children() + ->scalarNode('version_strategy')->defaultNull()->end() + ->scalarNode('version')->defaultNull()->end() + ->scalarNode('version_format')->defaultValue('%%s?%%s')->end() + ->scalarNode('base_path')->defaultValue('')->end() + ->arrayNode('base_urls') + ->requiresAtLeastOneElement() + ->beforeNormalization() + ->ifTrue(function ($v) { return !is_array($v); }) + ->then(function ($v) { return array($v); }) + ->end() + ->prototype('scalar')->end() + ->end() + ->end() + ->validate() + ->ifTrue(function ($v) { + return isset($v['version_strategy']) && isset($v['version']); + }) + ->thenInvalid('You cannot use both "version_strategy" and "version" at the same time under "assets".') + ->end() + ->fixXmlConfig('package') + ->children() + ->arrayNode('packages') + ->useAttributeAsKey('name') + ->prototype('array') + ->fixXmlConfig('base_url') + ->children() + ->scalarNode('version_strategy')->defaultNull()->end() + ->scalarNode('version') + ->beforeNormalization() + ->ifTrue(function ($v) { return '' === $v; }) + ->then(function ($v) { return; }) + ->end() + ->end() + ->scalarNode('version_format')->defaultNull()->end() + ->scalarNode('base_path')->defaultValue('')->end() + ->arrayNode('base_urls') + ->requiresAtLeastOneElement() + ->beforeNormalization() + ->ifTrue(function ($v) { return !is_array($v); }) + ->then(function ($v) { return array($v); }) + ->end() + ->prototype('scalar')->end() + ->end() + ->end() + ->validate() + ->ifTrue(function ($v) { + return isset($v['version_strategy']) && isset($v['version']); + }) + ->thenInvalid('You cannot use both "version_strategy" and "version" at the same time under "assets" packages.') + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addTranslatorSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('translator') + ->info('translator configuration') + ->canBeEnabled() + ->fixXmlConfig('fallback') + ->fixXmlConfig('path') + ->children() + ->arrayNode('fallbacks') + ->beforeNormalization()->ifString()->then(function ($v) { return array($v); })->end() + ->prototype('scalar')->end() + ->defaultValue(array('en')) + ->end() + ->booleanNode('logging')->defaultValue($this->debug)->end() + ->arrayNode('paths') + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addValidationSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('validation') + ->info('validation configuration') + ->canBeEnabled() + ->children() + ->scalarNode('cache')->end() + ->booleanNode('enable_annotations')->defaultFalse()->end() + ->arrayNode('static_method') + ->defaultValue(array('loadValidatorMetadata')) + ->prototype('scalar')->end() + ->treatFalseLike(array()) + ->validate() + ->ifTrue(function ($v) { return !is_array($v); }) + ->then(function ($v) { return (array) $v; }) + ->end() + ->end() + ->scalarNode('translation_domain')->defaultValue('validators')->end() + ->booleanNode('strict_email')->defaultFalse()->end() + ->end() + ->end() + ->end() + ; + } + + private function addAnnotationsSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('annotations') + ->info('annotation configuration') + ->{class_exists(Annotation::class) ? 'canBeDisabled' : 'canBeEnabled'}() + ->children() + ->scalarNode('cache')->defaultValue('php_array')->end() + ->scalarNode('file_cache_dir')->defaultValue('%kernel.cache_dir%/annotations')->end() + ->booleanNode('debug')->defaultValue($this->debug)->end() + ->end() + ->end() + ->end() + ; + } + + private function addSerializerSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('serializer') + ->info('serializer configuration') + ->canBeEnabled() + ->children() + ->booleanNode('enable_annotations')->defaultFalse()->end() + ->scalarNode('cache')->end() + ->scalarNode('name_converter')->end() + ->end() + ->end() + ->end() + ; + } + + private function addPropertyAccessSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('property_access') + ->addDefaultsIfNotSet() + ->info('Property access configuration') + ->children() + ->booleanNode('magic_call')->defaultFalse()->end() + ->booleanNode('throw_exception_on_invalid_index')->defaultFalse()->end() + ->end() + ->end() + ->end() + ; + } + + private function addPropertyInfoSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('property_info') + ->info('Property info configuration') + ->canBeEnabled() + ->end() + ->end() + ; + } + + private function addCacheSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('cache') + ->info('Cache configuration') + ->addDefaultsIfNotSet() + ->fixXmlConfig('pool') + ->children() + ->scalarNode('prefix_seed') + ->info('Used to namespace cache keys when using several apps with the same shared backend') + ->example('my-application-name') + ->end() + ->scalarNode('app') + ->info('App related cache pools configuration') + ->defaultValue('cache.adapter.filesystem') + ->end() + ->scalarNode('system') + ->info('System related cache pools configuration') + ->defaultValue('cache.adapter.system') + ->end() + ->scalarNode('directory')->defaultValue('%kernel.cache_dir%/pools')->end() + ->scalarNode('default_doctrine_provider')->end() + ->scalarNode('default_psr6_provider')->end() + ->scalarNode('default_redis_provider')->defaultValue('redis://localhost')->end() + ->arrayNode('pools') + ->useAttributeAsKey('name') + ->prototype('array') + ->children() + ->scalarNode('adapter')->defaultValue('cache.app')->end() + ->booleanNode('public')->defaultFalse()->end() + ->integerNode('default_lifetime')->end() + ->scalarNode('provider') + ->info('The service name to use as provider when the specified adapter needs one.') + ->end() + ->scalarNode('clearer')->end() + ->end() + ->end() + ->validate() + ->ifTrue(function ($v) { return isset($v['cache.app']) || isset($v['cache.system']); }) + ->thenInvalid('"cache.app" and "cache.system" are reserved names') + ->end() + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addPhpErrorsSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('php_errors') + ->info('PHP errors handling configuration') + ->addDefaultsIfNotSet() + ->children() + ->booleanNode('log') + ->info('Use the app logger instead of the PHP logger for logging PHP errors.') + ->defaultValue($this->debug) + ->treatNullLike($this->debug) + ->end() + ->booleanNode('throw') + ->info('Throw PHP errors as \ErrorException instances.') + ->defaultValue($this->debug) + ->treatNullLike($this->debug) + ->end() + ->end() + ->end() + ->end() + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..601e120885fd9a85bfb2c4187aa932d81d472d85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -0,0 +1,1309 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\DependencyInjection; + +use Doctrine\Common\Annotations\Reader; +use Symfony\Bridge\Monolog\Processor\DebugProcessor; +use Symfony\Component\Cache\Adapter\AdapterInterface; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Exception\LogicException; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Config\Resource\DirectoryResource; +use Symfony\Component\Finder\Finder; +use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\PropertyAccess\PropertyAccessor; +use Symfony\Component\Serializer\Encoder\YamlEncoder; +use Symfony\Component\Serializer\Encoder\CsvEncoder; +use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; +use Symfony\Component\Serializer\Normalizer\DataUriNormalizer; +use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; +use Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer; +use Symfony\Component\Workflow; + +/** + * FrameworkExtension. + * + * @author Fabien Potencier + * @author Jeremy Mikola + * @author Kévin Dunglas + * @author Grégoire Pineau + */ +class FrameworkExtension extends Extension +{ + private $formConfigEnabled = false; + private $translationConfigEnabled = false; + private $sessionConfigEnabled = false; + private $annotationsConfigEnabled = false; + + /** + * @var string|null + */ + private $kernelRootHash; + + /** + * Responds to the app.config configuration parameter. + * + * @param array $configs + * @param ContainerBuilder $container + * + * @throws LogicException + */ + public function load(array $configs, ContainerBuilder $container) + { + $loader = new XmlFileLoader($container, new FileLocator(dirname(__DIR__).'/Resources/config')); + + $loader->load('web.xml'); + $loader->load('services.xml'); + $loader->load('fragment_renderer.xml'); + + // Property access is used by both the Form and the Validator component + $loader->load('property_access.xml'); + + // Load Cache configuration first as it is used by other components + $loader->load('cache.xml'); + + $configuration = $this->getConfiguration($configs, $container); + $config = $this->processConfiguration($configuration, $configs); + + $this->annotationsConfigEnabled = $this->isConfigEnabled($container, $config['annotations']); + + // A translator must always be registered (as support is included by + // default in the Form component). If disabled, an identity translator + // will be used and everything will still work as expected. + if (class_exists('Symfony\Component\Translation\Translator') || $this->isConfigEnabled($container, $config['form'])) { + if (!class_exists('Symfony\Component\Translation\Translator')) { + throw new LogicException('Form support cannot be enabled as the Translation component is not installed.'); + } + + $loader->load('translation.xml'); + } + + if (isset($config['secret'])) { + $container->setParameter('kernel.secret', $config['secret']); + } + + $container->setParameter('kernel.http_method_override', $config['http_method_override']); + $container->setParameter('kernel.trusted_hosts', $config['trusted_hosts']); + $container->setParameter('kernel.trusted_proxies', $config['trusted_proxies']); + $container->setParameter('kernel.default_locale', $config['default_locale']); + + if (!$container->hasParameter('debug.file_link_format')) { + if (!$container->hasParameter('templating.helper.code.file_link_format')) { + $links = array( + 'textmate' => 'txmt://open?url=file://%%f&line=%%l', + 'macvim' => 'mvim://open?url=file://%%f&line=%%l', + 'emacs' => 'emacs://open?url=file://%%f&line=%%l', + 'sublime' => 'subl://open?url=file://%%f&line=%%l', + 'phpstorm' => 'phpstorm://open?file=%%f&line=%%l', + ); + $ide = $config['ide']; + + $container->setParameter('templating.helper.code.file_link_format', str_replace('%', '%%', ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')) ?: (isset($links[$ide]) ? $links[$ide] : $ide)); + } + $container->setParameter('debug.file_link_format', '%templating.helper.code.file_link_format%'); + } + + if (!empty($config['test'])) { + $loader->load('test.xml'); + } + + if ($this->isConfigEnabled($container, $config['session'])) { + $this->sessionConfigEnabled = true; + $this->registerSessionConfiguration($config['session'], $container, $loader); + } + + if ($this->isConfigEnabled($container, $config['request'])) { + $this->registerRequestConfiguration($config['request'], $container, $loader); + } + + if ($this->isConfigEnabled($container, $config['form'])) { + $this->formConfigEnabled = true; + $this->registerFormConfiguration($config, $container, $loader); + $config['validation']['enabled'] = true; + + if (!class_exists('Symfony\Component\Validator\Validation')) { + throw new LogicException('The Validator component is required to use the Form component.'); + } + } + + $this->registerSecurityCsrfConfiguration($config['csrf_protection'], $container, $loader); + + if ($this->isConfigEnabled($container, $config['assets'])) { + if (!class_exists('Symfony\Component\Asset\Package')) { + throw new LogicException('Asset support cannot be enabled as the Asset component is not installed.'); + } + + $this->registerAssetsConfiguration($config['assets'], $container, $loader); + } + + if ($this->isConfigEnabled($container, $config['templating'])) { + if (!class_exists('Symfony\Component\Templating\PhpEngine')) { + throw new LogicException('Templating support cannot be enabled as the Templating component is not installed.'); + } + + $this->registerTemplatingConfiguration($config['templating'], $container, $loader); + } + + $this->registerValidationConfiguration($config['validation'], $container, $loader); + $this->registerEsiConfiguration($config['esi'], $container, $loader); + $this->registerSsiConfiguration($config['ssi'], $container, $loader); + $this->registerFragmentsConfiguration($config['fragments'], $container, $loader); + $this->registerTranslatorConfiguration($config['translator'], $container); + $this->registerProfilerConfiguration($config['profiler'], $container, $loader); + $this->registerCacheConfiguration($config['cache'], $container); + $this->registerWorkflowConfiguration($config['workflows'], $container, $loader); + $this->registerDebugConfiguration($config['php_errors'], $container, $loader); + + if ($this->isConfigEnabled($container, $config['router'])) { + $this->registerRouterConfiguration($config['router'], $container, $loader); + } + + $this->registerAnnotationsConfiguration($config['annotations'], $container, $loader); + $this->registerPropertyAccessConfiguration($config['property_access'], $container); + + if ($this->isConfigEnabled($container, $config['serializer'])) { + $this->registerSerializerConfiguration($config['serializer'], $container, $loader); + } + + if ($this->isConfigEnabled($container, $config['property_info'])) { + $this->registerPropertyInfoConfiguration($config['property_info'], $container, $loader); + } + + $this->addAnnotatedClassesToCompile(array( + '**Bundle\\Controller\\', + '**Bundle\\Entity\\', + + // Added explicitly so that we don't rely on the class map being dumped to make it work + 'Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller', + )); + + $this->addClassesToCompile(array( + 'Symfony\\Component\\Config\\ConfigCache', + 'Symfony\\Component\\Config\\FileLocator', + + 'Symfony\\Component\\Debug\\ErrorHandler', + + 'Symfony\\Component\\DependencyInjection\\ContainerAwareInterface', + 'Symfony\\Component\\DependencyInjection\\Container', + + 'Symfony\\Component\\EventDispatcher\\Event', + 'Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher', + + 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener', + 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener', + 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle', + 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver', + 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadata', + 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactory', + 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent', + 'Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent', + 'Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent', + 'Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent', + 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent', + 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent', + 'Symfony\\Component\\HttpKernel\\HttpKernel', + 'Symfony\\Component\\HttpKernel\\KernelEvents', + 'Symfony\\Component\\HttpKernel\\Config\\FileLocator', + + 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser', + 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver', + + // Cannot be included because annotations will parse the big compiled class file + // 'Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller', + + // cannot be included as commands are discovered based on the path to this class via Reflection + // 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle', + )); + } + + /** + * {@inheritdoc} + */ + public function getConfiguration(array $config, ContainerBuilder $container) + { + return new Configuration($container->getParameter('kernel.debug')); + } + + /** + * Loads Form configuration. + * + * @param array $config A configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + * + * @throws \LogicException + */ + private function registerFormConfiguration($config, ContainerBuilder $container, XmlFileLoader $loader) + { + $loader->load('form.xml'); + if (null === $config['form']['csrf_protection']['enabled']) { + $config['form']['csrf_protection']['enabled'] = $config['csrf_protection']['enabled']; + } + + if ($this->isConfigEnabled($container, $config['form']['csrf_protection'])) { + $loader->load('form_csrf.xml'); + + $container->setParameter('form.type_extension.csrf.enabled', true); + $container->setParameter('form.type_extension.csrf.field_name', $config['form']['csrf_protection']['field_name']); + } else { + $container->setParameter('form.type_extension.csrf.enabled', false); + } + } + + /** + * Loads the ESI configuration. + * + * @param array $config An ESI configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + */ + private function registerEsiConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + if (!$this->isConfigEnabled($container, $config)) { + return; + } + + $loader->load('esi.xml'); + } + + /** + * Loads the SSI configuration. + * + * @param array $config An SSI configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + */ + private function registerSsiConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + if (!$this->isConfigEnabled($container, $config)) { + return; + } + + $loader->load('ssi.xml'); + } + + /** + * Loads the fragments configuration. + * + * @param array $config A fragments configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + */ + private function registerFragmentsConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + if (!$this->isConfigEnabled($container, $config)) { + return; + } + + $loader->load('fragment_listener.xml'); + $container->setParameter('fragment.path', $config['path']); + } + + /** + * Loads the profiler configuration. + * + * @param array $config A profiler configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + * + * @throws \LogicException + */ + private function registerProfilerConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + if (!$this->isConfigEnabled($container, $config)) { + // this is needed for the WebProfiler to work even if the profiler is disabled + $container->setParameter('data_collector.templates', array()); + + return; + } + + $loader->load('profiling.xml'); + $loader->load('collectors.xml'); + + if ($this->formConfigEnabled) { + $loader->load('form_debug.xml'); + } + + if ($this->translationConfigEnabled) { + $loader->load('translation_debug.xml'); + $container->getDefinition('translator.data_collector')->setDecoratedService('translator'); + } + + $container->setParameter('profiler_listener.only_exceptions', $config['only_exceptions']); + $container->setParameter('profiler_listener.only_master_requests', $config['only_master_requests']); + + // Choose storage class based on the DSN + list($class) = explode(':', $config['dsn'], 2); + if ('file' !== $class) { + throw new \LogicException(sprintf('Driver "%s" is not supported for the profiler.', $class)); + } + + $container->setParameter('profiler.storage.dsn', $config['dsn']); + + if ($this->isConfigEnabled($container, $config['matcher'])) { + if (isset($config['matcher']['service'])) { + $container->setAlias('profiler.request_matcher', $config['matcher']['service']); + } elseif (isset($config['matcher']['ip']) || isset($config['matcher']['path']) || isset($config['matcher']['ips'])) { + $definition = $container->register('profiler.request_matcher', 'Symfony\\Component\\HttpFoundation\\RequestMatcher'); + $definition->setPublic(false); + + if (isset($config['matcher']['ip'])) { + $definition->addMethodCall('matchIp', array($config['matcher']['ip'])); + } + + if (isset($config['matcher']['ips'])) { + $definition->addMethodCall('matchIps', array($config['matcher']['ips'])); + } + + if (isset($config['matcher']['path'])) { + $definition->addMethodCall('matchPath', array($config['matcher']['path'])); + } + } + } + + if (!$config['collect']) { + $container->getDefinition('profiler')->addMethodCall('disable', array()); + } + } + + /** + * Loads the workflow configuration. + * + * @param array $workflows A workflow configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + */ + private function registerWorkflowConfiguration(array $workflows, ContainerBuilder $container, XmlFileLoader $loader) + { + if (!$workflows) { + return; + } + + $loader->load('workflow.xml'); + + $registryDefinition = $container->getDefinition('workflow.registry'); + + foreach ($workflows as $name => $workflow) { + $type = $workflow['type']; + + $transitions = array(); + foreach ($workflow['transitions'] as $transition) { + if ($type === 'workflow') { + $transitions[] = new Definition(Workflow\Transition::class, array($transition['name'], $transition['from'], $transition['to'])); + } elseif ($type === 'state_machine') { + foreach ($transition['from'] as $from) { + foreach ($transition['to'] as $to) { + $transitions[] = new Definition(Workflow\Transition::class, array($transition['name'], $from, $to)); + } + } + } + } + + // Create a Definition + $definitionDefinition = new Definition(Workflow\Definition::class); + $definitionDefinition->setPublic(false); + $definitionDefinition->addArgument($workflow['places']); + $definitionDefinition->addArgument($transitions); + $definitionDefinition->addTag('workflow.definition', array( + 'name' => $name, + 'type' => $type, + 'marking_store' => isset($workflow['marking_store']['type']) ? $workflow['marking_store']['type'] : null, + )); + if (isset($workflow['initial_place'])) { + $definitionDefinition->addArgument($workflow['initial_place']); + } + + // Create MarkingStore + if (isset($workflow['marking_store']['type'])) { + $markingStoreDefinition = new DefinitionDecorator('workflow.marking_store.'.$workflow['marking_store']['type']); + foreach ($workflow['marking_store']['arguments'] as $argument) { + $markingStoreDefinition->addArgument($argument); + } + } elseif (isset($workflow['marking_store']['service'])) { + $markingStoreDefinition = new Reference($workflow['marking_store']['service']); + } + + // Create Workflow + $workflowDefinition = new DefinitionDecorator(sprintf('%s.abstract', $type)); + $workflowDefinition->replaceArgument(0, $definitionDefinition); + if (isset($markingStoreDefinition)) { + $workflowDefinition->replaceArgument(1, $markingStoreDefinition); + } + $workflowDefinition->replaceArgument(3, $name); + + // Store to container + $workflowId = sprintf('%s.%s', $type, $name); + $container->setDefinition($workflowId, $workflowDefinition); + $container->setDefinition(sprintf('%s.definition', $workflowId), $definitionDefinition); + + // Add workflow to Registry + foreach ($workflow['supports'] as $supportedClass) { + $registryDefinition->addMethodCall('add', array(new Reference($workflowId), $supportedClass)); + } + } + } + + /** + * Loads the debug configuration. + * + * @param array $config A php errors configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + */ + private function registerDebugConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + $loader->load('debug_prod.xml'); + + $debug = $container->getParameter('kernel.debug'); + + if ($debug) { + $loader->load('debug.xml'); + + // replace the regular event_dispatcher service with the debug one + $definition = $container->findDefinition('event_dispatcher'); + $definition->setPublic(false); + $container->setDefinition('debug.event_dispatcher.parent', $definition); + $container->setAlias('event_dispatcher', 'debug.event_dispatcher'); + } + + $definition = $container->findDefinition('debug.debug_handlers_listener'); + + if (!$config['log']) { + $definition->replaceArgument(1, null); + } + + if (!$config['throw']) { + $container->setParameter('debug.error_handler.throw_at', 0); + } + + $definition->replaceArgument(4, $debug); + $definition->replaceArgument(6, $debug); + + if ($debug && class_exists(DebugProcessor::class)) { + $definition = new Definition(DebugProcessor::class); + $definition->setPublic(false); + $container->setDefinition('debug.log_processor', $definition); + } + } + + /** + * Loads the router configuration. + * + * @param array $config A router configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + */ + private function registerRouterConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + $loader->load('routing.xml'); + + $container->setParameter('router.resource', $config['resource']); + $container->setParameter('router.cache_class_prefix', $container->getParameter('kernel.container_class')); + $router = $container->findDefinition('router.default'); + $argument = $router->getArgument(2); + $argument['strict_requirements'] = $config['strict_requirements']; + if (isset($config['type'])) { + $argument['resource_type'] = $config['type']; + } + $router->replaceArgument(2, $argument); + + $container->setParameter('request_listener.http_port', $config['http_port']); + $container->setParameter('request_listener.https_port', $config['https_port']); + + $this->addClassesToCompile(array( + 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', + 'Symfony\\Component\\Routing\\RequestContext', + 'Symfony\\Component\\Routing\\Router', + 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableUrlMatcher', + $container->findDefinition('router.default')->getClass(), + )); + } + + /** + * Loads the session configuration. + * + * @param array $config A session configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + */ + private function registerSessionConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + $loader->load('session.xml'); + + // session storage + $container->setAlias('session.storage', $config['storage_id']); + $options = array(); + foreach (array('name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'use_cookies', 'gc_maxlifetime', 'gc_probability', 'gc_divisor') as $key) { + if (isset($config[$key])) { + $options[$key] = $config[$key]; + } + } + + $container->setParameter('session.storage.options', $options); + + // session handler (the internal callback registered with PHP session management) + if (null === $config['handler_id']) { + // Set the handler class to be null + $container->getDefinition('session.storage.native')->replaceArgument(1, null); + $container->getDefinition('session.storage.php_bridge')->replaceArgument(0, null); + } else { + $handlerId = $config['handler_id']; + + if ($config['metadata_update_threshold'] > 0) { + $container->getDefinition('session.handler.write_check')->addArgument(new Reference($handlerId)); + $handlerId = 'session.handler.write_check'; + } + + $container->setAlias('session.handler', $handlerId); + } + + $container->setParameter('session.save_path', $config['save_path']); + + $this->addClassesToCompile(array( + 'Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy', + $container->getDefinition('session')->getClass(), + )); + + if ($container->hasDefinition($config['storage_id'])) { + $this->addClassesToCompile(array( + $container->findDefinition('session.storage')->getClass(), + )); + } + + $container->setParameter('session.metadata.update_threshold', $config['metadata_update_threshold']); + } + + /** + * Loads the request configuration. + * + * @param array $config A request configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + */ + private function registerRequestConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + if ($config['formats']) { + $loader->load('request.xml'); + $container + ->getDefinition('request.add_request_formats_listener') + ->replaceArgument(0, $config['formats']) + ; + } + } + + /** + * Loads the templating configuration. + * + * @param array $config A templating configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + */ + private function registerTemplatingConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + $loader->load('templating.xml'); + + $container->setParameter('fragment.renderer.hinclude.global_template', $config['hinclude_default_template']); + + if ($container->getParameter('kernel.debug')) { + $logger = new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE); + + $container->getDefinition('templating.loader.cache') + ->addTag('monolog.logger', array('channel' => 'templating')) + ->addMethodCall('setLogger', array($logger)); + $container->getDefinition('templating.loader.chain') + ->addTag('monolog.logger', array('channel' => 'templating')) + ->addMethodCall('setLogger', array($logger)); + } + + if (!empty($config['loaders'])) { + $loaders = array_map(function ($loader) { return new Reference($loader); }, $config['loaders']); + + // Use a delegation unless only a single loader was registered + if (1 === count($loaders)) { + $container->setAlias('templating.loader', (string) reset($loaders)); + } else { + $container->getDefinition('templating.loader.chain')->addArgument($loaders); + $container->setAlias('templating.loader', 'templating.loader.chain'); + } + } + + $container->setParameter('templating.loader.cache.path', null); + if (isset($config['cache'])) { + // Wrap the existing loader with cache (must happen after loaders are registered) + $container->setDefinition('templating.loader.wrapped', $container->findDefinition('templating.loader')); + $loaderCache = $container->getDefinition('templating.loader.cache'); + $container->setParameter('templating.loader.cache.path', $config['cache']); + + $container->setDefinition('templating.loader', $loaderCache); + } + + $this->addClassesToCompile(array( + 'Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables', + 'Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateReference', + 'Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateNameParser', + $container->findDefinition('templating.locator')->getClass(), + )); + + $container->setParameter('templating.engines', $config['engines']); + $engines = array_map(function ($engine) { return new Reference('templating.engine.'.$engine); }, $config['engines']); + + // Use a delegation unless only a single engine was registered + if (1 === count($engines)) { + $container->setAlias('templating', (string) reset($engines)); + } else { + foreach ($engines as $engine) { + $container->getDefinition('templating.engine.delegating')->addMethodCall('addEngine', array($engine)); + } + $container->setAlias('templating', 'templating.engine.delegating'); + } + + $container->getDefinition('fragment.renderer.hinclude') + ->addTag('kernel.fragment_renderer', array('alias' => 'hinclude')) + ->replaceArgument(0, new Reference('templating')) + ; + + // configure the PHP engine if needed + if (in_array('php', $config['engines'], true)) { + $loader->load('templating_php.xml'); + + $container->setParameter('templating.helper.form.resources', $config['form']['resources']); + + if ($container->getParameter('kernel.debug')) { + $loader->load('templating_debug.xml'); + + $container->setDefinition('templating.engine.php', $container->findDefinition('debug.templating.engine.php')); + $container->setAlias('debug.templating.engine.php', 'templating.engine.php'); + } + + $this->addClassesToCompile(array( + 'Symfony\\Component\\Templating\\Storage\\FileStorage', + 'Symfony\\Bundle\\FrameworkBundle\\Templating\\PhpEngine', + 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\FilesystemLoader', + )); + + if ($container->has('assets.packages')) { + $container->getDefinition('templating.helper.assets')->replaceArgument(0, new Reference('assets.packages')); + } else { + $container->removeDefinition('templating.helper.assets'); + } + } + } + + /** + * Loads the assets configuration. + * + * @param array $config A assets configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + */ + private function registerAssetsConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + $loader->load('assets.xml'); + + $defaultVersion = null; + + if ($config['version_strategy']) { + $defaultVersion = new Reference($config['version_strategy']); + } else { + $defaultVersion = $this->createVersion($container, $config['version'], $config['version_format'], '_default'); + } + + $defaultPackage = $this->createPackageDefinition($config['base_path'], $config['base_urls'], $defaultVersion); + $container->setDefinition('assets._default_package', $defaultPackage); + + $namedPackages = array(); + foreach ($config['packages'] as $name => $package) { + if (null !== $package['version_strategy']) { + $version = new Reference($package['version_strategy']); + } elseif (!array_key_exists('version', $package)) { + $version = $defaultVersion; + } else { + $format = $package['version_format'] ?: $config['version_format']; + $version = $this->createVersion($container, $package['version'], $format, $name); + } + + $container->setDefinition('assets._package_'.$name, $this->createPackageDefinition($package['base_path'], $package['base_urls'], $version)); + $namedPackages[$name] = new Reference('assets._package_'.$name); + } + + $container->getDefinition('assets.packages') + ->replaceArgument(0, new Reference('assets._default_package')) + ->replaceArgument(1, $namedPackages) + ; + } + + /** + * Returns a definition for an asset package. + */ + private function createPackageDefinition($basePath, array $baseUrls, Reference $version) + { + if ($basePath && $baseUrls) { + throw new \LogicException('An asset package cannot have base URLs and base paths.'); + } + + $package = new DefinitionDecorator($baseUrls ? 'assets.url_package' : 'assets.path_package'); + $package + ->setPublic(false) + ->replaceArgument(0, $baseUrls ?: $basePath) + ->replaceArgument(1, $version) + ; + + return $package; + } + + private function createVersion(ContainerBuilder $container, $version, $format, $name) + { + if (null === $version) { + return new Reference('assets.empty_version_strategy'); + } + + $def = new DefinitionDecorator('assets.static_version_strategy'); + $def + ->replaceArgument(0, $version) + ->replaceArgument(1, $format) + ; + $container->setDefinition('assets._version_'.$name, $def); + + return new Reference('assets._version_'.$name); + } + + /** + * Loads the translator configuration. + * + * @param array $config A translator configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + */ + private function registerTranslatorConfiguration(array $config, ContainerBuilder $container) + { + if (!$this->isConfigEnabled($container, $config)) { + return; + } + + if (!class_exists('Symfony\Component\Translation\Translator')) { + throw new LogicException('Translation support cannot be enabled as the Translator component is not installed.'); + } + + $this->translationConfigEnabled = true; + + // Use the "real" translator instead of the identity default + $container->setAlias('translator', 'translator.default'); + $translator = $container->findDefinition('translator.default'); + $translator->addMethodCall('setFallbackLocales', array($config['fallbacks'])); + + $container->setParameter('translator.logging', $config['logging']); + + // Discover translation directories + $dirs = array(); + if (class_exists('Symfony\Component\Validator\Validation')) { + $r = new \ReflectionClass('Symfony\Component\Validator\Validation'); + + $dirs[] = dirname($r->getFileName()).'/Resources/translations'; + } + if (class_exists('Symfony\Component\Form\Form')) { + $r = new \ReflectionClass('Symfony\Component\Form\Form'); + + $dirs[] = dirname($r->getFileName()).'/Resources/translations'; + } + if (class_exists('Symfony\Component\Security\Core\Exception\AuthenticationException')) { + $r = new \ReflectionClass('Symfony\Component\Security\Core\Exception\AuthenticationException'); + + $dirs[] = dirname(dirname($r->getFileName())).'/Resources/translations'; + } + $rootDir = $container->getParameter('kernel.root_dir'); + foreach ($container->getParameter('kernel.bundles_metadata') as $name => $bundle) { + if (is_dir($dir = $bundle['path'].'/Resources/translations')) { + $dirs[] = $dir; + } + if (is_dir($dir = $rootDir.sprintf('/Resources/%s/translations', $name))) { + $dirs[] = $dir; + } + } + + foreach ($config['paths'] as $dir) { + if (is_dir($dir)) { + $dirs[] = $dir; + } else { + throw new \UnexpectedValueException(sprintf('%s defined in translator.paths does not exist or is not a directory', $dir)); + } + } + + if (is_dir($dir = $rootDir.'/Resources/translations')) { + $dirs[] = $dir; + } + + // Register translation resources + if ($dirs) { + foreach ($dirs as $dir) { + $container->addResource(new DirectoryResource($dir)); + } + + $files = array(); + $finder = Finder::create() + ->files() + ->filter(function (\SplFileInfo $file) { + return 2 === substr_count($file->getBasename(), '.') && preg_match('/\.\w+$/', $file->getBasename()); + }) + ->in($dirs) + ; + + foreach ($finder as $file) { + list(, $locale) = explode('.', $file->getBasename(), 3); + if (!isset($files[$locale])) { + $files[$locale] = array(); + } + + $files[$locale][] = (string) $file; + } + + $options = array_merge( + $translator->getArgument(3), + array('resource_files' => $files) + ); + + $translator->replaceArgument(3, $options); + } + } + + /** + * Loads the validator configuration. + * + * @param array $config A validation configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + */ + private function registerValidationConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + if (!$this->isConfigEnabled($container, $config)) { + return; + } + + if (!class_exists('Symfony\Component\Validator\Validation')) { + throw new LogicException('Validation support cannot be enabled as the Validator component is not installed.'); + } + + $loader->load('validator.xml'); + + $validatorBuilder = $container->getDefinition('validator.builder'); + + $container->setParameter('validator.translation_domain', $config['translation_domain']); + + list($xmlMappings, $yamlMappings) = $this->getValidatorMappingFiles($container); + if (count($xmlMappings) > 0) { + $validatorBuilder->addMethodCall('addXmlMappings', array($xmlMappings)); + } + + if (count($yamlMappings) > 0) { + $validatorBuilder->addMethodCall('addYamlMappings', array($yamlMappings)); + } + + $definition = $container->findDefinition('validator.email'); + $definition->replaceArgument(0, $config['strict_email']); + + if (array_key_exists('enable_annotations', $config) && $config['enable_annotations']) { + if (!$this->annotationsConfigEnabled) { + throw new \LogicException('"enable_annotations" on the validator cannot be set as Annotations support is disabled.'); + } + + $validatorBuilder->addMethodCall('enableAnnotationMapping', array(new Reference('annotation_reader'))); + } + + if (array_key_exists('static_method', $config) && $config['static_method']) { + foreach ($config['static_method'] as $methodName) { + $validatorBuilder->addMethodCall('addMethodMapping', array($methodName)); + } + } + + if (isset($config['cache']) && $config['cache']) { + @trigger_error('The "framework.validation.cache" option is deprecated since Symfony 3.2 and will be removed in 4.0. Configure the "cache.validator" service under "framework.cache.pools" instead.', E_USER_DEPRECATED); + + $container->setParameter( + 'validator.mapping.cache.prefix', + 'validator_'.$this->getKernelRootHash($container) + ); + + $validatorBuilder->addMethodCall('setMetadataCache', array(new Reference($config['cache']))); + } elseif (!$container->getParameter('kernel.debug')) { + $validatorBuilder->addMethodCall('setMetadataCache', array(new Reference('validator.mapping.cache.symfony'))); + } + } + + private function getValidatorMappingFiles(ContainerBuilder $container) + { + $files = array(array(), array()); + + if (interface_exists('Symfony\Component\Form\FormInterface')) { + $reflClass = new \ReflectionClass('Symfony\Component\Form\FormInterface'); + $files[0][] = dirname($reflClass->getFileName()).'/Resources/config/validation.xml'; + $container->addResource(new FileResource($files[0][0])); + } + + foreach ($container->getParameter('kernel.bundles_metadata') as $bundle) { + $dirname = $bundle['path']; + if (is_file($file = $dirname.'/Resources/config/validation.xml')) { + $files[0][] = $file; + $container->addResource(new FileResource($file)); + } + + if (is_file($file = $dirname.'/Resources/config/validation.yml')) { + $files[1][] = $file; + $container->addResource(new FileResource($file)); + } + + if (is_dir($dir = $dirname.'/Resources/config/validation')) { + foreach (Finder::create()->files()->in($dir)->name('*.xml') as $file) { + $files[0][] = $file->getPathname(); + } + foreach (Finder::create()->files()->in($dir)->name('*.yml') as $file) { + $files[1][] = $file->getPathname(); + } + + $container->addResource(new DirectoryResource($dir)); + } + } + + return $files; + } + + private function registerAnnotationsConfiguration(array $config, ContainerBuilder $container, $loader) + { + if (!$this->annotationsConfigEnabled) { + return; + } + + if (!class_exists('Doctrine\Common\Annotations\Annotation')) { + throw new LogicException('Annotations cannot be enabled as the Doctrine Annotation library is not installed.'); + } + + $loader->load('annotations.xml'); + + if ('none' !== $config['cache']) { + $cacheService = $config['cache']; + + if ('php_array' === $config['cache']) { + $cacheService = 'annotations.cache'; + + // Enable warmer only if PHP array is used for cache + $definition = $container->findDefinition('annotations.cache_warmer'); + $definition->addTag('kernel.cache_warmer'); + + $this->addClassesToCompile(array( + 'Symfony\Component\Cache\Adapter\PhpArrayAdapter', + 'Symfony\Component\Cache\DoctrineProvider', + )); + } elseif ('file' === $config['cache']) { + $cacheDir = $container->getParameterBag()->resolveValue($config['file_cache_dir']); + + if (!is_dir($cacheDir) && false === @mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) { + throw new \RuntimeException(sprintf('Could not create cache directory "%s".', $cacheDir)); + } + + $container + ->getDefinition('annotations.filesystem_cache') + ->replaceArgument(0, $cacheDir) + ; + + $cacheService = 'annotations.filesystem_cache'; + } + + $container + ->getDefinition('annotations.cached_reader') + ->replaceArgument(2, $config['debug']) + ->addTag('annotations.cached_reader', array('provider' => $cacheService)) + ->addAutowiringType(Reader::class) + ; + $container->setAlias('annotation_reader', 'annotations.cached_reader'); + } else { + $container->removeDefinition('annotations.cached_reader'); + } + } + + private function registerPropertyAccessConfiguration(array $config, ContainerBuilder $container) + { + $container + ->getDefinition('property_accessor') + ->replaceArgument(0, $config['magic_call']) + ->replaceArgument(1, $config['throw_exception_on_invalid_index']) + ; + } + + /** + * Loads the security configuration. + * + * @param array $config A CSRF configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + * + * @throws \LogicException + */ + private function registerSecurityCsrfConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + if (!$this->isConfigEnabled($container, $config)) { + return; + } + + if (!class_exists('Symfony\Component\Security\Csrf\CsrfToken')) { + throw new LogicException('CSRF support cannot be enabled as the Security CSRF component is not installed.'); + } + + if (!$this->sessionConfigEnabled) { + throw new \LogicException('CSRF protection needs sessions to be enabled.'); + } + + // Enable services for CSRF protection (even without forms) + $loader->load('security_csrf.xml'); + } + + /** + * Loads the serializer configuration. + * + * @param array $config A serializer configuration array + * @param ContainerBuilder $container A ContainerBuilder instance + * @param XmlFileLoader $loader An XmlFileLoader instance + */ + private function registerSerializerConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + if (class_exists('Symfony\Component\Serializer\Normalizer\DataUriNormalizer')) { + // Run after serializer.normalizer.object + $definition = $container->register('serializer.normalizer.data_uri', DataUriNormalizer::class); + $definition->setPublic(false); + $definition->addTag('serializer.normalizer', array('priority' => -920)); + } + + if (class_exists('Symfony\Component\Serializer\Normalizer\DateTimeNormalizer')) { + // Run before serializer.normalizer.object + $definition = $container->register('serializer.normalizer.datetime', DateTimeNormalizer::class); + $definition->setPublic(false); + $definition->addTag('serializer.normalizer', array('priority' => -910)); + } + + if (class_exists('Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer')) { + // Run before serializer.normalizer.object + $definition = $container->register('serializer.normalizer.json_serializable', JsonSerializableNormalizer::class); + $definition->setPublic(false); + $definition->addTag('serializer.normalizer', array('priority' => -900)); + } + + if (class_exists(YamlEncoder::class) && defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT')) { + $definition = $container->register('serializer.encoder.yaml', YamlEncoder::class); + $definition->setPublic(false); + $definition->addTag('serializer.encoder'); + } + + if (class_exists(CsvEncoder::class)) { + $definition = $container->register('serializer.encoder.csv', CsvEncoder::class); + $definition->setPublic(false); + $definition->addTag('serializer.encoder'); + } + + $loader->load('serializer.xml'); + $chainLoader = $container->getDefinition('serializer.mapping.chain_loader'); + + $serializerLoaders = array(); + if (isset($config['enable_annotations']) && $config['enable_annotations']) { + if (!$this->annotationsConfigEnabled) { + throw new \LogicException('"enable_annotations" on the serializer cannot be set as Annotations support is disabled.'); + } + + $annotationLoader = new Definition( + 'Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader', + array(new Reference('annotation_reader')) + ); + $annotationLoader->setPublic(false); + + $serializerLoaders[] = $annotationLoader; + } + + foreach ($container->getParameter('kernel.bundles_metadata') as $bundle) { + $dirname = $bundle['path']; + + if (is_file($file = $dirname.'/Resources/config/serialization.xml')) { + $definition = new Definition('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader', array($file)); + $definition->setPublic(false); + + $serializerLoaders[] = $definition; + $container->addResource(new FileResource($file)); + } + + if (is_file($file = $dirname.'/Resources/config/serialization.yml')) { + $definition = new Definition('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader', array($file)); + $definition->setPublic(false); + + $serializerLoaders[] = $definition; + $container->addResource(new FileResource($file)); + } + + if (is_dir($dir = $dirname.'/Resources/config/serialization')) { + foreach (Finder::create()->files()->in($dir)->name('*.xml') as $file) { + $definition = new Definition('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader', array($file->getPathname())); + $definition->setPublic(false); + + $serializerLoaders[] = $definition; + } + foreach (Finder::create()->files()->in($dir)->name('*.yml') as $file) { + $definition = new Definition('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader', array($file->getPathname())); + $definition->setPublic(false); + + $serializerLoaders[] = $definition; + } + + $container->addResource(new DirectoryResource($dir)); + } + } + + $chainLoader->replaceArgument(0, $serializerLoaders); + $container->getDefinition('serializer.mapping.cache_warmer')->replaceArgument(0, $serializerLoaders); + + if (isset($config['cache']) && $config['cache']) { + @trigger_error('The "framework.serializer.cache" option is deprecated since Symfony 3.1 and will be removed in 4.0. Configure the "cache.serializer" service under "framework.cache.pools" instead.', E_USER_DEPRECATED); + + $container->setParameter( + 'serializer.mapping.cache.prefix', + 'serializer_'.$this->getKernelRootHash($container) + ); + + $container->getDefinition('serializer.mapping.class_metadata_factory')->replaceArgument( + 1, new Reference($config['cache']) + ); + } elseif (!$container->getParameter('kernel.debug') && class_exists(CacheClassMetadataFactory::class)) { + $cacheMetadataFactory = new Definition( + CacheClassMetadataFactory::class, + array( + new Reference('serializer.mapping.cache_class_metadata_factory.inner'), + new Reference('serializer.mapping.cache.symfony'), + ) + ); + $cacheMetadataFactory->setPublic(false); + $cacheMetadataFactory->setDecoratedService('serializer.mapping.class_metadata_factory'); + + $container->setDefinition('serializer.mapping.cache_class_metadata_factory', $cacheMetadataFactory); + } + + if (isset($config['name_converter']) && $config['name_converter']) { + $container->getDefinition('serializer.normalizer.object')->replaceArgument(1, new Reference($config['name_converter'])); + } + } + + /** + * Loads property info configuration. + * + * @param array $config + * @param ContainerBuilder $container + * @param XmlFileLoader $loader + */ + private function registerPropertyInfoConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + { + $loader->load('property_info.xml'); + + if (interface_exists('phpDocumentor\Reflection\DocBlockFactoryInterface')) { + $definition = $container->register('property_info.php_doc_extractor', 'Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor'); + $definition->addTag('property_info.description_extractor', array('priority' => -1000)); + $definition->addTag('property_info.type_extractor', array('priority' => -1001)); + } + } + + private function registerCacheConfiguration(array $config, ContainerBuilder $container) + { + $version = substr(str_replace('/', '-', base64_encode(hash('sha256', uniqid(mt_rand(), true), true))), 0, 22); + $container->getDefinition('cache.adapter.apcu')->replaceArgument(2, $version); + $container->getDefinition('cache.adapter.system')->replaceArgument(2, $version); + $container->getDefinition('cache.adapter.filesystem')->replaceArgument(2, $config['directory']); + + if (isset($config['prefix_seed'])) { + $container->setParameter('cache.prefix.seed', $config['prefix_seed']); + } + foreach (array('doctrine', 'psr6', 'redis') as $name) { + if (isset($config[$name = 'default_'.$name.'_provider'])) { + $container->setAlias('cache.'.$name, new Alias(Compiler\CachePoolPass::getServiceProvider($container, $config[$name]), false)); + } + } + foreach (array('app', 'system') as $name) { + $config['pools']['cache.'.$name] = array( + 'adapter' => $config[$name], + 'public' => true, + ); + } + foreach ($config['pools'] as $name => $pool) { + $definition = new DefinitionDecorator($pool['adapter']); + $definition->setPublic($pool['public']); + unset($pool['adapter'], $pool['public']); + + $definition->addTag('cache.pool', $pool); + $container->setDefinition($name, $definition); + } + + if (method_exists(PropertyAccessor::class, 'createCache')) { + $propertyAccessDefinition = $container->register('cache.property_access', AdapterInterface::class); + $propertyAccessDefinition->setPublic(false); + + if (!$container->getParameter('kernel.debug')) { + $propertyAccessDefinition->setFactory(array(PropertyAccessor::class, 'createCache')); + $propertyAccessDefinition->setArguments(array(null, null, $version, new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))); + $propertyAccessDefinition->addTag('cache.pool', array('clearer' => 'cache.default_clearer')); + $propertyAccessDefinition->addTag('monolog.logger', array('channel' => 'cache')); + } else { + $propertyAccessDefinition->setClass(ArrayAdapter::class); + $propertyAccessDefinition->setArguments(array(0, false)); + } + } + + $this->addClassesToCompile(array( + 'Symfony\Component\Cache\Adapter\ApcuAdapter', + 'Symfony\Component\Cache\Adapter\FilesystemAdapter', + 'Symfony\Component\Cache\CacheItem', + )); + } + + /** + * Gets a hash of the kernel root directory. + * + * @param ContainerBuilder $container + * + * @return string + */ + private function getKernelRootHash(ContainerBuilder $container) + { + if (!$this->kernelRootHash) { + $this->kernelRootHash = hash('sha256', $container->getParameter('kernel.root_dir')); + } + + return $this->kernelRootHash; + } + + /** + * Returns the base path for the XSD files. + * + * @return string The XSD base path + */ + public function getXsdValidationBasePath() + { + return dirname(__DIR__).'/Resources/config/schema'; + } + + public function getNamespace() + { + return 'http://symfony.com/schema/dic/symfony'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php new file mode 100644 index 0000000000000000000000000000000000000000..6c248d8a42880aefc7130ce1815dffcbfadf148c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\EventListener; + +use Symfony\Component\HttpKernel\EventListener\SessionListener as BaseSessionListener; +use Symfony\Component\DependencyInjection\ContainerInterface; + +/** + * Sets the session in the request. + * + * @author Fabien Potencier + */ +class SessionListener extends BaseSessionListener +{ + /** + * @var ContainerInterface + */ + private $container; + + public function __construct(ContainerInterface $container) + { + $this->container = $container; + } + + protected function getSession() + { + if (!$this->container->has('session')) { + return; + } + + return $this->container->get('session'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/EventListener/TestSessionListener.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/EventListener/TestSessionListener.php new file mode 100644 index 0000000000000000000000000000000000000000..b32faa2f0566818c56d3d876e8b17f3a24328031 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/EventListener/TestSessionListener.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\EventListener; + +use Symfony\Component\HttpKernel\EventListener\TestSessionListener as BaseTestSessionListener; +use Symfony\Component\DependencyInjection\ContainerInterface; + +/** + * TestSessionListener. + * + * @author Fabien Potencier + */ +class TestSessionListener extends BaseTestSessionListener +{ + protected $container; + + public function __construct(ContainerInterface $container) + { + $this->container = $container; + } + + protected function getSession() + { + if (!$this->container->has('session')) { + return; + } + + return $this->container->get('session'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..663aa3ee57991d86192abf2c066dee6c100230d1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle; + +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddAnnotationsCachedReaderPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConstraintValidatorsPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddDebugLogProcessorPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddValidatorInitializersPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolClearerPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ControllerArgumentValueResolverPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FormPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\PropertyInfoPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TemplatingPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RoutingResolverPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslatorPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddCacheWarmerPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddCacheClearerPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ContainerBuilderDebugDumpPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CompilerDebugDumpPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslationExtractorPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslationDumperPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ConfigCachePass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ValidateWorkflowsPass; +use Symfony\Component\Debug\ErrorHandler; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\PassConfig; +use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass; +use Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Bundle\Bundle; + +/** + * Bundle. + * + * @author Fabien Potencier + */ +class FrameworkBundle extends Bundle +{ + public function boot() + { + ErrorHandler::register(null, false)->throwAt($this->container->getParameter('debug.error_handler.throw_at'), true); + + if ($trustedProxies = $this->container->getParameter('kernel.trusted_proxies')) { + Request::setTrustedProxies($trustedProxies); + } + + if ($this->container->getParameter('kernel.http_method_override')) { + Request::enableHttpMethodParameterOverride(); + } + + if ($trustedHosts = $this->container->getParameter('kernel.trusted_hosts')) { + Request::setTrustedHosts($trustedHosts); + } + } + + public function build(ContainerBuilder $container) + { + parent::build($container); + + $container->addCompilerPass(new RoutingResolverPass()); + $container->addCompilerPass(new ProfilerPass()); + // must be registered before removing private services as some might be listeners/subscribers + // but as late as possible to get resolved parameters + $container->addCompilerPass(new RegisterListenersPass(), PassConfig::TYPE_BEFORE_REMOVING); + $container->addCompilerPass(new TemplatingPass()); + $container->addCompilerPass(new AddConstraintValidatorsPass(), PassConfig::TYPE_BEFORE_REMOVING); + $container->addCompilerPass(new AddAnnotationsCachedReaderPass(), PassConfig::TYPE_BEFORE_REMOVING); + $container->addCompilerPass(new AddValidatorInitializersPass()); + $container->addCompilerPass(new AddConsoleCommandPass()); + $container->addCompilerPass(new FormPass()); + $container->addCompilerPass(new TranslatorPass()); + $container->addCompilerPass(new LoggingTranslatorPass()); + $container->addCompilerPass(new AddCacheWarmerPass()); + $container->addCompilerPass(new AddCacheClearerPass()); + $container->addCompilerPass(new AddExpressionLanguageProvidersPass()); + $container->addCompilerPass(new TranslationExtractorPass()); + $container->addCompilerPass(new TranslationDumperPass()); + $container->addCompilerPass(new FragmentRendererPass(), PassConfig::TYPE_AFTER_REMOVING); + $container->addCompilerPass(new SerializerPass()); + $container->addCompilerPass(new PropertyInfoPass()); + $container->addCompilerPass(new DataCollectorTranslatorPass()); + $container->addCompilerPass(new ControllerArgumentValueResolverPass()); + $container->addCompilerPass(new CachePoolPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 32); + $container->addCompilerPass(new ValidateWorkflowsPass()); + $container->addCompilerPass(new CachePoolClearerPass(), PassConfig::TYPE_AFTER_REMOVING); + + if ($container->getParameter('kernel.debug')) { + $container->addCompilerPass(new AddDebugLogProcessorPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32); + $container->addCompilerPass(new UnusedTagsPass(), PassConfig::TYPE_AFTER_REMOVING); + $container->addCompilerPass(new ContainerBuilderDebugDumpPass(), PassConfig::TYPE_AFTER_REMOVING); + $container->addCompilerPass(new CompilerDebugDumpPass(), PassConfig::TYPE_AFTER_REMOVING); + $container->addCompilerPass(new ConfigCachePass()); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php new file mode 100644 index 0000000000000000000000000000000000000000..fad4adc04434da3fcec0b55cc7a0026fb06dbadf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\HttpCache; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\HttpCache\HttpCache as BaseHttpCache; +use Symfony\Component\HttpKernel\HttpCache\Esi; +use Symfony\Component\HttpKernel\HttpCache\Store; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Manages HTTP cache objects in a Container. + * + * @author Fabien Potencier + */ +abstract class HttpCache extends BaseHttpCache +{ + protected $cacheDir; + protected $kernel; + + /** + * Constructor. + * + * @param HttpKernelInterface $kernel An HttpKernelInterface instance + * @param string $cacheDir The cache directory (default used if null) + */ + public function __construct(HttpKernelInterface $kernel, $cacheDir = null) + { + $this->kernel = $kernel; + $this->cacheDir = $cacheDir; + + parent::__construct($kernel, $this->createStore(), $this->createSurrogate(), array_merge(array('debug' => $kernel->isDebug()), $this->getOptions())); + } + + /** + * Forwards the Request to the backend and returns the Response. + * + * @param Request $request A Request instance + * @param bool $raw Whether to catch exceptions or not + * @param Response $entry A Response instance (the stale entry if present, null otherwise) + * + * @return Response A Response instance + */ + protected function forward(Request $request, $raw = false, Response $entry = null) + { + $this->getKernel()->boot(); + $this->getKernel()->getContainer()->set('cache', $this); + $this->getKernel()->getContainer()->set($this->getSurrogate()->getName(), $this->getSurrogate()); + + return parent::forward($request, $raw, $entry); + } + + /** + * Returns an array of options to customize the Cache configuration. + * + * @return array An array of options + */ + protected function getOptions() + { + return array(); + } + + protected function createSurrogate() + { + return new Esi(); + } + + protected function createStore() + { + return new Store($this->cacheDir ?: $this->kernel->getCacheDir().'/http_cache'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..fec5b72a5b3be553e7c7278dd7450f35318c83e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Kernel; + +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Routing\RouteCollectionBuilder; + +/** + * A Kernel that provides configuration hooks. + * + * @author Ryan Weaver + * @author Fabien Potencier + */ +trait MicroKernelTrait +{ + /** + * Add or import routes into your application. + * + * $routes->import('config/routing.yml'); + * $routes->add('/admin', 'AppBundle:Admin:dashboard', 'admin_dashboard'); + * + * @param RouteCollectionBuilder $routes + */ + abstract protected function configureRoutes(RouteCollectionBuilder $routes); + + /** + * Configures the container. + * + * You can register extensions: + * + * $c->loadFromExtension('framework', array( + * 'secret' => '%secret%' + * )); + * + * Or services: + * + * $c->register('halloween', 'FooBundle\HalloweenProvider'); + * + * Or parameters: + * + * $c->setParameter('halloween', 'lot of fun'); + * + * @param ContainerBuilder $c + * @param LoaderInterface $loader + */ + abstract protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader); + + /** + * {@inheritdoc} + */ + public function registerContainerConfiguration(LoaderInterface $loader) + { + $loader->load(function (ContainerBuilder $container) use ($loader) { + $container->loadFromExtension('framework', array( + 'router' => array( + 'resource' => 'kernel:loadRoutes', + 'type' => 'service', + ), + )); + + $this->configureContainer($container, $loader); + + $container->addObjectResource($this); + }); + } + + /** + * @internal + */ + public function loadRoutes(LoaderInterface $loader) + { + $routes = new RouteCollectionBuilder($loader); + $this->configureRoutes($routes); + + return $routes->build(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/LICENSE b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/README.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9280d874391d02a82a3aec5180f9e15bb06b357a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/README.md @@ -0,0 +1,10 @@ +FrameworkBundle +=============== + +Resources +--------- + + * [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/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.xml new file mode 100644 index 0000000000000000000000000000000000000000..146a875ad7dc9c24145edb2b01e4b23484a3cc90 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.xml @@ -0,0 +1,42 @@ + + + + + + + Doctrine\Common\Annotations\Reader + + + + + + + + + + + + + + + + + %kernel.cache_dir%/annotations.php + + + + + + + + %kernel.cache_dir%/annotations.php + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/assets.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/assets.xml new file mode 100644 index 0000000000000000000000000000000000000000..4f2e1fbf362a0ea04047cb12b9de86bebb7a4940 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/assets.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.xml new file mode 100644 index 0000000000000000000000000000000000000000..461b40455a8c545819dce02e349533c5eec1ec29 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + %kernel.cache_dir%/pools + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + 0 + %kernel.cache_dir%/pools + + + + + + + + + + 0 + + + + + + + + 0 + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml new file mode 100644 index 0000000000000000000000000000000000000000..afebe6da98fd875a87dba3f100151d2a50dec3c7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/debug.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/debug.xml new file mode 100644 index 0000000000000000000000000000000000000000..073851b038e6788d74cf7ed8b3e639335771defe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/debug.xml @@ -0,0 +1,30 @@ + + + + + + %kernel.cache_dir%/%kernel.container_class%.xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.xml new file mode 100644 index 0000000000000000000000000000000000000000..51d374338e0b2e65af33e0dae47037c16fd58c0d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.xml @@ -0,0 +1,30 @@ + + + + + + -1 + + + + + + + null + + -1 + %debug.error_handler.throw_at% + true + + true + + + + + + %debug.file_link_format% + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/esi.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/esi.xml new file mode 100644 index 0000000000000000000000000000000000000000..86600a8698566fb5e627451804584a9d3f11c4aa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/esi.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml new file mode 100644 index 0000000000000000000000000000000000000000..d26c00cd50282792952e6bb2fab109682c328b3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + + + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %validator.translation_domain% + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/form_csrf.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/form_csrf.xml new file mode 100644 index 0000000000000000000000000000000000000000..a562931a5e9a4675f02481ce22200ce85d9b749a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/form_csrf.xml @@ -0,0 +1,18 @@ + + + + + + + + + %form.type_extension.csrf.enabled% + %form.type_extension.csrf.field_name% + + %validator.translation_domain% + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/form_debug.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/form_debug.xml new file mode 100644 index 0000000000000000000000000000000000000000..843fc72bdb253adfb1d2e1294636657293ac3ca7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/form_debug.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + false + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/fragment_listener.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/fragment_listener.xml new file mode 100644 index 0000000000000000000000000000000000000000..332e767c4dafee8e862212e15d975a123d2e3dfc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/fragment_listener.xml @@ -0,0 +1,14 @@ + + + + + + + + + %fragment.path% + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/fragment_renderer.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/fragment_renderer.xml new file mode 100644 index 0000000000000000000000000000000000000000..3f0d319d9de138456ccf892ddcdecdf3593be676 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/fragment_renderer.xml @@ -0,0 +1,49 @@ + + + + + + + /_fragment + + + + + + + %kernel.debug% + + + + + + + %fragment.path% + + + + + + %fragment.renderer.hinclude.global_template% + %fragment.path% + + + + + + + + %fragment.path% + + + + + + + + %fragment.path% + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/profiling.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/profiling.xml new file mode 100644 index 0000000000000000000000000000000000000000..fdfd8e0e9a0dc8e9b720bb2f99df0200a46361bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/profiling.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + %profiler.storage.dsn% + + + + + + + + %profiler_listener.only_exceptions% + %profiler_listener.only_master_requests% + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/property_access.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/property_access.xml new file mode 100644 index 0000000000000000000000000000000000000000..d9e381c4806b8d05a093c0ef4e1986c8a54a8f34 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/property_access.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/property_info.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/property_info.xml new file mode 100644 index 0000000000000000000000000000000000000000..8f6a7c9e31bed78bda691f29be2173be6635e83a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/property_info.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/request.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/request.xml new file mode 100644 index 0000000000000000000000000000000000000000..323744edaa42e8ca8e4758204cf6dcb5a215760e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/request.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_dev.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_dev.php new file mode 100644 index 0000000000000000000000000000000000000000..432ccff9204f1066549cb5f9525999b65e84f2de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_dev.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * This file implements rewrite rules for PHP built-in web server. + * + * See: http://www.php.net/manual/en/features.commandline.webserver.php + * + * If you have custom directory layout, then you have to write your own router + * and pass it as a value to 'router' option of server:run command. + * + * @author: Michał Pipa + * @author: Albert Jessurum + */ + +// Workaround https://bugs.php.net/64566 +if (ini_get('auto_prepend_file') && !in_array(realpath(ini_get('auto_prepend_file')), get_included_files(), true)) { + require ini_get('auto_prepend_file'); +} + +if (is_file($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.$_SERVER['SCRIPT_NAME'])) { + return false; +} + +$_SERVER = array_merge($_SERVER, $_ENV); +$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app_dev.php'; + +// Since we are rewriting to app_dev.php, adjust SCRIPT_NAME and PHP_SELF accordingly +$_SERVER['SCRIPT_NAME'] = DIRECTORY_SEPARATOR.'app_dev.php'; +$_SERVER['PHP_SELF'] = DIRECTORY_SEPARATOR.'app_dev.php'; + +require 'app_dev.php'; + +error_log(sprintf('%s:%d [%d]: %s', $_SERVER['REMOTE_ADDR'], $_SERVER['REMOTE_PORT'], http_response_code(), $_SERVER['REQUEST_URI']), 4); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_prod.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_prod.php new file mode 100644 index 0000000000000000000000000000000000000000..97613a6248f7116ff7bf76c8095db90f32eab8b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_prod.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * This file implements rewrite rules for PHP built-in web server. + * + * See: http://www.php.net/manual/en/features.commandline.webserver.php + * + * If you have custom directory layout, then you have to write your own router + * and pass it as a value to 'router' option of server:run command. + * + * @author: Michał Pipa + * @author: Albert Jessurum + */ + +// Workaround https://bugs.php.net/64566 +if (ini_get('auto_prepend_file') && !in_array(realpath(ini_get('auto_prepend_file')), get_included_files(), true)) { + require ini_get('auto_prepend_file'); +} + +if (is_file($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.$_SERVER['SCRIPT_NAME'])) { + return false; +} + +$_SERVER = array_merge($_SERVER, $_ENV); +$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app.php'; + +// Since we are rewriting to app.php, adjust SCRIPT_NAME and PHP_SELF accordingly +$_SERVER['SCRIPT_NAME'] = DIRECTORY_SEPARATOR.'app.php'; +$_SERVER['PHP_SELF'] = DIRECTORY_SEPARATOR.'app.php'; + +require 'app.php'; + +error_log(sprintf('%s:%d [%d]: %s', $_SERVER['REMOTE_ADDR'], $_SERVER['REMOTE_PORT'], http_response_code(), $_SERVER['REQUEST_URI']), 4); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_test.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_test.php new file mode 100644 index 0000000000000000000000000000000000000000..5b020d5d22977da17de51131f2fa802fba3c3024 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_test.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * This file implements rewrite rules for PHP built-in web server. + * + * See: http://www.php.net/manual/en/features.commandline.webserver.php + * + * If you have custom directory layout, then you have to write your own router + * and pass it as a value to 'router' option of server:run command. + * + * @author: Michał Pipa + * @author: Albert Jessurum + */ + +if (is_file($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.$_SERVER['SCRIPT_NAME'])) { + return false; +} + +$_SERVER = array_merge($_SERVER, $_ENV); +$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app_test.php'; + +require 'app_test.php'; diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/routing.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/routing.xml new file mode 100644 index 0000000000000000000000000000000000000000..6050686d6c3c518e8c9274cd94186619ad612367 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/routing.xml @@ -0,0 +1,102 @@ + + + + + + Symfony\Component\Routing\Generator\UrlGenerator + Symfony\Component\Routing\Generator\UrlGenerator + Symfony\Component\Routing\Generator\Dumper\PhpGeneratorDumper + Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher + Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher + Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper + %router.cache_class_prefix%UrlMatcher + %router.cache_class_prefix%UrlGenerator + localhost + http + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %router.resource% + + %kernel.cache_dir% + %kernel.debug% + %router.options.generator_class% + %router.options.generator_base_class% + %router.options.generator_dumper_class% + %router.options.generator.cache_class% + %router.options.matcher_class% + %router.options.matcher_base_class% + %router.options.matcher_dumper_class% + %router.options.matcher.cache_class% + + + + + + + + + + + + %router.request_context.base_url% + GET + %router.request_context.host% + %router.request_context.scheme% + %request_listener.http_port% + %request_listener.https_port% + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..fbf53309f41be91e554a41b524e74a2ba7670cf4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd @@ -0,0 +1,272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/security_csrf.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/security_csrf.xml new file mode 100644 index 0000000000000000000000000000000000000000..354b515076968cb5dce1538e3238be1fbfae4c9a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/security_csrf.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml new file mode 100644 index 0000000000000000000000000000000000000000..5370d38072536d9c2e0d8044a5c212dda1bffc87 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml @@ -0,0 +1,91 @@ + + + + + + %kernel.cache_dir%/serialization.php + + + + + + + + + + + + + + + null + + + + + + + + + + + + + + + + + + + + + null + + + + + + %serializer.mapping.cache.file% + + + + + + + %serializer.mapping.cache.file% + + + + + + %serializer.mapping.cache.prefix% + + The "%service_id%" service is deprecated since Symfony 3.2 and will be removed in 4.0. APCu should now be automatically used when available. + + + + The "%service_id%" service is deprecated since Symfony 3.1 and will be removed in 4.0. APCu should now be automatically used when available. + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml new file mode 100644 index 0000000000000000000000000000000000000000..f07f5261bb40a17645d801a3a497b46e8f0f403a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + Symfony\Component\HttpFoundation\ParameterBag + Symfony\Component\HttpFoundation\HeaderBag + Symfony\Component\HttpFoundation\FileBag + Symfony\Component\HttpFoundation\ServerBag + Symfony\Component\HttpFoundation\Request + Symfony\Component\HttpKernel\Kernel + Symfony\Component\ClassLoader\ClassCollectionLoader + Symfony\Component\ClassLoader\ApcClassLoader + + + + + + + + + Symfony\Component\DependencyInjection\ContainerInterface + Symfony\Component\DependencyInjection\Container + + + + + + + + + %kernel.root_dir%/Resources + + + + %kernel.secret% + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml new file mode 100644 index 0000000000000000000000000000000000000000..2a4816a2b3bf1d39180c6ee80e31ee3267bb42a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml @@ -0,0 +1,62 @@ + + + + + + _sf2_meta + + + + + + + + + + + %session.metadata.storage_key% + %session.metadata.update_threshold% + + + + %session.storage.options% + + + + + + + + + + + + + + + %kernel.cache_dir%/sessions + MOCKSESSID + + + + + %session.save_path% + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/ssi.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/ssi.xml new file mode 100644 index 0000000000000000000000000000000000000000..fe320e9812eb9fa70f7122330a014a96ce35238e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/ssi.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating.xml new file mode 100644 index 0000000000000000000000000000000000000000..d4d0053c4e4bf668e59e8eefaddd9e13f5295aa6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + %kernel.cache_dir% + + + + + + %kernel.root_dir%/Resources + + + + + + + + + + + + + + + %templating.loader.cache.path% + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_debug.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_debug.xml new file mode 100644 index 0000000000000000000000000000000000000000..f2bdc45c2293809b2383b7ba545ab98a78f0cde1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_debug.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + %kernel.charset% + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_php.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_php.xml new file mode 100644 index 0000000000000000000000000000000000000000..5383e39fee8897fc82ce7fe3247135b66e476df8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_php.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + %kernel.charset% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %kernel.root_dir% + %kernel.charset% + + + + + + + + + + + + + + + + + + + + %templating.helper.form.resources% + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/test.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/test.xml new file mode 100644 index 0000000000000000000000000000000000000000..ebb311ceb08087e1f97b7184c930259c8bb5a3f3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/test.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + %test.client.parameters% + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.xml new file mode 100644 index 0000000000000000000000000000000000000000..ba1c3bc1683168e6b3542c24740fbc3e17baec2e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + %kernel.cache_dir%/translations + %kernel.debug% + + + + + + + Symfony\Component\Translation\TranslatorInterface + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_debug.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_debug.xml new file mode 100644 index 0000000000000000000000000000000000000000..fc7d2faaa9e8e662743e62997bd9ce32b4435ae1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_debug.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml new file mode 100644 index 0000000000000000000000000000000000000000..6da59e54e212e82110c2c415c17a583ba960c535 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml @@ -0,0 +1,73 @@ + + + + + + + %kernel.cache_dir%/validation.php + + + + + + + + + + + + + + + + + %validator.translation_domain% + + + + + + + + %validator.mapping.cache.file% + + + + + + + + + %validator.mapping.cache.file% + + + + + + + + + + %validator.mapping.cache.prefix% + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/web.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/web.xml new file mode 100644 index 0000000000000000000000000000000000000000..72a200b313fa42d02feef9b5f80c865efa886ec4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/web.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %kernel.charset% + + + + + + + + + + %kernel.default_locale% + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/workflow.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/workflow.xml new file mode 100644 index 0000000000000000000000000000000000000000..76592087a2260160bf89bbeb36a21eb57fbedf25 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/workflow.xml @@ -0,0 +1,31 @@ + + + + + + + + null + + + + + + null + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php new file mode 100644 index 0000000000000000000000000000000000000000..eb421be8176919c25785ea6e1afc857096b73e7a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php @@ -0,0 +1 @@ +block($form, 'widget_attributes') ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_attributes.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_attributes.html.php new file mode 100644 index 0000000000000000000000000000000000000000..56b3dd92846d35f3130d3ceda21e9016d27b7698 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_attributes.html.php @@ -0,0 +1,10 @@ +id="escape($id) ?>" name="escape($full_name) ?>" disabled="disabled" + $v): ?> + +escape($k), $view->escape(false !== $translation_domain ? $view['translator']->trans($v, array(), $translation_domain) : $v)) ?> + +escape($k), $view->escape($k)) ?> + +escape($k), $view->escape($v)) ?> + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_label.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_label.html.php new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_row.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_row.html.php new file mode 100644 index 0000000000000000000000000000000000000000..b52e92984533d406a5985929c3663c78f51382d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_row.html.php @@ -0,0 +1,3 @@ +
    + widget($form) ?> +
    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..4b638769845068173f4e7412a482ca14b4d02f1b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_widget.html.php @@ -0,0 +1,4 @@ + $name, '%id%' => $id)) + : $view['form']->humanize($name); } ?> + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/checkbox_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/checkbox_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..143557dea8a647dc40a1ccec8e223d4bf89e6b4f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/checkbox_widget.html.php @@ -0,0 +1,5 @@ +block($form, 'widget_attributes') ?> + 0): ?> value="escape($value) ?>" + checked="checked" +/> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_attributes.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_attributes.html.php new file mode 100644 index 0000000000000000000000000000000000000000..18f8368dc8065185b60f53ae4f3b03bb1ccb1ebf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_attributes.html.php @@ -0,0 +1,8 @@ +disabled="disabled" + $v): ?> + +escape($k), $view->escape($k)) ?> + +escape($k), $view->escape($v)) ?> + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_options.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_options.html.php new file mode 100644 index 0000000000000000000000000000000000000000..211ae73f1c3d1b18b6b4331b7bd6c7d7e8f5e76d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_options.html.php @@ -0,0 +1 @@ +block($form, 'choice_widget_options') ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..13593a96f11ef38af000c2af3de0e1d01b867764 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget.html.php @@ -0,0 +1,5 @@ + +block($form, 'choice_widget_expanded') ?> + +block($form, 'choice_widget_collapsed') ?> + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php new file mode 100644 index 0000000000000000000000000000000000000000..92298cf5fcff59374a3198a7174f4c329bffe057 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php @@ -0,0 +1,18 @@ + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_expanded.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_expanded.html.php new file mode 100644 index 0000000000000000000000000000000000000000..2c426872071fc54ba3df28e9228a1cb05f7d7a3e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_expanded.html.php @@ -0,0 +1,6 @@ +
    block($form, 'widget_container_attributes') ?>> + + widget($child) ?> + label($child, null, array('translation_domain' => $choice_translation_domain)) ?> + +
    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_options.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_options.html.php new file mode 100644 index 0000000000000000000000000000000000000000..f1c6ad3b56f211eb5eb31c2cec8e6a3211d97cdc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_options.html.php @@ -0,0 +1,13 @@ + + + $choice): ?> + + + block($form, 'choice_widget_options', array('choices' => $choice)) ?> + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/collection_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/collection_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..9f6a94bcefc93b58271f95d1a36a00cb90664bb5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/collection_widget.html.php @@ -0,0 +1,4 @@ + + escape($view['form']->row($prototype)) ?> + +widget($form, array('attr' => $attr)) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/container_attributes.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/container_attributes.html.php new file mode 100644 index 0000000000000000000000000000000000000000..302bbfcd479d97a9c4e81ec63d24389d42164b2a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/container_attributes.html.php @@ -0,0 +1 @@ +block($form, 'widget_container_attributes') ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/date_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/date_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..22e51d2735a70abccf7aae1403dd037b46adcb10 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/date_widget.html.php @@ -0,0 +1,11 @@ + + block($form, 'form_widget_simple'); ?> + +
    block($form, 'widget_container_attributes') ?>> + widget($form['year']), + $view['form']->widget($form['month']), + $view['form']->widget($form['day']), + ), $date_pattern) ?> +
    + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/datetime_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/datetime_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..aef2a32512f729b6e1f6e172c8dc72edbadf5dae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/datetime_widget.html.php @@ -0,0 +1,7 @@ + + block($form, 'form_widget_simple'); ?> + +
    block($form, 'widget_container_attributes') ?>> + widget($form['date']).' '.$view['form']->widget($form['time']) ?> +
    + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/email_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/email_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..0b30c5bb7ae54a6a855d1f316fb4eac5600d2e49 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/email_widget.html.php @@ -0,0 +1 @@ +block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'email')) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form.html.php new file mode 100644 index 0000000000000000000000000000000000000000..fb789faff723aa115cff4ce4513d2acd0368d646 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form.html.php @@ -0,0 +1,3 @@ +start($form) ?> + widget($form) ?> +end($form) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_enctype.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_enctype.html.php new file mode 100644 index 0000000000000000000000000000000000000000..36eba3c9e8e7a8c4ce57ad9aa5eee8e133202d5b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_enctype.html.php @@ -0,0 +1 @@ +vars['multipart']): ?>enctype="multipart/form-data" diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_end.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_end.html.php new file mode 100644 index 0000000000000000000000000000000000000000..fe6843905cee5e30d4765043077bad26200c4367 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_end.html.php @@ -0,0 +1,4 @@ + +rest($form) ?> + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_errors.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_errors.html.php new file mode 100644 index 0000000000000000000000000000000000000000..77c60d7dfb3d3c1aac27f1ff1cc51180d3c36528 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_errors.html.php @@ -0,0 +1,7 @@ + 0): ?> +
      + +
    • getMessage() ?>
    • + +
    + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_label.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_label.html.php new file mode 100644 index 0000000000000000000000000000000000000000..7a51b2ce7b4ff1574ced68bd291cd8b0bd2d01cc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_label.html.php @@ -0,0 +1,8 @@ + + + + $name, '%id%' => $id)) + : $view['form']->humanize($name); } ?> + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_rest.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_rest.html.php new file mode 100644 index 0000000000000000000000000000000000000000..89041c6ec637497966de2df9039370dadd6625e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_rest.html.php @@ -0,0 +1,5 @@ + + isRendered()): ?> + row($child) ?> + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_row.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_row.html.php new file mode 100644 index 0000000000000000000000000000000000000000..a4f86d022318471925008a8cdb8542cd3c5378af --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_row.html.php @@ -0,0 +1,5 @@ +
    + label($form) ?> + errors($form) ?> + widget($form) ?> +
    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_rows.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_rows.html.php new file mode 100644 index 0000000000000000000000000000000000000000..8c3ba86f7a3a505614a2a4869cd68347fbdd79d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_rows.html.php @@ -0,0 +1,3 @@ + + row($child) ?> + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_start.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_start.html.php new file mode 100644 index 0000000000000000000000000000000000000000..ba2f3a4791987878e041f2bcee781a63dd204052 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_start.html.php @@ -0,0 +1,6 @@ + + +
    action="" $v) { printf(' %s="%s"', $view->escape($k), $view->escape($v)); } ?> enctype="multipart/form-data"> + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..c5af39a5b6b06fbcfc6bb8ee392ea13972abfb8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php @@ -0,0 +1,5 @@ + +block($form, 'form_widget_compound')?> + +block($form, 'form_widget_simple')?> + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_compound.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_compound.html.php new file mode 100644 index 0000000000000000000000000000000000000000..7a4f7cd51fb3a861e860f448396a2a9688ba574c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_compound.html.php @@ -0,0 +1,7 @@ +
    block($form, 'widget_container_attributes') ?>> + parent && $errors): ?> + errors($form) ?> + + block($form, 'form_rows') ?> + rest($form) ?> +
    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_simple.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_simple.html.php new file mode 100644 index 0000000000000000000000000000000000000000..5d7654f54cdc667d1318d525b69c82de07a3ea06 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_simple.html.php @@ -0,0 +1 @@ +block($form, 'widget_attributes') ?> value="escape($value) ?>" /> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/hidden_row.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/hidden_row.html.php new file mode 100644 index 0000000000000000000000000000000000000000..3239d8f415b123cf120dea00d171ded75d3ecceb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/hidden_row.html.php @@ -0,0 +1 @@ +widget($form) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/hidden_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/hidden_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..a43f7de475e7a793461661533b40ba389c3fab4d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/hidden_widget.html.php @@ -0,0 +1 @@ +block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'hidden')) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/integer_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/integer_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..5fceb49a3895318e62e46ba7c7dac36c5265114c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/integer_widget.html.php @@ -0,0 +1 @@ +block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'number')) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/money_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/money_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..644d28491537147d43367e87052e9450b18b27b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/money_widget.html.php @@ -0,0 +1 @@ +block($form, 'form_widget_simple'), $money_pattern) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/number_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/number_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..bf4a4c478502b3fb38a7068c6e478edb9edc064d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/number_widget.html.php @@ -0,0 +1 @@ +block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'text')) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/password_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/password_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..ec96cfb46b24c69bf837ad4c52b523492abf3c89 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/password_widget.html.php @@ -0,0 +1 @@ +block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'password')) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/percent_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/percent_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..8519da429b188a804d3d5ef83ceff77fab76e51d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/percent_widget.html.php @@ -0,0 +1 @@ +block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'text')) ?> % diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/radio_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/radio_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..ddc8c529dff676c1b68c9a8befd9fc1061581a88 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/radio_widget.html.php @@ -0,0 +1,5 @@ +block($form, 'widget_attributes') ?> + value="escape($value) ?>" + checked="checked" +/> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/range_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/range_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..4c628f8e005bcf292e9380ddf51e000a75cdbcf0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/range_widget.html.php @@ -0,0 +1 @@ +block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'range')); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/repeated_row.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/repeated_row.html.php new file mode 100644 index 0000000000000000000000000000000000000000..d4af23d712320864f2f1ef52527b5cad7bacc135 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/repeated_row.html.php @@ -0,0 +1 @@ +block($form, 'form_rows') ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/reset_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/reset_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..e8fa18e488df822be8516916d2a9f95c6bdd4d75 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/reset_widget.html.php @@ -0,0 +1 @@ +block($form, 'button_widget', array('type' => isset($type) ? $type : 'reset')) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/search_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/search_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..48a33f4aa2dbc0083bbe695025b2b688a044f921 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/search_widget.html.php @@ -0,0 +1 @@ +block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'search')) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/submit_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/submit_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..6bf71f5a1e1c946a32c5992cd7dbee624b61bfc3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/submit_widget.html.php @@ -0,0 +1 @@ +block($form, 'button_widget', array('type' => isset($type) ? $type : 'submit')) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/textarea_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/textarea_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..c989ce575d579d7f40dbea711bbf39a8645df3a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/textarea_widget.html.php @@ -0,0 +1 @@ + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/time_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/time_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..e24411cd74b8b86d275bb1daee33d2caaaf1988e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/time_widget.html.php @@ -0,0 +1,22 @@ + + block($form, 'form_widget_simple'); ?> + + array('size' => 1)) : array() ?> +
    block($form, 'widget_container_attributes') ?>> + widget($form['hour'], $vars); + + if ($with_minutes) { + echo ':'; + echo $view['form']->widget($form['minute'], $vars); + } + + if ($with_seconds) { + echo ':'; + echo $view['form']->widget($form['second'], $vars); + } + ?> +
    + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/url_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/url_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..9e26318497b3c0babb51aaba53b5adc0c9979945 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/url_widget.html.php @@ -0,0 +1 @@ +block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'url')) ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_attributes.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_attributes.html.php new file mode 100644 index 0000000000000000000000000000000000000000..3fefa47c15c99f9a52a1cb4015784a2fd90e23f5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_attributes.html.php @@ -0,0 +1,11 @@ +id="escape($id) ?>" name="escape($full_name) ?>" disabled="disabled" + required="required" + $v): ?> + +escape($k), $view->escape(false !== $translation_domain ? $view['translator']->trans($v, array(), $translation_domain) : $v)) ?> + +escape($k), $view->escape($k)) ?> + +escape($k), $view->escape($v)) ?> + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_container_attributes.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_container_attributes.html.php new file mode 100644 index 0000000000000000000000000000000000000000..c4dff7b61f4e042b1570cc133fd6f73ebfdbbb7b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_container_attributes.html.php @@ -0,0 +1,10 @@ +id="escape($id) ?>" + $v): ?> + +escape($k), $view->escape(false !== $translation_domain ? $view['translator']->trans($v, array(), $translation_domain) : $v)) ?> + +escape($k), $view->escape($k)) ?> + +escape($k), $view->escape($v)) ?> + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/button_row.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/button_row.html.php new file mode 100644 index 0000000000000000000000000000000000000000..ef4d22b975081ce9f69ac55140d4b4f9485adc14 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/button_row.html.php @@ -0,0 +1,6 @@ + + + + widget($form) ?> + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_row.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_row.html.php new file mode 100644 index 0000000000000000000000000000000000000000..7e1f2f5d28db818ffa1801062afec447c6b16a0c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_row.html.php @@ -0,0 +1,9 @@ + + + label($form) ?> + + + errors($form) ?> + widget($form) ?> + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_widget_compound.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_widget_compound.html.php new file mode 100644 index 0000000000000000000000000000000000000000..20b9668aa49c969e856505a0ceb6fac5dda7fc98 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_widget_compound.html.php @@ -0,0 +1,11 @@ +block($form, 'widget_container_attributes') ?>> + parent && $errors): ?> + + + + + block($form, 'form_rows') ?> + rest($form) ?> +
    + errors($form) ?> +
    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/hidden_row.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/hidden_row.html.php new file mode 100644 index 0000000000000000000000000000000000000000..491ece360232700d7d8151c7fedf8a49d9bed783 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/hidden_row.html.php @@ -0,0 +1,5 @@ + + + widget($form) ?> + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..9783117f0b7f66d54524c4ccc2ff3c76fd555f90 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.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\Bundle\FrameworkBundle\Routing; + +use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser; +use Symfony\Component\Config\Exception\FileLoaderLoadException; +use Symfony\Component\Config\Loader\DelegatingLoader as BaseDelegatingLoader; +use Symfony\Component\Config\Loader\LoaderResolverInterface; + +/** + * DelegatingLoader delegates route loading to other loaders using a loader resolver. + * + * This implementation resolves the _controller attribute from the short notation + * to the fully-qualified form (from a:b:c to class::method). + * + * @author Fabien Potencier + */ +class DelegatingLoader extends BaseDelegatingLoader +{ + protected $parser; + private $loading = false; + + /** + * Constructor. + * + * @param ControllerNameParser $parser A ControllerNameParser instance + * @param LoaderResolverInterface $resolver A LoaderResolverInterface instance + */ + public function __construct(ControllerNameParser $parser, LoaderResolverInterface $resolver) + { + $this->parser = $parser; + + parent::__construct($resolver); + } + + /** + * {@inheritdoc} + */ + public function load($resource, $type = null) + { + if ($this->loading) { + // This can happen if a fatal error occurs in parent::load(). + // Here is the scenario: + // - while routes are being loaded by parent::load() below, a fatal error + // occurs (e.g. parse error in a controller while loading annotations); + // - PHP abruptly empties the stack trace, bypassing all catch/finally blocks; + // it then calls the registered shutdown functions; + // - the ErrorHandler catches the fatal error and re-injects it for rendering + // thanks to HttpKernel->terminateWithException() (that calls handleException()); + // - at this stage, if we try to load the routes again, we must prevent + // the fatal error from occurring a second time, + // otherwise the PHP process would be killed immediately; + // - while rendering the exception page, the router can be required + // (by e.g. the web profiler that needs to generate an URL); + // - this handles the case and prevents the second fatal error + // by triggering an exception beforehand. + + throw new FileLoaderLoadException($resource); + } + $this->loading = true; + + try { + $collection = parent::load($resource, $type); + } finally { + $this->loading = false; + } + + foreach ($collection->all() as $route) { + if (!$controller = $route->getDefault('_controller')) { + continue; + } + + try { + $controller = $this->parser->parse($controller); + } catch (\InvalidArgumentException $e) { + // unable to optimize unknown notation + } + + $route->setDefault('_controller', $controller); + } + + return $collection; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableUrlMatcher.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableUrlMatcher.php new file mode 100644 index 0000000000000000000000000000000000000000..5571c74e81d1937b74999b511c34653cc24b7d04 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableUrlMatcher.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Routing; + +use Symfony\Component\Routing\Matcher\RedirectableUrlMatcher as BaseMatcher; + +/** + * @author Fabien Potencier + */ +class RedirectableUrlMatcher extends BaseMatcher +{ + /** + * Redirects the user to another URL. + * + * @param string $path The path info to redirect to + * @param string $route The route that matched + * @param string $scheme The URL scheme (null to keep the current one) + * + * @return array An array of parameters + */ + public function redirect($path, $route, $scheme = null) + { + return array( + '_controller' => 'Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController::urlRedirectAction', + 'path' => $path, + 'permanent' => true, + 'scheme' => $scheme, + 'httpPort' => $this->context->getHttpPort(), + 'httpsPort' => $this->context->getHttpsPort(), + '_route' => $route, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php new file mode 100644 index 0000000000000000000000000000000000000000..35bd5ef1efed023ab684cd31e5e0e645ca1e1346 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php @@ -0,0 +1,171 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Routing; + +use Symfony\Component\Routing\Router as BaseRouter; +use Symfony\Component\Routing\RequestContext; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; +use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; + +/** + * This Router creates the Loader only when the cache is empty. + * + * @author Fabien Potencier + */ +class Router extends BaseRouter implements WarmableInterface +{ + private $container; + + /** + * Constructor. + * + * @param ContainerInterface $container A ContainerInterface instance + * @param mixed $resource The main resource to load + * @param array $options An array of options + * @param RequestContext $context The context + */ + public function __construct(ContainerInterface $container, $resource, array $options = array(), RequestContext $context = null) + { + $this->container = $container; + + $this->resource = $resource; + $this->context = $context ?: new RequestContext(); + $this->setOptions($options); + } + + /** + * {@inheritdoc} + */ + public function getRouteCollection() + { + if (null === $this->collection) { + $this->collection = $this->container->get('routing.loader')->load($this->resource, $this->options['resource_type']); + $this->resolveParameters($this->collection); + } + + return $this->collection; + } + + /** + * {@inheritdoc} + */ + public function warmUp($cacheDir) + { + $currentDir = $this->getOption('cache_dir'); + + // force cache generation + $this->setOption('cache_dir', $cacheDir); + $this->getMatcher(); + $this->getGenerator(); + + $this->setOption('cache_dir', $currentDir); + } + + /** + * Replaces placeholders with service container parameter values in: + * - the route defaults, + * - the route requirements, + * - the route path, + * - the route host, + * - the route schemes, + * - the route methods. + * + * @param RouteCollection $collection + */ + private function resolveParameters(RouteCollection $collection) + { + foreach ($collection as $route) { + foreach ($route->getDefaults() as $name => $value) { + $route->setDefault($name, $this->resolve($value)); + } + + foreach ($route->getRequirements() as $name => $value) { + $route->setRequirement($name, $this->resolve($value)); + } + + $route->setPath($this->resolve($route->getPath())); + $route->setHost($this->resolve($route->getHost())); + + $schemes = array(); + foreach ($route->getSchemes() as $scheme) { + $schemes = array_merge($schemes, explode('|', $this->resolve($scheme))); + } + $route->setSchemes($schemes); + + $methods = array(); + foreach ($route->getMethods() as $method) { + $methods = array_merge($methods, explode('|', $this->resolve($method))); + } + $route->setMethods($methods); + $route->setCondition($this->resolve($route->getCondition())); + } + } + + /** + * Recursively replaces placeholders with the service container parameters. + * + * @param mixed $value The source which might contain "%placeholders%" + * + * @return mixed The source with the placeholders replaced by the container + * parameters. Arrays are resolved recursively. + * + * @throws ParameterNotFoundException When a placeholder does not exist as a container parameter + * @throws RuntimeException When a container value is not a string or a numeric value + */ + private function resolve($value) + { + if (is_array($value)) { + foreach ($value as $key => $val) { + $value[$key] = $this->resolve($val); + } + + return $value; + } + + if (!is_string($value)) { + return $value; + } + + $container = $this->container; + + $escapedValue = preg_replace_callback('/%%|%([^%\s]++)%/', function ($match) use ($container, $value) { + // skip %% + if (!isset($match[1])) { + return '%%'; + } + + if (preg_match('/^env\(\w+\)$/', $match[1])) { + throw new RuntimeException(sprintf('Using "%%%s%%" is not allowed in routing configuration.', $match[1])); + } + + $resolved = $container->getParameter($match[1]); + + if (is_string($resolved) || is_numeric($resolved)) { + return (string) $resolved; + } + + throw new RuntimeException(sprintf( + 'The container parameter "%s", used in the route configuration value "%s", '. + 'must be a string or numeric, but it is of type %s.', + $match[1], + $value, + gettype($resolved) + ) + ); + }, $value); + + return str_replace('%%', '%', $escapedValue); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/DelegatingEngine.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/DelegatingEngine.php new file mode 100644 index 0000000000000000000000000000000000000000..c204ffa2f03b25222ab2dbac7c71078b121caa47 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/DelegatingEngine.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating; + +use Symfony\Component\Templating\DelegatingEngine as BaseDelegatingEngine; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\Response; + +/** + * DelegatingEngine selects an engine for a given template. + * + * @author Fabien Potencier + */ +class DelegatingEngine extends BaseDelegatingEngine implements EngineInterface +{ + protected $container; + + /** + * Constructor. + * + * @param ContainerInterface $container The DI container + * @param array $engineIds An array of engine Ids + */ + public function __construct(ContainerInterface $container, array $engineIds) + { + $this->container = $container; + $this->engines = $engineIds; + } + + /** + * {@inheritdoc} + */ + public function getEngine($name) + { + $this->resolveEngines(); + + return parent::getEngine($name); + } + + /** + * {@inheritdoc} + */ + public function renderResponse($view, array $parameters = array(), Response $response = null) + { + $engine = $this->getEngine($view); + + if ($engine instanceof EngineInterface) { + return $engine->renderResponse($view, $parameters, $response); + } + + if (null === $response) { + $response = new Response(); + } + + $response->setContent($engine->render($view, $parameters)); + + return $response; + } + + /** + * Resolved engine ids to their real engine instances from the container. + */ + private function resolveEngines() + { + foreach ($this->engines as $i => $engine) { + if (is_string($engine)) { + $this->engines[$i] = $this->container->get($engine); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/EngineInterface.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/EngineInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..dcf58975176bb718e856944260149cf7200e921a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/EngineInterface.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\Bundle\FrameworkBundle\Templating; + +use Symfony\Component\Templating\EngineInterface as BaseEngineInterface; +use Symfony\Component\HttpFoundation\Response; + +/** + * EngineInterface is the interface each engine must implement. + * + * @author Fabien Potencier + */ +interface EngineInterface extends BaseEngineInterface +{ + /** + * Renders a view and returns a Response. + * + * @param string $view The view name + * @param array $parameters An array of parameters to pass to the view + * @param Response $response A Response instance + * + * @return Response A Response instance + * + * @throws \RuntimeException if the template cannot be rendered + */ + public function renderResponse($view, array $parameters = array(), Response $response = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php new file mode 100644 index 0000000000000000000000000000000000000000..606e886415c95fee9699720b990f8ac9b0ecf824 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php @@ -0,0 +1,105 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Session\Session; + +/** + * GlobalVariables is the entry point for Symfony global variables in PHP templates. + * + * @author Fabien Potencier + */ +class GlobalVariables +{ + protected $container; + + /** + * @param ContainerInterface $container The DI container + */ + public function __construct(ContainerInterface $container) + { + $this->container = $container; + } + + /** + * Returns the current user. + * + * @return mixed + * + * @see TokenInterface::getUser() + */ + public function getUser() + { + if (!$this->container->has('security.token_storage')) { + return; + } + + $tokenStorage = $this->container->get('security.token_storage'); + + if (!$token = $tokenStorage->getToken()) { + return; + } + + $user = $token->getUser(); + if (!is_object($user)) { + return; + } + + return $user; + } + + /** + * Returns the current request. + * + * @return Request|null The HTTP request object + */ + public function getRequest() + { + if ($this->container->has('request_stack')) { + return $this->container->get('request_stack')->getCurrentRequest(); + } + } + + /** + * Returns the current session. + * + * @return Session|null The session + */ + public function getSession() + { + if ($request = $this->getRequest()) { + return $request->getSession(); + } + } + + /** + * Returns the current app environment. + * + * @return string The current environment string (e.g 'dev') + */ + public function getEnvironment() + { + return $this->container->getParameter('kernel.environment'); + } + + /** + * Returns the current app debug mode. + * + * @return bool The current debug mode + */ + public function getDebug() + { + return (bool) $this->container->getParameter('kernel.debug'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..8f0d54eada32c9fa288af82611adbb7684424eb3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating\Helper; + +use Symfony\Component\Templating\Helper\Helper; +use Symfony\Component\HttpKernel\Fragment\FragmentHandler; +use Symfony\Component\HttpKernel\Controller\ControllerReference; + +/** + * ActionsHelper manages action inclusions. + * + * @author Fabien Potencier + */ +class ActionsHelper extends Helper +{ + private $handler; + + /** + * Constructor. + * + * @param FragmentHandler $handler A FragmentHandler instance + */ + public function __construct(FragmentHandler $handler) + { + $this->handler = $handler; + } + + /** + * Returns the fragment content for a given URI. + * + * @param string $uri A URI + * @param array $options An array of options + * + * @return string The fragment content + * + * @see FragmentHandler::render() + */ + public function render($uri, array $options = array()) + { + $strategy = isset($options['strategy']) ? $options['strategy'] : 'inline'; + unset($options['strategy']); + + return $this->handler->render($uri, $strategy, $options); + } + + public function controller($controller, $attributes = array(), $query = array()) + { + return new ControllerReference($controller, $attributes, $query); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'actions'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..072b6e7fc93020901d54901772f381cd0f1f4eaf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating\Helper; + +use Symfony\Component\Asset\Packages; +use Symfony\Component\Templating\Helper\Helper; + +/** + * AssetsHelper helps manage asset URLs. + * + * @author Fabien Potencier + */ +class AssetsHelper extends Helper +{ + private $packages; + + public function __construct(Packages $packages) + { + $this->packages = $packages; + } + + /** + * Returns the public url/path of an asset. + * + * If the package used to generate the path is an instance of + * UrlPackage, you will always get a URL and not a path. + * + * @param string $path A public path + * @param string $packageName The name of the asset package to use + * + * @return string The public path of the asset + */ + public function getUrl($path, $packageName = null) + { + return $this->packages->getUrl($path, $packageName); + } + + /** + * Returns the version of an asset. + * + * @param string $path A public path + * @param string $packageName The name of the asset package to use + * + * @return string The asset version + */ + public function getVersion($path, $packageName = null) + { + return $this->packages->getVersion($path, $packageName); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'assets'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..ba36cbde0c88406f15d1cf7285e288596a66d714 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.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\Bundle\FrameworkBundle\Templating\Helper; + +use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; +use Symfony\Component\Templating\Helper\Helper; + +/** + * CodeHelper. + * + * @author Fabien Potencier + */ +class CodeHelper extends Helper +{ + protected $fileLinkFormat; + protected $rootDir; + protected $charset; + + /** + * Constructor. + * + * @param string|FileLinkFormatter $fileLinkFormat The format for links to source files + * @param string $rootDir The project root directory + * @param string $charset The charset + */ + public function __construct($fileLinkFormat, $rootDir, $charset) + { + $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + $this->rootDir = str_replace('\\', '/', $rootDir).'/'; + $this->charset = $charset; + } + + /** + * Formats an array as a string. + * + * @param array $args The argument array + * + * @return string + */ + public function formatArgsAsText(array $args) + { + return strip_tags($this->formatArgs($args)); + } + + public function abbrClass($class) + { + $parts = explode('\\', $class); + $short = array_pop($parts); + + return sprintf('%s', $class, $short); + } + + public function abbrMethod($method) + { + if (false !== strpos($method, '::')) { + list($class, $method) = explode('::', $method, 2); + $result = sprintf('%s::%s()', $this->abbrClass($class), $method); + } elseif ('Closure' === $method) { + $result = sprintf('%s', $method, $method); + } else { + $result = sprintf('%s()', $method, $method); + } + + return $result; + } + + /** + * Formats an array as a string. + * + * @param array $args The argument array + * + * @return string + */ + public function formatArgs(array $args) + { + $result = array(); + foreach ($args as $key => $item) { + if ('object' === $item[0]) { + $parts = explode('\\', $item[1]); + $short = array_pop($parts); + $formattedValue = sprintf('object(%s)', $item[1], $short); + } elseif ('array' === $item[0]) { + $formattedValue = sprintf('array(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); + } elseif ('string' === $item[0]) { + $formattedValue = sprintf("'%s'", htmlspecialchars($item[1], ENT_QUOTES, $this->getCharset())); + } elseif ('null' === $item[0]) { + $formattedValue = 'null'; + } elseif ('boolean' === $item[0]) { + $formattedValue = ''.strtolower(var_export($item[1], true)).''; + } elseif ('resource' === $item[0]) { + $formattedValue = 'resource'; + } else { + $formattedValue = str_replace("\n", '', var_export(htmlspecialchars((string) $item[1], ENT_QUOTES, $this->getCharset()), true)); + } + + $result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue); + } + + return implode(', ', $result); + } + + /** + * Returns an excerpt of a code file around the given line number. + * + * @param string $file A file path + * @param int $line The selected line number + * + * @return string An HTML string + */ + public function fileExcerpt($file, $line) + { + if (is_readable($file)) { + if (extension_loaded('fileinfo')) { + $finfo = new \Finfo(); + + // Check if the file is an application/octet-stream (eg. Phar file) because highlight_file cannot parse these files + if ('application/octet-stream' === $finfo->file($file, FILEINFO_MIME_TYPE)) { + return; + } + } + + // highlight_file could throw warnings + // see https://bugs.php.net/bug.php?id=25725 + $code = @highlight_file($file, true); + // remove main code/span tags + $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); + $content = explode('
    ', $code); + + $lines = array(); + for ($i = max($line - 3, 1), $max = min($line + 3, count($content)); $i <= $max; ++$i) { + $lines[] = ''.self::fixCodeMarkup($content[$i - 1]).''; + } + + return '
      '.implode("\n", $lines).'
    '; + } + } + + /** + * Formats a file path. + * + * @param string $file An absolute file path + * @param int $line The line number + * @param string $text Use this text for the link rather than the file path + * + * @return string + */ + public function formatFile($file, $line, $text = null) + { + $flags = ENT_QUOTES | ENT_SUBSTITUTE; + + if (null === $text) { + $file = trim($file); + $fileStr = $file; + if (0 === strpos($fileStr, $this->rootDir)) { + $fileStr = str_replace($this->rootDir, '', str_replace('\\', '/', $fileStr)); + $fileStr = htmlspecialchars($fileStr, $flags, $this->charset); + $fileStr = sprintf('kernel.root_dir/%s', htmlspecialchars($this->rootDir, $flags, $this->charset), $fileStr); + } + + $text = sprintf('%s at line %d', $fileStr, $line); + } + + if (false !== $link = $this->getFileLink($file, $line)) { + return sprintf('%s', htmlspecialchars($link, $flags, $this->charset), $text); + } + + return $text; + } + + /** + * Returns the link for a given file/line pair. + * + * @param string $file An absolute file path + * @param int $line The line number + * + * @return string A link of false + */ + public function getFileLink($file, $line) + { + if ($fmt = $this->fileLinkFormat) { + return is_string($fmt) ? strtr($fmt, array('%f' => $file, '%l' => $line)) : $fmt->format($file, $line); + } + + return false; + } + + public function formatFileFromText($text) + { + return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', function ($match) { + return 'in '.$this->formatFile($match[2], $match[3]); + }, $text); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'code'; + } + + protected static function fixCodeMarkup($line) + { + // ending tag from previous line + $opening = strpos($line, ''); + if (false !== $closing && (false === $opening || $closing < $opening)) { + $line = substr_replace($line, '', $closing, 7); + } + + // missing tag at the end of line + $opening = strpos($line, ''); + if (false !== $opening && (false === $closing || $closing > $opening)) { + $line .= ''; + } + + return $line; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..68d46c2c3facb4ab3e4a0358729ad145b4151813 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.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\Bundle\FrameworkBundle\Templating\Helper; + +use Symfony\Component\Templating\Helper\Helper; +use Symfony\Component\Form\FormRendererInterface; +use Symfony\Component\Form\FormView; + +/** + * FormHelper provides helpers to help display forms. + * + * @author Fabien Potencier + * @author Bernhard Schussek + */ +class FormHelper extends Helper +{ + /** + * @var FormRendererInterface + */ + private $renderer; + + /** + * @param FormRendererInterface $renderer + */ + public function __construct(FormRendererInterface $renderer) + { + $this->renderer = $renderer; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'form'; + } + + /** + * Sets a theme for a given view. + * + * The theme format is ":". + * + * @param FormView $view A FormView instance + * @param string|array $themes A theme or an array of theme + */ + public function setTheme(FormView $view, $themes) + { + $this->renderer->setTheme($view, $themes); + } + + /** + * Renders the HTML for a form. + * + * Example usage: + * + * form($form) ?> + * + * You can pass options during the call: + * + * form($form, array('attr' => array('class' => 'foo'))) ?> + * + * form($form, array('separator' => '+++++')) ?> + * + * This method is mainly intended for prototyping purposes. If you want to + * control the layout of a form in a more fine-grained manner, you are + * advised to use the other helper methods for rendering the parts of the + * form individually. You can also create a custom form theme to adapt + * the look of the form. + * + * @param FormView $view The view for which to render the form + * @param array $variables Additional variables passed to the template + * + * @return string The HTML markup + */ + public function form(FormView $view, array $variables = array()) + { + return $this->renderer->renderBlock($view, 'form', $variables); + } + + /** + * Renders the form start tag. + * + * Example usage templates: + * + * start($form) ?>> + * + * @param FormView $view The view for which to render the start tag + * @param array $variables Additional variables passed to the template + * + * @return string The HTML markup + */ + public function start(FormView $view, array $variables = array()) + { + return $this->renderer->renderBlock($view, 'form_start', $variables); + } + + /** + * Renders the form end tag. + * + * Example usage templates: + * + * end($form) ?>> + * + * @param FormView $view The view for which to render the end tag + * @param array $variables Additional variables passed to the template + * + * @return string The HTML markup + */ + public function end(FormView $view, array $variables = array()) + { + return $this->renderer->renderBlock($view, 'form_end', $variables); + } + + /** + * Renders the HTML for a given view. + * + * Example usage: + * + * widget($form) ?> + * + * You can pass options during the call: + * + * widget($form, array('attr' => array('class' => 'foo'))) ?> + * + * widget($form, array('separator' => '+++++')) ?> + * + * @param FormView $view The view for which to render the widget + * @param array $variables Additional variables passed to the template + * + * @return string The HTML markup + */ + public function widget(FormView $view, array $variables = array()) + { + return $this->renderer->searchAndRenderBlock($view, 'widget', $variables); + } + + /** + * Renders the entire form field "row". + * + * @param FormView $view The view for which to render the row + * @param array $variables Additional variables passed to the template + * + * @return string The HTML markup + */ + public function row(FormView $view, array $variables = array()) + { + return $this->renderer->searchAndRenderBlock($view, 'row', $variables); + } + + /** + * Renders the label of the given view. + * + * @param FormView $view The view for which to render the label + * @param string $label The label + * @param array $variables Additional variables passed to the template + * + * @return string The HTML markup + */ + public function label(FormView $view, $label = null, array $variables = array()) + { + if (null !== $label) { + $variables += array('label' => $label); + } + + return $this->renderer->searchAndRenderBlock($view, 'label', $variables); + } + + /** + * Renders the errors of the given view. + * + * @param FormView $view The view to render the errors for + * + * @return string The HTML markup + */ + public function errors(FormView $view) + { + return $this->renderer->searchAndRenderBlock($view, 'errors'); + } + + /** + * Renders views which have not already been rendered. + * + * @param FormView $view The parent view + * @param array $variables An array of variables + * + * @return string The HTML markup + */ + public function rest(FormView $view, array $variables = array()) + { + return $this->renderer->searchAndRenderBlock($view, 'rest', $variables); + } + + /** + * Renders a block of the template. + * + * @param FormView $view The view for determining the used themes + * @param string $blockName The name of the block to render + * @param array $variables The variable to pass to the template + * + * @return string The HTML markup + */ + public function block(FormView $view, $blockName, array $variables = array()) + { + return $this->renderer->renderBlock($view, $blockName, $variables); + } + + /** + * Returns a CSRF token. + * + * Use this helper for CSRF protection without the overhead of creating a + * form. + * + * + * echo $view['form']->csrfToken('rm_user_'.$user->getId()); + * + * + * Check the token in your action using the same CSRF token id. + * + * + * $csrfProvider = $this->get('security.csrf.token_generator'); + * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) { + * throw new \RuntimeException('CSRF attack detected.'); + * } + * + * + * @param string $tokenId The CSRF token id of the protected action + * + * @return string A CSRF token + * + * @throws \BadMethodCallException When no CSRF provider was injected in the constructor. + */ + public function csrfToken($tokenId) + { + return $this->renderer->renderCsrfToken($tokenId); + } + + public function humanize($text) + { + return $this->renderer->humanize($text); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..694e375fb27d87d39d62c774d182d72000172c75 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating\Helper; + +use Symfony\Component\Templating\Helper\Helper; +use Symfony\Component\HttpFoundation\RequestStack; + +/** + * RequestHelper provides access to the current request parameters. + * + * @author Fabien Potencier + */ +class RequestHelper extends Helper +{ + protected $requestStack; + + public function __construct(RequestStack $requestStack) + { + $this->requestStack = $requestStack; + } + + /** + * Returns a parameter from the current request object. + * + * @param string $key The name of the parameter + * @param string $default A default value + * + * @return mixed + * + * @see Request::get() + */ + public function getParameter($key, $default = null) + { + return $this->getRequest()->get($key, $default); + } + + /** + * Returns the locale. + * + * @return string + */ + public function getLocale() + { + return $this->getRequest()->getLocale(); + } + + private function getRequest() + { + if (!$this->requestStack->getCurrentRequest()) { + throw new \LogicException('A Request must be available.'); + } + + return $this->requestStack->getCurrentRequest(); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'request'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RouterHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RouterHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..439910494ff48261bf5ce42992ee93f44737e78c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RouterHelper.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating\Helper; + +use Symfony\Component\Templating\Helper\Helper; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; + +/** + * RouterHelper manages links between pages in a template context. + * + * @author Fabien Potencier + */ +class RouterHelper extends Helper +{ + protected $generator; + + /** + * Constructor. + * + * @param UrlGeneratorInterface $router A Router instance + */ + public function __construct(UrlGeneratorInterface $router) + { + $this->generator = $router; + } + + /** + * Generates a URL reference (as an absolute or relative path) to the route with the given parameters. + * + * @param string $name The name of the route + * @param mixed $parameters An array of parameters + * @param bool $relative Whether to generate a relative or absolute path + * + * @return string The generated URL reference + * + * @see UrlGeneratorInterface + */ + public function path($name, $parameters = array(), $relative = false) + { + return $this->generator->generate($name, $parameters, $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH); + } + + /** + * Generates a URL reference (as an absolute URL or network path) to the route with the given parameters. + * + * @param string $name The name of the route + * @param mixed $parameters An array of parameters + * @param bool $schemeRelative Whether to omit the scheme in the generated URL reference + * + * @return string The generated URL reference + * + * @see UrlGeneratorInterface + */ + public function url($name, $parameters = array(), $schemeRelative = false) + { + return $this->generator->generate($name, $parameters, $schemeRelative ? UrlGeneratorInterface::NETWORK_PATH : UrlGeneratorInterface::ABSOLUTE_URL); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'router'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..15ec1a9cd1762b1b6b58e0b3a0b75cb8d2ba1350 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating\Helper; + +use Symfony\Component\Templating\Helper\Helper; +use Symfony\Component\HttpFoundation\RequestStack; + +/** + * SessionHelper provides read-only access to the session attributes. + * + * @author Fabien Potencier + */ +class SessionHelper extends Helper +{ + protected $session; + protected $requestStack; + + public function __construct(RequestStack $requestStack) + { + $this->requestStack = $requestStack; + } + + /** + * Returns an attribute. + * + * @param string $name The attribute name + * @param mixed $default The default value + * + * @return mixed + */ + public function get($name, $default = null) + { + return $this->getSession()->get($name, $default); + } + + public function getFlash($name, array $default = array()) + { + return $this->getSession()->getFlashBag()->get($name, $default); + } + + public function getFlashes() + { + return $this->getSession()->getFlashBag()->all(); + } + + public function hasFlash($name) + { + return $this->getSession()->getFlashBag()->has($name); + } + + private function getSession() + { + if (null === $this->session) { + if (!$this->requestStack->getMasterRequest()) { + throw new \LogicException('A Request must be available.'); + } + + $this->session = $this->requestStack->getMasterRequest()->getSession(); + } + + return $this->session; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'session'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/StopwatchHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/StopwatchHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..47a9cf80ebcb4840474f7904e15e425ac2641b39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/StopwatchHelper.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating\Helper; + +use Symfony\Component\Stopwatch\Stopwatch; +use Symfony\Component\Templating\Helper\Helper; + +/** + * StopwatchHelper provides methods time your PHP templates. + * + * @author Wouter J + */ +class StopwatchHelper extends Helper +{ + private $stopwatch; + + public function __construct(Stopwatch $stopwatch = null) + { + $this->stopwatch = $stopwatch; + } + + public function getName() + { + return 'stopwatch'; + } + + public function __call($method, $arguments = array()) + { + if (null !== $this->stopwatch) { + if (method_exists($this->stopwatch, $method)) { + return call_user_func_array(array($this->stopwatch, $method), $arguments); + } + + throw new \BadMethodCallException(sprintf('Method "%s" of Stopwatch does not exist', $method)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/TranslatorHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/TranslatorHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..2c2641a885b13b6f629c6562af0dfef8d20d4794 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/TranslatorHelper.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating\Helper; + +use Symfony\Component\Templating\Helper\Helper; +use Symfony\Component\Translation\TranslatorInterface; + +/** + * TranslatorHelper. + * + * @author Fabien Potencier + */ +class TranslatorHelper extends Helper +{ + protected $translator; + + /** + * Constructor. + * + * @param TranslatorInterface $translator A TranslatorInterface instance + */ + public function __construct(TranslatorInterface $translator) + { + $this->translator = $translator; + } + + /** + * @see TranslatorInterface::trans() + */ + public function trans($id, array $parameters = array(), $domain = 'messages', $locale = null) + { + return $this->translator->trans($id, $parameters, $domain, $locale); + } + + /** + * @see TranslatorInterface::transChoice() + */ + public function transChoice($id, $number, array $parameters = array(), $domain = 'messages', $locale = null) + { + return $this->translator->transChoice($id, $number, $parameters, $domain, $locale); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'translator'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..4f6cffc103b8c8a0e47dcd27583a71e0474e29bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating\Loader; + +use Symfony\Component\Templating\Storage\FileStorage; +use Symfony\Component\Templating\Loader\LoaderInterface; +use Symfony\Component\Config\FileLocatorInterface; +use Symfony\Component\Templating\TemplateReferenceInterface; + +/** + * FilesystemLoader is a loader that read templates from the filesystem. + * + * @author Fabien Potencier + */ +class FilesystemLoader implements LoaderInterface +{ + protected $locator; + + /** + * Constructor. + * + * @param FileLocatorInterface $locator A FileLocatorInterface instance + */ + public function __construct(FileLocatorInterface $locator) + { + $this->locator = $locator; + } + + /** + * {@inheritdoc} + */ + public function load(TemplateReferenceInterface $template) + { + try { + $file = $this->locator->locate($template); + } catch (\InvalidArgumentException $e) { + return false; + } + + return new FileStorage($file); + } + + /** + * {@inheritdoc} + */ + public function isFresh(TemplateReferenceInterface $template, $time) + { + if (false === $storage = $this->load($template)) { + return false; + } + + if (!is_readable((string) $storage)) { + return false; + } + + return filemtime((string) $storage) < $time; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php new file mode 100644 index 0000000000000000000000000000000000000000..31fd9a368ff725c7806781c705fa39cd7491a7cc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating\Loader; + +use Symfony\Component\Config\FileLocatorInterface; +use Symfony\Component\Templating\TemplateReferenceInterface; + +/** + * TemplateLocator locates templates in bundles. + * + * @author Fabien Potencier + */ +class TemplateLocator implements FileLocatorInterface +{ + protected $locator; + protected $cache; + + private $cacheHits = array(); + + /** + * Constructor. + * + * @param FileLocatorInterface $locator A FileLocatorInterface instance + * @param string $cacheDir The cache path + */ + public function __construct(FileLocatorInterface $locator, $cacheDir = null) + { + if (null !== $cacheDir && file_exists($cache = $cacheDir.'/templates.php')) { + $this->cache = require $cache; + } + + $this->locator = $locator; + } + + /** + * Returns a full path for a given file. + * + * @param TemplateReferenceInterface $template A template + * + * @return string The full path for the file + */ + protected function getCacheKey($template) + { + return $template->getLogicalName(); + } + + /** + * Returns a full path for a given file. + * + * @param TemplateReferenceInterface $template A template + * @param string $currentPath Unused + * @param bool $first Unused + * + * @return string The full path for the file + * + * @throws \InvalidArgumentException When the template is not an instance of TemplateReferenceInterface + * @throws \InvalidArgumentException When the template file can not be found + */ + public function locate($template, $currentPath = null, $first = true) + { + if (!$template instanceof TemplateReferenceInterface) { + throw new \InvalidArgumentException('The template must be an instance of TemplateReferenceInterface.'); + } + + $key = $this->getCacheKey($template); + + if (isset($this->cacheHits[$key])) { + return $this->cacheHits[$key]; + } + if (isset($this->cache[$key])) { + return $this->cacheHits[$key] = realpath($this->cache[$key]) ?: $this->cache[$key]; + } + + try { + return $this->cacheHits[$key] = $this->locator->locate($template->getPath(), $currentPath); + } catch (\InvalidArgumentException $e) { + throw new \InvalidArgumentException(sprintf('Unable to find template "%s" : "%s".', $template, $e->getMessage()), 0, $e); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/PhpEngine.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/PhpEngine.php new file mode 100644 index 0000000000000000000000000000000000000000..41382f769c65f688cb16c2782ea48c41ace7a9f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/PhpEngine.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating; + +use Symfony\Component\Templating\PhpEngine as BasePhpEngine; +use Symfony\Component\Templating\Loader\LoaderInterface; +use Symfony\Component\Templating\TemplateNameParserInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\Response; + +/** + * This engine knows how to render Symfony templates. + * + * @author Fabien Potencier + */ +class PhpEngine extends BasePhpEngine implements EngineInterface +{ + protected $container; + + /** + * Constructor. + * + * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance + * @param ContainerInterface $container The DI container + * @param LoaderInterface $loader A loader instance + * @param GlobalVariables|null $globals A GlobalVariables instance or null + */ + public function __construct(TemplateNameParserInterface $parser, ContainerInterface $container, LoaderInterface $loader, GlobalVariables $globals = null) + { + $this->container = $container; + + parent::__construct($parser, $loader); + + if (null !== $globals) { + $this->addGlobal('app', $globals); + } + } + + /** + * {@inheritdoc} + */ + public function get($name) + { + if (!isset($this->helpers[$name])) { + throw new \InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name)); + } + + if (is_string($this->helpers[$name])) { + $this->helpers[$name] = $this->container->get($this->helpers[$name]); + $this->helpers[$name]->setCharset($this->charset); + } + + return $this->helpers[$name]; + } + + /** + * {@inheritdoc} + */ + public function setHelpers(array $helpers) + { + $this->helpers = $helpers; + } + + /** + * {@inheritdoc} + */ + public function renderResponse($view, array $parameters = array(), Response $response = null) + { + if (null === $response) { + $response = new Response(); + } + + $response->setContent($this->render($view, $parameters)); + + return $response; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateFilenameParser.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateFilenameParser.php new file mode 100644 index 0000000000000000000000000000000000000000..df3ab19c4d2e856e3feb62207626570d6812a6e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateFilenameParser.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\Bundle\FrameworkBundle\Templating; + +use Symfony\Component\Templating\TemplateNameParserInterface; +use Symfony\Component\Templating\TemplateReferenceInterface; + +/** + * TemplateFilenameParser converts template filenames to + * TemplateReferenceInterface instances. + * + * @author Fabien Potencier + */ +class TemplateFilenameParser implements TemplateNameParserInterface +{ + /** + * {@inheritdoc} + */ + public function parse($name) + { + if ($name instanceof TemplateReferenceInterface) { + return $name; + } + + $parts = explode('/', str_replace('\\', '/', $name)); + + $elements = explode('.', array_pop($parts)); + if (3 > count($elements)) { + return false; + } + $engine = array_pop($elements); + $format = array_pop($elements); + + return new TemplateReference('', implode('/', $parts), implode('.', $elements), $format, $engine); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateNameParser.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateNameParser.php new file mode 100644 index 0000000000000000000000000000000000000000..c16365ff187bf7c9e2b861d75110dfef55d84dbd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateNameParser.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating; + +use Symfony\Component\Templating\TemplateReferenceInterface; +use Symfony\Component\HttpKernel\KernelInterface; +use Symfony\Component\Templating\TemplateNameParser as BaseTemplateNameParser; + +/** + * TemplateNameParser converts template names from the short notation + * "bundle:section:template.format.engine" to TemplateReferenceInterface + * instances. + * + * @author Fabien Potencier + */ +class TemplateNameParser extends BaseTemplateNameParser +{ + protected $kernel; + protected $cache = array(); + + /** + * Constructor. + * + * @param KernelInterface $kernel A KernelInterface instance + */ + public function __construct(KernelInterface $kernel) + { + $this->kernel = $kernel; + } + + /** + * {@inheritdoc} + */ + public function parse($name) + { + if ($name instanceof TemplateReferenceInterface) { + return $name; + } elseif (isset($this->cache[$name])) { + return $this->cache[$name]; + } + + // normalize name + $name = str_replace(':/', ':', preg_replace('#/{2,}#', '/', str_replace('\\', '/', $name))); + + if (false !== strpos($name, '..')) { + throw new \RuntimeException(sprintf('Template name "%s" contains invalid characters.', $name)); + } + + if ($this->isAbsolutePath($name) || !preg_match('/^(?:([^:]*):([^:]*):)?(.+)\.([^\.]+)\.([^\.]+)$/', $name, $matches) || 0 === strpos($name, '@')) { + return parent::parse($name); + } + + $template = new TemplateReference($matches[1], $matches[2], $matches[3], $matches[4], $matches[5]); + + if ($template->get('bundle')) { + try { + $this->kernel->getBundle($template->get('bundle')); + } catch (\Exception $e) { + throw new \InvalidArgumentException(sprintf('Template name "%s" is not valid.', $name), 0, $e); + } + } + + return $this->cache[$name] = $template; + } + + private function isAbsolutePath($file) + { + $isAbsolute = (bool) preg_match('#^(?:/|[a-zA-Z]:)#', $file); + + if ($isAbsolute) { + @trigger_error('Absolute template path support is deprecated since Symfony 3.1 and will be removed in 4.0.', E_USER_DEPRECATED); + } + + return $isAbsolute; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateReference.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateReference.php new file mode 100644 index 0000000000000000000000000000000000000000..d9bc982d745241cc1908df0301ff4b0f83c37713 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateReference.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating; + +use Symfony\Component\Templating\TemplateReference as BaseTemplateReference; + +/** + * Internal representation of a template. + * + * @author Victor Berchet + */ +class TemplateReference extends BaseTemplateReference +{ + public function __construct($bundle = null, $controller = null, $name = null, $format = null, $engine = null) + { + $this->parameters = array( + 'bundle' => $bundle, + 'controller' => $controller, + 'name' => $name, + 'format' => $format, + 'engine' => $engine, + ); + } + + /** + * Returns the path to the template + * - as a path when the template is not part of a bundle + * - as a resource when the template is part of a bundle. + * + * @return string A path to the template or a resource + */ + public function getPath() + { + $controller = str_replace('\\', '/', $this->get('controller')); + + $path = (empty($controller) ? '' : $controller.'/').$this->get('name').'.'.$this->get('format').'.'.$this->get('engine'); + + return empty($this->parameters['bundle']) ? 'views/'.$path : '@'.$this->get('bundle').'/Resources/views/'.$path; + } + + /** + * {@inheritdoc} + */ + public function getLogicalName() + { + return sprintf('%s:%s:%s.%s.%s', $this->parameters['bundle'], $this->parameters['controller'], $this->parameters['name'], $this->parameters['format'], $this->parameters['engine']); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/TimedPhpEngine.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/TimedPhpEngine.php new file mode 100644 index 0000000000000000000000000000000000000000..3295cc73a726f94eedfc73d82e8eb48cc1124425 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/TimedPhpEngine.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Templating; + +use Symfony\Component\Templating\TemplateNameParserInterface; +use Symfony\Component\Stopwatch\Stopwatch; +use Symfony\Component\Templating\Loader\LoaderInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; + +/** + * Times the time spent to render a template. + * + * @author Fabien Potencier + */ +class TimedPhpEngine extends PhpEngine +{ + protected $stopwatch; + + /** + * Constructor. + * + * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance + * @param ContainerInterface $container A ContainerInterface instance + * @param LoaderInterface $loader A LoaderInterface instance + * @param Stopwatch $stopwatch A Stopwatch instance + * @param GlobalVariables $globals A GlobalVariables instance + */ + public function __construct(TemplateNameParserInterface $parser, ContainerInterface $container, LoaderInterface $loader, Stopwatch $stopwatch, GlobalVariables $globals = null) + { + parent::__construct($parser, $container, $loader, $globals); + + $this->stopwatch = $stopwatch; + } + + /** + * {@inheritdoc} + */ + public function render($name, array $parameters = array()) + { + $e = $this->stopwatch->start(sprintf('template.php (%s)', $name), 'template'); + + $ret = parent::render($name, $parameters); + + $e->stop(); + + return $ret; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..d485dc1f228e92160cd6622961064ae7522d5c82 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php @@ -0,0 +1,195 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Test; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ResettableContainerInterface; +use Symfony\Component\Finder\Finder; +use Symfony\Component\HttpKernel\KernelInterface; + +/** + * KernelTestCase is the base class for tests needing a Kernel. + * + * @author Fabien Potencier + */ +abstract class KernelTestCase extends TestCase +{ + protected static $class; + + /** + * @var KernelInterface + */ + protected static $kernel; + + /** + * Finds the directory where the phpunit.xml(.dist) is stored. + * + * If you run tests with the PHPUnit CLI tool, everything will work as expected. + * If not, override this method in your test classes. + * + * @return string The directory where phpunit.xml(.dist) is stored + * + * @throws \RuntimeException + */ + protected static function getPhpUnitXmlDir() + { + if (!isset($_SERVER['argv']) || false === strpos($_SERVER['argv'][0], 'phpunit')) { + throw new \RuntimeException('You must override the KernelTestCase::createKernel() method.'); + } + + $dir = static::getPhpUnitCliConfigArgument(); + if (null === $dir && + (is_file(getcwd().DIRECTORY_SEPARATOR.'phpunit.xml') || + is_file(getcwd().DIRECTORY_SEPARATOR.'phpunit.xml.dist'))) { + $dir = getcwd(); + } + + // Can't continue + if (null === $dir) { + throw new \RuntimeException('Unable to guess the Kernel directory.'); + } + + if (!is_dir($dir)) { + $dir = dirname($dir); + } + + return $dir; + } + + /** + * Finds the value of the CLI configuration option. + * + * PHPUnit will use the last configuration argument on the command line, so this only returns + * the last configuration argument. + * + * @return string The value of the PHPUnit CLI configuration option + */ + private static function getPhpUnitCliConfigArgument() + { + $dir = null; + $reversedArgs = array_reverse($_SERVER['argv']); + foreach ($reversedArgs as $argIndex => $testArg) { + if (preg_match('/^-[^ \-]*c$/', $testArg) || $testArg === '--configuration') { + $dir = realpath($reversedArgs[$argIndex - 1]); + break; + } elseif (0 === strpos($testArg, '--configuration=')) { + $argPath = substr($testArg, strlen('--configuration=')); + $dir = realpath($argPath); + break; + } elseif (0 === strpos($testArg, '-c')) { + $argPath = substr($testArg, strlen('-c')); + $dir = realpath($argPath); + break; + } + } + + return $dir; + } + + /** + * Attempts to guess the kernel location. + * + * When the Kernel is located, the file is required. + * + * @return string The Kernel class name + * + * @throws \RuntimeException + */ + protected static function getKernelClass() + { + if (isset($_SERVER['KERNEL_DIR'])) { + $dir = $_SERVER['KERNEL_DIR']; + + if (!is_dir($dir)) { + $phpUnitDir = static::getPhpUnitXmlDir(); + if (is_dir("$phpUnitDir/$dir")) { + $dir = "$phpUnitDir/$dir"; + } + } + } else { + $dir = static::getPhpUnitXmlDir(); + } + + $finder = new Finder(); + $finder->name('*Kernel.php')->depth(0)->in($dir); + $results = iterator_to_array($finder); + if (!count($results)) { + throw new \RuntimeException('Either set KERNEL_DIR in your phpunit.xml according to https://symfony.com/doc/current/book/testing.html#your-first-functional-test or override the WebTestCase::createKernel() method.'); + } + + $file = current($results); + $class = $file->getBasename('.php'); + + require_once $file; + + return $class; + } + + /** + * Boots the Kernel for this test. + * + * @param array $options + */ + protected static function bootKernel(array $options = array()) + { + static::ensureKernelShutdown(); + + static::$kernel = static::createKernel($options); + static::$kernel->boot(); + } + + /** + * Creates a Kernel. + * + * Available options: + * + * * environment + * * debug + * + * @param array $options An array of options + * + * @return KernelInterface A KernelInterface instance + */ + protected static function createKernel(array $options = array()) + { + if (null === static::$class) { + static::$class = static::getKernelClass(); + } + + return new static::$class( + isset($options['environment']) ? $options['environment'] : 'test', + isset($options['debug']) ? $options['debug'] : true + ); + } + + /** + * Shuts the kernel down if it was used in the test. + */ + protected static function ensureKernelShutdown() + { + if (null !== static::$kernel) { + $container = static::$kernel->getContainer(); + static::$kernel->shutdown(); + if ($container instanceof ResettableContainerInterface) { + $container->reset(); + } + } + } + + /** + * Clean up Kernel usage in this test. + */ + protected function tearDown() + { + static::ensureKernelShutdown(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..5708ef716df7b82fe8664287ac4e3c65cb911d13 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Test; + +use Symfony\Bundle\FrameworkBundle\Client; + +/** + * WebTestCase is the base class for functional tests. + * + * @author Fabien Potencier + */ +abstract class WebTestCase extends KernelTestCase +{ + /** + * Creates a Client. + * + * @param array $options An array of options to pass to the createKernel class + * @param array $server An array of server parameters + * + * @return Client A Client instance + */ + protected static function createClient(array $options = array(), array $server = array()) + { + static::bootKernel($options); + + $client = static::$kernel->getContainer()->get('test.client'); + $client->setServerParameters($server); + + return $client; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ClassCacheCacheWarmerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ClassCacheCacheWarmerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..889601b01fa6f6f667490ce5a3077b137a2feaf5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ClassCacheCacheWarmerTest.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer; + +use Symfony\Bundle\FrameworkBundle\CacheWarmer\ClassCacheCacheWarmer; +use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\DeclaredClass; +use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\WarmedClass; +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; + +class ClassCacheCacheWarmerTest extends TestCase +{ + public function testWithDeclaredClasses() + { + $this->assertTrue(class_exists(WarmedClass::class, true)); + + $dir = sys_get_temp_dir(); + @unlink($dir.'/classes.php'); + file_put_contents($dir.'/classes.map', sprintf('warmUp($dir); + + $this->assertSame(<<<'EOTXT' + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer; + +use Symfony\Bundle\FrameworkBundle\CacheWarmer\SerializerCacheWarmer; +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; +use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader; +use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader; + +class SerializerCacheWarmerTest extends TestCase +{ + public function testWarmUp() + { + if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) { + $this->markTestSkipped('The Serializer default cache warmer has been introduced in the Serializer Component version 3.2.'); + } + + $loaders = array( + new XmlFileLoader(__DIR__.'/../Fixtures/Serialization/Resources/person.xml'), + new YamlFileLoader(__DIR__.'/../Fixtures/Serialization/Resources/author.yml'), + ); + + $file = sys_get_temp_dir().'/cache-serializer.php'; + @unlink($file); + + $fallbackPool = new ArrayAdapter(); + + $warmer = new SerializerCacheWarmer($loaders, $file, $fallbackPool); + $warmer->warmUp(dirname($file)); + + $this->assertFileExists($file); + + $values = require $file; + + $this->assertInternalType('array', $values); + $this->assertCount(2, $values); + $this->assertArrayHasKey('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Person', $values); + $this->assertArrayHasKey('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Author', $values); + + $values = $fallbackPool->getValues(); + + $this->assertInternalType('array', $values); + $this->assertCount(2, $values); + $this->assertArrayHasKey('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Person', $values); + $this->assertArrayHasKey('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Author', $values); + } + + public function testWarmUpWithoutLoader() + { + if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) { + $this->markTestSkipped('The Serializer default cache warmer has been introduced in the Serializer Component version 3.2.'); + } + + $file = sys_get_temp_dir().'/cache-serializer-without-loader.php'; + @unlink($file); + + $fallbackPool = new ArrayAdapter(); + + $warmer = new SerializerCacheWarmer(array(), $file, $fallbackPool); + $warmer->warmUp(dirname($file)); + + $this->assertFileExists($file); + + $values = require $file; + + $this->assertInternalType('array', $values); + $this->assertCount(0, $values); + + $values = $fallbackPool->getValues(); + + $this->assertInternalType('array', $values); + $this->assertCount(0, $values); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplateFinderTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplateFinderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a417cdae3dd9188bdd69c3170f98f57c4778a078 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplateFinderTest.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer; + +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Bundle\FrameworkBundle\Templating\TemplateFilenameParser; +use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinder; +use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\BaseBundle\BaseBundle; + +class TemplateFinderTest extends TestCase +{ + public function testFindAllTemplates() + { + $kernel = $this + ->getMockBuilder('Symfony\Component\HttpKernel\Kernel') + ->disableOriginalConstructor() + ->getMock() + ; + + $kernel + ->expects($this->any()) + ->method('getBundle') + ; + + $kernel + ->expects($this->once()) + ->method('getBundles') + ->will($this->returnValue(array('BaseBundle' => new BaseBundle()))) + ; + + $parser = new TemplateFilenameParser(); + + $finder = new TemplateFinder($kernel, $parser, __DIR__.'/../Fixtures/Resources'); + + $templates = array_map( + function ($template) { return $template->getLogicalName(); }, + $finder->findAllTemplates() + ); + + $this->assertCount(7, $templates, '->findAllTemplates() find all templates in the bundles and global folders'); + $this->assertContains('BaseBundle::base.format.engine', $templates); + $this->assertContains('BaseBundle::this.is.a.template.format.engine', $templates); + $this->assertContains('BaseBundle:controller:base.format.engine', $templates); + $this->assertContains('BaseBundle:controller:custom.format.engine', $templates); + $this->assertContains('::this.is.a.template.format.engine', $templates); + $this->assertContains('::resource.format.engine', $templates); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplatePathsCacheWarmerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplatePathsCacheWarmerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..74a33f3b43130ad0ec940766c3c824bf00c7ec2d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplatePathsCacheWarmerTest.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer; + +use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterface; +use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplatePathsCacheWarmer; +use Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator; +use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\Filesystem\Filesystem; + +class TemplatePathsCacheWarmerTest extends TestCase +{ + /** @var Filesystem */ + private $filesystem; + + /** @var TemplateFinderInterface */ + private $templateFinder; + + /** @var FileLocator */ + private $fileLocator; + + /** @var TemplateLocator */ + private $templateLocator; + + private $tmpDir; + + protected function setUp() + { + $this->templateFinder = $this + ->getMockBuilder(TemplateFinderInterface::class) + ->setMethods(array('findAllTemplates')) + ->getMock(); + + $this->fileLocator = $this + ->getMockBuilder(FileLocator::class) + ->setMethods(array('locate')) + ->setConstructorArgs(array('/path/to/fallback')) + ->getMock(); + + $this->templateLocator = new TemplateLocator($this->fileLocator); + + $this->tmpDir = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('cache_template_paths_', true); + + $this->filesystem = new Filesystem(); + $this->filesystem->mkdir($this->tmpDir); + } + + protected function tearDown() + { + $this->filesystem->remove($this->tmpDir); + } + + public function testWarmUp() + { + $template = new TemplateReference('bundle', 'controller', 'name', 'format', 'engine'); + + $this->templateFinder + ->expects($this->once()) + ->method('findAllTemplates') + ->will($this->returnValue(array($template))); + + $this->fileLocator + ->expects($this->once()) + ->method('locate') + ->with($template->getPath()) + ->will($this->returnValue(dirname($this->tmpDir).'/path/to/template.html.twig')); + + $warmer = new TemplatePathsCacheWarmer($this->templateFinder, $this->templateLocator); + $warmer->warmUp($this->tmpDir); + + $this->assertFileEquals(__DIR__.'/../Fixtures/TemplatePathsCache/templates.php', $this->tmpDir.'/templates.php'); + } + + public function testWarmUpEmpty() + { + $this->templateFinder + ->expects($this->once()) + ->method('findAllTemplates') + ->will($this->returnValue(array())); + + $this->fileLocator + ->expects($this->never()) + ->method('locate'); + + $warmer = new TemplatePathsCacheWarmer($this->templateFinder, $this->templateLocator); + $warmer->warmUp($this->tmpDir); + + $this->assertFileExists($this->tmpDir.'/templates.php'); + $this->assertSame(file_get_contents(__DIR__.'/../Fixtures/TemplatePathsCache/templates-empty.php'), file_get_contents($this->tmpDir.'/templates.php')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ValidatorCacheWarmerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ValidatorCacheWarmerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..23b4732afcb3a7c97e07d8a3b65a49d3526f28ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ValidatorCacheWarmerTest.php @@ -0,0 +1,111 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer; + +use Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer; +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\Validator\ValidatorBuilder; + +class ValidatorCacheWarmerTest extends TestCase +{ + public function testWarmUp() + { + $validatorBuilder = new ValidatorBuilder(); + $validatorBuilder->addXmlMapping(__DIR__.'/../Fixtures/Validation/Resources/person.xml'); + $validatorBuilder->addYamlMapping(__DIR__.'/../Fixtures/Validation/Resources/author.yml'); + $validatorBuilder->addMethodMapping('loadValidatorMetadata'); + $validatorBuilder->enableAnnotationMapping(); + + $file = sys_get_temp_dir().'/cache-validator.php'; + @unlink($file); + + $fallbackPool = new ArrayAdapter(); + + $warmer = new ValidatorCacheWarmer($validatorBuilder, $file, $fallbackPool); + $warmer->warmUp(dirname($file)); + + $this->assertFileExists($file); + + $values = require $file; + + $this->assertInternalType('array', $values); + $this->assertCount(2, $values); + $this->assertArrayHasKey('Symfony.Bundle.FrameworkBundle.Tests.Fixtures.Validation.Person', $values); + $this->assertArrayHasKey('Symfony.Bundle.FrameworkBundle.Tests.Fixtures.Validation.Author', $values); + + $values = $fallbackPool->getValues(); + + $this->assertInternalType('array', $values); + $this->assertCount(2, $values); + $this->assertArrayHasKey('Symfony.Bundle.FrameworkBundle.Tests.Fixtures.Validation.Person', $values); + $this->assertArrayHasKey('Symfony.Bundle.FrameworkBundle.Tests.Fixtures.Validation.Author', $values); + } + + public function testWarmUpWithAnnotations() + { + $validatorBuilder = new ValidatorBuilder(); + $validatorBuilder->addYamlMapping(__DIR__.'/../Fixtures/Validation/Resources/categories.yml'); + $validatorBuilder->enableAnnotationMapping(); + + $file = sys_get_temp_dir().'/cache-validator-with-annotations.php'; + @unlink($file); + + $fallbackPool = new ArrayAdapter(); + + $warmer = new ValidatorCacheWarmer($validatorBuilder, $file, $fallbackPool); + $warmer->warmUp(dirname($file)); + + $this->assertFileExists($file); + + $values = require $file; + + $this->assertInternalType('array', $values); + $this->assertCount(1, $values); + $this->assertArrayHasKey('Symfony.Bundle.FrameworkBundle.Tests.Fixtures.Validation.Category', $values); + + // Simple check to make sure that at least one constraint is actually cached, in this case the "id" property Type. + $this->assertContains('"int"', $values['Symfony.Bundle.FrameworkBundle.Tests.Fixtures.Validation.Category']); + + $values = $fallbackPool->getValues(); + + $this->assertInternalType('array', $values); + $this->assertCount(2, $values); + $this->assertArrayHasKey('Symfony.Bundle.FrameworkBundle.Tests.Fixtures.Validation.Category', $values); + $this->assertArrayHasKey('Symfony.Bundle.FrameworkBundle.Tests.Fixtures.Validation.SubCategory', $values); + } + + public function testWarmUpWithoutLoader() + { + $validatorBuilder = new ValidatorBuilder(); + + $file = sys_get_temp_dir().'/cache-validator-without-loaders.php'; + @unlink($file); + + $fallbackPool = new ArrayAdapter(); + + $warmer = new ValidatorCacheWarmer($validatorBuilder, $file, $fallbackPool); + $warmer->warmUp(dirname($file)); + + $this->assertFileExists($file); + + $values = require $file; + + $this->assertInternalType('array', $values); + $this->assertCount(0, $values); + + $values = $fallbackPool->getValues(); + + $this->assertInternalType('array', $values); + $this->assertCount(0, $values); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/ClientTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/ClientTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d021b0a29ac5875f4d007da93ac099b894e6c9db --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/ClientTest.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\Bundle\FrameworkBundle\Tests; + +use Symfony\Bundle\FrameworkBundle\Client; +use Symfony\Bundle\FrameworkBundle\Tests\Functional\WebTestCase; +use Symfony\Component\HttpFoundation\Response; + +class ClientTest extends WebTestCase +{ + public function testRebootKernelBetweenRequests() + { + $mock = $this->getKernelMock(); + $mock->expects($this->once())->method('shutdown'); + + $client = new Client($mock); + $client->request('GET', '/'); + $client->request('GET', '/'); + } + + public function testDisabledRebootKernel() + { + $mock = $this->getKernelMock(); + $mock->expects($this->never())->method('shutdown'); + + $client = new Client($mock); + $client->disableReboot(); + $client->request('GET', '/'); + $client->request('GET', '/'); + } + + public function testEnableRebootKernel() + { + $mock = $this->getKernelMock(); + $mock->expects($this->once())->method('shutdown'); + + $client = new Client($mock); + $client->disableReboot(); + $client->request('GET', '/'); + $client->request('GET', '/'); + $client->enableReboot(); + $client->request('GET', '/'); + } + + private function getKernelMock() + { + $mock = $this->getMockBuilder($this->getKernelClass()) + ->setMethods(array('shutdown', 'boot', 'handle')) + ->disableOriginalConstructor() + ->getMock(); + + $mock->expects($this->any())->method('handle')->willReturn(new Response('foo')); + + return $mock; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ba969c64ae1f4d20748fdcd02b90e5376ffc8aae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Command\CacheClearCommand; + +use Symfony\Bundle\FrameworkBundle\Console\Application; +use Symfony\Bundle\FrameworkBundle\Tests\Command\CacheClearCommand\Fixture\TestAppKernel; +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Component\Config\ConfigCacheFactory; +use Symfony\Component\Config\Resource\ResourceInterface; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Output\NullOutput; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Finder\Finder; + +class CacheClearCommandTest extends TestCase +{ + /** @var TestAppKernel */ + private $kernel; + /** @var Filesystem */ + private $fs; + private $rootDir; + + protected function setUp() + { + $this->fs = new Filesystem(); + $this->kernel = new TestAppKernel('test', true); + $this->rootDir = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('sf2_cache_', true); + $this->kernel->setRootDir($this->rootDir); + $this->fs->mkdir($this->rootDir); + } + + protected function tearDown() + { + $this->fs->remove($this->rootDir); + } + + public function testCacheIsFreshAfterCacheClearedWithWarmup() + { + $input = new ArrayInput(array('cache:clear')); + $application = new Application($this->kernel); + $application->setCatchExceptions(false); + + $application->doRun($input, new NullOutput()); + + // Ensure that all *.meta files are fresh + $finder = new Finder(); + $metaFiles = $finder->files()->in($this->kernel->getCacheDir())->name('*.php.meta'); + // simply check that cache is warmed up + $this->assertGreaterThanOrEqual(1, count($metaFiles)); + $configCacheFactory = new ConfigCacheFactory(true); + $that = $this; + + foreach ($metaFiles as $file) { + $configCacheFactory->cache(substr($file, 0, -5), function () use ($that, $file) { + $that->fail(sprintf('Meta file "%s" is not fresh', (string) $file)); + }); + } + + // check that app kernel file present in meta file of container's cache + $containerRef = new \ReflectionObject($this->kernel->getContainer()); + $containerFile = $containerRef->getFileName(); + $containerMetaFile = $containerFile.'.meta'; + $kernelRef = new \ReflectionObject($this->kernel); + $kernelFile = $kernelRef->getFileName(); + /** @var ResourceInterface[] $meta */ + $meta = unserialize(file_get_contents($containerMetaFile)); + $found = false; + foreach ($meta as $resource) { + if ((string) $resource === $kernelFile) { + $found = true; + break; + } + } + $this->assertTrue($found, 'Kernel file should present as resource'); + $this->assertRegExp(sprintf('/\'kernel.container_class\'\s*=>\s*\'%s\'/', get_class($this->kernel->getContainer())), file_get_contents($containerFile), 'kernel.container_class is properly set on the dumped container'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/Fixture/TestAppKernel.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/Fixture/TestAppKernel.php new file mode 100644 index 0000000000000000000000000000000000000000..8a61d96d36c6e50d27ffb3ad27f910f1261d060d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/Fixture/TestAppKernel.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\Bundle\FrameworkBundle\Tests\Command\CacheClearCommand\Fixture; + +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\HttpKernel\Kernel; + +class TestAppKernel extends Kernel +{ + public function registerBundles() + { + return array( + new FrameworkBundle(), + ); + } + + public function setRootDir($rootDir) + { + $this->rootDir = $rootDir; + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + $loader->load(__DIR__.DIRECTORY_SEPARATOR.'config.yml'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/Fixture/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/Fixture/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..68f8d040610c4f6a04146e1ed596ddad868cc033 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/Fixture/config.yml @@ -0,0 +1,2 @@ +framework: + secret: test diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a0cac9a908b240a3891b241559a2e47bcd6622de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Command; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +class RouterDebugCommandTest extends TestCase +{ + public function testDebugAllRoutes() + { + $tester = $this->createCommandTester(); + $ret = $tester->execute(array('name' => null), array('decorated' => false)); + + $this->assertEquals(0, $ret, 'Returns 0 in case of success'); + $this->assertContains('Name Method Scheme Host Path', $tester->getDisplay()); + } + + public function testDebugSingleRoute() + { + $tester = $this->createCommandTester(); + $ret = $tester->execute(array('name' => 'foo'), array('decorated' => false)); + + $this->assertEquals(0, $ret, 'Returns 0 in case of success'); + $this->assertContains('Route Name | foo', $tester->getDisplay()); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testDebugInvalidRoute() + { + $this->createCommandTester()->execute(array('name' => 'test')); + } + + /** + * @return CommandTester + */ + private function createCommandTester() + { + $application = new Application(); + + $command = new RouterDebugCommand(); + $command->setContainer($this->getContainer()); + $application->add($command); + + return new CommandTester($application->find('debug:router')); + } + + private function getContainer() + { + $routeCollection = new RouteCollection(); + $routeCollection->add('foo', new Route('foo')); + $router = $this->getMockBuilder('Symfony\Component\Routing\RouterInterface')->getMock(); + $router + ->expects($this->any()) + ->method('getRouteCollection') + ->will($this->returnValue($routeCollection)) + ; + + $loader = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader') + ->disableOriginalConstructor() + ->getMock(); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container + ->expects($this->once()) + ->method('has') + ->with('router') + ->will($this->returnValue(true)) + ; + + $container + ->method('get') + ->will($this->returnValueMap(array( + array('router', 1, $router), + array('controller_name_converter', 1, $loader), + ))); + + return $container; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..db533c09742ba7298b8b7987b372f8cd7905ebe5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.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\Bundle\FrameworkBundle\Tests\Command; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand; +use Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\RequestContext; + +class RouterMatchCommandTest extends TestCase +{ + public function testWithMatchPath() + { + $tester = $this->createCommandTester(); + $ret = $tester->execute(array('path_info' => '/foo', 'foo'), array('decorated' => false)); + + $this->assertEquals(0, $ret, 'Returns 0 in case of success'); + $this->assertContains('Route Name | foo', $tester->getDisplay()); + } + + public function testWithNotMatchPath() + { + $tester = $this->createCommandTester(); + $ret = $tester->execute(array('path_info' => '/test', 'foo'), array('decorated' => false)); + + $this->assertEquals(1, $ret, 'Returns 1 in case of failure'); + $this->assertContains('None of the routes match the path "/test"', $tester->getDisplay()); + } + + /** + * @return CommandTester + */ + private function createCommandTester() + { + $application = new Application(); + + $command = new RouterMatchCommand(); + $command->setContainer($this->getContainer()); + $application->add($command); + + $command = new RouterDebugCommand(); + $command->setContainer($this->getContainer()); + $application->add($command); + + return new CommandTester($application->find('router:match')); + } + + private function getContainer() + { + $routeCollection = new RouteCollection(); + $routeCollection->add('foo', new Route('foo')); + $requestContext = new RequestContext(); + $router = $this->getMockBuilder('Symfony\Component\Routing\RouterInterface')->getMock(); + $router + ->expects($this->any()) + ->method('getRouteCollection') + ->will($this->returnValue($routeCollection)) + ; + $router + ->expects($this->any()) + ->method('getContext') + ->will($this->returnValue($requestContext)) + ; + + $loader = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader') + ->disableOriginalConstructor() + ->getMock(); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container + ->expects($this->once()) + ->method('has') + ->with('router') + ->will($this->returnValue(true)); + $container->method('get') + ->will($this->returnValueMap(array( + array('router', 1, $router), + array('controller_name_converter', 1, $loader), + ))); + + return $container; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..19c6d70156b193487882b8c2a56c3695ba7c72a8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php @@ -0,0 +1,195 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Command; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand; +use Symfony\Component\Filesystem\Filesystem; + +class TranslationDebugCommandTest extends TestCase +{ + private $fs; + private $translationDir; + + public function testDebugMissingMessages() + { + $tester = $this->createCommandTester($this->getContainer(array('foo' => 'foo'))); + $tester->execute(array('locale' => 'en', 'bundle' => 'foo')); + + $this->assertRegExp('/missing/', $tester->getDisplay()); + } + + public function testDebugUnusedMessages() + { + $tester = $this->createCommandTester($this->getContainer(array(), array('foo' => 'foo'))); + $tester->execute(array('locale' => 'en', 'bundle' => 'foo')); + + $this->assertRegExp('/unused/', $tester->getDisplay()); + } + + public function testDebugFallbackMessages() + { + $tester = $this->createCommandTester($this->getContainer(array(), array('foo' => 'foo'))); + $tester->execute(array('locale' => 'fr', 'bundle' => 'foo')); + + $this->assertRegExp('/fallback/', $tester->getDisplay()); + } + + public function testNoDefinedMessages() + { + $tester = $this->createCommandTester($this->getContainer()); + $tester->execute(array('locale' => 'fr', 'bundle' => 'test')); + + $this->assertRegExp('/No defined or extracted messages for locale "fr"/', $tester->getDisplay()); + } + + public function testDebugDefaultDirectory() + { + $tester = $this->createCommandTester($this->getContainer(array('foo' => 'foo'), array('bar' => 'bar'))); + $tester->execute(array('locale' => 'en')); + + $this->assertRegExp('/missing/', $tester->getDisplay()); + $this->assertRegExp('/unused/', $tester->getDisplay()); + } + + public function testDebugCustomDirectory() + { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); + $kernel->expects($this->once()) + ->method('getBundle') + ->with($this->equalTo($this->translationDir)) + ->willThrowException(new \InvalidArgumentException()); + + $tester = $this->createCommandTester($this->getContainer(array('foo' => 'foo'), array('bar' => 'bar'), $kernel)); + $tester->execute(array('locale' => 'en', 'bundle' => $this->translationDir)); + + $this->assertRegExp('/missing/', $tester->getDisplay()); + $this->assertRegExp('/unused/', $tester->getDisplay()); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testDebugInvalidDirectory() + { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); + $kernel->expects($this->once()) + ->method('getBundle') + ->with($this->equalTo('dir')) + ->will($this->throwException(new \InvalidArgumentException())); + + $tester = $this->createCommandTester($this->getContainer(array(), array(), $kernel)); + $tester->execute(array('locale' => 'en', 'bundle' => 'dir')); + } + + protected function setUp() + { + $this->fs = new Filesystem(); + $this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true); + $this->fs->mkdir($this->translationDir.'/Resources/translations'); + $this->fs->mkdir($this->translationDir.'/Resources/views'); + } + + protected function tearDown() + { + $this->fs->remove($this->translationDir); + } + + /** + * @return CommandTester + */ + private function createCommandTester($container) + { + $command = new TranslationDebugCommand(); + $command->setContainer($container); + + $application = new Application(); + $application->add($command); + + return new CommandTester($application->find('debug:translation')); + } + + private function getContainer($extractedMessages = array(), $loadedMessages = array(), $kernel = null) + { + $translator = $this->getMockBuilder('Symfony\Component\Translation\Translator') + ->disableOriginalConstructor() + ->getMock(); + + $translator + ->expects($this->any()) + ->method('getFallbackLocales') + ->will($this->returnValue(array('en'))); + + $extractor = $this->getMockBuilder('Symfony\Component\Translation\Extractor\ExtractorInterface')->getMock(); + $extractor + ->expects($this->any()) + ->method('extract') + ->will( + $this->returnCallback(function ($path, $catalogue) use ($extractedMessages) { + $catalogue->add($extractedMessages); + }) + ); + + $loader = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader')->getMock(); + $loader + ->expects($this->any()) + ->method('loadMessages') + ->will( + $this->returnCallback(function ($path, $catalogue) use ($loadedMessages) { + $catalogue->add($loadedMessages); + }) + ); + + if (null === $kernel) { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); + $kernel + ->expects($this->any()) + ->method('getBundle') + ->will($this->returnValueMap(array( + array('foo', true, $this->getBundle($this->translationDir)), + array('test', true, $this->getBundle('test')), + ))); + } + + $kernel + ->expects($this->any()) + ->method('getRootDir') + ->will($this->returnValue($this->translationDir)); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container + ->expects($this->any()) + ->method('get') + ->will($this->returnValueMap(array( + array('translation.extractor', 1, $extractor), + array('translation.loader', 1, $loader), + array('translator', 1, $translator), + array('kernel', 1, $kernel), + ))); + + return $container; + } + + private function getBundle($path) + { + $bundle = $this->getMockBuilder('Symfony\Component\HttpKernel\Bundle\BundleInterface')->getMock(); + $bundle + ->expects($this->any()) + ->method('getPath') + ->will($this->returnValue($path)) + ; + + return $bundle; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e845619d9a8267c0eaf06ffdc1707443886a6012 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php @@ -0,0 +1,176 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Command; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\DependencyInjection; +use Symfony\Component\HttpKernel; + +class TranslationUpdateCommandTest extends TestCase +{ + private $fs; + private $translationDir; + + public function testDumpMessagesAndClean() + { + $tester = $this->createCommandTester($this->getContainer(array('messages' => array('foo' => 'foo')))); + $tester->execute(array('command' => 'translation:update', 'locale' => 'en', 'bundle' => 'foo', '--dump-messages' => true, '--clean' => true)); + $this->assertRegExp('/foo/', $tester->getDisplay()); + $this->assertRegExp('/1 message was successfully extracted/', $tester->getDisplay()); + } + + public function testDumpTwoMessagesAndClean() + { + $tester = $this->createCommandTester($this->getContainer(array('messages' => array('foo' => 'foo', 'bar' => 'bar')))); + $tester->execute(array('command' => 'translation:update', 'locale' => 'en', 'bundle' => 'foo', '--dump-messages' => true, '--clean' => true)); + $this->assertRegExp('/foo/', $tester->getDisplay()); + $this->assertRegExp('/bar/', $tester->getDisplay()); + $this->assertRegExp('/2 messages were successfully extracted/', $tester->getDisplay()); + } + + public function testDumpMessagesForSpecificDomain() + { + $tester = $this->createCommandTester($this->getContainer(array('messages' => array('foo' => 'foo'), 'mydomain' => array('bar' => 'bar')))); + $tester->execute(array('command' => 'translation:update', 'locale' => 'en', 'bundle' => 'foo', '--dump-messages' => true, '--clean' => true, '--domain' => 'mydomain')); + $this->assertRegExp('/bar/', $tester->getDisplay()); + $this->assertRegExp('/1 message was successfully extracted/', $tester->getDisplay()); + } + + public function testWriteMessages() + { + $tester = $this->createCommandTester($this->getContainer(array('messages' => array('foo' => 'foo')))); + $tester->execute(array('command' => 'translation:update', 'locale' => 'en', 'bundle' => 'foo', '--force' => true)); + $this->assertRegExp('/Translation files were successfully updated./', $tester->getDisplay()); + } + + public function testWriteMessagesForSpecificDomain() + { + $tester = $this->createCommandTester($this->getContainer(array('messages' => array('foo' => 'foo'), 'mydomain' => array('bar' => 'bar')))); + $tester->execute(array('command' => 'translation:update', 'locale' => 'en', 'bundle' => 'foo', '--force' => true, '--domain' => 'mydomain')); + $this->assertRegExp('/Translation files were successfully updated./', $tester->getDisplay()); + } + + protected function setUp() + { + $this->fs = new Filesystem(); + $this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true); + $this->fs->mkdir($this->translationDir.'/Resources/translations'); + $this->fs->mkdir($this->translationDir.'/Resources/views'); + } + + protected function tearDown() + { + $this->fs->remove($this->translationDir); + } + + /** + * @return CommandTester + */ + private function createCommandTester(DependencyInjection\ContainerInterface $container) + { + $command = new TranslationUpdateCommand(); + $command->setContainer($container); + + $application = new Application(); + $application->add($command); + + return new CommandTester($application->find('translation:update')); + } + + private function getContainer($extractedMessages = array(), $loadedMessages = array(), HttpKernel\KernelInterface $kernel = null) + { + $translator = $this->getMockBuilder('Symfony\Component\Translation\Translator') + ->disableOriginalConstructor() + ->getMock(); + + $translator + ->expects($this->any()) + ->method('getFallbackLocales') + ->will($this->returnValue(array('en'))); + + $extractor = $this->getMockBuilder('Symfony\Component\Translation\Extractor\ExtractorInterface')->getMock(); + $extractor + ->expects($this->any()) + ->method('extract') + ->will( + $this->returnCallback(function ($path, $catalogue) use ($extractedMessages) { + foreach ($extractedMessages as $domain => $messages) { + $catalogue->add($messages, $domain); + } + }) + ); + + $loader = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader')->getMock(); + $loader + ->expects($this->any()) + ->method('loadMessages') + ->will( + $this->returnCallback(function ($path, $catalogue) use ($loadedMessages) { + $catalogue->add($loadedMessages); + }) + ); + + $writer = $this->getMockBuilder('Symfony\Component\Translation\Writer\TranslationWriter')->getMock(); + $writer + ->expects($this->any()) + ->method('getFormats') + ->will( + $this->returnValue(array('xlf', 'yml')) + ); + + if (null === $kernel) { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); + $kernel + ->expects($this->any()) + ->method('getBundle') + ->will($this->returnValueMap(array( + array('foo', true, $this->getBundle($this->translationDir)), + array('test', true, $this->getBundle('test')), + ))); + } + + $kernel + ->expects($this->any()) + ->method('getRootDir') + ->will($this->returnValue($this->translationDir)); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container + ->expects($this->any()) + ->method('get') + ->will($this->returnValueMap(array( + array('translation.extractor', 1, $extractor), + array('translation.loader', 1, $loader), + array('translation.writer', 1, $writer), + array('translator', 1, $translator), + array('kernel', 1, $kernel), + ))); + + return $container; + } + + private function getBundle($path) + { + $bundle = $this->getMockBuilder('Symfony\Component\HttpKernel\Bundle\BundleInterface')->getMock(); + $bundle + ->expects($this->any()) + ->method('getPath') + ->will($this->returnValue($path)) + ; + + return $bundle; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..de57b816eb4b8c2d9da9133be4c6002d5dab1bed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php @@ -0,0 +1,201 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Command; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand; +use Symfony\Bundle\FrameworkBundle\Console\Application; +use Symfony\Component\Console\Application as BaseApplication; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\HttpKernel\KernelInterface; + +/** + * Tests the YamlLintCommand. + * + * @author Robin Chalas + */ +class YamlLintCommandTest extends TestCase +{ + private $files; + + public function testLintCorrectFile() + { + $tester = $this->createCommandTester(); + $filename = $this->createFile('foo: bar'); + + $tester->execute( + array('filename' => $filename), + array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false) + ); + + $this->assertEquals(0, $tester->getStatusCode(), 'Returns 0 in case of success'); + $this->assertContains('OK', trim($tester->getDisplay())); + } + + public function testLintIncorrectFile() + { + $incorrectContent = ' +foo: +bar'; + $tester = $this->createCommandTester(); + $filename = $this->createFile($incorrectContent); + + $tester->execute(array('filename' => $filename), array('decorated' => false)); + + $this->assertEquals(1, $tester->getStatusCode(), 'Returns 1 in case of error'); + $this->assertContains('Unable to parse at line 3 (near "bar").', trim($tester->getDisplay())); + } + + /** + * @expectedException \RuntimeException + */ + public function testLintFileNotReadable() + { + $tester = $this->createCommandTester(); + $filename = $this->createFile(''); + unlink($filename); + + $tester->execute(array('filename' => $filename), array('decorated' => false)); + } + + public function testGetHelp() + { + $command = new YamlLintCommand(); + $expected = <<%command.name% command lints a YAML file and outputs to STDOUT +the first encountered syntax error. + +You can validates YAML contents passed from STDIN: + + cat filename | php %command.full_name% + +You can also validate the syntax of a file: + + php %command.full_name% filename + +Or of a whole directory: + + php %command.full_name% dirname + php %command.full_name% dirname --format=json + +Or find all files in a bundle: + + php %command.full_name% @AcmeDemoBundle + +EOF; + + $this->assertEquals($expected, $command->getHelp()); + } + + public function testLintFilesFromBundleDirectory() + { + $tester = $this->createCommandTester($this->getKernelAwareApplicationMock()); + $tester->execute( + array('filename' => '@AppBundle/Resources'), + array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false) + ); + + $this->assertEquals(0, $tester->getStatusCode(), 'Returns 0 in case of success'); + $this->assertContains('[OK] All 0 YAML files contain valid syntax', trim($tester->getDisplay())); + } + + /** + * @return string Path to the new file + */ + private function createFile($content) + { + $filename = tempnam(sys_get_temp_dir().'/yml-lint-test', 'sf-'); + file_put_contents($filename, $content); + + $this->files[] = $filename; + + return $filename; + } + + /** + * @return CommandTester + */ + private function createCommandTester($application = null) + { + if (!$application) { + $application = new BaseApplication(); + $application->add(new YamlLintCommand()); + } + + $command = $application->find('lint:yaml'); + + if ($application) { + $command->setApplication($application); + } + + return new CommandTester($command); + } + + private function getKernelAwareApplicationMock() + { + $kernel = $this->getMockBuilder(KernelInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $kernel + ->expects($this->once()) + ->method('locateResource') + ->with('@AppBundle/Resources') + ->willReturn(sys_get_temp_dir().'/yml-lint-test'); + + $application = $this->getMockBuilder(Application::class) + ->disableOriginalConstructor() + ->getMock(); + + $application + ->expects($this->once()) + ->method('getKernel') + ->willReturn($kernel); + + $application + ->expects($this->once()) + ->method('getHelperSet') + ->willReturn(new HelperSet()); + + $application + ->expects($this->any()) + ->method('getDefinition') + ->willReturn(new InputDefinition()); + + $application + ->expects($this->once()) + ->method('find') + ->with('lint:yaml') + ->willReturn(new YamlLintCommand()); + + return $application; + } + + protected function setUp() + { + @mkdir(sys_get_temp_dir().'/yml-lint-test'); + $this->files = array(); + } + + protected function tearDown() + { + foreach ($this->files as $file) { + if (file_exists($file)) { + unlink($file); + } + } + rmdir(sys_get_temp_dir().'/yml-lint-test'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/ApplicationTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/ApplicationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fc60fd3bdd71c8f0e9a0ff1c1c2a458e57b52d77 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/ApplicationTest.php @@ -0,0 +1,176 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Console; + +use Symfony\Bundle\FrameworkBundle\Console\Application; +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Output\NullOutput; +use Symfony\Component\Console\Tester\ApplicationTester; + +class ApplicationTest extends TestCase +{ + public function testBundleInterfaceImplementation() + { + $bundle = $this->getMockBuilder('Symfony\Component\HttpKernel\Bundle\BundleInterface')->getMock(); + + $kernel = $this->getKernel(array($bundle), true); + + $application = new Application($kernel); + $application->doRun(new ArrayInput(array('list')), new NullOutput()); + } + + public function testBundleCommandsAreRegistered() + { + $bundle = $this->createBundleMock(array()); + + $kernel = $this->getKernel(array($bundle), true); + + $application = new Application($kernel); + $application->doRun(new ArrayInput(array('list')), new NullOutput()); + + // Calling twice: registration should only be done once. + $application->doRun(new ArrayInput(array('list')), new NullOutput()); + } + + public function testBundleCommandsAreRetrievable() + { + $bundle = $this->createBundleMock(array()); + + $kernel = $this->getKernel(array($bundle)); + + $application = new Application($kernel); + $application->all(); + + // Calling twice: registration should only be done once. + $application->all(); + } + + public function testBundleSingleCommandIsRetrievable() + { + $command = new Command('example'); + + $bundle = $this->createBundleMock(array($command)); + + $kernel = $this->getKernel(array($bundle)); + + $application = new Application($kernel); + + $this->assertSame($command, $application->get('example')); + } + + public function testBundleCommandCanBeFound() + { + $command = new Command('example'); + + $bundle = $this->createBundleMock(array($command)); + + $kernel = $this->getKernel(array($bundle)); + + $application = new Application($kernel); + + $this->assertSame($command, $application->find('example')); + } + + public function testBundleCommandCanBeFoundByAlias() + { + $command = new Command('example'); + $command->setAliases(array('alias')); + + $bundle = $this->createBundleMock(array($command)); + + $kernel = $this->getKernel(array($bundle)); + + $application = new Application($kernel); + + $this->assertSame($command, $application->find('alias')); + } + + public function testBundleCommandsHaveRightContainer() + { + $command = $this->getMockForAbstractClass('Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand', array('foo'), '', true, true, true, array('setContainer')); + $command->setCode(function () {}); + $command->expects($this->exactly(2))->method('setContainer'); + + $application = new Application($this->getKernel(array(), true)); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + $application->add($command); + $tester = new ApplicationTester($application); + + // set container is called here + $tester->run(array('command' => 'foo')); + + // as the container might have change between two runs, setContainer must called again + $tester->run(array('command' => 'foo')); + } + + private function getKernel(array $bundles, $useDispatcher = false) + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + + if ($useDispatcher) { + $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $dispatcher + ->expects($this->atLeastOnce()) + ->method('dispatch') + ; + $container + ->expects($this->atLeastOnce()) + ->method('get') + ->with($this->equalTo('event_dispatcher')) + ->will($this->returnValue($dispatcher)); + } + + $container + ->expects($this->once()) + ->method('hasParameter') + ->with($this->equalTo('console.command.ids')) + ->will($this->returnValue(true)) + ; + $container + ->expects($this->once()) + ->method('getParameter') + ->with($this->equalTo('console.command.ids')) + ->will($this->returnValue(array())) + ; + + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); + $kernel + ->expects($this->any()) + ->method('getBundles') + ->will($this->returnValue($bundles)) + ; + $kernel + ->expects($this->any()) + ->method('getContainer') + ->will($this->returnValue($container)) + ; + + return $kernel; + } + + private function createBundleMock(array $commands) + { + $bundle = $this->getMockBuilder('Symfony\Component\HttpKernel\Bundle\Bundle')->getMock(); + $bundle + ->expects($this->once()) + ->method('registerCommands') + ->will($this->returnCallback(function (Application $application) use ($commands) { + $application->addCommands($commands); + })) + ; + + return $bundle; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d46daada7f129b52dc4cdc6a91de65331fb5e4b4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php @@ -0,0 +1,202 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Output\BufferedOutput; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +abstract class AbstractDescriptorTest extends TestCase +{ + /** @dataProvider getDescribeRouteCollectionTestData */ + public function testDescribeRouteCollection(RouteCollection $routes, $expectedDescription) + { + $this->assertDescription($expectedDescription, $routes); + } + + public function getDescribeRouteCollectionTestData() + { + return $this->getDescriptionTestData(ObjectsProvider::getRouteCollections()); + } + + /** @dataProvider getDescribeRouteTestData */ + public function testDescribeRoute(Route $route, $expectedDescription) + { + $this->assertDescription($expectedDescription, $route); + } + + public function getDescribeRouteTestData() + { + return $this->getDescriptionTestData(ObjectsProvider::getRoutes()); + } + + /** @dataProvider getDescribeContainerParametersTestData */ + public function testDescribeContainerParameters(ParameterBag $parameters, $expectedDescription) + { + $this->assertDescription($expectedDescription, $parameters); + } + + public function getDescribeContainerParametersTestData() + { + return $this->getDescriptionTestData(ObjectsProvider::getContainerParameters()); + } + + /** @dataProvider getDescribeContainerBuilderTestData */ + public function testDescribeContainerBuilder(ContainerBuilder $builder, $expectedDescription, array $options) + { + $this->assertDescription($expectedDescription, $builder, $options); + } + + public function getDescribeContainerBuilderTestData() + { + return $this->getContainerBuilderDescriptionTestData(ObjectsProvider::getContainerBuilders()); + } + + /** @dataProvider getDescribeContainerDefinitionTestData */ + public function testDescribeContainerDefinition(Definition $definition, $expectedDescription) + { + $this->assertDescription($expectedDescription, $definition); + } + + public function getDescribeContainerDefinitionTestData() + { + return $this->getDescriptionTestData(ObjectsProvider::getContainerDefinitions()); + } + + /** @dataProvider getDescribeContainerAliasTestData */ + public function testDescribeContainerAlias(Alias $alias, $expectedDescription) + { + $this->assertDescription($expectedDescription, $alias); + } + + public function getDescribeContainerAliasTestData() + { + return $this->getDescriptionTestData(ObjectsProvider::getContainerAliases()); + } + + /** @dataProvider getDescribeContainerParameterTestData */ + public function testDescribeContainerParameter($parameter, $expectedDescription, array $options) + { + $this->assertDescription($expectedDescription, $parameter, $options); + } + + public function getDescribeContainerParameterTestData() + { + $data = $this->getDescriptionTestData(ObjectsProvider::getContainerParameter()); + + $data[0][] = array('parameter' => 'database_name'); + $data[1][] = array('parameter' => 'twig.form.resources'); + + return $data; + } + + /** @dataProvider getDescribeEventDispatcherTestData */ + public function testDescribeEventDispatcher(EventDispatcher $eventDispatcher, $expectedDescription, array $options) + { + $this->assertDescription($expectedDescription, $eventDispatcher, $options); + } + + public function getDescribeEventDispatcherTestData() + { + return $this->getEventDispatcherDescriptionTestData(ObjectsProvider::getEventDispatchers()); + } + + /** @dataProvider getDescribeCallableTestData */ + public function testDescribeCallable($callable, $expectedDescription) + { + $this->assertDescription($expectedDescription, $callable); + } + + public function getDescribeCallableTestData() + { + return $this->getDescriptionTestData(ObjectsProvider::getCallables()); + } + + abstract protected function getDescriptor(); + + abstract protected function getFormat(); + + private function assertDescription($expectedDescription, $describedObject, array $options = array()) + { + $options['raw_output'] = true; + $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); + + if ('txt' === $this->getFormat()) { + $options['output'] = new SymfonyStyle(new ArrayInput(array()), $output); + } + + $this->getDescriptor()->describe($output, $describedObject, $options); + + if ('json' === $this->getFormat()) { + $this->assertEquals(json_decode($expectedDescription), json_decode($output->fetch())); + } else { + $this->assertEquals(trim($expectedDescription), trim(str_replace(PHP_EOL, "\n", $output->fetch()))); + } + } + + private function getDescriptionTestData(array $objects) + { + $data = array(); + foreach ($objects as $name => $object) { + $description = file_get_contents(sprintf('%s/../../Fixtures/Descriptor/%s.%s', __DIR__, $name, $this->getFormat())); + $data[] = array($object, $description); + } + + return $data; + } + + private function getContainerBuilderDescriptionTestData(array $objects) + { + $variations = array( + 'services' => array('show_private' => true), + 'public' => array('show_private' => false), + 'tag1' => array('show_private' => true, 'tag' => 'tag1'), + 'tags' => array('group_by' => 'tags', 'show_private' => true), + ); + + $data = array(); + foreach ($objects as $name => $object) { + foreach ($variations as $suffix => $options) { + $description = file_get_contents(sprintf('%s/../../Fixtures/Descriptor/%s_%s.%s', __DIR__, $name, $suffix, $this->getFormat())); + $data[] = array($object, $description, $options); + } + } + + return $data; + } + + private function getEventDispatcherDescriptionTestData(array $objects) + { + $variations = array( + 'events' => array(), + 'event1' => array('event' => 'event1'), + ); + + $data = array(); + foreach ($objects as $name => $object) { + foreach ($variations as $suffix => $options) { + $description = file_get_contents(sprintf('%s/../../Fixtures/Descriptor/%s_%s.%s', __DIR__, $name, $suffix, $this->getFormat())); + $data[] = array($object, $description, $options); + } + } + + return $data; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/JsonDescriptorTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/JsonDescriptorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ee03f65391f8a76a03e094baa541f7660db49311 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/JsonDescriptorTest.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\Bundle\FrameworkBundle\Tests\Console\Descriptor; + +use Symfony\Bundle\FrameworkBundle\Console\Descriptor\JsonDescriptor; + +class JsonDescriptorTest extends AbstractDescriptorTest +{ + protected function getDescriptor() + { + return new JsonDescriptor(); + } + + protected function getFormat() + { + return 'json'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/MarkdownDescriptorTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/MarkdownDescriptorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fbb5aaa9626896fea0c75ff10a28a6f0979e4517 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/MarkdownDescriptorTest.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\Bundle\FrameworkBundle\Tests\Console\Descriptor; + +use Symfony\Bundle\FrameworkBundle\Console\Descriptor\MarkdownDescriptor; + +class MarkdownDescriptorTest extends AbstractDescriptorTest +{ + protected function getDescriptor() + { + return new MarkdownDescriptor(); + } + + protected function getFormat() + { + return 'md'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..5244072ae85cd00a47a344eb0e011fb6cb3de982 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php @@ -0,0 +1,176 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor; + +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +class ObjectsProvider +{ + public static function getRouteCollections() + { + $collection1 = new RouteCollection(); + foreach (self::getRoutes() as $name => $route) { + $collection1->add($name, $route); + } + + return array('route_collection_1' => $collection1); + } + + public static function getRoutes() + { + return array( + 'route_1' => new Route( + '/hello/{name}', + array('name' => 'Joseph'), + array('name' => '[a-z]+'), + array('opt1' => 'val1', 'opt2' => 'val2'), + 'localhost', + array('http', 'https'), + array('get', 'head') + ), + 'route_2' => new Route( + '/name/add', + array(), + array(), + array('opt1' => 'val1', 'opt2' => 'val2'), + 'localhost', + array('http', 'https'), + array('put', 'post') + ), + ); + } + + public static function getContainerParameters() + { + return array( + 'parameters_1' => new ParameterBag(array( + 'integer' => 12, + 'string' => 'Hello world!', + 'boolean' => true, + 'array' => array(12, 'Hello world!', true), + )), + ); + } + + public static function getContainerParameter() + { + $builder = new ContainerBuilder(); + $builder->setParameter('database_name', 'symfony'); + $builder->setParameter('twig.form.resources', array( + 'bootstrap_3_horizontal_layout.html.twig', + 'bootstrap_3_layout.html.twig', + 'form_div_layout.html.twig', + 'form_table_layout.html.twig', + )); + + return array( + 'parameter' => $builder, + 'array_parameter' => $builder, + ); + } + + public static function getContainerBuilders() + { + $builder1 = new ContainerBuilder(); + $builder1->setDefinitions(self::getContainerDefinitions()); + $builder1->setAliases(self::getContainerAliases()); + + return array('builder_1' => $builder1); + } + + public static function getContainerDefinitions() + { + $definition1 = new Definition('Full\\Qualified\\Class1'); + $definition2 = new Definition('Full\\Qualified\\Class2'); + + return array( + 'definition_1' => $definition1 + ->setPublic(true) + ->setSynthetic(false) + ->setLazy(true) + ->setAbstract(true) + ->setFactory(array('Full\\Qualified\\FactoryClass', 'get')), + 'definition_2' => $definition2 + ->setPublic(false) + ->setSynthetic(true) + ->setFile('/path/to/file') + ->setLazy(false) + ->setAbstract(false) + ->addTag('tag1', array('attr1' => 'val1', 'attr2' => 'val2')) + ->addTag('tag1', array('attr3' => 'val3')) + ->addTag('tag2') + ->addMethodCall('setMailer', array(new Reference('mailer'))) + ->setFactory(array(new Reference('factory.service'), 'get')), + ); + } + + public static function getContainerAliases() + { + return array( + 'alias_1' => new Alias('service_1', true), + 'alias_2' => new Alias('service_2', false), + ); + } + + public static function getEventDispatchers() + { + $eventDispatcher = new EventDispatcher(); + + $eventDispatcher->addListener('event1', 'global_function', 255); + $eventDispatcher->addListener('event1', function () { return 'Closure'; }, -1); + $eventDispatcher->addListener('event2', new CallableClass()); + + return array('event_dispatcher_1' => $eventDispatcher); + } + + public static function getCallables() + { + return array( + 'callable_1' => 'array_key_exists', + 'callable_2' => array('Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass', 'staticMethod'), + 'callable_3' => array(new CallableClass(), 'method'), + 'callable_4' => 'Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass::staticMethod', + 'callable_5' => array('Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\ExtendedCallableClass', 'parent::staticMethod'), + 'callable_6' => function () { return 'Closure'; }, + 'callable_7' => new CallableClass(), + ); + } +} + +class CallableClass +{ + public function __invoke() + { + } + + public static function staticMethod() + { + } + + public function method() + { + } +} + +class ExtendedCallableClass extends CallableClass +{ + public static function staticMethod() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ce4f377c508fd59d6d58fd4e481d2be759b6b4ba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.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\Bundle\FrameworkBundle\Tests\Console\Descriptor; + +use Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor; + +class TextDescriptorTest extends AbstractDescriptorTest +{ + protected function getDescriptor() + { + return new TextDescriptor(); + } + + protected function getFormat() + { + return 'txt'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/XmlDescriptorTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/XmlDescriptorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8cb9a71697f6bd8542bdbdf73602805a8c5bad2d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/XmlDescriptorTest.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\Bundle\FrameworkBundle\Tests\Console\Descriptor; + +use Symfony\Bundle\FrameworkBundle\Console\Descriptor\XmlDescriptor; + +class XmlDescriptorTest extends AbstractDescriptorTest +{ + protected function getDescriptor() + { + return new XmlDescriptor(); + } + + protected function getFormat() + { + return 'xml'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2fe271663e2d3518aa8173682b5eff7fa3d4c411 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php @@ -0,0 +1,187 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; + +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser; +use Symfony\Component\ClassLoader\ClassLoader; + +class ControllerNameParserTest extends TestCase +{ + protected $loader; + + protected function setUp() + { + $this->loader = new ClassLoader(); + $this->loader->addPrefixes(array( + 'TestBundle' => __DIR__.'/../Fixtures', + 'TestApplication' => __DIR__.'/../Fixtures', + )); + $this->loader->register(); + } + + protected function tearDown() + { + spl_autoload_unregister(array($this->loader, 'loadClass')); + + $this->loader = null; + } + + public function testParse() + { + $parser = $this->createParser(); + + $this->assertEquals('TestBundle\FooBundle\Controller\DefaultController::indexAction', $parser->parse('FooBundle:Default:index'), '->parse() converts a short a:b:c notation string to a class::method string'); + $this->assertEquals('TestBundle\FooBundle\Controller\Sub\DefaultController::indexAction', $parser->parse('FooBundle:Sub\Default:index'), '->parse() converts a short a:b:c notation string to a class::method string'); + $this->assertEquals('TestBundle\Fabpot\FooBundle\Controller\DefaultController::indexAction', $parser->parse('SensioFooBundle:Default:index'), '->parse() converts a short a:b:c notation string to a class::method string'); + $this->assertEquals('TestBundle\Sensio\Cms\FooBundle\Controller\DefaultController::indexAction', $parser->parse('SensioCmsFooBundle:Default:index'), '->parse() converts a short a:b:c notation string to a class::method string'); + $this->assertEquals('TestBundle\FooBundle\Controller\Test\DefaultController::indexAction', $parser->parse('FooBundle:Test\\Default:index'), '->parse() converts a short a:b:c notation string to a class::method string'); + $this->assertEquals('TestBundle\FooBundle\Controller\Test\DefaultController::indexAction', $parser->parse('FooBundle:Test/Default:index'), '->parse() converts a short a:b:c notation string to a class::method string'); + + try { + $parser->parse('foo:'); + $this->fail('->parse() throws an \InvalidArgumentException if the controller is not an a:b:c string'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws an \InvalidArgumentException if the controller is not an a:b:c string'); + } + } + + public function testBuild() + { + $parser = $this->createParser(); + + $this->assertEquals('FoooooBundle:Default:index', $parser->build('TestBundle\FooBundle\Controller\DefaultController::indexAction'), '->parse() converts a class::method string to a short a:b:c notation string'); + $this->assertEquals('FoooooBundle:Sub\Default:index', $parser->build('TestBundle\FooBundle\Controller\Sub\DefaultController::indexAction'), '->parse() converts a class::method string to a short a:b:c notation string'); + + try { + $parser->build('TestBundle\FooBundle\Controller\DefaultController::index'); + $this->fail('->parse() throws an \InvalidArgumentException if the controller is not an aController::cAction string'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws an \InvalidArgumentException if the controller is not an aController::cAction string'); + } + + try { + $parser->build('TestBundle\FooBundle\Controller\Default::indexAction'); + $this->fail('->parse() throws an \InvalidArgumentException if the controller is not an aController::cAction string'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws an \InvalidArgumentException if the controller is not an aController::cAction string'); + } + + try { + $parser->build('Foo\Controller\DefaultController::indexAction'); + $this->fail('->parse() throws an \InvalidArgumentException if the controller is not an aController::cAction string'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws an \InvalidArgumentException if the controller is not an aController::cAction string'); + } + } + + /** + * @dataProvider getMissingControllersTest + */ + public function testMissingControllers($name) + { + $parser = $this->createParser(); + + try { + $parser->parse($name); + $this->fail('->parse() throws a \InvalidArgumentException if the class is found but does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws a \InvalidArgumentException if the class is found but does not exist'); + } + } + + public function getMissingControllersTest() + { + return array( + array('FooBundle:Fake:index'), // a normal bundle + array('SensioFooBundle:Fake:index'), // a bundle with children + ); + } + + /** + * @dataProvider getInvalidBundleNameTests + */ + public function testInvalidBundleName($bundleName, $suggestedBundleName) + { + $parser = $this->createParser(); + + try { + $parser->parse($bundleName); + $this->fail('->parse() throws a \InvalidArgumentException if the bundle does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws a \InvalidArgumentException if the bundle does not exist'); + + if (false === $suggestedBundleName) { + // make sure we don't have a suggestion + $this->assertNotContains('Did you mean', $e->getMessage()); + } else { + $this->assertContains(sprintf('Did you mean "%s"', $suggestedBundleName), $e->getMessage()); + } + } + } + + public function getInvalidBundleNameTests() + { + return array( + 'Alternative will be found using levenshtein' => array('FoodBundle:Default:index', 'FooBundle:Default:index'), + 'Alternative will be found using partial match' => array('FabpotFooBund:Default:index', 'FabpotFooBundle:Default:index'), + 'Bundle does not exist at all' => array('CrazyBundle:Default:index', false), + ); + } + + private function createParser() + { + $bundles = array( + 'SensioFooBundle' => array($this->getBundle('TestBundle\Fabpot\FooBundle', 'FabpotFooBundle'), $this->getBundle('TestBundle\Sensio\FooBundle', 'SensioFooBundle')), + 'SensioCmsFooBundle' => array($this->getBundle('TestBundle\Sensio\Cms\FooBundle', 'SensioCmsFooBundle')), + 'FooBundle' => array($this->getBundle('TestBundle\FooBundle', 'FooBundle')), + 'FabpotFooBundle' => array($this->getBundle('TestBundle\Fabpot\FooBundle', 'FabpotFooBundle'), $this->getBundle('TestBundle\Sensio\FooBundle', 'SensioFooBundle')), + ); + + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); + $kernel + ->expects($this->any()) + ->method('getBundle') + ->will($this->returnCallback(function ($bundle) use ($bundles) { + if (!isset($bundles[$bundle])) { + throw new \InvalidArgumentException(sprintf('Invalid bundle name "%s"', $bundle)); + } + + return $bundles[$bundle]; + })) + ; + + $bundles = array( + 'SensioFooBundle' => $this->getBundle('TestBundle\Fabpot\FooBundle', 'FabpotFooBundle'), + 'SensioCmsFooBundle' => $this->getBundle('TestBundle\Sensio\Cms\FooBundle', 'SensioCmsFooBundle'), + 'FoooooBundle' => $this->getBundle('TestBundle\FooBundle', 'FoooooBundle'), + 'FooBundle' => $this->getBundle('TestBundle\FooBundle', 'FooBundle'), + 'FabpotFooBundle' => $this->getBundle('TestBundle\Fabpot\FooBundle', 'FabpotFooBundle'), + ); + $kernel + ->expects($this->any()) + ->method('getBundles') + ->will($this->returnValue($bundles)) + ; + + return new ControllerNameParser($kernel); + } + + private function getBundle($namespace, $name) + { + $bundle = $this->getMockBuilder('Symfony\Component\HttpKernel\Bundle\BundleInterface')->getMock(); + $bundle->expects($this->any())->method('getName')->will($this->returnValue($name)); + $bundle->expects($this->any())->method('getNamespace')->will($this->returnValue($namespace)); + + return $bundle; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b3b592e5bb110ce1b2fd5503e8ab0029844a7728 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php @@ -0,0 +1,228 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; + +use Psr\Log\LoggerInterface; +use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser; +use Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest as BaseControllerResolverTest; + +class ControllerResolverTest extends BaseControllerResolverTest +{ + public function testGetControllerOnContainerAware() + { + $resolver = $this->createControllerResolver(); + $request = Request::create('/'); + $request->attributes->set('_controller', 'Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController::testAction'); + + $controller = $resolver->getController($request); + + $this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerInterface', $controller[0]->getContainer()); + $this->assertSame('testAction', $controller[1]); + } + + public function testGetControllerOnContainerAwareInvokable() + { + $resolver = $this->createControllerResolver(); + $request = Request::create('/'); + $request->attributes->set('_controller', 'Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController'); + + $controller = $resolver->getController($request); + + $this->assertInstanceOf('Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController', $controller); + $this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerInterface', $controller->getContainer()); + } + + public function testGetControllerWithBundleNotation() + { + $shortName = 'FooBundle:Default:test'; + $parser = $this->createMockParser(); + $parser->expects($this->once()) + ->method('parse') + ->with($shortName) + ->will($this->returnValue('Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController::testAction')) + ; + + $resolver = $this->createControllerResolver(null, $parser); + $request = Request::create('/'); + $request->attributes->set('_controller', $shortName); + + $controller = $resolver->getController($request); + + $this->assertInstanceOf('Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController', $controller[0]); + $this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerInterface', $controller[0]->getContainer()); + $this->assertSame('testAction', $controller[1]); + } + + public function testGetControllerService() + { + $container = $this->createMockContainer(); + $container->expects($this->once()) + ->method('get') + ->with('foo') + ->will($this->returnValue($this)) + ; + + $resolver = $this->createControllerResolver(null, null, $container); + $request = Request::create('/'); + $request->attributes->set('_controller', 'foo:controllerMethod1'); + + $controller = $resolver->getController($request); + + $this->assertInstanceOf(get_class($this), $controller[0]); + $this->assertSame('controllerMethod1', $controller[1]); + } + + public function testGetControllerInvokableService() + { + $invokableController = new InvokableController('bar'); + + $container = $this->createMockContainer(); + $container->expects($this->once()) + ->method('has') + ->with('foo') + ->will($this->returnValue(true)) + ; + $container->expects($this->once()) + ->method('get') + ->with('foo') + ->will($this->returnValue($invokableController)) + ; + + $resolver = $this->createControllerResolver(null, null, $container); + $request = Request::create('/'); + $request->attributes->set('_controller', 'foo'); + + $controller = $resolver->getController($request); + + $this->assertEquals($invokableController, $controller); + } + + public function testGetControllerInvokableServiceWithClassNameAsName() + { + $invokableController = new InvokableController('bar'); + $className = __NAMESPACE__.'\InvokableController'; + + $container = $this->createMockContainer(); + $container->expects($this->once()) + ->method('has') + ->with($className) + ->will($this->returnValue(true)) + ; + $container->expects($this->once()) + ->method('get') + ->with($className) + ->will($this->returnValue($invokableController)) + ; + + $resolver = $this->createControllerResolver(null, null, $container); + $request = Request::create('/'); + $request->attributes->set('_controller', $className); + + $controller = $resolver->getController($request); + + $this->assertEquals($invokableController, $controller); + } + + /** + * @dataProvider getUndefinedControllers + */ + public function testGetControllerOnNonUndefinedFunction($controller, $exceptionName = null, $exceptionMessage = null) + { + // All this logic needs to be duplicated, since calling parent::testGetControllerOnNonUndefinedFunction will override the expected excetion and not use the regex + $resolver = $this->createControllerResolver(); + if (method_exists($this, 'expectException')) { + $this->expectException($exceptionName); + $this->expectExceptionMessageRegExp($exceptionMessage); + } else { + $this->setExpectedExceptionRegExp($exceptionName, $exceptionMessage); + } + + $request = Request::create('/'); + $request->attributes->set('_controller', $controller); + $resolver->getController($request); + } + + public function getUndefinedControllers() + { + return array( + array('foo', '\LogicException', '/Unable to parse the controller name "foo"\./'), + array('oof::bar', '\InvalidArgumentException', '/Class "oof" does not exist\./'), + array('stdClass', '\LogicException', '/Unable to parse the controller name "stdClass"\./'), + array( + 'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar', + '\InvalidArgumentException', + '/.?[cC]ontroller(.*?) for URI "\/" is not callable\.( Expected method(.*) Available methods)?/', + ), + ); + } + + protected function createControllerResolver(LoggerInterface $logger = null, ControllerNameParser $parser = null, ContainerInterface $container = null) + { + if (!$parser) { + $parser = $this->createMockParser(); + } + + if (!$container) { + $container = $this->createMockContainer(); + } + + return new ControllerResolver($container, $parser, $logger); + } + + protected function createMockParser() + { + return $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser')->disableOriginalConstructor()->getMock(); + } + + protected function createMockContainer() + { + return $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + } +} + +class ContainerAwareController implements ContainerAwareInterface +{ + private $container; + + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } + + public function getContainer() + { + return $this->container; + } + + public function testAction() + { + } + + public function __invoke() + { + } +} + +class InvokableController +{ + public function __construct($bar) // mandatory argument to prevent automatic instantiation + { + } + + public function __invoke() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..80908a9e5b91f0dd6fd6eed862aaf7821e1e0954 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php @@ -0,0 +1,689 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; + +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\BinaryFileResponse; +use Symfony\Component\HttpFoundation\File\File; +use Symfony\Component\HttpFoundation\JsonResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\ResponseHeaderBag; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; +use Symfony\Component\HttpFoundation\StreamedResponse; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\User\User; +use Symfony\Component\Serializer\SerializerInterface; + +class ControllerTest extends TestCase +{ + public function testForward() + { + $request = Request::create('/'); + $request->setLocale('fr'); + $request->setRequestFormat('xml'); + + $requestStack = new RequestStack(); + $requestStack->push($request); + + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $kernel->expects($this->once())->method('handle')->will($this->returnCallback(function (Request $request) { + return new Response($request->getRequestFormat().'--'.$request->getLocale()); + })); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('get')->will($this->returnValue($requestStack)); + $container->expects($this->at(1))->method('get')->will($this->returnValue($kernel)); + + $controller = new TestController(); + $controller->setContainer($container); + + $response = $controller->forward('a_controller'); + $this->assertEquals('xml--fr', $response->getContent()); + } + + public function testGetUser() + { + $user = new User('user', 'pass'); + $token = new UsernamePasswordToken($user, 'pass', 'default', array('ROLE_USER')); + + $controller = new TestController(); + $controller->setContainer($this->getContainerWithTokenStorage($token)); + + $this->assertSame($controller->getUser(), $user); + } + + public function testGetUserAnonymousUserConvertedToNull() + { + $token = new AnonymousToken('default', 'anon.'); + + $controller = new TestController(); + $controller->setContainer($this->getContainerWithTokenStorage($token)); + + $this->assertNull($controller->getUser()); + } + + public function testGetUserWithEmptyTokenStorage() + { + $controller = new TestController(); + $controller->setContainer($this->getContainerWithTokenStorage(null)); + + $this->assertNull($controller->getUser()); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage The SecurityBundle is not registered in your application. + */ + public function testGetUserWithEmptyContainer() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container + ->expects($this->once()) + ->method('has') + ->with('security.token_storage') + ->will($this->returnValue(false)); + + $controller = new TestController(); + $controller->setContainer($container); + + $controller->getUser(); + } + + /** + * @param $token + * + * @return ContainerInterface + */ + private function getContainerWithTokenStorage($token = null) + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage')->getMock(); + $tokenStorage + ->expects($this->once()) + ->method('getToken') + ->will($this->returnValue($token)); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container + ->expects($this->once()) + ->method('has') + ->with('security.token_storage') + ->will($this->returnValue(true)); + + $container + ->expects($this->once()) + ->method('get') + ->with('security.token_storage') + ->will($this->returnValue($tokenStorage)); + + return $container; + } + + public function testJson() + { + $container = $this->getMockBuilder(ContainerInterface::class)->getMock(); + $container + ->expects($this->once()) + ->method('has') + ->with('serializer') + ->will($this->returnValue(false)); + + $controller = new TestController(); + $controller->setContainer($container); + + $response = $controller->json(array()); + $this->assertInstanceOf(JsonResponse::class, $response); + $this->assertEquals('[]', $response->getContent()); + } + + public function testJsonWithSerializer() + { + $container = $this->getMockBuilder(ContainerInterface::class)->getMock(); + $container + ->expects($this->once()) + ->method('has') + ->with('serializer') + ->will($this->returnValue(true)); + + $serializer = $this->getMockBuilder(SerializerInterface::class)->getMock(); + $serializer + ->expects($this->once()) + ->method('serialize') + ->with(array(), 'json', array('json_encode_options' => JsonResponse::DEFAULT_ENCODING_OPTIONS)) + ->will($this->returnValue('[]')); + + $container + ->expects($this->once()) + ->method('get') + ->with('serializer') + ->will($this->returnValue($serializer)); + + $controller = new TestController(); + $controller->setContainer($container); + + $response = $controller->json(array()); + $this->assertInstanceOf(JsonResponse::class, $response); + $this->assertEquals('[]', $response->getContent()); + } + + public function testJsonWithSerializerContextOverride() + { + $container = $this->getMockBuilder(ContainerInterface::class)->getMock(); + $container + ->expects($this->once()) + ->method('has') + ->with('serializer') + ->will($this->returnValue(true)); + + $serializer = $this->getMockBuilder(SerializerInterface::class)->getMock(); + $serializer + ->expects($this->once()) + ->method('serialize') + ->with(array(), 'json', array('json_encode_options' => 0, 'other' => 'context')) + ->will($this->returnValue('[]')); + + $container + ->expects($this->once()) + ->method('get') + ->with('serializer') + ->will($this->returnValue($serializer)); + + $controller = new TestController(); + $controller->setContainer($container); + + $response = $controller->json(array(), 200, array(), array('json_encode_options' => 0, 'other' => 'context')); + $this->assertInstanceOf(JsonResponse::class, $response); + $this->assertEquals('[]', $response->getContent()); + $response->setEncodingOptions(JSON_FORCE_OBJECT); + $this->assertEquals('{}', $response->getContent()); + } + + public function testFile() + { + /* @var ContainerInterface $container */ + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $container->set('kernel', $kernel); + + $controller = new TestController(); + $controller->setContainer($container); + + /* @var BinaryFileResponse $response */ + $response = $controller->file(new File(__FILE__)); + $this->assertInstanceOf(BinaryFileResponse::class, $response); + $this->assertSame(200, $response->getStatusCode()); + if ($response->headers->get('content-type')) { + $this->assertSame('text/x-php', $response->headers->get('content-type')); + } + $this->assertContains(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition')); + $this->assertContains(basename(__FILE__), $response->headers->get('content-disposition')); + } + + public function testFileAsInline() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $controller = new TestController(); + $controller->setContainer($container); + + /* @var BinaryFileResponse $response */ + $response = $controller->file(new File(__FILE__), null, ResponseHeaderBag::DISPOSITION_INLINE); + + $this->assertInstanceOf(BinaryFileResponse::class, $response); + $this->assertSame(200, $response->getStatusCode()); + if ($response->headers->get('content-type')) { + $this->assertSame('text/x-php', $response->headers->get('content-type')); + } + $this->assertContains(ResponseHeaderBag::DISPOSITION_INLINE, $response->headers->get('content-disposition')); + $this->assertContains(basename(__FILE__), $response->headers->get('content-disposition')); + } + + public function testFileWithOwnFileName() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $controller = new TestController(); + $controller->setContainer($container); + + /* @var BinaryFileResponse $response */ + $fileName = 'test.php'; + $response = $controller->file(new File(__FILE__), $fileName); + + $this->assertInstanceOf(BinaryFileResponse::class, $response); + $this->assertSame(200, $response->getStatusCode()); + if ($response->headers->get('content-type')) { + $this->assertSame('text/x-php', $response->headers->get('content-type')); + } + $this->assertContains(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition')); + $this->assertContains($fileName, $response->headers->get('content-disposition')); + } + + public function testFileWithOwnFileNameAsInline() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $controller = new TestController(); + $controller->setContainer($container); + + /* @var BinaryFileResponse $response */ + $fileName = 'test.php'; + $response = $controller->file(new File(__FILE__), $fileName, ResponseHeaderBag::DISPOSITION_INLINE); + + $this->assertInstanceOf(BinaryFileResponse::class, $response); + $this->assertSame(200, $response->getStatusCode()); + if ($response->headers->get('content-type')) { + $this->assertSame('text/x-php', $response->headers->get('content-type')); + } + $this->assertContains(ResponseHeaderBag::DISPOSITION_INLINE, $response->headers->get('content-disposition')); + $this->assertContains($fileName, $response->headers->get('content-disposition')); + } + + public function testFileFromPath() + { + $controller = new TestController(); + + /* @var BinaryFileResponse $response */ + $response = $controller->file(__FILE__); + + $this->assertInstanceOf(BinaryFileResponse::class, $response); + $this->assertSame(200, $response->getStatusCode()); + if ($response->headers->get('content-type')) { + $this->assertSame('text/x-php', $response->headers->get('content-type')); + } + $this->assertContains(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition')); + $this->assertContains(basename(__FILE__), $response->headers->get('content-disposition')); + } + + public function testFileFromPathWithCustomizedFileName() + { + $controller = new TestController(); + + /* @var BinaryFileResponse $response */ + $response = $controller->file(__FILE__, 'test.php'); + + $this->assertInstanceOf(BinaryFileResponse::class, $response); + $this->assertSame(200, $response->getStatusCode()); + if ($response->headers->get('content-type')) { + $this->assertSame('text/x-php', $response->headers->get('content-type')); + } + $this->assertContains(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $response->headers->get('content-disposition')); + $this->assertContains('test.php', $response->headers->get('content-disposition')); + } + + /** + * @expectedException \Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException + */ + public function testFileWhichDoesNotExist() + { + $controller = new TestController(); + + /* @var BinaryFileResponse $response */ + $response = $controller->file('some-file.txt', 'test.php'); + } + + public function testIsGranted() + { + $authorizationChecker = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface')->getMock(); + $authorizationChecker->expects($this->once())->method('isGranted')->willReturn(true); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->will($this->returnValue(true)); + $container->expects($this->at(1))->method('get')->will($this->returnValue($authorizationChecker)); + + $controller = new TestController(); + $controller->setContainer($container); + + $this->assertTrue($controller->isGranted('foo')); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AccessDeniedException + */ + public function testdenyAccessUnlessGranted() + { + $authorizationChecker = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface')->getMock(); + $authorizationChecker->expects($this->once())->method('isGranted')->willReturn(false); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->will($this->returnValue(true)); + $container->expects($this->at(1))->method('get')->will($this->returnValue($authorizationChecker)); + + $controller = new TestController(); + $controller->setContainer($container); + + $controller->denyAccessUnlessGranted('foo'); + } + + public function testRenderViewTwig() + { + $twig = $this->getMockBuilder('\Twig_Environment')->disableOriginalConstructor()->getMock(); + $twig->expects($this->once())->method('render')->willReturn('bar'); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->will($this->returnValue(false)); + $container->expects($this->at(1))->method('has')->will($this->returnValue(true)); + $container->expects($this->at(2))->method('get')->will($this->returnValue($twig)); + + $controller = new TestController(); + $controller->setContainer($container); + + $this->assertEquals('bar', $controller->renderView('foo')); + } + + public function testRenderTwig() + { + $twig = $this->getMockBuilder('\Twig_Environment')->disableOriginalConstructor()->getMock(); + $twig->expects($this->once())->method('render')->willReturn('bar'); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->will($this->returnValue(false)); + $container->expects($this->at(1))->method('has')->will($this->returnValue(true)); + $container->expects($this->at(2))->method('get')->will($this->returnValue($twig)); + + $controller = new TestController(); + $controller->setContainer($container); + + $this->assertEquals('bar', $controller->render('foo')->getContent()); + } + + public function testStreamTwig() + { + $twig = $this->getMockBuilder('\Twig_Environment')->disableOriginalConstructor()->getMock(); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->will($this->returnValue(false)); + $container->expects($this->at(1))->method('has')->will($this->returnValue(true)); + $container->expects($this->at(2))->method('get')->will($this->returnValue($twig)); + + $controller = new TestController(); + $controller->setContainer($container); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\StreamedResponse', $controller->stream('foo')); + } + + public function testRedirectToRoute() + { + $router = $this->getMockBuilder('Symfony\Component\Routing\RouterInterface')->getMock(); + $router->expects($this->once())->method('generate')->willReturn('/foo'); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('get')->will($this->returnValue($router)); + + $controller = new TestController(); + $controller->setContainer($container); + $response = $controller->redirectToRoute('foo'); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $response); + $this->assertSame('/foo', $response->getTargetUrl()); + $this->assertSame(302, $response->getStatusCode()); + } + + public function testAddFlash() + { + $flashBag = new FlashBag(); + $session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\Session')->getMock(); + $session->expects($this->once())->method('getFlashBag')->willReturn($flashBag); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->will($this->returnValue(true)); + $container->expects($this->at(1))->method('get')->will($this->returnValue($session)); + + $controller = new TestController(); + $controller->setContainer($container); + $controller->addFlash('foo', 'bar'); + + $this->assertSame(array('bar'), $flashBag->get('foo')); + } + + public function testCreateAccessDeniedException() + { + $controller = new TestController(); + + $this->assertInstanceOf('Symfony\Component\Security\Core\Exception\AccessDeniedException', $controller->createAccessDeniedException()); + } + + public function testIsCsrfTokenValid() + { + $tokenManager = $this->getMockBuilder('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')->getMock(); + $tokenManager->expects($this->once())->method('isTokenValid')->willReturn(true); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->will($this->returnValue(true)); + $container->expects($this->at(1))->method('get')->will($this->returnValue($tokenManager)); + + $controller = new TestController(); + $controller->setContainer($container); + + $this->assertTrue($controller->isCsrfTokenValid('foo', 'bar')); + } + + public function testGenerateUrl() + { + $router = $this->getMockBuilder('Symfony\Component\Routing\RouterInterface')->getMock(); + $router->expects($this->once())->method('generate')->willReturn('/foo'); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('get')->will($this->returnValue($router)); + + $controller = new TestController(); + $controller->setContainer($container); + + $this->assertEquals('/foo', $controller->generateUrl('foo')); + } + + public function testRedirect() + { + $controller = new TestController(); + $response = $controller->redirect('http://dunglas.fr', 301); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $response); + $this->assertSame('http://dunglas.fr', $response->getTargetUrl()); + $this->assertSame(301, $response->getStatusCode()); + } + + public function testRenderViewTemplating() + { + $templating = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Templating\EngineInterface')->getMock(); + $templating->expects($this->once())->method('render')->willReturn('bar'); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->willReturn(true); + $container->expects($this->at(1))->method('get')->will($this->returnValue($templating)); + + $controller = new TestController(); + $controller->setContainer($container); + + $this->assertEquals('bar', $controller->renderView('foo')); + } + + public function testRenderTemplating() + { + $templating = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Templating\EngineInterface')->getMock(); + $templating->expects($this->once())->method('renderResponse')->willReturn(new Response('bar')); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->willReturn(true); + $container->expects($this->at(1))->method('get')->will($this->returnValue($templating)); + + $controller = new TestController(); + $controller->setContainer($container); + + $this->assertEquals('bar', $controller->render('foo')->getContent()); + } + + public function testStreamTemplating() + { + $templating = $this->getMockBuilder('Symfony\Component\Routing\RouterInterface')->getMock(); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->willReturn(true); + $container->expects($this->at(1))->method('get')->will($this->returnValue($templating)); + + $controller = new TestController(); + $controller->setContainer($container); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\StreamedResponse', $controller->stream('foo')); + } + + public function testCreateNotFoundException() + { + $controller = new TestController(); + + $this->assertInstanceOf('Symfony\Component\HttpKernel\Exception\NotFoundHttpException', $controller->createNotFoundException()); + } + + public function testCreateForm() + { + $form = $this->getMockBuilder('Symfony\Component\Form\FormInterface')->getMock(); + + $formFactory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $formFactory->expects($this->once())->method('create')->willReturn($form); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('get')->will($this->returnValue($formFactory)); + + $controller = new TestController(); + $controller->setContainer($container); + + $this->assertEquals($form, $controller->createForm('foo')); + } + + public function testCreateFormBuilder() + { + $formBuilder = $this->getMockBuilder('Symfony\Component\Form\FormBuilderInterface')->getMock(); + + $formFactory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $formFactory->expects($this->once())->method('createBuilder')->willReturn($formBuilder); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('get')->will($this->returnValue($formFactory)); + + $controller = new TestController(); + $controller->setContainer($container); + + $this->assertEquals($formBuilder, $controller->createFormBuilder('foo')); + } + + public function testGetDoctrine() + { + $doctrine = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')->getMock(); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->will($this->returnValue(true)); + $container->expects($this->at(1))->method('get')->will($this->returnValue($doctrine)); + + $controller = new TestController(); + $controller->setContainer($container); + + $this->assertEquals($doctrine, $controller->getDoctrine()); + } +} + +class TestController extends Controller +{ + public function generateUrl($route, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) + { + return parent::generateUrl($route, $parameters, $referenceType); + } + + public function redirect($url, $status = 302) + { + return parent::redirect($url, $status); + } + + public function forward($controller, array $path = array(), array $query = array()) + { + return parent::forward($controller, $path, $query); + } + + public function getUser() + { + return parent::getUser(); + } + + public function json($data, $status = 200, $headers = array(), $context = array()) + { + return parent::json($data, $status, $headers, $context); + } + + public function file($file, $fileName = null, $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT) + { + return parent::file($file, $fileName, $disposition); + } + + public function isGranted($attributes, $object = null) + { + return parent::isGranted($attributes, $object); + } + + public function denyAccessUnlessGranted($attributes, $object = null, $message = 'Access Denied.') + { + parent::denyAccessUnlessGranted($attributes, $object, $message); + } + + public function redirectToRoute($route, array $parameters = array(), $status = 302) + { + return parent::redirectToRoute($route, $parameters, $status); + } + + public function addFlash($type, $message) + { + parent::addFlash($type, $message); + } + + public function isCsrfTokenValid($id, $token) + { + return parent::isCsrfTokenValid($id, $token); + } + + public function renderView($view, array $parameters = array()) + { + return parent::renderView($view, $parameters); + } + + public function render($view, array $parameters = array(), Response $response = null) + { + return parent::render($view, $parameters, $response); + } + + public function stream($view, array $parameters = array(), StreamedResponse $response = null) + { + return parent::stream($view, $parameters, $response); + } + + public function createNotFoundException($message = 'Not Found', \Exception $previous = null) + { + return parent::createNotFoundException($message, $previous); + } + + public function createAccessDeniedException($message = 'Access Denied.', \Exception $previous = null) + { + return parent::createAccessDeniedException($message, $previous); + } + + public function createForm($type, $data = null, array $options = array()) + { + return parent::createForm($type, $data, $options); + } + + public function createFormBuilder($data = null, array $options = array()) + { + return parent::createFormBuilder($data, $options); + } + + public function getDoctrine() + { + return parent::getDoctrine(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..14b6e4428e5507da3ac9a542fc797cfa362b4f67 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php @@ -0,0 +1,297 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; + +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\ParameterBag; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Exception\HttpException; +use Symfony\Bundle\FrameworkBundle\Controller\RedirectController; +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; + +/** + * @author Marcin Sikon + */ +class RedirectControllerTest extends TestCase +{ + public function testEmptyRoute() + { + $request = new Request(); + $controller = new RedirectController(); + + try { + $controller->redirectAction($request, '', true); + $this->fail('Expected Symfony\Component\HttpKernel\Exception\HttpException to be thrown'); + } catch (HttpException $e) { + $this->assertSame(410, $e->getStatusCode()); + } + + try { + $controller->redirectAction($request, '', false); + $this->fail('Expected Symfony\Component\HttpKernel\Exception\HttpException to be thrown'); + } catch (HttpException $e) { + $this->assertSame(404, $e->getStatusCode()); + } + } + + /** + * @dataProvider provider + */ + public function testRoute($permanent, $ignoreAttributes, $expectedCode, $expectedAttributes) + { + $request = new Request(); + + $route = 'new-route'; + $url = '/redirect-url'; + $attributes = array( + 'route' => $route, + 'permanent' => $permanent, + '_route' => 'current-route', + '_route_params' => array( + 'route' => $route, + 'permanent' => $permanent, + 'additional-parameter' => 'value', + 'ignoreAttributes' => $ignoreAttributes, + ), + ); + + $request->attributes = new ParameterBag($attributes); + + $router = $this->getMockBuilder('Symfony\Component\Routing\RouterInterface')->getMock(); + $router + ->expects($this->once()) + ->method('generate') + ->with($this->equalTo($route), $this->equalTo($expectedAttributes)) + ->will($this->returnValue($url)); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + + $container + ->expects($this->once()) + ->method('get') + ->with($this->equalTo('router')) + ->will($this->returnValue($router)); + + $controller = new RedirectController(); + $controller->setContainer($container); + + $returnResponse = $controller->redirectAction($request, $route, $permanent, $ignoreAttributes); + + $this->assertRedirectUrl($returnResponse, $url); + $this->assertEquals($expectedCode, $returnResponse->getStatusCode()); + } + + public function provider() + { + return array( + array(true, false, 301, array('additional-parameter' => 'value')), + array(false, false, 302, array('additional-parameter' => 'value')), + array(false, true, 302, array()), + array(false, array('additional-parameter'), 302, array()), + ); + } + + public function testEmptyPath() + { + $request = new Request(); + $controller = new RedirectController(); + + try { + $controller->urlRedirectAction($request, '', true); + $this->fail('Expected Symfony\Component\HttpKernel\Exception\HttpException to be thrown'); + } catch (HttpException $e) { + $this->assertSame(410, $e->getStatusCode()); + } + + try { + $controller->urlRedirectAction($request, '', false); + $this->fail('Expected Symfony\Component\HttpKernel\Exception\HttpException to be thrown'); + } catch (HttpException $e) { + $this->assertSame(404, $e->getStatusCode()); + } + } + + public function testFullURL() + { + $request = new Request(); + $controller = new RedirectController(); + $returnResponse = $controller->urlRedirectAction($request, 'http://foo.bar/'); + + $this->assertRedirectUrl($returnResponse, 'http://foo.bar/'); + $this->assertEquals(302, $returnResponse->getStatusCode()); + } + + public function testUrlRedirectDefaultPortParameters() + { + $host = 'www.example.com'; + $baseUrl = '/base'; + $path = '/redirect-path'; + $httpPort = 1080; + $httpsPort = 1443; + + $expectedUrl = "https://$host:$httpsPort$baseUrl$path"; + $request = $this->createRequestObject('http', $host, $httpPort, $baseUrl); + $controller = $this->createRedirectController(null, $httpsPort); + $returnValue = $controller->urlRedirectAction($request, $path, false, 'https'); + $this->assertRedirectUrl($returnValue, $expectedUrl); + + $expectedUrl = "http://$host:$httpPort$baseUrl$path"; + $request = $this->createRequestObject('https', $host, $httpPort, $baseUrl); + $controller = $this->createRedirectController($httpPort); + $returnValue = $controller->urlRedirectAction($request, $path, false, 'http'); + $this->assertRedirectUrl($returnValue, $expectedUrl); + } + + public function urlRedirectProvider() + { + return array( + // Standard ports + array('http', null, null, 'http', 80, ''), + array('http', 80, null, 'http', 80, ''), + array('https', null, null, 'http', 80, ''), + array('https', 80, null, 'http', 80, ''), + + array('http', null, null, 'https', 443, ''), + array('http', null, 443, 'https', 443, ''), + array('https', null, null, 'https', 443, ''), + array('https', null, 443, 'https', 443, ''), + + // Non-standard ports + array('http', null, null, 'http', 8080, ':8080'), + array('http', 4080, null, 'http', 8080, ':4080'), + array('http', 80, null, 'http', 8080, ''), + array('https', null, null, 'http', 8080, ''), + array('https', null, 8443, 'http', 8080, ':8443'), + array('https', null, 443, 'http', 8080, ''), + + array('https', null, null, 'https', 8443, ':8443'), + array('https', null, 4443, 'https', 8443, ':4443'), + array('https', null, 443, 'https', 8443, ''), + array('http', null, null, 'https', 8443, ''), + array('http', 8080, 4443, 'https', 8443, ':8080'), + array('http', 80, 4443, 'https', 8443, ''), + ); + } + + /** + * @dataProvider urlRedirectProvider + */ + public function testUrlRedirect($scheme, $httpPort, $httpsPort, $requestScheme, $requestPort, $expectedPort) + { + $host = 'www.example.com'; + $baseUrl = '/base'; + $path = '/redirect-path'; + $expectedUrl = "$scheme://$host$expectedPort$baseUrl$path"; + + $request = $this->createRequestObject($requestScheme, $host, $requestPort, $baseUrl); + $controller = $this->createRedirectController(); + + $returnValue = $controller->urlRedirectAction($request, $path, false, $scheme, $httpPort, $httpsPort); + $this->assertRedirectUrl($returnValue, $expectedUrl); + } + + public function pathQueryParamsProvider() + { + return array( + array('http://www.example.com/base/redirect-path', '/redirect-path', ''), + array('http://www.example.com/base/redirect-path?foo=bar', '/redirect-path?foo=bar', ''), + array('http://www.example.com/base/redirect-path?foo=bar', '/redirect-path', 'foo=bar'), + array('http://www.example.com/base/redirect-path?foo=bar&abc=example', '/redirect-path?foo=bar', 'abc=example'), + array('http://www.example.com/base/redirect-path?foo=bar&abc=example&baz=def', '/redirect-path?foo=bar', 'abc=example&baz=def'), + ); + } + + /** + * @dataProvider pathQueryParamsProvider + */ + public function testPathQueryParams($expectedUrl, $path, $queryString) + { + $scheme = 'http'; + $host = 'www.example.com'; + $baseUrl = '/base'; + $port = 80; + + $request = $this->createRequestObject($scheme, $host, $port, $baseUrl, $queryString); + + $controller = $this->createRedirectController(); + + $returnValue = $controller->urlRedirectAction($request, $path, false, $scheme, $port, null); + $this->assertRedirectUrl($returnValue, $expectedUrl); + } + + private function createRequestObject($scheme, $host, $port, $baseUrl, $queryString = '') + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $request + ->expects($this->any()) + ->method('getScheme') + ->will($this->returnValue($scheme)); + $request + ->expects($this->any()) + ->method('getHost') + ->will($this->returnValue($host)); + $request + ->expects($this->any()) + ->method('getPort') + ->will($this->returnValue($port)); + $request + ->expects($this->any()) + ->method('getBaseUrl') + ->will($this->returnValue($baseUrl)); + $request + ->expects($this->any()) + ->method('getQueryString') + ->will($this->returnValue($queryString)); + + return $request; + } + + private function createRedirectController($httpPort = null, $httpsPort = null) + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + + if (null !== $httpPort) { + $container + ->expects($this->once()) + ->method('hasParameter') + ->with($this->equalTo('request_listener.http_port')) + ->will($this->returnValue(true)); + $container + ->expects($this->once()) + ->method('getParameter') + ->with($this->equalTo('request_listener.http_port')) + ->will($this->returnValue($httpPort)); + } + if (null !== $httpsPort) { + $container + ->expects($this->once()) + ->method('hasParameter') + ->with($this->equalTo('request_listener.https_port')) + ->will($this->returnValue(true)); + $container + ->expects($this->once()) + ->method('getParameter') + ->with($this->equalTo('request_listener.https_port')) + ->will($this->returnValue($httpsPort)); + } + + $controller = new RedirectController(); + $controller->setContainer($container); + + return $controller; + } + + public function assertRedirectUrl(Response $returnResponse, $expectedUrl) + { + $this->assertTrue($returnResponse->isRedirect($expectedUrl), "Expected: $expectedUrl\nGot: ".$returnResponse->headers->get('Location')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/TemplateControllerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/TemplateControllerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..04e6447ee93ea8cc9b9a2553e39d30ec45b42863 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/TemplateControllerTest.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; + +use Symfony\Bundle\FrameworkBundle\Controller\TemplateController; +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Component\HttpFoundation\Response; + +/** + * @author Kévin Dunglas + */ +class TemplateControllerTest extends TestCase +{ + public function testTwig() + { + $twig = $this->getMockBuilder('\Twig_Environment')->disableOriginalConstructor()->getMock(); + $twig->expects($this->once())->method('render')->willReturn('bar'); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->will($this->returnValue(false)); + $container->expects($this->at(1))->method('has')->will($this->returnValue(true)); + $container->expects($this->at(2))->method('get')->will($this->returnValue($twig)); + + $controller = new TemplateController(); + $controller->setContainer($container); + + $this->assertEquals('bar', $controller->templateAction('mytemplate')->getContent()); + } + + public function testTemplating() + { + $templating = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Templating\EngineInterface')->getMock(); + $templating->expects($this->once())->method('renderResponse')->willReturn(new Response('bar')); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->willReturn(true); + $container->expects($this->at(1))->method('get')->will($this->returnValue($templating)); + + $controller = new TemplateController(); + $controller->setContainer($container); + + $this->assertEquals('bar', $controller->templateAction('mytemplate')->getContent()); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage You can not use the TemplateController if the Templating Component or the Twig Bundle are not available. + */ + public function testNoTwigNorTemplating() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->at(0))->method('has')->willReturn(false); + $container->expects($this->at(1))->method('has')->willReturn(false); + + $controller = new TemplateController(); + $controller->setContainer($container); + + $controller->templateAction('mytemplate')->getContent(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddCacheWarmerPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddCacheWarmerPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..799e516dbca38b6243892630abc4d270908081df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddCacheWarmerPassTest.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddCacheWarmerPass; + +class AddCacheWarmerPassTest extends TestCase +{ + public function testThatCacheWarmersAreProcessedInPriorityOrder() + { + $services = array( + 'my_cache_warmer_service1' => array(0 => array('priority' => 100)), + 'my_cache_warmer_service2' => array(0 => array('priority' => 200)), + 'my_cache_warmer_service3' => array(0 => array()), + ); + + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('findTaggedServiceIds', 'getDefinition', 'hasDefinition'))->getMock(); + + $container->expects($this->atLeastOnce()) + ->method('findTaggedServiceIds') + ->will($this->returnValue($services)); + $container->expects($this->atLeastOnce()) + ->method('getDefinition') + ->with('cache_warmer') + ->will($this->returnValue($definition)); + $container->expects($this->atLeastOnce()) + ->method('hasDefinition') + ->with('cache_warmer') + ->will($this->returnValue(true)); + + $definition->expects($this->once()) + ->method('replaceArgument') + ->with(0, array( + new Reference('my_cache_warmer_service2'), + new Reference('my_cache_warmer_service1'), + new Reference('my_cache_warmer_service3'), + )); + + $addCacheWarmerPass = new AddCacheWarmerPass(); + $addCacheWarmerPass->process($container); + } + + public function testThatCompilerPassIsIgnoredIfThereIsNoCacheWarmerDefinition() + { + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('hasDefinition', 'findTaggedServiceIds', 'getDefinition'))->getMock(); + + $container->expects($this->never())->method('findTaggedServiceIds'); + $container->expects($this->never())->method('getDefinition'); + $container->expects($this->atLeastOnce()) + ->method('hasDefinition') + ->with('cache_warmer') + ->will($this->returnValue(false)); + $definition->expects($this->never())->method('replaceArgument'); + + $addCacheWarmerPass = new AddCacheWarmerPass(); + $addCacheWarmerPass->process($container); + } + + public function testThatCacheWarmersMightBeNotDefined() + { + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('hasDefinition', 'findTaggedServiceIds', 'getDefinition'))->getMock(); + + $container->expects($this->atLeastOnce()) + ->method('findTaggedServiceIds') + ->will($this->returnValue(array())); + $container->expects($this->never())->method('getDefinition'); + $container->expects($this->atLeastOnce()) + ->method('hasDefinition') + ->with('cache_warmer') + ->will($this->returnValue(true)); + + $definition->expects($this->never())->method('replaceArgument'); + + $addCacheWarmerPass = new AddCacheWarmerPass(); + $addCacheWarmerPass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6f7d87e2f940fdd5c9079b3a394ebc9e08c1378d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class AddConsoleCommandPassTest extends TestCase +{ + /** + * @dataProvider visibilityProvider + */ + public function testProcess($public) + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new AddConsoleCommandPass()); + $container->setParameter('my-command.class', 'Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\MyCommand'); + + $definition = new Definition('%my-command.class%'); + $definition->setPublic($public); + $definition->addTag('console.command'); + $container->setDefinition('my-command', $definition); + + $container->compile(); + + $alias = 'console.command.symfony_bundle_frameworkbundle_tests_dependencyinjection_compiler_mycommand'; + if ($container->hasAlias($alias)) { + $this->assertSame('my-command', (string) $container->getAlias($alias)); + } else { + // The alias is replaced by a Definition by the ReplaceAliasByActualDefinitionPass + // in case the original service is private + $this->assertFalse($container->hasDefinition('my-command')); + $this->assertTrue($container->hasDefinition($alias)); + } + + $id = $public ? 'my-command' : 'console.command.symfony_bundle_frameworkbundle_tests_dependencyinjection_compiler_mycommand'; + $this->assertTrue($container->hasParameter('console.command.ids')); + $this->assertSame(array($id), $container->getParameter('console.command.ids')); + } + + public function visibilityProvider() + { + return array( + array(true), + array(false), + ); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The service "my-command" tagged "console.command" must not be abstract. + */ + public function testProcessThrowAnExceptionIfTheServiceIsAbstract() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new AddConsoleCommandPass()); + + $definition = new Definition('Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\MyCommand'); + $definition->addTag('console.command'); + $definition->setAbstract(true); + $container->setDefinition('my-command', $definition); + + $container->compile(); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The service "my-command" tagged "console.command" must be a subclass of "Symfony\Component\Console\Command\Command". + */ + public function testProcessThrowAnExceptionIfTheServiceIsNotASubclassOfCommand() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new AddConsoleCommandPass()); + + $definition = new Definition('SplObjectStorage'); + $definition->addTag('console.command'); + $container->setDefinition('my-command', $definition); + + $container->compile(); + } +} + +class MyCommand extends Command +{ +} + +class ExtensionPresentBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConstraintValidatorsPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConstraintValidatorsPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e58068900fc8f5b9c6b9e8ed7ca56ba301ec5034 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConstraintValidatorsPassTest.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConstraintValidatorsPass; + +class AddConstraintValidatorsPassTest extends TestCase +{ + public function testThatConstraintValidatorServicesAreProcessed() + { + $services = array( + 'my_constraint_validator_service1' => array(0 => array('alias' => 'my_constraint_validator_alias1')), + 'my_constraint_validator_service2' => array(), + ); + + $validatorFactoryDefinition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('findTaggedServiceIds', 'getDefinition', 'hasDefinition'))->getMock(); + + $validatorDefinition1 = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->setMethods(array('getClass'))->getMock(); + $validatorDefinition2 = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->setMethods(array('getClass'))->getMock(); + + $validatorDefinition1->expects($this->atLeastOnce()) + ->method('getClass') + ->willReturn('My\Fully\Qualified\Class\Named\Validator1'); + $validatorDefinition2->expects($this->atLeastOnce()) + ->method('getClass') + ->willReturn('My\Fully\Qualified\Class\Named\Validator2'); + + $container->expects($this->any()) + ->method('getDefinition') + ->with($this->anything()) + ->will($this->returnValueMap(array( + array('my_constraint_validator_service1', $validatorDefinition1), + array('my_constraint_validator_service2', $validatorDefinition2), + array('validator.validator_factory', $validatorFactoryDefinition), + ))); + + $container->expects($this->atLeastOnce()) + ->method('findTaggedServiceIds') + ->will($this->returnValue($services)); + $container->expects($this->atLeastOnce()) + ->method('hasDefinition') + ->with('validator.validator_factory') + ->will($this->returnValue(true)); + + $validatorFactoryDefinition->expects($this->once()) + ->method('replaceArgument') + ->with(1, array( + 'My\Fully\Qualified\Class\Named\Validator1' => 'my_constraint_validator_service1', + 'my_constraint_validator_alias1' => 'my_constraint_validator_service1', + 'My\Fully\Qualified\Class\Named\Validator2' => 'my_constraint_validator_service2', + )); + + $addConstraintValidatorsPass = new AddConstraintValidatorsPass(); + $addConstraintValidatorsPass->process($container); + } + + public function testThatCompilerPassIsIgnoredIfThereIsNoConstraintValidatorFactoryDefinition() + { + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('hasDefinition', 'findTaggedServiceIds', 'getDefinition'))->getMock(); + + $container->expects($this->never())->method('findTaggedServiceIds'); + $container->expects($this->never())->method('getDefinition'); + $container->expects($this->atLeastOnce()) + ->method('hasDefinition') + ->with('validator.validator_factory') + ->will($this->returnValue(false)); + $definition->expects($this->never())->method('replaceArgument'); + + $addConstraintValidatorsPass = new AddConstraintValidatorsPass(); + $addConstraintValidatorsPass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0934fe31c0c40c07ca525b769af4f2ac4e1b0bdf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass; + +class AddExpressionLanguageProvidersPassTest extends TestCase +{ + public function testProcessForRouter() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new AddExpressionLanguageProvidersPass()); + + $definition = new Definition('Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\TestProvider'); + $definition->addTag('routing.expression_language_provider'); + $container->setDefinition('some_routing_provider', $definition); + + $container->register('router', '\stdClass'); + $container->compile(); + + $router = $container->getDefinition('router'); + $calls = $router->getMethodCalls(); + $this->assertCount(1, $calls); + $this->assertEquals('addExpressionLanguageProvider', $calls[0][0]); + $this->assertEquals(new Reference('some_routing_provider'), $calls[0][1][0]); + } + + public function testProcessForRouterAlias() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new AddExpressionLanguageProvidersPass()); + + $definition = new Definition('Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\TestProvider'); + $definition->addTag('routing.expression_language_provider'); + $container->setDefinition('some_routing_provider', $definition); + + $container->register('my_router', '\stdClass'); + $container->setAlias('router', 'my_router'); + $container->compile(); + + $router = $container->getDefinition('my_router'); + $calls = $router->getMethodCalls(); + $this->assertCount(1, $calls); + $this->assertEquals('addExpressionLanguageProvider', $calls[0][0]); + $this->assertEquals(new Reference('some_routing_provider'), $calls[0][1][0]); + } + + public function testProcessForSecurity() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new AddExpressionLanguageProvidersPass()); + + $definition = new Definition('Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\TestProvider'); + $definition->addTag('security.expression_language_provider'); + $container->setDefinition('some_security_provider', $definition); + + $container->register('security.access.expression_voter', '\stdClass'); + $container->compile(); + + $router = $container->getDefinition('security.access.expression_voter'); + $calls = $router->getMethodCalls(); + $this->assertCount(1, $calls); + $this->assertEquals('addExpressionLanguageProvider', $calls[0][0]); + $this->assertEquals(new Reference('some_security_provider'), $calls[0][1][0]); + } + + public function testProcessForSecurityAlias() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new AddExpressionLanguageProvidersPass()); + + $definition = new Definition('Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\TestProvider'); + $definition->addTag('security.expression_language_provider'); + $container->setDefinition('some_security_provider', $definition); + + $container->register('my_security.access.expression_voter', '\stdClass'); + $container->setAlias('security.access.expression_voter', 'my_security.access.expression_voter'); + $container->compile(); + + $router = $container->getDefinition('my_security.access.expression_voter'); + $calls = $router->getMethodCalls(); + $this->assertCount(1, $calls); + $this->assertEquals('addExpressionLanguageProvider', $calls[0][0]); + $this->assertEquals(new Reference('some_security_provider'), $calls[0][1][0]); + } +} + +class TestProvider +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolClearerPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolClearerPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a035128c818f0e013eff4416a46a8baa7b3d8a2d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolClearerPassTest.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolClearerPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolPass; +use Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass; +use Symfony\Component\DependencyInjection\Compiler\RepeatedPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +class CachePoolClearerPassTest extends TestCase +{ + public function testPoolRefsAreWeak() + { + $container = new ContainerBuilder(); + $container->setParameter('kernel.debug', false); + $container->setParameter('kernel.name', 'app'); + $container->setParameter('kernel.environment', 'prod'); + $container->setParameter('kernel.root_dir', 'foo'); + + $publicPool = new Definition(); + $publicPool->addArgument('namespace'); + $publicPool->addTag('cache.pool', array('clearer' => 'clearer_alias')); + $container->setDefinition('public.pool', $publicPool); + + $privatePool = new Definition(); + $privatePool->setPublic(false); + $privatePool->addArgument('namespace'); + $privatePool->addTag('cache.pool', array('clearer' => 'clearer_alias')); + $container->setDefinition('private.pool', $privatePool); + + $clearer = new Definition(); + $container->setDefinition('clearer', $clearer); + $container->setAlias('clearer_alias', 'clearer'); + + $pass = new RemoveUnusedDefinitionsPass(); + $pass->setRepeatedPass(new RepeatedPass(array($pass))); + foreach (array(new CachePoolPass(), $pass, new CachePoolClearerPass()) as $pass) { + $pass->process($container); + } + + $this->assertEquals(array(array('addPool', array(new Reference('public.pool')))), $clearer->getMethodCalls()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6fe6b30eb36c4e18b384d1f05629d315a59b2801 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPassTest.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Reference; + +class CachePoolPassTest extends TestCase +{ + private $cachePoolPass; + + protected function setUp() + { + $this->cachePoolPass = new CachePoolPass(); + } + + public function testNamespaceArgumentIsReplaced() + { + $container = new ContainerBuilder(); + $container->setParameter('kernel.debug', false); + $container->setParameter('kernel.name', 'app'); + $container->setParameter('kernel.environment', 'prod'); + $container->setParameter('kernel.root_dir', 'foo'); + $adapter = new Definition(); + $adapter->setAbstract(true); + $adapter->addTag('cache.pool'); + $container->setDefinition('app.cache_adapter', $adapter); + $container->setAlias('app.cache_adapter_alias', 'app.cache_adapter'); + $cachePool = new DefinitionDecorator('app.cache_adapter_alias'); + $cachePool->addArgument(null); + $cachePool->addTag('cache.pool'); + $container->setDefinition('app.cache_pool', $cachePool); + + $this->cachePoolPass->process($container); + + $this->assertSame('D07rhFx97S', $cachePool->getArgument(0)); + } + + public function testArgsAreReplaced() + { + $container = new ContainerBuilder(); + $container->setParameter('kernel.debug', false); + $container->setParameter('kernel.name', 'app'); + $container->setParameter('kernel.environment', 'prod'); + $container->setParameter('cache.prefix.seed', 'foo'); + $cachePool = new Definition(); + $cachePool->addTag('cache.pool', array( + 'provider' => 'foobar', + 'default_lifetime' => 3, + )); + $cachePool->addArgument(null); + $cachePool->addArgument(null); + $cachePool->addArgument(null); + $container->setDefinition('app.cache_pool', $cachePool); + + $this->cachePoolPass->process($container); + + $this->assertInstanceOf(Reference::class, $cachePool->getArgument(0)); + $this->assertSame('foobar', (string) $cachePool->getArgument(0)); + $this->assertSame('itantF+pIq', $cachePool->getArgument(1)); + $this->assertSame(3, $cachePool->getArgument(2)); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Invalid "cache.pool" tag for service "app.cache_pool": accepted attributes are + */ + public function testThrowsExceptionWhenCachePoolTagHasUnknownAttributes() + { + $container = new ContainerBuilder(); + $container->setParameter('kernel.debug', false); + $container->setParameter('kernel.name', 'app'); + $container->setParameter('kernel.environment', 'prod'); + $container->setParameter('kernel.root_dir', 'foo'); + $adapter = new Definition(); + $adapter->setAbstract(true); + $adapter->addTag('cache.pool'); + $container->setDefinition('app.cache_adapter', $adapter); + $cachePool = new DefinitionDecorator('app.cache_adapter'); + $cachePool->addTag('cache.pool', array('foobar' => 123)); + $container->setDefinition('app.cache_pool', $cachePool); + + $this->cachePoolPass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ConfigCachePassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ConfigCachePassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..49e2360d1bc4634ad853d355877fb5466dbd77f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ConfigCachePassTest.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ConfigCachePass; + +class ConfigCachePassTest extends TestCase +{ + public function testThatCheckersAreProcessedInPriorityOrder() + { + $services = array( + 'checker_2' => array(0 => array('priority' => 100)), + 'checker_1' => array(0 => array('priority' => 200)), + 'checker_3' => array(0 => array()), + ); + + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('findTaggedServiceIds', 'getDefinition', 'hasDefinition'))->getMock(); + + $container->expects($this->atLeastOnce()) + ->method('findTaggedServiceIds') + ->will($this->returnValue($services)); + $container->expects($this->atLeastOnce()) + ->method('getDefinition') + ->with('config_cache_factory') + ->will($this->returnValue($definition)); + + $definition->expects($this->once()) + ->method('replaceArgument') + ->with(0, array( + new Reference('checker_1'), + new Reference('checker_2'), + new Reference('checker_3'), + )); + + $pass = new ConfigCachePass(); + $pass->process($container); + } + + public function testThatCheckersCanBeMissing() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('findTaggedServiceIds'))->getMock(); + + $container->expects($this->atLeastOnce()) + ->method('findTaggedServiceIds') + ->will($this->returnValue(array())); + + $pass = new ConfigCachePass(); + $pass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ControllerArgumentValueResolverPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ControllerArgumentValueResolverPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..21a7cf43704c45c7fac680c7084b9dcfcb3704f6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ControllerArgumentValueResolverPassTest.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ControllerArgumentValueResolverPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver; + +class ControllerArgumentValueResolverPassTest extends TestCase +{ + public function testServicesAreOrderedAccordingToPriority() + { + $services = array( + 'n3' => array(array()), + 'n1' => array(array('priority' => 200)), + 'n2' => array(array('priority' => 100)), + ); + + $expected = array( + new Reference('n1'), + new Reference('n2'), + new Reference('n3'), + ); + + $definition = new Definition(ArgumentResolver::class, array(null, array())); + $container = new ContainerBuilder(); + $container->setDefinition('argument_resolver', $definition); + + foreach ($services as $id => list($tag)) { + $container->register($id)->addTag('controller.argument_value_resolver', $tag); + } + + (new ControllerArgumentValueResolverPass())->process($container); + $this->assertEquals($expected, $definition->getArgument(1)); + } + + public function testReturningEmptyArrayWhenNoService() + { + $definition = new Definition(ArgumentResolver::class, array(null, array())); + $container = new ContainerBuilder(); + $container->setDefinition('argument_resolver', $definition); + + (new ControllerArgumentValueResolverPass())->process($container); + $this->assertEquals(array(), $definition->getArgument(1)); + } + + public function testNoArgumentResolver() + { + $container = new ContainerBuilder(); + + (new ControllerArgumentValueResolverPass())->process($container); + + $this->assertFalse($container->hasDefinition('argument_resolver')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2d6e8ca3be478a06a07b1da9b13b772373a429bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\Translation\TranslatorInterface; + +class DataCollectorTranslatorPassTest extends TestCase +{ + private $container; + private $dataCollectorTranslatorPass; + + protected function setUp() + { + $this->container = new ContainerBuilder(); + $this->dataCollectorTranslatorPass = new DataCollectorTranslatorPass(); + + $this->container->setParameter('translator_implementing_bag', 'Symfony\Component\Translation\Translator'); + $this->container->setParameter('translator_not_implementing_bag', 'Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\TranslatorWithTranslatorBag'); + + $this->container->register('translator.data_collector', 'Symfony\Component\Translation\DataCollectorTranslator') + ->setPublic(false) + ->setDecoratedService('translator') + ->setArguments(array(new Reference('translator.data_collector.inner'))) + ; + + $this->container->register('data_collector.translation', 'Symfony\Component\Translation\DataCollector\TranslationDataCollector') + ->setArguments(array(new Reference('translator.data_collector'))) + ; + } + + /** + * @dataProvider getImplementingTranslatorBagInterfaceTranslatorClassNames + */ + public function testProcessKeepsDataCollectorTranslatorIfItImplementsTranslatorBagInterface($class) + { + $this->container->register('translator', $class); + + $this->dataCollectorTranslatorPass->process($this->container); + + $this->assertTrue($this->container->hasDefinition('translator.data_collector')); + } + + /** + * @dataProvider getImplementingTranslatorBagInterfaceTranslatorClassNames + */ + public function testProcessKeepsDataCollectorIfTranslatorImplementsTranslatorBagInterface($class) + { + $this->container->register('translator', $class); + + $this->dataCollectorTranslatorPass->process($this->container); + + $this->assertTrue($this->container->hasDefinition('data_collector.translation')); + } + + public function getImplementingTranslatorBagInterfaceTranslatorClassNames() + { + return array( + array('Symfony\Component\Translation\Translator'), + array('%translator_implementing_bag%'), + ); + } + + /** + * @dataProvider getNotImplementingTranslatorBagInterfaceTranslatorClassNames + */ + public function testProcessRemovesDataCollectorTranslatorIfItDoesNotImplementTranslatorBagInterface($class) + { + $this->container->register('translator', $class); + + $this->dataCollectorTranslatorPass->process($this->container); + + $this->assertFalse($this->container->hasDefinition('translator.data_collector')); + } + + /** + * @dataProvider getNotImplementingTranslatorBagInterfaceTranslatorClassNames + */ + public function testProcessRemovesDataCollectorIfTranslatorDoesNotImplementTranslatorBagInterface($class) + { + $this->container->register('translator', $class); + + $this->dataCollectorTranslatorPass->process($this->container); + + $this->assertFalse($this->container->hasDefinition('data_collector.translation')); + } + + public function getNotImplementingTranslatorBagInterfaceTranslatorClassNames() + { + return array( + array('Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\TranslatorWithTranslatorBag'), + array('%translator_not_implementing_bag%'), + ); + } +} + +class TranslatorWithTranslatorBag implements TranslatorInterface +{ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + } + + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + } + + public function setLocale($locale) + { + } + + public function getLocale() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7c61208a41a5682f878edcd22f1ea1cf0ac56d67 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.php @@ -0,0 +1,224 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FormPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\Form\AbstractType; + +/** + * @author Bernhard Schussek + */ +class FormPassTest extends TestCase +{ + public function testDoNothingIfFormExtensionNotLoaded() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new FormPass()); + + $container->compile(); + + $this->assertFalse($container->hasDefinition('form.extension')); + } + + public function testAddTaggedTypes() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new FormPass()); + + $extDefinition = new Definition('Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension'); + $extDefinition->setArguments(array( + new Reference('service_container'), + array(), + array(), + array(), + )); + + $container->setDefinition('form.extension', $extDefinition); + $container->register('my.type1', __CLASS__.'_Type1')->addTag('form.type'); + $container->register('my.type2', __CLASS__.'_Type2')->addTag('form.type'); + + $container->compile(); + + $extDefinition = $container->getDefinition('form.extension'); + + $this->assertEquals(array( + __CLASS__.'_Type1' => 'my.type1', + __CLASS__.'_Type2' => 'my.type2', + ), $extDefinition->getArgument(1)); + } + + /** + * @dataProvider addTaggedTypeExtensionsDataProvider + */ + public function testAddTaggedTypeExtensions(array $extensions, array $expectedRegisteredExtensions) + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new FormPass()); + + $extDefinition = new Definition('Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension', array( + new Reference('service_container'), + array(), + array(), + array(), + )); + + $container->setDefinition('form.extension', $extDefinition); + + foreach ($extensions as $serviceId => $tag) { + $container->register($serviceId, 'stdClass')->addTag('form.type_extension', $tag); + } + + $container->compile(); + + $extDefinition = $container->getDefinition('form.extension'); + $this->assertSame($expectedRegisteredExtensions, $extDefinition->getArgument(2)); + } + + /** + * @return array + */ + public function addTaggedTypeExtensionsDataProvider() + { + return array( + array( + array( + 'my.type_extension1' => array('extended_type' => 'type1'), + 'my.type_extension2' => array('extended_type' => 'type1'), + 'my.type_extension3' => array('extended_type' => 'type2'), + ), + array( + 'type1' => array('my.type_extension1', 'my.type_extension2'), + 'type2' => array('my.type_extension3'), + ), + ), + array( + array( + 'my.type_extension1' => array('extended_type' => 'type1', 'priority' => 1), + 'my.type_extension2' => array('extended_type' => 'type1', 'priority' => 2), + 'my.type_extension3' => array('extended_type' => 'type1', 'priority' => -1), + 'my.type_extension4' => array('extended_type' => 'type2', 'priority' => 2), + 'my.type_extension5' => array('extended_type' => 'type2', 'priority' => 1), + 'my.type_extension6' => array('extended_type' => 'type2', 'priority' => 1), + ), + array( + 'type1' => array('my.type_extension2', 'my.type_extension1', 'my.type_extension3'), + 'type2' => array('my.type_extension4', 'my.type_extension5', 'my.type_extension6'), + ), + ), + ); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage extended-type attribute, none was configured for the "my.type_extension" service + */ + public function testAddTaggedFormTypeExtensionWithoutExtendedTypeAttribute() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new FormPass()); + + $extDefinition = new Definition('Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension', array( + new Reference('service_container'), + array(), + array(), + array(), + )); + + $container->setDefinition('form.extension', $extDefinition); + $container->register('my.type_extension', 'stdClass') + ->addTag('form.type_extension'); + + $container->compile(); + } + + public function testAddTaggedGuessers() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new FormPass()); + + $extDefinition = new Definition('Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension'); + $extDefinition->setArguments(array( + new Reference('service_container'), + array(), + array(), + array(), + )); + + $definition1 = new Definition('stdClass'); + $definition1->addTag('form.type_guesser'); + $definition2 = new Definition('stdClass'); + $definition2->addTag('form.type_guesser'); + + $container->setDefinition('form.extension', $extDefinition); + $container->setDefinition('my.guesser1', $definition1); + $container->setDefinition('my.guesser2', $definition2); + + $container->compile(); + + $extDefinition = $container->getDefinition('form.extension'); + + $this->assertSame(array( + 'my.guesser1', + 'my.guesser2', + ), $extDefinition->getArgument(3)); + } + + /** + * @dataProvider privateTaggedServicesProvider + */ + public function testPrivateTaggedServices($id, $tagName, $expectedExceptionMessage) + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new FormPass()); + + $extDefinition = new Definition('Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension'); + $extDefinition->setArguments(array( + new Reference('service_container'), + array(), + array(), + array(), + )); + + $container->setDefinition('form.extension', $extDefinition); + $container->register($id, 'stdClass')->setPublic(false)->addTag($tagName); + + if (method_exists($this, 'expectException')) { + $this->expectException('InvalidArgumentException'); + $this->expectExceptionMessage($expectedExceptionMessage); + } else { + $this->setExpectedException('InvalidArgumentException', $expectedExceptionMessage); + } + + $container->compile(); + } + + public function privateTaggedServicesProvider() + { + return array( + array('my.type', 'form.type', 'The service "my.type" must be public as form types are lazy-loaded'), + array('my.type_extension', 'form.type_extension', 'The service "my.type_extension" must be public as form type extensions are lazy-loaded'), + array('my.guesser', 'form.type_guesser', 'The service "my.guesser" must be public as form type guessers are lazy-loaded'), + ); + } +} + +class FormPassTest_Type1 extends AbstractType +{ +} + +class FormPassTest_Type2 extends AbstractType +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..eb4f88870f2eb5f561848706231ca9657042332b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass; + +class LoggingTranslatorPassTest extends TestCase +{ + public function testProcess() + { + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->getMock(); + $parameterBag = $this->getMockBuilder('Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface')->getMock(); + + $container->expects($this->exactly(2)) + ->method('hasAlias') + ->will($this->returnValue(true)); + + $container->expects($this->once()) + ->method('getParameter') + ->will($this->returnValue(true)); + + $container->expects($this->once()) + ->method('getAlias') + ->will($this->returnValue('translation.default')); + + $container->expects($this->exactly(3)) + ->method('getDefinition') + ->will($this->returnValue($definition)); + + $container->expects($this->once()) + ->method('hasParameter') + ->with('translator.logging') + ->will($this->returnValue(true)); + + $definition->expects($this->once()) + ->method('getClass') + ->will($this->returnValue('Symfony\Bundle\FrameworkBundle\Translation\Translator')); + + $parameterBag->expects($this->once()) + ->method('resolveValue') + ->will($this->returnValue("Symfony\Bundle\FrameworkBundle\Translation\Translator")); + + $container->expects($this->once()) + ->method('getParameterBag') + ->will($this->returnValue($parameterBag)); + + $pass = new LoggingTranslatorPass(); + $pass->process($container); + } + + public function testThatCompilerPassIsIgnoredIfThereIsNotLoggerDefinition() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->getMock(); + $container->expects($this->once()) + ->method('hasAlias') + ->will($this->returnValue(false)); + + $pass = new LoggingTranslatorPass(); + $pass->process($container); + } + + public function testThatCompilerPassIsIgnoredIfThereIsNotTranslatorDefinition() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->getMock(); + $container->expects($this->at(0)) + ->method('hasAlias') + ->will($this->returnValue(true)); + + $container->expects($this->at(0)) + ->method('hasAlias') + ->will($this->returnValue(false)); + + $pass = new LoggingTranslatorPass(); + $pass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e064ce9f17f02d73ca8d908c7ef0bf43e43425b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.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\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass; + +class ProfilerPassTest extends TestCase +{ + private $profilerDefinition; + + protected function setUp() + { + $this->profilerDefinition = new Definition('ProfilerClass'); + } + + /** + * Tests that collectors that specify a template but no "id" will throw + * an exception (both are needed if the template is specified). + * + * Thus, a fully-valid tag looks something like this: + * + * + */ + public function testTemplateNoIdThrowsException() + { + // one service, with a template key, but no id + $services = array( + 'my_collector_service' => array(0 => array('template' => 'foo')), + ); + + $builder = $this->createContainerMock($services); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException'); + + $profilerPass = new ProfilerPass(); + $profilerPass->process($builder); + } + + public function testValidCollector() + { + // one service, with a template key, but no id + $services = array( + 'my_collector_service' => array(0 => array('template' => 'foo', 'id' => 'my_collector')), + ); + + $container = $this->createContainerMock($services); + + // fake the getDefinition() to return a Profiler definition + $container->expects($this->atLeastOnce()) + ->method('getDefinition'); + + // assert that the data_collector.templates parameter should be set + $container->expects($this->once()) + ->method('setParameter') + ->with('data_collector.templates', array('my_collector_service' => array('my_collector', 'foo'))); + + $profilerPass = new ProfilerPass(); + $profilerPass->process($container); + + // grab the method calls off of the "profiler" definition + $methodCalls = $this->profilerDefinition->getMethodCalls(); + $this->assertCount(1, $methodCalls); + $this->assertEquals('add', $methodCalls[0][0]); // grab the method part of the first call + } + + private function createContainerMock($services) + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('hasDefinition', 'getDefinition', 'findTaggedServiceIds', 'setParameter'))->getMock(); + $container->expects($this->any()) + ->method('hasDefinition') + ->with($this->equalTo('profiler')) + ->will($this->returnValue(true)); + $container->expects($this->any()) + ->method('getDefinition') + ->will($this->returnValue($this->profilerDefinition)); + $container->expects($this->atLeastOnce()) + ->method('findTaggedServiceIds') + ->will($this->returnValue($services)); + + return $container; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/PropertyInfoPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/PropertyInfoPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..90f713fb566e7df14e3a9f2c2a461e9c00200583 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/PropertyInfoPassTest.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\PropertyInfoPass; +use Symfony\Component\DependencyInjection\Reference; + +class PropertyInfoPassTest extends TestCase +{ + public function testServicesAreOrderedAccordingToPriority() + { + $services = array( + 'n3' => array('tag' => array()), + 'n1' => array('tag' => array('priority' => 200)), + 'n2' => array('tag' => array('priority' => 100)), + ); + + $expected = array( + new Reference('n1'), + new Reference('n2'), + new Reference('n3'), + ); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('findTaggedServiceIds'))->getMock(); + + $container + ->expects($this->any()) + ->method('findTaggedServiceIds') + ->will($this->returnValue($services)); + + $propertyInfoPass = new PropertyInfoPass(); + + $method = new \ReflectionMethod( + 'Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\PropertyInfoPass', + 'findAndSortTaggedServices' + ); + $method->setAccessible(true); + + $actual = $method->invoke($propertyInfoPass, 'tag', $container); + + $this->assertEquals($expected, $actual); + } + + public function testReturningEmptyArrayWhenNoService() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('findTaggedServiceIds'))->getMock(); + + $container + ->expects($this->any()) + ->method('findTaggedServiceIds') + ->will($this->returnValue(array())) + ; + + $propertyInfoPass = new PropertyInfoPass(); + + $method = new \ReflectionMethod( + 'Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\PropertyInfoPass', + 'findAndSortTaggedServices' + ); + $method->setAccessible(true); + + $actual = $method->invoke($propertyInfoPass, 'tag', $container); + + $this->assertEquals(array(), $actual); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/SerializerPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/SerializerPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..34da95e94bcd6c38984ef0325296e75b922cf204 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/SerializerPassTest.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass; + +/** + * Tests for the SerializerPass class. + * + * @author Javier Lopez + */ +class SerializerPassTest extends TestCase +{ + public function testThrowExceptionWhenNoNormalizers() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('hasDefinition', 'findTaggedServiceIds'))->getMock(); + + $container->expects($this->once()) + ->method('hasDefinition') + ->with('serializer') + ->will($this->returnValue(true)); + + $container->expects($this->once()) + ->method('findTaggedServiceIds') + ->with('serializer.normalizer') + ->will($this->returnValue(array())); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('RuntimeException'); + + $serializerPass = new SerializerPass(); + $serializerPass->process($container); + } + + public function testThrowExceptionWhenNoEncoders() + { + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('hasDefinition', 'findTaggedServiceIds', 'getDefinition'))->getMock(); + + $container->expects($this->once()) + ->method('hasDefinition') + ->with('serializer') + ->will($this->returnValue(true)); + + $container->expects($this->any()) + ->method('findTaggedServiceIds') + ->will($this->onConsecutiveCalls( + array('n' => array('serializer.normalizer')), + array() + )); + + $container->expects($this->once()) + ->method('getDefinition') + ->will($this->returnValue($definition)); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('RuntimeException'); + + $serializerPass = new SerializerPass(); + $serializerPass->process($container); + } + + public function testServicesAreOrderedAccordingToPriority() + { + $services = array( + 'n3' => array('tag' => array()), + 'n1' => array('tag' => array('priority' => 200)), + 'n2' => array('tag' => array('priority' => 100)), + ); + + $expected = array( + new Reference('n1'), + new Reference('n2'), + new Reference('n3'), + ); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('findTaggedServiceIds'))->getMock(); + + $container->expects($this->any()) + ->method('findTaggedServiceIds') + ->will($this->returnValue($services)); + + $serializerPass = new SerializerPass(); + + $method = new \ReflectionMethod( + 'Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass', + 'findAndSortTaggedServices' + ); + $method->setAccessible(true); + + $actual = $method->invoke($serializerPass, 'tag', $container); + + $this->assertEquals($expected, $actual); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/TranslatorPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/TranslatorPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..10a38aabdb4026eba0e8e160a277def313716a37 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/TranslatorPassTest.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslatorPass; + +class TranslatorPassTest extends TestCase +{ + public function testValidCollector() + { + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); + $definition->expects($this->at(0)) + ->method('addMethodCall') + ->with('addLoader', array('xliff', new Reference('xliff'))); + $definition->expects($this->at(1)) + ->method('addMethodCall') + ->with('addLoader', array('xlf', new Reference('xliff'))); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('hasDefinition', 'getDefinition', 'findTaggedServiceIds', 'findDefinition'))->getMock(); + $container->expects($this->any()) + ->method('hasDefinition') + ->will($this->returnValue(true)); + $container->expects($this->once()) + ->method('getDefinition') + ->will($this->returnValue($definition)); + $container->expects($this->once()) + ->method('findTaggedServiceIds') + ->will($this->returnValue(array('xliff' => array(array('alias' => 'xliff', 'legacy-alias' => 'xlf'))))); + $container->expects($this->once()) + ->method('findDefinition') + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock())); + $pass = new TranslatorPass(); + $pass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/UnusedTagsPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/UnusedTagsPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b9e8f18845c0d99c8ea6c3761f004df971e88251 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/UnusedTagsPassTest.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass; + +class UnusedTagsPassTest extends TestCase +{ + public function testProcess() + { + $pass = new UnusedTagsPass(); + + $formatter = $this->getMockBuilder('Symfony\Component\DependencyInjection\Compiler\LoggingFormatter')->getMock(); + $formatter + ->expects($this->at(0)) + ->method('format') + ->with($pass, 'Tag "kenrel.event_subscriber" was defined on service(s) "foo", "bar", but was never used. Did you mean "kernel.event_subscriber"?') + ; + + $compiler = $this->getMockBuilder('Symfony\Component\DependencyInjection\Compiler\Compiler')->getMock(); + $compiler->expects($this->once())->method('getLoggingFormatter')->will($this->returnValue($formatter)); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('findTaggedServiceIds', 'getCompiler', 'findUnusedTags', 'findTags'))->getMock(); + $container->expects($this->once())->method('getCompiler')->will($this->returnValue($compiler)); + $container->expects($this->once()) + ->method('findTags') + ->will($this->returnValue(array('kenrel.event_subscriber'))); + $container->expects($this->once()) + ->method('findUnusedTags') + ->will($this->returnValue(array('kenrel.event_subscriber', 'form.type'))); + $container->expects($this->once()) + ->method('findTaggedServiceIds') + ->with('kenrel.event_subscriber') + ->will($this->returnValue(array( + 'foo' => array(), + 'bar' => array(), + ))); + + $pass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c5f2b07337ffd920e6c6f8b86a23a8e2776f105b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -0,0 +1,284 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Configuration; +use Symfony\Component\Config\Definition\Processor; + +class ConfigurationTest extends TestCase +{ + public function testDefaultConfig() + { + $processor = new Processor(); + $config = $processor->processConfiguration(new Configuration(true), array(array('secret' => 's3cr3t'))); + + $this->assertEquals( + array_merge(array('secret' => 's3cr3t', 'trusted_hosts' => array()), self::getBundleDefaultConfig()), + $config + ); + } + + public function testDoNoDuplicateDefaultFormResources() + { + $input = array('templating' => array( + 'form' => array('resources' => array('FrameworkBundle:Form')), + 'engines' => array('php'), + )); + + $processor = new Processor(); + $config = $processor->processConfiguration(new Configuration(true), array($input)); + + $this->assertEquals(array('FrameworkBundle:Form'), $config['templating']['form']['resources']); + } + + /** + * @dataProvider getTestValidTrustedProxiesData + */ + public function testValidTrustedProxies($trustedProxies, $processedProxies) + { + $processor = new Processor(); + $configuration = new Configuration(true); + $config = $processor->processConfiguration($configuration, array(array( + 'secret' => 's3cr3t', + 'trusted_proxies' => $trustedProxies, + ))); + + $this->assertEquals($processedProxies, $config['trusted_proxies']); + } + + public function getTestValidTrustedProxiesData() + { + return array( + array(array('127.0.0.1'), array('127.0.0.1')), + array(array('::1'), array('::1')), + array(array('127.0.0.1', '::1'), array('127.0.0.1', '::1')), + array(null, array()), + array(false, array()), + array(array(), array()), + array(array('10.0.0.0/8'), array('10.0.0.0/8')), + array(array('::ffff:0:0/96'), array('::ffff:0:0/96')), + array(array('0.0.0.0/0'), array('0.0.0.0/0')), + ); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + */ + public function testInvalidTypeTrustedProxies() + { + $processor = new Processor(); + $configuration = new Configuration(true); + $processor->processConfiguration($configuration, array( + array( + 'secret' => 's3cr3t', + 'trusted_proxies' => 'Not an IP address', + ), + )); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + */ + public function testInvalidValueTrustedProxies() + { + $processor = new Processor(); + $configuration = new Configuration(true); + + $processor->processConfiguration($configuration, array( + array( + 'secret' => 's3cr3t', + 'trusted_proxies' => array('Not an IP address'), + ), + )); + } + + public function testAssetsCanBeEnabled() + { + $processor = new Processor(); + $configuration = new Configuration(true); + $config = $processor->processConfiguration($configuration, array(array('assets' => null))); + + $defaultConfig = array( + 'enabled' => true, + 'version_strategy' => null, + 'version' => null, + 'version_format' => '%%s?%%s', + 'base_path' => '', + 'base_urls' => array(), + 'packages' => array(), + ); + + $this->assertEquals($defaultConfig, $config['assets']); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage You cannot use both "version_strategy" and "version" at the same time under "assets". + */ + public function testInvalidVersionStrategy() + { + $processor = new Processor(); + $configuration = new Configuration(true); + $processor->processConfiguration($configuration, array( + array( + 'assets' => array( + 'base_urls' => '//example.com', + 'version' => 1, + 'version_strategy' => 'foo', + ), + ), + )); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage You cannot use both "version_strategy" and "version" at the same time under "assets" packages. + */ + public function testInvalidPackageVersionStrategy() + { + $processor = new Processor(); + $configuration = new Configuration(true); + + $processor->processConfiguration($configuration, array( + array( + 'assets' => array( + 'base_urls' => '//example.com', + 'version' => 1, + 'packages' => array( + 'foo' => array( + 'base_urls' => '//example.com', + 'version' => 1, + 'version_strategy' => 'foo', + ), + ), + ), + ), + )); + } + + protected static function getBundleDefaultConfig() + { + return array( + 'http_method_override' => true, + 'trusted_proxies' => array(), + 'ide' => null, + 'default_locale' => 'en', + 'csrf_protection' => array( + 'enabled' => false, + ), + 'form' => array( + 'enabled' => false, + 'csrf_protection' => array( + 'enabled' => null, // defaults to csrf_protection.enabled + 'field_name' => '_token', + ), + ), + 'esi' => array('enabled' => false), + 'ssi' => array('enabled' => false), + 'fragments' => array( + 'enabled' => false, + 'path' => '/_fragment', + ), + 'profiler' => array( + 'enabled' => false, + 'only_exceptions' => false, + 'only_master_requests' => false, + 'dsn' => 'file:%kernel.cache_dir%/profiler', + 'collect' => true, + 'matcher' => array( + 'enabled' => false, + 'ips' => array(), + ), + ), + 'translator' => array( + 'enabled' => false, + 'fallbacks' => array('en'), + 'logging' => true, + 'paths' => array(), + ), + 'validation' => array( + 'enabled' => false, + 'enable_annotations' => false, + 'static_method' => array('loadValidatorMetadata'), + 'translation_domain' => 'validators', + 'strict_email' => false, + ), + 'annotations' => array( + 'cache' => 'php_array', + 'file_cache_dir' => '%kernel.cache_dir%/annotations', + 'debug' => true, + 'enabled' => true, + ), + 'serializer' => array( + 'enabled' => false, + 'enable_annotations' => false, + ), + 'property_access' => array( + 'magic_call' => false, + 'throw_exception_on_invalid_index' => false, + ), + 'property_info' => array( + 'enabled' => false, + ), + 'router' => array( + 'enabled' => false, + 'http_port' => 80, + 'https_port' => 443, + 'strict_requirements' => true, + ), + 'session' => array( + 'enabled' => false, + 'storage_id' => 'session.storage.native', + 'handler_id' => 'session.handler.native_file', + 'cookie_httponly' => true, + 'gc_probability' => 1, + 'save_path' => '%kernel.cache_dir%/sessions', + 'metadata_update_threshold' => '0', + ), + 'request' => array( + 'enabled' => false, + 'formats' => array(), + ), + 'templating' => array( + 'enabled' => false, + 'hinclude_default_template' => null, + 'form' => array( + 'resources' => array('FrameworkBundle:Form'), + ), + 'engines' => array(), + 'loaders' => array(), + ), + 'assets' => array( + 'enabled' => false, + 'version_strategy' => null, + 'version' => null, + 'version_format' => '%%s?%%s', + 'base_path' => '', + 'base_urls' => array(), + 'packages' => array(), + ), + 'cache' => array( + 'pools' => array(), + 'app' => 'cache.adapter.filesystem', + 'system' => 'cache.adapter.system', + 'directory' => '%kernel.cache_dir%/pools', + 'default_redis_provider' => 'redis://localhost', + ), + 'workflows' => array(), + 'php_errors' => array( + 'log' => true, + 'throw' => true, + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/Resources/config/validation.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/Resources/config/validation.xml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/Resources/config/validation.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/Resources/config/validation.yml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/src/CustomPathBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/src/CustomPathBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..166b606a459e2847ec77ead1ef551ea262cb0f84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/src/CustomPathBundle.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class CustomPathBundle extends Bundle +{ + public function getPath() + { + return __DIR__.'/..'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/validation.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/validation.xml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/validation.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/validation.yml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/TestBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/TestBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..2f090b2de8d53272f2ab26fec8da37bf357d47ed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/TestBundle.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class TestBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets.php new file mode 100644 index 0000000000000000000000000000000000000000..3cfc5c1bc0cc4fcb02ea6c3b84326b7dc5898012 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets.php @@ -0,0 +1,29 @@ +loadFromExtension('framework', array( + 'assets' => array( + 'version' => 'SomeVersionScheme', + 'base_urls' => 'http://cdn.example.com', + 'version_format' => '%%s?version=%%s', + 'packages' => array( + 'images_path' => array( + 'base_path' => '/foo', + ), + 'images' => array( + 'version' => '1.0.0', + 'base_urls' => array('http://images1.example.com', 'http://images2.example.com'), + ), + 'foo' => array( + 'version' => '1.0.0', + 'version_format' => '%%s-%%s', + ), + 'bar' => array( + 'base_urls' => array('https://bar2.example.com'), + ), + 'bar_version_strategy' => array( + 'base_urls' => array('https://bar2.example.com'), + 'version_strategy' => 'assets.custom_version_strategy', + ), + ), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets_version_strategy_as_service.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets_version_strategy_as_service.php new file mode 100644 index 0000000000000000000000000000000000000000..4f9123aefb0f5636b9049c84c58ceddf9c03d407 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets_version_strategy_as_service.php @@ -0,0 +1,8 @@ +loadFromExtension('framework', array( + 'assets' => array( + 'version_strategy' => 'assets.custom_version_strategy', + 'base_urls' => 'http://cdn.example.com', + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache.php new file mode 100644 index 0000000000000000000000000000000000000000..ef7a1be1904686ee8cb079fb0558622249a09131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache.php @@ -0,0 +1,29 @@ +loadFromExtension('framework', array( + 'cache' => array( + 'pools' => array( + 'cache.foo' => array( + 'adapter' => 'cache.adapter.apcu', + 'default_lifetime' => 30, + ), + 'cache.bar' => array( + 'adapter' => 'cache.adapter.doctrine', + 'default_lifetime' => 5, + 'provider' => 'app.doctrine_cache_provider', + ), + 'cache.baz' => array( + 'adapter' => 'cache.adapter.filesystem', + 'default_lifetime' => 7, + ), + 'cache.foobar' => array( + 'adapter' => 'cache.adapter.psr6', + 'default_lifetime' => 10, + 'provider' => 'app.cache_pool', + ), + 'cache.def' => array( + 'default_lifetime' => 11, + ), + ), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_env_var.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_env_var.php new file mode 100644 index 0000000000000000000000000000000000000000..b93ade8f4c81680f2bb209d2d4100516558d8958 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_env_var.php @@ -0,0 +1,9 @@ +setParameter('env(REDIS_URL)', 'redis://paas.com'); + +$container->loadFromExtension('framework', array( + 'cache' => array( + 'default_redis_provider' => '%env(REDIS_URL)%', + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf.php new file mode 100644 index 0000000000000000000000000000000000000000..497ceb2b6e3c02b0f2589caee46344aaecc0e551 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf.php @@ -0,0 +1,9 @@ +loadFromExtension('framework', array( + 'csrf_protection' => true, + 'form' => true, + 'session' => array( + 'handler_id' => null, + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf_needs_session.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf_needs_session.php new file mode 100644 index 0000000000000000000000000000000000000000..d1df1c596233cdffbcae3311849519f4f2208e56 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf_needs_session.php @@ -0,0 +1,7 @@ +loadFromExtension('framework', array( + 'csrf_protection' => array( + 'enabled' => true, + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/default_config.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/default_config.php new file mode 100644 index 0000000000000000000000000000000000000000..cd2e56bddf14760761baa22aca27f2ce795bb063 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/default_config.php @@ -0,0 +1,3 @@ +loadFromExtension('framework', array()); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/form_no_csrf.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/form_no_csrf.php new file mode 100644 index 0000000000000000000000000000000000000000..7360c49c72ef55ee6f48f32568c1865a8de1667c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/form_no_csrf.php @@ -0,0 +1,9 @@ +loadFromExtension('framework', array( + 'form' => array( + 'csrf_protection' => array( + 'enabled' => false, + ), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php new file mode 100644 index 0000000000000000000000000000000000000000..9173dd5615bda3442ceeeee5cf178b263c173426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php @@ -0,0 +1,81 @@ +loadFromExtension('framework', array( + 'secret' => 's3cr3t', + 'default_locale' => 'fr', + 'csrf_protection' => true, + 'form' => array( + 'csrf_protection' => array( + 'field_name' => '_csrf', + ), + ), + 'http_method_override' => false, + 'trusted_proxies' => array('127.0.0.1', '10.0.0.1'), + 'esi' => array( + 'enabled' => true, + ), + 'profiler' => array( + 'only_exceptions' => true, + 'enabled' => false, + ), + 'router' => array( + 'resource' => '%kernel.root_dir%/config/routing.xml', + 'type' => 'xml', + ), + 'session' => array( + 'storage_id' => 'session.storage.native', + 'handler_id' => 'session.handler.native_file', + 'name' => '_SYMFONY', + 'cookie_lifetime' => 86400, + 'cookie_path' => '/', + 'cookie_domain' => 'example.com', + 'cookie_secure' => true, + 'cookie_httponly' => false, + 'use_cookies' => true, + 'gc_maxlifetime' => 90000, + 'gc_divisor' => 108, + 'gc_probability' => 1, + 'save_path' => '/path/to/sessions', + ), + 'templating' => array( + 'cache' => '/path/to/cache', + 'engines' => array('php', 'twig'), + 'loader' => array('loader.foo', 'loader.bar'), + 'form' => array( + 'resources' => array('theme1', 'theme2'), + ), + 'hinclude_default_template' => 'global_hinclude_template', + ), + 'assets' => array( + 'version' => 'v1', + ), + 'translator' => array( + 'enabled' => true, + 'fallback' => 'fr', + 'paths' => array('%kernel.root_dir%/Fixtures/translations'), + ), + 'validation' => array( + 'enabled' => true, + ), + 'annotations' => array( + 'cache' => 'file', + 'debug' => true, + 'file_cache_dir' => '%kernel.cache_dir%/annotations', + ), + 'serializer' => array( + 'enabled' => true, + 'enable_annotations' => true, + 'name_converter' => 'serializer.name_converter.camel_case_to_snake_case', + ), + 'property_info' => true, + 'ide' => 'file%%link%%format', + 'request' => array( + 'formats' => array( + 'csv' => array( + 'text/csv', + 'text/plain', + ), + 'pdf' => 'application/pdf', + ), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/profiler.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/profiler.php new file mode 100644 index 0000000000000000000000000000000000000000..6615aa74ce558123babbcd3b58a03d4c5cc7fa42 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/profiler.php @@ -0,0 +1,7 @@ +loadFromExtension('framework', array( + 'profiler' => array( + 'enabled' => true, + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/property_accessor.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/property_accessor.php new file mode 100644 index 0000000000000000000000000000000000000000..4340e61fc096129724781b816b30373475be27e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/property_accessor.php @@ -0,0 +1,8 @@ +loadFromExtension('framework', array( + 'property_access' => array( + 'magic_call' => true, + 'throw_exception_on_invalid_index' => true, + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/property_info.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/property_info.php new file mode 100644 index 0000000000000000000000000000000000000000..847e15fa194ffa8a5e7231fc9b1bb88dc91660e6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/property_info.php @@ -0,0 +1,7 @@ +loadFromExtension('framework', array( + 'property_info' => array( + 'enabled' => true, + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/request.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/request.php new file mode 100644 index 0000000000000000000000000000000000000000..1e7cb2921c4cd4484eaf5b83414b476f3fa8fdb1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/request.php @@ -0,0 +1,7 @@ +loadFromExtension('framework', array( + 'request' => array( + 'formats' => array(), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/serializer_disabled.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/serializer_disabled.php new file mode 100644 index 0000000000000000000000000000000000000000..dedd090beb7747e61d24dc452295fa765eb0b873 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/serializer_disabled.php @@ -0,0 +1,7 @@ +loadFromExtension('framework', array( + 'serializer' => array( + 'enabled' => false, + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/serializer_enabled.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/serializer_enabled.php new file mode 100644 index 0000000000000000000000000000000000000000..eadad57ec7180bef276dcba6f7f3eba6eb76b74e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/serializer_enabled.php @@ -0,0 +1,7 @@ +loadFromExtension('framework', array( + 'serializer' => array( + 'enabled' => true, + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/serializer_legacy_cache.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/serializer_legacy_cache.php new file mode 100644 index 0000000000000000000000000000000000000000..65ddd321548ac3093bf2ce33485be302e8be0d43 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/serializer_legacy_cache.php @@ -0,0 +1,8 @@ +loadFromExtension('framework', array( + 'serializer' => array( + 'enabled' => true, + 'cache' => 'foo', + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/session.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/session.php new file mode 100644 index 0000000000000000000000000000000000000000..104183764a4dbe49ab0a1f5032929f9f440a338c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/session.php @@ -0,0 +1,7 @@ +loadFromExtension('framework', array( + 'session' => array( + 'handler_id' => null, + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_disabled.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_disabled.php new file mode 100644 index 0000000000000000000000000000000000000000..f76d8ad35177c4b5e5242ff2f9ba8ee1cf7ae6a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_disabled.php @@ -0,0 +1,5 @@ +loadFromExtension('framework', array( + 'templating' => false, +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_no_assets.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_no_assets.php new file mode 100644 index 0000000000000000000000000000000000000000..bf12a8bc47e5fd7269ba638b8a164d96e41954e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_no_assets.php @@ -0,0 +1,7 @@ +loadFromExtension('framework', array( + 'templating' => array( + 'engines' => array('php', 'twig'), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_php_assets_disabled.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_php_assets_disabled.php new file mode 100644 index 0000000000000000000000000000000000000000..535a9a2e99c9602adf54e3054ec4bdb8f2eba5bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_php_assets_disabled.php @@ -0,0 +1,8 @@ +loadFromExtension('framework', array( + 'assets' => false, + 'templating' => array( + 'engines' => array('php'), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/translator_fallbacks.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/translator_fallbacks.php new file mode 100644 index 0000000000000000000000000000000000000000..0abe3a46abbddd18479b731d165f883c4d3b7bcb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/translator_fallbacks.php @@ -0,0 +1,7 @@ +loadFromExtension('framework', array( + 'translator' => array( + 'fallbacks' => array('en', 'fr'), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_annotations.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_annotations.php new file mode 100644 index 0000000000000000000000000000000000000000..35a0b3d39e4f1707e668a463129eab564941dbce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_annotations.php @@ -0,0 +1,9 @@ +loadFromExtension('framework', array( + 'secret' => 's3cr3t', + 'validation' => array( + 'enabled' => true, + 'enable_annotations' => true, + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_multiple_static_methods.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_multiple_static_methods.php new file mode 100644 index 0000000000000000000000000000000000000000..476da7948e1666460dd3f8b238b8f12f85324768 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_multiple_static_methods.php @@ -0,0 +1,9 @@ +loadFromExtension('framework', array( + 'secret' => 's3cr3t', + 'validation' => array( + 'enabled' => true, + 'static_method' => array('loadFoo', 'loadBar'), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_no_static_method.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_no_static_method.php new file mode 100644 index 0000000000000000000000000000000000000000..b428e06f5c3c05a6466adb98ec2c40fcc3de40af --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_no_static_method.php @@ -0,0 +1,9 @@ +loadFromExtension('framework', array( + 'secret' => 's3cr3t', + 'validation' => array( + 'enabled' => true, + 'static_method' => false, + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_with_arguments_and_service.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_with_arguments_and_service.php new file mode 100644 index 0000000000000000000000000000000000000000..d97f9700a0f1bdaab8b2ef048964359d9621ba9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_with_arguments_and_service.php @@ -0,0 +1,31 @@ +loadFromExtension('framework', array( + 'workflows' => array( + 'my_workflow' => array( + 'marking_store' => array( + 'arguments' => array('a', 'b'), + 'service' => 'workflow_service', + ), + 'supports' => array( + FrameworkExtensionTest::class, + ), + 'places' => array( + 'first', + 'last', + ), + 'transitions' => array( + 'go' => array( + 'from' => array( + 'first', + ), + 'to' => array( + 'last', + ), + ), + ), + ), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_with_multiple_transitions_with_same_name.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_with_multiple_transitions_with_same_name.php new file mode 100644 index 0000000000000000000000000000000000000000..2619a2dd4316aba7f6791143c525def975add533 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_with_multiple_transitions_with_same_name.php @@ -0,0 +1,49 @@ +loadFromExtension('framework', array( + 'workflows' => array( + 'article' => array( + 'type' => 'workflow', + 'marking_store' => array( + 'type' => 'multiple_state', + ), + 'supports' => array( + FrameworkExtensionTest::class, + ), + 'initial_place' => 'draft', + 'places' => array( + 'draft', + 'wait_for_journalist', + 'approved_by_journalist', + 'wait_for_spellchecker', + 'approved_by_spellchecker', + 'published', + ), + 'transitions' => array( + 'request_review' => array( + 'from' => 'draft', + 'to' => array('wait_for_journalist', 'wait_for_spellchecker'), + ), + 'journalist_approval' => array( + 'from' => 'wait_for_journalist', + 'to' => 'approved_by_journalist', + ), + 'spellchecker_approval' => array( + 'from' => 'wait_for_spellchecker', + 'to' => 'approved_by_spellchecker', + ), + 'publish' => array( + 'from' => array('approved_by_journalist', 'approved_by_spellchecker'), + 'to' => 'published', + ), + 'publish_editor_in_chief' => array( + 'name' => 'publish', + 'from' => 'draft', + 'to' => 'published', + ), + ), + ), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_with_type_and_service.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_with_type_and_service.php new file mode 100644 index 0000000000000000000000000000000000000000..7d9e596408c971f443f28709214d5ffc745178df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_with_type_and_service.php @@ -0,0 +1,31 @@ +loadFromExtension('framework', array( + 'workflows' => array( + 'my_workflow' => array( + 'marking_store' => array( + 'type' => 'multiple_state', + 'service' => 'workflow_service', + ), + 'supports' => array( + FrameworkExtensionTest::class, + ), + 'places' => array( + 'first', + 'last', + ), + 'transitions' => array( + 'go' => array( + 'from' => array( + 'first', + ), + 'to' => array( + 'last', + ), + ), + ), + ), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflows.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflows.php new file mode 100644 index 0000000000000000000000000000000000000000..5ebfeeeb76e7a14643fee7186a17fca7df8a7c3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflows.php @@ -0,0 +1,110 @@ +loadFromExtension('framework', array( + 'workflows' => array( + 'article' => array( + 'type' => 'workflow', + 'marking_store' => array( + 'type' => 'multiple_state', + ), + 'supports' => array( + FrameworkExtensionTest::class, + ), + 'initial_place' => 'draft', + 'places' => array( + 'draft', + 'wait_for_journalist', + 'approved_by_journalist', + 'wait_for_spellchecker', + 'approved_by_spellchecker', + 'published', + ), + 'transitions' => array( + 'request_review' => array( + 'from' => 'draft', + 'to' => array('wait_for_journalist', 'wait_for_spellchecker'), + ), + 'journalist_approval' => array( + 'from' => 'wait_for_journalist', + 'to' => 'approved_by_journalist', + ), + 'spellchecker_approval' => array( + 'from' => 'wait_for_spellchecker', + 'to' => 'approved_by_spellchecker', + ), + 'publish' => array( + 'from' => array('approved_by_journalist', 'approved_by_spellchecker'), + 'to' => 'published', + ), + ), + ), + 'pull_request' => array( + 'type' => 'state_machine', + 'marking_store' => array( + 'type' => 'single_state', + ), + 'supports' => array( + FrameworkExtensionTest::class, + ), + 'initial_place' => 'start', + 'places' => array( + 'start', + 'coding', + 'travis', + 'review', + 'merged', + 'closed', + ), + 'transitions' => array( + 'submit' => array( + 'from' => 'start', + 'to' => 'travis', + ), + 'update' => array( + 'from' => array('coding', 'travis', 'review'), + 'to' => 'travis', + ), + 'wait_for_review' => array( + 'from' => 'travis', + 'to' => 'review', + ), + 'request_change' => array( + 'from' => 'review', + 'to' => 'coding', + ), + 'accept' => array( + 'from' => 'review', + 'to' => 'merged', + ), + 'reject' => array( + 'from' => 'review', + 'to' => 'closed', + ), + 'reopen' => array( + 'from' => 'closed', + 'to' => 'review', + ), + ), + ), + 'service_marking_store_workflow' => array( + 'marking_store' => array( + 'service' => 'workflow_service', + ), + 'supports' => array( + FrameworkExtensionTest::class, + ), + 'places' => array( + 'first', + 'last', + ), + 'transitions' => array( + 'go' => array( + 'from' => 'first', + 'to' => 'last', + ), + ), + ), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/translations/test_paths.en.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/translations/test_paths.en.yml new file mode 100644 index 0000000000000000000000000000000000000000..d4e682c47c9cae44cd2ac37b3189309a596af4df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/translations/test_paths.en.yml @@ -0,0 +1,2 @@ +custom: + paths: test diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets.xml new file mode 100644 index 0000000000000000000000000000000000000000..b99952b2923d3934fe7b4c3e931a63b708837668 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets.xml @@ -0,0 +1,26 @@ + + + + + + + http://cdn.example.com + + + http://images1.example.com + http://images2.example.com + + + + https://bar2.example.com + + + https://bar_version_strategy.example.com + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets_version_strategy_as_service.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets_version_strategy_as_service.xml new file mode 100644 index 0000000000000000000000000000000000000000..353ac487e40443453b9189afce6d0625c036f807 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets_version_strategy_as_service.xml @@ -0,0 +1,14 @@ + + + + + + + http://cdn.example.com + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache.xml new file mode 100644 index 0000000000000000000000000000000000000000..79ee2a4b3742121e4bcfa8e93fc3b9d19fc7831a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache_env_var.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache_env_var.xml new file mode 100644 index 0000000000000000000000000000000000000000..8f03cb1784b353ca916831ed7ef4db179bc9d6db --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache_env_var.xml @@ -0,0 +1,17 @@ + + + + + redis://paas.com + + + + + %env(REDIS_URL)% + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf.xml new file mode 100644 index 0000000000000000000000000000000000000000..586d741aa9e5d13e0712bccbf298b7bff961f1b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf_disabled.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf_disabled.xml new file mode 100644 index 0000000000000000000000000000000000000000..635557f938acb4c17228a6588d7a2bdf016d1e4d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf_disabled.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf_needs_session.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf_needs_session.xml new file mode 100644 index 0000000000000000000000000000000000000000..0a08d2351aaf212a54f4ef322eaec398d8cf92d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf_needs_session.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/default_config.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/default_config.xml new file mode 100644 index 0000000000000000000000000000000000000000..af727abdcb8d9e13bf57295a818694b48ffbcc15 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/default_config.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_csrf_sets_field_name.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_csrf_sets_field_name.xml new file mode 100644 index 0000000000000000000000000000000000000000..589ec786e3428615631548c235ed038c333b231b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_csrf_sets_field_name.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_csrf_under_form_sets_field_name.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_csrf_under_form_sets_field_name.xml new file mode 100644 index 0000000000000000000000000000000000000000..c896acbd6b916fc305d4a231dc0c3c635dc4fb9a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_csrf_under_form_sets_field_name.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_no_csrf.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_no_csrf.xml new file mode 100644 index 0000000000000000000000000000000000000000..fdeb60acf99349a36f476f1d21316f051ec35556 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_no_csrf.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml new file mode 100644 index 0000000000000000000000000000000000000000..7c6b11ac44aa638aa20ef4ab44e0eb10164be685 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + text/csv + text/plain + + + application/pdf + + + + loader.foo + loader.bar + php + twig + + theme1 + theme2 + + + + + %kernel.root_dir%/Fixtures/translations + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/profiler.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/profiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..f3b3095ccd951f4e87dd400b40b841029275be2e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/profiler.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/property_accessor.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/property_accessor.xml new file mode 100644 index 0000000000000000000000000000000000000000..d7db78a6e2e38a65175c8f3d333f12776fc73c0a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/property_accessor.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/property_info.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/property_info.xml new file mode 100644 index 0000000000000000000000000000000000000000..825bc46e74477f9f4d8812c5add32c995e0c8d1f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/property_info.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/request.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/request.xml new file mode 100644 index 0000000000000000000000000000000000000000..320d1b187525aa17719eb90ddd10459324b3a827 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/request.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/serializer_disabled.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/serializer_disabled.xml new file mode 100644 index 0000000000000000000000000000000000000000..73f1dccb1a6ed9d147b6dc8285e9f1d2dce14ef9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/serializer_disabled.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/serializer_enabled.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/serializer_enabled.xml new file mode 100644 index 0000000000000000000000000000000000000000..e202fc1b5ee20c08c48119126345cfa5c9dcf1df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/serializer_enabled.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/serializer_legacy_cache.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/serializer_legacy_cache.xml new file mode 100644 index 0000000000000000000000000000000000000000..237e31e50a2e3259814ac0c5c936d35ef161903f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/serializer_legacy_cache.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/session.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/session.xml new file mode 100644 index 0000000000000000000000000000000000000000..118a08c807eefa39f8b85c87cc1723dec5e81506 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/session.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/templating_disabled.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/templating_disabled.xml new file mode 100644 index 0000000000000000000000000000000000000000..1078976462ff0c3014101152b20c49dfc48d0993 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/templating_disabled.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/templating_no_assets.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/templating_no_assets.xml new file mode 100644 index 0000000000000000000000000000000000000000..d579ed4c0a181c6bc725ad18b737f8c311ce0bb1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/templating_no_assets.xml @@ -0,0 +1,14 @@ + + + + + + php + twig + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/translator_fallbacks.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/translator_fallbacks.xml new file mode 100644 index 0000000000000000000000000000000000000000..a0e4f4ed32b2ed0219a9504ad36398f5a272837a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/translator_fallbacks.xml @@ -0,0 +1,15 @@ + + + + + + + en + fr + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/validation_annotations.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/validation_annotations.xml new file mode 100644 index 0000000000000000000000000000000000000000..22f1536e139c30579ae341f10016504f3e3adc17 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/validation_annotations.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/validation_multiple_static_methods.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/validation_multiple_static_methods.xml new file mode 100644 index 0000000000000000000000000000000000000000..053f574bafe9bfe87b1f786e585feb1d21a0e31e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/validation_multiple_static_methods.xml @@ -0,0 +1,15 @@ + + + + + + + loadFoo + loadBar + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/validation_no_static_method.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/validation_no_static_method.xml new file mode 100644 index 0000000000000000000000000000000000000000..d26c7a2be50efc687490516233e9fc64c3a96b43 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/validation_no_static_method.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_arguments_and_service.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_arguments_and_service.xml new file mode 100644 index 0000000000000000000000000000000000000000..02502296f77deacd96bbf425ef0a7dcbb9e259d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_arguments_and_service.xml @@ -0,0 +1,24 @@ + + + + + + + + a + a + + Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + first + last + + a + a + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_multiple_transitions_with_same_name.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_multiple_transitions_with_same_name.xml new file mode 100644 index 0000000000000000000000000000000000000000..d52aed8c95234aa56c4f5463ec9dbba31f43ef71 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_multiple_transitions_with_same_name.xml @@ -0,0 +1,46 @@ + + + + + + + + a + a + + Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + draft + wait_for_journalist + approved_by_journalist + wait_for_spellchecker + approved_by_spellchecker + published + + draft + wait_for_journalist + wait_for_spellchecker + + + wait_for_journalist + approved_by_journalist + + + wait_for_spellchecker + approved_by_spellchecker + + + approved_by_journalist + approved_by_spellchecker + published + + + draft + published + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_type_and_service.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_type_and_service.xml new file mode 100644 index 0000000000000000000000000000000000000000..7ec450f6537ee1739d80c1a1bf0c79b9c4be05ec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_type_and_service.xml @@ -0,0 +1,21 @@ + + + + + + + + Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + first + last + + a + a + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows.xml new file mode 100644 index 0000000000000000000000000000000000000000..509bdd38fcc3073977158bdc00b779a85c6178e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows.xml @@ -0,0 +1,94 @@ + + + + + + + + a + a + + Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + draft + wait_for_journalist + approved_by_journalist + wait_for_spellchecker + approved_by_spellchecker + published + + draft + wait_for_journalist + wait_for_spellchecker + + + wait_for_journalist + approved_by_journalist + + + wait_for_spellcheker + approved_by_spellchker + + + approved_by_journalist + approved_by_spellchker + published + + + + + + Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + start + coding + travis + review + merged + closed + + start + travis + + + coding + travis + review + travis + + + travis + review + + + review + coding + + + review + merged + + + review + closed + + + closed + review + + + + + + Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + first + last + + first + last + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets.yml new file mode 100644 index 0000000000000000000000000000000000000000..73cd9234e70601d8f6f7edc6701d7d097481f2fc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets.yml @@ -0,0 +1,19 @@ +framework: + assets: + version: SomeVersionScheme + version_format: '%%s?version=%%s' + base_urls: http://cdn.example.com + packages: + images_path: + base_path: '/foo' + images: + version: 1.0.0 + base_urls: ["http://images1.example.com", "http://images2.example.com"] + foo: + version: 1.0.0 + version_format: '%%s-%%s' + bar: + base_urls: ["https://bar2.example.com"] + bar_version_strategy: + base_urls: ["https://bar_version_strategy.example.com"] + version_strategy: assets.custom_version_strategy diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets_version_strategy_as_service.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets_version_strategy_as_service.yml new file mode 100644 index 0000000000000000000000000000000000000000..2528462f83cb5442599606a8305be318ba6aa8a2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets_version_strategy_as_service.yml @@ -0,0 +1,4 @@ +framework: + assets: + version_strategy: assets.custom_version_strategy + base_urls: http://cdn.example.com diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache.yml new file mode 100644 index 0000000000000000000000000000000000000000..514e782e6e1481a9965f14fe7eedf4216a13124c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache.yml @@ -0,0 +1,19 @@ +framework: + cache: + pools: + cache.foo: + adapter: cache.adapter.apcu + default_lifetime: 30 + cache.bar: + adapter: cache.adapter.doctrine + default_lifetime: 5 + provider: app.doctrine_cache_provider + cache.baz: + adapter: cache.adapter.filesystem + default_lifetime: 7 + cache.foobar: + adapter: cache.adapter.psr6 + default_lifetime: 10 + provider: app.cache_pool + cache.def: + default_lifetime: 11 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache_env_var.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache_env_var.yml new file mode 100644 index 0000000000000000000000000000000000000000..1d9ce5f7f02f75eae02b3274dc8056b2a9804ee0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache_env_var.yml @@ -0,0 +1,6 @@ +parameters: + env(REDIS_URL): redis://paas.com + +framework: + cache: + default_redis_provider: "%env(REDIS_URL)%" diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/csrf.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/csrf.yml new file mode 100644 index 0000000000000000000000000000000000000000..dbdd4951946fa7ff38e42be31a43c51a927b54e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/csrf.yml @@ -0,0 +1,5 @@ +framework: + secret: s3cr3t + csrf_protection: ~ + form: ~ + session: ~ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/csrf_needs_session.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/csrf_needs_session.yml new file mode 100644 index 0000000000000000000000000000000000000000..b8065b6fb678bff0c942e80023b70d3d5b45ebd4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/csrf_needs_session.yml @@ -0,0 +1,2 @@ +framework: + csrf_protection: ~ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/default_config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/default_config.yml new file mode 100644 index 0000000000000000000000000000000000000000..00874fbe8d11d79e0d81153ed072aa840d3c41ce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/default_config.yml @@ -0,0 +1 @@ +framework: ~ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/form_no_csrf.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/form_no_csrf.yml new file mode 100644 index 0000000000000000000000000000000000000000..e3ac7e8daf42d0222c134122507e7c4ce3240813 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/form_no_csrf.yml @@ -0,0 +1,4 @@ +framework: + form: + csrf_protection: + enabled: false diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml new file mode 100644 index 0000000000000000000000000000000000000000..237654880c9849f021244cde93f485efcbf991f1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml @@ -0,0 +1,60 @@ +framework: + secret: s3cr3t + default_locale: fr + csrf_protection: true + form: + csrf_protection: + field_name: _csrf + http_method_override: false + trusted_proxies: ['127.0.0.1', '10.0.0.1'] + esi: + enabled: true + profiler: + only_exceptions: true + enabled: false + router: + resource: '%kernel.root_dir%/config/routing.xml' + type: xml + session: + storage_id: session.storage.native + handler_id: session.handler.native_file + name: _SYMFONY + cookie_lifetime: 86400 + cookie_path: / + cookie_domain: example.com + cookie_secure: true + cookie_httponly: false + use_cookies: true + gc_probability: 1 + gc_divisor: 108 + gc_maxlifetime: 90000 + save_path: /path/to/sessions + templating: + engines: [php, twig] + loader: [loader.foo, loader.bar] + cache: /path/to/cache + form: + resources: [theme1, theme2] + hinclude_default_template: global_hinclude_template + assets: + version: v1 + translator: + enabled: true + fallback: fr + paths: ['%kernel.root_dir%/Fixtures/translations'] + validation: + enabled: true + annotations: + cache: file + debug: true + file_cache_dir: '%kernel.cache_dir%/annotations' + serializer: + enabled: true + enable_annotations: true + name_converter: serializer.name_converter.camel_case_to_snake_case + property_info: ~ + ide: file%%link%%format + request: + formats: + csv: ['text/csv', 'text/plain'] + pdf: 'application/pdf' diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/profiler.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/profiler.yml new file mode 100644 index 0000000000000000000000000000000000000000..9052a2bdfb0c8293f69d945c87e65d3d6adc331d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/profiler.yml @@ -0,0 +1,3 @@ +framework: + profiler: + enabled: true diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/property_accessor.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/property_accessor.yml new file mode 100644 index 0000000000000000000000000000000000000000..b5fd2718ab1129ec664df1b40214d9dfe9ab7ad5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/property_accessor.yml @@ -0,0 +1,4 @@ +framework: + property_access: + magic_call: true + throw_exception_on_invalid_index: true diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/property_info.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/property_info.yml new file mode 100644 index 0000000000000000000000000000000000000000..fbdf7a7b0d715dfcd44c516e219f34efdb441172 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/property_info.yml @@ -0,0 +1,3 @@ +framework: + property_info: + enabled: true diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/request.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/request.yml new file mode 100644 index 0000000000000000000000000000000000000000..9beae1dc59755d8dbd6bacb654e3793812219d22 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/request.yml @@ -0,0 +1,3 @@ +framework: + request: + formats: ~ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_disabled.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_disabled.yml new file mode 100644 index 0000000000000000000000000000000000000000..330e19a6976e797292db7fff760a03ce59ffc167 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_disabled.yml @@ -0,0 +1,3 @@ +framework: + serializer: + enabled: false diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_enabled.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_enabled.yml new file mode 100644 index 0000000000000000000000000000000000000000..40a1ff7d65b3b8530b97d37b8dae4123786c18c7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_enabled.yml @@ -0,0 +1,3 @@ +framework: + serializer: + enabled: true diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_legacy_cache.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_legacy_cache.yml new file mode 100644 index 0000000000000000000000000000000000000000..5fadc886ab1bc06442c021be4d63a3984af45a89 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_legacy_cache.yml @@ -0,0 +1,4 @@ +framework: + serializer: + enabled: true + cache: foo diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/session.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/session.yml new file mode 100644 index 0000000000000000000000000000000000000000..d91b0c3147dfdaf7dfe16a91a30359c21ef50307 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/session.yml @@ -0,0 +1,3 @@ +framework: + session: + handler_id: null diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/templating_disabled.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/templating_disabled.yml new file mode 100644 index 0000000000000000000000000000000000000000..1e548b859473cdad66f850ba5ed1a6cd92cbd7ec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/templating_disabled.yml @@ -0,0 +1,2 @@ +framework: + templating: false diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/templating_no_assets.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/templating_no_assets.yml new file mode 100644 index 0000000000000000000000000000000000000000..393477aeb49acd0f593e844982e5dfd17e57006e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/templating_no_assets.yml @@ -0,0 +1,3 @@ +framework: + templating: + engines: [php, twig] diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/templating_php_assets_disabled.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/templating_php_assets_disabled.yml new file mode 100644 index 0000000000000000000000000000000000000000..7ef6b3e57c292e9259006e323a532aac8f093bb5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/templating_php_assets_disabled.yml @@ -0,0 +1,4 @@ +framework: + assets: false + templating: + engines: [php] diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/translator_fallbacks.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/translator_fallbacks.yml new file mode 100644 index 0000000000000000000000000000000000000000..271d7811847557af781acbf38ed1d73189d64ee9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/translator_fallbacks.yml @@ -0,0 +1,3 @@ +framework: + translator: + fallbacks: [en, fr] diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/validation_annotations.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/validation_annotations.yml new file mode 100644 index 0000000000000000000000000000000000000000..41f17969b83ca75643cd861d7b823d2ad3cb2a33 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/validation_annotations.yml @@ -0,0 +1,5 @@ +framework: + secret: s3cr3t + validation: + enabled: true + enable_annotations: true diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/validation_multiple_static_methods.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/validation_multiple_static_methods.yml new file mode 100644 index 0000000000000000000000000000000000000000..6ca343351328a8eadfd8ffc22f24c70d855f1927 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/validation_multiple_static_methods.yml @@ -0,0 +1,5 @@ +framework: + secret: s3cr3t + validation: + enabled: true + static_method: [loadFoo, loadBar] diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/validation_no_static_method.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/validation_no_static_method.yml new file mode 100644 index 0000000000000000000000000000000000000000..ca5214964259e8f10d6f37a9e3d140156b52e94b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/validation_no_static_method.yml @@ -0,0 +1,5 @@ +framework: + secret: s3cr3t + validation: + enabled: true + static_method: false diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_arguments_and_service.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_arguments_and_service.yml new file mode 100644 index 0000000000000000000000000000000000000000..a46d4b67e6b24c5cd7d2950e9849ae8d0ada8832 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_arguments_and_service.yml @@ -0,0 +1,19 @@ +framework: + workflows: + my_workflow: + marking_store: + arguments: + - a + - b + service: workflow_service + supports: + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + places: + - first + - last + transitions: + go: + from: + - first + to: + - last diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_multiple_transitions_with_same_name.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_multiple_transitions_with_same_name.yml new file mode 100644 index 0000000000000000000000000000000000000000..36d00de46501ce8a398ca54bbd7e732352148980 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_multiple_transitions_with_same_name.yml @@ -0,0 +1,33 @@ +framework: + workflows: + article: + type: workflow + marking_store: + type: multiple_state + supports: + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + initial_place: draft + places: + - draft + - wait_for_journalist + - approved_by_journalist + - wait_for_spellchecker + - approved_by_spellchecker + - published + transitions: + request_review: + from: [draft] + to: [wait_for_journalist, wait_for_spellchecker] + journalist_approval: + from: [wait_for_journalist] + to: [approved_by_journalist] + spellchecker_approval: + from: [wait_for_spellchecker] + to: [approved_by_spellchecker] + publish: + from: [approved_by_journalist, approved_by_spellchecker] + to: [published] + publish_editor_in_chief: + name: publish + from: [draft] + to: [published] diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_type_and_service.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_type_and_service.yml new file mode 100644 index 0000000000000000000000000000000000000000..000ba10dfb8d254890146790363a6db16822b820 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_type_and_service.yml @@ -0,0 +1,17 @@ +framework: + workflows: + my_workflow: + marking_store: + type: multiple_state + service: workflow_service + supports: + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + places: + - first + - last + transitions: + go: + from: + - first + to: + - last diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows.yml new file mode 100644 index 0000000000000000000000000000000000000000..00cd4b55a897f49231e5070b3fac07ae76137ac6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows.yml @@ -0,0 +1,79 @@ +framework: + workflows: + article: + type: workflow + marking_store: + type: multiple_state + supports: + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + initial_place: draft + places: + - draft + - wait_for_journalist + - approved_by_journalist + - wait_for_spellchecker + - approved_by_spellchecker + - published + transitions: + request_review: + from: [draft] + to: [wait_for_journalist, wait_for_spellchecker] + journalist_approval: + from: [wait_for_journalist] + to: [approved_by_journalist] + spellchecker_approval: + from: [wait_for_spellchecker] + to: [approved_by_spellchecker] + publish: + from: [approved_by_journalist, approved_by_spellchecker] + to: [published] + pull_request: + type: state_machine + marking_store: + type: single_state + supports: + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + initial_place: start + places: + - start + - coding + - travis + - review + - merged + - closed + transitions: + submit: + from: start + to: travis + update: + from: [coding, travis, review] + to: travis + wait_for_review: + from: travis + to: review + request_change: + from: review + to: coding + accept: + from: review + to: merged + reject: + from: review + to: closed + reopen: + from: closed + to: review + service_marking_store_workflow: + marking_store: + service: workflow_service + supports: + - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest + places: + - first + - last + transitions: + go: + from: + - first + to: + - last diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7adf4035ecbc7910e14b10462168d9fb528ee6af --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -0,0 +1,942 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection; + +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddAnnotationsCachedReaderPass; +use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension; +use Symfony\Component\Cache\Adapter\AdapterInterface; +use Symfony\Component\Cache\Adapter\ApcuAdapter; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\Cache\Adapter\ChainAdapter; +use Symfony\Component\Cache\Adapter\DoctrineAdapter; +use Symfony\Component\Cache\Adapter\FilesystemAdapter; +use Symfony\Component\Cache\Adapter\ProxyAdapter; +use Symfony\Component\Cache\Adapter\RedisAdapter; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Loader\ClosureLoader; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\PropertyAccess\PropertyAccessor; +use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; +use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader; +use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader; +use Symfony\Component\Serializer\Normalizer\DataUriNormalizer; +use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; +use Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer; + +abstract class FrameworkExtensionTest extends TestCase +{ + private static $containerCache = array(); + + abstract protected function loadFromFile(ContainerBuilder $container, $file); + + public function testFormCsrfProtection() + { + $container = $this->createContainerFromFile('full'); + + $def = $container->getDefinition('form.type_extension.csrf'); + + $this->assertTrue($container->getParameter('form.type_extension.csrf.enabled')); + $this->assertEquals('%form.type_extension.csrf.enabled%', $def->getArgument(1)); + $this->assertEquals('_csrf', $container->getParameter('form.type_extension.csrf.field_name')); + $this->assertEquals('%form.type_extension.csrf.field_name%', $def->getArgument(2)); + } + + public function testPropertyAccessWithDefaultValue() + { + $container = $this->createContainerFromFile('full'); + + $def = $container->getDefinition('property_accessor'); + $this->assertFalse($def->getArgument(0)); + $this->assertFalse($def->getArgument(1)); + } + + public function testPropertyAccessWithOverriddenValues() + { + $container = $this->createContainerFromFile('property_accessor'); + $def = $container->getDefinition('property_accessor'); + $this->assertTrue($def->getArgument(0)); + $this->assertTrue($def->getArgument(1)); + } + + public function testPropertyAccessCache() + { + $container = $this->createContainerFromFile('property_accessor'); + + if (!method_exists(PropertyAccessor::class, 'createCache')) { + return $this->assertFalse($container->hasDefinition('cache.property_access')); + } + + $cache = $container->getDefinition('cache.property_access'); + $this->assertSame(array(PropertyAccessor::class, 'createCache'), $cache->getFactory(), 'PropertyAccessor::createCache() should be used in non-debug mode'); + $this->assertSame(AdapterInterface::class, $cache->getClass()); + } + + public function testPropertyAccessCacheWithDebug() + { + $container = $this->createContainerFromFile('property_accessor', array('kernel.debug' => true)); + + if (!method_exists(PropertyAccessor::class, 'createCache')) { + return $this->assertFalse($container->hasDefinition('cache.property_access')); + } + + $cache = $container->getDefinition('cache.property_access'); + $this->assertNull($cache->getFactory()); + $this->assertSame(ArrayAdapter::class, $cache->getClass(), 'ArrayAdapter should be used in debug mode'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage CSRF protection needs sessions to be enabled. + */ + public function testCsrfProtectionNeedsSessionToBeEnabled() + { + $this->createContainerFromFile('csrf_needs_session'); + } + + public function testCsrfProtectionForFormsEnablesCsrfProtectionAutomatically() + { + $container = $this->createContainerFromFile('csrf'); + + $this->assertTrue($container->hasDefinition('security.csrf.token_manager')); + } + + public function testProxies() + { + $container = $this->createContainerFromFile('full'); + + $this->assertEquals(array('127.0.0.1', '10.0.0.1'), $container->getParameter('kernel.trusted_proxies')); + } + + public function testHttpMethodOverride() + { + $container = $this->createContainerFromFile('full'); + + $this->assertFalse($container->getParameter('kernel.http_method_override')); + } + + public function testEsi() + { + $container = $this->createContainerFromFile('full'); + + $this->assertTrue($container->hasDefinition('esi'), '->registerEsiConfiguration() loads esi.xml'); + } + + public function testEnabledProfiler() + { + $container = $this->createContainerFromFile('profiler'); + + $this->assertTrue($container->hasDefinition('profiler'), '->registerProfilerConfiguration() loads profiling.xml'); + $this->assertTrue($container->hasDefinition('data_collector.config'), '->registerProfilerConfiguration() loads collectors.xml'); + } + + public function testDisabledProfiler() + { + $container = $this->createContainerFromFile('full'); + + $this->assertFalse($container->hasDefinition('profiler'), '->registerProfilerConfiguration() does not load profiling.xml'); + $this->assertFalse($container->hasDefinition('data_collector.config'), '->registerProfilerConfiguration() does not load collectors.xml'); + } + + public function testWorkflows() + { + $container = $this->createContainerFromFile('workflows'); + + $this->assertTrue($container->hasDefinition('workflow.article', 'Workflow is registered as a service')); + $this->assertTrue($container->hasDefinition('workflow.article.definition', 'Workflow definition is registered as a service')); + + $workflowDefinition = $container->getDefinition('workflow.article.definition'); + + $this->assertSame( + array( + 'draft', + 'wait_for_journalist', + 'approved_by_journalist', + 'wait_for_spellchecker', + 'approved_by_spellchecker', + 'published', + ), + $workflowDefinition->getArgument(0), + 'Places are passed to the workflow definition' + ); + $this->assertSame(array('workflow.definition' => array(array('name' => 'article', 'type' => 'workflow', 'marking_store' => 'multiple_state'))), $workflowDefinition->getTags()); + + $this->assertTrue($container->hasDefinition('state_machine.pull_request', 'State machine is registered as a service')); + $this->assertTrue($container->hasDefinition('state_machine.pull_request.definition', 'State machine definition is registered as a service')); + $this->assertCount(4, $workflowDefinition->getArgument(1)); + $this->assertSame('draft', $workflowDefinition->getArgument(2)); + + $stateMachineDefinition = $container->getDefinition('state_machine.pull_request.definition'); + + $this->assertSame( + array( + 'start', + 'coding', + 'travis', + 'review', + 'merged', + 'closed', + ), + $stateMachineDefinition->getArgument(0), + 'Places are passed to the state machine definition' + ); + $this->assertSame(array('workflow.definition' => array(array('name' => 'pull_request', 'type' => 'state_machine', 'marking_store' => 'single_state'))), $stateMachineDefinition->getTags()); + $this->assertCount(9, $stateMachineDefinition->getArgument(1)); + $this->assertSame('start', $stateMachineDefinition->getArgument(2)); + + $serviceMarkingStoreWorkflowDefinition = $container->getDefinition('workflow.service_marking_store_workflow'); + /** @var Reference $markingStoreRef */ + $markingStoreRef = $serviceMarkingStoreWorkflowDefinition->getArgument(1); + $this->assertInstanceOf(Reference::class, $markingStoreRef); + $this->assertEquals('workflow_service', (string) $markingStoreRef); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage "type" and "service" cannot be used together. + */ + public function testWorkflowCannotHaveBothTypeAndService() + { + $this->createContainerFromFile('workflow_with_type_and_service'); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage "arguments" and "service" cannot be used together. + */ + public function testWorkflowCannotHaveBothArgumentsAndService() + { + $this->createContainerFromFile('workflow_with_arguments_and_service'); + } + + public function testWorkflowMultipleTransitionsWithSameName() + { + $container = $this->createContainerFromFile('workflow_with_multiple_transitions_with_same_name'); + + $this->assertTrue($container->hasDefinition('workflow.article', 'Workflow is registered as a service')); + $this->assertTrue($container->hasDefinition('workflow.article.definition', 'Workflow definition is registered as a service')); + + $workflowDefinition = $container->getDefinition('workflow.article.definition'); + + $transitions = $workflowDefinition->getArgument(1); + + $this->assertCount(5, $transitions); + + $this->assertSame('request_review', $transitions[0]->getArgument(0)); + $this->assertSame('journalist_approval', $transitions[1]->getArgument(0)); + $this->assertSame('spellchecker_approval', $transitions[2]->getArgument(0)); + $this->assertSame('publish', $transitions[3]->getArgument(0)); + $this->assertSame('publish', $transitions[4]->getArgument(0)); + + $this->assertSame(array('approved_by_journalist', 'approved_by_spellchecker'), $transitions[3]->getArgument(1)); + $this->assertSame(array('draft'), $transitions[4]->getArgument(1)); + } + + public function testRouter() + { + $container = $this->createContainerFromFile('full'); + + $this->assertTrue($container->has('router'), '->registerRouterConfiguration() loads routing.xml'); + $arguments = $container->findDefinition('router')->getArguments(); + $this->assertEquals($container->getParameter('kernel.root_dir').'/config/routing.xml', $container->getParameter('router.resource'), '->registerRouterConfiguration() sets routing resource'); + $this->assertEquals('%router.resource%', $arguments[1], '->registerRouterConfiguration() sets routing resource'); + $this->assertEquals('xml', $arguments[2]['resource_type'], '->registerRouterConfiguration() sets routing resource type'); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + */ + public function testRouterRequiresResourceOption() + { + $container = $this->createContainer(); + $loader = new FrameworkExtension(); + $loader->load(array(array('router' => true)), $container); + } + + public function testSession() + { + $container = $this->createContainerFromFile('full'); + + $this->assertTrue($container->hasDefinition('session'), '->registerSessionConfiguration() loads session.xml'); + $this->assertEquals('fr', $container->getParameter('kernel.default_locale')); + $this->assertEquals('session.storage.native', (string) $container->getAlias('session.storage')); + $this->assertEquals('session.handler.native_file', (string) $container->getAlias('session.handler')); + + $options = $container->getParameter('session.storage.options'); + $this->assertEquals('_SYMFONY', $options['name']); + $this->assertEquals(86400, $options['cookie_lifetime']); + $this->assertEquals('/', $options['cookie_path']); + $this->assertEquals('example.com', $options['cookie_domain']); + $this->assertTrue($options['cookie_secure']); + $this->assertFalse($options['cookie_httponly']); + $this->assertTrue($options['use_cookies']); + $this->assertEquals(108, $options['gc_divisor']); + $this->assertEquals(1, $options['gc_probability']); + $this->assertEquals(90000, $options['gc_maxlifetime']); + + $this->assertEquals('/path/to/sessions', $container->getParameter('session.save_path')); + } + + public function testNullSessionHandler() + { + $container = $this->createContainerFromFile('session'); + + $this->assertTrue($container->hasDefinition('session'), '->registerSessionConfiguration() loads session.xml'); + $this->assertNull($container->getDefinition('session.storage.native')->getArgument(1)); + $this->assertNull($container->getDefinition('session.storage.php_bridge')->getArgument(0)); + } + + public function testRequest() + { + $container = $this->createContainerFromFile('full'); + + $this->assertTrue($container->hasDefinition('request.add_request_formats_listener'), '->registerRequestConfiguration() loads request.xml'); + $listenerDef = $container->getDefinition('request.add_request_formats_listener'); + $this->assertEquals(array('csv' => array('text/csv', 'text/plain'), 'pdf' => array('application/pdf')), $listenerDef->getArgument(0)); + } + + public function testEmptyRequestFormats() + { + $container = $this->createContainerFromFile('request'); + + $this->assertFalse($container->hasDefinition('request.add_request_formats_listener'), '->registerRequestConfiguration() does not load request.xml when no request formats are defined'); + } + + public function testTemplating() + { + $container = $this->createContainerFromFile('full'); + + $this->assertTrue($container->hasDefinition('templating.name_parser'), '->registerTemplatingConfiguration() loads templating.xml'); + + $this->assertEquals('templating.engine.delegating', (string) $container->getAlias('templating'), '->registerTemplatingConfiguration() configures delegating loader if multiple engines are provided'); + + $this->assertEquals($container->getDefinition('templating.loader.chain'), $container->getDefinition('templating.loader.wrapped'), '->registerTemplatingConfiguration() configures loader chain if multiple loaders are provided'); + + $this->assertEquals($container->getDefinition('templating.loader'), $container->getDefinition('templating.loader.cache'), '->registerTemplatingConfiguration() configures the loader to use cache'); + + $this->assertEquals('%templating.loader.cache.path%', $container->getDefinition('templating.loader.cache')->getArgument(1)); + $this->assertEquals('/path/to/cache', $container->getParameter('templating.loader.cache.path')); + + $this->assertEquals(array('php', 'twig'), $container->getParameter('templating.engines'), '->registerTemplatingConfiguration() sets a templating.engines parameter'); + + $this->assertEquals(array('FrameworkBundle:Form', 'theme1', 'theme2'), $container->getParameter('templating.helper.form.resources'), '->registerTemplatingConfiguration() registers the theme and adds the base theme'); + $this->assertEquals('global_hinclude_template', $container->getParameter('fragment.renderer.hinclude.global_template'), '->registerTemplatingConfiguration() registers the global hinclude.js template'); + } + + public function testTemplatingCanBeDisabled() + { + $container = $this->createContainerFromFile('templating_disabled'); + + $this->assertFalse($container->hasParameter('templating.engines'), '"templating.engines" container parameter is not registered when templating is disabled.'); + } + + public function testAssets() + { + $container = $this->createContainerFromFile('assets'); + $packages = $container->getDefinition('assets.packages'); + + // default package + $defaultPackage = $container->getDefinition((string) $packages->getArgument(0)); + $this->assertUrlPackage($container, $defaultPackage, array('http://cdn.example.com'), 'SomeVersionScheme', '%%s?version=%%s'); + + // packages + $packages = $packages->getArgument(1); + $this->assertCount(5, $packages); + + $package = $container->getDefinition((string) $packages['images_path']); + $this->assertPathPackage($container, $package, '/foo', 'SomeVersionScheme', '%%s?version=%%s'); + + $package = $container->getDefinition((string) $packages['images']); + $this->assertUrlPackage($container, $package, array('http://images1.example.com', 'http://images2.example.com'), '1.0.0', '%%s?version=%%s'); + + $package = $container->getDefinition((string) $packages['foo']); + $this->assertPathPackage($container, $package, '', '1.0.0', '%%s-%%s'); + + $package = $container->getDefinition((string) $packages['bar']); + $this->assertUrlPackage($container, $package, array('https://bar2.example.com'), 'SomeVersionScheme', '%%s?version=%%s'); + + $package = $container->getDefinition((string) $packages['bar_version_strategy']); + $this->assertEquals('assets.custom_version_strategy', (string) $package->getArgument(1)); + } + + public function testAssetsDefaultVersionStrategyAsService() + { + $container = $this->createContainerFromFile('assets_version_strategy_as_service'); + $packages = $container->getDefinition('assets.packages'); + + // default package + $defaultPackage = $container->getDefinition((string) $packages->getArgument(0)); + $this->assertEquals('assets.custom_version_strategy', (string) $defaultPackage->getArgument(1)); + } + + public function testTranslator() + { + $container = $this->createContainerFromFile('full'); + $this->assertTrue($container->hasDefinition('translator.default'), '->registerTranslatorConfiguration() loads translation.xml'); + $this->assertEquals('translator.default', (string) $container->getAlias('translator'), '->registerTranslatorConfiguration() redefines translator service from identity to real translator'); + $options = $container->getDefinition('translator.default')->getArgument(3); + + $files = array_map(function ($resource) { return realpath($resource); }, $options['resource_files']['en']); + $ref = new \ReflectionClass('Symfony\Component\Validator\Validation'); + $this->assertContains( + strtr(dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR), + $files, + '->registerTranslatorConfiguration() finds Validator translation resources' + ); + $ref = new \ReflectionClass('Symfony\Component\Form\Form'); + $this->assertContains( + strtr(dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR), + $files, + '->registerTranslatorConfiguration() finds Form translation resources' + ); + $ref = new \ReflectionClass('Symfony\Component\Security\Core\Security'); + $this->assertContains( + strtr(dirname($ref->getFileName()).'/Resources/translations/security.en.xlf', '/', DIRECTORY_SEPARATOR), + $files, + '->registerTranslatorConfiguration() finds Security translation resources' + ); + $this->assertContains( + strtr(__DIR__.'/Fixtures/translations/test_paths.en.yml', '/', DIRECTORY_SEPARATOR), + $files, + '->registerTranslatorConfiguration() finds translation resources in custom paths' + ); + + $calls = $container->getDefinition('translator.default')->getMethodCalls(); + $this->assertEquals(array('fr'), $calls[1][1][0]); + } + + public function testTranslatorMultipleFallbacks() + { + $container = $this->createContainerFromFile('translator_fallbacks'); + + $calls = $container->getDefinition('translator.default')->getMethodCalls(); + $this->assertEquals(array('en', 'fr'), $calls[1][1][0]); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + */ + public function testTemplatingRequiresAtLeastOneEngine() + { + $container = $this->createContainer(); + $loader = new FrameworkExtension(); + $loader->load(array(array('templating' => null)), $container); + } + + public function testValidation() + { + $container = $this->createContainerFromFile('full'); + + $ref = new \ReflectionClass('Symfony\Component\Form\Form'); + $xmlMappings = array(dirname($ref->getFileName()).'/Resources/config/validation.xml'); + + $calls = $container->getDefinition('validator.builder')->getMethodCalls(); + + $this->assertCount(6, $calls); + $this->assertSame('setConstraintValidatorFactory', $calls[0][0]); + $this->assertEquals(array(new Reference('validator.validator_factory')), $calls[0][1]); + $this->assertSame('setTranslator', $calls[1][0]); + $this->assertEquals(array(new Reference('translator')), $calls[1][1]); + $this->assertSame('setTranslationDomain', $calls[2][0]); + $this->assertSame(array('%validator.translation_domain%'), $calls[2][1]); + $this->assertSame('addXmlMappings', $calls[3][0]); + $this->assertSame(array($xmlMappings), $calls[3][1]); + $this->assertSame('addMethodMapping', $calls[4][0]); + $this->assertSame(array('loadValidatorMetadata'), $calls[4][1]); + $this->assertSame('setMetadataCache', $calls[5][0]); + $this->assertEquals(array(new Reference('validator.mapping.cache.symfony')), $calls[5][1]); + } + + public function testValidationService() + { + $container = $this->createContainerFromFile('validation_annotations', array('kernel.charset' => 'UTF-8'), false); + + $this->assertInstanceOf('Symfony\Component\Validator\Validator\ValidatorInterface', $container->get('validator')); + } + + public function testAnnotations() + { + $container = $this->createContainerFromFile('full'); + + $this->assertEquals($container->getParameter('kernel.cache_dir').'/annotations', $container->getDefinition('annotations.filesystem_cache')->getArgument(0)); + $this->assertSame('annotations.filesystem_cache', (string) $container->getDefinition('annotations.cached_reader')->getArgument(1)); + } + + public function testFileLinkFormat() + { + if (ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) { + $this->markTestSkipped('A custom file_link_format is defined.'); + } + + $container = $this->createContainerFromFile('full'); + + $this->assertEquals('file%link%format', $container->getParameter('debug.file_link_format')); + } + + public function testValidationAnnotations() + { + $container = $this->createContainerFromFile('validation_annotations'); + + $calls = $container->getDefinition('validator.builder')->getMethodCalls(); + + $this->assertCount(7, $calls); + $this->assertSame('enableAnnotationMapping', $calls[4][0]); + $this->assertEquals(array(new Reference('annotation_reader')), $calls[4][1]); + $this->assertSame('addMethodMapping', $calls[5][0]); + $this->assertSame(array('loadValidatorMetadata'), $calls[5][1]); + $this->assertSame('setMetadataCache', $calls[6][0]); + $this->assertEquals(array(new Reference('validator.mapping.cache.symfony')), $calls[6][1]); + // no cache this time + } + + public function testValidationPaths() + { + require_once __DIR__.'/Fixtures/TestBundle/TestBundle.php'; + + $container = $this->createContainerFromFile('validation_annotations', array( + 'kernel.bundles' => array('TestBundle' => 'Symfony\\Bundle\\FrameworkBundle\\Tests\\TestBundle'), + 'kernel.bundles_metadata' => array('TestBundle' => array('namespace' => 'Symfony\\Bundle\\FrameworkBundle\\Tests', 'parent' => null, 'path' => __DIR__.'/Fixtures/TestBundle')), + )); + + $calls = $container->getDefinition('validator.builder')->getMethodCalls(); + + $this->assertCount(8, $calls); + $this->assertSame('addXmlMappings', $calls[3][0]); + $this->assertSame('addYamlMappings', $calls[4][0]); + $this->assertSame('enableAnnotationMapping', $calls[5][0]); + $this->assertSame('addMethodMapping', $calls[6][0]); + $this->assertSame(array('loadValidatorMetadata'), $calls[6][1]); + $this->assertSame('setMetadataCache', $calls[7][0]); + $this->assertEquals(array(new Reference('validator.mapping.cache.symfony')), $calls[7][1]); + + $xmlMappings = $calls[3][1][0]; + $this->assertCount(2, $xmlMappings); + try { + // Testing symfony/symfony + $this->assertStringEndsWith('Component'.DIRECTORY_SEPARATOR.'Form/Resources/config/validation.xml', $xmlMappings[0]); + } catch (\Exception $e) { + // Testing symfony/framework-bundle with deps=high + $this->assertStringEndsWith('symfony'.DIRECTORY_SEPARATOR.'form/Resources/config/validation.xml', $xmlMappings[0]); + } + $this->assertStringEndsWith('TestBundle/Resources/config/validation.xml', $xmlMappings[1]); + + $yamlMappings = $calls[4][1][0]; + $this->assertCount(1, $yamlMappings); + $this->assertStringEndsWith('TestBundle/Resources/config/validation.yml', $yamlMappings[0]); + } + + public function testValidationPathsUsingCustomBundlePath() + { + require_once __DIR__.'/Fixtures/CustomPathBundle/src/CustomPathBundle.php'; + + $container = $this->createContainerFromFile('validation_annotations', array( + 'kernel.bundles' => array('CustomPathBundle' => 'Symfony\\Bundle\\FrameworkBundle\\Tests\\CustomPathBundle'), + 'kernel.bundles_metadata' => array('TestBundle' => array('namespace' => 'Symfony\\Bundle\\FrameworkBundle\\Tests', 'parent' => null, 'path' => __DIR__.'/Fixtures/CustomPathBundle')), + )); + + $calls = $container->getDefinition('validator.builder')->getMethodCalls(); + $xmlMappings = $calls[3][1][0]; + $this->assertCount(2, $xmlMappings); + + try { + // Testing symfony/symfony + $this->assertStringEndsWith('Component'.DIRECTORY_SEPARATOR.'Form/Resources/config/validation.xml', $xmlMappings[0]); + } catch (\Exception $e) { + // Testing symfony/framework-bundle with deps=high + $this->assertStringEndsWith('symfony'.DIRECTORY_SEPARATOR.'form/Resources/config/validation.xml', $xmlMappings[0]); + } + $this->assertStringEndsWith('CustomPathBundle/Resources/config/validation.xml', $xmlMappings[1]); + + $yamlMappings = $calls[4][1][0]; + $this->assertCount(1, $yamlMappings); + $this->assertStringEndsWith('CustomPathBundle/Resources/config/validation.yml', $yamlMappings[0]); + } + + public function testValidationNoStaticMethod() + { + $container = $this->createContainerFromFile('validation_no_static_method'); + + $calls = $container->getDefinition('validator.builder')->getMethodCalls(); + + $this->assertCount(5, $calls); + $this->assertSame('addXmlMappings', $calls[3][0]); + $this->assertSame('setMetadataCache', $calls[4][0]); + $this->assertEquals(array(new Reference('validator.mapping.cache.symfony')), $calls[4][1]); + // no cache, no annotations, no static methods + } + + public function testFormsCanBeEnabledWithoutCsrfProtection() + { + $container = $this->createContainerFromFile('form_no_csrf'); + + $this->assertFalse($container->getParameter('form.type_extension.csrf.enabled')); + } + + public function testStopwatchEnabledWithDebugModeEnabled() + { + $container = $this->createContainerFromFile('default_config', array( + 'kernel.container_class' => 'foo', + 'kernel.debug' => true, + )); + + $this->assertTrue($container->has('debug.stopwatch')); + } + + public function testStopwatchEnabledWithDebugModeDisabled() + { + $container = $this->createContainerFromFile('default_config', array( + 'kernel.container_class' => 'foo', + )); + + $this->assertTrue($container->has('debug.stopwatch')); + } + + public function testSerializerDisabled() + { + $container = $this->createContainerFromFile('default_config'); + $this->assertFalse($container->has('serializer')); + } + + public function testSerializerEnabled() + { + $container = $this->createContainerFromFile('full'); + $this->assertTrue($container->has('serializer')); + + $argument = $container->getDefinition('serializer.mapping.chain_loader')->getArgument(0); + + $this->assertCount(1, $argument); + $this->assertEquals('Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader', $argument[0]->getClass()); + $this->assertNull($container->getDefinition('serializer.mapping.class_metadata_factory')->getArgument(1)); + $this->assertEquals(new Reference('serializer.name_converter.camel_case_to_snake_case'), $container->getDefinition('serializer.normalizer.object')->getArgument(1)); + $this->assertEquals(new Reference('property_info', ContainerBuilder::IGNORE_ON_INVALID_REFERENCE), $container->getDefinition('serializer.normalizer.object')->getArgument(3)); + } + + public function testRegisterSerializerExtractor() + { + $container = $this->createContainerFromFile('full'); + + $serializerExtractorDefinition = $container->getDefinition('property_info.serializer_extractor'); + + $this->assertEquals('serializer.mapping.class_metadata_factory', $serializerExtractorDefinition->getArgument(0)->__toString()); + $this->assertFalse($serializerExtractorDefinition->isPublic()); + $tag = $serializerExtractorDefinition->getTag('property_info.list_extractor'); + $this->assertEquals(array('priority' => -999), $tag[0]); + } + + public function testDataUriNormalizerRegistered() + { + if (!class_exists('Symfony\Component\Serializer\Normalizer\DataUriNormalizer')) { + $this->markTestSkipped('The DataUriNormalizer has been introduced in the Serializer Component version 3.1.'); + } + + $container = $this->createContainerFromFile('full'); + + $definition = $container->getDefinition('serializer.normalizer.data_uri'); + $tag = $definition->getTag('serializer.normalizer'); + + $this->assertEquals(DataUriNormalizer::class, $definition->getClass()); + $this->assertEquals(-920, $tag[0]['priority']); + } + + public function testDateTimeNormalizerRegistered() + { + if (!class_exists('Symfony\Component\Serializer\Normalizer\DateTimeNormalizer')) { + $this->markTestSkipped('The DateTimeNormalizer has been introduced in the Serializer Component version 3.1.'); + } + + $container = $this->createContainerFromFile('full'); + + $definition = $container->getDefinition('serializer.normalizer.datetime'); + $tag = $definition->getTag('serializer.normalizer'); + + $this->assertEquals(DateTimeNormalizer::class, $definition->getClass()); + $this->assertEquals(-910, $tag[0]['priority']); + } + + public function testJsonSerializableNormalizerRegistered() + { + if (!class_exists('Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer')) { + $this->markTestSkipped('The JsonSerializableNormalizer has been introduced in the Serializer Component version 3.1.'); + } + + $container = $this->createContainerFromFile('full'); + + $definition = $container->getDefinition('serializer.normalizer.json_serializable'); + $tag = $definition->getTag('serializer.normalizer'); + + $this->assertEquals(JsonSerializableNormalizer::class, $definition->getClass()); + $this->assertEquals(-900, $tag[0]['priority']); + } + + public function testObjectNormalizerRegistered() + { + $container = $this->createContainerFromFile('full'); + + $definition = $container->getDefinition('serializer.normalizer.object'); + $tag = $definition->getTag('serializer.normalizer'); + + $this->assertEquals('Symfony\Component\Serializer\Normalizer\ObjectNormalizer', $definition->getClass()); + $this->assertEquals(-1000, $tag[0]['priority']); + } + + public function testSerializerCacheActivated() + { + if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) { + $this->markTestSkipped('The Serializer default cache warmer has been introduced in the Serializer Component version 3.2.'); + } + + $container = $this->createContainerFromFile('serializer_enabled'); + + $this->assertTrue($container->hasDefinition('serializer.mapping.cache_class_metadata_factory')); + + $cache = $container->getDefinition('serializer.mapping.cache_class_metadata_factory')->getArgument(1); + $this->assertEquals(new Reference('serializer.mapping.cache.symfony'), $cache); + } + + public function testSerializerCacheDisabled() + { + $container = $this->createContainerFromFile('serializer_enabled', array('kernel.debug' => true, 'kernel.container_class' => __CLASS__)); + $this->assertFalse($container->hasDefinition('serializer.mapping.cache_class_metadata_factory')); + } + + /** + * @group legacy + * @expectedDeprecation The "framework.serializer.cache" option is deprecated %s. + */ + public function testDeprecatedSerializerCacheOption() + { + $container = $this->createContainerFromFile('serializer_legacy_cache', array('kernel.debug' => true, 'kernel.container_class' => __CLASS__)); + + $this->assertFalse($container->hasDefinition('serializer.mapping.cache_class_metadata_factory')); + $this->assertTrue($container->hasDefinition('serializer.mapping.class_metadata_factory')); + + $cache = $container->getDefinition('serializer.mapping.class_metadata_factory')->getArgument(1); + $this->assertEquals(new Reference('foo'), $cache); + } + + public function testAssetHelperWhenAssetsAreEnabled() + { + $container = $this->createContainerFromFile('full'); + $packages = $container->getDefinition('templating.helper.assets')->getArgument(0); + + $this->assertSame('assets.packages', (string) $packages); + } + + public function testAssetHelperWhenTemplatesAreEnabledAndNoAssetsConfiguration() + { + $container = $this->createContainerFromFile('templating_no_assets'); + $packages = $container->getDefinition('templating.helper.assets')->getArgument(0); + + $this->assertSame('assets.packages', (string) $packages); + } + + public function testAssetsHelperIsRemovedWhenPhpTemplatingEngineIsEnabledAndAssetsAreDisabled() + { + $container = $this->createContainerFromFile('templating_php_assets_disabled'); + + $this->assertTrue(!$container->has('templating.helper.assets'), 'The templating.helper.assets helper service is removed when assets are disabled.'); + } + + public function testAssetHelperWhenAssetsAndTemplatesAreDisabled() + { + $container = $this->createContainerFromFile('default_config'); + + $this->assertFalse($container->hasDefinition('templating.helper.assets')); + } + + public function testSerializerServiceIsRegisteredWhenEnabled() + { + $container = $this->createContainerFromFile('serializer_enabled'); + + $this->assertTrue($container->hasDefinition('serializer')); + } + + public function testSerializerServiceIsNotRegisteredWhenDisabled() + { + $container = $this->createContainerFromFile('serializer_disabled'); + + $this->assertFalse($container->hasDefinition('serializer')); + } + + public function testPropertyInfoDisabled() + { + $container = $this->createContainerFromFile('default_config'); + $this->assertFalse($container->has('property_info')); + } + + public function testPropertyInfoEnabled() + { + $container = $this->createContainerFromFile('property_info'); + $this->assertTrue($container->has('property_info')); + } + + public function testCacheDefaultRedisProvider() + { + $container = $this->createContainerFromFile('cache'); + + $redisUrl = 'redis://localhost'; + $providerId = md5($redisUrl); + + $this->assertTrue($container->hasDefinition($providerId)); + + $url = $container->getDefinition($providerId)->getArgument(0); + + $this->assertSame($redisUrl, $url); + } + + public function testCacheDefaultRedisProviderWithEnvVar() + { + $container = $this->createContainerFromFile('cache_env_var'); + + $redisUrl = 'redis://paas.com'; + $providerId = md5($redisUrl); + + $this->assertTrue($container->hasDefinition($providerId)); + + $url = $container->getDefinition($providerId)->getArgument(0); + + $this->assertSame($redisUrl, $url); + } + + public function testCachePoolServices() + { + $container = $this->createContainerFromFile('cache'); + + $this->assertCachePoolServiceDefinitionIsCreated($container, 'cache.foo', 'cache.adapter.apcu', 30); + $this->assertCachePoolServiceDefinitionIsCreated($container, 'cache.bar', 'cache.adapter.doctrine', 5); + $this->assertCachePoolServiceDefinitionIsCreated($container, 'cache.baz', 'cache.adapter.filesystem', 7); + $this->assertCachePoolServiceDefinitionIsCreated($container, 'cache.foobar', 'cache.adapter.psr6', 10); + $this->assertCachePoolServiceDefinitionIsCreated($container, 'cache.def', 'cache.app', 11); + } + + protected function createContainer(array $data = array()) + { + return new ContainerBuilder(new ParameterBag(array_merge(array( + 'kernel.bundles' => array('FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle'), + 'kernel.bundles_metadata' => array('FrameworkBundle' => array('namespace' => 'Symfony\\Bundle\\FrameworkBundle', 'path' => __DIR__.'/../..', 'parent' => null)), + 'kernel.cache_dir' => __DIR__, + 'kernel.debug' => false, + 'kernel.environment' => 'test', + 'kernel.name' => 'kernel', + 'kernel.root_dir' => __DIR__, + 'kernel.container_class' => 'testContainer', + ), $data))); + } + + protected function createContainerFromFile($file, $data = array(), $resetCompilerPasses = true) + { + $cacheKey = md5(get_class($this).$file.serialize($data)); + if (isset(self::$containerCache[$cacheKey])) { + return self::$containerCache[$cacheKey]; + } + $container = $this->createContainer($data); + $container->registerExtension(new FrameworkExtension()); + $this->loadFromFile($container, $file); + + if ($resetCompilerPasses) { + $container->getCompilerPassConfig()->setOptimizationPasses(array()); + $container->getCompilerPassConfig()->setRemovingPasses(array()); + } + $container->getCompilerPassConfig()->setBeforeRemovingPasses(array(new AddAnnotationsCachedReaderPass())); + $container->compile(); + + return self::$containerCache[$cacheKey] = $container; + } + + protected function createContainerFromClosure($closure, $data = array()) + { + $container = $this->createContainer($data); + $container->registerExtension(new FrameworkExtension()); + $loader = new ClosureLoader($container); + $loader->load($closure); + + $container->getCompilerPassConfig()->setOptimizationPasses(array()); + $container->getCompilerPassConfig()->setRemovingPasses(array()); + $container->compile(); + + return $container; + } + + private function assertPathPackage(ContainerBuilder $container, DefinitionDecorator $package, $basePath, $version, $format) + { + $this->assertEquals('assets.path_package', $package->getParent()); + $this->assertEquals($basePath, $package->getArgument(0)); + $this->assertVersionStrategy($container, $package->getArgument(1), $version, $format); + } + + private function assertUrlPackage(ContainerBuilder $container, DefinitionDecorator $package, $baseUrls, $version, $format) + { + $this->assertEquals('assets.url_package', $package->getParent()); + $this->assertEquals($baseUrls, $package->getArgument(0)); + $this->assertVersionStrategy($container, $package->getArgument(1), $version, $format); + } + + private function assertVersionStrategy(ContainerBuilder $container, Reference $reference, $version, $format) + { + $versionStrategy = $container->getDefinition((string) $reference); + if (null === $version) { + $this->assertEquals('assets.empty_version_strategy', (string) $reference); + } else { + $this->assertEquals('assets.static_version_strategy', $versionStrategy->getParent()); + $this->assertEquals($version, $versionStrategy->getArgument(0)); + $this->assertEquals($format, $versionStrategy->getArgument(1)); + } + } + + private function assertCachePoolServiceDefinitionIsCreated(ContainerBuilder $container, $id, $adapter, $defaultLifetime) + { + $this->assertTrue($container->has($id), sprintf('Service definition "%s" for cache pool of type "%s" is registered', $id, $adapter)); + + $poolDefinition = $container->getDefinition($id); + + $this->assertInstanceOf(DefinitionDecorator::class, $poolDefinition, sprintf('Cache pool "%s" is based on an abstract cache pool.', $id)); + + $this->assertTrue($poolDefinition->hasTag('cache.pool'), sprintf('Service definition "%s" is tagged with the "cache.pool" tag.', $id)); + $this->assertFalse($poolDefinition->isAbstract(), sprintf('Service definition "%s" is not abstract.', $id)); + + $tag = $poolDefinition->getTag('cache.pool'); + $this->assertTrue(isset($tag[0]['default_lifetime']), 'The default lifetime is stored as an attribute of the "cache.pool" tag.'); + $this->assertSame($defaultLifetime, $tag[0]['default_lifetime'], 'The default lifetime is stored as an attribute of the "cache.pool" tag.'); + + $parentDefinition = $poolDefinition; + do { + $parentId = $parentDefinition->getParent(); + $parentDefinition = $container->findDefinition($parentId); + } while ($parentDefinition instanceof DefinitionDecorator); + + switch ($adapter) { + case 'cache.adapter.apcu': + $this->assertSame(ApcuAdapter::class, $parentDefinition->getClass()); + break; + case 'cache.adapter.doctrine': + $this->assertSame(DoctrineAdapter::class, $parentDefinition->getClass()); + break; + case 'cache.app': + if (ChainAdapter::class === $parentDefinition->getClass()) { + break; + } + case 'cache.adapter.filesystem': + $this->assertSame(FilesystemAdapter::class, $parentDefinition->getClass()); + break; + case 'cache.adapter.psr6': + $this->assertSame(ProxyAdapter::class, $parentDefinition->getClass()); + break; + case 'cache.adapter.redis': + $this->assertSame(RedisAdapter::class, $parentDefinition->getClass()); + break; + default: + $this->fail('Unresolved adapter: '.$adapter); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b077e80dc43e3fbef92af88a783b5c503e666af2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use Symfony\Component\Config\FileLocator; + +class PhpFrameworkExtensionTest extends FrameworkExtensionTest +{ + protected function loadFromFile(ContainerBuilder $container, $file) + { + $loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/Fixtures/php')); + $loader->load($file.'.php'); + } + + /** + * @expectedException \LogicException + */ + public function testAssetsCannotHavePathAndUrl() + { + $this->createContainerFromClosure(function ($container) { + $container->loadFromExtension('framework', array( + 'assets' => array( + 'base_urls' => 'http://cdn.example.com', + 'base_path' => '/foo', + ), + )); + }); + } + + /** + * @expectedException \LogicException + */ + public function testAssetPackageCannotHavePathAndUrl() + { + $this->createContainerFromClosure(function ($container) { + $container->loadFromExtension('framework', array( + 'assets' => array( + 'packages' => array( + 'impossible' => array( + 'base_urls' => 'http://cdn.example.com', + 'base_path' => '/foo', + ), + ), + ), + )); + }); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..03401e2482942bc5f47e3b824a8e2f09e4b02076 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.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\Bundle\FrameworkBundle\Tests\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\Config\FileLocator; + +class XmlFrameworkExtensionTest extends FrameworkExtensionTest +{ + protected function loadFromFile(ContainerBuilder $container, $file) + { + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/Fixtures/xml')); + $loader->load($file.'.xml'); + } + + public function testAssetsHelperIsRemovedWhenPhpTemplatingEngineIsEnabledAndAssetsAreDisabled() + { + $this->markTestSkipped('The assets key cannot be set to false using the XML configuration format.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/YamlFrameworkExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/YamlFrameworkExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..43070c00c9830d791ea6b06ee229d8fbe753ef21 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/YamlFrameworkExtensionTest.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\Config\FileLocator; + +class YamlFrameworkExtensionTest extends FrameworkExtensionTest +{ + protected function loadFromFile(ContainerBuilder $container, $file) + { + $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/Fixtures/yml')); + $loader->load($file.'.yml'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/BaseBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/BaseBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..494a18dff0a1407007e309746741503f07245bc2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/BaseBundle.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Fixtures\BaseBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class BaseBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/base.format.engine b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/base.format.engine new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/controller/base.format.engine b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/controller/base.format.engine new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/this.is.a.template.format.engine b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/this.is.a.template.format.engine new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/DeclaredClass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/DeclaredClass.php new file mode 100644 index 0000000000000000000000000000000000000000..3831d0dc2f795348e9b600f3a44c0224bb52255c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/DeclaredClass.php @@ -0,0 +1,7 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.json new file mode 100644 index 0000000000000000000000000000000000000000..6998dae2828a87c846d167f8279c9524d0c2b20f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.json @@ -0,0 +1,4 @@ +{ + "service": "service_2", + "public": false +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.md new file mode 100644 index 0000000000000000000000000000000000000000..73a4101d8bce3e15bc7e8c7ba3574be0a580c8db --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.md @@ -0,0 +1,2 @@ +- Service: `service_2` +- Public: no \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.txt new file mode 100644 index 0000000000000000000000000000000000000000..0dbee6ac67c8513dca1d668cb6b2f16b323ad290 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.txt @@ -0,0 +1,3 @@ + + // This service is an alias for the service service_2 + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..847050b33a42819d8c793f697c9b905da2aad07c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.xml @@ -0,0 +1,2 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.json new file mode 100644 index 0000000000000000000000000000000000000000..cb6809159ad2d5d506206dd61d933fa497034e9f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.json @@ -0,0 +1,3 @@ +{ + "twig.form.resources": ["bootstrap_3_horizontal_layout.html.twig", "bootstrap_3_layout.html.twig", "form_div_layout.html.twig", "form_table_layout.html.twig"] +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.md new file mode 100644 index 0000000000000000000000000000000000000000..593be0cab77fb2246a6b49b7f3f8f903663db02f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.md @@ -0,0 +1,4 @@ +twig.form.resources +=================== + +["bootstrap_3_horizontal_layout.html.twig","bootstrap_3_layo... diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.txt new file mode 100644 index 0000000000000000000000000000000000000000..903717b620cff62a80bc88cf096af3b8936483c0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.txt @@ -0,0 +1,5 @@ + --------------------- ----------------------------------------------------------------- +  Parameter   Value  + --------------------- ----------------------------------------------------------------- + twig.form.resources ["bootstrap_3_horizontal_layout.html.twig","bootstrap_3_layo... + --------------------- ----------------------------------------------------------------- diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.xml new file mode 100644 index 0000000000000000000000000000000000000000..0e16f57fc948ab8e60f81bc1aca863e84ba23138 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.xml @@ -0,0 +1,2 @@ + +["bootstrap_3_horizontal_layout.html.twig","bootstrap_3_layo... diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json new file mode 100644 index 0000000000000000000000000000000000000000..3039d03f1ed1385304a224cd77d990be2ae3e51a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json @@ -0,0 +1,31 @@ +{ + "definitions": { + "definition_1": { + "class": "Full\\Qualified\\Class1", + "public": true, + "synthetic": false, + "lazy": true, + "shared": true, + "abstract": true, + "autowire": false, + "autowiring_types": [], + "file": null, + "factory_class": "Full\\Qualified\\FactoryClass", + "factory_method": "get", + "tags": [] + } + }, + "aliases": { + "alias_1": { + "service": "service_1", + "public": true + }, + "alias_2": { + "service": "service_2", + "public": false + } + }, + "services": { + "service_container": "Symfony\\Component\\DependencyInjection\\ContainerBuilder" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md new file mode 100644 index 0000000000000000000000000000000000000000..d21d18053677fb0f563dae4d32f218b306dae478 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md @@ -0,0 +1,37 @@ +Public services +=============== + +Definitions +----------- + +### definition_1 + +- Class: `Full\Qualified\Class1` +- Public: yes +- Synthetic: no +- Lazy: yes +- Shared: yes +- Abstract: yes +- Autowired: no +- Factory Class: `Full\Qualified\FactoryClass` +- Factory Method: `get` + + +Aliases +------- + +### alias_1 + +- Service: `service_1` +- Public: yes + +### alias_2 + +- Service: `service_2` +- Public: no + + +Services +-------- + +- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder` diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt new file mode 100644 index 0000000000000000000000000000000000000000..0e42596b99233783e672c519bd5069f710c0e356 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt @@ -0,0 +1,13 @@ + +Symfony Container Public Services +================================= + + ------------------- -------------------------------------------------------- +  Service ID   Class name  + ------------------- -------------------------------------------------------- + alias_1 alias for "service_1" + alias_2 alias for "service_2" + definition_1 Full\Qualified\Class1 + service_container Symfony\Component\DependencyInjection\ContainerBuilder + ------------------- -------------------------------------------------------- + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.xml new file mode 100644 index 0000000000000000000000000000000000000000..52031e59aa4ac5efb9d5f4dc68e7c364b05e78e4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json new file mode 100644 index 0000000000000000000000000000000000000000..d6f70eec2127dabd545f4abd3b3f01efc9af4877 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json @@ -0,0 +1,66 @@ +{ + "definitions": { + "definition_1": { + "class": "Full\\Qualified\\Class1", + "public": true, + "synthetic": false, + "lazy": true, + "shared": true, + "abstract": true, + "autowire": false, + "autowiring_types": [], + "file": null, + "factory_class": "Full\\Qualified\\FactoryClass", + "factory_method": "get", + "tags": [] + }, + "definition_2": { + "class": "Full\\Qualified\\Class2", + "public": false, + "synthetic": true, + "lazy": false, + "shared": true, + "abstract": false, + "autowire": false, + "autowiring_types": [], + "file": "\/path\/to\/file", + "factory_service": "factory.service", + "factory_method": "get", + "calls": [ + "setMailer" + ], + "tags": [ + { + "name": "tag1", + "parameters": { + "attr1": "val1", + "attr2": "val2" + } + }, + { + "name": "tag1", + "parameters": { + "attr3": "val3" + } + }, + { + "name": "tag2", + "parameters": [] + } + ] + } + }, + "aliases": { + "alias_1": { + "service": "service_1", + "public": true + }, + "alias_2": { + "service": "service_2", + "public": false + } + }, + "services": { + "service_container": "Symfony\\Component\\DependencyInjection\\ContainerBuilder" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md new file mode 100644 index 0000000000000000000000000000000000000000..26ea2f007ed5190d1b346a46f8dfd04d8a4233ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md @@ -0,0 +1,57 @@ +Public and private services +=========================== + +Definitions +----------- + +### definition_1 + +- Class: `Full\Qualified\Class1` +- Public: yes +- Synthetic: no +- Lazy: yes +- Shared: yes +- Abstract: yes +- Autowired: no +- Factory Class: `Full\Qualified\FactoryClass` +- Factory Method: `get` + +### definition_2 + +- Class: `Full\Qualified\Class2` +- Public: no +- Synthetic: yes +- Lazy: no +- Shared: yes +- Abstract: no +- Autowired: no +- File: `/path/to/file` +- Factory Service: `factory.service` +- Factory Method: `get` +- Call: `setMailer` +- Tag: `tag1` + - Attr1: val1 + - Attr2: val2 +- Tag: `tag1` + - Attr3: val3 +- Tag: `tag2` + + +Aliases +------- + +### alias_1 + +- Service: `service_1` +- Public: yes + +### alias_2 + +- Service: `service_2` +- Public: no + + +Services +-------- + +- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder` diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt new file mode 100644 index 0000000000000000000000000000000000000000..e23ea6d81f5ad32378f8a4e3a536501567211297 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt @@ -0,0 +1,14 @@ + +Symfony Container Public and Private Services +============================================= + + ------------------- -------------------------------------------------------- +  Service ID   Class name  + ------------------- -------------------------------------------------------- + alias_1 alias for "service_1" + alias_2 alias for "service_2" + definition_1 Full\Qualified\Class1 + definition_2 Full\Qualified\Class2 + service_container Symfony\Component\DependencyInjection\ContainerBuilder + ------------------- -------------------------------------------------------- + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml new file mode 100644 index 0000000000000000000000000000000000000000..bde934fa50a3995b9528185c91b6c88104f0ef2f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + val1 + val2 + + + val3 + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json new file mode 100644 index 0000000000000000000000000000000000000000..de1ae35eaad5709fb0f41bc06d003b8a86294cb0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json @@ -0,0 +1,41 @@ +{ + "definitions": { + "definition_2": { + "class": "Full\\Qualified\\Class2", + "public": false, + "synthetic": true, + "lazy": false, + "shared": true, + "abstract": false, + "autowire": false, + "autowiring_types": [], + "file": "\/path\/to\/file", + "factory_service": "factory.service", + "factory_method": "get", + "calls": [ + "setMailer" + ], + "tags": [ + { + "name": "tag1", + "parameters": { + "attr1": "val1", + "attr2": "val2" + } + }, + { + "name": "tag1", + "parameters": { + "attr3": "val3" + } + }, + { + "name": "tag2", + "parameters": [] + } + ] + } + }, + "aliases": [], + "services": [] +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md new file mode 100644 index 0000000000000000000000000000000000000000..e3dcc59f43bff034ee9168d7edf37a0c91944b35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md @@ -0,0 +1,25 @@ +Public and private services with tag `tag1` +=========================================== + +Definitions +----------- + +### definition_2 + +- Class: `Full\Qualified\Class2` +- Public: no +- Synthetic: yes +- Lazy: no +- Shared: yes +- Abstract: no +- Autowired: no +- File: `/path/to/file` +- Factory Service: `factory.service` +- Factory Method: `get` +- Call: `setMailer` +- Tag: `tag1` + - Attr1: val1 + - Attr2: val2 +- Tag: `tag1` + - Attr3: val3 +- Tag: `tag2` diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt new file mode 100644 index 0000000000000000000000000000000000000000..b8b393266acda7aaa0f6d0a790cfe08d2f196b11 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt @@ -0,0 +1,11 @@ + +Symfony Container Public and Private Services Tagged with "tag1" Tag +==================================================================== + + -------------- ------- ------- ------- ----------------------- +  Service ID   attr1   attr2   attr3   Class name  + -------------- ------- ------- ------- ----------------------- + definition_2 val1 val2 Full\Qualified\Class2 + " val3 + -------------- ------- ------- ------- ----------------------- + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml new file mode 100644 index 0000000000000000000000000000000000000000..d679db7b3b86086baf7ff1f2bd865340b1f5ae4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml @@ -0,0 +1,19 @@ + + + + + + + + + + val1 + val2 + + + val3 + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json new file mode 100644 index 0000000000000000000000000000000000000000..d5f5596c4653a1e2d03789599f1331fe98aa3d79 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json @@ -0,0 +1,38 @@ +{ + "tag1": [ + { + "class": "Full\\Qualified\\Class2", + "public": false, + "synthetic": true, + "lazy": false, + "shared": true, + "abstract": false, + "autowire": false, + "autowiring_types": [], + "file": "\/path\/to\/file", + "factory_service": "factory.service", + "factory_method": "get", + "calls": [ + "setMailer" + ] + } + ], + "tag2": [ + { + "class": "Full\\Qualified\\Class2", + "public": false, + "synthetic": true, + "lazy": false, + "shared": true, + "abstract": false, + "autowire": false, + "autowiring_types": [], + "file": "\/path\/to\/file", + "factory_service": "factory.service", + "factory_method": "get", + "calls": [ + "setMailer" + ] + } + ] +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md new file mode 100644 index 0000000000000000000000000000000000000000..a0e1bcd1c4f8afa664e7bdd4f1641dad04811175 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md @@ -0,0 +1,37 @@ +Container tags +============== + +tag1 +---- + +### definition_2 + +- Class: `Full\Qualified\Class2` +- Public: no +- Synthetic: yes +- Lazy: no +- Shared: yes +- Abstract: no +- Autowired: no +- File: `/path/to/file` +- Factory Service: `factory.service` +- Factory Method: `get` +- Call: `setMailer` + + +tag2 +---- + +### definition_2 + +- Class: `Full\Qualified\Class2` +- Public: no +- Synthetic: yes +- Lazy: no +- Shared: yes +- Abstract: no +- Autowired: no +- File: `/path/to/file` +- Factory Service: `factory.service` +- Factory Method: `get` +- Call: `setMailer` diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.txt new file mode 100644 index 0000000000000000000000000000000000000000..45523dcb68ed79633f826cea6d9ea6e84d6b1ea2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.txt @@ -0,0 +1,14 @@ + +Symfony Container Public and Private Tags +========================================= + +"tag1" tag +---------- + + * definition_2 + +"tag2" tag +---------- + + * definition_2 + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml new file mode 100644 index 0000000000000000000000000000000000000000..08352fa206877f36322f069d80fe0ae1c3a4b789 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.json new file mode 100644 index 0000000000000000000000000000000000000000..10eccf38fd03fa64bb1c7b92c48f0ac6158f2ac0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.json @@ -0,0 +1,4 @@ +{ + "type": "function", + "name": "array_key_exists" +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.md new file mode 100644 index 0000000000000000000000000000000000000000..9cf31352e3cfddaee3d06619f6082b8c84953312 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.md @@ -0,0 +1,3 @@ + +- Type: `function` +- Name: `array_key_exists` diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..09901c3c403c1da2e219dde88109c81fce341469 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.txt @@ -0,0 +1 @@ +array_key_exists() \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..28d100dfd68cff9ac1ffa433c3e96bbde784c5b6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.xml @@ -0,0 +1,2 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.json new file mode 100644 index 0000000000000000000000000000000000000000..63972540d5a1633aa40e5bbffdb9a235de32474a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.json @@ -0,0 +1,6 @@ +{ + "type": "function", + "name": "staticMethod", + "class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass", + "static": true +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.md new file mode 100644 index 0000000000000000000000000000000000000000..c041ee8ea6fc4b524ff081894ec86d24c16c269f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.md @@ -0,0 +1,5 @@ + +- Type: `function` +- Name: `staticMethod` +- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` +- Static: yes diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.txt new file mode 100644 index 0000000000000000000000000000000000000000..5e3101e1bc2c2290900c2d61672de1fe4447248c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.txt @@ -0,0 +1 @@ +Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod() \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..df493100520fe3897e96b2f5ded6f303feef1515 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.xml @@ -0,0 +1,2 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.json new file mode 100644 index 0000000000000000000000000000000000000000..f77f13ad270570c143a4c03d8caa5acfe2541fad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.json @@ -0,0 +1,5 @@ +{ + "type": "function", + "name": "method", + "class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass" +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.md new file mode 100644 index 0000000000000000000000000000000000000000..3b61c0da2ee771175466aa7a32c11f3d3e12a8dd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.md @@ -0,0 +1,4 @@ + +- Type: `function` +- Name: `method` +- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.txt new file mode 100644 index 0000000000000000000000000000000000000000..dde0dbba2e3d8c012a53728218470f84b287c9b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.txt @@ -0,0 +1 @@ +Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::method() \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.xml new file mode 100644 index 0000000000000000000000000000000000000000..367e8b21a1baac72eff6f67f28b07569d1680e69 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.xml @@ -0,0 +1,2 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.json new file mode 100644 index 0000000000000000000000000000000000000000..63972540d5a1633aa40e5bbffdb9a235de32474a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.json @@ -0,0 +1,6 @@ +{ + "type": "function", + "name": "staticMethod", + "class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass", + "static": true +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.md new file mode 100644 index 0000000000000000000000000000000000000000..c041ee8ea6fc4b524ff081894ec86d24c16c269f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.md @@ -0,0 +1,5 @@ + +- Type: `function` +- Name: `staticMethod` +- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` +- Static: yes diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.txt new file mode 100644 index 0000000000000000000000000000000000000000..5e3101e1bc2c2290900c2d61672de1fe4447248c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.txt @@ -0,0 +1 @@ +Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod() \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.xml new file mode 100644 index 0000000000000000000000000000000000000000..df493100520fe3897e96b2f5ded6f303feef1515 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.xml @@ -0,0 +1,2 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.json new file mode 100644 index 0000000000000000000000000000000000000000..249b59f3c71236932afb383034d5b39ef444f829 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.json @@ -0,0 +1,7 @@ +{ + "type": "function", + "name": "staticMethod", + "class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\ExtendedCallableClass", + "static": true, + "parent": true +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.md new file mode 100644 index 0000000000000000000000000000000000000000..fc69e9bafc01f7f2c2139f63e9e5d2298483818b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.md @@ -0,0 +1,6 @@ + +- Type: `function` +- Name: `staticMethod` +- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass` +- Static: yes +- Parent: yes diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.txt new file mode 100644 index 0000000000000000000000000000000000000000..1c06a7e9a5cfd984a82b282998ffebe72b35c3d1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.txt @@ -0,0 +1 @@ +Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass::parent::staticMethod() \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.xml new file mode 100644 index 0000000000000000000000000000000000000000..05fbb3de7287be1b8c209f7048ba1e5dd8ca871d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.xml @@ -0,0 +1,2 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.json new file mode 100644 index 0000000000000000000000000000000000000000..1798fddc4b3972fca7167068dbc9bfde8ebfe778 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.json @@ -0,0 +1,3 @@ +{ + "type": "closure" +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.md new file mode 100644 index 0000000000000000000000000000000000000000..474a9ddc24cc258056b31d40a823ef38b1114d31 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.md @@ -0,0 +1,2 @@ + +- Type: `closure` diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.txt new file mode 100644 index 0000000000000000000000000000000000000000..9b030ab7913a9b06adf5c09d90073d4f4e84f89c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.txt @@ -0,0 +1 @@ +\Closure() \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.xml new file mode 100644 index 0000000000000000000000000000000000000000..b0f2ab56bc2bf4637915cd581934196562fa0e45 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.xml @@ -0,0 +1,2 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.json new file mode 100644 index 0000000000000000000000000000000000000000..0d4d1e861cf622a1933a4cf11b98cfc174556227 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.json @@ -0,0 +1,4 @@ +{ + "type": "object", + "name": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass" +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.md new file mode 100644 index 0000000000000000000000000000000000000000..c9ad7af95d8c7ceaeab75c949eaf5ae5e6ad032e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.md @@ -0,0 +1,3 @@ + +- Type: `object` +- Name: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.txt new file mode 100644 index 0000000000000000000000000000000000000000..78ef6a6527cae3c28bb69a6f29663447c1f5c951 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.txt @@ -0,0 +1 @@ +Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke() \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.xml new file mode 100644 index 0000000000000000000000000000000000000000..7a5d812c07649fc484daae514bcac9515ddfe758 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.xml @@ -0,0 +1,2 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json new file mode 100644 index 0000000000000000000000000000000000000000..cbabdc81a1079aa214fd04abcd99fccafae86d8d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json @@ -0,0 +1,14 @@ +{ + "class": "Full\\Qualified\\Class1", + "public": true, + "synthetic": false, + "lazy": true, + "shared": true, + "abstract": true, + "autowire": false, + "autowiring_types": [], + "file": null, + "factory_class": "Full\\Qualified\\FactoryClass", + "factory_method": "get", + "tags": [] +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md new file mode 100644 index 0000000000000000000000000000000000000000..b1d46b69f4f9ff636963d7b53264103bbcf90897 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md @@ -0,0 +1,9 @@ +- Class: `Full\Qualified\Class1` +- Public: yes +- Synthetic: no +- Lazy: yes +- Shared: yes +- Abstract: yes +- Autowired: no +- Factory Class: `Full\Qualified\FactoryClass` +- Factory Method: `get` diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..f74cdbbccd5ccc4f64a16ee4e111ce2f4749765e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt @@ -0,0 +1,17 @@ + ------------------ ----------------------------- +  Option   Value  + ------------------ ----------------------------- + Service ID - + Class Full\Qualified\Class1 + Tags - + Public yes + Synthetic no + Lazy yes + Shared yes + Abstract yes + Autowired no + Autowiring Types - + Factory Class Full\Qualified\FactoryClass + Factory Method get + ------------------ ----------------------------- + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..67d102945a6fe2bb589d10061ae602a6b0eeafd7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.xml @@ -0,0 +1,4 @@ + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json new file mode 100644 index 0000000000000000000000000000000000000000..2a29181874fab934d1ac7abd47d037ef6381c40a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json @@ -0,0 +1,35 @@ +{ + "class": "Full\\Qualified\\Class2", + "public": false, + "synthetic": true, + "lazy": false, + "shared": true, + "abstract": false, + "autowire": false, + "autowiring_types": [], + "file": "\/path\/to\/file", + "factory_service": "factory.service", + "factory_method": "get", + "calls": [ + "setMailer" + ], + "tags": [ + { + "name": "tag1", + "parameters": { + "attr1": "val1", + "attr2": "val2" + } + }, + { + "name": "tag1", + "parameters": { + "attr3": "val3" + } + }, + { + "name": "tag2", + "parameters": [] + } + ] +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md new file mode 100644 index 0000000000000000000000000000000000000000..1f097a2585321f30309101d173327167e6476eef --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md @@ -0,0 +1,17 @@ +- Class: `Full\Qualified\Class2` +- Public: no +- Synthetic: yes +- Lazy: no +- Shared: yes +- Abstract: no +- Autowired: no +- File: `/path/to/file` +- Factory Service: `factory.service` +- Factory Method: `get` +- Call: `setMailer` +- Tag: `tag1` + - Attr1: val1 + - Attr2: val2 +- Tag: `tag1` + - Attr3: val3 +- Tag: `tag2` diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt new file mode 100644 index 0000000000000000000000000000000000000000..86f44b3590946a018c824a2882c4110e3983305c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt @@ -0,0 +1,19 @@ + ------------------ ------------------------------------------------------- +  Option   Value  + ------------------ ------------------------------------------------------- + Service ID - + Class Full\Qualified\Class2 + Tags tag1 (attr1: val1, attr2: val2)tag1 (attr3: val3)tag2 + Calls setMailer + Public no + Synthetic yes + Lazy no + Shared yes + Abstract no + Autowired no + Autowiring Types - + Required File /path/to/file + Factory Service factory.service + Factory Method get + ------------------ ------------------------------------------------------- + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..434a34b2565c4bfa7adf8d07843428bb0715b2c4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml @@ -0,0 +1,17 @@ + + + + + + + + + val1 + val2 + + + val3 + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.json new file mode 100644 index 0000000000000000000000000000000000000000..4b68f0cefc0e4c5adb11902dead6b921fea4df2b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.json @@ -0,0 +1,11 @@ +[ + { + "type": "function", + "name": "global_function", + "priority": 255 + }, + { + "type": "closure", + "priority": -1 + } +] diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.md new file mode 100644 index 0000000000000000000000000000000000000000..98b81ecdce4227f72b9ac0b0c490511cb2298b69 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.md @@ -0,0 +1,12 @@ +# Registered listeners for event `event1` ordered by descending priority + +## Listener 1 + +- Type: `function` +- Name: `global_function` +- Priority: `255` + +## Listener 2 + +- Type: `closure` +- Priority: `-1` diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt new file mode 100644 index 0000000000000000000000000000000000000000..99c7cba66f3430a8566748eb45d1ca43010bc4d7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt @@ -0,0 +1,11 @@ + +Registered Listeners for "event1" Event +======================================= + + ------- ------------------- ---------- +  Order   Callable   Priority  + ------- ------------------- ---------- + #1 global_function() 255 + #2 \Closure() -1 + ------- ------------------- ---------- + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.xml new file mode 100644 index 0000000000000000000000000000000000000000..bc03189af7b80f98233b49de60bd170e5bceb9f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.json new file mode 100644 index 0000000000000000000000000000000000000000..30772d9a4a212f0dc1ccc4f6ffd474a154b86ad7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.json @@ -0,0 +1,20 @@ +{ + "event1": [ + { + "type": "function", + "name": "global_function", + "priority": 255 + }, + { + "type": "closure", + "priority": -1 + } + ], + "event2": [ + { + "type": "object", + "name": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass", + "priority": 0 + } + ] +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.md new file mode 100644 index 0000000000000000000000000000000000000000..eb809789d5f17adcdc85d8249cf5f8e4a9c4febd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.md @@ -0,0 +1,22 @@ +# Registered listeners + +## event1 + +### Listener 1 + +- Type: `function` +- Name: `global_function` +- Priority: `255` + +### Listener 2 + +- Type: `closure` +- Priority: `-1` + +## event2 + +### Listener 1 + +- Type: `object` +- Name: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` +- Priority: `0` diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt new file mode 100644 index 0000000000000000000000000000000000000000..687323e9ed8fbad57402e92df35a5dea2d5b88d1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt @@ -0,0 +1,23 @@ + +Registered Listeners Grouped by Event +===================================== + +"event1" event +-------------- + + ------- ------------------- ---------- +  Order   Callable   Priority  + ------- ------------------- ---------- + #1 global_function() 255 + #2 \Closure() -1 + ------- ------------------- ---------- + +"event2" event +-------------- + + ------- ----------------------------------------------------------------------------------- ---------- +  Order   Callable   Priority  + ------- ----------------------------------------------------------------------------------- ---------- + #1 Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke() 0 + ------- ----------------------------------------------------------------------------------- ---------- + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.xml new file mode 100644 index 0000000000000000000000000000000000000000..d7443f9743666dde2f7a1aa1a0207efd0de28f12 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.json new file mode 100644 index 0000000000000000000000000000000000000000..069fdbc5d396fa558d488cd2d443167d0688d0af --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.json @@ -0,0 +1,3 @@ +{ + "database_name": "symfony" +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.md new file mode 100644 index 0000000000000000000000000000000000000000..239e98d6aac726cb53c4f0f153f1328aec2d1ac0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.md @@ -0,0 +1,4 @@ +database_name +============= + +symfony \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt new file mode 100644 index 0000000000000000000000000000000000000000..a3d4404f4a88f9af652393c8234f31c875f11b0e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt @@ -0,0 +1,6 @@ + --------------- --------- +  Parameter   Value  + --------------- --------- + database_name symfony + --------------- --------- + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.xml new file mode 100644 index 0000000000000000000000000000000000000000..8465522c1bc2a7fdb34d377175bd146e50ba902c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.xml @@ -0,0 +1,2 @@ + +symfony diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.json new file mode 100644 index 0000000000000000000000000000000000000000..686cbc9e52209a23f8e8d5a47418c7bcb1571709 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.json @@ -0,0 +1,10 @@ +{ + "array": [ + 12, + "Hello world!", + true + ], + "boolean": true, + "integer": 12, + "string": "Hello world!" +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.md new file mode 100644 index 0000000000000000000000000000000000000000..c1eb4dc90fc4ff5d8439e1c05bc03165ca0740f2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.md @@ -0,0 +1,7 @@ +Container parameters +==================== + +- `array`: `[12,"Hello world!",true]` +- `boolean`: `true` +- `integer`: `12` +- `string`: `Hello world!` \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..f5b8f1b2275d1af2bd03a7a9c63ee71f38e49cb3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt @@ -0,0 +1,13 @@ + +Symfony Container Parameters +============================ + + ----------- -------------------------- +  Parameter   Value  + ----------- -------------------------- + array [12,"Hello world!",true] + boolean true + integer 12 + string Hello world! + ----------- -------------------------- + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..e97f89573013909bc9dd326e992947315578d9e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.xml @@ -0,0 +1,7 @@ + + + [12,"Hello world!",true] + true + 12 + Hello world! + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.json new file mode 100644 index 0000000000000000000000000000000000000000..beac79f1f87581aef7c9a23c969d58f048d89a1d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.json @@ -0,0 +1,20 @@ +{ + "path": "\/hello\/{name}", + "pathRegex": "#^\/hello(?:\/(?P[a-z]+))?$#s", + "host": "localhost", + "hostRegex": "#^localhost$#si", + "scheme": "http|https", + "method": "GET|HEAD", + "class": "Symfony\\Component\\Routing\\Route", + "defaults": { + "name": "Joseph" + }, + "requirements": { + "name": "[a-z]+" + }, + "options": { + "compiler_class": "Symfony\\Component\\Routing\\RouteCompiler", + "opt1": "val1", + "opt2": "val2" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.md new file mode 100644 index 0000000000000000000000000000000000000000..5bfba18b2c8149463862255b66656a7d5fa032da --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.md @@ -0,0 +1,15 @@ +- Path: /hello/{name} +- Path Regex: #^/hello(?:/(?P[a-z]+))?$#s +- Host: localhost +- Host Regex: #^localhost$#si +- Scheme: http|https +- Method: GET|HEAD +- Class: Symfony\Component\Routing\Route +- Defaults: + - `name`: Joseph +- Requirements: + - `name`: [a-z]+ +- Options: + - `compiler_class`: Symfony\Component\Routing\RouteCompiler + - `opt1`: val1 + - `opt2`: val2 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..587543fb0a47fda7b81fb5159937a7d152bb257d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.txt @@ -0,0 +1,17 @@ ++--------------+---------------------------------------------------------+ +| Property | Value | ++--------------+---------------------------------------------------------+ +| Route Name | | +| Path | /hello/{name} | +| Path Regex | #^/hello(?:/(?P[a-z]+))?$#s | +| Host | localhost | +| Host Regex | #^localhost$#si | +| Scheme | http|https | +| Method | GET|HEAD | +| Requirements | name: [a-z]+ | +| Class | Symfony\Component\Routing\Route | +| Defaults | name: Joseph | +| Options | compiler_class: Symfony\Component\Routing\RouteCompiler | +| | opt1: val1 | +| | opt2: val2 | ++--------------+---------------------------------------------------------+ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..b6040bdad160c175413411f29f3a070b47bd8a5a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.xml @@ -0,0 +1,20 @@ + + + /hello/{name} + localhost + http + https + GET + HEAD + + Joseph + + + [a-z]+ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.json new file mode 100644 index 0000000000000000000000000000000000000000..58caf26d537e766256656a5adde86d5d7c4c3859 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.json @@ -0,0 +1,16 @@ +{ + "path": "\/name\/add", + "pathRegex": "#^\/name\/add$#s", + "host": "localhost", + "hostRegex": "#^localhost$#si", + "scheme": "http|https", + "method": "PUT|POST", + "class": "Symfony\\Component\\Routing\\Route", + "defaults": [], + "requirements": "NO CUSTOM", + "options": { + "compiler_class": "Symfony\\Component\\Routing\\RouteCompiler", + "opt1": "val1", + "opt2": "val2" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.md new file mode 100644 index 0000000000000000000000000000000000000000..0a3f84be17c70f91581599702a35963fa0e2b5eb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.md @@ -0,0 +1,13 @@ +- Path: /name/add +- Path Regex: #^/name/add$#s +- Host: localhost +- Host Regex: #^localhost$#si +- Scheme: http|https +- Method: PUT|POST +- Class: Symfony\Component\Routing\Route +- Defaults: NONE +- Requirements: NO CUSTOM +- Options: + - `compiler_class`: Symfony\Component\Routing\RouteCompiler + - `opt1`: val1 + - `opt2`: val2 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.txt new file mode 100644 index 0000000000000000000000000000000000000000..e75c19e13112cfb1464d6558870e2b2ca4a72671 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.txt @@ -0,0 +1,17 @@ ++--------------+---------------------------------------------------------+ +| Property | Value | ++--------------+---------------------------------------------------------+ +| Route Name | | +| Path | /name/add | +| Path Regex | #^/name/add$#s | +| Host | localhost | +| Host Regex | #^localhost$#si | +| Scheme | http|https | +| Method | PUT|POST | +| Requirements | NO CUSTOM | +| Class | Symfony\Component\Routing\Route | +| Defaults | NONE | +| Options | compiler_class: Symfony\Component\Routing\RouteCompiler | +| | opt1: val1 | +| | opt2: val2 | ++--------------+---------------------------------------------------------+ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..0f94cf7c41764846956755d72861040a4b85f168 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.xml @@ -0,0 +1,14 @@ + + + /name/add + localhost + http + https + PUT + POST + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json new file mode 100644 index 0000000000000000000000000000000000000000..350bffdb3a9c76e9bd2186c96a66b2b77fd592fa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json @@ -0,0 +1,38 @@ +{ + "route_1": { + "path": "\/hello\/{name}", + "pathRegex": "#^\/hello(?:\/(?P[a-z]+))?$#s", + "host": "localhost", + "hostRegex": "#^localhost$#si", + "scheme": "http|https", + "method": "GET|HEAD", + "class": "Symfony\\Component\\Routing\\Route", + "defaults": { + "name": "Joseph" + }, + "requirements": { + "name": "[a-z]+" + }, + "options": { + "compiler_class": "Symfony\\Component\\Routing\\RouteCompiler", + "opt1": "val1", + "opt2": "val2" + } + }, + "route_2": { + "path": "\/name\/add", + "pathRegex": "#^\/name\/add$#s", + "host": "localhost", + "hostRegex": "#^localhost$#si", + "scheme": "http|https", + "method": "PUT|POST", + "class": "Symfony\\Component\\Routing\\Route", + "defaults": [], + "requirements": "NO CUSTOM", + "options": { + "compiler_class": "Symfony\\Component\\Routing\\RouteCompiler", + "opt1": "val1", + "opt2": "val2" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.md b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.md new file mode 100644 index 0000000000000000000000000000000000000000..815f36e2cffa479d2bb6d4963ceb4d3cb84ab29c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.md @@ -0,0 +1,37 @@ +route_1 +------- + +- Path: /hello/{name} +- Path Regex: #^/hello(?:/(?P[a-z]+))?$#s +- Host: localhost +- Host Regex: #^localhost$#si +- Scheme: http|https +- Method: GET|HEAD +- Class: Symfony\Component\Routing\Route +- Defaults: + - `name`: Joseph +- Requirements: + - `name`: [a-z]+ +- Options: + - `compiler_class`: Symfony\Component\Routing\RouteCompiler + - `opt1`: val1 + - `opt2`: val2 + + +route_2 +------- + +- Path: /name/add +- Path Regex: #^/name/add$#s +- Host: localhost +- Host Regex: #^localhost$#si +- Scheme: http|https +- Method: PUT|POST +- Class: Symfony\Component\Routing\Route +- Defaults: NONE +- Requirements: NO CUSTOM +- Options: + - `compiler_class`: Symfony\Component\Routing\RouteCompiler + - `opt1`: val1 + - `opt2`: val2 + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..9d065623289087120b84e867762efaf8c2a06b56 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt @@ -0,0 +1,7 @@ + --------- ---------- ------------ ----------- --------------- +  Name   Method   Scheme   Host   Path  + --------- ---------- ------------ ----------- --------------- + route_1 GET|HEAD http|https localhost /hello/{name} + route_2 PUT|POST http|https localhost /name/add + --------- ---------- ------------ ----------- --------------- + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..6d17820c3143d9929f0f7ecf2fe2478a194284cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml @@ -0,0 +1,35 @@ + + + + /hello/{name} + localhost + http + https + GET + HEAD + + Joseph + + + [a-z]+ + + + + + + + + + /name/add + localhost + http + https + PUT + POST + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/views/base.format.engine b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/views/base.format.engine new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/views/controller/custom.format.engine b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/views/controller/custom.format.engine new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/translations/messages.fr.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/translations/messages.fr.yml new file mode 100644 index 0000000000000000000000000000000000000000..767141de628f0d7e7a3b6f3845e8578874d1bc5f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/translations/messages.fr.yml @@ -0,0 +1 @@ +folder: répertoire diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/resource.format.engine b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/resource.format.engine new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/this.is.a.template.format.engine b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/this.is.a.template.format.engine new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php new file mode 100644 index 0000000000000000000000000000000000000000..5a7cd354763d09ec8aa46268a15534917cb489e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php @@ -0,0 +1,49 @@ +This template is used for translation message extraction tests +trans('single-quoted key') ?> +trans('double-quoted key') ?> +trans(<<<'EOF' +heredoc key +EOF +) ?> +trans(<<<'EOF' +nowdoc key +EOF +) ?> +trans( + "double-quoted key with whitespace and escaped \$\n\" sequences" +) ?> +trans( + 'single-quoted key with whitespace and nonescaped \$\n\' sequences' +) ?> +trans(<< +trans(<<<'EOF' +nowdoc key with whitespace and nonescaped \$\n sequences +EOF +) ?> + +trans('single-quoted key with "quote mark at the end"') ?> + +transChoice( + '{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples', + 10, + array('%count%' => 10) +) ?> + +trans('other-domain-test-no-params-short-array', [], 'not_messages'); ?> + +trans('other-domain-test-no-params-long-array', array(), 'not_messages'); ?> + +trans('other-domain-test-params-short-array', ['foo' => 'bar'], 'not_messages'); ?> + +trans('other-domain-test-params-long-array', array('foo' => 'bar'), 'not_messages'); ?> + +transChoice('other-domain-test-trans-choice-short-array-%count%', 10, ['%count%' => 10], 'not_messages'); ?> + +transChoice('other-domain-test-trans-choice-long-array-%count%', 10, array('%count%' => 10), 'not_messages'); ?> + +trans('typecast', ['a' => (int) '123'], 'not_messages'); ?> +transChoice('msg1', 10 + 1, [], 'not_messages'); ?> +transChoice('msg2', ceil(4.5), [], 'not_messages'); ?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Serialization/Author.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Serialization/Author.php new file mode 100644 index 0000000000000000000000000000000000000000..efb0b430279f21a95f113de6e82e1a6f036fb3b4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Serialization/Author.php @@ -0,0 +1,8 @@ + + + + + group1 + group2 + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TemplatePathsCache/templates-empty.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TemplatePathsCache/templates-empty.php new file mode 100644 index 0000000000000000000000000000000000000000..9ba223074c68cae305d62e58992598239154f677 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TemplatePathsCache/templates-empty.php @@ -0,0 +1,2 @@ + __DIR__.'/../path/to/template.html.twig', +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/Controller/DefaultController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/Controller/DefaultController.php new file mode 100644 index 0000000000000000000000000000000000000000..c4bee6c031c890d5538239165089a709f9e36c1f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/Controller/DefaultController.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace TestBundle\Fabpot\FooBundle\Controller; + +/** + * DefaultController. + * + * @author Fabien Potencier + */ +class DefaultController +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/FabpotFooBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/FabpotFooBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..17894ba34146b0936fe355a55dab27fb0573a010 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/FabpotFooBundle.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 TestBundle\Fabpot\FooBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +/** + * Bundle. + * + * @author Fabien Potencier + */ +class FabpotFooBundle extends Bundle +{ + /** + * {@inheritdoc} + */ + public function getParent() + { + return 'SensioFooBundle'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/DefaultController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/DefaultController.php new file mode 100644 index 0000000000000000000000000000000000000000..ddda38cb1c14e5514f4ca454d453f9db9516da23 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/DefaultController.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace TestBundle\FooBundle\Controller; + +/** + * DefaultController. + * + * @author Fabien Potencier + */ +class DefaultController +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/Sub/DefaultController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/Sub/DefaultController.php new file mode 100644 index 0000000000000000000000000000000000000000..3c889e7309970df06f7702d116a57d391a6b992c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/Sub/DefaultController.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace TestBundle\FooBundle\Controller\Sub; + +/** + * DefaultController. + * + * @author Fabien Potencier + */ +class DefaultController +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/Test/DefaultController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/Test/DefaultController.php new file mode 100644 index 0000000000000000000000000000000000000000..1bffc7fbdd8fe9912b519c547bb5457006bee636 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/Test/DefaultController.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace TestBundle\FooBundle\Controller\Test; + +/** + * DefaultController. + * + * @author Fabien Potencier + */ +class DefaultController +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/FooBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/FooBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..656f17c52a3d74317961bbac404a6825c6b94274 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/FooBundle.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace TestBundle\FooBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +/** + * Bundle. + * + * @author Fabien Potencier + */ +class FooBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/Controller/DefaultController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/Controller/DefaultController.php new file mode 100644 index 0000000000000000000000000000000000000000..1bb8038486e614f5f57e67879727ea12f3ec8ece --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/Controller/DefaultController.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace TestBundle\Sensio\Cms\FooBundle\Controller; + +/** + * DefaultController. + * + * @author Fabien Potencier + */ +class DefaultController +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/SensioCmsFooBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/SensioCmsFooBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..58967d866d35e5f5c6abf3fadffa7f6cc7711c11 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/SensioCmsFooBundle.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace TestBundle\Sensio\Cms\FooBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +/** + * Bundle. + * + * @author Fabien Potencier + */ +class SensioCmsFooBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/Controller/DefaultController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/Controller/DefaultController.php new file mode 100644 index 0000000000000000000000000000000000000000..86486f05c7c7bc6a42df643e45489ce3309282dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/Controller/DefaultController.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace TestBundle\Sensio\FooBundle\Controller; + +/** + * DefaultController. + * + * @author Fabien Potencier + */ +class DefaultController +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/SensioFooBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/SensioFooBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..d1bc5dccc12a15126863ffce1ab3184573bee98b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/SensioFooBundle.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace TestBundle\Sensio\FooBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +/** + * Bundle. + * + * @author Fabien Potencier + */ +class SensioFooBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php new file mode 100644 index 0000000000000000000000000000000000000000..a1ecee6d0b375f8bfdc56ee13ff12f409074f1dd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php @@ -0,0 +1,8 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/SubCategory.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/SubCategory.php new file mode 100644 index 0000000000000000000000000000000000000000..7fc982b1df241fb07be638d99bccda89680b5e16 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/SubCategory.php @@ -0,0 +1,13 @@ + __DIR__.'/../Fixtures/Resources/views/this.is.a.template.format.engine', +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2fdbef88394963a6f619de0fe68a6a36e639b293 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; + +class AnnotatedControllerTest extends WebTestCase +{ + /** + * @dataProvider getRoutes + */ + public function testAnnotatedController($path, $expectedValue) + { + $client = $this->createClient(array('test_case' => 'AnnotatedController', 'root_config' => 'config.yml')); + $client->request('GET', '/annotated'.$path); + + $this->assertSame(200, $client->getResponse()->getStatusCode()); + $this->assertSame($expectedValue, $client->getResponse()->getContent()); + } + + public function getRoutes() + { + return array( + array('/null_request', 'Symfony\Component\HttpFoundation\Request'), + array('/null_argument', ''), + array('/null_argument_with_route_param', ''), + array('/null_argument_with_route_param/value', 'value'), + array('/argument_with_route_param_and_default', 'value'), + array('/argument_with_route_param_and_default/custom', 'custom'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..52b8c8cdcf52185deb0b7cb719e217f58031204f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.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\Bundle\FrameworkBundle\Tests\Functional; + +use Doctrine\Common\Annotations\AnnotationReader; +use Doctrine\Common\Annotations\CachedReader; +use Symfony\Component\Templating\EngineInterface as ComponentEngineInterface; +use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface as FrameworkBundleEngineInterface; + +class AutowiringTypesTest extends WebTestCase +{ + public function testAnnotationReaderAutowiring() + { + static::bootKernel(array('root_config' => 'no_annotations_cache.yml', 'environment' => 'no_annotations_cache')); + $container = static::$kernel->getContainer(); + + $annotationReader = $container->get('test.autowiring_types.autowired_services')->getAnnotationReader(); + $this->assertInstanceOf(AnnotationReader::class, $annotationReader); + } + + public function testCachedAnnotationReaderAutowiring() + { + static::bootKernel(); + $container = static::$kernel->getContainer(); + + $annotationReader = $container->get('test.autowiring_types.autowired_services')->getAnnotationReader(); + $this->assertInstanceOf(CachedReader::class, $annotationReader); + } + + public function testTemplatingAutowiring() + { + static::bootKernel(); + $container = static::$kernel->getContainer(); + + $autowiredServices = $container->get('test.autowiring_types.autowired_services'); + $this->assertInstanceOf(FrameworkBundleEngineInterface::class, $autowiredServices->getFrameworkBundleEngine()); + $this->assertInstanceOf(ComponentEngineInterface::class, $autowiredServices->getEngine()); + } + + protected static function createKernel(array $options = array()) + { + return parent::createKernel(array('test_case' => 'AutowiringTypes') + $options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/AutowiringTypes/AutowiredServices.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/AutowiringTypes/AutowiredServices.php new file mode 100644 index 0000000000000000000000000000000000000000..0636d591e5677b7ef0987cae271b53d4c74ab7fb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/AutowiringTypes/AutowiredServices.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\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\AutowiringTypes; + +use Doctrine\Common\Annotations\Reader; +use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface as FrameworkBundleEngineInterface; +use Symfony\Component\Templating\EngineInterface; + +class AutowiredServices +{ + private $annotationReader; + private $frameworkBundleEngine; + private $engine; + + public function __construct(Reader $annotationReader = null, FrameworkBundleEngineInterface $frameworkBundleEngine, EngineInterface $engine) + { + $this->annotationReader = $annotationReader; + $this->frameworkBundleEngine = $frameworkBundleEngine; + $this->engine = $engine; + } + + public function getAnnotationReader() + { + return $this->annotationReader; + } + + public function getFrameworkBundleEngine() + { + return $this->frameworkBundleEngine; + } + + public function getEngine() + { + return $this->engine; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php new file mode 100644 index 0000000000000000000000000000000000000000..98a3ace982e33a11fd7042b5d196ba7a04a9b153 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Annotation\Route; + +class AnnotatedController +{ + /** + * @Route("/null_request", name="null_request") + */ + public function requestDefaultNullAction(Request $request = null) + { + return new Response($request ? get_class($request) : null); + } + + /** + * @Route("/null_argument", name="null_argument") + */ + public function argumentDefaultNullWithoutRouteParamAction($value = null) + { + return new Response($value); + } + + /** + * @Route("/null_argument_with_route_param/{value}", name="null_argument_with_route_param") + */ + public function argumentDefaultNullWithRouteParamAction($value = null) + { + return new Response($value); + } + + /** + * @Route("/argument_with_route_param_and_default/{value}", defaults={"value": "value"}, name="argument_with_route_param_and_default") + */ + public function argumentWithoutDefaultWithRouteParamAndDefaultAction($value) + { + return new Response($value); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php new file mode 100644 index 0000000000000000000000000000000000000000..88bd102a5f4cecf367042463a320859f65dfd028 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller; + +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +class FragmentController implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + public function indexAction(Request $request) + { + return $this->container->get('templating')->renderResponse('fragment.html.php', array('bar' => new Bar())); + } + + public function inlinedAction($options, $_format) + { + return new Response($options['bar']->getBar().' '.$_format); + } + + public function customFormatAction($_format) + { + return new Response($_format); + } + + public function customLocaleAction(Request $request) + { + return new Response($request->getLocale()); + } + + public function forwardLocaleAction(Request $request) + { + return new Response($request->getLocale()); + } +} + +class Bar +{ + private $bar = 'bar'; + + public function getBar() + { + return $this->bar; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/ProfilerController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/ProfilerController.php new file mode 100644 index 0000000000000000000000000000000000000000..dd518a12a8d544dde3bf474d87c5b5faa5ff6c62 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/ProfilerController.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller; + +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\HttpFoundation\Response; + +class ProfilerController implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + public function indexAction() + { + return new Response('Hello'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php new file mode 100644 index 0000000000000000000000000000000000000000..a1d91e7929d65c41816e20bed6809a74be04d40f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.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\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller; + +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\RedirectResponse; + +class SessionController implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + public function welcomeAction(Request $request, $name = null) + { + $session = $request->getSession(); + + // new session case + if (!$session->has('name')) { + if (!$name) { + return new Response('You are new here and gave no name.'); + } + + // remember name + $session->set('name', $name); + + return new Response(sprintf('Hello %s, nice to meet you.', $name)); + } + + // existing session + $name = $session->get('name'); + + return new Response(sprintf('Welcome back %s, nice to meet you.', $name)); + } + + public function logoutAction(Request $request) + { + $request->getSession()->invalidate(); + + return new Response('Session cleared.'); + } + + public function setFlashAction(Request $request, $message) + { + $session = $request->getSession(); + $session->getFlashBag()->set('notice', $message); + + return new RedirectResponse($this->container->get('router')->generate('session_showflash')); + } + + public function showFlashAction(Request $request) + { + $session = $request->getSession(); + + if ($session->getFlashBag()->has('notice')) { + list($output) = $session->getFlashBag()->get('notice'); + } else { + $output = 'No flash was set.'; + } + + return new Response($output); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php new file mode 100644 index 0000000000000000000000000000000000000000..5df6e29590a5bff31a5c90148b0eb9ecd5e14200 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller; + +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Controller\ControllerReference; + +class SubRequestController implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + public function indexAction() + { + $handler = $this->container->get('fragment.handler'); + + $errorUrl = $this->generateUrl('subrequest_fragment_error', array('_locale' => 'fr', '_format' => 'json')); + $altUrl = $this->generateUrl('subrequest_fragment', array('_locale' => 'fr', '_format' => 'json')); + + // simulates a failure during the rendering of a fragment... + // should render fr/json + $content = $handler->render($errorUrl, 'inline', array('alt' => $altUrl)); + + // ...to check that the FragmentListener still references the right Request + // when rendering another fragment after the error occurred + // should render en/html instead of fr/json + $content .= $handler->render(new ControllerReference('TestBundle:SubRequest:fragment')); + + // forces the LocaleListener to set fr for the locale... + // should render fr/json + $content .= $handler->render($altUrl); + + // ...and check that after the rendering, the original Request is back + // and en is used as a locale + // should use en/html instead of fr/json + $content .= '--'.$this->generateUrl('subrequest_fragment'); + + // The RouterListener is also tested as if it does not keep the right + // Request in the context, a 301 would be generated + return new Response($content); + } + + public function fragmentAction(Request $request) + { + return new Response('--'.$request->getLocale().'/'.$request->getRequestFormat()); + } + + public function fragmentErrorAction() + { + throw new \RuntimeException('error'); + } + + protected function generateUrl($name, $arguments = array()) + { + return $this->container->get('router')->generate($name, $arguments); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/AnnotationReaderPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/AnnotationReaderPass.php new file mode 100644 index 0000000000000000000000000000000000000000..2de08632fa144710efe45488906e8a74e7865454 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/AnnotationReaderPass.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection; + +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class AnnotationReaderPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + // simulate using "annotation_reader" in a compiler pass + $container->get('annotation_reader'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/Config/CustomConfig.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/Config/CustomConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..8b4abb7a08d6bbd0932f7744e90446ce7d042b39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/Config/CustomConfig.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection\Config; + +class CustomConfig +{ + public function addConfiguration($rootNode) + { + $rootNode + ->children() + ->scalarNode('custom')->end() + ->end() + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/Configuration.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/Configuration.php new file mode 100644 index 0000000000000000000000000000000000000000..2f45cd98534e2b6e9abef01406c8850b43159711 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/Configuration.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection; + +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +class Configuration implements ConfigurationInterface +{ + private $customConfig; + + public function __construct($customConfig = null) + { + $this->customConfig = $customConfig; + } + + public function getConfigTreeBuilder() + { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('test'); + + if ($this->customConfig) { + $this->customConfig->addConfiguration($rootNode); + } + + return $treeBuilder; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..38ce8d39905146cbef1d0665db18b9a447189ef1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\Extension; +use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; + +class TestExtension extends Extension implements PrependExtensionInterface +{ + private $customConfig; + + /** + * {@inheritdoc} + */ + public function load(array $configs, ContainerBuilder $container) + { + $configuration = $this->getConfiguration($configs, $container); + $config = $this->processConfiguration($configuration, $configs); + } + + /** + * {@inheritdoc} + */ + public function prepend(ContainerBuilder $container) + { + $container->prependExtensionConfig('test', array('custom' => 'foo')); + } + + /** + * {@inheritdoc} + */ + public function getConfiguration(array $config, ContainerBuilder $container) + { + return new Configuration($this->customConfig); + } + + public function setCustomConfig($customConfig) + { + $this->customConfig = $customConfig; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..57d83eb9c649c34640910bbc9a87ee8aae09a545 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml @@ -0,0 +1,46 @@ +session_welcome: + path: /session + defaults: { _controller: TestBundle:Session:welcome } + +session_welcome_name: + path: /session/{name} + defaults: { _controller: TestBundle:Session:welcome } + +session_logout: + path: /session_logout + defaults: { _controller: TestBundle:Session:logout} + +session_setflash: + path: /session_setflash/{message} + defaults: { _controller: TestBundle:Session:setFlash} + +session_showflash: + path: /session_showflash + defaults: { _controller: TestBundle:Session:showFlash} + +profiler: + path: /profiler + defaults: { _controller: TestBundle:Profiler:index } + +subrequest_index: + path: /subrequest/{_locale}.{_format} + defaults: { _controller: TestBundle:SubRequest:index, _format: "html" } + schemes: [https] + +subrequest_fragment_error: + path: /subrequest/fragment/error/{_locale}.{_format} + defaults: { _controller: TestBundle:SubRequest:fragmentError, _format: "html" } + schemes: [http] + +subrequest_fragment: + path: /subrequest/fragment/{_locale}.{_format} + defaults: { _controller: TestBundle:SubRequest:fragment, _format: "html" } + schemes: [http] + +fragment_home: + path: /fragment_home + defaults: { _controller: TestBundle:Fragment:index, _format: txt } + +fragment_inlined: + path: /fragment_inlined + defaults: { _controller: TestBundle:Fragment:inlined } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/TestBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/TestBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..d63658bacf021c0dfcd00a1f9e513101ec18beb2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/TestBundle.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\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection\AnnotationReaderPass; +use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection\Config\CustomConfig; + +class TestBundle extends Bundle +{ + public function build(ContainerBuilder $container) + { + parent::build($container); + + /** @var $extension DependencyInjection\TestExtension */ + $extension = $container->getExtension('test'); + + $extension->setCustomConfig(new CustomConfig()); + + $container->addCompilerPass(new AnnotationReaderPass()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7518cf4242c88678bdc1997ab35312f6142874ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; + +use Symfony\Component\Cache\Adapter\FilesystemAdapter; +use Symfony\Component\Cache\Adapter\RedisAdapter; +use Symfony\Component\Cache\Exception\InvalidArgumentException; + +class CachePoolsTest extends WebTestCase +{ + protected function setUp() + { + $_SERVER['SYMFONY__REDIS_HOST'] = getenv('REDIS_HOST'); + } + + protected function tearDown() + { + unset($_SERVER['SYMFONY__REDIS_HOST']); + } + + public function testCachePools() + { + $this->doTestCachePools(array(), FilesystemAdapter::class); + } + + /** + * @requires extension redis + */ + public function testRedisCachePools() + { + try { + $this->doTestCachePools(array('root_config' => 'redis_config.yml', 'environment' => 'redis_cache'), RedisAdapter::class); + } catch (\PHPUnit\Framework\Error\Warning $e) { + if (0 !== strpos($e->getMessage(), 'unable to connect to')) { + throw $e; + } + $this->markTestSkipped($e->getMessage()); + } catch (\PHPUnit_Framework_Error_Warning $e) { + if (0 !== strpos($e->getMessage(), 'unable to connect to')) { + throw $e; + } + $this->markTestSkipped($e->getMessage()); + } catch (InvalidArgumentException $e) { + if (0 !== strpos($e->getMessage(), 'Redis connection failed')) { + throw $e; + } + $this->markTestSkipped($e->getMessage()); + } + } + + /** + * @requires extension redis + */ + public function testRedisCustomCachePools() + { + try { + $this->doTestCachePools(array('root_config' => 'redis_custom_config.yml', 'environment' => 'custom_redis_cache'), RedisAdapter::class); + } catch (\PHPUnit\Framework\Error\Warning $e) { + if (0 !== strpos($e->getMessage(), 'unable to connect to')) { + throw $e; + } + $this->markTestSkipped($e->getMessage()); + } catch (\PHPUnit_Framework_Error_Warning $e) { + if (0 !== strpos($e->getMessage(), 'unable to connect to')) { + throw $e; + } + $this->markTestSkipped($e->getMessage()); + } + } + + public function doTestCachePools($options, $adapterClass) + { + static::bootKernel($options); + $container = static::$kernel->getContainer(); + + $pool1 = $container->get('cache.pool1'); + $this->assertInstanceOf($adapterClass, $pool1); + + $key = 'foobar'; + $pool1->deleteItem($key); + $item = $pool1->getItem($key); + $this->assertFalse($item->isHit()); + + $item->set('baz'); + $pool1->save($item); + $item = $pool1->getItem($key); + $this->assertTrue($item->isHit()); + + $pool2 = $container->get('cache.pool2'); + $pool2->save($item); + + $container->get('cache_clearer')->clear($container->getParameter('kernel.cache_dir')); + $item = $pool1->getItem($key); + $this->assertFalse($item->isHit()); + + $item = $pool2->getItem($key); + $this->assertTrue($item->isHit()); + } + + protected static function createKernel(array $options = array()) + { + return parent::createKernel(array('test_case' => 'CachePools') + $options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5b40325e08eb96ca8802cd84b7d2fa6424d7ce8c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; + +use Symfony\Bundle\FrameworkBundle\Console\Application; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Output\NullOutput; +use Symfony\Component\Console\Tester\CommandTester; + +/** + * @group functional + */ +class ConfigDebugCommandTest extends WebTestCase +{ + private $application; + + protected function setUp() + { + $kernel = static::createKernel(array('test_case' => 'ConfigDump', 'root_config' => 'config.yml')); + $this->application = new Application($kernel); + $this->application->doRun(new ArrayInput(array()), new NullOutput()); + } + + public function testDumpBundleName() + { + $tester = $this->createCommandTester(); + $ret = $tester->execute(array('name' => 'TestBundle')); + + $this->assertSame(0, $ret, 'Returns 0 in case of success'); + $this->assertContains('custom: foo', $tester->getDisplay()); + } + + public function testDumpBundleOption() + { + $tester = $this->createCommandTester(); + $ret = $tester->execute(array('name' => 'TestBundle', 'path' => 'custom')); + + $this->assertSame(0, $ret, 'Returns 0 in case of success'); + $this->assertContains('foo', $tester->getDisplay()); + } + + public function testParametersValuesAreResolved() + { + $tester = $this->createCommandTester(); + $ret = $tester->execute(array('name' => 'framework')); + + $this->assertSame(0, $ret, 'Returns 0 in case of success'); + $this->assertContains("locale: '%env(LOCALE)%'", $tester->getDisplay()); + $this->assertContains('secret: test', $tester->getDisplay()); + } + + public function testDumpUndefinedBundleOption() + { + $tester = $this->createCommandTester(); + $ret = $tester->execute(array('name' => 'TestBundle', 'path' => 'foo')); + + $this->assertContains('Unable to find configuration for "test.foo"', $tester->getDisplay()); + } + + /** + * @return CommandTester + */ + private function createCommandTester() + { + $command = $this->application->find('debug:config'); + + return new CommandTester($command); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b0ac90c31f5f7b6255b997af6ae36fc16c1bc8a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; + +use Symfony\Bundle\FrameworkBundle\Console\Application; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Output\NullOutput; +use Symfony\Component\Console\Tester\CommandTester; + +/** + * @group functional + */ +class ConfigDumpReferenceCommandTest extends WebTestCase +{ + private $application; + + protected function setUp() + { + $kernel = static::createKernel(array('test_case' => 'ConfigDump', 'root_config' => 'config.yml')); + $this->application = new Application($kernel); + $this->application->doRun(new ArrayInput(array()), new NullOutput()); + } + + public function testDumpBundleName() + { + $tester = $this->createCommandTester(); + $ret = $tester->execute(array('name' => 'TestBundle')); + + $this->assertSame(0, $ret, 'Returns 0 in case of success'); + $this->assertContains('test:', $tester->getDisplay()); + $this->assertContains(' custom:', $tester->getDisplay()); + } + + /** + * @return CommandTester + */ + private function createCommandTester() + { + $command = $this->application->find('config:dump-reference'); + + return new CommandTester($command); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDumpTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDumpTest.php new file mode 100644 index 0000000000000000000000000000000000000000..423d673be2f96e20ec565364d83a18dbd74d945c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDumpTest.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\Bundle\FrameworkBundle\Tests\Functional; + +/** + * Checks that the container compiles correctly when all the bundle features are enabled. + */ +class ContainerDumpTest extends WebTestCase +{ + public function testContainerCompilationInDebug() + { + $client = $this->createClient(array('test_case' => 'ContainerDump', 'root_config' => 'config.yml')); + + $this->assertTrue($client->getContainer()->has('serializer')); + } + + public function testContainerCompilation() + { + $client = $this->createClient(array('test_case' => 'ContainerDump', 'root_config' => 'config.yml', 'debug' => false)); + + $this->assertTrue($client->getContainer()->has('serializer')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dff65d636c0b9a6657043a118b51e6a40da104cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; + +class FragmentTest extends WebTestCase +{ + /** + * @dataProvider getConfigs + */ + public function testFragment($insulate) + { + $client = $this->createClient(array('test_case' => 'Fragment', 'root_config' => 'config.yml')); + if ($insulate) { + $client->insulate(); + } + + $client->request('GET', '/fragment_home'); + + $this->assertEquals('bar txt--html--es--fr', $client->getResponse()->getContent()); + } + + public function getConfigs() + { + return array( + array(false), + array(true), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2d422b02920814115a233ede5c752c4268dda512 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; + +class ProfilerTest extends WebTestCase +{ + /** + * @dataProvider getConfigs + */ + public function testProfilerIsDisabled($insulate) + { + $client = $this->createClient(array('test_case' => 'Profiler', 'root_config' => 'config.yml')); + if ($insulate) { + $client->insulate(); + } + + $client->request('GET', '/profiler'); + $this->assertFalse($client->getProfile()); + + // enable the profiler for the next request + $client->enableProfiler(); + $crawler = $client->request('GET', '/profiler'); + $profile = $client->getProfile(); + $this->assertInternalType('object', $profile); + + $client->request('GET', '/profiler'); + $this->assertFalse($client->getProfile()); + } + + public function getConfigs() + { + return array( + array(false), + array(true), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/PropertyInfoTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/PropertyInfoTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c02a6b84e519cccb28ffe8b9a0e251e8c2709b5f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/PropertyInfoTest.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; + +use Symfony\Component\PropertyInfo\Type; + +class PropertyInfoTest extends WebTestCase +{ + public function testPhpDocPriority() + { + static::bootKernel(array('test_case' => 'Serializer')); + $container = static::$kernel->getContainer(); + + $this->assertEquals(array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_INT))), $container->get('property_info')->getTypes('Symfony\Bundle\FrameworkBundle\Tests\Functional\Dummy', 'codes')); + } +} + +class Dummy +{ + /** + * @param int[] $codes + */ + public function setCodes(array $codes) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ee79850c47dfb621b45175ce84fb8c53990add3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.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\Bundle\FrameworkBundle\Tests\Functional; + +use Symfony\Component\Serializer\Normalizer\DataUriNormalizer; + +/** + * @author Kévin Dunglas + */ +class SerializerTest extends WebTestCase +{ + public function testDeserializeArrayOfObject() + { + if (!class_exists(DataUriNormalizer::class)) { + $this->markTestSkipped('This test is only applicable when using the Symfony Serializer Component version 3.1 or superior.'); + } + + static::bootKernel(array('test_case' => 'Serializer')); + $container = static::$kernel->getContainer(); + + $result = $container->get('serializer')->deserialize('{"bars": [{"id": 1}, {"id": 2}]}', Foo::class, 'json'); + + $bar1 = new Bar(); + $bar1->id = 1; + $bar2 = new Bar(); + $bar2->id = 2; + + $expected = new Foo(); + $expected->bars = array($bar1, $bar2); + + $this->assertEquals($expected, $result); + } +} + +class Foo +{ + /** + * @var Bar[] + */ + public $bars; +} + +class Bar +{ + /** + * @var int + */ + public $id; +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..415e031189c3aaef2c6375c273ea9e2632b9bdb2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.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\Bundle\FrameworkBundle\Tests\Functional; + +class SessionTest extends WebTestCase +{ + /** + * Tests session attributes persist. + * + * @dataProvider getConfigs + */ + public function testWelcome($config, $insulate) + { + $client = $this->createClient(array('test_case' => 'Session', 'root_config' => $config)); + if ($insulate) { + $client->insulate(); + } + + // no session + $crawler = $client->request('GET', '/session'); + $this->assertContains('You are new here and gave no name.', $crawler->text()); + + // remember name + $crawler = $client->request('GET', '/session/drak'); + $this->assertContains('Hello drak, nice to meet you.', $crawler->text()); + + // prove remembered name + $crawler = $client->request('GET', '/session'); + $this->assertContains('Welcome back drak, nice to meet you.', $crawler->text()); + + // clear session + $crawler = $client->request('GET', '/session_logout'); + $this->assertContains('Session cleared.', $crawler->text()); + + // prove cleared session + $crawler = $client->request('GET', '/session'); + $this->assertContains('You are new here and gave no name.', $crawler->text()); + } + + /** + * Tests flash messages work in practice. + * + * @dataProvider getConfigs + */ + public function testFlash($config, $insulate) + { + $client = $this->createClient(array('test_case' => 'Session', 'root_config' => $config)); + if ($insulate) { + $client->insulate(); + } + + // set flash + $crawler = $client->request('GET', '/session_setflash/Hello%20world.'); + + // check flash displays on redirect + $this->assertContains('Hello world.', $client->followRedirect()->text()); + + // check flash is gone + $crawler = $client->request('GET', '/session_showflash'); + $this->assertContains('No flash was set.', $crawler->text()); + } + + /** + * See if two separate insulated clients can run without + * polluting eachother's session data. + * + * @dataProvider getConfigs + */ + public function testTwoClients($config, $insulate) + { + // start first client + $client1 = $this->createClient(array('test_case' => 'Session', 'root_config' => $config)); + if ($insulate) { + $client1->insulate(); + } + + // start second client + $client2 = $this->createClient(array('test_case' => 'Session', 'root_config' => $config)); + if ($insulate) { + $client2->insulate(); + } + + // new session, so no name set. + $crawler1 = $client1->request('GET', '/session'); + $this->assertContains('You are new here and gave no name.', $crawler1->text()); + + // set name of client1 + $crawler1 = $client1->request('GET', '/session/client1'); + $this->assertContains('Hello client1, nice to meet you.', $crawler1->text()); + + // no session for client2 + $crawler2 = $client2->request('GET', '/session'); + $this->assertContains('You are new here and gave no name.', $crawler2->text()); + + // remember name client2 + $crawler2 = $client2->request('GET', '/session/client2'); + $this->assertContains('Hello client2, nice to meet you.', $crawler2->text()); + + // prove remembered name of client1 + $crawler1 = $client1->request('GET', '/session'); + $this->assertContains('Welcome back client1, nice to meet you.', $crawler1->text()); + + // prove remembered name of client2 + $crawler2 = $client2->request('GET', '/session'); + $this->assertContains('Welcome back client2, nice to meet you.', $crawler2->text()); + + // clear client1 + $crawler1 = $client1->request('GET', '/session_logout'); + $this->assertContains('Session cleared.', $crawler1->text()); + + // prove client1 data is cleared + $crawler1 = $client1->request('GET', '/session'); + $this->assertContains('You are new here and gave no name.', $crawler1->text()); + + // prove remembered name of client2 remains untouched. + $crawler2 = $client2->request('GET', '/session'); + $this->assertContains('Welcome back client2, nice to meet you.', $crawler2->text()); + } + + public function getConfigs() + { + return array( + // configfile, insulate + array('config.yml', true), + array('config.yml', false), + ); + } + + protected function setUp() + { + parent::setUp(); + + $this->deleteTmpDir('SessionTest'); + } + + protected function tearDown() + { + parent::tearDown(); + + $this->deleteTmpDir('SessionTest'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SubRequestsTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SubRequestsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2aaeb220f71890403b2135b9cfbde4c96f4bad65 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SubRequestsTest.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; + +class SubRequestsTest extends WebTestCase +{ + public function testStateAfterSubRequest() + { + $client = $this->createClient(array('test_case' => 'Session', 'root_config' => 'config.yml')); + $client->request('GET', 'https://localhost/subrequest/en'); + + $this->assertEquals('--fr/json--en/html--fr/json--http://localhost/subrequest/fragment/en', $client->getResponse()->getContent()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/WebTestCase.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/WebTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..50d4cfa4db2697bbcb2647d2fefc30329e61f230 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/WebTestCase.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\Bundle\FrameworkBundle\Tests\Functional; + +use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpKernel\Kernel; + +class WebTestCase extends BaseWebTestCase +{ + public static function assertRedirect($response, $location) + { + self::assertTrue($response->isRedirect(), 'Response is not a redirect, got status code: '.$response->getStatusCode()); + self::assertEquals('http://localhost'.$location, $response->headers->get('Location')); + } + + protected function deleteTmpDir($testCase) + { + if (!file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$testCase)) { + return; + } + + $fs = new Filesystem(); + $fs->remove($dir); + } + + protected static function getKernelClass() + { + require_once __DIR__.'/app/AppKernel.php'; + + return 'Symfony\Bundle\FrameworkBundle\Tests\Functional\app\AppKernel'; + } + + protected static function createKernel(array $options = array()) + { + $class = self::getKernelClass(); + + if (!isset($options['test_case'])) { + throw new \InvalidArgumentException('The option "test_case" must be set.'); + } + + return new $class( + $options['test_case'], + isset($options['root_config']) ? $options['root_config'] : 'config.yml', + isset($options['environment']) ? $options['environment'] : 'frameworkbundletest'.strtolower($options['test_case']), + isset($options['debug']) ? $options['debug'] : true + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..f3290d77285419dc385ca3ad8461828a12f79cd8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/bundles.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; +use Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle; + +return array( + new FrameworkBundle(), + new TestBundle(), + new SensioFrameworkExtraBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..377d3e785206443b5a733eeebda98df3fb36991e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/config.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../config/default.yml } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/routing.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..ebd18a0a4c282d37e06ec709b0ff91ee10f33bfc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/routing.yml @@ -0,0 +1,4 @@ +annotated_controller: + prefix: /annotated + resource: "@TestBundle/Controller/AnnotatedController.php" + type: annotation diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php new file mode 100644 index 0000000000000000000000000000000000000000..b07d44fe22be50f171c1985acc9f2aa893992bb8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\app; + +// get the autoload file +$dir = __DIR__; +$lastDir = null; +while ($dir !== $lastDir) { + $lastDir = $dir; + + if (file_exists($dir.'/autoload.php')) { + require_once $dir.'/autoload.php'; + break; + } + + if (file_exists($dir.'/autoload.php.dist')) { + require_once $dir.'/autoload.php.dist'; + break; + } + + if (file_exists($dir.'/vendor/autoload.php')) { + require_once $dir.'/vendor/autoload.php'; + break; + } + + $dir = dirname($dir); +} + +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpKernel\Kernel; + +/** + * App Test Kernel for functional tests. + * + * @author Johannes M. Schmitt + */ +class AppKernel extends Kernel +{ + private $testCase; + private $rootConfig; + + public function __construct($testCase, $rootConfig, $environment, $debug) + { + if (!is_dir(__DIR__.'/'.$testCase)) { + throw new \InvalidArgumentException(sprintf('The test case "%s" does not exist.', $testCase)); + } + $this->testCase = $testCase; + + $fs = new Filesystem(); + if (!$fs->isAbsolutePath($rootConfig) && !file_exists($rootConfig = __DIR__.'/'.$testCase.'/'.$rootConfig)) { + throw new \InvalidArgumentException(sprintf('The root config "%s" does not exist.', $rootConfig)); + } + $this->rootConfig = $rootConfig; + + parent::__construct($environment, $debug); + } + + public function registerBundles() + { + if (!file_exists($filename = $this->getRootDir().'/'.$this->testCase.'/bundles.php')) { + throw new \RuntimeException(sprintf('The bundles file "%s" does not exist.', $filename)); + } + + return include $filename; + } + + public function getRootDir() + { + return __DIR__; + } + + public function getCacheDir() + { + return sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$this->testCase.'/cache/'.$this->environment; + } + + public function getLogDir() + { + return sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$this->testCase.'/logs'; + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + $loader->load($this->rootConfig); + } + + public function serialize() + { + return serialize(array($this->testCase, $this->rootConfig, $this->getEnvironment(), $this->isDebug())); + } + + public function unserialize($str) + { + $a = unserialize($str); + $this->__construct($a[0], $a[1], $a[2], $a[3]); + } + + protected function getKernelParameters() + { + $parameters = parent::getKernelParameters(); + $parameters['kernel.test_case'] = $this->testCase; + + return $parameters; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AutowiringTypes/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AutowiringTypes/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..a73987bcc986acd0ffbb8ea9da38648269e02d64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AutowiringTypes/bundles.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; + +return array( + new FrameworkBundle(), + new TestBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AutowiringTypes/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AutowiringTypes/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..a44078cc499b3b846f0191c63ca9347a0cc45f89 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AutowiringTypes/config.yml @@ -0,0 +1,10 @@ +imports: + - { resource: ../config/default.yml } + +services: + test.autowiring_types.autowired_services: + class: Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\AutowiringTypes\AutowiredServices + autowire: true +framework: + templating: + engines: ['php'] diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AutowiringTypes/no_annotations_cache.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AutowiringTypes/no_annotations_cache.yml new file mode 100644 index 0000000000000000000000000000000000000000..fec387d87962d5ea05eb38f9c7c4c7883292b2ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AutowiringTypes/no_annotations_cache.yml @@ -0,0 +1,6 @@ +imports: + - { resource: config.yml } + +framework: + annotations: + cache: none diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..a73987bcc986acd0ffbb8ea9da38648269e02d64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/bundles.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; + +return array( + new FrameworkBundle(), + new TestBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..eabf83825e05d6627c770717fa1ffe31e270dfd0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/config.yml @@ -0,0 +1,13 @@ +imports: + - { resource: ../config/default.yml } + +framework: + cache: + pools: + cache.pool1: + public: true + cache.pool2: + public: true + adapter: cache.pool3 + cache.pool3: + clearer: ~ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/redis_config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/redis_config.yml new file mode 100644 index 0000000000000000000000000000000000000000..2794a72c809d9017591df31f5914d26cc4102bc9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/redis_config.yml @@ -0,0 +1,13 @@ +imports: + - { resource: ../config/default.yml } + +framework: + cache: + app: cache.adapter.redis + default_redis_provider: "redis://%redis_host%" + pools: + cache.pool1: + public: true + cache.pool2: + public: true + clearer: ~ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/redis_custom_config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/redis_custom_config.yml new file mode 100644 index 0000000000000000000000000000000000000000..70a51b272e5a441393120ab5ad31ba0c8ac65ccc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/redis_custom_config.yml @@ -0,0 +1,24 @@ +imports: + - { resource: ../config/default.yml } + +services: + cache.test_redis_connection: + public: false + class: Redis + calls: + - [connect, ['%redis_host%']] + + cache.app: + parent: cache.adapter.redis + tags: + - name: cache.pool + provider: cache.test_redis_connection + +framework: + cache: + pools: + cache.pool1: + public: true + cache.pool2: + public: true + clearer: ~ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ConfigDump/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ConfigDump/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..a73987bcc986acd0ffbb8ea9da38648269e02d64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ConfigDump/bundles.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; + +return array( + new FrameworkBundle(), + new TestBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ConfigDump/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ConfigDump/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..c1d1288046050e15d058558c5d83be6d0ff85eb0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ConfigDump/config.yml @@ -0,0 +1,10 @@ +imports: + - { resource: ../config/default.yml } + +framework: + secret: '%secret%' + default_locale: '%env(LOCALE)%' + +parameters: + env(LOCALE): en + secret: test diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..a73987bcc986acd0ffbb8ea9da38648269e02d64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/bundles.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; + +return array( + new FrameworkBundle(), + new TestBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..29f1e32ff964f776c3c7363d6b52740079a5086e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/config.yml @@ -0,0 +1,21 @@ +imports: + - { resource: ../config/default.yml } + +framework: + esi: true + ssi: true + fragments: true + profiler: true + router: true + session: true + request: true + templating: + enabled: true + engines: ['php'] + assets: true + translator: true + validation: true + serializer: true + property_info: true + csrf_protection: true + form: true diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..a73987bcc986acd0ffbb8ea9da38648269e02d64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/bundles.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; + +return array( + new FrameworkBundle(), + new TestBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..f7ea83dfa7cefc7d58df8d7c589fd61e35bbb2cc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/config.yml @@ -0,0 +1,7 @@ +imports: + - { resource: ../config/default.yml } + +framework: + fragments: ~ + templating: + engines: ['php'] diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/routing.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..8a9bd84b14de18cd205ce56da159c695e9198cb8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/routing.yml @@ -0,0 +1,2 @@ +_fragmenttest_bundle: + resource: '@TestBundle/Resources/config/routing.yml' diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..a73987bcc986acd0ffbb8ea9da38648269e02d64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/bundles.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; + +return array( + new FrameworkBundle(), + new TestBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..12ce67e548ea07d823c0b03a9a1ef27de8af57f5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/config.yml @@ -0,0 +1,7 @@ +imports: + - { resource: ../config/default.yml } + +framework: + profiler: + enabled: true + collect: false diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/routing.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..d4b77c3f703d915240e267c59277c0cf72afb4e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/routing.yml @@ -0,0 +1,2 @@ +_sessiontest_bundle: + resource: '@TestBundle/Resources/config/routing.yml' diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Resources/views/fragment.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Resources/views/fragment.html.php new file mode 100644 index 0000000000000000000000000000000000000000..8ea3c36f8a4d02f8f0a465ec1bbdeca92aa52035 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Resources/views/fragment.html.php @@ -0,0 +1,14 @@ +get('actions')->render($this->get('actions')->controller('TestBundle:Fragment:inlined', array( + 'options' => array( + 'bar' => $bar, + 'eleven' => 11, + ), + ))); +?>--get('actions')->render($this->get('actions')->controller('TestBundle:Fragment:customformat', array('_format' => 'html'))); +?>--get('actions')->render($this->get('actions')->controller('TestBundle:Fragment:customlocale', array('_locale' => 'es'))); +?>--getRequest()->setLocale('fr'); + echo $this->get('actions')->render($this->get('actions')->controller('TestBundle:Fragment:forwardlocale')); +?> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Serializer/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Serializer/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..144db90236034313fe1eaf2a060b379611595f0c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Serializer/bundles.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; + +return array( + new FrameworkBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Serializer/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Serializer/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..cac135c315d00939cca657ae7281e00fde42df82 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Serializer/config.yml @@ -0,0 +1,6 @@ +imports: + - { resource: ../config/default.yml } + +framework: + serializer: { enabled: true } + property_info: { enabled: true } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..a73987bcc986acd0ffbb8ea9da38648269e02d64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/bundles.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; + +return array( + new FrameworkBundle(), + new TestBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..65dd6c7fa91f1f899d1752c4332201628c22f246 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/config.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ./../config/default.yml } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/routing.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..d4b77c3f703d915240e267c59277c0cf72afb4e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/routing.yml @@ -0,0 +1,2 @@ +_sessiontest_bundle: + resource: '@TestBundle/Resources/config/routing.yml' diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/default.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/default.yml new file mode 100644 index 0000000000000000000000000000000000000000..8ddd7ed925a80c1d8afc656cb05fd581aa467a8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/default.yml @@ -0,0 +1,2 @@ +imports: + - { resource: framework.yml } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/framework.yml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/framework.yml new file mode 100644 index 0000000000000000000000000000000000000000..a313b3339a089b15e576918e28116c1bb544aee2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/framework.yml @@ -0,0 +1,13 @@ +framework: + secret: test + router: { resource: "%kernel.root_dir%/%kernel.test_case%/routing.yml" } + validation: { enabled: true, enable_annotations: true } + csrf_protection: true + form: true + test: ~ + default_locale: en + session: + storage_id: session.storage.mock_file + +services: + logger: { class: Psr\Log\NullLogger } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php new file mode 100644 index 0000000000000000000000000000000000000000..02bed823823e472e1f3383f37128afec2b16da21 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Kernel; + +use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Routing\RouteCollectionBuilder; + +class ConcreteMicroKernel extends Kernel +{ + use MicroKernelTrait; + + private $cacheDir; + + public function halloweenAction() + { + return new Response('halloween'); + } + + public function registerBundles() + { + return array( + new FrameworkBundle(), + ); + } + + public function getCacheDir() + { + return $this->cacheDir = sys_get_temp_dir().'/sf_micro_kernel'; + } + + public function getLogDir() + { + return $this->cacheDir; + } + + public function __destruct() + { + $fs = new Filesystem(); + $fs->remove($this->cacheDir); + } + + protected function configureRoutes(RouteCollectionBuilder $routes) + { + $routes->add('/', 'kernel:halloweenAction'); + } + + protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader) + { + $c->loadFromExtension('framework', array( + 'secret' => '$ecret', + )); + + $c->setParameter('halloween', 'Have a great day!'); + $c->register('halloween', 'stdClass'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/MicroKernelTraitTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/MicroKernelTraitTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5fde7f27f8c4269dc79b7639f4cb19111a3399aa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/MicroKernelTraitTest.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Kernel; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; + +class MicroKernelTraitTest extends TestCase +{ + public function test() + { + $kernel = new ConcreteMicroKernel('test', true); + $kernel->boot(); + + $request = Request::create('/'); + $response = $kernel->handle($request); + + $this->assertEquals('halloween', $response->getContent()); + $this->assertEquals('Have a great day!', $kernel->getContainer()->getParameter('halloween')); + $this->assertInstanceOf('stdClass', $kernel->getContainer()->get('halloween')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/DelegatingLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/DelegatingLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..407158333d89e4c7f5403fd059071b83602862a0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/DelegatingLoaderTest.php @@ -0,0 +1,20 @@ +getMockBuilder(ControllerNameParser::class) + ->disableOriginalConstructor() + ->getMock(); + new DelegatingLoader($controllerNameParser, new LoaderResolver()); + $this->assertTrue(true, '__construct() takes a ControllerNameParser and LoaderResolverInterface respectively as its first and second argument.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableUrlMatcherTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableUrlMatcherTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fb5395ea6d26d3b6ba897adea2ea1bbdce5d858b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableUrlMatcherTest.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Routing; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher; +use Symfony\Component\Routing\RequestContext; + +class RedirectableUrlMatcherTest extends TestCase +{ + public function testRedirectWhenNoSlash() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo/')); + + $matcher = new RedirectableUrlMatcher($coll, $context = new RequestContext()); + + $this->assertEquals(array( + '_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction', + 'path' => '/foo/', + 'permanent' => true, + 'scheme' => null, + 'httpPort' => $context->getHttpPort(), + 'httpsPort' => $context->getHttpsPort(), + '_route' => null, + ), + $matcher->match('/foo') + ); + } + + public function testSchemeRedirect() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('https'))); + + $matcher = new RedirectableUrlMatcher($coll, $context = new RequestContext()); + + $this->assertEquals(array( + '_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction', + 'path' => '/foo', + 'permanent' => true, + 'scheme' => 'https', + 'httpPort' => $context->getHttpPort(), + 'httpsPort' => $context->getHttpsPort(), + '_route' => 'foo', + ), + $matcher->match('/foo') + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..677fc4843c7dc28f8994e3019d517aaa58f94e74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.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\Bundle\FrameworkBundle\Tests\Routing; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\Routing\Router; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +class RouterTest extends TestCase +{ + public function testGenerateWithServiceParam() + { + $routes = new RouteCollection(); + + $routes->add('foo', new Route( + ' /{_locale}', + array( + '_locale' => '%locale%', + ), + array( + '_locale' => 'en|es', + ), array(), '', array(), array(), '"%foo%" == "bar"' + )); + + $sc = $this->getServiceContainer($routes); + $sc->setParameter('locale', 'es'); + $sc->setParameter('foo', 'bar'); + + $router = new Router($sc, 'foo'); + + $this->assertSame('/en', $router->generate('foo', array('_locale' => 'en'))); + $this->assertSame('/', $router->generate('foo', array('_locale' => 'es'))); + $this->assertSame('"bar" == "bar"', $router->getRouteCollection()->get('foo')->getCondition()); + } + + public function testDefaultsPlaceholders() + { + $routes = new RouteCollection(); + + $routes->add('foo', new Route( + '/foo', + array( + 'foo' => 'before_%parameter.foo%', + 'bar' => '%parameter.bar%_after', + 'baz' => '%%escaped%%', + 'boo' => array('%parameter%', '%%escaped_parameter%%', array('%bee_parameter%', 'bee')), + 'bee' => array('bee', 'bee'), + ), + array( + ) + )); + + $sc = $this->getServiceContainer($routes); + + $sc->setParameter('parameter.foo', 'foo'); + $sc->setParameter('parameter.bar', 'bar'); + $sc->setParameter('parameter', 'boo'); + $sc->setParameter('bee_parameter', 'foo_bee'); + + $router = new Router($sc, 'foo'); + $route = $router->getRouteCollection()->get('foo'); + + $this->assertEquals( + array( + 'foo' => 'before_foo', + 'bar' => 'bar_after', + 'baz' => '%escaped%', + 'boo' => array('boo', '%escaped_parameter%', array('foo_bee', 'bee')), + 'bee' => array('bee', 'bee'), + ), + $route->getDefaults() + ); + } + + public function testRequirementsPlaceholders() + { + $routes = new RouteCollection(); + + $routes->add('foo', new Route( + '/foo', + array( + ), + array( + 'foo' => 'before_%parameter.foo%', + 'bar' => '%parameter.bar%_after', + 'baz' => '%%escaped%%', + ) + )); + + $sc = $this->getServiceContainer($routes); + $sc->setParameter('parameter.foo', 'foo'); + $sc->setParameter('parameter.bar', 'bar'); + + $router = new Router($sc, 'foo'); + $route = $router->getRouteCollection()->get('foo'); + + $this->assertEquals( + array( + 'foo' => 'before_foo', + 'bar' => 'bar_after', + 'baz' => '%escaped%', + ), + $route->getRequirements() + ); + } + + public function testPatternPlaceholders() + { + $routes = new RouteCollection(); + + $routes->add('foo', new Route('/before/%parameter.foo%/after/%%escaped%%')); + + $sc = $this->getServiceContainer($routes); + $sc->setParameter('parameter.foo', 'foo'); + + $router = new Router($sc, 'foo'); + $route = $router->getRouteCollection()->get('foo'); + + $this->assertEquals( + '/before/foo/after/%escaped%', + $route->getPath() + ); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage Using "%env(FOO)%" is not allowed in routing configuration. + */ + public function testEnvPlaceholders() + { + $routes = new RouteCollection(); + + $routes->add('foo', new Route('/%env(FOO)%')); + + $router = new Router($this->getServiceContainer($routes), 'foo'); + $router->getRouteCollection(); + } + + public function testHostPlaceholders() + { + $routes = new RouteCollection(); + + $route = new Route('foo'); + $route->setHost('/before/%parameter.foo%/after/%%escaped%%'); + + $routes->add('foo', $route); + + $sc = $this->getServiceContainer($routes); + $sc->setParameter('parameter.foo', 'foo'); + + $router = new Router($sc, 'foo'); + $route = $router->getRouteCollection()->get('foo'); + + $this->assertEquals( + '/before/foo/after/%escaped%', + $route->getHost() + ); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException + * @expectedExceptionMessage You have requested a non-existent parameter "nope". + */ + public function testExceptionOnNonExistentParameter() + { + $routes = new RouteCollection(); + + $routes->add('foo', new Route('/%nope%')); + + $sc = $this->getServiceContainer($routes); + + $router = new Router($sc, 'foo'); + $router->getRouteCollection()->get('foo'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage The container parameter "object", used in the route configuration value "/%object%", must be a string or numeric, but it is of type object. + */ + public function testExceptionOnNonStringParameter() + { + $routes = new RouteCollection(); + + $routes->add('foo', new Route('/%object%')); + + $sc = $this->getServiceContainer($routes); + $sc->setParameter('object', new \stdClass()); + + $router = new Router($sc, 'foo'); + $router->getRouteCollection()->get('foo'); + } + + /** + * @dataProvider getNonStringValues + */ + public function testDefaultValuesAsNonStrings($value) + { + $routes = new RouteCollection(); + $routes->add('foo', new Route('foo', array('foo' => $value), array('foo' => '\d+'))); + + $sc = $this->getServiceContainer($routes); + + $router = new Router($sc, 'foo'); + + $route = $router->getRouteCollection()->get('foo'); + + $this->assertSame($value, $route->getDefault('foo')); + } + + public function getNonStringValues() + { + return array(array(null), array(false), array(true), array(new \stdClass()), array(array('foo', 'bar')), array(array(array()))); + } + + /** + * @param RouteCollection $routes + * + * @return \Symfony\Component\DependencyInjection\Container + */ + private function getServiceContainer(RouteCollection $routes) + { + $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + + $loader + ->expects($this->any()) + ->method('load') + ->will($this->returnValue($routes)) + ; + + $sc = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Container')->setMethods(array('get'))->getMock(); + + $sc + ->expects($this->once()) + ->method('get') + ->will($this->returnValue($loader)) + ; + + return $sc; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/DelegatingEngineTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/DelegatingEngineTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e3ff92b874c0824174952c30c95e013fd746d92c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/DelegatingEngineTest.php @@ -0,0 +1,125 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\Templating\DelegatingEngine; +use Symfony\Component\HttpFoundation\Response; + +class DelegatingEngineTest extends TestCase +{ + public function testSupportsRetrievesEngineFromTheContainer() + { + $container = $this->getContainerMock(array( + 'engine.first' => $this->getEngineMock('template.php', false), + 'engine.second' => $this->getEngineMock('template.php', true), + )); + + $delegatingEngine = new DelegatingEngine($container, array('engine.first', 'engine.second')); + + $this->assertTrue($delegatingEngine->supports('template.php')); + } + + public function testGetExistingEngine() + { + $firstEngine = $this->getEngineMock('template.php', false); + $secondEngine = $this->getEngineMock('template.php', true); + $container = $this->getContainerMock(array( + 'engine.first' => $firstEngine, + 'engine.second' => $secondEngine, + )); + + $delegatingEngine = new DelegatingEngine($container, array('engine.first', 'engine.second')); + + $this->assertSame($secondEngine, $delegatingEngine->getEngine('template.php')); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage No engine is able to work with the template "template.php" + */ + public function testGetInvalidEngine() + { + $firstEngine = $this->getEngineMock('template.php', false); + $secondEngine = $this->getEngineMock('template.php', false); + $container = $this->getContainerMock(array( + 'engine.first' => $firstEngine, + 'engine.second' => $secondEngine, + )); + + $delegatingEngine = new DelegatingEngine($container, array('engine.first', 'engine.second')); + $delegatingEngine->getEngine('template.php'); + } + + public function testRenderResponseWithFrameworkEngine() + { + $response = new Response(); + $engine = $this->getFrameworkEngineMock('template.php', true); + $engine->expects($this->once()) + ->method('renderResponse') + ->with('template.php', array('foo' => 'bar')) + ->will($this->returnValue($response)); + $container = $this->getContainerMock(array('engine' => $engine)); + + $delegatingEngine = new DelegatingEngine($container, array('engine')); + + $this->assertSame($response, $delegatingEngine->renderResponse('template.php', array('foo' => 'bar'))); + } + + public function testRenderResponseWithTemplatingEngine() + { + $engine = $this->getEngineMock('template.php', true); + $container = $this->getContainerMock(array('engine' => $engine)); + $delegatingEngine = new DelegatingEngine($container, array('engine')); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Response', $delegatingEngine->renderResponse('template.php', array('foo' => 'bar'))); + } + + private function getEngineMock($template, $supports) + { + $engine = $this->getMockBuilder('Symfony\Component\Templating\EngineInterface')->getMock(); + + $engine->expects($this->once()) + ->method('supports') + ->with($template) + ->will($this->returnValue($supports)); + + return $engine; + } + + private function getFrameworkEngineMock($template, $supports) + { + $engine = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Templating\EngineInterface')->getMock(); + + $engine->expects($this->once()) + ->method('supports') + ->with($template) + ->will($this->returnValue($supports)); + + return $engine; + } + + private function getContainerMock($services) + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + + $i = 0; + foreach ($services as $id => $service) { + $container->expects($this->at($i++)) + ->method('get') + ->with($id) + ->will($this->returnValue($service)); + } + + return $container; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..99fd38317efe8a6e979e2e8e97da66c661994f69 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; + +use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables; +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Component\DependencyInjection\Container; + +class GlobalVariablesTest extends TestCase +{ + private $container; + private $globals; + + protected function setUp() + { + $this->container = new Container(); + $this->globals = new GlobalVariables($this->container); + } + + public function testGetUserNoTokenStorage() + { + $this->assertNull($this->globals->getUser()); + } + + public function testGetUserNoToken() + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $this->container->set('security.token_storage', $tokenStorage); + $this->assertNull($this->globals->getUser()); + } + + /** + * @dataProvider getUserProvider + */ + public function testGetUser($user, $expectedUser) + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + $this->container->set('security.token_storage', $tokenStorage); + + $token + ->expects($this->once()) + ->method('getUser') + ->will($this->returnValue($user)); + + $tokenStorage + ->expects($this->once()) + ->method('getToken') + ->will($this->returnValue($token)); + + $this->assertSame($expectedUser, $this->globals->getUser()); + } + + public function getUserProvider() + { + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $std = new \stdClass(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + return array( + array($user, $user), + array($std, $std), + array($token, $token), + array('Anon.', null), + array(null, null), + array(10, null), + array(true, null), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..01fac959db90bcfa0d0c69b08ad6d0a033d0d03f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.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\Bundle\FrameworkBundle\Tests\Templating\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper; +use Symfony\Component\Asset\Package; +use Symfony\Component\Asset\Packages; +use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; + +class AssetsHelperTest extends TestCase +{ + private $helper; + + protected function setUp() + { + $fooPackage = new Package(new StaticVersionStrategy('42', '%s?v=%s')); + $barPackage = new Package(new StaticVersionStrategy('22', '%s?%s')); + + $packages = new Packages($fooPackage, array('bar' => $barPackage)); + + $this->helper = new AssetsHelper($packages); + } + + public function testGetUrl() + { + $this->assertEquals('me.png?v=42', $this->helper->getUrl('me.png')); + $this->assertEquals('me.png?22', $this->helper->getUrl('me.png', 'bar')); + } + + public function testGetVersion() + { + $this->assertEquals('42', $this->helper->getVersion('/')); + $this->assertEquals('22', $this->helper->getVersion('/', 'bar')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Fixtures/StubTemplateNameParser.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Fixtures/StubTemplateNameParser.php new file mode 100644 index 0000000000000000000000000000000000000000..3a66454947977a3d6fcb12c2186f314a583ecf85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Fixtures/StubTemplateNameParser.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\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures; + +use Symfony\Component\Templating\TemplateNameParserInterface; +use Symfony\Component\Templating\TemplateReference; + +class StubTemplateNameParser implements TemplateNameParserInterface +{ + private $root; + + private $rootTheme; + + public function __construct($root, $rootTheme) + { + $this->root = $root; + $this->rootTheme = $rootTheme; + } + + public function parse($name) + { + list($bundle, $controller, $template) = explode(':', $name, 3); + + if ($template[0] == '_') { + $path = $this->rootTheme.'/Custom/'.$template; + } elseif ($bundle === 'TestBundle') { + $path = $this->rootTheme.'/'.$controller.'/'.$template; + } else { + $path = $this->root.'/'.$controller.'/'.$template; + } + + return new TemplateReference($path, 'php'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Fixtures/StubTranslator.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Fixtures/StubTranslator.php new file mode 100644 index 0000000000000000000000000000000000000000..17d1fd4fc637bbc433971910aa8306b3a76c004b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Fixtures/StubTranslator.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures; + +use Symfony\Component\Translation\TranslatorInterface; + +class StubTranslator implements TranslatorInterface +{ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + return '[trans]'.$id.'[/trans]'; + } + + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + return '[trans]'.$id.'[/trans]'; + } + + public function setLocale($locale) + { + } + + public function getLocale() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php new file mode 100644 index 0000000000000000000000000000000000000000..74bdd81604d4ede3a2f9266d47ec1e77fd80123c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php @@ -0,0 +1,142 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper; + +use Symfony\Component\Form\FormView; +use Symfony\Component\Form\Extension\Templating\TemplatingExtension; +use Symfony\Component\Form\Tests\AbstractDivLayoutTest; +use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTemplateNameParser; +use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTranslator; +use Symfony\Component\Templating\PhpEngine; +use Symfony\Component\Templating\Loader\FilesystemLoader; +use Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper; + +class FormHelperDivLayoutTest extends AbstractDivLayoutTest +{ + /** + * @var PhpEngine + */ + protected $engine; + + protected function getExtensions() + { + // should be moved to the Form component once absolute file paths are supported + // by the default name parser in the Templating component + $reflClass = new \ReflectionClass('Symfony\Bundle\FrameworkBundle\FrameworkBundle'); + $root = realpath(dirname($reflClass->getFileName()).'/Resources/views'); + $rootTheme = realpath(__DIR__.'/Resources'); + $templateNameParser = new StubTemplateNameParser($root, $rootTheme); + $loader = new FilesystemLoader(array()); + + $this->engine = new PhpEngine($templateNameParser, $loader); + $this->engine->addGlobal('global', ''); + $this->engine->setHelpers(array( + new TranslatorHelper(new StubTranslator()), + )); + + return array_merge(parent::getExtensions(), array( + new TemplatingExtension($this->engine, $this->csrfTokenManager, array( + 'FrameworkBundle:Form', + )), + )); + } + + protected function tearDown() + { + $this->engine = null; + + parent::tearDown(); + } + + public function testStartTagHasNoActionAttributeWhenActionIsEmpty() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => '', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('', $html); + } + + public function testStartTagHasActionAttributeWhenActionIsZero() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => '0', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('', $html); + } + + protected function renderForm(FormView $view, array $vars = array()) + { + return (string) $this->engine->get('form')->form($view, $vars); + } + + protected function renderLabel(FormView $view, $label = null, array $vars = array()) + { + return (string) $this->engine->get('form')->label($view, $label, $vars); + } + + protected function renderErrors(FormView $view) + { + return (string) $this->engine->get('form')->errors($view); + } + + protected function renderWidget(FormView $view, array $vars = array()) + { + return (string) $this->engine->get('form')->widget($view, $vars); + } + + protected function renderRow(FormView $view, array $vars = array()) + { + return (string) $this->engine->get('form')->row($view, $vars); + } + + protected function renderRest(FormView $view, array $vars = array()) + { + return (string) $this->engine->get('form')->rest($view, $vars); + } + + protected function renderStart(FormView $view, array $vars = array()) + { + return (string) $this->engine->get('form')->start($view, $vars); + } + + protected function renderEnd(FormView $view, array $vars = array()) + { + return (string) $this->engine->get('form')->end($view, $vars); + } + + protected function setTheme(FormView $view, array $themes) + { + $this->engine->get('form')->setTheme($view, $themes); + } + + public static function themeBlockInheritanceProvider() + { + return array( + array(array('TestBundle:Parent')), + ); + } + + public static function themeInheritanceProvider() + { + return array( + array(array('TestBundle:Parent'), array('TestBundle:Child')), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1e67134c8cb27f8e27f946dcfa23eed40ee857fb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper; + +use Symfony\Component\Form\FormView; +use Symfony\Component\Form\Extension\Templating\TemplatingExtension; +use Symfony\Component\Form\Tests\AbstractTableLayoutTest; +use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTemplateNameParser; +use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTranslator; +use Symfony\Component\Templating\PhpEngine; +use Symfony\Component\Templating\Loader\FilesystemLoader; +use Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper; + +class FormHelperTableLayoutTest extends AbstractTableLayoutTest +{ + /** + * @var PhpEngine + */ + protected $engine; + + public function testStartTagHasNoActionAttributeWhenActionIsEmpty() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => '', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('', $html); + } + + public function testStartTagHasActionAttributeWhenActionIsZero() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => '0', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('', $html); + } + + protected function getExtensions() + { + // should be moved to the Form component once absolute file paths are supported + // by the default name parser in the Templating component + $reflClass = new \ReflectionClass('Symfony\Bundle\FrameworkBundle\FrameworkBundle'); + $root = realpath(dirname($reflClass->getFileName()).'/Resources/views'); + $rootTheme = realpath(__DIR__.'/Resources'); + $templateNameParser = new StubTemplateNameParser($root, $rootTheme); + $loader = new FilesystemLoader(array()); + + $this->engine = new PhpEngine($templateNameParser, $loader); + $this->engine->addGlobal('global', ''); + $this->engine->setHelpers(array( + new TranslatorHelper(new StubTranslator()), + )); + + return array_merge(parent::getExtensions(), array( + new TemplatingExtension($this->engine, $this->csrfTokenManager, array( + 'FrameworkBundle:Form', + 'FrameworkBundle:FormTable', + )), + )); + } + + protected function tearDown() + { + $this->engine = null; + + parent::tearDown(); + } + + protected function renderForm(FormView $view, array $vars = array()) + { + return (string) $this->engine->get('form')->form($view, $vars); + } + + protected function renderLabel(FormView $view, $label = null, array $vars = array()) + { + return (string) $this->engine->get('form')->label($view, $label, $vars); + } + + protected function renderErrors(FormView $view) + { + return (string) $this->engine->get('form')->errors($view); + } + + protected function renderWidget(FormView $view, array $vars = array()) + { + return (string) $this->engine->get('form')->widget($view, $vars); + } + + protected function renderRow(FormView $view, array $vars = array()) + { + return (string) $this->engine->get('form')->row($view, $vars); + } + + protected function renderRest(FormView $view, array $vars = array()) + { + return (string) $this->engine->get('form')->rest($view, $vars); + } + + protected function renderStart(FormView $view, array $vars = array()) + { + return (string) $this->engine->get('form')->start($view, $vars); + } + + protected function renderEnd(FormView $view, array $vars = array()) + { + return (string) $this->engine->get('form')->end($view, $vars); + } + + protected function setTheme(FormView $view, array $themes) + { + $this->engine->get('form')->setTheme($view, $themes); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/RequestHelperTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/RequestHelperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4ece72e47e1252043df5b402dd910549bbfe3ce6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/RequestHelperTest.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Bundle\FrameworkBundle\Templating\Helper\RequestHelper; + +class RequestHelperTest extends TestCase +{ + protected $requestStack; + + protected function setUp() + { + $this->requestStack = new RequestStack(); + $request = new Request(); + $request->initialize(array('foobar' => 'bar')); + $this->requestStack->push($request); + } + + public function testGetParameter() + { + $helper = new RequestHelper($this->requestStack); + + $this->assertEquals('bar', $helper->getParameter('foobar')); + $this->assertEquals('foo', $helper->getParameter('bar', 'foo')); + + $this->assertNull($helper->getParameter('foo')); + } + + public function testGetLocale() + { + $helper = new RequestHelper($this->requestStack); + + $this->assertEquals('en', $helper->getLocale()); + } + + public function testGetName() + { + $helper = new RequestHelper($this->requestStack); + + $this->assertEquals('request', $helper->getName()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Child/form_label.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Child/form_label.html.php new file mode 100644 index 0000000000000000000000000000000000000000..0c1af407cb9fcd01abf90218838143a9e57a1783 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Child/form_label.html.php @@ -0,0 +1 @@ + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_c_entry_label.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_c_entry_label.html.php new file mode 100644 index 0000000000000000000000000000000000000000..05240035c023df78efbec4691ccb56ff650dc6a1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_c_entry_label.html.php @@ -0,0 +1,2 @@ +humanize($name); } ?> + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_names_entry_label.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_names_entry_label.html.php new file mode 100644 index 0000000000000000000000000000000000000000..e165a429a5ff83429d316bc3274d02b5586152e4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_names_entry_label.html.php @@ -0,0 +1,4 @@ +humanize($name); +} ?> + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_text_id_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_text_id_widget.html.php new file mode 100644 index 0000000000000000000000000000000000000000..078fe57583f1c7d0da452250ce13f055546708e1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_text_id_widget.html.php @@ -0,0 +1,3 @@ +
    + widget($form) ?> +
    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Parent/form_label.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Parent/form_label.html.php new file mode 100644 index 0000000000000000000000000000000000000000..068c5dec3ff48225d79002097518b9cea93ff348 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Parent/form_label.html.php @@ -0,0 +1 @@ + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Parent/form_widget_simple.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Parent/form_widget_simple.html.php new file mode 100644 index 0000000000000000000000000000000000000000..3c6c158a53d8c34235537d56bc630d3a66a3663d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Parent/form_widget_simple.html.php @@ -0,0 +1,2 @@ + +block($form, 'widget_attributes') ?> value="" rel="theme" /> diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f664a49b12eec22f483df8de5e2b53978bb88dea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; +use Symfony\Bundle\FrameworkBundle\Templating\Helper\SessionHelper; + +class SessionHelperTest extends TestCase +{ + protected $requestStack; + + protected function setUp() + { + $request = new Request(); + + $session = new Session(new MockArraySessionStorage()); + $session->set('foobar', 'bar'); + $session->getFlashBag()->set('notice', 'bar'); + + $request->setSession($session); + + $this->requestStack = new RequestStack(); + $this->requestStack->push($request); + } + + protected function tearDown() + { + $this->requestStack = null; + } + + public function testFlash() + { + $helper = new SessionHelper($this->requestStack); + + $this->assertTrue($helper->hasFlash('notice')); + + $this->assertEquals(array('bar'), $helper->getFlash('notice')); + } + + public function testGetFlashes() + { + $helper = new SessionHelper($this->requestStack); + $this->assertEquals(array('notice' => array('bar')), $helper->getFlashes()); + } + + public function testGet() + { + $helper = new SessionHelper($this->requestStack); + + $this->assertEquals('bar', $helper->get('foobar')); + $this->assertEquals('foo', $helper->get('bar', 'foo')); + + $this->assertNull($helper->get('foo')); + } + + public function testGetName() + { + $helper = new SessionHelper($this->requestStack); + + $this->assertEquals('session', $helper->getName()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/StopwatchHelperTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/StopwatchHelperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cf7b627a499a6bc0abff2e9264af90ba0aa5443f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/StopwatchHelperTest.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\Templating\Helper\StopwatchHelper; + +class StopwatchHelperTest extends TestCase +{ + public function testDevEnvironment() + { + $stopwatch = $this->getMockBuilder('Symfony\Component\Stopwatch\Stopwatch')->getMock(); + $stopwatch->expects($this->once()) + ->method('start') + ->with('foo'); + + $helper = new StopwatchHelper($stopwatch); + $helper->start('foo'); + } + + public function testProdEnvironment() + { + $helper = new StopwatchHelper(null); + + try { + $helper->start('foo'); + } catch (\BadMethodCallException $e) { + $this->fail('Assumed stopwatch is not called when not provided'); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Loader/TemplateLocatorTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Loader/TemplateLocatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..96d75e3c3e0c077a12c1b8a55626789aaa2eb1c3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Loader/TemplateLocatorTest.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Loader; + +use Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator; +use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; + +class TemplateLocatorTest extends TestCase +{ + public function testLocateATemplate() + { + $template = new TemplateReference('bundle', 'controller', 'name', 'format', 'engine'); + + $fileLocator = $this->getFileLocator(); + + $fileLocator + ->expects($this->once()) + ->method('locate') + ->with($template->getPath()) + ->will($this->returnValue('/path/to/template')) + ; + + $locator = new TemplateLocator($fileLocator); + + $this->assertEquals('/path/to/template', $locator->locate($template)); + + // Assert cache is used as $fileLocator->locate should be called only once + $this->assertEquals('/path/to/template', $locator->locate($template)); + } + + public function testLocateATemplateFromCacheDir() + { + $template = new TemplateReference('bundle', 'controller', 'name', 'format', 'engine'); + + $fileLocator = $this->getFileLocator(); + + $locator = new TemplateLocator($fileLocator, __DIR__.'/../../Fixtures'); + + $this->assertEquals(realpath(__DIR__.'/../../Fixtures/Resources/views/this.is.a.template.format.engine'), $locator->locate($template)); + } + + public function testThrowsExceptionWhenTemplateNotFound() + { + $template = new TemplateReference('bundle', 'controller', 'name', 'format', 'engine'); + + $fileLocator = $this->getFileLocator(); + + $errorMessage = 'FileLocator exception message'; + + $fileLocator + ->expects($this->once()) + ->method('locate') + ->will($this->throwException(new \InvalidArgumentException($errorMessage))) + ; + + $locator = new TemplateLocator($fileLocator); + + try { + $locator->locate($template); + $this->fail('->locate() should throw an exception when the file is not found.'); + } catch (\InvalidArgumentException $e) { + $this->assertContains( + $errorMessage, + $e->getMessage(), + 'TemplateLocator exception should propagate the FileLocator exception message' + ); + } + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testThrowsAnExceptionWhenTemplateIsNotATemplateReferenceInterface() + { + $locator = new TemplateLocator($this->getFileLocator()); + $locator->locate('template'); + } + + protected function getFileLocator() + { + return $this + ->getMockBuilder('Symfony\Component\Config\FileLocator') + ->setMethods(array('locate')) + ->setConstructorArgs(array('/path/to/fallback')) + ->getMock() + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/PhpEngineTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/PhpEngineTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b5eeb901342db750cc068596112ef8102a06ab38 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/PhpEngineTest.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; + +use Symfony\Bundle\FrameworkBundle\Templating\PhpEngine; +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; +use Symfony\Component\Templating\TemplateNameParser; +use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables; +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; + +class PhpEngineTest extends TestCase +{ + public function testEvaluateAddsAppGlobal() + { + $container = $this->getContainer(); + $loader = $this->getMockForAbstractClass('Symfony\Component\Templating\Loader\Loader'); + $engine = new PhpEngine(new TemplateNameParser(), $container, $loader, $app = new GlobalVariables($container)); + $globals = $engine->getGlobals(); + $this->assertSame($app, $globals['app']); + } + + public function testEvaluateWithoutAvailableRequest() + { + $container = new Container(); + $loader = $this->getMockForAbstractClass('Symfony\Component\Templating\Loader\Loader'); + $engine = new PhpEngine(new TemplateNameParser(), $container, $loader, new GlobalVariables($container)); + + $container->set('request_stack', null); + + $globals = $engine->getGlobals(); + $this->assertEmpty($globals['app']->getRequest()); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testGetInvalidHelper() + { + $container = $this->getContainer(); + $loader = $this->getMockForAbstractClass('Symfony\Component\Templating\Loader\Loader'); + $engine = new PhpEngine(new TemplateNameParser(), $container, $loader); + + $engine->get('non-existing-helper'); + } + + /** + * Creates a Container with a Session-containing Request service. + * + * @return Container + */ + protected function getContainer() + { + $container = new Container(); + $session = new Session(new MockArraySessionStorage()); + $request = new Request(); + $stack = new RequestStack(); + $stack->push($request); + + $request->setSession($session); + $container->set('request_stack', $stack); + + return $container; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateFilenameParserTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateFilenameParserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..77dd2699ab9eabe737389862d2126a939003efe0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateFilenameParserTest.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; + +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Bundle\FrameworkBundle\Templating\TemplateFilenameParser; +use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; + +class TemplateFilenameParserTest extends TestCase +{ + protected $parser; + + protected function setUp() + { + $this->parser = new TemplateFilenameParser(); + } + + protected function tearDown() + { + $this->parser = null; + } + + /** + * @dataProvider getFilenameToTemplateProvider + */ + public function testParseFromFilename($file, $ref) + { + $template = $this->parser->parse($file); + + if ($ref === false) { + $this->assertFalse($template); + } else { + $this->assertEquals($template->getLogicalName(), $ref->getLogicalName()); + } + } + + public function getFilenameToTemplateProvider() + { + return array( + array('/path/to/section/name.format.engine', new TemplateReference('', '/path/to/section', 'name', 'format', 'engine')), + array('\\path\\to\\section\\name.format.engine', new TemplateReference('', '/path/to/section', 'name', 'format', 'engine')), + array('name.format.engine', new TemplateReference('', '', 'name', 'format', 'engine')), + array('name.format', false), + array('name', false), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateNameParserTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateNameParserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3e162d167d23ee07db239a06a4e6d5cdd9a531d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateNameParserTest.php @@ -0,0 +1,109 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; + +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Bundle\FrameworkBundle\Templating\TemplateNameParser; +use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; +use Symfony\Component\Templating\TemplateReference as BaseTemplateReference; + +class TemplateNameParserTest extends TestCase +{ + protected $parser; + + protected function setUp() + { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); + $kernel + ->expects($this->any()) + ->method('getBundle') + ->will($this->returnCallback(function ($bundle) { + if (in_array($bundle, array('SensioFooBundle', 'SensioCmsFooBundle', 'FooBundle'))) { + return true; + } + + throw new \InvalidArgumentException(); + })) + ; + $this->parser = new TemplateNameParser($kernel); + } + + protected function tearDown() + { + $this->parser = null; + } + + /** + * @dataProvider parseProvider + */ + public function testParse($name, $logicalName, $path, $ref) + { + $template = $this->parser->parse($name); + + $this->assertSame($ref->getLogicalName(), $template->getLogicalName()); + $this->assertSame($logicalName, $template->getLogicalName()); + $this->assertSame($path, $template->getPath()); + } + + public function parseProvider() + { + return array( + array('FooBundle:Post:index.html.php', 'FooBundle:Post:index.html.php', '@FooBundle/Resources/views/Post/index.html.php', new TemplateReference('FooBundle', 'Post', 'index', 'html', 'php')), + array('FooBundle:Post:index.html.twig', 'FooBundle:Post:index.html.twig', '@FooBundle/Resources/views/Post/index.html.twig', new TemplateReference('FooBundle', 'Post', 'index', 'html', 'twig')), + array('FooBundle:Post:index.xml.php', 'FooBundle:Post:index.xml.php', '@FooBundle/Resources/views/Post/index.xml.php', new TemplateReference('FooBundle', 'Post', 'index', 'xml', 'php')), + array('SensioFooBundle:Post:index.html.php', 'SensioFooBundle:Post:index.html.php', '@SensioFooBundle/Resources/views/Post/index.html.php', new TemplateReference('SensioFooBundle', 'Post', 'index', 'html', 'php')), + array('SensioCmsFooBundle:Post:index.html.php', 'SensioCmsFooBundle:Post:index.html.php', '@SensioCmsFooBundle/Resources/views/Post/index.html.php', new TemplateReference('SensioCmsFooBundle', 'Post', 'index', 'html', 'php')), + array(':Post:index.html.php', ':Post:index.html.php', 'views/Post/index.html.php', new TemplateReference('', 'Post', 'index', 'html', 'php')), + array('::index.html.php', '::index.html.php', 'views/index.html.php', new TemplateReference('', '', 'index', 'html', 'php')), + array('index.html.php', '::index.html.php', 'views/index.html.php', new TemplateReference('', '', 'index', 'html', 'php')), + array('FooBundle:Post:foo.bar.index.html.php', 'FooBundle:Post:foo.bar.index.html.php', '@FooBundle/Resources/views/Post/foo.bar.index.html.php', new TemplateReference('FooBundle', 'Post', 'foo.bar.index', 'html', 'php')), + array('@FooBundle/Resources/views/layout.html.twig', '@FooBundle/Resources/views/layout.html.twig', '@FooBundle/Resources/views/layout.html.twig', new BaseTemplateReference('@FooBundle/Resources/views/layout.html.twig', 'twig')), + array('@FooBundle/Foo/layout.html.twig', '@FooBundle/Foo/layout.html.twig', '@FooBundle/Foo/layout.html.twig', new BaseTemplateReference('@FooBundle/Foo/layout.html.twig', 'twig')), + array('name.twig', 'name.twig', 'name.twig', new BaseTemplateReference('name.twig', 'twig')), + array('name', 'name', 'name', new BaseTemplateReference('name')), + array('default/index.html.php', '::default/index.html.php', 'views/default/index.html.php', new TemplateReference(null, null, 'default/index', 'html', 'php')), + ); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testParseValidNameWithNotFoundBundle() + { + $this->parser->parse('BarBundle:Post:index.html.php'); + } + + /** + * @group legacy + * @dataProvider provideAbsolutePaths + * @expectedDeprecation Absolute template path support is deprecated since Symfony 3.1 and will be removed in 4.0. + */ + public function testAbsolutePathsAreDeprecated($name, $logicalName, $path, $ref) + { + $template = $this->parser->parse($name); + + $this->assertSame($ref->getLogicalName(), $template->getLogicalName()); + $this->assertSame($logicalName, $template->getLogicalName()); + $this->assertSame($path, $template->getPath()); + } + + public function provideAbsolutePaths() + { + return array( + array('/path/to/section/index.html.php', '/path/to/section/index.html.php', '/path/to/section/index.html.php', new BaseTemplateReference('/path/to/section/index.html.php', 'php')), + array('C:\\path\\to\\section\\name.html.php', 'C:path/to/section/name.html.php', 'C:path/to/section/name.html.php', new BaseTemplateReference('C:path/to/section/name.html.php', 'php')), + array('C:\\path\\to\\section\\name:foo.html.php', 'C:path/to/section/name:foo.html.php', 'C:path/to/section/name:foo.html.php', new BaseTemplateReference('C:path/to/section/name:foo.html.php', 'php')), + array('\\path\\to\\section\\name.html.php', '/path/to/section/name.html.php', '/path/to/section/name.html.php', new BaseTemplateReference('/path/to/section/name.html.php', 'php')), + array('/path/to/section/name.php', '/path/to/section/name.php', '/path/to/section/name.php', new BaseTemplateReference('/path/to/section/name.php', 'php')), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateReferenceTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateReferenceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5ee2a8e8511c1a773c3adee0a6d7bbc4cf279478 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateReferenceTest.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; + +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; + +class TemplateReferenceTest extends TestCase +{ + public function testGetPathWorksWithNamespacedControllers() + { + $reference = new TemplateReference('AcmeBlogBundle', 'Admin\Post', 'index', 'html', 'twig'); + + $this->assertSame( + '@AcmeBlogBundle/Resources/views/Admin/Post/index.html.twig', + $reference->getPath() + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c49010bfdc3574ae3002fc7cc77a1076cbb7a69e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateTest.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; + +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; + +class TemplateTest extends TestCase +{ + /** + * @dataProvider getTemplateToPathProvider + */ + public function testGetPathForTemplatesInABundle($template, $path) + { + if ($template->get('bundle')) { + $this->assertEquals($template->getPath(), $path); + } + } + + /** + * @dataProvider getTemplateToPathProvider + */ + public function testGetPathForTemplatesOutOfABundle($template, $path) + { + if (!$template->get('bundle')) { + $this->assertEquals($template->getPath(), $path); + } + } + + public function getTemplateToPathProvider() + { + return array( + array(new TemplateReference('FooBundle', 'Post', 'index', 'html', 'php'), '@FooBundle/Resources/views/Post/index.html.php'), + array(new TemplateReference('FooBundle', '', 'index', 'html', 'twig'), '@FooBundle/Resources/views/index.html.twig'), + array(new TemplateReference('', 'Post', 'index', 'html', 'php'), 'views/Post/index.html.php'), + array(new TemplateReference('', '', 'index', 'html', 'php'), 'views/index.html.php'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TimedPhpEngineTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TimedPhpEngineTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ef01f0e3b815fa997a055a48f23de85590c99416 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TimedPhpEngineTest.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; + +use Symfony\Bundle\FrameworkBundle\Templating\TimedPhpEngine; +use Symfony\Component\DependencyInjection\Container; +use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables; +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; + +class TimedPhpEngineTest extends TestCase +{ + public function testThatRenderLogsTime() + { + $container = $this->getContainer(); + $templateNameParser = $this->getTemplateNameParser(); + $globalVariables = $this->getGlobalVariables(); + $loader = $this->getLoader($this->getStorage()); + + $stopwatch = $this->getStopwatch(); + $stopwatchEvent = $this->getStopwatchEvent(); + + $stopwatch->expects($this->once()) + ->method('start') + ->with('template.php (index.php)', 'template') + ->will($this->returnValue($stopwatchEvent)); + + $stopwatchEvent->expects($this->once())->method('stop'); + + $engine = new TimedPhpEngine($templateNameParser, $container, $loader, $stopwatch, $globalVariables); + $engine->render('index.php'); + } + + /** + * @return Container + */ + private function getContainer() + { + return $this->getMockBuilder('Symfony\Component\DependencyInjection\Container')->getMock(); + } + + /** + * @return \Symfony\Component\Templating\TemplateNameParserInterface + */ + private function getTemplateNameParser() + { + $templateReference = $this->getMockBuilder('Symfony\Component\Templating\TemplateReferenceInterface')->getMock(); + $templateNameParser = $this->getMockBuilder('Symfony\Component\Templating\TemplateNameParserInterface')->getMock(); + $templateNameParser->expects($this->any()) + ->method('parse') + ->will($this->returnValue($templateReference)); + + return $templateNameParser; + } + + /** + * @return GlobalVariables + */ + private function getGlobalVariables() + { + return $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables') + ->disableOriginalConstructor() + ->getMock(); + } + + /** + * @return \Symfony\Component\Templating\Storage\StringStorage + */ + private function getStorage() + { + return $this->getMockBuilder('Symfony\Component\Templating\Storage\StringStorage') + ->disableOriginalConstructor() + ->getMockForAbstractClass(); + } + + /** + * @param \Symfony\Component\Templating\Storage\StringStorage $storage + * + * @return \Symfony\Component\Templating\Loader\Loader + */ + private function getLoader($storage) + { + $loader = $this->getMockForAbstractClass('Symfony\Component\Templating\Loader\Loader'); + $loader->expects($this->once()) + ->method('load') + ->will($this->returnValue($storage)); + + return $loader; + } + + /** + * @return \Symfony\Component\Stopwatch\StopwatchEvent + */ + private function getStopwatchEvent() + { + return $this->getMockBuilder('Symfony\Component\Stopwatch\StopwatchEvent') + ->disableOriginalConstructor() + ->getMock(); + } + + /** + * @return \Symfony\Component\Stopwatch\Stopwatch + */ + private function getStopwatch() + { + return $this->getMockBuilder('Symfony\Component\Stopwatch\Stopwatch')->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/TestCase.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/TestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..115ca1ae58a299bb0ef0fa979587c9d117df38dd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/TestCase.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests; + +use PHPUnit\Framework\TestCase as PHPUnitTestCase; + +class TestCase extends PHPUnitTestCase +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/PhpExtractorTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/PhpExtractorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e8c56ee4d5e52ab092baf8dd437a898c7e28b85e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/PhpExtractorTest.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Translation; + +use Symfony\Bundle\FrameworkBundle\Tests\TestCase; +use Symfony\Bundle\FrameworkBundle\Translation\PhpExtractor; +use Symfony\Component\Translation\MessageCatalogue; + +class PhpExtractorTest extends TestCase +{ + /** + * @dataProvider resourcesProvider + * + * @param array|string $resource + */ + public function testExtraction($resource) + { + // Arrange + $extractor = new PhpExtractor(); + $extractor->setPrefix('prefix'); + $catalogue = new MessageCatalogue('en'); + + // Act + $extractor->extract($resource, $catalogue); + + $expectedHeredoc = << array( + 'single-quoted key' => 'prefixsingle-quoted key', + 'double-quoted key' => 'prefixdouble-quoted key', + 'heredoc key' => 'prefixheredoc key', + 'nowdoc key' => 'prefixnowdoc key', + "double-quoted key with whitespace and escaped \$\n\" sequences" => "prefixdouble-quoted key with whitespace and escaped \$\n\" sequences", + 'single-quoted key with whitespace and nonescaped \$\n\' sequences' => 'prefixsingle-quoted key with whitespace and nonescaped \$\n\' sequences', + 'single-quoted key with "quote mark at the end"' => 'prefixsingle-quoted key with "quote mark at the end"', + $expectedHeredoc => 'prefix'.$expectedHeredoc, + $expectedNowdoc => 'prefix'.$expectedNowdoc, + '{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples' => 'prefix{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples', + ), + 'not_messages' => array( + 'other-domain-test-no-params-short-array' => 'prefixother-domain-test-no-params-short-array', + 'other-domain-test-no-params-long-array' => 'prefixother-domain-test-no-params-long-array', + 'other-domain-test-params-short-array' => 'prefixother-domain-test-params-short-array', + 'other-domain-test-params-long-array' => 'prefixother-domain-test-params-long-array', + 'other-domain-test-trans-choice-short-array-%count%' => 'prefixother-domain-test-trans-choice-short-array-%count%', + 'other-domain-test-trans-choice-long-array-%count%' => 'prefixother-domain-test-trans-choice-long-array-%count%', + 'typecast' => 'prefixtypecast', + 'msg1' => 'prefixmsg1', + 'msg2' => 'prefixmsg2', + ), + ); + $actualCatalogue = $catalogue->all(); + + $this->assertEquals($expectedCatalogue, $actualCatalogue); + } + + public function resourcesProvider() + { + $directory = __DIR__.'/../Fixtures/Resources/views/'; + $splFiles = array(); + foreach (new \DirectoryIterator($directory) as $fileInfo) { + if ($fileInfo->isDot()) { + continue; + } + if ('translation.html.php' === $fileInfo->getBasename()) { + $phpFile = $fileInfo->getPathname(); + } + $splFiles[] = $fileInfo->getFileInfo(); + } + + return array( + array($directory), + array($phpFile), + array(glob($directory.'*')), + array($splFiles), + array(new \ArrayObject(glob($directory.'*'))), + array(new \ArrayObject($splFiles)), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1ac206185589c561a08a3ba8ae6af0750f21610a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php @@ -0,0 +1,284 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Translation; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\Translation\Translator; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Translation\MessageSelector; + +class TranslatorTest extends TestCase +{ + protected $tmpDir; + + protected function setUp() + { + $this->tmpDir = sys_get_temp_dir().'/sf2_translation'; + $this->deleteTmpDir(); + } + + protected function tearDown() + { + $this->deleteTmpDir(); + } + + protected function deleteTmpDir() + { + if (!file_exists($dir = $this->tmpDir)) { + return; + } + + $fs = new Filesystem(); + $fs->remove($dir); + } + + public function testTransWithoutCaching() + { + $translator = $this->getTranslator($this->getLoader()); + $translator->setLocale('fr'); + $translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR', 'fr.UTF-8', 'sr@latin')); + + $this->assertEquals('foo (FR)', $translator->trans('foo')); + $this->assertEquals('bar (EN)', $translator->trans('bar')); + $this->assertEquals('foobar (ES)', $translator->trans('foobar')); + $this->assertEquals('choice 0 (EN)', $translator->transChoice('choice', 0)); + $this->assertEquals('no translation', $translator->trans('no translation')); + $this->assertEquals('foobarfoo (PT-PT)', $translator->trans('foobarfoo')); + $this->assertEquals('other choice 1 (PT-BR)', $translator->transChoice('other choice', 1)); + $this->assertEquals('foobarbaz (fr.UTF-8)', $translator->trans('foobarbaz')); + $this->assertEquals('foobarbax (sr@latin)', $translator->trans('foobarbax')); + } + + public function testTransWithCaching() + { + // prime the cache + $translator = $this->getTranslator($this->getLoader(), array('cache_dir' => $this->tmpDir)); + $translator->setLocale('fr'); + $translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR', 'fr.UTF-8', 'sr@latin')); + + $this->assertEquals('foo (FR)', $translator->trans('foo')); + $this->assertEquals('bar (EN)', $translator->trans('bar')); + $this->assertEquals('foobar (ES)', $translator->trans('foobar')); + $this->assertEquals('choice 0 (EN)', $translator->transChoice('choice', 0)); + $this->assertEquals('no translation', $translator->trans('no translation')); + $this->assertEquals('foobarfoo (PT-PT)', $translator->trans('foobarfoo')); + $this->assertEquals('other choice 1 (PT-BR)', $translator->transChoice('other choice', 1)); + $this->assertEquals('foobarbaz (fr.UTF-8)', $translator->trans('foobarbaz')); + $this->assertEquals('foobarbax (sr@latin)', $translator->trans('foobarbax')); + + // do it another time as the cache is primed now + $loader = $this->getMockBuilder('Symfony\Component\Translation\Loader\LoaderInterface')->getMock(); + $loader->expects($this->never())->method('load'); + + $translator = $this->getTranslator($loader, array('cache_dir' => $this->tmpDir)); + $translator->setLocale('fr'); + $translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR', 'fr.UTF-8', 'sr@latin')); + + $this->assertEquals('foo (FR)', $translator->trans('foo')); + $this->assertEquals('bar (EN)', $translator->trans('bar')); + $this->assertEquals('foobar (ES)', $translator->trans('foobar')); + $this->assertEquals('choice 0 (EN)', $translator->transChoice('choice', 0)); + $this->assertEquals('no translation', $translator->trans('no translation')); + $this->assertEquals('foobarfoo (PT-PT)', $translator->trans('foobarfoo')); + $this->assertEquals('other choice 1 (PT-BR)', $translator->transChoice('other choice', 1)); + $this->assertEquals('foobarbaz (fr.UTF-8)', $translator->trans('foobarbaz')); + $this->assertEquals('foobarbax (sr@latin)', $translator->trans('foobarbax')); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testTransWithCachingWithInvalidLocale() + { + $loader = $this->getMockBuilder('Symfony\Component\Translation\Loader\LoaderInterface')->getMock(); + $translator = $this->getTranslator($loader, array('cache_dir' => $this->tmpDir), 'loader', '\Symfony\Bundle\FrameworkBundle\Tests\Translation\TranslatorWithInvalidLocale'); + + $translator->trans('foo'); + } + + public function testLoadResourcesWithoutCaching() + { + $loader = new \Symfony\Component\Translation\Loader\YamlFileLoader(); + $resourceFiles = array( + 'fr' => array( + __DIR__.'/../Fixtures/Resources/translations/messages.fr.yml', + ), + ); + + $translator = $this->getTranslator($loader, array('resource_files' => $resourceFiles), 'yml'); + $translator->setLocale('fr'); + + $this->assertEquals('répertoire', $translator->trans('folder')); + } + + public function testGetDefaultLocale() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container + ->expects($this->once()) + ->method('getParameter') + ->with('kernel.default_locale') + ->will($this->returnValue('en')) + ; + + $translator = new Translator($container, new MessageSelector()); + + $this->assertSame('en', $translator->getLocale()); + } + + protected function getCatalogue($locale, $messages, $resources = array()) + { + $catalogue = new MessageCatalogue($locale); + foreach ($messages as $key => $translation) { + $catalogue->set($key, $translation); + } + foreach ($resources as $resource) { + $catalogue->addResource($resource); + } + + return $catalogue; + } + + protected function getLoader() + { + $loader = $this->getMockBuilder('Symfony\Component\Translation\Loader\LoaderInterface')->getMock(); + $loader + ->expects($this->at(0)) + ->method('load') + ->will($this->returnValue($this->getCatalogue('fr', array( + 'foo' => 'foo (FR)', + )))) + ; + $loader + ->expects($this->at(1)) + ->method('load') + ->will($this->returnValue($this->getCatalogue('en', array( + 'foo' => 'foo (EN)', + 'bar' => 'bar (EN)', + 'choice' => '{0} choice 0 (EN)|{1} choice 1 (EN)|]1,Inf] choice inf (EN)', + )))) + ; + $loader + ->expects($this->at(2)) + ->method('load') + ->will($this->returnValue($this->getCatalogue('es', array( + 'foobar' => 'foobar (ES)', + )))) + ; + $loader + ->expects($this->at(3)) + ->method('load') + ->will($this->returnValue($this->getCatalogue('pt-PT', array( + 'foobarfoo' => 'foobarfoo (PT-PT)', + )))) + ; + $loader + ->expects($this->at(4)) + ->method('load') + ->will($this->returnValue($this->getCatalogue('pt_BR', array( + 'other choice' => '{0} other choice 0 (PT-BR)|{1} other choice 1 (PT-BR)|]1,Inf] other choice inf (PT-BR)', + )))) + ; + $loader + ->expects($this->at(5)) + ->method('load') + ->will($this->returnValue($this->getCatalogue('fr.UTF-8', array( + 'foobarbaz' => 'foobarbaz (fr.UTF-8)', + )))) + ; + $loader + ->expects($this->at(6)) + ->method('load') + ->will($this->returnValue($this->getCatalogue('sr@latin', array( + 'foobarbax' => 'foobarbax (sr@latin)', + )))) + ; + + return $loader; + } + + protected function getContainer($loader) + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container + ->expects($this->any()) + ->method('get') + ->will($this->returnValue($loader)) + ; + + return $container; + } + + public function getTranslator($loader, $options = array(), $loaderFomat = 'loader', $translatorClass = '\Symfony\Bundle\FrameworkBundle\Translation\Translator') + { + $translator = $this->createTranslator($loader, $options, $translatorClass, $loaderFomat); + + if ('loader' === $loaderFomat) { + $translator->addResource('loader', 'foo', 'fr'); + $translator->addResource('loader', 'foo', 'en'); + $translator->addResource('loader', 'foo', 'es'); + $translator->addResource('loader', 'foo', 'pt-PT'); // European Portuguese + $translator->addResource('loader', 'foo', 'pt_BR'); // Brazilian Portuguese + $translator->addResource('loader', 'foo', 'fr.UTF-8'); + $translator->addResource('loader', 'foo', 'sr@latin'); // Latin Serbian + } + + return $translator; + } + + public function testWarmup() + { + $loader = new \Symfony\Component\Translation\Loader\YamlFileLoader(); + $resourceFiles = array( + 'fr' => array( + __DIR__.'/../Fixtures/Resources/translations/messages.fr.yml', + ), + ); + + // prime the cache + $translator = $this->getTranslator($loader, array('cache_dir' => $this->tmpDir, 'resource_files' => $resourceFiles), 'yml'); + $translator->setFallbackLocales(array('fr')); + $translator->warmup($this->tmpDir); + + $loader = $this->getMockBuilder('Symfony\Component\Translation\Loader\LoaderInterface')->getMock(); + $loader + ->expects($this->never()) + ->method('load'); + + $translator = $this->getTranslator($loader, array('cache_dir' => $this->tmpDir, 'resource_files' => $resourceFiles), 'yml'); + $translator->setLocale('fr'); + $translator->setFallbackLocales(array('fr')); + $this->assertEquals('répertoire', $translator->trans('folder')); + } + + private function createTranslator($loader, $options, $translatorClass = '\Symfony\Bundle\FrameworkBundle\Translation\Translator', $loaderFomat = 'loader') + { + return new $translatorClass( + $this->getContainer($loader), + new MessageSelector(), + array($loaderFomat => array($loaderFomat)), + $options + ); + } +} + +class TranslatorWithInvalidLocale extends Translator +{ + /** + * {@inheritdoc} + */ + public function getLocale() + { + return 'invalid locale'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Validator/ConstraintValidatorFactoryTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Validator/ConstraintValidatorFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6cf9574ece96bdd6139f22890f0217aff97e223e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Validator/ConstraintValidatorFactoryTest.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Tests\Validator; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory; +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\Validator\Constraints\Blank as BlankConstraint; + +class ConstraintValidatorFactoryTest extends TestCase +{ + public function testGetInstanceCreatesValidator() + { + $class = get_class($this->getMockForAbstractClass('Symfony\\Component\\Validator\\ConstraintValidator')); + + $constraint = $this->getMockBuilder('Symfony\\Component\\Validator\\Constraint')->getMock(); + $constraint + ->expects($this->once()) + ->method('validatedBy') + ->will($this->returnValue($class)); + + $factory = new ConstraintValidatorFactory(new Container()); + $this->assertInstanceOf($class, $factory->getInstance($constraint)); + } + + public function testGetInstanceReturnsExistingValidator() + { + $factory = new ConstraintValidatorFactory(new Container()); + $v1 = $factory->getInstance(new BlankConstraint()); + $v2 = $factory->getInstance(new BlankConstraint()); + $this->assertSame($v1, $v2); + } + + public function testGetInstanceReturnsService() + { + $service = 'validator_constraint_service'; + $alias = 'validator_constraint_alias'; + $validator = $this->getMockForAbstractClass('Symfony\\Component\\Validator\\ConstraintValidator'); + + // mock ContainerBuilder b/c it implements TaggedContainerInterface + $container = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\ContainerBuilder')->setMethods(array('get'))->getMock(); + $container + ->expects($this->once()) + ->method('get') + ->with($service) + ->will($this->returnValue($validator)); + + $constraint = $this->getMockBuilder('Symfony\\Component\\Validator\\Constraint')->getMock(); + $constraint + ->expects($this->once()) + ->method('validatedBy') + ->will($this->returnValue($alias)); + + $factory = new ConstraintValidatorFactory($container, array('validator_constraint_alias' => 'validator_constraint_service')); + $this->assertSame($validator, $factory->getInstance($constraint)); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ValidatorException + */ + public function testGetInstanceInvalidValidatorClass() + { + $constraint = $this->getMockBuilder('Symfony\\Component\\Validator\\Constraint')->getMock(); + $constraint + ->expects($this->once()) + ->method('validatedBy') + ->will($this->returnValue('Fully\\Qualified\\ConstraintValidator\\Class\\Name')); + + $factory = new ConstraintValidatorFactory(new Container()); + $factory->getInstance($constraint); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php new file mode 100644 index 0000000000000000000000000000000000000000..97c94fdd14bf9babbf7eb96578bcaf1eb28f50b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php @@ -0,0 +1,260 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Translation; + +use Symfony\Component\Finder\Finder; +use Symfony\Component\Translation\Extractor\AbstractFileExtractor; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Extractor\ExtractorInterface; + +/** + * PhpExtractor extracts translation messages from a PHP template. + * + * @author Michel Salib + */ +class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface +{ + const MESSAGE_TOKEN = 300; + const METHOD_ARGUMENTS_TOKEN = 1000; + const DOMAIN_TOKEN = 1001; + + /** + * Prefix for new found message. + * + * @var string + */ + private $prefix = ''; + + /** + * The sequence that captures translation messages. + * + * @var array + */ + protected $sequences = array( + array( + '->', + 'trans', + '(', + self::MESSAGE_TOKEN, + ',', + self::METHOD_ARGUMENTS_TOKEN, + ',', + self::DOMAIN_TOKEN, + ), + array( + '->', + 'transChoice', + '(', + self::MESSAGE_TOKEN, + ',', + self::METHOD_ARGUMENTS_TOKEN, + ',', + self::METHOD_ARGUMENTS_TOKEN, + ',', + self::DOMAIN_TOKEN, + ), + array( + '->', + 'trans', + '(', + self::MESSAGE_TOKEN, + ), + array( + '->', + 'transChoice', + '(', + self::MESSAGE_TOKEN, + ), + ); + + /** + * {@inheritdoc} + */ + public function extract($resource, MessageCatalogue $catalog) + { + $files = $this->extractFiles($resource); + foreach ($files as $file) { + $this->parseTokens(token_get_all(file_get_contents($file)), $catalog); + + if (PHP_VERSION_ID >= 70000) { + // PHP 7 memory manager will not release after token_get_all(), see https://bugs.php.net/70098 + gc_mem_caches(); + } + } + } + + /** + * {@inheritdoc} + */ + public function setPrefix($prefix) + { + $this->prefix = $prefix; + } + + /** + * Normalizes a token. + * + * @param mixed $token + * + * @return string + */ + protected function normalizeToken($token) + { + if (isset($token[1]) && 'b"' !== $token) { + return $token[1]; + } + + return $token; + } + + /** + * Seeks to a non-whitespace token. + */ + private function seekToNextRelevantToken(\Iterator $tokenIterator) + { + for (; $tokenIterator->valid(); $tokenIterator->next()) { + $t = $tokenIterator->current(); + if (T_WHITESPACE !== $t[0]) { + break; + } + } + } + + private function skipMethodArgument(\Iterator $tokenIterator) + { + $openBraces = 0; + + for (; $tokenIterator->valid(); $tokenIterator->next()) { + $t = $tokenIterator->current(); + + if ('[' === $t[0] || '(' === $t[0]) { + ++$openBraces; + } + + if (']' === $t[0] || ')' === $t[0]) { + --$openBraces; + } + + if ((0 === $openBraces && ',' === $t[0]) || (-1 === $openBraces && ')' === $t[0])) { + break; + } + } + } + + /** + * Extracts the message from the iterator while the tokens + * match allowed message tokens. + */ + private function getValue(\Iterator $tokenIterator) + { + $message = ''; + $docToken = ''; + + for (; $tokenIterator->valid(); $tokenIterator->next()) { + $t = $tokenIterator->current(); + if (!isset($t[1])) { + break; + } + + switch ($t[0]) { + case T_START_HEREDOC: + $docToken = $t[1]; + break; + case T_ENCAPSED_AND_WHITESPACE: + case T_CONSTANT_ENCAPSED_STRING: + $message .= $t[1]; + break; + case T_END_HEREDOC: + return PhpStringTokenParser::parseDocString($docToken, $message); + default: + break 2; + } + } + + if ($message) { + $message = PhpStringTokenParser::parse($message); + } + + return $message; + } + + /** + * Extracts trans message from PHP tokens. + * + * @param array $tokens + * @param MessageCatalogue $catalog + */ + protected function parseTokens($tokens, MessageCatalogue $catalog) + { + $tokenIterator = new \ArrayIterator($tokens); + + for ($key = 0; $key < $tokenIterator->count(); ++$key) { + foreach ($this->sequences as $sequence) { + $message = ''; + $domain = 'messages'; + $tokenIterator->seek($key); + + foreach ($sequence as $sequenceKey => $item) { + $this->seekToNextRelevantToken($tokenIterator); + + if ($this->normalizeToken($tokenIterator->current()) === $item) { + $tokenIterator->next(); + continue; + } elseif (self::MESSAGE_TOKEN === $item) { + $message = $this->getValue($tokenIterator); + + if (count($sequence) === ($sequenceKey + 1)) { + break; + } + } elseif (self::METHOD_ARGUMENTS_TOKEN === $item) { + $this->skipMethodArgument($tokenIterator); + } elseif (self::DOMAIN_TOKEN === $item) { + $domain = $this->getValue($tokenIterator); + + break; + } else { + break; + } + } + + if ($message) { + $catalog->set($message, $this->prefix.$message, $domain); + break; + } + } + } + } + + /** + * @param string $file + * + * @return bool + * + * @throws \InvalidArgumentException + */ + protected function canBeExtracted($file) + { + return $this->isFile($file) && 'php' === pathinfo($file, PATHINFO_EXTENSION); + } + + /** + * @param string|array $directory + * + * @return array + */ + protected function extractFromDirectory($directory) + { + $finder = new Finder(); + + return $finder->files()->name('*.php')->in($directory); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php new file mode 100644 index 0000000000000000000000000000000000000000..e950ac478f84cd8b74d28e6d0dc42d942c0f801a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php @@ -0,0 +1,142 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Translation; + +/* + * The following is derived from code at http://github.com/nikic/PHP-Parser + * + * Copyright (c) 2011 by Nikita Popov + * + * Some rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * * The names of the contributors may not be used to endorse or + * promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +class PhpStringTokenParser +{ + protected static $replacements = array( + '\\' => '\\', + '$' => '$', + 'n' => "\n", + 'r' => "\r", + 't' => "\t", + 'f' => "\f", + 'v' => "\v", + 'e' => "\x1B", + ); + + /** + * Parses a string token. + * + * @param string $str String token content + * + * @return string The parsed string + */ + public static function parse($str) + { + $bLength = 0; + if ('b' === $str[0]) { + $bLength = 1; + } + + if ('\'' === $str[$bLength]) { + return str_replace( + array('\\\\', '\\\''), + array('\\', '\''), + substr($str, $bLength + 1, -1) + ); + } else { + return self::parseEscapeSequences(substr($str, $bLength + 1, -1), '"'); + } + } + + /** + * Parses escape sequences in strings (all string types apart from single quoted). + * + * @param string $str String without quotes + * @param null|string $quote Quote type + * + * @return string String with escape sequences parsed + */ + public static function parseEscapeSequences($str, $quote) + { + if (null !== $quote) { + $str = str_replace('\\'.$quote, $quote, $str); + } + + return preg_replace_callback( + '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3})~', + array(__CLASS__, 'parseCallback'), + $str + ); + } + + private static function parseCallback($matches) + { + $str = $matches[1]; + + if (isset(self::$replacements[$str])) { + return self::$replacements[$str]; + } elseif ('x' === $str[0] || 'X' === $str[0]) { + return chr(hexdec($str)); + } else { + return chr(octdec($str)); + } + } + + /** + * Parses a constant doc string. + * + * @param string $startToken Doc string start token content (<< + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Translation; + +use Symfony\Component\Finder\Finder; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Loader\LoaderInterface; + +/** + * TranslationLoader loads translation messages from translation files. + * + * @author Michel Salib + */ +class TranslationLoader +{ + /** + * Loaders used for import. + * + * @var array + */ + private $loaders = array(); + + /** + * Adds a loader to the translation extractor. + * + * @param string $format The format of the loader + * @param LoaderInterface $loader + */ + public function addLoader($format, LoaderInterface $loader) + { + $this->loaders[$format] = $loader; + } + + /** + * Loads translation messages from a directory to the catalogue. + * + * @param string $directory the directory to look into + * @param MessageCatalogue $catalogue the catalogue + */ + public function loadMessages($directory, MessageCatalogue $catalogue) + { + if (!is_dir($directory)) { + return; + } + + foreach ($this->loaders as $format => $loader) { + // load any existing translation files + $finder = new Finder(); + $extension = $catalogue->getLocale().'.'.$format; + $files = $finder->files()->name('*.'.$extension)->in($directory); + foreach ($files as $file) { + $domain = substr($file->getFilename(), 0, -1 * strlen($extension) - 1); + $catalogue->addCatalogue($loader->load($file->getPathname(), $catalogue->getLocale(), $domain)); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php new file mode 100644 index 0000000000000000000000000000000000000000..fedc425a11a07fc69802a1557401bd3e9221e54e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Translation; + +use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; +use Symfony\Component\Translation\Translator as BaseTranslator; +use Symfony\Component\Translation\MessageSelector; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\Translation\Exception\InvalidArgumentException; + +/** + * Translator. + * + * @author Fabien Potencier + */ +class Translator extends BaseTranslator implements WarmableInterface +{ + protected $container; + protected $loaderIds; + + protected $options = array( + 'cache_dir' => null, + 'debug' => false, + 'resource_files' => array(), + ); + + /** + * @var array + */ + private $resourceLocales; + + /** + * Constructor. + * + * Available options: + * + * * cache_dir: The cache directory (or null to disable caching) + * * debug: Whether to enable debugging or not (false by default) + * * resource_files: List of translation resources available grouped by locale. + * + * @param ContainerInterface $container A ContainerInterface instance + * @param MessageSelector $selector The message selector for pluralization + * @param array $loaderIds An array of loader Ids + * @param array $options An array of options + * + * @throws InvalidArgumentException + */ + public function __construct(ContainerInterface $container, MessageSelector $selector, $loaderIds = array(), array $options = array()) + { + $this->container = $container; + $this->loaderIds = $loaderIds; + + // check option names + if ($diff = array_diff(array_keys($options), array_keys($this->options))) { + throw new InvalidArgumentException(sprintf('The Translator does not support the following options: \'%s\'.', implode('\', \'', $diff))); + } + + $this->options = array_merge($this->options, $options); + $this->resourceLocales = array_keys($this->options['resource_files']); + if (null !== $this->options['cache_dir'] && $this->options['debug']) { + $this->loadResources(); + } + + parent::__construct($container->getParameter('kernel.default_locale'), $selector, $this->options['cache_dir'], $this->options['debug']); + } + + /** + * {@inheritdoc} + */ + public function warmUp($cacheDir) + { + // skip warmUp when translator doesn't use cache + if (null === $this->options['cache_dir']) { + return; + } + + $locales = array_merge($this->getFallbackLocales(), array($this->getLocale()), $this->resourceLocales); + foreach (array_unique($locales) as $locale) { + // reset catalogue in case it's already loaded during the dump of the other locales. + if (isset($this->catalogues[$locale])) { + unset($this->catalogues[$locale]); + } + + $this->loadCatalogue($locale); + } + } + + /** + * {@inheritdoc} + */ + protected function initializeCatalogue($locale) + { + $this->initialize(); + parent::initializeCatalogue($locale); + } + + protected function initialize() + { + $this->loadResources(); + foreach ($this->loaderIds as $id => $aliases) { + foreach ($aliases as $alias) { + $this->addLoader($alias, $this->container->get($id)); + } + } + } + + private function loadResources() + { + foreach ($this->options['resource_files'] as $locale => $files) { + foreach ($files as $key => $file) { + // filename is domain.locale.format + list($domain, $locale, $format) = explode('.', basename($file), 3); + $this->addResource($format, $file, $locale, $domain); + unset($this->options['resource_files'][$locale][$key]); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Validator/ConstraintValidatorFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Validator/ConstraintValidatorFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..4e36678212baac71bc1ca465f2e5efa9ca08c23a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Validator/ConstraintValidatorFactory.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Validator; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; +use Symfony\Component\Validator\ConstraintValidatorInterface; +use Symfony\Component\Validator\Exception\ValidatorException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Uses a service container to create constraint validators. + * + * A constraint validator should be tagged as "validator.constraint_validator" + * in the service container and include an "alias" attribute: + * + * + * + * + * + * + * A constraint may then return this alias in its validatedBy() method: + * + * public function validatedBy() + * { + * return 'some_alias'; + * } + * + * @author Kris Wallsmith + */ +class ConstraintValidatorFactory implements ConstraintValidatorFactoryInterface +{ + protected $container; + protected $validators; + + /** + * Constructor. + * + * @param ContainerInterface $container The service container + * @param array $validators An array of validators + */ + public function __construct(ContainerInterface $container, array $validators = array()) + { + $this->container = $container; + $this->validators = $validators; + } + + /** + * Returns the validator for the supplied constraint. + * + * @param Constraint $constraint A constraint + * + * @return ConstraintValidatorInterface A validator for the supplied constraint + * + * @throws ValidatorException When the validator class does not exist + * @throws UnexpectedTypeException When the validator is not an instance of ConstraintValidatorInterface + */ + public function getInstance(Constraint $constraint) + { + $name = $constraint->validatedBy(); + + if (!isset($this->validators[$name])) { + if (!class_exists($name)) { + throw new ValidatorException(sprintf('Constraint validator "%s" does not exist or it is not enabled. Check the "validatedBy" method in your constraint class "%s".', $name, get_class($constraint))); + } + + $this->validators[$name] = new $name(); + } elseif (is_string($this->validators[$name])) { + $this->validators[$name] = $this->container->get($this->validators[$name]); + } + + if (!$this->validators[$name] instanceof ConstraintValidatorInterface) { + throw new UnexpectedTypeException($this->validators[$name], 'Symfony\Component\Validator\ConstraintValidatorInterface'); + } + + return $this->validators[$name]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/composer.json b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..5daeec7e4e76d74d9fc7d177602d8ccca537b923 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -0,0 +1,87 @@ +{ + "name": "symfony/framework-bundle", + "type": "symfony-bundle", + "description": "Symfony FrameworkBundle", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/cache": "~3.2.2|~3.3", + "symfony/class-loader": "~3.2", + "symfony/dependency-injection": "~3.2.1|~3.3", + "symfony/config": "~2.8|~3.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/http-foundation": "~3.1", + "symfony/http-kernel": "^3.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/filesystem": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/routing": "~3.1.10|^3.2.3", + "symfony/security-core": "~2.8|~3.0", + "symfony/security-csrf": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0", + "doctrine/cache": "~1.0" + }, + "require-dev": { + "symfony/asset": "~2.8|~3.0", + "symfony/browser-kit": "~2.8|~3.0", + "symfony/console": "~2.8.8|~3.0.8|~3.1.2|~3.2", + "symfony/css-selector": "~2.8|~3.0", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/security": "~2.8|~3.0", + "symfony/form": "^2.8.18|^3.2.5", + "symfony/expression-language": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0", + "symfony/security-core": "~3.2", + "symfony/security-csrf": "~2.8|~3.0", + "symfony/serializer": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", + "symfony/validator": "~3.2", + "symfony/yaml": "~3.2", + "symfony/property-info": "~3.1", + "doctrine/annotations": "~1.0", + "phpdocumentor/reflection-docblock": "^3.0", + "twig/twig": "~1.26|~2.0", + "sensio/framework-extra-bundle": "^3.0.2" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.0", + "phpdocumentor/type-resolver": "<0.2.0", + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "suggest": { + "ext-apcu": "For best performance of the system caches", + "symfony/console": "For using the console commands", + "symfony/form": "For using forms", + "symfony/serializer": "For using the serializer service", + "symfony/validator": "For using validation", + "symfony/yaml": "For using the debug:config and lint:yaml commands", + "symfony/property-info": "For using the property_info service", + "symfony/process": "For using the server:run, server:start, server:stop, and server:status commands" + }, + "autoload": { + "psr-4": { "Symfony\\Bundle\\FrameworkBundle\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..a105f7ece0a98b53b69652e8c6540f46cb5be60f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist @@ -0,0 +1,30 @@ + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..d83d4a62d1e541149e48e7a5dee22618f2cfe836 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md @@ -0,0 +1,123 @@ +CHANGELOG +========= + +3.2.0 +----- + + * Added the `SecurityUserValueResolver` to inject the security users in actions via + `Symfony\Component\Security\Core\User\UserInterface` in the method signature. + +3.0.0 +----- + + * Removed the `security.context` service. + +2.8.0 +----- + + * deprecated the `key` setting of `anonymous`, `remember_me` and `http_digest` + in favor of the `secret` setting. + * deprecated the `intention` firewall listener setting in favor of the `csrf_token_id`. + +2.6.0 +----- + + * Added the possibility to override the default success/failure handler + to get the provider key and the options injected + * Deprecated the `security.context` service for the `security.token_storage` and + `security.authorization_checker` services. + +2.4.0 +----- + + * Added 'host' option to firewall configuration + * Added 'csrf_token_generator' and 'csrf_token_id' options to firewall logout + listener configuration to supersede/alias 'csrf_provider' and 'intention' + respectively + * Moved 'security.secure_random' service configuration to FrameworkBundle + +2.3.0 +----- + + * allowed for multiple IP address in security access_control rules + +2.2.0 +----- + + * Added PBKDF2 Password encoder + * Added BCrypt password encoder + +2.1.0 +----- + + * [BC BREAK] The custom factories for the firewall configuration are now + registered during the build method of bundles instead of being registered + by the end-user (you need to remove the 'factories' keys in your security + configuration). + + * [BC BREAK] The Firewall listener is now registered after the Router one. This + means that specific Firewall URLs (like /login_check and /logout must now + have proper route defined in your routing configuration) + + * [BC BREAK] refactored the user provider configuration. The configuration + changed for the chain provider and the memory provider: + + Before: + + ``` yaml + security: + providers: + my_chain_provider: + providers: [my_memory_provider, my_doctrine_provider] + my_memory_provider: + users: + toto: { password: foobar, roles: [ROLE_USER] } + foo: { password: bar, roles: [ROLE_USER, ROLE_ADMIN] } + ``` + + After: + + ``` yaml + security: + providers: + my_chain_provider: + chain: + providers: [my_memory_provider, my_doctrine_provider] + my_memory_provider: + memory: + users: + toto: { password: foobar, roles: [ROLE_USER] } + foo: { password: bar, roles: [ROLE_USER, ROLE_ADMIN] } + ``` + + * [BC BREAK] Method `equals` was removed from `UserInterface` to its own new + `EquatableInterface`. The user class can now implement this interface to override + the default implementation of users equality test. + + * added a validator for the user password + * added 'erase_credentials' as a configuration key (true by default) + * added new events: `security.authentication.success` and `security.authentication.failure` + fired on authentication success/failure, regardless of authentication method, + events are defined in new event class: `Symfony\Component\Security\Core\AuthenticationEvents`. + + * Added optional CSRF protection to LogoutListener: + + ``` yaml + security: + firewalls: + default: + logout: + path: /logout_path + target: / + csrf_parameter: _csrf_token # Optional (defaults to "_csrf_token") + csrf_provider: security.csrf.token_generator # Required to enable protection + intention: logout # Optional (defaults to "logout") + ``` + + If the LogoutListener has CSRF protection enabled but cannot validate a token, + then a LogoutException will be thrown. + + * Added `logout_url` templating helper and Twig extension, which may be used to + generate logout URL's within templates. The security firewall's config key + must be specified. If a firewall's logout listener has CSRF protection + enabled, a token will be automatically added to the generated URL. diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..e12859661298b12dc622d129e95c67816b91749f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Command; + +use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Doctrine\DBAL\Schema\SchemaException; + +/** + * Installs the tables required by the ACL system. + * + * @author Johannes M. Schmitt + */ +class InitAclCommand extends ContainerAwareCommand +{ + /** + * {@inheritdoc} + */ + public function isEnabled() + { + if (!$this->getContainer()->has('security.acl.dbal.connection')) { + return false; + } + + return parent::isEnabled(); + } + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('init:acl') + ->setDescription('Mounts ACL tables in the database') + ->setHelp(<<<'EOF' +The %command.name% command mounts ACL tables in the database. + + php %command.full_name% + +The name of the DBAL connection must be configured in your app/config/security.yml configuration file in the security.acl.connection variable. + + security: + acl: + connection: default +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $container = $this->getContainer(); + + $connection = $container->get('security.acl.dbal.connection'); + $schema = $container->get('security.acl.dbal.schema'); + + try { + $schema->addToSchema($connection->getSchemaManager()->createSchema()); + } catch (SchemaException $e) { + $output->writeln('Aborting: '.$e->getMessage()); + + return 1; + } + + foreach ($schema->toSql($connection->getDatabasePlatform()) as $sql) { + $connection->exec($sql); + } + + $output->writeln('ACL tables have been initialized successfully.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..ba347823462750bf840bbc6c3363a3dc661fb73b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php @@ -0,0 +1,173 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Command; + +use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Security\Acl\Domain\ObjectIdentity; +use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity; +use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; +use Symfony\Component\Security\Acl\Exception\AclAlreadyExistsException; +use Symfony\Component\Security\Acl\Permission\MaskBuilder; +use Symfony\Component\Security\Acl\Model\MutableAclProviderInterface; + +/** + * Sets ACL for objects. + * + * @author Kévin Dunglas + */ +class SetAclCommand extends ContainerAwareCommand +{ + /** + * {@inheritdoc} + */ + public function isEnabled() + { + if (!$this->getContainer()->has('security.acl.provider')) { + return false; + } + + $provider = $this->getContainer()->get('security.acl.provider'); + if (!$provider instanceof MutableAclProviderInterface) { + return false; + } + + return parent::isEnabled(); + } + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('acl:set') + ->setDescription('Sets ACL for objects') + ->setHelp(<<%command.name% command sets ACL. +The ACL system must have been initialized with the init:acl command. + +To set VIEW and EDIT permissions for the user kevin on the instance of +Acme\MyClass having the identifier 42: + + php %command.full_name% --user=Symfony/Component/Security/Core/User/User:kevin VIEW EDIT Acme/MyClass:42 + +Note that you can use / instead of \\ for the namespace delimiter to avoid any +problem. + +To set permissions for a role, use the --role option: + + php %command.full_name% --role=ROLE_USER VIEW Acme/MyClass:1936 + +To set permissions at the class scope, use the --class-scope option: + + php %command.full_name% --class-scope --user=Symfony/Component/Security/Core/User/User:anne OWNER Acme/MyClass:42 + +EOF + ) + ->addArgument('arguments', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'A list of permissions and object identities (class name and ID separated by a column)') + ->addOption('user', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A list of security identities') + ->addOption('role', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A list of roles') + ->addOption('class-scope', null, InputOption::VALUE_NONE, 'Use class-scope entries') + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + // Parse arguments + $objectIdentities = array(); + $maskBuilder = $this->getMaskBuilder(); + foreach ($input->getArgument('arguments') as $argument) { + $data = explode(':', $argument, 2); + + if (count($data) > 1) { + $objectIdentities[] = new ObjectIdentity($data[1], strtr($data[0], '/', '\\')); + } else { + $maskBuilder->add($data[0]); + } + } + + // Build permissions mask + $mask = $maskBuilder->get(); + + $userOption = $input->getOption('user'); + $roleOption = $input->getOption('role'); + $classScopeOption = $input->getOption('class-scope'); + + if (empty($userOption) && empty($roleOption)) { + throw new \InvalidArgumentException('A Role or a User must be specified.'); + } + + // Create security identities + $securityIdentities = array(); + + if ($userOption) { + foreach ($userOption as $user) { + $data = explode(':', $user, 2); + + if (count($data) === 1) { + throw new \InvalidArgumentException('The user must follow the format "Acme/MyUser:username".'); + } + + $securityIdentities[] = new UserSecurityIdentity($data[1], strtr($data[0], '/', '\\')); + } + } + + if ($roleOption) { + foreach ($roleOption as $role) { + $securityIdentities[] = new RoleSecurityIdentity($role); + } + } + + /** @var $container \Symfony\Component\DependencyInjection\ContainerInterface */ + $container = $this->getContainer(); + /** @var $aclProvider MutableAclProviderInterface */ + $aclProvider = $container->get('security.acl.provider'); + + // Sets ACL + foreach ($objectIdentities as $objectIdentity) { + // Creates a new ACL if it does not already exist + try { + $aclProvider->createAcl($objectIdentity); + } catch (AclAlreadyExistsException $e) { + } + + $acl = $aclProvider->findAcl($objectIdentity, $securityIdentities); + + foreach ($securityIdentities as $securityIdentity) { + if ($classScopeOption) { + $acl->insertClassAce($securityIdentity, $mask); + } else { + $acl->insertObjectAce($securityIdentity, $mask); + } + } + + $aclProvider->updateAcl($acl); + } + } + + /** + * Gets the mask builder. + * + * @return MaskBuilder + */ + protected function getMaskBuilder() + { + return new MaskBuilder(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..7151175d938e7897e61d85733ed368eefc5578f1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php @@ -0,0 +1,169 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Command; + +use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Question\Question; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder; + +/** + * Encode a user's password. + * + * @author Sarah Khalil + */ +class UserPasswordEncoderCommand extends ContainerAwareCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('security:encode-password') + ->setDescription('Encodes a password.') + ->addArgument('password', InputArgument::OPTIONAL, 'The plain password to encode.') + ->addArgument('user-class', InputArgument::OPTIONAL, 'The User entity class path associated with the encoder used to encode the password.', 'Symfony\Component\Security\Core\User\User') + ->addOption('empty-salt', null, InputOption::VALUE_NONE, 'Do not generate a salt or let the encoder generate one.') + ->setHelp(<<%command.name% command encodes passwords according to your +security configuration. This command is mainly used to generate passwords for +the in_memory user provider type and for changing passwords +in the database while developing the application. + +Suppose that you have the following security configuration in your application: + + +# app/config/security.yml +security: + encoders: + Symfony\Component\Security\Core\User\User: plaintext + AppBundle\Entity\User: bcrypt + + +If you execute the command non-interactively, the default Symfony User class +is used and a random salt is generated to encode the password: + + php %command.full_name% --no-interaction [password] + +Pass the full user class path as the second argument to encode passwords for +your own entities: + + php %command.full_name% --no-interaction [password] AppBundle\Entity\User + +Executing the command interactively allows you to generate a random salt for +encoding the password: + + php %command.full_name% [password] AppBundle\Entity\User + +In case your encoder doesn't require a salt, add the empty-salt option: + + php %command.full_name% --empty-salt [password] AppBundle\Entity\User + +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + + $input->isInteractive() ? $io->title('Symfony Password Encoder Utility') : $io->newLine(); + + $password = $input->getArgument('password'); + $userClass = $input->getArgument('user-class'); + $emptySalt = $input->getOption('empty-salt'); + + $encoder = $this->getContainer()->get('security.encoder_factory')->getEncoder($userClass); + $bcryptWithoutEmptySalt = !$emptySalt && $encoder instanceof BCryptPasswordEncoder; + + if ($bcryptWithoutEmptySalt) { + $emptySalt = true; + } + + if (!$password) { + if (!$input->isInteractive()) { + $io->error('The password must not be empty.'); + + return 1; + } + $passwordQuestion = $this->createPasswordQuestion(); + $password = $io->askQuestion($passwordQuestion); + } + + $salt = null; + + if ($input->isInteractive() && !$emptySalt) { + $emptySalt = true; + + $io->note('The command will take care of generating a salt for you. Be aware that some encoders advise to let them generate their own salt. If you\'re using one of those encoders, please answer \'no\' to the question below. '.PHP_EOL.'Provide the \'empty-salt\' option in order to let the encoder handle the generation itself.'); + + if ($io->confirm('Confirm salt generation ?')) { + $salt = $this->generateSalt(); + $emptySalt = false; + } + } elseif (!$emptySalt) { + $salt = $this->generateSalt(); + } + + $encodedPassword = $encoder->encodePassword($password, $salt); + + $rows = array( + array('Encoder used', get_class($encoder)), + array('Encoded password', $encodedPassword), + ); + if (!$emptySalt) { + $rows[] = array('Generated salt', $salt); + } + $io->table(array('Key', 'Value'), $rows); + + if (!$emptySalt) { + $io->note(sprintf('Make sure that your salt storage field fits the salt length: %s chars', strlen($salt))); + } elseif ($bcryptWithoutEmptySalt) { + $io->note('Bcrypt encoder used: the encoder generated its own built-in salt.'); + } + + $io->success('Password encoding succeeded'); + } + + /** + * Create the password question to ask the user for the password to be encoded. + * + * @return Question + */ + private function createPasswordQuestion() + { + $passwordQuestion = new Question('Type in your password to be encoded'); + + return $passwordQuestion->setValidator(function ($value) { + if ('' === trim($value)) { + throw new \Exception('The password must not be empty.'); + } + + return $value; + })->setHidden(true)->setMaxAttempts(20); + } + + private function generateSalt() + { + return base64_encode(random_bytes(30)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..544e1de1921af820d9a62b8565be8bfc4ab57f19 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php @@ -0,0 +1,302 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DataCollector; + +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\DataCollector\DataCollector; +use Symfony\Component\Security\Core\Role\RoleInterface; +use Symfony\Component\Security\Http\Logout\LogoutUrlGenerator; +use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface; +use Symfony\Component\Security\Core\Authorization\DebugAccessDecisionManager; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\Security\Http\FirewallMapInterface; +use Symfony\Bundle\SecurityBundle\Security\FirewallMap; + +/** + * SecurityDataCollector. + * + * @author Fabien Potencier + */ +class SecurityDataCollector extends DataCollector +{ + private $tokenStorage; + private $roleHierarchy; + private $logoutUrlGenerator; + private $accessDecisionManager; + private $firewallMap; + + /** + * Constructor. + * + * @param TokenStorageInterface|null $tokenStorage + * @param RoleHierarchyInterface|null $roleHierarchy + * @param LogoutUrlGenerator|null $logoutUrlGenerator + * @param AccessDecisionManagerInterface|null $accessDecisionManager + * @param FirewallMapInterface|null $firewallMap + */ + public function __construct(TokenStorageInterface $tokenStorage = null, RoleHierarchyInterface $roleHierarchy = null, LogoutUrlGenerator $logoutUrlGenerator = null, AccessDecisionManagerInterface $accessDecisionManager = null, FirewallMapInterface $firewallMap = null) + { + $this->tokenStorage = $tokenStorage; + $this->roleHierarchy = $roleHierarchy; + $this->logoutUrlGenerator = $logoutUrlGenerator; + $this->accessDecisionManager = $accessDecisionManager; + $this->firewallMap = $firewallMap; + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + if (null === $this->tokenStorage) { + $this->data = array( + 'enabled' => false, + 'authenticated' => false, + 'token' => null, + 'token_class' => null, + 'logout_url' => null, + 'user' => '', + 'roles' => array(), + 'inherited_roles' => array(), + 'supports_role_hierarchy' => null !== $this->roleHierarchy, + ); + } elseif (null === $token = $this->tokenStorage->getToken()) { + $this->data = array( + 'enabled' => true, + 'authenticated' => false, + 'token' => null, + 'token_class' => null, + 'logout_url' => null, + 'user' => '', + 'roles' => array(), + 'inherited_roles' => array(), + 'supports_role_hierarchy' => null !== $this->roleHierarchy, + ); + } else { + $inheritedRoles = array(); + $assignedRoles = $token->getRoles(); + + if (null !== $this->roleHierarchy) { + $allRoles = $this->roleHierarchy->getReachableRoles($assignedRoles); + foreach ($allRoles as $role) { + if (!in_array($role, $assignedRoles, true)) { + $inheritedRoles[] = $role; + } + } + } + + $logoutUrl = null; + try { + if (null !== $this->logoutUrlGenerator) { + $logoutUrl = $this->logoutUrlGenerator->getLogoutPath(); + } + } catch (\Exception $e) { + // fail silently when the logout URL cannot be generated + } + + $this->data = array( + 'enabled' => true, + 'authenticated' => $token->isAuthenticated(), + 'token' => $this->cloneVar($token), + 'token_class' => get_class($token), + 'logout_url' => $logoutUrl, + 'user' => $token->getUsername(), + 'roles' => $this->cloneVar(array_map(function (RoleInterface $role) { return $role->getRole(); }, $assignedRoles)), + 'inherited_roles' => $this->cloneVar(array_map(function (RoleInterface $role) { return $role->getRole(); }, $inheritedRoles)), + 'supports_role_hierarchy' => null !== $this->roleHierarchy, + ); + } + + // collect voters and access decision manager information + if ($this->accessDecisionManager instanceof DebugAccessDecisionManager) { + $this->data['access_decision_log'] = array_map(function ($decision) { + $decision['object'] = $this->cloneVar($decision['object']); + + return $decision; + }, $this->accessDecisionManager->getDecisionLog()); + + $this->data['voter_strategy'] = $this->accessDecisionManager->getStrategy(); + + foreach ($this->accessDecisionManager->getVoters() as $voter) { + $this->data['voters'][] = get_class($voter); + } + } else { + $this->data['access_decision_log'] = array(); + $this->data['voter_strategy'] = 'unknown'; + $this->data['voters'] = array(); + } + + // collect firewall context information + $this->data['firewall'] = null; + if ($this->firewallMap instanceof FirewallMap) { + $firewallConfig = $this->firewallMap->getFirewallConfig($request); + if (null !== $firewallConfig) { + $this->data['firewall'] = array( + 'name' => $firewallConfig->getName(), + 'allows_anonymous' => $firewallConfig->allowsAnonymous(), + 'request_matcher' => $firewallConfig->getRequestMatcher(), + 'security_enabled' => $firewallConfig->isSecurityEnabled(), + 'stateless' => $firewallConfig->isStateless(), + 'provider' => $firewallConfig->getProvider(), + 'context' => $firewallConfig->getContext(), + 'entry_point' => $firewallConfig->getEntryPoint(), + 'access_denied_handler' => $firewallConfig->getAccessDeniedHandler(), + 'access_denied_url' => $firewallConfig->getAccessDeniedUrl(), + 'user_checker' => $firewallConfig->getUserChecker(), + 'listeners' => $this->cloneVar($firewallConfig->getListeners()), + ); + } + } + } + + /** + * Checks if security is enabled. + * + * @return bool true if security is enabled, false otherwise + */ + public function isEnabled() + { + return $this->data['enabled']; + } + + /** + * Gets the user. + * + * @return string The user + */ + public function getUser() + { + return $this->data['user']; + } + + /** + * Gets the roles of the user. + * + * @return array The roles + */ + public function getRoles() + { + return $this->data['roles']; + } + + /** + * Gets the inherited roles of the user. + * + * @return array The inherited roles + */ + public function getInheritedRoles() + { + return $this->data['inherited_roles']; + } + + /** + * Checks if the data contains information about inherited roles. Still the inherited + * roles can be an empty array. + * + * @return bool true if the profile was contains inherited role information + */ + public function supportsRoleHierarchy() + { + return $this->data['supports_role_hierarchy']; + } + + /** + * Checks if the user is authenticated or not. + * + * @return bool true if the user is authenticated, false otherwise + */ + public function isAuthenticated() + { + return $this->data['authenticated']; + } + + /** + * Get the class name of the security token. + * + * @return string The token + */ + public function getTokenClass() + { + return $this->data['token_class']; + } + + /** + * Get the full security token class as Data object. + * + * @return Data + */ + public function getToken() + { + return $this->data['token']; + } + + /** + * Get the provider key (i.e. the name of the active firewall). + * + * @return string The provider key + */ + public function getLogoutUrl() + { + return $this->data['logout_url']; + } + + /** + * Returns the FQCN of the security voters enabled in the application. + * + * @return string[] + */ + public function getVoters() + { + return $this->data['voters']; + } + + /** + * Returns the strategy configured for the security voters. + * + * @return string + */ + public function getVoterStrategy() + { + return $this->data['voter_strategy']; + } + + /** + * Returns the log of the security decisions made by the access decision manager. + * + * @return array + */ + public function getAccessDecisionLog() + { + return $this->data['access_decision_log']; + } + + /** + * Returns the configuration of the current firewall context. + * + * @return array + */ + public function getFirewall() + { + return $this->data['firewall']; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'security'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php new file mode 100644 index 0000000000000000000000000000000000000000..898d38ef877da53b69b291899edca0356eca4089 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.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\Bundle\SecurityBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; +use Symfony\Component\DependencyInjection\Exception\LogicException; + +/** + * Adds all configured security voters to the access decision manager. + * + * @author Johannes M. Schmitt + */ +class AddSecurityVotersPass implements CompilerPassInterface +{ + use PriorityTaggedServiceTrait; + + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('security.access.decision_manager')) { + return; + } + + $voters = $this->findAndSortTaggedServices('security.voter', $container); + if (!$voters) { + throw new LogicException('No security voters found. You need to tag at least one with "security.voter"'); + } + + $adm = $container->getDefinition($container->hasDefinition('debug.security.access.decision_manager') ? 'debug.security.access.decision_manager' : 'security.access.decision_manager'); + $adm->addMethodCall('setVoters', array($voters)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php new file mode 100644 index 0000000000000000000000000000000000000000..c2bcb7d0e3ef2ebd6543fa1e5cf359c0bf08c6e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php @@ -0,0 +1,420 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection; + +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AbstractFactory; +use Symfony\Component\Security\Core\Authorization\AccessDecisionManager; +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; +use Symfony\Component\Config\Definition\ConfigurationInterface; +use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy; + +/** + * This class contains the configuration information. + * + * This information is for the following tags: + * + * * security.config + * * security.acl + * + * This information is solely responsible for how the different configuration + * sections are normalized, and merged. + * + * @author Johannes M. Schmitt + */ +class MainConfiguration implements ConfigurationInterface +{ + private $factories; + private $userProviderFactories; + + /** + * Constructor. + * + * @param array $factories + * @param array $userProviderFactories + */ + public function __construct(array $factories, array $userProviderFactories) + { + $this->factories = $factories; + $this->userProviderFactories = $userProviderFactories; + } + + /** + * Generates the configuration tree builder. + * + * @return TreeBuilder The tree builder + */ + public function getConfigTreeBuilder() + { + $tb = new TreeBuilder(); + $rootNode = $tb->root('security'); + + $rootNode + ->children() + ->scalarNode('access_denied_url')->defaultNull()->example('/foo/error403')->end() + ->enumNode('session_fixation_strategy') + ->values(array(SessionAuthenticationStrategy::NONE, SessionAuthenticationStrategy::MIGRATE, SessionAuthenticationStrategy::INVALIDATE)) + ->defaultValue(SessionAuthenticationStrategy::MIGRATE) + ->end() + ->booleanNode('hide_user_not_found')->defaultTrue()->end() + ->booleanNode('always_authenticate_before_granting')->defaultFalse()->end() + ->booleanNode('erase_credentials')->defaultTrue()->end() + ->arrayNode('access_decision_manager') + ->addDefaultsIfNotSet() + ->children() + ->enumNode('strategy') + ->values(array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, AccessDecisionManager::STRATEGY_CONSENSUS, AccessDecisionManager::STRATEGY_UNANIMOUS)) + ->defaultValue(AccessDecisionManager::STRATEGY_AFFIRMATIVE) + ->end() + ->booleanNode('allow_if_all_abstain')->defaultFalse()->end() + ->booleanNode('allow_if_equal_granted_denied')->defaultTrue()->end() + ->end() + ->end() + ->end() + ; + + $this->addAclSection($rootNode); + $this->addEncodersSection($rootNode); + $this->addProvidersSection($rootNode); + $this->addFirewallsSection($rootNode, $this->factories); + $this->addAccessControlSection($rootNode); + $this->addRoleHierarchySection($rootNode); + + return $tb; + } + + private function addAclSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('acl') + ->children() + ->scalarNode('connection') + ->defaultNull() + ->info('any name configured in doctrine.dbal section') + ->end() + ->arrayNode('cache') + ->addDefaultsIfNotSet() + ->children() + ->scalarNode('id')->end() + ->scalarNode('prefix')->defaultValue('sf2_acl_')->end() + ->end() + ->end() + ->scalarNode('provider')->end() + ->arrayNode('tables') + ->addDefaultsIfNotSet() + ->children() + ->scalarNode('class')->defaultValue('acl_classes')->end() + ->scalarNode('entry')->defaultValue('acl_entries')->end() + ->scalarNode('object_identity')->defaultValue('acl_object_identities')->end() + ->scalarNode('object_identity_ancestors')->defaultValue('acl_object_identity_ancestors')->end() + ->scalarNode('security_identity')->defaultValue('acl_security_identities')->end() + ->end() + ->end() + ->arrayNode('voter') + ->addDefaultsIfNotSet() + ->children() + ->booleanNode('allow_if_object_identity_unavailable')->defaultTrue()->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addRoleHierarchySection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->fixXmlConfig('role', 'role_hierarchy') + ->children() + ->arrayNode('role_hierarchy') + ->useAttributeAsKey('id') + ->prototype('array') + ->performNoDeepMerging() + ->beforeNormalization()->ifString()->then(function ($v) { return array('value' => $v); })->end() + ->beforeNormalization() + ->ifTrue(function ($v) { return is_array($v) && isset($v['value']); }) + ->then(function ($v) { return preg_split('/\s*,\s*/', $v['value']); }) + ->end() + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ; + } + + private function addAccessControlSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->fixXmlConfig('rule', 'access_control') + ->children() + ->arrayNode('access_control') + ->cannotBeOverwritten() + ->prototype('array') + ->fixXmlConfig('ip') + ->fixXmlConfig('method') + ->children() + ->scalarNode('requires_channel')->defaultNull()->end() + ->scalarNode('path') + ->defaultNull() + ->info('use the urldecoded format') + ->example('^/path to resource/') + ->end() + ->scalarNode('host')->defaultNull()->end() + ->arrayNode('ips') + ->beforeNormalization()->ifString()->then(function ($v) { return array($v); })->end() + ->prototype('scalar')->end() + ->end() + ->arrayNode('methods') + ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() + ->prototype('scalar')->end() + ->end() + ->scalarNode('allow_if')->defaultNull()->end() + ->end() + ->fixXmlConfig('role') + ->children() + ->arrayNode('roles') + ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $factories) + { + $firewallNodeBuilder = $rootNode + ->fixXmlConfig('firewall') + ->children() + ->arrayNode('firewalls') + ->isRequired() + ->requiresAtLeastOneElement() + ->disallowNewKeysInSubsequentConfigs() + ->useAttributeAsKey('name') + ->prototype('array') + ->children() + ; + + $firewallNodeBuilder + ->scalarNode('pattern')->end() + ->scalarNode('host')->end() + ->arrayNode('methods') + ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() + ->prototype('scalar')->end() + ->end() + ->booleanNode('security')->defaultTrue()->end() + ->scalarNode('user_checker') + ->defaultValue('security.user_checker') + ->treatNullLike('security.user_checker') + ->info('The UserChecker to use when authenticating users in this firewall.') + ->end() + ->scalarNode('request_matcher')->end() + ->scalarNode('access_denied_url')->end() + ->scalarNode('access_denied_handler')->end() + ->scalarNode('entry_point')->end() + ->scalarNode('provider')->end() + ->booleanNode('stateless')->defaultFalse()->end() + ->scalarNode('context')->cannotBeEmpty()->end() + ->arrayNode('logout') + ->treatTrueLike(array()) + ->canBeUnset() + ->children() + ->scalarNode('csrf_parameter')->defaultValue('_csrf_token')->end() + ->scalarNode('csrf_token_generator')->cannotBeEmpty()->end() + ->scalarNode('csrf_token_id')->defaultValue('logout')->end() + ->scalarNode('path')->defaultValue('/logout')->end() + ->scalarNode('target')->defaultValue('/')->end() + ->scalarNode('success_handler')->end() + ->booleanNode('invalidate_session')->defaultTrue()->end() + ->end() + ->fixXmlConfig('delete_cookie') + ->children() + ->arrayNode('delete_cookies') + ->beforeNormalization() + ->ifTrue(function ($v) { return is_array($v) && is_int(key($v)); }) + ->then(function ($v) { return array_map(function ($v) { return array('name' => $v); }, $v); }) + ->end() + ->useAttributeAsKey('name') + ->prototype('array') + ->children() + ->scalarNode('path')->defaultNull()->end() + ->scalarNode('domain')->defaultNull()->end() + ->end() + ->end() + ->end() + ->end() + ->fixXmlConfig('handler') + ->children() + ->arrayNode('handlers') + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->arrayNode('anonymous') + ->canBeUnset() + ->children() + ->scalarNode('secret')->defaultValue(uniqid('', true))->end() + ->end() + ->end() + ->arrayNode('switch_user') + ->canBeUnset() + ->children() + ->scalarNode('provider')->end() + ->scalarNode('parameter')->defaultValue('_switch_user')->end() + ->scalarNode('role')->defaultValue('ROLE_ALLOWED_TO_SWITCH')->end() + ->end() + ->end() + ; + + $abstractFactoryKeys = array(); + foreach ($factories as $factoriesAtPosition) { + foreach ($factoriesAtPosition as $factory) { + $name = str_replace('-', '_', $factory->getKey()); + $factoryNode = $firewallNodeBuilder->arrayNode($name) + ->canBeUnset() + ; + + if ($factory instanceof AbstractFactory) { + $abstractFactoryKeys[] = $name; + } + + $factory->addConfiguration($factoryNode); + } + } + + // check for unreachable check paths + $firewallNodeBuilder + ->end() + ->validate() + ->ifTrue(function ($v) { + return true === $v['security'] && isset($v['pattern']) && !isset($v['request_matcher']); + }) + ->then(function ($firewall) use ($abstractFactoryKeys) { + foreach ($abstractFactoryKeys as $k) { + if (!isset($firewall[$k]['check_path'])) { + continue; + } + + if (false !== strpos($firewall[$k]['check_path'], '/') && !preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) { + throw new \LogicException(sprintf('The check_path "%s" for login method "%s" is not matched by the firewall pattern "%s".', $firewall[$k]['check_path'], $k, $firewall['pattern'])); + } + } + + return $firewall; + }) + ->end() + ; + } + + private function addProvidersSection(ArrayNodeDefinition $rootNode) + { + $providerNodeBuilder = $rootNode + ->fixXmlConfig('provider') + ->children() + ->arrayNode('providers') + ->example(array( + 'my_memory_provider' => array( + 'memory' => array( + 'users' => array( + 'foo' => array('password' => 'foo', 'roles' => 'ROLE_USER'), + 'bar' => array('password' => 'bar', 'roles' => '[ROLE_USER, ROLE_ADMIN]'), + ), + ), + ), + 'my_entity_provider' => array('entity' => array('class' => 'SecurityBundle:User', 'property' => 'username')), + )) + ->isRequired() + ->requiresAtLeastOneElement() + ->useAttributeAsKey('name') + ->prototype('array') + ; + + $providerNodeBuilder + ->children() + ->scalarNode('id')->end() + ->arrayNode('chain') + ->fixXmlConfig('provider') + ->children() + ->arrayNode('providers') + ->beforeNormalization() + ->ifString() + ->then(function ($v) { return preg_split('/\s*,\s*/', $v); }) + ->end() + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->end() + ; + + foreach ($this->userProviderFactories as $factory) { + $name = str_replace('-', '_', $factory->getKey()); + $factoryNode = $providerNodeBuilder->children()->arrayNode($name)->canBeUnset(); + + $factory->addConfiguration($factoryNode); + } + + $providerNodeBuilder + ->validate() + ->ifTrue(function ($v) { return count($v) > 1; }) + ->thenInvalid('You cannot set multiple provider types for the same provider') + ->end() + ->validate() + ->ifTrue(function ($v) { return count($v) === 0; }) + ->thenInvalid('You must set a provider definition for the provider.') + ->end() + ; + } + + private function addEncodersSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->fixXmlConfig('encoder') + ->children() + ->arrayNode('encoders') + ->example(array( + 'AppBundle\Entity\User1' => 'bcrypt', + 'AppBundle\Entity\User2' => array( + 'algorithm' => 'bcrypt', + 'cost' => 13, + ), + )) + ->requiresAtLeastOneElement() + ->useAttributeAsKey('class') + ->prototype('array') + ->canBeUnset() + ->performNoDeepMerging() + ->beforeNormalization()->ifString()->then(function ($v) { return array('algorithm' => $v); })->end() + ->children() + ->scalarNode('algorithm')->cannotBeEmpty()->end() + ->scalarNode('hash_algorithm')->info('Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms.')->defaultValue('sha512')->end() + ->scalarNode('key_length')->defaultValue(40)->end() + ->booleanNode('ignore_case')->defaultFalse()->end() + ->booleanNode('encode_as_base64')->defaultTrue()->end() + ->scalarNode('iterations')->defaultValue(5000)->end() + ->integerNode('cost') + ->min(4) + ->max(31) + ->defaultValue(13) + ->end() + ->scalarNode('id')->end() + ->end() + ->end() + ->end() + ->end() + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..cdb0a96fe4175e062c7342ad2bc2b508f3cb6235 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.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\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * AbstractFactory is the base class for all classes inheriting from + * AbstractAuthenticationListener. + * + * @author Fabien Potencier + * @author Lukas Kahwe Smith + * @author Johannes M. Schmitt + */ +abstract class AbstractFactory implements SecurityFactoryInterface +{ + protected $options = array( + 'check_path' => '/login_check', + 'use_forward' => false, + 'require_previous_session' => true, + ); + + protected $defaultSuccessHandlerOptions = array( + 'always_use_default_target_path' => false, + 'default_target_path' => '/', + 'login_path' => '/login', + 'target_path_parameter' => '_target_path', + 'use_referer' => false, + ); + + protected $defaultFailureHandlerOptions = array( + 'failure_path' => null, + 'failure_forward' => false, + 'login_path' => '/login', + 'failure_path_parameter' => '_failure_path', + ); + + public function create(ContainerBuilder $container, $id, $config, $userProviderId, $defaultEntryPointId) + { + // authentication provider + $authProviderId = $this->createAuthProvider($container, $id, $config, $userProviderId); + + // authentication listener + $listenerId = $this->createListener($container, $id, $config, $userProviderId); + + // add remember-me aware tag if requested + if ($this->isRememberMeAware($config)) { + $container + ->getDefinition($listenerId) + ->addTag('security.remember_me_aware', array('id' => $id, 'provider' => $userProviderId)) + ; + } + + // create entry point if applicable (optional) + $entryPointId = $this->createEntryPoint($container, $id, $config, $defaultEntryPointId); + + return array($authProviderId, $listenerId, $entryPointId); + } + + public function addConfiguration(NodeDefinition $node) + { + $builder = $node->children(); + + $builder + ->scalarNode('provider')->end() + ->booleanNode('remember_me')->defaultTrue()->end() + ->scalarNode('success_handler')->end() + ->scalarNode('failure_handler')->end() + ; + + foreach (array_merge($this->options, $this->defaultSuccessHandlerOptions, $this->defaultFailureHandlerOptions) as $name => $default) { + if (is_bool($default)) { + $builder->booleanNode($name)->defaultValue($default); + } else { + $builder->scalarNode($name)->defaultValue($default); + } + } + } + + final public function addOption($name, $default = null) + { + $this->options[$name] = $default; + } + + /** + * Subclasses must return the id of a service which implements the + * AuthenticationProviderInterface. + * + * @param ContainerBuilder $container + * @param string $id The unique id of the firewall + * @param array $config The options array for this listener + * @param string $userProviderId The id of the user provider + * + * @return string never null, the id of the authentication provider + */ + abstract protected function createAuthProvider(ContainerBuilder $container, $id, $config, $userProviderId); + + /** + * Subclasses must return the id of the abstract listener template. + * + * Listener definitions should inherit from the AbstractAuthenticationListener + * like this: + * + * + * + * In the above case, this method would return "my.listener.id". + * + * @return string + */ + abstract protected function getListenerId(); + + /** + * Subclasses may create an entry point of their as they see fit. The + * default implementation does not change the default entry point. + * + * @param ContainerBuilder $container + * @param string $id + * @param array $config + * @param string $defaultEntryPointId + * + * @return string the entry point id + */ + protected function createEntryPoint($container, $id, $config, $defaultEntryPointId) + { + return $defaultEntryPointId; + } + + /** + * Subclasses may disable remember-me features for the listener, by + * always returning false from this method. + * + * @param array $config + * + * @return bool Whether a possibly configured RememberMeServices should be set for this listener + */ + protected function isRememberMeAware($config) + { + return $config['remember_me']; + } + + protected function createListener($container, $id, $config, $userProvider) + { + $listenerId = $this->getListenerId(); + $listener = new DefinitionDecorator($listenerId); + $listener->replaceArgument(4, $id); + $listener->replaceArgument(5, new Reference($this->createAuthenticationSuccessHandler($container, $id, $config))); + $listener->replaceArgument(6, new Reference($this->createAuthenticationFailureHandler($container, $id, $config))); + $listener->replaceArgument(7, array_intersect_key($config, $this->options)); + + $listenerId .= '.'.$id; + $container->setDefinition($listenerId, $listener); + + return $listenerId; + } + + protected function createAuthenticationSuccessHandler($container, $id, $config) + { + $successHandlerId = $this->getSuccessHandlerId($id); + $options = array_intersect_key($config, $this->defaultSuccessHandlerOptions); + + if (isset($config['success_handler'])) { + $successHandler = $container->setDefinition($successHandlerId, new DefinitionDecorator('security.authentication.custom_success_handler')); + $successHandler->replaceArgument(0, new Reference($config['success_handler'])); + $successHandler->replaceArgument(1, $options); + $successHandler->replaceArgument(2, $id); + } else { + $successHandler = $container->setDefinition($successHandlerId, new DefinitionDecorator('security.authentication.success_handler')); + $successHandler->addMethodCall('setOptions', array($options)); + $successHandler->addMethodCall('setProviderKey', array($id)); + } + + return $successHandlerId; + } + + protected function createAuthenticationFailureHandler($container, $id, $config) + { + $id = $this->getFailureHandlerId($id); + $options = array_intersect_key($config, $this->defaultFailureHandlerOptions); + + if (isset($config['failure_handler'])) { + $failureHandler = $container->setDefinition($id, new DefinitionDecorator('security.authentication.custom_failure_handler')); + $failureHandler->replaceArgument(0, new Reference($config['failure_handler'])); + $failureHandler->replaceArgument(1, $options); + } else { + $failureHandler = $container->setDefinition($id, new DefinitionDecorator('security.authentication.failure_handler')); + $failureHandler->addMethodCall('setOptions', array($options)); + } + + return $id; + } + + protected function getSuccessHandlerId($id) + { + return 'security.authentication.success_handler.'.$id.'.'.str_replace('-', '_', $this->getKey()); + } + + protected function getFailureHandlerId($id) + { + return 'security.authentication.failure_handler.'.$id.'.'.str_replace('-', '_', $this->getKey()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..021c050b79247d2b4058185b389d76c89de9e42e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.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\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * FormLoginFactory creates services for form login authentication. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class FormLoginFactory extends AbstractFactory +{ + public function __construct() + { + $this->addOption('username_parameter', '_username'); + $this->addOption('password_parameter', '_password'); + $this->addOption('csrf_parameter', '_csrf_token'); + $this->addOption('csrf_token_id', 'authenticate'); + $this->addOption('post_only', true); + } + + public function getPosition() + { + return 'form'; + } + + public function getKey() + { + return 'form-login'; + } + + public function addConfiguration(NodeDefinition $node) + { + parent::addConfiguration($node); + + $node + ->children() + ->scalarNode('csrf_token_generator')->cannotBeEmpty()->end() + ->end() + ; + } + + protected function getListenerId() + { + return 'security.authentication.listener.form'; + } + + protected function createAuthProvider(ContainerBuilder $container, $id, $config, $userProviderId) + { + $provider = 'security.authentication.provider.dao.'.$id; + $container + ->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.dao')) + ->replaceArgument(0, new Reference($userProviderId)) + ->replaceArgument(1, new Reference('security.user_checker.'.$id)) + ->replaceArgument(2, $id) + ; + + return $provider; + } + + protected function createListener($container, $id, $config, $userProvider) + { + $listenerId = parent::createListener($container, $id, $config, $userProvider); + + $container + ->getDefinition($listenerId) + ->addArgument(isset($config['csrf_token_generator']) ? new Reference($config['csrf_token_generator']) : null) + ; + + return $listenerId; + } + + protected function createEntryPoint($container, $id, $config, $defaultEntryPoint) + { + $entryPointId = 'security.authentication.form_entry_point.'.$id; + $container + ->setDefinition($entryPointId, new DefinitionDecorator('security.authentication.form_entry_point')) + ->addArgument(new Reference('security.http_utils')) + ->addArgument($config['login_path']) + ->addArgument($config['use_forward']) + ; + + return $entryPointId; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..2932f2c1025e751aa15033c11eb5f0017fbe72bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.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\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * FormLoginLdapFactory creates services for form login ldap authentication. + * + * @author Grégoire Pineau + * @author Charles Sarrazin + */ +class FormLoginLdapFactory extends FormLoginFactory +{ + protected function createAuthProvider(ContainerBuilder $container, $id, $config, $userProviderId) + { + $provider = 'security.authentication.provider.ldap_bind.'.$id; + $container + ->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.ldap_bind')) + ->replaceArgument(0, new Reference($userProviderId)) + ->replaceArgument(1, new Reference('security.user_checker.'.$id)) + ->replaceArgument(2, $id) + ->replaceArgument(3, new Reference($config['service'])) + ->replaceArgument(4, $config['dn_string']) + ; + + return $provider; + } + + public function addConfiguration(NodeDefinition $node) + { + parent::addConfiguration($node); + + $node + ->children() + ->scalarNode('service')->defaultValue('ldap')->end() + ->scalarNode('dn_string')->defaultValue('{username}')->end() + ->end() + ; + } + + public function getKey() + { + return 'form-login-ldap'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..67bdeceb346c7340c5bcbb6743f45d6a1a3c1e01 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Configures the "guard" authentication provider key under a firewall. + * + * @author Ryan Weaver + */ +class GuardAuthenticationFactory implements SecurityFactoryInterface +{ + public function getPosition() + { + return 'pre_auth'; + } + + public function getKey() + { + return 'guard'; + } + + public function addConfiguration(NodeDefinition $node) + { + $node + ->fixXmlConfig('authenticator') + ->children() + ->scalarNode('provider') + ->info('A key from the "providers" section of your security config, in case your user provider is different than the firewall') + ->end() + ->scalarNode('entry_point') + ->info('A service id (of one of your authenticators) whose start() method should be called when an anonymous user hits a page that requires authentication') + ->defaultValue(null) + ->end() + ->arrayNode('authenticators') + ->info('An array of service ids for all of your "authenticators"') + ->requiresAtLeastOneElement() + ->prototype('scalar')->end() + ->end() + ->end() + ; + } + + public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) + { + $authenticatorIds = $config['authenticators']; + $authenticatorReferences = array(); + foreach ($authenticatorIds as $authenticatorId) { + $authenticatorReferences[] = new Reference($authenticatorId); + } + + // configure the GuardAuthenticationFactory to have the dynamic constructor arguments + $providerId = 'security.authentication.provider.guard.'.$id; + $container + ->setDefinition($providerId, new DefinitionDecorator('security.authentication.provider.guard')) + ->replaceArgument(0, $authenticatorReferences) + ->replaceArgument(1, new Reference($userProvider)) + ->replaceArgument(2, $id) + ->replaceArgument(3, new Reference('security.user_checker.'.$id)) + ; + + // listener + $listenerId = 'security.authentication.listener.guard.'.$id; + $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.guard')); + $listener->replaceArgument(2, $id); + $listener->replaceArgument(3, $authenticatorReferences); + + // determine the entryPointId to use + $entryPointId = $this->determineEntryPoint($defaultEntryPoint, $config); + + // this is always injected - then the listener decides if it should be used + $container + ->getDefinition($listenerId) + ->addTag('security.remember_me_aware', array('id' => $id, 'provider' => $userProvider)); + + return array($providerId, $listenerId, $entryPointId); + } + + private function determineEntryPoint($defaultEntryPointId, array $config) + { + if ($defaultEntryPointId) { + // explode if they've configured the entry_point, but there is already one + if ($config['entry_point']) { + throw new \LogicException(sprintf( + 'The guard authentication provider cannot use the "%s" entry_point because another entry point is already configured by another provider! Either remove the other provider or move the entry_point configuration as a root key under your firewall (i.e. at the same level as "guard").', + $config['entry_point'] + )); + } + + return $defaultEntryPointId; + } + + if ($config['entry_point']) { + // if it's configured explicitly, use it! + return $config['entry_point']; + } + + $authenticatorIds = $config['authenticators']; + if (count($authenticatorIds) == 1) { + // if there is only one authenticator, use that as the entry point + return array_shift($authenticatorIds); + } + + // we have multiple entry points - we must ask them to configure one + throw new \LogicException(sprintf( + 'Because you have multiple guard configurators, you need to set the "guard.entry_point" key to one of you configurators (%s)', + implode(', ', $authenticatorIds) + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..162ea051579848c3d2f950a18bea4b3b720fb479 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * HttpBasicFactory creates services for HTTP basic authentication. + * + * @author Fabien Potencier + */ +class HttpBasicFactory implements SecurityFactoryInterface +{ + public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) + { + $provider = 'security.authentication.provider.dao.'.$id; + $container + ->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.dao')) + ->replaceArgument(0, new Reference($userProvider)) + ->replaceArgument(1, new Reference('security.user_checker.'.$id)) + ->replaceArgument(2, $id) + ; + + // entry point + $entryPointId = $this->createEntryPoint($container, $id, $config, $defaultEntryPoint); + + // listener + $listenerId = 'security.authentication.listener.basic.'.$id; + $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.basic')); + $listener->replaceArgument(2, $id); + $listener->replaceArgument(3, new Reference($entryPointId)); + + return array($provider, $listenerId, $entryPointId); + } + + public function getPosition() + { + return 'http'; + } + + public function getKey() + { + return 'http-basic'; + } + + public function addConfiguration(NodeDefinition $node) + { + $node + ->children() + ->scalarNode('provider')->end() + ->scalarNode('realm')->defaultValue('Secured Area')->end() + ->end() + ; + } + + protected function createEntryPoint($container, $id, $config, $defaultEntryPoint) + { + if (null !== $defaultEntryPoint) { + return $defaultEntryPoint; + } + + $entryPointId = 'security.authentication.basic_entry_point.'.$id; + $container + ->setDefinition($entryPointId, new DefinitionDecorator('security.authentication.basic_entry_point')) + ->addArgument($config['realm']) + ; + + return $entryPointId; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..2b7e6201dfa4473ecc6772c4e9514b0bd1497cba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * HttpBasicFactory creates services for HTTP basic authentication. + * + * @author Fabien Potencier + * @author Grégoire Pineau + * @author Charles Sarrazin + */ +class HttpBasicLdapFactory extends HttpBasicFactory +{ + public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) + { + $provider = 'security.authentication.provider.ldap_bind.'.$id; + $container + ->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.ldap_bind')) + ->replaceArgument(0, new Reference($userProvider)) + ->replaceArgument(1, new Reference('security.user_checker.'.$id)) + ->replaceArgument(2, $id) + ->replaceArgument(3, new Reference($config['service'])) + ->replaceArgument(4, $config['dn_string']) + ; + + // entry point + $entryPointId = $this->createEntryPoint($container, $id, $config, $defaultEntryPoint); + + // listener + $listenerId = 'security.authentication.listener.basic.'.$id; + $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.basic')); + $listener->replaceArgument(2, $id); + $listener->replaceArgument(3, new Reference($entryPointId)); + + return array($provider, $listenerId, $entryPointId); + } + + public function addConfiguration(NodeDefinition $node) + { + parent::addConfiguration($node); + + $node + ->children() + ->scalarNode('service')->defaultValue('ldap')->end() + ->scalarNode('dn_string')->defaultValue('{username}')->end() + ->end() + ; + } + + public function getKey() + { + return 'http-basic-ldap'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..a360504572656eb4c083e88e9e825dc9d4a5c230 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * HttpDigestFactory creates services for HTTP digest authentication. + * + * @author Fabien Potencier + */ +class HttpDigestFactory implements SecurityFactoryInterface +{ + public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) + { + $provider = 'security.authentication.provider.dao.'.$id; + $container + ->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.dao')) + ->replaceArgument(0, new Reference($userProvider)) + ->replaceArgument(1, new Reference('security.user_checker.'.$id)) + ->replaceArgument(2, $id) + ; + + // entry point + $entryPointId = $this->createEntryPoint($container, $id, $config, $defaultEntryPoint); + + // listener + $listenerId = 'security.authentication.listener.digest.'.$id; + $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.digest')); + $listener->replaceArgument(1, new Reference($userProvider)); + $listener->replaceArgument(2, $id); + $listener->replaceArgument(3, new Reference($entryPointId)); + + return array($provider, $listenerId, $entryPointId); + } + + public function getPosition() + { + return 'http'; + } + + public function getKey() + { + return 'http-digest'; + } + + public function addConfiguration(NodeDefinition $node) + { + $node + ->children() + ->scalarNode('provider')->end() + ->scalarNode('realm')->defaultValue('Secured Area')->end() + ->scalarNode('secret')->isRequired()->cannotBeEmpty()->end() + ->end() + ; + } + + protected function createEntryPoint($container, $id, $config, $defaultEntryPoint) + { + if (null !== $defaultEntryPoint) { + return $defaultEntryPoint; + } + + $entryPointId = 'security.authentication.digest_entry_point.'.$id; + $container + ->setDefinition($entryPointId, new DefinitionDecorator('security.authentication.digest_entry_point')) + ->addArgument($config['realm']) + ->addArgument($config['secret']) + ; + + return $entryPointId; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..f20f8c2e70a0ddfb3b7461edb271b523089b96fc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php @@ -0,0 +1,149 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class RememberMeFactory implements SecurityFactoryInterface +{ + protected $options = array( + 'name' => 'REMEMBERME', + 'lifetime' => 31536000, + 'path' => '/', + 'domain' => null, + 'secure' => false, + 'httponly' => true, + 'always_remember_me' => false, + 'remember_me_parameter' => '_remember_me', + ); + + public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) + { + // authentication provider + $authProviderId = 'security.authentication.provider.rememberme.'.$id; + $container + ->setDefinition($authProviderId, new DefinitionDecorator('security.authentication.provider.rememberme')) + ->replaceArgument(0, new Reference('security.user_checker.'.$id)) + ->addArgument($config['secret']) + ->addArgument($id) + ; + + // remember me services + if (isset($config['token_provider'])) { + $templateId = 'security.authentication.rememberme.services.persistent'; + $rememberMeServicesId = $templateId.'.'.$id; + } else { + $templateId = 'security.authentication.rememberme.services.simplehash'; + $rememberMeServicesId = $templateId.'.'.$id; + } + + if ($container->hasDefinition('security.logout_listener.'.$id)) { + $container + ->getDefinition('security.logout_listener.'.$id) + ->addMethodCall('addHandler', array(new Reference($rememberMeServicesId))) + ; + } + + $rememberMeServices = $container->setDefinition($rememberMeServicesId, new DefinitionDecorator($templateId)); + $rememberMeServices->replaceArgument(1, $config['secret']); + $rememberMeServices->replaceArgument(2, $id); + + if (isset($config['token_provider'])) { + $rememberMeServices->addMethodCall('setTokenProvider', array( + new Reference($config['token_provider']), + )); + } + + // remember-me options + $rememberMeServices->replaceArgument(3, array_intersect_key($config, $this->options)); + + // attach to remember-me aware listeners + $userProviders = array(); + foreach ($container->findTaggedServiceIds('security.remember_me_aware') as $serviceId => $attributes) { + foreach ($attributes as $attribute) { + if (!isset($attribute['id']) || $attribute['id'] !== $id) { + continue; + } + + if (!isset($attribute['provider'])) { + throw new \RuntimeException('Each "security.remember_me_aware" tag must have a provider attribute.'); + } + + $userProviders[] = new Reference($attribute['provider']); + $container + ->getDefinition($serviceId) + ->addMethodCall('setRememberMeServices', array(new Reference($rememberMeServicesId))) + ; + } + } + if ($config['user_providers']) { + $userProviders = array(); + foreach ($config['user_providers'] as $providerName) { + $userProviders[] = new Reference('security.user.provider.concrete.'.$providerName); + } + } + if (count($userProviders) === 0) { + throw new \RuntimeException('You must configure at least one remember-me aware listener (such as form-login) for each firewall that has remember-me enabled.'); + } + + $rememberMeServices->replaceArgument(0, array_unique($userProviders)); + + // remember-me listener + $listenerId = 'security.authentication.listener.rememberme.'.$id; + $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.rememberme')); + $listener->replaceArgument(1, new Reference($rememberMeServicesId)); + $listener->replaceArgument(5, $config['catch_exceptions']); + + return array($authProviderId, $listenerId, $defaultEntryPoint); + } + + public function getPosition() + { + return 'remember_me'; + } + + public function getKey() + { + return 'remember-me'; + } + + public function addConfiguration(NodeDefinition $node) + { + $builder = $node + ->fixXmlConfig('user_provider') + ->children() + ; + + $builder + ->scalarNode('secret')->isRequired()->cannotBeEmpty()->end() + ->scalarNode('token_provider')->end() + ->arrayNode('user_providers') + ->beforeNormalization() + ->ifString()->then(function ($v) { return array($v); }) + ->end() + ->prototype('scalar')->end() + ->end() + ->scalarNode('catch_exceptions')->defaultTrue()->end() + ; + + foreach ($this->options as $name => $value) { + if (is_bool($value)) { + $builder->booleanNode($name)->defaultValue($value); + } else { + $builder->scalarNode($name)->defaultValue($value); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RemoteUserFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RemoteUserFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..cf2e2ed71b16c86b1b19c6df8d8a9ff4ec74443f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RemoteUserFactory.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * RemoteUserFactory creates services for REMOTE_USER based authentication. + * + * @author Fabien Potencier + * @author Maxime Douailin + */ +class RemoteUserFactory implements SecurityFactoryInterface +{ + public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) + { + $providerId = 'security.authentication.provider.pre_authenticated.'.$id; + $container + ->setDefinition($providerId, new DefinitionDecorator('security.authentication.provider.pre_authenticated')) + ->replaceArgument(0, new Reference($userProvider)) + ->replaceArgument(1, new Reference('security.user_checker.'.$id)) + ->addArgument($id) + ; + + $listenerId = 'security.authentication.listener.remote_user.'.$id; + $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.remote_user')); + $listener->replaceArgument(2, $id); + $listener->replaceArgument(3, $config['user']); + + return array($providerId, $listenerId, $defaultEntryPoint); + } + + public function getPosition() + { + return 'pre_auth'; + } + + public function getKey() + { + return 'remote-user'; + } + + public function addConfiguration(NodeDefinition $node) + { + $node + ->children() + ->scalarNode('provider')->end() + ->scalarNode('user')->defaultValue('REMOTE_USER')->end() + ->end() + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..028e885246f6108de6c43d7975cc9b0d65aef291 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * SecurityFactoryInterface is the interface for all security authentication listener. + * + * @author Fabien Potencier + */ +interface SecurityFactoryInterface +{ + /** + * Configures the container services required to use the authentication listener. + * + * @param ContainerBuilder $container + * @param string $id The unique id of the firewall + * @param array $config The options array for the listener + * @param string $userProvider The service id of the user provider + * @param string $defaultEntryPoint + * + * @return array containing three values: + * - the provider id + * - the listener id + * - the entry point id + */ + public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint); + + /** + * Defines the position at which the provider is called. + * Possible values: pre_auth, form, http, and remember_me. + * + * @return string + */ + public function getPosition(); + + /** + * Defines the configuration key used to reference the provider + * in the firewall configuration. + * + * @return string + */ + public function getKey(); + + public function addConfiguration(NodeDefinition $builder); +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SimpleFormFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SimpleFormFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..6241cf4f3912fbb320ba8ff39772f7bcd6fdb967 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SimpleFormFactory.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * @author Jordi Boggiano + */ +class SimpleFormFactory extends FormLoginFactory +{ + public function __construct() + { + parent::__construct(); + + $this->addOption('authenticator', null); + } + + public function getKey() + { + return 'simple-form'; + } + + public function addConfiguration(NodeDefinition $node) + { + parent::addConfiguration($node); + + $node->children() + ->scalarNode('authenticator')->cannotBeEmpty()->end() + ->end(); + } + + protected function getListenerId() + { + return 'security.authentication.listener.simple_form'; + } + + protected function createAuthProvider(ContainerBuilder $container, $id, $config, $userProviderId) + { + $provider = 'security.authentication.provider.simple_form.'.$id; + $container + ->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.simple')) + ->replaceArgument(0, new Reference($config['authenticator'])) + ->replaceArgument(1, new Reference($userProviderId)) + ->replaceArgument(2, $id) + ; + + return $provider; + } + + protected function createListener($container, $id, $config, $userProvider) + { + $listenerId = parent::createListener($container, $id, $config, $userProvider); + + $simpleAuthHandlerId = 'security.authentication.simple_success_failure_handler.'.$id; + $simpleAuthHandler = $container->setDefinition($simpleAuthHandlerId, new DefinitionDecorator('security.authentication.simple_success_failure_handler')); + $simpleAuthHandler->replaceArgument(0, new Reference($config['authenticator'])); + $simpleAuthHandler->replaceArgument(1, new Reference($this->getSuccessHandlerId($id))); + $simpleAuthHandler->replaceArgument(2, new Reference($this->getFailureHandlerId($id))); + + $listener = $container->getDefinition($listenerId); + $listener->replaceArgument(5, new Reference($simpleAuthHandlerId)); + $listener->replaceArgument(6, new Reference($simpleAuthHandlerId)); + $listener->addArgument(new Reference($config['authenticator'])); + + return $listenerId; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SimplePreAuthenticationFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SimplePreAuthenticationFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..27d8c5f050ec556e6839f4b8dcfaa7f480d0a84a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SimplePreAuthenticationFactory.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * @author Jordi Boggiano + */ +class SimplePreAuthenticationFactory implements SecurityFactoryInterface +{ + public function getPosition() + { + return 'pre_auth'; + } + + public function getKey() + { + return 'simple-preauth'; + } + + public function addConfiguration(NodeDefinition $node) + { + $node + ->children() + ->scalarNode('provider')->end() + ->scalarNode('authenticator')->cannotBeEmpty()->end() + ->end() + ; + } + + public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) + { + $provider = 'security.authentication.provider.simple_preauth.'.$id; + $container + ->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.simple')) + ->replaceArgument(0, new Reference($config['authenticator'])) + ->replaceArgument(1, new Reference($userProvider)) + ->replaceArgument(2, $id) + ; + + // listener + $listenerId = 'security.authentication.listener.simple_preauth.'.$id; + $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.simple_preauth')); + $listener->replaceArgument(2, $id); + $listener->replaceArgument(3, new Reference($config['authenticator'])); + + return array($provider, $listenerId, null); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..0467ef2ba2c751a160a94258beda1f6166f88987 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * X509Factory creates services for X509 certificate authentication. + * + * @author Fabien Potencier + */ +class X509Factory implements SecurityFactoryInterface +{ + public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) + { + $providerId = 'security.authentication.provider.pre_authenticated.'.$id; + $container + ->setDefinition($providerId, new DefinitionDecorator('security.authentication.provider.pre_authenticated')) + ->replaceArgument(0, new Reference($userProvider)) + ->replaceArgument(1, new Reference('security.user_checker.'.$id)) + ->addArgument($id) + ; + + // listener + $listenerId = 'security.authentication.listener.x509.'.$id; + $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.x509')); + $listener->replaceArgument(2, $id); + $listener->replaceArgument(3, $config['user']); + $listener->replaceArgument(4, $config['credentials']); + + return array($providerId, $listenerId, $defaultEntryPoint); + } + + public function getPosition() + { + return 'pre_auth'; + } + + public function getKey() + { + return 'x509'; + } + + public function addConfiguration(NodeDefinition $node) + { + $node + ->children() + ->scalarNode('provider')->end() + ->scalarNode('user')->defaultValue('SSL_CLIENT_S_DN_Email')->end() + ->scalarNode('credentials')->defaultValue('SSL_CLIENT_S_DN')->end() + ->end() + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..b184385f221fa0b17071b835beece6507469d104 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * InMemoryFactory creates services for the memory provider. + * + * @author Fabien Potencier + * @author Christophe Coevoet + */ +class InMemoryFactory implements UserProviderFactoryInterface +{ + public function create(ContainerBuilder $container, $id, $config) + { + $definition = $container->setDefinition($id, new DefinitionDecorator('security.user.provider.in_memory')); + + foreach ($config['users'] as $username => $user) { + $userId = $id.'_'.$username; + + $container + ->setDefinition($userId, new DefinitionDecorator('security.user.provider.in_memory.user')) + ->setArguments(array($username, (string) $user['password'], $user['roles'])) + ; + + $definition->addMethodCall('createUser', array(new Reference($userId))); + } + } + + public function getKey() + { + return 'memory'; + } + + public function addConfiguration(NodeDefinition $node) + { + $node + ->fixXmlConfig('user') + ->children() + ->arrayNode('users') + ->useAttributeAsKey('name') + ->prototype('array') + ->children() + ->scalarNode('password')->defaultValue(uniqid('', true))->end() + ->arrayNode('roles') + ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..ecaf35364db919339d2135cfe724959b68cba8d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * LdapFactory creates services for Ldap user provider. + * + * @author Grégoire Pineau + * @author Charles Sarrazin + */ +class LdapFactory implements UserProviderFactoryInterface +{ + public function create(ContainerBuilder $container, $id, $config) + { + $container + ->setDefinition($id, new DefinitionDecorator('security.user.provider.ldap')) + ->replaceArgument(0, new Reference($config['service'])) + ->replaceArgument(1, $config['base_dn']) + ->replaceArgument(2, $config['search_dn']) + ->replaceArgument(3, $config['search_password']) + ->replaceArgument(4, $config['default_roles']) + ->replaceArgument(5, $config['uid_key']) + ->replaceArgument(6, $config['filter']) + ->replaceArgument(7, $config['password_attribute']) + ; + } + + public function getKey() + { + return 'ldap'; + } + + public function addConfiguration(NodeDefinition $node) + { + $node + ->children() + ->scalarNode('service')->isRequired()->cannotBeEmpty()->defaultValue('ldap')->end() + ->scalarNode('base_dn')->isRequired()->cannotBeEmpty()->end() + ->scalarNode('search_dn')->end() + ->scalarNode('search_password')->end() + ->arrayNode('default_roles') + ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() + ->requiresAtLeastOneElement() + ->prototype('scalar')->end() + ->end() + ->scalarNode('uid_key')->defaultValue('sAMAccountName')->end() + ->scalarNode('filter')->defaultValue('({uid_key}={username})')->end() + ->scalarNode('password_attribute')->defaultNull()->end() + ->end() + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..df250358aa61e39d5eb9f7cfa7054f262a7d27e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.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\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * UserProviderFactoryInterface is the interface for all user provider factories. + * + * @author Fabien Potencier + * @author Christophe Coevoet + */ +interface UserProviderFactoryInterface +{ + public function create(ContainerBuilder $container, $id, $config); + + public function getKey(); + + public function addConfiguration(NodeDefinition $builder); +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..7b5774361cbec202656d814ec413af02b1b5f948 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php @@ -0,0 +1,718 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\DependencyInjection; + +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider\UserProviderFactoryInterface; +use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\Security\Core\Authorization\ExpressionLanguage; + +/** + * SecurityExtension. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class SecurityExtension extends Extension +{ + private $requestMatchers = array(); + private $expressions = array(); + private $contextListeners = array(); + private $listenerPositions = array('pre_auth', 'form', 'http', 'remember_me'); + private $factories = array(); + private $userProviderFactories = array(); + private $expressionLanguage; + + public function __construct() + { + foreach ($this->listenerPositions as $position) { + $this->factories[$position] = array(); + } + } + + public function load(array $configs, ContainerBuilder $container) + { + if (!array_filter($configs)) { + return; + } + + $mainConfig = $this->getConfiguration($configs, $container); + + $config = $this->processConfiguration($mainConfig, $configs); + + // load services + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('security.xml'); + $loader->load('security_listeners.xml'); + $loader->load('security_rememberme.xml'); + $loader->load('templating_php.xml'); + $loader->load('templating_twig.xml'); + $loader->load('collectors.xml'); + $loader->load('guard.xml'); + + if ($container->hasParameter('kernel.debug') && $container->getParameter('kernel.debug')) { + $loader->load('security_debug.xml'); + } + + if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) { + $container->removeDefinition('security.expression_language'); + $container->removeDefinition('security.access.expression_voter'); + } + + // set some global scalars + $container->setParameter('security.access.denied_url', $config['access_denied_url']); + $container->setParameter('security.authentication.manager.erase_credentials', $config['erase_credentials']); + $container->setParameter('security.authentication.session_strategy.strategy', $config['session_fixation_strategy']); + $container + ->getDefinition('security.access.decision_manager') + ->addArgument($config['access_decision_manager']['strategy']) + ->addArgument($config['access_decision_manager']['allow_if_all_abstain']) + ->addArgument($config['access_decision_manager']['allow_if_equal_granted_denied']) + ; + $container->setParameter('security.access.always_authenticate_before_granting', $config['always_authenticate_before_granting']); + $container->setParameter('security.authentication.hide_user_not_found', $config['hide_user_not_found']); + + $this->createFirewalls($config, $container); + $this->createAuthorization($config, $container); + $this->createRoleHierarchy($config, $container); + + if ($config['encoders']) { + $this->createEncoders($config['encoders'], $container); + } + + // load ACL + if (isset($config['acl'])) { + $this->aclLoad($config['acl'], $container); + } + + // add some required classes for compilation + $this->addClassesToCompile(array( + 'Symfony\Component\Security\Http\Firewall', + 'Symfony\Component\Security\Core\User\UserProviderInterface', + 'Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager', + 'Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage', + 'Symfony\Component\Security\Core\Authorization\AccessDecisionManager', + 'Symfony\Component\Security\Core\Authorization\AuthorizationChecker', + 'Symfony\Component\Security\Core\Authorization\Voter\VoterInterface', + 'Symfony\Bundle\SecurityBundle\Security\FirewallConfig', + 'Symfony\Bundle\SecurityBundle\Security\FirewallMap', + 'Symfony\Bundle\SecurityBundle\Security\FirewallContext', + 'Symfony\Component\HttpFoundation\RequestMatcher', + )); + } + + private function aclLoad($config, ContainerBuilder $container) + { + if (!interface_exists('Symfony\Component\Security\Acl\Model\AclInterface')) { + throw new \LogicException('You must install symfony/security-acl in order to use the ACL functionality.'); + } + + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('security_acl.xml'); + + if (isset($config['cache']['id'])) { + $container->setAlias('security.acl.cache', $config['cache']['id']); + } + $container->getDefinition('security.acl.voter.basic_permissions')->addArgument($config['voter']['allow_if_object_identity_unavailable']); + + // custom ACL provider + if (isset($config['provider'])) { + $container->setAlias('security.acl.provider', $config['provider']); + + return; + } + + $this->configureDbalAclProvider($config, $container, $loader); + } + + private function configureDbalAclProvider(array $config, ContainerBuilder $container, $loader) + { + $loader->load('security_acl_dbal.xml'); + + if (null !== $config['connection']) { + $container->setAlias('security.acl.dbal.connection', sprintf('doctrine.dbal.%s_connection', $config['connection'])); + } + + $container + ->getDefinition('security.acl.dbal.schema_listener') + ->addTag('doctrine.event_listener', array( + 'connection' => $config['connection'], + 'event' => 'postGenerateSchema', + 'lazy' => true, + )) + ; + + $container->getDefinition('security.acl.cache.doctrine')->addArgument($config['cache']['prefix']); + + $container->setParameter('security.acl.dbal.class_table_name', $config['tables']['class']); + $container->setParameter('security.acl.dbal.entry_table_name', $config['tables']['entry']); + $container->setParameter('security.acl.dbal.oid_table_name', $config['tables']['object_identity']); + $container->setParameter('security.acl.dbal.oid_ancestors_table_name', $config['tables']['object_identity_ancestors']); + $container->setParameter('security.acl.dbal.sid_table_name', $config['tables']['security_identity']); + } + + /** + * Loads the web configuration. + * + * @param array $config An array of configuration settings + * @param ContainerBuilder $container A ContainerBuilder instance + */ + private function createRoleHierarchy($config, ContainerBuilder $container) + { + if (!isset($config['role_hierarchy']) || 0 === count($config['role_hierarchy'])) { + $container->removeDefinition('security.access.role_hierarchy_voter'); + + return; + } + + $container->setParameter('security.role_hierarchy.roles', $config['role_hierarchy']); + $container->removeDefinition('security.access.simple_role_voter'); + } + + private function createAuthorization($config, ContainerBuilder $container) + { + if (!$config['access_control']) { + return; + } + + $this->addClassesToCompile(array( + 'Symfony\\Component\\Security\\Http\\AccessMap', + )); + + foreach ($config['access_control'] as $access) { + $matcher = $this->createRequestMatcher( + $container, + $access['path'], + $access['host'], + $access['methods'], + $access['ips'] + ); + + $attributes = $access['roles']; + if ($access['allow_if']) { + $attributes[] = $this->createExpression($container, $access['allow_if']); + } + + $container->getDefinition('security.access_map') + ->addMethodCall('add', array($matcher, $attributes, $access['requires_channel'])); + } + } + + private function createFirewalls($config, ContainerBuilder $container) + { + if (!isset($config['firewalls'])) { + return; + } + + $firewalls = $config['firewalls']; + $providerIds = $this->createUserProviders($config, $container); + + // make the ContextListener aware of the configured user providers + $definition = $container->getDefinition('security.context_listener'); + $arguments = $definition->getArguments(); + $userProviders = array(); + foreach ($providerIds as $userProviderId) { + $userProviders[] = new Reference($userProviderId); + } + $arguments[1] = $userProviders; + $definition->setArguments($arguments); + + // load firewall map + $mapDef = $container->getDefinition('security.firewall.map'); + $map = $authenticationProviders = array(); + foreach ($firewalls as $name => $firewall) { + $configId = 'security.firewall.map.config.'.$name; + + list($matcher, $listeners, $exceptionListener) = $this->createFirewall($container, $name, $firewall, $authenticationProviders, $providerIds, $configId); + + $contextId = 'security.firewall.map.context.'.$name; + $context = $container->setDefinition($contextId, new DefinitionDecorator('security.firewall.context')); + $context + ->replaceArgument(0, $listeners) + ->replaceArgument(1, $exceptionListener) + ->replaceArgument(2, new Reference($configId)) + ; + + $map[$contextId] = $matcher; + } + $mapDef->replaceArgument(1, $map); + + // add authentication providers to authentication manager + $authenticationProviders = array_map(function ($id) { + return new Reference($id); + }, array_values(array_unique($authenticationProviders))); + $container + ->getDefinition('security.authentication.manager') + ->replaceArgument(0, $authenticationProviders) + ; + } + + private function createFirewall(ContainerBuilder $container, $id, $firewall, &$authenticationProviders, $providerIds, $configId) + { + $config = $container->setDefinition($configId, new DefinitionDecorator('security.firewall.config')); + $config->replaceArgument(0, $id); + $config->replaceArgument(1, $firewall['user_checker']); + + // Matcher + $matcher = null; + if (isset($firewall['request_matcher'])) { + $matcher = new Reference($firewall['request_matcher']); + } elseif (isset($firewall['pattern']) || isset($firewall['host'])) { + $pattern = isset($firewall['pattern']) ? $firewall['pattern'] : null; + $host = isset($firewall['host']) ? $firewall['host'] : null; + $methods = isset($firewall['methods']) ? $firewall['methods'] : array(); + $matcher = $this->createRequestMatcher($container, $pattern, $host, $methods); + } + + $config->replaceArgument(2, $matcher ? (string) $matcher : null); + $config->replaceArgument(3, $firewall['security']); + + // Security disabled? + if (false === $firewall['security']) { + return array($matcher, array(), null); + } + + $config->replaceArgument(4, $firewall['stateless']); + + // Provider id (take the first registered provider if none defined) + if (isset($firewall['provider'])) { + $defaultProvider = $this->getUserProviderId($firewall['provider']); + } else { + $defaultProvider = reset($providerIds); + } + + $config->replaceArgument(5, $defaultProvider); + + // Register listeners + $listeners = array(); + $listenerKeys = array(); + + // Channel listener + $listeners[] = new Reference('security.channel_listener'); + + $contextKey = null; + // Context serializer listener + if (false === $firewall['stateless']) { + $contextKey = $id; + if (isset($firewall['context'])) { + $contextKey = $firewall['context']; + } + + $listeners[] = new Reference($this->createContextListener($container, $contextKey)); + } + + $config->replaceArgument(6, $contextKey); + + // Logout listener + if (isset($firewall['logout'])) { + $listenerKeys[] = 'logout'; + $listenerId = 'security.logout_listener.'.$id; + $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.logout_listener')); + $listener->replaceArgument(3, array( + 'csrf_parameter' => $firewall['logout']['csrf_parameter'], + 'csrf_token_id' => $firewall['logout']['csrf_token_id'], + 'logout_path' => $firewall['logout']['path'], + )); + $listeners[] = new Reference($listenerId); + + // add logout success handler + if (isset($firewall['logout']['success_handler'])) { + $logoutSuccessHandlerId = $firewall['logout']['success_handler']; + } else { + $logoutSuccessHandlerId = 'security.logout.success_handler.'.$id; + $logoutSuccessHandler = $container->setDefinition($logoutSuccessHandlerId, new DefinitionDecorator('security.logout.success_handler')); + $logoutSuccessHandler->replaceArgument(1, $firewall['logout']['target']); + } + $listener->replaceArgument(2, new Reference($logoutSuccessHandlerId)); + + // add CSRF provider + if (isset($firewall['logout']['csrf_token_generator'])) { + $listener->addArgument(new Reference($firewall['logout']['csrf_token_generator'])); + } + + // add session logout handler + if (true === $firewall['logout']['invalidate_session'] && false === $firewall['stateless']) { + $listener->addMethodCall('addHandler', array(new Reference('security.logout.handler.session'))); + } + + // add cookie logout handler + if (count($firewall['logout']['delete_cookies']) > 0) { + $cookieHandlerId = 'security.logout.handler.cookie_clearing.'.$id; + $cookieHandler = $container->setDefinition($cookieHandlerId, new DefinitionDecorator('security.logout.handler.cookie_clearing')); + $cookieHandler->addArgument($firewall['logout']['delete_cookies']); + + $listener->addMethodCall('addHandler', array(new Reference($cookieHandlerId))); + } + + // add custom handlers + foreach ($firewall['logout']['handlers'] as $handlerId) { + $listener->addMethodCall('addHandler', array(new Reference($handlerId))); + } + + // register with LogoutUrlGenerator + $container + ->getDefinition('security.logout_url_generator') + ->addMethodCall('registerListener', array( + $id, + $firewall['logout']['path'], + $firewall['logout']['csrf_token_id'], + $firewall['logout']['csrf_parameter'], + isset($firewall['logout']['csrf_token_generator']) ? new Reference($firewall['logout']['csrf_token_generator']) : null, + )) + ; + } + + // Determine default entry point + $configuredEntryPoint = isset($firewall['entry_point']) ? $firewall['entry_point'] : null; + + // Authentication listeners + list($authListeners, $defaultEntryPoint) = $this->createAuthenticationListeners($container, $id, $firewall, $authenticationProviders, $defaultProvider, $configuredEntryPoint); + + $config->replaceArgument(7, $configuredEntryPoint ?: $defaultEntryPoint); + + $listeners = array_merge($listeners, $authListeners); + + // Switch user listener + if (isset($firewall['switch_user'])) { + $listenerKeys[] = 'switch_user'; + $listeners[] = new Reference($this->createSwitchUserListener($container, $id, $firewall['switch_user'], $defaultProvider)); + } + + // Access listener + $listeners[] = new Reference('security.access_listener'); + + // Exception listener + $exceptionListener = new Reference($this->createExceptionListener($container, $firewall, $id, $configuredEntryPoint ?: $defaultEntryPoint, $firewall['stateless'])); + + $config->replaceArgument(8, isset($firewall['access_denied_handler']) ? $firewall['access_denied_handler'] : null); + $config->replaceArgument(9, isset($firewall['access_denied_url']) ? $firewall['access_denied_url'] : null); + + $container->setAlias('security.user_checker.'.$id, new Alias($firewall['user_checker'], false)); + + foreach ($this->factories as $position) { + foreach ($position as $factory) { + $key = str_replace('-', '_', $factory->getKey()); + if (array_key_exists($key, $firewall)) { + $listenerKeys[] = $key; + } + } + } + + if (isset($firewall['anonymous'])) { + $listenerKeys[] = 'anonymous'; + } + + $config->replaceArgument(10, $listenerKeys); + + return array($matcher, $listeners, $exceptionListener); + } + + private function createContextListener($container, $contextKey) + { + if (isset($this->contextListeners[$contextKey])) { + return $this->contextListeners[$contextKey]; + } + + $listenerId = 'security.context_listener.'.count($this->contextListeners); + $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.context_listener')); + $listener->replaceArgument(2, $contextKey); + + return $this->contextListeners[$contextKey] = $listenerId; + } + + private function createAuthenticationListeners($container, $id, $firewall, &$authenticationProviders, $defaultProvider, $defaultEntryPoint) + { + $listeners = array(); + $hasListeners = false; + + foreach ($this->listenerPositions as $position) { + foreach ($this->factories[$position] as $factory) { + $key = str_replace('-', '_', $factory->getKey()); + + if (isset($firewall[$key])) { + $userProvider = isset($firewall[$key]['provider']) ? $this->getUserProviderId($firewall[$key]['provider']) : $defaultProvider; + + list($provider, $listenerId, $defaultEntryPoint) = $factory->create($container, $id, $firewall[$key], $userProvider, $defaultEntryPoint); + + $listeners[] = new Reference($listenerId); + $authenticationProviders[] = $provider; + $hasListeners = true; + } + } + } + + // Anonymous + if (isset($firewall['anonymous'])) { + $listenerId = 'security.authentication.listener.anonymous.'.$id; + $container + ->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.anonymous')) + ->replaceArgument(1, $firewall['anonymous']['secret']) + ; + + $listeners[] = new Reference($listenerId); + + $providerId = 'security.authentication.provider.anonymous.'.$id; + $container + ->setDefinition($providerId, new DefinitionDecorator('security.authentication.provider.anonymous')) + ->replaceArgument(0, $firewall['anonymous']['secret']) + ; + + $authenticationProviders[] = $providerId; + $hasListeners = true; + } + + if (false === $hasListeners) { + throw new InvalidConfigurationException(sprintf('No authentication listener registered for firewall "%s".', $id)); + } + + return array($listeners, $defaultEntryPoint); + } + + private function createEncoders($encoders, ContainerBuilder $container) + { + $encoderMap = array(); + foreach ($encoders as $class => $encoder) { + $encoderMap[$class] = $this->createEncoder($encoder, $container); + } + + $container + ->getDefinition('security.encoder_factory.generic') + ->setArguments(array($encoderMap)) + ; + } + + private function createEncoder($config, ContainerBuilder $container) + { + // a custom encoder service + if (isset($config['id'])) { + return new Reference($config['id']); + } + + // plaintext encoder + if ('plaintext' === $config['algorithm']) { + $arguments = array($config['ignore_case']); + + return array( + 'class' => 'Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder', + 'arguments' => $arguments, + ); + } + + // pbkdf2 encoder + if ('pbkdf2' === $config['algorithm']) { + return array( + 'class' => 'Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder', + 'arguments' => array( + $config['hash_algorithm'], + $config['encode_as_base64'], + $config['iterations'], + $config['key_length'], + ), + ); + } + + // bcrypt encoder + if ('bcrypt' === $config['algorithm']) { + return array( + 'class' => 'Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder', + 'arguments' => array($config['cost']), + ); + } + + // run-time configured encoder + return $config; + } + + // Parses user providers and returns an array of their ids + private function createUserProviders($config, ContainerBuilder $container) + { + $providerIds = array(); + foreach ($config['providers'] as $name => $provider) { + $id = $this->createUserDaoProvider($name, $provider, $container); + $providerIds[] = $id; + } + + return $providerIds; + } + + // Parses a tag and returns the id for the related user provider service + private function createUserDaoProvider($name, $provider, ContainerBuilder $container) + { + $name = $this->getUserProviderId(strtolower($name)); + + // Doctrine Entity and In-memory DAO provider are managed by factories + foreach ($this->userProviderFactories as $factory) { + $key = str_replace('-', '_', $factory->getKey()); + + if (!empty($provider[$key])) { + $factory->create($container, $name, $provider[$key]); + + return $name; + } + } + + // Existing DAO service provider + if (isset($provider['id'])) { + $container->setAlias($name, new Alias($provider['id'], false)); + + return $provider['id']; + } + + // Chain provider + if (isset($provider['chain'])) { + $providers = array(); + foreach ($provider['chain']['providers'] as $providerName) { + $providers[] = new Reference($this->getUserProviderId(strtolower($providerName))); + } + + $container + ->setDefinition($name, new DefinitionDecorator('security.user.provider.chain')) + ->addArgument($providers); + + return $name; + } + + throw new InvalidConfigurationException(sprintf('Unable to create definition for "%s" user provider', $name)); + } + + private function getUserProviderId($name) + { + return 'security.user.provider.concrete.'.$name; + } + + private function createExceptionListener($container, $config, $id, $defaultEntryPoint, $stateless) + { + $exceptionListenerId = 'security.exception_listener.'.$id; + $listener = $container->setDefinition($exceptionListenerId, new DefinitionDecorator('security.exception_listener')); + $listener->replaceArgument(3, $id); + $listener->replaceArgument(4, null === $defaultEntryPoint ? null : new Reference($defaultEntryPoint)); + $listener->replaceArgument(8, $stateless); + + // access denied handler setup + if (isset($config['access_denied_handler'])) { + $listener->replaceArgument(6, new Reference($config['access_denied_handler'])); + } elseif (isset($config['access_denied_url'])) { + $listener->replaceArgument(5, $config['access_denied_url']); + } + + return $exceptionListenerId; + } + + private function createSwitchUserListener($container, $id, $config, $defaultProvider) + { + $userProvider = isset($config['provider']) ? $this->getUserProviderId($config['provider']) : $defaultProvider; + + $switchUserListenerId = 'security.authentication.switchuser_listener.'.$id; + $listener = $container->setDefinition($switchUserListenerId, new DefinitionDecorator('security.authentication.switchuser_listener')); + $listener->replaceArgument(1, new Reference($userProvider)); + $listener->replaceArgument(2, new Reference('security.user_checker.'.$id)); + $listener->replaceArgument(3, $id); + $listener->replaceArgument(6, $config['parameter']); + $listener->replaceArgument(7, $config['role']); + + return $switchUserListenerId; + } + + private function createExpression($container, $expression) + { + if (isset($this->expressions[$id = 'security.expression.'.sha1($expression)])) { + return $this->expressions[$id]; + } + + $container + ->register($id, 'Symfony\Component\ExpressionLanguage\SerializedParsedExpression') + ->setPublic(false) + ->addArgument($expression) + ->addArgument(serialize($this->getExpressionLanguage()->parse($expression, array('token', 'user', 'object', 'roles', 'request', 'trust_resolver'))->getNodes())) + ; + + return $this->expressions[$id] = new Reference($id); + } + + private function createRequestMatcher($container, $path = null, $host = null, $methods = array(), $ip = null, array $attributes = array()) + { + if ($methods) { + $methods = array_map('strtoupper', (array) $methods); + } + + $serialized = serialize(array($path, $host, $methods, $ip, $attributes)); + $id = 'security.request_matcher.'.md5($serialized).sha1($serialized); + + if (isset($this->requestMatchers[$id])) { + return $this->requestMatchers[$id]; + } + + // only add arguments that are necessary + $arguments = array($path, $host, $methods, $ip, $attributes); + while (count($arguments) > 0 && !end($arguments)) { + array_pop($arguments); + } + + $container + ->register($id, 'Symfony\Component\HttpFoundation\RequestMatcher') + ->setPublic(false) + ->setArguments($arguments) + ; + + return $this->requestMatchers[$id] = new Reference($id); + } + + public function addSecurityListenerFactory(SecurityFactoryInterface $factory) + { + $this->factories[$factory->getPosition()][] = $factory; + } + + public function addUserProviderFactory(UserProviderFactoryInterface $factory) + { + $this->userProviderFactories[] = $factory; + } + + /** + * Returns the base path for the XSD files. + * + * @return string The XSD base path + */ + public function getXsdValidationBasePath() + { + return __DIR__.'/../Resources/config/schema'; + } + + public function getNamespace() + { + return 'http://symfony.com/schema/dic/security'; + } + + public function getConfiguration(array $config, ContainerBuilder $container) + { + // first assemble the factories + return new MainConfiguration($this->factories, $this->userProviderFactories); + } + + private function getExpressionLanguage() + { + if (null === $this->expressionLanguage) { + if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) { + throw new \RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); + } + $this->expressionLanguage = new ExpressionLanguage(); + } + + return $this->expressionLanguage; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.php new file mode 100644 index 0000000000000000000000000000000000000000..8faa9ac366fd61fe0afcfb16db5c2b8a127bbed1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.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\Bundle\SecurityBundle\EventListener; + +use Symfony\Component\Security\Acl\Dbal\Schema; +use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs; + +/** + * Merges ACL schema into the given schema. + * + * @author Johannes M. Schmitt + */ +class AclSchemaListener +{ + private $schema; + + public function __construct(Schema $schema) + { + $this->schema = $schema; + } + + public function postGenerateSchema(GenerateSchemaEventArgs $args) + { + $schema = $args->getSchema(); + $this->schema->addToSchema($schema); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/LICENSE b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/README.md b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6f36866ec8b7813b2cb0c1f59f2077647ac1bb9a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/README.md @@ -0,0 +1,10 @@ +SecurityBundle +============== + +Resources +--------- + + * [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/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/collectors.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/collectors.xml new file mode 100644 index 0000000000000000000000000000000000000000..f812a9d790bb85a0fa38d870a45161cc3367038a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/collectors.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/guard.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/guard.xml new file mode 100644 index 0000000000000000000000000000000000000000..80318c243a970403e607f7f025f98d85c8c55648 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/guard.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml new file mode 100644 index 0000000000000000000000000000000000000000..54e573440299c075181120670b08bc8e18975d06 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml @@ -0,0 +1,167 @@ + + + + + + Symfony\Component\Security\Core\Authentication\Token\AnonymousToken + Symfony\Component\Security\Core\Authentication\Token\RememberMeToken + + + + + + + + + %security.access.always_authenticate_before_granting% + + + + + + + + + + + + + %security.authentication.manager.erase_credentials% + + + + + + + %security.authentication.trust_resolver.anonymous_class% + %security.authentication.trust_resolver.rememberme_class% + + + + %security.authentication.session_strategy.strategy% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %security.role_hierarchy.roles% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl.xml new file mode 100644 index 0000000000000000000000000000000000000000..982a6619a2548efdca1314f2bd2b30ebab5877b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml new file mode 100644 index 0000000000000000000000000000000000000000..581c938964e67bbd3ebe251f0dd6e9c33b1e2da2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + %security.acl.dbal.class_table_name% + %security.acl.dbal.entry_table_name% + %security.acl.dbal.oid_table_name% + %security.acl.dbal.oid_ancestors_table_name% + %security.acl.dbal.sid_table_name% + + + + + + + %security.acl.dbal.class_table_name% + %security.acl.dbal.entry_table_name% + %security.acl.dbal.oid_table_name% + %security.acl.dbal.oid_ancestors_table_name% + %security.acl.dbal.sid_table_name% + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_debug.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_debug.xml new file mode 100644 index 0000000000000000000000000000000000000000..eb22cbddf504e5e92a2fdc541b491a96d902f847 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_debug.xml @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml new file mode 100644 index 0000000000000000000000000000000000000000..7bdaf628cf40c1c98dbaf66b17c7bcf5486f4e84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + %request_listener.http_port% + %request_listener.https_port% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %security.authentication.hide_user_not_found% + + + + + + + + + %security.authentication.hide_user_not_found% + + + + + + + + + + + + + + + + + + + + + %security.access.denied_url% + + + false + + + + + + + + + + + _switch_user + ROLE_ALLOWED_TO_SWITCH + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml new file mode 100644 index 0000000000000000000000000000000000000000..7c67e8f5db8c0d68b5fc59919dd383f85f5e0a40 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/templating_php.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/templating_php.xml new file mode 100644 index 0000000000000000000000000000000000000000..e800500d43a535c4dd22da32fcedbe74d864db37 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/templating_php.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/templating_twig.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/templating_twig.xml new file mode 100644 index 0000000000000000000000000000000000000000..85be5476d4fa214ae67c8d913af9e649d2c32eba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/config/templating_twig.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/icon.svg b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/icon.svg new file mode 100644 index 0000000000000000000000000000000000000000..5bd2f3b8f3799e3ea1710ecf357ee2b712f2ad6e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..073d0d869d8f0dfb0f12e6492af08e46321cc183 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig @@ -0,0 +1,273 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block page_title 'Security' %} + +{% block toolbar %} + {% if collector.token %} + {% set is_authenticated = collector.enabled and collector.authenticated %} + {% set color_code = is_authenticated ? '' : 'yellow' %} + {% else %} + {% set color_code = collector.enabled ? 'red' : '' %} + {% endif %} + + {% set icon %} + {{ include('@Security/Collector/icon.svg') }} + {{ collector.user|default('n/a') }} + {% endset %} + + {% set text %} + {% if collector.enabled %} + {% if collector.token %} +
    + Logged in as + {{ collector.user }} +
    + +
    + Authenticated + {{ is_authenticated ? 'Yes' : 'No' }} +
    + +
    + Token class + {{ collector.tokenClass|abbr_class }} +
    + {% else %} +
    + Authenticated + No +
    + {% endif %} + + {% if collector.firewall %} +
    + Firewall name + {{ collector.firewall.name }} +
    + {% endif %} + + {% if collector.token and collector.logoutUrl %} +
    + Actions + Logout +
    + {% endif %} + {% else %} +
    + The security is disabled. +
    + {% endif %} + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: color_code }) }} +{% endblock %} + +{% block menu %} + + {{ include('@Security/Collector/icon.svg') }} + Security + +{% endblock %} + +{% block panel %} +

    Security Token

    + + {% if collector.enabled %} + {% if collector.token %} +
    +
    + {{ collector.user == 'anon.' ? 'Anonymous' : collector.user }} + Username +
    + +
    + {{ include('@WebProfiler/Icon/' ~ (collector.authenticated ? 'yes' : 'no') ~ '.svg') }} + Authenticated +
    +
    + + + + + + + + + + + + + + + {% if collector.supportsRoleHierarchy %} + + + + + {% endif %} + + {% if collector.token %} + + + + + {% endif %} + +
    PropertyValue
    Roles + {{ collector.roles is empty ? 'none' : profiler_dump(collector.roles, maxDepth=1) }} + + {% if not collector.authenticated and collector.roles is empty %} +

    User is not authenticated probably because they have no roles.

    + {% endif %} +
    Inherited Roles{{ collector.inheritedRoles is empty ? 'none' : profiler_dump(collector.inheritedRoles, maxDepth=1) }}
    Token{{ profiler_dump(collector.token) }}
    + {% elseif collector.enabled %} +
    +

    There is no security token.

    +
    + {% endif %} + + +

    Security Firewall

    + + {% if collector.firewall %} +
    +
    + {{ collector.firewall.name }} + Name +
    +
    + {{ include('@WebProfiler/Icon/' ~ (collector.firewall.security_enabled ? 'yes' : 'no') ~ '.svg') }} + Security enabled +
    +
    + {{ include('@WebProfiler/Icon/' ~ (collector.firewall.stateless ? 'yes' : 'no') ~ '.svg') }} + Stateless +
    +
    + {{ include('@WebProfiler/Icon/' ~ (collector.firewall.allows_anonymous ? 'yes' : 'no') ~ '.svg') }} + Allows anonymous +
    +
    + + {% if collector.firewall.security_enabled %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    KeyValue
    provider{{ collector.firewall.provider ?: '(none)' }}
    context{{ collector.firewall.context ?: '(none)' }}
    entry_point{{ collector.firewall.entry_point ?: '(none)' }}
    user_checker{{ collector.firewall.user_checker ?: '(none)' }}
    access_denied_handler{{ collector.firewall.access_denied_handler ?: '(none)' }}
    access_denied_url{{ collector.firewall.access_denied_url ?: '(none)' }}
    listeners{{ collector.firewall.listeners is empty ? '(none)' : profiler_dump(collector.firewall.listeners, maxDepth=1) }}
    + {% endif %} + {% elseif collector.enabled %} +
    +

    This request was not covered by any firewall.

    +
    + {% endif %} + {% else %} +
    +

    The security component is disabled.

    +
    + {% endif %} + + {% if collector.voters|default([]) is not empty %} +

    Security Voters ({{ collector.voters|length }})

    + +
    +
    + {{ collector.voterStrategy|default('unknown') }} + Strategy +
    +
    + + + + + + + + + + + {% for voter in collector.voters %} + + + + + {% endfor %} + +
    #Voter class
    {{ loop.index }}{{ voter }}
    + {% endif %} + + {% if collector.accessDecisionLog|default([]) is not empty %} +

    Access decision log

    + + + + + + + + + + + + + + + + + + {% for decision in collector.accessDecisionLog %} + + + + + + + {% endfor %} + +
    #ResultAttributesObject
    {{ loop.index }} + {{ decision.result + ? 'GRANTED' + : 'DENIED' + }} + + {% if decision.attributes|length == 1 %} + {{ decision.attributes|first }} + {% else %} + {{ profiler_dump(decision.attributes) }} + {% endif %} + {{ profiler_dump(decision.object) }}
    + {% endif %} +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Security/FirewallConfig.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Security/FirewallConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..3cfb11404ccf83925c841b116094e81491932c9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Security/FirewallConfig.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Security; + +/** + * @author Robin Chalas + */ +final class FirewallConfig +{ + private $name; + private $userChecker; + private $requestMatcher; + private $securityEnabled; + private $stateless; + private $provider; + private $context; + private $entryPoint; + private $accessDeniedHandler; + private $accessDeniedUrl; + private $listeners; + + /** + * @param string $name + * @param string $userChecker + * @param string|null $requestMatcher + * @param bool $securityEnabled + * @param bool $stateless + * @param string|null $provider + * @param string|null $context + * @param string|null $entryPoint + * @param string|null $accessDeniedHandler + * @param string|null $accessDeniedUrl + * @param string[] $listeners + */ + public function __construct($name, $userChecker, $requestMatcher = null, $securityEnabled = true, $stateless = false, $provider = null, $context = null, $entryPoint = null, $accessDeniedHandler = null, $accessDeniedUrl = null, $listeners = array()) + { + $this->name = $name; + $this->userChecker = $userChecker; + $this->requestMatcher = $requestMatcher; + $this->securityEnabled = $securityEnabled; + $this->stateless = $stateless; + $this->provider = $provider; + $this->context = $context; + $this->entryPoint = $entryPoint; + $this->accessDeniedHandler = $accessDeniedHandler; + $this->accessDeniedUrl = $accessDeniedUrl; + $this->listeners = $listeners; + } + + public function getName() + { + return $this->name; + } + + /** + * @return string|null The request matcher service id or null if neither the request matcher, pattern or host + * options were provided + */ + public function getRequestMatcher() + { + return $this->requestMatcher; + } + + public function isSecurityEnabled() + { + return $this->securityEnabled; + } + + public function allowsAnonymous() + { + return in_array('anonymous', $this->listeners, true); + } + + public function isStateless() + { + return $this->stateless; + } + + /** + * @return string|null The provider service id + */ + public function getProvider() + { + return $this->provider; + } + + /** + * @return string|null The context key (will be null if the firewall is stateless) + */ + public function getContext() + { + return $this->context; + } + + /** + * @return string|null The entry_point service id if configured, null otherwise + */ + public function getEntryPoint() + { + return $this->entryPoint; + } + + /** + * @return string The user_checker service id + */ + public function getUserChecker() + { + return $this->userChecker; + } + + /** + * @return string|null The access_denied_handler service id if configured, null otherwise + */ + public function getAccessDeniedHandler() + { + return $this->accessDeniedHandler; + } + + /** + * @return string|null The access_denied_handler URL if configured, null otherwise + */ + public function getAccessDeniedUrl() + { + return $this->accessDeniedUrl; + } + + /** + * @return string[] An array of listener keys + */ + public function getListeners() + { + return $this->listeners; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php new file mode 100644 index 0000000000000000000000000000000000000000..81b815e4d973ea1bf19e8abc7f4cb4b86ba91a37 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Security; + +use Symfony\Component\Security\Http\Firewall\ExceptionListener; + +/** + * This is a wrapper around the actual firewall configuration which allows us + * to lazy load the context for one specific firewall only when we need it. + * + * @author Johannes M. Schmitt + */ +class FirewallContext +{ + private $listeners; + private $exceptionListener; + private $config; + + public function __construct(array $listeners, ExceptionListener $exceptionListener = null, FirewallConfig $config = null) + { + $this->listeners = $listeners; + $this->exceptionListener = $exceptionListener; + $this->config = $config; + } + + public function getConfig() + { + return $this->config; + } + + public function getContext() + { + return array($this->listeners, $this->exceptionListener); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php new file mode 100644 index 0000000000000000000000000000000000000000..f833a63e659666e35f2dd3b55793c1aa8beb542f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Security; + +use Symfony\Component\Security\Http\FirewallMapInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\DependencyInjection\ContainerInterface; + +/** + * This is a lazy-loading firewall map implementation. + * + * Listeners will only be initialized if we really need them. + * + * @author Johannes M. Schmitt + */ +class FirewallMap implements FirewallMapInterface +{ + protected $container; + protected $map; + private $contexts; + + public function __construct(ContainerInterface $container, array $map) + { + $this->container = $container; + $this->map = $map; + $this->contexts = new \SplObjectStorage(); + } + + /** + * {@inheritdoc} + */ + public function getListeners(Request $request) + { + $context = $this->getFirewallContext($request); + + if (null === $context) { + return array(array(), null); + } + + return $context->getContext(); + } + + /** + * @return FirewallConfig|null + */ + public function getFirewallConfig(Request $request) + { + $context = $this->getFirewallContext($request); + + if (null === $context) { + return; + } + + return $context->getConfig(); + } + + private function getFirewallContext(Request $request) + { + if ($this->contexts->contains($request)) { + return $this->contexts[$request]; + } + + foreach ($this->map as $contextId => $requestMatcher) { + if (null === $requestMatcher || $requestMatcher->matches($request)) { + return $this->contexts[$request] = $this->container->get($contextId); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/SecurityBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/SecurityBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..f2dfc991fbcef2bbd32bfbef1d03f8bb7af9dd30 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/SecurityBundle.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddSecurityVotersPass; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\FormLoginFactory; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\FormLoginLdapFactory; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\HttpBasicFactory; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\HttpBasicLdapFactory; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\HttpDigestFactory; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\RememberMeFactory; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\X509Factory; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\RemoteUserFactory; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SimplePreAuthenticationFactory; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SimpleFormFactory; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider\InMemoryFactory; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\GuardAuthenticationFactory; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider\LdapFactory; + +/** + * Bundle. + * + * @author Fabien Potencier + */ +class SecurityBundle extends Bundle +{ + public function build(ContainerBuilder $container) + { + parent::build($container); + + $extension = $container->getExtension('security'); + $extension->addSecurityListenerFactory(new FormLoginFactory()); + $extension->addSecurityListenerFactory(new FormLoginLdapFactory()); + $extension->addSecurityListenerFactory(new HttpBasicFactory()); + $extension->addSecurityListenerFactory(new HttpBasicLdapFactory()); + $extension->addSecurityListenerFactory(new HttpDigestFactory()); + $extension->addSecurityListenerFactory(new RememberMeFactory()); + $extension->addSecurityListenerFactory(new X509Factory()); + $extension->addSecurityListenerFactory(new RemoteUserFactory()); + $extension->addSecurityListenerFactory(new SimplePreAuthenticationFactory()); + $extension->addSecurityListenerFactory(new SimpleFormFactory()); + $extension->addSecurityListenerFactory(new GuardAuthenticationFactory()); + + $extension->addUserProviderFactory(new InMemoryFactory()); + $extension->addUserProviderFactory(new LdapFactory()); + $container->addCompilerPass(new AddSecurityVotersPass()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/SecurityUserValueResolver.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/SecurityUserValueResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..01a4f2bda6d3779d88f46635bef9d71d46f85ca8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/SecurityUserValueResolver.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\User\UserInterface; + +/** + * Supports the argument type of {@see UserInterface}. + * + * @author Iltar van der Berg + */ +final class SecurityUserValueResolver implements ArgumentValueResolverInterface +{ + private $tokenStorage; + + public function __construct(TokenStorageInterface $tokenStorage) + { + $this->tokenStorage = $tokenStorage; + } + + public function supports(Request $request, ArgumentMetadata $argument) + { + // only security user implementations are supported + if (UserInterface::class !== $argument->getType()) { + return false; + } + + $token = $this->tokenStorage->getToken(); + if (!$token instanceof TokenInterface) { + return false; + } + + $user = $token->getUser(); + + // in case it's not an object we cannot do anything with it; E.g. "anon." + return $user instanceof UserInterface; + } + + public function resolve(Request $request, ArgumentMetadata $argument) + { + yield $this->tokenStorage->getToken()->getUser(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..abb6de31a31b7a459e29c0708cb56b979774cbc4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Templating\Helper; + +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Security\Http\Logout\LogoutUrlGenerator; +use Symfony\Component\Templating\Helper\Helper; + +/** + * LogoutUrlHelper provides generator functions for the logout URL. + * + * @author Jeremy Mikola + */ +class LogoutUrlHelper extends Helper +{ + private $generator; + + /** + * Constructor. + * + * @param LogoutUrlGenerator $generator A LogoutUrlGenerator instance + */ + public function __construct(LogoutUrlGenerator $generator) + { + $this->generator = $generator; + } + + /** + * Generates the absolute logout path for the firewall. + * + * @param string|null $key The firewall key or null to use the current firewall key + * + * @return string The logout path + */ + public function getLogoutPath($key) + { + return $this->generator->getLogoutPath($key, UrlGeneratorInterface::ABSOLUTE_PATH); + } + + /** + * Generates the absolute logout URL for the firewall. + * + * @param string|null $key The firewall key or null to use the current firewall key + * + * @return string The logout URL + */ + public function getLogoutUrl($key) + { + return $this->generator->getLogoutUrl($key, UrlGeneratorInterface::ABSOLUTE_URL); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'logout_url'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Templating/Helper/SecurityHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Templating/Helper/SecurityHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..7df8511f8a05a54983bd7beab0951f5b8c57f88c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Templating/Helper/SecurityHelper.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Templating\Helper; + +use Symfony\Component\Security\Acl\Voter\FieldVote; +use Symfony\Component\Templating\Helper\Helper; +use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; + +/** + * SecurityHelper provides read-only access to the security checker. + * + * @author Fabien Potencier + */ +class SecurityHelper extends Helper +{ + private $securityChecker; + + public function __construct(AuthorizationCheckerInterface $securityChecker = null) + { + $this->securityChecker = $securityChecker; + } + + public function isGranted($role, $object = null, $field = null) + { + if (null === $this->securityChecker) { + return false; + } + + if (null !== $field) { + $object = new FieldVote($object, $field); + } + + return $this->securityChecker->isGranted($role, $object); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'security'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a5cd0fd1fda060b53d5d1077698e67458faa5656 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php @@ -0,0 +1,194 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector; +use Symfony\Bundle\SecurityBundle\Security\FirewallConfig; +use Symfony\Bundle\SecurityBundle\Security\FirewallMap; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\Role\Role; +use Symfony\Component\Security\Core\Role\RoleHierarchy; +use Symfony\Component\Security\Http\FirewallMapInterface; + +class SecurityDataCollectorTest extends TestCase +{ + public function testCollectWhenSecurityIsDisabled() + { + $collector = new SecurityDataCollector(); + $collector->collect($this->getRequest(), $this->getResponse()); + + $this->assertSame('security', $collector->getName()); + $this->assertFalse($collector->isEnabled()); + $this->assertFalse($collector->isAuthenticated()); + $this->assertNull($collector->getTokenClass()); + $this->assertFalse($collector->supportsRoleHierarchy()); + $this->assertCount(0, $collector->getRoles()); + $this->assertCount(0, $collector->getInheritedRoles()); + $this->assertEmpty($collector->getUser()); + $this->assertNull($collector->getFirewall()); + } + + public function testCollectWhenAuthenticationTokenIsNull() + { + $tokenStorage = new TokenStorage(); + $collector = new SecurityDataCollector($tokenStorage, $this->getRoleHierarchy()); + $collector->collect($this->getRequest(), $this->getResponse()); + + $this->assertTrue($collector->isEnabled()); + $this->assertFalse($collector->isAuthenticated()); + $this->assertNull($collector->getTokenClass()); + $this->assertTrue($collector->supportsRoleHierarchy()); + $this->assertCount(0, $collector->getRoles()); + $this->assertCount(0, $collector->getInheritedRoles()); + $this->assertEmpty($collector->getUser()); + $this->assertNull($collector->getFirewall()); + } + + /** @dataProvider provideRoles */ + public function testCollectAuthenticationTokenAndRoles(array $roles, array $normalizedRoles, array $inheritedRoles) + { + $tokenStorage = new TokenStorage(); + $tokenStorage->setToken(new UsernamePasswordToken('hhamon', 'P4$$w0rD', 'provider', $roles)); + + $collector = new SecurityDataCollector($tokenStorage, $this->getRoleHierarchy()); + $collector->collect($this->getRequest(), $this->getResponse()); + + $this->assertTrue($collector->isEnabled()); + $this->assertTrue($collector->isAuthenticated()); + $this->assertSame('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', $collector->getTokenClass()); + $this->assertTrue($collector->supportsRoleHierarchy()); + $this->assertSame($normalizedRoles, $collector->getRoles()->getRawData()[1]); + if ($inheritedRoles) { + $this->assertSame($inheritedRoles, $collector->getInheritedRoles()->getRawData()[1]); + } else { + $this->assertSame($inheritedRoles, $collector->getInheritedRoles()->getRawData()[0][0]); + } + $this->assertSame('hhamon', $collector->getUser()); + } + + public function testGetFirewall() + { + $firewallConfig = new FirewallConfig('dummy', 'security.request_matcher.dummy', 'security.user_checker.dummy'); + $request = $this->getRequest(); + + $firewallMap = $this + ->getMockBuilder(FirewallMap::class) + ->disableOriginalConstructor() + ->getMock(); + $firewallMap + ->expects($this->once()) + ->method('getFirewallConfig') + ->with($request) + ->willReturn($firewallConfig); + + $collector = new SecurityDataCollector(null, null, null, null, $firewallMap); + $collector->collect($request, $this->getResponse()); + $collected = $collector->getFirewall(); + + $this->assertSame($firewallConfig->getName(), $collected['name']); + $this->assertSame($firewallConfig->allowsAnonymous(), $collected['allows_anonymous']); + $this->assertSame($firewallConfig->getRequestMatcher(), $collected['request_matcher']); + $this->assertSame($firewallConfig->isSecurityEnabled(), $collected['security_enabled']); + $this->assertSame($firewallConfig->isStateless(), $collected['stateless']); + $this->assertSame($firewallConfig->getProvider(), $collected['provider']); + $this->assertSame($firewallConfig->getContext(), $collected['context']); + $this->assertSame($firewallConfig->getEntryPoint(), $collected['entry_point']); + $this->assertSame($firewallConfig->getAccessDeniedHandler(), $collected['access_denied_handler']); + $this->assertSame($firewallConfig->getAccessDeniedUrl(), $collected['access_denied_url']); + $this->assertSame($firewallConfig->getUserChecker(), $collected['user_checker']); + $this->assertSame($firewallConfig->getListeners(), $collected['listeners']->getRawData()[0][0]); + } + + public function testGetFirewallReturnsNull() + { + $request = $this->getRequest(); + $response = $this->getResponse(); + + // Don't inject any firewall map + $collector = new SecurityDataCollector(); + $collector->collect($request, $response); + $this->assertNull($collector->getFirewall()); + + // Inject an instance that is not context aware + $firewallMap = $this + ->getMockBuilder(FirewallMapInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $collector = new SecurityDataCollector(null, null, null, null, $firewallMap); + $collector->collect($request, $response); + $this->assertNull($collector->getFirewall()); + + // Null config + $firewallMap = $this + ->getMockBuilder(FirewallMap::class) + ->disableOriginalConstructor() + ->getMock(); + + $collector = new SecurityDataCollector(null, null, null, null, $firewallMap); + $collector->collect($request, $response); + $this->assertNull($collector->getFirewall()); + } + + public function provideRoles() + { + return array( + // Basic roles + array( + array('ROLE_USER'), + array('ROLE_USER'), + array(), + ), + array( + array(new Role('ROLE_USER')), + array('ROLE_USER'), + array(), + ), + // Inherited roles + array( + array('ROLE_ADMIN'), + array('ROLE_ADMIN'), + array('ROLE_USER', 'ROLE_ALLOWED_TO_SWITCH'), + ), + array( + array(new Role('ROLE_ADMIN')), + array('ROLE_ADMIN'), + array('ROLE_USER', 'ROLE_ALLOWED_TO_SWITCH'), + ), + ); + } + + private function getRoleHierarchy() + { + return new RoleHierarchy(array( + 'ROLE_ADMIN' => array('ROLE_USER', 'ROLE_ALLOWED_TO_SWITCH'), + )); + } + + private function getRequest() + { + return $this + ->getMockBuilder('Symfony\Component\HttpFoundation\Request') + ->disableOriginalConstructor() + ->getMock(); + } + + private function getResponse() + { + return $this + ->getMockBuilder('Symfony\Component\HttpFoundation\Response') + ->disableOriginalConstructor() + ->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/AddSecurityVotersPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/AddSecurityVotersPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..af7933a36e3c52be538cc78bec7541d871c84501 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/AddSecurityVotersPassTest.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddSecurityVotersPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +class AddSecurityVotersPassTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\LogicException + */ + public function testNoVoters() + { + $container = new ContainerBuilder(); + $container + ->register('security.access.decision_manager', 'Symfony\Component\Security\Core\Authorization\AccessDecisionManager') + ->addArgument(array()) + ; + + $compilerPass = new AddSecurityVotersPass(); + $compilerPass->process($container); + } + + public function testThatSecurityVotersAreProcessedInPriorityOrder() + { + $container = new ContainerBuilder(); + $container + ->register('security.access.decision_manager', 'Symfony\Component\Security\Core\Authorization\AccessDecisionManager') + ->addArgument(array()) + ; + $container + ->register('no_prio_service') + ->addTag('security.voter') + ; + $container + ->register('lowest_prio_service') + ->addTag('security.voter', array('priority' => 100)) + ; + $container + ->register('highest_prio_service') + ->addTag('security.voter', array('priority' => 200)) + ; + $container + ->register('zero_prio_service') + ->addTag('security.voter', array('priority' => 0)) + ; + $compilerPass = new AddSecurityVotersPass(); + $compilerPass->process($container); + + $calls = $container->getDefinition('security.access.decision_manager')->getMethodCalls(); + $refs = $calls[0][1][0]; + $this->assertEquals(new Reference('highest_prio_service'), $refs[0]); + $this->assertEquals(new Reference('lowest_prio_service'), $refs[1]); + $this->assertCount(4, $refs); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ddf3492108cb43529175e2594946023794b07b57 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php @@ -0,0 +1,359 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Bundle\SecurityBundle\SecurityBundle; +use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +abstract class CompleteConfigurationTest extends TestCase +{ + private static $containerCache = array(); + + abstract protected function getLoader(ContainerBuilder $container); + + abstract protected function getFileExtension(); + + public function testRolesHierarchy() + { + $container = $this->getContainer('container1'); + $this->assertEquals(array( + 'ROLE_ADMIN' => array('ROLE_USER'), + 'ROLE_SUPER_ADMIN' => array('ROLE_USER', 'ROLE_ADMIN', 'ROLE_ALLOWED_TO_SWITCH'), + 'ROLE_REMOTE' => array('ROLE_USER', 'ROLE_ADMIN'), + ), $container->getParameter('security.role_hierarchy.roles')); + } + + public function testUserProviders() + { + $container = $this->getContainer('container1'); + + $providers = array_values(array_filter($container->getServiceIds(), function ($key) { return 0 === strpos($key, 'security.user.provider.concrete'); })); + + $expectedProviders = array( + 'security.user.provider.concrete.default', + 'security.user.provider.concrete.default_foo', + 'security.user.provider.concrete.digest', + 'security.user.provider.concrete.digest_foo', + 'security.user.provider.concrete.basic', + 'security.user.provider.concrete.basic_foo', + 'security.user.provider.concrete.basic_bar', + 'security.user.provider.concrete.service', + 'security.user.provider.concrete.chain', + ); + + $this->assertEquals(array(), array_diff($expectedProviders, $providers)); + $this->assertEquals(array(), array_diff($providers, $expectedProviders)); + + // chain provider + $this->assertEquals(array(array( + new Reference('security.user.provider.concrete.service'), + new Reference('security.user.provider.concrete.basic'), + )), $container->getDefinition('security.user.provider.concrete.chain')->getArguments()); + } + + public function testFirewalls() + { + $container = $this->getContainer('container1'); + $arguments = $container->getDefinition('security.firewall.map')->getArguments(); + $listeners = array(); + $configs = array(); + foreach (array_keys($arguments[1]) as $contextId) { + $contextDef = $container->getDefinition($contextId); + $arguments = $contextDef->getArguments(); + $listeners[] = array_map(function ($ref) { return (string) $ref; }, $arguments['index_0']); + + $configDef = $container->getDefinition((string) $arguments['index_2']); + $configs[] = array_values($configDef->getArguments()); + } + + $this->assertEquals(array( + array( + 'simple', + 'security.user_checker', + 'security.request_matcher.707b20193d4cb9f2718114abcbebb32af48f948484fc166a03482f49bf14f25e271f72c7', + false, + ), + array( + 'secure', + 'security.user_checker', + null, + true, + true, + 'security.user.provider.concrete.default', + null, + 'security.authentication.form_entry_point.secure', + null, + null, + array( + 'logout', + 'switch_user', + 'x509', + 'remote_user', + 'form_login', + 'http_basic', + 'http_digest', + 'remember_me', + 'anonymous', + ), + ), + array( + 'host', + 'security.user_checker', + 'security.request_matcher.dda8b565689ad8509623ee68fb2c639cd81cd4cb339d60edbaf7d67d30e6aa09bd8c63c3', + true, + false, + 'security.user.provider.concrete.default', + 'host', + 'security.authentication.basic_entry_point.host', + null, + null, + array( + 'http_basic', + 'anonymous', + ), + ), + array( + 'with_user_checker', + 'app.user_checker', + null, + true, + false, + 'security.user.provider.concrete.default', + 'with_user_checker', + 'security.authentication.basic_entry_point.with_user_checker', + null, + null, + array( + 'http_basic', + 'anonymous', + ), + ), + ), $configs); + + $this->assertEquals(array( + array(), + array( + 'security.channel_listener', + 'security.logout_listener.secure', + 'security.authentication.listener.x509.secure', + 'security.authentication.listener.remote_user.secure', + 'security.authentication.listener.form.secure', + 'security.authentication.listener.basic.secure', + 'security.authentication.listener.digest.secure', + 'security.authentication.listener.rememberme.secure', + 'security.authentication.listener.anonymous.secure', + 'security.authentication.switchuser_listener.secure', + 'security.access_listener', + ), + array( + 'security.channel_listener', + 'security.context_listener.0', + 'security.authentication.listener.basic.host', + 'security.authentication.listener.anonymous.host', + 'security.access_listener', + ), + array( + 'security.channel_listener', + 'security.context_listener.1', + 'security.authentication.listener.basic.with_user_checker', + 'security.authentication.listener.anonymous.with_user_checker', + 'security.access_listener', + ), + ), $listeners); + } + + public function testFirewallRequestMatchers() + { + $container = $this->getContainer('container1'); + + $arguments = $container->getDefinition('security.firewall.map')->getArguments(); + $matchers = array(); + + foreach ($arguments[1] as $reference) { + if ($reference instanceof Reference) { + $definition = $container->getDefinition((string) $reference); + $matchers[] = $definition->getArguments(); + } + } + + $this->assertEquals(array( + array( + '/login', + ), + array( + '/test', + 'foo\\.example\\.org', + array('GET', 'POST'), + ), + ), $matchers); + } + + public function testAccess() + { + $container = $this->getContainer('container1'); + + $rules = array(); + foreach ($container->getDefinition('security.access_map')->getMethodCalls() as $call) { + if ($call[0] == 'add') { + $rules[] = array((string) $call[1][0], $call[1][1], $call[1][2]); + } + } + + $matcherIds = array(); + foreach ($rules as list($matcherId, $attributes, $channel)) { + $requestMatcher = $container->getDefinition($matcherId); + + $this->assertFalse(isset($matcherIds[$matcherId])); + $matcherIds[$matcherId] = true; + + $i = count($matcherIds); + if (1 === $i) { + $this->assertEquals(array('ROLE_USER'), $attributes); + $this->assertEquals('https', $channel); + $this->assertEquals( + array('/blog/524', null, array('GET', 'POST')), + $requestMatcher->getArguments() + ); + } elseif (2 === $i) { + $this->assertEquals(array('IS_AUTHENTICATED_ANONYMOUSLY'), $attributes); + $this->assertNull($channel); + $this->assertEquals( + array('/blog/.*'), + $requestMatcher->getArguments() + ); + } elseif (3 === $i) { + $this->assertEquals('IS_AUTHENTICATED_ANONYMOUSLY', $attributes[0]); + $expression = $container->getDefinition((string) $attributes[1])->getArgument(0); + $this->assertEquals("token.getUsername() matches '/^admin/'", $expression); + } + } + } + + public function testMerge() + { + $container = $this->getContainer('merge'); + + $this->assertEquals(array( + 'FOO' => array('MOO'), + 'ADMIN' => array('USER'), + ), $container->getParameter('security.role_hierarchy.roles')); + } + + public function testEncoders() + { + $container = $this->getContainer('container1'); + + $this->assertEquals(array(array( + 'JMS\FooBundle\Entity\User1' => array( + 'class' => 'Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder', + 'arguments' => array(false), + ), + 'JMS\FooBundle\Entity\User2' => array( + 'algorithm' => 'sha1', + 'encode_as_base64' => false, + 'iterations' => 5, + 'hash_algorithm' => 'sha512', + 'key_length' => 40, + 'ignore_case' => false, + 'cost' => 13, + ), + 'JMS\FooBundle\Entity\User3' => array( + 'algorithm' => 'md5', + 'hash_algorithm' => 'sha512', + 'key_length' => 40, + 'ignore_case' => false, + 'encode_as_base64' => true, + 'iterations' => 5000, + 'cost' => 13, + ), + 'JMS\FooBundle\Entity\User4' => new Reference('security.encoder.foo'), + 'JMS\FooBundle\Entity\User5' => array( + 'class' => 'Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder', + 'arguments' => array('sha1', false, 5, 30), + ), + 'JMS\FooBundle\Entity\User6' => array( + 'class' => 'Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder', + 'arguments' => array(15), + ), + )), $container->getDefinition('security.encoder_factory.generic')->getArguments()); + } + + public function testAcl() + { + $container = $this->getContainer('container1'); + + $this->assertTrue($container->hasDefinition('security.acl.dbal.provider')); + $this->assertEquals('security.acl.dbal.provider', (string) $container->getAlias('security.acl.provider')); + } + + public function testCustomAclProvider() + { + $container = $this->getContainer('custom_acl_provider'); + + $this->assertFalse($container->hasDefinition('security.acl.dbal.provider')); + $this->assertEquals('foo', (string) $container->getAlias('security.acl.provider')); + } + + public function testRememberMeThrowExceptionsDefault() + { + $container = $this->getContainer('container1'); + $this->assertTrue($container->getDefinition('security.authentication.listener.rememberme.secure')->getArgument(5)); + } + + public function testRememberMeThrowExceptions() + { + $container = $this->getContainer('remember_me_options'); + $service = $container->getDefinition('security.authentication.listener.rememberme.main'); + $this->assertEquals('security.authentication.rememberme.services.persistent.main', $service->getArgument(1)); + $this->assertFalse($service->getArgument(5)); + } + + public function testUserCheckerConfig() + { + $this->assertEquals('app.user_checker', $this->getContainer('container1')->getAlias('security.user_checker.with_user_checker')); + } + + public function testUserCheckerConfigWithDefaultChecker() + { + $this->assertEquals('security.user_checker', $this->getContainer('container1')->getAlias('security.user_checker.host')); + } + + public function testUserCheckerConfigWithNoCheckers() + { + $this->assertEquals('security.user_checker', $this->getContainer('container1')->getAlias('security.user_checker.secure')); + } + + protected function getContainer($file) + { + $file = $file.'.'.$this->getFileExtension(); + + if (isset(self::$containerCache[$file])) { + return self::$containerCache[$file]; + } + $container = new ContainerBuilder(); + $security = new SecurityExtension(); + $container->registerExtension($security); + + $bundle = new SecurityBundle(); + $bundle->build($container); // Attach all default factories + $this->getLoader($container)->load($file); + + $container->getCompilerPassConfig()->setOptimizationPasses(array()); + $container->getCompilerPassConfig()->setRemovingPasses(array()); + $container->compile(); + + return self::$containerCache[$file] = $container; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/UserProvider/DummyProvider.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/UserProvider/DummyProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..55d3d6e9a2f1090e28b937ec46c50f598791b0e2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/UserProvider/DummyProvider.php @@ -0,0 +1,23 @@ +loadFromExtension('security', array( + 'acl' => array(), + 'encoders' => array( + 'JMS\FooBundle\Entity\User1' => 'plaintext', + 'JMS\FooBundle\Entity\User2' => array( + 'algorithm' => 'sha1', + 'encode_as_base64' => false, + 'iterations' => 5, + ), + 'JMS\FooBundle\Entity\User3' => array( + 'algorithm' => 'md5', + ), + 'JMS\FooBundle\Entity\User4' => array( + 'id' => 'security.encoder.foo', + ), + 'JMS\FooBundle\Entity\User5' => array( + 'algorithm' => 'pbkdf2', + 'hash_algorithm' => 'sha1', + 'encode_as_base64' => false, + 'iterations' => 5, + 'key_length' => 30, + ), + 'JMS\FooBundle\Entity\User6' => array( + 'algorithm' => 'bcrypt', + 'cost' => 15, + ), + ), + 'providers' => array( + 'default' => array( + 'memory' => array( + 'users' => array( + 'foo' => array('password' => 'foo', 'roles' => 'ROLE_USER'), + ), + ), + ), + 'digest' => array( + 'memory' => array( + 'users' => array( + 'foo' => array('password' => 'foo', 'roles' => 'ROLE_USER, ROLE_ADMIN'), + ), + ), + ), + 'basic' => array( + 'memory' => array( + 'users' => array( + 'foo' => array('password' => '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33', 'roles' => 'ROLE_SUPER_ADMIN'), + 'bar' => array('password' => '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33', 'roles' => array('ROLE_USER', 'ROLE_ADMIN')), + ), + ), + ), + 'service' => array( + 'id' => 'user.manager', + ), + 'chain' => array( + 'chain' => array( + 'providers' => array('service', 'basic'), + ), + ), + ), + + 'firewalls' => array( + 'simple' => array('pattern' => '/login', 'security' => false), + 'secure' => array('stateless' => true, + 'http_basic' => true, + 'http_digest' => array('secret' => 'TheSecret'), + 'form_login' => true, + 'anonymous' => true, + 'switch_user' => true, + 'x509' => true, + 'remote_user' => true, + 'logout' => true, + 'remember_me' => array('secret' => 'TheSecret'), + 'user_checker' => null, + ), + 'host' => array( + 'pattern' => '/test', + 'host' => 'foo\\.example\\.org', + 'methods' => array('GET', 'POST'), + 'anonymous' => true, + 'http_basic' => true, + ), + 'with_user_checker' => array( + 'user_checker' => 'app.user_checker', + 'anonymous' => true, + 'http_basic' => true, + ), + ), + + 'access_control' => array( + array('path' => '/blog/524', 'role' => 'ROLE_USER', 'requires_channel' => 'https', 'methods' => array('get', 'POST')), + array('path' => '/blog/.*', 'role' => 'IS_AUTHENTICATED_ANONYMOUSLY'), + array('path' => '/blog/524', 'role' => 'IS_AUTHENTICATED_ANONYMOUSLY', 'allow_if' => "token.getUsername() matches '/^admin/'"), + ), + + 'role_hierarchy' => array( + 'ROLE_ADMIN' => 'ROLE_USER', + 'ROLE_SUPER_ADMIN' => array('ROLE_USER', 'ROLE_ADMIN', 'ROLE_ALLOWED_TO_SWITCH'), + 'ROLE_REMOTE' => 'ROLE_USER,ROLE_ADMIN', + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/custom_acl_provider.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/custom_acl_provider.php new file mode 100644 index 0000000000000000000000000000000000000000..351dc6c09e1a696fea3becdb7add7945afe78fb4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/custom_acl_provider.php @@ -0,0 +1,9 @@ +load('container1.php', $container); + +$container->loadFromExtension('security', array( + 'acl' => array( + 'provider' => 'foo', + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge.php new file mode 100644 index 0000000000000000000000000000000000000000..50ef504ea4d43e4d22e0a2eb34fe603b805e52c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge.php @@ -0,0 +1,20 @@ +load('merge_import.php', $container); + +$container->loadFromExtension('security', array( + 'providers' => array( + 'default' => array('id' => 'foo'), + ), + + 'firewalls' => array( + 'main' => array( + 'form_login' => false, + 'http_basic' => null, + ), + ), + + 'role_hierarchy' => array( + 'FOO' => array('MOO'), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge_import.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge_import.php new file mode 100644 index 0000000000000000000000000000000000000000..912b9127ef369e861f394b27a4a3ef54f66c65e2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge_import.php @@ -0,0 +1,15 @@ +loadFromExtension('security', array( + 'firewalls' => array( + 'main' => array( + 'form_login' => array( + 'login_path' => '/login', + ), + ), + ), + 'role_hierarchy' => array( + 'FOO' => 'BAR', + 'ADMIN' => 'USER', + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php new file mode 100644 index 0000000000000000000000000000000000000000..e0ca4f6dedf3e63c7bea89cd5b2665f9e4461d4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php @@ -0,0 +1,18 @@ +loadFromExtension('security', array( + 'providers' => array( + 'default' => array('id' => 'foo'), + ), + + 'firewalls' => array( + 'main' => array( + 'form_login' => true, + 'remember_me' => array( + 'secret' => 'TheSecret', + 'catch_exceptions' => false, + 'token_provider' => 'token_provider_id', + ), + ), + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml new file mode 100644 index 0000000000000000000000000000000000000000..19167551025e2fedfe37ac29150ad3562e9f6157 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + app.user_checker + + + ROLE_USER + ROLE_USER,ROLE_ADMIN,ROLE_ALLOWED_TO_SWITCH + ROLE_USER,ROLE_ADMIN + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/custom_acl_provider.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/custom_acl_provider.xml new file mode 100644 index 0000000000000000000000000000000000000000..6addc816682533c0d00c1409da5d8a60c3dcd0e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/custom_acl_provider.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge.xml new file mode 100644 index 0000000000000000000000000000000000000000..8a17f6db23c55c1e31702f61fa8b52a3c1b7ce60 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge_import.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge_import.xml new file mode 100644 index 0000000000000000000000000000000000000000..81b8cffd68d9ec2182e70f45cb26e20cca1f88ae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge_import.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/remember_me_options.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/remember_me_options.xml new file mode 100644 index 0000000000000000000000000000000000000000..b6ade91a07970906fd8a1a442a4a98418c2e32ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/remember_me_options.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml new file mode 100644 index 0000000000000000000000000000000000000000..e8ed61ef031b947297d1d7be300d8f72245ee7c3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml @@ -0,0 +1,83 @@ +security: + acl: ~ + encoders: + JMS\FooBundle\Entity\User1: plaintext + JMS\FooBundle\Entity\User2: + algorithm: sha1 + encode_as_base64: false + iterations: 5 + JMS\FooBundle\Entity\User3: + algorithm: md5 + JMS\FooBundle\Entity\User4: + id: security.encoder.foo + JMS\FooBundle\Entity\User5: + algorithm: pbkdf2 + hash_algorithm: sha1 + encode_as_base64: false + iterations: 5 + key_length: 30 + JMS\FooBundle\Entity\User6: + algorithm: bcrypt + cost: 15 + + providers: + default: + memory: + users: + foo: { password: foo, roles: ROLE_USER } + digest: + memory: + users: + foo: { password: foo, roles: 'ROLE_USER, ROLE_ADMIN' } + basic: + memory: + users: + foo: { password: 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33, roles: ROLE_SUPER_ADMIN } + bar: { password: 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33, roles: [ROLE_USER, ROLE_ADMIN] } + service: + id: user.manager + chain: + chain: + providers: [service, basic] + + + firewalls: + simple: { pattern: /login, security: false } + secure: + stateless: true + http_basic: true + http_digest: + secret: TheSecret + form_login: true + anonymous: true + switch_user: true + x509: true + remote_user: true + logout: true + remember_me: + secret: TheSecret + user_checker: ~ + + host: + pattern: /test + host: foo\.example\.org + methods: [GET,POST] + anonymous: true + http_basic: true + + with_user_checker: + anonymous: ~ + http_basic: ~ + user_checker: app.user_checker + + role_hierarchy: + ROLE_ADMIN: ROLE_USER + ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] + ROLE_REMOTE: ROLE_USER,ROLE_ADMIN + + access_control: + - { path: /blog/524, role: ROLE_USER, requires_channel: https, methods: [get, POST]} + - + path: /blog/.* + role: IS_AUTHENTICATED_ANONYMOUSLY + - { path: /blog/524, role: IS_AUTHENTICATED_ANONYMOUSLY, allow_if: "token.getUsername() matches '/^admin/'" } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/custom_acl_provider.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/custom_acl_provider.yml new file mode 100644 index 0000000000000000000000000000000000000000..633eed00e3418157457118d4e2486aac339218ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/custom_acl_provider.yml @@ -0,0 +1,6 @@ +imports: + - { resource: container1.yml } + +security: + acl: + provider: foo diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge.yml new file mode 100644 index 0000000000000000000000000000000000000000..60c0bbea558e7a4dba521c0c20ceff04340b9542 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge.yml @@ -0,0 +1,14 @@ +imports: + - { resource: merge_import.yml } + +security: + providers: + default: { id: foo } + + firewalls: + main: + form_login: false + http_basic: ~ + + role_hierarchy: + FOO: [MOO] diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge_import.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge_import.yml new file mode 100644 index 0000000000000000000000000000000000000000..4f8db0a09f7b48a49e80c1d25d4171489fe35edf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge_import.yml @@ -0,0 +1,9 @@ +security: + firewalls: + main: + form_login: + login_path: /login + + role_hierarchy: + FOO: BAR + ADMIN: USER diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/remember_me_options.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/remember_me_options.yml new file mode 100644 index 0000000000000000000000000000000000000000..a521c8c6a803d25ce6e580e30ac27b98b94eedc8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/remember_me_options.yml @@ -0,0 +1,12 @@ +security: + providers: + default: + id: foo + + firewalls: + main: + form_login: true + remember_me: + secret: TheSecret + catch_exceptions: false + token_provider: token_provider_id diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a64c4fe4101f1a6334b5165336b94c93bffc206d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\SecurityBundle\DependencyInjection\MainConfiguration; +use Symfony\Component\Config\Definition\Processor; + +class MainConfigurationTest extends TestCase +{ + /** + * The minimal, required config needed to not have any required validation + * issues. + * + * @var array + */ + protected static $minimalConfig = array( + 'providers' => array( + 'stub' => array( + 'id' => 'foo', + ), + ), + 'firewalls' => array( + 'stub' => array(), + ), + ); + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + */ + public function testNoConfigForProvider() + { + $config = array( + 'providers' => array( + 'stub' => array(), + ), + ); + + $processor = new Processor(); + $configuration = new MainConfiguration(array(), array()); + $processor->processConfiguration($configuration, array($config)); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + */ + public function testManyConfigForProvider() + { + $config = array( + 'providers' => array( + 'stub' => array( + 'id' => 'foo', + 'chain' => array(), + ), + ), + ); + + $processor = new Processor(); + $configuration = new MainConfiguration(array(), array()); + $processor->processConfiguration($configuration, array($config)); + } + + public function testCsrfAliases() + { + $config = array( + 'firewalls' => array( + 'stub' => array( + 'logout' => array( + 'csrf_token_generator' => 'a_token_generator', + 'csrf_token_id' => 'a_token_id', + ), + ), + ), + ); + $config = array_merge(static::$minimalConfig, $config); + + $processor = new Processor(); + $configuration = new MainConfiguration(array(), array()); + $processedConfig = $processor->processConfiguration($configuration, array($config)); + $this->assertTrue(isset($processedConfig['firewalls']['stub']['logout']['csrf_token_generator'])); + $this->assertEquals('a_token_generator', $processedConfig['firewalls']['stub']['logout']['csrf_token_generator']); + $this->assertTrue(isset($processedConfig['firewalls']['stub']['logout']['csrf_token_id'])); + $this->assertEquals('a_token_id', $processedConfig['firewalls']['stub']['logout']['csrf_token_id']); + } + + public function testDefaultUserCheckers() + { + $processor = new Processor(); + $configuration = new MainConfiguration(array(), array()); + $processedConfig = $processor->processConfiguration($configuration, array(static::$minimalConfig)); + + $this->assertEquals('security.user_checker', $processedConfig['firewalls']['stub']['user_checker']); + } + + public function testUserCheckers() + { + $config = array( + 'firewalls' => array( + 'stub' => array( + 'user_checker' => 'app.henk_checker', + ), + ), + ); + $config = array_merge(static::$minimalConfig, $config); + + $processor = new Processor(); + $configuration = new MainConfiguration(array(), array()); + $processedConfig = $processor->processConfiguration($configuration, array($config)); + + $this->assertEquals('app.henk_checker', $processedConfig['firewalls']['stub']['user_checker']); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/PhpCompleteConfigurationTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/PhpCompleteConfigurationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6495485d1bb874c10a605d45d8515b02de22de1f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/PhpCompleteConfigurationTest.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\Bundle\SecurityBundle\Tests\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use Symfony\Component\Config\FileLocator; + +class PhpCompleteConfigurationTest extends CompleteConfigurationTest +{ + protected function getLoader(ContainerBuilder $container) + { + return new PhpFileLoader($container, new FileLocator(__DIR__.'/Fixtures/php')); + } + + protected function getFileExtension() + { + return 'php'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..846d76f770d5984640e20cfc6764392895f599b6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php @@ -0,0 +1,157 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Security\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class AbstractFactoryTest extends TestCase +{ + public function testCreate() + { + list($container, $authProviderId, $listenerId, $entryPointId) = $this->callFactory('foo', array( + 'use_forward' => true, + 'failure_path' => '/foo', + 'success_handler' => 'custom_success_handler', + 'failure_handler' => 'custom_failure_handler', + 'remember_me' => true, + ), 'user_provider', 'entry_point'); + + // auth provider + $this->assertEquals('auth_provider', $authProviderId); + + // listener + $this->assertEquals('abstract_listener.foo', $listenerId); + $this->assertTrue($container->hasDefinition('abstract_listener.foo')); + $definition = $container->getDefinition('abstract_listener.foo'); + $this->assertEquals(array( + 'index_4' => 'foo', + 'index_5' => new Reference('security.authentication.success_handler.foo.abstract_factory'), + 'index_6' => new Reference('security.authentication.failure_handler.foo.abstract_factory'), + 'index_7' => array( + 'use_forward' => true, + ), + ), $definition->getArguments()); + + // entry point + $this->assertEquals('entry_point', $entryPointId, '->create() does not change the default entry point.'); + } + + /** + * @dataProvider getFailureHandlers + */ + public function testDefaultFailureHandler($serviceId, $defaultHandlerInjection) + { + $options = array( + 'remember_me' => true, + 'login_path' => '/bar', + ); + + if ($serviceId) { + $options['failure_handler'] = $serviceId; + } + + list($container, $authProviderId, $listenerId, $entryPointId) = $this->callFactory('foo', $options, 'user_provider', 'entry_point'); + + $definition = $container->getDefinition('abstract_listener.foo'); + $arguments = $definition->getArguments(); + $this->assertEquals(new Reference('security.authentication.failure_handler.foo.abstract_factory'), $arguments['index_6']); + $failureHandler = $container->findDefinition((string) $arguments['index_6']); + + $methodCalls = $failureHandler->getMethodCalls(); + if ($defaultHandlerInjection) { + $this->assertEquals('setOptions', $methodCalls[0][0]); + $this->assertEquals(array('login_path' => '/bar'), $methodCalls[0][1][0]); + } else { + $this->assertCount(0, $methodCalls); + } + } + + public function getFailureHandlers() + { + return array( + array(null, true), + array('custom_failure_handler', false), + ); + } + + /** + * @dataProvider getSuccessHandlers + */ + public function testDefaultSuccessHandler($serviceId, $defaultHandlerInjection) + { + $options = array( + 'remember_me' => true, + 'default_target_path' => '/bar', + ); + + if ($serviceId) { + $options['success_handler'] = $serviceId; + } + + list($container, $authProviderId, $listenerId, $entryPointId) = $this->callFactory('foo', $options, 'user_provider', 'entry_point'); + + $definition = $container->getDefinition('abstract_listener.foo'); + $arguments = $definition->getArguments(); + $this->assertEquals(new Reference('security.authentication.success_handler.foo.abstract_factory'), $arguments['index_5']); + $successHandler = $container->findDefinition((string) $arguments['index_5']); + $methodCalls = $successHandler->getMethodCalls(); + + if ($defaultHandlerInjection) { + $this->assertEquals('setOptions', $methodCalls[0][0]); + $this->assertEquals(array('default_target_path' => '/bar'), $methodCalls[0][1][0]); + $this->assertEquals('setProviderKey', $methodCalls[1][0]); + $this->assertEquals(array('foo'), $methodCalls[1][1]); + } else { + $this->assertCount(0, $methodCalls); + } + } + + public function getSuccessHandlers() + { + return array( + array(null, true), + array('custom_success_handler', false), + ); + } + + protected function callFactory($id, $config, $userProviderId, $defaultEntryPointId) + { + $factory = $this->getMockForAbstractClass('Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AbstractFactory', array()); + + $factory + ->expects($this->once()) + ->method('createAuthProvider') + ->will($this->returnValue('auth_provider')) + ; + $factory + ->expects($this->atLeastOnce()) + ->method('getListenerId') + ->will($this->returnValue('abstract_listener')) + ; + $factory + ->expects($this->any()) + ->method('getKey') + ->will($this->returnValue('abstract_factory')) + ; + + $container = new ContainerBuilder(); + $container->register('auth_provider'); + $container->register('custom_success_handler'); + $container->register('custom_failure_handler'); + + list($authProviderId, $listenerId, $entryPointId) = $factory->create($container, $id, $config, $userProviderId, $defaultEntryPointId); + + return array($container, $authProviderId, $listenerId, $entryPointId); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..99647ec1835e62217c01a99bf33be856c93da3b0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php @@ -0,0 +1,182 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Security\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\GuardAuthenticationFactory; +use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +class GuardAuthenticationFactoryTest extends TestCase +{ + /** + * @dataProvider getValidConfigurationTests + */ + public function testAddValidConfiguration(array $inputConfig, array $expectedConfig) + { + $factory = new GuardAuthenticationFactory(); + $nodeDefinition = new ArrayNodeDefinition('guard'); + $factory->addConfiguration($nodeDefinition); + + $node = $nodeDefinition->getNode(); + $normalizedConfig = $node->normalize($inputConfig); + $finalizedConfig = $node->finalize($normalizedConfig); + + $this->assertEquals($expectedConfig, $finalizedConfig); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @dataProvider getInvalidConfigurationTests + */ + public function testAddInvalidConfiguration(array $inputConfig) + { + $factory = new GuardAuthenticationFactory(); + $nodeDefinition = new ArrayNodeDefinition('guard'); + $factory->addConfiguration($nodeDefinition); + + $node = $nodeDefinition->getNode(); + $normalizedConfig = $node->normalize($inputConfig); + // will validate and throw an exception on invalid + $node->finalize($normalizedConfig); + } + + public function getValidConfigurationTests() + { + $tests = array(); + + // completely basic + $tests[] = array( + array( + 'authenticators' => array('authenticator1', 'authenticator2'), + 'provider' => 'some_provider', + 'entry_point' => 'the_entry_point', + ), + array( + 'authenticators' => array('authenticator1', 'authenticator2'), + 'provider' => 'some_provider', + 'entry_point' => 'the_entry_point', + ), + ); + + // testing xml config fix: authenticator -> authenticators + $tests[] = array( + array( + 'authenticator' => array('authenticator1', 'authenticator2'), + ), + array( + 'authenticators' => array('authenticator1', 'authenticator2'), + 'entry_point' => null, + ), + ); + + return $tests; + } + + public function getInvalidConfigurationTests() + { + $tests = array(); + + // testing not empty + $tests[] = array( + array('authenticators' => array()), + ); + + return $tests; + } + + public function testBasicCreate() + { + // simple configuration + $config = array( + 'authenticators' => array('authenticator123'), + 'entry_point' => null, + ); + list($container, $entryPointId) = $this->executeCreate($config, null); + $this->assertEquals('authenticator123', $entryPointId); + + $providerDefinition = $container->getDefinition('security.authentication.provider.guard.my_firewall'); + $this->assertEquals(array( + 'index_0' => array(new Reference('authenticator123')), + 'index_1' => new Reference('my_user_provider'), + 'index_2' => 'my_firewall', + 'index_3' => new Reference('security.user_checker.my_firewall'), + ), $providerDefinition->getArguments()); + + $listenerDefinition = $container->getDefinition('security.authentication.listener.guard.my_firewall'); + $this->assertEquals('my_firewall', $listenerDefinition->getArgument(2)); + $this->assertEquals(array(new Reference('authenticator123')), $listenerDefinition->getArgument(3)); + } + + public function testExistingDefaultEntryPointUsed() + { + // any existing default entry point is used + $config = array( + 'authenticators' => array('authenticator123'), + 'entry_point' => null, + ); + list(, $entryPointId) = $this->executeCreate($config, 'some_default_entry_point'); + $this->assertEquals('some_default_entry_point', $entryPointId); + } + + /** + * @expectedException \LogicException + */ + public function testCannotOverrideDefaultEntryPoint() + { + // any existing default entry point is used + $config = array( + 'authenticators' => array('authenticator123'), + 'entry_point' => 'authenticator123', + ); + $this->executeCreate($config, 'some_default_entry_point'); + } + + /** + * @expectedException \LogicException + */ + public function testMultipleAuthenticatorsRequiresEntryPoint() + { + // any existing default entry point is used + $config = array( + 'authenticators' => array('authenticator123', 'authenticatorABC'), + 'entry_point' => null, + ); + $this->executeCreate($config, null); + } + + public function testCreateWithEntryPoint() + { + // any existing default entry point is used + $config = array( + 'authenticators' => array('authenticator123', 'authenticatorABC'), + 'entry_point' => 'authenticatorABC', + ); + list($container, $entryPointId) = $this->executeCreate($config, null); + $this->assertEquals('authenticatorABC', $entryPointId); + } + + private function executeCreate(array $config, $defaultEntryPointId) + { + $container = new ContainerBuilder(); + $container->register('security.authentication.provider.guard'); + $container->register('security.authentication.listener.guard'); + $id = 'my_firewall'; + $userProviderId = 'my_user_provider'; + + $factory = new GuardAuthenticationFactory(); + list($providerId, $listenerId, $entryPointId) = $factory->create($container, $id, $config, $userProviderId, $defaultEntryPointId); + + return array($container, $entryPointId); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..72ef2e0c3ed56a1d7ea66f3f8a9ebc1ad10d008e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php @@ -0,0 +1,144 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension; +use Symfony\Bundle\SecurityBundle\SecurityBundle; +use Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Fixtures\UserProvider\DummyProvider; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class SecurityExtensionTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage The check_path "/some_area/login_check" for login method "form_login" is not matched by the firewall pattern "/secured_area/.*". + */ + public function testInvalidCheckPath() + { + $container = $this->getRawContainer(); + + $container->loadFromExtension('security', array( + 'providers' => array( + 'default' => array('id' => 'foo'), + ), + + 'firewalls' => array( + 'some_firewall' => array( + 'pattern' => '/secured_area/.*', + 'form_login' => array( + 'check_path' => '/some_area/login_check', + ), + ), + ), + )); + + $container->compile(); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage No authentication listener registered for firewall "some_firewall" + */ + public function testFirewallWithoutAuthenticationListener() + { + $container = $this->getRawContainer(); + + $container->loadFromExtension('security', array( + 'providers' => array( + 'default' => array('id' => 'foo'), + ), + + 'firewalls' => array( + 'some_firewall' => array( + 'pattern' => '/.*', + ), + ), + )); + + $container->compile(); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage Unable to create definition for "security.user.provider.concrete.my_foo" user provider + */ + public function testFirewallWithInvalidUserProvider() + { + $container = $this->getRawContainer(); + + $extension = $container->getExtension('security'); + $extension->addUserProviderFactory(new DummyProvider()); + + $container->loadFromExtension('security', array( + 'providers' => array( + 'my_foo' => array('foo' => array()), + ), + + 'firewalls' => array( + 'some_firewall' => array( + 'pattern' => '/.*', + 'http_basic' => array(), + ), + ), + )); + + $container->compile(); + } + + public function testDisableRoleHierarchyVoter() + { + $container = $this->getRawContainer(); + + $container->loadFromExtension('security', array( + 'providers' => array( + 'default' => array('id' => 'foo'), + ), + + 'role_hierarchy' => null, + + 'firewalls' => array( + 'some_firewall' => array( + 'pattern' => '/.*', + 'http_basic' => null, + ), + ), + )); + + $container->compile(); + + $this->assertFalse($container->hasDefinition('security.access.role_hierarchy_voter')); + } + + protected function getRawContainer() + { + $container = new ContainerBuilder(); + $security = new SecurityExtension(); + $container->registerExtension($security); + + $bundle = new SecurityBundle(); + $bundle->build($container); + + $container->getCompilerPassConfig()->setOptimizationPasses(array()); + $container->getCompilerPassConfig()->setRemovingPasses(array()); + + return $container; + } + + protected function getContainer() + { + $container = $this->getRawContainer(); + $container->compile(); + + return $container; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCompleteConfigurationTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCompleteConfigurationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2399f5ee460dcbe2b38216661160f25eee1a4366 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCompleteConfigurationTest.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\Bundle\SecurityBundle\Tests\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\Config\FileLocator; + +class XmlCompleteConfigurationTest extends CompleteConfigurationTest +{ + protected function getLoader(ContainerBuilder $container) + { + return new XmlFileLoader($container, new FileLocator(__DIR__.'/Fixtures/xml')); + } + + protected function getFileExtension() + { + return 'xml'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/YamlCompleteConfigurationTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/YamlCompleteConfigurationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d5d5e693abdcd8cea5c053b60ecf38da1cfe9e8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/YamlCompleteConfigurationTest.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\Bundle\SecurityBundle\Tests\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\Config\FileLocator; + +class YamlCompleteConfigurationTest extends CompleteConfigurationTest +{ + protected function getLoader(ContainerBuilder $container) + { + return new YamlFileLoader($container, new FileLocator(__DIR__.'/Fixtures/yml')); + } + + protected function getFileExtension() + { + return 'yml'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticationCommencingTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticationCommencingTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6ac0e6a3af772acc25d66588f485cd3fe7d5955e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticationCommencingTest.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional; + +class AuthenticationCommencingTest extends WebTestCase +{ + public function testAuthenticationIsCommencingIfAccessDeniedExceptionIsWrapped() + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => 'config.yml')); + + $client->request('GET', '/secure-but-not-covered-by-access-control'); + $this->assertRedirect($client->getResponse(), '/login'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/AclBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/AclBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..1208003bcc2c4b6bcdeba5bf92afa7efd67fadb3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/AclBundle.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +/** + * @author Kévin Dunglas + */ +class AclBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/Car.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/Car.php new file mode 100644 index 0000000000000000000000000000000000000000..c85a589578ec519f07e8390bf616e23c3cdc99cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/Car.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity; + +/** + * Car. + * + * @author Kévin Dunglas + */ +class Car +{ + public $id; +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php new file mode 100644 index 0000000000000000000000000000000000000000..c232b4cfd9029155b205e768b760515e37ca2b83 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Controller; + +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Core\Exception\AccessDeniedException; + +class LoginController implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + public function loginAction() + { + $form = $this->container->get('form.factory')->create('Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form\UserLoginType'); + + return $this->container->get('templating')->renderResponse('CsrfFormLoginBundle:Login:login.html.twig', array( + 'form' => $form->createView(), + )); + } + + public function afterLoginAction() + { + return $this->container->get('templating')->renderResponse('CsrfFormLoginBundle:Login:after_login.html.twig'); + } + + public function loginCheckAction() + { + return new Response('', 400); + } + + public function secureAction() + { + throw new \Exception('Wrapper', 0, new \Exception('Another Wrapper', 0, new AccessDeniedException())); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/CsrfFormLoginBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/CsrfFormLoginBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..41309d9c1da0621e51b0a5fe0fc66951c3fdd43d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/CsrfFormLoginBundle.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class CsrfFormLoginBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginType.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginType.php new file mode 100644 index 0000000000000000000000000000000000000000..b82e1f827897d12a5d8ba63e4d38ab86a92ed095 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginType.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form; + +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\FormError; +use Symfony\Component\Form\FormEvents; +use Symfony\Component\Form\FormEvent; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\OptionsResolver\OptionsResolver; +use Symfony\Component\Security\Core\Security; + +/** + * Form type for use with the Security component's form-based authentication + * listener. + * + * @author Henrik Bjornskov + * @author Jeremy Mikola + */ +class UserLoginType extends AbstractType +{ + private $requestStack; + + public function __construct(RequestStack $requestStack) + { + $this->requestStack = $requestStack; + } + + /** + * {@inheritdoc} + */ + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder + ->add('username', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('password', 'Symfony\Component\Form\Extension\Core\Type\PasswordType') + ->add('_target_path', 'Symfony\Component\Form\Extension\Core\Type\HiddenType') + ; + + $request = $this->requestStack->getCurrentRequest(); + + /* Note: since the Security component's form login listener intercepts + * the POST request, this form will never really be bound to the + * request; however, we can match the expected behavior by checking the + * session for an authentication error and last username. + */ + $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($request) { + if ($request->attributes->has(Security::AUTHENTICATION_ERROR)) { + $error = $request->attributes->get(Security::AUTHENTICATION_ERROR); + } else { + $error = $request->getSession()->get(Security::AUTHENTICATION_ERROR); + } + + if ($error) { + $event->getForm()->addError(new FormError($error->getMessage())); + } + + $event->setData(array_replace((array) $event->getData(), array( + 'username' => $request->getSession()->get(Security::LAST_USERNAME), + ))); + }); + } + + /** + * {@inheritdoc} + */ + public function configureOptions(OptionsResolver $resolver) + { + /* Note: the form's csrf_token_id must correspond to that for the form login + * listener in order for the CSRF token to validate successfully. + */ + + $resolver->setDefaults(array( + 'csrf_token_id' => 'authenticate', + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/config/routing.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/config/routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..0a02730233f05177e95fd86f071cc2fa5cfc0f63 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/config/routing.yml @@ -0,0 +1,30 @@ +form_login: + path: /login + defaults: { _controller: CsrfFormLoginBundle:Login:login } + +form_login_check: + path: /login_check + defaults: { _controller: CsrfFormLoginBundle:Login:loginCheck } + +form_login_homepage: + path: / + defaults: { _controller: CsrfFormLoginBundle:Login:afterLogin } + +form_login_custom_target_path: + path: /foo + defaults: { _controller: CsrfFormLoginBundle:Login:afterLogin } + +form_login_default_target_path: + path: /profile + defaults: { _controller: CsrfFormLoginBundle:Login:afterLogin } + +form_login_redirect_to_protected_resource_after_login: + path: /protected-resource + defaults: { _controller: CsrfFormLoginBundle:Login:afterLogin } + +form_logout: + path: /logout_path + +form_secure_action: + path: /secure-but-not-covered-by-access-control + defaults: { _controller: CsrfFormLoginBundle:Login:secure } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/views/Login/after_login.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/views/Login/after_login.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..b56c186ecbb60d4db57ab74a0ecd5d6126bf43d8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/views/Login/after_login.html.twig @@ -0,0 +1,8 @@ +{% extends "::base.html.twig" %} + +{% block body %} + Hello {{ app.user.username }}!

    + You're browsing to path "{{ app.request.pathInfo }}".

    + Log out. + Log out. +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/views/Login/login.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/views/Login/login.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..36ae0151d0d00b77c5193f4959a594778d5b075d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/views/Login/login.html.twig @@ -0,0 +1,12 @@ +{% extends "::base.html.twig" %} + +{% block body %} + + + {{ form_widget(form) }} + + {# Note: ensure the submit name does not conflict with the form's name or it may clobber field data #} + + + +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/DependencyInjection/FirewallEntryPointExtension.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/DependencyInjection/FirewallEntryPointExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..dfedac3735f53dc59b247532d6800b044a69dfda --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/DependencyInjection/FirewallEntryPointExtension.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FirewallEntryPointBundle\DependencyInjection; + +use Symfony\Component\Config\FileLocator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\Extension; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; + +class FirewallEntryPointExtension extends Extension +{ + public function load(array $configs, ContainerBuilder $container) + { + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('services.xml'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/FirewallEntryPointBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/FirewallEntryPointBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..f4247ad050db6be4f53ae91db521a78a58e4c4e6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/FirewallEntryPointBundle.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FirewallEntryPointBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class FirewallEntryPointBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Resources/config/services.xml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Resources/config/services.xml new file mode 100644 index 0000000000000000000000000000000000000000..76abc3d262e93f3292de799d133da14cd8a261ae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Resources/config/services.xml @@ -0,0 +1,10 @@ + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Security/EntryPointStub.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Security/EntryPointStub.php new file mode 100644 index 0000000000000000000000000000000000000000..e1d3280570d888f60ad4752fab3ec81364213f8f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Security/EntryPointStub.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\Bundle\SecurityBundle\Tests\Functional\Bundle\FirewallEntryPointBundle\Security; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; + +class EntryPointStub implements AuthenticationEntryPointInterface +{ + const RESPONSE_TEXT = '2be8e651259189d841a19eecdf37e771e2431741'; + + public function start(Request $request, AuthenticationException $authException = null) + { + return new Response(self::RESPONSE_TEXT); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php new file mode 100644 index 0000000000000000000000000000000000000000..7a6faf4cc99d27d967bac5533f9232d6c203f810 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\Controller; + +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\Security\Core\Security; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +class LocalizedController implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + public function loginAction(Request $request) + { + // get the login error if there is one + if ($request->attributes->has(Security::AUTHENTICATION_ERROR)) { + $error = $request->attributes->get(Security::AUTHENTICATION_ERROR); + } else { + $error = $request->getSession()->get(Security::AUTHENTICATION_ERROR); + } + + return $this->container->get('templating')->renderResponse('FormLoginBundle:Localized:login.html.twig', array( + // last username entered by the user + 'last_username' => $request->getSession()->get(Security::LAST_USERNAME), + 'error' => $error, + )); + } + + public function loginCheckAction() + { + throw new \RuntimeException('loginCheckAction() should never be called.'); + } + + public function logoutAction() + { + throw new \RuntimeException('logoutAction() should never be called.'); + } + + public function secureAction() + { + throw new \RuntimeException('secureAction() should never be called.'); + } + + public function profileAction() + { + return new Response('Profile'); + } + + public function homepageAction() + { + return new Response('Homepage'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php new file mode 100644 index 0000000000000000000000000000000000000000..acc8f43255494d9520cee329bfb6bda746da2995 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\Controller; + +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\Security\Core\Exception\AccessDeniedException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Core\Security; +use Symfony\Component\Security\Core\User\UserInterface; + +class LoginController implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + public function loginAction(Request $request, UserInterface $user = null) + { + // get the login error if there is one + if ($request->attributes->has(Security::AUTHENTICATION_ERROR)) { + $error = $request->attributes->get(Security::AUTHENTICATION_ERROR); + } else { + $error = $request->getSession()->get(Security::AUTHENTICATION_ERROR); + } + + return $this->container->get('templating')->renderResponse('FormLoginBundle:Login:login.html.twig', array( + // last username entered by the user + 'last_username' => $request->getSession()->get(Security::LAST_USERNAME), + 'error' => $error, + )); + } + + public function afterLoginAction(UserInterface $user) + { + return $this->container->get('templating')->renderResponse('FormLoginBundle:Login:after_login.html.twig', array('user' => $user)); + } + + public function loginCheckAction() + { + return new Response('', 400); + } + + public function secureAction() + { + throw new \Exception('Wrapper', 0, new \Exception('Another Wrapper', 0, new AccessDeniedException())); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection/FormLoginExtension.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection/FormLoginExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..6d5715931e1fa80aed01cb2cd3cacbf91fe36a6c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection/FormLoginExtension.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\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\DependencyInjection; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\Extension; + +class FormLoginExtension extends Extension +{ + public function load(array $configs, ContainerBuilder $container) + { + $container + ->register('localized_form_failure_handler', 'Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\Security\LocalizedFormFailureHandler') + ->addArgument(new Reference('router')) + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..eab1913ec184d63d66f5e21f3190f2f58b9fae22 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class FormLoginBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/config/localized_routing.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/config/localized_routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..964a74fe893cd9ce160d45d7388f6b5d59b08642 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/config/localized_routing.yml @@ -0,0 +1,29 @@ +localized_login_path: + path: /{_locale}/login + defaults: { _controller: FormLoginBundle:Localized:login } + requirements: { _locale: "^[a-z]{2}$" } + +localized_check_path: + path: /{_locale}/login_check + defaults: { _controller: FormLoginBundle:Localized:loginCheck } + requirements: { _locale: "^[a-z]{2}$" } + +localized_default_target_path: + path: /{_locale}/profile + defaults: { _controller: FormLoginBundle:Localized:profile } + requirements: { _locale: "^[a-z]{2}$" } + +localized_logout_path: + path: /{_locale}/logout + defaults: { _controller: FormLoginBundle:Localized:logout } + requirements: { _locale: "^[a-z]{2}$" } + +localized_logout_target_path: + path: /{_locale}/ + defaults: { _controller: FormLoginBundle:Localized:homepage } + requirements: { _locale: "^[a-z]{2}$" } + +localized_secure_path: + path: /{_locale}/secure/ + defaults: { _controller: FormLoginBundle:Localized:secure } + requirements: { _locale: "^[a-z]{2}$" } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/config/routing.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/config/routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..6992f80a0a124a157b2594a65f59cafe0e4925fb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/config/routing.yml @@ -0,0 +1,42 @@ +form_login: + path: /login + defaults: { _controller: FormLoginBundle:Login:login } + +form_login_check: + path: /login_check + defaults: { _controller: FormLoginBundle:Login:loginCheck } + +form_login_homepage: + path: / + defaults: { _controller: FormLoginBundle:Login:afterLogin } + +form_login_custom_target_path: + path: /foo + defaults: { _controller: FormLoginBundle:Login:afterLogin } + +form_login_default_target_path: + path: /profile + defaults: { _controller: FormLoginBundle:Login:afterLogin } + +form_login_redirect_to_protected_resource_after_login: + path: /protected_resource + defaults: { _controller: FormLoginBundle:Login:afterLogin } + +highly_protected_resource: + path: /highly_protected_resource + +secured-by-one-ip: + path: /secured-by-one-ip + +secured-by-two-ips: + path: /secured-by-two-ips + +form_logout: + path: /logout_path + +form_secure_action: + path: /secure-but-not-covered-by-access-control + defaults: { _controller: FormLoginBundle:Login:secure } + +protected-via-expression: + path: /protected-via-expression diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Localized/login.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Localized/login.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..60dd2f1ffac7bee637dccb7f891792d0407a2229 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Localized/login.html.twig @@ -0,0 +1,21 @@ +{% extends "::base.html.twig" %} + +{% block body %} + + {% if error %} +
    {{ error.message }}
    + {% endif %} + +
    + + + + + + + + + +
    + +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Login/after_login.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Login/after_login.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..8f6a76098597fd8a73426ecf66cf73d8a3a99a88 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Login/after_login.html.twig @@ -0,0 +1,16 @@ +{% extends "::base.html.twig" %} + +{% block body %} + Hello {{ user.username }}!

    + You're browsing to path "{{ app.request.pathInfo }}". + + Log out. + Log out. + + Log out. + Log out. + + Log out. + Log out. + +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Login/login.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Login/login.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..6c1a22471e10cadb7a1a97aaa3fe187a2e0dee83 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Login/login.html.twig @@ -0,0 +1,21 @@ +{% extends "::base.html.twig" %} + +{% block body %} + + {% if error %} +
    {{ error.message }}
    + {% endif %} + +
    + + + + + + + + + +
    + +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Security/LocalizedFormFailureHandler.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Security/LocalizedFormFailureHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..7b971990657eba80f550100b065e1aab73431ca5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Security/LocalizedFormFailureHandler.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\Security; + +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Routing\RouterInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; + +class LocalizedFormFailureHandler implements AuthenticationFailureHandlerInterface +{ + private $router; + + public function __construct(RouterInterface $router) + { + $this->router = $router; + } + + public function onAuthenticationFailure(Request $request, AuthenticationException $exception) + { + return new RedirectResponse($this->router->generate('localized_login_path', array(), UrlGeneratorInterface::ABSOLUTE_URL)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php new file mode 100644 index 0000000000000000000000000000000000000000..80211f5251b087a5406a258bcf62630150c5cb13 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional; + +class CsrfFormLoginTest extends WebTestCase +{ + /** + * @dataProvider getConfigs + */ + public function testFormLoginAndLogoutWithCsrfTokens($config) + { + $client = $this->createClient(array('test_case' => 'CsrfFormLogin', 'root_config' => $config)); + + $form = $client->request('GET', '/login')->selectButton('login')->form(); + $form['user_login[username]'] = 'johannes'; + $form['user_login[password]'] = 'test'; + $client->submit($form); + + $this->assertRedirect($client->getResponse(), '/profile'); + + $crawler = $client->followRedirect(); + + $text = $crawler->text(); + $this->assertContains('Hello johannes!', $text); + $this->assertContains('You\'re browsing to path "/profile".', $text); + + $logoutLinks = $crawler->selectLink('Log out')->links(); + $this->assertCount(2, $logoutLinks); + $this->assertContains('_csrf_token=', $logoutLinks[0]->getUri()); + $this->assertSame($logoutLinks[0]->getUri(), $logoutLinks[1]->getUri()); + + $client->click($logoutLinks[0]); + + $this->assertRedirect($client->getResponse(), '/'); + } + + /** + * @dataProvider getConfigs + */ + public function testFormLoginWithInvalidCsrfToken($config) + { + $client = $this->createClient(array('test_case' => 'CsrfFormLogin', 'root_config' => $config)); + + $form = $client->request('GET', '/login')->selectButton('login')->form(); + $form['user_login[_token]'] = ''; + $client->submit($form); + + $this->assertRedirect($client->getResponse(), '/login'); + + $text = $client->followRedirect()->text(); + $this->assertContains('Invalid CSRF token.', $text); + } + + /** + * @dataProvider getConfigs + */ + public function testFormLoginWithCustomTargetPath($config) + { + $client = $this->createClient(array('test_case' => 'CsrfFormLogin', 'root_config' => $config)); + + $form = $client->request('GET', '/login')->selectButton('login')->form(); + $form['user_login[username]'] = 'johannes'; + $form['user_login[password]'] = 'test'; + $form['user_login[_target_path]'] = '/foo'; + $client->submit($form); + + $this->assertRedirect($client->getResponse(), '/foo'); + + $text = $client->followRedirect()->text(); + $this->assertContains('Hello johannes!', $text); + $this->assertContains('You\'re browsing to path "/foo".', $text); + } + + /** + * @dataProvider getConfigs + */ + public function testFormLoginRedirectsToProtectedResourceAfterLogin($config) + { + $client = $this->createClient(array('test_case' => 'CsrfFormLogin', 'root_config' => $config)); + + $client->request('GET', '/protected-resource'); + $this->assertRedirect($client->getResponse(), '/login'); + + $form = $client->followRedirect()->selectButton('login')->form(); + $form['user_login[username]'] = 'johannes'; + $form['user_login[password]'] = 'test'; + $client->submit($form); + $this->assertRedirect($client->getResponse(), '/protected-resource'); + + $text = $client->followRedirect()->text(); + $this->assertContains('Hello johannes!', $text); + $this->assertContains('You\'re browsing to path "/protected-resource".', $text); + } + + public function getConfigs() + { + return array( + array('config.yml'), + array('routes_as_path.yml'), + ); + } + + public static function setUpBeforeClass() + { + parent::deleteTmpDir('CsrfFormLogin'); + } + + public static function tearDownAfterClass() + { + parent::deleteTmpDir('CsrfFormLogin'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FirewallEntryPointTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FirewallEntryPointTest.php new file mode 100644 index 0000000000000000000000000000000000000000..30d0935ffddd735db3c83772bcc451494afc3860 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FirewallEntryPointTest.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional; + +use Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FirewallEntryPointBundle\Security\EntryPointStub; + +class FirewallEntryPointTest extends WebTestCase +{ + public function testItUsesTheConfiguredEntryPointWhenUsingUnknownCredentials() + { + $client = $this->createClient(array('test_case' => 'FirewallEntryPoint')); + + $client->request('GET', '/secure/resource', array(), array(), array( + 'PHP_AUTH_USER' => 'unknown', + 'PHP_AUTH_PW' => 'credentials', + )); + + $this->assertEquals( + EntryPointStub::RESPONSE_TEXT, + $client->getResponse()->getContent(), + "Custom entry point wasn't started" + ); + } + + public function testItUsesTheConfiguredEntryPointFromTheExceptionListenerWithFormLoginAndNoCredentials() + { + $client = $this->createClient(array('test_case' => 'FirewallEntryPoint', 'root_config' => 'config_form_login.yml')); + + $client->request('GET', '/secure/resource'); + + $this->assertEquals( + EntryPointStub::RESPONSE_TEXT, + $client->getResponse()->getContent(), + "Custom entry point wasn't started" + ); + } + + public static function setUpBeforeClass() + { + parent::deleteTmpDir('FirewallEntryPoint'); + } + + public static function tearDownAfterClass() + { + parent::deleteTmpDir('FirewallEntryPoint'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2f19f3f8a1a9ac0df0abd772d585d5228f9b8c9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional; + +class FormLoginTest extends WebTestCase +{ + /** + * @dataProvider getConfigs + */ + public function testFormLogin($config) + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config)); + + $form = $client->request('GET', '/login')->selectButton('login')->form(); + $form['_username'] = 'johannes'; + $form['_password'] = 'test'; + $client->submit($form); + + $this->assertRedirect($client->getResponse(), '/profile'); + + $text = $client->followRedirect()->text(); + $this->assertContains('Hello johannes!', $text); + $this->assertContains('You\'re browsing to path "/profile".', $text); + } + + /** + * @dataProvider getConfigs + */ + public function testFormLogout($config) + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config)); + + $form = $client->request('GET', '/login')->selectButton('login')->form(); + $form['_username'] = 'johannes'; + $form['_password'] = 'test'; + $client->submit($form); + + $this->assertRedirect($client->getResponse(), '/profile'); + + $crawler = $client->followRedirect(); + $text = $crawler->text(); + + $this->assertContains('Hello johannes!', $text); + $this->assertContains('You\'re browsing to path "/profile".', $text); + + $logoutLinks = $crawler->selectLink('Log out')->links(); + $this->assertCount(6, $logoutLinks); + $this->assertSame($logoutLinks[0]->getUri(), $logoutLinks[1]->getUri()); + $this->assertSame($logoutLinks[2]->getUri(), $logoutLinks[3]->getUri()); + $this->assertSame($logoutLinks[4]->getUri(), $logoutLinks[5]->getUri()); + + $this->assertNotSame($logoutLinks[0]->getUri(), $logoutLinks[2]->getUri()); + $this->assertNotSame($logoutLinks[1]->getUri(), $logoutLinks[3]->getUri()); + + $this->assertSame($logoutLinks[0]->getUri(), $logoutLinks[4]->getUri()); + $this->assertSame($logoutLinks[1]->getUri(), $logoutLinks[5]->getUri()); + } + + /** + * @dataProvider getConfigs + */ + public function testFormLoginWithCustomTargetPath($config) + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config)); + + $form = $client->request('GET', '/login')->selectButton('login')->form(); + $form['_username'] = 'johannes'; + $form['_password'] = 'test'; + $form['_target_path'] = '/foo'; + $client->submit($form); + + $this->assertRedirect($client->getResponse(), '/foo'); + + $text = $client->followRedirect()->text(); + $this->assertContains('Hello johannes!', $text); + $this->assertContains('You\'re browsing to path "/foo".', $text); + } + + /** + * @dataProvider getConfigs + */ + public function testFormLoginRedirectsToProtectedResourceAfterLogin($config) + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config)); + + $client->request('GET', '/protected_resource'); + $this->assertRedirect($client->getResponse(), '/login'); + + $form = $client->followRedirect()->selectButton('login')->form(); + $form['_username'] = 'johannes'; + $form['_password'] = 'test'; + $client->submit($form); + $this->assertRedirect($client->getResponse(), '/protected_resource'); + + $text = $client->followRedirect()->text(); + $this->assertContains('Hello johannes!', $text); + $this->assertContains('You\'re browsing to path "/protected_resource".', $text); + } + + public function getConfigs() + { + return array( + array('config.yml'), + array('routes_as_path.yml'), + ); + } + + public static function setUpBeforeClass() + { + parent::deleteTmpDir('StandardFormLogin'); + } + + public static function tearDownAfterClass() + { + parent::deleteTmpDir('StandardFormLogin'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php new file mode 100644 index 0000000000000000000000000000000000000000..14c317966e21a3bca04930f6fc33f33cf399dcbe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional; + +class LocalizedRoutesAsPathTest extends WebTestCase +{ + /** + * @dataProvider getLocales + */ + public function testLoginLogoutProcedure($locale) + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => 'localized_routes.yml')); + + $crawler = $client->request('GET', '/'.$locale.'/login'); + $form = $crawler->selectButton('login')->form(); + $form['_username'] = 'johannes'; + $form['_password'] = 'test'; + $client->submit($form); + + $this->assertRedirect($client->getResponse(), '/'.$locale.'/profile'); + $this->assertEquals('Profile', $client->followRedirect()->text()); + + $client->request('GET', '/'.$locale.'/logout'); + $this->assertRedirect($client->getResponse(), '/'.$locale.'/'); + $this->assertEquals('Homepage', $client->followRedirect()->text()); + } + + /** + * @dataProvider getLocales + */ + public function testLoginFailureWithLocalizedFailurePath($locale) + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => 'localized_form_failure_handler.yml')); + + $crawler = $client->request('GET', '/'.$locale.'/login'); + $form = $crawler->selectButton('login')->form(); + $form['_username'] = 'johannes'; + $form['_password'] = 'foobar'; + $client->submit($form); + + $this->assertRedirect($client->getResponse(), '/'.$locale.'/login'); + } + + /** + * @dataProvider getLocales + */ + public function testAccessRestrictedResource($locale) + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => 'localized_routes.yml')); + + $client->request('GET', '/'.$locale.'/secure/'); + $this->assertRedirect($client->getResponse(), '/'.$locale.'/login'); + } + + /** + * @dataProvider getLocales + */ + public function testAccessRestrictedResourceWithForward($locale) + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => 'localized_routes_with_forward.yml')); + + $crawler = $client->request('GET', '/'.$locale.'/secure/'); + $this->assertCount(1, $crawler->selectButton('login'), (string) $client->getResponse()); + } + + public function getLocales() + { + return array(array('en'), array('de')); + } + + public static function setUpBeforeClass() + { + parent::deleteTmpDir('StandardFormLogin'); + } + + public static function tearDownAfterClass() + { + parent::deleteTmpDir('StandardFormLogin'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c7db437819a1cced3209865507a087f75b16e147 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional; + +class SecurityRoutingIntegrationTest extends WebTestCase +{ + /** + * @dataProvider getConfigs + */ + public function testRoutingErrorIsNotExposedForProtectedResourceWhenAnonymous($config) + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config)); + $client->request('GET', '/protected_resource'); + + $this->assertRedirect($client->getResponse(), '/login'); + } + + /** + * @dataProvider getConfigs + */ + public function testRoutingErrorIsExposedWhenNotProtected($config) + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config)); + $client->request('GET', '/unprotected_resource'); + + $this->assertEquals(404, $client->getResponse()->getStatusCode(), (string) $client->getResponse()); + } + + /** + * @dataProvider getConfigs + */ + public function testRoutingErrorIsNotExposedForProtectedResourceWhenLoggedInWithInsufficientRights($config) + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config)); + + $form = $client->request('GET', '/login')->selectButton('login')->form(); + $form['_username'] = 'johannes'; + $form['_password'] = 'test'; + $client->submit($form); + + $client->request('GET', '/highly_protected_resource'); + + $this->assertNotEquals(404, $client->getResponse()->getStatusCode()); + } + + /** + * @dataProvider getConfigs + */ + public function testSecurityConfigurationForSingleIPAddress($config) + { + $allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('REMOTE_ADDR' => '10.10.10.10')); + $barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('REMOTE_ADDR' => '10.10.20.10')); + + $this->assertAllowed($allowedClient, '/secured-by-one-ip'); + $this->assertRestricted($barredClient, '/secured-by-one-ip'); + } + + /** + * @dataProvider getConfigs + */ + public function testSecurityConfigurationForMultipleIPAddresses($config) + { + $allowedClientA = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('REMOTE_ADDR' => '1.1.1.1')); + $allowedClientB = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('REMOTE_ADDR' => '2.2.2.2')); + $barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('REMOTE_ADDR' => '192.168.1.1')); + + $this->assertAllowed($allowedClientA, '/secured-by-two-ips'); + $this->assertAllowed($allowedClientB, '/secured-by-two-ips'); + $this->assertRestricted($barredClient, '/secured-by-two-ips'); + } + + /** + * @dataProvider getConfigs + */ + public function testSecurityConfigurationForExpression($config) + { + $allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('HTTP_USER_AGENT' => 'Firefox 1.0')); + $this->assertAllowed($allowedClient, '/protected-via-expression'); + + $barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array()); + $this->assertRestricted($barredClient, '/protected-via-expression'); + + $allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array()); + + $allowedClient->request('GET', '/protected-via-expression'); + $form = $allowedClient->followRedirect()->selectButton('login')->form(); + $form['_username'] = 'johannes'; + $form['_password'] = 'test'; + $allowedClient->submit($form); + $this->assertRedirect($allowedClient->getResponse(), '/protected-via-expression'); + $this->assertAllowed($allowedClient, '/protected-via-expression'); + } + + private function assertAllowed($client, $path) + { + $client->request('GET', $path); + $this->assertEquals(404, $client->getResponse()->getStatusCode()); + } + + private function assertRestricted($client, $path) + { + $client->request('GET', $path); + $this->assertEquals(302, $client->getResponse()->getStatusCode()); + } + + public function getConfigs() + { + return array(array('config.yml'), array('routes_as_path.yml')); + } + + public static function setUpBeforeClass() + { + parent::deleteTmpDir('StandardFormLogin'); + } + + public static function tearDownAfterClass() + { + parent::deleteTmpDir('StandardFormLogin'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..db4c51c5f064dea921a445c2d573eddbb042f58f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php @@ -0,0 +1,192 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional; + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +use Symfony\Bundle\FrameworkBundle\Console\Application; +use Symfony\Bundle\SecurityBundle\Command\InitAclCommand; +use Symfony\Bundle\SecurityBundle\Command\SetAclCommand; +use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Component\Security\Acl\Domain\ObjectIdentity; +use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity; +use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; +use Symfony\Component\Security\Acl\Exception\NoAceFoundException; +use Symfony\Component\Security\Acl\Permission\BasicPermissionMap; + +/** + * Tests SetAclCommand. + * + * @author Kévin Dunglas + * @requires extension pdo_sqlite + */ +class SetAclCommandTest extends WebTestCase +{ + const OBJECT_CLASS = 'Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity\Car'; + const SECURITY_CLASS = 'Symfony\Component\Security\Core\User\User'; + + protected function setUp() + { + parent::setUp(); + + $this->deleteTmpDir('Acl'); + } + + protected function tearDown() + { + parent::tearDown(); + + $this->deleteTmpDir('Acl'); + } + + public function testSetAclUser() + { + $objectId = 1; + $securityUsername1 = 'kevin'; + $securityUsername2 = 'anne'; + $grantedPermission1 = 'VIEW'; + $grantedPermission2 = 'EDIT'; + + $application = $this->getApplication(); + $application->add(new SetAclCommand()); + + $setAclCommand = $application->find('acl:set'); + $setAclCommandTester = new CommandTester($setAclCommand); + $setAclCommandTester->execute(array( + 'command' => 'acl:set', + 'arguments' => array($grantedPermission1, $grantedPermission2, sprintf('%s:%s', self::OBJECT_CLASS, $objectId)), + '--user' => array(sprintf('%s:%s', self::SECURITY_CLASS, $securityUsername1), sprintf('%s:%s', self::SECURITY_CLASS, $securityUsername2)), + )); + + $objectIdentity = new ObjectIdentity($objectId, self::OBJECT_CLASS); + $securityIdentity1 = new UserSecurityIdentity($securityUsername1, self::SECURITY_CLASS); + $securityIdentity2 = new UserSecurityIdentity($securityUsername2, self::SECURITY_CLASS); + $permissionMap = new BasicPermissionMap(); + + /** @var \Symfony\Component\Security\Acl\Model\AclProviderInterface $aclProvider */ + $aclProvider = $application->getKernel()->getContainer()->get('security.acl.provider'); + $acl = $aclProvider->findAcl($objectIdentity, array($securityIdentity1)); + + $this->assertTrue($acl->isGranted($permissionMap->getMasks($grantedPermission1, null), array($securityIdentity1))); + $this->assertTrue($acl->isGranted($permissionMap->getMasks($grantedPermission1, null), array($securityIdentity2))); + $this->assertTrue($acl->isGranted($permissionMap->getMasks($grantedPermission2, null), array($securityIdentity2))); + + try { + $acl->isGranted($permissionMap->getMasks('OWNER', null), array($securityIdentity1)); + $this->fail('NoAceFoundException not throwed'); + } catch (NoAceFoundException $e) { + } + + try { + $acl->isGranted($permissionMap->getMasks('OPERATOR', null), array($securityIdentity2)); + $this->fail('NoAceFoundException not throwed'); + } catch (NoAceFoundException $e) { + } + } + + public function testSetAclRole() + { + $objectId = 1; + $securityUsername = 'kevin'; + $grantedPermission = 'VIEW'; + $role = 'ROLE_ADMIN'; + + $application = $this->getApplication(); + $application->add(new SetAclCommand()); + + $setAclCommand = $application->find('acl:set'); + $setAclCommandTester = new CommandTester($setAclCommand); + $setAclCommandTester->execute(array( + 'command' => 'acl:set', + 'arguments' => array($grantedPermission, sprintf('%s:%s', str_replace('\\', '/', self::OBJECT_CLASS), $objectId)), + '--role' => array($role), + )); + + $objectIdentity = new ObjectIdentity($objectId, self::OBJECT_CLASS); + $userSecurityIdentity = new UserSecurityIdentity($securityUsername, self::SECURITY_CLASS); + $roleSecurityIdentity = new RoleSecurityIdentity($role); + $permissionMap = new BasicPermissionMap(); + + /** @var \Symfony\Component\Security\Acl\Model\AclProviderInterface $aclProvider */ + $aclProvider = $application->getKernel()->getContainer()->get('security.acl.provider'); + $acl = $aclProvider->findAcl($objectIdentity, array($roleSecurityIdentity, $userSecurityIdentity)); + + $this->assertTrue($acl->isGranted($permissionMap->getMasks($grantedPermission, null), array($roleSecurityIdentity))); + $this->assertTrue($acl->isGranted($permissionMap->getMasks($grantedPermission, null), array($roleSecurityIdentity))); + + try { + $acl->isGranted($permissionMap->getMasks('VIEW', null), array($userSecurityIdentity)); + $this->fail('NoAceFoundException not throwed'); + } catch (NoAceFoundException $e) { + } + + try { + $acl->isGranted($permissionMap->getMasks('OPERATOR', null), array($userSecurityIdentity)); + $this->fail('NoAceFoundException not throwed'); + } catch (NoAceFoundException $e) { + } + } + + public function testSetAclClassScope() + { + $objectId = 1; + $grantedPermission = 'VIEW'; + $role = 'ROLE_USER'; + + $application = $this->getApplication(); + $application->add(new SetAclCommand()); + + $setAclCommand = $application->find('acl:set'); + $setAclCommandTester = new CommandTester($setAclCommand); + $setAclCommandTester->execute(array( + 'command' => 'acl:set', + 'arguments' => array($grantedPermission, sprintf('%s:%s', self::OBJECT_CLASS, $objectId)), + '--class-scope' => true, + '--role' => array($role), + )); + + $objectIdentity1 = new ObjectIdentity($objectId, self::OBJECT_CLASS); + $objectIdentity2 = new ObjectIdentity(2, self::OBJECT_CLASS); + $roleSecurityIdentity = new RoleSecurityIdentity($role); + $permissionMap = new BasicPermissionMap(); + + /** @var \Symfony\Component\Security\Acl\Model\AclProviderInterface $aclProvider */ + $aclProvider = $application->getKernel()->getContainer()->get('security.acl.provider'); + + $acl1 = $aclProvider->findAcl($objectIdentity1, array($roleSecurityIdentity)); + $this->assertTrue($acl1->isGranted($permissionMap->getMasks($grantedPermission, null), array($roleSecurityIdentity))); + + $acl2 = $aclProvider->createAcl($objectIdentity2); + $this->assertTrue($acl2->isGranted($permissionMap->getMasks($grantedPermission, null), array($roleSecurityIdentity))); + } + + private function getApplication() + { + $kernel = $this->createKernel(array('test_case' => 'Acl')); + $kernel->boot(); + + $application = new Application($kernel); + $application->add(new InitAclCommand()); + + $initAclCommand = $application->find('init:acl'); + $initAclCommandTester = new CommandTester($initAclCommand); + $initAclCommandTester->execute(array('command' => 'init:acl')); + + return $application; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e5079c3283aacdead7c6ce375c341cee5df6da93 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional; + +class SwitchUserTest extends WebTestCase +{ + /** + * @dataProvider getTestParameters + */ + public function testSwitchUser($originalUser, $targetUser, $expectedUser, $expectedStatus) + { + $client = $this->createAuthenticatedClient($originalUser); + + $client->request('GET', '/profile?_switch_user='.$targetUser); + + $this->assertEquals($expectedStatus, $client->getResponse()->getStatusCode()); + $this->assertEquals($expectedUser, $client->getProfile()->getCollector('security')->getUser()); + } + + public function testSwitchedUserCannotSwitchToOther() + { + $client = $this->createAuthenticatedClient('user_can_switch'); + + $client->request('GET', '/profile?_switch_user=user_cannot_switch_1'); + $client->request('GET', '/profile?_switch_user=user_cannot_switch_2'); + + $this->assertEquals(500, $client->getResponse()->getStatusCode()); + $this->assertEquals('user_cannot_switch_1', $client->getProfile()->getCollector('security')->getUser()); + } + + public function testSwitchedUserExit() + { + $client = $this->createAuthenticatedClient('user_can_switch'); + + $client->request('GET', '/profile?_switch_user=user_cannot_switch_1'); + $client->request('GET', '/profile?_switch_user=_exit'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + $this->assertEquals('user_can_switch', $client->getProfile()->getCollector('security')->getUser()); + } + + public function getTestParameters() + { + return array( + 'unauthorized_user_cannot_switch' => array('user_cannot_switch_1', 'user_cannot_switch_1', 'user_cannot_switch_1', 403), + 'authorized_user_can_switch' => array('user_can_switch', 'user_cannot_switch_1', 'user_cannot_switch_1', 200), + 'authorized_user_cannot_switch_to_non_existent' => array('user_can_switch', 'user_does_not_exist', 'user_can_switch', 500), + 'authorized_user_can_switch_to_himself' => array('user_can_switch', 'user_can_switch', 'user_can_switch', 200), + ); + } + + protected function createAuthenticatedClient($username) + { + $client = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => 'switchuser.yml')); + $client->followRedirects(true); + + $form = $client->request('GET', '/login')->selectButton('login')->form(); + $form['_username'] = $username; + $form['_password'] = 'test'; + $client->submit($form); + + return $client; + } + + public static function setUpBeforeClass() + { + parent::deleteTmpDir('StandardFormLogin'); + } + + public static function tearDownAfterClass() + { + parent::deleteTmpDir('StandardFormLogin'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..894c87066f26f3a65bc9b45e6523cfe5fb85119e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php @@ -0,0 +1,164 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional; + +use Symfony\Bundle\FrameworkBundle\Console\Application; +use Symfony\Bundle\SecurityBundle\Command\UserPasswordEncoderCommand; +use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder; +use Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder; + +/** + * Tests UserPasswordEncoderCommand. + * + * @author Sarah Khalil + */ +class UserPasswordEncoderCommandTest extends WebTestCase +{ + private $passwordEncoderCommandTester; + + public function testEncodePasswordEmptySalt() + { + $this->passwordEncoderCommandTester->execute(array( + 'command' => 'security:encode-password', + 'password' => 'password', + 'user-class' => 'Symfony\Component\Security\Core\User\User', + '--empty-salt' => true, + ), array('decorated' => false)); + $expected = str_replace("\n", PHP_EOL, file_get_contents(__DIR__.'/app/PasswordEncode/emptysalt.txt')); + + $this->assertEquals($expected, $this->passwordEncoderCommandTester->getDisplay()); + } + + public function testEncodeNoPasswordNoInteraction() + { + $statusCode = $this->passwordEncoderCommandTester->execute(array( + 'command' => 'security:encode-password', + ), array('interactive' => false)); + + $this->assertContains('[ERROR] The password must not be empty.', $this->passwordEncoderCommandTester->getDisplay()); + $this->assertEquals($statusCode, 1); + } + + public function testEncodePasswordBcrypt() + { + $this->passwordEncoderCommandTester->execute(array( + 'command' => 'security:encode-password', + 'password' => 'password', + 'user-class' => 'Custom\Class\Bcrypt\User', + ), array('interactive' => false)); + + $output = $this->passwordEncoderCommandTester->getDisplay(); + $this->assertContains('Password encoding succeeded', $output); + + $encoder = new BCryptPasswordEncoder(17); + preg_match('# Encoded password\s{1,}([\w+\/$.]+={0,2})\s+#', $output, $matches); + $hash = $matches[1]; + $this->assertTrue($encoder->isPasswordValid($hash, 'password', null)); + } + + public function testEncodePasswordPbkdf2() + { + $this->passwordEncoderCommandTester->execute(array( + 'command' => 'security:encode-password', + 'password' => 'password', + 'user-class' => 'Custom\Class\Pbkdf2\User', + ), array('interactive' => false)); + + $output = $this->passwordEncoderCommandTester->getDisplay(); + $this->assertContains('Password encoding succeeded', $output); + + $encoder = new Pbkdf2PasswordEncoder('sha512', true, 1000); + preg_match('# Encoded password\s{1,}([\w+\/]+={0,2})\s+#', $output, $matches); + $hash = $matches[1]; + preg_match('# Generated salt\s{1,}([\w+\/]+={0,2})\s+#', $output, $matches); + $salt = $matches[1]; + $this->assertTrue($encoder->isPasswordValid($hash, 'password', $salt)); + } + + public function testEncodePasswordOutput() + { + $this->passwordEncoderCommandTester->execute( + array( + 'command' => 'security:encode-password', + 'password' => 'p@ssw0rd', + ), array('interactive' => false) + ); + + $this->assertContains('Password encoding succeeded', $this->passwordEncoderCommandTester->getDisplay()); + $this->assertContains(' Encoded password p@ssw0rd', $this->passwordEncoderCommandTester->getDisplay()); + $this->assertContains(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay()); + } + + public function testEncodePasswordEmptySaltOutput() + { + $this->passwordEncoderCommandTester->execute( + array( + 'command' => 'security:encode-password', + 'password' => 'p@ssw0rd', + '--empty-salt' => true, + ) + ); + + $this->assertContains('Password encoding succeeded', $this->passwordEncoderCommandTester->getDisplay()); + $this->assertContains(' Encoded password p@ssw0rd', $this->passwordEncoderCommandTester->getDisplay()); + $this->assertNotContains(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay()); + } + + public function testEncodePasswordBcryptOutput() + { + $this->passwordEncoderCommandTester->execute( + array( + 'command' => 'security:encode-password', + 'password' => 'p@ssw0rd', + 'user-class' => 'Custom\Class\Bcrypt\User', + ) + ); + + $this->assertNotContains(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay()); + } + + public function testEncodePasswordNoConfigForGivenUserClass() + { + if (method_exists($this, 'expectException')) { + $this->expectException('\RuntimeException'); + $this->expectExceptionMessage('No encoder has been configured for account "Foo\Bar\User".'); + } else { + $this->setExpectedException('\RuntimeException', 'No encoder has been configured for account "Foo\Bar\User".'); + } + + $this->passwordEncoderCommandTester->execute(array( + 'command' => 'security:encode-password', + 'password' => 'password', + 'user-class' => 'Foo\Bar\User', + ), array('interactive' => false)); + } + + protected function setUp() + { + putenv('COLUMNS='.(119 + strlen(PHP_EOL))); + $kernel = $this->createKernel(array('test_case' => 'PasswordEncode')); + $kernel->boot(); + + $application = new Application($kernel); + + $application->add(new UserPasswordEncoderCommand()); + $passwordEncoderCommand = $application->find('security:encode-password'); + + $this->passwordEncoderCommandTester = new CommandTester($passwordEncoderCommand); + } + + protected function tearDown() + { + $this->passwordEncoderCommandTester = null; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..da07116ae0665d00d692b0469e75f2f9ba05bddb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.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\Bundle\SecurityBundle\Tests\Functional; + +use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpKernel\Kernel; + +class WebTestCase extends BaseWebTestCase +{ + public static function assertRedirect($response, $location) + { + self::assertTrue($response->isRedirect(), 'Response is not a redirect, got status code: '.substr($response, 0, 2000)); + self::assertEquals('http://localhost'.$location, $response->headers->get('Location')); + } + + protected static function deleteTmpDir($testCase) + { + if (defined('HHVM_VERSION_ID') || !file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$testCase)) { + return; + } + + $fs = new Filesystem(); + $fs->remove($dir); + } + + protected static function getKernelClass() + { + require_once __DIR__.'/app/AppKernel.php'; + + return 'Symfony\Bundle\SecurityBundle\Tests\Functional\app\AppKernel'; + } + + protected static function createKernel(array $options = array()) + { + $class = self::getKernelClass(); + + if (!isset($options['test_case'])) { + throw new \InvalidArgumentException('The option "test_case" must be set.'); + } + + return new $class( + $options['test_case'], + isset($options['root_config']) ? $options['root_config'] : 'config.yml', + isset($options['environment']) ? $options['environment'] : 'securitybundletest'.strtolower($options['test_case']), + isset($options['debug']) ? $options['debug'] : true + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..51337913d537084a79e9c48068455846e3f19500 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/bundles.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), + new Symfony\Bundle\SecurityBundle\SecurityBundle(), + new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), + new Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\AclBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..33eadbc7cdf036c15b36a23e94901c29702580fd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/config.yml @@ -0,0 +1,24 @@ +imports: + - { resource: ./../config/framework.yml } + +doctrine: + dbal: + driver: pdo_sqlite + memory: true + charset: UTF8 + +security: + firewalls: + test: + pattern: ^/ + security: false + acl: + connection: default + encoders: + Symfony\Component\Security\Core\User\User: plaintext + providers: + in_memory: + memory: + users: + kevin: { password: test, roles: [ROLE_USER] } + anne: { password: test, roles: [ROLE_ADMIN]} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php new file mode 100644 index 0000000000000000000000000000000000000000..b828c5acfd91be2db50c425428e1ecb5432bde84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Functional\app; + +// get the autoload file +$dir = __DIR__; +$lastDir = null; +while ($dir !== $lastDir) { + $lastDir = $dir; + + if (is_file($dir.'/autoload.php')) { + require_once $dir.'/autoload.php'; + break; + } + + if (is_file($dir.'/autoload.php.dist')) { + require_once $dir.'/autoload.php.dist'; + break; + } + + if (file_exists($dir.'/vendor/autoload.php')) { + require_once $dir.'/vendor/autoload.php'; + break; + } + + $dir = dirname($dir); +} + +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpKernel\Kernel; + +/** + * App Test Kernel for functional tests. + * + * @author Johannes M. Schmitt + */ +class AppKernel extends Kernel +{ + private $testCase; + private $rootConfig; + + public function __construct($testCase, $rootConfig, $environment, $debug) + { + if (!is_dir(__DIR__.'/'.$testCase)) { + throw new \InvalidArgumentException(sprintf('The test case "%s" does not exist.', $testCase)); + } + $this->testCase = $testCase; + + $fs = new Filesystem(); + if (!$fs->isAbsolutePath($rootConfig) && !is_file($rootConfig = __DIR__.'/'.$testCase.'/'.$rootConfig)) { + throw new \InvalidArgumentException(sprintf('The root config "%s" does not exist.', $rootConfig)); + } + $this->rootConfig = $rootConfig; + + parent::__construct($environment, $debug); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + if (null === $this->name) { + $this->name = parent::getName().md5($this->rootConfig); + } + + return $this->name; + } + + public function registerBundles() + { + if (!is_file($filename = $this->getRootDir().'/'.$this->testCase.'/bundles.php')) { + throw new \RuntimeException(sprintf('The bundles file "%s" does not exist.', $filename)); + } + + return include $filename; + } + + public function getRootDir() + { + return __DIR__; + } + + public function getCacheDir() + { + return sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$this->testCase.'/cache/'.$this->environment; + } + + public function getLogDir() + { + return sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$this->testCase.'/logs'; + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + $loader->load($this->rootConfig); + } + + public function serialize() + { + return serialize(array($this->testCase, $this->rootConfig, $this->getEnvironment(), $this->isDebug())); + } + + public function unserialize($str) + { + $a = unserialize($str); + $this->__construct($a[0], $a[1], $a[2], $a[3]); + } + + protected function getKernelParameters() + { + $parameters = parent::getKernelParameters(); + $parameters['kernel.test_case'] = $this->testCase; + + return $parameters; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..c16ab12f65850c3036f7b8e75f9486188b8d636c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/bundles.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), + new Symfony\Bundle\SecurityBundle\SecurityBundle(), + new Symfony\Bundle\TwigBundle\TwigBundle(), + new Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\CsrfFormLoginBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..5a00ac329895d07e0f9e3ce345786aecc7134659 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/config.yml @@ -0,0 +1,47 @@ +imports: + - { resource: ./../config/default.yml } + +services: + csrf_form_login.form.type: + class: Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form\UserLoginType + arguments: + - '@request_stack' + tags: + - { name: form.type } + +security: + encoders: + Symfony\Component\Security\Core\User\User: plaintext + + providers: + in_memory: + memory: + users: + johannes: { password: test, roles: [ROLE_USER] } + + firewalls: + # This firewall doesn't make sense in combination with the rest of the + # configuration file, but it's here for testing purposes (do not use + # this file in a real world scenario though) + login_form: + pattern: ^/login$ + security: false + + default: + form_login: + check_path: /login_check + default_target_path: /profile + target_path_parameter: "user_login[_target_path]" + failure_path_parameter: "user_login[_failure_path]" + username_parameter: "user_login[username]" + password_parameter: "user_login[password]" + csrf_parameter: "user_login[_token]" + csrf_token_generator: security.csrf.token_manager + anonymous: ~ + logout: + path: /logout_path + target: / + csrf_token_generator: security.csrf.token_manager + + access_control: + - { path: .*, roles: IS_AUTHENTICATED_FULLY } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/routes_as_path.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/routes_as_path.yml new file mode 100644 index 0000000000000000000000000000000000000000..d481e6d2b7150f191e9b2458844ed7335f5ea751 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/routes_as_path.yml @@ -0,0 +1,13 @@ +imports: + - { resource: ./config.yml } + +security: + firewalls: + default: + form_login: + login_path: form_login + check_path: form_login_check + default_target_path: form_login_default_target_path + logout: + path: form_logout + target: form_login_homepage diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/routing.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..ecfae00918dbd4cd9ee2d2e3de0e2f529abe246e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/routing.yml @@ -0,0 +1,2 @@ +_csrf_form_login_bundle: + resource: '@CsrfFormLoginBundle/Resources/config/routing.yml' diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..412e1c5d09e1d0e4735b6f3573828f6e3c896c59 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/bundles.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), + new Symfony\Bundle\SecurityBundle\SecurityBundle(), + new Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FirewallEntryPointBundle\FirewallEntryPointBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..955c41192e26dac404e7fa36ece105b838171e50 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/config.yml @@ -0,0 +1,32 @@ +framework: + secret: test + router: { resource: "%kernel.root_dir%/%kernel.test_case%/routing.yml" } + validation: { enabled: true, enable_annotations: true } + csrf_protection: true + form: true + test: ~ + default_locale: en + session: + storage_id: session.storage.mock_file + profiler: { only_exceptions: false } + +services: + logger: { class: Psr\Log\NullLogger } + +security: + firewalls: + secure: + pattern: ^/secure/ + http_basic: { realm: "Secure Gateway API" } + entry_point: firewall_entry_point.entry_point.stub + default: + anonymous: ~ + access_control: + - { path: ^/secure/, roles: ROLE_SECURE } + providers: + in_memory: + memory: + users: + john: { password: doe, roles: [ROLE_SECURE] } + encoders: + Symfony\Component\Security\Core\User\User: plaintext diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/config_form_login.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/config_form_login.yml new file mode 100644 index 0000000000000000000000000000000000000000..8763b08110b4e38136aa56d0e0764b6143c1082b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/config_form_login.yml @@ -0,0 +1,9 @@ +imports: + - { resource: ./config.yml } + +security: + firewalls: + secure: + pattern: ^/ + form_login: + check_path: /login_check diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/routing.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..f3ff91286fecff56d24853a582d392f5e93f8b6a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/routing.yml @@ -0,0 +1,2 @@ +secure_resource: + path: /secure/resource diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..2e9243712c8d6fed42d7e86725adc1efb0ffaad9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/bundles.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + new Symfony\Bundle\SecurityBundle\SecurityBundle(), + new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..82416b095748e72672ae4ab2a184d7f06accd2da --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/config.yml @@ -0,0 +1,27 @@ +imports: + - { resource: ./../config/framework.yml } + +security: + encoders: + Symfony\Component\Security\Core\User\User: plaintext + Custom\Class\Bcrypt\User: + algorithm: bcrypt + cost: 10 + Custom\Class\Pbkdf2\User: + algorithm: pbkdf2 + hash_algorithm: sha512 + encode_as_base64: true + iterations: 1000 + Custom\Class\Test\User: test + + providers: + in_memory: + memory: + users: + user: { password: userpass, roles: [ 'ROLE_USER' ] } + admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] } + + firewalls: + test: + pattern: ^/ + security: false diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/emptysalt.txt b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/emptysalt.txt new file mode 100644 index 0000000000000000000000000000000000000000..9c8d3deb1b4628718a9a8fdb5781d5dcef4bf24a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/emptysalt.txt @@ -0,0 +1,13 @@ + +Symfony Password Encoder Utility +================================ + + ------------------ ------------------------------------------------------------------ + Key Value + ------------------ ------------------------------------------------------------------ + Encoder used Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder + Encoded password password + ------------------ ------------------------------------------------------------------ + + [OK] Password encoding succeeded + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Resources/views/base.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Resources/views/base.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..caf6f6efb6db1c7542871655d74e8ed112da79b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Resources/views/base.html.twig @@ -0,0 +1,12 @@ + + + + + {% block title %}Welcome!{% endblock %} + {% block stylesheets %}{% endblock %} + + + {% block body %}{% endblock %} + {% block javascripts %}{% endblock %} + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/bundles.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/bundles.php new file mode 100644 index 0000000000000000000000000000000000000000..d53ff3e7eb5d8dcad26e9f6e6d1535ae0b1192e3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/bundles.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\FormLoginBundle; +use Symfony\Bundle\TwigBundle\TwigBundle; +use Symfony\Bundle\SecurityBundle\SecurityBundle; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; + +return array( + new FrameworkBundle(), + new SecurityBundle(), + new TwigBundle(), + new FormLoginBundle(), +); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/config.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..19b9d8952ec5e165231d07b1845cd5a477418c41 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/config.yml @@ -0,0 +1,44 @@ +imports: + - { resource: ./../config/default.yml } + +security: + encoders: + Symfony\Component\Security\Core\User\User: plaintext + + providers: + in_memory: + memory: + users: + johannes: { password: test, roles: [ROLE_USER] } + + firewalls: + # This firewall doesn't make sense in combination with the rest of the + # configuration file, but it's here for testing purposes (do not use + # this file in a real world scenario though) + login_form: + pattern: ^/login$ + security: false + + default: + form_login: + check_path: /login_check + default_target_path: /profile + logout: ~ + anonymous: ~ + + # This firewall is here just to check its the logout functionality + second_area: + http_basic: ~ + anonymous: ~ + logout: + target: /second/target + path: /second/logout + + access_control: + - { path: ^/unprotected_resource$, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/secure-but-not-covered-by-access-control$, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/secured-by-one-ip$, ip: 10.10.10.10, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/secured-by-two-ips$, ips: [1.1.1.1, 2.2.2.2], roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/highly_protected_resource$, roles: IS_ADMIN } + - { path: ^/protected-via-expression$, allow_if: "(is_anonymous() and request.headers.get('user-agent') matches '/Firefox/i') or has_role('ROLE_USER')" } + - { path: .*, roles: IS_AUTHENTICATED_FULLY } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/localized_form_failure_handler.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/localized_form_failure_handler.yml new file mode 100644 index 0000000000000000000000000000000000000000..e01ed369b1f5601ec762528f26892650dbe50068 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/localized_form_failure_handler.yml @@ -0,0 +1,20 @@ +imports: + - { resource: ./../config/default.yml } + +security: + encoders: + Symfony\Component\Security\Core\User\User: plaintext + + providers: + in_memory: + memory: + users: + johannes: { password: test, roles: [ROLE_USER] } + + firewalls: + default: + form_login: + login_path: localized_login_path + check_path: localized_check_path + failure_handler: localized_form_failure_handler + anonymous: ~ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/localized_routes.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/localized_routes.yml new file mode 100644 index 0000000000000000000000000000000000000000..5251fd1d93de16e25d0c4e150956125aa4a2834c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/localized_routes.yml @@ -0,0 +1,26 @@ +imports: + - { resource: ./../config/default.yml } + +security: + encoders: + Symfony\Component\Security\Core\User\User: plaintext + + providers: + in_memory: + memory: + users: + johannes: { password: test, roles: [ROLE_USER] } + + firewalls: + default: + form_login: + login_path: localized_login_path + check_path: localized_check_path + default_target_path: localized_default_target_path + logout: + path: localized_logout_path + target: localized_logout_target_path + anonymous: ~ + + access_control: + - { path: '^/(?:[a-z]{2})/secure/.*', roles: ROLE_USER } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/localized_routes_with_forward.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/localized_routes_with_forward.yml new file mode 100644 index 0000000000000000000000000000000000000000..12d90d8835858ab92d89c9142fda332b6f8fac2b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/localized_routes_with_forward.yml @@ -0,0 +1,9 @@ +imports: + - { resource: ./localized_routes.yml } + +security: + firewalls: + default: + form_login: + use_forward: true + failure_forward: true diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/routes_as_path.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/routes_as_path.yml new file mode 100644 index 0000000000000000000000000000000000000000..d481e6d2b7150f191e9b2458844ed7335f5ea751 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/routes_as_path.yml @@ -0,0 +1,13 @@ +imports: + - { resource: ./config.yml } + +security: + firewalls: + default: + form_login: + login_path: form_login + check_path: form_login_check + default_target_path: form_login_default_target_path + logout: + path: form_logout + target: form_login_homepage diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/routing.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..0920ea1d70129979116174f6f975fda5f3a666e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/routing.yml @@ -0,0 +1,5 @@ +_form_login_bundle: + resource: '@FormLoginBundle/Resources/config/routing.yml' + +_form_login_localized: + resource: '@FormLoginBundle/Resources/config/localized_routing.yml' diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/switchuser.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/switchuser.yml new file mode 100644 index 0000000000000000000000000000000000000000..2f144aae9fd80fbee21aa56cf1bdc7fb292df83b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/switchuser.yml @@ -0,0 +1,14 @@ +imports: + - { resource: ./config.yml } + +security: + providers: + in_memory: + memory: + users: + user_can_switch: { password: test, roles: [ROLE_USER, ROLE_ALLOWED_TO_SWITCH] } + user_cannot_switch_1: { password: test, roles: [ROLE_USER] } + user_cannot_switch_2: { password: test, roles: [ROLE_USER] } + firewalls: + default: + switch_user: true diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/default.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/default.yml new file mode 100644 index 0000000000000000000000000000000000000000..7a0717fefceee33e702eb31c30fc2d1be69c4811 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/default.yml @@ -0,0 +1,3 @@ +imports: + - { resource: framework.yml } + - { resource: twig.yml } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/framework.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/framework.yml new file mode 100644 index 0000000000000000000000000000000000000000..2fa2338339019c1efbe2bf3f31dd749e04fc68d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/framework.yml @@ -0,0 +1,15 @@ +framework: + secret: test + router: { resource: "%kernel.root_dir%/%kernel.test_case%/routing.yml" } + validation: { enabled: true, enable_annotations: true } + assets: ~ + csrf_protection: true + form: true + test: ~ + default_locale: en + session: + storage_id: session.storage.mock_file + profiler: { only_exceptions: false } + +services: + logger: { class: Psr\Log\NullLogger } diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/twig.yml b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/twig.yml new file mode 100644 index 0000000000000000000000000000000000000000..61c1a54d99ba53c1a84a457595a98a17a1faad36 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/twig.yml @@ -0,0 +1,7 @@ +framework: + templating: { engines: ['twig'] } + +# Twig Configuration +twig: + debug: '%kernel.debug%' + strict_variables: '%kernel.debug%' diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallConfigTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallConfigTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a0b4a79c50cdc40f76cab81a245605ab391f6116 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallConfigTest.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests\Security; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\SecurityBundle\Security\FirewallConfig; + +class FirewallConfigTest extends TestCase +{ + public function testGetters() + { + $listeners = array('logout', 'remember_me', 'anonymous'); + $options = array( + 'request_matcher' => 'foo_request_matcher', + 'security' => false, + 'stateless' => false, + 'provider' => 'foo_provider', + 'context' => 'foo_context', + 'entry_point' => 'foo_entry_point', + 'access_denied_url' => 'foo_access_denied_url', + 'access_denied_handler' => 'foo_access_denied_handler', + 'user_checker' => 'foo_user_checker', + ); + + $config = new FirewallConfig( + 'foo_firewall', + $options['user_checker'], + $options['request_matcher'], + $options['security'], + $options['stateless'], + $options['provider'], + $options['context'], + $options['entry_point'], + $options['access_denied_handler'], + $options['access_denied_url'], + $listeners + ); + + $this->assertSame('foo_firewall', $config->getName()); + $this->assertSame($options['request_matcher'], $config->getRequestMatcher()); + $this->assertSame($options['security'], $config->isSecurityEnabled()); + $this->assertSame($options['stateless'], $config->isStateless()); + $this->assertSame($options['provider'], $config->getProvider()); + $this->assertSame($options['context'], $config->getContext()); + $this->assertSame($options['entry_point'], $config->getEntryPoint()); + $this->assertSame($options['access_denied_handler'], $config->getAccessDeniedHandler()); + $this->assertSame($options['access_denied_url'], $config->getAccessDeniedUrl()); + $this->assertSame($options['user_checker'], $config->getUserChecker()); + $this->assertTrue($config->allowsAnonymous()); + $this->assertSame($listeners, $config->getListeners()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallContextTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallContextTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0e8366a259770d03592bf5243be9dad8c2b98ec4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallContextTest.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\Bundle\SecurityBundle\Tests\Security; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\SecurityBundle\Security\FirewallConfig; +use Symfony\Bundle\SecurityBundle\Security\FirewallContext; +use Symfony\Component\Security\Http\Firewall\ExceptionListener; +use Symfony\Component\Security\Http\Firewall\ListenerInterface; + +class FirewallContextTest extends TestCase +{ + public function testGetters() + { + $config = new FirewallConfig('main', 'user_checker', 'request_matcher'); + + $exceptionListener = $this + ->getMockBuilder(ExceptionListener::class) + ->disableOriginalConstructor() + ->getMock(); + + $listeners = array( + $this + ->getMockBuilder(ListenerInterface::class) + ->disableOriginalConstructor() + ->getMock(), + ); + + $context = new FirewallContext($listeners, $exceptionListener, $config); + + $this->assertEquals(array($listeners, $exceptionListener), $context->getContext()); + $this->assertEquals($config, $context->getConfig()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/SecurityUserValueResolverTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/SecurityUserValueResolverTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0f9a0fe80b646e9931ea334dfc3ecac83a448fe6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/SecurityUserValueResolverTest.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\SecurityBundle\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\SecurityBundle\SecurityUserValueResolver; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\User\UserInterface; + +class SecurityUserValueResolverTest extends TestCase +{ + public function testResolveNoToken() + { + $tokenStorage = new TokenStorage(); + $resolver = new SecurityUserValueResolver($tokenStorage); + $metadata = new ArgumentMetadata('foo', UserInterface::class, false, false, null); + + $this->assertFalse($resolver->supports(Request::create('/'), $metadata)); + } + + public function testResolveNoUser() + { + $mock = $this->getMockBuilder(UserInterface::class)->getMock(); + $token = $this->getMockBuilder(TokenInterface::class)->getMock(); + $tokenStorage = new TokenStorage(); + $tokenStorage->setToken($token); + + $resolver = new SecurityUserValueResolver($tokenStorage); + $metadata = new ArgumentMetadata('foo', get_class($mock), false, false, null); + + $this->assertFalse($resolver->supports(Request::create('/'), $metadata)); + } + + public function testResolveWrongType() + { + $tokenStorage = new TokenStorage(); + $resolver = new SecurityUserValueResolver($tokenStorage); + $metadata = new ArgumentMetadata('foo', null, false, false, null); + + $this->assertFalse($resolver->supports(Request::create('/'), $metadata)); + } + + public function testResolve() + { + $user = $this->getMockBuilder(UserInterface::class)->getMock(); + $token = $this->getMockBuilder(TokenInterface::class)->getMock(); + $token->expects($this->any())->method('getUser')->willReturn($user); + $tokenStorage = new TokenStorage(); + $tokenStorage->setToken($token); + + $resolver = new SecurityUserValueResolver($tokenStorage); + $metadata = new ArgumentMetadata('foo', UserInterface::class, false, false, null); + + $this->assertTrue($resolver->supports(Request::create('/'), $metadata)); + $this->assertSame(array($user), iterator_to_array($resolver->resolve(Request::create('/'), $metadata))); + } + + public function testIntegration() + { + $user = $this->getMockBuilder(UserInterface::class)->getMock(); + $token = $this->getMockBuilder(TokenInterface::class)->getMock(); + $token->expects($this->any())->method('getUser')->willReturn($user); + $tokenStorage = new TokenStorage(); + $tokenStorage->setToken($token); + + $argumentResolver = new ArgumentResolver(null, array(new SecurityUserValueResolver($tokenStorage))); + $this->assertSame(array($user), $argumentResolver->getArguments(Request::create('/'), function (UserInterface $user) {})); + } + + public function testIntegrationNoUser() + { + $token = $this->getMockBuilder(TokenInterface::class)->getMock(); + $tokenStorage = new TokenStorage(); + $tokenStorage->setToken($token); + + $argumentResolver = new ArgumentResolver(null, array(new SecurityUserValueResolver($tokenStorage), new DefaultValueResolver())); + $this->assertSame(array(null), $argumentResolver->getArguments(Request::create('/'), function (UserInterface $user = null) {})); + } +} + +abstract class DummyUser implements UserInterface +{ +} + +abstract class DummySubUser extends DummyUser +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/composer.json b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..97acacd36bc89ab6edf4174b79c06d6e323e4371 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/composer.json @@ -0,0 +1,61 @@ +{ + "name": "symfony/security-bundle", + "type": "symfony-bundle", + "description": "Symfony SecurityBundle", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/security": "~3.2", + "symfony/http-kernel": "~3.2", + "symfony/polyfill-php70": "~1.0" + }, + "require-dev": { + "symfony/asset": "~2.8|~3.0", + "symfony/browser-kit": "~2.8|~3.0", + "symfony/console": "~2.8|~3.0", + "symfony/css-selector": "~2.8|~3.0", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/form": "^2.8.18|^3.2.5", + "symfony/framework-bundle": "^3.2.5", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/security-acl": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0", + "symfony/twig-bundle": "~2.8|~3.0", + "symfony/twig-bridge": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0", + "symfony/validator": "^2.8.18|^3.2.5", + "symfony/var-dumper": "~3.2", + "symfony/yaml": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "doctrine/doctrine-bundle": "~1.4", + "twig/twig": "~1.28|~2.0" + }, + "suggest": { + "symfony/security-acl": "For using the ACL functionality of this bundle" + }, + "autoload": { + "psr-4": { "Symfony\\Bundle\\SecurityBundle\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..a7fdc326c45710a646d479bc6f98b932cd7ef566 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..90f7cbd1e017877382a035de0ddb1c329ccef0e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/CHANGELOG.md @@ -0,0 +1,36 @@ +CHANGELOG +========= + +2.7.0 +----- + + * made it possible to configure the default formats for both the `date` and the `number_format` filter + * added support for the new Asset component (from Twig bridge) + * deprecated the assets extension (use the one from the Twig bridge instead) + +2.6.0 +----- + + * [BC BREAK] changed exception.json.twig to match same structure as error.json.twig making clients independent of runtime environment. + +2.3.0 +----- + + * added option to configure a custom template escaping guesser (via `autoescape_service` and `autoescape_service_method`) + +2.2.0 +----- + + * moved the exception controller to be a service (`twig.controller.exception:showAction` vs `Symfony\\Bundle\\TwigBundle\\Controller\\ExceptionController::showAction`) + * added support for multiple loaders via the "twig.loader" tag. + * added automatic registration of namespaced paths for registered bundles + * added support for namespaced paths + +2.1.0 +----- + + * added a new setting ("paths") to configure more paths for the Twig filesystem loader + * added contextual escaping based on the template file name (disabled if you explicitly pass an autoescape option) + * added a command that extracts translation messages from templates + * added the real template name when an error occurs in a Twig template + * added the twig:lint command that will validate a Twig template syntax. diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheCacheWarmer.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheCacheWarmer.php new file mode 100644 index 0000000000000000000000000000000000000000..9eea901f6dde4ad34c486fc7bd7b3134c07aad6e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheCacheWarmer.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\Bundle\TwigBundle\CacheWarmer; + +use Symfony\Component\Finder\Finder; +use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterface; +use Symfony\Component\Templating\TemplateReference; + +/** + * Generates the Twig cache for all templates. + * + * This warmer must be registered after TemplatePathsCacheWarmer, + * as the Twig loader will need the cache generated by it. + * + * @author Fabien Potencier + */ +class TemplateCacheCacheWarmer implements CacheWarmerInterface +{ + protected $container; + protected $finder; + private $paths; + + /** + * Constructor. + * + * @param ContainerInterface $container The dependency injection container + * @param TemplateFinderInterface $finder The template paths cache warmer + * @param array $paths Additional twig paths to warm + */ + public function __construct(ContainerInterface $container, TemplateFinderInterface $finder = null, array $paths = array()) + { + // We don't inject the Twig environment directly as it depends on the + // template locator (via the loader) which might be a cached one. + // The cached template locator is available once the TemplatePathsCacheWarmer + // has been warmed up. + // But it can also be null if templating has been disabled. + $this->container = $container; + $this->finder = $finder; + $this->paths = $paths; + } + + /** + * Warms up the cache. + * + * @param string $cacheDir The cache directory + */ + public function warmUp($cacheDir) + { + if (null === $this->finder) { + return; + } + + $twig = $this->container->get('twig'); + + $templates = $this->finder->findAllTemplates(); + + foreach ($this->paths as $path => $namespace) { + $templates = array_merge($templates, $this->findTemplatesInFolder($namespace, $path)); + } + + foreach ($templates as $template) { + if ('twig' !== $template->get('engine')) { + continue; + } + + try { + $twig->loadTemplate($template); + } catch (\Twig_Error $e) { + // problem during compilation, give up + } + } + } + + /** + * Checks whether this warmer is optional or not. + * + * @return bool always true + */ + public function isOptional() + { + return true; + } + + /** + * Find templates in the given directory. + * + * @param string $namespace The namespace for these templates + * @param string $dir The folder where to look for templates + * + * @return array An array of templates of type TemplateReferenceInterface + */ + private function findTemplatesInFolder($namespace, $dir) + { + if (!is_dir($dir)) { + return array(); + } + + $templates = array(); + $finder = new Finder(); + + foreach ($finder->files()->followLinks()->in($dir) as $file) { + $name = $file->getRelativePathname(); + $templates[] = new TemplateReference( + $namespace ? sprintf('@%s/%s', $namespace, $name) : $name, + 'twig' + ); + } + + return $templates; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php new file mode 100644 index 0000000000000000000000000000000000000000..aefb5c7296b976902c4d7cbd02522cfeb2c7b13a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\CacheWarmer; + +use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; + +/** + * Generates the Twig cache for all templates. + * + * @author Fabien Potencier + */ +class TemplateCacheWarmer implements CacheWarmerInterface +{ + private $twig; + private $iterator; + + public function __construct(\Twig_Environment $twig, \Traversable $iterator) + { + $this->twig = $twig; + $this->iterator = $iterator; + } + + /** + * {@inheritdoc} + */ + public function warmUp($cacheDir) + { + foreach ($this->iterator as $template) { + try { + $this->twig->loadTemplate($template); + } catch (\Twig_Error $e) { + // problem during compilation, give up + // might be a syntax error or a non-Twig template + } + } + } + + /** + * {@inheritdoc} + */ + public function isOptional() + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..e2f25cc22ed19e9067712a3d87b3e60e5ccbc197 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Command; + +use Symfony\Bridge\Twig\Command\DebugCommand as BaseDebugCommand; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; + +/** + * Lists twig functions, filters, globals and tests present in the current project. + * + * @author Jordi Boggiano + */ +final class DebugCommand extends BaseDebugCommand implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + /** + * {@inheritdoc} + */ + protected function getTwigEnvironment() + { + return $this->container->get('twig'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..b6cbb6be7a29bc768b53ba5677d0c3420270f615 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Command; + +use Symfony\Bridge\Twig\Command\LintCommand as BaseLintCommand; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\Finder\Finder; + +/** + * Command that will validate your template syntax and output encountered errors. + * + * @author Marc Weistroff + * @author Jérôme Tamarelle + */ +final class LintCommand extends BaseLintCommand implements ContainerAwareInterface +{ + use ContainerAwareTrait; + + /** + * {@inheritdoc} + */ + protected function getTwigEnvironment() + { + return $this->container->get('twig'); + } + + /** + * {@inheritdoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setHelp( + $this->getHelp().<<<'EOF' + +Or all template files in a bundle: + + php %command.full_name% @AcmeDemoBundle + +EOF + ) + ; + } + + protected function findFiles($filename) + { + if (0 === strpos($filename, '@')) { + $dir = $this->getApplication()->getKernel()->locateResource($filename); + + return Finder::create()->files()->in($dir)->name('*.twig'); + } + + return parent::findFiles($filename); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/ContainerAwareRuntimeLoader.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/ContainerAwareRuntimeLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..780454aed986e8a20abb0ae2b13336ef34968e38 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/ContainerAwareRuntimeLoader.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle; + +use Psr\Log\LoggerInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; + +/** + * Loads Twig extension runtimes via the service container. + * + * @author Fabien Potencier + */ +class ContainerAwareRuntimeLoader implements \Twig_RuntimeLoaderInterface +{ + private $container; + private $mapping; + private $logger; + + public function __construct(ContainerInterface $container, array $mapping, LoggerInterface $logger = null) + { + $this->container = $container; + $this->mapping = $mapping; + $this->logger = $logger; + } + + /** + * {@inheritdoc} + */ + public function load($class) + { + if (isset($this->mapping[$class])) { + return $this->container->get($this->mapping[$class]); + } + + if (null !== $this->logger) { + $this->logger->warning(sprintf('Class "%s" is not configured as a Twig runtime. Add the "twig.runtime" tag to the related service in the container.', $class)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php new file mode 100644 index 0000000000000000000000000000000000000000..f9e86c4daa21d6e3e274dd51889778b204fca129 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php @@ -0,0 +1,145 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Controller; + +use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * ExceptionController renders error or exception pages for a given + * FlattenException. + * + * @author Fabien Potencier + * @author Matthias Pigulla + */ +class ExceptionController +{ + protected $twig; + + /** + * @var bool Show error (false) or exception (true) pages by default + */ + protected $debug; + + public function __construct(\Twig_Environment $twig, $debug) + { + $this->twig = $twig; + $this->debug = $debug; + } + + /** + * Converts an Exception to a Response. + * + * A "showException" request parameter can be used to force display of an error page (when set to false) or + * the exception page (when true). If it is not present, the "debug" value passed into the constructor will + * be used. + * + * @param Request $request The request + * @param FlattenException $exception A FlattenException instance + * @param DebugLoggerInterface $logger A DebugLoggerInterface instance + * + * @return Response + * + * @throws \InvalidArgumentException When the exception template does not exist + */ + public function showAction(Request $request, FlattenException $exception, DebugLoggerInterface $logger = null) + { + $currentContent = $this->getAndCleanOutputBuffering($request->headers->get('X-Php-Ob-Level', -1)); + $showException = $request->attributes->get('showException', $this->debug); // As opposed to an additional parameter, this maintains BC + + $code = $exception->getStatusCode(); + + return new Response($this->twig->render( + (string) $this->findTemplate($request, $request->getRequestFormat(), $code, $showException), + array( + 'status_code' => $code, + 'status_text' => isset(Response::$statusTexts[$code]) ? Response::$statusTexts[$code] : '', + 'exception' => $exception, + 'logger' => $logger, + 'currentContent' => $currentContent, + ) + )); + } + + /** + * @param int $startObLevel + * + * @return string + */ + protected function getAndCleanOutputBuffering($startObLevel) + { + if (ob_get_level() <= $startObLevel) { + return ''; + } + + Response::closeOutputBuffers($startObLevel + 1, true); + + return ob_get_clean(); + } + + /** + * @param Request $request + * @param string $format + * @param int $code An HTTP response status code + * @param bool $showException + * + * @return string + */ + protected function findTemplate(Request $request, $format, $code, $showException) + { + $name = $showException ? 'exception' : 'error'; + if ($showException && 'html' == $format) { + $name = 'exception_full'; + } + + // For error pages, try to find a template for the specific HTTP status code and format + if (!$showException) { + $template = sprintf('@Twig/Exception/%s%s.%s.twig', $name, $code, $format); + if ($this->templateExists($template)) { + return $template; + } + } + + // try to find a template for the given format + $template = sprintf('@Twig/Exception/%s.%s.twig', $name, $format); + if ($this->templateExists($template)) { + return $template; + } + + // default to a generic HTML exception + $request->setRequestFormat('html'); + + return sprintf('@Twig/Exception/%s.html.twig', $showException ? 'exception_full' : $name); + } + + // to be removed when the minimum required version of Twig is >= 3.0 + protected function templateExists($template) + { + $template = (string) $template; + + $loader = $this->twig->getLoader(); + if ($loader instanceof \Twig_ExistsLoaderInterface || method_exists($loader, 'exists')) { + return $loader->exists($template); + } + + try { + $loader->getSourceContext($template)->getCode(); + + return true; + } catch (\Twig_Error_Loader $e) { + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Controller/PreviewErrorController.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Controller/PreviewErrorController.php new file mode 100644 index 0000000000000000000000000000000000000000..a907ef0abe5b26eb8e9a9ea36395e047d02cbd31 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Controller/PreviewErrorController.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Controller; + +use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * PreviewErrorController can be used to test error pages. + * + * It will create a test exception and forward it to another controller. + * + * @author Matthias Pigulla + */ +class PreviewErrorController +{ + protected $kernel; + protected $controller; + + public function __construct(HttpKernelInterface $kernel, $controller) + { + $this->kernel = $kernel; + $this->controller = $controller; + } + + public function previewErrorPageAction(Request $request, $code) + { + $exception = FlattenException::create(new \Exception('Something has intentionally gone wrong.'), $code); + + /* + * This Request mimics the parameters set by + * \Symfony\Component\HttpKernel\EventListener\ExceptionListener::duplicateRequest, with + * the additional "showException" flag. + */ + + $subRequest = $request->duplicate(null, null, array( + '_controller' => $this->controller, + 'exception' => $exception, + 'logger' => null, + 'format' => $request->getRequestFormat(), + 'showException' => false, + )); + + return $this->kernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExceptionListenerPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExceptionListenerPass.php new file mode 100644 index 0000000000000000000000000000000000000000..b7ebb2a4065127527b554190177491704e524fb0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExceptionListenerPass.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; + +/** + * Registers the Twig exception listener if Twig is registered as a templating engine. + * + * @author Fabien Potencier + */ +class ExceptionListenerPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (false === $container->hasDefinition('twig')) { + return; + } + + // register the exception controller only if Twig is enabled and required dependencies do exist + if (!class_exists('Symfony\Component\Debug\Exception\FlattenException') || !interface_exists('Symfony\Component\EventDispatcher\EventSubscriberInterface')) { + $container->removeDefinition('twig.exception_listener'); + } elseif ($container->hasParameter('templating.engines')) { + $engines = $container->getParameter('templating.engines'); + if (!in_array('twig', $engines)) { + $container->removeDefinition('twig.exception_listener'); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php new file mode 100644 index 0000000000000000000000000000000000000000..1491b04ac0545f06d7acfc81f660b2de931746d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; + +use Symfony\Component\Config\Resource\ClassExistenceResource; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\ExpressionLanguage\ExpressionLanguage; +use Symfony\Component\Stopwatch\Stopwatch; +use Symfony\Component\Yaml\Parser as YamlParser; + +/** + * @author Jean-François Simon + */ +class ExtensionPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!class_exists('Symfony\Component\Asset\Packages')) { + $container->removeDefinition('twig.extension.assets'); + } + + if (!class_exists('Symfony\Component\ExpressionLanguage\Expression')) { + $container->removeDefinition('twig.extension.expression'); + } + + if (!interface_exists('Symfony\Component\Routing\Generator\UrlGeneratorInterface')) { + $container->removeDefinition('twig.extension.routing'); + } + if (!interface_exists('Symfony\Component\Translation\TranslatorInterface')) { + $container->removeDefinition('twig.extension.trans'); + } + + if (!class_exists('Symfony\Component\Yaml\Yaml')) { + $container->removeDefinition('twig.extension.yaml'); + } + + if ($container->has('form.extension')) { + $container->getDefinition('twig.extension.form')->addTag('twig.extension'); + $reflClass = new \ReflectionClass('Symfony\Bridge\Twig\Extension\FormExtension'); + $container->getDefinition('twig.loader.native_filesystem')->addMethodCall('addPath', array(dirname(dirname($reflClass->getFileName())).'/Resources/views/Form')); + } + + if ($container->has('translator')) { + $container->getDefinition('twig.extension.trans')->addTag('twig.extension'); + } + + if ($container->has('router')) { + $container->getDefinition('twig.extension.routing')->addTag('twig.extension'); + } + + if ($container->has('fragment.handler')) { + $container->getDefinition('twig.extension.httpkernel')->addTag('twig.extension'); + + // inject Twig in the hinclude service if Twig is the only registered templating engine + if ( + !$container->hasParameter('templating.engines') + || array('twig') == $container->getParameter('templating.engines') + ) { + $container->getDefinition('fragment.renderer.hinclude') + ->addTag('kernel.fragment_renderer', array('alias' => 'hinclude')) + ->replaceArgument(0, new Reference('twig')) + ; + } + } + + if ($container->has('request_stack')) { + $container->getDefinition('twig.extension.httpfoundation')->addTag('twig.extension'); + } + + if ($container->getParameter('kernel.debug')) { + $container->getDefinition('twig.extension.profiler')->addTag('twig.extension'); + $container->getDefinition('twig.extension.debug')->addTag('twig.extension'); + } + + $composerRootDir = $this->getComposerRootDir($container->getParameter('kernel.root_dir')); + $twigLoader = $container->getDefinition('twig.loader.native_filesystem'); + if ($container->has('templating')) { + $loader = $container->getDefinition('twig.loader.filesystem'); + $loader->setMethodCalls(array_merge($twigLoader->getMethodCalls(), $loader->getMethodCalls())); + $loader->replaceArgument(2, $composerRootDir); + + $twigLoader->clearTag('twig.loader'); + } else { + $twigLoader->replaceArgument(1, $composerRootDir); + $container->setAlias('twig.loader.filesystem', new Alias('twig.loader.native_filesystem', false)); + } + + if ($container->has('assets.packages')) { + $container->getDefinition('twig.extension.assets')->addTag('twig.extension'); + } + + $container->addResource(new ClassExistenceResource(YamlParser::class)); + if (class_exists(YamlParser::class)) { + $container->getDefinition('twig.extension.yaml')->addTag('twig.extension'); + } + + $container->addResource(new ClassExistenceResource(Stopwatch::class)); + if (class_exists(Stopwatch::class)) { + $container->getDefinition('twig.extension.debug.stopwatch')->addTag('twig.extension'); + } + + $container->addResource(new ClassExistenceResource(ExpressionLanguage::class)); + if (class_exists(ExpressionLanguage::class)) { + $container->getDefinition('twig.extension.expression')->addTag('twig.extension'); + } + } + + private function getComposerRootDir($rootDir) + { + $dir = $rootDir; + while (!file_exists($dir.'/composer.json')) { + if ($dir === dirname($dir)) { + return $rootDir; + } + + $dir = dirname($dir); + } + + return $dir; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/RuntimeLoaderPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/RuntimeLoaderPass.php new file mode 100644 index 0000000000000000000000000000000000000000..7d0be74fadb78ae8a168b1ab1f5a6638e26b3304 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/RuntimeLoaderPass.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * Registers Twig runtime services. + */ +class RuntimeLoaderPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition('twig.runtime_loader')) { + return; + } + + $definition = $container->getDefinition('twig.runtime_loader'); + $mapping = array(); + foreach ($container->findTaggedServiceIds('twig.runtime') as $id => $attributes) { + $def = $container->getDefinition($id); + + if (!$def->isPublic()) { + throw new InvalidArgumentException(sprintf('The service "%s" must be public as it can be lazy-loaded.', $id)); + } + + if ($def->isAbstract()) { + throw new InvalidArgumentException(sprintf('The service "%s" must not be abstract as it can be lazy-loaded.', $id)); + } + + $mapping[$def->getClass()] = $id; + } + + $definition->replaceArgument(1, $mapping); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php new file mode 100644 index 0000000000000000000000000000000000000000..927e4b46e18ac2ead770d4c14bf727e0ba007983 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; + +/** + * Adds tagged twig.extension services to twig service. + * + * @author Fabien Potencier + */ +class TwigEnvironmentPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (false === $container->hasDefinition('twig')) { + return; + } + + $definition = $container->getDefinition('twig'); + + // Extensions must always be registered before everything else. + // For instance, global variable definitions must be registered + // afterward. If not, the globals from the extensions will never + // be registered. + $calls = $definition->getMethodCalls(); + $definition->setMethodCalls(array()); + foreach ($container->findTaggedServiceIds('twig.extension') as $id => $attributes) { + $definition->addMethodCall('addExtension', array(new Reference($id))); + } + $definition->setMethodCalls(array_merge($definition->getMethodCalls(), $calls)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigLoaderPass.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigLoaderPass.php new file mode 100644 index 0000000000000000000000000000000000000000..bc3b71c696ed7c62649f4e47ad4d05bccdab7440 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigLoaderPass.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Exception\LogicException; + +/** + * Adds services tagged twig.loader as Twig loaders. + * + * @author Daniel Leech + */ +class TwigLoaderPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + if (false === $container->hasDefinition('twig')) { + return; + } + + // register additional template loaders + $loaderIds = $container->findTaggedServiceIds('twig.loader'); + + if (count($loaderIds) === 0) { + throw new LogicException('No twig loaders found. You need to tag at least one loader with "twig.loader"'); + } + + if (count($loaderIds) === 1) { + $container->setAlias('twig.loader', key($loaderIds)); + } else { + $chainLoader = $container->getDefinition('twig.loader.chain'); + + $prioritizedLoaders = array(); + + foreach ($loaderIds as $id => $tags) { + foreach ($tags as $tag) { + $priority = isset($tag['priority']) ? $tag['priority'] : 0; + $prioritizedLoaders[$priority][] = $id; + } + } + + krsort($prioritizedLoaders); + + foreach ($prioritizedLoaders as $loaders) { + foreach ($loaders as $loader) { + $chainLoader->addMethodCall('addLoader', array(new Reference($loader))); + } + } + + $container->setAlias('twig.loader', 'twig.loader.chain'); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php new file mode 100644 index 0000000000000000000000000000000000000000..c0661d9e70b67057a715495905fc739307c0bc70 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php @@ -0,0 +1,193 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\DependencyInjection; + +use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +/** + * TwigExtension configuration structure. + * + * @author Jeremy Mikola + */ +class Configuration implements ConfigurationInterface +{ + /** + * Generates the configuration tree builder. + * + * @return TreeBuilder The tree builder + */ + public function getConfigTreeBuilder() + { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('twig'); + + $rootNode + ->children() + ->scalarNode('exception_controller')->defaultValue('twig.controller.exception:showAction')->end() + ->end() + ; + + $this->addFormThemesSection($rootNode); + $this->addGlobalsSection($rootNode); + $this->addTwigOptions($rootNode); + $this->addTwigFormatOptions($rootNode); + + return $treeBuilder; + } + + private function addFormThemesSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->fixXmlConfig('form_theme') + ->children() + ->arrayNode('form_themes') + ->addDefaultChildrenIfNoneSet() + ->prototype('scalar')->defaultValue('form_div_layout.html.twig')->end() + ->example(array('MyBundle::form.html.twig')) + ->validate() + ->ifTrue(function ($v) { return !in_array('form_div_layout.html.twig', $v); }) + ->then(function ($v) { + return array_merge(array('form_div_layout.html.twig'), $v); + }) + ->end() + ->end() + ->end() + ; + } + + private function addGlobalsSection(ArrayNodeDefinition $rootNode) + { + $rootNode + ->fixXmlConfig('global') + ->children() + ->arrayNode('globals') + ->normalizeKeys(false) + ->useAttributeAsKey('key') + ->example(array('foo' => '"@bar"', 'pi' => 3.14)) + ->prototype('array') + ->beforeNormalization() + ->ifTrue(function ($v) { return is_string($v) && 0 === strpos($v, '@'); }) + ->then(function ($v) { + if (0 === strpos($v, '@@')) { + return substr($v, 1); + } + + return array('id' => substr($v, 1), 'type' => 'service'); + }) + ->end() + ->beforeNormalization() + ->ifTrue(function ($v) { + if (is_array($v)) { + $keys = array_keys($v); + sort($keys); + + return $keys !== array('id', 'type') && $keys !== array('value'); + } + + return true; + }) + ->then(function ($v) { return array('value' => $v); }) + ->end() + ->children() + ->scalarNode('id')->end() + ->scalarNode('type') + ->validate() + ->ifNotInArray(array('service')) + ->thenInvalid('The %s type is not supported') + ->end() + ->end() + ->variableNode('value')->end() + ->end() + ->end() + ->end() + ->end() + ; + } + + private function addTwigOptions(ArrayNodeDefinition $rootNode) + { + $rootNode + ->fixXmlConfig('path') + ->children() + ->variableNode('autoescape')->defaultValue('name')->end() + ->scalarNode('autoescape_service')->defaultNull()->end() + ->scalarNode('autoescape_service_method')->defaultNull()->end() + ->scalarNode('base_template_class')->example('Twig_Template')->cannotBeEmpty()->end() + ->scalarNode('cache')->defaultValue('%kernel.cache_dir%/twig')->end() + ->scalarNode('charset')->defaultValue('%kernel.charset%')->end() + ->booleanNode('debug')->defaultValue('%kernel.debug%')->end() + ->booleanNode('strict_variables')->end() + ->scalarNode('auto_reload')->end() + ->integerNode('optimizations')->min(-1)->end() + ->arrayNode('paths') + ->normalizeKeys(false) + ->useAttributeAsKey('paths') + ->beforeNormalization() + ->always() + ->then(function ($paths) { + $normalized = array(); + foreach ($paths as $path => $namespace) { + if (is_array($namespace)) { + // xml + $path = $namespace['value']; + $namespace = $namespace['namespace']; + } + + // path within the default namespace + if (ctype_digit((string) $path)) { + $path = $namespace; + $namespace = null; + } + + $normalized[$path] = $namespace; + } + + return $normalized; + }) + ->end() + ->prototype('variable')->end() + ->end() + ->end() + ; + } + + private function addTwigFormatOptions(ArrayNodeDefinition $rootNode) + { + $rootNode + ->children() + ->arrayNode('date') + ->info('The default format options used by the date filter') + ->addDefaultsIfNotSet() + ->children() + ->scalarNode('format')->defaultValue('F j, Y H:i')->end() + ->scalarNode('interval_format')->defaultValue('%d days')->end() + ->scalarNode('timezone') + ->info('The timezone used when formatting dates, when set to null, the timezone returned by date_default_timezone_get() is used') + ->defaultNull() + ->end() + ->end() + ->end() + ->arrayNode('number_format') + ->info('The default format options for the number_format filter') + ->addDefaultsIfNotSet() + ->children() + ->integerNode('decimals')->defaultValue(0)->end() + ->scalarNode('decimal_point')->defaultValue('.')->end() + ->scalarNode('thousands_separator')->defaultValue(',')->end() + ->end() + ->end() + ->end() + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/EnvironmentConfigurator.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/EnvironmentConfigurator.php new file mode 100644 index 0000000000000000000000000000000000000000..bf37559b9920c0d8a3ab4d1219a04504d7eed2df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/EnvironmentConfigurator.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\DependencyInjection\Configurator; + +/** + * Twig environment configurator. + * + * @author Christian Flothmann + */ +class EnvironmentConfigurator +{ + private $dateFormat; + private $intervalFormat; + private $timezone; + private $decimals; + private $decimalPoint; + private $thousandsSeparator; + + public function __construct($dateFormat, $intervalFormat, $timezone, $decimals, $decimalPoint, $thousandsSeparator) + { + $this->dateFormat = $dateFormat; + $this->intervalFormat = $intervalFormat; + $this->timezone = $timezone; + $this->decimals = $decimals; + $this->decimalPoint = $decimalPoint; + $this->thousandsSeparator = $thousandsSeparator; + } + + public function configure(\Twig_Environment $environment) + { + $environment->getExtension('Twig_Extension_Core')->setDateFormat($this->dateFormat, $this->intervalFormat); + + if (null !== $this->timezone) { + $environment->getExtension('Twig_Extension_Core')->setTimezone($this->timezone); + } + + $environment->getExtension('Twig_Extension_Core')->setNumberFormat($this->decimals, $this->decimalPoint, $this->thousandsSeparator); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..77d10e84c146425ba9d333175bcf5b693f5f20a9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php @@ -0,0 +1,227 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\DependencyInjection; + +use Symfony\Component\Config\FileLocator; +use Symfony\Component\Config\Resource\FileExistenceResource; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\HttpKernel\DependencyInjection\Extension; + +/** + * TwigExtension. + * + * @author Fabien Potencier + * @author Jeremy Mikola + */ +class TwigExtension extends Extension +{ + /** + * Responds to the twig configuration parameter. + * + * @param array $configs + * @param ContainerBuilder $container + */ + public function load(array $configs, ContainerBuilder $container) + { + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('twig.xml'); + + if (class_exists('Symfony\Component\Form\Form')) { + $loader->load('form.xml'); + } + + if (interface_exists('Symfony\Component\Templating\EngineInterface')) { + $loader->load('templating.xml'); + } + + if (!interface_exists('Symfony\Component\Translation\TranslatorInterface')) { + $container->removeDefinition('twig.translation.extractor'); + } + + foreach ($configs as $key => $config) { + if (isset($config['globals'])) { + foreach ($config['globals'] as $name => $value) { + if (is_array($value) && isset($value['key'])) { + $configs[$key]['globals'][$name] = array( + 'key' => $name, + 'value' => $value, + ); + } + } + } + } + + $configuration = $this->getConfiguration($configs, $container); + + $config = $this->processConfiguration($configuration, $configs); + + $container->setParameter('twig.exception_listener.controller', $config['exception_controller']); + + $container->setParameter('twig.form.resources', $config['form_themes']); + + $envConfiguratorDefinition = $container->getDefinition('twig.configurator.environment'); + $envConfiguratorDefinition->replaceArgument(0, $config['date']['format']); + $envConfiguratorDefinition->replaceArgument(1, $config['date']['interval_format']); + $envConfiguratorDefinition->replaceArgument(2, $config['date']['timezone']); + $envConfiguratorDefinition->replaceArgument(3, $config['number_format']['decimals']); + $envConfiguratorDefinition->replaceArgument(4, $config['number_format']['decimal_point']); + $envConfiguratorDefinition->replaceArgument(5, $config['number_format']['thousands_separator']); + + $twigFilesystemLoaderDefinition = $container->getDefinition('twig.loader.native_filesystem'); + + // register user-configured paths + foreach ($config['paths'] as $path => $namespace) { + if (!$namespace) { + $twigFilesystemLoaderDefinition->addMethodCall('addPath', array($path)); + } else { + $twigFilesystemLoaderDefinition->addMethodCall('addPath', array($path, $namespace)); + } + } + + $container->getDefinition('twig.cache_warmer')->replaceArgument(2, $config['paths']); + $container->getDefinition('twig.template_iterator')->replaceArgument(2, $config['paths']); + + $bundleHierarchy = $this->getBundleHierarchy($container); + + foreach ($bundleHierarchy as $name => $bundle) { + $namespace = $this->normalizeBundleName($name); + + foreach ($bundle['children'] as $child) { + foreach ($bundleHierarchy[$child]['paths'] as $path) { + $twigFilesystemLoaderDefinition->addMethodCall('addPath', array($path, $namespace)); + } + } + + foreach ($bundle['paths'] as $path) { + $twigFilesystemLoaderDefinition->addMethodCall('addPath', array($path, $namespace)); + } + } + + if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/views')) { + $twigFilesystemLoaderDefinition->addMethodCall('addPath', array($dir)); + } + $container->addResource(new FileExistenceResource($dir)); + + if (!empty($config['globals'])) { + $def = $container->getDefinition('twig'); + foreach ($config['globals'] as $key => $global) { + if (isset($global['type']) && 'service' === $global['type']) { + $def->addMethodCall('addGlobal', array($key, new Reference($global['id']))); + } else { + $def->addMethodCall('addGlobal', array($key, $global['value'])); + } + } + } + + unset( + $config['form'], + $config['globals'], + $config['extensions'] + ); + + if (isset($config['autoescape_service']) && isset($config['autoescape_service_method'])) { + $config['autoescape'] = array(new Reference($config['autoescape_service']), $config['autoescape_service_method']); + } + unset($config['autoescape_service'], $config['autoescape_service_method']); + + $container->getDefinition('twig')->replaceArgument(1, $config); + + $this->addClassesToCompile(array( + 'Twig_Environment', + 'Twig_Extension', + 'Twig_Extension_Core', + 'Twig_Extension_Escaper', + 'Twig_Extension_Optimizer', + 'Twig_LoaderInterface', + 'Twig_Markup', + 'Twig_Template', + )); + } + + private function getBundleHierarchy(ContainerBuilder $container) + { + $bundleHierarchy = array(); + + foreach ($container->getParameter('kernel.bundles_metadata') as $name => $bundle) { + if (!array_key_exists($name, $bundleHierarchy)) { + $bundleHierarchy[$name] = array( + 'paths' => array(), + 'parents' => array(), + 'children' => array(), + ); + } + + if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/'.$name.'/views')) { + $bundleHierarchy[$name]['paths'][] = $dir; + } + $container->addResource(new FileExistenceResource($dir)); + + if (is_dir($dir = $bundle['path'].'/Resources/views')) { + $bundleHierarchy[$name]['paths'][] = $dir; + } + $container->addResource(new FileExistenceResource($dir)); + + if (null === $bundle['parent']) { + continue; + } + + $bundleHierarchy[$name]['parents'][] = $bundle['parent']; + + if (!array_key_exists($bundle['parent'], $bundleHierarchy)) { + $bundleHierarchy[$bundle['parent']] = array( + 'paths' => array(), + 'parents' => array(), + 'children' => array(), + ); + } + + $bundleHierarchy[$bundle['parent']]['children'] = array_merge($bundleHierarchy[$name]['children'], array($name), $bundleHierarchy[$bundle['parent']]['children']); + + foreach ($bundleHierarchy[$bundle['parent']]['parents'] as $parent) { + $bundleHierarchy[$name]['parents'][] = $parent; + $bundleHierarchy[$parent]['children'] = array_merge($bundleHierarchy[$name]['children'], array($name), $bundleHierarchy[$parent]['children']); + } + + foreach ($bundleHierarchy[$name]['children'] as $child) { + $bundleHierarchy[$child]['parents'] = array_merge($bundleHierarchy[$child]['parents'], $bundleHierarchy[$name]['parents']); + } + } + + return $bundleHierarchy; + } + + private function normalizeBundleName($name) + { + if ('Bundle' === substr($name, -6)) { + $name = substr($name, 0, -6); + } + + return $name; + } + + /** + * Returns the base path for the XSD files. + * + * @return string The XSD base path + */ + public function getXsdValidationBasePath() + { + return __DIR__.'/../Resources/config/schema'; + } + + public function getNamespace() + { + return 'http://symfony.com/schema/dic/twig'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/LICENSE b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..0a9ac7a3ca19ad82dcb2caf7989e43902163a528 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Loader; + +use Symfony\Component\Config\FileLocatorInterface; +use Symfony\Component\Templating\TemplateNameParserInterface; +use Symfony\Component\Templating\TemplateReferenceInterface; + +/** + * FilesystemLoader extends the default Twig filesystem loader + * to work with the Symfony paths and template references. + * + * @author Fabien Potencier + */ +class FilesystemLoader extends \Twig_Loader_Filesystem +{ + protected $locator; + protected $parser; + + /** + * Constructor. + * + * @param FileLocatorInterface $locator A FileLocatorInterface instance + * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance + * @param string|null $rootPath The root path common to all relative paths (null for getcwd()) + */ + public function __construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser, $rootPath = null) + { + parent::__construct(array(), $rootPath); + + $this->locator = $locator; + $this->parser = $parser; + } + + /** + * {@inheritdoc} + * + * The name parameter might also be a TemplateReferenceInterface. + */ + public function exists($name) + { + return parent::exists((string) $name); + } + + /** + * Returns the path to the template file. + * + * The file locator is used to locate the template when the naming convention + * is the symfony one (i.e. the name can be parsed). + * Otherwise the template is located using the locator from the twig library. + * + * @param string|TemplateReferenceInterface $template The template + * @param bool $throw When true, a \Twig_Error_Loader exception will be thrown if a template could not be found + * + * @return string The path to the template file + * + * @throws \Twig_Error_Loader if the template could not be found + */ + protected function findTemplate($template, $throw = true) + { + $logicalName = (string) $template; + + if (isset($this->cache[$logicalName])) { + return $this->cache[$logicalName]; + } + + $file = null; + $previous = null; + try { + $file = parent::findTemplate($logicalName); + } catch (\Twig_Error_Loader $e) { + $twigLoaderException = $e; + + // for BC + try { + $template = $this->parser->parse($template); + $file = $this->locator->locate($template); + } catch (\Exception $e) { + } + } + + if (false === $file || null === $file) { + if ($throw) { + throw $twigLoaderException; + } + + return false; + } + + return $this->cache[$logicalName] = $file; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/README.md b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a9793256664cd54c8931eef45ce923a5e8a32e74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/README.md @@ -0,0 +1,10 @@ +TwigBundle +========== + +Resources +--------- + + * [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/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/form.xml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/form.xml new file mode 100644 index 0000000000000000000000000000000000000000..f1603c15461bd838467619a0d2ad69f027f308cb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/form.xml @@ -0,0 +1,25 @@ + + + + + + + + twig.form.renderer + + + + + %twig.form.resources% + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/routing/errors.xml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/routing/errors.xml new file mode 100644 index 0000000000000000000000000000000000000000..bf87f8be7ab6e2ca909402da7fb698a310c758b5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/routing/errors.xml @@ -0,0 +1,12 @@ + + + + + + twig.controller.preview_error:previewErrorPageAction + html + \d+ + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/schema/twig-1.0.xsd b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/schema/twig-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3314091a08802e570bcabf79942e422d20f0f94f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/schema/twig-1.0.xsd @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/templating.xml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/templating.xml new file mode 100644 index 0000000000000000000000000000000000000000..fae523eb6fd06e072498b8ab7d62d3d81d432f9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/templating.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml new file mode 100644 index 0000000000000000000000000000000000000000..800fc08367fd8e77f1666b2149d468b974f704de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml @@ -0,0 +1,146 @@ + + + + + + + + + + app + + + + + + + + + + %kernel.environment% + %kernel.debug% + + + + + + + + + + + + + + %kernel.root_dir% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %kernel.root_dir% + %kernel.charset% + + + + + + + + + + + %kernel.debug% + + + + + + + + + + + + + + + + + + + + + + + + + + + %twig.exception_listener.controller% + + + + + + %kernel.debug% + + + + + %twig.exception_listener.controller% + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.atom.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.atom.twig new file mode 100644 index 0000000000000000000000000000000000000000..c27cc56e6a078a60d1aa934021565d4dcad3a629 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.atom.twig @@ -0,0 +1 @@ +{% include '@Twig/Exception/error.xml.twig' %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.css.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.css.twig new file mode 100644 index 0000000000000000000000000000000000000000..d8a9369487821ec04b977147f843f11af570ac48 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.css.twig @@ -0,0 +1,4 @@ +/* +{{ status_code }} {{ status_text }} + +*/ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..138a60ad964f1bb255797e4c3237373687c8a95e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.html.twig @@ -0,0 +1,16 @@ + + + + + An Error Occurred: {{ status_text }} + + +

    Oops! An Error Occurred

    +

    The server returned a "{{ status_code }} {{ status_text }}".

    + +
    + Something is broken. Please let us know what you were doing when this error occurred. + We will fix it as soon as possible. Sorry for any inconvenience caused. +
    + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.js.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.js.twig new file mode 100644 index 0000000000000000000000000000000000000000..d8a9369487821ec04b977147f843f11af570ac48 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.js.twig @@ -0,0 +1,4 @@ +/* +{{ status_code }} {{ status_text }} + +*/ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.json.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.json.twig new file mode 100644 index 0000000000000000000000000000000000000000..fc19fd83bb0e0b38b93cc6f52ffa2c36241c929d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.json.twig @@ -0,0 +1 @@ +{{ { 'error': { 'code': status_code, 'message': status_text } }|json_encode|raw }} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.rdf.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.rdf.twig new file mode 100644 index 0000000000000000000000000000000000000000..c27cc56e6a078a60d1aa934021565d4dcad3a629 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.rdf.twig @@ -0,0 +1 @@ +{% include '@Twig/Exception/error.xml.twig' %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.txt.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.txt.twig new file mode 100644 index 0000000000000000000000000000000000000000..bec5b1e3024864e71a234de7fca9da71717b25e6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.txt.twig @@ -0,0 +1,7 @@ +Oops! An Error Occurred +======================= + +The server returned a "{{ status_code }} {{ status_text }}". + +Something is broken. Please let us know what you were doing when this error occurred. +We will fix it as soon as possible. Sorry for any inconvenience caused. diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.xml.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.xml.twig new file mode 100644 index 0000000000000000000000000000000000000000..5ea8f565ab9c79ca3b06568a8666f6f2c800ce5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.xml.twig @@ -0,0 +1,3 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.atom.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.atom.twig new file mode 100644 index 0000000000000000000000000000000000000000..d507ce46f69497923256f7ab24180deaf6a827e3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.atom.twig @@ -0,0 +1 @@ +{% include '@Twig/Exception/exception.xml.twig' with { 'exception': exception } %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.css.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.css.twig new file mode 100644 index 0000000000000000000000000000000000000000..bdf242b7f19987f2d9b9419cea6fc1ae4b8b9810 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.css.twig @@ -0,0 +1,3 @@ +/* +{% include '@Twig/Exception/exception.txt.twig' with { 'exception': exception } %} +*/ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..b017420dd5c7056d7e220e81d1f692dfae599eaa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.html.twig @@ -0,0 +1,120 @@ +
    +
    + +
    + {{ include('@Twig/Exception/exception.svg') }} +
    +
    +
    “
    + +

    {{ exception.message|nl2br|format_file_from_text }}

    + +
    + {{ status_code }} {{ status_text }} - {{ exception.class|abbr_class }} +
    + + {% set previous_count = exception.allPrevious|length %} + {% if previous_count %} +
    {{ previous_count }} linked Exception{{ previous_count > 1 ? 's' : '' }}: +
      + {% for i, previous in exception.allPrevious %} +
    • + {{ previous.class|abbr_class }} » +
    • + {% endfor %} +
    +
    + {% endif %} + +
    â€
    +
    +
    +
    + +{% for position, e in exception.toarray %} + {% include '@Twig/Exception/traces.html.twig' with { 'exception': e, 'position': position, 'count': previous_count } only %} +{% endfor %} + +{% if logger %} +
    +
    + {% spaceless %} +

    + Logs  + + + - + +

    + {% endspaceless %} + + {% if logger.counterrors %} +
    + + {{ logger.counterrors }} error{{ logger.counterrors > 1 ? 's' : ''}} + +
    + {% endif %} +
    + +
    + {% include '@Twig/Exception/logs.html.twig' with { 'logs': logger.logs } only %} +
    +
    +{% endif %} + +{% if currentContent %} +
    + {% spaceless %} +

    + Content of the Output  + + + + + +

    + {% endspaceless %} + + + +
    +
    +{% endif %} + +{% include '@Twig/Exception/traces_text.html.twig' with { 'exception': exception } only %} + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.js.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.js.twig new file mode 100644 index 0000000000000000000000000000000000000000..bdf242b7f19987f2d9b9419cea6fc1ae4b8b9810 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.js.twig @@ -0,0 +1,3 @@ +/* +{% include '@Twig/Exception/exception.txt.twig' with { 'exception': exception } %} +*/ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.json.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.json.twig new file mode 100644 index 0000000000000000000000000000000000000000..13a41476f2a7b024df4f338ec2723c98042beaf3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.json.twig @@ -0,0 +1 @@ +{{ { 'error': { 'code': status_code, 'message': status_text, 'exception': exception.toarray } }|json_encode|raw }} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.rdf.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.rdf.twig new file mode 100644 index 0000000000000000000000000000000000000000..d507ce46f69497923256f7ab24180deaf6a827e3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.rdf.twig @@ -0,0 +1 @@ +{% include '@Twig/Exception/exception.xml.twig' with { 'exception': exception } %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.svg b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.svg new file mode 100644 index 0000000000000000000000000000000000000000..a5ed696648bf1b99f01ab97566bd7392b468d9f8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.txt.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.txt.twig new file mode 100644 index 0000000000000000000000000000000000000000..ae297c5745948bf98a5748d5b24b313bf2cb439e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.txt.twig @@ -0,0 +1,7 @@ +[exception] {{ status_code ~ ' | ' ~ status_text ~ ' | ' ~ exception.class }} +[message] {{ exception.message }} +{% for i, e in exception.toarray %} +[{{ i + 1 }}] {{ e.class }}: {{ e.message }} +{% include '@Twig/Exception/traces.txt.twig' with { 'exception': e } only %} + +{% endfor %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.xml.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.xml.twig new file mode 100644 index 0000000000000000000000000000000000000000..2e3f30a10affdf71e84b4d19f6bf84befa63787d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.xml.twig @@ -0,0 +1,9 @@ + + + +{% for e in exception.toarray %} + +{% include '@Twig/Exception/traces.xml.twig' with { 'exception': e } only %} + +{% endfor %} + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception_full.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception_full.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..e4f220896ecda491986b4152fcd7fb613500764a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception_full.html.twig @@ -0,0 +1,142 @@ +{% extends '@Twig/layout.html.twig' %} + +{% block head %} + +{% endblock %} + +{% block title %} + {{ exception.message }} ({{ status_code }} {{ status_text }}) +{% endblock %} + +{% block body %} + {% include '@Twig/Exception/exception.html.twig' %} +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/logs.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/logs.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..d2c3ac6940194c0a400d394a8ff515f7444ce81b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/logs.html.twig @@ -0,0 +1,7 @@ +
      + {% for log in logs %} + = 400 %} class="error"{% elseif log.priority >= 300 %} class="warning"{% endif %}> + {{ log.priorityName }} - {{ log.message|format_log_message(log.context) }} + + {% endfor %} +
    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/trace.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/trace.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..d00a376a4589e610a0eb624e7b653f7484238729 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/trace.html.twig @@ -0,0 +1,22 @@ +{% if trace.function %} + at + + {{ trace.short_class }} + {{ trace.type ~ trace.function }} + + ({{ trace.args|format_args }}) +{% endif %} + +{% if trace.file is defined and trace.file and trace.line is defined and trace.line %} + {{ trace.function ? '
    ' : '' }} + in {{ trace.file|format_file(trace.line) }}  + {% spaceless %} + + - + + + + {% endspaceless %} +
    + {{ trace.file|file_excerpt(trace.line) }} +
    +{% endif %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/trace.txt.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/trace.txt.twig new file mode 100644 index 0000000000000000000000000000000000000000..ff20469bdbee8f3847074fa936a525265c6b6f74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/trace.txt.twig @@ -0,0 +1,8 @@ +{% if trace.function %} + at {{ trace.class ~ trace.type ~ trace.function }}({{ trace.args|format_args_as_text }}) +{% else %} + at n/a +{% endif %} +{% if trace.file is defined and trace.line is defined %} + in {{ trace.file }} line {{ trace.line }} +{% endif %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..e846f7a1c60c76db47598ff672d05fa5f0637e76 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.html.twig @@ -0,0 +1,25 @@ +
    + {% if count > 0 %} +

    + [{{ count - position + 1 }}/{{ count + 1 }}] + {{ exception.class|abbr_class }}: {{ exception.message|nl2br|format_file_from_text }}  + {% spaceless %} + + - + + + + {% endspaceless %} +

    + {% else %} +

    Stack Trace

    + {% endif %} + + +
      + {% for i, trace in exception.trace %} +
    1. + {% include '@Twig/Exception/trace.html.twig' with { 'prefix': position, 'i': i, 'trace': trace } only %} +
    2. + {% endfor %} +
    +
    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.txt.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.txt.twig new file mode 100644 index 0000000000000000000000000000000000000000..906be78ca0a6fe7e64081fc57a2194ce2ad3d6de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.txt.twig @@ -0,0 +1,6 @@ +{% if exception.trace|length %} +{% for trace in exception.trace %} +{% include '@Twig/Exception/trace.txt.twig' with { 'trace': trace } only %} + +{% endfor %} +{% endif %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.xml.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.xml.twig new file mode 100644 index 0000000000000000000000000000000000000000..d04af93cf1aad633fd62a5294e8ba673487224be --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.xml.twig @@ -0,0 +1,8 @@ + +{% for trace in exception.trace %} + +{% include '@Twig/Exception/trace.txt.twig' with { 'trace': trace } only %} + + +{% endfor %} + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces_text.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces_text.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..16b35794331977ed86e04e5ae55f74297b0ae649 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces_text.html.twig @@ -0,0 +1,18 @@ +
    +

    + Stack Trace (Plain Text)  + {% spaceless %} + + + + + + {% endspaceless %} +

    + + +
    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..32b1e716bf337ffa7115ff21ffbae211372a7f95 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/layout.html.twig @@ -0,0 +1,251 @@ + + + + + + {% block title %}{% endblock %} + + {% block head %}{% endblock %} + + +
    +
    + + + +
    + +
    + {% block body %}{% endblock %} +
    +
    + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/symfony.svg b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/symfony.svg new file mode 100644 index 0000000000000000000000000000000000000000..ad58736b5f1b3c5a7daddb39f20ee18c899a44c8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/symfony.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TemplateIterator.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TemplateIterator.php new file mode 100644 index 0000000000000000000000000000000000000000..63f8da549fdd412fc40a98d7bae1a8b230d8a4b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TemplateIterator.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\Bundle\TwigBundle; + +use Symfony\Component\HttpKernel\KernelInterface; +use Symfony\Component\Finder\Finder; + +/** + * Iterator for all templates in bundles and in the application Resources directory. + * + * @author Fabien Potencier + */ +class TemplateIterator implements \IteratorAggregate +{ + private $kernel; + private $rootDir; + private $templates; + private $paths; + + /** + * @param KernelInterface $kernel A KernelInterface instance + * @param string $rootDir The directory where global templates can be stored + * @param array $paths Additional Twig paths to warm + */ + public function __construct(KernelInterface $kernel, $rootDir, array $paths = array()) + { + $this->kernel = $kernel; + $this->rootDir = $rootDir; + $this->paths = $paths; + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + if (null !== $this->templates) { + return $this->templates; + } + + $this->templates = $this->findTemplatesInDirectory($this->rootDir.'/Resources/views'); + foreach ($this->kernel->getBundles() as $bundle) { + $name = $bundle->getName(); + if ('Bundle' === substr($name, -6)) { + $name = substr($name, 0, -6); + } + + $this->templates = array_merge( + $this->templates, + $this->findTemplatesInDirectory($bundle->getPath().'/Resources/views', $name), + $this->findTemplatesInDirectory($this->rootDir.'/'.$bundle->getName().'/views', $name) + ); + } + + foreach ($this->paths as $dir => $namespace) { + $this->templates = array_merge($this->templates, $this->findTemplatesInDirectory($dir, $namespace)); + } + + return $this->templates = new \ArrayIterator(array_unique($this->templates)); + } + + /** + * Find templates in the given directory. + * + * @param string $dir The directory where to look for templates + * @param string|null $namespace The template namespace + * + * @return array + */ + private function findTemplatesInDirectory($dir, $namespace = null) + { + if (!is_dir($dir)) { + return array(); + } + + $templates = array(); + foreach (Finder::create()->files()->followLinks()->in($dir) as $file) { + $templates[] = (null !== $namespace ? '@'.$namespace.'/' : '').str_replace('\\', '/', $file->getRelativePathname()); + } + + return $templates; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/ContainerAwareRuntimeLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/ContainerAwareRuntimeLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1e11e63e4868717ea93d3a4d2dbc3578001c81bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/ContainerAwareRuntimeLoaderTest.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Tests; + +use Psr\Log\LoggerInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Bundle\TwigBundle\ContainerAwareRuntimeLoader; + +class ContainerAwareRuntimeLoaderTest extends TestCase +{ + public function testLoad() + { + $container = $this->getMockBuilder(ContainerInterface::class)->getMock(); + $container->expects($this->once())->method('get')->with('foo'); + + $loader = new ContainerAwareRuntimeLoader($container, array( + 'FooClass' => 'foo', + )); + $loader->load('FooClass'); + } + + public function testLoadWithoutAMatch() + { + $logger = $this->getMockBuilder(LoggerInterface::class)->getMock(); + $logger->expects($this->once())->method('warning')->with('Class "BarClass" is not configured as a Twig runtime. Add the "twig.runtime" tag to the related service in the container.'); + $loader = new ContainerAwareRuntimeLoader($this->getMockBuilder(ContainerInterface::class)->getMock(), array(), $logger); + $this->assertNull($loader->load('BarClass')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Controller/ExceptionControllerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Controller/ExceptionControllerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..920a833c6bf0300cf4aecf37ea52cb981396df2b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Controller/ExceptionControllerTest.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Tests\Controller; + +use Symfony\Bundle\TwigBundle\Tests\TestCase; +use Symfony\Bundle\TwigBundle\Controller\ExceptionController; +use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\HttpFoundation\Request; + +class ExceptionControllerTest extends TestCase +{ + public function testShowActionCanBeForcedToShowErrorPage() + { + $twig = new \Twig_Environment( + new \Twig_Loader_Array(array( + '@Twig/Exception/error404.html.twig' => 'ok', + )) + ); + + $request = Request::create('whatever', 'GET'); + $request->headers->set('X-Php-Ob-Level', 1); + $request->attributes->set('showException', false); + $exception = FlattenException::create(new \Exception(), 404); + $controller = new ExceptionController($twig, /* "showException" defaults to --> */ true); + + $response = $controller->showAction($request, $exception, null); + + $this->assertEquals(200, $response->getStatusCode()); // successful request + $this->assertEquals('ok', $response->getContent()); // content of the error404.html template + } + + public function testFallbackToHtmlIfNoTemplateForRequestedFormat() + { + $twig = new \Twig_Environment( + new \Twig_Loader_Array(array( + '@Twig/Exception/error.html.twig' => 'html', + )) + ); + + $request = Request::create('whatever'); + $request->headers->set('X-Php-Ob-Level', 1); + $request->setRequestFormat('txt'); + $exception = FlattenException::create(new \Exception()); + $controller = new ExceptionController($twig, false); + + $response = $controller->showAction($request, $exception); + + $this->assertEquals('html', $request->getRequestFormat()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Controller/PreviewErrorControllerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Controller/PreviewErrorControllerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..417c83cdecc4952cbcea22934d33ed274c8ee53d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Controller/PreviewErrorControllerTest.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\Bundle\TwigBundle\Tests\Controller; + +use Symfony\Bundle\TwigBundle\Controller\PreviewErrorController; +use Symfony\Bundle\TwigBundle\Tests\TestCase; +use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpKernelInterface; + +class PreviewErrorControllerTest extends TestCase +{ + public function testForwardRequestToConfiguredController() + { + $request = Request::create('whatever'); + $response = new Response(''); + $code = 123; + $logicalControllerName = 'foo:bar:baz'; + + $kernel = $this->getMockBuilder('\Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $kernel + ->expects($this->once()) + ->method('handle') + ->with( + $this->callback(function (Request $request) use ($logicalControllerName, $code) { + $this->assertEquals($logicalControllerName, $request->attributes->get('_controller')); + + $exception = $request->attributes->get('exception'); + $this->assertInstanceOf(FlattenException::class, $exception); + $this->assertEquals($code, $exception->getStatusCode()); + $this->assertFalse($request->attributes->get('showException')); + + return true; + }), + $this->equalTo(HttpKernelInterface::SUB_REQUEST) + ) + ->will($this->returnValue($response)); + + $controller = new PreviewErrorController($kernel, $logicalControllerName); + + $this->assertSame($response, $controller->previewErrorPageAction($request, $code)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/ExtensionPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/ExtensionPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..94c00c2cabcefeba1f6c61fe7fca49f83dd2dfc4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/ExtensionPassTest.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\ExtensionPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; + +class ExtensionPassTest extends TestCase +{ + public function testProcessDoesNotDropExistingFileLoaderMethodCalls() + { + $container = new ContainerBuilder(); + $container->setParameter('kernel.debug', false); + $container->setParameter('kernel.root_dir', __DIR__); + + $container->register('twig.app_variable', '\Symfony\Bridge\Twig\AppVariable'); + $container->register('templating', '\Symfony\Bundle\TwigBundle\TwigEngine'); + $container->register('twig.extension.yaml'); + $container->register('twig.extension.debug.stopwatch'); + $container->register('twig.extension.expression'); + + $nativeTwigLoader = new Definition('\Twig_Loader_Filesystem'); + $nativeTwigLoader->addMethodCall('addPath', array()); + $container->setDefinition('twig.loader.native_filesystem', $nativeTwigLoader); + + $filesystemLoader = new Definition('\Symfony\Bundle\TwigBundle\Loader\FilesystemLoader'); + $filesystemLoader->setArguments(array(null, null, null)); + $filesystemLoader->addMethodCall('addPath', array()); + $container->setDefinition('twig.loader.filesystem', $filesystemLoader); + + $extensionPass = new ExtensionPass(); + $extensionPass->process($container); + + $this->assertCount(2, $filesystemLoader->getMethodCalls()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/TwigLoaderPassTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/TwigLoaderPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..10bcf3e8f66a88e40a776b45ec6d3014aa96b7f8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/TwigLoaderPassTest.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\Bundle\TwigBundle\Tests\DependencyInjection\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\TwigLoaderPass; + +class TwigLoaderPassTest extends TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $builder; + /** + * @var Definition + */ + private $chainLoader; + /** + * @var TwigLoaderPass + */ + private $pass; + + protected function setUp() + { + $this->builder = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('hasDefinition', 'findTaggedServiceIds', 'setAlias', 'getDefinition'))->getMock(); + $this->chainLoader = new Definition('loader'); + $this->pass = new TwigLoaderPass(); + } + + public function testMapperPassWithOneTaggedLoaders() + { + $serviceIds = array( + 'test_loader_1' => array( + array(), + ), + ); + + $this->builder->expects($this->once()) + ->method('hasDefinition') + ->with('twig') + ->will($this->returnValue(true)); + $this->builder->expects($this->once()) + ->method('findTaggedServiceIds') + ->with('twig.loader') + ->will($this->returnValue($serviceIds)); + $this->builder->expects($this->once()) + ->method('setAlias') + ->with('twig.loader', 'test_loader_1'); + + $this->pass->process($this->builder); + } + + public function testMapperPassWithTwoTaggedLoaders() + { + $serviceIds = array( + 'test_loader_1' => array( + array(), + ), + 'test_loader_2' => array( + array(), + ), + ); + + $this->builder->expects($this->once()) + ->method('hasDefinition') + ->with('twig') + ->will($this->returnValue(true)); + $this->builder->expects($this->once()) + ->method('findTaggedServiceIds') + ->with('twig.loader') + ->will($this->returnValue($serviceIds)); + $this->builder->expects($this->once()) + ->method('getDefinition') + ->with('twig.loader.chain') + ->will($this->returnValue($this->chainLoader)); + $this->builder->expects($this->once()) + ->method('setAlias') + ->with('twig.loader', 'twig.loader.chain'); + + $this->pass->process($this->builder); + $calls = $this->chainLoader->getMethodCalls(); + $this->assertCount(2, $calls); + $this->assertEquals('addLoader', $calls[0][0]); + $this->assertEquals('addLoader', $calls[1][0]); + $this->assertEquals('test_loader_1', (string) $calls[0][1][0]); + $this->assertEquals('test_loader_2', (string) $calls[1][1][0]); + } + + public function testMapperPassWithTwoTaggedLoadersWithPriority() + { + $serviceIds = array( + 'test_loader_1' => array( + array('priority' => 100), + ), + 'test_loader_2' => array( + array('priority' => 200), + ), + ); + + $this->builder->expects($this->once()) + ->method('hasDefinition') + ->with('twig') + ->will($this->returnValue(true)); + $this->builder->expects($this->once()) + ->method('findTaggedServiceIds') + ->with('twig.loader') + ->will($this->returnValue($serviceIds)); + $this->builder->expects($this->once()) + ->method('getDefinition') + ->with('twig.loader.chain') + ->will($this->returnValue($this->chainLoader)); + $this->builder->expects($this->once()) + ->method('setAlias') + ->with('twig.loader', 'twig.loader.chain'); + + $this->pass->process($this->builder); + $calls = $this->chainLoader->getMethodCalls(); + $this->assertCount(2, $calls); + $this->assertEquals('addLoader', $calls[0][0]); + $this->assertEquals('addLoader', $calls[1][0]); + $this->assertEquals('test_loader_2', (string) $calls[0][1][0]); + $this->assertEquals('test_loader_1', (string) $calls[1][1][0]); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\LogicException + */ + public function testMapperPassWithZeroTaggedLoaders() + { + $this->builder->expects($this->once()) + ->method('hasDefinition') + ->with('twig') + ->will($this->returnValue(true)); + $this->builder->expects($this->once()) + ->method('findTaggedServiceIds') + ->with('twig.loader') + ->will($this->returnValue(array())); + + $this->pass->process($this->builder); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/ConfigurationTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/ConfigurationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d3f8652c4b6dbbc9d1e95c81752f2348740509cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\TwigBundle\DependencyInjection\Configuration; +use Symfony\Component\Config\Definition\Processor; + +class ConfigurationTest extends TestCase +{ + public function testDoNoDuplicateDefaultFormResources() + { + $input = array( + 'form_themes' => array('form_div_layout.html.twig'), + ); + + $processor = new Processor(); + $config = $processor->processConfiguration(new Configuration(), array($input)); + + $this->assertEquals(array('form_div_layout.html.twig'), $config['form_themes']); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Bundle/ChildChildChildChildTwigBundle/Resources/views/layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Bundle/ChildChildChildChildTwigBundle/Resources/views/layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..bb07ecfe55a36694ae4cd8a2e4ed14afb19dd281 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Bundle/ChildChildChildChildTwigBundle/Resources/views/layout.html.twig @@ -0,0 +1 @@ +This is a layout diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Bundle/ChildChildChildTwigBundle/Resources/views/layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Bundle/ChildChildChildTwigBundle/Resources/views/layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..bb07ecfe55a36694ae4cd8a2e4ed14afb19dd281 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Bundle/ChildChildChildTwigBundle/Resources/views/layout.html.twig @@ -0,0 +1 @@ +This is a layout diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Bundle/ChildChildTwigBundle/Resources/views/layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Bundle/ChildChildTwigBundle/Resources/views/layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..bb07ecfe55a36694ae4cd8a2e4ed14afb19dd281 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Bundle/ChildChildTwigBundle/Resources/views/layout.html.twig @@ -0,0 +1 @@ +This is a layout diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Bundle/ChildTwigBundle/Resources/views/layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Bundle/ChildTwigBundle/Resources/views/layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..bb07ecfe55a36694ae4cd8a2e4ed14afb19dd281 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Bundle/ChildTwigBundle/Resources/views/layout.html.twig @@ -0,0 +1 @@ +This is a layout diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Resources/TwigBundle/views/layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Resources/TwigBundle/views/layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..bb07ecfe55a36694ae4cd8a2e4ed14afb19dd281 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Resources/TwigBundle/views/layout.html.twig @@ -0,0 +1 @@ +This is a layout diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Resources/views/layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Resources/views/layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..bb07ecfe55a36694ae4cd8a2e4ed14afb19dd281 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Resources/views/layout.html.twig @@ -0,0 +1 @@ +This is a layout diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/customTemplateEscapingGuesser.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/customTemplateEscapingGuesser.php new file mode 100644 index 0000000000000000000000000000000000000000..ab429237bb43c0346b69ea972a9e8b2145f2dc0a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/customTemplateEscapingGuesser.php @@ -0,0 +1,6 @@ +loadFromExtension('twig', array( + 'autoescape_service' => 'my_project.some_bundle.template_escaping_guesser', + 'autoescape_service_method' => 'guess', +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/empty.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/empty.php new file mode 100644 index 0000000000000000000000000000000000000000..efd2df5f47918744ef9d97385ee81394ef8a1f41 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/empty.php @@ -0,0 +1,3 @@ +loadFromExtension('twig', array()); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/extra.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/extra.php new file mode 100644 index 0000000000000000000000000000000000000000..28b8281a99e870eb3c73e9de06ce855705a51a4b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/extra.php @@ -0,0 +1,7 @@ +loadFromExtension('twig', array( + 'paths' => array( + 'namespaced_path3' => 'namespace3', + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php new file mode 100644 index 0000000000000000000000000000000000000000..9385131730d864438c1cc73e05d3111e9d84ece9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php @@ -0,0 +1,26 @@ +loadFromExtension('twig', array( + 'form_themes' => array( + 'MyBundle::form.html.twig', + ), + 'globals' => array( + 'foo' => '@bar', + 'baz' => '@@qux', + 'pi' => 3.14, + 'bad' => array('key' => 'foo'), + ), + 'auto_reload' => true, + 'autoescape' => true, + 'base_template_class' => 'stdClass', + 'cache' => '/tmp', + 'charset' => 'ISO-8859-1', + 'debug' => true, + 'strict_variables' => true, + 'paths' => array( + 'path1', + 'path2', + 'namespaced_path1' => 'namespace1', + 'namespaced_path2' => 'namespace2', + ), +)); diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/customTemplateEscapingGuesser.xml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/customTemplateEscapingGuesser.xml new file mode 100644 index 0000000000000000000000000000000000000000..fa28361cc8af0e3136039396b1fb0a54026855ac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/customTemplateEscapingGuesser.xml @@ -0,0 +1,10 @@ + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/empty.xml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/empty.xml new file mode 100644 index 0000000000000000000000000000000000000000..771e382e470029a6f5839d623d65d652ef832659 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/empty.xml @@ -0,0 +1,10 @@ + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/extra.xml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/extra.xml new file mode 100644 index 0000000000000000000000000000000000000000..174b3e1b6c2d69125663daf9ea7a208b83ddb59d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/extra.xml @@ -0,0 +1,12 @@ + + + + + + namespaced_path3 + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/full.xml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/full.xml new file mode 100644 index 0000000000000000000000000000000000000000..14c95af97e8f4f67c7230c3b7d212dd96d051a0b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/full.xml @@ -0,0 +1,19 @@ + + + + + + MyBundle::form.html.twig + + @@qux + 3.14 + path1 + path2 + namespaced_path1 + namespaced_path2 + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/customTemplateEscapingGuesser.yml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/customTemplateEscapingGuesser.yml new file mode 100644 index 0000000000000000000000000000000000000000..eb26e7165bb090342fb9961b0a0025bddbb46850 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/customTemplateEscapingGuesser.yml @@ -0,0 +1,3 @@ +twig: + autoescape_service: my_project.some_bundle.template_escaping_guesser + autoescape_service_method: guess diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/empty.yml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/empty.yml new file mode 100644 index 0000000000000000000000000000000000000000..a472b2698e5cd72c9385927452fe31df6669835c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/empty.yml @@ -0,0 +1 @@ +twig: diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/extra.yml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/extra.yml new file mode 100644 index 0000000000000000000000000000000000000000..3c5e6a3b5937a702f426c23641e584b6d1a250d7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/extra.yml @@ -0,0 +1,3 @@ +twig: + paths: + namespaced_path3: namespace3 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/full.yml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/full.yml new file mode 100644 index 0000000000000000000000000000000000000000..68ecf463f09f6b65ad80c6015cca29c1e616c3e4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/full.yml @@ -0,0 +1,20 @@ +twig: + form_themes: + - MyBundle::form.html.twig + globals: + foo: "@bar" + baz: "@@qux" + pi: 3.14 + bad: {key: foo} + auto_reload: true + autoescape: true + base_template_class: stdClass + cache: /tmp + charset: ISO-8859-1 + debug: true + strict_variables: true + paths: + path1: '' + path2: '' + namespaced_path1: namespace1 + namespaced_path2: namespace2 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4073653c8b571f392d8f7659b5d2a6f2c588c891 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php @@ -0,0 +1,327 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Tests\DependencyInjection; + +use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\RuntimeLoaderPass; +use Symfony\Bundle\TwigBundle\DependencyInjection\TwigExtension; +use Symfony\Bundle\TwigBundle\Tests\TestCase; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\DependencyInjection\Compiler\PassConfig; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; + +class TwigExtensionTest extends TestCase +{ + public function testLoadEmptyConfiguration() + { + $container = $this->createContainer(); + $container->registerExtension(new TwigExtension()); + $container->loadFromExtension('twig', array()); + $this->compileContainer($container); + + $this->assertEquals('Twig_Environment', $container->getDefinition('twig')->getClass(), '->load() loads the twig.xml file'); + + $this->assertContains('form_div_layout.html.twig', $container->getParameter('twig.form.resources'), '->load() includes default template for form resources'); + + // Twig options + $options = $container->getDefinition('twig')->getArgument(1); + $this->assertEquals('%kernel.cache_dir%/twig', $options['cache'], '->load() sets default value for cache option'); + $this->assertEquals('%kernel.charset%', $options['charset'], '->load() sets default value for charset option'); + $this->assertEquals('%kernel.debug%', $options['debug'], '->load() sets default value for debug option'); + } + + /** + * @dataProvider getFormats + */ + public function testLoadFullConfiguration($format) + { + $container = $this->createContainer(); + $container->registerExtension(new TwigExtension()); + $this->loadFromFile($container, 'full', $format); + $this->compileContainer($container); + + $this->assertEquals('Twig_Environment', $container->getDefinition('twig')->getClass(), '->load() loads the twig.xml file'); + + // Form resources + $resources = $container->getParameter('twig.form.resources'); + $this->assertContains('form_div_layout.html.twig', $resources, '->load() includes default template for form resources'); + $this->assertContains('MyBundle::form.html.twig', $resources, '->load() merges new templates into form resources'); + + // Globals + $calls = $container->getDefinition('twig')->getMethodCalls(); + $this->assertEquals('app', $calls[0][1][0], '->load() registers services as Twig globals'); + $this->assertEquals(new Reference('twig.app_variable'), $calls[0][1][1]); + $this->assertEquals('foo', $calls[2][1][0], '->load() registers services as Twig globals'); + $this->assertEquals(new Reference('bar'), $calls[2][1][1], '->load() registers services as Twig globals'); + $this->assertEquals('baz', $calls[3][1][0], '->load() registers variables as Twig globals'); + $this->assertEquals('@qux', $calls[3][1][1], '->load() allows escaping of service identifiers'); + $this->assertEquals('pi', $calls[4][1][0], '->load() registers variables as Twig globals'); + $this->assertEquals(3.14, $calls[4][1][1], '->load() registers variables as Twig globals'); + + // Yaml and Php specific configs + if (in_array($format, array('yml', 'php'))) { + $this->assertEquals('bad', $calls[5][1][0], '->load() registers variables as Twig globals'); + $this->assertEquals(array('key' => 'foo'), $calls[5][1][1], '->load() registers variables as Twig globals'); + } + + // Twig options + $options = $container->getDefinition('twig')->getArgument(1); + $this->assertTrue($options['auto_reload'], '->load() sets the auto_reload option'); + $this->assertTrue($options['autoescape'], '->load() sets the autoescape option'); + $this->assertEquals('stdClass', $options['base_template_class'], '->load() sets the base_template_class option'); + $this->assertEquals('/tmp', $options['cache'], '->load() sets the cache option'); + $this->assertEquals('ISO-8859-1', $options['charset'], '->load() sets the charset option'); + $this->assertTrue($options['debug'], '->load() sets the debug option'); + $this->assertTrue($options['strict_variables'], '->load() sets the strict_variables option'); + } + + /** + * @dataProvider getFormats + */ + public function testLoadCustomTemplateEscapingGuesserConfiguration($format) + { + $container = $this->createContainer(); + $container->registerExtension(new TwigExtension()); + $this->loadFromFile($container, 'customTemplateEscapingGuesser', $format); + $this->compileContainer($container); + + $options = $container->getDefinition('twig')->getArgument(1); + $this->assertEquals(array(new Reference('my_project.some_bundle.template_escaping_guesser'), 'guess'), $options['autoescape']); + } + + /** + * @dataProvider getFormats + */ + public function testLoadDefaultTemplateEscapingGuesserConfiguration($format) + { + $container = $this->createContainer(); + $container->registerExtension(new TwigExtension()); + $this->loadFromFile($container, 'empty', $format); + $this->compileContainer($container); + + $options = $container->getDefinition('twig')->getArgument(1); + $this->assertEquals('name', $options['autoescape']); + } + + public function testGlobalsWithDifferentTypesAndValues() + { + $globals = array( + 'array' => array(), + 'false' => false, + 'float' => 2.0, + 'integer' => 3, + 'null' => null, + 'object' => new \stdClass(), + 'string' => 'foo', + 'true' => true, + ); + + $container = $this->createContainer(); + $container->registerExtension(new TwigExtension()); + $container->loadFromExtension('twig', array('globals' => $globals)); + $this->compileContainer($container); + + $calls = $container->getDefinition('twig')->getMethodCalls(); + foreach (array_slice($calls, 2) as $call) { + list($name, $value) = each($globals); + $this->assertEquals($name, $call[1][0]); + $this->assertSame($value, $call[1][1]); + } + } + + /** + * @dataProvider getFormats + */ + public function testTwigLoaderPaths($format) + { + $container = $this->createContainer(); + $container->registerExtension(new TwigExtension()); + $this->loadFromFile($container, 'full', $format); + $this->loadFromFile($container, 'extra', $format); + $this->compileContainer($container); + + $def = $container->getDefinition('twig.loader.native_filesystem'); + $paths = array(); + foreach ($def->getMethodCalls() as $call) { + if ('addPath' === $call[0] && false === strpos($call[1][0], 'Form')) { + $paths[] = $call[1]; + } + } + + $this->assertEquals(array( + array('path1'), + array('path2'), + array('namespaced_path1', 'namespace1'), + array('namespaced_path2', 'namespace2'), + array('namespaced_path3', 'namespace3'), + array(__DIR__.'/Fixtures/Bundle/ChildChildChildChildTwigBundle/Resources/views', 'ChildChildChildChildTwig'), + array(__DIR__.'/Fixtures/Bundle/ChildChildChildChildTwigBundle/Resources/views', 'ChildChildChildTwig'), + array(__DIR__.'/Fixtures/Bundle/ChildChildChildTwigBundle/Resources/views', 'ChildChildChildTwig'), + array(__DIR__.'/Fixtures/Bundle/ChildChildChildChildTwigBundle/Resources/views', 'Twig'), + array(__DIR__.'/Fixtures/Bundle/ChildChildChildTwigBundle/Resources/views', 'Twig'), + array(__DIR__.'/Fixtures/Bundle/ChildChildTwigBundle/Resources/views', 'Twig'), + array(__DIR__.'/Fixtures/Bundle/ChildTwigBundle/Resources/views', 'Twig'), + array(__DIR__.'/Fixtures/Resources/TwigBundle/views', 'Twig'), + array(realpath(__DIR__.'/../..').'/Resources/views', 'Twig'), + array(__DIR__.'/Fixtures/Bundle/ChildChildChildChildTwigBundle/Resources/views', 'ChildTwig'), + array(__DIR__.'/Fixtures/Bundle/ChildChildChildTwigBundle/Resources/views', 'ChildTwig'), + array(__DIR__.'/Fixtures/Bundle/ChildChildTwigBundle/Resources/views', 'ChildTwig'), + array(__DIR__.'/Fixtures/Bundle/ChildTwigBundle/Resources/views', 'ChildTwig'), + array(__DIR__.'/Fixtures/Bundle/ChildChildChildChildTwigBundle/Resources/views', 'ChildChildTwig'), + array(__DIR__.'/Fixtures/Bundle/ChildChildChildTwigBundle/Resources/views', 'ChildChildTwig'), + array(__DIR__.'/Fixtures/Bundle/ChildChildTwigBundle/Resources/views', 'ChildChildTwig'), + array(__DIR__.'/Fixtures/Resources/views'), + ), $paths); + } + + public function getFormats() + { + return array( + array('php'), + array('yml'), + array('xml'), + ); + } + + /** + * @dataProvider stopwatchExtensionAvailabilityProvider + */ + public function testStopwatchExtensionAvailability($debug, $stopwatchEnabled, $expected) + { + $container = $this->createContainer(); + $container->setParameter('kernel.debug', $debug); + if ($stopwatchEnabled) { + $container->register('debug.stopwatch', 'Symfony\Component\Stopwatch\Stopwatch'); + } + $container->registerExtension(new TwigExtension()); + $container->loadFromExtension('twig', array()); + $this->compileContainer($container); + + $tokenParsers = $container->get('twig.extension.debug.stopwatch')->getTokenParsers(); + $stopwatchIsAvailable = new \ReflectionProperty($tokenParsers[0], 'stopwatchIsAvailable'); + $stopwatchIsAvailable->setAccessible(true); + + $this->assertSame($expected, $stopwatchIsAvailable->getValue($tokenParsers[0])); + } + + public function stopwatchExtensionAvailabilityProvider() + { + return array( + 'debug-and-stopwatch-enabled' => array(true, true, true), + 'only-stopwatch-enabled' => array(false, true, false), + 'only-debug-enabled' => array(true, false, false), + 'debug-and-stopwatch-disabled' => array(false, false, false), + ); + } + + public function testRuntimeLoader() + { + $container = $this->createContainer(); + $container->registerExtension(new TwigExtension()); + $container->loadFromExtension('twig', array()); + $container->setParameter('kernel.environment', 'test'); + $container->setParameter('debug.file_link_format', 'test'); + $container->setParameter('foo', 'FooClass'); + $container->register('http_kernel', 'FooClass'); + $container->register('templating.locator', 'FooClass'); + $container->register('templating.name_parser', 'FooClass'); + $container->register('foo', '%foo%')->addTag('twig.runtime'); + $container->addCompilerPass(new RuntimeLoaderPass(), PassConfig::TYPE_BEFORE_REMOVING); + $container->getCompilerPassConfig()->setRemovingPasses(array()); + $container->compile(); + + $loader = $container->getDefinition('twig.runtime_loader'); + $args = $loader->getArgument(1); + $this->assertArrayHasKey('Symfony\Bridge\Twig\Form\TwigRenderer', $args); + $this->assertArrayHasKey('FooClass', $args); + $this->assertContains('twig.form.renderer', $args); + $this->assertContains('foo', $args); + } + + private function createContainer() + { + $container = new ContainerBuilder(new ParameterBag(array( + 'kernel.cache_dir' => __DIR__, + 'kernel.root_dir' => __DIR__.'/Fixtures', + 'kernel.charset' => 'UTF-8', + 'kernel.debug' => false, + 'kernel.bundles' => array( + 'TwigBundle' => 'Symfony\\Bundle\\TwigBundle\\TwigBundle', + 'ChildTwigBundle' => 'Symfony\\Bundle\\TwigBundle\\Tests\\DependencyInjection\\Fixtures\\Bundle\\ChildTwigBundle\\ChildTwigBundle', + 'ChildChildTwigBundle' => 'Symfony\\Bundle\\TwigBundle\\Tests\\DependencyInjection\\Fixtures\\Bundle\\ChildChildTwigBundle\\ChildChildTwigBundle', + 'ChildChildChildTwigBundle' => 'Symfony\\Bundle\\TwigBundle\\Tests\\DependencyInjection\\Fixtures\\Bundle\\ChildChildChildTwigBundle\\ChildChildChildTwigBundle', + 'ChildChildChildChildTwigBundle' => 'Symfony\\Bundle\\TwigBundle\\Tests\\DependencyInjection\\Fixtures\\Bundle\\ChildChildChildChildTwigBundle\\ChildChildChildChildTwigBundle', + ), + 'kernel.bundles_metadata' => array( + 'ChildChildChildChildTwigBundle' => array( + 'namespace' => 'Symfony\\Bundle\\TwigBundle\\Tests\\DependencyInjection\\Fixtures\\Bundle\\ChildChildChildChildTwigBundle\\ChildChildChildChildTwigBundle', + 'parent' => 'ChildChildChildTwigBundle', + 'path' => __DIR__.'/Fixtures/Bundle/ChildChildChildChildTwigBundle', + ), + 'TwigBundle' => array( + 'namespace' => 'Symfony\\Bundle\\TwigBundle', + 'parent' => null, + 'path' => realpath(__DIR__.'/../..'), + ), + 'ChildTwigBundle' => array( + 'namespace' => 'Symfony\\Bundle\\TwigBundle\\Tests\\DependencyInjection\\Fixtures\\Bundle\\ChildTwigBundle\\ChildTwigBundle', + 'parent' => 'TwigBundle', + 'path' => __DIR__.'/Fixtures/Bundle/ChildTwigBundle', + ), + 'ChildChildChildTwigBundle' => array( + 'namespace' => 'Symfony\\Bundle\\TwigBundle\\Tests\\DependencyInjection\\Fixtures\\Bundle\\ChildChildChildTwigBundle\\ChildChildChildTwigBundle', + 'parent' => 'ChildChildTwigBundle', + 'path' => __DIR__.'/Fixtures/Bundle/ChildChildChildTwigBundle', + ), + 'ChildChildTwigBundle' => array( + 'namespace' => 'Symfony\\Bundle\\TwigBundle\\Tests\\DependencyInjection\\Fixtures\\Bundle\\ChildChildTwigBundle\\ChildChildTwigBundle', + 'parent' => 'ChildTwigBundle', + 'path' => __DIR__.'/Fixtures/Bundle/ChildChildTwigBundle', + ), + ), + ))); + + return $container; + } + + private function compileContainer(ContainerBuilder $container) + { + $container->getCompilerPassConfig()->setOptimizationPasses(array()); + $container->getCompilerPassConfig()->setRemovingPasses(array()); + $container->compile(); + } + + private function loadFromFile(ContainerBuilder $container, $file, $format) + { + $locator = new FileLocator(__DIR__.'/Fixtures/'.$format); + + switch ($format) { + case 'php': + $loader = new PhpFileLoader($container, $locator); + break; + case 'xml': + $loader = new XmlFileLoader($container, $locator); + break; + case 'yml': + $loader = new YamlFileLoader($container, $locator); + break; + default: + throw new \InvalidArgumentException(sprintf('Unsupported format: %s', $format)); + } + + $loader->load($file.'.'.$format); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/BarBundle/Resources/views/index.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/BarBundle/Resources/views/index.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..1975b0e15986ad679bddf9ae9e9ae22ad2b24a51 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/BarBundle/Resources/views/index.html.twig @@ -0,0 +1 @@ +{# Twig template #} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Foo/index.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Foo/index.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..1975b0e15986ad679bddf9ae9e9ae22ad2b24a51 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Foo/index.html.twig @@ -0,0 +1 @@ +{# Twig template #} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Resources/views/layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Resources/views/layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..1975b0e15986ad679bddf9ae9e9ae22ad2b24a51 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Resources/views/layout.html.twig @@ -0,0 +1 @@ +{# Twig template #} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Resources/views/sub/sub.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Resources/views/sub/sub.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..1975b0e15986ad679bddf9ae9e9ae22ad2b24a51 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Resources/views/sub/sub.html.twig @@ -0,0 +1 @@ +{# Twig template #} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php new file mode 100644 index 0000000000000000000000000000000000000000..83bedda6773c3e1cd27dcc9a07d7b30ecf585d73 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Tests; + +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; +use Symfony\Bundle\TwigBundle\TwigBundle; + +class CacheWarmingTest extends TestCase +{ + public function testCacheIsProperlyWarmedWhenTemplatingIsAvailable() + { + $kernel = new CacheWarmingKernel(true); + $kernel->boot(); + + $warmer = $kernel->getContainer()->get('cache_warmer'); + $warmer->enableOptionalWarmers(); + $warmer->warmUp($kernel->getCacheDir()); + + $this->assertFileExists($kernel->getCacheDir().'/twig'); + } + + public function testCacheIsProperlyWarmedWhenTemplatingIsDisabled() + { + $kernel = new CacheWarmingKernel(false); + $kernel->boot(); + + $warmer = $kernel->getContainer()->get('cache_warmer'); + $warmer->enableOptionalWarmers(); + $warmer->warmUp($kernel->getCacheDir()); + + $this->assertFileExists($kernel->getCacheDir().'/twig'); + } + + protected function setUp() + { + $this->deleteTempDir(); + } + + protected function tearDown() + { + $this->deleteTempDir(); + } + + private function deleteTempDir() + { + if (!file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION.'/CacheWarmingKernel')) { + return; + } + + $fs = new Filesystem(); + $fs->remove($dir); + } +} + +class CacheWarmingKernel extends Kernel +{ + private $withTemplating; + + public function __construct($withTemplating) + { + $this->withTemplating = $withTemplating; + + parent::__construct(($withTemplating ? 'with' : 'without').'_templating', true); + } + + public function getName() + { + return 'CacheWarming'; + } + + public function registerBundles() + { + return array(new FrameworkBundle(), new TwigBundle()); + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + $loader->load(function ($container) { + $container->loadFromExtension('framework', array( + 'secret' => '$ecret', + 'form' => array('enabled' => false), + )); + }); + + if ($this->withTemplating) { + $loader->load(function ($container) { + $container->loadFromExtension('framework', array( + 'secret' => '$ecret', + 'templating' => array('engines' => array('twig')), + 'router' => array('resource' => '%kernel.root_dir%/Resources/config/empty_routing.yml'), + 'form' => array('enabled' => false), + )); + }); + } + } + + public function getCacheDir() + { + return sys_get_temp_dir().'/'.Kernel::VERSION.'/CacheWarmingKernel/cache/'.$this->environment; + } + + public function getLogDir() + { + return sys_get_temp_dir().'/'.Kernel::VERSION.'/CacheWarmingKernel/logs'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3cf0268203050b87b72f1fb7f1740f28f700a793 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Tests; + +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Bundle\FrameworkBundle\FrameworkBundle; +use Symfony\Bundle\TwigBundle\TwigBundle; + +class NoTemplatingEntryTest extends TestCase +{ + public function test() + { + $kernel = new NoTemplatingEntryKernel('dev', true); + $kernel->boot(); + + $container = $kernel->getContainer(); + $content = $container->get('twig')->render('index.html.twig'); + $this->assertContains('{ a: b }', $content); + } + + protected function setUp() + { + $this->deleteTempDir(); + } + + protected function tearDown() + { + $this->deleteTempDir(); + } + + protected function deleteTempDir() + { + if (!file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION.'/NoTemplatingEntryKernel')) { + return; + } + + $fs = new Filesystem(); + $fs->remove($dir); + } +} + +class NoTemplatingEntryKernel extends Kernel +{ + public function registerBundles() + { + return array(new FrameworkBundle(), new TwigBundle()); + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + $loader->load(function ($container) { + $container->loadFromExtension('framework', array( + 'secret' => '$ecret', + 'form' => array('enabled' => false), + )); + }); + } + + public function getCacheDir() + { + return sys_get_temp_dir().'/'.Kernel::VERSION.'/NoTemplatingEntryKernel/cache/'.$this->environment; + } + + public function getLogDir() + { + return sys_get_temp_dir().'/'.Kernel::VERSION.'/NoTemplatingEntryKernel/logs'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Functional/Resources/config/empty_routing.yml b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Functional/Resources/config/empty_routing.yml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Functional/Resources/views/index.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Functional/Resources/views/index.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..ddc4eb4404eb568052cecbdd024194b10167b008 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Functional/Resources/views/index.html.twig @@ -0,0 +1 @@ +{{ {a: 'b'}|yaml_encode }} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Loader/FilesystemLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Loader/FilesystemLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a7abdecb8789627d18a09b188ac1116b3c518ef7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/Loader/FilesystemLoaderTest.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Tests\Loader; + +use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; +use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader; +use Symfony\Bundle\TwigBundle\Tests\TestCase; + +class FilesystemLoaderTest extends TestCase +{ + public function testGetSourceContext() + { + $parser = $this->getMockBuilder('Symfony\Component\Templating\TemplateNameParserInterface')->getMock(); + $locator = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); + $locator + ->expects($this->once()) + ->method('locate') + ->will($this->returnValue(__DIR__.'/../DependencyInjection/Fixtures/Resources/views/layout.html.twig')) + ; + $loader = new FilesystemLoader($locator, $parser); + $loader->addPath(__DIR__.'/../DependencyInjection/Fixtures/Resources/views', 'namespace'); + + // Twig-style + $this->assertEquals("This is a layout\n", $loader->getSourceContext('@namespace/layout.html.twig')->getCode()); + + // Symfony-style + $this->assertEquals("This is a layout\n", $loader->getSourceContext('TwigBundle::layout.html.twig')->getCode()); + } + + public function testExists() + { + // should return true for templates that Twig does not find, but Symfony does + $parser = $this->getMockBuilder('Symfony\Component\Templating\TemplateNameParserInterface')->getMock(); + $locator = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); + $locator + ->expects($this->once()) + ->method('locate') + ->will($this->returnValue($template = __DIR__.'/../DependencyInjection/Fixtures/Resources/views/layout.html.twig')) + ; + $loader = new FilesystemLoader($locator, $parser); + + $this->assertTrue($loader->exists($template)); + } + + /** + * @expectedException \Twig_Error_Loader + */ + public function testTwigErrorIfLocatorThrowsInvalid() + { + $parser = $this->getMockBuilder('Symfony\Component\Templating\TemplateNameParserInterface')->getMock(); + $parser + ->expects($this->once()) + ->method('parse') + ->with('name.format.engine') + ->will($this->returnValue(new TemplateReference('', '', 'name', 'format', 'engine'))) + ; + + $locator = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); + $locator + ->expects($this->once()) + ->method('locate') + ->will($this->throwException(new \InvalidArgumentException('Unable to find template "NonExistent".'))) + ; + + $loader = new FilesystemLoader($locator, $parser); + $loader->getCacheKey('name.format.engine'); + } + + /** + * @expectedException \Twig_Error_Loader + */ + public function testTwigErrorIfLocatorReturnsFalse() + { + $parser = $this->getMockBuilder('Symfony\Component\Templating\TemplateNameParserInterface')->getMock(); + $parser + ->expects($this->once()) + ->method('parse') + ->with('name.format.engine') + ->will($this->returnValue(new TemplateReference('', '', 'name', 'format', 'engine'))) + ; + + $locator = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); + $locator + ->expects($this->once()) + ->method('locate') + ->will($this->returnValue(false)) + ; + + $loader = new FilesystemLoader($locator, $parser); + $loader->getCacheKey('name.format.engine'); + } + + /** + * @expectedException \Twig_Error_Loader + * @expectedExceptionMessageRegExp /Unable to find template "name\.format\.engine" \(looked into: .*Tests.Loader.\.\..DependencyInjection.Fixtures.Resources.views\)/ + */ + public function testTwigErrorIfTemplateDoesNotExist() + { + $parser = $this->getMockBuilder('Symfony\Component\Templating\TemplateNameParserInterface')->getMock(); + $locator = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); + + $loader = new FilesystemLoader($locator, $parser); + $loader->addPath(__DIR__.'/../DependencyInjection/Fixtures/Resources/views'); + + $method = new \ReflectionMethod('Symfony\Bundle\TwigBundle\Loader\FilesystemLoader', 'findTemplate'); + $method->setAccessible(true); + $method->invoke($loader, 'name.format.engine'); + } + + public function testTwigSoftErrorIfTemplateDoesNotExist() + { + $parser = $this->getMockBuilder('Symfony\Component\Templating\TemplateNameParserInterface')->getMock(); + $locator = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); + + $loader = new FilesystemLoader($locator, $parser); + $loader->addPath(__DIR__.'/../DependencyInjection/Fixtures/Resources/views'); + + $method = new \ReflectionMethod('Symfony\Bundle\TwigBundle\Loader\FilesystemLoader', 'findTemplate'); + $method->setAccessible(true); + $this->assertFalse($method->invoke($loader, 'name.format.engine', false)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/TemplateIteratorTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/TemplateIteratorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..636d5796f874f39d510c0e023b31de4dbc3860ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/TemplateIteratorTest.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Tests; + +use Symfony\Bundle\TwigBundle\TemplateIterator; + +class TemplateIteratorTest extends TestCase +{ + public function testGetIterator() + { + $bundle = $this->getMockBuilder('Symfony\Component\HttpKernel\Bundle\BundleInterface')->getMock(); + $bundle->expects($this->any())->method('getName')->will($this->returnValue('BarBundle')); + $bundle->expects($this->any())->method('getPath')->will($this->returnValue(__DIR__.'/Fixtures/templates/BarBundle')); + + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\Kernel')->disableOriginalConstructor()->getMock(); + $kernel->expects($this->any())->method('getBundles')->will($this->returnValue(array( + $bundle, + ))); + $iterator = new TemplateIterator($kernel, __DIR__.'/Fixtures/templates', array(__DIR__.'/Fixtures/templates/Foo' => 'Foo')); + + $sorted = iterator_to_array($iterator); + sort($sorted); + $this->assertEquals( + array( + '@Bar/index.html.twig', + '@Foo/index.html.twig', + 'layout.html.twig', + 'sub/sub.html.twig', + ), + $sorted + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/TestCase.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/TestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..800be3008a44602f7e857b1d4f83304bb31fb424 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Tests/TestCase.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle\Tests; + +use PHPUnit\Framework\TestCase as PHPUnitTestCase; + +class TestCase extends PHPUnitTestCase +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..76d0676409b88d42180b8d7f89e0ade88ed9f193 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigBundle.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\DependencyInjection\Compiler\PassConfig; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\TwigEnvironmentPass; +use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\TwigLoaderPass; +use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\ExceptionListenerPass; +use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\ExtensionPass; +use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\RuntimeLoaderPass; + +/** + * Bundle. + * + * @author Fabien Potencier + */ +class TwigBundle extends Bundle +{ + public function build(ContainerBuilder $container) + { + parent::build($container); + + $container->addCompilerPass(new ExtensionPass()); + $container->addCompilerPass(new TwigEnvironmentPass()); + $container->addCompilerPass(new TwigLoaderPass()); + $container->addCompilerPass(new ExceptionListenerPass()); + $container->addCompilerPass(new RuntimeLoaderPass(), PassConfig::TYPE_BEFORE_REMOVING); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php new file mode 100644 index 0000000000000000000000000000000000000000..503c55f6af7cb092e6dd335751b728b889e4f4dd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\TwigBundle; + +use Symfony\Bridge\Twig\TwigEngine as BaseEngine; +use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface; +use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; +use Symfony\Component\Templating\TemplateNameParserInterface; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Config\FileLocatorInterface; + +/** + * This engine renders Twig templates. + * + * @author Fabien Potencier + */ +class TwigEngine extends BaseEngine implements EngineInterface +{ + protected $locator; + + /** + * Constructor. + * + * @param \Twig_Environment $environment A \Twig_Environment instance + * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance + * @param FileLocatorInterface $locator A FileLocatorInterface instance + */ + public function __construct(\Twig_Environment $environment, TemplateNameParserInterface $parser, FileLocatorInterface $locator) + { + parent::__construct($environment, $parser); + + $this->locator = $locator; + } + + /** + * {@inheritdoc} + */ + public function render($name, array $parameters = array()) + { + try { + return parent::render($name, $parameters); + } catch (\Twig_Error $e) { + if ($name instanceof TemplateReference && !method_exists($e, 'setSourceContext')) { + try { + // try to get the real name of the template where the error occurred + $name = $e->getTemplateName(); + $path = (string) $this->locator->locate($this->parser->parse($name)); + $e->setTemplateName($path); + } catch (\Exception $e2) { + } + } + + throw $e; + } + } + + /** + * {@inheritdoc} + * + * @throws \Twig_Error if something went wrong like a thrown exception while rendering the template + */ + public function renderResponse($view, array $parameters = array(), Response $response = null) + { + if (null === $response) { + $response = new Response(); + } + + $response->setContent($this->render($view, $parameters)); + + return $response; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/composer.json b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..8b51254f13dd973a83f1c38c3187370a39a44c9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/composer.json @@ -0,0 +1,51 @@ +{ + "name": "symfony/twig-bundle", + "type": "symfony-bundle", + "description": "Symfony TwigBundle", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/config": "~3.2", + "symfony/twig-bridge": "^3.2.1", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/http-kernel": "~2.8.16|~3.1.9|^3.2.2", + "twig/twig": "~1.28|~2.0" + }, + "require-dev": { + "symfony/asset": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/form": "~2.8|~3.0", + "symfony/routing": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0", + "symfony/framework-bundle": "^3.2.2", + "doctrine/annotations": "~1.0" + }, + "autoload": { + "psr-4": { "Symfony\\Bundle\\TwigBundle\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..9a8c38f26ef33f9b57d4edee9680cb37e8675470 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..64102cc761c341ec0f68d7edefa30fa8a8d7b50c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md @@ -0,0 +1,40 @@ +CHANGELOG +========= + +3.1.0 +----- + + * added information about redirected and forwarded requests to the profiler + +3.0.0 +----- + + * removed profiler:import and profiler:export commands + +2.8.0 +----- + + * deprecated profiler:import and profiler:export commands + +2.7.0 +----- + + * [BC BREAK] if you are using a DB to store profiles, the table must be dropped + * added the HTTP status code to profiles + +2.3.0 +----- + + * draw retina canvas if devicePixelRatio is bigger than 1 + +2.1.0 +----- + + * deprecated the verbose setting (not relevant anymore) + * [BC BREAK] You must clear old profiles after upgrading to 2.1 (don't forget + to remove the table if you are using a DB) + * added support for the request method + * added a routing panel + * added a timeline panel + * The toolbar position can now be configured via the `position` option (can + be `top` or `bottom`) diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php new file mode 100644 index 0000000000000000000000000000000000000000..fd0dbecd2bbec20c07b3d9e6a6be17ed059513e6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php @@ -0,0 +1,128 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Controller; + +use Symfony\Component\HttpKernel\Profiler\Profiler; +use Symfony\Component\Debug\ExceptionHandler; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpFoundation\Response; + +/** + * ExceptionController. + * + * @author Fabien Potencier + */ +class ExceptionController +{ + protected $twig; + protected $debug; + protected $profiler; + + public function __construct(Profiler $profiler = null, \Twig_Environment $twig, $debug) + { + $this->profiler = $profiler; + $this->twig = $twig; + $this->debug = $debug; + } + + /** + * Renders the exception panel for the given token. + * + * @param string $token The profiler token + * + * @return Response A Response instance + * + * @throws NotFoundHttpException + */ + public function showAction($token) + { + if (null === $this->profiler) { + throw new NotFoundHttpException('The profiler must be enabled.'); + } + + $this->profiler->disable(); + + $exception = $this->profiler->loadProfile($token)->getCollector('exception')->getException(); + $template = $this->getTemplate(); + + if (!$this->twig->getLoader()->exists($template)) { + $handler = new ExceptionHandler($this->debug, $this->twig->getCharset()); + + return new Response($handler->getContent($exception), 200, array('Content-Type' => 'text/html')); + } + + $code = $exception->getStatusCode(); + + return new Response($this->twig->render( + $template, + array( + 'status_code' => $code, + 'status_text' => Response::$statusTexts[$code], + 'exception' => $exception, + 'logger' => null, + 'currentContent' => '', + ) + ), 200, array('Content-Type' => 'text/html')); + } + + /** + * Renders the exception panel stylesheet for the given token. + * + * @param string $token The profiler token + * + * @return Response A Response instance + * + * @throws NotFoundHttpException + */ + public function cssAction($token) + { + if (null === $this->profiler) { + throw new NotFoundHttpException('The profiler must be enabled.'); + } + + $this->profiler->disable(); + + $exception = $this->profiler->loadProfile($token)->getCollector('exception')->getException(); + $template = $this->getTemplate(); + + if (!$this->templateExists($template)) { + $handler = new ExceptionHandler($this->debug, $this->twig->getCharset()); + + return new Response($handler->getStylesheet($exception), 200, array('Content-Type' => 'text/css')); + } + + return new Response($this->twig->render('@WebProfiler/Collector/exception.css.twig'), 200, array('Content-Type' => 'text/css')); + } + + protected function getTemplate() + { + return '@Twig/Exception/'.($this->debug ? 'exception' : 'error').'.html.twig'; + } + + // to be removed when the minimum required version of Twig is >= 2.0 + protected function templateExists($template) + { + $loader = $this->twig->getLoader(); + if ($loader instanceof \Twig_ExistsLoaderInterface) { + return $loader->exists($template); + } + + try { + $loader->getSource($template); + + return true; + } catch (\Twig_Error_Loader $e) { + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php new file mode 100644 index 0000000000000000000000000000000000000000..80750570e4c436c111f21bc183cd8ca67e327c79 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -0,0 +1,460 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Controller; + +use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler; +use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Profiler\Profiler; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; + +/** + * ProfilerController. + * + * @author Fabien Potencier + */ +class ProfilerController +{ + private $templateManager; + private $generator; + private $profiler; + private $twig; + private $templates; + private $toolbarPosition; + private $cspHandler; + private $baseDir; + + /** + * Constructor. + * + * @param UrlGeneratorInterface $generator The URL Generator + * @param Profiler $profiler The profiler + * @param \Twig_Environment $twig The twig environment + * @param array $templates The templates + * @param string $toolbarPosition The toolbar position (top, bottom, normal, or null -- use the configuration) + * @param string $baseDir The project root directory + */ + public function __construct(UrlGeneratorInterface $generator, Profiler $profiler = null, \Twig_Environment $twig, array $templates, $toolbarPosition = 'normal', ContentSecurityPolicyHandler $cspHandler = null, $baseDir = null) + { + $this->generator = $generator; + $this->profiler = $profiler; + $this->twig = $twig; + $this->templates = $templates; + $this->toolbarPosition = $toolbarPosition; + $this->cspHandler = $cspHandler; + $this->baseDir = $baseDir; + } + + /** + * Redirects to the last profiles. + * + * @return RedirectResponse A RedirectResponse instance + * + * @throws NotFoundHttpException + */ + public function homeAction() + { + if (null === $this->profiler) { + throw new NotFoundHttpException('The profiler must be enabled.'); + } + + $this->profiler->disable(); + + return new RedirectResponse($this->generator->generate('_profiler_search_results', array('token' => 'empty', 'limit' => 10)), 302, array('Content-Type' => 'text/html')); + } + + /** + * Renders a profiler panel for the given token. + * + * @param Request $request The current HTTP request + * @param string $token The profiler token + * + * @return Response A Response instance + * + * @throws NotFoundHttpException + */ + public function panelAction(Request $request, $token) + { + if (null === $this->profiler) { + throw new NotFoundHttpException('The profiler must be enabled.'); + } + + $this->profiler->disable(); + + if (null !== $this->cspHandler) { + $this->cspHandler->disableCsp(); + } + + $panel = $request->query->get('panel', 'request'); + $page = $request->query->get('page', 'home'); + + if ('latest' === $token && $latest = current($this->profiler->find(null, null, 1, null, null, null))) { + $token = $latest['token']; + } + + if (!$profile = $this->profiler->loadProfile($token)) { + return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array('about' => 'no_token', 'token' => $token, 'request' => $request)), 200, array('Content-Type' => 'text/html')); + } + + if (!$profile->hasCollector($panel)) { + throw new NotFoundHttpException(sprintf('Panel "%s" is not available for token "%s".', $panel, $token)); + } + + return new Response($this->twig->render($this->getTemplateManager()->getName($profile, $panel), array( + 'token' => $token, + 'profile' => $profile, + 'collector' => $profile->getCollector($panel), + 'panel' => $panel, + 'page' => $page, + 'request' => $request, + 'templates' => $this->getTemplateManager()->getNames($profile), + 'is_ajax' => $request->isXmlHttpRequest(), + 'profiler_markup_version' => 2, // 1 = original profiler, 2 = Symfony 2.8+ profiler + )), 200, array('Content-Type' => 'text/html')); + } + + /** + * Displays information page. + * + * @param Request $request The current HTTP Request + * @param string $about The about message + * + * @return Response A Response instance + * + * @throws NotFoundHttpException + */ + public function infoAction(Request $request, $about) + { + if (null === $this->profiler) { + throw new NotFoundHttpException('The profiler must be enabled.'); + } + + $this->profiler->disable(); + + if (null !== $this->cspHandler) { + $this->cspHandler->disableCsp(); + } + + return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array( + 'about' => $about, + 'request' => $request, + )), 200, array('Content-Type' => 'text/html')); + } + + /** + * Renders the Web Debug Toolbar. + * + * @param Request $request The current HTTP Request + * @param string $token The profiler token + * + * @return Response A Response instance + * + * @throws NotFoundHttpException + */ + public function toolbarAction(Request $request, $token) + { + if (null === $this->profiler) { + throw new NotFoundHttpException('The profiler must be enabled.'); + } + + $session = $request->getSession(); + + if (null !== $session && $session->isStarted() && $session->getFlashBag() instanceof AutoExpireFlashBag) { + // keep current flashes for one more request if using AutoExpireFlashBag + $session->getFlashBag()->setAll($session->getFlashBag()->peekAll()); + } + + if ('empty' === $token || null === $token) { + return new Response('', 200, array('Content-Type' => 'text/html')); + } + + $this->profiler->disable(); + + if (!$profile = $this->profiler->loadProfile($token)) { + return new Response('', 404, array('Content-Type' => 'text/html')); + } + + // the toolbar position (top, bottom, normal, or null -- use the configuration) + if (null === $position = $request->query->get('position')) { + $position = $this->toolbarPosition; + } + + $url = null; + try { + $url = $this->generator->generate('_profiler', array('token' => $token)); + } catch (\Exception $e) { + // the profiler is not enabled + } + + return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/toolbar.html.twig', array( + 'request' => $request, + 'position' => $position, + 'profile' => $profile, + 'templates' => $this->getTemplateManager()->getNames($profile), + 'profiler_url' => $url, + 'token' => $token, + 'profiler_markup_version' => 2, // 1 = original toolbar, 2 = Symfony 2.8+ toolbar + )); + } + + /** + * Renders the profiler search bar. + * + * @param Request $request The current HTTP Request + * + * @return Response A Response instance + * + * @throws NotFoundHttpException + */ + public function searchBarAction(Request $request) + { + if (null === $this->profiler) { + throw new NotFoundHttpException('The profiler must be enabled.'); + } + + $this->profiler->disable(); + + if (null !== $this->cspHandler) { + $this->cspHandler->disableCsp(); + } + + if (null === $session = $request->getSession()) { + $ip = + $method = + $statusCode = + $url = + $start = + $end = + $limit = + $token = null; + } else { + $ip = $request->query->get('ip', $session->get('_profiler_search_ip')); + $method = $request->query->get('method', $session->get('_profiler_search_method')); + $statusCode = $request->query->get('status_code', $session->get('_profiler_search_status_code')); + $url = $request->query->get('url', $session->get('_profiler_search_url')); + $start = $request->query->get('start', $session->get('_profiler_search_start')); + $end = $request->query->get('end', $session->get('_profiler_search_end')); + $limit = $request->query->get('limit', $session->get('_profiler_search_limit')); + $token = $request->query->get('token', $session->get('_profiler_search_token')); + } + + return new Response( + $this->twig->render('@WebProfiler/Profiler/search.html.twig', array( + 'token' => $token, + 'ip' => $ip, + 'method' => $method, + 'status_code' => $statusCode, + 'url' => $url, + 'start' => $start, + 'end' => $end, + 'limit' => $limit, + 'request' => $request, + )), + 200, + array('Content-Type' => 'text/html') + ); + } + + /** + * Renders the search results. + * + * @param Request $request The current HTTP Request + * @param string $token The token + * + * @return Response A Response instance + * + * @throws NotFoundHttpException + */ + public function searchResultsAction(Request $request, $token) + { + if (null === $this->profiler) { + throw new NotFoundHttpException('The profiler must be enabled.'); + } + + $this->profiler->disable(); + + if (null !== $this->cspHandler) { + $this->cspHandler->disableCsp(); + } + + $profile = $this->profiler->loadProfile($token); + + $ip = $request->query->get('ip'); + $method = $request->query->get('method'); + $statusCode = $request->query->get('status_code'); + $url = $request->query->get('url'); + $start = $request->query->get('start', null); + $end = $request->query->get('end', null); + $limit = $request->query->get('limit'); + + return new Response($this->twig->render('@WebProfiler/Profiler/results.html.twig', array( + 'request' => $request, + 'token' => $token, + 'profile' => $profile, + 'tokens' => $this->profiler->find($ip, $url, $limit, $method, $start, $end, $statusCode), + 'ip' => $ip, + 'method' => $method, + 'status_code' => $statusCode, + 'url' => $url, + 'start' => $start, + 'end' => $end, + 'limit' => $limit, + 'panel' => null, + )), 200, array('Content-Type' => 'text/html')); + } + + /** + * Narrows the search bar. + * + * @param Request $request The current HTTP Request + * + * @return Response A Response instance + * + * @throws NotFoundHttpException + */ + public function searchAction(Request $request) + { + if (null === $this->profiler) { + throw new NotFoundHttpException('The profiler must be enabled.'); + } + + $this->profiler->disable(); + + $ip = preg_replace('/[^:\d\.]/', '', $request->query->get('ip')); + $method = $request->query->get('method'); + $statusCode = $request->query->get('status_code'); + $url = $request->query->get('url'); + $start = $request->query->get('start', null); + $end = $request->query->get('end', null); + $limit = $request->query->get('limit'); + $token = $request->query->get('token'); + + if (null !== $session = $request->getSession()) { + $session->set('_profiler_search_ip', $ip); + $session->set('_profiler_search_method', $method); + $session->set('_profiler_search_status_code', $statusCode); + $session->set('_profiler_search_url', $url); + $session->set('_profiler_search_start', $start); + $session->set('_profiler_search_end', $end); + $session->set('_profiler_search_limit', $limit); + $session->set('_profiler_search_token', $token); + } + + if (!empty($token)) { + return new RedirectResponse($this->generator->generate('_profiler', array('token' => $token)), 302, array('Content-Type' => 'text/html')); + } + + $tokens = $this->profiler->find($ip, $url, $limit, $method, $start, $end, $statusCode); + + return new RedirectResponse($this->generator->generate('_profiler_search_results', array( + 'token' => $tokens ? $tokens[0]['token'] : 'empty', + 'ip' => $ip, + 'method' => $method, + 'status_code' => $statusCode, + 'url' => $url, + 'start' => $start, + 'end' => $end, + 'limit' => $limit, + )), 302, array('Content-Type' => 'text/html')); + } + + /** + * Displays the PHP info. + * + * @return Response A Response instance + * + * @throws NotFoundHttpException + */ + public function phpinfoAction() + { + if (null === $this->profiler) { + throw new NotFoundHttpException('The profiler must be enabled.'); + } + + $this->profiler->disable(); + + if (null !== $this->cspHandler) { + $this->cspHandler->disableCsp(); + } + + ob_start(); + phpinfo(); + $phpinfo = ob_get_clean(); + + return new Response($phpinfo, 200, array('Content-Type' => 'text/html')); + } + + /** + * Displays the source of a file. + * + * @return Response A Response instance + * + * @throws NotFoundHttpException + */ + public function openAction(Request $request) + { + if (null === $this->baseDir) { + throw new NotFoundHttpException('The base dir should be set.'); + } + + if ($this->profiler) { + $this->profiler->disable(); + } + + $file = $request->query->get('file'); + $line = $request->query->get('line'); + + $filename = $this->baseDir.DIRECTORY_SEPARATOR.$file; + + if (preg_match("'(^|[/\\\\])\.\.?([/\\\\]|$)'", $file) || !is_readable($filename)) { + throw new NotFoundHttpException(sprintf('The file "%s" cannot be opened.', $file)); + } + + return new Response($this->twig->render('@WebProfiler/Profiler/open.html.twig', array( + 'filename' => $filename, + 'file' => $file, + 'line' => $line, + )), 200, array('Content-Type' => 'text/html')); + } + + /** + * Gets the Template Manager. + * + * @return TemplateManager The Template Manager + */ + protected function getTemplateManager() + { + if (null === $this->templateManager) { + $this->templateManager = new TemplateManager($this->profiler, $this->twig, $this->templates); + } + + return $this->templateManager; + } + + private function renderWithCspNonces(Request $request, $template, $variables, $code = 200, $headers = array('Content-Type' => 'text/html')) + { + $response = new Response('', $code, $headers); + + $nonces = $this->cspHandler ? $this->cspHandler->getNonces($request, $response) : array(); + + $variables['csp_script_nonce'] = isset($nonces['csp_script_nonce']) ? $nonces['csp_script_nonce'] : null; + $variables['csp_style_nonce'] = isset($nonces['csp_style_nonce']) ? $nonces['csp_style_nonce'] : null; + + $response->setContent($this->twig->render($template, $variables)); + + return $response; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php new file mode 100644 index 0000000000000000000000000000000000000000..3ea170d7ea3ea46bedb8a749ed5cba55857dcbbc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Controller; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Matcher\UrlMatcherInterface; +use Symfony\Component\Routing\Matcher\TraceableUrlMatcher; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\RouterInterface; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Profiler\Profiler; +use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector; + +/** + * RouterController. + * + * @author Fabien Potencier + */ +class RouterController +{ + private $profiler; + private $twig; + private $matcher; + private $routes; + + public function __construct(Profiler $profiler = null, \Twig_Environment $twig, UrlMatcherInterface $matcher = null, RouteCollection $routes = null) + { + $this->profiler = $profiler; + $this->twig = $twig; + $this->matcher = $matcher; + $this->routes = (null === $routes && $matcher instanceof RouterInterface) ? $matcher->getRouteCollection() : $routes; + } + + /** + * Renders the profiler panel for the given token. + * + * @param string $token The profiler token + * + * @return Response A Response instance + * + * @throws NotFoundHttpException + */ + public function panelAction($token) + { + if (null === $this->profiler) { + throw new NotFoundHttpException('The profiler must be enabled.'); + } + + $this->profiler->disable(); + + if (null === $this->matcher || null === $this->routes) { + return new Response('The Router is not enabled.', 200, array('Content-Type' => 'text/html')); + } + + $profile = $this->profiler->loadProfile($token); + + /** @var RequestDataCollector $request */ + $request = $profile->getCollector('request'); + + return new Response($this->twig->render('@WebProfiler/Router/panel.html.twig', array( + 'request' => $request, + 'router' => $profile->getCollector('router'), + 'traces' => $this->getTraces($request, $profile->getMethod()), + )), 200, array('Content-Type' => 'text/html')); + } + + /** + * Returns the routing traces associated to the given request. + * + * @param RequestDataCollector $request + * @param string $method + * + * @return array + */ + private function getTraces(RequestDataCollector $request, $method) + { + $traceRequest = Request::create( + $request->getPathInfo(), + $request->getRequestServer(true)->get('REQUEST_METHOD'), + array(), + $request->getRequestCookies(true)->all(), + array(), + $request->getRequestServer(true)->all() + ); + + $context = $this->matcher->getContext(); + $context->setMethod($method); + $matcher = new TraceableUrlMatcher($this->routes, $context); + + return $matcher->getTracesForRequest($traceRequest); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..52168924d330329bbe09eba93b5b42aa1408a1a7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php @@ -0,0 +1,266 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Csp; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Handles Content-Security-Policy HTTP header for the WebProfiler Bundle. + * + * @author Romain Neutron + * + * @internal + */ +class ContentSecurityPolicyHandler +{ + private $nonceGenerator; + private $cspDisabled = false; + + public function __construct(NonceGenerator $nonceGenerator) + { + $this->nonceGenerator = $nonceGenerator; + } + + /** + * Returns an array of nonces to be used in Twig templates and Content-Security-Policy headers. + * + * Nonce can be provided by; + * - The request - In case HTML content is fetched via AJAX and inserted in DOM, it must use the same nonce as origin + * - The response - A call to getNonces() has already been done previously. Same nonce are returned + * - They are otherwise randomly generated + * + * @return array + */ + public function getNonces(Request $request, Response $response) + { + if ($request->headers->has('X-SymfonyProfiler-Script-Nonce') && $request->headers->has('X-SymfonyProfiler-Style-Nonce')) { + return array( + 'csp_script_nonce' => $request->headers->get('X-SymfonyProfiler-Script-Nonce'), + 'csp_style_nonce' => $request->headers->get('X-SymfonyProfiler-Style-Nonce'), + ); + } + + if ($response->headers->has('X-SymfonyProfiler-Script-Nonce') && $response->headers->has('X-SymfonyProfiler-Style-Nonce')) { + return array( + 'csp_script_nonce' => $response->headers->get('X-SymfonyProfiler-Script-Nonce'), + 'csp_style_nonce' => $response->headers->get('X-SymfonyProfiler-Style-Nonce'), + ); + } + + $nonces = array( + 'csp_script_nonce' => $this->generateNonce(), + 'csp_style_nonce' => $this->generateNonce(), + ); + + $response->headers->set('X-SymfonyProfiler-Script-Nonce', $nonces['csp_script_nonce']); + $response->headers->set('X-SymfonyProfiler-Style-Nonce', $nonces['csp_style_nonce']); + + return $nonces; + } + + /** + * Disables Content-Security-Policy. + * + * All related headers will be removed. + */ + public function disableCsp() + { + $this->cspDisabled = true; + } + + /** + * Cleanup temporary headers and updates Content-Security-Policy headers. + * + * @return array Nonces used by the bundle in Content-Security-Policy header + */ + public function updateResponseHeaders(Request $request, Response $response) + { + if ($this->cspDisabled) { + $this->removeCspHeaders($response); + + return array(); + } + + $nonces = $this->getNonces($request, $response); + $this->cleanHeaders($response); + $this->updateCspHeaders($response, $nonces); + + return $nonces; + } + + private function cleanHeaders(Response $response) + { + $response->headers->remove('X-SymfonyProfiler-Script-Nonce'); + $response->headers->remove('X-SymfonyProfiler-Style-Nonce'); + } + + private function removeCspHeaders(Response $response) + { + $response->headers->remove('X-Content-Security-Policy'); + $response->headers->remove('Content-Security-Policy'); + } + + /** + * Updates Content-Security-Policy headers in a response. + * + * @return array + */ + private function updateCspHeaders(Response $response, array $nonces = array()) + { + $nonces = array_replace(array( + 'csp_script_nonce' => $this->generateNonce(), + 'csp_style_nonce' => $this->generateNonce(), + ), $nonces); + + $ruleIsSet = false; + + $headers = $this->getCspHeaders($response); + + foreach ($headers as $header => $directives) { + foreach (array('script-src' => 'csp_script_nonce', 'style-src' => 'csp_style_nonce') as $type => $tokenName) { + if ($this->authorizesInline($directives, $type)) { + continue; + } + if (!isset($headers[$header][$type])) { + if (isset($headers[$header]['default-src'])) { + $headers[$header][$type] = $headers[$header]['default-src']; + } else { + // If there is no script-src/style-src and no default-src, no additional rules required. + continue; + } + } + $ruleIsSet = true; + if (!in_array('\'unsafe-inline\'', $headers[$header][$type], true)) { + $headers[$header][$type][] = '\'unsafe-inline\''; + } + $headers[$header][$type][] = sprintf('\'nonce-%s\'', $nonces[$tokenName]); + } + } + + if (!$ruleIsSet) { + return $nonces; + } + + foreach ($headers as $header => $directives) { + $response->headers->set($header, $this->generateCspHeader($directives)); + } + + return $nonces; + } + + /** + * Generates a valid Content-Security-Policy nonce. + * + * @return string + */ + private function generateNonce() + { + return $this->nonceGenerator->generate(); + } + + /** + * Converts a directive set array into Content-Security-Policy header. + * + * @param array $directives The directive set + * + * @return string The Content-Security-Policy header + */ + private function generateCspHeader(array $directives) + { + return array_reduce(array_keys($directives), function ($res, $name) use ($directives) { + return ($res !== '' ? $res.'; ' : '').sprintf('%s %s', $name, implode(' ', $directives[$name])); + }, ''); + } + + /** + * Converts a Content-Security-Policy header value into a directive set array. + * + * @param string $header The header value + * + * @return array The directive set + */ + private function parseDirectives($header) + { + $directives = array(); + + foreach (explode(';', $header) as $directive) { + $parts = explode(' ', trim($directive)); + if (count($parts) < 1) { + continue; + } + $name = array_shift($parts); + $directives[$name] = $parts; + } + + return $directives; + } + + /** + * Detects if the 'unsafe-inline' is prevented for a directive within the directive set. + * + * @param array $directivesSet The directive set + * @param string $type The name of the directive to check + * + * @return bool + */ + private function authorizesInline(array $directivesSet, $type) + { + if (isset($directivesSet[$type])) { + $directives = $directivesSet[$type]; + } elseif (isset($directivesSet['default-src'])) { + $directives = $directivesSet['default-src']; + } else { + return false; + } + + return in_array('\'unsafe-inline\'', $directives, true) && !$this->hasHashOrNonce($directives); + } + + private function hasHashOrNonce(array $directives) + { + foreach ($directives as $directive) { + if ('\'' !== substr($directive, -1)) { + continue; + } + if ('\'nonce-' === substr($directive, 0, 7)) { + return true; + } + if (in_array(substr($directive, 0, 8), array('\'sha256-', '\'sha384-', '\'sha512-'), true)) { + return true; + } + } + + return false; + } + + /** + * Retrieves the Content-Security-Policy headers (either X-Content-Security-Policy or Content-Security-Policy) from + * a response. + * + * @return array An associative array of headers + */ + private function getCspHeaders(Response $response) + { + $headers = array(); + + if ($response->headers->has('Content-Security-Policy')) { + $headers['Content-Security-Policy'] = $this->parseDirectives($response->headers->get('Content-Security-Policy')); + } + + if ($response->headers->has('X-Content-Security-Policy')) { + $headers['X-Content-Security-Policy'] = $this->parseDirectives($response->headers->get('X-Content-Security-Policy')); + } + + return $headers; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Csp/NonceGenerator.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Csp/NonceGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..728043551f3ee9cfe2f3fab6d27e4832613c4964 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Csp/NonceGenerator.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\Bundle\WebProfilerBundle\Csp; + +/** + * Generates Content-Security-Policy nonce. + * + * @author Romain Neutron + * + * @internal + */ +class NonceGenerator +{ + public function generate() + { + return bin2hex(random_bytes(16)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php new file mode 100644 index 0000000000000000000000000000000000000000..957a683ca3563ed576fe40c07d42366a9a6269a0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\DependencyInjection; + +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +/** + * This class contains the configuration information for the bundle. + * + * This information is solely responsible for how the different configuration + * sections are normalized, and merged. + * + * @author Fabien Potencier + */ +class Configuration implements ConfigurationInterface +{ + /** + * Generates the configuration tree builder. + * + * @return TreeBuilder The tree builder + */ + public function getConfigTreeBuilder() + { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('web_profiler'); + + $rootNode + ->children() + ->booleanNode('toolbar')->defaultFalse()->end() + ->scalarNode('position') + ->defaultValue('bottom') + ->validate() + ->ifNotInArray(array('bottom', 'top')) + ->thenInvalid('The CSS position %s is not supported') + ->end() + ->end() + ->booleanNode('intercept_redirects')->defaultFalse()->end() + ->scalarNode('excluded_ajax_paths')->defaultValue('^/(app(_[\\w]+)?\\.php/)?_wdt')->end() + ->end() + ; + + return $treeBuilder; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..e507bf2d22b70c01ce987643922201ea5f57029c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\DependencyInjection; + +use Symfony\Component\DependencyInjection\Extension\Extension; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\FileLocator; +use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener; + +/** + * WebProfilerExtension. + * + * Usage: + * + * + * + * @author Fabien Potencier + */ +class WebProfilerExtension extends Extension +{ + /** + * Loads the web profiler configuration. + * + * @param array $configs An array of configuration settings + * @param ContainerBuilder $container A ContainerBuilder instance + */ + public function load(array $configs, ContainerBuilder $container) + { + $configuration = $this->getConfiguration($configs, $container); + $config = $this->processConfiguration($configuration, $configs); + + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('profiler.xml'); + $container->setParameter('web_profiler.debug_toolbar.position', $config['position']); + + if ($config['toolbar'] || $config['intercept_redirects']) { + $loader->load('toolbar.xml'); + $container->getDefinition('web_profiler.debug_toolbar')->replaceArgument(5, $config['excluded_ajax_paths']); + $container->setParameter('web_profiler.debug_toolbar.intercept_redirects', $config['intercept_redirects']); + $container->setParameter('web_profiler.debug_toolbar.mode', $config['toolbar'] ? WebDebugToolbarListener::ENABLED : WebDebugToolbarListener::DISABLED); + } + + $baseDir = array(); + $rootDir = $container->getParameter('kernel.root_dir'); + $rootDir = explode(DIRECTORY_SEPARATOR, realpath($rootDir) ?: $rootDir); + $bundleDir = explode(DIRECTORY_SEPARATOR, __DIR__); + for ($i = 0; isset($rootDir[$i], $bundleDir[$i]); ++$i) { + if ($rootDir[$i] !== $bundleDir[$i]) { + break; + } + $baseDir[] = $rootDir[$i]; + } + $baseDir = implode(DIRECTORY_SEPARATOR, $baseDir); + + $profilerController = $container->getDefinition('web_profiler.controller.profiler'); + $profilerController->replaceArgument(6, $baseDir); + + $fileLinkFormatter = $container->getDefinition('debug.file_link_formatter'); + $fileLinkFormatter->replaceArgument(2, $baseDir); + } + + /** + * Returns the base path for the XSD files. + * + * @return string The XSD base path + */ + public function getXsdValidationBasePath() + { + return __DIR__.'/../Resources/config/schema'; + } + + public function getNamespace() + { + return 'http://symfony.com/schema/dic/webprofiler'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php new file mode 100644 index 0000000000000000000000000000000000000000..760cb8365ee426f8bd93d43dd34facbf2f6a92c1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php @@ -0,0 +1,145 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\EventListener; + +use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; + +/** + * WebDebugToolbarListener injects the Web Debug Toolbar. + * + * The onKernelResponse method must be connected to the kernel.response event. + * + * The WDT is only injected on well-formed HTML (with a proper tag). + * This means that the WDT is never included in sub-requests or ESI requests. + * + * @author Fabien Potencier + */ +class WebDebugToolbarListener implements EventSubscriberInterface +{ + const DISABLED = 1; + const ENABLED = 2; + + protected $twig; + protected $urlGenerator; + protected $interceptRedirects; + protected $mode; + protected $position; + protected $excludedAjaxPaths; + private $cspHandler; + + public function __construct(\Twig_Environment $twig, $interceptRedirects = false, $mode = self::ENABLED, $position = 'bottom', UrlGeneratorInterface $urlGenerator = null, $excludedAjaxPaths = '^/bundles|^/_wdt', ContentSecurityPolicyHandler $cspHandler = null) + { + $this->twig = $twig; + $this->urlGenerator = $urlGenerator; + $this->interceptRedirects = (bool) $interceptRedirects; + $this->mode = (int) $mode; + $this->position = $position; + $this->excludedAjaxPaths = $excludedAjaxPaths; + $this->cspHandler = $cspHandler; + } + + public function isEnabled() + { + return self::DISABLED !== $this->mode; + } + + public function onKernelResponse(FilterResponseEvent $event) + { + $response = $event->getResponse(); + $request = $event->getRequest(); + + if ($response->headers->has('X-Debug-Token') && null !== $this->urlGenerator) { + try { + $response->headers->set( + 'X-Debug-Token-Link', + $this->urlGenerator->generate('_profiler', array('token' => $response->headers->get('X-Debug-Token')), UrlGeneratorInterface::ABSOLUTE_URL) + ); + } catch (\Exception $e) { + $response->headers->set('X-Debug-Error', get_class($e).': '.$e->getMessage()); + } + } + + if (!$event->isMasterRequest()) { + return; + } + + $nonces = $this->cspHandler ? $this->cspHandler->updateResponseHeaders($request, $response) : array(); + + // do not capture redirects or modify XML HTTP Requests + if ($request->isXmlHttpRequest()) { + return; + } + + if ($response->headers->has('X-Debug-Token') && $response->isRedirect() && $this->interceptRedirects) { + $session = $request->getSession(); + if (null !== $session && $session->isStarted() && $session->getFlashBag() instanceof AutoExpireFlashBag) { + // keep current flashes for one more request if using AutoExpireFlashBag + $session->getFlashBag()->setAll($session->getFlashBag()->peekAll()); + } + + $response->setContent($this->twig->render('@WebProfiler/Profiler/toolbar_redirect.html.twig', array('location' => $response->headers->get('Location')))); + $response->setStatusCode(200); + $response->headers->remove('Location'); + } + + if (self::DISABLED === $this->mode + || !$response->headers->has('X-Debug-Token') + || $response->isRedirection() + || ($response->headers->has('Content-Type') && false === strpos($response->headers->get('Content-Type'), 'html')) + || 'html' !== $request->getRequestFormat() + || false !== stripos($response->headers->get('Content-Disposition'), 'attachment;') + ) { + return; + } + + $this->injectToolbar($response, $request, $nonces); + } + + /** + * Injects the web debug toolbar into the given Response. + */ + protected function injectToolbar(Response $response, Request $request, array $nonces) + { + $content = $response->getContent(); + $pos = strripos($content, ''); + + if (false !== $pos) { + $toolbar = "\n".str_replace("\n", '', $this->twig->render( + '@WebProfiler/Profiler/toolbar_js.html.twig', + array( + 'position' => $this->position, + 'excluded_ajax_paths' => $this->excludedAjaxPaths, + 'token' => $response->headers->get('X-Debug-Token'), + 'request' => $request, + 'csp_script_nonce' => isset($nonces['csp_script_nonce']) ? $nonces['csp_script_nonce'] : null, + 'csp_style_nonce' => isset($nonces['csp_style_nonce']) ? $nonces['csp_style_nonce'] : null, + ) + ))."\n"; + $content = substr($content, 0, $pos).$toolbar.substr($content, $pos); + $response->setContent($content); + } + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::RESPONSE => array('onKernelResponse', -128), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/LICENSE b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php new file mode 100644 index 0000000000000000000000000000000000000000..999604b7effb13f5d0e12d6e03250998d7cd058d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php @@ -0,0 +1,144 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Profiler; + +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Profiler\Profiler; +use Symfony\Component\HttpKernel\Profiler\Profile; + +/** + * Profiler Templates Manager. + * + * @author Fabien Potencier + * @author Artur Wielogórski + */ +class TemplateManager +{ + protected $twig; + protected $templates; + protected $profiler; + + /** + * Constructor. + * + * @param Profiler $profiler + * @param \Twig_Environment $twig + * @param array $templates + */ + public function __construct(Profiler $profiler, \Twig_Environment $twig, array $templates) + { + $this->profiler = $profiler; + $this->twig = $twig; + $this->templates = $templates; + } + + /** + * Gets the template name for a given panel. + * + * @param Profile $profile + * @param string $panel + * + * @return mixed + * + * @throws NotFoundHttpException + */ + public function getName(Profile $profile, $panel) + { + $templates = $this->getNames($profile); + + if (!isset($templates[$panel])) { + throw new NotFoundHttpException(sprintf('Panel "%s" is not registered in profiler or is not present in viewed profile.', $panel)); + } + + return $templates[$panel]; + } + + /** + * Gets the templates for a given profile. + * + * @param Profile $profile + * + * @return \Twig_Template[] + * + * @deprecated not used anymore internally + */ + public function getTemplates(Profile $profile) + { + $templates = $this->getNames($profile); + + foreach ($templates as $name => $template) { + $templates[$name] = $this->twig->loadTemplate($template); + } + + return $templates; + } + + /** + * Gets template names of templates that are present in the viewed profile. + * + * @param Profile $profile + * + * @return array + * + * @throws \UnexpectedValueException + */ + public function getNames(Profile $profile) + { + $templates = array(); + + foreach ($this->templates as $arguments) { + if (null === $arguments) { + continue; + } + + list($name, $template) = $arguments; + + if (!$this->profiler->has($name) || !$profile->hasCollector($name)) { + continue; + } + + if ('.html.twig' === substr($template, -10)) { + $template = substr($template, 0, -10); + } + + if (!$this->templateExists($template.'.html.twig')) { + throw new \UnexpectedValueException(sprintf('The profiler template "%s.html.twig" for data collector "%s" does not exist.', $template, $name)); + } + + $templates[$name] = $template.'.html.twig'; + } + + return $templates; + } + + // to be removed when the minimum required version of Twig is >= 2.0 + protected function templateExists($template) + { + $loader = $this->twig->getLoader(); + if ($loader instanceof \Twig_ExistsLoaderInterface) { + return $loader->exists($template); + } + + try { + if ($loader instanceof \Twig_SourceContextLoaderInterface) { + $loader->getSourceContext($template); + } else { + $loader->getSource($template); + } + + return true; + } catch (\Twig_Error_Loader $e) { + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/README.md b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/README.md new file mode 100644 index 0000000000000000000000000000000000000000..03780d5e5904e64f0b4f970f07e4f512a2725487 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/README.md @@ -0,0 +1,10 @@ +WebProfilerBundle +================= + +Resources +--------- + + * [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/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/ICONS_LICENSE.txt b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/ICONS_LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..2e20272676e402113c155560ba787a1cb9b80505 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/ICONS_LICENSE.txt @@ -0,0 +1,5 @@ +Icons License +============= + +Icons created by Sensio (http://www.sensio.com/) are shared under a Creative +Commons Attribution license (http://creativecommons.org/licenses/by-sa/3.0/). \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/profiler.xml b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/profiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..931363ac6d3282aede1bf5030e9b781b0133099f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/profiler.xml @@ -0,0 +1,60 @@ + + + + + + + + + + %data_collector.templates% + %web_profiler.debug_toolbar.position% + + null + + + + + + + + + + + + %kernel.debug% + + + + + + + + + + + + + null + %kernel.charset% + Symfony\Component\VarDumper\Dumper\HtmlDumper::DUMP_LIGHT_ARRAY + + + 4096 + + + + + + + + + %debug.file_link_format% + + null + /_profiler/open?file=%%f&line=%%l#line%%l + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..1a4bd39c621a607cffb99e5e67fef3995a91381f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml @@ -0,0 +1,51 @@ + + + + + + web_profiler.controller.profiler:homeAction + + + + web_profiler.controller.profiler:searchAction + + + + web_profiler.controller.profiler:searchBarAction + + + + web_profiler.controller.profiler:infoAction + + + + web_profiler.controller.profiler:phpinfoAction + + + + web_profiler.controller.profiler:searchResultsAction + + + + web_profiler.controller.profiler:openAction + + + + web_profiler.controller.profiler:panelAction + + + + web_profiler.controller.router:panelAction + + + + web_profiler.controller.exception:showAction + + + + web_profiler.controller.exception:cssAction + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/wdt.xml b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/wdt.xml new file mode 100644 index 0000000000000000000000000000000000000000..1027ce42f66b458ee410ec6ef0d8aad942e778a7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/wdt.xml @@ -0,0 +1,10 @@ + + + + + + web_profiler.controller.profiler:toolbarAction + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/schema/webprofiler-1.0.xsd b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/schema/webprofiler-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..84cc8ae9a97f3172c7754870bcc1cb0eba9e9b5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/schema/webprofiler-1.0.xsd @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/toolbar.xml b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/toolbar.xml new file mode 100644 index 0000000000000000000000000000000000000000..3f19d22c8136ea64868518a83b5b0d35993609f3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/config/toolbar.xml @@ -0,0 +1,19 @@ + + + + + + + + + %web_profiler.debug_toolbar.intercept_redirects% + %web_profiler.debug_toolbar.mode% + %web_profiler.debug_toolbar.position% + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..fce25a7f26e1c624bb2c896c5a6ec9c85325311c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig @@ -0,0 +1,31 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block toolbar %} + {% set icon %} + {{ include('@WebProfiler/Icon/ajax.svg') }} + 0 + {% endset %} + + {% set text %} +
    + +
    +
    + + + + + + + + + + + + +
    MethodTypeStatusURLTimeProfile
    +
    + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false }) }} +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..d80b3a5507ac49d74f07cdba77012b3fc7649911 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -0,0 +1,250 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block toolbar %} + {% if 'unknown' == collector.symfonyState %} + {% set block_status = '' %} + {% set symfony_version_status = 'Unable to retrieve information about the Symfony version.' %} + {% elseif 'eol' == collector.symfonyState %} + {% set block_status = 'red' %} + {% set symfony_version_status = 'This Symfony version will no longer receive security fixes.' %} + {% elseif 'eom' == collector.symfonyState %} + {% set block_status = 'yellow' %} + {% set symfony_version_status = 'This Symfony version will only receive security fixes.' %} + {% elseif 'dev' == collector.symfonyState %} + {% set block_status = 'yellow' %} + {% set symfony_version_status = 'This Symfony version is still in the development phase.' %} + {% else %} + {% set block_status = '' %} + {% set symfony_version_status = '' %} + {% endif %} + + {% set icon %} + {% if collector.applicationname %} + {{ collector.applicationname }} + {{ collector.applicationversion }} + {% elseif collector.symfonyState is defined %} + + {{ include('@WebProfiler/Icon/symfony.svg') }} + + {{ collector.symfonyversion }} + {% endif %} + {% endset %} + + {% set text %} +
    + {% if collector.applicationname %} +
    + {{ collector.applicationname }} + {{ collector.applicationversion }} +
    + {% endif %} + +
    + Profiler token + + {% if profiler_url %} + {{ collector.token }} + {% else %} + {{ collector.token }} + {% endif %} + +
    + + {% if 'n/a' is not same as(collector.appname) %} +
    + Kernel name + {{ collector.appname }} +
    + {% endif %} + + {% if 'n/a' is not same as(collector.env) %} +
    + Environment + {{ collector.env }} +
    + {% endif %} + + {% if 'n/a' is not same as(collector.debug) %} +
    + Debug + {{ collector.debug ? 'enabled' : 'disabled' }} +
    + {% endif %} +
    + +
    +
    + PHP version + + {{ collector.phpversion }} +   View phpinfo() + +
    + +
    + PHP Extensions + xdebug + accel +
    + +
    + PHP SAPI + {{ collector.sapiName }} +
    +
    + +
    + {% if collector.symfonyversion is defined %} +
    + Resources + + {% if 'Silex' == collector.applicationname %} + + Read Silex Docs + + {% else %} + + Read Symfony {{ collector.symfonyversion }} Docs + + {% endif %} + +
    + + {% endif %} +
    + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: true, name: 'config', status: block_status, additional_classes: 'sf-toolbar-block-right', block_attrs: 'title="' ~ symfony_version_status ~ '"' }) }} +{% endblock %} + +{% block menu %} + + {{ include('@WebProfiler/Icon/config.svg') }} + Configuration + +{% endblock %} + +{% block panel %} + {% if collector.applicationname %} + {# this application is not the Symfony framework #} +

    Project Configuration

    + +
    +
    + {{ collector.applicationname }} + Application name +
    + +
    + {{ collector.applicationversion }} + Application version +
    +
    + +

    + Based on Symfony {{ collector.symfonyversion }} +

    + {% else %} +

    Symfony Configuration

    + +
    +
    + {{ collector.symfonyversion }} + Symfony version +
    + + {% if 'n/a' != collector.appname %} +
    + {{ collector.appname }} + Application name +
    + {% endif %} + + {% if 'n/a' != collector.env %} +
    + {{ collector.env }} + Environment +
    + {% endif %} + + {% if 'n/a' != collector.debug %} +
    + {{ collector.debug ? 'enabled' : 'disabled' }} + Debug +
    + {% endif %} +
    + {% endif %} + +

    PHP Configuration

    + +
    +
    + {{ collector.phpversion }} + PHP version +
    + +
    + {{ include('@WebProfiler/Icon/' ~ (collector.hasaccelerator ? 'yes' : 'no') ~ '.svg') }} + PHP acceleration +
    + +
    + {{ include('@WebProfiler/Icon/' ~ (collector.hasxdebug ? 'yes' : 'no') ~ '.svg') }} + Xdebug +
    +
    + +
    +
    + {{ include('@WebProfiler/Icon/' ~ (collector.haszendopcache ? 'yes' : 'no') ~ '.svg') }} + OPcache +
    + +
    + {{ include('@WebProfiler/Icon/' ~ (collector.hasapc ? 'yes' : 'no') ~ '.svg') }} + APC +
    + +
    + {{ include('@WebProfiler/Icon/' ~ (collector.hasxcache ? 'yes' : 'no') ~ '.svg') }} + XCache +
    + +
    + {{ include('@WebProfiler/Icon/' ~ (collector.haseaccelerator ? 'yes' : 'no') ~ '.svg') }} + EAccelerator +
    +
    + +

    + View full PHP configuration +

    + + {% if collector.bundles %} +

    Enabled Bundles ({{ collector.bundles|length }})

    + + + + + + + + + {% for name in collector.bundles|keys|sort %} + + + + + {% endfor %} + +
    NamePath
    {{ name }}{{ collector.bundles[name] }}
    + {% endif %} +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..401410f41ccdaa48643e36746bce4d587b9194c3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig @@ -0,0 +1,86 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% import _self as helper %} + +{% block menu %} + + {{ include('@WebProfiler/Icon/event.svg') }} + Events + +{% endblock %} + +{% block panel %} +

    Event Dispatcher

    + + {% if collector.calledlisteners is empty %} +
    +

    No events have been recorded. Check that debugging is enabled in the kernel.

    +
    + {% else %} +
    +
    +

    Called Listeners {{ collector.calledlisteners|length }}

    + +
    + {{ helper.render_table(collector.calledlisteners) }} +
    +
    + +
    +

    Not Called Listeners {{ collector.notcalledlisteners|length }}

    +
    + {% if collector.notcalledlisteners is empty %} +
    +

    + There are no uncalled listeners. +

    +

    + All listeners were called for this request or an error occurred + when trying to collect uncalled listeners (in which case check the + logs to get more information). +

    +
    + {% else %} + {{ helper.render_table(collector.notcalledlisteners) }} + {% endif %} +
    +
    +
    + {% endif %} +{% endblock %} + +{% macro render_table(listeners) %} + + + + + + + + + {% set previous_event = (listeners|first).event %} + {% for listener in listeners %} + {% if loop.first or listener.event != previous_event %} + {% if not loop.first %} + + {% endif %} + + + + + + + {% set previous_event = listener.event %} + {% endif %} + + + + + + + {% if loop.last %} + + {% endif %} + {% endfor %} +
    PriorityListener
    {{ listener.event }}
    {{ listener.priority|default('-') }}{{ profiler_dump(listener.data) }}
    +{% endmacro %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.css.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.css.twig new file mode 100644 index 0000000000000000000000000000000000000000..e88a33ab967e1a914584e29429587b4b3f753f2b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.css.twig @@ -0,0 +1,99 @@ +.sf-reset .traces { + padding: 0 0 1em 1.5em; +} +.sf-reset .traces a { + font-size: 14px; +} +.sf-reset .traces abbr { + border-bottom-color: #AAA; + padding-bottom: 2px; +} +.sf-reset .traces li { + color: #222; + font-size: 14px; + padding: 5px 0; + list-style-type: decimal; + margin: 0 0 0 1em; +} +.sf-reset .traces li.selected { + background: rgba(255, 255, 153, 0.5); +} + +.sf-reset .traces ol li { + font-size: 12px; + color: #777; +} +.sf-reset #logs .traces li.error { + color: #AA3333; +} +.sf-reset #logs .traces li.warning { + background: #FFCC00; +} +.sf-reset .trace { + border: 1px solid #DDD; + background: #FFF; + padding: 10px; + overflow: auto; + margin: 1em 0; +} +.sf-reset .trace code, +#traces-text pre { + font-size: 13px; +} +.sf-reset .block-exception { + margin-bottom: 2em; + background-color: #FFF; + border: 1px solid #EEE; + padding: 28px; + word-wrap: break-word; + overflow: hidden; +} +.sf-reset .block-exception h1 { + font-size: 21px; + font-weight: normal; + margin: 0 0 12px; +} +.sf-reset .block-exception .linked { + margin-top: 1em; +} + +.sf-reset .block { + margin-bottom: 2em; +} +.sf-reset .block h2 { + font-size: 16px; +} +.sf-reset .block-exception div { + font-size: 14px; +} +.sf-reset .block-exception-detected .illustration-exception, +.sf-reset .block-exception-detected .text-exception { + float: left; +} +.sf-reset .block-exception-detected .illustration-exception { + width: 110px; +} +.sf-reset .block-exception-detected .text-exception { + width: 650px; + margin-left: 20px; + padding: 30px 44px 24px 46px; + position: relative; +} +.sf-reset .text-exception .open-quote, +.sf-reset .text-exception .close-quote { + font-family: Arial, Helvetica, sans-serif; + position: absolute; + color: #C9C9C9; + font-size: 8em; +} +.sf-reset .open-quote { + top: 0; + left: 0; +} +.sf-reset .close-quote { + bottom: -0.5em; + right: 50px; +} +.sf-reset .toggle { + vertical-align: middle; +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..94dfbb6acac0a83a234463acb8132be306e1f74b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig @@ -0,0 +1,36 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block head %} + {% if collector.hasexception %} + + {% endif %} + {{ parent() }} +{% endblock %} + +{% block menu %} + + {{ include('@WebProfiler/Icon/exception.svg') }} + Exception + {% if collector.hasexception %} + + 1 + + {% endif %} + +{% endblock %} + +{% block panel %} +

    Exceptions

    + + {% if not collector.hasexception %} +
    +

    No exception was thrown and caught during the request.

    +
    + {% else %} +
    + {{ render(path('_profiler_exception', { token: token })) }} +
    + {% endif %} +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..38a086395fec056c8a02a84460af4a3d9249d641 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig @@ -0,0 +1,704 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% from _self import form_tree_entry, form_tree_details %} + +{% block toolbar %} + {% if collector.data.nb_errors > 0 or collector.data.forms|length %} + {% set status_color = collector.data.nb_errors ? 'red' : '' %} + {% set icon %} + {{ include('@WebProfiler/Icon/form.svg') }} + + {{ collector.data.nb_errors ?: collector.data.forms|length }} + + {% endset %} + + {% set text %} +
    + Number of forms + {{ collector.data.forms|length }} +
    +
    + Number of errors + {{ collector.data.nb_errors }} +
    + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} + {% endif %} +{% endblock %} + +{% block menu %} + + {{ include('@WebProfiler/Icon/form.svg') }} + Forms + {% if collector.data.nb_errors > 0 %} + + {{ collector.data.nb_errors }} + + {% endif %} + +{% endblock %} + +{% block head %} + {{ parent() }} + + +{% endblock %} + +{% block panel %} +

    Forms

    + + {% if collector.data.forms|length %} +
    +
      + {% for formName, formData in collector.data.forms %} + {{ form_tree_entry(formName, formData, true) }} + {% endfor %} +
    +
    + +
    + {% for formName, formData in collector.data.forms %} + {{ form_tree_details(formName, formData, collector.data.forms_by_hash, loop.first) }} + {% endfor %} +
    + {% else %} +
    +

    No forms were submitted for this request.

    +
    + {% endif %} + + +{% endblock %} + +{% macro form_tree_entry(name, data, is_root) %} + {% import _self as tree %} + {% set has_error = data.errors is defined and data.errors|length > 0 %} +
  • +
    + {% if has_error %} +
    {{ data.errors|length }}
    + {% endif %} + + {% if data.children is not empty %} + + {% else %} +
    + {% endif %} + + + {{ name|default('(no name)') }} + +
    + + {% if data.children is not empty %} +
      + {% for childName, childData in data.children %} + {{ tree.form_tree_entry(childName, childData, false) }} + {% endfor %} +
    + {% endif %} +
  • +{% endmacro %} + +{% macro form_tree_details(name, data, forms_by_hash, show) %} + {% import _self as tree %} +
    +

    + {{ name|default('(no name)') }} {% if data.type_class is defined %}({{ profiler_dump(data.type_class) }}){% endif %} +

    + + {% if data.errors is defined and data.errors|length > 0 %} +
    +

    + + Errors + +

    + + + + + + + + + + + {% for error in data.errors %} + + + + + + {% endfor %} + +
    MessageOriginCause
    {{ error.message }} + {% if error.origin is empty %} + This form. + {% elseif forms_by_hash[error.origin] is not defined %} + Unknown. + {% else %} + {{ forms_by_hash[error.origin].name }} + {% endif %} + + {% if error.trace %} + Caused by: + {% for stacked in error.trace %} + {{ profiler_dump(stacked) }} + {% endfor %} + {% else %} + Unknown. + {% endif %} +
    +
    + {% endif %} + + {% if data.default_data is defined %} +

    + + Default Data + +

    + +
    + + + + + + + + + + + + + + + + + + + + + +
    PropertyValue
    Model Format + {% if data.default_data.model is defined %} + {{ profiler_dump(data.default_data.model) }} + {% else %} + same as normalized format + {% endif %} +
    Normalized Format{{ profiler_dump(data.default_data.norm) }}
    View Format + {% if data.default_data.view is defined %} + {{ profiler_dump(data.default_data.view) }} + {% else %} + same as normalized format + {% endif %} +
    +
    + {% endif %} + + {% if data.submitted_data is defined %} +

    + + Submitted Data + +

    + +
    + {% if data.submitted_data.norm is defined %} + + + + + + + + + + + + + + + + + + + + + +
    PropertyValue
    View Format + {% if data.submitted_data.view is defined %} + {{ profiler_dump(data.submitted_data.view) }} + {% else %} + same as normalized format + {% endif %} +
    Normalized Format{{ profiler_dump(data.submitted_data.norm) }}
    Model Format + {% if data.submitted_data.model is defined %} + {{ profiler_dump(data.submitted_data.model) }} + {% else %} + same as normalized format + {% endif %} +
    + {% else %} +
    +

    This form was not submitted.

    +
    + {% endif %} +
    + {% endif %} + + {% if data.passed_options is defined %} +

    + + Passed Options + +

    + +
    + {% if data.passed_options|length %} + + + + + + + + + + {% for option, value in data.passed_options %} + + + + + + {% endfor %} + +
    OptionPassed ValueResolved Value
    {{ option }}{{ profiler_dump(value) }} + {% if data.resolved_options[option] == value %} + same as passed value + {% else %} + {{ profiler_dump(data.resolved_options[option]) }} + {% endif %} +
    + {% else %} +
    +

    No options where passed when constructing this form.

    +
    + {% endif %} +
    + {% endif %} + + {% if data.resolved_options is defined %} +

    + + Resolved Options + +

    + + + {% endif %} + + {% if data.view_vars is defined %} +

    + + View Variables + +

    + + + {% endif %} +
    + + {% for childName, childData in data.children %} + {{ tree.form_tree_details(childName, childData, forms_by_hash) }} + {% endfor %} +{% endmacro %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..e03b5fff311c639d33b7488bcdabcbcd7ea97169 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig @@ -0,0 +1,203 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% import _self as helper %} + +{% block toolbar %} + {% if collector.counterrors or collector.countdeprecations or collector.countwarnings %} + {% set icon %} + {% set status_color = collector.counterrors ? 'red' : 'yellow' %} + {{ include('@WebProfiler/Icon/logger.svg') }} + {{ collector.counterrors ?: (collector.countdeprecations + collector.countwarnings) }} + {% endset %} + + {% set text %} +
    + Errors + {{ collector.counterrors|default(0) }} +
    + +
    + Warnings + {{ collector.countwarnings|default(0) }} +
    + +
    + Deprecations + {{ collector.countdeprecations|default(0) }} +
    + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} + {% endif %} +{% endblock %} + +{% block menu %} + + {{ include('@WebProfiler/Icon/logger.svg') }} + Logs + {% if collector.counterrors or collector.countdeprecations or collector.countwarnings %} + + {{ collector.counterrors ?: (collector.countdeprecations + collector.countwarnings) }} + + {% endif %} + +{% endblock %} + +{% block panel %} +

    Log Messages

    + + {% if collector.logs is empty %} +
    +

    No log messages available.

    +
    + {% else %} + {# sort collected logs in groups #} + {% set deprecation_logs, debug_logs, info_and_error_logs, silenced_logs = [], [], [], [] %} + {% for log in collector.logs %} + {% if log.scream is defined and not log.scream %} + {% set deprecation_logs = deprecation_logs|merge([log]) %} + {% elseif log.scream is defined and log.scream %} + {% set silenced_logs = silenced_logs|merge([log]) %} + {% elseif log.priorityName == 'DEBUG' %} + {% set debug_logs = debug_logs|merge([log]) %} + {% else %} + {% set info_and_error_logs = info_and_error_logs|merge([log]) %} + {% endif %} + {% endfor %} + +
    +
    +

    Info. & Errors {{ collector.counterrors ?: info_and_error_logs|length }}

    + +
    + {% if info_and_error_logs is empty %} +
    +

    There are no log messages of this level.

    +
    + {% else %} + {{ helper.render_table(info_and_error_logs, 'info', true) }} + {% endif %} +
    +
    + +
    + {# 'deprecation_logs|length' is not used because deprecations are + now grouped and the group count doesn't match the message count #} +

    Deprecations {{ collector.countdeprecations|default(0) }}

    + +
    + {% if deprecation_logs is empty %} +
    +

    There are no log messages about deprecated features.

    +
    + {% else %} + {{ helper.render_table(deprecation_logs, 'deprecation', false, true) }} + {% endif %} +
    +
    + +
    +

    Debug {{ debug_logs|length }}

    + +
    + {% if debug_logs is empty %} +
    +

    There are no log messages of this level.

    +
    + {% else %} + {{ helper.render_table(debug_logs, 'debug') }} + {% endif %} +
    +
    + +
    +

    Silenced PHP Notices{{ collector.countscreams|default(0) }}

    + +
    + {% if silenced_logs is empty %} +
    +

    There are no log messages of this level.

    +
    + {% else %} + {{ helper.render_table(silenced_logs, 'silenced') }} + {% endif %} +
    +
    + +
    + {% endif %} +{% endblock %} + +{% macro render_table(logs, category = '', show_level = false, is_deprecation = false) %} + {% import _self as helper %} + {% set channel_is_defined = (logs|first).channel is defined %} + + + + + + {% if channel_is_defined %}{% endif %} + + + + + + {% for log in logs %} + {% set css_class = is_deprecation ? '' + : log.priorityName in ['CRITICAL', 'ERROR', 'ALERT', 'EMERGENCY'] ? 'status-error' + : log.priorityName == 'WARNING' ? 'status-warning' + %} + + + + {% if channel_is_defined %} + + + {% endif %} + + + + {% endfor %} + +
    {{ show_level ? 'Level' : 'Time' }}ChannelMessage
    + {% if show_level %} + {{ log.priorityName }} + {% endif %} + {{ log.timestamp|date('H:i:s') }} + + {{ log.channel }} + {% if log.errorCount is defined and log.errorCount > 1 %} + ({{ log.errorCount }} times) + {% endif %} + {{ helper.render_log_message(category, loop.index, log, is_deprecation) }}
    +{% endmacro %} + +{% macro render_log_message(category, log_index, log, is_deprecation = false) %} + {% if is_deprecation %} + {{ log.message }} + + {% set context_id = 'context-' ~ category ~ '-' ~ log_index %} + + + {% elseif log.context is defined and log.context is not empty %} + {{ profiler_dump_log(log.message, log.context) }} + + {% set context_id = 'context-' ~ category ~ '-' ~ log_index %} + + + {% else %} + {{ log.message }} + {% endif %} +{% endmacro %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..268f8fdc7e3f6c8c66af710b5784054c21bc150c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig @@ -0,0 +1,24 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block toolbar %} + {% set icon %} + {% set status_color = (collector.memory / 1024 / 1024) > 50 ? 'yellow' : '' %} + {{ include('@WebProfiler/Icon/memory.svg') }} + {{ '%.1f'|format(collector.memory / 1024 / 1024) }} + MB + {% endset %} + + {% set text %} +
    + Peak memory usage + {{ '%.1f'|format(collector.memory / 1024 / 1024) }} MB +
    + +
    + PHP memory limit + {{ collector.memoryLimit == -1 ? 'Unlimited' : '%.0f MB'|format(collector.memoryLimit / 1024 / 1024) }} +
    + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, name: 'time', status: status_color }) }} +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..cdf2839c6dcd2f30016ed902cbdbcd833897835a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -0,0 +1,285 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block toolbar %} + {% set request_handler %} + {% import _self as helper %} + {{ helper.set_handler(collector.controller) }} + {% endset %} + + {% if collector.redirect %} + {% set redirect_handler %} + {% import _self as helper %} + {{ helper.set_handler(collector.redirect.controller, collector.redirect.route, 'GET' != collector.redirect.method ? collector.redirect.method) }} + {% endset %} + {% endif %} + + {% if collector.forward|default(false) %} + {% set forward_handler %} + {% import _self as helper %} + {{ helper.set_handler(collector.forward.controller) }} + {% endset %} + {% endif %} + + {% set request_status_code_color = (collector.statuscode >= 400) ? 'red' : (collector.statuscode >= 300) ? 'yellow' : 'green' %} + + {% set icon %} + {{ collector.statuscode }} + {% if collector.route %} + {% if collector.redirect %}{{ include('@WebProfiler/Icon/redirect.svg') }}{% endif %} + {% if collector.forward|default(false) %}{{ include('@WebProfiler/Icon/forward.svg') }}{% endif %} + {{ 'GET' != collector.method ? collector.method }} @ + {{ collector.route }} + {% endif %} + {% endset %} + + {% set text %} +
    +
    + HTTP status + {{ collector.statuscode }} {{ collector.statustext }} +
    + + {% if 'GET' != collector.method -%} +
    + Method + {{ collector.method }} +
    + {%- endif %} + +
    + Controller + {{ request_handler }} +
    + + {% if collector.controller.class is defined -%} +
    + Controller class + {{ collector.controller.class }} +
    + {%- endif %} + +
    + Route name + {{ collector.route|default('NONE') }} +
    + +
    + Has session + {% if collector.sessionmetadata|length %}yes{% else %}no{% endif %} +
    +
    + + {% if redirect_handler is defined -%} +
    +
    + + {{ collector.redirect.status_code }} + Redirect from + + + {{ redirect_handler }} + ({{ collector.redirect.token }}) + +
    +
    + {% endif %} + + {% if forward_handler is defined %} +
    +
    + Forwarded to + + {{ forward_handler }} + ({{ collector.forward.token }}) + +
    +
    + {% endif %} + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} +{% endblock %} + +{% block menu %} + + {{ include('@WebProfiler/Icon/request.svg') }} + Request / Response + +{% endblock %} + +{% block panel %} +
    +
    +

    Request

    + +
    +

    GET Parameters

    + + {% if collector.requestquery.all is empty %} +
    +

    No GET parameters

    +
    + {% else %} + {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestquery, maxDepth: 1 }, with_context = false) }} + {% endif %} + +

    POST Parameters

    + + {% if collector.requestrequest.all is empty %} +
    +

    No POST parameters

    +
    + {% else %} + {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestrequest, maxDepth: 1 }, with_context = false) }} + {% endif %} + +

    Request Attributes

    + + {% if collector.requestattributes.all is empty %} +
    +

    No attributes

    +
    + {% else %} + {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestattributes }, with_context = false) }} + {% endif %} + +

    Cookies

    + + {% if collector.requestcookies.all is empty %} +
    +

    No cookies

    +
    + {% else %} + {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestcookies }, with_context = false) }} + {% endif %} + +

    Request Headers

    + {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestheaders, labels: ['Header', 'Value'], maxDepth: 1 }, with_context = false) }} + +

    Request Content

    + + {% if collector.content == false %} +
    +

    Request content not available (it was retrieved as a resource).

    +
    + {% elseif collector.content %} +
    +
    {{ collector.content }}
    +
    + {% else %} +
    +

    No content

    +
    + {% endif %} + +

    Server Parameters

    + {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestserver }, with_context = false) }} +
    +
    + +
    +

    Response

    + +
    +

    Response Headers

    + + {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.responseheaders, labels: ['Header', 'Value'], maxDepth: 1 }, with_context = false) }} +
    +
    + + + +
    +

    Flashes

    + +
    +

    Flashes

    + + {% if collector.flashes is empty %} +
    +

    No flash messages were created.

    +
    + {% else %} + {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.flashes }, with_context = false) }} + {% endif %} +
    +
    + + {% if profile.parent %} +
    +

    Parent Request

    + +
    +

    + Return to parent request + (token = {{ profile.parent.token }}) +

    + + {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: profile.parent.getcollector('request').requestattributes }, with_context = false) }} +
    +
    + {% endif %} + + {% if profile.children|length %} +
    +

    Sub Requests {{ profile.children|length }}

    + +
    + {% for child in profile.children %} +

    + + {{- child.getcollector('request').identifier -}} + + (token = {{ child.token }}) +

    + + {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: child.getcollector('request').requestattributes }, with_context = false) }} + {% endfor %} +
    +
    + {% endif %} +
    +{% endblock %} + +{% macro set_handler(controller, route, method) %} + {% if controller.class is defined -%} + {%- if method|default(false) %}{{ method }}{% endif -%} + {%- set link = controller.file|file_link(controller.line) %} + {%- if link %}{% else %}{% endif %} + + {%- if route|default(false) -%} + @{{ route }} + {%- else -%} + {{- controller.class|abbr_class|striptags -}} + {{- controller.method ? ' :: ' ~ controller.method -}} + {%- endif -%} + + {%- if link %}{% else %}
    {% endif %} + {%- else -%} + {{ route|default(controller) }} + {%- endif %} +{% endmacro %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/router.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/router.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..94faa719cd130e73a46a69354f53d9392b1012a7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/router.html.twig @@ -0,0 +1,14 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block toolbar %}{% endblock %} + +{% block menu %} + + {{ include('@WebProfiler/Icon/router.svg') }} + Routing + +{% endblock %} + +{% block panel %} + {{ render(path('_profiler_router', { token: token })) }} +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..ea73c8bde717e83acc30980b41f9088e3b5550c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig @@ -0,0 +1,546 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% import _self as helper %} + +{% if colors is not defined %} + {% set colors = { + 'default': '#999', + 'section': '#444', + 'event_listener': '#00B8F5', + 'event_listener_loading': '#00B8F5', + 'template': '#66CC00', + 'doctrine': '#FF6633', + 'propel': '#FF6633', + } %} +{% endif %} + +{% block toolbar %} + {% set total_time = collector.events|length ? '%.0f'|format(collector.duration) : 'n/a' %} + {% set initialization_time = collector.events|length ? '%.0f'|format(collector.inittime) : 'n/a' %} + {% set status_color = collector.events|length and collector.duration > 1000 ? 'yellow' : '' %} + + {% set icon %} + {{ include('@WebProfiler/Icon/time.svg') }} + {{ total_time }} + ms + {% endset %} + + {% set text %} +
    + Total time + {{ total_time }} ms +
    +
    + Initialization time + {{ initialization_time }} ms +
    + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} +{% endblock %} + +{% block menu %} + + {{ include('@WebProfiler/Icon/time.svg') }} + Performance + +{% endblock %} + +{% block panel %} +

    Performance metrics

    + +
    +
    + {{ '%.0f'|format(collector.duration) }} ms + Total execution time +
    + +
    + {{ '%.0f'|format(collector.inittime) }} ms + Symfony initialization +
    + + {% if profile.collectors.memory %} +
    + {{ '%.2f'|format(profile.collectors.memory.memory / 1024 / 1024) }} MB + Peak memory usage +
    + {% endif %} + + {% if profile.children|length > 0 %} +
    + +
    + {{ profile.children|length }} + Sub-Request{{ profile.children|length > 1 ? 's' }} +
    + + {% set subrequests_time = 0 %} + {% for child in profile.children %} + {% set subrequests_time = subrequests_time + child.getcollector('time').events.__section__.duration %} + {% endfor %} + +
    + {{ subrequests_time }} ms + Sub-Request{{ profile.children|length > 1 ? 's' }} time +
    + {% endif %} +
    + +

    Execution timeline

    + + {% if collector.events is empty %} +
    +

    No timing events have been recorded. Are you sure that debugging is enabled in the kernel?

    +
    + {% else %} + {{ block('panelContent') }} + {% endif %} +{% endblock %} + +{% block panelContent %} +
    + + + ms + (timeline only displays events with a duration longer than this threshold) +
    + + {% if profile.parent %} +

    + Sub-Request {{ profile.getcollector('request').requestattributes.get('_controller') }} + + {{ collector.events.__section__.duration }} ms + Return to parent request + +

    + {% elseif profile.children|length > 0 %} +

    + Main Request {{ collector.events.__section__.duration }} ms +

    + {% endif %} + + {{ helper.display_timeline('timeline_' ~ token, collector.events, colors) }} + + {% if profile.children|length %} +

    Note: sections with a striped background correspond to sub-requests.

    + +

    Sub-requests ({{ profile.children|length }})

    + + {% for child in profile.children %} + {% set events = child.getcollector('time').events %} +

    + {{ child.getcollector('request').identifier }} + {{ events.__section__.duration }} ms +

    + + {{ helper.display_timeline('timeline_' ~ child.token, events, colors) }} + {% endfor %} + {% endif %} + + +{% endblock %} + +{% macro dump_request_data(token, profile, events, origin) %} +{% autoescape 'js' %} +{% from _self import dump_events %} + { + "id": "{{ token }}", + "left": {{ "%F"|format(events.__section__.origin - origin) }}, + "events": [ +{{ dump_events(events) }} + ] + } +{% endautoescape %} +{% endmacro %} + +{% macro dump_events(events) %} +{% autoescape 'js' %} +{% for name, event in events %} +{% if '__section__' != name %} + { + "name": "{{ name }}", + "category": "{{ event.category }}", + "origin": {{ "%F"|format(event.origin) }}, + "starttime": {{ "%F"|format(event.starttime) }}, + "endtime": {{ "%F"|format(event.endtime) }}, + "duration": {{ "%F"|format(event.duration) }}, + "memory": {{ "%.1F"|format(event.memory / 1024 / 1024) }}, + "periods": [ + {%- for period in event.periods -%} + {"start": {{ "%F"|format(period.starttime) }}, "end": {{ "%F"|format(period.endtime) }}}{{ loop.last ? '' : ', ' }} + {%- endfor -%} + ] + }{{ loop.last ? '' : ',' }} +{% endif %} +{% endfor %} +{% endautoescape %} +{% endmacro %} + +{% macro display_timeline(id, events, colors) %} +
    +
    + {% for category, color in colors %} + {{ category }} + {% endfor %} +
    + +
    +{% endmacro %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..f5ff17680a2362c6b0ff406f4458f0f178f31c9a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig @@ -0,0 +1,196 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% import _self as helper %} + +{% block toolbar %} + {% if collector.messages|length %} + {% set icon %} + {{ include('@WebProfiler/Icon/translation.svg') }} + {% set status_color = collector.countMissings ? 'red' : collector.countFallbacks ? 'yellow' %} + {% set error_count = collector.countMissings + collector.countFallbacks %} + {{ error_count ?: collector.countdefines }} + {% endset %} + + {% set text %} +
    + Missing messages + + {{ collector.countMissings }} + +
    + +
    + Fallback messages + + {{ collector.countFallbacks }} + +
    + +
    + Defined messages + {{ collector.countdefines }} +
    + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} + {% endif %} +{% endblock %} + +{% block menu %} + + {{ include('@WebProfiler/Icon/translation.svg') }} + Translation + {% if collector.countMissings or collector.countFallbacks %} + {% set error_count = collector.countMissings + collector.countFallbacks %} + + {{ error_count }} + + {% endif %} + +{% endblock %} + +{% block panel %} + {% if collector.messages is empty %} +

    Translations

    +
    +

    No translations have been called.

    +
    + {% else %} + {{ block('panelContent') }} + {% endif %} +{% endblock %} + +{% block panelContent %} +

    Translation Metrics

    + +
    +
    + {{ collector.countdefines }} + Defined messages +
    + +
    + {{ collector.countFallbacks }} + Fallback messages +
    + +
    + {{ collector.countMissings }} + Missing messages +
    +
    + +

    Translation Messages

    + + {# sort translation messages in groups #} + {% set messages_defined, messages_missing, messages_fallback = [], [], [] %} + {% for message in collector.messages %} + {% if message.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_DEFINED') %} + {% set messages_defined = messages_defined|merge([message]) %} + {% elseif message.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_MISSING') %} + {% set messages_missing = messages_missing|merge([message]) %} + {% elseif message.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK') %} + {% set messages_fallback = messages_fallback|merge([message]) %} + {% endif %} + {% endfor %} + +
    +
    +

    Defined {{ messages_defined|length }}

    + +
    +

    + These messages are correctly translated into the given locale. +

    + + {% if messages_defined is empty %} +
    +

    None of the used translation messages are defined for the given locale.

    +
    + {% else %} + {{ helper.render_table(messages_defined) }} + {% endif %} +
    +
    + +
    +

    Fallback {{ messages_fallback|length }}

    + +
    +

    + These messages are not available for the given locale + but Symfony found them in the fallback locale catalog. +

    + + {% if messages_fallback is empty %} +
    +

    No fallback translation messages were used.

    +
    + {% else %} + {{ helper.render_table(messages_fallback) }} + {% endif %} +
    +
    + +
    +

    Missing {{ messages_missing|length }}

    + +
    +

    + These messages are not available for the given locale and cannot + be found in the fallback locales. Add them to the translation + catalogue to avoid Symfony outputting untranslated contents. +

    + + {% if messages_missing is empty %} +
    +

    There are no messages of this category.

    +
    + {% else %} + {{ helper.render_table(messages_missing) }} + {% endif %} +
    +
    +
    +{% endblock %} + +{% macro render_table(messages) %} + + + + + + + + + + + + {% for message in messages %} + + + + + + + + {% endfor %} + +
    LocaleDomainTimes usedMessage IDMessage Preview
    {{ message.locale }}{{ message.domain }}{{ message.count }} + {{ message.id }} + + {% if message.transChoiceNumber is not null %} + (pluralization is used) + {% endif %} + + {% if message.parameters|length > 0 %} + + + + {% endif %} + {{ message.translation }}
    +{% endmacro %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..c3c8a5d5f676479d62ad4eaf488de5236d60ce5b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig @@ -0,0 +1,101 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block toolbar %} + {% set time = collector.templatecount ? '%0.0f'|format(collector.time) : 'n/a' %} + {% set icon %} + {{ include('@WebProfiler/Icon/twig.svg') }} + {{ time }} + ms + {% endset %} + + {% set text %} +
    + Render Time + {{ time }} ms +
    +
    + Template Calls + {{ collector.templatecount }} +
    +
    + Block Calls + {{ collector.blockcount }} +
    +
    + Macro Calls + {{ collector.macrocount }} +
    + {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} +{% endblock %} + +{% block menu %} + + {{ include('@WebProfiler/Icon/twig.svg') }} + Twig + +{% endblock %} + +{% block panel %} + {% if collector.templatecount == 0 %} +

    Twig

    + +
    +

    No Twig templates were rendered for this request.

    +
    + {% else %} +

    Twig Metrics

    + +
    +
    + {{ '%0.0f'|format(collector.time) }} ms + Render time +
    + +
    + {{ collector.templatecount }} + Template calls +
    + +
    + {{ collector.blockcount }} + Block calls +
    + +
    + {{ collector.macrocount }} + Macro calls +
    +
    + +

    + Render time includes sub-requests rendering time (if any). +

    + +

    Rendered Templates

    + + + + + + + + + + {% for template, count in collector.templates %} + + + + + {% endfor %} + +
    Template NameRender Count
    {{ template }}{{ count }}
    + +

    Rendering Call Graph

    + +
    + {{ collector.htmlcallgraph }} +
    + {% endif %} +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg new file mode 100644 index 0000000000000000000000000000000000000000..bd878c3c6c21fadd088cfa1b90e21fee381e601a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg @@ -0,0 +1,6 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg new file mode 100644 index 0000000000000000000000000000000000000000..4eef3ee624ed2574eb784426087857d5a5ff0876 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg @@ -0,0 +1,5 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/config.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/config.svg new file mode 100644 index 0000000000000000000000000000000000000000..a407719e8c761b541ae57a5a307eba5400b103de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/config.svg @@ -0,0 +1,3 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/event.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/event.svg new file mode 100644 index 0000000000000000000000000000000000000000..898117ef94558ac4468f82d27a2f917488e6b63c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/event.svg @@ -0,0 +1,11 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/exception.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/exception.svg new file mode 100644 index 0000000000000000000000000000000000000000..aafe2e874b30cc14ab5db1d6dd890482b959112b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/exception.svg @@ -0,0 +1,15 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg new file mode 100644 index 0000000000000000000000000000000000000000..84fa75b6c3bf5cb5ec4f458eed86c11eded7deb7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg @@ -0,0 +1,6 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/forward.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/forward.svg new file mode 100644 index 0000000000000000000000000000000000000000..acb128509a9f52a5b454e7fde895f117ea7736c8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/forward.svg @@ -0,0 +1,4 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg new file mode 100644 index 0000000000000000000000000000000000000000..5c46bbb2e4957fec134705c2fb0cd668b21984a8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg @@ -0,0 +1,7 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg new file mode 100644 index 0000000000000000000000000000000000000000..104ba57aeac79d2522caa7b670b8be08b5ca405c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg @@ -0,0 +1,5 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/menu.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/menu.svg new file mode 100644 index 0000000000000000000000000000000000000000..51870801cf2847400e4ad4fe698fdd0c9576ed06 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/menu.svg @@ -0,0 +1,3 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no.svg new file mode 100644 index 0000000000000000000000000000000000000000..c0bb768d40433d3a99fb86a15d3f0a794129f877 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no.svg @@ -0,0 +1,5 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/redirect.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/redirect.svg new file mode 100644 index 0000000000000000000000000000000000000000..9cb3b89bcfbdd878bc06851b74ac2816ae64d54b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/redirect.svg @@ -0,0 +1,10 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/request.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/request.svg new file mode 100644 index 0000000000000000000000000000000000000000..68b092c6b88091fcdcf1b5809e60c338d7938db7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/request.svg @@ -0,0 +1,16 @@ + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/router.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/router.svg new file mode 100644 index 0000000000000000000000000000000000000000..3b7f94355b37da7e9d13da0819f5860c120f7cf3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/router.svg @@ -0,0 +1,6 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/search.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/search.svg new file mode 100644 index 0000000000000000000000000000000000000000..7c8724aab54c1ed52dac3c0142bbcbf664b3057e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/search.svg @@ -0,0 +1,7 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg new file mode 100644 index 0000000000000000000000000000000000000000..30b1c2e9aad51311623d0cd25a2d12ac22ca6cc2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg @@ -0,0 +1,12 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg new file mode 100644 index 0000000000000000000000000000000000000000..8ae615d38bc8450c409df4724a4afdab794d5a0a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg @@ -0,0 +1,5 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg new file mode 100644 index 0000000000000000000000000000000000000000..b7aa1249304b2b9576743059cf9fdfa07292cba1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg @@ -0,0 +1,13 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.svg new file mode 100644 index 0000000000000000000000000000000000000000..bfb4e6dea1e090f7157ea27ad3ca7751c4101823 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.svg @@ -0,0 +1,5 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/yes.svg b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/yes.svg new file mode 100644 index 0000000000000000000000000000000000000000..da650231d520d886c4a960dbd079fa169fec4bd4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/yes.svg @@ -0,0 +1,5 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/ajax_layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/ajax_layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..3e2f6f09fc6f9700650ae2dfdfd753b58b53645d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/ajax_layout.html.twig @@ -0,0 +1 @@ +{% block panel '' %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/bag.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/bag.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..4df5ccf1c6975cfc2171da805d8487320b455c0a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/bag.html.twig @@ -0,0 +1,20 @@ + + + + + + + + + {% for key in bag.keys|sort %} + + + + + {% else %} + + + + {% endfor %} + +
    {{ labels is defined ? labels[0] : 'Key' }}{{ labels is defined ? labels[1] : 'Value' }}
    {{ key }}{{ profiler_dump(bag.get(key), maxDepth=maxDepth|default(0)) }}
    (no data)
    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..5386b01464c15d17f9fb1cfebf841756511b458c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base.html.twig @@ -0,0 +1,19 @@ + + + + + + + Symfony Profiler + + + {% block head %} + + {% endblock %} + + + {% block body '' %} + + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..c31fb19d4459f4ee0885d7ec0cdcba8b240aa5dd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig @@ -0,0 +1,517 @@ +/* 1) { + setTimeout(function(){ + options.maxTries--; + request(url, onSuccess, onError, payload, options); + }, 500); + + return null; + } + + if (200 === xhr.status) { + (onSuccess || noop)(xhr); + } else { + (onError || noop)(xhr); + } + }; + xhr.send(payload || ''); + }, + + getPreference = function(name) { + if (!window.localStorage) { + return null; + } + + return localStorage.getItem(profilerStorageKey + name); + }, + + setPreference = function(name, value) { + if (!window.localStorage) { + return null; + } + + localStorage.setItem(profilerStorageKey + name, value); + }, + + requestStack = [], + + extractHeaders = function(xhr, stackElement) { + /* Here we avoid to call xhr.getResponseHeader in order to */ + /* prevent polluting the console with CORS security errors */ + var allHeaders = xhr.getAllResponseHeaders(); + var ret; + + if (ret = allHeaders.match(/^x-debug-token:\s+(.*)$/im)) { + stackElement.profile = ret[1]; + } + if (ret = allHeaders.match(/^x-debug-token-link:\s+(.*)$/im)) { + stackElement.profilerUrl = ret[1]; + } + }, + + renderAjaxRequests = function() { + var requestCounter = document.querySelectorAll('.sf-toolbar-ajax-requests'); + if (!requestCounter.length) { + return; + } + + var ajaxToolbarPanel = document.querySelector('.sf-toolbar-block-ajax'); + var tbodies = document.querySelectorAll('.sf-toolbar-ajax-request-list'); + var state = 'ok'; + if (tbodies.length) { + var tbody = tbodies[0]; + + var rows = document.createDocumentFragment(); + + if (requestStack.length) { + for (var i = 0; i < requestStack.length; i++) { + var request = requestStack[i]; + + var row = document.createElement('tr'); + rows.insertBefore(row, rows.firstChild); + + var methodCell = document.createElement('td'); + if (request.error) { + methodCell.className = 'sf-ajax-request-error'; + } + methodCell.textContent = request.method; + row.appendChild(methodCell); + + var typeCell = document.createElement('td'); + typeCell.textContent = request.type; + row.appendChild(typeCell); + + var statusCodeCell = document.createElement('td'); + var statusCode = document.createElement('span'); + if (request.statusCode < 300) { + statusCode.setAttribute('class', 'sf-toolbar-status'); + } else if (request.statusCode < 400) { + statusCode.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-yellow'); + } else { + statusCode.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-red'); + } + statusCode.textContent = request.statusCode || '-'; + statusCodeCell.appendChild(statusCode); + row.appendChild(statusCodeCell); + + var pathCell = document.createElement('td'); + pathCell.className = 'sf-ajax-request-url'; + if ('GET' === request.method) { + var pathLink = document.createElement('a'); + pathLink.setAttribute('href', request.url); + pathLink.textContent = request.url; + pathCell.appendChild(pathLink); + } else { + pathCell.textContent = request.url; + } + pathCell.setAttribute('title', request.url); + row.appendChild(pathCell); + + var durationCell = document.createElement('td'); + durationCell.className = 'sf-ajax-request-duration'; + + if (request.duration) { + durationCell.textContent = request.duration + "ms"; + } else { + durationCell.textContent = '-'; + } + row.appendChild(durationCell); + + row.appendChild(document.createTextNode(' ')); + var profilerCell = document.createElement('td'); + + if (request.profilerUrl) { + var profilerLink = document.createElement('a'); + profilerLink.setAttribute('href', request.profilerUrl); + profilerLink.textContent = request.profile; + profilerCell.appendChild(profilerLink); + } else { + profilerCell.textContent = 'n/a'; + } + + row.appendChild(profilerCell); + + var requestState = 'ok'; + if (request.error) { + requestState = 'error'; + if (state != "loading" && i > requestStack.length - 4) { + state = 'error'; + } + } else if (request.loading) { + requestState = 'loading'; + state = 'loading'; + } + row.className = 'sf-ajax-request sf-ajax-request-' + requestState; + } + + var infoSpan = document.querySelectorAll(".sf-toolbar-ajax-info")[0]; + var children = collectionToArray(tbody.children); + for (var i = 0; i < children.length; i++) { + tbody.removeChild(children[i]); + } + tbody.appendChild(rows); + + if (infoSpan) { + var text = requestStack.length + ' AJAX request' + (requestStack.length > 1 ? 's' : ''); + infoSpan.textContent = text; + } + + ajaxToolbarPanel.style.display = 'block'; + } else { + ajaxToolbarPanel.style.display = 'none'; + } + } + + requestCounter[0].textContent = requestStack.length; + + var className = 'sf-toolbar-ajax-requests sf-toolbar-value'; + requestCounter[0].className = className; + + if (state == 'ok') { + Sfjs.removeClass(ajaxToolbarPanel, 'sf-ajax-request-loading'); + Sfjs.removeClass(ajaxToolbarPanel, 'sf-toolbar-status-red'); + } else if (state == 'error') { + Sfjs.addClass(ajaxToolbarPanel, 'sf-toolbar-status-red'); + Sfjs.removeClass(ajaxToolbarPanel, 'sf-ajax-request-loading'); + } else { + Sfjs.addClass(ajaxToolbarPanel, 'sf-ajax-request-loading'); + } + }; + + var addEventListener; + + var el = document.createElement('div'); + if (!('addEventListener' in el)) { + addEventListener = function (element, eventName, callback) { + element.attachEvent('on' + eventName, callback); + }; + } else { + addEventListener = function (element, eventName, callback) { + element.addEventListener(eventName, callback, false); + }; + } + + {% if excluded_ajax_paths is defined %} + if (window.fetch && window.fetch.polyfill === undefined) { + var oldFetch = window.fetch; + window.fetch = function () { + var promise = oldFetch.apply(this, arguments); + var url = arguments[0]; + var params = arguments[1]; + var paramType = Object.prototype.toString.call(arguments[0]); + if (paramType === '[object Request]') { + url = arguments[0].url; + params = { + method: arguments[0].method, + credentials: arguments[0].credentials, + headers: arguments[0].headers, + mode: arguments[0].mode, + redirect: arguments[0].redirect + }; + } + if (!url.match(new RegExp({{ excluded_ajax_paths|json_encode|raw }}))) { + var method = 'GET'; + if (params && params.method !== undefined) { + method = params.method; + } + + var stackElement = { + loading: true, + error: false, + url: url, + method: method, + type: 'fetch', + start: new Date() + }; + + requestStack.push(stackElement); + promise.then(function (r) { + stackElement.duration = new Date() - stackElement.start; + stackElement.loading = false; + stackElement.error = r.status < 200 || r.status >= 400; + stackElement.statusCode = r.status; + stackElement.profile = r.headers.get('x-debug-token'); + stackElement.profilerUrl = r.headers.get('x-debug-token-link'); + Sfjs.renderAjaxRequests(); + }, function (e){ + stackElement.loading = false; + stackElement.error = true; + }); + Sfjs.renderAjaxRequests(); + } + + return promise; + }; + } + if (window.XMLHttpRequest && XMLHttpRequest.prototype.addEventListener) { + var proxied = XMLHttpRequest.prototype.open; + + XMLHttpRequest.prototype.open = function(method, url, async, user, pass) { + var self = this; + + /* prevent logging AJAX calls to static and inline files, like templates */ + var path = url; + if (url.substr(0, 1) === '/') { + if (0 === url.indexOf('{{ request.basePath|e('js') }}')) { + path = url.substr({{ request.basePath|length }}); + } + } + else if (0 === url.indexOf('{{ (request.schemeAndHttpHost ~ request.basePath)|e('js') }}')) { + path = url.substr({{ (request.schemeAndHttpHost ~ request.basePath)|length }}); + } + + if (!path.match(new RegExp({{ excluded_ajax_paths|json_encode|raw }}))) { + var stackElement = { + loading: true, + error: false, + url: url, + method: method, + type: 'xhr', + start: new Date() + }; + + requestStack.push(stackElement); + + this.addEventListener('readystatechange', function() { + if (self.readyState == 4) { + stackElement.duration = new Date() - stackElement.start; + stackElement.loading = false; + stackElement.error = self.status < 200 || self.status >= 400; + stackElement.statusCode = self.status; + extractHeaders(self, stackElement); + + Sfjs.renderAjaxRequests(); + } + }, false); + + Sfjs.renderAjaxRequests(); + } + + proxied.apply(this, Array.prototype.slice.call(arguments)); + }; + } + {% endif %} + + return { + hasClass: hasClass, + + removeClass: removeClass, + + addClass: addClass, + + toggleClass: toggleClass, + + getPreference: getPreference, + + setPreference: setPreference, + + addEventListener: addEventListener, + + request: request, + + renderAjaxRequests: renderAjaxRequests, + + load: function(selector, url, onSuccess, onError, options) { + var el = document.getElementById(selector); + + if (el && el.getAttribute('data-sfurl') !== url) { + request( + url, + function(xhr) { + el.innerHTML = xhr.responseText; + el.setAttribute('data-sfurl', url); + removeClass(el, 'loading'); + (onSuccess || noop)(xhr, el); + }, + function(xhr) { (onError || noop)(xhr, el); }, + '', + options + ); + } + + return this; + }, + + toggle: function(selector, elOn, elOff) { + var tmp = elOn.style.display, + el = document.getElementById(selector); + + elOn.style.display = elOff.style.display; + elOff.style.display = tmp; + + if (el) { + el.style.display = 'none' === tmp ? 'none' : 'block'; + } + + return this; + }, + + createTabs: function() { + var tabGroups = document.querySelectorAll('.sf-tabs'); + + /* create the tab navigation for each group of tabs */ + for (var i = 0; i < tabGroups.length; i++) { + var tabs = tabGroups[i].querySelectorAll('.tab'); + var tabNavigation = document.createElement('ul'); + tabNavigation.className = 'tab-navigation'; + + for (var j = 0; j < tabs.length; j++) { + var tabId = 'tab-' + i + '-' + j; + var tabTitle = tabs[j].querySelector('.tab-title').innerHTML; + + var tabNavigationItem = document.createElement('li'); + tabNavigationItem.setAttribute('data-tab-id', tabId); + if (j == 0) { Sfjs.addClass(tabNavigationItem, 'active'); } + if (Sfjs.hasClass(tabs[j], 'disabled')) { Sfjs.addClass(tabNavigationItem, 'disabled'); } + tabNavigationItem.innerHTML = tabTitle; + tabNavigation.appendChild(tabNavigationItem); + + var tabContent = tabs[j].querySelector('.tab-content'); + tabContent.parentElement.setAttribute('id', tabId); + } + + tabGroups[i].insertBefore(tabNavigation, tabGroups[i].firstChild); + } + + /* display the active tab and add the 'click' event listeners */ + for (i = 0; i < tabGroups.length; i++) { + tabNavigation = tabGroups[i].querySelectorAll('.tab-navigation li'); + + for (j = 0; j < tabNavigation.length; j++) { + tabId = tabNavigation[j].getAttribute('data-tab-id'); + document.getElementById(tabId).querySelector('.tab-title').className = 'hidden'; + + if (Sfjs.hasClass(tabNavigation[j], 'active')) { + document.getElementById(tabId).className = 'block'; + } else { + document.getElementById(tabId).className = 'hidden'; + } + + tabNavigation[j].addEventListener('click', function(e) { + var activeTab = e.target || e.srcElement; + + /* needed because when the tab contains HTML contents, user can click */ + /* on any of those elements instead of their parent '
  • ' element */ + while (activeTab.tagName.toLowerCase() !== 'li') { + activeTab = activeTab.parentNode; + } + + /* get the full list of tabs through the parent of the active tab element */ + var tabNavigation = activeTab.parentNode.children; + for (var k = 0; k < tabNavigation.length; k++) { + var tabId = tabNavigation[k].getAttribute('data-tab-id'); + document.getElementById(tabId).className = 'hidden'; + Sfjs.removeClass(tabNavigation[k], 'active'); + } + + Sfjs.addClass(activeTab, 'active'); + var activeTabId = activeTab.getAttribute('data-tab-id'); + document.getElementById(activeTabId).className = 'block'; + }); + } + } + }, + + createToggles: function() { + var toggles = document.querySelectorAll('.sf-toggle'); + + for (var i = 0; i < toggles.length; i++) { + var elementSelector = toggles[i].getAttribute('data-toggle-selector'); + var element = document.querySelector(elementSelector); + + Sfjs.addClass(element, 'sf-toggle-content'); + + if (toggles[i].hasAttribute('data-toggle-initial') && toggles[i].getAttribute('data-toggle-initial') == 'display') { + Sfjs.addClass(element, 'sf-toggle-visible'); + } else { + Sfjs.addClass(element, 'sf-toggle-hidden'); + } + + Sfjs.addEventListener(toggles[i], 'click', function(e) { + e.preventDefault(); + + var toggle = e.target || e.srcElement; + + /* needed because when the toggle contains HTML contents, user can click */ + /* on any of those elements instead of their parent '.sf-toggle' element */ + while (!Sfjs.hasClass(toggle, 'sf-toggle')) { + toggle = toggle.parentNode; + } + + var element = document.querySelector(toggle.getAttribute('data-toggle-selector')); + + Sfjs.toggleClass(element, 'sf-toggle-hidden'); + Sfjs.toggleClass(element, 'sf-toggle-visible'); + + /* the toggle doesn't change its contents when clicking on it */ + if (!toggle.hasAttribute('data-toggle-alt-content')) { + return; + } + + if (!toggle.hasAttribute('data-toggle-original-content')) { + toggle.setAttribute('data-toggle-original-content', toggle.innerHTML); + } + + var currentContent = toggle.innerHTML; + var originalContent = toggle.getAttribute('data-toggle-original-content'); + var altContent = toggle.getAttribute('data-toggle-alt-content'); + toggle.innerHTML = currentContent !== altContent ? altContent : originalContent; + }); + } + } + }; + })(); + + Sfjs.addEventListener(window, 'load', function() { + Sfjs.createTabs(); + Sfjs.createToggles(); + }); + +/*]]>*/ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..d04cf37e6c7b17b944440abde7589f14ff742ce3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig @@ -0,0 +1,14 @@ + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/info.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/info.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..ef381fe4a73a72538fe9eac6fe6ee973d4686aa9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/info.html.twig @@ -0,0 +1,37 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% set messages = { + 'purge' : { + status: 'success', + title: 'The profiler database was purged successfully', + message: 'Now you need to browse some pages with the Symfony Profiler enabled to collect data.' + }, + 'no_token' : { + status: 'error', + title: (token|default('') == 'latest') ? 'There are no profiles' : 'Token not found', + message: (token|default('') == 'latest') ? 'No profiles found in the database.' : 'Token "' ~ token|default('') ~ '" was not found in the database.' + }, + 'upload_error' : { + status: 'error', + title: 'A problem occurred when uploading the data', + message: 'No file given or the file was not uploaded successfully.' + }, + 'already_exists' : { + status: 'error', + title: 'A problem occurred when uploading the data', + message: 'The token already exists in the database.' + } +} %} + +{% block summary %} +
    +
    +

    {{ messages[about].status|title }}

    +
    +
    +{% endblock %} + +{% block panel %} +

    {{ messages[about].title }}

    +

    {{ messages[about].message }}

    +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..9a201aa189de905134a9a1b7556e6850c4b6b824 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig @@ -0,0 +1,141 @@ +{% extends '@WebProfiler/Profiler/base.html.twig' %} + +{% block body %} + {{ include('@WebProfiler/Profiler/header.html.twig', with_context = false) }} + +
    + {% block summary %} + {% if profile is defined %} + {% set status_code = ('request' in profile.collectors|keys) ? profile.getcollector('request').statuscode|default(0) : 0 %} + {% set css_class = status_code > 399 ? 'status-error' : status_code > 299 ? 'status-warning' : 'status-success' %} + +
    +
    +

    + {% if profile.method|upper in ['GET', 'HEAD'] %} + {{ profile.url }} + {% else %} + {{ profile.url }} + {% endif %} +

    + + {% set request_collector = profile.collectors.request|default(false) %} + {% if request_collector is defined and request_collector.redirect -%} + {%- set redirect = request_collector.redirect -%} + {%- set controller = redirect.controller -%} + {%- set redirect_route = '@' ~ redirect.route %} + + {%- endif %} + + {% if request_collector and request_collector.forward|default(false) and request_collector.forward.controller.class is defined -%} + {%- set forward = request_collector.forward -%} + {%- set controller = forward.controller -%} + + {%- endif %} + + +
    +
    + {% endif %} + {% endblock %} +
    + +
    +
    +
    +
    + {{ include('@WebProfiler/Profiler/base_js.html.twig') }} + {% block panel '' %} +
    +
    + + +
    +
    + +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/open.css.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/open.css.twig new file mode 100644 index 0000000000000000000000000000000000000000..144e86f062bb10b3531b6447f982af3a3746a93f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/open.css.twig @@ -0,0 +1,69 @@ +{# Mixins + ========================================================================= #} +{% set mixins = { + 'break_long_words': '-ms-word-break: break-all; word-break: break-all; word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto;', + 'monospace_font': 'font-family: monospace; font-size: 13px; font-size-adjust: 0.5;', + 'sans_serif_font': 'font-family: Helvetica, Arial, sans-serif;', + 'subtle_border_and_shadow': 'background: #FFF; border: 1px solid #E0E0E0; box-shadow: 0px 0px 1px rgba(128, 128, 128, .2);' +} %} + +{# Normalization + (normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css) + ========================================================================= #} +html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0} + +{# Basic styles + ========================================================================= #} +html, body { + height: 100%; + width: 100%; +} +body { + background-color: #F9F9F9; + color: #aaa; + display: flex; + flex-direction: column; + {{ mixins.sans_serif_font|raw }} + font-size: 14px; + line-height: 1.4; +} +.header { + background-color: #222; + position: fixed; + top: 0; + display: flex; + width: 100%; +} +.header h1 { + color: #FFF; + font-weight: normal; + font-size: 21px; + margin: 0; + padding: 10px 10px 8px; + word-break: break-all; +} + +a.doc { + color: #FFF; + text-decoration: none; + margin: auto; + margin-right: 10px; +} + +a.doc:hover { + text-decoration: underline; +} + +.source { + margin-top: 41px; +} + +.source li.selected { + background: rgba(255, 255, 153, 0.5); +} + +.anchor { + position: relative; + top: -7em; + visibility: hidden; +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/open.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/open.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..9b482f1f0aa96cff23438b736cece5aa492b5981 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/open.html.twig @@ -0,0 +1,17 @@ +{% extends '@WebProfiler/Profiler/base.html.twig' %} + +{% block head %} + +{% endblock %} + +{% block body %} +
    +

    {{ file }} line {{ line }}

    + Open in your IDE? +
    +
    + {{ filename|file_excerpt(line, -1) }} +
    +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig new file mode 100644 index 0000000000000000000000000000000000000000..bb5aea2f444ae7ebb432c4fd65bdf24b57213c36 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig @@ -0,0 +1,988 @@ +{# Mixins + ========================================================================= #} +{% set mixins = { + 'break_long_words': '-ms-word-break: break-all; word-break: break-all; word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto;', + 'monospace_font': 'font-family: monospace; font-size: 13px; font-size-adjust: 0.5;', + 'sans_serif_font': 'font-family: Helvetica, Arial, sans-serif;', + 'subtle_border_and_shadow': 'background: #FFF; border: 1px solid #E0E0E0; box-shadow: 0px 0px 1px rgba(128, 128, 128, .2);' +} %} + +{# when updating any of these colors, do the same in toolbar.css.twig #} +{% set colors = { 'success': '#4F805D', 'warning': '#A46A1F', 'error': '#B0413E' } %} + +{# Normalization + (normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css) + ========================================================================= #} +html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0} + +{# Basic styles + ========================================================================= #} +html, body { + height: 100%; + width: 100%; +} +body { + background-color: #F9F9F9; + color: #222; + display: flex; + flex-direction: column; + {{ mixins.sans_serif_font|raw }} + font-size: 14px; + line-height: 1.4; +} + +h2, h3, h4 { + font-weight: 500; + margin: 1.5em 0 .5em; +} +h2 + h3, +h3 + h4 { + margin-top: 1em; +} +h2 { + font-size: 24px; +} +h3 { + font-size: 21px; +} +h4 { + font-size: 18px; +} +h2 span, h3 span, h4 span, +h2 small, h3 small, h4 small { + color: #999; +} + +li { + margin-bottom: 10px; +} + +p { + font-size: 16px; + margin-bottom: 1em; +} + +a { + color: #218BC3; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a.link-inverse { + text-decoration: underline; +} +a.link-inverse:hover { + text-decoration: none; +} +a:active, +a:hover { + outline: 0; +} +h2 a, +h3 a, +h4 a { + text-decoration: underline; +} +h2 a:hover, +h3 a:hover, +h4 a:hover { + text-decoration: none; +} + +abbr { + border-bottom: 1px dotted #444; + cursor: help; +} + +code, pre { + {{ mixins.monospace_font|raw }} +} + +{# Buttons + ------------------------------------------------------------------------- #} +button { + {{ mixins.sans_serif_font|raw }} +} +.btn { + background: #777; + border-radius: 2px; + border: 0; + color: #F5F5F5; + display: inline-block; + padding: .5em .75em; +} +.btn:hover { + cursor: pointer; + opacity: 0.8; + text-decoration: none; +} +.btn-sm { + font-size: 12px; +} +.btn-sm svg { + height: 16px; + width: 16px; + vertical-align: middle; +} +.btn-link { + border-color: transparent; + color: #218BC3; + text-decoration: none; + background-color: transparent; + outline: none; + border: 0; + padding: 0; + cursor: pointer; +} +.btn-link:hover { + text-decoration: underline; +} +{# Tables + ------------------------------------------------------------------------- #} +table, tr, th, td { + background: #FFF; + border-collapse: collapse; + line-height: 1.5; + vertical-align: top; +} +table { + {{ mixins.subtle_border_and_shadow|raw }}; + margin: 1em 0; + width: 100%; +} + +table th, table td { + padding: 8px 10px; +} + +table th { + font-weight: bold; + text-align: left; +} +table thead th { + background-color: #E0E0E0; +} +table thead th.key { + width: 19%; +} + +table tbody th, +table tbody td { + {{ mixins.monospace_font|raw }} + border: 1px solid #E0E0E0; + border-width: 1px 0; +} + +table tbody td { + {{ mixins.break_long_words|raw }} +} + +table tbody div { + margin: .25em 0; +} +table tbody ul { + margin: 0; + padding: 0 0 0 1em; +} + +{# Utility classes + ========================================================================= #} +.block { + display: block; +} +.full-width { + width: 100%; +} +.hidden { + display: none; +} +.nowrap { + white-space: pre; +} +.newline { + display: block; +} +.break-long-words { + {{ mixins.break_long_words|raw }} +} +.text-small { + font-size: 12px !important; +} +.text-muted { + color: #999; +} +.text-bold { + font-weight: bold; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +.font-normal { + {{ mixins.sans_serif_font|raw }} + font-size: 14px; +} +.help { + color: #999; + font-size: 14px; + margin-bottom: .5em; +} +.empty { + border: 4px dashed #E0E0E0; + color: #999; + margin: 1em 0; + padding: .5em 2em; +} + +.label { + background-color: #666; + color: #FAFAFA; + display: inline-block; + font-size: 12px; + font-weight: bold; + padding: 3px 7px; + white-space: nowrap; +} +.label.same-width { + min-width: 70px; + text-align: center; +} +.label.status-success { background: {{ colors.success|raw }}; color: #FFF; } +.label.status-warning { background: {{ colors.warning|raw }}; color: #FFF; } +.label.status-error { background: {{ colors.error|raw }}; color: #FFF; } + +{# Metrics + ------------------------------------------------------------------------- #} +.metrics { + margin: 1em 0 0; + overflow: auto; +} +.metrics .metric { + float: left; + margin: 0 1em 1em 0; +} + +.metric { + {{ mixins.subtle_border_and_shadow|raw }}; + min-width: 100px; + min-height: 70px; +} +.metric .value { + display: block; + font-size: 28px; + padding: 8px 15px 4px; + text-align: center; +} +.metric .value svg { + margin: 5px 0 -5px; +} +.metric .unit { + color: #999; + font-size: 18px; + margin-left: -4px; +} +.metric .label { + background: #E0E0E0; + color: #222; + display: block; + font-size: 12px; + padding: 5px; + text-align: center; +} + +.metrics-horizontal .metric { + min-height: 0; + min-width: 0; +} +.metrics-horizontal .metric .value, +.metrics-horizontal .metric .label { + display: inline; + padding: 2px 6px; +} +.metrics-horizontal .metric .label { + display: inline-block; + padding: 6px; +} +.metrics-horizontal .metric .value { + font-size: 16px; +} +.metrics-horizontal .metric .value svg { + max-height: 14px; + line-height: 10px; + margin: 0; + padding-left: 4px; + vertical-align: middle; +} + +.metric-divider { + float: left; + margin: 0 1em; + min-height: 1px; {# required to apply 'margin' to an empty 'div' #} +} + +{# Cards + ------------------------------------------------------------------------- #} +.card { + {{ mixins.subtle_border_and_shadow|raw }}; + margin: 1em 0; + padding: 10px; +} +.card-block + .card-block { + border-top: 1px solid #E0E0E0; + padding-top: 10px; +} +.card *:first-child, +.card-block *:first-child { + margin-top: 0; +} +.card .label { + background-color: #EEE; + color: #222; +} + +{# Status + ------------------------------------------------------------------------- #} +.status-success { + background: rgba(94, 151, 110, 0.3); +} +.status-warning { + background: rgba(240, 181, 24, 0.3); +} +.status-error { + background: rgba(176, 65, 62, 0.2); +} +.status-success td, +.status-warning td, +.status-error td { + background: transparent; +} +tr.status-error td, +tr.status-warning td { + border-bottom: 1px solid #FAFAFA; + border-top: 1px solid #FAFAFA; +} + +.status-warning .colored { + color: {{ colors.warning|raw }}; +} +.status-error .colored { + color: {{ colors.error|raw }}; +} + +{# Syntax highlighting + ========================================================================= #} +.highlight pre { + margin: 0; + white-space: pre-wrap; +} + +.highlight .keyword { color: #8959A8; font-weight: bold; } +.highlight .word { color: #222222; } +.highlight .variable { color: #916319; } +.highlight .symbol { color: #222222; } +.highlight .comment { color: #999999; } +.highlight .backtick { color: #718C00; } +.highlight .string { color: #718C00; } +.highlight .number { color: #F5871F; font-weight: bold; } +.highlight .error { color: #C82829; } + +{# Icons + ========================================================================= #} +.sf-icon { + vertical-align: middle; + background-repeat: no-repeat; + background-size: contain; + width: 16px; + height: 16px; + display: inline-block; +} +.sf-icon svg { + width: 16px; + height: 16px; +} +.sf-icon.sf-medium, +.sf-icon.sf-medium svg { + width: 24px; + height: 24px; +} +.sf-icon.sf-large, +.sf-icon.sf-large svg { + width: 32px; + height: 32px; +} + + +{# Layout + ========================================================================= #} +.container { + max-width: 1300px; + padding-right: 15px; +} +#header { + flex: 0 0 auto; +} +#header .container { + display: flex; + flex-direction: row; + justify-content: space-between; +} +#summary { + flex: 0 0 auto; +} +#content { + height: 100%; +} +#main { + display: flex; + flex-direction: row-reverse; + min-height: 100%; +} +#sidebar { + flex: 0 0 220px; +} +#collector-wrapper { + flex: 0 1 100%; + min-width: 0; +} +#collector-content { + margin: 0 0 30px 0; + padding: 14px 0 14px 20px; +} + +#main h2:first-of-type { + margin-top: 0; +} + +{# Header + ========================================================================= #} +#header { + background-color: #222; + overflow: hidden; +} +#header h1 { + color: #FFF; + font-weight: normal; + font-size: 21px; + margin: 0; + padding: 10px 10px 8px; +} +#header h1 span { + color: #CCC; +} +#header h1 svg { + height: 40px; + width: 40px; + margin-top: -4px; + vertical-align: middle; +} +#header h1 svg path { + fill: #FFF; +} +#header .search { + padding-top: 11px; +} +#header .search input { + border: 1px solid #DDD; + margin-right: 4px; + padding: 7px 8px; + width: 200px; +} + +{# Summary + ========================================================================= #} +#summary .status { + background: #E0E0E0; + border: solid rgba(0, 0, 0, 0.1); + border-width: 2px 0; + padding: 10px; +} +#summary h2, +#summary h2 a { + color: #222; + font-size: 21px; + margin: 0; + text-decoration: none; +} +#summary h2 a:hover { + text-decoration: underline; +} + +#summary .status-success { background: {{ colors.success|raw }}; } +#summary .status-warning { background: {{ colors.warning|raw }}; } +#summary .status-error { background: {{ colors.error|raw }}; } + +#summary .status-success h2, +#summary .status-success a, +#summary .status-warning h2, +#summary .status-warning a, +#summary .status-error h2, +#summary .status-error a { + color: #FFF; +} + +#summary dl.metadata { + margin: 5px 0 0; + color: rgba(255, 255, 255, 0.75); +} +#summary dl.metadata dt, +#summary dl.metadata dd { + display: inline-block; + font-size: 13px; +} +#summary dl.metadata dt { + font-weight: bold; +} +#summary dl.metadata dt:after { + content: ':'; +} +#summary dl.metadata dd { + margin: 0 1.5em 0 0; +} + +#summary dl.metadata .label { + background: rgba(255, 255, 255, 0.2); +} + +{# Sidebar + ========================================================================= #} +#sidebar { + background: #444; + color: #CCC; + padding-bottom: 30px; + position: relative; + width: 220px; + z-index: 9999; +} +#sidebar .module { + padding: 10px; + width: 220px; +} + +{# Sidebar Shortcuts + ------------------------------------------------------------------------- #} +#sidebar #sidebar-shortcuts { + background: #333; + width: 220px; +} +#sidebar #sidebar-shortcuts .shortcuts { + position: relative; + padding: 16px 10px; +} +#sidebar-shortcuts .icon { + display: block; + float: left; + width: 50px; + margin: 2px 0 0 -10px; + text-align: center; +} +#sidebar #sidebar-shortcuts .btn { + color: #F5F5F5; +} +#sidebar #sidebar-shortcuts .btn + .btn { + margin-left: 5px; +} +#sidebar #sidebar-shortcuts .btn { + padding: .5em; +} + +{# Sidebar Search + ------------------------------------------------------------------------- #} +#sidebar-search .form-group:first-of-type { + padding-top: 20px; +} +#sidebar-search .form-group { + clear: both; + overflow: hidden; + padding-bottom: 10px; +} +#sidebar-search .form-group label { + float: left; + font-size: 13px; + line-height: 24px; + width: 60px; +} +#sidebar-search .form-group input, +#sidebar-search .form-group select { + float: left; + font-size: 13px; + padding: 3px 6px; +} +#sidebar-search .form-group input { + background: #CCC; + border: 1px solid #999; + color: #222; + width: 120px; +} +#sidebar-search .form-group select { + color: #222; +} +#sidebar-search .form-group .btn { + float: right; + margin-right: 10px; +} + +{# Sidebar Menu + ------------------------------------------------------------------------- #} +#menu-profiler { + margin: 0; + padding: 0; + list-style-type: none; +} +#menu-profiler li { + position: relative; + margin-bottom: 0; +} +#menu-profiler li a { + border: solid transparent; + border-width: 2px 0; + color: #CCC; + display: block; +} +#menu-profiler li a:hover { + text-decoration: none; +} +#menu-profiler li a .label { + background: transparent; + color: #EEE; + display: block; + padding: 8px 10px 8px 50px; + overflow: hidden; + white-space: nowrap; +} +#menu-profiler li a .label .icon { + display: block; + position: absolute; + left: 0; + top: 8px; + width: 50px; + text-align: center; +} +#menu-profiler .label .icon img, +#menu-profiler .label .icon svg { + height: 24px; + max-width: 24px; +} +#menu-profiler li a .label .icon svg path { + fill: #DDD; +} +#menu-profiler li a .label strong { + font-size: 16px; + font-weight: normal; +} +#menu-profiler li a .label.disabled { + opacity: .25; +} +#menu-profiler li a:hover .label.disabled, +#menu-profiler li.selected a .label.disabled { + opacity: 1; +} + +#menu-profiler li.selected a, +#menu-profiler:hover li.selected a:hover, +#menu-profiler li a:hover { + background: #666; + border: solid #555; + border-width: 2px 0; +} +#menu-profiler li.selected a .label, +#menu-profiler li a:hover .label { + color: #FFF; +} +#menu-profiler li.selected a .icon svg path, +#menu-profiler li a:hover .icon svg path { + fill: #FFF; +} + +#menu-profiler li a .count { + background-color: #666; + color: #FFF; + display: inline-block; + font-weight: bold; + min-width: 10px; + padding: 2px 6px; + position: absolute; + right: 10px; + text-align: center; + vertical-align: baseline; + white-space: nowrap; +} +#menu-profiler li a span.count span { + font-size: 12px; + +} +#menu-profiler li a span.count span + span::before { + content: " / "; + color: #AAA; +} + +#menu-profiler .label-status-warning .count { + background: {{ colors.warning|raw }}; +} +#menu-profiler .label-status-error .count { + background: {{ colors.error|raw }}; +} + +{# Timeline panel + ========================================================================= #} +#timeline-control { + background: #FFF; + margin: 1em 0; + padding: 10px; +} +#timeline-control label { + font-weight: bold; + margin-right: 1em; +} +#timeline-control input { + font-size: 16px; + padding: 4px; + text-align: right; + width: 40px; +} +#timeline-control .help { + margin-left: 1em; +} + +.sf-profiler-timeline .legends { + font-size: 12px; + line-height: 1.5em; +} +.sf-profiler-timeline .legends span { + border-left: solid 14px; + padding: 0 10px 0 5px; +} +.sf-profiler-timeline canvas { + border: 1px solid #DDD; + background: #FFF; + margin: .5em 0; +} +.sf-profiler-timeline + p.help { + margin-top: 0; +} + +{# Tabbed navigation + ========================================================================= #} +.tab-navigation { + margin: 0 0 1em 0; + padding: 0; +} +.tab-navigation li { + background: #FFF; + border: 1px solid #DDD; + color: #444; + cursor: pointer; + display: inline-block; + font-size: 16px; + margin: 0 0 0 -1px; + padding: .5em .75em; + z-index: 1; +} +.tab-navigation li:hover { + background: #EEE; +} +.tab-navigation li .badge { + background-color: #F5F5F5; + color: #777; + display: inline-block; + font-size: 14px; + font-weight: bold; + margin-left: 8px; + min-width: 10px; + padding: 1px 6px; + text-align: center; + white-space: nowrap; +} +.tab-navigation li:hover .badge { + background: #FAFAFA; + color: #777; +} +.tab-navigation li.disabled { + background: #F5F5F5; + color: #999; +} +.tab-navigation li.active { + background: #666; + border-color: #666; + color: #FAFAFA; + z-index: 1100; +} +.tab-navigation li.active .badge { + background-color: #444; + color: #FFF; +} +.tab-content > *:first-child { + margin-top: 0; +} +.tab-navigation li .badge.status-warning { background: {{ colors.warning|raw }}; color: #FFF; } +.tab-navigation li .badge.status-error { background: {{ colors.error|raw }}; color: #FFF; } + +{# Toggles + ========================================================================= #} +.sf-toggle-content { + -moz-transition: display .25s ease; + -webkit-transition: display .25s ease; + transition: display .25s ease; +} +.sf-toggle-content.sf-toggle-hidden { + display: none; +} +.sf-toggle-content.sf-toggle-visible { + display: block; +} + +{# Twig panel + ========================================================================= #} +#twig-dump pre { + font-size: 12px; + line-height: 1.7; +} +#twig-dump span { + border-radius: 2px; + padding: 1px 2px; +} +#twig-dump .status-error { background: transparent; color: #B0413E; } +#twig-dump .status-warning { background: rgba(240, 181, 24, 0.3); } +#twig-dump .status-success { background: rgba(100, 189, 99, 0.2); } + +{# Logger panel + ========================================================================= #} +table.logs .metadata { + display: block; + font-size: 12px; +} + +{# Doctrine panel + ========================================================================= #} +.sql-runnable { + background: #F5F5F5; + margin: .5em 0; + padding: 1em; +} +.queries-table pre { + {{ mixins.break_long_words|raw }} + margin: 0; + white-space: pre-wrap; +} + +{# Dump panel + ========================================================================= #} +#collector-content .sf-dump { + margin-bottom: 2em; +} +#collector-content pre.sf-dump, +#collector-content .sf-dump code, +#collector-content .sf-dump samp { + {{ mixins.monospace_font|raw }} +} +#collector-content .sf-dump a { + cursor: pointer; +} +#collector-content .sf-dump pre.sf-dump, +#collector-content .sf-dump .trace { + border: 1px solid #DDD; + background: #FFF; + padding: 10px; + margin: 0.5em 0; +} + +#collector-content pre.sf-dump, +#collector-content .sf-dump-default { + color: #CC7832; + background: none; +} +#collector-content .sf-dump-str { color: #629755; } +#collector-content .sf-dump-private, +#collector-content .sf-dump-protected, +#collector-content .sf-dump-public { color: #262626; } +#collector-content .sf-dump-note { color: #6897BB; } +#collector-content .sf-dump-key { color: #789339; } +#collector-content .sf-dump-ref { color: #6E6E6E; } +#collector-content .sf-dump-ellipsis { color: #CC7832; max-width: 100em; } + +#collector-content .sf-dump { + margin: 0; + padding: 0; + line-height: 1.4; +} + +#collector-content .dump-inline .sf-dump { + display: inline; + white-space: normal; + font-size: inherit; + line-height: inherit; +} + +#collector-content .sf-dump .trace { + font-size: 12px; +} +#collector-content .sf-dump .trace li { + margin-bottom: 0; + padding: 0; +} +#collector-content .sf-dump .trace li.selected { + background: rgba(255, 255, 153, 0.5); +} + +{# Search Results page + ========================================================================= #} +#search-results td { + {{ mixins.sans_serif_font|raw }} + vertical-align: middle; +} + +#search-results .sf-search { + visibility: hidden; + margin-left: 2px; +} +#search-results tr:hover .sf-search { + visibility: visible; +} + +{# Small screens + ========================================================================= #} + +.visible-small { + display: none; +} +.hidden-small { + display: inherit; +} + +@media (max-width: 768px) { + #sidebar { + flex-basis: 50px; + overflow-x: hidden; + transition: flex-basis 200ms ease-out; + } + #sidebar:hover, #sidebar.expanded { + flex-basis: 220px; + } + + #sidebar-search { + display: none; + } + #sidebar:hover #sidebar-search.sf-toggle-visible, #sidebar.expanded #sidebar-search.sf-toggle-visible { + display: block; + } + + #sidebar .module { + display: none; + } + #sidebar:hover .module, #sidebar.expanded .module { + display: block; + } + + .visible-small { + display: inherit; + } + .hidden-small { + display: none; + } + + .btn-sm svg { + margin-left: 2px; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..cd9fd06cc6145169ad96f17418f20cd3d17c41d7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig @@ -0,0 +1,73 @@ +{% extends '@WebProfiler/Profiler/layout.html.twig' %} + +{% block summary %} +
    +
    +

    Profile Search

    +
    +
    +{% endblock %} + +{% block panel %} +

    {{ tokens ? tokens|length : 'No' }} results found

    + + {% if tokens %} + + + + + + + + + + + + + {% for result in tokens %} + {% set css_class = result.status_code|default(0) > 399 ? 'status-error' : result.status_code|default(0) > 299 ? 'status-warning' : 'status-success' %} + + + + + + + + + + {% endfor %} + +
    StatusIPMethodURLTimeToken
    + {{ result.status_code|default('n/a') }} + + {{ result.ip }} + {% if request.session is not null %} + + {{ include('@WebProfiler/Icon/search.svg') }} + + {% endif %} + + {{ result.method }} + {% if request.session is not null %} + + {{ include('@WebProfiler/Icon/search.svg') }} + + {% endif %} + + {{ result.url }} + {% if request.session is not null %} + + {{ include('@WebProfiler/Icon/search.svg') }} + + {% endif %} + + {{ result.time|date('d-M-Y') }} + {{ result.time|date('H:i:s') }} + {{ result.token }}
    + {% else %} +
    +

    The query returned no result.

    +
    + {% endif %} + +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..f25893a9d46d51784cfac6f0845b8488834f9784 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig @@ -0,0 +1,56 @@ + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/table.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/table.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..cb9986bd241fe088f41eb174f79d5944fbb85a89 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/table.html.twig @@ -0,0 +1,16 @@ + + + + + + + + + {% for key in data|keys|sort %} + + + + + {% endfor %} + +
    {{ labels is defined ? labels[0] : 'Key' }}{{ labels is defined ? labels[1] : 'Value' }}
    {{ key }}{{ profiler_dump(data[key]) }}
    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig new file mode 100644 index 0000000000000000000000000000000000000000..d2db7b700d9b0b6a3fc931dccce26496d0036447 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -0,0 +1,515 @@ +{# when updating any of these colors, do the same in profiler.css.twig #} +{% set colors = { 'success': '#4F805D', 'warning': '#A46A1F', 'error': '#B0413E' } %} + +.sf-minitoolbar { + background-color: #222; + border-top-left-radius: 4px; + bottom: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + display: none; + height: 36px; + padding: 6px; + position: fixed; + right: 0; + z-index: 99999; +} + +.sf-minitoolbar a { + display: block; +} +.sf-minitoolbar svg, +.sf-minitoolbar img { + max-height: 24px; + max-width: 24px; + display: inline; +} + +.sf-toolbar-clearer { + clear: both; + height: 36px; +} + +.sf-display-none { + display: none; +} + +.sf-toolbarreset * { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + vertical-align: baseline; +} + +.sf-toolbarreset { + background-color: #222; + bottom: 0; + box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + color: #EEE; + font: 11px Arial, sans-serif; + left: 0; + margin: 0; + padding: 0 36px 0 0; + position: fixed; + right: 0; + text-align: left; + text-transform: none; + z-index: 99999; + + /* neutralize the aliasing defined by external CSS styles */ + -webkit-font-smoothing: subpixel-antialiased; + -moz-osx-font-smoothing: auto; +} +.sf-toolbarreset abbr { + border: dashed #777; + border-width: 0 0 1px; +} +.sf-toolbarreset svg, +.sf-toolbarreset img { + height: 20px; + display: inline-block; +} + +.sf-toolbarreset .hide-button { + background: #444; + display: block; + position: absolute; + top: 0; + right: 0; + width: 36px; + height: 36px; + cursor: pointer; + text-align: center; +} +.sf-toolbarreset .hide-button svg { + max-height: 18px; + margin-top: 10px; +} + +.sf-toolbar-block { + cursor: default; + display: block; + float: left; + height: 36px; + margin-right: 0; + white-space: nowrap; +} +.sf-toolbar-block > a, +.sf-toolbar-block > a:hover { + display: block; + text-decoration: none; +} + +.sf-toolbar-block span { + display: inline-block; +} +.sf-toolbar-block .sf-toolbar-value { + color: #F5F5F5; + font-size: 13px; + line-height: 36px; + padding: 0; +} +.sf-toolbar-block .sf-toolbar-label, +.sf-toolbar-block .sf-toolbar-class-separator { + color: #AAA; + font-size: 12px; +} + +.sf-toolbar-block .sf-toolbar-info { + border-collapse: collapse; + display: table; + z-index: 100000; +} +.sf-toolbar-block hr { + border-top: 1px solid #777; + margin: 4px 0; + padding-top: 4px; +} +.sf-toolbar-block .sf-toolbar-info-piece { + /* this 'border-bottom' trick is needed because 'margin-bottom' doesn't work for table rows */ + border-bottom: solid transparent 3px; + display: table-row; +} +.sf-toolbar-block .sf-toolbar-info-piece-additional, +.sf-toolbar-block .sf-toolbar-info-piece-additional-detail { + display: none; +} +.sf-toolbar-block .sf-toolbar-info-group { + margin-bottom: 4px; + padding-bottom: 2px; + border-bottom: 1px solid #333333; +} +.sf-toolbar-block .sf-toolbar-info-group:last-child { + margin-bottom: 0; + padding-bottom: 0; + border-bottom: none; +} + +.sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status { + padding: 2px 5px; + margin-bottom: 0; +} +.sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status + .sf-toolbar-status { + margin-left: 4px; +} + +.sf-toolbar-block .sf-toolbar-info-piece:last-child { + margin-bottom: 0; +} + +.sf-toolbar-block .sf-toolbar-info-piece a { + color: #99CDD8; + text-decoration: underline; +} +.sf-toolbar-block .sf-toolbar-info-piece a:hover { + text-decoration: none; +} + +.sf-toolbar-block .sf-toolbar-info-piece b { + color: #AAA; + display: table-cell; + font-size: 11px; + padding: 4px 8px 4px 0; +} +.sf-toolbar-block:not(.sf-toolbar-block-dump) .sf-toolbar-info-piece span { + color: #F5F5F5; +} +.sf-toolbar-block .sf-toolbar-info-piece span { + font-size: 12px; +} + +.sf-toolbar-block .sf-toolbar-info { + background-color: #444; + bottom: 36px; + color: #F5F5F5; + display: none; + padding: 9px 0; + position: absolute; +} + +.sf-toolbar-block .sf-toolbar-info:empty { + visibility: hidden; +} + +.sf-toolbar-block .sf-toolbar-status { + display: inline-block; + color: #FFF; + background-color: #666; + padding: 3px 6px; + margin-bottom: 2px; + vertical-align: middle; + min-width: 15px; + min-height: 13px; + text-align: center; +} + +.sf-toolbar-block .sf-toolbar-status-green { + background-color: {{ colors.success|raw }}; +} +.sf-toolbar-block .sf-toolbar-status-red { + background-color: {{ colors.error|raw }}; +} +.sf-toolbar-block .sf-toolbar-status-yellow { + background-color: {{ colors.warning|raw }}; +} + +.sf-toolbar-block.sf-toolbar-status-green { + background-color: {{ colors.success|raw }}; + color: #FFF; +} +.sf-toolbar-block.sf-toolbar-status-red { + background-color: {{ colors.error|raw }}; + color: #FFF; +} +.sf-toolbar-block.sf-toolbar-status-yellow { + background-color: {{ colors.warning|raw }}; + color: #FFF; +} + +.sf-toolbar-block-request .sf-toolbar-status { + color: #FFF; + display: inline-block; + font-size: 14px; + height: 36px; + line-height: 36px; + padding: 0 10px; +} +.sf-toolbar-block-request .sf-toolbar-info-piece a { + text-decoration: none; +} +.sf-toolbar-block-request .sf-toolbar-info-piece a:hover { + text-decoration: underline; +} +.sf-toolbar-block-request .sf-toolbar-redirection-status { + font-weight: normal; + padding: 2px 4px; + line-height: 18px; +} +.sf-toolbar-block-request .sf-toolbar-info-piece span.sf-toolbar-redirection-method { + font-size: 12px; + height: 17px; + line-height: 17px; +} + +.sf-toolbar-status-green .sf-toolbar-label, +.sf-toolbar-status-yellow .sf-toolbar-label, +.sf-toolbar-status-red .sf-toolbar-label { + color: #FFF; +} +.sf-toolbar-status-green svg path, +.sf-toolbar-status-red svg path, +.sf-toolbar-status-yellow svg path { + fill: #FFF; +} +.sf-toolbar-block-config svg path { + fill: #FFF; +} + +.sf-toolbar-block .sf-toolbar-icon { + display: block; + height: 36px; + padding: 0 7px; +} +.sf-toolbar-block-request .sf-toolbar-icon { + padding-left: 0; + padding-right: 0; +} + +.sf-toolbar-block .sf-toolbar-icon img, +.sf-toolbar-block .sf-toolbar-icon svg { + border-width: 0; + position: relative; + top: 8px; +} + +.sf-toolbar-block .sf-toolbar-icon img + span, +.sf-toolbar-block .sf-toolbar-icon svg + span { + margin-left: 4px; +} +.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-value { + margin-left: 4px; +} + +.sf-toolbar-block:hover { + position: relative; +} +.sf-toolbar-block:hover .sf-toolbar-icon { + background-color: #444; + position: relative; + z-index: 10002; +} +.sf-toolbar-block:hover .sf-toolbar-info { + display: block; + padding: 10px; + max-width: 480px; + max-height: 480px; + word-wrap: break-word; + overflow: hidden; + overflow-y: auto; +} +.sf-toolbar-info-piece b.sf-toolbar-ajax-info { + color: #F5F5F5; +} +.sf-toolbar-ajax-requests { + table-layout: auto; + width: 100%; +} +.sf-toolbar-ajax-requests td { + background-color: #444; + border-bottom: 1px solid #777; + color: #F5F5F5; + font-size: 12px; + padding: 4px; +} +.sf-toolbar-ajax-requests tr:last-child td { + border-bottom: 0; +} +.sf-toolbar-ajax-requests th { + background-color: #222; + border-bottom: 0; + color: #AAA; + font-size: 11px; + padding: 4px; +} +.sf-ajax-request-url { + max-width: 250px; + line-height: 9px; + overflow: hidden; + text-overflow: ellipsis; +} +.sf-toolbar-ajax-requests .sf-ajax-request-url a { + text-decoration: none; +} +.sf-toolbar-ajax-requests .sf-ajax-request-url a:hover { + text-decoration: underline; +} +.sf-ajax-request-duration { + text-align: right; +} +.sf-ajax-request-loading { + -webkit-animation: sf-blink .5s ease-in-out infinite; + -o-animation: sf-blink .5s ease-in-out infinite; + -moz-animation: sf-blink .5s ease-in-out infinite; + animation: sf-blink .5s ease-in-out infinite; +} +@-webkit-keyframes sf-blink { + 0% { background: #222; } + 50% { background: #444; } + 100% { background: #222; } +} +@-moz-keyframes sf-blink { + 0% { background: #222; } + 50% { background: #444; } + 100% { background: #222; } +} +@keyframes sf-blink { + 0% { background: #222; } + 50% { background: #444; } + 100% { background: #222; } +} + +.sf-toolbar-block-dump pre.sf-dump { + background-color: #222; + border-color: #777; + border-radius: 0; + margin: 6px 0 12px 0; +} +.sf-toolbar-block-dump pre.sf-dump:last-child { + margin-bottom: 0; +} +.sf-toolbar-block-dump .sf-toolbar-info-piece { + display: block; +} +.sf-toolbar-block-dump .sf-toolbar-info-piece .sf-toolbar-file-line { + color: #AAA; + margin-left: 4px; +} +.sf-toolbar-block-dump .sf-toolbar-info img { + display: none; +} + +/* Override the setting when the toolbar is on the top */ +{% if position == 'top' %} + .sf-minitoolbar { + border-bottom-left-radius: 4px; + border-top-left-radius: 0; + bottom: auto; + right: 0; + top: 0; + } + + .sf-toolbarreset { + bottom: auto; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); + top: 0; + } + + .sf-toolbar-block .sf-toolbar-info { + bottom: auto; + top: 36px; + } +{% endif %} + +{% if not floatable %} + .sf-toolbarreset { + position: static; + } +{% endif %} + +/* Responsive Design */ +.sf-toolbar-icon .sf-toolbar-label, +.sf-toolbar-icon .sf-toolbar-value { + display: none; +} +.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-label { + display: inline-block; +} + +/* Legacy Design - these styles are maintained to make old panels look + a bit better on the new toolbar */ +.sf-toolbar-block .sf-toolbar-info-piece-additional-detail { + color: #AAA; + font-size: 12px; +} +.sf-toolbar-status-green .sf-toolbar-info-piece-additional-detail, +.sf-toolbar-status-yellow .sf-toolbar-info-piece-additional-detail, +.sf-toolbar-status-red .sf-toolbar-info-piece-additional-detail { + color: #FFF; +} + +@media (min-width: 768px) { + + .sf-toolbar-icon .sf-toolbar-label, + .sf-toolbar-icon .sf-toolbar-value { + display: inline; + } + + .sf-toolbar-block .sf-toolbar-icon img, + .sf-toolbar-block .sf-toolbar-icon svg { + top: 6px; + } + .sf-toolbar-block-time .sf-toolbar-icon svg, + .sf-toolbar-block-memory .sf-toolbar-icon svg { + display: none; + } + .sf-toolbar-block-time .sf-toolbar-icon svg + span, + .sf-toolbar-block-memory .sf-toolbar-icon svg + span { + margin-left: 0; + } + + .sf-toolbar-block .sf-toolbar-icon { + padding: 0 10px; + } + .sf-toolbar-block-time .sf-toolbar-icon { + padding-right: 5px; + } + .sf-toolbar-block-memory .sf-toolbar-icon { + padding-left: 5px; + } + .sf-toolbar-block-request .sf-toolbar-icon { + padding-left: 0; + padding-right: 0; + } + .sf-toolbar-block-request .sf-toolbar-label { + margin-left: 5px; + } + .sf-toolbar-block-request .sf-toolbar-status + svg { + margin-left: 5px; + } + .sf-toolbar-block-request .sf-toolbar-icon svg + .sf-toolbar-label { + margin-left: 0; + } + .sf-toolbar-block-request .sf-toolbar-label + .sf-toolbar-value { + margin-right: 10px; + } + + .sf-toolbar-block-request:hover .sf-toolbar-info { + max-width: none; + } + + .sf-toolbar-block .sf-toolbar-info-piece b { + font-size: 12px; + } + .sf-toolbar-block .sf-toolbar-info-piece span { + font-size: 13px; + } + + .sf-toolbar-block-right { + float: right; + margin-left: 0; + margin-right: 0; + } +} + +@media (min-width: 1024px) { + .sf-toolbar-block .sf-toolbar-info-piece-additional, + .sf-toolbar-block .sf-toolbar-info-piece-additional-detail { + display: inline-block; + } + + .sf-toolbar-block .sf-toolbar-info-piece-additional:empty, + .sf-toolbar-block .sf-toolbar-info-piece-additional-detail:empty { + display: none; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..6a2de1d6911b5197b5055a29a67b6156a7730f73 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig @@ -0,0 +1,37 @@ + +{% if 'normal' != position %} + + + {{ include('@WebProfiler/Profiler/toolbar.css.twig', { 'position': position, 'floatable': true }) }} + +
    +{% endif %} + +
    + {% for name, template in templates %} + {% if block('toolbar', template) is defined %} + {% with { + collector: profile.getcollector(name), + profiler_url: profiler_url, + token: profile.token, + name: name, + profiler_markup_version: profiler_markup_version, + csp_script_nonce: csp_script_nonce, + csp_style_nonce: csp_style_nonce + } %} + {{ block('toolbar', template) }} + {% endwith %} + {% endif %} + {% endfor %} + + {% if 'normal' != position %} + + {{ include('@WebProfiler/Icon/close.svg') }} + + {% endif %} +
    + diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..69872418cfb21e3ffd1220e2ccd2f0b69778598e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig @@ -0,0 +1,6 @@ +
    + {% if link is not defined or link %}{% endif %} +
    {{ icon|default('') }}
    + {% if link|default(false) %}
    {% endif %} +
    {{ text|default('') }}
    +
    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..ea038277c4beccab46da06281adf111a2e8c72bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig @@ -0,0 +1,103 @@ +
    +{{ include('@WebProfiler/Profiler/base_js.html.twig') }} +/* pageWidth) { + toolbarInfo.style.left = 0; + } + else if (leftValue > 0 && rightValue > 0) { + toolbarInfo.style.right = (rightValue * -1) + 'px'; + } else if (leftValue < 0) { + toolbarInfo.style.left = 0; + } else { + toolbarInfo.style.right = '0px'; + } + }; + } + Sfjs.addEventListener(document.getElementById('sfToolbarHideButton-{{ token }}'), 'click', function (event) { + event.preventDefault(); + + var p = this.parentNode; + p.style.display = 'none'; + (p.previousElementSibling || p.previousSibling).style.display = 'none'; + document.getElementById('sfMiniToolbar-{{ token }}').style.display = 'block'; + Sfjs.setPreference('toolbar/displayState', 'none'); + }); + Sfjs.addEventListener(document.getElementById('sfToolbarMiniToggler-{{ token }}'), 'click', function (event) { + event.preventDefault(); + + var elem = this.parentNode; + if (elem.style.display == 'none') { + document.getElementById('sfToolbarMainContent-{{ token }}').style.display = 'none'; + document.getElementById('sfToolbarClearer-{{ token }}').style.display = 'none'; + elem.style.display = 'block'; + } else { + document.getElementById('sfToolbarMainContent-{{ token }}').style.display = 'block'; + document.getElementById('sfToolbarClearer-{{ token }}').style.display = 'block'; + elem.style.display = 'none' + } + + Sfjs.setPreference('toolbar/displayState', 'block'); + }) + }, + function(xhr) { + if (xhr.status !== 0) { + confirm('An error occurred while loading the web debug toolbar (' + xhr.status + ': ' + xhr.statusText + ').\n\nDo you want to open the profiler?') && (window.location = '{{ path("_profiler", { "token": token }) }}'); + } + }, + { maxTries: 5 } + ); + })(); +/*]]>*/ diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_redirect.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_redirect.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..35b6e90eb56ae51c4751c143ea0edc9a18b47217 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_redirect.html.twig @@ -0,0 +1,18 @@ +{% extends '@Twig/layout.html.twig' %} + +{% block title 'Redirection Intercepted' %} + +{% block body %} +
    +
    +

    This request redirects to {{ location }}.

    + +

    + + The redirect was intercepted by the web debug toolbar to help debugging. + For more information, see the "intercept-redirects" option of the Profiler. + +

    +
    +
    +{% endblock %} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Router/panel.html.twig b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Router/panel.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..16487d3fcbd364e4fd7169bdd6b8e9e1188054b3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Router/panel.html.twig @@ -0,0 +1,78 @@ +

    Routing

    + +
    +
    + {{ request.route ?: '(none)' }} + Matched route +
    + + {% if request.route %} +
    + {{ traces|length }} + Tested routes before match +
    + {% endif %} +
    + +{% if request.route %} +

    Route Parameters

    + + {% if request.routeParams is empty %} +
    +

    No parameters.

    +
    + {% else %} + {{ include('@WebProfiler/Profiler/table.html.twig', { data: request.routeParams, labels: ['Name', 'Value'] }, with_context = false) }} + {% endif %} +{% endif %} + +{% if router.redirect %} +

    Route Redirection

    + +

    This page redirects to:

    +
    + {{ router.targetUrl }} + {% if router.targetRoute %}(route: "{{ router.targetRoute }}"){% endif %} +
    +{% endif %} + +

    Route Matching Logs

    + +
    + Path to match: {{ request.pathinfo }} +
    + + + + + + + + + + + + {% for trace in traces %} + + + + + + + {% endfor %} + +
    #Route namePathLog
    {{ loop.index }}{{ trace.name }}{{ trace.path }} + {% if trace.level == 1 %} + Path almost matches, but + {{ trace.log }} + {% elseif trace.level == 2 %} + {{ trace.log }} + {% else %} + Path does not match + {% endif %} +
    + +

    + Note: These matching logs are based on the current router configuration, + which might differ from the configuration used when profiling this request. +

    diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..24522f16595373a2fe44d86e9e0f42e3bac7ac20 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php @@ -0,0 +1,165 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Tests\Controller; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController; +use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler; +use Symfony\Component\HttpKernel\Profiler\Profile; +use Symfony\Component\HttpFoundation\Request; + +class ProfilerControllerTest extends TestCase +{ + /** + * @dataProvider getEmptyTokenCases + */ + public function testEmptyToken($token) + { + $urlGenerator = $this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->getMock(); + $twig = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock(); + $profiler = $this + ->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler') + ->disableOriginalConstructor() + ->getMock(); + + $controller = new ProfilerController($urlGenerator, $profiler, $twig, array()); + + $response = $controller->toolbarAction(Request::create('/_wdt/empty'), $token); + $this->assertEquals(200, $response->getStatusCode()); + } + + public function getEmptyTokenCases() + { + return array( + array(null), + // "empty" is also a valid empty token case, see https://github.com/symfony/symfony/issues/10806 + array('empty'), + ); + } + + /** + * @dataProvider provideCspVariants + */ + public function testReturns404onTokenNotFound($withCsp) + { + $twig = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock(); + $profiler = $this + ->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler') + ->disableOriginalConstructor() + ->getMock(); + + $profiler + ->expects($this->exactly(2)) + ->method('loadProfile') + ->will($this->returnCallback(function ($token) { + if ('found' == $token) { + return new Profile($token); + } + })) + ; + + $controller = $this->createController($profiler, $twig, $withCsp); + + $response = $controller->toolbarAction(Request::create('/_wdt/found'), 'found'); + $this->assertEquals(200, $response->getStatusCode()); + + $response = $controller->toolbarAction(Request::create('/_wdt/notFound'), 'notFound'); + $this->assertEquals(404, $response->getStatusCode()); + } + + /** + * @dataProvider provideCspVariants + */ + public function testSearchResult($withCsp) + { + $twig = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock(); + $profiler = $this + ->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler') + ->disableOriginalConstructor() + ->getMock(); + + $controller = $this->createController($profiler, $twig, $withCsp); + + $tokens = array( + array( + 'token' => 'token1', + 'ip' => '127.0.0.1', + 'method' => 'GET', + 'url' => 'http://example.com/', + 'time' => 0, + 'parent' => null, + 'status_code' => 200, + ), + array( + 'token' => 'token2', + 'ip' => '127.0.0.1', + 'method' => 'GET', + 'url' => 'http://example.com/not_found', + 'time' => 0, + 'parent' => null, + 'status_code' => 404, + ), + ); + $profiler + ->expects($this->once()) + ->method('find') + ->will($this->returnValue($tokens)); + + $request = Request::create('/_profiler/empty/search/results', 'GET', array( + 'limit' => 2, + 'ip' => '127.0.0.1', + 'method' => 'GET', + 'url' => 'http://example.com/', + )); + + $twig->expects($this->once()) + ->method('render') + ->with($this->stringEndsWith('results.html.twig'), $this->equalTo(array( + 'token' => 'empty', + 'profile' => null, + 'tokens' => $tokens, + 'ip' => '127.0.0.1', + 'method' => 'GET', + 'status_code' => null, + 'url' => 'http://example.com/', + 'start' => null, + 'end' => null, + 'limit' => 2, + 'panel' => null, + 'request' => $request, + ))); + + $response = $controller->searchResultsAction($request, 'empty'); + $this->assertEquals(200, $response->getStatusCode()); + } + + public function provideCspVariants() + { + return array( + array(true), + array(false), + ); + } + + private function createController($profiler, $twig, $withCSP) + { + $urlGenerator = $this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->getMock(); + + if ($withCSP) { + $nonceGenerator = $this->getMockBuilder('Symfony\Bundle\WebProfilerBundle\Csp\NonceGenerator')->getMock(); + + return new ProfilerController($urlGenerator, $profiler, $twig, array(), 'normal', new ContentSecurityPolicyHandler($nonceGenerator)); + } + + return new ProfilerController($urlGenerator, $profiler, $twig, array(), 'normal'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..eb91f5d3575700761a8a0794eb27e8c29ee15ab0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php @@ -0,0 +1,207 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Tests\Csp; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +class ContentSecurityPolicyHandlerTest extends TestCase +{ + /** + * @dataProvider provideRequestAndResponses + */ + public function testGetNonces($nonce, $expectedNonce, Request $request, Response $response) + { + $cspHandler = new ContentSecurityPolicyHandler($this->mockNonceGenerator($nonce)); + + $this->assertSame($expectedNonce, $cspHandler->getNonces($request, $response)); + } + + /** + * @dataProvider provideRequestAndResponsesForOnKernelResponse + */ + public function testOnKernelResponse($nonce, $expectedNonce, Request $request, Response $response, array $expectedCsp) + { + $cspHandler = new ContentSecurityPolicyHandler($this->mockNonceGenerator($nonce)); + + $this->assertSame($expectedNonce, $cspHandler->updateResponseHeaders($request, $response)); + + $this->assertFalse($response->headers->has('X-SymfonyProfiler-Script-Nonce')); + $this->assertFalse($response->headers->has('X-SymfonyProfiler-Style-Nonce')); + + foreach ($expectedCsp as $header => $value) { + $this->assertSame($value, $response->headers->get($header)); + } + } + + public function provideRequestAndResponses() + { + $nonce = bin2hex(random_bytes(16)); + + $requestScriptNonce = 'request-with-headers-script-nonce'; + $requestStyleNonce = 'request-with-headers-style-nonce'; + + $responseScriptNonce = 'response-with-headers-script-nonce'; + $responseStyleNonce = 'response-with-headers-style-nonce'; + + $requestNonceHeaders = array( + 'X-SymfonyProfiler-Script-Nonce' => $requestScriptNonce, + 'X-SymfonyProfiler-Style-Nonce' => $requestStyleNonce, + ); + $responseNonceHeaders = array( + 'X-SymfonyProfiler-Script-Nonce' => $responseScriptNonce, + 'X-SymfonyProfiler-Style-Nonce' => $responseStyleNonce, + ); + + return array( + array($nonce, array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), $this->createRequest(), $this->createResponse()), + array($nonce, array('csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce), $this->createRequest($requestNonceHeaders), $this->createResponse($responseNonceHeaders)), + array($nonce, array('csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce), $this->createRequest($requestNonceHeaders), $this->createResponse()), + array($nonce, array('csp_script_nonce' => $responseScriptNonce, 'csp_style_nonce' => $responseStyleNonce), $this->createRequest(), $this->createResponse($responseNonceHeaders)), + ); + } + + public function provideRequestAndResponsesForOnKernelResponse() + { + $nonce = bin2hex(random_bytes(16)); + + $requestScriptNonce = 'request-with-headers-script-nonce'; + $requestStyleNonce = 'request-with-headers-style-nonce'; + + $responseScriptNonce = 'response-with-headers-script-nonce'; + $responseStyleNonce = 'response-with-headers-style-nonce'; + + $requestNonceHeaders = array( + 'X-SymfonyProfiler-Script-Nonce' => $requestScriptNonce, + 'X-SymfonyProfiler-Style-Nonce' => $requestStyleNonce, + ); + $responseNonceHeaders = array( + 'X-SymfonyProfiler-Script-Nonce' => $responseScriptNonce, + 'X-SymfonyProfiler-Style-Nonce' => $responseStyleNonce, + ); + + return array( + array( + $nonce, + array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + $this->createRequest(), + $this->createResponse(), + array('Content-Security-Policy' => null, 'X-Content-Security-Policy' => null), + ), + array( + $nonce, array('csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce), + $this->createRequest($requestNonceHeaders), + $this->createResponse($responseNonceHeaders), + array('Content-Security-Policy' => null, 'X-Content-Security-Policy' => null), + ), + array( + $nonce, + array('csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce), + $this->createRequest($requestNonceHeaders), + $this->createResponse(), + array('Content-Security-Policy' => null, 'X-Content-Security-Policy' => null), + ), + array( + $nonce, + array('csp_script_nonce' => $responseScriptNonce, 'csp_style_nonce' => $responseStyleNonce), + $this->createRequest(), + $this->createResponse($responseNonceHeaders), + array('Content-Security-Policy' => null, 'X-Content-Security-Policy' => null), + ), + array( + $nonce, + array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + $this->createRequest(), + $this->createResponse(array('Content-Security-Policy' => 'frame-ancestors https: ; form-action: https:')), + array('Content-Security-Policy' => 'frame-ancestors https: ; form-action: https:', 'X-Content-Security-Policy' => null), + ), + array( + $nonce, + array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + $this->createRequest(), + $this->createResponse(array('Content-Security-Policy' => 'default-src \'self\' domain.com; script-src \'self\' \'unsafe-inline\'')), + array('Content-Security-Policy' => 'default-src \'self\' domain.com; script-src \'self\' \'unsafe-inline\'; style-src \'self\' domain.com \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => null), + ), + array( + $nonce, + array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + $this->createRequest(), + $this->createResponse(array('Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'')), + array('Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'', 'X-Content-Security-Policy' => null), + ), + array( + $nonce, + array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + $this->createRequest(), + $this->createResponse(array('Content-Security-Policy' => 'script-src \'self\'; style-src \'self\'')), + array('Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'; style-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => null), + ), + array( + $nonce, + array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + $this->createRequest(), + $this->createResponse(array('X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'')), + array('X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'', 'Content-Security-Policy' => null), + ), + array( + $nonce, + array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + $this->createRequest(), + $this->createResponse(array('X-Content-Security-Policy' => 'script-src \'self\'')), + array('X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy' => null), + ), + array( + $nonce, + array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + $this->createRequest(), + $this->createResponse(array('X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'sha384-LALALALALAAL\'')), + array('X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'sha384-LALALALALAAL\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy' => null), + ), + array( + $nonce, + array('csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce), + $this->createRequest(), + $this->createResponse(array('Content-Security-Policy' => 'script-src \'self\'; style-src \'self\'', 'X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'; style-src \'self\'')), + array('Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'; style-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'; style-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\''), + ), + ); + } + + private function createRequest(array $headers = array()) + { + $request = new Request(); + $request->headers->add($headers); + + return $request; + } + + private function createResponse(array $headers = array()) + { + $response = new Response(); + $response->headers->add($headers); + + return $response; + } + + private function mockNonceGenerator($value) + { + $generator = $this->getMockBuilder('Symfony\Bundle\WebProfilerBundle\Csp\NonceGenerator')->getMock(); + + $generator->expects($this->any()) + ->method('generate') + ->will($this->returnValue($value)); + + return $generator; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b11f6928b4e92ecd4ece3f0613bab473f625619b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.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\Bundle\WebProfilerBundle\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\WebProfilerBundle\DependencyInjection\Configuration; +use Symfony\Component\Config\Definition\Processor; + +class ConfigurationTest extends TestCase +{ + /** + * @dataProvider getDebugModes + */ + public function testConfigTree($options, $results) + { + $processor = new Processor(); + $configuration = new Configuration(); + $config = $processor->processConfiguration($configuration, array($options)); + + $this->assertEquals($results, $config); + } + + public function getDebugModes() + { + return array( + array(array(), array('intercept_redirects' => false, 'toolbar' => false, 'position' => 'bottom', 'excluded_ajax_paths' => '^/(app(_[\\w]+)?\\.php/)?_wdt')), + array(array('intercept_redirects' => true), array('intercept_redirects' => true, 'toolbar' => false, 'position' => 'bottom', 'excluded_ajax_paths' => '^/(app(_[\\w]+)?\\.php/)?_wdt')), + array(array('intercept_redirects' => false), array('intercept_redirects' => false, 'toolbar' => false, 'position' => 'bottom', 'excluded_ajax_paths' => '^/(app(_[\\w]+)?\\.php/)?_wdt')), + array(array('toolbar' => true), array('intercept_redirects' => false, 'toolbar' => true, 'position' => 'bottom', 'excluded_ajax_paths' => '^/(app(_[\\w]+)?\\.php/)?_wdt')), + array(array('position' => 'top'), array('intercept_redirects' => false, 'toolbar' => false, 'position' => 'top', 'excluded_ajax_paths' => '^/(app(_[\\w]+)?\\.php/)?_wdt')), + array(array('excluded_ajax_paths' => 'test'), array('intercept_redirects' => false, 'toolbar' => false, 'position' => 'bottom', 'excluded_ajax_paths' => 'test')), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b5a9b53e5dbdcf89cd1eefe921e25a49c27207fb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Tests\DependencyInjection; + +use Symfony\Bundle\WebProfilerBundle\Tests\TestCase; +use Symfony\Bundle\WebProfilerBundle\DependencyInjection\WebProfilerExtension; +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Dumper\PhpDumper; + +class WebProfilerExtensionTest extends TestCase +{ + private $kernel; + /** + * @var \Symfony\Component\DependencyInjection\Container + */ + private $container; + + public static function assertSaneContainer(Container $container, $message = '') + { + $errors = array(); + foreach ($container->getServiceIds() as $id) { + try { + $container->get($id); + } catch (\Exception $e) { + $errors[$id] = $e->getMessage(); + } + } + + self::assertEquals(array(), $errors, $message); + } + + protected function setUp() + { + parent::setUp(); + + $this->kernel = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\KernelInterface')->getMock(); + + $this->container = new ContainerBuilder(); + $this->container->register('router', $this->getMockClass('Symfony\\Component\\Routing\\RouterInterface')); + $this->container->register('twig', 'Twig_Environment'); + $this->container->register('twig_loader', 'Twig_Loader_Array')->addArgument(array()); + $this->container->register('twig', 'Twig_Environment')->addArgument(new Reference('twig_loader')); + $this->container->setParameter('kernel.bundles', array()); + $this->container->setParameter('kernel.cache_dir', __DIR__); + $this->container->setParameter('kernel.debug', false); + $this->container->setParameter('kernel.root_dir', __DIR__); + $this->container->setParameter('kernel.charset', 'UTF-8'); + $this->container->setParameter('debug.file_link_format', null); + $this->container->setParameter('profiler.class', array('Symfony\\Component\\HttpKernel\\Profiler\\Profiler')); + $this->container->register('profiler', $this->getMockClass('Symfony\\Component\\HttpKernel\\Profiler\\Profiler')) + ->addArgument(new Definition($this->getMockClass('Symfony\\Component\\HttpKernel\\Profiler\\ProfilerStorageInterface'))); + $this->container->setParameter('data_collector.templates', array()); + $this->container->set('kernel', $this->kernel); + } + + protected function tearDown() + { + parent::tearDown(); + + $this->container = null; + $this->kernel = null; + } + + /** + * @dataProvider getDebugModes + */ + public function testDefaultConfig($debug) + { + $this->container->setParameter('kernel.debug', $debug); + + $extension = new WebProfilerExtension(); + $extension->load(array(array()), $this->container); + + $this->assertFalse($this->container->has('web_profiler.debug_toolbar')); + + $this->assertSaneContainer($this->getDumpedContainer()); + } + + /** + * @dataProvider getDebugModes + */ + public function testToolbarConfig($toolbarEnabled, $interceptRedirects, $listenerInjected, $listenerEnabled) + { + $extension = new WebProfilerExtension(); + $extension->load(array(array('toolbar' => $toolbarEnabled, 'intercept_redirects' => $interceptRedirects)), $this->container); + + $this->assertSame($listenerInjected, $this->container->has('web_profiler.debug_toolbar')); + + $this->assertSaneContainer($this->getDumpedContainer()); + + if ($listenerInjected) { + $this->assertSame($listenerEnabled, $this->container->get('web_profiler.debug_toolbar')->isEnabled()); + } + } + + public function getDebugModes() + { + return array( + array(false, false, false, false), + array(true, false, true, true), + array(false, true, true, false), + array(true, true, true, true), + ); + } + + private function getDumpedContainer() + { + static $i = 0; + $class = 'WebProfilerExtensionTestContainer'.$i++; + + $this->container->compile(); + + $dumper = new PhpDumper($this->container); + eval('?>'.$dumper->dump(array('class' => $class))); + + $container = new $class(); + $container->set('kernel', $this->kernel); + + return $container; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..da7495c8c419e5ed49c41440c87b9b466667a04e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php @@ -0,0 +1,290 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener; +use Symfony\Component\HttpFoundation\HeaderBag; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; + +class WebDebugToolbarListenerTest extends TestCase +{ + /** + * @dataProvider getInjectToolbarTests + */ + public function testInjectToolbar($content, $expected) + { + $listener = new WebDebugToolbarListener($this->getTwigMock()); + $m = new \ReflectionMethod($listener, 'injectToolbar'); + $m->setAccessible(true); + + $response = new Response($content); + + $m->invoke($listener, $response, Request::create('/'), array('csp_script_nonce' => 'scripto', 'csp_style_nonce' => 'stylo')); + $this->assertEquals($expected, $response->getContent()); + } + + public function getInjectToolbarTests() + { + return array( + array('', "\nWDT\n"), + array(' + + + + + ', " + + + + \nWDT\n + "), + ); + } + + /** + * @dataProvider provideRedirects + */ + public function testRedirectionIsIntercepted($statusCode, $hasSession) + { + $response = new Response('Some content', $statusCode); + $response->headers->set('X-Debug-Token', 'xxxxxxxx'); + $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(false, 'html', $hasSession), HttpKernelInterface::MASTER_REQUEST, $response); + + $listener = new WebDebugToolbarListener($this->getTwigMock('Redirection'), true); + $listener->onKernelResponse($event); + + $this->assertEquals(200, $response->getStatusCode()); + $this->assertEquals('Redirection', $response->getContent()); + } + + public function testToolbarIsInjected() + { + $response = new Response(''); + $response->headers->set('X-Debug-Token', 'xxxxxxxx'); + + $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(), HttpKernelInterface::MASTER_REQUEST, $response); + + $listener = new WebDebugToolbarListener($this->getTwigMock()); + $listener->onKernelResponse($event); + + $this->assertEquals("\nWDT\n", $response->getContent()); + } + + /** + * @depends testToolbarIsInjected + */ + public function testToolbarIsNotInjectedOnContentDispositionAttachment() + { + $response = new Response(''); + $response->headers->set('Content-Disposition', 'attachment; filename=test.html'); + $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(false, 'html'), HttpKernelInterface::MASTER_REQUEST, $response); + + $listener = new WebDebugToolbarListener($this->getTwigMock()); + $listener->onKernelResponse($event); + + $this->assertEquals('', $response->getContent()); + } + + /** + * @depends testToolbarIsInjected + * @dataProvider provideRedirects + */ + public function testToolbarIsNotInjectedOnRedirection($statusCode, $hasSession) + { + $response = new Response('', $statusCode); + $response->headers->set('X-Debug-Token', 'xxxxxxxx'); + $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(false, 'html', $hasSession), HttpKernelInterface::MASTER_REQUEST, $response); + + $listener = new WebDebugToolbarListener($this->getTwigMock()); + $listener->onKernelResponse($event); + + $this->assertEquals('', $response->getContent()); + } + + public function provideRedirects() + { + return array( + array(301, true), + array(302, true), + array(301, false), + array(302, false), + ); + } + + /** + * @depends testToolbarIsInjected + */ + public function testToolbarIsNotInjectedWhenThereIsNoNoXDebugTokenResponseHeader() + { + $response = new Response(''); + + $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(), HttpKernelInterface::MASTER_REQUEST, $response); + + $listener = new WebDebugToolbarListener($this->getTwigMock()); + $listener->onKernelResponse($event); + + $this->assertEquals('', $response->getContent()); + } + + /** + * @depends testToolbarIsInjected + */ + public function testToolbarIsNotInjectedWhenOnSubRequest() + { + $response = new Response(''); + $response->headers->set('X-Debug-Token', 'xxxxxxxx'); + + $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(), HttpKernelInterface::SUB_REQUEST, $response); + + $listener = new WebDebugToolbarListener($this->getTwigMock()); + $listener->onKernelResponse($event); + + $this->assertEquals('', $response->getContent()); + } + + /** + * @depends testToolbarIsInjected + */ + public function testToolbarIsNotInjectedOnIncompleteHtmlResponses() + { + $response = new Response('
    Some content
    '); + $response->headers->set('X-Debug-Token', 'xxxxxxxx'); + + $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(), HttpKernelInterface::MASTER_REQUEST, $response); + + $listener = new WebDebugToolbarListener($this->getTwigMock()); + $listener->onKernelResponse($event); + + $this->assertEquals('
    Some content
    ', $response->getContent()); + } + + /** + * @depends testToolbarIsInjected + */ + public function testToolbarIsNotInjectedOnXmlHttpRequests() + { + $response = new Response(''); + $response->headers->set('X-Debug-Token', 'xxxxxxxx'); + + $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(true), HttpKernelInterface::MASTER_REQUEST, $response); + + $listener = new WebDebugToolbarListener($this->getTwigMock()); + $listener->onKernelResponse($event); + + $this->assertEquals('', $response->getContent()); + } + + /** + * @depends testToolbarIsInjected + */ + public function testToolbarIsNotInjectedOnNonHtmlRequests() + { + $response = new Response(''); + $response->headers->set('X-Debug-Token', 'xxxxxxxx'); + + $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(false, 'json'), HttpKernelInterface::MASTER_REQUEST, $response); + + $listener = new WebDebugToolbarListener($this->getTwigMock()); + $listener->onKernelResponse($event); + + $this->assertEquals('', $response->getContent()); + } + + public function testXDebugUrlHeader() + { + $response = new Response(); + $response->headers->set('X-Debug-Token', 'xxxxxxxx'); + + $urlGenerator = $this->getUrlGeneratorMock(); + $urlGenerator + ->expects($this->once()) + ->method('generate') + ->with('_profiler', array('token' => 'xxxxxxxx'), UrlGeneratorInterface::ABSOLUTE_URL) + ->will($this->returnValue('http://mydomain.com/_profiler/xxxxxxxx')) + ; + + $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(), HttpKernelInterface::MASTER_REQUEST, $response); + + $listener = new WebDebugToolbarListener($this->getTwigMock(), false, WebDebugToolbarListener::ENABLED, 'bottom', $urlGenerator); + $listener->onKernelResponse($event); + + $this->assertEquals('http://mydomain.com/_profiler/xxxxxxxx', $response->headers->get('X-Debug-Token-Link')); + } + + public function testThrowingUrlGenerator() + { + $response = new Response(); + $response->headers->set('X-Debug-Token', 'xxxxxxxx'); + + $urlGenerator = $this->getUrlGeneratorMock(); + $urlGenerator + ->expects($this->once()) + ->method('generate') + ->with('_profiler', array('token' => 'xxxxxxxx')) + ->will($this->throwException(new \Exception('foo'))) + ; + + $event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(), HttpKernelInterface::MASTER_REQUEST, $response); + + $listener = new WebDebugToolbarListener($this->getTwigMock(), false, WebDebugToolbarListener::ENABLED, 'bottom', $urlGenerator); + $listener->onKernelResponse($event); + + $this->assertEquals('Exception: foo', $response->headers->get('X-Debug-Error')); + } + + protected function getRequestMock($isXmlHttpRequest = false, $requestFormat = 'html', $hasSession = true) + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->setMethods(array('getSession', 'isXmlHttpRequest', 'getRequestFormat'))->disableOriginalConstructor()->getMock(); + $request->expects($this->any()) + ->method('isXmlHttpRequest') + ->will($this->returnValue($isXmlHttpRequest)); + $request->expects($this->any()) + ->method('getRequestFormat') + ->will($this->returnValue($requestFormat)); + + $request->headers = new HeaderBag(); + + if ($hasSession) { + $session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\Session')->disableOriginalConstructor()->getMock(); + $request->expects($this->any()) + ->method('getSession') + ->will($this->returnValue($session)); + } + + return $request; + } + + protected function getTwigMock($render = 'WDT') + { + $templating = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock(); + $templating->expects($this->any()) + ->method('render') + ->will($this->returnValue($render)); + + return $templating; + } + + protected function getUrlGeneratorMock() + { + return $this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->getMock(); + } + + protected function getKernelMock() + { + return $this->getMockBuilder('Symfony\Component\HttpKernel\Kernel')->disableOriginalConstructor()->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Fixtures/profile.data b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Fixtures/profile.data new file mode 100644 index 0000000000000000000000000000000000000000..ab76cea63de6d16076ff202a58a9eaf17ea920bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Fixtures/profile.data @@ -0,0 +1 @@ +Tzo0NToiU3ltZm9ueVxDb21wb25lbnRcSHR0cEtlcm5lbFxQcm9maWxlclxQcm9maWxlIjo4OntzOjUyOiIAU3ltZm9ueVxDb21wb25lbnRcSHR0cEtlcm5lbFxQcm9maWxlclxQcm9maWxlAHRva2VuIjtzOjU6IlRPS0VOIjtzOjUzOiIAU3ltZm9ueVxDb21wb25lbnRcSHR0cEtlcm5lbFxQcm9maWxlclxQcm9maWxlAHBhcmVudCI7TjtzOjU1OiIAU3ltZm9ueVxDb21wb25lbnRcSHR0cEtlcm5lbFxQcm9maWxlclxQcm9maWxlAGNoaWxkcmVuIjthOjA6e31zOjU3OiIAU3ltZm9ueVxDb21wb25lbnRcSHR0cEtlcm5lbFxQcm9maWxlclxQcm9maWxlAGNvbGxlY3RvcnMiO2E6MDp7fXM6NDk6IgBTeW1mb255XENvbXBvbmVudFxIdHRwS2VybmVsXFByb2ZpbGVyXFByb2ZpbGUAaXAiO047czo1MzoiAFN5bWZvbnlcQ29tcG9uZW50XEh0dHBLZXJuZWxcUHJvZmlsZXJcUHJvZmlsZQBtZXRob2QiO047czo1MDoiAFN5bWZvbnlcQ29tcG9uZW50XEh0dHBLZXJuZWxcUHJvZmlsZXJcUHJvZmlsZQB1cmwiO047czo1MToiAFN5bWZvbnlcQ29tcG9uZW50XEh0dHBLZXJuZWxcUHJvZmlsZXJcUHJvZmlsZQB0aW1lIjtOO30= \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4ac2c7de5f0a2717d6de13496ddbb7bb5910934e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php @@ -0,0 +1,156 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Tests\Profiler; + +use Symfony\Bundle\WebProfilerBundle\Tests\TestCase; +use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager; + +/** + * Test for TemplateManager class. + * + * @author Artur Wielogórski + */ +class TemplateManagerTest extends TestCase +{ + /** + * @var \Twig_Environment + */ + protected $twigEnvironment; + + /** + * @var \Symfony\Component\HttpKernel\Profiler\Profiler + */ + protected $profiler; + + /** + * @var \Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager + */ + protected $templateManager; + + protected function setUp() + { + parent::setUp(); + + $profiler = $this->mockProfiler(); + $twigEnvironment = $this->mockTwigEnvironment(); + $templates = array( + 'data_collector.foo' => array('foo', 'FooBundle:Collector:foo'), + 'data_collector.bar' => array('bar', 'FooBundle:Collector:bar'), + 'data_collector.baz' => array('baz', 'FooBundle:Collector:baz'), + ); + + $this->templateManager = new TemplateManager($profiler, $twigEnvironment, $templates); + } + + /** + * @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException + */ + public function testGetNameOfInvalidTemplate() + { + $profile = $this->mockProfile(); + $this->templateManager->getName($profile, 'notexistingpanel'); + } + + /** + * if template exists in both profile and profiler then its name should be returned. + */ + public function testGetNameValidTemplate() + { + $this->profiler->expects($this->any()) + ->method('has') + ->withAnyParameters() + ->will($this->returnCallback(array($this, 'profilerHasCallback'))); + + $profile = $this->mockProfile(); + $profile->expects($this->any()) + ->method('hasCollector') + ->will($this->returnCallback(array($this, 'profileHasCollectorCallback'))); + + $this->assertEquals('FooBundle:Collector:foo.html.twig', $this->templateManager->getName($profile, 'foo')); + } + + /** + * template should be loaded for 'foo' because other collectors are + * missing in profile or in profiler. + */ + public function testGetTemplates() + { + $profile = $this->mockProfile(); + $profile->expects($this->any()) + ->method('hasCollector') + ->will($this->returnCallback(array($this, 'profilerHasCallback'))); + + $this->profiler->expects($this->any()) + ->method('has') + ->withAnyParameters() + ->will($this->returnCallback(array($this, 'profileHasCollectorCallback'))); + + $result = $this->templateManager->getTemplates($profile); + $this->assertArrayHasKey('foo', $result); + $this->assertArrayNotHasKey('bar', $result); + $this->assertArrayNotHasKey('baz', $result); + } + + public function profilerHasCallback($panel) + { + switch ($panel) { + case 'foo': + case 'bar': + return true; + default: + return false; + } + } + + public function profileHasCollectorCallback($panel) + { + switch ($panel) { + case 'foo': + case 'baz': + return true; + default: + return false; + } + } + + protected function mockProfile() + { + return $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profile')->disableOriginalConstructor()->getMock(); + } + + protected function mockTwigEnvironment() + { + $this->twigEnvironment = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock(); + + $this->twigEnvironment->expects($this->any()) + ->method('loadTemplate') + ->will($this->returnValue('loadedTemplate')); + + if (interface_exists('\Twig_SourceContextLoaderInterface')) { + $loader = $this->getMockBuilder('\Twig_SourceContextLoaderInterface')->getMock(); + } else { + $loader = $this->getMockBuilder('\Twig_LoaderInterface')->getMock(); + } + $this->twigEnvironment->expects($this->any())->method('getLoader')->will($this->returnValue($loader)); + + return $this->twigEnvironment; + } + + protected function mockProfiler() + { + $this->profiler = $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler') + ->disableOriginalConstructor() + ->getMock(); + + return $this->profiler; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/TestCase.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/TestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..581ad2e2ea029bdfcbd817db8f6ad47adeef42ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Tests/TestCase.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Tests; + +use PHPUnit\Framework\TestCase as PHPUnitTestCase; + +class TestCase extends PHPUnitTestCase +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..032d6f08bbfb29736272cb88992b6efb9eb0b56d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php @@ -0,0 +1,130 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle\Twig; + +use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; + +/** + * Twig extension for the profiler. + * + * @author Fabien Potencier + */ +class WebProfilerExtension extends \Twig_Extension_Profiler +{ + /** + * @var ValueExporter + */ + private $valueExporter; + + /** + * @var HtmlDumper + */ + private $dumper; + + /** + * @var resource + */ + private $output; + + /** + * @var int + */ + private $stackLevel = 0; + + public function __construct(HtmlDumper $dumper = null) + { + $this->dumper = $dumper ?: new HtmlDumper(); + $this->dumper->setOutput($this->output = fopen('php://memory', 'r+b')); + } + + public function enter(\Twig_Profiler_Profile $profile) + { + ++$this->stackLevel; + } + + public function leave(\Twig_Profiler_Profile $profile) + { + if (0 === --$this->stackLevel) { + $this->dumper->setOutput($this->output = fopen('php://memory', 'r+b')); + } + } + + /** + * {@inheritdoc} + */ + public function getFunctions() + { + $profilerDump = function (\Twig_Environment $env, $value, $maxDepth = 0) { + return $value instanceof Data ? $this->dumpData($env, $value, $maxDepth) : twig_escape_filter($env, $this->dumpValue($value)); + }; + + return array( + new \Twig_SimpleFunction('profiler_dump', $profilerDump, array('is_safe' => array('html'), 'needs_environment' => true)), + new \Twig_SimpleFunction('profiler_dump_log', array($this, 'dumpLog'), array('is_safe' => array('html'), 'needs_environment' => true)), + ); + } + + public function dumpData(\Twig_Environment $env, Data $data, $maxDepth = 0) + { + $this->dumper->setCharset($env->getCharset()); + $this->dumper->dump($data, null, array( + 'maxDepth' => $maxDepth, + )); + + $dump = stream_get_contents($this->output, -1, 0); + rewind($this->output); + ftruncate($this->output, 0); + + return str_replace("\n'.$message.''; + } + + $replacements = array(); + foreach ($context->getRawData()[1] as $k => $v) { + $v = '{'.twig_escape_filter($env, $k).'}'; + $replacements['"'.$v.'"'] = $replacements[$v] = $this->dumpData($env, $context->seek($k)); + } + + return ''.strtr($message, $replacements).''; + } + + /** + * @deprecated since 3.2, to be removed in 4.0. Use the dumpData() method instead. + */ + public function dumpValue($value) + { + @trigger_error(sprintf('The %s() method is deprecated since version 3.2 and will be removed in 4.0. Use the dumpData() method instead.', __METHOD__), E_USER_DEPRECATED); + + if (null === $this->valueExporter) { + $this->valueExporter = new ValueExporter(); + } + + return $this->valueExporter->exportValue($value); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'profiler'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/WebProfilerBundle.php b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/WebProfilerBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..fecc0f365f237ce17d194294e55c74c27f0fb410 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/WebProfilerBundle.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebProfilerBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +/** + * Bundle. + * + * @author Fabien Potencier + */ +class WebProfilerBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/composer.json b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..994bff51982fecd4303425d55df22f11c504c4c4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/composer.json @@ -0,0 +1,48 @@ +{ + "name": "symfony/web-profiler-bundle", + "type": "symfony-bundle", + "description": "Symfony WebProfilerBundle", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/http-kernel": "~3.2", + "symfony/polyfill-php70": "~1.0", + "symfony/routing": "~2.8|~3.0", + "symfony/twig-bridge": "~2.8|~3.0", + "twig/twig": "~1.28|~2.0", + "symfony/var-dumper": "~3.2" + }, + "require-dev": { + "symfony/config": "~2.8|~3.0", + "symfony/console": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" + }, + "conflict": { + "symfony/event-dispatcher": "<3.2" + }, + "autoload": { + "psr-4": { "Symfony\\Bundle\\WebProfilerBundle\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..2bcccd6667a260dc69440262548cac3c92397671 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Asset/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..619a423402ada8c8a88b4308d0444557b0be66f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/CHANGELOG.md @@ -0,0 +1,7 @@ +CHANGELOG +========= + +2.7.0 +----- + + * added the component diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Context/ContextInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Context/ContextInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..83282021aef17fcc6aa5238868f6ad24c4f78717 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Context/ContextInterface.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\Context; + +/** + * Holds information about the current request. + * + * @author Fabien Potencier + */ +interface ContextInterface +{ + /** + * Gets the base path. + * + * @return string The base path + */ + public function getBasePath(); + + /** + * Checks whether the request is secure or not. + * + * @return bool true if the request is secure, false otherwise + */ + public function isSecure(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Context/NullContext.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Context/NullContext.php new file mode 100644 index 0000000000000000000000000000000000000000..0743d8ccbd61550492f7f6a6b62f5e6993ed98e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Context/NullContext.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\Component\Asset\Context; + +/** + * A context that does nothing. + * + * @author Fabien Potencier + */ +class NullContext implements ContextInterface +{ + /** + * {@inheritdoc} + */ + public function getBasePath() + { + return ''; + } + + /** + * {@inheritdoc} + */ + public function isSecure() + { + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Context/RequestStackContext.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Context/RequestStackContext.php new file mode 100644 index 0000000000000000000000000000000000000000..ba7113851d86343b1635f06101e947046d11beca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Context/RequestStackContext.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\Component\Asset\Context; + +use Symfony\Component\HttpFoundation\RequestStack; + +/** + * Uses a RequestStack to populate the context. + * + * @author Fabien Potencier + */ +class RequestStackContext implements ContextInterface +{ + private $requestStack; + + public function __construct(RequestStack $requestStack) + { + $this->requestStack = $requestStack; + } + + /** + * {@inheritdoc} + */ + public function getBasePath() + { + if (!$request = $this->requestStack->getMasterRequest()) { + return ''; + } + + return $request->getBasePath(); + } + + /** + * {@inheritdoc} + */ + public function isSecure() + { + if (!$request = $this->requestStack->getMasterRequest()) { + return false; + } + + return $request->isSecure(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..cce1b5ccede8e62523549f426badfacd65ec40b3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\Exception; + +/** + * Base ExceptionInterface for the Asset component. + * + * @author Fabien Potencier + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..0945d8fad13a41ac15bc809320ed2e2e26762c47 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\Exception; + +/** + * Base InvalidArgumentException for the Asset component. + * + * @author Fabien Potencier + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Exception/LogicException.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Exception/LogicException.php new file mode 100644 index 0000000000000000000000000000000000000000..f291d88d52aa477abed7a09af62dd2772fa2386d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Exception/LogicException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\Exception; + +/** + * Base LogicException for the Asset component. + * + * @author Fabien Potencier + */ +class LogicException extends \LogicException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Asset/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Asset/Package.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Package.php new file mode 100644 index 0000000000000000000000000000000000000000..77b1c934eb172d9dc0b5812a1a3f6e4469d321da --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Package.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset; + +use Symfony\Component\Asset\Context\ContextInterface; +use Symfony\Component\Asset\Context\NullContext; +use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface; + +/** + * Basic package that adds a version to asset URLs. + * + * @author Kris Wallsmith + * @author Fabien Potencier + */ +class Package implements PackageInterface +{ + private $versionStrategy; + private $context; + + public function __construct(VersionStrategyInterface $versionStrategy, ContextInterface $context = null) + { + $this->versionStrategy = $versionStrategy; + $this->context = $context ?: new NullContext(); + } + + /** + * {@inheritdoc} + */ + public function getVersion($path) + { + return $this->versionStrategy->getVersion($path); + } + + /** + * {@inheritdoc} + */ + public function getUrl($path) + { + if ($this->isAbsoluteUrl($path)) { + return $path; + } + + return $this->versionStrategy->applyVersion($path); + } + + /** + * @return ContextInterface + */ + protected function getContext() + { + return $this->context; + } + + /** + * @return VersionStrategyInterface + */ + protected function getVersionStrategy() + { + return $this->versionStrategy; + } + + protected function isAbsoluteUrl($url) + { + return false !== strpos($url, '://') || '//' === substr($url, 0, 2); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/PackageInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/PackageInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b9e9ff90b90c8e427d007d48c5e37f887b4290b5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/PackageInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset; + +/** + * Asset package interface. + * + * @author Kris Wallsmith + */ +interface PackageInterface +{ + /** + * Returns the asset version for an asset. + * + * @param string $path A path + * + * @return string The version string + */ + public function getVersion($path); + + /** + * Returns an absolute or root-relative public path. + * + * @param string $path A path + * + * @return string The public path + */ + public function getUrl($path); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Packages.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Packages.php new file mode 100644 index 0000000000000000000000000000000000000000..0a8c96354967c88ff36b368c3ca4f0a1d5d34e4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Packages.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset; + +use Symfony\Component\Asset\Exception\InvalidArgumentException; +use Symfony\Component\Asset\Exception\LogicException; + +/** + * Helps manage asset URLs. + * + * @author Fabien Potencier + * @author Kris Wallsmith + */ +class Packages +{ + private $defaultPackage; + private $packages = array(); + + /** + * @param PackageInterface $defaultPackage The default package + * @param PackageInterface[] $packages Additional packages indexed by name + */ + public function __construct(PackageInterface $defaultPackage = null, array $packages = array()) + { + $this->defaultPackage = $defaultPackage; + + foreach ($packages as $name => $package) { + $this->addPackage($name, $package); + } + } + + /** + * Sets the default package. + * + * @param PackageInterface $defaultPackage The default package + */ + public function setDefaultPackage(PackageInterface $defaultPackage) + { + $this->defaultPackage = $defaultPackage; + } + + /** + * Adds a package. + * + * @param string $name The package name + * @param PackageInterface $package The package + */ + public function addPackage($name, PackageInterface $package) + { + $this->packages[$name] = $package; + } + + /** + * Returns an asset package. + * + * @param string $name The name of the package or null for the default package + * + * @return PackageInterface An asset package + * + * @throws InvalidArgumentException If there is no package by that name + * @throws LogicException If no default package is defined + */ + public function getPackage($name = null) + { + if (null === $name) { + if (null === $this->defaultPackage) { + throw new LogicException('There is no default asset package, configure one first.'); + } + + return $this->defaultPackage; + } + + if (!isset($this->packages[$name])) { + throw new InvalidArgumentException(sprintf('There is no "%s" asset package.', $name)); + } + + return $this->packages[$name]; + } + + /** + * Gets the version to add to public URL. + * + * @param string $path A public path + * @param string $packageName A package name + * + * @return string The current version + */ + public function getVersion($path, $packageName = null) + { + return $this->getPackage($packageName)->getVersion($path); + } + + /** + * Returns the public path. + * + * Absolute paths (i.e. http://...) are returned unmodified. + * + * @param string $path A public path + * @param string $packageName The name of the asset package to use + * + * @return string A public path which takes into account the base path and URL path + */ + public function getUrl($path, $packageName = null) + { + return $this->getPackage($packageName)->getUrl($path); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/PathPackage.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/PathPackage.php new file mode 100644 index 0000000000000000000000000000000000000000..906879f8b064de0ab8c5f8afab735d62c384629f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/PathPackage.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset; + +use Symfony\Component\Asset\Context\ContextInterface; +use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface; + +/** + * Package that adds a base path to asset URLs in addition to a version. + * + * In addition to the provided base path, this package also automatically + * prepends the current request base path if a Context is available to + * allow a website to be hosted easily under any given path under the Web + * Server root directory. + * + * @author Fabien Potencier + */ +class PathPackage extends Package +{ + private $basePath; + + /** + * @param string $basePath The base path to be prepended to relative paths + * @param VersionStrategyInterface $versionStrategy The version strategy + */ + public function __construct($basePath, VersionStrategyInterface $versionStrategy, ContextInterface $context = null) + { + parent::__construct($versionStrategy, $context); + + if (!$basePath) { + $this->basePath = '/'; + } else { + if ('/' != $basePath[0]) { + $basePath = '/'.$basePath; + } + + $this->basePath = rtrim($basePath, '/').'/'; + } + } + + /** + * {@inheritdoc} + */ + public function getUrl($path) + { + if ($this->isAbsoluteUrl($path)) { + return $path; + } + + return $this->getBasePath().ltrim($this->getVersionStrategy()->applyVersion($path), '/'); + } + + /** + * Returns the base path. + * + * @return string The base path + */ + public function getBasePath() + { + return $this->getContext()->getBasePath().$this->basePath; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/README.md b/vendor/symfony/symfony/src/Symfony/Component/Asset/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3291698493bc154c00d9e1f4650e2ed85cdc71f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/README.md @@ -0,0 +1,14 @@ +Asset Component +=============== + +The Asset component manages URL generation and versioning of web assets such as +CSS stylesheets, JavaScript files and image files. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/asset/introduction.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/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/Context/NullContextTest.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/Context/NullContextTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4623412f57952cd4fdc0a1a001901d950c49360e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/Context/NullContextTest.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\Component\Asset\Tests\Context; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Asset\Context\NullContext; + +class NullContextTest extends TestCase +{ + public function testGetBasePath() + { + $nullContext = new NullContext(); + + $this->assertEmpty($nullContext->getBasePath()); + } + + public function testIsSecure() + { + $nullContext = new NullContext(); + + $this->assertFalse($nullContext->isSecure()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/Context/RequestStackContextTest.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/Context/RequestStackContextTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7269d0e6bc98377ca18d7a9d539839ca93db79b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/Context/RequestStackContextTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\Tests\Context; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Asset\Context\RequestStackContext; + +class RequestStackContextTest extends TestCase +{ + public function testGetBasePathEmpty() + { + $requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->getMock(); + $requestStackContext = new RequestStackContext($requestStack); + + $this->assertEmpty($requestStackContext->getBasePath()); + } + + public function testGetBasePathSet() + { + $testBasePath = 'test-path'; + + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $request->method('getBasePath') + ->willReturn($testBasePath); + $requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->getMock(); + $requestStack->method('getMasterRequest') + ->willReturn($request); + + $requestStackContext = new RequestStackContext($requestStack); + + $this->assertEquals($testBasePath, $requestStackContext->getBasePath()); + } + + public function testIsSecureFalse() + { + $requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->getMock(); + $requestStackContext = new RequestStackContext($requestStack); + + $this->assertFalse($requestStackContext->isSecure()); + } + + public function testIsSecureTrue() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $request->method('isSecure') + ->willReturn(true); + $requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->getMock(); + $requestStack->method('getMasterRequest') + ->willReturn($request); + + $requestStackContext = new RequestStackContext($requestStack); + + $this->assertTrue($requestStackContext->isSecure()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackageTest.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9a17196604622f941cac4087bb65c9d6b8746a04 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackageTest.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Asset\Package; +use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; +use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy; + +class PackageTest extends TestCase +{ + /** + * @dataProvider getConfigs + */ + public function testGetUrl($version, $format, $path, $expected) + { + $package = new Package($version ? new StaticVersionStrategy($version, $format) : new EmptyVersionStrategy()); + $this->assertEquals($expected, $package->getUrl($path)); + } + + public function getConfigs() + { + return array( + array('v1', '', 'http://example.com/foo', 'http://example.com/foo'), + array('v1', '', 'https://example.com/foo', 'https://example.com/foo'), + array('v1', '', '//example.com/foo', '//example.com/foo'), + + array('v1', '', '/foo', '/foo?v1'), + array('v1', '', 'foo', 'foo?v1'), + + array(null, '', '/foo', '/foo'), + array(null, '', 'foo', 'foo'), + + array('v1', 'version-%2$s/%1$s', '/foo', '/version-v1/foo'), + array('v1', 'version-%2$s/%1$s', 'foo', 'version-v1/foo'), + array('v1', 'version-%2$s/%1$s', 'foo/', 'version-v1/foo/'), + array('v1', 'version-%2$s/%1$s', '/foo/', '/version-v1/foo/'), + ); + } + + public function testGetVersion() + { + $package = new Package(new StaticVersionStrategy('v1')); + $this->assertEquals('v1', $package->getVersion('/foo')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackagesTest.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackagesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4b0872f7f26993f4968cc13abaffe5f9e4f3c514 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PackagesTest.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Asset\Package; +use Symfony\Component\Asset\Packages; +use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; + +class PackagesTest extends TestCase +{ + public function testGetterSetters() + { + $packages = new Packages(); + $packages->setDefaultPackage($default = $this->getMockBuilder('Symfony\Component\Asset\PackageInterface')->getMock()); + $packages->addPackage('a', $a = $this->getMockBuilder('Symfony\Component\Asset\PackageInterface')->getMock()); + + $this->assertEquals($default, $packages->getPackage()); + $this->assertEquals($a, $packages->getPackage('a')); + + $packages = new Packages($default, array('a' => $a)); + + $this->assertEquals($default, $packages->getPackage()); + $this->assertEquals($a, $packages->getPackage('a')); + } + + public function testGetVersion() + { + $packages = new Packages( + new Package(new StaticVersionStrategy('default')), + array('a' => new Package(new StaticVersionStrategy('a'))) + ); + + $this->assertEquals('default', $packages->getVersion('/foo')); + $this->assertEquals('a', $packages->getVersion('/foo', 'a')); + } + + public function testGetUrl() + { + $packages = new Packages( + new Package(new StaticVersionStrategy('default')), + array('a' => new Package(new StaticVersionStrategy('a'))) + ); + + $this->assertEquals('/foo?default', $packages->getUrl('/foo')); + $this->assertEquals('/foo?a', $packages->getUrl('/foo', 'a')); + } + + /** + * @expectedException \Symfony\Component\Asset\Exception\LogicException + */ + public function testNoDefaultPackage() + { + $packages = new Packages(); + $packages->getPackage(); + } + + /** + * @expectedException \Symfony\Component\Asset\Exception\InvalidArgumentException + */ + public function testUndefinedPackage() + { + $packages = new Packages(); + $packages->getPackage('a'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PathPackageTest.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PathPackageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6a7c2cc6e45d848aa8ccedb1eb423038a1388dbf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/PathPackageTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Asset\PathPackage; +use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; + +class PathPackageTest extends TestCase +{ + /** + * @dataProvider getConfigs + */ + public function testGetUrl($basePath, $format, $path, $expected) + { + $package = new PathPackage($basePath, new StaticVersionStrategy('v1', $format)); + $this->assertEquals($expected, $package->getUrl($path)); + } + + public function getConfigs() + { + return array( + array('/foo', '', 'http://example.com/foo', 'http://example.com/foo'), + array('/foo', '', 'https://example.com/foo', 'https://example.com/foo'), + array('/foo', '', '//example.com/foo', '//example.com/foo'), + + array('', '', '/foo', '/foo?v1'), + + array('/foo', '', '/foo', '/foo/foo?v1'), + array('/foo', '', 'foo', '/foo/foo?v1'), + array('foo', '', 'foo', '/foo/foo?v1'), + array('foo/', '', 'foo', '/foo/foo?v1'), + array('/foo/', '', 'foo', '/foo/foo?v1'), + + array('/foo', 'version-%2$s/%1$s', '/foo', '/foo/version-v1/foo'), + array('/foo', 'version-%2$s/%1$s', 'foo', '/foo/version-v1/foo'), + array('/foo', 'version-%2$s/%1$s', 'foo/', '/foo/version-v1/foo/'), + array('/foo', 'version-%2$s/%1$s', '/foo/', '/foo/version-v1/foo/'), + ); + } + + /** + * @dataProvider getContextConfigs + */ + public function testGetUrlWithContext($basePathRequest, $basePath, $format, $path, $expected) + { + $package = new PathPackage($basePath, new StaticVersionStrategy('v1', $format), $this->getContext($basePathRequest)); + + $this->assertEquals($expected, $package->getUrl($path)); + } + + public function getContextConfigs() + { + return array( + array('', '/foo', '', '/foo', '/foo/foo?v1'), + array('', '/foo', '', 'foo', '/foo/foo?v1'), + array('', 'foo', '', 'foo', '/foo/foo?v1'), + array('', 'foo/', '', 'foo', '/foo/foo?v1'), + array('', '/foo/', '', 'foo', '/foo/foo?v1'), + + array('/bar', '/foo', '', '/foo', '/bar/foo/foo?v1'), + array('/bar', '/foo', '', 'foo', '/bar/foo/foo?v1'), + array('/bar', 'foo', '', 'foo', '/bar/foo/foo?v1'), + array('/bar', 'foo/', '', 'foo', '/bar/foo/foo?v1'), + array('/bar', '/foo/', '', 'foo', '/bar/foo/foo?v1'), + ); + } + + private function getContext($basePath) + { + $context = $this->getMockBuilder('Symfony\Component\Asset\Context\ContextInterface')->getMock(); + $context->expects($this->any())->method('getBasePath')->will($this->returnValue($basePath)); + + return $context; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/UrlPackageTest.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/UrlPackageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..00668344843514b493b978eeb939d6b4cf13b0df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/UrlPackageTest.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Asset\UrlPackage; +use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; +use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy; + +class UrlPackageTest extends TestCase +{ + /** + * @dataProvider getConfigs + */ + public function testGetUrl($baseUrls, $format, $path, $expected) + { + $package = new UrlPackage($baseUrls, new StaticVersionStrategy('v1', $format)); + $this->assertEquals($expected, $package->getUrl($path)); + } + + public function getConfigs() + { + return array( + array('http://example.net', '', 'http://example.com/foo', 'http://example.com/foo'), + array('http://example.net', '', 'https://example.com/foo', 'https://example.com/foo'), + array('http://example.net', '', '//example.com/foo', '//example.com/foo'), + + array('http://example.com', '', '/foo', 'http://example.com/foo?v1'), + array('http://example.com', '', 'foo', 'http://example.com/foo?v1'), + array('http://example.com/', '', 'foo', 'http://example.com/foo?v1'), + array('http://example.com/foo', '', 'foo', 'http://example.com/foo/foo?v1'), + array('http://example.com/foo/', '', 'foo', 'http://example.com/foo/foo?v1'), + + array(array('http://example.com'), '', '/foo', 'http://example.com/foo?v1'), + array(array('http://example.com', 'http://example.net'), '', '/foo', 'http://example.com/foo?v1'), + array(array('http://example.com', 'http://example.net'), '', '/fooa', 'http://example.net/fooa?v1'), + + array('http://example.com', 'version-%2$s/%1$s', '/foo', 'http://example.com/version-v1/foo'), + array('http://example.com', 'version-%2$s/%1$s', 'foo', 'http://example.com/version-v1/foo'), + array('http://example.com', 'version-%2$s/%1$s', 'foo/', 'http://example.com/version-v1/foo/'), + array('http://example.com', 'version-%2$s/%1$s', '/foo/', 'http://example.com/version-v1/foo/'), + ); + } + + /** + * @dataProvider getContextConfigs + */ + public function testGetUrlWithContext($secure, $baseUrls, $format, $path, $expected) + { + $package = new UrlPackage($baseUrls, new StaticVersionStrategy('v1', $format), $this->getContext($secure)); + + $this->assertEquals($expected, $package->getUrl($path)); + } + + public function getContextConfigs() + { + return array( + array(false, 'http://example.com', '', 'foo', 'http://example.com/foo?v1'), + array(false, array('http://example.com'), '', 'foo', 'http://example.com/foo?v1'), + array(false, array('http://example.com', 'https://example.com'), '', 'foo', 'http://example.com/foo?v1'), + array(false, array('http://example.com', 'https://example.com'), '', 'fooa', 'https://example.com/fooa?v1'), + array(false, array('http://example.com/bar'), '', 'foo', 'http://example.com/bar/foo?v1'), + array(false, array('http://example.com/bar/'), '', 'foo', 'http://example.com/bar/foo?v1'), + array(false, array('//example.com/bar/'), '', 'foo', '//example.com/bar/foo?v1'), + + array(true, array('http://example.com'), '', 'foo', 'http://example.com/foo?v1'), + array(true, array('http://example.com', 'https://example.com'), '', 'foo', 'https://example.com/foo?v1'), + ); + } + + /** + * @expectedException \Symfony\Component\Asset\Exception\LogicException + */ + public function testNoBaseUrls() + { + new UrlPackage(array(), new EmptyVersionStrategy()); + } + + /** + * @expectedException \Symfony\Component\Asset\Exception\InvalidArgumentException + */ + public function testWrongBaseUrl() + { + new UrlPackage(array('not-a-url'), new EmptyVersionStrategy()); + } + + private function getContext($secure) + { + $context = $this->getMockBuilder('Symfony\Component\Asset\Context\ContextInterface')->getMock(); + $context->expects($this->any())->method('isSecure')->will($this->returnValue($secure)); + + return $context; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/VersionStrategy/EmptyVersionStrategyTest.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/VersionStrategy/EmptyVersionStrategyTest.php new file mode 100644 index 0000000000000000000000000000000000000000..430146fd5070bcfc63003335e2f62a0fb389a3aa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/VersionStrategy/EmptyVersionStrategyTest.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\Tests\VersionStrategy; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy; + +class EmptyVersionStrategyTest extends TestCase +{ + public function testGetVersion() + { + $emptyVersionStrategy = new EmptyVersionStrategy(); + $path = 'test-path'; + + $this->assertEmpty($emptyVersionStrategy->getVersion($path)); + } + + public function testApplyVersion() + { + $emptyVersionStrategy = new EmptyVersionStrategy(); + $path = 'test-path'; + + $this->assertEquals($path, $emptyVersionStrategy->applyVersion($path)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7b5a3e8d5cec1801f48e6646856cf66e460a41df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\Tests\VersionStrategy; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; + +class StaticVersionStrategyTest extends TestCase +{ + public function testGetVersion() + { + $version = 'v1'; + $path = 'test-path'; + $staticVersionStrategy = new StaticVersionStrategy($version); + $this->assertEquals($version, $staticVersionStrategy->getVersion($path)); + } + + /** + * @dataProvider getConfigs + */ + public function testApplyVersion($path, $version, $format) + { + $staticVersionStrategy = new StaticVersionStrategy($version, $format); + $formatted = sprintf($format ?: '%s?%s', $path, $version); + $this->assertEquals($formatted, $staticVersionStrategy->applyVersion($path)); + } + + public function getConfigs() + { + return array( + array('test-path', 'v1', null), + array('test-path', 'v2', '%s?test%s'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/UrlPackage.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/UrlPackage.php new file mode 100644 index 0000000000000000000000000000000000000000..de9c1f07d5f5d296d7df17973c6f20ef8347a60e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/UrlPackage.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\Component\Asset; + +use Symfony\Component\Asset\Context\ContextInterface; +use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface; +use Symfony\Component\Asset\Exception\InvalidArgumentException; +use Symfony\Component\Asset\Exception\LogicException; + +/** + * Package that adds a base URL to asset URLs in addition to a version. + * + * The package allows to use more than one base URLs in which case + * it randomly chooses one for each asset; it also guarantees that + * any given path will always use the same base URL to be nice with + * HTTP caching mechanisms. + * + * When the request context is available, this package can choose the + * best base URL to use based on the current request scheme: + * + * * For HTTP request, it chooses between all base URLs; + * * For HTTPs requests, it chooses between HTTPs base URLs and relative protocol URLs + * or falls back to any base URL if no secure ones are available. + * + * @author Fabien Potencier + */ +class UrlPackage extends Package +{ + private $baseUrls = array(); + private $sslPackage; + + /** + * @param string|string[] $baseUrls Base asset URLs + * @param VersionStrategyInterface $versionStrategy The version strategy + * @param ContextInterface|null $context Context + */ + public function __construct($baseUrls, VersionStrategyInterface $versionStrategy, ContextInterface $context = null) + { + parent::__construct($versionStrategy, $context); + + if (!is_array($baseUrls)) { + $baseUrls = (array) $baseUrls; + } + + if (!$baseUrls) { + throw new LogicException('You must provide at least one base URL.'); + } + + foreach ($baseUrls as $baseUrl) { + $this->baseUrls[] = rtrim($baseUrl, '/'); + } + + $sslUrls = $this->getSslUrls($baseUrls); + + if ($sslUrls && $baseUrls !== $sslUrls) { + $this->sslPackage = new self($sslUrls, $versionStrategy); + } + } + + /** + * {@inheritdoc} + */ + public function getUrl($path) + { + if ($this->isAbsoluteUrl($path)) { + return $path; + } + + if (null !== $this->sslPackage && $this->getContext()->isSecure()) { + return $this->sslPackage->getUrl($path); + } + + $url = $this->getVersionStrategy()->applyVersion($path); + + if ($url && '/' != $url[0]) { + $url = '/'.$url; + } + + return $this->getBaseUrl($path).$url; + } + + /** + * Returns the base URL for a path. + * + * @param string $path + * + * @return string The base URL + */ + public function getBaseUrl($path) + { + if (1 === count($this->baseUrls)) { + return $this->baseUrls[0]; + } + + return $this->baseUrls[$this->chooseBaseUrl($path)]; + } + + /** + * Determines which base URL to use for the given path. + * + * Override this method to change the default distribution strategy. + * This method should always return the same base URL index for a given path. + * + * @param string $path + * + * @return int The base URL index for the given path + */ + protected function chooseBaseUrl($path) + { + return (int) fmod(hexdec(substr(hash('sha256', $path), 0, 10)), count($this->baseUrls)); + } + + private function getSslUrls($urls) + { + $sslUrls = array(); + foreach ($urls as $url) { + if ('https://' === substr($url, 0, 8) || '//' === substr($url, 0, 2)) { + $sslUrls[] = $url; + } elseif ('http://' !== substr($url, 0, 7)) { + throw new InvalidArgumentException(sprintf('"%s" is not a valid URL', $url)); + } + } + + return $sslUrls; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/VersionStrategy/EmptyVersionStrategy.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/VersionStrategy/EmptyVersionStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..aa06eaa55ee7cbb1edb1aad6eb4d5fe43249e25a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/VersionStrategy/EmptyVersionStrategy.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\Component\Asset\VersionStrategy; + +/** + * Disable version for all assets. + * + * @author Fabien Potencier + */ +class EmptyVersionStrategy implements VersionStrategyInterface +{ + /** + * {@inheritdoc} + */ + public function getVersion($path) + { + return ''; + } + + /** + * {@inheritdoc} + */ + public function applyVersion($path) + { + return $path; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..857cf9432bfa3a59f5d906423b041d621eea2c12 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\VersionStrategy; + +/** + * Returns the same version for all assets. + * + * @author Fabien Potencier + */ +class StaticVersionStrategy implements VersionStrategyInterface +{ + private $version; + private $format; + + /** + * @param string $version Version number + * @param string $format Url format + */ + public function __construct($version, $format = null) + { + $this->version = $version; + $this->format = $format ?: '%s?%s'; + } + + /** + * {@inheritdoc} + */ + public function getVersion($path) + { + return $this->version; + } + + /** + * {@inheritdoc} + */ + public function applyVersion($path) + { + $versionized = sprintf($this->format, ltrim($path, '/'), $this->getVersion($path)); + + if ($path && '/' == $path[0]) { + return '/'.$versionized; + } + + return $versionized; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/VersionStrategy/VersionStrategyInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Asset/VersionStrategy/VersionStrategyInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a0fb260033656b0690ec465857379a10f070b577 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/VersionStrategy/VersionStrategyInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Asset\VersionStrategy; + +/** + * Asset version strategy interface. + * + * @author Fabien Potencier + */ +interface VersionStrategyInterface +{ + /** + * Returns the asset version for an asset. + * + * @param string $path A path + * + * @return string The version string + */ + public function getVersion($path); + + /** + * Applies version to the supplied path. + * + * @param string $path A path + * + * @return string The versionized path + */ + public function applyVersion($path); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Asset/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..b71f728e1624bbb4686b0e7099119e2ba24081e3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/composer.json @@ -0,0 +1,39 @@ +{ + "name": "symfony/asset", + "type": "library", + "description": "Symfony Asset Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9" + }, + "suggest": { + "symfony/http-foundation": "" + }, + "require-dev": { + "symfony/http-foundation": "~2.8|~3.0" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Asset\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Asset/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Asset/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..b66906d6dab393bba7434c4d05ca15f63045ca7b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Asset/phpunit.xml.dist @@ -0,0 +1,28 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..37b6f6e991a6a9016e6eada2d630ef958b532afa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/CHANGELOG.md @@ -0,0 +1,23 @@ +CHANGELOG +========= + +3.2.0 +----- + + * Client HTTP user agent has been changed to 'Symfony BrowserKit' + +2.3.0 +----- + + * [BC BREAK] `Client::followRedirect()` won't redirect responses with + a non-3xx Status Code and `Location` header anymore, as per + http://tools.ietf.org/html/rfc2616#section-14.30 + + * added `Client::getInternalRequest()` and `Client::getInternalResponse()` to + have access to the BrowserKit internal request and response objects + +2.1.0 +----- + + * [BC BREAK] The CookieJar internals have changed to allow cookies with the + same name on different sub-domains/sub-paths diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Client.php b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Client.php new file mode 100644 index 0000000000000000000000000000000000000000..e6911d1b0707b5a182cbd25e47fa27dbd057a174 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Client.php @@ -0,0 +1,596 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\BrowserKit; + +use Symfony\Component\DomCrawler\Crawler; +use Symfony\Component\DomCrawler\Link; +use Symfony\Component\DomCrawler\Form; +use Symfony\Component\Process\PhpProcess; + +/** + * Client simulates a browser. + * + * To make the actual request, you need to implement the doRequest() method. + * + * If you want to be able to run requests in their own process (insulated flag), + * you need to also implement the getScript() method. + * + * @author Fabien Potencier + */ +abstract class Client +{ + protected $history; + protected $cookieJar; + protected $server = array(); + protected $internalRequest; + protected $request; + protected $internalResponse; + protected $response; + protected $crawler; + protected $insulated = false; + protected $redirect; + protected $followRedirects = true; + + private $maxRedirects = -1; + private $redirectCount = 0; + private $isMainRequest = true; + + /** + * Constructor. + * + * @param array $server The server parameters (equivalent of $_SERVER) + * @param History $history A History instance to store the browser history + * @param CookieJar $cookieJar A CookieJar instance to store the cookies + */ + public function __construct(array $server = array(), History $history = null, CookieJar $cookieJar = null) + { + $this->setServerParameters($server); + $this->history = $history ?: new History(); + $this->cookieJar = $cookieJar ?: new CookieJar(); + } + + /** + * Sets whether to automatically follow redirects or not. + * + * @param bool $followRedirect Whether to follow redirects + */ + public function followRedirects($followRedirect = true) + { + $this->followRedirects = (bool) $followRedirect; + } + + /** + * Returns whether client automatically follows redirects or not. + * + * @return bool + */ + public function isFollowingRedirects() + { + return $this->followRedirects; + } + + /** + * Sets the maximum number of requests that crawler can follow. + * + * @param int $maxRedirects + */ + public function setMaxRedirects($maxRedirects) + { + $this->maxRedirects = $maxRedirects < 0 ? -1 : $maxRedirects; + $this->followRedirects = -1 != $this->maxRedirects; + } + + /** + * Returns the maximum number of requests that crawler can follow. + * + * @return int + */ + public function getMaxRedirects() + { + return $this->maxRedirects; + } + + /** + * Sets the insulated flag. + * + * @param bool $insulated Whether to insulate the requests or not + * + * @throws \RuntimeException When Symfony Process Component is not installed + */ + public function insulate($insulated = true) + { + if ($insulated && !class_exists('Symfony\\Component\\Process\\Process')) { + throw new \RuntimeException('Unable to isolate requests as the Symfony Process Component is not installed.'); + } + + $this->insulated = (bool) $insulated; + } + + /** + * Sets server parameters. + * + * @param array $server An array of server parameters + */ + public function setServerParameters(array $server) + { + $this->server = array_merge(array( + 'HTTP_USER_AGENT' => 'Symfony BrowserKit', + ), $server); + } + + /** + * Sets single server parameter. + * + * @param string $key A key of the parameter + * @param string $value A value of the parameter + */ + public function setServerParameter($key, $value) + { + $this->server[$key] = $value; + } + + /** + * Gets single server parameter for specified key. + * + * @param string $key A key of the parameter to get + * @param string $default A default value when key is undefined + * + * @return string A value of the parameter + */ + public function getServerParameter($key, $default = '') + { + return isset($this->server[$key]) ? $this->server[$key] : $default; + } + + /** + * Returns the History instance. + * + * @return History A History instance + */ + public function getHistory() + { + return $this->history; + } + + /** + * Returns the CookieJar instance. + * + * @return CookieJar A CookieJar instance + */ + public function getCookieJar() + { + return $this->cookieJar; + } + + /** + * Returns the current Crawler instance. + * + * @return Crawler|null A Crawler instance + */ + public function getCrawler() + { + return $this->crawler; + } + + /** + * Returns the current BrowserKit Response instance. + * + * @return Response|null A BrowserKit Response instance + */ + public function getInternalResponse() + { + return $this->internalResponse; + } + + /** + * Returns the current origin response instance. + * + * The origin response is the response instance that is returned + * by the code that handles requests. + * + * @return object|null A response instance + * + * @see doRequest() + */ + public function getResponse() + { + return $this->response; + } + + /** + * Returns the current BrowserKit Request instance. + * + * @return Request|null A BrowserKit Request instance + */ + public function getInternalRequest() + { + return $this->internalRequest; + } + + /** + * Returns the current origin Request instance. + * + * The origin request is the request instance that is sent + * to the code that handles requests. + * + * @return object|null A Request instance + * + * @see doRequest() + */ + public function getRequest() + { + return $this->request; + } + + /** + * Clicks on a given link. + * + * @param Link $link A Link instance + * + * @return Crawler + */ + public function click(Link $link) + { + if ($link instanceof Form) { + return $this->submit($link); + } + + return $this->request($link->getMethod(), $link->getUri()); + } + + /** + * Submits a form. + * + * @param Form $form A Form instance + * @param array $values An array of form field values + * + * @return Crawler + */ + public function submit(Form $form, array $values = array()) + { + $form->setValues($values); + + return $this->request($form->getMethod(), $form->getUri(), $form->getPhpValues(), $form->getPhpFiles()); + } + + /** + * Calls a URI. + * + * @param string $method The request method + * @param string $uri The URI to fetch + * @param array $parameters The Request parameters + * @param array $files The files + * @param array $server The server parameters (HTTP headers are referenced with a HTTP_ prefix as PHP does) + * @param string $content The raw body data + * @param bool $changeHistory Whether to update the history or not (only used internally for back(), forward(), and reload()) + * + * @return Crawler + */ + public function request($method, $uri, array $parameters = array(), array $files = array(), array $server = array(), $content = null, $changeHistory = true) + { + if ($this->isMainRequest) { + $this->redirectCount = 0; + } else { + ++$this->redirectCount; + } + + $uri = $this->getAbsoluteUri($uri); + + $server = array_merge($this->server, $server); + + if (isset($server['HTTPS'])) { + $uri = preg_replace('{^'.parse_url($uri, PHP_URL_SCHEME).'}', $server['HTTPS'] ? 'https' : 'http', $uri); + } + + if (!$this->history->isEmpty()) { + $server['HTTP_REFERER'] = $this->history->current()->getUri(); + } + + if (empty($server['HTTP_HOST'])) { + $server['HTTP_HOST'] = $this->extractHost($uri); + } + + $server['HTTPS'] = 'https' == parse_url($uri, PHP_URL_SCHEME); + + $this->internalRequest = new Request($uri, $method, $parameters, $files, $this->cookieJar->allValues($uri), $server, $content); + + $this->request = $this->filterRequest($this->internalRequest); + + if (true === $changeHistory) { + $this->history->add($this->internalRequest); + } + + if ($this->insulated) { + $this->response = $this->doRequestInProcess($this->request); + } else { + $this->response = $this->doRequest($this->request); + } + + $this->internalResponse = $this->filterResponse($this->response); + + $this->cookieJar->updateFromResponse($this->internalResponse, $uri); + + $status = $this->internalResponse->getStatus(); + + if ($status >= 300 && $status < 400) { + $this->redirect = $this->internalResponse->getHeader('Location'); + } else { + $this->redirect = null; + } + + if ($this->followRedirects && $this->redirect) { + return $this->crawler = $this->followRedirect(); + } + + return $this->crawler = $this->createCrawlerFromContent($this->internalRequest->getUri(), $this->internalResponse->getContent(), $this->internalResponse->getHeader('Content-Type')); + } + + /** + * Makes a request in another process. + * + * @param object $request An origin request instance + * + * @return object An origin response instance + * + * @throws \RuntimeException When processing returns exit code + */ + protected function doRequestInProcess($request) + { + $process = new PhpProcess($this->getScript($request), null, null); + $process->run(); + + if (!$process->isSuccessful() || !preg_match('/^O\:\d+\:/', $process->getOutput())) { + throw new \RuntimeException(sprintf('OUTPUT: %s ERROR OUTPUT: %s', $process->getOutput(), $process->getErrorOutput())); + } + + return unserialize($process->getOutput()); + } + + /** + * Makes a request. + * + * @param object $request An origin request instance + * + * @return object An origin response instance + */ + abstract protected function doRequest($request); + + /** + * Returns the script to execute when the request must be insulated. + * + * @param object $request An origin request instance + * + * @throws \LogicException When this abstract class is not implemented + */ + protected function getScript($request) + { + throw new \LogicException('To insulate requests, you need to override the getScript() method.'); + } + + /** + * Filters the BrowserKit request to the origin one. + * + * @param Request $request The BrowserKit Request to filter + * + * @return object An origin request instance + */ + protected function filterRequest(Request $request) + { + return $request; + } + + /** + * Filters the origin response to the BrowserKit one. + * + * @param object $response The origin response to filter + * + * @return Response An BrowserKit Response instance + */ + protected function filterResponse($response) + { + return $response; + } + + /** + * Creates a crawler. + * + * This method returns null if the DomCrawler component is not available. + * + * @param string $uri A URI + * @param string $content Content for the crawler to use + * @param string $type Content type + * + * @return Crawler|null + */ + protected function createCrawlerFromContent($uri, $content, $type) + { + if (!class_exists('Symfony\Component\DomCrawler\Crawler')) { + return; + } + + $crawler = new Crawler(null, $uri); + $crawler->addContent($content, $type); + + return $crawler; + } + + /** + * Goes back in the browser history. + * + * @return Crawler + */ + public function back() + { + return $this->requestFromRequest($this->history->back(), false); + } + + /** + * Goes forward in the browser history. + * + * @return Crawler + */ + public function forward() + { + return $this->requestFromRequest($this->history->forward(), false); + } + + /** + * Reloads the current browser. + * + * @return Crawler + */ + public function reload() + { + return $this->requestFromRequest($this->history->current(), false); + } + + /** + * Follow redirects? + * + * @return Crawler + * + * @throws \LogicException If request was not a redirect + */ + public function followRedirect() + { + if (empty($this->redirect)) { + throw new \LogicException('The request was not redirected.'); + } + + if (-1 !== $this->maxRedirects) { + if ($this->redirectCount > $this->maxRedirects) { + throw new \LogicException(sprintf('The maximum number (%d) of redirections was reached.', $this->maxRedirects)); + } + } + + $request = $this->internalRequest; + + if (in_array($this->internalResponse->getStatus(), array(302, 303))) { + $method = 'GET'; + $files = array(); + $content = null; + } else { + $method = $request->getMethod(); + $files = $request->getFiles(); + $content = $request->getContent(); + } + + if ('GET' === strtoupper($method)) { + // Don't forward parameters for GET request as it should reach the redirection URI + $parameters = array(); + } else { + $parameters = $request->getParameters(); + } + + $server = $request->getServer(); + $server = $this->updateServerFromUri($server, $this->redirect); + + $this->isMainRequest = false; + + $response = $this->request($method, $this->redirect, $parameters, $files, $server, $content); + + $this->isMainRequest = true; + + return $response; + } + + /** + * Restarts the client. + * + * It flushes history and all cookies. + */ + public function restart() + { + $this->cookieJar->clear(); + $this->history->clear(); + } + + /** + * Takes a URI and converts it to absolute if it is not already absolute. + * + * @param string $uri A URI + * + * @return string An absolute URI + */ + protected function getAbsoluteUri($uri) + { + // already absolute? + if (0 === strpos($uri, 'http://') || 0 === strpos($uri, 'https://')) { + return $uri; + } + + if (!$this->history->isEmpty()) { + $currentUri = $this->history->current()->getUri(); + } else { + $currentUri = sprintf('http%s://%s/', + isset($this->server['HTTPS']) ? 's' : '', + isset($this->server['HTTP_HOST']) ? $this->server['HTTP_HOST'] : 'localhost' + ); + } + + // protocol relative URL + if (0 === strpos($uri, '//')) { + return parse_url($currentUri, PHP_URL_SCHEME).':'.$uri; + } + + // anchor or query string parameters? + if (!$uri || '#' == $uri[0] || '?' == $uri[0]) { + return preg_replace('/[#?].*?$/', '', $currentUri).$uri; + } + + if ('/' !== $uri[0]) { + $path = parse_url($currentUri, PHP_URL_PATH); + + if ('/' !== substr($path, -1)) { + $path = substr($path, 0, strrpos($path, '/') + 1); + } + + $uri = $path.$uri; + } + + return preg_replace('#^(.*?//[^/]+)\/.*$#', '$1', $currentUri).$uri; + } + + /** + * Makes a request from a Request object directly. + * + * @param Request $request A Request instance + * @param bool $changeHistory Whether to update the history or not (only used internally for back(), forward(), and reload()) + * + * @return Crawler + */ + protected function requestFromRequest(Request $request, $changeHistory = true) + { + return $this->request($request->getMethod(), $request->getUri(), $request->getParameters(), $request->getFiles(), $request->getServer(), $request->getContent(), $changeHistory); + } + + private function updateServerFromUri($server, $uri) + { + $server['HTTP_HOST'] = $this->extractHost($uri); + $scheme = parse_url($uri, PHP_URL_SCHEME); + $server['HTTPS'] = null === $scheme ? $server['HTTPS'] : 'https' == $scheme; + unset($server['HTTP_IF_NONE_MATCH'], $server['HTTP_IF_MODIFIED_SINCE']); + + return $server; + } + + private function extractHost($uri) + { + $host = parse_url($uri, PHP_URL_HOST); + + if ($port = parse_url($uri, PHP_URL_PORT)) { + return $host.':'.$port; + } + + return $host; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Cookie.php b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Cookie.php new file mode 100644 index 0000000000000000000000000000000000000000..42f184d532e02615f3dd8aef1194b887c74dfd5e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Cookie.php @@ -0,0 +1,307 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\BrowserKit; + +/** + * Cookie represents an HTTP cookie. + * + * @author Fabien Potencier + */ +class Cookie +{ + /** + * Handles dates as defined by RFC 2616 section 3.3.1, and also some other + * non-standard, but common formats. + * + * @var array + */ + private static $dateFormats = array( + 'D, d M Y H:i:s T', + 'D, d-M-y H:i:s T', + 'D, d-M-Y H:i:s T', + 'D, d-m-y H:i:s T', + 'D, d-m-Y H:i:s T', + 'D M j G:i:s Y', + 'D M d H:i:s Y T', + ); + + protected $name; + protected $value; + protected $expires; + protected $path; + protected $domain; + protected $secure; + protected $httponly; + protected $rawValue; + + /** + * Sets a cookie. + * + * @param string $name The cookie name + * @param string $value The value of the cookie + * @param string $expires The time the cookie expires + * @param string $path The path on the server in which the cookie will be available on + * @param string $domain The domain that the cookie is available + * @param bool $secure Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client + * @param bool $httponly The cookie httponly flag + * @param bool $encodedValue Whether the value is encoded or not + */ + public function __construct($name, $value, $expires = null, $path = null, $domain = '', $secure = false, $httponly = true, $encodedValue = false) + { + if ($encodedValue) { + $this->value = urldecode($value); + $this->rawValue = $value; + } else { + $this->value = $value; + $this->rawValue = urlencode($value); + } + $this->name = $name; + $this->path = empty($path) ? '/' : $path; + $this->domain = $domain; + $this->secure = (bool) $secure; + $this->httponly = (bool) $httponly; + + if (null !== $expires) { + $timestampAsDateTime = \DateTime::createFromFormat('U', $expires); + if (false === $timestampAsDateTime) { + throw new \UnexpectedValueException(sprintf('The cookie expiration time "%s" is not valid.', $expires)); + } + + $this->expires = $timestampAsDateTime->format('U'); + } + } + + /** + * Returns the HTTP representation of the Cookie. + * + * @return string The HTTP representation of the Cookie + * + * @throws \UnexpectedValueException + */ + public function __toString() + { + $cookie = sprintf('%s=%s', $this->name, $this->rawValue); + + if (null !== $this->expires) { + $dateTime = \DateTime::createFromFormat('U', $this->expires, new \DateTimeZone('GMT')); + $cookie .= '; expires='.str_replace('+0000', '', $dateTime->format(self::$dateFormats[0])); + } + + if ('' !== $this->domain) { + $cookie .= '; domain='.$this->domain; + } + + if ($this->path) { + $cookie .= '; path='.$this->path; + } + + if ($this->secure) { + $cookie .= '; secure'; + } + + if ($this->httponly) { + $cookie .= '; httponly'; + } + + return $cookie; + } + + /** + * Creates a Cookie instance from a Set-Cookie header value. + * + * @param string $cookie A Set-Cookie header value + * @param string $url The base URL + * + * @return static + * + * @throws \InvalidArgumentException + */ + public static function fromString($cookie, $url = null) + { + $parts = explode(';', $cookie); + + if (false === strpos($parts[0], '=')) { + throw new \InvalidArgumentException(sprintf('The cookie string "%s" is not valid.', $parts[0])); + } + + list($name, $value) = explode('=', array_shift($parts), 2); + + $values = array( + 'name' => trim($name), + 'value' => trim($value), + 'expires' => null, + 'path' => '/', + 'domain' => '', + 'secure' => false, + 'httponly' => false, + 'passedRawValue' => true, + ); + + if (null !== $url) { + if ((false === $urlParts = parse_url($url)) || !isset($urlParts['host'])) { + throw new \InvalidArgumentException(sprintf('The URL "%s" is not valid.', $url)); + } + + $values['domain'] = $urlParts['host']; + $values['path'] = isset($urlParts['path']) ? substr($urlParts['path'], 0, strrpos($urlParts['path'], '/')) : ''; + } + + foreach ($parts as $part) { + $part = trim($part); + + if ('secure' === strtolower($part)) { + // Ignore the secure flag if the original URI is not given or is not HTTPS + if (!$url || !isset($urlParts['scheme']) || 'https' != $urlParts['scheme']) { + continue; + } + + $values['secure'] = true; + + continue; + } + + if ('httponly' === strtolower($part)) { + $values['httponly'] = true; + + continue; + } + + if (2 === count($elements = explode('=', $part, 2))) { + if ('expires' === strtolower($elements[0])) { + $elements[1] = self::parseDate($elements[1]); + } + + $values[strtolower($elements[0])] = $elements[1]; + } + } + + return new static( + $values['name'], + $values['value'], + $values['expires'], + $values['path'], + $values['domain'], + $values['secure'], + $values['httponly'], + $values['passedRawValue'] + ); + } + + private static function parseDate($dateValue) + { + // trim single quotes around date if present + if (($length = strlen($dateValue)) > 1 && "'" === $dateValue[0] && "'" === $dateValue[$length - 1]) { + $dateValue = substr($dateValue, 1, -1); + } + + foreach (self::$dateFormats as $dateFormat) { + if (false !== $date = \DateTime::createFromFormat($dateFormat, $dateValue, new \DateTimeZone('GMT'))) { + return $date->format('U'); + } + } + + // attempt a fallback for unusual formatting + if (false !== $date = date_create($dateValue, new \DateTimeZone('GMT'))) { + return $date->format('U'); + } + } + + /** + * Gets the name of the cookie. + * + * @return string The cookie name + */ + public function getName() + { + return $this->name; + } + + /** + * Gets the value of the cookie. + * + * @return string The cookie value + */ + public function getValue() + { + return $this->value; + } + + /** + * Gets the raw value of the cookie. + * + * @return string The cookie value + */ + public function getRawValue() + { + return $this->rawValue; + } + + /** + * Gets the expires time of the cookie. + * + * @return string The cookie expires time + */ + public function getExpiresTime() + { + return $this->expires; + } + + /** + * Gets the path of the cookie. + * + * @return string The cookie path + */ + public function getPath() + { + return $this->path; + } + + /** + * Gets the domain of the cookie. + * + * @return string The cookie domain + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Returns the secure flag of the cookie. + * + * @return bool The cookie secure flag + */ + public function isSecure() + { + return $this->secure; + } + + /** + * Returns the httponly flag of the cookie. + * + * @return bool The cookie httponly flag + */ + public function isHttpOnly() + { + return $this->httponly; + } + + /** + * Returns true if the cookie has expired. + * + * @return bool true if the cookie has expired, false otherwise + */ + public function isExpired() + { + return null !== $this->expires && 0 != $this->expires && $this->expires < time(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/CookieJar.php b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/CookieJar.php new file mode 100644 index 0000000000000000000000000000000000000000..4b9661b63fbd2f248c9874d1ef316514fccfe80a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/CookieJar.php @@ -0,0 +1,255 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\BrowserKit; + +/** + * CookieJar. + * + * @author Fabien Potencier + */ +class CookieJar +{ + protected $cookieJar = array(); + + /** + * Sets a cookie. + * + * @param Cookie $cookie A Cookie instance + */ + public function set(Cookie $cookie) + { + $this->cookieJar[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie; + } + + /** + * Gets a cookie by name. + * + * You should never use an empty domain, but if you do so, + * this method returns the first cookie for the given name/path + * (this behavior ensures a BC behavior with previous versions of + * Symfony). + * + * @param string $name The cookie name + * @param string $path The cookie path + * @param string $domain The cookie domain + * + * @return Cookie|null A Cookie instance or null if the cookie does not exist + */ + public function get($name, $path = '/', $domain = null) + { + $this->flushExpiredCookies(); + + if (!empty($domain)) { + foreach ($this->cookieJar as $cookieDomain => $pathCookies) { + if ($cookieDomain) { + $cookieDomain = '.'.ltrim($cookieDomain, '.'); + if ($cookieDomain != substr('.'.$domain, -strlen($cookieDomain))) { + continue; + } + } + + foreach ($pathCookies as $cookiePath => $namedCookies) { + if ($cookiePath != substr($path, 0, strlen($cookiePath))) { + continue; + } + if (isset($namedCookies[$name])) { + return $namedCookies[$name]; + } + } + } + + return; + } + + // avoid relying on this behavior that is mainly here for BC reasons + foreach ($this->cookieJar as $cookies) { + if (isset($cookies[$path][$name])) { + return $cookies[$path][$name]; + } + } + } + + /** + * Removes a cookie by name. + * + * You should never use an empty domain, but if you do so, + * all cookies for the given name/path expire (this behavior + * ensures a BC behavior with previous versions of Symfony). + * + * @param string $name The cookie name + * @param string $path The cookie path + * @param string $domain The cookie domain + */ + public function expire($name, $path = '/', $domain = null) + { + if (null === $path) { + $path = '/'; + } + + if (empty($domain)) { + // an empty domain means any domain + // this should never happen but it allows for a better BC + $domains = array_keys($this->cookieJar); + } else { + $domains = array($domain); + } + + foreach ($domains as $domain) { + unset($this->cookieJar[$domain][$path][$name]); + + if (empty($this->cookieJar[$domain][$path])) { + unset($this->cookieJar[$domain][$path]); + + if (empty($this->cookieJar[$domain])) { + unset($this->cookieJar[$domain]); + } + } + } + } + + /** + * Removes all the cookies from the jar. + */ + public function clear() + { + $this->cookieJar = array(); + } + + /** + * Updates the cookie jar from a response Set-Cookie headers. + * + * @param array $setCookies Set-Cookie headers from an HTTP response + * @param string $uri The base URL + */ + public function updateFromSetCookie(array $setCookies, $uri = null) + { + $cookies = array(); + + foreach ($setCookies as $cookie) { + foreach (explode(',', $cookie) as $i => $part) { + if (0 === $i || preg_match('/^(?P\s*[0-9A-Za-z!#\$%\&\'\*\+\-\.^_`\|~]+)=/', $part)) { + $cookies[] = ltrim($part); + } else { + $cookies[count($cookies) - 1] .= ','.$part; + } + } + } + + foreach ($cookies as $cookie) { + try { + $this->set(Cookie::fromString($cookie, $uri)); + } catch (\InvalidArgumentException $e) { + // invalid cookies are just ignored + } + } + } + + /** + * Updates the cookie jar from a Response object. + * + * @param Response $response A Response object + * @param string $uri The base URL + */ + public function updateFromResponse(Response $response, $uri = null) + { + $this->updateFromSetCookie($response->getHeader('Set-Cookie', false), $uri); + } + + /** + * Returns not yet expired cookies. + * + * @return Cookie[] An array of cookies + */ + public function all() + { + $this->flushExpiredCookies(); + + $flattenedCookies = array(); + foreach ($this->cookieJar as $path) { + foreach ($path as $cookies) { + foreach ($cookies as $cookie) { + $flattenedCookies[] = $cookie; + } + } + } + + return $flattenedCookies; + } + + /** + * Returns not yet expired cookie values for the given URI. + * + * @param string $uri A URI + * @param bool $returnsRawValue Returns raw value or urldecoded value + * + * @return array An array of cookie values + */ + public function allValues($uri, $returnsRawValue = false) + { + $this->flushExpiredCookies(); + + $parts = array_replace(array('path' => '/'), parse_url($uri)); + $cookies = array(); + foreach ($this->cookieJar as $domain => $pathCookies) { + if ($domain) { + $domain = '.'.ltrim($domain, '.'); + if ($domain != substr('.'.$parts['host'], -strlen($domain))) { + continue; + } + } + + foreach ($pathCookies as $path => $namedCookies) { + if ($path != substr($parts['path'], 0, strlen($path))) { + continue; + } + + foreach ($namedCookies as $cookie) { + if ($cookie->isSecure() && 'https' != $parts['scheme']) { + continue; + } + + $cookies[$cookie->getName()] = $returnsRawValue ? $cookie->getRawValue() : $cookie->getValue(); + } + } + } + + return $cookies; + } + + /** + * Returns not yet expired raw cookie values for the given URI. + * + * @param string $uri A URI + * + * @return array An array of cookie values + */ + public function allRawValues($uri) + { + return $this->allValues($uri, true); + } + + /** + * Removes all expired cookies. + */ + public function flushExpiredCookies() + { + foreach ($this->cookieJar as $domain => $pathCookies) { + foreach ($pathCookies as $path => $namedCookies) { + foreach ($namedCookies as $name => $cookie) { + if ($cookie->isExpired()) { + unset($this->cookieJar[$domain][$path][$name]); + } + } + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/History.php b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/History.php new file mode 100644 index 0000000000000000000000000000000000000000..8e38fe5ca8711f7d4f4e326f79f314831e359be0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/History.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\BrowserKit; + +/** + * History. + * + * @author Fabien Potencier + */ +class History +{ + protected $stack = array(); + protected $position = -1; + + /** + * Clears the history. + */ + public function clear() + { + $this->stack = array(); + $this->position = -1; + } + + /** + * Adds a Request to the history. + * + * @param Request $request A Request instance + */ + public function add(Request $request) + { + $this->stack = array_slice($this->stack, 0, $this->position + 1); + $this->stack[] = clone $request; + $this->position = count($this->stack) - 1; + } + + /** + * Returns true if the history is empty. + * + * @return bool true if the history is empty, false otherwise + */ + public function isEmpty() + { + return count($this->stack) == 0; + } + + /** + * Goes back in the history. + * + * @return Request A Request instance + * + * @throws \LogicException if the stack is already on the first page + */ + public function back() + { + if ($this->position < 1) { + throw new \LogicException('You are already on the first page.'); + } + + return clone $this->stack[--$this->position]; + } + + /** + * Goes forward in the history. + * + * @return Request A Request instance + * + * @throws \LogicException if the stack is already on the last page + */ + public function forward() + { + if ($this->position > count($this->stack) - 2) { + throw new \LogicException('You are already on the last page.'); + } + + return clone $this->stack[++$this->position]; + } + + /** + * Returns the current element in the history. + * + * @return Request A Request instance + * + * @throws \LogicException if the stack is empty + */ + public function current() + { + if (-1 == $this->position) { + throw new \LogicException('The page history is empty.'); + } + + return clone $this->stack[$this->position]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/README.md b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a0083ac5bd7ea604cabf8fa021284d1ff59f2ab8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/README.md @@ -0,0 +1,14 @@ +BrowserKit Component +==================== + +The BrowserKit component simulates the behavior of a web browser, allowing you +to make requests, click on links and submit forms programmatically. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/browser_kit/introduction.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/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Request.php b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Request.php new file mode 100644 index 0000000000000000000000000000000000000000..2e2819b4ca4656f03b517a4fd8c49e41b961e7bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Request.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\BrowserKit; + +/** + * Request object. + * + * @author Fabien Potencier + */ +class Request +{ + protected $uri; + protected $method; + protected $parameters; + protected $files; + protected $cookies; + protected $server; + protected $content; + + /** + * Constructor. + * + * @param string $uri The request URI + * @param string $method The HTTP method request + * @param array $parameters The request parameters + * @param array $files An array of uploaded files + * @param array $cookies An array of cookies + * @param array $server An array of server parameters + * @param string $content The raw body data + */ + public function __construct($uri, $method, array $parameters = array(), array $files = array(), array $cookies = array(), array $server = array(), $content = null) + { + $this->uri = $uri; + $this->method = $method; + $this->parameters = $parameters; + $this->files = $files; + $this->cookies = $cookies; + $this->server = $server; + $this->content = $content; + } + + /** + * Gets the request URI. + * + * @return string The request URI + */ + public function getUri() + { + return $this->uri; + } + + /** + * Gets the request HTTP method. + * + * @return string The request HTTP method + */ + public function getMethod() + { + return $this->method; + } + + /** + * Gets the request parameters. + * + * @return array The request parameters + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Gets the request server files. + * + * @return array The request files + */ + public function getFiles() + { + return $this->files; + } + + /** + * Gets the request cookies. + * + * @return array The request cookies + */ + public function getCookies() + { + return $this->cookies; + } + + /** + * Gets the request server parameters. + * + * @return array The request server parameters + */ + public function getServer() + { + return $this->server; + } + + /** + * Gets the request raw body data. + * + * @return string The request raw body data + */ + public function getContent() + { + return $this->content; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Response.php b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Response.php new file mode 100644 index 0000000000000000000000000000000000000000..984442fbe3691aeb566e7c7c61e7b7bc10226a5d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Response.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\BrowserKit; + +/** + * Response object. + * + * @author Fabien Potencier + */ +class Response +{ + protected $content; + protected $status; + protected $headers; + + /** + * Constructor. + * + * The headers array is a set of key/value pairs. If a header is present multiple times + * then the value is an array of all the values. + * + * @param string $content The content of the response + * @param int $status The response status code + * @param array $headers An array of headers + */ + public function __construct($content = '', $status = 200, array $headers = array()) + { + $this->content = $content; + $this->status = $status; + $this->headers = $headers; + } + + /** + * Converts the response object to string containing all headers and the response content. + * + * @return string The response with headers and content + */ + public function __toString() + { + $headers = ''; + foreach ($this->headers as $name => $value) { + if (is_string($value)) { + $headers .= $this->buildHeader($name, $value); + } else { + foreach ($value as $headerValue) { + $headers .= $this->buildHeader($name, $headerValue); + } + } + } + + return $headers."\n".$this->content; + } + + /** + * Returns the build header line. + * + * @param string $name The header name + * @param string $value The header value + * + * @return string The built header line + */ + protected function buildHeader($name, $value) + { + return sprintf("%s: %s\n", $name, $value); + } + + /** + * Gets the response content. + * + * @return string The response content + */ + public function getContent() + { + return $this->content; + } + + /** + * Gets the response status code. + * + * @return int The response status code + */ + public function getStatus() + { + return $this->status; + } + + /** + * Gets the response headers. + * + * @return array The response headers + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Gets a response header. + * + * @param string $header The header name + * @param bool $first Whether to return the first value or all header values + * + * @return string|array The first header value if $first is true, an array of values otherwise + */ + public function getHeader($header, $first = true) + { + $normalizedHeader = str_replace('-', '_', strtolower($header)); + foreach ($this->headers as $key => $value) { + if (str_replace('-', '_', strtolower($key)) === $normalizedHeader) { + if ($first) { + return is_array($value) ? (count($value) ? $value[0] : '') : $value; + } + + return is_array($value) ? $value : array($value); + } + } + + return $first ? null : array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ClientTest.php b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ClientTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9e1530168e20b2ca15addd7db730a6524a63c548 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ClientTest.php @@ -0,0 +1,677 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\BrowserKit\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\BrowserKit\Client; +use Symfony\Component\BrowserKit\History; +use Symfony\Component\BrowserKit\CookieJar; +use Symfony\Component\BrowserKit\Response; + +class SpecialResponse extends Response +{ +} + +class TestClient extends Client +{ + protected $nextResponse = null; + protected $nextScript = null; + + public function setNextResponse(Response $response) + { + $this->nextResponse = $response; + } + + public function setNextScript($script) + { + $this->nextScript = $script; + } + + protected function doRequest($request) + { + if (null === $this->nextResponse) { + return new Response(); + } + + $response = $this->nextResponse; + $this->nextResponse = null; + + return $response; + } + + protected function filterResponse($response) + { + if ($response instanceof SpecialResponse) { + return new Response($response->getContent(), $response->getStatus(), $response->getHeaders()); + } + + return $response; + } + + protected function getScript($request) + { + $r = new \ReflectionClass('Symfony\Component\BrowserKit\Response'); + $path = $r->getFileName(); + + return <<nextScript); +EOF; + } +} + +class ClientTest extends TestCase +{ + public function testGetHistory() + { + $client = new TestClient(array(), $history = new History()); + $this->assertSame($history, $client->getHistory(), '->getHistory() returns the History'); + } + + public function testGetCookieJar() + { + $client = new TestClient(array(), null, $cookieJar = new CookieJar()); + $this->assertSame($cookieJar, $client->getCookieJar(), '->getCookieJar() returns the CookieJar'); + } + + public function testGetRequest() + { + $client = new TestClient(); + $client->request('GET', 'http://example.com/'); + + $this->assertEquals('http://example.com/', $client->getRequest()->getUri(), '->getCrawler() returns the Request of the last request'); + } + + public function testGetRequestWithIpAsHttpHost() + { + $client = new TestClient(); + $client->request('GET', 'https://example.com/foo', array(), array(), array('HTTP_HOST' => '127.0.0.1')); + + $this->assertEquals('https://example.com/foo', $client->getRequest()->getUri()); + $headers = $client->getRequest()->getServer(); + $this->assertEquals('127.0.0.1', $headers['HTTP_HOST']); + } + + public function testGetResponse() + { + $client = new TestClient(); + $client->setNextResponse(new Response('foo')); + $client->request('GET', 'http://example.com/'); + + $this->assertEquals('foo', $client->getResponse()->getContent(), '->getCrawler() returns the Response of the last request'); + $this->assertInstanceOf('Symfony\Component\BrowserKit\Response', $client->getResponse(), '->getCrawler() returns the Response of the last request'); + } + + public function testGetInternalResponse() + { + $client = new TestClient(); + $client->setNextResponse(new SpecialResponse('foo')); + $client->request('GET', 'http://example.com/'); + + $this->assertInstanceOf('Symfony\Component\BrowserKit\Response', $client->getInternalResponse()); + $this->assertNotInstanceOf('Symfony\Component\BrowserKit\Tests\SpecialResponse', $client->getInternalResponse()); + $this->assertInstanceOf('Symfony\Component\BrowserKit\Tests\SpecialResponse', $client->getResponse()); + } + + public function testGetContent() + { + $json = '{"jsonrpc":"2.0","method":"echo","id":7,"params":["Hello World"]}'; + + $client = new TestClient(); + $client->request('POST', 'http://example.com/jsonrpc', array(), array(), array(), $json); + $this->assertEquals($json, $client->getRequest()->getContent()); + } + + public function testGetCrawler() + { + $client = new TestClient(); + $client->setNextResponse(new Response('foo')); + $crawler = $client->request('GET', 'http://example.com/'); + + $this->assertSame($crawler, $client->getCrawler(), '->getCrawler() returns the Crawler of the last request'); + } + + public function testRequestHttpHeaders() + { + $client = new TestClient(); + $client->request('GET', '/'); + $headers = $client->getRequest()->getServer(); + $this->assertEquals('localhost', $headers['HTTP_HOST'], '->request() sets the HTTP_HOST header'); + + $client = new TestClient(); + $client->request('GET', 'http://www.example.com'); + $headers = $client->getRequest()->getServer(); + $this->assertEquals('www.example.com', $headers['HTTP_HOST'], '->request() sets the HTTP_HOST header'); + + $client->request('GET', 'https://www.example.com'); + $headers = $client->getRequest()->getServer(); + $this->assertTrue($headers['HTTPS'], '->request() sets the HTTPS header'); + + $client = new TestClient(); + $client->request('GET', 'http://www.example.com:8080'); + $headers = $client->getRequest()->getServer(); + $this->assertEquals('www.example.com:8080', $headers['HTTP_HOST'], '->request() sets the HTTP_HOST header with port'); + } + + public function testRequestURIConversion() + { + $client = new TestClient(); + $client->request('GET', '/foo'); + $this->assertEquals('http://localhost/foo', $client->getRequest()->getUri(), '->request() converts the URI to an absolute one'); + + $client = new TestClient(); + $client->request('GET', 'http://www.example.com'); + $this->assertEquals('http://www.example.com', $client->getRequest()->getUri(), '->request() does not change absolute URIs'); + + $client = new TestClient(); + $client->request('GET', 'http://www.example.com/'); + $client->request('GET', '/foo'); + $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); + + $client = new TestClient(); + $client->request('GET', 'http://www.example.com/foo'); + $client->request('GET', '#'); + $this->assertEquals('http://www.example.com/foo#', $client->getRequest()->getUri(), '->request() uses the previous request for #'); + $client->request('GET', '#'); + $this->assertEquals('http://www.example.com/foo#', $client->getRequest()->getUri(), '->request() uses the previous request for #'); + $client->request('GET', '#foo'); + $this->assertEquals('http://www.example.com/foo#foo', $client->getRequest()->getUri(), '->request() uses the previous request for #'); + + $client = new TestClient(); + $client->request('GET', 'http://www.example.com/foo/'); + $client->request('GET', 'bar'); + $this->assertEquals('http://www.example.com/foo/bar', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); + + $client = new TestClient(); + $client->request('GET', 'http://www.example.com/foo/foobar'); + $client->request('GET', 'bar'); + $this->assertEquals('http://www.example.com/foo/bar', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); + + $client = new TestClient(); + $client->request('GET', 'http://www.example.com/foo/'); + $client->request('GET', 'http'); + $this->assertEquals('http://www.example.com/foo/http', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); + + $client = new TestClient(); + $client->request('GET', 'http://www.example.com/foo'); + $client->request('GET', 'http/bar'); + $this->assertEquals('http://www.example.com/http/bar', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); + + $client = new TestClient(); + $client->request('GET', 'http://www.example.com/'); + $client->request('GET', 'http'); + $this->assertEquals('http://www.example.com/http', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); + + $client = new TestClient(); + $client->request('GET', 'http://www.example.com/foo'); + $client->request('GET', '?'); + $this->assertEquals('http://www.example.com/foo?', $client->getRequest()->getUri(), '->request() uses the previous request for ?'); + $client->request('GET', '?'); + $this->assertEquals('http://www.example.com/foo?', $client->getRequest()->getUri(), '->request() uses the previous request for ?'); + $client->request('GET', '?foo=bar'); + $this->assertEquals('http://www.example.com/foo?foo=bar', $client->getRequest()->getUri(), '->request() uses the previous request for ?'); + } + + public function testRequestReferer() + { + $client = new TestClient(); + $client->request('GET', 'http://www.example.com/foo/foobar'); + $client->request('GET', 'bar'); + $server = $client->getRequest()->getServer(); + $this->assertEquals('http://www.example.com/foo/foobar', $server['HTTP_REFERER'], '->request() sets the referer'); + } + + public function testRequestHistory() + { + $client = new TestClient(); + $client->request('GET', 'http://www.example.com/foo/foobar'); + $client->request('GET', 'bar'); + + $this->assertEquals('http://www.example.com/foo/bar', $client->getHistory()->current()->getUri(), '->request() updates the History'); + $this->assertEquals('http://www.example.com/foo/foobar', $client->getHistory()->back()->getUri(), '->request() updates the History'); + } + + public function testRequestCookies() + { + $client = new TestClient(); + $client->setNextResponse(new Response('foo', 200, array('Set-Cookie' => 'foo=bar'))); + $client->request('GET', 'http://www.example.com/foo/foobar'); + $this->assertEquals(array('foo' => 'bar'), $client->getCookieJar()->allValues('http://www.example.com/foo/foobar'), '->request() updates the CookieJar'); + + $client->request('GET', 'bar'); + $this->assertEquals(array('foo' => 'bar'), $client->getCookieJar()->allValues('http://www.example.com/foo/foobar'), '->request() updates the CookieJar'); + } + + public function testRequestSecureCookies() + { + $client = new TestClient(); + $client->setNextResponse(new Response('foo', 200, array('Set-Cookie' => 'foo=bar; path=/; secure'))); + $client->request('GET', 'https://www.example.com/foo/foobar'); + + $this->assertTrue($client->getCookieJar()->get('foo', '/', 'www.example.com')->isSecure()); + } + + public function testClick() + { + $client = new TestClient(); + $client->setNextResponse(new Response('foo')); + $crawler = $client->request('GET', 'http://www.example.com/foo/foobar'); + + $client->click($crawler->filter('a')->link()); + + $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->click() clicks on links'); + } + + public function testClickForm() + { + $client = new TestClient(); + $client->setNextResponse(new Response('
    ')); + $crawler = $client->request('GET', 'http://www.example.com/foo/foobar'); + + $client->click($crawler->filter('input')->form()); + + $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->click() Form submit forms'); + } + + public function testSubmit() + { + $client = new TestClient(); + $client->setNextResponse(new Response('
    ')); + $crawler = $client->request('GET', 'http://www.example.com/foo/foobar'); + + $client->submit($crawler->filter('input')->form()); + + $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->submit() submit forms'); + } + + public function testSubmitPreserveAuth() + { + $client = new TestClient(array('PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => 'bar')); + $client->setNextResponse(new Response('
    ')); + $crawler = $client->request('GET', 'http://www.example.com/foo/foobar'); + + $server = $client->getRequest()->getServer(); + $this->assertArrayHasKey('PHP_AUTH_USER', $server); + $this->assertEquals('foo', $server['PHP_AUTH_USER']); + $this->assertArrayHasKey('PHP_AUTH_PW', $server); + $this->assertEquals('bar', $server['PHP_AUTH_PW']); + + $client->submit($crawler->filter('input')->form()); + + $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->submit() submit forms'); + + $server = $client->getRequest()->getServer(); + $this->assertArrayHasKey('PHP_AUTH_USER', $server); + $this->assertEquals('foo', $server['PHP_AUTH_USER']); + $this->assertArrayHasKey('PHP_AUTH_PW', $server); + $this->assertEquals('bar', $server['PHP_AUTH_PW']); + } + + public function testFollowRedirect() + { + $client = new TestClient(); + $client->followRedirects(false); + $client->request('GET', 'http://www.example.com/foo/foobar'); + + try { + $client->followRedirect(); + $this->fail('->followRedirect() throws a \LogicException if the request was not redirected'); + } catch (\Exception $e) { + $this->assertInstanceOf('LogicException', $e, '->followRedirect() throws a \LogicException if the request was not redirected'); + } + + $client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected'))); + $client->request('GET', 'http://www.example.com/foo/foobar'); + $client->followRedirect(); + + $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); + + $client = new TestClient(); + $client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected'))); + $client->request('GET', 'http://www.example.com/foo/foobar'); + + $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() automatically follows redirects if followRedirects is true'); + + $client = new TestClient(); + $client->setNextResponse(new Response('', 201, array('Location' => 'http://www.example.com/redirected'))); + $client->request('GET', 'http://www.example.com/foo/foobar'); + + $this->assertEquals('http://www.example.com/foo/foobar', $client->getRequest()->getUri(), '->followRedirect() does not follow redirect if HTTP Code is not 30x'); + + $client = new TestClient(); + $client->setNextResponse(new Response('', 201, array('Location' => 'http://www.example.com/redirected'))); + $client->followRedirects(false); + $client->request('GET', 'http://www.example.com/foo/foobar'); + + try { + $client->followRedirect(); + $this->fail('->followRedirect() throws a \LogicException if the request did not respond with 30x HTTP Code'); + } catch (\Exception $e) { + $this->assertInstanceOf('LogicException', $e, '->followRedirect() throws a \LogicException if the request did not respond with 30x HTTP Code'); + } + } + + public function testFollowRelativeRedirect() + { + $client = new TestClient(); + $client->setNextResponse(new Response('', 302, array('Location' => '/redirected'))); + $client->request('GET', 'http://www.example.com/foo/foobar'); + $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); + + $client = new TestClient(); + $client->setNextResponse(new Response('', 302, array('Location' => '/redirected:1234'))); + $client->request('GET', 'http://www.example.com/foo/foobar'); + $this->assertEquals('http://www.example.com/redirected:1234', $client->getRequest()->getUri(), '->followRedirect() follows relative urls'); + } + + public function testFollowRedirectWithMaxRedirects() + { + $client = new TestClient(); + $client->setMaxRedirects(1); + $client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected'))); + $client->request('GET', 'http://www.example.com/foo/foobar'); + $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); + + $client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected2'))); + try { + $client->followRedirect(); + $this->fail('->followRedirect() throws a \LogicException if the request was redirected and limit of redirections was reached'); + } catch (\Exception $e) { + $this->assertInstanceOf('LogicException', $e, '->followRedirect() throws a \LogicException if the request was redirected and limit of redirections was reached'); + } + + $client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected'))); + $client->request('GET', 'http://www.example.com/foo/foobar'); + $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); + + $client->setNextResponse(new Response('', 302, array('Location' => '/redirected'))); + $client->request('GET', 'http://www.example.com/foo/foobar'); + + $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows relative URLs'); + + $client = new TestClient(); + $client->setNextResponse(new Response('', 302, array('Location' => '//www.example.org/'))); + $client->request('GET', 'https://www.example.com/'); + + $this->assertEquals('https://www.example.org/', $client->getRequest()->getUri(), '->followRedirect() follows protocol-relative URLs'); + + $client = new TestClient(); + $client->setNextResponse(new Response('', 302, array('Location' => 'http://www.example.com/redirected'))); + $client->request('POST', 'http://www.example.com/foo/foobar', array('name' => 'bar')); + + $this->assertEquals('GET', $client->getRequest()->getMethod(), '->followRedirect() uses a GET for 302'); + $this->assertEquals(array(), $client->getRequest()->getParameters(), '->followRedirect() does not submit parameters when changing the method'); + } + + public function testFollowRedirectWithCookies() + { + $client = new TestClient(); + $client->followRedirects(false); + $client->setNextResponse(new Response('', 302, array( + 'Location' => 'http://www.example.com/redirected', + 'Set-Cookie' => 'foo=bar', + ))); + $client->request('GET', 'http://www.example.com/'); + $this->assertEquals(array(), $client->getRequest()->getCookies()); + $client->followRedirect(); + $this->assertEquals(array('foo' => 'bar'), $client->getRequest()->getCookies()); + } + + public function testFollowRedirectWithHeaders() + { + $headers = array( + 'HTTP_HOST' => 'www.example.com', + 'HTTP_USER_AGENT' => 'Symfony BrowserKit', + 'CONTENT_TYPE' => 'application/vnd.custom+xml', + 'HTTPS' => false, + ); + + $client = new TestClient(); + $client->followRedirects(false); + $client->setNextResponse(new Response('', 302, array( + 'Location' => 'http://www.example.com/redirected', + ))); + $client->request('GET', 'http://www.example.com/', array(), array(), array( + 'CONTENT_TYPE' => 'application/vnd.custom+xml', + )); + + $this->assertEquals($headers, $client->getRequest()->getServer()); + + $client->followRedirect(); + + $headers['HTTP_REFERER'] = 'http://www.example.com/'; + + $this->assertEquals($headers, $client->getRequest()->getServer()); + } + + public function testFollowRedirectWithPort() + { + $headers = array( + 'HTTP_HOST' => 'www.example.com:8080', + 'HTTP_USER_AGENT' => 'Symfony BrowserKit', + 'HTTPS' => false, + 'HTTP_REFERER' => 'http://www.example.com:8080/', + ); + + $client = new TestClient(); + $client->setNextResponse(new Response('', 302, array( + 'Location' => 'http://www.example.com:8080/redirected', + ))); + $client->request('GET', 'http://www.example.com:8080/'); + + $this->assertEquals($headers, $client->getRequest()->getServer()); + } + + public function testIsFollowingRedirects() + { + $client = new TestClient(); + $this->assertTrue($client->isFollowingRedirects(), '->getFollowRedirects() returns default value'); + $client->followRedirects(false); + $this->assertFalse($client->isFollowingRedirects(), '->getFollowRedirects() returns assigned value'); + } + + public function testGetMaxRedirects() + { + $client = new TestClient(); + $this->assertEquals(-1, $client->getMaxRedirects(), '->getMaxRedirects() returns default value'); + $client->setMaxRedirects(3); + $this->assertEquals(3, $client->getMaxRedirects(), '->getMaxRedirects() returns assigned value'); + } + + public function testFollowRedirectWithPostMethod() + { + $parameters = array('foo' => 'bar'); + $files = array('myfile.foo' => 'baz'); + $server = array('X_TEST_FOO' => 'bazbar'); + $content = 'foobarbaz'; + + $client = new TestClient(); + + $client->setNextResponse(new Response('', 307, array('Location' => 'http://www.example.com/redirected'))); + $client->request('POST', 'http://www.example.com/foo/foobar', $parameters, $files, $server, $content); + + $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect with POST method'); + $this->assertArrayHasKey('foo', $client->getRequest()->getParameters(), '->followRedirect() keeps parameters with POST method'); + $this->assertArrayHasKey('myfile.foo', $client->getRequest()->getFiles(), '->followRedirect() keeps files with POST method'); + $this->assertArrayHasKey('X_TEST_FOO', $client->getRequest()->getServer(), '->followRedirect() keeps $_SERVER with POST method'); + $this->assertEquals($content, $client->getRequest()->getContent(), '->followRedirect() keeps content with POST method'); + $this->assertEquals('POST', $client->getRequest()->getMethod(), '->followRedirect() keeps request method'); + } + + public function testBack() + { + $client = new TestClient(); + + $parameters = array('foo' => 'bar'); + $files = array('myfile.foo' => 'baz'); + $server = array('X_TEST_FOO' => 'bazbar'); + $content = 'foobarbaz'; + + $client->request('GET', 'http://www.example.com/foo/foobar', $parameters, $files, $server, $content); + $client->request('GET', 'http://www.example.com/foo'); + $client->back(); + + $this->assertEquals('http://www.example.com/foo/foobar', $client->getRequest()->getUri(), '->back() goes back in the history'); + $this->assertArrayHasKey('foo', $client->getRequest()->getParameters(), '->back() keeps parameters'); + $this->assertArrayHasKey('myfile.foo', $client->getRequest()->getFiles(), '->back() keeps files'); + $this->assertArrayHasKey('X_TEST_FOO', $client->getRequest()->getServer(), '->back() keeps $_SERVER'); + $this->assertEquals($content, $client->getRequest()->getContent(), '->back() keeps content'); + } + + public function testForward() + { + $client = new TestClient(); + + $parameters = array('foo' => 'bar'); + $files = array('myfile.foo' => 'baz'); + $server = array('X_TEST_FOO' => 'bazbar'); + $content = 'foobarbaz'; + + $client->request('GET', 'http://www.example.com/foo/foobar'); + $client->request('GET', 'http://www.example.com/foo', $parameters, $files, $server, $content); + $client->back(); + $client->forward(); + + $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->forward() goes forward in the history'); + $this->assertArrayHasKey('foo', $client->getRequest()->getParameters(), '->forward() keeps parameters'); + $this->assertArrayHasKey('myfile.foo', $client->getRequest()->getFiles(), '->forward() keeps files'); + $this->assertArrayHasKey('X_TEST_FOO', $client->getRequest()->getServer(), '->forward() keeps $_SERVER'); + $this->assertEquals($content, $client->getRequest()->getContent(), '->forward() keeps content'); + } + + public function testReload() + { + $client = new TestClient(); + + $parameters = array('foo' => 'bar'); + $files = array('myfile.foo' => 'baz'); + $server = array('X_TEST_FOO' => 'bazbar'); + $content = 'foobarbaz'; + + $client->request('GET', 'http://www.example.com/foo/foobar', $parameters, $files, $server, $content); + $client->reload(); + + $this->assertEquals('http://www.example.com/foo/foobar', $client->getRequest()->getUri(), '->reload() reloads the current page'); + $this->assertArrayHasKey('foo', $client->getRequest()->getParameters(), '->reload() keeps parameters'); + $this->assertArrayHasKey('myfile.foo', $client->getRequest()->getFiles(), '->reload() keeps files'); + $this->assertArrayHasKey('X_TEST_FOO', $client->getRequest()->getServer(), '->reload() keeps $_SERVER'); + $this->assertEquals($content, $client->getRequest()->getContent(), '->reload() keeps content'); + } + + public function testRestart() + { + $client = new TestClient(); + $client->request('GET', 'http://www.example.com/foo/foobar'); + $client->restart(); + + $this->assertTrue($client->getHistory()->isEmpty(), '->restart() clears the history'); + $this->assertEquals(array(), $client->getCookieJar()->all(), '->restart() clears the cookies'); + } + + public function testInsulatedRequests() + { + $client = new TestClient(); + $client->insulate(); + $client->setNextScript("new Symfony\Component\BrowserKit\Response('foobar')"); + $client->request('GET', 'http://www.example.com/foo/foobar'); + + $this->assertEquals('foobar', $client->getResponse()->getContent(), '->insulate() process the request in a forked process'); + + $client->setNextScript("new Symfony\Component\BrowserKit\Response('foobar)"); + + try { + $client->request('GET', 'http://www.example.com/foo/foobar'); + $this->fail('->request() throws a \RuntimeException if the script has an error'); + } catch (\Exception $e) { + $this->assertInstanceOf('RuntimeException', $e, '->request() throws a \RuntimeException if the script has an error'); + } + } + + public function testGetServerParameter() + { + $client = new TestClient(); + $this->assertEquals('', $client->getServerParameter('HTTP_HOST')); + $this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); + $this->assertEquals('testvalue', $client->getServerParameter('testkey', 'testvalue')); + } + + public function testSetServerParameter() + { + $client = new TestClient(); + + $this->assertEquals('', $client->getServerParameter('HTTP_HOST')); + $this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); + + $client->setServerParameter('HTTP_HOST', 'testhost'); + $this->assertEquals('testhost', $client->getServerParameter('HTTP_HOST')); + + $client->setServerParameter('HTTP_USER_AGENT', 'testua'); + $this->assertEquals('testua', $client->getServerParameter('HTTP_USER_AGENT')); + } + + public function testSetServerParameterInRequest() + { + $client = new TestClient(); + + $this->assertEquals('', $client->getServerParameter('HTTP_HOST')); + $this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); + + $client->request('GET', 'https://www.example.com/https/www.example.com', array(), array(), array( + 'HTTP_HOST' => 'testhost', + 'HTTP_USER_AGENT' => 'testua', + 'HTTPS' => false, + 'NEW_SERVER_KEY' => 'new-server-key-value', + )); + + $this->assertEquals('', $client->getServerParameter('HTTP_HOST')); + $this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); + + $this->assertEquals('http://www.example.com/https/www.example.com', $client->getRequest()->getUri()); + + $server = $client->getRequest()->getServer(); + + $this->assertArrayHasKey('HTTP_USER_AGENT', $server); + $this->assertEquals('testua', $server['HTTP_USER_AGENT']); + + $this->assertArrayHasKey('HTTP_HOST', $server); + $this->assertEquals('testhost', $server['HTTP_HOST']); + + $this->assertArrayHasKey('NEW_SERVER_KEY', $server); + $this->assertEquals('new-server-key-value', $server['NEW_SERVER_KEY']); + + $this->assertArrayHasKey('HTTPS', $server); + $this->assertFalse($server['HTTPS']); + } + + public function testInternalRequest() + { + $client = new TestClient(); + + $client->request('GET', 'https://www.example.com/https/www.example.com', array(), array(), array( + 'HTTP_HOST' => 'testhost', + 'HTTP_USER_AGENT' => 'testua', + 'HTTPS' => false, + 'NEW_SERVER_KEY' => 'new-server-key-value', + )); + + $this->assertInstanceOf('Symfony\Component\BrowserKit\Request', $client->getInternalRequest()); + } + + public function testInternalRequestNull() + { + $client = new TestClient(); + $this->assertNull($client->getInternalRequest()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ae9f6a7ae5c9ca0cd272e187d5f11865eacdb0ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.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\Component\BrowserKit\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\BrowserKit\CookieJar; +use Symfony\Component\BrowserKit\Cookie; +use Symfony\Component\BrowserKit\Response; + +class CookieJarTest extends TestCase +{ + public function testSetGet() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie = new Cookie('foo', 'bar')); + + $this->assertEquals($cookie, $cookieJar->get('foo'), '->set() sets a cookie'); + + $this->assertNull($cookieJar->get('foobar'), '->get() returns null if the cookie does not exist'); + + $cookieJar->set($cookie = new Cookie('foo', 'bar', time() - 86400)); + $this->assertNull($cookieJar->get('foo'), '->get() returns null if the cookie is expired'); + } + + public function testExpire() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie = new Cookie('foo', 'bar')); + $cookieJar->expire('foo'); + $this->assertNull($cookieJar->get('foo'), '->get() returns null if the cookie is expired'); + } + + public function testAll() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie1 = new Cookie('foo', 'bar')); + $cookieJar->set($cookie2 = new Cookie('bar', 'foo')); + + $this->assertEquals(array($cookie1, $cookie2), $cookieJar->all(), '->all() returns all cookies in the jar'); + } + + public function testClear() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie1 = new Cookie('foo', 'bar')); + $cookieJar->set($cookie2 = new Cookie('bar', 'foo')); + + $cookieJar->clear(); + + $this->assertEquals(array(), $cookieJar->all(), '->clear() expires all cookies'); + } + + public function testUpdateFromResponse() + { + $response = new Response('', 200, array('Set-Cookie' => 'foo=foo')); + + $cookieJar = new CookieJar(); + $cookieJar->updateFromResponse($response); + + $this->assertEquals('foo', $cookieJar->get('foo')->getValue(), '->updateFromResponse() updates cookies from a Response objects'); + } + + public function testUpdateFromSetCookie() + { + $setCookies = array('foo=foo'); + + $cookieJar = new CookieJar(); + $cookieJar->set(new Cookie('bar', 'bar')); + $cookieJar->updateFromSetCookie($setCookies); + + $this->assertInstanceOf('Symfony\Component\BrowserKit\Cookie', $cookieJar->get('foo')); + $this->assertInstanceOf('Symfony\Component\BrowserKit\Cookie', $cookieJar->get('bar')); + $this->assertEquals('foo', $cookieJar->get('foo')->getValue(), '->updateFromSetCookie() updates cookies from a Set-Cookie header'); + $this->assertEquals('bar', $cookieJar->get('bar')->getValue(), '->updateFromSetCookie() keeps existing cookies'); + } + + public function testUpdateFromEmptySetCookie() + { + $cookieJar = new CookieJar(); + $cookieJar->updateFromSetCookie(array('')); + $this->assertEquals(array(), $cookieJar->all()); + } + + public function testUpdateFromSetCookieWithMultipleCookies() + { + $timestamp = time() + 3600; + $date = gmdate('D, d M Y H:i:s \G\M\T', $timestamp); + $setCookies = array(sprintf('foo=foo; expires=%s; domain=.symfony.com; path=/, bar=bar; domain=.blog.symfony.com, PHPSESSID=id; expires=%s', $date, $date)); + + $cookieJar = new CookieJar(); + $cookieJar->updateFromSetCookie($setCookies); + + $fooCookie = $cookieJar->get('foo', '/', '.symfony.com'); + $barCookie = $cookieJar->get('bar', '/', '.blog.symfony.com'); + $phpCookie = $cookieJar->get('PHPSESSID'); + + $this->assertInstanceOf('Symfony\Component\BrowserKit\Cookie', $fooCookie); + $this->assertInstanceOf('Symfony\Component\BrowserKit\Cookie', $barCookie); + $this->assertInstanceOf('Symfony\Component\BrowserKit\Cookie', $phpCookie); + $this->assertEquals('foo', $fooCookie->getValue()); + $this->assertEquals('bar', $barCookie->getValue()); + $this->assertEquals('id', $phpCookie->getValue()); + $this->assertEquals($timestamp, $fooCookie->getExpiresTime()); + $this->assertNull($barCookie->getExpiresTime()); + $this->assertEquals($timestamp, $phpCookie->getExpiresTime()); + } + + /** + * @dataProvider provideAllValuesValues + */ + public function testAllValues($uri, $values) + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie1 = new Cookie('foo_nothing', 'foo')); + $cookieJar->set($cookie2 = new Cookie('foo_expired', 'foo', time() - 86400)); + $cookieJar->set($cookie3 = new Cookie('foo_path', 'foo', null, '/foo')); + $cookieJar->set($cookie4 = new Cookie('foo_domain', 'foo', null, '/', '.example.com')); + $cookieJar->set($cookie4 = new Cookie('foo_strict_domain', 'foo', null, '/', '.www4.example.com')); + $cookieJar->set($cookie5 = new Cookie('foo_secure', 'foo', null, '/', '', true)); + + $this->assertEquals($values, array_keys($cookieJar->allValues($uri)), '->allValues() returns the cookie for a given URI'); + } + + public function provideAllValuesValues() + { + return array( + array('http://www.example.com', array('foo_nothing', 'foo_domain')), + array('http://www.example.com/', array('foo_nothing', 'foo_domain')), + array('http://foo.example.com/', array('foo_nothing', 'foo_domain')), + array('http://foo.example1.com/', array('foo_nothing')), + array('https://foo.example.com/', array('foo_nothing', 'foo_secure', 'foo_domain')), + array('http://www.example.com/foo/bar', array('foo_nothing', 'foo_path', 'foo_domain')), + array('http://www4.example.com/', array('foo_nothing', 'foo_domain', 'foo_strict_domain')), + ); + } + + public function testEncodedValues() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie = new Cookie('foo', 'bar%3Dbaz', null, '/', '', false, true, true)); + + $this->assertEquals(array('foo' => 'bar=baz'), $cookieJar->allValues('/')); + $this->assertEquals(array('foo' => 'bar%3Dbaz'), $cookieJar->allRawValues('/')); + } + + public function testCookieExpireWithSameNameButDifferentPaths() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie1 = new Cookie('foo', 'bar1', null, '/foo')); + $cookieJar->set($cookie2 = new Cookie('foo', 'bar2', null, '/bar')); + $cookieJar->expire('foo', '/foo'); + + $this->assertNull($cookieJar->get('foo'), '->get() returns null if the cookie is expired'); + $this->assertEquals(array(), array_keys($cookieJar->allValues('http://example.com/'))); + $this->assertEquals(array(), $cookieJar->allValues('http://example.com/foo')); + $this->assertEquals(array('foo' => 'bar2'), $cookieJar->allValues('http://example.com/bar')); + } + + public function testCookieExpireWithNullPaths() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie1 = new Cookie('foo', 'bar1', null, '/')); + $cookieJar->expire('foo', null); + + $this->assertNull($cookieJar->get('foo'), '->get() returns null if the cookie is expired'); + $this->assertEquals(array(), array_keys($cookieJar->allValues('http://example.com/'))); + } + + public function testCookieExpireWithDomain() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie1 = new Cookie('foo', 'bar1', null, '/foo', 'http://example2.com/')); + $cookieJar->expire('foo', '/foo', 'http://example2.com/'); + + $this->assertNull($cookieJar->get('foo'), '->get() returns null if the cookie is expired'); + $this->assertEquals(array(), array_keys($cookieJar->allValues('http://example2.com/'))); + } + + public function testCookieWithSameNameButDifferentPaths() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie1 = new Cookie('foo', 'bar1', null, '/foo')); + $cookieJar->set($cookie2 = new Cookie('foo', 'bar2', null, '/bar')); + + $this->assertEquals(array(), array_keys($cookieJar->allValues('http://example.com/'))); + $this->assertEquals(array('foo' => 'bar1'), $cookieJar->allValues('http://example.com/foo')); + $this->assertEquals(array('foo' => 'bar2'), $cookieJar->allValues('http://example.com/bar')); + } + + public function testCookieWithSameNameButDifferentDomains() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie1 = new Cookie('foo', 'bar1', null, '/', 'foo.example.com')); + $cookieJar->set($cookie2 = new Cookie('foo', 'bar2', null, '/', 'bar.example.com')); + + $this->assertEquals(array(), array_keys($cookieJar->allValues('http://example.com/'))); + $this->assertEquals(array('foo' => 'bar1'), $cookieJar->allValues('http://foo.example.com/')); + $this->assertEquals(array('foo' => 'bar2'), $cookieJar->allValues('http://bar.example.com/')); + } + + public function testCookieGetWithSubdomain() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie1 = new Cookie('foo', 'bar', null, '/', '.example.com')); + $cookieJar->set($cookie2 = new Cookie('foo1', 'bar', null, '/', 'test.example.com')); + + $this->assertEquals($cookie1, $cookieJar->get('foo', '/', 'foo.example.com')); + $this->assertEquals($cookie1, $cookieJar->get('foo', '/', 'example.com')); + $this->assertEquals($cookie2, $cookieJar->get('foo1', '/', 'test.example.com')); + } + + public function testCookieGetWithWrongSubdomain() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie1 = new Cookie('foo1', 'bar', null, '/', 'test.example.com')); + + $this->assertNull($cookieJar->get('foo1', '/', 'foo.example.com')); + } + + public function testCookieGetWithSubdirectory() + { + $cookieJar = new CookieJar(); + $cookieJar->set($cookie1 = new Cookie('foo', 'bar', null, '/test', '.example.com')); + $cookieJar->set($cookie2 = new Cookie('foo1', 'bar1', null, '/', '.example.com')); + + $this->assertNull($cookieJar->get('foo', '/', '.example.com')); + $this->assertNull($cookieJar->get('foo', '/bar', '.example.com')); + $this->assertEquals($cookie1, $cookieJar->get('foo', '/test', 'example.com')); + $this->assertEquals($cookie2, $cookieJar->get('foo1', '/', 'example.com')); + $this->assertEquals($cookie2, $cookieJar->get('foo1', '/bar', 'example.com')); + } + + public function testCookieWithWildcardDomain() + { + $cookieJar = new CookieJar(); + $cookieJar->set(new Cookie('foo', 'bar', null, '/', '.example.com')); + + $this->assertEquals(array('foo' => 'bar'), $cookieJar->allValues('http://www.example.com')); + $this->assertEmpty($cookieJar->allValues('http://wwwexample.com')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieTest.php b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieTest.php new file mode 100644 index 0000000000000000000000000000000000000000..38ea81220bb2c497e3a599a96d4018aad59a69ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/CookieTest.php @@ -0,0 +1,190 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\BrowserKit\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\BrowserKit\Cookie; + +class CookieTest extends TestCase +{ + /** + * @dataProvider getTestsForToFromString + */ + public function testToFromString($cookie, $url = null) + { + $this->assertEquals($cookie, (string) Cookie::fromString($cookie, $url)); + } + + public function getTestsForToFromString() + { + return array( + array('foo=bar; path=/'), + array('foo=bar; path=/foo'), + array('foo=bar; domain=google.com; path=/'), + array('foo=bar; domain=example.com; path=/; secure', 'https://example.com/'), + array('foo=bar; path=/; httponly'), + array('foo=bar; domain=google.com; path=/foo; secure; httponly', 'https://google.com/'), + array('foo=bar=baz; path=/'), + array('foo=bar%3Dbaz; path=/'), + ); + } + + public function testFromStringIgnoreSecureFlag() + { + $this->assertFalse(Cookie::fromString('foo=bar; secure')->isSecure()); + $this->assertFalse(Cookie::fromString('foo=bar; secure', 'http://example.com/')->isSecure()); + } + + /** + * @dataProvider getExpireCookieStrings + */ + public function testFromStringAcceptsSeveralExpiresDateFormats($cookie) + { + $this->assertEquals(1596185377, Cookie::fromString($cookie)->getExpiresTime()); + } + + public function getExpireCookieStrings() + { + return array( + array('foo=bar; expires=Fri, 31-Jul-2020 08:49:37 GMT'), + array('foo=bar; expires=Fri, 31 Jul 2020 08:49:37 GMT'), + array('foo=bar; expires=Fri, 31-07-2020 08:49:37 GMT'), + array('foo=bar; expires=Fri, 31-07-20 08:49:37 GMT'), + array('foo=bar; expires=Friday, 31-Jul-20 08:49:37 GMT'), + array('foo=bar; expires=Fri Jul 31 08:49:37 2020'), + array('foo=bar; expires=\'Fri Jul 31 08:49:37 2020\''), + array('foo=bar; expires=Friday July 31st 2020, 08:49:37 GMT'), + ); + } + + public function testFromStringWithCapitalization() + { + $this->assertEquals('Foo=Bar; path=/', (string) Cookie::fromString('Foo=Bar')); + $this->assertEquals('foo=bar; expires=Fri, 31 Dec 2010 23:59:59 GMT; path=/', (string) Cookie::fromString('foo=bar; Expires=Fri, 31 Dec 2010 23:59:59 GMT')); + $this->assertEquals('foo=bar; domain=www.example.org; path=/; httponly', (string) Cookie::fromString('foo=bar; DOMAIN=www.example.org; HttpOnly')); + } + + public function testFromStringWithUrl() + { + $this->assertEquals('foo=bar; domain=www.example.com; path=/', (string) Cookie::fromString('foo=bar', 'http://www.example.com/')); + $this->assertEquals('foo=bar; domain=www.example.com; path=/', (string) Cookie::fromString('foo=bar', 'http://www.example.com')); + $this->assertEquals('foo=bar; domain=www.example.com; path=/', (string) Cookie::fromString('foo=bar', 'http://www.example.com?foo')); + $this->assertEquals('foo=bar; domain=www.example.com; path=/foo', (string) Cookie::fromString('foo=bar', 'http://www.example.com/foo/bar')); + $this->assertEquals('foo=bar; domain=www.example.com; path=/', (string) Cookie::fromString('foo=bar; path=/', 'http://www.example.com/foo/bar')); + $this->assertEquals('foo=bar; domain=www.myotherexample.com; path=/', (string) Cookie::fromString('foo=bar; domain=www.myotherexample.com', 'http://www.example.com/')); + } + + public function testFromStringThrowsAnExceptionIfCookieIsNotValid() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException'); + Cookie::fromString('foo'); + } + + public function testFromStringIgnoresInvalidExpiresDate() + { + $cookie = Cookie::fromString('foo=bar; expires=Flursday July 31st 2020, 08:49:37 GMT'); + + $this->assertFalse($cookie->isExpired()); + } + + public function testFromStringThrowsAnExceptionIfUrlIsNotValid() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException'); + Cookie::fromString('foo=bar', 'foobar'); + } + + public function testGetName() + { + $cookie = new Cookie('foo', 'bar'); + $this->assertEquals('foo', $cookie->getName(), '->getName() returns the cookie name'); + } + + public function testGetValue() + { + $cookie = new Cookie('foo', 'bar'); + $this->assertEquals('bar', $cookie->getValue(), '->getValue() returns the cookie value'); + + $cookie = new Cookie('foo', 'bar%3Dbaz', null, '/', '', false, true, true); // raw value + $this->assertEquals('bar=baz', $cookie->getValue(), '->getValue() returns the urldecoded cookie value'); + } + + public function testGetRawValue() + { + $cookie = new Cookie('foo', 'bar=baz'); // decoded value + $this->assertEquals('bar%3Dbaz', $cookie->getRawValue(), '->getRawValue() returns the urlencoded cookie value'); + $cookie = new Cookie('foo', 'bar%3Dbaz', null, '/', '', false, true, true); // raw value + $this->assertEquals('bar%3Dbaz', $cookie->getRawValue(), '->getRawValue() returns the non-urldecoded cookie value'); + } + + public function testGetPath() + { + $cookie = new Cookie('foo', 'bar', 0); + $this->assertEquals('/', $cookie->getPath(), '->getPath() returns / is no path is defined'); + + $cookie = new Cookie('foo', 'bar', 0, '/foo'); + $this->assertEquals('/foo', $cookie->getPath(), '->getPath() returns the cookie path'); + } + + public function testGetDomain() + { + $cookie = new Cookie('foo', 'bar', 0, '/', 'foo.com'); + $this->assertEquals('foo.com', $cookie->getDomain(), '->getDomain() returns the cookie domain'); + } + + public function testIsSecure() + { + $cookie = new Cookie('foo', 'bar'); + $this->assertFalse($cookie->isSecure(), '->isSecure() returns false if not defined'); + + $cookie = new Cookie('foo', 'bar', 0, '/', 'foo.com', true); + $this->assertTrue($cookie->isSecure(), '->isSecure() returns the cookie secure flag'); + } + + public function testIsHttponly() + { + $cookie = new Cookie('foo', 'bar'); + $this->assertTrue($cookie->isHttpOnly(), '->isHttpOnly() returns false if not defined'); + + $cookie = new Cookie('foo', 'bar', 0, '/', 'foo.com', false, true); + $this->assertTrue($cookie->isHttpOnly(), '->isHttpOnly() returns the cookie httponly flag'); + } + + public function testGetExpiresTime() + { + $cookie = new Cookie('foo', 'bar'); + $this->assertNull($cookie->getExpiresTime(), '->getExpiresTime() returns the expires time'); + + $cookie = new Cookie('foo', 'bar', $time = time() - 86400); + $this->assertEquals($time, $cookie->getExpiresTime(), '->getExpiresTime() returns the expires time'); + } + + public function testIsExpired() + { + $cookie = new Cookie('foo', 'bar'); + $this->assertFalse($cookie->isExpired(), '->isExpired() returns false when the cookie never expires (null as expires time)'); + + $cookie = new Cookie('foo', 'bar', time() - 86400); + $this->assertTrue($cookie->isExpired(), '->isExpired() returns true when the cookie is expired'); + + $cookie = new Cookie('foo', 'bar', 0); + $this->assertFalse($cookie->isExpired()); + } + + /** + * @expectedException \UnexpectedValueException + * @expectedExceptionMessage The cookie expiration time "string" is not valid. + */ + public function testConstructException() + { + $cookie = new Cookie('foo', 'bar', 'string'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/HistoryTest.php b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/HistoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..aa09b05b342683cefeb3d95536acd5b30ea0f7e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/HistoryTest.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\BrowserKit\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\BrowserKit\History; +use Symfony\Component\BrowserKit\Request; + +class HistoryTest extends TestCase +{ + public function testAdd() + { + $history = new History(); + $history->add(new Request('http://www.example1.com/', 'get')); + $this->assertSame('http://www.example1.com/', $history->current()->getUri(), '->add() adds a request to the history'); + + $history->add(new Request('http://www.example2.com/', 'get')); + $this->assertSame('http://www.example2.com/', $history->current()->getUri(), '->add() adds a request to the history'); + + $history->add(new Request('http://www.example3.com/', 'get')); + $history->back(); + $history->add(new Request('http://www.example4.com/', 'get')); + $this->assertSame('http://www.example4.com/', $history->current()->getUri(), '->add() adds a request to the history'); + + $history->back(); + $this->assertSame('http://www.example2.com/', $history->current()->getUri(), '->add() adds a request to the history'); + } + + public function testClearIsEmpty() + { + $history = new History(); + $history->add(new Request('http://www.example.com/', 'get')); + + $this->assertFalse($history->isEmpty(), '->isEmpty() returns false if the history is not empty'); + + $history->clear(); + + $this->assertTrue($history->isEmpty(), '->isEmpty() true if the history is empty'); + } + + public function testCurrent() + { + $history = new History(); + + try { + $history->current(); + $this->fail('->current() throws a \LogicException if the history is empty'); + } catch (\Exception $e) { + $this->assertInstanceOf('LogicException', $e, '->current() throws a \LogicException if the history is empty'); + } + + $history->add(new Request('http://www.example.com/', 'get')); + + $this->assertSame('http://www.example.com/', $history->current()->getUri(), '->current() returns the current request in the history'); + } + + public function testBack() + { + $history = new History(); + $history->add(new Request('http://www.example.com/', 'get')); + + try { + $history->back(); + $this->fail('->back() throws a \LogicException if the history is already on the first page'); + } catch (\Exception $e) { + $this->assertInstanceOf('LogicException', $e, '->current() throws a \LogicException if the history is already on the first page'); + } + + $history->add(new Request('http://www.example1.com/', 'get')); + $history->back(); + + $this->assertSame('http://www.example.com/', $history->current()->getUri(), '->back() returns the previous request in the history'); + } + + public function testForward() + { + $history = new History(); + $history->add(new Request('http://www.example.com/', 'get')); + $history->add(new Request('http://www.example1.com/', 'get')); + + try { + $history->forward(); + $this->fail('->forward() throws a \LogicException if the history is already on the last page'); + } catch (\Exception $e) { + $this->assertInstanceOf('LogicException', $e, '->forward() throws a \LogicException if the history is already on the last page'); + } + + $history->back(); + $history->forward(); + + $this->assertSame('http://www.example1.com/', $history->current()->getUri(), '->forward() returns the next request in the history'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/RequestTest.php b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/RequestTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f163de967437853a866e7f65f89a863a7be1bad0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/RequestTest.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\BrowserKit\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\BrowserKit\Request; + +class RequestTest extends TestCase +{ + public function testGetUri() + { + $request = new Request('http://www.example.com/', 'get'); + $this->assertEquals('http://www.example.com/', $request->getUri(), '->getUri() returns the URI of the request'); + } + + public function testGetMethod() + { + $request = new Request('http://www.example.com/', 'get'); + $this->assertEquals('get', $request->getMethod(), '->getMethod() returns the method of the request'); + } + + public function testGetParameters() + { + $request = new Request('http://www.example.com/', 'get', array('foo' => 'bar')); + $this->assertEquals(array('foo' => 'bar'), $request->getParameters(), '->getParameters() returns the parameters of the request'); + } + + public function testGetFiles() + { + $request = new Request('http://www.example.com/', 'get', array(), array('foo' => 'bar')); + $this->assertEquals(array('foo' => 'bar'), $request->getFiles(), '->getFiles() returns the uploaded files of the request'); + } + + public function testGetCookies() + { + $request = new Request('http://www.example.com/', 'get', array(), array(), array('foo' => 'bar')); + $this->assertEquals(array('foo' => 'bar'), $request->getCookies(), '->getCookies() returns the cookies of the request'); + } + + public function testGetServer() + { + $request = new Request('http://www.example.com/', 'get', array(), array(), array(), array('foo' => 'bar')); + $this->assertEquals(array('foo' => 'bar'), $request->getServer(), '->getServer() returns the server parameters of the request'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0ba4e3b3a71d981855dfde631d573ee75682a63d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\BrowserKit\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\BrowserKit\Response; + +class ResponseTest extends TestCase +{ + public function testGetUri() + { + $response = new Response('foo'); + $this->assertEquals('foo', $response->getContent(), '->getContent() returns the content of the response'); + } + + public function testGetStatus() + { + $response = new Response('foo', 304); + $this->assertEquals('304', $response->getStatus(), '->getStatus() returns the status of the response'); + } + + public function testGetHeaders() + { + $response = new Response('foo', 200, array('foo' => 'bar')); + $this->assertEquals(array('foo' => 'bar'), $response->getHeaders(), '->getHeaders() returns the headers of the response'); + } + + public function testGetHeader() + { + $response = new Response('foo', 200, array( + 'Content-Type' => 'text/html', + 'Set-Cookie' => array('foo=bar', 'bar=foo'), + )); + + $this->assertEquals('text/html', $response->getHeader('Content-Type'), '->getHeader() returns a header of the response'); + $this->assertEquals('text/html', $response->getHeader('content-type'), '->getHeader() returns a header of the response'); + $this->assertEquals('text/html', $response->getHeader('content_type'), '->getHeader() returns a header of the response'); + $this->assertEquals('foo=bar', $response->getHeader('Set-Cookie'), '->getHeader() returns the first header value'); + $this->assertEquals(array('foo=bar', 'bar=foo'), $response->getHeader('Set-Cookie', false), '->getHeader() returns all header values if first is false'); + + $this->assertNull($response->getHeader('foo'), '->getHeader() returns null if the header is not defined'); + $this->assertEquals(array(), $response->getHeader('foo', false), '->getHeader() returns an empty array if the header is not defined and first is set to false'); + } + + public function testMagicToString() + { + $response = new Response('foo', 304, array('foo' => 'bar')); + + $this->assertEquals("foo: bar\n\nfoo", $response->__toString(), '->__toString() returns the headers and the content as a string'); + } + + public function testMagicToStringWithMultipleSetCookieHeader() + { + $headers = array( + 'content-type' => 'text/html; charset=utf-8', + 'set-cookie' => array('foo=bar', 'bar=foo'), + ); + + $expected = 'content-type: text/html; charset=utf-8'."\n"; + $expected .= 'set-cookie: foo=bar'."\n"; + $expected .= 'set-cookie: bar=foo'."\n\n"; + $expected .= 'foo'; + + $response = new Response('foo', 304, $headers); + + $this->assertEquals($expected, $response->__toString(), '->__toString() returns the headers and the content as a string'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/composer.json b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..3ff07e96fc7e2cea2e2fbaf12933ecaffe00d8bd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/composer.json @@ -0,0 +1,41 @@ +{ + "name": "symfony/browser-kit", + "type": "library", + "description": "Symfony BrowserKit Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/dom-crawler": "~2.8|~3.0" + }, + "require-dev": { + "symfony/process": "~2.8|~3.0", + "symfony/css-selector": "~2.8|~3.0" + }, + "suggest": { + "symfony/process": "" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\BrowserKit\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..d76b2b98afd80b1edd715e62f687511e7c899a44 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..4a788963ea74bbdb233da8a7e2bd55e5992f436a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php @@ -0,0 +1,449 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Psr\Cache\CacheItemInterface; +use Psr\Log\LoggerAwareInterface; +use Psr\Log\LoggerAwareTrait; +use Psr\Log\LoggerInterface; +use Symfony\Component\Cache\CacheItem; +use Symfony\Component\Cache\Exception\InvalidArgumentException; + +/** + * @author Nicolas Grekas + */ +abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface +{ + use LoggerAwareTrait; + + private static $apcuSupported; + private static $phpFilesSupported; + + private $namespace; + private $deferred = array(); + private $createCacheItem; + private $mergeByLifetime; + + /** + * @var int|null The maximum length to enforce for identifiers or null when no limit applies + */ + protected $maxIdLength; + + protected function __construct($namespace = '', $defaultLifetime = 0) + { + $this->namespace = '' === $namespace ? '' : $this->getId($namespace).':'; + if (null !== $this->maxIdLength && strlen($namespace) > $this->maxIdLength - 24) { + throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s")', $this->maxIdLength - 24, strlen($namespace), $namespace)); + } + $this->createCacheItem = \Closure::bind( + function ($key, $value, $isHit) use ($defaultLifetime) { + $item = new CacheItem(); + $item->key = $key; + $item->value = $value; + $item->isHit = $isHit; + $item->defaultLifetime = $defaultLifetime; + + return $item; + }, + null, + CacheItem::class + ); + $this->mergeByLifetime = \Closure::bind( + function ($deferred, $namespace, &$expiredIds) { + $byLifetime = array(); + $now = time(); + $expiredIds = array(); + + foreach ($deferred as $key => $item) { + if (null === $item->expiry) { + $byLifetime[0 < $item->defaultLifetime ? $item->defaultLifetime : 0][$namespace.$key] = $item->value; + } elseif ($item->expiry > $now) { + $byLifetime[$item->expiry - $now][$namespace.$key] = $item->value; + } else { + $expiredIds[] = $namespace.$key; + } + } + + return $byLifetime; + }, + null, + CacheItem::class + ); + } + + public static function createSystemCache($namespace, $defaultLifetime, $version, $directory, LoggerInterface $logger = null) + { + if (null === self::$apcuSupported) { + self::$apcuSupported = ApcuAdapter::isSupported(); + } + + if (!self::$apcuSupported && null === self::$phpFilesSupported) { + self::$phpFilesSupported = PhpFilesAdapter::isSupported(); + } + + if (self::$phpFilesSupported) { + $opcache = new PhpFilesAdapter($namespace, $defaultLifetime, $directory); + if (null !== $logger) { + $opcache->setLogger($logger); + } + + return $opcache; + } + + $fs = new FilesystemAdapter($namespace, $defaultLifetime, $directory); + if (null !== $logger) { + $fs->setLogger($logger); + } + if (!self::$apcuSupported) { + return $fs; + } + + $apcu = new ApcuAdapter($namespace, (int) $defaultLifetime / 5, $version); + if (null !== $logger) { + $apcu->setLogger($logger); + } + + return new ChainAdapter(array($apcu, $fs)); + } + + /** + * Fetches several cache items. + * + * @param array $ids The cache identifiers to fetch + * + * @return array|\Traversable The corresponding values found in the cache + */ + abstract protected function doFetch(array $ids); + + /** + * Confirms if the cache contains specified cache item. + * + * @param string $id The identifier for which to check existence + * + * @return bool True if item exists in the cache, false otherwise + */ + abstract protected function doHave($id); + + /** + * Deletes all items in the pool. + * + * @param string The prefix used for all identifiers managed by this pool + * + * @return bool True if the pool was successfully cleared, false otherwise + */ + abstract protected function doClear($namespace); + + /** + * Removes multiple items from the pool. + * + * @param array $ids An array of identifiers that should be removed from the pool + * + * @return bool True if the items were successfully removed, false otherwise + */ + abstract protected function doDelete(array $ids); + + /** + * Persists several cache items immediately. + * + * @param array $values The values to cache, indexed by their cache identifier + * @param int $lifetime The lifetime of the cached values, 0 for persisting until manual cleaning + * + * @return array|bool The identifiers that failed to be cached or a boolean stating if caching succeeded or not + */ + abstract protected function doSave(array $values, $lifetime); + + /** + * {@inheritdoc} + */ + public function getItem($key) + { + if ($this->deferred) { + $this->commit(); + } + $id = $this->getId($key); + + $f = $this->createCacheItem; + $isHit = false; + $value = null; + + try { + foreach ($this->doFetch(array($id)) as $value) { + $isHit = true; + } + } catch (\Exception $e) { + CacheItem::log($this->logger, 'Failed to fetch key "{key}"', array('key' => $key, 'exception' => $e)); + } + + return $f($key, $value, $isHit); + } + + /** + * {@inheritdoc} + */ + public function getItems(array $keys = array()) + { + if ($this->deferred) { + $this->commit(); + } + $ids = array(); + + foreach ($keys as $key) { + $ids[] = $this->getId($key); + } + try { + $items = $this->doFetch($ids); + } catch (\Exception $e) { + CacheItem::log($this->logger, 'Failed to fetch requested items', array('keys' => $keys, 'exception' => $e)); + $items = array(); + } + $ids = array_combine($ids, $keys); + + return $this->generateItems($items, $ids); + } + + /** + * {@inheritdoc} + */ + public function hasItem($key) + { + $id = $this->getId($key); + + if (isset($this->deferred[$key])) { + $this->commit(); + } + + try { + return $this->doHave($id); + } catch (\Exception $e) { + CacheItem::log($this->logger, 'Failed to check if key "{key}" is cached', array('key' => $key, 'exception' => $e)); + + return false; + } + } + + /** + * {@inheritdoc} + */ + public function clear() + { + $this->deferred = array(); + + try { + return $this->doClear($this->namespace); + } catch (\Exception $e) { + CacheItem::log($this->logger, 'Failed to clear the cache', array('exception' => $e)); + + return false; + } + } + + /** + * {@inheritdoc} + */ + public function deleteItem($key) + { + return $this->deleteItems(array($key)); + } + + /** + * {@inheritdoc} + */ + public function deleteItems(array $keys) + { + $ids = array(); + + foreach ($keys as $key) { + $ids[$key] = $this->getId($key); + unset($this->deferred[$key]); + } + + try { + if ($this->doDelete($ids)) { + return true; + } + } catch (\Exception $e) { + } + + $ok = true; + + // When bulk-delete failed, retry each item individually + foreach ($ids as $key => $id) { + try { + $e = null; + if ($this->doDelete(array($id))) { + continue; + } + } catch (\Exception $e) { + } + CacheItem::log($this->logger, 'Failed to delete key "{key}"', array('key' => $key, 'exception' => $e)); + $ok = false; + } + + return $ok; + } + + /** + * {@inheritdoc} + */ + public function save(CacheItemInterface $item) + { + if (!$item instanceof CacheItem) { + return false; + } + $this->deferred[$item->getKey()] = $item; + + return $this->commit(); + } + + /** + * {@inheritdoc} + */ + public function saveDeferred(CacheItemInterface $item) + { + if (!$item instanceof CacheItem) { + return false; + } + $this->deferred[$item->getKey()] = $item; + + return true; + } + + /** + * {@inheritdoc} + */ + public function commit() + { + $ok = true; + $byLifetime = $this->mergeByLifetime; + $byLifetime = $byLifetime($this->deferred, $this->namespace, $expiredIds); + $retry = $this->deferred = array(); + + if ($expiredIds) { + $this->doDelete($expiredIds); + } + foreach ($byLifetime as $lifetime => $values) { + try { + $e = $this->doSave($values, $lifetime); + } catch (\Exception $e) { + } + if (true === $e || array() === $e) { + continue; + } + if (is_array($e) || 1 === count($values)) { + foreach (is_array($e) ? $e : array_keys($values) as $id) { + $ok = false; + $v = $values[$id]; + $type = is_object($v) ? get_class($v) : gettype($v); + CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', array('key' => substr($id, strlen($this->namespace)), 'type' => $type, 'exception' => $e instanceof \Exception ? $e : null)); + } + } else { + foreach ($values as $id => $v) { + $retry[$lifetime][] = $id; + } + } + } + + // When bulk-save failed, retry each item individually + foreach ($retry as $lifetime => $ids) { + foreach ($ids as $id) { + try { + $v = $byLifetime[$lifetime][$id]; + $e = $this->doSave(array($id => $v), $lifetime); + } catch (\Exception $e) { + } + if (true === $e || array() === $e) { + continue; + } + $ok = false; + $type = is_object($v) ? get_class($v) : gettype($v); + CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', array('key' => substr($id, strlen($this->namespace)), 'type' => $type, 'exception' => $e instanceof \Exception ? $e : null)); + } + } + + return $ok; + } + + public function __destruct() + { + if ($this->deferred) { + $this->commit(); + } + } + + /** + * Like the native unserialize() function but throws an exception if anything goes wrong. + * + * @param string $value + * + * @return mixed + * + * @throws \Exception + */ + protected static function unserialize($value) + { + if ('b:0;' === $value) { + return false; + } + $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); + try { + if (false !== $value = unserialize($value)) { + return $value; + } + throw new \DomainException('Failed to unserialize cached value'); + } catch (\Error $e) { + throw new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine()); + } finally { + ini_set('unserialize_callback_func', $unserializeCallbackHandler); + } + } + + private function getId($key) + { + CacheItem::validateKey($key); + + if (null === $this->maxIdLength) { + return $this->namespace.$key; + } + if (strlen($id = $this->namespace.$key) > $this->maxIdLength) { + $id = $this->namespace.substr_replace(base64_encode(hash('sha256', $key, true)), ':', -22); + } + + return $id; + } + + private function generateItems($items, &$keys) + { + $f = $this->createCacheItem; + + try { + foreach ($items as $id => $value) { + $key = $keys[$id]; + unset($keys[$id]); + yield $key => $f($key, $value, true); + } + } catch (\Exception $e) { + CacheItem::log($this->logger, 'Failed to fetch requested items', array('keys' => array_values($keys), 'exception' => $e)); + } + + foreach ($keys as $key) { + yield $key => $f($key, null, false); + } + } + + /** + * @internal + */ + public static function handleUnserializeCallback($class) + { + throw new \DomainException('Class not found: '.$class); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AdapterInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AdapterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..274ebec1ef4457fb3589639824a529ba31c498d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/AdapterInterface.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Psr\Cache\CacheItemPoolInterface; +use Symfony\Component\Cache\CacheItem; + +/** + * Interface for adapters managing instances of Symfony's CacheItem. + * + * @author Kévin Dunglas + */ +interface AdapterInterface extends CacheItemPoolInterface +{ + /** + * {@inheritdoc} + * + * @return CacheItem + */ + public function getItem($key); + + /** + * {@inheritdoc} + * + * return \Traversable|CacheItem[] + */ + public function getItems(array $keys = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..0a3887eba091f5810a28f0e58614d6c8c84eb689 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Symfony\Component\Cache\CacheItem; +use Symfony\Component\Cache\Exception\CacheException; + +/** + * @author Nicolas Grekas + */ +class ApcuAdapter extends AbstractAdapter +{ + public static function isSupported() + { + return function_exists('apcu_fetch') && ini_get('apc.enabled') && !('cli' === PHP_SAPI && !ini_get('apc.enable_cli')); + } + + public function __construct($namespace = '', $defaultLifetime = 0, $version = null) + { + if (!static::isSupported()) { + throw new CacheException('APCu is not enabled'); + } + if ('cli' === PHP_SAPI) { + ini_set('apc.use_request_time', 0); + } + parent::__construct($namespace, $defaultLifetime); + + if (null !== $version) { + CacheItem::validateKey($version); + + if (!apcu_exists($version.'@'.$namespace)) { + $this->doClear($namespace); + apcu_add($version.'@'.$namespace, null); + } + } + } + + /** + * {@inheritdoc} + */ + protected function doFetch(array $ids) + { + try { + return apcu_fetch($ids); + } catch (\Error $e) { + throw new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine()); + } + } + + /** + * {@inheritdoc} + */ + protected function doHave($id) + { + return apcu_exists($id); + } + + /** + * {@inheritdoc} + */ + protected function doClear($namespace) + { + return isset($namespace[0]) && class_exists('APCuIterator', false) + ? apcu_delete(new \APCuIterator(sprintf('/^%s/', preg_quote($namespace, '/')), APC_ITER_KEY)) + : apcu_clear_cache(); + } + + /** + * {@inheritdoc} + */ + protected function doDelete(array $ids) + { + foreach ($ids as $id) { + apcu_delete($id); + } + + return true; + } + + /** + * {@inheritdoc} + */ + protected function doSave(array $values, $lifetime) + { + try { + return array_keys(apcu_store($values, null, $lifetime)); + } catch (\Error $e) { + } catch (\Exception $e) { + } + + if (1 === count($values)) { + // Workaround https://github.com/krakjoe/apcu/issues/170 + apcu_delete(key($values)); + } + + throw $e; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..2898ba50cdc9a61300acfab3de220ebf814ba770 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php @@ -0,0 +1,230 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Psr\Cache\CacheItemInterface; +use Psr\Log\LoggerAwareInterface; +use Psr\Log\LoggerAwareTrait; +use Symfony\Component\Cache\CacheItem; + +/** + * @author Nicolas Grekas + */ +class ArrayAdapter implements AdapterInterface, LoggerAwareInterface +{ + use LoggerAwareTrait; + + private $storeSerialized; + private $values = array(); + private $expiries = array(); + private $createCacheItem; + + /** + * @param int $defaultLifetime + * @param bool $storeSerialized Disabling serialization can lead to cache corruptions when storing mutable values but increases performance otherwise + */ + public function __construct($defaultLifetime = 0, $storeSerialized = true) + { + $this->storeSerialized = $storeSerialized; + $this->createCacheItem = \Closure::bind( + function ($key, $value, $isHit) use ($defaultLifetime) { + $item = new CacheItem(); + $item->key = $key; + $item->value = $value; + $item->isHit = $isHit; + $item->defaultLifetime = $defaultLifetime; + + return $item; + }, + null, + CacheItem::class + ); + } + + /** + * {@inheritdoc} + */ + public function getItem($key) + { + $isHit = $this->hasItem($key); + try { + if (!$isHit) { + $this->values[$key] = $value = null; + } elseif (!$this->storeSerialized) { + $value = $this->values[$key]; + } elseif ('b:0;' === $value = $this->values[$key]) { + $value = false; + } elseif (false === $value = unserialize($value)) { + $this->values[$key] = $value = null; + $isHit = false; + } + } catch (\Exception $e) { + CacheItem::log($this->logger, 'Failed to unserialize key "{key}"', array('key' => $key, 'exception' => $e)); + $this->values[$key] = $value = null; + $isHit = false; + } + $f = $this->createCacheItem; + + return $f($key, $value, $isHit); + } + + /** + * {@inheritdoc} + */ + public function getItems(array $keys = array()) + { + foreach ($keys as $key) { + CacheItem::validateKey($key); + } + + return $this->generateItems($keys, time()); + } + + /** + * Returns all cached values, with cache miss as null. + * + * @return array + */ + public function getValues() + { + return $this->values; + } + + /** + * {@inheritdoc} + */ + public function hasItem($key) + { + CacheItem::validateKey($key); + + return isset($this->expiries[$key]) && ($this->expiries[$key] >= time() || !$this->deleteItem($key)); + } + + /** + * {@inheritdoc} + */ + public function clear() + { + $this->values = $this->expiries = array(); + + return true; + } + + /** + * {@inheritdoc} + */ + public function deleteItem($key) + { + CacheItem::validateKey($key); + + unset($this->values[$key], $this->expiries[$key]); + + return true; + } + + /** + * {@inheritdoc} + */ + public function deleteItems(array $keys) + { + foreach ($keys as $key) { + $this->deleteItem($key); + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function save(CacheItemInterface $item) + { + if (!$item instanceof CacheItem) { + return false; + } + $item = (array) $item; + $key = $item["\0*\0key"]; + $value = $item["\0*\0value"]; + $expiry = $item["\0*\0expiry"]; + + if (null !== $expiry && $expiry <= time()) { + $this->deleteItem($key); + + return true; + } + if ($this->storeSerialized) { + try { + $value = serialize($value); + } catch (\Exception $e) { + $type = is_object($value) ? get_class($value) : gettype($value); + CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', array('key' => $key, 'type' => $type, 'exception' => $e)); + + return false; + } + } + if (null === $expiry && 0 < $item["\0*\0defaultLifetime"]) { + $expiry = time() + $item["\0*\0defaultLifetime"]; + } + + $this->values[$key] = $value; + $this->expiries[$key] = null !== $expiry ? $expiry : PHP_INT_MAX; + + return true; + } + + /** + * {@inheritdoc} + */ + public function saveDeferred(CacheItemInterface $item) + { + return $this->save($item); + } + + /** + * {@inheritdoc} + */ + public function commit() + { + return true; + } + + private function generateItems(array $keys, $now) + { + $f = $this->createCacheItem; + + foreach ($keys as $i => $key) { + try { + if (!$isHit = isset($this->expiries[$key]) && ($this->expiries[$key] >= $now || !$this->deleteItem($key))) { + $this->values[$key] = $value = null; + } elseif (!$this->storeSerialized) { + $value = $this->values[$key]; + } elseif ('b:0;' === $value = $this->values[$key]) { + $value = false; + } elseif (false === $value = unserialize($value)) { + $this->values[$key] = $value = null; + $isHit = false; + } + } catch (\Exception $e) { + CacheItem::log($this->logger, 'Failed to unserialize key "{key}"', array('key' => $key, 'exception' => $e)); + $this->values[$key] = $value = null; + $isHit = false; + } + unset($keys[$i]); + + yield $key => $f($key, $value, $isHit); + } + + foreach ($keys as $key) { + yield $key => $f($key, null, false); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ChainAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ChainAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..75124721506312efd2e4e05d01c89e8366575d26 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ChainAdapter.php @@ -0,0 +1,234 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Psr\Cache\CacheItemInterface; +use Psr\Cache\CacheItemPoolInterface; +use Symfony\Component\Cache\CacheItem; +use Symfony\Component\Cache\Exception\InvalidArgumentException; + +/** + * Chains several adapters together. + * + * Cached items are fetched from the first adapter having them in its data store. + * They are saved and deleted in all adapters at once. + * + * @author Kévin Dunglas + */ +class ChainAdapter implements AdapterInterface +{ + private $adapters = array(); + private $adapterCount; + private $saveUp; + + /** + * @param CacheItemPoolInterface[] $adapters The ordered list of adapters used to fetch cached items + * @param int $maxLifetime The max lifetime of items propagated from lower adapters to upper ones + */ + public function __construct(array $adapters, $maxLifetime = 0) + { + if (!$adapters) { + throw new InvalidArgumentException('At least one adapter must be specified.'); + } + + foreach ($adapters as $adapter) { + if (!$adapter instanceof CacheItemPoolInterface) { + throw new InvalidArgumentException(sprintf('The class "%s" does not implement the "%s" interface.', get_class($adapter), CacheItemPoolInterface::class)); + } + + if ($adapter instanceof AdapterInterface) { + $this->adapters[] = $adapter; + } else { + $this->adapters[] = new ProxyAdapter($adapter); + } + } + $this->adapterCount = count($this->adapters); + + $this->saveUp = \Closure::bind( + function ($adapter, $item) use ($maxLifetime) { + $origDefaultLifetime = $item->defaultLifetime; + + if (0 < $maxLifetime && ($origDefaultLifetime <= 0 || $maxLifetime < $origDefaultLifetime)) { + $item->defaultLifetime = $maxLifetime; + } + + $adapter->save($item); + $item->defaultLifetime = $origDefaultLifetime; + }, + null, + CacheItem::class + ); + } + + /** + * {@inheritdoc} + */ + public function getItem($key) + { + $saveUp = $this->saveUp; + + foreach ($this->adapters as $i => $adapter) { + $item = $adapter->getItem($key); + + if ($item->isHit()) { + while (0 <= --$i) { + $saveUp($this->adapters[$i], $item); + } + + return $item; + } + } + + return $item; + } + + /** + * {@inheritdoc} + */ + public function getItems(array $keys = array()) + { + return $this->generateItems($this->adapters[0]->getItems($keys), 0); + } + + private function generateItems($items, $adapterIndex) + { + $missing = array(); + $nextAdapterIndex = $adapterIndex + 1; + $nextAdapter = isset($this->adapters[$nextAdapterIndex]) ? $this->adapters[$nextAdapterIndex] : null; + + foreach ($items as $k => $item) { + if (!$nextAdapter || $item->isHit()) { + yield $k => $item; + } else { + $missing[] = $k; + } + } + + if ($missing) { + $saveUp = $this->saveUp; + $adapter = $this->adapters[$adapterIndex]; + $items = $this->generateItems($nextAdapter->getItems($missing), $nextAdapterIndex); + + foreach ($items as $k => $item) { + if ($item->isHit()) { + $saveUp($adapter, $item); + } + + yield $k => $item; + } + } + } + + /** + * {@inheritdoc} + */ + public function hasItem($key) + { + foreach ($this->adapters as $adapter) { + if ($adapter->hasItem($key)) { + return true; + } + } + + return false; + } + + /** + * {@inheritdoc} + */ + public function clear() + { + $cleared = true; + $i = $this->adapterCount; + + while ($i--) { + $cleared = $this->adapters[$i]->clear() && $cleared; + } + + return $cleared; + } + + /** + * {@inheritdoc} + */ + public function deleteItem($key) + { + $deleted = true; + $i = $this->adapterCount; + + while ($i--) { + $deleted = $this->adapters[$i]->deleteItem($key) && $deleted; + } + + return $deleted; + } + + /** + * {@inheritdoc} + */ + public function deleteItems(array $keys) + { + $deleted = true; + $i = $this->adapterCount; + + while ($i--) { + $deleted = $this->adapters[$i]->deleteItems($keys) && $deleted; + } + + return $deleted; + } + + /** + * {@inheritdoc} + */ + public function save(CacheItemInterface $item) + { + $saved = true; + $i = $this->adapterCount; + + while ($i--) { + $saved = $this->adapters[$i]->save($item) && $saved; + } + + return $saved; + } + + /** + * {@inheritdoc} + */ + public function saveDeferred(CacheItemInterface $item) + { + $saved = true; + $i = $this->adapterCount; + + while ($i--) { + $saved = $this->adapters[$i]->saveDeferred($item) && $saved; + } + + return $saved; + } + + /** + * {@inheritdoc} + */ + public function commit() + { + $committed = true; + $i = $this->adapterCount; + + while ($i--) { + $committed = $this->adapters[$i]->commit() && $committed; + } + + return $committed; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..ed91bf56cd0e54bd36ce749eb9734756cd88fe26 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/DoctrineAdapter.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\Component\Cache\Adapter; + +use Doctrine\Common\Cache\CacheProvider; + +/** + * @author Nicolas Grekas + */ +class DoctrineAdapter extends AbstractAdapter +{ + private $provider; + + public function __construct(CacheProvider $provider, $namespace = '', $defaultLifetime = 0) + { + parent::__construct('', $defaultLifetime); + $this->provider = $provider; + $provider->setNamespace($namespace); + } + + /** + * {@inheritdoc} + */ + protected function doFetch(array $ids) + { + $unserializeCallbackHandler = ini_set('unserialize_callback_func', parent::class.'::handleUnserializeCallback'); + try { + return $this->provider->fetchMultiple($ids); + } catch (\Error $e) { + $trace = $e->getTrace(); + + if (isset($trace[0]['function']) && !isset($trace[0]['class'])) { + switch ($trace[0]['function']) { + case 'unserialize': + case 'apcu_fetch': + case 'apc_fetch': + throw new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine()); + } + } + + throw $e; + } finally { + ini_set('unserialize_callback_func', $unserializeCallbackHandler); + } + } + + /** + * {@inheritdoc} + */ + protected function doHave($id) + { + return $this->provider->contains($id); + } + + /** + * {@inheritdoc} + */ + protected function doClear($namespace) + { + $namespace = $this->provider->getNamespace(); + + return isset($namespace[0]) + ? $this->provider->deleteAll() + : $this->provider->flushAll(); + } + + /** + * {@inheritdoc} + */ + protected function doDelete(array $ids) + { + $ok = true; + foreach ($ids as $id) { + $ok = $this->provider->delete($id) && $ok; + } + + return $ok; + } + + /** + * {@inheritdoc} + */ + protected function doSave(array $values, $lifetime) + { + return $this->provider->saveMultiple($values, $lifetime); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..1c62641cf6d67b362495626dc65807bfad41c3ea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapter.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Symfony\Component\Cache\Exception\CacheException; + +/** + * @author Nicolas Grekas + */ +class FilesystemAdapter extends AbstractAdapter +{ + use FilesystemAdapterTrait; + + public function __construct($namespace = '', $defaultLifetime = 0, $directory = null) + { + parent::__construct('', $defaultLifetime); + $this->init($namespace, $directory); + } + + /** + * {@inheritdoc} + */ + protected function doFetch(array $ids) + { + $values = array(); + $now = time(); + + foreach ($ids as $id) { + $file = $this->getFile($id); + if (!file_exists($file) || !$h = @fopen($file, 'rb')) { + continue; + } + if ($now >= (int) $expiresAt = fgets($h)) { + fclose($h); + if (isset($expiresAt[0])) { + @unlink($file); + } + } else { + $i = rawurldecode(rtrim(fgets($h))); + $value = stream_get_contents($h); + fclose($h); + if ($i === $id) { + $values[$id] = parent::unserialize($value); + } + } + } + + return $values; + } + + /** + * {@inheritdoc} + */ + protected function doHave($id) + { + $file = $this->getFile($id); + + return file_exists($file) && (@filemtime($file) > time() || $this->doFetch(array($id))); + } + + /** + * {@inheritdoc} + */ + protected function doSave(array $values, $lifetime) + { + $ok = true; + $expiresAt = time() + ($lifetime ?: 31557600); // 31557600s = 1 year + + foreach ($values as $id => $value) { + $ok = $this->write($this->getFile($id, true), $expiresAt."\n".rawurlencode($id)."\n".serialize($value), $expiresAt) && $ok; + } + + if (!$ok && !is_writable($this->directory)) { + throw new CacheException(sprintf('Cache directory is not writable (%s)', $this->directory)); + } + + return $ok; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapterTrait.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapterTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..156fc5c1fb63a13fcdbcb83cfb3adeb6a9382126 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapterTrait.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Symfony\Component\Cache\Exception\InvalidArgumentException; + +/** + * @author Nicolas Grekas + * + * @internal + */ +trait FilesystemAdapterTrait +{ + private $directory; + private $tmp; + + private function init($namespace, $directory) + { + if (!isset($directory[0])) { + $directory = sys_get_temp_dir().'/symfony-cache'; + } + if (isset($namespace[0])) { + if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) { + throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); + } + $directory .= '/'.$namespace; + } + if (!file_exists($dir = $directory.'/.')) { + @mkdir($directory, 0777, true); + } + if (false === $dir = realpath($dir) ?: (file_exists($dir) ? $dir : false)) { + throw new InvalidArgumentException(sprintf('Cache directory does not exist (%s)', $directory)); + } + $dir .= DIRECTORY_SEPARATOR; + // On Windows the whole path is limited to 258 chars + if ('\\' === DIRECTORY_SEPARATOR && strlen($dir) > 234) { + throw new InvalidArgumentException(sprintf('Cache directory too long (%s)', $directory)); + } + + $this->directory = $dir; + $this->tmp = $this->directory.uniqid('', true); + } + + /** + * {@inheritdoc} + */ + protected function doClear($namespace) + { + $ok = true; + + foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->directory, \FilesystemIterator::SKIP_DOTS)) as $file) { + $ok = ($file->isDir() || @unlink($file) || !file_exists($file)) && $ok; + } + + return $ok; + } + + /** + * {@inheritdoc} + */ + protected function doDelete(array $ids) + { + $ok = true; + + foreach ($ids as $id) { + $file = $this->getFile($id); + $ok = (!file_exists($file) || @unlink($file) || !file_exists($file)) && $ok; + } + + return $ok; + } + + private function write($file, $data, $expiresAt = null) + { + if (false === @file_put_contents($this->tmp, $data)) { + return false; + } + if (null !== $expiresAt) { + @touch($this->tmp, $expiresAt); + } + + if (@rename($this->tmp, $file)) { + return true; + } + @unlink($this->tmp); + + return false; + } + + private function getFile($id, $mkdir = false) + { + $hash = str_replace('/', '-', base64_encode(hash('sha256', static::class.$id, true))); + $dir = $this->directory.strtoupper($hash[0].DIRECTORY_SEPARATOR.$hash[1].DIRECTORY_SEPARATOR); + + if ($mkdir && !file_exists($dir)) { + @mkdir($dir, 0777, true); + } + + return $dir.substr($hash, 2, 20); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/NullAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/NullAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..f58f81e5b8960764a77fbc4be7de3ed6297fb4f8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/NullAdapter.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Psr\Cache\CacheItemInterface; +use Symfony\Component\Cache\CacheItem; + +/** + * @author Titouan Galopin + */ +class NullAdapter implements AdapterInterface +{ + private $createCacheItem; + + public function __construct() + { + $this->createCacheItem = \Closure::bind( + function ($key) { + $item = new CacheItem(); + $item->key = $key; + $item->isHit = false; + + return $item; + }, + $this, + CacheItem::class + ); + } + + /** + * {@inheritdoc} + */ + public function getItem($key) + { + $f = $this->createCacheItem; + + return $f($key); + } + + /** + * {@inheritdoc} + */ + public function getItems(array $keys = array()) + { + return $this->generateItems($keys); + } + + /** + * {@inheritdoc} + */ + public function hasItem($key) + { + return false; + } + + /** + * {@inheritdoc} + */ + public function clear() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function deleteItem($key) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function deleteItems(array $keys) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function save(CacheItemInterface $item) + { + return false; + } + + /** + * {@inheritdoc} + */ + public function saveDeferred(CacheItemInterface $item) + { + return false; + } + + /** + * {@inheritdoc} + */ + public function commit() + { + return false; + } + + private function generateItems(array $keys) + { + $f = $this->createCacheItem; + + foreach ($keys as $key) { + yield $key => $f($key); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PdoAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PdoAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..3fa3a40533d9e41e033d6c68dccc7f542a76468c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PdoAdapter.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\Cache\Adapter; + +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Driver\ServerInfoAwareConnection; +use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Schema\Schema; +use Symfony\Component\Cache\Exception\InvalidArgumentException; + +class PdoAdapter extends AbstractAdapter +{ + protected $maxIdLength = 255; + + private $conn; + private $dsn; + private $driver; + private $serverVersion; + private $table = 'cache_items'; + private $idCol = 'item_id'; + private $dataCol = 'item_data'; + private $lifetimeCol = 'item_lifetime'; + private $timeCol = 'item_time'; + private $username = ''; + private $password = ''; + private $connectionOptions = array(); + + /** + * Constructor. + * + * You can either pass an existing database connection as PDO instance or + * a Doctrine DBAL Connection or a DSN string that will be used to + * lazy-connect to the database when the cache is actually used. + * + * List of available options: + * * db_table: The name of the table [default: cache_items] + * * db_id_col: The column where to store the cache id [default: item_id] + * * db_data_col: The column where to store the cache data [default: item_data] + * * db_lifetime_col: The column where to store the lifetime [default: item_lifetime] + * * db_time_col: The column where to store the timestamp [default: item_time] + * * db_username: The username when lazy-connect [default: ''] + * * db_password: The password when lazy-connect [default: ''] + * * db_connection_options: An array of driver-specific connection options [default: array()] + * + * @param \PDO|Connection|string $connOrDsn A \PDO or Connection instance or DSN string or null + * @param string $namespace + * @param int $defaultLifetime + * @param array $options An associative array of options + * + * @throws InvalidArgumentException When first argument is not PDO nor Connection nor string + * @throws InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION + * @throws InvalidArgumentException When namespace contains invalid characters + */ + public function __construct($connOrDsn, $namespace = '', $defaultLifetime = 0, array $options = array()) + { + if (isset($namespace[0]) && preg_match('#[^-+.A-Za-z0-9]#', $namespace, $match)) { + throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0])); + } + + if ($connOrDsn instanceof \PDO) { + if (\PDO::ERRMODE_EXCEPTION !== $connOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) { + throw new InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION))', __CLASS__)); + } + + $this->conn = $connOrDsn; + } elseif ($connOrDsn instanceof Connection) { + $this->conn = $connOrDsn; + } elseif (is_string($connOrDsn)) { + $this->dsn = $connOrDsn; + } else { + throw new InvalidArgumentException(sprintf('"%s" requires PDO or Doctrine\DBAL\Connection instance or DSN string as first argument, "%s" given.', __CLASS__, is_object($connOrDsn) ? get_class($connOrDsn) : gettype($connOrDsn))); + } + + $this->table = isset($options['db_table']) ? $options['db_table'] : $this->table; + $this->idCol = isset($options['db_id_col']) ? $options['db_id_col'] : $this->idCol; + $this->dataCol = isset($options['db_data_col']) ? $options['db_data_col'] : $this->dataCol; + $this->lifetimeCol = isset($options['db_lifetime_col']) ? $options['db_lifetime_col'] : $this->lifetimeCol; + $this->timeCol = isset($options['db_time_col']) ? $options['db_time_col'] : $this->timeCol; + $this->username = isset($options['db_username']) ? $options['db_username'] : $this->username; + $this->password = isset($options['db_password']) ? $options['db_password'] : $this->password; + $this->connectionOptions = isset($options['db_connection_options']) ? $options['db_connection_options'] : $this->connectionOptions; + + parent::__construct($namespace, $defaultLifetime); + } + + /** + * Creates the table to store cache items which can be called once for setup. + * + * Cache ID are saved in a column of maximum length 255. Cache data is + * saved in a BLOB. + * + * @throws \PDOException When the table already exists + * @throws DBALException When the table already exists + * @throws \DomainException When an unsupported PDO driver is used + */ + public function createTable() + { + // connect if we are not yet + $conn = $this->getConnection(); + + if ($conn instanceof Connection) { + $types = array( + 'mysql' => 'binary', + 'sqlite' => 'text', + 'pgsql' => 'string', + 'oci' => 'string', + 'sqlsrv' => 'string', + ); + if (!isset($types[$this->driver])) { + throw new \DomainException(sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $this->driver)); + } + + $schema = new Schema(); + $table = $schema->createTable($this->table); + $table->addColumn($this->idCol, $types[$this->driver], array('length' => 255)); + $table->addColumn($this->dataCol, 'blob', array('length' => 16777215)); + $table->addColumn($this->lifetimeCol, 'integer', array('unsigned' => true, 'notnull' => false)); + $table->addColumn($this->timeCol, 'integer', array('unsigned' => true, 'foo' => 'bar')); + $table->setPrimaryKey(array($this->idCol)); + + foreach ($schema->toSql($conn->getDatabasePlatform()) as $sql) { + $conn->exec($sql); + } + + return; + } + + switch ($this->driver) { + case 'mysql': + // We use varbinary for the ID column because it prevents unwanted conversions: + // - character set conversions between server and client + // - trailing space removal + // - case-insensitivity + // - language processing like é == e + $sql = "CREATE TABLE $this->table ($this->idCol VARBINARY(255) NOT NULL PRIMARY KEY, $this->dataCol MEDIUMBLOB NOT NULL, $this->lifetimeCol INTEGER UNSIGNED, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8_bin, ENGINE = InnoDB"; + break; + case 'sqlite': + $sql = "CREATE TABLE $this->table ($this->idCol TEXT NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)"; + break; + case 'pgsql': + $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(255) NOT NULL PRIMARY KEY, $this->dataCol BYTEA NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)"; + break; + case 'oci': + $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR2(255) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)"; + break; + case 'sqlsrv': + $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(255) NOT NULL PRIMARY KEY, $this->dataCol VARBINARY(MAX) NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)"; + break; + default: + throw new \DomainException(sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $this->driver)); + } + + $conn->exec($sql); + } + + /** + * {@inheritdoc} + */ + protected function doFetch(array $ids) + { + $now = time(); + $expired = array(); + + $sql = str_pad('', (count($ids) << 1) - 1, '?,'); + $sql = "SELECT $this->idCol, CASE WHEN $this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ? THEN $this->dataCol ELSE NULL END FROM $this->table WHERE $this->idCol IN ($sql)"; + $stmt = $this->getConnection()->prepare($sql); + $stmt->bindValue($i = 1, $now, \PDO::PARAM_INT); + foreach ($ids as $id) { + $stmt->bindValue(++$i, $id); + } + $stmt->execute(); + + while ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + if (null === $row[1]) { + $expired[] = $row[0]; + } else { + yield $row[0] => parent::unserialize(is_resource($row[1]) ? stream_get_contents($row[1]) : $row[1]); + } + } + + if ($expired) { + $sql = str_pad('', (count($expired) << 1) - 1, '?,'); + $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= ? AND $this->idCol IN ($sql)"; + $stmt = $this->getConnection()->prepare($sql); + $stmt->bindValue($i = 1, $now, \PDO::PARAM_INT); + foreach ($expired as $id) { + $stmt->bindValue(++$i, $id); + } + $stmt->execute($expired); + } + } + + /** + * {@inheritdoc} + */ + protected function doHave($id) + { + $sql = "SELECT 1 FROM $this->table WHERE $this->idCol = :id AND ($this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > :time)"; + $stmt = $this->getConnection()->prepare($sql); + + $stmt->bindValue(':id', $id); + $stmt->bindValue(':time', time(), \PDO::PARAM_INT); + $stmt->execute(); + + return (bool) $stmt->fetchColumn(); + } + + /** + * {@inheritdoc} + */ + protected function doClear($namespace) + { + $conn = $this->getConnection(); + + if ('' === $namespace) { + if ('sqlite' === $this->driver) { + $sql = "DELETE FROM $this->table"; + } else { + $sql = "TRUNCATE TABLE $this->table"; + } + } else { + $sql = "DELETE FROM $this->table WHERE $this->idCol LIKE '$namespace%'"; + } + + $conn->exec($sql); + + return true; + } + + /** + * {@inheritdoc} + */ + protected function doDelete(array $ids) + { + $sql = str_pad('', (count($ids) << 1) - 1, '?,'); + $sql = "DELETE FROM $this->table WHERE $this->idCol IN ($sql)"; + $stmt = $this->getConnection()->prepare($sql); + $stmt->execute(array_values($ids)); + + return true; + } + + /** + * {@inheritdoc} + */ + protected function doSave(array $values, $lifetime) + { + $serialized = array(); + $failed = array(); + + foreach ($values as $id => $value) { + try { + $serialized[$id] = serialize($value); + } catch (\Exception $e) { + $failed[] = $id; + } + } + + if (!$serialized) { + return $failed; + } + + $conn = $this->getConnection(); + $driver = $this->driver; + $insertSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)"; + + switch (true) { + case 'mysql' === $driver: + $sql = $insertSql." ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)"; + break; + case 'oci' === $driver: + // DUAL is Oracle specific dummy table + $sql = "MERGE INTO $this->table USING DUAL ON ($this->idCol = ?) ". + "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". + "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?"; + break; + case 'sqlsrv' === $driver && version_compare($this->getServerVersion(), '10', '>='): + // MERGE is only available since SQL Server 2008 and must be terminated by semicolon + // It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx + $sql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ". + "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". + "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;"; + break; + case 'sqlite' === $driver: + $sql = 'INSERT OR REPLACE'.substr($insertSql, 6); + break; + case 'pgsql' === $driver && version_compare($this->getServerVersion(), '9.5', '>='): + $sql = $insertSql." ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; + break; + default: + $driver = null; + $sql = "UPDATE $this->table SET $this->dataCol = :data, $this->lifetimeCol = :lifetime, $this->timeCol = :time WHERE $this->idCol = :id"; + break; + } + + $now = time(); + $lifetime = $lifetime ?: null; + $stmt = $conn->prepare($sql); + + if ('sqlsrv' === $driver || 'oci' === $driver) { + $stmt->bindParam(1, $id); + $stmt->bindParam(2, $id); + $stmt->bindParam(3, $data, \PDO::PARAM_LOB); + $stmt->bindValue(4, $lifetime, \PDO::PARAM_INT); + $stmt->bindValue(5, $now, \PDO::PARAM_INT); + $stmt->bindParam(6, $data, \PDO::PARAM_LOB); + $stmt->bindValue(7, $lifetime, \PDO::PARAM_INT); + $stmt->bindValue(8, $now, \PDO::PARAM_INT); + } else { + $stmt->bindParam(':id', $id); + $stmt->bindParam(':data', $data, \PDO::PARAM_LOB); + $stmt->bindValue(':lifetime', $lifetime, \PDO::PARAM_INT); + $stmt->bindValue(':time', $now, \PDO::PARAM_INT); + } + if (null === $driver) { + $insertStmt = $conn->prepare($insertSql); + + $insertStmt->bindParam(':id', $id); + $insertStmt->bindParam(':data', $data, \PDO::PARAM_LOB); + $insertStmt->bindValue(':lifetime', $lifetime, \PDO::PARAM_INT); + $insertStmt->bindValue(':time', $now, \PDO::PARAM_INT); + } + + foreach ($serialized as $id => $data) { + $stmt->execute(); + + if (null === $driver && !$stmt->rowCount()) { + try { + $insertStmt->execute(); + } catch (DBALException $e) { + } catch (\PDOException $e) { + // A concurrent write won, let it be + } + } + } + + return $failed; + } + + /** + * @return \PDO|Connection + */ + private function getConnection() + { + if (null === $this->conn) { + $this->conn = new \PDO($this->dsn, $this->username, $this->password, $this->connectionOptions); + $this->conn->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); + } + if (null === $this->driver) { + if ($this->conn instanceof \PDO) { + $this->driver = $this->conn->getAttribute(\PDO::ATTR_DRIVER_NAME); + } else { + switch ($this->driver = $this->conn->getDriver()->getName()) { + case 'mysqli': + case 'pdo_mysql': + case 'drizzle_pdo_mysql': + $this->driver = 'mysql'; + break; + case 'pdo_sqlite': + $this->driver = 'sqlite'; + break; + case 'pdo_pgsql': + $this->driver = 'pgsql'; + break; + case 'oci8': + case 'pdo_oracle': + $this->driver = 'oci'; + break; + case 'pdo_sqlsrv': + $this->driver = 'sqlsrv'; + break; + } + } + } + + return $this->conn; + } + + /** + * @return string + */ + private function getServerVersion() + { + if (null === $this->serverVersion) { + $conn = $this->conn instanceof \PDO ? $this->conn : $this->conn->getWrappedConnection(); + if ($conn instanceof \PDO) { + $this->serverVersion = $conn->getAttribute(\PDO::ATTR_SERVER_VERSION); + } elseif ($conn instanceof ServerInfoAwareConnection) { + $this->serverVersion = $conn->getServerVersion(); + } else { + $this->serverVersion = '0'; + } + } + + return $this->serverVersion; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..4b1552e1d16c9d0feafbabe498a65a14247de6f8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.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\Cache\Adapter; + +use Psr\Cache\CacheItemInterface; +use Psr\Cache\CacheItemPoolInterface; +use Symfony\Component\Cache\CacheItem; +use Symfony\Component\Cache\Exception\InvalidArgumentException; + +/** + * Caches items at warm up time using a PHP array that is stored in shared memory by OPCache since PHP 7.0. + * Warmed up items are read-only and run-time discovered items are cached using a fallback adapter. + * + * @author Titouan Galopin + * @author Nicolas Grekas + */ +class PhpArrayAdapter implements AdapterInterface +{ + private $file; + private $values; + private $createCacheItem; + private $fallbackPool; + + /** + * @param string $file The PHP file were values are cached + * @param AdapterInterface $fallbackPool A pool to fallback on when an item is not hit + */ + public function __construct($file, AdapterInterface $fallbackPool) + { + $this->file = $file; + $this->fallbackPool = $fallbackPool; + $this->createCacheItem = \Closure::bind( + function ($key, $value, $isHit) { + $item = new CacheItem(); + $item->key = $key; + $item->value = $value; + $item->isHit = $isHit; + + return $item; + }, + null, + CacheItem::class + ); + } + + /** + * This adapter should only be used on PHP 7.0+ to take advantage of how PHP + * stores arrays in its latest versions. This factory method decorates the given + * fallback pool with this adapter only if the current PHP version is supported. + * + * @param string $file The PHP file were values are cached + * + * @return CacheItemPoolInterface + */ + public static function create($file, CacheItemPoolInterface $fallbackPool) + { + // Shared memory is available in PHP 7.0+ with OPCache enabled and in HHVM + if ((PHP_VERSION_ID >= 70000 && ini_get('opcache.enable')) || defined('HHVM_VERSION')) { + if (!$fallbackPool instanceof AdapterInterface) { + $fallbackPool = new ProxyAdapter($fallbackPool); + } + + return new static($file, $fallbackPool); + } + + return $fallbackPool; + } + + /** + * Store an array of cached values. + * + * @param array $values The cached values + */ + public function warmUp(array $values) + { + if (file_exists($this->file)) { + if (!is_file($this->file)) { + throw new InvalidArgumentException(sprintf('Cache path exists and is not a file: %s.', $this->file)); + } + + if (!is_writable($this->file)) { + throw new InvalidArgumentException(sprintf('Cache file is not writable: %s.', $this->file)); + } + } else { + $directory = dirname($this->file); + + if (!is_dir($directory) && !@mkdir($directory, 0777, true)) { + throw new InvalidArgumentException(sprintf('Cache directory does not exist and cannot be created: %s.', $directory)); + } + + if (!is_writable($directory)) { + throw new InvalidArgumentException(sprintf('Cache directory is not writable: %s.', $directory)); + } + } + + $dump = <<<'EOF' + $value) { + CacheItem::validateKey(is_int($key) ? (string) $key : $key); + + if (null === $value || is_object($value)) { + try { + $value = serialize($value); + } catch (\Exception $e) { + throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, get_class($value)), 0, $e); + } + } elseif (is_array($value)) { + try { + $serialized = serialize($value); + $unserialized = unserialize($serialized); + } catch (\Exception $e) { + throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable array value.', $key), 0, $e); + } + // Store arrays serialized if they contain any objects or references + if ($unserialized !== $value || (false !== strpos($serialized, ';R:') && preg_match('/;R:[1-9]/', $serialized))) { + $value = $serialized; + } + } elseif (is_string($value)) { + // Serialize strings if they could be confused with serialized objects or arrays + if ('N;' === $value || (isset($value[2]) && ':' === $value[1])) { + $value = serialize($value); + } + } elseif (!is_scalar($value)) { + throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, gettype($value))); + } + + $dump .= var_export($key, true).' => '.var_export($value, true).",\n"; + } + + $dump .= "\n);\n"; + $dump = str_replace("' . \"\\0\" . '", "\0", $dump); + + $tmpFile = uniqid($this->file, true); + + file_put_contents($tmpFile, $dump); + @chmod($tmpFile, 0666 & ~umask()); + unset($serialized, $unserialized, $value, $dump); + + @rename($tmpFile, $this->file); + + $this->values = (include $this->file) ?: array(); + } + + /** + * {@inheritdoc} + */ + public function getItem($key) + { + if (!is_string($key)) { + throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', is_object($key) ? get_class($key) : gettype($key))); + } + if (null === $this->values) { + $this->initialize(); + } + if (!isset($this->values[$key])) { + return $this->fallbackPool->getItem($key); + } + + $value = $this->values[$key]; + $isHit = true; + + if ('N;' === $value) { + $value = null; + } elseif (is_string($value) && isset($value[2]) && ':' === $value[1]) { + try { + $e = null; + $value = unserialize($value); + } catch (\Error $e) { + } catch (\Exception $e) { + } + if (null !== $e) { + $value = null; + $isHit = false; + } + } + + $f = $this->createCacheItem; + + return $f($key, $value, $isHit); + } + + /** + * {@inheritdoc} + */ + public function getItems(array $keys = array()) + { + foreach ($keys as $key) { + if (!is_string($key)) { + throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', is_object($key) ? get_class($key) : gettype($key))); + } + } + if (null === $this->values) { + $this->initialize(); + } + + return $this->generateItems($keys); + } + + /** + * {@inheritdoc} + */ + public function hasItem($key) + { + if (!is_string($key)) { + throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', is_object($key) ? get_class($key) : gettype($key))); + } + if (null === $this->values) { + $this->initialize(); + } + + return isset($this->values[$key]) || $this->fallbackPool->hasItem($key); + } + + /** + * {@inheritdoc} + */ + public function clear() + { + $this->values = array(); + + $cleared = @unlink($this->file) || !file_exists($this->file); + + return $this->fallbackPool->clear() && $cleared; + } + + /** + * {@inheritdoc} + */ + public function deleteItem($key) + { + if (!is_string($key)) { + throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', is_object($key) ? get_class($key) : gettype($key))); + } + if (null === $this->values) { + $this->initialize(); + } + + return !isset($this->values[$key]) && $this->fallbackPool->deleteItem($key); + } + + /** + * {@inheritdoc} + */ + public function deleteItems(array $keys) + { + $deleted = true; + $fallbackKeys = array(); + + foreach ($keys as $key) { + if (!is_string($key)) { + throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', is_object($key) ? get_class($key) : gettype($key))); + } + + if (isset($this->values[$key])) { + $deleted = false; + } else { + $fallbackKeys[] = $key; + } + } + if (null === $this->values) { + $this->initialize(); + } + + if ($fallbackKeys) { + $deleted = $this->fallbackPool->deleteItems($fallbackKeys) && $deleted; + } + + return $deleted; + } + + /** + * {@inheritdoc} + */ + public function save(CacheItemInterface $item) + { + if (null === $this->values) { + $this->initialize(); + } + + return !isset($this->values[$item->getKey()]) && $this->fallbackPool->save($item); + } + + /** + * {@inheritdoc} + */ + public function saveDeferred(CacheItemInterface $item) + { + if (null === $this->values) { + $this->initialize(); + } + + return !isset($this->values[$item->getKey()]) && $this->fallbackPool->saveDeferred($item); + } + + /** + * {@inheritdoc} + */ + public function commit() + { + return $this->fallbackPool->commit(); + } + + /** + * Load the cache file. + */ + private function initialize() + { + $this->values = file_exists($this->file) ? (include $this->file ?: array()) : array(); + } + + /** + * Generator for items. + * + * @param array $keys + * + * @return \Generator + */ + private function generateItems(array $keys) + { + $f = $this->createCacheItem; + $fallbackKeys = array(); + + foreach ($keys as $key) { + if (isset($this->values[$key])) { + $value = $this->values[$key]; + + if ('N;' === $value) { + yield $key => $f($key, null, true); + } elseif (is_string($value) && isset($value[2]) && ':' === $value[1]) { + try { + yield $key => $f($key, unserialize($value), true); + } catch (\Error $e) { + yield $key => $f($key, null, false); + } catch (\Exception $e) { + yield $key => $f($key, null, false); + } + } else { + yield $key => $f($key, $value, true); + } + } else { + $fallbackKeys[] = $key; + } + } + + if ($fallbackKeys) { + foreach ($this->fallbackPool->getItems($fallbackKeys) as $key => $item) { + yield $key => $item; + } + } + } + + /** + * @throws \ReflectionException When $class is not found and is required + * + * @internal + */ + public static function throwOnRequiredClass($class) + { + $e = new \ReflectionException("Class $class does not exist"); + $trace = $e->getTrace(); + $autoloadFrame = array( + 'function' => 'spl_autoload_call', + 'args' => array($class), + ); + $i = 1 + array_search($autoloadFrame, $trace, true); + + if (isset($trace[$i]['function']) && !isset($trace[$i]['class'])) { + switch ($trace[$i]['function']) { + case 'get_class_methods': + case 'get_class_vars': + case 'get_parent_class': + case 'is_a': + case 'is_subclass_of': + case 'class_exists': + case 'class_implements': + case 'class_parents': + case 'trait_exists': + case 'defined': + case 'interface_exists': + case 'method_exists': + case 'property_exists': + case 'is_callable': + return; + } + } + + throw $e; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..befa38d8d46dfb270bafda7d3835e5d11c27859d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Symfony\Component\Cache\Exception\CacheException; +use Symfony\Component\Cache\Exception\InvalidArgumentException; + +/** + * @author Piotr Stankowski + * @author Nicolas Grekas + */ +class PhpFilesAdapter extends AbstractAdapter +{ + use FilesystemAdapterTrait; + + private $includeHandler; + + public static function isSupported() + { + return function_exists('opcache_compile_file') && ini_get('opcache.enable'); + } + + public function __construct($namespace = '', $defaultLifetime = 0, $directory = null) + { + if (!static::isSupported()) { + throw new CacheException('OPcache is not enabled'); + } + parent::__construct('', $defaultLifetime); + $this->init($namespace, $directory); + + $e = new \Exception(); + $this->includeHandler = function () use ($e) { throw $e; }; + } + + /** + * {@inheritdoc} + */ + protected function doFetch(array $ids) + { + $values = array(); + $now = time(); + + set_error_handler($this->includeHandler); + try { + foreach ($ids as $id) { + try { + $file = $this->getFile($id); + list($expiresAt, $values[$id]) = include $file; + if ($now >= $expiresAt) { + unset($values[$id]); + } + } catch (\Exception $e) { + continue; + } + } + } finally { + restore_error_handler(); + } + + foreach ($values as $id => $value) { + if ('N;' === $value) { + $values[$id] = null; + } elseif (is_string($value) && isset($value[2]) && ':' === $value[1]) { + $values[$id] = parent::unserialize($value); + } + } + + return $values; + } + + /** + * {@inheritdoc} + */ + protected function doHave($id) + { + return (bool) $this->doFetch(array($id)); + } + + /** + * {@inheritdoc} + */ + protected function doSave(array $values, $lifetime) + { + $ok = true; + $data = array($lifetime ? time() + $lifetime : PHP_INT_MAX, ''); + $allowCompile = 'cli' !== PHP_SAPI || ini_get('opcache.enable_cli'); + + foreach ($values as $key => $value) { + if (null === $value || is_object($value)) { + $value = serialize($value); + } elseif (is_array($value)) { + $serialized = serialize($value); + $unserialized = parent::unserialize($serialized); + // Store arrays serialized if they contain any objects or references + if ($unserialized !== $value || (false !== strpos($serialized, ';R:') && preg_match('/;R:[1-9]/', $serialized))) { + $value = $serialized; + } + } elseif (is_string($value)) { + // Serialize strings if they could be confused with serialized objects or arrays + if ('N;' === $value || (isset($value[2]) && ':' === $value[1])) { + $value = serialize($value); + } + } elseif (!is_scalar($value)) { + throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, gettype($value))); + } + + $data[1] = $value; + $file = $this->getFile($key, true); + $ok = $this->write($file, 'directory)) { + throw new CacheException(sprintf('Cache directory is not writable (%s)', $this->directory)); + } + + return $ok; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..2ed895c873a3e3fb8835ea1de02d8491315a8869 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php @@ -0,0 +1,176 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Psr\Cache\CacheItemInterface; +use Psr\Cache\CacheItemPoolInterface; +use Symfony\Component\Cache\CacheItem; + +/** + * @author Nicolas Grekas + */ +class ProxyAdapter implements AdapterInterface +{ + private $pool; + private $namespace; + private $namespaceLen; + private $createCacheItem; + private $poolHash; + + public function __construct(CacheItemPoolInterface $pool, $namespace = '', $defaultLifetime = 0) + { + $this->pool = $pool; + $this->poolHash = $poolHash = spl_object_hash($pool); + $this->namespace = '' === $namespace ? '' : $this->getId($namespace); + $this->namespaceLen = strlen($namespace); + $this->createCacheItem = \Closure::bind( + function ($key, $innerItem) use ($defaultLifetime, $poolHash) { + $item = new CacheItem(); + $item->key = $key; + $item->value = $innerItem->get(); + $item->isHit = $innerItem->isHit(); + $item->defaultLifetime = $defaultLifetime; + $item->innerItem = $innerItem; + $item->poolHash = $poolHash; + $innerItem->set(null); + + return $item; + }, + null, + CacheItem::class + ); + } + + /** + * {@inheritdoc} + */ + public function getItem($key) + { + $f = $this->createCacheItem; + $item = $this->pool->getItem($this->getId($key)); + + return $f($key, $item); + } + + /** + * {@inheritdoc} + */ + public function getItems(array $keys = array()) + { + if ($this->namespaceLen) { + foreach ($keys as $i => $key) { + $keys[$i] = $this->getId($key); + } + } + + return $this->generateItems($this->pool->getItems($keys)); + } + + /** + * {@inheritdoc} + */ + public function hasItem($key) + { + return $this->pool->hasItem($this->getId($key)); + } + + /** + * {@inheritdoc} + */ + public function clear() + { + return $this->pool->clear(); + } + + /** + * {@inheritdoc} + */ + public function deleteItem($key) + { + return $this->pool->deleteItem($this->getId($key)); + } + + /** + * {@inheritdoc} + */ + public function deleteItems(array $keys) + { + if ($this->namespaceLen) { + foreach ($keys as $i => $key) { + $keys[$i] = $this->getId($key); + } + } + + return $this->pool->deleteItems($keys); + } + + /** + * {@inheritdoc} + */ + public function save(CacheItemInterface $item) + { + return $this->doSave($item, __FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function saveDeferred(CacheItemInterface $item) + { + return $this->doSave($item, __FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function commit() + { + return $this->pool->commit(); + } + + private function doSave(CacheItemInterface $item, $method) + { + if (!$item instanceof CacheItem) { + return false; + } + $item = (array) $item; + $expiry = $item["\0*\0expiry"]; + if (null === $expiry && 0 < $item["\0*\0defaultLifetime"]) { + $expiry = time() + $item["\0*\0defaultLifetime"]; + } + $innerItem = $item["\0*\0poolHash"] === $this->poolHash ? $item["\0*\0innerItem"] : $this->pool->getItem($this->namespace.$item["\0*\0key"]); + $innerItem->set($item["\0*\0value"]); + $innerItem->expiresAt(null !== $expiry ? \DateTime::createFromFormat('U', $expiry) : null); + + return $this->pool->$method($innerItem); + } + + private function generateItems($items) + { + $f = $this->createCacheItem; + + foreach ($items as $key => $item) { + if ($this->namespaceLen) { + $key = substr($key, $this->namespaceLen); + } + + yield $key => $f($key, $item); + } + } + + private function getId($key) + { + CacheItem::validateKey($key); + + return $this->namespace.$key; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/RedisAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/RedisAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..51a35c6f71ab98f78c9154ebcbfc30b28c7c50d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/RedisAdapter.php @@ -0,0 +1,317 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Predis\Connection\Factory; +use Predis\Connection\Aggregate\PredisCluster; +use Predis\Connection\Aggregate\RedisCluster; +use Predis\Response\Status; +use Symfony\Component\Cache\Exception\InvalidArgumentException; + +/** + * @author Aurimas Niekis + * @author Nicolas Grekas + */ +class RedisAdapter extends AbstractAdapter +{ + private static $defaultConnectionOptions = array( + 'class' => null, + 'persistent' => 0, + 'persistent_id' => null, + 'timeout' => 30, + 'read_timeout' => 0, + 'retry_interval' => 0, + ); + private $redis; + + /** + * @param \Redis|\RedisArray|\RedisCluster|\Predis\Client $redisClient + */ + public function __construct($redisClient, $namespace = '', $defaultLifetime = 0) + { + parent::__construct($namespace, $defaultLifetime); + + if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) { + throw new InvalidArgumentException(sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); + } + if (!$redisClient instanceof \Redis && !$redisClient instanceof \RedisArray && !$redisClient instanceof \RedisCluster && !$redisClient instanceof \Predis\Client) { + throw new InvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\Client, %s given', __METHOD__, is_object($redisClient) ? get_class($redisClient) : gettype($redisClient))); + } + $this->redis = $redisClient; + } + + /** + * Creates a Redis connection using a DSN configuration. + * + * Example DSN: + * - redis://localhost + * - redis://example.com:1234 + * - redis://secret@example.com/13 + * - redis:///var/run/redis.sock + * - redis://secret@/var/run/redis.sock/13 + * + * @param string $dsn + * @param array $options See self::$defaultConnectionOptions + * + * @throws InvalidArgumentException When the DSN is invalid. + * + * @return \Redis|\Predis\Client According to the "class" option + */ + public static function createConnection($dsn, array $options = array()) + { + if (0 !== strpos($dsn, 'redis://')) { + throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s does not start with "redis://"', $dsn)); + } + $params = preg_replace_callback('#^redis://(?:(?:[^:@]*+:)?([^@]*+)@)?#', function ($m) use (&$auth) { + if (isset($m[1])) { + $auth = $m[1]; + } + + return 'file://'; + }, $dsn); + if (false === $params = parse_url($params)) { + throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s', $dsn)); + } + if (!isset($params['host']) && !isset($params['path'])) { + throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s', $dsn)); + } + if (isset($params['path']) && preg_match('#/(\d+)$#', $params['path'], $m)) { + $params['dbindex'] = $m[1]; + $params['path'] = substr($params['path'], 0, -strlen($m[0])); + } + $params += array( + 'host' => isset($params['host']) ? $params['host'] : $params['path'], + 'port' => isset($params['host']) ? 6379 : null, + 'dbindex' => 0, + ); + if (isset($params['query'])) { + parse_str($params['query'], $query); + $params += $query; + } + $params += $options + self::$defaultConnectionOptions; + $class = null === $params['class'] ? (extension_loaded('redis') ? \Redis::class : \Predis\Client::class) : $params['class']; + + if (is_a($class, \Redis::class, true)) { + $connect = $params['persistent'] || $params['persistent_id'] ? 'pconnect' : 'connect'; + $redis = new $class(); + @$redis->{$connect}($params['host'], $params['port'], $params['timeout'], $params['persistent_id'], $params['retry_interval']); + + if (@!$redis->isConnected()) { + $e = ($e = error_get_last()) && preg_match('/^Redis::p?connect\(\): (.*)/', $e['message'], $e) ? sprintf(' (%s)', $e[1]) : ''; + throw new InvalidArgumentException(sprintf('Redis connection failed%s: %s', $e, $dsn)); + } + + if ((null !== $auth && !$redis->auth($auth)) + || ($params['dbindex'] && !$redis->select($params['dbindex'])) + || ($params['read_timeout'] && !$redis->setOption(\Redis::OPT_READ_TIMEOUT, $params['read_timeout'])) + ) { + $e = preg_replace('/^ERR /', '', $redis->getLastError()); + throw new InvalidArgumentException(sprintf('Redis connection failed (%s): %s', $e, $dsn)); + } + } elseif (is_a($class, \Predis\Client::class, true)) { + $params['scheme'] = isset($params['host']) ? 'tcp' : 'unix'; + $params['database'] = $params['dbindex'] ?: null; + $params['password'] = $auth; + $redis = new $class((new Factory())->create($params)); + } elseif (class_exists($class, false)) { + throw new InvalidArgumentException(sprintf('"%s" is not a subclass of "Redis" or "Predis\Client"', $class)); + } else { + throw new InvalidArgumentException(sprintf('Class "%s" does not exist', $class)); + } + + return $redis; + } + + /** + * {@inheritdoc} + */ + protected function doFetch(array $ids) + { + if ($ids) { + $values = $this->pipeline(function () use ($ids) { + foreach ($ids as $id) { + yield 'get' => array($id); + } + }); + foreach ($values as $id => $v) { + if ($v) { + yield $id => parent::unserialize($v); + } + } + } + } + + /** + * {@inheritdoc} + */ + protected function doHave($id) + { + return (bool) $this->redis->exists($id); + } + + /** + * {@inheritdoc} + */ + protected function doClear($namespace) + { + // When using a native Redis cluster, clearing the cache cannot work and always returns false. + // Clearing the cache should then be done by any other means (e.g. by restarting the cluster). + + $cleared = true; + $hosts = array($this->redis); + $evalArgs = array(array($namespace), 0); + + if ($this->redis instanceof \Predis\Client) { + $evalArgs = array(0, $namespace); + + $connection = $this->redis->getConnection(); + if ($connection instanceof PredisCluster) { + $hosts = array(); + foreach ($connection as $c) { + $hosts[] = new \Predis\Client($c); + } + } elseif ($connection instanceof RedisCluster) { + return false; + } + } elseif ($this->redis instanceof \RedisArray) { + $hosts = array(); + foreach ($this->redis->_hosts() as $host) { + $hosts[] = $this->redis->_instance($host); + } + } elseif ($this->redis instanceof \RedisCluster) { + return false; + } + foreach ($hosts as $host) { + if (!isset($namespace[0])) { + $cleared = $host->flushDb() && $cleared; + continue; + } + + $info = $host->info('Server'); + $info = isset($info['Server']) ? $info['Server'] : $info; + + if (!version_compare($info['redis_version'], '2.8', '>=')) { + // As documented in Redis documentation (http://redis.io/commands/keys) using KEYS + // can hang your server when it is executed against large databases (millions of items). + // Whenever you hit this scale, you should really consider upgrading to Redis 2.8 or above. + $cleared = $host->eval("local keys=redis.call('KEYS',ARGV[1]..'*') for i=1,#keys,5000 do redis.call('DEL',unpack(keys,i,math.min(i+4999,#keys))) end return 1", $evalArgs[0], $evalArgs[1]) && $cleared; + continue; + } + + $cursor = null; + do { + $keys = $host instanceof \Predis\Client ? $host->scan($cursor, 'MATCH', $namespace.'*', 'COUNT', 1000) : $host->scan($cursor, $namespace.'*', 1000); + if (isset($keys[1]) && is_array($keys[1])) { + $cursor = $keys[0]; + $keys = $keys[1]; + } + if ($keys) { + $host->del($keys); + } + } while ($cursor = (int) $cursor); + } + + return $cleared; + } + + /** + * {@inheritdoc} + */ + protected function doDelete(array $ids) + { + if ($ids) { + $this->redis->del($ids); + } + + return true; + } + + /** + * {@inheritdoc} + */ + protected function doSave(array $values, $lifetime) + { + $serialized = array(); + $failed = array(); + + foreach ($values as $id => $value) { + try { + $serialized[$id] = serialize($value); + } catch (\Exception $e) { + $failed[] = $id; + } + } + + if (!$serialized) { + return $failed; + } + + $results = $this->pipeline(function () use ($serialized, $lifetime) { + foreach ($serialized as $id => $value) { + if (0 >= $lifetime) { + yield 'set' => array($id, $value); + } else { + yield 'setEx' => array($id, $lifetime, $value); + } + } + }); + foreach ($results as $id => $result) { + if (true !== $result && (!$result instanceof Status || $result !== Status::get('OK'))) { + $failed[] = $id; + } + } + + return $failed; + } + + private function pipeline(\Closure $generator) + { + $ids = array(); + + if ($this->redis instanceof \Predis\Client) { + $results = $this->redis->pipeline(function ($redis) use ($generator, &$ids) { + foreach ($generator() as $command => $args) { + call_user_func_array(array($redis, $command), $args); + $ids[] = $args[0]; + } + }); + } elseif ($this->redis instanceof \RedisArray) { + $connections = $results = $ids = array(); + foreach ($generator() as $command => $args) { + if (!isset($connections[$h = $this->redis->_target($args[0])])) { + $connections[$h] = array($this->redis->_instance($h), -1); + $connections[$h][0]->multi(\Redis::PIPELINE); + } + call_user_func_array(array($connections[$h][0], $command), $args); + $results[] = array($h, ++$connections[$h][1]); + $ids[] = $args[0]; + } + foreach ($connections as $h => $c) { + $connections[$h] = $c[0]->exec(); + } + foreach ($results as $k => list($h, $c)) { + $results[$k] = $connections[$h][$c]; + } + } else { + $this->redis->multi(\Redis::PIPELINE); + foreach ($generator() as $command => $args) { + call_user_func_array(array($this->redis, $command), $args); + $ids[] = $args[0]; + } + $results = $this->redis->exec(); + } + + foreach ($ids as $k => $id) { + yield $id => $results[$k]; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..b8c4a08021b703d7f031bc07a1c4bd332c0faaab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php @@ -0,0 +1,318 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Psr\Cache\CacheItemInterface; +use Psr\Cache\InvalidArgumentException; +use Symfony\Component\Cache\CacheItem; + +/** + * @author Nicolas Grekas + */ +class TagAwareAdapter implements TagAwareAdapterInterface +{ + const TAGS_PREFIX = "\0tags\0"; + + private $itemsAdapter; + private $deferred = array(); + private $createCacheItem; + private $getTagsByKey; + private $invalidateTags; + private $tagsAdapter; + + public function __construct(AdapterInterface $itemsAdapter, AdapterInterface $tagsAdapter = null) + { + $this->itemsAdapter = $itemsAdapter; + $this->tagsAdapter = $tagsAdapter ?: $itemsAdapter; + $this->createCacheItem = \Closure::bind( + function ($key, $value, CacheItem $protoItem) { + $item = new CacheItem(); + $item->key = $key; + $item->value = $value; + $item->isHit = false; + $item->defaultLifetime = $protoItem->defaultLifetime; + $item->expiry = $protoItem->expiry; + $item->innerItem = $protoItem->innerItem; + $item->poolHash = $protoItem->poolHash; + + return $item; + }, + null, + CacheItem::class + ); + $this->getTagsByKey = \Closure::bind( + function ($deferred) { + $tagsByKey = array(); + foreach ($deferred as $key => $item) { + $tagsByKey[$key] = $item->tags; + } + + return $tagsByKey; + }, + null, + CacheItem::class + ); + $this->invalidateTags = \Closure::bind( + function (AdapterInterface $tagsAdapter, array $tags) { + foreach ($tagsAdapter->getItems($tags) as $v) { + $v->set(1 + (int) $v->get()); + $v->defaultLifetime = 0; + $v->expiry = null; + $tagsAdapter->saveDeferred($v); + } + + return $tagsAdapter->commit(); + }, + null, + CacheItem::class + ); + } + + /** + * {@inheritdoc} + */ + public function invalidateTags(array $tags) + { + foreach ($tags as $k => $tag) { + if ('' !== $tag && is_string($tag)) { + $tags[$k] = $tag.static::TAGS_PREFIX; + } + } + $f = $this->invalidateTags; + + return $f($this->tagsAdapter, $tags); + } + + /** + * {@inheritdoc} + */ + public function hasItem($key) + { + if ($this->deferred) { + $this->commit(); + } + if (!$this->itemsAdapter->hasItem($key)) { + return false; + } + if (!$itemTags = $this->itemsAdapter->getItem(static::TAGS_PREFIX.$key)->get()) { + return true; + } + + foreach ($this->getTagVersions(array($itemTags)) as $tag => $version) { + if ($itemTags[$tag] !== $version) { + return false; + } + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function getItem($key) + { + foreach ($this->getItems(array($key)) as $item) { + return $item; + } + } + + /** + * {@inheritdoc} + */ + public function getItems(array $keys = array()) + { + if ($this->deferred) { + $this->commit(); + } + $tagKeys = array(); + + foreach ($keys as $key) { + if ('' !== $key && is_string($key)) { + $key = static::TAGS_PREFIX.$key; + $tagKeys[$key] = $key; + } + } + + try { + $items = $this->itemsAdapter->getItems($tagKeys + $keys); + } catch (InvalidArgumentException $e) { + $this->itemsAdapter->getItems($keys); // Should throw an exception + + throw $e; + } + + return $this->generateItems($items, $tagKeys); + } + + /** + * {@inheritdoc} + */ + public function clear() + { + $this->deferred = array(); + + return $this->itemsAdapter->clear(); + } + + /** + * {@inheritdoc} + */ + public function deleteItem($key) + { + return $this->deleteItems(array($key)); + } + + /** + * {@inheritdoc} + */ + public function deleteItems(array $keys) + { + foreach ($keys as $key) { + if ('' !== $key && is_string($key)) { + $keys[] = static::TAGS_PREFIX.$key; + } + } + + return $this->itemsAdapter->deleteItems($keys); + } + + /** + * {@inheritdoc} + */ + public function save(CacheItemInterface $item) + { + if (!$item instanceof CacheItem) { + return false; + } + $this->deferred[$item->getKey()] = $item; + + return $this->commit(); + } + + /** + * {@inheritdoc} + */ + public function saveDeferred(CacheItemInterface $item) + { + if (!$item instanceof CacheItem) { + return false; + } + $this->deferred[$item->getKey()] = $item; + + return true; + } + + /** + * {@inheritdoc} + */ + public function commit() + { + $ok = true; + + if ($this->deferred) { + $items = $this->deferred; + foreach ($items as $key => $item) { + if (!$this->itemsAdapter->saveDeferred($item)) { + unset($this->deferred[$key]); + $ok = false; + } + } + + $f = $this->getTagsByKey; + $tagsByKey = $f($items); + $deletedTags = $this->deferred = array(); + $tagVersions = $this->getTagVersions($tagsByKey); + $f = $this->createCacheItem; + + foreach ($tagsByKey as $key => $tags) { + if ($tags) { + $this->itemsAdapter->saveDeferred($f(static::TAGS_PREFIX.$key, array_intersect_key($tagVersions, $tags), $items[$key])); + } else { + $deletedTags[] = static::TAGS_PREFIX.$key; + } + } + if ($deletedTags) { + $this->itemsAdapter->deleteItems($deletedTags); + } + } + + return $this->itemsAdapter->commit() && $ok; + } + + public function __destruct() + { + $this->commit(); + } + + private function generateItems($items, array $tagKeys) + { + $bufferedItems = $itemTags = $invalidKeys = array(); + $f = $this->createCacheItem; + + foreach ($items as $key => $item) { + if (!$tagKeys) { + yield $key => isset($invalidKeys[self::TAGS_PREFIX.$key]) ? $f($key, null, $item) : $item; + continue; + } + if (!isset($tagKeys[$key])) { + $bufferedItems[$key] = $item; + continue; + } + + unset($tagKeys[$key]); + if ($tags = $item->get()) { + $itemTags[$key] = $tags; + } + if (!$tagKeys) { + $tagVersions = $this->getTagVersions($itemTags); + + foreach ($itemTags as $key => $tags) { + foreach ($tags as $tag => $version) { + if ($tagVersions[$tag] !== $version) { + $invalidKeys[$key] = true; + continue 2; + } + } + } + $itemTags = $tagVersions = $tagKeys = null; + + foreach ($bufferedItems as $key => $item) { + yield $key => isset($invalidKeys[self::TAGS_PREFIX.$key]) ? $f($key, null, $item) : $item; + } + $bufferedItems = null; + } + } + } + + private function getTagVersions(array $tagsByKey) + { + $tagVersions = array(); + + foreach ($tagsByKey as $tags) { + $tagVersions += $tags; + } + + if ($tagVersions) { + $tags = array(); + foreach ($tagVersions as $tag => $version) { + $tagVersions[$tag] = $tag.static::TAGS_PREFIX; + $tags[$tag.static::TAGS_PREFIX] = $tag; + } + foreach ($this->tagsAdapter->getItems($tagVersions) as $tag => $version) { + $tagVersions[$tags[$tag]] = $version->get() ?: 0; + } + } + + return $tagVersions; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TagAwareAdapterInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TagAwareAdapterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..340048c100021227c5cbf969946936a5fc76c98a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/TagAwareAdapterInterface.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Adapter; + +use Psr\Cache\InvalidArgumentException; + +/** + * Interface for invalidating cached items using tags. + * + * @author Nicolas Grekas + */ +interface TagAwareAdapterInterface extends AdapterInterface +{ + /** + * Invalidates cached items using tags. + * + * @param string[] $tags An array of tags to invalidate + * + * @return bool True on success + * + * @throws InvalidArgumentException When $tags is not valid + */ + public function invalidateTags(array $tags); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Cache/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..94bbe13699b4725e4f2cd2f368de678ea4176648 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/CHANGELOG.md @@ -0,0 +1,18 @@ +CHANGELOG +========= + +3.2.0 +----- + + * added TagAwareAdapter for tags-based invalidation + * added PdoAdapter with PDO and Doctrine DBAL support + * added PhpArrayAdapter and PhpFilesAdapter for OPcache-backed shared memory storage (PHP 7+ only) + * added NullAdapter + +3.1.0 +----- + + * added the component with strict PSR-6 implementations + * added ApcuAdapter, ArrayAdapter, FilesystemAdapter and RedisAdapter + * added AbstractAdapter, ChainAdapter and ProxyAdapter + * added DoctrineAdapter and DoctrineProvider for bidirectional interoperability with Doctrine Cache diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/CacheItem.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/CacheItem.php new file mode 100644 index 0000000000000000000000000000000000000000..941d0bc6cd5e9dde8fe946c8067ea11db3a3932d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/CacheItem.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\Component\Cache; + +use Psr\Cache\CacheItemInterface; +use Psr\Log\LoggerInterface; +use Symfony\Component\Cache\Exception\InvalidArgumentException; + +/** + * @author Nicolas Grekas + */ +final class CacheItem implements CacheItemInterface +{ + protected $key; + protected $value; + protected $isHit; + protected $expiry; + protected $defaultLifetime; + protected $tags = array(); + protected $innerItem; + protected $poolHash; + + /** + * {@inheritdoc} + */ + public function getKey() + { + return $this->key; + } + + /** + * {@inheritdoc} + */ + public function get() + { + return $this->value; + } + + /** + * {@inheritdoc} + */ + public function isHit() + { + return $this->isHit; + } + + /** + * {@inheritdoc} + */ + public function set($value) + { + $this->value = $value; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function expiresAt($expiration) + { + if (null === $expiration) { + $this->expiry = $this->defaultLifetime > 0 ? time() + $this->defaultLifetime : null; + } elseif ($expiration instanceof \DateTimeInterface) { + $this->expiry = (int) $expiration->format('U'); + } else { + throw new InvalidArgumentException(sprintf('Expiration date must implement DateTimeInterface or be null, "%s" given', is_object($expiration) ? get_class($expiration) : gettype($expiration))); + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function expiresAfter($time) + { + if (null === $time) { + $this->expiry = $this->defaultLifetime > 0 ? time() + $this->defaultLifetime : null; + } elseif ($time instanceof \DateInterval) { + $this->expiry = (int) \DateTime::createFromFormat('U', time())->add($time)->format('U'); + } elseif (is_int($time)) { + $this->expiry = $time + time(); + } else { + throw new InvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given', is_object($time) ? get_class($time) : gettype($time))); + } + + return $this; + } + + /** + * Adds a tag to a cache item. + * + * @param string|string[] $tags A tag or array of tags + * + * @return static + * + * @throws InvalidArgumentException When $tag is not valid + */ + public function tag($tags) + { + if (!is_array($tags)) { + $tags = array($tags); + } + foreach ($tags as $tag) { + if (!is_string($tag)) { + throw new InvalidArgumentException(sprintf('Cache tag must be string, "%s" given', is_object($tag) ? get_class($tag) : gettype($tag))); + } + if (isset($this->tags[$tag])) { + continue; + } + if (!isset($tag[0])) { + throw new InvalidArgumentException('Cache tag length must be greater than zero'); + } + if (false !== strpbrk($tag, '{}()/\@:')) { + throw new InvalidArgumentException(sprintf('Cache tag "%s" contains reserved characters {}()/\@:', $tag)); + } + $this->tags[$tag] = $tag; + } + + return $this; + } + + /** + * Validates a cache key according to PSR-6. + * + * @param string $key The key to validate + * + * @throws InvalidArgumentException When $key is not valid + */ + public static function validateKey($key) + { + if (!is_string($key)) { + throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given', is_object($key) ? get_class($key) : gettype($key))); + } + if (!isset($key[0])) { + throw new InvalidArgumentException('Cache key length must be greater than zero'); + } + if (false !== strpbrk($key, '{}()/\@:')) { + throw new InvalidArgumentException(sprintf('Cache key "%s" contains reserved characters {}()/\@:', $key)); + } + } + + /** + * Internal logging helper. + * + * @internal + */ + public static function log(LoggerInterface $logger = null, $message, $context = array()) + { + if ($logger) { + $logger->warning($message, $context); + } else { + $replace = array(); + foreach ($context as $k => $v) { + if (is_scalar($v)) { + $replace['{'.$k.'}'] = $v; + } + } + @trigger_error(strtr($message, $replace), E_USER_WARNING); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/DoctrineProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/DoctrineProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..5d9c2faed7187d2968a512ee4eda9dcd9105d244 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/DoctrineProvider.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache; + +use Doctrine\Common\Cache\CacheProvider; +use Psr\Cache\CacheItemPoolInterface; + +/** + * @author Nicolas Grekas + */ +class DoctrineProvider extends CacheProvider +{ + private $pool; + + public function __construct(CacheItemPoolInterface $pool) + { + $this->pool = $pool; + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + $item = $this->pool->getItem(rawurlencode($id)); + + return $item->isHit() ? $item->get() : false; + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return $this->pool->hasItem(rawurlencode($id)); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + $item = $this->pool->getItem(rawurlencode($id)); + + if (0 < $lifeTime) { + $item->expiresAfter($lifeTime); + } + + return $this->pool->save($item->set($data)); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + return $this->pool->deleteItem(rawurlencode($id)); + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + $this->pool->clear(); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Exception/CacheException.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Exception/CacheException.php new file mode 100644 index 0000000000000000000000000000000000000000..d62b3e1213892ca17bfdbac9a3b86e40451b8317 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Exception/CacheException.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Exception; + +use Psr\Cache\CacheException as CacheExceptionInterface; + +class CacheException extends \Exception implements CacheExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..334a3c3e276179c9da4d2115819c486f9440adf0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Exception/InvalidArgumentException.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Exception; + +use Psr\Cache\InvalidArgumentException as InvalidArgumentExceptionInterface; + +class InvalidArgumentException extends \InvalidArgumentException implements InvalidArgumentExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Cache/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ce39894f6a9a2bf56c1c4c307333fc19973c3355 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2016-2017 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/vendor/symfony/symfony/src/Symfony/Component/Cache/README.md b/vendor/symfony/symfony/src/Symfony/Component/Cache/README.md new file mode 100644 index 0000000000000000000000000000000000000000..604fb1d5b410c038913217eaa488c032c1684398 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/README.md @@ -0,0 +1,9 @@ +Symfony PSR-6 implementation for caching +======================================== + +This component provides an extended [PSR-6](http://www.php-fig.org/psr/psr-6/) +implementation for adding cache to your applications. It is designed to have a +low overhead so that caching is fastest. It ships with a few caching adapters +for the most widespread and suited to caching backends. It also provides a +`doctrine/cache` proxy adapter to cover more advanced caching needs and a proxy +adapter for greater interoperability between PSR-6 implementations. diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..86b16d436f23f707dacc3b16df376503521f71d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTest.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Symfony\Component\Cache\Adapter\RedisAdapter; + +abstract class AbstractRedisAdapterTest extends AdapterTestCase +{ + protected $skippedTests = array( + 'testExpiration' => 'Testing expiration slows down the test suite', + 'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite', + 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', + ); + + protected static $redis; + + public function createCachePool($defaultLifetime = 0) + { + return new RedisAdapter(self::$redis, str_replace('\\', '.', __CLASS__), $defaultLifetime); + } + + public static function setupBeforeClass() + { + if (!extension_loaded('redis')) { + self::markTestSkipped('Extension redis required.'); + } + if (!@((new \Redis())->connect(getenv('REDIS_HOST')))) { + $e = error_get_last(); + self::markTestSkipped($e['message']); + } + } + + public static function tearDownAfterClass() + { + self::$redis->flushDB(); + self::$redis = null; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..65a040ec7ca653b35c9b63b53ad55a0cb29ec443 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Cache\IntegrationTests\CachePoolTest; + +if (!class_exists('PHPUnit_Framework_TestCase')) { + abstract class AdapterTestCase + { + public static function setUpBeforeClass() + { + self::markTestSkipped('cache/integration-tests is not yet compatible with namespaced phpunit versions.'); + } + } + + return; +} + +abstract class AdapterTestCase extends CachePoolTest +{ + protected function setUp() + { + parent::setUp(); + + if (!array_key_exists('testDeferredSaveWithoutCommit', $this->skippedTests) && defined('HHVM_VERSION')) { + $this->skippedTests['testDeferredSaveWithoutCommit'] = 'Destructors are called late on HHVM.'; + } + } + + public function testDefaultLifeTime() + { + if (isset($this->skippedTests[__FUNCTION__])) { + $this->markTestSkipped($this->skippedTests[__FUNCTION__]); + } + + $cache = $this->createCachePool(2); + + $item = $cache->getItem('key.dlt'); + $item->set('value'); + $cache->save($item); + sleep(1); + + $item = $cache->getItem('key.dlt'); + $this->assertTrue($item->isHit()); + + sleep(2); + $item = $cache->getItem('key.dlt'); + $this->assertFalse($item->isHit()); + } + + public function testNotUnserializable() + { + if (isset($this->skippedTests[__FUNCTION__])) { + $this->markTestSkipped($this->skippedTests[__FUNCTION__]); + } + + $cache = $this->createCachePool(); + + $item = $cache->getItem('foo'); + $cache->save($item->set(new NotUnserializable())); + + $item = $cache->getItem('foo'); + $this->assertFalse($item->isHit()); + + foreach ($cache->getItems(array('foo')) as $item) { + } + $cache->save($item->set(new NotUnserializable())); + + foreach ($cache->getItems(array('foo')) as $item) { + } + $this->assertFalse($item->isHit()); + } +} + +class NotUnserializable implements \Serializable +{ + public function serialize() + { + return serialize(123); + } + + public function unserialize($ser) + { + throw new \Exception(__CLASS__); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..50206bb278b52078e42e2836937fcf22f845b025 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.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\Cache\Tests\Adapter; + +use Symfony\Component\Cache\Adapter\ApcuAdapter; + +class ApcuAdapterTest extends AdapterTestCase +{ + protected $skippedTests = array( + 'testExpiration' => 'Testing expiration slows down the test suite', + 'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite', + 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', + ); + + public function createCachePool($defaultLifetime = 0) + { + if (!function_exists('apcu_fetch') || !ini_get('apc.enabled') || ('cli' === PHP_SAPI && !ini_get('apc.enable_cli'))) { + $this->markTestSkipped('APCu extension is required.'); + } + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('Fails transiently on Windows.'); + } + + return new ApcuAdapter(str_replace('\\', '.', __CLASS__), $defaultLifetime); + } + + public function testUnserializable() + { + $pool = $this->createCachePool(); + + $item = $pool->getItem('foo'); + $item->set(function () {}); + + $this->assertFalse($pool->save($item)); + + $item = $pool->getItem('foo'); + $this->assertFalse($item->isHit()); + } + + public function testVersion() + { + $namespace = str_replace('\\', '.', __CLASS__); + + $pool1 = new ApcuAdapter($namespace, 0, 'p1'); + + $item = $pool1->getItem('foo'); + $this->assertFalse($item->isHit()); + $this->assertTrue($pool1->save($item->set('bar'))); + + $item = $pool1->getItem('foo'); + $this->assertTrue($item->isHit()); + $this->assertSame('bar', $item->get()); + + $pool2 = new ApcuAdapter($namespace, 0, 'p2'); + + $item = $pool2->getItem('foo'); + $this->assertFalse($item->isHit()); + $this->assertNull($item->get()); + + $item = $pool1->getItem('foo'); + $this->assertFalse($item->isHit()); + $this->assertNull($item->get()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ArrayAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ArrayAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..725d79015082eaba55a5f95bdd724fdbfcccc889 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ArrayAdapterTest.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Symfony\Component\Cache\Adapter\ArrayAdapter; + +/** + * @group time-sensitive + */ +class ArrayAdapterTest extends AdapterTestCase +{ + protected $skippedTests = array( + 'testDeferredSaveWithoutCommit' => 'Assumes a shared cache which ArrayAdapter is not.', + 'testSaveWithoutExpire' => 'Assumes a shared cache which ArrayAdapter is not.', + ); + + public function createCachePool($defaultLifetime = 0) + { + return new ArrayAdapter($defaultLifetime); + } + + public function testGetValuesHitAndMiss() + { + /** @var ArrayAdapter $cache */ + $cache = $this->createCachePool(); + + // Hit + $item = $cache->getItem('foo'); + $item->set('4711'); + $cache->save($item); + + $fooItem = $cache->getItem('foo'); + $this->assertTrue($fooItem->isHit()); + $this->assertEquals('4711', $fooItem->get()); + + // Miss (should be present as NULL in $values) + $cache->getItem('bar'); + + $values = $cache->getValues(); + + $this->assertCount(2, $values); + $this->assertArrayHasKey('foo', $values); + $this->assertSame(serialize('4711'), $values['foo']); + $this->assertArrayHasKey('bar', $values); + $this->assertNull($values['bar']); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b80913c6e089cc23a174c4f9eb74375d414ffa14 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Symfony\Component\Cache\Adapter\FilesystemAdapter; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\Cache\Adapter\ChainAdapter; +use Symfony\Component\Cache\Tests\Fixtures\ExternalAdapter; + +/** + * @author Kévin Dunglas + * @group time-sensitive + */ +class ChainAdapterTest extends AdapterTestCase +{ + public function createCachePool($defaultLifetime = 0) + { + return new ChainAdapter(array(new ArrayAdapter($defaultLifetime), new ExternalAdapter(), new FilesystemAdapter('', $defaultLifetime)), $defaultLifetime); + } + + /** + * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException + * @expectedExceptionMessage At least one adapter must be specified. + */ + public function testEmptyAdaptersException() + { + new ChainAdapter(array()); + } + + /** + * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException + * @expectedExceptionMessage The class "stdClass" does not implement + */ + public function testInvalidAdapterException() + { + new ChainAdapter(array(new \stdClass())); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/DoctrineAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/DoctrineAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..93ec9824388e103a46c997b0266f0a71dc631410 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/DoctrineAdapterTest.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\Component\Cache\Tests\Adapter; + +use Doctrine\Common\Cache\ArrayCache; +use Symfony\Component\Cache\Adapter\DoctrineAdapter; + +/** + * @group time-sensitive + */ +class DoctrineAdapterTest extends AdapterTestCase +{ + protected $skippedTests = array( + 'testDeferredSaveWithoutCommit' => 'Assumes a shared cache which ArrayCache is not.', + 'testSaveWithoutExpire' => 'Assumes a shared cache which ArrayCache is not.', + 'testNotUnserializable' => 'ArrayCache does not use serialize/unserialize', + ); + + public function createCachePool($defaultLifetime = 0) + { + return new DoctrineAdapter(new ArrayCache($defaultLifetime), '', $defaultLifetime); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/FilesystemAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/FilesystemAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..68357860f24e0d916b78c3ddac0fceabee64891a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/FilesystemAdapterTest.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Symfony\Component\Cache\Adapter\FilesystemAdapter; + +/** + * @group time-sensitive + */ +class FilesystemAdapterTest extends AdapterTestCase +{ + public function createCachePool($defaultLifetime = 0) + { + return new FilesystemAdapter('', $defaultLifetime); + } + + public static function tearDownAfterClass() + { + self::rmdir(sys_get_temp_dir().'/symfony-cache'); + } + + public static function rmdir($dir) + { + if (!file_exists($dir)) { + return; + } + if (!$dir || 0 !== strpos(dirname($dir), sys_get_temp_dir())) { + throw new \Exception(__METHOD__."() operates only on subdirs of system's temp dir"); + } + $children = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS), + \RecursiveIteratorIterator::CHILD_FIRST + ); + foreach ($children as $child) { + if ($child->isDir()) { + rmdir($child); + } else { + unlink($child); + } + } + rmdir($dir); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cf2384c5f37e678c4d22f0aec47361018c493cc4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Cache\Adapter\AbstractAdapter; + +class MaxIdLengthAdapterTest extends TestCase +{ + public function testLongKey() + { + $cache = $this->getMockBuilder(MaxIdLengthAdapter::class) + ->setConstructorArgs(array(str_repeat('-', 10))) + ->setMethods(array('doHave', 'doFetch', 'doDelete', 'doSave', 'doClear')) + ->getMock(); + + $cache->expects($this->exactly(2)) + ->method('doHave') + ->withConsecutive( + array($this->equalTo('----------:0GTYWa9n4ed8vqNlOT2iEr:')), + array($this->equalTo('----------:---------------------------------------')) + ); + + $cache->hasItem(str_repeat('-', 40)); + $cache->hasItem(str_repeat('-', 39)); + } + + /** + * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException + * @expectedExceptionMessage Namespace must be 26 chars max, 40 given ("----------------------------------------") + */ + public function testTooLongNamespace() + { + $cache = $this->getMockBuilder(MaxIdLengthAdapter::class) + ->setConstructorArgs(array(str_repeat('-', 40))) + ->getMock(); + } +} + +abstract class MaxIdLengthAdapter extends AbstractAdapter +{ + protected $maxIdLength = 50; + + public function __construct($ns) + { + parent::__construct($ns); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/NamespacedProxyAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/NamespacedProxyAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c2714033385f4c31524f5c0b656c12cfdef00e3a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/NamespacedProxyAdapterTest.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\Cache\Adapter\ProxyAdapter; + +/** + * @group time-sensitive + */ +class NamespacedProxyAdapterTest extends ProxyAdapterTest +{ + public function createCachePool($defaultLifetime = 0) + { + return new ProxyAdapter(new ArrayAdapter($defaultLifetime), 'foo', $defaultLifetime); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c28a4550263df989b985b14f42fd1294c2a2ce1c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php @@ -0,0 +1,128 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use PHPUnit\Framework\TestCase; +use Psr\Cache\CacheItemInterface; +use Symfony\Component\Cache\Adapter\NullAdapter; + +/** + * @group time-sensitive + */ +class NullAdapterTest extends TestCase +{ + public function createCachePool() + { + return new NullAdapter(); + } + + public function testGetItem() + { + $adapter = $this->createCachePool(); + + $item = $adapter->getItem('key'); + $this->assertFalse($item->isHit()); + $this->assertNull($item->get(), "Item's value must be null when isHit is false."); + } + + public function testHasItem() + { + $this->assertFalse($this->createCachePool()->hasItem('key')); + } + + public function testGetItems() + { + $adapter = $this->createCachePool(); + + $keys = array('foo', 'bar', 'baz', 'biz'); + + /** @var CacheItemInterface[] $items */ + $items = $adapter->getItems($keys); + $count = 0; + + foreach ($items as $key => $item) { + $itemKey = $item->getKey(); + + $this->assertEquals($itemKey, $key, 'Keys must be preserved when fetching multiple items'); + $this->assertTrue(in_array($key, $keys), 'Cache key can not change.'); + $this->assertFalse($item->isHit()); + + // Remove $key for $keys + foreach ($keys as $k => $v) { + if ($v === $key) { + unset($keys[$k]); + } + } + + ++$count; + } + + $this->assertSame(4, $count); + } + + public function testIsHit() + { + $adapter = $this->createCachePool(); + + $item = $adapter->getItem('key'); + $this->assertFalse($item->isHit()); + } + + public function testClear() + { + $this->assertTrue($this->createCachePool()->clear()); + } + + public function testDeleteItem() + { + $this->assertTrue($this->createCachePool()->deleteItem('key')); + } + + public function testDeleteItems() + { + $this->assertTrue($this->createCachePool()->deleteItems(array('key', 'foo', 'bar'))); + } + + public function testSave() + { + $adapter = $this->createCachePool(); + + $item = $adapter->getItem('key'); + $this->assertFalse($item->isHit()); + $this->assertNull($item->get(), "Item's value must be null when isHit is false."); + + $this->assertFalse($adapter->save($item)); + } + + public function testDeferredSave() + { + $adapter = $this->createCachePool(); + + $item = $adapter->getItem('key'); + $this->assertFalse($item->isHit()); + $this->assertNull($item->get(), "Item's value must be null when isHit is false."); + + $this->assertFalse($adapter->saveDeferred($item)); + } + + public function testCommit() + { + $adapter = $this->createCachePool(); + + $item = $adapter->getItem('key'); + $this->assertFalse($item->isHit()); + $this->assertNull($item->get(), "Item's value must be null when isHit is false."); + + $this->assertFalse($adapter->saveDeferred($item)); + $this->assertFalse($this->createCachePool()->commit()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b0d2b9cb8a105b0a74c1113026de33f2334a8187 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Symfony\Component\Cache\Adapter\PdoAdapter; + +/** + * @group time-sensitive + */ +class PdoAdapterTest extends AdapterTestCase +{ + protected static $dbFile; + + public static function setupBeforeClass() + { + if (!extension_loaded('pdo_sqlite')) { + self::markTestSkipped('Extension pdo_sqlite required.'); + } + + self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); + + $pool = new PdoAdapter('sqlite:'.self::$dbFile); + $pool->createTable(); + } + + public static function tearDownAfterClass() + { + @unlink(self::$dbFile); + } + + public function createCachePool($defaultLifetime = 0) + { + return new PdoAdapter('sqlite:'.self::$dbFile, 'ns', $defaultLifetime); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b9c396fdc59ebd0157439a48194700c770c0ffa1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.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\Component\Cache\Tests\Adapter; + +use Doctrine\DBAL\DriverManager; +use Symfony\Component\Cache\Adapter\PdoAdapter; + +/** + * @group time-sensitive + */ +class PdoDbalAdapterTest extends AdapterTestCase +{ + protected static $dbFile; + + public static function setupBeforeClass() + { + if (!extension_loaded('pdo_sqlite')) { + self::markTestSkipped('Extension pdo_sqlite required.'); + } + + self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); + + $pool = new PdoAdapter(DriverManager::getConnection(array('driver' => 'pdo_sqlite', 'path' => self::$dbFile))); + $pool->createTable(); + } + + public static function tearDownAfterClass() + { + @unlink(self::$dbFile); + } + + public function createCachePool($defaultLifetime = 0) + { + return new PdoAdapter(DriverManager::getConnection(array('driver' => 'pdo_sqlite', 'path' => self::$dbFile)), '', $defaultLifetime); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ff3351ddf61d96208295a80210774b981b64f870 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Psr\Cache\CacheItemInterface; +use Symfony\Component\Cache\Adapter\NullAdapter; +use Symfony\Component\Cache\Adapter\PhpArrayAdapter; + +/** + * @group time-sensitive + */ +class PhpArrayAdapterTest extends AdapterTestCase +{ + protected $skippedTests = array( + 'testBasicUsage' => 'PhpArrayAdapter is read-only.', + 'testClear' => 'PhpArrayAdapter is read-only.', + 'testClearWithDeferredItems' => 'PhpArrayAdapter is read-only.', + 'testDeleteItem' => 'PhpArrayAdapter is read-only.', + 'testSaveExpired' => 'PhpArrayAdapter is read-only.', + 'testSaveWithoutExpire' => 'PhpArrayAdapter is read-only.', + 'testDeferredSave' => 'PhpArrayAdapter is read-only.', + 'testDeferredSaveWithoutCommit' => 'PhpArrayAdapter is read-only.', + 'testDeleteItems' => 'PhpArrayAdapter is read-only.', + 'testDeleteDeferredItem' => 'PhpArrayAdapter is read-only.', + 'testCommit' => 'PhpArrayAdapter is read-only.', + 'testSaveDeferredWhenChangingValues' => 'PhpArrayAdapter is read-only.', + 'testSaveDeferredOverwrite' => 'PhpArrayAdapter is read-only.', + 'testIsHitDeferred' => 'PhpArrayAdapter is read-only.', + + 'testExpiresAt' => 'PhpArrayAdapter does not support expiration.', + 'testExpiresAtWithNull' => 'PhpArrayAdapter does not support expiration.', + 'testExpiresAfterWithNull' => 'PhpArrayAdapter does not support expiration.', + 'testDeferredExpired' => 'PhpArrayAdapter does not support expiration.', + 'testExpiration' => 'PhpArrayAdapter does not support expiration.', + + 'testGetItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', + 'testGetItemsInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', + 'testHasItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', + 'testDeleteItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', + 'testDeleteItemsInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', + + 'testDefaultLifeTime' => 'PhpArrayAdapter does not allow configuring a default lifetime.', + ); + + private static $file; + + public static function setupBeforeClass() + { + self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php'; + } + + protected function tearDown() + { + if (file_exists(sys_get_temp_dir().'/symfony-cache')) { + FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); + } + } + + public function createCachePool() + { + return new PhpArrayAdapterWrapper(self::$file, new NullAdapter()); + } + + public function testStore() + { + $arrayWithRefs = array(); + $arrayWithRefs[0] = 123; + $arrayWithRefs[1] = &$arrayWithRefs[0]; + + $object = (object) array( + 'foo' => 'bar', + 'foo2' => 'bar2', + ); + + $expected = array( + 'null' => null, + 'serializedString' => serialize($object), + 'arrayWithRefs' => $arrayWithRefs, + 'object' => $object, + 'arrayWithObject' => array('bar' => $object), + ); + + $adapter = $this->createCachePool(); + $adapter->warmUp($expected); + + foreach ($expected as $key => $value) { + $this->assertSame(serialize($value), serialize($adapter->getItem($key)->get()), 'Warm up should create a PHP file that OPCache can load in memory'); + } + } + + public function testStoredFile() + { + $expected = array( + 'integer' => 42, + 'float' => 42.42, + 'boolean' => true, + 'array_simple' => array('foo', 'bar'), + 'array_associative' => array('foo' => 'bar', 'foo2' => 'bar2'), + ); + + $adapter = $this->createCachePool(); + $adapter->warmUp($expected); + + $values = eval(substr(file_get_contents(self::$file), 6)); + + $this->assertSame($expected, $values, 'Warm up should create a PHP file that OPCache can load in memory'); + } +} + +class PhpArrayAdapterWrapper extends PhpArrayAdapter +{ + public function save(CacheItemInterface $item) + { + call_user_func(\Closure::bind(function () use ($item) { + $this->values[$item->getKey()] = $item->get(); + $this->warmUp($this->values); + $this->values = eval(substr(file_get_contents($this->file), 6)); + }, $this, PhpArrayAdapter::class)); + + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7030c0e9c5a6c7bf2660a2571f5d160f3a5a144e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Symfony\Component\Cache\Adapter\FilesystemAdapter; +use Symfony\Component\Cache\Adapter\PhpArrayAdapter; + +/** + * @group time-sensitive + */ +class PhpArrayAdapterWithFallbackTest extends AdapterTestCase +{ + protected $skippedTests = array( + 'testGetItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', + 'testGetItemsInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', + 'testHasItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', + 'testDeleteItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', + 'testDeleteItemsInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', + 'testDefaultLifeTime' => 'PhpArrayAdapter does not allow configuring a default lifetime.', + ); + + private static $file; + + public static function setupBeforeClass() + { + self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php'; + } + + protected function tearDown() + { + if (file_exists(sys_get_temp_dir().'/symfony-cache')) { + FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); + } + } + + public function createCachePool() + { + return new PhpArrayAdapter(self::$file, new FilesystemAdapter('php-array-fallback')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..05e312cbf7f6c12b791169d5ac18efab1727594e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Symfony\Component\Cache\Adapter\PhpFilesAdapter; + +/** + * @group time-sensitive + */ +class PhpFilesAdapterTest extends AdapterTestCase +{ + protected $skippedTests = array( + 'testDefaultLifeTime' => 'PhpFilesAdapter does not allow configuring a default lifetime.', + ); + + public function createCachePool() + { + if (!PhpFilesAdapter::isSupported()) { + $this->markTestSkipped('OPcache extension is not enabled.'); + } + + return new PhpFilesAdapter('sf-cache'); + } + + public static function tearDownAfterClass() + { + FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..85ca36c9ef2636753fcaf02bd629e0fd5bc963bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Predis\Connection\StreamConnection; +use Symfony\Component\Cache\Adapter\RedisAdapter; + +class PredisAdapterTest extends AbstractRedisAdapterTest +{ + public static function setupBeforeClass() + { + parent::setupBeforeClass(); + self::$redis = new \Predis\Client(array('host' => getenv('REDIS_HOST'))); + } + + public function testCreateConnection() + { + $redisHost = getenv('REDIS_HOST'); + + $redis = RedisAdapter::createConnection('redis://'.$redisHost.'/1', array('class' => \Predis\Client::class, 'timeout' => 3)); + $this->assertInstanceOf(\Predis\Client::class, $redis); + + $connection = $redis->getConnection(); + $this->assertInstanceOf(StreamConnection::class, $connection); + + $params = array( + 'scheme' => 'tcp', + 'host' => $redisHost, + 'path' => '', + 'dbindex' => '1', + 'port' => 6379, + 'class' => 'Predis\Client', + 'timeout' => 3, + 'persistent' => 0, + 'persistent_id' => null, + 'read_timeout' => 0, + 'retry_interval' => 0, + 'database' => '1', + 'password' => null, + ); + $this->assertSame($params, $connection->getParameters()->toArray()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..89a98e4db40a59fc1f598c9e50a0e486542459ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.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\Cache\Tests\Adapter; + +class PredisClusterAdapterTest extends AbstractRedisAdapterTest +{ + public static function setupBeforeClass() + { + parent::setupBeforeClass(); + self::$redis = new \Predis\Client(array(getenv('REDIS_HOST'))); + } + + public static function tearDownAfterClass() + { + self::$redis->getConnection()->getConnectionByKey('foo')->executeCommand(self::$redis->createCommand('FLUSHDB')); + self::$redis = null; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ProxyAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ProxyAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c0174dd248222042449b770a76b96aee0d7d61de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/ProxyAdapterTest.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Psr\Cache\CacheItemInterface; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\Cache\Adapter\ProxyAdapter; +use Symfony\Component\Cache\CacheItem; + +/** + * @group time-sensitive + */ +class ProxyAdapterTest extends AdapterTestCase +{ + protected $skippedTests = array( + 'testDeferredSaveWithoutCommit' => 'Assumes a shared cache which ArrayAdapter is not.', + 'testSaveWithoutExpire' => 'Assumes a shared cache which ArrayAdapter is not.', + ); + + public function createCachePool($defaultLifetime = 0) + { + return new ProxyAdapter(new ArrayAdapter(), '', $defaultLifetime); + } + + /** + * @expectedException \Exception + * @expectedExceptionMessage OK bar + */ + public function testProxyfiedItem() + { + $item = new CacheItem(); + $pool = new ProxyAdapter(new TestingArrayAdapter($item)); + + $proxyItem = $pool->getItem('foo'); + + $this->assertFalse($proxyItem === $item); + $pool->save($proxyItem->set('bar')); + } +} + +class TestingArrayAdapter extends ArrayAdapter +{ + private $item; + + public function __construct(CacheItemInterface $item) + { + $this->item = $item; + } + + public function getItem($key) + { + return $this->item; + } + + public function save(CacheItemInterface $item) + { + if ($item === $this->item) { + throw new \Exception('OK '.$item->get()); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..301d531ac35304b6105765afe5303d1d70ffd8bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Symfony\Component\Cache\Adapter\RedisAdapter; + +class RedisAdapterTest extends AbstractRedisAdapterTest +{ + public static function setupBeforeClass() + { + parent::setupBeforeClass(); + self::$redis = new \Redis(); + self::$redis->connect(getenv('REDIS_HOST')); + } + + public function testCreateConnection() + { + $redisHost = getenv('REDIS_HOST'); + + $redis = RedisAdapter::createConnection('redis://'.$redisHost); + $this->assertInstanceOf(\Redis::class, $redis); + $this->assertTrue($redis->isConnected()); + $this->assertSame(0, $redis->getDbNum()); + + $redis = RedisAdapter::createConnection('redis://'.$redisHost.'/2'); + $this->assertSame(2, $redis->getDbNum()); + + $redis = RedisAdapter::createConnection('redis://'.$redisHost, array('timeout' => 3)); + $this->assertEquals(3, $redis->getTimeout()); + + $redis = RedisAdapter::createConnection('redis://'.$redisHost.'?timeout=4'); + $this->assertEquals(4, $redis->getTimeout()); + + $redis = RedisAdapter::createConnection('redis://'.$redisHost, array('read_timeout' => 5)); + $this->assertEquals(5, $redis->getReadTimeout()); + } + + /** + * @dataProvider provideFailedCreateConnection + * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException + * @expectedExceptionMessage Redis connection failed + */ + public function testFailedCreateConnection($dsn) + { + RedisAdapter::createConnection($dsn); + } + + public function provideFailedCreateConnection() + { + return array( + array('redis://localhost:1234'), + array('redis://foo@localhost'), + array('redis://localhost/123'), + ); + } + + /** + * @dataProvider provideInvalidCreateConnection + * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException + * @expectedExceptionMessage Invalid Redis DSN + */ + public function testInvalidCreateConnection($dsn) + { + RedisAdapter::createConnection($dsn); + } + + public function provideInvalidCreateConnection() + { + return array( + array('foo://localhost'), + array('redis://'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisArrayAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisArrayAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bef3eb88729f5354577b30b5983e9d69fcfc93aa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/RedisArrayAdapterTest.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +class RedisArrayAdapterTest extends AbstractRedisAdapterTest +{ + public static function setupBeforeClass() + { + parent::setupBeforeClass(); + if (!class_exists('RedisArray')) { + self::markTestSkipped('The RedisArray class is required.'); + } + self::$redis = new \RedisArray(array(getenv('REDIS_HOST')), array('lazy_connect' => true)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..24586c0ca9aae50399fde9f05f784e70db78ceaf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Adapter; + +use Symfony\Component\Cache\Adapter\FilesystemAdapter; +use Symfony\Component\Cache\Adapter\TagAwareAdapter; + +/** + * @group time-sensitive + */ +class TagAwareAdapterTest extends AdapterTestCase +{ + public function createCachePool($defaultLifetime = 0) + { + return new TagAwareAdapter(new FilesystemAdapter('', $defaultLifetime)); + } + + public static function tearDownAfterClass() + { + FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); + } + + /** + * @expectedException \Psr\Cache\InvalidArgumentException + */ + public function testInvalidTag() + { + $pool = $this->createCachePool(); + $item = $pool->getItem('foo'); + $item->tag(':'); + } + + public function testInvalidateTags() + { + $pool = $this->createCachePool(); + + $i0 = $pool->getItem('i0'); + $i1 = $pool->getItem('i1'); + $i2 = $pool->getItem('i2'); + $i3 = $pool->getItem('i3'); + $foo = $pool->getItem('foo'); + + $pool->save($i0->tag('bar')); + $pool->save($i1->tag('foo')); + $pool->save($i2->tag('foo')->tag('bar')); + $pool->save($i3->tag('foo')->tag('baz')); + $pool->save($foo); + + $pool->invalidateTags(array('bar')); + + $this->assertFalse($pool->getItem('i0')->isHit()); + $this->assertTrue($pool->getItem('i1')->isHit()); + $this->assertFalse($pool->getItem('i2')->isHit()); + $this->assertTrue($pool->getItem('i3')->isHit()); + $this->assertTrue($pool->getItem('foo')->isHit()); + + $pool->invalidateTags(array('foo')); + + $this->assertFalse($pool->getItem('i1')->isHit()); + $this->assertFalse($pool->getItem('i3')->isHit()); + $this->assertTrue($pool->getItem('foo')->isHit()); + } + + public function testTagsAreCleanedOnSave() + { + $pool = $this->createCachePool(); + + $i = $pool->getItem('k'); + $pool->save($i->tag('foo')); + + $i = $pool->getItem('k'); + $pool->save($i->tag('bar')); + + $pool->invalidateTags(array('foo')); + $this->assertTrue($pool->getItem('k')->isHit()); + } + + public function testTagsAreCleanedOnDelete() + { + $pool = $this->createCachePool(); + + $i = $pool->getItem('k'); + $pool->save($i->tag('foo')); + $pool->deleteItem('k'); + + $pool->save($pool->getItem('k')); + $pool->invalidateTags(array('foo')); + + $this->assertTrue($pool->getItem('k')->isHit()); + } + + public function testTagItemExpiry() + { + $pool = $this->createCachePool(10); + + $item = $pool->getItem('foo'); + $item->tag(array('baz')); + $item->expiresAfter(100); + + $pool->save($item); + $pool->invalidateTags(array('baz')); + $this->assertFalse($pool->getItem('foo')->isHit()); + + sleep(20); + + $this->assertFalse($pool->getItem('foo')->isHit()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/CacheItemTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/CacheItemTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4e455c64a48ccd2b15b8cfd27c2d3aed1349d7a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/CacheItemTest.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Cache\CacheItem; + +class CacheItemTest extends TestCase +{ + public function testValidKey() + { + $this->assertNull(CacheItem::validateKey('foo')); + } + + /** + * @dataProvider provideInvalidKey + * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException + * @expectedExceptionMessage Cache key + */ + public function testInvalidKey($key) + { + CacheItem::validateKey($key); + } + + public function provideInvalidKey() + { + return array( + array(''), + array('{'), + array('}'), + array('('), + array(')'), + array('/'), + array('\\'), + array('@'), + array(':'), + array(true), + array(null), + array(1), + array(1.1), + array(array(array())), + array(new \Exception('foo')), + ); + } + + public function testTag() + { + $item = new CacheItem(); + + $this->assertSame($item, $item->tag('foo')); + $this->assertSame($item, $item->tag(array('bar', 'baz'))); + + call_user_func(\Closure::bind(function () use ($item) { + $this->assertSame(array('foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'), $item->tags); + }, $this, CacheItem::class)); + } + + /** + * @dataProvider provideInvalidKey + * @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException + * @expectedExceptionMessage Cache tag + */ + public function testInvalidTag($tag) + { + $item = new CacheItem(); + $item->tag($tag); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/DoctrineProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/DoctrineProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..91a5516ab771988a0d8a5f10ab35bbe2971ae445 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/DoctrineProviderTest.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\Component\Cache\Tests; + +use Doctrine\Common\Cache\CacheProvider; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\Cache\DoctrineProvider; + +class DoctrineProviderTest extends TestCase +{ + public function testProvider() + { + $pool = new ArrayAdapter(); + $cache = new DoctrineProvider($pool); + + $this->assertInstanceOf(CacheProvider::class, $cache); + + $key = '{}()/\@:'; + + $this->assertTrue($cache->delete($key)); + $this->assertFalse($cache->contains($key)); + + $this->assertTrue($cache->save($key, 'bar')); + $this->assertTrue($cache->contains($key)); + $this->assertSame('bar', $cache->fetch($key)); + + $this->assertTrue($cache->delete($key)); + $this->assertFalse($cache->fetch($key)); + $this->assertTrue($cache->save($key, 'bar')); + + $cache->flushAll(); + $this->assertFalse($cache->fetch($key)); + $this->assertFalse($cache->contains($key)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Fixtures/ExternalAdapter.php b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Fixtures/ExternalAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..493906ea0cccc41e0ab3bada6db530805f1c52d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/Tests/Fixtures/ExternalAdapter.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Fixtures; + +use Psr\Cache\CacheItemInterface; +use Psr\Cache\CacheItemPoolInterface; +use Symfony\Component\Cache\Adapter\ArrayAdapter; + +/** + * Adapter not implementing the {@see \Symfony\Component\Cache\Adapter\AdapterInterface}. + * + * @author Kévin Dunglas + */ +class ExternalAdapter implements CacheItemPoolInterface +{ + private $cache; + + public function __construct() + { + $this->cache = new ArrayAdapter(); + } + + public function getItem($key) + { + return $this->cache->getItem($key); + } + + public function getItems(array $keys = array()) + { + return $this->cache->getItems($keys); + } + + public function hasItem($key) + { + return $this->cache->hasItem($key); + } + + public function clear() + { + return $this->cache->clear(); + } + + public function deleteItem($key) + { + return $this->cache->deleteItem($key); + } + + public function deleteItems(array $keys) + { + return $this->cache->deleteItems($keys); + } + + public function save(CacheItemInterface $item) + { + return $this->cache->save($item); + } + + public function saveDeferred(CacheItemInterface $item) + { + return $this->cache->saveDeferred($item); + } + + public function commit() + { + return $this->cache->commit(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Cache/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..3746cea7deb46d9770daab4ae1b42261a60323ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/composer.json @@ -0,0 +1,47 @@ +{ + "name": "symfony/cache", + "type": "library", + "description": "Symfony implementation of PSR-6", + "keywords": ["caching", "psr6"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "provide": { + "psr/cache-implementation": "1.0" + }, + "require": { + "php": ">=5.5.9", + "psr/cache": "~1.0", + "psr/log": "~1.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "~1.6", + "doctrine/dbal": "~2.4", + "predis/predis": "~1.0" + }, + "suggest": { + "symfony/polyfill-apcu": "For using ApcuAdapter on HHVM" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Cache\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Cache/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Cache/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..3e164e64b50d9df9d44f88bdfc8a7708f221afcf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Cache/phpunit.xml.dist @@ -0,0 +1,40 @@ + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + + + + + + Cache\IntegrationTests + Doctrine\Common\Cache + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ApcClassLoader.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ApcClassLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..5500e3628902d4a6edf5762dbe899443d207a3c6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ApcClassLoader.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\Component\ClassLoader; + +/** + * ApcClassLoader implements a wrapping autoloader cached in APC for PHP 5.3. + * + * It expects an object implementing a findFile method to find the file. This + * allows using it as a wrapper around the other loaders of the component (the + * ClassLoader for instance) but also around any other autoloaders following + * this convention (the Composer one for instance). + * + * // with a Symfony autoloader + * use Symfony\Component\ClassLoader\ClassLoader; + * + * $loader = new ClassLoader(); + * $loader->addPrefix('Symfony\Component', __DIR__.'/component'); + * $loader->addPrefix('Symfony', __DIR__.'/framework'); + * + * // or with a Composer autoloader + * use Composer\Autoload\ClassLoader; + * + * $loader = new ClassLoader(); + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * $cachedLoader = new ApcClassLoader('my_prefix', $loader); + * + * // activate the cached autoloader + * $cachedLoader->register(); + * + * // eventually deactivate the non-cached loader if it was registered previously + * // to be sure to use the cached one. + * $loader->unregister(); + * + * @author Fabien Potencier + * @author Kris Wallsmith + */ +class ApcClassLoader +{ + private $prefix; + + /** + * A class loader object that implements the findFile() method. + * + * @var object + */ + protected $decorated; + + /** + * Constructor. + * + * @param string $prefix The APC namespace prefix to use + * @param object $decorated A class loader object that implements the findFile() method + * + * @throws \RuntimeException + * @throws \InvalidArgumentException + */ + public function __construct($prefix, $decorated) + { + if (!function_exists('apcu_fetch')) { + throw new \RuntimeException('Unable to use ApcClassLoader as APC is not installed.'); + } + + if (!method_exists($decorated, 'findFile')) { + throw new \InvalidArgumentException('The class finder must implement a "findFile" method.'); + } + + $this->prefix = $prefix; + $this->decorated = $decorated; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * + * @return bool|null True, if loaded + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + require $file; + + return true; + } + } + + /** + * Finds a file by class name while caching lookups to APC. + * + * @param string $class A class name to resolve to file + * + * @return string|null + */ + public function findFile($class) + { + $file = apcu_fetch($this->prefix.$class, $success); + + if (!$success) { + apcu_store($this->prefix.$class, $file = $this->decorated->findFile($class) ?: null); + } + + return $file; + } + + /** + * Passes through all unknown calls onto the decorated object. + */ + public function __call($method, $args) + { + return call_user_func_array(array($this->decorated, $method), $args); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..64ef8d9c9bcfa71ab52323d149c1f55ba9233857 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/CHANGELOG.md @@ -0,0 +1,36 @@ +CHANGELOG +========= + +3.0.0 +----- + + * The DebugClassLoader class has been removed + * The DebugUniversalClassLoader class has been removed + * The UniversalClassLoader class has been removed + * The ApcUniversalClassLoader class has been removed + +2.4.0 +----- + + * deprecated the UniversalClassLoader in favor of the ClassLoader class instead + * deprecated the ApcUniversalClassLoader in favor of the ApcClassLoader class instead + * deprecated the DebugUniversalClassLoader in favor of the DebugClassLoader class from the Debug component + * deprecated the DebugClassLoader as it has been moved to the Debug component instead + +2.3.0 +----- + + * added a WinCacheClassLoader for WinCache + +2.1.0 +----- + + * added a DebugClassLoader able to wrap any autoloader providing a findFile + method + * added a new ApcClassLoader and XcacheClassLoader using composition to wrap + other loaders + * added a new ClassLoader which does not distinguish between namespaced and + pear-like classes (as the PEAR convention is a subset of PSR-0) and + supports using Composer's namespace maps + * added a class map generator + * added support for loading globally-installed PEAR packages diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..e45c3f8cb1ab69e7ecd9f113453f5b820249e4ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php @@ -0,0 +1,444 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\ClassLoader; + +/** + * ClassCollectionLoader. + * + * @author Fabien Potencier + */ +class ClassCollectionLoader +{ + private static $loaded; + private static $seen; + private static $useTokenizer = true; + + /** + * Loads a list of classes and caches them in one big file. + * + * @param array $classes An array of classes to load + * @param string $cacheDir A cache directory + * @param string $name The cache name prefix + * @param bool $autoReload Whether to flush the cache when the cache is stale or not + * @param bool $adaptive Whether to remove already declared classes or not + * @param string $extension File extension of the resulting file + * + * @throws \InvalidArgumentException When class can't be loaded + */ + public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php') + { + // each $name can only be loaded once per PHP process + if (isset(self::$loaded[$name])) { + return; + } + + self::$loaded[$name] = true; + + if ($adaptive) { + $declared = array_merge(get_declared_classes(), get_declared_interfaces(), get_declared_traits()); + + // don't include already declared classes + $classes = array_diff($classes, $declared); + + // the cache is different depending on which classes are already declared + $name = $name.'-'.substr(hash('sha256', implode('|', $classes)), 0, 5); + } + + $classes = array_unique($classes); + + // cache the core classes + if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) { + throw new \RuntimeException(sprintf('Class Collection Loader was not able to create directory "%s"', $cacheDir)); + } + $cacheDir = rtrim(realpath($cacheDir) ?: $cacheDir, '/'.DIRECTORY_SEPARATOR); + $cache = $cacheDir.'/'.$name.$extension; + + // auto-reload + $reload = false; + if ($autoReload) { + $metadata = $cache.'.meta'; + if (!is_file($metadata) || !is_file($cache)) { + $reload = true; + } else { + $time = filemtime($cache); + $meta = unserialize(file_get_contents($metadata)); + + sort($meta[1]); + sort($classes); + + if ($meta[1] != $classes) { + $reload = true; + } else { + foreach ($meta[0] as $resource) { + if (!is_file($resource) || filemtime($resource) > $time) { + $reload = true; + + break; + } + } + } + } + } + + if (!$reload && file_exists($cache)) { + require_once $cache; + + return; + } + if (!$adaptive) { + $declared = array_merge(get_declared_classes(), get_declared_interfaces(), get_declared_traits()); + } + + $files = self::inline($classes, $cache, $declared); + + if ($autoReload) { + // save the resources + self::writeCacheFile($metadata, serialize(array(array_values($files), $classes))); + } + } + + /** + * Generates a file where classes and their parents are inlined. + * + * @param array $classes An array of classes to load + * @param string $cache The file where classes are inlined + * @param array $excluded An array of classes that won't be inlined + * + * @return array The source map of inlined classes, with classes as keys and files as values + * + * @throws \RuntimeException When class can't be loaded + */ + public static function inline($classes, $cache, array $excluded) + { + $declared = array(); + foreach (self::getOrderedClasses($excluded) as $class) { + $declared[$class->getName()] = true; + } + + // cache the core classes + $cacheDir = dirname($cache); + if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) { + throw new \RuntimeException(sprintf('Class Collection Loader was not able to create directory "%s"', $cacheDir)); + } + + $spacesRegex = '(?:\s*+(?:(?:\#|//)[^\n]*+\n|/\*(?:(?getName()])) { + continue; + } + $declared[$class->getName()] = true; + + $files[$class->getName()] = $file = $class->getFileName(); + $c = file_get_contents($file); + + if (preg_match($dontInlineRegex, $c)) { + $file = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $file)); + + for ($i = 0; isset($file[$i], $cacheDir[$i]); ++$i) { + if ($file[$i] !== $cacheDir[$i]) { + break; + } + } + if (1 >= $i) { + $file = var_export(implode('/', $file), true); + } else { + $file = array_slice($file, $i); + $file = str_repeat('../', count($cacheDir) - $i).implode('/', $file); + $file = '__DIR__.'.var_export('/'.$file, true); + } + + $c = "\nnamespace {require $file;}"; + } else { + $c = preg_replace(array('/^\s*<\?php/', '/\?>\s*$/'), '', $c); + + // fakes namespace declaration for global code + if (!$class->inNamespace()) { + $c = "\nnamespace\n{\n".$c."\n}\n"; + } + + $c = self::fixNamespaceDeclarations('= 70000) { + // PHP 7 memory manager will not release after token_get_all(), see https://bugs.php.net/70098 + unset($tokens, $rawChunk); + gc_mem_caches(); + } + + return $output; + } + + /** + * This method is only useful for testing. + */ + public static function enableTokenizer($bool) + { + self::$useTokenizer = (bool) $bool; + } + + /** + * Strips leading & trailing ws, multiple EOL, multiple ws. + * + * @param string $code Original PHP code + * + * @return string compressed code + */ + private static function compressCode($code) + { + return preg_replace( + array('/^\s+/m', '/\s+$/m', '/([\n\r]+ *[\n\r]+)+/', '/[ \t]+/'), + array('', '', "\n", ' '), + $code + ); + } + + /** + * Writes a cache file. + * + * @param string $file Filename + * @param string $content Temporary file content + * + * @throws \RuntimeException when a cache file cannot be written + */ + private static function writeCacheFile($file, $content) + { + $dir = dirname($file); + if (!is_writable($dir)) { + throw new \RuntimeException(sprintf('Cache directory "%s" is not writable.', $dir)); + } + + $tmpFile = tempnam($dir, basename($file)); + + if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) { + @chmod($file, 0666 & ~umask()); + + return; + } + + throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $file)); + } + + /** + * Gets an ordered array of passed classes including all their dependencies. + * + * @param array $classes + * + * @return \ReflectionClass[] An array of sorted \ReflectionClass instances (dependencies added if needed) + * + * @throws \InvalidArgumentException When a class can't be loaded + */ + private static function getOrderedClasses(array $classes) + { + $map = array(); + self::$seen = array(); + foreach ($classes as $class) { + try { + $reflectionClass = new \ReflectionClass($class); + } catch (\ReflectionException $e) { + throw new \InvalidArgumentException(sprintf('Unable to load class "%s"', $class)); + } + + $map = array_merge($map, self::getClassHierarchy($reflectionClass)); + } + + return $map; + } + + private static function getClassHierarchy(\ReflectionClass $class) + { + if (isset(self::$seen[$class->getName()])) { + return array(); + } + + self::$seen[$class->getName()] = true; + + $classes = array($class); + $parent = $class; + while (($parent = $parent->getParentClass()) && $parent->isUserDefined() && !isset(self::$seen[$parent->getName()])) { + self::$seen[$parent->getName()] = true; + + array_unshift($classes, $parent); + } + + $traits = array(); + + foreach ($classes as $c) { + foreach (self::resolveDependencies(self::computeTraitDeps($c), $c) as $trait) { + if ($trait !== $c) { + $traits[] = $trait; + } + } + } + + return array_merge(self::getInterfaces($class), $traits, $classes); + } + + private static function getInterfaces(\ReflectionClass $class) + { + $classes = array(); + + foreach ($class->getInterfaces() as $interface) { + $classes = array_merge($classes, self::getInterfaces($interface)); + } + + if ($class->isUserDefined() && $class->isInterface() && !isset(self::$seen[$class->getName()])) { + self::$seen[$class->getName()] = true; + + $classes[] = $class; + } + + return $classes; + } + + private static function computeTraitDeps(\ReflectionClass $class) + { + $traits = $class->getTraits(); + $deps = array($class->getName() => $traits); + while ($trait = array_pop($traits)) { + if ($trait->isUserDefined() && !isset(self::$seen[$trait->getName()])) { + self::$seen[$trait->getName()] = true; + $traitDeps = $trait->getTraits(); + $deps[$trait->getName()] = $traitDeps; + $traits = array_merge($traits, $traitDeps); + } + } + + return $deps; + } + + /** + * Dependencies resolution. + * + * This function does not check for circular dependencies as it should never + * occur with PHP traits. + * + * @param array $tree The dependency tree + * @param \ReflectionClass $node The node + * @param \ArrayObject $resolved An array of already resolved dependencies + * @param \ArrayObject $unresolved An array of dependencies to be resolved + * + * @return \ArrayObject The dependencies for the given node + * + * @throws \RuntimeException if a circular dependency is detected + */ + private static function resolveDependencies(array $tree, $node, \ArrayObject $resolved = null, \ArrayObject $unresolved = null) + { + if (null === $resolved) { + $resolved = new \ArrayObject(); + } + if (null === $unresolved) { + $unresolved = new \ArrayObject(); + } + $nodeName = $node->getName(); + + if (isset($tree[$nodeName])) { + $unresolved[$nodeName] = $node; + foreach ($tree[$nodeName] as $dependency) { + if (!$resolved->offsetExists($dependency->getName())) { + self::resolveDependencies($tree, $dependency, $resolved, $unresolved); + } + } + $resolved[$nodeName] = $node; + unset($unresolved[$nodeName]); + } + + return $resolved; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassLoader.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..a506dc094194664a940cf6c6befadf4a1899d767 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassLoader.php @@ -0,0 +1,203 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\ClassLoader; + +/** + * ClassLoader implements an PSR-0 class loader. + * + * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md + * + * $loader = new ClassLoader(); + * + * // register classes with namespaces + * $loader->addPrefix('Symfony\Component', __DIR__.'/component'); + * $loader->addPrefix('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (e.g. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * @author Fabien Potencier + * @author Jordi Boggiano + */ +class ClassLoader +{ + private $prefixes = array(); + private $fallbackDirs = array(); + private $useIncludePath = false; + + /** + * Returns prefixes. + * + * @return array + */ + public function getPrefixes() + { + return $this->prefixes; + } + + /** + * Returns fallback directories. + * + * @return array + */ + public function getFallbackDirs() + { + return $this->fallbackDirs; + } + + /** + * Adds prefixes. + * + * @param array $prefixes Prefixes to add + */ + public function addPrefixes(array $prefixes) + { + foreach ($prefixes as $prefix => $path) { + $this->addPrefix($prefix, $path); + } + } + + /** + * Registers a set of classes. + * + * @param string $prefix The classes prefix + * @param array|string $paths The location(s) of the classes + */ + public function addPrefix($prefix, $paths) + { + if (!$prefix) { + foreach ((array) $paths as $path) { + $this->fallbackDirs[] = $path; + } + + return; + } + if (isset($this->prefixes[$prefix])) { + if (is_array($paths)) { + $this->prefixes[$prefix] = array_unique(array_merge( + $this->prefixes[$prefix], + $paths + )); + } elseif (!in_array($paths, $this->prefixes[$prefix])) { + $this->prefixes[$prefix][] = $paths; + } + } else { + $this->prefixes[$prefix] = array_unique((array) $paths); + } + } + + /** + * Turns on searching the include for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = (bool) $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * + * @return bool|null True, if loaded + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + require $file; + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|null The path, if found + */ + public function findFile($class) + { + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)).DIRECTORY_SEPARATOR; + $className = substr($class, $pos + 1); + } else { + // PEAR-like class name + $classPath = null; + $className = $class; + } + + $classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className).'.php'; + + foreach ($this->prefixes as $prefix => $dirs) { + if ($class === strstr($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) { + return $dir.DIRECTORY_SEPARATOR.$classPath; + } + } + } + } + + foreach ($this->fallbackDirs as $dir) { + if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) { + return $dir.DIRECTORY_SEPARATOR.$classPath; + } + } + + if ($this->useIncludePath && $file = stream_resolve_include_path($classPath)) { + return $file; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassMapGenerator.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassMapGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..810a70b6d2e755f5959ce316a2f60c525f8f821b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassMapGenerator.php @@ -0,0 +1,156 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\ClassLoader; + +/** + * ClassMapGenerator. + * + * @author Gyula Sallai + */ +class ClassMapGenerator +{ + /** + * Generate a class map file. + * + * @param array|string $dirs Directories or a single path to search in + * @param string $file The name of the class map file + */ + public static function dump($dirs, $file) + { + $dirs = (array) $dirs; + $maps = array(); + + foreach ($dirs as $dir) { + $maps = array_merge($maps, static::createMap($dir)); + } + + file_put_contents($file, sprintf('isFile()) { + continue; + } + + $path = $file->getRealPath() ?: $file->getPathname(); + + if (pathinfo($path, PATHINFO_EXTENSION) !== 'php') { + continue; + } + + $classes = self::findClasses($path); + + if (PHP_VERSION_ID >= 70000) { + // PHP 7 memory manager will not release after token_get_all(), see https://bugs.php.net/70098 + gc_mem_caches(); + } + + foreach ($classes as $class) { + $map[$class] = $path; + } + } + + return $map; + } + + /** + * Extract the classes in the given file. + * + * @param string $path The file to check + * + * @return array The found classes + */ + private static function findClasses($path) + { + $contents = file_get_contents($path); + $tokens = token_get_all($contents); + + $classes = array(); + + $namespace = ''; + for ($i = 0; isset($tokens[$i]); ++$i) { + $token = $tokens[$i]; + + if (!isset($token[1])) { + continue; + } + + $class = ''; + + switch ($token[0]) { + case T_NAMESPACE: + $namespace = ''; + // If there is a namespace, extract it + while (isset($tokens[++$i][1])) { + if (in_array($tokens[$i][0], array(T_STRING, T_NS_SEPARATOR))) { + $namespace .= $tokens[$i][1]; + } + } + $namespace .= '\\'; + break; + case T_CLASS: + case T_INTERFACE: + case T_TRAIT: + // Skip usage of ::class constant + $isClassConstant = false; + for ($j = $i - 1; $j > 0; --$j) { + if (!isset($tokens[$j][1])) { + break; + } + + if (T_DOUBLE_COLON === $tokens[$j][0]) { + $isClassConstant = true; + break; + } elseif (!in_array($tokens[$j][0], array(T_WHITESPACE, T_DOC_COMMENT, T_COMMENT))) { + break; + } + } + + if ($isClassConstant) { + break; + } + + // Find the classname + while (isset($tokens[++$i][1])) { + $t = $tokens[$i]; + if (T_STRING === $t[0]) { + $class .= $t[1]; + } elseif ('' !== $class && T_WHITESPACE === $t[0]) { + break; + } + } + + $classes[] = ltrim($namespace.$class, '\\'); + break; + default: + break; + } + } + + return $classes; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/MapClassLoader.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/MapClassLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..1d8bcc2a026b226cb8077ca85a011e75e89a161b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/MapClassLoader.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\ClassLoader; + +/** + * A class loader that uses a mapping file to look up paths. + * + * @author Fabien Potencier + */ +class MapClassLoader +{ + private $map = array(); + + /** + * Constructor. + * + * @param array $map A map where keys are classes and values the absolute file path + */ + public function __construct(array $map) + { + $this->map = $map; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + */ + public function loadClass($class) + { + if (isset($this->map[$class])) { + require $this->map[$class]; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|null The path, if found + */ + public function findFile($class) + { + if (isset($this->map[$class])) { + return $this->map[$class]; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Psr4ClassLoader.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Psr4ClassLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..84647b758de160862d6b8f1119351106d6e0e386 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Psr4ClassLoader.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\Component\ClassLoader; + +/** + * A PSR-4 compatible class loader. + * + * See http://www.php-fig.org/psr/psr-4/ + * + * @author Alexander M. Turek + */ +class Psr4ClassLoader +{ + /** + * @var array + */ + private $prefixes = array(); + + /** + * @param string $prefix + * @param string $baseDir + */ + public function addPrefix($prefix, $baseDir) + { + $prefix = trim($prefix, '\\').'\\'; + $baseDir = rtrim($baseDir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; + $this->prefixes[] = array($prefix, $baseDir); + } + + /** + * @param string $class + * + * @return string|null + */ + public function findFile($class) + { + $class = ltrim($class, '\\'); + + foreach ($this->prefixes as list($currentPrefix, $currentBaseDir)) { + if (0 === strpos($class, $currentPrefix)) { + $classWithoutPrefix = substr($class, strlen($currentPrefix)); + $file = $currentBaseDir.str_replace('\\', DIRECTORY_SEPARATOR, $classWithoutPrefix).'.php'; + if (file_exists($file)) { + return $file; + } + } + } + } + + /** + * @param string $class + * + * @return bool + */ + public function loadClass($class) + { + $file = $this->findFile($class); + if (null !== $file) { + require $file; + + return true; + } + + return false; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Removes this instance from the registered autoloaders. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/README.md b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d61992b6a80e73cd9fc5fd9765c04fb470e04960 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/README.md @@ -0,0 +1,14 @@ +ClassLoader Component +===================== + +The ClassLoader component provides tools to autoload your classes and cache +their locations for performance. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/class_loader/index.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/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8ad7132ee9ea6f212a80f2bc768e61b639686056 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php @@ -0,0 +1,197 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\ClassLoader\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\ClassLoader\ApcClassLoader; +use Symfony\Component\ClassLoader\ClassLoader; + +class ApcClassLoaderTest extends TestCase +{ + protected function setUp() + { + if (!(ini_get('apc.enabled') && ini_get('apc.enable_cli'))) { + $this->markTestSkipped('The apc extension is not enabled.'); + } else { + apcu_clear_cache(); + } + } + + protected function tearDown() + { + if (ini_get('apc.enabled') && ini_get('apc.enable_cli')) { + apcu_clear_cache(); + } + } + + public function testConstructor() + { + $loader = new ClassLoader(); + $loader->addPrefix('Apc\Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + + $loader = new ApcClassLoader('test.prefix.', $loader); + + $this->assertEquals($loader->findFile('\Apc\Namespaced\FooBar'), apcu_fetch('test.prefix.\Apc\Namespaced\FooBar'), '__construct() takes a prefix as its first argument'); + } + + /** + * @dataProvider getLoadClassTests + */ + public function testLoadClass($className, $testClassName, $message) + { + $loader = new ClassLoader(); + $loader->addPrefix('Apc\Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->addPrefix('Apc_Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + + $loader = new ApcClassLoader('test.prefix.', $loader); + $loader->loadClass($testClassName); + $this->assertTrue(class_exists($className), $message); + } + + public function getLoadClassTests() + { + return array( + array('\\Apc\\Namespaced\\Foo', 'Apc\\Namespaced\\Foo', '->loadClass() loads Apc\Namespaced\Foo class'), + array('Apc_Pearlike_Foo', 'Apc_Pearlike_Foo', '->loadClass() loads Apc_Pearlike_Foo class'), + ); + } + + /** + * @dataProvider getLoadClassFromFallbackTests + */ + public function testLoadClassFromFallback($className, $testClassName, $message) + { + $loader = new ClassLoader(); + $loader->addPrefix('Apc\Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->addPrefix('Apc_Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->addPrefix('', array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/fallback')); + + $loader = new ApcClassLoader('test.prefix.fallback', $loader); + $loader->loadClass($testClassName); + + $this->assertTrue(class_exists($className), $message); + } + + public function getLoadClassFromFallbackTests() + { + return array( + array('\\Apc\\Namespaced\\Baz', 'Apc\\Namespaced\\Baz', '->loadClass() loads Apc\Namespaced\Baz class'), + array('Apc_Pearlike_Baz', 'Apc_Pearlike_Baz', '->loadClass() loads Apc_Pearlike_Baz class'), + array('\\Apc\\Namespaced\\FooBar', 'Apc\\Namespaced\\FooBar', '->loadClass() loads Apc\Namespaced\Baz class from fallback dir'), + array('Apc_Pearlike_FooBar', 'Apc_Pearlike_FooBar', '->loadClass() loads Apc_Pearlike_Baz class from fallback dir'), + ); + } + + /** + * @dataProvider getLoadClassNamespaceCollisionTests + */ + public function testLoadClassNamespaceCollision($namespaces, $className, $message) + { + $loader = new ClassLoader(); + $loader->addPrefixes($namespaces); + + $loader = new ApcClassLoader('test.prefix.collision.', $loader); + $loader->loadClass($className); + + $this->assertTrue(class_exists($className), $message); + } + + public function getLoadClassNamespaceCollisionTests() + { + return array( + array( + array( + 'Apc\\NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', + 'Apc\\NamespaceCollision\\A\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/beta', + ), + 'Apc\NamespaceCollision\A\Foo', + '->loadClass() loads NamespaceCollision\A\Foo from alpha.', + ), + array( + array( + 'Apc\\NamespaceCollision\\A\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/beta', + 'Apc\\NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', + ), + 'Apc\NamespaceCollision\A\Bar', + '->loadClass() loads NamespaceCollision\A\Bar from alpha.', + ), + array( + array( + 'Apc\\NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', + 'Apc\\NamespaceCollision\\A\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/beta', + ), + 'Apc\NamespaceCollision\A\B\Foo', + '->loadClass() loads NamespaceCollision\A\B\Foo from beta.', + ), + array( + array( + 'Apc\\NamespaceCollision\\A\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/beta', + 'Apc\\NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', + ), + 'Apc\NamespaceCollision\A\B\Bar', + '->loadClass() loads NamespaceCollision\A\B\Bar from beta.', + ), + ); + } + + /** + * @dataProvider getLoadClassPrefixCollisionTests + */ + public function testLoadClassPrefixCollision($prefixes, $className, $message) + { + $loader = new ClassLoader(); + $loader->addPrefixes($prefixes); + + $loader = new ApcClassLoader('test.prefix.collision.', $loader); + $loader->loadClass($className); + + $this->assertTrue(class_exists($className), $message); + } + + public function getLoadClassPrefixCollisionTests() + { + return array( + array( + array( + 'ApcPrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', + 'ApcPrefixCollision_A_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/beta/Apc', + ), + 'ApcPrefixCollision_A_Foo', + '->loadClass() loads ApcPrefixCollision_A_Foo from alpha.', + ), + array( + array( + 'ApcPrefixCollision_A_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/beta/Apc', + 'ApcPrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', + ), + 'ApcPrefixCollision_A_Bar', + '->loadClass() loads ApcPrefixCollision_A_Bar from alpha.', + ), + array( + array( + 'ApcPrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', + 'ApcPrefixCollision_A_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/beta/Apc', + ), + 'ApcPrefixCollision_A_B_Foo', + '->loadClass() loads ApcPrefixCollision_A_B_Foo from beta.', + ), + array( + array( + 'ApcPrefixCollision_A_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/beta/Apc', + 'ApcPrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', + ), + 'ApcPrefixCollision_A_B_Bar', + '->loadClass() loads ApcPrefixCollision_A_B_Bar from beta.', + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..42bb04d9a503a4a66af27cd8271efcd900dd4903 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php @@ -0,0 +1,316 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\ClassLoader\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\ClassLoader\ClassCollectionLoader; +use Symfony\Component\ClassLoader\Tests\Fixtures\DeclaredClass; +use Symfony\Component\ClassLoader\Tests\Fixtures\WarmedClass; + +require_once __DIR__.'/Fixtures/ClassesWithParents/GInterface.php'; +require_once __DIR__.'/Fixtures/ClassesWithParents/CInterface.php'; +require_once __DIR__.'/Fixtures/ClassesWithParents/B.php'; +require_once __DIR__.'/Fixtures/ClassesWithParents/A.php'; + +class ClassCollectionLoaderTest extends TestCase +{ + public function testTraitDependencies() + { + require_once __DIR__.'/Fixtures/deps/traits.php'; + + $r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader'); + $m = $r->getMethod('getOrderedClasses'); + $m->setAccessible(true); + + $ordered = $m->invoke(null, array('CTFoo')); + + $this->assertEquals( + array('TD', 'TC', 'TB', 'TA', 'TZ', 'CTFoo'), + array_map(function ($class) { return $class->getName(); }, $ordered) + ); + + $ordered = $m->invoke(null, array('CTBar')); + + $this->assertEquals( + array('TD', 'TZ', 'TC', 'TB', 'TA', 'CTBar'), + array_map(function ($class) { return $class->getName(); }, $ordered) + ); + } + + /** + * @dataProvider getDifferentOrders + */ + public function testClassReordering(array $classes) + { + $expected = array( + 'ClassesWithParents\\GInterface', + 'ClassesWithParents\\CInterface', + 'ClassesWithParents\\B', + 'ClassesWithParents\\A', + ); + + $r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader'); + $m = $r->getMethod('getOrderedClasses'); + $m->setAccessible(true); + + $ordered = $m->invoke(null, $classes); + + $this->assertEquals($expected, array_map(function ($class) { return $class->getName(); }, $ordered)); + } + + public function getDifferentOrders() + { + return array( + array(array( + 'ClassesWithParents\\A', + 'ClassesWithParents\\CInterface', + 'ClassesWithParents\\GInterface', + 'ClassesWithParents\\B', + )), + array(array( + 'ClassesWithParents\\B', + 'ClassesWithParents\\A', + 'ClassesWithParents\\CInterface', + )), + array(array( + 'ClassesWithParents\\CInterface', + 'ClassesWithParents\\B', + 'ClassesWithParents\\A', + )), + array(array( + 'ClassesWithParents\\A', + )), + ); + } + + /** + * @dataProvider getDifferentOrdersForTraits + */ + public function testClassWithTraitsReordering(array $classes) + { + require_once __DIR__.'/Fixtures/ClassesWithParents/ATrait.php'; + require_once __DIR__.'/Fixtures/ClassesWithParents/BTrait.php'; + require_once __DIR__.'/Fixtures/ClassesWithParents/CTrait.php'; + require_once __DIR__.'/Fixtures/ClassesWithParents/D.php'; + require_once __DIR__.'/Fixtures/ClassesWithParents/E.php'; + + $expected = array( + 'ClassesWithParents\\GInterface', + 'ClassesWithParents\\CInterface', + 'ClassesWithParents\\ATrait', + 'ClassesWithParents\\BTrait', + 'ClassesWithParents\\CTrait', + 'ClassesWithParents\\B', + 'ClassesWithParents\\A', + 'ClassesWithParents\\D', + 'ClassesWithParents\\E', + ); + + $r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader'); + $m = $r->getMethod('getOrderedClasses'); + $m->setAccessible(true); + + $ordered = $m->invoke(null, $classes); + + $this->assertEquals($expected, array_map(function ($class) { return $class->getName(); }, $ordered)); + } + + public function getDifferentOrdersForTraits() + { + return array( + array(array( + 'ClassesWithParents\\E', + 'ClassesWithParents\\ATrait', + )), + array(array( + 'ClassesWithParents\\E', + )), + ); + } + + public function testFixClassWithTraitsOrdering() + { + require_once __DIR__.'/Fixtures/ClassesWithParents/CTrait.php'; + require_once __DIR__.'/Fixtures/ClassesWithParents/F.php'; + require_once __DIR__.'/Fixtures/ClassesWithParents/G.php'; + + $classes = array( + 'ClassesWithParents\\F', + 'ClassesWithParents\\G', + ); + + $expected = array( + 'ClassesWithParents\\CTrait', + 'ClassesWithParents\\F', + 'ClassesWithParents\\G', + ); + + $r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader'); + $m = $r->getMethod('getOrderedClasses'); + $m->setAccessible(true); + + $ordered = $m->invoke(null, $classes); + + $this->assertEquals($expected, array_map(function ($class) { return $class->getName(); }, $ordered)); + } + + /** + * @dataProvider getFixNamespaceDeclarationsData + */ + public function testFixNamespaceDeclarations($source, $expected) + { + $this->assertEquals('assertEquals('assertEquals(<<<'EOF' +namespace Namespaced +{ +class WithComments +{ +public static $loaded = true; +} +$string ='string should not be modified {$string}'; +$heredoc = (<<assertTrue(class_exists(WarmedClass::class, true)); + + @unlink($cache = sys_get_temp_dir().'/inline.php'); + + $classes = array(WarmedClass::class); + $excluded = array(DeclaredClass::class); + + ClassCollectionLoader::inline($classes, $cache, $excluded); + + $this->assertSame(<<<'EOTXT' + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\ClassLoader\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\ClassLoader\ClassLoader; + +class ClassLoaderTest extends TestCase +{ + public function testGetPrefixes() + { + $loader = new ClassLoader(); + $loader->addPrefix('Foo', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->addPrefix('Bar', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->addPrefix('Bas', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $prefixes = $loader->getPrefixes(); + $this->assertArrayHasKey('Foo', $prefixes); + $this->assertArrayNotHasKey('Foo1', $prefixes); + $this->assertArrayHasKey('Bar', $prefixes); + $this->assertArrayHasKey('Bas', $prefixes); + } + + public function testGetFallbackDirs() + { + $loader = new ClassLoader(); + $loader->addPrefix(null, __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->addPrefix(null, __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $fallback_dirs = $loader->getFallbackDirs(); + $this->assertCount(2, $fallback_dirs); + } + + /** + * @dataProvider getLoadClassTests + */ + public function testLoadClass($className, $testClassName, $message) + { + $loader = new ClassLoader(); + $loader->addPrefix('Namespaced2\\', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->addPrefix('Pearlike2_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->loadClass($testClassName); + $this->assertTrue(class_exists($className), $message); + } + + public function getLoadClassTests() + { + return array( + array('\\Namespaced2\\Foo', 'Namespaced2\\Foo', '->loadClass() loads Namespaced2\Foo class'), + array('\\Pearlike2_Foo', 'Pearlike2_Foo', '->loadClass() loads Pearlike2_Foo class'), + ); + } + + /** + * @dataProvider getLoadNonexistentClassTests + */ + public function testLoadNonexistentClass($className, $testClassName, $message) + { + $loader = new ClassLoader(); + $loader->addPrefix('Namespaced2\\', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->addPrefix('Pearlike2_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->loadClass($testClassName); + $this->assertFalse(class_exists($className), $message); + } + + public function getLoadNonexistentClassTests() + { + return array( + array('\\Pearlike3_Bar', '\\Pearlike3_Bar', '->loadClass() loads non existing Pearlike3_Bar class with a leading slash'), + ); + } + + public function testAddPrefixSingle() + { + $loader = new ClassLoader(); + $loader->addPrefix('Foo', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->addPrefix('Foo', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $prefixes = $loader->getPrefixes(); + $this->assertArrayHasKey('Foo', $prefixes); + $this->assertCount(1, $prefixes['Foo']); + } + + public function testAddPrefixesSingle() + { + $loader = new ClassLoader(); + $loader->addPrefixes(array('Foo' => array('foo', 'foo'))); + $loader->addPrefixes(array('Foo' => array('foo'))); + $prefixes = $loader->getPrefixes(); + $this->assertArrayHasKey('Foo', $prefixes); + $this->assertCount(1, $prefixes['Foo'], print_r($prefixes, true)); + } + + public function testAddPrefixMulti() + { + $loader = new ClassLoader(); + $loader->addPrefix('Foo', 'foo'); + $loader->addPrefix('Foo', 'bar'); + $prefixes = $loader->getPrefixes(); + $this->assertArrayHasKey('Foo', $prefixes); + $this->assertCount(2, $prefixes['Foo']); + $this->assertContains('foo', $prefixes['Foo']); + $this->assertContains('bar', $prefixes['Foo']); + } + + public function testUseIncludePath() + { + $loader = new ClassLoader(); + $this->assertFalse($loader->getUseIncludePath()); + + $this->assertNull($loader->findFile('Foo')); + + $includePath = get_include_path(); + + $loader->setUseIncludePath(true); + $this->assertTrue($loader->getUseIncludePath()); + + set_include_path(__DIR__.'/Fixtures/includepath'.PATH_SEPARATOR.$includePath); + + $this->assertEquals(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'includepath'.DIRECTORY_SEPARATOR.'Foo.php', $loader->findFile('Foo')); + + set_include_path($includePath); + } + + /** + * @dataProvider getLoadClassFromFallbackTests + */ + public function testLoadClassFromFallback($className, $testClassName, $message) + { + $loader = new ClassLoader(); + $loader->addPrefix('Namespaced2\\', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->addPrefix('Pearlike2_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $loader->addPrefix('', array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/fallback')); + $loader->loadClass($testClassName); + $this->assertTrue(class_exists($className), $message); + } + + public function getLoadClassFromFallbackTests() + { + return array( + array('\\Namespaced2\\Baz', 'Namespaced2\\Baz', '->loadClass() loads Namespaced2\Baz class'), + array('\\Pearlike2_Baz', 'Pearlike2_Baz', '->loadClass() loads Pearlike2_Baz class'), + array('\\Namespaced2\\FooBar', 'Namespaced2\\FooBar', '->loadClass() loads Namespaced2\Baz class from fallback dir'), + array('\\Pearlike2_FooBar', 'Pearlike2_FooBar', '->loadClass() loads Pearlike2_Baz class from fallback dir'), + ); + } + + /** + * @dataProvider getLoadClassNamespaceCollisionTests + */ + public function testLoadClassNamespaceCollision($namespaces, $className, $message) + { + $loader = new ClassLoader(); + $loader->addPrefixes($namespaces); + + $loader->loadClass($className); + $this->assertTrue(class_exists($className), $message); + } + + public function getLoadClassNamespaceCollisionTests() + { + return array( + array( + array( + 'NamespaceCollision\\C' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', + 'NamespaceCollision\\C\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', + ), + 'NamespaceCollision\C\Foo', + '->loadClass() loads NamespaceCollision\C\Foo from alpha.', + ), + array( + array( + 'NamespaceCollision\\C\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', + 'NamespaceCollision\\C' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', + ), + 'NamespaceCollision\C\Bar', + '->loadClass() loads NamespaceCollision\C\Bar from alpha.', + ), + array( + array( + 'NamespaceCollision\\C' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', + 'NamespaceCollision\\C\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', + ), + 'NamespaceCollision\C\B\Foo', + '->loadClass() loads NamespaceCollision\C\B\Foo from beta.', + ), + array( + array( + 'NamespaceCollision\\C\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', + 'NamespaceCollision\\C' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', + ), + 'NamespaceCollision\C\B\Bar', + '->loadClass() loads NamespaceCollision\C\B\Bar from beta.', + ), + array( + array( + 'PrefixCollision_C_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', + 'PrefixCollision_C_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', + ), + 'PrefixCollision_C_Foo', + '->loadClass() loads PrefixCollision_C_Foo from alpha.', + ), + array( + array( + 'PrefixCollision_C_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', + 'PrefixCollision_C_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', + ), + 'PrefixCollision_C_Bar', + '->loadClass() loads PrefixCollision_C_Bar from alpha.', + ), + array( + array( + 'PrefixCollision_C_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', + 'PrefixCollision_C_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', + ), + 'PrefixCollision_C_B_Foo', + '->loadClass() loads PrefixCollision_C_B_Foo from beta.', + ), + array( + array( + 'PrefixCollision_C_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', + 'PrefixCollision_C_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', + ), + 'PrefixCollision_C_B_Bar', + '->loadClass() loads PrefixCollision_C_B_Bar from beta.', + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..44359268a8ed93805a02998237d55f8292e3e4d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php @@ -0,0 +1,148 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\ClassLoader\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\ClassLoader\ClassMapGenerator; + +class ClassMapGeneratorTest extends TestCase +{ + /** + * @var string|null + */ + private $workspace = null; + + public function prepare_workspace() + { + $this->workspace = sys_get_temp_dir().'/'.microtime(true).'.'.mt_rand(); + mkdir($this->workspace, 0777, true); + $this->workspace = realpath($this->workspace); + } + + /** + * @param string $file + */ + private function clean($file) + { + if (is_dir($file) && !is_link($file)) { + $dir = new \FilesystemIterator($file); + foreach ($dir as $childFile) { + $this->clean($childFile); + } + + rmdir($file); + } else { + unlink($file); + } + } + + /** + * @dataProvider getTestCreateMapTests + */ + public function testDump($directory) + { + $this->prepare_workspace(); + + $file = $this->workspace.'/file'; + + $generator = new ClassMapGenerator(); + $generator->dump($directory, $file); + $this->assertFileExists($file); + + $this->clean($this->workspace); + } + + /** + * @dataProvider getTestCreateMapTests + */ + public function testCreateMap($directory, $expected) + { + $this->assertEqualsNormalized($expected, ClassMapGenerator::createMap($directory)); + } + + public function getTestCreateMapTests() + { + $data = array( + array(__DIR__.'/Fixtures/Namespaced', array( + 'Namespaced\\Bar' => realpath(__DIR__).'/Fixtures/Namespaced/Bar.php', + 'Namespaced\\Foo' => realpath(__DIR__).'/Fixtures/Namespaced/Foo.php', + 'Namespaced\\Baz' => realpath(__DIR__).'/Fixtures/Namespaced/Baz.php', + 'Namespaced\\WithComments' => realpath(__DIR__).'/Fixtures/Namespaced/WithComments.php', + 'Namespaced\\WithStrictTypes' => realpath(__DIR__).'/Fixtures/Namespaced/WithStrictTypes.php', + 'Namespaced\\WithHaltCompiler' => realpath(__DIR__).'/Fixtures/Namespaced/WithHaltCompiler.php', + 'Namespaced\\WithDirMagic' => realpath(__DIR__).'/Fixtures/Namespaced/WithDirMagic.php', + 'Namespaced\\WithFileMagic' => realpath(__DIR__).'/Fixtures/Namespaced/WithFileMagic.php', + )), + array(__DIR__.'/Fixtures/beta/NamespaceCollision', array( + 'NamespaceCollision\\A\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Bar.php', + 'NamespaceCollision\\A\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Foo.php', + 'NamespaceCollision\\C\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Bar.php', + 'NamespaceCollision\\C\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Foo.php', + )), + array(__DIR__.'/Fixtures/Pearlike', array( + 'Pearlike_Foo' => realpath(__DIR__).'/Fixtures/Pearlike/Foo.php', + 'Pearlike_Bar' => realpath(__DIR__).'/Fixtures/Pearlike/Bar.php', + 'Pearlike_Baz' => realpath(__DIR__).'/Fixtures/Pearlike/Baz.php', + 'Pearlike_WithComments' => realpath(__DIR__).'/Fixtures/Pearlike/WithComments.php', + )), + array(__DIR__.'/Fixtures/classmap', array( + 'Foo\\Bar\\A' => realpath(__DIR__).'/Fixtures/classmap/sameNsMultipleClasses.php', + 'Foo\\Bar\\B' => realpath(__DIR__).'/Fixtures/classmap/sameNsMultipleClasses.php', + 'A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', + 'Alpha\\A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', + 'Alpha\\B' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', + 'Beta\\A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', + 'Beta\\B' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', + 'ClassMap\\SomeInterface' => realpath(__DIR__).'/Fixtures/classmap/SomeInterface.php', + 'ClassMap\\SomeParent' => realpath(__DIR__).'/Fixtures/classmap/SomeParent.php', + 'ClassMap\\SomeClass' => realpath(__DIR__).'/Fixtures/classmap/SomeClass.php', + )), + array(__DIR__.'/Fixtures/php5.4', array( + 'TFoo' => __DIR__.'/Fixtures/php5.4/traits.php', + 'CFoo' => __DIR__.'/Fixtures/php5.4/traits.php', + 'Foo\\TBar' => __DIR__.'/Fixtures/php5.4/traits.php', + 'Foo\\IBar' => __DIR__.'/Fixtures/php5.4/traits.php', + 'Foo\\TFooBar' => __DIR__.'/Fixtures/php5.4/traits.php', + 'Foo\\CBar' => __DIR__.'/Fixtures/php5.4/traits.php', + )), + array(__DIR__.'/Fixtures/php5.5', array( + 'ClassCons\\Foo' => __DIR__.'/Fixtures/php5.5/class_cons.php', + )), + ); + + return $data; + } + + public function testCreateMapFinderSupport() + { + $finder = new \Symfony\Component\Finder\Finder(); + $finder->files()->in(__DIR__.'/Fixtures/beta/NamespaceCollision'); + + $this->assertEqualsNormalized(array( + 'NamespaceCollision\\A\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Bar.php', + 'NamespaceCollision\\A\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Foo.php', + 'NamespaceCollision\\C\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Bar.php', + 'NamespaceCollision\\C\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Foo.php', + ), ClassMapGenerator::createMap($finder)); + } + + protected function assertEqualsNormalized($expected, $actual, $message = null) + { + foreach ($expected as $ns => $path) { + $expected[$ns] = str_replace('\\', '/', $path); + } + foreach ($actual as $ns => $path) { + $actual[$ns] = str_replace('\\', '/', $path); + } + $this->assertEquals($expected, $actual, $message); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/Bar.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/Bar.php new file mode 100644 index 0000000000000000000000000000000000000000..4259f1451e2c94a5ebb93b72a324a6396d404aa2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/Bar.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Apc\Namespaced; + +class Bar +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/Baz.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/Baz.php new file mode 100644 index 0000000000000000000000000000000000000000..3ddb595e25164aee4320aba4744617499bd828e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/Baz.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Apc\Namespaced; + +class Baz +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/Foo.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/Foo.php new file mode 100644 index 0000000000000000000000000000000000000000..cf0a4b741fd9f382496887df284b6265a0b1051b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/Foo.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Apc\Namespaced; + +class Foo +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/FooBar.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/FooBar.php new file mode 100644 index 0000000000000000000000000000000000000000..bbbc81515a80fbc50eaa9a53f7df596b537d1a6e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/FooBar.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Apc\Namespaced; + +class FooBar +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Pearlike/Bar.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Pearlike/Bar.php new file mode 100644 index 0000000000000000000000000000000000000000..e774cb9bfbbae3adb49f2b4466dbd1dd20ea4c9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Pearlike/Bar.php @@ -0,0 +1,6 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Apc\NamespaceCollision\A; + +class Bar +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Foo.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Foo.php new file mode 100644 index 0000000000000000000000000000000000000000..184a1b1daf159f5c158f7e617cddaefbd1c1c501 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Foo.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Apc\NamespaceCollision\A; + +class Foo +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Bar.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Bar.php new file mode 100644 index 0000000000000000000000000000000000000000..3892f70683debf2b598b3f84f3b0d05c475b1a91 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Bar.php @@ -0,0 +1,6 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Apc\NamespaceCollision\A\B; + +class Bar +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Foo.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Foo.php new file mode 100644 index 0000000000000000000000000000000000000000..450eeb50b9e347401cdca4080f01a935ecfc5538 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Foo.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Apc\NamespaceCollision\A\B; + +class Foo +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/fallback/Apc/Pearlike/FooBar.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/fallback/Apc/Pearlike/FooBar.php new file mode 100644 index 0000000000000000000000000000000000000000..96f2f76c6f94d938aa5855b7e42384b391b3800a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/fallback/Apc/Pearlike/FooBar.php @@ -0,0 +1,6 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Apc\Namespaced; + +class FooBar +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/A.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/A.php new file mode 100644 index 0000000000000000000000000000000000000000..b0f9425950f44c0acbcb5f9d17ca24db24bcf73c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/A.php @@ -0,0 +1,7 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Namespaced; + +class Bar +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/Baz.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/Baz.php new file mode 100644 index 0000000000000000000000000000000000000000..0b0bbd057c44acdb378fcfb859b6a91094013933 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/Baz.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Namespaced; + +class Baz +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/Foo.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/Foo.php new file mode 100644 index 0000000000000000000000000000000000000000..df5e1f4ce2ec33878192110f1c4bc8fd57393d26 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/Foo.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Namespaced; + +class Foo +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php new file mode 100644 index 0000000000000000000000000000000000000000..361e53de1c4ee7989fc73700fce2ed15c82278c3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Namespaced; + +class WithComments +{ + /** @Boolean */ + public static $loaded = true; +} + +$string = 'string should not be modified {$string}'; + +$heredoc = (<< + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +class Pearlike_WithComments +{ + /** @Boolean */ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Pearlike2/Bar.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Pearlike2/Bar.php new file mode 100644 index 0000000000000000000000000000000000000000..7f5f7977308b7f0217e930c39c15e441df3fe2c4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/Pearlike2/Bar.php @@ -0,0 +1,6 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace NamespaceCollision\A; + +class Bar +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/alpha/NamespaceCollision/A/Foo.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/alpha/NamespaceCollision/A/Foo.php new file mode 100644 index 0000000000000000000000000000000000000000..aee6a080dfb76041a0b0bfcb8b83a7b5d5b76efd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/alpha/NamespaceCollision/A/Foo.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace NamespaceCollision\A; + +class Foo +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/alpha/NamespaceCollision/C/Bar.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/alpha/NamespaceCollision/C/Bar.php new file mode 100644 index 0000000000000000000000000000000000000000..c1b8dd65ddfa319b946d4f20c3a8670b9e9dcf30 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/alpha/NamespaceCollision/C/Bar.php @@ -0,0 +1,8 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace NamespaceCollision\A\B; + +class Bar +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/beta/NamespaceCollision/A/B/Foo.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/beta/NamespaceCollision/A/B/Foo.php new file mode 100644 index 0000000000000000000000000000000000000000..f5f2d727ef5e6be849e3882c19dc42fe75b6475e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/beta/NamespaceCollision/A/B/Foo.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace NamespaceCollision\A\B; + +class Foo +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/beta/NamespaceCollision/C/B/Bar.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/beta/NamespaceCollision/C/B/Bar.php new file mode 100644 index 0000000000000000000000000000000000000000..4bb03dc7fd65a921b31b741977c255f79a85fe44 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/beta/NamespaceCollision/C/B/Bar.php @@ -0,0 +1,8 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace ClassMap; + +class SomeClass extends SomeParent implements SomeInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeInterface.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..1fe5e09aa1f50b6f0c4fd39d03441807f326a17a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeInterface.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 ClassMap; + +interface SomeInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeParent.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeParent.php new file mode 100644 index 0000000000000000000000000000000000000000..ce2f9fc6c478ce420407b3e3a61b9fd5bb6a44c4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeParent.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 ClassMap; + +abstract class SomeParent +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/multipleNs.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/multipleNs.php new file mode 100644 index 0000000000000000000000000000000000000000..c7cec646f5f25ab447c1d1bbe1752f09b725ba2b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/multipleNs.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Foo\Bar; + +class A +{ +} +class B +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/deps/traits.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/deps/traits.php new file mode 100644 index 0000000000000000000000000000000000000000..82b30a6f9d0b932d0b5b1d8ddba5c6ec06f64174 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/deps/traits.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Namespaced; + +class FooBar +{ + public static $loaded = true; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/fallback/Namespaced2/FooBar.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/fallback/Namespaced2/FooBar.php new file mode 100644 index 0000000000000000000000000000000000000000..1036d435900659e6a446b039f7c44d9264a5374e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/Tests/Fixtures/fallback/Namespaced2/FooBar.php @@ -0,0 +1,8 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\ClassLoader\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\ClassLoader\Psr4ClassLoader; + +class Psr4ClassLoaderTest extends TestCase +{ + /** + * @param string $className + * @dataProvider getLoadClassTests + */ + public function testLoadClass($className) + { + $loader = new Psr4ClassLoader(); + $loader->addPrefix( + 'Acme\\DemoLib', + __DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'psr-4' + ); + $loader->loadClass($className); + $this->assertTrue(class_exists($className), sprintf('loadClass() should load %s', $className)); + } + + /** + * @return array + */ + public function getLoadClassTests() + { + return array( + array('Acme\\DemoLib\\Foo'), + array('Acme\\DemoLib\\Class_With_Underscores'), + array('Acme\\DemoLib\\Lets\\Go\\Deeper\\Foo'), + array('Acme\\DemoLib\\Lets\\Go\\Deeper\\Class_With_Underscores'), + ); + } + + /** + * @param string $className + * @dataProvider getLoadNonexistentClassTests + */ + public function testLoadNonexistentClass($className) + { + $loader = new Psr4ClassLoader(); + $loader->addPrefix( + 'Acme\\DemoLib', + __DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'psr-4' + ); + $loader->loadClass($className); + $this->assertFalse(class_exists($className), sprintf('loadClass() should not load %s', $className)); + } + + /** + * @return array + */ + public function getLoadNonexistentClassTests() + { + return array( + array('Acme\\DemoLib\\I_Do_Not_Exist'), + array('UnknownVendor\\SomeLib\\I_Do_Not_Exist'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/WinCacheClassLoader.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/WinCacheClassLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..b95a1d79873acc69b48aba21b20b6c32ff7ae86e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/WinCacheClassLoader.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\ClassLoader; + +/** + * WinCacheClassLoader implements a wrapping autoloader cached in WinCache. + * + * It expects an object implementing a findFile method to find the file. This + * allow using it as a wrapper around the other loaders of the component (the + * ClassLoader for instance) but also around any other autoloaders following + * this convention (the Composer one for instance). + * + * // with a Symfony autoloader + * $loader = new ClassLoader(); + * $loader->addPrefix('Symfony\Component', __DIR__.'/component'); + * $loader->addPrefix('Symfony', __DIR__.'/framework'); + * + * // or with a Composer autoloader + * use Composer\Autoload\ClassLoader; + * + * $loader = new ClassLoader(); + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * $cachedLoader = new WinCacheClassLoader('my_prefix', $loader); + * + * // activate the cached autoloader + * $cachedLoader->register(); + * + * // eventually deactivate the non-cached loader if it was registered previously + * // to be sure to use the cached one. + * $loader->unregister(); + * + * @author Fabien Potencier + * @author Kris Wallsmith + * @author Artem Ryzhkov + */ +class WinCacheClassLoader +{ + private $prefix; + + /** + * A class loader object that implements the findFile() method. + * + * @var object + */ + protected $decorated; + + /** + * Constructor. + * + * @param string $prefix The WinCache namespace prefix to use + * @param object $decorated A class loader object that implements the findFile() method + * + * @throws \RuntimeException + * @throws \InvalidArgumentException + */ + public function __construct($prefix, $decorated) + { + if (!extension_loaded('wincache')) { + throw new \RuntimeException('Unable to use WinCacheClassLoader as WinCache is not enabled.'); + } + + if (!method_exists($decorated, 'findFile')) { + throw new \InvalidArgumentException('The class finder must implement a "findFile" method.'); + } + + $this->prefix = $prefix; + $this->decorated = $decorated; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * + * @return bool|null True, if loaded + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + require $file; + + return true; + } + } + + /** + * Finds a file by class name while caching lookups to WinCache. + * + * @param string $class A class name to resolve to file + * + * @return string|null + */ + public function findFile($class) + { + $file = wincache_ucache_get($this->prefix.$class, $success); + + if (!$success) { + wincache_ucache_set($this->prefix.$class, $file = $this->decorated->findFile($class) ?: null, 0); + } + + return $file; + } + + /** + * Passes through all unknown calls onto the decorated object. + */ + public function __call($method, $args) + { + return call_user_func_array(array($this->decorated, $method), $args); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/XcacheClassLoader.php b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/XcacheClassLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..bf309a6924d791ace71222f6d7c6bc86babf9217 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/XcacheClassLoader.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\Component\ClassLoader; + +/** + * XcacheClassLoader implements a wrapping autoloader cached in XCache for PHP 5.3. + * + * It expects an object implementing a findFile method to find the file. This + * allows using it as a wrapper around the other loaders of the component (the + * ClassLoader for instance) but also around any other autoloaders following + * this convention (the Composer one for instance). + * + * // with a Symfony autoloader + * $loader = new ClassLoader(); + * $loader->addPrefix('Symfony\Component', __DIR__.'/component'); + * $loader->addPrefix('Symfony', __DIR__.'/framework'); + * + * // or with a Composer autoloader + * use Composer\Autoload\ClassLoader; + * + * $loader = new ClassLoader(); + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * $cachedLoader = new XcacheClassLoader('my_prefix', $loader); + * + * // activate the cached autoloader + * $cachedLoader->register(); + * + * // eventually deactivate the non-cached loader if it was registered previously + * // to be sure to use the cached one. + * $loader->unregister(); + * + * @author Fabien Potencier + * @author Kris Wallsmith + * @author Kim Hemsø Rasmussen + */ +class XcacheClassLoader +{ + private $prefix; + + /** + * A class loader object that implements the findFile() method. + * + * @var object + */ + private $decorated; + + /** + * Constructor. + * + * @param string $prefix The XCache namespace prefix to use + * @param object $decorated A class loader object that implements the findFile() method + * + * @throws \RuntimeException + * @throws \InvalidArgumentException + */ + public function __construct($prefix, $decorated) + { + if (!extension_loaded('xcache')) { + throw new \RuntimeException('Unable to use XcacheClassLoader as XCache is not enabled.'); + } + + if (!method_exists($decorated, 'findFile')) { + throw new \InvalidArgumentException('The class finder must implement a "findFile" method.'); + } + + $this->prefix = $prefix; + $this->decorated = $decorated; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * + * @return bool|null True, if loaded + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + require $file; + + return true; + } + } + + /** + * Finds a file by class name while caching lookups to Xcache. + * + * @param string $class A class name to resolve to file + * + * @return string|null + */ + public function findFile($class) + { + if (xcache_isset($this->prefix.$class)) { + $file = xcache_get($this->prefix.$class); + } else { + $file = $this->decorated->findFile($class) ?: null; + xcache_set($this->prefix.$class, $file); + } + + return $file; + } + + /** + * Passes through all unknown calls onto the decorated object. + */ + public function __call($method, $args) + { + return call_user_func_array(array($this->decorated, $method), $args); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/composer.json b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..634c647cec1aa2c4398f62a79810e1793b522db3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/composer.json @@ -0,0 +1,40 @@ +{ + "name": "symfony/class-loader", + "type": "library", + "description": "Symfony ClassLoader Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "minimum-stability": "dev", + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/finder": "~2.8|~3.0", + "symfony/polyfill-apcu": "~1.1" + }, + "suggest": { + "symfony/polyfill-apcu": "For using ApcClassLoader on HHVM" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\ClassLoader\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..4856db5be65d10493e2a3ab6c8eacc8dd1ddb59f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Config/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..b752df6fe23485ddf3d7a313b3df0752683f862e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/CHANGELOG.md @@ -0,0 +1,62 @@ +CHANGELOG +========= + +3.0.0 +----- + + * removed `ReferenceDumper` class + * removed the `ResourceInterface::isFresh()` method + * removed `BCResourceInterfaceChecker` class + * removed `ResourceInterface::getResource()` method + +2.8.0 +----- + +The edge case of defining just one value for nodes of type Enum is now allowed: + +```php +$rootNode + ->children() + ->enumNode('variable') + ->values(array('value')) + ->end() + ->end() +; +``` + +Before: `InvalidArgumentException` (variable must contain at least two +distinct elements). +After: the code will work as expected and it will restrict the values of the +`variable` option to just `value`. + + * deprecated the `ResourceInterface::isFresh()` method. If you implement custom resource types and they + can be validated that way, make them implement the new `SelfCheckingResourceInterface`. + * deprecated the getResource() method in ResourceInterface. You can still call this method + on concrete classes implementing the interface, but it does not make sense at the interface + level as you need to know about the particular type of resource at hand to understand the + semantics of the returned value. + +2.7.0 +----- + + * added `ConfigCacheInterface`, `ConfigCacheFactoryInterface` and a basic `ConfigCacheFactory` + implementation to delegate creation of ConfigCache instances + +2.2.0 +----- + + * added `ArrayNodeDefinition::canBeEnabled()` and `ArrayNodeDefinition::canBeDisabled()` + to ease configuration when some sections are respectively disabled / enabled + by default. + * added a `normalizeKeys()` method for array nodes (to avoid key normalization) + * added numerical type handling for config definitions + * added convenience methods for optional configuration sections to `ArrayNodeDefinition` + * added a utils class for XML manipulations + +2.1.0 +----- + + * added a way to add documentation on configuration + * implemented `Serializable` on resources + * `LoaderResolverInterface` is now used instead of `LoaderResolver` for type + hinting diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCache.php b/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCache.php new file mode 100644 index 0000000000000000000000000000000000000000..591c89bc4ff029616e7895bf2dbf9028d031d18d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCache.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config; + +use Symfony\Component\Config\Resource\SelfCheckingResourceChecker; + +/** + * ConfigCache caches arbitrary content in files on disk. + * + * When in debug mode, those metadata resources that implement + * \Symfony\Component\Config\Resource\SelfCheckingResourceInterface will + * be used to check cache freshness. + * + * @author Fabien Potencier + * @author Matthias Pigulla + */ +class ConfigCache extends ResourceCheckerConfigCache +{ + private $debug; + + /** + * @param string $file The absolute cache path + * @param bool $debug Whether debugging is enabled or not + */ + public function __construct($file, $debug) + { + $this->debug = (bool) $debug; + + $checkers = array(); + if (true === $this->debug) { + $checkers = array(new SelfCheckingResourceChecker()); + } + + parent::__construct($file, $checkers); + } + + /** + * Checks if the cache is still fresh. + * + * This implementation always returns true when debug is off and the + * cache file exists. + * + * @return bool true if the cache is fresh, false otherwise + */ + public function isFresh() + { + if (!$this->debug && is_file($this->getPath())) { + return true; + } + + return parent::isFresh(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCacheFactory.php b/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCacheFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..396536e2d8ed8eddbe1102d315f955723c6eb14b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCacheFactory.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config; + +/** + * Basic implementation of ConfigCacheFactoryInterface that + * creates an instance of the default ConfigCache. + * + * This factory and/or cache do not support cache validation + * by means of ResourceChecker instances (that is, service-based). + * + * @author Matthias Pigulla + */ +class ConfigCacheFactory implements ConfigCacheFactoryInterface +{ + /** + * @var bool Debug flag passed to the ConfigCache + */ + private $debug; + + /** + * @param bool $debug The debug flag to pass to ConfigCache + */ + public function __construct($debug) + { + $this->debug = $debug; + } + + /** + * {@inheritdoc} + */ + public function cache($file, $callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException(sprintf('Invalid type for callback argument. Expected callable, but got "%s".', gettype($callback))); + } + + $cache = new ConfigCache($file, $this->debug); + if (!$cache->isFresh()) { + call_user_func($callback, $cache); + } + + return $cache; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCacheFactoryInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCacheFactoryInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..bd614c4b6b39357e515a29107d5bc5cb5bc7ad32 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCacheFactoryInterface.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\Component\Config; + +/** + * Interface for a ConfigCache factory. This factory creates + * an instance of ConfigCacheInterface and initializes the + * cache if necessary. + * + * @author Matthias Pigulla + */ +interface ConfigCacheFactoryInterface +{ + /** + * Creates a cache instance and (re-)initializes it if necessary. + * + * @param string $file The absolute cache file path + * @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback + * + * @return ConfigCacheInterface $configCache The cache instance + */ + public function cache($file, $callable); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCacheInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCacheInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..7c47ad70a56858a30baf04bb8e47888de15b060b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/ConfigCacheInterface.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config; + +use Symfony\Component\Config\Resource\ResourceInterface; + +/** + * Interface for ConfigCache. + * + * @author Matthias Pigulla + */ +interface ConfigCacheInterface +{ + /** + * Gets the cache file path. + * + * @return string The cache file path + */ + public function getPath(); + + /** + * Checks if the cache is still fresh. + * + * This check should take the metadata passed to the write() method into consideration. + * + * @return bool Whether the cache is still fresh + */ + public function isFresh(); + + /** + * Writes the given content into the cache file. Metadata will be stored + * independently and can be used to check cache freshness at a later time. + * + * @param string $content The content to write into the cache + * @param ResourceInterface[]|null $metadata An array of ResourceInterface instances + * + * @throws \RuntimeException When the cache file cannot be written + */ + public function write($content, array $metadata = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php new file mode 100644 index 0000000000000000000000000000000000000000..457e7a8c92e34ac1cea8c65c286250e83e9ffd35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php @@ -0,0 +1,399 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; +use Symfony\Component\Config\Definition\Exception\InvalidTypeException; +use Symfony\Component\Config\Definition\Exception\UnsetKeyException; + +/** + * Represents an Array node in the config tree. + * + * @author Johannes M. Schmitt + */ +class ArrayNode extends BaseNode implements PrototypeNodeInterface +{ + protected $xmlRemappings = array(); + protected $children = array(); + protected $allowFalse = false; + protected $allowNewKeys = true; + protected $addIfNotSet = false; + protected $performDeepMerging = true; + protected $ignoreExtraKeys = false; + protected $removeExtraKeys = true; + protected $normalizeKeys = true; + + public function setNormalizeKeys($normalizeKeys) + { + $this->normalizeKeys = (bool) $normalizeKeys; + } + + /** + * Normalizes keys between the different configuration formats. + * + * Namely, you mostly have foo_bar in YAML while you have foo-bar in XML. + * After running this method, all keys are normalized to foo_bar. + * + * If you have a mixed key like foo-bar_moo, it will not be altered. + * The key will also not be altered if the target key already exists. + * + * @param mixed $value + * + * @return array The value with normalized keys + */ + protected function preNormalize($value) + { + if (!$this->normalizeKeys || !is_array($value)) { + return $value; + } + + $normalized = array(); + + foreach ($value as $k => $v) { + if (false !== strpos($k, '-') && false === strpos($k, '_') && !array_key_exists($normalizedKey = str_replace('-', '_', $k), $value)) { + $normalized[$normalizedKey] = $v; + } else { + $normalized[$k] = $v; + } + } + + return $normalized; + } + + /** + * Retrieves the children of this node. + * + * @return array The children + */ + public function getChildren() + { + return $this->children; + } + + /** + * Sets the xml remappings that should be performed. + * + * @param array $remappings an array of the form array(array(string, string)) + */ + public function setXmlRemappings(array $remappings) + { + $this->xmlRemappings = $remappings; + } + + /** + * Gets the xml remappings that should be performed. + * + * @return array $remappings an array of the form array(array(string, string)) + */ + public function getXmlRemappings() + { + return $this->xmlRemappings; + } + + /** + * Sets whether to add default values for this array if it has not been + * defined in any of the configuration files. + * + * @param bool $boolean + */ + public function setAddIfNotSet($boolean) + { + $this->addIfNotSet = (bool) $boolean; + } + + /** + * Sets whether false is allowed as value indicating that the array should be unset. + * + * @param bool $allow + */ + public function setAllowFalse($allow) + { + $this->allowFalse = (bool) $allow; + } + + /** + * Sets whether new keys can be defined in subsequent configurations. + * + * @param bool $allow + */ + public function setAllowNewKeys($allow) + { + $this->allowNewKeys = (bool) $allow; + } + + /** + * Sets if deep merging should occur. + * + * @param bool $boolean + */ + public function setPerformDeepMerging($boolean) + { + $this->performDeepMerging = (bool) $boolean; + } + + /** + * Whether extra keys should just be ignore without an exception. + * + * @param bool $boolean To allow extra keys + * @param bool $remove To remove extra keys + */ + public function setIgnoreExtraKeys($boolean, $remove = true) + { + $this->ignoreExtraKeys = (bool) $boolean; + $this->removeExtraKeys = $this->ignoreExtraKeys && $remove; + } + + /** + * Sets the node Name. + * + * @param string $name The node's name + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * Checks if the node has a default value. + * + * @return bool + */ + public function hasDefaultValue() + { + return $this->addIfNotSet; + } + + /** + * Retrieves the default value. + * + * @return array The default value + * + * @throws \RuntimeException if the node has no default value + */ + public function getDefaultValue() + { + if (!$this->hasDefaultValue()) { + throw new \RuntimeException(sprintf('The node at path "%s" has no default value.', $this->getPath())); + } + + $defaults = array(); + foreach ($this->children as $name => $child) { + if ($child->hasDefaultValue()) { + $defaults[$name] = $child->getDefaultValue(); + } + } + + return $defaults; + } + + /** + * Adds a child node. + * + * @param NodeInterface $node The child node to add + * + * @throws \InvalidArgumentException when the child node has no name + * @throws \InvalidArgumentException when the child node's name is not unique + */ + public function addChild(NodeInterface $node) + { + $name = $node->getName(); + if (!strlen($name)) { + throw new \InvalidArgumentException('Child nodes must be named.'); + } + if (isset($this->children[$name])) { + throw new \InvalidArgumentException(sprintf('A child node named "%s" already exists.', $name)); + } + + $this->children[$name] = $node; + } + + /** + * Finalizes the value of this node. + * + * @param mixed $value + * + * @return mixed The finalised value + * + * @throws UnsetKeyException + * @throws InvalidConfigurationException if the node doesn't have enough children + */ + protected function finalizeValue($value) + { + if (false === $value) { + $msg = sprintf('Unsetting key for path "%s", value: %s', $this->getPath(), json_encode($value)); + throw new UnsetKeyException($msg); + } + + foreach ($this->children as $name => $child) { + if (!array_key_exists($name, $value)) { + if ($child->isRequired()) { + $msg = sprintf('The child node "%s" at path "%s" must be configured.', $name, $this->getPath()); + $ex = new InvalidConfigurationException($msg); + $ex->setPath($this->getPath()); + + throw $ex; + } + + if ($child->hasDefaultValue()) { + $value[$name] = $child->getDefaultValue(); + } + + continue; + } + + try { + $value[$name] = $child->finalize($value[$name]); + } catch (UnsetKeyException $e) { + unset($value[$name]); + } + } + + return $value; + } + + /** + * Validates the type of the value. + * + * @param mixed $value + * + * @throws InvalidTypeException + */ + protected function validateType($value) + { + if (!is_array($value) && (!$this->allowFalse || false !== $value)) { + $ex = new InvalidTypeException(sprintf( + 'Invalid type for path "%s". Expected array, but got %s', + $this->getPath(), + gettype($value) + )); + if ($hint = $this->getInfo()) { + $ex->addHint($hint); + } + $ex->setPath($this->getPath()); + + throw $ex; + } + } + + /** + * Normalizes the value. + * + * @param mixed $value The value to normalize + * + * @return mixed The normalized value + * + * @throws InvalidConfigurationException + */ + protected function normalizeValue($value) + { + if (false === $value) { + return $value; + } + + $value = $this->remapXml($value); + + $normalized = array(); + foreach ($value as $name => $val) { + if (isset($this->children[$name])) { + $normalized[$name] = $this->children[$name]->normalize($val); + unset($value[$name]); + } elseif (!$this->removeExtraKeys) { + $normalized[$name] = $val; + } + } + + // if extra fields are present, throw exception + if (count($value) && !$this->ignoreExtraKeys) { + $msg = sprintf('Unrecognized option%s "%s" under "%s"', 1 === count($value) ? '' : 's', implode(', ', array_keys($value)), $this->getPath()); + $ex = new InvalidConfigurationException($msg); + $ex->setPath($this->getPath()); + + throw $ex; + } + + return $normalized; + } + + /** + * Remaps multiple singular values to a single plural value. + * + * @param array $value The source values + * + * @return array The remapped values + */ + protected function remapXml($value) + { + foreach ($this->xmlRemappings as list($singular, $plural)) { + if (!isset($value[$singular])) { + continue; + } + + $value[$plural] = Processor::normalizeConfig($value, $singular, $plural); + unset($value[$singular]); + } + + return $value; + } + + /** + * Merges values together. + * + * @param mixed $leftSide The left side to merge + * @param mixed $rightSide The right side to merge + * + * @return mixed The merged values + * + * @throws InvalidConfigurationException + * @throws \RuntimeException + */ + protected function mergeValues($leftSide, $rightSide) + { + if (false === $rightSide) { + // if this is still false after the last config has been merged the + // finalization pass will take care of removing this key entirely + return false; + } + + if (false === $leftSide || !$this->performDeepMerging) { + return $rightSide; + } + + foreach ($rightSide as $k => $v) { + // no conflict + if (!array_key_exists($k, $leftSide)) { + if (!$this->allowNewKeys) { + $ex = new InvalidConfigurationException(sprintf( + 'You are not allowed to define new elements for path "%s". ' + .'Please define all elements for this path in one config file. ' + .'If you are trying to overwrite an element, make sure you redefine it ' + .'with the same name.', + $this->getPath() + )); + $ex->setPath($this->getPath()); + + throw $ex; + } + + $leftSide[$k] = $v; + continue; + } + + if (!isset($this->children[$k])) { + throw new \RuntimeException('merge() expects a normalized config array.'); + } + + $leftSide[$k] = $this->children[$k]->merge($leftSide[$k], $v); + } + + return $leftSide; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php new file mode 100644 index 0000000000000000000000000000000000000000..dbf36335b69e38ff46b0ebb242ccc06d0f004272 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php @@ -0,0 +1,356 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\Exception; +use Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException; +use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; +use Symfony\Component\Config\Definition\Exception\InvalidTypeException; + +/** + * The base node class. + * + * @author Johannes M. Schmitt + */ +abstract class BaseNode implements NodeInterface +{ + protected $name; + protected $parent; + protected $normalizationClosures = array(); + protected $finalValidationClosures = array(); + protected $allowOverwrite = true; + protected $required = false; + protected $equivalentValues = array(); + protected $attributes = array(); + + /** + * Constructor. + * + * @param string $name The name of the node + * @param NodeInterface $parent The parent of this node + * + * @throws \InvalidArgumentException if the name contains a period. + */ + public function __construct($name, NodeInterface $parent = null) + { + if (false !== strpos($name, '.')) { + throw new \InvalidArgumentException('The name must not contain ".".'); + } + + $this->name = $name; + $this->parent = $parent; + } + + public function setAttribute($key, $value) + { + $this->attributes[$key] = $value; + } + + public function getAttribute($key, $default = null) + { + return isset($this->attributes[$key]) ? $this->attributes[$key] : $default; + } + + public function hasAttribute($key) + { + return isset($this->attributes[$key]); + } + + public function getAttributes() + { + return $this->attributes; + } + + public function setAttributes(array $attributes) + { + $this->attributes = $attributes; + } + + public function removeAttribute($key) + { + unset($this->attributes[$key]); + } + + /** + * Sets an info message. + * + * @param string $info + */ + public function setInfo($info) + { + $this->setAttribute('info', $info); + } + + /** + * Returns info message. + * + * @return string The info text + */ + public function getInfo() + { + return $this->getAttribute('info'); + } + + /** + * Sets the example configuration for this node. + * + * @param string|array $example + */ + public function setExample($example) + { + $this->setAttribute('example', $example); + } + + /** + * Retrieves the example configuration for this node. + * + * @return string|array The example + */ + public function getExample() + { + return $this->getAttribute('example'); + } + + /** + * Adds an equivalent value. + * + * @param mixed $originalValue + * @param mixed $equivalentValue + */ + public function addEquivalentValue($originalValue, $equivalentValue) + { + $this->equivalentValues[] = array($originalValue, $equivalentValue); + } + + /** + * Set this node as required. + * + * @param bool $boolean Required node + */ + public function setRequired($boolean) + { + $this->required = (bool) $boolean; + } + + /** + * Sets if this node can be overridden. + * + * @param bool $allow + */ + public function setAllowOverwrite($allow) + { + $this->allowOverwrite = (bool) $allow; + } + + /** + * Sets the closures used for normalization. + * + * @param \Closure[] $closures An array of Closures used for normalization + */ + public function setNormalizationClosures(array $closures) + { + $this->normalizationClosures = $closures; + } + + /** + * Sets the closures used for final validation. + * + * @param \Closure[] $closures An array of Closures used for final validation + */ + public function setFinalValidationClosures(array $closures) + { + $this->finalValidationClosures = $closures; + } + + /** + * Checks if this node is required. + * + * @return bool + */ + public function isRequired() + { + return $this->required; + } + + /** + * Returns the name of this node. + * + * @return string The Node's name + */ + public function getName() + { + return $this->name; + } + + /** + * Retrieves the path of this node. + * + * @return string The Node's path + */ + public function getPath() + { + $path = $this->name; + + if (null !== $this->parent) { + $path = $this->parent->getPath().'.'.$path; + } + + return $path; + } + + /** + * Merges two values together. + * + * @param mixed $leftSide + * @param mixed $rightSide + * + * @return mixed The merged value + * + * @throws ForbiddenOverwriteException + */ + final public function merge($leftSide, $rightSide) + { + if (!$this->allowOverwrite) { + throw new ForbiddenOverwriteException(sprintf( + 'Configuration path "%s" cannot be overwritten. You have to ' + .'define all options for this path, and any of its sub-paths in ' + .'one configuration section.', + $this->getPath() + )); + } + + $this->validateType($leftSide); + $this->validateType($rightSide); + + return $this->mergeValues($leftSide, $rightSide); + } + + /** + * Normalizes a value, applying all normalization closures. + * + * @param mixed $value Value to normalize + * + * @return mixed The normalized value + */ + final public function normalize($value) + { + $value = $this->preNormalize($value); + + // run custom normalization closures + foreach ($this->normalizationClosures as $closure) { + $value = $closure($value); + } + + // replace value with their equivalent + foreach ($this->equivalentValues as $data) { + if ($data[0] === $value) { + $value = $data[1]; + } + } + + // validate type + $this->validateType($value); + + // normalize value + return $this->normalizeValue($value); + } + + /** + * Normalizes the value before any other normalization is applied. + * + * @param $value + * + * @return $value The normalized array value + */ + protected function preNormalize($value) + { + return $value; + } + + /** + * Returns parent node for this node. + * + * @return NodeInterface|null + */ + public function getParent() + { + return $this->parent; + } + + /** + * Finalizes a value, applying all finalization closures. + * + * @param mixed $value The value to finalize + * + * @return mixed The finalized value + * + * @throws Exception + * @throws InvalidConfigurationException + */ + final public function finalize($value) + { + $this->validateType($value); + + $value = $this->finalizeValue($value); + + // Perform validation on the final value if a closure has been set. + // The closure is also allowed to return another value. + foreach ($this->finalValidationClosures as $closure) { + try { + $value = $closure($value); + } catch (Exception $e) { + throw $e; + } catch (\Exception $e) { + throw new InvalidConfigurationException(sprintf('Invalid configuration for path "%s": %s', $this->getPath(), $e->getMessage()), $e->getCode(), $e); + } + } + + return $value; + } + + /** + * Validates the type of a Node. + * + * @param mixed $value The value to validate + * + * @throws InvalidTypeException when the value is invalid + */ + abstract protected function validateType($value); + + /** + * Normalizes the value. + * + * @param mixed $value The value to normalize + * + * @return mixed The normalized value + */ + abstract protected function normalizeValue($value); + + /** + * Merges two values together. + * + * @param mixed $leftSide + * @param mixed $rightSide + * + * @return mixed The merged value + */ + abstract protected function mergeValues($leftSide, $rightSide); + + /** + * Finalizes a value. + * + * @param mixed $value The value to finalize + * + * @return mixed The finalized value + */ + abstract protected function finalizeValue($value); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BooleanNode.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BooleanNode.php new file mode 100644 index 0000000000000000000000000000000000000000..08e1a7730713a094764eb9b50bef7d14b7803baf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BooleanNode.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidTypeException; + +/** + * This node represents a Boolean value in the config tree. + * + * @author Johannes M. Schmitt + */ +class BooleanNode extends ScalarNode +{ + /** + * {@inheritdoc} + */ + protected function validateType($value) + { + if (!is_bool($value)) { + $ex = new InvalidTypeException(sprintf( + 'Invalid type for path "%s". Expected boolean, but got %s.', + $this->getPath(), + gettype($value) + )); + if ($hint = $this->getInfo()) { + $ex->addHint($hint); + } + $ex->setPath($this->getPath()); + + throw $ex; + } + } + + /** + * {@inheritdoc} + */ + protected function isValueEmpty($value) + { + // a boolean value cannot be empty + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..a1fc1fab0ef78fbd866f2ad2f00a942c805f740b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php @@ -0,0 +1,493 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\ArrayNode; +use Symfony\Component\Config\Definition\PrototypedArrayNode; +use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; + +/** + * This class provides a fluent interface for defining an array node. + * + * @author Johannes M. Schmitt + */ +class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinitionInterface +{ + protected $performDeepMerging = true; + protected $ignoreExtraKeys = false; + protected $removeExtraKeys = true; + protected $children = array(); + protected $prototype; + protected $atLeastOne = false; + protected $allowNewKeys = true; + protected $key; + protected $removeKeyItem; + protected $addDefaults = false; + protected $addDefaultChildren = false; + protected $nodeBuilder; + protected $normalizeKeys = true; + + /** + * {@inheritdoc} + */ + public function __construct($name, NodeParentInterface $parent = null) + { + parent::__construct($name, $parent); + + $this->nullEquivalent = array(); + $this->trueEquivalent = array(); + } + + /** + * Sets a custom children builder. + * + * @param NodeBuilder $builder A custom NodeBuilder + */ + public function setBuilder(NodeBuilder $builder) + { + $this->nodeBuilder = $builder; + } + + /** + * Returns a builder to add children nodes. + * + * @return NodeBuilder + */ + public function children() + { + return $this->getNodeBuilder(); + } + + /** + * Sets a prototype for child nodes. + * + * @param string $type the type of node + * + * @return NodeDefinition + */ + public function prototype($type) + { + return $this->prototype = $this->getNodeBuilder()->node(null, $type)->setParent($this); + } + + /** + * Adds the default value if the node is not set in the configuration. + * + * This method is applicable to concrete nodes only (not to prototype nodes). + * If this function has been called and the node is not set during the finalization + * phase, it's default value will be derived from its children default values. + * + * @return $this + */ + public function addDefaultsIfNotSet() + { + $this->addDefaults = true; + + return $this; + } + + /** + * Adds children with a default value when none are defined. + * + * @param int|string|array|null $children The number of children|The child name|The children names to be added + * + * This method is applicable to prototype nodes only. + * + * @return $this + */ + public function addDefaultChildrenIfNoneSet($children = null) + { + $this->addDefaultChildren = $children; + + return $this; + } + + /** + * Requires the node to have at least one element. + * + * This method is applicable to prototype nodes only. + * + * @return $this + */ + public function requiresAtLeastOneElement() + { + $this->atLeastOne = true; + + return $this; + } + + /** + * Disallows adding news keys in a subsequent configuration. + * + * If used all keys have to be defined in the same configuration file. + * + * @return $this + */ + public function disallowNewKeysInSubsequentConfigs() + { + $this->allowNewKeys = false; + + return $this; + } + + /** + * Sets a normalization rule for XML configurations. + * + * @param string $singular The key to remap + * @param string $plural The plural of the key for irregular plurals + * + * @return $this + */ + public function fixXmlConfig($singular, $plural = null) + { + $this->normalization()->remap($singular, $plural); + + return $this; + } + + /** + * Sets the attribute which value is to be used as key. + * + * This is useful when you have an indexed array that should be an + * associative array. You can select an item from within the array + * to be the key of the particular item. For example, if "id" is the + * "key", then: + * + * array( + * array('id' => 'my_name', 'foo' => 'bar'), + * ); + * + * becomes + * + * array( + * 'my_name' => array('foo' => 'bar'), + * ); + * + * If you'd like "'id' => 'my_name'" to still be present in the resulting + * array, then you can set the second argument of this method to false. + * + * This method is applicable to prototype nodes only. + * + * @param string $name The name of the key + * @param bool $removeKeyItem Whether or not the key item should be removed + * + * @return $this + */ + public function useAttributeAsKey($name, $removeKeyItem = true) + { + $this->key = $name; + $this->removeKeyItem = $removeKeyItem; + + return $this; + } + + /** + * Sets whether the node can be unset. + * + * @param bool $allow + * + * @return $this + */ + public function canBeUnset($allow = true) + { + $this->merge()->allowUnset($allow); + + return $this; + } + + /** + * Adds an "enabled" boolean to enable the current section. + * + * By default, the section is disabled. If any configuration is specified then + * the node will be automatically enabled: + * + * enableableArrayNode: {enabled: true, ...} # The config is enabled & default values get overridden + * enableableArrayNode: ~ # The config is enabled & use the default values + * enableableArrayNode: true # The config is enabled & use the default values + * enableableArrayNode: {other: value, ...} # The config is enabled & default values get overridden + * enableableArrayNode: {enabled: false, ...} # The config is disabled + * enableableArrayNode: false # The config is disabled + * + * @return $this + */ + public function canBeEnabled() + { + $this + ->addDefaultsIfNotSet() + ->treatFalseLike(array('enabled' => false)) + ->treatTrueLike(array('enabled' => true)) + ->treatNullLike(array('enabled' => true)) + ->beforeNormalization() + ->ifArray() + ->then(function ($v) { + $v['enabled'] = isset($v['enabled']) ? $v['enabled'] : true; + + return $v; + }) + ->end() + ->children() + ->booleanNode('enabled') + ->defaultFalse() + ; + + return $this; + } + + /** + * Adds an "enabled" boolean to enable the current section. + * + * By default, the section is enabled. + * + * @return $this + */ + public function canBeDisabled() + { + $this + ->addDefaultsIfNotSet() + ->treatFalseLike(array('enabled' => false)) + ->treatTrueLike(array('enabled' => true)) + ->treatNullLike(array('enabled' => true)) + ->children() + ->booleanNode('enabled') + ->defaultTrue() + ; + + return $this; + } + + /** + * Disables the deep merging of the node. + * + * @return $this + */ + public function performNoDeepMerging() + { + $this->performDeepMerging = false; + + return $this; + } + + /** + * Allows extra config keys to be specified under an array without + * throwing an exception. + * + * Those config values are simply ignored and removed from the + * resulting array. This should be used only in special cases where + * you want to send an entire configuration array through a special + * tree that processes only part of the array. + * + * @param bool $remove Whether to remove the extra keys + * + * @return $this + */ + public function ignoreExtraKeys($remove = true) + { + $this->ignoreExtraKeys = true; + $this->removeExtraKeys = $remove; + + return $this; + } + + /** + * Sets key normalization. + * + * @param bool $bool Whether to enable key normalization + * + * @return $this + */ + public function normalizeKeys($bool) + { + $this->normalizeKeys = (bool) $bool; + + return $this; + } + + /** + * Appends a node definition. + * + * $node = new ArrayNodeDefinition() + * ->children() + * ->scalarNode('foo')->end() + * ->scalarNode('baz')->end() + * ->end() + * ->append($this->getBarNodeDefinition()) + * ; + * + * @param NodeDefinition $node A NodeDefinition instance + * + * @return $this + */ + public function append(NodeDefinition $node) + { + $this->children[$node->name] = $node->setParent($this); + + return $this; + } + + /** + * Returns a node builder to be used to add children and prototype. + * + * @return NodeBuilder The node builder + */ + protected function getNodeBuilder() + { + if (null === $this->nodeBuilder) { + $this->nodeBuilder = new NodeBuilder(); + } + + return $this->nodeBuilder->setParent($this); + } + + /** + * {@inheritdoc} + */ + protected function createNode() + { + if (null === $this->prototype) { + $node = new ArrayNode($this->name, $this->parent); + + $this->validateConcreteNode($node); + + $node->setAddIfNotSet($this->addDefaults); + + foreach ($this->children as $child) { + $child->parent = $node; + $node->addChild($child->getNode()); + } + } else { + $node = new PrototypedArrayNode($this->name, $this->parent); + + $this->validatePrototypeNode($node); + + if (null !== $this->key) { + $node->setKeyAttribute($this->key, $this->removeKeyItem); + } + + if (true === $this->atLeastOne) { + $node->setMinNumberOfElements(1); + } + + if ($this->default) { + $node->setDefaultValue($this->defaultValue); + } + + if (false !== $this->addDefaultChildren) { + $node->setAddChildrenIfNoneSet($this->addDefaultChildren); + if ($this->prototype instanceof static && null === $this->prototype->prototype) { + $this->prototype->addDefaultsIfNotSet(); + } + } + + $this->prototype->parent = $node; + $node->setPrototype($this->prototype->getNode()); + } + + $node->setAllowNewKeys($this->allowNewKeys); + $node->addEquivalentValue(null, $this->nullEquivalent); + $node->addEquivalentValue(true, $this->trueEquivalent); + $node->addEquivalentValue(false, $this->falseEquivalent); + $node->setPerformDeepMerging($this->performDeepMerging); + $node->setRequired($this->required); + $node->setIgnoreExtraKeys($this->ignoreExtraKeys, $this->removeExtraKeys); + $node->setNormalizeKeys($this->normalizeKeys); + + if (null !== $this->normalization) { + $node->setNormalizationClosures($this->normalization->before); + $node->setXmlRemappings($this->normalization->remappings); + } + + if (null !== $this->merge) { + $node->setAllowOverwrite($this->merge->allowOverwrite); + $node->setAllowFalse($this->merge->allowFalse); + } + + if (null !== $this->validation) { + $node->setFinalValidationClosures($this->validation->rules); + } + + return $node; + } + + /** + * Validate the configuration of a concrete node. + * + * @param ArrayNode $node The related node + * + * @throws InvalidDefinitionException + */ + protected function validateConcreteNode(ArrayNode $node) + { + $path = $node->getPath(); + + if (null !== $this->key) { + throw new InvalidDefinitionException( + sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s"', $path) + ); + } + + if (true === $this->atLeastOne) { + throw new InvalidDefinitionException( + sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s"', $path) + ); + } + + if ($this->default) { + throw new InvalidDefinitionException( + sprintf('->defaultValue() is not applicable to concrete nodes at path "%s"', $path) + ); + } + + if (false !== $this->addDefaultChildren) { + throw new InvalidDefinitionException( + sprintf('->addDefaultChildrenIfNoneSet() is not applicable to concrete nodes at path "%s"', $path) + ); + } + } + + /** + * Validate the configuration of a prototype node. + * + * @param PrototypedArrayNode $node The related node + * + * @throws InvalidDefinitionException + */ + protected function validatePrototypeNode(PrototypedArrayNode $node) + { + $path = $node->getPath(); + + if ($this->addDefaults) { + throw new InvalidDefinitionException( + sprintf('->addDefaultsIfNotSet() is not applicable to prototype nodes at path "%s"', $path) + ); + } + + if (false !== $this->addDefaultChildren) { + if ($this->default) { + throw new InvalidDefinitionException( + sprintf('A default value and default children might not be used together at path "%s"', $path) + ); + } + + if (null !== $this->key && (null === $this->addDefaultChildren || is_int($this->addDefaultChildren) && $this->addDefaultChildren > 0)) { + throw new InvalidDefinitionException( + sprintf('->addDefaultChildrenIfNoneSet() should set default children names as ->useAttributeAsKey() is used at path "%s"', $path) + ); + } + + if (null === $this->key && (is_string($this->addDefaultChildren) || is_array($this->addDefaultChildren))) { + throw new InvalidDefinitionException( + sprintf('->addDefaultChildrenIfNoneSet() might not set default children names as ->useAttributeAsKey() is not used at path "%s"', $path) + ); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..28e56579ada52427784017c49572f046dcc70d4d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.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\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\BooleanNode; +use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; + +/** + * This class provides a fluent interface for defining a node. + * + * @author Johannes M. Schmitt + */ +class BooleanNodeDefinition extends ScalarNodeDefinition +{ + /** + * {@inheritdoc} + */ + public function __construct($name, NodeParentInterface $parent = null) + { + parent::__construct($name, $parent); + + $this->nullEquivalent = true; + } + + /** + * Instantiate a Node. + * + * @return BooleanNode The node + */ + protected function instantiateNode() + { + return new BooleanNode($this->name, $this->parent); + } + + /** + * {@inheritdoc} + * + * @throws InvalidDefinitionException + */ + public function cannotBeEmpty() + { + throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to BooleanNodeDefinition.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..56047ad5dec2cc249afc0b78860b6bc88e218ec2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.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\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\EnumNode; + +/** + * Enum Node Definition. + * + * @author Johannes M. Schmitt + */ +class EnumNodeDefinition extends ScalarNodeDefinition +{ + private $values; + + /** + * @param array $values + * + * @return $this + */ + public function values(array $values) + { + $values = array_unique($values); + + if (empty($values)) { + throw new \InvalidArgumentException('->values() must be called with at least one value.'); + } + + $this->values = $values; + + return $this; + } + + /** + * Instantiate a Node. + * + * @return EnumNode The node + * + * @throws \RuntimeException + */ + protected function instantiateNode() + { + if (null === $this->values) { + throw new \RuntimeException('You must call ->values() on enum nodes.'); + } + + return new EnumNode($this->name, $this->parent, $this->values); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..150a2ec9ab3a3d58651138e3324c50ba8e7eebc1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.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\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\Exception\UnsetKeyException; + +/** + * This class builds an if expression. + * + * @author Johannes M. Schmitt + * @author Christophe Coevoet + */ +class ExprBuilder +{ + protected $node; + public $ifPart; + public $thenPart; + + /** + * Constructor. + * + * @param NodeDefinition $node The related node + */ + public function __construct(NodeDefinition $node) + { + $this->node = $node; + } + + /** + * Marks the expression as being always used. + * + * @param \Closure $then + * + * @return $this + */ + public function always(\Closure $then = null) + { + $this->ifPart = function ($v) { return true; }; + + if (null !== $then) { + $this->thenPart = $then; + } + + return $this; + } + + /** + * Sets a closure to use as tests. + * + * The default one tests if the value is true. + * + * @param \Closure $closure + * + * @return $this + */ + public function ifTrue(\Closure $closure = null) + { + if (null === $closure) { + $closure = function ($v) { return true === $v; }; + } + + $this->ifPart = $closure; + + return $this; + } + + /** + * Tests if the value is a string. + * + * @return $this + */ + public function ifString() + { + $this->ifPart = function ($v) { return is_string($v); }; + + return $this; + } + + /** + * Tests if the value is null. + * + * @return $this + */ + public function ifNull() + { + $this->ifPart = function ($v) { return null === $v; }; + + return $this; + } + + /** + * Tests if the value is empty. + * + * @return ExprBuilder + */ + public function ifEmpty() + { + $this->ifPart = function ($v) { return empty($v); }; + + return $this; + } + + /** + * Tests if the value is an array. + * + * @return $this + */ + public function ifArray() + { + $this->ifPart = function ($v) { return is_array($v); }; + + return $this; + } + + /** + * Tests if the value is in an array. + * + * @param array $array + * + * @return $this + */ + public function ifInArray(array $array) + { + $this->ifPart = function ($v) use ($array) { return in_array($v, $array, true); }; + + return $this; + } + + /** + * Tests if the value is not in an array. + * + * @param array $array + * + * @return $this + */ + public function ifNotInArray(array $array) + { + $this->ifPart = function ($v) use ($array) { return !in_array($v, $array, true); }; + + return $this; + } + + /** + * Sets the closure to run if the test pass. + * + * @param \Closure $closure + * + * @return $this + */ + public function then(\Closure $closure) + { + $this->thenPart = $closure; + + return $this; + } + + /** + * Sets a closure returning an empty array. + * + * @return $this + */ + public function thenEmptyArray() + { + $this->thenPart = function ($v) { return array(); }; + + return $this; + } + + /** + * Sets a closure marking the value as invalid at validation time. + * + * if you want to add the value of the node in your message just use a %s placeholder. + * + * @param string $message + * + * @return $this + * + * @throws \InvalidArgumentException + */ + public function thenInvalid($message) + { + $this->thenPart = function ($v) use ($message) {throw new \InvalidArgumentException(sprintf($message, json_encode($v))); }; + + return $this; + } + + /** + * Sets a closure unsetting this key of the array at validation time. + * + * @return $this + * + * @throws UnsetKeyException + */ + public function thenUnset() + { + $this->thenPart = function ($v) { throw new UnsetKeyException('Unsetting key'); }; + + return $this; + } + + /** + * Returns the related node. + * + * @return NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition + * + * @throws \RuntimeException + */ + public function end() + { + if (null === $this->ifPart) { + throw new \RuntimeException('You must specify an if part.'); + } + if (null === $this->thenPart) { + throw new \RuntimeException('You must specify a then part.'); + } + + return $this->node; + } + + /** + * Builds the expressions. + * + * @param ExprBuilder[] $expressions An array of ExprBuilder instances to build + * + * @return array + */ + public static function buildExpressions(array $expressions) + { + foreach ($expressions as $k => $expr) { + if ($expr instanceof self) { + $if = $expr->ifPart; + $then = $expr->thenPart; + $expressions[$k] = function ($v) use ($if, $then) { + return $if($v) ? $then($v) : $v; + }; + } + } + + return $expressions; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/FloatNodeDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/FloatNodeDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..c0bed462bf3850268a8cc5ff10daf733705cefff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/FloatNodeDefinition.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\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\FloatNode; + +/** + * This class provides a fluent interface for defining a float node. + * + * @author Jeanmonod David + */ +class FloatNodeDefinition extends NumericNodeDefinition +{ + /** + * Instantiates a Node. + * + * @return FloatNode The node + */ + protected function instantiateNode() + { + return new FloatNode($this->name, $this->parent, $this->min, $this->max); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/IntegerNodeDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/IntegerNodeDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..f6c3c147f3e6ab37cb4e2dc7f678e3bc6626e0d7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/IntegerNodeDefinition.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\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\IntegerNode; + +/** + * This class provides a fluent interface for defining an integer node. + * + * @author Jeanmonod David + */ +class IntegerNodeDefinition extends NumericNodeDefinition +{ + /** + * Instantiates a Node. + * + * @return IntegerNode The node + */ + protected function instantiateNode() + { + return new IntegerNode($this->name, $this->parent, $this->min, $this->max); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..1d24953df5742736fdb956cab6c7477cff3e8555 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +/** + * This class builds merge conditions. + * + * @author Johannes M. Schmitt + */ +class MergeBuilder +{ + protected $node; + public $allowFalse = false; + public $allowOverwrite = true; + + /** + * Constructor. + * + * @param NodeDefinition $node The related node + */ + public function __construct(NodeDefinition $node) + { + $this->node = $node; + } + + /** + * Sets whether the node can be unset. + * + * @param bool $allow + * + * @return $this + */ + public function allowUnset($allow = true) + { + $this->allowFalse = $allow; + + return $this; + } + + /** + * Sets whether the node can be overwritten. + * + * @param bool $deny Whether the overwriting is forbidden or not + * + * @return $this + */ + public function denyOverwrite($deny = true) + { + $this->allowOverwrite = !$deny; + + return $this; + } + + /** + * Returns the related node. + * + * @return NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition + */ + public function end() + { + return $this->node; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..e780777a1e8375a0793953d6144d685aa3136861 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php @@ -0,0 +1,245 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +/** + * This class provides a fluent interface for building a node. + * + * @author Johannes M. Schmitt + */ +class NodeBuilder implements NodeParentInterface +{ + protected $parent; + protected $nodeMapping; + + /** + * Constructor. + */ + public function __construct() + { + $this->nodeMapping = array( + 'variable' => __NAMESPACE__.'\\VariableNodeDefinition', + 'scalar' => __NAMESPACE__.'\\ScalarNodeDefinition', + 'boolean' => __NAMESPACE__.'\\BooleanNodeDefinition', + 'integer' => __NAMESPACE__.'\\IntegerNodeDefinition', + 'float' => __NAMESPACE__.'\\FloatNodeDefinition', + 'array' => __NAMESPACE__.'\\ArrayNodeDefinition', + 'enum' => __NAMESPACE__.'\\EnumNodeDefinition', + ); + } + + /** + * Set the parent node. + * + * @param ParentNodeDefinitionInterface $parent The parent node + * + * @return $this + */ + public function setParent(ParentNodeDefinitionInterface $parent = null) + { + $this->parent = $parent; + + return $this; + } + + /** + * Creates a child array node. + * + * @param string $name The name of the node + * + * @return ArrayNodeDefinition The child node + */ + public function arrayNode($name) + { + return $this->node($name, 'array'); + } + + /** + * Creates a child scalar node. + * + * @param string $name the name of the node + * + * @return ScalarNodeDefinition The child node + */ + public function scalarNode($name) + { + return $this->node($name, 'scalar'); + } + + /** + * Creates a child Boolean node. + * + * @param string $name The name of the node + * + * @return BooleanNodeDefinition The child node + */ + public function booleanNode($name) + { + return $this->node($name, 'boolean'); + } + + /** + * Creates a child integer node. + * + * @param string $name the name of the node + * + * @return IntegerNodeDefinition The child node + */ + public function integerNode($name) + { + return $this->node($name, 'integer'); + } + + /** + * Creates a child float node. + * + * @param string $name the name of the node + * + * @return FloatNodeDefinition The child node + */ + public function floatNode($name) + { + return $this->node($name, 'float'); + } + + /** + * Creates a child EnumNode. + * + * @param string $name + * + * @return EnumNodeDefinition + */ + public function enumNode($name) + { + return $this->node($name, 'enum'); + } + + /** + * Creates a child variable node. + * + * @param string $name The name of the node + * + * @return VariableNodeDefinition The builder of the child node + */ + public function variableNode($name) + { + return $this->node($name, 'variable'); + } + + /** + * Returns the parent node. + * + * @return ParentNodeDefinitionInterface|NodeDefinition The parent node + */ + public function end() + { + return $this->parent; + } + + /** + * Creates a child node. + * + * @param string $name The name of the node + * @param string $type The type of the node + * + * @return NodeDefinition The child node + * + * @throws \RuntimeException When the node type is not registered + * @throws \RuntimeException When the node class is not found + */ + public function node($name, $type) + { + $class = $this->getNodeClass($type); + + $node = new $class($name); + + $this->append($node); + + return $node; + } + + /** + * Appends a node definition. + * + * Usage: + * + * $node = new ArrayNodeDefinition('name') + * ->children() + * ->scalarNode('foo')->end() + * ->scalarNode('baz')->end() + * ->append($this->getBarNodeDefinition()) + * ->end() + * ; + * + * @param NodeDefinition $node + * + * @return $this + */ + public function append(NodeDefinition $node) + { + if ($node instanceof ParentNodeDefinitionInterface) { + $builder = clone $this; + $builder->setParent(null); + $node->setBuilder($builder); + } + + if (null !== $this->parent) { + $this->parent->append($node); + // Make this builder the node parent to allow for a fluid interface + $node->setParent($this); + } + + return $this; + } + + /** + * Adds or overrides a node Type. + * + * @param string $type The name of the type + * @param string $class The fully qualified name the node definition class + * + * @return $this + */ + public function setNodeClass($type, $class) + { + $this->nodeMapping[strtolower($type)] = $class; + + return $this; + } + + /** + * Returns the class name of the node definition. + * + * @param string $type The node type + * + * @return string The node definition class name + * + * @throws \RuntimeException When the node type is not registered + * @throws \RuntimeException When the node class is not found + */ + protected function getNodeClass($type) + { + $type = strtolower($type); + + if (!isset($this->nodeMapping[$type])) { + throw new \RuntimeException(sprintf('The node type "%s" is not registered.', $type)); + } + + $class = $this->nodeMapping[$type]; + + if (!class_exists($class)) { + throw new \RuntimeException(sprintf('The node class "%s" does not exist.', $class)); + } + + return $class; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..1b712a3150bc3dee1f53b2276059b753816f2ba7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php @@ -0,0 +1,343 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\NodeInterface; +use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; + +/** + * This class provides a fluent interface for defining a node. + * + * @author Johannes M. Schmitt + */ +abstract class NodeDefinition implements NodeParentInterface +{ + protected $name; + protected $normalization; + protected $validation; + protected $defaultValue; + protected $default = false; + protected $required = false; + protected $merge; + protected $allowEmptyValue = true; + protected $nullEquivalent; + protected $trueEquivalent = true; + protected $falseEquivalent = false; + + /** + * @var NodeParentInterface|null + */ + protected $parent; + protected $attributes = array(); + + /** + * Constructor. + * + * @param string $name The name of the node + * @param NodeParentInterface|null $parent The parent + */ + public function __construct($name, NodeParentInterface $parent = null) + { + $this->parent = $parent; + $this->name = $name; + } + + /** + * Sets the parent node. + * + * @param NodeParentInterface $parent The parent + * + * @return $this + */ + public function setParent(NodeParentInterface $parent) + { + $this->parent = $parent; + + return $this; + } + + /** + * Sets info message. + * + * @param string $info The info text + * + * @return $this + */ + public function info($info) + { + return $this->attribute('info', $info); + } + + /** + * Sets example configuration. + * + * @param string|array $example + * + * @return $this + */ + public function example($example) + { + return $this->attribute('example', $example); + } + + /** + * Sets an attribute on the node. + * + * @param string $key + * @param mixed $value + * + * @return $this + */ + public function attribute($key, $value) + { + $this->attributes[$key] = $value; + + return $this; + } + + /** + * Returns the parent node. + * + * @return NodeParentInterface|NodeBuilder|NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition|null The builder of the parent node + */ + public function end() + { + return $this->parent; + } + + /** + * Creates the node. + * + * @param bool $forceRootNode Whether to force this node as the root node + * + * @return NodeInterface + */ + public function getNode($forceRootNode = false) + { + if ($forceRootNode) { + $this->parent = null; + } + + if (null !== $this->normalization) { + $this->normalization->before = ExprBuilder::buildExpressions($this->normalization->before); + } + + if (null !== $this->validation) { + $this->validation->rules = ExprBuilder::buildExpressions($this->validation->rules); + } + + $node = $this->createNode(); + $node->setAttributes($this->attributes); + + return $node; + } + + /** + * Sets the default value. + * + * @param mixed $value The default value + * + * @return $this + */ + public function defaultValue($value) + { + $this->default = true; + $this->defaultValue = $value; + + return $this; + } + + /** + * Sets the node as required. + * + * @return $this + */ + public function isRequired() + { + $this->required = true; + + return $this; + } + + /** + * Sets the equivalent value used when the node contains null. + * + * @param mixed $value + * + * @return $this + */ + public function treatNullLike($value) + { + $this->nullEquivalent = $value; + + return $this; + } + + /** + * Sets the equivalent value used when the node contains true. + * + * @param mixed $value + * + * @return $this + */ + public function treatTrueLike($value) + { + $this->trueEquivalent = $value; + + return $this; + } + + /** + * Sets the equivalent value used when the node contains false. + * + * @param mixed $value + * + * @return $this + */ + public function treatFalseLike($value) + { + $this->falseEquivalent = $value; + + return $this; + } + + /** + * Sets null as the default value. + * + * @return $this + */ + public function defaultNull() + { + return $this->defaultValue(null); + } + + /** + * Sets true as the default value. + * + * @return $this + */ + public function defaultTrue() + { + return $this->defaultValue(true); + } + + /** + * Sets false as the default value. + * + * @return $this + */ + public function defaultFalse() + { + return $this->defaultValue(false); + } + + /** + * Sets an expression to run before the normalization. + * + * @return ExprBuilder + */ + public function beforeNormalization() + { + return $this->normalization()->before(); + } + + /** + * Denies the node value being empty. + * + * @return $this + */ + public function cannotBeEmpty() + { + $this->allowEmptyValue = false; + + return $this; + } + + /** + * Sets an expression to run for the validation. + * + * The expression receives the value of the node and must return it. It can + * modify it. + * An exception should be thrown when the node is not valid. + * + * @return ExprBuilder + */ + public function validate() + { + return $this->validation()->rule(); + } + + /** + * Sets whether the node can be overwritten. + * + * @param bool $deny Whether the overwriting is forbidden or not + * + * @return $this + */ + public function cannotBeOverwritten($deny = true) + { + $this->merge()->denyOverwrite($deny); + + return $this; + } + + /** + * Gets the builder for validation rules. + * + * @return ValidationBuilder + */ + protected function validation() + { + if (null === $this->validation) { + $this->validation = new ValidationBuilder($this); + } + + return $this->validation; + } + + /** + * Gets the builder for merging rules. + * + * @return MergeBuilder + */ + protected function merge() + { + if (null === $this->merge) { + $this->merge = new MergeBuilder($this); + } + + return $this->merge; + } + + /** + * Gets the builder for normalization rules. + * + * @return NormalizationBuilder + */ + protected function normalization() + { + if (null === $this->normalization) { + $this->normalization = new NormalizationBuilder($this); + } + + return $this->normalization; + } + + /** + * Instantiate and configure the node according to this definition. + * + * @return NodeInterface $node The node instance + * + * @throws InvalidDefinitionException When the definition is invalid + */ + abstract protected function createNode(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeParentInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeParentInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..305e993167d351f70b761ab03f2026aafda29914 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeParentInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +/** + * An interface that must be implemented by all node parents. + * + * @author Victor Berchet + */ +interface NodeParentInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..ae642a2d49a2caf2be399bc8ab702a6dea30a64f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +/** + * This class builds normalization conditions. + * + * @author Johannes M. Schmitt + */ +class NormalizationBuilder +{ + protected $node; + public $before = array(); + public $remappings = array(); + + /** + * Constructor. + * + * @param NodeDefinition $node The related node + */ + public function __construct(NodeDefinition $node) + { + $this->node = $node; + } + + /** + * Registers a key to remap to its plural form. + * + * @param string $key The key to remap + * @param string $plural The plural of the key in case of irregular plural + * + * @return $this + */ + public function remap($key, $plural = null) + { + $this->remappings[] = array($key, null === $plural ? $key.'s' : $plural); + + return $this; + } + + /** + * Registers a closure to run before the normalization or an expression builder to build it if null is provided. + * + * @param \Closure $closure + * + * @return ExprBuilder|$this + */ + public function before(\Closure $closure = null) + { + if (null !== $closure) { + $this->before[] = $closure; + + return $this; + } + + return $this->before[] = new ExprBuilder($this->node); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..0d0207ca4fc797ea1c02b91545c2aef2ca44ab2c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.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\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; + +/** + * Abstract class that contains common code of integer and float node definitions. + * + * @author David Jeanmonod + */ +abstract class NumericNodeDefinition extends ScalarNodeDefinition +{ + protected $min; + protected $max; + + /** + * Ensures that the value is smaller than the given reference. + * + * @param mixed $max + * + * @return $this + * + * @throws \InvalidArgumentException when the constraint is inconsistent + */ + public function max($max) + { + if (isset($this->min) && $this->min > $max) { + throw new \InvalidArgumentException(sprintf('You cannot define a max(%s) as you already have a min(%s)', $max, $this->min)); + } + $this->max = $max; + + return $this; + } + + /** + * Ensures that the value is bigger than the given reference. + * + * @param mixed $min + * + * @return $this + * + * @throws \InvalidArgumentException when the constraint is inconsistent + */ + public function min($min) + { + if (isset($this->max) && $this->max < $min) { + throw new \InvalidArgumentException(sprintf('You cannot define a min(%s) as you already have a max(%s)', $min, $this->max)); + } + $this->min = $min; + + return $this; + } + + /** + * {@inheritdoc} + * + * @throws InvalidDefinitionException + */ + public function cannotBeEmpty() + { + throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to NumericNodeDefinition.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ParentNodeDefinitionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ParentNodeDefinitionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..575495bb684db9867da0690717a8e437415db0d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ParentNodeDefinitionInterface.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +/** + * An interface that must be implemented by nodes which can have children. + * + * @author Victor Berchet + */ +interface ParentNodeDefinitionInterface +{ + public function children(); + + public function append(NodeDefinition $node); + + public function setBuilder(NodeBuilder $builder); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ScalarNodeDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ScalarNodeDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..6170555ccf13945dbe572a45dc5caaa2106dd4ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ScalarNodeDefinition.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\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\ScalarNode; + +/** + * This class provides a fluent interface for defining a node. + * + * @author Johannes M. Schmitt + */ +class ScalarNodeDefinition extends VariableNodeDefinition +{ + /** + * Instantiate a Node. + * + * @return ScalarNode The node + */ + protected function instantiateNode() + { + return new ScalarNode($this->name, $this->parent); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..5d02848a0900315c399f1f8eac6f5d466d0081cb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.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\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\NodeInterface; + +/** + * This is the entry class for building a config tree. + * + * @author Johannes M. Schmitt + */ +class TreeBuilder implements NodeParentInterface +{ + protected $tree; + protected $root; + protected $builder; + + /** + * Creates the root node. + * + * @param string $name The name of the root node + * @param string $type The type of the root node + * @param NodeBuilder $builder A custom node builder instance + * + * @return ArrayNodeDefinition|NodeDefinition The root node (as an ArrayNodeDefinition when the type is 'array') + * + * @throws \RuntimeException When the node type is not supported + */ + public function root($name, $type = 'array', NodeBuilder $builder = null) + { + $builder = $builder ?: new NodeBuilder(); + + return $this->root = $builder->node($name, $type)->setParent($this); + } + + /** + * Builds the tree. + * + * @return NodeInterface + * + * @throws \RuntimeException + */ + public function buildTree() + { + if (null === $this->root) { + throw new \RuntimeException('The configuration tree has no root node.'); + } + if (null !== $this->tree) { + return $this->tree; + } + + return $this->tree = $this->root->getNode(true); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..12aa59a4fd61cc15ded1ece25742f50bd32934d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +/** + * This class builds validation conditions. + * + * @author Christophe Coevoet + */ +class ValidationBuilder +{ + protected $node; + public $rules = array(); + + /** + * Constructor. + * + * @param NodeDefinition $node The related node + */ + public function __construct(NodeDefinition $node) + { + $this->node = $node; + } + + /** + * Registers a closure to run as normalization or an expression builder to build it if null is provided. + * + * @param \Closure $closure + * + * @return ExprBuilder|$this + */ + public function rule(\Closure $closure = null) + { + if (null !== $closure) { + $this->rules[] = $closure; + + return $this; + } + + return $this->rules[] = new ExprBuilder($this->node); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/VariableNodeDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/VariableNodeDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..a46b7ea61ded07a2f1428005b6db96010a8ad274 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/VariableNodeDefinition.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\VariableNode; + +/** + * This class provides a fluent interface for defining a node. + * + * @author Johannes M. Schmitt + */ +class VariableNodeDefinition extends NodeDefinition +{ + /** + * Instantiate a Node. + * + * @return VariableNode The node + */ + protected function instantiateNode() + { + return new VariableNode($this->name, $this->parent); + } + + /** + * {@inheritdoc} + */ + protected function createNode() + { + $node = $this->instantiateNode(); + + if (null !== $this->normalization) { + $node->setNormalizationClosures($this->normalization->before); + } + + if (null !== $this->merge) { + $node->setAllowOverwrite($this->merge->allowOverwrite); + } + + if (true === $this->default) { + $node->setDefaultValue($this->defaultValue); + } + + $node->setAllowEmptyValue($this->allowEmptyValue); + $node->addEquivalentValue(null, $this->nullEquivalent); + $node->addEquivalentValue(true, $this->trueEquivalent); + $node->addEquivalentValue(false, $this->falseEquivalent); + $node->setRequired($this->required); + + if (null !== $this->validation) { + $node->setFinalValidationClosures($this->validation->rules); + } + + return $node; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ConfigurationInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ConfigurationInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d6456edb843d0d6a34bc0c1c9f275126bf3ab16e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ConfigurationInterface.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\Config\Definition; + +/** + * Configuration interface. + * + * @author Victor Berchet + */ +interface ConfigurationInterface +{ + /** + * Generates the configuration tree builder. + * + * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder + */ + public function getConfigTreeBuilder(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..ec5460f2f53c7f286ec96b118ca6313abe430def --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php @@ -0,0 +1,307 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Dumper; + +use Symfony\Component\Config\Definition\ConfigurationInterface; +use Symfony\Component\Config\Definition\NodeInterface; +use Symfony\Component\Config\Definition\ArrayNode; +use Symfony\Component\Config\Definition\EnumNode; +use Symfony\Component\Config\Definition\PrototypedArrayNode; + +/** + * Dumps a XML reference configuration for the given configuration/node instance. + * + * @author Wouter J + */ +class XmlReferenceDumper +{ + private $reference; + + public function dump(ConfigurationInterface $configuration, $namespace = null) + { + return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree(), $namespace); + } + + public function dumpNode(NodeInterface $node, $namespace = null) + { + $this->reference = ''; + $this->writeNode($node, 0, true, $namespace); + $ref = $this->reference; + $this->reference = null; + + return $ref; + } + + /** + * @param NodeInterface $node + * @param int $depth + * @param bool $root If the node is the root node + * @param string $namespace The namespace of the node + */ + private function writeNode(NodeInterface $node, $depth = 0, $root = false, $namespace = null) + { + $rootName = ($root ? 'config' : $node->getName()); + $rootNamespace = ($namespace ?: ($root ? 'http://example.org/schema/dic/'.$node->getName() : null)); + + // xml remapping + if ($node->getParent()) { + $remapping = array_filter($node->getParent()->getXmlRemappings(), function ($mapping) use ($rootName) { + return $rootName === $mapping[1]; + }); + + if (count($remapping)) { + list($singular) = current($remapping); + $rootName = $singular; + } + } + $rootName = str_replace('_', '-', $rootName); + + $rootAttributes = array(); + $rootAttributeComments = array(); + $rootChildren = array(); + $rootComments = array(); + + if ($node instanceof ArrayNode) { + $children = $node->getChildren(); + + // comments about the root node + if ($rootInfo = $node->getInfo()) { + $rootComments[] = $rootInfo; + } + + if ($rootNamespace) { + $rootComments[] = 'Namespace: '.$rootNamespace; + } + + // render prototyped nodes + if ($node instanceof PrototypedArrayNode) { + $prototype = $node->getPrototype(); + + $info = 'prototype'; + if (null !== $prototype->getInfo()) { + $info .= ': '.$prototype->getInfo(); + } + array_unshift($rootComments, $info); + + if ($key = $node->getKeyAttribute()) { + $rootAttributes[$key] = str_replace('-', ' ', $rootName).' '.$key; + } + + if ($prototype instanceof PrototypedArrayNode) { + $prototype->setName($key); + $children = array($key => $prototype); + } elseif ($prototype instanceof ArrayNode) { + $children = $prototype->getChildren(); + } else { + if ($prototype->hasDefaultValue()) { + $prototypeValue = $prototype->getDefaultValue(); + } else { + switch (get_class($prototype)) { + case 'Symfony\Component\Config\Definition\ScalarNode': + $prototypeValue = 'scalar value'; + break; + + case 'Symfony\Component\Config\Definition\FloatNode': + case 'Symfony\Component\Config\Definition\IntegerNode': + $prototypeValue = 'numeric value'; + break; + + case 'Symfony\Component\Config\Definition\BooleanNode': + $prototypeValue = 'true|false'; + break; + + case 'Symfony\Component\Config\Definition\EnumNode': + $prototypeValue = implode('|', array_map('json_encode', $prototype->getValues())); + break; + + default: + $prototypeValue = 'value'; + } + } + } + } + + // get attributes and elements + foreach ($children as $child) { + if (!$child instanceof ArrayNode) { + // get attributes + + // metadata + $name = str_replace('_', '-', $child->getName()); + $value = '%%%%not_defined%%%%'; // use a string which isn't used in the normal world + + // comments + $comments = array(); + if ($info = $child->getInfo()) { + $comments[] = $info; + } + + if ($example = $child->getExample()) { + $comments[] = 'Example: '.$example; + } + + if ($child->isRequired()) { + $comments[] = 'Required'; + } + + if ($child instanceof EnumNode) { + $comments[] = 'One of '.implode('; ', array_map('json_encode', $child->getValues())); + } + + if (count($comments)) { + $rootAttributeComments[$name] = implode(";\n", $comments); + } + + // default values + if ($child->hasDefaultValue()) { + $value = $child->getDefaultValue(); + } + + // append attribute + $rootAttributes[$name] = $value; + } else { + // get elements + $rootChildren[] = $child; + } + } + } + + // render comments + + // root node comment + if (count($rootComments)) { + foreach ($rootComments as $comment) { + $this->writeLine('', $depth); + } + } + + // attribute comments + if (count($rootAttributeComments)) { + foreach ($rootAttributeComments as $attrName => $comment) { + $commentDepth = $depth + 4 + strlen($attrName) + 2; + $commentLines = explode("\n", $comment); + $multiline = (count($commentLines) > 1); + $comment = implode(PHP_EOL.str_repeat(' ', $commentDepth), $commentLines); + + if ($multiline) { + $this->writeLine('', $depth); + } else { + $this->writeLine('', $depth); + } + } + } + + // render start tag + attributes + $rootIsVariablePrototype = isset($prototypeValue); + $rootIsEmptyTag = (0 === count($rootChildren) && !$rootIsVariablePrototype); + $rootOpenTag = '<'.$rootName; + if (1 >= ($attributesCount = count($rootAttributes))) { + if (1 === $attributesCount) { + $rootOpenTag .= sprintf(' %s="%s"', current(array_keys($rootAttributes)), $this->writeValue(current($rootAttributes))); + } + + $rootOpenTag .= $rootIsEmptyTag ? ' />' : '>'; + + if ($rootIsVariablePrototype) { + $rootOpenTag .= $prototypeValue.''; + } + + $this->writeLine($rootOpenTag, $depth); + } else { + $this->writeLine($rootOpenTag, $depth); + + $i = 1; + + foreach ($rootAttributes as $attrName => $attrValue) { + $attr = sprintf('%s="%s"', $attrName, $this->writeValue($attrValue)); + + $this->writeLine($attr, $depth + 4); + + if ($attributesCount === $i++) { + $this->writeLine($rootIsEmptyTag ? '/>' : '>', $depth); + + if ($rootIsVariablePrototype) { + $rootOpenTag .= $prototypeValue.''; + } + } + } + } + + // render children tags + foreach ($rootChildren as $child) { + $this->writeLine(''); + $this->writeNode($child, $depth + 4); + } + + // render end tag + if (!$rootIsEmptyTag && !$rootIsVariablePrototype) { + $this->writeLine(''); + + $rootEndTag = ''; + $this->writeLine($rootEndTag, $depth); + } + } + + /** + * Outputs a single config reference line. + * + * @param string $text + * @param int $indent + */ + private function writeLine($text, $indent = 0) + { + $indent = strlen($text) + $indent; + $format = '%'.$indent.'s'; + + $this->reference .= sprintf($format, $text).PHP_EOL; + } + + /** + * Renders the string conversion of the value. + * + * @param mixed $value + * + * @return string + */ + private function writeValue($value) + { + if ('%%%%not_defined%%%%' === $value) { + return ''; + } + + if (is_string($value) || is_numeric($value)) { + return $value; + } + + if (false === $value) { + return 'false'; + } + + if (true === $value) { + return 'true'; + } + + if (null === $value) { + return 'null'; + } + + if (empty($value)) { + return ''; + } + + if (is_array($value)) { + return implode(',', $value); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..a474249380914bf3c013bf57ac9ea739877d37f6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php @@ -0,0 +1,224 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Dumper; + +use Symfony\Component\Config\Definition\ConfigurationInterface; +use Symfony\Component\Config\Definition\NodeInterface; +use Symfony\Component\Config\Definition\ArrayNode; +use Symfony\Component\Config\Definition\EnumNode; +use Symfony\Component\Config\Definition\PrototypedArrayNode; +use Symfony\Component\Config\Definition\ScalarNode; +use Symfony\Component\Yaml\Inline; + +/** + * Dumps a Yaml reference configuration for the given configuration/node instance. + * + * @author Kevin Bond + */ +class YamlReferenceDumper +{ + private $reference; + + public function dump(ConfigurationInterface $configuration) + { + return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree()); + } + + public function dumpNode(NodeInterface $node) + { + $this->reference = ''; + $this->writeNode($node); + $ref = $this->reference; + $this->reference = null; + + return $ref; + } + + /** + * @param NodeInterface $node + * @param int $depth + * @param bool $prototypedArray + */ + private function writeNode(NodeInterface $node, $depth = 0, $prototypedArray = false) + { + $comments = array(); + $default = ''; + $defaultArray = null; + $children = null; + $example = $node->getExample(); + + // defaults + if ($node instanceof ArrayNode) { + $children = $node->getChildren(); + + if ($node instanceof PrototypedArrayNode) { + $children = $this->getPrototypeChildren($node); + } + + if (!$children) { + if ($node->hasDefaultValue() && count($defaultArray = $node->getDefaultValue())) { + $default = ''; + } elseif (!is_array($example)) { + $default = '[]'; + } + } + } elseif ($node instanceof EnumNode) { + $comments[] = 'One of '.implode('; ', array_map('json_encode', $node->getValues())); + $default = $node->hasDefaultValue() ? Inline::dump($node->getDefaultValue()) : '~'; + } else { + $default = '~'; + + if ($node->hasDefaultValue()) { + $default = $node->getDefaultValue(); + + if (is_array($default)) { + if (count($defaultArray = $node->getDefaultValue())) { + $default = ''; + } elseif (!is_array($example)) { + $default = '[]'; + } + } else { + $default = Inline::dump($default); + } + } + } + + // required? + if ($node->isRequired()) { + $comments[] = 'Required'; + } + + // example + if ($example && !is_array($example)) { + $comments[] = 'Example: '.$example; + } + + $default = (string) $default != '' ? ' '.$default : ''; + $comments = count($comments) ? '# '.implode(', ', $comments) : ''; + + $key = $prototypedArray ? '-' : $node->getName().':'; + $text = rtrim(sprintf('%-21s%s %s', $key, $default, $comments), ' '); + + if ($info = $node->getInfo()) { + $this->writeLine(''); + // indenting multi-line info + $info = str_replace("\n", sprintf("\n%".($depth * 4).'s# ', ' '), $info); + $this->writeLine('# '.$info, $depth * 4); + } + + $this->writeLine($text, $depth * 4); + + // output defaults + if ($defaultArray) { + $this->writeLine(''); + + $message = count($defaultArray) > 1 ? 'Defaults' : 'Default'; + + $this->writeLine('# '.$message.':', $depth * 4 + 4); + + $this->writeArray($defaultArray, $depth + 1); + } + + if (is_array($example)) { + $this->writeLine(''); + + $message = count($example) > 1 ? 'Examples' : 'Example'; + + $this->writeLine('# '.$message.':', $depth * 4 + 4); + + $this->writeArray($example, $depth + 1); + } + + if ($children) { + foreach ($children as $childNode) { + $this->writeNode($childNode, $depth + 1, $node instanceof PrototypedArrayNode && !$node->getKeyAttribute()); + } + } + } + + /** + * Outputs a single config reference line. + * + * @param string $text + * @param int $indent + */ + private function writeLine($text, $indent = 0) + { + $indent = strlen($text) + $indent; + $format = '%'.$indent.'s'; + + $this->reference .= sprintf($format, $text)."\n"; + } + + private function writeArray(array $array, $depth) + { + $isIndexed = array_values($array) === $array; + + foreach ($array as $key => $value) { + if (is_array($value)) { + $val = ''; + } else { + $val = $value; + } + + if ($isIndexed) { + $this->writeLine('- '.$val, $depth * 4); + } else { + $this->writeLine(sprintf('%-20s %s', $key.':', $val), $depth * 4); + } + + if (is_array($value)) { + $this->writeArray($value, $depth + 1); + } + } + } + + /** + * @param PrototypedArrayNode $node + * + * @return array + */ + private function getPrototypeChildren(PrototypedArrayNode $node) + { + $prototype = $node->getPrototype(); + $key = $node->getKeyAttribute(); + + // Do not expand prototype if it isn't an array node nor uses attribute as key + if (!$key && !$prototype instanceof ArrayNode) { + return $node->getChildren(); + } + + if ($prototype instanceof ArrayNode) { + $keyNode = new ArrayNode($key, $node); + $children = $prototype->getChildren(); + + if ($prototype instanceof PrototypedArrayNode && $prototype->getKeyAttribute()) { + $children = $this->getPrototypeChildren($prototype); + } + + // add children + foreach ($children as $childNode) { + $keyNode->addChild($childNode); + } + } else { + $keyNode = new ScalarNode($key, $node); + } + + $info = 'Prototype'; + if (null !== $prototype->getInfo()) { + $info .= ': '.$prototype->getInfo(); + } + $keyNode->setInfo($info); + + return array($key => $keyNode); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/EnumNode.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/EnumNode.php new file mode 100644 index 0000000000000000000000000000000000000000..9b4c4156e311ef36cc125b5276eded8088754ee2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/EnumNode.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\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; + +/** + * Node which only allows a finite set of values. + * + * @author Johannes M. Schmitt + */ +class EnumNode extends ScalarNode +{ + private $values; + + public function __construct($name, NodeInterface $parent = null, array $values = array()) + { + $values = array_unique($values); + if (empty($values)) { + throw new \InvalidArgumentException('$values must contain at least one element.'); + } + + parent::__construct($name, $parent); + $this->values = $values; + } + + public function getValues() + { + return $this->values; + } + + protected function finalizeValue($value) + { + $value = parent::finalizeValue($value); + + if (!in_array($value, $this->values, true)) { + $ex = new InvalidConfigurationException(sprintf( + 'The value %s is not allowed for path "%s". Permissible values: %s', + json_encode($value), + $this->getPath(), + implode(', ', array_map('json_encode', $this->values)))); + $ex->setPath($this->getPath()); + + throw $ex; + } + + return $value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/DuplicateKeyException.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/DuplicateKeyException.php new file mode 100644 index 0000000000000000000000000000000000000000..48dd9325e9062462296e7223e01de3791c119197 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/DuplicateKeyException.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Exception; + +/** + * This exception is thrown whenever the key of an array is not unique. This can + * only be the case if the configuration is coming from an XML file. + * + * @author Johannes M. Schmitt + */ +class DuplicateKeyException extends InvalidConfigurationException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/Exception.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..8933a49233c32a1ff0a4997ce459164873f8e25f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/Exception.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Exception; + +/** + * Base exception for all configuration exceptions. + * + * @author Johannes M. Schmitt + */ +class Exception extends \RuntimeException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/ForbiddenOverwriteException.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/ForbiddenOverwriteException.php new file mode 100644 index 0000000000000000000000000000000000000000..726c07fb8b6341854de7602d35b79f19517164dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/ForbiddenOverwriteException.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Exception; + +/** + * This exception is thrown when a configuration path is overwritten from a + * subsequent configuration file, but the entry node specifically forbids this. + * + * @author Johannes M. Schmitt + */ +class ForbiddenOverwriteException extends InvalidConfigurationException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/InvalidConfigurationException.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/InvalidConfigurationException.php new file mode 100644 index 0000000000000000000000000000000000000000..3dbc57b15317fc51105bf6f81c6cf9f176f35683 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/InvalidConfigurationException.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Exception; + +/** + * A very general exception which can be thrown whenever non of the more specific + * exceptions is suitable. + * + * @author Johannes M. Schmitt + */ +class InvalidConfigurationException extends Exception +{ + private $path; + private $containsHints = false; + + public function setPath($path) + { + $this->path = $path; + } + + public function getPath() + { + return $this->path; + } + + /** + * Adds extra information that is suffixed to the original exception message. + * + * @param string $hint + */ + public function addHint($hint) + { + if (!$this->containsHints) { + $this->message .= "\nHint: ".$hint; + $this->containsHints = true; + } else { + $this->message .= ', '.$hint; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/InvalidDefinitionException.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/InvalidDefinitionException.php new file mode 100644 index 0000000000000000000000000000000000000000..98310dae02a68ac412cce88dd178a115b221410a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/InvalidDefinitionException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Exception; + +/** + * Thrown when an error is detected in a node Definition. + * + * @author Victor Berchet + */ +class InvalidDefinitionException extends Exception +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/InvalidTypeException.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/InvalidTypeException.php new file mode 100644 index 0000000000000000000000000000000000000000..d7ca8c9d0956b38157c45b60c1575825aaa6e40e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/InvalidTypeException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Exception; + +/** + * This exception is thrown if an invalid type is encountered. + * + * @author Johannes M. Schmitt + */ +class InvalidTypeException extends InvalidConfigurationException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/UnsetKeyException.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/UnsetKeyException.php new file mode 100644 index 0000000000000000000000000000000000000000..863181a33f52ed7af37587e2dba31661833040d7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Exception/UnsetKeyException.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Exception; + +/** + * This exception is usually not encountered by the end-user, but only used + * internally to signal the parent scope to unset a key. + * + * @author Johannes M. Schmitt + */ +class UnsetKeyException extends Exception +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/FloatNode.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/FloatNode.php new file mode 100644 index 0000000000000000000000000000000000000000..5e1af17ada07b22cb4e43a171a7048359fee0e0e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/FloatNode.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\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidTypeException; + +/** + * This node represents a float value in the config tree. + * + * @author Jeanmonod David + */ +class FloatNode extends NumericNode +{ + /** + * {@inheritdoc} + */ + protected function validateType($value) + { + // Integers are also accepted, we just cast them + if (is_int($value)) { + $value = (float) $value; + } + + if (!is_float($value)) { + $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected float, but got %s.', $this->getPath(), gettype($value))); + if ($hint = $this->getInfo()) { + $ex->addHint($hint); + } + $ex->setPath($this->getPath()); + + throw $ex; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/IntegerNode.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/IntegerNode.php new file mode 100644 index 0000000000000000000000000000000000000000..ba2307024cae31b5b9b689fe5040122cef6997b6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/IntegerNode.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidTypeException; + +/** + * This node represents an integer value in the config tree. + * + * @author Jeanmonod David + */ +class IntegerNode extends NumericNode +{ + /** + * {@inheritdoc} + */ + protected function validateType($value) + { + if (!is_int($value)) { + $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected int, but got %s.', $this->getPath(), gettype($value))); + if ($hint = $this->getInfo()) { + $ex->addHint($hint); + } + $ex->setPath($this->getPath()); + + throw $ex; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/NodeInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/NodeInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b9bddc49385a3ca8330f42359e4f4c227f8140a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/NodeInterface.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +/** + * Common Interface among all nodes. + * + * In most cases, it is better to inherit from BaseNode instead of implementing + * this interface yourself. + * + * @author Johannes M. Schmitt + */ +interface NodeInterface +{ + /** + * Returns the name of the node. + * + * @return string The name of the node + */ + public function getName(); + + /** + * Returns the path of the node. + * + * @return string The node path + */ + public function getPath(); + + /** + * Returns true when the node is required. + * + * @return bool If the node is required + */ + public function isRequired(); + + /** + * Returns true when the node has a default value. + * + * @return bool If the node has a default value + */ + public function hasDefaultValue(); + + /** + * Returns the default value of the node. + * + * @return mixed The default value + * + * @throws \RuntimeException if the node has no default value + */ + public function getDefaultValue(); + + /** + * Normalizes the supplied value. + * + * @param mixed $value The value to normalize + * + * @return mixed The normalized value + */ + public function normalize($value); + + /** + * Merges two values together. + * + * @param mixed $leftSide + * @param mixed $rightSide + * + * @return mixed The merged values + */ + public function merge($leftSide, $rightSide); + + /** + * Finalizes a value. + * + * @param mixed $value The value to finalize + * + * @return mixed The finalized value + */ + public function finalize($value); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/NumericNode.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/NumericNode.php new file mode 100644 index 0000000000000000000000000000000000000000..439935e4559f8c978dedcea4cc3f532adedcb290 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/NumericNode.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; + +/** + * This node represents a numeric value in the config tree. + * + * @author David Jeanmonod + */ +class NumericNode extends ScalarNode +{ + protected $min; + protected $max; + + public function __construct($name, NodeInterface $parent = null, $min = null, $max = null) + { + parent::__construct($name, $parent); + $this->min = $min; + $this->max = $max; + } + + /** + * {@inheritdoc} + */ + protected function finalizeValue($value) + { + $value = parent::finalizeValue($value); + + $errorMsg = null; + if (isset($this->min) && $value < $this->min) { + $errorMsg = sprintf('The value %s is too small for path "%s". Should be greater than or equal to %s', $value, $this->getPath(), $this->min); + } + if (isset($this->max) && $value > $this->max) { + $errorMsg = sprintf('The value %s is too big for path "%s". Should be less than or equal to %s', $value, $this->getPath(), $this->max); + } + if (isset($errorMsg)) { + $ex = new InvalidConfigurationException($errorMsg); + $ex->setPath($this->getPath()); + throw $ex; + } + + return $value; + } + + /** + * {@inheritdoc} + */ + protected function isValueEmpty($value) + { + // a numeric value cannot be empty + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Processor.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Processor.php new file mode 100644 index 0000000000000000000000000000000000000000..025e69378f948be4a7ddd18a60ae3c57ba38aa52 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Processor.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +/** + * This class is the entry point for config normalization/merging/finalization. + * + * @author Johannes M. Schmitt + */ +class Processor +{ + /** + * Processes an array of configurations. + * + * @param NodeInterface $configTree The node tree describing the configuration + * @param array $configs An array of configuration items to process + * + * @return array The processed configuration + */ + public function process(NodeInterface $configTree, array $configs) + { + $currentConfig = array(); + foreach ($configs as $config) { + $config = $configTree->normalize($config); + $currentConfig = $configTree->merge($currentConfig, $config); + } + + return $configTree->finalize($currentConfig); + } + + /** + * Processes an array of configurations. + * + * @param ConfigurationInterface $configuration The configuration class + * @param array $configs An array of configuration items to process + * + * @return array The processed configuration + */ + public function processConfiguration(ConfigurationInterface $configuration, array $configs) + { + return $this->process($configuration->getConfigTreeBuilder()->buildTree(), $configs); + } + + /** + * Normalizes a configuration entry. + * + * This method returns a normalize configuration array for a given key + * to remove the differences due to the original format (YAML and XML mainly). + * + * Here is an example. + * + * The configuration in XML: + * + * twig.extension.foo + * twig.extension.bar + * + * And the same configuration in YAML: + * + * extensions: ['twig.extension.foo', 'twig.extension.bar'] + * + * @param array $config A config array + * @param string $key The key to normalize + * @param string $plural The plural form of the key if it is irregular + * + * @return array + */ + public static function normalizeConfig($config, $key, $plural = null) + { + if (null === $plural) { + $plural = $key.'s'; + } + + if (isset($config[$plural])) { + return $config[$plural]; + } + + if (isset($config[$key])) { + if (is_string($config[$key]) || !is_int(key($config[$key]))) { + // only one + return array($config[$key]); + } + + return $config[$key]; + } + + return array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..8bbb84d4dcc7b54e60b594526aed04e6571f6f03 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypeNodeInterface.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\Config\Definition; + +/** + * This interface must be implemented by nodes which can be used as prototypes. + * + * @author Johannes M. Schmitt + */ +interface PrototypeNodeInterface extends NodeInterface +{ + /** + * Sets the name of the node. + * + * @param string $name The name of the node + */ + public function setName($name); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php new file mode 100644 index 0000000000000000000000000000000000000000..1c3c2188326bef3ebd0e10479b8bb51a86ef01a8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php @@ -0,0 +1,389 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; +use Symfony\Component\Config\Definition\Exception\DuplicateKeyException; +use Symfony\Component\Config\Definition\Exception\UnsetKeyException; +use Symfony\Component\Config\Definition\Exception\Exception; + +/** + * Represents a prototyped Array node in the config tree. + * + * @author Johannes M. Schmitt + */ +class PrototypedArrayNode extends ArrayNode +{ + protected $prototype; + protected $keyAttribute; + protected $removeKeyAttribute = false; + protected $minNumberOfElements = 0; + protected $defaultValue = array(); + protected $defaultChildren; + /** + * @var NodeInterface[] An array of the prototypes of the simplified value children + */ + private $valuePrototypes = array(); + + /** + * Sets the minimum number of elements that a prototype based node must + * contain. By default this is zero, meaning no elements. + * + * @param int $number + */ + public function setMinNumberOfElements($number) + { + $this->minNumberOfElements = $number; + } + + /** + * Sets the attribute which value is to be used as key. + * + * This is useful when you have an indexed array that should be an + * associative array. You can select an item from within the array + * to be the key of the particular item. For example, if "id" is the + * "key", then: + * + * array( + * array('id' => 'my_name', 'foo' => 'bar'), + * ); + * + * becomes + * + * array( + * 'my_name' => array('foo' => 'bar'), + * ); + * + * If you'd like "'id' => 'my_name'" to still be present in the resulting + * array, then you can set the second argument of this method to false. + * + * @param string $attribute The name of the attribute which value is to be used as a key + * @param bool $remove Whether or not to remove the key + */ + public function setKeyAttribute($attribute, $remove = true) + { + $this->keyAttribute = $attribute; + $this->removeKeyAttribute = $remove; + } + + /** + * Retrieves the name of the attribute which value should be used as key. + * + * @return string The name of the attribute + */ + public function getKeyAttribute() + { + return $this->keyAttribute; + } + + /** + * Sets the default value of this node. + * + * @param string $value + * + * @throws \InvalidArgumentException if the default value is not an array + */ + public function setDefaultValue($value) + { + if (!is_array($value)) { + throw new \InvalidArgumentException($this->getPath().': the default value of an array node has to be an array.'); + } + + $this->defaultValue = $value; + } + + /** + * Checks if the node has a default value. + * + * @return bool + */ + public function hasDefaultValue() + { + return true; + } + + /** + * Adds default children when none are set. + * + * @param int|string|array|null $children The number of children|The child name|The children names to be added + */ + public function setAddChildrenIfNoneSet($children = array('defaults')) + { + if (null === $children) { + $this->defaultChildren = array('defaults'); + } else { + $this->defaultChildren = is_int($children) && $children > 0 ? range(1, $children) : (array) $children; + } + } + + /** + * Retrieves the default value. + * + * The default value could be either explicited or derived from the prototype + * default value. + * + * @return array The default value + */ + public function getDefaultValue() + { + if (null !== $this->defaultChildren) { + $default = $this->prototype->hasDefaultValue() ? $this->prototype->getDefaultValue() : array(); + $defaults = array(); + foreach (array_values($this->defaultChildren) as $i => $name) { + $defaults[null === $this->keyAttribute ? $i : $name] = $default; + } + + return $defaults; + } + + return $this->defaultValue; + } + + /** + * Sets the node prototype. + * + * @param PrototypeNodeInterface $node + */ + public function setPrototype(PrototypeNodeInterface $node) + { + $this->prototype = $node; + } + + /** + * Retrieves the prototype. + * + * @return PrototypeNodeInterface The prototype + */ + public function getPrototype() + { + return $this->prototype; + } + + /** + * Disable adding concrete children for prototyped nodes. + * + * @param NodeInterface $node The child node to add + * + * @throws Exception + */ + public function addChild(NodeInterface $node) + { + throw new Exception('A prototyped array node can not have concrete children.'); + } + + /** + * Finalizes the value of this node. + * + * @param mixed $value + * + * @return mixed The finalized value + * + * @throws UnsetKeyException + * @throws InvalidConfigurationException if the node doesn't have enough children + */ + protected function finalizeValue($value) + { + if (false === $value) { + $msg = sprintf('Unsetting key for path "%s", value: %s', $this->getPath(), json_encode($value)); + throw new UnsetKeyException($msg); + } + + foreach ($value as $k => $v) { + $prototype = $this->getPrototypeForChild($k); + try { + $value[$k] = $prototype->finalize($v); + } catch (UnsetKeyException $e) { + unset($value[$k]); + } + } + + if (count($value) < $this->minNumberOfElements) { + $msg = sprintf('The path "%s" should have at least %d element(s) defined.', $this->getPath(), $this->minNumberOfElements); + $ex = new InvalidConfigurationException($msg); + $ex->setPath($this->getPath()); + + throw $ex; + } + + return $value; + } + + /** + * Normalizes the value. + * + * @param mixed $value The value to normalize + * + * @return mixed The normalized value + * + * @throws InvalidConfigurationException + * @throws DuplicateKeyException + */ + protected function normalizeValue($value) + { + if (false === $value) { + return $value; + } + + $value = $this->remapXml($value); + + $isAssoc = array_keys($value) !== range(0, count($value) - 1); + $normalized = array(); + foreach ($value as $k => $v) { + if (null !== $this->keyAttribute && is_array($v)) { + if (!isset($v[$this->keyAttribute]) && is_int($k) && !$isAssoc) { + $msg = sprintf('The attribute "%s" must be set for path "%s".', $this->keyAttribute, $this->getPath()); + $ex = new InvalidConfigurationException($msg); + $ex->setPath($this->getPath()); + + throw $ex; + } elseif (isset($v[$this->keyAttribute])) { + $k = $v[$this->keyAttribute]; + + // remove the key attribute when required + if ($this->removeKeyAttribute) { + unset($v[$this->keyAttribute]); + } + + // if only "value" is left + if (array_keys($v) === array('value')) { + $v = $v['value']; + if ($this->prototype instanceof ArrayNode && ($children = $this->prototype->getChildren()) && array_key_exists('value', $children)) { + $valuePrototype = current($this->valuePrototypes) ?: clone $children['value']; + $valuePrototype->parent = $this; + $originalClosures = $this->prototype->normalizationClosures; + if (is_array($originalClosures)) { + $valuePrototypeClosures = $valuePrototype->normalizationClosures; + $valuePrototype->normalizationClosures = is_array($valuePrototypeClosures) ? array_merge($originalClosures, $valuePrototypeClosures) : $originalClosures; + } + $this->valuePrototypes[$k] = $valuePrototype; + } + } + } + + if (array_key_exists($k, $normalized)) { + $msg = sprintf('Duplicate key "%s" for path "%s".', $k, $this->getPath()); + $ex = new DuplicateKeyException($msg); + $ex->setPath($this->getPath()); + + throw $ex; + } + } + + $prototype = $this->getPrototypeForChild($k); + if (null !== $this->keyAttribute || $isAssoc) { + $normalized[$k] = $prototype->normalize($v); + } else { + $normalized[] = $prototype->normalize($v); + } + } + + return $normalized; + } + + /** + * Merges values together. + * + * @param mixed $leftSide The left side to merge + * @param mixed $rightSide The right side to merge + * + * @return mixed The merged values + * + * @throws InvalidConfigurationException + * @throws \RuntimeException + */ + protected function mergeValues($leftSide, $rightSide) + { + if (false === $rightSide) { + // if this is still false after the last config has been merged the + // finalization pass will take care of removing this key entirely + return false; + } + + if (false === $leftSide || !$this->performDeepMerging) { + return $rightSide; + } + + foreach ($rightSide as $k => $v) { + // prototype, and key is irrelevant, so simply append the element + if (null === $this->keyAttribute) { + $leftSide[] = $v; + continue; + } + + // no conflict + if (!array_key_exists($k, $leftSide)) { + if (!$this->allowNewKeys) { + $ex = new InvalidConfigurationException(sprintf( + 'You are not allowed to define new elements for path "%s". '. + 'Please define all elements for this path in one config file.', + $this->getPath() + )); + $ex->setPath($this->getPath()); + + throw $ex; + } + + $leftSide[$k] = $v; + continue; + } + + $prototype = $this->getPrototypeForChild($k); + $leftSide[$k] = $prototype->merge($leftSide[$k], $v); + } + + return $leftSide; + } + + /** + * Returns a prototype for the child node that is associated to $key in the value array. + * For general child nodes, this will be $this->prototype. + * But if $this->removeKeyAttribute is true and there are only two keys in the child node: + * one is same as this->keyAttribute and the other is 'value', then the prototype will be different. + * + * For example, assume $this->keyAttribute is 'name' and the value array is as follows: + * array( + * array( + * 'name' => 'name001', + * 'value' => 'value001' + * ) + * ) + * + * Now, the key is 0 and the child node is: + * array( + * 'name' => 'name001', + * 'value' => 'value001' + * ) + * + * When normalizing the value array, the 'name' element will removed from the child node + * and its value becomes the new key of the child node: + * array( + * 'name001' => array('value' => 'value001') + * ) + * + * Now only 'value' element is left in the child node which can be further simplified into a string: + * array('name001' => 'value001') + * + * Now, the key becomes 'name001' and the child node becomes 'value001' and + * the prototype of child node 'name001' should be a ScalarNode instead of an ArrayNode instance. + * + * @param string $key The key of the child node + * + * @return mixed The prototype instance + */ + private function getPrototypeForChild($key) + { + $prototype = isset($this->valuePrototypes[$key]) ? $this->valuePrototypes[$key] : $this->prototype; + $prototype->setName($key); + + return $prototype; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ScalarNode.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ScalarNode.php new file mode 100644 index 0000000000000000000000000000000000000000..6b3fd0b68fd226ae310324130dfd5290baf793e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ScalarNode.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidTypeException; + +/** + * This node represents a scalar value in the config tree. + * + * The following values are considered scalars: + * * booleans + * * strings + * * null + * * integers + * * floats + * + * @author Johannes M. Schmitt + */ +class ScalarNode extends VariableNode +{ + /** + * {@inheritdoc} + */ + protected function validateType($value) + { + if (!is_scalar($value) && null !== $value) { + $ex = new InvalidTypeException(sprintf( + 'Invalid type for path "%s". Expected scalar, but got %s.', + $this->getPath(), + gettype($value) + )); + if ($hint = $this->getInfo()) { + $ex->addHint($hint); + } + $ex->setPath($this->getPath()); + + throw $ex; + } + } + + /** + * {@inheritdoc} + */ + protected function isValueEmpty($value) + { + return null === $value || '' === $value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/VariableNode.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/VariableNode.php new file mode 100644 index 0000000000000000000000000000000000000000..a9c35284cdcdb5f41d85a608e02cfb3b8bdd7d79 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/VariableNode.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\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; + +/** + * This node represents a value of variable type in the config tree. + * + * This node is intended for values of arbitrary type. + * Any PHP type is accepted as a value. + * + * @author Jeremy Mikola + */ +class VariableNode extends BaseNode implements PrototypeNodeInterface +{ + protected $defaultValueSet = false; + protected $defaultValue; + protected $allowEmptyValue = true; + + /** + * {@inheritdoc} + */ + public function setDefaultValue($value) + { + $this->defaultValueSet = true; + $this->defaultValue = $value; + } + + /** + * {@inheritdoc} + */ + public function hasDefaultValue() + { + return $this->defaultValueSet; + } + + /** + * {@inheritdoc} + */ + public function getDefaultValue() + { + $v = $this->defaultValue; + + return $v instanceof \Closure ? $v() : $v; + } + + /** + * Sets if this node is allowed to have an empty value. + * + * @param bool $boolean True if this entity will accept empty values + */ + public function setAllowEmptyValue($boolean) + { + $this->allowEmptyValue = (bool) $boolean; + } + + /** + * {@inheritdoc} + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * {@inheritdoc} + */ + protected function validateType($value) + { + } + + /** + * {@inheritdoc} + */ + protected function finalizeValue($value) + { + if (!$this->allowEmptyValue && $this->isValueEmpty($value)) { + $ex = new InvalidConfigurationException(sprintf( + 'The path "%s" cannot contain an empty value, but got %s.', + $this->getPath(), + json_encode($value) + )); + if ($hint = $this->getInfo()) { + $ex->addHint($hint); + } + $ex->setPath($this->getPath()); + + throw $ex; + } + + return $value; + } + + /** + * {@inheritdoc} + */ + protected function normalizeValue($value) + { + return $value; + } + + /** + * {@inheritdoc} + */ + protected function mergeValues($leftSide, $rightSide) + { + return $rightSide; + } + + /** + * Evaluates if the given value is to be treated as empty. + * + * By default, PHP's empty() function is used to test for emptiness. This + * method may be overridden by subtypes to better match their understanding + * of empty data. + * + * @param mixed $value + * + * @return bool + */ + protected function isValueEmpty($value) + { + return empty($value); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLoaderImportCircularReferenceException.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLoaderImportCircularReferenceException.php new file mode 100644 index 0000000000000000000000000000000000000000..6a3b01cfbe097a49bf2bfc03728440b891794aa0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLoaderImportCircularReferenceException.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\Config\Exception; + +/** + * Exception class for when a circular reference is detected when importing resources. + * + * @author Fabien Potencier + */ +class FileLoaderImportCircularReferenceException extends FileLoaderLoadException +{ + public function __construct(array $resources, $code = null, $previous = null) + { + $message = sprintf('Circular reference detected in "%s" ("%s" > "%s").', $this->varToString($resources[0]), implode('" > "', $resources), $resources[0]); + + \Exception::__construct($message, $code, $previous); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php new file mode 100644 index 0000000000000000000000000000000000000000..6af3dd0a6d618619639d894005d5a82239e55ef7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Exception; + +/** + * Exception class for when a resource cannot be loaded or imported. + * + * @author Ryan Weaver + */ +class FileLoaderLoadException extends \Exception +{ + /** + * @param string $resource The resource that could not be imported + * @param string $sourceResource The original resource importing the new resource + * @param int $code The error code + * @param \Exception $previous A previous exception + */ + public function __construct($resource, $sourceResource = null, $code = null, $previous = null) + { + $message = ''; + if ($previous) { + // Include the previous exception, to help the user see what might be the underlying cause + + // Trim the trailing period of the previous message. We only want 1 period remove so no rtrim... + if ('.' === substr($previous->getMessage(), -1)) { + $trimmedMessage = substr($previous->getMessage(), 0, -1); + $message .= sprintf('%s', $trimmedMessage).' in '; + } else { + $message .= sprintf('%s', $previous->getMessage()).' in '; + } + $message .= $resource.' '; + + // show tweaked trace to complete the human readable sentence + if (null === $sourceResource) { + $message .= sprintf('(which is loaded in resource "%s")', $this->varToString($resource)); + } else { + $message .= sprintf('(which is being imported from "%s")', $this->varToString($sourceResource)); + } + $message .= '.'; + + // if there's no previous message, present it the default way + } elseif (null === $sourceResource) { + $message .= sprintf('Cannot load resource "%s".', $this->varToString($resource)); + } else { + $message .= sprintf('Cannot import resource "%s" from "%s".', $this->varToString($resource), $this->varToString($sourceResource)); + } + + // Is the resource located inside a bundle? + if ('@' === $resource[0]) { + $parts = explode(DIRECTORY_SEPARATOR, $resource); + $bundle = substr($parts[0], 1); + $message .= sprintf(' Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle); + $message .= sprintf(' If the bundle is registered, make sure the bundle path "%s" is not empty.', $resource); + } + + parent::__construct($message, $code, $previous); + } + + protected function varToString($var) + { + if (is_object($var)) { + return sprintf('Object(%s)', get_class($var)); + } + + if (is_array($var)) { + $a = array(); + foreach ($var as $k => $v) { + $a[] = sprintf('%s => %s', $k, $this->varToString($v)); + } + + return sprintf('Array(%s)', implode(', ', $a)); + } + + if (is_resource($var)) { + return sprintf('Resource(%s)', get_resource_type($var)); + } + + if (null === $var) { + return 'null'; + } + + if (false === $var) { + return 'false'; + } + + if (true === $var) { + return 'true'; + } + + return (string) $var; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..4d4a56dfc66a8c0c38e1c63db810ff6398d952eb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Exception; + +/** + * File locator exception if a file does not exist. + * + * @author Leo Feyer + */ +class FileLocatorFileNotFoundException extends \InvalidArgumentException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/FileLocator.php b/vendor/symfony/symfony/src/Symfony/Component/Config/FileLocator.php new file mode 100644 index 0000000000000000000000000000000000000000..6b686390bc296ac2966c243bdc16234f63e7092c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/FileLocator.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config; + +use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; + +/** + * FileLocator uses an array of pre-defined paths to find files. + * + * @author Fabien Potencier + */ +class FileLocator implements FileLocatorInterface +{ + protected $paths; + + /** + * Constructor. + * + * @param string|array $paths A path or an array of paths where to look for resources + */ + public function __construct($paths = array()) + { + $this->paths = (array) $paths; + } + + /** + * {@inheritdoc} + */ + public function locate($name, $currentPath = null, $first = true) + { + if ('' == $name) { + throw new \InvalidArgumentException('An empty file name is not valid to be located.'); + } + + if ($this->isAbsolutePath($name)) { + if (!file_exists($name)) { + throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist.', $name)); + } + + return $name; + } + + $paths = $this->paths; + + if (null !== $currentPath) { + array_unshift($paths, $currentPath); + } + + $paths = array_unique($paths); + $filepaths = array(); + + foreach ($paths as $path) { + if (@file_exists($file = $path.DIRECTORY_SEPARATOR.$name)) { + if (true === $first) { + return $file; + } + $filepaths[] = $file; + } + } + + if (!$filepaths) { + throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist (in: %s).', $name, implode(', ', $paths))); + } + + return $filepaths; + } + + /** + * Returns whether the file path is an absolute path. + * + * @param string $file A file path + * + * @return bool + */ + private function isAbsolutePath($file) + { + if ($file[0] === '/' || $file[0] === '\\' + || (strlen($file) > 3 && ctype_alpha($file[0]) + && $file[1] === ':' + && ($file[2] === '\\' || $file[2] === '/') + ) + || null !== parse_url($file, PHP_URL_SCHEME) + ) { + return true; + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/FileLocatorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/FileLocatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..cf3c2e594df85977cb8bbc5d1970951b3c4ac63a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/FileLocatorInterface.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config; + +use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; + +/** + * @author Fabien Potencier + */ +interface FileLocatorInterface +{ + /** + * Returns a full path for a given file name. + * + * @param string $name The file name to locate + * @param string|null $currentPath The current path + * @param bool $first Whether to return the first occurrence or an array of filenames + * + * @return string|array The full path to the file or an array of file paths + * + * @throws \InvalidArgumentException If $name is empty + * @throws FileLocatorFileNotFoundException If a file is not found + */ + public function locate($name, $currentPath = null, $first = true); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Config/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/DelegatingLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/DelegatingLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..3097878bf0bf295d973d77a49517f2d92ba8a5c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/DelegatingLoader.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Loader; + +use Symfony\Component\Config\Exception\FileLoaderLoadException; + +/** + * DelegatingLoader delegates loading to other loaders using a loader resolver. + * + * This loader acts as an array of LoaderInterface objects - each having + * a chance to load a given resource (handled by the resolver) + * + * @author Fabien Potencier + */ +class DelegatingLoader extends Loader +{ + /** + * Constructor. + * + * @param LoaderResolverInterface $resolver A LoaderResolverInterface instance + */ + public function __construct(LoaderResolverInterface $resolver) + { + $this->resolver = $resolver; + } + + /** + * {@inheritdoc} + */ + public function load($resource, $type = null) + { + if (false === $loader = $this->resolver->resolve($resource, $type)) { + throw new FileLoaderLoadException($resource); + } + + return $loader->load($resource, $type); + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return false !== $this->resolver->resolve($resource, $type); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/FileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/FileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..cdc4329d5215fe579bcb6af113fc6bfee3fa8dc9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/FileLoader.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\Component\Config\Loader; + +use Symfony\Component\Config\FileLocatorInterface; +use Symfony\Component\Config\Exception\FileLoaderLoadException; +use Symfony\Component\Config\Exception\FileLoaderImportCircularReferenceException; + +/** + * FileLoader is the abstract class used by all built-in loaders that are file based. + * + * @author Fabien Potencier + */ +abstract class FileLoader extends Loader +{ + /** + * @var array + */ + protected static $loading = array(); + + /** + * @var FileLocatorInterface + */ + protected $locator; + + private $currentDir; + + /** + * Constructor. + * + * @param FileLocatorInterface $locator A FileLocatorInterface instance + */ + public function __construct(FileLocatorInterface $locator) + { + $this->locator = $locator; + } + + /** + * Sets the current directory. + * + * @param string $dir + */ + public function setCurrentDir($dir) + { + $this->currentDir = $dir; + } + + /** + * Returns the file locator used by this loader. + * + * @return FileLocatorInterface + */ + public function getLocator() + { + return $this->locator; + } + + /** + * Imports a resource. + * + * @param mixed $resource A Resource + * @param string|null $type The resource type or null if unknown + * @param bool $ignoreErrors Whether to ignore import errors or not + * @param string|null $sourceResource The original resource importing the new resource + * + * @return mixed + * + * @throws FileLoaderLoadException + * @throws FileLoaderImportCircularReferenceException + */ + public function import($resource, $type = null, $ignoreErrors = false, $sourceResource = null) + { + try { + $loader = $this->resolve($resource, $type); + + if ($loader instanceof self && null !== $this->currentDir) { + $resource = $loader->getLocator()->locate($resource, $this->currentDir, false); + } + + $resources = is_array($resource) ? $resource : array($resource); + for ($i = 0; $i < $resourcesCount = count($resources); ++$i) { + if (isset(self::$loading[$resources[$i]])) { + if ($i == $resourcesCount - 1) { + throw new FileLoaderImportCircularReferenceException(array_keys(self::$loading)); + } + } else { + $resource = $resources[$i]; + break; + } + } + self::$loading[$resource] = true; + + try { + $ret = $loader->load($resource, $type); + } finally { + unset(self::$loading[$resource]); + } + + return $ret; + } catch (FileLoaderImportCircularReferenceException $e) { + throw $e; + } catch (\Exception $e) { + if (!$ignoreErrors) { + // prevent embedded imports from nesting multiple exceptions + if ($e instanceof FileLoaderLoadException) { + throw $e; + } + + throw new FileLoaderLoadException($resource, $sourceResource, null, $e); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/Loader.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/Loader.php new file mode 100644 index 0000000000000000000000000000000000000000..a6f8d9c66454c3ef76208214e26ea2af875de5ed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/Loader.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Loader; + +use Symfony\Component\Config\Exception\FileLoaderLoadException; + +/** + * Loader is the abstract class used by all built-in loaders. + * + * @author Fabien Potencier + */ +abstract class Loader implements LoaderInterface +{ + protected $resolver; + + /** + * {@inheritdoc} + */ + public function getResolver() + { + return $this->resolver; + } + + /** + * {@inheritdoc} + */ + public function setResolver(LoaderResolverInterface $resolver) + { + $this->resolver = $resolver; + } + + /** + * Imports a resource. + * + * @param mixed $resource A resource + * @param string|null $type The resource type or null if unknown + * + * @return mixed + */ + public function import($resource, $type = null) + { + return $this->resolve($resource, $type)->load($resource, $type); + } + + /** + * Finds a loader able to load an imported resource. + * + * @param mixed $resource A resource + * @param string|null $type The resource type or null if unknown + * + * @return $this|LoaderInterface + * + * @throws FileLoaderLoadException If no loader is found + */ + public function resolve($resource, $type = null) + { + if ($this->supports($resource, $type)) { + return $this; + } + + $loader = null === $this->resolver ? false : $this->resolver->resolve($resource, $type); + + if (false === $loader) { + throw new FileLoaderLoadException($resource); + } + + return $loader; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..dd0a85a6b08c71e876b78872182ca0ee82dcb002 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderInterface.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Loader; + +/** + * LoaderInterface is the interface implemented by all loader classes. + * + * @author Fabien Potencier + */ +interface LoaderInterface +{ + /** + * Loads a resource. + * + * @param mixed $resource The resource + * @param string|null $type The resource type or null if unknown + * + * @throws \Exception If something went wrong + */ + public function load($resource, $type = null); + + /** + * Returns whether this class supports the given resource. + * + * @param mixed $resource A resource + * @param string|null $type The resource type or null if unknown + * + * @return bool True if this class supports the given resource, false otherwise + */ + public function supports($resource, $type = null); + + /** + * Gets the loader resolver. + * + * @return LoaderResolverInterface A LoaderResolverInterface instance + */ + public function getResolver(); + + /** + * Sets the loader resolver. + * + * @param LoaderResolverInterface $resolver A LoaderResolverInterface instance + */ + public function setResolver(LoaderResolverInterface $resolver); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderResolver.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..dc6846df8d617e914ecec74aa24c54a38f51435b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderResolver.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Loader; + +/** + * LoaderResolver selects a loader for a given resource. + * + * A resource can be anything (e.g. a full path to a config file or a Closure). + * Each loader determines whether it can load a resource and how. + * + * @author Fabien Potencier + */ +class LoaderResolver implements LoaderResolverInterface +{ + /** + * @var LoaderInterface[] An array of LoaderInterface objects + */ + private $loaders = array(); + + /** + * Constructor. + * + * @param LoaderInterface[] $loaders An array of loaders + */ + public function __construct(array $loaders = array()) + { + foreach ($loaders as $loader) { + $this->addLoader($loader); + } + } + + /** + * {@inheritdoc} + */ + public function resolve($resource, $type = null) + { + foreach ($this->loaders as $loader) { + if ($loader->supports($resource, $type)) { + return $loader; + } + } + + return false; + } + + /** + * Adds a loader. + * + * @param LoaderInterface $loader A LoaderInterface instance + */ + public function addLoader(LoaderInterface $loader) + { + $this->loaders[] = $loader; + $loader->setResolver($this); + } + + /** + * Returns the registered loaders. + * + * @return LoaderInterface[] An array of LoaderInterface instances + */ + public function getLoaders() + { + return $this->loaders; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderResolverInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderResolverInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..40f1a1a63f2951128adc9459b2a1313fa73494f8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/LoaderResolverInterface.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\Config\Loader; + +/** + * LoaderResolverInterface selects a loader for a given resource. + * + * @author Fabien Potencier + */ +interface LoaderResolverInterface +{ + /** + * Returns a loader able to load the resource. + * + * @param mixed $resource A resource + * @param string|null $type The resource type or null if unknown + * + * @return LoaderInterface|false The loader or false if none is able to load the resource + */ + public function resolve($resource, $type = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/README.md b/vendor/symfony/symfony/src/Symfony/Component/Config/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bf400da196b224a49b83f7caf696a90216e6d3e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/README.md @@ -0,0 +1,15 @@ +Config Component +================ + +The Config component provides several classes to help you find, load, combine, +autofill and validate configuration values of any kind, whatever their source +may be (YAML, XML, INI files, or for instance a database). + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/config/index.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/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php new file mode 100644 index 0000000000000000000000000000000000000000..8a9df906a643d8fca931a3ae2feabdf16f66b6a9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Resource; + +/** + * ClassExistenceResource represents a class existence. + * Freshness is only evaluated against resource existence. + * + * The resource must be a fully-qualified class name. + * + * @author Fabien Potencier + */ +class ClassExistenceResource implements SelfCheckingResourceInterface, \Serializable +{ + private $resource; + private $exists; + + /** + * @param string $resource The fully-qualified class name + */ + public function __construct($resource) + { + $this->resource = $resource; + $this->exists = class_exists($resource); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return $this->resource; + } + + /** + * @return string The file path to the resource + */ + public function getResource() + { + return $this->resource; + } + + /** + * {@inheritdoc} + */ + public function isFresh($timestamp) + { + return class_exists($this->resource) === $this->exists; + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize(array($this->resource, $this->exists)); + } + + /** + * {@inheritdoc} + */ + public function unserialize($serialized) + { + list($this->resource, $this->exists) = unserialize($serialized); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/DirectoryResource.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/DirectoryResource.php new file mode 100644 index 0000000000000000000000000000000000000000..07280b4b877f2b4222a6e7f697280bb76c4ac760 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/DirectoryResource.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Resource; + +/** + * DirectoryResource represents a resources stored in a subdirectory tree. + * + * @author Fabien Potencier + */ +class DirectoryResource implements SelfCheckingResourceInterface, \Serializable +{ + private $resource; + private $pattern; + + /** + * Constructor. + * + * @param string $resource The file path to the resource + * @param string|null $pattern A pattern to restrict monitored files + * + * @throws \InvalidArgumentException + */ + public function __construct($resource, $pattern = null) + { + $this->resource = realpath($resource) ?: (file_exists($resource) ? $resource : false); + $this->pattern = $pattern; + + if (false === $this->resource || !is_dir($this->resource)) { + throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist.', $resource)); + } + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return md5(serialize(array($this->resource, $this->pattern))); + } + + /** + * @return string The file path to the resource + */ + public function getResource() + { + return $this->resource; + } + + /** + * Returns the pattern to restrict monitored files. + * + * @return string|null + */ + public function getPattern() + { + return $this->pattern; + } + + /** + * {@inheritdoc} + */ + public function isFresh($timestamp) + { + if (!is_dir($this->resource)) { + return false; + } + + if ($timestamp < filemtime($this->resource)) { + return false; + } + + foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->resource), \RecursiveIteratorIterator::SELF_FIRST) as $file) { + // if regex filtering is enabled only check matching files + if ($this->pattern && $file->isFile() && !preg_match($this->pattern, $file->getBasename())) { + continue; + } + + // always monitor directories for changes, except the .. entries + // (otherwise deleted files wouldn't get detected) + if ($file->isDir() && '/..' === substr($file, -3)) { + continue; + } + + // for broken links + try { + $fileMTime = $file->getMTime(); + } catch (\RuntimeException $e) { + continue; + } + + // early return if a file's mtime exceeds the passed timestamp + if ($timestamp < $fileMTime) { + return false; + } + } + + return true; + } + + public function serialize() + { + return serialize(array($this->resource, $this->pattern)); + } + + public function unserialize($serialized) + { + list($this->resource, $this->pattern) = unserialize($serialized); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileExistenceResource.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileExistenceResource.php new file mode 100644 index 0000000000000000000000000000000000000000..349402edf0494279984349295073e7285e8076b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileExistenceResource.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Resource; + +/** + * FileExistenceResource represents a resource stored on the filesystem. + * Freshness is only evaluated against resource creation or deletion. + * + * The resource can be a file or a directory. + * + * @author Charles-Henri Bruyand + */ +class FileExistenceResource implements SelfCheckingResourceInterface, \Serializable +{ + private $resource; + + private $exists; + + /** + * Constructor. + * + * @param string $resource The file path to the resource + */ + public function __construct($resource) + { + $this->resource = (string) $resource; + $this->exists = file_exists($resource); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return $this->resource; + } + + /** + * @return string The file path to the resource + */ + public function getResource() + { + return $this->resource; + } + + /** + * {@inheritdoc} + */ + public function isFresh($timestamp) + { + return file_exists($this->resource) === $this->exists; + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize(array($this->resource, $this->exists)); + } + + /** + * {@inheritdoc} + */ + public function unserialize($serialized) + { + list($this->resource, $this->exists) = unserialize($serialized); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileResource.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileResource.php new file mode 100644 index 0000000000000000000000000000000000000000..6ad130518854c1609190f5792e586cde2c31f55b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileResource.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Resource; + +/** + * FileResource represents a resource stored on the filesystem. + * + * The resource can be a file or a directory. + * + * @author Fabien Potencier + */ +class FileResource implements SelfCheckingResourceInterface, \Serializable +{ + /** + * @var string|false + */ + private $resource; + + /** + * Constructor. + * + * @param string $resource The file path to the resource + * + * @throws \InvalidArgumentException + */ + public function __construct($resource) + { + $this->resource = realpath($resource) ?: (file_exists($resource) ? $resource : false); + + if (false === $this->resource) { + throw new \InvalidArgumentException(sprintf('The file "%s" does not exist.', $resource)); + } + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return $this->resource; + } + + /** + * @return string The canonicalized, absolute path to the resource + */ + public function getResource() + { + return $this->resource; + } + + /** + * {@inheritdoc} + */ + public function isFresh($timestamp) + { + return file_exists($this->resource) && @filemtime($this->resource) <= $timestamp; + } + + public function serialize() + { + return serialize($this->resource); + } + + public function unserialize($serialized) + { + $this->resource = unserialize($serialized); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ResourceInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ResourceInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d98fd427a25eb64e12805fa9d51ea9c9e535c2c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ResourceInterface.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Resource; + +/** + * ResourceInterface is the interface that must be implemented by all Resource classes. + * + * @author Fabien Potencier + */ +interface ResourceInterface +{ + /** + * Returns a string representation of the Resource. + * + * This method is necessary to allow for resource de-duplication, for example by means + * of array_unique(). The string returned need not have a particular meaning, but has + * to be identical for different ResourceInterface instances referring to the same + * resource; and it should be unlikely to collide with that of other, unrelated + * resource instances. + * + * @return string A string representation unique to the underlying Resource + */ + public function __toString(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/SelfCheckingResourceChecker.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/SelfCheckingResourceChecker.php new file mode 100644 index 0000000000000000000000000000000000000000..d72203bc1a42c9a9239795bf3f07b3ce774ada40 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/SelfCheckingResourceChecker.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\Component\Config\Resource; + +use Symfony\Component\Config\ResourceCheckerInterface; + +/** + * Resource checker for instances of SelfCheckingResourceInterface. + * + * As these resources perform the actual check themselves, we can provide + * this class as a standard way of validating them. + * + * @author Matthias Pigulla + */ +class SelfCheckingResourceChecker implements ResourceCheckerInterface +{ + public function supports(ResourceInterface $metadata) + { + return $metadata instanceof SelfCheckingResourceInterface; + } + + public function isFresh(ResourceInterface $resource, $timestamp) + { + /* @var SelfCheckingResourceInterface $resource */ + return $resource->isFresh($timestamp); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/SelfCheckingResourceInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/SelfCheckingResourceInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b3260f2be3e58178c28efc3dd644eb9e3e464d6d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/SelfCheckingResourceInterface.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\Config\Resource; + +/** + * Interface for Resources that can check for freshness autonomously, + * without special support from external services. + * + * @author Matthias Pigulla + */ +interface SelfCheckingResourceInterface extends ResourceInterface +{ + /** + * Returns true if the resource has not been updated since the given timestamp. + * + * @param int $timestamp The last time the resource was loaded + * + * @return bool True if the resource has not been updated, false otherwise + */ + public function isFresh($timestamp); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php b/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php new file mode 100644 index 0000000000000000000000000000000000000000..0e3a411b07552e45fe33306abe6e37d504627bc3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php @@ -0,0 +1,164 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config; + +use Symfony\Component\Config\Resource\ResourceInterface; +use Symfony\Component\Filesystem\Exception\IOException; +use Symfony\Component\Filesystem\Filesystem; + +/** + * ResourceCheckerConfigCache uses instances of ResourceCheckerInterface + * to check whether cached data is still fresh. + * + * @author Matthias Pigulla + */ +class ResourceCheckerConfigCache implements ConfigCacheInterface +{ + /** + * @var string + */ + private $file; + + /** + * @var ResourceCheckerInterface[] + */ + private $resourceCheckers; + + /** + * @param string $file The absolute cache path + * @param ResourceCheckerInterface[] $resourceCheckers The ResourceCheckers to use for the freshness check + */ + public function __construct($file, array $resourceCheckers = array()) + { + $this->file = $file; + $this->resourceCheckers = $resourceCheckers; + } + + /** + * {@inheritdoc} + */ + public function getPath() + { + return $this->file; + } + + /** + * Checks if the cache is still fresh. + * + * This implementation will make a decision solely based on the ResourceCheckers + * passed in the constructor. + * + * The first ResourceChecker that supports a given resource is considered authoritative. + * Resources with no matching ResourceChecker will silently be ignored and considered fresh. + * + * @return bool true if the cache is fresh, false otherwise + */ + public function isFresh() + { + if (!is_file($this->file)) { + return false; + } + + if (!$this->resourceCheckers) { + return true; // shortcut - if we don't have any checkers we don't need to bother with the meta file at all + } + + $metadata = $this->getMetaFile(); + if (!is_file($metadata)) { + return false; + } + + $e = null; + $meta = false; + $time = filemtime($this->file); + $signalingException = new \UnexpectedValueException(); + $prevUnserializeHandler = ini_set('unserialize_callback_func', ''); + $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context) use (&$prevErrorHandler, $signalingException) { + if (E_WARNING === $type && 'Class __PHP_Incomplete_Class has no unserializer' === $msg) { + throw $signalingException; + } + + return $prevErrorHandler ? $prevErrorHandler($type, $msg, $file, $line, $context) : false; + }); + + try { + $meta = unserialize(file_get_contents($metadata)); + } catch (\Error $e) { + } catch (\Exception $e) { + } + restore_error_handler(); + ini_set('unserialize_callback_func', $prevUnserializeHandler); + if (null !== $e && $e !== $signalingException) { + throw $e; + } + if (false === $meta) { + return false; + } + + foreach ($meta as $resource) { + /* @var ResourceInterface $resource */ + foreach ($this->resourceCheckers as $checker) { + if (!$checker->supports($resource)) { + continue; // next checker + } + if ($checker->isFresh($resource, $time)) { + break; // no need to further check this resource + } + + return false; // cache is stale + } + // no suitable checker found, ignore this resource + } + + return true; + } + + /** + * Writes cache. + * + * @param string $content The content to write in the cache + * @param ResourceInterface[] $metadata An array of metadata + * + * @throws \RuntimeException When cache file can't be written + */ + public function write($content, array $metadata = null) + { + $mode = 0666; + $umask = umask(); + $filesystem = new Filesystem(); + $filesystem->dumpFile($this->file, $content, null); + try { + $filesystem->chmod($this->file, $mode, $umask); + } catch (IOException $e) { + // discard chmod failure (some filesystem may not support it) + } + + if (null !== $metadata) { + $filesystem->dumpFile($this->getMetaFile(), serialize($metadata), null); + try { + $filesystem->chmod($this->getMetaFile(), $mode, $umask); + } catch (IOException $e) { + // discard chmod failure (some filesystem may not support it) + } + } + } + + /** + * Gets the meta file path. + * + * @return string The meta file path + */ + private function getMetaFile() + { + return $this->file.'.meta'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php b/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..61d732cc1c452f156ba4db44f203b63eee34569b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config; + +/** + * A ConfigCacheFactory implementation that validates the + * cache with an arbitrary set of ResourceCheckers. + * + * @author Matthias Pigulla + */ +class ResourceCheckerConfigCacheFactory implements ConfigCacheFactoryInterface +{ + /** + * @var ResourceCheckerInterface[] + */ + private $resourceCheckers = array(); + + /** + * @param ResourceCheckerInterface[] $resourceCheckers + */ + public function __construct(array $resourceCheckers = array()) + { + $this->resourceCheckers = $resourceCheckers; + } + + /** + * {@inheritdoc} + */ + public function cache($file, $callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException(sprintf('Invalid type for callback argument. Expected callable, but got "%s".', gettype($callback))); + } + + $cache = new ResourceCheckerConfigCache($file, $this->resourceCheckers); + if (!$cache->isFresh()) { + call_user_func($callback, $cache); + } + + return $cache; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..612d77786446a492c417c5700868a900b49762b5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerInterface.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config; + +use Symfony\Component\Config\Resource\ResourceInterface; + +/** + * Interface for ResourceCheckers. + * + * When a ResourceCheckerConfigCache instance is checked for freshness, all its associated + * metadata resources are passed to ResourceCheckers. The ResourceCheckers + * can then inspect the resources and decide whether the cache can be considered + * fresh or not. + * + * @author Matthias Pigulla + * @author Benjamin Klotz + */ +interface ResourceCheckerInterface +{ + /** + * Queries the ResourceChecker whether it can validate a given + * resource or not. + * + * @param ResourceInterface $metadata The resource to be checked for freshness + * + * @return bool True if the ResourceChecker can handle this resource type, false if not + */ + public function supports(ResourceInterface $metadata); + + /** + * Validates the resource. + * + * @param ResourceInterface $resource The resource to be validated + * @param int $timestamp The timestamp at which the cache associated with this resource was created + * + * @return bool True if the resource has not changed since the given timestamp, false otherwise + */ + public function isFresh(ResourceInterface $resource, $timestamp); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ConfigCacheFactoryTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ConfigCacheFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c523e5cd5e6a431618614808f2b41e80a4d1868a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ConfigCacheFactoryTest.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\Component\Config\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\ConfigCacheFactory; + +class ConfigCacheFactoryTest extends TestCase +{ + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Invalid type for callback argument. Expected callable, but got "object". + */ + public function testCachWithInvalidCallback() + { + $cacheFactory = new ConfigCacheFactory(true); + + $cacheFactory->cache('file', new \stdClass()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ConfigCacheTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ConfigCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bf8131d514bda36a14494852c10c3d623b9a2cc8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ConfigCacheTest.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\Component\Config\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\ConfigCache; +use Symfony\Component\Config\Tests\Resource\ResourceStub; + +class ConfigCacheTest extends TestCase +{ + private $cacheFile = null; + + protected function setUp() + { + $this->cacheFile = tempnam(sys_get_temp_dir(), 'config_'); + } + + protected function tearDown() + { + $files = array($this->cacheFile, $this->cacheFile.'.meta'); + + foreach ($files as $file) { + if (file_exists($file)) { + unlink($file); + } + } + } + + /** + * @dataProvider debugModes + */ + public function testCacheIsNotValidIfNothingHasBeenCached($debug) + { + unlink($this->cacheFile); // remove tempnam() side effect + $cache = new ConfigCache($this->cacheFile, $debug); + + $this->assertFalse($cache->isFresh()); + } + + public function testIsAlwaysFreshInProduction() + { + $staleResource = new ResourceStub(); + $staleResource->setFresh(false); + + $cache = new ConfigCache($this->cacheFile, false); + $cache->write('', array($staleResource)); + + $this->assertTrue($cache->isFresh()); + } + + /** + * @dataProvider debugModes + */ + public function testIsFreshWhenNoResourceProvided($debug) + { + $cache = new ConfigCache($this->cacheFile, $debug); + $cache->write('', array()); + $this->assertTrue($cache->isFresh()); + } + + public function testFreshResourceInDebug() + { + $freshResource = new ResourceStub(); + $freshResource->setFresh(true); + + $cache = new ConfigCache($this->cacheFile, true); + $cache->write('', array($freshResource)); + + $this->assertTrue($cache->isFresh()); + } + + public function testStaleResourceInDebug() + { + $staleResource = new ResourceStub(); + $staleResource->setFresh(false); + + $cache = new ConfigCache($this->cacheFile, true); + $cache->write('', array($staleResource)); + + $this->assertFalse($cache->isFresh()); + } + + public function debugModes() + { + return array( + array(true), + array(false), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0b5565e0b379bf08b30608dc90f578149bb70cd5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php @@ -0,0 +1,219 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\ArrayNode; +use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; +use Symfony\Component\Config\Definition\ScalarNode; + +class ArrayNodeTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException + */ + public function testNormalizeThrowsExceptionWhenFalseIsNotAllowed() + { + $node = new ArrayNode('root'); + $node->normalize(false); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage Unrecognized option "foo" under "root" + */ + public function testExceptionThrownOnUnrecognizedChild() + { + $node = new ArrayNode('root'); + $node->normalize(array('foo' => 'bar')); + } + + public function ignoreAndRemoveMatrixProvider() + { + $unrecognizedOptionException = new InvalidConfigurationException('Unrecognized option "foo" under "root"'); + + return array( + array(true, true, array(), 'no exception is thrown for an unrecognized child if the ignoreExtraKeys option is set to true'), + array(true, false, array('foo' => 'bar'), 'extra keys are not removed when ignoreExtraKeys second option is set to false'), + array(false, true, $unrecognizedOptionException), + array(false, false, $unrecognizedOptionException), + ); + } + + /** + * @dataProvider ignoreAndRemoveMatrixProvider + */ + public function testIgnoreAndRemoveBehaviors($ignore, $remove, $expected, $message = '') + { + if ($expected instanceof \Exception) { + if (method_exists($this, 'expectException')) { + $this->expectException(get_class($expected)); + $this->expectExceptionMessage($expected->getMessage()); + } else { + $this->setExpectedException(get_class($expected), $expected->getMessage()); + } + } + $node = new ArrayNode('root'); + $node->setIgnoreExtraKeys($ignore, $remove); + $result = $node->normalize(array('foo' => 'bar')); + $this->assertSame($expected, $result, $message); + } + + /** + * @dataProvider getPreNormalizationTests + */ + public function testPreNormalize($denormalized, $normalized) + { + $node = new ArrayNode('foo'); + + $r = new \ReflectionMethod($node, 'preNormalize'); + $r->setAccessible(true); + + $this->assertSame($normalized, $r->invoke($node, $denormalized)); + } + + public function getPreNormalizationTests() + { + return array( + array( + array('foo-bar' => 'foo'), + array('foo_bar' => 'foo'), + ), + array( + array('foo-bar_moo' => 'foo'), + array('foo-bar_moo' => 'foo'), + ), + array( + array('anything-with-dash-and-no-underscore' => 'first', 'no_dash' => 'second'), + array('anything_with_dash_and_no_underscore' => 'first', 'no_dash' => 'second'), + ), + array( + array('foo-bar' => null, 'foo_bar' => 'foo'), + array('foo-bar' => null, 'foo_bar' => 'foo'), + ), + ); + } + + /** + * @dataProvider getZeroNamedNodeExamplesData + */ + public function testNodeNameCanBeZero($denormalized, $normalized) + { + $zeroNode = new ArrayNode(0); + $zeroNode->addChild(new ScalarNode('name')); + $fiveNode = new ArrayNode(5); + $fiveNode->addChild(new ScalarNode(0)); + $fiveNode->addChild(new ScalarNode('new_key')); + $rootNode = new ArrayNode('root'); + $rootNode->addChild($zeroNode); + $rootNode->addChild($fiveNode); + $rootNode->addChild(new ScalarNode('string_key')); + $r = new \ReflectionMethod($rootNode, 'normalizeValue'); + $r->setAccessible(true); + + $this->assertSame($normalized, $r->invoke($rootNode, $denormalized)); + } + + public function getZeroNamedNodeExamplesData() + { + return array( + array( + array( + 0 => array( + 'name' => 'something', + ), + 5 => array( + 0 => 'this won\'t work too', + 'new_key' => 'some other value', + ), + 'string_key' => 'just value', + ), + array( + 0 => array( + 'name' => 'something', + ), + 5 => array( + 0 => 'this won\'t work too', + 'new_key' => 'some other value', + ), + 'string_key' => 'just value', + ), + ), + ); + } + + /** + * @dataProvider getPreNormalizedNormalizedOrderedData + */ + public function testChildrenOrderIsMaintainedOnNormalizeValue($prenormalized, $normalized) + { + $scalar1 = new ScalarNode('1'); + $scalar2 = new ScalarNode('2'); + $scalar3 = new ScalarNode('3'); + $node = new ArrayNode('foo'); + $node->addChild($scalar1); + $node->addChild($scalar3); + $node->addChild($scalar2); + + $r = new \ReflectionMethod($node, 'normalizeValue'); + $r->setAccessible(true); + + $this->assertSame($normalized, $r->invoke($node, $prenormalized)); + } + + public function getPreNormalizedNormalizedOrderedData() + { + return array( + array( + array('2' => 'two', '1' => 'one', '3' => 'three'), + array('2' => 'two', '1' => 'one', '3' => 'three'), + ), + ); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Child nodes must be named. + */ + public function testAddChildEmptyName() + { + $node = new ArrayNode('root'); + + $childNode = new ArrayNode(''); + $node->addChild($childNode); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage A child node named "foo" already exists. + */ + public function testAddChildNameAlreadyExists() + { + $node = new ArrayNode('root'); + + $childNode = new ArrayNode('foo'); + $node->addChild($childNode); + + $childNodeWithSameName = new ArrayNode('foo'); + $node->addChild($childNodeWithSameName); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage The node at path "foo" has no default value. + */ + public function testGetDefaultValueWithoutDefaultValue() + { + $node = new ArrayNode('foo'); + $node->getDefaultValue(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ab1d3164145d0e64935a67729f7294a1e755975c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\BooleanNode; + +class BooleanNodeTest extends TestCase +{ + /** + * @dataProvider getValidValues + */ + public function testNormalize($value) + { + $node = new BooleanNode('test'); + $this->assertSame($value, $node->normalize($value)); + } + + /** + * @dataProvider getValidValues + * + * @param bool $value + */ + public function testValidNonEmptyValues($value) + { + $node = new BooleanNode('test'); + $node->setAllowEmptyValue(false); + + $this->assertSame($value, $node->finalize($value)); + } + + public function getValidValues() + { + return array( + array(false), + array(true), + ); + } + + /** + * @dataProvider getInvalidValues + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException + */ + public function testNormalizeThrowsExceptionOnInvalidValues($value) + { + $node = new BooleanNode('test'); + $node->normalize($value); + } + + public function getInvalidValues() + { + return array( + array(null), + array(''), + array('foo'), + array(0), + array(1), + array(0.0), + array(0.1), + array(array()), + array(array('foo' => 'bar')), + array(new \stdClass()), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6456639af305e201334254372180802467558ca4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.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\Component\Config\Tests\Definition\Builder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; +use Symfony\Component\Config\Definition\Processor; +use Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition; +use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; + +class ArrayNodeDefinitionTest extends TestCase +{ + public function testAppendingSomeNode() + { + $parent = new ArrayNodeDefinition('root'); + $child = new ScalarNodeDefinition('child'); + + $parent + ->children() + ->scalarNode('foo')->end() + ->scalarNode('bar')->end() + ->end() + ->append($child); + + $this->assertCount(3, $this->getField($parent, 'children')); + $this->assertTrue(in_array($child, $this->getField($parent, 'children'))); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException + * @dataProvider providePrototypeNodeSpecificCalls + */ + public function testPrototypeNodeSpecificOption($method, $args) + { + $node = new ArrayNodeDefinition('root'); + + call_user_func_array(array($node, $method), $args); + + $node->getNode(); + } + + public function providePrototypeNodeSpecificCalls() + { + return array( + array('defaultValue', array(array())), + array('addDefaultChildrenIfNoneSet', array()), + array('requiresAtLeastOneElement', array()), + array('useAttributeAsKey', array('foo')), + ); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException + */ + public function testConcreteNodeSpecificOption() + { + $node = new ArrayNodeDefinition('root'); + $node + ->addDefaultsIfNotSet() + ->prototype('array') + ; + $node->getNode(); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException + */ + public function testPrototypeNodesCantHaveADefaultValueWhenUsingDefaultChildren() + { + $node = new ArrayNodeDefinition('root'); + $node + ->defaultValue(array()) + ->addDefaultChildrenIfNoneSet('foo') + ->prototype('array') + ; + $node->getNode(); + } + + public function testPrototypedArrayNodeDefaultWhenUsingDefaultChildren() + { + $node = new ArrayNodeDefinition('root'); + $node + ->addDefaultChildrenIfNoneSet() + ->prototype('array') + ; + $tree = $node->getNode(); + $this->assertEquals(array(array()), $tree->getDefaultValue()); + } + + /** + * @dataProvider providePrototypedArrayNodeDefaults + */ + public function testPrototypedArrayNodeDefault($args, $shouldThrowWhenUsingAttrAsKey, $shouldThrowWhenNotUsingAttrAsKey, $defaults) + { + $node = new ArrayNodeDefinition('root'); + $node + ->addDefaultChildrenIfNoneSet($args) + ->prototype('array') + ; + + try { + $tree = $node->getNode(); + $this->assertFalse($shouldThrowWhenNotUsingAttrAsKey); + $this->assertEquals($defaults, $tree->getDefaultValue()); + } catch (InvalidDefinitionException $e) { + $this->assertTrue($shouldThrowWhenNotUsingAttrAsKey); + } + + $node = new ArrayNodeDefinition('root'); + $node + ->useAttributeAsKey('attr') + ->addDefaultChildrenIfNoneSet($args) + ->prototype('array') + ; + + try { + $tree = $node->getNode(); + $this->assertFalse($shouldThrowWhenUsingAttrAsKey); + $this->assertEquals($defaults, $tree->getDefaultValue()); + } catch (InvalidDefinitionException $e) { + $this->assertTrue($shouldThrowWhenUsingAttrAsKey); + } + } + + public function providePrototypedArrayNodeDefaults() + { + return array( + array(null, true, false, array(array())), + array(2, true, false, array(array(), array())), + array('2', false, true, array('2' => array())), + array('foo', false, true, array('foo' => array())), + array(array('foo'), false, true, array('foo' => array())), + array(array('foo', 'bar'), false, true, array('foo' => array(), 'bar' => array())), + ); + } + + public function testNestedPrototypedArrayNodes() + { + $node = new ArrayNodeDefinition('root'); + $node + ->addDefaultChildrenIfNoneSet() + ->prototype('array') + ->prototype('array') + ; + $node->getNode(); + } + + public function testEnabledNodeDefaults() + { + $node = new ArrayNodeDefinition('root'); + $node + ->canBeEnabled() + ->children() + ->scalarNode('foo')->defaultValue('bar')->end() + ; + + $this->assertEquals(array('enabled' => false, 'foo' => 'bar'), $node->getNode()->getDefaultValue()); + } + + /** + * @dataProvider getEnableableNodeFixtures + */ + public function testTrueEnableEnabledNode($expected, $config, $message) + { + $processor = new Processor(); + $node = new ArrayNodeDefinition('root'); + $node + ->canBeEnabled() + ->children() + ->scalarNode('foo')->defaultValue('bar')->end() + ; + + $this->assertEquals( + $expected, + $processor->process($node->getNode(), $config), + $message + ); + } + + public function testCanBeDisabled() + { + $node = new ArrayNodeDefinition('root'); + $node->canBeDisabled(); + + $this->assertTrue($this->getField($node, 'addDefaults')); + $this->assertEquals(array('enabled' => false), $this->getField($node, 'falseEquivalent')); + $this->assertEquals(array('enabled' => true), $this->getField($node, 'trueEquivalent')); + $this->assertEquals(array('enabled' => true), $this->getField($node, 'nullEquivalent')); + + $nodeChildren = $this->getField($node, 'children'); + $this->assertArrayHasKey('enabled', $nodeChildren); + + $enabledNode = $nodeChildren['enabled']; + $this->assertTrue($this->getField($enabledNode, 'default')); + $this->assertTrue($this->getField($enabledNode, 'defaultValue')); + } + + public function testIgnoreExtraKeys() + { + $node = new ArrayNodeDefinition('root'); + + $this->assertFalse($this->getField($node, 'ignoreExtraKeys')); + + $result = $node->ignoreExtraKeys(); + + $this->assertEquals($node, $result); + $this->assertTrue($this->getField($node, 'ignoreExtraKeys')); + } + + public function testNormalizeKeys() + { + $node = new ArrayNodeDefinition('root'); + + $this->assertTrue($this->getField($node, 'normalizeKeys')); + + $result = $node->normalizeKeys(false); + + $this->assertEquals($node, $result); + $this->assertFalse($this->getField($node, 'normalizeKeys')); + } + + public function getEnableableNodeFixtures() + { + return array( + array(array('enabled' => true, 'foo' => 'bar'), array(true), 'true enables an enableable node'), + array(array('enabled' => true, 'foo' => 'bar'), array(null), 'null enables an enableable node'), + array(array('enabled' => true, 'foo' => 'bar'), array(array('enabled' => true)), 'An enableable node can be enabled'), + array(array('enabled' => true, 'foo' => 'baz'), array(array('foo' => 'baz')), 'any configuration enables an enableable node'), + array(array('enabled' => false, 'foo' => 'baz'), array(array('foo' => 'baz', 'enabled' => false)), 'An enableable node can be disabled'), + array(array('enabled' => false, 'foo' => 'bar'), array(false), 'false disables an enableable node'), + ); + } + + protected function getField($object, $field) + { + $reflection = new \ReflectionProperty($object, $field); + $reflection->setAccessible(true); + + return $reflection->getValue($object); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/BooleanNodeDefinitionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/BooleanNodeDefinitionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..291dd602d9393177f3911419d1904757731927c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/BooleanNodeDefinitionTest.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition\Builder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition; + +class BooleanNodeDefinitionTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException + * @expectedExceptionMessage ->cannotBeEmpty() is not applicable to BooleanNodeDefinition. + */ + public function testCannotBeEmptyThrowsAnException() + { + $def = new BooleanNodeDefinition('foo'); + $def->cannotBeEmpty(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/EnumNodeDefinitionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/EnumNodeDefinitionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0f09b78e7968b8761ac88d39a228e21f76318341 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/EnumNodeDefinitionTest.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\Component\Config\Tests\Definition\Builder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\Builder\EnumNodeDefinition; + +class EnumNodeDefinitionTest extends TestCase +{ + public function testWithOneValue() + { + $def = new EnumNodeDefinition('foo'); + $def->values(array('foo')); + + $node = $def->getNode(); + $this->assertEquals(array('foo'), $node->getValues()); + } + + public function testWithOneDistinctValue() + { + $def = new EnumNodeDefinition('foo'); + $def->values(array('foo', 'foo')); + + $node = $def->getNode(); + $this->assertEquals(array('foo'), $node->getValues()); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage You must call ->values() on enum nodes. + */ + public function testNoValuesPassed() + { + $def = new EnumNodeDefinition('foo'); + $def->getNode(); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage ->values() must be called with at least one value. + */ + public function testWithNoValues() + { + $def = new EnumNodeDefinition('foo'); + $def->values(array()); + } + + public function testGetNode() + { + $def = new EnumNodeDefinition('foo'); + $def->values(array('foo', 'bar')); + + $node = $def->getNode(); + $this->assertEquals(array('foo', 'bar'), $node->getValues()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..feea16f9c397bbd8c3aa4c2ed18875a2956d3e7a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php @@ -0,0 +1,251 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition\Builder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\Builder\TreeBuilder; + +class ExprBuilderTest extends TestCase +{ + public function testAlwaysExpression() + { + $test = $this->getTestBuilder() + ->always($this->returnClosure('new_value')) + ->end(); + + $this->assertFinalizedValueIs('new_value', $test); + } + + public function testIfTrueExpression() + { + $test = $this->getTestBuilder() + ->ifTrue() + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('new_value', $test, array('key' => true)); + + $test = $this->getTestBuilder() + ->ifTrue(function ($v) { return true; }) + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('new_value', $test); + + $test = $this->getTestBuilder() + ->ifTrue(function ($v) { return false; }) + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('value', $test); + } + + public function testIfStringExpression() + { + $test = $this->getTestBuilder() + ->ifString() + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('new_value', $test); + + $test = $this->getTestBuilder() + ->ifString() + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs(45, $test, array('key' => 45)); + } + + public function testIfNullExpression() + { + $test = $this->getTestBuilder() + ->ifNull() + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('new_value', $test, array('key' => null)); + + $test = $this->getTestBuilder() + ->ifNull() + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('value', $test); + } + + public function testIfEmptyExpression() + { + $test = $this->getTestBuilder() + ->ifEmpty() + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('new_value', $test, array('key' => array())); + + $test = $this->getTestBuilder() + ->ifEmpty() + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('value', $test); + } + + public function testIfArrayExpression() + { + $test = $this->getTestBuilder() + ->ifArray() + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('new_value', $test, array('key' => array())); + + $test = $this->getTestBuilder() + ->ifArray() + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('value', $test); + } + + public function testIfInArrayExpression() + { + $test = $this->getTestBuilder() + ->ifInArray(array('foo', 'bar', 'value')) + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('new_value', $test); + + $test = $this->getTestBuilder() + ->ifInArray(array('foo', 'bar')) + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('value', $test); + } + + public function testIfNotInArrayExpression() + { + $test = $this->getTestBuilder() + ->ifNotInArray(array('foo', 'bar')) + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('new_value', $test); + + $test = $this->getTestBuilder() + ->ifNotInArray(array('foo', 'bar', 'value_from_config')) + ->then($this->returnClosure('new_value')) + ->end(); + $this->assertFinalizedValueIs('new_value', $test); + } + + public function testThenEmptyArrayExpression() + { + $test = $this->getTestBuilder() + ->ifString() + ->thenEmptyArray() + ->end(); + $this->assertFinalizedValueIs(array(), $test); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + */ + public function testThenInvalid() + { + $test = $this->getTestBuilder() + ->ifString() + ->thenInvalid('Invalid value') + ->end(); + $this->finalizeTestBuilder($test); + } + + public function testThenUnsetExpression() + { + $test = $this->getTestBuilder() + ->ifString() + ->thenUnset() + ->end(); + $this->assertEquals(array(), $this->finalizeTestBuilder($test)); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage You must specify an if part. + */ + public function testEndIfPartNotSpecified() + { + $this->getTestBuilder()->end(); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage You must specify a then part. + */ + public function testEndThenPartNotSpecified() + { + $builder = $this->getTestBuilder(); + $builder->ifPart = 'test'; + $builder->end(); + } + + /** + * Create a test treebuilder with a variable node, and init the validation. + * + * @return TreeBuilder + */ + protected function getTestBuilder() + { + $builder = new TreeBuilder(); + + return $builder + ->root('test') + ->children() + ->variableNode('key') + ->validate() + ; + } + + /** + * Close the validation process and finalize with the given config. + * + * @param TreeBuilder $testBuilder The tree builder to finalize + * @param array $config The config you want to use for the finalization, if nothing provided + * a simple array('key'=>'value') will be used + * + * @return array The finalized config values + */ + protected function finalizeTestBuilder($testBuilder, $config = null) + { + return $testBuilder + ->end() + ->end() + ->end() + ->buildTree() + ->finalize(null === $config ? array('key' => 'value') : $config) + ; + } + + /** + * Return a closure that will return the given value. + * + * @param mixed $val The value that the closure must return + * + * @return \Closure + */ + protected function returnClosure($val) + { + return function ($v) use ($val) { + return $val; + }; + } + + /** + * Assert that the given test builder, will return the given value. + * + * @param mixed $value The value to test + * @param TreeBuilder $treeBuilder The tree builder to finalize + * @param mixed $config The config values that new to be finalized + */ + protected function assertFinalizedValueIs($value, $treeBuilder, $config = null) + { + $this->assertEquals(array('key' => $value), $this->finalizeTestBuilder($treeBuilder, $config)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..88775656784f2da0f4bcfd862a517214aaba14ae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition\Builder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\Builder\NodeBuilder as BaseNodeBuilder; +use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVariableNodeDefinition; + +class NodeBuilderTest extends TestCase +{ + /** + * @expectedException \RuntimeException + */ + public function testThrowsAnExceptionWhenTryingToCreateANonRegisteredNodeType() + { + $builder = new BaseNodeBuilder(); + $builder->node('', 'foobar'); + } + + /** + * @expectedException \RuntimeException + */ + public function testThrowsAnExceptionWhenTheNodeClassIsNotFound() + { + $builder = new BaseNodeBuilder(); + $builder + ->setNodeClass('noclasstype', '\\foo\\bar\\noclass') + ->node('', 'noclasstype'); + } + + public function testAddingANewNodeType() + { + $class = __NAMESPACE__.'\\SomeNodeDefinition'; + + $builder = new BaseNodeBuilder(); + $node = $builder + ->setNodeClass('newtype', $class) + ->node('', 'newtype'); + + $this->assertInstanceOf($class, $node); + } + + public function testOverridingAnExistingNodeType() + { + $class = __NAMESPACE__.'\\SomeNodeDefinition'; + + $builder = new BaseNodeBuilder(); + $node = $builder + ->setNodeClass('variable', $class) + ->node('', 'variable'); + + $this->assertInstanceOf($class, $node); + } + + public function testNodeTypesAreNotCaseSensitive() + { + $builder = new BaseNodeBuilder(); + + $node1 = $builder->node('', 'VaRiAbLe'); + $node2 = $builder->node('', 'variable'); + + $this->assertInstanceOf(get_class($node1), $node2); + + $builder->setNodeClass('CuStOm', __NAMESPACE__.'\\SomeNodeDefinition'); + + $node1 = $builder->node('', 'CUSTOM'); + $node2 = $builder->node('', 'custom'); + + $this->assertInstanceOf(get_class($node1), $node2); + } + + public function testNumericNodeCreation() + { + $builder = new BaseNodeBuilder(); + + $node = $builder->integerNode('foo')->min(3)->max(5); + $this->assertInstanceOf('Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition', $node); + + $node = $builder->floatNode('bar')->min(3.0)->max(5.0); + $this->assertInstanceOf('Symfony\Component\Config\Definition\Builder\FloatNodeDefinition', $node); + } +} + +class SomeNodeDefinition extends BaseVariableNodeDefinition +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/NumericNodeDefinitionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/NumericNodeDefinitionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5a86e1ef6108b82bcc1e9908fb3d547411b1b8be --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/NumericNodeDefinitionTest.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition\Builder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition as NumericNodeDefinition; +use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition; +use Symfony\Component\Config\Definition\Builder\FloatNodeDefinition; + +class NumericNodeDefinitionTest extends TestCase +{ + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage You cannot define a min(4) as you already have a max(3) + */ + public function testIncoherentMinAssertion() + { + $def = new NumericNodeDefinition('foo'); + $def->max(3)->min(4); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage You cannot define a max(2) as you already have a min(3) + */ + public function testIncoherentMaxAssertion() + { + $node = new NumericNodeDefinition('foo'); + $node->min(3)->max(2); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage The value 4 is too small for path "foo". Should be greater than or equal to 5 + */ + public function testIntegerMinAssertion() + { + $def = new IntegerNodeDefinition('foo'); + $def->min(5)->getNode()->finalize(4); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage The value 4 is too big for path "foo". Should be less than or equal to 3 + */ + public function testIntegerMaxAssertion() + { + $def = new IntegerNodeDefinition('foo'); + $def->max(3)->getNode()->finalize(4); + } + + public function testIntegerValidMinMaxAssertion() + { + $def = new IntegerNodeDefinition('foo'); + $node = $def->min(3)->max(7)->getNode(); + $this->assertEquals(4, $node->finalize(4)); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage The value 400 is too small for path "foo". Should be greater than or equal to 500 + */ + public function testFloatMinAssertion() + { + $def = new FloatNodeDefinition('foo'); + $def->min(5E2)->getNode()->finalize(4e2); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage The value 4.3 is too big for path "foo". Should be less than or equal to 0.3 + */ + public function testFloatMaxAssertion() + { + $def = new FloatNodeDefinition('foo'); + $def->max(0.3)->getNode()->finalize(4.3); + } + + public function testFloatValidMinMaxAssertion() + { + $def = new FloatNodeDefinition('foo'); + $node = $def->min(3.0)->max(7e2)->getNode(); + $this->assertEquals(4.5, $node->finalize(4.5)); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException + * @expectedExceptionMessage ->cannotBeEmpty() is not applicable to NumericNodeDefinition. + */ + public function testCannotBeEmptyThrowsAnException() + { + $def = new NumericNodeDefinition('foo'); + $def->cannotBeEmpty(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..16a10227cc2964a41d35c6c37c83ced6db5a69a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition\Builder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder as CustomNodeBuilder; +use Symfony\Component\Config\Definition\Builder\TreeBuilder; + +require __DIR__.'/../../Fixtures/Builder/NodeBuilder.php'; +require __DIR__.'/../../Fixtures/Builder/BarNodeDefinition.php'; +require __DIR__.'/../../Fixtures/Builder/VariableNodeDefinition.php'; + +class TreeBuilderTest extends TestCase +{ + public function testUsingACustomNodeBuilder() + { + $builder = new TreeBuilder(); + $root = $builder->root('custom', 'array', new CustomNodeBuilder()); + + $nodeBuilder = $root->children(); + + $this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder', $nodeBuilder); + + $nodeBuilder = $nodeBuilder->arrayNode('deeper')->children(); + + $this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder', $nodeBuilder); + } + + public function testOverrideABuiltInNodeType() + { + $builder = new TreeBuilder(); + $root = $builder->root('override', 'array', new CustomNodeBuilder()); + + $definition = $root->children()->variableNode('variable'); + + $this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\VariableNodeDefinition', $definition); + } + + public function testAddANodeType() + { + $builder = new TreeBuilder(); + $root = $builder->root('override', 'array', new CustomNodeBuilder()); + + $definition = $root->children()->barNode('variable'); + + $this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\BarNodeDefinition', $definition); + } + + public function testCreateABuiltInNodeTypeWithACustomNodeBuilder() + { + $builder = new TreeBuilder(); + $root = $builder->root('builtin', 'array', new CustomNodeBuilder()); + + $definition = $root->children()->booleanNode('boolean'); + + $this->assertInstanceOf('Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition', $definition); + } + + public function testPrototypedArrayNodeUseTheCustomNodeBuilder() + { + $builder = new TreeBuilder(); + $root = $builder->root('override', 'array', new CustomNodeBuilder()); + + $root->prototype('bar')->end(); + } + + public function testAnExtendedNodeBuilderGetsPropagatedToTheChildren() + { + $builder = new TreeBuilder(); + + $builder->root('propagation') + ->children() + ->setNodeClass('extended', 'Symfony\Component\Config\Tests\Definition\Builder\VariableNodeDefinition') + ->node('foo', 'extended')->end() + ->arrayNode('child') + ->children() + ->node('foo', 'extended') + ->end() + ->end() + ->end() + ->end(); + } + + public function testDefinitionInfoGetsTransferredToNode() + { + $builder = new TreeBuilder(); + + $builder->root('test')->info('root info') + ->children() + ->node('child', 'variable')->info('child info')->defaultValue('default') + ->end() + ->end(); + + $tree = $builder->buildTree(); + $children = $tree->getChildren(); + + $this->assertEquals('root info', $tree->getInfo()); + $this->assertEquals('child info', $children['child']->getInfo()); + } + + public function testDefinitionExampleGetsTransferredToNode() + { + $builder = new TreeBuilder(); + + $builder->root('test') + ->example(array('key' => 'value')) + ->children() + ->node('child', 'variable')->info('child info')->defaultValue('default')->example('example') + ->end() + ->end(); + + $tree = $builder->buildTree(); + $children = $tree->getChildren(); + + $this->assertInternalType('array', $tree->getExample()); + $this->assertEquals('example', $children['child']->getExample()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Dumper/XmlReferenceDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Dumper/XmlReferenceDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fd5f9c8cde841770fa198d5fb6ac577fe220e8b6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Dumper/XmlReferenceDumperTest.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\Dumper\XmlReferenceDumper; +use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration; + +class XmlReferenceDumperTest extends TestCase +{ + public function testDumper() + { + $configuration = new ExampleConfiguration(); + + $dumper = new XmlReferenceDumper(); + $this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration)); + } + + public function testNamespaceDumper() + { + $configuration = new ExampleConfiguration(); + + $dumper = new XmlReferenceDumper(); + $this->assertEquals(str_replace('http://example.org/schema/dic/acme_root', 'http://symfony.com/schema/dic/symfony', $this->getConfigurationAsString()), $dumper->dump($configuration, 'http://symfony.com/schema/dic/symfony')); + } + + private function getConfigurationAsString() + { + return str_replace("\n", PHP_EOL, <<<'EOL' + + + + + + + + + + + + scalar value + + + scalar value + + + + + + + + + + + + + + + + + + + + + + + + +EOL + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f4b88adecdc48ac3ab202a5026e9c2d842802965 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper; +use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration; + +class YamlReferenceDumperTest extends TestCase +{ + public function testDumper() + { + $configuration = new ExampleConfiguration(); + + $dumper = new YamlReferenceDumper(); + + $this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration)); + } + + private function getConfigurationAsString() + { + return <<<'EOL' +acme_root: + boolean: true + scalar_empty: ~ + scalar_null: null + scalar_true: true + scalar_false: false + scalar_default: default + scalar_array_empty: [] + scalar_array_defaults: + + # Defaults: + - elem1 + - elem2 + scalar_required: ~ # Required + node_with_a_looong_name: ~ + enum_with_default: this # One of "this"; "that" + enum: ~ # One of "this"; "that" + + # some info + array: + child1: ~ + child2: ~ + + # this is a long + # multi-line info text + # which should be indented + child3: ~ # Example: example setting + scalar_prototyped: [] + parameters: + + # Prototype: Parameter name + name: ~ + connections: + + # Prototype + - + user: ~ + pass: ~ + cms_pages: + + # Prototype + page: + + # Prototype + locale: + title: ~ # Required + path: ~ # Required + pipou: + + # Prototype + name: [] + +EOL; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/EnumNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/EnumNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e3e7ef05946fc3fe488e4bb09dddb9c09b3c36f5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/EnumNodeTest.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\EnumNode; + +class EnumNodeTest extends TestCase +{ + public function testFinalizeValue() + { + $node = new EnumNode('foo', null, array('foo', 'bar')); + $this->assertSame('foo', $node->finalize('foo')); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage $values must contain at least one element. + */ + public function testConstructionWithNoValues() + { + new EnumNode('foo', null, array()); + } + + public function testConstructionWithOneValue() + { + $node = new EnumNode('foo', null, array('foo')); + $this->assertSame('foo', $node->finalize('foo')); + } + + public function testConstructionWithOneDistinctValue() + { + $node = new EnumNode('foo', null, array('foo', 'foo')); + $this->assertSame('foo', $node->finalize('foo')); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage The value "foobar" is not allowed for path "foo". Permissible values: "foo", "bar" + */ + public function testFinalizeWithInvalidValue() + { + $node = new EnumNode('foo', null, array('foo', 'bar')); + $node->finalize('foobar'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FinalizationTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FinalizationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..733f600850f5a0f74d2aeb76e9d91c648479c606 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FinalizationTest.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\Processor; +use Symfony\Component\Config\Definition\NodeInterface; + +class FinalizationTest extends TestCase +{ + public function testUnsetKeyWithDeepHierarchy() + { + $tb = new TreeBuilder(); + $tree = $tb + ->root('config', 'array') + ->children() + ->node('level1', 'array') + ->canBeUnset() + ->children() + ->node('level2', 'array') + ->canBeUnset() + ->children() + ->node('somevalue', 'scalar')->end() + ->node('anothervalue', 'scalar')->end() + ->end() + ->end() + ->node('level1_scalar', 'scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->buildTree() + ; + + $a = array( + 'level1' => array( + 'level2' => array( + 'somevalue' => 'foo', + 'anothervalue' => 'bar', + ), + 'level1_scalar' => 'foo', + ), + ); + + $b = array( + 'level1' => array( + 'level2' => false, + ), + ); + + $this->assertEquals(array( + 'level1' => array( + 'level1_scalar' => 'foo', + ), + ), $this->process($tree, array($a, $b))); + } + + protected function process(NodeInterface $tree, array $configs) + { + $processor = new Processor(); + + return $processor->process($tree, $configs); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b7ec12fa739af9459323bf249b45372cb3dedd1f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\FloatNode; + +class FloatNodeTest extends TestCase +{ + /** + * @dataProvider getValidValues + */ + public function testNormalize($value) + { + $node = new FloatNode('test'); + $this->assertSame($value, $node->normalize($value)); + } + + /** + * @dataProvider getValidValues + * + * @param int $value + */ + public function testValidNonEmptyValues($value) + { + $node = new FloatNode('test'); + $node->setAllowEmptyValue(false); + + $this->assertSame($value, $node->finalize($value)); + } + + public function getValidValues() + { + return array( + array(1798.0), + array(-678.987), + array(12.56E45), + array(0.0), + // Integer are accepted too, they will be cast + array(17), + array(-10), + array(0), + ); + } + + /** + * @dataProvider getInvalidValues + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException + */ + public function testNormalizeThrowsExceptionOnInvalidValues($value) + { + $node = new FloatNode('test'); + $node->normalize($value); + } + + public function getInvalidValues() + { + return array( + array(null), + array(''), + array('foo'), + array(true), + array(false), + array(array()), + array(array('foo' => 'bar')), + array(new \stdClass()), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..55e8a137b648a20f961f3d9326a81226dd09c066 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\IntegerNode; + +class IntegerNodeTest extends TestCase +{ + /** + * @dataProvider getValidValues + */ + public function testNormalize($value) + { + $node = new IntegerNode('test'); + $this->assertSame($value, $node->normalize($value)); + } + + /** + * @dataProvider getValidValues + * + * @param int $value + */ + public function testValidNonEmptyValues($value) + { + $node = new IntegerNode('test'); + $node->setAllowEmptyValue(false); + + $this->assertSame($value, $node->finalize($value)); + } + + public function getValidValues() + { + return array( + array(1798), + array(-678), + array(0), + ); + } + + /** + * @dataProvider getInvalidValues + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException + */ + public function testNormalizeThrowsExceptionOnInvalidValues($value) + { + $node = new IntegerNode('test'); + $node->normalize($value); + } + + public function getInvalidValues() + { + return array( + array(null), + array(''), + array('foo'), + array(true), + array(false), + array(0.0), + array(0.1), + array(array()), + array(array('foo' => 'bar')), + array(new \stdClass()), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/MergeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/MergeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e539e25f3d02f2851b5bc0bfcb9b6fc11927ddf7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/MergeTest.php @@ -0,0 +1,196 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\Builder\TreeBuilder; + +class MergeTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException + */ + public function testForbiddenOverwrite() + { + $tb = new TreeBuilder(); + $tree = $tb + ->root('root', 'array') + ->children() + ->node('foo', 'scalar') + ->cannotBeOverwritten() + ->end() + ->end() + ->end() + ->buildTree() + ; + + $a = array( + 'foo' => 'bar', + ); + + $b = array( + 'foo' => 'moo', + ); + + $tree->merge($a, $b); + } + + public function testUnsetKey() + { + $tb = new TreeBuilder(); + $tree = $tb + ->root('root', 'array') + ->children() + ->node('foo', 'scalar')->end() + ->node('bar', 'scalar')->end() + ->node('unsettable', 'array') + ->canBeUnset() + ->children() + ->node('foo', 'scalar')->end() + ->node('bar', 'scalar')->end() + ->end() + ->end() + ->node('unsetted', 'array') + ->canBeUnset() + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->buildTree() + ; + + $a = array( + 'foo' => 'bar', + 'unsettable' => array( + 'foo' => 'a', + 'bar' => 'b', + ), + 'unsetted' => false, + ); + + $b = array( + 'foo' => 'moo', + 'bar' => 'b', + 'unsettable' => false, + 'unsetted' => array('a', 'b'), + ); + + $this->assertEquals(array( + 'foo' => 'moo', + 'bar' => 'b', + 'unsettable' => false, + 'unsetted' => array('a', 'b'), + ), $tree->merge($a, $b)); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + */ + public function testDoesNotAllowNewKeysInSubsequentConfigs() + { + $tb = new TreeBuilder(); + $tree = $tb + ->root('config', 'array') + ->children() + ->node('test', 'array') + ->disallowNewKeysInSubsequentConfigs() + ->useAttributeAsKey('key') + ->prototype('array') + ->children() + ->node('value', 'scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->buildTree(); + + $a = array( + 'test' => array( + 'a' => array('value' => 'foo'), + ), + ); + + $b = array( + 'test' => array( + 'b' => array('value' => 'foo'), + ), + ); + + $tree->merge($a, $b); + } + + public function testPerformsNoDeepMerging() + { + $tb = new TreeBuilder(); + + $tree = $tb + ->root('config', 'array') + ->children() + ->node('no_deep_merging', 'array') + ->performNoDeepMerging() + ->children() + ->node('foo', 'scalar')->end() + ->node('bar', 'scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->buildTree() + ; + + $a = array( + 'no_deep_merging' => array( + 'foo' => 'a', + 'bar' => 'b', + ), + ); + + $b = array( + 'no_deep_merging' => array( + 'c' => 'd', + ), + ); + + $this->assertEquals(array( + 'no_deep_merging' => array( + 'c' => 'd', + ), + ), $tree->merge($a, $b)); + } + + public function testPrototypeWithoutAKeyAttribute() + { + $tb = new TreeBuilder(); + + $tree = $tb + ->root('config', 'array') + ->children() + ->arrayNode('append_elements') + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->buildTree() + ; + + $a = array( + 'append_elements' => array('a', 'b'), + ); + + $b = array( + 'append_elements' => array('c', 'd'), + ); + + $this->assertEquals(array('append_elements' => array('a', 'b', 'c', 'd')), $tree->merge($a, $b)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f011f5422ffea50cf3ed8590cea832aca1b486d1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php @@ -0,0 +1,230 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\NodeInterface; +use Symfony\Component\Config\Definition\Builder\TreeBuilder; + +class NormalizationTest extends TestCase +{ + /** + * @dataProvider getEncoderTests + */ + public function testNormalizeEncoders($denormalized) + { + $tb = new TreeBuilder(); + $tree = $tb + ->root('root_name', 'array') + ->fixXmlConfig('encoder') + ->children() + ->node('encoders', 'array') + ->useAttributeAsKey('class') + ->prototype('array') + ->beforeNormalization()->ifString()->then(function ($v) { return array('algorithm' => $v); })->end() + ->children() + ->node('algorithm', 'scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->buildTree() + ; + + $normalized = array( + 'encoders' => array( + 'foo' => array('algorithm' => 'plaintext'), + ), + ); + + $this->assertNormalized($tree, $denormalized, $normalized); + } + + public function getEncoderTests() + { + $configs = array(); + + // XML + $configs[] = array( + 'encoder' => array( + array('class' => 'foo', 'algorithm' => 'plaintext'), + ), + ); + + // XML when only one element of this type + $configs[] = array( + 'encoder' => array('class' => 'foo', 'algorithm' => 'plaintext'), + ); + + // YAML/PHP + $configs[] = array( + 'encoders' => array( + array('class' => 'foo', 'algorithm' => 'plaintext'), + ), + ); + + // YAML/PHP + $configs[] = array( + 'encoders' => array( + 'foo' => 'plaintext', + ), + ); + + // YAML/PHP + $configs[] = array( + 'encoders' => array( + 'foo' => array('algorithm' => 'plaintext'), + ), + ); + + return array_map(function ($v) { + return array($v); + }, $configs); + } + + /** + * @dataProvider getAnonymousKeysTests + */ + public function testAnonymousKeysArray($denormalized) + { + $tb = new TreeBuilder(); + $tree = $tb + ->root('root', 'array') + ->children() + ->node('logout', 'array') + ->fixXmlConfig('handler') + ->children() + ->node('handlers', 'array') + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->buildTree() + ; + + $normalized = array('logout' => array('handlers' => array('a', 'b', 'c'))); + + $this->assertNormalized($tree, $denormalized, $normalized); + } + + public function getAnonymousKeysTests() + { + $configs = array(); + + $configs[] = array( + 'logout' => array( + 'handlers' => array('a', 'b', 'c'), + ), + ); + + $configs[] = array( + 'logout' => array( + 'handler' => array('a', 'b', 'c'), + ), + ); + + return array_map(function ($v) { return array($v); }, $configs); + } + + /** + * @dataProvider getNumericKeysTests + */ + public function testNumericKeysAsAttributes($denormalized) + { + $normalized = array( + 'thing' => array(42 => array('foo', 'bar'), 1337 => array('baz', 'qux')), + ); + + $this->assertNormalized($this->getNumericKeysTestTree(), $denormalized, $normalized); + } + + public function getNumericKeysTests() + { + $configs = array(); + + $configs[] = array( + 'thing' => array( + 42 => array('foo', 'bar'), 1337 => array('baz', 'qux'), + ), + ); + + $configs[] = array( + 'thing' => array( + array('foo', 'bar', 'id' => 42), array('baz', 'qux', 'id' => 1337), + ), + ); + + return array_map(function ($v) { return array($v); }, $configs); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage The attribute "id" must be set for path "root.thing". + */ + public function testNonAssociativeArrayThrowsExceptionIfAttributeNotSet() + { + $denormalized = array( + 'thing' => array( + array('foo', 'bar'), array('baz', 'qux'), + ), + ); + + $this->assertNormalized($this->getNumericKeysTestTree(), $denormalized, array()); + } + + public function testAssociativeArrayPreserveKeys() + { + $tb = new TreeBuilder(); + $tree = $tb + ->root('root', 'array') + ->prototype('array') + ->children() + ->node('foo', 'scalar')->end() + ->end() + ->end() + ->end() + ->buildTree() + ; + + $data = array('first' => array('foo' => 'bar')); + + $this->assertNormalized($tree, $data, $data); + } + + public static function assertNormalized(NodeInterface $tree, $denormalized, $normalized) + { + self::assertSame($normalized, $tree->normalize($denormalized)); + } + + private function getNumericKeysTestTree() + { + $tb = new TreeBuilder(); + $tree = $tb + ->root('root', 'array') + ->children() + ->node('thing', 'array') + ->useAttributeAsKey('id') + ->prototype('array') + ->prototype('scalar')->end() + ->end() + ->end() + ->end() + ->end() + ->buildTree() + ; + + return $tree; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1a5de41ccb01f1fcf9f1fee5db2eb554f81b4759 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php @@ -0,0 +1,342 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\PrototypedArrayNode; +use Symfony\Component\Config\Definition\ArrayNode; +use Symfony\Component\Config\Definition\ScalarNode; +use Symfony\Component\Config\Definition\VariableNode; + +class PrototypedArrayNodeTest extends TestCase +{ + public function testGetDefaultValueReturnsAnEmptyArrayForPrototypes() + { + $node = new PrototypedArrayNode('root'); + $prototype = new ArrayNode(null, $node); + $node->setPrototype($prototype); + $this->assertEmpty($node->getDefaultValue()); + } + + public function testGetDefaultValueReturnsDefaultValueForPrototypes() + { + $node = new PrototypedArrayNode('root'); + $prototype = new ArrayNode(null, $node); + $node->setPrototype($prototype); + $node->setDefaultValue(array('test')); + $this->assertEquals(array('test'), $node->getDefaultValue()); + } + + // a remapped key (e.g. "mapping" -> "mappings") should be unset after being used + public function testRemappedKeysAreUnset() + { + $node = new ArrayNode('root'); + $mappingsNode = new PrototypedArrayNode('mappings'); + $node->addChild($mappingsNode); + + // each item under mappings is just a scalar + $prototype = new ScalarNode(null, $mappingsNode); + $mappingsNode->setPrototype($prototype); + + $remappings = array(); + $remappings[] = array('mapping', 'mappings'); + $node->setXmlRemappings($remappings); + + $normalized = $node->normalize(array('mapping' => array('foo', 'bar'))); + $this->assertEquals(array('mappings' => array('foo', 'bar')), $normalized); + } + + /** + * Tests that when a key attribute is mapped, that key is removed from the array. + * + * + * + * + * The above should finally be mapped to an array that looks like this + * (because "id" is the key attribute). + * + * array( + * 'things' => array( + * 'option1' => 'foo', + * 'option2' => 'bar', + * ) + * ) + */ + public function testMappedAttributeKeyIsRemoved() + { + $node = new PrototypedArrayNode('root'); + $node->setKeyAttribute('id', true); + + // each item under the root is an array, with one scalar item + $prototype = new ArrayNode(null, $node); + $prototype->addChild(new ScalarNode('foo')); + $node->setPrototype($prototype); + + $children = array(); + $children[] = array('id' => 'item_name', 'foo' => 'bar'); + $normalized = $node->normalize($children); + + $expected = array(); + $expected['item_name'] = array('foo' => 'bar'); + $this->assertEquals($expected, $normalized); + } + + /** + * Tests the opposite of the testMappedAttributeKeyIsRemoved because + * the removal can be toggled with an option. + */ + public function testMappedAttributeKeyNotRemoved() + { + $node = new PrototypedArrayNode('root'); + $node->setKeyAttribute('id', false); + + // each item under the root is an array, with two scalar items + $prototype = new ArrayNode(null, $node); + $prototype->addChild(new ScalarNode('foo')); + $prototype->addChild(new ScalarNode('id')); // the key attribute will remain + $node->setPrototype($prototype); + + $children = array(); + $children[] = array('id' => 'item_name', 'foo' => 'bar'); + $normalized = $node->normalize($children); + + $expected = array(); + $expected['item_name'] = array('id' => 'item_name', 'foo' => 'bar'); + $this->assertEquals($expected, $normalized); + } + + public function testAddDefaultChildren() + { + $node = $this->getPrototypeNodeWithDefaultChildren(); + $node->setAddChildrenIfNoneSet(); + $this->assertTrue($node->hasDefaultValue()); + $this->assertEquals(array(array('foo' => 'bar')), $node->getDefaultValue()); + + $node = $this->getPrototypeNodeWithDefaultChildren(); + $node->setKeyAttribute('foobar'); + $node->setAddChildrenIfNoneSet(); + $this->assertTrue($node->hasDefaultValue()); + $this->assertEquals(array('defaults' => array('foo' => 'bar')), $node->getDefaultValue()); + + $node = $this->getPrototypeNodeWithDefaultChildren(); + $node->setKeyAttribute('foobar'); + $node->setAddChildrenIfNoneSet('defaultkey'); + $this->assertTrue($node->hasDefaultValue()); + $this->assertEquals(array('defaultkey' => array('foo' => 'bar')), $node->getDefaultValue()); + + $node = $this->getPrototypeNodeWithDefaultChildren(); + $node->setKeyAttribute('foobar'); + $node->setAddChildrenIfNoneSet(array('defaultkey')); + $this->assertTrue($node->hasDefaultValue()); + $this->assertEquals(array('defaultkey' => array('foo' => 'bar')), $node->getDefaultValue()); + + $node = $this->getPrototypeNodeWithDefaultChildren(); + $node->setKeyAttribute('foobar'); + $node->setAddChildrenIfNoneSet(array('dk1', 'dk2')); + $this->assertTrue($node->hasDefaultValue()); + $this->assertEquals(array('dk1' => array('foo' => 'bar'), 'dk2' => array('foo' => 'bar')), $node->getDefaultValue()); + + $node = $this->getPrototypeNodeWithDefaultChildren(); + $node->setAddChildrenIfNoneSet(array(5, 6)); + $this->assertTrue($node->hasDefaultValue()); + $this->assertEquals(array(0 => array('foo' => 'bar'), 1 => array('foo' => 'bar')), $node->getDefaultValue()); + + $node = $this->getPrototypeNodeWithDefaultChildren(); + $node->setAddChildrenIfNoneSet(2); + $this->assertTrue($node->hasDefaultValue()); + $this->assertEquals(array(array('foo' => 'bar'), array('foo' => 'bar')), $node->getDefaultValue()); + } + + public function testDefaultChildrenWinsOverDefaultValue() + { + $node = $this->getPrototypeNodeWithDefaultChildren(); + $node->setAddChildrenIfNoneSet(); + $node->setDefaultValue(array('bar' => 'foo')); + $this->assertTrue($node->hasDefaultValue()); + $this->assertEquals(array(array('foo' => 'bar')), $node->getDefaultValue()); + } + + protected function getPrototypeNodeWithDefaultChildren() + { + $node = new PrototypedArrayNode('root'); + $prototype = new ArrayNode(null, $node); + $child = new ScalarNode('foo'); + $child->setDefaultValue('bar'); + $prototype->addChild($child); + $prototype->setAddIfNotSet(true); + $node->setPrototype($prototype); + + return $node; + } + + /** + * Tests that when a key attribute is mapped, that key is removed from the array. + * And if only 'value' element is left in the array, it will replace its wrapper array. + * + * + * + * + * The above should finally be mapped to an array that looks like this + * (because "id" is the key attribute). + * + * array( + * 'things' => array( + * 'option1' => 'value1' + * ) + * ) + * + * It's also possible to mix 'value-only' and 'non-value-only' elements in the array. + * + * + * + * + * The above should finally be mapped to an array as follows + * + * array( + * 'things' => array( + * 'option1' => 'value1', + * 'option2' => array( + * 'value' => 'value2', + * 'foo' => 'foo2' + * ) + * ) + * ) + * + * The 'value' element can also be ArrayNode: + * + * + * + * + * + * The above should be finally be mapped to an array as follows + * + * array( + * 'things' => array( + * 'option1' => array( + * 'foo' => 'foo1', + * 'bar' => 'bar1' + * ) + * ) + * ) + * + * If using VariableNode for value node, it's also possible to mix different types of value nodes: + * + * + * + * + * + * The above should be finally mapped to an array as follows + * + * array( + * 'things' => array( + * 'option1' => array( + * 'foo' => 'foo1', + * 'bar' => 'bar1' + * ), + * 'option2' => 'value2' + * ) + * ) + * + * + * @dataProvider getDataForKeyRemovedLeftValueOnly + */ + public function testMappedAttributeKeyIsRemovedLeftValueOnly($value, $children, $expected) + { + $node = new PrototypedArrayNode('root'); + $node->setKeyAttribute('id', true); + + // each item under the root is an array, with one scalar item + $prototype = new ArrayNode(null, $node); + $prototype->addChild(new ScalarNode('id')); + $prototype->addChild(new ScalarNode('foo')); + $prototype->addChild($value); + $node->setPrototype($prototype); + + $normalized = $node->normalize($children); + $this->assertEquals($expected, $normalized); + } + + public function getDataForKeyRemovedLeftValueOnly() + { + $scalarValue = new ScalarNode('value'); + + $arrayValue = new ArrayNode('value'); + $arrayValue->addChild(new ScalarNode('foo')); + $arrayValue->addChild(new ScalarNode('bar')); + + $variableValue = new VariableNode('value'); + + return array( + array( + $scalarValue, + array( + array('id' => 'option1', 'value' => 'value1'), + ), + array('option1' => 'value1'), + ), + + array( + $scalarValue, + array( + array('id' => 'option1', 'value' => 'value1'), + array('id' => 'option2', 'value' => 'value2', 'foo' => 'foo2'), + ), + array( + 'option1' => 'value1', + 'option2' => array('value' => 'value2', 'foo' => 'foo2'), + ), + ), + + array( + $arrayValue, + array( + array( + 'id' => 'option1', + 'value' => array('foo' => 'foo1', 'bar' => 'bar1'), + ), + ), + array( + 'option1' => array('foo' => 'foo1', 'bar' => 'bar1'), + ), + ), + + array($variableValue, + array( + array( + 'id' => 'option1', 'value' => array('foo' => 'foo1', 'bar' => 'bar1'), + ), + array('id' => 'option2', 'value' => 'value2'), + ), + array( + 'option1' => array('foo' => 'foo1', 'bar' => 'bar1'), + 'option2' => 'value2', + ), + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a402a61ef951de4f08dcde3bb7c8673e613ff77c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php @@ -0,0 +1,137 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\ScalarNode; + +class ScalarNodeTest extends TestCase +{ + /** + * @dataProvider getValidValues + */ + public function testNormalize($value) + { + $node = new ScalarNode('test'); + $this->assertSame($value, $node->normalize($value)); + } + + public function getValidValues() + { + return array( + array(false), + array(true), + array(null), + array(''), + array('foo'), + array(0), + array(1), + array(0.0), + array(0.1), + ); + } + + /** + * @dataProvider getInvalidValues + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException + */ + public function testNormalizeThrowsExceptionOnInvalidValues($value) + { + $node = new ScalarNode('test'); + $node->normalize($value); + } + + public function getInvalidValues() + { + return array( + array(array()), + array(array('foo' => 'bar')), + array(new \stdClass()), + ); + } + + public function testNormalizeThrowsExceptionWithoutHint() + { + $node = new ScalarNode('test'); + + if (method_exists($this, 'expectException')) { + $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException'); + $this->expectExceptionMessage('Invalid type for path "test". Expected scalar, but got array.'); + } else { + $this->setExpectedException('Symfony\Component\Config\Definition\Exception\InvalidTypeException', 'Invalid type for path "test". Expected scalar, but got array.'); + } + + $node->normalize(array()); + } + + public function testNormalizeThrowsExceptionWithErrorMessage() + { + $node = new ScalarNode('test'); + $node->setInfo('"the test value"'); + + if (method_exists($this, 'expectException')) { + $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException'); + $this->expectExceptionMessage("Invalid type for path \"test\". Expected scalar, but got array.\nHint: \"the test value\""); + } else { + $this->setExpectedException('Symfony\Component\Config\Definition\Exception\InvalidTypeException', "Invalid type for path \"test\". Expected scalar, but got array.\nHint: \"the test value\""); + } + + $node->normalize(array()); + } + + /** + * @dataProvider getValidNonEmptyValues + * + * @param mixed $value + */ + public function testValidNonEmptyValues($value) + { + $node = new ScalarNode('test'); + $node->setAllowEmptyValue(false); + + $this->assertSame($value, $node->finalize($value)); + } + + public function getValidNonEmptyValues() + { + return array( + array(false), + array(true), + array('foo'), + array(0), + array(1), + array(0.0), + array(0.1), + ); + } + + /** + * @dataProvider getEmptyValues + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * + * @param mixed $value + */ + public function testNotAllowedEmptyValuesThrowException($value) + { + $node = new ScalarNode('test'); + $node->setAllowEmptyValue(false); + $node->finalize($value); + } + + public function getEmptyValues() + { + return array( + array(null), + array(''), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Exception/FileLoaderLoadExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Exception/FileLoaderLoadExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c1ad9150e6a9968aaa44122b1e8a90e3c33f5517 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Exception/FileLoaderLoadExceptionTest.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Exception; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Exception\FileLoaderLoadException; + +class FileLoaderLoadExceptionTest extends TestCase +{ + public function testMessageCannotLoadResource() + { + $exception = new FileLoaderLoadException('resource', null); + $this->assertEquals('Cannot load resource "resource".', $exception->getMessage()); + } + + public function testMessageCannotImportResourceFromSource() + { + $exception = new FileLoaderLoadException('resource', 'sourceResource'); + $this->assertEquals('Cannot import resource "resource" from "sourceResource".', $exception->getMessage()); + } + + public function testMessageCannotImportBundleResource() + { + $exception = new FileLoaderLoadException('@resource', 'sourceResource'); + $this->assertEquals( + 'Cannot import resource "@resource" from "sourceResource". '. + 'Make sure the "resource" bundle is correctly registered and loaded in the application kernel class. '. + 'If the bundle is registered, make sure the bundle path "@resource" is not empty.', + $exception->getMessage() + ); + } + + public function testMessageHasPreviousErrorWithDotAndUnableToLoad() + { + $exception = new FileLoaderLoadException( + 'resource', + null, + null, + new \Exception('There was a previous error with an ending dot.') + ); + $this->assertEquals( + 'There was a previous error with an ending dot in resource (which is loaded in resource "resource").', + $exception->getMessage() + ); + } + + public function testMessageHasPreviousErrorWithoutDotAndUnableToLoad() + { + $exception = new FileLoaderLoadException( + 'resource', + null, + null, + new \Exception('There was a previous error with no ending dot') + ); + $this->assertEquals( + 'There was a previous error with no ending dot in resource (which is loaded in resource "resource").', + $exception->getMessage() + ); + } + + public function testMessageHasPreviousErrorAndUnableToLoadBundle() + { + $exception = new FileLoaderLoadException( + '@resource', + null, + null, + new \Exception('There was a previous error with an ending dot.') + ); + $this->assertEquals( + 'There was a previous error with an ending dot in @resource '. + '(which is loaded in resource "@resource"). '. + 'Make sure the "resource" bundle is correctly registered and loaded in the application kernel class. '. + 'If the bundle is registered, make sure the bundle path "@resource" is not empty.', + $exception->getMessage() + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/FileLocatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/FileLocatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..049c00905b6042c6b3c0532c36e13506a233901a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/FileLocatorTest.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\FileLocator; + +class FileLocatorTest extends TestCase +{ + /** + * @dataProvider getIsAbsolutePathTests + */ + public function testIsAbsolutePath($path) + { + $loader = new FileLocator(array()); + $r = new \ReflectionObject($loader); + $m = $r->getMethod('isAbsolutePath'); + $m->setAccessible(true); + + $this->assertTrue($m->invoke($loader, $path), '->isAbsolutePath() returns true for an absolute path'); + } + + public function getIsAbsolutePathTests() + { + return array( + array('/foo.xml'), + array('c:\\\\foo.xml'), + array('c:/foo.xml'), + array('\\server\\foo.xml'), + array('https://server/foo.xml'), + array('phar://server/foo.xml'), + ); + } + + public function testLocate() + { + $loader = new FileLocator(__DIR__.'/Fixtures'); + + $this->assertEquals( + __DIR__.DIRECTORY_SEPARATOR.'FileLocatorTest.php', + $loader->locate('FileLocatorTest.php', __DIR__), + '->locate() returns the absolute filename if the file exists in the given path' + ); + + $this->assertEquals( + __DIR__.'/Fixtures'.DIRECTORY_SEPARATOR.'foo.xml', + $loader->locate('foo.xml', __DIR__), + '->locate() returns the absolute filename if the file exists in one of the paths given in the constructor' + ); + + $this->assertEquals( + __DIR__.'/Fixtures'.DIRECTORY_SEPARATOR.'foo.xml', + $loader->locate(__DIR__.'/Fixtures'.DIRECTORY_SEPARATOR.'foo.xml', __DIR__), + '->locate() returns the absolute filename if the file exists in one of the paths given in the constructor' + ); + + $loader = new FileLocator(array(__DIR__.'/Fixtures', __DIR__.'/Fixtures/Again')); + + $this->assertEquals( + array(__DIR__.'/Fixtures'.DIRECTORY_SEPARATOR.'foo.xml', __DIR__.'/Fixtures/Again'.DIRECTORY_SEPARATOR.'foo.xml'), + $loader->locate('foo.xml', __DIR__, false), + '->locate() returns an array of absolute filenames' + ); + + $this->assertEquals( + array(__DIR__.'/Fixtures'.DIRECTORY_SEPARATOR.'foo.xml', __DIR__.'/Fixtures/Again'.DIRECTORY_SEPARATOR.'foo.xml'), + $loader->locate('foo.xml', __DIR__.'/Fixtures', false), + '->locate() returns an array of absolute filenames' + ); + + $loader = new FileLocator(__DIR__.'/Fixtures/Again'); + + $this->assertEquals( + array(__DIR__.'/Fixtures'.DIRECTORY_SEPARATOR.'foo.xml', __DIR__.'/Fixtures/Again'.DIRECTORY_SEPARATOR.'foo.xml'), + $loader->locate('foo.xml', __DIR__.'/Fixtures', false), + '->locate() returns an array of absolute filenames' + ); + } + + /** + * @expectedException \Symfony\Component\Config\Exception\FileLocatorFileNotFoundException + * @expectedExceptionMessage The file "foobar.xml" does not exist + */ + public function testLocateThrowsAnExceptionIfTheFileDoesNotExists() + { + $loader = new FileLocator(array(__DIR__.'/Fixtures')); + + $loader->locate('foobar.xml', __DIR__); + } + + /** + * @expectedException \Symfony\Component\Config\Exception\FileLocatorFileNotFoundException + */ + public function testLocateThrowsAnExceptionIfTheFileDoesNotExistsInAbsolutePath() + { + $loader = new FileLocator(array(__DIR__.'/Fixtures')); + + $loader->locate(__DIR__.'/Fixtures/foobar.xml', __DIR__); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage An empty file name is not valid to be located. + */ + public function testLocateEmpty() + { + $loader = new FileLocator(array(__DIR__.'/Fixtures')); + + $loader->locate(null, __DIR__); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Again/foo.xml b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Again/foo.xml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Builder/BarNodeDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Builder/BarNodeDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..47701c1b29eb8294f7706429fe8100ddca50b5bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Builder/BarNodeDefinition.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition\Builder; + +use Symfony\Component\Config\Definition\Builder\NodeDefinition; + +class BarNodeDefinition extends NodeDefinition +{ + protected function createNode() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Builder/NodeBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Builder/NodeBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..aa5986311ba62223099eca57c72083b7f912b567 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Builder/NodeBuilder.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition\Builder; + +use Symfony\Component\Config\Definition\Builder\NodeBuilder as BaseNodeBuilder; + +class NodeBuilder extends BaseNodeBuilder +{ + public function barNode($name) + { + return $this->node($name, 'bar'); + } + + protected function getNodeClass($type) + { + switch ($type) { + case 'variable': + return __NAMESPACE__.'\\'.ucfirst($type).'NodeDefinition'; + case 'bar': + return __NAMESPACE__.'\\'.ucfirst($type).'NodeDefinition'; + default: + return parent::getNodeClass($type); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Builder/VariableNodeDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Builder/VariableNodeDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..1017880c1111040a05a979b07ee98fd6b8c2ee69 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Builder/VariableNodeDefinition.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition\Builder; + +use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVariableNodeDefinition; + +class VariableNodeDefinition extends BaseVariableNodeDefinition +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Configuration/ExampleConfiguration.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Configuration/ExampleConfiguration.php new file mode 100644 index 0000000000000000000000000000000000000000..3a34f906a367aa77d72871007e2ff857eaa2ad01 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Configuration/ExampleConfiguration.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Fixtures\Configuration; + +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +class ExampleConfiguration implements ConfigurationInterface +{ + public function getConfigTreeBuilder() + { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('acme_root'); + + $rootNode + ->fixXmlConfig('parameter') + ->fixXmlConfig('connection') + ->fixXmlConfig('cms_page') + ->children() + ->booleanNode('boolean')->defaultTrue()->end() + ->scalarNode('scalar_empty')->end() + ->scalarNode('scalar_null')->defaultNull()->end() + ->scalarNode('scalar_true')->defaultTrue()->end() + ->scalarNode('scalar_false')->defaultFalse()->end() + ->scalarNode('scalar_default')->defaultValue('default')->end() + ->scalarNode('scalar_array_empty')->defaultValue(array())->end() + ->scalarNode('scalar_array_defaults')->defaultValue(array('elem1', 'elem2'))->end() + ->scalarNode('scalar_required')->isRequired()->end() + ->scalarNode('node_with_a_looong_name')->end() + ->enumNode('enum_with_default')->values(array('this', 'that'))->defaultValue('this')->end() + ->enumNode('enum')->values(array('this', 'that'))->end() + ->arrayNode('array') + ->info('some info') + ->canBeUnset() + ->children() + ->scalarNode('child1')->end() + ->scalarNode('child2')->end() + ->scalarNode('child3') + ->info( + "this is a long\n". + "multi-line info text\n". + 'which should be indented' + ) + ->example('example setting') + ->end() + ->end() + ->end() + ->arrayNode('scalar_prototyped') + ->prototype('scalar')->end() + ->end() + ->arrayNode('parameters') + ->useAttributeAsKey('name') + ->prototype('scalar')->info('Parameter name')->end() + ->end() + ->arrayNode('connections') + ->prototype('array') + ->children() + ->scalarNode('user')->end() + ->scalarNode('pass')->end() + ->end() + ->end() + ->end() + ->arrayNode('cms_pages') + ->useAttributeAsKey('page') + ->prototype('array') + ->useAttributeAsKey('locale') + ->prototype('array') + ->children() + ->scalarNode('title')->isRequired()->end() + ->scalarNode('path')->isRequired()->end() + ->end() + ->end() + ->end() + ->end() + ->arrayNode('pipou') + ->useAttributeAsKey('name') + ->prototype('array') + ->prototype('array') + ->children() + ->scalarNode('didou') + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + + return $treeBuilder; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/document_type.xml b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/document_type.xml new file mode 100644 index 0000000000000000000000000000000000000000..4c25228263bb80a9948184d2bf434a93dec8bae9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/document_type.xml @@ -0,0 +1,3 @@ + +]> + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/invalid.xml b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/invalid.xml new file mode 100644 index 0000000000000000000000000000000000000000..a07af9fd85eb076a1d93f2137908e7d37765a1fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/invalid.xml @@ -0,0 +1,2 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/invalid_schema.xml b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/invalid_schema.xml new file mode 100644 index 0000000000000000000000000000000000000000..e2725a2c2a8657d1078def881e94a423b3341e85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/invalid_schema.xml @@ -0,0 +1,2 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/schema.xsd b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/schema.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e56820f69139126568527d4722d22618e9443bc8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/schema.xsd @@ -0,0 +1,9 @@ + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/valid.xml b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/valid.xml new file mode 100644 index 0000000000000000000000000000000000000000..a96bb38267664b0b4b53c35f07d6fa0dffb939a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/Util/valid.xml @@ -0,0 +1,3 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/foo.xml b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Fixtures/foo.xml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4a01d26adf223cbf3ec2cc901c2b7543309d55fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Loader\LoaderResolver; +use Symfony\Component\Config\Loader\DelegatingLoader; + +class DelegatingLoaderTest extends TestCase +{ + public function testConstructor() + { + $loader = new DelegatingLoader($resolver = new LoaderResolver()); + $this->assertTrue(true, '__construct() takes a loader resolver as its first argument'); + } + + public function testGetSetResolver() + { + $resolver = new LoaderResolver(); + $loader = new DelegatingLoader($resolver); + $this->assertSame($resolver, $loader->getResolver(), '->getResolver() gets the resolver loader'); + $loader->setResolver($resolver = new LoaderResolver()); + $this->assertSame($resolver, $loader->getResolver(), '->setResolver() sets the resolver loader'); + } + + public function testSupports() + { + $loader1 = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + $loader1->expects($this->once())->method('supports')->will($this->returnValue(true)); + $loader = new DelegatingLoader(new LoaderResolver(array($loader1))); + $this->assertTrue($loader->supports('foo.xml'), '->supports() returns true if the resource is loadable'); + + $loader1 = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + $loader1->expects($this->once())->method('supports')->will($this->returnValue(false)); + $loader = new DelegatingLoader(new LoaderResolver(array($loader1))); + $this->assertFalse($loader->supports('foo.foo'), '->supports() returns false if the resource is not loadable'); + } + + public function testLoad() + { + $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + $loader->expects($this->once())->method('supports')->will($this->returnValue(true)); + $loader->expects($this->once())->method('load'); + $resolver = new LoaderResolver(array($loader)); + $loader = new DelegatingLoader($resolver); + + $loader->load('foo'); + } + + /** + * @expectedException \Symfony\Component\Config\Exception\FileLoaderLoadException + */ + public function testLoadThrowsAnExceptionIfTheResourceCannotBeLoaded() + { + $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + $loader->expects($this->once())->method('supports')->will($this->returnValue(false)); + $resolver = new LoaderResolver(array($loader)); + $loader = new DelegatingLoader($resolver); + + $loader->load('foo'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e1d23e45fa6d17fe45c795fa3759a5f12740cbd8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Loader\FileLoader; +use Symfony\Component\Config\Loader\LoaderResolver; + +class FileLoaderTest extends TestCase +{ + public function testImportWithFileLocatorDelegation() + { + $locatorMock = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); + + $locatorMockForAdditionalLoader = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); + $locatorMockForAdditionalLoader->expects($this->any())->method('locate')->will($this->onConsecutiveCalls( + array('path/to/file1'), // Default + array('path/to/file1', 'path/to/file2'), // First is imported + array('path/to/file1', 'path/to/file2'), // Second is imported + array('path/to/file1'), // Exception + array('path/to/file1', 'path/to/file2') // Exception + )); + + $fileLoader = new TestFileLoader($locatorMock); + $fileLoader->setSupports(false); + $fileLoader->setCurrentDir('.'); + + $additionalLoader = new TestFileLoader($locatorMockForAdditionalLoader); + $additionalLoader->setCurrentDir('.'); + + $fileLoader->setResolver($loaderResolver = new LoaderResolver(array($fileLoader, $additionalLoader))); + + // Default case + $this->assertSame('path/to/file1', $fileLoader->import('my_resource')); + + // Check first file is imported if not already loading + $this->assertSame('path/to/file1', $fileLoader->import('my_resource')); + + // Check second file is imported if first is already loading + $fileLoader->addLoading('path/to/file1'); + $this->assertSame('path/to/file2', $fileLoader->import('my_resource')); + + // Check exception throws if first (and only available) file is already loading + try { + $fileLoader->import('my_resource'); + $this->fail('->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\Config\Exception\FileLoaderImportCircularReferenceException', $e, '->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading'); + } + + // Check exception throws if all files are already loading + try { + $fileLoader->addLoading('path/to/file2'); + $fileLoader->import('my_resource'); + $this->fail('->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\Config\Exception\FileLoaderImportCircularReferenceException', $e, '->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading'); + } + } +} + +class TestFileLoader extends FileLoader +{ + private $supports = true; + + public function load($resource, $type = null) + { + return $resource; + } + + public function supports($resource, $type = null) + { + return $this->supports; + } + + public function addLoading($resource) + { + self::$loading[$resource] = true; + } + + public function removeLoading($resource) + { + unset(self::$loading[$resource]); + } + + public function clearLoading() + { + self::$loading = array(); + } + + public function setSupports($supports) + { + $this->supports = $supports; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/LoaderResolverTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/LoaderResolverTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0bf56b610ebdc59183b9010baf9f24d704c0dff3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/LoaderResolverTest.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Loader\LoaderResolver; + +class LoaderResolverTest extends TestCase +{ + public function testConstructor() + { + $resolver = new LoaderResolver(array( + $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(), + )); + + $this->assertEquals(array($loader), $resolver->getLoaders(), '__construct() takes an array of loaders as its first argument'); + } + + public function testResolve() + { + $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + $resolver = new LoaderResolver(array($loader)); + $this->assertFalse($resolver->resolve('foo.foo'), '->resolve() returns false if no loader is able to load the resource'); + + $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + $loader->expects($this->once())->method('supports')->will($this->returnValue(true)); + $resolver = new LoaderResolver(array($loader)); + $this->assertEquals($loader, $resolver->resolve(function () {}), '->resolve() returns the loader for the given resource'); + } + + public function testLoaders() + { + $resolver = new LoaderResolver(); + $resolver->addLoader($loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock()); + + $this->assertEquals(array($loader), $resolver->getLoaders(), 'addLoader() adds a loader'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/LoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/LoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fefb1d728f445de4e60eee9458473f845b0d5195 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Loader/LoaderTest.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Loader\Loader; + +class LoaderTest extends TestCase +{ + public function testGetSetResolver() + { + $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock(); + + $loader = new ProjectLoader1(); + $loader->setResolver($resolver); + + $this->assertSame($resolver, $loader->getResolver(), '->setResolver() sets the resolver loader'); + } + + public function testResolve() + { + $resolvedLoader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + + $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock(); + $resolver->expects($this->once()) + ->method('resolve') + ->with('foo.xml') + ->will($this->returnValue($resolvedLoader)); + + $loader = new ProjectLoader1(); + $loader->setResolver($resolver); + + $this->assertSame($loader, $loader->resolve('foo.foo'), '->resolve() finds a loader'); + $this->assertSame($resolvedLoader, $loader->resolve('foo.xml'), '->resolve() finds a loader'); + } + + /** + * @expectedException \Symfony\Component\Config\Exception\FileLoaderLoadException + */ + public function testResolveWhenResolverCannotFindLoader() + { + $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock(); + $resolver->expects($this->once()) + ->method('resolve') + ->with('FOOBAR') + ->will($this->returnValue(false)); + + $loader = new ProjectLoader1(); + $loader->setResolver($resolver); + + $loader->resolve('FOOBAR'); + } + + public function testImport() + { + $resolvedLoader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + $resolvedLoader->expects($this->once()) + ->method('load') + ->with('foo') + ->will($this->returnValue('yes')); + + $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock(); + $resolver->expects($this->once()) + ->method('resolve') + ->with('foo') + ->will($this->returnValue($resolvedLoader)); + + $loader = new ProjectLoader1(); + $loader->setResolver($resolver); + + $this->assertEquals('yes', $loader->import('foo')); + } + + public function testImportWithType() + { + $resolvedLoader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + $resolvedLoader->expects($this->once()) + ->method('load') + ->with('foo', 'bar') + ->will($this->returnValue('yes')); + + $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock(); + $resolver->expects($this->once()) + ->method('resolve') + ->with('foo', 'bar') + ->will($this->returnValue($resolvedLoader)); + + $loader = new ProjectLoader1(); + $loader->setResolver($resolver); + + $this->assertEquals('yes', $loader->import('foo', 'bar')); + } +} + +class ProjectLoader1 extends Loader +{ + public function load($resource, $type = null) + { + } + + public function supports($resource, $type = null) + { + return is_string($resource) && 'foo' === pathinfo($resource, PATHINFO_EXTENSION); + } + + public function getType() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..87f470aaf7651bf641089febfef59198bf99894f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Resource; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Resource\ClassExistenceResource; + +class ClassExistenceResourceTest extends TestCase +{ + public function testToString() + { + $res = new ClassExistenceResource('BarClass'); + $this->assertSame('BarClass', (string) $res); + } + + public function testGetResource() + { + $res = new ClassExistenceResource('BarClass'); + $this->assertSame('BarClass', $res->getResource()); + } + + public function testIsFreshWhenClassDoesNotExist() + { + $res = new ClassExistenceResource('Symfony\Component\Config\Tests\Fixtures\BarClass'); + + $this->assertTrue($res->isFresh(time())); + + eval(<<assertFalse($res->isFresh(time())); + } + + public function testIsFreshWhenClassExists() + { + $res = new ClassExistenceResource('Symfony\Component\Config\Tests\Resource\ClassExistenceResourceTest'); + + $this->assertTrue($res->isFresh(time())); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..99c75f1047576216dd963abc92f2c012ff391fc2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php @@ -0,0 +1,183 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Resource; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Resource\DirectoryResource; + +class DirectoryResourceTest extends TestCase +{ + protected $directory; + + protected function setUp() + { + $this->directory = sys_get_temp_dir().DIRECTORY_SEPARATOR.'symfonyDirectoryIterator'; + if (!file_exists($this->directory)) { + mkdir($this->directory); + } + touch($this->directory.'/tmp.xml'); + } + + protected function tearDown() + { + if (!is_dir($this->directory)) { + return; + } + $this->removeDirectory($this->directory); + } + + protected function removeDirectory($directory) + { + $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($directory), \RecursiveIteratorIterator::CHILD_FIRST); + foreach ($iterator as $path) { + if (preg_match('#[/\\\\]\.\.?$#', $path->__toString())) { + continue; + } + if ($path->isDir()) { + rmdir($path->__toString()); + } else { + unlink($path->__toString()); + } + } + rmdir($directory); + } + + public function testGetResource() + { + $resource = new DirectoryResource($this->directory); + $this->assertSame(realpath($this->directory), $resource->getResource(), '->getResource() returns the path to the resource'); + } + + public function testGetPattern() + { + $resource = new DirectoryResource($this->directory, 'bar'); + $this->assertEquals('bar', $resource->getPattern()); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessageRegExp /The directory ".*" does not exist./ + */ + public function testResourceDoesNotExist() + { + $resource = new DirectoryResource('/____foo/foobar'.mt_rand(1, 999999)); + } + + public function testIsFresh() + { + $resource = new DirectoryResource($this->directory); + $this->assertTrue($resource->isFresh(time() + 10), '->isFresh() returns true if the resource has not changed'); + $this->assertFalse($resource->isFresh(time() - 86400), '->isFresh() returns false if the resource has been updated'); + } + + public function testIsFreshForDeletedResources() + { + $resource = new DirectoryResource($this->directory); + $this->removeDirectory($this->directory); + + $this->assertFalse($resource->isFresh(time()), '->isFresh() returns false if the resource does not exist'); + } + + public function testIsFreshUpdateFile() + { + $resource = new DirectoryResource($this->directory); + touch($this->directory.'/tmp.xml', time() + 20); + $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if an existing file is modified'); + } + + public function testIsFreshNewFile() + { + $resource = new DirectoryResource($this->directory); + touch($this->directory.'/new.xml', time() + 20); + $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if a new file is added'); + } + + public function testIsFreshNewFileWithDifferentPattern() + { + $resource = new DirectoryResource($this->directory, '/.xml$/'); + touch($this->directory.'/new.yaml', time() + 20); + $this->assertTrue($resource->isFresh(time() + 10), '->isFresh() returns true if a new file with a non-matching pattern is added'); + } + + public function testIsFreshDeleteFile() + { + $resource = new DirectoryResource($this->directory); + $time = time(); + sleep(1); + unlink($this->directory.'/tmp.xml'); + $this->assertFalse($resource->isFresh($time), '->isFresh() returns false if an existing file is removed'); + } + + public function testIsFreshDeleteDirectory() + { + $resource = new DirectoryResource($this->directory); + $this->removeDirectory($this->directory); + $this->assertFalse($resource->isFresh(time()), '->isFresh() returns false if the whole resource is removed'); + } + + public function testIsFreshCreateFileInSubdirectory() + { + $subdirectory = $this->directory.'/subdirectory'; + mkdir($subdirectory); + + $resource = new DirectoryResource($this->directory); + $this->assertTrue($resource->isFresh(time() + 10), '->isFresh() returns true if an unmodified subdirectory exists'); + + touch($subdirectory.'/newfile.xml', time() + 20); + $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if a new file in a subdirectory is added'); + } + + public function testIsFreshModifySubdirectory() + { + $resource = new DirectoryResource($this->directory); + + $subdirectory = $this->directory.'/subdirectory'; + mkdir($subdirectory); + touch($subdirectory, time() + 20); + + $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if a subdirectory is modified (e.g. a file gets deleted)'); + } + + public function testFilterRegexListNoMatch() + { + $resource = new DirectoryResource($this->directory, '/\.(foo|xml)$/'); + + touch($this->directory.'/new.bar', time() + 20); + $this->assertTrue($resource->isFresh(time() + 10), '->isFresh() returns true if a new file not matching the filter regex is created'); + } + + public function testFilterRegexListMatch() + { + $resource = new DirectoryResource($this->directory, '/\.(foo|xml)$/'); + + touch($this->directory.'/new.xml', time() + 20); + $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if an new file matching the filter regex is created '); + } + + public function testSerializeUnserialize() + { + $resource = new DirectoryResource($this->directory, '/\.(foo|xml)$/'); + + $unserialized = unserialize(serialize($resource)); + + $this->assertSame(realpath($this->directory), $resource->getResource()); + $this->assertSame('/\.(foo|xml)$/', $resource->getPattern()); + } + + public function testResourcesWithDifferentPatternsAreDifferent() + { + $resourceA = new DirectoryResource($this->directory, '/.xml$/'); + $resourceB = new DirectoryResource($this->directory, '/.yaml$/'); + + $this->assertEquals(2, count(array_unique(array($resourceA, $resourceB)))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..433f65e8203dbd65c2388297e033b3f83216b31a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Resource; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Resource\FileExistenceResource; + +class FileExistenceResourceTest extends TestCase +{ + protected $resource; + protected $file; + protected $time; + + protected function setUp() + { + $this->file = realpath(sys_get_temp_dir()).'/tmp.xml'; + $this->time = time(); + $this->resource = new FileExistenceResource($this->file); + } + + protected function tearDown() + { + if (file_exists($this->file)) { + unlink($this->file); + } + } + + public function testToString() + { + $this->assertSame($this->file, (string) $this->resource); + } + + public function testGetResource() + { + $this->assertSame($this->file, $this->resource->getResource(), '->getResource() returns the path to the resource'); + } + + public function testIsFreshWithExistingResource() + { + touch($this->file, $this->time); + $serialized = serialize(new FileExistenceResource($this->file)); + + $resource = unserialize($serialized); + $this->assertTrue($resource->isFresh($this->time), '->isFresh() returns true if the resource is still present'); + + unlink($this->file); + $resource = unserialize($serialized); + $this->assertFalse($resource->isFresh($this->time), '->isFresh() returns false if the resource has been deleted'); + } + + public function testIsFreshWithAbsentResource() + { + $serialized = serialize(new FileExistenceResource($this->file)); + + $resource = unserialize($serialized); + $this->assertTrue($resource->isFresh($this->time), '->isFresh() returns true if the resource is still absent'); + + touch($this->file, $this->time); + $resource = unserialize($serialized); + $this->assertFalse($resource->isFresh($this->time), '->isFresh() returns false if the resource has been created'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..97781ffabfcf196414196eb5e56fde1ce54cf72b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Resource; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Resource\FileResource; + +class FileResourceTest extends TestCase +{ + protected $resource; + protected $file; + protected $time; + + protected function setUp() + { + $this->file = sys_get_temp_dir().'/tmp.xml'; + $this->time = time(); + touch($this->file, $this->time); + $this->resource = new FileResource($this->file); + } + + protected function tearDown() + { + if (!file_exists($this->file)) { + return; + } + + unlink($this->file); + } + + public function testGetResource() + { + $this->assertSame(realpath($this->file), $this->resource->getResource(), '->getResource() returns the path to the resource'); + } + + public function testGetResourceWithScheme() + { + $resource = new FileResource('file://'.$this->file); + $this->assertSame('file://'.$this->file, $resource->getResource(), '->getResource() returns the path to the schemed resource'); + } + + public function testToString() + { + $this->assertSame(realpath($this->file), (string) $this->resource); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessageRegExp /The file ".*" does not exist./ + */ + public function testResourceDoesNotExist() + { + $resource = new FileResource('/____foo/foobar'.mt_rand(1, 999999)); + } + + public function testIsFresh() + { + $this->assertTrue($this->resource->isFresh($this->time), '->isFresh() returns true if the resource has not changed in same second'); + $this->assertTrue($this->resource->isFresh($this->time + 10), '->isFresh() returns true if the resource has not changed'); + $this->assertFalse($this->resource->isFresh($this->time - 86400), '->isFresh() returns false if the resource has been updated'); + } + + public function testIsFreshForDeletedResources() + { + unlink($this->file); + + $this->assertFalse($this->resource->isFresh($this->time), '->isFresh() returns false if the resource does not exist'); + } + + public function testSerializeUnserialize() + { + $unserialized = unserialize(serialize($this->resource)); + + $this->assertSame(realpath($this->file), $this->resource->getResource()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/ResourceStub.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/ResourceStub.php new file mode 100644 index 0000000000000000000000000000000000000000..b01729cbff8538e8e7d5a168d6bc6fb184ce6e50 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Resource/ResourceStub.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Resource; + +use Symfony\Component\Config\Resource\SelfCheckingResourceInterface; + +class ResourceStub implements SelfCheckingResourceInterface +{ + private $fresh = true; + + public function setFresh($isFresh) + { + $this->fresh = $isFresh; + } + + public function __toString() + { + return 'stub'; + } + + public function isFresh($timestamp) + { + return $this->fresh; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d39742ad88f8cf78c9ba02b45e14bbe495716443 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php @@ -0,0 +1,144 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Tests\Resource\ResourceStub; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Config\ResourceCheckerConfigCache; + +class ResourceCheckerConfigCacheTest extends TestCase +{ + private $cacheFile = null; + + protected function setUp() + { + $this->cacheFile = tempnam(sys_get_temp_dir(), 'config_'); + } + + protected function tearDown() + { + $files = array($this->cacheFile, "{$this->cacheFile}.meta"); + + foreach ($files as $file) { + if (file_exists($file)) { + unlink($file); + } + } + } + + public function testGetPath() + { + $cache = new ResourceCheckerConfigCache($this->cacheFile); + + $this->assertSame($this->cacheFile, $cache->getPath()); + } + + public function testCacheIsNotFreshIfEmpty() + { + $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock() + ->expects($this->never())->method('supports'); + + /* If there is nothing in the cache, it needs to be filled (and thus it's not fresh). + It does not matter if you provide checkers or not. */ + + unlink($this->cacheFile); // remove tempnam() side effect + $cache = new ResourceCheckerConfigCache($this->cacheFile, array($checker)); + + $this->assertFalse($cache->isFresh()); + } + + public function testCacheIsFreshIfNocheckerProvided() + { + /* For example in prod mode, you may choose not to run any checkers + at all. In that case, the cache should always be considered fresh. */ + $cache = new ResourceCheckerConfigCache($this->cacheFile); + $this->assertTrue($cache->isFresh()); + } + + public function testResourcesWithoutcheckersAreIgnoredAndConsideredFresh() + { + /* As in the previous test, but this time we have a resource. */ + $cache = new ResourceCheckerConfigCache($this->cacheFile); + $cache->write('', array(new ResourceStub())); + + $this->assertTrue($cache->isFresh()); // no (matching) ResourceChecker passed + } + + public function testIsFreshWithchecker() + { + $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock(); + + $checker->expects($this->once()) + ->method('supports') + ->willReturn(true); + + $checker->expects($this->once()) + ->method('isFresh') + ->willReturn(true); + + $cache = new ResourceCheckerConfigCache($this->cacheFile, array($checker)); + $cache->write('', array(new ResourceStub())); + + $this->assertTrue($cache->isFresh()); + } + + public function testIsNotFreshWithchecker() + { + $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock(); + + $checker->expects($this->once()) + ->method('supports') + ->willReturn(true); + + $checker->expects($this->once()) + ->method('isFresh') + ->willReturn(false); + + $cache = new ResourceCheckerConfigCache($this->cacheFile, array($checker)); + $cache->write('', array(new ResourceStub())); + + $this->assertFalse($cache->isFresh()); + } + + public function testCacheIsNotFreshWhenUnserializeFails() + { + $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock(); + $cache = new ResourceCheckerConfigCache($this->cacheFile, array($checker)); + $cache->write('foo', array(new FileResource(__FILE__))); + + $metaFile = "{$this->cacheFile}.meta"; + file_put_contents($metaFile, str_replace('FileResource', 'ClassNotHere', file_get_contents($metaFile))); + + $this->assertFalse($cache->isFresh()); + } + + public function testCacheKeepsContent() + { + $cache = new ResourceCheckerConfigCache($this->cacheFile); + $cache->write('FOOBAR'); + + $this->assertSame('FOOBAR', file_get_contents($cache->getPath())); + } + + public function testCacheIsNotFreshIfNotExistsMetaFile() + { + $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock(); + $cache = new ResourceCheckerConfigCache($this->cacheFile, array($checker)); + $cache->write('foo', array(new FileResource(__FILE__))); + + $metaFile = "{$this->cacheFile}.meta"; + unlink($metaFile); + + $this->assertFalse($cache->isFresh()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..161dc61721c125b6815142335a57ea3fe30d1a78 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php @@ -0,0 +1,203 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Util\XmlUtils; + +class XmlUtilsTest extends TestCase +{ + public function testLoadFile() + { + $fixtures = __DIR__.'/../Fixtures/Util/'; + + try { + XmlUtils::loadFile($fixtures.'invalid.xml'); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertContains('ERROR 77', $e->getMessage()); + } + + try { + XmlUtils::loadFile($fixtures.'document_type.xml'); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertContains('Document types are not allowed', $e->getMessage()); + } + + try { + XmlUtils::loadFile($fixtures.'invalid_schema.xml', $fixtures.'schema.xsd'); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertContains('ERROR 1845', $e->getMessage()); + } + + try { + XmlUtils::loadFile($fixtures.'invalid_schema.xml', 'invalid_callback_or_file'); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertContains('XSD file or callable', $e->getMessage()); + } + + $mock = $this->getMockBuilder(__NAMESPACE__.'\Validator')->getMock(); + $mock->expects($this->exactly(2))->method('validate')->will($this->onConsecutiveCalls(false, true)); + + try { + XmlUtils::loadFile($fixtures.'valid.xml', array($mock, 'validate')); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertContains('is not valid', $e->getMessage()); + } + + $this->assertInstanceOf('DOMDocument', XmlUtils::loadFile($fixtures.'valid.xml', array($mock, 'validate'))); + $this->assertSame(array(), libxml_get_errors()); + } + + public function testLoadFileWithInternalErrorsEnabled() + { + $internalErrors = libxml_use_internal_errors(true); + + $this->assertSame(array(), libxml_get_errors()); + $this->assertInstanceOf('DOMDocument', XmlUtils::loadFile(__DIR__.'/../Fixtures/Util/invalid_schema.xml')); + $this->assertSame(array(), libxml_get_errors()); + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + } + + /** + * @dataProvider getDataForConvertDomToArray + */ + public function testConvertDomToArray($expected, $xml, $root = false, $checkPrefix = true) + { + $dom = new \DOMDocument(); + $dom->loadXML($root ? $xml : ''.$xml.''); + + $this->assertSame($expected, XmlUtils::convertDomElementToArray($dom->documentElement, $checkPrefix)); + } + + public function getDataForConvertDomToArray() + { + return array( + array(null, ''), + array('bar', 'bar'), + array(array('bar' => 'foobar'), '', true), + array(array('foo' => null), ''), + array(array('foo' => 'bar'), 'bar'), + array(array('foo' => array('foo' => 'bar')), ''), + array(array('foo' => array('foo' => 0)), '0'), + array(array('foo' => array('foo' => 'bar')), 'bar'), + array(array('foo' => array('foo' => 'bar', 'value' => 'text')), 'text'), + array(array('foo' => array('attr' => 'bar', 'foo' => 'text')), 'text'), + array(array('foo' => array('bar', 'text')), 'bartext'), + array(array('foo' => array(array('foo' => 'bar'), array('foo' => 'text'))), ''), + array(array('foo' => array('foo' => array('bar', 'text'))), 'text'), + array(array('foo' => 'bar'), 'bar'), + array(array('foo' => 'text'), 'text'), + array(array('foo' => array('bar' => 'bar', 'value' => 'text')), 'text', false, false), + array(array('attr' => 1, 'b' => 'hello'), 'hello2', true), + ); + } + + /** + * @dataProvider getDataForPhpize + */ + public function testPhpize($expected, $value) + { + $this->assertSame($expected, XmlUtils::phpize($value)); + } + + public function getDataForPhpize() + { + return array( + array('', ''), + array(null, 'null'), + array(true, 'true'), + array(false, 'false'), + array(null, 'Null'), + array(true, 'True'), + array(false, 'False'), + array(0, '0'), + array(1, '1'), + array(-1, '-1'), + array(0777, '0777'), + array(255, '0xFF'), + array(100.0, '1e2'), + array(-120.0, '-1.2E2'), + array(-10100.1, '-10100.1'), + array('-10,100.1', '-10,100.1'), + array('1234 5678 9101 1121 3141', '1234 5678 9101 1121 3141'), + array('1,2,3,4', '1,2,3,4'), + array('11,22,33,44', '11,22,33,44'), + array('11,222,333,4', '11,222,333,4'), + array('1,222,333,444', '1,222,333,444'), + array('11,222,333,444', '11,222,333,444'), + array('111,222,333,444', '111,222,333,444'), + array('1111,2222,3333,4444,5555', '1111,2222,3333,4444,5555'), + array('foo', 'foo'), + array(6, '0b0110'), + ); + } + + public function testLoadEmptyXmlFile() + { + $file = __DIR__.'/../Fixtures/foo.xml'; + + if (method_exists($this, 'expectException')) { + $this->expectException('InvalidArgumentException'); + $this->expectExceptionMessage(sprintf('File %s does not contain valid XML, it is empty.', $file)); + } else { + $this->setExpectedException('InvalidArgumentException', sprintf('File %s does not contain valid XML, it is empty.', $file)); + } + + XmlUtils::loadFile($file); + } + + // test for issue https://github.com/symfony/symfony/issues/9731 + public function testLoadWrongEmptyXMLWithErrorHandler() + { + $originalDisableEntities = libxml_disable_entity_loader(false); + $errorReporting = error_reporting(-1); + + set_error_handler(function ($errno, $errstr) { + throw new \Exception($errstr, $errno); + }); + + $file = __DIR__.'/../Fixtures/foo.xml'; + try { + try { + XmlUtils::loadFile($file); + $this->fail('An exception should have been raised'); + } catch (\InvalidArgumentException $e) { + $this->assertEquals(sprintf('File %s does not contain valid XML, it is empty.', $file), $e->getMessage()); + } + } finally { + restore_error_handler(); + error_reporting($errorReporting); + } + + $disableEntities = libxml_disable_entity_loader(true); + libxml_disable_entity_loader($disableEntities); + + libxml_disable_entity_loader($originalDisableEntities); + + $this->assertFalse($disableEntities); + + // should not throw an exception + XmlUtils::loadFile(__DIR__.'/../Fixtures/Util/valid.xml', __DIR__.'/../Fixtures/Util/schema.xsd'); + } +} + +interface Validator +{ + public function validate(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php b/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php new file mode 100644 index 0000000000000000000000000000000000000000..25d9b0a0abe5d6ff2906b5f6ac5562433b9964a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php @@ -0,0 +1,238 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Util; + +/** + * XMLUtils is a bunch of utility methods to XML operations. + * + * This class contains static methods only and is not meant to be instantiated. + * + * @author Fabien Potencier + * @author Martin Hasoň + */ +class XmlUtils +{ + /** + * This class should not be instantiated. + */ + private function __construct() + { + } + + /** + * Loads an XML file. + * + * @param string $file An XML file path + * @param string|callable|null $schemaOrCallable An XSD schema file path, a callable, or null to disable validation + * + * @return \DOMDocument + * + * @throws \InvalidArgumentException When loading of XML file returns error + */ + public static function loadFile($file, $schemaOrCallable = null) + { + $content = @file_get_contents($file); + if ('' === trim($content)) { + throw new \InvalidArgumentException(sprintf('File %s does not contain valid XML, it is empty.', $file)); + } + + $internalErrors = libxml_use_internal_errors(true); + $disableEntities = libxml_disable_entity_loader(true); + libxml_clear_errors(); + + $dom = new \DOMDocument(); + $dom->validateOnParse = true; + if (!$dom->loadXML($content, LIBXML_NONET | (defined('LIBXML_COMPACT') ? LIBXML_COMPACT : 0))) { + libxml_disable_entity_loader($disableEntities); + + throw new \InvalidArgumentException(implode("\n", static::getXmlErrors($internalErrors))); + } + + $dom->normalizeDocument(); + + libxml_use_internal_errors($internalErrors); + libxml_disable_entity_loader($disableEntities); + + foreach ($dom->childNodes as $child) { + if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) { + throw new \InvalidArgumentException('Document types are not allowed.'); + } + } + + if (null !== $schemaOrCallable) { + $internalErrors = libxml_use_internal_errors(true); + libxml_clear_errors(); + + $e = null; + if (is_callable($schemaOrCallable)) { + try { + $valid = call_user_func($schemaOrCallable, $dom, $internalErrors); + } catch (\Exception $e) { + $valid = false; + } + } elseif (!is_array($schemaOrCallable) && is_file((string) $schemaOrCallable)) { + $schemaSource = file_get_contents((string) $schemaOrCallable); + $valid = @$dom->schemaValidateSource($schemaSource); + } else { + libxml_use_internal_errors($internalErrors); + + throw new \InvalidArgumentException('The schemaOrCallable argument has to be a valid path to XSD file or callable.'); + } + + if (!$valid) { + $messages = static::getXmlErrors($internalErrors); + if (empty($messages)) { + $messages = array(sprintf('The XML file "%s" is not valid.', $file)); + } + throw new \InvalidArgumentException(implode("\n", $messages), 0, $e); + } + } + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + + return $dom; + } + + /** + * Converts a \DomElement object to a PHP array. + * + * The following rules applies during the conversion: + * + * * Each tag is converted to a key value or an array + * if there is more than one "value" + * + * * The content of a tag is set under a "value" key (bar) + * if the tag also has some nested tags + * + * * The attributes are converted to keys () + * + * * The nested-tags are converted to keys (bar) + * + * @param \DomElement $element A \DomElement instance + * @param bool $checkPrefix Check prefix in an element or an attribute name + * + * @return array A PHP array + */ + public static function convertDomElementToArray(\DOMElement $element, $checkPrefix = true) + { + $prefix = (string) $element->prefix; + $empty = true; + $config = array(); + foreach ($element->attributes as $name => $node) { + if ($checkPrefix && !in_array((string) $node->prefix, array('', $prefix), true)) { + continue; + } + $config[$name] = static::phpize($node->value); + $empty = false; + } + + $nodeValue = false; + foreach ($element->childNodes as $node) { + if ($node instanceof \DOMText) { + if ('' !== trim($node->nodeValue)) { + $nodeValue = trim($node->nodeValue); + $empty = false; + } + } elseif ($checkPrefix && $prefix != (string) $node->prefix) { + continue; + } elseif (!$node instanceof \DOMComment) { + $value = static::convertDomElementToArray($node, $checkPrefix); + + $key = $node->localName; + if (isset($config[$key])) { + if (!is_array($config[$key]) || !is_int(key($config[$key]))) { + $config[$key] = array($config[$key]); + } + $config[$key][] = $value; + } else { + $config[$key] = $value; + } + + $empty = false; + } + } + + if (false !== $nodeValue) { + $value = static::phpize($nodeValue); + if (count($config)) { + $config['value'] = $value; + } else { + $config = $value; + } + } + + return !$empty ? $config : null; + } + + /** + * Converts an xml value to a PHP type. + * + * @param mixed $value + * + * @return mixed + */ + public static function phpize($value) + { + $value = (string) $value; + $lowercaseValue = strtolower($value); + + switch (true) { + case 'null' === $lowercaseValue: + return; + case ctype_digit($value): + $raw = $value; + $cast = (int) $value; + + return '0' == $value[0] ? octdec($value) : (((string) $raw === (string) $cast) ? $cast : $raw); + case isset($value[1]) && '-' === $value[0] && ctype_digit(substr($value, 1)): + $raw = $value; + $cast = (int) $value; + + return '0' == $value[1] ? octdec($value) : (((string) $raw === (string) $cast) ? $cast : $raw); + case 'true' === $lowercaseValue: + return true; + case 'false' === $lowercaseValue: + return false; + case isset($value[1]) && '0b' == $value[0].$value[1]: + return bindec($value); + case is_numeric($value): + return '0x' === $value[0].$value[1] ? hexdec($value) : (float) $value; + case preg_match('/^0x[0-9a-f]++$/i', $value): + return hexdec($value); + case preg_match('/^(-|\+)?[0-9]+(\.[0-9]+)?$/', $value): + return (float) $value; + default: + return $value; + } + } + + protected static function getXmlErrors($internalErrors) + { + $errors = array(); + foreach (libxml_get_errors() as $error) { + $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)', + LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', + $error->code, + trim($error->message), + $error->file ?: 'n/a', + $error->line, + $error->column + ); + } + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + + return $errors; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Config/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..2de34d92e937473e5b68b64680bc4e4f4f60b76b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/composer.json @@ -0,0 +1,40 @@ +{ + "name": "symfony/config", + "type": "library", + "description": "Symfony Config Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/filesystem": "~2.8|~3.0" + }, + "require-dev": { + "symfony/yaml": "~3.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Config\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Config/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Config/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..3fe6fd87c849980c13b47d183dcf1c5bf6be241f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Config/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php new file mode 100644 index 0000000000000000000000000000000000000000..2eca8b6b10b3ff5ce3d9b62cb6393e9c31d6ab04 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php @@ -0,0 +1,1104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console; + +use Symfony\Component\Console\Exception\ExceptionInterface; +use Symfony\Component\Console\Helper\DebugFormatterHelper; +use Symfony\Component\Console\Helper\ProcessHelper; +use Symfony\Component\Console\Helper\QuestionHelper; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\StreamableInputInterface; +use Symfony\Component\Console\Input\ArgvInput; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputAwareInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Output\ConsoleOutput; +use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Command\HelpCommand; +use Symfony\Component\Console\Command\ListCommand; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Helper\FormatterHelper; +use Symfony\Component\Console\Event\ConsoleCommandEvent; +use Symfony\Component\Console\Event\ConsoleExceptionEvent; +use Symfony\Component\Console\Event\ConsoleTerminateEvent; +use Symfony\Component\Console\Exception\CommandNotFoundException; +use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Debug\Exception\FatalThrowableError; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * An Application is the container for a collection of commands. + * + * It is the main entry point of a Console application. + * + * This class is optimized for a standard CLI environment. + * + * Usage: + * + * $app = new Application('myapp', '1.0 (stable)'); + * $app->add(new SimpleCommand()); + * $app->run(); + * + * @author Fabien Potencier + */ +class Application +{ + private $commands = array(); + private $wantHelps = false; + private $runningCommand; + private $name; + private $version; + private $catchExceptions = true; + private $autoExit = true; + private $definition; + private $helperSet; + private $dispatcher; + private $terminal; + private $defaultCommand; + private $singleCommand; + + /** + * @param string $name The name of the application + * @param string $version The version of the application + */ + public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') + { + $this->name = $name; + $this->version = $version; + $this->terminal = new Terminal(); + $this->defaultCommand = 'list'; + $this->helperSet = $this->getDefaultHelperSet(); + $this->definition = $this->getDefaultInputDefinition(); + + foreach ($this->getDefaultCommands() as $command) { + $this->add($command); + } + } + + public function setDispatcher(EventDispatcherInterface $dispatcher) + { + $this->dispatcher = $dispatcher; + } + + /** + * Runs the current application. + * + * @param InputInterface $input An Input instance + * @param OutputInterface $output An Output instance + * + * @return int 0 if everything went fine, or an error code + */ + public function run(InputInterface $input = null, OutputInterface $output = null) + { + putenv('LINES='.$this->terminal->getHeight()); + putenv('COLUMNS='.$this->terminal->getWidth()); + + if (null === $input) { + $input = new ArgvInput(); + } + + if (null === $output) { + $output = new ConsoleOutput(); + } + + $this->configureIO($input, $output); + + try { + $exitCode = $this->doRun($input, $output); + } catch (\Exception $e) { + if (!$this->catchExceptions) { + throw $e; + } + + if ($output instanceof ConsoleOutputInterface) { + $this->renderException($e, $output->getErrorOutput()); + } else { + $this->renderException($e, $output); + } + + $exitCode = $e->getCode(); + if (is_numeric($exitCode)) { + $exitCode = (int) $exitCode; + if (0 === $exitCode) { + $exitCode = 1; + } + } else { + $exitCode = 1; + } + } + + if ($this->autoExit) { + if ($exitCode > 255) { + $exitCode = 255; + } + + exit($exitCode); + } + + return $exitCode; + } + + /** + * Runs the current application. + * + * @param InputInterface $input An Input instance + * @param OutputInterface $output An Output instance + * + * @return int 0 if everything went fine, or an error code + */ + public function doRun(InputInterface $input, OutputInterface $output) + { + if (true === $input->hasParameterOption(array('--version', '-V'), true)) { + $output->writeln($this->getLongVersion()); + + return 0; + } + + $name = $this->getCommandName($input); + if (true === $input->hasParameterOption(array('--help', '-h'), true)) { + if (!$name) { + $name = 'help'; + $input = new ArrayInput(array('command_name' => $this->defaultCommand)); + } else { + $this->wantHelps = true; + } + } + + if (!$name) { + $name = $this->defaultCommand; + $input = new ArrayInput(array('command' => $this->defaultCommand)); + } + + // the command name MUST be the first element of the input + $command = $this->find($name); + + $this->runningCommand = $command; + $exitCode = $this->doRunCommand($command, $input, $output); + $this->runningCommand = null; + + return $exitCode; + } + + /** + * Set a helper set to be used with the command. + * + * @param HelperSet $helperSet The helper set + */ + public function setHelperSet(HelperSet $helperSet) + { + $this->helperSet = $helperSet; + } + + /** + * Get the helper set associated with the command. + * + * @return HelperSet The HelperSet instance associated with this command + */ + public function getHelperSet() + { + return $this->helperSet; + } + + /** + * Set an input definition to be used with this application. + * + * @param InputDefinition $definition The input definition + */ + public function setDefinition(InputDefinition $definition) + { + $this->definition = $definition; + } + + /** + * Gets the InputDefinition related to this Application. + * + * @return InputDefinition The InputDefinition instance + */ + public function getDefinition() + { + if ($this->singleCommand) { + $inputDefinition = $this->definition; + $inputDefinition->setArguments(); + + return $inputDefinition; + } + + return $this->definition; + } + + /** + * Gets the help message. + * + * @return string A help message + */ + public function getHelp() + { + return $this->getLongVersion(); + } + + /** + * Gets whether to catch exceptions or not during commands execution. + * + * @return bool Whether to catch exceptions or not during commands execution + */ + public function areExceptionsCaught() + { + return $this->catchExceptions; + } + + /** + * Sets whether to catch exceptions or not during commands execution. + * + * @param bool $boolean Whether to catch exceptions or not during commands execution + */ + public function setCatchExceptions($boolean) + { + $this->catchExceptions = (bool) $boolean; + } + + /** + * Gets whether to automatically exit after a command execution or not. + * + * @return bool Whether to automatically exit after a command execution or not + */ + public function isAutoExitEnabled() + { + return $this->autoExit; + } + + /** + * Sets whether to automatically exit after a command execution or not. + * + * @param bool $boolean Whether to automatically exit after a command execution or not + */ + public function setAutoExit($boolean) + { + $this->autoExit = (bool) $boolean; + } + + /** + * Gets the name of the application. + * + * @return string The application name + */ + public function getName() + { + return $this->name; + } + + /** + * Sets the application name. + * + * @param string $name The application name + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * Gets the application version. + * + * @return string The application version + */ + public function getVersion() + { + return $this->version; + } + + /** + * Sets the application version. + * + * @param string $version The application version + */ + public function setVersion($version) + { + $this->version = $version; + } + + /** + * Returns the long version of the application. + * + * @return string The long application version + */ + public function getLongVersion() + { + if ('UNKNOWN' !== $this->getName()) { + if ('UNKNOWN' !== $this->getVersion()) { + return sprintf('%s %s', $this->getName(), $this->getVersion()); + } + + return $this->getName(); + } + + return 'Console Tool'; + } + + /** + * Registers a new command. + * + * @param string $name The command name + * + * @return Command The newly created command + */ + public function register($name) + { + return $this->add(new Command($name)); + } + + /** + * Adds an array of command objects. + * + * If a Command is not enabled it will not be added. + * + * @param Command[] $commands An array of commands + */ + public function addCommands(array $commands) + { + foreach ($commands as $command) { + $this->add($command); + } + } + + /** + * Adds a command object. + * + * If a command with the same name already exists, it will be overridden. + * If the command is not enabled it will not be added. + * + * @param Command $command A Command object + * + * @return Command|null The registered command if enabled or null + */ + public function add(Command $command) + { + $command->setApplication($this); + + if (!$command->isEnabled()) { + $command->setApplication(null); + + return; + } + + if (null === $command->getDefinition()) { + throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', get_class($command))); + } + + $this->commands[$command->getName()] = $command; + + foreach ($command->getAliases() as $alias) { + $this->commands[$alias] = $command; + } + + return $command; + } + + /** + * Returns a registered command by name or alias. + * + * @param string $name The command name or alias + * + * @return Command A Command object + * + * @throws CommandNotFoundException When given command name does not exist + */ + public function get($name) + { + if (!isset($this->commands[$name])) { + throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name)); + } + + $command = $this->commands[$name]; + + if ($this->wantHelps) { + $this->wantHelps = false; + + $helpCommand = $this->get('help'); + $helpCommand->setCommand($command); + + return $helpCommand; + } + + return $command; + } + + /** + * Returns true if the command exists, false otherwise. + * + * @param string $name The command name or alias + * + * @return bool true if the command exists, false otherwise + */ + public function has($name) + { + return isset($this->commands[$name]); + } + + /** + * Returns an array of all unique namespaces used by currently registered commands. + * + * It does not return the global namespace which always exists. + * + * @return string[] An array of namespaces + */ + public function getNamespaces() + { + $namespaces = array(); + foreach ($this->all() as $command) { + $namespaces = array_merge($namespaces, $this->extractAllNamespaces($command->getName())); + + foreach ($command->getAliases() as $alias) { + $namespaces = array_merge($namespaces, $this->extractAllNamespaces($alias)); + } + } + + return array_values(array_unique(array_filter($namespaces))); + } + + /** + * Finds a registered namespace by a name or an abbreviation. + * + * @param string $namespace A namespace or abbreviation to search for + * + * @return string A registered namespace + * + * @throws CommandNotFoundException When namespace is incorrect or ambiguous + */ + public function findNamespace($namespace) + { + $allNamespaces = $this->getNamespaces(); + $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $namespace); + $namespaces = preg_grep('{^'.$expr.'}', $allNamespaces); + + if (empty($namespaces)) { + $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace); + + if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) { + if (1 == count($alternatives)) { + $message .= "\n\nDid you mean this?\n "; + } else { + $message .= "\n\nDid you mean one of these?\n "; + } + + $message .= implode("\n ", $alternatives); + } + + throw new CommandNotFoundException($message, $alternatives); + } + + $exact = in_array($namespace, $namespaces, true); + if (count($namespaces) > 1 && !$exact) { + throw new CommandNotFoundException(sprintf('The namespace "%s" is ambiguous (%s).', $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces)); + } + + return $exact ? $namespace : reset($namespaces); + } + + /** + * Finds a command by name or alias. + * + * Contrary to get, this command tries to find the best + * match if you give it an abbreviation of a name or alias. + * + * @param string $name A command name or a command alias + * + * @return Command A Command instance + * + * @throws CommandNotFoundException When command name is incorrect or ambiguous + */ + public function find($name) + { + $allCommands = array_keys($this->commands); + $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name); + $commands = preg_grep('{^'.$expr.'}', $allCommands); + + if (empty($commands) || count(preg_grep('{^'.$expr.'$}', $commands)) < 1) { + if (false !== $pos = strrpos($name, ':')) { + // check if a namespace exists and contains commands + $this->findNamespace(substr($name, 0, $pos)); + } + + $message = sprintf('Command "%s" is not defined.', $name); + + if ($alternatives = $this->findAlternatives($name, $allCommands)) { + if (1 == count($alternatives)) { + $message .= "\n\nDid you mean this?\n "; + } else { + $message .= "\n\nDid you mean one of these?\n "; + } + $message .= implode("\n ", $alternatives); + } + + throw new CommandNotFoundException($message, $alternatives); + } + + // filter out aliases for commands which are already on the list + if (count($commands) > 1) { + $commandList = $this->commands; + $commands = array_filter($commands, function ($nameOrAlias) use ($commandList, $commands) { + $commandName = $commandList[$nameOrAlias]->getName(); + + return $commandName === $nameOrAlias || !in_array($commandName, $commands); + }); + } + + $exact = in_array($name, $commands, true); + if (count($commands) > 1 && !$exact) { + $suggestions = $this->getAbbreviationSuggestions(array_values($commands)); + + throw new CommandNotFoundException(sprintf('Command "%s" is ambiguous (%s).', $name, $suggestions), array_values($commands)); + } + + return $this->get($exact ? $name : reset($commands)); + } + + /** + * Gets the commands (registered in the given namespace if provided). + * + * The array keys are the full names and the values the command instances. + * + * @param string $namespace A namespace name + * + * @return Command[] An array of Command instances + */ + public function all($namespace = null) + { + if (null === $namespace) { + return $this->commands; + } + + $commands = array(); + foreach ($this->commands as $name => $command) { + if ($namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1)) { + $commands[$name] = $command; + } + } + + return $commands; + } + + /** + * Returns an array of possible abbreviations given a set of names. + * + * @param array $names An array of names + * + * @return array An array of abbreviations + */ + public static function getAbbreviations($names) + { + $abbrevs = array(); + foreach ($names as $name) { + for ($len = strlen($name); $len > 0; --$len) { + $abbrev = substr($name, 0, $len); + $abbrevs[$abbrev][] = $name; + } + } + + return $abbrevs; + } + + /** + * Renders a caught exception. + * + * @param \Exception $e An exception instance + * @param OutputInterface $output An OutputInterface instance + */ + public function renderException(\Exception $e, OutputInterface $output) + { + $output->writeln('', OutputInterface::VERBOSITY_QUIET); + + do { + $title = sprintf( + ' [%s%s] ', + get_class($e), + $output->isVerbose() && 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : '' + ); + + $len = $this->stringWidth($title); + + $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : PHP_INT_MAX; + // HHVM only accepts 32 bits integer in str_split, even when PHP_INT_MAX is a 64 bit integer: https://github.com/facebook/hhvm/issues/1327 + if (defined('HHVM_VERSION') && $width > 1 << 31) { + $width = 1 << 31; + } + $formatter = $output->getFormatter(); + $lines = array(); + foreach (preg_split('/\r?\n/', $e->getMessage()) as $line) { + foreach ($this->splitStringByWidth($line, $width - 4) as $line) { + // pre-format lines to get the right string length + $lineLength = $this->stringWidth(preg_replace('/\[[^m]*m/', '', $formatter->format($line))) + 4; + $lines[] = array($line, $lineLength); + + $len = max($lineLength, $len); + } + } + + $messages = array(); + $messages[] = $emptyLine = $formatter->format(sprintf('%s', str_repeat(' ', $len))); + $messages[] = $formatter->format(sprintf('%s%s', $title, str_repeat(' ', max(0, $len - $this->stringWidth($title))))); + foreach ($lines as $line) { + $messages[] = $formatter->format(sprintf(' %s %s', $line[0], str_repeat(' ', $len - $line[1]))); + } + $messages[] = $emptyLine; + $messages[] = ''; + + $output->writeln($messages, OutputInterface::OUTPUT_RAW | OutputInterface::VERBOSITY_QUIET); + + if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { + $output->writeln('Exception trace:', OutputInterface::VERBOSITY_QUIET); + + // exception related properties + $trace = $e->getTrace(); + array_unshift($trace, array( + 'function' => '', + 'file' => $e->getFile() !== null ? $e->getFile() : 'n/a', + 'line' => $e->getLine() !== null ? $e->getLine() : 'n/a', + 'args' => array(), + )); + + for ($i = 0, $count = count($trace); $i < $count; ++$i) { + $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; + $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : ''; + $function = $trace[$i]['function']; + $file = isset($trace[$i]['file']) ? $trace[$i]['file'] : 'n/a'; + $line = isset($trace[$i]['line']) ? $trace[$i]['line'] : 'n/a'; + + $output->writeln(sprintf(' %s%s%s() at %s:%s', $class, $type, $function, $file, $line), OutputInterface::VERBOSITY_QUIET); + } + + $output->writeln('', OutputInterface::VERBOSITY_QUIET); + } + } while ($e = $e->getPrevious()); + + if (null !== $this->runningCommand) { + $output->writeln(sprintf('%s', sprintf($this->runningCommand->getSynopsis(), $this->getName())), OutputInterface::VERBOSITY_QUIET); + $output->writeln('', OutputInterface::VERBOSITY_QUIET); + } + } + + /** + * Tries to figure out the terminal width in which this application runs. + * + * @return int|null + * + * @deprecated since version 3.2, to be removed in 4.0. Create a Terminal instance instead. + */ + protected function getTerminalWidth() + { + @trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED); + + return $this->terminal->getWidth(); + } + + /** + * Tries to figure out the terminal height in which this application runs. + * + * @return int|null + * + * @deprecated since version 3.2, to be removed in 4.0. Create a Terminal instance instead. + */ + protected function getTerminalHeight() + { + @trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED); + + return $this->terminal->getHeight(); + } + + /** + * Tries to figure out the terminal dimensions based on the current environment. + * + * @return array Array containing width and height + * + * @deprecated since version 3.2, to be removed in 4.0. Create a Terminal instance instead. + */ + public function getTerminalDimensions() + { + @trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED); + + return array($this->terminal->getWidth(), $this->terminal->getHeight()); + } + + /** + * Sets terminal dimensions. + * + * Can be useful to force terminal dimensions for functional tests. + * + * @param int $width The width + * @param int $height The height + * + * @return $this + * + * @deprecated since version 3.2, to be removed in 4.0. Set the COLUMNS and LINES env vars instead. + */ + public function setTerminalDimensions($width, $height) + { + @trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Set the COLUMNS and LINES env vars instead.', __METHOD__), E_USER_DEPRECATED); + + putenv('COLUMNS='.$width); + putenv('LINES='.$height); + + return $this; + } + + /** + * Configures the input and output instances based on the user arguments and options. + * + * @param InputInterface $input An InputInterface instance + * @param OutputInterface $output An OutputInterface instance + */ + protected function configureIO(InputInterface $input, OutputInterface $output) + { + if (true === $input->hasParameterOption(array('--ansi'), true)) { + $output->setDecorated(true); + } elseif (true === $input->hasParameterOption(array('--no-ansi'), true)) { + $output->setDecorated(false); + } + + if (true === $input->hasParameterOption(array('--no-interaction', '-n'), true)) { + $input->setInteractive(false); + } elseif (function_exists('posix_isatty')) { + $inputStream = null; + + if ($input instanceof StreamableInputInterface) { + $inputStream = $input->getStream(); + } + + // This check ensures that calling QuestionHelper::setInputStream() works + // To be removed in 4.0 (in the same time as QuestionHelper::setInputStream) + if (!$inputStream && $this->getHelperSet()->has('question')) { + $inputStream = $this->getHelperSet()->get('question')->getInputStream(false); + } + + if (!@posix_isatty($inputStream) && false === getenv('SHELL_INTERACTIVE')) { + $input->setInteractive(false); + } + } + + if (true === $input->hasParameterOption(array('--quiet', '-q'), true)) { + $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); + $input->setInteractive(false); + } else { + if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || $input->getParameterOption('--verbose', false, true) === 3) { + $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); + } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || $input->getParameterOption('--verbose', false, true) === 2) { + $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); + } elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) { + $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); + } + } + } + + /** + * Runs the current command. + * + * If an event dispatcher has been attached to the application, + * events are also dispatched during the life-cycle of the command. + * + * @param Command $command A Command instance + * @param InputInterface $input An Input instance + * @param OutputInterface $output An Output instance + * + * @return int 0 if everything went fine, or an error code + */ + protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) + { + foreach ($command->getHelperSet() as $helper) { + if ($helper instanceof InputAwareInterface) { + $helper->setInput($input); + } + } + + if (null === $this->dispatcher) { + try { + return $command->run($input, $output); + } catch (\Exception $e) { + throw $e; + } catch (\Throwable $e) { + throw new FatalThrowableError($e); + } + } + + // bind before the console.command event, so the listeners have access to input options/arguments + try { + $command->mergeApplicationDefinition(); + $input->bind($command->getDefinition()); + } catch (ExceptionInterface $e) { + // ignore invalid options/arguments for now, to allow the event listeners to customize the InputDefinition + } + + // don't bind the input again as it would override any input argument/option set from the command event in + // addition to being useless + $command->setInputBound(true); + + $event = new ConsoleCommandEvent($command, $input, $output); + $this->dispatcher->dispatch(ConsoleEvents::COMMAND, $event); + + if ($event->commandShouldRun()) { + try { + $e = null; + $exitCode = $command->run($input, $output); + } catch (\Exception $x) { + $e = $x; + } catch (\Throwable $x) { + $e = new FatalThrowableError($x); + } + if (null !== $e) { + $event = new ConsoleExceptionEvent($command, $input, $output, $e, $e->getCode()); + $this->dispatcher->dispatch(ConsoleEvents::EXCEPTION, $event); + + if ($e !== $event->getException()) { + $x = $e = $event->getException(); + } + + $event = new ConsoleTerminateEvent($command, $input, $output, $e->getCode()); + $this->dispatcher->dispatch(ConsoleEvents::TERMINATE, $event); + + throw $x; + } + } else { + $exitCode = ConsoleCommandEvent::RETURN_CODE_DISABLED; + } + + $event = new ConsoleTerminateEvent($command, $input, $output, $exitCode); + $this->dispatcher->dispatch(ConsoleEvents::TERMINATE, $event); + + return $event->getExitCode(); + } + + /** + * Gets the name of the command based on input. + * + * @param InputInterface $input The input interface + * + * @return string The command name + */ + protected function getCommandName(InputInterface $input) + { + return $this->singleCommand ? $this->defaultCommand : $input->getFirstArgument(); + } + + /** + * Gets the default input definition. + * + * @return InputDefinition An InputDefinition instance + */ + protected function getDefaultInputDefinition() + { + return new InputDefinition(array( + new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), + + new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'), + new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'), + new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'), + new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'), + new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'), + new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'), + new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'), + )); + } + + /** + * Gets the default commands that should always be available. + * + * @return Command[] An array of default Command instances + */ + protected function getDefaultCommands() + { + return array(new HelpCommand(), new ListCommand()); + } + + /** + * Gets the default helper set with the helpers that should always be available. + * + * @return HelperSet A HelperSet instance + */ + protected function getDefaultHelperSet() + { + return new HelperSet(array( + new FormatterHelper(), + new DebugFormatterHelper(), + new ProcessHelper(), + new QuestionHelper(), + )); + } + + /** + * Returns abbreviated suggestions in string format. + * + * @param array $abbrevs Abbreviated suggestions to convert + * + * @return string A formatted string of abbreviated suggestions + */ + private function getAbbreviationSuggestions($abbrevs) + { + return sprintf('%s, %s%s', $abbrevs[0], $abbrevs[1], count($abbrevs) > 2 ? sprintf(' and %d more', count($abbrevs) - 2) : ''); + } + + /** + * Returns the namespace part of the command name. + * + * This method is not part of public API and should not be used directly. + * + * @param string $name The full name of the command + * @param string $limit The maximum number of parts of the namespace + * + * @return string The namespace of the command + */ + public function extractNamespace($name, $limit = null) + { + $parts = explode(':', $name); + array_pop($parts); + + return implode(':', null === $limit ? $parts : array_slice($parts, 0, $limit)); + } + + /** + * Finds alternative of $name among $collection, + * if nothing is found in $collection, try in $abbrevs. + * + * @param string $name The string + * @param array|\Traversable $collection The collection + * + * @return string[] A sorted array of similar string + */ + private function findAlternatives($name, $collection) + { + $threshold = 1e3; + $alternatives = array(); + + $collectionParts = array(); + foreach ($collection as $item) { + $collectionParts[$item] = explode(':', $item); + } + + foreach (explode(':', $name) as $i => $subname) { + foreach ($collectionParts as $collectionName => $parts) { + $exists = isset($alternatives[$collectionName]); + if (!isset($parts[$i]) && $exists) { + $alternatives[$collectionName] += $threshold; + continue; + } elseif (!isset($parts[$i])) { + continue; + } + + $lev = levenshtein($subname, $parts[$i]); + if ($lev <= strlen($subname) / 3 || '' !== $subname && false !== strpos($parts[$i], $subname)) { + $alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev; + } elseif ($exists) { + $alternatives[$collectionName] += $threshold; + } + } + } + + foreach ($collection as $item) { + $lev = levenshtein($name, $item); + if ($lev <= strlen($name) / 3 || false !== strpos($item, $name)) { + $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev; + } + } + + $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; }); + asort($alternatives); + + return array_keys($alternatives); + } + + /** + * Sets the default Command name. + * + * @param string $commandName The Command name + * @param bool $isSingleCommand Set to true if there is only one command in this application + * + * @return self + */ + public function setDefaultCommand($commandName, $isSingleCommand = false) + { + $this->defaultCommand = $commandName; + + if ($isSingleCommand) { + // Ensure the command exist + $this->find($commandName); + + $this->singleCommand = true; + } + + return $this; + } + + private function stringWidth($string) + { + if (false === $encoding = mb_detect_encoding($string, null, true)) { + return strlen($string); + } + + return mb_strwidth($string, $encoding); + } + + private function splitStringByWidth($string, $width) + { + // str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly. + // additionally, array_slice() is not enough as some character has doubled width. + // we need a function to split string not by character count but by string width + if (false === $encoding = mb_detect_encoding($string, null, true)) { + return str_split($string, $width); + } + + $utf8String = mb_convert_encoding($string, 'utf8', $encoding); + $lines = array(); + $line = ''; + foreach (preg_split('//u', $utf8String) as $char) { + // test if $char could be appended to current line + if (mb_strwidth($line.$char, 'utf8') <= $width) { + $line .= $char; + continue; + } + // if not, push current line to array and make new line + $lines[] = str_pad($line, $width); + $line = $char; + } + if ('' !== $line) { + $lines[] = count($lines) ? str_pad($line, $width) : $line; + } + + mb_convert_variables($encoding, 'utf8', $lines); + + return $lines; + } + + /** + * Returns all namespaces of the command name. + * + * @param string $name The full name of the command + * + * @return string[] The namespaces of the command + */ + private function extractAllNamespaces($name) + { + // -1 as third argument is needed to skip the command short name when exploding + $parts = explode(':', $name, -1); + $namespaces = array(); + + foreach ($parts as $part) { + if (count($namespaces)) { + $namespaces[] = end($namespaces).':'.$part; + } else { + $namespaces[] = $part; + } + } + + return $namespaces; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Console/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..a97a4a7ad4a2b8e0448d4d7a0d35b7f8dc44e019 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/CHANGELOG.md @@ -0,0 +1,87 @@ +CHANGELOG +========= + +3.2.0 +------ + +* added `setInputs()` method to CommandTester for ease testing of commands expecting inputs +* added `setStream()` and `getStream()` methods to Input (implement StreamableInputInterface) +* added StreamableInputInterface +* added LockableTrait + +3.1.0 +----- + + * added truncate method to FormatterHelper + * added setColumnWidth(s) method to Table + +2.8.3 +----- + + * remove readline support from the question helper as it caused issues + +2.8.0 +----- + + * use readline for user input in the question helper when available to allow + the use of arrow keys + +2.6.0 +----- + + * added a Process helper + * added a DebugFormatter helper + +2.5.0 +----- + + * deprecated the dialog helper (use the question helper instead) + * deprecated TableHelper in favor of Table + * deprecated ProgressHelper in favor of ProgressBar + * added ConsoleLogger + * added a question helper + * added a way to set the process name of a command + * added a way to set a default command instead of `ListCommand` + +2.4.0 +----- + + * added a way to force terminal dimensions + * added a convenient method to detect verbosity level + * [BC BREAK] made descriptors use output instead of returning a string + +2.3.0 +----- + + * added multiselect support to the select dialog helper + * added Table Helper for tabular data rendering + * added support for events in `Application` + * added a way to normalize EOLs in `ApplicationTester::getDisplay()` and `CommandTester::getDisplay()` + * added a way to set the progress bar progress via the `setCurrent` method + * added support for multiple InputOption shortcuts, written as `'-a|-b|-c'` + * added two additional verbosity levels, VERBOSITY_VERY_VERBOSE and VERBOSITY_DEBUG + +2.2.0 +----- + + * added support for colorization on Windows via ConEmu + * add a method to Dialog Helper to ask for a question and hide the response + * added support for interactive selections in console (DialogHelper::select()) + * added support for autocompletion as you type in Dialog Helper + +2.1.0 +----- + + * added ConsoleOutputInterface + * added the possibility to disable a command (Command::isEnabled()) + * added suggestions when a command does not exist + * added a --raw option to the list command + * added support for STDERR in the console output class (errors are now sent + to STDERR) + * made the defaults (helper set, commands, input definition) in Application + more easily customizable + * added support for the shell even if readline is not available + * added support for process isolation in Symfony shell via + `--process-isolation` switch + * added support for `--`, which disables options parsing after that point + (tokens will be parsed as arguments) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php new file mode 100644 index 0000000000000000000000000000000000000000..f2d881170e2e4409ddedc983b07722e255c3fd79 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php @@ -0,0 +1,678 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Command; + +use Symfony\Component\Console\Exception\ExceptionInterface; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\LogicException; + +/** + * Base class for all commands. + * + * @author Fabien Potencier + */ +class Command +{ + private $application; + private $name; + private $processTitle; + private $aliases = array(); + private $definition; + private $hidden = false; + private $help; + private $description; + private $ignoreValidationErrors = false; + private $applicationDefinitionMerged = false; + private $applicationDefinitionMergedWithArgs = false; + private $inputBound = false; + private $code; + private $synopsis = array(); + private $usages = array(); + private $helperSet; + + /** + * Constructor. + * + * @param string|null $name The name of the command; passing null means it must be set in configure() + * + * @throws LogicException When the command name is empty + */ + public function __construct($name = null) + { + $this->definition = new InputDefinition(); + + if (null !== $name) { + $this->setName($name); + } + + $this->configure(); + + if (!$this->name) { + throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($this))); + } + } + + /** + * Ignores validation errors. + * + * This is mainly useful for the help command. + */ + public function ignoreValidationErrors() + { + $this->ignoreValidationErrors = true; + } + + /** + * Sets the application instance for this command. + * + * @param Application $application An Application instance + */ + public function setApplication(Application $application = null) + { + $this->application = $application; + if ($application) { + $this->setHelperSet($application->getHelperSet()); + } else { + $this->helperSet = null; + } + } + + /** + * Sets the helper set. + * + * @param HelperSet $helperSet A HelperSet instance + */ + public function setHelperSet(HelperSet $helperSet) + { + $this->helperSet = $helperSet; + } + + /** + * Gets the helper set. + * + * @return HelperSet A HelperSet instance + */ + public function getHelperSet() + { + return $this->helperSet; + } + + /** + * Gets the application instance for this command. + * + * @return Application An Application instance + */ + public function getApplication() + { + return $this->application; + } + + /** + * Checks whether the command is enabled or not in the current environment. + * + * Override this to check for x or y and return false if the command can not + * run properly under the current conditions. + * + * @return bool + */ + public function isEnabled() + { + return true; + } + + /** + * Configures the current command. + */ + protected function configure() + { + } + + /** + * Executes the current command. + * + * This method is not abstract because you can use this class + * as a concrete class. In this case, instead of defining the + * execute() method, you set the code to execute by passing + * a Closure to the setCode() method. + * + * @param InputInterface $input An InputInterface instance + * @param OutputInterface $output An OutputInterface instance + * + * @return null|int null or 0 if everything went fine, or an error code + * + * @throws LogicException When this abstract method is not implemented + * + * @see setCode() + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + throw new LogicException('You must override the execute() method in the concrete command class.'); + } + + /** + * Interacts with the user. + * + * This method is executed before the InputDefinition is validated. + * This means that this is the only place where the command can + * interactively ask for values of missing required arguments. + * + * @param InputInterface $input An InputInterface instance + * @param OutputInterface $output An OutputInterface instance + */ + protected function interact(InputInterface $input, OutputInterface $output) + { + } + + /** + * Initializes the command just after the input has been validated. + * + * This is mainly useful when a lot of commands extends one main command + * where some things need to be initialized based on the input arguments and options. + * + * @param InputInterface $input An InputInterface instance + * @param OutputInterface $output An OutputInterface instance + */ + protected function initialize(InputInterface $input, OutputInterface $output) + { + } + + /** + * Runs the command. + * + * The code to execute is either defined directly with the + * setCode() method or by overriding the execute() method + * in a sub-class. + * + * @param InputInterface $input An InputInterface instance + * @param OutputInterface $output An OutputInterface instance + * + * @return int The command exit code + * + * @see setCode() + * @see execute() + */ + public function run(InputInterface $input, OutputInterface $output) + { + // force the creation of the synopsis before the merge with the app definition + $this->getSynopsis(true); + $this->getSynopsis(false); + + // add the application arguments and options + $this->mergeApplicationDefinition(); + + // bind the input against the command specific arguments/options + if (!$this->inputBound) { + try { + $input->bind($this->definition); + } catch (ExceptionInterface $e) { + if (!$this->ignoreValidationErrors) { + throw $e; + } + } + } + + $this->initialize($input, $output); + + if (null !== $this->processTitle) { + if (function_exists('cli_set_process_title')) { + if (false === @cli_set_process_title($this->processTitle)) { + if ('Darwin' === PHP_OS) { + $output->writeln('Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.'); + } else { + $error = error_get_last(); + trigger_error($error['message'], E_USER_WARNING); + } + } + } elseif (function_exists('setproctitle')) { + setproctitle($this->processTitle); + } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) { + $output->writeln('Install the proctitle PECL to be able to change the process title.'); + } + } + + if ($input->isInteractive()) { + $this->interact($input, $output); + } + + // The command name argument is often omitted when a command is executed directly with its run() method. + // It would fail the validation if we didn't make sure the command argument is present, + // since it's required by the application. + if ($input->hasArgument('command') && null === $input->getArgument('command')) { + $input->setArgument('command', $this->getName()); + } + + $input->validate(); + + if ($this->code) { + $statusCode = call_user_func($this->code, $input, $output); + } else { + $statusCode = $this->execute($input, $output); + } + + return is_numeric($statusCode) ? (int) $statusCode : 0; + } + + /** + * Sets the code to execute when running this command. + * + * If this method is used, it overrides the code defined + * in the execute() method. + * + * @param callable $code A callable(InputInterface $input, OutputInterface $output) + * + * @return $this + * + * @throws InvalidArgumentException + * + * @see execute() + */ + public function setCode(callable $code) + { + if ($code instanceof \Closure) { + $r = new \ReflectionFunction($code); + if (null === $r->getClosureThis()) { + if (PHP_VERSION_ID < 70000) { + // Bug in PHP5: https://bugs.php.net/bug.php?id=64761 + // This means that we cannot bind static closures and therefore we must + // ignore any errors here. There is no way to test if the closure is + // bindable. + $code = @\Closure::bind($code, $this); + } else { + $code = \Closure::bind($code, $this); + } + } + } + + $this->code = $code; + + return $this; + } + + /** + * Merges the application definition with the command definition. + * + * This method is not part of public API and should not be used directly. + * + * @param bool $mergeArgs Whether to merge or not the Application definition arguments to Command definition arguments + */ + public function mergeApplicationDefinition($mergeArgs = true) + { + if (null === $this->application || (true === $this->applicationDefinitionMerged && ($this->applicationDefinitionMergedWithArgs || !$mergeArgs))) { + return; + } + + $this->definition->addOptions($this->application->getDefinition()->getOptions()); + + if ($mergeArgs) { + $currentArguments = $this->definition->getArguments(); + $this->definition->setArguments($this->application->getDefinition()->getArguments()); + $this->definition->addArguments($currentArguments); + } + + $this->applicationDefinitionMerged = true; + if ($mergeArgs) { + $this->applicationDefinitionMergedWithArgs = true; + } + } + + /** + * Sets an array of argument and option instances. + * + * @param array|InputDefinition $definition An array of argument and option instances or a definition instance + * + * @return $this + */ + public function setDefinition($definition) + { + if ($definition instanceof InputDefinition) { + $this->definition = $definition; + } else { + $this->definition->setDefinition($definition); + } + + $this->applicationDefinitionMerged = false; + + return $this; + } + + /** + * Gets the InputDefinition attached to this Command. + * + * @return InputDefinition An InputDefinition instance + */ + public function getDefinition() + { + return $this->definition; + } + + /** + * Gets the InputDefinition to be used to create representations of this Command. + * + * Can be overridden to provide the original command representation when it would otherwise + * be changed by merging with the application InputDefinition. + * + * This method is not part of public API and should not be used directly. + * + * @return InputDefinition An InputDefinition instance + */ + public function getNativeDefinition() + { + return $this->getDefinition(); + } + + /** + * Adds an argument. + * + * @param string $name The argument name + * @param int $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL + * @param string $description A description text + * @param mixed $default The default value (for InputArgument::OPTIONAL mode only) + * + * @return $this + */ + public function addArgument($name, $mode = null, $description = '', $default = null) + { + $this->definition->addArgument(new InputArgument($name, $mode, $description, $default)); + + return $this; + } + + /** + * Adds an option. + * + * @param string $name The option name + * @param string $shortcut The shortcut (can be null) + * @param int $mode The option mode: One of the InputOption::VALUE_* constants + * @param string $description A description text + * @param mixed $default The default value (must be null for InputOption::VALUE_NONE) + * + * @return $this + */ + public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null) + { + $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default)); + + return $this; + } + + /** + * Sets the name of the command. + * + * This method can set both the namespace and the name if + * you separate them by a colon (:) + * + * $command->setName('foo:bar'); + * + * @param string $name The command name + * + * @return $this + * + * @throws InvalidArgumentException When the name is invalid + */ + public function setName($name) + { + $this->validateName($name); + + $this->name = $name; + + return $this; + } + + /** + * Sets the process title of the command. + * + * This feature should be used only when creating a long process command, + * like a daemon. + * + * PHP 5.5+ or the proctitle PECL library is required + * + * @param string $title The process title + * + * @return $this + */ + public function setProcessTitle($title) + { + $this->processTitle = $title; + + return $this; + } + + /** + * Returns the command name. + * + * @return string The command name + */ + public function getName() + { + return $this->name; + } + + /** + * @param bool $hidden Whether or not the command should be hidden from the list of commands + * + * @return Command The current instance + */ + public function setHidden($hidden) + { + $this->hidden = (bool) $hidden; + + return $this; + } + + /** + * @return bool Whether the command should be publicly shown or not. + */ + public function isHidden() + { + return $this->hidden; + } + + /** + * Sets the description for the command. + * + * @param string $description The description for the command + * + * @return $this + */ + public function setDescription($description) + { + $this->description = $description; + + return $this; + } + + /** + * Returns the description for the command. + * + * @return string The description for the command + */ + public function getDescription() + { + return $this->description; + } + + /** + * Sets the help for the command. + * + * @param string $help The help for the command + * + * @return $this + */ + public function setHelp($help) + { + $this->help = $help; + + return $this; + } + + /** + * Returns the help for the command. + * + * @return string The help for the command + */ + public function getHelp() + { + return $this->help; + } + + /** + * Returns the processed help for the command replacing the %command.name% and + * %command.full_name% patterns with the real values dynamically. + * + * @return string The processed help for the command + */ + public function getProcessedHelp() + { + $name = $this->name; + + $placeholders = array( + '%command.name%', + '%command.full_name%', + ); + $replacements = array( + $name, + $_SERVER['PHP_SELF'].' '.$name, + ); + + return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription()); + } + + /** + * Sets the aliases for the command. + * + * @param string[] $aliases An array of aliases for the command + * + * @return $this + * + * @throws InvalidArgumentException When an alias is invalid + */ + public function setAliases($aliases) + { + if (!is_array($aliases) && !$aliases instanceof \Traversable) { + throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable'); + } + + foreach ($aliases as $alias) { + $this->validateName($alias); + } + + $this->aliases = $aliases; + + return $this; + } + + /** + * Returns the aliases for the command. + * + * @return array An array of aliases for the command + */ + public function getAliases() + { + return $this->aliases; + } + + /** + * Returns the synopsis for the command. + * + * @param bool $short Whether to show the short version of the synopsis (with options folded) or not + * + * @return string The synopsis + */ + public function getSynopsis($short = false) + { + $key = $short ? 'short' : 'long'; + + if (!isset($this->synopsis[$key])) { + $this->synopsis[$key] = trim(sprintf('%s %s', $this->name, $this->definition->getSynopsis($short))); + } + + return $this->synopsis[$key]; + } + + /** + * Add a command usage example. + * + * @param string $usage The usage, it'll be prefixed with the command name + * + * @return $this + */ + public function addUsage($usage) + { + if (0 !== strpos($usage, $this->name)) { + $usage = sprintf('%s %s', $this->name, $usage); + } + + $this->usages[] = $usage; + + return $this; + } + + /** + * Returns alternative usages of the command. + * + * @return array + */ + public function getUsages() + { + return $this->usages; + } + + /** + * Gets a helper instance by name. + * + * @param string $name The helper name + * + * @return mixed The helper value + * + * @throws LogicException if no HelperSet is defined + * @throws InvalidArgumentException if the helper is not defined + */ + public function getHelper($name) + { + if (null === $this->helperSet) { + throw new LogicException(sprintf('Cannot retrieve helper "%s" because there is no HelperSet defined. Did you forget to add your command to the application or to set the application on the command using the setApplication() method? You can also set the HelperSet directly using the setHelperSet() method.', $name)); + } + + return $this->helperSet->get($name); + } + + /** + * @internal + */ + public function setInputBound($inputBound) + { + $this->inputBound = $inputBound; + } + + /** + * Validates a command name. + * + * It must be non-empty and parts can optionally be separated by ":". + * + * @param string $name + * + * @throws InvalidArgumentException When the name is invalid + */ + private function validateName($name) + { + if (!preg_match('/^[^\:]++(\:[^\:]++)*$/', $name)) { + throw new InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Command/HelpCommand.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Command/HelpCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..b8fd911ad40825ded7d067417adb3a8ddc2d1256 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Command/HelpCommand.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Command; + +use Symfony\Component\Console\Helper\DescriptorHelper; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * HelpCommand displays the help for a given command. + * + * @author Fabien Potencier + */ +class HelpCommand extends Command +{ + private $command; + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this->ignoreValidationErrors(); + + $this + ->setName('help') + ->setDefinition(array( + new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), + new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), + new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), + )) + ->setDescription('Displays help for a command') + ->setHelp(<<<'EOF' +The %command.name% command displays help for a given command: + + php %command.full_name% list + +You can also output the help in other formats by using the --format option: + + php %command.full_name% --format=xml list + +To display the list of available commands, please use the list command. +EOF + ) + ; + } + + /** + * Sets the command. + * + * @param Command $command The command to set + */ + public function setCommand(Command $command) + { + $this->command = $command; + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + if (null === $this->command) { + $this->command = $this->getApplication()->find($input->getArgument('command_name')); + } + + $helper = new DescriptorHelper(); + $helper->describe($output, $this->command, array( + 'format' => $input->getOption('format'), + 'raw_text' => $input->getOption('raw'), + )); + + $this->command = null; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Command/ListCommand.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Command/ListCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..179ddea5dc216afda48602d661bb074af2c84039 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Command/ListCommand.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Command; + +use Symfony\Component\Console\Helper\DescriptorHelper; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Input\InputDefinition; + +/** + * ListCommand displays the list of all available commands for the application. + * + * @author Fabien Potencier + */ +class ListCommand extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('list') + ->setDefinition($this->createDefinition()) + ->setDescription('Lists commands') + ->setHelp(<<<'EOF' +The %command.name% command lists all commands: + + php %command.full_name% + +You can also display the commands for a specific namespace: + + php %command.full_name% test + +You can also output the information in other formats by using the --format option: + + php %command.full_name% --format=xml + +It's also possible to get raw list of commands (useful for embedding command runner): + + php %command.full_name% --raw +EOF + ) + ; + } + + /** + * {@inheritdoc} + */ + public function getNativeDefinition() + { + return $this->createDefinition(); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $helper = new DescriptorHelper(); + $helper->describe($output, $this->getApplication(), array( + 'format' => $input->getOption('format'), + 'raw_text' => $input->getOption('raw'), + 'namespace' => $input->getArgument('namespace'), + )); + } + + /** + * {@inheritdoc} + */ + private function createDefinition() + { + return new InputDefinition(array( + new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), + new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), + new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Command/LockableTrait.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Command/LockableTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..95597705941cad077118e65faaf71d483f58106f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Command/LockableTrait.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\Component\Console\Command; + +use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Console\Exception\RuntimeException; +use Symfony\Component\Filesystem\LockHandler; + +/** + * Basic lock feature for commands. + * + * @author Geoffrey Brier + */ +trait LockableTrait +{ + private $lockHandler; + + /** + * Locks a command. + * + * @return bool + */ + private function lock($name = null, $blocking = false) + { + if (!class_exists(LockHandler::class)) { + throw new RuntimeException('To enable the locking feature you must install the symfony/filesystem component.'); + } + + if (null !== $this->lockHandler) { + throw new LogicException('A lock is already in place.'); + } + + $this->lockHandler = new LockHandler($name ?: $this->getName()); + + if (!$this->lockHandler->lock($blocking)) { + $this->lockHandler = null; + + return false; + } + + return true; + } + + /** + * Releases the command lock if there is one. + */ + private function release() + { + if ($this->lockHandler) { + $this->lockHandler->release(); + $this->lockHandler = null; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/ConsoleEvents.php b/vendor/symfony/symfony/src/Symfony/Component/Console/ConsoleEvents.php new file mode 100644 index 0000000000000000000000000000000000000000..b3571e9afb3bc228326163581a2e70d0daacfee8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/ConsoleEvents.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\Component\Console; + +/** + * Contains all events dispatched by an Application. + * + * @author Francesco Levorato + */ +final class ConsoleEvents +{ + /** + * The COMMAND event allows you to attach listeners before any command is + * executed by the console. It also allows you to modify the command, input and output + * before they are handled to the command. + * + * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent") + * + * @var string + */ + const COMMAND = 'console.command'; + + /** + * The TERMINATE event allows you to attach listeners after a command is + * executed by the console. + * + * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent") + * + * @var string + */ + const TERMINATE = 'console.terminate'; + + /** + * The EXCEPTION event occurs when an uncaught exception appears. + * + * This event allows you to deal with the exception or + * to modify the thrown exception. + * + * @Event("Symfony\Component\Console\Event\ConsoleExceptionEvent") + * + * @var string + */ + const EXCEPTION = 'console.exception'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php new file mode 100644 index 0000000000000000000000000000000000000000..4c4a267fe09ceb87c39a3ee9a19081444aab7f28 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php @@ -0,0 +1,160 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Descriptor; + +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Exception\CommandNotFoundException; + +/** + * @author Jean-François Simon + * + * @internal + */ +class ApplicationDescription +{ + const GLOBAL_NAMESPACE = '_global'; + + /** + * @var Application + */ + private $application; + + /** + * @var null|string + */ + private $namespace; + + /** + * @var array + */ + private $namespaces; + + /** + * @var Command[] + */ + private $commands; + + /** + * @var Command[] + */ + private $aliases; + + /** + * Constructor. + * + * @param Application $application + * @param string|null $namespace + */ + public function __construct(Application $application, $namespace = null) + { + $this->application = $application; + $this->namespace = $namespace; + } + + /** + * @return array + */ + public function getNamespaces() + { + if (null === $this->namespaces) { + $this->inspectApplication(); + } + + return $this->namespaces; + } + + /** + * @return Command[] + */ + public function getCommands() + { + if (null === $this->commands) { + $this->inspectApplication(); + } + + return $this->commands; + } + + /** + * @param string $name + * + * @return Command + * + * @throws CommandNotFoundException + */ + public function getCommand($name) + { + if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) { + throw new CommandNotFoundException(sprintf('Command %s does not exist.', $name)); + } + + return isset($this->commands[$name]) ? $this->commands[$name] : $this->aliases[$name]; + } + + private function inspectApplication() + { + $this->commands = array(); + $this->namespaces = array(); + + $all = $this->application->all($this->namespace ? $this->application->findNamespace($this->namespace) : null); + foreach ($this->sortCommands($all) as $namespace => $commands) { + $names = array(); + + /** @var Command $command */ + foreach ($commands as $name => $command) { + if (!$command->getName() || $command->isHidden()) { + continue; + } + + if ($command->getName() === $name) { + $this->commands[$name] = $command; + } else { + $this->aliases[$name] = $command; + } + + $names[] = $name; + } + + $this->namespaces[$namespace] = array('id' => $namespace, 'commands' => $names); + } + } + + /** + * @param array $commands + * + * @return array + */ + private function sortCommands(array $commands) + { + $namespacedCommands = array(); + $globalCommands = array(); + foreach ($commands as $name => $command) { + $key = $this->application->extractNamespace($name, 1); + if (!$key) { + $globalCommands['_global'][$name] = $command; + } else { + $namespacedCommands[$key][$name] = $command; + } + } + ksort($namespacedCommands); + $namespacedCommands = array_merge($globalCommands, $namespacedCommands); + + foreach ($namespacedCommands as &$commandsSet) { + ksort($commandsSet); + } + // unset reference to keep scope clear + unset($commandsSet); + + return $namespacedCommands; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/Descriptor.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/Descriptor.php new file mode 100644 index 0000000000000000000000000000000000000000..50dd86ce23f8559d4faa597c63df7c138a2128af --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/Descriptor.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\Component\Console\Descriptor; + +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Exception\InvalidArgumentException; + +/** + * @author Jean-François Simon + * + * @internal + */ +abstract class Descriptor implements DescriptorInterface +{ + /** + * @var OutputInterface + */ + protected $output; + + /** + * {@inheritdoc} + */ + public function describe(OutputInterface $output, $object, array $options = array()) + { + $this->output = $output; + + switch (true) { + case $object instanceof InputArgument: + $this->describeInputArgument($object, $options); + break; + case $object instanceof InputOption: + $this->describeInputOption($object, $options); + break; + case $object instanceof InputDefinition: + $this->describeInputDefinition($object, $options); + break; + case $object instanceof Command: + $this->describeCommand($object, $options); + break; + case $object instanceof Application: + $this->describeApplication($object, $options); + break; + default: + throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_class($object))); + } + } + + /** + * Writes content to output. + * + * @param string $content + * @param bool $decorated + */ + protected function write($content, $decorated = false) + { + $this->output->write($content, false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW); + } + + /** + * Describes an InputArgument instance. + * + * @param InputArgument $argument + * @param array $options + * + * @return string|mixed + */ + abstract protected function describeInputArgument(InputArgument $argument, array $options = array()); + + /** + * Describes an InputOption instance. + * + * @param InputOption $option + * @param array $options + * + * @return string|mixed + */ + abstract protected function describeInputOption(InputOption $option, array $options = array()); + + /** + * Describes an InputDefinition instance. + * + * @param InputDefinition $definition + * @param array $options + * + * @return string|mixed + */ + abstract protected function describeInputDefinition(InputDefinition $definition, array $options = array()); + + /** + * Describes a Command instance. + * + * @param Command $command + * @param array $options + * + * @return string|mixed + */ + abstract protected function describeCommand(Command $command, array $options = array()); + + /** + * Describes an Application instance. + * + * @param Application $application + * @param array $options + * + * @return string|mixed + */ + abstract protected function describeApplication(Application $application, array $options = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..3929b6d9ed7765c550b0b6ed29e05cc22c6eb28a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Descriptor; + +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Descriptor interface. + * + * @author Jean-François Simon + */ +interface DescriptorInterface +{ + /** + * Describes an InputArgument instance. + * + * @param OutputInterface $output + * @param object $object + * @param array $options + */ + public function describe(OutputInterface $output, $object, array $options = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php new file mode 100644 index 0000000000000000000000000000000000000000..87e38fdb89071e87d3b70188bb6fbe8e8fc13d47 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php @@ -0,0 +1,166 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Descriptor; + +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputOption; + +/** + * JSON descriptor. + * + * @author Jean-François Simon + * + * @internal + */ +class JsonDescriptor extends Descriptor +{ + /** + * {@inheritdoc} + */ + protected function describeInputArgument(InputArgument $argument, array $options = array()) + { + $this->writeData($this->getInputArgumentData($argument), $options); + } + + /** + * {@inheritdoc} + */ + protected function describeInputOption(InputOption $option, array $options = array()) + { + $this->writeData($this->getInputOptionData($option), $options); + } + + /** + * {@inheritdoc} + */ + protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + { + $this->writeData($this->getInputDefinitionData($definition), $options); + } + + /** + * {@inheritdoc} + */ + protected function describeCommand(Command $command, array $options = array()) + { + $this->writeData($this->getCommandData($command), $options); + } + + /** + * {@inheritdoc} + */ + protected function describeApplication(Application $application, array $options = array()) + { + $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; + $description = new ApplicationDescription($application, $describedNamespace); + $commands = array(); + + foreach ($description->getCommands() as $command) { + $commands[] = $this->getCommandData($command); + } + + $data = $describedNamespace + ? array('commands' => $commands, 'namespace' => $describedNamespace) + : array('commands' => $commands, 'namespaces' => array_values($description->getNamespaces())); + + $this->writeData($data, $options); + } + + /** + * Writes data as json. + * + * @param array $data + * @param array $options + * + * @return array|string + */ + private function writeData(array $data, array $options) + { + $this->write(json_encode($data, isset($options['json_encoding']) ? $options['json_encoding'] : 0)); + } + + /** + * @param InputArgument $argument + * + * @return array + */ + private function getInputArgumentData(InputArgument $argument) + { + return array( + 'name' => $argument->getName(), + 'is_required' => $argument->isRequired(), + 'is_array' => $argument->isArray(), + 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $argument->getDescription()), + 'default' => $argument->getDefault(), + ); + } + + /** + * @param InputOption $option + * + * @return array + */ + private function getInputOptionData(InputOption $option) + { + return array( + 'name' => '--'.$option->getName(), + 'shortcut' => $option->getShortcut() ? '-'.implode('|-', explode('|', $option->getShortcut())) : '', + 'accept_value' => $option->acceptValue(), + 'is_value_required' => $option->isValueRequired(), + 'is_multiple' => $option->isArray(), + 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $option->getDescription()), + 'default' => $option->getDefault(), + ); + } + + /** + * @param InputDefinition $definition + * + * @return array + */ + private function getInputDefinitionData(InputDefinition $definition) + { + $inputArguments = array(); + foreach ($definition->getArguments() as $name => $argument) { + $inputArguments[$name] = $this->getInputArgumentData($argument); + } + + $inputOptions = array(); + foreach ($definition->getOptions() as $name => $option) { + $inputOptions[$name] = $this->getInputOptionData($option); + } + + return array('arguments' => $inputArguments, 'options' => $inputOptions); + } + + /** + * @param Command $command + * + * @return array + */ + private function getCommandData(Command $command) + { + $command->getSynopsis(); + $command->mergeApplicationDefinition(false); + + return array( + 'name' => $command->getName(), + 'usage' => array_merge(array($command->getSynopsis()), $command->getUsages(), $command->getAliases()), + 'description' => $command->getDescription(), + 'help' => $command->getProcessedHelp(), + 'definition' => $this->getInputDefinitionData($command->getNativeDefinition()), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php new file mode 100644 index 0000000000000000000000000000000000000000..c2d6243e280cc322f31c39f9f6757f9bb3f6c55e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php @@ -0,0 +1,144 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Descriptor; + +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Helper\Helper; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputOption; + +/** + * Markdown descriptor. + * + * @author Jean-François Simon + * + * @internal + */ +class MarkdownDescriptor extends Descriptor +{ + /** + * {@inheritdoc} + */ + protected function describeInputArgument(InputArgument $argument, array $options = array()) + { + $this->write( + '**'.$argument->getName().':**'."\n\n" + .'* Name: '.($argument->getName() ?: '')."\n" + .'* Is required: '.($argument->isRequired() ? 'yes' : 'no')."\n" + .'* Is array: '.($argument->isArray() ? 'yes' : 'no')."\n" + .'* Description: '.preg_replace('/\s*[\r\n]\s*/', "\n ", $argument->getDescription() ?: '')."\n" + .'* Default: `'.str_replace("\n", '', var_export($argument->getDefault(), true)).'`' + ); + } + + /** + * {@inheritdoc} + */ + protected function describeInputOption(InputOption $option, array $options = array()) + { + $this->write( + '**'.$option->getName().':**'."\n\n" + .'* Name: `--'.$option->getName().'`'."\n" + .'* Shortcut: '.($option->getShortcut() ? '`-'.implode('|-', explode('|', $option->getShortcut())).'`' : '')."\n" + .'* Accept value: '.($option->acceptValue() ? 'yes' : 'no')."\n" + .'* Is value required: '.($option->isValueRequired() ? 'yes' : 'no')."\n" + .'* Is multiple: '.($option->isArray() ? 'yes' : 'no')."\n" + .'* Description: '.preg_replace('/\s*[\r\n]\s*/', "\n ", $option->getDescription() ?: '')."\n" + .'* Default: `'.str_replace("\n", '', var_export($option->getDefault(), true)).'`' + ); + } + + /** + * {@inheritdoc} + */ + protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + { + if ($showArguments = count($definition->getArguments()) > 0) { + $this->write('### Arguments:'); + foreach ($definition->getArguments() as $argument) { + $this->write("\n\n"); + $this->write($this->describeInputArgument($argument)); + } + } + + if (count($definition->getOptions()) > 0) { + if ($showArguments) { + $this->write("\n\n"); + } + + $this->write('### Options:'); + foreach ($definition->getOptions() as $option) { + $this->write("\n\n"); + $this->write($this->describeInputOption($option)); + } + } + } + + /** + * {@inheritdoc} + */ + protected function describeCommand(Command $command, array $options = array()) + { + $command->getSynopsis(); + $command->mergeApplicationDefinition(false); + + $this->write( + $command->getName()."\n" + .str_repeat('-', Helper::strlen($command->getName()))."\n\n" + .'* Description: '.($command->getDescription() ?: '')."\n" + .'* Usage:'."\n\n" + .array_reduce(array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()), function ($carry, $usage) { + return $carry.' * `'.$usage.'`'."\n"; + }) + ); + + if ($help = $command->getProcessedHelp()) { + $this->write("\n"); + $this->write($help); + } + + if ($command->getNativeDefinition()) { + $this->write("\n\n"); + $this->describeInputDefinition($command->getNativeDefinition()); + } + } + + /** + * {@inheritdoc} + */ + protected function describeApplication(Application $application, array $options = array()) + { + $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; + $description = new ApplicationDescription($application, $describedNamespace); + + $this->write($application->getName()."\n".str_repeat('=', Helper::strlen($application->getName()))); + + foreach ($description->getNamespaces() as $namespace) { + if (ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) { + $this->write("\n\n"); + $this->write('**'.$namespace['id'].':**'); + } + + $this->write("\n\n"); + $this->write(implode("\n", array_map(function ($commandName) { + return '* '.$commandName; + }, $namespace['commands']))); + } + + foreach ($description->getCommands() as $command) { + $this->write("\n\n"); + $this->write($this->describeCommand($command)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/TextDescriptor.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/TextDescriptor.php new file mode 100644 index 0000000000000000000000000000000000000000..81710046c610fe622f72565ee53063ad0efbc7a0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/TextDescriptor.php @@ -0,0 +1,320 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Descriptor; + +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Helper\Helper; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputOption; + +/** + * Text descriptor. + * + * @author Jean-François Simon + * + * @internal + */ +class TextDescriptor extends Descriptor +{ + /** + * {@inheritdoc} + */ + protected function describeInputArgument(InputArgument $argument, array $options = array()) + { + if (null !== $argument->getDefault() && (!is_array($argument->getDefault()) || count($argument->getDefault()))) { + $default = sprintf(' [default: %s]', $this->formatDefaultValue($argument->getDefault())); + } else { + $default = ''; + } + + $totalWidth = isset($options['total_width']) ? $options['total_width'] : Helper::strlen($argument->getName()); + $spacingWidth = $totalWidth - strlen($argument->getName()); + + $this->writeText(sprintf(' %s %s%s%s', + $argument->getName(), + str_repeat(' ', $spacingWidth), + // + 4 = 2 spaces before , 2 spaces after + preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $argument->getDescription()), + $default + ), $options); + } + + /** + * {@inheritdoc} + */ + protected function describeInputOption(InputOption $option, array $options = array()) + { + if ($option->acceptValue() && null !== $option->getDefault() && (!is_array($option->getDefault()) || count($option->getDefault()))) { + $default = sprintf(' [default: %s]', $this->formatDefaultValue($option->getDefault())); + } else { + $default = ''; + } + + $value = ''; + if ($option->acceptValue()) { + $value = '='.strtoupper($option->getName()); + + if ($option->isValueOptional()) { + $value = '['.$value.']'; + } + } + + $totalWidth = isset($options['total_width']) ? $options['total_width'] : $this->calculateTotalWidthForOptions(array($option)); + $synopsis = sprintf('%s%s', + $option->getShortcut() ? sprintf('-%s, ', $option->getShortcut()) : ' ', + sprintf('--%s%s', $option->getName(), $value) + ); + + $spacingWidth = $totalWidth - Helper::strlen($synopsis); + + $this->writeText(sprintf(' %s %s%s%s%s', + $synopsis, + str_repeat(' ', $spacingWidth), + // + 4 = 2 spaces before , 2 spaces after + preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $option->getDescription()), + $default, + $option->isArray() ? ' (multiple values allowed)' : '' + ), $options); + } + + /** + * {@inheritdoc} + */ + protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + { + $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions()); + foreach ($definition->getArguments() as $argument) { + $totalWidth = max($totalWidth, Helper::strlen($argument->getName())); + } + + if ($definition->getArguments()) { + $this->writeText('Arguments:', $options); + $this->writeText("\n"); + foreach ($definition->getArguments() as $argument) { + $this->describeInputArgument($argument, array_merge($options, array('total_width' => $totalWidth))); + $this->writeText("\n"); + } + } + + if ($definition->getArguments() && $definition->getOptions()) { + $this->writeText("\n"); + } + + if ($definition->getOptions()) { + $laterOptions = array(); + + $this->writeText('Options:', $options); + foreach ($definition->getOptions() as $option) { + if (strlen($option->getShortcut()) > 1) { + $laterOptions[] = $option; + continue; + } + $this->writeText("\n"); + $this->describeInputOption($option, array_merge($options, array('total_width' => $totalWidth))); + } + foreach ($laterOptions as $option) { + $this->writeText("\n"); + $this->describeInputOption($option, array_merge($options, array('total_width' => $totalWidth))); + } + } + } + + /** + * {@inheritdoc} + */ + protected function describeCommand(Command $command, array $options = array()) + { + $command->getSynopsis(true); + $command->getSynopsis(false); + $command->mergeApplicationDefinition(false); + + $this->writeText('Usage:', $options); + foreach (array_merge(array($command->getSynopsis(true)), $command->getAliases(), $command->getUsages()) as $usage) { + $this->writeText("\n"); + $this->writeText(' '.$usage, $options); + } + $this->writeText("\n"); + + $definition = $command->getNativeDefinition(); + if ($definition->getOptions() || $definition->getArguments()) { + $this->writeText("\n"); + $this->describeInputDefinition($definition, $options); + $this->writeText("\n"); + } + + if ($help = $command->getProcessedHelp()) { + $this->writeText("\n"); + $this->writeText('Help:', $options); + $this->writeText("\n"); + $this->writeText(' '.str_replace("\n", "\n ", $help), $options); + $this->writeText("\n"); + } + } + + /** + * {@inheritdoc} + */ + protected function describeApplication(Application $application, array $options = array()) + { + $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; + $description = new ApplicationDescription($application, $describedNamespace); + + if (isset($options['raw_text']) && $options['raw_text']) { + $width = $this->getColumnWidth($description->getCommands()); + + foreach ($description->getCommands() as $command) { + $this->writeText(sprintf("%-{$width}s %s", $command->getName(), $command->getDescription()), $options); + $this->writeText("\n"); + } + } else { + if ('' != $help = $application->getHelp()) { + $this->writeText("$help\n\n", $options); + } + + $this->writeText("Usage:\n", $options); + $this->writeText(" command [options] [arguments]\n\n", $options); + + $this->describeInputDefinition(new InputDefinition($application->getDefinition()->getOptions()), $options); + + $this->writeText("\n"); + $this->writeText("\n"); + + $width = $this->getColumnWidth($description->getCommands()); + + if ($describedNamespace) { + $this->writeText(sprintf('Available commands for the "%s" namespace:', $describedNamespace), $options); + } else { + $this->writeText('Available commands:', $options); + } + + // add commands by namespace + $commands = $description->getCommands(); + + foreach ($description->getNamespaces() as $namespace) { + if (!$describedNamespace && ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) { + $this->writeText("\n"); + $this->writeText(' '.$namespace['id'].'', $options); + } + + foreach ($namespace['commands'] as $name) { + if (isset($commands[$name])) { + $this->writeText("\n"); + $spacingWidth = $width - Helper::strlen($name); + $command = $commands[$name]; + $commandAliases = $this->getCommandAliasesText($command); + $this->writeText(sprintf(' %s%s%s', $name, str_repeat(' ', $spacingWidth), $commandAliases.$command->getDescription()), $options); + } + } + } + + $this->writeText("\n"); + } + } + + /** + * {@inheritdoc} + */ + private function writeText($content, array $options = array()) + { + $this->write( + isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content, + isset($options['raw_output']) ? !$options['raw_output'] : true + ); + } + + /** + * Formats command aliases to show them in the command description. + * + * @param Command $command + * + * @return string + */ + private function getCommandAliasesText($command) + { + $text = ''; + $aliases = $command->getAliases(); + + if ($aliases) { + $text = '['.implode('|', $aliases).'] '; + } + + return $text; + } + + /** + * Formats input option/argument default value. + * + * @param mixed $default + * + * @return string + */ + private function formatDefaultValue($default) + { + if (is_string($default)) { + $default = OutputFormatter::escape($default); + } elseif (is_array($default)) { + foreach ($default as $key => $value) { + if (is_string($value)) { + $default[$key] = OutputFormatter::escape($value); + } + } + } + + return str_replace('\\\\', '\\', json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)); + } + + /** + * @param Command[] $commands + * + * @return int + */ + private function getColumnWidth(array $commands) + { + $widths = array(); + + foreach ($commands as $command) { + $widths[] = Helper::strlen($command->getName()); + foreach ($command->getAliases() as $alias) { + $widths[] = Helper::strlen($alias); + } + } + + return max($widths) + 2; + } + + /** + * @param InputOption[] $options + * + * @return int + */ + private function calculateTotalWidthForOptions($options) + { + $totalWidth = 0; + foreach ($options as $option) { + // "-" + shortcut + ", --" + name + $nameLength = 1 + max(Helper::strlen($option->getShortcut()), 1) + 4 + Helper::strlen($option->getName()); + + if ($option->acceptValue()) { + $valueLength = 1 + Helper::strlen($option->getName()); // = + value + $valueLength += $option->isValueOptional() ? 2 : 0; // [ + ] + + $nameLength += $valueLength; + } + $totalWidth = max($totalWidth, $nameLength); + } + + return $totalWidth; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php new file mode 100644 index 0000000000000000000000000000000000000000..b5676beb3766fcff81419c6ef36e9e7d6c99dcfe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php @@ -0,0 +1,263 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Descriptor; + +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputOption; + +/** + * XML descriptor. + * + * @author Jean-François Simon + * + * @internal + */ +class XmlDescriptor extends Descriptor +{ + /** + * @param InputDefinition $definition + * + * @return \DOMDocument + */ + public function getInputDefinitionDocument(InputDefinition $definition) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($definitionXML = $dom->createElement('definition')); + + $definitionXML->appendChild($argumentsXML = $dom->createElement('arguments')); + foreach ($definition->getArguments() as $argument) { + $this->appendDocument($argumentsXML, $this->getInputArgumentDocument($argument)); + } + + $definitionXML->appendChild($optionsXML = $dom->createElement('options')); + foreach ($definition->getOptions() as $option) { + $this->appendDocument($optionsXML, $this->getInputOptionDocument($option)); + } + + return $dom; + } + + /** + * @param Command $command + * + * @return \DOMDocument + */ + public function getCommandDocument(Command $command) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($commandXML = $dom->createElement('command')); + + $command->getSynopsis(); + $command->mergeApplicationDefinition(false); + + $commandXML->setAttribute('id', $command->getName()); + $commandXML->setAttribute('name', $command->getName()); + + $commandXML->appendChild($usagesXML = $dom->createElement('usages')); + + foreach (array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()) as $usage) { + $usagesXML->appendChild($dom->createElement('usage', $usage)); + } + + $commandXML->appendChild($descriptionXML = $dom->createElement('description')); + $descriptionXML->appendChild($dom->createTextNode(str_replace("\n", "\n ", $command->getDescription()))); + + $commandXML->appendChild($helpXML = $dom->createElement('help')); + $helpXML->appendChild($dom->createTextNode(str_replace("\n", "\n ", $command->getProcessedHelp()))); + + $definitionXML = $this->getInputDefinitionDocument($command->getNativeDefinition()); + $this->appendDocument($commandXML, $definitionXML->getElementsByTagName('definition')->item(0)); + + return $dom; + } + + /** + * @param Application $application + * @param string|null $namespace + * + * @return \DOMDocument + */ + public function getApplicationDocument(Application $application, $namespace = null) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->appendChild($rootXml = $dom->createElement('symfony')); + + if ($application->getName() !== 'UNKNOWN') { + $rootXml->setAttribute('name', $application->getName()); + if ($application->getVersion() !== 'UNKNOWN') { + $rootXml->setAttribute('version', $application->getVersion()); + } + } + + $rootXml->appendChild($commandsXML = $dom->createElement('commands')); + + $description = new ApplicationDescription($application, $namespace); + + if ($namespace) { + $commandsXML->setAttribute('namespace', $namespace); + } + + foreach ($description->getCommands() as $command) { + $this->appendDocument($commandsXML, $this->getCommandDocument($command)); + } + + if (!$namespace) { + $rootXml->appendChild($namespacesXML = $dom->createElement('namespaces')); + + foreach ($description->getNamespaces() as $namespaceDescription) { + $namespacesXML->appendChild($namespaceArrayXML = $dom->createElement('namespace')); + $namespaceArrayXML->setAttribute('id', $namespaceDescription['id']); + + foreach ($namespaceDescription['commands'] as $name) { + $namespaceArrayXML->appendChild($commandXML = $dom->createElement('command')); + $commandXML->appendChild($dom->createTextNode($name)); + } + } + } + + return $dom; + } + + /** + * {@inheritdoc} + */ + protected function describeInputArgument(InputArgument $argument, array $options = array()) + { + $this->writeDocument($this->getInputArgumentDocument($argument)); + } + + /** + * {@inheritdoc} + */ + protected function describeInputOption(InputOption $option, array $options = array()) + { + $this->writeDocument($this->getInputOptionDocument($option)); + } + + /** + * {@inheritdoc} + */ + protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + { + $this->writeDocument($this->getInputDefinitionDocument($definition)); + } + + /** + * {@inheritdoc} + */ + protected function describeCommand(Command $command, array $options = array()) + { + $this->writeDocument($this->getCommandDocument($command)); + } + + /** + * {@inheritdoc} + */ + protected function describeApplication(Application $application, array $options = array()) + { + $this->writeDocument($this->getApplicationDocument($application, isset($options['namespace']) ? $options['namespace'] : null)); + } + + /** + * Appends document children to parent node. + * + * @param \DOMNode $parentNode + * @param \DOMNode $importedParent + */ + private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent) + { + foreach ($importedParent->childNodes as $childNode) { + $parentNode->appendChild($parentNode->ownerDocument->importNode($childNode, true)); + } + } + + /** + * Writes DOM document. + * + * @param \DOMDocument $dom + * + * @return \DOMDocument|string + */ + private function writeDocument(\DOMDocument $dom) + { + $dom->formatOutput = true; + $this->write($dom->saveXML()); + } + + /** + * @param InputArgument $argument + * + * @return \DOMDocument + */ + private function getInputArgumentDocument(InputArgument $argument) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + + $dom->appendChild($objectXML = $dom->createElement('argument')); + $objectXML->setAttribute('name', $argument->getName()); + $objectXML->setAttribute('is_required', $argument->isRequired() ? 1 : 0); + $objectXML->setAttribute('is_array', $argument->isArray() ? 1 : 0); + $objectXML->appendChild($descriptionXML = $dom->createElement('description')); + $descriptionXML->appendChild($dom->createTextNode($argument->getDescription())); + + $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); + $defaults = is_array($argument->getDefault()) ? $argument->getDefault() : (is_bool($argument->getDefault()) ? array(var_export($argument->getDefault(), true)) : ($argument->getDefault() ? array($argument->getDefault()) : array())); + foreach ($defaults as $default) { + $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); + $defaultXML->appendChild($dom->createTextNode($default)); + } + + return $dom; + } + + /** + * @param InputOption $option + * + * @return \DOMDocument + */ + private function getInputOptionDocument(InputOption $option) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + + $dom->appendChild($objectXML = $dom->createElement('option')); + $objectXML->setAttribute('name', '--'.$option->getName()); + $pos = strpos($option->getShortcut(), '|'); + if (false !== $pos) { + $objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos)); + $objectXML->setAttribute('shortcuts', '-'.implode('|-', explode('|', $option->getShortcut()))); + } else { + $objectXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : ''); + } + $objectXML->setAttribute('accept_value', $option->acceptValue() ? 1 : 0); + $objectXML->setAttribute('is_value_required', $option->isValueRequired() ? 1 : 0); + $objectXML->setAttribute('is_multiple', $option->isArray() ? 1 : 0); + $objectXML->appendChild($descriptionXML = $dom->createElement('description')); + $descriptionXML->appendChild($dom->createTextNode($option->getDescription())); + + if ($option->acceptValue()) { + $defaults = is_array($option->getDefault()) ? $option->getDefault() : (is_bool($option->getDefault()) ? array(var_export($option->getDefault(), true)) : ($option->getDefault() ? array($option->getDefault()) : array())); + $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); + + if (!empty($defaults)) { + foreach ($defaults as $default) { + $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); + $defaultXML->appendChild($dom->createTextNode($default)); + } + } + } + + return $dom; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..92adf1ef96ceb4d1fcd6ae1fdcf6152716b56747 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Event; + +/** + * Allows to do things before the command is executed, like skipping the command or changing the input. + * + * @author Fabien Potencier + */ +class ConsoleCommandEvent extends ConsoleEvent +{ + /** + * The return code for skipped commands, this will also be passed into the terminate event. + */ + const RETURN_CODE_DISABLED = 113; + + /** + * Indicates if the command should be run or skipped. + * + * @var bool + */ + private $commandShouldRun = true; + + /** + * Disables the command, so it won't be run. + * + * @return bool + */ + public function disableCommand() + { + return $this->commandShouldRun = false; + } + + /** + * Enables the command. + * + * @return bool + */ + public function enableCommand() + { + return $this->commandShouldRun = true; + } + + /** + * Returns true if the command is runnable, false otherwise. + * + * @return bool + */ + public function commandShouldRun() + { + return $this->commandShouldRun; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleEvent.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..ab620c4609a207c71db86f0f3c189ee3f458b009 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleEvent.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Event; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\EventDispatcher\Event; + +/** + * Allows to inspect input and output of a command. + * + * @author Francesco Levorato + */ +class ConsoleEvent extends Event +{ + protected $command; + + private $input; + private $output; + + public function __construct(Command $command, InputInterface $input, OutputInterface $output) + { + $this->command = $command; + $this->input = $input; + $this->output = $output; + } + + /** + * Gets the command that is executed. + * + * @return Command A Command instance + */ + public function getCommand() + { + return $this->command; + } + + /** + * Gets the input instance. + * + * @return InputInterface An InputInterface instance + */ + public function getInput() + { + return $this->input; + } + + /** + * Gets the output instance. + * + * @return OutputInterface An OutputInterface instance + */ + public function getOutput() + { + return $this->output; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleExceptionEvent.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleExceptionEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..603b7eed78cd8857623f48c44d0b51f93337821f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleExceptionEvent.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Event; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Allows to handle exception thrown in a command. + * + * @author Fabien Potencier + */ +class ConsoleExceptionEvent extends ConsoleEvent +{ + private $exception; + private $exitCode; + + public function __construct(Command $command, InputInterface $input, OutputInterface $output, \Exception $exception, $exitCode) + { + parent::__construct($command, $input, $output); + + $this->setException($exception); + $this->exitCode = (int) $exitCode; + } + + /** + * Returns the thrown exception. + * + * @return \Exception The thrown exception + */ + public function getException() + { + return $this->exception; + } + + /** + * Replaces the thrown exception. + * + * This exception will be thrown if no response is set in the event. + * + * @param \Exception $exception The thrown exception + */ + public function setException(\Exception $exception) + { + $this->exception = $exception; + } + + /** + * Gets the exit code. + * + * @return int The command exit code + */ + public function getExitCode() + { + return $this->exitCode; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleTerminateEvent.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleTerminateEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..b6a5d7c0dc48cf8168e466e2be408a3ba8704862 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Event/ConsoleTerminateEvent.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\Component\Console\Event; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Allows to manipulate the exit code of a command after its execution. + * + * @author Francesco Levorato + */ +class ConsoleTerminateEvent extends ConsoleEvent +{ + /** + * The exit code of the command. + * + * @var int + */ + private $exitCode; + + public function __construct(Command $command, InputInterface $input, OutputInterface $output, $exitCode) + { + parent::__construct($command, $input, $output); + + $this->setExitCode($exitCode); + } + + /** + * Sets the exit code. + * + * @param int $exitCode The command exit code + */ + public function setExitCode($exitCode) + { + $this->exitCode = (int) $exitCode; + } + + /** + * Gets the exit code. + * + * @return int The command exit code + */ + public function getExitCode() + { + return $this->exitCode; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/CommandNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/CommandNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..54f1a5b0ce8481e452860fff16526801f62d88f3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/CommandNotFoundException.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\Component\Console\Exception; + +/** + * Represents an incorrect command name typed in the console. + * + * @author Jérôme Tamarelle + */ +class CommandNotFoundException extends \InvalidArgumentException implements ExceptionInterface +{ + private $alternatives; + + /** + * @param string $message Exception message to throw + * @param array $alternatives List of similar defined names + * @param int $code Exception code + * @param Exception $previous previous exception used for the exception chaining + */ + public function __construct($message, array $alternatives = array(), $code = 0, \Exception $previous = null) + { + parent::__construct($message, $code, $previous); + + $this->alternatives = $alternatives; + } + + /** + * @return array A list of similar defined names + */ + public function getAlternatives() + { + return $this->alternatives; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..491cc4c6456166cfd70437c84b483b37845cf0f4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Exception; + +/** + * ExceptionInterface. + * + * @author Jérôme Tamarelle + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..07cc0b61d6dc82fa100d14246b96b41642af0b74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/InvalidArgumentException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Exception; + +/** + * @author Jérôme Tamarelle + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/InvalidOptionException.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/InvalidOptionException.php new file mode 100644 index 0000000000000000000000000000000000000000..b2eec61658d33bbc2ddb1b6bc3c8f00209527308 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/InvalidOptionException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Exception; + +/** + * Represents an incorrect option name typed in the console. + * + * @author Jérôme Tamarelle + */ +class InvalidOptionException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/LogicException.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/LogicException.php new file mode 100644 index 0000000000000000000000000000000000000000..fc37b8d8ae4b635e0990ea4605c21ff51224f594 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/LogicException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Exception; + +/** + * @author Jérôme Tamarelle + */ +class LogicException extends \LogicException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/RuntimeException.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/RuntimeException.php new file mode 100644 index 0000000000000000000000000000000000000000..51d7d80ac659c0a0edc3f30a7c72c13ec6d5045f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Exception/RuntimeException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Exception; + +/** + * @author Jérôme Tamarelle + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatter.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..47c7618930aecc0ecb95c6a2bbe2e70461b979dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatter.php @@ -0,0 +1,262 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Formatter; + +use Symfony\Component\Console\Exception\InvalidArgumentException; + +/** + * Formatter class for console output. + * + * @author Konstantin Kudryashov + */ +class OutputFormatter implements OutputFormatterInterface +{ + private $decorated; + private $styles = array(); + private $styleStack; + + /** + * Escapes "<" special char in given text. + * + * @param string $text Text to escape + * + * @return string Escaped text + */ + public static function escape($text) + { + $text = preg_replace('/([^\\\\]?) FormatterStyle" instances + */ + public function __construct($decorated = false, array $styles = array()) + { + $this->decorated = (bool) $decorated; + + $this->setStyle('error', new OutputFormatterStyle('white', 'red')); + $this->setStyle('info', new OutputFormatterStyle('green')); + $this->setStyle('comment', new OutputFormatterStyle('yellow')); + $this->setStyle('question', new OutputFormatterStyle('black', 'cyan')); + + foreach ($styles as $name => $style) { + $this->setStyle($name, $style); + } + + $this->styleStack = new OutputFormatterStyleStack(); + } + + /** + * Sets the decorated flag. + * + * @param bool $decorated Whether to decorate the messages or not + */ + public function setDecorated($decorated) + { + $this->decorated = (bool) $decorated; + } + + /** + * Gets the decorated flag. + * + * @return bool true if the output will decorate messages, false otherwise + */ + public function isDecorated() + { + return $this->decorated; + } + + /** + * Sets a new style. + * + * @param string $name The style name + * @param OutputFormatterStyleInterface $style The style instance + */ + public function setStyle($name, OutputFormatterStyleInterface $style) + { + $this->styles[strtolower($name)] = $style; + } + + /** + * Checks if output formatter has style with specified name. + * + * @param string $name + * + * @return bool + */ + public function hasStyle($name) + { + return isset($this->styles[strtolower($name)]); + } + + /** + * Gets style options from style with specified name. + * + * @param string $name + * + * @return OutputFormatterStyleInterface + * + * @throws InvalidArgumentException When style isn't defined + */ + public function getStyle($name) + { + if (!$this->hasStyle($name)) { + throw new InvalidArgumentException(sprintf('Undefined style: %s', $name)); + } + + return $this->styles[strtolower($name)]; + } + + /** + * Formats a message according to the given styles. + * + * @param string $message The message to style + * + * @return string The styled message + */ + public function format($message) + { + $message = (string) $message; + $offset = 0; + $output = ''; + $tagRegex = '[a-z][a-z0-9,_=;-]*+'; + preg_match_all("#<(($tagRegex) | /($tagRegex)?)>#ix", $message, $matches, PREG_OFFSET_CAPTURE); + foreach ($matches[0] as $i => $match) { + $pos = $match[1]; + $text = $match[0]; + + if (0 != $pos && '\\' == $message[$pos - 1]) { + continue; + } + + // add the text up to the next tag + $output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset)); + $offset = $pos + strlen($text); + + // opening tag? + if ($open = '/' != $text[1]) { + $tag = $matches[1][$i][0]; + } else { + $tag = isset($matches[3][$i][0]) ? $matches[3][$i][0] : ''; + } + + if (!$open && !$tag) { + // + $this->styleStack->pop(); + } elseif (false === $style = $this->createStyleFromString(strtolower($tag))) { + $output .= $this->applyCurrentStyle($text); + } elseif ($open) { + $this->styleStack->push($style); + } else { + $this->styleStack->pop($style); + } + } + + $output .= $this->applyCurrentStyle(substr($message, $offset)); + + if (false !== strpos($output, '<<')) { + return strtr($output, array('\\<' => '<', '<<' => '\\')); + } + + return str_replace('\\<', '<', $output); + } + + /** + * @return OutputFormatterStyleStack + */ + public function getStyleStack() + { + return $this->styleStack; + } + + /** + * Tries to create new style instance from string. + * + * @param string $string + * + * @return OutputFormatterStyle|false false if string is not format string + */ + private function createStyleFromString($string) + { + if (isset($this->styles[$string])) { + return $this->styles[$string]; + } + + if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', $string, $matches, PREG_SET_ORDER)) { + return false; + } + + $style = new OutputFormatterStyle(); + foreach ($matches as $match) { + array_shift($match); + + if ('fg' == $match[0]) { + $style->setForeground($match[1]); + } elseif ('bg' == $match[0]) { + $style->setBackground($match[1]); + } elseif ('options' === $match[0]) { + preg_match_all('([^,;]+)', $match[1], $options); + $options = array_shift($options); + foreach ($options as $option) { + try { + $style->setOption($option); + } catch (\InvalidArgumentException $e) { + @trigger_error(sprintf('Unknown style options are deprecated since version 3.2 and will be removed in 4.0. Exception "%s".', $e->getMessage()), E_USER_DEPRECATED); + + return false; + } + } + } else { + return false; + } + } + + return $style; + } + + /** + * Applies current style from stack to text, if must be applied. + * + * @param string $text Input text + * + * @return string Styled text + */ + private function applyCurrentStyle($text) + { + return $this->isDecorated() && strlen($text) > 0 ? $this->styleStack->getCurrent()->apply($text) : $text; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5a52ba096b230cb9c9faf721eb974fd48e339aee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Formatter; + +/** + * Formatter interface for console output. + * + * @author Konstantin Kudryashov + */ +interface OutputFormatterInterface +{ + /** + * Sets the decorated flag. + * + * @param bool $decorated Whether to decorate the messages or not + */ + public function setDecorated($decorated); + + /** + * Gets the decorated flag. + * + * @return bool true if the output will decorate messages, false otherwise + */ + public function isDecorated(); + + /** + * Sets a new style. + * + * @param string $name The style name + * @param OutputFormatterStyleInterface $style The style instance + */ + public function setStyle($name, OutputFormatterStyleInterface $style); + + /** + * Checks if output formatter has style with specified name. + * + * @param string $name + * + * @return bool + */ + public function hasStyle($name); + + /** + * Gets style options from style with specified name. + * + * @param string $name + * + * @return OutputFormatterStyleInterface + */ + public function getStyle($name); + + /** + * Formats a message according to the given styles. + * + * @param string $message The message to style + * + * @return string The styled message + */ + public function format($message); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php new file mode 100644 index 0000000000000000000000000000000000000000..c7c6b4a019198acac92193f458d0dd1eb8a9a6e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -0,0 +1,221 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Formatter; + +use Symfony\Component\Console\Exception\InvalidArgumentException; + +/** + * Formatter style class for defining styles. + * + * @author Konstantin Kudryashov + */ +class OutputFormatterStyle implements OutputFormatterStyleInterface +{ + private static $availableForegroundColors = array( + 'black' => array('set' => 30, 'unset' => 39), + 'red' => array('set' => 31, 'unset' => 39), + 'green' => array('set' => 32, 'unset' => 39), + 'yellow' => array('set' => 33, 'unset' => 39), + 'blue' => array('set' => 34, 'unset' => 39), + 'magenta' => array('set' => 35, 'unset' => 39), + 'cyan' => array('set' => 36, 'unset' => 39), + 'white' => array('set' => 37, 'unset' => 39), + 'default' => array('set' => 39, 'unset' => 39), + ); + private static $availableBackgroundColors = array( + 'black' => array('set' => 40, 'unset' => 49), + 'red' => array('set' => 41, 'unset' => 49), + 'green' => array('set' => 42, 'unset' => 49), + 'yellow' => array('set' => 43, 'unset' => 49), + 'blue' => array('set' => 44, 'unset' => 49), + 'magenta' => array('set' => 45, 'unset' => 49), + 'cyan' => array('set' => 46, 'unset' => 49), + 'white' => array('set' => 47, 'unset' => 49), + 'default' => array('set' => 49, 'unset' => 49), + ); + private static $availableOptions = array( + 'bold' => array('set' => 1, 'unset' => 22), + 'underscore' => array('set' => 4, 'unset' => 24), + 'blink' => array('set' => 5, 'unset' => 25), + 'reverse' => array('set' => 7, 'unset' => 27), + 'conceal' => array('set' => 8, 'unset' => 28), + ); + + private $foreground; + private $background; + private $options = array(); + + /** + * Initializes output formatter style. + * + * @param string|null $foreground The style foreground color name + * @param string|null $background The style background color name + * @param array $options The style options + */ + public function __construct($foreground = null, $background = null, array $options = array()) + { + if (null !== $foreground) { + $this->setForeground($foreground); + } + if (null !== $background) { + $this->setBackground($background); + } + if (count($options)) { + $this->setOptions($options); + } + } + + /** + * Sets style foreground color. + * + * @param string|null $color The color name + * + * @throws InvalidArgumentException When the color name isn't defined + */ + public function setForeground($color = null) + { + if (null === $color) { + $this->foreground = null; + + return; + } + + if (!isset(static::$availableForegroundColors[$color])) { + throw new InvalidArgumentException(sprintf( + 'Invalid foreground color specified: "%s". Expected one of (%s)', + $color, + implode(', ', array_keys(static::$availableForegroundColors)) + )); + } + + $this->foreground = static::$availableForegroundColors[$color]; + } + + /** + * Sets style background color. + * + * @param string|null $color The color name + * + * @throws InvalidArgumentException When the color name isn't defined + */ + public function setBackground($color = null) + { + if (null === $color) { + $this->background = null; + + return; + } + + if (!isset(static::$availableBackgroundColors[$color])) { + throw new InvalidArgumentException(sprintf( + 'Invalid background color specified: "%s". Expected one of (%s)', + $color, + implode(', ', array_keys(static::$availableBackgroundColors)) + )); + } + + $this->background = static::$availableBackgroundColors[$color]; + } + + /** + * Sets some specific style option. + * + * @param string $option The option name + * + * @throws InvalidArgumentException When the option name isn't defined + */ + public function setOption($option) + { + if (!isset(static::$availableOptions[$option])) { + throw new InvalidArgumentException(sprintf( + 'Invalid option specified: "%s". Expected one of (%s)', + $option, + implode(', ', array_keys(static::$availableOptions)) + )); + } + + if (!in_array(static::$availableOptions[$option], $this->options)) { + $this->options[] = static::$availableOptions[$option]; + } + } + + /** + * Unsets some specific style option. + * + * @param string $option The option name + * + * @throws InvalidArgumentException When the option name isn't defined + */ + public function unsetOption($option) + { + if (!isset(static::$availableOptions[$option])) { + throw new InvalidArgumentException(sprintf( + 'Invalid option specified: "%s". Expected one of (%s)', + $option, + implode(', ', array_keys(static::$availableOptions)) + )); + } + + $pos = array_search(static::$availableOptions[$option], $this->options); + if (false !== $pos) { + unset($this->options[$pos]); + } + } + + /** + * Sets multiple style options at once. + * + * @param array $options + */ + public function setOptions(array $options) + { + $this->options = array(); + + foreach ($options as $option) { + $this->setOption($option); + } + } + + /** + * Applies the style to a given text. + * + * @param string $text The text to style + * + * @return string + */ + public function apply($text) + { + $setCodes = array(); + $unsetCodes = array(); + + if (null !== $this->foreground) { + $setCodes[] = $this->foreground['set']; + $unsetCodes[] = $this->foreground['unset']; + } + if (null !== $this->background) { + $setCodes[] = $this->background['set']; + $unsetCodes[] = $this->background['unset']; + } + if (count($this->options)) { + foreach ($this->options as $option) { + $setCodes[] = $option['set']; + $unsetCodes[] = $option['unset']; + } + } + + if (0 === count($setCodes)) { + return $text; + } + + return sprintf("\033[%sm%s\033[%sm", implode(';', $setCodes), $text, implode(';', $unsetCodes)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c36fda80708d09cb59f72cf5214ad34aa2c912da --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Formatter; + +/** + * Formatter style interface for defining styles. + * + * @author Konstantin Kudryashov + */ +interface OutputFormatterStyleInterface +{ + /** + * Sets style foreground color. + * + * @param string $color The color name + */ + public function setForeground($color = null); + + /** + * Sets style background color. + * + * @param string $color The color name + */ + public function setBackground($color = null); + + /** + * Sets some specific style option. + * + * @param string $option The option name + */ + public function setOption($option); + + /** + * Unsets some specific style option. + * + * @param string $option The option name + */ + public function unsetOption($option); + + /** + * Sets multiple style options at once. + * + * @param array $options + */ + public function setOptions(array $options); + + /** + * Applies the style to a given text. + * + * @param string $text The text to style + * + * @return string + */ + public function apply($text); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php new file mode 100644 index 0000000000000000000000000000000000000000..0a531d297474b8d4eb53636f22bfeb9a0ae4670b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Formatter; + +use Symfony\Component\Console\Exception\InvalidArgumentException; + +/** + * @author Jean-François Simon + */ +class OutputFormatterStyleStack +{ + /** + * @var OutputFormatterStyleInterface[] + */ + private $styles; + + /** + * @var OutputFormatterStyleInterface + */ + private $emptyStyle; + + /** + * Constructor. + * + * @param OutputFormatterStyleInterface|null $emptyStyle + */ + public function __construct(OutputFormatterStyleInterface $emptyStyle = null) + { + $this->emptyStyle = $emptyStyle ?: new OutputFormatterStyle(); + $this->reset(); + } + + /** + * Resets stack (ie. empty internal arrays). + */ + public function reset() + { + $this->styles = array(); + } + + /** + * Pushes a style in the stack. + * + * @param OutputFormatterStyleInterface $style + */ + public function push(OutputFormatterStyleInterface $style) + { + $this->styles[] = $style; + } + + /** + * Pops a style from the stack. + * + * @param OutputFormatterStyleInterface|null $style + * + * @return OutputFormatterStyleInterface + * + * @throws InvalidArgumentException When style tags incorrectly nested + */ + public function pop(OutputFormatterStyleInterface $style = null) + { + if (empty($this->styles)) { + return $this->emptyStyle; + } + + if (null === $style) { + return array_pop($this->styles); + } + + foreach (array_reverse($this->styles, true) as $index => $stackedStyle) { + if ($style->apply('') === $stackedStyle->apply('')) { + $this->styles = array_slice($this->styles, 0, $index); + + return $stackedStyle; + } + } + + throw new InvalidArgumentException('Incorrectly nested style tag found.'); + } + + /** + * Computes current style with stacks top codes. + * + * @return OutputFormatterStyle + */ + public function getCurrent() + { + if (empty($this->styles)) { + return $this->emptyStyle; + } + + return $this->styles[count($this->styles) - 1]; + } + + /** + * @param OutputFormatterStyleInterface $emptyStyle + * + * @return $this + */ + public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle) + { + $this->emptyStyle = $emptyStyle; + + return $this; + } + + /** + * @return OutputFormatterStyleInterface + */ + public function getEmptyStyle() + { + return $this->emptyStyle; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..1119b795c8b83cee11d8e29e3054688a084f93dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +/** + * Helps outputting debug information when running an external program from a command. + * + * An external program can be a Process, an HTTP request, or anything else. + * + * @author Fabien Potencier + */ +class DebugFormatterHelper extends Helper +{ + private $colors = array('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default'); + private $started = array(); + private $count = -1; + + /** + * Starts a debug formatting session. + * + * @param string $id The id of the formatting session + * @param string $message The message to display + * @param string $prefix The prefix to use + * + * @return string + */ + public function start($id, $message, $prefix = 'RUN') + { + $this->started[$id] = array('border' => ++$this->count % count($this->colors)); + + return sprintf("%s %s %s\n", $this->getBorder($id), $prefix, $message); + } + + /** + * Adds progress to a formatting session. + * + * @param string $id The id of the formatting session + * @param string $buffer The message to display + * @param bool $error Whether to consider the buffer as error + * @param string $prefix The prefix for output + * @param string $errorPrefix The prefix for error output + * + * @return string + */ + public function progress($id, $buffer, $error = false, $prefix = 'OUT', $errorPrefix = 'ERR') + { + $message = ''; + + if ($error) { + if (isset($this->started[$id]['out'])) { + $message .= "\n"; + unset($this->started[$id]['out']); + } + if (!isset($this->started[$id]['err'])) { + $message .= sprintf('%s %s ', $this->getBorder($id), $errorPrefix); + $this->started[$id]['err'] = true; + } + + $message .= str_replace("\n", sprintf("\n%s %s ", $this->getBorder($id), $errorPrefix), $buffer); + } else { + if (isset($this->started[$id]['err'])) { + $message .= "\n"; + unset($this->started[$id]['err']); + } + if (!isset($this->started[$id]['out'])) { + $message .= sprintf('%s %s ', $this->getBorder($id), $prefix); + $this->started[$id]['out'] = true; + } + + $message .= str_replace("\n", sprintf("\n%s %s ", $this->getBorder($id), $prefix), $buffer); + } + + return $message; + } + + /** + * Stops a formatting session. + * + * @param string $id The id of the formatting session + * @param string $message The message to display + * @param bool $successful Whether to consider the result as success + * @param string $prefix The prefix for the end output + * + * @return string + */ + public function stop($id, $message, $successful, $prefix = 'RES') + { + $trailingEOL = isset($this->started[$id]['out']) || isset($this->started[$id]['err']) ? "\n" : ''; + + if ($successful) { + return sprintf("%s%s %s %s\n", $trailingEOL, $this->getBorder($id), $prefix, $message); + } + + $message = sprintf("%s%s %s %s\n", $trailingEOL, $this->getBorder($id), $prefix, $message); + + unset($this->started[$id]['out'], $this->started[$id]['err']); + + return $message; + } + + /** + * @param string $id The id of the formatting session + * + * @return string + */ + private function getBorder($id) + { + return sprintf(' ', $this->colors[$this->started[$id]['border']]); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'debug_formatter'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DescriptorHelper.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DescriptorHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..300e6455b4300fd418531cf108c6830e48a37030 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DescriptorHelper.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Descriptor\DescriptorInterface; +use Symfony\Component\Console\Descriptor\JsonDescriptor; +use Symfony\Component\Console\Descriptor\MarkdownDescriptor; +use Symfony\Component\Console\Descriptor\TextDescriptor; +use Symfony\Component\Console\Descriptor\XmlDescriptor; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Exception\InvalidArgumentException; + +/** + * This class adds helper method to describe objects in various formats. + * + * @author Jean-François Simon + */ +class DescriptorHelper extends Helper +{ + /** + * @var DescriptorInterface[] + */ + private $descriptors = array(); + + /** + * Constructor. + */ + public function __construct() + { + $this + ->register('txt', new TextDescriptor()) + ->register('xml', new XmlDescriptor()) + ->register('json', new JsonDescriptor()) + ->register('md', new MarkdownDescriptor()) + ; + } + + /** + * Describes an object if supported. + * + * Available options are: + * * format: string, the output format name + * * raw_text: boolean, sets output type as raw + * + * @param OutputInterface $output + * @param object $object + * @param array $options + * + * @throws InvalidArgumentException when the given format is not supported + */ + public function describe(OutputInterface $output, $object, array $options = array()) + { + $options = array_merge(array( + 'raw_text' => false, + 'format' => 'txt', + ), $options); + + if (!isset($this->descriptors[$options['format']])) { + throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $options['format'])); + } + + $descriptor = $this->descriptors[$options['format']]; + $descriptor->describe($output, $object, $options); + } + + /** + * Registers a descriptor. + * + * @param string $format + * @param DescriptorInterface $descriptor + * + * @return $this + */ + public function register($format, DescriptorInterface $descriptor) + { + $this->descriptors[$format] = $descriptor; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'descriptor'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/FormatterHelper.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/FormatterHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..6a48a77f269016aa440a9aacffefdfd9a271ff31 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/FormatterHelper.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Formatter\OutputFormatter; + +/** + * The Formatter class provides helpers to format messages. + * + * @author Fabien Potencier + */ +class FormatterHelper extends Helper +{ + /** + * Formats a message within a section. + * + * @param string $section The section name + * @param string $message The message + * @param string $style The style to apply to the section + * + * @return string The format section + */ + public function formatSection($section, $message, $style = 'info') + { + return sprintf('<%s>[%s] %s', $style, $section, $style, $message); + } + + /** + * Formats a message as a block of text. + * + * @param string|array $messages The message to write in the block + * @param string $style The style to apply to the whole block + * @param bool $large Whether to return a large block + * + * @return string The formatter message + */ + public function formatBlock($messages, $style, $large = false) + { + if (!is_array($messages)) { + $messages = array($messages); + } + + $len = 0; + $lines = array(); + foreach ($messages as $message) { + $message = OutputFormatter::escape($message); + $lines[] = sprintf($large ? ' %s ' : ' %s ', $message); + $len = max($this->strlen($message) + ($large ? 4 : 2), $len); + } + + $messages = $large ? array(str_repeat(' ', $len)) : array(); + for ($i = 0; isset($lines[$i]); ++$i) { + $messages[] = $lines[$i].str_repeat(' ', $len - $this->strlen($lines[$i])); + } + if ($large) { + $messages[] = str_repeat(' ', $len); + } + + for ($i = 0; isset($messages[$i]); ++$i) { + $messages[$i] = sprintf('<%s>%s', $style, $messages[$i], $style); + } + + return implode("\n", $messages); + } + + /** + * Truncates a message to the given length. + * + * @param string $message + * @param int $length + * @param string $suffix + * + * @return string + */ + public function truncate($message, $length, $suffix = '...') + { + $computedLength = $length - $this->strlen($suffix); + + if ($computedLength > $this->strlen($message)) { + return $message; + } + + if (false === $encoding = mb_detect_encoding($message, null, true)) { + return substr($message, 0, $length).$suffix; + } + + return mb_substr($message, 0, $length, $encoding).$suffix; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'formatter'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Helper.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Helper.php new file mode 100644 index 0000000000000000000000000000000000000000..9c538d1a757c9a3110528964a04d0d72acd16db9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Helper.php @@ -0,0 +1,119 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Formatter\OutputFormatterInterface; + +/** + * Helper is the base class for all helper classes. + * + * @author Fabien Potencier + */ +abstract class Helper implements HelperInterface +{ + protected $helperSet = null; + + /** + * Sets the helper set associated with this helper. + * + * @param HelperSet $helperSet A HelperSet instance + */ + public function setHelperSet(HelperSet $helperSet = null) + { + $this->helperSet = $helperSet; + } + + /** + * Gets the helper set associated with this helper. + * + * @return HelperSet|null + */ + public function getHelperSet() + { + return $this->helperSet; + } + + /** + * Returns the length of a string, using mb_strwidth if it is available. + * + * @param string $string The string to check its length + * + * @return int The length of the string + */ + public static function strlen($string) + { + if (false === $encoding = mb_detect_encoding($string, null, true)) { + return strlen($string); + } + + return mb_strwidth($string, $encoding); + } + + public static function formatTime($secs) + { + static $timeFormats = array( + array(0, '< 1 sec'), + array(1, '1 sec'), + array(2, 'secs', 1), + array(60, '1 min'), + array(120, 'mins', 60), + array(3600, '1 hr'), + array(7200, 'hrs', 3600), + array(86400, '1 day'), + array(172800, 'days', 86400), + ); + + foreach ($timeFormats as $index => $format) { + if ($secs >= $format[0]) { + if ((isset($timeFormats[$index + 1]) && $secs < $timeFormats[$index + 1][0]) + || $index == count($timeFormats) - 1 + ) { + if (2 == count($format)) { + return $format[1]; + } + + return floor($secs / $format[2]).' '.$format[1]; + } + } + } + } + + public static function formatMemory($memory) + { + if ($memory >= 1024 * 1024 * 1024) { + return sprintf('%.1f GiB', $memory / 1024 / 1024 / 1024); + } + + if ($memory >= 1024 * 1024) { + return sprintf('%.1f MiB', $memory / 1024 / 1024); + } + + if ($memory >= 1024) { + return sprintf('%d KiB', $memory / 1024); + } + + return sprintf('%d B', $memory); + } + + public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, $string) + { + $isDecorated = $formatter->isDecorated(); + $formatter->setDecorated(false); + // remove <...> formatting + $string = $formatter->format($string); + // remove already formatted characters + $string = preg_replace("/\033\[[^m]*m/", '', $string); + $formatter->setDecorated($isDecorated); + + return self::strlen($string); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/HelperInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/HelperInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5a923e0a88cb9edce3f7e4d3b9c36c5782a01e89 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/HelperInterface.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +/** + * HelperInterface is the interface all helpers must implement. + * + * @author Fabien Potencier + */ +interface HelperInterface +{ + /** + * Sets the helper set associated with this helper. + * + * @param HelperSet $helperSet A HelperSet instance + */ + public function setHelperSet(HelperSet $helperSet = null); + + /** + * Gets the helper set associated with this helper. + * + * @return HelperSet A HelperSet instance + */ + public function getHelperSet(); + + /** + * Returns the canonical name of this helper. + * + * @return string The canonical name + */ + public function getName(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/HelperSet.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/HelperSet.php new file mode 100644 index 0000000000000000000000000000000000000000..6f12b39d98cadbf9c5c782fd28c4b8c8a094b333 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/HelperSet.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Exception\InvalidArgumentException; + +/** + * HelperSet represents a set of helpers to be used with a command. + * + * @author Fabien Potencier + */ +class HelperSet implements \IteratorAggregate +{ + /** + * @var Helper[] + */ + private $helpers = array(); + private $command; + + /** + * Constructor. + * + * @param Helper[] $helpers An array of helper + */ + public function __construct(array $helpers = array()) + { + foreach ($helpers as $alias => $helper) { + $this->set($helper, is_int($alias) ? null : $alias); + } + } + + /** + * Sets a helper. + * + * @param HelperInterface $helper The helper instance + * @param string $alias An alias + */ + public function set(HelperInterface $helper, $alias = null) + { + $this->helpers[$helper->getName()] = $helper; + if (null !== $alias) { + $this->helpers[$alias] = $helper; + } + + $helper->setHelperSet($this); + } + + /** + * Returns true if the helper if defined. + * + * @param string $name The helper name + * + * @return bool true if the helper is defined, false otherwise + */ + public function has($name) + { + return isset($this->helpers[$name]); + } + + /** + * Gets a helper value. + * + * @param string $name The helper name + * + * @return HelperInterface The helper instance + * + * @throws InvalidArgumentException if the helper is not defined + */ + public function get($name) + { + if (!$this->has($name)) { + throw new InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name)); + } + + return $this->helpers[$name]; + } + + /** + * Sets the command associated with this helper set. + * + * @param Command $command A Command instance + */ + public function setCommand(Command $command = null) + { + $this->command = $command; + } + + /** + * Gets the command associated with this helper set. + * + * @return Command A Command instance + */ + public function getCommand() + { + return $this->command; + } + + /** + * @return Helper[] + */ + public function getIterator() + { + return new \ArrayIterator($this->helpers); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/InputAwareHelper.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/InputAwareHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..4261767423b546d7606fead36607d95e4315fb2a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/InputAwareHelper.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputAwareInterface; + +/** + * An implementation of InputAwareInterface for Helpers. + * + * @author Wouter J + */ +abstract class InputAwareHelper extends Helper implements InputAwareInterface +{ + protected $input; + + /** + * {@inheritdoc} + */ + public function setInput(InputInterface $input) + { + $this->input = $input; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProcessHelper.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProcessHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..2c46a2c39d0b2e67f9d1d34a8d3e6cfa3790c3da --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProcessHelper.php @@ -0,0 +1,144 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Process\Exception\ProcessFailedException; +use Symfony\Component\Process\Process; +use Symfony\Component\Process\ProcessBuilder; + +/** + * The ProcessHelper class provides helpers to run external processes. + * + * @author Fabien Potencier + */ +class ProcessHelper extends Helper +{ + /** + * Runs an external process. + * + * @param OutputInterface $output An OutputInterface instance + * @param string|array|Process $cmd An instance of Process or an array of arguments to escape and run or a command to run + * @param string|null $error An error message that must be displayed if something went wrong + * @param callable|null $callback A PHP callback to run whenever there is some + * output available on STDOUT or STDERR + * @param int $verbosity The threshold for verbosity + * + * @return Process The process that ran + */ + public function run(OutputInterface $output, $cmd, $error = null, callable $callback = null, $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE) + { + if ($output instanceof ConsoleOutputInterface) { + $output = $output->getErrorOutput(); + } + + $formatter = $this->getHelperSet()->get('debug_formatter'); + + if (is_array($cmd)) { + $process = ProcessBuilder::create($cmd)->getProcess(); + } elseif ($cmd instanceof Process) { + $process = $cmd; + } else { + $process = new Process($cmd); + } + + if ($verbosity <= $output->getVerbosity()) { + $output->write($formatter->start(spl_object_hash($process), $this->escapeString($process->getCommandLine()))); + } + + if ($output->isDebug()) { + $callback = $this->wrapCallback($output, $process, $callback); + } + + $process->run($callback); + + if ($verbosity <= $output->getVerbosity()) { + $message = $process->isSuccessful() ? 'Command ran successfully' : sprintf('%s Command did not run successfully', $process->getExitCode()); + $output->write($formatter->stop(spl_object_hash($process), $message, $process->isSuccessful())); + } + + if (!$process->isSuccessful() && null !== $error) { + $output->writeln(sprintf('%s', $this->escapeString($error))); + } + + return $process; + } + + /** + * Runs the process. + * + * This is identical to run() except that an exception is thrown if the process + * exits with a non-zero exit code. + * + * @param OutputInterface $output An OutputInterface instance + * @param string|Process $cmd An instance of Process or a command to run + * @param string|null $error An error message that must be displayed if something went wrong + * @param callable|null $callback A PHP callback to run whenever there is some + * output available on STDOUT or STDERR + * + * @return Process The process that ran + * + * @throws ProcessFailedException + * + * @see run() + */ + public function mustRun(OutputInterface $output, $cmd, $error = null, callable $callback = null) + { + $process = $this->run($output, $cmd, $error, $callback); + + if (!$process->isSuccessful()) { + throw new ProcessFailedException($process); + } + + return $process; + } + + /** + * Wraps a Process callback to add debugging output. + * + * @param OutputInterface $output An OutputInterface interface + * @param Process $process The Process + * @param callable|null $callback A PHP callable + * + * @return callable + */ + public function wrapCallback(OutputInterface $output, Process $process, callable $callback = null) + { + if ($output instanceof ConsoleOutputInterface) { + $output = $output->getErrorOutput(); + } + + $formatter = $this->getHelperSet()->get('debug_formatter'); + + return function ($type, $buffer) use ($output, $process, $callback, $formatter) { + $output->write($formatter->progress(spl_object_hash($process), $this->escapeString($buffer), Process::ERR === $type)); + + if (null !== $callback) { + call_user_func($callback, $type, $buffer); + } + }; + } + + private function escapeString($str) + { + return str_replace('<', '\\<', $str); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'process'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressBar.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressBar.php new file mode 100644 index 0000000000000000000000000000000000000000..8212bedbf804198dae7df3d7f89cb9426445045f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressBar.php @@ -0,0 +1,616 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Console\Terminal; + +/** + * The ProgressBar provides helpers to display progress output. + * + * @author Fabien Potencier + * @author Chris Jones + */ +class ProgressBar +{ + // options + private $barWidth = 28; + private $barChar; + private $emptyBarChar = '-'; + private $progressChar = '>'; + private $format; + private $internalFormat; + private $redrawFreq = 1; + + /** + * @var OutputInterface + */ + private $output; + private $step = 0; + private $max; + private $startTime; + private $stepWidth; + private $percent = 0.0; + private $formatLineCount; + private $messages = array(); + private $overwrite = true; + private $terminal; + private $firstRun = true; + + private static $formatters; + private static $formats; + + /** + * @param OutputInterface $output An OutputInterface instance + * @param int $max Maximum steps (0 if unknown) + */ + public function __construct(OutputInterface $output, $max = 0) + { + if ($output instanceof ConsoleOutputInterface) { + $output = $output->getErrorOutput(); + } + + $this->output = $output; + $this->setMaxSteps($max); + $this->terminal = new Terminal(); + + if (!$this->output->isDecorated()) { + // disable overwrite when output does not support ANSI codes. + $this->overwrite = false; + + // set a reasonable redraw frequency so output isn't flooded + $this->setRedrawFrequency($max / 10); + } + + $this->startTime = time(); + } + + /** + * Sets a placeholder formatter for a given name. + * + * This method also allow you to override an existing placeholder. + * + * @param string $name The placeholder name (including the delimiter char like %) + * @param callable $callable A PHP callable + */ + public static function setPlaceholderFormatterDefinition($name, callable $callable) + { + if (!self::$formatters) { + self::$formatters = self::initPlaceholderFormatters(); + } + + self::$formatters[$name] = $callable; + } + + /** + * Gets the placeholder formatter for a given name. + * + * @param string $name The placeholder name (including the delimiter char like %) + * + * @return callable|null A PHP callable + */ + public static function getPlaceholderFormatterDefinition($name) + { + if (!self::$formatters) { + self::$formatters = self::initPlaceholderFormatters(); + } + + return isset(self::$formatters[$name]) ? self::$formatters[$name] : null; + } + + /** + * Sets a format for a given name. + * + * This method also allow you to override an existing format. + * + * @param string $name The format name + * @param string $format A format string + */ + public static function setFormatDefinition($name, $format) + { + if (!self::$formats) { + self::$formats = self::initFormats(); + } + + self::$formats[$name] = $format; + } + + /** + * Gets the format for a given name. + * + * @param string $name The format name + * + * @return string|null A format string + */ + public static function getFormatDefinition($name) + { + if (!self::$formats) { + self::$formats = self::initFormats(); + } + + return isset(self::$formats[$name]) ? self::$formats[$name] : null; + } + + /** + * Associates a text with a named placeholder. + * + * The text is displayed when the progress bar is rendered but only + * when the corresponding placeholder is part of the custom format line + * (by wrapping the name with %). + * + * @param string $message The text to associate with the placeholder + * @param string $name The name of the placeholder + */ + public function setMessage($message, $name = 'message') + { + $this->messages[$name] = $message; + } + + public function getMessage($name = 'message') + { + return $this->messages[$name]; + } + + /** + * Gets the progress bar start time. + * + * @return int The progress bar start time + */ + public function getStartTime() + { + return $this->startTime; + } + + /** + * Gets the progress bar maximal steps. + * + * @return int The progress bar max steps + */ + public function getMaxSteps() + { + return $this->max; + } + + /** + * Gets the current step position. + * + * @return int The progress bar step + */ + public function getProgress() + { + return $this->step; + } + + /** + * Gets the progress bar step width. + * + * @return int The progress bar step width + */ + private function getStepWidth() + { + return $this->stepWidth; + } + + /** + * Gets the current progress bar percent. + * + * @return float The current progress bar percent + */ + public function getProgressPercent() + { + return $this->percent; + } + + /** + * Sets the progress bar width. + * + * @param int $size The progress bar size + */ + public function setBarWidth($size) + { + $this->barWidth = max(1, (int) $size); + } + + /** + * Gets the progress bar width. + * + * @return int The progress bar size + */ + public function getBarWidth() + { + return $this->barWidth; + } + + /** + * Sets the bar character. + * + * @param string $char A character + */ + public function setBarCharacter($char) + { + $this->barChar = $char; + } + + /** + * Gets the bar character. + * + * @return string A character + */ + public function getBarCharacter() + { + if (null === $this->barChar) { + return $this->max ? '=' : $this->emptyBarChar; + } + + return $this->barChar; + } + + /** + * Sets the empty bar character. + * + * @param string $char A character + */ + public function setEmptyBarCharacter($char) + { + $this->emptyBarChar = $char; + } + + /** + * Gets the empty bar character. + * + * @return string A character + */ + public function getEmptyBarCharacter() + { + return $this->emptyBarChar; + } + + /** + * Sets the progress bar character. + * + * @param string $char A character + */ + public function setProgressCharacter($char) + { + $this->progressChar = $char; + } + + /** + * Gets the progress bar character. + * + * @return string A character + */ + public function getProgressCharacter() + { + return $this->progressChar; + } + + /** + * Sets the progress bar format. + * + * @param string $format The format + */ + public function setFormat($format) + { + $this->format = null; + $this->internalFormat = $format; + } + + /** + * Sets the redraw frequency. + * + * @param int|float $freq The frequency in steps + */ + public function setRedrawFrequency($freq) + { + $this->redrawFreq = max((int) $freq, 1); + } + + /** + * Starts the progress output. + * + * @param int|null $max Number of steps to complete the bar (0 if indeterminate), null to leave unchanged + */ + public function start($max = null) + { + $this->startTime = time(); + $this->step = 0; + $this->percent = 0.0; + + if (null !== $max) { + $this->setMaxSteps($max); + } + + $this->display(); + } + + /** + * Advances the progress output X steps. + * + * @param int $step Number of steps to advance + */ + public function advance($step = 1) + { + $this->setProgress($this->step + $step); + } + + /** + * Sets whether to overwrite the progressbar, false for new line. + * + * @param bool $overwrite + */ + public function setOverwrite($overwrite) + { + $this->overwrite = (bool) $overwrite; + } + + /** + * Sets the current progress. + * + * @param int $step The current progress + */ + public function setProgress($step) + { + $step = (int) $step; + + if ($this->max && $step > $this->max) { + $this->max = $step; + } elseif ($step < 0) { + $step = 0; + } + + $prevPeriod = (int) ($this->step / $this->redrawFreq); + $currPeriod = (int) ($step / $this->redrawFreq); + $this->step = $step; + $this->percent = $this->max ? (float) $this->step / $this->max : 0; + if ($prevPeriod !== $currPeriod || $this->max === $step) { + $this->display(); + } + } + + /** + * Finishes the progress output. + */ + public function finish() + { + if (!$this->max) { + $this->max = $this->step; + } + + if ($this->step === $this->max && !$this->overwrite) { + // prevent double 100% output + return; + } + + $this->setProgress($this->max); + } + + /** + * Outputs the current progress string. + */ + public function display() + { + if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) { + return; + } + + if (null === $this->format) { + $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat()); + } + + $this->overwrite($this->buildLine()); + } + + /** + * Removes the progress bar from the current line. + * + * This is useful if you wish to write some output + * while a progress bar is running. + * Call display() to show the progress bar again. + */ + public function clear() + { + if (!$this->overwrite) { + return; + } + + if (null === $this->format) { + $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat()); + } + + $this->overwrite(''); + } + + /** + * Sets the progress bar format. + * + * @param string $format The format + */ + private function setRealFormat($format) + { + // try to use the _nomax variant if available + if (!$this->max && null !== self::getFormatDefinition($format.'_nomax')) { + $this->format = self::getFormatDefinition($format.'_nomax'); + } elseif (null !== self::getFormatDefinition($format)) { + $this->format = self::getFormatDefinition($format); + } else { + $this->format = $format; + } + + $this->formatLineCount = substr_count($this->format, "\n"); + } + + /** + * Sets the progress bar maximal steps. + * + * @param int $max The progress bar max steps + */ + private function setMaxSteps($max) + { + $this->max = max(0, (int) $max); + $this->stepWidth = $this->max ? Helper::strlen($this->max) : 4; + } + + /** + * Overwrites a previous message to the output. + * + * @param string $message The message + */ + private function overwrite($message) + { + if ($this->overwrite) { + if (!$this->firstRun) { + // Move the cursor to the beginning of the line + $this->output->write("\x0D"); + + // Erase the line + $this->output->write("\x1B[2K"); + + // Erase previous lines + if ($this->formatLineCount > 0) { + $this->output->write(str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount)); + } + } + } elseif ($this->step > 0) { + $this->output->writeln(''); + } + + $this->firstRun = false; + + $this->output->write($message); + } + + private function determineBestFormat() + { + switch ($this->output->getVerbosity()) { + // OutputInterface::VERBOSITY_QUIET: display is disabled anyway + case OutputInterface::VERBOSITY_VERBOSE: + return $this->max ? 'verbose' : 'verbose_nomax'; + case OutputInterface::VERBOSITY_VERY_VERBOSE: + return $this->max ? 'very_verbose' : 'very_verbose_nomax'; + case OutputInterface::VERBOSITY_DEBUG: + return $this->max ? 'debug' : 'debug_nomax'; + default: + return $this->max ? 'normal' : 'normal_nomax'; + } + } + + private static function initPlaceholderFormatters() + { + return array( + 'bar' => function (ProgressBar $bar, OutputInterface $output) { + $completeBars = floor($bar->getMaxSteps() > 0 ? $bar->getProgressPercent() * $bar->getBarWidth() : $bar->getProgress() % $bar->getBarWidth()); + $display = str_repeat($bar->getBarCharacter(), $completeBars); + if ($completeBars < $bar->getBarWidth()) { + $emptyBars = $bar->getBarWidth() - $completeBars - Helper::strlenWithoutDecoration($output->getFormatter(), $bar->getProgressCharacter()); + $display .= $bar->getProgressCharacter().str_repeat($bar->getEmptyBarCharacter(), $emptyBars); + } + + return $display; + }, + 'elapsed' => function (ProgressBar $bar) { + return Helper::formatTime(time() - $bar->getStartTime()); + }, + 'remaining' => function (ProgressBar $bar) { + if (!$bar->getMaxSteps()) { + throw new LogicException('Unable to display the remaining time if the maximum number of steps is not set.'); + } + + if (!$bar->getProgress()) { + $remaining = 0; + } else { + $remaining = round((time() - $bar->getStartTime()) / $bar->getProgress() * ($bar->getMaxSteps() - $bar->getProgress())); + } + + return Helper::formatTime($remaining); + }, + 'estimated' => function (ProgressBar $bar) { + if (!$bar->getMaxSteps()) { + throw new LogicException('Unable to display the estimated time if the maximum number of steps is not set.'); + } + + if (!$bar->getProgress()) { + $estimated = 0; + } else { + $estimated = round((time() - $bar->getStartTime()) / $bar->getProgress() * $bar->getMaxSteps()); + } + + return Helper::formatTime($estimated); + }, + 'memory' => function (ProgressBar $bar) { + return Helper::formatMemory(memory_get_usage(true)); + }, + 'current' => function (ProgressBar $bar) { + return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', STR_PAD_LEFT); + }, + 'max' => function (ProgressBar $bar) { + return $bar->getMaxSteps(); + }, + 'percent' => function (ProgressBar $bar) { + return floor($bar->getProgressPercent() * 100); + }, + ); + } + + private static function initFormats() + { + return array( + 'normal' => ' %current%/%max% [%bar%] %percent:3s%%', + 'normal_nomax' => ' %current% [%bar%]', + + 'verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%', + 'verbose_nomax' => ' %current% [%bar%] %elapsed:6s%', + + 'very_verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s%', + 'very_verbose_nomax' => ' %current% [%bar%] %elapsed:6s%', + + 'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%', + 'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%', + ); + } + + /** + * @return string + */ + private function buildLine() + { + $regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i"; + $callback = function ($matches) { + if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) { + $text = call_user_func($formatter, $this, $this->output); + } elseif (isset($this->messages[$matches[1]])) { + $text = $this->messages[$matches[1]]; + } else { + return $matches[0]; + } + + if (isset($matches[2])) { + $text = sprintf('%'.$matches[2], $text); + } + + return $text; + }; + $line = preg_replace_callback($regex, $callback, $this->format); + + $lineLength = Helper::strlenWithoutDecoration($this->output->getFormatter(), $line); + $terminalWidth = $this->terminal->getWidth(); + if ($lineLength <= $terminalWidth) { + return $line; + } + + $this->setBarWidth($this->barWidth - $lineLength + $terminalWidth); + + return preg_replace_callback($regex, $callback, $this->format); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressIndicator.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressIndicator.php new file mode 100644 index 0000000000000000000000000000000000000000..d441accd46e117d373d090ef04843d8b76444c31 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/ProgressIndicator.php @@ -0,0 +1,271 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * @author Kevin Bond + */ +class ProgressIndicator +{ + private $output; + private $startTime; + private $format; + private $message; + private $indicatorValues; + private $indicatorCurrent; + private $indicatorChangeInterval; + private $indicatorUpdateTime; + private $started = false; + + private static $formatters; + private static $formats; + + /** + * @param OutputInterface $output + * @param string|null $format Indicator format + * @param int $indicatorChangeInterval Change interval in milliseconds + * @param array|null $indicatorValues Animated indicator characters + */ + public function __construct(OutputInterface $output, $format = null, $indicatorChangeInterval = 100, $indicatorValues = null) + { + $this->output = $output; + + if (null === $format) { + $format = $this->determineBestFormat(); + } + + if (null === $indicatorValues) { + $indicatorValues = array('-', '\\', '|', '/'); + } + + $indicatorValues = array_values($indicatorValues); + + if (2 > count($indicatorValues)) { + throw new InvalidArgumentException('Must have at least 2 indicator value characters.'); + } + + $this->format = self::getFormatDefinition($format); + $this->indicatorChangeInterval = $indicatorChangeInterval; + $this->indicatorValues = $indicatorValues; + $this->startTime = time(); + } + + /** + * Sets the current indicator message. + * + * @param string|null $message + */ + public function setMessage($message) + { + $this->message = $message; + + $this->display(); + } + + /** + * Starts the indicator output. + * + * @param $message + */ + public function start($message) + { + if ($this->started) { + throw new LogicException('Progress indicator already started.'); + } + + $this->message = $message; + $this->started = true; + $this->startTime = time(); + $this->indicatorUpdateTime = $this->getCurrentTimeInMilliseconds() + $this->indicatorChangeInterval; + $this->indicatorCurrent = 0; + + $this->display(); + } + + /** + * Advances the indicator. + */ + public function advance() + { + if (!$this->started) { + throw new LogicException('Progress indicator has not yet been started.'); + } + + if (!$this->output->isDecorated()) { + return; + } + + $currentTime = $this->getCurrentTimeInMilliseconds(); + + if ($currentTime < $this->indicatorUpdateTime) { + return; + } + + $this->indicatorUpdateTime = $currentTime + $this->indicatorChangeInterval; + ++$this->indicatorCurrent; + + $this->display(); + } + + /** + * Finish the indicator with message. + * + * @param $message + */ + public function finish($message) + { + if (!$this->started) { + throw new LogicException('Progress indicator has not yet been started.'); + } + + $this->message = $message; + $this->display(); + $this->output->writeln(''); + $this->started = false; + } + + /** + * Gets the format for a given name. + * + * @param string $name The format name + * + * @return string|null A format string + */ + public static function getFormatDefinition($name) + { + if (!self::$formats) { + self::$formats = self::initFormats(); + } + + return isset(self::$formats[$name]) ? self::$formats[$name] : null; + } + + /** + * Sets a placeholder formatter for a given name. + * + * This method also allow you to override an existing placeholder. + * + * @param string $name The placeholder name (including the delimiter char like %) + * @param callable $callable A PHP callable + */ + public static function setPlaceholderFormatterDefinition($name, $callable) + { + if (!self::$formatters) { + self::$formatters = self::initPlaceholderFormatters(); + } + + self::$formatters[$name] = $callable; + } + + /** + * Gets the placeholder formatter for a given name. + * + * @param string $name The placeholder name (including the delimiter char like %) + * + * @return callable|null A PHP callable + */ + public static function getPlaceholderFormatterDefinition($name) + { + if (!self::$formatters) { + self::$formatters = self::initPlaceholderFormatters(); + } + + return isset(self::$formatters[$name]) ? self::$formatters[$name] : null; + } + + private function display() + { + if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) { + return; + } + + $self = $this; + + $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) use ($self) { + if ($formatter = $self::getPlaceholderFormatterDefinition($matches[1])) { + return call_user_func($formatter, $self); + } + + return $matches[0]; + }, $this->format)); + } + + private function determineBestFormat() + { + switch ($this->output->getVerbosity()) { + // OutputInterface::VERBOSITY_QUIET: display is disabled anyway + case OutputInterface::VERBOSITY_VERBOSE: + return $this->output->isDecorated() ? 'verbose' : 'verbose_no_ansi'; + case OutputInterface::VERBOSITY_VERY_VERBOSE: + case OutputInterface::VERBOSITY_DEBUG: + return $this->output->isDecorated() ? 'very_verbose' : 'very_verbose_no_ansi'; + default: + return $this->output->isDecorated() ? 'normal' : 'normal_no_ansi'; + } + } + + /** + * Overwrites a previous message to the output. + * + * @param string $message The message + */ + private function overwrite($message) + { + if ($this->output->isDecorated()) { + $this->output->write("\x0D\x1B[2K"); + $this->output->write($message); + } else { + $this->output->writeln($message); + } + } + + private function getCurrentTimeInMilliseconds() + { + return round(microtime(true) * 1000); + } + + private static function initPlaceholderFormatters() + { + return array( + 'indicator' => function (ProgressIndicator $indicator) { + return $indicator->indicatorValues[$indicator->indicatorCurrent % count($indicator->indicatorValues)]; + }, + 'message' => function (ProgressIndicator $indicator) { + return $indicator->message; + }, + 'elapsed' => function (ProgressIndicator $indicator) { + return Helper::formatTime(time() - $indicator->startTime); + }, + 'memory' => function () { + return Helper::formatMemory(memory_get_usage(true)); + }, + ); + } + + private static function initFormats() + { + return array( + 'normal' => ' %indicator% %message%', + 'normal_no_ansi' => ' %message%', + + 'verbose' => ' %indicator% %message% (%elapsed:6s%)', + 'verbose_no_ansi' => ' %message% (%elapsed:6s%)', + + 'very_verbose' => ' %indicator% %message% (%elapsed:6s%, %memory:6s%)', + 'very_verbose_no_ansi' => ' %message% (%elapsed:6s%, %memory:6s%)', + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/QuestionHelper.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/QuestionHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..fe58bb9fa1fb2f6cec130eac4ac8662d97c9747a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -0,0 +1,466 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\RuntimeException; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\StreamableInputInterface; +use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Formatter\OutputFormatterStyle; +use Symfony\Component\Console\Question\Question; +use Symfony\Component\Console\Question\ChoiceQuestion; + +/** + * The QuestionHelper class provides helpers to interact with the user. + * + * @author Fabien Potencier + */ +class QuestionHelper extends Helper +{ + private $inputStream; + private static $shell; + private static $stty; + + /** + * Asks a question to the user. + * + * @param InputInterface $input An InputInterface instance + * @param OutputInterface $output An OutputInterface instance + * @param Question $question The question to ask + * + * @return mixed The user answer + * + * @throws RuntimeException If there is no data to read in the input stream + */ + public function ask(InputInterface $input, OutputInterface $output, Question $question) + { + if ($output instanceof ConsoleOutputInterface) { + $output = $output->getErrorOutput(); + } + + if (!$input->isInteractive()) { + return $question->getDefault(); + } + + if ($input instanceof StreamableInputInterface && $stream = $input->getStream()) { + $this->inputStream = $stream; + } + + if (!$question->getValidator()) { + return $this->doAsk($output, $question); + } + + $interviewer = function () use ($output, $question) { + return $this->doAsk($output, $question); + }; + + return $this->validateAttempts($interviewer, $output, $question); + } + + /** + * Sets the input stream to read from when interacting with the user. + * + * This is mainly useful for testing purpose. + * + * @deprecated since version 3.2, to be removed in 4.0. Use + * StreamableInputInterface::setStream() instead. + * + * @param resource $stream The input stream + * + * @throws InvalidArgumentException In case the stream is not a resource + */ + public function setInputStream($stream) + { + @trigger_error(sprintf('The %s() method is deprecated since version 3.2 and will be removed in 4.0. Use %s::setStream() instead.', __METHOD__, StreamableInputInterface::class), E_USER_DEPRECATED); + + if (!is_resource($stream)) { + throw new InvalidArgumentException('Input stream must be a valid resource.'); + } + + $this->inputStream = $stream; + } + + /** + * Returns the helper's input stream. + * + * @deprecated since version 3.2, to be removed in 4.0. Use + * StreamableInputInterface::getStream() instead. + * + * @return resource + */ + public function getInputStream() + { + if (0 === func_num_args() || func_get_arg(0)) { + @trigger_error(sprintf('The %s() method is deprecated since version 3.2 and will be removed in 4.0. Use %s::getStream() instead.', __METHOD__, StreamableInputInterface::class), E_USER_DEPRECATED); + } + + return $this->inputStream; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'question'; + } + + /** + * Asks the question to the user. + * + * @param OutputInterface $output + * @param Question $question + * + * @return bool|mixed|null|string + * + * @throws \Exception + * @throws \RuntimeException + */ + private function doAsk(OutputInterface $output, Question $question) + { + $this->writePrompt($output, $question); + + $inputStream = $this->inputStream ?: STDIN; + $autocomplete = $question->getAutocompleterValues(); + + if (null === $autocomplete || !$this->hasSttyAvailable()) { + $ret = false; + if ($question->isHidden()) { + try { + $ret = trim($this->getHiddenResponse($output, $inputStream)); + } catch (\RuntimeException $e) { + if (!$question->isHiddenFallback()) { + throw $e; + } + } + } + + if (false === $ret) { + $ret = fgets($inputStream, 4096); + if (false === $ret) { + throw new RuntimeException('Aborted'); + } + $ret = trim($ret); + } + } else { + $ret = trim($this->autocomplete($output, $question, $inputStream)); + } + + $ret = strlen($ret) > 0 ? $ret : $question->getDefault(); + + if ($normalizer = $question->getNormalizer()) { + return $normalizer($ret); + } + + return $ret; + } + + /** + * Outputs the question prompt. + * + * @param OutputInterface $output + * @param Question $question + */ + protected function writePrompt(OutputInterface $output, Question $question) + { + $message = $question->getQuestion(); + + if ($question instanceof ChoiceQuestion) { + $maxWidth = max(array_map(array($this, 'strlen'), array_keys($question->getChoices()))); + + $messages = (array) $question->getQuestion(); + foreach ($question->getChoices() as $key => $value) { + $width = $maxWidth - $this->strlen($key); + $messages[] = ' ['.$key.str_repeat(' ', $width).'] '.$value; + } + + $output->writeln($messages); + + $message = $question->getPrompt(); + } + + $output->write($message); + } + + /** + * Outputs an error message. + * + * @param OutputInterface $output + * @param \Exception $error + */ + protected function writeError(OutputInterface $output, \Exception $error) + { + if (null !== $this->getHelperSet() && $this->getHelperSet()->has('formatter')) { + $message = $this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error'); + } else { + $message = ''.$error->getMessage().''; + } + + $output->writeln($message); + } + + /** + * Autocompletes a question. + * + * @param OutputInterface $output + * @param Question $question + * @param resource $inputStream + * + * @return string + */ + private function autocomplete(OutputInterface $output, Question $question, $inputStream) + { + $autocomplete = $question->getAutocompleterValues(); + $ret = ''; + + $i = 0; + $ofs = -1; + $matches = $autocomplete; + $numMatches = count($matches); + + $sttyMode = shell_exec('stty -g'); + + // Disable icanon (so we can fread each keypress) and echo (we'll do echoing here instead) + shell_exec('stty -icanon -echo'); + + // Add highlighted text style + $output->getFormatter()->setStyle('hl', new OutputFormatterStyle('black', 'white')); + + // Read a keypress + while (!feof($inputStream)) { + $c = fread($inputStream, 1); + + // Backspace Character + if ("\177" === $c) { + if (0 === $numMatches && 0 !== $i) { + --$i; + // Move cursor backwards + $output->write("\033[1D"); + } + + if ($i === 0) { + $ofs = -1; + $matches = $autocomplete; + $numMatches = count($matches); + } else { + $numMatches = 0; + } + + // Pop the last character off the end of our string + $ret = substr($ret, 0, $i); + } elseif ("\033" === $c) { + // Did we read an escape sequence? + $c .= fread($inputStream, 2); + + // A = Up Arrow. B = Down Arrow + if (isset($c[2]) && ('A' === $c[2] || 'B' === $c[2])) { + if ('A' === $c[2] && -1 === $ofs) { + $ofs = 0; + } + + if (0 === $numMatches) { + continue; + } + + $ofs += ('A' === $c[2]) ? -1 : 1; + $ofs = ($numMatches + $ofs) % $numMatches; + } + } elseif (ord($c) < 32) { + if ("\t" === $c || "\n" === $c) { + if ($numMatches > 0 && -1 !== $ofs) { + $ret = $matches[$ofs]; + // Echo out remaining chars for current match + $output->write(substr($ret, $i)); + $i = strlen($ret); + } + + if ("\n" === $c) { + $output->write($c); + break; + } + + $numMatches = 0; + } + + continue; + } else { + $output->write($c); + $ret .= $c; + ++$i; + + $numMatches = 0; + $ofs = 0; + + foreach ($autocomplete as $value) { + // If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle) + if (0 === strpos($value, $ret) && $i !== strlen($value)) { + $matches[$numMatches++] = $value; + } + } + } + + // Erase characters from cursor to end of line + $output->write("\033[K"); + + if ($numMatches > 0 && -1 !== $ofs) { + // Save cursor position + $output->write("\0337"); + // Write highlighted text + $output->write(''.substr($matches[$ofs], $i).''); + // Restore cursor position + $output->write("\0338"); + } + } + + // Reset stty so it behaves normally again + shell_exec(sprintf('stty %s', $sttyMode)); + + return $ret; + } + + /** + * Gets a hidden response from user. + * + * @param OutputInterface $output An Output instance + * @param resource $inputStream The handler resource + * + * @return string The answer + * + * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden + */ + private function getHiddenResponse(OutputInterface $output, $inputStream) + { + if ('\\' === DIRECTORY_SEPARATOR) { + $exe = __DIR__.'/../Resources/bin/hiddeninput.exe'; + + // handle code running from a phar + if ('phar:' === substr(__FILE__, 0, 5)) { + $tmpExe = sys_get_temp_dir().'/hiddeninput.exe'; + copy($exe, $tmpExe); + $exe = $tmpExe; + } + + $value = rtrim(shell_exec($exe)); + $output->writeln(''); + + if (isset($tmpExe)) { + unlink($tmpExe); + } + + return $value; + } + + if ($this->hasSttyAvailable()) { + $sttyMode = shell_exec('stty -g'); + + shell_exec('stty -echo'); + $value = fgets($inputStream, 4096); + shell_exec(sprintf('stty %s', $sttyMode)); + + if (false === $value) { + throw new RuntimeException('Aborted'); + } + + $value = trim($value); + $output->writeln(''); + + return $value; + } + + if (false !== $shell = $this->getShell()) { + $readCmd = $shell === 'csh' ? 'set mypassword = $<' : 'read -r mypassword'; + $command = sprintf("/usr/bin/env %s -c 'stty -echo; %s; stty echo; echo \$mypassword'", $shell, $readCmd); + $value = rtrim(shell_exec($command)); + $output->writeln(''); + + return $value; + } + + throw new RuntimeException('Unable to hide the response.'); + } + + /** + * Validates an attempt. + * + * @param callable $interviewer A callable that will ask for a question and return the result + * @param OutputInterface $output An Output instance + * @param Question $question A Question instance + * + * @return mixed The validated response + * + * @throws \Exception In case the max number of attempts has been reached and no valid response has been given + */ + private function validateAttempts(callable $interviewer, OutputInterface $output, Question $question) + { + $error = null; + $attempts = $question->getMaxAttempts(); + while (null === $attempts || $attempts--) { + if (null !== $error) { + $this->writeError($output, $error); + } + + try { + return call_user_func($question->getValidator(), $interviewer()); + } catch (RuntimeException $e) { + throw $e; + } catch (\Exception $error) { + } + } + + throw $error; + } + + /** + * Returns a valid unix shell. + * + * @return string|bool The valid shell name, false in case no valid shell is found + */ + private function getShell() + { + if (null !== self::$shell) { + return self::$shell; + } + + self::$shell = false; + + if (file_exists('/usr/bin/env')) { + // handle other OSs with bash/zsh/ksh/csh if available to hide the answer + $test = "/usr/bin/env %s -c 'echo OK' 2> /dev/null"; + foreach (array('bash', 'zsh', 'ksh', 'csh') as $sh) { + if ('OK' === rtrim(shell_exec(sprintf($test, $sh)))) { + self::$shell = $sh; + break; + } + } + } + + return self::$shell; + } + + /** + * Returns whether Stty is available or not. + * + * @return bool + */ + private function hasSttyAvailable() + { + if (null !== self::$stty) { + return self::$stty; + } + + exec('stty 2>&1', $output, $exitcode); + + return self::$stty = $exitcode === 0; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..25e094a04f45ca964d5d29e49adba714e455ff53 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Question\ChoiceQuestion; +use Symfony\Component\Console\Question\ConfirmationQuestion; +use Symfony\Component\Console\Question\Question; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Console\Formatter\OutputFormatter; + +/** + * Symfony Style Guide compliant question helper. + * + * @author Kevin Bond + */ +class SymfonyQuestionHelper extends QuestionHelper +{ + /** + * {@inheritdoc} + */ + public function ask(InputInterface $input, OutputInterface $output, Question $question) + { + $validator = $question->getValidator(); + $question->setValidator(function ($value) use ($validator) { + if (null !== $validator) { + $value = $validator($value); + } else { + // make required + if (!is_array($value) && !is_bool($value) && 0 === strlen($value)) { + throw new LogicException('A value is required.'); + } + } + + return $value; + }); + + return parent::ask($input, $output, $question); + } + + /** + * {@inheritdoc} + */ + protected function writePrompt(OutputInterface $output, Question $question) + { + $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion()); + $default = $question->getDefault(); + + switch (true) { + case null === $default: + $text = sprintf(' %s:', $text); + + break; + + case $question instanceof ConfirmationQuestion: + $text = sprintf(' %s (yes/no) [%s]:', $text, $default ? 'yes' : 'no'); + + break; + + case $question instanceof ChoiceQuestion && $question->isMultiselect(): + $choices = $question->getChoices(); + $default = explode(',', $default); + + foreach ($default as $key => $value) { + $default[$key] = $choices[trim($value)]; + } + + $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape(implode(', ', $default))); + + break; + + case $question instanceof ChoiceQuestion: + $choices = $question->getChoices(); + $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape($choices[$default])); + + break; + + default: + $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape($default)); + } + + $output->writeln($text); + + if ($question instanceof ChoiceQuestion) { + $width = max(array_map('strlen', array_keys($question->getChoices()))); + + foreach ($question->getChoices() as $key => $value) { + $output->writeln(sprintf(" [%-${width}s] %s", $key, $value)); + } + } + + $output->write(' > '); + } + + /** + * {@inheritdoc} + */ + protected function writeError(OutputInterface $output, \Exception $error) + { + if ($output instanceof SymfonyStyle) { + $output->newLine(); + $output->error($error->getMessage()); + + return; + } + + parent::writeError($output, $error); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Table.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Table.php new file mode 100644 index 0000000000000000000000000000000000000000..36f3301817aed9a779b83fe8edfeedc319575d05 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/Table.php @@ -0,0 +1,708 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Exception\InvalidArgumentException; + +/** + * Provides helpers to display a table. + * + * @author Fabien Potencier + * @author Саша Стаменковић + * @author Abdellatif Ait boudad + * @author Max Grigorian + */ +class Table +{ + /** + * Table headers. + * + * @var array + */ + private $headers = array(); + + /** + * Table rows. + * + * @var array + */ + private $rows = array(); + + /** + * Column widths cache. + * + * @var array + */ + private $effectiveColumnWidths = array(); + + /** + * Number of columns cache. + * + * @var array + */ + private $numberOfColumns; + + /** + * @var OutputInterface + */ + private $output; + + /** + * @var TableStyle + */ + private $style; + + /** + * @var array + */ + private $columnStyles = array(); + + /** + * User set column widths. + * + * @var array + */ + private $columnWidths = array(); + + private static $styles; + + public function __construct(OutputInterface $output) + { + $this->output = $output; + + if (!self::$styles) { + self::$styles = self::initStyles(); + } + + $this->setStyle('default'); + } + + /** + * Sets a style definition. + * + * @param string $name The style name + * @param TableStyle $style A TableStyle instance + */ + public static function setStyleDefinition($name, TableStyle $style) + { + if (!self::$styles) { + self::$styles = self::initStyles(); + } + + self::$styles[$name] = $style; + } + + /** + * Gets a style definition by name. + * + * @param string $name The style name + * + * @return TableStyle + */ + public static function getStyleDefinition($name) + { + if (!self::$styles) { + self::$styles = self::initStyles(); + } + + if (isset(self::$styles[$name])) { + return self::$styles[$name]; + } + + throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); + } + + /** + * Sets table style. + * + * @param TableStyle|string $name The style name or a TableStyle instance + * + * @return $this + */ + public function setStyle($name) + { + $this->style = $this->resolveStyle($name); + + return $this; + } + + /** + * Gets the current table style. + * + * @return TableStyle + */ + public function getStyle() + { + return $this->style; + } + + /** + * Sets table column style. + * + * @param int $columnIndex Column index + * @param TableStyle|string $name The style name or a TableStyle instance + * + * @return $this + */ + public function setColumnStyle($columnIndex, $name) + { + $columnIndex = intval($columnIndex); + + $this->columnStyles[$columnIndex] = $this->resolveStyle($name); + + return $this; + } + + /** + * Gets the current style for a column. + * + * If style was not set, it returns the global table style. + * + * @param int $columnIndex Column index + * + * @return TableStyle + */ + public function getColumnStyle($columnIndex) + { + if (isset($this->columnStyles[$columnIndex])) { + return $this->columnStyles[$columnIndex]; + } + + return $this->getStyle(); + } + + /** + * Sets the minimum width of a column. + * + * @param int $columnIndex Column index + * @param int $width Minimum column width in characters + * + * @return $this + */ + public function setColumnWidth($columnIndex, $width) + { + $this->columnWidths[intval($columnIndex)] = intval($width); + + return $this; + } + + /** + * Sets the minimum width of all columns. + * + * @param array $widths + * + * @return $this + */ + public function setColumnWidths(array $widths) + { + $this->columnWidths = array(); + foreach ($widths as $index => $width) { + $this->setColumnWidth($index, $width); + } + + return $this; + } + + public function setHeaders(array $headers) + { + $headers = array_values($headers); + if (!empty($headers) && !is_array($headers[0])) { + $headers = array($headers); + } + + $this->headers = $headers; + + return $this; + } + + public function setRows(array $rows) + { + $this->rows = array(); + + return $this->addRows($rows); + } + + public function addRows(array $rows) + { + foreach ($rows as $row) { + $this->addRow($row); + } + + return $this; + } + + public function addRow($row) + { + if ($row instanceof TableSeparator) { + $this->rows[] = $row; + + return $this; + } + + if (!is_array($row)) { + throw new InvalidArgumentException('A row must be an array or a TableSeparator instance.'); + } + + $this->rows[] = array_values($row); + + return $this; + } + + public function setRow($column, array $row) + { + $this->rows[$column] = $row; + + return $this; + } + + /** + * Renders table to output. + * + * Example: + * +---------------+-----------------------+------------------+ + * | ISBN | Title | Author | + * +---------------+-----------------------+------------------+ + * | 99921-58-10-7 | Divine Comedy | Dante Alighieri | + * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | + * +---------------+-----------------------+------------------+ + */ + public function render() + { + $this->calculateNumberOfColumns(); + $rows = $this->buildTableRows($this->rows); + $headers = $this->buildTableRows($this->headers); + + $this->calculateColumnsWidth(array_merge($headers, $rows)); + + $this->renderRowSeparator(); + if (!empty($headers)) { + foreach ($headers as $header) { + $this->renderRow($header, $this->style->getCellHeaderFormat()); + $this->renderRowSeparator(); + } + } + foreach ($rows as $row) { + if ($row instanceof TableSeparator) { + $this->renderRowSeparator(); + } else { + $this->renderRow($row, $this->style->getCellRowFormat()); + } + } + if (!empty($rows)) { + $this->renderRowSeparator(); + } + + $this->cleanup(); + } + + /** + * Renders horizontal header separator. + * + * Example: +-----+-----------+-------+ + */ + private function renderRowSeparator() + { + if (0 === $count = $this->numberOfColumns) { + return; + } + + if (!$this->style->getHorizontalBorderChar() && !$this->style->getCrossingChar()) { + return; + } + + $markup = $this->style->getCrossingChar(); + for ($column = 0; $column < $count; ++$column) { + $markup .= str_repeat($this->style->getHorizontalBorderChar(), $this->effectiveColumnWidths[$column]).$this->style->getCrossingChar(); + } + + $this->output->writeln(sprintf($this->style->getBorderFormat(), $markup)); + } + + /** + * Renders vertical column separator. + */ + private function renderColumnSeparator() + { + return sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar()); + } + + /** + * Renders table row. + * + * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + * + * @param array $row + * @param string $cellFormat + */ + private function renderRow(array $row, $cellFormat) + { + if (empty($row)) { + return; + } + + $rowContent = $this->renderColumnSeparator(); + foreach ($this->getRowColumns($row) as $column) { + $rowContent .= $this->renderCell($row, $column, $cellFormat); + $rowContent .= $this->renderColumnSeparator(); + } + $this->output->writeln($rowContent); + } + + /** + * Renders table cell with padding. + * + * @param array $row + * @param int $column + * @param string $cellFormat + */ + private function renderCell(array $row, $column, $cellFormat) + { + $cell = isset($row[$column]) ? $row[$column] : ''; + $width = $this->effectiveColumnWidths[$column]; + if ($cell instanceof TableCell && $cell->getColspan() > 1) { + // add the width of the following columns(numbers of colspan). + foreach (range($column + 1, $column + $cell->getColspan() - 1) as $nextColumn) { + $width += $this->getColumnSeparatorWidth() + $this->effectiveColumnWidths[$nextColumn]; + } + } + + // str_pad won't work properly with multi-byte strings, we need to fix the padding + if (false !== $encoding = mb_detect_encoding($cell, null, true)) { + $width += strlen($cell) - mb_strwidth($cell, $encoding); + } + + $style = $this->getColumnStyle($column); + + if ($cell instanceof TableSeparator) { + return sprintf($style->getBorderFormat(), str_repeat($style->getHorizontalBorderChar(), $width)); + } + + $width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); + $content = sprintf($style->getCellRowContentFormat(), $cell); + + return sprintf($cellFormat, str_pad($content, $width, $style->getPaddingChar(), $style->getPadType())); + } + + /** + * Calculate number of columns for this table. + */ + private function calculateNumberOfColumns() + { + if (null !== $this->numberOfColumns) { + return; + } + + $columns = array(0); + foreach (array_merge($this->headers, $this->rows) as $row) { + if ($row instanceof TableSeparator) { + continue; + } + + $columns[] = $this->getNumberOfColumns($row); + } + + $this->numberOfColumns = max($columns); + } + + private function buildTableRows($rows) + { + $unmergedRows = array(); + for ($rowKey = 0; $rowKey < count($rows); ++$rowKey) { + $rows = $this->fillNextRows($rows, $rowKey); + + // Remove any new line breaks and replace it with a new line + foreach ($rows[$rowKey] as $column => $cell) { + if (!strstr($cell, "\n")) { + continue; + } + $lines = explode("\n", $cell); + foreach ($lines as $lineKey => $line) { + if ($cell instanceof TableCell) { + $line = new TableCell($line, array('colspan' => $cell->getColspan())); + } + if (0 === $lineKey) { + $rows[$rowKey][$column] = $line; + } else { + $unmergedRows[$rowKey][$lineKey][$column] = $line; + } + } + } + } + + $tableRows = array(); + foreach ($rows as $rowKey => $row) { + $tableRows[] = $this->fillCells($row); + if (isset($unmergedRows[$rowKey])) { + $tableRows = array_merge($tableRows, $unmergedRows[$rowKey]); + } + } + + return $tableRows; + } + + /** + * fill rows that contains rowspan > 1. + * + * @param array $rows + * @param int $line + * + * @return array + */ + private function fillNextRows($rows, $line) + { + $unmergedRows = array(); + foreach ($rows[$line] as $column => $cell) { + if ($cell instanceof TableCell && $cell->getRowspan() > 1) { + $nbLines = $cell->getRowspan() - 1; + $lines = array($cell); + if (strstr($cell, "\n")) { + $lines = explode("\n", $cell); + $nbLines = count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines; + + $rows[$line][$column] = new TableCell($lines[0], array('colspan' => $cell->getColspan())); + unset($lines[0]); + } + + // create a two dimensional array (rowspan x colspan) + $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, array()), $unmergedRows); + foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { + $value = isset($lines[$unmergedRowKey - $line]) ? $lines[$unmergedRowKey - $line] : ''; + $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, array('colspan' => $cell->getColspan())); + if ($nbLines === $unmergedRowKey - $line) { + break; + } + } + } + } + + foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { + // we need to know if $unmergedRow will be merged or inserted into $rows + if (isset($rows[$unmergedRowKey]) && is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) { + foreach ($unmergedRow as $cellKey => $cell) { + // insert cell into row at cellKey position + array_splice($rows[$unmergedRowKey], $cellKey, 0, array($cell)); + } + } else { + $row = $this->copyRow($rows, $unmergedRowKey - 1); + foreach ($unmergedRow as $column => $cell) { + if (!empty($cell)) { + $row[$column] = $unmergedRow[$column]; + } + } + array_splice($rows, $unmergedRowKey, 0, array($row)); + } + } + + return $rows; + } + + /** + * fill cells for a row that contains colspan > 1. + * + * @param array $row + * + * @return array + */ + private function fillCells($row) + { + $newRow = array(); + foreach ($row as $column => $cell) { + $newRow[] = $cell; + if ($cell instanceof TableCell && $cell->getColspan() > 1) { + foreach (range($column + 1, $column + $cell->getColspan() - 1) as $position) { + // insert empty value at column position + $newRow[] = ''; + } + } + } + + return $newRow ?: $row; + } + + /** + * @param array $rows + * @param int $line + * + * @return array + */ + private function copyRow($rows, $line) + { + $row = $rows[$line]; + foreach ($row as $cellKey => $cellValue) { + $row[$cellKey] = ''; + if ($cellValue instanceof TableCell) { + $row[$cellKey] = new TableCell('', array('colspan' => $cellValue->getColspan())); + } + } + + return $row; + } + + /** + * Gets number of columns by row. + * + * @param array $row + * + * @return int + */ + private function getNumberOfColumns(array $row) + { + $columns = count($row); + foreach ($row as $column) { + $columns += $column instanceof TableCell ? ($column->getColspan() - 1) : 0; + } + + return $columns; + } + + /** + * Gets list of columns for the given row. + * + * @param array $row + * + * @return array + */ + private function getRowColumns($row) + { + $columns = range(0, $this->numberOfColumns - 1); + foreach ($row as $cellKey => $cell) { + if ($cell instanceof TableCell && $cell->getColspan() > 1) { + // exclude grouped columns. + $columns = array_diff($columns, range($cellKey + 1, $cellKey + $cell->getColspan() - 1)); + } + } + + return $columns; + } + + /** + * Calculates columns widths. + * + * @param array $rows + */ + private function calculateColumnsWidth($rows) + { + for ($column = 0; $column < $this->numberOfColumns; ++$column) { + $lengths = array(); + foreach ($rows as $row) { + if ($row instanceof TableSeparator) { + continue; + } + + foreach ($row as $i => $cell) { + if ($cell instanceof TableCell) { + $textLength = Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); + if ($textLength > 0) { + $contentColumns = str_split($cell, ceil($textLength / $cell->getColspan())); + foreach ($contentColumns as $position => $content) { + $row[$i + $position] = $content; + } + } + } + } + + $lengths[] = $this->getCellWidth($row, $column); + } + + $this->effectiveColumnWidths[$column] = max($lengths) + strlen($this->style->getCellRowContentFormat()) - 2; + } + } + + /** + * Gets column width. + * + * @return int + */ + private function getColumnSeparatorWidth() + { + return strlen(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar())); + } + + /** + * Gets cell width. + * + * @param array $row + * @param int $column + * + * @return int + */ + private function getCellWidth(array $row, $column) + { + $cellWidth = 0; + + if (isset($row[$column])) { + $cell = $row[$column]; + $cellWidth = Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); + } + + $columnWidth = isset($this->columnWidths[$column]) ? $this->columnWidths[$column] : 0; + + return max($cellWidth, $columnWidth); + } + + /** + * Called after rendering to cleanup cache data. + */ + private function cleanup() + { + $this->effectiveColumnWidths = array(); + $this->numberOfColumns = null; + } + + private static function initStyles() + { + $borderless = new TableStyle(); + $borderless + ->setHorizontalBorderChar('=') + ->setVerticalBorderChar(' ') + ->setCrossingChar(' ') + ; + + $compact = new TableStyle(); + $compact + ->setHorizontalBorderChar('') + ->setVerticalBorderChar(' ') + ->setCrossingChar('') + ->setCellRowContentFormat('%s') + ; + + $styleGuide = new TableStyle(); + $styleGuide + ->setHorizontalBorderChar('-') + ->setVerticalBorderChar(' ') + ->setCrossingChar(' ') + ->setCellHeaderFormat('%s') + ; + + return array( + 'default' => new TableStyle(), + 'borderless' => $borderless, + 'compact' => $compact, + 'symfony-style-guide' => $styleGuide, + ); + } + + private function resolveStyle($name) + { + if ($name instanceof TableStyle) { + return $name; + } + + if (isset(self::$styles[$name])) { + return self::$styles[$name]; + } + + throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableCell.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableCell.php new file mode 100644 index 0000000000000000000000000000000000000000..a3064fc0981f6277ba792ba3090dfa98a107b56e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableCell.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Exception\InvalidArgumentException; + +/** + * @author Abdellatif Ait boudad + */ +class TableCell +{ + /** + * @var string + */ + private $value; + + /** + * @var array + */ + private $options = array( + 'rowspan' => 1, + 'colspan' => 1, + ); + + /** + * @param string $value + * @param array $options + */ + public function __construct($value = '', array $options = array()) + { + if (is_numeric($value) && !is_string($value)) { + $value = (string) $value; + } + + $this->value = $value; + + // check option names + if ($diff = array_diff(array_keys($options), array_keys($this->options))) { + throw new InvalidArgumentException(sprintf('The TableCell does not support the following options: \'%s\'.', implode('\', \'', $diff))); + } + + $this->options = array_merge($this->options, $options); + } + + /** + * Returns the cell value. + * + * @return string + */ + public function __toString() + { + return $this->value; + } + + /** + * Gets number of colspan. + * + * @return int + */ + public function getColspan() + { + return (int) $this->options['colspan']; + } + + /** + * Gets number of rowspan. + * + * @return int + */ + public function getRowspan() + { + return (int) $this->options['rowspan']; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableSeparator.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableSeparator.php new file mode 100644 index 0000000000000000000000000000000000000000..8cc73e69a25f4e14e3e8bdebab0295301189339f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableSeparator.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +/** + * Marks a row as being a separator. + * + * @author Fabien Potencier + */ +class TableSeparator extends TableCell +{ + /** + * @param array $options + */ + public function __construct(array $options = array()) + { + parent::__construct('', $options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableStyle.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableStyle.php new file mode 100644 index 0000000000000000000000000000000000000000..2999c76f86ad3fb6b2ccea86e0cebcaace7cd08f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/TableStyle.php @@ -0,0 +1,258 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\LogicException; + +/** + * Defines the styles for a Table. + * + * @author Fabien Potencier + * @author Саша Стаменковић + */ +class TableStyle +{ + private $paddingChar = ' '; + private $horizontalBorderChar = '-'; + private $verticalBorderChar = '|'; + private $crossingChar = '+'; + private $cellHeaderFormat = '%s'; + private $cellRowFormat = '%s'; + private $cellRowContentFormat = ' %s '; + private $borderFormat = '%s'; + private $padType = STR_PAD_RIGHT; + + /** + * Sets padding character, used for cell padding. + * + * @param string $paddingChar + * + * @return $this + */ + public function setPaddingChar($paddingChar) + { + if (!$paddingChar) { + throw new LogicException('The padding char must not be empty'); + } + + $this->paddingChar = $paddingChar; + + return $this; + } + + /** + * Gets padding character, used for cell padding. + * + * @return string + */ + public function getPaddingChar() + { + return $this->paddingChar; + } + + /** + * Sets horizontal border character. + * + * @param string $horizontalBorderChar + * + * @return $this + */ + public function setHorizontalBorderChar($horizontalBorderChar) + { + $this->horizontalBorderChar = $horizontalBorderChar; + + return $this; + } + + /** + * Gets horizontal border character. + * + * @return string + */ + public function getHorizontalBorderChar() + { + return $this->horizontalBorderChar; + } + + /** + * Sets vertical border character. + * + * @param string $verticalBorderChar + * + * @return $this + */ + public function setVerticalBorderChar($verticalBorderChar) + { + $this->verticalBorderChar = $verticalBorderChar; + + return $this; + } + + /** + * Gets vertical border character. + * + * @return string + */ + public function getVerticalBorderChar() + { + return $this->verticalBorderChar; + } + + /** + * Sets crossing character. + * + * @param string $crossingChar + * + * @return $this + */ + public function setCrossingChar($crossingChar) + { + $this->crossingChar = $crossingChar; + + return $this; + } + + /** + * Gets crossing character. + * + * @return string $crossingChar + */ + public function getCrossingChar() + { + return $this->crossingChar; + } + + /** + * Sets header cell format. + * + * @param string $cellHeaderFormat + * + * @return $this + */ + public function setCellHeaderFormat($cellHeaderFormat) + { + $this->cellHeaderFormat = $cellHeaderFormat; + + return $this; + } + + /** + * Gets header cell format. + * + * @return string + */ + public function getCellHeaderFormat() + { + return $this->cellHeaderFormat; + } + + /** + * Sets row cell format. + * + * @param string $cellRowFormat + * + * @return $this + */ + public function setCellRowFormat($cellRowFormat) + { + $this->cellRowFormat = $cellRowFormat; + + return $this; + } + + /** + * Gets row cell format. + * + * @return string + */ + public function getCellRowFormat() + { + return $this->cellRowFormat; + } + + /** + * Sets row cell content format. + * + * @param string $cellRowContentFormat + * + * @return $this + */ + public function setCellRowContentFormat($cellRowContentFormat) + { + $this->cellRowContentFormat = $cellRowContentFormat; + + return $this; + } + + /** + * Gets row cell content format. + * + * @return string + */ + public function getCellRowContentFormat() + { + return $this->cellRowContentFormat; + } + + /** + * Sets table border format. + * + * @param string $borderFormat + * + * @return $this + */ + public function setBorderFormat($borderFormat) + { + $this->borderFormat = $borderFormat; + + return $this; + } + + /** + * Gets table border format. + * + * @return string + */ + public function getBorderFormat() + { + return $this->borderFormat; + } + + /** + * Sets cell padding type. + * + * @param int $padType STR_PAD_* + * + * @return $this + */ + public function setPadType($padType) + { + if (!in_array($padType, array(STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH), true)) { + throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).'); + } + + $this->padType = $padType; + + return $this; + } + + /** + * Gets cell padding type. + * + * @return int + */ + public function getPadType() + { + return $this->padType; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php new file mode 100644 index 0000000000000000000000000000000000000000..f626c33e591bf5a1b8266eea7298df209adf55a1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php @@ -0,0 +1,347 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Input; + +use Symfony\Component\Console\Exception\RuntimeException; + +/** + * ArgvInput represents an input coming from the CLI arguments. + * + * Usage: + * + * $input = new ArgvInput(); + * + * By default, the `$_SERVER['argv']` array is used for the input values. + * + * This can be overridden by explicitly passing the input values in the constructor: + * + * $input = new ArgvInput($_SERVER['argv']); + * + * If you pass it yourself, don't forget that the first element of the array + * is the name of the running application. + * + * When passing an argument to the constructor, be sure that it respects + * the same rules as the argv one. It's almost always better to use the + * `StringInput` when you want to provide your own input. + * + * @author Fabien Potencier + * + * @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html + * @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02 + */ +class ArgvInput extends Input +{ + private $tokens; + private $parsed; + + /** + * Constructor. + * + * @param array|null $argv An array of parameters from the CLI (in the argv format) + * @param InputDefinition|null $definition A InputDefinition instance + */ + public function __construct(array $argv = null, InputDefinition $definition = null) + { + if (null === $argv) { + $argv = $_SERVER['argv']; + } + + // strip the application name + array_shift($argv); + + $this->tokens = $argv; + + parent::__construct($definition); + } + + protected function setTokens(array $tokens) + { + $this->tokens = $tokens; + } + + /** + * {@inheritdoc} + */ + protected function parse() + { + $parseOptions = true; + $this->parsed = $this->tokens; + while (null !== $token = array_shift($this->parsed)) { + if ($parseOptions && '' == $token) { + $this->parseArgument($token); + } elseif ($parseOptions && '--' == $token) { + $parseOptions = false; + } elseif ($parseOptions && 0 === strpos($token, '--')) { + $this->parseLongOption($token); + } elseif ($parseOptions && '-' === $token[0] && '-' !== $token) { + $this->parseShortOption($token); + } else { + $this->parseArgument($token); + } + } + } + + /** + * Parses a short option. + * + * @param string $token The current token + */ + private function parseShortOption($token) + { + $name = substr($token, 1); + + if (strlen($name) > 1) { + if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) { + // an option with a value (with no space) + $this->addShortOption($name[0], substr($name, 1)); + } else { + $this->parseShortOptionSet($name); + } + } else { + $this->addShortOption($name, null); + } + } + + /** + * Parses a short option set. + * + * @param string $name The current token + * + * @throws RuntimeException When option given doesn't exist + */ + private function parseShortOptionSet($name) + { + $len = strlen($name); + for ($i = 0; $i < $len; ++$i) { + if (!$this->definition->hasShortcut($name[$i])) { + throw new RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i])); + } + + $option = $this->definition->getOptionForShortcut($name[$i]); + if ($option->acceptValue()) { + $this->addLongOption($option->getName(), $i === $len - 1 ? null : substr($name, $i + 1)); + + break; + } else { + $this->addLongOption($option->getName(), null); + } + } + } + + /** + * Parses a long option. + * + * @param string $token The current token + */ + private function parseLongOption($token) + { + $name = substr($token, 2); + + if (false !== $pos = strpos($name, '=')) { + if (0 === strlen($value = substr($name, $pos + 1))) { + array_unshift($this->parsed, null); + } + $this->addLongOption(substr($name, 0, $pos), $value); + } else { + $this->addLongOption($name, null); + } + } + + /** + * Parses an argument. + * + * @param string $token The current token + * + * @throws RuntimeException When too many arguments are given + */ + private function parseArgument($token) + { + $c = count($this->arguments); + + // if input is expecting another argument, add it + if ($this->definition->hasArgument($c)) { + $arg = $this->definition->getArgument($c); + $this->arguments[$arg->getName()] = $arg->isArray() ? array($token) : $token; + + // if last argument isArray(), append token to last argument + } elseif ($this->definition->hasArgument($c - 1) && $this->definition->getArgument($c - 1)->isArray()) { + $arg = $this->definition->getArgument($c - 1); + $this->arguments[$arg->getName()][] = $token; + + // unexpected argument + } else { + $all = $this->definition->getArguments(); + if (count($all)) { + throw new RuntimeException(sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all)))); + } + + throw new RuntimeException(sprintf('No arguments expected, got "%s".', $token)); + } + } + + /** + * Adds a short option value. + * + * @param string $shortcut The short option key + * @param mixed $value The value for the option + * + * @throws RuntimeException When option given doesn't exist + */ + private function addShortOption($shortcut, $value) + { + if (!$this->definition->hasShortcut($shortcut)) { + throw new RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut)); + } + + $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); + } + + /** + * Adds a long option value. + * + * @param string $name The long option key + * @param mixed $value The value for the option + * + * @throws RuntimeException When option given doesn't exist + */ + private function addLongOption($name, $value) + { + if (!$this->definition->hasOption($name)) { + throw new RuntimeException(sprintf('The "--%s" option does not exist.', $name)); + } + + $option = $this->definition->getOption($name); + + // Convert empty values to null + if (!isset($value[0])) { + $value = null; + } + + if (null !== $value && !$option->acceptValue()) { + throw new RuntimeException(sprintf('The "--%s" option does not accept a value.', $name)); + } + + if (null === $value && $option->acceptValue() && count($this->parsed)) { + // if option accepts an optional or mandatory argument + // let's see if there is one provided + $next = array_shift($this->parsed); + if (isset($next[0]) && '-' !== $next[0]) { + $value = $next; + } elseif (empty($next)) { + $value = null; + } else { + array_unshift($this->parsed, $next); + } + } + + if (null === $value) { + if ($option->isValueRequired()) { + throw new RuntimeException(sprintf('The "--%s" option requires a value.', $name)); + } + + if (!$option->isArray()) { + $value = $option->isValueOptional() ? $option->getDefault() : true; + } + } + + if ($option->isArray()) { + $this->options[$name][] = $value; + } else { + $this->options[$name] = $value; + } + } + + /** + * {@inheritdoc} + */ + public function getFirstArgument() + { + foreach ($this->tokens as $token) { + if ($token && '-' === $token[0]) { + continue; + } + + return $token; + } + } + + /** + * {@inheritdoc} + */ + public function hasParameterOption($values, $onlyParams = false) + { + $values = (array) $values; + + foreach ($this->tokens as $token) { + if ($onlyParams && $token === '--') { + return false; + } + foreach ($values as $value) { + if ($token === $value || 0 === strpos($token, $value.'=')) { + return true; + } + } + } + + return false; + } + + /** + * {@inheritdoc} + */ + public function getParameterOption($values, $default = false, $onlyParams = false) + { + $values = (array) $values; + $tokens = $this->tokens; + + while (0 < count($tokens)) { + $token = array_shift($tokens); + if ($onlyParams && $token === '--') { + return false; + } + + foreach ($values as $value) { + if ($token === $value || 0 === strpos($token, $value.'=')) { + if (false !== $pos = strpos($token, '=')) { + return substr($token, $pos + 1); + } + + return array_shift($tokens); + } + } + } + + return $default; + } + + /** + * Returns a stringified representation of the args passed to the command. + * + * @return string + */ + public function __toString() + { + $tokens = array_map(function ($token) { + if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) { + return $match[1].$this->escapeToken($match[2]); + } + + if ($token && $token[0] !== '-') { + return $this->escapeToken($token); + } + + return $token; + }, $this->tokens); + + return implode(' ', $tokens); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArrayInput.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArrayInput.php new file mode 100644 index 0000000000000000000000000000000000000000..a44b6b2815cbdbc902ba9e2516f8b5579607c2f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArrayInput.php @@ -0,0 +1,204 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Input; + +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\InvalidOptionException; + +/** + * ArrayInput represents an input provided as an array. + * + * Usage: + * + * $input = new ArrayInput(array('name' => 'foo', '--bar' => 'foobar')); + * + * @author Fabien Potencier + */ +class ArrayInput extends Input +{ + private $parameters; + + /** + * Constructor. + * + * @param array $parameters An array of parameters + * @param InputDefinition|null $definition A InputDefinition instance + */ + public function __construct(array $parameters, InputDefinition $definition = null) + { + $this->parameters = $parameters; + + parent::__construct($definition); + } + + /** + * {@inheritdoc} + */ + public function getFirstArgument() + { + foreach ($this->parameters as $key => $value) { + if ($key && '-' === $key[0]) { + continue; + } + + return $value; + } + } + + /** + * {@inheritdoc} + */ + public function hasParameterOption($values, $onlyParams = false) + { + $values = (array) $values; + + foreach ($this->parameters as $k => $v) { + if (!is_int($k)) { + $v = $k; + } + + if ($onlyParams && $v === '--') { + return false; + } + + if (in_array($v, $values)) { + return true; + } + } + + return false; + } + + /** + * {@inheritdoc} + */ + public function getParameterOption($values, $default = false, $onlyParams = false) + { + $values = (array) $values; + + foreach ($this->parameters as $k => $v) { + if ($onlyParams && ($k === '--' || (is_int($k) && $v === '--'))) { + return false; + } + + if (is_int($k)) { + if (in_array($v, $values)) { + return true; + } + } elseif (in_array($k, $values)) { + return $v; + } + } + + return $default; + } + + /** + * Returns a stringified representation of the args passed to the command. + * + * @return string + */ + public function __toString() + { + $params = array(); + foreach ($this->parameters as $param => $val) { + if ($param && '-' === $param[0]) { + $params[] = $param.('' != $val ? '='.$this->escapeToken($val) : ''); + } else { + $params[] = $this->escapeToken($val); + } + } + + return implode(' ', $params); + } + + /** + * {@inheritdoc} + */ + protected function parse() + { + foreach ($this->parameters as $key => $value) { + if ($key === '--') { + return; + } + if (0 === strpos($key, '--')) { + $this->addLongOption(substr($key, 2), $value); + } elseif ('-' === $key[0]) { + $this->addShortOption(substr($key, 1), $value); + } else { + $this->addArgument($key, $value); + } + } + } + + /** + * Adds a short option value. + * + * @param string $shortcut The short option key + * @param mixed $value The value for the option + * + * @throws InvalidOptionException When option given doesn't exist + */ + private function addShortOption($shortcut, $value) + { + if (!$this->definition->hasShortcut($shortcut)) { + throw new InvalidOptionException(sprintf('The "-%s" option does not exist.', $shortcut)); + } + + $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); + } + + /** + * Adds a long option value. + * + * @param string $name The long option key + * @param mixed $value The value for the option + * + * @throws InvalidOptionException When option given doesn't exist + * @throws InvalidOptionException When a required value is missing + */ + private function addLongOption($name, $value) + { + if (!$this->definition->hasOption($name)) { + throw new InvalidOptionException(sprintf('The "--%s" option does not exist.', $name)); + } + + $option = $this->definition->getOption($name); + + if (null === $value) { + if ($option->isValueRequired()) { + throw new InvalidOptionException(sprintf('The "--%s" option requires a value.', $name)); + } + + $value = $option->isValueOptional() ? $option->getDefault() : true; + } + + $this->options[$name] = $value; + } + + /** + * Adds an argument value. + * + * @param string $name The argument name + * @param mixed $value The value for the argument + * + * @throws InvalidArgumentException When argument given doesn't exist + */ + private function addArgument($name, $value) + { + if (!$this->definition->hasArgument($name)) { + throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); + } + + $this->arguments[$name] = $value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Input/Input.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/Input.php new file mode 100644 index 0000000000000000000000000000000000000000..474a02031290810a527c302846904ba557df4c2c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/Input.php @@ -0,0 +1,211 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Input; + +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\RuntimeException; + +/** + * Input is the base class for all concrete Input classes. + * + * Three concrete classes are provided by default: + * + * * `ArgvInput`: The input comes from the CLI arguments (argv) + * * `StringInput`: The input is provided as a string + * * `ArrayInput`: The input is provided as an array + * + * @author Fabien Potencier + */ +abstract class Input implements InputInterface, StreamableInputInterface +{ + /** + * @var InputDefinition + */ + protected $definition; + protected $stream; + protected $options = array(); + protected $arguments = array(); + protected $interactive = true; + + /** + * Constructor. + * + * @param InputDefinition|null $definition A InputDefinition instance + */ + public function __construct(InputDefinition $definition = null) + { + if (null === $definition) { + $this->definition = new InputDefinition(); + } else { + $this->bind($definition); + $this->validate(); + } + } + + /** + * {@inheritdoc} + */ + public function bind(InputDefinition $definition) + { + $this->arguments = array(); + $this->options = array(); + $this->definition = $definition; + + $this->parse(); + } + + /** + * Processes command line arguments. + */ + abstract protected function parse(); + + /** + * {@inheritdoc} + */ + public function validate() + { + $definition = $this->definition; + $givenArguments = $this->arguments; + + $missingArguments = array_filter(array_keys($definition->getArguments()), function ($argument) use ($definition, $givenArguments) { + return !array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); + }); + + if (count($missingArguments) > 0) { + throw new RuntimeException(sprintf('Not enough arguments (missing: "%s").', implode(', ', $missingArguments))); + } + } + + /** + * {@inheritdoc} + */ + public function isInteractive() + { + return $this->interactive; + } + + /** + * {@inheritdoc} + */ + public function setInteractive($interactive) + { + $this->interactive = (bool) $interactive; + } + + /** + * {@inheritdoc} + */ + public function getArguments() + { + return array_merge($this->definition->getArgumentDefaults(), $this->arguments); + } + + /** + * {@inheritdoc} + */ + public function getArgument($name) + { + if (!$this->definition->hasArgument($name)) { + throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); + } + + return isset($this->arguments[$name]) ? $this->arguments[$name] : $this->definition->getArgument($name)->getDefault(); + } + + /** + * {@inheritdoc} + */ + public function setArgument($name, $value) + { + if (!$this->definition->hasArgument($name)) { + throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); + } + + $this->arguments[$name] = $value; + } + + /** + * {@inheritdoc} + */ + public function hasArgument($name) + { + return $this->definition->hasArgument($name); + } + + /** + * {@inheritdoc} + */ + public function getOptions() + { + return array_merge($this->definition->getOptionDefaults(), $this->options); + } + + /** + * {@inheritdoc} + */ + public function getOption($name) + { + if (!$this->definition->hasOption($name)) { + throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); + } + + return isset($this->options[$name]) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); + } + + /** + * {@inheritdoc} + */ + public function setOption($name, $value) + { + if (!$this->definition->hasOption($name)) { + throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); + } + + $this->options[$name] = $value; + } + + /** + * {@inheritdoc} + */ + public function hasOption($name) + { + return $this->definition->hasOption($name); + } + + /** + * Escapes a token through escapeshellarg if it contains unsafe chars. + * + * @param string $token + * + * @return string + */ + public function escapeToken($token) + { + return preg_match('{^[\w-]+$}', $token) ? $token : escapeshellarg($token); + } + + /** + * {@inheritdoc} + */ + public function setStream($stream) + { + $this->stream = $stream; + } + + /** + * {@inheritdoc} + */ + public function getStream() + { + return $this->stream; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputArgument.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputArgument.php new file mode 100644 index 0000000000000000000000000000000000000000..048ee4ff6b5344ca91d67935190c0d2589a11baf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputArgument.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Input; + +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\LogicException; + +/** + * Represents a command line argument. + * + * @author Fabien Potencier + */ +class InputArgument +{ + const REQUIRED = 1; + const OPTIONAL = 2; + const IS_ARRAY = 4; + + private $name; + private $mode; + private $default; + private $description; + + /** + * Constructor. + * + * @param string $name The argument name + * @param int $mode The argument mode: self::REQUIRED or self::OPTIONAL + * @param string $description A description text + * @param mixed $default The default value (for self::OPTIONAL mode only) + * + * @throws InvalidArgumentException When argument mode is not valid + */ + public function __construct($name, $mode = null, $description = '', $default = null) + { + if (null === $mode) { + $mode = self::OPTIONAL; + } elseif (!is_int($mode) || $mode > 7 || $mode < 1) { + throw new InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode)); + } + + $this->name = $name; + $this->mode = $mode; + $this->description = $description; + + $this->setDefault($default); + } + + /** + * Returns the argument name. + * + * @return string The argument name + */ + public function getName() + { + return $this->name; + } + + /** + * Returns true if the argument is required. + * + * @return bool true if parameter mode is self::REQUIRED, false otherwise + */ + public function isRequired() + { + return self::REQUIRED === (self::REQUIRED & $this->mode); + } + + /** + * Returns true if the argument can take multiple values. + * + * @return bool true if mode is self::IS_ARRAY, false otherwise + */ + public function isArray() + { + return self::IS_ARRAY === (self::IS_ARRAY & $this->mode); + } + + /** + * Sets the default value. + * + * @param mixed $default The default value + * + * @throws LogicException When incorrect default value is given + */ + public function setDefault($default = null) + { + if (self::REQUIRED === $this->mode && null !== $default) { + throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.'); + } + + if ($this->isArray()) { + if (null === $default) { + $default = array(); + } elseif (!is_array($default)) { + throw new LogicException('A default value for an array argument must be an array.'); + } + } + + $this->default = $default; + } + + /** + * Returns the default value. + * + * @return mixed The default value + */ + public function getDefault() + { + return $this->default; + } + + /** + * Returns the description text. + * + * @return string The description text + */ + public function getDescription() + { + return $this->description; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputAwareInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputAwareInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d0f11e986a3b8d243e92277d59de809b866aae99 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputAwareInterface.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Input; + +/** + * InputAwareInterface should be implemented by classes that depends on the + * Console Input. + * + * @author Wouter J + */ +interface InputAwareInterface +{ + /** + * Sets the Console Input. + * + * @param InputInterface + */ + public function setInput(InputInterface $input); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..85b778b228627b19128705081cb9fa611ace39ba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputDefinition.php @@ -0,0 +1,414 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Input; + +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\LogicException; + +/** + * A InputDefinition represents a set of valid command line arguments and options. + * + * Usage: + * + * $definition = new InputDefinition(array( + * new InputArgument('name', InputArgument::REQUIRED), + * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), + * )); + * + * @author Fabien Potencier + */ +class InputDefinition +{ + private $arguments; + private $requiredCount; + private $hasAnArrayArgument = false; + private $hasOptional; + private $options; + private $shortcuts; + + /** + * Constructor. + * + * @param array $definition An array of InputArgument and InputOption instance + */ + public function __construct(array $definition = array()) + { + $this->setDefinition($definition); + } + + /** + * Sets the definition of the input. + * + * @param array $definition The definition array + */ + public function setDefinition(array $definition) + { + $arguments = array(); + $options = array(); + foreach ($definition as $item) { + if ($item instanceof InputOption) { + $options[] = $item; + } else { + $arguments[] = $item; + } + } + + $this->setArguments($arguments); + $this->setOptions($options); + } + + /** + * Sets the InputArgument objects. + * + * @param InputArgument[] $arguments An array of InputArgument objects + */ + public function setArguments($arguments = array()) + { + $this->arguments = array(); + $this->requiredCount = 0; + $this->hasOptional = false; + $this->hasAnArrayArgument = false; + $this->addArguments($arguments); + } + + /** + * Adds an array of InputArgument objects. + * + * @param InputArgument[] $arguments An array of InputArgument objects + */ + public function addArguments($arguments = array()) + { + if (null !== $arguments) { + foreach ($arguments as $argument) { + $this->addArgument($argument); + } + } + } + + /** + * Adds an InputArgument object. + * + * @param InputArgument $argument An InputArgument object + * + * @throws LogicException When incorrect argument is given + */ + public function addArgument(InputArgument $argument) + { + if (isset($this->arguments[$argument->getName()])) { + throw new LogicException(sprintf('An argument with name "%s" already exists.', $argument->getName())); + } + + if ($this->hasAnArrayArgument) { + throw new LogicException('Cannot add an argument after an array argument.'); + } + + if ($argument->isRequired() && $this->hasOptional) { + throw new LogicException('Cannot add a required argument after an optional one.'); + } + + if ($argument->isArray()) { + $this->hasAnArrayArgument = true; + } + + if ($argument->isRequired()) { + ++$this->requiredCount; + } else { + $this->hasOptional = true; + } + + $this->arguments[$argument->getName()] = $argument; + } + + /** + * Returns an InputArgument by name or by position. + * + * @param string|int $name The InputArgument name or position + * + * @return InputArgument An InputArgument object + * + * @throws InvalidArgumentException When argument given doesn't exist + */ + public function getArgument($name) + { + if (!$this->hasArgument($name)) { + throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); + } + + $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments; + + return $arguments[$name]; + } + + /** + * Returns true if an InputArgument object exists by name or position. + * + * @param string|int $name The InputArgument name or position + * + * @return bool true if the InputArgument object exists, false otherwise + */ + public function hasArgument($name) + { + $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments; + + return isset($arguments[$name]); + } + + /** + * Gets the array of InputArgument objects. + * + * @return InputArgument[] An array of InputArgument objects + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * Returns the number of InputArguments. + * + * @return int The number of InputArguments + */ + public function getArgumentCount() + { + return $this->hasAnArrayArgument ? PHP_INT_MAX : count($this->arguments); + } + + /** + * Returns the number of required InputArguments. + * + * @return int The number of required InputArguments + */ + public function getArgumentRequiredCount() + { + return $this->requiredCount; + } + + /** + * Gets the default values. + * + * @return array An array of default values + */ + public function getArgumentDefaults() + { + $values = array(); + foreach ($this->arguments as $argument) { + $values[$argument->getName()] = $argument->getDefault(); + } + + return $values; + } + + /** + * Sets the InputOption objects. + * + * @param InputOption[] $options An array of InputOption objects + */ + public function setOptions($options = array()) + { + $this->options = array(); + $this->shortcuts = array(); + $this->addOptions($options); + } + + /** + * Adds an array of InputOption objects. + * + * @param InputOption[] $options An array of InputOption objects + */ + public function addOptions($options = array()) + { + foreach ($options as $option) { + $this->addOption($option); + } + } + + /** + * Adds an InputOption object. + * + * @param InputOption $option An InputOption object + * + * @throws LogicException When option given already exist + */ + public function addOption(InputOption $option) + { + if (isset($this->options[$option->getName()]) && !$option->equals($this->options[$option->getName()])) { + throw new LogicException(sprintf('An option named "%s" already exists.', $option->getName())); + } + + if ($option->getShortcut()) { + foreach (explode('|', $option->getShortcut()) as $shortcut) { + if (isset($this->shortcuts[$shortcut]) && !$option->equals($this->options[$this->shortcuts[$shortcut]])) { + throw new LogicException(sprintf('An option with shortcut "%s" already exists.', $shortcut)); + } + } + } + + $this->options[$option->getName()] = $option; + if ($option->getShortcut()) { + foreach (explode('|', $option->getShortcut()) as $shortcut) { + $this->shortcuts[$shortcut] = $option->getName(); + } + } + } + + /** + * Returns an InputOption by name. + * + * @param string $name The InputOption name + * + * @return InputOption A InputOption object + * + * @throws InvalidArgumentException When option given doesn't exist + */ + public function getOption($name) + { + if (!$this->hasOption($name)) { + throw new InvalidArgumentException(sprintf('The "--%s" option does not exist.', $name)); + } + + return $this->options[$name]; + } + + /** + * Returns true if an InputOption object exists by name. + * + * This method can't be used to check if the user included the option when + * executing the command (use getOption() instead). + * + * @param string $name The InputOption name + * + * @return bool true if the InputOption object exists, false otherwise + */ + public function hasOption($name) + { + return isset($this->options[$name]); + } + + /** + * Gets the array of InputOption objects. + * + * @return InputOption[] An array of InputOption objects + */ + public function getOptions() + { + return $this->options; + } + + /** + * Returns true if an InputOption object exists by shortcut. + * + * @param string $name The InputOption shortcut + * + * @return bool true if the InputOption object exists, false otherwise + */ + public function hasShortcut($name) + { + return isset($this->shortcuts[$name]); + } + + /** + * Gets an InputOption by shortcut. + * + * @param string $shortcut the Shortcut name + * + * @return InputOption An InputOption object + */ + public function getOptionForShortcut($shortcut) + { + return $this->getOption($this->shortcutToName($shortcut)); + } + + /** + * Gets an array of default values. + * + * @return array An array of all default values + */ + public function getOptionDefaults() + { + $values = array(); + foreach ($this->options as $option) { + $values[$option->getName()] = $option->getDefault(); + } + + return $values; + } + + /** + * Returns the InputOption name given a shortcut. + * + * @param string $shortcut The shortcut + * + * @return string The InputOption name + * + * @throws InvalidArgumentException When option given does not exist + */ + private function shortcutToName($shortcut) + { + if (!isset($this->shortcuts[$shortcut])) { + throw new InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); + } + + return $this->shortcuts[$shortcut]; + } + + /** + * Gets the synopsis. + * + * @param bool $short Whether to return the short version (with options folded) or not + * + * @return string The synopsis + */ + public function getSynopsis($short = false) + { + $elements = array(); + + if ($short && $this->getOptions()) { + $elements[] = '[options]'; + } elseif (!$short) { + foreach ($this->getOptions() as $option) { + $value = ''; + if ($option->acceptValue()) { + $value = sprintf( + ' %s%s%s', + $option->isValueOptional() ? '[' : '', + strtoupper($option->getName()), + $option->isValueOptional() ? ']' : '' + ); + } + + $shortcut = $option->getShortcut() ? sprintf('-%s|', $option->getShortcut()) : ''; + $elements[] = sprintf('[%s--%s%s]', $shortcut, $option->getName(), $value); + } + } + + if (count($elements) && $this->getArguments()) { + $elements[] = '[--]'; + } + + foreach ($this->getArguments() as $argument) { + $element = '<'.$argument->getName().'>'; + if (!$argument->isRequired()) { + $element = '['.$element.']'; + } elseif ($argument->isArray()) { + $element = $element.' ('.$element.')'; + } + + if ($argument->isArray()) { + $element .= '...'; + } + + $elements[] = $element; + } + + return implode(' ', $elements); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..bc66466437fe2b469cfab5995ddd2072d7776ebf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputInterface.php @@ -0,0 +1,159 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Input; + +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\RuntimeException; + +/** + * InputInterface is the interface implemented by all input classes. + * + * @author Fabien Potencier + */ +interface InputInterface +{ + /** + * Returns the first argument from the raw parameters (not parsed). + * + * @return string The value of the first argument or null otherwise + */ + public function getFirstArgument(); + + /** + * Returns true if the raw parameters (not parsed) contain a value. + * + * This method is to be used to introspect the input parameters + * before they have been validated. It must be used carefully. + * + * @param string|array $values The values to look for in the raw parameters (can be an array) + * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal + * + * @return bool true if the value is contained in the raw parameters + */ + public function hasParameterOption($values, $onlyParams = false); + + /** + * Returns the value of a raw option (not parsed). + * + * This method is to be used to introspect the input parameters + * before they have been validated. It must be used carefully. + * + * @param string|array $values The value(s) to look for in the raw parameters (can be an array) + * @param mixed $default The default value to return if no result is found + * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal + * + * @return mixed The option value + */ + public function getParameterOption($values, $default = false, $onlyParams = false); + + /** + * Binds the current Input instance with the given arguments and options. + * + * @param InputDefinition $definition A InputDefinition instance + */ + public function bind(InputDefinition $definition); + + /** + * Validates the input. + * + * @throws RuntimeException When not enough arguments are given + */ + public function validate(); + + /** + * Returns all the given arguments merged with the default values. + * + * @return array + */ + public function getArguments(); + + /** + * Returns the argument value for a given argument name. + * + * @param string $name The argument name + * + * @return mixed The argument value + * + * @throws InvalidArgumentException When argument given doesn't exist + */ + public function getArgument($name); + + /** + * Sets an argument value by name. + * + * @param string $name The argument name + * @param string $value The argument value + * + * @throws InvalidArgumentException When argument given doesn't exist + */ + public function setArgument($name, $value); + + /** + * Returns true if an InputArgument object exists by name or position. + * + * @param string|int $name The InputArgument name or position + * + * @return bool true if the InputArgument object exists, false otherwise + */ + public function hasArgument($name); + + /** + * Returns all the given options merged with the default values. + * + * @return array + */ + public function getOptions(); + + /** + * Returns the option value for a given option name. + * + * @param string $name The option name + * + * @return mixed The option value + * + * @throws InvalidArgumentException When option given doesn't exist + */ + public function getOption($name); + + /** + * Sets an option value by name. + * + * @param string $name The option name + * @param string|bool $value The option value + * + * @throws InvalidArgumentException When option given doesn't exist + */ + public function setOption($name, $value); + + /** + * Returns true if an InputOption object exists by name. + * + * @param string $name The InputOption name + * + * @return bool true if the InputOption object exists, false otherwise + */ + public function hasOption($name); + + /** + * Is this input means interactive? + * + * @return bool + */ + public function isInteractive(); + + /** + * Sets the input interactivity. + * + * @param bool $interactive If the input should be interactive + */ + public function setInteractive($interactive); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputOption.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputOption.php new file mode 100644 index 0000000000000000000000000000000000000000..f08c5f26c104a493c263a358253ce5b6ef13f602 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/InputOption.php @@ -0,0 +1,212 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Input; + +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\LogicException; + +/** + * Represents a command line option. + * + * @author Fabien Potencier + */ +class InputOption +{ + const VALUE_NONE = 1; + const VALUE_REQUIRED = 2; + const VALUE_OPTIONAL = 4; + const VALUE_IS_ARRAY = 8; + + private $name; + private $shortcut; + private $mode; + private $default; + private $description; + + /** + * Constructor. + * + * @param string $name The option name + * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts + * @param int $mode The option mode: One of the VALUE_* constants + * @param string $description A description text + * @param mixed $default The default value (must be null for self::VALUE_NONE) + * + * @throws InvalidArgumentException If option mode is invalid or incompatible + */ + public function __construct($name, $shortcut = null, $mode = null, $description = '', $default = null) + { + if (0 === strpos($name, '--')) { + $name = substr($name, 2); + } + + if (empty($name)) { + throw new InvalidArgumentException('An option name cannot be empty.'); + } + + if (empty($shortcut)) { + $shortcut = null; + } + + if (null !== $shortcut) { + if (is_array($shortcut)) { + $shortcut = implode('|', $shortcut); + } + $shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-')); + $shortcuts = array_filter($shortcuts); + $shortcut = implode('|', $shortcuts); + + if (empty($shortcut)) { + throw new InvalidArgumentException('An option shortcut cannot be empty.'); + } + } + + if (null === $mode) { + $mode = self::VALUE_NONE; + } elseif (!is_int($mode) || $mode > 15 || $mode < 1) { + throw new InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode)); + } + + $this->name = $name; + $this->shortcut = $shortcut; + $this->mode = $mode; + $this->description = $description; + + if ($this->isArray() && !$this->acceptValue()) { + throw new InvalidArgumentException('Impossible to have an option mode VALUE_IS_ARRAY if the option does not accept a value.'); + } + + $this->setDefault($default); + } + + /** + * Returns the option shortcut. + * + * @return string The shortcut + */ + public function getShortcut() + { + return $this->shortcut; + } + + /** + * Returns the option name. + * + * @return string The name + */ + public function getName() + { + return $this->name; + } + + /** + * Returns true if the option accepts a value. + * + * @return bool true if value mode is not self::VALUE_NONE, false otherwise + */ + public function acceptValue() + { + return $this->isValueRequired() || $this->isValueOptional(); + } + + /** + * Returns true if the option requires a value. + * + * @return bool true if value mode is self::VALUE_REQUIRED, false otherwise + */ + public function isValueRequired() + { + return self::VALUE_REQUIRED === (self::VALUE_REQUIRED & $this->mode); + } + + /** + * Returns true if the option takes an optional value. + * + * @return bool true if value mode is self::VALUE_OPTIONAL, false otherwise + */ + public function isValueOptional() + { + return self::VALUE_OPTIONAL === (self::VALUE_OPTIONAL & $this->mode); + } + + /** + * Returns true if the option can take multiple values. + * + * @return bool true if mode is self::VALUE_IS_ARRAY, false otherwise + */ + public function isArray() + { + return self::VALUE_IS_ARRAY === (self::VALUE_IS_ARRAY & $this->mode); + } + + /** + * Sets the default value. + * + * @param mixed $default The default value + * + * @throws LogicException When incorrect default value is given + */ + public function setDefault($default = null) + { + if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) { + throw new LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.'); + } + + if ($this->isArray()) { + if (null === $default) { + $default = array(); + } elseif (!is_array($default)) { + throw new LogicException('A default value for an array option must be an array.'); + } + } + + $this->default = $this->acceptValue() ? $default : false; + } + + /** + * Returns the default value. + * + * @return mixed The default value + */ + public function getDefault() + { + return $this->default; + } + + /** + * Returns the description text. + * + * @return string The description text + */ + public function getDescription() + { + return $this->description; + } + + /** + * Checks whether the given option equals this one. + * + * @param InputOption $option option to compare + * + * @return bool + */ + public function equals(InputOption $option) + { + return $option->getName() === $this->getName() + && $option->getShortcut() === $this->getShortcut() + && $option->getDefault() === $this->getDefault() + && $option->isArray() === $this->isArray() + && $option->isValueRequired() === $this->isValueRequired() + && $option->isValueOptional() === $this->isValueOptional() + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Input/StreamableInputInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/StreamableInputInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d7e462f24443132dce367525f6e29619c5455dcf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/StreamableInputInterface.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Input; + +/** + * StreamableInputInterface is the interface implemented by all input classes + * that have an input stream. + * + * @author Robin Chalas + */ +interface StreamableInputInterface extends InputInterface +{ + /** + * Sets the input stream to read from when interacting with the user. + * + * This is mainly useful for testing purpose. + * + * @param resource $stream The input stream + */ + public function setStream($stream); + + /** + * Returns the input stream. + * + * @return resource|null + */ + public function getStream(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Input/StringInput.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/StringInput.php new file mode 100644 index 0000000000000000000000000000000000000000..9ce021745f2a397dd87acdb7f0f0c4e9cfe80d3e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Input/StringInput.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Input; + +use Symfony\Component\Console\Exception\InvalidArgumentException; + +/** + * StringInput represents an input provided as a string. + * + * Usage: + * + * $input = new StringInput('foo --bar="foobar"'); + * + * @author Fabien Potencier + */ +class StringInput extends ArgvInput +{ + const REGEX_STRING = '([^\s]+?)(?:\s|(?setTokens($this->tokenize($input)); + } + + /** + * Tokenizes a string. + * + * @param string $input The input to tokenize + * + * @return array An array of tokens + * + * @throws InvalidArgumentException When unable to parse input (should never happen) + */ + private function tokenize($input) + { + $tokens = array(); + $length = strlen($input); + $cursor = 0; + while ($cursor < $length) { + if (preg_match('/\s+/A', $input, $match, null, $cursor)) { + } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, null, $cursor)) { + $tokens[] = $match[1].$match[2].stripcslashes(str_replace(array('"\'', '\'"', '\'\'', '""'), '', substr($match[3], 1, strlen($match[3]) - 2))); + } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, null, $cursor)) { + $tokens[] = stripcslashes(substr($match[0], 1, strlen($match[0]) - 2)); + } elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, null, $cursor)) { + $tokens[] = stripcslashes($match[1]); + } else { + // should never happen + throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10))); + } + + $cursor += strlen($match[0]); + } + + return $tokens; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Console/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Console/Logger/ConsoleLogger.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Logger/ConsoleLogger.php new file mode 100644 index 0000000000000000000000000000000000000000..208575cebf767fc15893f2b741f0291c1dc58dd9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Logger/ConsoleLogger.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Logger; + +use Psr\Log\AbstractLogger; +use Psr\Log\InvalidArgumentException; +use Psr\Log\LogLevel; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Output\ConsoleOutputInterface; + +/** + * PSR-3 compliant console logger. + * + * @author Kévin Dunglas + * + * @see http://www.php-fig.org/psr/psr-3/ + */ +class ConsoleLogger extends AbstractLogger +{ + const INFO = 'info'; + const ERROR = 'error'; + + /** + * @var OutputInterface + */ + private $output; + /** + * @var array + */ + private $verbosityLevelMap = array( + LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, + LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, + LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, + LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL, + LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL, + LogLevel::NOTICE => OutputInterface::VERBOSITY_VERBOSE, + LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE, + LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG, + ); + /** + * @var array + */ + private $formatLevelMap = array( + LogLevel::EMERGENCY => self::ERROR, + LogLevel::ALERT => self::ERROR, + LogLevel::CRITICAL => self::ERROR, + LogLevel::ERROR => self::ERROR, + LogLevel::WARNING => self::INFO, + LogLevel::NOTICE => self::INFO, + LogLevel::INFO => self::INFO, + LogLevel::DEBUG => self::INFO, + ); + private $errored = false; + + /** + * @param OutputInterface $output + * @param array $verbosityLevelMap + * @param array $formatLevelMap + */ + public function __construct(OutputInterface $output, array $verbosityLevelMap = array(), array $formatLevelMap = array()) + { + $this->output = $output; + $this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap; + $this->formatLevelMap = $formatLevelMap + $this->formatLevelMap; + } + + /** + * {@inheritdoc} + */ + public function log($level, $message, array $context = array()) + { + if (!isset($this->verbosityLevelMap[$level])) { + throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); + } + + $output = $this->output; + + // Write to the error output if necessary and available + if ($this->formatLevelMap[$level] === self::ERROR) { + if ($this->output instanceof ConsoleOutputInterface) { + $output = $output->getErrorOutput(); + } + $this->errored = true; + } + + // the if condition check isn't necessary -- it's the same one that $output will do internally anyway. + // We only do it for efficiency here as the message formatting is relatively expensive. + if ($output->getVerbosity() >= $this->verbosityLevelMap[$level]) { + $output->writeln(sprintf('<%1$s>[%2$s] %3$s', $this->formatLevelMap[$level], $level, $this->interpolate($message, $context)), $this->verbosityLevelMap[$level]); + } + } + + /** + * Returns true when any messages have been logged at error levels. + */ + public function hasErrored() + { + return $this->errored; + } + + /** + * Interpolates context values into the message placeholders. + * + * @author PHP Framework Interoperability Group + * + * @param string $message + * @param array $context + * + * @return string + */ + private function interpolate($message, array $context) + { + // build a replacement array with braces around the context keys + $replace = array(); + foreach ($context as $key => $val) { + if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) { + $replace[sprintf('{%s}', $key)] = $val; + } + } + + // interpolate replacement values into the message and return + return strtr($message, $replace); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Output/BufferedOutput.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/BufferedOutput.php new file mode 100644 index 0000000000000000000000000000000000000000..5682fc2404f78f1078abb85b3f9c28e2e158c2a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/BufferedOutput.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Output; + +/** + * @author Jean-François Simon + */ +class BufferedOutput extends Output +{ + /** + * @var string + */ + private $buffer = ''; + + /** + * Empties buffer and returns its content. + * + * @return string + */ + public function fetch() + { + $content = $this->buffer; + $this->buffer = ''; + + return $content; + } + + /** + * {@inheritdoc} + */ + protected function doWrite($message, $newline) + { + $this->buffer .= $message; + + if ($newline) { + $this->buffer .= "\n"; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Output/ConsoleOutput.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/ConsoleOutput.php new file mode 100644 index 0000000000000000000000000000000000000000..007f3f01be33691665854ac7986f00ea66fcd3f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/ConsoleOutput.php @@ -0,0 +1,157 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Output; + +use Symfony\Component\Console\Formatter\OutputFormatterInterface; + +/** + * ConsoleOutput is the default class for all CLI output. It uses STDOUT and STDERR. + * + * This class is a convenient wrapper around `StreamOutput` for both STDOUT and STDERR. + * + * $output = new ConsoleOutput(); + * + * This is equivalent to: + * + * $output = new StreamOutput(fopen('php://stdout', 'w')); + * $stdErr = new StreamOutput(fopen('php://stderr', 'w')); + * + * @author Fabien Potencier + */ +class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface +{ + /** + * @var StreamOutput + */ + private $stderr; + + /** + * Constructor. + * + * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) + * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) + * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) + */ + public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null) + { + parent::__construct($this->openOutputStream(), $verbosity, $decorated, $formatter); + + $actualDecorated = $this->isDecorated(); + $this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated, $this->getFormatter()); + + if (null === $decorated) { + $this->setDecorated($actualDecorated && $this->stderr->isDecorated()); + } + } + + /** + * {@inheritdoc} + */ + public function setDecorated($decorated) + { + parent::setDecorated($decorated); + $this->stderr->setDecorated($decorated); + } + + /** + * {@inheritdoc} + */ + public function setFormatter(OutputFormatterInterface $formatter) + { + parent::setFormatter($formatter); + $this->stderr->setFormatter($formatter); + } + + /** + * {@inheritdoc} + */ + public function setVerbosity($level) + { + parent::setVerbosity($level); + $this->stderr->setVerbosity($level); + } + + /** + * {@inheritdoc} + */ + public function getErrorOutput() + { + return $this->stderr; + } + + /** + * {@inheritdoc} + */ + public function setErrorOutput(OutputInterface $error) + { + $this->stderr = $error; + } + + /** + * Returns true if current environment supports writing console output to + * STDOUT. + * + * @return bool + */ + protected function hasStdoutSupport() + { + return false === $this->isRunningOS400(); + } + + /** + * Returns true if current environment supports writing console output to + * STDERR. + * + * @return bool + */ + protected function hasStderrSupport() + { + return false === $this->isRunningOS400(); + } + + /** + * Checks if current executing environment is IBM iSeries (OS400), which + * doesn't properly convert character-encodings between ASCII to EBCDIC. + * + * @return bool + */ + private function isRunningOS400() + { + $checks = array( + function_exists('php_uname') ? php_uname('s') : '', + getenv('OSTYPE'), + PHP_OS, + ); + + return false !== stripos(implode(';', $checks), 'OS400'); + } + + /** + * @return resource + */ + private function openOutputStream() + { + if (!$this->hasStdoutSupport()) { + return fopen('php://output', 'w'); + } + + return @fopen('php://stdout', 'w') ?: fopen('php://output', 'w'); + } + + /** + * @return resource + */ + private function openErrorStream() + { + return fopen($this->hasStderrSupport() ? 'php://stderr' : 'php://output', 'w'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Output/ConsoleOutputInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/ConsoleOutputInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5eb4fc7acde2bc1b57be73227b4ccde707a36ab5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/ConsoleOutputInterface.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Output; + +/** + * ConsoleOutputInterface is the interface implemented by ConsoleOutput class. + * This adds information about stderr output stream. + * + * @author Dariusz Górecki + */ +interface ConsoleOutputInterface extends OutputInterface +{ + /** + * Gets the OutputInterface for errors. + * + * @return OutputInterface + */ + public function getErrorOutput(); + + /** + * Sets the OutputInterface used for errors. + * + * @param OutputInterface $error + */ + public function setErrorOutput(OutputInterface $error); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Output/NullOutput.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/NullOutput.php new file mode 100644 index 0000000000000000000000000000000000000000..218f285bfe51c7ecc1190c10fc9a18e4f6a81b27 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/NullOutput.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Output; + +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Formatter\OutputFormatterInterface; + +/** + * NullOutput suppresses all output. + * + * $output = new NullOutput(); + * + * @author Fabien Potencier + * @author Tobias Schultze + */ +class NullOutput implements OutputInterface +{ + /** + * {@inheritdoc} + */ + public function setFormatter(OutputFormatterInterface $formatter) + { + // do nothing + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + // to comply with the interface we must return a OutputFormatterInterface + return new OutputFormatter(); + } + + /** + * {@inheritdoc} + */ + public function setDecorated($decorated) + { + // do nothing + } + + /** + * {@inheritdoc} + */ + public function isDecorated() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function setVerbosity($level) + { + // do nothing + } + + /** + * {@inheritdoc} + */ + public function getVerbosity() + { + return self::VERBOSITY_QUIET; + } + + /** + * {@inheritdoc} + */ + public function isQuiet() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function isVerbose() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isVeryVerbose() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isDebug() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function writeln($messages, $options = self::OUTPUT_NORMAL) + { + // do nothing + } + + /** + * {@inheritdoc} + */ + public function write($messages, $newline = false, $options = self::OUTPUT_NORMAL) + { + // do nothing + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Output/Output.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/Output.php new file mode 100644 index 0000000000000000000000000000000000000000..c12015cc8fee097022ffe2f273f8a1a50fd1685c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/Output.php @@ -0,0 +1,177 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Output; + +use Symfony\Component\Console\Formatter\OutputFormatterInterface; +use Symfony\Component\Console\Formatter\OutputFormatter; + +/** + * Base class for output classes. + * + * There are five levels of verbosity: + * + * * normal: no option passed (normal output) + * * verbose: -v (more output) + * * very verbose: -vv (highly extended output) + * * debug: -vvv (all debug output) + * * quiet: -q (no output) + * + * @author Fabien Potencier + */ +abstract class Output implements OutputInterface +{ + private $verbosity; + private $formatter; + + /** + * Constructor. + * + * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) + * @param bool $decorated Whether to decorate messages + * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) + */ + public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = false, OutputFormatterInterface $formatter = null) + { + $this->verbosity = null === $verbosity ? self::VERBOSITY_NORMAL : $verbosity; + $this->formatter = $formatter ?: new OutputFormatter(); + $this->formatter->setDecorated($decorated); + } + + /** + * {@inheritdoc} + */ + public function setFormatter(OutputFormatterInterface $formatter) + { + $this->formatter = $formatter; + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + return $this->formatter; + } + + /** + * {@inheritdoc} + */ + public function setDecorated($decorated) + { + $this->formatter->setDecorated($decorated); + } + + /** + * {@inheritdoc} + */ + public function isDecorated() + { + return $this->formatter->isDecorated(); + } + + /** + * {@inheritdoc} + */ + public function setVerbosity($level) + { + $this->verbosity = (int) $level; + } + + /** + * {@inheritdoc} + */ + public function getVerbosity() + { + return $this->verbosity; + } + + /** + * {@inheritdoc} + */ + public function isQuiet() + { + return self::VERBOSITY_QUIET === $this->verbosity; + } + + /** + * {@inheritdoc} + */ + public function isVerbose() + { + return self::VERBOSITY_VERBOSE <= $this->verbosity; + } + + /** + * {@inheritdoc} + */ + public function isVeryVerbose() + { + return self::VERBOSITY_VERY_VERBOSE <= $this->verbosity; + } + + /** + * {@inheritdoc} + */ + public function isDebug() + { + return self::VERBOSITY_DEBUG <= $this->verbosity; + } + + /** + * {@inheritdoc} + */ + public function writeln($messages, $options = self::OUTPUT_NORMAL) + { + $this->write($messages, true, $options); + } + + /** + * {@inheritdoc} + */ + public function write($messages, $newline = false, $options = self::OUTPUT_NORMAL) + { + $messages = (array) $messages; + + $types = self::OUTPUT_NORMAL | self::OUTPUT_RAW | self::OUTPUT_PLAIN; + $type = $types & $options ?: self::OUTPUT_NORMAL; + + $verbosities = self::VERBOSITY_QUIET | self::VERBOSITY_NORMAL | self::VERBOSITY_VERBOSE | self::VERBOSITY_VERY_VERBOSE | self::VERBOSITY_DEBUG; + $verbosity = $verbosities & $options ?: self::VERBOSITY_NORMAL; + + if ($verbosity > $this->getVerbosity()) { + return; + } + + foreach ($messages as $message) { + switch ($type) { + case OutputInterface::OUTPUT_NORMAL: + $message = $this->formatter->format($message); + break; + case OutputInterface::OUTPUT_RAW: + break; + case OutputInterface::OUTPUT_PLAIN: + $message = strip_tags($this->formatter->format($message)); + break; + } + + $this->doWrite($message, $newline); + } + } + + /** + * Writes a message to the output. + * + * @param string $message A message to write to the output + * @param bool $newline Whether to add a newline or not + */ + abstract protected function doWrite($message, $newline); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Output/OutputInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/OutputInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a291ca7d7e22085957a351c902357729e4c4b647 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/OutputInterface.php @@ -0,0 +1,119 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Output; + +use Symfony\Component\Console\Formatter\OutputFormatterInterface; + +/** + * OutputInterface is the interface implemented by all Output classes. + * + * @author Fabien Potencier + */ +interface OutputInterface +{ + const VERBOSITY_QUIET = 16; + const VERBOSITY_NORMAL = 32; + const VERBOSITY_VERBOSE = 64; + const VERBOSITY_VERY_VERBOSE = 128; + const VERBOSITY_DEBUG = 256; + + const OUTPUT_NORMAL = 1; + const OUTPUT_RAW = 2; + const OUTPUT_PLAIN = 4; + + /** + * Writes a message to the output. + * + * @param string|array $messages The message as an array of lines or a single string + * @param bool $newline Whether to add a newline + * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL + */ + public function write($messages, $newline = false, $options = 0); + + /** + * Writes a message to the output and adds a newline at the end. + * + * @param string|array $messages The message as an array of lines of a single string + * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL + */ + public function writeln($messages, $options = 0); + + /** + * Sets the verbosity of the output. + * + * @param int $level The level of verbosity (one of the VERBOSITY constants) + */ + public function setVerbosity($level); + + /** + * Gets the current verbosity of the output. + * + * @return int The current level of verbosity (one of the VERBOSITY constants) + */ + public function getVerbosity(); + + /** + * Returns whether verbosity is quiet (-q). + * + * @return bool true if verbosity is set to VERBOSITY_QUIET, false otherwise + */ + public function isQuiet(); + + /** + * Returns whether verbosity is verbose (-v). + * + * @return bool true if verbosity is set to VERBOSITY_VERBOSE, false otherwise + */ + public function isVerbose(); + + /** + * Returns whether verbosity is very verbose (-vv). + * + * @return bool true if verbosity is set to VERBOSITY_VERY_VERBOSE, false otherwise + */ + public function isVeryVerbose(); + + /** + * Returns whether verbosity is debug (-vvv). + * + * @return bool true if verbosity is set to VERBOSITY_DEBUG, false otherwise + */ + public function isDebug(); + + /** + * Sets the decorated flag. + * + * @param bool $decorated Whether to decorate the messages + */ + public function setDecorated($decorated); + + /** + * Gets the decorated flag. + * + * @return bool true if the output will decorate messages, false otherwise + */ + public function isDecorated(); + + /** + * Sets output formatter. + * + * @param OutputFormatterInterface $formatter + */ + public function setFormatter(OutputFormatterInterface $formatter); + + /** + * Returns current output formatter instance. + * + * @return OutputFormatterInterface + */ + public function getFormatter(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Output/StreamOutput.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/StreamOutput.php new file mode 100644 index 0000000000000000000000000000000000000000..22b29aa1731837f923e66cb72f64f0d946624408 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Output/StreamOutput.php @@ -0,0 +1,105 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Output; + +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\RuntimeException; +use Symfony\Component\Console\Formatter\OutputFormatterInterface; + +/** + * StreamOutput writes the output to a given stream. + * + * Usage: + * + * $output = new StreamOutput(fopen('php://stdout', 'w')); + * + * As `StreamOutput` can use any stream, you can also use a file: + * + * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false)); + * + * @author Fabien Potencier + */ +class StreamOutput extends Output +{ + private $stream; + + /** + * Constructor. + * + * @param resource $stream A stream resource + * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) + * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) + * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) + * + * @throws InvalidArgumentException When first argument is not a real stream + */ + public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null) + { + if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) { + throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.'); + } + + $this->stream = $stream; + + if (null === $decorated) { + $decorated = $this->hasColorSupport(); + } + + parent::__construct($verbosity, $decorated, $formatter); + } + + /** + * Gets the stream attached to this StreamOutput instance. + * + * @return resource A stream resource + */ + public function getStream() + { + return $this->stream; + } + + /** + * {@inheritdoc} + */ + protected function doWrite($message, $newline) + { + if (false === @fwrite($this->stream, $message) || ($newline && (false === @fwrite($this->stream, PHP_EOL)))) { + // should never happen + throw new RuntimeException('Unable to write output.'); + } + + fflush($this->stream); + } + + /** + * Returns true if the stream supports colorization. + * + * Colorization is disabled if not supported by the stream: + * + * - Windows != 10.0.10586 without Ansicon, ConEmu or Mintty + * - non tty consoles + * + * @return bool true if the stream supports colorization, false otherwise + */ + protected function hasColorSupport() + { + if (DIRECTORY_SEPARATOR === '\\') { + return + '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM'); + } + + return function_exists('posix_isatty') && @posix_isatty($this->stream); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ChoiceQuestion.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ChoiceQuestion.php new file mode 100644 index 0000000000000000000000000000000000000000..522a81bb146d55750c103c1e7f2c3df5e35bcc74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ChoiceQuestion.php @@ -0,0 +1,187 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Question; + +use Symfony\Component\Console\Exception\InvalidArgumentException; + +/** + * Represents a choice question. + * + * @author Fabien Potencier + */ +class ChoiceQuestion extends Question +{ + private $choices; + private $multiselect = false; + private $prompt = ' > '; + private $errorMessage = 'Value "%s" is invalid'; + + /** + * Constructor. + * + * @param string $question The question to ask to the user + * @param array $choices The list of available choices + * @param mixed $default The default answer to return + */ + public function __construct($question, array $choices, $default = null) + { + parent::__construct($question, $default); + + $this->choices = $choices; + $this->setValidator($this->getDefaultValidator()); + $this->setAutocompleterValues($choices); + } + + /** + * Returns available choices. + * + * @return array + */ + public function getChoices() + { + return $this->choices; + } + + /** + * Sets multiselect option. + * + * When multiselect is set to true, multiple choices can be answered. + * + * @param bool $multiselect + * + * @return $this + */ + public function setMultiselect($multiselect) + { + $this->multiselect = $multiselect; + $this->setValidator($this->getDefaultValidator()); + + return $this; + } + + /** + * Returns whether the choices are multiselect. + * + * @return bool + */ + public function isMultiselect() + { + return $this->multiselect; + } + + /** + * Gets the prompt for choices. + * + * @return string + */ + public function getPrompt() + { + return $this->prompt; + } + + /** + * Sets the prompt for choices. + * + * @param string $prompt + * + * @return $this + */ + public function setPrompt($prompt) + { + $this->prompt = $prompt; + + return $this; + } + + /** + * Sets the error message for invalid values. + * + * The error message has a string placeholder (%s) for the invalid value. + * + * @param string $errorMessage + * + * @return $this + */ + public function setErrorMessage($errorMessage) + { + $this->errorMessage = $errorMessage; + $this->setValidator($this->getDefaultValidator()); + + return $this; + } + + /** + * Returns the default answer validator. + * + * @return callable + */ + private function getDefaultValidator() + { + $choices = $this->choices; + $errorMessage = $this->errorMessage; + $multiselect = $this->multiselect; + $isAssoc = $this->isAssoc($choices); + + return function ($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) { + // Collapse all spaces. + $selectedChoices = str_replace(' ', '', $selected); + + if ($multiselect) { + // Check for a separated comma values + if (!preg_match('/^[a-zA-Z0-9_-]+(?:,[a-zA-Z0-9_-]+)*$/', $selectedChoices, $matches)) { + throw new InvalidArgumentException(sprintf($errorMessage, $selected)); + } + $selectedChoices = explode(',', $selectedChoices); + } else { + $selectedChoices = array($selected); + } + + $multiselectChoices = array(); + foreach ($selectedChoices as $value) { + $results = array(); + foreach ($choices as $key => $choice) { + if ($choice === $value) { + $results[] = $key; + } + } + + if (count($results) > 1) { + throw new InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of %s.', implode(' or ', $results))); + } + + $result = array_search($value, $choices); + + if (!$isAssoc) { + if (false !== $result) { + $result = $choices[$result]; + } elseif (isset($choices[$value])) { + $result = $choices[$value]; + } + } elseif (false === $result && isset($choices[$value])) { + $result = $value; + } + + if (false === $result) { + throw new InvalidArgumentException(sprintf($errorMessage, $value)); + } + + $multiselectChoices[] = (string) $result; + } + + if ($multiselect) { + return $multiselectChoices; + } + + return current($multiselectChoices); + }; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ConfirmationQuestion.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ConfirmationQuestion.php new file mode 100644 index 0000000000000000000000000000000000000000..29d98879f0c560ee98e7d20ef86af644cb55be61 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Question/ConfirmationQuestion.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Question; + +/** + * Represents a yes/no question. + * + * @author Fabien Potencier + */ +class ConfirmationQuestion extends Question +{ + private $trueAnswerRegex; + + /** + * Constructor. + * + * @param string $question The question to ask to the user + * @param bool $default The default answer to return, true or false + * @param string $trueAnswerRegex A regex to match the "yes" answer + */ + public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i') + { + parent::__construct($question, (bool) $default); + + $this->trueAnswerRegex = $trueAnswerRegex; + $this->setNormalizer($this->getDefaultNormalizer()); + } + + /** + * Returns the default answer normalizer. + * + * @return callable + */ + private function getDefaultNormalizer() + { + $default = $this->getDefault(); + $regex = $this->trueAnswerRegex; + + return function ($answer) use ($default, $regex) { + if (is_bool($answer)) { + return $answer; + } + + $answerIsTrue = (bool) preg_match($regex, $answer); + if (false === $default) { + return $answer && $answerIsTrue; + } + + return !$answer || $answerIsTrue; + }; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Question/Question.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Question/Question.php new file mode 100644 index 0000000000000000000000000000000000000000..6425cc5416b6be9df5282b00055eadd50beb9af5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Question/Question.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\Component\Console\Question; + +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\LogicException; + +/** + * Represents a Question. + * + * @author Fabien Potencier + */ +class Question +{ + private $question; + private $attempts; + private $hidden = false; + private $hiddenFallback = true; + private $autocompleterValues; + private $validator; + private $default; + private $normalizer; + + /** + * Constructor. + * + * @param string $question The question to ask to the user + * @param mixed $default The default answer to return if the user enters nothing + */ + public function __construct($question, $default = null) + { + $this->question = $question; + $this->default = $default; + } + + /** + * Returns the question. + * + * @return string + */ + public function getQuestion() + { + return $this->question; + } + + /** + * Returns the default answer. + * + * @return mixed + */ + public function getDefault() + { + return $this->default; + } + + /** + * Returns whether the user response must be hidden. + * + * @return bool + */ + public function isHidden() + { + return $this->hidden; + } + + /** + * Sets whether the user response must be hidden or not. + * + * @param bool $hidden + * + * @return $this + * + * @throws LogicException In case the autocompleter is also used + */ + public function setHidden($hidden) + { + if ($this->autocompleterValues) { + throw new LogicException('A hidden question cannot use the autocompleter.'); + } + + $this->hidden = (bool) $hidden; + + return $this; + } + + /** + * In case the response can not be hidden, whether to fallback on non-hidden question or not. + * + * @return bool + */ + public function isHiddenFallback() + { + return $this->hiddenFallback; + } + + /** + * Sets whether to fallback on non-hidden question if the response can not be hidden. + * + * @param bool $fallback + * + * @return $this + */ + public function setHiddenFallback($fallback) + { + $this->hiddenFallback = (bool) $fallback; + + return $this; + } + + /** + * Gets values for the autocompleter. + * + * @return null|array|\Traversable + */ + public function getAutocompleterValues() + { + return $this->autocompleterValues; + } + + /** + * Sets values for the autocompleter. + * + * @param null|array|\Traversable $values + * + * @return $this + * + * @throws InvalidArgumentException + * @throws LogicException + */ + public function setAutocompleterValues($values) + { + if (is_array($values)) { + $values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values); + } + + if (null !== $values && !is_array($values)) { + if (!$values instanceof \Traversable || !$values instanceof \Countable) { + throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or an object implementing both `Countable` and `Traversable` interfaces.'); + } + } + + if ($this->hidden) { + throw new LogicException('A hidden question cannot use the autocompleter.'); + } + + $this->autocompleterValues = $values; + + return $this; + } + + /** + * Sets a validator for the question. + * + * @param null|callable $validator + * + * @return $this + */ + public function setValidator(callable $validator = null) + { + $this->validator = $validator; + + return $this; + } + + /** + * Gets the validator for the question. + * + * @return null|callable + */ + public function getValidator() + { + return $this->validator; + } + + /** + * Sets the maximum number of attempts. + * + * Null means an unlimited number of attempts. + * + * @param null|int $attempts + * + * @return $this + * + * @throws InvalidArgumentException In case the number of attempts is invalid. + */ + public function setMaxAttempts($attempts) + { + if (null !== $attempts && $attempts < 1) { + throw new InvalidArgumentException('Maximum number of attempts must be a positive value.'); + } + + $this->attempts = $attempts; + + return $this; + } + + /** + * Gets the maximum number of attempts. + * + * Null means an unlimited number of attempts. + * + * @return null|int + */ + public function getMaxAttempts() + { + return $this->attempts; + } + + /** + * Sets a normalizer for the response. + * + * The normalizer can be a callable (a string), a closure or a class implementing __invoke. + * + * @param callable $normalizer + * + * @return $this + */ + public function setNormalizer(callable $normalizer) + { + $this->normalizer = $normalizer; + + return $this; + } + + /** + * Gets the normalizer for the response. + * + * The normalizer can ba a callable (a string), a closure or a class implementing __invoke. + * + * @return callable + */ + public function getNormalizer() + { + return $this->normalizer; + } + + protected function isAssoc($array) + { + return (bool) count(array_filter(array_keys($array), 'is_string')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/README.md b/vendor/symfony/symfony/src/Symfony/Component/Console/README.md new file mode 100644 index 0000000000000000000000000000000000000000..664a37c0ee7be12f5560a765c5514c818b8546c0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/README.md @@ -0,0 +1,20 @@ +Console Component +================= + +The Console component eases the creation of beautiful and testable command line +interfaces. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/console/index.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) + +Credits +------- + +`Resources/bin/hiddeninput.exe` is a third party binary provided within this +component. Find sources and license at https://github.com/Seldaek/hidden-input. diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Resources/bin/hiddeninput.exe b/vendor/symfony/symfony/src/Symfony/Component/Console/Resources/bin/hiddeninput.exe new file mode 100644 index 0000000000000000000000000000000000000000..c8cf65e8d819e6e525121cf6b21f1c2429746038 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Console/Resources/bin/hiddeninput.exe differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Style/OutputStyle.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Style/OutputStyle.php new file mode 100644 index 0000000000000000000000000000000000000000..de7be1e08b3f3d8bca62c62595f4deb7b2e8b57b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Style/OutputStyle.php @@ -0,0 +1,148 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Style; + +use Symfony\Component\Console\Formatter\OutputFormatterInterface; +use Symfony\Component\Console\Helper\ProgressBar; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Decorates output to add console style guide helpers. + * + * @author Kevin Bond + */ +abstract class OutputStyle implements OutputInterface, StyleInterface +{ + private $output; + + /** + * @param OutputInterface $output + */ + public function __construct(OutputInterface $output) + { + $this->output = $output; + } + + /** + * {@inheritdoc} + */ + public function newLine($count = 1) + { + $this->output->write(str_repeat(PHP_EOL, $count)); + } + + /** + * @param int $max + * + * @return ProgressBar + */ + public function createProgressBar($max = 0) + { + return new ProgressBar($this->output, $max); + } + + /** + * {@inheritdoc} + */ + public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) + { + $this->output->write($messages, $newline, $type); + } + + /** + * {@inheritdoc} + */ + public function writeln($messages, $type = self::OUTPUT_NORMAL) + { + $this->output->writeln($messages, $type); + } + + /** + * {@inheritdoc} + */ + public function setVerbosity($level) + { + $this->output->setVerbosity($level); + } + + /** + * {@inheritdoc} + */ + public function getVerbosity() + { + return $this->output->getVerbosity(); + } + + /** + * {@inheritdoc} + */ + public function setDecorated($decorated) + { + $this->output->setDecorated($decorated); + } + + /** + * {@inheritdoc} + */ + public function isDecorated() + { + return $this->output->isDecorated(); + } + + /** + * {@inheritdoc} + */ + public function setFormatter(OutputFormatterInterface $formatter) + { + $this->output->setFormatter($formatter); + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + return $this->output->getFormatter(); + } + + /** + * {@inheritdoc} + */ + public function isQuiet() + { + return $this->output->isQuiet(); + } + + /** + * {@inheritdoc} + */ + public function isVerbose() + { + return $this->output->isVerbose(); + } + + /** + * {@inheritdoc} + */ + public function isVeryVerbose() + { + return $this->output->isVeryVerbose(); + } + + /** + * {@inheritdoc} + */ + public function isDebug() + { + return $this->output->isDebug(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Style/StyleInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Style/StyleInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..2448547f855aacfc26e2c5fd78468d91346640a2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Style/StyleInterface.php @@ -0,0 +1,159 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Style; + +/** + * Output style helpers. + * + * @author Kevin Bond + */ +interface StyleInterface +{ + /** + * Formats a command title. + * + * @param string $message + */ + public function title($message); + + /** + * Formats a section title. + * + * @param string $message + */ + public function section($message); + + /** + * Formats a list. + * + * @param array $elements + */ + public function listing(array $elements); + + /** + * Formats informational text. + * + * @param string|array $message + */ + public function text($message); + + /** + * Formats a success result bar. + * + * @param string|array $message + */ + public function success($message); + + /** + * Formats an error result bar. + * + * @param string|array $message + */ + public function error($message); + + /** + * Formats an warning result bar. + * + * @param string|array $message + */ + public function warning($message); + + /** + * Formats a note admonition. + * + * @param string|array $message + */ + public function note($message); + + /** + * Formats a caution admonition. + * + * @param string|array $message + */ + public function caution($message); + + /** + * Formats a table. + * + * @param array $headers + * @param array $rows + */ + public function table(array $headers, array $rows); + + /** + * Asks a question. + * + * @param string $question + * @param string|null $default + * @param callable|null $validator + * + * @return string + */ + public function ask($question, $default = null, $validator = null); + + /** + * Asks a question with the user input hidden. + * + * @param string $question + * @param callable|null $validator + * + * @return string + */ + public function askHidden($question, $validator = null); + + /** + * Asks for confirmation. + * + * @param string $question + * @param bool $default + * + * @return bool + */ + public function confirm($question, $default = true); + + /** + * Asks a choice question. + * + * @param string $question + * @param array $choices + * @param string|int|null $default + * + * @return string + */ + public function choice($question, array $choices, $default = null); + + /** + * Add newline(s). + * + * @param int $count The number of newlines + */ + public function newLine($count = 1); + + /** + * Starts the progress output. + * + * @param int $max Maximum steps (0 if unknown) + */ + public function progressStart($max = 0); + + /** + * Advances the progress output X steps. + * + * @param int $step Number of steps to advance + */ + public function progressAdvance($step = 1); + + /** + * Finishes the progress output. + */ + public function progressFinish(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Style/SymfonyStyle.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Style/SymfonyStyle.php new file mode 100644 index 0000000000000000000000000000000000000000..3c9617fbd25f026dd2f8a188e1b0569124f66ee4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Style/SymfonyStyle.php @@ -0,0 +1,428 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Style; + +use Symfony\Component\Console\Exception\RuntimeException; +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Helper\Helper; +use Symfony\Component\Console\Helper\ProgressBar; +use Symfony\Component\Console\Helper\SymfonyQuestionHelper; +use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\BufferedOutput; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Question\ChoiceQuestion; +use Symfony\Component\Console\Question\ConfirmationQuestion; +use Symfony\Component\Console\Question\Question; +use Symfony\Component\Console\Terminal; + +/** + * Output decorator helpers for the Symfony Style Guide. + * + * @author Kevin Bond + */ +class SymfonyStyle extends OutputStyle +{ + const MAX_LINE_LENGTH = 120; + + private $input; + private $questionHelper; + private $progressBar; + private $lineLength; + private $bufferedOutput; + + /** + * @param InputInterface $input + * @param OutputInterface $output + */ + public function __construct(InputInterface $input, OutputInterface $output) + { + $this->input = $input; + $this->bufferedOutput = new BufferedOutput($output->getVerbosity(), false, clone $output->getFormatter()); + // Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not. + $width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH; + $this->lineLength = min($width - (int) (DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH); + + parent::__construct($output); + } + + /** + * Formats a message as a block of text. + * + * @param string|array $messages The message to write in the block + * @param string|null $type The block type (added in [] on first line) + * @param string|null $style The style to apply to the whole block + * @param string $prefix The prefix for the block + * @param bool $padding Whether to add vertical padding + */ + public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false) + { + $messages = is_array($messages) ? array_values($messages) : array($messages); + + $this->autoPrependBlock(); + $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, true)); + $this->newLine(); + } + + /** + * {@inheritdoc} + */ + public function title($message) + { + $this->autoPrependBlock(); + $this->writeln(array( + sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), + sprintf('%s', str_repeat('=', Helper::strlenWithoutDecoration($this->getFormatter(), $message))), + )); + $this->newLine(); + } + + /** + * {@inheritdoc} + */ + public function section($message) + { + $this->autoPrependBlock(); + $this->writeln(array( + sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), + sprintf('%s', str_repeat('-', Helper::strlenWithoutDecoration($this->getFormatter(), $message))), + )); + $this->newLine(); + } + + /** + * {@inheritdoc} + */ + public function listing(array $elements) + { + $this->autoPrependText(); + $elements = array_map(function ($element) { + return sprintf(' * %s', $element); + }, $elements); + + $this->writeln($elements); + $this->newLine(); + } + + /** + * {@inheritdoc} + */ + public function text($message) + { + $this->autoPrependText(); + + $messages = is_array($message) ? array_values($message) : array($message); + foreach ($messages as $message) { + $this->writeln(sprintf(' %s', $message)); + } + } + + /** + * Formats a command comment. + * + * @param string|array $message + */ + public function comment($message) + { + $messages = is_array($message) ? array_values($message) : array($message); + + $this->autoPrependBlock(); + $this->writeln($this->createBlock($messages, null, null, ' // ')); + $this->newLine(); + } + + /** + * {@inheritdoc} + */ + public function success($message) + { + $this->block($message, 'OK', 'fg=black;bg=green', ' ', true); + } + + /** + * {@inheritdoc} + */ + public function error($message) + { + $this->block($message, 'ERROR', 'fg=white;bg=red', ' ', true); + } + + /** + * {@inheritdoc} + */ + public function warning($message) + { + $this->block($message, 'WARNING', 'fg=white;bg=red', ' ', true); + } + + /** + * {@inheritdoc} + */ + public function note($message) + { + $this->block($message, 'NOTE', 'fg=yellow', ' ! '); + } + + /** + * {@inheritdoc} + */ + public function caution($message) + { + $this->block($message, 'CAUTION', 'fg=white;bg=red', ' ! ', true); + } + + /** + * {@inheritdoc} + */ + public function table(array $headers, array $rows) + { + $style = clone Table::getStyleDefinition('symfony-style-guide'); + $style->setCellHeaderFormat('%s'); + + $table = new Table($this); + $table->setHeaders($headers); + $table->setRows($rows); + $table->setStyle($style); + + $table->render(); + $this->newLine(); + } + + /** + * {@inheritdoc} + */ + public function ask($question, $default = null, $validator = null) + { + $question = new Question($question, $default); + $question->setValidator($validator); + + return $this->askQuestion($question); + } + + /** + * {@inheritdoc} + */ + public function askHidden($question, $validator = null) + { + $question = new Question($question); + + $question->setHidden(true); + $question->setValidator($validator); + + return $this->askQuestion($question); + } + + /** + * {@inheritdoc} + */ + public function confirm($question, $default = true) + { + return $this->askQuestion(new ConfirmationQuestion($question, $default)); + } + + /** + * {@inheritdoc} + */ + public function choice($question, array $choices, $default = null) + { + if (null !== $default) { + $values = array_flip($choices); + $default = $values[$default]; + } + + return $this->askQuestion(new ChoiceQuestion($question, $choices, $default)); + } + + /** + * {@inheritdoc} + */ + public function progressStart($max = 0) + { + $this->progressBar = $this->createProgressBar($max); + $this->progressBar->start(); + } + + /** + * {@inheritdoc} + */ + public function progressAdvance($step = 1) + { + $this->getProgressBar()->advance($step); + } + + /** + * {@inheritdoc} + */ + public function progressFinish() + { + $this->getProgressBar()->finish(); + $this->newLine(2); + $this->progressBar = null; + } + + /** + * {@inheritdoc} + */ + public function createProgressBar($max = 0) + { + $progressBar = parent::createProgressBar($max); + + if ('\\' !== DIRECTORY_SEPARATOR) { + $progressBar->setEmptyBarCharacter('â–‘'); // light shade character \u2591 + $progressBar->setProgressCharacter(''); + $progressBar->setBarCharacter('â–“'); // dark shade character \u2593 + } + + return $progressBar; + } + + /** + * @param Question $question + * + * @return string + */ + public function askQuestion(Question $question) + { + if ($this->input->isInteractive()) { + $this->autoPrependBlock(); + } + + if (!$this->questionHelper) { + $this->questionHelper = new SymfonyQuestionHelper(); + } + + $answer = $this->questionHelper->ask($this->input, $this, $question); + + if ($this->input->isInteractive()) { + $this->newLine(); + $this->bufferedOutput->write("\n"); + } + + return $answer; + } + + /** + * {@inheritdoc} + */ + public function writeln($messages, $type = self::OUTPUT_NORMAL) + { + parent::writeln($messages, $type); + $this->bufferedOutput->writeln($this->reduceBuffer($messages), $type); + } + + /** + * {@inheritdoc} + */ + public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) + { + parent::write($messages, $newline, $type); + $this->bufferedOutput->write($this->reduceBuffer($messages), $newline, $type); + } + + /** + * {@inheritdoc} + */ + public function newLine($count = 1) + { + parent::newLine($count); + $this->bufferedOutput->write(str_repeat("\n", $count)); + } + + /** + * @return ProgressBar + */ + private function getProgressBar() + { + if (!$this->progressBar) { + throw new RuntimeException('The ProgressBar is not started.'); + } + + return $this->progressBar; + } + + private function autoPrependBlock() + { + $chars = substr(str_replace(PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2); + + if (!isset($chars[0])) { + return $this->newLine(); //empty history, so we should start with a new line. + } + //Prepend new line for each non LF chars (This means no blank line was output before) + $this->newLine(2 - substr_count($chars, "\n")); + } + + private function autoPrependText() + { + $fetched = $this->bufferedOutput->fetch(); + //Prepend new line if last char isn't EOL: + if ("\n" !== substr($fetched, -1)) { + $this->newLine(); + } + } + + private function reduceBuffer($messages) + { + // We need to know if the two last chars are PHP_EOL + // Preserve the last 4 chars inserted (PHP_EOL on windows is two chars) in the history buffer + return array_map(function ($value) { + return substr($value, -4); + }, array_merge(array($this->bufferedOutput->fetch()), (array) $messages)); + } + + private function createBlock($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = false) + { + $indentLength = 0; + $prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix); + $lines = array(); + + if (null !== $type) { + $type = sprintf('[%s] ', $type); + $indentLength = strlen($type); + $lineIndentation = str_repeat(' ', $indentLength); + } + + // wrap and add newlines for each element + foreach ($messages as $key => $message) { + if ($escape) { + $message = OutputFormatter::escape($message); + } + + $lines = array_merge($lines, explode(PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength, PHP_EOL, true))); + + if (count($messages) > 1 && $key < count($messages) - 1) { + $lines[] = ''; + } + } + + $firstLineIndex = 0; + if ($padding && $this->isDecorated()) { + $firstLineIndex = 1; + array_unshift($lines, ''); + $lines[] = ''; + } + + foreach ($lines as $i => &$line) { + if (null !== $type) { + $line = $firstLineIndex === $i ? $type.$line : $lineIndentation.$line; + } + + $line = $prefix.$line; + $line .= str_repeat(' ', $this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line)); + + if ($style) { + $line = sprintf('<%s>%s', $style, $line); + } + } + + return $lines; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Terminal.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Terminal.php new file mode 100644 index 0000000000000000000000000000000000000000..217e1f6e4717049b8716ffc6814539ec1e317acc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Terminal.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\Component\Console; + +class Terminal +{ + private static $width; + private static $height; + + /** + * Gets the terminal width. + * + * @return int + */ + public function getWidth() + { + if ($width = trim(getenv('COLUMNS'))) { + return (int) $width; + } + + if (null === self::$width) { + self::initDimensions(); + } + + return self::$width ?: 80; + } + + /** + * Gets the terminal height. + * + * @return int + */ + public function getHeight() + { + if ($height = trim(getenv('LINES'))) { + return (int) $height; + } + + if (null === self::$height) { + self::initDimensions(); + } + + return self::$height ?: 50; + } + + private static function initDimensions() + { + if ('\\' === DIRECTORY_SEPARATOR) { + if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) { + // extract [w, H] from "wxh (WxH)" + // or [w, h] from "wxh" + self::$width = (int) $matches[1]; + self::$height = isset($matches[4]) ? (int) $matches[4] : (int) $matches[2]; + } elseif (null !== $dimensions = self::getConsoleMode()) { + // extract [w, h] from "wxh" + self::$width = (int) $dimensions[0]; + self::$height = (int) $dimensions[1]; + } + } elseif ($sttyString = self::getSttyColumns()) { + if (preg_match('/rows.(\d+);.columns.(\d+);/i', $sttyString, $matches)) { + // extract [w, h] from "rows h; columns w;" + self::$width = (int) $matches[2]; + self::$height = (int) $matches[1]; + } elseif (preg_match('/;.(\d+).rows;.(\d+).columns/i', $sttyString, $matches)) { + // extract [w, h] from "; h rows; w columns" + self::$width = (int) $matches[2]; + self::$height = (int) $matches[1]; + } + } + } + + /** + * Runs and parses mode CON if it's available, suppressing any error output. + * + * @return int[]|null An array composed of the width and the height or null if it could not be parsed + */ + private static function getConsoleMode() + { + if (!function_exists('proc_open')) { + return; + } + + $descriptorspec = array( + 1 => array('pipe', 'w'), + 2 => array('pipe', 'w'), + ); + $process = proc_open('mode CON', $descriptorspec, $pipes, null, null, array('suppress_errors' => true)); + if (is_resource($process)) { + $info = stream_get_contents($pipes[1]); + fclose($pipes[1]); + fclose($pipes[2]); + proc_close($process); + + if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) { + return array((int) $matches[2], (int) $matches[1]); + } + } + } + + /** + * Runs and parses stty -a if it's available, suppressing any error output. + * + * @return string|null + */ + private static function getSttyColumns() + { + if (!function_exists('proc_open')) { + return; + } + + $descriptorspec = array( + 1 => array('pipe', 'w'), + 2 => array('pipe', 'w'), + ); + + $process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, array('suppress_errors' => true)); + if (is_resource($process)) { + $info = stream_get_contents($pipes[1]); + fclose($pipes[1]); + fclose($pipes[2]); + proc_close($process); + + return $info; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/ApplicationTester.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/ApplicationTester.php new file mode 100644 index 0000000000000000000000000000000000000000..c0f8c7207f2a8a117838736093c76a478a23185f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/ApplicationTester.php @@ -0,0 +1,176 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tester; + +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\ConsoleOutput; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Output\StreamOutput; + +/** + * Eases the testing of console applications. + * + * When testing an application, don't forget to disable the auto exit flag: + * + * $application = new Application(); + * $application->setAutoExit(false); + * + * @author Fabien Potencier + */ +class ApplicationTester +{ + private $application; + private $input; + private $statusCode; + /** + * @var OutputInterface + */ + private $output; + private $captureStreamsIndependently = false; + + public function __construct(Application $application) + { + $this->application = $application; + } + + /** + * Executes the application. + * + * Available options: + * + * * interactive: Sets the input interactive flag + * * decorated: Sets the output decorated flag + * * verbosity: Sets the output verbosity flag + * * capture_stderr_separately: Make output of stdOut and stdErr separately available + * + * @param array $input An array of arguments and options + * @param array $options An array of options + * + * @return int The command exit code + */ + public function run(array $input, $options = array()) + { + $this->input = new ArrayInput($input); + if (isset($options['interactive'])) { + $this->input->setInteractive($options['interactive']); + } + + $this->captureStreamsIndependently = array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately']; + if (!$this->captureStreamsIndependently) { + $this->output = new StreamOutput(fopen('php://memory', 'w', false)); + if (isset($options['decorated'])) { + $this->output->setDecorated($options['decorated']); + } + if (isset($options['verbosity'])) { + $this->output->setVerbosity($options['verbosity']); + } + } else { + $this->output = new ConsoleOutput( + isset($options['verbosity']) ? $options['verbosity'] : ConsoleOutput::VERBOSITY_NORMAL, + isset($options['decorated']) ? $options['decorated'] : null + ); + + $errorOutput = new StreamOutput(fopen('php://memory', 'w', false)); + $errorOutput->setFormatter($this->output->getFormatter()); + $errorOutput->setVerbosity($this->output->getVerbosity()); + $errorOutput->setDecorated($this->output->isDecorated()); + + $reflectedOutput = new \ReflectionObject($this->output); + $strErrProperty = $reflectedOutput->getProperty('stderr'); + $strErrProperty->setAccessible(true); + $strErrProperty->setValue($this->output, $errorOutput); + + $reflectedParent = $reflectedOutput->getParentClass(); + $streamProperty = $reflectedParent->getProperty('stream'); + $streamProperty->setAccessible(true); + $streamProperty->setValue($this->output, fopen('php://memory', 'w', false)); + } + + return $this->statusCode = $this->application->run($this->input, $this->output); + } + + /** + * Gets the display returned by the last execution of the application. + * + * @param bool $normalize Whether to normalize end of lines to \n or not + * + * @return string The display + */ + public function getDisplay($normalize = false) + { + rewind($this->output->getStream()); + + $display = stream_get_contents($this->output->getStream()); + + if ($normalize) { + $display = str_replace(PHP_EOL, "\n", $display); + } + + return $display; + } + + /** + * Gets the output written to STDERR by the application. + * + * @param bool $normalize Whether to normalize end of lines to \n or not + * + * @return string + */ + public function getErrorOutput($normalize = false) + { + if (!$this->captureStreamsIndependently) { + throw new \LogicException('The error output is not available when the tester is run without "capture_stderr_separately" option set.'); + } + + rewind($this->output->getErrorOutput()->getStream()); + + $display = stream_get_contents($this->output->getErrorOutput()->getStream()); + + if ($normalize) { + $display = str_replace(PHP_EOL, "\n", $display); + } + + return $display; + } + + /** + * Gets the input instance used by the last execution of the application. + * + * @return InputInterface The current input instance + */ + public function getInput() + { + return $this->input; + } + + /** + * Gets the output instance used by the last execution of the application. + * + * @return OutputInterface The current output instance + */ + public function getOutput() + { + return $this->output; + } + + /** + * Gets the status code returned by the last execution of the application. + * + * @return int The status code + */ + public function getStatusCode() + { + return $this->statusCode; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/CommandTester.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/CommandTester.php new file mode 100644 index 0000000000000000000000000000000000000000..080ace5c9591138ecaa10fd71c9b4123a7315b55 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tester/CommandTester.php @@ -0,0 +1,163 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tester; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Output\StreamOutput; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Eases the testing of console commands. + * + * @author Fabien Potencier + * @author Robin Chalas + */ +class CommandTester +{ + private $command; + private $input; + private $output; + private $inputs = array(); + private $statusCode; + + /** + * Constructor. + * + * @param Command $command A Command instance to test + */ + public function __construct(Command $command) + { + $this->command = $command; + } + + /** + * Executes the command. + * + * Available execution options: + * + * * interactive: Sets the input interactive flag + * * decorated: Sets the output decorated flag + * * verbosity: Sets the output verbosity flag + * + * @param array $input An array of command arguments and options + * @param array $options An array of execution options + * + * @return int The command exit code + */ + public function execute(array $input, array $options = array()) + { + // set the command name automatically if the application requires + // this argument and no command name was passed + if (!isset($input['command']) + && (null !== $application = $this->command->getApplication()) + && $application->getDefinition()->hasArgument('command') + ) { + $input = array_merge(array('command' => $this->command->getName()), $input); + } + + $this->input = new ArrayInput($input); + if ($this->inputs) { + $this->input->setStream(self::createStream($this->inputs)); + } + + if (isset($options['interactive'])) { + $this->input->setInteractive($options['interactive']); + } + + $this->output = new StreamOutput(fopen('php://memory', 'w', false)); + if (isset($options['decorated'])) { + $this->output->setDecorated($options['decorated']); + } + if (isset($options['verbosity'])) { + $this->output->setVerbosity($options['verbosity']); + } + + return $this->statusCode = $this->command->run($this->input, $this->output); + } + + /** + * Gets the display returned by the last execution of the command. + * + * @param bool $normalize Whether to normalize end of lines to \n or not + * + * @return string The display + */ + public function getDisplay($normalize = false) + { + rewind($this->output->getStream()); + + $display = stream_get_contents($this->output->getStream()); + + if ($normalize) { + $display = str_replace(PHP_EOL, "\n", $display); + } + + return $display; + } + + /** + * Gets the input instance used by the last execution of the command. + * + * @return InputInterface The current input instance + */ + public function getInput() + { + return $this->input; + } + + /** + * Gets the output instance used by the last execution of the command. + * + * @return OutputInterface The current output instance + */ + public function getOutput() + { + return $this->output; + } + + /** + * Gets the status code returned by the last execution of the application. + * + * @return int The status code + */ + public function getStatusCode() + { + return $this->statusCode; + } + + /** + * Sets the user inputs. + * + * @param array An array of strings representing each input + * passed to the command input stream. + * + * @return CommandTester + */ + public function setInputs(array $inputs) + { + $this->inputs = $inputs; + + return $this; + } + + private static function createStream(array $inputs) + { + $stream = fopen('php://memory', 'r+', false); + + fwrite($stream, implode(PHP_EOL, $inputs)); + rewind($stream); + + return $stream; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..25efc256dca7ee2e9a5baf25a474b8bc77d34429 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/ApplicationTest.php @@ -0,0 +1,1268 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Helper\FormatterHelper; +use Symfony\Component\Console\Input\ArgvInput; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\NullOutput; +use Symfony\Component\Console\Output\Output; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Output\StreamOutput; +use Symfony\Component\Console\Tester\ApplicationTester; +use Symfony\Component\Console\Event\ConsoleCommandEvent; +use Symfony\Component\Console\Event\ConsoleExceptionEvent; +use Symfony\Component\Console\Event\ConsoleTerminateEvent; +use Symfony\Component\EventDispatcher\EventDispatcher; + +class ApplicationTest extends TestCase +{ + protected static $fixturesPath; + + public static function setUpBeforeClass() + { + self::$fixturesPath = realpath(__DIR__.'/Fixtures/'); + require_once self::$fixturesPath.'/FooCommand.php'; + require_once self::$fixturesPath.'/Foo1Command.php'; + require_once self::$fixturesPath.'/Foo2Command.php'; + require_once self::$fixturesPath.'/Foo3Command.php'; + require_once self::$fixturesPath.'/Foo4Command.php'; + require_once self::$fixturesPath.'/Foo5Command.php'; + require_once self::$fixturesPath.'/FoobarCommand.php'; + require_once self::$fixturesPath.'/BarBucCommand.php'; + require_once self::$fixturesPath.'/FooSubnamespaced1Command.php'; + require_once self::$fixturesPath.'/FooSubnamespaced2Command.php'; + } + + protected function normalizeLineBreaks($text) + { + return str_replace(PHP_EOL, "\n", $text); + } + + /** + * Replaces the dynamic placeholders of the command help text with a static version. + * The placeholder %command.full_name% includes the script path that is not predictable + * and can not be tested against. + */ + protected function ensureStaticCommandHelp(Application $application) + { + foreach ($application->all() as $command) { + $command->setHelp(str_replace('%command.full_name%', 'app/console %command.name%', $command->getHelp())); + } + } + + public function testConstructor() + { + $application = new Application('foo', 'bar'); + $this->assertEquals('foo', $application->getName(), '__construct() takes the application name as its first argument'); + $this->assertEquals('bar', $application->getVersion(), '__construct() takes the application version as its second argument'); + $this->assertEquals(array('help', 'list'), array_keys($application->all()), '__construct() registered the help and list commands by default'); + } + + public function testSetGetName() + { + $application = new Application(); + $application->setName('foo'); + $this->assertEquals('foo', $application->getName(), '->setName() sets the name of the application'); + } + + public function testSetGetVersion() + { + $application = new Application(); + $application->setVersion('bar'); + $this->assertEquals('bar', $application->getVersion(), '->setVersion() sets the version of the application'); + } + + public function testGetLongVersion() + { + $application = new Application('foo', 'bar'); + $this->assertEquals('foo bar', $application->getLongVersion(), '->getLongVersion() returns the long version of the application'); + } + + public function testHelp() + { + $application = new Application(); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_gethelp.txt', $this->normalizeLineBreaks($application->getHelp()), '->getHelp() returns a help message'); + } + + public function testAll() + { + $application = new Application(); + $commands = $application->all(); + $this->assertInstanceOf('Symfony\\Component\\Console\\Command\\HelpCommand', $commands['help'], '->all() returns the registered commands'); + + $application->add(new \FooCommand()); + $commands = $application->all('foo'); + $this->assertCount(1, $commands, '->all() takes a namespace as its first argument'); + } + + public function testRegister() + { + $application = new Application(); + $command = $application->register('foo'); + $this->assertEquals('foo', $command->getName(), '->register() registers a new command'); + } + + public function testAdd() + { + $application = new Application(); + $application->add($foo = new \FooCommand()); + $commands = $application->all(); + $this->assertEquals($foo, $commands['foo:bar'], '->add() registers a command'); + + $application = new Application(); + $application->addCommands(array($foo = new \FooCommand(), $foo1 = new \Foo1Command())); + $commands = $application->all(); + $this->assertEquals(array($foo, $foo1), array($commands['foo:bar'], $commands['foo:bar1']), '->addCommands() registers an array of commands'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Command class "Foo5Command" is not correctly initialized. You probably forgot to call the parent constructor. + */ + public function testAddCommandWithEmptyConstructor() + { + $application = new Application(); + $application->add(new \Foo5Command()); + } + + public function testHasGet() + { + $application = new Application(); + $this->assertTrue($application->has('list'), '->has() returns true if a named command is registered'); + $this->assertFalse($application->has('afoobar'), '->has() returns false if a named command is not registered'); + + $application->add($foo = new \FooCommand()); + $this->assertTrue($application->has('afoobar'), '->has() returns true if an alias is registered'); + $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns a command by name'); + $this->assertEquals($foo, $application->get('afoobar'), '->get() returns a command by alias'); + + $application = new Application(); + $application->add($foo = new \FooCommand()); + // simulate --help + $r = new \ReflectionObject($application); + $p = $r->getProperty('wantHelps'); + $p->setAccessible(true); + $p->setValue($application, true); + $command = $application->get('foo:bar'); + $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $command, '->get() returns the help command if --help is provided as the input'); + } + + public function testSilentHelp() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $tester = new ApplicationTester($application); + $tester->run(array('-h' => true, '-q' => true), array('decorated' => false)); + + $this->assertEmpty($tester->getDisplay(true)); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException + * @expectedExceptionMessage The command "foofoo" does not exist. + */ + public function testGetInvalidCommand() + { + $application = new Application(); + $application->get('foofoo'); + } + + public function testGetNamespaces() + { + $application = new Application(); + $application->add(new \FooCommand()); + $application->add(new \Foo1Command()); + $this->assertEquals(array('foo'), $application->getNamespaces(), '->getNamespaces() returns an array of unique used namespaces'); + } + + public function testFindNamespace() + { + $application = new Application(); + $application->add(new \FooCommand()); + $this->assertEquals('foo', $application->findNamespace('foo'), '->findNamespace() returns the given namespace if it exists'); + $this->assertEquals('foo', $application->findNamespace('f'), '->findNamespace() finds a namespace given an abbreviation'); + $application->add(new \Foo2Command()); + $this->assertEquals('foo', $application->findNamespace('foo'), '->findNamespace() returns the given namespace if it exists'); + } + + public function testFindNamespaceWithSubnamespaces() + { + $application = new Application(); + $application->add(new \FooSubnamespaced1Command()); + $application->add(new \FooSubnamespaced2Command()); + $this->assertEquals('foo', $application->findNamespace('foo'), '->findNamespace() returns commands even if the commands are only contained in subnamespaces'); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException + * @expectedExceptionMessage The namespace "f" is ambiguous (foo, foo1). + */ + public function testFindAmbiguousNamespace() + { + $application = new Application(); + $application->add(new \BarBucCommand()); + $application->add(new \FooCommand()); + $application->add(new \Foo2Command()); + $application->findNamespace('f'); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException + * @expectedExceptionMessage There are no commands defined in the "bar" namespace. + */ + public function testFindInvalidNamespace() + { + $application = new Application(); + $application->findNamespace('bar'); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException + * @expectedExceptionMessage Command "foo1" is not defined + */ + public function testFindUniqueNameButNamespaceName() + { + $application = new Application(); + $application->add(new \FooCommand()); + $application->add(new \Foo1Command()); + $application->add(new \Foo2Command()); + + $application->find($commandName = 'foo1'); + } + + public function testFind() + { + $application = new Application(); + $application->add(new \FooCommand()); + + $this->assertInstanceOf('FooCommand', $application->find('foo:bar'), '->find() returns a command if its name exists'); + $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $application->find('h'), '->find() returns a command if its name exists'); + $this->assertInstanceOf('FooCommand', $application->find('f:bar'), '->find() returns a command if the abbreviation for the namespace exists'); + $this->assertInstanceOf('FooCommand', $application->find('f:b'), '->find() returns a command if the abbreviation for the namespace and the command name exist'); + $this->assertInstanceOf('FooCommand', $application->find('a'), '->find() returns a command if the abbreviation exists for an alias'); + } + + /** + * @dataProvider provideAmbiguousAbbreviations + */ + public function testFindWithAmbiguousAbbreviations($abbreviation, $expectedExceptionMessage) + { + if (method_exists($this, 'expectException')) { + $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); + $this->expectExceptionMessage($expectedExceptionMessage); + } else { + $this->setExpectedException('Symfony\Component\Console\Exception\CommandNotFoundException', $expectedExceptionMessage); + } + + $application = new Application(); + $application->add(new \FooCommand()); + $application->add(new \Foo1Command()); + $application->add(new \Foo2Command()); + + $application->find($abbreviation); + } + + public function provideAmbiguousAbbreviations() + { + return array( + array('f', 'Command "f" is not defined.'), + array('a', 'Command "a" is ambiguous (afoobar, afoobar1 and 1 more).'), + array('foo:b', 'Command "foo:b" is ambiguous (foo:bar, foo:bar1 and 1 more).'), + ); + } + + public function testFindCommandEqualNamespace() + { + $application = new Application(); + $application->add(new \Foo3Command()); + $application->add(new \Foo4Command()); + + $this->assertInstanceOf('Foo3Command', $application->find('foo3:bar'), '->find() returns the good command even if a namespace has same name'); + $this->assertInstanceOf('Foo4Command', $application->find('foo3:bar:toh'), '->find() returns a command even if its namespace equals another command name'); + } + + public function testFindCommandWithAmbiguousNamespacesButUniqueName() + { + $application = new Application(); + $application->add(new \FooCommand()); + $application->add(new \FoobarCommand()); + + $this->assertInstanceOf('FoobarCommand', $application->find('f:f')); + } + + public function testFindCommandWithMissingNamespace() + { + $application = new Application(); + $application->add(new \Foo4Command()); + + $this->assertInstanceOf('Foo4Command', $application->find('f::t')); + } + + /** + * @dataProvider provideInvalidCommandNamesSingle + * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException + * @expectedExceptionMessage Did you mean this + */ + public function testFindAlternativeExceptionMessageSingle($name) + { + $application = new Application(); + $application->add(new \Foo3Command()); + $application->find($name); + } + + public function provideInvalidCommandNamesSingle() + { + return array( + array('foo3:baR'), + array('foO3:bar'), + ); + } + + public function testFindAlternativeExceptionMessageMultiple() + { + $application = new Application(); + $application->add(new \FooCommand()); + $application->add(new \Foo1Command()); + $application->add(new \Foo2Command()); + + // Command + plural + try { + $application->find('foo:baR'); + $this->fail('->find() throws a CommandNotFoundException if command does not exist, with alternatives'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); + $this->assertRegExp('/Did you mean one of these/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); + $this->assertRegExp('/foo1:bar/', $e->getMessage()); + $this->assertRegExp('/foo:bar/', $e->getMessage()); + } + + // Namespace + plural + try { + $application->find('foo2:bar'); + $this->fail('->find() throws a CommandNotFoundException if command does not exist, with alternatives'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); + $this->assertRegExp('/Did you mean one of these/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); + $this->assertRegExp('/foo1/', $e->getMessage()); + } + + $application->add(new \Foo3Command()); + $application->add(new \Foo4Command()); + + // Subnamespace + plural + try { + $a = $application->find('foo3:'); + $this->fail('->find() should throw an Symfony\Component\Console\Exception\CommandNotFoundException if a command is ambiguous because of a subnamespace, with alternatives'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e); + $this->assertRegExp('/foo3:bar/', $e->getMessage()); + $this->assertRegExp('/foo3:bar:toh/', $e->getMessage()); + } + } + + public function testFindAlternativeCommands() + { + $application = new Application(); + + $application->add(new \FooCommand()); + $application->add(new \Foo1Command()); + $application->add(new \Foo2Command()); + + try { + $application->find($commandName = 'Unknown command'); + $this->fail('->find() throws a CommandNotFoundException if command does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist'); + $this->assertSame(array(), $e->getAlternatives()); + $this->assertEquals(sprintf('Command "%s" is not defined.', $commandName), $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, without alternatives'); + } + + // Test if "bar1" command throw a "CommandNotFoundException" and does not contain + // "foo:bar" as alternative because "bar1" is too far from "foo:bar" + try { + $application->find($commandName = 'bar1'); + $this->fail('->find() throws a CommandNotFoundException if command does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist'); + $this->assertSame(array('afoobar1', 'foo:bar1'), $e->getAlternatives()); + $this->assertRegExp(sprintf('/Command "%s" is not defined./', $commandName), $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); + $this->assertRegExp('/afoobar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "afoobar1"'); + $this->assertRegExp('/foo:bar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "foo:bar1"'); + $this->assertNotRegExp('/foo:bar(?>!1)/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, without "foo:bar" alternative'); + } + } + + public function testFindAlternativeCommandsWithAnAlias() + { + $fooCommand = new \FooCommand(); + $fooCommand->setAliases(array('foo2')); + + $application = new Application(); + $application->add($fooCommand); + + $result = $application->find('foo'); + + $this->assertSame($fooCommand, $result); + } + + public function testFindAlternativeNamespace() + { + $application = new Application(); + + $application->add(new \FooCommand()); + $application->add(new \Foo1Command()); + $application->add(new \Foo2Command()); + $application->add(new \Foo3Command()); + + try { + $application->find('Unknown-namespace:Unknown-command'); + $this->fail('->find() throws a CommandNotFoundException if namespace does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if namespace does not exist'); + $this->assertSame(array(), $e->getAlternatives()); + $this->assertEquals('There are no commands defined in the "Unknown-namespace" namespace.', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, without alternatives'); + } + + try { + $application->find('foo2:command'); + $this->fail('->find() throws a CommandNotFoundException if namespace does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if namespace does not exist'); + $this->assertCount(3, $e->getAlternatives()); + $this->assertContains('foo', $e->getAlternatives()); + $this->assertContains('foo1', $e->getAlternatives()); + $this->assertContains('foo3', $e->getAlternatives()); + $this->assertRegExp('/There are no commands defined in the "foo2" namespace./', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative'); + $this->assertRegExp('/foo/', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative : "foo"'); + $this->assertRegExp('/foo1/', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative : "foo1"'); + $this->assertRegExp('/foo3/', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative : "foo3"'); + } + } + + public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces() + { + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('getNamespaces'))->getMock(); + $application->expects($this->once()) + ->method('getNamespaces') + ->will($this->returnValue(array('foo:sublong', 'bar:sub'))); + + $this->assertEquals('foo:sublong', $application->findNamespace('f:sub')); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException + * @expectedExceptionMessage Command "foo::bar" is not defined. + */ + public function testFindWithDoubleColonInNameThrowsException() + { + $application = new Application(); + $application->add(new \FooCommand()); + $application->add(new \Foo4Command()); + $application->find('foo::bar'); + } + + public function testSetCatchExceptions() + { + $application = new Application(); + $application->setAutoExit(false); + putenv('COLUMNS=120'); + $tester = new ApplicationTester($application); + + $application->setCatchExceptions(true); + $this->assertTrue($application->areExceptionsCaught()); + + $tester->run(array('command' => 'foo'), array('decorated' => false)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->setCatchExceptions() sets the catch exception flag'); + + $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getErrorOutput(true), '->setCatchExceptions() sets the catch exception flag'); + $this->assertSame('', $tester->getDisplay(true)); + + $application->setCatchExceptions(false); + try { + $tester->run(array('command' => 'foo'), array('decorated' => false)); + $this->fail('->setCatchExceptions() sets the catch exception flag'); + } catch (\Exception $e) { + $this->assertInstanceOf('\Exception', $e, '->setCatchExceptions() sets the catch exception flag'); + $this->assertEquals('Command "foo" is not defined.', $e->getMessage(), '->setCatchExceptions() sets the catch exception flag'); + } + } + + public function testAutoExitSetting() + { + $application = new Application(); + $this->assertTrue($application->isAutoExitEnabled()); + + $application->setAutoExit(false); + $this->assertFalse($application->isAutoExitEnabled()); + } + + public function testRenderException() + { + $application = new Application(); + $application->setAutoExit(false); + putenv('COLUMNS=120'); + $tester = new ApplicationTester($application); + + $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exception'); + + $tester->run(array('command' => 'foo'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE, 'capture_stderr_separately' => true)); + $this->assertContains('Exception trace', $tester->getErrorOutput(), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose'); + + $tester->run(array('command' => 'list', '--foo' => true), array('decorated' => false, 'capture_stderr_separately' => true)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $tester->getErrorOutput(true), '->renderException() renders the command synopsis when an exception occurs in the context of a command'); + + $application->add(new \Foo3Command()); + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'foo3:bar'), array('decorated' => false, 'capture_stderr_separately' => true)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); + + $tester->run(array('command' => 'foo3:bar'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); + $this->assertRegExp('/\[Exception\]\s*First exception/', $tester->getDisplay(), '->renderException() renders a pretty exception without code exception when code exception is default and verbosity is verbose'); + $this->assertRegExp('/\[Exception\]\s*Second exception/', $tester->getDisplay(), '->renderException() renders a pretty exception without code exception when code exception is 0 and verbosity is verbose'); + $this->assertRegExp('/\[Exception \(404\)\]\s*Third exception/', $tester->getDisplay(), '->renderException() renders a pretty exception with code exception when code exception is 404 and verbosity is verbose'); + + $tester->run(array('command' => 'foo3:bar'), array('decorated' => true)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions'); + + $tester->run(array('command' => 'foo3:bar'), array('decorated' => true, 'capture_stderr_separately' => true)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); + + $application = new Application(); + $application->setAutoExit(false); + putenv('COLUMNS=32'); + $tester = new ApplicationTester($application); + + $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception4.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); + putenv('COLUMNS=120'); + } + + public function testRenderExceptionWithDoubleWidthCharacters() + { + $application = new Application(); + $application->setAutoExit(false); + putenv('COLUMNS=120'); + $application->register('foo')->setCode(function () { + throw new \Exception('エラーメッセージ'); + }); + $tester = new ApplicationTester($application); + + $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); + + $tester->run(array('command' => 'foo'), array('decorated' => true, 'capture_stderr_separately' => true)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); + + $application = new Application(); + $application->setAutoExit(false); + putenv('COLUMNS=32'); + $application->register('foo')->setCode(function () { + throw new \Exception('コマンドã®å®Ÿè¡Œä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚'); + }); + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); + putenv('COLUMNS=120'); + } + + public function testRun() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + $application->add($command = new \Foo1Command()); + $_SERVER['argv'] = array('cli.php', 'foo:bar1'); + + ob_start(); + $application->run(); + ob_end_clean(); + + $this->assertInstanceOf('Symfony\Component\Console\Input\ArgvInput', $command->input, '->run() creates an ArgvInput by default if none is given'); + $this->assertInstanceOf('Symfony\Component\Console\Output\ConsoleOutput', $command->output, '->run() creates a ConsoleOutput by default if none is given'); + + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $this->ensureStaticCommandHelp($application); + $tester = new ApplicationTester($application); + + $tester->run(array(), array('decorated' => false)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_run1.txt', $tester->getDisplay(true), '->run() runs the list command if no argument is passed'); + + $tester->run(array('--help' => true), array('decorated' => false)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if --help is passed'); + + $tester->run(array('-h' => true), array('decorated' => false)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if -h is passed'); + + $tester->run(array('command' => 'list', '--help' => true), array('decorated' => false)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if --help is passed'); + + $tester->run(array('command' => 'list', '-h' => true), array('decorated' => false)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if -h is passed'); + + $tester->run(array('--ansi' => true)); + $this->assertTrue($tester->getOutput()->isDecorated(), '->run() forces color output if --ansi is passed'); + + $tester->run(array('--no-ansi' => true)); + $this->assertFalse($tester->getOutput()->isDecorated(), '->run() forces color output to be disabled if --no-ansi is passed'); + + $tester->run(array('--version' => true), array('decorated' => false)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if --version is passed'); + + $tester->run(array('-V' => true), array('decorated' => false)); + $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if -v is passed'); + + $tester->run(array('command' => 'list', '--quiet' => true)); + $this->assertSame('', $tester->getDisplay(), '->run() removes all output if --quiet is passed'); + $this->assertFalse($tester->getInput()->isInteractive(), '->run() sets off the interactive mode if --quiet is passed'); + + $tester->run(array('command' => 'list', '-q' => true)); + $this->assertSame('', $tester->getDisplay(), '->run() removes all output if -q is passed'); + $this->assertFalse($tester->getInput()->isInteractive(), '->run() sets off the interactive mode if -q is passed'); + + $tester->run(array('command' => 'list', '--verbose' => true)); + $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose is passed'); + + $tester->run(array('command' => 'list', '--verbose' => 1)); + $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose=1 is passed'); + + $tester->run(array('command' => 'list', '--verbose' => 2)); + $this->assertSame(Output::VERBOSITY_VERY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to very verbose if --verbose=2 is passed'); + + $tester->run(array('command' => 'list', '--verbose' => 3)); + $this->assertSame(Output::VERBOSITY_DEBUG, $tester->getOutput()->getVerbosity(), '->run() sets the output to debug if --verbose=3 is passed'); + + $tester->run(array('command' => 'list', '--verbose' => 4)); + $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if unknown --verbose level is passed'); + + $tester->run(array('command' => 'list', '-v' => true)); + $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); + + $tester->run(array('command' => 'list', '-vv' => true)); + $this->assertSame(Output::VERBOSITY_VERY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); + + $tester->run(array('command' => 'list', '-vvv' => true)); + $this->assertSame(Output::VERBOSITY_DEBUG, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); + + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + $application->add(new \FooCommand()); + $tester = new ApplicationTester($application); + + $tester->run(array('command' => 'foo:bar', '--no-interaction' => true), array('decorated' => false)); + $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if --no-interaction is passed'); + + $tester->run(array('command' => 'foo:bar', '-n' => true), array('decorated' => false)); + $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if -n is passed'); + } + + /** + * Issue #9285. + * + * If the "verbose" option is just before an argument in ArgvInput, + * an argument value should not be treated as verbosity value. + * This test will fail with "Not enough arguments." if broken + */ + public function testVerboseValueNotBreakArguments() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + $application->add(new \FooCommand()); + + $output = new StreamOutput(fopen('php://memory', 'w', false)); + + $input = new ArgvInput(array('cli.php', '-v', 'foo:bar')); + $application->run($input, $output); + + $input = new ArgvInput(array('cli.php', '--verbose', 'foo:bar')); + $application->run($input, $output); + } + + public function testRunReturnsIntegerExitCode() + { + $exception = new \Exception('', 4); + + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('doRun'))->getMock(); + $application->setAutoExit(false); + $application->expects($this->once()) + ->method('doRun') + ->will($this->throwException($exception)); + + $exitCode = $application->run(new ArrayInput(array()), new NullOutput()); + + $this->assertSame(4, $exitCode, '->run() returns integer exit code extracted from raised exception'); + } + + public function testRunReturnsExitCodeOneForExceptionCodeZero() + { + $exception = new \Exception('', 0); + + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('doRun'))->getMock(); + $application->setAutoExit(false); + $application->expects($this->once()) + ->method('doRun') + ->will($this->throwException($exception)); + + $exitCode = $application->run(new ArrayInput(array()), new NullOutput()); + + $this->assertSame(1, $exitCode, '->run() returns exit code 1 when exception code is 0'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage An option with shortcut "e" already exists. + */ + public function testAddingOptionWithDuplicateShortcut() + { + $dispatcher = new EventDispatcher(); + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + $application->setDispatcher($dispatcher); + + $application->getDefinition()->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'Environment')); + + $application + ->register('foo') + ->setAliases(array('f')) + ->setDefinition(array(new InputOption('survey', 'e', InputOption::VALUE_REQUIRED, 'My option with a shortcut.'))) + ->setCode(function (InputInterface $input, OutputInterface $output) {}) + ; + + $input = new ArrayInput(array('command' => 'foo')); + $output = new NullOutput(); + + $application->run($input, $output); + } + + /** + * @expectedException \LogicException + * @dataProvider getAddingAlreadySetDefinitionElementData + */ + public function testAddingAlreadySetDefinitionElementData($def) + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + $application + ->register('foo') + ->setDefinition(array($def)) + ->setCode(function (InputInterface $input, OutputInterface $output) {}) + ; + + $input = new ArrayInput(array('command' => 'foo')); + $output = new NullOutput(); + $application->run($input, $output); + } + + public function getAddingAlreadySetDefinitionElementData() + { + return array( + array(new InputArgument('command', InputArgument::REQUIRED)), + array(new InputOption('quiet', '', InputOption::VALUE_NONE)), + array(new InputOption('query', 'q', InputOption::VALUE_NONE)), + ); + } + + public function testGetDefaultHelperSetReturnsDefaultValues() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $helperSet = $application->getHelperSet(); + + $this->assertTrue($helperSet->has('formatter')); + } + + public function testAddingSingleHelperSetOverwritesDefaultValues() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $application->setHelperSet(new HelperSet(array(new FormatterHelper()))); + + $helperSet = $application->getHelperSet(); + + $this->assertTrue($helperSet->has('formatter')); + + // no other default helper set should be returned + $this->assertFalse($helperSet->has('dialog')); + $this->assertFalse($helperSet->has('progress')); + } + + public function testOverwritingDefaultHelperSetOverwritesDefaultValues() + { + $application = new CustomApplication(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $application->setHelperSet(new HelperSet(array(new FormatterHelper()))); + + $helperSet = $application->getHelperSet(); + + $this->assertTrue($helperSet->has('formatter')); + + // no other default helper set should be returned + $this->assertFalse($helperSet->has('dialog')); + $this->assertFalse($helperSet->has('progress')); + } + + public function testGetDefaultInputDefinitionReturnsDefaultValues() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $inputDefinition = $application->getDefinition(); + + $this->assertTrue($inputDefinition->hasArgument('command')); + + $this->assertTrue($inputDefinition->hasOption('help')); + $this->assertTrue($inputDefinition->hasOption('quiet')); + $this->assertTrue($inputDefinition->hasOption('verbose')); + $this->assertTrue($inputDefinition->hasOption('version')); + $this->assertTrue($inputDefinition->hasOption('ansi')); + $this->assertTrue($inputDefinition->hasOption('no-ansi')); + $this->assertTrue($inputDefinition->hasOption('no-interaction')); + } + + public function testOverwritingDefaultInputDefinitionOverwritesDefaultValues() + { + $application = new CustomApplication(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $inputDefinition = $application->getDefinition(); + + // check whether the default arguments and options are not returned any more + $this->assertFalse($inputDefinition->hasArgument('command')); + + $this->assertFalse($inputDefinition->hasOption('help')); + $this->assertFalse($inputDefinition->hasOption('quiet')); + $this->assertFalse($inputDefinition->hasOption('verbose')); + $this->assertFalse($inputDefinition->hasOption('version')); + $this->assertFalse($inputDefinition->hasOption('ansi')); + $this->assertFalse($inputDefinition->hasOption('no-ansi')); + $this->assertFalse($inputDefinition->hasOption('no-interaction')); + + $this->assertTrue($inputDefinition->hasOption('custom')); + } + + public function testSettingCustomInputDefinitionOverwritesDefaultValues() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $application->setDefinition(new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')))); + + $inputDefinition = $application->getDefinition(); + + // check whether the default arguments and options are not returned any more + $this->assertFalse($inputDefinition->hasArgument('command')); + + $this->assertFalse($inputDefinition->hasOption('help')); + $this->assertFalse($inputDefinition->hasOption('quiet')); + $this->assertFalse($inputDefinition->hasOption('verbose')); + $this->assertFalse($inputDefinition->hasOption('version')); + $this->assertFalse($inputDefinition->hasOption('ansi')); + $this->assertFalse($inputDefinition->hasOption('no-ansi')); + $this->assertFalse($inputDefinition->hasOption('no-interaction')); + + $this->assertTrue($inputDefinition->hasOption('custom')); + } + + public function testRunWithDispatcher() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setDispatcher($this->getDispatcher()); + + $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { + $output->write('foo.'); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'foo')); + $this->assertEquals('before.foo.after.'.PHP_EOL, $tester->getDisplay()); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage caught + */ + public function testRunWithExceptionAndDispatcher() + { + $application = new Application(); + $application->setDispatcher($this->getDispatcher()); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { + throw new \RuntimeException('foo'); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'foo')); + } + + public function testRunDispatchesAllEventsWithException() + { + $application = new Application(); + $application->setDispatcher($this->getDispatcher()); + $application->setAutoExit(false); + + $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { + $output->write('foo.'); + + throw new \RuntimeException('foo'); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'foo')); + $this->assertContains('before.foo.caught.after.', $tester->getDisplay()); + } + + public function testRunWithError() + { + if (method_exists($this, 'expectException')) { + $this->expectException('Exception'); + $this->expectExceptionMessage('dymerr'); + } else { + $this->setExpectedException('Exception', 'dymerr'); + } + + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $application->register('dym')->setCode(function (InputInterface $input, OutputInterface $output) { + $output->write('dym.'); + + throw new \Error('dymerr'); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'dym')); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage caught + */ + public function testRunWithErrorAndDispatcher() + { + $application = new Application(); + $application->setDispatcher($this->getDispatcher()); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $application->register('dym')->setCode(function (InputInterface $input, OutputInterface $output) { + $output->write('dym.'); + + throw new \Error('dymerr'); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'dym')); + $this->assertContains('before.dym.caught.after.', $tester->getDisplay(), 'The PHP Error did not dispached events'); + } + + public function testRunDispatchesAllEventsWithError() + { + $application = new Application(); + $application->setDispatcher($this->getDispatcher()); + $application->setAutoExit(false); + + $application->register('dym')->setCode(function (InputInterface $input, OutputInterface $output) { + $output->write('dym.'); + + throw new \Error('dymerr'); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'dym')); + $this->assertContains('before.dym.caught.after.', $tester->getDisplay(), 'The PHP Error did not dispached events'); + } + + public function testRunWithErrorFailingStatusCode() + { + $application = new Application(); + $application->setDispatcher($this->getDispatcher()); + $application->setAutoExit(false); + + $application->register('dus')->setCode(function (InputInterface $input, OutputInterface $output) { + $output->write('dus.'); + + throw new \Error('duserr'); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'dus')); + $this->assertSame(1, $tester->getStatusCode(), 'Status code should be 1'); + } + + public function testRunWithDispatcherSkippingCommand() + { + $application = new Application(); + $application->setDispatcher($this->getDispatcher(true)); + $application->setAutoExit(false); + + $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { + $output->write('foo.'); + }); + + $tester = new ApplicationTester($application); + $exitCode = $tester->run(array('command' => 'foo')); + $this->assertContains('before.after.', $tester->getDisplay()); + $this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $exitCode); + } + + public function testRunWithDispatcherAccessingInputOptions() + { + $noInteractionValue = null; + $quietValue = null; + + $dispatcher = $this->getDispatcher(); + $dispatcher->addListener('console.command', function (ConsoleCommandEvent $event) use (&$noInteractionValue, &$quietValue) { + $input = $event->getInput(); + + $noInteractionValue = $input->getOption('no-interaction'); + $quietValue = $input->getOption('quiet'); + }); + + $application = new Application(); + $application->setDispatcher($dispatcher); + $application->setAutoExit(false); + + $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { + $output->write('foo.'); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'foo', '--no-interaction' => true)); + + $this->assertTrue($noInteractionValue); + $this->assertFalse($quietValue); + } + + public function testRunWithDispatcherAddingInputOptions() + { + $extraValue = null; + + $dispatcher = $this->getDispatcher(); + $dispatcher->addListener('console.command', function (ConsoleCommandEvent $event) use (&$extraValue) { + $definition = $event->getCommand()->getDefinition(); + $input = $event->getInput(); + + $definition->addOption(new InputOption('extra', null, InputOption::VALUE_REQUIRED)); + $input->bind($definition); + + $extraValue = $input->getOption('extra'); + }); + + $application = new Application(); + $application->setDispatcher($dispatcher); + $application->setAutoExit(false); + + $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { + $output->write('foo.'); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'foo', '--extra' => 'some test value')); + + $this->assertEquals('some test value', $extraValue); + } + + public function testUpdateInputFromConsoleCommandEvent() + { + $dispatcher = $this->getDispatcher(); + $dispatcher->addListener('console.command', function (ConsoleCommandEvent $event) { + $event->getInput()->setOption('extra', 'overriden'); + }); + + $application = new Application(); + $application->setDispatcher($dispatcher); + $application->setAutoExit(false); + + $application + ->register('foo') + ->addOption('extra', null, InputOption::VALUE_REQUIRED) + ->setCode(function (InputInterface $input, OutputInterface $output) { + $output->write('foo.'); + }) + ; + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'foo', '--extra' => 'original')); + + $this->assertEquals('overriden', $tester->getInput()->getOption('extra')); + } + + /** + * @group legacy + */ + public function testTerminalDimensions() + { + $application = new Application(); + $originalDimensions = $application->getTerminalDimensions(); + $this->assertCount(2, $originalDimensions); + + $width = 80; + if ($originalDimensions[0] == $width) { + $width = 100; + } + + $application->setTerminalDimensions($width, 80); + $this->assertSame(array($width, 80), $application->getTerminalDimensions()); + } + + protected function getDispatcher($skipCommand = false) + { + $dispatcher = new EventDispatcher(); + $dispatcher->addListener('console.command', function (ConsoleCommandEvent $event) use ($skipCommand) { + $event->getOutput()->write('before.'); + + if ($skipCommand) { + $event->disableCommand(); + } + }); + $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use ($skipCommand) { + $event->getOutput()->writeln('after.'); + + if (!$skipCommand) { + $event->setExitCode(113); + } + }); + $dispatcher->addListener('console.exception', function (ConsoleExceptionEvent $event) { + $event->getOutput()->write('caught.'); + + $event->setException(new \LogicException('caught.', $event->getExitCode(), $event->getException())); + }); + + return $dispatcher; + } + + public function testSetRunCustomDefaultCommand() + { + $command = new \FooCommand(); + + $application = new Application(); + $application->setAutoExit(false); + $application->add($command); + $application->setDefaultCommand($command->getName()); + + $tester = new ApplicationTester($application); + $tester->run(array()); + $this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); + + $application = new CustomDefaultCommandApplication(); + $application->setAutoExit(false); + + $tester = new ApplicationTester($application); + $tester->run(array()); + + $this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); + } + + public function testSetRunCustomSingleCommand() + { + $command = new \FooCommand(); + + $application = new Application(); + $application->setAutoExit(false); + $application->add($command); + $application->setDefaultCommand($command->getName(), true); + + $tester = new ApplicationTester($application); + + $tester->run(array()); + $this->assertContains('called', $tester->getDisplay()); + + $tester->run(array('--help' => true)); + $this->assertContains('The foo:bar command', $tester->getDisplay()); + } + + /** + * @requires function posix_isatty + */ + public function testCanCheckIfTerminalIsInteractive() + { + $application = new CustomDefaultCommandApplication(); + $application->setAutoExit(false); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'help')); + + $this->assertFalse($tester->getInput()->hasParameterOption(array('--no-interaction', '-n'))); + + $inputStream = $tester->getInput()->getStream(); + $this->assertEquals($tester->getInput()->isInteractive(), @posix_isatty($inputStream)); + } +} + +class CustomApplication extends Application +{ + /** + * Overwrites the default input definition. + * + * @return InputDefinition An InputDefinition instance + */ + protected function getDefaultInputDefinition() + { + return new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.'))); + } + + /** + * Gets the default helper set with the helpers that should always be available. + * + * @return HelperSet A HelperSet instance + */ + protected function getDefaultHelperSet() + { + return new HelperSet(array(new FormatterHelper())); + } +} + +class CustomDefaultCommandApplication extends Application +{ + /** + * Overwrites the constructor in order to set a different default command. + */ + public function __construct() + { + parent::__construct(); + + $command = new \FooCommand(); + $this->add($command); + $this->setDefaultCommand($command->getName()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/CommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a8048aeaf813ba24a131a2eb0db776f3d7d082b6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/CommandTest.php @@ -0,0 +1,434 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Command; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Helper\FormatterHelper; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\StringInput; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Output\NullOutput; +use Symfony\Component\Console\Tester\CommandTester; + +class CommandTest extends TestCase +{ + protected static $fixturesPath; + + public static function setUpBeforeClass() + { + self::$fixturesPath = __DIR__.'/../Fixtures/'; + require_once self::$fixturesPath.'/TestCommand.php'; + } + + public function testConstructor() + { + $command = new Command('foo:bar'); + $this->assertEquals('foo:bar', $command->getName(), '__construct() takes the command name as its first argument'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage The command defined in "Symfony\Component\Console\Command\Command" cannot have an empty name. + */ + public function testCommandNameCannotBeEmpty() + { + new Command(); + } + + public function testSetApplication() + { + $application = new Application(); + $command = new \TestCommand(); + $command->setApplication($application); + $this->assertEquals($application, $command->getApplication(), '->setApplication() sets the current application'); + $this->assertEquals($application->getHelperSet(), $command->getHelperSet()); + } + + public function testSetApplicationNull() + { + $command = new \TestCommand(); + $command->setApplication(null); + $this->assertNull($command->getHelperSet()); + } + + public function testSetGetDefinition() + { + $command = new \TestCommand(); + $ret = $command->setDefinition($definition = new InputDefinition()); + $this->assertEquals($command, $ret, '->setDefinition() implements a fluent interface'); + $this->assertEquals($definition, $command->getDefinition(), '->setDefinition() sets the current InputDefinition instance'); + $command->setDefinition(array(new InputArgument('foo'), new InputOption('bar'))); + $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->setDefinition() also takes an array of InputArguments and InputOptions as an argument'); + $this->assertTrue($command->getDefinition()->hasOption('bar'), '->setDefinition() also takes an array of InputArguments and InputOptions as an argument'); + $command->setDefinition(new InputDefinition()); + } + + public function testAddArgument() + { + $command = new \TestCommand(); + $ret = $command->addArgument('foo'); + $this->assertEquals($command, $ret, '->addArgument() implements a fluent interface'); + $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->addArgument() adds an argument to the command'); + } + + public function testAddOption() + { + $command = new \TestCommand(); + $ret = $command->addOption('foo'); + $this->assertEquals($command, $ret, '->addOption() implements a fluent interface'); + $this->assertTrue($command->getDefinition()->hasOption('foo'), '->addOption() adds an option to the command'); + } + + public function testSetHidden() + { + $command = new \TestCommand(); + $command->setHidden(true); + $this->assertTrue($command->isHidden()); + } + + public function testGetNamespaceGetNameSetName() + { + $command = new \TestCommand(); + $this->assertEquals('namespace:name', $command->getName(), '->getName() returns the command name'); + $command->setName('foo'); + $this->assertEquals('foo', $command->getName(), '->setName() sets the command name'); + + $ret = $command->setName('foobar:bar'); + $this->assertEquals($command, $ret, '->setName() implements a fluent interface'); + $this->assertEquals('foobar:bar', $command->getName(), '->setName() sets the command name'); + } + + /** + * @dataProvider provideInvalidCommandNames + */ + public function testInvalidCommandNames($name) + { + if (method_exists($this, 'expectException')) { + $this->expectException('InvalidArgumentException'); + $this->expectExceptionMessage(sprintf('Command name "%s" is invalid.', $name)); + } else { + $this->setExpectedException('InvalidArgumentException', sprintf('Command name "%s" is invalid.', $name)); + } + + $command = new \TestCommand(); + $command->setName($name); + } + + public function provideInvalidCommandNames() + { + return array( + array(''), + array('foo:'), + ); + } + + public function testGetSetDescription() + { + $command = new \TestCommand(); + $this->assertEquals('description', $command->getDescription(), '->getDescription() returns the description'); + $ret = $command->setDescription('description1'); + $this->assertEquals($command, $ret, '->setDescription() implements a fluent interface'); + $this->assertEquals('description1', $command->getDescription(), '->setDescription() sets the description'); + } + + public function testGetSetHelp() + { + $command = new \TestCommand(); + $this->assertEquals('help', $command->getHelp(), '->getHelp() returns the help'); + $ret = $command->setHelp('help1'); + $this->assertEquals($command, $ret, '->setHelp() implements a fluent interface'); + $this->assertEquals('help1', $command->getHelp(), '->setHelp() sets the help'); + $command->setHelp(''); + $this->assertEquals('', $command->getHelp(), '->getHelp() does not fall back to the description'); + } + + public function testGetProcessedHelp() + { + $command = new \TestCommand(); + $command->setHelp('The %command.name% command does... Example: php %command.full_name%.'); + $this->assertContains('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly'); + $this->assertNotContains('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name%'); + + $command = new \TestCommand(); + $command->setHelp(''); + $this->assertContains('description', $command->getProcessedHelp(), '->getProcessedHelp() falls back to the description'); + } + + public function testGetSetAliases() + { + $command = new \TestCommand(); + $this->assertEquals(array('name'), $command->getAliases(), '->getAliases() returns the aliases'); + $ret = $command->setAliases(array('name1')); + $this->assertEquals($command, $ret, '->setAliases() implements a fluent interface'); + $this->assertEquals(array('name1'), $command->getAliases(), '->setAliases() sets the aliases'); + } + + public function testSetAliasesNull() + { + $command = new \TestCommand(); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException'); + $command->setAliases(null); + } + + public function testGetSynopsis() + { + $command = new \TestCommand(); + $command->addOption('foo'); + $command->addArgument('bar'); + $this->assertEquals('namespace:name [--foo] [--] []', $command->getSynopsis(), '->getSynopsis() returns the synopsis'); + } + + public function testAddGetUsages() + { + $command = new \TestCommand(); + $command->addUsage('foo1'); + $command->addUsage('foo2'); + $this->assertContains('namespace:name foo1', $command->getUsages()); + $this->assertContains('namespace:name foo2', $command->getUsages()); + } + + public function testGetHelper() + { + $application = new Application(); + $command = new \TestCommand(); + $command->setApplication($application); + $formatterHelper = new FormatterHelper(); + $this->assertEquals($formatterHelper->getName(), $command->getHelper('formatter')->getName(), '->getHelper() returns the correct helper'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Cannot retrieve helper "formatter" because there is no HelperSet defined. + */ + public function testGetHelperWithoutHelperSet() + { + $command = new \TestCommand(); + $command->getHelper('formatter'); + } + + public function testMergeApplicationDefinition() + { + $application1 = new Application(); + $application1->getDefinition()->addArguments(array(new InputArgument('foo'))); + $application1->getDefinition()->addOptions(array(new InputOption('bar'))); + $command = new \TestCommand(); + $command->setApplication($application1); + $command->setDefinition($definition = new InputDefinition(array(new InputArgument('bar'), new InputOption('foo')))); + + $r = new \ReflectionObject($command); + $m = $r->getMethod('mergeApplicationDefinition'); + $m->setAccessible(true); + $m->invoke($command); + $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->mergeApplicationDefinition() merges the application arguments and the command arguments'); + $this->assertTrue($command->getDefinition()->hasArgument('bar'), '->mergeApplicationDefinition() merges the application arguments and the command arguments'); + $this->assertTrue($command->getDefinition()->hasOption('foo'), '->mergeApplicationDefinition() merges the application options and the command options'); + $this->assertTrue($command->getDefinition()->hasOption('bar'), '->mergeApplicationDefinition() merges the application options and the command options'); + + $m->invoke($command); + $this->assertEquals(3, $command->getDefinition()->getArgumentCount(), '->mergeApplicationDefinition() does not try to merge twice the application arguments and options'); + } + + public function testMergeApplicationDefinitionWithoutArgsThenWithArgsAddsArgs() + { + $application1 = new Application(); + $application1->getDefinition()->addArguments(array(new InputArgument('foo'))); + $application1->getDefinition()->addOptions(array(new InputOption('bar'))); + $command = new \TestCommand(); + $command->setApplication($application1); + $command->setDefinition($definition = new InputDefinition(array())); + + $r = new \ReflectionObject($command); + $m = $r->getMethod('mergeApplicationDefinition'); + $m->setAccessible(true); + $m->invoke($command, false); + $this->assertTrue($command->getDefinition()->hasOption('bar'), '->mergeApplicationDefinition(false) merges the application and the command options'); + $this->assertFalse($command->getDefinition()->hasArgument('foo'), '->mergeApplicationDefinition(false) does not merge the application arguments'); + + $m->invoke($command, true); + $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->mergeApplicationDefinition(true) merges the application arguments and the command arguments'); + + $m->invoke($command); + $this->assertEquals(2, $command->getDefinition()->getArgumentCount(), '->mergeApplicationDefinition() does not try to merge twice the application arguments'); + } + + public function testRunInteractive() + { + $tester = new CommandTester(new \TestCommand()); + + $tester->execute(array(), array('interactive' => true)); + + $this->assertEquals('interact called'.PHP_EOL.'execute called'.PHP_EOL, $tester->getDisplay(), '->run() calls the interact() method if the input is interactive'); + } + + public function testRunNonInteractive() + { + $tester = new CommandTester(new \TestCommand()); + + $tester->execute(array(), array('interactive' => false)); + + $this->assertEquals('execute called'.PHP_EOL, $tester->getDisplay(), '->run() does not call the interact() method if the input is not interactive'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage You must override the execute() method in the concrete command class. + */ + public function testExecuteMethodNeedsToBeOverridden() + { + $command = new Command('foo'); + $command->run(new StringInput(''), new NullOutput()); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\InvalidOptionException + * @expectedExceptionMessage The "--bar" option does not exist. + */ + public function testRunWithInvalidOption() + { + $command = new \TestCommand(); + $tester = new CommandTester($command); + $tester->execute(array('--bar' => true)); + } + + public function testRunReturnsIntegerExitCode() + { + $command = new \TestCommand(); + $exitCode = $command->run(new StringInput(''), new NullOutput()); + $this->assertSame(0, $exitCode, '->run() returns integer exit code (treats null as 0)'); + + $command = $this->getMockBuilder('TestCommand')->setMethods(array('execute'))->getMock(); + $command->expects($this->once()) + ->method('execute') + ->will($this->returnValue('2.3')); + $exitCode = $command->run(new StringInput(''), new NullOutput()); + $this->assertSame(2, $exitCode, '->run() returns integer exit code (casts numeric to int)'); + } + + public function testRunWithApplication() + { + $command = new \TestCommand(); + $command->setApplication(new Application()); + $exitCode = $command->run(new StringInput(''), new NullOutput()); + + $this->assertSame(0, $exitCode, '->run() returns an integer exit code'); + } + + public function testRunReturnsAlwaysInteger() + { + $command = new \TestCommand(); + + $this->assertSame(0, $command->run(new StringInput(''), new NullOutput())); + } + + public function testRunWithProcessTitle() + { + $command = new \TestCommand(); + $command->setApplication(new Application()); + $command->setProcessTitle('foo'); + $this->assertSame(0, $command->run(new StringInput(''), new NullOutput())); + if (function_exists('cli_set_process_title')) { + if (null === @cli_get_process_title() && 'Darwin' === PHP_OS) { + $this->markTestSkipped('Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.'); + } + $this->assertEquals('foo', cli_get_process_title()); + } + } + + public function testSetCode() + { + $command = new \TestCommand(); + $ret = $command->setCode(function (InputInterface $input, OutputInterface $output) { + $output->writeln('from the code...'); + }); + $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); + $tester = new CommandTester($command); + $tester->execute(array()); + $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); + } + + public function getSetCodeBindToClosureTests() + { + return array( + array(true, 'not bound to the command'), + array(false, 'bound to the command'), + ); + } + + /** + * @dataProvider getSetCodeBindToClosureTests + */ + public function testSetCodeBindToClosure($previouslyBound, $expected) + { + $code = createClosure(); + if ($previouslyBound) { + $code = $code->bindTo($this); + } + + $command = new \TestCommand(); + $command->setCode($code); + $tester = new CommandTester($command); + $tester->execute(array()); + $this->assertEquals('interact called'.PHP_EOL.$expected.PHP_EOL, $tester->getDisplay()); + } + + public function testSetCodeWithStaticClosure() + { + $command = new \TestCommand(); + $command->setCode(self::createClosure()); + $tester = new CommandTester($command); + $tester->execute(array()); + + if (PHP_VERSION_ID < 70000) { + // Cannot bind static closures in PHP 5 + $this->assertEquals('interact called'.PHP_EOL.'not bound'.PHP_EOL, $tester->getDisplay()); + } else { + // Can bind static closures in PHP 7 + $this->assertEquals('interact called'.PHP_EOL.'bound'.PHP_EOL, $tester->getDisplay()); + } + } + + private static function createClosure() + { + return function (InputInterface $input, OutputInterface $output) { + $output->writeln(isset($this) ? 'bound' : 'not bound'); + }; + } + + public function testSetCodeWithNonClosureCallable() + { + $command = new \TestCommand(); + $ret = $command->setCode(array($this, 'callableMethodCommand')); + $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); + $tester = new CommandTester($command); + $tester->execute(array()); + $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); + } + + public function callableMethodCommand(InputInterface $input, OutputInterface $output) + { + $output->writeln('from the code...'); + } +} + +// In order to get an unbound closure, we should create it outside a class +// scope. +function createClosure() +{ + return function (InputInterface $input, OutputInterface $output) { + $output->writeln($this instanceof Command ? 'bound to the command' : 'not bound to the command'); + }; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4d618ac16078efa8e61649123a7981071dc3092d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Command; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Component\Console\Command\HelpCommand; +use Symfony\Component\Console\Command\ListCommand; +use Symfony\Component\Console\Application; + +class HelpCommandTest extends TestCase +{ + public function testExecuteForCommandAlias() + { + $command = new HelpCommand(); + $command->setApplication(new Application()); + $commandTester = new CommandTester($command); + $commandTester->execute(array('command_name' => 'li'), array('decorated' => false)); + $this->assertContains('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); + $this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); + $this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); + } + + public function testExecuteForCommand() + { + $command = new HelpCommand(); + $commandTester = new CommandTester($command); + $command->setCommand(new ListCommand()); + $commandTester->execute(array(), array('decorated' => false)); + $this->assertContains('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + $this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + $this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + } + + public function testExecuteForCommandWithXmlOption() + { + $command = new HelpCommand(); + $commandTester = new CommandTester($command); + $command->setCommand(new ListCommand()); + $commandTester->execute(array('--format' => 'xml')); + $this->assertContains('getDisplay(), '->execute() returns an XML help text if --xml is passed'); + } + + public function testExecuteForApplicationCommand() + { + $application = new Application(); + $commandTester = new CommandTester($application->get('help')); + $commandTester->execute(array('command_name' => 'list')); + $this->assertContains('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + $this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + $this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + } + + public function testExecuteForApplicationCommandWithXmlOption() + { + $application = new Application(); + $commandTester = new CommandTester($application->get('help')); + $commandTester->execute(array('command_name' => 'list', '--format' => 'xml')); + $this->assertContains('list [--raw] [--format FORMAT] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + $this->assertContains('getDisplay(), '->execute() returns an XML help text if --format=xml is passed'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fb6ee3bbacad12ed2d7bcebaea6bc57402e39ded --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Command; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Component\Console\Application; + +class ListCommandTest extends TestCase +{ + public function testExecuteListsCommands() + { + $application = new Application(); + $commandTester = new CommandTester($command = $application->get('list')); + $commandTester->execute(array('command' => $command->getName()), array('decorated' => false)); + + $this->assertRegExp('/help\s{2,}Displays help for a command/', $commandTester->getDisplay(), '->execute() returns a list of available commands'); + } + + public function testExecuteListsCommandsWithXmlOption() + { + $application = new Application(); + $commandTester = new CommandTester($command = $application->get('list')); + $commandTester->execute(array('command' => $command->getName(), '--format' => 'xml')); + $this->assertRegExp('//', $commandTester->getDisplay(), '->execute() returns a list of available commands in XML if --xml is passed'); + } + + public function testExecuteListsCommandsWithRawOption() + { + $application = new Application(); + $commandTester = new CommandTester($command = $application->get('list')); + $commandTester->execute(array('command' => $command->getName(), '--raw' => true)); + $output = <<<'EOF' +help Displays help for a command +list Lists commands + +EOF; + + $this->assertEquals($output, $commandTester->getDisplay(true)); + } + + public function testExecuteListsCommandsWithNamespaceArgument() + { + require_once realpath(__DIR__.'/../Fixtures/FooCommand.php'); + $application = new Application(); + $application->add(new \FooCommand()); + $commandTester = new CommandTester($command = $application->get('list')); + $commandTester->execute(array('command' => $command->getName(), 'namespace' => 'foo', '--raw' => true)); + $output = <<<'EOF' +foo:bar The foo:bar command + +EOF; + + $this->assertEquals($output, $commandTester->getDisplay(true)); + } + + public function testExecuteListsCommandsOrder() + { + require_once realpath(__DIR__.'/../Fixtures/Foo6Command.php'); + $application = new Application(); + $application->add(new \Foo6Command()); + $commandTester = new CommandTester($command = $application->get('list')); + $commandTester->execute(array('command' => $command->getName()), array('decorated' => false)); + $output = <<<'EOF' +Console Tool + +Usage: + command [options] [arguments] + +Options: + -h, --help Display this help message + -q, --quiet Do not output any message + -V, --version Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + -n, --no-interaction Do not ask any interactive question + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + +Available commands: + help Displays help for a command + list Lists commands + 0foo + 0foo:bar 0foo:bar command +EOF; + + $this->assertEquals($output, trim($commandTester->getDisplay(true))); + } + + public function testExecuteListsCommandsOrderRaw() + { + require_once realpath(__DIR__.'/../Fixtures/Foo6Command.php'); + $application = new Application(); + $application->add(new \Foo6Command()); + $commandTester = new CommandTester($command = $application->get('list')); + $commandTester->execute(array('command' => $command->getName(), '--raw' => true)); + $output = <<<'EOF' +help Displays help for a command +list Lists commands +0foo:bar 0foo:bar command +EOF; + + $this->assertEquals($output, trim($commandTester->getDisplay(true))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/LockableTraitTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/LockableTraitTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d45da73bf329c32932338e4676e126d3b716e412 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Command/LockableTraitTest.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Command; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Component\Filesystem\LockHandler; + +class LockableTraitTest extends TestCase +{ + protected static $fixturesPath; + + public static function setUpBeforeClass() + { + self::$fixturesPath = __DIR__.'/../Fixtures/'; + require_once self::$fixturesPath.'/FooLockCommand.php'; + require_once self::$fixturesPath.'/FooLock2Command.php'; + } + + public function testLockIsReleased() + { + $command = new \FooLockCommand(); + + $tester = new CommandTester($command); + $this->assertSame(2, $tester->execute(array())); + $this->assertSame(2, $tester->execute(array())); + } + + public function testLockReturnsFalseIfAlreadyLockedByAnotherCommand() + { + $command = new \FooLockCommand(); + + $lock = new LockHandler($command->getName()); + $lock->lock(); + + $tester = new CommandTester($command); + $this->assertSame(1, $tester->execute(array())); + + $lock->release(); + $this->assertSame(2, $tester->execute(array())); + } + + public function testMultipleLockCallsThrowLogicException() + { + $command = new \FooLock2Command(); + + $tester = new CommandTester($command); + $this->assertSame(1, $tester->execute(array())); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fcbb719b6cd9eee3374b463d0f1d2578c827dd9d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTest.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Descriptor; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\BufferedOutput; + +abstract class AbstractDescriptorTest extends TestCase +{ + /** @dataProvider getDescribeInputArgumentTestData */ + public function testDescribeInputArgument(InputArgument $argument, $expectedDescription) + { + $this->assertDescription($expectedDescription, $argument); + } + + /** @dataProvider getDescribeInputOptionTestData */ + public function testDescribeInputOption(InputOption $option, $expectedDescription) + { + $this->assertDescription($expectedDescription, $option); + } + + /** @dataProvider getDescribeInputDefinitionTestData */ + public function testDescribeInputDefinition(InputDefinition $definition, $expectedDescription) + { + $this->assertDescription($expectedDescription, $definition); + } + + /** @dataProvider getDescribeCommandTestData */ + public function testDescribeCommand(Command $command, $expectedDescription) + { + $this->assertDescription($expectedDescription, $command); + } + + /** @dataProvider getDescribeApplicationTestData */ + public function testDescribeApplication(Application $application, $expectedDescription) + { + // Replaces the dynamic placeholders of the command help text with a static version. + // The placeholder %command.full_name% includes the script path that is not predictable + // and can not be tested against. + foreach ($application->all() as $command) { + $command->setHelp(str_replace('%command.full_name%', 'app/console %command.name%', $command->getHelp())); + } + + $this->assertDescription($expectedDescription, $application); + } + + public function getDescribeInputArgumentTestData() + { + return $this->getDescriptionTestData(ObjectsProvider::getInputArguments()); + } + + public function getDescribeInputOptionTestData() + { + return $this->getDescriptionTestData(ObjectsProvider::getInputOptions()); + } + + public function getDescribeInputDefinitionTestData() + { + return $this->getDescriptionTestData(ObjectsProvider::getInputDefinitions()); + } + + public function getDescribeCommandTestData() + { + return $this->getDescriptionTestData(ObjectsProvider::getCommands()); + } + + public function getDescribeApplicationTestData() + { + return $this->getDescriptionTestData(ObjectsProvider::getApplications()); + } + + abstract protected function getDescriptor(); + + abstract protected function getFormat(); + + protected function getDescriptionTestData(array $objects) + { + $data = array(); + foreach ($objects as $name => $object) { + $description = file_get_contents(sprintf('%s/../Fixtures/%s.%s', __DIR__, $name, $this->getFormat())); + $data[] = array($object, $description); + } + + return $data; + } + + protected function assertDescription($expectedDescription, $describedObject) + { + $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); + $this->getDescriptor()->describe($output, $describedObject, array('raw_output' => true)); + $this->assertEquals(trim($expectedDescription), trim(str_replace(PHP_EOL, "\n", $output->fetch()))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/JsonDescriptorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/JsonDescriptorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f9a15612b3f995177cb997f3a3a3d8e85d792b3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/JsonDescriptorTest.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Descriptor; + +use Symfony\Component\Console\Descriptor\JsonDescriptor; +use Symfony\Component\Console\Output\BufferedOutput; + +class JsonDescriptorTest extends AbstractDescriptorTest +{ + protected function getDescriptor() + { + return new JsonDescriptor(); + } + + protected function getFormat() + { + return 'json'; + } + + protected function assertDescription($expectedDescription, $describedObject) + { + $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); + $this->getDescriptor()->describe($output, $describedObject, array('raw_output' => true)); + $this->assertEquals(json_decode(trim($expectedDescription), true), json_decode(trim(str_replace(PHP_EOL, "\n", $output->fetch())), true)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/MarkdownDescriptorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/MarkdownDescriptorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..eb80f58b1cc58fdcd3cc2481c9efbba847e3c918 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/MarkdownDescriptorTest.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\Component\Console\Tests\Descriptor; + +use Symfony\Component\Console\Descriptor\MarkdownDescriptor; +use Symfony\Component\Console\Tests\Fixtures\DescriptorApplicationMbString; +use Symfony\Component\Console\Tests\Fixtures\DescriptorCommandMbString; + +class MarkdownDescriptorTest extends AbstractDescriptorTest +{ + public function getDescribeCommandTestData() + { + return $this->getDescriptionTestData(array_merge( + ObjectsProvider::getCommands(), + array('command_mbstring' => new DescriptorCommandMbString()) + )); + } + + public function getDescribeApplicationTestData() + { + return $this->getDescriptionTestData(array_merge( + ObjectsProvider::getApplications(), + array('application_mbstring' => new DescriptorApplicationMbString()) + )); + } + + protected function getDescriptor() + { + return new MarkdownDescriptor(); + } + + protected function getFormat() + { + return 'md'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..8f825ecb68395f9bb972f209748e2b16022d2d8b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Descriptor; + +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication1; +use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication2; +use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand1; +use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand2; + +/** + * @author Jean-François Simon + */ +class ObjectsProvider +{ + public static function getInputArguments() + { + return array( + 'input_argument_1' => new InputArgument('argument_name', InputArgument::REQUIRED), + 'input_argument_2' => new InputArgument('argument_name', InputArgument::IS_ARRAY, 'argument description'), + 'input_argument_3' => new InputArgument('argument_name', InputArgument::OPTIONAL, 'argument description', 'default_value'), + 'input_argument_4' => new InputArgument('argument_name', InputArgument::REQUIRED, "multiline\nargument description"), + 'input_argument_with_style' => new InputArgument('argument_name', InputArgument::OPTIONAL, 'argument description', 'style'), + ); + } + + public static function getInputOptions() + { + return array( + 'input_option_1' => new InputOption('option_name', 'o', InputOption::VALUE_NONE), + 'input_option_2' => new InputOption('option_name', 'o', InputOption::VALUE_OPTIONAL, 'option description', 'default_value'), + 'input_option_3' => new InputOption('option_name', 'o', InputOption::VALUE_REQUIRED, 'option description'), + 'input_option_4' => new InputOption('option_name', 'o', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'option description', array()), + 'input_option_5' => new InputOption('option_name', 'o', InputOption::VALUE_REQUIRED, "multiline\noption description"), + 'input_option_6' => new InputOption('option_name', array('o', 'O'), InputOption::VALUE_REQUIRED, 'option with multiple shortcuts'), + 'input_option_with_style' => new InputOption('option_name', 'o', InputOption::VALUE_REQUIRED, 'option description', 'style'), + 'input_option_with_style_array' => new InputOption('option_name', 'o', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'option description', array('Hello', 'world')), + ); + } + + public static function getInputDefinitions() + { + return array( + 'input_definition_1' => new InputDefinition(), + 'input_definition_2' => new InputDefinition(array(new InputArgument('argument_name', InputArgument::REQUIRED))), + 'input_definition_3' => new InputDefinition(array(new InputOption('option_name', 'o', InputOption::VALUE_NONE))), + 'input_definition_4' => new InputDefinition(array( + new InputArgument('argument_name', InputArgument::REQUIRED), + new InputOption('option_name', 'o', InputOption::VALUE_NONE), + )), + ); + } + + public static function getCommands() + { + return array( + 'command_1' => new DescriptorCommand1(), + 'command_2' => new DescriptorCommand2(), + ); + } + + public static function getApplications() + { + return array( + 'application_1' => new DescriptorApplication1(), + 'application_2' => new DescriptorApplication2(), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/TextDescriptorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/TextDescriptorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..364e29c02664be658baaf1d60adcd69c93a64448 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/TextDescriptorTest.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\Component\Console\Tests\Descriptor; + +use Symfony\Component\Console\Descriptor\TextDescriptor; +use Symfony\Component\Console\Tests\Fixtures\DescriptorApplicationMbString; +use Symfony\Component\Console\Tests\Fixtures\DescriptorCommandMbString; + +class TextDescriptorTest extends AbstractDescriptorTest +{ + public function getDescribeCommandTestData() + { + return $this->getDescriptionTestData(array_merge( + ObjectsProvider::getCommands(), + array('command_mbstring' => new DescriptorCommandMbString()) + )); + } + + public function getDescribeApplicationTestData() + { + return $this->getDescriptionTestData(array_merge( + ObjectsProvider::getApplications(), + array('application_mbstring' => new DescriptorApplicationMbString()) + )); + } + + protected function getDescriptor() + { + return new TextDescriptor(); + } + + protected function getFormat() + { + return 'txt'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/XmlDescriptorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/XmlDescriptorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..59a5d1ed8a2a5e124f2f21d2d72e22a2d53b8b1a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Descriptor/XmlDescriptorTest.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\Console\Tests\Descriptor; + +use Symfony\Component\Console\Descriptor\XmlDescriptor; + +class XmlDescriptorTest extends AbstractDescriptorTest +{ + protected function getDescriptor() + { + return new XmlDescriptor(); + } + + protected function getFormat() + { + return 'xml'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/BarBucCommand.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/BarBucCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..52b619e821ed021894d70e4a1da91aa70df4a85f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/BarBucCommand.php @@ -0,0 +1,11 @@ +setName('bar:buc'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication1.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication1.php new file mode 100644 index 0000000000000000000000000000000000000000..132b6d57ddaa2d0b69271cd17928ad7b2432ef0e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication1.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Fixtures; + +use Symfony\Component\Console\Application; + +class DescriptorApplication1 extends Application +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php new file mode 100644 index 0000000000000000000000000000000000000000..0fe87a18e43686fff57582e2276c66cf1a6089be --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Fixtures; + +use Symfony\Component\Console\Application; + +class DescriptorApplication2 extends Application +{ + public function __construct() + { + parent::__construct('My Symfony application', 'v1.0'); + $this->add(new DescriptorCommand1()); + $this->add(new DescriptorCommand2()); + $this->add(new DescriptorCommand3()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorApplicationMbString.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorApplicationMbString.php new file mode 100644 index 0000000000000000000000000000000000000000..bf170c449f51e61562f06099b60ddb033a791a70 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorApplicationMbString.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Fixtures; + +use Symfony\Component\Console\Application; + +class DescriptorApplicationMbString extends Application +{ + public function __construct() + { + parent::__construct('MbString Ã¥pplicätion'); + + $this->add(new DescriptorCommandMbString()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.php new file mode 100644 index 0000000000000000000000000000000000000000..ede05d7a73c0f0cadc6dbdc28fff29f7c9f81f46 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.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\Console\Tests\Fixtures; + +use Symfony\Component\Console\Command\Command; + +class DescriptorCommand1 extends Command +{ + protected function configure() + { + $this + ->setName('descriptor:command1') + ->setAliases(array('alias1', 'alias2')) + ->setDescription('command 1 description') + ->setHelp('command 1 help') + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.php new file mode 100644 index 0000000000000000000000000000000000000000..51106b96116a65a67af10184231023f4de2e652c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.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\Component\Console\Tests\Fixtures; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; + +class DescriptorCommand2 extends Command +{ + protected function configure() + { + $this + ->setName('descriptor:command2') + ->setDescription('command 2 description') + ->setHelp('command 2 help') + ->addUsage('-o|--option_name ') + ->addUsage('') + ->addArgument('argument_name', InputArgument::REQUIRED) + ->addOption('option_name', 'o', InputOption::VALUE_NONE) + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand3.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand3.php new file mode 100644 index 0000000000000000000000000000000000000000..77f92e233f2928f3c09234bcb7de5764eacdcf4f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand3.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\Console\Tests\Fixtures; + +use Symfony\Component\Console\Command\Command; + +class DescriptorCommand3 extends Command +{ + protected function configure() + { + $this + ->setName('descriptor:command3') + ->setDescription('command 3 description') + ->setHelp('command 3 help') + ->setHidden(true) + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommandMbString.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommandMbString.php new file mode 100644 index 0000000000000000000000000000000000000000..66de917e29f58caecb59b7250697793bc3c702a5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommandMbString.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\Component\Console\Tests\Fixtures; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; + +class DescriptorCommandMbString extends Command +{ + protected function configure() + { + $this + ->setName('descriptor:åèä') + ->setDescription('command åèä description') + ->setHelp('command åèä help') + ->addUsage('-o|--option_name ') + ->addUsage('') + ->addArgument('argument_åèä', InputArgument::REQUIRED) + ->addOption('option_åèä', 'o', InputOption::VALUE_NONE) + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php new file mode 100644 index 0000000000000000000000000000000000000000..0070c0a48676c597310a46f71cd140d5610165e2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/DummyOutput.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\Component\Console\Tests\Fixtures; + +use Symfony\Component\Console\Output\BufferedOutput; + +/** + * Dummy output. + * + * @author Kévin Dunglas + */ +class DummyOutput extends BufferedOutput +{ + /** + * @return array + */ + public function getLogs() + { + $logs = array(); + foreach (explode("\n", trim($this->fetch())) as $message) { + preg_match('/^\[(.*)\] (.*)/', $message, $matches); + $logs[] = sprintf('%s %s', $matches[1], $matches[2]); + } + + return $logs; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo1Command.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo1Command.php new file mode 100644 index 0000000000000000000000000000000000000000..254162f320dd74a5fada0a9972eed6269b7d9710 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo1Command.php @@ -0,0 +1,26 @@ +setName('foo:bar1') + ->setDescription('The foo:bar1 command') + ->setAliases(array('afoobar1')) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $this->input = $input; + $this->output = $output; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo2Command.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo2Command.php new file mode 100644 index 0000000000000000000000000000000000000000..8071dc8fb3d86ff80e914f3a3c1dba7914045039 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo2Command.php @@ -0,0 +1,21 @@ +setName('foo1:bar') + ->setDescription('The foo1:bar command') + ->setAliases(array('afoobar2')) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo3Command.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo3Command.php new file mode 100644 index 0000000000000000000000000000000000000000..adb3a2d809f71e784e3b89062a81518de58ce3a5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo3Command.php @@ -0,0 +1,29 @@ +setName('foo3:bar') + ->setDescription('The foo3:bar command') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + try { + try { + throw new \Exception('First exception

    this is html

    '); + } catch (\Exception $e) { + throw new \Exception('Second exception comment', 0, $e); + } + } catch (\Exception $e) { + throw new \Exception('Third exception comment', 404, $e); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php new file mode 100644 index 0000000000000000000000000000000000000000..1c5463995f92cc4e339f40913891239cedcd684d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php @@ -0,0 +1,11 @@ +setName('foo3:bar:toh'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo5Command.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo5Command.php new file mode 100644 index 0000000000000000000000000000000000000000..a1c60827a515396d7ca31912cabc955da71b689f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Foo5Command.php @@ -0,0 +1,10 @@ +setName('0foo:bar')->setDescription('0foo:bar command'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooCommand.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..355e0ad6d63f9853e254763c866982e1af83f1fd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooCommand.php @@ -0,0 +1,33 @@ +setName('foo:bar') + ->setDescription('The foo:bar command') + ->setAliases(array('afoobar')) + ; + } + + protected function interact(InputInterface $input, OutputInterface $output) + { + $output->writeln('interact called'); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $this->input = $input; + $this->output = $output; + + $output->writeln('called'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooLock2Command.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooLock2Command.php new file mode 100644 index 0000000000000000000000000000000000000000..4e4656f20f2d4294f1a7cf286c41709edf7068c9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooLock2Command.php @@ -0,0 +1,28 @@ +setName('foo:lock2'); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + try { + $this->lock(); + $this->lock(); + } catch (LogicException $e) { + return 1; + } + + return 2; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooLockCommand.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooLockCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..dfa28a6bec1f1580887f7c38270633648f5f58ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooLockCommand.php @@ -0,0 +1,27 @@ +setName('foo:lock'); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + if (!$this->lock()) { + return 1; + } + + $this->release(); + + return 2; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced1Command.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced1Command.php new file mode 100644 index 0000000000000000000000000000000000000000..fc50c72bfcf874c036435e0bd13fa3fc796622cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced1Command.php @@ -0,0 +1,26 @@ +setName('foo:bar:baz') + ->setDescription('The foo:bar:baz command') + ->setAliases(array('foobarbaz')) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $this->input = $input; + $this->output = $output; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced2Command.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced2Command.php new file mode 100644 index 0000000000000000000000000000000000000000..1cf31ff110c9c5521da03d39c745d3befcdaba96 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced2Command.php @@ -0,0 +1,26 @@ +setName('foo:go:bret') + ->setDescription('The foo:bar:go command') + ->setAliases(array('foobargo')) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $this->input = $input; + $this->output = $output; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FoobarCommand.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FoobarCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..968162804cee9b042af24c660a59b1359818aecd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/FoobarCommand.php @@ -0,0 +1,25 @@ +setName('foobar:foo') + ->setDescription('The foobar:foo command') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $this->input = $input; + $this->output = $output; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_0.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_0.php new file mode 100644 index 0000000000000000000000000000000000000000..8fe7c07712888a2d3a546ca7f28922b0f09db3a1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_0.php @@ -0,0 +1,11 @@ +caution('Lorem ipsum dolor sit amet'); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_1.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_1.php new file mode 100644 index 0000000000000000000000000000000000000000..e5c700d60eb564f653facc8af8923a12a13573ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_1.php @@ -0,0 +1,13 @@ +title('Title'); + $output->warning('Lorem ipsum dolor sit amet'); + $output->title('Title'); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_10.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_10.php new file mode 100644 index 0000000000000000000000000000000000000000..3111873ddde6c76db089711597a45da222df6721 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_10.php @@ -0,0 +1,17 @@ +block( + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum', + 'CUSTOM', + 'fg=white;bg=green', + 'X ', + true + ); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_11.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_11.php new file mode 100644 index 0000000000000000000000000000000000000000..3ed897def42cefda7075f553a6c8cc59463fb440 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_11.php @@ -0,0 +1,12 @@ +block($word, 'CUSTOM', 'fg=white;bg=blue', ' § ', false); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_12.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_12.php new file mode 100644 index 0000000000000000000000000000000000000000..8c458ae764dc3bb5312ae70b5cc2f28d6b5e5f08 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_12.php @@ -0,0 +1,13 @@ +comment( + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum' + ); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_13.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_13.php new file mode 100644 index 0000000000000000000000000000000000000000..827cbad1df7d2bca909665ec546e40a9931c3a23 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_13.php @@ -0,0 +1,14 @@ +setDecorated(true); + $output = new SymfonyStyle($input, $output); + $output->comment( + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum' + ); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_14.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_14.php new file mode 100644 index 0000000000000000000000000000000000000000..a893a48bf248f9ee7a4564cbe71adf775379b62a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_14.php @@ -0,0 +1,17 @@ +block( + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum', + null, + null, + '$ ', + true + ); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_15.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_15.php new file mode 100644 index 0000000000000000000000000000000000000000..68402cd408a2d4eaa5164742c768871384befe2b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_15.php @@ -0,0 +1,14 @@ +block( + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum', + 'TEST' + ); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_16.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_16.php new file mode 100644 index 0000000000000000000000000000000000000000..66e8179638821b2ae5184c0704e8d13bb23df4b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_16.php @@ -0,0 +1,15 @@ +setDecorated(true); + $output = new SymfonyStyle($input, $output); + $output->success( + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum', + 'TEST' + ); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_17.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_17.php new file mode 100644 index 0000000000000000000000000000000000000000..311e6b3928478540e56f79fe2d1a50cb8c7d76b8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_17.php @@ -0,0 +1,13 @@ +title('Title ending with \\'); + $output->section('Section ending with \\'); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php new file mode 100644 index 0000000000000000000000000000000000000000..791b626f24f48ab665dbe29673b574137e7280d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php @@ -0,0 +1,16 @@ +warning('Warning'); + $output->caution('Caution'); + $output->error('Error'); + $output->success('Success'); + $output->note('Note'); + $output->block('Custom block', 'CUSTOM', 'fg=white;bg=green', 'X ', true); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_3.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_3.php new file mode 100644 index 0000000000000000000000000000000000000000..99253a6c08a835177d8cfd3a5afa780658b973ba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_3.php @@ -0,0 +1,12 @@ +title('First title'); + $output->title('Second title'); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_4.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_4.php new file mode 100644 index 0000000000000000000000000000000000000000..0c5d3fb26ceff43c06a310b70ba95e8c78a11c11 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_4.php @@ -0,0 +1,34 @@ +write('Lorem ipsum dolor sit amet'); + $output->title('First title'); + + $output->writeln('Lorem ipsum dolor sit amet'); + $output->title('Second title'); + + $output->write('Lorem ipsum dolor sit amet'); + $output->write(''); + $output->title('Third title'); + + //Ensure edge case by appending empty strings to history: + $output->write('Lorem ipsum dolor sit amet'); + $output->write(array('', '', '')); + $output->title('Fourth title'); + + //Ensure have manual control over number of blank lines: + $output->writeln('Lorem ipsum dolor sit amet'); + $output->writeln(array('', '')); //Should append an extra blank line + $output->title('Fifth title'); + + $output->writeln('Lorem ipsum dolor sit amet'); + $output->newLine(2); //Should append an extra blank line + $output->title('Fifth title'); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_5.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_5.php new file mode 100644 index 0000000000000000000000000000000000000000..96433ed5b32d2893b2949fcaa4190b8daa54b289 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_5.php @@ -0,0 +1,37 @@ +writeln('Lorem ipsum dolor sit amet'); + $output->listing(array( + 'Lorem ipsum dolor sit amet', + 'consectetur adipiscing elit', + )); + + //Even using write: + $output->write('Lorem ipsum dolor sit amet'); + $output->listing(array( + 'Lorem ipsum dolor sit amet', + 'consectetur adipiscing elit', + )); + + $output->write('Lorem ipsum dolor sit amet'); + $output->text(array( + 'Lorem ipsum dolor sit amet', + 'consectetur adipiscing elit', + )); + + $output->newLine(); + + $output->write('Lorem ipsum dolor sit amet'); + $output->comment(array( + 'Lorem ipsum dolor sit amet', + 'consectetur adipiscing elit', + )); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_6.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_6.php new file mode 100644 index 0000000000000000000000000000000000000000..8031ec9c30e5ab4788466e694d784596e514353d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_6.php @@ -0,0 +1,16 @@ +listing(array( + 'Lorem ipsum dolor sit amet', + 'consectetur adipiscing elit', + )); + $output->success('Lorem ipsum dolor sit amet'); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_7.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_7.php new file mode 100644 index 0000000000000000000000000000000000000000..203eb5b12e6b0edc2b2a869dde02115678b24b3a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_7.php @@ -0,0 +1,15 @@ +title('Title'); + $output->askHidden('Hidden question'); + $output->choice('Choice question with default', array('choice1', 'choice2'), 'choice1'); + $output->confirm('Confirmation with yes default', true); + $output->text('Duis aute irure dolor in reprehenderit in voluptate velit esse'); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php new file mode 100644 index 0000000000000000000000000000000000000000..922ef1f9d5c3c31e9096315003b1ccebf0f56e6d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php @@ -0,0 +1,26 @@ + 3))), + array('ISBN', 'Title', 'Author'), + ); + + $rows = array( + array( + '978-0521567817', + 'De Monarchia', + new TableCell("Dante Alighieri\nspans multiple rows", array('rowspan' => 2)), + ), + array('978-0804169127', 'Divine Comedy'), + ); + + $output = new SymfonyStyle($input, $output); + $output->table($headers, $rows); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_9.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_9.php new file mode 100644 index 0000000000000000000000000000000000000000..57afdf06b43f0e8a5d5282e804c5476c736a703e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_9.php @@ -0,0 +1,11 @@ +block(array('Custom block', 'Second custom block line'), 'CUSTOM', 'fg=white;bg=green', 'X ', true); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/interactive_command_1.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/interactive_command_1.php new file mode 100644 index 0000000000000000000000000000000000000000..3c9c74405018599491e401bff60d6f62acce2064 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/interactive_command_1.php @@ -0,0 +1,19 @@ +setStream($stream); + + $output->ask('What\'s your name?'); + $output->ask('How are you?'); + $output->ask('Where do you come from?'); +}; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/interactive_output_1.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/interactive_output_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..6fc7d7eb4dee567d597386a60e63000c330697e1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/interactive_output_1.txt @@ -0,0 +1,7 @@ + + What's your name?: + > + How are you?: + > + Where do you come from?: + > diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_0.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_0.txt new file mode 100644 index 0000000000000000000000000000000000000000..a42e0f792aa6b0562c1902d691b230a2bf1fa36f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_0.txt @@ -0,0 +1,3 @@ + + ! [CAUTION] Lorem ipsum dolor sit amet + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_1.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..334875f78918a6451bcc9f155a75010f0d6704b6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_1.txt @@ -0,0 +1,9 @@ + +Title +===== + + [WARNING] Lorem ipsum dolor sit amet + +Title +===== + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_10.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_10.txt new file mode 100644 index 0000000000000000000000000000000000000000..385c6a283c84d4e0ddb27e1c9e8d78e6b45b63ce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_10.txt @@ -0,0 +1,7 @@ + +X [CUSTOM] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et +X dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea +X commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat +X nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit +X anim id est laborum + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_11.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_11.txt new file mode 100644 index 0000000000000000000000000000000000000000..190d7840354767c7d9f24d06f2cfbd78592bd167 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_11.txt @@ -0,0 +1,4 @@ + + § [CUSTOM] Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophatto + § peristeralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_12.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_12.txt new file mode 100644 index 0000000000000000000000000000000000000000..9983af832aa7df5cda7895634096bf849dadd341 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_12.txt @@ -0,0 +1,6 @@ + + // Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna + // aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + // Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur + // sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_13.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_13.txt new file mode 100644 index 0000000000000000000000000000000000000000..0f3704b7482eacea4776ada15a8c630642935158 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_13.txt @@ -0,0 +1,7 @@ + + // Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et  + // dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea  + // commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla  + // pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim + // id est laborum + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_14.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_14.txt new file mode 100644 index 0000000000000000000000000000000000000000..1d0d37e7fe31a03c25c02a3088ab987086466df7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_14.txt @@ -0,0 +1,6 @@ + +$ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna +$ aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +$ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint +$ occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_15.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_15.txt new file mode 100644 index 0000000000000000000000000000000000000000..66404b8151e4134e2b3abeceaa369c7b13518a68 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_15.txt @@ -0,0 +1,7 @@ + + [TEST] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore + magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla + pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est + laborum + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_16.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_16.txt new file mode 100644 index 0000000000000000000000000000000000000000..a0d180165b8794cf70e93917ed446fd024e075dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_16.txt @@ -0,0 +1,8 @@ + +  + [OK] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore  + magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo  + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.  + Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum  +  + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_17.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_17.txt new file mode 100644 index 0000000000000000000000000000000000000000..59d00e04a248dfb3cc36f96c1869fdcfdd41d415 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_17.txt @@ -0,0 +1,7 @@ + +Title ending with \ +=================== + +Section ending with \ +--------------------- + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_2.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_2.txt new file mode 100644 index 0000000000000000000000000000000000000000..ca609760cc12aa9f2311fe7d91e4e1e1f15aae46 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_2.txt @@ -0,0 +1,13 @@ + + [WARNING] Warning + + ! [CAUTION] Caution + + [ERROR] Error + + [OK] Success + + ! [NOTE] Note + +X [CUSTOM] Custom block + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_3.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_3.txt new file mode 100644 index 0000000000000000000000000000000000000000..f4b6d58276c698152ce7eff747b7f628269ec595 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_3.txt @@ -0,0 +1,7 @@ + +First title +=========== + +Second title +============ + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_4.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_4.txt new file mode 100644 index 0000000000000000000000000000000000000000..2646d858e7cd38c4041df4a263f78a87e90bb2f3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_4.txt @@ -0,0 +1,32 @@ +Lorem ipsum dolor sit amet + +First title +=========== + +Lorem ipsum dolor sit amet + +Second title +============ + +Lorem ipsum dolor sit amet + +Third title +=========== + +Lorem ipsum dolor sit amet + +Fourth title +============ + +Lorem ipsum dolor sit amet + + +Fifth title +=========== + +Lorem ipsum dolor sit amet + + +Fifth title +=========== + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_5.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_5.txt new file mode 100644 index 0000000000000000000000000000000000000000..be4a2db60579537af2912805b99084cacc880cbb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_5.txt @@ -0,0 +1,18 @@ +Lorem ipsum dolor sit amet + * Lorem ipsum dolor sit amet + * consectetur adipiscing elit + +Lorem ipsum dolor sit amet + * Lorem ipsum dolor sit amet + * consectetur adipiscing elit + +Lorem ipsum dolor sit amet + Lorem ipsum dolor sit amet + consectetur adipiscing elit + +Lorem ipsum dolor sit amet + + // Lorem ipsum dolor sit amet + // + // consectetur adipiscing elit + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_6.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_6.txt new file mode 100644 index 0000000000000000000000000000000000000000..5f2d33c148a9ee6e7464479395d1beec9d8cd74a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_6.txt @@ -0,0 +1,6 @@ + + * Lorem ipsum dolor sit amet + * consectetur adipiscing elit + + [OK] Lorem ipsum dolor sit amet + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_7.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_7.txt new file mode 100644 index 0000000000000000000000000000000000000000..ecea9778b1ef643525ca8f288f9a646bf9280e1c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_7.txt @@ -0,0 +1,5 @@ + +Title +===== + + Duis aute irure dolor in reprehenderit in voluptate velit esse diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_8.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_8.txt new file mode 100644 index 0000000000000000000000000000000000000000..005b846eae491374bd20c01123fc93f1e72edc18 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_8.txt @@ -0,0 +1,9 @@ + ---------------- --------------- --------------------- + Main table title + ---------------- --------------- --------------------- + ISBN Title Author + ---------------- --------------- --------------------- + 978-0521567817 De Monarchia Dante Alighieri + 978-0804169127 Divine Comedy spans multiple rows + ---------------- --------------- --------------------- + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_9.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_9.txt new file mode 100644 index 0000000000000000000000000000000000000000..069c0d5119f7ba26938de2c441132578db90f82c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_9.txt @@ -0,0 +1,5 @@ + +X [CUSTOM] Custom block +X +X Second custom block line + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/TestCommand.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/TestCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..dcd32739c4c36efbece6b03a5173b77198d67aca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/TestCommand.php @@ -0,0 +1,28 @@ +setName('namespace:name') + ->setAliases(array('name')) + ->setDescription('description') + ->setHelp('help') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $output->writeln('execute called'); + } + + protected function interact(InputInterface $input, OutputInterface $output) + { + $output->writeln('interact called'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_1.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_1.json new file mode 100644 index 0000000000000000000000000000000000000000..dab170a354e25ee3294a123b7055ecb5d2b116ac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_1.json @@ -0,0 +1,154 @@ +{ + "commands": [ + { + "name": "help", + "usage": [ + "help [--format FORMAT] [--raw] [--] []" + ], + "description": "Displays help for a command", + "help": "The help<\/info> command displays help for a given command:\n\n php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the --format<\/comment> option:\n\n php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the list<\/info> command.", + "definition": { + "arguments": { + "command_name": { + "name": "command_name", + "is_required": false, + "is_array": false, + "description": "The command name", + "default": "help" + } + }, + "options": { + "format": { + "name": "--format", + "shortcut": "", + "accept_value": true, + "is_value_required": true, + "is_multiple": false, + "description": "The output format (txt, xml, json, or md)", + "default": "txt" + }, + "raw": { + "name": "--raw", + "shortcut": "", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "To output raw command help", + "default": false + }, + "help": { + "name": "--help", + "shortcut": "-h", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Display this help message", + "default": false + }, + "quiet": { + "name": "--quiet", + "shortcut": "-q", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Do not output any message", + "default": false + }, + "verbose": { + "name": "--verbose", + "shortcut": "-v|-vv|-vvv", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug", + "default": false + }, + "version": { + "name": "--version", + "shortcut": "-V", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Display this application version", + "default": false + }, + "ansi": { + "name": "--ansi", + "shortcut": "", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Force ANSI output", + "default": false + }, + "no-ansi": { + "name": "--no-ansi", + "shortcut": "", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Disable ANSI output", + "default": false + }, + "no-interaction": { + "name": "--no-interaction", + "shortcut": "-n", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Do not ask any interactive question", + "default": false + } + } + } + }, + { + "name": "list", + "usage": [ + "list [--raw] [--format FORMAT] [--] []" + ], + "description": "Lists commands", + "help": "The list<\/info> command lists all commands:\n\n php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the --format<\/comment> option:\n\n php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n php app\/console list --raw<\/info>", + "definition": { + "arguments": { + "namespace": { + "name": "namespace", + "is_required": false, + "is_array": false, + "description": "The namespace name", + "default": null + } + }, + "options": { + "raw": { + "name": "--raw", + "shortcut": "", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "To output raw command list", + "default": false + }, + "format": { + "name": "--format", + "shortcut": "", + "accept_value": true, + "is_value_required": true, + "is_multiple": false, + "description": "The output format (txt, xml, json, or md)", + "default": "txt" + } + } + } + } + ], + "namespaces": [ + { + "id": "_global", + "commands": [ + "help", + "list" + ] + } + ] +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_1.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_1.md new file mode 100644 index 0000000000000000000000000000000000000000..f1d88c5b7d1abcd031e9f1bf9dacb92186e25702 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_1.md @@ -0,0 +1,181 @@ +UNKNOWN +======= + +* help +* list + +help +---- + +* Description: Displays help for a command +* Usage: + + * `help [--format FORMAT] [--raw] [--] []` + +The help command displays help for a given command: + + php app/console help list + +You can also output the help in other formats by using the --format option: + + php app/console help --format=xml list + +To display the list of available commands, please use the list command. + +### Arguments: + +**command_name:** + +* Name: command_name +* Is required: no +* Is array: no +* Description: The command name +* Default: `'help'` + +### Options: + +**format:** + +* Name: `--format` +* Shortcut: +* Accept value: yes +* Is value required: yes +* Is multiple: no +* Description: The output format (txt, xml, json, or md) +* Default: `'txt'` + +**raw:** + +* Name: `--raw` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: To output raw command help +* Default: `false` + +**help:** + +* Name: `--help` +* Shortcut: `-h` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Display this help message +* Default: `false` + +**quiet:** + +* Name: `--quiet` +* Shortcut: `-q` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Do not output any message +* Default: `false` + +**verbose:** + +* Name: `--verbose` +* Shortcut: `-v|-vv|-vvv` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug +* Default: `false` + +**version:** + +* Name: `--version` +* Shortcut: `-V` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Display this application version +* Default: `false` + +**ansi:** + +* Name: `--ansi` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Force ANSI output +* Default: `false` + +**no-ansi:** + +* Name: `--no-ansi` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Disable ANSI output +* Default: `false` + +**no-interaction:** + +* Name: `--no-interaction` +* Shortcut: `-n` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Do not ask any interactive question +* Default: `false` + +list +---- + +* Description: Lists commands +* Usage: + + * `list [--raw] [--format FORMAT] [--] []` + +The list command lists all commands: + + php app/console list + +You can also display the commands for a specific namespace: + + php app/console list test + +You can also output the information in other formats by using the --format option: + + php app/console list --format=xml + +It's also possible to get raw list of commands (useful for embedding command runner): + + php app/console list --raw + +### Arguments: + +**namespace:** + +* Name: namespace +* Is required: no +* Is array: no +* Description: The namespace name +* Default: `NULL` + +### Options: + +**raw:** + +* Name: `--raw` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: To output raw command list +* Default: `false` + +**format:** + +* Name: `--format` +* Shortcut: +* Accept value: yes +* Is value required: yes +* Is multiple: no +* Description: The output format (txt, xml, json, or md) +* Default: `'txt'` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_1.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..8a7b47e0c4b002c4441e6f806fba5e3d7f59e282 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_1.txt @@ -0,0 +1,17 @@ +Console Tool + +Usage: + command [options] [arguments] + +Options: + -h, --help Display this help message + -q, --quiet Do not output any message + -V, --version Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + -n, --no-interaction Do not ask any interactive question + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + +Available commands: + help Displays help for a command + list Lists commands diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_1.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..8514f233be695d06d12115aa43396eeb5182883c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_1.xml @@ -0,0 +1,104 @@ + + + + + + help [--format FORMAT] [--raw] [--] [<command_name>] + + Displays help for a command + The <info>help</info> command displays help for a given command: + + <info>php app/console help list</info> + + You can also output the help in other formats by using the <comment>--format</comment> option: + + <info>php app/console help --format=xml list</info> + + To display the list of available commands, please use the <info>list</info> command. + + + The command name + + help + + + + + + + + + + + + + + + + + + list [--raw] [--format FORMAT] [--] [<namespace>] + + Lists commands + The <info>list</info> command lists all commands: + + <info>php app/console list</info> + + You can also display the commands for a specific namespace: + + <info>php app/console list test</info> + + You can also output the information in other formats by using the <comment>--format</comment> option: + + <info>php app/console list --format=xml</info> + + It's also possible to get raw list of commands (useful for embedding command runner): + + <info>php app/console list --raw</info> + + + The namespace name + + + + + + + + + + + + help + list + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_2.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_2.json new file mode 100644 index 0000000000000000000000000000000000000000..398f1fd0d0872f3033ac6f343178621796210e69 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_2.json @@ -0,0 +1,336 @@ +{ + "commands": [ + { + "name": "help", + "usage": [ + "help [--format FORMAT] [--raw] [--] []" + ], + "description": "Displays help for a command", + "help": "The help<\/info> command displays help for a given command:\n\n php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the --format<\/comment> option:\n\n php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the list<\/info> command.", + "definition": { + "arguments": { + "command_name": { + "name": "command_name", + "is_required": false, + "is_array": false, + "description": "The command name", + "default": "help" + } + }, + "options": { + "format": { + "name": "--format", + "shortcut": "", + "accept_value": true, + "is_value_required": true, + "is_multiple": false, + "description": "The output format (txt, xml, json, or md)", + "default": "txt" + }, + "raw": { + "name": "--raw", + "shortcut": "", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "To output raw command help", + "default": false + }, + "help": { + "name": "--help", + "shortcut": "-h", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Display this help message", + "default": false + }, + "quiet": { + "name": "--quiet", + "shortcut": "-q", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Do not output any message", + "default": false + }, + "verbose": { + "name": "--verbose", + "shortcut": "-v|-vv|-vvv", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug", + "default": false + }, + "version": { + "name": "--version", + "shortcut": "-V", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Display this application version", + "default": false + }, + "ansi": { + "name": "--ansi", + "shortcut": "", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Force ANSI output", + "default": false + }, + "no-ansi": { + "name": "--no-ansi", + "shortcut": "", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Disable ANSI output", + "default": false + }, + "no-interaction": { + "name": "--no-interaction", + "shortcut": "-n", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Do not ask any interactive question", + "default": false + } + } + } + }, + { + "name": "list", + "usage": [ + "list [--raw] [--format FORMAT] [--] []" + ], + "description": "Lists commands", + "help": "The list<\/info> command lists all commands:\n\n php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the --format<\/comment> option:\n\n php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n php app\/console list --raw<\/info>", + "definition": { + "arguments": { + "namespace": { + "name": "namespace", + "is_required": false, + "is_array": false, + "description": "The namespace name", + "default": null + } + }, + "options": { + "raw": { + "name": "--raw", + "shortcut": "", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "To output raw command list", + "default": false + }, + "format": { + "name": "--format", + "shortcut": "", + "accept_value": true, + "is_value_required": true, + "is_multiple": false, + "description": "The output format (txt, xml, json, or md)", + "default": "txt" + } + } + } + }, + { + "name": "descriptor:command1", + "usage": [ + "descriptor:command1", + "alias1", + "alias2" + ], + "description": "command 1 description", + "help": "command 1 help", + "definition": { + "arguments": [], + "options": { + "help": { + "name": "--help", + "shortcut": "-h", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Display this help message", + "default": false + }, + "quiet": { + "name": "--quiet", + "shortcut": "-q", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Do not output any message", + "default": false + }, + "verbose": { + "name": "--verbose", + "shortcut": "-v|-vv|-vvv", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug", + "default": false + }, + "version": { + "name": "--version", + "shortcut": "-V", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Display this application version", + "default": false + }, + "ansi": { + "name": "--ansi", + "shortcut": "", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Force ANSI output", + "default": false + }, + "no-ansi": { + "name": "--no-ansi", + "shortcut": "", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Disable ANSI output", + "default": false + }, + "no-interaction": { + "name": "--no-interaction", + "shortcut": "-n", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Do not ask any interactive question", + "default": false + } + } + } + }, + { + "name": "descriptor:command2", + "usage": [ + "descriptor:command2 [-o|--option_name] [--] ", + "descriptor:command2 -o|--option_name ", + "descriptor:command2 " + ], + "description": "command 2 description", + "help": "command 2 help", + "definition": { + "arguments": { + "argument_name": { + "name": "argument_name", + "is_required": true, + "is_array": false, + "description": "", + "default": null + } + }, + "options": { + "option_name": { + "name": "--option_name", + "shortcut": "-o", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "", + "default": false + }, + "help": { + "name": "--help", + "shortcut": "-h", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Display this help message", + "default": false + }, + "quiet": { + "name": "--quiet", + "shortcut": "-q", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Do not output any message", + "default": false + }, + "verbose": { + "name": "--verbose", + "shortcut": "-v|-vv|-vvv", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug", + "default": false + }, + "version": { + "name": "--version", + "shortcut": "-V", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Display this application version", + "default": false + }, + "ansi": { + "name": "--ansi", + "shortcut": "", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Force ANSI output", + "default": false + }, + "no-ansi": { + "name": "--no-ansi", + "shortcut": "", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Disable ANSI output", + "default": false + }, + "no-interaction": { + "name": "--no-interaction", + "shortcut": "-n", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "Do not ask any interactive question", + "default": false + } + } + } + } + ], + "namespaces": [ + { + "id": "_global", + "commands": [ + "alias1", + "alias2", + "help", + "list" + ] + }, + { + "id": "descriptor", + "commands": [ + "descriptor:command1", + "descriptor:command2" + ] + } + ] +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_2.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_2.md new file mode 100644 index 0000000000000000000000000000000000000000..63b2d9ab422e129e2bad6c80055d913e487e198d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_2.md @@ -0,0 +1,376 @@ +My Symfony application +====================== + +* alias1 +* alias2 +* help +* list + +**descriptor:** + +* descriptor:command1 +* descriptor:command2 + +help +---- + +* Description: Displays help for a command +* Usage: + + * `help [--format FORMAT] [--raw] [--] []` + +The help command displays help for a given command: + + php app/console help list + +You can also output the help in other formats by using the --format option: + + php app/console help --format=xml list + +To display the list of available commands, please use the list command. + +### Arguments: + +**command_name:** + +* Name: command_name +* Is required: no +* Is array: no +* Description: The command name +* Default: `'help'` + +### Options: + +**format:** + +* Name: `--format` +* Shortcut: +* Accept value: yes +* Is value required: yes +* Is multiple: no +* Description: The output format (txt, xml, json, or md) +* Default: `'txt'` + +**raw:** + +* Name: `--raw` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: To output raw command help +* Default: `false` + +**help:** + +* Name: `--help` +* Shortcut: `-h` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Display this help message +* Default: `false` + +**quiet:** + +* Name: `--quiet` +* Shortcut: `-q` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Do not output any message +* Default: `false` + +**verbose:** + +* Name: `--verbose` +* Shortcut: `-v|-vv|-vvv` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug +* Default: `false` + +**version:** + +* Name: `--version` +* Shortcut: `-V` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Display this application version +* Default: `false` + +**ansi:** + +* Name: `--ansi` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Force ANSI output +* Default: `false` + +**no-ansi:** + +* Name: `--no-ansi` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Disable ANSI output +* Default: `false` + +**no-interaction:** + +* Name: `--no-interaction` +* Shortcut: `-n` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Do not ask any interactive question +* Default: `false` + +list +---- + +* Description: Lists commands +* Usage: + + * `list [--raw] [--format FORMAT] [--] []` + +The list command lists all commands: + + php app/console list + +You can also display the commands for a specific namespace: + + php app/console list test + +You can also output the information in other formats by using the --format option: + + php app/console list --format=xml + +It's also possible to get raw list of commands (useful for embedding command runner): + + php app/console list --raw + +### Arguments: + +**namespace:** + +* Name: namespace +* Is required: no +* Is array: no +* Description: The namespace name +* Default: `NULL` + +### Options: + +**raw:** + +* Name: `--raw` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: To output raw command list +* Default: `false` + +**format:** + +* Name: `--format` +* Shortcut: +* Accept value: yes +* Is value required: yes +* Is multiple: no +* Description: The output format (txt, xml, json, or md) +* Default: `'txt'` + +descriptor:command1 +------------------- + +* Description: command 1 description +* Usage: + + * `descriptor:command1` + * `alias1` + * `alias2` + +command 1 help + +### Options: + +**help:** + +* Name: `--help` +* Shortcut: `-h` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Display this help message +* Default: `false` + +**quiet:** + +* Name: `--quiet` +* Shortcut: `-q` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Do not output any message +* Default: `false` + +**verbose:** + +* Name: `--verbose` +* Shortcut: `-v|-vv|-vvv` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug +* Default: `false` + +**version:** + +* Name: `--version` +* Shortcut: `-V` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Display this application version +* Default: `false` + +**ansi:** + +* Name: `--ansi` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Force ANSI output +* Default: `false` + +**no-ansi:** + +* Name: `--no-ansi` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Disable ANSI output +* Default: `false` + +**no-interaction:** + +* Name: `--no-interaction` +* Shortcut: `-n` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Do not ask any interactive question +* Default: `false` + +descriptor:command2 +------------------- + +* Description: command 2 description +* Usage: + + * `descriptor:command2 [-o|--option_name] [--] ` + * `descriptor:command2 -o|--option_name ` + * `descriptor:command2 ` + +command 2 help + +### Arguments: + +**argument_name:** + +* Name: argument_name +* Is required: yes +* Is array: no +* Description: +* Default: `NULL` + +### Options: + +**option_name:** + +* Name: `--option_name` +* Shortcut: `-o` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: +* Default: `false` + +**help:** + +* Name: `--help` +* Shortcut: `-h` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Display this help message +* Default: `false` + +**quiet:** + +* Name: `--quiet` +* Shortcut: `-q` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Do not output any message +* Default: `false` + +**verbose:** + +* Name: `--verbose` +* Shortcut: `-v|-vv|-vvv` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug +* Default: `false` + +**version:** + +* Name: `--version` +* Shortcut: `-V` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Display this application version +* Default: `false` + +**ansi:** + +* Name: `--ansi` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Force ANSI output +* Default: `false` + +**no-ansi:** + +* Name: `--no-ansi` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Disable ANSI output +* Default: `false` + +**no-interaction:** + +* Name: `--no-interaction` +* Shortcut: `-n` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Do not ask any interactive question +* Default: `false` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_2.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_2.txt new file mode 100644 index 0000000000000000000000000000000000000000..b28036599642dfbdfd0bfc41d45a7a7fb5ced7bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_2.txt @@ -0,0 +1,20 @@ +My Symfony application v1.0 + +Usage: + command [options] [arguments] + +Options: + -h, --help Display this help message + -q, --quiet Do not output any message + -V, --version Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + -n, --no-interaction Do not ask any interactive question + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + +Available commands: + help Displays help for a command + list Lists commands + descriptor + descriptor:command1 [alias1|alias2] command 1 description + descriptor:command2 command 2 description diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_2.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..62e3cfcbe059c37b30c9e9daca4f69c121f1c271 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_2.xml @@ -0,0 +1,184 @@ + + + + + + help [--format FORMAT] [--raw] [--] [<command_name>] + + Displays help for a command + The <info>help</info> command displays help for a given command: + + <info>php app/console help list</info> + + You can also output the help in other formats by using the <comment>--format</comment> option: + + <info>php app/console help --format=xml list</info> + + To display the list of available commands, please use the <info>list</info> command. + + + The command name + + help + + + + + + + + + + + + + + + + + + list [--raw] [--format FORMAT] [--] [<namespace>] + + Lists commands + The <info>list</info> command lists all commands: + + <info>php app/console list</info> + + You can also display the commands for a specific namespace: + + <info>php app/console list test</info> + + You can also output the information in other formats by using the <comment>--format</comment> option: + + <info>php app/console list --format=xml</info> + + It's also possible to get raw list of commands (useful for embedding command runner): + + <info>php app/console list --raw</info> + + + The namespace name + + + + + + + + + + + descriptor:command1 + alias1 + alias2 + + command 1 description + command 1 help + + + + + + + + + + + + + + descriptor:command2 [-o|--option_name] [--] <argument_name> + descriptor:command2 -o|--option_name <argument_name> + descriptor:command2 <argument_name> + + command 2 description + command 2 help + + + + + + + + + + + + + + + + + + + + + alias1 + alias2 + help + list + + + descriptor:command1 + descriptor:command2 + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_gethelp.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_gethelp.txt new file mode 100644 index 0000000000000000000000000000000000000000..5a5920d0eb759e36fb2a1b93d8eac6da3edd7309 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_gethelp.txt @@ -0,0 +1 @@ +Console Tool \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md new file mode 100644 index 0000000000000000000000000000000000000000..22a256fae683440fbf2a2e6f612652f08e793708 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md @@ -0,0 +1,289 @@ +MbString åpplicätion +==================== + +* help +* list + +**descriptor:** + +* descriptor:åèä + +help +---- + +* Description: Displays help for a command +* Usage: + + * `help [--format FORMAT] [--raw] [--] []` + +The help command displays help for a given command: + + php app/console help list + +You can also output the help in other formats by using the --format option: + + php app/console help --format=xml list + +To display the list of available commands, please use the list command. + +### Arguments: + +**command_name:** + +* Name: command_name +* Is required: no +* Is array: no +* Description: The command name +* Default: `'help'` + +### Options: + +**format:** + +* Name: `--format` +* Shortcut: +* Accept value: yes +* Is value required: yes +* Is multiple: no +* Description: The output format (txt, xml, json, or md) +* Default: `'txt'` + +**raw:** + +* Name: `--raw` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: To output raw command help +* Default: `false` + +**help:** + +* Name: `--help` +* Shortcut: `-h` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Display this help message +* Default: `false` + +**quiet:** + +* Name: `--quiet` +* Shortcut: `-q` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Do not output any message +* Default: `false` + +**verbose:** + +* Name: `--verbose` +* Shortcut: `-v|-vv|-vvv` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug +* Default: `false` + +**version:** + +* Name: `--version` +* Shortcut: `-V` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Display this application version +* Default: `false` + +**ansi:** + +* Name: `--ansi` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Force ANSI output +* Default: `false` + +**no-ansi:** + +* Name: `--no-ansi` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Disable ANSI output +* Default: `false` + +**no-interaction:** + +* Name: `--no-interaction` +* Shortcut: `-n` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Do not ask any interactive question +* Default: `false` + +list +---- + +* Description: Lists commands +* Usage: + + * `list [--raw] [--format FORMAT] [--] []` + +The list command lists all commands: + + php app/console list + +You can also display the commands for a specific namespace: + + php app/console list test + +You can also output the information in other formats by using the --format option: + + php app/console list --format=xml + +It's also possible to get raw list of commands (useful for embedding command runner): + + php app/console list --raw + +### Arguments: + +**namespace:** + +* Name: namespace +* Is required: no +* Is array: no +* Description: The namespace name +* Default: `NULL` + +### Options: + +**raw:** + +* Name: `--raw` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: To output raw command list +* Default: `false` + +**format:** + +* Name: `--format` +* Shortcut: +* Accept value: yes +* Is value required: yes +* Is multiple: no +* Description: The output format (txt, xml, json, or md) +* Default: `'txt'` + +descriptor:åèä +-------------- + +* Description: command åèä description +* Usage: + + * `descriptor:åèä [-o|--option_åèä] [--] ` + * `descriptor:åèä -o|--option_name ` + * `descriptor:åèä ` + +command åèä help + +### Arguments: + +**argument_åèä:** + +* Name: argument_åèä +* Is required: yes +* Is array: no +* Description: +* Default: `NULL` + +### Options: + +**option_åèä:** + +* Name: `--option_åèä` +* Shortcut: `-o` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: +* Default: `false` + +**help:** + +* Name: `--help` +* Shortcut: `-h` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Display this help message +* Default: `false` + +**quiet:** + +* Name: `--quiet` +* Shortcut: `-q` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Do not output any message +* Default: `false` + +**verbose:** + +* Name: `--verbose` +* Shortcut: `-v|-vv|-vvv` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug +* Default: `false` + +**version:** + +* Name: `--version` +* Shortcut: `-V` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Display this application version +* Default: `false` + +**ansi:** + +* Name: `--ansi` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Force ANSI output +* Default: `false` + +**no-ansi:** + +* Name: `--no-ansi` +* Shortcut: +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Disable ANSI output +* Default: `false` + +**no-interaction:** + +* Name: `--no-interaction` +* Shortcut: `-n` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: Do not ask any interactive question +* Default: `false` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.txt new file mode 100644 index 0000000000000000000000000000000000000000..b409d188167581330484bff58c51b04bb0b090bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.txt @@ -0,0 +1,19 @@ +MbString åpplicätion + +Usage: + command [options] [arguments] + +Options: + -h, --help Display this help message + -q, --quiet Do not output any message + -V, --version Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + -n, --no-interaction Do not ask any interactive question + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + +Available commands: + help Displays help for a command + list Lists commands + descriptor + descriptor:åèä command åèä description diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception1.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception1.txt new file mode 100644 index 0000000000000000000000000000000000000000..919cec4214a9775274701452d506abaf6015a3cb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception1.txt @@ -0,0 +1,6 @@ + + + [Symfony\Component\Console\Exception\CommandNotFoundException] + Command "foo" is not defined. + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception2.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception2.txt new file mode 100644 index 0000000000000000000000000000000000000000..64561715e04fb5a8e9babc1c98b86734c57106a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception2.txt @@ -0,0 +1,8 @@ + + + [Symfony\Component\Console\Exception\InvalidOptionException] + The "--foo" option does not exist. + + +list [--raw] [--format FORMAT] [--] [] + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception3.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception3.txt new file mode 100644 index 0000000000000000000000000000000000000000..8276137bd886a39f65f06f4a478562fc3f854206 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception3.txt @@ -0,0 +1,18 @@ + + + [Exception] + Third exception comment + + + + [Exception] + Second exception comment + + + + [Exception] + First exception

    this is html

    + + +foo3:bar + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt new file mode 100644 index 0000000000000000000000000000000000000000..b4a7b018af377e6cfb4443194077057e57610570 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt @@ -0,0 +1,18 @@ + +  + [Exception]  + Third exception comment  +  + +  + [Exception]  + Second exception comment  +  + +  + [Exception]  + First exception 

    this is html

      +  + +foo3:bar + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception4.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception4.txt new file mode 100644 index 0000000000000000000000000000000000000000..cb080e9cb53b85c00cc3492ece5f07ff51210cde --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception4.txt @@ -0,0 +1,7 @@ + + + [Symfony\Component\Console\Exception\CommandNotFoundException] + Command "foo" is not define + d. + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1.txt new file mode 100644 index 0000000000000000000000000000000000000000..1ba5f8fdd914d8abde72f0078053a1ccb1964e87 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1.txt @@ -0,0 +1,8 @@ + + + [Exception] + エラーメッセージ + + +foo + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt new file mode 100644 index 0000000000000000000000000000000000000000..20644251c2f9be13c3a966310abefd2f51afd33c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt @@ -0,0 +1,8 @@ + +  + [Exception]  + エラーメッセージ  +  + +foo + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt new file mode 100644 index 0000000000000000000000000000000000000000..e41fcfcf675af9131a78bcdb85cc3fca72d0e506 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt @@ -0,0 +1,9 @@ + + + [Exception] + コマンドã®å®Ÿè¡Œä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒ + 発生ã—ã¾ã—ãŸã€‚ + + +foo + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_run1.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_run1.txt new file mode 100644 index 0000000000000000000000000000000000000000..0dc2730983f4bc214a66dcfcdfac6ebdc898c5c4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_run1.txt @@ -0,0 +1,17 @@ +Console Tool + +Usage: + command [options] [arguments] + +Options: + -h, --help Display this help message + -q, --quiet Do not output any message + -V, --version Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + -n, --no-interaction Do not ask any interactive question + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + +Available commands: + help Displays help for a command + list Lists commands diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_run2.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_run2.txt new file mode 100644 index 0000000000000000000000000000000000000000..65a685d085e10cf3961373782b953abcc5a2d8d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_run2.txt @@ -0,0 +1,26 @@ +Usage: + list [options] [--] [] + +Arguments: + namespace The namespace name + +Options: + --raw To output raw command list + --format=FORMAT The output format (txt, xml, json, or md) [default: "txt"] + +Help: + The list command lists all commands: + + php app/console list + + You can also display the commands for a specific namespace: + + php app/console list test + + You can also output the information in other formats by using the --format option: + + php app/console list --format=xml + + It's also possible to get raw list of commands (useful for embedding command runner): + + php app/console list --raw diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_run3.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_run3.txt new file mode 100644 index 0000000000000000000000000000000000000000..65a685d085e10cf3961373782b953abcc5a2d8d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_run3.txt @@ -0,0 +1,26 @@ +Usage: + list [options] [--] [] + +Arguments: + namespace The namespace name + +Options: + --raw To output raw command list + --format=FORMAT The output format (txt, xml, json, or md) [default: "txt"] + +Help: + The list command lists all commands: + + php app/console list + + You can also display the commands for a specific namespace: + + php app/console list test + + You can also output the information in other formats by using the --format option: + + php app/console list --format=xml + + It's also possible to get raw list of commands (useful for embedding command runner): + + php app/console list --raw diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_run4.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_run4.txt new file mode 100644 index 0000000000000000000000000000000000000000..47187fc2673e82ef88fe535619794ae8f6a69dbd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/application_run4.txt @@ -0,0 +1 @@ +Console Tool diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_1.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_1.json new file mode 100644 index 0000000000000000000000000000000000000000..4cd37eeb4b1f6e757b1a24c7ff8ac7940a5d1baa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_1.json @@ -0,0 +1,14 @@ +{ + "name": "descriptor:command1", + "usage": [ + "descriptor:command1", + "alias1", + "alias2" + ], + "description": "command 1 description", + "help": "command 1 help", + "definition": { + "arguments": [], + "options": [] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_1.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_1.md new file mode 100644 index 0000000000000000000000000000000000000000..34ed3ea7709b3f4901390d71f1904ceb3249102a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_1.md @@ -0,0 +1,11 @@ +descriptor:command1 +------------------- + +* Description: command 1 description +* Usage: + + * `descriptor:command1` + * `alias1` + * `alias2` + +command 1 help diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_1.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..e5e93ee093fcec4ed6ba2879adf9fb36a78cc7c8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_1.txt @@ -0,0 +1,7 @@ +Usage: + descriptor:command1 + alias1 + alias2 + +Help: + command 1 help diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_1.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..838b9bd91f837b06fd844d649f848d0f6f7df538 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_1.xml @@ -0,0 +1,12 @@ + + + + descriptor:command1 + alias1 + alias2 + + command 1 description + command 1 help + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_2.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_2.json new file mode 100644 index 0000000000000000000000000000000000000000..74c1f1260424e27842b7ece9992e96f043ee9b82 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_2.json @@ -0,0 +1,32 @@ +{ + "name": "descriptor:command2", + "usage": [ + "descriptor:command2 [-o|--option_name] [--] ", + "descriptor:command2 -o|--option_name ", + "descriptor:command2 " + ], + "description": "command 2 description", + "help": "command 2 help", + "definition": { + "arguments": { + "argument_name": { + "name": "argument_name", + "is_required": true, + "is_array": false, + "description": "", + "default": null + } + }, + "options": { + "option_name": { + "name": "--option_name", + "shortcut": "-o", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "", + "default": false + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_2.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_2.md new file mode 100644 index 0000000000000000000000000000000000000000..6f538b640794718c12b6f626fb5fec352f9471a8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_2.md @@ -0,0 +1,33 @@ +descriptor:command2 +------------------- + +* Description: command 2 description +* Usage: + + * `descriptor:command2 [-o|--option_name] [--] ` + * `descriptor:command2 -o|--option_name ` + * `descriptor:command2 ` + +command 2 help + +### Arguments: + +**argument_name:** + +* Name: argument_name +* Is required: yes +* Is array: no +* Description: +* Default: `NULL` + +### Options: + +**option_name:** + +* Name: `--option_name` +* Shortcut: `-o` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: +* Default: `false` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_2.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_2.txt new file mode 100644 index 0000000000000000000000000000000000000000..cad9cb45f2c8b0671cd16e3bb1bc47b26c68befc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_2.txt @@ -0,0 +1,13 @@ +Usage: + descriptor:command2 [options] [--] + descriptor:command2 -o|--option_name + descriptor:command2 + +Arguments: + argument_name + +Options: + -o, --option_name + +Help: + command 2 help diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_2.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..67364caa4ede3b3df9af073ee479b45a769a4bbe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_2.xml @@ -0,0 +1,21 @@ + + + + descriptor:command2 [-o|--option_name] [--] <argument_name> + descriptor:command2 -o|--option_name <argument_name> + descriptor:command2 <argument_name> + + command 2 description + command 2 help + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_mbstring.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_mbstring.md new file mode 100644 index 0000000000000000000000000000000000000000..2adac53f05fb8202550eefd9f99bb54b77a3f2d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_mbstring.md @@ -0,0 +1,33 @@ +descriptor:åèä +-------------- + +* Description: command åèä description +* Usage: + + * `descriptor:åèä [-o|--option_åèä] [--] ` + * `descriptor:åèä -o|--option_name ` + * `descriptor:åèä ` + +command åèä help + +### Arguments: + +**argument_åèä:** + +* Name: argument_åèä +* Is required: yes +* Is array: no +* Description: +* Default: `NULL` + +### Options: + +**option_åèä:** + +* Name: `--option_åèä` +* Shortcut: `-o` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: +* Default: `false` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_mbstring.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_mbstring.txt new file mode 100644 index 0000000000000000000000000000000000000000..969a0652420b2b5471e58762d8b3787cab441c7f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/command_mbstring.txt @@ -0,0 +1,13 @@ +Usage: + descriptor:åèä [options] [--] + descriptor:åèä -o|--option_name + descriptor:åèä + +Arguments: + argument_åèä + +Options: + -o, --option_åèä + +Help: + command åèä help diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.json new file mode 100644 index 0000000000000000000000000000000000000000..0ab932960164cb4d51a2d2e26905779708536dd8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.json @@ -0,0 +1,7 @@ +{ + "name": "argument_name", + "is_required": true, + "is_array": false, + "description": "", + "default": null +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.md new file mode 100644 index 0000000000000000000000000000000000000000..88f311ab534b1c49328fe683becc515b6379fdda --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.md @@ -0,0 +1,7 @@ +**argument_name:** + +* Name: argument_name +* Is required: yes +* Is array: no +* Description: +* Default: `NULL` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..55035183f67f095be7457244d8be246c23a5c07e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.txt @@ -0,0 +1 @@ + argument_name diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..cb37f812c5ec4631fb8844d8eba49e8fe7342e12 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.json new file mode 100644 index 0000000000000000000000000000000000000000..7450016ffa01c662286b355ff2517e216847642d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.json @@ -0,0 +1,7 @@ +{ + "name": "argument_name", + "is_required": false, + "is_array": true, + "description": "argument description", + "default": [] +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.md new file mode 100644 index 0000000000000000000000000000000000000000..3cdb00cc818678898cd7225ec96feef5793a8f98 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.md @@ -0,0 +1,7 @@ +**argument_name:** + +* Name: argument_name +* Is required: no +* Is array: yes +* Description: argument description +* Default: `array ()` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.txt new file mode 100644 index 0000000000000000000000000000000000000000..e713660743f750408509e9370329944f4c8f462b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.txt @@ -0,0 +1 @@ + argument_name argument description diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..629da5a98a3b56b79921dba6d140d950f83d2fb2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.xml @@ -0,0 +1,5 @@ + + + argument description + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.json new file mode 100644 index 0000000000000000000000000000000000000000..9a83c5a544db56625c86aea3779833af3b569787 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.json @@ -0,0 +1,7 @@ +{ + "name": "argument_name", + "is_required": false, + "is_array": false, + "description": "argument description", + "default": "default_value" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.md new file mode 100644 index 0000000000000000000000000000000000000000..be1c443ae0dcf3563ae7f315209e61b58b355175 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.md @@ -0,0 +1,7 @@ +**argument_name:** + +* Name: argument_name +* Is required: no +* Is array: no +* Description: argument description +* Default: `'default_value'` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.txt new file mode 100644 index 0000000000000000000000000000000000000000..6b76639e001283fb566aad8bb32fc46be189ab58 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.txt @@ -0,0 +1 @@ + argument_name argument description [default: "default_value"] diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.xml new file mode 100644 index 0000000000000000000000000000000000000000..399a5c864d5dd290ebc2054bfafc8a862308603a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.xml @@ -0,0 +1,7 @@ + + + argument description + + default_value + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.json new file mode 100644 index 0000000000000000000000000000000000000000..cbcb19b392b755159a6a393187d9f84912c56bf3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.json @@ -0,0 +1,7 @@ +{ + "name": "argument_name", + "is_required": true, + "is_array": false, + "description": "multiline argument description", + "default": null +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.md new file mode 100644 index 0000000000000000000000000000000000000000..f026ab37672bfa86acbbda2e55c84f0f8fd0eee6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.md @@ -0,0 +1,8 @@ +**argument_name:** + +* Name: argument_name +* Is required: yes +* Is array: no +* Description: multiline + argument description +* Default: `NULL` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc7d669a112ecf010af6df2f6c69afa2aa659c1e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.txt @@ -0,0 +1,2 @@ + argument_name multiline + argument description diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.xml new file mode 100644 index 0000000000000000000000000000000000000000..5ca135ec2cb488e54b8b9f8c92131c1c941645ed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.xml @@ -0,0 +1,6 @@ + + + multiline +argument description + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.json new file mode 100644 index 0000000000000000000000000000000000000000..93342351094513538ab47358ca08fe79d65cf874 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.json @@ -0,0 +1,7 @@ +{ + "name": "argument_name", + "is_required": false, + "is_array": false, + "description": "argument description", + "default": "style" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.md new file mode 100644 index 0000000000000000000000000000000000000000..45adf2f488bd9844c86caac3b853fb7724fab905 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.md @@ -0,0 +1,7 @@ +**argument_name:** + +* Name: argument_name +* Is required: no +* Is array: no +* Description: argument description +* Default: `'style'` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.txt new file mode 100644 index 0000000000000000000000000000000000000000..35384a6be87e70c8003dd4f00101e22186e9b11d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.txt @@ -0,0 +1 @@ + argument_name argument description [default: "\style\"] diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.xml new file mode 100644 index 0000000000000000000000000000000000000000..73332c796e8e41f2d1e313cd479c58ca0f8dd77e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.xml @@ -0,0 +1,7 @@ + + + argument description + + <comment>style</> + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.json new file mode 100644 index 0000000000000000000000000000000000000000..44aa2c2e16ab4a87d401fb11c61809634f5245e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.json @@ -0,0 +1,4 @@ +{ + "arguments": [], + "options": [] +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..b5481ce1276a26aa25554feaa8ab0104975e98bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.json new file mode 100644 index 0000000000000000000000000000000000000000..7cfd57e56c4bf0126decf3d445dfe0064ecfc118 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.json @@ -0,0 +1,12 @@ +{ + "arguments": { + "argument_name": { + "name": "argument_name", + "is_required": true, + "is_array": false, + "description": "", + "default": null + } + }, + "options": [] +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.md new file mode 100644 index 0000000000000000000000000000000000000000..923191cdcf9f2063ab541df07eb82ae3a30c2961 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.md @@ -0,0 +1,9 @@ +### Arguments: + +**argument_name:** + +* Name: argument_name +* Is required: yes +* Is array: no +* Description: +* Default: `NULL` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.txt new file mode 100644 index 0000000000000000000000000000000000000000..73b0f308a90ede39f56054d2fdba704b44408002 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.txt @@ -0,0 +1,2 @@ +Arguments: + argument_name diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..102efc14863814b22cf04e8f96d176f65917081b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.json new file mode 100644 index 0000000000000000000000000000000000000000..3b3cf73c5941d1993513c7e6e3a2e8b30e8d2c0b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.json @@ -0,0 +1,14 @@ +{ + "arguments": [], + "options": { + "option_name": { + "name": "--option_name", + "shortcut": "-o", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "", + "default": false + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.md new file mode 100644 index 0000000000000000000000000000000000000000..40fd7b0a973cbc4c335a82e2e67bd53fb6f16c7d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.md @@ -0,0 +1,11 @@ +### Options: + +**option_name:** + +* Name: `--option_name` +* Shortcut: `-o` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: +* Default: `false` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.txt new file mode 100644 index 0000000000000000000000000000000000000000..c02766fd3c113746eb5319be9a974487d49836a5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.txt @@ -0,0 +1,2 @@ +Options: + -o, --option_name diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.xml new file mode 100644 index 0000000000000000000000000000000000000000..bc95151548ada83adce8574873dae11b2d6595ea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.json new file mode 100644 index 0000000000000000000000000000000000000000..d4a51e82eb4c89f96e816b973d9e456e6195fa9d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.json @@ -0,0 +1,22 @@ +{ + "arguments": { + "argument_name": { + "name": "argument_name", + "is_required": true, + "is_array": false, + "description": "", + "default": null + } + }, + "options": { + "option_name": { + "name": "--option_name", + "shortcut": "-o", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "", + "default": false + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.md new file mode 100644 index 0000000000000000000000000000000000000000..a31feea477cd940e03f261412b744ab8b6f482a0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.md @@ -0,0 +1,21 @@ +### Arguments: + +**argument_name:** + +* Name: argument_name +* Is required: yes +* Is array: no +* Description: +* Default: `NULL` + +### Options: + +**option_name:** + +* Name: `--option_name` +* Shortcut: `-o` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: +* Default: `false` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.txt new file mode 100644 index 0000000000000000000000000000000000000000..63aa81d2d1643e38886d76b071e29c53d11e74c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.txt @@ -0,0 +1,5 @@ +Arguments: + argument_name + +Options: + -o, --option_name diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.xml new file mode 100644 index 0000000000000000000000000000000000000000..cffceecef14c78059885838c336b3deebac5b6ac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_1.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_1.json new file mode 100644 index 0000000000000000000000000000000000000000..f86bf9671ced3a7807b24745b9212187bf6f54d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_1.json @@ -0,0 +1,9 @@ +{ + "name": "--option_name", + "shortcut": "-o", + "accept_value": false, + "is_value_required": false, + "is_multiple": false, + "description": "", + "default": false +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_1.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_1.md new file mode 100644 index 0000000000000000000000000000000000000000..6f9e9a7e074c6851b07a36eb5b63a4773c6e772e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_1.md @@ -0,0 +1,9 @@ +**option_name:** + +* Name: `--option_name` +* Shortcut: `-o` +* Accept value: no +* Is value required: no +* Is multiple: no +* Description: +* Default: `false` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_1.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..3a5e4eede487b1803bba97e66dd42ff7928abd5d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_1.txt @@ -0,0 +1 @@ + -o, --option_name diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_1.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..8a64ea65296e650dbeb1b83314a89b8d4eaaecc9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_1.xml @@ -0,0 +1,4 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_2.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_2.json new file mode 100644 index 0000000000000000000000000000000000000000..32dbab21aea8628b69661821c64334d280a235b6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_2.json @@ -0,0 +1,9 @@ +{ + "name": "--option_name", + "shortcut": "-o", + "accept_value": true, + "is_value_required": false, + "is_multiple": false, + "description": "option description", + "default": "default_value" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_2.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_2.md new file mode 100644 index 0000000000000000000000000000000000000000..634ac0b03c02cace16f0fe57e9693e7ab06455e3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_2.md @@ -0,0 +1,9 @@ +**option_name:** + +* Name: `--option_name` +* Shortcut: `-o` +* Accept value: yes +* Is value required: no +* Is multiple: no +* Description: option description +* Default: `'default_value'` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_2.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_2.txt new file mode 100644 index 0000000000000000000000000000000000000000..1009eff162e6b6fe0e26c0db1862de5699c03112 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_2.txt @@ -0,0 +1 @@ + -o, --option_name[=OPTION_NAME] option description [default: "default_value"] diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_2.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..4afac5b04e10d0aac26951cb3a09a8f38b613971 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_2.xml @@ -0,0 +1,7 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_3.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_3.json new file mode 100644 index 0000000000000000000000000000000000000000..6d55a6efeb46b567c2d231f75ae6d08fcefe59c0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_3.json @@ -0,0 +1,9 @@ +{ + "name": "--option_name", + "shortcut": "-o", + "accept_value": true, + "is_value_required": true, + "is_multiple": false, + "description": "option description", + "default": null +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_3.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_3.md new file mode 100644 index 0000000000000000000000000000000000000000..34282896ba39a7d4aa6c9a4f284ce4958391a806 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_3.md @@ -0,0 +1,9 @@ +**option_name:** + +* Name: `--option_name` +* Shortcut: `-o` +* Accept value: yes +* Is value required: yes +* Is multiple: no +* Description: option description +* Default: `NULL` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_3.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_3.txt new file mode 100644 index 0000000000000000000000000000000000000000..947bb6527bb9b43b60b82facd13c70cf7f2a22dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_3.txt @@ -0,0 +1 @@ + -o, --option_name=OPTION_NAME option description diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_3.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_3.xml new file mode 100644 index 0000000000000000000000000000000000000000..dcc0631cf4e6f665776e5692473d38e1d75f08d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_3.xml @@ -0,0 +1,5 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_4.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_4.json new file mode 100644 index 0000000000000000000000000000000000000000..788a8ed43508722108c3ca04b746ffa8b0b9a2b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_4.json @@ -0,0 +1,9 @@ +{ + "name": "--option_name", + "shortcut": "-o", + "accept_value": true, + "is_value_required": false, + "is_multiple": true, + "description": "option description", + "default": [] +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_4.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_4.md new file mode 100644 index 0000000000000000000000000000000000000000..8ffba56e7326501027d25be30c9b7ccfebe988be --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_4.md @@ -0,0 +1,9 @@ +**option_name:** + +* Name: `--option_name` +* Shortcut: `-o` +* Accept value: yes +* Is value required: no +* Is multiple: yes +* Description: option description +* Default: `array ()` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_4.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_4.txt new file mode 100644 index 0000000000000000000000000000000000000000..27edf77b4b81a1f968b1d5bc8ba0aa4881a4fc52 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_4.txt @@ -0,0 +1 @@ + -o, --option_name[=OPTION_NAME] option description (multiple values allowed) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_4.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_4.xml new file mode 100644 index 0000000000000000000000000000000000000000..5e2418b14ade3658493f5bfd10c8038d6c3f6686 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_4.xml @@ -0,0 +1,5 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_5.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_5.json new file mode 100644 index 0000000000000000000000000000000000000000..9f34d8321db22a0acbf26e08d3fd732375142bf4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_5.json @@ -0,0 +1,9 @@ +{ + "name": "--option_name", + "shortcut": "-o", + "accept_value": true, + "is_value_required": true, + "is_multiple": false, + "description": "multiline option description", + "default": null +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_5.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_5.md new file mode 100644 index 0000000000000000000000000000000000000000..82f51cad30ddfa024a7c500ce7ae610ab94a7e48 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_5.md @@ -0,0 +1,10 @@ +**option_name:** + +* Name: `--option_name` +* Shortcut: `-o` +* Accept value: yes +* Is value required: yes +* Is multiple: no +* Description: multiline + option description +* Default: `NULL` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_5.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_5.txt new file mode 100644 index 0000000000000000000000000000000000000000..9563b4cab142c598994a8ec08b9e59170f885c7d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_5.txt @@ -0,0 +1,2 @@ + -o, --option_name=OPTION_NAME multiline + option description diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_5.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_5.xml new file mode 100644 index 0000000000000000000000000000000000000000..90040ccd029873ecfed7e6d7b03483aa40707ba3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_5.xml @@ -0,0 +1,6 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_6.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_6.json new file mode 100644 index 0000000000000000000000000000000000000000..0638de03e0b1f9bcc1e06c9493ec95dd2aad55f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_6.json @@ -0,0 +1,9 @@ +{ + "name": "--option_name", + "shortcut": "-o|-O", + "accept_value": true, + "is_value_required": true, + "is_multiple": false, + "description": "option with multiple shortcuts", + "default": null +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_6.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_6.md new file mode 100644 index 0000000000000000000000000000000000000000..ed1ea1c84bd5327ccd686c74b412128c5365ef64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_6.md @@ -0,0 +1,9 @@ +**option_name:** + +* Name: `--option_name` +* Shortcut: `-o|-O` +* Accept value: yes +* Is value required: yes +* Is multiple: no +* Description: option with multiple shortcuts +* Default: `NULL` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_6.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_6.txt new file mode 100644 index 0000000000000000000000000000000000000000..0e6c9759b57752b57216484d4231abbaeca62c0e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_6.txt @@ -0,0 +1 @@ + -o|O, --option_name=OPTION_NAME option with multiple shortcuts diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_6.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_6.xml new file mode 100644 index 0000000000000000000000000000000000000000..06126a2f570d3c2fa3a5a0954848d9b2343d173d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_6.xml @@ -0,0 +1,5 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.json new file mode 100644 index 0000000000000000000000000000000000000000..df328bf824e7053d0b2adcf511ee8039d723fb39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.json @@ -0,0 +1,9 @@ +{ + "name": "--option_name", + "shortcut": "-o", + "accept_value": true, + "is_value_required": true, + "is_multiple": false, + "description": "option description", + "default": "style" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.md new file mode 100644 index 0000000000000000000000000000000000000000..3f6dd2369a7c263fa68dc813a466995ef3374f49 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.md @@ -0,0 +1,9 @@ +**option_name:** + +* Name: `--option_name` +* Shortcut: `-o` +* Accept value: yes +* Is value required: yes +* Is multiple: no +* Description: option description +* Default: `'style'` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.txt new file mode 100644 index 0000000000000000000000000000000000000000..880a53518e214177905217d268ae687c26681862 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.txt @@ -0,0 +1 @@ + -o, --option_name=OPTION_NAME option description [default: "\style\"] diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.xml new file mode 100644 index 0000000000000000000000000000000000000000..764b9e6521596a471e7b23dca29e6142130c310c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.xml @@ -0,0 +1,7 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.json b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.json new file mode 100644 index 0000000000000000000000000000000000000000..b1754550b52dee79e17e21775d73456523840cd4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.json @@ -0,0 +1,12 @@ +{ + "name": "--option_name", + "shortcut": "-o", + "accept_value": true, + "is_value_required": true, + "is_multiple": true, + "description": "option description", + "default": [ + "Hello", + "world" + ] +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.md b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.md new file mode 100644 index 0000000000000000000000000000000000000000..24e58b530258ddb31e68bc23b0b61d9f715dcf9d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.md @@ -0,0 +1,9 @@ +**option_name:** + +* Name: `--option_name` +* Shortcut: `-o` +* Accept value: yes +* Is value required: yes +* Is multiple: yes +* Description: option description +* Default: `array ( 0 => 'Hello', 1 => 'world',)` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.txt b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.txt new file mode 100644 index 0000000000000000000000000000000000000000..265c18c5a45d2a3532d3d29d369272dd809ef070 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.txt @@ -0,0 +1 @@ + -o, --option_name=OPTION_NAME option description [default: ["\Hello\","\world\"]] (multiple values allowed) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.xml b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.xml new file mode 100644 index 0000000000000000000000000000000000000000..09dc865830e931771a9fc13bebb614a9910d0b13 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.xml @@ -0,0 +1,8 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6cd7c82b4a20a95ac2756f8e7cad2d64e87516fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Formatter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Formatter\OutputFormatterStyleStack; +use Symfony\Component\Console\Formatter\OutputFormatterStyle; + +class OutputFormatterStyleStackTest extends TestCase +{ + public function testPush() + { + $stack = new OutputFormatterStyleStack(); + $stack->push($s1 = new OutputFormatterStyle('white', 'black')); + $stack->push($s2 = new OutputFormatterStyle('yellow', 'blue')); + + $this->assertEquals($s2, $stack->getCurrent()); + + $stack->push($s3 = new OutputFormatterStyle('green', 'red')); + + $this->assertEquals($s3, $stack->getCurrent()); + } + + public function testPop() + { + $stack = new OutputFormatterStyleStack(); + $stack->push($s1 = new OutputFormatterStyle('white', 'black')); + $stack->push($s2 = new OutputFormatterStyle('yellow', 'blue')); + + $this->assertEquals($s2, $stack->pop()); + $this->assertEquals($s1, $stack->pop()); + } + + public function testPopEmpty() + { + $stack = new OutputFormatterStyleStack(); + $style = new OutputFormatterStyle(); + + $this->assertEquals($style, $stack->pop()); + } + + public function testPopNotLast() + { + $stack = new OutputFormatterStyleStack(); + $stack->push($s1 = new OutputFormatterStyle('white', 'black')); + $stack->push($s2 = new OutputFormatterStyle('yellow', 'blue')); + $stack->push($s3 = new OutputFormatterStyle('green', 'red')); + + $this->assertEquals($s2, $stack->pop($s2)); + $this->assertEquals($s1, $stack->pop()); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testInvalidPop() + { + $stack = new OutputFormatterStyleStack(); + $stack->push(new OutputFormatterStyle('white', 'black')); + $stack->pop(new OutputFormatterStyle('yellow', 'blue')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ddf77902c90e985d9d33bea56fb432be6575b60d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Formatter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Formatter\OutputFormatterStyle; + +class OutputFormatterStyleTest extends TestCase +{ + public function testConstructor() + { + $style = new OutputFormatterStyle('green', 'black', array('bold', 'underscore')); + $this->assertEquals("\033[32;40;1;4mfoo\033[39;49;22;24m", $style->apply('foo')); + + $style = new OutputFormatterStyle('red', null, array('blink')); + $this->assertEquals("\033[31;5mfoo\033[39;25m", $style->apply('foo')); + + $style = new OutputFormatterStyle(null, 'white'); + $this->assertEquals("\033[47mfoo\033[49m", $style->apply('foo')); + } + + public function testForeground() + { + $style = new OutputFormatterStyle(); + + $style->setForeground('black'); + $this->assertEquals("\033[30mfoo\033[39m", $style->apply('foo')); + + $style->setForeground('blue'); + $this->assertEquals("\033[34mfoo\033[39m", $style->apply('foo')); + + $style->setForeground('default'); + $this->assertEquals("\033[39mfoo\033[39m", $style->apply('foo')); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException'); + $style->setForeground('undefined-color'); + } + + public function testBackground() + { + $style = new OutputFormatterStyle(); + + $style->setBackground('black'); + $this->assertEquals("\033[40mfoo\033[49m", $style->apply('foo')); + + $style->setBackground('yellow'); + $this->assertEquals("\033[43mfoo\033[49m", $style->apply('foo')); + + $style->setBackground('default'); + $this->assertEquals("\033[49mfoo\033[49m", $style->apply('foo')); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException'); + $style->setBackground('undefined-color'); + } + + public function testOptions() + { + $style = new OutputFormatterStyle(); + + $style->setOptions(array('reverse', 'conceal')); + $this->assertEquals("\033[7;8mfoo\033[27;28m", $style->apply('foo')); + + $style->setOption('bold'); + $this->assertEquals("\033[7;8;1mfoo\033[27;28;22m", $style->apply('foo')); + + $style->unsetOption('reverse'); + $this->assertEquals("\033[8;1mfoo\033[28;22m", $style->apply('foo')); + + $style->setOption('bold'); + $this->assertEquals("\033[8;1mfoo\033[28;22m", $style->apply('foo')); + + $style->setOptions(array('bold')); + $this->assertEquals("\033[1mfoo\033[22m", $style->apply('foo')); + + try { + $style->setOption('foo'); + $this->fail('->setOption() throws an \InvalidArgumentException when the option does not exist in the available options'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->setOption() throws an \InvalidArgumentException when the option does not exist in the available options'); + $this->assertContains('Invalid option specified: "foo"', $e->getMessage(), '->setOption() throws an \InvalidArgumentException when the option does not exist in the available options'); + } + + try { + $style->unsetOption('foo'); + $this->fail('->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options'); + $this->assertContains('Invalid option specified: "foo"', $e->getMessage(), '->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options'); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4b11028be5e35e6203e34db37725103e4021f055 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php @@ -0,0 +1,341 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Formatter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Formatter\OutputFormatterStyle; + +class OutputFormatterTest extends TestCase +{ + public function testEmptyTag() + { + $formatter = new OutputFormatter(true); + $this->assertEquals('foo<>bar', $formatter->format('foo<>bar')); + } + + public function testLGCharEscaping() + { + $formatter = new OutputFormatter(true); + + $this->assertEquals('fooformat('foo\\assertEquals('some info', $formatter->format('\\some info\\')); + $this->assertEquals('\\some info\\', OutputFormatter::escape('some info')); + + $this->assertEquals( + "\033[33mSymfony\\Component\\Console does work very well!\033[39m", + $formatter->format('Symfony\Component\Console does work very well!') + ); + } + + public function testBundledStyles() + { + $formatter = new OutputFormatter(true); + + $this->assertTrue($formatter->hasStyle('error')); + $this->assertTrue($formatter->hasStyle('info')); + $this->assertTrue($formatter->hasStyle('comment')); + $this->assertTrue($formatter->hasStyle('question')); + + $this->assertEquals( + "\033[37;41msome error\033[39;49m", + $formatter->format('some error') + ); + $this->assertEquals( + "\033[32msome info\033[39m", + $formatter->format('some info') + ); + $this->assertEquals( + "\033[33msome comment\033[39m", + $formatter->format('some comment') + ); + $this->assertEquals( + "\033[30;46msome question\033[39;49m", + $formatter->format('some question') + ); + } + + public function testNestedStyles() + { + $formatter = new OutputFormatter(true); + + $this->assertEquals( + "\033[37;41msome \033[39;49m\033[32msome info\033[39m\033[37;41m error\033[39;49m", + $formatter->format('some some info error') + ); + } + + public function testAdjacentStyles() + { + $formatter = new OutputFormatter(true); + + $this->assertEquals( + "\033[37;41msome error\033[39;49m\033[32msome info\033[39m", + $formatter->format('some errorsome info') + ); + } + + public function testStyleMatchingNotGreedy() + { + $formatter = new OutputFormatter(true); + + $this->assertEquals( + "(\033[32m>=2.0,<2.3\033[39m)", + $formatter->format('(>=2.0,<2.3)') + ); + } + + public function testStyleEscaping() + { + $formatter = new OutputFormatter(true); + + $this->assertEquals( + "(\033[32mz>=2.0,<<format('('.$formatter->escape('z>=2.0,<\\<)') + ); + + $this->assertEquals( + "\033[32msome error\033[39m", + $formatter->format(''.$formatter->escape('some error').'') + ); + } + + public function testDeepNestedStyles() + { + $formatter = new OutputFormatter(true); + + $this->assertEquals( + "\033[37;41merror\033[39;49m\033[32minfo\033[39m\033[33mcomment\033[39m\033[37;41merror\033[39;49m", + $formatter->format('errorinfocommenterror') + ); + } + + public function testNewStyle() + { + $formatter = new OutputFormatter(true); + + $style = new OutputFormatterStyle('blue', 'white'); + $formatter->setStyle('test', $style); + + $this->assertEquals($style, $formatter->getStyle('test')); + $this->assertNotEquals($style, $formatter->getStyle('info')); + + $style = new OutputFormatterStyle('blue', 'white'); + $formatter->setStyle('b', $style); + + $this->assertEquals("\033[34;47msome \033[39;49m\033[34;47mcustom\033[39;49m\033[34;47m msg\033[39;49m", $formatter->format('some custom msg')); + } + + public function testRedefineStyle() + { + $formatter = new OutputFormatter(true); + + $style = new OutputFormatterStyle('blue', 'white'); + $formatter->setStyle('info', $style); + + $this->assertEquals("\033[34;47msome custom msg\033[39;49m", $formatter->format('some custom msg')); + } + + public function testInlineStyle() + { + $formatter = new OutputFormatter(true); + + $this->assertEquals("\033[34;41msome text\033[39;49m", $formatter->format('some text')); + $this->assertEquals("\033[34;41msome text\033[39;49m", $formatter->format('some text')); + } + + /** + * @param string $tag + * @param string|null $expected + * @param string|null $input + * + * @dataProvider provideInlineStyleOptionsCases + */ + public function testInlineStyleOptions($tag, $expected = null, $input = null) + { + $styleString = substr($tag, 1, -1); + $formatter = new OutputFormatter(true); + $method = new \ReflectionMethod($formatter, 'createStyleFromString'); + $method->setAccessible(true); + $result = $method->invoke($formatter, $styleString); + if (null === $expected) { + $this->assertFalse($result); + $expected = $tag.$input.''; + $this->assertSame($expected, $formatter->format($expected)); + } else { + /* @var OutputFormatterStyle $result */ + $this->assertInstanceOf(OutputFormatterStyle::class, $result); + $this->assertSame($expected, $formatter->format($tag.$input.'')); + $this->assertSame($expected, $formatter->format($tag.$input.'')); + } + } + + public function provideInlineStyleOptionsCases() + { + return array( + array(''), + array(''), + array('', "\033[32m[test]\033[39m", '[test]'), + array('', "\033[32;44ma\033[39;49m", 'a'), + array('', "\033[32;1mb\033[39;22m", 'b'), + array('', "\033[32;7m\033[39;27m", ''), + array('', "\033[32;1;4mz\033[39;22;24m", 'z'), + array('', "\033[32;1;4;7md\033[39;22;24;27m", 'd'), + ); + } + + /** + * @group legacy + * @dataProvider provideInlineStyleTagsWithUnknownOptions + * @expectedDeprecation Unknown style options are deprecated since version 3.2 and will be removed in 4.0. Exception "Invalid option specified: "%s". Expected one of (bold, underscore, blink, reverse, conceal)". + */ + public function testInlineStyleOptionsUnknownAreDeprecated($tag, $option) + { + $formatter = new OutputFormatter(true); + $formatter->format($tag); + } + + public function provideInlineStyleTagsWithUnknownOptions() + { + return array( + array('', 'abc'), + array('', 'abc'), + array('', 'xyz'), + array('', 'efg'), + ); + } + + public function testNonStyleTag() + { + $formatter = new OutputFormatter(true); + + $this->assertEquals("\033[32msome \033[39m\033[32m\033[39m\033[32m \033[39m\033[32m\033[39m\033[32m styled \033[39m\033[32m

    \033[39m\033[32msingle-char tag\033[39m\033[32m

    \033[39m", $formatter->format('some styled

    single-char tag

    ')); + } + + public function testFormatLongString() + { + $formatter = new OutputFormatter(true); + $long = str_repeat('\\', 14000); + $this->assertEquals("\033[37;41msome error\033[39;49m".$long, $formatter->format('some error'.$long)); + } + + public function testFormatToStringObject() + { + $formatter = new OutputFormatter(false); + $this->assertEquals( + 'some info', $formatter->format(new TableCell()) + ); + } + + public function testNotDecoratedFormatter() + { + $formatter = new OutputFormatter(false); + + $this->assertTrue($formatter->hasStyle('error')); + $this->assertTrue($formatter->hasStyle('info')); + $this->assertTrue($formatter->hasStyle('comment')); + $this->assertTrue($formatter->hasStyle('question')); + + $this->assertEquals( + 'some error', $formatter->format('some error') + ); + $this->assertEquals( + 'some info', $formatter->format('some info') + ); + $this->assertEquals( + 'some comment', $formatter->format('some comment') + ); + $this->assertEquals( + 'some question', $formatter->format('some question') + ); + $this->assertEquals( + 'some text with inline style', $formatter->format('some text with inline style') + ); + + $formatter->setDecorated(true); + + $this->assertEquals( + "\033[37;41msome error\033[39;49m", $formatter->format('some error') + ); + $this->assertEquals( + "\033[32msome info\033[39m", $formatter->format('some info') + ); + $this->assertEquals( + "\033[33msome comment\033[39m", $formatter->format('some comment') + ); + $this->assertEquals( + "\033[30;46msome question\033[39;49m", $formatter->format('some question') + ); + $this->assertEquals( + "\033[31msome text with inline style\033[39m", $formatter->format('some text with inline style') + ); + } + + public function testContentWithLineBreaks() + { + $formatter = new OutputFormatter(true); + + $this->assertEquals(<<format(<<<'EOF' + +some text +EOF + )); + + $this->assertEquals(<<format(<<<'EOF' +some text + +EOF + )); + + $this->assertEquals(<<format(<<<'EOF' + +some text + +EOF + )); + + $this->assertEquals(<<format(<<<'EOF' + +some text +more text + +EOF + )); + } +} + +class TableCell +{ + public function __toString() + { + return 'some info'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/AbstractQuestionHelperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/AbstractQuestionHelperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..56dd65f6b456f9f5bb4e518435d0a7d37389087d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/AbstractQuestionHelperTest.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Input\StreamableInputInterface; + +abstract class AbstractQuestionHelperTest extends TestCase +{ + protected function createStreamableInputInterfaceMock($stream = null, $interactive = true) + { + $mock = $this->getMockBuilder(StreamableInputInterface::class)->getMock(); + $mock->expects($this->any()) + ->method('isInteractive') + ->will($this->returnValue($interactive)); + + if ($stream) { + $mock->expects($this->any()) + ->method('getStream') + ->willReturn($stream); + } + + return $mock; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f5d891a1a3acc4961bfd832afa12687143472c9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Helper\FormatterHelper; + +class FormatterHelperTest extends TestCase +{ + public function testFormatSection() + { + $formatter = new FormatterHelper(); + + $this->assertEquals( + '[cli] Some text to display', + $formatter->formatSection('cli', 'Some text to display'), + '::formatSection() formats a message in a section' + ); + } + + public function testFormatBlock() + { + $formatter = new FormatterHelper(); + + $this->assertEquals( + ' Some text to display ', + $formatter->formatBlock('Some text to display', 'error'), + '::formatBlock() formats a message in a block' + ); + + $this->assertEquals( + ' Some text to display '."\n". + ' foo bar ', + $formatter->formatBlock(array('Some text to display', 'foo bar'), 'error'), + '::formatBlock() formats a message in a block' + ); + + $this->assertEquals( + ' '."\n". + ' Some text to display '."\n". + ' ', + $formatter->formatBlock('Some text to display', 'error', true), + '::formatBlock() formats a message in a block' + ); + } + + public function testFormatBlockWithDiacriticLetters() + { + $formatter = new FormatterHelper(); + + $this->assertEquals( + ' '."\n". + ' Du texte à afficher '."\n". + ' ', + $formatter->formatBlock('Du texte à afficher', 'error', true), + '::formatBlock() formats a message in a block' + ); + } + + public function testFormatBlockWithDoubleWidthDiacriticLetters() + { + $formatter = new FormatterHelper(); + $this->assertEquals( + ' '."\n". + ' 表示ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆ '."\n". + ' ', + $formatter->formatBlock('表示ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆ', 'error', true), + '::formatBlock() formats a message in a block' + ); + } + + public function testFormatBlockLGEscaping() + { + $formatter = new FormatterHelper(); + + $this->assertEquals( + ' '."\n". + ' \some info\ '."\n". + ' ', + $formatter->formatBlock('some info', 'error', true), + '::formatBlock() escapes \'<\' chars' + ); + } + + public function testTruncatingWithShorterLengthThanMessageWithSuffix() + { + $formatter = new FormatterHelper(); + $message = 'testing truncate'; + + $this->assertSame('test...', $formatter->truncate($message, 4)); + $this->assertSame('testing truncat...', $formatter->truncate($message, 15)); + $this->assertSame('testing truncate...', $formatter->truncate($message, 16)); + $this->assertSame('zażółć gęślÄ…...', $formatter->truncate('zażółć gęślÄ… jaźń', 12)); + } + + public function testTruncatingMessageWithCustomSuffix() + { + $formatter = new FormatterHelper(); + $message = 'testing truncate'; + + $this->assertSame('test!', $formatter->truncate($message, 4, '!')); + } + + public function testTruncatingWithLongerLengthThanMessageWithSuffix() + { + $formatter = new FormatterHelper(); + $message = 'test'; + + $this->assertSame($message, $formatter->truncate($message, 10)); + } + + public function testTruncatingWithNegativeLength() + { + $formatter = new FormatterHelper(); + $message = 'testing truncate'; + + $this->assertSame('testing tru...', $formatter->truncate($message, -5)); + $this->assertSame('...', $formatter->truncate($message, -100)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php new file mode 100644 index 0000000000000000000000000000000000000000..aceef7041dc572a6c4454337215ff0f650744818 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Command\Command; + +class HelperSetTest extends TestCase +{ + public function testConstructor() + { + $mock_helper = $this->getGenericMockHelper('fake_helper'); + $helperset = new HelperSet(array('fake_helper_alias' => $mock_helper)); + + $this->assertEquals($mock_helper, $helperset->get('fake_helper_alias'), '__construct sets given helper to helpers'); + $this->assertTrue($helperset->has('fake_helper_alias'), '__construct sets helper alias for given helper'); + } + + public function testSet() + { + $helperset = new HelperSet(); + $helperset->set($this->getGenericMockHelper('fake_helper', $helperset)); + $this->assertTrue($helperset->has('fake_helper'), '->set() adds helper to helpers'); + + $helperset = new HelperSet(); + $helperset->set($this->getGenericMockHelper('fake_helper_01', $helperset)); + $helperset->set($this->getGenericMockHelper('fake_helper_02', $helperset)); + $this->assertTrue($helperset->has('fake_helper_01'), '->set() will set multiple helpers on consecutive calls'); + $this->assertTrue($helperset->has('fake_helper_02'), '->set() will set multiple helpers on consecutive calls'); + + $helperset = new HelperSet(); + $helperset->set($this->getGenericMockHelper('fake_helper', $helperset), 'fake_helper_alias'); + $this->assertTrue($helperset->has('fake_helper'), '->set() adds helper alias when set'); + $this->assertTrue($helperset->has('fake_helper_alias'), '->set() adds helper alias when set'); + } + + public function testHas() + { + $helperset = new HelperSet(array('fake_helper_alias' => $this->getGenericMockHelper('fake_helper'))); + $this->assertTrue($helperset->has('fake_helper'), '->has() finds set helper'); + $this->assertTrue($helperset->has('fake_helper_alias'), '->has() finds set helper by alias'); + } + + public function testGet() + { + $helper_01 = $this->getGenericMockHelper('fake_helper_01'); + $helper_02 = $this->getGenericMockHelper('fake_helper_02'); + $helperset = new HelperSet(array('fake_helper_01_alias' => $helper_01, 'fake_helper_02_alias' => $helper_02)); + $this->assertEquals($helper_01, $helperset->get('fake_helper_01'), '->get() returns correct helper by name'); + $this->assertEquals($helper_01, $helperset->get('fake_helper_01_alias'), '->get() returns correct helper by alias'); + $this->assertEquals($helper_02, $helperset->get('fake_helper_02'), '->get() returns correct helper by name'); + $this->assertEquals($helper_02, $helperset->get('fake_helper_02_alias'), '->get() returns correct helper by alias'); + + $helperset = new HelperSet(); + try { + $helperset->get('foo'); + $this->fail('->get() throws InvalidArgumentException when helper not found'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->get() throws InvalidArgumentException when helper not found'); + $this->assertInstanceOf('Symfony\Component\Console\Exception\ExceptionInterface', $e, '->get() throws domain specific exception when helper not found'); + $this->assertContains('The helper "foo" is not defined.', $e->getMessage(), '->get() throws InvalidArgumentException when helper not found'); + } + } + + public function testSetCommand() + { + $cmd_01 = new Command('foo'); + $cmd_02 = new Command('bar'); + + $helperset = new HelperSet(); + $helperset->setCommand($cmd_01); + $this->assertEquals($cmd_01, $helperset->getCommand(), '->setCommand() stores given command'); + + $helperset = new HelperSet(); + $helperset->setCommand($cmd_01); + $helperset->setCommand($cmd_02); + $this->assertEquals($cmd_02, $helperset->getCommand(), '->setCommand() overwrites stored command with consecutive calls'); + } + + public function testGetCommand() + { + $cmd = new Command('foo'); + $helperset = new HelperSet(); + $helperset->setCommand($cmd); + $this->assertEquals($cmd, $helperset->getCommand(), '->getCommand() retrieves stored command'); + } + + public function testIteration() + { + $helperset = new HelperSet(); + $helperset->set($this->getGenericMockHelper('fake_helper_01', $helperset)); + $helperset->set($this->getGenericMockHelper('fake_helper_02', $helperset)); + + $helpers = array('fake_helper_01', 'fake_helper_02'); + $i = 0; + + foreach ($helperset as $helper) { + $this->assertEquals($helpers[$i++], $helper->getName()); + } + } + + private function getGenericMockHelper($name, HelperSet $helperset = null) + { + $mock_helper = $this->getMockBuilder('\Symfony\Component\Console\Helper\HelperInterface')->getMock(); + $mock_helper->expects($this->any()) + ->method('getName') + ->will($this->returnValue($name)); + + if ($helperset) { + $mock_helper->expects($this->any()) + ->method('setHelperSet') + ->with($this->equalTo($helperset)); + } + + return $mock_helper; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/HelperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/HelperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1847582444d1f0ba7195484b399068f1fa5aae85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/HelperTest.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Helper\Helper; + +class HelperTest extends TestCase +{ + public function formatTimeProvider() + { + return array( + array(0, '< 1 sec'), + array(1, '1 sec'), + array(2, '2 secs'), + array(59, '59 secs'), + array(60, '1 min'), + array(61, '1 min'), + array(119, '1 min'), + array(120, '2 mins'), + array(121, '2 mins'), + array(3599, '59 mins'), + array(3600, '1 hr'), + array(7199, '1 hr'), + array(7200, '2 hrs'), + array(7201, '2 hrs'), + array(86399, '23 hrs'), + array(86400, '1 day'), + array(86401, '1 day'), + array(172799, '1 day'), + array(172800, '2 days'), + array(172801, '2 days'), + ); + } + + /** + * @dataProvider formatTimeProvider + * + * @param int $secs + * @param string $expectedFormat + */ + public function testFormatTime($secs, $expectedFormat) + { + $this->assertEquals($expectedFormat, Helper::formatTime($secs)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8069bcccc96abdea17091cbe90deed783d9b08b3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php @@ -0,0 +1,119 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Helper\DebugFormatterHelper; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Output\StreamOutput; +use Symfony\Component\Console\Helper\ProcessHelper; +use Symfony\Component\Process\Process; +use Symfony\Component\Process\ProcessBuilder; + +class ProcessHelperTest extends TestCase +{ + /** + * @dataProvider provideCommandsAndOutput + */ + public function testVariousProcessRuns($expected, $cmd, $verbosity, $error) + { + $helper = new ProcessHelper(); + $helper->setHelperSet(new HelperSet(array(new DebugFormatterHelper()))); + $output = $this->getOutputStream($verbosity); + $helper->run($output, $cmd, $error); + $this->assertEquals($expected, $this->getOutput($output)); + } + + public function testPassedCallbackIsExecuted() + { + $helper = new ProcessHelper(); + $helper->setHelperSet(new HelperSet(array(new DebugFormatterHelper()))); + $output = $this->getOutputStream(StreamOutput::VERBOSITY_NORMAL); + + $executed = false; + $callback = function () use (&$executed) { $executed = true; }; + + $helper->run($output, 'php -r "echo 42;"', null, $callback); + $this->assertTrue($executed); + } + + public function provideCommandsAndOutput() + { + $successOutputVerbose = <<<'EOT' + RUN php -r "echo 42;" + RES Command ran successfully + +EOT; + $successOutputDebug = <<<'EOT' + RUN php -r "echo 42;" + OUT 42 + RES Command ran successfully + +EOT; + $successOutputDebugWithTags = <<<'EOT' + RUN php -r "echo '42';" + OUT 42 + RES Command ran successfully + +EOT; + $successOutputProcessDebug = <<<'EOT' + RUN 'php' '-r' 'echo 42;' + OUT 42 + RES Command ran successfully + +EOT; + $syntaxErrorOutputVerbose = <<<'EOT' + RUN php -r "fwrite(STDERR, 'error message');usleep(50000);fwrite(STDOUT, 'out message');exit(252);" + RES 252 Command did not run successfully + +EOT; + $syntaxErrorOutputDebug = <<<'EOT' + RUN php -r "fwrite(STDERR, 'error message');usleep(500000);fwrite(STDOUT, 'out message');exit(252);" + ERR error message + OUT out message + RES 252 Command did not run successfully + +EOT; + + $errorMessage = 'An error occurred'; + $args = new ProcessBuilder(array('php', '-r', 'echo 42;')); + $args = $args->getProcess()->getCommandLine(); + $successOutputProcessDebug = str_replace("'php' '-r' 'echo 42;'", $args, $successOutputProcessDebug); + + return array( + array('', 'php -r "echo 42;"', StreamOutput::VERBOSITY_VERBOSE, null), + array($successOutputVerbose, 'php -r "echo 42;"', StreamOutput::VERBOSITY_VERY_VERBOSE, null), + array($successOutputDebug, 'php -r "echo 42;"', StreamOutput::VERBOSITY_DEBUG, null), + array($successOutputDebugWithTags, 'php -r "echo \'42\';"', StreamOutput::VERBOSITY_DEBUG, null), + array('', 'php -r "syntax error"', StreamOutput::VERBOSITY_VERBOSE, null), + array($syntaxErrorOutputVerbose, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_VERY_VERBOSE, null), + array($syntaxErrorOutputDebug, 'php -r "fwrite(STDERR, \'error message\');usleep(500000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_DEBUG, null), + array($errorMessage.PHP_EOL, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_VERBOSE, $errorMessage), + array($syntaxErrorOutputVerbose.$errorMessage.PHP_EOL, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_VERY_VERBOSE, $errorMessage), + array($syntaxErrorOutputDebug.$errorMessage.PHP_EOL, 'php -r "fwrite(STDERR, \'error message\');usleep(500000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_DEBUG, $errorMessage), + array($successOutputProcessDebug, array('php', '-r', 'echo 42;'), StreamOutput::VERBOSITY_DEBUG, null), + array($successOutputDebug, new Process('php -r "echo 42;"'), StreamOutput::VERBOSITY_DEBUG, null), + ); + } + + private function getOutputStream($verbosity) + { + return new StreamOutput(fopen('php://memory', 'r+', false), $verbosity, false); + } + + private function getOutput(StreamOutput $output) + { + rewind($output->getStream()); + + return stream_get_contents($output->getStream()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php new file mode 100644 index 0000000000000000000000000000000000000000..64ad4338ad2a13a169a7dce57fb6e2f148f1b78f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php @@ -0,0 +1,757 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Helper\ProgressBar; +use Symfony\Component\Console\Helper\Helper; +use Symfony\Component\Console\Output\StreamOutput; + +/** + * @group time-sensitive + */ +class ProgressBarTest extends TestCase +{ + public function testMultipleStart() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(); + $bar->advance(); + $bar->start(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0 [>---------------------------]'. + $this->generateOutput(' 1 [->--------------------------]'). + $this->generateOutput(' 0 [>---------------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testAdvance() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0 [>---------------------------]'. + $this->generateOutput(' 1 [->--------------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testAdvanceWithStep() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(); + $bar->advance(5); + + rewind($output->getStream()); + $this->assertEquals( + ' 0 [>---------------------------]'. + $this->generateOutput(' 5 [----->----------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testAdvanceMultipleTimes() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(); + $bar->advance(3); + $bar->advance(2); + + rewind($output->getStream()); + $this->assertEquals( + ' 0 [>---------------------------]'. + $this->generateOutput(' 3 [--->------------------------]'). + $this->generateOutput(' 5 [----->----------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testAdvanceOverMax() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 10); + $bar->setProgress(9); + $bar->advance(); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + ' 9/10 [=========================>--] 90%'. + $this->generateOutput(' 10/10 [============================] 100%'). + $this->generateOutput(' 11/11 [============================] 100%'), + stream_get_contents($output->getStream()) + ); + } + + public function testRegress() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(); + $bar->advance(); + $bar->advance(); + $bar->advance(-1); + + rewind($output->getStream()); + $this->assertEquals( + ' 0 [>---------------------------]'. + $this->generateOutput(' 1 [->--------------------------]'). + $this->generateOutput(' 2 [-->-------------------------]'). + $this->generateOutput(' 1 [->--------------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testRegressWithStep() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(); + $bar->advance(4); + $bar->advance(4); + $bar->advance(-2); + + rewind($output->getStream()); + $this->assertEquals( + ' 0 [>---------------------------]'. + $this->generateOutput(' 4 [---->-----------------------]'). + $this->generateOutput(' 8 [-------->-------------------]'). + $this->generateOutput(' 6 [------>---------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testRegressMultipleTimes() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(); + $bar->advance(3); + $bar->advance(3); + $bar->advance(-1); + $bar->advance(-2); + + rewind($output->getStream()); + $this->assertEquals( + ' 0 [>---------------------------]'. + $this->generateOutput(' 3 [--->------------------------]'). + $this->generateOutput(' 6 [------>---------------------]'). + $this->generateOutput(' 5 [----->----------------------]'). + $this->generateOutput(' 3 [--->------------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testRegressBelowMin() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 10); + $bar->setProgress(1); + $bar->advance(-1); + $bar->advance(-1); + + rewind($output->getStream()); + $this->assertEquals( + ' 1/10 [==>-------------------------] 10%'. + $this->generateOutput(' 0/10 [>---------------------------] 0%'), + stream_get_contents($output->getStream()) + ); + } + + public function testFormat() + { + $expected = + ' 0/10 [>---------------------------] 0%'. + $this->generateOutput(' 10/10 [============================] 100%'). + $this->generateOutput(' 10/10 [============================] 100%') + ; + + // max in construct, no format + $bar = new ProgressBar($output = $this->getOutputStream(), 10); + $bar->start(); + $bar->advance(10); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals($expected, stream_get_contents($output->getStream())); + + // max in start, no format + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(10); + $bar->advance(10); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals($expected, stream_get_contents($output->getStream())); + + // max in construct, explicit format before + $bar = new ProgressBar($output = $this->getOutputStream(), 10); + $bar->setFormat('normal'); + $bar->start(); + $bar->advance(10); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals($expected, stream_get_contents($output->getStream())); + + // max in start, explicit format before + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->setFormat('normal'); + $bar->start(10); + $bar->advance(10); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals($expected, stream_get_contents($output->getStream())); + } + + public function testCustomizations() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 10); + $bar->setBarWidth(10); + $bar->setBarCharacter('_'); + $bar->setEmptyBarCharacter(' '); + $bar->setProgressCharacter('/'); + $bar->setFormat(' %current%/%max% [%bar%] %percent:3s%%'); + $bar->start(); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0/10 [/ ] 0%'. + $this->generateOutput(' 1/10 [_/ ] 10%'), + stream_get_contents($output->getStream()) + ); + } + + public function testDisplayWithoutStart() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 50); + $bar->display(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0/50 [>---------------------------] 0%', + stream_get_contents($output->getStream()) + ); + } + + public function testDisplayWithQuietVerbosity() + { + $bar = new ProgressBar($output = $this->getOutputStream(true, StreamOutput::VERBOSITY_QUIET), 50); + $bar->display(); + + rewind($output->getStream()); + $this->assertEquals( + '', + stream_get_contents($output->getStream()) + ); + } + + public function testFinishWithoutStart() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 50); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals( + ' 50/50 [============================] 100%', + stream_get_contents($output->getStream()) + ); + } + + public function testPercent() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 50); + $bar->start(); + $bar->display(); + $bar->advance(); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0/50 [>---------------------------] 0%'. + $this->generateOutput(' 0/50 [>---------------------------] 0%'). + $this->generateOutput(' 1/50 [>---------------------------] 2%'). + $this->generateOutput(' 2/50 [=>--------------------------] 4%'), + stream_get_contents($output->getStream()) + ); + } + + public function testOverwriteWithShorterLine() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 50); + $bar->setFormat(' %current%/%max% [%bar%] %percent:3s%%'); + $bar->start(); + $bar->display(); + $bar->advance(); + + // set shorter format + $bar->setFormat(' %current%/%max% [%bar%]'); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0/50 [>---------------------------] 0%'. + $this->generateOutput(' 0/50 [>---------------------------] 0%'). + $this->generateOutput(' 1/50 [>---------------------------] 2%'). + $this->generateOutput(' 2/50 [=>--------------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testStartWithMax() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->setFormat('%current%/%max% [%bar%]'); + $bar->start(50); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0/50 [>---------------------------]'. + $this->generateOutput(' 1/50 [>---------------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testSetCurrentProgress() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 50); + $bar->start(); + $bar->display(); + $bar->advance(); + $bar->setProgress(15); + $bar->setProgress(25); + + rewind($output->getStream()); + $this->assertEquals( + ' 0/50 [>---------------------------] 0%'. + $this->generateOutput(' 0/50 [>---------------------------] 0%'). + $this->generateOutput(' 1/50 [>---------------------------] 2%'). + $this->generateOutput(' 15/50 [========>-------------------] 30%'). + $this->generateOutput(' 25/50 [==============>-------------] 50%'), + stream_get_contents($output->getStream()) + ); + } + + public function testSetCurrentBeforeStarting() + { + $bar = new ProgressBar($this->getOutputStream()); + $bar->setProgress(15); + $this->assertNotNull($bar->getStartTime()); + } + + public function testRedrawFrequency() + { + $bar = $this->getMockBuilder('Symfony\Component\Console\Helper\ProgressBar')->setMethods(array('display'))->setConstructorArgs(array($this->getOutputStream(), 6))->getMock(); + $bar->expects($this->exactly(4))->method('display'); + + $bar->setRedrawFrequency(2); + $bar->start(); + $bar->setProgress(1); + $bar->advance(2); + $bar->advance(2); + $bar->advance(1); + } + + public function testRedrawFrequencyIsAtLeastOneIfZeroGiven() + { + $bar = $this->getMockBuilder('Symfony\Component\Console\Helper\ProgressBar')->setMethods(array('display'))->setConstructorArgs(array($this->getOutputStream()))->getMock(); + + $bar->expects($this->exactly(2))->method('display'); + $bar->setRedrawFrequency(0); + $bar->start(); + $bar->advance(); + } + + public function testRedrawFrequencyIsAtLeastOneIfSmallerOneGiven() + { + $bar = $this->getMockBuilder('Symfony\Component\Console\Helper\ProgressBar')->setMethods(array('display'))->setConstructorArgs(array($this->getOutputStream()))->getMock(); + + $bar->expects($this->exactly(2))->method('display'); + $bar->setRedrawFrequency(0.9); + $bar->start(); + $bar->advance(); + } + + public function testMultiByteSupport() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(); + $bar->setBarCharacter('â– '); + $bar->advance(3); + + rewind($output->getStream()); + $this->assertEquals( + ' 0 [>---------------------------]'. + $this->generateOutput(' 3 [â– â– â– >------------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testClear() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 50); + $bar->start(); + $bar->setProgress(25); + $bar->clear(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0/50 [>---------------------------] 0%'. + $this->generateOutput(' 25/50 [==============>-------------] 50%'). + $this->generateOutput(''), + stream_get_contents($output->getStream()) + ); + } + + public function testPercentNotHundredBeforeComplete() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 200); + $bar->start(); + $bar->display(); + $bar->advance(199); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0/200 [>---------------------------] 0%'. + $this->generateOutput(' 0/200 [>---------------------------] 0%'). + $this->generateOutput(' 199/200 [===========================>] 99%'). + $this->generateOutput(' 200/200 [============================] 100%'), + stream_get_contents($output->getStream()) + ); + } + + public function testNonDecoratedOutput() + { + $bar = new ProgressBar($output = $this->getOutputStream(false), 200); + $bar->start(); + + for ($i = 0; $i < 200; ++$i) { + $bar->advance(); + } + + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0/200 [>---------------------------] 0%'.PHP_EOL. + ' 20/200 [==>-------------------------] 10%'.PHP_EOL. + ' 40/200 [=====>----------------------] 20%'.PHP_EOL. + ' 60/200 [========>-------------------] 30%'.PHP_EOL. + ' 80/200 [===========>----------------] 40%'.PHP_EOL. + ' 100/200 [==============>-------------] 50%'.PHP_EOL. + ' 120/200 [================>-----------] 60%'.PHP_EOL. + ' 140/200 [===================>--------] 70%'.PHP_EOL. + ' 160/200 [======================>-----] 80%'.PHP_EOL. + ' 180/200 [=========================>--] 90%'.PHP_EOL. + ' 200/200 [============================] 100%', + stream_get_contents($output->getStream()) + ); + } + + public function testNonDecoratedOutputWithClear() + { + $bar = new ProgressBar($output = $this->getOutputStream(false), 50); + $bar->start(); + $bar->setProgress(25); + $bar->clear(); + $bar->setProgress(50); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0/50 [>---------------------------] 0%'.PHP_EOL. + ' 25/50 [==============>-------------] 50%'.PHP_EOL. + ' 50/50 [============================] 100%', + stream_get_contents($output->getStream()) + ); + } + + public function testNonDecoratedOutputWithoutMax() + { + $bar = new ProgressBar($output = $this->getOutputStream(false)); + $bar->start(); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0 [>---------------------------]'.PHP_EOL. + ' 1 [->--------------------------]', + stream_get_contents($output->getStream()) + ); + } + + public function testParallelBars() + { + $output = $this->getOutputStream(); + $bar1 = new ProgressBar($output, 2); + $bar2 = new ProgressBar($output, 3); + $bar2->setProgressCharacter('#'); + $bar3 = new ProgressBar($output); + + $bar1->start(); + $output->write("\n"); + $bar2->start(); + $output->write("\n"); + $bar3->start(); + + for ($i = 1; $i <= 3; ++$i) { + // up two lines + $output->write("\033[2A"); + if ($i <= 2) { + $bar1->advance(); + } + $output->write("\n"); + $bar2->advance(); + $output->write("\n"); + $bar3->advance(); + } + $output->write("\033[2A"); + $output->write("\n"); + $output->write("\n"); + $bar3->finish(); + + rewind($output->getStream()); + $this->assertEquals( + ' 0/2 [>---------------------------] 0%'."\n". + ' 0/3 [#---------------------------] 0%'."\n". + rtrim(' 0 [>---------------------------]'). + + "\033[2A". + $this->generateOutput(' 1/2 [==============>-------------] 50%')."\n". + $this->generateOutput(' 1/3 [=========#------------------] 33%')."\n". + rtrim($this->generateOutput(' 1 [->--------------------------]')). + + "\033[2A". + $this->generateOutput(' 2/2 [============================] 100%')."\n". + $this->generateOutput(' 2/3 [==================#---------] 66%')."\n". + rtrim($this->generateOutput(' 2 [-->-------------------------]')). + + "\033[2A". + "\n". + $this->generateOutput(' 3/3 [============================] 100%')."\n". + rtrim($this->generateOutput(' 3 [--->------------------------]')). + + "\033[2A". + "\n". + "\n". + rtrim($this->generateOutput(' 3 [============================]')), + stream_get_contents($output->getStream()) + ); + } + + public function testWithoutMax() + { + $output = $this->getOutputStream(); + + $bar = new ProgressBar($output); + $bar->start(); + $bar->advance(); + $bar->advance(); + $bar->advance(); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals( + rtrim(' 0 [>---------------------------]'). + rtrim($this->generateOutput(' 1 [->--------------------------]')). + rtrim($this->generateOutput(' 2 [-->-------------------------]')). + rtrim($this->generateOutput(' 3 [--->------------------------]')). + rtrim($this->generateOutput(' 3 [============================]')), + stream_get_contents($output->getStream()) + ); + } + + public function testWithSmallScreen() + { + $output = $this->getOutputStream(); + + $bar = new ProgressBar($output); + putenv('COLUMNS=12'); + $bar->start(); + $bar->advance(); + putenv('COLUMNS=120'); + + rewind($output->getStream()); + $this->assertEquals( + ' 0 [>---]'. + $this->generateOutput(' 1 [->--]'), + stream_get_contents($output->getStream()) + ); + } + + public function testAddingPlaceholderFormatter() + { + ProgressBar::setPlaceholderFormatterDefinition('remaining_steps', function (ProgressBar $bar) { + return $bar->getMaxSteps() - $bar->getProgress(); + }); + $bar = new ProgressBar($output = $this->getOutputStream(), 3); + $bar->setFormat(' %remaining_steps% [%bar%]'); + + $bar->start(); + $bar->advance(); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals( + ' 3 [>---------------------------]'. + $this->generateOutput(' 2 [=========>------------------]'). + $this->generateOutput(' 0 [============================]'), + stream_get_contents($output->getStream()) + ); + } + + public function testMultilineFormat() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 3); + $bar->setFormat("%bar%\nfoobar"); + + $bar->start(); + $bar->advance(); + $bar->clear(); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals( + ">---------------------------\nfoobar". + $this->generateOutput("=========>------------------\nfoobar"). + "\x0D\x1B[2K\x1B[1A\x1B[2K". + $this->generateOutput("============================\nfoobar"), + stream_get_contents($output->getStream()) + ); + } + + public function testAnsiColorsAndEmojis() + { + putenv('COLUMNS=156'); + + $bar = new ProgressBar($output = $this->getOutputStream(), 15); + ProgressBar::setPlaceholderFormatterDefinition('memory', function (ProgressBar $bar) { + static $i = 0; + $mem = 100000 * $i; + $colors = $i++ ? '41;37' : '44;37'; + + return "\033[".$colors.'m '.Helper::formatMemory($mem)." \033[0m"; + }); + $bar->setFormat(" \033[44;37m %title:-37s% \033[0m\n %current%/%max% %bar% %percent:3s%%\n ðŸ %remaining:-10s% %memory:37s%"); + $bar->setBarCharacter($done = "\033[32mâ—\033[0m"); + $bar->setEmptyBarCharacter($empty = "\033[31mâ—\033[0m"); + $bar->setProgressCharacter($progress = "\033[32m➤ \033[0m"); + + $bar->setMessage('Starting the demo... fingers crossed', 'title'); + $bar->start(); + + rewind($output->getStream()); + $this->assertEquals( + " \033[44;37m Starting the demo... fingers crossed \033[0m\n". + ' 0/15 '.$progress.str_repeat($empty, 26)." 0%\n". + " \xf0\x9f\x8f\x81 < 1 sec \033[44;37m 0 B \033[0m", + stream_get_contents($output->getStream()) + ); + ftruncate($output->getStream(), 0); + rewind($output->getStream()); + + $bar->setMessage('Looks good to me...', 'title'); + $bar->advance(4); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput( + " \033[44;37m Looks good to me... \033[0m\n". + ' 4/15 '.str_repeat($done, 7).$progress.str_repeat($empty, 19)." 26%\n". + " \xf0\x9f\x8f\x81 < 1 sec \033[41;37m 97 KiB \033[0m" + ), + stream_get_contents($output->getStream()) + ); + ftruncate($output->getStream(), 0); + rewind($output->getStream()); + + $bar->setMessage('Thanks, bye', 'title'); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput( + " \033[44;37m Thanks, bye \033[0m\n". + ' 15/15 '.str_repeat($done, 28)." 100%\n". + " \xf0\x9f\x8f\x81 < 1 sec \033[41;37m 195 KiB \033[0m" + ), + stream_get_contents($output->getStream()) + ); + putenv('COLUMNS=120'); + } + + public function testSetFormat() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->setFormat('normal'); + $bar->start(); + rewind($output->getStream()); + $this->assertEquals( + ' 0 [>---------------------------]', + stream_get_contents($output->getStream()) + ); + + $bar = new ProgressBar($output = $this->getOutputStream(), 10); + $bar->setFormat('normal'); + $bar->start(); + rewind($output->getStream()); + $this->assertEquals( + ' 0/10 [>---------------------------] 0%', + stream_get_contents($output->getStream()) + ); + } + + /** + * @dataProvider provideFormat + */ + public function testFormatsWithoutMax($format) + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->setFormat($format); + $bar->start(); + + rewind($output->getStream()); + $this->assertNotEmpty(stream_get_contents($output->getStream())); + } + + /** + * Provides each defined format. + * + * @return array + */ + public function provideFormat() + { + return array( + array('normal'), + array('verbose'), + array('very_verbose'), + array('debug'), + ); + } + + protected function getOutputStream($decorated = true, $verbosity = StreamOutput::VERBOSITY_NORMAL) + { + return new StreamOutput(fopen('php://memory', 'r+', false), $verbosity, $decorated); + } + + protected function generateOutput($expected) + { + $count = substr_count($expected, "\n"); + + return "\x0D\x1B[2K".($count ? str_repeat("\x1B[1A\x1B[2K", $count) : '').$expected; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c85018dece7ef35e4ad207c4525cb553d5e91ede --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php @@ -0,0 +1,183 @@ +getOutputStream()); + $bar->start('Starting...'); + usleep(101000); + $bar->advance(); + usleep(101000); + $bar->advance(); + usleep(101000); + $bar->advance(); + usleep(101000); + $bar->advance(); + usleep(101000); + $bar->advance(); + usleep(101000); + $bar->setMessage('Advancing...'); + $bar->advance(); + $bar->finish('Done...'); + $bar->start('Starting Again...'); + usleep(101000); + $bar->advance(); + $bar->finish('Done Again...'); + + rewind($output->getStream()); + + $this->assertEquals( + $this->generateOutput(' - Starting...'). + $this->generateOutput(' \\ Starting...'). + $this->generateOutput(' | Starting...'). + $this->generateOutput(' / Starting...'). + $this->generateOutput(' - Starting...'). + $this->generateOutput(' \\ Starting...'). + $this->generateOutput(' \\ Advancing...'). + $this->generateOutput(' | Advancing...'). + $this->generateOutput(' | Done...'). + PHP_EOL. + $this->generateOutput(' - Starting Again...'). + $this->generateOutput(' \\ Starting Again...'). + $this->generateOutput(' \\ Done Again...'). + PHP_EOL, + stream_get_contents($output->getStream()) + ); + } + + public function testNonDecoratedOutput() + { + $bar = new ProgressIndicator($output = $this->getOutputStream(false)); + + $bar->start('Starting...'); + $bar->advance(); + $bar->advance(); + $bar->setMessage('Midway...'); + $bar->advance(); + $bar->advance(); + $bar->finish('Done...'); + + rewind($output->getStream()); + + $this->assertEquals( + ' Starting...'.PHP_EOL. + ' Midway...'.PHP_EOL. + ' Done...'.PHP_EOL.PHP_EOL, + stream_get_contents($output->getStream()) + ); + } + + public function testCustomIndicatorValues() + { + $bar = new ProgressIndicator($output = $this->getOutputStream(), null, 100, array('a', 'b', 'c')); + + $bar->start('Starting...'); + usleep(101000); + $bar->advance(); + usleep(101000); + $bar->advance(); + usleep(101000); + $bar->advance(); + + rewind($output->getStream()); + + $this->assertEquals( + $this->generateOutput(' a Starting...'). + $this->generateOutput(' b Starting...'). + $this->generateOutput(' c Starting...'). + $this->generateOutput(' a Starting...'), + stream_get_contents($output->getStream()) + ); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Must have at least 2 indicator value characters. + */ + public function testCannotSetInvalidIndicatorCharacters() + { + $bar = new ProgressIndicator($this->getOutputStream(), null, 100, array('1')); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Progress indicator already started. + */ + public function testCannotStartAlreadyStartedIndicator() + { + $bar = new ProgressIndicator($this->getOutputStream()); + $bar->start('Starting...'); + $bar->start('Starting Again.'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Progress indicator has not yet been started. + */ + public function testCannotAdvanceUnstartedIndicator() + { + $bar = new ProgressIndicator($this->getOutputStream()); + $bar->advance(); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Progress indicator has not yet been started. + */ + public function testCannotFinishUnstartedIndicator() + { + $bar = new ProgressIndicator($this->getOutputStream()); + $bar->finish('Finished'); + } + + /** + * @dataProvider provideFormat + */ + public function testFormats($format) + { + $bar = new ProgressIndicator($output = $this->getOutputStream(), $format); + $bar->start('Starting...'); + $bar->advance(); + + rewind($output->getStream()); + + $this->assertNotEmpty(stream_get_contents($output->getStream())); + } + + /** + * Provides each defined format. + * + * @return array + */ + public function provideFormat() + { + return array( + array('normal'), + array('verbose'), + array('very_verbose'), + array('debug'), + ); + } + + protected function getOutputStream($decorated = true, $verbosity = StreamOutput::VERBOSITY_NORMAL) + { + return new StreamOutput(fopen('php://memory', 'r+', false), $verbosity, $decorated); + } + + protected function generateOutput($expected) + { + $count = substr_count($expected, "\n"); + + return "\x0D\x1B[2K".($count ? sprintf("\033[%dA", $count) : '').$expected; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..700bfe240d25339ec7a89aa01c2c8470e9a21a23 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php @@ -0,0 +1,805 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Helper\QuestionHelper; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Helper\FormatterHelper; +use Symfony\Component\Console\Output\StreamOutput; +use Symfony\Component\Console\Question\ChoiceQuestion; +use Symfony\Component\Console\Question\ConfirmationQuestion; +use Symfony\Component\Console\Question\Question; + +/** + * @group tty + */ +class QuestionHelperTest extends AbstractQuestionHelperTest +{ + public function testAskChoice() + { + $questionHelper = new QuestionHelper(); + + $helperSet = new HelperSet(array(new FormatterHelper())); + $questionHelper->setHelperSet($helperSet); + + $heroes = array('Superman', 'Batman', 'Spiderman'); + + $inputStream = $this->getInputStream("\n1\n 1 \nFabien\n1\nFabien\n1\n0,2\n 0 , 2 \n\n\n"); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '2'); + $question->setMaxAttempts(1); + // first answer is an empty answer, we're supposed to receive the default value + $this->assertEquals('Spiderman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); + $question->setMaxAttempts(1); + $this->assertEquals('Batman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('Batman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); + $question->setErrorMessage('Input "%s" is not a superhero!'); + $question->setMaxAttempts(2); + $this->assertEquals('Batman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question)); + + rewind($output->getStream()); + $stream = stream_get_contents($output->getStream()); + $this->assertContains('Input "Fabien" is not a superhero!', $stream); + + try { + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '1'); + $question->setMaxAttempts(1); + $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertEquals('Value "Fabien" is invalid', $e->getMessage()); + } + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, null); + $question->setMaxAttempts(1); + $question->setMultiselect(true); + + $this->assertEquals(array('Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '0,1'); + $question->setMaxAttempts(1); + $question->setMultiselect(true); + + $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, ' 0 , 1 '); + $question->setMaxAttempts(1); + $question->setMultiselect(true); + + $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + } + + public function testAsk() + { + $dialog = new QuestionHelper(); + + $inputStream = $this->getInputStream("\n8AM\n"); + + $question = new Question('What time is it?', '2PM'); + $this->assertEquals('2PM', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + + $question = new Question('What time is it?', '2PM'); + $this->assertEquals('8AM', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question)); + + rewind($output->getStream()); + $this->assertEquals('What time is it?', stream_get_contents($output->getStream())); + } + + public function testAskWithAutocomplete() + { + if (!$this->hasSttyAvailable()) { + $this->markTestSkipped('`stty` is required to test autocomplete functionality'); + } + + // Acm + // AcsTest + // + // + // Test + // + // S + // F00oo + $inputStream = $this->getInputStream("Acm\nAc\177\177s\tTest\n\n\033[A\033[A\n\033[A\033[A\033[A\033[A\033[A\tTest\n\033[B\nS\177\177\033[B\033[B\nF00\177\177oo\t\n"); + + $dialog = new QuestionHelper(); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new Question('Please select a bundle', 'FrameworkBundle'); + $question->setAutocompleterValues(array('AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle')); + + $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('AsseticBundleTest', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('FrameworkBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('SecurityBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('FooBundleTest', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('AsseticBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('FooBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + } + + public function testAskWithAutocompleteWithNonSequentialKeys() + { + if (!$this->hasSttyAvailable()) { + $this->markTestSkipped('`stty` is required to test autocomplete functionality'); + } + + // + $inputStream = $this->getInputStream("\033[A\033[A\n\033[B\033[B\n"); + + $dialog = new QuestionHelper(); + $dialog->setHelperSet(new HelperSet(array(new FormatterHelper()))); + + $question = new ChoiceQuestion('Please select a bundle', array(1 => 'AcmeDemoBundle', 4 => 'AsseticBundle')); + $question->setMaxAttempts(1); + + $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('AsseticBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + } + + public function testAskHiddenResponse() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('This test is not supported on Windows'); + } + + $dialog = new QuestionHelper(); + + $question = new Question('What time is it?'); + $question->setHidden(true); + + $this->assertEquals('8AM', $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream("8AM\n")), $this->createOutputInterface(), $question)); + } + + /** + * @dataProvider getAskConfirmationData + */ + public function testAskConfirmation($question, $expected, $default = true) + { + $dialog = new QuestionHelper(); + + $inputStream = $this->getInputStream($question."\n"); + $question = new ConfirmationQuestion('Do you like French fries?', $default); + $this->assertEquals($expected, $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question), 'confirmation question should '.($expected ? 'pass' : 'cancel')); + } + + public function getAskConfirmationData() + { + return array( + array('', true), + array('', false, false), + array('y', true), + array('yes', true), + array('n', false), + array('no', false), + ); + } + + public function testAskConfirmationWithCustomTrueAnswer() + { + $dialog = new QuestionHelper(); + + $inputStream = $this->getInputStream("j\ny\n"); + $question = new ConfirmationQuestion('Do you like French fries?', false, '/^(j|y)/i'); + $this->assertTrue($dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $question = new ConfirmationQuestion('Do you like French fries?', false, '/^(j|y)/i'); + $this->assertTrue($dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + } + + public function testAskAndValidate() + { + $dialog = new QuestionHelper(); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $error = 'This is not a color!'; + $validator = function ($color) use ($error) { + if (!in_array($color, array('white', 'black'))) { + throw new \InvalidArgumentException($error); + } + + return $color; + }; + + $question = new Question('What color was the white horse of Henry IV?', 'white'); + $question->setValidator($validator); + $question->setMaxAttempts(2); + + $inputStream = $this->getInputStream("\nblack\n"); + $this->assertEquals('white', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('black', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + + try { + $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream("green\nyellow\norange\n")), $this->createOutputInterface(), $question); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertEquals($error, $e->getMessage()); + } + } + + /** + * @dataProvider simpleAnswerProvider + */ + public function testSelectChoiceFromSimpleChoices($providedAnswer, $expectedValue) + { + $possibleChoices = array( + 'My environment 1', + 'My environment 2', + 'My environment 3', + ); + + $dialog = new QuestionHelper(); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); + $question->setMaxAttempts(1); + $answer = $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream($providedAnswer."\n")), $this->createOutputInterface(), $question); + + $this->assertSame($expectedValue, $answer); + } + + public function simpleAnswerProvider() + { + return array( + array(0, 'My environment 1'), + array(1, 'My environment 2'), + array(2, 'My environment 3'), + array('My environment 1', 'My environment 1'), + array('My environment 2', 'My environment 2'), + array('My environment 3', 'My environment 3'), + ); + } + + /** + * @dataProvider mixedKeysChoiceListAnswerProvider + */ + public function testChoiceFromChoicelistWithMixedKeys($providedAnswer, $expectedValue) + { + $possibleChoices = array( + '0' => 'No environment', + '1' => 'My environment 1', + 'env_2' => 'My environment 2', + 3 => 'My environment 3', + ); + + $dialog = new QuestionHelper(); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); + $question->setMaxAttempts(1); + $answer = $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream($providedAnswer."\n")), $this->createOutputInterface(), $question); + + $this->assertSame($expectedValue, $answer); + } + + public function mixedKeysChoiceListAnswerProvider() + { + return array( + array('0', '0'), + array('No environment', '0'), + array('1', '1'), + array('env_2', 'env_2'), + array(3, '3'), + array('My environment 1', '1'), + ); + } + + /** + * @dataProvider answerProvider + */ + public function testSelectChoiceFromChoiceList($providedAnswer, $expectedValue) + { + $possibleChoices = array( + 'env_1' => 'My environment 1', + 'env_2' => 'My environment', + 'env_3' => 'My environment', + ); + + $dialog = new QuestionHelper(); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); + $question->setMaxAttempts(1); + $answer = $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream($providedAnswer."\n")), $this->createOutputInterface(), $question); + + $this->assertSame($expectedValue, $answer); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The provided answer is ambiguous. Value should be one of env_2 or env_3. + */ + public function testAmbiguousChoiceFromChoicelist() + { + $possibleChoices = array( + 'env_1' => 'My first environment', + 'env_2' => 'My environment', + 'env_3' => 'My environment', + ); + + $dialog = new QuestionHelper(); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); + $question->setMaxAttempts(1); + + $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream("My environment\n")), $this->createOutputInterface(), $question); + } + + public function answerProvider() + { + return array( + array('env_1', 'env_1'), + array('env_2', 'env_2'), + array('env_3', 'env_3'), + array('My environment 1', 'env_1'), + ); + } + + public function testNoInteraction() + { + $dialog = new QuestionHelper(); + $question = new Question('Do you have a job?', 'not yet'); + $this->assertEquals('not yet', $dialog->ask($this->createStreamableInputInterfaceMock(null, false), $this->createOutputInterface(), $question)); + } + + /** + * @requires function mb_strwidth + */ + public function testChoiceOutputFormattingQuestionForUtf8Keys() + { + $question = 'Lorem ipsum?'; + $possibleChoices = array( + 'foo' => 'foo', + 'żółw' => 'bar', + 'Å‚abÄ…dź' => 'baz', + ); + $outputShown = array( + $question, + ' [foo ] foo', + ' [żółw ] bar', + ' [Å‚abÄ…dź] baz', + ); + $output = $this->getMockBuilder('\Symfony\Component\Console\Output\OutputInterface')->getMock(); + $output->method('getFormatter')->willReturn(new OutputFormatter()); + + $dialog = new QuestionHelper(); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $output->expects($this->once())->method('writeln')->with($this->equalTo($outputShown)); + + $question = new ChoiceQuestion($question, $possibleChoices, 'foo'); + $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream("\n")), $output, $question); + } + + /** + * @group legacy + */ + public function testLegacyAskChoice() + { + $questionHelper = new QuestionHelper(); + + $helperSet = new HelperSet(array(new FormatterHelper())); + $questionHelper->setHelperSet($helperSet); + + $heroes = array('Superman', 'Batman', 'Spiderman'); + + $questionHelper->setInputStream($this->getInputStream("\n1\n 1 \nFabien\n1\nFabien\n1\n0,2\n 0 , 2 \n\n\n")); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '2'); + $question->setMaxAttempts(1); + // first answer is an empty answer, we're supposed to receive the default value + $this->assertEquals('Spiderman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); + $question->setMaxAttempts(1); + $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); + $question->setErrorMessage('Input "%s" is not a superhero!'); + $question->setMaxAttempts(2); + $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question)); + + rewind($output->getStream()); + $stream = stream_get_contents($output->getStream()); + $this->assertContains('Input "Fabien" is not a superhero!', $stream); + + try { + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '1'); + $question->setMaxAttempts(1); + $questionHelper->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertEquals('Value "Fabien" is invalid', $e->getMessage()); + } + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, null); + $question->setMaxAttempts(1); + $question->setMultiselect(true); + + $this->assertEquals(array('Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '0,1'); + $question->setMaxAttempts(1); + $question->setMultiselect(true); + + $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, ' 0 , 1 '); + $question->setMaxAttempts(1); + $question->setMultiselect(true); + + $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + } + + /** + * @group legacy + */ + public function testLegacyAsk() + { + $dialog = new QuestionHelper(); + + $dialog->setInputStream($this->getInputStream("\n8AM\n")); + + $question = new Question('What time is it?', '2PM'); + $this->assertEquals('2PM', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $question = new Question('What time is it?', '2PM'); + $this->assertEquals('8AM', $dialog->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question)); + + rewind($output->getStream()); + $this->assertEquals('What time is it?', stream_get_contents($output->getStream())); + } + + /** + * @group legacy + */ + public function testLegacyAskWithAutocomplete() + { + if (!$this->hasSttyAvailable()) { + $this->markTestSkipped('`stty` is required to test autocomplete functionality'); + } + + // Acm + // AcsTest + // + // + // Test + // + // S + // F00oo + $inputStream = $this->getInputStream("Acm\nAc\177\177s\tTest\n\n\033[A\033[A\n\033[A\033[A\033[A\033[A\033[A\tTest\n\033[B\nS\177\177\033[B\033[B\nF00\177\177oo\t\n"); + + $dialog = new QuestionHelper(); + $dialog->setInputStream($inputStream); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new Question('Please select a bundle', 'FrameworkBundle'); + $question->setAutocompleterValues(array('AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle')); + + $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('AsseticBundleTest', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('FrameworkBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('SecurityBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('FooBundleTest', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('AsseticBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('FooBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + } + + /** + * @group legacy + */ + public function testLegacyAskWithAutocompleteWithNonSequentialKeys() + { + if (!$this->hasSttyAvailable()) { + $this->markTestSkipped('`stty` is required to test autocomplete functionality'); + } + + // + $inputStream = $this->getInputStream("\033[A\033[A\n\033[B\033[B\n"); + + $dialog = new QuestionHelper(); + $dialog->setInputStream($inputStream); + $dialog->setHelperSet(new HelperSet(array(new FormatterHelper()))); + + $question = new ChoiceQuestion('Please select a bundle', array(1 => 'AcmeDemoBundle', 4 => 'AsseticBundle')); + $question->setMaxAttempts(1); + + $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('AsseticBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + } + + /** + * @group legacy + */ + public function testLegacyAskHiddenResponse() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('This test is not supported on Windows'); + } + + $dialog = new QuestionHelper(); + $dialog->setInputStream($this->getInputStream("8AM\n")); + + $question = new Question('What time is it?'); + $question->setHidden(true); + + $this->assertEquals('8AM', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + } + + /** + * @group legacy + * @dataProvider getAskConfirmationData + */ + public function testLegacyAskConfirmation($question, $expected, $default = true) + { + $dialog = new QuestionHelper(); + + $dialog->setInputStream($this->getInputStream($question."\n")); + $question = new ConfirmationQuestion('Do you like French fries?', $default); + $this->assertEquals($expected, $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question), 'confirmation question should '.($expected ? 'pass' : 'cancel')); + } + + /** + * @group legacy + */ + public function testLegacyAskConfirmationWithCustomTrueAnswer() + { + $dialog = new QuestionHelper(); + + $dialog->setInputStream($this->getInputStream("j\ny\n")); + $question = new ConfirmationQuestion('Do you like French fries?', false, '/^(j|y)/i'); + $this->assertTrue($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $question = new ConfirmationQuestion('Do you like French fries?', false, '/^(j|y)/i'); + $this->assertTrue($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + } + + /** + * @group legacy + */ + public function testLegacyAskAndValidate() + { + $dialog = new QuestionHelper(); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $error = 'This is not a color!'; + $validator = function ($color) use ($error) { + if (!in_array($color, array('white', 'black'))) { + throw new \InvalidArgumentException($error); + } + + return $color; + }; + + $question = new Question('What color was the white horse of Henry IV?', 'white'); + $question->setValidator($validator); + $question->setMaxAttempts(2); + + $dialog->setInputStream($this->getInputStream("\nblack\n")); + $this->assertEquals('white', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('black', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $dialog->setInputStream($this->getInputStream("green\nyellow\norange\n")); + try { + $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertEquals($error, $e->getMessage()); + } + } + + /** + * @group legacy + * @dataProvider simpleAnswerProvider + */ + public function testLegacySelectChoiceFromSimpleChoices($providedAnswer, $expectedValue) + { + $possibleChoices = array( + 'My environment 1', + 'My environment 2', + 'My environment 3', + ); + + $dialog = new QuestionHelper(); + $dialog->setInputStream($this->getInputStream($providedAnswer."\n")); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); + $question->setMaxAttempts(1); + $answer = $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question); + + $this->assertSame($expectedValue, $answer); + } + + /** + * @group legacy + * @dataProvider mixedKeysChoiceListAnswerProvider + */ + public function testLegacyChoiceFromChoicelistWithMixedKeys($providedAnswer, $expectedValue) + { + $possibleChoices = array( + '0' => 'No environment', + '1' => 'My environment 1', + 'env_2' => 'My environment 2', + 3 => 'My environment 3', + ); + + $dialog = new QuestionHelper(); + $dialog->setInputStream($this->getInputStream($providedAnswer."\n")); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); + $question->setMaxAttempts(1); + $answer = $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question); + + $this->assertSame($expectedValue, $answer); + } + + /** + * @group legacy + * @dataProvider answerProvider + */ + public function testLegacySelectChoiceFromChoiceList($providedAnswer, $expectedValue) + { + $possibleChoices = array( + 'env_1' => 'My environment 1', + 'env_2' => 'My environment', + 'env_3' => 'My environment', + ); + + $dialog = new QuestionHelper(); + $dialog->setInputStream($this->getInputStream($providedAnswer."\n")); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); + $question->setMaxAttempts(1); + $answer = $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question); + + $this->assertSame($expectedValue, $answer); + } + + /** + * @group legacy + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The provided answer is ambiguous. Value should be one of env_2 or env_3. + */ + public function testLegacyAmbiguousChoiceFromChoicelist() + { + $possibleChoices = array( + 'env_1' => 'My first environment', + 'env_2' => 'My environment', + 'env_3' => 'My environment', + ); + + $dialog = new QuestionHelper(); + $dialog->setInputStream($this->getInputStream("My environment\n")); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); + $question->setMaxAttempts(1); + + $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question); + } + + /** + * @requires function mb_strwidth + * @group legacy + */ + public function testLegacyChoiceOutputFormattingQuestionForUtf8Keys() + { + $question = 'Lorem ipsum?'; + $possibleChoices = array( + 'foo' => 'foo', + 'żółw' => 'bar', + 'Å‚abÄ…dź' => 'baz', + ); + $outputShown = array( + $question, + ' [foo ] foo', + ' [żółw ] bar', + ' [Å‚abÄ…dź] baz', + ); + $output = $this->getMockBuilder('\Symfony\Component\Console\Output\OutputInterface')->getMock(); + $output->method('getFormatter')->willReturn(new OutputFormatter()); + + $dialog = new QuestionHelper(); + $dialog->setInputStream($this->getInputStream("\n")); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $output->expects($this->once())->method('writeln')->with($this->equalTo($outputShown)); + + $question = new ChoiceQuestion($question, $possibleChoices, 'foo'); + $dialog->ask($this->createInputInterfaceMock(), $output, $question); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\RuntimeException + * @expectedExceptionMessage Aborted + */ + public function testAskThrowsExceptionOnMissingInput() + { + $dialog = new QuestionHelper(); + $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), new Question('What\'s your name?')); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\RuntimeException + * @expectedExceptionMessage Aborted + */ + public function testAskThrowsExceptionOnMissingInputWithValidator() + { + $dialog = new QuestionHelper(); + + $question = new Question('What\'s your name?'); + $question->setValidator(function () { + if (!$value) { + throw new \Exception('A value is required.'); + } + }); + + $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), $question); + } + + protected function getInputStream($input) + { + $stream = fopen('php://memory', 'r+', false); + fwrite($stream, $input); + rewind($stream); + + return $stream; + } + + protected function createOutputInterface() + { + return new StreamOutput(fopen('php://memory', 'r+', false)); + } + + protected function createInputInterfaceMock($interactive = true) + { + $mock = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock(); + $mock->expects($this->any()) + ->method('isInteractive') + ->will($this->returnValue($interactive)); + + return $mock; + } + + private function hasSttyAvailable() + { + exec('stty 2>&1', $output, $exitcode); + + return $exitcode === 0; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ce946e5b6259e3e30c5d0d67a93afe051438cf49 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php @@ -0,0 +1,156 @@ +setHelperSet($helperSet); + + $heroes = array('Superman', 'Batman', 'Spiderman'); + + $inputStream = $this->getInputStream("\n1\n 1 \nFabien\n1\nFabien\n1\n0,2\n 0 , 2 \n\n\n"); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '2'); + $question->setMaxAttempts(1); + // first answer is an empty answer, we're supposed to receive the default value + $this->assertEquals('Spiderman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question)); + $this->assertOutputContains('What is your favorite superhero? [Spiderman]', $output); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); + $question->setMaxAttempts(1); + $this->assertEquals('Batman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('Batman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); + $question->setErrorMessage('Input "%s" is not a superhero!'); + $question->setMaxAttempts(2); + $this->assertEquals('Batman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question)); + $this->assertOutputContains('Input "Fabien" is not a superhero!', $output); + + try { + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '1'); + $question->setMaxAttempts(1); + $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertEquals('Value "Fabien" is invalid', $e->getMessage()); + } + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, null); + $question->setMaxAttempts(1); + $question->setMultiselect(true); + + $this->assertEquals(array('Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '0,1'); + $question->setMaxAttempts(1); + $question->setMultiselect(true); + + $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question)); + $this->assertOutputContains('What is your favorite superhero? [Superman, Batman]', $output); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, ' 0 , 1 '); + $question->setMaxAttempts(1); + $question->setMultiselect(true); + + $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question)); + $this->assertOutputContains('What is your favorite superhero? [Superman, Batman]', $output); + } + + public function testAskReturnsNullIfValidatorAllowsIt() + { + $questionHelper = new SymfonyQuestionHelper(); + $question = new Question('What is your favorite superhero?'); + $question->setValidator(function ($value) { return $value; }); + $input = $this->createStreamableInputInterfaceMock($this->getInputStream("\n")); + $this->assertNull($questionHelper->ask($input, $this->createOutputInterface(), $question)); + } + + public function testAskEscapeDefaultValue() + { + $helper = new SymfonyQuestionHelper(); + $input = $this->createStreamableInputInterfaceMock($this->getInputStream('\\')); + $helper->ask($input, $output = $this->createOutputInterface(), new Question('Can I have a backslash?', '\\')); + + $this->assertOutputContains('Can I have a backslash? [\]', $output); + } + + public function testAskEscapeAndFormatLabel() + { + $helper = new SymfonyQuestionHelper(); + $input = $this->createStreamableInputInterfaceMock($this->getInputStream('Foo\\Bar')); + $helper->ask($input, $output = $this->createOutputInterface(), new Question('Do you want to use Foo\\Bar or Foo\\Baz\\?', 'Foo\\Baz')); + + $this->assertOutputContains('Do you want to use Foo\\Bar or Foo\\Baz\\? [Foo\\Baz]:', $output); + } + + public function testLabelTrailingBackslash() + { + $helper = new SymfonyQuestionHelper(); + $input = $this->createStreamableInputInterfaceMock($this->getInputStream('sure')); + $helper->ask($input, $output = $this->createOutputInterface(), new Question('Question with a trailing \\')); + + $this->assertOutputContains('Question with a trailing \\', $output); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\RuntimeException + * @expectedExceptionMessage Aborted + */ + public function testAskThrowsExceptionOnMissingInput() + { + $dialog = new SymfonyQuestionHelper(); + $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), new Question('What\'s your name?')); + } + + protected function getInputStream($input) + { + $stream = fopen('php://memory', 'r+', false); + fwrite($stream, $input); + rewind($stream); + + return $stream; + } + + protected function createOutputInterface() + { + $output = new StreamOutput(fopen('php://memory', 'r+', false)); + $output->setDecorated(false); + + return $output; + } + + protected function createInputInterfaceMock($interactive = true) + { + $mock = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock(); + $mock->expects($this->any()) + ->method('isInteractive') + ->will($this->returnValue($interactive)); + + return $mock; + } + + private function assertOutputContains($expected, StreamOutput $output) + { + rewind($output->getStream()); + $stream = stream_get_contents($output->getStream()); + $this->assertContains($expected, $stream); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/TableStyleTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/TableStyleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..13e918b3a0fe2365f1a56369aba0a2481acf295b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/TableStyleTest.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Helper\TableStyle; + +class TableStyleTest extends TestCase +{ + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH). + */ + public function testSetPadTypeWithInvalidType() + { + $style = new TableStyle(); + $style->setPadType('TEST'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/TableTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/TableTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2a4b189f8474e1a801cfd4320e7839a8a4921127 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Helper/TableTest.php @@ -0,0 +1,793 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Helper\TableStyle; +use Symfony\Component\Console\Helper\TableSeparator; +use Symfony\Component\Console\Helper\TableCell; +use Symfony\Component\Console\Output\StreamOutput; + +class TableTest extends TestCase +{ + protected $stream; + + protected function setUp() + { + $this->stream = fopen('php://memory', 'r+'); + } + + protected function tearDown() + { + fclose($this->stream); + $this->stream = null; + } + + /** + * @dataProvider testRenderProvider + */ + public function testRender($headers, $rows, $style, $expected, $decorated = false) + { + $table = new Table($output = $this->getOutputStream($decorated)); + $table + ->setHeaders($headers) + ->setRows($rows) + ->setStyle($style) + ; + $table->render(); + + $this->assertEquals($expected, $this->getOutputContent($output)); + } + + /** + * @dataProvider testRenderProvider + */ + public function testRenderAddRows($headers, $rows, $style, $expected, $decorated = false) + { + $table = new Table($output = $this->getOutputStream($decorated)); + $table + ->setHeaders($headers) + ->addRows($rows) + ->setStyle($style) + ; + $table->render(); + + $this->assertEquals($expected, $this->getOutputContent($output)); + } + + /** + * @dataProvider testRenderProvider + */ + public function testRenderAddRowsOneByOne($headers, $rows, $style, $expected, $decorated = false) + { + $table = new Table($output = $this->getOutputStream($decorated)); + $table + ->setHeaders($headers) + ->setStyle($style) + ; + foreach ($rows as $row) { + $table->addRow($row); + } + $table->render(); + + $this->assertEquals($expected, $this->getOutputContent($output)); + } + + public function testRenderProvider() + { + $books = array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), + array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), + array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), + ); + + return array( + array( + array('ISBN', 'Title', 'Author'), + $books, + 'default', +<<<'TABLE' ++---------------+--------------------------+------------------+ +| ISBN | Title | Author | ++---------------+--------------------------+------------------+ +| 99921-58-10-7 | Divine Comedy | Dante Alighieri | +| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | +| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | +| 80-902734-1-6 | And Then There Were None | Agatha Christie | ++---------------+--------------------------+------------------+ + +TABLE + ), + array( + array('ISBN', 'Title', 'Author'), + $books, + 'compact', +<<<'TABLE' + ISBN Title Author + 99921-58-10-7 Divine Comedy Dante Alighieri + 9971-5-0210-0 A Tale of Two Cities Charles Dickens + 960-425-059-0 The Lord of the Rings J. R. R. Tolkien + 80-902734-1-6 And Then There Were None Agatha Christie + +TABLE + ), + array( + array('ISBN', 'Title', 'Author'), + $books, + 'borderless', +<<<'TABLE' + =============== ========================== ================== + ISBN Title Author + =============== ========================== ================== + 99921-58-10-7 Divine Comedy Dante Alighieri + 9971-5-0210-0 A Tale of Two Cities Charles Dickens + 960-425-059-0 The Lord of the Rings J. R. R. Tolkien + 80-902734-1-6 And Then There Were None Agatha Christie + =============== ========================== ================== + +TABLE + ), + array( + array('ISBN', 'Title'), + array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + array('9971-5-0210-0'), + array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), + array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), + ), + 'default', +<<<'TABLE' ++---------------+--------------------------+------------------+ +| ISBN | Title | | ++---------------+--------------------------+------------------+ +| 99921-58-10-7 | Divine Comedy | Dante Alighieri | +| 9971-5-0210-0 | | | +| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | +| 80-902734-1-6 | And Then There Were None | Agatha Christie | ++---------------+--------------------------+------------------+ + +TABLE + ), + array( + array(), + array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + array('9971-5-0210-0'), + array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), + array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), + ), + 'default', +<<<'TABLE' ++---------------+--------------------------+------------------+ +| 99921-58-10-7 | Divine Comedy | Dante Alighieri | +| 9971-5-0210-0 | | | +| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | +| 80-902734-1-6 | And Then There Were None | Agatha Christie | ++---------------+--------------------------+------------------+ + +TABLE + ), + array( + array('ISBN', 'Title', 'Author'), + array( + array('99921-58-10-7', "Divine\nComedy", 'Dante Alighieri'), + array('9971-5-0210-2', "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."), + array('9971-5-0210-2', "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."), + array('960-425-059-0', 'The Lord of the Rings', "J. R. R.\nTolkien"), + ), + 'default', +<<<'TABLE' ++---------------+----------------------------+-----------------+ +| ISBN | Title | Author | ++---------------+----------------------------+-----------------+ +| 99921-58-10-7 | Divine | Dante Alighieri | +| | Comedy | | +| 9971-5-0210-2 | Harry Potter | Rowling | +| | and the Chamber of Secrets | Joanne K. | +| 9971-5-0210-2 | Harry Potter | Rowling | +| | and the Chamber of Secrets | Joanne K. | +| 960-425-059-0 | The Lord of the Rings | J. R. R. | +| | | Tolkien | ++---------------+----------------------------+-----------------+ + +TABLE + ), + array( + array('ISBN', 'Title'), + array(), + 'default', +<<<'TABLE' ++------+-------+ +| ISBN | Title | ++------+-------+ + +TABLE + ), + array( + array(), + array(), + 'default', + '', + ), + 'Cell text with tags used for Output styling' => array( + array('ISBN', 'Title', 'Author'), + array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), + ), + 'default', +<<<'TABLE' ++---------------+----------------------+-----------------+ +| ISBN | Title | Author | ++---------------+----------------------+-----------------+ +| 99921-58-10-7 | Divine Comedy | Dante Alighieri | +| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | ++---------------+----------------------+-----------------+ + +TABLE + ), + 'Cell text with tags not used for Output styling' => array( + array('ISBN', 'Title', 'Author'), + array( + array('99921-58-10-700', 'Divine Com', 'Dante Alighieri'), + array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), + ), + 'default', +<<<'TABLE' ++----------------------------------+----------------------+-----------------+ +| ISBN | Title | Author | ++----------------------------------+----------------------+-----------------+ +| 99921-58-10-700 | Divine Com | Dante Alighieri | +| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | ++----------------------------------+----------------------+-----------------+ + +TABLE + ), + 'Cell with colspan' => array( + array('ISBN', 'Title', 'Author'), + array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + new TableSeparator(), + array(new TableCell('Divine Comedy(Dante Alighieri)', array('colspan' => 3))), + new TableSeparator(), + array( + new TableCell('Arduino: A Quick-Start Guide', array('colspan' => 2)), + 'Mark Schmidt', + ), + new TableSeparator(), + array( + '9971-5-0210-0', + new TableCell("A Tale of \nTwo Cities", array('colspan' => 2)), + ), + new TableSeparator(), + array( + new TableCell('Cupiditate dicta atque porro, tempora exercitationem modi animi nulla nemo vel nihil!', array('colspan' => 3)), + ), + ), + 'default', +<<<'TABLE' ++-------------------------------+-------------------------------+-----------------------------+ +| ISBN | Title | Author | ++-------------------------------+-------------------------------+-----------------------------+ +| 99921-58-10-7 | Divine Comedy | Dante Alighieri | ++-------------------------------+-------------------------------+-----------------------------+ +| Divine Comedy(Dante Alighieri) | ++-------------------------------+-------------------------------+-----------------------------+ +| Arduino: A Quick-Start Guide | Mark Schmidt | ++-------------------------------+-------------------------------+-----------------------------+ +| 9971-5-0210-0 | A Tale of | +| | Two Cities | ++-------------------------------+-------------------------------+-----------------------------+ +| Cupiditate dicta atque porro, tempora exercitationem modi animi nulla nemo vel nihil! | ++-------------------------------+-------------------------------+-----------------------------+ + +TABLE + ), + 'Cell with rowspan' => array( + array('ISBN', 'Title', 'Author'), + array( + array( + new TableCell('9971-5-0210-0', array('rowspan' => 3)), + new TableCell('Divine Comedy', array('rowspan' => 2)), + 'Dante Alighieri', + ), + array(), + array("The Lord of \nthe Rings", "J. R. \nR. Tolkien"), + new TableSeparator(), + array('80-902734-1-6', new TableCell("And Then \nThere \nWere None", array('rowspan' => 3)), 'Agatha Christie'), + array('80-902734-1-7', 'Test'), + ), + 'default', +<<<'TABLE' ++---------------+---------------+-----------------+ +| ISBN | Title | Author | ++---------------+---------------+-----------------+ +| 9971-5-0210-0 | Divine Comedy | Dante Alighieri | +| | | | +| | The Lord of | J. R. | +| | the Rings | R. Tolkien | ++---------------+---------------+-----------------+ +| 80-902734-1-6 | And Then | Agatha Christie | +| 80-902734-1-7 | There | Test | +| | Were None | | ++---------------+---------------+-----------------+ + +TABLE + ), + 'Cell with rowspan and colspan' => array( + array('ISBN', 'Title', 'Author'), + array( + array( + new TableCell('9971-5-0210-0', array('rowspan' => 2, 'colspan' => 2)), + 'Dante Alighieri', + ), + array('Charles Dickens'), + new TableSeparator(), + array( + 'Dante Alighieri', + new TableCell('9971-5-0210-0', array('rowspan' => 3, 'colspan' => 2)), + ), + array('J. R. R. Tolkien'), + array('J. R. R'), + ), + 'default', +<<<'TABLE' ++------------------+---------+-----------------+ +| ISBN | Title | Author | ++------------------+---------+-----------------+ +| 9971-5-0210-0 | Dante Alighieri | +| | Charles Dickens | ++------------------+---------+-----------------+ +| Dante Alighieri | 9971-5-0210-0 | +| J. R. R. Tolkien | | +| J. R. R | | ++------------------+---------+-----------------+ + +TABLE + ), + 'Cell with rowspan and colspan contains new line break' => array( + array('ISBN', 'Title', 'Author'), + array( + array( + new TableCell("9971\n-5-\n021\n0-0", array('rowspan' => 2, 'colspan' => 2)), + 'Dante Alighieri', + ), + array('Charles Dickens'), + new TableSeparator(), + array( + 'Dante Alighieri', + new TableCell("9971\n-5-\n021\n0-0", array('rowspan' => 2, 'colspan' => 2)), + ), + array('Charles Dickens'), + new TableSeparator(), + array( + new TableCell("9971\n-5-\n021\n0-0", array('rowspan' => 2, 'colspan' => 2)), + new TableCell("Dante \nAlighieri", array('rowspan' => 2, 'colspan' => 1)), + ), + ), + 'default', +<<<'TABLE' ++-----------------+-------+-----------------+ +| ISBN | Title | Author | ++-----------------+-------+-----------------+ +| 9971 | Dante Alighieri | +| -5- | Charles Dickens | +| 021 | | +| 0-0 | | ++-----------------+-------+-----------------+ +| Dante Alighieri | 9971 | +| Charles Dickens | -5- | +| | 021 | +| | 0-0 | ++-----------------+-------+-----------------+ +| 9971 | Dante | +| -5- | Alighieri | +| 021 | | +| 0-0 | | ++-----------------+-------+-----------------+ + +TABLE + ), + 'Cell with rowspan and colspan without using TableSeparator' => array( + array('ISBN', 'Title', 'Author'), + array( + array( + new TableCell("9971\n-5-\n021\n0-0", array('rowspan' => 2, 'colspan' => 2)), + 'Dante Alighieri', + ), + array('Charles Dickens'), + array( + 'Dante Alighieri', + new TableCell("9971\n-5-\n021\n0-0", array('rowspan' => 2, 'colspan' => 2)), + ), + array('Charles Dickens'), + ), + 'default', +<<<'TABLE' ++-----------------+-------+-----------------+ +| ISBN | Title | Author | ++-----------------+-------+-----------------+ +| 9971 | Dante Alighieri | +| -5- | Charles Dickens | +| 021 | | +| 0-0 | | +| Dante Alighieri | 9971 | +| Charles Dickens | -5- | +| | 021 | +| | 0-0 | ++-----------------+-------+-----------------+ + +TABLE + ), + 'Cell with rowspan and colspan with separator inside a rowspan' => array( + array('ISBN', 'Author'), + array( + array( + new TableCell('9971-5-0210-0', array('rowspan' => 3, 'colspan' => 1)), + 'Dante Alighieri', + ), + array(new TableSeparator()), + array('Charles Dickens'), + ), + 'default', +<<<'TABLE' ++---------------+-----------------+ +| ISBN | Author | ++---------------+-----------------+ +| 9971-5-0210-0 | Dante Alighieri | +| |-----------------| +| | Charles Dickens | ++---------------+-----------------+ + +TABLE + ), + 'Multiple header lines' => array( + array( + array(new TableCell('Main title', array('colspan' => 3))), + array('ISBN', 'Title', 'Author'), + ), + array(), + 'default', +<<<'TABLE' ++------+-------+--------+ +| Main title | ++------+-------+--------+ +| ISBN | Title | Author | ++------+-------+--------+ + +TABLE + ), + 'Row with multiple cells' => array( + array(), + array( + array( + new TableCell('1', array('colspan' => 3)), + new TableCell('2', array('colspan' => 2)), + new TableCell('3', array('colspan' => 2)), + new TableCell('4', array('colspan' => 2)), + ), + ), + 'default', +<<<'TABLE' ++---+--+--+---+--+---+--+---+--+ +| 1 | 2 | 3 | 4 | ++---+--+--+---+--+---+--+---+--+ + +TABLE + ), + 'Coslpan and table cells with comment style' => array( + array( + new TableCell('Long Title', array('colspan' => 3)), + ), + array( + array( + new TableCell('9971-5-0210-0', array('colspan' => 3)), + ), + new TableSeparator(), + array( + 'Dante Alighieri', + 'J. R. R. Tolkien', + 'J. R. R', + ), + ), + 'default', + <<getOutputStream()); + $table + ->setHeaders(array('â– â– ')) + ->setRows(array(array(1234))) + ->setStyle('default') + ; + $table->render(); + + $expected = +<<<'TABLE' ++------+ +| â– â–  | ++------+ +| 1234 | ++------+ + +TABLE; + + $this->assertEquals($expected, $this->getOutputContent($output)); + } + + public function testTableCellWithNumericIntValue() + { + $table = new Table($output = $this->getOutputStream()); + + $table->setRows(array(array(new TableCell(12345)))); + $table->render(); + + $expected = +<<<'TABLE' ++-------+ +| 12345 | ++-------+ + +TABLE; + + $this->assertEquals($expected, $this->getOutputContent($output)); + } + + public function testTableCellWithNumericFloatValue() + { + $table = new Table($output = $this->getOutputStream()); + + $table->setRows(array(array(new TableCell(12345.01)))); + $table->render(); + + $expected = +<<<'TABLE' ++----------+ +| 12345.01 | ++----------+ + +TABLE; + + $this->assertEquals($expected, $this->getOutputContent($output)); + } + + public function testStyle() + { + $style = new TableStyle(); + $style + ->setHorizontalBorderChar('.') + ->setVerticalBorderChar('.') + ->setCrossingChar('.') + ; + + Table::setStyleDefinition('dotfull', $style); + $table = new Table($output = $this->getOutputStream()); + $table + ->setHeaders(array('Foo')) + ->setRows(array(array('Bar'))) + ->setStyle('dotfull'); + $table->render(); + + $expected = +<<<'TABLE' +....... +. Foo . +....... +. Bar . +....... + +TABLE; + + $this->assertEquals($expected, $this->getOutputContent($output)); + } + + public function testRowSeparator() + { + $table = new Table($output = $this->getOutputStream()); + $table + ->setHeaders(array('Foo')) + ->setRows(array( + array('Bar1'), + new TableSeparator(), + array('Bar2'), + new TableSeparator(), + array('Bar3'), + )); + $table->render(); + + $expected = +<<<'TABLE' ++------+ +| Foo | ++------+ +| Bar1 | ++------+ +| Bar2 | ++------+ +| Bar3 | ++------+ + +TABLE; + + $this->assertEquals($expected, $this->getOutputContent($output)); + + $this->assertEquals($table, $table->addRow(new TableSeparator()), 'fluent interface on addRow() with a single TableSeparator() works'); + } + + public function testRenderMultiCalls() + { + $table = new Table($output = $this->getOutputStream()); + $table->setRows(array( + array(new TableCell('foo', array('colspan' => 2))), + )); + $table->render(); + $table->render(); + $table->render(); + + $expected = +<<
    assertEquals($expected, $this->getOutputContent($output)); + } + + public function testColumnStyle() + { + $table = new Table($output = $this->getOutputStream()); + $table + ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) + ->setRows(array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'), + array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'), + )); + + $style = new TableStyle(); + $style->setPadType(STR_PAD_LEFT); + $table->setColumnStyle(3, $style); + + $table->render(); + + $expected = + <<
    assertEquals($expected, $this->getOutputContent($output)); + } + + public function testColumnWith() + { + $table = new Table($output = $this->getOutputStream()); + $table + ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) + ->setRows(array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'), + array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'), + )) + ->setColumnWidth(0, 15) + ->setColumnWidth(3, 10); + + $style = new TableStyle(); + $style->setPadType(STR_PAD_LEFT); + $table->setColumnStyle(3, $style); + + $table->render(); + + $expected = + <<
    assertEquals($expected, $this->getOutputContent($output)); + } + + public function testColumnWiths() + { + $table = new Table($output = $this->getOutputStream()); + $table + ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) + ->setRows(array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'), + array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'), + )) + ->setColumnWidths(array(15, 0, -1, 10)); + + $style = new TableStyle(); + $style->setPadType(STR_PAD_LEFT); + $table->setColumnStyle(3, $style); + + $table->render(); + + $expected = + <<
    assertEquals($expected, $this->getOutputContent($output)); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\InvalidArgumentException + * @expectedExceptionMessage Style "absent" is not defined. + */ + public function testIsNotDefinedStyleException() + { + $table = new Table($this->getOutputStream()); + $table->setStyle('absent'); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\InvalidArgumentException + * @expectedExceptionMessage Style "absent" is not defined. + */ + public function testGetStyleDefinition() + { + Table::getStyleDefinition('absent'); + } + + protected function getOutputStream($decorated = false) + { + return new StreamOutput($this->stream, StreamOutput::VERBOSITY_NORMAL, $decorated); + } + + protected function getOutputContent(StreamOutput $output) + { + rewind($output->getStream()); + + return str_replace(PHP_EOL, "\n", stream_get_contents($output->getStream())); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9cdac36648256b4c0d868c365f2bba314cbbe144 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php @@ -0,0 +1,390 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Input; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Input\ArgvInput; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; + +class ArgvInputTest extends TestCase +{ + public function testConstructor() + { + $_SERVER['argv'] = array('cli.php', 'foo'); + $input = new ArgvInput(); + $r = new \ReflectionObject($input); + $p = $r->getProperty('tokens'); + $p->setAccessible(true); + + $this->assertEquals(array('foo'), $p->getValue($input), '__construct() automatically get its input from the argv server variable'); + } + + public function testParseArguments() + { + $input = new ArgvInput(array('cli.php', 'foo')); + $input->bind(new InputDefinition(array(new InputArgument('name')))); + $this->assertEquals(array('name' => 'foo'), $input->getArguments(), '->parse() parses required arguments'); + + $input->bind(new InputDefinition(array(new InputArgument('name')))); + $this->assertEquals(array('name' => 'foo'), $input->getArguments(), '->parse() is stateless'); + } + + /** + * @dataProvider provideOptions + */ + public function testParseOptions($input, $options, $expectedOptions, $message) + { + $input = new ArgvInput($input); + $input->bind(new InputDefinition($options)); + + $this->assertEquals($expectedOptions, $input->getOptions(), $message); + } + + public function provideOptions() + { + return array( + array( + array('cli.php', '--foo'), + array(new InputOption('foo')), + array('foo' => true), + '->parse() parses long options without a value', + ), + array( + array('cli.php', '--foo=bar'), + array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), + array('foo' => 'bar'), + '->parse() parses long options with a required value (with a = separator)', + ), + array( + array('cli.php', '--foo', 'bar'), + array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), + array('foo' => 'bar'), + '->parse() parses long options with a required value (with a space separator)', + ), + array( + array('cli.php', '--foo='), + array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), + array('foo' => null), + '->parse() parses long options with optional value which is empty (with a = separator) as null', + ), + array( + array('cli.php', '--foo=', 'bar'), + array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)), + array('foo' => null), + '->parse() parses long options with optional value which is empty (with a = separator) followed by an argument', + ), + array( + array('cli.php', '-f'), + array(new InputOption('foo', 'f')), + array('foo' => true), + '->parse() parses short options without a value', + ), + array( + array('cli.php', '-fbar'), + array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), + array('foo' => 'bar'), + '->parse() parses short options with a required value (with no separator)', + ), + array( + array('cli.php', '-f', 'bar'), + array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), + array('foo' => 'bar'), + '->parse() parses short options with a required value (with a space separator)', + ), + array( + array('cli.php', '-f', ''), + array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), + array('foo' => ''), + '->parse() parses short options with an optional empty value', + ), + array( + array('cli.php', '-f', '', 'foo'), + array(new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), + array('foo' => ''), + '->parse() parses short options with an optional empty value followed by an argument', + ), + array( + array('cli.php', '-f', '', '-b'), + array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')), + array('foo' => '', 'bar' => true), + '->parse() parses short options with an optional empty value followed by an option', + ), + array( + array('cli.php', '-f', '-b', 'foo'), + array(new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')), + array('foo' => null, 'bar' => true), + '->parse() parses short options with an optional value which is not present', + ), + array( + array('cli.php', '-fb'), + array(new InputOption('foo', 'f'), new InputOption('bar', 'b')), + array('foo' => true, 'bar' => true), + '->parse() parses short options when they are aggregated as a single one', + ), + array( + array('cli.php', '-fb', 'bar'), + array(new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_REQUIRED)), + array('foo' => true, 'bar' => 'bar'), + '->parse() parses short options when they are aggregated as a single one and the last one has a required value', + ), + array( + array('cli.php', '-fb', 'bar'), + array(new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)), + array('foo' => true, 'bar' => 'bar'), + '->parse() parses short options when they are aggregated as a single one and the last one has an optional value', + ), + array( + array('cli.php', '-fbbar'), + array(new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)), + array('foo' => true, 'bar' => 'bar'), + '->parse() parses short options when they are aggregated as a single one and the last one has an optional value with no separator', + ), + array( + array('cli.php', '-fbbar'), + array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)), + array('foo' => 'bbar', 'bar' => null), + '->parse() parses short options when they are aggregated as a single one and one of them takes a value', + ), + ); + } + + /** + * @dataProvider provideInvalidInput + */ + public function testInvalidInput($argv, $definition, $expectedExceptionMessage) + { + if (method_exists($this, 'expectException')) { + $this->expectException('RuntimeException'); + $this->expectExceptionMessage($expectedExceptionMessage); + } else { + $this->setExpectedException('RuntimeException', $expectedExceptionMessage); + } + + $input = new ArgvInput($argv); + $input->bind($definition); + } + + public function provideInvalidInput() + { + return array( + array( + array('cli.php', '--foo'), + new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), + 'The "--foo" option requires a value.', + ), + array( + array('cli.php', '-f'), + new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), + 'The "--foo" option requires a value.', + ), + array( + array('cli.php', '-ffoo'), + new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))), + 'The "-o" option does not exist.', + ), + array( + array('cli.php', '--foo=bar'), + new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))), + 'The "--foo" option does not accept a value.', + ), + array( + array('cli.php', 'foo', 'bar'), + new InputDefinition(), + 'No arguments expected, got "foo".', + ), + array( + array('cli.php', 'foo', 'bar'), + new InputDefinition(array(new InputArgument('number'))), + 'Too many arguments, expected arguments "number".', + ), + array( + array('cli.php', 'foo', 'bar', 'zzz'), + new InputDefinition(array(new InputArgument('number'), new InputArgument('county'))), + 'Too many arguments, expected arguments "number" "county".', + ), + array( + array('cli.php', '--foo'), + new InputDefinition(), + 'The "--foo" option does not exist.', + ), + array( + array('cli.php', '-f'), + new InputDefinition(), + 'The "-f" option does not exist.', + ), + array( + array('cli.php', '-1'), + new InputDefinition(array(new InputArgument('number'))), + 'The "-1" option does not exist.', + ), + ); + } + + public function testParseArrayArgument() + { + $input = new ArgvInput(array('cli.php', 'foo', 'bar', 'baz', 'bat')); + $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::IS_ARRAY)))); + + $this->assertEquals(array('name' => array('foo', 'bar', 'baz', 'bat')), $input->getArguments(), '->parse() parses array arguments'); + } + + public function testParseArrayOption() + { + $input = new ArgvInput(array('cli.php', '--name=foo', '--name=bar', '--name=baz')); + $input->bind(new InputDefinition(array(new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)))); + + $this->assertEquals(array('name' => array('foo', 'bar', 'baz')), $input->getOptions(), '->parse() parses array options ("--option=value" syntax)'); + + $input = new ArgvInput(array('cli.php', '--name', 'foo', '--name', 'bar', '--name', 'baz')); + $input->bind(new InputDefinition(array(new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)))); + $this->assertEquals(array('name' => array('foo', 'bar', 'baz')), $input->getOptions(), '->parse() parses array options ("--option value" syntax)'); + + $input = new ArgvInput(array('cli.php', '--name=foo', '--name=bar', '--name=')); + $input->bind(new InputDefinition(array(new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)))); + $this->assertSame(array('name' => array('foo', 'bar', null)), $input->getOptions(), '->parse() parses empty array options as null ("--option=value" syntax)'); + + $input = new ArgvInput(array('cli.php', '--name', 'foo', '--name', 'bar', '--name', '--anotherOption')); + $input->bind(new InputDefinition(array( + new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY), + new InputOption('anotherOption', null, InputOption::VALUE_NONE), + ))); + $this->assertSame(array('name' => array('foo', 'bar', null), 'anotherOption' => true), $input->getOptions(), '->parse() parses empty array options as null ("--option value" syntax)'); + } + + public function testParseNegativeNumberAfterDoubleDash() + { + $input = new ArgvInput(array('cli.php', '--', '-1')); + $input->bind(new InputDefinition(array(new InputArgument('number')))); + $this->assertEquals(array('number' => '-1'), $input->getArguments(), '->parse() parses arguments with leading dashes as arguments after having encountered a double-dash sequence'); + + $input = new ArgvInput(array('cli.php', '-f', 'bar', '--', '-1')); + $input->bind(new InputDefinition(array(new InputArgument('number'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)))); + $this->assertEquals(array('foo' => 'bar'), $input->getOptions(), '->parse() parses arguments with leading dashes as options before having encountered a double-dash sequence'); + $this->assertEquals(array('number' => '-1'), $input->getArguments(), '->parse() parses arguments with leading dashes as arguments after having encountered a double-dash sequence'); + } + + public function testParseEmptyStringArgument() + { + $input = new ArgvInput(array('cli.php', '-f', 'bar', '')); + $input->bind(new InputDefinition(array(new InputArgument('empty'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)))); + + $this->assertEquals(array('empty' => ''), $input->getArguments(), '->parse() parses empty string arguments'); + } + + public function testGetFirstArgument() + { + $input = new ArgvInput(array('cli.php', '-fbbar')); + $this->assertNull($input->getFirstArgument(), '->getFirstArgument() returns null when there is no arguments'); + + $input = new ArgvInput(array('cli.php', '-fbbar', 'foo')); + $this->assertEquals('foo', $input->getFirstArgument(), '->getFirstArgument() returns the first argument from the raw input'); + } + + public function testHasParameterOption() + { + $input = new ArgvInput(array('cli.php', '-f', 'foo')); + $this->assertTrue($input->hasParameterOption('-f'), '->hasParameterOption() returns true if the given short option is in the raw input'); + + $input = new ArgvInput(array('cli.php', '--foo', 'foo')); + $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input'); + + $input = new ArgvInput(array('cli.php', 'foo')); + $this->assertFalse($input->hasParameterOption('--foo'), '->hasParameterOption() returns false if the given short option is not in the raw input'); + + $input = new ArgvInput(array('cli.php', '--foo=bar')); + $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given option with provided value is in the raw input'); + } + + public function testHasParameterOptionOnlyOptions() + { + $input = new ArgvInput(array('cli.php', '-f', 'foo')); + $this->assertTrue($input->hasParameterOption('-f', true), '->hasParameterOption() returns true if the given short option is in the raw input'); + + $input = new ArgvInput(array('cli.php', '--foo', '--', 'foo')); + $this->assertTrue($input->hasParameterOption('--foo', true), '->hasParameterOption() returns true if the given long option is in the raw input'); + + $input = new ArgvInput(array('cli.php', '--foo=bar', 'foo')); + $this->assertTrue($input->hasParameterOption('--foo', true), '->hasParameterOption() returns true if the given long option with provided value is in the raw input'); + + $input = new ArgvInput(array('cli.php', '--', '--foo')); + $this->assertFalse($input->hasParameterOption('--foo', true), '->hasParameterOption() returns false if the given option is in the raw input but after an end of options signal'); + } + + public function testToString() + { + $input = new ArgvInput(array('cli.php', '-f', 'foo')); + $this->assertEquals('-f foo', (string) $input); + + $input = new ArgvInput(array('cli.php', '-f', '--bar=foo', 'a b c d', "A\nB'C")); + $this->assertEquals('-f --bar=foo '.escapeshellarg('a b c d').' '.escapeshellarg("A\nB'C"), (string) $input); + } + + /** + * @dataProvider provideGetParameterOptionValues + */ + public function testGetParameterOptionEqualSign($argv, $key, $onlyParams, $expected) + { + $input = new ArgvInput($argv); + $this->assertEquals($expected, $input->getParameterOption($key, false, $onlyParams), '->getParameterOption() returns the expected value'); + } + + public function provideGetParameterOptionValues() + { + return array( + array(array('app/console', 'foo:bar', '-e', 'dev'), '-e', false, 'dev'), + array(array('app/console', 'foo:bar', '--env=dev'), '--env', false, 'dev'), + array(array('app/console', 'foo:bar', '-e', 'dev'), array('-e', '--env'), false, 'dev'), + array(array('app/console', 'foo:bar', '--env=dev'), array('-e', '--env'), false, 'dev'), + array(array('app/console', 'foo:bar', '--env=dev', '--en=1'), array('--en'), false, '1'), + array(array('app/console', 'foo:bar', '--env=dev', '', '--en=1'), array('--en'), false, '1'), + array(array('app/console', 'foo:bar', '--env', 'val'), '--env', false, 'val'), + array(array('app/console', 'foo:bar', '--env', 'val', '--dummy'), '--env', false, 'val'), + array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', false, 'dev'), + array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', true, false), + ); + } + + public function testParseSingleDashAsArgument() + { + $input = new ArgvInput(array('cli.php', '-')); + $input->bind(new InputDefinition(array(new InputArgument('file')))); + $this->assertEquals(array('file' => '-'), $input->getArguments(), '->parse() parses single dash as an argument'); + } + + public function testParseOptionWithValueOptionalGivenEmptyAndRequiredArgument() + { + $input = new ArgvInput(array('cli.php', '--foo=', 'bar')); + $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)))); + $this->assertEquals(array('foo' => null), $input->getOptions(), '->parse() parses optional options with empty value as null'); + $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->parse() parses required arguments'); + + $input = new ArgvInput(array('cli.php', '--foo=0', 'bar')); + $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)))); + $this->assertEquals(array('foo' => '0'), $input->getOptions(), '->parse() parses optional options with empty value as null'); + $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->parse() parses required arguments'); + } + + public function testParseOptionWithValueOptionalGivenEmptyAndOptionalArgument() + { + $input = new ArgvInput(array('cli.php', '--foo=', 'bar')); + $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::OPTIONAL)))); + $this->assertEquals(array('foo' => null), $input->getOptions(), '->parse() parses optional options with empty value as null'); + $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->parse() parses optional arguments'); + + $input = new ArgvInput(array('cli.php', '--foo=0', 'bar')); + $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::OPTIONAL)))); + $this->assertEquals(array('foo' => '0'), $input->getOptions(), '->parse() parses optional options with empty value as null'); + $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->parse() parses optional arguments'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a3e938acd38febe428bdacb8ac56dd5dac96f806 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php @@ -0,0 +1,165 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Input; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; + +class ArrayInputTest extends TestCase +{ + public function testGetFirstArgument() + { + $input = new ArrayInput(array()); + $this->assertNull($input->getFirstArgument(), '->getFirstArgument() returns null if no argument were passed'); + $input = new ArrayInput(array('name' => 'Fabien')); + $this->assertEquals('Fabien', $input->getFirstArgument(), '->getFirstArgument() returns the first passed argument'); + $input = new ArrayInput(array('--foo' => 'bar', 'name' => 'Fabien')); + $this->assertEquals('Fabien', $input->getFirstArgument(), '->getFirstArgument() returns the first passed argument'); + } + + public function testHasParameterOption() + { + $input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar')); + $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if an option is present in the passed parameters'); + $this->assertFalse($input->hasParameterOption('--bar'), '->hasParameterOption() returns false if an option is not present in the passed parameters'); + + $input = new ArrayInput(array('--foo')); + $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if an option is present in the passed parameters'); + + $input = new ArrayInput(array('--foo', '--', '--bar')); + $this->assertTrue($input->hasParameterOption('--bar'), '->hasParameterOption() returns true if an option is present in the passed parameters'); + $this->assertFalse($input->hasParameterOption('--bar', true), '->hasParameterOption() returns false if an option is present in the passed parameters after an end of options signal'); + } + + public function testGetParameterOption() + { + $input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar')); + $this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name'); + $this->assertFalse($input->getParameterOption('--bar'), '->getParameterOption() returns the default if an option is not present in the passed parameters'); + + $input = new ArrayInput(array('Fabien', '--foo' => 'bar')); + $this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name'); + + $input = new ArrayInput(array('--foo', '--', '--bar' => 'woop')); + $this->assertEquals('woop', $input->getParameterOption('--bar'), '->getParameterOption() returns the correct value if an option is present in the passed parameters'); + $this->assertFalse($input->getParameterOption('--bar', false, true), '->getParameterOption() returns false if an option is present in the passed parameters after an end of options signal'); + } + + public function testParseArguments() + { + $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name')))); + + $this->assertEquals(array('name' => 'foo'), $input->getArguments(), '->parse() parses required arguments'); + } + + /** + * @dataProvider provideOptions + */ + public function testParseOptions($input, $options, $expectedOptions, $message) + { + $input = new ArrayInput($input, new InputDefinition($options)); + + $this->assertEquals($expectedOptions, $input->getOptions(), $message); + } + + public function provideOptions() + { + return array( + array( + array('--foo' => 'bar'), + array(new InputOption('foo')), + array('foo' => 'bar'), + '->parse() parses long options', + ), + array( + array('--foo' => 'bar'), + array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), + array('foo' => 'bar'), + '->parse() parses long options with a default value', + ), + array( + array('--foo' => null), + array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), + array('foo' => 'default'), + '->parse() parses long options with a default value', + ), + array( + array('-f' => 'bar'), + array(new InputOption('foo', 'f')), + array('foo' => 'bar'), + '->parse() parses short options', + ), + array( + array('--' => null, '-f' => 'bar'), + array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), + array('foo' => 'default'), + '->parse() does not parse opts after an end of options signal', + ), + array( + array('--' => null), + array(), + array(), + '->parse() does not choke on end of options signal', + ), + ); + } + + /** + * @dataProvider provideInvalidInput + */ + public function testParseInvalidInput($parameters, $definition, $expectedExceptionMessage) + { + if (method_exists($this, 'expectException')) { + $this->expectException('InvalidArgumentException'); + $this->expectExceptionMessage($expectedExceptionMessage); + } else { + $this->setExpectedException('InvalidArgumentException', $expectedExceptionMessage); + } + + new ArrayInput($parameters, $definition); + } + + public function provideInvalidInput() + { + return array( + array( + array('foo' => 'foo'), + new InputDefinition(array(new InputArgument('name'))), + 'The "foo" argument does not exist.', + ), + array( + array('--foo' => null), + new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), + 'The "--foo" option requires a value.', + ), + array( + array('--foo' => 'foo'), + new InputDefinition(), + 'The "--foo" option does not exist.', + ), + array( + array('-o' => 'foo'), + new InputDefinition(), + 'The "-o" option does not exist.', + ), + ); + } + + public function testToString() + { + $input = new ArrayInput(array('-f' => null, '-b' => 'bar', '--foo' => 'b a z', '--lala' => null, 'test' => 'Foo', 'test2' => "A\nB'C")); + $this->assertEquals('-f -b=bar --foo='.escapeshellarg('b a z').' --lala Foo '.escapeshellarg("A\nB'C"), (string) $input); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputArgumentTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputArgumentTest.php new file mode 100644 index 0000000000000000000000000000000000000000..66af98b33b666fdf9b54f55625e099fc8fb2b36b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputArgumentTest.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Input; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Input\InputArgument; + +class InputArgumentTest extends TestCase +{ + public function testConstructor() + { + $argument = new InputArgument('foo'); + $this->assertEquals('foo', $argument->getName(), '__construct() takes a name as its first argument'); + } + + public function testModes() + { + $argument = new InputArgument('foo'); + $this->assertFalse($argument->isRequired(), '__construct() gives a "InputArgument::OPTIONAL" mode by default'); + + $argument = new InputArgument('foo', null); + $this->assertFalse($argument->isRequired(), '__construct() can take "InputArgument::OPTIONAL" as its mode'); + + $argument = new InputArgument('foo', InputArgument::OPTIONAL); + $this->assertFalse($argument->isRequired(), '__construct() can take "InputArgument::OPTIONAL" as its mode'); + + $argument = new InputArgument('foo', InputArgument::REQUIRED); + $this->assertTrue($argument->isRequired(), '__construct() can take "InputArgument::REQUIRED" as its mode'); + } + + /** + * @dataProvider provideInvalidModes + */ + public function testInvalidModes($mode) + { + if (method_exists($this, 'expectException')) { + $this->expectException('InvalidArgumentException'); + $this->expectExceptionMessage(sprintf('Argument mode "%s" is not valid.', $mode)); + } else { + $this->setExpectedException('InvalidArgumentException', sprintf('Argument mode "%s" is not valid.', $mode)); + } + + new InputArgument('foo', $mode); + } + + public function provideInvalidModes() + { + return array( + array('ANOTHER_ONE'), + array(-1), + ); + } + + public function testIsArray() + { + $argument = new InputArgument('foo', InputArgument::IS_ARRAY); + $this->assertTrue($argument->isArray(), '->isArray() returns true if the argument can be an array'); + $argument = new InputArgument('foo', InputArgument::OPTIONAL | InputArgument::IS_ARRAY); + $this->assertTrue($argument->isArray(), '->isArray() returns true if the argument can be an array'); + $argument = new InputArgument('foo', InputArgument::OPTIONAL); + $this->assertFalse($argument->isArray(), '->isArray() returns false if the argument can not be an array'); + } + + public function testGetDescription() + { + $argument = new InputArgument('foo', null, 'Some description'); + $this->assertEquals('Some description', $argument->getDescription(), '->getDescription() return the message description'); + } + + public function testGetDefault() + { + $argument = new InputArgument('foo', InputArgument::OPTIONAL, '', 'default'); + $this->assertEquals('default', $argument->getDefault(), '->getDefault() return the default value'); + } + + public function testSetDefault() + { + $argument = new InputArgument('foo', InputArgument::OPTIONAL, '', 'default'); + $argument->setDefault(null); + $this->assertNull($argument->getDefault(), '->setDefault() can reset the default value by passing null'); + $argument->setDefault('another'); + $this->assertEquals('another', $argument->getDefault(), '->setDefault() changes the default value'); + + $argument = new InputArgument('foo', InputArgument::OPTIONAL | InputArgument::IS_ARRAY); + $argument->setDefault(array(1, 2)); + $this->assertEquals(array(1, 2), $argument->getDefault(), '->setDefault() changes the default value'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Cannot set a default value except for InputArgument::OPTIONAL mode. + */ + public function testSetDefaultWithRequiredArgument() + { + $argument = new InputArgument('foo', InputArgument::REQUIRED); + $argument->setDefault('default'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage A default value for an array argument must be an array. + */ + public function testSetDefaultWithArrayArgument() + { + $argument = new InputArgument('foo', InputArgument::IS_ARRAY); + $argument->setDefault('default'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1374ddfdf863b174f1446f2e17d18b03b6c66b46 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.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\Console\Tests\Input; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; + +class InputDefinitionTest extends TestCase +{ + protected static $fixtures; + + protected $foo; + protected $bar; + protected $foo1; + protected $foo2; + + public static function setUpBeforeClass() + { + self::$fixtures = __DIR__.'/../Fixtures/'; + } + + public function testConstructorArguments() + { + $this->initializeArguments(); + + $definition = new InputDefinition(); + $this->assertEquals(array(), $definition->getArguments(), '__construct() creates a new InputDefinition object'); + + $definition = new InputDefinition(array($this->foo, $this->bar)); + $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getArguments(), '__construct() takes an array of InputArgument objects as its first argument'); + } + + public function testConstructorOptions() + { + $this->initializeOptions(); + + $definition = new InputDefinition(); + $this->assertEquals(array(), $definition->getOptions(), '__construct() creates a new InputDefinition object'); + + $definition = new InputDefinition(array($this->foo, $this->bar)); + $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getOptions(), '__construct() takes an array of InputOption objects as its first argument'); + } + + public function testSetArguments() + { + $this->initializeArguments(); + + $definition = new InputDefinition(); + $definition->setArguments(array($this->foo)); + $this->assertEquals(array('foo' => $this->foo), $definition->getArguments(), '->setArguments() sets the array of InputArgument objects'); + $definition->setArguments(array($this->bar)); + + $this->assertEquals(array('bar' => $this->bar), $definition->getArguments(), '->setArguments() clears all InputArgument objects'); + } + + public function testAddArguments() + { + $this->initializeArguments(); + + $definition = new InputDefinition(); + $definition->addArguments(array($this->foo)); + $this->assertEquals(array('foo' => $this->foo), $definition->getArguments(), '->addArguments() adds an array of InputArgument objects'); + $definition->addArguments(array($this->bar)); + $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getArguments(), '->addArguments() does not clear existing InputArgument objects'); + } + + public function testAddArgument() + { + $this->initializeArguments(); + + $definition = new InputDefinition(); + $definition->addArgument($this->foo); + $this->assertEquals(array('foo' => $this->foo), $definition->getArguments(), '->addArgument() adds a InputArgument object'); + $definition->addArgument($this->bar); + $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getArguments(), '->addArgument() adds a InputArgument object'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage An argument with name "foo" already exists. + */ + public function testArgumentsMustHaveDifferentNames() + { + $this->initializeArguments(); + + $definition = new InputDefinition(); + $definition->addArgument($this->foo); + $definition->addArgument($this->foo1); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Cannot add an argument after an array argument. + */ + public function testArrayArgumentHasToBeLast() + { + $this->initializeArguments(); + + $definition = new InputDefinition(); + $definition->addArgument(new InputArgument('fooarray', InputArgument::IS_ARRAY)); + $definition->addArgument(new InputArgument('anotherbar')); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Cannot add a required argument after an optional one. + */ + public function testRequiredArgumentCannotFollowAnOptionalOne() + { + $this->initializeArguments(); + + $definition = new InputDefinition(); + $definition->addArgument($this->foo); + $definition->addArgument($this->foo2); + } + + public function testGetArgument() + { + $this->initializeArguments(); + + $definition = new InputDefinition(); + $definition->addArguments(array($this->foo)); + $this->assertEquals($this->foo, $definition->getArgument('foo'), '->getArgument() returns a InputArgument by its name'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The "bar" argument does not exist. + */ + public function testGetInvalidArgument() + { + $this->initializeArguments(); + + $definition = new InputDefinition(); + $definition->addArguments(array($this->foo)); + $definition->getArgument('bar'); + } + + public function testHasArgument() + { + $this->initializeArguments(); + + $definition = new InputDefinition(); + $definition->addArguments(array($this->foo)); + + $this->assertTrue($definition->hasArgument('foo'), '->hasArgument() returns true if a InputArgument exists for the given name'); + $this->assertFalse($definition->hasArgument('bar'), '->hasArgument() returns false if a InputArgument exists for the given name'); + } + + public function testGetArgumentRequiredCount() + { + $this->initializeArguments(); + + $definition = new InputDefinition(); + $definition->addArgument($this->foo2); + $this->assertEquals(1, $definition->getArgumentRequiredCount(), '->getArgumentRequiredCount() returns the number of required arguments'); + $definition->addArgument($this->foo); + $this->assertEquals(1, $definition->getArgumentRequiredCount(), '->getArgumentRequiredCount() returns the number of required arguments'); + } + + public function testGetArgumentCount() + { + $this->initializeArguments(); + + $definition = new InputDefinition(); + $definition->addArgument($this->foo2); + $this->assertEquals(1, $definition->getArgumentCount(), '->getArgumentCount() returns the number of arguments'); + $definition->addArgument($this->foo); + $this->assertEquals(2, $definition->getArgumentCount(), '->getArgumentCount() returns the number of arguments'); + } + + public function testGetArgumentDefaults() + { + $definition = new InputDefinition(array( + new InputArgument('foo1', InputArgument::OPTIONAL), + new InputArgument('foo2', InputArgument::OPTIONAL, '', 'default'), + new InputArgument('foo3', InputArgument::OPTIONAL | InputArgument::IS_ARRAY), + // new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', array(1, 2)), + )); + $this->assertEquals(array('foo1' => null, 'foo2' => 'default', 'foo3' => array()), $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); + + $definition = new InputDefinition(array( + new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', array(1, 2)), + )); + $this->assertEquals(array('foo4' => array(1, 2)), $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); + } + + public function testSetOptions() + { + $this->initializeOptions(); + + $definition = new InputDefinition(array($this->foo)); + $this->assertEquals(array('foo' => $this->foo), $definition->getOptions(), '->setOptions() sets the array of InputOption objects'); + $definition->setOptions(array($this->bar)); + $this->assertEquals(array('bar' => $this->bar), $definition->getOptions(), '->setOptions() clears all InputOption objects'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The "-f" option does not exist. + */ + public function testSetOptionsClearsOptions() + { + $this->initializeOptions(); + + $definition = new InputDefinition(array($this->foo)); + $definition->setOptions(array($this->bar)); + $definition->getOptionForShortcut('f'); + } + + public function testAddOptions() + { + $this->initializeOptions(); + + $definition = new InputDefinition(array($this->foo)); + $this->assertEquals(array('foo' => $this->foo), $definition->getOptions(), '->addOptions() adds an array of InputOption objects'); + $definition->addOptions(array($this->bar)); + $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getOptions(), '->addOptions() does not clear existing InputOption objects'); + } + + public function testAddOption() + { + $this->initializeOptions(); + + $definition = new InputDefinition(); + $definition->addOption($this->foo); + $this->assertEquals(array('foo' => $this->foo), $definition->getOptions(), '->addOption() adds a InputOption object'); + $definition->addOption($this->bar); + $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getOptions(), '->addOption() adds a InputOption object'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage An option named "foo" already exists. + */ + public function testAddDuplicateOption() + { + $this->initializeOptions(); + + $definition = new InputDefinition(); + $definition->addOption($this->foo); + $definition->addOption($this->foo2); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage An option with shortcut "f" already exists. + */ + public function testAddDuplicateShortcutOption() + { + $this->initializeOptions(); + + $definition = new InputDefinition(); + $definition->addOption($this->foo); + $definition->addOption($this->foo1); + } + + public function testGetOption() + { + $this->initializeOptions(); + + $definition = new InputDefinition(array($this->foo)); + $this->assertEquals($this->foo, $definition->getOption('foo'), '->getOption() returns a InputOption by its name'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The "--bar" option does not exist. + */ + public function testGetInvalidOption() + { + $this->initializeOptions(); + + $definition = new InputDefinition(array($this->foo)); + $definition->getOption('bar'); + } + + public function testHasOption() + { + $this->initializeOptions(); + + $definition = new InputDefinition(array($this->foo)); + $this->assertTrue($definition->hasOption('foo'), '->hasOption() returns true if a InputOption exists for the given name'); + $this->assertFalse($definition->hasOption('bar'), '->hasOption() returns false if a InputOption exists for the given name'); + } + + public function testHasShortcut() + { + $this->initializeOptions(); + + $definition = new InputDefinition(array($this->foo)); + $this->assertTrue($definition->hasShortcut('f'), '->hasShortcut() returns true if a InputOption exists for the given shortcut'); + $this->assertFalse($definition->hasShortcut('b'), '->hasShortcut() returns false if a InputOption exists for the given shortcut'); + } + + public function testGetOptionForShortcut() + { + $this->initializeOptions(); + + $definition = new InputDefinition(array($this->foo)); + $this->assertEquals($this->foo, $definition->getOptionForShortcut('f'), '->getOptionForShortcut() returns a InputOption by its shortcut'); + } + + public function testGetOptionForMultiShortcut() + { + $this->initializeOptions(); + + $definition = new InputDefinition(array($this->multi)); + $this->assertEquals($this->multi, $definition->getOptionForShortcut('m'), '->getOptionForShortcut() returns a InputOption by its shortcut'); + $this->assertEquals($this->multi, $definition->getOptionForShortcut('mmm'), '->getOptionForShortcut() returns a InputOption by its shortcut'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The "-l" option does not exist. + */ + public function testGetOptionForInvalidShortcut() + { + $this->initializeOptions(); + + $definition = new InputDefinition(array($this->foo)); + $definition->getOptionForShortcut('l'); + } + + public function testGetOptionDefaults() + { + $definition = new InputDefinition(array( + new InputOption('foo1', null, InputOption::VALUE_NONE), + new InputOption('foo2', null, InputOption::VALUE_REQUIRED), + new InputOption('foo3', null, InputOption::VALUE_REQUIRED, '', 'default'), + new InputOption('foo4', null, InputOption::VALUE_OPTIONAL), + new InputOption('foo5', null, InputOption::VALUE_OPTIONAL, '', 'default'), + new InputOption('foo6', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY), + new InputOption('foo7', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, '', array(1, 2)), + )); + $defaults = array( + 'foo1' => false, + 'foo2' => null, + 'foo3' => 'default', + 'foo4' => null, + 'foo5' => 'default', + 'foo6' => array(), + 'foo7' => array(1, 2), + ); + $this->assertSame($defaults, $definition->getOptionDefaults(), '->getOptionDefaults() returns the default values for all options'); + } + + /** + * @dataProvider getGetSynopsisData + */ + public function testGetSynopsis(InputDefinition $definition, $expectedSynopsis, $message = null) + { + $this->assertEquals($expectedSynopsis, $definition->getSynopsis(), $message ? '->getSynopsis() '.$message : ''); + } + + public function getGetSynopsisData() + { + return array( + array(new InputDefinition(array(new InputOption('foo'))), '[--foo]', 'puts optional options in square brackets'), + array(new InputDefinition(array(new InputOption('foo', 'f'))), '[-f|--foo]', 'separates shortcut with a pipe'), + array(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), '[-f|--foo FOO]', 'uses shortcut as value placeholder'), + array(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL))), '[-f|--foo [FOO]]', 'puts optional values in square brackets'), + + array(new InputDefinition(array(new InputArgument('foo', InputArgument::REQUIRED))), '', 'puts arguments in angle brackets'), + array(new InputDefinition(array(new InputArgument('foo'))), '[]', 'puts optional arguments in square brackets'), + array(new InputDefinition(array(new InputArgument('foo', InputArgument::IS_ARRAY))), '[]...', 'uses an ellipsis for array arguments'), + array(new InputDefinition(array(new InputArgument('foo', InputArgument::REQUIRED | InputArgument::IS_ARRAY))), ' ()...', 'uses parenthesis and ellipsis for required array arguments'), + + array(new InputDefinition(array(new InputOption('foo'), new InputArgument('foo', InputArgument::REQUIRED))), '[--foo] [--] ', 'puts [--] between options and arguments'), + ); + } + + public function testGetShortSynopsis() + { + $definition = new InputDefinition(array(new InputOption('foo'), new InputOption('bar'), new InputArgument('cat'))); + $this->assertEquals('[options] [--] []', $definition->getSynopsis(true), '->getSynopsis(true) groups options in [options]'); + } + + protected function initializeArguments() + { + $this->foo = new InputArgument('foo'); + $this->bar = new InputArgument('bar'); + $this->foo1 = new InputArgument('foo'); + $this->foo2 = new InputArgument('foo2', InputArgument::REQUIRED); + } + + protected function initializeOptions() + { + $this->foo = new InputOption('foo', 'f'); + $this->bar = new InputOption('bar', 'b'); + $this->foo1 = new InputOption('fooBis', 'f'); + $this->foo2 = new InputOption('foo', 'p'); + $this->multi = new InputOption('multi', 'm|mm|mmm'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputOptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputOptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..943bf607f5e5ae2dbbafa71c7c0b288c545a3da3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputOptionTest.php @@ -0,0 +1,210 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Input; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Input\InputOption; + +class InputOptionTest extends TestCase +{ + public function testConstructor() + { + $option = new InputOption('foo'); + $this->assertEquals('foo', $option->getName(), '__construct() takes a name as its first argument'); + $option = new InputOption('--foo'); + $this->assertEquals('foo', $option->getName(), '__construct() removes the leading -- of the option name'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Impossible to have an option mode VALUE_IS_ARRAY if the option does not accept a value. + */ + public function testArrayModeWithoutValue() + { + new InputOption('foo', 'f', InputOption::VALUE_IS_ARRAY); + } + + public function testShortcut() + { + $option = new InputOption('foo', 'f'); + $this->assertEquals('f', $option->getShortcut(), '__construct() can take a shortcut as its second argument'); + $option = new InputOption('foo', '-f|-ff|fff'); + $this->assertEquals('f|ff|fff', $option->getShortcut(), '__construct() removes the leading - of the shortcuts'); + $option = new InputOption('foo', array('f', 'ff', '-fff')); + $this->assertEquals('f|ff|fff', $option->getShortcut(), '__construct() removes the leading - of the shortcuts'); + $option = new InputOption('foo'); + $this->assertNull($option->getShortcut(), '__construct() makes the shortcut null by default'); + } + + public function testModes() + { + $option = new InputOption('foo', 'f'); + $this->assertFalse($option->acceptValue(), '__construct() gives a "InputOption::VALUE_NONE" mode by default'); + $this->assertFalse($option->isValueRequired(), '__construct() gives a "InputOption::VALUE_NONE" mode by default'); + $this->assertFalse($option->isValueOptional(), '__construct() gives a "InputOption::VALUE_NONE" mode by default'); + + $option = new InputOption('foo', 'f', null); + $this->assertFalse($option->acceptValue(), '__construct() can take "InputOption::VALUE_NONE" as its mode'); + $this->assertFalse($option->isValueRequired(), '__construct() can take "InputOption::VALUE_NONE" as its mode'); + $this->assertFalse($option->isValueOptional(), '__construct() can take "InputOption::VALUE_NONE" as its mode'); + + $option = new InputOption('foo', 'f', InputOption::VALUE_NONE); + $this->assertFalse($option->acceptValue(), '__construct() can take "InputOption::VALUE_NONE" as its mode'); + $this->assertFalse($option->isValueRequired(), '__construct() can take "InputOption::VALUE_NONE" as its mode'); + $this->assertFalse($option->isValueOptional(), '__construct() can take "InputOption::VALUE_NONE" as its mode'); + + $option = new InputOption('foo', 'f', InputOption::VALUE_REQUIRED); + $this->assertTrue($option->acceptValue(), '__construct() can take "InputOption::VALUE_REQUIRED" as its mode'); + $this->assertTrue($option->isValueRequired(), '__construct() can take "InputOption::VALUE_REQUIRED" as its mode'); + $this->assertFalse($option->isValueOptional(), '__construct() can take "InputOption::VALUE_REQUIRED" as its mode'); + + $option = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL); + $this->assertTrue($option->acceptValue(), '__construct() can take "InputOption::VALUE_OPTIONAL" as its mode'); + $this->assertFalse($option->isValueRequired(), '__construct() can take "InputOption::VALUE_OPTIONAL" as its mode'); + $this->assertTrue($option->isValueOptional(), '__construct() can take "InputOption::VALUE_OPTIONAL" as its mode'); + } + + /** + * @dataProvider provideInvalidModes + */ + public function testInvalidModes($mode) + { + if (method_exists($this, 'expectException')) { + $this->expectException('InvalidArgumentException'); + $this->expectExceptionMessage(sprintf('Option mode "%s" is not valid.', $mode)); + } else { + $this->setExpectedException('InvalidArgumentException', sprintf('Option mode "%s" is not valid.', $mode)); + } + + new InputOption('foo', 'f', $mode); + } + + public function provideInvalidModes() + { + return array( + array('ANOTHER_ONE'), + array(-1), + ); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testEmptyNameIsInvalid() + { + new InputOption(''); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testDoubleDashNameIsInvalid() + { + new InputOption('--'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testSingleDashOptionIsInvalid() + { + new InputOption('foo', '-'); + } + + public function testIsArray() + { + $option = new InputOption('foo', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY); + $this->assertTrue($option->isArray(), '->isArray() returns true if the option can be an array'); + $option = new InputOption('foo', null, InputOption::VALUE_NONE); + $this->assertFalse($option->isArray(), '->isArray() returns false if the option can not be an array'); + } + + public function testGetDescription() + { + $option = new InputOption('foo', 'f', null, 'Some description'); + $this->assertEquals('Some description', $option->getDescription(), '->getDescription() returns the description message'); + } + + public function testGetDefault() + { + $option = new InputOption('foo', null, InputOption::VALUE_OPTIONAL, '', 'default'); + $this->assertEquals('default', $option->getDefault(), '->getDefault() returns the default value'); + + $option = new InputOption('foo', null, InputOption::VALUE_REQUIRED, '', 'default'); + $this->assertEquals('default', $option->getDefault(), '->getDefault() returns the default value'); + + $option = new InputOption('foo', null, InputOption::VALUE_REQUIRED); + $this->assertNull($option->getDefault(), '->getDefault() returns null if no default value is configured'); + + $option = new InputOption('foo', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY); + $this->assertEquals(array(), $option->getDefault(), '->getDefault() returns an empty array if option is an array'); + + $option = new InputOption('foo', null, InputOption::VALUE_NONE); + $this->assertFalse($option->getDefault(), '->getDefault() returns false if the option does not take a value'); + } + + public function testSetDefault() + { + $option = new InputOption('foo', null, InputOption::VALUE_REQUIRED, '', 'default'); + $option->setDefault(null); + $this->assertNull($option->getDefault(), '->setDefault() can reset the default value by passing null'); + $option->setDefault('another'); + $this->assertEquals('another', $option->getDefault(), '->setDefault() changes the default value'); + + $option = new InputOption('foo', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY); + $option->setDefault(array(1, 2)); + $this->assertEquals(array(1, 2), $option->getDefault(), '->setDefault() changes the default value'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Cannot set a default value when using InputOption::VALUE_NONE mode. + */ + public function testDefaultValueWithValueNoneMode() + { + $option = new InputOption('foo', 'f', InputOption::VALUE_NONE); + $option->setDefault('default'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage A default value for an array option must be an array. + */ + public function testDefaultValueWithIsArrayMode() + { + $option = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY); + $option->setDefault('default'); + } + + public function testEquals() + { + $option = new InputOption('foo', 'f', null, 'Some description'); + $option2 = new InputOption('foo', 'f', null, 'Alternative description'); + $this->assertTrue($option->equals($option2)); + + $option = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, 'Some description'); + $option2 = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, 'Some description', true); + $this->assertFalse($option->equals($option2)); + + $option = new InputOption('foo', 'f', null, 'Some description'); + $option2 = new InputOption('bar', 'f', null, 'Some description'); + $this->assertFalse($option->equals($option2)); + + $option = new InputOption('foo', 'f', null, 'Some description'); + $option2 = new InputOption('foo', '', null, 'Some description'); + $this->assertFalse($option->equals($option2)); + + $option = new InputOption('foo', 'f', null, 'Some description'); + $option2 = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, 'Some description'); + $this->assertFalse($option->equals($option2)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7a2c64eb647f587e14244a8db19d1b7129fc34e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/InputTest.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\Component\Console\Tests\Input; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputOption; + +class InputTest extends TestCase +{ + public function testConstructor() + { + $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name')))); + $this->assertEquals('foo', $input->getArgument('name'), '->__construct() takes a InputDefinition as an argument'); + } + + public function testOptions() + { + $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name')))); + $this->assertEquals('foo', $input->getOption('name'), '->getOption() returns the value for the given option'); + + $input->setOption('name', 'bar'); + $this->assertEquals('bar', $input->getOption('name'), '->setOption() sets the value for a given option'); + $this->assertEquals(array('name' => 'bar'), $input->getOptions(), '->getOptions() returns all option values'); + + $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $this->assertEquals('default', $input->getOption('bar'), '->getOption() returns the default value for optional options'); + $this->assertEquals(array('name' => 'foo', 'bar' => 'default'), $input->getOptions(), '->getOptions() returns all option values, even optional ones'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The "foo" option does not exist. + */ + public function testSetInvalidOption() + { + $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $input->setOption('foo', 'bar'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The "foo" option does not exist. + */ + public function testGetInvalidOption() + { + $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $input->getOption('foo'); + } + + public function testArguments() + { + $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name')))); + $this->assertEquals('foo', $input->getArgument('name'), '->getArgument() returns the value for the given argument'); + + $input->setArgument('name', 'bar'); + $this->assertEquals('bar', $input->getArgument('name'), '->setArgument() sets the value for a given argument'); + $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->getArguments() returns all argument values'); + + $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')))); + $this->assertEquals('default', $input->getArgument('bar'), '->getArgument() returns the default value for optional arguments'); + $this->assertEquals(array('name' => 'foo', 'bar' => 'default'), $input->getArguments(), '->getArguments() returns all argument values, even optional ones'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The "foo" argument does not exist. + */ + public function testSetInvalidArgument() + { + $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')))); + $input->setArgument('foo', 'bar'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The "foo" argument does not exist. + */ + public function testGetInvalidArgument() + { + $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')))); + $input->getArgument('foo'); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage Not enough arguments (missing: "name"). + */ + public function testValidateWithMissingArguments() + { + $input = new ArrayInput(array()); + $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::REQUIRED)))); + $input->validate(); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage Not enough arguments (missing: "name"). + */ + public function testValidateWithMissingRequiredArguments() + { + $input = new ArrayInput(array('bar' => 'baz')); + $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::REQUIRED), new InputArgument('bar', InputArgument::OPTIONAL)))); + $input->validate(); + } + + public function testValidate() + { + $input = new ArrayInput(array('name' => 'foo')); + $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::REQUIRED)))); + + $this->assertNull($input->validate()); + } + + public function testSetGetInteractive() + { + $input = new ArrayInput(array()); + $this->assertTrue($input->isInteractive(), '->isInteractive() returns whether the input should be interactive or not'); + $input->setInteractive(false); + $this->assertFalse($input->isInteractive(), '->setInteractive() changes the interactive flag'); + } + + public function testSetGetStream() + { + $input = new ArrayInput(array()); + $stream = fopen('php://memory', 'r+', false); + $input->setStream($stream); + $this->assertSame($stream, $input->getStream()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/StringInputTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/StringInputTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f2e3467ef8687e354277d495283abaa4ab74d21f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Input/StringInputTest.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Input; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\StringInput; + +class StringInputTest extends TestCase +{ + /** + * @dataProvider getTokenizeData + */ + public function testTokenize($input, $tokens, $message) + { + $input = new StringInput($input); + $r = new \ReflectionClass('Symfony\Component\Console\Input\ArgvInput'); + $p = $r->getProperty('tokens'); + $p->setAccessible(true); + $this->assertEquals($tokens, $p->getValue($input), $message); + } + + public function testInputOptionWithGivenString() + { + $definition = new InputDefinition( + array(new InputOption('foo', null, InputOption::VALUE_REQUIRED)) + ); + + // call to bind + $input = new StringInput('--foo=bar'); + $input->bind($definition); + $this->assertEquals('bar', $input->getOption('foo')); + } + + public function getTokenizeData() + { + return array( + array('', array(), '->tokenize() parses an empty string'), + array('foo', array('foo'), '->tokenize() parses arguments'), + array(' foo bar ', array('foo', 'bar'), '->tokenize() ignores whitespaces between arguments'), + array('"quoted"', array('quoted'), '->tokenize() parses quoted arguments'), + array("'quoted'", array('quoted'), '->tokenize() parses quoted arguments'), + array("'a\rb\nc\td'", array("a\rb\nc\td"), '->tokenize() parses whitespace chars in strings'), + array("'a'\r'b'\n'c'\t'd'", array('a', 'b', 'c', 'd'), '->tokenize() parses whitespace chars between args as spaces'), + array('\"quoted\"', array('"quoted"'), '->tokenize() parses escaped-quoted arguments'), + array("\'quoted\'", array('\'quoted\''), '->tokenize() parses escaped-quoted arguments'), + array('-a', array('-a'), '->tokenize() parses short options'), + array('-azc', array('-azc'), '->tokenize() parses aggregated short options'), + array('-awithavalue', array('-awithavalue'), '->tokenize() parses short options with a value'), + array('-a"foo bar"', array('-afoo bar'), '->tokenize() parses short options with a value'), + array('-a"foo bar""foo bar"', array('-afoo barfoo bar'), '->tokenize() parses short options with a value'), + array('-a\'foo bar\'', array('-afoo bar'), '->tokenize() parses short options with a value'), + array('-a\'foo bar\'\'foo bar\'', array('-afoo barfoo bar'), '->tokenize() parses short options with a value'), + array('-a\'foo bar\'"foo bar"', array('-afoo barfoo bar'), '->tokenize() parses short options with a value'), + array('--long-option', array('--long-option'), '->tokenize() parses long options'), + array('--long-option=foo', array('--long-option=foo'), '->tokenize() parses long options with a value'), + array('--long-option="foo bar"', array('--long-option=foo bar'), '->tokenize() parses long options with a value'), + array('--long-option="foo bar""another"', array('--long-option=foo baranother'), '->tokenize() parses long options with a value'), + array('--long-option=\'foo bar\'', array('--long-option=foo bar'), '->tokenize() parses long options with a value'), + array("--long-option='foo bar''another'", array('--long-option=foo baranother'), '->tokenize() parses long options with a value'), + array("--long-option='foo bar'\"another\"", array('--long-option=foo baranother'), '->tokenize() parses long options with a value'), + array('foo -a -ffoo --long bar', array('foo', '-a', '-ffoo', '--long', 'bar'), '->tokenize() parses when several arguments and options'), + ); + } + + public function testToString() + { + $input = new StringInput('-f foo'); + $this->assertEquals('-f foo', (string) $input); + + $input = new StringInput('-f --bar=foo "a b c d"'); + $this->assertEquals('-f --bar=foo '.escapeshellarg('a b c d'), (string) $input); + + $input = new StringInput('-f --bar=foo \'a b c d\' '."'A\nB\\'C'"); + $this->assertEquals('-f --bar=foo '.escapeshellarg('a b c d').' '.escapeshellarg("A\nB'C"), (string) $input); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cb9f0e8ea1f5fafea5f07cf3c233f7425a8165f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php @@ -0,0 +1,217 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Logger; + +use PHPUnit\Framework\TestCase; +use Psr\Log\LoggerInterface; +use Psr\Log\LogLevel; +use Symfony\Component\Console\Logger\ConsoleLogger; +use Symfony\Component\Console\Output\BufferedOutput; +use Symfony\Component\Console\Tests\Fixtures\DummyOutput; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Console logger test. + * + * @author Kévin Dunglas + * @author Jordi Boggiano + */ +class ConsoleLoggerTest extends TestCase +{ + /** + * @var DummyOutput + */ + protected $output; + + /** + * @return LoggerInterface + */ + public function getLogger() + { + $this->output = new DummyOutput(OutputInterface::VERBOSITY_VERBOSE); + + return new ConsoleLogger($this->output, array( + LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, + LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, + LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, + LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL, + LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL, + LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL, + LogLevel::INFO => OutputInterface::VERBOSITY_NORMAL, + LogLevel::DEBUG => OutputInterface::VERBOSITY_NORMAL, + )); + } + + /** + * Return the log messages in order. + * + * @return string[] + */ + public function getLogs() + { + return $this->output->getLogs(); + } + + /** + * @dataProvider provideOutputMappingParams + */ + public function testOutputMapping($logLevel, $outputVerbosity, $isOutput, $addVerbosityLevelMap = array()) + { + $out = new BufferedOutput($outputVerbosity); + $logger = new ConsoleLogger($out, $addVerbosityLevelMap); + $logger->log($logLevel, 'foo bar'); + $logs = $out->fetch(); + $this->assertEquals($isOutput ? "[$logLevel] foo bar\n" : '', $logs); + } + + public function provideOutputMappingParams() + { + $quietMap = array(LogLevel::EMERGENCY => OutputInterface::VERBOSITY_QUIET); + + return array( + array(LogLevel::EMERGENCY, OutputInterface::VERBOSITY_NORMAL, true), + array(LogLevel::WARNING, OutputInterface::VERBOSITY_NORMAL, true), + array(LogLevel::INFO, OutputInterface::VERBOSITY_NORMAL, false), + array(LogLevel::DEBUG, OutputInterface::VERBOSITY_NORMAL, false), + array(LogLevel::INFO, OutputInterface::VERBOSITY_VERBOSE, false), + array(LogLevel::INFO, OutputInterface::VERBOSITY_VERY_VERBOSE, true), + array(LogLevel::DEBUG, OutputInterface::VERBOSITY_VERY_VERBOSE, false), + array(LogLevel::DEBUG, OutputInterface::VERBOSITY_DEBUG, true), + array(LogLevel::ALERT, OutputInterface::VERBOSITY_QUIET, false), + array(LogLevel::EMERGENCY, OutputInterface::VERBOSITY_QUIET, false), + array(LogLevel::ALERT, OutputInterface::VERBOSITY_QUIET, false, $quietMap), + array(LogLevel::EMERGENCY, OutputInterface::VERBOSITY_QUIET, true, $quietMap), + ); + } + + public function testHasErrored() + { + $logger = new ConsoleLogger(new BufferedOutput()); + + $this->assertFalse($logger->hasErrored()); + + $logger->warning('foo'); + $this->assertFalse($logger->hasErrored()); + + $logger->error('bar'); + $this->assertTrue($logger->hasErrored()); + } + + public function testImplements() + { + $this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger()); + } + + /** + * @dataProvider provideLevelsAndMessages + */ + public function testLogsAtAllLevels($level, $message) + { + $logger = $this->getLogger(); + $logger->{$level}($message, array('user' => 'Bob')); + $logger->log($level, $message, array('user' => 'Bob')); + + $expected = array( + $level.' message of level '.$level.' with context: Bob', + $level.' message of level '.$level.' with context: Bob', + ); + $this->assertEquals($expected, $this->getLogs()); + } + + public function provideLevelsAndMessages() + { + return array( + LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'), + LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'), + LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'), + LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'), + LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'), + LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'), + LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'), + LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'), + ); + } + + /** + * @expectedException \Psr\Log\InvalidArgumentException + */ + public function testThrowsOnInvalidLevel() + { + $logger = $this->getLogger(); + $logger->log('invalid level', 'Foo'); + } + + public function testContextReplacement() + { + $logger = $this->getLogger(); + $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar')); + + $expected = array('info {Message {nothing} Bob Bar a}'); + $this->assertEquals($expected, $this->getLogs()); + } + + public function testObjectCastToString() + { + if (method_exists($this, 'createPartialMock')) { + $dummy = $this->createPartialMock('Symfony\Component\Console\Tests\Logger\DummyTest', array('__toString')); + } else { + $dummy = $this->getMock('Symfony\Component\Console\Tests\Logger\DummyTest', array('__toString')); + } + $dummy->expects($this->once()) + ->method('__toString') + ->will($this->returnValue('DUMMY')); + + $this->getLogger()->warning($dummy); + + $expected = array('warning DUMMY'); + $this->assertEquals($expected, $this->getLogs()); + } + + public function testContextCanContainAnything() + { + $context = array( + 'bool' => true, + 'null' => null, + 'string' => 'Foo', + 'int' => 0, + 'float' => 0.5, + 'nested' => array('with object' => new DummyTest()), + 'object' => new \DateTime(), + 'resource' => fopen('php://memory', 'r'), + ); + + $this->getLogger()->warning('Crazy context data', $context); + + $expected = array('warning Crazy context data'); + $this->assertEquals($expected, $this->getLogs()); + } + + public function testContextExceptionKeyCanBeExceptionOrOtherValues() + { + $logger = $this->getLogger(); + $logger->warning('Random message', array('exception' => 'oops')); + $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); + + $expected = array( + 'warning Random message', + 'critical Uncaught Exception!', + ); + $this->assertEquals($expected, $this->getLogs()); + } +} + +class DummyTest +{ + public function __toString() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/ConsoleOutputTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/ConsoleOutputTest.php new file mode 100644 index 0000000000000000000000000000000000000000..db39a02b8a6166b2b37815538640a28893195827 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/ConsoleOutputTest.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Output; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Output\ConsoleOutput; +use Symfony\Component\Console\Output\Output; + +class ConsoleOutputTest extends TestCase +{ + public function testConstructor() + { + $output = new ConsoleOutput(Output::VERBOSITY_QUIET, true); + $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '__construct() takes the verbosity as its first argument'); + $this->assertSame($output->getFormatter(), $output->getErrorOutput()->getFormatter(), '__construct() takes a formatter or null as the third argument'); + } + + public function testSetFormatter() + { + $output = new ConsoleOutput(); + $outputFormatter = new OutputFormatter(); + $output->setFormatter($outputFormatter); + $this->assertSame($outputFormatter, $output->getFormatter()); + } + + public function testSetVerbosity() + { + $output = new ConsoleOutput(); + $output->setVerbosity(Output::VERBOSITY_VERBOSE); + $this->assertSame(Output::VERBOSITY_VERBOSE, $output->getVerbosity()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/NullOutputTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/NullOutputTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b7ff4be312ea3b87b6ad76700e2bddd31815adde --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/NullOutputTest.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Output; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Output\NullOutput; +use Symfony\Component\Console\Output\Output; +use Symfony\Component\Console\Output\OutputInterface; + +class NullOutputTest extends TestCase +{ + public function testConstructor() + { + $output = new NullOutput(); + + ob_start(); + $output->write('foo'); + $buffer = ob_get_clean(); + + $this->assertSame('', $buffer, '->write() does nothing (at least nothing is printed)'); + $this->assertFalse($output->isDecorated(), '->isDecorated() returns false'); + } + + public function testVerbosity() + { + $output = new NullOutput(); + $this->assertSame(OutputInterface::VERBOSITY_QUIET, $output->getVerbosity(), '->getVerbosity() returns VERBOSITY_QUIET for NullOutput by default'); + + $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); + $this->assertSame(OutputInterface::VERBOSITY_QUIET, $output->getVerbosity(), '->getVerbosity() always returns VERBOSITY_QUIET for NullOutput'); + } + + public function testSetFormatter() + { + $output = new NullOutput(); + $outputFormatter = new OutputFormatter(); + $output->setFormatter($outputFormatter); + $this->assertNotSame($outputFormatter, $output->getFormatter()); + } + + public function testSetVerbosity() + { + $output = new NullOutput(); + $output->setVerbosity(Output::VERBOSITY_NORMAL); + $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity()); + } + + public function testSetDecorated() + { + $output = new NullOutput(); + $output->setDecorated(true); + $this->assertFalse($output->isDecorated()); + } + + public function testIsQuiet() + { + $output = new NullOutput(); + $this->assertTrue($output->isQuiet()); + } + + public function testIsVerbose() + { + $output = new NullOutput(); + $this->assertFalse($output->isVerbose()); + } + + public function testIsVeryVerbose() + { + $output = new NullOutput(); + $this->assertFalse($output->isVeryVerbose()); + } + + public function testIsDebug() + { + $output = new NullOutput(); + $this->assertFalse($output->isDebug()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/OutputTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/OutputTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d8330d0bd399232e11c9cd8e3437c985eda33742 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/OutputTest.php @@ -0,0 +1,176 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Output; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Output\Output; +use Symfony\Component\Console\Formatter\OutputFormatterStyle; + +class OutputTest extends TestCase +{ + public function testConstructor() + { + $output = new TestOutput(Output::VERBOSITY_QUIET, true); + $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '__construct() takes the verbosity as its first argument'); + $this->assertTrue($output->isDecorated(), '__construct() takes the decorated flag as its second argument'); + } + + public function testSetIsDecorated() + { + $output = new TestOutput(); + $output->setDecorated(true); + $this->assertTrue($output->isDecorated(), 'setDecorated() sets the decorated flag'); + } + + public function testSetGetVerbosity() + { + $output = new TestOutput(); + $output->setVerbosity(Output::VERBOSITY_QUIET); + $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '->setVerbosity() sets the verbosity'); + + $this->assertTrue($output->isQuiet()); + $this->assertFalse($output->isVerbose()); + $this->assertFalse($output->isVeryVerbose()); + $this->assertFalse($output->isDebug()); + + $output->setVerbosity(Output::VERBOSITY_NORMAL); + $this->assertFalse($output->isQuiet()); + $this->assertFalse($output->isVerbose()); + $this->assertFalse($output->isVeryVerbose()); + $this->assertFalse($output->isDebug()); + + $output->setVerbosity(Output::VERBOSITY_VERBOSE); + $this->assertFalse($output->isQuiet()); + $this->assertTrue($output->isVerbose()); + $this->assertFalse($output->isVeryVerbose()); + $this->assertFalse($output->isDebug()); + + $output->setVerbosity(Output::VERBOSITY_VERY_VERBOSE); + $this->assertFalse($output->isQuiet()); + $this->assertTrue($output->isVerbose()); + $this->assertTrue($output->isVeryVerbose()); + $this->assertFalse($output->isDebug()); + + $output->setVerbosity(Output::VERBOSITY_DEBUG); + $this->assertFalse($output->isQuiet()); + $this->assertTrue($output->isVerbose()); + $this->assertTrue($output->isVeryVerbose()); + $this->assertTrue($output->isDebug()); + } + + public function testWriteWithVerbosityQuiet() + { + $output = new TestOutput(Output::VERBOSITY_QUIET); + $output->writeln('foo'); + $this->assertEquals('', $output->output, '->writeln() outputs nothing if verbosity is set to VERBOSITY_QUIET'); + } + + public function testWriteAnArrayOfMessages() + { + $output = new TestOutput(); + $output->writeln(array('foo', 'bar')); + $this->assertEquals("foo\nbar\n", $output->output, '->writeln() can take an array of messages to output'); + } + + /** + * @dataProvider provideWriteArguments + */ + public function testWriteRawMessage($message, $type, $expectedOutput) + { + $output = new TestOutput(); + $output->writeln($message, $type); + $this->assertEquals($expectedOutput, $output->output); + } + + public function provideWriteArguments() + { + return array( + array('foo', Output::OUTPUT_RAW, "foo\n"), + array('foo', Output::OUTPUT_PLAIN, "foo\n"), + ); + } + + public function testWriteWithDecorationTurnedOff() + { + $output = new TestOutput(); + $output->setDecorated(false); + $output->writeln('foo'); + $this->assertEquals("foo\n", $output->output, '->writeln() strips decoration tags if decoration is set to false'); + } + + public function testWriteDecoratedMessage() + { + $fooStyle = new OutputFormatterStyle('yellow', 'red', array('blink')); + $output = new TestOutput(); + $output->getFormatter()->setStyle('FOO', $fooStyle); + $output->setDecorated(true); + $output->writeln('foo'); + $this->assertEquals("\033[33;41;5mfoo\033[39;49;25m\n", $output->output, '->writeln() decorates the output'); + } + + public function testWriteWithInvalidStyle() + { + $output = new TestOutput(); + + $output->clear(); + $output->write('foo'); + $this->assertEquals('foo', $output->output, '->write() do nothing when a style does not exist'); + + $output->clear(); + $output->writeln('foo'); + $this->assertEquals("foo\n", $output->output, '->writeln() do nothing when a style does not exist'); + } + + /** + * @dataProvider verbosityProvider + */ + public function testWriteWithVerbosityOption($verbosity, $expected, $msg) + { + $output = new TestOutput(); + + $output->setVerbosity($verbosity); + $output->clear(); + $output->write('1', false); + $output->write('2', false, Output::VERBOSITY_QUIET); + $output->write('3', false, Output::VERBOSITY_NORMAL); + $output->write('4', false, Output::VERBOSITY_VERBOSE); + $output->write('5', false, Output::VERBOSITY_VERY_VERBOSE); + $output->write('6', false, Output::VERBOSITY_DEBUG); + $this->assertEquals($expected, $output->output, $msg); + } + + public function verbosityProvider() + { + return array( + array(Output::VERBOSITY_QUIET, '2', '->write() in QUIET mode only outputs when an explicit QUIET verbosity is passed'), + array(Output::VERBOSITY_NORMAL, '123', '->write() in NORMAL mode outputs anything below an explicit VERBOSE verbosity'), + array(Output::VERBOSITY_VERBOSE, '1234', '->write() in VERBOSE mode outputs anything below an explicit VERY_VERBOSE verbosity'), + array(Output::VERBOSITY_VERY_VERBOSE, '12345', '->write() in VERY_VERBOSE mode outputs anything below an explicit DEBUG verbosity'), + array(Output::VERBOSITY_DEBUG, '123456', '->write() in DEBUG mode outputs everything'), + ); + } +} + +class TestOutput extends Output +{ + public $output = ''; + + public function clear() + { + $this->output = ''; + } + + protected function doWrite($message, $newline) + { + $this->output .= $message.($newline ? "\n" : ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php new file mode 100644 index 0000000000000000000000000000000000000000..780b5681fa8d20c2b14f70fcccbeb383b14cfad4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Output; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Output\Output; +use Symfony\Component\Console\Output\StreamOutput; + +class StreamOutputTest extends TestCase +{ + protected $stream; + + protected function setUp() + { + $this->stream = fopen('php://memory', 'a', false); + } + + protected function tearDown() + { + $this->stream = null; + } + + public function testConstructor() + { + $output = new StreamOutput($this->stream, Output::VERBOSITY_QUIET, true); + $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '__construct() takes the verbosity as its first argument'); + $this->assertTrue($output->isDecorated(), '__construct() takes the decorated flag as its second argument'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The StreamOutput class needs a stream as its first argument. + */ + public function testStreamIsRequired() + { + new StreamOutput('foo'); + } + + public function testGetStream() + { + $output = new StreamOutput($this->stream); + $this->assertEquals($this->stream, $output->getStream(), '->getStream() returns the current stream'); + } + + public function testDoWrite() + { + $output = new StreamOutput($this->stream); + $output->writeln('foo'); + rewind($output->getStream()); + $this->assertEquals('foo'.PHP_EOL, stream_get_contents($output->getStream()), '->doWrite() writes to the stream'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ef6b72a07cc383f11a9cd11c00ed8ff2fadcdced --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Style; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Tester\CommandTester; + +class SymfonyStyleTest extends TestCase +{ + /** @var Command */ + protected $command; + /** @var CommandTester */ + protected $tester; + + protected function setUp() + { + putenv('COLUMNS=121'); + $this->command = new Command('sfstyle'); + $this->tester = new CommandTester($this->command); + } + + protected function tearDown() + { + putenv('COLUMNS'); + $this->command = null; + $this->tester = null; + } + + /** + * @dataProvider inputCommandToOutputFilesProvider + */ + public function testOutputs($inputCommandFilepath, $outputFilepath) + { + $code = require $inputCommandFilepath; + $this->command->setCode($code); + $this->tester->execute(array(), array('interactive' => false, 'decorated' => false)); + $this->assertStringEqualsFile($outputFilepath, $this->tester->getDisplay(true)); + } + + /** + * @dataProvider inputInteractiveCommandToOutputFilesProvider + */ + public function testInteractiveOutputs($inputCommandFilepath, $outputFilepath) + { + $code = require $inputCommandFilepath; + $this->command->setCode($code); + $this->tester->execute(array(), array('interactive' => true, 'decorated' => false)); + $this->assertStringEqualsFile($outputFilepath, $this->tester->getDisplay(true)); + } + + public function inputInteractiveCommandToOutputFilesProvider() + { + $baseDir = __DIR__.'/../Fixtures/Style/SymfonyStyle'; + + return array_map(null, glob($baseDir.'/command/interactive_command_*.php'), glob($baseDir.'/output/interactive_output_*.txt')); + } + + public function inputCommandToOutputFilesProvider() + { + $baseDir = __DIR__.'/../Fixtures/Style/SymfonyStyle'; + + return array_map(null, glob($baseDir.'/command/command_*.php'), glob($baseDir.'/output/output_*.txt')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/TerminalTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/TerminalTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7c39f439430e450cd9752493b41ea42c92277450 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/TerminalTest.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Terminal; + +class TerminalTest extends TestCase +{ + public function test() + { + putenv('COLUMNS=100'); + putenv('LINES=50'); + $terminal = new Terminal(); + $this->assertSame(100, $terminal->getWidth()); + $this->assertSame(50, $terminal->getHeight()); + + putenv('COLUMNS=120'); + putenv('LINES=60'); + $terminal = new Terminal(); + $this->assertSame(120, $terminal->getWidth()); + $this->assertSame(60, $terminal->getHeight()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..57e7136d5580e49863bc9181610c07b504496b71 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Tester; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Output\Output; +use Symfony\Component\Console\Tester\ApplicationTester; + +class ApplicationTesterTest extends TestCase +{ + protected $application; + protected $tester; + + protected function setUp() + { + $this->application = new Application(); + $this->application->setAutoExit(false); + $this->application->register('foo') + ->addArgument('foo') + ->setCode(function ($input, $output) { $output->writeln('foo'); }) + ; + + $this->tester = new ApplicationTester($this->application); + $this->tester->run(array('command' => 'foo', 'foo' => 'bar'), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); + } + + protected function tearDown() + { + $this->application = null; + $this->tester = null; + } + + public function testRun() + { + $this->assertFalse($this->tester->getInput()->isInteractive(), '->execute() takes an interactive option'); + $this->assertFalse($this->tester->getOutput()->isDecorated(), '->execute() takes a decorated option'); + $this->assertEquals(Output::VERBOSITY_VERBOSE, $this->tester->getOutput()->getVerbosity(), '->execute() takes a verbosity option'); + } + + public function testGetInput() + { + $this->assertEquals('bar', $this->tester->getInput()->getArgument('foo'), '->getInput() returns the current input instance'); + } + + public function testGetOutput() + { + rewind($this->tester->getOutput()->getStream()); + $this->assertEquals('foo'.PHP_EOL, stream_get_contents($this->tester->getOutput()->getStream()), '->getOutput() returns the current output instance'); + } + + public function testGetDisplay() + { + $this->assertEquals('foo'.PHP_EOL, $this->tester->getDisplay(), '->getDisplay() returns the display of the last execution'); + } + + public function testGetStatusCode() + { + $this->assertSame(0, $this->tester->getStatusCode(), '->getStatusCode() returns the status code'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8d86da4362afef107f2a7a896b99491997c501f6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php @@ -0,0 +1,163 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Tester; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Output\Output; +use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Component\Console\Question\Question; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Helper\QuestionHelper; +use Symfony\Component\Console\Style\SymfonyStyle; + +class CommandTesterTest extends TestCase +{ + protected $command; + protected $tester; + + protected function setUp() + { + $this->command = new Command('foo'); + $this->command->addArgument('command'); + $this->command->addArgument('foo'); + $this->command->setCode(function ($input, $output) { $output->writeln('foo'); }); + + $this->tester = new CommandTester($this->command); + $this->tester->execute(array('foo' => 'bar'), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); + } + + protected function tearDown() + { + $this->command = null; + $this->tester = null; + } + + public function testExecute() + { + $this->assertFalse($this->tester->getInput()->isInteractive(), '->execute() takes an interactive option'); + $this->assertFalse($this->tester->getOutput()->isDecorated(), '->execute() takes a decorated option'); + $this->assertEquals(Output::VERBOSITY_VERBOSE, $this->tester->getOutput()->getVerbosity(), '->execute() takes a verbosity option'); + } + + public function testGetInput() + { + $this->assertEquals('bar', $this->tester->getInput()->getArgument('foo'), '->getInput() returns the current input instance'); + } + + public function testGetOutput() + { + rewind($this->tester->getOutput()->getStream()); + $this->assertEquals('foo'.PHP_EOL, stream_get_contents($this->tester->getOutput()->getStream()), '->getOutput() returns the current output instance'); + } + + public function testGetDisplay() + { + $this->assertEquals('foo'.PHP_EOL, $this->tester->getDisplay(), '->getDisplay() returns the display of the last execution'); + } + + public function testGetStatusCode() + { + $this->assertSame(0, $this->tester->getStatusCode(), '->getStatusCode() returns the status code'); + } + + public function testCommandFromApplication() + { + $application = new Application(); + $application->setAutoExit(false); + + $command = new Command('foo'); + $command->setCode(function ($input, $output) { $output->writeln('foo'); }); + + $application->add($command); + + $tester = new CommandTester($application->find('foo')); + + // check that there is no need to pass the command name here + $this->assertEquals(0, $tester->execute(array())); + } + + public function testCommandWithInputs() + { + $questions = array( + 'What\'s your name?', + 'How are you?', + 'Where do you come from?', + ); + + $command = new Command('foo'); + $command->setHelperSet(new HelperSet(array(new QuestionHelper()))); + $command->setCode(function ($input, $output) use ($questions, $command) { + $helper = $command->getHelper('question'); + $helper->ask($input, $output, new Question($questions[0])); + $helper->ask($input, $output, new Question($questions[1])); + $helper->ask($input, $output, new Question($questions[2])); + }); + + $tester = new CommandTester($command); + $tester->setInputs(array('Bobby', 'Fine', 'France')); + $tester->execute(array()); + + $this->assertEquals(0, $tester->getStatusCode()); + $this->assertEquals(implode('', $questions), $tester->getDisplay(true)); + } + + /** + * @expectedException \RuntimeException + * @expectedMessage Aborted + */ + public function testCommandWithWrongInputsNumber() + { + $questions = array( + 'What\'s your name?', + 'How are you?', + 'Where do you come from?', + ); + + $command = new Command('foo'); + $command->setHelperSet(new HelperSet(array(new QuestionHelper()))); + $command->setCode(function ($input, $output) use ($questions, $command) { + $helper = $command->getHelper('question'); + $helper->ask($input, $output, new Question($questions[0])); + $helper->ask($input, $output, new Question($questions[1])); + $helper->ask($input, $output, new Question($questions[2])); + }); + + $tester = new CommandTester($command); + $tester->setInputs(array('Bobby', 'Fine')); + $tester->execute(array()); + } + + public function testSymfonyStyleCommandWithInputs() + { + $questions = array( + 'What\'s your name?', + 'How are you?', + 'Where do you come from?', + ); + + $command = new Command('foo'); + $command->setCode(function ($input, $output) use ($questions, $command) { + $io = new SymfonyStyle($input, $output); + $io->ask($questions[0]); + $io->ask($questions[1]); + $io->ask($questions[2]); + }); + + $tester = new CommandTester($command); + $tester->setInputs(array('Bobby', 'Fine', 'France')); + $tester->execute(array()); + + $this->assertEquals(0, $tester->getStatusCode()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Console/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..fab17b8ab797e51d167f111f64a3958e5f25c540 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/composer.json @@ -0,0 +1,47 @@ +{ + "name": "symfony/console", + "type": "library", + "description": "Symfony Console Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0", + "symfony/debug": "~2.8|~3.0" + }, + "require-dev": { + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/filesystem": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0", + "psr/log": "~1.0" + }, + "suggest": { + "symfony/event-dispatcher": "", + "symfony/filesystem": "", + "symfony/process": "", + "psr/log": "For using the console logger" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Console\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Console/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Console/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..8c09554f80fb6b3894f288e1ca080d46d7e5a367 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Console/phpunit.xml.dist @@ -0,0 +1,39 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + + + + + + Symfony\Component\Console + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..4061ff20c3d2ac1d5ad0cc1297dec2144cfb8060 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/CHANGELOG.md @@ -0,0 +1,13 @@ +CHANGELOG +========= + +2.8.0 +----- + + * Added the `CssSelectorConverter` class as a non-static API for the component. + * Deprecated the `CssSelector` static API of the component. + +2.1.0 +----- + + * none diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/CssSelectorConverter.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/CssSelectorConverter.php new file mode 100644 index 0000000000000000000000000000000000000000..8d66dbd0e18f2325e203580c7af623c95323ea38 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/CssSelectorConverter.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\Component\CssSelector; + +use Symfony\Component\CssSelector\Parser\Shortcut\ClassParser; +use Symfony\Component\CssSelector\Parser\Shortcut\ElementParser; +use Symfony\Component\CssSelector\Parser\Shortcut\EmptyStringParser; +use Symfony\Component\CssSelector\Parser\Shortcut\HashParser; +use Symfony\Component\CssSelector\XPath\Extension\HtmlExtension; +use Symfony\Component\CssSelector\XPath\Translator; + +/** + * CssSelectorConverter is the main entry point of the component and can convert CSS + * selectors to XPath expressions. + * + * @author Christophe Coevoet + */ +class CssSelectorConverter +{ + private $translator; + + /** + * @param bool $html Whether HTML support should be enabled. Disable it for XML documents + */ + public function __construct($html = true) + { + $this->translator = new Translator(); + + if ($html) { + $this->translator->registerExtension(new HtmlExtension($this->translator)); + } + + $this->translator + ->registerParserShortcut(new EmptyStringParser()) + ->registerParserShortcut(new ElementParser()) + ->registerParserShortcut(new ClassParser()) + ->registerParserShortcut(new HashParser()) + ; + } + + /** + * Translates a CSS expression to its XPath equivalent. + * + * Optionally, a prefix can be added to the resulting XPath + * expression with the $prefix parameter. + * + * @param string $cssExpr The CSS expression + * @param string $prefix An optional prefix for the XPath expression + * + * @return string + */ + public function toXPath($cssExpr, $prefix = 'descendant-or-self::') + { + return $this->translator->cssToXPath($cssExpr, $prefix); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e4c5ae1b6b3eff833acc0b012e75d7f528d627fb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/ExceptionInterface.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Exception; + +/** + * Interface for exceptions. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/ExpressionErrorException.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/ExpressionErrorException.php new file mode 100644 index 0000000000000000000000000000000000000000..fd5deeabe499854912966896d4bb4dc727f15206 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/ExpressionErrorException.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Exception; + +/** + * ParseException is thrown when a CSS selector syntax is not valid. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + */ +class ExpressionErrorException extends ParseException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/InternalErrorException.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/InternalErrorException.php new file mode 100644 index 0000000000000000000000000000000000000000..e60e5ed0f21d9abfb708c41f6b283d3677e7e153 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/InternalErrorException.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Exception; + +/** + * ParseException is thrown when a CSS selector syntax is not valid. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + */ +class InternalErrorException extends ParseException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/ParseException.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/ParseException.php new file mode 100644 index 0000000000000000000000000000000000000000..3b0b0ee8f14447f27a88bd9dde24c9d18d0ec4f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/ParseException.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Exception; + +/** + * ParseException is thrown when a CSS selector syntax is not valid. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Fabien Potencier + */ +class ParseException extends \Exception implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/SyntaxErrorException.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/SyntaxErrorException.php new file mode 100644 index 0000000000000000000000000000000000000000..cb3158a5536dc73b7652526db831c47bfdde945d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Exception/SyntaxErrorException.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\CssSelector\Exception; + +use Symfony\Component\CssSelector\Parser\Token; + +/** + * ParseException is thrown when a CSS selector syntax is not valid. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + */ +class SyntaxErrorException extends ParseException +{ + /** + * @param string $expectedValue + * @param Token $foundToken + * + * @return self + */ + public static function unexpectedToken($expectedValue, Token $foundToken) + { + return new self(sprintf('Expected %s, but %s found.', $expectedValue, $foundToken)); + } + + /** + * @param string $pseudoElement + * @param string $unexpectedLocation + * + * @return self + */ + public static function pseudoElementFound($pseudoElement, $unexpectedLocation) + { + return new self(sprintf('Unexpected pseudo-element "::%s" found %s.', $pseudoElement, $unexpectedLocation)); + } + + /** + * @param int $position + * + * @return self + */ + public static function unclosedString($position) + { + return new self(sprintf('Unclosed/invalid string at %s.', $position)); + } + + /** + * @return self + */ + public static function nestedNot() + { + return new self('Got nested ::not().'); + } + + /** + * @return self + */ + public static function stringAsFunctionArgument() + { + return new self('String not allowed as function argument.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/AbstractNode.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/AbstractNode.php new file mode 100644 index 0000000000000000000000000000000000000000..7477e9119df32b0ec0e7f81625e54473bab8a41f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/AbstractNode.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Node; + +/** + * Abstract base node class. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +abstract class AbstractNode implements NodeInterface +{ + /** + * @var string + */ + private $nodeName; + + /** + * @return string + */ + public function getNodeName() + { + if (null === $this->nodeName) { + $this->nodeName = preg_replace('~.*\\\\([^\\\\]+)Node$~', '$1', get_called_class()); + } + + return $this->nodeName; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/AttributeNode.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/AttributeNode.php new file mode 100644 index 0000000000000000000000000000000000000000..af872b79e9f2d25286a40a4f84ccab16d3c245d8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/AttributeNode.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Node; + +/** + * Represents a "[| ]" node. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class AttributeNode extends AbstractNode +{ + /** + * @var NodeInterface + */ + private $selector; + + /** + * @var string + */ + private $namespace; + + /** + * @var string + */ + private $attribute; + + /** + * @var string + */ + private $operator; + + /** + * @var string + */ + private $value; + + /** + * @param NodeInterface $selector + * @param string $namespace + * @param string $attribute + * @param string $operator + * @param string $value + */ + public function __construct(NodeInterface $selector, $namespace, $attribute, $operator, $value) + { + $this->selector = $selector; + $this->namespace = $namespace; + $this->attribute = $attribute; + $this->operator = $operator; + $this->value = $value; + } + + /** + * @return NodeInterface + */ + public function getSelector() + { + return $this->selector; + } + + /** + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * @return string + */ + public function getAttribute() + { + return $this->attribute; + } + + /** + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * {@inheritdoc} + */ + public function getSpecificity() + { + return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + $attribute = $this->namespace ? $this->namespace.'|'.$this->attribute : $this->attribute; + + return 'exists' === $this->operator + ? sprintf('%s[%s[%s]]', $this->getNodeName(), $this->selector, $attribute) + : sprintf("%s[%s[%s %s '%s']]", $this->getNodeName(), $this->selector, $attribute, $this->operator, $this->value); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/ClassNode.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/ClassNode.php new file mode 100644 index 0000000000000000000000000000000000000000..f965e7773e89a534037407088d865984c7bc2cab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/ClassNode.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Node; + +/** + * Represents a "." node. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class ClassNode extends AbstractNode +{ + /** + * @var NodeInterface + */ + private $selector; + + /** + * @var string + */ + private $name; + + /** + * @param NodeInterface $selector + * @param string $name + */ + public function __construct(NodeInterface $selector, $name) + { + $this->selector = $selector; + $this->name = $name; + } + + /** + * @return NodeInterface + */ + public function getSelector() + { + return $this->selector; + } + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * {@inheritdoc} + */ + public function getSpecificity() + { + return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return sprintf('%s[%s.%s]', $this->getNodeName(), $this->selector, $this->name); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php new file mode 100644 index 0000000000000000000000000000000000000000..39f659977779c5ac817d9d6442fbfadb13c3b3e3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.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\CssSelector\Node; + +/** + * Represents a combined node. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class CombinedSelectorNode extends AbstractNode +{ + /** + * @var NodeInterface + */ + private $selector; + + /** + * @var string + */ + private $combinator; + + /** + * @var NodeInterface + */ + private $subSelector; + + /** + * @param NodeInterface $selector + * @param string $combinator + * @param NodeInterface $subSelector + */ + public function __construct(NodeInterface $selector, $combinator, NodeInterface $subSelector) + { + $this->selector = $selector; + $this->combinator = $combinator; + $this->subSelector = $subSelector; + } + + /** + * @return NodeInterface + */ + public function getSelector() + { + return $this->selector; + } + + /** + * @return string + */ + public function getCombinator() + { + return $this->combinator; + } + + /** + * @return NodeInterface + */ + public function getSubSelector() + { + return $this->subSelector; + } + + /** + * {@inheritdoc} + */ + public function getSpecificity() + { + return $this->selector->getSpecificity()->plus($this->subSelector->getSpecificity()); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + $combinator = ' ' === $this->combinator ? '' : $this->combinator; + + return sprintf('%s[%s %s %s]', $this->getNodeName(), $this->selector, $combinator, $this->subSelector); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/ElementNode.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/ElementNode.php new file mode 100644 index 0000000000000000000000000000000000000000..06e343e969c117b2360c0b46936967d7287d5531 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/ElementNode.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Node; + +/** + * Represents a "|" node. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class ElementNode extends AbstractNode +{ + /** + * @var string|null + */ + private $namespace; + + /** + * @var string|null + */ + private $element; + + /** + * @param string|null $namespace + * @param string|null $element + */ + public function __construct($namespace = null, $element = null) + { + $this->namespace = $namespace; + $this->element = $element; + } + + /** + * @return null|string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * @return null|string + */ + public function getElement() + { + return $this->element; + } + + /** + * {@inheritdoc} + */ + public function getSpecificity() + { + return new Specificity(0, 0, $this->element ? 1 : 0); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + $element = $this->element ?: '*'; + + return sprintf('%s[%s]', $this->getNodeName(), $this->namespace ? $this->namespace.'|'.$element : $element); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/FunctionNode.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/FunctionNode.php new file mode 100644 index 0000000000000000000000000000000000000000..612f348c5e419ceb1ff024e012f830c40310fa0a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/FunctionNode.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Node; + +use Symfony\Component\CssSelector\Parser\Token; + +/** + * Represents a ":()" node. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class FunctionNode extends AbstractNode +{ + /** + * @var NodeInterface + */ + private $selector; + + /** + * @var string + */ + private $name; + + /** + * @var Token[] + */ + private $arguments; + + /** + * @param NodeInterface $selector + * @param string $name + * @param Token[] $arguments + */ + public function __construct(NodeInterface $selector, $name, array $arguments = array()) + { + $this->selector = $selector; + $this->name = strtolower($name); + $this->arguments = $arguments; + } + + /** + * @return NodeInterface + */ + public function getSelector() + { + return $this->selector; + } + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * @return Token[] + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * {@inheritdoc} + */ + public function getSpecificity() + { + return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + $arguments = implode(', ', array_map(function (Token $token) { + return "'".$token->getValue()."'"; + }, $this->arguments)); + + return sprintf('%s[%s:%s(%s)]', $this->getNodeName(), $this->selector, $this->name, $arguments ? '['.$arguments.']' : ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/HashNode.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/HashNode.php new file mode 100644 index 0000000000000000000000000000000000000000..20db46516280610384a6091e3f73caa1429eb58b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/HashNode.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Node; + +/** + * Represents a "#" node. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class HashNode extends AbstractNode +{ + /** + * @var NodeInterface + */ + private $selector; + + /** + * @var string + */ + private $id; + + /** + * @param NodeInterface $selector + * @param string $id + */ + public function __construct(NodeInterface $selector, $id) + { + $this->selector = $selector; + $this->id = $id; + } + + /** + * @return NodeInterface + */ + public function getSelector() + { + return $this->selector; + } + + /** + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * {@inheritdoc} + */ + public function getSpecificity() + { + return $this->selector->getSpecificity()->plus(new Specificity(1, 0, 0)); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return sprintf('%s[%s#%s]', $this->getNodeName(), $this->selector, $this->id); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/NegationNode.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/NegationNode.php new file mode 100644 index 0000000000000000000000000000000000000000..4b5aa2260d005d6249b9b3ee598172510a336bd8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/NegationNode.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Node; + +/** + * Represents a ":not()" node. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class NegationNode extends AbstractNode +{ + /** + * @var NodeInterface + */ + private $selector; + + /** + * @var NodeInterface + */ + private $subSelector; + + /** + * @param NodeInterface $selector + * @param NodeInterface $subSelector + */ + public function __construct(NodeInterface $selector, NodeInterface $subSelector) + { + $this->selector = $selector; + $this->subSelector = $subSelector; + } + + /** + * @return NodeInterface + */ + public function getSelector() + { + return $this->selector; + } + + /** + * @return NodeInterface + */ + public function getSubSelector() + { + return $this->subSelector; + } + + /** + * {@inheritdoc} + */ + public function getSpecificity() + { + return $this->selector->getSpecificity()->plus($this->subSelector->getSpecificity()); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return sprintf('%s[%s:not(%s)]', $this->getNodeName(), $this->selector, $this->subSelector); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/NodeInterface.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/NodeInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d919e20c7107af85f35e386bafe11fd033b06e92 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/NodeInterface.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Node; + +/** + * Interface for nodes. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +interface NodeInterface +{ + /** + * Returns node's name. + * + * @return string + */ + public function getNodeName(); + + /** + * Returns node's specificity. + * + * @return Specificity + */ + public function getSpecificity(); + + /** + * Returns node's string representation. + * + * @return string + */ + public function __toString(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/PseudoNode.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/PseudoNode.php new file mode 100644 index 0000000000000000000000000000000000000000..c23ddd5912a6685cbf0b12d96d9ee0a9382709b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/PseudoNode.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Node; + +/** + * Represents a ":" node. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class PseudoNode extends AbstractNode +{ + /** + * @var NodeInterface + */ + private $selector; + + /** + * @var string + */ + private $identifier; + + /** + * @param NodeInterface $selector + * @param string $identifier + */ + public function __construct(NodeInterface $selector, $identifier) + { + $this->selector = $selector; + $this->identifier = strtolower($identifier); + } + + /** + * @return NodeInterface + */ + public function getSelector() + { + return $this->selector; + } + + /** + * @return string + */ + public function getIdentifier() + { + return $this->identifier; + } + + /** + * {@inheritdoc} + */ + public function getSpecificity() + { + return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return sprintf('%s[%s:%s]', $this->getNodeName(), $this->selector, $this->identifier); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/SelectorNode.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/SelectorNode.php new file mode 100644 index 0000000000000000000000000000000000000000..729e0911b3c76d6e331af21272ec240b5f8d3917 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/SelectorNode.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Node; + +/** + * Represents a "(::|:)" node. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class SelectorNode extends AbstractNode +{ + /** + * @var NodeInterface + */ + private $tree; + + /** + * @var null|string + */ + private $pseudoElement; + + /** + * @param NodeInterface $tree + * @param null|string $pseudoElement + */ + public function __construct(NodeInterface $tree, $pseudoElement = null) + { + $this->tree = $tree; + $this->pseudoElement = $pseudoElement ? strtolower($pseudoElement) : null; + } + + /** + * @return NodeInterface + */ + public function getTree() + { + return $this->tree; + } + + /** + * @return null|string + */ + public function getPseudoElement() + { + return $this->pseudoElement; + } + + /** + * {@inheritdoc} + */ + public function getSpecificity() + { + return $this->tree->getSpecificity()->plus(new Specificity(0, 0, $this->pseudoElement ? 1 : 0)); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return sprintf('%s[%s%s]', $this->getNodeName(), $this->tree, $this->pseudoElement ? '::'.$this->pseudoElement : ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/Specificity.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/Specificity.php new file mode 100644 index 0000000000000000000000000000000000000000..d09eaca77ef456a2f96139980bae59233b9199d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/Specificity.php @@ -0,0 +1,105 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Node; + +/** + * Represents a node specificity. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @see http://www.w3.org/TR/selectors/#specificity + * + * @author Jean-François Simon + * + * @internal + */ +class Specificity +{ + const A_FACTOR = 100; + const B_FACTOR = 10; + const C_FACTOR = 1; + + /** + * @var int + */ + private $a; + + /** + * @var int + */ + private $b; + + /** + * @var int + */ + private $c; + + /** + * Constructor. + * + * @param int $a + * @param int $b + * @param int $c + */ + public function __construct($a, $b, $c) + { + $this->a = $a; + $this->b = $b; + $this->c = $c; + } + + /** + * @param Specificity $specificity + * + * @return self + */ + public function plus(Specificity $specificity) + { + return new self($this->a + $specificity->a, $this->b + $specificity->b, $this->c + $specificity->c); + } + + /** + * Returns global specificity value. + * + * @return int + */ + public function getValue() + { + return $this->a * self::A_FACTOR + $this->b * self::B_FACTOR + $this->c * self::C_FACTOR; + } + + /** + * Returns -1 if the object specificity is lower than the argument, + * 0 if they are equal, and 1 if the argument is lower. + * + * @param Specificity $specificity + * + * @return int + */ + public function compareTo(Specificity $specificity) + { + if ($this->a !== $specificity->a) { + return $this->a > $specificity->a ? 1 : -1; + } + + if ($this->b !== $specificity->b) { + return $this->b > $specificity->b ? 1 : -1; + } + + if ($this->c !== $specificity->c) { + return $this->c > $specificity->c ? 1 : -1; + } + + return 0; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/CommentHandler.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/CommentHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..a29775cab370f46f7fa2594c64181b8f33d501a0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/CommentHandler.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Handler; + +use Symfony\Component\CssSelector\Parser\Reader; +use Symfony\Component\CssSelector\Parser\TokenStream; + +/** + * CSS selector comment handler. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class CommentHandler implements HandlerInterface +{ + /** + * {@inheritdoc} + */ + public function handle(Reader $reader, TokenStream $stream) + { + if ('/*' !== $reader->getSubstring(2)) { + return false; + } + + $offset = $reader->getOffset('*/'); + + if (false === $offset) { + $reader->moveToEnd(); + } else { + $reader->moveForward($offset + 2); + } + + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/HandlerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/HandlerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a1297c80c089b8572346b3259b64b980b45d3944 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/HandlerInterface.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\Component\CssSelector\Parser\Handler; + +use Symfony\Component\CssSelector\Parser\Reader; +use Symfony\Component\CssSelector\Parser\TokenStream; + +/** + * CSS selector handler interface. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +interface HandlerInterface +{ + /** + * @param Reader $reader + * @param TokenStream $stream + * + * @return bool + */ + public function handle(Reader $reader, TokenStream $stream); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..f74bda51262ac8e78f1b3ad673c2b438e10ff00d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Handler; + +use Symfony\Component\CssSelector\Parser\Reader; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\TokenStream; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; + +/** + * CSS selector comment handler. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class HashHandler implements HandlerInterface +{ + /** + * @var TokenizerPatterns + */ + private $patterns; + + /** + * @var TokenizerEscaping + */ + private $escaping; + + /** + * @param TokenizerPatterns $patterns + * @param TokenizerEscaping $escaping + */ + public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $escaping) + { + $this->patterns = $patterns; + $this->escaping = $escaping; + } + + /** + * {@inheritdoc} + */ + public function handle(Reader $reader, TokenStream $stream) + { + $match = $reader->findPattern($this->patterns->getHashPattern()); + + if (!$match) { + return false; + } + + $value = $this->escaping->escapeUnicode($match[1]); + $stream->push(new Token(Token::TYPE_HASH, $value, $reader->getPosition())); + $reader->moveForward(strlen($match[0])); + + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..358c7c14ad28adedb7dddde1476e8a396885b6f1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Handler; + +use Symfony\Component\CssSelector\Parser\Reader; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\TokenStream; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; + +/** + * CSS selector comment handler. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class IdentifierHandler implements HandlerInterface +{ + /** + * @var TokenizerPatterns + */ + private $patterns; + + /** + * @var TokenizerEscaping + */ + private $escaping; + + /** + * @param TokenizerPatterns $patterns + * @param TokenizerEscaping $escaping + */ + public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $escaping) + { + $this->patterns = $patterns; + $this->escaping = $escaping; + } + + /** + * {@inheritdoc} + */ + public function handle(Reader $reader, TokenStream $stream) + { + $match = $reader->findPattern($this->patterns->getIdentifierPattern()); + + if (!$match) { + return false; + } + + $value = $this->escaping->escapeUnicode($match[0]); + $stream->push(new Token(Token::TYPE_IDENTIFIER, $value, $reader->getPosition())); + $reader->moveForward(strlen($match[0])); + + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..4ea5c484b26fb5cbd3202579282d998fe246df7a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Handler; + +use Symfony\Component\CssSelector\Parser\Reader; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\TokenStream; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; + +/** + * CSS selector comment handler. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class NumberHandler implements HandlerInterface +{ + /** + * @var TokenizerPatterns + */ + private $patterns; + + /** + * @param TokenizerPatterns $patterns + */ + public function __construct(TokenizerPatterns $patterns) + { + $this->patterns = $patterns; + } + + /** + * {@inheritdoc} + */ + public function handle(Reader $reader, TokenStream $stream) + { + $match = $reader->findPattern($this->patterns->getNumberPattern()); + + if (!$match) { + return false; + } + + $stream->push(new Token(Token::TYPE_NUMBER, $match[0], $reader->getPosition())); + $reader->moveForward(strlen($match[0])); + + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..420529601609d0d1da608175f31bb25242472d03 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Handler; + +use Symfony\Component\CssSelector\Exception\InternalErrorException; +use Symfony\Component\CssSelector\Exception\SyntaxErrorException; +use Symfony\Component\CssSelector\Parser\Reader; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\TokenStream; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; + +/** + * CSS selector comment handler. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class StringHandler implements HandlerInterface +{ + /** + * @var TokenizerPatterns + */ + private $patterns; + + /** + * @var TokenizerEscaping + */ + private $escaping; + + /** + * @param TokenizerPatterns $patterns + * @param TokenizerEscaping $escaping + */ + public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $escaping) + { + $this->patterns = $patterns; + $this->escaping = $escaping; + } + + /** + * {@inheritdoc} + */ + public function handle(Reader $reader, TokenStream $stream) + { + $quote = $reader->getSubstring(1); + + if (!in_array($quote, array("'", '"'))) { + return false; + } + + $reader->moveForward(1); + $match = $reader->findPattern($this->patterns->getQuotedStringPattern($quote)); + + if (!$match) { + throw new InternalErrorException(sprintf('Should have found at least an empty match at %s.', $reader->getPosition())); + } + + // check unclosed strings + if (strlen($match[0]) === $reader->getRemainingLength()) { + throw SyntaxErrorException::unclosedString($reader->getPosition() - 1); + } + + // check quotes pairs validity + if ($quote !== $reader->getSubstring(1, strlen($match[0]))) { + throw SyntaxErrorException::unclosedString($reader->getPosition() - 1); + } + + $string = $this->escaping->escapeUnicodeAndNewLine($match[0]); + $stream->push(new Token(Token::TYPE_STRING, $string, $reader->getPosition())); + $reader->moveForward(strlen($match[0]) + 1); + + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/WhitespaceHandler.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/WhitespaceHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..4c2d3354fb83e9d6cb77129cb4799692b65cec32 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Handler/WhitespaceHandler.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Handler; + +use Symfony\Component\CssSelector\Parser\Reader; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\TokenStream; + +/** + * CSS selector whitespace handler. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class WhitespaceHandler implements HandlerInterface +{ + /** + * {@inheritdoc} + */ + public function handle(Reader $reader, TokenStream $stream) + { + $match = $reader->findPattern('~^[ \t\r\n\f]+~'); + + if (false === $match) { + return false; + } + + $stream->push(new Token(Token::TYPE_WHITESPACE, $match[0], $reader->getPosition())); + $reader->moveForward(strlen($match[0])); + + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Parser.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Parser.php new file mode 100644 index 0000000000000000000000000000000000000000..3c5b2dd264b5060b544f0772e9d84af81a765fd1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Parser.php @@ -0,0 +1,401 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser; + +use Symfony\Component\CssSelector\Exception\SyntaxErrorException; +use Symfony\Component\CssSelector\Node; +use Symfony\Component\CssSelector\Parser\Tokenizer\Tokenizer; + +/** + * CSS selector parser. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class Parser implements ParserInterface +{ + /** + * @var Tokenizer + */ + private $tokenizer; + + /** + * Constructor. + * + * @param null|Tokenizer $tokenizer + */ + public function __construct(Tokenizer $tokenizer = null) + { + $this->tokenizer = $tokenizer ?: new Tokenizer(); + } + + /** + * {@inheritdoc} + */ + public function parse($source) + { + $reader = new Reader($source); + $stream = $this->tokenizer->tokenize($reader); + + return $this->parseSelectorList($stream); + } + + /** + * Parses the arguments for ":nth-child()" and friends. + * + * @param Token[] $tokens + * + * @return array + * + * @throws SyntaxErrorException + */ + public static function parseSeries(array $tokens) + { + foreach ($tokens as $token) { + if ($token->isString()) { + throw SyntaxErrorException::stringAsFunctionArgument(); + } + } + + $joined = trim(implode('', array_map(function (Token $token) { + return $token->getValue(); + }, $tokens))); + + $int = function ($string) { + if (!is_numeric($string)) { + throw SyntaxErrorException::stringAsFunctionArgument(); + } + + return (int) $string; + }; + + switch (true) { + case 'odd' === $joined: + return array(2, 1); + case 'even' === $joined: + return array(2, 0); + case 'n' === $joined: + return array(1, 0); + case false === strpos($joined, 'n'): + return array(0, $int($joined)); + } + + $split = explode('n', $joined); + $first = isset($split[0]) ? $split[0] : null; + + return array( + $first ? ('-' === $first || '+' === $first ? $int($first.'1') : $int($first)) : 1, + isset($split[1]) && $split[1] ? $int($split[1]) : 0, + ); + } + + /** + * Parses selector nodes. + * + * @param TokenStream $stream + * + * @return array + */ + private function parseSelectorList(TokenStream $stream) + { + $stream->skipWhitespace(); + $selectors = array(); + + while (true) { + $selectors[] = $this->parserSelectorNode($stream); + + if ($stream->getPeek()->isDelimiter(array(','))) { + $stream->getNext(); + $stream->skipWhitespace(); + } else { + break; + } + } + + return $selectors; + } + + /** + * Parses next selector or combined node. + * + * @param TokenStream $stream + * + * @return Node\SelectorNode + * + * @throws SyntaxErrorException + */ + private function parserSelectorNode(TokenStream $stream) + { + list($result, $pseudoElement) = $this->parseSimpleSelector($stream); + + while (true) { + $stream->skipWhitespace(); + $peek = $stream->getPeek(); + + if ($peek->isFileEnd() || $peek->isDelimiter(array(','))) { + break; + } + + if (null !== $pseudoElement) { + throw SyntaxErrorException::pseudoElementFound($pseudoElement, 'not at the end of a selector'); + } + + if ($peek->isDelimiter(array('+', '>', '~'))) { + $combinator = $stream->getNext()->getValue(); + $stream->skipWhitespace(); + } else { + $combinator = ' '; + } + + list($nextSelector, $pseudoElement) = $this->parseSimpleSelector($stream); + $result = new Node\CombinedSelectorNode($result, $combinator, $nextSelector); + } + + return new Node\SelectorNode($result, $pseudoElement); + } + + /** + * Parses next simple node (hash, class, pseudo, negation). + * + * @param TokenStream $stream + * @param bool $insideNegation + * + * @return array + * + * @throws SyntaxErrorException + */ + private function parseSimpleSelector(TokenStream $stream, $insideNegation = false) + { + $stream->skipWhitespace(); + + $selectorStart = count($stream->getUsed()); + $result = $this->parseElementNode($stream); + $pseudoElement = null; + + while (true) { + $peek = $stream->getPeek(); + if ($peek->isWhitespace() + || $peek->isFileEnd() + || $peek->isDelimiter(array(',', '+', '>', '~')) + || ($insideNegation && $peek->isDelimiter(array(')'))) + ) { + break; + } + + if (null !== $pseudoElement) { + throw SyntaxErrorException::pseudoElementFound($pseudoElement, 'not at the end of a selector'); + } + + if ($peek->isHash()) { + $result = new Node\HashNode($result, $stream->getNext()->getValue()); + } elseif ($peek->isDelimiter(array('.'))) { + $stream->getNext(); + $result = new Node\ClassNode($result, $stream->getNextIdentifier()); + } elseif ($peek->isDelimiter(array('['))) { + $stream->getNext(); + $result = $this->parseAttributeNode($result, $stream); + } elseif ($peek->isDelimiter(array(':'))) { + $stream->getNext(); + + if ($stream->getPeek()->isDelimiter(array(':'))) { + $stream->getNext(); + $pseudoElement = $stream->getNextIdentifier(); + + continue; + } + + $identifier = $stream->getNextIdentifier(); + if (in_array(strtolower($identifier), array('first-line', 'first-letter', 'before', 'after'))) { + // Special case: CSS 2.1 pseudo-elements can have a single ':'. + // Any new pseudo-element must have two. + $pseudoElement = $identifier; + + continue; + } + + if (!$stream->getPeek()->isDelimiter(array('('))) { + $result = new Node\PseudoNode($result, $identifier); + + continue; + } + + $stream->getNext(); + $stream->skipWhitespace(); + + if ('not' === strtolower($identifier)) { + if ($insideNegation) { + throw SyntaxErrorException::nestedNot(); + } + + list($argument, $argumentPseudoElement) = $this->parseSimpleSelector($stream, true); + $next = $stream->getNext(); + + if (null !== $argumentPseudoElement) { + throw SyntaxErrorException::pseudoElementFound($argumentPseudoElement, 'inside ::not()'); + } + + if (!$next->isDelimiter(array(')'))) { + throw SyntaxErrorException::unexpectedToken('")"', $next); + } + + $result = new Node\NegationNode($result, $argument); + } else { + $arguments = array(); + $next = null; + + while (true) { + $stream->skipWhitespace(); + $next = $stream->getNext(); + + if ($next->isIdentifier() + || $next->isString() + || $next->isNumber() + || $next->isDelimiter(array('+', '-')) + ) { + $arguments[] = $next; + } elseif ($next->isDelimiter(array(')'))) { + break; + } else { + throw SyntaxErrorException::unexpectedToken('an argument', $next); + } + } + + if (empty($arguments)) { + throw SyntaxErrorException::unexpectedToken('at least one argument', $next); + } + + $result = new Node\FunctionNode($result, $identifier, $arguments); + } + } else { + throw SyntaxErrorException::unexpectedToken('selector', $peek); + } + } + + if (count($stream->getUsed()) === $selectorStart) { + throw SyntaxErrorException::unexpectedToken('selector', $stream->getPeek()); + } + + return array($result, $pseudoElement); + } + + /** + * Parses next element node. + * + * @param TokenStream $stream + * + * @return Node\ElementNode + */ + private function parseElementNode(TokenStream $stream) + { + $peek = $stream->getPeek(); + + if ($peek->isIdentifier() || $peek->isDelimiter(array('*'))) { + if ($peek->isIdentifier()) { + $namespace = $stream->getNext()->getValue(); + } else { + $stream->getNext(); + $namespace = null; + } + + if ($stream->getPeek()->isDelimiter(array('|'))) { + $stream->getNext(); + $element = $stream->getNextIdentifierOrStar(); + } else { + $element = $namespace; + $namespace = null; + } + } else { + $element = $namespace = null; + } + + return new Node\ElementNode($namespace, $element); + } + + /** + * Parses next attribute node. + * + * @param Node\NodeInterface $selector + * @param TokenStream $stream + * + * @return Node\AttributeNode + * + * @throws SyntaxErrorException + */ + private function parseAttributeNode(Node\NodeInterface $selector, TokenStream $stream) + { + $stream->skipWhitespace(); + $attribute = $stream->getNextIdentifierOrStar(); + + if (null === $attribute && !$stream->getPeek()->isDelimiter(array('|'))) { + throw SyntaxErrorException::unexpectedToken('"|"', $stream->getPeek()); + } + + if ($stream->getPeek()->isDelimiter(array('|'))) { + $stream->getNext(); + + if ($stream->getPeek()->isDelimiter(array('='))) { + $namespace = null; + $stream->getNext(); + $operator = '|='; + } else { + $namespace = $attribute; + $attribute = $stream->getNextIdentifier(); + $operator = null; + } + } else { + $namespace = $operator = null; + } + + if (null === $operator) { + $stream->skipWhitespace(); + $next = $stream->getNext(); + + if ($next->isDelimiter(array(']'))) { + return new Node\AttributeNode($selector, $namespace, $attribute, 'exists', null); + } elseif ($next->isDelimiter(array('='))) { + $operator = '='; + } elseif ($next->isDelimiter(array('^', '$', '*', '~', '|', '!')) + && $stream->getPeek()->isDelimiter(array('=')) + ) { + $operator = $next->getValue().'='; + $stream->getNext(); + } else { + throw SyntaxErrorException::unexpectedToken('operator', $next); + } + } + + $stream->skipWhitespace(); + $value = $stream->getNext(); + + if ($value->isNumber()) { + // if the value is a number, it's casted into a string + $value = new Token(Token::TYPE_STRING, (string) $value->getValue(), $value->getPosition()); + } + + if (!($value->isIdentifier() || $value->isString())) { + throw SyntaxErrorException::unexpectedToken('string or identifier', $value); + } + + $stream->skipWhitespace(); + $next = $stream->getNext(); + + if (!$next->isDelimiter(array(']'))) { + throw SyntaxErrorException::unexpectedToken('"]"', $next); + } + + return new Node\AttributeNode($selector, $namespace, $attribute, $operator, $value->getValue()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/ParserInterface.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/ParserInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c5af20367de8c889060c9eb952c3931311c2bf42 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/ParserInterface.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\Component\CssSelector\Parser; + +use Symfony\Component\CssSelector\Node\SelectorNode; + +/** + * CSS selector parser interface. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +interface ParserInterface +{ + /** + * Parses given selector source into an array of tokens. + * + * @param string $source + * + * @return SelectorNode[] + */ + public function parse($source); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Reader.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Reader.php new file mode 100644 index 0000000000000000000000000000000000000000..79ea34f9dba9dd2b2838a18f295ed080d5e79d36 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Reader.php @@ -0,0 +1,125 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser; + +/** + * CSS selector reader. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class Reader +{ + /** + * @var string + */ + private $source; + + /** + * @var int + */ + private $length; + + /** + * @var int + */ + private $position = 0; + + /** + * @param string $source + */ + public function __construct($source) + { + $this->source = $source; + $this->length = strlen($source); + } + + /** + * @return bool + */ + public function isEOF() + { + return $this->position >= $this->length; + } + + /** + * @return int + */ + public function getPosition() + { + return $this->position; + } + + /** + * @return int + */ + public function getRemainingLength() + { + return $this->length - $this->position; + } + + /** + * @param int $length + * @param int $offset + * + * @return string + */ + public function getSubstring($length, $offset = 0) + { + return substr($this->source, $this->position + $offset, $length); + } + + /** + * @param string $string + * + * @return int + */ + public function getOffset($string) + { + $position = strpos($this->source, $string, $this->position); + + return false === $position ? false : $position - $this->position; + } + + /** + * @param string $pattern + * + * @return bool + */ + public function findPattern($pattern) + { + $source = substr($this->source, $this->position); + + if (preg_match($pattern, $source, $matches)) { + return $matches; + } + + return false; + } + + /** + * @param int $length + */ + public function moveForward($length) + { + $this->position += $length; + } + + public function moveToEnd() + { + $this->position = $this->length; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php new file mode 100644 index 0000000000000000000000000000000000000000..c513de5ff12ee68da5e992656be44a341a1b5b9e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Shortcut; + +use Symfony\Component\CssSelector\Node\ClassNode; +use Symfony\Component\CssSelector\Node\ElementNode; +use Symfony\Component\CssSelector\Node\SelectorNode; +use Symfony\Component\CssSelector\Parser\ParserInterface; + +/** + * CSS selector class parser shortcut. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class ClassParser implements ParserInterface +{ + /** + * {@inheritdoc} + */ + public function parse($source) + { + // Matches an optional namespace, optional element, and required class + // $source = 'test|input.ab6bd_field'; + // $matches = array (size=4) + // 0 => string 'test|input.ab6bd_field' (length=22) + // 1 => string 'test' (length=4) + // 2 => string 'input' (length=5) + // 3 => string 'ab6bd_field' (length=11) + if (preg_match('/^(?:([a-z]++)\|)?+([\w-]++|\*)?+\.([\w-]++)$/i', trim($source), $matches)) { + return array( + new SelectorNode(new ClassNode(new ElementNode($matches[1] ?: null, $matches[2] ?: null), $matches[3])), + ); + } + + return array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php new file mode 100644 index 0000000000000000000000000000000000000000..c29f5e442e739960d88c0757bf1131c18cf8596c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Shortcut; + +use Symfony\Component\CssSelector\Node\ElementNode; +use Symfony\Component\CssSelector\Node\SelectorNode; +use Symfony\Component\CssSelector\Parser\ParserInterface; + +/** + * CSS selector element parser shortcut. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class ElementParser implements ParserInterface +{ + /** + * {@inheritdoc} + */ + public function parse($source) + { + // Matches an optional namespace, required element or `*` + // $source = 'testns|testel'; + // $matches = array (size=3) + // 0 => string 'testns|testel' (length=13) + // 1 => string 'testns' (length=6) + // 2 => string 'testel' (length=6) + if (preg_match('/^(?:([a-z]++)\|)?([\w-]++|\*)$/i', trim($source), $matches)) { + return array(new SelectorNode(new ElementNode($matches[1] ?: null, $matches[2]))); + } + + return array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php new file mode 100644 index 0000000000000000000000000000000000000000..016cf0a848207d107c5fee3082fa8991eb8b19b5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Shortcut; + +use Symfony\Component\CssSelector\Node\ElementNode; +use Symfony\Component\CssSelector\Node\SelectorNode; +use Symfony\Component\CssSelector\Parser\ParserInterface; + +/** + * CSS selector class parser shortcut. + * + * This shortcut ensure compatibility with previous version. + * - The parser fails to parse an empty string. + * - In the previous version, an empty string matches each tags. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class EmptyStringParser implements ParserInterface +{ + /** + * {@inheritdoc} + */ + public function parse($source) + { + // Matches an empty string + if ($source == '') { + return array(new SelectorNode(new ElementNode(null, '*'))); + } + + return array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php new file mode 100644 index 0000000000000000000000000000000000000000..3f3883bb8d2e91af8cbc3a5a79dfb387dc1d2259 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Shortcut; + +use Symfony\Component\CssSelector\Node\ElementNode; +use Symfony\Component\CssSelector\Node\HashNode; +use Symfony\Component\CssSelector\Node\SelectorNode; +use Symfony\Component\CssSelector\Parser\ParserInterface; + +/** + * CSS selector hash parser shortcut. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class HashParser implements ParserInterface +{ + /** + * {@inheritdoc} + */ + public function parse($source) + { + // Matches an optional namespace, optional element, and required id + // $source = 'test|input#ab6bd_field'; + // $matches = array (size=4) + // 0 => string 'test|input#ab6bd_field' (length=22) + // 1 => string 'test' (length=4) + // 2 => string 'input' (length=5) + // 3 => string 'ab6bd_field' (length=11) + if (preg_match('/^(?:([a-z]++)\|)?+([\w-]++|\*)?+#([\w-]++)$/i', trim($source), $matches)) { + return array( + new SelectorNode(new HashNode(new ElementNode($matches[1] ?: null, $matches[2] ?: null), $matches[3])), + ); + } + + return array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Token.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Token.php new file mode 100644 index 0000000000000000000000000000000000000000..68fac59b03a32bb4f70b0ce17515fdaaa42f3418 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Token.php @@ -0,0 +1,162 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser; + +/** + * CSS selector token. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class Token +{ + const TYPE_FILE_END = 'eof'; + const TYPE_DELIMITER = 'delimiter'; + const TYPE_WHITESPACE = 'whitespace'; + const TYPE_IDENTIFIER = 'identifier'; + const TYPE_HASH = 'hash'; + const TYPE_NUMBER = 'number'; + const TYPE_STRING = 'string'; + + /** + * @var int + */ + private $type; + + /** + * @var string + */ + private $value; + + /** + * @var int + */ + private $position; + + /** + * @param int $type + * @param string $value + * @param int $position + */ + public function __construct($type, $value, $position) + { + $this->type = $type; + $this->value = $value; + $this->position = $position; + } + + /** + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * @return int + */ + public function getPosition() + { + return $this->position; + } + + /** + * @return bool + */ + public function isFileEnd() + { + return self::TYPE_FILE_END === $this->type; + } + + /** + * @param array $values + * + * @return bool + */ + public function isDelimiter(array $values = array()) + { + if (self::TYPE_DELIMITER !== $this->type) { + return false; + } + + if (empty($values)) { + return true; + } + + return in_array($this->value, $values); + } + + /** + * @return bool + */ + public function isWhitespace() + { + return self::TYPE_WHITESPACE === $this->type; + } + + /** + * @return bool + */ + public function isIdentifier() + { + return self::TYPE_IDENTIFIER === $this->type; + } + + /** + * @return bool + */ + public function isHash() + { + return self::TYPE_HASH === $this->type; + } + + /** + * @return bool + */ + public function isNumber() + { + return self::TYPE_NUMBER === $this->type; + } + + /** + * @return bool + */ + public function isString() + { + return self::TYPE_STRING === $this->type; + } + + /** + * @return string + */ + public function __toString() + { + if ($this->value) { + return sprintf('<%s "%s" at %s>', $this->type, $this->value, $this->position); + } + + return sprintf('<%s at %s>', $this->type, $this->position); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/TokenStream.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/TokenStream.php new file mode 100644 index 0000000000000000000000000000000000000000..aeba0f86c06eee31f26ce7f088256dc0623a5c78 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/TokenStream.php @@ -0,0 +1,184 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser; + +use Symfony\Component\CssSelector\Exception\InternalErrorException; +use Symfony\Component\CssSelector\Exception\SyntaxErrorException; + +/** + * CSS selector token stream. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class TokenStream +{ + /** + * @var Token[] + */ + private $tokens = array(); + + /** + * @var bool + */ + private $frozen = false; + + /** + * @var Token[] + */ + private $used = array(); + + /** + * @var int + */ + private $cursor = 0; + + /** + * @var Token|null + */ + private $peeked = null; + + /** + * @var bool + */ + private $peeking = false; + + /** + * Pushes a token. + * + * @param Token $token + * + * @return $this + */ + public function push(Token $token) + { + $this->tokens[] = $token; + + return $this; + } + + /** + * Freezes stream. + * + * @return $this + */ + public function freeze() + { + $this->frozen = true; + + return $this; + } + + /** + * Returns next token. + * + * @return Token + * + * @throws InternalErrorException If there is no more token + */ + public function getNext() + { + if ($this->peeking) { + $this->peeking = false; + $this->used[] = $this->peeked; + + return $this->peeked; + } + + if (!isset($this->tokens[$this->cursor])) { + throw new InternalErrorException('Unexpected token stream end.'); + } + + return $this->tokens[$this->cursor++]; + } + + /** + * Returns peeked token. + * + * @return Token + */ + public function getPeek() + { + if (!$this->peeking) { + $this->peeked = $this->getNext(); + $this->peeking = true; + } + + return $this->peeked; + } + + /** + * Returns used tokens. + * + * @return Token[] + */ + public function getUsed() + { + return $this->used; + } + + /** + * Returns nex identifier token. + * + * @return string The identifier token value + * + * @throws SyntaxErrorException If next token is not an identifier + */ + public function getNextIdentifier() + { + $next = $this->getNext(); + + if (!$next->isIdentifier()) { + throw SyntaxErrorException::unexpectedToken('identifier', $next); + } + + return $next->getValue(); + } + + /** + * Returns nex identifier or star delimiter token. + * + * @return null|string The identifier token value or null if star found + * + * @throws SyntaxErrorException If next token is not an identifier or a star delimiter + */ + public function getNextIdentifierOrStar() + { + $next = $this->getNext(); + + if ($next->isIdentifier()) { + return $next->getValue(); + } + + if ($next->isDelimiter(array('*'))) { + return; + } + + throw SyntaxErrorException::unexpectedToken('identifier or "*"', $next); + } + + /** + * Skips next whitespace if any. + */ + public function skipWhitespace() + { + $peek = $this->getPeek(); + + if ($peek->isWhitespace()) { + $this->getNext(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php new file mode 100644 index 0000000000000000000000000000000000000000..aa9fc5077341a329fd54b33742343e8c5a41fa6d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Tokenizer; + +use Symfony\Component\CssSelector\Parser\Handler; +use Symfony\Component\CssSelector\Parser\Reader; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\TokenStream; + +/** + * CSS selector tokenizer. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class Tokenizer +{ + /** + * @var Handler\HandlerInterface[] + */ + private $handlers; + + /** + * Constructor. + */ + public function __construct() + { + $patterns = new TokenizerPatterns(); + $escaping = new TokenizerEscaping($patterns); + + $this->handlers = array( + new Handler\WhitespaceHandler(), + new Handler\IdentifierHandler($patterns, $escaping), + new Handler\HashHandler($patterns, $escaping), + new Handler\StringHandler($patterns, $escaping), + new Handler\NumberHandler($patterns), + new Handler\CommentHandler(), + ); + } + + /** + * Tokenize selector source code. + * + * @param Reader $reader + * + * @return TokenStream + */ + public function tokenize(Reader $reader) + { + $stream = new TokenStream(); + + while (!$reader->isEOF()) { + foreach ($this->handlers as $handler) { + if ($handler->handle($reader, $stream)) { + continue 2; + } + } + + $stream->push(new Token(Token::TYPE_DELIMITER, $reader->getSubstring(1), $reader->getPosition())); + $reader->moveForward(1); + } + + return $stream + ->push(new Token(Token::TYPE_FILE_END, null, $reader->getPosition())) + ->freeze(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerEscaping.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerEscaping.php new file mode 100644 index 0000000000000000000000000000000000000000..af4c31e5b09b82261d8a07d592c19822c75583f5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerEscaping.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Tokenizer; + +/** + * CSS selector tokenizer escaping applier. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class TokenizerEscaping +{ + /** + * @var TokenizerPatterns + */ + private $patterns; + + /** + * @param TokenizerPatterns $patterns + */ + public function __construct(TokenizerPatterns $patterns) + { + $this->patterns = $patterns; + } + + /** + * @param string $value + * + * @return string + */ + public function escapeUnicode($value) + { + $value = $this->replaceUnicodeSequences($value); + + return preg_replace($this->patterns->getSimpleEscapePattern(), '$1', $value); + } + + /** + * @param string $value + * + * @return string + */ + public function escapeUnicodeAndNewLine($value) + { + $value = preg_replace($this->patterns->getNewLineEscapePattern(), '', $value); + + return $this->escapeUnicode($value); + } + + /** + * @param string $value + * + * @return string + */ + private function replaceUnicodeSequences($value) + { + return preg_replace_callback($this->patterns->getUnicodeEscapePattern(), function ($match) { + $c = hexdec($match[1]); + + if (0x80 > $c %= 0x200000) { + return chr($c); + } + if (0x800 > $c) { + return chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F); + } + if (0x10000 > $c) { + return chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); + } + }, $value); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerPatterns.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerPatterns.php new file mode 100644 index 0000000000000000000000000000000000000000..5b071cd090f84ffba64e24b3729eec6416e560b4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerPatterns.php @@ -0,0 +1,162 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Parser\Tokenizer; + +/** + * CSS selector tokenizer patterns builder. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class TokenizerPatterns +{ + /** + * @var string + */ + private $unicodeEscapePattern; + + /** + * @var string + */ + private $simpleEscapePattern; + + /** + * @var string + */ + private $newLineEscapePattern; + + /** + * @var string + */ + private $escapePattern; + + /** + * @var string + */ + private $stringEscapePattern; + + /** + * @var string + */ + private $nonAsciiPattern; + + /** + * @var string + */ + private $nmCharPattern; + + /** + * @var string + */ + private $nmStartPattern; + + /** + * @var string + */ + private $identifierPattern; + + /** + * @var string + */ + private $hashPattern; + + /** + * @var string + */ + private $numberPattern; + + /** + * @var string + */ + private $quotedStringPattern; + + /** + * Constructor. + */ + public function __construct() + { + $this->unicodeEscapePattern = '\\\\([0-9a-f]{1,6})(?:\r\n|[ \n\r\t\f])?'; + $this->simpleEscapePattern = '\\\\(.)'; + $this->newLineEscapePattern = '\\\\(?:\n|\r\n|\r|\f)'; + $this->escapePattern = $this->unicodeEscapePattern.'|\\\\[^\n\r\f0-9a-f]'; + $this->stringEscapePattern = $this->newLineEscapePattern.'|'.$this->escapePattern; + $this->nonAsciiPattern = '[^\x00-\x7F]'; + $this->nmCharPattern = '[_a-z0-9-]|'.$this->escapePattern.'|'.$this->nonAsciiPattern; + $this->nmStartPattern = '[_a-z]|'.$this->escapePattern.'|'.$this->nonAsciiPattern; + $this->identifierPattern = '(?:'.$this->nmStartPattern.')(?:'.$this->nmCharPattern.')*'; + $this->hashPattern = '#((?:'.$this->nmCharPattern.')+)'; + $this->numberPattern = '[+-]?(?:[0-9]*\.[0-9]+|[0-9]+)'; + $this->quotedStringPattern = '([^\n\r\f%s]|'.$this->stringEscapePattern.')*'; + } + + /** + * @return string + */ + public function getNewLineEscapePattern() + { + return '~^'.$this->newLineEscapePattern.'~'; + } + + /** + * @return string + */ + public function getSimpleEscapePattern() + { + return '~^'.$this->simpleEscapePattern.'~'; + } + + /** + * @return string + */ + public function getUnicodeEscapePattern() + { + return '~^'.$this->unicodeEscapePattern.'~i'; + } + + /** + * @return string + */ + public function getIdentifierPattern() + { + return '~^'.$this->identifierPattern.'~i'; + } + + /** + * @return string + */ + public function getHashPattern() + { + return '~^'.$this->hashPattern.'~i'; + } + + /** + * @return string + */ + public function getNumberPattern() + { + return '~^'.$this->numberPattern.'~'; + } + + /** + * @param string $quote + * + * @return string + */ + public function getQuotedStringPattern($quote) + { + return '~^'.sprintf($this->quotedStringPattern, $quote).'~i'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/README.md b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7c4c411635dc2b8916bcfe92add7f02a0188fd11 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/README.md @@ -0,0 +1,20 @@ +CssSelector Component +===================== + +The CssSelector component converts CSS selectors to XPath expressions. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/css_selector.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) + +Credits +------- + +This component is a port of the Python cssselect library +[v0.7.1](https://github.com/SimonSapin/cssselect/releases/tag/v0.7.1), +which is distributed under the BSD license. diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a27fadfef1e70b2c2af1bbcd99e3ea2f01df9563 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\CssSelectorConverter; + +class CssSelectorConverterTest extends TestCase +{ + public function testCssToXPath() + { + $converter = new CssSelectorConverter(); + + $this->assertEquals('descendant-or-self::*', $converter->toXPath('')); + $this->assertEquals('descendant-or-self::h1', $converter->toXPath('h1')); + $this->assertEquals("descendant-or-self::h1[@id = 'foo']", $converter->toXPath('h1#foo')); + $this->assertEquals("descendant-or-self::h1[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]", $converter->toXPath('h1.foo')); + $this->assertEquals('descendant-or-self::foo:h1', $converter->toXPath('foo|h1')); + $this->assertEquals('descendant-or-self::h1', $converter->toXPath('H1')); + } + + public function testCssToXPathXml() + { + $converter = new CssSelectorConverter(false); + + $this->assertEquals('descendant-or-self::H1', $converter->toXPath('H1')); + } + + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ParseException + * @expectedExceptionMessage Expected identifier, but found. + */ + public function testParseExceptions() + { + $converter = new CssSelectorConverter(); + $converter->toXPath('h1:'); + } + + /** @dataProvider getCssToXPathWithoutPrefixTestData */ + public function testCssToXPathWithoutPrefix($css, $xpath) + { + $converter = new CssSelectorConverter(); + + $this->assertEquals($xpath, $converter->toXPath($css, ''), '->parse() parses an input string and returns a node'); + } + + public function getCssToXPathWithoutPrefixTestData() + { + return array( + array('h1', 'h1'), + array('foo|h1', 'foo:h1'), + array('h1, h2, h3', 'h1 | h2 | h3'), + array('h1:nth-child(3n+1)', "*/*[name() = 'h1' and (position() - 1 >= 0 and (position() - 1) mod 3 = 0)]"), + array('h1 > p', 'h1/p'), + array('h1#foo', "h1[@id = 'foo']"), + array('h1.foo', "h1[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"), + array('h1[class*="foo bar"]', "h1[@class and contains(@class, 'foo bar')]"), + array('h1[foo|class*="foo bar"]', "h1[@foo:class and contains(@foo:class, 'foo bar')]"), + array('h1[class]', 'h1[@class]'), + array('h1 .foo', "h1/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"), + array('h1 #foo', "h1/descendant-or-self::*/*[@id = 'foo']"), + array('h1 [class*=foo]', "h1/descendant-or-self::*/*[@class and contains(@class, 'foo')]"), + array('div>.foo', "div/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"), + array('div > .foo', "div/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/AbstractNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/AbstractNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..595551338061ee95d367694b85cd11f0e78ad90c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/AbstractNodeTest.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Node; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\Node\NodeInterface; + +abstract class AbstractNodeTest extends TestCase +{ + /** @dataProvider getToStringConversionTestData */ + public function testToStringConversion(NodeInterface $node, $representation) + { + $this->assertEquals($representation, (string) $node); + } + + /** @dataProvider getSpecificityValueTestData */ + public function testSpecificityValue(NodeInterface $node, $value) + { + $this->assertEquals($value, $node->getSpecificity()->getValue()); + } + + abstract public function getToStringConversionTestData(); + + abstract public function getSpecificityValueTestData(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/AttributeNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/AttributeNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1fd090f5a6e8c1f1109282f65d85f24f28f29289 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/AttributeNodeTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Node; + +use Symfony\Component\CssSelector\Node\AttributeNode; +use Symfony\Component\CssSelector\Node\ElementNode; + +class AttributeNodeTest extends AbstractNodeTest +{ + public function getToStringConversionTestData() + { + return array( + array(new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 'Attribute[Element[*][attribute]]'), + array(new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), "Attribute[Element[*][attribute $= 'value']]"), + array(new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), "Attribute[Element[*][namespace|attribute $= 'value']]"), + ); + } + + public function getSpecificityValueTestData() + { + return array( + array(new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 10), + array(new AttributeNode(new ElementNode(null, 'element'), null, 'attribute', 'exists', null), 11), + array(new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), 10), + array(new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), 10), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ClassNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ClassNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e0ab45accc31de8f51013ab80e37f239d16657fd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ClassNodeTest.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Node; + +use Symfony\Component\CssSelector\Node\ClassNode; +use Symfony\Component\CssSelector\Node\ElementNode; + +class ClassNodeTest extends AbstractNodeTest +{ + public function getToStringConversionTestData() + { + return array( + array(new ClassNode(new ElementNode(), 'class'), 'Class[Element[*].class]'), + ); + } + + public function getSpecificityValueTestData() + { + return array( + array(new ClassNode(new ElementNode(), 'class'), 10), + array(new ClassNode(new ElementNode(null, 'element'), 'class'), 11), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/CombinedSelectorNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/CombinedSelectorNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9547298a6fdf3faee1450dee4539d80f049b5cd5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/CombinedSelectorNodeTest.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Node; + +use Symfony\Component\CssSelector\Node\CombinedSelectorNode; +use Symfony\Component\CssSelector\Node\ElementNode; + +class CombinedSelectorNodeTest extends AbstractNodeTest +{ + public function getToStringConversionTestData() + { + return array( + array(new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 'CombinedSelector[Element[*] > Element[*]]'), + array(new CombinedSelectorNode(new ElementNode(), ' ', new ElementNode()), 'CombinedSelector[Element[*] Element[*]]'), + ); + } + + public function getSpecificityValueTestData() + { + return array( + array(new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 0), + array(new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode()), 1), + array(new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode(null, 'element')), 2), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6d24789320561905a29555d7ea307f1b7d1ac29c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Node; + +use Symfony\Component\CssSelector\Node\ElementNode; + +class ElementNodeTest extends AbstractNodeTest +{ + public function getToStringConversionTestData() + { + return array( + array(new ElementNode(), 'Element[*]'), + array(new ElementNode(null, 'element'), 'Element[element]'), + array(new ElementNode('namespace', 'element'), 'Element[namespace|element]'), + ); + } + + public function getSpecificityValueTestData() + { + return array( + array(new ElementNode(), 0), + array(new ElementNode(null, 'element'), 1), + array(new ElementNode('namespace', 'element'), 1), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/FunctionNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/FunctionNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ee3ce51ba549954ecf473d313fa96638e8ab98fd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/FunctionNodeTest.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Node; + +use Symfony\Component\CssSelector\Node\ElementNode; +use Symfony\Component\CssSelector\Node\FunctionNode; +use Symfony\Component\CssSelector\Parser\Token; + +class FunctionNodeTest extends AbstractNodeTest +{ + public function getToStringConversionTestData() + { + return array( + array(new FunctionNode(new ElementNode(), 'function'), 'Function[Element[*]:function()]'), + array(new FunctionNode(new ElementNode(), 'function', array( + new Token(Token::TYPE_IDENTIFIER, 'value', 0), + )), "Function[Element[*]:function(['value'])]"), + array(new FunctionNode(new ElementNode(), 'function', array( + new Token(Token::TYPE_STRING, 'value1', 0), + new Token(Token::TYPE_NUMBER, 'value2', 0), + )), "Function[Element[*]:function(['value1', 'value2'])]"), + ); + } + + public function getSpecificityValueTestData() + { + return array( + array(new FunctionNode(new ElementNode(), 'function'), 10), + array(new FunctionNode(new ElementNode(), 'function', array( + new Token(Token::TYPE_IDENTIFIER, 'value', 0), + )), 10), + array(new FunctionNode(new ElementNode(), 'function', array( + new Token(Token::TYPE_STRING, 'value1', 0), + new Token(Token::TYPE_NUMBER, 'value2', 0), + )), 10), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/HashNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/HashNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8554b226d6c7fe3fb00ad21784826f3595c5bbeb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/HashNodeTest.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Node; + +use Symfony\Component\CssSelector\Node\HashNode; +use Symfony\Component\CssSelector\Node\ElementNode; + +class HashNodeTest extends AbstractNodeTest +{ + public function getToStringConversionTestData() + { + return array( + array(new HashNode(new ElementNode(), 'id'), 'Hash[Element[*]#id]'), + ); + } + + public function getSpecificityValueTestData() + { + return array( + array(new HashNode(new ElementNode(), 'id'), 100), + array(new HashNode(new ElementNode(null, 'id'), 'class'), 101), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/NegationNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/NegationNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..edf4552bac8b8dadae6cb6c7e5c76688903770d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/NegationNodeTest.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Node; + +use Symfony\Component\CssSelector\Node\ClassNode; +use Symfony\Component\CssSelector\Node\NegationNode; +use Symfony\Component\CssSelector\Node\ElementNode; + +class NegationNodeTest extends AbstractNodeTest +{ + public function getToStringConversionTestData() + { + return array( + array(new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 'Negation[Element[*]:not(Class[Element[*].class])]'), + ); + } + + public function getSpecificityValueTestData() + { + return array( + array(new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 10), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/PseudoNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/PseudoNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bc57813cc8fe16300834a2ab1e5c100d6e2870ae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/PseudoNodeTest.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\Component\CssSelector\Tests\Node; + +use Symfony\Component\CssSelector\Node\ElementNode; +use Symfony\Component\CssSelector\Node\PseudoNode; + +class PseudoNodeTest extends AbstractNodeTest +{ + public function getToStringConversionTestData() + { + return array( + array(new PseudoNode(new ElementNode(), 'pseudo'), 'Pseudo[Element[*]:pseudo]'), + ); + } + + public function getSpecificityValueTestData() + { + return array( + array(new PseudoNode(new ElementNode(), 'pseudo'), 10), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SelectorNodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SelectorNodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5badf71d16d1bb9f92714e24414f91ca541607e3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SelectorNodeTest.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Node; + +use Symfony\Component\CssSelector\Node\ElementNode; +use Symfony\Component\CssSelector\Node\SelectorNode; + +class SelectorNodeTest extends AbstractNodeTest +{ + public function getToStringConversionTestData() + { + return array( + array(new SelectorNode(new ElementNode()), 'Selector[Element[*]]'), + array(new SelectorNode(new ElementNode(), 'pseudo'), 'Selector[Element[*]::pseudo]'), + ); + } + + public function getSpecificityValueTestData() + { + return array( + array(new SelectorNode(new ElementNode()), 0), + array(new SelectorNode(new ElementNode(), 'pseudo'), 1), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b58eb8929c85e4c562938659b877133eed004281 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.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\Component\CssSelector\Tests\Node; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\Node\Specificity; + +class SpecificityTest extends TestCase +{ + /** @dataProvider getValueTestData */ + public function testValue(Specificity $specificity, $value) + { + $this->assertEquals($value, $specificity->getValue()); + } + + /** @dataProvider getValueTestData */ + public function testPlusValue(Specificity $specificity, $value) + { + $this->assertEquals($value + 123, $specificity->plus(new Specificity(1, 2, 3))->getValue()); + } + + public function getValueTestData() + { + return array( + array(new Specificity(0, 0, 0), 0), + array(new Specificity(0, 0, 2), 2), + array(new Specificity(0, 3, 0), 30), + array(new Specificity(4, 0, 0), 400), + array(new Specificity(4, 3, 2), 432), + ); + } + + /** @dataProvider getCompareTestData */ + public function testCompareTo(Specificity $a, Specificity $b, $result) + { + $this->assertEquals($result, $a->compareTo($b)); + } + + public function getCompareTestData() + { + return array( + array(new Specificity(0, 0, 0), new Specificity(0, 0, 0), 0), + array(new Specificity(0, 0, 1), new Specificity(0, 0, 1), 0), + array(new Specificity(0, 0, 2), new Specificity(0, 0, 1), 1), + array(new Specificity(0, 0, 2), new Specificity(0, 0, 3), -1), + array(new Specificity(0, 4, 0), new Specificity(0, 4, 0), 0), + array(new Specificity(0, 6, 0), new Specificity(0, 5, 11), 1), + array(new Specificity(0, 7, 0), new Specificity(0, 8, 0), -1), + array(new Specificity(9, 0, 0), new Specificity(9, 0, 0), 0), + array(new Specificity(11, 0, 0), new Specificity(10, 11, 0), 1), + array(new Specificity(12, 11, 0), new Specificity(13, 0, 0), -1), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8005616a9208e9f5b9a5bf7a6012038c8e3d65ef --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTest.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Parser\Handler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\Parser\Reader; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\TokenStream; + +/** + * @author Jean-François Simon + */ +abstract class AbstractHandlerTest extends TestCase +{ + /** @dataProvider getHandleValueTestData */ + public function testHandleValue($value, Token $expectedToken, $remainingContent) + { + $reader = new Reader($value); + $stream = new TokenStream(); + + $this->assertTrue($this->generateHandler()->handle($reader, $stream)); + $this->assertEquals($expectedToken, $stream->getNext()); + $this->assertRemainingContent($reader, $remainingContent); + } + + /** @dataProvider getDontHandleValueTestData */ + public function testDontHandleValue($value) + { + $reader = new Reader($value); + $stream = new TokenStream(); + + $this->assertFalse($this->generateHandler()->handle($reader, $stream)); + $this->assertStreamEmpty($stream); + $this->assertRemainingContent($reader, $value); + } + + abstract public function getHandleValueTestData(); + + abstract public function getDontHandleValueTestData(); + + abstract protected function generateHandler(); + + protected function assertStreamEmpty(TokenStream $stream) + { + $property = new \ReflectionProperty($stream, 'tokens'); + $property->setAccessible(true); + + $this->assertEquals(array(), $property->getValue($stream)); + } + + protected function assertRemainingContent(Reader $reader, $remainingContent) + { + if ('' === $remainingContent) { + $this->assertEquals(0, $reader->getRemainingLength()); + $this->assertTrue($reader->isEOF()); + } else { + $this->assertEquals(strlen($remainingContent), $reader->getRemainingLength()); + $this->assertEquals(0, $reader->getOffset($remainingContent)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3961bf7d55ad9ee48d6356cd3ea02a34ff9c6eca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Parser\Handler; + +use Symfony\Component\CssSelector\Parser\Handler\CommentHandler; +use Symfony\Component\CssSelector\Parser\Reader; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\TokenStream; + +class CommentHandlerTest extends AbstractHandlerTest +{ + /** @dataProvider getHandleValueTestData */ + public function testHandleValue($value, Token $unusedArgument, $remainingContent) + { + $reader = new Reader($value); + $stream = new TokenStream(); + + $this->assertTrue($this->generateHandler()->handle($reader, $stream)); + // comments are ignored (not pushed as token in stream) + $this->assertStreamEmpty($stream); + $this->assertRemainingContent($reader, $remainingContent); + } + + public function getHandleValueTestData() + { + return array( + // 2nd argument only exists for inherited method compatibility + array('/* comment */', new Token(null, null, null), ''), + array('/* comment */foo', new Token(null, null, null), 'foo'), + ); + } + + public function getDontHandleValueTestData() + { + return array( + array('>'), + array('+'), + array(' '), + ); + } + + protected function generateHandler() + { + return new CommentHandler(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b7fa00a2255eed45b8420cd3bb22d955f50dae98 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Parser\Handler; + +use Symfony\Component\CssSelector\Parser\Handler\HashHandler; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping; + +class HashHandlerTest extends AbstractHandlerTest +{ + public function getHandleValueTestData() + { + return array( + array('#id', new Token(Token::TYPE_HASH, 'id', 0), ''), + array('#123', new Token(Token::TYPE_HASH, '123', 0), ''), + + array('#id.class', new Token(Token::TYPE_HASH, 'id', 0), '.class'), + array('#id element', new Token(Token::TYPE_HASH, 'id', 0), ' element'), + ); + } + + public function getDontHandleValueTestData() + { + return array( + array('id'), + array('123'), + array('<'), + array('<'), + array('#'), + ); + } + + protected function generateHandler() + { + $patterns = new TokenizerPatterns(); + + return new HashHandler($patterns, new TokenizerEscaping($patterns)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..44d35749845ab724364517fd32861f34ac155dbd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Parser\Handler; + +use Symfony\Component\CssSelector\Parser\Handler\IdentifierHandler; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping; + +class IdentifierHandlerTest extends AbstractHandlerTest +{ + public function getHandleValueTestData() + { + return array( + array('foo', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ''), + array('foo|bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '|bar'), + array('foo.class', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '.class'), + array('foo[attr]', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '[attr]'), + array('foo bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ' bar'), + ); + } + + public function getDontHandleValueTestData() + { + return array( + array('>'), + array('+'), + array(' '), + array('*|foo'), + array('/* comment */'), + ); + } + + protected function generateHandler() + { + $patterns = new TokenizerPatterns(); + + return new IdentifierHandler($patterns, new TokenizerEscaping($patterns)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..675fd05b43ef895ab439939ef0c04deb2bb46349 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Parser\Handler; + +use Symfony\Component\CssSelector\Parser\Handler\NumberHandler; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; + +class NumberHandlerTest extends AbstractHandlerTest +{ + public function getHandleValueTestData() + { + return array( + array('12', new Token(Token::TYPE_NUMBER, '12', 0), ''), + array('12.34', new Token(Token::TYPE_NUMBER, '12.34', 0), ''), + array('+12.34', new Token(Token::TYPE_NUMBER, '+12.34', 0), ''), + array('-12.34', new Token(Token::TYPE_NUMBER, '-12.34', 0), ''), + + array('12 arg', new Token(Token::TYPE_NUMBER, '12', 0), ' arg'), + array('12]', new Token(Token::TYPE_NUMBER, '12', 0), ']'), + ); + } + + public function getDontHandleValueTestData() + { + return array( + array('hello'), + array('>'), + array('+'), + array(' '), + array('/* comment */'), + ); + } + + protected function generateHandler() + { + $patterns = new TokenizerPatterns(); + + return new NumberHandler($patterns); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..89eff8bd2825bb02f8af446d605cb812deba6bed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Parser\Handler; + +use Symfony\Component\CssSelector\Parser\Handler\StringHandler; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping; + +class StringHandlerTest extends AbstractHandlerTest +{ + public function getHandleValueTestData() + { + return array( + array('"hello"', new Token(Token::TYPE_STRING, 'hello', 1), ''), + array('"1"', new Token(Token::TYPE_STRING, '1', 1), ''), + array('" "', new Token(Token::TYPE_STRING, ' ', 1), ''), + array('""', new Token(Token::TYPE_STRING, '', 1), ''), + array("'hello'", new Token(Token::TYPE_STRING, 'hello', 1), ''), + + array("'foo'bar", new Token(Token::TYPE_STRING, 'foo', 1), 'bar'), + ); + } + + public function getDontHandleValueTestData() + { + return array( + array('hello'), + array('>'), + array('1'), + array(' '), + ); + } + + protected function generateHandler() + { + $patterns = new TokenizerPatterns(); + + return new StringHandler($patterns, new TokenizerEscaping($patterns)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f5f9e71dc228782051938ca231c5d61589419ef6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Parser\Handler; + +use Symfony\Component\CssSelector\Parser\Handler\WhitespaceHandler; +use Symfony\Component\CssSelector\Parser\Token; + +class WhitespaceHandlerTest extends AbstractHandlerTest +{ + public function getHandleValueTestData() + { + return array( + array(' ', new Token(Token::TYPE_WHITESPACE, ' ', 0), ''), + array("\n", new Token(Token::TYPE_WHITESPACE, "\n", 0), ''), + array("\t", new Token(Token::TYPE_WHITESPACE, "\t", 0), ''), + + array(' foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), 'foo'), + array(' .foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), '.foo'), + ); + } + + public function getDontHandleValueTestData() + { + return array( + array('>'), + array('1'), + array('a'), + ); + } + + protected function generateHandler() + { + return new WhitespaceHandler(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..37a3ef1d58defd1158445415704cbe564101ee63 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php @@ -0,0 +1,249 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Parser; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\Exception\SyntaxErrorException; +use Symfony\Component\CssSelector\Node\FunctionNode; +use Symfony\Component\CssSelector\Node\SelectorNode; +use Symfony\Component\CssSelector\Parser\Parser; +use Symfony\Component\CssSelector\Parser\Token; + +class ParserTest extends TestCase +{ + /** @dataProvider getParserTestData */ + public function testParser($source, $representation) + { + $parser = new Parser(); + + $this->assertEquals($representation, array_map(function (SelectorNode $node) { + return (string) $node->getTree(); + }, $parser->parse($source))); + } + + /** @dataProvider getParserExceptionTestData */ + public function testParserException($source, $message) + { + $parser = new Parser(); + + try { + $parser->parse($source); + $this->fail('Parser should throw a SyntaxErrorException.'); + } catch (SyntaxErrorException $e) { + $this->assertEquals($message, $e->getMessage()); + } + } + + /** @dataProvider getPseudoElementsTestData */ + public function testPseudoElements($source, $element, $pseudo) + { + $parser = new Parser(); + $selectors = $parser->parse($source); + $this->assertCount(1, $selectors); + + /** @var SelectorNode $selector */ + $selector = $selectors[0]; + $this->assertEquals($element, (string) $selector->getTree()); + $this->assertEquals($pseudo, (string) $selector->getPseudoElement()); + } + + /** @dataProvider getSpecificityTestData */ + public function testSpecificity($source, $value) + { + $parser = new Parser(); + $selectors = $parser->parse($source); + $this->assertCount(1, $selectors); + + /** @var SelectorNode $selector */ + $selector = $selectors[0]; + $this->assertEquals($value, $selector->getSpecificity()->getValue()); + } + + /** @dataProvider getParseSeriesTestData */ + public function testParseSeries($series, $a, $b) + { + $parser = new Parser(); + $selectors = $parser->parse(sprintf(':nth-child(%s)', $series)); + $this->assertCount(1, $selectors); + + /** @var FunctionNode $function */ + $function = $selectors[0]->getTree(); + $this->assertEquals(array($a, $b), Parser::parseSeries($function->getArguments())); + } + + /** @dataProvider getParseSeriesExceptionTestData */ + public function testParseSeriesException($series) + { + $parser = new Parser(); + $selectors = $parser->parse(sprintf(':nth-child(%s)', $series)); + $this->assertCount(1, $selectors); + + /** @var FunctionNode $function */ + $function = $selectors[0]->getTree(); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\CssSelector\Exception\SyntaxErrorException'); + Parser::parseSeries($function->getArguments()); + } + + public function getParserTestData() + { + return array( + array('*', array('Element[*]')), + array('*|*', array('Element[*]')), + array('*|foo', array('Element[foo]')), + array('foo|*', array('Element[foo|*]')), + array('foo|bar', array('Element[foo|bar]')), + array('#foo#bar', array('Hash[Hash[Element[*]#foo]#bar]')), + array('div>.foo', array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), + array('div> .foo', array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), + array('div >.foo', array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), + array('div > .foo', array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), + array("div \n> \t \t .foo", array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), + array('td.foo,.bar', array('Class[Element[td].foo]', 'Class[Element[*].bar]')), + array('td.foo, .bar', array('Class[Element[td].foo]', 'Class[Element[*].bar]')), + array("td.foo\t\r\n\f ,\t\r\n\f .bar", array('Class[Element[td].foo]', 'Class[Element[*].bar]')), + array('td.foo,.bar', array('Class[Element[td].foo]', 'Class[Element[*].bar]')), + array('td.foo, .bar', array('Class[Element[td].foo]', 'Class[Element[*].bar]')), + array("td.foo\t\r\n\f ,\t\r\n\f .bar", array('Class[Element[td].foo]', 'Class[Element[*].bar]')), + array('div, td.foo, div.bar span', array('Element[div]', 'Class[Element[td].foo]', 'CombinedSelector[Class[Element[div].bar] Element[span]]')), + array('div > p', array('CombinedSelector[Element[div] > Element[p]]')), + array('td:first', array('Pseudo[Element[td]:first]')), + array('td :first', array('CombinedSelector[Element[td] Pseudo[Element[*]:first]]')), + array('a[name]', array('Attribute[Element[a][name]]')), + array("a[ name\t]", array('Attribute[Element[a][name]]')), + array('a [name]', array('CombinedSelector[Element[a] Attribute[Element[*][name]]]')), + array('a[rel="include"]', array("Attribute[Element[a][rel = 'include']]")), + array('a[rel = include]', array("Attribute[Element[a][rel = 'include']]")), + array("a[hreflang |= 'en']", array("Attribute[Element[a][hreflang |= 'en']]")), + array('a[hreflang|=en]', array("Attribute[Element[a][hreflang |= 'en']]")), + array('div:nth-child(10)', array("Function[Element[div]:nth-child(['10'])]")), + array(':nth-child(2n+2)', array("Function[Element[*]:nth-child(['2', 'n', '+2'])]")), + array('div:nth-of-type(10)', array("Function[Element[div]:nth-of-type(['10'])]")), + array('div div:nth-of-type(10) .aclass', array("CombinedSelector[CombinedSelector[Element[div] Function[Element[div]:nth-of-type(['10'])]] Class[Element[*].aclass]]")), + array('label:only', array('Pseudo[Element[label]:only]')), + array('a:lang(fr)', array("Function[Element[a]:lang(['fr'])]")), + array('div:contains("foo")', array("Function[Element[div]:contains(['foo'])]")), + array('div#foobar', array('Hash[Element[div]#foobar]')), + array('div:not(div.foo)', array('Negation[Element[div]:not(Class[Element[div].foo])]')), + array('td ~ th', array('CombinedSelector[Element[td] ~ Element[th]]')), + array('.foo[data-bar][data-baz=0]', array("Attribute[Attribute[Class[Element[*].foo][data-bar]][data-baz = '0']]")), + ); + } + + public function getParserExceptionTestData() + { + return array( + array('attributes(href)/html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()), + array('attributes(href)', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()), + array('html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '/', 4))->getMessage()), + array(' ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 1))->getMessage()), + array('div, ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 5))->getMessage()), + array(' , div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 1))->getMessage()), + array('p, , div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 3))->getMessage()), + array('div > ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 6))->getMessage()), + array(' > div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '>', 2))->getMessage()), + array('foo|#bar', SyntaxErrorException::unexpectedToken('identifier or "*"', new Token(Token::TYPE_HASH, 'bar', 4))->getMessage()), + array('#.foo', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '#', 0))->getMessage()), + array('.#foo', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_HASH, 'foo', 1))->getMessage()), + array(':#foo', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_HASH, 'foo', 1))->getMessage()), + array('[*]', SyntaxErrorException::unexpectedToken('"|"', new Token(Token::TYPE_DELIMITER, ']', 2))->getMessage()), + array('[foo|]', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_DELIMITER, ']', 5))->getMessage()), + array('[#]', SyntaxErrorException::unexpectedToken('identifier or "*"', new Token(Token::TYPE_DELIMITER, '#', 1))->getMessage()), + array('[foo=#]', SyntaxErrorException::unexpectedToken('string or identifier', new Token(Token::TYPE_DELIMITER, '#', 5))->getMessage()), + array(':nth-child()', SyntaxErrorException::unexpectedToken('at least one argument', new Token(Token::TYPE_DELIMITER, ')', 11))->getMessage()), + array('[href]a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_IDENTIFIER, 'a', 6))->getMessage()), + array('[rel:stylesheet]', SyntaxErrorException::unexpectedToken('operator', new Token(Token::TYPE_DELIMITER, ':', 4))->getMessage()), + array('[rel=stylesheet', SyntaxErrorException::unexpectedToken('"]"', new Token(Token::TYPE_FILE_END, '', 15))->getMessage()), + array(':lang(fr', SyntaxErrorException::unexpectedToken('an argument', new Token(Token::TYPE_FILE_END, '', 8))->getMessage()), + array(':contains("foo', SyntaxErrorException::unclosedString(10)->getMessage()), + array('foo!', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '!', 3))->getMessage()), + ); + } + + public function getPseudoElementsTestData() + { + return array( + array('foo', 'Element[foo]', ''), + array('*', 'Element[*]', ''), + array(':empty', 'Pseudo[Element[*]:empty]', ''), + array(':BEfore', 'Element[*]', 'before'), + array(':aftER', 'Element[*]', 'after'), + array(':First-Line', 'Element[*]', 'first-line'), + array(':First-Letter', 'Element[*]', 'first-letter'), + array('::befoRE', 'Element[*]', 'before'), + array('::AFter', 'Element[*]', 'after'), + array('::firsT-linE', 'Element[*]', 'first-line'), + array('::firsT-letteR', 'Element[*]', 'first-letter'), + array('::Selection', 'Element[*]', 'selection'), + array('foo:after', 'Element[foo]', 'after'), + array('foo::selection', 'Element[foo]', 'selection'), + array('lorem#ipsum ~ a#b.c[href]:empty::selection', 'CombinedSelector[Hash[Element[lorem]#ipsum] ~ Pseudo[Attribute[Class[Hash[Element[a]#b].c][href]]:empty]]', 'selection'), + ); + } + + public function getSpecificityTestData() + { + return array( + array('*', 0), + array(' foo', 1), + array(':empty ', 10), + array(':before', 1), + array('*:before', 1), + array(':nth-child(2)', 10), + array('.bar', 10), + array('[baz]', 10), + array('[baz="4"]', 10), + array('[baz^="4"]', 10), + array('#lipsum', 100), + array(':not(*)', 0), + array(':not(foo)', 1), + array(':not(.foo)', 10), + array(':not([foo])', 10), + array(':not(:empty)', 10), + array(':not(#foo)', 100), + array('foo:empty', 11), + array('foo:before', 2), + array('foo::before', 2), + array('foo:empty::before', 12), + array('#lorem + foo#ipsum:first-child > bar:first-line', 213), + ); + } + + public function getParseSeriesTestData() + { + return array( + array('1n+3', 1, 3), + array('1n +3', 1, 3), + array('1n + 3', 1, 3), + array('1n+ 3', 1, 3), + array('1n-3', 1, -3), + array('1n -3', 1, -3), + array('1n - 3', 1, -3), + array('1n- 3', 1, -3), + array('n-5', 1, -5), + array('odd', 2, 1), + array('even', 2, 0), + array('3n', 3, 0), + array('n', 1, 0), + array('+n', 1, 0), + array('-n', -1, 0), + array('5', 0, 5), + ); + } + + public function getParseSeriesExceptionTestData() + { + return array( + array('foo'), + array('n+'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ReaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ReaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..21eb60846240d0b538a056911d5734d2fecb9309 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/ReaderTest.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Parser; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\Parser\Reader; + +class ReaderTest extends TestCase +{ + public function testIsEOF() + { + $reader = new Reader(''); + $this->assertTrue($reader->isEOF()); + + $reader = new Reader('hello'); + $this->assertFalse($reader->isEOF()); + + $this->assignPosition($reader, 2); + $this->assertFalse($reader->isEOF()); + + $this->assignPosition($reader, 5); + $this->assertTrue($reader->isEOF()); + } + + public function testGetRemainingLength() + { + $reader = new Reader('hello'); + $this->assertEquals(5, $reader->getRemainingLength()); + + $this->assignPosition($reader, 2); + $this->assertEquals(3, $reader->getRemainingLength()); + + $this->assignPosition($reader, 5); + $this->assertEquals(0, $reader->getRemainingLength()); + } + + public function testGetSubstring() + { + $reader = new Reader('hello'); + $this->assertEquals('he', $reader->getSubstring(2)); + $this->assertEquals('el', $reader->getSubstring(2, 1)); + + $this->assignPosition($reader, 2); + $this->assertEquals('ll', $reader->getSubstring(2)); + $this->assertEquals('lo', $reader->getSubstring(2, 1)); + } + + public function testGetOffset() + { + $reader = new Reader('hello'); + $this->assertEquals(2, $reader->getOffset('ll')); + $this->assertFalse($reader->getOffset('w')); + + $this->assignPosition($reader, 2); + $this->assertEquals(0, $reader->getOffset('ll')); + $this->assertFalse($reader->getOffset('he')); + } + + public function testFindPattern() + { + $reader = new Reader('hello'); + + $this->assertFalse($reader->findPattern('/world/')); + $this->assertEquals(array('hello', 'h'), $reader->findPattern('/^([a-z]).*/')); + + $this->assignPosition($reader, 2); + $this->assertFalse($reader->findPattern('/^h.*/')); + $this->assertEquals(array('llo'), $reader->findPattern('/^llo$/')); + } + + public function testMoveForward() + { + $reader = new Reader('hello'); + $this->assertEquals(0, $reader->getPosition()); + + $reader->moveForward(2); + $this->assertEquals(2, $reader->getPosition()); + } + + public function testToEnd() + { + $reader = new Reader('hello'); + $reader->moveToEnd(); + $this->assertTrue($reader->isEOF()); + } + + private function assignPosition(Reader $reader, $value) + { + $position = new \ReflectionProperty($reader, 'position'); + $position->setAccessible(true); + $position->setValue($reader, $value); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7e92f5baeed18c9898cfc24a7cfb2580eab05216 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.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\Component\CssSelector\Tests\Parser\Shortcut; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\Node\SelectorNode; +use Symfony\Component\CssSelector\Parser\Shortcut\ClassParser; + +/** + * @author Jean-François Simon + */ +class ClassParserTest extends TestCase +{ + /** @dataProvider getParseTestData */ + public function testParse($source, $representation) + { + $parser = new ClassParser(); + $selectors = $parser->parse($source); + $this->assertCount(1, $selectors); + + /** @var SelectorNode $selector */ + $selector = $selectors[0]; + $this->assertEquals($representation, (string) $selector->getTree()); + } + + public function getParseTestData() + { + return array( + array('.testclass', 'Class[Element[*].testclass]'), + array('testel.testclass', 'Class[Element[testel].testclass]'), + array('testns|.testclass', 'Class[Element[testns|*].testclass]'), + array('testns|*.testclass', 'Class[Element[testns|*].testclass]'), + array('testns|testel.testclass', 'Class[Element[testns|testel].testclass]'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..05a730fde15a2083e2424944a42db850ac96b672 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\Parser\Shortcut; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\Node\SelectorNode; +use Symfony\Component\CssSelector\Parser\Shortcut\ElementParser; + +/** + * @author Jean-François Simon + */ +class ElementParserTest extends TestCase +{ + /** @dataProvider getParseTestData */ + public function testParse($source, $representation) + { + $parser = new ElementParser(); + $selectors = $parser->parse($source); + $this->assertCount(1, $selectors); + + /** @var SelectorNode $selector */ + $selector = $selectors[0]; + $this->assertEquals($representation, (string) $selector->getTree()); + } + + public function getParseTestData() + { + return array( + array('*', 'Element[*]'), + array('testel', 'Element[testel]'), + array('testns|*', 'Element[testns|*]'), + array('testns|testel', 'Element[testns|testel]'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/EmptyStringParserTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/EmptyStringParserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1cf742cf201609977c15eea3dade8d8cac235a83 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/EmptyStringParserTest.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\Component\CssSelector\Tests\Parser\Shortcut; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\Node\SelectorNode; +use Symfony\Component\CssSelector\Parser\Shortcut\EmptyStringParser; + +/** + * @author Jean-François Simon + */ +class EmptyStringParserTest extends TestCase +{ + public function testParse() + { + $parser = new EmptyStringParser(); + $selectors = $parser->parse(''); + $this->assertCount(1, $selectors); + + /** @var SelectorNode $selector */ + $selector = $selectors[0]; + $this->assertEquals('Element[*]', (string) $selector->getTree()); + + $selectors = $parser->parse('this will produce an empty array'); + $this->assertCount(0, $selectors); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..82f555d9abf165de34568d80fe1239faa8c22a51 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.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\Component\CssSelector\Tests\Parser\Shortcut; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\Node\SelectorNode; +use Symfony\Component\CssSelector\Parser\Shortcut\HashParser; + +/** + * @author Jean-François Simon + */ +class HashParserTest extends TestCase +{ + /** @dataProvider getParseTestData */ + public function testParse($source, $representation) + { + $parser = new HashParser(); + $selectors = $parser->parse($source); + $this->assertCount(1, $selectors); + + /** @var SelectorNode $selector */ + $selector = $selectors[0]; + $this->assertEquals($representation, (string) $selector->getTree()); + } + + public function getParseTestData() + { + return array( + array('#testid', 'Hash[Element[*]#testid]'), + array('testel#testid', 'Hash[Element[testel]#testid]'), + array('testns|#testid', 'Hash[Element[testns|*]#testid]'), + array('testns|*#testid', 'Hash[Element[testns|*]#testid]'), + array('testns|testel#testid', 'Hash[Element[testns|testel]#testid]'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/TokenStreamTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/TokenStreamTest.php new file mode 100644 index 0000000000000000000000000000000000000000..44c751ac865d2f98384759635436c5588ee3c551 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/Parser/TokenStreamTest.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\Component\CssSelector\Tests\Parser; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\Parser\Token; +use Symfony\Component\CssSelector\Parser\TokenStream; + +class TokenStreamTest extends TestCase +{ + public function testGetNext() + { + $stream = new TokenStream(); + $stream->push($t1 = new Token(Token::TYPE_IDENTIFIER, 'h1', 0)); + $stream->push($t2 = new Token(Token::TYPE_DELIMITER, '.', 2)); + $stream->push($t3 = new Token(Token::TYPE_IDENTIFIER, 'title', 3)); + + $this->assertSame($t1, $stream->getNext()); + $this->assertSame($t2, $stream->getNext()); + $this->assertSame($t3, $stream->getNext()); + } + + public function testGetPeek() + { + $stream = new TokenStream(); + $stream->push($t1 = new Token(Token::TYPE_IDENTIFIER, 'h1', 0)); + $stream->push($t2 = new Token(Token::TYPE_DELIMITER, '.', 2)); + $stream->push($t3 = new Token(Token::TYPE_IDENTIFIER, 'title', 3)); + + $this->assertSame($t1, $stream->getPeek()); + $this->assertSame($t1, $stream->getNext()); + $this->assertSame($t2, $stream->getPeek()); + $this->assertSame($t2, $stream->getPeek()); + $this->assertSame($t2, $stream->getNext()); + } + + public function testGetNextIdentifier() + { + $stream = new TokenStream(); + $stream->push(new Token(Token::TYPE_IDENTIFIER, 'h1', 0)); + + $this->assertEquals('h1', $stream->getNextIdentifier()); + } + + public function testFailToGetNextIdentifier() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\CssSelector\Exception\SyntaxErrorException'); + + $stream = new TokenStream(); + $stream->push(new Token(Token::TYPE_DELIMITER, '.', 2)); + $stream->getNextIdentifier(); + } + + public function testGetNextIdentifierOrStar() + { + $stream = new TokenStream(); + + $stream->push(new Token(Token::TYPE_IDENTIFIER, 'h1', 0)); + $this->assertEquals('h1', $stream->getNextIdentifierOrStar()); + + $stream->push(new Token(Token::TYPE_DELIMITER, '*', 0)); + $this->assertNull($stream->getNextIdentifierOrStar()); + } + + public function testFailToGetNextIdentifierOrStar() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\CssSelector\Exception\SyntaxErrorException'); + + $stream = new TokenStream(); + $stream->push(new Token(Token::TYPE_DELIMITER, '.', 2)); + $stream->getNextIdentifierOrStar(); + } + + public function testSkipWhitespace() + { + $stream = new TokenStream(); + $stream->push($t1 = new Token(Token::TYPE_IDENTIFIER, 'h1', 0)); + $stream->push($t2 = new Token(Token::TYPE_WHITESPACE, ' ', 2)); + $stream->push($t3 = new Token(Token::TYPE_IDENTIFIER, 'h1', 3)); + + $stream->skipWhitespace(); + $this->assertSame($t1, $stream->getNext()); + + $stream->skipWhitespace(); + $this->assertSame($t3, $stream->getNext()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/ids.html b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/ids.html new file mode 100644 index 0000000000000000000000000000000000000000..5799fad25ecfb33bca8ab42c615253160c061636 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/ids.html @@ -0,0 +1,48 @@ + + + + +
    + + + + link +
      +
    1. content
    2. +
    3. +
      +
      +
    4. +
    5. +
    6. +
    7. +
    8. +
    9. +
    +

    + hi there + guy + + + + + + + +

    + + +
    +

    +
      +
    + + + + +
    +
    + diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/lang.xml b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/lang.xml new file mode 100644 index 0000000000000000000000000000000000000000..14f8dbed681f6f52eb9c7f7bbc021ccdee4533bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/lang.xml @@ -0,0 +1,11 @@ + + a + b + c + d + e + f + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/shakespear.html b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/shakespear.html new file mode 100644 index 0000000000000000000000000000000000000000..15d1ad33a3192dd9e141a5ac006465fd7f4315ba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/shakespear.html @@ -0,0 +1,308 @@ + + + + + + +
    +
    +

    As You Like It

    +
    + by William Shakespeare +
    +
    +

    ACT I, SCENE III. A room in the palace.

    +
    +
    Enter CELIA and ROSALIND
    +
    +
    CELIA
    +
    +
    Why, cousin! why, Rosalind! Cupid have mercy! not a word?
    +
    +
    ROSALIND
    +
    +
    Not one to throw at a dog.
    +
    +
    CELIA
    +
    +
    No, thy words are too precious to be cast away upon
    +
    curs; throw some of them at me; come, lame me with reasons.
    +
    +
    ROSALIND
    +
    CELIA
    +
    +
    But is all this for your father?
    +
    +
    +
    Then there were two cousins laid up; when the one
    +
    should be lamed with reasons and the other mad
    +
    without any.
    +
    +
    ROSALIND
    +
    +
    No, some of it is for my child's father. O, how
    +
    full of briers is this working-day world!
    +
    +
    CELIA
    +
    +
    They are but burs, cousin, thrown upon thee in
    +
    holiday foolery: if we walk not in the trodden
    +
    paths our very petticoats will catch them.
    +
    +
    ROSALIND
    +
    +
    I could shake them off my coat: these burs are in my heart.
    +
    +
    CELIA
    +
    +
    Hem them away.
    +
    +
    ROSALIND
    +
    +
    I would try, if I could cry 'hem' and have him.
    +
    +
    CELIA
    +
    +
    Come, come, wrestle with thy affections.
    +
    +
    ROSALIND
    +
    +
    O, they take the part of a better wrestler than myself!
    +
    +
    CELIA
    +
    +
    O, a good wish upon you! you will try in time, in
    +
    despite of a fall. But, turning these jests out of
    +
    service, let us talk in good earnest: is it
    +
    possible, on such a sudden, you should fall into so
    +
    strong a liking with old Sir Rowland's youngest son?
    +
    +
    ROSALIND
    +
    +
    The duke my father loved his father dearly.
    +
    +
    CELIA
    +
    +
    Doth it therefore ensue that you should love his son
    +
    dearly? By this kind of chase, I should hate him,
    +
    for my father hated his father dearly; yet I hate
    +
    not Orlando.
    +
    +
    ROSALIND
    +
    +
    No, faith, hate him not, for my sake.
    +
    +
    CELIA
    +
    +
    Why should I not? doth he not deserve well?
    +
    +
    ROSALIND
    +
    +
    Let me love him for that, and do you love him
    +
    because I do. Look, here comes the duke.
    +
    +
    CELIA
    +
    +
    With his eyes full of anger.
    +
    Enter DUKE FREDERICK, with Lords
    +
    +
    DUKE FREDERICK
    +
    +
    Mistress, dispatch you with your safest haste
    +
    And get you from our court.
    +
    +
    ROSALIND
    +
    +
    Me, uncle?
    +
    +
    DUKE FREDERICK
    +
    +
    You, cousin
    +
    Within these ten days if that thou be'st found
    +
    So near our public court as twenty miles,
    +
    Thou diest for it.
    +
    +
    ROSALIND
    +
    +
    I do beseech your grace,
    +
    Let me the knowledge of my fault bear with me:
    +
    If with myself I hold intelligence
    +
    Or have acquaintance with mine own desires,
    +
    If that I do not dream or be not frantic,--
    +
    As I do trust I am not--then, dear uncle,
    +
    Never so much as in a thought unborn
    +
    Did I offend your highness.
    +
    +
    DUKE FREDERICK
    +
    +
    Thus do all traitors:
    +
    If their purgation did consist in words,
    +
    They are as innocent as grace itself:
    +
    Let it suffice thee that I trust thee not.
    +
    +
    ROSALIND
    +
    +
    Yet your mistrust cannot make me a traitor:
    +
    Tell me whereon the likelihood depends.
    +
    +
    DUKE FREDERICK
    +
    +
    Thou art thy father's daughter; there's enough.
    +
    +
    ROSALIND
    +
    +
    So was I when your highness took his dukedom;
    +
    So was I when your highness banish'd him:
    +
    Treason is not inherited, my lord;
    +
    Or, if we did derive it from our friends,
    +
    What's that to me? my father was no traitor:
    +
    Then, good my liege, mistake me not so much
    +
    To think my poverty is treacherous.
    +
    +
    CELIA
    +
    +
    Dear sovereign, hear me speak.
    +
    +
    DUKE FREDERICK
    +
    +
    Ay, Celia; we stay'd her for your sake,
    +
    Else had she with her father ranged along.
    +
    +
    CELIA
    +
    +
    I did not then entreat to have her stay;
    +
    It was your pleasure and your own remorse:
    +
    I was too young that time to value her;
    +
    But now I know her: if she be a traitor,
    +
    Why so am I; we still have slept together,
    +
    Rose at an instant, learn'd, play'd, eat together,
    +
    And wheresoever we went, like Juno's swans,
    +
    Still we went coupled and inseparable.
    +
    +
    DUKE FREDERICK
    +
    +
    She is too subtle for thee; and her smoothness,
    +
    Her very silence and her patience
    +
    Speak to the people, and they pity her.
    +
    Thou art a fool: she robs thee of thy name;
    +
    And thou wilt show more bright and seem more virtuous
    +
    When she is gone. Then open not thy lips:
    +
    Firm and irrevocable is my doom
    +
    Which I have pass'd upon her; she is banish'd.
    +
    +
    CELIA
    +
    +
    Pronounce that sentence then on me, my liege:
    +
    I cannot live out of her company.
    +
    +
    DUKE FREDERICK
    +
    +
    You are a fool. You, niece, provide yourself:
    +
    If you outstay the time, upon mine honour,
    +
    And in the greatness of my word, you die.
    +
    Exeunt DUKE FREDERICK and Lords
    +
    +
    CELIA
    +
    +
    O my poor Rosalind, whither wilt thou go?
    +
    Wilt thou change fathers? I will give thee mine.
    +
    I charge thee, be not thou more grieved than I am.
    +
    +
    ROSALIND
    +
    +
    I have more cause.
    +
    +
    CELIA
    +
    +
    Thou hast not, cousin;
    +
    Prithee be cheerful: know'st thou not, the duke
    +
    Hath banish'd me, his daughter?
    +
    +
    ROSALIND
    +
    +
    That he hath not.
    +
    +
    CELIA
    +
    +
    No, hath not? Rosalind lacks then the love
    +
    Which teacheth thee that thou and I am one:
    +
    Shall we be sunder'd? shall we part, sweet girl?
    +
    No: let my father seek another heir.
    +
    Therefore devise with me how we may fly,
    +
    Whither to go and what to bear with us;
    +
    And do not seek to take your change upon you,
    +
    To bear your griefs yourself and leave me out;
    +
    For, by this heaven, now at our sorrows pale,
    +
    Say what thou canst, I'll go along with thee.
    +
    +
    ROSALIND
    +
    +
    Why, whither shall we go?
    +
    +
    CELIA
    +
    +
    To seek my uncle in the forest of Arden.
    +
    +
    ROSALIND
    +
    +
    Alas, what danger will it be to us,
    +
    Maids as we are, to travel forth so far!
    +
    Beauty provoketh thieves sooner than gold.
    +
    +
    CELIA
    +
    +
    I'll put myself in poor and mean attire
    +
    And with a kind of umber smirch my face;
    +
    The like do you: so shall we pass along
    +
    And never stir assailants.
    +
    +
    ROSALIND
    +
    +
    Were it not better,
    +
    Because that I am more than common tall,
    +
    That I did suit me all points like a man?
    +
    A gallant curtle-axe upon my thigh,
    +
    A boar-spear in my hand; and--in my heart
    +
    Lie there what hidden woman's fear there will--
    +
    We'll have a swashing and a martial outside,
    +
    As many other mannish cowards have
    +
    That do outface it with their semblances.
    +
    +
    CELIA
    +
    +
    What shall I call thee when thou art a man?
    +
    +
    ROSALIND
    +
    +
    I'll have no worse a name than Jove's own page;
    +
    And therefore look you call me Ganymede.
    +
    But what will you be call'd?
    +
    +
    CELIA
    +
    +
    Something that hath a reference to my state
    +
    No longer Celia, but Aliena.
    +
    +
    ROSALIND
    +
    +
    But, cousin, what if we assay'd to steal
    +
    The clownish fool out of your father's court?
    +
    Would he not be a comfort to our travel?
    +
    +
    CELIA
    +
    +
    He'll go along o'er the wide world with me;
    +
    Leave me alone to woo him. Let's away,
    +
    And get our jewels and our wealth together,
    +
    Devise the fittest time and safest way
    +
    To hide us from pursuit that will be made
    +
    After my flight. Now go we in content
    +
    To liberty and not to banishment.
    +
    Exeunt
    +
    +
    +
    +
    + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..79e2da14bb24963d3cc8f1d01726ed85706c2560 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php @@ -0,0 +1,325 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\Tests\XPath; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\XPath\Extension\HtmlExtension; +use Symfony\Component\CssSelector\XPath\Translator; + +class TranslatorTest extends TestCase +{ + /** @dataProvider getXpathLiteralTestData */ + public function testXpathLiteral($value, $literal) + { + $this->assertEquals($literal, Translator::getXpathLiteral($value)); + } + + /** @dataProvider getCssToXPathTestData */ + public function testCssToXPath($css, $xpath) + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $this->assertEquals($xpath, $translator->cssToXPath($css, '')); + } + + /** @dataProvider getXmlLangTestData */ + public function testXmlLang($css, array $elementsId) + { + $translator = new Translator(); + $document = new \SimpleXMLElement(file_get_contents(__DIR__.'/Fixtures/lang.xml')); + $elements = $document->xpath($translator->cssToXPath($css)); + $this->assertEquals(count($elementsId), count($elements)); + foreach ($elements as $element) { + $this->assertTrue(in_array($element->attributes()->id, $elementsId)); + } + } + + /** @dataProvider getHtmlIdsTestData */ + public function testHtmlIds($css, array $elementsId) + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $document = new \DOMDocument(); + $document->strictErrorChecking = false; + $internalErrors = libxml_use_internal_errors(true); + $document->loadHTMLFile(__DIR__.'/Fixtures/ids.html'); + $document = simplexml_import_dom($document); + $elements = $document->xpath($translator->cssToXPath($css)); + $this->assertCount(count($elementsId), $elementsId); + foreach ($elements as $element) { + if (null !== $element->attributes()->id) { + $this->assertTrue(in_array($element->attributes()->id, $elementsId)); + } + } + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + } + + /** @dataProvider getHtmlShakespearTestData */ + public function testHtmlShakespear($css, $count) + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $document = new \DOMDocument(); + $document->strictErrorChecking = false; + $document->loadHTMLFile(__DIR__.'/Fixtures/shakespear.html'); + $document = simplexml_import_dom($document); + $bodies = $document->xpath('//body'); + $elements = $bodies[0]->xpath($translator->cssToXPath($css)); + $this->assertCount($count, $elements); + } + + public function getXpathLiteralTestData() + { + return array( + array('foo', "'foo'"), + array("foo's bar", '"foo\'s bar"'), + array("foo's \"middle\" bar", 'concat(\'foo\', "\'", \'s "middle" bar\')'), + array("foo's 'middle' \"bar\"", 'concat(\'foo\', "\'", \'s \', "\'", \'middle\', "\'", \' "bar"\')'), + ); + } + + public function getCssToXPathTestData() + { + return array( + array('*', '*'), + array('e', 'e'), + array('*|e', 'e'), + array('e|f', 'e:f'), + array('e[foo]', 'e[@foo]'), + array('e[foo|bar]', 'e[@foo:bar]'), + array('e[foo="bar"]', "e[@foo = 'bar']"), + array('e[foo~="bar"]', "e[@foo and contains(concat(' ', normalize-space(@foo), ' '), ' bar ')]"), + array('e[foo^="bar"]', "e[@foo and starts-with(@foo, 'bar')]"), + array('e[foo$="bar"]', "e[@foo and substring(@foo, string-length(@foo)-2) = 'bar']"), + array('e[foo*="bar"]', "e[@foo and contains(@foo, 'bar')]"), + array('e[hreflang|="en"]', "e[@hreflang and (@hreflang = 'en' or starts-with(@hreflang, 'en-'))]"), + array('e:nth-child(1)', "*/*[name() = 'e' and (position() = 1)]"), + array('e:nth-last-child(1)', "*/*[name() = 'e' and (position() = last() - 0)]"), + array('e:nth-last-child(2n+2)', "*/*[name() = 'e' and (last() - position() - 1 >= 0 and (last() - position() - 1) mod 2 = 0)]"), + array('e:nth-of-type(1)', '*/e[position() = 1]'), + array('e:nth-last-of-type(1)', '*/e[position() = last() - 0]'), + array('div e:nth-last-of-type(1) .aclass', "div/descendant-or-self::*/e[position() = last() - 0]/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' aclass ')]"), + array('e:first-child', "*/*[name() = 'e' and (position() = 1)]"), + array('e:last-child', "*/*[name() = 'e' and (position() = last())]"), + array('e:first-of-type', '*/e[position() = 1]'), + array('e:last-of-type', '*/e[position() = last()]'), + array('e:only-child', "*/*[name() = 'e' and (last() = 1)]"), + array('e:only-of-type', 'e[last() = 1]'), + array('e:empty', 'e[not(*) and not(string-length())]'), + array('e:EmPTY', 'e[not(*) and not(string-length())]'), + array('e:root', 'e[not(parent::*)]'), + array('e:hover', 'e[0]'), + array('e:contains("foo")', "e[contains(string(.), 'foo')]"), + array('e:ConTains(foo)', "e[contains(string(.), 'foo')]"), + array('e.warning', "e[@class and contains(concat(' ', normalize-space(@class), ' '), ' warning ')]"), + array('e#myid', "e[@id = 'myid']"), + array('e:not(:nth-child(odd))', 'e[not(position() - 1 >= 0 and (position() - 1) mod 2 = 0)]'), + array('e:nOT(*)', 'e[0]'), + array('e f', 'e/descendant-or-self::*/f'), + array('e > f', 'e/f'), + array('e + f', "e/following-sibling::*[name() = 'f' and (position() = 1)]"), + array('e ~ f', 'e/following-sibling::f'), + array('div#container p', "div[@id = 'container']/descendant-or-self::*/p"), + ); + } + + public function getXmlLangTestData() + { + return array( + array(':lang("EN")', array('first', 'second', 'third', 'fourth')), + array(':lang("en-us")', array('second', 'fourth')), + array(':lang(en-nz)', array('third')), + array(':lang(fr)', array('fifth')), + array(':lang(ru)', array('sixth')), + array(":lang('ZH')", array('eighth')), + array(':lang(de) :lang(zh)', array('eighth')), + array(':lang(en), :lang(zh)', array('first', 'second', 'third', 'fourth', 'eighth')), + array(':lang(es)', array()), + ); + } + + public function getHtmlIdsTestData() + { + return array( + array('div', array('outer-div', 'li-div', 'foobar-div')), + array('DIV', array('outer-div', 'li-div', 'foobar-div')), // case-insensitive in HTML + array('div div', array('li-div')), + array('div, div div', array('outer-div', 'li-div', 'foobar-div')), + array('a[name]', array('name-anchor')), + array('a[NAme]', array('name-anchor')), // case-insensitive in HTML: + array('a[rel]', array('tag-anchor', 'nofollow-anchor')), + array('a[rel="tag"]', array('tag-anchor')), + array('a[href*="localhost"]', array('tag-anchor')), + array('a[href*=""]', array()), + array('a[href^="http"]', array('tag-anchor', 'nofollow-anchor')), + array('a[href^="http:"]', array('tag-anchor')), + array('a[href^=""]', array()), + array('a[href$="org"]', array('nofollow-anchor')), + array('a[href$=""]', array()), + array('div[foobar~="bc"]', array('foobar-div')), + array('div[foobar~="cde"]', array('foobar-div')), + array('[foobar~="ab bc"]', array('foobar-div')), + array('[foobar~=""]', array()), + array('[foobar~=" \t"]', array()), + array('div[foobar~="cd"]', array()), + array('*[lang|="En"]', array('second-li')), + array('[lang|="En-us"]', array('second-li')), + // Attribute values are case sensitive + array('*[lang|="en"]', array()), + array('[lang|="en-US"]', array()), + array('*[lang|="e"]', array()), + // ... :lang() is not. + array(':lang("EN")', array('second-li', 'li-div')), + array('*:lang(en-US)', array('second-li', 'li-div')), + array(':lang("e")', array()), + array('li:nth-child(3)', array('third-li')), + array('li:nth-child(10)', array()), + array('li:nth-child(2n)', array('second-li', 'fourth-li', 'sixth-li')), + array('li:nth-child(even)', array('second-li', 'fourth-li', 'sixth-li')), + array('li:nth-child(2n+0)', array('second-li', 'fourth-li', 'sixth-li')), + array('li:nth-child(+2n+1)', array('first-li', 'third-li', 'fifth-li', 'seventh-li')), + array('li:nth-child(odd)', array('first-li', 'third-li', 'fifth-li', 'seventh-li')), + array('li:nth-child(2n+4)', array('fourth-li', 'sixth-li')), + array('li:nth-child(3n+1)', array('first-li', 'fourth-li', 'seventh-li')), + array('li:nth-child(n)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), + array('li:nth-child(n-1)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), + array('li:nth-child(n+1)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), + array('li:nth-child(n+3)', array('third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), + array('li:nth-child(-n)', array()), + array('li:nth-child(-n-1)', array()), + array('li:nth-child(-n+1)', array('first-li')), + array('li:nth-child(-n+3)', array('first-li', 'second-li', 'third-li')), + array('li:nth-last-child(0)', array()), + array('li:nth-last-child(2n)', array('second-li', 'fourth-li', 'sixth-li')), + array('li:nth-last-child(even)', array('second-li', 'fourth-li', 'sixth-li')), + array('li:nth-last-child(2n+2)', array('second-li', 'fourth-li', 'sixth-li')), + array('li:nth-last-child(n)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), + array('li:nth-last-child(n-1)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), + array('li:nth-last-child(n-3)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), + array('li:nth-last-child(n+1)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), + array('li:nth-last-child(n+3)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li')), + array('li:nth-last-child(-n)', array()), + array('li:nth-last-child(-n-1)', array()), + array('li:nth-last-child(-n+1)', array('seventh-li')), + array('li:nth-last-child(-n+3)', array('fifth-li', 'sixth-li', 'seventh-li')), + array('ol:first-of-type', array('first-ol')), + array('ol:nth-child(1)', array('first-ol')), + array('ol:nth-of-type(2)', array('second-ol')), + array('ol:nth-last-of-type(1)', array('second-ol')), + array('span:only-child', array('foobar-span')), + array('li div:only-child', array('li-div')), + array('div *:only-child', array('li-div', 'foobar-span')), + array('p:only-of-type', array('paragraph')), + array('a:empty', array('name-anchor')), + array('a:EMpty', array('name-anchor')), + array('li:empty', array('third-li', 'fourth-li', 'fifth-li', 'sixth-li')), + array(':root', array('html')), + array('html:root', array('html')), + array('li:root', array()), + array('* :root', array()), + array('*:contains("link")', array('html', 'outer-div', 'tag-anchor', 'nofollow-anchor')), + array(':CONtains("link")', array('html', 'outer-div', 'tag-anchor', 'nofollow-anchor')), + array('*:contains("LInk")', array()), // case sensitive + array('*:contains("e")', array('html', 'nil', 'outer-div', 'first-ol', 'first-li', 'paragraph', 'p-em')), + array('*:contains("E")', array()), // case-sensitive + array('.a', array('first-ol')), + array('.b', array('first-ol')), + array('*.a', array('first-ol')), + array('ol.a', array('first-ol')), + array('.c', array('first-ol', 'third-li', 'fourth-li')), + array('*.c', array('first-ol', 'third-li', 'fourth-li')), + array('ol *.c', array('third-li', 'fourth-li')), + array('ol li.c', array('third-li', 'fourth-li')), + array('li ~ li.c', array('third-li', 'fourth-li')), + array('ol > li.c', array('third-li', 'fourth-li')), + array('#first-li', array('first-li')), + array('li#first-li', array('first-li')), + array('*#first-li', array('first-li')), + array('li div', array('li-div')), + array('li > div', array('li-div')), + array('div div', array('li-div')), + array('div > div', array()), + array('div>.c', array('first-ol')), + array('div > .c', array('first-ol')), + array('div + div', array('foobar-div')), + array('a ~ a', array('tag-anchor', 'nofollow-anchor')), + array('a[rel="tag"] ~ a', array('nofollow-anchor')), + array('ol#first-ol li:last-child', array('seventh-li')), + array('ol#first-ol *:last-child', array('li-div', 'seventh-li')), + array('#outer-div:first-child', array('outer-div')), + array('#outer-div :first-child', array('name-anchor', 'first-li', 'li-div', 'p-b', 'checkbox-fieldset-disabled', 'area-href')), + array('a[href]', array('tag-anchor', 'nofollow-anchor')), + array(':not(*)', array()), + array('a:not([href])', array('name-anchor')), + array('ol :Not(li[class])', array('first-li', 'second-li', 'li-div', 'fifth-li', 'sixth-li', 'seventh-li')), + // HTML-specific + array(':link', array('link-href', 'tag-anchor', 'nofollow-anchor', 'area-href')), + array(':visited', array()), + array(':enabled', array('link-href', 'tag-anchor', 'nofollow-anchor', 'checkbox-unchecked', 'text-checked', 'checkbox-checked', 'area-href')), + array(':disabled', array('checkbox-disabled', 'checkbox-disabled-checked', 'fieldset', 'checkbox-fieldset-disabled')), + array(':checked', array('checkbox-checked', 'checkbox-disabled-checked')), + ); + } + + public function getHtmlShakespearTestData() + { + return array( + array('*', 246), + array('div:contains(CELIA)', 26), + array('div:only-child', 22), // ? + array('div:nth-child(even)', 106), + array('div:nth-child(2n)', 106), + array('div:nth-child(odd)', 137), + array('div:nth-child(2n+1)', 137), + array('div:nth-child(n)', 243), + array('div:last-child', 53), + array('div:first-child', 51), + array('div > div', 242), + array('div + div', 190), + array('div ~ div', 190), + array('body', 1), + array('body div', 243), + array('div', 243), + array('div div', 242), + array('div div div', 241), + array('div, div, div', 243), + array('div, a, span', 243), + array('.dialog', 51), + array('div.dialog', 51), + array('div .dialog', 51), + array('div.character, div.dialog', 99), + array('div.direction.dialog', 0), + array('div.dialog.direction', 0), + array('div.dialog.scene', 1), + array('div.scene.scene', 1), + array('div.scene .scene', 0), + array('div.direction .dialog ', 0), + array('div .dialog .direction', 4), + array('div.dialog .dialog .direction', 4), + array('#speech5', 1), + array('div#speech5', 1), + array('div #speech5', 1), + array('div.scene div.dialog', 49), + array('div#scene1 div.dialog div', 142), + array('#scene1 #speech1', 1), + array('div[class]', 103), + array('div[class=dialog]', 50), + array('div[class^=dia]', 51), + array('div[class$=log]', 50), + array('div[class*=sce]', 1), + array('div[class|=dialog]', 50), // ? Seems right + array('div[class!=madeup]', 243), // ? Seems right + array('div[class~=dialog]', 51), // ? Seems right + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..026ac06c79f21a657f80bc00ade72fe8ed1a2e2a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.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\Component\CssSelector\XPath\Extension; + +/** + * XPath expression translator abstract extension. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +abstract class AbstractExtension implements ExtensionInterface +{ + /** + * {@inheritdoc} + */ + public function getNodeTranslators() + { + return array(); + } + + /** + * {@inheritdoc} + */ + public function getCombinationTranslators() + { + return array(); + } + + /** + * {@inheritdoc} + */ + public function getFunctionTranslators() + { + return array(); + } + + /** + * {@inheritdoc} + */ + public function getPseudoClassTranslators() + { + return array(); + } + + /** + * {@inheritdoc} + */ + public function getAttributeMatchingTranslators() + { + return array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..6ace8b5925969ccc11d4323b7eff474760e73f6d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.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\Component\CssSelector\XPath\Extension; + +use Symfony\Component\CssSelector\XPath\Translator; +use Symfony\Component\CssSelector\XPath\XPathExpr; + +/** + * XPath expression translator attribute extension. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class AttributeMatchingExtension extends AbstractExtension +{ + /** + * {@inheritdoc} + */ + public function getAttributeMatchingTranslators() + { + return array( + 'exists' => array($this, 'translateExists'), + '=' => array($this, 'translateEquals'), + '~=' => array($this, 'translateIncludes'), + '|=' => array($this, 'translateDashMatch'), + '^=' => array($this, 'translatePrefixMatch'), + '$=' => array($this, 'translateSuffixMatch'), + '*=' => array($this, 'translateSubstringMatch'), + '!=' => array($this, 'translateDifferent'), + ); + } + + /** + * @param XPathExpr $xpath + * @param string $attribute + * @param string $value + * + * @return XPathExpr + */ + public function translateExists(XPathExpr $xpath, $attribute, $value) + { + return $xpath->addCondition($attribute); + } + + /** + * @param XPathExpr $xpath + * @param string $attribute + * @param string $value + * + * @return XPathExpr + */ + public function translateEquals(XPathExpr $xpath, $attribute, $value) + { + return $xpath->addCondition(sprintf('%s = %s', $attribute, Translator::getXpathLiteral($value))); + } + + /** + * @param XPathExpr $xpath + * @param string $attribute + * @param string $value + * + * @return XPathExpr + */ + public function translateIncludes(XPathExpr $xpath, $attribute, $value) + { + return $xpath->addCondition($value ? sprintf( + '%1$s and contains(concat(\' \', normalize-space(%1$s), \' \'), %2$s)', + $attribute, + Translator::getXpathLiteral(' '.$value.' ') + ) : '0'); + } + + /** + * @param XPathExpr $xpath + * @param string $attribute + * @param string $value + * + * @return XPathExpr + */ + public function translateDashMatch(XPathExpr $xpath, $attribute, $value) + { + return $xpath->addCondition(sprintf( + '%1$s and (%1$s = %2$s or starts-with(%1$s, %3$s))', + $attribute, + Translator::getXpathLiteral($value), + Translator::getXpathLiteral($value.'-') + )); + } + + /** + * @param XPathExpr $xpath + * @param string $attribute + * @param string $value + * + * @return XPathExpr + */ + public function translatePrefixMatch(XPathExpr $xpath, $attribute, $value) + { + return $xpath->addCondition($value ? sprintf( + '%1$s and starts-with(%1$s, %2$s)', + $attribute, + Translator::getXpathLiteral($value) + ) : '0'); + } + + /** + * @param XPathExpr $xpath + * @param string $attribute + * @param string $value + * + * @return XPathExpr + */ + public function translateSuffixMatch(XPathExpr $xpath, $attribute, $value) + { + return $xpath->addCondition($value ? sprintf( + '%1$s and substring(%1$s, string-length(%1$s)-%2$s) = %3$s', + $attribute, + strlen($value) - 1, + Translator::getXpathLiteral($value) + ) : '0'); + } + + /** + * @param XPathExpr $xpath + * @param string $attribute + * @param string $value + * + * @return XPathExpr + */ + public function translateSubstringMatch(XPathExpr $xpath, $attribute, $value) + { + return $xpath->addCondition($value ? sprintf( + '%1$s and contains(%1$s, %2$s)', + $attribute, + Translator::getXpathLiteral($value) + ) : '0'); + } + + /** + * @param XPathExpr $xpath + * @param string $attribute + * @param string $value + * + * @return XPathExpr + */ + public function translateDifferent(XPathExpr $xpath, $attribute, $value) + { + return $xpath->addCondition(sprintf( + $value ? 'not(%1$s) or %1$s != %2$s' : '%s != %s', + $attribute, + Translator::getXpathLiteral($value) + )); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'attribute-matching'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..0d2d658b65c64fbeaac55bbd28f7f57273df7826 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\XPath\Extension; + +use Symfony\Component\CssSelector\XPath\XPathExpr; + +/** + * XPath expression translator combination extension. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class CombinationExtension extends AbstractExtension +{ + /** + * {@inheritdoc} + */ + public function getCombinationTranslators() + { + return array( + ' ' => array($this, 'translateDescendant'), + '>' => array($this, 'translateChild'), + '+' => array($this, 'translateDirectAdjacent'), + '~' => array($this, 'translateIndirectAdjacent'), + ); + } + + /** + * @param XPathExpr $xpath + * @param XPathExpr $combinedXpath + * + * @return XPathExpr + */ + public function translateDescendant(XPathExpr $xpath, XPathExpr $combinedXpath) + { + return $xpath->join('/descendant-or-self::*/', $combinedXpath); + } + + /** + * @param XPathExpr $xpath + * @param XPathExpr $combinedXpath + * + * @return XPathExpr + */ + public function translateChild(XPathExpr $xpath, XPathExpr $combinedXpath) + { + return $xpath->join('/', $combinedXpath); + } + + /** + * @param XPathExpr $xpath + * @param XPathExpr $combinedXpath + * + * @return XPathExpr + */ + public function translateDirectAdjacent(XPathExpr $xpath, XPathExpr $combinedXpath) + { + return $xpath + ->join('/following-sibling::', $combinedXpath) + ->addNameTest() + ->addCondition('position() = 1'); + } + + /** + * @param XPathExpr $xpath + * @param XPathExpr $combinedXpath + * + * @return XPathExpr + */ + public function translateIndirectAdjacent(XPathExpr $xpath, XPathExpr $combinedXpath) + { + return $xpath->join('/following-sibling::', $combinedXpath); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'combination'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/ExtensionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/ExtensionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..3607022891f95d3de665822bffd828af948a34c0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/ExtensionInterface.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\XPath\Extension; + +/** + * XPath expression translator extension interface. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +interface ExtensionInterface +{ + /** + * Returns node translators. + * + * These callables will receive the node as first argument and the translator as second argument. + * + * @return callable[] + */ + public function getNodeTranslators(); + + /** + * Returns combination translators. + * + * @return callable[] + */ + public function getCombinationTranslators(); + + /** + * Returns function translators. + * + * @return callable[] + */ + public function getFunctionTranslators(); + + /** + * Returns pseudo-class translators. + * + * @return callable[] + */ + public function getPseudoClassTranslators(); + + /** + * Returns attribute operation translators. + * + * @return callable[] + */ + public function getAttributeMatchingTranslators(); + + /** + * Returns extension name. + * + * @return string + */ + public function getName(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..ea05523055f65b7e32bb2cbbe6131fc912558b1d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php @@ -0,0 +1,211 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\XPath\Extension; + +use Symfony\Component\CssSelector\Exception\ExpressionErrorException; +use Symfony\Component\CssSelector\Exception\SyntaxErrorException; +use Symfony\Component\CssSelector\Node\FunctionNode; +use Symfony\Component\CssSelector\Parser\Parser; +use Symfony\Component\CssSelector\XPath\Translator; +use Symfony\Component\CssSelector\XPath\XPathExpr; + +/** + * XPath expression translator function extension. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class FunctionExtension extends AbstractExtension +{ + /** + * {@inheritdoc} + */ + public function getFunctionTranslators() + { + return array( + 'nth-child' => array($this, 'translateNthChild'), + 'nth-last-child' => array($this, 'translateNthLastChild'), + 'nth-of-type' => array($this, 'translateNthOfType'), + 'nth-last-of-type' => array($this, 'translateNthLastOfType'), + 'contains' => array($this, 'translateContains'), + 'lang' => array($this, 'translateLang'), + ); + } + + /** + * @param XPathExpr $xpath + * @param FunctionNode $function + * @param bool $last + * @param bool $addNameTest + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function translateNthChild(XPathExpr $xpath, FunctionNode $function, $last = false, $addNameTest = true) + { + try { + list($a, $b) = Parser::parseSeries($function->getArguments()); + } catch (SyntaxErrorException $e) { + throw new ExpressionErrorException(sprintf('Invalid series: %s', implode(', ', $function->getArguments())), 0, $e); + } + + $xpath->addStarPrefix(); + if ($addNameTest) { + $xpath->addNameTest(); + } + + if (0 === $a) { + return $xpath->addCondition('position() = '.($last ? 'last() - '.($b - 1) : $b)); + } + + if ($a < 0) { + if ($b < 1) { + return $xpath->addCondition('false()'); + } + + $sign = '<='; + } else { + $sign = '>='; + } + + $expr = 'position()'; + + if ($last) { + $expr = 'last() - '.$expr; + --$b; + } + + if (0 !== $b) { + $expr .= ' - '.$b; + } + + $conditions = array(sprintf('%s %s 0', $expr, $sign)); + + if (1 !== $a && -1 !== $a) { + $conditions[] = sprintf('(%s) mod %d = 0', $expr, $a); + } + + return $xpath->addCondition(implode(' and ', $conditions)); + + // todo: handle an+b, odd, even + // an+b means every-a, plus b, e.g., 2n+1 means odd + // 0n+b means b + // n+0 means a=1, i.e., all elements + // an means every a elements, i.e., 2n means even + // -n means -1n + // -1n+6 means elements 6 and previous + } + + /** + * @param XPathExpr $xpath + * @param FunctionNode $function + * + * @return XPathExpr + */ + public function translateNthLastChild(XPathExpr $xpath, FunctionNode $function) + { + return $this->translateNthChild($xpath, $function, true); + } + + /** + * @param XPathExpr $xpath + * @param FunctionNode $function + * + * @return XPathExpr + */ + public function translateNthOfType(XPathExpr $xpath, FunctionNode $function) + { + return $this->translateNthChild($xpath, $function, false, false); + } + + /** + * @param XPathExpr $xpath + * @param FunctionNode $function + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function translateNthLastOfType(XPathExpr $xpath, FunctionNode $function) + { + if ('*' === $xpath->getElement()) { + throw new ExpressionErrorException('"*:nth-of-type()" is not implemented.'); + } + + return $this->translateNthChild($xpath, $function, true, false); + } + + /** + * @param XPathExpr $xpath + * @param FunctionNode $function + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function translateContains(XPathExpr $xpath, FunctionNode $function) + { + $arguments = $function->getArguments(); + foreach ($arguments as $token) { + if (!($token->isString() || $token->isIdentifier())) { + throw new ExpressionErrorException( + 'Expected a single string or identifier for :contains(), got ' + .implode(', ', $arguments) + ); + } + } + + return $xpath->addCondition(sprintf( + 'contains(string(.), %s)', + Translator::getXpathLiteral($arguments[0]->getValue()) + )); + } + + /** + * @param XPathExpr $xpath + * @param FunctionNode $function + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function translateLang(XPathExpr $xpath, FunctionNode $function) + { + $arguments = $function->getArguments(); + foreach ($arguments as $token) { + if (!($token->isString() || $token->isIdentifier())) { + throw new ExpressionErrorException( + 'Expected a single string or identifier for :lang(), got ' + .implode(', ', $arguments) + ); + } + } + + return $xpath->addCondition(sprintf( + 'lang(%s)', + Translator::getXpathLiteral($arguments[0]->getValue()) + )); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'function'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..de6ce41621bd4a23f015d7f8fe9409161eeb0730 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php @@ -0,0 +1,240 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\XPath\Extension; + +use Symfony\Component\CssSelector\Exception\ExpressionErrorException; +use Symfony\Component\CssSelector\Node\FunctionNode; +use Symfony\Component\CssSelector\XPath\Translator; +use Symfony\Component\CssSelector\XPath\XPathExpr; + +/** + * XPath expression translator HTML extension. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class HtmlExtension extends AbstractExtension +{ + /** + * Constructor. + * + * @param Translator $translator + */ + public function __construct(Translator $translator) + { + $translator + ->getExtension('node') + ->setFlag(NodeExtension::ELEMENT_NAME_IN_LOWER_CASE, true) + ->setFlag(NodeExtension::ATTRIBUTE_NAME_IN_LOWER_CASE, true); + } + + /** + * {@inheritdoc} + */ + public function getPseudoClassTranslators() + { + return array( + 'checked' => array($this, 'translateChecked'), + 'link' => array($this, 'translateLink'), + 'disabled' => array($this, 'translateDisabled'), + 'enabled' => array($this, 'translateEnabled'), + 'selected' => array($this, 'translateSelected'), + 'invalid' => array($this, 'translateInvalid'), + 'hover' => array($this, 'translateHover'), + 'visited' => array($this, 'translateVisited'), + ); + } + + /** + * {@inheritdoc} + */ + public function getFunctionTranslators() + { + return array( + 'lang' => array($this, 'translateLang'), + ); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateChecked(XPathExpr $xpath) + { + return $xpath->addCondition( + '(@checked ' + ."and (name(.) = 'input' or name(.) = 'command')" + ."and (@type = 'checkbox' or @type = 'radio'))" + ); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateLink(XPathExpr $xpath) + { + return $xpath->addCondition("@href and (name(.) = 'a' or name(.) = 'link' or name(.) = 'area')"); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateDisabled(XPathExpr $xpath) + { + return $xpath->addCondition( + '(' + .'@disabled and' + .'(' + ."(name(.) = 'input' and @type != 'hidden')" + ." or name(.) = 'button'" + ." or name(.) = 'select'" + ." or name(.) = 'textarea'" + ." or name(.) = 'command'" + ." or name(.) = 'fieldset'" + ." or name(.) = 'optgroup'" + ." or name(.) = 'option'" + .')' + .') or (' + ."(name(.) = 'input' and @type != 'hidden')" + ." or name(.) = 'button'" + ." or name(.) = 'select'" + ." or name(.) = 'textarea'" + .')' + .' and ancestor::fieldset[@disabled]' + ); + // todo: in the second half, add "and is not a descendant of that fieldset element's first legend element child, if any." + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateEnabled(XPathExpr $xpath) + { + return $xpath->addCondition( + '(' + .'@href and (' + ."name(.) = 'a'" + ." or name(.) = 'link'" + ." or name(.) = 'area'" + .')' + .') or (' + .'(' + ."name(.) = 'command'" + ." or name(.) = 'fieldset'" + ." or name(.) = 'optgroup'" + .')' + .' and not(@disabled)' + .') or (' + .'(' + ."(name(.) = 'input' and @type != 'hidden')" + ." or name(.) = 'button'" + ." or name(.) = 'select'" + ." or name(.) = 'textarea'" + ." or name(.) = 'keygen'" + .')' + .' and not (@disabled or ancestor::fieldset[@disabled])' + .') or (' + ."name(.) = 'option' and not(" + .'@disabled or ancestor::optgroup[@disabled]' + .')' + .')' + ); + } + + /** + * @param XPathExpr $xpath + * @param FunctionNode $function + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function translateLang(XPathExpr $xpath, FunctionNode $function) + { + $arguments = $function->getArguments(); + foreach ($arguments as $token) { + if (!($token->isString() || $token->isIdentifier())) { + throw new ExpressionErrorException( + 'Expected a single string or identifier for :lang(), got ' + .implode(', ', $arguments) + ); + } + } + + return $xpath->addCondition(sprintf( + 'ancestor-or-self::*[@lang][1][starts-with(concat(' + ."translate(@%s, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), '-')" + .', %s)]', + 'lang', + Translator::getXpathLiteral(strtolower($arguments[0]->getValue()).'-') + )); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateSelected(XPathExpr $xpath) + { + return $xpath->addCondition("(@selected and name(.) = 'option')"); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateInvalid(XPathExpr $xpath) + { + return $xpath->addCondition('0'); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateHover(XPathExpr $xpath) + { + return $xpath->addCondition('0'); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateVisited(XPathExpr $xpath) + { + return $xpath->addCondition('0'); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'html'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..09e6469e7d4dca4f1d4ac4b3ac15cf7cdc22c882 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php @@ -0,0 +1,273 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\XPath\Extension; + +use Symfony\Component\CssSelector\Node; +use Symfony\Component\CssSelector\XPath\Translator; +use Symfony\Component\CssSelector\XPath\XPathExpr; + +/** + * XPath expression translator node extension. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class NodeExtension extends AbstractExtension +{ + const ELEMENT_NAME_IN_LOWER_CASE = 1; + const ATTRIBUTE_NAME_IN_LOWER_CASE = 2; + const ATTRIBUTE_VALUE_IN_LOWER_CASE = 4; + + /** + * @var int + */ + private $flags; + + /** + * Constructor. + * + * @param int $flags + */ + public function __construct($flags = 0) + { + $this->flags = $flags; + } + + /** + * @param int $flag + * @param bool $on + * + * @return $this + */ + public function setFlag($flag, $on) + { + if ($on && !$this->hasFlag($flag)) { + $this->flags += $flag; + } + + if (!$on && $this->hasFlag($flag)) { + $this->flags -= $flag; + } + + return $this; + } + + /** + * @param int $flag + * + * @return bool + */ + public function hasFlag($flag) + { + return $this->flags & $flag; + } + + /** + * {@inheritdoc} + */ + public function getNodeTranslators() + { + return array( + 'Selector' => array($this, 'translateSelector'), + 'CombinedSelector' => array($this, 'translateCombinedSelector'), + 'Negation' => array($this, 'translateNegation'), + 'Function' => array($this, 'translateFunction'), + 'Pseudo' => array($this, 'translatePseudo'), + 'Attribute' => array($this, 'translateAttribute'), + 'Class' => array($this, 'translateClass'), + 'Hash' => array($this, 'translateHash'), + 'Element' => array($this, 'translateElement'), + ); + } + + /** + * @param Node\SelectorNode $node + * @param Translator $translator + * + * @return XPathExpr + */ + public function translateSelector(Node\SelectorNode $node, Translator $translator) + { + return $translator->nodeToXPath($node->getTree()); + } + + /** + * @param Node\CombinedSelectorNode $node + * @param Translator $translator + * + * @return XPathExpr + */ + public function translateCombinedSelector(Node\CombinedSelectorNode $node, Translator $translator) + { + return $translator->addCombination($node->getCombinator(), $node->getSelector(), $node->getSubSelector()); + } + + /** + * @param Node\NegationNode $node + * @param Translator $translator + * + * @return XPathExpr + */ + public function translateNegation(Node\NegationNode $node, Translator $translator) + { + $xpath = $translator->nodeToXPath($node->getSelector()); + $subXpath = $translator->nodeToXPath($node->getSubSelector()); + $subXpath->addNameTest(); + + if ($subXpath->getCondition()) { + return $xpath->addCondition(sprintf('not(%s)', $subXpath->getCondition())); + } + + return $xpath->addCondition('0'); + } + + /** + * @param Node\FunctionNode $node + * @param Translator $translator + * + * @return XPathExpr + */ + public function translateFunction(Node\FunctionNode $node, Translator $translator) + { + $xpath = $translator->nodeToXPath($node->getSelector()); + + return $translator->addFunction($xpath, $node); + } + + /** + * @param Node\PseudoNode $node + * @param Translator $translator + * + * @return XPathExpr + */ + public function translatePseudo(Node\PseudoNode $node, Translator $translator) + { + $xpath = $translator->nodeToXPath($node->getSelector()); + + return $translator->addPseudoClass($xpath, $node->getIdentifier()); + } + + /** + * @param Node\AttributeNode $node + * @param Translator $translator + * + * @return XPathExpr + */ + public function translateAttribute(Node\AttributeNode $node, Translator $translator) + { + $name = $node->getAttribute(); + $safe = $this->isSafeName($name); + + if ($this->hasFlag(self::ATTRIBUTE_NAME_IN_LOWER_CASE)) { + $name = strtolower($name); + } + + if ($node->getNamespace()) { + $name = sprintf('%s:%s', $node->getNamespace(), $name); + $safe = $safe && $this->isSafeName($node->getNamespace()); + } + + $attribute = $safe ? '@'.$name : sprintf('attribute::*[name() = %s]', Translator::getXpathLiteral($name)); + $value = $node->getValue(); + $xpath = $translator->nodeToXPath($node->getSelector()); + + if ($this->hasFlag(self::ATTRIBUTE_VALUE_IN_LOWER_CASE)) { + $value = strtolower($value); + } + + return $translator->addAttributeMatching($xpath, $node->getOperator(), $attribute, $value); + } + + /** + * @param Node\ClassNode $node + * @param Translator $translator + * + * @return XPathExpr + */ + public function translateClass(Node\ClassNode $node, Translator $translator) + { + $xpath = $translator->nodeToXPath($node->getSelector()); + + return $translator->addAttributeMatching($xpath, '~=', '@class', $node->getName()); + } + + /** + * @param Node\HashNode $node + * @param Translator $translator + * + * @return XPathExpr + */ + public function translateHash(Node\HashNode $node, Translator $translator) + { + $xpath = $translator->nodeToXPath($node->getSelector()); + + return $translator->addAttributeMatching($xpath, '=', '@id', $node->getId()); + } + + /** + * @param Node\ElementNode $node + * + * @return XPathExpr + */ + public function translateElement(Node\ElementNode $node) + { + $element = $node->getElement(); + + if ($this->hasFlag(self::ELEMENT_NAME_IN_LOWER_CASE)) { + $element = strtolower($element); + } + + if ($element) { + $safe = $this->isSafeName($element); + } else { + $element = '*'; + $safe = true; + } + + if ($node->getNamespace()) { + $element = sprintf('%s:%s', $node->getNamespace(), $element); + $safe = $safe && $this->isSafeName($node->getNamespace()); + } + + $xpath = new XPathExpr('', $element); + + if (!$safe) { + $xpath->addNameTest(); + } + + return $xpath; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'node'; + } + + /** + * Tests if given name is safe. + * + * @param string $name + * + * @return bool + */ + private function isSafeName($name) + { + return 0 < preg_match('~^[a-zA-Z_][a-zA-Z0-9_.-]*$~', $name); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..1c8b217e39c09857b4ef0590cabf59ed0392cb5d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php @@ -0,0 +1,164 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\XPath\Extension; + +use Symfony\Component\CssSelector\Exception\ExpressionErrorException; +use Symfony\Component\CssSelector\XPath\XPathExpr; + +/** + * XPath expression translator pseudo-class extension. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class PseudoClassExtension extends AbstractExtension +{ + /** + * {@inheritdoc} + */ + public function getPseudoClassTranslators() + { + return array( + 'root' => array($this, 'translateRoot'), + 'first-child' => array($this, 'translateFirstChild'), + 'last-child' => array($this, 'translateLastChild'), + 'first-of-type' => array($this, 'translateFirstOfType'), + 'last-of-type' => array($this, 'translateLastOfType'), + 'only-child' => array($this, 'translateOnlyChild'), + 'only-of-type' => array($this, 'translateOnlyOfType'), + 'empty' => array($this, 'translateEmpty'), + ); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateRoot(XPathExpr $xpath) + { + return $xpath->addCondition('not(parent::*)'); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateFirstChild(XPathExpr $xpath) + { + return $xpath + ->addStarPrefix() + ->addNameTest() + ->addCondition('position() = 1'); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateLastChild(XPathExpr $xpath) + { + return $xpath + ->addStarPrefix() + ->addNameTest() + ->addCondition('position() = last()'); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function translateFirstOfType(XPathExpr $xpath) + { + if ('*' === $xpath->getElement()) { + throw new ExpressionErrorException('"*:first-of-type" is not implemented.'); + } + + return $xpath + ->addStarPrefix() + ->addCondition('position() = 1'); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function translateLastOfType(XPathExpr $xpath) + { + if ('*' === $xpath->getElement()) { + throw new ExpressionErrorException('"*:last-of-type" is not implemented.'); + } + + return $xpath + ->addStarPrefix() + ->addCondition('position() = last()'); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateOnlyChild(XPathExpr $xpath) + { + return $xpath + ->addStarPrefix() + ->addNameTest() + ->addCondition('last() = 1'); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function translateOnlyOfType(XPathExpr $xpath) + { + if ('*' === $xpath->getElement()) { + throw new ExpressionErrorException('"*:only-of-type" is not implemented.'); + } + + return $xpath->addCondition('last() = 1'); + } + + /** + * @param XPathExpr $xpath + * + * @return XPathExpr + */ + public function translateEmpty(XPathExpr $xpath) + { + return $xpath->addCondition('not(*) and not(string-length())'); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'pseudo-class'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Translator.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Translator.php new file mode 100644 index 0000000000000000000000000000000000000000..2b01fc8e52526e2733ff3d04999ba87753d95f10 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/Translator.php @@ -0,0 +1,298 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\XPath; + +use Symfony\Component\CssSelector\Exception\ExpressionErrorException; +use Symfony\Component\CssSelector\Node\FunctionNode; +use Symfony\Component\CssSelector\Node\NodeInterface; +use Symfony\Component\CssSelector\Node\SelectorNode; +use Symfony\Component\CssSelector\Parser\Parser; +use Symfony\Component\CssSelector\Parser\ParserInterface; + +/** + * XPath expression translator interface. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class Translator implements TranslatorInterface +{ + /** + * @var ParserInterface + */ + private $mainParser; + + /** + * @var ParserInterface[] + */ + private $shortcutParsers = array(); + + /** + * @var Extension\ExtensionInterface + */ + private $extensions = array(); + + /** + * @var array + */ + private $nodeTranslators = array(); + + /** + * @var array + */ + private $combinationTranslators = array(); + + /** + * @var array + */ + private $functionTranslators = array(); + + /** + * @var array + */ + private $pseudoClassTranslators = array(); + + /** + * @var array + */ + private $attributeMatchingTranslators = array(); + + public function __construct(ParserInterface $parser = null) + { + $this->mainParser = $parser ?: new Parser(); + + $this + ->registerExtension(new Extension\NodeExtension()) + ->registerExtension(new Extension\CombinationExtension()) + ->registerExtension(new Extension\FunctionExtension()) + ->registerExtension(new Extension\PseudoClassExtension()) + ->registerExtension(new Extension\AttributeMatchingExtension()) + ; + } + + /** + * @param string $element + * + * @return string + */ + public static function getXpathLiteral($element) + { + if (false === strpos($element, "'")) { + return "'".$element."'"; + } + + if (false === strpos($element, '"')) { + return '"'.$element.'"'; + } + + $string = $element; + $parts = array(); + while (true) { + if (false !== $pos = strpos($string, "'")) { + $parts[] = sprintf("'%s'", substr($string, 0, $pos)); + $parts[] = "\"'\""; + $string = substr($string, $pos + 1); + } else { + $parts[] = "'$string'"; + break; + } + } + + return sprintf('concat(%s)', implode($parts, ', ')); + } + + /** + * {@inheritdoc} + */ + public function cssToXPath($cssExpr, $prefix = 'descendant-or-self::') + { + $selectors = $this->parseSelectors($cssExpr); + + /** @var SelectorNode $selector */ + foreach ($selectors as $index => $selector) { + if (null !== $selector->getPseudoElement()) { + throw new ExpressionErrorException('Pseudo-elements are not supported.'); + } + + $selectors[$index] = $this->selectorToXPath($selector, $prefix); + } + + return implode(' | ', $selectors); + } + + /** + * {@inheritdoc} + */ + public function selectorToXPath(SelectorNode $selector, $prefix = 'descendant-or-self::') + { + return ($prefix ?: '').$this->nodeToXPath($selector); + } + + /** + * Registers an extension. + * + * @param Extension\ExtensionInterface $extension + * + * @return $this + */ + public function registerExtension(Extension\ExtensionInterface $extension) + { + $this->extensions[$extension->getName()] = $extension; + + $this->nodeTranslators = array_merge($this->nodeTranslators, $extension->getNodeTranslators()); + $this->combinationTranslators = array_merge($this->combinationTranslators, $extension->getCombinationTranslators()); + $this->functionTranslators = array_merge($this->functionTranslators, $extension->getFunctionTranslators()); + $this->pseudoClassTranslators = array_merge($this->pseudoClassTranslators, $extension->getPseudoClassTranslators()); + $this->attributeMatchingTranslators = array_merge($this->attributeMatchingTranslators, $extension->getAttributeMatchingTranslators()); + + return $this; + } + + /** + * @param string $name + * + * @return Extension\ExtensionInterface + * + * @throws ExpressionErrorException + */ + public function getExtension($name) + { + if (!isset($this->extensions[$name])) { + throw new ExpressionErrorException(sprintf('Extension "%s" not registered.', $name)); + } + + return $this->extensions[$name]; + } + + /** + * Registers a shortcut parser. + * + * @param ParserInterface $shortcut + * + * @return $this + */ + public function registerParserShortcut(ParserInterface $shortcut) + { + $this->shortcutParsers[] = $shortcut; + + return $this; + } + + /** + * @param NodeInterface $node + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function nodeToXPath(NodeInterface $node) + { + if (!isset($this->nodeTranslators[$node->getNodeName()])) { + throw new ExpressionErrorException(sprintf('Node "%s" not supported.', $node->getNodeName())); + } + + return call_user_func($this->nodeTranslators[$node->getNodeName()], $node, $this); + } + + /** + * @param string $combiner + * @param NodeInterface $xpath + * @param NodeInterface $combinedXpath + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function addCombination($combiner, NodeInterface $xpath, NodeInterface $combinedXpath) + { + if (!isset($this->combinationTranslators[$combiner])) { + throw new ExpressionErrorException(sprintf('Combiner "%s" not supported.', $combiner)); + } + + return call_user_func($this->combinationTranslators[$combiner], $this->nodeToXPath($xpath), $this->nodeToXPath($combinedXpath)); + } + + /** + * @param XPathExpr $xpath + * @param FunctionNode $function + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function addFunction(XPathExpr $xpath, FunctionNode $function) + { + if (!isset($this->functionTranslators[$function->getName()])) { + throw new ExpressionErrorException(sprintf('Function "%s" not supported.', $function->getName())); + } + + return call_user_func($this->functionTranslators[$function->getName()], $xpath, $function); + } + + /** + * @param XPathExpr $xpath + * @param string $pseudoClass + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function addPseudoClass(XPathExpr $xpath, $pseudoClass) + { + if (!isset($this->pseudoClassTranslators[$pseudoClass])) { + throw new ExpressionErrorException(sprintf('Pseudo-class "%s" not supported.', $pseudoClass)); + } + + return call_user_func($this->pseudoClassTranslators[$pseudoClass], $xpath); + } + + /** + * @param XPathExpr $xpath + * @param string $operator + * @param string $attribute + * @param string $value + * + * @return XPathExpr + * + * @throws ExpressionErrorException + */ + public function addAttributeMatching(XPathExpr $xpath, $operator, $attribute, $value) + { + if (!isset($this->attributeMatchingTranslators[$operator])) { + throw new ExpressionErrorException(sprintf('Attribute matcher operator "%s" not supported.', $operator)); + } + + return call_user_func($this->attributeMatchingTranslators[$operator], $xpath, $attribute, $value); + } + + /** + * @param string $css + * + * @return SelectorNode[] + */ + private function parseSelectors($css) + { + foreach ($this->shortcutParsers as $shortcut) { + $tokens = $shortcut->parse($css); + + if (!empty($tokens)) { + return $tokens; + } + } + + return $this->mainParser->parse($css); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/TranslatorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/TranslatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..0b5de83d5712487a6fdb7b8b403fe1e4314cf3a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/TranslatorInterface.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\XPath; + +use Symfony\Component\CssSelector\Node\SelectorNode; + +/** + * XPath expression translator interface. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +interface TranslatorInterface +{ + /** + * Translates a CSS selector to an XPath expression. + * + * @param string $cssExpr + * @param string $prefix + * + * @return string + */ + public function cssToXPath($cssExpr, $prefix = 'descendant-or-self::'); + + /** + * Translates a parsed selector node to an XPath expression. + * + * @param SelectorNode $selector + * @param string $prefix + * + * @return string + */ + public function selectorToXPath(SelectorNode $selector, $prefix = 'descendant-or-self::'); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/XPathExpr.php b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/XPathExpr.php new file mode 100644 index 0000000000000000000000000000000000000000..38ca295540071c63989141caf5e9e9a810bcb5b6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/XPath/XPathExpr.php @@ -0,0 +1,142 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\CssSelector\XPath; + +/** + * XPath expression translator interface. + * + * This component is a port of the Python cssselect library, + * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. + * + * @author Jean-François Simon + * + * @internal + */ +class XPathExpr +{ + /** + * @var string + */ + private $path; + + /** + * @var string + */ + private $element; + + /** + * @var string + */ + private $condition; + + /** + * @param string $path + * @param string $element + * @param string $condition + * @param bool $starPrefix + */ + public function __construct($path = '', $element = '*', $condition = '', $starPrefix = false) + { + $this->path = $path; + $this->element = $element; + $this->condition = $condition; + + if ($starPrefix) { + $this->addStarPrefix(); + } + } + + /** + * @return string + */ + public function getElement() + { + return $this->element; + } + + /** + * @param $condition + * + * @return $this + */ + public function addCondition($condition) + { + $this->condition = $this->condition ? sprintf('%s and (%s)', $this->condition, $condition) : $condition; + + return $this; + } + + /** + * @return string + */ + public function getCondition() + { + return $this->condition; + } + + /** + * @return $this + */ + public function addNameTest() + { + if ('*' !== $this->element) { + $this->addCondition('name() = '.Translator::getXpathLiteral($this->element)); + $this->element = '*'; + } + + return $this; + } + + /** + * @return $this + */ + public function addStarPrefix() + { + $this->path .= '*/'; + + return $this; + } + + /** + * Joins another XPathExpr with a combiner. + * + * @param string $combiner + * @param XPathExpr $expr + * + * @return $this + */ + public function join($combiner, XPathExpr $expr) + { + $path = $this->__toString().$combiner; + + if ('*/' !== $expr->path) { + $path .= $expr->path; + } + + $this->path = $path; + $this->element = $expr->element; + $this->condition = $expr->condition; + + return $this; + } + + /** + * @return string + */ + public function __toString() + { + $path = $this->path.$this->element; + $condition = null === $this->condition || '' === $this->condition ? '' : '['.$this->condition.']'; + + return $path.$condition; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/composer.json b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..f8fd3f9827e9168dfe3d1876be5dd353f18581af --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/composer.json @@ -0,0 +1,37 @@ +{ + "name": "symfony/css-selector", + "type": "library", + "description": "Symfony CssSelector Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\CssSelector\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/CssSelector/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..14a320c873c115384af40a0e2c9cb511806c31a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/CssSelector/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/BufferingLogger.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/BufferingLogger.php new file mode 100644 index 0000000000000000000000000000000000000000..a2ed75b9dc9f1f8833a7595abf1dd12506bbc159 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/BufferingLogger.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug; + +use Psr\Log\AbstractLogger; + +/** + * A buffering logger that stacks logs for later. + * + * @author Nicolas Grekas + */ +class BufferingLogger extends AbstractLogger +{ + private $logs = array(); + + public function log($level, $message, array $context = array()) + { + $this->logs[] = array($level, $message, $context); + } + + public function cleanLogs() + { + $logs = $this->logs; + $this->logs = array(); + + return $logs; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Debug/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..70f7802a4757b032c20e0ce1d43ec3e8bde245fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/CHANGELOG.md @@ -0,0 +1,54 @@ +CHANGELOG +========= + +3.2.0 +----- + +* `FlattenException::getTrace()` now returns additional type descriptions + `integer` and `float`. + + +3.0.0 +----- + +* removed classes, methods and interfaces deprecated in 2.x + +2.8.0 +----- + +* added BufferingLogger for errors that happen before a proper logger is configured +* allow throwing from `__toString()` with `return trigger_error($e, E_USER_ERROR);` +* deprecate ExceptionHandler::createResponse + +2.7.0 +----- + +* added deprecations checking for parent interfaces/classes to DebugClassLoader +* added ZTS support to symfony_debug extension +* added symfony_debug_backtrace() to symfony_debug extension + to track the backtrace of fatal errors + +2.6.0 +----- + +* generalized ErrorHandler and ExceptionHandler, + with some new methods and others deprecated +* enhanced error messages for uncaught exceptions + +2.5.0 +----- + +* added ExceptionHandler::setHandler() +* added UndefinedMethodFatalErrorHandler +* deprecated DummyException + +2.4.0 +----- + + * added a DebugClassLoader able to wrap any autoloader providing a findFile method + * improved error messages for not found classes and functions + +2.3.0 +----- + + * added the component diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Debug.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Debug.php new file mode 100644 index 0000000000000000000000000000000000000000..e3665ae5f40c893269e6e004c5cedc67205ea026 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Debug.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\Component\Debug; + +/** + * Registers all the debug tools. + * + * @author Fabien Potencier + */ +class Debug +{ + private static $enabled = false; + + /** + * Enables the debug tools. + * + * This method registers an error handler and an exception handler. + * + * If the Symfony ClassLoader component is available, a special + * class loader is also registered. + * + * @param int $errorReportingLevel The level of error reporting you want + * @param bool $displayErrors Whether to display errors (for development) or just log them (for production) + */ + public static function enable($errorReportingLevel = E_ALL, $displayErrors = true) + { + if (static::$enabled) { + return; + } + + static::$enabled = true; + + if (null !== $errorReportingLevel) { + error_reporting($errorReportingLevel); + } else { + error_reporting(E_ALL); + } + + if ('cli' !== PHP_SAPI) { + ini_set('display_errors', 0); + ExceptionHandler::register(); + } elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) { + // CLI - display errors only if they're not already logged to STDERR + ini_set('display_errors', 1); + } + if ($displayErrors) { + ErrorHandler::register(new ErrorHandler(new BufferingLogger())); + } else { + ErrorHandler::register()->throwAt(0, true); + } + + DebugClassLoader::enable(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..9fd688718da6fecb172b68063f68237bbf631fb0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php @@ -0,0 +1,314 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug; + +/** + * Autoloader checking if the class is really defined in the file found. + * + * The ClassLoader will wrap all registered autoloaders + * and will throw an exception if a file is found but does + * not declare the class. + * + * @author Fabien Potencier + * @author Christophe Coevoet + * @author Nicolas Grekas + */ +class DebugClassLoader +{ + private $classLoader; + private $isFinder; + private static $caseCheck; + private static $deprecated = array(); + private static $php7Reserved = array('int', 'float', 'bool', 'string', 'true', 'false', 'null'); + private static $darwinCache = array('/' => array('/', array())); + + /** + * Constructor. + * + * @param callable $classLoader A class loader + */ + public function __construct(callable $classLoader) + { + $this->classLoader = $classLoader; + $this->isFinder = is_array($classLoader) && method_exists($classLoader[0], 'findFile'); + + if (!isset(self::$caseCheck)) { + $file = file_exists(__FILE__) ? __FILE__ : rtrim(realpath('.'), DIRECTORY_SEPARATOR); + $i = strrpos($file, DIRECTORY_SEPARATOR); + $dir = substr($file, 0, 1 + $i); + $file = substr($file, 1 + $i); + $test = strtoupper($file) === $file ? strtolower($file) : strtoupper($file); + $test = realpath($dir.$test); + + if (false === $test || false === $i) { + // filesystem is case sensitive + self::$caseCheck = 0; + } elseif (substr($test, -strlen($file)) === $file) { + // filesystem is case insensitive and realpath() normalizes the case of characters + self::$caseCheck = 1; + } elseif (false !== stripos(PHP_OS, 'darwin')) { + // on MacOSX, HFS+ is case insensitive but realpath() doesn't normalize the case of characters + self::$caseCheck = 2; + } else { + // filesystem case checks failed, fallback to disabling them + self::$caseCheck = 0; + } + } + } + + /** + * Gets the wrapped class loader. + * + * @return callable The wrapped class loader + */ + public function getClassLoader() + { + return $this->classLoader; + } + + /** + * Wraps all autoloaders. + */ + public static function enable() + { + // Ensures we don't hit https://bugs.php.net/42098 + class_exists('Symfony\Component\Debug\ErrorHandler'); + class_exists('Psr\Log\LogLevel'); + + if (!is_array($functions = spl_autoload_functions())) { + return; + } + + foreach ($functions as $function) { + spl_autoload_unregister($function); + } + + foreach ($functions as $function) { + if (!is_array($function) || !$function[0] instanceof self) { + $function = array(new static($function), 'loadClass'); + } + + spl_autoload_register($function); + } + } + + /** + * Disables the wrapping. + */ + public static function disable() + { + if (!is_array($functions = spl_autoload_functions())) { + return; + } + + foreach ($functions as $function) { + spl_autoload_unregister($function); + } + + foreach ($functions as $function) { + if (is_array($function) && $function[0] instanceof self) { + $function = $function[0]->getClassLoader(); + } + + spl_autoload_register($function); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * + * @return bool|null True, if loaded + * + * @throws \RuntimeException + */ + public function loadClass($class) + { + ErrorHandler::stackErrors(); + + try { + if ($this->isFinder) { + if ($file = $this->classLoader[0]->findFile($class)) { + require_once $file; + } + } else { + call_user_func($this->classLoader, $class); + $file = false; + } + } finally { + ErrorHandler::unstackErrors(); + } + + $exists = class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false); + + if ('\\' === $class[0]) { + $class = substr($class, 1); + } + + if ($exists) { + $refl = new \ReflectionClass($class); + $name = $refl->getName(); + + if ($name !== $class && 0 === strcasecmp($name, $class)) { + throw new \RuntimeException(sprintf('Case mismatch between loaded and declared class names: %s vs %s', $class, $name)); + } + + if (in_array(strtolower($refl->getShortName()), self::$php7Reserved)) { + @trigger_error(sprintf('%s uses a reserved class name (%s) that will break on PHP 7 and higher', $name, $refl->getShortName()), E_USER_DEPRECATED); + } elseif (preg_match('#\n \* @deprecated (.*?)\r?\n \*(?: @|/$)#s', $refl->getDocComment(), $notice)) { + self::$deprecated[$name] = preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]); + } else { + if (2 > $len = 1 + (strpos($name, '\\', 1 + strpos($name, '\\')) ?: strpos($name, '_'))) { + $len = 0; + $ns = ''; + } else { + switch ($ns = substr($name, 0, $len)) { + case 'Symfony\Bridge\\': + case 'Symfony\Bundle\\': + case 'Symfony\Component\\': + $ns = 'Symfony\\'; + $len = strlen($ns); + break; + } + } + $parent = get_parent_class($class); + + if (!$parent || strncmp($ns, $parent, $len)) { + if ($parent && isset(self::$deprecated[$parent]) && strncmp($ns, $parent, $len)) { + @trigger_error(sprintf('The %s class extends %s that is deprecated %s', $name, $parent, self::$deprecated[$parent]), E_USER_DEPRECATED); + } + + $parentInterfaces = array(); + $deprecatedInterfaces = array(); + if ($parent) { + foreach (class_implements($parent) as $interface) { + $parentInterfaces[$interface] = 1; + } + } + + foreach ($refl->getInterfaceNames() as $interface) { + if (isset(self::$deprecated[$interface]) && strncmp($ns, $interface, $len)) { + $deprecatedInterfaces[] = $interface; + } + foreach (class_implements($interface) as $interface) { + $parentInterfaces[$interface] = 1; + } + } + + foreach ($deprecatedInterfaces as $interface) { + if (!isset($parentInterfaces[$interface])) { + @trigger_error(sprintf('The %s %s %s that is deprecated %s', $name, $refl->isInterface() ? 'interface extends' : 'class implements', $interface, self::$deprecated[$interface]), E_USER_DEPRECATED); + } + } + } + } + } + + if ($file) { + if (!$exists) { + if (false !== strpos($class, '/')) { + throw new \RuntimeException(sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class)); + } + + throw new \RuntimeException(sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file)); + } + if (self::$caseCheck) { + $real = explode('\\', $class.strrchr($file, '.')); + $tail = explode(DIRECTORY_SEPARATOR, str_replace('/', DIRECTORY_SEPARATOR, $file)); + + $i = count($tail) - 1; + $j = count($real) - 1; + + while (isset($tail[$i], $real[$j]) && $tail[$i] === $real[$j]) { + --$i; + --$j; + } + + array_splice($tail, 0, $i + 1); + } + if (self::$caseCheck && $tail) { + $tail = DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $tail); + $tailLen = strlen($tail); + $real = $refl->getFileName(); + + if (2 === self::$caseCheck) { + // realpath() on MacOSX doesn't normalize the case of characters + + $i = 1 + strrpos($real, '/'); + $file = substr($real, $i); + $real = substr($real, 0, $i); + + if (isset(self::$darwinCache[$real])) { + $kDir = $real; + } else { + $kDir = strtolower($real); + + if (isset(self::$darwinCache[$kDir])) { + $real = self::$darwinCache[$kDir][0]; + } else { + $dir = getcwd(); + chdir($real); + $real = getcwd().'/'; + chdir($dir); + + $dir = $real; + $k = $kDir; + $i = strlen($dir) - 1; + while (!isset(self::$darwinCache[$k])) { + self::$darwinCache[$k] = array($dir, array()); + self::$darwinCache[$dir] = &self::$darwinCache[$k]; + + while ('/' !== $dir[--$i]) { + } + $k = substr($k, 0, ++$i); + $dir = substr($dir, 0, $i--); + } + } + } + + $dirFiles = self::$darwinCache[$kDir][1]; + + if (isset($dirFiles[$file])) { + $kFile = $file; + } else { + $kFile = strtolower($file); + + if (!isset($dirFiles[$kFile])) { + foreach (scandir($real, 2) as $f) { + if ('.' !== $f[0]) { + $dirFiles[$f] = $f; + if ($f === $file) { + $kFile = $k = $file; + } elseif ($f !== $k = strtolower($f)) { + $dirFiles[$k] = $f; + } + } + } + self::$darwinCache[$kDir][1] = $dirFiles; + } + } + + $real .= $dirFiles[$kFile]; + } + + if (0 === substr_compare($real, $tail, -$tailLen, $tailLen, true) + && 0 !== substr_compare($real, $tail, -$tailLen, $tailLen, false) + ) { + throw new \RuntimeException(sprintf('Case mismatch between class and real file names: %s vs %s in %s', substr($tail, -$tailLen + 1), substr($real, -$tailLen + 1), substr($real, 0, -$tailLen + 1))); + } + } + + return true; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..6805ef156aa028a4decebc75543508a74198191f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php @@ -0,0 +1,683 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug; + +use Psr\Log\LogLevel; +use Psr\Log\LoggerInterface; +use Symfony\Component\Debug\Exception\ContextErrorException; +use Symfony\Component\Debug\Exception\FatalErrorException; +use Symfony\Component\Debug\Exception\FatalThrowableError; +use Symfony\Component\Debug\Exception\OutOfMemoryException; +use Symfony\Component\Debug\Exception\SilencedErrorContext; +use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler; +use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler; +use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler; +use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface; + +/** + * A generic ErrorHandler for the PHP engine. + * + * Provides five bit fields that control how errors are handled: + * - thrownErrors: errors thrown as \ErrorException + * - loggedErrors: logged errors, when not @-silenced + * - scopedErrors: errors thrown or logged with their local context + * - tracedErrors: errors logged with their stack trace + * - screamedErrors: never @-silenced errors + * + * Each error level can be logged by a dedicated PSR-3 logger object. + * Screaming only applies to logging. + * Throwing takes precedence over logging. + * Uncaught exceptions are logged as E_ERROR. + * E_DEPRECATED and E_USER_DEPRECATED levels never throw. + * E_RECOVERABLE_ERROR and E_USER_ERROR levels always throw. + * Non catchable errors that can be detected at shutdown time are logged when the scream bit field allows so. + * As errors have a performance cost, repeated errors are all logged, so that the developer + * can see them and weight them as more important to fix than others of the same level. + * + * @author Nicolas Grekas + * @author Grégoire Pineau + */ +class ErrorHandler +{ + private $levels = array( + E_DEPRECATED => 'Deprecated', + E_USER_DEPRECATED => 'User Deprecated', + E_NOTICE => 'Notice', + E_USER_NOTICE => 'User Notice', + E_STRICT => 'Runtime Notice', + E_WARNING => 'Warning', + E_USER_WARNING => 'User Warning', + E_COMPILE_WARNING => 'Compile Warning', + E_CORE_WARNING => 'Core Warning', + E_USER_ERROR => 'User Error', + E_RECOVERABLE_ERROR => 'Catchable Fatal Error', + E_COMPILE_ERROR => 'Compile Error', + E_PARSE => 'Parse Error', + E_ERROR => 'Error', + E_CORE_ERROR => 'Core Error', + ); + + private $loggers = array( + E_DEPRECATED => array(null, LogLevel::INFO), + E_USER_DEPRECATED => array(null, LogLevel::INFO), + E_NOTICE => array(null, LogLevel::WARNING), + E_USER_NOTICE => array(null, LogLevel::WARNING), + E_STRICT => array(null, LogLevel::WARNING), + E_WARNING => array(null, LogLevel::WARNING), + E_USER_WARNING => array(null, LogLevel::WARNING), + E_COMPILE_WARNING => array(null, LogLevel::WARNING), + E_CORE_WARNING => array(null, LogLevel::WARNING), + E_USER_ERROR => array(null, LogLevel::CRITICAL), + E_RECOVERABLE_ERROR => array(null, LogLevel::CRITICAL), + E_COMPILE_ERROR => array(null, LogLevel::CRITICAL), + E_PARSE => array(null, LogLevel::CRITICAL), + E_ERROR => array(null, LogLevel::CRITICAL), + E_CORE_ERROR => array(null, LogLevel::CRITICAL), + ); + + private $thrownErrors = 0x1FFF; // E_ALL - E_DEPRECATED - E_USER_DEPRECATED + private $scopedErrors = 0x1FFF; // E_ALL - E_DEPRECATED - E_USER_DEPRECATED + private $tracedErrors = 0x77FB; // E_ALL - E_STRICT - E_PARSE + private $screamedErrors = 0x55; // E_ERROR + E_CORE_ERROR + E_COMPILE_ERROR + E_PARSE + private $loggedErrors = 0; + private $traceReflector; + + private $isRecursive = 0; + private $isRoot = false; + private $exceptionHandler; + private $bootstrappingLogger; + + private static $reservedMemory; + private static $stackedErrors = array(); + private static $stackedErrorLevels = array(); + private static $toStringException = null; + + /** + * Registers the error handler. + * + * @param self|null $handler The handler to register + * @param bool $replace Whether to replace or not any existing handler + * + * @return self The registered error handler + */ + public static function register(self $handler = null, $replace = true) + { + if (null === self::$reservedMemory) { + self::$reservedMemory = str_repeat('x', 10240); + register_shutdown_function(__CLASS__.'::handleFatalError'); + } + + if ($handlerIsNew = null === $handler) { + $handler = new static(); + } + + if (null === $prev = set_error_handler(array($handler, 'handleError'))) { + restore_error_handler(); + // Specifying the error types earlier would expose us to https://bugs.php.net/63206 + set_error_handler(array($handler, 'handleError'), $handler->thrownErrors | $handler->loggedErrors); + $handler->isRoot = true; + } + + if ($handlerIsNew && is_array($prev) && $prev[0] instanceof self) { + $handler = $prev[0]; + $replace = false; + } + if ($replace || !$prev) { + $handler->setExceptionHandler(set_exception_handler(array($handler, 'handleException'))); + } else { + restore_error_handler(); + } + + $handler->throwAt(E_ALL & $handler->thrownErrors, true); + + return $handler; + } + + public function __construct(BufferingLogger $bootstrappingLogger = null) + { + if ($bootstrappingLogger) { + $this->bootstrappingLogger = $bootstrappingLogger; + $this->setDefaultLogger($bootstrappingLogger); + } + $this->traceReflector = new \ReflectionProperty('Exception', 'trace'); + $this->traceReflector->setAccessible(true); + } + + /** + * Sets a logger to non assigned errors levels. + * + * @param LoggerInterface $logger A PSR-3 logger to put as default for the given levels + * @param array|int $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants + * @param bool $replace Whether to replace or not any existing logger + */ + public function setDefaultLogger(LoggerInterface $logger, $levels = E_ALL, $replace = false) + { + $loggers = array(); + + if (is_array($levels)) { + foreach ($levels as $type => $logLevel) { + if (empty($this->loggers[$type][0]) || $replace || $this->loggers[$type][0] === $this->bootstrappingLogger) { + $loggers[$type] = array($logger, $logLevel); + } + } + } else { + if (null === $levels) { + $levels = E_ALL; + } + foreach ($this->loggers as $type => $log) { + if (($type & $levels) && (empty($log[0]) || $replace || $log[0] === $this->bootstrappingLogger)) { + $log[0] = $logger; + $loggers[$type] = $log; + } + } + } + + $this->setLoggers($loggers); + } + + /** + * Sets a logger for each error level. + * + * @param array $loggers Error levels to [LoggerInterface|null, LogLevel::*] map + * + * @return array The previous map + * + * @throws \InvalidArgumentException + */ + public function setLoggers(array $loggers) + { + $prevLogged = $this->loggedErrors; + $prev = $this->loggers; + $flush = array(); + + foreach ($loggers as $type => $log) { + if (!isset($prev[$type])) { + throw new \InvalidArgumentException('Unknown error type: '.$type); + } + if (!is_array($log)) { + $log = array($log); + } elseif (!array_key_exists(0, $log)) { + throw new \InvalidArgumentException('No logger provided'); + } + if (null === $log[0]) { + $this->loggedErrors &= ~$type; + } elseif ($log[0] instanceof LoggerInterface) { + $this->loggedErrors |= $type; + } else { + throw new \InvalidArgumentException('Invalid logger provided'); + } + $this->loggers[$type] = $log + $prev[$type]; + + if ($this->bootstrappingLogger && $prev[$type][0] === $this->bootstrappingLogger) { + $flush[$type] = $type; + } + } + $this->reRegister($prevLogged | $this->thrownErrors); + + if ($flush) { + foreach ($this->bootstrappingLogger->cleanLogs() as $log) { + $type = $log[2]['exception'] instanceof \ErrorException ? $log[2]['exception']->getSeverity() : E_ERROR; + if (!isset($flush[$type])) { + $this->bootstrappingLogger->log($log[0], $log[1], $log[2]); + } elseif ($this->loggers[$type][0]) { + $this->loggers[$type][0]->log($this->loggers[$type][1], $log[1], $log[2]); + } + } + } + + return $prev; + } + + /** + * Sets a user exception handler. + * + * @param callable $handler A handler that will be called on Exception + * + * @return callable|null The previous exception handler + */ + public function setExceptionHandler(callable $handler = null) + { + $prev = $this->exceptionHandler; + $this->exceptionHandler = $handler; + + return $prev; + } + + /** + * Sets the PHP error levels that throw an exception when a PHP error occurs. + * + * @param int $levels A bit field of E_* constants for thrown errors + * @param bool $replace Replace or amend the previous value + * + * @return int The previous value + */ + public function throwAt($levels, $replace = false) + { + $prev = $this->thrownErrors; + $this->thrownErrors = ($levels | E_RECOVERABLE_ERROR | E_USER_ERROR) & ~E_USER_DEPRECATED & ~E_DEPRECATED; + if (!$replace) { + $this->thrownErrors |= $prev; + } + $this->reRegister($prev | $this->loggedErrors); + + return $prev; + } + + /** + * Sets the PHP error levels for which local variables are preserved. + * + * @param int $levels A bit field of E_* constants for scoped errors + * @param bool $replace Replace or amend the previous value + * + * @return int The previous value + */ + public function scopeAt($levels, $replace = false) + { + $prev = $this->scopedErrors; + $this->scopedErrors = (int) $levels; + if (!$replace) { + $this->scopedErrors |= $prev; + } + + return $prev; + } + + /** + * Sets the PHP error levels for which the stack trace is preserved. + * + * @param int $levels A bit field of E_* constants for traced errors + * @param bool $replace Replace or amend the previous value + * + * @return int The previous value + */ + public function traceAt($levels, $replace = false) + { + $prev = $this->tracedErrors; + $this->tracedErrors = (int) $levels; + if (!$replace) { + $this->tracedErrors |= $prev; + } + + return $prev; + } + + /** + * Sets the error levels where the @-operator is ignored. + * + * @param int $levels A bit field of E_* constants for screamed errors + * @param bool $replace Replace or amend the previous value + * + * @return int The previous value + */ + public function screamAt($levels, $replace = false) + { + $prev = $this->screamedErrors; + $this->screamedErrors = (int) $levels; + if (!$replace) { + $this->screamedErrors |= $prev; + } + + return $prev; + } + + /** + * Re-registers as a PHP error handler if levels changed. + */ + private function reRegister($prev) + { + if ($prev !== $this->thrownErrors | $this->loggedErrors) { + $handler = set_error_handler('var_dump'); + $handler = is_array($handler) ? $handler[0] : null; + restore_error_handler(); + if ($handler === $this) { + restore_error_handler(); + if ($this->isRoot) { + set_error_handler(array($this, 'handleError'), $this->thrownErrors | $this->loggedErrors); + } else { + set_error_handler(array($this, 'handleError')); + } + } + } + } + + /** + * Handles errors by filtering then logging them according to the configured bit fields. + * + * @param int $type One of the E_* constants + * @param string $message + * @param string $file + * @param int $line + * + * @return bool Returns false when no handling happens so that the PHP engine can handle the error itself + * + * @throws \ErrorException When $this->thrownErrors requests so + * + * @internal + */ + public function handleError($type, $message, $file, $line) + { + // Level is the current error reporting level to manage silent error. + // Strong errors are not authorized to be silenced. + $level = error_reporting() | E_RECOVERABLE_ERROR | E_USER_ERROR | E_DEPRECATED | E_USER_DEPRECATED; + $log = $this->loggedErrors & $type; + $throw = $this->thrownErrors & $type & $level; + $type &= $level | $this->screamedErrors; + + if (!$type || (!$log && !$throw)) { + return $type && $log; + } + $scope = $this->scopedErrors & $type; + + if (4 < $numArgs = func_num_args()) { + $context = $scope ? (func_get_arg(4) ?: array()) : array(); + $backtrace = 5 < $numArgs ? func_get_arg(5) : null; // defined on HHVM + } else { + $context = array(); + $backtrace = null; + } + + if (isset($context['GLOBALS']) && $scope) { + $e = $context; // Whatever the signature of the method, + unset($e['GLOBALS'], $context); // $context is always a reference in 5.3 + $context = $e; + } + + if (null !== $backtrace && $type & E_ERROR) { + // E_ERROR fatal errors are triggered on HHVM when + // hhvm.error_handling.call_user_handler_on_fatals=1 + // which is the way to get their backtrace. + $this->handleFatalError(compact('type', 'message', 'file', 'line', 'backtrace')); + + return true; + } + + $logMessage = $this->levels[$type].': '.$message; + + if (null !== self::$toStringException) { + $errorAsException = self::$toStringException; + self::$toStringException = null; + } elseif (!$throw && !($type & $level)) { + $errorAsException = new SilencedErrorContext($type, $file, $line); + } else { + if ($scope) { + $errorAsException = new ContextErrorException($logMessage, 0, $type, $file, $line, $context); + } else { + $errorAsException = new \ErrorException($logMessage, 0, $type, $file, $line); + } + + // Clean the trace by removing function arguments and the first frames added by the error handler itself. + if ($throw || $this->tracedErrors & $type) { + $backtrace = $backtrace ?: $errorAsException->getTrace(); + $lightTrace = $backtrace; + + for ($i = 0; isset($backtrace[$i]); ++$i) { + if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) { + $lightTrace = array_slice($lightTrace, 1 + $i); + break; + } + } + if (!($throw || $this->scopedErrors & $type)) { + for ($i = 0; isset($lightTrace[$i]); ++$i) { + unset($lightTrace[$i]['args']); + } + } + $this->traceReflector->setValue($errorAsException, $lightTrace); + } else { + $this->traceReflector->setValue($errorAsException, array()); + } + } + + if ($throw) { + if (E_USER_ERROR & $type) { + for ($i = 1; isset($backtrace[$i]); ++$i) { + if (isset($backtrace[$i]['function'], $backtrace[$i]['type'], $backtrace[$i - 1]['function']) + && '__toString' === $backtrace[$i]['function'] + && '->' === $backtrace[$i]['type'] + && !isset($backtrace[$i - 1]['class']) + && ('trigger_error' === $backtrace[$i - 1]['function'] || 'user_error' === $backtrace[$i - 1]['function']) + ) { + // Here, we know trigger_error() has been called from __toString(). + // HHVM is fine with throwing from __toString() but PHP triggers a fatal error instead. + // A small convention allows working around the limitation: + // given a caught $e exception in __toString(), quitting the method with + // `return trigger_error($e, E_USER_ERROR);` allows this error handler + // to make $e get through the __toString() barrier. + + foreach ($context as $e) { + if (($e instanceof \Exception || $e instanceof \Throwable) && $e->__toString() === $message) { + if (1 === $i) { + // On HHVM + $errorAsException = $e; + break; + } + self::$toStringException = $e; + + return true; + } + } + + if (1 < $i) { + // On PHP (not on HHVM), display the original error message instead of the default one. + $this->handleException($errorAsException); + + // Stop the process by giving back the error to the native handler. + return false; + } + } + } + } + + throw $errorAsException; + } + + if ($this->isRecursive) { + $log = 0; + } elseif (self::$stackedErrorLevels) { + self::$stackedErrors[] = array( + $this->loggers[$type][0], + ($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG, + $logMessage, + array('exception' => $errorAsException), + ); + } else { + try { + $this->isRecursive = true; + $level = ($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG; + $this->loggers[$type][0]->log($level, $logMessage, array('exception' => $errorAsException)); + } finally { + $this->isRecursive = false; + } + } + + return $type && $log; + } + + /** + * Handles an exception by logging then forwarding it to another handler. + * + * @param \Exception|\Throwable $exception An exception to handle + * @param array $error An array as returned by error_get_last() + * + * @internal + */ + public function handleException($exception, array $error = null) + { + if (!$exception instanceof \Exception) { + $exception = new FatalThrowableError($exception); + } + $type = $exception instanceof FatalErrorException ? $exception->getSeverity() : E_ERROR; + + if (($this->loggedErrors & $type) || $exception instanceof FatalThrowableError) { + if ($exception instanceof FatalErrorException) { + if ($exception instanceof FatalThrowableError) { + $error = array( + 'type' => $type, + 'message' => $message = $exception->getMessage(), + 'file' => $exception->getFile(), + 'line' => $exception->getLine(), + ); + } else { + $message = 'Fatal '.$exception->getMessage(); + } + } elseif ($exception instanceof \ErrorException) { + $message = 'Uncaught '.$exception->getMessage(); + if ($exception instanceof ContextErrorException) { + $e['context'] = $exception->getContext(); + } + } else { + $message = 'Uncaught Exception: '.$exception->getMessage(); + } + } + if ($this->loggedErrors & $type) { + try { + $this->loggers[$type][0]->log($this->loggers[$type][1], $message, array('exception' => $exception)); + } catch (\Exception $handlerException) { + } catch (\Throwable $handlerException) { + } + } + if ($exception instanceof FatalErrorException && !$exception instanceof OutOfMemoryException && $error) { + foreach ($this->getFatalErrorHandlers() as $handler) { + if ($e = $handler->handleError($error, $exception)) { + $exception = $e; + break; + } + } + } + if (empty($this->exceptionHandler)) { + throw $exception; // Give back $exception to the native handler + } + try { + call_user_func($this->exceptionHandler, $exception); + } catch (\Exception $handlerException) { + } catch (\Throwable $handlerException) { + } + if (isset($handlerException)) { + $this->exceptionHandler = null; + $this->handleException($handlerException); + } + } + + /** + * Shutdown registered function for handling PHP fatal errors. + * + * @param array $error An array as returned by error_get_last() + * + * @internal + */ + public static function handleFatalError(array $error = null) + { + if (null === self::$reservedMemory) { + return; + } + + self::$reservedMemory = null; + + $handler = set_error_handler('var_dump'); + $handler = is_array($handler) ? $handler[0] : null; + restore_error_handler(); + + if (!$handler instanceof self) { + return; + } + + if (null === $error) { + $error = error_get_last(); + } + + try { + while (self::$stackedErrorLevels) { + static::unstackErrors(); + } + } catch (\Exception $exception) { + // Handled below + } catch (\Throwable $exception) { + // Handled below + } + + if ($error && $error['type'] &= E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR) { + // Let's not throw anymore but keep logging + $handler->throwAt(0, true); + $trace = isset($error['backtrace']) ? $error['backtrace'] : null; + + if (0 === strpos($error['message'], 'Allowed memory') || 0 === strpos($error['message'], 'Out of memory')) { + $exception = new OutOfMemoryException($handler->levels[$error['type']].': '.$error['message'], 0, $error['type'], $error['file'], $error['line'], 2, false, $trace); + } else { + $exception = new FatalErrorException($handler->levels[$error['type']].': '.$error['message'], 0, $error['type'], $error['file'], $error['line'], 2, true, $trace); + } + } elseif (!isset($exception)) { + return; + } + + try { + $handler->handleException($exception, $error); + } catch (FatalErrorException $e) { + // Ignore this re-throw + } + } + + /** + * Configures the error handler for delayed handling. + * Ensures also that non-catchable fatal errors are never silenced. + * + * As shown by http://bugs.php.net/42098 and http://bugs.php.net/60724 + * PHP has a compile stage where it behaves unusually. To workaround it, + * we plug an error handler that only stacks errors for later. + * + * The most important feature of this is to prevent + * autoloading until unstackErrors() is called. + */ + public static function stackErrors() + { + self::$stackedErrorLevels[] = error_reporting(error_reporting() | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR); + } + + /** + * Unstacks stacked errors and forwards to the logger. + */ + public static function unstackErrors() + { + $level = array_pop(self::$stackedErrorLevels); + + if (null !== $level) { + $errorReportingLevel = error_reporting($level); + if ($errorReportingLevel !== ($level | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR)) { + // If the user changed the error level, do not overwrite it + error_reporting($errorReportingLevel); + } + } + + if (empty(self::$stackedErrorLevels)) { + $errors = self::$stackedErrors; + self::$stackedErrors = array(); + + foreach ($errors as $error) { + $error[0]->log($error[1], $error[2], $error[3]); + } + } + } + + /** + * Gets the fatal error handlers. + * + * Override this method if you want to define more fatal error handlers. + * + * @return FatalErrorHandlerInterface[] An array of FatalErrorHandlerInterface + */ + protected function getFatalErrorHandlers() + { + return array( + new UndefinedFunctionFatalErrorHandler(), + new UndefinedMethodFatalErrorHandler(), + new ClassNotFoundFatalErrorHandler(), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/ClassNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/ClassNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..b91bf46631bbb482943988927889dd7fc6d7ab1d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/ClassNotFoundException.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Exception; + +/** + * Class (or Trait or Interface) Not Found Exception. + * + * @author Konstanton Myakshin + */ +class ClassNotFoundException extends FatalErrorException +{ + public function __construct($message, \ErrorException $previous) + { + parent::__construct( + $message, + $previous->getCode(), + $previous->getSeverity(), + $previous->getFile(), + $previous->getLine(), + $previous->getPrevious() + ); + $this->setTrace($previous->getTrace()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/ContextErrorException.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/ContextErrorException.php new file mode 100644 index 0000000000000000000000000000000000000000..54f0198f1b2f87334c26d157c19c20514bcb83ea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/ContextErrorException.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\Component\Debug\Exception; + +/** + * Error Exception with Variable Context. + * + * @author Christian Sciberras + */ +class ContextErrorException extends \ErrorException +{ + private $context = array(); + + public function __construct($message, $code, $severity, $filename, $lineno, $context = array()) + { + parent::__construct($message, $code, $severity, $filename, $lineno); + $this->context = $context; + } + + /** + * @return array Array of variables that existed when the exception occurred + */ + public function getContext() + { + return $this->context; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FatalErrorException.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FatalErrorException.php new file mode 100644 index 0000000000000000000000000000000000000000..f24a54e77a6aca14f4fda26f0e00cc78890894b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FatalErrorException.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Exception; + +/** + * Fatal Error Exception. + * + * @author Konstanton Myakshin + */ +class FatalErrorException extends \ErrorException +{ + public function __construct($message, $code, $severity, $filename, $lineno, $traceOffset = null, $traceArgs = true, array $trace = null) + { + parent::__construct($message, $code, $severity, $filename, $lineno); + + if (null !== $trace) { + if (!$traceArgs) { + foreach ($trace as &$frame) { + unset($frame['args'], $frame['this'], $frame); + } + } + + $this->setTrace($trace); + } elseif (null !== $traceOffset) { + if (function_exists('xdebug_get_function_stack')) { + $trace = xdebug_get_function_stack(); + if (0 < $traceOffset) { + array_splice($trace, -$traceOffset); + } + + foreach ($trace as &$frame) { + if (!isset($frame['type'])) { + // XDebug pre 2.1.1 doesn't currently set the call type key http://bugs.xdebug.org/view.php?id=695 + if (isset($frame['class'])) { + $frame['type'] = '::'; + } + } elseif ('dynamic' === $frame['type']) { + $frame['type'] = '->'; + } elseif ('static' === $frame['type']) { + $frame['type'] = '::'; + } + + // XDebug also has a different name for the parameters array + if (!$traceArgs) { + unset($frame['params'], $frame['args']); + } elseif (isset($frame['params']) && !isset($frame['args'])) { + $frame['args'] = $frame['params']; + unset($frame['params']); + } + } + + unset($frame); + $trace = array_reverse($trace); + } elseif (function_exists('symfony_debug_backtrace')) { + $trace = symfony_debug_backtrace(); + if (0 < $traceOffset) { + array_splice($trace, 0, $traceOffset); + } + } else { + $trace = array(); + } + + $this->setTrace($trace); + } + } + + protected function setTrace($trace) + { + $traceReflector = new \ReflectionProperty('Exception', 'trace'); + $traceReflector->setAccessible(true); + $traceReflector->setValue($this, $trace); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FatalThrowableError.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FatalThrowableError.php new file mode 100644 index 0000000000000000000000000000000000000000..34f43b17b13b4fbbfe2abaf322c04848c563ba70 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FatalThrowableError.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Exception; + +/** + * Fatal Throwable Error. + * + * @author Nicolas Grekas + */ +class FatalThrowableError extends FatalErrorException +{ + public function __construct(\Throwable $e) + { + if ($e instanceof \ParseError) { + $message = 'Parse error: '.$e->getMessage(); + $severity = E_PARSE; + } elseif ($e instanceof \TypeError) { + $message = 'Type error: '.$e->getMessage(); + $severity = E_RECOVERABLE_ERROR; + } else { + $message = $e->getMessage(); + $severity = E_ERROR; + } + + \ErrorException::__construct( + $message, + $e->getCode(), + $severity, + $e->getFile(), + $e->getLine() + ); + + $this->setTrace($e->getTrace()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FlattenException.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FlattenException.php new file mode 100644 index 0000000000000000000000000000000000000000..286a71ec143c6d92cf7841dc7e3388809faf7c64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FlattenException.php @@ -0,0 +1,260 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Exception; + +use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; + +/** + * FlattenException wraps a PHP Exception to be able to serialize it. + * + * Basically, this class removes all objects from the trace. + * + * @author Fabien Potencier + */ +class FlattenException +{ + private $message; + private $code; + private $previous; + private $trace; + private $class; + private $statusCode; + private $headers; + private $file; + private $line; + + public static function create(\Exception $exception, $statusCode = null, array $headers = array()) + { + $e = new static(); + $e->setMessage($exception->getMessage()); + $e->setCode($exception->getCode()); + + if ($exception instanceof HttpExceptionInterface) { + $statusCode = $exception->getStatusCode(); + $headers = array_merge($headers, $exception->getHeaders()); + } + + if (null === $statusCode) { + $statusCode = 500; + } + + $e->setStatusCode($statusCode); + $e->setHeaders($headers); + $e->setTraceFromException($exception); + $e->setClass(get_class($exception)); + $e->setFile($exception->getFile()); + $e->setLine($exception->getLine()); + + $previous = $exception->getPrevious(); + + if ($previous instanceof \Exception) { + $e->setPrevious(static::create($previous)); + } elseif ($previous instanceof \Throwable) { + $e->setPrevious(static::create(new FatalThrowableError($previous))); + } + + return $e; + } + + public function toArray() + { + $exceptions = array(); + foreach (array_merge(array($this), $this->getAllPrevious()) as $exception) { + $exceptions[] = array( + 'message' => $exception->getMessage(), + 'class' => $exception->getClass(), + 'trace' => $exception->getTrace(), + ); + } + + return $exceptions; + } + + public function getStatusCode() + { + return $this->statusCode; + } + + public function setStatusCode($code) + { + $this->statusCode = $code; + } + + public function getHeaders() + { + return $this->headers; + } + + public function setHeaders(array $headers) + { + $this->headers = $headers; + } + + public function getClass() + { + return $this->class; + } + + public function setClass($class) + { + $this->class = $class; + } + + public function getFile() + { + return $this->file; + } + + public function setFile($file) + { + $this->file = $file; + } + + public function getLine() + { + return $this->line; + } + + public function setLine($line) + { + $this->line = $line; + } + + public function getMessage() + { + return $this->message; + } + + public function setMessage($message) + { + $this->message = $message; + } + + public function getCode() + { + return $this->code; + } + + public function setCode($code) + { + $this->code = $code; + } + + public function getPrevious() + { + return $this->previous; + } + + public function setPrevious(FlattenException $previous) + { + $this->previous = $previous; + } + + public function getAllPrevious() + { + $exceptions = array(); + $e = $this; + while ($e = $e->getPrevious()) { + $exceptions[] = $e; + } + + return $exceptions; + } + + public function getTrace() + { + return $this->trace; + } + + public function setTraceFromException(\Exception $exception) + { + $this->setTrace($exception->getTrace(), $exception->getFile(), $exception->getLine()); + } + + public function setTrace($trace, $file, $line) + { + $this->trace = array(); + $this->trace[] = array( + 'namespace' => '', + 'short_class' => '', + 'class' => '', + 'type' => '', + 'function' => '', + 'file' => $file, + 'line' => $line, + 'args' => array(), + ); + foreach ($trace as $entry) { + $class = ''; + $namespace = ''; + if (isset($entry['class'])) { + $parts = explode('\\', $entry['class']); + $class = array_pop($parts); + $namespace = implode('\\', $parts); + } + + $this->trace[] = array( + 'namespace' => $namespace, + 'short_class' => $class, + 'class' => isset($entry['class']) ? $entry['class'] : '', + 'type' => isset($entry['type']) ? $entry['type'] : '', + 'function' => isset($entry['function']) ? $entry['function'] : null, + 'file' => isset($entry['file']) ? $entry['file'] : null, + 'line' => isset($entry['line']) ? $entry['line'] : null, + 'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : array(), + ); + } + } + + private function flattenArgs($args, $level = 0, &$count = 0) + { + $result = array(); + foreach ($args as $key => $value) { + if (++$count > 1e4) { + return array('array', '*SKIPPED over 10000 entries*'); + } + if ($value instanceof \__PHP_Incomplete_Class) { + // is_object() returns false on PHP<=7.1 + $result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value)); + } elseif (is_object($value)) { + $result[$key] = array('object', get_class($value)); + } elseif (is_array($value)) { + if ($level > 10) { + $result[$key] = array('array', '*DEEP NESTED ARRAY*'); + } else { + $result[$key] = array('array', $this->flattenArgs($value, $level + 1, $count)); + } + } elseif (null === $value) { + $result[$key] = array('null', null); + } elseif (is_bool($value)) { + $result[$key] = array('boolean', $value); + } elseif (is_int($value)) { + $result[$key] = array('integer', $value); + } elseif (is_float($value)) { + $result[$key] = array('float', $value); + } elseif (is_resource($value)) { + $result[$key] = array('resource', get_resource_type($value)); + } else { + $result[$key] = array('string', (string) $value); + } + } + + return $result; + } + + private function getClassNameFromIncomplete(\__PHP_Incomplete_Class $value) + { + $array = new \ArrayObject($value); + + return $array['__PHP_Incomplete_Class_Name']; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/OutOfMemoryException.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/OutOfMemoryException.php new file mode 100644 index 0000000000000000000000000000000000000000..fec19798364502d573e47c17da34290db2c43a4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/OutOfMemoryException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Exception; + +/** + * Out of memory exception. + * + * @author Nicolas Grekas + */ +class OutOfMemoryException extends FatalErrorException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/SilencedErrorContext.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/SilencedErrorContext.php new file mode 100644 index 0000000000000000000000000000000000000000..0c3a0e1d9fb58dc189bdf8b8b87af8c21eb2128c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/SilencedErrorContext.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Exception; + +/** + * Data Object that represents a Silenced Error. + * + * @author Grégoire Pineau + */ +class SilencedErrorContext implements \JsonSerializable +{ + private $severity; + private $file; + private $line; + + public function __construct($severity, $file, $line) + { + $this->severity = $severity; + $this->file = $file; + $this->line = $line; + } + + public function getSeverity() + { + return $this->severity; + } + + public function getFile() + { + return $this->file; + } + + public function getLine() + { + return $this->line; + } + + public function JsonSerialize() + { + return array( + 'severity' => $this->severity, + 'file' => $this->file, + 'line' => $this->line, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/UndefinedFunctionException.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/UndefinedFunctionException.php new file mode 100644 index 0000000000000000000000000000000000000000..a66ae2a3879c99778d464618c92c60dfb39b47bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/UndefinedFunctionException.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Exception; + +/** + * Undefined Function Exception. + * + * @author Konstanton Myakshin + */ +class UndefinedFunctionException extends FatalErrorException +{ + public function __construct($message, \ErrorException $previous) + { + parent::__construct( + $message, + $previous->getCode(), + $previous->getSeverity(), + $previous->getFile(), + $previous->getLine(), + $previous->getPrevious() + ); + $this->setTrace($previous->getTrace()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/UndefinedMethodException.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/UndefinedMethodException.php new file mode 100644 index 0000000000000000000000000000000000000000..350dc3187f47541b28c5d46301690a4832566288 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/UndefinedMethodException.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Exception; + +/** + * Undefined Method Exception. + * + * @author Grégoire Pineau + */ +class UndefinedMethodException extends FatalErrorException +{ + public function __construct($message, \ErrorException $previous) + { + parent::__construct( + $message, + $previous->getCode(), + $previous->getSeverity(), + $previous->getFile(), + $previous->getLine(), + $previous->getPrevious() + ); + $this->setTrace($previous->getTrace()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/ExceptionHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/ExceptionHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..2fdd8456fdf76e089b86c14049b204e6428c8287 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/ExceptionHandler.php @@ -0,0 +1,402 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug; + +use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\Debug\Exception\OutOfMemoryException; +use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; + +/** + * ExceptionHandler converts an exception to a Response object. + * + * It is mostly useful in debug mode to replace the default PHP/XDebug + * output with something prettier and more useful. + * + * As this class is mainly used during Kernel boot, where nothing is yet + * available, the Response content is always HTML. + * + * @author Fabien Potencier + * @author Nicolas Grekas + */ +class ExceptionHandler +{ + private $debug; + private $charset; + private $handler; + private $caughtBuffer; + private $caughtLength; + private $fileLinkFormat; + + public function __construct($debug = true, $charset = null, $fileLinkFormat = null) + { + $this->debug = $debug; + $this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8'; + $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + } + + /** + * Registers the exception handler. + * + * @param bool $debug Enable/disable debug mode, where the stack trace is displayed + * @param string|null $charset The charset used by exception messages + * @param string|null $fileLinkFormat The IDE link template + * + * @return static + */ + public static function register($debug = true, $charset = null, $fileLinkFormat = null) + { + $handler = new static($debug, $charset, $fileLinkFormat); + + $prev = set_exception_handler(array($handler, 'handle')); + if (is_array($prev) && $prev[0] instanceof ErrorHandler) { + restore_exception_handler(); + $prev[0]->setExceptionHandler(array($handler, 'handle')); + } + + return $handler; + } + + /** + * Sets a user exception handler. + * + * @param callable $handler An handler that will be called on Exception + * + * @return callable|null The previous exception handler if any + */ + public function setHandler(callable $handler = null) + { + $old = $this->handler; + $this->handler = $handler; + + return $old; + } + + /** + * Sets the format for links to source files. + * + * @param string|FileLinkFormatter $format The format for links to source files + * + * @return string The previous file link format + */ + public function setFileLinkFormat($fileLinkFormat) + { + $old = $this->fileLinkFormat; + $this->fileLinkFormat = $fileLinkFormat; + + return $old; + } + + /** + * Sends a response for the given Exception. + * + * To be as fail-safe as possible, the exception is first handled + * by our simple exception handler, then by the user exception handler. + * The latter takes precedence and any output from the former is cancelled, + * if and only if nothing bad happens in this handling path. + */ + public function handle(\Exception $exception) + { + if (null === $this->handler || $exception instanceof OutOfMemoryException) { + $this->sendPhpResponse($exception); + + return; + } + + $caughtLength = $this->caughtLength = 0; + + ob_start(function ($buffer) { + $this->caughtBuffer = $buffer; + + return ''; + }); + + $this->sendPhpResponse($exception); + while (null === $this->caughtBuffer && ob_end_flush()) { + // Empty loop, everything is in the condition + } + if (isset($this->caughtBuffer[0])) { + ob_start(function ($buffer) { + if ($this->caughtLength) { + // use substr_replace() instead of substr() for mbstring overloading resistance + $cleanBuffer = substr_replace($buffer, '', 0, $this->caughtLength); + if (isset($cleanBuffer[0])) { + $buffer = $cleanBuffer; + } + } + + return $buffer; + }); + + echo $this->caughtBuffer; + $caughtLength = ob_get_length(); + } + $this->caughtBuffer = null; + + try { + call_user_func($this->handler, $exception); + $this->caughtLength = $caughtLength; + } catch (\Exception $e) { + if (!$caughtLength) { + // All handlers failed. Let PHP handle that now. + throw $exception; + } + } + } + + /** + * Sends the error associated with the given Exception as a plain PHP response. + * + * This method uses plain PHP functions like header() and echo to output + * the response. + * + * @param \Exception|FlattenException $exception An \Exception or FlattenException instance + */ + public function sendPhpResponse($exception) + { + if (!$exception instanceof FlattenException) { + $exception = FlattenException::create($exception); + } + + if (!headers_sent()) { + header(sprintf('HTTP/1.0 %s', $exception->getStatusCode())); + foreach ($exception->getHeaders() as $name => $value) { + header($name.': '.$value, false); + } + header('Content-Type: text/html; charset='.$this->charset); + } + + echo $this->decorate($this->getContent($exception), $this->getStylesheet($exception)); + } + + /** + * Gets the full HTML content associated with the given exception. + * + * @param \Exception|FlattenException $exception An \Exception or FlattenException instance + * + * @return string The HTML content as a string + */ + public function getHtml($exception) + { + if (!$exception instanceof FlattenException) { + $exception = FlattenException::create($exception); + } + + return $this->decorate($this->getContent($exception), $this->getStylesheet($exception)); + } + + /** + * Gets the HTML content associated with the given exception. + * + * @param FlattenException $exception A FlattenException instance + * + * @return string The content as a string + */ + public function getContent(FlattenException $exception) + { + switch ($exception->getStatusCode()) { + case 404: + $title = 'Sorry, the page you are looking for could not be found.'; + break; + default: + $title = 'Whoops, looks like something went wrong.'; + } + + $content = ''; + if ($this->debug) { + try { + $count = count($exception->getAllPrevious()); + $total = $count + 1; + foreach ($exception->toArray() as $position => $e) { + $ind = $count - $position + 1; + $class = $this->formatClass($e['class']); + $message = nl2br($this->escapeHtml($e['message'])); + $content .= sprintf(<<<'EOF' +

    + %d/%d + %s%s: + %s +

    +
    +
      + +EOF + , $ind, $total, $class, $this->formatPath($e['trace'][0]['file'], $e['trace'][0]['line']), $message); + foreach ($e['trace'] as $trace) { + $content .= '
    1. '; + if ($trace['function']) { + $content .= sprintf('at %s%s%s(%s)', $this->formatClass($trace['class']), $trace['type'], $trace['function'], $this->formatArgs($trace['args'])); + } + if (isset($trace['file']) && isset($trace['line'])) { + $content .= $this->formatPath($trace['file'], $trace['line']); + } + $content .= "
    2. \n"; + } + + $content .= "
    \n
    \n"; + } + } catch (\Exception $e) { + // something nasty happened and we cannot throw an exception anymore + if ($this->debug) { + $title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($e), $this->escapeHtml($e->getMessage())); + } else { + $title = 'Whoops, looks like something went wrong.'; + } + } + } + + return << +

    $title

    + $content + +EOF; + } + + /** + * Gets the stylesheet associated with the given exception. + * + * @param FlattenException $exception A FlattenException instance + * + * @return string The stylesheet as a string + */ + public function getStylesheet(FlattenException $exception) + { + return <<<'EOF' + .sf-reset { font: 11px Verdana, Arial, sans-serif; color: #333 } + .sf-reset .clear { clear:both; height:0; font-size:0; line-height:0; } + .sf-reset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; } + .sf-reset .clear_fix { display:inline-block; } + .sf-reset * html .clear_fix { height:1%; } + .sf-reset .clear_fix { display:block; } + .sf-reset, .sf-reset .block { margin: auto } + .sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; } + .sf-reset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px } + .sf-reset strong { font-weight:bold; } + .sf-reset a { color:#6c6159; cursor: default; } + .sf-reset a img { border:none; } + .sf-reset a:hover { text-decoration:underline; } + .sf-reset em { font-style:italic; } + .sf-reset h1, .sf-reset h2 { font: 20px Georgia, "Times New Roman", Times, serif } + .sf-reset .exception_counter { background-color: #fff; color: #333; padding: 6px; float: left; margin-right: 10px; float: left; display: block; } + .sf-reset .exception_title { margin-left: 3em; margin-bottom: 0.7em; display: block; } + .sf-reset .exception_message { margin-left: 3em; display: block; } + .sf-reset .traces li { font-size:12px; padding: 2px 4px; list-style-type:decimal; margin-left:20px; } + .sf-reset .block { background-color:#FFFFFF; padding:10px 28px; margin-bottom:20px; + border-bottom-right-radius: 16px; + border-bottom-left-radius: 16px; + border-bottom:1px solid #ccc; + border-right:1px solid #ccc; + border-left:1px solid #ccc; + word-wrap: break-word; + } + .sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px; + border-top-left-radius: 16px; + border-top-right-radius: 16px; + border-top:1px solid #ccc; + border-right:1px solid #ccc; + border-left:1px solid #ccc; + overflow: hidden; + word-wrap: break-word; + } + .sf-reset a { background:none; color:#868686; text-decoration:none; } + .sf-reset a:hover { background:none; color:#313131; text-decoration:underline; } + .sf-reset ol { padding: 10px 0; } + .sf-reset h1 { background-color:#FFFFFF; padding: 15px 28px; margin-bottom: 20px; + border-radius: 10px; + border: 1px solid #ccc; + } +EOF; + } + + private function decorate($content, $css) + { + return << + + + + + + + + $content + + +EOF; + } + + private function formatClass($class) + { + $parts = explode('\\', $class); + + return sprintf('%s', $class, array_pop($parts)); + } + + private function formatPath($path, $line) + { + $file = $this->escapeHtml(preg_match('#[^/\\\\]*+$#', $path, $file) ? $file[0] : $path); + $fmt = $this->fileLinkFormat; + + if ($fmt && $link = is_string($fmt) ? strtr($fmt, array('%f' => $path, '%l' => $line)) : $fmt->format($path, $line)) { + return sprintf(' in %s line %d', $this->escapeHtml($link), $file, $line); + } + + return sprintf(' in %s line %d', $this->escapeHtml($path), $file, $line); + } + + /** + * Formats an array as a string. + * + * @param array $args The argument array + * + * @return string + */ + private function formatArgs(array $args) + { + $result = array(); + foreach ($args as $key => $item) { + if ('object' === $item[0]) { + $formattedValue = sprintf('object(%s)', $this->formatClass($item[1])); + } elseif ('array' === $item[0]) { + $formattedValue = sprintf('array(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); + } elseif ('null' === $item[0]) { + $formattedValue = 'null'; + } elseif ('boolean' === $item[0]) { + $formattedValue = ''.strtolower(var_export($item[1], true)).''; + } elseif ('resource' === $item[0]) { + $formattedValue = 'resource'; + } else { + $formattedValue = str_replace("\n", '', $this->escapeHtml(var_export($item[1], true))); + } + + $result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue); + } + + return implode(', ', $result); + } + + /** + * HTML-encodes a string. + */ + private function escapeHtml($str) + { + return htmlspecialchars($str, ENT_COMPAT | ENT_SUBSTITUTE, $this->charset); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..32ba9a09c5777a78a6f98f1a77f67efeec9fd5bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php @@ -0,0 +1,206 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\FatalErrorHandler; + +use Symfony\Component\Debug\Exception\ClassNotFoundException; +use Symfony\Component\Debug\Exception\FatalErrorException; +use Symfony\Component\Debug\DebugClassLoader; +use Composer\Autoload\ClassLoader as ComposerClassLoader; +use Symfony\Component\ClassLoader\ClassLoader as SymfonyClassLoader; + +/** + * ErrorHandler for classes that do not exist. + * + * @author Fabien Potencier + */ +class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface +{ + /** + * {@inheritdoc} + */ + public function handleError(array $error, FatalErrorException $exception) + { + $messageLen = strlen($error['message']); + $notFoundSuffix = '\' not found'; + $notFoundSuffixLen = strlen($notFoundSuffix); + if ($notFoundSuffixLen > $messageLen) { + return; + } + + if (0 !== substr_compare($error['message'], $notFoundSuffix, -$notFoundSuffixLen)) { + return; + } + + foreach (array('class', 'interface', 'trait') as $typeName) { + $prefix = ucfirst($typeName).' \''; + $prefixLen = strlen($prefix); + if (0 !== strpos($error['message'], $prefix)) { + continue; + } + + $fullyQualifiedClassName = substr($error['message'], $prefixLen, -$notFoundSuffixLen); + if (false !== $namespaceSeparatorIndex = strrpos($fullyQualifiedClassName, '\\')) { + $className = substr($fullyQualifiedClassName, $namespaceSeparatorIndex + 1); + $namespacePrefix = substr($fullyQualifiedClassName, 0, $namespaceSeparatorIndex); + $message = sprintf('Attempted to load %s "%s" from namespace "%s".', $typeName, $className, $namespacePrefix); + $tail = ' for another namespace?'; + } else { + $className = $fullyQualifiedClassName; + $message = sprintf('Attempted to load %s "%s" from the global namespace.', $typeName, $className); + $tail = '?'; + } + + if ($candidates = $this->getClassCandidates($className)) { + $tail = array_pop($candidates).'"?'; + if ($candidates) { + $tail = ' for e.g. "'.implode('", "', $candidates).'" or "'.$tail; + } else { + $tail = ' for "'.$tail; + } + } + $message .= "\nDid you forget a \"use\" statement".$tail; + + return new ClassNotFoundException($message, $exception); + } + } + + /** + * Tries to guess the full namespace for a given class name. + * + * By default, it looks for PSR-0 and PSR-4 classes registered via a Symfony or a Composer + * autoloader (that should cover all common cases). + * + * @param string $class A class name (without its namespace) + * + * @return array An array of possible fully qualified class names + */ + private function getClassCandidates($class) + { + if (!is_array($functions = spl_autoload_functions())) { + return array(); + } + + // find Symfony and Composer autoloaders + $classes = array(); + + foreach ($functions as $function) { + if (!is_array($function)) { + continue; + } + // get class loaders wrapped by DebugClassLoader + if ($function[0] instanceof DebugClassLoader) { + $function = $function[0]->getClassLoader(); + + if (!is_array($function)) { + continue; + } + } + + if ($function[0] instanceof ComposerClassLoader || $function[0] instanceof SymfonyClassLoader) { + foreach ($function[0]->getPrefixes() as $prefix => $paths) { + foreach ($paths as $path) { + $classes = array_merge($classes, $this->findClassInPath($path, $class, $prefix)); + } + } + } + if ($function[0] instanceof ComposerClassLoader) { + foreach ($function[0]->getPrefixesPsr4() as $prefix => $paths) { + foreach ($paths as $path) { + $classes = array_merge($classes, $this->findClassInPath($path, $class, $prefix)); + } + } + } + } + + return array_unique($classes); + } + + /** + * @param string $path + * @param string $class + * @param string $prefix + * + * @return array + */ + private function findClassInPath($path, $class, $prefix) + { + if (!$path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path)) { + return array(); + } + + $classes = array(); + $filename = $class.'.php'; + foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) { + if ($filename == $file->getFileName() && $class = $this->convertFileToClass($path, $file->getPathName(), $prefix)) { + $classes[] = $class; + } + } + + return $classes; + } + + /** + * @param string $path + * @param string $file + * @param string $prefix + * + * @return string|null + */ + private function convertFileToClass($path, $file, $prefix) + { + $candidates = array( + // namespaced class + $namespacedClass = str_replace(array($path.DIRECTORY_SEPARATOR, '.php', '/'), array('', '', '\\'), $file), + // namespaced class (with target dir) + $prefix.$namespacedClass, + // namespaced class (with target dir and separator) + $prefix.'\\'.$namespacedClass, + // PEAR class + str_replace('\\', '_', $namespacedClass), + // PEAR class (with target dir) + str_replace('\\', '_', $prefix.$namespacedClass), + // PEAR class (with target dir and separator) + str_replace('\\', '_', $prefix.'\\'.$namespacedClass), + ); + + if ($prefix) { + $candidates = array_filter($candidates, function ($candidate) use ($prefix) { return 0 === strpos($candidate, $prefix); }); + } + + // We cannot use the autoloader here as most of them use require; but if the class + // is not found, the new autoloader call will require the file again leading to a + // "cannot redeclare class" error. + foreach ($candidates as $candidate) { + if ($this->classExists($candidate)) { + return $candidate; + } + } + + require_once $file; + + foreach ($candidates as $candidate) { + if ($this->classExists($candidate)) { + return $candidate; + } + } + } + + /** + * @param string $class + * + * @return bool + */ + private function classExists($class) + { + return class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/FatalErrorHandlerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/FatalErrorHandlerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..6b87eb30a126e406b82bd8b493ac81506fbea805 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/FatalErrorHandlerInterface.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\Component\Debug\FatalErrorHandler; + +use Symfony\Component\Debug\Exception\FatalErrorException; + +/** + * Attempts to convert fatal errors to exceptions. + * + * @author Fabien Potencier + */ +interface FatalErrorHandlerInterface +{ + /** + * Attempts to convert an error into an exception. + * + * @param array $error An array as returned by error_get_last() + * @param FatalErrorException $exception A FatalErrorException instance + * + * @return FatalErrorException|null A FatalErrorException instance if the class is able to convert the error, null otherwise + */ + public function handleError(array $error, FatalErrorException $exception); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..c6f391a79c686fe86a3538ec0b98ddb975b30816 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\FatalErrorHandler; + +use Symfony\Component\Debug\Exception\UndefinedFunctionException; +use Symfony\Component\Debug\Exception\FatalErrorException; + +/** + * ErrorHandler for undefined functions. + * + * @author Fabien Potencier + */ +class UndefinedFunctionFatalErrorHandler implements FatalErrorHandlerInterface +{ + /** + * {@inheritdoc} + */ + public function handleError(array $error, FatalErrorException $exception) + { + $messageLen = strlen($error['message']); + $notFoundSuffix = '()'; + $notFoundSuffixLen = strlen($notFoundSuffix); + if ($notFoundSuffixLen > $messageLen) { + return; + } + + if (0 !== substr_compare($error['message'], $notFoundSuffix, -$notFoundSuffixLen)) { + return; + } + + $prefix = 'Call to undefined function '; + $prefixLen = strlen($prefix); + if (0 !== strpos($error['message'], $prefix)) { + return; + } + + $fullyQualifiedFunctionName = substr($error['message'], $prefixLen, -$notFoundSuffixLen); + if (false !== $namespaceSeparatorIndex = strrpos($fullyQualifiedFunctionName, '\\')) { + $functionName = substr($fullyQualifiedFunctionName, $namespaceSeparatorIndex + 1); + $namespacePrefix = substr($fullyQualifiedFunctionName, 0, $namespaceSeparatorIndex); + $message = sprintf('Attempted to call function "%s" from namespace "%s".', $functionName, $namespacePrefix); + } else { + $functionName = $fullyQualifiedFunctionName; + $message = sprintf('Attempted to call function "%s" from the global namespace.', $functionName); + } + + $candidates = array(); + foreach (get_defined_functions() as $type => $definedFunctionNames) { + foreach ($definedFunctionNames as $definedFunctionName) { + if (false !== $namespaceSeparatorIndex = strrpos($definedFunctionName, '\\')) { + $definedFunctionNameBasename = substr($definedFunctionName, $namespaceSeparatorIndex + 1); + } else { + $definedFunctionNameBasename = $definedFunctionName; + } + + if ($definedFunctionNameBasename === $functionName) { + $candidates[] = '\\'.$definedFunctionName; + } + } + } + + if ($candidates) { + sort($candidates); + $last = array_pop($candidates).'"?'; + if ($candidates) { + $candidates = 'e.g. "'.implode('", "', $candidates).'" or "'.$last; + } else { + $candidates = '"'.$last; + } + $message .= "\nDid you mean to call ".$candidates; + } + + return new UndefinedFunctionException($message, $exception); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..6fa62b6f24fbbf5fdc77da02f0d9e35b0fe440b8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\FatalErrorHandler; + +use Symfony\Component\Debug\Exception\FatalErrorException; +use Symfony\Component\Debug\Exception\UndefinedMethodException; + +/** + * ErrorHandler for undefined methods. + * + * @author Grégoire Pineau + */ +class UndefinedMethodFatalErrorHandler implements FatalErrorHandlerInterface +{ + /** + * {@inheritdoc} + */ + public function handleError(array $error, FatalErrorException $exception) + { + preg_match('/^Call to undefined method (.*)::(.*)\(\)$/', $error['message'], $matches); + if (!$matches) { + return; + } + + $className = $matches[1]; + $methodName = $matches[2]; + + $message = sprintf('Attempted to call an undefined method named "%s" of class "%s".', $methodName, $className); + + if (!class_exists($className) || null === $methods = get_class_methods($className)) { + // failed to get the class or its methods on which an unknown method was called (for example on an anonymous class) + return new UndefinedMethodException($message, $exception); + } + + $candidates = array(); + foreach ($methods as $definedMethodName) { + $lev = levenshtein($methodName, $definedMethodName); + if ($lev <= strlen($methodName) / 3 || false !== strpos($definedMethodName, $methodName)) { + $candidates[] = $definedMethodName; + } + } + + if ($candidates) { + sort($candidates); + $last = array_pop($candidates).'"?'; + if ($candidates) { + $candidates = 'e.g. "'.implode('", "', $candidates).'" or "'.$last; + } else { + $candidates = '"'.$last; + } + + $message .= "\nDid you mean to call ".$candidates; + } + + return new UndefinedMethodException($message, $exception); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Debug/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Debug/README.md b/vendor/symfony/symfony/src/Symfony/Component/Debug/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a1d16175c1a1f169986b517b4dd08ffcf1680f41 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/README.md @@ -0,0 +1,13 @@ +Debug Component +=============== + +The Debug component provides tools to ease debugging PHP code. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/debug/index.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/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/README.md b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/README.md new file mode 100644 index 0000000000000000000000000000000000000000..25dccf07664704efe155f18faea23e28d74b7aac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/README.md @@ -0,0 +1,134 @@ +Symfony Debug Extension for PHP 5 +================================= + +This extension publishes several functions to help building powerful debugging tools. +It is compatible with PHP 5.3, 5.4, 5.5 and 5.6; with ZTS and non-ZTS modes. +It is not required thus not provided for PHP 7. + +symfony_zval_info() +------------------- + +- exposes zval_hash/refcounts, allowing e.g. efficient exploration of arbitrary structures in PHP, +- does work with references, preventing memory copying. + +Its behavior is about the same as: + +```php + gettype($array[$key]), + 'zval_hash' => /* hashed memory address of $array[$key] */, + 'zval_refcount' => /* internal zval refcount of $array[$key] */, + 'zval_isref' => /* is_ref status of $array[$key] */, + ); + + switch ($info['type']) { + case 'object': + $info += array( + 'object_class' => get_class($array[$key]), + 'object_refcount' => /* internal object refcount of $array[$key] */, + 'object_hash' => spl_object_hash($array[$key]), + 'object_handle' => /* internal object handle $array[$key] */, + ); + break; + + case 'resource': + $info += array( + 'resource_handle' => (int) $array[$key], + 'resource_type' => get_resource_type($array[$key]), + 'resource_refcount' => /* internal resource refcount of $array[$key] */, + ); + break; + + case 'array': + $info += array( + 'array_count' => count($array[$key]), + ); + break; + + case 'string': + $info += array( + 'strlen' => strlen($array[$key]), + ); + break; + } + + return $info; +} +``` + +symfony_debug_backtrace() +------------------------- + +This function works like debug_backtrace(), except that it can fetch the full backtrace in case of fatal errors: + +```php +function foo() { fatal(); } +function bar() { foo(); } + +function sd() { var_dump(symfony_debug_backtrace()); } + +register_shutdown_function('sd'); + +bar(); + +/* Will output +Fatal error: Call to undefined function fatal() in foo.php on line 42 +array(3) { + [0]=> + array(2) { + ["function"]=> + string(2) "sd" + ["args"]=> + array(0) { + } + } + [1]=> + array(4) { + ["file"]=> + string(7) "foo.php" + ["line"]=> + int(1) + ["function"]=> + string(3) "foo" + ["args"]=> + array(0) { + } + } + [2]=> + array(4) { + ["file"]=> + string(102) "foo.php" + ["line"]=> + int(2) + ["function"]=> + string(3) "bar" + ["args"]=> + array(0) { + } + } +} +*/ +``` + +Usage +----- + +To enable the extension from source, run: + +``` + phpize + ./configure + make + sudo make install +``` diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/config.m4 b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/config.m4 new file mode 100644 index 0000000000000000000000000000000000000000..3c56047150569b5ad02799e03f7b7edfbee5d608 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/config.m4 @@ -0,0 +1,63 @@ +dnl $Id$ +dnl config.m4 for extension symfony_debug + +dnl Comments in this file start with the string 'dnl'. +dnl Remove where necessary. This file will not work +dnl without editing. + +dnl If your extension references something external, use with: + +dnl PHP_ARG_WITH(symfony_debug, for symfony_debug support, +dnl Make sure that the comment is aligned: +dnl [ --with-symfony_debug Include symfony_debug support]) + +dnl Otherwise use enable: + +PHP_ARG_ENABLE(symfony_debug, whether to enable symfony_debug support, +dnl Make sure that the comment is aligned: +[ --enable-symfony_debug Enable symfony_debug support]) + +if test "$PHP_SYMFONY_DEBUG" != "no"; then + dnl Write more examples of tests here... + + dnl # --with-symfony_debug -> check with-path + dnl SEARCH_PATH="/usr/local /usr" # you might want to change this + dnl SEARCH_FOR="/include/symfony_debug.h" # you most likely want to change this + dnl if test -r $PHP_SYMFONY_DEBUG/$SEARCH_FOR; then # path given as parameter + dnl SYMFONY_DEBUG_DIR=$PHP_SYMFONY_DEBUG + dnl else # search default path list + dnl AC_MSG_CHECKING([for symfony_debug files in default path]) + dnl for i in $SEARCH_PATH ; do + dnl if test -r $i/$SEARCH_FOR; then + dnl SYMFONY_DEBUG_DIR=$i + dnl AC_MSG_RESULT(found in $i) + dnl fi + dnl done + dnl fi + dnl + dnl if test -z "$SYMFONY_DEBUG_DIR"; then + dnl AC_MSG_RESULT([not found]) + dnl AC_MSG_ERROR([Please reinstall the symfony_debug distribution]) + dnl fi + + dnl # --with-symfony_debug -> add include path + dnl PHP_ADD_INCLUDE($SYMFONY_DEBUG_DIR/include) + + dnl # --with-symfony_debug -> check for lib and symbol presence + dnl LIBNAME=symfony_debug # you may want to change this + dnl LIBSYMBOL=symfony_debug # you most likely want to change this + + dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, + dnl [ + dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SYMFONY_DEBUG_DIR/lib, SYMFONY_DEBUG_SHARED_LIBADD) + dnl AC_DEFINE(HAVE_SYMFONY_DEBUGLIB,1,[ ]) + dnl ],[ + dnl AC_MSG_ERROR([wrong symfony_debug lib version or lib not found]) + dnl ],[ + dnl -L$SYMFONY_DEBUG_DIR/lib -lm + dnl ]) + dnl + dnl PHP_SUBST(SYMFONY_DEBUG_SHARED_LIBADD) + + PHP_NEW_EXTENSION(symfony_debug, symfony_debug.c, $ext_shared) +fi diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/config.w32 b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/config.w32 new file mode 100644 index 0000000000000000000000000000000000000000..487e6913891cf07b60f9779b0e3ffd18406c44ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/config.w32 @@ -0,0 +1,13 @@ +// $Id$ +// vim:ft=javascript + +// If your extension references something external, use ARG_WITH +// ARG_WITH("symfony_debug", "for symfony_debug support", "no"); + +// Otherwise, use ARG_ENABLE +// ARG_ENABLE("symfony_debug", "enable symfony_debug support", "no"); + +if (PHP_SYMFONY_DEBUG != "no") { + EXTENSION("symfony_debug", "symfony_debug.c"); +} + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/php_symfony_debug.h b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/php_symfony_debug.h new file mode 100644 index 0000000000000000000000000000000000000000..26d0e8c0120300cda3204ed5cefd445a354e7cac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/php_symfony_debug.h @@ -0,0 +1,60 @@ +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#ifndef PHP_SYMFONY_DEBUG_H +#define PHP_SYMFONY_DEBUG_H + +extern zend_module_entry symfony_debug_module_entry; +#define phpext_symfony_debug_ptr &symfony_debug_module_entry + +#define PHP_SYMFONY_DEBUG_VERSION "2.7" + +#ifdef PHP_WIN32 +# define PHP_SYMFONY_DEBUG_API __declspec(dllexport) +#elif defined(__GNUC__) && __GNUC__ >= 4 +# define PHP_SYMFONY_DEBUG_API __attribute__ ((visibility("default"))) +#else +# define PHP_SYMFONY_DEBUG_API +#endif + +#ifdef ZTS +#include "TSRM.h" +#endif + +ZEND_BEGIN_MODULE_GLOBALS(symfony_debug) + intptr_t req_rand_init; + void (*old_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args); + zval *debug_bt; +ZEND_END_MODULE_GLOBALS(symfony_debug) + +PHP_MINIT_FUNCTION(symfony_debug); +PHP_MSHUTDOWN_FUNCTION(symfony_debug); +PHP_RINIT_FUNCTION(symfony_debug); +PHP_RSHUTDOWN_FUNCTION(symfony_debug); +PHP_MINFO_FUNCTION(symfony_debug); +PHP_GINIT_FUNCTION(symfony_debug); +PHP_GSHUTDOWN_FUNCTION(symfony_debug); + +PHP_FUNCTION(symfony_zval_info); +PHP_FUNCTION(symfony_debug_backtrace); + +static char *_symfony_debug_memory_address_hash(void * TSRMLS_DC); +static const char *_symfony_debug_zval_type(zval *); +static const char* _symfony_debug_get_resource_type(long TSRMLS_DC); +static int _symfony_debug_get_resource_refcount(long TSRMLS_DC); + +void symfony_debug_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args); + +#ifdef ZTS +#define SYMFONY_DEBUG_G(v) TSRMG(symfony_debug_globals_id, zend_symfony_debug_globals *, v) +#else +#define SYMFONY_DEBUG_G(v) (symfony_debug_globals.v) +#endif + +#endif /* PHP_SYMFONY_DEBUG_H */ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/symfony_debug.c b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/symfony_debug.c new file mode 100644 index 0000000000000000000000000000000000000000..0d7cb602320f93e440ad8f0043bd69f97b1a7863 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/symfony_debug.c @@ -0,0 +1,283 @@ +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "php.h" +#ifdef ZTS +#include "TSRM.h" +#endif +#include "php_ini.h" +#include "ext/standard/info.h" +#include "php_symfony_debug.h" +#include "ext/standard/php_rand.h" +#include "ext/standard/php_lcg.h" +#include "ext/spl/php_spl.h" +#include "Zend/zend_gc.h" +#include "Zend/zend_builtin_functions.h" +#include "Zend/zend_extensions.h" /* for ZEND_EXTENSION_API_NO */ +#include "ext/standard/php_array.h" +#include "Zend/zend_interfaces.h" +#include "SAPI.h" + +#define IS_PHP_53 ZEND_EXTENSION_API_NO == 220090626 + +ZEND_DECLARE_MODULE_GLOBALS(symfony_debug) + +ZEND_BEGIN_ARG_INFO_EX(symfony_zval_arginfo, 0, 0, 2) + ZEND_ARG_INFO(0, key) + ZEND_ARG_ARRAY_INFO(0, array, 0) + ZEND_ARG_INFO(0, options) +ZEND_END_ARG_INFO() + +const zend_function_entry symfony_debug_functions[] = { + PHP_FE(symfony_zval_info, symfony_zval_arginfo) + PHP_FE(symfony_debug_backtrace, NULL) + PHP_FE_END +}; + +PHP_FUNCTION(symfony_debug_backtrace) +{ + if (zend_parse_parameters_none() == FAILURE) { + return; + } +#if IS_PHP_53 + zend_fetch_debug_backtrace(return_value, 1, 0 TSRMLS_CC); +#else + zend_fetch_debug_backtrace(return_value, 1, 0, 0 TSRMLS_CC); +#endif + + if (!SYMFONY_DEBUG_G(debug_bt)) { + return; + } + + php_array_merge(Z_ARRVAL_P(return_value), Z_ARRVAL_P(SYMFONY_DEBUG_G(debug_bt)), 0 TSRMLS_CC); +} + +PHP_FUNCTION(symfony_zval_info) +{ + zval *key = NULL, *arg = NULL; + zval **data = NULL; + HashTable *array = NULL; + long options = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zh|l", &key, &array, &options) == FAILURE) { + return; + } + + switch (Z_TYPE_P(key)) { + case IS_STRING: + if (zend_symtable_find(array, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&data) == FAILURE) { + return; + } + break; + case IS_LONG: + if (zend_hash_index_find(array, Z_LVAL_P(key), (void **)&data)) { + return; + } + break; + } + + arg = *data; + + array_init(return_value); + + add_assoc_string(return_value, "type", (char *)_symfony_debug_zval_type(arg), 1); + add_assoc_stringl(return_value, "zval_hash", _symfony_debug_memory_address_hash((void *)arg TSRMLS_CC), 16, 0); + add_assoc_long(return_value, "zval_refcount", Z_REFCOUNT_P(arg)); + add_assoc_bool(return_value, "zval_isref", (zend_bool)Z_ISREF_P(arg)); + + if (Z_TYPE_P(arg) == IS_OBJECT) { + char hash[33] = {0}; + + php_spl_object_hash(arg, (char *)hash TSRMLS_CC); + add_assoc_stringl(return_value, "object_class", (char *)Z_OBJCE_P(arg)->name, Z_OBJCE_P(arg)->name_length, 1); + add_assoc_long(return_value, "object_refcount", EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(arg)].bucket.obj.refcount); + add_assoc_string(return_value, "object_hash", hash, 1); + add_assoc_long(return_value, "object_handle", Z_OBJ_HANDLE_P(arg)); + } else if (Z_TYPE_P(arg) == IS_ARRAY) { + add_assoc_long(return_value, "array_count", zend_hash_num_elements(Z_ARRVAL_P(arg))); + } else if(Z_TYPE_P(arg) == IS_RESOURCE) { + add_assoc_long(return_value, "resource_handle", Z_LVAL_P(arg)); + add_assoc_string(return_value, "resource_type", (char *)_symfony_debug_get_resource_type(Z_LVAL_P(arg) TSRMLS_CC), 1); + add_assoc_long(return_value, "resource_refcount", _symfony_debug_get_resource_refcount(Z_LVAL_P(arg) TSRMLS_CC)); + } else if (Z_TYPE_P(arg) == IS_STRING) { + add_assoc_long(return_value, "strlen", Z_STRLEN_P(arg)); + } +} + +void symfony_debug_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) +{ + TSRMLS_FETCH(); + zval *retval; + + switch (type) { + case E_ERROR: + case E_PARSE: + case E_CORE_ERROR: + case E_CORE_WARNING: + case E_COMPILE_ERROR: + case E_COMPILE_WARNING: + ALLOC_INIT_ZVAL(retval); +#if IS_PHP_53 + zend_fetch_debug_backtrace(retval, 1, 0 TSRMLS_CC); +#else + zend_fetch_debug_backtrace(retval, 1, 0, 0 TSRMLS_CC); +#endif + SYMFONY_DEBUG_G(debug_bt) = retval; + } + + SYMFONY_DEBUG_G(old_error_cb)(type, error_filename, error_lineno, format, args); +} + +static const char* _symfony_debug_get_resource_type(long rsid TSRMLS_DC) +{ + const char *res_type; + res_type = zend_rsrc_list_get_rsrc_type(rsid TSRMLS_CC); + + if (!res_type) { + return "Unknown"; + } + + return res_type; +} + +static int _symfony_debug_get_resource_refcount(long rsid TSRMLS_DC) +{ + zend_rsrc_list_entry *le; + + if (zend_hash_index_find(&EG(regular_list), rsid, (void **) &le)==SUCCESS) { + return le->refcount; + } + + return 0; +} + +static char *_symfony_debug_memory_address_hash(void *address TSRMLS_DC) +{ + char *result = NULL; + intptr_t address_rand; + + if (!SYMFONY_DEBUG_G(req_rand_init)) { + if (!BG(mt_rand_is_seeded)) { + php_mt_srand(GENERATE_SEED() TSRMLS_CC); + } + SYMFONY_DEBUG_G(req_rand_init) = (intptr_t)php_mt_rand(TSRMLS_C); + } + + address_rand = (intptr_t)address ^ SYMFONY_DEBUG_G(req_rand_init); + + spprintf(&result, 17, "%016zx", address_rand); + + return result; +} + +static const char *_symfony_debug_zval_type(zval *zv) +{ + switch (Z_TYPE_P(zv)) { + case IS_NULL: + return "NULL"; + break; + + case IS_BOOL: + return "boolean"; + break; + + case IS_LONG: + return "integer"; + break; + + case IS_DOUBLE: + return "double"; + break; + + case IS_STRING: + return "string"; + break; + + case IS_ARRAY: + return "array"; + break; + + case IS_OBJECT: + return "object"; + + case IS_RESOURCE: + return "resource"; + + default: + return "unknown type"; + } +} + +zend_module_entry symfony_debug_module_entry = { + STANDARD_MODULE_HEADER, + "symfony_debug", + symfony_debug_functions, + PHP_MINIT(symfony_debug), + PHP_MSHUTDOWN(symfony_debug), + PHP_RINIT(symfony_debug), + PHP_RSHUTDOWN(symfony_debug), + PHP_MINFO(symfony_debug), + PHP_SYMFONY_DEBUG_VERSION, + PHP_MODULE_GLOBALS(symfony_debug), + PHP_GINIT(symfony_debug), + PHP_GSHUTDOWN(symfony_debug), + NULL, + STANDARD_MODULE_PROPERTIES_EX +}; + +#ifdef COMPILE_DL_SYMFONY_DEBUG +ZEND_GET_MODULE(symfony_debug) +#endif + +PHP_GINIT_FUNCTION(symfony_debug) +{ + memset(symfony_debug_globals, 0 , sizeof(*symfony_debug_globals)); +} + +PHP_GSHUTDOWN_FUNCTION(symfony_debug) +{ + +} + +PHP_MINIT_FUNCTION(symfony_debug) +{ + SYMFONY_DEBUG_G(old_error_cb) = zend_error_cb; + zend_error_cb = symfony_debug_error_cb; + + return SUCCESS; +} + +PHP_MSHUTDOWN_FUNCTION(symfony_debug) +{ + zend_error_cb = SYMFONY_DEBUG_G(old_error_cb); + + return SUCCESS; +} + +PHP_RINIT_FUNCTION(symfony_debug) +{ + return SUCCESS; +} + +PHP_RSHUTDOWN_FUNCTION(symfony_debug) +{ + return SUCCESS; +} + +PHP_MINFO_FUNCTION(symfony_debug) +{ + php_info_print_table_start(); + php_info_print_table_header(2, "Symfony Debug support", "enabled"); + php_info_print_table_header(2, "Symfony Debug version", PHP_SYMFONY_DEBUG_VERSION); + php_info_print_table_end(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/001.phpt b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/001.phpt new file mode 100644 index 0000000000000000000000000000000000000000..15e183a70615c5e6990554bbe7a93da96acb620d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/001.phpt @@ -0,0 +1,153 @@ +--TEST-- +Test symfony_zval_info API +--SKIPIF-- + +--FILE-- + $int, + 'float' => $float, + 'str' => $str, + 'object' => $object, + 'array' => $array, + 'resource' => $resource, + 'null' => $null, + 'bool' => $bool, + 'refcount' => &$refcount2, +); + +var_dump(symfony_zval_info('int', $var)); +var_dump(symfony_zval_info('float', $var)); +var_dump(symfony_zval_info('str', $var)); +var_dump(symfony_zval_info('object', $var)); +var_dump(symfony_zval_info('array', $var)); +var_dump(symfony_zval_info('resource', $var)); +var_dump(symfony_zval_info('null', $var)); +var_dump(symfony_zval_info('bool', $var)); + +var_dump(symfony_zval_info('refcount', $var)); +var_dump(symfony_zval_info('not-exist', $var)); +?> +--EXPECTF-- +array(4) { + ["type"]=> + string(7) "integer" + ["zval_hash"]=> + string(16) "%s" + ["zval_refcount"]=> + int(2) + ["zval_isref"]=> + bool(false) +} +array(4) { + ["type"]=> + string(6) "double" + ["zval_hash"]=> + string(16) "%s" + ["zval_refcount"]=> + int(2) + ["zval_isref"]=> + bool(false) +} +array(5) { + ["type"]=> + string(6) "string" + ["zval_hash"]=> + string(16) "%s" + ["zval_refcount"]=> + int(2) + ["zval_isref"]=> + bool(false) + ["strlen"]=> + int(6) +} +array(8) { + ["type"]=> + string(6) "object" + ["zval_hash"]=> + string(16) "%s" + ["zval_refcount"]=> + int(2) + ["zval_isref"]=> + bool(false) + ["object_class"]=> + string(8) "stdClass" + ["object_refcount"]=> + int(1) + ["object_hash"]=> + string(32) "%s" + ["object_handle"]=> + int(%d) +} +array(5) { + ["type"]=> + string(5) "array" + ["zval_hash"]=> + string(16) "%s" + ["zval_refcount"]=> + int(2) + ["zval_isref"]=> + bool(false) + ["array_count"]=> + int(2) +} +array(7) { + ["type"]=> + string(8) "resource" + ["zval_hash"]=> + string(16) "%s" + ["zval_refcount"]=> + int(2) + ["zval_isref"]=> + bool(false) + ["resource_handle"]=> + int(%d) + ["resource_type"]=> + string(6) "stream" + ["resource_refcount"]=> + int(1) +} +array(4) { + ["type"]=> + string(4) "NULL" + ["zval_hash"]=> + string(16) "%s" + ["zval_refcount"]=> + int(2) + ["zval_isref"]=> + bool(false) +} +array(4) { + ["type"]=> + string(7) "boolean" + ["zval_hash"]=> + string(16) "%s" + ["zval_refcount"]=> + int(2) + ["zval_isref"]=> + bool(false) +} +array(4) { + ["type"]=> + string(7) "integer" + ["zval_hash"]=> + string(16) "%s" + ["zval_refcount"]=> + int(3) + ["zval_isref"]=> + bool(true) +} +NULL diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/002.phpt b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/002.phpt new file mode 100644 index 0000000000000000000000000000000000000000..2bc6d71274d8231c00a2343313b8b3cb9565d1eb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/002.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test symfony_debug_backtrace in case of fatal error +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Fatal error: Call to undefined function notexist() in %s on line %d +Array +( + [0] => Array + ( + [function] => bt + [args] => Array + ( + ) + + ) + + [1] => Array + ( + [file] => %s + [line] => %d + [function] => foo + [args] => Array + ( + ) + + ) + + [2] => Array + ( + [file] => %s + [line] => %d + [function] => bar + [args] => Array + ( + ) + + ) + +) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/002_1.phpt b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/002_1.phpt new file mode 100644 index 0000000000000000000000000000000000000000..4e9e34f1b2a40f7f9922c9a70f631811707ac78c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/002_1.phpt @@ -0,0 +1,46 @@ +--TEST-- +Test symfony_debug_backtrace in case of non fatal error +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Array +( + [0] => Array + ( + [file] => %s + [line] => %d + [function] => bt + [args] => Array + ( + ) + + ) + + [1] => Array + ( + [file] => %s + [line] => %d + [function] => bar + [args] => Array + ( + ) + + ) + +) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/003.phpt b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/003.phpt new file mode 100644 index 0000000000000000000000000000000000000000..2a494e27af2f1eb664a86152397a06682766937a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/003.phpt @@ -0,0 +1,85 @@ +--TEST-- +Test ErrorHandler in case of fatal error +--SKIPIF-- + +--FILE-- +setExceptionHandler('print_r'); + +if (function_exists('xdebug_disable')) { + xdebug_disable(); +} + +bar(); +?> +--EXPECTF-- +Fatal error: Call to undefined function Symfony\Component\Debug\notexist() in %s on line %d +Symfony\Component\Debug\Exception\UndefinedFunctionException Object +( + [message:protected] => Attempted to call function "notexist" from namespace "Symfony\Component\Debug". + [string:Exception:private] => + [code:protected] => 0 + [file:protected] => %s + [line:protected] => %d + [trace:Exception:private] => Array + ( + [0] => Array + ( +%A [function] => Symfony\Component\Debug\foo +%A [args] => Array + ( + ) + + ) + + [1] => Array + ( +%A [function] => Symfony\Component\Debug\bar +%A [args] => Array + ( + ) + + ) +%A + ) + + [previous:Exception:private] => + [severity:protected] => 1 +) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b4cf139130d73a8744f17cb4db4c59aa53e09422 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php @@ -0,0 +1,316 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Debug\DebugClassLoader; +use Symfony\Component\Debug\ErrorHandler; + +class DebugClassLoaderTest extends TestCase +{ + /** + * @var int Error reporting level before running tests + */ + private $errorReporting; + + private $loader; + + protected function setUp() + { + $this->errorReporting = error_reporting(E_ALL); + $this->loader = new ClassLoader(); + spl_autoload_register(array($this->loader, 'loadClass'), true, true); + DebugClassLoader::enable(); + } + + protected function tearDown() + { + DebugClassLoader::disable(); + spl_autoload_unregister(array($this->loader, 'loadClass')); + error_reporting($this->errorReporting); + } + + public function testIdempotence() + { + DebugClassLoader::enable(); + + $functions = spl_autoload_functions(); + foreach ($functions as $function) { + if (is_array($function) && $function[0] instanceof DebugClassLoader) { + $reflClass = new \ReflectionClass($function[0]); + $reflProp = $reflClass->getProperty('classLoader'); + $reflProp->setAccessible(true); + + $this->assertNotInstanceOf('Symfony\Component\Debug\DebugClassLoader', $reflProp->getValue($function[0])); + + return; + } + } + + $this->fail('DebugClassLoader did not register'); + } + + public function testUnsilencing() + { + if (PHP_VERSION_ID >= 70000) { + $this->markTestSkipped('PHP7 throws exceptions, unsilencing is not required anymore.'); + } + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('HHVM is not handled in this test case.'); + } + + ob_start(); + + $this->iniSet('log_errors', 0); + $this->iniSet('display_errors', 1); + + // See below: this will fail with parse error + // but this should not be @-silenced. + @class_exists(__NAMESPACE__.'\TestingUnsilencing', true); + + $output = ob_get_clean(); + + $this->assertStringMatchesFormat('%aParse error%a', $output); + } + + public function testStacking() + { + // the ContextErrorException must not be loaded to test the workaround + // for https://bugs.php.net/65322. + if (class_exists('Symfony\Component\Debug\Exception\ContextErrorException', false)) { + $this->markTestSkipped('The ContextErrorException class is already loaded.'); + } + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('HHVM is not handled in this test case.'); + } + + ErrorHandler::register(); + + try { + // Trigger autoloading + E_STRICT at compile time + // which in turn triggers $errorHandler->handle() + // that again triggers autoloading for ContextErrorException. + // Error stacking works around the bug above and everything is fine. + + eval(' + namespace '.__NAMESPACE__.'; + class ChildTestingStacking extends TestingStacking { function foo($bar) {} } + '); + $this->fail('ContextErrorException expected'); + } catch (\ErrorException $exception) { + // if an exception is thrown, the test passed + $this->assertStringStartsWith(__FILE__, $exception->getFile()); + if (PHP_VERSION_ID < 70000) { + $this->assertRegExp('/^Runtime Notice: Declaration/', $exception->getMessage()); + $this->assertEquals(E_STRICT, $exception->getSeverity()); + } else { + $this->assertRegExp('/^Warning: Declaration/', $exception->getMessage()); + $this->assertEquals(E_WARNING, $exception->getSeverity()); + } + } finally { + restore_error_handler(); + restore_exception_handler(); + } + } + + /** + * @expectedException \RuntimeException + */ + public function testNameCaseMismatch() + { + class_exists(__NAMESPACE__.'\TestingCaseMismatch', true); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage Case mismatch between class and real file names + */ + public function testFileCaseMismatch() + { + if (!file_exists(__DIR__.'/Fixtures/CaseMismatch.php')) { + $this->markTestSkipped('Can only be run on case insensitive filesystems'); + } + + class_exists(__NAMESPACE__.'\Fixtures\CaseMismatch', true); + } + + /** + * @expectedException \RuntimeException + */ + public function testPsr4CaseMismatch() + { + class_exists(__NAMESPACE__.'\Fixtures\Psr4CaseMismatch', true); + } + + public function testNotPsr0() + { + $this->assertTrue(class_exists(__NAMESPACE__.'\Fixtures\NotPSR0', true)); + } + + public function testNotPsr0Bis() + { + $this->assertTrue(class_exists(__NAMESPACE__.'\Fixtures\NotPSR0bis', true)); + } + + public function testClassAlias() + { + $this->assertTrue(class_exists(__NAMESPACE__.'\Fixtures\ClassAlias', true)); + } + + /** + * @dataProvider provideDeprecatedSuper + */ + public function testDeprecatedSuper($class, $super, $type) + { + set_error_handler(function () { return false; }); + $e = error_reporting(0); + trigger_error('', E_USER_DEPRECATED); + + class_exists('Test\\'.__NAMESPACE__.'\\'.$class, true); + + error_reporting($e); + restore_error_handler(); + + $lastError = error_get_last(); + unset($lastError['file'], $lastError['line']); + + $xError = array( + 'type' => E_USER_DEPRECATED, + 'message' => 'The Test\Symfony\Component\Debug\Tests\\'.$class.' class '.$type.' Symfony\Component\Debug\Tests\Fixtures\\'.$super.' that is deprecated but this is a test deprecation notice.', + ); + + $this->assertSame($xError, $lastError); + } + + public function provideDeprecatedSuper() + { + return array( + array('DeprecatedInterfaceClass', 'DeprecatedInterface', 'implements'), + array('DeprecatedParentClass', 'DeprecatedClass', 'extends'), + ); + } + + public function testInterfaceExtendsDeprecatedInterface() + { + set_error_handler(function () { return false; }); + $e = error_reporting(0); + trigger_error('', E_USER_NOTICE); + + class_exists('Test\\'.__NAMESPACE__.'\\NonDeprecatedInterfaceClass', true); + + error_reporting($e); + restore_error_handler(); + + $lastError = error_get_last(); + unset($lastError['file'], $lastError['line']); + + $xError = array( + 'type' => E_USER_NOTICE, + 'message' => '', + ); + + $this->assertSame($xError, $lastError); + } + + public function testDeprecatedSuperInSameNamespace() + { + set_error_handler(function () { return false; }); + $e = error_reporting(0); + trigger_error('', E_USER_NOTICE); + + class_exists('Symfony\Bridge\Debug\Tests\Fixtures\ExtendsDeprecatedParent', true); + + error_reporting($e); + restore_error_handler(); + + $lastError = error_get_last(); + unset($lastError['file'], $lastError['line']); + + $xError = array( + 'type' => E_USER_NOTICE, + 'message' => '', + ); + + $this->assertSame($xError, $lastError); + } + + public function testReservedForPhp7() + { + if (PHP_VERSION_ID >= 70000) { + $this->markTestSkipped('PHP7 already prevents using reserved names.'); + } + + set_error_handler(function () { return false; }); + $e = error_reporting(0); + trigger_error('', E_USER_NOTICE); + + class_exists('Test\\'.__NAMESPACE__.'\\Float', true); + + error_reporting($e); + restore_error_handler(); + + $lastError = error_get_last(); + unset($lastError['file'], $lastError['line']); + + $xError = array( + 'type' => E_USER_DEPRECATED, + 'message' => 'Test\Symfony\Component\Debug\Tests\Float uses a reserved class name (Float) that will break on PHP 7 and higher', + ); + + $this->assertSame($xError, $lastError); + } +} + +class ClassLoader +{ + public function loadClass($class) + { + } + + public function getClassMap() + { + return array(__NAMESPACE__.'\Fixtures\NotPSR0bis' => __DIR__.'/Fixtures/notPsr0Bis.php'); + } + + public function findFile($class) + { + $fixtureDir = __DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR; + + if (__NAMESPACE__.'\TestingUnsilencing' === $class) { + eval('-- parse error --'); + } elseif (__NAMESPACE__.'\TestingStacking' === $class) { + eval('namespace '.__NAMESPACE__.'; class TestingStacking { function foo() {} }'); + } elseif (__NAMESPACE__.'\TestingCaseMismatch' === $class) { + eval('namespace '.__NAMESPACE__.'; class TestingCaseMisMatch {}'); + } elseif (__NAMESPACE__.'\Fixtures\CaseMismatch' === $class) { + return $fixtureDir.'CaseMismatch.php'; + } elseif (__NAMESPACE__.'\Fixtures\Psr4CaseMismatch' === $class) { + return $fixtureDir.'psr4'.DIRECTORY_SEPARATOR.'Psr4CaseMismatch.php'; + } elseif (__NAMESPACE__.'\Fixtures\NotPSR0' === $class) { + return $fixtureDir.'reallyNotPsr0.php'; + } elseif (__NAMESPACE__.'\Fixtures\NotPSR0bis' === $class) { + return $fixtureDir.'notPsr0Bis.php'; + } elseif (__NAMESPACE__.'\Fixtures\DeprecatedInterface' === $class) { + return $fixtureDir.'DeprecatedInterface.php'; + } elseif ('Symfony\Bridge\Debug\Tests\Fixtures\ExtendsDeprecatedParent' === $class) { + eval('namespace Symfony\Bridge\Debug\Tests\Fixtures; class ExtendsDeprecatedParent extends \\'.__NAMESPACE__.'\Fixtures\DeprecatedClass {}'); + } elseif ('Test\\'.__NAMESPACE__.'\DeprecatedParentClass' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; class DeprecatedParentClass extends \\'.__NAMESPACE__.'\Fixtures\DeprecatedClass {}'); + } elseif ('Test\\'.__NAMESPACE__.'\DeprecatedInterfaceClass' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; class DeprecatedInterfaceClass implements \\'.__NAMESPACE__.'\Fixtures\DeprecatedInterface {}'); + } elseif ('Test\\'.__NAMESPACE__.'\NonDeprecatedInterfaceClass' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; class NonDeprecatedInterfaceClass implements \\'.__NAMESPACE__.'\Fixtures\NonDeprecatedInterface {}'); + } elseif ('Test\\'.__NAMESPACE__.'\Float' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; class Float {}'); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0f052bd1c4218be9066922b7a501213e00b81465 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php @@ -0,0 +1,531 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Tests; + +use PHPUnit\Framework\TestCase; +use Psr\Log\LogLevel; +use Symfony\Component\Debug\BufferingLogger; +use Symfony\Component\Debug\ErrorHandler; +use Symfony\Component\Debug\Exception\ContextErrorException; +use Symfony\Component\Debug\Exception\SilencedErrorContext; + +/** + * ErrorHandlerTest. + * + * @author Robert Schönthal + * @author Nicolas Grekas + */ +class ErrorHandlerTest extends TestCase +{ + public function testRegister() + { + $handler = ErrorHandler::register(); + + try { + $this->assertInstanceOf('Symfony\Component\Debug\ErrorHandler', $handler); + $this->assertSame($handler, ErrorHandler::register()); + + $newHandler = new ErrorHandler(); + + $this->assertSame($newHandler, ErrorHandler::register($newHandler, false)); + $h = set_error_handler('var_dump'); + restore_error_handler(); + $this->assertSame(array($handler, 'handleError'), $h); + + try { + $this->assertSame($newHandler, ErrorHandler::register($newHandler, true)); + $h = set_error_handler('var_dump'); + restore_error_handler(); + $this->assertSame(array($newHandler, 'handleError'), $h); + } catch (\Exception $e) { + } + + restore_error_handler(); + restore_exception_handler(); + + if (isset($e)) { + throw $e; + } + } catch (\Exception $e) { + } + + restore_error_handler(); + restore_exception_handler(); + + if (isset($e)) { + throw $e; + } + } + + public function testNotice() + { + ErrorHandler::register(); + + try { + self::triggerNotice($this); + $this->fail('ContextErrorException expected'); + } catch (ContextErrorException $exception) { + // if an exception is thrown, the test passed + $this->assertEquals(E_NOTICE, $exception->getSeverity()); + $this->assertEquals(__FILE__, $exception->getFile()); + $this->assertRegExp('/^Notice: Undefined variable: (foo|bar)/', $exception->getMessage()); + $this->assertArrayHasKey('foobar', $exception->getContext()); + + $trace = $exception->getTrace(); + + $this->assertEquals(__FILE__, $trace[0]['file']); + $this->assertEquals(__CLASS__, $trace[0]['class']); + $this->assertEquals('triggerNotice', $trace[0]['function']); + $this->assertEquals('::', $trace[0]['type']); + + $this->assertEquals(__FILE__, $trace[0]['file']); + $this->assertEquals(__CLASS__, $trace[1]['class']); + $this->assertEquals(__FUNCTION__, $trace[1]['function']); + $this->assertEquals('->', $trace[1]['type']); + } finally { + restore_error_handler(); + restore_exception_handler(); + } + } + + // dummy function to test trace in error handler. + private static function triggerNotice($that) + { + // dummy variable to check for in error handler. + $foobar = 123; + $that->assertSame('', $foo.$foo.$bar); + } + + public function testConstruct() + { + try { + $handler = ErrorHandler::register(); + $handler->throwAt(3, true); + $this->assertEquals(3 | E_RECOVERABLE_ERROR | E_USER_ERROR, $handler->throwAt(0)); + } finally { + restore_error_handler(); + restore_exception_handler(); + } + } + + public function testDefaultLogger() + { + try { + $handler = ErrorHandler::register(); + + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + + $handler->setDefaultLogger($logger, E_NOTICE); + $handler->setDefaultLogger($logger, array(E_USER_NOTICE => LogLevel::CRITICAL)); + + $loggers = array( + E_DEPRECATED => array(null, LogLevel::INFO), + E_USER_DEPRECATED => array(null, LogLevel::INFO), + E_NOTICE => array($logger, LogLevel::WARNING), + E_USER_NOTICE => array($logger, LogLevel::CRITICAL), + E_STRICT => array(null, LogLevel::WARNING), + E_WARNING => array(null, LogLevel::WARNING), + E_USER_WARNING => array(null, LogLevel::WARNING), + E_COMPILE_WARNING => array(null, LogLevel::WARNING), + E_CORE_WARNING => array(null, LogLevel::WARNING), + E_USER_ERROR => array(null, LogLevel::CRITICAL), + E_RECOVERABLE_ERROR => array(null, LogLevel::CRITICAL), + E_COMPILE_ERROR => array(null, LogLevel::CRITICAL), + E_PARSE => array(null, LogLevel::CRITICAL), + E_ERROR => array(null, LogLevel::CRITICAL), + E_CORE_ERROR => array(null, LogLevel::CRITICAL), + ); + $this->assertSame($loggers, $handler->setLoggers(array())); + } finally { + restore_error_handler(); + restore_exception_handler(); + } + } + + public function testHandleError() + { + try { + $handler = ErrorHandler::register(); + $handler->throwAt(0, true); + $this->assertFalse($handler->handleError(0, 'foo', 'foo.php', 12, array())); + + restore_error_handler(); + restore_exception_handler(); + + $handler = ErrorHandler::register(); + $handler->throwAt(3, true); + $this->assertFalse($handler->handleError(4, 'foo', 'foo.php', 12, array())); + + restore_error_handler(); + restore_exception_handler(); + + $handler = ErrorHandler::register(); + $handler->throwAt(3, true); + try { + $handler->handleError(4, 'foo', 'foo.php', 12, array()); + } catch (\ErrorException $e) { + $this->assertSame('Parse Error: foo', $e->getMessage()); + $this->assertSame(4, $e->getSeverity()); + $this->assertSame('foo.php', $e->getFile()); + $this->assertSame(12, $e->getLine()); + } + + restore_error_handler(); + restore_exception_handler(); + + $handler = ErrorHandler::register(); + $handler->throwAt(E_USER_DEPRECATED, true); + $this->assertFalse($handler->handleError(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array())); + + restore_error_handler(); + restore_exception_handler(); + + $handler = ErrorHandler::register(); + $handler->throwAt(E_DEPRECATED, true); + $this->assertFalse($handler->handleError(E_DEPRECATED, 'foo', 'foo.php', 12, array())); + + restore_error_handler(); + restore_exception_handler(); + + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + + $warnArgCheck = function ($logLevel, $message, $context) { + $this->assertEquals('info', $logLevel); + $this->assertEquals('User Deprecated: foo', $message); + $this->assertArrayHasKey('exception', $context); + $exception = $context['exception']; + $this->assertInstanceOf(\ErrorException::class, $exception); + $this->assertSame('User Deprecated: foo', $exception->getMessage()); + $this->assertSame(E_USER_DEPRECATED, $exception->getSeverity()); + }; + + $logger + ->expects($this->once()) + ->method('log') + ->will($this->returnCallback($warnArgCheck)) + ; + + $handler = ErrorHandler::register(); + $handler->setDefaultLogger($logger, E_USER_DEPRECATED); + $this->assertTrue($handler->handleError(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array())); + + restore_error_handler(); + restore_exception_handler(); + + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + + $logArgCheck = function ($level, $message, $context) { + $this->assertEquals('Notice: Undefined variable: undefVar', $message); + $this->assertArrayHasKey('exception', $context); + $exception = $context['exception']; + $this->assertInstanceOf(SilencedErrorContext::class, $exception); + $this->assertSame(E_NOTICE, $exception->getSeverity()); + }; + + $logger + ->expects($this->once()) + ->method('log') + ->will($this->returnCallback($logArgCheck)) + ; + + $handler = ErrorHandler::register(); + $handler->setDefaultLogger($logger, E_NOTICE); + $handler->screamAt(E_NOTICE); + unset($undefVar); + @$undefVar++; + + restore_error_handler(); + restore_exception_handler(); + } catch (\Exception $e) { + restore_error_handler(); + restore_exception_handler(); + + throw $e; + } + } + + public function testHandleUserError() + { + try { + $handler = ErrorHandler::register(); + $handler->throwAt(0, true); + + $e = null; + $x = new \Exception('Foo'); + + try { + $f = new Fixtures\ToStringThrower($x); + $f .= ''; // Trigger $f->__toString() + } catch (\Exception $e) { + } + + $this->assertSame($x, $e); + } finally { + restore_error_handler(); + restore_exception_handler(); + } + } + + public function testHandleDeprecation() + { + $logArgCheck = function ($level, $message, $context) { + $this->assertEquals(LogLevel::INFO, $level); + $this->assertArrayHasKey('exception', $context); + $exception = $context['exception']; + $this->assertInstanceOf(\ErrorException::class, $exception); + $this->assertSame('User Deprecated: Foo deprecation', $exception->getMessage()); + }; + + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger + ->expects($this->once()) + ->method('log') + ->will($this->returnCallback($logArgCheck)) + ; + + $handler = new ErrorHandler(); + $handler->setDefaultLogger($logger); + @$handler->handleError(E_USER_DEPRECATED, 'Foo deprecation', __FILE__, __LINE__, array()); + } + + public function testHandleException() + { + try { + $handler = ErrorHandler::register(); + + $exception = new \Exception('foo'); + + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + + $logArgCheck = function ($level, $message, $context) { + $this->assertSame('Uncaught Exception: foo', $message); + $this->assertArrayHasKey('exception', $context); + $this->assertInstanceOf(\Exception::class, $context['exception']); + }; + + $logger + ->expects($this->exactly(2)) + ->method('log') + ->will($this->returnCallback($logArgCheck)) + ; + + $handler->setDefaultLogger($logger, E_ERROR); + + try { + $handler->handleException($exception); + $this->fail('Exception expected'); + } catch (\Exception $e) { + $this->assertSame($exception, $e); + } + + $handler->setExceptionHandler(function ($e) use ($exception) { + $this->assertSame($exception, $e); + }); + + $handler->handleException($exception); + } finally { + restore_error_handler(); + restore_exception_handler(); + } + } + + public function testErrorStacking() + { + try { + $handler = ErrorHandler::register(); + $handler->screamAt(E_USER_WARNING); + + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + + $logger + ->expects($this->exactly(2)) + ->method('log') + ->withConsecutive( + array($this->equalTo(LogLevel::WARNING), $this->equalTo('Dummy log')), + array($this->equalTo(LogLevel::DEBUG), $this->equalTo('User Warning: Silenced warning')) + ) + ; + + $handler->setDefaultLogger($logger, array(E_USER_WARNING => LogLevel::WARNING)); + + ErrorHandler::stackErrors(); + @trigger_error('Silenced warning', E_USER_WARNING); + $logger->log(LogLevel::WARNING, 'Dummy log'); + ErrorHandler::unstackErrors(); + } finally { + restore_error_handler(); + restore_exception_handler(); + } + } + + public function testBootstrappingLogger() + { + $bootLogger = new BufferingLogger(); + $handler = new ErrorHandler($bootLogger); + + $loggers = array( + E_DEPRECATED => array($bootLogger, LogLevel::INFO), + E_USER_DEPRECATED => array($bootLogger, LogLevel::INFO), + E_NOTICE => array($bootLogger, LogLevel::WARNING), + E_USER_NOTICE => array($bootLogger, LogLevel::WARNING), + E_STRICT => array($bootLogger, LogLevel::WARNING), + E_WARNING => array($bootLogger, LogLevel::WARNING), + E_USER_WARNING => array($bootLogger, LogLevel::WARNING), + E_COMPILE_WARNING => array($bootLogger, LogLevel::WARNING), + E_CORE_WARNING => array($bootLogger, LogLevel::WARNING), + E_USER_ERROR => array($bootLogger, LogLevel::CRITICAL), + E_RECOVERABLE_ERROR => array($bootLogger, LogLevel::CRITICAL), + E_COMPILE_ERROR => array($bootLogger, LogLevel::CRITICAL), + E_PARSE => array($bootLogger, LogLevel::CRITICAL), + E_ERROR => array($bootLogger, LogLevel::CRITICAL), + E_CORE_ERROR => array($bootLogger, LogLevel::CRITICAL), + ); + + $this->assertSame($loggers, $handler->setLoggers(array())); + + $handler->handleError(E_DEPRECATED, 'Foo message', __FILE__, 123, array()); + + $logs = $bootLogger->cleanLogs(); + + $this->assertCount(1, $logs); + $log = $logs[0]; + $this->assertSame('info', $log[0]); + $this->assertSame('Deprecated: Foo message', $log[1]); + $this->assertArrayHasKey('exception', $log[2]); + $exception = $log[2]['exception']; + $this->assertInstanceOf(\ErrorException::class, $exception); + $this->assertSame('Deprecated: Foo message', $exception->getMessage()); + $this->assertSame(__FILE__, $exception->getFile()); + $this->assertSame(123, $exception->getLine()); + $this->assertSame(E_DEPRECATED, $exception->getSeverity()); + + $bootLogger->log(LogLevel::WARNING, 'Foo message', array('exception' => $exception)); + + $mockLogger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $mockLogger->expects($this->once()) + ->method('log') + ->with(LogLevel::WARNING, 'Foo message', array('exception' => $exception)); + + $handler->setLoggers(array(E_DEPRECATED => array($mockLogger, LogLevel::WARNING))); + } + + public function testSettingLoggerWhenExceptionIsBuffered() + { + $bootLogger = new BufferingLogger(); + $handler = new ErrorHandler($bootLogger); + + $exception = new \Exception('Foo message'); + + $mockLogger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $mockLogger->expects($this->once()) + ->method('log') + ->with(LogLevel::CRITICAL, 'Uncaught Exception: Foo message', array('exception' => $exception)); + + $handler->setExceptionHandler(function () use ($handler, $mockLogger) { + $handler->setDefaultLogger($mockLogger); + }); + + $handler->handleException($exception); + } + + public function testHandleFatalError() + { + try { + $handler = ErrorHandler::register(); + + $error = array( + 'type' => E_PARSE, + 'message' => 'foo', + 'file' => 'bar', + 'line' => 123, + ); + + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + + $logArgCheck = function ($level, $message, $context) { + $this->assertEquals('Fatal Parse Error: foo', $message); + $this->assertArrayHasKey('exception', $context); + $this->assertInstanceOf(\Exception::class, $context['exception']); + }; + + $logger + ->expects($this->once()) + ->method('log') + ->will($this->returnCallback($logArgCheck)) + ; + + $handler->setDefaultLogger($logger, E_PARSE); + + $handler->handleFatalError($error); + + restore_error_handler(); + restore_exception_handler(); + } catch (\Exception $e) { + restore_error_handler(); + restore_exception_handler(); + + throw $e; + } + } + + /** + * @requires PHP 7 + */ + public function testHandleErrorException() + { + $exception = new \Error("Class 'Foo' not found"); + + $handler = new ErrorHandler(); + $handler->setExceptionHandler(function () use (&$args) { + $args = func_get_args(); + }); + + $handler->handleException($exception); + + $this->assertInstanceOf('Symfony\Component\Debug\Exception\ClassNotFoundException', $args[0]); + $this->assertStringStartsWith("Attempted to load class \"Foo\" from the global namespace.\nDid you forget a \"use\" statement", $args[0]->getMessage()); + } + + public function testHandleFatalErrorOnHHVM() + { + try { + $handler = ErrorHandler::register(); + + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger + ->expects($this->once()) + ->method('log') + ->with( + $this->equalTo(LogLevel::CRITICAL), + $this->equalTo('Fatal Error: foo') + ) + ; + + $handler->setDefaultLogger($logger, E_ERROR); + + $error = array( + 'type' => E_ERROR + 0x1000000, // This error level is used by HHVM for fatal errors + 'message' => 'foo', + 'file' => 'bar', + 'line' => 123, + 'context' => array(123), + 'backtrace' => array(456), + ); + + call_user_func_array(array($handler, 'handleError'), $error); + $handler->handleFatalError($error); + } finally { + restore_error_handler(); + restore_exception_handler(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..82394459d3f8f4bb305f8d43790c1b6aff70ed58 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php @@ -0,0 +1,295 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Tests\Exception; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; +use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; +use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; +use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException; +use Symfony\Component\HttpKernel\Exception\ConflictHttpException; +use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; +use Symfony\Component\HttpKernel\Exception\GoneHttpException; +use Symfony\Component\HttpKernel\Exception\LengthRequiredHttpException; +use Symfony\Component\HttpKernel\Exception\PreconditionFailedHttpException; +use Symfony\Component\HttpKernel\Exception\PreconditionRequiredHttpException; +use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException; +use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException; +use Symfony\Component\HttpKernel\Exception\UnsupportedMediaTypeHttpException; + +class FlattenExceptionTest extends TestCase +{ + public function testStatusCode() + { + $flattened = FlattenException::create(new \RuntimeException(), 403); + $this->assertEquals('403', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new \RuntimeException()); + $this->assertEquals('500', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new NotFoundHttpException()); + $this->assertEquals('404', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new UnauthorizedHttpException('Basic realm="My Realm"')); + $this->assertEquals('401', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new BadRequestHttpException()); + $this->assertEquals('400', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new NotAcceptableHttpException()); + $this->assertEquals('406', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new ConflictHttpException()); + $this->assertEquals('409', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new MethodNotAllowedHttpException(array('POST'))); + $this->assertEquals('405', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new AccessDeniedHttpException()); + $this->assertEquals('403', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new GoneHttpException()); + $this->assertEquals('410', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new LengthRequiredHttpException()); + $this->assertEquals('411', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new PreconditionFailedHttpException()); + $this->assertEquals('412', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new PreconditionRequiredHttpException()); + $this->assertEquals('428', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new ServiceUnavailableHttpException()); + $this->assertEquals('503', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new TooManyRequestsHttpException()); + $this->assertEquals('429', $flattened->getStatusCode()); + + $flattened = FlattenException::create(new UnsupportedMediaTypeHttpException()); + $this->assertEquals('415', $flattened->getStatusCode()); + } + + public function testHeadersForHttpException() + { + $flattened = FlattenException::create(new MethodNotAllowedHttpException(array('POST'))); + $this->assertEquals(array('Allow' => 'POST'), $flattened->getHeaders()); + + $flattened = FlattenException::create(new UnauthorizedHttpException('Basic realm="My Realm"')); + $this->assertEquals(array('WWW-Authenticate' => 'Basic realm="My Realm"'), $flattened->getHeaders()); + + $flattened = FlattenException::create(new ServiceUnavailableHttpException('Fri, 31 Dec 1999 23:59:59 GMT')); + $this->assertEquals(array('Retry-After' => 'Fri, 31 Dec 1999 23:59:59 GMT'), $flattened->getHeaders()); + + $flattened = FlattenException::create(new ServiceUnavailableHttpException(120)); + $this->assertEquals(array('Retry-After' => 120), $flattened->getHeaders()); + + $flattened = FlattenException::create(new TooManyRequestsHttpException('Fri, 31 Dec 1999 23:59:59 GMT')); + $this->assertEquals(array('Retry-After' => 'Fri, 31 Dec 1999 23:59:59 GMT'), $flattened->getHeaders()); + + $flattened = FlattenException::create(new TooManyRequestsHttpException(120)); + $this->assertEquals(array('Retry-After' => 120), $flattened->getHeaders()); + } + + /** + * @dataProvider flattenDataProvider + */ + public function testFlattenHttpException(\Exception $exception, $statusCode) + { + $flattened = FlattenException::create($exception); + $flattened2 = FlattenException::create($exception); + + $flattened->setPrevious($flattened2); + + $this->assertEquals($exception->getMessage(), $flattened->getMessage(), 'The message is copied from the original exception.'); + $this->assertEquals($exception->getCode(), $flattened->getCode(), 'The code is copied from the original exception.'); + $this->assertInstanceOf($flattened->getClass(), $exception, 'The class is set to the class of the original exception'); + } + + /** + * @dataProvider flattenDataProvider + */ + public function testPrevious(\Exception $exception, $statusCode) + { + $flattened = FlattenException::create($exception); + $flattened2 = FlattenException::create($exception); + + $flattened->setPrevious($flattened2); + + $this->assertSame($flattened2, $flattened->getPrevious()); + + $this->assertSame(array($flattened2), $flattened->getAllPrevious()); + } + + /** + * @requires PHP 7.0 + */ + public function testPreviousError() + { + $exception = new \Exception('test', 123, new \ParseError('Oh noes!', 42)); + + $flattened = FlattenException::create($exception)->getPrevious(); + + $this->assertEquals($flattened->getMessage(), 'Parse error: Oh noes!', 'The message is copied from the original exception.'); + $this->assertEquals($flattened->getCode(), 42, 'The code is copied from the original exception.'); + $this->assertEquals($flattened->getClass(), 'Symfony\Component\Debug\Exception\FatalThrowableError', 'The class is set to the class of the original exception'); + } + + /** + * @dataProvider flattenDataProvider + */ + public function testLine(\Exception $exception) + { + $flattened = FlattenException::create($exception); + $this->assertSame($exception->getLine(), $flattened->getLine()); + } + + /** + * @dataProvider flattenDataProvider + */ + public function testFile(\Exception $exception) + { + $flattened = FlattenException::create($exception); + $this->assertSame($exception->getFile(), $flattened->getFile()); + } + + /** + * @dataProvider flattenDataProvider + */ + public function testToArray(\Exception $exception, $statusCode) + { + $flattened = FlattenException::create($exception); + $flattened->setTrace(array(), 'foo.php', 123); + + $this->assertEquals(array( + array( + 'message' => 'test', + 'class' => 'Exception', + 'trace' => array(array( + 'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => '', 'file' => 'foo.php', 'line' => 123, + 'args' => array(), + )), + ), + ), $flattened->toArray()); + } + + public function flattenDataProvider() + { + return array( + array(new \Exception('test', 123), 500), + ); + } + + public function testArguments() + { + $dh = opendir(__DIR__); + $fh = tmpfile(); + + $incomplete = unserialize('O:14:"BogusTestClass":0:{}'); + + $exception = $this->createException(array( + (object) array('foo' => 1), + new NotFoundHttpException(), + $incomplete, + $dh, + $fh, + function () {}, + array(1, 2), + array('foo' => 123), + null, + true, + false, + 0, + 0.0, + '0', + '', + INF, + NAN, + )); + + $flattened = FlattenException::create($exception); + $trace = $flattened->getTrace(); + $args = $trace[1]['args']; + $array = $args[0][1]; + + closedir($dh); + fclose($fh); + + $i = 0; + $this->assertSame(array('object', 'stdClass'), $array[$i++]); + $this->assertSame(array('object', 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException'), $array[$i++]); + $this->assertSame(array('incomplete-object', 'BogusTestClass'), $array[$i++]); + $this->assertSame(array('resource', defined('HHVM_VERSION') ? 'Directory' : 'stream'), $array[$i++]); + $this->assertSame(array('resource', 'stream'), $array[$i++]); + + $args = $array[$i++]; + $this->assertSame($args[0], 'object'); + $this->assertTrue('Closure' === $args[1] || is_subclass_of($args[1], '\Closure'), 'Expect object class name to be Closure or a subclass of Closure.'); + + $this->assertSame(array('array', array(array('integer', 1), array('integer', 2))), $array[$i++]); + $this->assertSame(array('array', array('foo' => array('integer', 123))), $array[$i++]); + $this->assertSame(array('null', null), $array[$i++]); + $this->assertSame(array('boolean', true), $array[$i++]); + $this->assertSame(array('boolean', false), $array[$i++]); + $this->assertSame(array('integer', 0), $array[$i++]); + $this->assertSame(array('float', 0.0), $array[$i++]); + $this->assertSame(array('string', '0'), $array[$i++]); + $this->assertSame(array('string', ''), $array[$i++]); + $this->assertSame(array('float', INF), $array[$i++]); + + // assertEquals() does not like NAN values. + $this->assertEquals($array[$i][0], 'float'); + $this->assertTrue(is_nan($array[$i++][1])); + } + + public function testRecursionInArguments() + { + $a = array('foo', array(2, &$a)); + $exception = $this->createException($a); + + $flattened = FlattenException::create($exception); + $trace = $flattened->getTrace(); + $this->assertContains('*DEEP NESTED ARRAY*', serialize($trace)); + } + + public function testTooBigArray() + { + $a = array(); + for ($i = 0; $i < 20; ++$i) { + for ($j = 0; $j < 50; ++$j) { + for ($k = 0; $k < 10; ++$k) { + $a[$i][$j][$k] = 'value'; + } + } + } + $a[20] = 'value'; + $a[21] = 'value1'; + $exception = $this->createException($a); + + $flattened = FlattenException::create($exception); + $trace = $flattened->getTrace(); + + $this->assertSame($trace[1]['args'][0], array('array', array('array', '*SKIPPED over 10000 entries*'))); + + $serializeTrace = serialize($trace); + + $this->assertContains('*SKIPPED over 10000 entries*', $serializeTrace); + $this->assertNotContains('*value1*', $serializeTrace); + } + + private function createException($foo) + { + return new \Exception(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b3701284d444318ebb698191b830f6429ac42d06 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Debug\ExceptionHandler; +use Symfony\Component\Debug\Exception\OutOfMemoryException; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; + +require_once __DIR__.'/HeaderMock.php'; + +class ExceptionHandlerTest extends TestCase +{ + protected function setUp() + { + testHeader(); + } + + protected function tearDown() + { + testHeader(); + } + + public function testDebug() + { + $handler = new ExceptionHandler(false); + + ob_start(); + $handler->sendPhpResponse(new \RuntimeException('Foo')); + $response = ob_get_clean(); + + $this->assertContains('

    Whoops, looks like something went wrong.

    ', $response); + $this->assertNotContains('

    ', $response); + + $handler = new ExceptionHandler(true); + + ob_start(); + $handler->sendPhpResponse(new \RuntimeException('Foo')); + $response = ob_get_clean(); + + $this->assertContains('

    Whoops, looks like something went wrong.

    ', $response); + $this->assertContains('

    ', $response); + } + + public function testStatusCode() + { + $handler = new ExceptionHandler(false, 'iso8859-1'); + + ob_start(); + $handler->sendPhpResponse(new NotFoundHttpException('Foo')); + $response = ob_get_clean(); + + $this->assertContains('Sorry, the page you are looking for could not be found.', $response); + + $expectedHeaders = array( + array('HTTP/1.0 404', true, null), + array('Content-Type: text/html; charset=iso8859-1', true, null), + ); + + $this->assertSame($expectedHeaders, testHeader()); + } + + public function testHeaders() + { + $handler = new ExceptionHandler(false, 'iso8859-1'); + + ob_start(); + $handler->sendPhpResponse(new MethodNotAllowedHttpException(array('POST'))); + $response = ob_get_clean(); + + $expectedHeaders = array( + array('HTTP/1.0 405', true, null), + array('Allow: POST', false, null), + array('Content-Type: text/html; charset=iso8859-1', true, null), + ); + + $this->assertSame($expectedHeaders, testHeader()); + } + + public function testNestedExceptions() + { + $handler = new ExceptionHandler(true); + ob_start(); + $handler->sendPhpResponse(new \RuntimeException('Foo', 0, new \RuntimeException('Bar'))); + $response = ob_get_clean(); + + $this->assertStringMatchesFormat('%AFoo%ABar%A', $response); + } + + public function testHandle() + { + $exception = new \Exception('foo'); + + $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(array('sendPhpResponse'))->getMock(); + $handler + ->expects($this->exactly(2)) + ->method('sendPhpResponse'); + + $handler->handle($exception); + + $handler->setHandler(function ($e) use ($exception) { + $this->assertSame($exception, $e); + }); + + $handler->handle($exception); + } + + public function testHandleOutOfMemoryException() + { + $exception = new OutOfMemoryException('foo', 0, E_ERROR, __FILE__, __LINE__); + + $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(array('sendPhpResponse'))->getMock(); + $handler + ->expects($this->once()) + ->method('sendPhpResponse'); + + $handler->setHandler(function ($e) { + $this->fail('OutOfMemoryException should bypass the handler'); + }); + + $handler->handle($exception); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a09282757aff0361ab907faca3c4cf1aa0518959 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php @@ -0,0 +1,179 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Tests\FatalErrorHandler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Debug\Exception\FatalErrorException; +use Symfony\Component\ClassLoader\ClassLoader as SymfonyClassLoader; +use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler; +use Symfony\Component\Debug\DebugClassLoader; +use Composer\Autoload\ClassLoader as ComposerClassLoader; + +class ClassNotFoundFatalErrorHandlerTest extends TestCase +{ + public static function setUpBeforeClass() + { + foreach (spl_autoload_functions() as $function) { + if (!is_array($function)) { + continue; + } + + // get class loaders wrapped by DebugClassLoader + if ($function[0] instanceof DebugClassLoader) { + $function = $function[0]->getClassLoader(); + } + + if ($function[0] instanceof ComposerClassLoader) { + $function[0]->add('Symfony_Component_Debug_Tests_Fixtures', dirname(dirname(dirname(dirname(dirname(__DIR__)))))); + break; + } + } + } + + /** + * @dataProvider provideClassNotFoundData + */ + public function testHandleClassNotFound($error, $translatedMessage, $autoloader = null) + { + if ($autoloader) { + // Unregister all autoloaders to ensure the custom provided + // autoloader is the only one to be used during the test run. + $autoloaders = spl_autoload_functions(); + array_map('spl_autoload_unregister', $autoloaders); + spl_autoload_register($autoloader); + } + + $handler = new ClassNotFoundFatalErrorHandler(); + + $exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line'])); + + if ($autoloader) { + spl_autoload_unregister($autoloader); + array_map('spl_autoload_register', $autoloaders); + } + + $this->assertInstanceOf('Symfony\Component\Debug\Exception\ClassNotFoundException', $exception); + $this->assertSame($translatedMessage, $exception->getMessage()); + $this->assertSame($error['type'], $exception->getSeverity()); + $this->assertSame($error['file'], $exception->getFile()); + $this->assertSame($error['line'], $exception->getLine()); + } + + public function provideClassNotFoundData() + { + $prefixes = array('Symfony\Component\Debug\Exception\\' => realpath(__DIR__.'/../../Exception')); + + $symfonyAutoloader = new SymfonyClassLoader(); + $symfonyAutoloader->addPrefixes($prefixes); + + $debugClassLoader = new DebugClassLoader(array($symfonyAutoloader, 'loadClass')); + + return array( + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Class \'WhizBangFactory\' not found', + ), + "Attempted to load class \"WhizBangFactory\" from the global namespace.\nDid you forget a \"use\" statement?", + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Class \'Foo\\Bar\\WhizBangFactory\' not found', + ), + "Attempted to load class \"WhizBangFactory\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for another namespace?", + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Class \'UndefinedFunctionException\' not found', + ), + "Attempted to load class \"UndefinedFunctionException\" from the global namespace.\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Class \'PEARClass\' not found', + ), + "Attempted to load class \"PEARClass\" from the global namespace.\nDid you forget a \"use\" statement for \"Symfony_Component_Debug_Tests_Fixtures_PEARClass\"?", + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', + ), + "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', + ), + "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", + array($symfonyAutoloader, 'loadClass'), + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', + ), + "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", + array($debugClassLoader, 'loadClass'), + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', + ), + "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for another namespace?", + function ($className) { /* do nothing here */ }, + ), + ); + } + + public function testCannotRedeclareClass() + { + if (!file_exists(__DIR__.'/../FIXTURES2/REQUIREDTWICE.PHP')) { + $this->markTestSkipped('Can only be run on case insensitive filesystems'); + } + + require_once __DIR__.'/../FIXTURES2/REQUIREDTWICE.PHP'; + + $error = array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Class \'Foo\\Bar\\RequiredTwice\' not found', + ); + + $handler = new ClassNotFoundFatalErrorHandler(); + $exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line'])); + + $this->assertInstanceOf('Symfony\Component\Debug\Exception\ClassNotFoundException', $exception); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1dc2120045c2cd4a13a1c5b641453d99fe1e9420 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Tests\FatalErrorHandler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Debug\Exception\FatalErrorException; +use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler; + +class UndefinedFunctionFatalErrorHandlerTest extends TestCase +{ + /** + * @dataProvider provideUndefinedFunctionData + */ + public function testUndefinedFunction($error, $translatedMessage) + { + $handler = new UndefinedFunctionFatalErrorHandler(); + $exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line'])); + + $this->assertInstanceOf('Symfony\Component\Debug\Exception\UndefinedFunctionException', $exception); + // class names are case insensitive and PHP/HHVM do not return the same + $this->assertSame(strtolower($translatedMessage), strtolower($exception->getMessage())); + $this->assertSame($error['type'], $exception->getSeverity()); + $this->assertSame($error['file'], $exception->getFile()); + $this->assertSame($error['line'], $exception->getLine()); + } + + public function provideUndefinedFunctionData() + { + return array( + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Call to undefined function test_namespaced_function()', + ), + "Attempted to call function \"test_namespaced_function\" from the global namespace.\nDid you mean to call \"\\symfony\\component\\debug\\tests\\fatalerrorhandler\\test_namespaced_function\"?", + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Call to undefined function Foo\\Bar\\Baz\\test_namespaced_function()', + ), + "Attempted to call function \"test_namespaced_function\" from namespace \"Foo\\Bar\\Baz\".\nDid you mean to call \"\\symfony\\component\\debug\\tests\\fatalerrorhandler\\test_namespaced_function\"?", + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Call to undefined function foo()', + ), + 'Attempted to call function "foo" from the global namespace.', + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Call to undefined function Foo\\Bar\\Baz\\foo()', + ), + 'Attempted to call function "foo" from namespace "Foo\Bar\Baz".', + ), + ); + } +} + +function test_namespaced_function() +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..739e5b2b15b7ddddaf5376dfc32fc5b960202fbf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Tests\FatalErrorHandler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Debug\Exception\FatalErrorException; +use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler; + +class UndefinedMethodFatalErrorHandlerTest extends TestCase +{ + /** + * @dataProvider provideUndefinedMethodData + */ + public function testUndefinedMethod($error, $translatedMessage) + { + $handler = new UndefinedMethodFatalErrorHandler(); + $exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line'])); + + $this->assertInstanceOf('Symfony\Component\Debug\Exception\UndefinedMethodException', $exception); + $this->assertSame($translatedMessage, $exception->getMessage()); + $this->assertSame($error['type'], $exception->getSeverity()); + $this->assertSame($error['file'], $exception->getFile()); + $this->assertSame($error['line'], $exception->getLine()); + } + + public function provideUndefinedMethodData() + { + return array( + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Call to undefined method SplObjectStorage::what()', + ), + 'Attempted to call an undefined method named "what" of class "SplObjectStorage".', + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Call to undefined method SplObjectStorage::walid()', + ), + "Attempted to call an undefined method named \"walid\" of class \"SplObjectStorage\".\nDid you mean to call \"valid\"?", + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Call to undefined method SplObjectStorage::offsetFet()', + ), + "Attempted to call an undefined method named \"offsetFet\" of class \"SplObjectStorage\".\nDid you mean to call e.g. \"offsetGet\", \"offsetSet\" or \"offsetUnset\"?", + ), + array( + array( + 'type' => 1, + 'message' => 'Call to undefined method class@anonymous::test()', + 'file' => '/home/possum/work/symfony/test.php', + 'line' => 11, + ), + 'Attempted to call an undefined method named "test" of class "class@anonymous".', + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Fixtures/ClassAlias.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Fixtures/ClassAlias.php new file mode 100644 index 0000000000000000000000000000000000000000..9d6dbaa7124feba20de910abbff2abd49c833650 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Fixtures/ClassAlias.php @@ -0,0 +1,3 @@ +exception = $e; + } + + public function __toString() + { + try { + throw $this->exception; + } catch (\Exception $e) { + // Using user_error() here is on purpose so we do not forget + // that this alias also should work alongside with trigger_error(). + return user_error($e, E_USER_ERROR); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Fixtures/casemismatch.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Fixtures/casemismatch.php new file mode 100644 index 0000000000000000000000000000000000000000..691d660fd1d5b8d7e367b73eb1243c5d05a4a48a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Fixtures/casemismatch.php @@ -0,0 +1,7 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug; + +function headers_sent() +{ + return false; +} + +function header($str, $replace = true, $status = null) +{ + Tests\testHeader($str, $replace, $status); +} + +namespace Symfony\Component\Debug\Tests; + +function testHeader() +{ + static $headers = array(); + + if (!$h = func_get_args()) { + $h = $headers; + $headers = array(); + + return $h; + } + + $headers[] = func_get_args(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/MockExceptionHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/MockExceptionHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..2d6ce564d23a4270603053716b781622bb8a008a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/MockExceptionHandler.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Tests; + +use Symfony\Component\Debug\ExceptionHandler; + +class MockExceptionHandler extends ExceptionHandler +{ + public $e; + + public function handle(\Exception $e) + { + $this->e = $e; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Debug/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..5c40bea329f11193281b109938533dc2b6c7f8a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/composer.json @@ -0,0 +1,41 @@ +{ + "name": "symfony/debug", + "type": "library", + "description": "Symfony Debug Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Debug\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Debug/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Debug/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..e99c4ddf4460330bf0fbd3145d79a943b8fcd6db --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Debug/phpunit.xml.dist @@ -0,0 +1,31 @@ + + + + + + + + + + ./Tests/ + + + ./Resources/ext/tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Alias.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Alias.php new file mode 100644 index 0000000000000000000000000000000000000000..eaf7f00ccd446d4ec4cf5f5979a1b224f9a72d9b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Alias.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\Component\DependencyInjection; + +class Alias +{ + private $id; + private $public; + + /** + * @param string $id Alias identifier + * @param bool $public If this alias is public + */ + public function __construct($id, $public = true) + { + $this->id = strtolower($id); + $this->public = $public; + } + + /** + * Checks if this DI Alias should be public or not. + * + * @return bool + */ + public function isPublic() + { + return $this->public; + } + + /** + * Sets if this Alias is public. + * + * @param bool $boolean If this Alias should be public + */ + public function setPublic($boolean) + { + $this->public = (bool) $boolean; + } + + /** + * Returns the Id of this alias. + * + * @return string The alias id + */ + public function __toString() + { + return $this->id; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..43f445736f55ceff59b100fecb7d2643732b995f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/CHANGELOG.md @@ -0,0 +1,71 @@ +CHANGELOG +========= + +3.2.0 +----- + + * allowed to prioritize compiler passes by introducing a third argument to `PassConfig::addPass()`, to `Compiler::addPass` and to `ContainerBuilder::addCompilerPass()` + * added support for PHP constants in YAML configuration files + * deprecated the ability to set or unset a private service with the `Container::set()` method + * deprecated the ability to check for the existence of a private service with the `Container::has()` method + * deprecated the ability to request a private service with the `Container::get()` method + +3.0.0 +----- + + * removed all deprecated codes from 2.x versions + +2.8.0 +----- + + * deprecated the abstract ContainerAware class in favor of ContainerAwareTrait + * deprecated IntrospectableContainerInterface, to be merged with ContainerInterface in 3.0 + * allowed specifying a directory to recursively load all configuration files it contains + * deprecated the concept of scopes + * added `Definition::setShared()` and `Definition::isShared()` + * added ResettableContainerInterface to be able to reset the container to release memory on shutdown + * added a way to define the priority of service decoration + * added support for service autowiring + +2.7.0 +----- + + * deprecated synchronized services + +2.6.0 +----- + + * added new factory syntax and deprecated the old one + +2.5.0 +----- + +* added DecoratorServicePass and a way to override a service definition (Definition::setDecoratedService()) +* deprecated SimpleXMLElement class. + +2.4.0 +----- + + * added support for expressions in service definitions + * added ContainerAwareTrait to add default container aware behavior to a class + +2.2.0 +----- + + * added Extension::isConfigEnabled() to ease working with enableable configurations + * added an Extension base class with sensible defaults to be used in conjunction + with the Config component. + * added PrependExtensionInterface (to be able to allow extensions to prepend + application configuration settings for any Bundle) + +2.1.0 +----- + + * added IntrospectableContainerInterface (to be able to check if a service + has been initialized or not) + * added ConfigurationExtensionInterface + * added Definition::clearTag() + * component exceptions that inherit base SPL classes are now used exclusively + (this includes dumped containers) + * [BC BREAK] fixed unescaping of class arguments, method + ParameterBag::unescapeValue() was made public diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php new file mode 100644 index 0000000000000000000000000000000000000000..717fc378e498ed16abce7e5f69a2646b2d89824e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php @@ -0,0 +1,146 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Run this pass before passes that need to know more about the relation of + * your services. + * + * This class will populate the ServiceReferenceGraph with information. You can + * retrieve the graph in other passes from the compiler. + * + * @author Johannes M. Schmitt + */ +class AnalyzeServiceReferencesPass implements RepeatablePassInterface +{ + private $graph; + private $container; + private $currentId; + private $currentDefinition; + private $repeatedPass; + private $onlyConstructorArguments; + + /** + * @param bool $onlyConstructorArguments Sets this Service Reference pass to ignore method calls + */ + public function __construct($onlyConstructorArguments = false) + { + $this->onlyConstructorArguments = (bool) $onlyConstructorArguments; + } + + /** + * {@inheritdoc} + */ + public function setRepeatedPass(RepeatedPass $repeatedPass) + { + $this->repeatedPass = $repeatedPass; + } + + /** + * Processes a ContainerBuilder object to populate the service reference graph. + * + * @param ContainerBuilder $container + */ + public function process(ContainerBuilder $container) + { + $this->container = $container; + $this->graph = $container->getCompiler()->getServiceReferenceGraph(); + $this->graph->clear(); + + foreach ($container->getDefinitions() as $id => $definition) { + if ($definition->isSynthetic() || $definition->isAbstract()) { + continue; + } + + $this->currentId = $id; + $this->currentDefinition = $definition; + + $this->processArguments($definition->getArguments()); + if (is_array($definition->getFactory())) { + $this->processArguments($definition->getFactory()); + } + + if (!$this->onlyConstructorArguments) { + $this->processArguments($definition->getMethodCalls()); + $this->processArguments($definition->getProperties()); + if ($definition->getConfigurator()) { + $this->processArguments(array($definition->getConfigurator())); + } + } + } + + foreach ($container->getAliases() as $id => $alias) { + $this->graph->connect($id, $alias, (string) $alias, $this->getDefinition((string) $alias), null); + } + } + + /** + * Processes service definitions for arguments to find relationships for the service graph. + * + * @param array $arguments An array of Reference or Definition objects relating to service definitions + */ + private function processArguments(array $arguments) + { + foreach ($arguments as $argument) { + if (is_array($argument)) { + $this->processArguments($argument); + } elseif ($argument instanceof Reference) { + $this->graph->connect( + $this->currentId, + $this->currentDefinition, + $this->getDefinitionId((string) $argument), + $this->getDefinition((string) $argument), + $argument + ); + } elseif ($argument instanceof Definition) { + $this->processArguments($argument->getArguments()); + $this->processArguments($argument->getMethodCalls()); + $this->processArguments($argument->getProperties()); + + if (is_array($argument->getFactory())) { + $this->processArguments($argument->getFactory()); + } + } + } + } + + /** + * Returns a service definition given the full name or an alias. + * + * @param string $id A full id or alias for a service definition + * + * @return Definition|null The definition related to the supplied id + */ + private function getDefinition($id) + { + $id = $this->getDefinitionId($id); + + return null === $id ? null : $this->container->getDefinition($id); + } + + private function getDefinitionId($id) + { + while ($this->container->hasAlias($id)) { + $id = (string) $this->container->getAlias($id); + } + + if (!$this->container->hasDefinition($id)) { + return; + } + + return $id; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php new file mode 100644 index 0000000000000000000000000000000000000000..c1f05e03ec02c9dd602a89c22b4d7157d2973843 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * Sets a service to be an alias of another one, given a format pattern. + */ +class AutoAliasServicePass implements CompilerPassInterface +{ + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + foreach ($container->findTaggedServiceIds('auto_alias') as $serviceId => $tags) { + foreach ($tags as $tag) { + if (!isset($tag['format'])) { + throw new InvalidArgumentException(sprintf('Missing tag information "format" on auto_alias service "%s".', $serviceId)); + } + + $aliasId = $container->getParameterBag()->resolveValue($tag['format']); + if ($container->hasDefinition($aliasId) || $container->hasAlias($aliasId)) { + $container->setAlias($serviceId, new Alias($aliasId)); + } + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php new file mode 100644 index 0000000000000000000000000000000000000000..ef8db76b358a103e98859dd0f372b263cd0aff24 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @@ -0,0 +1,361 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Config\AutowireServiceResource; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Guesses constructor arguments of services definitions and try to instantiate services if necessary. + * + * @author Kévin Dunglas + */ +class AutowirePass implements CompilerPassInterface +{ + private $container; + private $reflectionClasses = array(); + private $definedTypes = array(); + private $types; + private $ambiguousServiceTypes = array(); + private $usedTypes = array(); + + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + $throwingAutoloader = function ($class) { throw new \ReflectionException(sprintf('Class %s does not exist', $class)); }; + spl_autoload_register($throwingAutoloader); + + try { + $this->container = $container; + foreach ($container->getDefinitions() as $id => $definition) { + if ($definition->isAutowired()) { + $this->completeDefinition($id, $definition); + } + } + + foreach ($this->usedTypes as $type => $id) { + if (isset($this->usedTypes[$type]) && isset($this->ambiguousServiceTypes[$type])) { + $classOrInterface = class_exists($type) ? 'class' : 'interface'; + $matchingServices = implode(', ', $this->ambiguousServiceTypes[$type]); + + throw new RuntimeException(sprintf('Unable to autowire argument of type "%s" for the service "%s". Multiple services exist for this %s (%s).', $type, $id, $classOrInterface, $matchingServices)); + } + } + } finally { + spl_autoload_unregister($throwingAutoloader); + + // Free memory and remove circular reference to container + $this->container = null; + $this->reflectionClasses = array(); + $this->definedTypes = array(); + $this->types = null; + $this->ambiguousServiceTypes = array(); + $this->usedTypes = array(); + } + } + + /** + * Creates a resource to help know if this service has changed. + * + * @param \ReflectionClass $reflectionClass + * + * @return AutowireServiceResource + */ + public static function createResourceForClass(\ReflectionClass $reflectionClass) + { + $metadata = array(); + + if ($constructor = $reflectionClass->getConstructor()) { + $metadata['__construct'] = self::getResourceMetadataForMethod($constructor); + } + + foreach (self::getSetters($reflectionClass) as $reflectionMethod) { + $metadata[$reflectionMethod->name] = self::getResourceMetadataForMethod($reflectionMethod); + } + + return new AutowireServiceResource($reflectionClass->name, $reflectionClass->getFileName(), $metadata); + } + + /** + * Wires the given definition. + * + * @param string $id + * @param Definition $definition + * + * @throws RuntimeException + */ + private function completeDefinition($id, Definition $definition) + { + if (!$reflectionClass = $this->getReflectionClass($id, $definition)) { + return; + } + + if ($this->container->isTrackingResources()) { + $this->container->addResource(static::createResourceForClass($reflectionClass)); + } + + if (!$constructor = $reflectionClass->getConstructor()) { + return; + } + + $arguments = $definition->getArguments(); + foreach ($constructor->getParameters() as $index => $parameter) { + if (array_key_exists($index, $arguments) && '' !== $arguments[$index]) { + continue; + } + + try { + if (!$typeHint = $parameter->getClass()) { + // no default value? Then fail + if (!$parameter->isOptional()) { + throw new RuntimeException(sprintf('Unable to autowire argument index %d ($%s) for the service "%s". If this is an object, give it a type-hint. Otherwise, specify this argument\'s value explicitly.', $index, $parameter->name, $id)); + } + + if (!array_key_exists($index, $arguments)) { + // specifically pass the default value + $arguments[$index] = $parameter->getDefaultValue(); + } + + continue; + } + + if (null === $this->types) { + $this->populateAvailableTypes(); + } + + if (isset($this->types[$typeHint->name])) { + $value = new Reference($this->types[$typeHint->name]); + $this->usedTypes[$typeHint->name] = $id; + } else { + try { + $value = $this->createAutowiredDefinition($typeHint, $id); + $this->usedTypes[$typeHint->name] = $id; + } catch (RuntimeException $e) { + if ($parameter->allowsNull()) { + $value = null; + } elseif ($parameter->isDefaultValueAvailable()) { + $value = $parameter->getDefaultValue(); + } else { + throw $e; + } + } + } + } catch (\ReflectionException $e) { + // Typehint against a non-existing class + + if (!$parameter->isDefaultValueAvailable()) { + throw new RuntimeException(sprintf('Cannot autowire argument %s for %s because the type-hinted class does not exist (%s).', $index + 1, $definition->getClass(), $e->getMessage()), 0, $e); + } + + $value = $parameter->getDefaultValue(); + } + + $arguments[$index] = $value; + } + + // it's possible index 1 was set, then index 0, then 2, etc + // make sure that we re-order so they're injected as expected + ksort($arguments); + $definition->setArguments($arguments); + } + + /** + * Populates the list of available types. + */ + private function populateAvailableTypes() + { + $this->types = array(); + + foreach ($this->container->getDefinitions() as $id => $definition) { + $this->populateAvailableType($id, $definition); + } + } + + /** + * Populates the list of available types for a given definition. + * + * @param string $id + * @param Definition $definition + */ + private function populateAvailableType($id, Definition $definition) + { + // Never use abstract services + if ($definition->isAbstract()) { + return; + } + + foreach ($definition->getAutowiringTypes() as $type) { + $this->definedTypes[$type] = true; + $this->types[$type] = $id; + unset($this->ambiguousServiceTypes[$type]); + } + + if (!$reflectionClass = $this->getReflectionClass($id, $definition)) { + return; + } + + foreach ($reflectionClass->getInterfaces() as $reflectionInterface) { + $this->set($reflectionInterface->name, $id); + } + + do { + $this->set($reflectionClass->name, $id); + } while ($reflectionClass = $reflectionClass->getParentClass()); + } + + /** + * Associates a type and a service id if applicable. + * + * @param string $type + * @param string $id + */ + private function set($type, $id) + { + if (isset($this->definedTypes[$type])) { + return; + } + + // is this already a type/class that is known to match multiple services? + if (isset($this->ambiguousServiceTypes[$type])) { + $this->ambiguousServiceTypes[$type][] = $id; + + return; + } + + // check to make sure the type doesn't match multiple services + if (!isset($this->types[$type]) || $this->types[$type] === $id) { + $this->types[$type] = $id; + + return; + } + + // keep an array of all services matching this type + if (!isset($this->ambiguousServiceTypes[$type])) { + $this->ambiguousServiceTypes[$type] = array($this->types[$type]); + unset($this->types[$type]); + } + $this->ambiguousServiceTypes[$type][] = $id; + } + + /** + * Registers a definition for the type if possible or throws an exception. + * + * @param \ReflectionClass $typeHint + * @param string $id + * + * @return Reference A reference to the registered definition + * + * @throws RuntimeException + */ + private function createAutowiredDefinition(\ReflectionClass $typeHint, $id) + { + if (isset($this->ambiguousServiceTypes[$typeHint->name])) { + $classOrInterface = $typeHint->isInterface() ? 'interface' : 'class'; + $matchingServices = implode(', ', $this->ambiguousServiceTypes[$typeHint->name]); + + throw new RuntimeException(sprintf('Unable to autowire argument of type "%s" for the service "%s". Multiple services exist for this %s (%s).', $typeHint->name, $id, $classOrInterface, $matchingServices)); + } + + if (!$typeHint->isInstantiable()) { + $classOrInterface = $typeHint->isInterface() ? 'interface' : 'class'; + throw new RuntimeException(sprintf('Unable to autowire argument of type "%s" for the service "%s". No services were found matching this %s and it cannot be auto-registered.', $typeHint->name, $id, $classOrInterface)); + } + + $argumentId = sprintf('autowired.%s', $typeHint->name); + + $argumentDefinition = $this->container->register($argumentId, $typeHint->name); + $argumentDefinition->setPublic(false); + + $this->populateAvailableType($argumentId, $argumentDefinition); + + try { + $this->completeDefinition($argumentId, $argumentDefinition); + } catch (RuntimeException $e) { + $classOrInterface = $typeHint->isInterface() ? 'interface' : 'class'; + $message = sprintf('Unable to autowire argument of type "%s" for the service "%s". No services were found matching this %s and it cannot be auto-registered.', $typeHint->name, $id, $classOrInterface); + throw new RuntimeException($message, 0, $e); + } + + return new Reference($argumentId); + } + + /** + * Retrieves the reflection class associated with the given service. + * + * @param string $id + * @param Definition $definition + * + * @return \ReflectionClass|false + */ + private function getReflectionClass($id, Definition $definition) + { + if (isset($this->reflectionClasses[$id])) { + return $this->reflectionClasses[$id]; + } + + // Cannot use reflection if the class isn't set + if (!$class = $definition->getClass()) { + return false; + } + + $class = $this->container->getParameterBag()->resolveValue($class); + + try { + $reflector = new \ReflectionClass($class); + } catch (\ReflectionException $e) { + $reflector = false; + } + + return $this->reflectionClasses[$id] = $reflector; + } + + /** + * @param \ReflectionClass $reflectionClass + * + * @return \ReflectionMethod[] + */ + private static function getSetters(\ReflectionClass $reflectionClass) + { + foreach ($reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflectionMethod) { + if (!$reflectionMethod->isStatic() && 1 === $reflectionMethod->getNumberOfParameters() && 0 === strpos($reflectionMethod->name, 'set')) { + yield $reflectionMethod; + } + } + } + + private static function getResourceMetadataForMethod(\ReflectionMethod $method) + { + $methodArgumentsMetadata = array(); + foreach ($method->getParameters() as $parameter) { + try { + $class = $parameter->getClass(); + } catch (\ReflectionException $e) { + // type-hint is against a non-existent class + $class = false; + } + + $isVariadic = method_exists($parameter, 'isVariadic') && $parameter->isVariadic(); + $methodArgumentsMetadata[] = array( + 'class' => $class, + 'isOptional' => $parameter->isOptional(), + 'defaultValue' => ($parameter->isOptional() && !$isVariadic) ? $parameter->getDefaultValue() : null, + ); + } + + return $methodArgumentsMetadata; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php new file mode 100644 index 0000000000000000000000000000000000000000..f39a89af2be710018cf6d31c5633424934fd6fca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Checks your services for circular references. + * + * References from method calls are ignored since we might be able to resolve + * these references depending on the order in which services are called. + * + * Circular reference from method calls will only be detected at run-time. + * + * @author Johannes M. Schmitt + */ +class CheckCircularReferencesPass implements CompilerPassInterface +{ + private $currentPath; + private $checkedNodes; + + /** + * Checks the ContainerBuilder object for circular references. + * + * @param ContainerBuilder $container The ContainerBuilder instances + */ + public function process(ContainerBuilder $container) + { + $graph = $container->getCompiler()->getServiceReferenceGraph(); + + $this->checkedNodes = array(); + foreach ($graph->getNodes() as $id => $node) { + $this->currentPath = array($id); + + $this->checkOutEdges($node->getOutEdges()); + } + } + + /** + * Checks for circular references. + * + * @param ServiceReferenceGraphEdge[] $edges An array of Edges + * + * @throws ServiceCircularReferenceException When a circular reference is found. + */ + private function checkOutEdges(array $edges) + { + foreach ($edges as $edge) { + $node = $edge->getDestNode(); + $id = $node->getId(); + + if (empty($this->checkedNodes[$id])) { + // don't check circular dependencies for lazy services + if (!$node->getValue() || !$node->getValue()->isLazy()) { + $searchKey = array_search($id, $this->currentPath); + $this->currentPath[] = $id; + + if (false !== $searchKey) { + throw new ServiceCircularReferenceException($id, array_slice($this->currentPath, $searchKey)); + } + + $this->checkOutEdges($node->getOutEdges()); + } + + $this->checkedNodes[$id] = true; + array_pop($this->currentPath); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php new file mode 100644 index 0000000000000000000000000000000000000000..0d21ef284425204fc7ed4a96877015bb2d5db97d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.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\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; + +/** + * This pass validates each definition individually only taking the information + * into account which is contained in the definition itself. + * + * Later passes can rely on the following, and specifically do not need to + * perform these checks themselves: + * + * - non synthetic, non abstract services always have a class set + * - synthetic services are always public + * + * @author Johannes M. Schmitt + */ +class CheckDefinitionValidityPass implements CompilerPassInterface +{ + /** + * Processes the ContainerBuilder to validate the Definition. + * + * @param ContainerBuilder $container + * + * @throws RuntimeException When the Definition is invalid + */ + public function process(ContainerBuilder $container) + { + foreach ($container->getDefinitions() as $id => $definition) { + // synthetic service is public + if ($definition->isSynthetic() && !$definition->isPublic()) { + throw new RuntimeException(sprintf('A synthetic service ("%s") must be public.', $id)); + } + + // non-synthetic, non-abstract service has class + if (!$definition->isAbstract() && !$definition->isSynthetic() && !$definition->getClass()) { + if ($definition->getFactory()) { + throw new RuntimeException(sprintf('Please add the class to service "%s" even if it is constructed by a factory since we might need to add method calls based on compile-time checks.', $id)); + } + + throw new RuntimeException(sprintf( + 'The definition for "%s" has no class. If you intend to inject ' + .'this service dynamically at runtime, please mark it as synthetic=true. ' + .'If this is an abstract definition solely used by child definitions, ' + .'please add abstract=true, otherwise specify a class to get rid of this error.', + $id + )); + } + + // tag attribute values must be scalars + foreach ($definition->getTags() as $name => $tags) { + foreach ($tags as $attributes) { + foreach ($attributes as $attribute => $value) { + if (!is_scalar($value) && null !== $value) { + throw new RuntimeException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $id, $name, $attribute)); + } + } + } + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php new file mode 100644 index 0000000000000000000000000000000000000000..304f7849516c88d845488cc807b6cd5b8d2833df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.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\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Checks that all references are pointing to a valid service. + * + * @author Johannes M. Schmitt + */ +class CheckExceptionOnInvalidReferenceBehaviorPass implements CompilerPassInterface +{ + private $container; + private $sourceId; + + public function process(ContainerBuilder $container) + { + $this->container = $container; + + foreach ($container->getDefinitions() as $id => $definition) { + $this->sourceId = $id; + $this->processDefinition($definition); + } + } + + private function processDefinition(Definition $definition) + { + $this->processReferences($definition->getArguments()); + $this->processReferences($definition->getMethodCalls()); + $this->processReferences($definition->getProperties()); + } + + private function processReferences(array $arguments) + { + foreach ($arguments as $argument) { + if (is_array($argument)) { + $this->processReferences($argument); + } elseif ($argument instanceof Definition) { + $this->processDefinition($argument); + } elseif ($argument instanceof Reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE === $argument->getInvalidBehavior()) { + $destId = (string) $argument; + + if (!$this->container->has($destId)) { + throw new ServiceNotFoundException($destId, $this->sourceId); + } + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php new file mode 100644 index 0000000000000000000000000000000000000000..80b81d695d66a9a73cffa4c828e4eae3af4eb38b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.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\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; + +/** + * Checks the validity of references. + * + * The following checks are performed by this pass: + * - target definitions are not abstract + * + * @author Johannes M. Schmitt + */ +class CheckReferenceValidityPass implements CompilerPassInterface +{ + private $container; + private $currentId; + + /** + * Processes the ContainerBuilder to validate References. + * + * @param ContainerBuilder $container + */ + public function process(ContainerBuilder $container) + { + $this->container = $container; + + foreach ($container->getDefinitions() as $id => $definition) { + if ($definition->isSynthetic() || $definition->isAbstract()) { + continue; + } + + $this->currentId = $id; + + $this->validateReferences($definition->getArguments()); + $this->validateReferences($definition->getMethodCalls()); + $this->validateReferences($definition->getProperties()); + } + } + + /** + * Validates an array of References. + * + * @param array $arguments An array of Reference objects + * + * @throws RuntimeException when there is a reference to an abstract definition. + */ + private function validateReferences(array $arguments) + { + foreach ($arguments as $argument) { + if (is_array($argument)) { + $this->validateReferences($argument); + } elseif ($argument instanceof Reference) { + $targetDefinition = $this->getDefinition((string) $argument); + + if (null !== $targetDefinition && $targetDefinition->isAbstract()) { + throw new RuntimeException(sprintf( + 'The definition "%s" has a reference to an abstract definition "%s". ' + .'Abstract definitions cannot be the target of references.', + $this->currentId, + $argument + )); + } + } + } + } + + /** + * Returns the Definition given an id. + * + * @param string $id Definition identifier + * + * @return Definition + */ + private function getDefinition($id) + { + if (!$this->container->hasDefinition($id)) { + return; + } + + return $this->container->getDefinition($id); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php new file mode 100644 index 0000000000000000000000000000000000000000..cd49e7b82e17990b3544e90ed79ac00afe45ea52 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\EnvParameterException; + +/** + * This class is used to remove circular dependencies between individual passes. + * + * @author Johannes M. Schmitt + */ +class Compiler +{ + private $passConfig; + private $log = array(); + private $loggingFormatter; + private $serviceReferenceGraph; + + public function __construct() + { + $this->passConfig = new PassConfig(); + $this->serviceReferenceGraph = new ServiceReferenceGraph(); + $this->loggingFormatter = new LoggingFormatter(); + } + + /** + * Returns the PassConfig. + * + * @return PassConfig The PassConfig instance + */ + public function getPassConfig() + { + return $this->passConfig; + } + + /** + * Returns the ServiceReferenceGraph. + * + * @return ServiceReferenceGraph The ServiceReferenceGraph instance + */ + public function getServiceReferenceGraph() + { + return $this->serviceReferenceGraph; + } + + /** + * Returns the logging formatter which can be used by compilation passes. + * + * @return LoggingFormatter + */ + public function getLoggingFormatter() + { + return $this->loggingFormatter; + } + + /** + * Adds a pass to the PassConfig. + * + * @param CompilerPassInterface $pass A compiler pass + * @param string $type The type of the pass + * @param int $priority Used to sort the passes + */ + public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, $priority = 0*/) + { + if (func_num_args() >= 3) { + $priority = func_get_arg(2); + } else { + if (__CLASS__ !== get_class($this)) { + $r = new \ReflectionMethod($this, __FUNCTION__); + if (__CLASS__ !== $r->getDeclaringClass()->getName()) { + @trigger_error(sprintf('Method %s() will have a third `$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.', __METHOD__), E_USER_DEPRECATED); + } + } + + $priority = 0; + } + + $this->passConfig->addPass($pass, $type, $priority); + } + + /** + * Adds a log message. + * + * @param string $string The log message + */ + public function addLogMessage($string) + { + $this->log[] = $string; + } + + /** + * Returns the log. + * + * @return array Log array + */ + public function getLog() + { + return $this->log; + } + + /** + * Run the Compiler and process all Passes. + * + * @param ContainerBuilder $container + */ + public function compile(ContainerBuilder $container) + { + try { + foreach ($this->passConfig->getPasses() as $pass) { + $pass->process($container); + } + } catch (\Exception $e) { + $usedEnvs = array(); + $prev = $e; + + do { + $msg = $prev->getMessage(); + + if ($msg !== $resolvedMsg = $container->resolveEnvPlaceholders($msg, null, $usedEnvs)) { + $r = new \ReflectionProperty($prev, 'message'); + $r->setAccessible(true); + $r->setValue($prev, $resolvedMsg); + } + } while ($prev = $prev->getPrevious()); + + if ($usedEnvs) { + $e = new EnvParameterException($usedEnvs, $e); + } + + throw $e; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..30cb1d5d466f3c4d66eaccdd6985d0896bf082e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.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\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Interface that must be implemented by compilation passes. + * + * @author Johannes M. Schmitt + */ +interface CompilerPassInterface +{ + /** + * You can modify the container here before it is dumped to PHP code. + * + * @param ContainerBuilder $container + */ + public function process(ContainerBuilder $container); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php new file mode 100644 index 0000000000000000000000000000000000000000..8edb717b4cc40b7559cc1cc00446af3dec6185ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Alias; + +/** + * Overwrites a service but keeps the overridden one. + * + * @author Christophe Coevoet + * @author Fabien Potencier + * @author Diego Saint Esteben + */ +class DecoratorServicePass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container) + { + $definitions = new \SplPriorityQueue(); + $order = PHP_INT_MAX; + + foreach ($container->getDefinitions() as $id => $definition) { + if (!$decorated = $definition->getDecoratedService()) { + continue; + } + $definitions->insert(array($id, $definition), array($decorated[2], --$order)); + } + + foreach ($definitions as list($id, $definition)) { + list($inner, $renamedId) = $definition->getDecoratedService(); + + $definition->setDecoratedService(null); + + if (!$renamedId) { + $renamedId = $id.'.inner'; + } + + // we create a new alias/service for the service we are replacing + // to be able to reference it in the new one + if ($container->hasAlias($inner)) { + $alias = $container->getAlias($inner); + $public = $alias->isPublic(); + $container->setAlias($renamedId, new Alias((string) $alias, false)); + } else { + $decoratedDefinition = $container->getDefinition($inner); + $definition->setTags(array_merge($decoratedDefinition->getTags(), $definition->getTags())); + $definition->setAutowiringTypes(array_merge($decoratedDefinition->getAutowiringTypes(), $definition->getAutowiringTypes())); + $public = $decoratedDefinition->isPublic(); + $decoratedDefinition->setPublic(false); + $decoratedDefinition->setTags(array()); + $decoratedDefinition->setAutowiringTypes(array()); + $container->setDefinition($renamedId, $decoratedDefinition); + } + + $container->setAlias($inner, new Alias($id, $public)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php new file mode 100644 index 0000000000000000000000000000000000000000..27e5048245914e8f29f509f1629526231a91e77b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * A pass to automatically process extensions if they implement + * CompilerPassInterface. + * + * @author Wouter J + */ +class ExtensionCompilerPass implements CompilerPassInterface +{ + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + foreach ($container->getExtensions() as $extension) { + if (!$extension instanceof CompilerPassInterface) { + continue; + } + + $extension->process($container); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/FactoryReturnTypePass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/FactoryReturnTypePass.php new file mode 100644 index 0000000000000000000000000000000000000000..e4e64db41bb9eb2ec7ab335536b446db9a5f505d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/FactoryReturnTypePass.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +/** + * @author Guilhem N. + */ +class FactoryReturnTypePass implements CompilerPassInterface +{ + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + // works only since php 7.0 and hhvm 3.11 + if (!method_exists(\ReflectionMethod::class, 'getReturnType')) { + return; + } + + foreach ($container->getDefinitions() as $id => $definition) { + $this->updateDefinition($container, $id, $definition); + } + } + + private function updateDefinition(ContainerBuilder $container, $id, Definition $definition, array $previous = array()) + { + // circular reference + if (isset($previous[$id])) { + return; + } + + $factory = $definition->getFactory(); + if (null === $factory || null !== $definition->getClass()) { + return; + } + + $class = null; + if (is_string($factory)) { + try { + $m = new \ReflectionFunction($factory); + } catch (\ReflectionException $e) { + return; + } + } else { + if ($factory[0] instanceof Reference) { + $previous[$id] = true; + $factoryDefinition = $container->findDefinition((string) $factory[0]); + $this->updateDefinition($container, strtolower($factory[0]), $factoryDefinition, $previous); + $class = $factoryDefinition->getClass(); + } else { + $class = $factory[0]; + } + + try { + $m = new \ReflectionMethod($class, $factory[1]); + } catch (\ReflectionException $e) { + return; + } + } + + $returnType = $m->getReturnType(); + if (null !== $returnType && !$returnType->isBuiltin()) { + $returnType = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : $returnType->__toString(); + if (null !== $class) { + $declaringClass = $m->getDeclaringClass()->getName(); + if ('self' === strtolower($returnType)) { + $returnType = $declaringClass; + } elseif ('parent' === strtolower($returnType)) { + $returnType = get_parent_class($declaringClass) ?: null; + } + } + + $definition->setClass($returnType); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php new file mode 100644 index 0000000000000000000000000000000000000000..a4e2e041b24feb3a39dc4e5a78409750344ec5a8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.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\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Inline service definitions where this is possible. + * + * @author Johannes M. Schmitt + */ +class InlineServiceDefinitionsPass implements RepeatablePassInterface +{ + private $repeatedPass; + private $graph; + private $compiler; + private $formatter; + private $currentId; + + /** + * {@inheritdoc} + */ + public function setRepeatedPass(RepeatedPass $repeatedPass) + { + $this->repeatedPass = $repeatedPass; + } + + /** + * Processes the ContainerBuilder for inline service definitions. + * + * @param ContainerBuilder $container + */ + public function process(ContainerBuilder $container) + { + $this->compiler = $container->getCompiler(); + $this->formatter = $this->compiler->getLoggingFormatter(); + $this->graph = $this->compiler->getServiceReferenceGraph(); + + $container->setDefinitions($this->inlineArguments($container, $container->getDefinitions(), true)); + } + + /** + * Processes inline arguments. + * + * @param ContainerBuilder $container The ContainerBuilder + * @param array $arguments An array of arguments + * @param bool $isRoot If we are processing the root definitions or not + * + * @return array + */ + private function inlineArguments(ContainerBuilder $container, array $arguments, $isRoot = false) + { + foreach ($arguments as $k => $argument) { + if ($isRoot) { + $this->currentId = $k; + } + if (is_array($argument)) { + $arguments[$k] = $this->inlineArguments($container, $argument); + } elseif ($argument instanceof Reference) { + if (!$container->hasDefinition($id = (string) $argument)) { + continue; + } + + if ($this->isInlineableDefinition($id, $definition = $container->getDefinition($id))) { + $this->compiler->addLogMessage($this->formatter->formatInlineService($this, $id, $this->currentId)); + + if ($definition->isShared()) { + $arguments[$k] = $definition; + } else { + $arguments[$k] = clone $definition; + } + } + } elseif ($argument instanceof Definition) { + $argument->setArguments($this->inlineArguments($container, $argument->getArguments())); + $argument->setMethodCalls($this->inlineArguments($container, $argument->getMethodCalls())); + $argument->setProperties($this->inlineArguments($container, $argument->getProperties())); + + $configurator = $this->inlineArguments($container, array($argument->getConfigurator())); + $argument->setConfigurator($configurator[0]); + + $factory = $this->inlineArguments($container, array($argument->getFactory())); + $argument->setFactory($factory[0]); + } + } + + return $arguments; + } + + /** + * Checks if the definition is inlineable. + * + * @param string $id + * @param Definition $definition + * + * @return bool If the definition is inlineable + */ + private function isInlineableDefinition($id, Definition $definition) + { + if (!$definition->isShared()) { + return true; + } + + if ($definition->isPublic() || $definition->isLazy()) { + return false; + } + + if (!$this->graph->hasNode($id)) { + return true; + } + + if ($this->currentId == $id) { + return false; + } + + $ids = array(); + foreach ($this->graph->getNode($id)->getInEdges() as $edge) { + $ids[] = $edge->getSourceNode()->getId(); + } + + if (count(array_unique($ids)) > 1) { + return false; + } + + if (count($ids) > 1 && is_array($factory = $definition->getFactory()) && ($factory[0] instanceof Reference || $factory[0] instanceof Definition)) { + return false; + } + + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/LoggingFormatter.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/LoggingFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..db208fa0d63c136a02b2f89649bac02b74bd0a3e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/LoggingFormatter.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\Component\DependencyInjection\Compiler; + +/** + * Used to format logging messages during the compilation. + * + * @author Johannes M. Schmitt + */ +class LoggingFormatter +{ + public function formatRemoveService(CompilerPassInterface $pass, $id, $reason) + { + return $this->format($pass, sprintf('Removed service "%s"; reason: %s.', $id, $reason)); + } + + public function formatInlineService(CompilerPassInterface $pass, $id, $target) + { + return $this->format($pass, sprintf('Inlined service "%s" to "%s".', $id, $target)); + } + + public function formatUpdateReference(CompilerPassInterface $pass, $serviceId, $oldDestId, $newDestId) + { + return $this->format($pass, sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $serviceId, $oldDestId, $newDestId)); + } + + public function formatResolveInheritance(CompilerPassInterface $pass, $childId, $parentId) + { + return $this->format($pass, sprintf('Resolving inheritance for "%s" (parent: %s).', $childId, $parentId)); + } + + public function format(CompilerPassInterface $pass, $message) + { + return sprintf('%s: %s', get_class($pass), $message); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php new file mode 100644 index 0000000000000000000000000000000000000000..9434ac70b543bef7b360ef8a71b610e8dd0338ac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; +use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; + +/** + * Merges extension configs into the container builder. + * + * @author Fabien Potencier + */ +class MergeExtensionConfigurationPass implements CompilerPassInterface +{ + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + $parameters = $container->getParameterBag()->all(); + $definitions = $container->getDefinitions(); + $aliases = $container->getAliases(); + $exprLangProviders = $container->getExpressionLanguageProviders(); + + foreach ($container->getExtensions() as $extension) { + if ($extension instanceof PrependExtensionInterface) { + $extension->prepend($container); + } + } + + foreach ($container->getExtensions() as $name => $extension) { + if (!$config = $container->getExtensionConfig($name)) { + // this extension was not called + continue; + } + $config = $container->getParameterBag()->resolveValue($config); + + $tmpContainer = new ContainerBuilder($container->getParameterBag()); + $tmpContainer->setResourceTracking($container->isTrackingResources()); + $tmpContainer->addObjectResource($extension); + if ($extension instanceof ConfigurationExtensionInterface && null !== $configuration = $extension->getConfiguration($config, $tmpContainer)) { + $tmpContainer->addObjectResource($configuration); + } + + foreach ($exprLangProviders as $provider) { + $tmpContainer->addExpressionLanguageProvider($provider); + } + + $extension->load($config, $tmpContainer); + + $container->merge($tmpContainer); + $container->getParameterBag()->add($parameters); + } + + $container->addDefinitions($definitions); + $container->addAliases($aliases); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..fefd5af36ce05b85274abc9695354fa191125e6e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php @@ -0,0 +1,263 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * Compiler Pass Configuration. + * + * This class has a default configuration embedded. + * + * @author Johannes M. Schmitt + */ +class PassConfig +{ + const TYPE_AFTER_REMOVING = 'afterRemoving'; + const TYPE_BEFORE_OPTIMIZATION = 'beforeOptimization'; + const TYPE_BEFORE_REMOVING = 'beforeRemoving'; + const TYPE_OPTIMIZE = 'optimization'; + const TYPE_REMOVE = 'removing'; + + private $mergePass; + private $afterRemovingPasses = array(); + private $beforeOptimizationPasses = array(); + private $beforeRemovingPasses = array(); + private $optimizationPasses; + private $removingPasses; + + public function __construct() + { + $this->mergePass = new MergeExtensionConfigurationPass(); + + $this->optimizationPasses = array(array( + new ExtensionCompilerPass(), + new ResolveDefinitionTemplatesPass(), + new DecoratorServicePass(), + new ResolveParameterPlaceHoldersPass(), + new FactoryReturnTypePass(), + new CheckDefinitionValidityPass(), + new ResolveReferencesToAliasesPass(), + new ResolveInvalidReferencesPass(), + new AutowirePass(), + new AnalyzeServiceReferencesPass(true), + new CheckCircularReferencesPass(), + new CheckReferenceValidityPass(), + )); + + $this->removingPasses = array(array( + new RemovePrivateAliasesPass(), + new ReplaceAliasByActualDefinitionPass(), + new RemoveAbstractDefinitionsPass(), + new RepeatedPass(array( + new AnalyzeServiceReferencesPass(), + new InlineServiceDefinitionsPass(), + new AnalyzeServiceReferencesPass(), + new RemoveUnusedDefinitionsPass(), + )), + new CheckExceptionOnInvalidReferenceBehaviorPass(), + )); + } + + /** + * Returns all passes in order to be processed. + * + * @return CompilerPassInterface[] + */ + public function getPasses() + { + return array_merge( + array($this->mergePass), + $this->getBeforeOptimizationPasses(), + $this->getOptimizationPasses(), + $this->getBeforeRemovingPasses(), + $this->getRemovingPasses(), + $this->getAfterRemovingPasses() + ); + } + + /** + * Adds a pass. + * + * @param CompilerPassInterface $pass A Compiler pass + * @param string $type The pass type + * @param int $priority Used to sort the passes + * + * @throws InvalidArgumentException when a pass type doesn't exist + */ + public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION/*, $priority = 0*/) + { + if (func_num_args() >= 3) { + $priority = func_get_arg(2); + } else { + if (__CLASS__ !== get_class($this)) { + $r = new \ReflectionMethod($this, __FUNCTION__); + if (__CLASS__ !== $r->getDeclaringClass()->getName()) { + @trigger_error(sprintf('Method %s() will have a third `$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.', __METHOD__), E_USER_DEPRECATED); + } + } + + $priority = 0; + } + + $property = $type.'Passes'; + if (!isset($this->$property)) { + throw new InvalidArgumentException(sprintf('Invalid type "%s".', $type)); + } + + $passes = &$this->$property; + + if (!isset($passes[$priority])) { + $passes[$priority] = array(); + } + $passes[$priority][] = $pass; + } + + /** + * Gets all passes for the AfterRemoving pass. + * + * @return CompilerPassInterface[] + */ + public function getAfterRemovingPasses() + { + return $this->sortPasses($this->afterRemovingPasses); + } + + /** + * Gets all passes for the BeforeOptimization pass. + * + * @return CompilerPassInterface[] + */ + public function getBeforeOptimizationPasses() + { + return $this->sortPasses($this->beforeOptimizationPasses); + } + + /** + * Gets all passes for the BeforeRemoving pass. + * + * @return CompilerPassInterface[] + */ + public function getBeforeRemovingPasses() + { + return $this->sortPasses($this->beforeRemovingPasses); + } + + /** + * Gets all passes for the Optimization pass. + * + * @return CompilerPassInterface[] + */ + public function getOptimizationPasses() + { + return $this->sortPasses($this->optimizationPasses); + } + + /** + * Gets all passes for the Removing pass. + * + * @return CompilerPassInterface[] + */ + public function getRemovingPasses() + { + return $this->sortPasses($this->removingPasses); + } + + /** + * Gets the Merge pass. + * + * @return CompilerPassInterface + */ + public function getMergePass() + { + return $this->mergePass; + } + + /** + * Sets the Merge Pass. + * + * @param CompilerPassInterface $pass The merge pass + */ + public function setMergePass(CompilerPassInterface $pass) + { + $this->mergePass = $pass; + } + + /** + * Sets the AfterRemoving passes. + * + * @param CompilerPassInterface[] $passes + */ + public function setAfterRemovingPasses(array $passes) + { + $this->afterRemovingPasses = array($passes); + } + + /** + * Sets the BeforeOptimization passes. + * + * @param CompilerPassInterface[] $passes + */ + public function setBeforeOptimizationPasses(array $passes) + { + $this->beforeOptimizationPasses = array($passes); + } + + /** + * Sets the BeforeRemoving passes. + * + * @param CompilerPassInterface[] $passes + */ + public function setBeforeRemovingPasses(array $passes) + { + $this->beforeRemovingPasses = array($passes); + } + + /** + * Sets the Optimization passes. + * + * @param CompilerPassInterface[] $passes + */ + public function setOptimizationPasses(array $passes) + { + $this->optimizationPasses = array($passes); + } + + /** + * Sets the Removing passes. + * + * @param CompilerPassInterface[] $passes + */ + public function setRemovingPasses(array $passes) + { + $this->removingPasses = array($passes); + } + + /** + * Sort passes by priority. + * + * @param array $passes CompilerPassInterface instances with their priority as key + * + * @return CompilerPassInterface[] + */ + private function sortPasses(array $passes) + { + if (0 === count($passes)) { + return array(); + } + + krsort($passes); + + // Flatten the array + return call_user_func_array('array_merge', $passes); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..83f6014c39357365276011da4bbc34bbf64d5083 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Trait that allows a generic method to find and sort service by priority option in the tag. + * + * @author Iltar van der Berg + */ +trait PriorityTaggedServiceTrait +{ + /** + * Finds all services with the given tag name and order them by their priority. + * + * The order of additions must be respected for services having the same priority, + * and knowing that the \SplPriorityQueue class does not respect the FIFO method, + * we should not use this class. + * + * @see https://bugs.php.net/bug.php?id=53710 + * @see https://bugs.php.net/bug.php?id=60926 + * + * @param string $tagName + * @param ContainerBuilder $container + * + * @return Reference[] + */ + private function findAndSortTaggedServices($tagName, ContainerBuilder $container) + { + $services = array(); + + foreach ($container->findTaggedServiceIds($tagName) as $serviceId => $tags) { + foreach ($tags as $attributes) { + $priority = isset($attributes['priority']) ? $attributes['priority'] : 0; + $services[$priority][] = new Reference($serviceId); + } + } + + if ($services) { + krsort($services); + $services = call_user_func_array('array_merge', $services); + } + + return $services; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php new file mode 100644 index 0000000000000000000000000000000000000000..0ef0af05b578b0eb846766e067126d54b82e7b9e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Removes abstract Definitions. + */ +class RemoveAbstractDefinitionsPass implements CompilerPassInterface +{ + /** + * Removes abstract definitions from the ContainerBuilder. + * + * @param ContainerBuilder $container + */ + public function process(ContainerBuilder $container) + { + $compiler = $container->getCompiler(); + $formatter = $compiler->getLoggingFormatter(); + + foreach ($container->getDefinitions() as $id => $definition) { + if ($definition->isAbstract()) { + $container->removeDefinition($id); + $compiler->addLogMessage($formatter->formatRemoveService($this, $id, 'abstract')); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php new file mode 100644 index 0000000000000000000000000000000000000000..5c53a33949a539e6f31a75c066cf91a974c7724b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Remove private aliases from the container. They were only used to establish + * dependencies between services, and these dependencies have been resolved in + * one of the previous passes. + * + * @author Johannes M. Schmitt + */ +class RemovePrivateAliasesPass implements CompilerPassInterface +{ + /** + * Removes private aliases from the ContainerBuilder. + * + * @param ContainerBuilder $container + */ + public function process(ContainerBuilder $container) + { + $compiler = $container->getCompiler(); + $formatter = $compiler->getLoggingFormatter(); + + foreach ($container->getAliases() as $id => $alias) { + if ($alias->isPublic()) { + continue; + } + + $container->removeAlias($id); + $compiler->addLogMessage($formatter->formatRemoveService($this, $id, 'private alias')); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php new file mode 100644 index 0000000000000000000000000000000000000000..8252f73f6dba1a480986c5931692bccc4a60e53d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Removes unused service definitions from the container. + * + * @author Johannes M. Schmitt + */ +class RemoveUnusedDefinitionsPass implements RepeatablePassInterface +{ + private $repeatedPass; + + /** + * {@inheritdoc} + */ + public function setRepeatedPass(RepeatedPass $repeatedPass) + { + $this->repeatedPass = $repeatedPass; + } + + /** + * Processes the ContainerBuilder to remove unused definitions. + * + * @param ContainerBuilder $container + */ + public function process(ContainerBuilder $container) + { + $compiler = $container->getCompiler(); + $formatter = $compiler->getLoggingFormatter(); + $graph = $compiler->getServiceReferenceGraph(); + + $hasChanged = false; + foreach ($container->getDefinitions() as $id => $definition) { + if ($definition->isPublic()) { + continue; + } + + if ($graph->hasNode($id)) { + $edges = $graph->getNode($id)->getInEdges(); + $referencingAliases = array(); + $sourceIds = array(); + foreach ($edges as $edge) { + $node = $edge->getSourceNode(); + $sourceIds[] = $node->getId(); + + if ($node->isAlias()) { + $referencingAliases[] = $node->getValue(); + } + } + $isReferenced = (count(array_unique($sourceIds)) - count($referencingAliases)) > 0; + } else { + $referencingAliases = array(); + $isReferenced = false; + } + + if (1 === count($referencingAliases) && false === $isReferenced) { + $container->setDefinition((string) reset($referencingAliases), $definition); + $definition->setPublic(true); + $container->removeDefinition($id); + $compiler->addLogMessage($formatter->formatRemoveService($this, $id, 'replaces alias '.reset($referencingAliases))); + } elseif (0 === count($referencingAliases) && false === $isReferenced) { + $container->removeDefinition($id); + $container->resolveEnvPlaceholders(serialize($definition)); + $compiler->addLogMessage($formatter->formatRemoveService($this, $id, 'unused')); + $hasChanged = true; + } + } + + if ($hasChanged) { + $this->repeatedPass->setRepeat(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d60ae35bc8f0b2b69b95b96fa201678a95a2e9bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +/** + * Interface that must be implemented by passes that are run as part of an + * RepeatedPass. + * + * @author Johannes M. Schmitt + */ +interface RepeatablePassInterface extends CompilerPassInterface +{ + /** + * Sets the RepeatedPass interface. + * + * @param RepeatedPass $repeatedPass + */ + public function setRepeatedPass(RepeatedPass $repeatedPass); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php new file mode 100644 index 0000000000000000000000000000000000000000..59d4e0a767a5a643b82136fbb0789684522d501c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * A pass that might be run repeatedly. + * + * @author Johannes M. Schmitt + */ +class RepeatedPass implements CompilerPassInterface +{ + /** + * @var bool + */ + private $repeat = false; + + /** + * @var RepeatablePassInterface[] + */ + private $passes; + + /** + * @param RepeatablePassInterface[] $passes An array of RepeatablePassInterface objects + * + * @throws InvalidArgumentException when the passes don't implement RepeatablePassInterface + */ + public function __construct(array $passes) + { + foreach ($passes as $pass) { + if (!$pass instanceof RepeatablePassInterface) { + throw new InvalidArgumentException('$passes must be an array of RepeatablePassInterface.'); + } + + $pass->setRepeatedPass($this); + } + + $this->passes = $passes; + } + + /** + * Process the repeatable passes that run more than once. + * + * @param ContainerBuilder $container + */ + public function process(ContainerBuilder $container) + { + do { + $this->repeat = false; + foreach ($this->passes as $pass) { + $pass->process($container); + } + } while ($this->repeat); + } + + /** + * Sets if the pass should repeat. + */ + public function setRepeat() + { + $this->repeat = true; + } + + /** + * Returns the passes. + * + * @return RepeatablePassInterface[] An array of RepeatablePassInterface objects + */ + public function getPasses() + { + return $this->passes; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php new file mode 100644 index 0000000000000000000000000000000000000000..85c1cf5474c2e7003c69c6422af39a67c92671e4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Replaces aliases with actual service definitions, effectively removing these + * aliases. + * + * @author Johannes M. Schmitt + */ +class ReplaceAliasByActualDefinitionPass implements CompilerPassInterface +{ + private $compiler; + private $formatter; + + /** + * Process the Container to replace aliases with service definitions. + * + * @param ContainerBuilder $container + * + * @throws InvalidArgumentException if the service definition does not exist + */ + public function process(ContainerBuilder $container) + { + // Setup + $this->compiler = $container->getCompiler(); + $this->formatter = $this->compiler->getLoggingFormatter(); + // First collect all alias targets that need to be replaced + $seenAliasTargets = array(); + $replacements = array(); + foreach ($container->getAliases() as $definitionId => $target) { + $targetId = (string) $target; + // Special case: leave this target alone + if ('service_container' === $targetId) { + continue; + } + // Check if target needs to be replaces + if (isset($replacements[$targetId])) { + $container->setAlias($definitionId, $replacements[$targetId]); + } + // No need to process the same target twice + if (isset($seenAliasTargets[$targetId])) { + continue; + } + // Process new target + $seenAliasTargets[$targetId] = true; + try { + $definition = $container->getDefinition($targetId); + } catch (InvalidArgumentException $e) { + throw new InvalidArgumentException(sprintf('Unable to replace alias "%s" with actual definition "%s".', $definitionId, $targetId), null, $e); + } + if ($definition->isPublic()) { + continue; + } + // Remove private definition and schedule for replacement + $definition->setPublic(true); + $container->setDefinition($definitionId, $definition); + $container->removeDefinition($targetId); + $replacements[$targetId] = $definitionId; + } + + // Now replace target instances in all definitions + foreach ($container->getDefinitions() as $definitionId => $definition) { + $definition->setArguments($this->updateArgumentReferences($replacements, $definitionId, $definition->getArguments())); + $definition->setMethodCalls($this->updateArgumentReferences($replacements, $definitionId, $definition->getMethodCalls())); + $definition->setProperties($this->updateArgumentReferences($replacements, $definitionId, $definition->getProperties())); + $definition->setFactory($this->updateFactoryReference($replacements, $definition->getFactory())); + } + } + + /** + * Recursively updates references in an array. + * + * @param array $replacements Table of aliases to replace + * @param string $definitionId Identifier of this definition + * @param array $arguments Where to replace the aliases + * + * @return array + */ + private function updateArgumentReferences(array $replacements, $definitionId, array $arguments) + { + foreach ($arguments as $k => $argument) { + // Handle recursion step + if (is_array($argument)) { + $arguments[$k] = $this->updateArgumentReferences($replacements, $definitionId, $argument); + continue; + } + // Skip arguments that don't need replacement + if (!$argument instanceof Reference) { + continue; + } + $referenceId = (string) $argument; + if (!isset($replacements[$referenceId])) { + continue; + } + // Perform the replacement + $newId = $replacements[$referenceId]; + $arguments[$k] = new Reference($newId, $argument->getInvalidBehavior()); + $this->compiler->addLogMessage($this->formatter->formatUpdateReference($this, $definitionId, $referenceId, $newId)); + } + + return $arguments; + } + + private function updateFactoryReference(array $replacements, $factory) + { + if (is_array($factory) && $factory[0] instanceof Reference && isset($replacements[$referenceId = (string) $factory[0]])) { + $factory[0] = new Reference($replacements[$referenceId], $factory[0]->getInvalidBehavior()); + } + + return $factory; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php new file mode 100644 index 0000000000000000000000000000000000000000..a755fd61e12d7f780f6cf8ccc9376327c36703a7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php @@ -0,0 +1,218 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\ExceptionInterface; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; + +/** + * This replaces all DefinitionDecorator instances with their equivalent fully + * merged Definition instance. + * + * @author Johannes M. Schmitt + * @author Nicolas Grekas + */ +class ResolveDefinitionTemplatesPass implements CompilerPassInterface +{ + private $compiler; + private $formatter; + private $currentId; + + /** + * Process the ContainerBuilder to replace DefinitionDecorator instances with their real Definition instances. + * + * @param ContainerBuilder $container + */ + public function process(ContainerBuilder $container) + { + $this->compiler = $container->getCompiler(); + $this->formatter = $this->compiler->getLoggingFormatter(); + + $container->setDefinitions($this->resolveArguments($container, $container->getDefinitions(), true)); + } + + /** + * Resolves definition decorator arguments. + * + * @param ContainerBuilder $container The ContainerBuilder + * @param array $arguments An array of arguments + * @param bool $isRoot If we are processing the root definitions or not + * + * @return array + */ + private function resolveArguments(ContainerBuilder $container, array $arguments, $isRoot = false) + { + foreach ($arguments as $k => $argument) { + if ($isRoot) { + // yes, we are specifically fetching the definition from the + // container to ensure we are not operating on stale data + $arguments[$k] = $argument = $container->getDefinition($k); + $this->currentId = $k; + } + if (is_array($argument)) { + $arguments[$k] = $this->resolveArguments($container, $argument); + } elseif ($argument instanceof Definition) { + if ($argument instanceof DefinitionDecorator) { + $arguments[$k] = $argument = $this->resolveDefinition($container, $argument); + if ($isRoot) { + $container->setDefinition($k, $argument); + } + } + $argument->setArguments($this->resolveArguments($container, $argument->getArguments())); + $argument->setMethodCalls($this->resolveArguments($container, $argument->getMethodCalls())); + $argument->setProperties($this->resolveArguments($container, $argument->getProperties())); + + $configurator = $this->resolveArguments($container, array($argument->getConfigurator())); + $argument->setConfigurator($configurator[0]); + + $factory = $this->resolveArguments($container, array($argument->getFactory())); + $argument->setFactory($factory[0]); + } + } + + return $arguments; + } + + /** + * Resolves the definition. + * + * @param ContainerBuilder $container The ContainerBuilder + * @param DefinitionDecorator $definition + * + * @return Definition + * + * @throws \RuntimeException When the definition is invalid + */ + private function resolveDefinition(ContainerBuilder $container, DefinitionDecorator $definition) + { + try { + return $this->doResolveDefinition($container, $definition); + } catch (ExceptionInterface $e) { + $r = new \ReflectionProperty($e, 'message'); + $r->setAccessible(true); + $r->setValue($e, sprintf('Service "%s": %s', $this->currentId, $e->getMessage())); + + throw $e; + } + } + + private function doResolveDefinition(ContainerBuilder $container, DefinitionDecorator $definition) + { + if (!$container->has($parent = $definition->getParent())) { + throw new RuntimeException(sprintf('Parent definition "%s" does not exist.', $parent)); + } + + $parentDef = $container->findDefinition($parent); + if ($parentDef instanceof DefinitionDecorator) { + $id = $this->currentId; + $this->currentId = $parent; + $parentDef = $this->resolveDefinition($container, $parentDef); + $container->setDefinition($parent, $parentDef); + $this->currentId = $id; + } + + $this->compiler->addLogMessage($this->formatter->formatResolveInheritance($this, $this->currentId, $parent)); + $def = new Definition(); + + // merge in parent definition + // purposely ignored attributes: abstract, tags + $def->setClass($parentDef->getClass()); + $def->setArguments($parentDef->getArguments()); + $def->setMethodCalls($parentDef->getMethodCalls()); + $def->setProperties($parentDef->getProperties()); + $def->setAutowiringTypes($parentDef->getAutowiringTypes()); + if ($parentDef->isDeprecated()) { + $def->setDeprecated(true, $parentDef->getDeprecationMessage('%service_id%')); + } + $def->setFactory($parentDef->getFactory()); + $def->setConfigurator($parentDef->getConfigurator()); + $def->setFile($parentDef->getFile()); + $def->setPublic($parentDef->isPublic()); + $def->setLazy($parentDef->isLazy()); + $def->setAutowired($parentDef->isAutowired()); + + // overwrite with values specified in the decorator + $changes = $definition->getChanges(); + if (isset($changes['class'])) { + $def->setClass($definition->getClass()); + } + if (isset($changes['factory'])) { + $def->setFactory($definition->getFactory()); + } + if (isset($changes['configurator'])) { + $def->setConfigurator($definition->getConfigurator()); + } + if (isset($changes['file'])) { + $def->setFile($definition->getFile()); + } + if (isset($changes['public'])) { + $def->setPublic($definition->isPublic()); + } + if (isset($changes['lazy'])) { + $def->setLazy($definition->isLazy()); + } + if (isset($changes['deprecated'])) { + $def->setDeprecated($definition->isDeprecated(), $definition->getDeprecationMessage('%service_id%')); + } + if (isset($changes['autowire'])) { + $def->setAutowired($definition->isAutowired()); + } + if (isset($changes['decorated_service'])) { + $decoratedService = $definition->getDecoratedService(); + if (null === $decoratedService) { + $def->setDecoratedService($decoratedService); + } else { + $def->setDecoratedService($decoratedService[0], $decoratedService[1], $decoratedService[2]); + } + } + + // merge arguments + foreach ($definition->getArguments() as $k => $v) { + if (is_numeric($k)) { + $def->addArgument($v); + continue; + } + + if (0 !== strpos($k, 'index_')) { + throw new RuntimeException(sprintf('Invalid argument key "%s" found.', $k)); + } + + $index = (int) substr($k, strlen('index_')); + $def->replaceArgument($index, $v); + } + + // merge properties + foreach ($definition->getProperties() as $k => $v) { + $def->setProperty($k, $v); + } + + // append method calls + if (count($calls = $definition->getMethodCalls()) > 0) { + $def->setMethodCalls(array_merge($def->getMethodCalls(), $calls)); + } + + // merge autowiring types + foreach ($definition->getAutowiringTypes() as $autowiringType) { + $def->addAutowiringType($autowiringType); + } + + // these attributes are always taken from the child + $def->setAbstract($definition->isAbstract()); + $def->setShared($definition->isShared()); + $def->setTags($definition->getTags()); + + return $def; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php new file mode 100644 index 0000000000000000000000000000000000000000..5b58fb1ecf74972931d3f974a5514b66710411c6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; + +/** + * Emulates the invalid behavior if the reference is not found within the + * container. + * + * @author Johannes M. Schmitt + */ +class ResolveInvalidReferencesPass implements CompilerPassInterface +{ + private $container; + + /** + * Process the ContainerBuilder to resolve invalid references. + * + * @param ContainerBuilder $container + */ + public function process(ContainerBuilder $container) + { + $this->container = $container; + foreach ($container->getDefinitions() as $definition) { + if ($definition->isSynthetic() || $definition->isAbstract()) { + continue; + } + + $definition->setArguments( + $this->processArguments($definition->getArguments()) + ); + + $calls = array(); + foreach ($definition->getMethodCalls() as $call) { + try { + $calls[] = array($call[0], $this->processArguments($call[1], true)); + } catch (RuntimeException $e) { + // this call is simply removed + } + } + $definition->setMethodCalls($calls); + + $properties = array(); + foreach ($definition->getProperties() as $name => $value) { + try { + $value = $this->processArguments(array($value), true); + $properties[$name] = reset($value); + } catch (RuntimeException $e) { + // ignore property + } + } + $definition->setProperties($properties); + } + } + + /** + * Processes arguments to determine invalid references. + * + * @param array $arguments An array of Reference objects + * @param bool $inMethodCall + * @param bool $inCollection + * + * @return array + * + * @throws RuntimeException When the config is invalid + */ + private function processArguments(array $arguments, $inMethodCall = false, $inCollection = false) + { + $isNumeric = array_keys($arguments) === range(0, count($arguments) - 1); + + foreach ($arguments as $k => $argument) { + if (is_array($argument)) { + $arguments[$k] = $this->processArguments($argument, $inMethodCall, true); + } elseif ($argument instanceof Reference) { + $id = (string) $argument; + + $invalidBehavior = $argument->getInvalidBehavior(); + $exists = $this->container->has($id); + + // resolve invalid behavior + if (!$exists && ContainerInterface::NULL_ON_INVALID_REFERENCE === $invalidBehavior) { + $arguments[$k] = null; + } elseif (!$exists && ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $invalidBehavior) { + if ($inCollection) { + unset($arguments[$k]); + continue; + } + if ($inMethodCall) { + throw new RuntimeException('Method shouldn\'t be called.'); + } + + $arguments[$k] = null; + } + } + } + + // Ensure numerically indexed arguments have sequential numeric keys. + if ($isNumeric) { + $arguments = array_values($arguments); + } + + return $arguments; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php new file mode 100644 index 0000000000000000000000000000000000000000..0c5963cc1180bb0ad4c80d123bf6f1e19da5ab48 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; + +/** + * Resolves all parameter placeholders "%somevalue%" to their real values. + * + * @author Johannes M. Schmitt + */ +class ResolveParameterPlaceHoldersPass implements CompilerPassInterface +{ + /** + * Processes the ContainerBuilder to resolve parameter placeholders. + * + * @param ContainerBuilder $container + * + * @throws ParameterNotFoundException + */ + public function process(ContainerBuilder $container) + { + $parameterBag = $container->getParameterBag(); + + foreach ($container->getDefinitions() as $id => $definition) { + try { + $definition->setClass($parameterBag->resolveValue($definition->getClass())); + $definition->setFile($parameterBag->resolveValue($definition->getFile())); + $definition->setArguments($parameterBag->resolveValue($definition->getArguments())); + + $factory = $definition->getFactory(); + + if (is_array($factory) && isset($factory[0])) { + $factory[0] = $parameterBag->resolveValue($factory[0]); + $definition->setFactory($factory); + } + + $calls = array(); + foreach ($definition->getMethodCalls() as $name => $arguments) { + $calls[$parameterBag->resolveValue($name)] = $parameterBag->resolveValue($arguments); + } + $definition->setMethodCalls($calls); + + $definition->setProperties($parameterBag->resolveValue($definition->getProperties())); + } catch (ParameterNotFoundException $e) { + $e->setSourceId($id); + + throw $e; + } + } + + $aliases = array(); + foreach ($container->getAliases() as $name => $target) { + $aliases[$parameterBag->resolveValue($name)] = $parameterBag->resolveValue($target); + } + $container->setAliases($aliases); + + $parameterBag->resolve(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php new file mode 100644 index 0000000000000000000000000000000000000000..8514739a77dfdadd3cbf40fe31b233a1721508fc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Replaces all references to aliases with references to the actual service. + * + * @author Johannes M. Schmitt + */ +class ResolveReferencesToAliasesPass implements CompilerPassInterface +{ + private $container; + + /** + * Processes the ContainerBuilder to replace references to aliases with actual service references. + * + * @param ContainerBuilder $container + */ + public function process(ContainerBuilder $container) + { + $this->container = $container; + + foreach ($container->getDefinitions() as $definition) { + if ($definition->isSynthetic() || $definition->isAbstract()) { + continue; + } + + $definition->setArguments($this->processArguments($definition->getArguments())); + $definition->setMethodCalls($this->processArguments($definition->getMethodCalls())); + $definition->setProperties($this->processArguments($definition->getProperties())); + $definition->setFactory($this->processFactory($definition->getFactory())); + } + + foreach ($container->getAliases() as $id => $alias) { + $aliasId = (string) $alias; + if ($aliasId !== $defId = $this->getDefinitionId($aliasId)) { + $container->setAlias($id, new Alias($defId, $alias->isPublic())); + } + } + } + + /** + * Processes the arguments to replace aliases. + * + * @param array $arguments An array of References + * + * @return array An array of References + */ + private function processArguments(array $arguments) + { + foreach ($arguments as $k => $argument) { + if (is_array($argument)) { + $arguments[$k] = $this->processArguments($argument); + } elseif ($argument instanceof Reference) { + $defId = $this->getDefinitionId($id = (string) $argument); + + if ($defId !== $id) { + $arguments[$k] = new Reference($defId, $argument->getInvalidBehavior()); + } + } + } + + return $arguments; + } + + private function processFactory($factory) + { + if (null === $factory || !is_array($factory) || !$factory[0] instanceof Reference) { + return $factory; + } + + $defId = $this->getDefinitionId($id = (string) $factory[0]); + + if ($defId !== $id) { + $factory[0] = new Reference($defId, $factory[0]->getInvalidBehavior()); + } + + return $factory; + } + + /** + * Resolves an alias into a definition id. + * + * @param string $id The definition or alias id to resolve + * + * @return string The definition id with aliases resolved + */ + private function getDefinitionId($id) + { + $seen = array(); + while ($this->container->hasAlias($id)) { + if (isset($seen[$id])) { + throw new ServiceCircularReferenceException($id, array_keys($seen)); + } + $seen[$id] = true; + $id = (string) $this->container->getAlias($id); + } + + return $id; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php new file mode 100644 index 0000000000000000000000000000000000000000..e7306ab560e2204a4a7718ecc8c38a2d3adb07bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.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\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * This is a directed graph of your services. + * + * This information can be used by your compiler passes instead of collecting + * it themselves which improves performance quite a lot. + * + * @author Johannes M. Schmitt + */ +class ServiceReferenceGraph +{ + /** + * @var ServiceReferenceGraphNode[] + */ + private $nodes = array(); + + /** + * Checks if the graph has a specific node. + * + * @param string $id Id to check + * + * @return bool + */ + public function hasNode($id) + { + return isset($this->nodes[$id]); + } + + /** + * Gets a node by identifier. + * + * @param string $id The id to retrieve + * + * @return ServiceReferenceGraphNode + * + * @throws InvalidArgumentException if no node matches the supplied identifier + */ + public function getNode($id) + { + if (!isset($this->nodes[$id])) { + throw new InvalidArgumentException(sprintf('There is no node with id "%s".', $id)); + } + + return $this->nodes[$id]; + } + + /** + * Returns all nodes. + * + * @return ServiceReferenceGraphNode[] + */ + public function getNodes() + { + return $this->nodes; + } + + /** + * Clears all nodes. + */ + public function clear() + { + $this->nodes = array(); + } + + /** + * Connects 2 nodes together in the Graph. + * + * @param string $sourceId + * @param string $sourceValue + * @param string $destId + * @param string $destValue + * @param string $reference + */ + public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null) + { + $sourceNode = $this->createNode($sourceId, $sourceValue); + $destNode = $this->createNode($destId, $destValue); + $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference); + + $sourceNode->addOutEdge($edge); + $destNode->addInEdge($edge); + } + + /** + * Creates a graph node. + * + * @param string $id + * @param string $value + * + * @return ServiceReferenceGraphNode + */ + private function createNode($id, $value) + { + if (isset($this->nodes[$id]) && $this->nodes[$id]->getValue() === $value) { + return $this->nodes[$id]; + } + + return $this->nodes[$id] = new ServiceReferenceGraphNode($id, $value); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php new file mode 100644 index 0000000000000000000000000000000000000000..e3c793c4f4eaf5c26f4d12a2d714eee4f2cf943d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +/** + * Represents an edge in your service graph. + * + * Value is typically a reference. + * + * @author Johannes M. Schmitt + */ +class ServiceReferenceGraphEdge +{ + private $sourceNode; + private $destNode; + private $value; + + /** + * @param ServiceReferenceGraphNode $sourceNode + * @param ServiceReferenceGraphNode $destNode + * @param string $value + */ + public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null) + { + $this->sourceNode = $sourceNode; + $this->destNode = $destNode; + $this->value = $value; + } + + /** + * Returns the value of the edge. + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Returns the source node. + * + * @return ServiceReferenceGraphNode + */ + public function getSourceNode() + { + return $this->sourceNode; + } + + /** + * Returns the destination node. + * + * @return ServiceReferenceGraphNode + */ + public function getDestNode() + { + return $this->destNode; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php new file mode 100644 index 0000000000000000000000000000000000000000..e5718b2b6d59a546f173ebe13efe81f32052636e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Compiler; + +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Alias; + +/** + * Represents a node in your service graph. + * + * Value is typically a definition, or an alias. + * + * @author Johannes M. Schmitt + */ +class ServiceReferenceGraphNode +{ + private $id; + private $inEdges = array(); + private $outEdges = array(); + private $value; + + /** + * @param string $id The node identifier + * @param mixed $value The node value + */ + public function __construct($id, $value) + { + $this->id = $id; + $this->value = $value; + } + + /** + * Adds an in edge to this node. + * + * @param ServiceReferenceGraphEdge $edge + */ + public function addInEdge(ServiceReferenceGraphEdge $edge) + { + $this->inEdges[] = $edge; + } + + /** + * Adds an out edge to this node. + * + * @param ServiceReferenceGraphEdge $edge + */ + public function addOutEdge(ServiceReferenceGraphEdge $edge) + { + $this->outEdges[] = $edge; + } + + /** + * Checks if the value of this node is an Alias. + * + * @return bool True if the value is an Alias instance + */ + public function isAlias() + { + return $this->value instanceof Alias; + } + + /** + * Checks if the value of this node is a Definition. + * + * @return bool True if the value is a Definition instance + */ + public function isDefinition() + { + return $this->value instanceof Definition; + } + + /** + * Returns the identifier. + * + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Returns the in edges. + * + * @return array The in ServiceReferenceGraphEdge array + */ + public function getInEdges() + { + return $this->inEdges; + } + + /** + * Returns the out edges. + * + * @return array The out ServiceReferenceGraphEdge array + */ + public function getOutEdges() + { + return $this->outEdges; + } + + /** + * Returns the value of this Node. + * + * @return mixed The value + */ + public function getValue() + { + return $this->value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Config/AutowireServiceResource.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Config/AutowireServiceResource.php new file mode 100644 index 0000000000000000000000000000000000000000..36449d8d3042a3aec5ece8b3b91a0e6f827b41b3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Config/AutowireServiceResource.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\DependencyInjection\Config; + +use Symfony\Component\Config\Resource\SelfCheckingResourceInterface; +use Symfony\Component\DependencyInjection\Compiler\AutowirePass; + +class AutowireServiceResource implements SelfCheckingResourceInterface, \Serializable +{ + private $class; + private $filePath; + private $autowiringMetadata = array(); + + public function __construct($class, $path, array $autowiringMetadata) + { + $this->class = $class; + $this->filePath = $path; + $this->autowiringMetadata = $autowiringMetadata; + } + + public function isFresh($timestamp) + { + if (!file_exists($this->filePath)) { + return false; + } + + // has the file *not* been modified? Definitely fresh + if (@filemtime($this->filePath) <= $timestamp) { + return true; + } + + try { + $reflectionClass = new \ReflectionClass($this->class); + } catch (\ReflectionException $e) { + // the class does not exist anymore! + return false; + } + + return (array) $this === (array) AutowirePass::createResourceForClass($reflectionClass); + } + + public function __toString() + { + return 'service.autowire.'.$this->class; + } + + public function serialize() + { + return serialize(array($this->class, $this->filePath, $this->autowiringMetadata)); + } + + public function unserialize($serialized) + { + list($this->class, $this->filePath, $this->autowiringMetadata) = unserialize($serialized); + } + + /** + * @deprecated Implemented for compatibility with Symfony 2.8 + */ + public function getResource() + { + return $this->filePath; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php new file mode 100644 index 0000000000000000000000000000000000000000..da84d18acffa340ea53d9b6b9eb507b4767c28f4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php @@ -0,0 +1,432 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection; + +use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; +use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; +use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; +use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; + +/** + * Container is a dependency injection container. + * + * It gives access to object instances (services). + * + * Services and parameters are simple key/pair stores. + * + * Parameter and service keys are case insensitive. + * + * A service id can contain lowercased letters, digits, underscores, and dots. + * Underscores are used to separate words, and dots to group services + * under namespaces: + * + *
      + *
    • request
    • + *
    • mysql_session_storage
    • + *
    • symfony.mysql_session_storage
    • + *
    + * + * A service can also be defined by creating a method named + * getXXXService(), where XXX is the camelized version of the id: + * + *
      + *
    • request -> getRequestService()
    • + *
    • mysql_session_storage -> getMysqlSessionStorageService()
    • + *
    • symfony.mysql_session_storage -> getSymfony_MysqlSessionStorageService()
    • + *
    + * + * The container can have three possible behaviors when a service does not exist: + * + * * EXCEPTION_ON_INVALID_REFERENCE: Throws an exception (the default) + * * NULL_ON_INVALID_REFERENCE: Returns null + * * IGNORE_ON_INVALID_REFERENCE: Ignores the wrapping command asking for the reference + * (for instance, ignore a setter if the service does not exist) + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class Container implements ResettableContainerInterface +{ + /** + * @var ParameterBagInterface + */ + protected $parameterBag; + + protected $services = array(); + protected $methodMap = array(); + protected $privates = array(); + protected $aliases = array(); + protected $loading = array(); + + private $underscoreMap = array('_' => '', '.' => '_', '\\' => '_'); + private $envCache = array(); + + /** + * @param ParameterBagInterface $parameterBag A ParameterBagInterface instance + */ + public function __construct(ParameterBagInterface $parameterBag = null) + { + $this->parameterBag = $parameterBag ?: new EnvPlaceholderParameterBag(); + } + + /** + * Compiles the container. + * + * This method does two things: + * + * * Parameter values are resolved; + * * The parameter bag is frozen. + */ + public function compile() + { + $this->parameterBag->resolve(); + + $this->parameterBag = new FrozenParameterBag($this->parameterBag->all()); + } + + /** + * Returns true if the container parameter bag are frozen. + * + * @return bool true if the container parameter bag are frozen, false otherwise + */ + public function isFrozen() + { + return $this->parameterBag instanceof FrozenParameterBag; + } + + /** + * Gets the service container parameter bag. + * + * @return ParameterBagInterface A ParameterBagInterface instance + */ + public function getParameterBag() + { + return $this->parameterBag; + } + + /** + * Gets a parameter. + * + * @param string $name The parameter name + * + * @return mixed The parameter value + * + * @throws InvalidArgumentException if the parameter is not defined + */ + public function getParameter($name) + { + return $this->parameterBag->get($name); + } + + /** + * Checks if a parameter exists. + * + * @param string $name The parameter name + * + * @return bool The presence of parameter in container + */ + public function hasParameter($name) + { + return $this->parameterBag->has($name); + } + + /** + * Sets a parameter. + * + * @param string $name The parameter name + * @param mixed $value The parameter value + */ + public function setParameter($name, $value) + { + $this->parameterBag->set($name, $value); + } + + /** + * Sets a service. + * + * Setting a service to null resets the service: has() returns false and get() + * behaves in the same way as if the service was never created. + * + * @param string $id The service identifier + * @param object $service The service instance + */ + public function set($id, $service) + { + $id = strtolower($id); + + if ('service_container' === $id) { + throw new InvalidArgumentException('You cannot set service "service_container".'); + } + + if (isset($this->aliases[$id])) { + unset($this->aliases[$id]); + } + + $this->services[$id] = $service; + + if (null === $service) { + unset($this->services[$id]); + } + + if (isset($this->privates[$id])) { + if (null === $service) { + @trigger_error(sprintf('Unsetting the "%s" private service is deprecated since Symfony 3.2 and won\'t be supported anymore in Symfony 4.0.', $id), E_USER_DEPRECATED); + unset($this->privates[$id]); + } else { + @trigger_error(sprintf('Setting the "%s" private service is deprecated since Symfony 3.2 and won\'t be supported anymore in Symfony 4.0. A new public service will be created instead.', $id), E_USER_DEPRECATED); + } + } + } + + /** + * Returns true if the given service is defined. + * + * @param string $id The service identifier + * + * @return bool true if the service is defined, false otherwise + */ + public function has($id) + { + for ($i = 2;;) { + if ('service_container' === $id + || isset($this->aliases[$id]) + || isset($this->services[$id]) + ) { + return true; + } + + if (isset($this->privates[$id])) { + @trigger_error(sprintf('Checking for the existence of the "%s" private service is deprecated since Symfony 3.2 and won\'t be supported anymore in Symfony 4.0.', $id), E_USER_DEPRECATED); + } + + if (isset($this->methodMap[$id])) { + return true; + } + + if (--$i && $id !== $lcId = strtolower($id)) { + $id = $lcId; + continue; + } + + // We only check the convention-based factory in a compiled container (i.e. a child class other than a ContainerBuilder, + // and only when the dumper has not generated the method map (otherwise the method map is considered to be fully populated by the dumper) + if (!$this->methodMap && !$this instanceof ContainerBuilder && __CLASS__ !== static::class && method_exists($this, 'get'.strtr($id, $this->underscoreMap).'Service')) { + @trigger_error('Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', E_USER_DEPRECATED); + + return true; + } + + return false; + } + } + + /** + * Gets a service. + * + * If a service is defined both through a set() method and + * with a get{$id}Service() method, the former has always precedence. + * + * @param string $id The service identifier + * @param int $invalidBehavior The behavior when the service does not exist + * + * @return object The associated service + * + * @throws ServiceCircularReferenceException When a circular reference is detected + * @throws ServiceNotFoundException When the service is not defined + * @throws \Exception if an exception has been thrown when the service has been resolved + * + * @see Reference + */ + public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) + { + // Attempt to retrieve the service by checking first aliases then + // available services. Service IDs are case insensitive, however since + // this method can be called thousands of times during a request, avoid + // calling strtolower() unless necessary. + for ($i = 2;;) { + if ('service_container' === $id) { + return $this; + } + if (isset($this->aliases[$id])) { + $id = $this->aliases[$id]; + } + // Re-use shared service instance if it exists. + if (isset($this->services[$id])) { + return $this->services[$id]; + } + + if (isset($this->loading[$id])) { + throw new ServiceCircularReferenceException($id, array_keys($this->loading)); + } + + if (isset($this->methodMap[$id])) { + $method = $this->methodMap[$id]; + } elseif (--$i && $id !== $lcId = strtolower($id)) { + $id = $lcId; + continue; + } elseif (!$this->methodMap && !$this instanceof ContainerBuilder && __CLASS__ !== static::class && method_exists($this, $method = 'get'.strtr($id, $this->underscoreMap).'Service')) { + // We only check the convention-based factory in a compiled container (i.e. a child class other than a ContainerBuilder, + // and only when the dumper has not generated the method map (otherwise the method map is considered to be fully populated by the dumper) + @trigger_error('Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', E_USER_DEPRECATED); + // $method is set to the right value, proceed + } else { + if (self::EXCEPTION_ON_INVALID_REFERENCE === $invalidBehavior) { + if (!$id) { + throw new ServiceNotFoundException($id); + } + + $alternatives = array(); + foreach ($this->getServiceIds() as $knownId) { + $lev = levenshtein($id, $knownId); + if ($lev <= strlen($id) / 3 || false !== strpos($knownId, $id)) { + $alternatives[] = $knownId; + } + } + + throw new ServiceNotFoundException($id, null, null, $alternatives); + } + + return; + } + if (isset($this->privates[$id])) { + @trigger_error(sprintf('Requesting the "%s" private service is deprecated since Symfony 3.2 and won\'t be supported anymore in Symfony 4.0.', $id), E_USER_DEPRECATED); + } + + $this->loading[$id] = true; + + try { + $service = $this->$method(); + } catch (\Exception $e) { + unset($this->services[$id]); + + throw $e; + } finally { + unset($this->loading[$id]); + } + + return $service; + } + } + + /** + * Returns true if the given service has actually been initialized. + * + * @param string $id The service identifier + * + * @return bool true if service has already been initialized, false otherwise + */ + public function initialized($id) + { + $id = strtolower($id); + + if ('service_container' === $id) { + return false; + } + + if (isset($this->aliases[$id])) { + $id = $this->aliases[$id]; + } + + return isset($this->services[$id]); + } + + /** + * {@inheritdoc} + */ + public function reset() + { + $this->services = array(); + } + + /** + * Gets all service ids. + * + * @return array An array of all defined service ids + */ + public function getServiceIds() + { + $ids = array(); + + if (!$this->methodMap && !$this instanceof ContainerBuilder && __CLASS__ !== static::class) { + // We only check the convention-based factory in a compiled container (i.e. a child class other than a ContainerBuilder, + // and only when the dumper has not generated the method map (otherwise the method map is considered to be fully populated by the dumper) + @trigger_error('Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', E_USER_DEPRECATED); + + foreach (get_class_methods($this) as $method) { + if (preg_match('/^get(.+)Service$/', $method, $match)) { + $ids[] = self::underscore($match[1]); + } + } + } + $ids[] = 'service_container'; + + return array_unique(array_merge($ids, array_keys($this->methodMap), array_keys($this->services))); + } + + /** + * Camelizes a string. + * + * @param string $id A string to camelize + * + * @return string The camelized string + */ + public static function camelize($id) + { + return strtr(ucwords(strtr($id, array('_' => ' ', '.' => '_ ', '\\' => '_ '))), array(' ' => '')); + } + + /** + * A string to underscore. + * + * @param string $id The string to underscore + * + * @return string The underscored string + */ + public static function underscore($id) + { + return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), str_replace('_', '.', $id))); + } + + /** + * Fetches a variable from the environment. + * + * @param string The name of the environment variable + * + * @return scalar The value to use for the provided environment variable name + * + * @throws EnvNotFoundException When the environment variable is not found and has no default value + */ + protected function getEnv($name) + { + if (isset($this->envCache[$name]) || array_key_exists($name, $this->envCache)) { + return $this->envCache[$name]; + } + if (isset($_ENV[$name])) { + return $this->envCache[$name] = $_ENV[$name]; + } + if (false !== $env = getenv($name)) { + return $this->envCache[$name] = $env; + } + if (!$this->hasParameter("env($name)")) { + throw new EnvNotFoundException($name); + } + + return $this->envCache[$name] = $this->getParameter("env($name)"); + } + + private function __clone() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..fe301b6270bb9986a11df09103b9f45ace8392b6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.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\DependencyInjection; + +/** + * ContainerAwareInterface should be implemented by classes that depends on a Container. + * + * @author Fabien Potencier + */ +interface ContainerAwareInterface +{ + /** + * Sets the container. + * + * @param ContainerInterface|null $container A ContainerInterface instance or null + */ + public function setContainer(ContainerInterface $container = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..ccf064f6f3b57d18f9af73d6bf3221c71a062018 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection; + +/** + * ContainerAware trait. + * + * @author Fabien Potencier + */ +trait ContainerAwareTrait +{ + /** + * @var ContainerInterface + */ + protected $container; + + /** + * Sets the container. + * + * @param ContainerInterface|null $container A ContainerInterface instance or null + */ + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..d0c4d004447503d92836c3e52d3c620895f75b11 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -0,0 +1,1165 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection; + +use Symfony\Component\DependencyInjection\Compiler\Compiler; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Compiler\PassConfig; +use Symfony\Component\DependencyInjection\Exception\BadMethodCallException; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\Exception\LogicException; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; +use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; +use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; +use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Config\Resource\ResourceInterface; +use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface; +use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator; +use Symfony\Component\ExpressionLanguage\Expression; +use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; + +/** + * ContainerBuilder is a DI container that provides an API to easily describe services. + * + * @author Fabien Potencier + */ +class ContainerBuilder extends Container implements TaggedContainerInterface +{ + /** + * @var ExtensionInterface[] + */ + private $extensions = array(); + + /** + * @var ExtensionInterface[] + */ + private $extensionsByNs = array(); + + /** + * @var Definition[] + */ + private $definitions = array(); + + /** + * @var Alias[] + */ + private $aliasDefinitions = array(); + + /** + * @var ResourceInterface[] + */ + private $resources = array(); + + private $extensionConfigs = array(); + + /** + * @var Compiler + */ + private $compiler; + + private $trackResources = true; + + /** + * @var InstantiatorInterface|null + */ + private $proxyInstantiator; + + /** + * @var ExpressionLanguage|null + */ + private $expressionLanguage; + + /** + * @var ExpressionFunctionProviderInterface[] + */ + private $expressionLanguageProviders = array(); + + /** + * @var string[] with tag names used by findTaggedServiceIds + */ + private $usedTags = array(); + + /** + * @var string[][] a map of env var names to their placeholders + */ + private $envPlaceholders = array(); + + /** + * @var int[] a map of env vars to their resolution counter + */ + private $envCounters = array(); + + /** + * Sets the track resources flag. + * + * If you are not using the loaders and therefore don't want + * to depend on the Config component, set this flag to false. + * + * @param bool $track true if you want to track resources, false otherwise + */ + public function setResourceTracking($track) + { + $this->trackResources = (bool) $track; + } + + /** + * Checks if resources are tracked. + * + * @return bool true if resources are tracked, false otherwise + */ + public function isTrackingResources() + { + return $this->trackResources; + } + + /** + * Sets the instantiator to be used when fetching proxies. + * + * @param InstantiatorInterface $proxyInstantiator + */ + public function setProxyInstantiator(InstantiatorInterface $proxyInstantiator) + { + $this->proxyInstantiator = $proxyInstantiator; + } + + /** + * Registers an extension. + * + * @param ExtensionInterface $extension An extension instance + */ + public function registerExtension(ExtensionInterface $extension) + { + $this->extensions[$extension->getAlias()] = $extension; + + if (false !== $extension->getNamespace()) { + $this->extensionsByNs[$extension->getNamespace()] = $extension; + } + } + + /** + * Returns an extension by alias or namespace. + * + * @param string $name An alias or a namespace + * + * @return ExtensionInterface An extension instance + * + * @throws LogicException if the extension is not registered + */ + public function getExtension($name) + { + if (isset($this->extensions[$name])) { + return $this->extensions[$name]; + } + + if (isset($this->extensionsByNs[$name])) { + return $this->extensionsByNs[$name]; + } + + throw new LogicException(sprintf('Container extension "%s" is not registered', $name)); + } + + /** + * Returns all registered extensions. + * + * @return ExtensionInterface[] An array of ExtensionInterface + */ + public function getExtensions() + { + return $this->extensions; + } + + /** + * Checks if we have an extension. + * + * @param string $name The name of the extension + * + * @return bool If the extension exists + */ + public function hasExtension($name) + { + return isset($this->extensions[$name]) || isset($this->extensionsByNs[$name]); + } + + /** + * Returns an array of resources loaded to build this configuration. + * + * @return ResourceInterface[] An array of resources + */ + public function getResources() + { + return array_unique($this->resources); + } + + /** + * Adds a resource for this configuration. + * + * @param ResourceInterface $resource A resource instance + * + * @return $this + */ + public function addResource(ResourceInterface $resource) + { + if (!$this->trackResources) { + return $this; + } + + $this->resources[] = $resource; + + return $this; + } + + /** + * Sets the resources for this configuration. + * + * @param ResourceInterface[] $resources An array of resources + * + * @return $this + */ + public function setResources(array $resources) + { + if (!$this->trackResources) { + return $this; + } + + $this->resources = $resources; + + return $this; + } + + /** + * Adds the object class hierarchy as resources. + * + * @param object $object An object instance + * + * @return $this + */ + public function addObjectResource($object) + { + if ($this->trackResources) { + $this->addClassResource(new \ReflectionClass($object)); + } + + return $this; + } + + /** + * Adds the given class hierarchy as resources. + * + * @param \ReflectionClass $class + * + * @return $this + */ + public function addClassResource(\ReflectionClass $class) + { + if (!$this->trackResources) { + return $this; + } + + do { + if (is_file($class->getFileName())) { + $this->addResource(new FileResource($class->getFileName())); + } + } while ($class = $class->getParentClass()); + + return $this; + } + + /** + * Loads the configuration for an extension. + * + * @param string $extension The extension alias or namespace + * @param array $values An array of values that customizes the extension + * + * @return $this + * + * @throws BadMethodCallException When this ContainerBuilder is frozen + * @throws \LogicException if the container is frozen + */ + public function loadFromExtension($extension, array $values = array()) + { + if ($this->isFrozen()) { + throw new BadMethodCallException('Cannot load from an extension on a frozen container.'); + } + + $namespace = $this->getExtension($extension)->getAlias(); + + $this->extensionConfigs[$namespace][] = $values; + + return $this; + } + + /** + * Adds a compiler pass. + * + * @param CompilerPassInterface $pass A compiler pass + * @param string $type The type of compiler pass + * @param int $priority Used to sort the passes + * + * @return $this + */ + public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, $priority = 0*/) + { + if (func_num_args() >= 3) { + $priority = func_get_arg(2); + } else { + if (__CLASS__ !== get_class($this)) { + $r = new \ReflectionMethod($this, __FUNCTION__); + if (__CLASS__ !== $r->getDeclaringClass()->getName()) { + @trigger_error(sprintf('Method %s() will have a third `$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.', __METHOD__), E_USER_DEPRECATED); + } + } + + $priority = 0; + } + + $this->getCompiler()->addPass($pass, $type, $priority); + + $this->addObjectResource($pass); + + return $this; + } + + /** + * Returns the compiler pass config which can then be modified. + * + * @return PassConfig The compiler pass config + */ + public function getCompilerPassConfig() + { + return $this->getCompiler()->getPassConfig(); + } + + /** + * Returns the compiler. + * + * @return Compiler The compiler + */ + public function getCompiler() + { + if (null === $this->compiler) { + $this->compiler = new Compiler(); + } + + return $this->compiler; + } + + /** + * Sets a service. + * + * @param string $id The service identifier + * @param object $service The service instance + * + * @throws BadMethodCallException When this ContainerBuilder is frozen + */ + public function set($id, $service) + { + $id = strtolower($id); + + if ($this->isFrozen() && (isset($this->definitions[$id]) && !$this->definitions[$id]->isSynthetic())) { + // setting a synthetic service on a frozen container is alright + throw new BadMethodCallException(sprintf('Setting service "%s" for an unknown or non-synthetic service definition on a frozen container is not allowed.', $id)); + } + + unset($this->definitions[$id], $this->aliasDefinitions[$id]); + + parent::set($id, $service); + } + + /** + * Removes a service definition. + * + * @param string $id The service identifier + */ + public function removeDefinition($id) + { + unset($this->definitions[strtolower($id)]); + } + + /** + * Returns true if the given service is defined. + * + * @param string $id The service identifier + * + * @return bool true if the service is defined, false otherwise + */ + public function has($id) + { + $id = strtolower($id); + + return isset($this->definitions[$id]) || isset($this->aliasDefinitions[$id]) || parent::has($id); + } + + /** + * Gets a service. + * + * @param string $id The service identifier + * @param int $invalidBehavior The behavior when the service does not exist + * + * @return object The associated service + * + * @throws InvalidArgumentException when no definitions are available + * @throws ServiceCircularReferenceException When a circular reference is detected + * @throws ServiceNotFoundException When the service is not defined + * @throws \Exception + * + * @see Reference + */ + public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) + { + $id = strtolower($id); + + if ($service = parent::get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE)) { + return $service; + } + + if (!isset($this->definitions[$id]) && isset($this->aliasDefinitions[$id])) { + return $this->get((string) $this->aliasDefinitions[$id], $invalidBehavior); + } + + try { + $definition = $this->getDefinition($id); + } catch (ServiceNotFoundException $e) { + if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) { + return; + } + + throw $e; + } + + $this->loading[$id] = true; + + try { + $service = $this->createService($definition, $id); + } finally { + unset($this->loading[$id]); + } + + return $service; + } + + /** + * Merges a ContainerBuilder with the current ContainerBuilder configuration. + * + * Service definitions overrides the current defined ones. + * + * But for parameters, they are overridden by the current ones. It allows + * the parameters passed to the container constructor to have precedence + * over the loaded ones. + * + * $container = new ContainerBuilder(array('foo' => 'bar')); + * $loader = new LoaderXXX($container); + * $loader->load('resource_name'); + * $container->register('foo', new stdClass()); + * + * In the above example, even if the loaded resource defines a foo + * parameter, the value will still be 'bar' as defined in the ContainerBuilder + * constructor. + * + * @param ContainerBuilder $container The ContainerBuilder instance to merge + * + * @throws BadMethodCallException When this ContainerBuilder is frozen + */ + public function merge(ContainerBuilder $container) + { + if ($this->isFrozen()) { + throw new BadMethodCallException('Cannot merge on a frozen container.'); + } + + $this->addDefinitions($container->getDefinitions()); + $this->addAliases($container->getAliases()); + $this->getParameterBag()->add($container->getParameterBag()->all()); + + if ($this->trackResources) { + foreach ($container->getResources() as $resource) { + $this->addResource($resource); + } + } + + foreach ($this->extensions as $name => $extension) { + if (!isset($this->extensionConfigs[$name])) { + $this->extensionConfigs[$name] = array(); + } + + $this->extensionConfigs[$name] = array_merge($this->extensionConfigs[$name], $container->getExtensionConfig($name)); + } + + if ($this->getParameterBag() instanceof EnvPlaceholderParameterBag && $container->getParameterBag() instanceof EnvPlaceholderParameterBag) { + $this->getParameterBag()->mergeEnvPlaceholders($container->getParameterBag()); + } + + foreach ($container->envCounters as $env => $count) { + if (!isset($this->envCounters[$env])) { + $this->envCounters[$env] = $count; + } else { + $this->envCounters[$env] += $count; + } + } + } + + /** + * Returns the configuration array for the given extension. + * + * @param string $name The name of the extension + * + * @return array An array of configuration + */ + public function getExtensionConfig($name) + { + if (!isset($this->extensionConfigs[$name])) { + $this->extensionConfigs[$name] = array(); + } + + return $this->extensionConfigs[$name]; + } + + /** + * Prepends a config array to the configs of the given extension. + * + * @param string $name The name of the extension + * @param array $config The config to set + */ + public function prependExtensionConfig($name, array $config) + { + if (!isset($this->extensionConfigs[$name])) { + $this->extensionConfigs[$name] = array(); + } + + array_unshift($this->extensionConfigs[$name], $config); + } + + /** + * Compiles the container. + * + * This method passes the container to compiler + * passes whose job is to manipulate and optimize + * the container. + * + * The main compiler passes roughly do four things: + * + * * The extension configurations are merged; + * * Parameter values are resolved; + * * The parameter bag is frozen; + * * Extension loading is disabled. + */ + public function compile() + { + $compiler = $this->getCompiler(); + + if ($this->trackResources) { + foreach ($compiler->getPassConfig()->getPasses() as $pass) { + $this->addObjectResource($pass); + } + } + + $compiler->compile($this); + + foreach ($this->definitions as $id => $definition) { + if (!$definition->isPublic()) { + $this->privates[$id] = true; + } + if ($this->trackResources && $definition->isLazy() && ($class = $definition->getClass()) && class_exists($class)) { + $this->addClassResource(new \ReflectionClass($class)); + } + } + + $this->extensionConfigs = array(); + $bag = $this->getParameterBag(); + + parent::compile(); + + $this->envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : array(); + } + + /** + * Gets all service ids. + * + * @return array An array of all defined service ids + */ + public function getServiceIds() + { + return array_unique(array_merge(array_keys($this->getDefinitions()), array_keys($this->aliasDefinitions), parent::getServiceIds())); + } + + /** + * Adds the service aliases. + * + * @param array $aliases An array of aliases + */ + public function addAliases(array $aliases) + { + foreach ($aliases as $alias => $id) { + $this->setAlias($alias, $id); + } + } + + /** + * Sets the service aliases. + * + * @param array $aliases An array of aliases + */ + public function setAliases(array $aliases) + { + $this->aliasDefinitions = array(); + $this->addAliases($aliases); + } + + /** + * Sets an alias for an existing service. + * + * @param string $alias The alias to create + * @param string|Alias $id The service to alias + * + * @throws InvalidArgumentException if the id is not a string or an Alias + * @throws InvalidArgumentException if the alias is for itself + */ + public function setAlias($alias, $id) + { + $alias = strtolower($alias); + + if (is_string($id)) { + $id = new Alias($id); + } elseif (!$id instanceof Alias) { + throw new InvalidArgumentException('$id must be a string, or an Alias object.'); + } + + if ($alias === (string) $id) { + throw new InvalidArgumentException(sprintf('An alias can not reference itself, got a circular reference on "%s".', $alias)); + } + + unset($this->definitions[$alias]); + + $this->aliasDefinitions[$alias] = $id; + } + + /** + * Removes an alias. + * + * @param string $alias The alias to remove + */ + public function removeAlias($alias) + { + unset($this->aliasDefinitions[strtolower($alias)]); + } + + /** + * Returns true if an alias exists under the given identifier. + * + * @param string $id The service identifier + * + * @return bool true if the alias exists, false otherwise + */ + public function hasAlias($id) + { + return isset($this->aliasDefinitions[strtolower($id)]); + } + + /** + * Gets all defined aliases. + * + * @return Alias[] An array of aliases + */ + public function getAliases() + { + return $this->aliasDefinitions; + } + + /** + * Gets an alias. + * + * @param string $id The service identifier + * + * @return Alias An Alias instance + * + * @throws InvalidArgumentException if the alias does not exist + */ + public function getAlias($id) + { + $id = strtolower($id); + + if (!isset($this->aliasDefinitions[$id])) { + throw new InvalidArgumentException(sprintf('The service alias "%s" does not exist.', $id)); + } + + return $this->aliasDefinitions[$id]; + } + + /** + * Registers a service definition. + * + * This methods allows for simple registration of service definition + * with a fluid interface. + * + * @param string $id The service identifier + * @param string $class The service class + * + * @return Definition A Definition instance + */ + public function register($id, $class = null) + { + return $this->setDefinition($id, new Definition($class)); + } + + /** + * Adds the service definitions. + * + * @param Definition[] $definitions An array of service definitions + */ + public function addDefinitions(array $definitions) + { + foreach ($definitions as $id => $definition) { + $this->setDefinition($id, $definition); + } + } + + /** + * Sets the service definitions. + * + * @param Definition[] $definitions An array of service definitions + */ + public function setDefinitions(array $definitions) + { + $this->definitions = array(); + $this->addDefinitions($definitions); + } + + /** + * Gets all service definitions. + * + * @return Definition[] An array of Definition instances + */ + public function getDefinitions() + { + return $this->definitions; + } + + /** + * Sets a service definition. + * + * @param string $id The service identifier + * @param Definition $definition A Definition instance + * + * @return Definition the service definition + * + * @throws BadMethodCallException When this ContainerBuilder is frozen + */ + public function setDefinition($id, Definition $definition) + { + if ($this->isFrozen()) { + throw new BadMethodCallException('Adding definition to a frozen container is not allowed'); + } + + $id = strtolower($id); + + unset($this->aliasDefinitions[$id]); + + return $this->definitions[$id] = $definition; + } + + /** + * Returns true if a service definition exists under the given identifier. + * + * @param string $id The service identifier + * + * @return bool true if the service definition exists, false otherwise + */ + public function hasDefinition($id) + { + return isset($this->definitions[strtolower($id)]); + } + + /** + * Gets a service definition. + * + * @param string $id The service identifier + * + * @return Definition A Definition instance + * + * @throws ServiceNotFoundException if the service definition does not exist + */ + public function getDefinition($id) + { + $id = strtolower($id); + + if (!isset($this->definitions[$id])) { + throw new ServiceNotFoundException($id); + } + + return $this->definitions[$id]; + } + + /** + * Gets a service definition by id or alias. + * + * The method "unaliases" recursively to return a Definition instance. + * + * @param string $id The service identifier or alias + * + * @return Definition A Definition instance + * + * @throws ServiceNotFoundException if the service definition does not exist + */ + public function findDefinition($id) + { + $id = strtolower($id); + + while (isset($this->aliasDefinitions[$id])) { + $id = (string) $this->aliasDefinitions[$id]; + } + + return $this->getDefinition($id); + } + + /** + * Creates a service for a service definition. + * + * @param Definition $definition A service definition instance + * @param string $id The service identifier + * @param bool $tryProxy Whether to try proxying the service with a lazy proxy + * + * @return object The service described by the service definition + * + * @throws RuntimeException When the factory definition is incomplete + * @throws RuntimeException When the service is a synthetic service + * @throws InvalidArgumentException When configure callable is not callable + */ + private function createService(Definition $definition, $id, $tryProxy = true) + { + if ($definition instanceof DefinitionDecorator) { + throw new RuntimeException(sprintf('Constructing service "%s" from a parent definition is not supported at build time.', $id)); + } + + if ($definition->isSynthetic()) { + throw new RuntimeException(sprintf('You have requested a synthetic service ("%s"). The DIC does not know how to construct this service.', $id)); + } + + if ($definition->isDeprecated()) { + @trigger_error($definition->getDeprecationMessage($id), E_USER_DEPRECATED); + } + + if ($tryProxy && $definition->isLazy()) { + $proxy = $this + ->getProxyInstantiator() + ->instantiateProxy( + $this, + $definition, + $id, function () use ($definition, $id) { + return $this->createService($definition, $id, false); + } + ); + $this->shareService($definition, $proxy, $id); + + return $proxy; + } + + $parameterBag = $this->getParameterBag(); + + if (null !== $definition->getFile()) { + require_once $parameterBag->resolveValue($definition->getFile()); + } + + $arguments = $this->resolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getArguments()))); + + if (null !== $factory = $definition->getFactory()) { + if (is_array($factory)) { + $factory = array($this->resolveServices($parameterBag->resolveValue($factory[0])), $factory[1]); + } elseif (!is_string($factory)) { + throw new RuntimeException(sprintf('Cannot create service "%s" because of invalid factory', $id)); + } + + $service = call_user_func_array($factory, $arguments); + + if (!$definition->isDeprecated() && is_array($factory) && is_string($factory[0])) { + $r = new \ReflectionClass($factory[0]); + + if (0 < strpos($r->getDocComment(), "\n * @deprecated ")) { + @trigger_error(sprintf('The "%s" service relies on the deprecated "%s" factory class. It should either be deprecated or its factory upgraded.', $id, $r->name), E_USER_DEPRECATED); + } + } + } else { + $r = new \ReflectionClass($parameterBag->resolveValue($definition->getClass())); + + $service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs($arguments); + + if (!$definition->isDeprecated() && 0 < strpos($r->getDocComment(), "\n * @deprecated ")) { + @trigger_error(sprintf('The "%s" service relies on the deprecated "%s" class. It should either be deprecated or its implementation upgraded.', $id, $r->name), E_USER_DEPRECATED); + } + } + + if ($tryProxy || !$definition->isLazy()) { + // share only if proxying failed, or if not a proxy + $this->shareService($definition, $service, $id); + } + + $properties = $this->resolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getProperties()))); + foreach ($properties as $name => $value) { + $service->$name = $value; + } + + foreach ($definition->getMethodCalls() as $call) { + $this->callMethod($service, $call); + } + + if ($callable = $definition->getConfigurator()) { + if (is_array($callable)) { + $callable[0] = $parameterBag->resolveValue($callable[0]); + + if ($callable[0] instanceof Reference) { + $callable[0] = $this->get((string) $callable[0], $callable[0]->getInvalidBehavior()); + } elseif ($callable[0] instanceof Definition) { + $callable[0] = $this->createService($callable[0], null); + } + } + + if (!is_callable($callable)) { + throw new InvalidArgumentException(sprintf('The configure callable for class "%s" is not a callable.', get_class($service))); + } + + call_user_func($callable, $service); + } + + return $service; + } + + /** + * Replaces service references by the real service instance and evaluates expressions. + * + * @param mixed $value A value + * + * @return mixed The same value with all service references replaced by + * the real service instances and all expressions evaluated + */ + public function resolveServices($value) + { + if (is_array($value)) { + foreach ($value as $k => $v) { + $value[$k] = $this->resolveServices($v); + } + } elseif ($value instanceof Reference) { + $value = $this->get((string) $value, $value->getInvalidBehavior()); + } elseif ($value instanceof Definition) { + $value = $this->createService($value, null); + } elseif ($value instanceof Expression) { + $value = $this->getExpressionLanguage()->evaluate($value, array('container' => $this)); + } + + return $value; + } + + /** + * Returns service ids for a given tag. + * + * Example: + * + * $container->register('foo')->addTag('my.tag', array('hello' => 'world')); + * + * $serviceIds = $container->findTaggedServiceIds('my.tag'); + * foreach ($serviceIds as $serviceId => $tags) { + * foreach ($tags as $tag) { + * echo $tag['hello']; + * } + * } + * + * @param string $name The tag name + * + * @return array An array of tags with the tagged service as key, holding a list of attribute arrays + */ + public function findTaggedServiceIds($name) + { + $this->usedTags[] = $name; + $tags = array(); + foreach ($this->getDefinitions() as $id => $definition) { + if ($definition->hasTag($name)) { + $tags[$id] = $definition->getTag($name); + } + } + + return $tags; + } + + /** + * Returns all tags the defined services use. + * + * @return array An array of tags + */ + public function findTags() + { + $tags = array(); + foreach ($this->getDefinitions() as $id => $definition) { + $tags = array_merge(array_keys($definition->getTags()), $tags); + } + + return array_unique($tags); + } + + /** + * Returns all tags not queried by findTaggedServiceIds. + * + * @return string[] An array of tags + */ + public function findUnusedTags() + { + return array_values(array_diff($this->findTags(), $this->usedTags)); + } + + public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) + { + $this->expressionLanguageProviders[] = $provider; + } + + /** + * @return ExpressionFunctionProviderInterface[] + */ + public function getExpressionLanguageProviders() + { + return $this->expressionLanguageProviders; + } + + /** + * Resolves env parameter placeholders in a string or an array. + * + * @param mixed $value The value to resolve + * @param string|null $format A sprintf() format to use as replacement for env placeholders or null to use the default parameter format + * @param array &$usedEnvs Env vars found while resolving are added to this array + * + * @return string The string with env parameters resolved + */ + public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs = null) + { + if (null === $format) { + $format = '%%env(%s)%%'; + } + + if (is_array($value)) { + $result = array(); + foreach ($value as $k => $v) { + $result[$this->resolveEnvPlaceholders($k, $format, $usedEnvs)] = $this->resolveEnvPlaceholders($v, $format, $usedEnvs); + } + + return $result; + } + + if (!is_string($value)) { + return $value; + } + + $bag = $this->getParameterBag(); + $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders; + + foreach ($envPlaceholders as $env => $placeholders) { + foreach ($placeholders as $placeholder) { + if (false !== stripos($value, $placeholder)) { + $value = str_ireplace($placeholder, sprintf($format, $env), $value); + $usedEnvs[$env] = $env; + $this->envCounters[$env] = isset($this->envCounters[$env]) ? 1 + $this->envCounters[$env] : 1; + } + } + } + + return $value; + } + + /** + * Get statistics about env usage. + * + * @return int[] The number of time each env vars has been resolved + */ + public function getEnvCounters() + { + $bag = $this->getParameterBag(); + $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders; + + foreach ($envPlaceholders as $env => $placeholders) { + if (!isset($this->envCounters[$env])) { + $this->envCounters[$env] = 0; + } + } + + return $this->envCounters; + } + + /** + * Returns the Service Conditionals. + * + * @param mixed $value An array of conditionals to return + * + * @return array An array of Service conditionals + */ + public static function getServiceConditionals($value) + { + $services = array(); + + if (is_array($value)) { + foreach ($value as $v) { + $services = array_unique(array_merge($services, self::getServiceConditionals($v))); + } + } elseif ($value instanceof Reference && $value->getInvalidBehavior() === ContainerInterface::IGNORE_ON_INVALID_REFERENCE) { + $services[] = (string) $value; + } + + return $services; + } + + /** + * Retrieves the currently set proxy instantiator or instantiates one. + * + * @return InstantiatorInterface + */ + private function getProxyInstantiator() + { + if (!$this->proxyInstantiator) { + $this->proxyInstantiator = new RealServiceInstantiator(); + } + + return $this->proxyInstantiator; + } + + private function callMethod($service, $call) + { + $services = self::getServiceConditionals($call[1]); + + foreach ($services as $s) { + if (!$this->has($s)) { + return; + } + } + + call_user_func_array(array($service, $call[0]), $this->resolveServices($this->getParameterBag()->unescapeValue($this->getParameterBag()->resolveValue($call[1])))); + } + + /** + * Shares a given service in the container. + * + * @param Definition $definition + * @param mixed $service + * @param string|null $id + */ + private function shareService(Definition $definition, $service, $id) + { + if (null !== $id && $definition->isShared()) { + $this->services[strtolower($id)] = $service; + } + } + + private function getExpressionLanguage() + { + if (null === $this->expressionLanguage) { + if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) { + throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); + } + $this->expressionLanguage = new ExpressionLanguage(null, $this->expressionLanguageProviders); + } + + return $this->expressionLanguage; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..7e2fbb1c8aaa256a12001b6844d3b4de077e0707 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerInterface.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection; + +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; +use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; + +/** + * ContainerInterface is the interface implemented by service container classes. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +interface ContainerInterface +{ + const EXCEPTION_ON_INVALID_REFERENCE = 1; + const NULL_ON_INVALID_REFERENCE = 2; + const IGNORE_ON_INVALID_REFERENCE = 3; + + /** + * Sets a service. + * + * @param string $id The service identifier + * @param object $service The service instance + */ + public function set($id, $service); + + /** + * Gets a service. + * + * @param string $id The service identifier + * @param int $invalidBehavior The behavior when the service does not exist + * + * @return object The associated service + * + * @throws ServiceCircularReferenceException When a circular reference is detected + * @throws ServiceNotFoundException When the service is not defined + * + * @see Reference + */ + public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE); + + /** + * Returns true if the given service is defined. + * + * @param string $id The service identifier + * + * @return bool true if the service is defined, false otherwise + */ + public function has($id); + + /** + * Check for whether or not a service has been initialized. + * + * @param string $id + * + * @return bool true if the service has been initialized, false otherwise + */ + public function initialized($id); + + /** + * Gets a parameter. + * + * @param string $name The parameter name + * + * @return mixed The parameter value + * + * @throws InvalidArgumentException if the parameter is not defined + */ + public function getParameter($name); + + /** + * Checks if a parameter exists. + * + * @param string $name The parameter name + * + * @return bool The presence of parameter in container + */ + public function hasParameter($name); + + /** + * Sets a parameter. + * + * @param string $name The parameter name + * @param mixed $value The parameter value + */ + public function setParameter($name, $value); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Definition.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Definition.php new file mode 100644 index 0000000000000000000000000000000000000000..d8e954329fa710de9a1ec518e9d3b8e9a8333f10 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Definition.php @@ -0,0 +1,735 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection; + +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException; + +/** + * Definition represents a service definition. + * + * @author Fabien Potencier + */ +class Definition +{ + private $class; + private $file; + private $factory; + private $shared = true; + private $deprecated = false; + private $deprecationTemplate = 'The "%service_id%" service is deprecated. You should stop using it, as it will soon be removed.'; + private $properties = array(); + private $calls = array(); + private $configurator; + private $tags = array(); + private $public = true; + private $synthetic = false; + private $abstract = false; + private $lazy = false; + private $decoratedService; + private $autowired = false; + private $autowiringTypes = array(); + + protected $arguments; + + /** + * @param string|null $class The service class + * @param array $arguments An array of arguments to pass to the service constructor + */ + public function __construct($class = null, array $arguments = array()) + { + $this->class = $class; + $this->arguments = $arguments; + } + + /** + * Sets a factory. + * + * @param string|array $factory A PHP function or an array containing a class/Reference and a method to call + * + * @return $this + */ + public function setFactory($factory) + { + if (is_string($factory) && strpos($factory, '::') !== false) { + $factory = explode('::', $factory, 2); + } + + $this->factory = $factory; + + return $this; + } + + /** + * Gets the factory. + * + * @return string|array The PHP function or an array containing a class/Reference and a method to call + */ + public function getFactory() + { + return $this->factory; + } + + /** + * Sets the service that this service is decorating. + * + * @param null|string $id The decorated service id, use null to remove decoration + * @param null|string $renamedId The new decorated service id + * @param int $priority The priority of decoration + * + * @return $this + * + * @throws InvalidArgumentException In case the decorated service id and the new decorated service id are equals. + */ + public function setDecoratedService($id, $renamedId = null, $priority = 0) + { + if ($renamedId && $id == $renamedId) { + throw new InvalidArgumentException(sprintf('The decorated service inner name for "%s" must be different than the service name itself.', $id)); + } + + if (null === $id) { + $this->decoratedService = null; + } else { + $this->decoratedService = array($id, $renamedId, (int) $priority); + } + + return $this; + } + + /** + * Gets the service that this service is decorating. + * + * @return null|array An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated + */ + public function getDecoratedService() + { + return $this->decoratedService; + } + + /** + * Sets the service class. + * + * @param string $class The service class + * + * @return $this + */ + public function setClass($class) + { + $this->class = $class; + + return $this; + } + + /** + * Gets the service class. + * + * @return string|null The service class + */ + public function getClass() + { + return $this->class; + } + + /** + * Sets the arguments to pass to the service constructor/factory method. + * + * @param array $arguments An array of arguments + * + * @return $this + */ + public function setArguments(array $arguments) + { + $this->arguments = $arguments; + + return $this; + } + + public function setProperties(array $properties) + { + $this->properties = $properties; + + return $this; + } + + public function getProperties() + { + return $this->properties; + } + + public function setProperty($name, $value) + { + $this->properties[$name] = $value; + + return $this; + } + + /** + * Adds an argument to pass to the service constructor/factory method. + * + * @param mixed $argument An argument + * + * @return $this + */ + public function addArgument($argument) + { + $this->arguments[] = $argument; + + return $this; + } + + /** + * Sets a specific argument. + * + * @param int $index + * @param mixed $argument + * + * @return $this + * + * @throws OutOfBoundsException When the replaced argument does not exist + */ + public function replaceArgument($index, $argument) + { + if (0 === count($this->arguments)) { + throw new OutOfBoundsException('Cannot replace arguments if none have been configured yet.'); + } + + if ($index < 0 || $index > count($this->arguments) - 1) { + throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, count($this->arguments) - 1)); + } + + $this->arguments[$index] = $argument; + + return $this; + } + + /** + * Gets the arguments to pass to the service constructor/factory method. + * + * @return array The array of arguments + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * Gets an argument to pass to the service constructor/factory method. + * + * @param int $index + * + * @return mixed The argument value + * + * @throws OutOfBoundsException When the argument does not exist + */ + public function getArgument($index) + { + if ($index < 0 || $index > count($this->arguments) - 1) { + throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, count($this->arguments) - 1)); + } + + return $this->arguments[$index]; + } + + /** + * Sets the methods to call after service initialization. + * + * @param array $calls An array of method calls + * + * @return $this + */ + public function setMethodCalls(array $calls = array()) + { + $this->calls = array(); + foreach ($calls as $call) { + $this->addMethodCall($call[0], $call[1]); + } + + return $this; + } + + /** + * Adds a method to call after service initialization. + * + * @param string $method The method name to call + * @param array $arguments An array of arguments to pass to the method call + * + * @return $this + * + * @throws InvalidArgumentException on empty $method param + */ + public function addMethodCall($method, array $arguments = array()) + { + if (empty($method)) { + throw new InvalidArgumentException(sprintf('Method name cannot be empty.')); + } + $this->calls[] = array($method, $arguments); + + return $this; + } + + /** + * Removes a method to call after service initialization. + * + * @param string $method The method name to remove + * + * @return $this + */ + public function removeMethodCall($method) + { + foreach ($this->calls as $i => $call) { + if ($call[0] === $method) { + unset($this->calls[$i]); + break; + } + } + + return $this; + } + + /** + * Check if the current definition has a given method to call after service initialization. + * + * @param string $method The method name to search for + * + * @return bool + */ + public function hasMethodCall($method) + { + foreach ($this->calls as $call) { + if ($call[0] === $method) { + return true; + } + } + + return false; + } + + /** + * Gets the methods to call after service initialization. + * + * @return array An array of method calls + */ + public function getMethodCalls() + { + return $this->calls; + } + + /** + * Sets tags for this definition. + * + * @param array $tags + * + * @return $this + */ + public function setTags(array $tags) + { + $this->tags = $tags; + + return $this; + } + + /** + * Returns all tags. + * + * @return array An array of tags + */ + public function getTags() + { + return $this->tags; + } + + /** + * Gets a tag by name. + * + * @param string $name The tag name + * + * @return array An array of attributes + */ + public function getTag($name) + { + return isset($this->tags[$name]) ? $this->tags[$name] : array(); + } + + /** + * Adds a tag for this definition. + * + * @param string $name The tag name + * @param array $attributes An array of attributes + * + * @return $this + */ + public function addTag($name, array $attributes = array()) + { + $this->tags[$name][] = $attributes; + + return $this; + } + + /** + * Whether this definition has a tag with the given name. + * + * @param string $name + * + * @return bool + */ + public function hasTag($name) + { + return isset($this->tags[$name]); + } + + /** + * Clears all tags for a given name. + * + * @param string $name The tag name + * + * @return $this + */ + public function clearTag($name) + { + unset($this->tags[$name]); + + return $this; + } + + /** + * Clears the tags for this definition. + * + * @return $this + */ + public function clearTags() + { + $this->tags = array(); + + return $this; + } + + /** + * Sets a file to require before creating the service. + * + * @param string $file A full pathname to include + * + * @return $this + */ + public function setFile($file) + { + $this->file = $file; + + return $this; + } + + /** + * Gets the file to require before creating the service. + * + * @return string|null The full pathname to include + */ + public function getFile() + { + return $this->file; + } + + /** + * Sets if the service must be shared or not. + * + * @param bool $shared Whether the service must be shared or not + * + * @return $this + */ + public function setShared($shared) + { + $this->shared = (bool) $shared; + + return $this; + } + + /** + * Whether this service is shared. + * + * @return bool + */ + public function isShared() + { + return $this->shared; + } + + /** + * Sets the visibility of this service. + * + * @param bool $boolean + * + * @return $this + */ + public function setPublic($boolean) + { + $this->public = (bool) $boolean; + + return $this; + } + + /** + * Whether this service is public facing. + * + * @return bool + */ + public function isPublic() + { + return $this->public; + } + + /** + * Sets the lazy flag of this service. + * + * @param bool $lazy + * + * @return $this + */ + public function setLazy($lazy) + { + $this->lazy = (bool) $lazy; + + return $this; + } + + /** + * Whether this service is lazy. + * + * @return bool + */ + public function isLazy() + { + return $this->lazy; + } + + /** + * Sets whether this definition is synthetic, that is not constructed by the + * container, but dynamically injected. + * + * @param bool $boolean + * + * @return $this + */ + public function setSynthetic($boolean) + { + $this->synthetic = (bool) $boolean; + + return $this; + } + + /** + * Whether this definition is synthetic, that is not constructed by the + * container, but dynamically injected. + * + * @return bool + */ + public function isSynthetic() + { + return $this->synthetic; + } + + /** + * Whether this definition is abstract, that means it merely serves as a + * template for other definitions. + * + * @param bool $boolean + * + * @return $this + */ + public function setAbstract($boolean) + { + $this->abstract = (bool) $boolean; + + return $this; + } + + /** + * Whether this definition is abstract, that means it merely serves as a + * template for other definitions. + * + * @return bool + */ + public function isAbstract() + { + return $this->abstract; + } + + /** + * Whether this definition is deprecated, that means it should not be called + * anymore. + * + * @param bool $status + * @param string $template Template message to use if the definition is deprecated + * + * @return $this + * + * @throws InvalidArgumentException When the message template is invalid. + */ + public function setDeprecated($status = true, $template = null) + { + if (null !== $template) { + if (preg_match('#[\r\n]|\*/#', $template)) { + throw new InvalidArgumentException('Invalid characters found in deprecation template.'); + } + + if (false === strpos($template, '%service_id%')) { + throw new InvalidArgumentException('The deprecation template must contain the "%service_id%" placeholder.'); + } + + $this->deprecationTemplate = $template; + } + + $this->deprecated = (bool) $status; + + return $this; + } + + /** + * Whether this definition is deprecated, that means it should not be called + * anymore. + * + * @return bool + */ + public function isDeprecated() + { + return $this->deprecated; + } + + /** + * Message to use if this definition is deprecated. + * + * @param string $id Service id relying on this definition + * + * @return string + */ + public function getDeprecationMessage($id) + { + return str_replace('%service_id%', $id, $this->deprecationTemplate); + } + + /** + * Sets a configurator to call after the service is fully initialized. + * + * @param string|array $configurator A PHP callable + * + * @return $this + */ + public function setConfigurator($configurator) + { + if (is_string($configurator) && strpos($configurator, '::') !== false) { + $configurator = explode('::', $configurator, 2); + } + + $this->configurator = $configurator; + + return $this; + } + + /** + * Gets the configurator to call after the service is fully initialized. + * + * @return callable|null The PHP callable to call + */ + public function getConfigurator() + { + return $this->configurator; + } + + /** + * Sets types that will default to this definition. + * + * @param string[] $types + * + * @return $this + */ + public function setAutowiringTypes(array $types) + { + $this->autowiringTypes = array(); + + foreach ($types as $type) { + $this->autowiringTypes[$type] = true; + } + + return $this; + } + + /** + * Is the definition autowired? + * + * @return bool + */ + public function isAutowired() + { + return $this->autowired; + } + + /** + * Sets autowired. + * + * @param bool $autowired + * + * @return $this + */ + public function setAutowired($autowired) + { + $this->autowired = $autowired; + + return $this; + } + + /** + * Gets autowiring types that will default to this definition. + * + * @return string[] + */ + public function getAutowiringTypes() + { + return array_keys($this->autowiringTypes); + } + + /** + * Adds a type that will default to this definition. + * + * @param string $type + * + * @return $this + */ + public function addAutowiringType($type) + { + $this->autowiringTypes[$type] = true; + + return $this; + } + + /** + * Removes a type. + * + * @param string $type + * + * @return $this + */ + public function removeAutowiringType($type) + { + unset($this->autowiringTypes[$type]); + + return $this; + } + + /** + * Will this definition default for the given type? + * + * @param string $type + * + * @return bool + */ + public function hasAutowiringType($type) + { + return isset($this->autowiringTypes[$type]); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/DefinitionDecorator.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/DefinitionDecorator.php new file mode 100644 index 0000000000000000000000000000000000000000..1243695dba93013d13ffa1205d36e55f754fe7df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/DefinitionDecorator.php @@ -0,0 +1,199 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection; + +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException; + +/** + * This definition decorates another definition. + * + * @author Johannes M. Schmitt + */ +class DefinitionDecorator extends Definition +{ + private $parent; + private $changes = array(); + + /** + * @param string $parent The id of Definition instance to decorate + */ + public function __construct($parent) + { + parent::__construct(); + + $this->parent = $parent; + } + + /** + * Returns the Definition being decorated. + * + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Returns all changes tracked for the Definition object. + * + * @return array An array of changes for this Definition + */ + public function getChanges() + { + return $this->changes; + } + + /** + * {@inheritdoc} + */ + public function setClass($class) + { + $this->changes['class'] = true; + + return parent::setClass($class); + } + + /** + * {@inheritdoc} + */ + public function setFactory($callable) + { + $this->changes['factory'] = true; + + return parent::setFactory($callable); + } + + /** + * {@inheritdoc} + */ + public function setConfigurator($callable) + { + $this->changes['configurator'] = true; + + return parent::setConfigurator($callable); + } + + /** + * {@inheritdoc} + */ + public function setFile($file) + { + $this->changes['file'] = true; + + return parent::setFile($file); + } + + /** + * {@inheritdoc} + */ + public function setPublic($boolean) + { + $this->changes['public'] = true; + + return parent::setPublic($boolean); + } + + /** + * {@inheritdoc} + */ + public function setLazy($boolean) + { + $this->changes['lazy'] = true; + + return parent::setLazy($boolean); + } + + /** + * {@inheritdoc} + */ + public function setDecoratedService($id, $renamedId = null, $priority = 0) + { + $this->changes['decorated_service'] = true; + + return parent::setDecoratedService($id, $renamedId, $priority); + } + + /** + * {@inheritdoc} + */ + public function setDeprecated($boolean = true, $template = null) + { + $this->changes['deprecated'] = true; + + return parent::setDeprecated($boolean, $template); + } + + /** + * {@inheritdoc} + */ + public function setAutowired($autowired) + { + $this->changes['autowire'] = true; + + return parent::setAutowired($autowired); + } + + /** + * Gets an argument to pass to the service constructor/factory method. + * + * If replaceArgument() has been used to replace an argument, this method + * will return the replacement value. + * + * @param int $index + * + * @return mixed The argument value + * + * @throws OutOfBoundsException When the argument does not exist + */ + public function getArgument($index) + { + if (array_key_exists('index_'.$index, $this->arguments)) { + return $this->arguments['index_'.$index]; + } + + $lastIndex = count(array_filter(array_keys($this->arguments), 'is_int')) - 1; + + if ($index < 0 || $index > $lastIndex) { + throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, $lastIndex)); + } + + return $this->arguments[$index]; + } + + /** + * You should always use this method when overwriting existing arguments + * of the parent definition. + * + * If you directly call setArguments() keep in mind that you must follow + * certain conventions when you want to overwrite the arguments of the + * parent definition, otherwise your arguments will only be appended. + * + * @param int $index + * @param mixed $value + * + * @return $this + * + * @throws InvalidArgumentException when $index isn't an integer + */ + public function replaceArgument($index, $value) + { + if (!is_int($index)) { + throw new InvalidArgumentException('$index must be an integer.'); + } + + $this->arguments['index_'.$index] = $value; + + return $this; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/Dumper.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/Dumper.php new file mode 100644 index 0000000000000000000000000000000000000000..a39a5c744ba785fd20486c9e8e7e125efd1dc47d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/Dumper.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\Component\DependencyInjection\Dumper; + +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Dumper is the abstract class for all built-in dumpers. + * + * @author Fabien Potencier + */ +abstract class Dumper implements DumperInterface +{ + protected $container; + + /** + * @param ContainerBuilder $container The service container to dump + */ + public function __construct(ContainerBuilder $container) + { + $this->container = $container; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..dd001e4ed080c4441bf25b3af568b325ba0088b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.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\Component\DependencyInjection\Dumper; + +/** + * DumperInterface is the interface implemented by service container dumper classes. + * + * @author Fabien Potencier + */ +interface DumperInterface +{ + /** + * Dumps the service container. + * + * @param array $options An array of options + * + * @return string The representation of the service container + */ + public function dump(array $options = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..9e6b1904b6eeb3063e259078c9f934bef4207b9b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php @@ -0,0 +1,299 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Dumper; + +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Parameter; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; + +/** + * GraphvizDumper dumps a service container as a graphviz file. + * + * You can convert the generated dot file with the dot utility (http://www.graphviz.org/): + * + * dot -Tpng container.dot > foo.png + * + * @author Fabien Potencier + */ +class GraphvizDumper extends Dumper +{ + private $nodes; + private $edges; + private $options = array( + 'graph' => array('ratio' => 'compress'), + 'node' => array('fontsize' => 11, 'fontname' => 'Arial', 'shape' => 'record'), + 'edge' => array('fontsize' => 9, 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => 0.5), + 'node.instance' => array('fillcolor' => '#9999ff', 'style' => 'filled'), + 'node.definition' => array('fillcolor' => '#eeeeee'), + 'node.missing' => array('fillcolor' => '#ff9999', 'style' => 'filled'), + ); + + /** + * Dumps the service container as a graphviz graph. + * + * Available options: + * + * * graph: The default options for the whole graph + * * node: The default options for nodes + * * edge: The default options for edges + * * node.instance: The default options for services that are defined directly by object instances + * * node.definition: The default options for services that are defined via service definition instances + * * node.missing: The default options for missing services + * + * @param array $options An array of options + * + * @return string The dot representation of the service container + */ + public function dump(array $options = array()) + { + foreach (array('graph', 'node', 'edge', 'node.instance', 'node.definition', 'node.missing') as $key) { + if (isset($options[$key])) { + $this->options[$key] = array_merge($this->options[$key], $options[$key]); + } + } + + $this->nodes = $this->findNodes(); + + $this->edges = array(); + foreach ($this->container->getDefinitions() as $id => $definition) { + $this->edges[$id] = array_merge( + $this->findEdges($id, $definition->getArguments(), true, ''), + $this->findEdges($id, $definition->getProperties(), false, '') + ); + + foreach ($definition->getMethodCalls() as $call) { + $this->edges[$id] = array_merge( + $this->edges[$id], + $this->findEdges($id, $call[1], false, $call[0].'()') + ); + } + } + + return $this->container->resolveEnvPlaceholders($this->startDot().$this->addNodes().$this->addEdges().$this->endDot(), '__ENV_%s__'); + } + + /** + * Returns all nodes. + * + * @return string A string representation of all nodes + */ + private function addNodes() + { + $code = ''; + foreach ($this->nodes as $id => $node) { + $aliases = $this->getAliases($id); + + $code .= sprintf(" node_%s [label=\"%s\\n%s\\n\", shape=%s%s];\n", $this->dotize($id), $id.($aliases ? ' ('.implode(', ', $aliases).')' : ''), $node['class'], $this->options['node']['shape'], $this->addAttributes($node['attributes'])); + } + + return $code; + } + + /** + * Returns all edges. + * + * @return string A string representation of all edges + */ + private function addEdges() + { + $code = ''; + foreach ($this->edges as $id => $edges) { + foreach ($edges as $edge) { + $code .= sprintf(" node_%s -> node_%s [label=\"%s\" style=\"%s\"];\n", $this->dotize($id), $this->dotize($edge['to']), $edge['name'], $edge['required'] ? 'filled' : 'dashed'); + } + } + + return $code; + } + + /** + * Finds all edges belonging to a specific service id. + * + * @param string $id The service id used to find edges + * @param array $arguments An array of arguments + * @param bool $required + * @param string $name + * + * @return array An array of edges + */ + private function findEdges($id, array $arguments, $required, $name) + { + $edges = array(); + foreach ($arguments as $argument) { + if ($argument instanceof Parameter) { + $argument = $this->container->hasParameter($argument) ? $this->container->getParameter($argument) : null; + } elseif (is_string($argument) && preg_match('/^%([^%]+)%$/', $argument, $match)) { + $argument = $this->container->hasParameter($match[1]) ? $this->container->getParameter($match[1]) : null; + } + + if ($argument instanceof Reference) { + if (!$this->container->has((string) $argument)) { + $this->nodes[(string) $argument] = array('name' => $name, 'required' => $required, 'class' => '', 'attributes' => $this->options['node.missing']); + } + + $edges[] = array('name' => $name, 'required' => $required, 'to' => $argument); + } elseif (is_array($argument)) { + $edges = array_merge($edges, $this->findEdges($id, $argument, $required, $name)); + } + } + + return $edges; + } + + /** + * Finds all nodes. + * + * @return array An array of all nodes + */ + private function findNodes() + { + $nodes = array(); + + $container = $this->cloneContainer(); + + foreach ($container->getDefinitions() as $id => $definition) { + $class = $definition->getClass(); + + if ('\\' === substr($class, 0, 1)) { + $class = substr($class, 1); + } + + try { + $class = $this->container->getParameterBag()->resolveValue($class); + } catch (ParameterNotFoundException $e) { + } + + $nodes[$id] = array('class' => str_replace('\\', '\\\\', $class), 'attributes' => array_merge($this->options['node.definition'], array('style' => $definition->isShared() ? 'filled' : 'dotted'))); + $container->setDefinition($id, new Definition('stdClass')); + } + + foreach ($container->getServiceIds() as $id) { + if (array_key_exists($id, $container->getAliases())) { + continue; + } + + if (!$container->hasDefinition($id)) { + $class = get_class('service_container' === $id ? $this->container : $container->get($id)); + $nodes[$id] = array('class' => str_replace('\\', '\\\\', $class), 'attributes' => $this->options['node.instance']); + } + } + + return $nodes; + } + + private function cloneContainer() + { + $parameterBag = new ParameterBag($this->container->getParameterBag()->all()); + + $container = new ContainerBuilder($parameterBag); + $container->setDefinitions($this->container->getDefinitions()); + $container->setAliases($this->container->getAliases()); + $container->setResources($this->container->getResources()); + foreach ($this->container->getExtensions() as $extension) { + $container->registerExtension($extension); + } + + return $container; + } + + /** + * Returns the start dot. + * + * @return string The string representation of a start dot + */ + private function startDot() + { + return sprintf("digraph sc {\n %s\n node [%s];\n edge [%s];\n\n", + $this->addOptions($this->options['graph']), + $this->addOptions($this->options['node']), + $this->addOptions($this->options['edge']) + ); + } + + /** + * Returns the end dot. + * + * @return string + */ + private function endDot() + { + return "}\n"; + } + + /** + * Adds attributes. + * + * @param array $attributes An array of attributes + * + * @return string A comma separated list of attributes + */ + private function addAttributes(array $attributes) + { + $code = array(); + foreach ($attributes as $k => $v) { + $code[] = sprintf('%s="%s"', $k, $v); + } + + return $code ? ', '.implode(', ', $code) : ''; + } + + /** + * Adds options. + * + * @param array $options An array of options + * + * @return string A space separated list of options + */ + private function addOptions(array $options) + { + $code = array(); + foreach ($options as $k => $v) { + $code[] = sprintf('%s="%s"', $k, $v); + } + + return implode(' ', $code); + } + + /** + * Dotizes an identifier. + * + * @param string $id The identifier to dotize + * + * @return string A dotized string + */ + private function dotize($id) + { + return strtolower(preg_replace('/\W/i', '_', $id)); + } + + /** + * Compiles an array of aliases for a specified service id. + * + * @param string $id A service id + * + * @return array An array of aliases + */ + private function getAliases($id) + { + $aliases = array(); + foreach ($this->container->getAliases() as $alias => $origin) { + if ($id == $origin) { + $aliases[] = $alias; + } + } + + return $aliases; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..152605167ecd53b8b67a8d5edfac95819eb7274e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -0,0 +1,1654 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Dumper; + +use Symfony\Component\DependencyInjection\Variable; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Parameter; +use Symfony\Component\DependencyInjection\Exception\EnvParameterException; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; +use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface as ProxyDumper; +use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper; +use Symfony\Component\DependencyInjection\ExpressionLanguage; +use Symfony\Component\ExpressionLanguage\Expression; +use Symfony\Component\HttpKernel\Kernel; + +/** + * PhpDumper dumps a service container as a PHP class. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class PhpDumper extends Dumper +{ + /** + * Characters that might appear in the generated variable name as first character. + * + * @var string + */ + const FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz'; + + /** + * Characters that might appear in the generated variable name as any but the first character. + * + * @var string + */ + const NON_FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_'; + + private $inlinedDefinitions; + private $definitionVariables; + private $referenceVariables; + private $variableCount; + private $reservedVariables = array('instance', 'class'); + private $expressionLanguage; + private $targetDirRegex; + private $targetDirMaxMatches; + private $docStar; + private $serviceIdToMethodNameMap; + private $usedMethodNames; + + /** + * @var \Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface + */ + private $proxyDumper; + + /** + * {@inheritdoc} + */ + public function __construct(ContainerBuilder $container) + { + parent::__construct($container); + + $this->inlinedDefinitions = new \SplObjectStorage(); + } + + /** + * Sets the dumper to be used when dumping proxies in the generated container. + * + * @param ProxyDumper $proxyDumper + */ + public function setProxyDumper(ProxyDumper $proxyDumper) + { + $this->proxyDumper = $proxyDumper; + } + + /** + * Dumps the service container as a PHP class. + * + * Available options: + * + * * class: The class name + * * base_class: The base class name + * * namespace: The class namespace + * + * @param array $options An array of options + * + * @return string A PHP class representing of the service container + * + * @throws EnvParameterException When an env var exists but has not been dumped + */ + public function dump(array $options = array()) + { + $this->targetDirRegex = null; + $options = array_merge(array( + 'class' => 'ProjectServiceContainer', + 'base_class' => 'Container', + 'namespace' => '', + 'debug' => true, + ), $options); + + $this->initializeMethodNamesMap($options['base_class']); + + $this->docStar = $options['debug'] ? '*' : ''; + + if (!empty($options['file']) && is_dir($dir = dirname($options['file']))) { + // Build a regexp where the first root dirs are mandatory, + // but every other sub-dir is optional up to the full path in $dir + // Mandate at least 2 root dirs and not more that 5 optional dirs. + + $dir = explode(DIRECTORY_SEPARATOR, realpath($dir)); + $i = count($dir); + + if (3 <= $i) { + $regex = ''; + $lastOptionalDir = $i > 8 ? $i - 5 : 3; + $this->targetDirMaxMatches = $i - $lastOptionalDir; + + while (--$i >= $lastOptionalDir) { + $regex = sprintf('(%s%s)?', preg_quote(DIRECTORY_SEPARATOR.$dir[$i], '#'), $regex); + } + + do { + $regex = preg_quote(DIRECTORY_SEPARATOR.$dir[$i], '#').$regex; + } while (0 < --$i); + + $this->targetDirRegex = '#'.preg_quote($dir[0], '#').$regex.'#'; + } + } + + $code = $this->startClass($options['class'], $options['base_class'], $options['namespace']); + + if ($this->container->isFrozen()) { + $code .= $this->addFrozenConstructor(); + $code .= $this->addFrozenCompile(); + $code .= $this->addIsFrozenMethod(); + } else { + $code .= $this->addConstructor(); + } + + $code .= + $this->addServices(). + $this->addDefaultParametersMethod(). + $this->endClass(). + $this->addProxyClasses() + ; + $this->targetDirRegex = null; + + $unusedEnvs = array(); + foreach ($this->container->getEnvCounters() as $env => $use) { + if (!$use) { + $unusedEnvs[] = $env; + } + } + if ($unusedEnvs) { + throw new EnvParameterException($unusedEnvs); + } + + return $code; + } + + /** + * Retrieves the currently set proxy dumper or instantiates one. + * + * @return ProxyDumper + */ + private function getProxyDumper() + { + if (!$this->proxyDumper) { + $this->proxyDumper = new NullDumper(); + } + + return $this->proxyDumper; + } + + /** + * Generates Service local temp variables. + * + * @param string $cId + * @param string $definition + * + * @return string + */ + private function addServiceLocalTempVariables($cId, $definition) + { + static $template = " \$%s = %s;\n"; + + $localDefinitions = array_merge( + array($definition), + $this->getInlinedDefinitions($definition) + ); + + $calls = $behavior = array(); + foreach ($localDefinitions as $iDefinition) { + $this->getServiceCallsFromArguments($iDefinition->getArguments(), $calls, $behavior); + $this->getServiceCallsFromArguments($iDefinition->getMethodCalls(), $calls, $behavior); + $this->getServiceCallsFromArguments($iDefinition->getProperties(), $calls, $behavior); + $this->getServiceCallsFromArguments(array($iDefinition->getConfigurator()), $calls, $behavior); + $this->getServiceCallsFromArguments(array($iDefinition->getFactory()), $calls, $behavior); + } + + $code = ''; + foreach ($calls as $id => $callCount) { + if ('service_container' === $id || $id === $cId) { + continue; + } + + if ($callCount > 1) { + $name = $this->getNextVariableName(); + $this->referenceVariables[$id] = new Variable($name); + + if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE === $behavior[$id]) { + $code .= sprintf($template, $name, $this->getServiceCall($id)); + } else { + $code .= sprintf($template, $name, $this->getServiceCall($id, new Reference($id, ContainerInterface::NULL_ON_INVALID_REFERENCE))); + } + } + } + + if ('' !== $code) { + $code .= "\n"; + } + + return $code; + } + + /** + * Generates code for the proxies to be attached after the container class. + * + * @return string + */ + private function addProxyClasses() + { + /* @var $definitions Definition[] */ + $definitions = array_filter( + $this->container->getDefinitions(), + array($this->getProxyDumper(), 'isProxyCandidate') + ); + $code = ''; + $strip = '' === $this->docStar && method_exists('Symfony\Component\HttpKernel\Kernel', 'stripComments'); + + foreach ($definitions as $definition) { + $proxyCode = "\n".$this->getProxyDumper()->getProxyCode($definition); + if ($strip) { + $proxyCode = "getFile()) { + $code .= sprintf($template, $this->dumpValue($file)); + } + + foreach ($this->getInlinedDefinitions($definition) as $definition) { + if (null !== $file = $definition->getFile()) { + $code .= sprintf($template, $this->dumpValue($file)); + } + } + + if ('' !== $code) { + $code .= "\n"; + } + + return $code; + } + + /** + * Generates the inline definition of a service. + * + * @param string $id + * @param Definition $definition + * + * @return string + * + * @throws RuntimeException When the factory definition is incomplete + * @throws ServiceCircularReferenceException When a circular reference is detected + */ + private function addServiceInlinedDefinitions($id, $definition) + { + $code = ''; + $variableMap = $this->definitionVariables; + $nbOccurrences = new \SplObjectStorage(); + $processed = new \SplObjectStorage(); + $inlinedDefinitions = $this->getInlinedDefinitions($definition); + + foreach ($inlinedDefinitions as $definition) { + if (false === $nbOccurrences->contains($definition)) { + $nbOccurrences->offsetSet($definition, 1); + } else { + $i = $nbOccurrences->offsetGet($definition); + $nbOccurrences->offsetSet($definition, $i + 1); + } + } + + foreach ($inlinedDefinitions as $sDefinition) { + if ($processed->contains($sDefinition)) { + continue; + } + $processed->offsetSet($sDefinition); + + $class = $this->dumpValue($sDefinition->getClass()); + if ($nbOccurrences->offsetGet($sDefinition) > 1 || $sDefinition->getMethodCalls() || $sDefinition->getProperties() || null !== $sDefinition->getConfigurator() || false !== strpos($class, '$')) { + $name = $this->getNextVariableName(); + $variableMap->offsetSet($sDefinition, new Variable($name)); + + // a construct like: + // $a = new ServiceA(ServiceB $b); $b = new ServiceB(ServiceA $a); + // this is an indication for a wrong implementation, you can circumvent this problem + // by setting up your service structure like this: + // $b = new ServiceB(); + // $a = new ServiceA(ServiceB $b); + // $b->setServiceA(ServiceA $a); + if ($this->hasReference($id, $sDefinition->getArguments())) { + throw new ServiceCircularReferenceException($id, array($id)); + } + + $code .= $this->addNewInstance($sDefinition, '$'.$name, ' = ', $id); + + if (!$this->hasReference($id, $sDefinition->getMethodCalls(), true) && !$this->hasReference($id, $sDefinition->getProperties(), true)) { + $code .= $this->addServiceProperties(null, $sDefinition, $name); + $code .= $this->addServiceMethodCalls(null, $sDefinition, $name); + $code .= $this->addServiceConfigurator(null, $sDefinition, $name); + } + + $code .= "\n"; + } + } + + return $code; + } + + /** + * Adds the service return statement. + * + * @param string $id Service id + * @param Definition $definition + * + * @return string + */ + private function addServiceReturn($id, $definition) + { + if ($this->isSimpleInstance($id, $definition)) { + return " }\n"; + } + + return "\n return \$instance;\n }\n"; + } + + /** + * Generates the service instance. + * + * @param string $id + * @param Definition $definition + * + * @return string + * + * @throws InvalidArgumentException + * @throws RuntimeException + */ + private function addServiceInstance($id, Definition $definition) + { + $class = $definition->getClass(); + + if ('\\' === substr($class, 0, 1)) { + $class = substr($class, 1); + } + + $class = $this->dumpValue($class); + + if (0 === strpos($class, "'") && false === strpos($class, '$') && !preg_match('/^\'[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(\\\{2}[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*\'$/', $class)) { + throw new InvalidArgumentException(sprintf('"%s" is not a valid class name for the "%s" service.', $class, $id)); + } + + $simple = $this->isSimpleInstance($id, $definition); + $isProxyCandidate = $this->getProxyDumper()->isProxyCandidate($definition); + $instantiation = ''; + + if (!$isProxyCandidate && $definition->isShared()) { + $instantiation = "\$this->services['$id'] = ".($simple ? '' : '$instance'); + } elseif (!$simple) { + $instantiation = '$instance'; + } + + $return = ''; + if ($simple) { + $return = 'return '; + } else { + $instantiation .= ' = '; + } + + $code = $this->addNewInstance($definition, $return, $instantiation, $id); + + if (!$simple) { + $code .= "\n"; + } + + return $code; + } + + /** + * Checks if the definition is a simple instance. + * + * @param string $id + * @param Definition $definition + * + * @return bool + */ + private function isSimpleInstance($id, Definition $definition) + { + foreach (array_merge(array($definition), $this->getInlinedDefinitions($definition)) as $sDefinition) { + if ($definition !== $sDefinition && !$this->hasReference($id, $sDefinition->getMethodCalls())) { + continue; + } + + if ($sDefinition->getMethodCalls() || $sDefinition->getProperties() || $sDefinition->getConfigurator()) { + return false; + } + } + + return true; + } + + /** + * Adds method calls to a service definition. + * + * @param string $id + * @param Definition $definition + * @param string $variableName + * + * @return string + */ + private function addServiceMethodCalls($id, Definition $definition, $variableName = 'instance') + { + $calls = ''; + foreach ($definition->getMethodCalls() as $call) { + $arguments = array(); + foreach ($call[1] as $value) { + $arguments[] = $this->dumpValue($value); + } + + $calls .= $this->wrapServiceConditionals($call[1], sprintf(" \$%s->%s(%s);\n", $variableName, $call[0], implode(', ', $arguments))); + } + + return $calls; + } + + private function addServiceProperties($id, Definition $definition, $variableName = 'instance') + { + $code = ''; + foreach ($definition->getProperties() as $name => $value) { + $code .= sprintf(" \$%s->%s = %s;\n", $variableName, $name, $this->dumpValue($value)); + } + + return $code; + } + + /** + * Generates the inline definition setup. + * + * @param string $id + * @param Definition $definition + * + * @return string + * + * @throws ServiceCircularReferenceException when the container contains a circular reference + */ + private function addServiceInlinedDefinitionsSetup($id, Definition $definition) + { + $this->referenceVariables[$id] = new Variable('instance'); + + $code = ''; + $processed = new \SplObjectStorage(); + foreach ($this->getInlinedDefinitions($definition) as $iDefinition) { + if ($processed->contains($iDefinition)) { + continue; + } + $processed->offsetSet($iDefinition); + + if (!$this->hasReference($id, $iDefinition->getMethodCalls(), true) && !$this->hasReference($id, $iDefinition->getProperties(), true)) { + continue; + } + + // if the instance is simple, the return statement has already been generated + // so, the only possible way to get there is because of a circular reference + if ($this->isSimpleInstance($id, $definition)) { + throw new ServiceCircularReferenceException($id, array($id)); + } + + $name = (string) $this->definitionVariables->offsetGet($iDefinition); + $code .= $this->addServiceProperties(null, $iDefinition, $name); + $code .= $this->addServiceMethodCalls(null, $iDefinition, $name); + $code .= $this->addServiceConfigurator(null, $iDefinition, $name); + } + + if ('' !== $code) { + $code .= "\n"; + } + + return $code; + } + + /** + * Adds configurator definition. + * + * @param string $id + * @param Definition $definition + * @param string $variableName + * + * @return string + */ + private function addServiceConfigurator($id, Definition $definition, $variableName = 'instance') + { + if (!$callable = $definition->getConfigurator()) { + return ''; + } + + if (is_array($callable)) { + if ($callable[0] instanceof Reference + || ($callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0]))) { + return sprintf(" %s->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); + } + + $class = $this->dumpValue($callable[0]); + // If the class is a string we can optimize call_user_func away + if (0 === strpos($class, "'") && false === strpos($class, '$')) { + return sprintf(" %s::%s(\$%s);\n", $this->dumpLiteralClass($class), $callable[1], $variableName); + } + + if (0 === strpos($class, 'new ')) { + return sprintf(" (%s)->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); + } + + return sprintf(" call_user_func(array(%s, '%s'), \$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); + } + + return sprintf(" %s(\$%s);\n", $callable, $variableName); + } + + /** + * Adds a service. + * + * @param string $id + * @param Definition $definition + * + * @return string + */ + private function addService($id, Definition $definition) + { + $this->definitionVariables = new \SplObjectStorage(); + $this->referenceVariables = array(); + $this->variableCount = 0; + + $return = array(); + + if ($definition->isSynthetic()) { + $return[] = '@throws RuntimeException always since this service is expected to be injected dynamically'; + } elseif ($class = $definition->getClass()) { + $class = $this->container->resolveEnvPlaceholders($class); + $return[] = sprintf('@return %s A %s instance', 0 === strpos($class, '%') ? 'object' : '\\'.ltrim($class, '\\'), ltrim($class, '\\')); + } elseif ($definition->getFactory()) { + $factory = $definition->getFactory(); + if (is_string($factory)) { + $return[] = sprintf('@return object An instance returned by %s()', $factory); + } elseif (is_array($factory) && (is_string($factory[0]) || $factory[0] instanceof Definition || $factory[0] instanceof Reference)) { + if (is_string($factory[0]) || $factory[0] instanceof Reference) { + $return[] = sprintf('@return object An instance returned by %s::%s()', (string) $factory[0], $factory[1]); + } elseif ($factory[0] instanceof Definition) { + $return[] = sprintf('@return object An instance returned by %s::%s()', $factory[0]->getClass(), $factory[1]); + } + } + } + + if ($definition->isDeprecated()) { + if ($return && 0 === strpos($return[count($return) - 1], '@return')) { + $return[] = ''; + } + + $return[] = sprintf('@deprecated %s', $definition->getDeprecationMessage($id)); + } + + $return = str_replace("\n * \n", "\n *\n", implode("\n * ", $return)); + $return = $this->container->resolveEnvPlaceholders($return); + + $doc = ''; + if ($definition->isShared()) { + $doc .= <<<'EOF' + + * + * This service is shared. + * This method always returns the same instance of the service. +EOF; + } + + if (!$definition->isPublic()) { + $doc .= <<<'EOF' + + * + * This service is private. + * If you want to be able to request this service from the container directly, + * make it public, otherwise you might end up with broken code. +EOF; + } + + if ($definition->isAutowired()) { + $doc = <<isLazy()) { + $lazyInitialization = '$lazyLoad = true'; + $lazyInitializationDoc = "\n * @param bool \$lazyLoad whether to try lazy-loading the service with a proxy\n *"; + } else { + $lazyInitialization = ''; + $lazyInitializationDoc = ''; + } + + // with proxies, for 5.3.3 compatibility, the getter must be public to be accessible to the initializer + $isProxyCandidate = $this->getProxyDumper()->isProxyCandidate($definition); + $visibility = $isProxyCandidate ? 'public' : 'protected'; + $methodName = $this->generateMethodName($id); + $code = <<docStar} + * Gets the '$id' service.$doc + *$lazyInitializationDoc + * $return + */ + {$visibility} function {$methodName}($lazyInitialization) + { + +EOF; + + $code .= $isProxyCandidate ? $this->getProxyDumper()->getProxyFactoryCode($definition, $id, $methodName) : ''; + + if ($definition->isSynthetic()) { + $code .= sprintf(" throw new RuntimeException('You have requested a synthetic service (\"%s\"). The DIC does not know how to construct this service.');\n }\n", $id); + } else { + if ($definition->isDeprecated()) { + $code .= sprintf(" @trigger_error(%s, E_USER_DEPRECATED);\n\n", $this->export($definition->getDeprecationMessage($id))); + } + + $code .= + $this->addServiceInclude($id, $definition). + $this->addServiceLocalTempVariables($id, $definition). + $this->addServiceInlinedDefinitions($id, $definition). + $this->addServiceInstance($id, $definition). + $this->addServiceInlinedDefinitionsSetup($id, $definition). + $this->addServiceProperties($id, $definition). + $this->addServiceMethodCalls($id, $definition). + $this->addServiceConfigurator($id, $definition). + $this->addServiceReturn($id, $definition) + ; + } + + $this->definitionVariables = null; + $this->referenceVariables = null; + + return $code; + } + + /** + * Adds multiple services. + * + * @return string + */ + private function addServices() + { + $publicServices = $privateServices = ''; + $definitions = $this->container->getDefinitions(); + ksort($definitions); + foreach ($definitions as $id => $definition) { + if ($definition->isPublic()) { + $publicServices .= $this->addService($id, $definition); + } else { + $privateServices .= $this->addService($id, $definition); + } + } + + return $publicServices.$privateServices; + } + + private function addNewInstance(Definition $definition, $return, $instantiation, $id) + { + $class = $this->dumpValue($definition->getClass()); + + $arguments = array(); + foreach ($definition->getArguments() as $value) { + $arguments[] = $this->dumpValue($value); + } + + if (null !== $definition->getFactory()) { + $callable = $definition->getFactory(); + if (is_array($callable)) { + if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $callable[1])) { + throw new RuntimeException(sprintf('Cannot dump definition because of invalid factory method (%s)', $callable[1] ?: 'n/a')); + } + + if ($callable[0] instanceof Reference + || ($callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0]))) { + return sprintf(" $return{$instantiation}%s->%s(%s);\n", $this->dumpValue($callable[0]), $callable[1], $arguments ? implode(', ', $arguments) : ''); + } + + $class = $this->dumpValue($callable[0]); + // If the class is a string we can optimize call_user_func away + if (0 === strpos($class, "'") && false === strpos($class, '$')) { + if ("''" === $class) { + throw new RuntimeException(sprintf('Cannot dump definition: The "%s" service is defined to be created by a factory but is missing the service reference, did you forget to define the factory service id or class?', $id)); + } + + return sprintf(" $return{$instantiation}%s::%s(%s);\n", $this->dumpLiteralClass($class), $callable[1], $arguments ? implode(', ', $arguments) : ''); + } + + if (0 === strpos($class, 'new ')) { + return sprintf(" $return{$instantiation}(%s)->%s(%s);\n", $this->dumpValue($callable[0]), $callable[1], $arguments ? implode(', ', $arguments) : ''); + } + + return sprintf(" $return{$instantiation}call_user_func(array(%s, '%s')%s);\n", $this->dumpValue($callable[0]), $callable[1], $arguments ? ', '.implode(', ', $arguments) : ''); + } + + return sprintf(" $return{$instantiation}%s(%s);\n", $this->dumpLiteralClass($this->dumpValue($callable)), $arguments ? implode(', ', $arguments) : ''); + } + + if (false !== strpos($class, '$')) { + return sprintf(" \$class = %s;\n\n $return{$instantiation}new \$class(%s);\n", $class, implode(', ', $arguments)); + } + + return sprintf(" $return{$instantiation}new %s(%s);\n", $this->dumpLiteralClass($class), implode(', ', $arguments)); + } + + /** + * Adds the class headers. + * + * @param string $class Class name + * @param string $baseClass The name of the base class + * @param string $namespace The class namespace + * + * @return string + */ + private function startClass($class, $baseClass, $namespace) + { + $bagClass = $this->container->isFrozen() ? 'use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;' : 'use Symfony\Component\DependencyInjection\ParameterBag\\ParameterBag;'; + $namespaceLine = $namespace ? "namespace $namespace;\n" : ''; + + return <<docStar} + * $class. + * + * This class has been auto-generated + * by the Symfony Dependency Injection Component. + */ +class $class extends $baseClass +{ + private \$parameters; + private \$targetDirs = array(); + +EOF; + } + + /** + * Adds the constructor. + * + * @return string + */ + private function addConstructor() + { + $targetDirs = $this->exportTargetDirs(); + $arguments = $this->container->getParameterBag()->all() ? 'new ParameterBag($this->getDefaultParameters())' : null; + + $code = <<docStar} + * Constructor. + */ + public function __construct() + {{$targetDirs} + parent::__construct($arguments); + +EOF; + + $code .= $this->addMethodMap(); + $code .= $this->addPrivateServices(); + $code .= $this->addAliases(); + + $code .= <<<'EOF' + } + +EOF; + + return $code; + } + + /** + * Adds the constructor for a frozen container. + * + * @return string + */ + private function addFrozenConstructor() + { + $targetDirs = $this->exportTargetDirs(); + + $code = <<docStar} + * Constructor. + */ + public function __construct() + {{$targetDirs} +EOF; + + if ($this->container->getParameterBag()->all()) { + $code .= "\n \$this->parameters = \$this->getDefaultParameters();\n"; + } + + $code .= "\n \$this->services = array();\n"; + $code .= $this->addMethodMap(); + $code .= $this->addPrivateServices(); + $code .= $this->addAliases(); + + $code .= <<<'EOF' + } + +EOF; + + return $code; + } + + /** + * Adds the constructor for a frozen container. + * + * @return string + */ + private function addFrozenCompile() + { + return <<docStar} + * {@inheritdoc} + */ + public function compile() + { + throw new LogicException('You cannot compile a dumped frozen container.'); + } + +EOF; + } + + /** + * Adds the isFrozen method for a frozen container. + * + * @return string + */ + private function addIsFrozenMethod() + { + return <<docStar} + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + +EOF; + } + + /** + * Adds the methodMap property definition. + * + * @return string + */ + private function addMethodMap() + { + if (!$definitions = $this->container->getDefinitions()) { + return ''; + } + + $code = " \$this->methodMap = array(\n"; + ksort($definitions); + foreach ($definitions as $id => $definition) { + $code .= ' '.$this->export($id).' => '.$this->export($this->generateMethodName($id)).",\n"; + } + + return $code." );\n"; + } + + /** + * Adds the privates property definition. + * + * @return string + */ + private function addPrivateServices() + { + if (!$definitions = $this->container->getDefinitions()) { + return ''; + } + + $code = ''; + ksort($definitions); + foreach ($definitions as $id => $definition) { + if (!$definition->isPublic()) { + $code .= ' '.$this->export($id)." => true,\n"; + } + } + + if (empty($code)) { + return ''; + } + + $out = " \$this->privates = array(\n"; + $out .= $code; + $out .= " );\n"; + + return $out; + } + + /** + * Adds the aliases property definition. + * + * @return string + */ + private function addAliases() + { + if (!$aliases = $this->container->getAliases()) { + return $this->container->isFrozen() ? "\n \$this->aliases = array();\n" : ''; + } + + $code = " \$this->aliases = array(\n"; + ksort($aliases); + foreach ($aliases as $alias => $id) { + $id = (string) $id; + while (isset($aliases[$id])) { + $id = (string) $aliases[$id]; + } + $code .= ' '.$this->export($alias).' => '.$this->export($id).",\n"; + } + + return $code." );\n"; + } + + /** + * Adds default parameters method. + * + * @return string + */ + private function addDefaultParametersMethod() + { + if (!$this->container->getParameterBag()->all()) { + return ''; + } + + $php = array(); + $dynamicPhp = array(); + + foreach ($this->container->getParameterBag()->all() as $key => $value) { + if ($key !== $resolvedKey = $this->container->resolveEnvPlaceholders($key)) { + throw new InvalidArgumentException(sprintf('Parameter name cannot use env parameters: %s.', $resolvedKey)); + } + $export = $this->exportParameters(array($value)); + $export = explode('0 => ', substr(rtrim($export, " )\n"), 7, -1), 2); + + if (preg_match("/\\\$this->(?:getEnv\('\w++'\)|targetDirs\[\d++\])/", $export[1])) { + $dynamicPhp[$key] = sprintf('%scase %s: $value = %s; break;', $export[0], $this->export($key), $export[1]); + } else { + $php[] = sprintf('%s%s => %s,', $export[0], $this->export($key), $export[1]); + } + } + $parameters = sprintf("array(\n%s\n%s)", implode("\n", $php), str_repeat(' ', 8)); + + $code = ''; + if ($this->container->isFrozen()) { + $code .= <<<'EOF' + + /** + * {@inheritdoc} + */ + public function getParameter($name) + { + $name = strtolower($name); + + if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters) || isset($this->loadedDynamicParameters[$name]))) { + throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); + } + if (isset($this->loadedDynamicParameters[$name])) { + return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } + + return $this->parameters[$name]; + } + + /** + * {@inheritdoc} + */ + public function hasParameter($name) + { + $name = strtolower($name); + + return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters) || isset($this->loadedDynamicParameters[$name]); + } + + /** + * {@inheritdoc} + */ + public function setParameter($name, $value) + { + throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); + } + + /** + * {@inheritdoc} + */ + public function getParameterBag() + { + if (null === $this->parameterBag) { + $parameters = $this->parameters; + foreach ($this->loadedDynamicParameters as $name => $loaded) { + $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } + $this->parameterBag = new FrozenParameterBag($parameters); + } + + return $this->parameterBag; + } + +EOF; + if ('' === $this->docStar) { + $code = str_replace('/**', '/*', $code); + } + + if ($dynamicPhp) { + $loadedDynamicParameters = $this->exportParameters(array_combine(array_keys($dynamicPhp), array_fill(0, count($dynamicPhp), false)), '', 8); + $getDynamicParameter = <<<'EOF' + switch ($name) { +%s + default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%%s" must be defined.', $name)); + } + $this->loadedDynamicParameters[$name] = true; + + return $this->dynamicParameters[$name] = $value; +EOF; + $getDynamicParameter = sprintf($getDynamicParameter, implode("\n", $dynamicPhp)); + } else { + $loadedDynamicParameters = 'array()'; + $getDynamicParameter = str_repeat(' ', 8).'throw new InvalidArgumentException(sprintf(\'The dynamic parameter "%s" must be defined.\', $name));'; + } + + $code .= <<docStar} + * Computes a dynamic parameter. + * + * @param string The name of the dynamic parameter to load + * + * @return mixed The value of the dynamic parameter + * + * @throws InvalidArgumentException When the dynamic parameter does not exist + */ + private function getDynamicParameter(\$name) + { +{$getDynamicParameter} + } + +EOF; + } elseif ($dynamicPhp) { + throw new RuntimeException('You cannot dump a not-frozen container with dynamic parameters.'); + } + + $code .= <<docStar} + * Gets the default parameters. + * + * @return array An array of the default parameters + */ + protected function getDefaultParameters() + { + return $parameters; + } + +EOF; + + return $code; + } + + /** + * Exports parameters. + * + * @param array $parameters + * @param string $path + * @param int $indent + * + * @return string + * + * @throws InvalidArgumentException + */ + private function exportParameters(array $parameters, $path = '', $indent = 12) + { + $php = array(); + foreach ($parameters as $key => $value) { + if (is_array($value)) { + $value = $this->exportParameters($value, $path.'/'.$key, $indent + 4); + } elseif ($value instanceof Variable) { + throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain variable references. Variable "%s" found in "%s".', $value, $path.'/'.$key)); + } elseif ($value instanceof Definition) { + throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain service definitions. Definition for "%s" found in "%s".', $value->getClass(), $path.'/'.$key)); + } elseif ($value instanceof Reference) { + throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain references to other services (reference to service "%s" found in "%s").', $value, $path.'/'.$key)); + } elseif ($value instanceof Expression) { + throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain expressions. Expression "%s" found in "%s".', $value, $path.'/'.$key)); + } else { + $value = $this->export($value); + } + + $php[] = sprintf('%s%s => %s,', str_repeat(' ', $indent), $this->export($key), $value); + } + + return sprintf("array(\n%s\n%s)", implode("\n", $php), str_repeat(' ', $indent - 4)); + } + + /** + * Ends the class definition. + * + * @return string + */ + private function endClass() + { + return <<<'EOF' +} + +EOF; + } + + /** + * Wraps the service conditionals. + * + * @param string $value + * @param string $code + * + * @return string + */ + private function wrapServiceConditionals($value, $code) + { + if (!$services = ContainerBuilder::getServiceConditionals($value)) { + return $code; + } + + $conditions = array(); + foreach ($services as $service) { + $conditions[] = sprintf("\$this->has('%s')", $service); + } + + // re-indent the wrapped code + $code = implode("\n", array_map(function ($line) { return $line ? ' '.$line : $line; }, explode("\n", $code))); + + return sprintf(" if (%s) {\n%s }\n", implode(' && ', $conditions), $code); + } + + /** + * Builds service calls from arguments. + * + * @param array $arguments + * @param array &$calls By reference + * @param array &$behavior By reference + */ + private function getServiceCallsFromArguments(array $arguments, array &$calls, array &$behavior) + { + foreach ($arguments as $argument) { + if (is_array($argument)) { + $this->getServiceCallsFromArguments($argument, $calls, $behavior); + } elseif ($argument instanceof Reference) { + $id = (string) $argument; + + if (!isset($calls[$id])) { + $calls[$id] = 0; + } + if (!isset($behavior[$id])) { + $behavior[$id] = $argument->getInvalidBehavior(); + } elseif (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $behavior[$id]) { + $behavior[$id] = $argument->getInvalidBehavior(); + } + + ++$calls[$id]; + } + } + } + + /** + * Returns the inline definition. + * + * @param Definition $definition + * + * @return array + */ + private function getInlinedDefinitions(Definition $definition) + { + if (false === $this->inlinedDefinitions->contains($definition)) { + $definitions = array_merge( + $this->getDefinitionsFromArguments($definition->getArguments()), + $this->getDefinitionsFromArguments($definition->getMethodCalls()), + $this->getDefinitionsFromArguments($definition->getProperties()), + $this->getDefinitionsFromArguments(array($definition->getConfigurator())), + $this->getDefinitionsFromArguments(array($definition->getFactory())) + ); + + $this->inlinedDefinitions->offsetSet($definition, $definitions); + + return $definitions; + } + + return $this->inlinedDefinitions->offsetGet($definition); + } + + /** + * Gets the definition from arguments. + * + * @param array $arguments + * + * @return array + */ + private function getDefinitionsFromArguments(array $arguments) + { + $definitions = array(); + foreach ($arguments as $argument) { + if (is_array($argument)) { + $definitions = array_merge($definitions, $this->getDefinitionsFromArguments($argument)); + } elseif ($argument instanceof Definition) { + $definitions = array_merge( + $definitions, + $this->getInlinedDefinitions($argument), + array($argument) + ); + } + } + + return $definitions; + } + + /** + * Checks if a service id has a reference. + * + * @param string $id + * @param array $arguments + * @param bool $deep + * @param array $visited + * + * @return bool + */ + private function hasReference($id, array $arguments, $deep = false, array &$visited = array()) + { + foreach ($arguments as $argument) { + if (is_array($argument)) { + if ($this->hasReference($id, $argument, $deep, $visited)) { + return true; + } + } elseif ($argument instanceof Reference) { + $argumentId = (string) $argument; + if ($id === $argumentId) { + return true; + } + + if ($deep && !isset($visited[$argumentId]) && 'service_container' !== $argumentId) { + $visited[$argumentId] = true; + + $service = $this->container->getDefinition($argumentId); + + // if the proxy manager is enabled, disable searching for references in lazy services, + // as these services will be instantiated lazily and don't have direct related references. + if ($service->isLazy() && !$this->getProxyDumper() instanceof NullDumper) { + continue; + } + + $arguments = array_merge($service->getMethodCalls(), $service->getArguments(), $service->getProperties()); + + if ($this->hasReference($id, $arguments, $deep, $visited)) { + return true; + } + } + } + } + + return false; + } + + /** + * Dumps values. + * + * @param mixed $value + * @param bool $interpolate + * + * @return string + * + * @throws RuntimeException + */ + private function dumpValue($value, $interpolate = true) + { + if (is_array($value)) { + $code = array(); + foreach ($value as $k => $v) { + $code[] = sprintf('%s => %s', $this->dumpValue($k, $interpolate), $this->dumpValue($v, $interpolate)); + } + + return sprintf('array(%s)', implode(', ', $code)); + } elseif ($value instanceof Definition) { + if (null !== $this->definitionVariables && $this->definitionVariables->contains($value)) { + return $this->dumpValue($this->definitionVariables->offsetGet($value), $interpolate); + } + if (count($value->getMethodCalls()) > 0) { + throw new RuntimeException('Cannot dump definitions which have method calls.'); + } + if (null !== $value->getConfigurator()) { + throw new RuntimeException('Cannot dump definitions which have a configurator.'); + } + + $arguments = array(); + foreach ($value->getArguments() as $argument) { + $arguments[] = $this->dumpValue($argument); + } + + if (null !== $value->getFactory()) { + $factory = $value->getFactory(); + + if (is_string($factory)) { + return sprintf('%s(%s)', $this->dumpLiteralClass($this->dumpValue($factory)), implode(', ', $arguments)); + } + + if (is_array($factory)) { + if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $factory[1])) { + throw new RuntimeException(sprintf('Cannot dump definition because of invalid factory method (%s)', $factory[1] ?: 'n/a')); + } + + if (is_string($factory[0])) { + return sprintf('%s::%s(%s)', $this->dumpLiteralClass($this->dumpValue($factory[0])), $factory[1], implode(', ', $arguments)); + } + + if ($factory[0] instanceof Definition) { + return sprintf("call_user_func(array(%s, '%s')%s)", $this->dumpValue($factory[0]), $factory[1], count($arguments) > 0 ? ', '.implode(', ', $arguments) : ''); + } + + if ($factory[0] instanceof Reference) { + return sprintf('%s->%s(%s)', $this->dumpValue($factory[0]), $factory[1], implode(', ', $arguments)); + } + } + + throw new RuntimeException('Cannot dump definition because of invalid factory'); + } + + $class = $value->getClass(); + if (null === $class) { + throw new RuntimeException('Cannot dump definitions which have no class nor factory.'); + } + + return sprintf('new %s(%s)', $this->dumpLiteralClass($this->dumpValue($class)), implode(', ', $arguments)); + } elseif ($value instanceof Variable) { + return '$'.$value; + } elseif ($value instanceof Reference) { + if (null !== $this->referenceVariables && isset($this->referenceVariables[$id = (string) $value])) { + return $this->dumpValue($this->referenceVariables[$id], $interpolate); + } + + return $this->getServiceCall((string) $value, $value); + } elseif ($value instanceof Expression) { + return $this->getExpressionLanguage()->compile((string) $value, array('this' => 'container')); + } elseif ($value instanceof Parameter) { + return $this->dumpParameter($value); + } elseif (true === $interpolate && is_string($value)) { + if (preg_match('/^%([^%]+)%$/', $value, $match)) { + // we do this to deal with non string values (Boolean, integer, ...) + // the preg_replace_callback converts them to strings + return $this->dumpParameter(strtolower($match[1])); + } else { + $replaceParameters = function ($match) { + return "'.".$this->dumpParameter(strtolower($match[2])).".'"; + }; + + $code = str_replace('%%', '%', preg_replace_callback('/(?export($value))); + + return $code; + } + } elseif (is_object($value) || is_resource($value)) { + throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.'); + } + + return $this->export($value); + } + + /** + * Dumps a string to a literal (aka PHP Code) class value. + * + * @param string $class + * + * @return string + * + * @throws RuntimeException + */ + private function dumpLiteralClass($class) + { + if (false !== strpos($class, '$')) { + return sprintf('${($_ = %s) && false ?: "_"}', $class); + } + if (0 !== strpos($class, "'") || !preg_match('/^\'[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(\\\{2}[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*\'$/', $class)) { + throw new RuntimeException(sprintf('Cannot dump definition because of invalid class name (%s)', $class ?: 'n/a')); + } + + return '\\'.substr(str_replace('\\\\', '\\', $class), 1, -1); + } + + /** + * Dumps a parameter. + * + * @param string $name + * + * @return string + */ + private function dumpParameter($name) + { + if ($this->container->isFrozen() && $this->container->hasParameter($name)) { + return $this->dumpValue($this->container->getParameter($name), false); + } + + return sprintf("\$this->getParameter('%s')", strtolower($name)); + } + + /** + * Gets a service call. + * + * @param string $id + * @param Reference $reference + * + * @return string + */ + private function getServiceCall($id, Reference $reference = null) + { + if ('service_container' === $id) { + return '$this'; + } + + if ($this->container->hasDefinition($id) && !$this->container->getDefinition($id)->isPublic()) { + // The following is PHP 5.5 syntax for what could be written as "(\$this->services['$id'] ?? \$this->{$this->generateMethodName($id)}())" on PHP>=7.0 + + return "\${(\$_ = isset(\$this->services['$id']) ? \$this->services['$id'] : \$this->{$this->generateMethodName($id)}()) && false ?: '_'}"; + } + if (null !== $reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $reference->getInvalidBehavior()) { + return sprintf('$this->get(\'%s\', ContainerInterface::NULL_ON_INVALID_REFERENCE)', $id); + } + + if ($this->container->hasAlias($id)) { + $id = (string) $this->container->getAlias($id); + } + + return sprintf('$this->get(\'%s\')', $id); + } + + /** + * Initializes the method names map to avoid conflicts with the Container methods. + * + * @param string $class the container base class + */ + private function initializeMethodNamesMap($class) + { + $this->serviceIdToMethodNameMap = array(); + $this->usedMethodNames = array(); + + try { + $reflectionClass = new \ReflectionClass($class); + foreach ($reflectionClass->getMethods() as $method) { + $this->usedMethodNames[strtolower($method->getName())] = true; + } + } catch (\ReflectionException $e) { + } + } + + /** + * Convert a service id to a valid PHP method name. + * + * @param string $id + * + * @return string + * + * @throws InvalidArgumentException + */ + private function generateMethodName($id) + { + if (isset($this->serviceIdToMethodNameMap[$id])) { + return $this->serviceIdToMethodNameMap[$id]; + } + + $name = Container::camelize($id); + $name = preg_replace('/[^a-zA-Z0-9_\x7f-\xff]/', '', $name); + $methodName = 'get'.$name.'Service'; + $suffix = 1; + + while (isset($this->usedMethodNames[strtolower($methodName)])) { + ++$suffix; + $methodName = 'get'.$name.$suffix.'Service'; + } + + $this->serviceIdToMethodNameMap[$id] = $methodName; + $this->usedMethodNames[strtolower($methodName)] = true; + + return $methodName; + } + + /** + * Returns the next name to use. + * + * @return string + */ + private function getNextVariableName() + { + $firstChars = self::FIRST_CHARS; + $firstCharsLength = strlen($firstChars); + $nonFirstChars = self::NON_FIRST_CHARS; + $nonFirstCharsLength = strlen($nonFirstChars); + + while (true) { + $name = ''; + $i = $this->variableCount; + + if ('' === $name) { + $name .= $firstChars[$i % $firstCharsLength]; + $i = (int) ($i / $firstCharsLength); + } + + while ($i > 0) { + --$i; + $name .= $nonFirstChars[$i % $nonFirstCharsLength]; + $i = (int) ($i / $nonFirstCharsLength); + } + + ++$this->variableCount; + + // check that the name is not reserved + if (in_array($name, $this->reservedVariables, true)) { + continue; + } + + return $name; + } + } + + private function getExpressionLanguage() + { + if (null === $this->expressionLanguage) { + if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) { + throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); + } + $providers = $this->container->getExpressionLanguageProviders(); + $this->expressionLanguage = new ExpressionLanguage(null, $providers); + + if ($this->container->isTrackingResources()) { + foreach ($providers as $provider) { + $this->container->addObjectResource($provider); + } + } + } + + return $this->expressionLanguage; + } + + private function exportTargetDirs() + { + return null === $this->targetDirRegex ? '' : <<targetDirMaxMatches}; ++\$i) { + \$this->targetDirs[\$i] = \$dir = dirname(\$dir); + } +EOF; + } + + private function export($value) + { + if (null !== $this->targetDirRegex && is_string($value) && preg_match($this->targetDirRegex, $value, $matches, PREG_OFFSET_CAPTURE)) { + $prefix = $matches[0][1] ? $this->doExport(substr($value, 0, $matches[0][1])).'.' : ''; + $suffix = $matches[0][1] + strlen($matches[0][0]); + $suffix = isset($value[$suffix]) ? '.'.$this->doExport(substr($value, $suffix)) : ''; + $dirname = '__DIR__'; + + if (0 < $offset = 1 + $this->targetDirMaxMatches - count($matches)) { + $dirname = sprintf('$this->targetDirs[%d]', $offset); + } + + if ($prefix || $suffix) { + return sprintf('(%s%s%s)', $prefix, $dirname, $suffix); + } + + return $dirname; + } + + return $this->doExport($value); + } + + private function doExport($value) + { + $export = var_export($value, true); + + if ("'" === $export[0] && $export !== $resolvedExport = $this->container->resolveEnvPlaceholders($export, "'.\$this->getEnv('%s').'")) { + $export = $resolvedExport; + if ("'" === $export[1]) { + $export = substr($export, 3); + } + if (".''" === substr($export, -3)) { + $export = substr($export, 0, -3); + } + } + + return $export; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..c3a98720a3a7c3c964d760007d840708231bb207 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php @@ -0,0 +1,362 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Dumper; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Parameter; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\ExpressionLanguage\Expression; + +/** + * XmlDumper dumps a service container as an XML string. + * + * @author Fabien Potencier + * @author Martin Hasoň + */ +class XmlDumper extends Dumper +{ + /** + * @var \DOMDocument + */ + private $document; + + /** + * Dumps the service container as an XML string. + * + * @param array $options An array of options + * + * @return string An xml string representing of the service container + */ + public function dump(array $options = array()) + { + $this->document = new \DOMDocument('1.0', 'utf-8'); + $this->document->formatOutput = true; + + $container = $this->document->createElementNS('http://symfony.com/schema/dic/services', 'container'); + $container->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); + $container->setAttribute('xsi:schemaLocation', 'http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd'); + + $this->addParameters($container); + $this->addServices($container); + + $this->document->appendChild($container); + $xml = $this->document->saveXML(); + $this->document = null; + + return $this->container->resolveEnvPlaceholders($xml); + } + + /** + * Adds parameters. + * + * @param \DOMElement $parent + */ + private function addParameters(\DOMElement $parent) + { + $data = $this->container->getParameterBag()->all(); + if (!$data) { + return; + } + + if ($this->container->isFrozen()) { + $data = $this->escape($data); + } + + $parameters = $this->document->createElement('parameters'); + $parent->appendChild($parameters); + $this->convertParameters($data, 'parameter', $parameters); + } + + /** + * Adds method calls. + * + * @param array $methodcalls + * @param \DOMElement $parent + */ + private function addMethodCalls(array $methodcalls, \DOMElement $parent) + { + foreach ($methodcalls as $methodcall) { + $call = $this->document->createElement('call'); + $call->setAttribute('method', $methodcall[0]); + if (count($methodcall[1])) { + $this->convertParameters($methodcall[1], 'argument', $call); + } + $parent->appendChild($call); + } + } + + /** + * Adds a service. + * + * @param Definition $definition + * @param string $id + * @param \DOMElement $parent + */ + private function addService($definition, $id, \DOMElement $parent) + { + $service = $this->document->createElement('service'); + if (null !== $id) { + $service->setAttribute('id', $id); + } + if ($class = $definition->getClass()) { + if ('\\' === substr($class, 0, 1)) { + $class = substr($class, 1); + } + + $service->setAttribute('class', $class); + } + if (!$definition->isShared()) { + $service->setAttribute('shared', 'false'); + } + if (!$definition->isPublic()) { + $service->setAttribute('public', 'false'); + } + if ($definition->isSynthetic()) { + $service->setAttribute('synthetic', 'true'); + } + if ($definition->isLazy()) { + $service->setAttribute('lazy', 'true'); + } + if (null !== $decorated = $definition->getDecoratedService()) { + list($decorated, $renamedId, $priority) = $decorated; + $service->setAttribute('decorates', $decorated); + if (null !== $renamedId) { + $service->setAttribute('decoration-inner-name', $renamedId); + } + if (0 !== $priority) { + $service->setAttribute('decoration-priority', $priority); + } + } + + foreach ($definition->getTags() as $name => $tags) { + foreach ($tags as $attributes) { + $tag = $this->document->createElement('tag'); + $tag->setAttribute('name', $name); + foreach ($attributes as $key => $value) { + $tag->setAttribute($key, $value); + } + $service->appendChild($tag); + } + } + + if ($definition->getFile()) { + $file = $this->document->createElement('file'); + $file->appendChild($this->document->createTextNode($definition->getFile())); + $service->appendChild($file); + } + + if ($parameters = $definition->getArguments()) { + $this->convertParameters($parameters, 'argument', $service); + } + + if ($parameters = $definition->getProperties()) { + $this->convertParameters($parameters, 'property', $service, 'name'); + } + + $this->addMethodCalls($definition->getMethodCalls(), $service); + + if ($callable = $definition->getFactory()) { + $factory = $this->document->createElement('factory'); + + if (is_array($callable) && $callable[0] instanceof Definition) { + $this->addService($callable[0], null, $factory); + $factory->setAttribute('method', $callable[1]); + } elseif (is_array($callable)) { + $factory->setAttribute($callable[0] instanceof Reference ? 'service' : 'class', $callable[0]); + $factory->setAttribute('method', $callable[1]); + } else { + $factory->setAttribute('function', $callable); + } + $service->appendChild($factory); + } + + if ($definition->isDeprecated()) { + $deprecated = $this->document->createElement('deprecated'); + $deprecated->appendChild($this->document->createTextNode($definition->getDeprecationMessage('%service_id%'))); + + $service->appendChild($deprecated); + } + + if ($definition->isAutowired()) { + $service->setAttribute('autowire', 'true'); + } + + foreach ($definition->getAutowiringTypes() as $autowiringTypeValue) { + $autowiringType = $this->document->createElement('autowiring-type'); + $autowiringType->appendChild($this->document->createTextNode($autowiringTypeValue)); + + $service->appendChild($autowiringType); + } + + if ($callable = $definition->getConfigurator()) { + $configurator = $this->document->createElement('configurator'); + + if (is_array($callable) && $callable[0] instanceof Definition) { + $this->addService($callable[0], null, $configurator); + $configurator->setAttribute('method', $callable[1]); + } elseif (is_array($callable)) { + $configurator->setAttribute($callable[0] instanceof Reference ? 'service' : 'class', $callable[0]); + $configurator->setAttribute('method', $callable[1]); + } else { + $configurator->setAttribute('function', $callable); + } + $service->appendChild($configurator); + } + + $parent->appendChild($service); + } + + /** + * Adds a service alias. + * + * @param string $alias + * @param Alias $id + * @param \DOMElement $parent + */ + private function addServiceAlias($alias, Alias $id, \DOMElement $parent) + { + $service = $this->document->createElement('service'); + $service->setAttribute('id', $alias); + $service->setAttribute('alias', $id); + if (!$id->isPublic()) { + $service->setAttribute('public', 'false'); + } + $parent->appendChild($service); + } + + /** + * Adds services. + * + * @param \DOMElement $parent + */ + private function addServices(\DOMElement $parent) + { + $definitions = $this->container->getDefinitions(); + if (!$definitions) { + return; + } + + $services = $this->document->createElement('services'); + foreach ($definitions as $id => $definition) { + $this->addService($definition, $id, $services); + } + + $aliases = $this->container->getAliases(); + foreach ($aliases as $alias => $id) { + while (isset($aliases[(string) $id])) { + $id = $aliases[(string) $id]; + } + $this->addServiceAlias($alias, $id, $services); + } + $parent->appendChild($services); + } + + /** + * Converts parameters. + * + * @param array $parameters + * @param string $type + * @param \DOMElement $parent + * @param string $keyAttribute + */ + private function convertParameters(array $parameters, $type, \DOMElement $parent, $keyAttribute = 'key') + { + $withKeys = array_keys($parameters) !== range(0, count($parameters) - 1); + foreach ($parameters as $key => $value) { + $element = $this->document->createElement($type); + if ($withKeys) { + $element->setAttribute($keyAttribute, $key); + } + + if (is_array($value)) { + $element->setAttribute('type', 'collection'); + $this->convertParameters($value, $type, $element, 'key'); + } elseif ($value instanceof Reference) { + $element->setAttribute('type', 'service'); + $element->setAttribute('id', (string) $value); + $behaviour = $value->getInvalidBehavior(); + if ($behaviour == ContainerInterface::NULL_ON_INVALID_REFERENCE) { + $element->setAttribute('on-invalid', 'null'); + } elseif ($behaviour == ContainerInterface::IGNORE_ON_INVALID_REFERENCE) { + $element->setAttribute('on-invalid', 'ignore'); + } + } elseif ($value instanceof Definition) { + $element->setAttribute('type', 'service'); + $this->addService($value, null, $element); + } elseif ($value instanceof Expression) { + $element->setAttribute('type', 'expression'); + $text = $this->document->createTextNode(self::phpToXml((string) $value)); + $element->appendChild($text); + } else { + if (in_array($value, array('null', 'true', 'false'), true)) { + $element->setAttribute('type', 'string'); + } + $text = $this->document->createTextNode(self::phpToXml($value)); + $element->appendChild($text); + } + $parent->appendChild($element); + } + } + + /** + * Escapes arguments. + * + * @param array $arguments + * + * @return array + */ + private function escape(array $arguments) + { + $args = array(); + foreach ($arguments as $k => $v) { + if (is_array($v)) { + $args[$k] = $this->escape($v); + } elseif (is_string($v)) { + $args[$k] = str_replace('%', '%%', $v); + } else { + $args[$k] = $v; + } + } + + return $args; + } + + /** + * Converts php types to xml types. + * + * @param mixed $value Value to convert + * + * @return string + * + * @throws RuntimeException When trying to dump object or resource + */ + public static function phpToXml($value) + { + switch (true) { + case null === $value: + return 'null'; + case true === $value: + return 'true'; + case false === $value: + return 'false'; + case $value instanceof Parameter: + return '%'.$value.'%'; + case is_object($value) || is_resource($value): + throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.'); + default: + return (string) $value; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..6a10371ad8c99fdc75bd282cf665f25f57f28ee4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php @@ -0,0 +1,348 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Dumper; + +use Symfony\Component\Yaml\Dumper as YmlDumper; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Parameter; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\ExpressionLanguage\Expression; + +/** + * YamlDumper dumps a service container as a YAML string. + * + * @author Fabien Potencier + */ +class YamlDumper extends Dumper +{ + private $dumper; + + /** + * Dumps the service container as an YAML string. + * + * @param array $options An array of options + * + * @return string A YAML string representing of the service container + */ + public function dump(array $options = array()) + { + if (!class_exists('Symfony\Component\Yaml\Dumper')) { + throw new RuntimeException('Unable to dump the container as the Symfony Yaml Component is not installed.'); + } + + if (null === $this->dumper) { + $this->dumper = new YmlDumper(); + } + + return $this->container->resolveEnvPlaceholders($this->addParameters()."\n".$this->addServices()); + } + + /** + * Adds a service. + * + * @param string $id + * @param Definition $definition + * + * @return string + */ + private function addService($id, $definition) + { + $code = " $id:\n"; + if ($class = $definition->getClass()) { + if ('\\' === substr($class, 0, 1)) { + $class = substr($class, 1); + } + + $code .= sprintf(" class: %s\n", $this->dumper->dump($class)); + } + + if (!$definition->isPublic()) { + $code .= " public: false\n"; + } + + $tagsCode = ''; + foreach ($definition->getTags() as $name => $tags) { + foreach ($tags as $attributes) { + $att = array(); + foreach ($attributes as $key => $value) { + $att[] = sprintf('%s: %s', $this->dumper->dump($key), $this->dumper->dump($value)); + } + $att = $att ? ', '.implode(', ', $att) : ''; + + $tagsCode .= sprintf(" - { name: %s%s }\n", $this->dumper->dump($name), $att); + } + } + if ($tagsCode) { + $code .= " tags:\n".$tagsCode; + } + + if ($definition->getFile()) { + $code .= sprintf(" file: %s\n", $this->dumper->dump($definition->getFile())); + } + + if ($definition->isSynthetic()) { + $code .= sprintf(" synthetic: true\n"); + } + + if ($definition->isDeprecated()) { + $code .= sprintf(" deprecated: %s\n", $definition->getDeprecationMessage('%service_id%')); + } + + if ($definition->isAutowired()) { + $code .= " autowire: true\n"; + } + + $autowiringTypesCode = ''; + foreach ($definition->getAutowiringTypes() as $autowiringType) { + $autowiringTypesCode .= sprintf(" - %s\n", $this->dumper->dump($autowiringType)); + } + if ($autowiringTypesCode) { + $code .= sprintf(" autowiring_types:\n%s", $autowiringTypesCode); + } + + if ($definition->isLazy()) { + $code .= sprintf(" lazy: true\n"); + } + + if ($definition->getArguments()) { + $code .= sprintf(" arguments: %s\n", $this->dumper->dump($this->dumpValue($definition->getArguments()), 0)); + } + + if ($definition->getProperties()) { + $code .= sprintf(" properties: %s\n", $this->dumper->dump($this->dumpValue($definition->getProperties()), 0)); + } + + if ($definition->getMethodCalls()) { + $code .= sprintf(" calls:\n%s\n", $this->dumper->dump($this->dumpValue($definition->getMethodCalls()), 1, 12)); + } + + if (!$definition->isShared()) { + $code .= " shared: false\n"; + } + + if (null !== $decorated = $definition->getDecoratedService()) { + list($decorated, $renamedId, $priority) = $decorated; + $code .= sprintf(" decorates: %s\n", $decorated); + if (null !== $renamedId) { + $code .= sprintf(" decoration_inner_name: %s\n", $renamedId); + } + if (0 !== $priority) { + $code .= sprintf(" decoration_priority: %s\n", $priority); + } + } + + if ($callable = $definition->getFactory()) { + $code .= sprintf(" factory: %s\n", $this->dumper->dump($this->dumpCallable($callable), 0)); + } + + if ($callable = $definition->getConfigurator()) { + $code .= sprintf(" configurator: %s\n", $this->dumper->dump($this->dumpCallable($callable), 0)); + } + + return $code; + } + + /** + * Adds a service alias. + * + * @param string $alias + * @param Alias $id + * + * @return string + */ + private function addServiceAlias($alias, $id) + { + if ($id->isPublic()) { + return sprintf(" %s: '@%s'\n", $alias, $id); + } + + return sprintf(" %s:\n alias: %s\n public: false\n", $alias, $id); + } + + /** + * Adds services. + * + * @return string + */ + private function addServices() + { + if (!$this->container->getDefinitions()) { + return ''; + } + + $code = "services:\n"; + foreach ($this->container->getDefinitions() as $id => $definition) { + $code .= $this->addService($id, $definition); + } + + $aliases = $this->container->getAliases(); + foreach ($aliases as $alias => $id) { + while (isset($aliases[(string) $id])) { + $id = $aliases[(string) $id]; + } + $code .= $this->addServiceAlias($alias, $id); + } + + return $code; + } + + /** + * Adds parameters. + * + * @return string + */ + private function addParameters() + { + if (!$this->container->getParameterBag()->all()) { + return ''; + } + + $parameters = $this->prepareParameters($this->container->getParameterBag()->all(), $this->container->isFrozen()); + + return $this->dumper->dump(array('parameters' => $parameters), 2); + } + + /** + * Dumps callable to YAML format. + * + * @param callable $callable + * + * @return callable + */ + private function dumpCallable($callable) + { + if (is_array($callable)) { + if ($callable[0] instanceof Reference) { + $callable = array($this->getServiceCall((string) $callable[0], $callable[0]), $callable[1]); + } else { + $callable = array($callable[0], $callable[1]); + } + } + + return $callable; + } + + /** + * Dumps the value to YAML format. + * + * @param mixed $value + * + * @return mixed + * + * @throws RuntimeException When trying to dump object or resource + */ + private function dumpValue($value) + { + if (is_array($value)) { + $code = array(); + foreach ($value as $k => $v) { + $code[$k] = $this->dumpValue($v); + } + + return $code; + } elseif ($value instanceof Reference) { + return $this->getServiceCall((string) $value, $value); + } elseif ($value instanceof Parameter) { + return $this->getParameterCall((string) $value); + } elseif ($value instanceof Expression) { + return $this->getExpressionCall((string) $value); + } elseif (is_object($value) || is_resource($value)) { + throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.'); + } + + return $value; + } + + /** + * Gets the service call. + * + * @param string $id + * @param Reference $reference + * + * @return string + */ + private function getServiceCall($id, Reference $reference = null) + { + if (null !== $reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $reference->getInvalidBehavior()) { + return sprintf('@?%s', $id); + } + + return sprintf('@%s', $id); + } + + /** + * Gets parameter call. + * + * @param string $id + * + * @return string + */ + private function getParameterCall($id) + { + return sprintf('%%%s%%', $id); + } + + private function getExpressionCall($expression) + { + return sprintf('@=%s', $expression); + } + + /** + * Prepares parameters. + * + * @param array $parameters + * @param bool $escape + * + * @return array + */ + private function prepareParameters(array $parameters, $escape = true) + { + $filtered = array(); + foreach ($parameters as $key => $value) { + if (is_array($value)) { + $value = $this->prepareParameters($value, $escape); + } elseif ($value instanceof Reference || is_string($value) && 0 === strpos($value, '@')) { + $value = '@'.$value; + } + + $filtered[$key] = $value; + } + + return $escape ? $this->escape($filtered) : $filtered; + } + + /** + * Escapes arguments. + * + * @param array $arguments + * + * @return array + */ + private function escape(array $arguments) + { + $args = array(); + foreach ($arguments as $k => $v) { + if (is_array($v)) { + $args[$k] = $this->escape($v); + } elseif (is_string($v)) { + $args[$k] = str_replace('%', '%%', $v); + } else { + $args[$k] = $v; + } + } + + return $args; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/BadMethodCallException.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/BadMethodCallException.php new file mode 100644 index 0000000000000000000000000000000000000000..959238e93918775afc5515e09393439f63cbe0f8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/BadMethodCallException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Exception; + +/** + * Base BadMethodCallException for Dependency Injection component. + */ +class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/EnvNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/EnvNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..577095e88b493062e71e6a8bb33b24812fe9650c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/EnvNotFoundException.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Exception; + +/** + * This exception is thrown when an environment variable is not found. + * + * @author Nicolas Grekas + */ +class EnvNotFoundException extends InvalidArgumentException +{ + public function __construct($name) + { + parent::__construct(sprintf('Environment variable not found: "%s".', $name)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/EnvParameterException.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/EnvParameterException.php new file mode 100644 index 0000000000000000000000000000000000000000..44dbab45b62840dd67d647dd12684f9a6652862e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/EnvParameterException.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Exception; + +/** + * This exception wraps exceptions whose messages contain a reference to an env parameter. + * + * @author Nicolas Grekas + */ +class EnvParameterException extends InvalidArgumentException +{ + public function __construct(array $usedEnvs, \Exception $previous = null) + { + parent::__construct(sprintf('Incompatible use of dynamic environment variables "%s" found in parameters.', implode('", "', $usedEnvs)), 0, $previous); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..f5e9099f11199d2ab47d8b5b2aab6f2beddc6538 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ExceptionInterface.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Exception; + +/** + * Base ExceptionInterface for Dependency Injection component. + * + * @author Fabien Potencier + * @author Bulat Shakirzyanov + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..119bb7d195e0be1de9987595ac1eca1b8d391b2d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Exception; + +/** + * Base InvalidArgumentException for Dependency Injection component. + * + * @author Bulat Shakirzyanov + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/LogicException.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/LogicException.php new file mode 100644 index 0000000000000000000000000000000000000000..17a070ca8259b55f57deaafc1df77c1c5351edbd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/LogicException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Exception; + +/** + * Base LogicException for Dependency Injection component. + */ +class LogicException extends \LogicException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/OutOfBoundsException.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/OutOfBoundsException.php new file mode 100644 index 0000000000000000000000000000000000000000..a61f143b30a6b108b946186fd88a1aa5ae52f26c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/OutOfBoundsException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Exception; + +/** + * Base OutOfBoundsException for Dependency Injection component. + */ +class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ParameterCircularReferenceException.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ParameterCircularReferenceException.php new file mode 100644 index 0000000000000000000000000000000000000000..29151765dc5b64af0ea42da2dbb857bc58460ee0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ParameterCircularReferenceException.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Exception; + +/** + * This exception is thrown when a circular reference in a parameter is detected. + * + * @author Fabien Potencier + */ +class ParameterCircularReferenceException extends RuntimeException +{ + private $parameters; + + public function __construct($parameters, \Exception $previous = null) + { + parent::__construct(sprintf('Circular reference detected for parameter "%s" ("%s" > "%s").', $parameters[0], implode('" > "', $parameters), $parameters[0]), 0, $previous); + + $this->parameters = $parameters; + } + + public function getParameters() + { + return $this->parameters; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..40c01b05081d8e77dc85f434c1a7afdc96df4052 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Exception; + +/** + * This exception is thrown when a non-existent parameter is used. + * + * @author Fabien Potencier + */ +class ParameterNotFoundException extends InvalidArgumentException +{ + private $key; + private $sourceId; + private $sourceKey; + private $alternatives; + private $nonNestedAlternative; + + /** + * @param string $key The requested parameter key + * @param string $sourceId The service id that references the non-existent parameter + * @param string $sourceKey The parameter key that references the non-existent parameter + * @param \Exception $previous The previous exception + * @param string[] $alternatives Some parameter name alternatives + * @param string|null $nonNestedAlternative The alternative parameter name when the user expected dot notation for nested parameters + */ + public function __construct($key, $sourceId = null, $sourceKey = null, \Exception $previous = null, array $alternatives = array(), $nonNestedAlternative = null) + { + $this->key = $key; + $this->sourceId = $sourceId; + $this->sourceKey = $sourceKey; + $this->alternatives = $alternatives; + $this->nonNestedAlternative = $nonNestedAlternative; + + parent::__construct('', 0, $previous); + + $this->updateRepr(); + } + + public function updateRepr() + { + if (null !== $this->sourceId) { + $this->message = sprintf('The service "%s" has a dependency on a non-existent parameter "%s".', $this->sourceId, $this->key); + } elseif (null !== $this->sourceKey) { + $this->message = sprintf('The parameter "%s" has a dependency on a non-existent parameter "%s".', $this->sourceKey, $this->key); + } else { + $this->message = sprintf('You have requested a non-existent parameter "%s".', $this->key); + } + + if ($this->alternatives) { + if (1 == count($this->alternatives)) { + $this->message .= ' Did you mean this: "'; + } else { + $this->message .= ' Did you mean one of these: "'; + } + $this->message .= implode('", "', $this->alternatives).'"?'; + } elseif (null !== $this->nonNestedAlternative) { + $this->message .= ' You cannot access nested array items, do you want to inject "'.$this->nonNestedAlternative.'" instead?'; + } + } + + public function getKey() + { + return $this->key; + } + + public function getSourceId() + { + return $this->sourceId; + } + + public function getSourceKey() + { + return $this->sourceKey; + } + + public function setSourceId($sourceId) + { + $this->sourceId = $sourceId; + + $this->updateRepr(); + } + + public function setSourceKey($sourceKey) + { + $this->sourceKey = $sourceKey; + + $this->updateRepr(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/RuntimeException.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/RuntimeException.php new file mode 100644 index 0000000000000000000000000000000000000000..5c2454120826c25f5ff7656ee8d8e9f432944b4f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/RuntimeException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Exception; + +/** + * Base RuntimeException for Dependency Injection component. + * + * @author Johannes M. Schmitt + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ServiceCircularReferenceException.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ServiceCircularReferenceException.php new file mode 100644 index 0000000000000000000000000000000000000000..26e3fb34bf3cb4c4834fda2b4ed1dc4b0f2a6184 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ServiceCircularReferenceException.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Exception; + +/** + * This exception is thrown when a circular reference is detected. + * + * @author Johannes M. Schmitt + */ +class ServiceCircularReferenceException extends RuntimeException +{ + private $serviceId; + private $path; + + public function __construct($serviceId, array $path, \Exception $previous = null) + { + parent::__construct(sprintf('Circular reference detected for service "%s", path: "%s".', $serviceId, implode(' -> ', $path)), 0, $previous); + + $this->serviceId = $serviceId; + $this->path = $path; + } + + public function getServiceId() + { + return $this->serviceId; + } + + public function getPath() + { + return $this->path; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..e65da506bb5151b77e51cd771635ad6577276895 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Exception; + +/** + * This exception is thrown when a non-existent service is requested. + * + * @author Johannes M. Schmitt + */ +class ServiceNotFoundException extends InvalidArgumentException +{ + private $id; + private $sourceId; + + public function __construct($id, $sourceId = null, \Exception $previous = null, array $alternatives = array()) + { + if (null === $sourceId) { + $msg = sprintf('You have requested a non-existent service "%s".', $id); + } else { + $msg = sprintf('The service "%s" has a dependency on a non-existent service "%s".', $sourceId, $id); + } + + if ($alternatives) { + if (1 == count($alternatives)) { + $msg .= ' Did you mean this: "'; + } else { + $msg .= ' Did you mean one of these: "'; + } + $msg .= implode('", "', $alternatives).'"?'; + } + + parent::__construct($msg, 0, $previous); + + $this->id = $id; + $this->sourceId = $sourceId; + } + + public function getId() + { + return $this->id; + } + + public function getSourceId() + { + return $this->sourceId; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguage.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguage.php new file mode 100644 index 0000000000000000000000000000000000000000..acc97bcf4973dffabf5bb74007bdb5a4b7592b3d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguage.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection; + +use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage; +use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface; + +/** + * Adds some function to the default ExpressionLanguage. + * + * @author Fabien Potencier + * + * @see ExpressionLanguageProvider + */ +class ExpressionLanguage extends BaseExpressionLanguage +{ + public function __construct(ParserCacheInterface $cache = null, array $providers = array()) + { + // prepend the default provider to let users override it easily + array_unshift($providers, new ExpressionLanguageProvider()); + + parent::__construct($cache, $providers); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguageProvider.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguageProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..ce6d69522e19127631ad4ae534e441119e4f6a5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ExpressionLanguageProvider.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\Component\DependencyInjection; + +use Symfony\Component\ExpressionLanguage\ExpressionFunction; +use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; + +/** + * Define some ExpressionLanguage functions. + * + * To get a service, use service('request'). + * To get a parameter, use parameter('kernel.debug'). + * + * @author Fabien Potencier + */ +class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface +{ + public function getFunctions() + { + return array( + new ExpressionFunction('service', function ($arg) { + return sprintf('$this->get(%s)', $arg); + }, function (array $variables, $value) { + return $variables['container']->get($value); + }), + + new ExpressionFunction('parameter', function ($arg) { + return sprintf('$this->getParameter(%s)', $arg); + }, function (array $variables, $value) { + return $variables['container']->getParameter($value); + }), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..705ba38ec9ccc1d946d9ae0c9285a2495b0a58c0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Extension; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +/** + * ConfigurationExtensionInterface is the interface implemented by container extension classes. + * + * @author Kevin Bond + */ +interface ConfigurationExtensionInterface +{ + /** + * Returns extension configuration. + * + * @param array $config An array of configuration values + * @param ContainerBuilder $container A ContainerBuilder instance + * + * @return ConfigurationInterface|null The configuration or null + */ + public function getConfiguration(array $config, ContainerBuilder $container); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/Extension.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/Extension.php new file mode 100644 index 0000000000000000000000000000000000000000..ced39f7281b6c9294f924e02d515edafca4dc6f9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/Extension.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Extension; + +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\DependencyInjection\Exception\BadMethodCallException; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\Definition\Processor; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +/** + * Provides useful features shared by many extensions. + * + * @author Fabien Potencier + */ +abstract class Extension implements ExtensionInterface, ConfigurationExtensionInterface +{ + /** + * {@inheritdoc} + */ + public function getXsdValidationBasePath() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function getNamespace() + { + return 'http://example.org/schema/dic/'.$this->getAlias(); + } + + /** + * Returns the recommended alias to use in XML. + * + * This alias is also the mandatory prefix to use when using YAML. + * + * This convention is to remove the "Extension" postfix from the class + * name and then lowercase and underscore the result. So: + * + * AcmeHelloExtension + * + * becomes + * + * acme_hello + * + * This can be overridden in a sub-class to specify the alias manually. + * + * @return string The alias + * + * @throws BadMethodCallException When the extension name does not follow conventions + */ + public function getAlias() + { + $className = get_class($this); + if (substr($className, -9) != 'Extension') { + throw new BadMethodCallException('This extension does not follow the naming convention; you must overwrite the getAlias() method.'); + } + $classBaseName = substr(strrchr($className, '\\'), 1, -9); + + return Container::underscore($classBaseName); + } + + /** + * {@inheritdoc} + */ + public function getConfiguration(array $config, ContainerBuilder $container) + { + $reflected = new \ReflectionClass($this); + $namespace = $reflected->getNamespaceName(); + + $class = $namespace.'\\Configuration'; + if (class_exists($class)) { + $r = new \ReflectionClass($class); + $container->addResource(new FileResource($r->getFileName())); + + if (!method_exists($class, '__construct')) { + return new $class(); + } + } + } + + final protected function processConfiguration(ConfigurationInterface $configuration, array $configs) + { + $processor = new Processor(); + + return $processor->processConfiguration($configuration, $configs); + } + + /** + * @param ContainerBuilder $container + * @param array $config + * + * @return bool Whether the configuration is enabled + * + * @throws InvalidArgumentException When the config is not enableable + */ + protected function isConfigEnabled(ContainerBuilder $container, array $config) + { + if (!array_key_exists('enabled', $config)) { + throw new InvalidArgumentException("The config array has no 'enabled' key."); + } + + return (bool) $container->getParameterBag()->resolveValue($config['enabled']); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..6e926fa7a8adc45a6fe4a38def6def7cd03b2f44 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Extension; + +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * ExtensionInterface is the interface implemented by container extension classes. + * + * @author Fabien Potencier + */ +interface ExtensionInterface +{ + /** + * Loads a specific configuration. + * + * @param array $configs An array of configuration values + * @param ContainerBuilder $container A ContainerBuilder instance + * + * @throws \InvalidArgumentException When provided tag is not defined in this extension + */ + public function load(array $configs, ContainerBuilder $container); + + /** + * Returns the namespace to be used for this extension (XML namespace). + * + * @return string The XML namespace + */ + public function getNamespace(); + + /** + * Returns the base path for the XSD files. + * + * @return string The XSD base path + */ + public function getXsdValidationBasePath(); + + /** + * Returns the recommended alias to use in XML. + * + * This alias is also the mandatory prefix to use when using YAML. + * + * @return string The alias + */ + public function getAlias(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c666bdbcf8d45236f6c7b52a880464961114ff67 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Extension; + +use Symfony\Component\DependencyInjection\ContainerBuilder; + +interface PrependExtensionInterface +{ + /** + * Allow an extension to prepend the extension configurations. + * + * @param ContainerBuilder $container + */ + public function prepend(ContainerBuilder $container); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a8dd5252ed28562d5f641c3fa329eee073743a58 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\LazyProxy\Instantiator; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Definition; + +/** + * Lazy proxy instantiator, capable of instantiating a proxy given a container, the + * service definitions and a callback that produces the real service instance. + * + * @author Marco Pivetta + */ +interface InstantiatorInterface +{ + /** + * Instantiates a proxy object. + * + * @param ContainerInterface $container the container from which the service is being requested + * @param Definition $definition the definition of the requested service + * @param string $id identifier of the requested service + * @param callable $realInstantiator zero-argument callback that is capable of producing the real + * service instance + * + * @return object + */ + public function instantiateProxy(ContainerInterface $container, Definition $definition, $id, $realInstantiator); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/RealServiceInstantiator.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/RealServiceInstantiator.php new file mode 100644 index 0000000000000000000000000000000000000000..cad9320039b14d918e07ea7897cc5cd1b73c3186 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/RealServiceInstantiator.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\LazyProxy\Instantiator; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Definition; + +/** + * {@inheritdoc} + * + * Noop proxy instantiator - simply produces the real service instead of a proxy instance. + * + * @author Marco Pivetta + */ +class RealServiceInstantiator implements InstantiatorInterface +{ + /** + * {@inheritdoc} + */ + public function instantiateProxy(ContainerInterface $container, Definition $definition, $id, $realInstantiator) + { + return call_user_func($realInstantiator); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..ce88eba9742fdbb4ba340762da49f756b7530e4d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper; + +use Symfony\Component\DependencyInjection\Definition; + +/** + * Lazy proxy dumper capable of generating the instantiation logic PHP code for proxied services. + * + * @author Marco Pivetta + */ +interface DumperInterface +{ + /** + * Inspects whether the given definitions should produce proxy instantiation logic in the dumped container. + * + * @param Definition $definition + * + * @return bool + */ + public function isProxyCandidate(Definition $definition); + + /** + * Generates the code to be used to instantiate a proxy in the dumped factory code. + * + * @param Definition $definition + * @param string $id service identifier + * @param string $methodName the method name to get the service, will be added to the interface in 4.0 + * + * @return string + */ + public function getProxyFactoryCode(Definition $definition, $id/**, $methodName = null */); + + /** + * Generates the code for the lazy proxy. + * + * @param Definition $definition + * + * @return string + */ + public function getProxyCode(Definition $definition); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..30911d3a5e83af4a4e3bc09ad3753e668f912567 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper; + +use Symfony\Component\DependencyInjection\Definition; + +/** + * Null dumper, negates any proxy code generation for any given service definition. + * + * @author Marco Pivetta + */ +class NullDumper implements DumperInterface +{ + /** + * {@inheritdoc} + */ + public function isProxyCandidate(Definition $definition) + { + return false; + } + + /** + * {@inheritdoc} + */ + public function getProxyFactoryCode(Definition $definition, $id) + { + return ''; + } + + /** + * {@inheritdoc} + */ + public function getProxyCode(Definition $definition) + { + return ''; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..df70cdf44f2838e35ec40e0f6f9e86fdeb6f3444 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Loader; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\Loader\Loader; + +/** + * ClosureLoader loads service definitions from a PHP closure. + * + * The Closure has access to the container as its first argument. + * + * @author Fabien Potencier + */ +class ClosureLoader extends Loader +{ + private $container; + + /** + * @param ContainerBuilder $container A ContainerBuilder instance + */ + public function __construct(ContainerBuilder $container) + { + $this->container = $container; + } + + /** + * {@inheritdoc} + */ + public function load($resource, $type = null) + { + call_user_func($resource, $this->container); + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return $resource instanceof \Closure; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/DirectoryLoader.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/DirectoryLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..ffb8853011134f45a846cde72e5d3014c07cbc99 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/DirectoryLoader.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Loader; + +use Symfony\Component\Config\Resource\DirectoryResource; + +/** + * DirectoryLoader is a recursive loader to go through directories. + * + * @author Sebastien Lavoie + */ +class DirectoryLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + public function load($file, $type = null) + { + $file = rtrim($file, '/'); + $path = $this->locator->locate($file); + $this->container->addResource(new DirectoryResource($path)); + + foreach (scandir($path) as $dir) { + if ('.' !== $dir[0]) { + if (is_dir($path.'/'.$dir)) { + $dir .= '/'; // append / to allow recursion + } + + $this->setCurrentDir($path); + + $this->import($dir, null, false, $path); + } + } + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + if ('directory' === $type) { + return true; + } + + return null === $type && is_string($resource) && '/' === substr($resource, -1); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..90cd6bcfafa4d06276c52fddca7f45a6f68e7b7f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Loader; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\Loader\FileLoader as BaseFileLoader; +use Symfony\Component\Config\FileLocatorInterface; + +/** + * FileLoader is the abstract class used by all built-in loaders that are file based. + * + * @author Fabien Potencier + */ +abstract class FileLoader extends BaseFileLoader +{ + protected $container; + + /** + * @param ContainerBuilder $container A ContainerBuilder instance + * @param FileLocatorInterface $locator A FileLocator instance + */ + public function __construct(ContainerBuilder $container, FileLocatorInterface $locator) + { + $this->container = $container; + + parent::__construct($locator); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..9fea56be1b22dfef798d0da1790b2f3b24c73d24 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Loader; + +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Config\Util\XmlUtils; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * IniFileLoader loads parameters from INI files. + * + * @author Fabien Potencier + */ +class IniFileLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + public function load($resource, $type = null) + { + $path = $this->locator->locate($resource); + + $this->container->addResource(new FileResource($path)); + + // first pass to catch parsing errors + $result = parse_ini_file($path, true); + if (false === $result || array() === $result) { + throw new InvalidArgumentException(sprintf('The "%s" file is not valid.', $resource)); + } + + // real raw parsing + $result = parse_ini_file($path, true, INI_SCANNER_RAW); + + if (isset($result['parameters']) && is_array($result['parameters'])) { + foreach ($result['parameters'] as $key => $value) { + $this->container->setParameter($key, $this->phpize($value)); + } + } + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return is_string($resource) && 'ini' === pathinfo($resource, PATHINFO_EXTENSION); + } + + /** + * Note that the following features are not supported: + * * strings with escaped quotes are not supported "foo\"bar"; + * * string concatenation ("foo" "bar"). + */ + private function phpize($value) + { + // trim on the right as comments removal keep whitespaces + $value = rtrim($value); + $lowercaseValue = strtolower($value); + + switch (true) { + case defined($value): + return constant($value); + case 'yes' === $lowercaseValue || 'on' === $lowercaseValue: + return true; + case 'no' === $lowercaseValue || 'off' === $lowercaseValue || 'none' === $lowercaseValue: + return false; + case isset($value[1]) && ( + ("'" === $value[0] && "'" === $value[strlen($value) - 1]) || + ('"' === $value[0] && '"' === $value[strlen($value) - 1]) + ): + // quoted string + return substr($value, 1, -1); + default: + return XmlUtils::phpize($value); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..08c1d9af4f653ddc11a395677a8ecfa23fceb848 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Loader; + +use Symfony\Component\Config\Resource\FileResource; + +/** + * PhpFileLoader loads service definitions from a PHP file. + * + * The PHP file is required and the $container variable can be + * used within the file to change the container. + * + * @author Fabien Potencier + */ +class PhpFileLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + public function load($resource, $type = null) + { + // the container and loader variables are exposed to the included file below + $container = $this->container; + $loader = $this; + + $path = $this->locator->locate($resource); + $this->setCurrentDir(dirname($path)); + $this->container->addResource(new FileResource($path)); + + include $path; + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..d0009c334295428542400f04c4a7f8ccd555fdb1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -0,0 +1,587 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Loader; + +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Config\Util\XmlUtils; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\ExpressionLanguage\Expression; + +/** + * XmlFileLoader loads XML files service definitions. + * + * @author Fabien Potencier + */ +class XmlFileLoader extends FileLoader +{ + const NS = 'http://symfony.com/schema/dic/services'; + + /** + * {@inheritdoc} + */ + public function load($resource, $type = null) + { + $path = $this->locator->locate($resource); + + $xml = $this->parseFileToDOM($path); + + $this->container->addResource(new FileResource($path)); + + // anonymous services + $this->processAnonymousServices($xml, $path); + + // imports + $this->parseImports($xml, $path); + + // parameters + $this->parseParameters($xml); + + // extensions + $this->loadFromExtensions($xml); + + // services + $this->parseDefinitions($xml, $path); + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return is_string($resource) && 'xml' === pathinfo($resource, PATHINFO_EXTENSION); + } + + /** + * Parses parameters. + * + * @param \DOMDocument $xml + */ + private function parseParameters(\DOMDocument $xml) + { + if ($parameters = $this->getChildren($xml->documentElement, 'parameters')) { + $this->container->getParameterBag()->add($this->getArgumentsAsPhp($parameters[0], 'parameter')); + } + } + + /** + * Parses imports. + * + * @param \DOMDocument $xml + * @param string $file + */ + private function parseImports(\DOMDocument $xml, $file) + { + $xpath = new \DOMXPath($xml); + $xpath->registerNamespace('container', self::NS); + + if (false === $imports = $xpath->query('//container:imports/container:import')) { + return; + } + + $defaultDirectory = dirname($file); + foreach ($imports as $import) { + $this->setCurrentDir($defaultDirectory); + $this->import($import->getAttribute('resource'), null, (bool) XmlUtils::phpize($import->getAttribute('ignore-errors')), $file); + } + } + + /** + * Parses multiple definitions. + * + * @param \DOMDocument $xml + * @param string $file + */ + private function parseDefinitions(\DOMDocument $xml, $file) + { + $xpath = new \DOMXPath($xml); + $xpath->registerNamespace('container', self::NS); + + if (false === $services = $xpath->query('//container:services/container:service')) { + return; + } + + foreach ($services as $service) { + if (null !== $definition = $this->parseDefinition($service, $file)) { + $this->container->setDefinition((string) $service->getAttribute('id'), $definition); + } + } + } + + /** + * Parses an individual Definition. + * + * @param \DOMElement $service + * @param string $file + * + * @return Definition|null + */ + private function parseDefinition(\DOMElement $service, $file) + { + if ($alias = $service->getAttribute('alias')) { + $this->validateAlias($service, $file); + + $public = true; + if ($publicAttr = $service->getAttribute('public')) { + $public = XmlUtils::phpize($publicAttr); + } + $this->container->setAlias((string) $service->getAttribute('id'), new Alias($alias, $public)); + + return; + } + + if ($parent = $service->getAttribute('parent')) { + $definition = new DefinitionDecorator($parent); + } else { + $definition = new Definition(); + } + + foreach (array('class', 'shared', 'public', 'synthetic', 'lazy', 'abstract') as $key) { + if ($value = $service->getAttribute($key)) { + $method = 'set'.$key; + $definition->$method(XmlUtils::phpize($value)); + } + } + + if ($value = $service->getAttribute('autowire')) { + $definition->setAutowired(XmlUtils::phpize($value)); + } + + if ($files = $this->getChildren($service, 'file')) { + $definition->setFile($files[0]->nodeValue); + } + + if ($deprecated = $this->getChildren($service, 'deprecated')) { + $definition->setDeprecated(true, $deprecated[0]->nodeValue ?: null); + } + + $definition->setArguments($this->getArgumentsAsPhp($service, 'argument')); + $definition->setProperties($this->getArgumentsAsPhp($service, 'property')); + + if ($factories = $this->getChildren($service, 'factory')) { + $factory = $factories[0]; + if ($function = $factory->getAttribute('function')) { + $definition->setFactory($function); + } else { + $factoryService = $this->getChildren($factory, 'service'); + + if (isset($factoryService[0])) { + $class = $this->parseDefinition($factoryService[0], $file); + } elseif ($childService = $factory->getAttribute('service')) { + $class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE); + } else { + $class = $factory->getAttribute('class'); + } + + $definition->setFactory(array($class, $factory->getAttribute('method'))); + } + } + + if ($configurators = $this->getChildren($service, 'configurator')) { + $configurator = $configurators[0]; + if ($function = $configurator->getAttribute('function')) { + $definition->setConfigurator($function); + } else { + $configuratorService = $this->getChildren($configurator, 'service'); + + if (isset($configuratorService[0])) { + $class = $this->parseDefinition($configuratorService[0], $file); + } elseif ($childService = $configurator->getAttribute('service')) { + $class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE); + } else { + $class = $configurator->getAttribute('class'); + } + + $definition->setConfigurator(array($class, $configurator->getAttribute('method'))); + } + } + + foreach ($this->getChildren($service, 'call') as $call) { + $definition->addMethodCall($call->getAttribute('method'), $this->getArgumentsAsPhp($call, 'argument')); + } + + foreach ($this->getChildren($service, 'tag') as $tag) { + $parameters = array(); + foreach ($tag->attributes as $name => $node) { + if ('name' === $name) { + continue; + } + + if (false !== strpos($name, '-') && false === strpos($name, '_') && !array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) { + $parameters[$normalizedName] = XmlUtils::phpize($node->nodeValue); + } + // keep not normalized key + $parameters[$name] = XmlUtils::phpize($node->nodeValue); + } + + if ('' === $tag->getAttribute('name')) { + throw new InvalidArgumentException(sprintf('The tag name for service "%s" in %s must be a non-empty string.', (string) $service->getAttribute('id'), $file)); + } + + $definition->addTag($tag->getAttribute('name'), $parameters); + } + + foreach ($this->getChildren($service, 'autowiring-type') as $type) { + $definition->addAutowiringType($type->textContent); + } + + if ($value = $service->getAttribute('decorates')) { + $renameId = $service->hasAttribute('decoration-inner-name') ? $service->getAttribute('decoration-inner-name') : null; + $priority = $service->hasAttribute('decoration-priority') ? $service->getAttribute('decoration-priority') : 0; + $definition->setDecoratedService($value, $renameId, $priority); + } + + return $definition; + } + + /** + * Parses a XML file to a \DOMDocument. + * + * @param string $file Path to a file + * + * @return \DOMDocument + * + * @throws InvalidArgumentException When loading of XML file returns error + */ + private function parseFileToDOM($file) + { + try { + $dom = XmlUtils::loadFile($file, array($this, 'validateSchema')); + } catch (\InvalidArgumentException $e) { + throw new InvalidArgumentException(sprintf('Unable to parse file "%s".', $file), $e->getCode(), $e); + } + + $this->validateExtensions($dom, $file); + + return $dom; + } + + /** + * Processes anonymous services. + * + * @param \DOMDocument $xml + * @param string $file + */ + private function processAnonymousServices(\DOMDocument $xml, $file) + { + $definitions = array(); + $count = 0; + + $xpath = new \DOMXPath($xml); + $xpath->registerNamespace('container', self::NS); + + // anonymous services as arguments/properties + if (false !== $nodes = $xpath->query('//container:argument[@type="service"][not(@id)]|//container:property[@type="service"][not(@id)]')) { + foreach ($nodes as $node) { + // give it a unique name + $id = sprintf('%s_%d', hash('sha256', $file), ++$count); + $node->setAttribute('id', $id); + + if ($services = $this->getChildren($node, 'service')) { + $definitions[$id] = array($services[0], $file, false); + $services[0]->setAttribute('id', $id); + + // anonymous services are always private + // we could not use the constant false here, because of XML parsing + $services[0]->setAttribute('public', 'false'); + } + } + } + + // anonymous services "in the wild" + if (false !== $nodes = $xpath->query('//container:services/container:service[not(@id)]')) { + foreach ($nodes as $node) { + // give it a unique name + $id = sprintf('%s_%d', hash('sha256', $file), ++$count); + $node->setAttribute('id', $id); + $definitions[$id] = array($node, $file, true); + } + } + + // resolve definitions + krsort($definitions); + foreach ($definitions as $id => list($domElement, $file, $wild)) { + if (null !== $definition = $this->parseDefinition($domElement, $file)) { + $this->container->setDefinition($id, $definition); + } + + if (true === $wild) { + $tmpDomElement = new \DOMElement('_services', null, self::NS); + $domElement->parentNode->replaceChild($tmpDomElement, $domElement); + $tmpDomElement->setAttribute('id', $id); + } else { + $domElement->parentNode->removeChild($domElement); + } + } + } + + /** + * Returns arguments as valid php types. + * + * @param \DOMElement $node + * @param string $name + * @param bool $lowercase + * + * @return mixed + */ + private function getArgumentsAsPhp(\DOMElement $node, $name, $lowercase = true) + { + $arguments = array(); + foreach ($this->getChildren($node, $name) as $arg) { + if ($arg->hasAttribute('name')) { + $arg->setAttribute('key', $arg->getAttribute('name')); + } + + // this is used by DefinitionDecorator to overwrite a specific + // argument of the parent definition + if ($arg->hasAttribute('index')) { + $key = 'index_'.$arg->getAttribute('index'); + } elseif (!$arg->hasAttribute('key')) { + // Append an empty argument, then fetch its key to overwrite it later + $arguments[] = null; + $keys = array_keys($arguments); + $key = array_pop($keys); + } else { + $key = $arg->getAttribute('key'); + + // parameter keys are case insensitive + if ('parameter' == $name && $lowercase) { + $key = strtolower($key); + } + } + + switch ($arg->getAttribute('type')) { + case 'service': + $onInvalid = $arg->getAttribute('on-invalid'); + $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; + if ('ignore' == $onInvalid) { + $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; + } elseif ('null' == $onInvalid) { + $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; + } + + $arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior); + break; + case 'expression': + $arguments[$key] = new Expression($arg->nodeValue); + break; + case 'collection': + $arguments[$key] = $this->getArgumentsAsPhp($arg, $name, false); + break; + case 'string': + $arguments[$key] = $arg->nodeValue; + break; + case 'constant': + $arguments[$key] = constant(trim($arg->nodeValue)); + break; + default: + $arguments[$key] = XmlUtils::phpize($arg->nodeValue); + } + } + + return $arguments; + } + + /** + * Get child elements by name. + * + * @param \DOMNode $node + * @param mixed $name + * + * @return array + */ + private function getChildren(\DOMNode $node, $name) + { + $children = array(); + foreach ($node->childNodes as $child) { + if ($child instanceof \DOMElement && $child->localName === $name && $child->namespaceURI === self::NS) { + $children[] = $child; + } + } + + return $children; + } + + /** + * Validates a documents XML schema. + * + * @param \DOMDocument $dom + * + * @return bool + * + * @throws RuntimeException When extension references a non-existent XSD file + */ + public function validateSchema(\DOMDocument $dom) + { + $schemaLocations = array('http://symfony.com/schema/dic/services' => str_replace('\\', '/', __DIR__.'/schema/dic/services/services-1.0.xsd')); + + if ($element = $dom->documentElement->getAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation')) { + $items = preg_split('/\s+/', $element); + for ($i = 0, $nb = count($items); $i < $nb; $i += 2) { + if (!$this->container->hasExtension($items[$i])) { + continue; + } + + if (($extension = $this->container->getExtension($items[$i])) && false !== $extension->getXsdValidationBasePath()) { + $path = str_replace($extension->getNamespace(), str_replace('\\', '/', $extension->getXsdValidationBasePath()).'/', $items[$i + 1]); + + if (!is_file($path)) { + throw new RuntimeException(sprintf('Extension "%s" references a non-existent XSD file "%s"', get_class($extension), $path)); + } + + $schemaLocations[$items[$i]] = $path; + } + } + } + + $tmpfiles = array(); + $imports = ''; + foreach ($schemaLocations as $namespace => $location) { + $parts = explode('/', $location); + if (0 === stripos($location, 'phar://')) { + $tmpfile = tempnam(sys_get_temp_dir(), 'sf2'); + if ($tmpfile) { + copy($location, $tmpfile); + $tmpfiles[] = $tmpfile; + $parts = explode('/', str_replace('\\', '/', $tmpfile)); + } + } + $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : ''; + $location = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts)); + + $imports .= sprintf(' '."\n", $namespace, $location); + } + + $source = << + + + +$imports + +EOF + ; + + $disableEntities = libxml_disable_entity_loader(false); + $valid = @$dom->schemaValidateSource($source); + libxml_disable_entity_loader($disableEntities); + + foreach ($tmpfiles as $tmpfile) { + @unlink($tmpfile); + } + + return $valid; + } + + /** + * Validates an alias. + * + * @param \DOMElement $alias + * @param string $file + */ + private function validateAlias(\DOMElement $alias, $file) + { + foreach ($alias->attributes as $name => $node) { + if (!in_array($name, array('alias', 'id', 'public'))) { + @trigger_error(sprintf('Using the attribute "%s" is deprecated for the service "%s" which is defined as an alias in "%s". Allowed attributes for service aliases are "alias", "id" and "public". The XmlFileLoader will raise an exception in Symfony 4.0, instead of silently ignoring unsupported attributes.', $name, $alias->getAttribute('id'), $file), E_USER_DEPRECATED); + } + } + + foreach ($alias->childNodes as $child) { + if ($child instanceof \DOMElement && $child->namespaceURI === self::NS) { + @trigger_error(sprintf('Using the element "%s" is deprecated for the service "%s" which is defined as an alias in "%s". The XmlFileLoader will raise an exception in Symfony 4.0, instead of silently ignoring unsupported elements.', $child->localName, $alias->getAttribute('id'), $file), E_USER_DEPRECATED); + } + } + } + + /** + * Validates an extension. + * + * @param \DOMDocument $dom + * @param string $file + * + * @throws InvalidArgumentException When no extension is found corresponding to a tag + */ + private function validateExtensions(\DOMDocument $dom, $file) + { + foreach ($dom->documentElement->childNodes as $node) { + if (!$node instanceof \DOMElement || 'http://symfony.com/schema/dic/services' === $node->namespaceURI) { + continue; + } + + // can it be handled by an extension? + if (!$this->container->hasExtension($node->namespaceURI)) { + $extensionNamespaces = array_filter(array_map(function ($ext) { return $ext->getNamespace(); }, $this->container->getExtensions())); + throw new InvalidArgumentException(sprintf( + 'There is no extension able to load the configuration for "%s" (in %s). Looked for namespace "%s", found %s', + $node->tagName, + $file, + $node->namespaceURI, + $extensionNamespaces ? sprintf('"%s"', implode('", "', $extensionNamespaces)) : 'none' + )); + } + } + } + + /** + * Loads from an extension. + * + * @param \DOMDocument $xml + */ + private function loadFromExtensions(\DOMDocument $xml) + { + foreach ($xml->documentElement->childNodes as $node) { + if (!$node instanceof \DOMElement || $node->namespaceURI === self::NS) { + continue; + } + + $values = static::convertDomElementToArray($node); + if (!is_array($values)) { + $values = array(); + } + + $this->container->loadFromExtension($node->namespaceURI, $values); + } + } + + /** + * Converts a \DomElement object to a PHP array. + * + * The following rules applies during the conversion: + * + * * Each tag is converted to a key value or an array + * if there is more than one "value" + * + * * The content of a tag is set under a "value" key (bar) + * if the tag also has some nested tags + * + * * The attributes are converted to keys () + * + * * The nested-tags are converted to keys (bar) + * + * @param \DomElement $element A \DomElement instance + * + * @return array A PHP array + */ + public static function convertDomElementToArray(\DOMElement $element) + { + return XmlUtils::convertDomElementToArray($element); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..c4520e872dca1a387ab924323e3e8e195e58f3bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php @@ -0,0 +1,520 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Loader; + +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Yaml\Exception\ParseException; +use Symfony\Component\Yaml\Parser as YamlParser; +use Symfony\Component\Yaml\Yaml; +use Symfony\Component\ExpressionLanguage\Expression; + +/** + * YamlFileLoader loads YAML files service definitions. + * + * The YAML format does not support anonymous services (cf. the XML loader). + * + * @author Fabien Potencier + */ +class YamlFileLoader extends FileLoader +{ + private static $keywords = array( + 'alias' => 'alias', + 'parent' => 'parent', + 'class' => 'class', + 'shared' => 'shared', + 'synthetic' => 'synthetic', + 'lazy' => 'lazy', + 'public' => 'public', + 'abstract' => 'abstract', + 'deprecated' => 'deprecated', + 'factory' => 'factory', + 'file' => 'file', + 'arguments' => 'arguments', + 'properties' => 'properties', + 'configurator' => 'configurator', + 'calls' => 'calls', + 'tags' => 'tags', + 'decorates' => 'decorates', + 'decoration_inner_name' => 'decoration_inner_name', + 'decoration_priority' => 'decoration_priority', + 'autowire' => 'autowire', + 'autowiring_types' => 'autowiring_types', + ); + + private $yamlParser; + + /** + * {@inheritdoc} + */ + public function load($resource, $type = null) + { + $path = $this->locator->locate($resource); + + $content = $this->loadFile($path); + + $this->container->addResource(new FileResource($path)); + + // empty file + if (null === $content) { + return; + } + + // imports + $this->parseImports($content, $path); + + // parameters + if (isset($content['parameters'])) { + if (!is_array($content['parameters'])) { + throw new InvalidArgumentException(sprintf('The "parameters" key should contain an array in %s. Check your YAML syntax.', $resource)); + } + + foreach ($content['parameters'] as $key => $value) { + $this->container->setParameter($key, $this->resolveServices($value)); + } + } + + // extensions + $this->loadFromExtensions($content); + + // services + $this->parseDefinitions($content, $resource); + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return is_string($resource) && in_array(pathinfo($resource, PATHINFO_EXTENSION), array('yml', 'yaml'), true); + } + + /** + * Parses all imports. + * + * @param array $content + * @param string $file + */ + private function parseImports(array $content, $file) + { + if (!isset($content['imports'])) { + return; + } + + if (!is_array($content['imports'])) { + throw new InvalidArgumentException(sprintf('The "imports" key should contain an array in %s. Check your YAML syntax.', $file)); + } + + $defaultDirectory = dirname($file); + foreach ($content['imports'] as $import) { + if (!is_array($import)) { + throw new InvalidArgumentException(sprintf('The values in the "imports" key should be arrays in %s. Check your YAML syntax.', $file)); + } + + $this->setCurrentDir($defaultDirectory); + $this->import($import['resource'], null, isset($import['ignore_errors']) ? (bool) $import['ignore_errors'] : false, $file); + } + } + + /** + * Parses definitions. + * + * @param array $content + * @param string $file + */ + private function parseDefinitions(array $content, $file) + { + if (!isset($content['services'])) { + return; + } + + if (!is_array($content['services'])) { + throw new InvalidArgumentException(sprintf('The "services" key should contain an array in %s. Check your YAML syntax.', $file)); + } + + foreach ($content['services'] as $id => $service) { + $this->parseDefinition($id, $service, $file); + } + } + + /** + * Parses a definition. + * + * @param string $id + * @param array|string $service + * @param string $file + * + * @throws InvalidArgumentException When tags are invalid + */ + private function parseDefinition($id, $service, $file) + { + if (is_string($service) && 0 === strpos($service, '@')) { + $this->container->setAlias($id, substr($service, 1)); + + return; + } + + if (!is_array($service)) { + throw new InvalidArgumentException(sprintf('A service definition must be an array or a string starting with "@" but %s found for service "%s" in %s. Check your YAML syntax.', gettype($service), $id, $file)); + } + + static::checkDefinition($id, $service, $file); + + if (isset($service['alias'])) { + $public = !array_key_exists('public', $service) || (bool) $service['public']; + $this->container->setAlias($id, new Alias($service['alias'], $public)); + + foreach ($service as $key => $value) { + if (!in_array($key, array('alias', 'public'))) { + @trigger_error(sprintf('The configuration key "%s" is unsupported for the service "%s" which is defined as an alias in "%s". Allowed configuration keys for service aliases are "alias" and "public". The YamlFileLoader will raise an exception in Symfony 4.0, instead of silently ignoring unsupported attributes.', $key, $id, $file), E_USER_DEPRECATED); + } + } + + return; + } + + if (isset($service['parent'])) { + $definition = new DefinitionDecorator($service['parent']); + } else { + $definition = new Definition(); + } + + if (isset($service['class'])) { + $definition->setClass($service['class']); + } + + if (isset($service['shared'])) { + $definition->setShared($service['shared']); + } + + if (isset($service['synthetic'])) { + $definition->setSynthetic($service['synthetic']); + } + + if (isset($service['lazy'])) { + $definition->setLazy($service['lazy']); + } + + if (isset($service['public'])) { + $definition->setPublic($service['public']); + } + + if (isset($service['abstract'])) { + $definition->setAbstract($service['abstract']); + } + + if (array_key_exists('deprecated', $service)) { + $definition->setDeprecated(true, $service['deprecated']); + } + + if (isset($service['factory'])) { + $definition->setFactory($this->parseCallable($service['factory'], 'factory', $id, $file)); + } + + if (isset($service['file'])) { + $definition->setFile($service['file']); + } + + if (isset($service['arguments'])) { + $definition->setArguments($this->resolveServices($service['arguments'])); + } + + if (isset($service['properties'])) { + $definition->setProperties($this->resolveServices($service['properties'])); + } + + if (isset($service['configurator'])) { + $definition->setConfigurator($this->parseCallable($service['configurator'], 'configurator', $id, $file)); + } + + if (isset($service['calls'])) { + if (!is_array($service['calls'])) { + throw new InvalidArgumentException(sprintf('Parameter "calls" must be an array for service "%s" in %s. Check your YAML syntax.', $id, $file)); + } + + foreach ($service['calls'] as $call) { + if (isset($call['method'])) { + $method = $call['method']; + $args = isset($call['arguments']) ? $this->resolveServices($call['arguments']) : array(); + } else { + $method = $call[0]; + $args = isset($call[1]) ? $this->resolveServices($call[1]) : array(); + } + + $definition->addMethodCall($method, $args); + } + } + + if (isset($service['tags'])) { + if (!is_array($service['tags'])) { + throw new InvalidArgumentException(sprintf('Parameter "tags" must be an array for service "%s" in %s. Check your YAML syntax.', $id, $file)); + } + + foreach ($service['tags'] as $tag) { + if (!is_array($tag)) { + throw new InvalidArgumentException(sprintf('A "tags" entry must be an array for service "%s" in %s. Check your YAML syntax.', $id, $file)); + } + + if (!isset($tag['name'])) { + throw new InvalidArgumentException(sprintf('A "tags" entry is missing a "name" key for service "%s" in %s.', $id, $file)); + } + + if (!is_string($tag['name']) || '' === $tag['name']) { + throw new InvalidArgumentException(sprintf('The tag name for service "%s" in %s must be a non-empty string.', $id, $file)); + } + + $name = $tag['name']; + unset($tag['name']); + + foreach ($tag as $attribute => $value) { + if (!is_scalar($value) && null !== $value) { + throw new InvalidArgumentException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s" in %s. Check your YAML syntax.', $id, $name, $attribute, $file)); + } + } + + $definition->addTag($name, $tag); + } + } + + if (isset($service['decorates'])) { + if ('' !== $service['decorates'] && '@' === $service['decorates'][0]) { + throw new InvalidArgumentException(sprintf('The value of the "decorates" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $id, $service['decorates'], substr($service['decorates'], 1))); + } + + $renameId = isset($service['decoration_inner_name']) ? $service['decoration_inner_name'] : null; + $priority = isset($service['decoration_priority']) ? $service['decoration_priority'] : 0; + $definition->setDecoratedService($service['decorates'], $renameId, $priority); + } + + if (isset($service['autowire'])) { + $definition->setAutowired($service['autowire']); + } + + if (isset($service['autowiring_types'])) { + if (is_string($service['autowiring_types'])) { + $definition->addAutowiringType($service['autowiring_types']); + } else { + if (!is_array($service['autowiring_types'])) { + throw new InvalidArgumentException(sprintf('Parameter "autowiring_types" must be a string or an array for service "%s" in %s. Check your YAML syntax.', $id, $file)); + } + + foreach ($service['autowiring_types'] as $autowiringType) { + if (!is_string($autowiringType)) { + throw new InvalidArgumentException(sprintf('A "autowiring_types" attribute must be of type string for service "%s" in %s. Check your YAML syntax.', $id, $file)); + } + + $definition->addAutowiringType($autowiringType); + } + } + } + + $this->container->setDefinition($id, $definition); + } + + /** + * Parses a callable. + * + * @param string|array $callable A callable + * @param string $parameter A parameter (e.g. 'factory' or 'configurator') + * @param string $id A service identifier + * @param string $file A parsed file + * + * @throws InvalidArgumentException When errors are occuried + * + * @return string|array A parsed callable + */ + private function parseCallable($callable, $parameter, $id, $file) + { + if (is_string($callable)) { + if ('' !== $callable && '@' === $callable[0]) { + throw new InvalidArgumentException(sprintf('The value of the "%s" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $parameter, $id, $callable, substr($callable, 1))); + } + + if (false !== strpos($callable, ':') && false === strpos($callable, '::')) { + $parts = explode(':', $callable); + + return array($this->resolveServices('@'.$parts[0]), $parts[1]); + } + + return $callable; + } + + if (is_array($callable)) { + if (isset($callable[0]) && isset($callable[1])) { + return array($this->resolveServices($callable[0]), $callable[1]); + } + + throw new InvalidArgumentException(sprintf('Parameter "%s" must contain an array with two elements for service "%s" in %s. Check your YAML syntax.', $parameter, $id, $file)); + } + + throw new InvalidArgumentException(sprintf('Parameter "%s" must be a string or an array for service "%s" in %s. Check your YAML syntax.', $parameter, $id, $file)); + } + + /** + * Loads a YAML file. + * + * @param string $file + * + * @return array The file content + * + * @throws InvalidArgumentException when the given file is not a local file or when it does not exist + */ + protected function loadFile($file) + { + if (!class_exists('Symfony\Component\Yaml\Parser')) { + throw new RuntimeException('Unable to load YAML config files as the Symfony Yaml Component is not installed.'); + } + + if (!stream_is_local($file)) { + throw new InvalidArgumentException(sprintf('This is not a local file "%s".', $file)); + } + + if (!file_exists($file)) { + throw new InvalidArgumentException(sprintf('The service file "%s" is not valid.', $file)); + } + + if (null === $this->yamlParser) { + $this->yamlParser = new YamlParser(); + } + + try { + $configuration = $this->yamlParser->parse(file_get_contents($file), Yaml::PARSE_CONSTANT); + } catch (ParseException $e) { + throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $file), 0, $e); + } + + return $this->validate($configuration, $file); + } + + /** + * Validates a YAML file. + * + * @param mixed $content + * @param string $file + * + * @return array + * + * @throws InvalidArgumentException When service file is not valid + */ + private function validate($content, $file) + { + if (null === $content) { + return $content; + } + + if (!is_array($content)) { + throw new InvalidArgumentException(sprintf('The service file "%s" is not valid. It should contain an array. Check your YAML syntax.', $file)); + } + + foreach ($content as $namespace => $data) { + if (in_array($namespace, array('imports', 'parameters', 'services'))) { + continue; + } + + if (!$this->container->hasExtension($namespace)) { + $extensionNamespaces = array_filter(array_map(function ($ext) { return $ext->getAlias(); }, $this->container->getExtensions())); + throw new InvalidArgumentException(sprintf( + 'There is no extension able to load the configuration for "%s" (in %s). Looked for namespace "%s", found %s', + $namespace, + $file, + $namespace, + $extensionNamespaces ? sprintf('"%s"', implode('", "', $extensionNamespaces)) : 'none' + )); + } + } + + return $content; + } + + /** + * Resolves services. + * + * @param string|array $value + * + * @return array|string|Reference + */ + private function resolveServices($value) + { + if (is_array($value)) { + $value = array_map(array($this, 'resolveServices'), $value); + } elseif (is_string($value) && 0 === strpos($value, '@=')) { + return new Expression(substr($value, 2)); + } elseif (is_string($value) && 0 === strpos($value, '@')) { + if (0 === strpos($value, '@@')) { + $value = substr($value, 1); + $invalidBehavior = null; + } elseif (0 === strpos($value, '@?')) { + $value = substr($value, 2); + $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; + } else { + $value = substr($value, 1); + $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; + } + + if ('=' === substr($value, -1)) { + $value = substr($value, 0, -1); + } + + if (null !== $invalidBehavior) { + $value = new Reference($value, $invalidBehavior); + } + } + + return $value; + } + + /** + * Loads from Extensions. + * + * @param array $content + */ + private function loadFromExtensions(array $content) + { + foreach ($content as $namespace => $values) { + if (in_array($namespace, array('imports', 'parameters', 'services'))) { + continue; + } + + if (!is_array($values)) { + $values = array(); + } + + $this->container->loadFromExtension($namespace, $values); + } + } + + /** + * Checks the keywords used to define a service. + * + * @param string $id The service name + * @param array $definition The service definition to check + * @param string $file The loaded YAML file + */ + private static function checkDefinition($id, array $definition, $file) + { + foreach ($definition as $key => $value) { + if (!isset(static::$keywords[$key])) { + @trigger_error(sprintf('The configuration key "%s" is unsupported for service definition "%s" in "%s". Allowed configuration keys are "%s". The YamlFileLoader object will raise an exception instead in Symfony 4.0 when detecting an unsupported service configuration key.', $key, $id, $file, implode('", "', static::$keywords)), E_USER_DEPRECATED); + // @deprecated Uncomment the following statement in Symfony 4.0 + // and also update the corresponding unit test to make it expect + // an InvalidArgumentException exception. + //throw new InvalidArgumentException(sprintf('The configuration key "%s" is unsupported for service definition "%s" in "%s". Allowed configuration keys are "%s".', $key, $id, $file, implode('", "', static::$keywords))); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..674cc08e2a7d8319f45e3e984c1b40b9460fac78 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Parameter.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Parameter.php new file mode 100644 index 0000000000000000000000000000000000000000..cac6f6c4c2264d653e614db308b9f01ebeac0e36 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Parameter.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection; + +/** + * Parameter represents a parameter reference. + * + * @author Fabien Potencier + */ +class Parameter +{ + private $id; + + /** + * @param string $id The parameter key + */ + public function __construct($id) + { + $this->id = $id; + } + + /** + * @return string The parameter key + */ + public function __toString() + { + return (string) $this->id; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php new file mode 100644 index 0000000000000000000000000000000000000000..d20e53531aa3b37a1cf2fe9ed5416dd3ea4d0489 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\ParameterBag; + +use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * @author Nicolas Grekas + */ +class EnvPlaceholderParameterBag extends ParameterBag +{ + private $envPlaceholders = array(); + + /** + * {@inheritdoc} + */ + public function get($name) + { + if (0 === strpos($name, 'env(') && ')' === substr($name, -1) && 'env()' !== $name) { + $env = substr($name, 4, -1); + + if (isset($this->envPlaceholders[$env])) { + foreach ($this->envPlaceholders[$env] as $placeholder) { + return $placeholder; // return first result + } + } + if (preg_match('/\W/', $env)) { + throw new InvalidArgumentException(sprintf('Invalid %s name: only "word" characters are allowed.', $name)); + } + + if ($this->has($name)) { + $defaultValue = parent::get($name); + + if (null !== $defaultValue && !is_scalar($defaultValue)) { + throw new RuntimeException(sprintf('The default value of an env() parameter must be scalar or null, but "%s" given to "%s".', gettype($defaultValue), $name)); + } + } + + $uniqueName = md5($name.uniqid(mt_rand(), true)); + $placeholder = sprintf('env_%s_%s', $env, $uniqueName); + $this->envPlaceholders[$env][$placeholder] = $placeholder; + + return $placeholder; + } + + return parent::get($name); + } + + /** + * Returns the map of env vars used in the resolved parameter values to their placeholders. + * + * @return string[][] A map of env var names to their placeholders + */ + public function getEnvPlaceholders() + { + return $this->envPlaceholders; + } + + /** + * Merges the env placeholders of another EnvPlaceholderParameterBag. + */ + public function mergeEnvPlaceholders(self $bag) + { + if ($newPlaceholders = $bag->getEnvPlaceholders()) { + $this->envPlaceholders += $newPlaceholders; + + foreach ($newPlaceholders as $env => $placeholders) { + $this->envPlaceholders[$env] += $placeholders; + } + } + } + + /** + * {@inheritdoc} + */ + public function resolve() + { + if ($this->resolved) { + return; + } + parent::resolve(); + + foreach ($this->envPlaceholders as $env => $placeholders) { + if (!isset($this->parameters[$name = strtolower("env($env)")])) { + continue; + } + if (is_numeric($default = $this->parameters[$name])) { + $this->parameters[$name] = (string) $default; + } elseif (null !== $default && !is_scalar($default)) { + throw new RuntimeException(sprintf('The default value of env parameter "%s" must be scalar or null, %s given.', $env, gettype($default))); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php new file mode 100644 index 0000000000000000000000000000000000000000..ad65ad960f527b866a12f8f2527fe529e07a874e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\ParameterBag; + +use Symfony\Component\DependencyInjection\Exception\LogicException; + +/** + * Holds read-only parameters. + * + * @author Fabien Potencier + */ +class FrozenParameterBag extends ParameterBag +{ + /** + * For performance reasons, the constructor assumes that + * all keys are already lowercased. + * + * This is always the case when used internally. + * + * @param array $parameters An array of parameters + */ + public function __construct(array $parameters = array()) + { + $this->parameters = $parameters; + $this->resolved = true; + } + + /** + * {@inheritdoc} + */ + public function clear() + { + throw new LogicException('Impossible to call clear() on a frozen ParameterBag.'); + } + + /** + * {@inheritdoc} + */ + public function add(array $parameters) + { + throw new LogicException('Impossible to call add() on a frozen ParameterBag.'); + } + + /** + * {@inheritdoc} + */ + public function set($name, $value) + { + throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); + } + + /** + * {@inheritdoc} + */ + public function remove($name) + { + throw new LogicException('Impossible to call remove() on a frozen ParameterBag.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php new file mode 100644 index 0000000000000000000000000000000000000000..83ba7e7076fc1f8388c775cf5d1cc322f9597c76 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php @@ -0,0 +1,291 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\ParameterBag; + +use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; +use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; + +/** + * Holds parameters. + * + * @author Fabien Potencier + */ +class ParameterBag implements ParameterBagInterface +{ + protected $parameters = array(); + protected $resolved = false; + + /** + * @param array $parameters An array of parameters + */ + public function __construct(array $parameters = array()) + { + $this->add($parameters); + } + + /** + * Clears all parameters. + */ + public function clear() + { + $this->parameters = array(); + } + + /** + * Adds parameters to the service container parameters. + * + * @param array $parameters An array of parameters + */ + public function add(array $parameters) + { + foreach ($parameters as $key => $value) { + $this->parameters[strtolower($key)] = $value; + } + } + + /** + * {@inheritdoc} + */ + public function all() + { + return $this->parameters; + } + + /** + * {@inheritdoc} + */ + public function get($name) + { + $name = strtolower($name); + + if (!array_key_exists($name, $this->parameters)) { + if (!$name) { + throw new ParameterNotFoundException($name); + } + + $alternatives = array(); + foreach ($this->parameters as $key => $parameterValue) { + $lev = levenshtein($name, $key); + if ($lev <= strlen($name) / 3 || false !== strpos($key, $name)) { + $alternatives[] = $key; + } + } + + $nonNestedAlternative = null; + if (!count($alternatives) && false !== strpos($name, '.')) { + $namePartsLength = array_map('strlen', explode('.', $name)); + $key = substr($name, 0, -1 * (1 + array_pop($namePartsLength))); + while (count($namePartsLength)) { + if ($this->has($key)) { + if (is_array($this->get($key))) { + $nonNestedAlternative = $key; + } + break; + } + + $key = substr($key, 0, -1 * (1 + array_pop($namePartsLength))); + } + } + + throw new ParameterNotFoundException($name, null, null, null, $alternatives, $nonNestedAlternative); + } + + return $this->parameters[$name]; + } + + /** + * Sets a service container parameter. + * + * @param string $name The parameter name + * @param mixed $value The parameter value + */ + public function set($name, $value) + { + $this->parameters[strtolower($name)] = $value; + } + + /** + * {@inheritdoc} + */ + public function has($name) + { + return array_key_exists(strtolower($name), $this->parameters); + } + + /** + * Removes a parameter. + * + * @param string $name The parameter name + */ + public function remove($name) + { + unset($this->parameters[strtolower($name)]); + } + + /** + * {@inheritdoc} + */ + public function resolve() + { + if ($this->resolved) { + return; + } + + $parameters = array(); + foreach ($this->parameters as $key => $value) { + try { + $value = $this->resolveValue($value); + $parameters[$key] = $this->unescapeValue($value); + } catch (ParameterNotFoundException $e) { + $e->setSourceKey($key); + + throw $e; + } + } + + $this->parameters = $parameters; + $this->resolved = true; + } + + /** + * Replaces parameter placeholders (%name%) by their values. + * + * @param mixed $value A value + * @param array $resolving An array of keys that are being resolved (used internally to detect circular references) + * + * @return mixed The resolved value + * + * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist + * @throws ParameterCircularReferenceException if a circular reference if detected + * @throws RuntimeException when a given parameter has a type problem. + */ + public function resolveValue($value, array $resolving = array()) + { + if (is_array($value)) { + $args = array(); + foreach ($value as $k => $v) { + $args[$this->resolveValue($k, $resolving)] = $this->resolveValue($v, $resolving); + } + + return $args; + } + + if (!is_string($value)) { + return $value; + } + + return $this->resolveString($value, $resolving); + } + + /** + * Resolves parameters inside a string. + * + * @param string $value The string to resolve + * @param array $resolving An array of keys that are being resolved (used internally to detect circular references) + * + * @return string The resolved string + * + * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist + * @throws ParameterCircularReferenceException if a circular reference if detected + * @throws RuntimeException when a given parameter has a type problem. + */ + public function resolveString($value, array $resolving = array()) + { + // we do this to deal with non string values (Boolean, integer, ...) + // as the preg_replace_callback throw an exception when trying + // a non-string in a parameter value + if (preg_match('/^%([^%\s]+)%$/', $value, $match)) { + $key = $match[1]; + $lcKey = strtolower($key); + + if (isset($resolving[$lcKey])) { + throw new ParameterCircularReferenceException(array_keys($resolving)); + } + + $resolving[$lcKey] = true; + + return $this->resolved ? $this->get($key) : $this->resolveValue($this->get($key), $resolving); + } + + return preg_replace_callback('/%%|%([^%\s]+)%/', function ($match) use ($resolving, $value) { + // skip %% + if (!isset($match[1])) { + return '%%'; + } + + $key = $match[1]; + $lcKey = strtolower($key); + if (isset($resolving[$lcKey])) { + throw new ParameterCircularReferenceException(array_keys($resolving)); + } + + $resolved = $this->get($key); + + if (!is_string($resolved) && !is_numeric($resolved)) { + throw new RuntimeException(sprintf('A string value must be composed of strings and/or numbers, but found parameter "%s" of type %s inside string value "%s".', $key, gettype($resolved), $value)); + } + + $resolved = (string) $resolved; + $resolving[$lcKey] = true; + + return $this->isResolved() ? $resolved : $this->resolveString($resolved, $resolving); + }, $value); + } + + public function isResolved() + { + return $this->resolved; + } + + /** + * {@inheritdoc} + */ + public function escapeValue($value) + { + if (is_string($value)) { + return str_replace('%', '%%', $value); + } + + if (is_array($value)) { + $result = array(); + foreach ($value as $k => $v) { + $result[$k] = $this->escapeValue($v); + } + + return $result; + } + + return $value; + } + + /** + * {@inheritdoc} + */ + public function unescapeValue($value) + { + if (is_string($value)) { + return str_replace('%%', '%', $value); + } + + if (is_array($value)) { + $result = array(); + foreach ($value as $k => $v) { + $result[$k] = $this->unescapeValue($v); + } + + return $result; + } + + return $value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..7386df06481a7c649f47e77d7581aeacd3f99469 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\ParameterBag; + +use Symfony\Component\DependencyInjection\Exception\LogicException; +use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; + +/** + * ParameterBagInterface. + * + * @author Fabien Potencier + */ +interface ParameterBagInterface +{ + /** + * Clears all parameters. + * + * @throws LogicException if the ParameterBagInterface can not be cleared + */ + public function clear(); + + /** + * Adds parameters to the service container parameters. + * + * @param array $parameters An array of parameters + * + * @throws LogicException if the parameter can not be added + */ + public function add(array $parameters); + + /** + * Gets the service container parameters. + * + * @return array An array of parameters + */ + public function all(); + + /** + * Gets a service container parameter. + * + * @param string $name The parameter name + * + * @return mixed The parameter value + * + * @throws ParameterNotFoundException if the parameter is not defined + */ + public function get($name); + + /** + * Removes a parameter. + * + * @param string $name The parameter name + */ + public function remove($name); + + /** + * Sets a service container parameter. + * + * @param string $name The parameter name + * @param mixed $value The parameter value + * + * @throws LogicException if the parameter can not be set + */ + public function set($name, $value); + + /** + * Returns true if a parameter name is defined. + * + * @param string $name The parameter name + * + * @return bool true if the parameter name is defined, false otherwise + */ + public function has($name); + + /** + * Replaces parameter placeholders (%name%) by their values for all parameters. + */ + public function resolve(); + + /** + * Replaces parameter placeholders (%name%) by their values. + * + * @param mixed $value A value + * + * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist + */ + public function resolveValue($value); + + /** + * Escape parameter placeholders %. + * + * @param mixed $value + * + * @return mixed + */ + public function escapeValue($value); + + /** + * Unescape parameter placeholders %. + * + * @param mixed $value + * + * @return mixed + */ + public function unescapeValue($value); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/README.md b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/README.md new file mode 100644 index 0000000000000000000000000000000000000000..932647f94a903d62ac6297c5d9acc638f6c9261a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/README.md @@ -0,0 +1,14 @@ +DependencyInjection Component +============================= + +The DependencyInjection component allows you to standardize and centralize the +way objects are constructed in your application. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/dependency_injection/index.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/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Reference.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Reference.php new file mode 100644 index 0000000000000000000000000000000000000000..3c8b314f5619fb25384b5891fdd7449a5d393d25 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Reference.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\Component\DependencyInjection; + +/** + * Reference represents a service reference. + * + * @author Fabien Potencier + */ +class Reference +{ + private $id; + private $invalidBehavior; + + /** + * @param string $id The service identifier + * @param int $invalidBehavior The behavior when the service does not exist + * + * @see Container + */ + public function __construct($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) + { + $this->id = strtolower($id); + $this->invalidBehavior = $invalidBehavior; + } + + /** + * @return string The service identifier + */ + public function __toString() + { + return $this->id; + } + + /** + * Returns the behavior to be used when the service does not exist. + * + * @return int + */ + public function getInvalidBehavior() + { + return $this->invalidBehavior; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ResettableContainerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ResettableContainerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b74e676245714878541ec7a2a3fcf167630c4773 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ResettableContainerInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection; + +/** + * ResettableContainerInterface defines additional resetting functionality + * for containers, allowing to release shared services when the container is + * not needed anymore. + * + * @author Christophe Coevoet + */ +interface ResettableContainerInterface extends ContainerInterface +{ + /** + * Resets shared services from the container. + * + * The container is not intended to be used again after being reset in a normal workflow. This method is + * meant as a way to release references for ref-counting. + * A subsequent call to ContainerInterface::get will recreate a new instance of the shared service. + */ + public function reset(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/TaggedContainerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/TaggedContainerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..90b297fff2f37c86f159cec17ccb4025155ac2d4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/TaggedContainerInterface.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\Component\DependencyInjection; + +/** + * TaggedContainerInterface is the interface implemented when a container knows how to deals with tags. + * + * @author Fabien Potencier + */ +interface TaggedContainerInterface extends ContainerInterface +{ + /** + * Returns service ids for a given tag. + * + * @param string $name The tag name + * + * @return array An array of tags + */ + public function findTaggedServiceIds($name); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1c374662ff2e13a3b0a6d0d5fa5da52563b0206e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php @@ -0,0 +1,147 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass; +use Symfony\Component\DependencyInjection\Compiler\RepeatedPass; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class AnalyzeServiceReferencesPassTest extends TestCase +{ + public function testProcess() + { + $container = new ContainerBuilder(); + + $a = $container + ->register('a') + ->addArgument($ref1 = new Reference('b')) + ; + + $b = $container + ->register('b') + ->addMethodCall('setA', array($ref2 = new Reference('a'))) + ; + + $c = $container + ->register('c') + ->addArgument($ref3 = new Reference('a')) + ->addArgument($ref4 = new Reference('b')) + ; + + $d = $container + ->register('d') + ->setProperty('foo', $ref5 = new Reference('b')) + ; + + $e = $container + ->register('e') + ->setConfigurator(array($ref6 = new Reference('b'), 'methodName')) + ; + + $graph = $this->process($container); + + $this->assertCount(4, $edges = $graph->getNode('b')->getInEdges()); + + $this->assertSame($ref1, $edges[0]->getValue()); + $this->assertSame($ref4, $edges[1]->getValue()); + $this->assertSame($ref5, $edges[2]->getValue()); + $this->assertSame($ref6, $edges[3]->getValue()); + } + + public function testProcessDetectsReferencesFromInlinedDefinitions() + { + $container = new ContainerBuilder(); + + $container + ->register('a') + ; + + $container + ->register('b') + ->addArgument(new Definition(null, array($ref = new Reference('a')))) + ; + + $graph = $this->process($container); + + $this->assertCount(1, $refs = $graph->getNode('a')->getInEdges()); + $this->assertSame($ref, $refs[0]->getValue()); + } + + public function testProcessDetectsReferencesFromInlinedFactoryDefinitions() + { + $container = new ContainerBuilder(); + + $container + ->register('a') + ; + + $factory = new Definition(); + $factory->setFactory(array(new Reference('a'), 'a')); + + $container + ->register('b') + ->addArgument($factory) + ; + + $graph = $this->process($container); + + $this->assertTrue($graph->hasNode('a')); + $this->assertCount(1, $refs = $graph->getNode('a')->getInEdges()); + } + + public function testProcessDoesNotSaveDuplicateReferences() + { + $container = new ContainerBuilder(); + + $container + ->register('a') + ; + $container + ->register('b') + ->addArgument(new Definition(null, array($ref1 = new Reference('a')))) + ->addArgument(new Definition(null, array($ref2 = new Reference('a')))) + ; + + $graph = $this->process($container); + + $this->assertCount(2, $graph->getNode('a')->getInEdges()); + } + + public function testProcessDetectsFactoryReferences() + { + $container = new ContainerBuilder(); + + $container + ->register('foo', 'stdClass') + ->setFactory(array('stdClass', 'getInstance')); + + $container + ->register('bar', 'stdClass') + ->setFactory(array(new Reference('foo'), 'getInstance')); + + $graph = $this->process($container); + + $this->assertTrue($graph->hasNode('foo')); + $this->assertCount(1, $graph->getNode('foo')->getInEdges()); + } + + protected function process(ContainerBuilder $container) + { + $pass = new RepeatedPass(array(new AnalyzeServiceReferencesPass())); + $pass->process($container); + + return $container->getCompiler()->getServiceReferenceGraph(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutoAliasServicePassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutoAliasServicePassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..eb1d838122c7c4c6975c1fdc7a01cb73818439a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutoAliasServicePassTest.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Compiler\AutoAliasServicePass; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class AutoAliasServicePassTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException + */ + public function testProcessWithMissingParameter() + { + $container = new ContainerBuilder(); + + $container->register('example') + ->addTag('auto_alias', array('format' => '%non_existing%.example')); + + $pass = new AutoAliasServicePass(); + $pass->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + */ + public function testProcessWithMissingFormat() + { + $container = new ContainerBuilder(); + + $container->register('example') + ->addTag('auto_alias', array()); + $container->setParameter('existing', 'mysql'); + + $pass = new AutoAliasServicePass(); + $pass->process($container); + } + + public function testProcessWithNonExistingAlias() + { + $container = new ContainerBuilder(); + + $container->register('example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault') + ->addTag('auto_alias', array('format' => '%existing%.example')); + $container->setParameter('existing', 'mysql'); + + $pass = new AutoAliasServicePass(); + $pass->process($container); + + $this->assertEquals('Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault', $container->getDefinition('example')->getClass()); + } + + public function testProcessWithExistingAlias() + { + $container = new ContainerBuilder(); + + $container->register('example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault') + ->addTag('auto_alias', array('format' => '%existing%.example')); + + $container->register('mysql.example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMysql'); + $container->setParameter('existing', 'mysql'); + + $pass = new AutoAliasServicePass(); + $pass->process($container); + + $this->assertTrue($container->hasAlias('example')); + $this->assertEquals('mysql.example', $container->getAlias('example')); + $this->assertSame('Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMysql', $container->getDefinition('mysql.example')->getClass()); + } + + public function testProcessWithManualAlias() + { + $container = new ContainerBuilder(); + + $container->register('example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault') + ->addTag('auto_alias', array('format' => '%existing%.example')); + + $container->register('mysql.example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMysql'); + $container->register('mariadb.example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMariaDb'); + $container->setAlias('example', 'mariadb.example'); + $container->setParameter('existing', 'mysql'); + + $pass = new AutoAliasServicePass(); + $pass->process($container); + + $this->assertTrue($container->hasAlias('example')); + $this->assertEquals('mariadb.example', $container->getAlias('example')); + $this->assertSame('Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMariaDb', $container->getDefinition('mariadb.example')->getClass()); + } +} + +class ServiceClassDefault +{ +} + +class ServiceClassMysql extends ServiceClassDefault +{ +} + +class ServiceClassMariaDb extends ServiceClassMysql +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..67f313f72283d43bc82cc0d7fd5bad35ae9a82f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php @@ -0,0 +1,731 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Compiler\AutowirePass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Tests\Fixtures\includes\FooVariadic; + +/** + * @author Kévin Dunglas + */ +class AutowirePassTest extends TestCase +{ + public function testProcess() + { + $container = new ContainerBuilder(); + + $container->register('foo', __NAMESPACE__.'\Foo'); + $barDefinition = $container->register('bar', __NAMESPACE__.'\Bar'); + $barDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertCount(1, $container->getDefinition('bar')->getArguments()); + $this->assertEquals('foo', (string) $container->getDefinition('bar')->getArgument(0)); + } + + /** + * @requires PHP 5.6 + */ + public function testProcessVariadic() + { + $container = new ContainerBuilder(); + $container->register('foo', Foo::class); + $definition = $container->register('fooVariadic', FooVariadic::class); + $definition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertCount(1, $container->getDefinition('fooVariadic')->getArguments()); + $this->assertEquals('foo', (string) $container->getDefinition('fooVariadic')->getArgument(0)); + } + + public function testProcessAutowireParent() + { + $container = new ContainerBuilder(); + + $container->register('b', __NAMESPACE__.'\B'); + $cDefinition = $container->register('c', __NAMESPACE__.'\C'); + $cDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertCount(1, $container->getDefinition('c')->getArguments()); + $this->assertEquals('b', (string) $container->getDefinition('c')->getArgument(0)); + } + + public function testProcessAutowireInterface() + { + $container = new ContainerBuilder(); + + $container->register('f', __NAMESPACE__.'\F'); + $gDefinition = $container->register('g', __NAMESPACE__.'\G'); + $gDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertCount(3, $container->getDefinition('g')->getArguments()); + $this->assertEquals('f', (string) $container->getDefinition('g')->getArgument(0)); + $this->assertEquals('f', (string) $container->getDefinition('g')->getArgument(1)); + $this->assertEquals('f', (string) $container->getDefinition('g')->getArgument(2)); + } + + public function testCompleteExistingDefinition() + { + $container = new ContainerBuilder(); + + $container->register('b', __NAMESPACE__.'\B'); + $container->register('f', __NAMESPACE__.'\F'); + $hDefinition = $container->register('h', __NAMESPACE__.'\H')->addArgument(new Reference('b')); + $hDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertCount(2, $container->getDefinition('h')->getArguments()); + $this->assertEquals('b', (string) $container->getDefinition('h')->getArgument(0)); + $this->assertEquals('f', (string) $container->getDefinition('h')->getArgument(1)); + } + + public function testCompleteExistingDefinitionWithNotDefinedArguments() + { + $container = new ContainerBuilder(); + + $container->register('b', __NAMESPACE__.'\B'); + $container->register('f', __NAMESPACE__.'\F'); + $hDefinition = $container->register('h', __NAMESPACE__.'\H')->addArgument('')->addArgument(''); + $hDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertCount(2, $container->getDefinition('h')->getArguments()); + $this->assertEquals('b', (string) $container->getDefinition('h')->getArgument(0)); + $this->assertEquals('f', (string) $container->getDefinition('h')->getArgument(1)); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage Unable to autowire argument of type "Symfony\Component\DependencyInjection\Tests\Compiler\CollisionInterface" for the service "a". Multiple services exist for this interface (c1, c2, c3). + */ + public function testTypeCollision() + { + $container = new ContainerBuilder(); + + $container->register('c1', __NAMESPACE__.'\CollisionA'); + $container->register('c2', __NAMESPACE__.'\CollisionB'); + $container->register('c3', __NAMESPACE__.'\CollisionB'); + $aDefinition = $container->register('a', __NAMESPACE__.'\CannotBeAutowired'); + $aDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage Unable to autowire argument of type "Symfony\Component\DependencyInjection\Tests\Compiler\Foo" for the service "a". Multiple services exist for this class (a1, a2). + */ + public function testTypeNotGuessable() + { + $container = new ContainerBuilder(); + + $container->register('a1', __NAMESPACE__.'\Foo'); + $container->register('a2', __NAMESPACE__.'\Foo'); + $aDefinition = $container->register('a', __NAMESPACE__.'\NotGuessableArgument'); + $aDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage Unable to autowire argument of type "Symfony\Component\DependencyInjection\Tests\Compiler\A" for the service "a". Multiple services exist for this class (a1, a2). + */ + public function testTypeNotGuessableWithSubclass() + { + $container = new ContainerBuilder(); + + $container->register('a1', __NAMESPACE__.'\B'); + $container->register('a2', __NAMESPACE__.'\B'); + $aDefinition = $container->register('a', __NAMESPACE__.'\NotGuessableArgumentForSubclass'); + $aDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage Unable to autowire argument of type "Symfony\Component\DependencyInjection\Tests\Compiler\CollisionInterface" for the service "a". No services were found matching this interface and it cannot be auto-registered. + */ + public function testTypeNotGuessableNoServicesFound() + { + $container = new ContainerBuilder(); + + $aDefinition = $container->register('a', __NAMESPACE__.'\CannotBeAutowired'); + $aDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + } + + public function testTypeNotGuessableWithTypeSet() + { + $container = new ContainerBuilder(); + + $container->register('a1', __NAMESPACE__.'\Foo'); + $container->register('a2', __NAMESPACE__.'\Foo'); + $container->register('a3', __NAMESPACE__.'\Foo')->addAutowiringType(__NAMESPACE__.'\Foo'); + $aDefinition = $container->register('a', __NAMESPACE__.'\NotGuessableArgument'); + $aDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertCount(1, $container->getDefinition('a')->getArguments()); + $this->assertEquals('a3', (string) $container->getDefinition('a')->getArgument(0)); + } + + public function testWithTypeSet() + { + $container = new ContainerBuilder(); + + $container->register('c1', __NAMESPACE__.'\CollisionA'); + $container->register('c2', __NAMESPACE__.'\CollisionB')->addAutowiringType(__NAMESPACE__.'\CollisionInterface'); + $aDefinition = $container->register('a', __NAMESPACE__.'\CannotBeAutowired'); + $aDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertCount(1, $container->getDefinition('a')->getArguments()); + $this->assertEquals('c2', (string) $container->getDefinition('a')->getArgument(0)); + } + + public function testCreateDefinition() + { + $container = new ContainerBuilder(); + + $coopTilleulsDefinition = $container->register('coop_tilleuls', __NAMESPACE__.'\LesTilleuls'); + $coopTilleulsDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertCount(1, $container->getDefinition('coop_tilleuls')->getArguments()); + $this->assertEquals('autowired.symfony\component\dependencyinjection\tests\compiler\dunglas', $container->getDefinition('coop_tilleuls')->getArgument(0)); + + $dunglasDefinition = $container->getDefinition('autowired.Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas'); + $this->assertEquals(__NAMESPACE__.'\Dunglas', $dunglasDefinition->getClass()); + $this->assertFalse($dunglasDefinition->isPublic()); + $this->assertCount(1, $dunglasDefinition->getArguments()); + $this->assertEquals('autowired.symfony\component\dependencyinjection\tests\compiler\lille', $dunglasDefinition->getArgument(0)); + + $lilleDefinition = $container->getDefinition('autowired.Symfony\Component\DependencyInjection\Tests\Compiler\Lille'); + $this->assertEquals(__NAMESPACE__.'\Lille', $lilleDefinition->getClass()); + } + + public function testResolveParameter() + { + $container = new ContainerBuilder(); + + $container->setParameter('class_name', __NAMESPACE__.'\Foo'); + $container->register('foo', '%class_name%'); + $barDefinition = $container->register('bar', __NAMESPACE__.'\Bar'); + $barDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertEquals('foo', $container->getDefinition('bar')->getArgument(0)); + } + + public function testOptionalParameter() + { + $container = new ContainerBuilder(); + + $container->register('a', __NAMESPACE__.'\A'); + $container->register('foo', __NAMESPACE__.'\Foo'); + $optDefinition = $container->register('opt', __NAMESPACE__.'\OptionalParameter'); + $optDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $definition = $container->getDefinition('opt'); + $this->assertNull($definition->getArgument(0)); + $this->assertEquals('a', $definition->getArgument(1)); + $this->assertEquals('foo', $definition->getArgument(2)); + } + + public function testDontTriggerAutowiring() + { + $container = new ContainerBuilder(); + + $container->register('foo', __NAMESPACE__.'\Foo'); + $container->register('bar', __NAMESPACE__.'\Bar'); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertCount(0, $container->getDefinition('bar')->getArguments()); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage Cannot autowire argument 2 for Symfony\Component\DependencyInjection\Tests\Compiler\BadTypeHintedArgument because the type-hinted class does not exist (Class Symfony\Component\DependencyInjection\Tests\Compiler\NotARealClass does not exist). + */ + public function testClassNotFoundThrowsException() + { + $container = new ContainerBuilder(); + + $aDefinition = $container->register('a', __NAMESPACE__.'\BadTypeHintedArgument'); + $aDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage Cannot autowire argument 2 for Symfony\Component\DependencyInjection\Tests\Compiler\BadParentTypeHintedArgument because the type-hinted class does not exist (Class Symfony\Component\DependencyInjection\Tests\Compiler\OptionalServiceClass does not exist). + */ + public function testParentClassNotFoundThrowsException() + { + $container = new ContainerBuilder(); + + $aDefinition = $container->register('a', __NAMESPACE__.'\BadParentTypeHintedArgument'); + $aDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + } + + public function testDontUseAbstractServices() + { + $container = new ContainerBuilder(); + + $container->register('abstract_foo', __NAMESPACE__.'\Foo')->setAbstract(true); + $container->register('foo', __NAMESPACE__.'\Foo'); + $container->register('bar', __NAMESPACE__.'\Bar')->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $arguments = $container->getDefinition('bar')->getArguments(); + $this->assertSame('foo', (string) $arguments[0]); + } + + public function testSomeSpecificArgumentsAreSet() + { + $container = new ContainerBuilder(); + + $container->register('foo', __NAMESPACE__.'\Foo'); + $container->register('a', __NAMESPACE__.'\A'); + $container->register('dunglas', __NAMESPACE__.'\Dunglas'); + $container->register('multiple', __NAMESPACE__.'\MultipleArguments') + ->setAutowired(true) + // set the 2nd (index 1) argument only: autowire the first and third + // args are: A, Foo, Dunglas + ->setArguments(array( + 1 => new Reference('foo'), + )); + + $pass = new AutowirePass(); + $pass->process($container); + + $definition = $container->getDefinition('multiple'); + $this->assertEquals( + array( + new Reference('a'), + new Reference('foo'), + new Reference('dunglas'), + ), + $definition->getArguments() + ); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage Unable to autowire argument index 1 ($foo) for the service "arg_no_type_hint". If this is an object, give it a type-hint. Otherwise, specify this argument's value explicitly. + */ + public function testScalarArgsCannotBeAutowired() + { + $container = new ContainerBuilder(); + + $container->register('a', __NAMESPACE__.'\A'); + $container->register('dunglas', __NAMESPACE__.'\Dunglas'); + $container->register('arg_no_type_hint', __NAMESPACE__.'\MultipleArguments') + ->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $container->getDefinition('arg_no_type_hint'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage Unable to autowire argument index 1 ($foo) for the service "not_really_optional_scalar". If this is an object, give it a type-hint. Otherwise, specify this argument's value explicitly. + */ + public function testOptionalScalarNotReallyOptionalThrowException() + { + $container = new ContainerBuilder(); + + $container->register('a', __NAMESPACE__.'\A'); + $container->register('lille', __NAMESPACE__.'\Lille'); + $container->register('not_really_optional_scalar', __NAMESPACE__.'\MultipleArgumentsOptionalScalarNotReallyOptional') + ->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + } + + public function testOptionalScalarArgsDontMessUpOrder() + { + $container = new ContainerBuilder(); + + $container->register('a', __NAMESPACE__.'\A'); + $container->register('lille', __NAMESPACE__.'\Lille'); + $container->register('with_optional_scalar', __NAMESPACE__.'\MultipleArgumentsOptionalScalar') + ->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $definition = $container->getDefinition('with_optional_scalar'); + $this->assertEquals( + array( + new Reference('a'), + // use the default value + 'default_val', + new Reference('lille'), + ), + $definition->getArguments() + ); + } + + public function testOptionalScalarArgsNotPassedIfLast() + { + $container = new ContainerBuilder(); + + $container->register('a', __NAMESPACE__.'\A'); + $container->register('lille', __NAMESPACE__.'\Lille'); + $container->register('with_optional_scalar_last', __NAMESPACE__.'\MultipleArgumentsOptionalScalarLast') + ->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $definition = $container->getDefinition('with_optional_scalar_last'); + $this->assertEquals( + array( + new Reference('a'), + new Reference('lille'), + // third arg shouldn't *need* to be passed + // but that's hard to "pull of" with autowiring, so + // this assumes passing the default val is ok + 'some_val', + ), + $definition->getArguments() + ); + } + + /** + * @dataProvider getCreateResourceTests + */ + public function testCreateResourceForClass($className, $isEqual) + { + $startingResource = AutowirePass::createResourceForClass( + new \ReflectionClass(__NAMESPACE__.'\ClassForResource') + ); + $newResource = AutowirePass::createResourceForClass( + new \ReflectionClass(__NAMESPACE__.'\\'.$className) + ); + + // hack so the objects don't differ by the class name + $startingReflObject = new \ReflectionObject($startingResource); + $reflProp = $startingReflObject->getProperty('class'); + $reflProp->setAccessible(true); + $reflProp->setValue($startingResource, __NAMESPACE__.'\\'.$className); + + if ($isEqual) { + $this->assertEquals($startingResource, $newResource); + } else { + $this->assertNotEquals($startingResource, $newResource); + } + } + + public function getCreateResourceTests() + { + return array( + array('IdenticalClassResource', true), + array('ClassChangedConstructorArgs', false), + ); + } + + public function testIgnoreServiceWithClassNotExisting() + { + $container = new ContainerBuilder(); + + $container->register('class_not_exist', __NAMESPACE__.'\OptionalServiceClass'); + + $barDefinition = $container->register('bar', __NAMESPACE__.'\Bar'); + $barDefinition->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertTrue($container->hasDefinition('bar')); + } + + public function testEmptyStringIsKept() + { + $container = new ContainerBuilder(); + + $container->register('a', __NAMESPACE__.'\A'); + $container->register('lille', __NAMESPACE__.'\Lille'); + $container->register('foo', __NAMESPACE__.'\MultipleArgumentsOptionalScalar') + ->setAutowired(true) + ->setArguments(array('', '')); + + $pass = new AutowirePass(); + $pass->process($container); + + $this->assertEquals(array(new Reference('a'), '', new Reference('lille')), $container->getDefinition('foo')->getArguments()); + } + + /** + * @dataProvider provideAutodiscoveredAutowiringOrder + * + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMEssage Unable to autowire argument of type "Symfony\Component\DependencyInjection\Tests\Compiler\CollisionInterface" for the service "a". Multiple services exist for this interface (autowired.Symfony\Component\DependencyInjection\Tests\Compiler\CollisionA, autowired.Symfony\Component\DependencyInjection\Tests\Compiler\CollisionB). + */ + public function testAutodiscoveredAutowiringOrder($class) + { + $container = new ContainerBuilder(); + + $container->register('a', __NAMESPACE__.'\\'.$class) + ->setAutowired(true); + + $pass = new AutowirePass(); + $pass->process($container); + } + + public function provideAutodiscoveredAutowiringOrder() + { + return array( + array('CannotBeAutowiredForwardOrder'), + array('CannotBeAutowiredReverseOrder'), + ); + } +} + +class Foo +{ +} + +class Bar +{ + public function __construct(Foo $foo) + { + } +} + +class A +{ +} + +class B extends A +{ +} + +class C +{ + public function __construct(A $a) + { + } +} + +interface DInterface +{ +} + +interface EInterface extends DInterface +{ +} + +interface IInterface +{ +} + +class I implements IInterface +{ +} + +class F extends I implements EInterface +{ +} + +class G +{ + public function __construct(DInterface $d, EInterface $e, IInterface $i) + { + } +} + +class H +{ + public function __construct(B $b, DInterface $d) + { + } +} + +interface CollisionInterface +{ +} + +class CollisionA implements CollisionInterface +{ +} + +class CollisionB implements CollisionInterface +{ +} + +class CannotBeAutowired +{ + public function __construct(CollisionInterface $collision) + { + } +} + +class CannotBeAutowiredForwardOrder +{ + public function __construct(CollisionA $a, CollisionInterface $b, CollisionB $c) + { + } +} + +class CannotBeAutowiredReverseOrder +{ + public function __construct(CollisionA $a, CollisionB $c, CollisionInterface $b) + { + } +} + +class Lille +{ +} + +class Dunglas +{ + public function __construct(Lille $l) + { + } +} + +class LesTilleuls +{ + public function __construct(Dunglas $k) + { + } +} + +class OptionalParameter +{ + public function __construct(CollisionInterface $c = null, A $a, Foo $f = null) + { + } +} + +class BadTypeHintedArgument +{ + public function __construct(Dunglas $k, NotARealClass $r) + { + } +} +class BadParentTypeHintedArgument +{ + public function __construct(Dunglas $k, OptionalServiceClass $r) + { + } +} +class NotGuessableArgument +{ + public function __construct(Foo $k) + { + } +} +class NotGuessableArgumentForSubclass +{ + public function __construct(A $k) + { + } +} +class MultipleArguments +{ + public function __construct(A $k, $foo, Dunglas $dunglas) + { + } +} + +class MultipleArgumentsOptionalScalar +{ + public function __construct(A $a, $foo = 'default_val', Lille $lille = null) + { + } +} +class MultipleArgumentsOptionalScalarLast +{ + public function __construct(A $a, Lille $lille, $foo = 'some_val') + { + } +} +class MultipleArgumentsOptionalScalarNotReallyOptional +{ + public function __construct(A $a, $foo = 'default_val', Lille $lille) + { + } +} + +/* + * Classes used for testing createResourceForClass + */ +class ClassForResource +{ + public function __construct($foo, Bar $bar = null) + { + } + + public function setBar(Bar $bar) + { + } +} +class IdenticalClassResource extends ClassForResource +{ +} +class ClassChangedConstructorArgs extends ClassForResource +{ + public function __construct($foo, Bar $bar, $baz) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d894f7ab6f6d0140a9c046087d5c9d6481c6c79f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass; +use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass; +use Symfony\Component\DependencyInjection\Compiler\Compiler; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class CheckCircularReferencesPassTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException + */ + public function testProcess() + { + $container = new ContainerBuilder(); + $container->register('a')->addArgument(new Reference('b')); + $container->register('b')->addArgument(new Reference('a')); + + $this->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException + */ + public function testProcessWithAliases() + { + $container = new ContainerBuilder(); + $container->register('a')->addArgument(new Reference('b')); + $container->setAlias('b', 'c'); + $container->setAlias('c', 'a'); + + $this->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException + */ + public function testProcessWithFactory() + { + $container = new ContainerBuilder(); + + $container + ->register('a', 'stdClass') + ->setFactory(array(new Reference('b'), 'getInstance')); + + $container + ->register('b', 'stdClass') + ->setFactory(array(new Reference('a'), 'getInstance')); + + $this->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException + */ + public function testProcessDetectsIndirectCircularReference() + { + $container = new ContainerBuilder(); + $container->register('a')->addArgument(new Reference('b')); + $container->register('b')->addArgument(new Reference('c')); + $container->register('c')->addArgument(new Reference('a')); + + $this->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException + */ + public function testProcessDetectsIndirectCircularReferenceWithFactory() + { + $container = new ContainerBuilder(); + + $container->register('a')->addArgument(new Reference('b')); + + $container + ->register('b', 'stdClass') + ->setFactory(array(new Reference('c'), 'getInstance')); + + $container->register('c')->addArgument(new Reference('a')); + + $this->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException + */ + public function testDeepCircularReference() + { + $container = new ContainerBuilder(); + $container->register('a')->addArgument(new Reference('b')); + $container->register('b')->addArgument(new Reference('c')); + $container->register('c')->addArgument(new Reference('b')); + + $this->process($container); + } + + public function testProcessIgnoresMethodCalls() + { + $container = new ContainerBuilder(); + $container->register('a')->addArgument(new Reference('b')); + $container->register('b')->addMethodCall('setA', array(new Reference('a'))); + + $this->process($container); + } + + protected function process(ContainerBuilder $container) + { + $compiler = new Compiler(); + $passConfig = $compiler->getPassConfig(); + $passConfig->setOptimizationPasses(array( + new AnalyzeServiceReferencesPass(true), + new CheckCircularReferencesPass(), + )); + $passConfig->setRemovingPasses(array()); + + $compiler->compile($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c5f236668cdb611f1d0bcdbdc7c4912461c1e393 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Compiler\CheckDefinitionValidityPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class CheckDefinitionValidityPassTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + */ + public function testProcessDetectsSyntheticNonPublicDefinitions() + { + $container = new ContainerBuilder(); + $container->register('a')->setSynthetic(true)->setPublic(false); + + $this->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + */ + public function testProcessDetectsNonSyntheticNonAbstractDefinitionWithoutClass() + { + $container = new ContainerBuilder(); + $container->register('a')->setSynthetic(false)->setAbstract(false); + + $this->process($container); + } + + public function testProcess() + { + $container = new ContainerBuilder(); + $container->register('a', 'class'); + $container->register('b', 'class')->setSynthetic(true)->setPublic(true); + $container->register('c', 'class')->setAbstract(true); + $container->register('d', 'class')->setSynthetic(true); + + $this->process($container); + } + + public function testValidTags() + { + $container = new ContainerBuilder(); + $container->register('a', 'class')->addTag('foo', array('bar' => 'baz')); + $container->register('b', 'class')->addTag('foo', array('bar' => null)); + $container->register('c', 'class')->addTag('foo', array('bar' => 1)); + $container->register('d', 'class')->addTag('foo', array('bar' => 1.1)); + + $this->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + */ + public function testInvalidTags() + { + $container = new ContainerBuilder(); + $container->register('a', 'class')->addTag('foo', array('bar' => array('baz' => 'baz'))); + + $this->process($container); + } + + protected function process(ContainerBuilder $container) + { + $pass = new CheckDefinitionValidityPass(); + $pass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c5f4ec7f95690693ed3d5cf5a01e477f8a3d649e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class CheckExceptionOnInvalidReferenceBehaviorPassTest extends TestCase +{ + public function testProcess() + { + $container = new ContainerBuilder(); + + $container + ->register('a', '\stdClass') + ->addArgument(new Reference('b')) + ; + $container->register('b', '\stdClass'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException + */ + public function testProcessThrowsExceptionOnInvalidReference() + { + $container = new ContainerBuilder(); + + $container + ->register('a', '\stdClass') + ->addArgument(new Reference('b')) + ; + + $this->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException + */ + public function testProcessThrowsExceptionOnInvalidReferenceFromInlinedDefinition() + { + $container = new ContainerBuilder(); + + $def = new Definition(); + $def->addArgument(new Reference('b')); + + $container + ->register('a', '\stdClass') + ->addArgument($def) + ; + + $this->process($container); + } + + private function process(ContainerBuilder $container) + { + $pass = new CheckExceptionOnInvalidReferenceBehaviorPass(); + $pass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckReferenceValidityPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckReferenceValidityPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5d5204ba5c546358f50cd5e98c0481b0c3045c5d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckReferenceValidityPassTest.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Compiler\CheckReferenceValidityPass; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class CheckReferenceValidityPassTest extends TestCase +{ + /** + * @expectedException \RuntimeException + */ + public function testProcessDetectsReferenceToAbstractDefinition() + { + $container = new ContainerBuilder(); + + $container->register('a')->setAbstract(true); + $container->register('b')->addArgument(new Reference('a')); + + $this->process($container); + } + + public function testProcess() + { + $container = new ContainerBuilder(); + $container->register('a')->addArgument(new Reference('b')); + $container->register('b'); + + $this->process($container); + } + + protected function process(ContainerBuilder $container) + { + $pass = new CheckReferenceValidityPass(); + $pass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d8a2d64da9a21cd7959015db5f1a18e7675c102b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php @@ -0,0 +1,173 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\DecoratorServicePass; + +class DecoratorServicePassTest extends TestCase +{ + public function testProcessWithoutAlias() + { + $container = new ContainerBuilder(); + $fooDefinition = $container + ->register('foo') + ->setPublic(false) + ; + $fooExtendedDefinition = $container + ->register('foo.extended') + ->setPublic(true) + ->setDecoratedService('foo') + ; + $barDefinition = $container + ->register('bar') + ->setPublic(true) + ; + $barExtendedDefinition = $container + ->register('bar.extended') + ->setPublic(true) + ->setDecoratedService('bar', 'bar.yoo') + ; + + $this->process($container); + + $this->assertEquals('foo.extended', $container->getAlias('foo')); + $this->assertFalse($container->getAlias('foo')->isPublic()); + + $this->assertEquals('bar.extended', $container->getAlias('bar')); + $this->assertTrue($container->getAlias('bar')->isPublic()); + + $this->assertSame($fooDefinition, $container->getDefinition('foo.extended.inner')); + $this->assertFalse($container->getDefinition('foo.extended.inner')->isPublic()); + + $this->assertSame($barDefinition, $container->getDefinition('bar.yoo')); + $this->assertFalse($container->getDefinition('bar.yoo')->isPublic()); + + $this->assertNull($fooExtendedDefinition->getDecoratedService()); + $this->assertNull($barExtendedDefinition->getDecoratedService()); + } + + public function testProcessWithAlias() + { + $container = new ContainerBuilder(); + $container + ->register('foo') + ->setPublic(true) + ; + $container->setAlias('foo.alias', new Alias('foo', false)); + $fooExtendedDefinition = $container + ->register('foo.extended') + ->setPublic(true) + ->setDecoratedService('foo.alias') + ; + + $this->process($container); + + $this->assertEquals('foo.extended', $container->getAlias('foo.alias')); + $this->assertFalse($container->getAlias('foo.alias')->isPublic()); + + $this->assertEquals('foo', $container->getAlias('foo.extended.inner')); + $this->assertFalse($container->getAlias('foo.extended.inner')->isPublic()); + + $this->assertNull($fooExtendedDefinition->getDecoratedService()); + } + + public function testProcessWithPriority() + { + $container = new ContainerBuilder(); + $fooDefinition = $container + ->register('foo') + ->setPublic(false) + ; + $barDefinition = $container + ->register('bar') + ->setPublic(true) + ->setDecoratedService('foo') + ; + $bazDefinition = $container + ->register('baz') + ->setPublic(true) + ->setDecoratedService('foo', null, 5) + ; + $quxDefinition = $container + ->register('qux') + ->setPublic(true) + ->setDecoratedService('foo', null, 3) + ; + + $this->process($container); + + $this->assertEquals('bar', $container->getAlias('foo')); + $this->assertFalse($container->getAlias('foo')->isPublic()); + + $this->assertSame($fooDefinition, $container->getDefinition('baz.inner')); + $this->assertFalse($container->getDefinition('baz.inner')->isPublic()); + + $this->assertEquals('qux', $container->getAlias('bar.inner')); + $this->assertFalse($container->getAlias('bar.inner')->isPublic()); + + $this->assertEquals('baz', $container->getAlias('qux.inner')); + $this->assertFalse($container->getAlias('qux.inner')->isPublic()); + + $this->assertNull($barDefinition->getDecoratedService()); + $this->assertNull($bazDefinition->getDecoratedService()); + $this->assertNull($quxDefinition->getDecoratedService()); + } + + public function testProcessMovesTagsFromDecoratedDefinitionToDecoratingDefinition() + { + $container = new ContainerBuilder(); + $container + ->register('foo') + ->setTags(array('bar' => array('attr' => 'baz'))) + ; + $container + ->register('baz') + ->setTags(array('foobar' => array('attr' => 'bar'))) + ->setDecoratedService('foo') + ; + + $this->process($container); + + $this->assertEmpty($container->getDefinition('baz.inner')->getTags()); + $this->assertEquals(array('bar' => array('attr' => 'baz'), 'foobar' => array('attr' => 'bar')), $container->getDefinition('baz')->getTags()); + } + + public function testProcessMergesAutowiringTypesInDecoratingDefinitionAndRemoveThemFromDecoratedDefinition() + { + $container = new ContainerBuilder(); + + $container + ->register('parent') + ->addAutowiringType('Bar') + ; + + $container + ->register('child') + ->setDecoratedService('parent') + ->addAutowiringType('Foo') + ; + + $this->process($container); + + $this->assertEquals(array('Bar', 'Foo'), $container->getDefinition('child')->getAutowiringTypes()); + $this->assertEmpty($container->getDefinition('child.inner')->getAutowiringTypes()); + } + + protected function process(ContainerBuilder $container) + { + $repeatedPass = new DecoratorServicePass(); + $repeatedPass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ExtensionCompilerPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ExtensionCompilerPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e083611458770b53f415796fdc07df6e0777d86a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ExtensionCompilerPassTest.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Compiler\ExtensionCompilerPass; + +/** + * @author Wouter J + */ +class ExtensionCompilerPassTest extends TestCase +{ + private $container; + private $pass; + + protected function setUp() + { + $this->container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->getMock(); + $this->pass = new ExtensionCompilerPass(); + } + + public function testProcess() + { + $extension1 = $this->createExtensionMock(true); + $extension1->expects($this->once())->method('process'); + $extension2 = $this->createExtensionMock(false); + $extension3 = $this->createExtensionMock(false); + $extension4 = $this->createExtensionMock(true); + $extension4->expects($this->once())->method('process'); + + $this->container->expects($this->any()) + ->method('getExtensions') + ->will($this->returnValue(array($extension1, $extension2, $extension3, $extension4))) + ; + + $this->pass->process($this->container); + } + + private function createExtensionMock($hasInlineCompile) + { + return $this->getMockBuilder('Symfony\Component\DependencyInjection\\'.( + $hasInlineCompile + ? 'Compiler\CompilerPassInterface' + : 'Extension\ExtensionInterface' + ))->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/FactoryReturnTypePassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/FactoryReturnTypePassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..65722f4fde98711eebfdedd8e0a11d77337a2bdd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/FactoryReturnTypePassTest.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Compiler\FactoryReturnTypePass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Tests\Fixtures\factoryFunction; +use Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy; +use Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryParent; + +/** + * @author Guilhem N. + */ +class FactoryReturnTypePassTest extends TestCase +{ + public function testProcess() + { + $container = new ContainerBuilder(); + + $factory = $container->register('factory'); + $factory->setFactory(array(FactoryDummy::class, 'createFactory')); + + $container->setAlias('alias_factory', 'factory'); + + $foo = $container->register('foo'); + $foo->setFactory(array(new Reference('alias_factory'), 'create')); + + $bar = $container->register('bar', __CLASS__); + $bar->setFactory(array(new Reference('factory'), 'create')); + + $pass = new FactoryReturnTypePass(); + $pass->process($container); + + if (method_exists(\ReflectionMethod::class, 'getReturnType')) { + $this->assertEquals(FactoryDummy::class, $factory->getClass()); + $this->assertEquals(\stdClass::class, $foo->getClass()); + } else { + $this->assertNull($factory->getClass()); + $this->assertNull($foo->getClass()); + } + $this->assertEquals(__CLASS__, $bar->getClass()); + } + + /** + * @dataProvider returnTypesProvider + */ + public function testReturnTypes($factory, $returnType, $hhvmSupport = true) + { + if (!$hhvmSupport && defined('HHVM_VERSION')) { + $this->markTestSkipped('Scalar typehints not supported by hhvm.'); + } + + $container = new ContainerBuilder(); + + $service = $container->register('service'); + $service->setFactory($factory); + + $pass = new FactoryReturnTypePass(); + $pass->process($container); + + if (method_exists(\ReflectionMethod::class, 'getReturnType')) { + $this->assertEquals($returnType, $service->getClass()); + } else { + $this->assertNull($service->getClass()); + } + } + + public function returnTypesProvider() + { + return array( + // must be loaded before the function as they are in the same file + array(array(FactoryDummy::class, 'createBuiltin'), null, false), + array(array(FactoryDummy::class, 'createParent'), FactoryParent::class), + array(array(FactoryDummy::class, 'createSelf'), FactoryDummy::class), + array(factoryFunction::class, FactoryDummy::class), + ); + } + + public function testCircularReference() + { + $container = new ContainerBuilder(); + + $factory = $container->register('factory'); + $factory->setFactory(array(new Reference('factory2'), 'createSelf')); + + $factory2 = $container->register('factory2'); + $factory2->setFactory(array(new Reference('factory'), 'create')); + + $pass = new FactoryReturnTypePass(); + $pass->process($container); + + $this->assertNull($factory->getClass()); + $this->assertNull($factory2->getClass()); + } + + public function testCompile() + { + $container = new ContainerBuilder(); + + $factory = $container->register('factory'); + $factory->setFactory(array(FactoryDummy::class, 'createFactory')); + + if (!method_exists(\ReflectionMethod::class, 'getReturnType')) { + if (method_exists($this, 'expectException')) { + $this->expectException(\RuntimeException::class); + $this->expectExceptionMessage('Please add the class to service "factory" even if it is constructed by a factory since we might need to add method calls based on compile-time checks.'); + } else { + $this->setExpectedException(\RuntimeException::class, 'Please add the class to service "factory" even if it is constructed by a factory since we might need to add method calls based on compile-time checks.'); + } + } + + $container->compile(); + + $this->assertEquals(FactoryDummy::class, $container->getDefinition('factory')->getClass()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7367f49a26ea38bf4861b40035b54a7397f72181 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php @@ -0,0 +1,231 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass; +use Symfony\Component\DependencyInjection\Compiler\RepeatedPass; +use Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class InlineServiceDefinitionsPassTest extends TestCase +{ + public function testProcess() + { + $container = new ContainerBuilder(); + $container + ->register('inlinable.service') + ->setPublic(false) + ; + + $container + ->register('service') + ->setArguments(array(new Reference('inlinable.service'))) + ; + + $this->process($container); + + $arguments = $container->getDefinition('service')->getArguments(); + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Definition', $arguments[0]); + $this->assertSame($container->getDefinition('inlinable.service'), $arguments[0]); + } + + public function testProcessDoesNotInlinesWhenAliasedServiceIsShared() + { + $container = new ContainerBuilder(); + $container + ->register('foo') + ->setPublic(false) + ; + $container->setAlias('moo', 'foo'); + + $container + ->register('service') + ->setArguments(array($ref = new Reference('foo'))) + ; + + $this->process($container); + + $arguments = $container->getDefinition('service')->getArguments(); + $this->assertSame($ref, $arguments[0]); + } + + public function testProcessDoesInlineNonSharedService() + { + $container = new ContainerBuilder(); + $container + ->register('foo') + ->setShared(false) + ; + $container + ->register('bar') + ->setPublic(false) + ->setShared(false) + ; + $container->setAlias('moo', 'bar'); + + $container + ->register('service') + ->setArguments(array(new Reference('foo'), $ref = new Reference('moo'), new Reference('bar'))) + ; + + $this->process($container); + + $arguments = $container->getDefinition('service')->getArguments(); + $this->assertEquals($container->getDefinition('foo'), $arguments[0]); + $this->assertNotSame($container->getDefinition('foo'), $arguments[0]); + $this->assertSame($ref, $arguments[1]); + $this->assertEquals($container->getDefinition('bar'), $arguments[2]); + $this->assertNotSame($container->getDefinition('bar'), $arguments[2]); + } + + public function testProcessInlinesIfMultipleReferencesButAllFromTheSameDefinition() + { + $container = new ContainerBuilder(); + + $a = $container->register('a')->setPublic(false); + $b = $container + ->register('b') + ->addArgument(new Reference('a')) + ->addArgument(new Definition(null, array(new Reference('a')))) + ; + + $this->process($container); + + $arguments = $b->getArguments(); + $this->assertSame($a, $arguments[0]); + + $inlinedArguments = $arguments[1]->getArguments(); + $this->assertSame($a, $inlinedArguments[0]); + } + + public function testProcessInlinesPrivateFactoryReference() + { + $container = new ContainerBuilder(); + + $container->register('a')->setPublic(false); + $b = $container + ->register('b') + ->setPublic(false) + ->setFactory(array(new Reference('a'), 'a')) + ; + + $container + ->register('foo') + ->setArguments(array( + $ref = new Reference('b'), + )); + + $this->process($container); + + $inlinedArguments = $container->getDefinition('foo')->getArguments(); + $this->assertSame($b, $inlinedArguments[0]); + } + + public function testProcessDoesNotInlinePrivateFactoryIfReferencedMultipleTimesWithinTheSameDefinition() + { + $container = new ContainerBuilder(); + $container + ->register('a') + ; + $container + ->register('b') + ->setPublic(false) + ->setFactory(array(new Reference('a'), 'a')) + ; + + $container + ->register('foo') + ->setArguments(array( + $ref1 = new Reference('b'), + $ref2 = new Reference('b'), + )) + ; + $this->process($container); + + $args = $container->getDefinition('foo')->getArguments(); + $this->assertSame($ref1, $args[0]); + $this->assertSame($ref2, $args[1]); + } + + public function testProcessDoesNotInlineReferenceWhenUsedByInlineFactory() + { + $container = new ContainerBuilder(); + $container + ->register('a') + ; + $container + ->register('b') + ->setPublic(false) + ->setFactory(array(new Reference('a'), 'a')) + ; + + $inlineFactory = new Definition(); + $inlineFactory->setPublic(false); + $inlineFactory->setFactory(array(new Reference('b'), 'b')); + + $container + ->register('foo') + ->setArguments(array( + $ref = new Reference('b'), + $inlineFactory, + )) + ; + $this->process($container); + + $args = $container->getDefinition('foo')->getArguments(); + $this->assertSame($ref, $args[0]); + } + + public function testProcessDoesNotInlineWhenServiceIsPrivateButLazy() + { + $container = new ContainerBuilder(); + $container + ->register('foo') + ->setPublic(false) + ->setLazy(true) + ; + + $container + ->register('service') + ->setArguments(array($ref = new Reference('foo'))) + ; + + $this->process($container); + + $arguments = $container->getDefinition('service')->getArguments(); + $this->assertSame($ref, $arguments[0]); + } + + public function testProcessDoesNotInlineWhenServiceReferencesItself() + { + $container = new ContainerBuilder(); + $container + ->register('foo') + ->setPublic(false) + ->addMethodCall('foo', array($ref = new Reference('foo'))) + ; + + $this->process($container); + + $calls = $container->getDefinition('foo')->getMethodCalls(); + $this->assertSame($ref, $calls[0][1][0]); + } + + protected function process(ContainerBuilder $container) + { + $repeatedPass = new RepeatedPass(array(new AnalyzeServiceReferencesPass(), new InlineServiceDefinitionsPass())); + $repeatedPass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..db33d4b4a14dc1ba90a69117d35f6024bcb6cb8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * This class tests the integration of the different compiler passes. + */ +class IntegrationTest extends TestCase +{ + /** + * This tests that dependencies are correctly processed. + * + * We're checking that: + * + * * A is public, B/C are private + * * A -> C + * * B -> C + */ + public function testProcessRemovesAndInlinesRecursively() + { + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + + $a = $container + ->register('a', '\stdClass') + ->addArgument(new Reference('c')) + ; + + $b = $container + ->register('b', '\stdClass') + ->addArgument(new Reference('c')) + ->setPublic(false) + ; + + $c = $container + ->register('c', '\stdClass') + ->setPublic(false) + ; + + $container->compile(); + + $this->assertTrue($container->hasDefinition('a')); + $arguments = $a->getArguments(); + $this->assertSame($c, $arguments[0]); + $this->assertFalse($container->hasDefinition('b')); + $this->assertFalse($container->hasDefinition('c')); + } + + public function testProcessInlinesReferencesToAliases() + { + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + + $a = $container + ->register('a', '\stdClass') + ->addArgument(new Reference('b')) + ; + + $container->setAlias('b', new Alias('c', false)); + + $c = $container + ->register('c', '\stdClass') + ->setPublic(false) + ; + + $container->compile(); + + $this->assertTrue($container->hasDefinition('a')); + $arguments = $a->getArguments(); + $this->assertSame($c, $arguments[0]); + $this->assertFalse($container->hasAlias('b')); + $this->assertFalse($container->hasDefinition('c')); + } + + public function testProcessInlinesWhenThereAreMultipleReferencesButFromTheSameDefinition() + { + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + + $container + ->register('a', '\stdClass') + ->addArgument(new Reference('b')) + ->addMethodCall('setC', array(new Reference('c'))) + ; + + $container + ->register('b', '\stdClass') + ->addArgument(new Reference('c')) + ->setPublic(false) + ; + + $container + ->register('c', '\stdClass') + ->setPublic(false) + ; + + $container->compile(); + + $this->assertTrue($container->hasDefinition('a')); + $this->assertFalse($container->hasDefinition('b')); + $this->assertFalse($container->hasDefinition('c'), 'Service C was not inlined.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b35521d206204f24e1485fa0a00c0fb6aa13a824 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; + +class MergeExtensionConfigurationPassTest extends TestCase +{ + public function testExpressionLanguageProviderForwarding() + { + $tmpProviders = array(); + + $extension = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface')->getMock(); + $extension->expects($this->any()) + ->method('getXsdValidationBasePath') + ->will($this->returnValue(false)); + $extension->expects($this->any()) + ->method('getNamespace') + ->will($this->returnValue('http://example.org/schema/dic/foo')); + $extension->expects($this->any()) + ->method('getAlias') + ->will($this->returnValue('foo')); + $extension->expects($this->once()) + ->method('load') + ->will($this->returnCallback(function (array $config, ContainerBuilder $container) use (&$tmpProviders) { + $tmpProviders = $container->getExpressionLanguageProviders(); + })); + + $provider = $this->getMockBuilder('Symfony\\Component\\ExpressionLanguage\\ExpressionFunctionProviderInterface')->getMock(); + $container = new ContainerBuilder(new ParameterBag()); + $container->registerExtension($extension); + $container->prependExtensionConfig('foo', array('bar' => true)); + $container->addExpressionLanguageProvider($provider); + + $pass = new MergeExtensionConfigurationPass(); + $pass->process($container); + + $this->assertEquals(array($provider), $tmpProviders); + } + + public function testExtensionConfigurationIsTrackedByDefault() + { + $extension = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Extension\\Extension')->getMock(); + $extension->expects($this->once()) + ->method('getConfiguration') + ->will($this->returnValue(new FooConfiguration())); + $extension->expects($this->any()) + ->method('getAlias') + ->will($this->returnValue('foo')); + + $container = new ContainerBuilder(new ParameterBag()); + $container->registerExtension($extension); + $container->prependExtensionConfig('foo', array('bar' => true)); + + $pass = new MergeExtensionConfigurationPass(); + $pass->process($container); + + $this->assertContains(new FileResource(__FILE__), $container->getResources(), '', false, false); + } +} + +class FooConfiguration implements ConfigurationInterface +{ + public function getConfigTreeBuilder() + { + return new TreeBuilder(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/OptionalServiceClass.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/OptionalServiceClass.php new file mode 100644 index 0000000000000000000000000000000000000000..7e9238f22301b60abfaadb0f68e808e4ed31b620 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/OptionalServiceClass.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use Symfony\Bug\NotExistClass; + +class OptionalServiceClass extends NotExistClass +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PassConfigTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PassConfigTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bd1d882b8db277274a4a3879cd8dd352075b3f73 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PassConfigTest.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Compiler\PassConfig; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; + +/** + * @author Guilhem N + */ +class PassConfigTest extends TestCase +{ + public function testPassOrdering() + { + $config = new PassConfig(); + + $pass1 = $this->getMockBuilder(CompilerPassInterface::class)->getMock(); + $config->addPass($pass1, PassConfig::TYPE_BEFORE_OPTIMIZATION, 10); + + $pass2 = $this->getMockBuilder(CompilerPassInterface::class)->getMock(); + $config->addPass($pass2, PassConfig::TYPE_BEFORE_OPTIMIZATION, 30); + + $this->assertSame(array($pass2, $pass1), $config->getBeforeOptimizationPasses()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php new file mode 100644 index 0000000000000000000000000000000000000000..61e3fa947a47d56a24eb08d21e6707654dd1efc0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +class PriorityTaggedServiceTraitTest extends TestCase +{ + public function testThatCacheWarmersAreProcessedInPriorityOrder() + { + $services = array( + 'my_service1' => array('my_custom_tag' => array('priority' => 100)), + 'my_service2' => array('my_custom_tag' => array('priority' => 200)), + 'my_service3' => array('my_custom_tag' => array('priority' => -501)), + 'my_service4' => array('my_custom_tag' => array()), + 'my_service5' => array('my_custom_tag' => array('priority' => -1)), + 'my_service6' => array('my_custom_tag' => array('priority' => -500)), + 'my_service7' => array('my_custom_tag' => array('priority' => -499)), + 'my_service8' => array('my_custom_tag' => array('priority' => 1)), + 'my_service9' => array('my_custom_tag' => array('priority' => -2)), + 'my_service10' => array('my_custom_tag' => array('priority' => -1000)), + 'my_service11' => array('my_custom_tag' => array('priority' => -1001)), + 'my_service12' => array('my_custom_tag' => array('priority' => -1002)), + 'my_service13' => array('my_custom_tag' => array('priority' => -1003)), + 'my_service14' => array('my_custom_tag' => array('priority' => -1000)), + 'my_service15' => array('my_custom_tag' => array('priority' => 1)), + 'my_service16' => array('my_custom_tag' => array('priority' => -1)), + 'my_service17' => array('my_custom_tag' => array('priority' => 200)), + 'my_service18' => array('my_custom_tag' => array('priority' => 100)), + 'my_service19' => array('my_custom_tag' => array()), + ); + + $container = new ContainerBuilder(); + + foreach ($services as $id => $tags) { + $definition = $container->register($id); + + foreach ($tags as $name => $attributes) { + $definition->addTag($name, $attributes); + } + } + + $expected = array( + new Reference('my_service2'), + new Reference('my_service17'), + new Reference('my_service1'), + new Reference('my_service18'), + new Reference('my_service8'), + new Reference('my_service15'), + new Reference('my_service4'), + new Reference('my_service19'), + new Reference('my_service5'), + new Reference('my_service16'), + new Reference('my_service9'), + new Reference('my_service7'), + new Reference('my_service6'), + new Reference('my_service3'), + new Reference('my_service10'), + new Reference('my_service14'), + new Reference('my_service11'), + new Reference('my_service12'), + new Reference('my_service13'), + ); + + $priorityTaggedServiceTraitImplementation = new PriorityTaggedServiceTraitImplementation(); + + $this->assertEquals($expected, $priorityTaggedServiceTraitImplementation->test('my_custom_tag', $container)); + } +} + +class PriorityTaggedServiceTraitImplementation +{ + use PriorityTaggedServiceTrait; + + public function test($tagName, ContainerBuilder $container) + { + return $this->findAndSortTaggedServices($tagName, $container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c6f4e5e79d64d40f3757ba088bfda9d189a55b3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php @@ -0,0 +1,137 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass; +use Symfony\Component\DependencyInjection\Compiler\RepeatedPass; +use Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass; +use Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class RemoveUnusedDefinitionsPassTest extends TestCase +{ + public function testProcess() + { + $container = new ContainerBuilder(); + $container + ->register('foo') + ->setPublic(false) + ; + $container + ->register('bar') + ->setPublic(false) + ; + $container + ->register('moo') + ->setArguments(array(new Reference('bar'))) + ; + + $this->process($container); + + $this->assertFalse($container->hasDefinition('foo')); + $this->assertTrue($container->hasDefinition('bar')); + $this->assertTrue($container->hasDefinition('moo')); + } + + public function testProcessRemovesUnusedDefinitionsRecursively() + { + $container = new ContainerBuilder(); + $container + ->register('foo') + ->setPublic(false) + ; + $container + ->register('bar') + ->setArguments(array(new Reference('foo'))) + ->setPublic(false) + ; + + $this->process($container); + + $this->assertFalse($container->hasDefinition('foo')); + $this->assertFalse($container->hasDefinition('bar')); + } + + public function testProcessWorksWithInlinedDefinitions() + { + $container = new ContainerBuilder(); + $container + ->register('foo') + ->setPublic(false) + ; + $container + ->register('bar') + ->setArguments(array(new Definition(null, array(new Reference('foo'))))) + ; + + $this->process($container); + + $this->assertTrue($container->hasDefinition('foo')); + $this->assertTrue($container->hasDefinition('bar')); + } + + public function testProcessWontRemovePrivateFactory() + { + $container = new ContainerBuilder(); + + $container + ->register('foo', 'stdClass') + ->setFactory(array('stdClass', 'getInstance')) + ->setPublic(false); + + $container + ->register('bar', 'stdClass') + ->setFactory(array(new Reference('foo'), 'getInstance')) + ->setPublic(false); + + $container + ->register('foobar') + ->addArgument(new Reference('bar')); + + $this->process($container); + + $this->assertTrue($container->hasDefinition('foo')); + $this->assertTrue($container->hasDefinition('bar')); + $this->assertTrue($container->hasDefinition('foobar')); + } + + public function testProcessConsiderEnvVariablesAsUsedEvenInPrivateServices() + { + $container = new ContainerBuilder(); + $container->setParameter('env(FOOBAR)', 'test'); + $container + ->register('foo') + ->setArguments(array('%env(FOOBAR)%')) + ->setPublic(false) + ; + + $resolvePass = new ResolveParameterPlaceHoldersPass(); + $resolvePass->process($container); + + $this->process($container); + + $this->assertFalse($container->hasDefinition('foo')); + + $envCounters = $container->getEnvCounters(); + $this->assertArrayHasKey('FOOBAR', $envCounters); + $this->assertSame(1, $envCounters['FOOBAR']); + } + + protected function process(ContainerBuilder $container) + { + $repeatedPass = new RepeatedPass(array(new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass())); + $repeatedPass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7574e7943b4cb4e6dcc1ba812e1ca8c1d5e20e74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; + +require_once __DIR__.'/../Fixtures/includes/foo.php'; + +class ReplaceAliasByActualDefinitionPassTest extends TestCase +{ + public function testProcess() + { + $container = new ContainerBuilder(); + + $aDefinition = $container->register('a', '\stdClass'); + $aDefinition->setFactory(array(new Reference('b'), 'createA')); + + $bDefinition = new Definition('\stdClass'); + $bDefinition->setPublic(false); + $container->setDefinition('b', $bDefinition); + + $container->setAlias('a_alias', 'a'); + $container->setAlias('b_alias', 'b'); + + $container->setAlias('container', 'service_container'); + + $this->process($container); + + $this->assertTrue($container->has('a'), '->process() does nothing to public definitions.'); + $this->assertTrue($container->hasAlias('a_alias')); + $this->assertFalse($container->has('b'), '->process() removes non-public definitions.'); + $this->assertTrue( + $container->has('b_alias') && !$container->hasAlias('b_alias'), + '->process() replaces alias to actual.' + ); + + $this->assertTrue($container->has('container')); + + $resolvedFactory = $aDefinition->getFactory(); + $this->assertSame('b_alias', (string) $resolvedFactory[0]); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testProcessWithInvalidAlias() + { + $container = new ContainerBuilder(); + $container->setAlias('a_alias', 'a'); + $this->process($container); + } + + protected function process(ContainerBuilder $container) + { + $pass = new ReplaceAliasByActualDefinitionPass(); + $pass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b68bdceac53a85603efdb5596db58adc11db9bb8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php @@ -0,0 +1,367 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class ResolveDefinitionTemplatesPassTest extends TestCase +{ + public function testProcess() + { + $container = new ContainerBuilder(); + $container->register('parent', 'foo')->setArguments(array('moo', 'b'))->setProperty('foo', 'moo'); + $container->setDefinition('child', new DefinitionDecorator('parent')) + ->replaceArgument(0, 'a') + ->setProperty('foo', 'bar') + ->setClass('bar') + ; + + $this->process($container); + + $def = $container->getDefinition('child'); + $this->assertNotInstanceOf('Symfony\Component\DependencyInjection\DefinitionDecorator', $def); + $this->assertEquals('bar', $def->getClass()); + $this->assertEquals(array('a', 'b'), $def->getArguments()); + $this->assertEquals(array('foo' => 'bar'), $def->getProperties()); + } + + public function testProcessAppendsMethodCallsAlways() + { + $container = new ContainerBuilder(); + + $container + ->register('parent') + ->addMethodCall('foo', array('bar')) + ; + + $container + ->setDefinition('child', new DefinitionDecorator('parent')) + ->addMethodCall('bar', array('foo')) + ; + + $this->process($container); + + $def = $container->getDefinition('child'); + $this->assertEquals(array( + array('foo', array('bar')), + array('bar', array('foo')), + ), $def->getMethodCalls()); + } + + public function testProcessDoesNotCopyAbstract() + { + $container = new ContainerBuilder(); + + $container + ->register('parent') + ->setAbstract(true) + ; + + $container + ->setDefinition('child', new DefinitionDecorator('parent')) + ; + + $this->process($container); + + $def = $container->getDefinition('child'); + $this->assertFalse($def->isAbstract()); + } + + public function testProcessDoesNotCopyShared() + { + $container = new ContainerBuilder(); + + $container + ->register('parent') + ->setShared(false) + ; + + $container + ->setDefinition('child', new DefinitionDecorator('parent')) + ; + + $this->process($container); + + $def = $container->getDefinition('child'); + $this->assertTrue($def->isShared()); + } + + public function testProcessDoesNotCopyTags() + { + $container = new ContainerBuilder(); + + $container + ->register('parent') + ->addTag('foo') + ; + + $container + ->setDefinition('child', new DefinitionDecorator('parent')) + ; + + $this->process($container); + + $def = $container->getDefinition('child'); + $this->assertEquals(array(), $def->getTags()); + } + + public function testProcessDoesNotCopyDecoratedService() + { + $container = new ContainerBuilder(); + + $container + ->register('parent') + ->setDecoratedService('foo') + ; + + $container + ->setDefinition('child', new DefinitionDecorator('parent')) + ; + + $this->process($container); + + $def = $container->getDefinition('child'); + $this->assertNull($def->getDecoratedService()); + } + + public function testProcessDoesNotDropShared() + { + $container = new ContainerBuilder(); + + $container + ->register('parent') + ; + + $container + ->setDefinition('child', new DefinitionDecorator('parent')) + ->setShared(false) + ; + + $this->process($container); + + $def = $container->getDefinition('child'); + $this->assertFalse($def->isShared()); + } + + public function testProcessHandlesMultipleInheritance() + { + $container = new ContainerBuilder(); + + $container + ->register('parent', 'foo') + ->setArguments(array('foo', 'bar', 'c')) + ; + + $container + ->setDefinition('child2', new DefinitionDecorator('child1')) + ->replaceArgument(1, 'b') + ; + + $container + ->setDefinition('child1', new DefinitionDecorator('parent')) + ->replaceArgument(0, 'a') + ; + + $this->process($container); + + $def = $container->getDefinition('child2'); + $this->assertEquals(array('a', 'b', 'c'), $def->getArguments()); + $this->assertEquals('foo', $def->getClass()); + } + + public function testSetLazyOnServiceHasParent() + { + $container = new ContainerBuilder(); + + $container->register('parent', 'stdClass'); + + $container->setDefinition('child1', new DefinitionDecorator('parent')) + ->setLazy(true) + ; + + $this->process($container); + + $this->assertTrue($container->getDefinition('child1')->isLazy()); + } + + public function testSetLazyOnServiceIsParent() + { + $container = new ContainerBuilder(); + + $container->register('parent', 'stdClass') + ->setLazy(true) + ; + + $container->setDefinition('child1', new DefinitionDecorator('parent')); + + $this->process($container); + + $this->assertTrue($container->getDefinition('child1')->isLazy()); + } + + public function testSetAutowiredOnServiceHasParent() + { + $container = new ContainerBuilder(); + + $container->register('parent', 'stdClass'); + + $container->setDefinition('child1', new DefinitionDecorator('parent')) + ->setAutowired(true) + ; + + $this->process($container); + + $this->assertTrue($container->getDefinition('child1')->isAutowired()); + } + + public function testSetAutowiredOnServiceIsParent() + { + $container = new ContainerBuilder(); + + $container->register('parent', 'stdClass') + ->setAutowired(true) + ; + + $container->setDefinition('child1', new DefinitionDecorator('parent')); + + $this->process($container); + + $this->assertTrue($container->getDefinition('child1')->isAutowired()); + } + + public function testDeepDefinitionsResolving() + { + $container = new ContainerBuilder(); + + $container->register('parent', 'parentClass'); + $container->register('sibling', 'siblingClass') + ->setConfigurator(new DefinitionDecorator('parent'), 'foo') + ->setFactory(array(new DefinitionDecorator('parent'), 'foo')) + ->addArgument(new DefinitionDecorator('parent')) + ->setProperty('prop', new DefinitionDecorator('parent')) + ->addMethodCall('meth', array(new DefinitionDecorator('parent'))) + ; + + $this->process($container); + + $configurator = $container->getDefinition('sibling')->getConfigurator(); + $this->assertSame('Symfony\Component\DependencyInjection\Definition', get_class($configurator)); + $this->assertSame('parentClass', $configurator->getClass()); + + $factory = $container->getDefinition('sibling')->getFactory(); + $this->assertSame('Symfony\Component\DependencyInjection\Definition', get_class($factory[0])); + $this->assertSame('parentClass', $factory[0]->getClass()); + + $argument = $container->getDefinition('sibling')->getArgument(0); + $this->assertSame('Symfony\Component\DependencyInjection\Definition', get_class($argument)); + $this->assertSame('parentClass', $argument->getClass()); + + $properties = $container->getDefinition('sibling')->getProperties(); + $this->assertSame('Symfony\Component\DependencyInjection\Definition', get_class($properties['prop'])); + $this->assertSame('parentClass', $properties['prop']->getClass()); + + $methodCalls = $container->getDefinition('sibling')->getMethodCalls(); + $this->assertSame('Symfony\Component\DependencyInjection\Definition', get_class($methodCalls[0][1][0])); + $this->assertSame('parentClass', $methodCalls[0][1][0]->getClass()); + } + + public function testSetDecoratedServiceOnServiceHasParent() + { + $container = new ContainerBuilder(); + + $container->register('parent', 'stdClass'); + + $container->setDefinition('child1', new DefinitionDecorator('parent')) + ->setDecoratedService('foo', 'foo_inner', 5) + ; + + $this->process($container); + + $this->assertEquals(array('foo', 'foo_inner', 5), $container->getDefinition('child1')->getDecoratedService()); + } + + public function testDecoratedServiceCopiesDeprecatedStatusFromParent() + { + $container = new ContainerBuilder(); + $container->register('deprecated_parent') + ->setDeprecated(true) + ; + + $container->setDefinition('decorated_deprecated_parent', new DefinitionDecorator('deprecated_parent')); + + $this->process($container); + + $this->assertTrue($container->getDefinition('decorated_deprecated_parent')->isDeprecated()); + } + + public function testDecoratedServiceCanOverwriteDeprecatedParentStatus() + { + $container = new ContainerBuilder(); + $container->register('deprecated_parent') + ->setDeprecated(true) + ; + + $container->setDefinition('decorated_deprecated_parent', new DefinitionDecorator('deprecated_parent')) + ->setDeprecated(false) + ; + + $this->process($container); + + $this->assertFalse($container->getDefinition('decorated_deprecated_parent')->isDeprecated()); + } + + public function testProcessMergeAutowiringTypes() + { + $container = new ContainerBuilder(); + + $container + ->register('parent') + ->addAutowiringType('Foo') + ; + + $container + ->setDefinition('child', new DefinitionDecorator('parent')) + ->addAutowiringType('Bar') + ; + + $this->process($container); + + $childDef = $container->getDefinition('child'); + $this->assertEquals(array('Foo', 'Bar'), $childDef->getAutowiringTypes()); + + $parentDef = $container->getDefinition('parent'); + $this->assertSame(array('Foo'), $parentDef->getAutowiringTypes()); + } + + public function testProcessResolvesAliases() + { + $container = new ContainerBuilder(); + + $container->register('parent', 'ParentClass'); + $container->setAlias('parent_alias', 'parent'); + $container->setDefinition('child', new DefinitionDecorator('parent_alias')); + + $this->process($container); + + $def = $container->getDefinition('child'); + $this->assertSame('ParentClass', $def->getClass()); + } + + protected function process(ContainerBuilder $container) + { + $pass = new ResolveDefinitionTemplatesPass(); + $pass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8cf4e5186cd1c7f719e68145ac8e094df2cb89c4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Compiler\ResolveInvalidReferencesPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class ResolveInvalidReferencesPassTest extends TestCase +{ + public function testProcess() + { + $container = new ContainerBuilder(); + $def = $container + ->register('foo') + ->setArguments(array( + new Reference('bar', ContainerInterface::NULL_ON_INVALID_REFERENCE), + new Reference('baz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), + )) + ->addMethodCall('foo', array(new Reference('moo', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))) + ; + + $this->process($container); + + $arguments = $def->getArguments(); + $this->assertSame(array(null, null), $arguments); + $this->assertCount(0, $def->getMethodCalls()); + } + + public function testProcessIgnoreInvalidArgumentInCollectionArgument() + { + $container = new ContainerBuilder(); + $container->register('baz'); + $def = $container + ->register('foo') + ->setArguments(array( + array( + new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), + $baz = new Reference('baz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), + new Reference('moo', ContainerInterface::NULL_ON_INVALID_REFERENCE), + ), + )) + ; + + $this->process($container); + + $arguments = $def->getArguments(); + $this->assertSame(array($baz, null), $arguments[0]); + } + + public function testProcessKeepMethodCallOnInvalidArgumentInCollectionArgument() + { + $container = new ContainerBuilder(); + $container->register('baz'); + $def = $container + ->register('foo') + ->addMethodCall('foo', array( + array( + new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), + $baz = new Reference('baz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), + new Reference('moo', ContainerInterface::NULL_ON_INVALID_REFERENCE), + ), + )) + ; + + $this->process($container); + + $calls = $def->getMethodCalls(); + $this->assertCount(1, $def->getMethodCalls()); + $this->assertSame(array($baz, null), $calls[0][1][0]); + } + + public function testProcessIgnoreNonExistentServices() + { + $container = new ContainerBuilder(); + $def = $container + ->register('foo') + ->setArguments(array(new Reference('bar'))) + ; + + $this->process($container); + + $arguments = $def->getArguments(); + $this->assertEquals('bar', (string) $arguments[0]); + } + + public function testProcessRemovesPropertiesOnInvalid() + { + $container = new ContainerBuilder(); + $def = $container + ->register('foo') + ->setProperty('foo', new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)) + ; + + $this->process($container); + + $this->assertEquals(array(), $def->getProperties()); + } + + protected function process(ContainerBuilder $container) + { + $pass = new ResolveInvalidReferencesPass(); + $pass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..50be82d741119ebea90447696c39fb9e3b5f2bb4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.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\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class ResolveParameterPlaceHoldersPassTest extends TestCase +{ + private $compilerPass; + private $container; + private $fooDefinition; + + protected function setUp() + { + $this->compilerPass = new ResolveParameterPlaceHoldersPass(); + $this->container = $this->createContainerBuilder(); + $this->compilerPass->process($this->container); + $this->fooDefinition = $this->container->getDefinition('foo'); + } + + public function testClassParametersShouldBeResolved() + { + $this->assertSame('Foo', $this->fooDefinition->getClass()); + } + + public function testFactoryParametersShouldBeResolved() + { + $this->assertSame(array('FooFactory', 'getFoo'), $this->fooDefinition->getFactory()); + } + + public function testArgumentParametersShouldBeResolved() + { + $this->assertSame(array('bar', 'baz'), $this->fooDefinition->getArguments()); + } + + public function testMethodCallParametersShouldBeResolved() + { + $this->assertSame(array(array('foobar', array('bar', 'baz'))), $this->fooDefinition->getMethodCalls()); + } + + public function testPropertyParametersShouldBeResolved() + { + $this->assertSame(array('bar' => 'baz'), $this->fooDefinition->getProperties()); + } + + public function testFileParametersShouldBeResolved() + { + $this->assertSame('foo.php', $this->fooDefinition->getFile()); + } + + public function testAliasParametersShouldBeResolved() + { + $this->assertSame('foo', $this->container->getAlias('bar')->__toString()); + } + + private function createContainerBuilder() + { + $containerBuilder = new ContainerBuilder(); + + $containerBuilder->setParameter('foo.class', 'Foo'); + $containerBuilder->setParameter('foo.factory.class', 'FooFactory'); + $containerBuilder->setParameter('foo.arg1', 'bar'); + $containerBuilder->setParameter('foo.arg2', 'baz'); + $containerBuilder->setParameter('foo.method', 'foobar'); + $containerBuilder->setParameter('foo.property.name', 'bar'); + $containerBuilder->setParameter('foo.property.value', 'baz'); + $containerBuilder->setParameter('foo.file', 'foo.php'); + $containerBuilder->setParameter('alias.id', 'bar'); + + $fooDefinition = $containerBuilder->register('foo', '%foo.class%'); + $fooDefinition->setFactory(array('%foo.factory.class%', 'getFoo')); + $fooDefinition->setArguments(array('%foo.arg1%', '%foo.arg2%')); + $fooDefinition->addMethodCall('%foo.method%', array('%foo.arg1%', '%foo.arg2%')); + $fooDefinition->setProperty('%foo.property.name%', '%foo.property.value%'); + $fooDefinition->setFile('%foo.file%'); + + $containerBuilder->setAlias('%alias.id%', 'foo'); + + return $containerBuilder; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c22ab59ea9b985bdf4d95abb4ab3db4e9b435cec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Compiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Compiler\ResolveReferencesToAliasesPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class ResolveReferencesToAliasesPassTest extends TestCase +{ + public function testProcess() + { + $container = new ContainerBuilder(); + $container->setAlias('bar', 'foo'); + $def = $container + ->register('moo') + ->setArguments(array(new Reference('bar'))) + ; + + $this->process($container); + + $arguments = $def->getArguments(); + $this->assertEquals('foo', (string) $arguments[0]); + } + + public function testProcessRecursively() + { + $container = new ContainerBuilder(); + $container->setAlias('bar', 'foo'); + $container->setAlias('moo', 'bar'); + $def = $container + ->register('foobar') + ->setArguments(array(new Reference('moo'))) + ; + + $this->process($container); + + $arguments = $def->getArguments(); + $this->assertEquals('foo', (string) $arguments[0]); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException + */ + public function testAliasCircularReference() + { + $container = new ContainerBuilder(); + $container->setAlias('bar', 'foo'); + $container->setAlias('foo', 'bar'); + $this->process($container); + } + + public function testResolveFactory() + { + $container = new ContainerBuilder(); + $container->register('factory', 'Factory'); + $container->setAlias('factory_alias', new Alias('factory')); + $foo = new Definition(); + $foo->setFactory(array(new Reference('factory_alias'), 'createFoo')); + $container->setDefinition('foo', $foo); + $bar = new Definition(); + $bar->setFactory(array('Factory', 'createFoo')); + $container->setDefinition('bar', $bar); + + $this->process($container); + + $resolvedFooFactory = $container->getDefinition('foo')->getFactory(); + $resolvedBarFactory = $container->getDefinition('bar')->getFactory(); + + $this->assertSame('factory', (string) $resolvedFooFactory[0]); + $this->assertSame('Factory', (string) $resolvedBarFactory[0]); + } + + protected function process(ContainerBuilder $container) + { + $pass = new ResolveReferencesToAliasesPass(); + $pass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/AutowireServiceResourceTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/AutowireServiceResourceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0b3c0f84c427c9f0cbbb232b9860b974f5328e9f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Config/AutowireServiceResourceTest.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Config; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Compiler\AutowirePass; +use Symfony\Component\DependencyInjection\Config\AutowireServiceResource; + +class AutowireServiceResourceTest extends TestCase +{ + /** + * @var AutowireServiceResource + */ + private $resource; + private $file; + private $class; + private $time; + + protected function setUp() + { + $this->file = realpath(sys_get_temp_dir()).'/tmp.php'; + $this->time = time(); + touch($this->file, $this->time); + + $this->class = __NAMESPACE__.'\Foo'; + $this->resource = new AutowireServiceResource( + $this->class, + $this->file, + array() + ); + } + + public function testToString() + { + $this->assertSame('service.autowire.'.$this->class, (string) $this->resource); + } + + public function testSerializeUnserialize() + { + $unserialized = unserialize(serialize($this->resource)); + + $this->assertEquals($this->resource, $unserialized); + } + + public function testIsFresh() + { + $this->assertTrue($this->resource->isFresh($this->time), '->isFresh() returns true if the resource has not changed in same second'); + $this->assertTrue($this->resource->isFresh($this->time + 10), '->isFresh() returns true if the resource has not changed'); + $this->assertFalse($this->resource->isFresh($this->time - 86400), '->isFresh() returns false if the resource has been updated'); + } + + public function testIsFreshForDeletedResources() + { + unlink($this->file); + + $this->assertFalse($this->resource->isFresh($this->getStaleFileTime()), '->isFresh() returns false if the resource does not exist'); + } + + public function testIsNotFreshChangedResource() + { + $oldResource = new AutowireServiceResource( + $this->class, + $this->file, + array('will_be_different') + ); + + // test with a stale file *and* a resource that *will* be different than the actual + $this->assertFalse($oldResource->isFresh($this->getStaleFileTime()), '->isFresh() returns false if the constructor arguments have changed'); + } + + public function testIsFreshSameConstructorArgs() + { + $oldResource = AutowirePass::createResourceForClass( + new \ReflectionClass(__NAMESPACE__.'\Foo') + ); + + // test with a stale file *but* the resource will not be changed + $this->assertTrue($oldResource->isFresh($this->getStaleFileTime()), '->isFresh() returns false if the constructor arguments have changed'); + } + + public function testNotFreshIfClassNotFound() + { + $resource = new AutowireServiceResource( + 'Some\Non\Existent\Class', + $this->file, + array() + ); + + $this->assertFalse($resource->isFresh($this->getStaleFileTime()), '->isFresh() returns false if the class no longer exists'); + } + + protected function tearDown() + { + if (!file_exists($this->file)) { + return; + } + + unlink($this->file); + } + + private function getStaleFileTime() + { + return $this->time - 10; + } +} + +class Foo +{ + public function __construct($foo) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f8693684b8e12ffc3473cb4eec4a4836a625c8d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -0,0 +1,841 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests; + +require_once __DIR__.'/Fixtures/includes/classes.php'; +require_once __DIR__.'/Fixtures/includes/ProjectExtension.php'; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Resource\ResourceInterface; +use Symfony\Component\DependencyInjection\Alias; +use Symfony\Component\DependencyInjection\Compiler\PassConfig; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; +use Symfony\Component\DependencyInjection\Loader\ClosureLoader; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition; +use Symfony\Component\ExpressionLanguage\Expression; + +class ContainerBuilderTest extends TestCase +{ + public function testDefinitions() + { + $builder = new ContainerBuilder(); + $definitions = array( + 'foo' => new Definition('Bar\FooClass'), + 'bar' => new Definition('BarClass'), + ); + $builder->setDefinitions($definitions); + $this->assertEquals($definitions, $builder->getDefinitions(), '->setDefinitions() sets the service definitions'); + $this->assertTrue($builder->hasDefinition('foo'), '->hasDefinition() returns true if a service definition exists'); + $this->assertFalse($builder->hasDefinition('foobar'), '->hasDefinition() returns false if a service definition does not exist'); + + $builder->setDefinition('foobar', $foo = new Definition('FooBarClass')); + $this->assertEquals($foo, $builder->getDefinition('foobar'), '->getDefinition() returns a service definition if defined'); + $this->assertTrue($builder->setDefinition('foobar', $foo = new Definition('FooBarClass')) === $foo, '->setDefinition() implements a fluid interface by returning the service reference'); + + $builder->addDefinitions($defs = array('foobar' => new Definition('FooBarClass'))); + $this->assertEquals(array_merge($definitions, $defs), $builder->getDefinitions(), '->addDefinitions() adds the service definitions'); + + try { + $builder->getDefinition('baz'); + $this->fail('->getDefinition() throws a ServiceNotFoundException if the service definition does not exist'); + } catch (ServiceNotFoundException $e) { + $this->assertEquals('You have requested a non-existent service "baz".', $e->getMessage(), '->getDefinition() throws a ServiceNotFoundException if the service definition does not exist'); + } + } + + /** + * @group legacy + * @expectedDeprecation The "deprecated_foo" service is deprecated. You should stop using it, as it will soon be removed. + */ + public function testCreateDeprecatedService() + { + $definition = new Definition('stdClass'); + $definition->setDeprecated(true); + + $builder = new ContainerBuilder(); + $builder->setDefinition('deprecated_foo', $definition); + $builder->get('deprecated_foo'); + } + + public function testRegister() + { + $builder = new ContainerBuilder(); + $builder->register('foo', 'Bar\FooClass'); + $this->assertTrue($builder->hasDefinition('foo'), '->register() registers a new service definition'); + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Definition', $builder->getDefinition('foo'), '->register() returns the newly created Definition instance'); + } + + public function testHas() + { + $builder = new ContainerBuilder(); + $this->assertFalse($builder->has('foo'), '->has() returns false if the service does not exist'); + $builder->register('foo', 'Bar\FooClass'); + $this->assertTrue($builder->has('foo'), '->has() returns true if a service definition exists'); + $builder->set('bar', new \stdClass()); + $this->assertTrue($builder->has('bar'), '->has() returns true if a service exists'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException + * @expectedExceptionMessage You have requested a non-existent service "foo". + */ + public function testGetThrowsExceptionIfServiceDoesNotExist() + { + $builder = new ContainerBuilder(); + $builder->get('foo'); + } + + public function testGetReturnsNullIfServiceDoesNotExistAndInvalidReferenceIsUsed() + { + $builder = new ContainerBuilder(); + + $this->assertNull($builder->get('foo', ContainerInterface::NULL_ON_INVALID_REFERENCE), '->get() returns null if the service does not exist and NULL_ON_INVALID_REFERENCE is passed as a second argument'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException + */ + public function testGetThrowsCircularReferenceExceptionIfServiceHasReferenceToItself() + { + $builder = new ContainerBuilder(); + $builder->register('baz', 'stdClass')->setArguments(array(new Reference('baz'))); + $builder->get('baz'); + } + + public function testGetReturnsSameInstanceWhenServiceIsShared() + { + $builder = new ContainerBuilder(); + $builder->register('bar', 'stdClass'); + + $this->assertTrue($builder->get('bar') === $builder->get('bar'), '->get() always returns the same instance if the service is shared'); + } + + public function testGetCreatesServiceBasedOnDefinition() + { + $builder = new ContainerBuilder(); + $builder->register('foo', 'stdClass'); + + $this->assertInternalType('object', $builder->get('foo'), '->get() returns the service definition associated with the id'); + } + + public function testGetReturnsRegisteredService() + { + $builder = new ContainerBuilder(); + $builder->set('bar', $bar = new \stdClass()); + + $this->assertSame($bar, $builder->get('bar'), '->get() returns the service associated with the id'); + } + + public function testRegisterDoesNotOverrideExistingService() + { + $builder = new ContainerBuilder(); + $builder->set('bar', $bar = new \stdClass()); + $builder->register('bar', 'stdClass'); + + $this->assertSame($bar, $builder->get('bar'), '->get() returns the service associated with the id even if a definition has been defined'); + } + + public function testNonSharedServicesReturnsDifferentInstances() + { + $builder = new ContainerBuilder(); + $builder->register('bar', 'stdClass')->setShared(false); + + $this->assertNotSame($builder->get('bar'), $builder->get('bar')); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage You have requested a synthetic service ("foo"). The DIC does not know how to construct this service. + */ + public function testGetUnsetLoadingServiceWhenCreateServiceThrowsAnException() + { + $builder = new ContainerBuilder(); + $builder->register('foo', 'stdClass')->setSynthetic(true); + + // we expect a RuntimeException here as foo is synthetic + try { + $builder->get('foo'); + } catch (RuntimeException $e) { + } + + // we must also have the same RuntimeException here + $builder->get('foo'); + } + + public function testGetServiceIds() + { + $builder = new ContainerBuilder(); + $builder->register('foo', 'stdClass'); + $builder->bar = $bar = new \stdClass(); + $builder->register('bar', 'stdClass'); + $this->assertEquals(array('foo', 'bar', 'service_container'), $builder->getServiceIds(), '->getServiceIds() returns all defined service ids'); + } + + public function testAliases() + { + $builder = new ContainerBuilder(); + $builder->register('foo', 'stdClass'); + $builder->setAlias('bar', 'foo'); + $this->assertTrue($builder->hasAlias('bar'), '->hasAlias() returns true if the alias exists'); + $this->assertFalse($builder->hasAlias('foobar'), '->hasAlias() returns false if the alias does not exist'); + $this->assertEquals('foo', (string) $builder->getAlias('bar'), '->getAlias() returns the aliased service'); + $this->assertTrue($builder->has('bar'), '->setAlias() defines a new service'); + $this->assertTrue($builder->get('bar') === $builder->get('foo'), '->setAlias() creates a service that is an alias to another one'); + + try { + $builder->setAlias('foobar', 'foobar'); + $this->fail('->setAlias() throws an InvalidArgumentException if the alias references itself'); + } catch (\InvalidArgumentException $e) { + $this->assertEquals('An alias can not reference itself, got a circular reference on "foobar".', $e->getMessage(), '->setAlias() throws an InvalidArgumentException if the alias references itself'); + } + + try { + $builder->getAlias('foobar'); + $this->fail('->getAlias() throws an InvalidArgumentException if the alias does not exist'); + } catch (\InvalidArgumentException $e) { + $this->assertEquals('The service alias "foobar" does not exist.', $e->getMessage(), '->getAlias() throws an InvalidArgumentException if the alias does not exist'); + } + } + + public function testGetAliases() + { + $builder = new ContainerBuilder(); + $builder->setAlias('bar', 'foo'); + $builder->setAlias('foobar', 'foo'); + $builder->setAlias('moo', new Alias('foo', false)); + + $aliases = $builder->getAliases(); + $this->assertEquals('foo', (string) $aliases['bar']); + $this->assertTrue($aliases['bar']->isPublic()); + $this->assertEquals('foo', (string) $aliases['foobar']); + $this->assertEquals('foo', (string) $aliases['moo']); + $this->assertFalse($aliases['moo']->isPublic()); + + $builder->register('bar', 'stdClass'); + $this->assertFalse($builder->hasAlias('bar')); + + $builder->set('foobar', 'stdClass'); + $builder->set('moo', 'stdClass'); + $this->assertCount(0, $builder->getAliases(), '->getAliases() does not return aliased services that have been overridden'); + } + + public function testSetAliases() + { + $builder = new ContainerBuilder(); + $builder->setAliases(array('bar' => 'foo', 'foobar' => 'foo')); + + $aliases = $builder->getAliases(); + $this->assertTrue(isset($aliases['bar'])); + $this->assertTrue(isset($aliases['foobar'])); + } + + public function testAddAliases() + { + $builder = new ContainerBuilder(); + $builder->setAliases(array('bar' => 'foo')); + $builder->addAliases(array('foobar' => 'foo')); + + $aliases = $builder->getAliases(); + $this->assertTrue(isset($aliases['bar'])); + $this->assertTrue(isset($aliases['foobar'])); + } + + public function testSetReplacesAlias() + { + $builder = new ContainerBuilder(); + $builder->setAlias('alias', 'aliased'); + $builder->set('aliased', new \stdClass()); + + $builder->set('alias', $foo = new \stdClass()); + $this->assertSame($foo, $builder->get('alias'), '->set() replaces an existing alias'); + } + + public function testAliasesKeepInvalidBehavior() + { + $builder = new ContainerBuilder(); + + $aliased = new Definition('stdClass'); + $aliased->addMethodCall('setBar', array(new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))); + $builder->setDefinition('aliased', $aliased); + $builder->setAlias('alias', 'aliased'); + + $this->assertEquals(new \stdClass(), $builder->get('alias')); + } + + public function testAddGetCompilerPass() + { + $builder = new ContainerBuilder(); + $builder->setResourceTracking(false); + $defaultPasses = $builder->getCompiler()->getPassConfig()->getPasses(); + $builder->addCompilerPass($pass1 = $this->getMockBuilder('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface')->getMock(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -5); + $builder->addCompilerPass($pass2 = $this->getMockBuilder('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface')->getMock(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 10); + + $passes = $builder->getCompiler()->getPassConfig()->getPasses(); + $this->assertCount(count($passes) - 2, $defaultPasses); + // Pass 1 is executed later + $this->assertTrue(array_search($pass1, $passes, true) > array_search($pass2, $passes, true)); + } + + public function testCreateService() + { + $builder = new ContainerBuilder(); + $builder->register('foo1', 'Bar\FooClass')->setFile(__DIR__.'/Fixtures/includes/foo.php'); + $builder->register('foo2', 'Bar\FooClass')->setFile(__DIR__.'/Fixtures/includes/%file%.php'); + $builder->setParameter('file', 'foo'); + $this->assertInstanceOf('\Bar\FooClass', $builder->get('foo1'), '->createService() requires the file defined by the service definition'); + $this->assertInstanceOf('\Bar\FooClass', $builder->get('foo2'), '->createService() replaces parameters in the file provided by the service definition'); + } + + public function testCreateProxyWithRealServiceInstantiator() + { + $builder = new ContainerBuilder(); + + $builder->register('foo1', 'Bar\FooClass')->setFile(__DIR__.'/Fixtures/includes/foo.php'); + $builder->getDefinition('foo1')->setLazy(true); + + $foo1 = $builder->get('foo1'); + + $this->assertSame($foo1, $builder->get('foo1'), 'The same proxy is retrieved on multiple subsequent calls'); + $this->assertSame('Bar\FooClass', get_class($foo1)); + } + + public function testCreateServiceClass() + { + $builder = new ContainerBuilder(); + $builder->register('foo1', '%class%'); + $builder->setParameter('class', 'stdClass'); + $this->assertInstanceOf('\stdClass', $builder->get('foo1'), '->createService() replaces parameters in the class provided by the service definition'); + } + + public function testCreateServiceArguments() + { + $builder = new ContainerBuilder(); + $builder->register('bar', 'stdClass'); + $builder->register('foo1', 'Bar\FooClass')->addArgument(array('foo' => '%value%', '%value%' => 'foo', new Reference('bar'), '%%unescape_it%%')); + $builder->setParameter('value', 'bar'); + $this->assertEquals(array('foo' => 'bar', 'bar' => 'foo', $builder->get('bar'), '%unescape_it%'), $builder->get('foo1')->arguments, '->createService() replaces parameters and service references in the arguments provided by the service definition'); + } + + public function testCreateServiceFactory() + { + $builder = new ContainerBuilder(); + $builder->register('foo', 'Bar\FooClass')->setFactory('Bar\FooClass::getInstance'); + $builder->register('qux', 'Bar\FooClass')->setFactory(array('Bar\FooClass', 'getInstance')); + $builder->register('bar', 'Bar\FooClass')->setFactory(array(new Definition('Bar\FooClass'), 'getInstance')); + $builder->register('baz', 'Bar\FooClass')->setFactory(array(new Reference('bar'), 'getInstance')); + + $this->assertTrue($builder->get('foo')->called, '->createService() calls the factory method to create the service instance'); + $this->assertTrue($builder->get('qux')->called, '->createService() calls the factory method to create the service instance'); + $this->assertTrue($builder->get('bar')->called, '->createService() uses anonymous service as factory'); + $this->assertTrue($builder->get('baz')->called, '->createService() uses another service as factory'); + } + + public function testCreateServiceMethodCalls() + { + $builder = new ContainerBuilder(); + $builder->register('bar', 'stdClass'); + $builder->register('foo1', 'Bar\FooClass')->addMethodCall('setBar', array(array('%value%', new Reference('bar')))); + $builder->setParameter('value', 'bar'); + $this->assertEquals(array('bar', $builder->get('bar')), $builder->get('foo1')->bar, '->createService() replaces the values in the method calls arguments'); + } + + public function testCreateServiceMethodCallsWithEscapedParam() + { + $builder = new ContainerBuilder(); + $builder->register('bar', 'stdClass'); + $builder->register('foo1', 'Bar\FooClass')->addMethodCall('setBar', array(array('%%unescape_it%%'))); + $builder->setParameter('value', 'bar'); + $this->assertEquals(array('%unescape_it%'), $builder->get('foo1')->bar, '->createService() replaces the values in the method calls arguments'); + } + + public function testCreateServiceProperties() + { + $builder = new ContainerBuilder(); + $builder->register('bar', 'stdClass'); + $builder->register('foo1', 'Bar\FooClass')->setProperty('bar', array('%value%', new Reference('bar'), '%%unescape_it%%')); + $builder->setParameter('value', 'bar'); + $this->assertEquals(array('bar', $builder->get('bar'), '%unescape_it%'), $builder->get('foo1')->bar, '->createService() replaces the values in the properties'); + } + + public function testCreateServiceConfigurator() + { + $builder = new ContainerBuilder(); + $builder->register('foo1', 'Bar\FooClass')->setConfigurator('sc_configure'); + $builder->register('foo2', 'Bar\FooClass')->setConfigurator(array('%class%', 'configureStatic')); + $builder->setParameter('class', 'BazClass'); + $builder->register('baz', 'BazClass'); + $builder->register('foo3', 'Bar\FooClass')->setConfigurator(array(new Reference('baz'), 'configure')); + $builder->register('foo4', 'Bar\FooClass')->setConfigurator(array($builder->getDefinition('baz'), 'configure')); + $builder->register('foo5', 'Bar\FooClass')->setConfigurator('foo'); + + $this->assertTrue($builder->get('foo1')->configured, '->createService() calls the configurator'); + $this->assertTrue($builder->get('foo2')->configured, '->createService() calls the configurator'); + $this->assertTrue($builder->get('foo3')->configured, '->createService() calls the configurator'); + $this->assertTrue($builder->get('foo4')->configured, '->createService() calls the configurator'); + + try { + $builder->get('foo5'); + $this->fail('->createService() throws an InvalidArgumentException if the configure callable is not a valid callable'); + } catch (\InvalidArgumentException $e) { + $this->assertEquals('The configure callable for class "Bar\FooClass" is not a callable.', $e->getMessage(), '->createService() throws an InvalidArgumentException if the configure callable is not a valid callable'); + } + } + + /** + * @expectedException \RuntimeException + */ + public function testCreateSyntheticService() + { + $builder = new ContainerBuilder(); + $builder->register('foo', 'Bar\FooClass')->setSynthetic(true); + $builder->get('foo'); + } + + public function testCreateServiceWithExpression() + { + $builder = new ContainerBuilder(); + $builder->setParameter('bar', 'bar'); + $builder->register('bar', 'BarClass'); + $builder->register('foo', 'Bar\FooClass')->addArgument(array('foo' => new Expression('service("bar").foo ~ parameter("bar")'))); + $this->assertEquals('foobar', $builder->get('foo')->arguments['foo']); + } + + public function testResolveServices() + { + $builder = new ContainerBuilder(); + $builder->register('foo', 'Bar\FooClass'); + $this->assertEquals($builder->get('foo'), $builder->resolveServices(new Reference('foo')), '->resolveServices() resolves service references to service instances'); + $this->assertEquals(array('foo' => array('foo', $builder->get('foo'))), $builder->resolveServices(array('foo' => array('foo', new Reference('foo')))), '->resolveServices() resolves service references to service instances in nested arrays'); + $this->assertEquals($builder->get('foo'), $builder->resolveServices(new Expression('service("foo")')), '->resolveServices() resolves expressions'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage Constructing service "foo" from a parent definition is not supported at build time. + */ + public function testResolveServicesWithDecoratedDefinition() + { + $builder = new ContainerBuilder(); + $builder->setDefinition('grandpa', new Definition('stdClass')); + $builder->setDefinition('parent', new DefinitionDecorator('grandpa')); + $builder->setDefinition('foo', new DefinitionDecorator('parent')); + + $builder->get('foo'); + } + + public function testResolveServicesWithCustomDefinitionClass() + { + $builder = new ContainerBuilder(); + $builder->setDefinition('foo', new CustomDefinition('stdClass')); + + $this->assertInstanceOf('stdClass', $builder->get('foo')); + } + + public function testMerge() + { + $container = new ContainerBuilder(new ParameterBag(array('bar' => 'foo'))); + $container->setResourceTracking(false); + $config = new ContainerBuilder(new ParameterBag(array('foo' => 'bar'))); + $container->merge($config); + $this->assertEquals(array('bar' => 'foo', 'foo' => 'bar'), $container->getParameterBag()->all(), '->merge() merges current parameters with the loaded ones'); + + $container = new ContainerBuilder(new ParameterBag(array('bar' => 'foo'))); + $container->setResourceTracking(false); + $config = new ContainerBuilder(new ParameterBag(array('foo' => '%bar%'))); + $container->merge($config); + $container->compile(); + $this->assertEquals(array('bar' => 'foo', 'foo' => 'foo'), $container->getParameterBag()->all(), '->merge() evaluates the values of the parameters towards already defined ones'); + + $container = new ContainerBuilder(new ParameterBag(array('bar' => 'foo'))); + $container->setResourceTracking(false); + $config = new ContainerBuilder(new ParameterBag(array('foo' => '%bar%', 'baz' => '%foo%'))); + $container->merge($config); + $container->compile(); + $this->assertEquals(array('bar' => 'foo', 'foo' => 'foo', 'baz' => 'foo'), $container->getParameterBag()->all(), '->merge() evaluates the values of the parameters towards already defined ones'); + + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + $container->register('foo', 'Bar\FooClass'); + $container->register('bar', 'BarClass'); + $config = new ContainerBuilder(); + $config->setDefinition('baz', new Definition('BazClass')); + $config->setAlias('alias_for_foo', 'foo'); + $container->merge($config); + $this->assertEquals(array('foo', 'bar', 'baz'), array_keys($container->getDefinitions()), '->merge() merges definitions already defined ones'); + + $aliases = $container->getAliases(); + $this->assertTrue(isset($aliases['alias_for_foo'])); + $this->assertEquals('foo', (string) $aliases['alias_for_foo']); + + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + $container->register('foo', 'Bar\FooClass'); + $config->setDefinition('foo', new Definition('BazClass')); + $container->merge($config); + $this->assertEquals('BazClass', $container->getDefinition('foo')->getClass(), '->merge() overrides already defined services'); + + $container = new ContainerBuilder(); + $bag = new EnvPlaceholderParameterBag(); + $bag->get('env(Foo)'); + $config = new ContainerBuilder($bag); + $this->assertSame(array('%env(Bar)%'), $config->resolveEnvPlaceholders(array($bag->get('env(Bar)')))); + $container->merge($config); + $this->assertEquals(array('Foo' => 0, 'Bar' => 1), $container->getEnvCounters()); + } + + /** + * @expectedException \LogicException + */ + public function testMergeLogicException() + { + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + $container->compile(); + $container->merge(new ContainerBuilder()); + } + + public function testfindTaggedServiceIds() + { + $builder = new ContainerBuilder(); + $builder + ->register('foo', 'Bar\FooClass') + ->addTag('foo', array('foo' => 'foo')) + ->addTag('bar', array('bar' => 'bar')) + ->addTag('foo', array('foofoo' => 'foofoo')) + ; + $this->assertEquals($builder->findTaggedServiceIds('foo'), array( + 'foo' => array( + array('foo' => 'foo'), + array('foofoo' => 'foofoo'), + ), + ), '->findTaggedServiceIds() returns an array of service ids and its tag attributes'); + $this->assertEquals(array(), $builder->findTaggedServiceIds('foobar'), '->findTaggedServiceIds() returns an empty array if there is annotated services'); + } + + public function testFindUnusedTags() + { + $builder = new ContainerBuilder(); + $builder + ->register('foo', 'Bar\FooClass') + ->addTag('kernel.event_listener', array('foo' => 'foo')) + ->addTag('kenrel.event_listener', array('bar' => 'bar')) + ; + $builder->findTaggedServiceIds('kernel.event_listener'); + $this->assertEquals(array('kenrel.event_listener'), $builder->findUnusedTags(), '->findUnusedTags() returns an array with unused tags'); + } + + public function testFindDefinition() + { + $container = new ContainerBuilder(); + $container->setDefinition('foo', $definition = new Definition('Bar\FooClass')); + $container->setAlias('bar', 'foo'); + $container->setAlias('foobar', 'bar'); + $this->assertEquals($definition, $container->findDefinition('foobar'), '->findDefinition() returns a Definition'); + } + + public function testAddObjectResource() + { + $container = new ContainerBuilder(); + + $container->setResourceTracking(false); + $container->addObjectResource(new \BarClass()); + + $this->assertEmpty($container->getResources(), 'No resources get registered without resource tracking'); + + $container->setResourceTracking(true); + $container->addObjectResource(new \BarClass()); + + $resources = $container->getResources(); + + $this->assertCount(1, $resources, '1 resource was registered'); + + /* @var $resource \Symfony\Component\Config\Resource\FileResource */ + $resource = end($resources); + + $this->assertInstanceOf('Symfony\Component\Config\Resource\FileResource', $resource); + $this->assertSame(realpath(__DIR__.'/Fixtures/includes/classes.php'), realpath($resource->getResource())); + } + + public function testAddClassResource() + { + $container = new ContainerBuilder(); + + $container->setResourceTracking(false); + $container->addClassResource(new \ReflectionClass('BarClass')); + + $this->assertEmpty($container->getResources(), 'No resources get registered without resource tracking'); + + $container->setResourceTracking(true); + $container->addClassResource(new \ReflectionClass('BarClass')); + + $resources = $container->getResources(); + + $this->assertCount(1, $resources, '1 resource was registered'); + + /* @var $resource \Symfony\Component\Config\Resource\FileResource */ + $resource = end($resources); + + $this->assertInstanceOf('Symfony\Component\Config\Resource\FileResource', $resource); + $this->assertSame(realpath(__DIR__.'/Fixtures/includes/classes.php'), realpath($resource->getResource())); + } + + public function testCompilesClassDefinitionsOfLazyServices() + { + $container = new ContainerBuilder(); + + $this->assertEmpty($container->getResources(), 'No resources get registered without resource tracking'); + + $container->register('foo', 'BarClass'); + $container->getDefinition('foo')->setLazy(true); + + $container->compile(); + + $classesPath = realpath(__DIR__.'/Fixtures/includes/classes.php'); + $matchingResources = array_filter( + $container->getResources(), + function (ResourceInterface $resource) use ($classesPath) { + return $resource instanceof FileResource && $classesPath === realpath($resource->getResource()); + } + ); + + $this->assertNotEmpty($matchingResources); + } + + public function testResources() + { + $container = new ContainerBuilder(); + $container->addResource($a = new FileResource(__DIR__.'/Fixtures/xml/services1.xml')); + $container->addResource($b = new FileResource(__DIR__.'/Fixtures/xml/services2.xml')); + $resources = array(); + foreach ($container->getResources() as $resource) { + if (false === strpos($resource, '.php')) { + $resources[] = $resource; + } + } + $this->assertEquals(array($a, $b), $resources, '->getResources() returns an array of resources read for the current configuration'); + $this->assertSame($container, $container->setResources(array())); + $this->assertEquals(array(), $container->getResources()); + } + + public function testExtension() + { + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + + $container->registerExtension($extension = new \ProjectExtension()); + $this->assertTrue($container->getExtension('project') === $extension, '->registerExtension() registers an extension'); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('LogicException'); + $container->getExtension('no_registered'); + } + + public function testRegisteredButNotLoadedExtension() + { + $extension = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface')->getMock(); + $extension->expects($this->once())->method('getAlias')->will($this->returnValue('project')); + $extension->expects($this->never())->method('load'); + + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + $container->registerExtension($extension); + $container->compile(); + } + + public function testRegisteredAndLoadedExtension() + { + $extension = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface')->getMock(); + $extension->expects($this->exactly(2))->method('getAlias')->will($this->returnValue('project')); + $extension->expects($this->once())->method('load')->with(array(array('foo' => 'bar'))); + + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + $container->registerExtension($extension); + $container->loadFromExtension('project', array('foo' => 'bar')); + $container->compile(); + } + + public function testPrivateServiceUser() + { + $fooDefinition = new Definition('BarClass'); + $fooUserDefinition = new Definition('BarUserClass', array(new Reference('bar'))); + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + + $fooDefinition->setPublic(false); + + $container->addDefinitions(array( + 'bar' => $fooDefinition, + 'bar_user' => $fooUserDefinition, + )); + + $container->compile(); + $this->assertInstanceOf('BarClass', $container->get('bar_user')->bar); + } + + /** + * @expectedException \BadMethodCallException + */ + public function testThrowsExceptionWhenSetServiceOnAFrozenContainer() + { + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + $container->setDefinition('a', new Definition('stdClass')); + $container->compile(); + $container->set('a', new \stdClass()); + } + + public function testThrowsExceptionWhenAddServiceOnAFrozenContainer() + { + $container = new ContainerBuilder(); + $container->compile(); + $container->set('a', $foo = new \stdClass()); + $this->assertSame($foo, $container->get('a')); + } + + public function testNoExceptionWhenSetSyntheticServiceOnAFrozenContainer() + { + $container = new ContainerBuilder(); + $def = new Definition('stdClass'); + $def->setSynthetic(true); + $container->setDefinition('a', $def); + $container->compile(); + $container->set('a', $a = new \stdClass()); + $this->assertEquals($a, $container->get('a')); + } + + /** + * @expectedException \BadMethodCallException + */ + public function testThrowsExceptionWhenSetDefinitionOnAFrozenContainer() + { + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + $container->compile(); + $container->setDefinition('a', new Definition()); + } + + public function testExtensionConfig() + { + $container = new ContainerBuilder(); + + $configs = $container->getExtensionConfig('foo'); + $this->assertEmpty($configs); + + $first = array('foo' => 'bar'); + $container->prependExtensionConfig('foo', $first); + $configs = $container->getExtensionConfig('foo'); + $this->assertEquals(array($first), $configs); + + $second = array('ding' => 'dong'); + $container->prependExtensionConfig('foo', $second); + $configs = $container->getExtensionConfig('foo'); + $this->assertEquals(array($second, $first), $configs); + } + + public function testAbstractAlias() + { + $container = new ContainerBuilder(); + + $abstract = new Definition('AbstractClass'); + $abstract->setAbstract(true); + + $container->setDefinition('abstract_service', $abstract); + $container->setAlias('abstract_alias', 'abstract_service'); + + $container->compile(); + + $this->assertSame('abstract_service', (string) $container->getAlias('abstract_alias')); + } + + public function testLazyLoadedService() + { + $loader = new ClosureLoader($container = new ContainerBuilder()); + $loader->load(function (ContainerBuilder $container) { + $container->set('a', new \BazClass()); + $definition = new Definition('BazClass'); + $definition->setLazy(true); + $container->setDefinition('a', $definition); + }); + + $container->setResourceTracking(true); + + $container->compile(); + + $class = new \BazClass(); + $reflectionClass = new \ReflectionClass($class); + + $r = new \ReflectionProperty($container, 'resources'); + $r->setAccessible(true); + $resources = $r->getValue($container); + + $classInList = false; + foreach ($resources as $resource) { + if ($resource->getResource() === $reflectionClass->getFileName()) { + $classInList = true; + break; + } + } + + $this->assertTrue($classInList); + } + + public function testInitializePropertiesBeforeMethodCalls() + { + $container = new ContainerBuilder(); + $container->register('foo', 'stdClass'); + $container->register('bar', 'MethodCallClass') + ->setProperty('simple', 'bar') + ->setProperty('complex', new Reference('foo')) + ->addMethodCall('callMe'); + + $container->compile(); + + $this->assertTrue($container->get('bar')->callPassed(), '->compile() initializes properties before method calls'); + } + + public function testAutowiring() + { + $container = new ContainerBuilder(); + + $container->register('a', __NAMESPACE__.'\A'); + $bDefinition = $container->register('b', __NAMESPACE__.'\B'); + $bDefinition->setAutowired(true); + + $container->compile(); + + $this->assertEquals('a', (string) $container->getDefinition('b')->getArgument(0)); + } +} + +class FooClass +{ +} + +class A +{ +} + +class B +{ + public function __construct(A $a) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..30173f7a1827c907644421c1ccd65e4c0546ede1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php @@ -0,0 +1,545 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; + +class ContainerTest extends TestCase +{ + public function testConstructor() + { + $sc = new Container(); + $this->assertSame($sc, $sc->get('service_container'), '__construct() automatically registers itself as a service'); + + $sc = new Container(new ParameterBag(array('foo' => 'bar'))); + $this->assertEquals(array('foo' => 'bar'), $sc->getParameterBag()->all(), '__construct() takes an array of parameters as its first argument'); + } + + /** + * @dataProvider dataForTestCamelize + */ + public function testCamelize($id, $expected) + { + $this->assertEquals($expected, Container::camelize($id), sprintf('Container::camelize("%s")', $id)); + } + + public function dataForTestCamelize() + { + return array( + array('foo_bar', 'FooBar'), + array('foo.bar', 'Foo_Bar'), + array('foo.bar_baz', 'Foo_BarBaz'), + array('foo._bar', 'Foo_Bar'), + array('foo_.bar', 'Foo_Bar'), + array('_foo', 'Foo'), + array('.foo', '_Foo'), + array('foo_', 'Foo'), + array('foo.', 'Foo_'), + array('foo\bar', 'Foo_Bar'), + ); + } + + /** + * @dataProvider dataForTestUnderscore + */ + public function testUnderscore($id, $expected) + { + $this->assertEquals($expected, Container::underscore($id), sprintf('Container::underscore("%s")', $id)); + } + + public function dataForTestUnderscore() + { + return array( + array('FooBar', 'foo_bar'), + array('Foo_Bar', 'foo.bar'), + array('Foo_BarBaz', 'foo.bar_baz'), + array('FooBar_BazQux', 'foo_bar.baz_qux'), + array('_Foo', '.foo'), + array('Foo_', 'foo.'), + ); + } + + public function testCompile() + { + $sc = new Container(new ParameterBag(array('foo' => 'bar'))); + $this->assertFalse($sc->getParameterBag()->isResolved(), '->compile() resolves the parameter bag'); + $sc->compile(); + $this->assertTrue($sc->getParameterBag()->isResolved(), '->compile() resolves the parameter bag'); + $this->assertInstanceOf('Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag', $sc->getParameterBag(), '->compile() changes the parameter bag to a FrozenParameterBag instance'); + $this->assertEquals(array('foo' => 'bar'), $sc->getParameterBag()->all(), '->compile() copies the current parameters to the new parameter bag'); + } + + public function testIsFrozen() + { + $sc = new Container(new ParameterBag(array('foo' => 'bar'))); + $this->assertFalse($sc->isFrozen(), '->isFrozen() returns false if the parameters are not frozen'); + $sc->compile(); + $this->assertTrue($sc->isFrozen(), '->isFrozen() returns true if the parameters are frozen'); + } + + public function testGetParameterBag() + { + $sc = new Container(); + $this->assertEquals(array(), $sc->getParameterBag()->all(), '->getParameterBag() returns an empty array if no parameter has been defined'); + } + + public function testGetSetParameter() + { + $sc = new Container(new ParameterBag(array('foo' => 'bar'))); + $sc->setParameter('bar', 'foo'); + $this->assertEquals('foo', $sc->getParameter('bar'), '->setParameter() sets the value of a new parameter'); + + $sc->setParameter('foo', 'baz'); + $this->assertEquals('baz', $sc->getParameter('foo'), '->setParameter() overrides previously set parameter'); + + $sc->setParameter('Foo', 'baz1'); + $this->assertEquals('baz1', $sc->getParameter('foo'), '->setParameter() converts the key to lowercase'); + $this->assertEquals('baz1', $sc->getParameter('FOO'), '->getParameter() converts the key to lowercase'); + + try { + $sc->getParameter('baba'); + $this->fail('->getParameter() thrown an \InvalidArgumentException if the key does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->getParameter() thrown an \InvalidArgumentException if the key does not exist'); + $this->assertEquals('You have requested a non-existent parameter "baba".', $e->getMessage(), '->getParameter() thrown an \InvalidArgumentException if the key does not exist'); + } + } + + public function testGetServiceIds() + { + $sc = new Container(); + $sc->set('foo', $obj = new \stdClass()); + $sc->set('bar', $obj = new \stdClass()); + $this->assertEquals(array('service_container', 'foo', 'bar'), $sc->getServiceIds(), '->getServiceIds() returns all defined service ids'); + + $sc = new ProjectServiceContainer(); + $sc->set('foo', $obj = new \stdClass()); + $this->assertEquals(array('service_container', 'internal', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'foo'), $sc->getServiceIds(), '->getServiceIds() returns defined service ids by factory methods in the method map, followed by service ids defined by set()'); + } + + /** + * @group legacy + * @expectedDeprecation Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map. + */ + public function testGetLegacyServiceIds() + { + $sc = new LegacyProjectServiceContainer(); + $sc->set('foo', $obj = new \stdClass()); + + $this->assertEquals(array('internal', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'service_container', 'foo'), $sc->getServiceIds(), '->getServiceIds() returns defined service ids by getXXXService() methods, followed by service ids defined by set()'); + } + + public function testSet() + { + $sc = new Container(); + $sc->set('foo', $foo = new \stdClass()); + $this->assertSame($foo, $sc->get('foo'), '->set() sets a service'); + } + + public function testSetWithNullResetTheService() + { + $sc = new Container(); + $sc->set('foo', null); + $this->assertFalse($sc->has('foo'), '->set() with null service resets the service'); + } + + public function testSetReplacesAlias() + { + $c = new ProjectServiceContainer(); + + $c->set('alias', $foo = new \stdClass()); + $this->assertSame($foo, $c->get('alias'), '->set() replaces an existing alias'); + } + + public function testGet() + { + $sc = new ProjectServiceContainer(); + $sc->set('foo', $foo = new \stdClass()); + $this->assertSame($foo, $sc->get('foo'), '->get() returns the service for the given id'); + $this->assertSame($foo, $sc->get('Foo'), '->get() returns the service for the given id, and converts id to lowercase'); + $this->assertSame($sc->__bar, $sc->get('bar'), '->get() returns the service for the given id'); + $this->assertSame($sc->__foo_bar, $sc->get('foo_bar'), '->get() returns the service if a get*Method() is defined'); + $this->assertSame($sc->__foo_baz, $sc->get('foo.baz'), '->get() returns the service if a get*Method() is defined'); + + $sc->set('bar', $bar = new \stdClass()); + $this->assertSame($bar, $sc->get('bar'), '->get() prefers to return a service defined with set() than one defined with a getXXXMethod()'); + + try { + $sc->get(''); + $this->fail('->get() throws a \InvalidArgumentException exception if the service is empty'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException', $e, '->get() throws a ServiceNotFoundException exception if the service is empty'); + } + $this->assertNull($sc->get('', ContainerInterface::NULL_ON_INVALID_REFERENCE), '->get() returns null if the service is empty'); + } + + /** + * @group legacy + * @expectedDeprecation Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map. + * @expectedDeprecation Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map. + * @expectedDeprecation Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map. + * @expectedDeprecation Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map. + */ + public function testLegacyGet() + { + $sc = new LegacyProjectServiceContainer(); + $sc->set('foo', $foo = new \stdClass()); + + $this->assertSame($foo, $sc->get('foo'), '->get() returns the service for the given id'); + $this->assertSame($foo, $sc->get('Foo'), '->get() returns the service for the given id, and converts id to lowercase'); + $this->assertSame($sc->__bar, $sc->get('bar'), '->get() returns the service for the given id'); + $this->assertSame($sc->__foo_bar, $sc->get('foo_bar'), '->get() returns the service if a get*Method() is defined'); + $this->assertSame($sc->__foo_baz, $sc->get('foo.baz'), '->get() returns the service if a get*Method() is defined'); + $this->assertSame($sc->__foo_baz, $sc->get('foo\\baz'), '->get() returns the service if a get*Method() is defined'); + + $sc->set('bar', $bar = new \stdClass()); + $this->assertSame($bar, $sc->get('bar'), '->get() prefers to return a service defined with set() than one defined with a getXXXMethod()'); + + try { + $sc->get(''); + $this->fail('->get() throws a \InvalidArgumentException exception if the service is empty'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException', $e, '->get() throws a ServiceNotFoundException exception if the service is empty'); + } + $this->assertNull($sc->get('', ContainerInterface::NULL_ON_INVALID_REFERENCE), '->get() returns null if the service is empty'); + } + + public function testGetThrowServiceNotFoundException() + { + $sc = new ProjectServiceContainer(); + $sc->set('foo', $foo = new \stdClass()); + $sc->set('baz', $foo = new \stdClass()); + + try { + $sc->get('foo1'); + $this->fail('->get() throws an Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException if the key does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException', $e, '->get() throws an Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException if the key does not exist'); + $this->assertEquals('You have requested a non-existent service "foo1". Did you mean this: "foo"?', $e->getMessage(), '->get() throws an Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException with some advices'); + } + + try { + $sc->get('bag'); + $this->fail('->get() throws an Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException if the key does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException', $e, '->get() throws an Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException if the key does not exist'); + $this->assertEquals('You have requested a non-existent service "bag". Did you mean one of these: "bar", "baz"?', $e->getMessage(), '->get() throws an Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException with some advices'); + } + } + + public function testGetCircularReference() + { + $sc = new ProjectServiceContainer(); + try { + $sc->get('circular'); + $this->fail('->get() throws a ServiceCircularReferenceException if it contains circular reference'); + } catch (\Exception $e) { + $this->assertInstanceOf('\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException', $e, '->get() throws a ServiceCircularReferenceException if it contains circular reference'); + $this->assertStringStartsWith('Circular reference detected for service "circular"', $e->getMessage(), '->get() throws a \LogicException if it contains circular reference'); + } + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage You have requested a synthetic service ("request"). The DIC does not know how to construct this service. + */ + public function testGetSyntheticServiceAlwaysThrows() + { + require_once __DIR__.'/Fixtures/php/services9.php'; + + $container = new \ProjectServiceContainer(); + $container->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE); + } + + public function testHas() + { + $sc = new ProjectServiceContainer(); + $sc->set('foo', new \stdClass()); + $this->assertFalse($sc->has('foo1'), '->has() returns false if the service does not exist'); + $this->assertTrue($sc->has('foo'), '->has() returns true if the service exists'); + $this->assertTrue($sc->has('bar'), '->has() returns true if a get*Method() is defined'); + $this->assertTrue($sc->has('foo_bar'), '->has() returns true if a get*Method() is defined'); + $this->assertTrue($sc->has('foo.baz'), '->has() returns true if a get*Method() is defined'); + } + + /** + * @group legacy + * @expectedDeprecation Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map. + * @expectedDeprecation Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map. + * @expectedDeprecation Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map. + * @expectedDeprecation Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map. + */ + public function testLegacyHas() + { + $sc = new LegacyProjectServiceContainer(); + $sc->set('foo', new \stdClass()); + + $this->assertFalse($sc->has('foo1'), '->has() returns false if the service does not exist'); + $this->assertTrue($sc->has('foo'), '->has() returns true if the service exists'); + $this->assertTrue($sc->has('bar'), '->has() returns true if a get*Method() is defined'); + $this->assertTrue($sc->has('foo_bar'), '->has() returns true if a get*Method() is defined'); + $this->assertTrue($sc->has('foo.baz'), '->has() returns true if a get*Method() is defined'); + $this->assertTrue($sc->has('foo\\baz'), '->has() returns true if a get*Method() is defined'); + } + + public function testInitialized() + { + $sc = new ProjectServiceContainer(); + $sc->set('foo', new \stdClass()); + $this->assertTrue($sc->initialized('foo'), '->initialized() returns true if service is loaded'); + $this->assertFalse($sc->initialized('foo1'), '->initialized() returns false if service is not loaded'); + $this->assertFalse($sc->initialized('bar'), '->initialized() returns false if a service is defined, but not currently loaded'); + $this->assertFalse($sc->initialized('alias'), '->initialized() returns false if an aliased service is not initialized'); + + $sc->set('bar', new \stdClass()); + $this->assertTrue($sc->initialized('alias'), '->initialized() returns true for alias if aliased service is initialized'); + } + + public function testReset() + { + $c = new Container(); + $c->set('bar', new \stdClass()); + + $c->reset(); + + $this->assertNull($c->get('bar', ContainerInterface::NULL_ON_INVALID_REFERENCE)); + } + + /** + * @expectedException \Exception + * @expectedExceptionMessage Something went terribly wrong! + */ + public function testGetThrowsException() + { + $c = new ProjectServiceContainer(); + + try { + $c->get('throw_exception'); + } catch (\Exception $e) { + // Do nothing. + } + + // Retry, to make sure that get*Service() will be called. + $c->get('throw_exception'); + } + + public function testGetThrowsExceptionOnServiceConfiguration() + { + $c = new ProjectServiceContainer(); + + try { + $c->get('throws_exception_on_service_configuration'); + } catch (\Exception $e) { + // Do nothing. + } + + $this->assertFalse($c->initialized('throws_exception_on_service_configuration')); + + // Retry, to make sure that get*Service() will be called. + try { + $c->get('throws_exception_on_service_configuration'); + } catch (\Exception $e) { + // Do nothing. + } + $this->assertFalse($c->initialized('throws_exception_on_service_configuration')); + } + + protected function getField($obj, $field) + { + $reflection = new \ReflectionProperty($obj, $field); + $reflection->setAccessible(true); + + return $reflection->getValue($obj); + } + + public function testAlias() + { + $c = new ProjectServiceContainer(); + + $this->assertTrue($c->has('alias')); + $this->assertSame($c->get('alias'), $c->get('bar')); + } + + public function testThatCloningIsNotSupported() + { + $class = new \ReflectionClass('Symfony\Component\DependencyInjection\Container'); + $clone = $class->getMethod('__clone'); + $this->assertFalse($class->isCloneable()); + $this->assertTrue($clone->isPrivate()); + } + + /** + * @group legacy + * @expectedDeprecation Unsetting the "internal" private service is deprecated since Symfony 3.2 and won't be supported anymore in Symfony 4.0. + */ + public function testUnsetInternalPrivateServiceIsDeprecated() + { + $c = new ProjectServiceContainer(); + $c->set('internal', null); + } + + /** + * @group legacy + * @expectedDeprecation Setting the "internal" private service is deprecated since Symfony 3.2 and won't be supported anymore in Symfony 4.0. A new public service will be created instead. + */ + public function testChangeInternalPrivateServiceIsDeprecated() + { + $c = new ProjectServiceContainer(); + $c->set('internal', new \stdClass()); + } + + /** + * @group legacy + * @expectedDeprecation Checking for the existence of the "internal" private service is deprecated since Symfony 3.2 and won't be supported anymore in Symfony 4.0. + */ + public function testCheckExistenceOfAnInternalPrivateServiceIsDeprecated() + { + $c = new ProjectServiceContainer(); + $c->has('internal'); + } + + /** + * @group legacy + * @expectedDeprecation Requesting the "internal" private service is deprecated since Symfony 3.2 and won't be supported anymore in Symfony 4.0. + */ + public function testRequestAnInternalSharedPrivateServiceIsDeprecated() + { + $c = new ProjectServiceContainer(); + $c->get('internal'); + } +} + +class ProjectServiceContainer extends Container +{ + public $__bar; + public $__foo_bar; + public $__foo_baz; + public $__internal; + protected $methodMap = array( + 'internal' => 'getInternalService', + 'bar' => 'getBarService', + 'foo_bar' => 'getFooBarService', + 'foo.baz' => 'getFoo_BazService', + 'circular' => 'getCircularService', + 'throw_exception' => 'getThrowExceptionService', + 'throws_exception_on_service_configuration' => 'getThrowsExceptionOnServiceConfigurationService', + ); + + public function __construct() + { + parent::__construct(); + + $this->__bar = new \stdClass(); + $this->__foo_bar = new \stdClass(); + $this->__foo_baz = new \stdClass(); + $this->__internal = new \stdClass(); + $this->privates = array('internal' => true); + $this->aliases = array('alias' => 'bar'); + } + + protected function getInternalService() + { + return $this->__internal; + } + + protected function getBarService() + { + return $this->__bar; + } + + protected function getFooBarService() + { + return $this->__foo_bar; + } + + protected function getFoo_BazService() + { + return $this->__foo_baz; + } + + protected function getCircularService() + { + return $this->get('circular'); + } + + protected function getThrowExceptionService() + { + throw new \Exception('Something went terribly wrong!'); + } + + protected function getThrowsExceptionOnServiceConfigurationService() + { + $this->services['throws_exception_on_service_configuration'] = $instance = new \stdClass(); + + throw new \Exception('Something was terribly wrong while trying to configure the service!'); + } +} + +class LegacyProjectServiceContainer extends Container +{ + public $__bar; + public $__foo_bar; + public $__foo_baz; + public $__internal; + + public function __construct() + { + parent::__construct(); + + $this->__bar = new \stdClass(); + $this->__foo_bar = new \stdClass(); + $this->__foo_baz = new \stdClass(); + $this->__internal = new \stdClass(); + $this->privates = array('internal' => true); + $this->aliases = array('alias' => 'bar'); + } + + protected function getInternalService() + { + return $this->__internal; + } + + protected function getBarService() + { + return $this->__bar; + } + + protected function getFooBarService() + { + return $this->__foo_bar; + } + + protected function getFoo_BazService() + { + return $this->__foo_baz; + } + + protected function getCircularService() + { + return $this->get('circular'); + } + + protected function getThrowExceptionService() + { + throw new \Exception('Something went terribly wrong!'); + } + + protected function getThrowsExceptionOnServiceConfigurationService() + { + $this->services['throws_exception_on_service_configuration'] = $instance = new \stdClass(); + + throw new \Exception('Something was terribly wrong while trying to configure the service!'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6bdc8f4f495015c08119bb0ae0bbce4a9c80a2b0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\FileLocator; + +class CrossCheckTest extends TestCase +{ + protected static $fixturesPath; + + public static function setUpBeforeClass() + { + self::$fixturesPath = __DIR__.'/Fixtures/'; + + require_once self::$fixturesPath.'/includes/classes.php'; + require_once self::$fixturesPath.'/includes/foo.php'; + } + + /** + * @dataProvider crossCheckLoadersDumpers + */ + public function testCrossCheck($fixture, $type) + { + $loaderClass = 'Symfony\\Component\\DependencyInjection\\Loader\\'.ucfirst($type).'FileLoader'; + $dumperClass = 'Symfony\\Component\\DependencyInjection\\Dumper\\'.ucfirst($type).'Dumper'; + + $tmp = tempnam(sys_get_temp_dir(), 'sf'); + + copy(self::$fixturesPath.'/'.$type.'/'.$fixture, $tmp); + + $container1 = new ContainerBuilder(); + $loader1 = new $loaderClass($container1, new FileLocator()); + $loader1->load($tmp); + + $dumper = new $dumperClass($container1); + file_put_contents($tmp, $dumper->dump()); + + $container2 = new ContainerBuilder(); + $loader2 = new $loaderClass($container2, new FileLocator()); + $loader2->load($tmp); + + unlink($tmp); + + $this->assertEquals($container2->getAliases(), $container1->getAliases(), 'loading a dump from a previously loaded container returns the same container'); + $this->assertEquals($container2->getDefinitions(), $container1->getDefinitions(), 'loading a dump from a previously loaded container returns the same container'); + $this->assertEquals($container2->getParameterBag()->all(), $container1->getParameterBag()->all(), '->getParameterBag() returns the same value for both containers'); + + $this->assertEquals(serialize($container2), serialize($container1), 'loading a dump from a previously loaded container returns the same container'); + + $services1 = array(); + foreach ($container1 as $id => $service) { + $services1[$id] = serialize($service); + } + $services2 = array(); + foreach ($container2 as $id => $service) { + $services2[$id] = serialize($service); + } + + unset($services1['service_container'], $services2['service_container']); + + $this->assertEquals($services2, $services1, 'Iterator on the containers returns the same services'); + } + + public function crossCheckLoadersDumpers() + { + return array( + array('services1.xml', 'xml'), + array('services2.xml', 'xml'), + array('services6.xml', 'xml'), + array('services8.xml', 'xml'), + array('services9.xml', 'xml'), + array('services1.yml', 'yaml'), + array('services2.yml', 'yaml'), + array('services6.yml', 'yaml'), + array('services8.yml', 'yaml'), + array('services9.yml', 'yaml'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..544c80063fedab1f372f1b01c01e54ba01549837 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\DefinitionDecorator; + +class DefinitionDecoratorTest extends TestCase +{ + public function testConstructor() + { + $def = new DefinitionDecorator('foo'); + + $this->assertEquals('foo', $def->getParent()); + $this->assertEquals(array(), $def->getChanges()); + } + + /** + * @dataProvider getPropertyTests + */ + public function testSetProperty($property, $changeKey) + { + $def = new DefinitionDecorator('foo'); + + $getter = 'get'.ucfirst($property); + $setter = 'set'.ucfirst($property); + + $this->assertNull($def->$getter()); + $this->assertSame($def, $def->$setter('foo')); + $this->assertEquals('foo', $def->$getter()); + $this->assertEquals(array($changeKey => true), $def->getChanges()); + } + + public function getPropertyTests() + { + return array( + array('class', 'class'), + array('factory', 'factory'), + array('configurator', 'configurator'), + array('file', 'file'), + ); + } + + public function testSetPublic() + { + $def = new DefinitionDecorator('foo'); + + $this->assertTrue($def->isPublic()); + $this->assertSame($def, $def->setPublic(false)); + $this->assertFalse($def->isPublic()); + $this->assertEquals(array('public' => true), $def->getChanges()); + } + + public function testSetLazy() + { + $def = new DefinitionDecorator('foo'); + + $this->assertFalse($def->isLazy()); + $this->assertSame($def, $def->setLazy(false)); + $this->assertFalse($def->isLazy()); + $this->assertEquals(array('lazy' => true), $def->getChanges()); + } + + public function testSetAutowired() + { + $def = new DefinitionDecorator('foo'); + + $this->assertFalse($def->isAutowired()); + $this->assertSame($def, $def->setAutowired(false)); + $this->assertFalse($def->isAutowired()); + $this->assertEquals(array('autowire' => true), $def->getChanges()); + } + + public function testSetArgument() + { + $def = new DefinitionDecorator('foo'); + + $this->assertEquals(array(), $def->getArguments()); + $this->assertSame($def, $def->replaceArgument(0, 'foo')); + $this->assertEquals(array('index_0' => 'foo'), $def->getArguments()); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testReplaceArgumentShouldRequireIntegerIndex() + { + $def = new DefinitionDecorator('foo'); + + $def->replaceArgument('0', 'foo'); + } + + public function testReplaceArgument() + { + $def = new DefinitionDecorator('foo'); + + $def->setArguments(array(0 => 'foo', 1 => 'bar')); + $this->assertEquals('foo', $def->getArgument(0)); + $this->assertEquals('bar', $def->getArgument(1)); + + $this->assertSame($def, $def->replaceArgument(1, 'baz')); + $this->assertEquals('foo', $def->getArgument(0)); + $this->assertEquals('baz', $def->getArgument(1)); + + $this->assertEquals(array(0 => 'foo', 1 => 'bar', 'index_1' => 'baz'), $def->getArguments()); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testGetArgumentShouldCheckBounds() + { + $def = new DefinitionDecorator('foo'); + + $def->setArguments(array(0 => 'foo')); + $def->replaceArgument(0, 'foo'); + + $def->getArgument(1); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1e385da5477ab9a8a30601127a00fc5828fc9035 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php @@ -0,0 +1,326 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Definition; + +class DefinitionTest extends TestCase +{ + public function testConstructor() + { + $def = new Definition('stdClass'); + $this->assertEquals('stdClass', $def->getClass(), '__construct() takes the class name as its first argument'); + + $def = new Definition('stdClass', array('foo')); + $this->assertEquals(array('foo'), $def->getArguments(), '__construct() takes an optional array of arguments as its second argument'); + } + + public function testSetGetFactory() + { + $def = new Definition('stdClass'); + + $this->assertSame($def, $def->setFactory('foo'), '->setFactory() implements a fluent interface'); + $this->assertEquals('foo', $def->getFactory(), '->getFactory() returns the factory'); + + $def->setFactory('Foo::bar'); + $this->assertEquals(array('Foo', 'bar'), $def->getFactory(), '->setFactory() converts string static method call to the array'); + } + + public function testSetGetClass() + { + $def = new Definition('stdClass'); + $this->assertSame($def, $def->setClass('foo'), '->setClass() implements a fluent interface'); + $this->assertEquals('foo', $def->getClass(), '->getClass() returns the class name'); + } + + public function testSetGetDecoratedService() + { + $def = new Definition('stdClass'); + $this->assertNull($def->getDecoratedService()); + $def->setDecoratedService('foo', 'foo.renamed', 5); + $this->assertEquals(array('foo', 'foo.renamed', 5), $def->getDecoratedService()); + $def->setDecoratedService(null); + $this->assertNull($def->getDecoratedService()); + + $def = new Definition('stdClass'); + $this->assertNull($def->getDecoratedService()); + $def->setDecoratedService('foo', 'foo.renamed'); + $this->assertEquals(array('foo', 'foo.renamed', 0), $def->getDecoratedService()); + $def->setDecoratedService(null); + $this->assertNull($def->getDecoratedService()); + + $def = new Definition('stdClass'); + $def->setDecoratedService('foo'); + $this->assertEquals(array('foo', null, 0), $def->getDecoratedService()); + $def->setDecoratedService(null); + $this->assertNull($def->getDecoratedService()); + + $def = new Definition('stdClass'); + + if (method_exists($this, 'expectException')) { + $this->expectException('InvalidArgumentException'); + $this->expectExceptionMessage('The decorated service inner name for "foo" must be different than the service name itself.'); + } else { + $this->setExpectedException('InvalidArgumentException', 'The decorated service inner name for "foo" must be different than the service name itself.'); + } + + $def->setDecoratedService('foo', 'foo'); + } + + public function testArguments() + { + $def = new Definition('stdClass'); + $this->assertSame($def, $def->setArguments(array('foo')), '->setArguments() implements a fluent interface'); + $this->assertEquals(array('foo'), $def->getArguments(), '->getArguments() returns the arguments'); + $this->assertSame($def, $def->addArgument('bar'), '->addArgument() implements a fluent interface'); + $this->assertEquals(array('foo', 'bar'), $def->getArguments(), '->addArgument() adds an argument'); + } + + public function testMethodCalls() + { + $def = new Definition('stdClass'); + $this->assertSame($def, $def->setMethodCalls(array(array('foo', array('foo')))), '->setMethodCalls() implements a fluent interface'); + $this->assertEquals(array(array('foo', array('foo'))), $def->getMethodCalls(), '->getMethodCalls() returns the methods to call'); + $this->assertSame($def, $def->addMethodCall('bar', array('bar')), '->addMethodCall() implements a fluent interface'); + $this->assertEquals(array(array('foo', array('foo')), array('bar', array('bar'))), $def->getMethodCalls(), '->addMethodCall() adds a method to call'); + $this->assertTrue($def->hasMethodCall('bar'), '->hasMethodCall() returns true if first argument is a method to call registered'); + $this->assertFalse($def->hasMethodCall('no_registered'), '->hasMethodCall() returns false if first argument is not a method to call registered'); + $this->assertSame($def, $def->removeMethodCall('bar'), '->removeMethodCall() implements a fluent interface'); + $this->assertEquals(array(array('foo', array('foo'))), $def->getMethodCalls(), '->removeMethodCall() removes a method to call'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessage Method name cannot be empty. + */ + public function testExceptionOnEmptyMethodCall() + { + $def = new Definition('stdClass'); + $def->addMethodCall(''); + } + + public function testSetGetFile() + { + $def = new Definition('stdClass'); + $this->assertSame($def, $def->setFile('foo'), '->setFile() implements a fluent interface'); + $this->assertEquals('foo', $def->getFile(), '->getFile() returns the file to include'); + } + + public function testSetIsShared() + { + $def = new Definition('stdClass'); + $this->assertTrue($def->isShared(), '->isShared() returns true by default'); + $this->assertSame($def, $def->setShared(false), '->setShared() implements a fluent interface'); + $this->assertFalse($def->isShared(), '->isShared() returns false if the instance must not be shared'); + } + + public function testSetIsPublic() + { + $def = new Definition('stdClass'); + $this->assertTrue($def->isPublic(), '->isPublic() returns true by default'); + $this->assertSame($def, $def->setPublic(false), '->setPublic() implements a fluent interface'); + $this->assertFalse($def->isPublic(), '->isPublic() returns false if the instance must not be public.'); + } + + public function testSetIsSynthetic() + { + $def = new Definition('stdClass'); + $this->assertFalse($def->isSynthetic(), '->isSynthetic() returns false by default'); + $this->assertSame($def, $def->setSynthetic(true), '->setSynthetic() implements a fluent interface'); + $this->assertTrue($def->isSynthetic(), '->isSynthetic() returns true if the service is synthetic.'); + } + + public function testSetIsLazy() + { + $def = new Definition('stdClass'); + $this->assertFalse($def->isLazy(), '->isLazy() returns false by default'); + $this->assertSame($def, $def->setLazy(true), '->setLazy() implements a fluent interface'); + $this->assertTrue($def->isLazy(), '->isLazy() returns true if the service is lazy.'); + } + + public function testSetIsAbstract() + { + $def = new Definition('stdClass'); + $this->assertFalse($def->isAbstract(), '->isAbstract() returns false by default'); + $this->assertSame($def, $def->setAbstract(true), '->setAbstract() implements a fluent interface'); + $this->assertTrue($def->isAbstract(), '->isAbstract() returns true if the instance must not be public.'); + } + + public function testSetIsDeprecated() + { + $def = new Definition('stdClass'); + $this->assertFalse($def->isDeprecated(), '->isDeprecated() returns false by default'); + $this->assertSame($def, $def->setDeprecated(true), '->setDeprecated() implements a fluent interface'); + $this->assertTrue($def->isDeprecated(), '->isDeprecated() returns true if the instance should not be used anymore.'); + $this->assertSame('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', $def->getDeprecationMessage('deprecated_service'), '->getDeprecationMessage() should return a formatted message template'); + } + + /** + * @dataProvider invalidDeprecationMessageProvider + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + */ + public function testSetDeprecatedWithInvalidDeprecationTemplate($message) + { + $def = new Definition('stdClass'); + $def->setDeprecated(false, $message); + } + + public function invalidDeprecationMessageProvider() + { + return array( + "With \rs" => array("invalid \r message %service_id%"), + "With \ns" => array("invalid \n message %service_id%"), + 'With */s' => array('invalid */ message %service_id%'), + 'message not containing require %service_id% variable' => array('this is deprecated'), + ); + } + + public function testSetGetConfigurator() + { + $def = new Definition('stdClass'); + $this->assertSame($def, $def->setConfigurator('foo'), '->setConfigurator() implements a fluent interface'); + $this->assertEquals('foo', $def->getConfigurator(), '->getConfigurator() returns the configurator'); + } + + public function testClearTags() + { + $def = new Definition('stdClass'); + $this->assertSame($def, $def->clearTags(), '->clearTags() implements a fluent interface'); + $def->addTag('foo', array('foo' => 'bar')); + $def->clearTags(); + $this->assertEquals(array(), $def->getTags(), '->clearTags() removes all current tags'); + } + + public function testClearTag() + { + $def = new Definition('stdClass'); + $this->assertSame($def, $def->clearTags(), '->clearTags() implements a fluent interface'); + $def->addTag('1foo1', array('foo1' => 'bar1')); + $def->addTag('2foo2', array('foo2' => 'bar2')); + $def->addTag('3foo3', array('foo3' => 'bar3')); + $def->clearTag('2foo2'); + $this->assertTrue($def->hasTag('1foo1')); + $this->assertFalse($def->hasTag('2foo2')); + $this->assertTrue($def->hasTag('3foo3')); + $def->clearTag('1foo1'); + $this->assertFalse($def->hasTag('1foo1')); + $this->assertTrue($def->hasTag('3foo3')); + } + + public function testTags() + { + $def = new Definition('stdClass'); + $this->assertEquals(array(), $def->getTag('foo'), '->getTag() returns an empty array if the tag is not defined'); + $this->assertFalse($def->hasTag('foo')); + $this->assertSame($def, $def->addTag('foo'), '->addTag() implements a fluent interface'); + $this->assertTrue($def->hasTag('foo')); + $this->assertEquals(array(array()), $def->getTag('foo'), '->getTag() returns attributes for a tag name'); + $def->addTag('foo', array('foo' => 'bar')); + $this->assertEquals(array(array(), array('foo' => 'bar')), $def->getTag('foo'), '->addTag() can adds the same tag several times'); + $def->addTag('bar', array('bar' => 'bar')); + $this->assertEquals($def->getTags(), array( + 'foo' => array(array(), array('foo' => 'bar')), + 'bar' => array(array('bar' => 'bar')), + ), '->getTags() returns all tags'); + } + + public function testSetArgument() + { + $def = new Definition('stdClass'); + + $def->addArgument('foo'); + $this->assertSame(array('foo'), $def->getArguments()); + + $this->assertSame($def, $def->replaceArgument(0, 'moo')); + $this->assertSame(array('moo'), $def->getArguments()); + + $def->addArgument('moo'); + $def + ->replaceArgument(0, 'foo') + ->replaceArgument(1, 'bar') + ; + $this->assertSame(array('foo', 'bar'), $def->getArguments()); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testGetArgumentShouldCheckBounds() + { + $def = new Definition('stdClass'); + + $def->addArgument('foo'); + $def->getArgument(1); + } + + /** + * @expectedException \OutOfBoundsException + * @expectedExceptionMessage The index "1" is not in the range [0, 0]. + */ + public function testReplaceArgumentShouldCheckBounds() + { + $def = new Definition('stdClass'); + + $def->addArgument('foo'); + $def->replaceArgument(1, 'bar'); + } + + /** + * @expectedException \OutOfBoundsException + * @expectedExceptionMessage Cannot replace arguments if none have been configured yet. + */ + public function testReplaceArgumentWithoutExistingArgumentsShouldCheckBounds() + { + $def = new Definition('stdClass'); + $def->replaceArgument(0, 'bar'); + } + + public function testSetGetProperties() + { + $def = new Definition('stdClass'); + + $this->assertEquals(array(), $def->getProperties()); + $this->assertSame($def, $def->setProperties(array('foo' => 'bar'))); + $this->assertEquals(array('foo' => 'bar'), $def->getProperties()); + } + + public function testSetProperty() + { + $def = new Definition('stdClass'); + + $this->assertEquals(array(), $def->getProperties()); + $this->assertSame($def, $def->setProperty('foo', 'bar')); + $this->assertEquals(array('foo' => 'bar'), $def->getProperties()); + } + + public function testAutowired() + { + $def = new Definition('stdClass'); + $this->assertFalse($def->isAutowired()); + $def->setAutowired(true); + $this->assertTrue($def->isAutowired()); + } + + public function testTypes() + { + $def = new Definition('stdClass'); + + $this->assertEquals(array(), $def->getAutowiringTypes()); + $this->assertSame($def, $def->setAutowiringTypes(array('Foo'))); + $this->assertEquals(array('Foo'), $def->getAutowiringTypes()); + $this->assertSame($def, $def->addAutowiringType('Bar')); + $this->assertTrue($def->hasAutowiringType('Bar')); + $this->assertSame($def, $def->removeAutowiringType('Foo')); + $this->assertEquals(array('Bar'), $def->getAutowiringTypes()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ffdd0730c7781c4b5602c3e9969b66caa56e9fad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Dumper\GraphvizDumper; + +class GraphvizDumperTest extends TestCase +{ + protected static $fixturesPath; + + public static function setUpBeforeClass() + { + self::$fixturesPath = __DIR__.'/../Fixtures/'; + } + + public function testDump() + { + $dumper = new GraphvizDumper($container = new ContainerBuilder()); + + $this->assertStringEqualsFile(self::$fixturesPath.'/graphviz/services1.dot', $dumper->dump(), '->dump() dumps an empty container as an empty dot file'); + + $container = include self::$fixturesPath.'/containers/container9.php'; + $dumper = new GraphvizDumper($container); + $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services9.dot')), $dumper->dump(), '->dump() dumps services'); + + $container = include self::$fixturesPath.'/containers/container10.php'; + $dumper = new GraphvizDumper($container); + $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services10.dot')), $dumper->dump(), '->dump() dumps services'); + + $container = include self::$fixturesPath.'/containers/container10.php'; + $dumper = new GraphvizDumper($container); + $this->assertEquals($dumper->dump(array( + 'graph' => array('ratio' => 'normal'), + 'node' => array('fontsize' => 13, 'fontname' => 'Verdana', 'shape' => 'square'), + 'edge' => array('fontsize' => 12, 'fontname' => 'Verdana', 'color' => 'white', 'arrowhead' => 'closed', 'arrowsize' => 1), + 'node.instance' => array('fillcolor' => 'green', 'style' => 'empty'), + 'node.definition' => array('fillcolor' => 'grey'), + 'node.missing' => array('fillcolor' => 'red', 'style' => 'empty'), + )), str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services10-1.dot')), '->dump() dumps services'); + } + + public function testDumpWithFrozenContainer() + { + $container = include self::$fixturesPath.'/containers/container13.php'; + $dumper = new GraphvizDumper($container); + $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services13.dot')), $dumper->dump(), '->dump() dumps services'); + } + + public function testDumpWithFrozenCustomClassContainer() + { + $container = include self::$fixturesPath.'/containers/container14.php'; + $dumper = new GraphvizDumper($container); + $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services14.dot')), $dumper->dump(), '->dump() dumps services'); + } + + public function testDumpWithUnresolvedParameter() + { + $container = include self::$fixturesPath.'/containers/container17.php'; + $dumper = new GraphvizDumper($container); + + $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services17.dot')), $dumper->dump(), '->dump() dumps services'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b56911e0af0859b21bb5bf13a18b36d9510738e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -0,0 +1,405 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Dumper; + +use DummyProxyDumper; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Dumper\PhpDumper; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\DependencyInjection\Variable; +use Symfony\Component\ExpressionLanguage\Expression; + +require_once __DIR__.'/../Fixtures/includes/classes.php'; + +class PhpDumperTest extends TestCase +{ + protected static $fixturesPath; + + public static function setUpBeforeClass() + { + self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); + } + + public function testDump() + { + $dumper = new PhpDumper(new ContainerBuilder()); + + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services1.php', $dumper->dump(), '->dump() dumps an empty container as an empty PHP class'); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services1-1.php', $dumper->dump(array('class' => 'Container', 'base_class' => 'AbstractContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Dump')), '->dump() takes a class and a base_class options'); + } + + public function testDumpOptimizationString() + { + $definition = new Definition(); + $definition->setClass('stdClass'); + $definition->addArgument(array( + 'only dot' => '.', + 'concatenation as value' => '.\'\'.', + 'concatenation from the start value' => '\'\'.', + '.' => 'dot as a key', + '.\'\'.' => 'concatenation as a key', + '\'\'.' => 'concatenation from the start key', + 'optimize concatenation' => 'string1%some_string%string2', + 'optimize concatenation with empty string' => 'string1%empty_value%string2', + 'optimize concatenation from the start' => '%empty_value%start', + 'optimize concatenation at the end' => 'end%empty_value%', + )); + + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + $container->setDefinition('test', $definition); + $container->setParameter('empty_value', ''); + $container->setParameter('some_string', '-'); + $container->compile(); + + $dumper = new PhpDumper($container); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services10.php', $dumper->dump(), '->dump() dumps an empty container as an empty PHP class'); + } + + public function testDumpRelativeDir() + { + $definition = new Definition(); + $definition->setClass('stdClass'); + $definition->addArgument('%foo%'); + $definition->addArgument(array('%foo%' => '%buz%/')); + + $container = new ContainerBuilder(); + $container->setDefinition('test', $definition); + $container->setParameter('foo', 'wiz'.dirname(__DIR__)); + $container->setParameter('bar', __DIR__); + $container->setParameter('baz', '%bar%/PhpDumperTest.php'); + $container->setParameter('buz', dirname(dirname(__DIR__))); + $container->compile(); + + $dumper = new PhpDumper($container); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services12.php', $dumper->dump(array('file' => __FILE__)), '->dump() dumps __DIR__ relative strings'); + } + + /** + * @dataProvider provideInvalidParameters + * @expectedException \InvalidArgumentException + */ + public function testExportParameters($parameters) + { + $dumper = new PhpDumper(new ContainerBuilder(new ParameterBag($parameters))); + $dumper->dump(); + } + + public function provideInvalidParameters() + { + return array( + array(array('foo' => new Definition('stdClass'))), + array(array('foo' => new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")'))), + array(array('foo' => new Reference('foo'))), + array(array('foo' => new Variable('foo'))), + ); + } + + public function testAddParameters() + { + $container = include self::$fixturesPath.'/containers/container8.php'; + $dumper = new PhpDumper($container); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services8.php', $dumper->dump(), '->dump() dumps parameters'); + } + + public function testAddService() + { + // without compilation + $container = include self::$fixturesPath.'/containers/container9.php'; + $dumper = new PhpDumper($container); + $this->assertEquals(str_replace('%path%', str_replace('\\', '\\\\', self::$fixturesPath.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR), file_get_contents(self::$fixturesPath.'/php/services9.php')), $dumper->dump(), '->dump() dumps services'); + + // with compilation + $container = include self::$fixturesPath.'/containers/container9.php'; + $container->compile(); + $dumper = new PhpDumper($container); + $this->assertEquals(str_replace('%path%', str_replace('\\', '\\\\', self::$fixturesPath.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR), file_get_contents(self::$fixturesPath.'/php/services9_compiled.php')), $dumper->dump(), '->dump() dumps services'); + + $dumper = new PhpDumper($container = new ContainerBuilder()); + $container->register('foo', 'FooClass')->addArgument(new \stdClass()); + try { + $dumper->dump(); + $this->fail('->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources'); + } catch (\Exception $e) { + $this->assertInstanceOf('\Symfony\Component\DependencyInjection\Exception\RuntimeException', $e, '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources'); + $this->assertEquals('Unable to dump a service container if a parameter is an object or a resource.', $e->getMessage(), '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources'); + } + } + + public function testServicesWithAnonymousFactories() + { + $container = include self::$fixturesPath.'/containers/container19.php'; + $dumper = new PhpDumper($container); + + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services19.php', $dumper->dump(), '->dump() dumps services with anonymous factories'); + } + + public function testAddServiceIdWithUnsupportedCharacters() + { + $class = 'Symfony_DI_PhpDumper_Test_Unsupported_Characters'; + $container = new ContainerBuilder(); + $container->register('bar$', 'FooClass'); + $container->register('bar$!', 'FooClass'); + $dumper = new PhpDumper($container); + eval('?>'.$dumper->dump(array('class' => $class))); + + $this->assertTrue(method_exists($class, 'getBarService')); + $this->assertTrue(method_exists($class, 'getBar2Service')); + } + + public function testConflictingServiceIds() + { + $class = 'Symfony_DI_PhpDumper_Test_Conflicting_Service_Ids'; + $container = new ContainerBuilder(); + $container->register('foo_bar', 'FooClass'); + $container->register('foobar', 'FooClass'); + $dumper = new PhpDumper($container); + eval('?>'.$dumper->dump(array('class' => $class))); + + $this->assertTrue(method_exists($class, 'getFooBarService')); + $this->assertTrue(method_exists($class, 'getFoobar2Service')); + } + + public function testConflictingMethodsWithParent() + { + $class = 'Symfony_DI_PhpDumper_Test_Conflicting_Method_With_Parent'; + $container = new ContainerBuilder(); + $container->register('bar', 'FooClass'); + $container->register('foo_bar', 'FooClass'); + $dumper = new PhpDumper($container); + eval('?>'.$dumper->dump(array( + 'class' => $class, + 'base_class' => 'Symfony\Component\DependencyInjection\Tests\Fixtures\containers\CustomContainer', + ))); + + $this->assertTrue(method_exists($class, 'getBar2Service')); + $this->assertTrue(method_exists($class, 'getFoobar2Service')); + } + + /** + * @dataProvider provideInvalidFactories + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage Cannot dump definition + */ + public function testInvalidFactories($factory) + { + $container = new ContainerBuilder(); + $def = new Definition('stdClass'); + $def->setFactory($factory); + $container->setDefinition('bar', $def); + $dumper = new PhpDumper($container); + $dumper->dump(); + } + + public function provideInvalidFactories() + { + return array( + array(array('', 'method')), + array(array('class', '')), + array(array('...', 'method')), + array(array('class', '...')), + ); + } + + public function testAliases() + { + $container = include self::$fixturesPath.'/containers/container9.php'; + $container->compile(); + $dumper = new PhpDumper($container); + eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Aliases'))); + + $container = new \Symfony_DI_PhpDumper_Test_Aliases(); + $container->set('foo', $foo = new \stdClass()); + $this->assertSame($foo, $container->get('foo')); + $this->assertSame($foo, $container->get('alias_for_foo')); + $this->assertSame($foo, $container->get('alias_for_alias')); + } + + public function testFrozenContainerWithoutAliases() + { + $container = new ContainerBuilder(); + $container->compile(); + + $dumper = new PhpDumper($container); + eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Frozen_No_Aliases'))); + + $container = new \Symfony_DI_PhpDumper_Test_Frozen_No_Aliases(); + $this->assertFalse($container->has('foo')); + } + + public function testOverrideServiceWhenUsingADumpedContainer() + { + require_once self::$fixturesPath.'/php/services9.php'; + require_once self::$fixturesPath.'/includes/foo.php'; + + $container = new \ProjectServiceContainer(); + $container->set('bar', $bar = new \stdClass()); + $container->setParameter('foo_bar', 'foo_bar'); + + $this->assertSame($bar, $container->get('bar'), '->set() overrides an already defined service'); + } + + public function testOverrideServiceWhenUsingADumpedContainerAndServiceIsUsedFromAnotherOne() + { + require_once self::$fixturesPath.'/php/services9.php'; + require_once self::$fixturesPath.'/includes/foo.php'; + require_once self::$fixturesPath.'/includes/classes.php'; + + $container = new \ProjectServiceContainer(); + $container->set('bar', $bar = new \stdClass()); + + $this->assertSame($bar, $container->get('foo')->bar, '->set() overrides an already defined service'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException + */ + public function testCircularReference() + { + $container = new ContainerBuilder(); + $container->register('foo', 'stdClass')->addArgument(new Reference('bar')); + $container->register('bar', 'stdClass')->setPublic(false)->addMethodCall('setA', array(new Reference('baz'))); + $container->register('baz', 'stdClass')->addMethodCall('setA', array(new Reference('foo'))); + $container->compile(); + + $dumper = new PhpDumper($container); + $dumper->dump(); + } + + public function testDumpAutowireData() + { + $container = include self::$fixturesPath.'/containers/container24.php'; + $dumper = new PhpDumper($container); + + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services24.php', $dumper->dump()); + } + + public function testEnvParameter() + { + $container = new ContainerBuilder(); + $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('services26.yml'); + $container->compile(); + $dumper = new PhpDumper($container); + + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services26.php', $dumper->dump(), '->dump() dumps inline definitions which reference service_container'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\EnvParameterException + * @expectedExceptionMessage Incompatible use of dynamic environment variables "FOO" found in parameters. + */ + public function testUnusedEnvParameter() + { + $container = new ContainerBuilder(); + $container->getParameter('env(FOO)'); + $container->compile(); + $dumper = new PhpDumper($container); + $dumper->dump(); + } + + public function testInlinedDefinitionReferencingServiceContainer() + { + $container = new ContainerBuilder(); + $container->register('foo', 'stdClass')->addMethodCall('add', array(new Reference('service_container')))->setPublic(false); + $container->register('bar', 'stdClass')->addArgument(new Reference('foo')); + $container->compile(); + + $dumper = new PhpDumper($container); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services13.php', $dumper->dump(), '->dump() dumps inline definitions which reference service_container'); + } + + public function testInitializePropertiesBeforeMethodCalls() + { + require_once self::$fixturesPath.'/includes/classes.php'; + + $container = new ContainerBuilder(); + $container->register('foo', 'stdClass'); + $container->register('bar', 'MethodCallClass') + ->setProperty('simple', 'bar') + ->setProperty('complex', new Reference('foo')) + ->addMethodCall('callMe'); + $container->compile(); + + $dumper = new PhpDumper($container); + eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Properties_Before_Method_Calls'))); + + $container = new \Symfony_DI_PhpDumper_Test_Properties_Before_Method_Calls(); + $this->assertTrue($container->get('bar')->callPassed(), '->dump() initializes properties before method calls'); + } + + public function testCircularReferenceAllowanceForLazyServices() + { + $container = new ContainerBuilder(); + $container->register('foo', 'stdClass')->addArgument(new Reference('bar')); + $container->register('bar', 'stdClass')->setLazy(true)->addArgument(new Reference('foo')); + $container->compile(); + + $dumper = new PhpDumper($container); + $dumper->dump(); + } + + public function testCircularReferenceAllowanceForInlinedDefinitionsForLazyServices() + { + /* + * test graph: + * [connection] -> [event_manager] --> [entity_manager](lazy) + * | + * --(call)- addEventListener ("@lazy_service") + * + * [lazy_service](lazy) -> [entity_manager](lazy) + * + */ + + $container = new ContainerBuilder(); + + $eventManagerDefinition = new Definition('stdClass'); + + $connectionDefinition = $container->register('connection', 'stdClass'); + $connectionDefinition->addArgument($eventManagerDefinition); + + $container->register('entity_manager', 'stdClass') + ->setLazy(true) + ->addArgument(new Reference('connection')); + + $lazyServiceDefinition = $container->register('lazy_service', 'stdClass'); + $lazyServiceDefinition->setLazy(true); + $lazyServiceDefinition->addArgument(new Reference('entity_manager')); + + $eventManagerDefinition->addMethodCall('addEventListener', array(new Reference('lazy_service'))); + + $container->compile(); + + $dumper = new PhpDumper($container); + + $dumper->setProxyDumper(new DummyProxyDumper()); + $dumper->dump(); + } + + public function testDumpContainerBuilderWithFrozenConstructorIncludingPrivateServices() + { + $container = new ContainerBuilder(); + $container->register('foo_service', 'stdClass')->setArguments(array(new Reference('baz_service'))); + $container->register('bar_service', 'stdClass')->setArguments(array(new Reference('baz_service'))); + $container->register('baz_service', 'stdClass')->setPublic(false); + $container->compile(); + + $dumper = new PhpDumper($container); + + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_private_frozen.php', $dumper->dump()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..924f2d99ddf9ffde1973fde1990cdaa51868abaa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.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\Component\DependencyInjection\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Dumper\XmlDumper; + +class XmlDumperTest extends TestCase +{ + protected static $fixturesPath; + + public static function setUpBeforeClass() + { + self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); + } + + public function testDump() + { + $dumper = new XmlDumper(new ContainerBuilder()); + + $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/xml/services1.xml', $dumper->dump(), '->dump() dumps an empty container as an empty XML file'); + } + + public function testExportParameters() + { + $container = include self::$fixturesPath.'//containers/container8.php'; + $dumper = new XmlDumper($container); + $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/xml/services8.xml', $dumper->dump(), '->dump() dumps parameters'); + } + + public function testAddParameters() + { + $container = include self::$fixturesPath.'//containers/container8.php'; + $dumper = new XmlDumper($container); + $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/xml/services8.xml', $dumper->dump(), '->dump() dumps parameters'); + } + + public function testAddService() + { + $container = include self::$fixturesPath.'/containers/container9.php'; + $dumper = new XmlDumper($container); + + $this->assertEquals(str_replace('%path%', self::$fixturesPath.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR, file_get_contents(self::$fixturesPath.'/xml/services9.xml')), $dumper->dump(), '->dump() dumps services'); + + $dumper = new XmlDumper($container = new ContainerBuilder()); + $container->register('foo', 'FooClass')->addArgument(new \stdClass()); + try { + $dumper->dump(); + $this->fail('->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources'); + } catch (\Exception $e) { + $this->assertInstanceOf('\RuntimeException', $e, '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources'); + $this->assertEquals('Unable to dump a service container if a parameter is an object or a resource.', $e->getMessage(), '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources'); + } + } + + public function testDumpAnonymousServices() + { + $container = include self::$fixturesPath.'/containers/container11.php'; + $dumper = new XmlDumper($container); + $this->assertEquals(' + + + + + + + + + + + + + +', $dumper->dump()); + } + + public function testDumpEntities() + { + $container = include self::$fixturesPath.'/containers/container12.php'; + $dumper = new XmlDumper($container); + $this->assertEquals(" + + + + + foo<>&bar + + + +", $dumper->dump()); + } + + /** + * @dataProvider provideDecoratedServicesData + */ + public function testDumpDecoratedServices($expectedXmlDump, $container) + { + $dumper = new XmlDumper($container); + $this->assertEquals($expectedXmlDump, $dumper->dump()); + } + + public function provideDecoratedServicesData() + { + $fixturesPath = realpath(__DIR__.'/../Fixtures/'); + + return array( + array(" + + + + + +", include $fixturesPath.'/containers/container15.php'), + array(" + + + + + +", include $fixturesPath.'/containers/container16.php'), + ); + } + + /** + * @dataProvider provideCompiledContainerData + */ + public function testCompiledContainerCanBeDumped($containerFile) + { + $fixturesPath = __DIR__.'/../Fixtures'; + $container = require $fixturesPath.'/containers/'.$containerFile.'.php'; + $container->compile(); + $dumper = new XmlDumper($container); + $dumper->dump(); + } + + public function provideCompiledContainerData() + { + return array( + array('container8'), + array('container9'), + array('container11'), + array('container12'), + array('container14'), + ); + } + + public function testDumpInlinedServices() + { + $container = include self::$fixturesPath.'/containers/container21.php'; + $dumper = new XmlDumper($container); + + $this->assertEquals(file_get_contents(self::$fixturesPath.'/xml/services21.xml'), $dumper->dump()); + } + + public function testDumpAutowireData() + { + $container = include self::$fixturesPath.'/containers/container24.php'; + $dumper = new XmlDumper($container); + + $this->assertEquals(file_get_contents(self::$fixturesPath.'/xml/services24.xml'), $dumper->dump()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..11abe3b9235382f38feacf6d54e501b299a4d368 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Dumper\YamlDumper; +use Symfony\Component\Yaml\Yaml; + +class YamlDumperTest extends TestCase +{ + protected static $fixturesPath; + + public static function setUpBeforeClass() + { + self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); + } + + public function testDump() + { + $dumper = new YamlDumper($container = new ContainerBuilder()); + + $this->assertEqualYamlStructure(file_get_contents(self::$fixturesPath.'/yaml/services1.yml'), $dumper->dump(), '->dump() dumps an empty container as an empty YAML file'); + } + + public function testAddParameters() + { + $container = include self::$fixturesPath.'/containers/container8.php'; + $dumper = new YamlDumper($container); + $this->assertEqualYamlStructure(file_get_contents(self::$fixturesPath.'/yaml/services8.yml'), $dumper->dump(), '->dump() dumps parameters'); + } + + public function testAddService() + { + $container = include self::$fixturesPath.'/containers/container9.php'; + $dumper = new YamlDumper($container); + $this->assertEqualYamlStructure(str_replace('%path%', self::$fixturesPath.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR, file_get_contents(self::$fixturesPath.'/yaml/services9.yml')), $dumper->dump(), '->dump() dumps services'); + + $dumper = new YamlDumper($container = new ContainerBuilder()); + $container->register('foo', 'FooClass')->addArgument(new \stdClass()); + try { + $dumper->dump(); + $this->fail('->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources'); + } catch (\Exception $e) { + $this->assertInstanceOf('\RuntimeException', $e, '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources'); + $this->assertEquals('Unable to dump a service container if a parameter is an object or a resource.', $e->getMessage(), '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources'); + } + } + + public function testDumpAutowireData() + { + $container = include self::$fixturesPath.'/containers/container24.php'; + $dumper = new YamlDumper($container); + $this->assertStringEqualsFile(self::$fixturesPath.'/yaml/services24.yml', $dumper->dump()); + } + + private function assertEqualYamlStructure($yaml, $expected, $message = '') + { + $this->assertEquals(Yaml::parse($expected), Yaml::parse($yaml), $message); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..90852c359e51458c3177d0e069a057357b681f8d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Extension; + +use PHPUnit\Framework\TestCase; + +class ExtensionTest extends TestCase +{ + /** + * @dataProvider getResolvedEnabledFixtures + */ + public function testIsConfigEnabledReturnsTheResolvedValue($enabled) + { + $pb = $this->getMockBuilder('Symfony\Component\DependencyInjection\ParameterBag\ParameterBag') + ->setMethods(array('resolveValue')) + ->getMock() + ; + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder') + ->setMethods(array('getParameterBag')) + ->getMock() + ; + + $pb->expects($this->once()) + ->method('resolveValue') + ->with($this->equalTo($enabled)) + ->will($this->returnValue($enabled)) + ; + + $container->expects($this->once()) + ->method('getParameterBag') + ->will($this->returnValue($pb)) + ; + + $extension = $this->getMockBuilder('Symfony\Component\DependencyInjection\Extension\Extension') + ->setMethods(array()) + ->getMockForAbstractClass() + ; + + $r = new \ReflectionMethod('Symfony\Component\DependencyInjection\Extension\Extension', 'isConfigEnabled'); + $r->setAccessible(true); + + $r->invoke($extension, $container, array('enabled' => $enabled)); + } + + public function getResolvedEnabledFixtures() + { + return array( + array(true), + array(false), + ); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessage The config array has no 'enabled' key. + */ + public function testIsConfigEnabledOnNonEnableableConfig() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder') + ->getMock() + ; + + $extension = $this->getMockBuilder('Symfony\Component\DependencyInjection\Extension\Extension') + ->setMethods(array()) + ->getMockForAbstractClass() + ; + + $r = new \ReflectionMethod('Symfony\Component\DependencyInjection\Extension\Extension', 'isConfigEnabled'); + $r->setAccessible(true); + + $r->invoke($extension, $container, array()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/CustomDefinition.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/CustomDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..65eea2106ed706f1c2c8f945b9016583e26eed01 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/CustomDefinition.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures; + +use Symfony\Component\DependencyInjection\Definition; + +class CustomDefinition extends Definition +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/FactoryDummy.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/FactoryDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..da984b562a39d0c7b7412979205b01f3a547a0b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/FactoryDummy.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures; + +class FactoryDummy extends FactoryParent +{ + public static function createFactory(): FactoryDummy + { + } + + public function create(): \stdClass + { + } + + // Not supported by hhvm + public function createBuiltin(): int + { + } + + public static function createSelf(): self + { + } + + public static function createParent(): parent + { + } +} + +class FactoryParent +{ +} + +function factoryFunction(): FactoryDummy +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/CustomContainer.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/CustomContainer.php new file mode 100644 index 0000000000000000000000000000000000000000..2251435324b38817cd933bb13d18509fd14b2aec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/CustomContainer.php @@ -0,0 +1,17 @@ + + register('foo', 'FooClass')-> + addArgument(new Reference('bar')) +; + +return $container; diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container11.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container11.php new file mode 100644 index 0000000000000000000000000000000000000000..3e6cafca24f90029cc57306115b072fdef2af7f9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container11.php @@ -0,0 +1,12 @@ + + register('foo', 'FooClass')-> + addArgument(new Definition('BarClass', array(new Definition('BazClass')))) +; + +return $container; diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container12.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container12.php new file mode 100644 index 0000000000000000000000000000000000000000..73c5b4ef176e252470a5d97e699523f9ae30e406 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container12.php @@ -0,0 +1,12 @@ + + register('foo', 'FooClass\\Foo')-> + addArgument('foo<>&bar')-> + addTag('foo"bar\\bar', array('foo' => 'foo"barřž€')) +; + +return $container; diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container13.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container13.php new file mode 100644 index 0000000000000000000000000000000000000000..cc716c78f04f5ba4458a0cc20a6c236f53d1f8d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container13.php @@ -0,0 +1,16 @@ + + register('foo', 'FooClass')-> + addArgument(new Reference('bar')) +; +$container-> + register('bar', 'BarClass') +; +$container->compile(); + +return $container; diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container14.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container14.php new file mode 100644 index 0000000000000000000000000000000000000000..191afb8cddc1fb70dfd1e5b342aaecb49f12a72b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container14.php @@ -0,0 +1,17 @@ +register('foo', 'FooClass\\Foo') + ->setDecoratedService('bar', 'bar.woozy') +; + +return $container; diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container16.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container16.php new file mode 100644 index 0000000000000000000000000000000000000000..67b4d353db4d2dc12bcdd6518320f8d2c8337dea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container16.php @@ -0,0 +1,11 @@ +register('foo', 'FooClass\\Foo') + ->setDecoratedService('bar') +; + +return $container; diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container17.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container17.php new file mode 100644 index 0000000000000000000000000000000000000000..d902ec2a3930627fe5faa02a4d8ab6cf7ed88a3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container17.php @@ -0,0 +1,10 @@ +register('foo', '%foo.class%') +; + +return $container; diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container19.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container19.php new file mode 100644 index 0000000000000000000000000000000000000000..64b8f066dca105d28eec16279a9ed2ace7c1d995 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container19.php @@ -0,0 +1,22 @@ +register('service_from_anonymous_factory', 'Bar\FooClass') + ->setFactory(array(new Definition('Bar\FooClass'), 'getInstance')) +; + +$anonymousServiceWithFactory = new Definition('Bar\FooClass'); +$anonymousServiceWithFactory->setFactory('Bar\FooClass::getInstance'); +$container + ->register('service_with_method_call_and_factory', 'Bar\FooClass') + ->addMethodCall('setBar', array($anonymousServiceWithFactory)) +; + +return $container; diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container21.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container21.php new file mode 100644 index 0000000000000000000000000000000000000000..d0467386140a98c44ae9e7e6f078811c9e0f7515 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container21.php @@ -0,0 +1,20 @@ +setConfigurator(array(new Definition('Baz'), 'configureBar')); + +$fooFactory = new Definition('FooFactory'); +$fooFactory->setFactory(array(new Definition('Foobar'), 'createFooFactory')); + +$container + ->register('foo', 'Foo') + ->setFactory(array($fooFactory, 'createFoo')) + ->setConfigurator(array($bar, 'configureFoo')) +; + +return $container; diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container24.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container24.php new file mode 100644 index 0000000000000000000000000000000000000000..3e033059aee68bbc3d87524b39eceefaba60bfc5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container24.php @@ -0,0 +1,14 @@ +register('foo', 'Foo') + ->setAutowired(true) + ->addAutowiringType('A') + ->addAutowiringType('B') +; + +return $container; diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container8.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container8.php new file mode 100644 index 0000000000000000000000000000000000000000..f0b4ca9330a3834fbe9003c26e78aeaa74ecd28a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container8.php @@ -0,0 +1,14 @@ + '%baz%', + 'baz' => 'bar', + 'bar' => 'foo is %%foo bar', + 'escape' => '@escapeme', + 'values' => array(true, false, null, 0, 1000.3, 'true', 'false', 'null'), +))); + +return $container; diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php new file mode 100644 index 0000000000000000000000000000000000000000..ba25dc3c99361a19e12b056fb8b1fca5432c3d97 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php @@ -0,0 +1,133 @@ +register('foo', '\Bar\FooClass') + ->addTag('foo', array('foo' => 'foo')) + ->addTag('foo', array('bar' => 'bar', 'baz' => 'baz')) + ->setFactory(array('Bar\\FooClass', 'getInstance')) + ->setArguments(array('foo', new Reference('foo.baz'), array('%foo%' => 'foo is %foo%', 'foobar' => '%foo%'), true, new Reference('service_container'))) + ->setProperties(array('foo' => 'bar', 'moo' => new Reference('foo.baz'), 'qux' => array('%foo%' => 'foo is %foo%', 'foobar' => '%foo%'))) + ->addMethodCall('setBar', array(new Reference('bar'))) + ->addMethodCall('initialize') + ->setConfigurator('sc_configure') +; +$container + ->register('foo.baz', '%baz_class%') + ->setFactory(array('%baz_class%', 'getInstance')) + ->setConfigurator(array('%baz_class%', 'configureStatic1')) +; +$container + ->register('bar', 'Bar\FooClass') + ->setArguments(array('foo', new Reference('foo.baz'), new Parameter('foo_bar'))) + ->setConfigurator(array(new Reference('foo.baz'), 'configure')) +; +$container + ->register('foo_bar', '%foo_class%') + ->setShared(false) +; +$container->getParameterBag()->clear(); +$container->getParameterBag()->add(array( + 'baz_class' => 'BazClass', + 'foo_class' => 'Bar\FooClass', + 'foo' => 'bar', +)); +$container->setAlias('alias_for_foo', 'foo'); +$container->setAlias('alias_for_alias', 'alias_for_foo'); +$container + ->register('method_call1', 'Bar\FooClass') + ->setFile(realpath(__DIR__.'/../includes/foo.php')) + ->addMethodCall('setBar', array(new Reference('foo'))) + ->addMethodCall('setBar', array(new Reference('foo2', ContainerInterface::NULL_ON_INVALID_REFERENCE))) + ->addMethodCall('setBar', array(new Reference('foo3', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))) + ->addMethodCall('setBar', array(new Reference('foobaz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))) + ->addMethodCall('setBar', array(new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")'))) +; +$container + ->register('foo_with_inline', 'Foo') + ->addMethodCall('setBar', array(new Reference('inlined'))) +; +$container + ->register('inlined', 'Bar') + ->setProperty('pub', 'pub') + ->addMethodCall('setBaz', array(new Reference('baz'))) + ->setPublic(false) +; +$container + ->register('baz', 'Baz') + ->addMethodCall('setFoo', array(new Reference('foo_with_inline'))) +; +$container + ->register('request', 'Request') + ->setSynthetic(true) +; +$container + ->register('configurator_service', 'ConfClass') + ->setPublic(false) + ->addMethodCall('setFoo', array(new Reference('baz'))) +; +$container + ->register('configured_service', 'stdClass') + ->setConfigurator(array(new Reference('configurator_service'), 'configureStdClass')) +; +$container + ->register('configurator_service_simple', 'ConfClass') + ->addArgument('bar') + ->setPublic(false) +; +$container + ->register('configured_service_simple', 'stdClass') + ->setConfigurator(array(new Reference('configurator_service_simple'), 'configureStdClass')) +; +$container + ->register('decorated', 'stdClass') +; +$container + ->register('decorator_service', 'stdClass') + ->setDecoratedService('decorated') +; +$container + ->register('decorator_service_with_name', 'stdClass') + ->setDecoratedService('decorated', 'decorated.pif-pouf') +; +$container + ->register('deprecated_service', 'stdClass') + ->setDeprecated(true) +; +$container + ->register('new_factory', 'FactoryClass') + ->setProperty('foo', 'bar') + ->setPublic(false) +; +$container + ->register('factory_service', 'Bar') + ->setFactory(array(new Reference('foo.baz'), 'getInstance')) +; +$container + ->register('new_factory_service', 'FooBarBaz') + ->setProperty('foo', 'bar') + ->setFactory(array(new Reference('new_factory'), 'getInstance')) +; +$container + ->register('service_from_static_method', 'Bar\FooClass') + ->setFactory(array('Bar\FooClass', 'getInstance')) +; +$container + ->register('factory_simple', 'SimpleFactoryClass') + ->addArgument('foo') + ->setPublic(false) +; +$container + ->register('factory_service_simple', 'Bar') + ->setFactory(array(new Reference('factory_simple'), 'getInstance')) +; + +return $container; diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/directory/import/import.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/directory/import/import.yml new file mode 100644 index 0000000000000000000000000000000000000000..35ec4a042713682ad698b6badf70f46e4b39f508 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/directory/import/import.yml @@ -0,0 +1,2 @@ +imports: + - { resource: ../recurse/ } diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/directory/recurse/simple.ini b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/directory/recurse/simple.ini new file mode 100644 index 0000000000000000000000000000000000000000..0984cdac770a42db7511d81df4a7cda6dc8f50ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/directory/recurse/simple.ini @@ -0,0 +1,2 @@ +[parameters] + ini = ini diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/directory/recurse/simple.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/directory/recurse/simple.yml new file mode 100644 index 0000000000000000000000000000000000000000..f98ef12ea3c657c497612c138eb4a216bdaacc8a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/directory/recurse/simple.yml @@ -0,0 +1,2 @@ +parameters: + yaml: yaml diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/directory/simple.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/directory/simple.php new file mode 100644 index 0000000000000000000000000000000000000000..4750324ad1de3b8043e9fe1493e61d470c0d3d39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/directory/simple.php @@ -0,0 +1,3 @@ +setParameter('php', 'php'); diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services1.dot b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services1.dot new file mode 100644 index 0000000000000000000000000000000000000000..1bb7c30b8c7024d9836eee81a30ba607e62b9830 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services1.dot @@ -0,0 +1,7 @@ +digraph sc { + ratio="compress" + node [fontsize="11" fontname="Arial" shape="record"]; + edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"]; + + node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerBuilder\n", shape=record, fillcolor="#9999ff", style="filled"]; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10-1.dot b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10-1.dot new file mode 100644 index 0000000000000000000000000000000000000000..0e578b161b8f51e0325fa47a65326dc9dc380118 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10-1.dot @@ -0,0 +1,10 @@ +digraph sc { + ratio="normal" + node [fontsize="13" fontname="Verdana" shape="square"]; + edge [fontsize="12" fontname="Verdana" color="white" arrowhead="closed" arrowsize="1"]; + + node_foo [label="foo\nFooClass\n", shape=square, fillcolor="grey", style="filled"]; + node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerBuilder\n", shape=square, fillcolor="green", style="empty"]; + node_bar [label="bar\n\n", shape=square, fillcolor="red", style="empty"]; + node_foo -> node_bar [label="" style="filled"]; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10.dot b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10.dot new file mode 100644 index 0000000000000000000000000000000000000000..f17857fe428ef87648be164d7d18f1e8b3b9021c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10.dot @@ -0,0 +1,10 @@ +digraph sc { + ratio="compress" + node [fontsize="11" fontname="Arial" shape="record"]; + edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"]; + + node_foo [label="foo\nFooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerBuilder\n", shape=record, fillcolor="#9999ff", style="filled"]; + node_bar [label="bar\n\n", shape=record, fillcolor="#ff9999", style="filled"]; + node_foo -> node_bar [label="" style="filled"]; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services13.dot b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services13.dot new file mode 100644 index 0000000000000000000000000000000000000000..bc7f81317e50a7675dadf586674c7b756b9423c4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services13.dot @@ -0,0 +1,10 @@ +digraph sc { + ratio="compress" + node [fontsize="11" fontname="Arial" shape="record"]; + edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"]; + + node_foo [label="foo\nFooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_bar [label="bar\nBarClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerBuilder\n", shape=record, fillcolor="#9999ff", style="filled"]; + node_foo -> node_bar [label="" style="filled"]; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot new file mode 100644 index 0000000000000000000000000000000000000000..d07dc389e0b2ed4ad098f12e22ee7effbdf54d26 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot @@ -0,0 +1,7 @@ +digraph sc { + ratio="compress" + node [fontsize="11" fontname="Arial" shape="record"]; + edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"]; + + node_service_container [label="service_container\nContainer14\\ProjectServiceContainer\n", shape=record, fillcolor="#9999ff", style="filled"]; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services17.dot b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services17.dot new file mode 100644 index 0000000000000000000000000000000000000000..a6d04bf5a097f8ddc9d129245b421efb356ca94d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services17.dot @@ -0,0 +1,8 @@ +digraph sc { + ratio="compress" + node [fontsize="11" fontname="Arial" shape="record"]; + edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"]; + + node_foo [label="foo\n%foo.class%\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerBuilder\n", shape=record, fillcolor="#9999ff", style="filled"]; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services18.dot b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services18.dot new file mode 100644 index 0000000000000000000000000000000000000000..4fbcceef3614d7e25f54a5b13d204f806ad4b8fc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services18.dot @@ -0,0 +1,8 @@ +digraph sc { + ratio="compress" + node [fontsize="11" fontname="Arial" shape="record"]; + edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"]; + + node_foo [label="foo\nFooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerBuilder\n", shape=record, fillcolor="#9999ff", style="filled"]; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services9.dot b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services9.dot new file mode 100644 index 0000000000000000000000000000000000000000..3b24ef8ffbca384ccb580b623cdd027a5f2e53a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services9.dot @@ -0,0 +1,46 @@ +digraph sc { + ratio="compress" + node [fontsize="11" fontname="Arial" shape="record"]; + edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"]; + + node_foo [label="foo (alias_for_foo)\nBar\\FooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_foo_baz [label="foo.baz\nBazClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_bar [label="bar\nBar\\FooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_foo_bar [label="foo_bar\nBar\\FooClass\n", shape=record, fillcolor="#eeeeee", style="dotted"]; + node_method_call1 [label="method_call1\nBar\\FooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_foo_with_inline [label="foo_with_inline\nFoo\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_inlined [label="inlined\nBar\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_baz [label="baz\nBaz\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_request [label="request\nRequest\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_configurator_service [label="configurator_service\nConfClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_configured_service [label="configured_service\nstdClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_configurator_service_simple [label="configurator_service_simple\nConfClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_configured_service_simple [label="configured_service_simple\nstdClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_decorated [label="decorated\nstdClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_decorator_service [label="decorator_service\nstdClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_decorator_service_with_name [label="decorator_service_with_name\nstdClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_deprecated_service [label="deprecated_service\nstdClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_new_factory [label="new_factory\nFactoryClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_factory_service [label="factory_service\nBar\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_new_factory_service [label="new_factory_service\nFooBarBaz\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_service_from_static_method [label="service_from_static_method\nBar\\FooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_factory_simple [label="factory_simple\nSimpleFactoryClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_factory_service_simple [label="factory_service_simple\nBar\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerBuilder\n", shape=record, fillcolor="#9999ff", style="filled"]; + node_foo2 [label="foo2\n\n", shape=record, fillcolor="#ff9999", style="filled"]; + node_foo3 [label="foo3\n\n", shape=record, fillcolor="#ff9999", style="filled"]; + node_foobaz [label="foobaz\n\n", shape=record, fillcolor="#ff9999", style="filled"]; + node_foo -> node_foo_baz [label="" style="filled"]; + node_foo -> node_service_container [label="" style="filled"]; + node_foo -> node_foo_baz [label="" style="dashed"]; + node_foo -> node_bar [label="setBar()" style="dashed"]; + node_bar -> node_foo_baz [label="" style="filled"]; + node_method_call1 -> node_foo [label="setBar()" style="dashed"]; + node_method_call1 -> node_foo2 [label="setBar()" style="dashed"]; + node_method_call1 -> node_foo3 [label="setBar()" style="dashed"]; + node_method_call1 -> node_foobaz [label="setBar()" style="dashed"]; + node_foo_with_inline -> node_inlined [label="setBar()" style="dashed"]; + node_inlined -> node_baz [label="setBaz()" style="dashed"]; + node_baz -> node_foo_with_inline [label="setFoo()" style="dashed"]; + node_configurator_service -> node_baz [label="setFoo()" style="dashed"]; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/FooVariadic.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/FooVariadic.php new file mode 100644 index 0000000000000000000000000000000000000000..12861c56117355ebd1886ddbe43574adf14eb9f2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/FooVariadic.php @@ -0,0 +1,16 @@ +setDefinition('project.service.bar', new Definition('FooClass')); + $configuration->setParameter('project.parameter.bar', isset($config['foo']) ? $config['foo'] : 'foobar'); + + $configuration->setDefinition('project.service.foo', new Definition('FooClass')); + $configuration->setParameter('project.parameter.foo', isset($config['foo']) ? $config['foo'] : 'foobar'); + + return $configuration; + } + + public function getXsdValidationBasePath() + { + return false; + } + + public function getNamespace() + { + return 'http://www.example.com/schema/project'; + } + + public function getAlias() + { + return 'project'; + } + + public function getConfiguration(array $config, ContainerBuilder $container) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectWithXsdExtension.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectWithXsdExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..2ee2f12dc8f588a80bf14e96d0f4ddd634e4b17f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectWithXsdExtension.php @@ -0,0 +1,19 @@ +configure(); +} + +class BarClass +{ + protected $baz; + public $foo = 'foo'; + + public function setBaz(BazClass $baz) + { + $this->baz = $baz; + } + + public function getBaz() + { + return $this->baz; + } +} + +class BazClass +{ + protected $foo; + + public function setFoo(Foo $foo) + { + $this->foo = $foo; + } + + public function configure($instance) + { + $instance->configure(); + } + + public static function getInstance() + { + return new self(); + } + + public static function configureStatic($instance) + { + $instance->configure(); + } + + public static function configureStatic1() + { + } +} + +class BarUserClass +{ + public $bar; + + public function __construct(BarClass $bar) + { + $this->bar = $bar; + } +} + +class MethodCallClass +{ + public $simple; + public $complex; + private $callPassed = false; + + public function callMe() + { + $this->callPassed = is_scalar($this->simple) && is_object($this->complex); + } + + public function callPassed() + { + return $this->callPassed; + } +} + +class DummyProxyDumper implements ProxyDumper +{ + public function isProxyCandidate(Definition $definition) + { + return false; + } + + public function getProxyFactoryCode(Definition $definition, $id) + { + return ''; + } + + public function getProxyCode(Definition $definition) + { + return ''; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/createphar.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/createphar.php new file mode 100644 index 0000000000000000000000000000000000000000..c675478fd639c7052a1d70b49d38ce766c5efb16 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/createphar.php @@ -0,0 +1,47 @@ +addFromString('ProjectWithXsdExtensionInPhar.php', <<<'EOT' +addFromString('schema/project-1.0.xsd', <<<'EOT' + + + + + + + + + + +EOT +); +$phar->setStub(''); diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php new file mode 100644 index 0000000000000000000000000000000000000000..bcb4e20a94afdcb339d266e61316a503909eb4c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php @@ -0,0 +1,43 @@ +arguments = $arguments; + } + + public static function getInstance($arguments = array()) + { + $obj = new self($arguments); + $obj->called = true; + + return $obj; + } + + public function initialize() + { + $this->initialized = true; + } + + public function configure() + { + $this->configured = true; + } + + public function setBar($value = null) + { + $this->bar = $value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/schema/project-1.0.xsd b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/schema/project-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..282884e4e262cb0efa4a21a7cd4fd59f5e6ad640 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/schema/project-1.0.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/almostvalid.ini b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/almostvalid.ini new file mode 100644 index 0000000000000000000000000000000000000000..9fdef85580a6bb75f0c1b3af07a136e00d327e3d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/almostvalid.ini @@ -0,0 +1,2 @@ +foo = ' +bar = bar diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/nonvalid.ini b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/nonvalid.ini new file mode 100644 index 0000000000000000000000000000000000000000..9f84a6087358f4360e2dd33d1a8798f794643cdf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/nonvalid.ini @@ -0,0 +1,2 @@ +{NOT AN INI FILE} +{JUST A PLAIN TEXT FILE} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/parameters.ini b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/parameters.ini new file mode 100644 index 0000000000000000000000000000000000000000..df92f7527f871f70019625fc73cf593a2dd3c8a0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/parameters.ini @@ -0,0 +1,3 @@ +[parameters] + foo = bar + bar = %foo% diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/parameters1.ini b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/parameters1.ini new file mode 100644 index 0000000000000000000000000000000000000000..e50f7222be700e88ca9dcb2736a69263b22026d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/parameters1.ini @@ -0,0 +1,3 @@ +[parameters] + FOO = foo + baz = baz diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/parameters2.ini b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/parameters2.ini new file mode 100644 index 0000000000000000000000000000000000000000..75fbac6280df13540db9f5b12a6887bf0ab2c9f4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/parameters2.ini @@ -0,0 +1,2 @@ +[parameters] + imported_from_ini = true diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/types.ini b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/types.ini new file mode 100644 index 0000000000000000000000000000000000000000..19cc5b3b31e425e01dfe027caa91e27c6ebe4091 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/types.ini @@ -0,0 +1,27 @@ +[parameters] + true = true + true_comment = true ; comment + false = false + null = null + on = on + off = off + yes = yes + no = no + none = none + constant = PHP_VERSION + 12 = 12 + 12_string = '12' + 12_comment = 12 ; comment + 12_string_comment = '12' ; comment + 12_string_comment_again = "12" ; comment + -12 = -12 + 0 = 0 + 1 = 1 + 0b0110 = 0b0110 + 11112222333344445555 = 1111,2222,3333,4444,5555 + 0777 = 0777 + 255 = 0xFF + 100.0 = 1e2 + -120.0 = -1.2E2 + -10100.1 = -10100.1 + -10,100.1 = -10,100.1 diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php new file mode 100644 index 0000000000000000000000000000000000000000..0415d702a7cd7d13da4d29db086bb2345a6e9617 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php @@ -0,0 +1,29 @@ +parameters = $this->getDefaultParameters(); + + $this->services = array(); + $this->methodMap = array( + 'test' => 'getTestService', + ); + + $this->aliases = array(); + } + + /** + * {@inheritdoc} + */ + public function compile() + { + throw new LogicException('You cannot compile a dumped frozen container.'); + } + + /** + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + + /** + * Gets the 'test' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getTestService() + { + return $this->services['test'] = new \stdClass(array('only dot' => '.', 'concatenation as value' => '.\'\'.', 'concatenation from the start value' => '\'\'.', '.' => 'dot as a key', '.\'\'.' => 'concatenation as a key', '\'\'.' => 'concatenation from the start key', 'optimize concatenation' => 'string1-string2', 'optimize concatenation with empty string' => 'string1string2', 'optimize concatenation from the start' => 'start', 'optimize concatenation at the end' => 'end')); + } + + /** + * {@inheritdoc} + */ + public function getParameter($name) + { + $name = strtolower($name); + + if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters) || isset($this->loadedDynamicParameters[$name]))) { + throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); + } + if (isset($this->loadedDynamicParameters[$name])) { + return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } + + return $this->parameters[$name]; + } + + /** + * {@inheritdoc} + */ + public function hasParameter($name) + { + $name = strtolower($name); + + return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters) || isset($this->loadedDynamicParameters[$name]); + } + + /** + * {@inheritdoc} + */ + public function setParameter($name, $value) + { + throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); + } + + /** + * {@inheritdoc} + */ + public function getParameterBag() + { + if (null === $this->parameterBag) { + $parameters = $this->parameters; + foreach ($this->loadedDynamicParameters as $name => $loaded) { + $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } + $this->parameterBag = new FrozenParameterBag($parameters); + } + + return $this->parameterBag; + } + + private $loadedDynamicParameters = array(); + private $dynamicParameters = array(); + + /** + * Computes a dynamic parameter. + * + * @param string The name of the dynamic parameter to load + * + * @return mixed The value of the dynamic parameter + * + * @throws InvalidArgumentException When the dynamic parameter does not exist + */ + private function getDynamicParameter($name) + { + throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); + } + + /** + * Gets the default parameters. + * + * @return array An array of the default parameters + */ + protected function getDefaultParameters() + { + return array( + 'empty_value' => '', + 'some_string' => '-', + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php new file mode 100644 index 0000000000000000000000000000000000000000..5c299f55d69c1895cd4cec95e0b25e78c31b9051 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php @@ -0,0 +1,159 @@ +targetDirs[$i] = $dir = dirname($dir); + } + $this->parameters = $this->getDefaultParameters(); + + $this->services = array(); + $this->methodMap = array( + 'test' => 'getTestService', + ); + + $this->aliases = array(); + } + + /** + * {@inheritdoc} + */ + public function compile() + { + throw new LogicException('You cannot compile a dumped frozen container.'); + } + + /** + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + + /** + * Gets the 'test' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getTestService() + { + return $this->services['test'] = new \stdClass(('wiz'.$this->targetDirs[1]), array(('wiz'.$this->targetDirs[1]) => ($this->targetDirs[2].'/'))); + } + + /** + * {@inheritdoc} + */ + public function getParameter($name) + { + $name = strtolower($name); + + if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters) || isset($this->loadedDynamicParameters[$name]))) { + throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); + } + if (isset($this->loadedDynamicParameters[$name])) { + return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } + + return $this->parameters[$name]; + } + + /** + * {@inheritdoc} + */ + public function hasParameter($name) + { + $name = strtolower($name); + + return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters) || isset($this->loadedDynamicParameters[$name]); + } + + /** + * {@inheritdoc} + */ + public function setParameter($name, $value) + { + throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); + } + + /** + * {@inheritdoc} + */ + public function getParameterBag() + { + if (null === $this->parameterBag) { + $parameters = $this->parameters; + foreach ($this->loadedDynamicParameters as $name => $loaded) { + $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } + $this->parameterBag = new FrozenParameterBag($parameters); + } + + return $this->parameterBag; + } + + private $loadedDynamicParameters = array( + 'foo' => false, + 'buz' => false, + ); + private $dynamicParameters = array(); + + /** + * Computes a dynamic parameter. + * + * @param string The name of the dynamic parameter to load + * + * @return mixed The value of the dynamic parameter + * + * @throws InvalidArgumentException When the dynamic parameter does not exist + */ + private function getDynamicParameter($name) + { + switch ($name) { + case 'foo': $value = ('wiz'.$this->targetDirs[1]); break; + case 'buz': $value = $this->targetDirs[2]; break; + default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); + } + $this->loadedDynamicParameters[$name] = true; + + return $this->dynamicParameters[$name] = $value; + } + + /** + * Gets the default parameters. + * + * @return array An array of the default parameters + */ + protected function getDefaultParameters() + { + return array( + 'bar' => __DIR__, + 'baz' => (__DIR__.'/PhpDumperTest.php'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php new file mode 100644 index 0000000000000000000000000000000000000000..58052966744eeac4e0dabe77fead21ae0b69d704 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php @@ -0,0 +1,65 @@ +services = array(); + $this->methodMap = array( + 'bar' => 'getBarService', + ); + + $this->aliases = array(); + } + + /** + * {@inheritdoc} + */ + public function compile() + { + throw new LogicException('You cannot compile a dumped frozen container.'); + } + + /** + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + + /** + * Gets the 'bar' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getBarService() + { + $a = new \stdClass(); + $a->add($this); + + return $this->services['bar'] = new \stdClass($a); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php new file mode 100644 index 0000000000000000000000000000000000000000..e89c3c8f8e22b1d956c94e245c10a67645a51007 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php @@ -0,0 +1,62 @@ +methodMap = array( + 'service_from_anonymous_factory' => 'getServiceFromAnonymousFactoryService', + 'service_with_method_call_and_factory' => 'getServiceWithMethodCallAndFactoryService', + ); + } + + /** + * Gets the 'service_from_anonymous_factory' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar\FooClass A Bar\FooClass instance + */ + protected function getServiceFromAnonymousFactoryService() + { + return $this->services['service_from_anonymous_factory'] = (new \Bar\FooClass())->getInstance(); + } + + /** + * Gets the 'service_with_method_call_and_factory' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar\FooClass A Bar\FooClass instance + */ + protected function getServiceWithMethodCallAndFactoryService() + { + $this->services['service_with_method_call_and_factory'] = $instance = new \Bar\FooClass(); + + $instance->setBar(\Bar\FooClass::getInstance()); + + return $instance; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php new file mode 100644 index 0000000000000000000000000000000000000000..a9724152f8ef1a3cd47739327a50ee71e5162d7a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php @@ -0,0 +1,43 @@ +methodMap = array( + 'foo' => 'getFooService', + ); + } + + /** + * Gets the 'foo' service. + * + * This service is autowired. + * + * @return \Foo A Foo instance + */ + protected function getFooService() + { + return $this->services['foo'] = new \Foo(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php new file mode 100644 index 0000000000000000000000000000000000000000..d834ae2865dae78063f13e41d456529a78e2e126 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php @@ -0,0 +1,154 @@ +parameters = $this->getDefaultParameters(); + + $this->services = array(); + $this->methodMap = array( + 'test' => 'getTestService', + ); + + $this->aliases = array(); + } + + /** + * {@inheritdoc} + */ + public function compile() + { + throw new LogicException('You cannot compile a dumped frozen container.'); + } + + /** + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + + /** + * Gets the 'test' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return object A %env(FOO)% instance + */ + protected function getTestService() + { + $class = $this->getEnv('FOO'); + + return $this->services['test'] = new $class($this->getEnv('Bar'), 'foo'.$this->getEnv('FOO').'baz'); + } + + /** + * {@inheritdoc} + */ + public function getParameter($name) + { + $name = strtolower($name); + + if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters) || isset($this->loadedDynamicParameters[$name]))) { + throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); + } + if (isset($this->loadedDynamicParameters[$name])) { + return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } + + return $this->parameters[$name]; + } + + /** + * {@inheritdoc} + */ + public function hasParameter($name) + { + $name = strtolower($name); + + return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters) || isset($this->loadedDynamicParameters[$name]); + } + + /** + * {@inheritdoc} + */ + public function setParameter($name, $value) + { + throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); + } + + /** + * {@inheritdoc} + */ + public function getParameterBag() + { + if (null === $this->parameterBag) { + $parameters = $this->parameters; + foreach ($this->loadedDynamicParameters as $name => $loaded) { + $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } + $this->parameterBag = new FrozenParameterBag($parameters); + } + + return $this->parameterBag; + } + + private $loadedDynamicParameters = array( + 'bar' => false, + ); + private $dynamicParameters = array(); + + /** + * Computes a dynamic parameter. + * + * @param string The name of the dynamic parameter to load + * + * @return mixed The value of the dynamic parameter + * + * @throws InvalidArgumentException When the dynamic parameter does not exist + */ + private function getDynamicParameter($name) + { + switch ($name) { + case 'bar': $value = $this->getEnv('FOO'); break; + default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); + } + $this->loadedDynamicParameters[$name] = true; + + return $this->dynamicParameters[$name] = $value; + } + + /** + * Gets the default parameters. + * + * @return array An array of the default parameters + */ + protected function getDefaultParameters() + { + return array( + 'env(foo)' => 'foo', + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php new file mode 100644 index 0000000000000000000000000000000000000000..252a35d03b6cd61c8533f1cd01c520ac65e07899 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php @@ -0,0 +1,53 @@ +getDefaultParameters())); + } + + /** + * Gets the default parameters. + * + * @return array An array of the default parameters + */ + protected function getDefaultParameters() + { + return array( + 'foo' => '%baz%', + 'baz' => 'bar', + 'bar' => 'foo is %%foo bar', + 'escape' => '@escapeme', + 'values' => array( + 0 => true, + 1 => false, + 2 => NULL, + 3 => 0, + 4 => 1000.3, + 5 => 'true', + 6 => 'false', + 7 => 'null', + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php new file mode 100644 index 0000000000000000000000000000000000000000..306375d1b5541ecad4abe754720902ecf56499cc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php @@ -0,0 +1,468 @@ +getDefaultParameters())); + $this->methodMap = array( + 'bar' => 'getBarService', + 'baz' => 'getBazService', + 'configurator_service' => 'getConfiguratorServiceService', + 'configurator_service_simple' => 'getConfiguratorServiceSimpleService', + 'configured_service' => 'getConfiguredServiceService', + 'configured_service_simple' => 'getConfiguredServiceSimpleService', + 'decorated' => 'getDecoratedService', + 'decorator_service' => 'getDecoratorServiceService', + 'decorator_service_with_name' => 'getDecoratorServiceWithNameService', + 'deprecated_service' => 'getDeprecatedServiceService', + 'factory_service' => 'getFactoryServiceService', + 'factory_service_simple' => 'getFactoryServiceSimpleService', + 'factory_simple' => 'getFactorySimpleService', + 'foo' => 'getFooService', + 'foo.baz' => 'getFoo_BazService', + 'foo_bar' => 'getFooBarService', + 'foo_with_inline' => 'getFooWithInlineService', + 'inlined' => 'getInlinedService', + 'method_call1' => 'getMethodCall1Service', + 'new_factory' => 'getNewFactoryService', + 'new_factory_service' => 'getNewFactoryServiceService', + 'request' => 'getRequestService', + 'service_from_static_method' => 'getServiceFromStaticMethodService', + ); + $this->privates = array( + 'configurator_service' => true, + 'configurator_service_simple' => true, + 'factory_simple' => true, + 'inlined' => true, + 'new_factory' => true, + ); + $this->aliases = array( + 'alias_for_alias' => 'foo', + 'alias_for_foo' => 'foo', + ); + } + + /** + * Gets the 'bar' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar\FooClass A Bar\FooClass instance + */ + protected function getBarService() + { + $a = $this->get('foo.baz'); + + $this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar')); + + $a->configure($instance); + + return $instance; + } + + /** + * Gets the 'baz' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Baz A Baz instance + */ + protected function getBazService() + { + $this->services['baz'] = $instance = new \Baz(); + + $instance->setFoo($this->get('foo_with_inline')); + + return $instance; + } + + /** + * Gets the 'configured_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getConfiguredServiceService() + { + $this->services['configured_service'] = $instance = new \stdClass(); + + ${($_ = isset($this->services['configurator_service']) ? $this->services['configurator_service'] : $this->getConfiguratorServiceService()) && false ?: '_'}->configureStdClass($instance); + + return $instance; + } + + /** + * Gets the 'configured_service_simple' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getConfiguredServiceSimpleService() + { + $this->services['configured_service_simple'] = $instance = new \stdClass(); + + ${($_ = isset($this->services['configurator_service_simple']) ? $this->services['configurator_service_simple'] : $this->getConfiguratorServiceSimpleService()) && false ?: '_'}->configureStdClass($instance); + + return $instance; + } + + /** + * Gets the 'decorated' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getDecoratedService() + { + return $this->services['decorated'] = new \stdClass(); + } + + /** + * Gets the 'decorator_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getDecoratorServiceService() + { + return $this->services['decorator_service'] = new \stdClass(); + } + + /** + * Gets the 'decorator_service_with_name' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getDecoratorServiceWithNameService() + { + return $this->services['decorator_service_with_name'] = new \stdClass(); + } + + /** + * Gets the 'deprecated_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + * + * @deprecated The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed. + */ + protected function getDeprecatedServiceService() + { + @trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED); + + return $this->services['deprecated_service'] = new \stdClass(); + } + + /** + * Gets the 'factory_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar A Bar instance + */ + protected function getFactoryServiceService() + { + return $this->services['factory_service'] = $this->get('foo.baz')->getInstance(); + } + + /** + * Gets the 'factory_service_simple' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar A Bar instance + */ + protected function getFactoryServiceSimpleService() + { + return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->getFactorySimpleService()) && false ?: '_'}->getInstance(); + } + + /** + * Gets the 'foo' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar\FooClass A Bar\FooClass instance + */ + protected function getFooService() + { + $a = $this->get('foo.baz'); + + $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo')), true, $this); + + $instance->foo = 'bar'; + $instance->moo = $a; + $instance->qux = array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo')); + $instance->setBar($this->get('bar')); + $instance->initialize(); + sc_configure($instance); + + return $instance; + } + + /** + * Gets the 'foo.baz' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return object A %baz_class% instance + */ + protected function getFoo_BazService() + { + $this->services['foo.baz'] = $instance = call_user_func(array($this->getParameter('baz_class'), 'getInstance')); + + call_user_func(array($this->getParameter('baz_class'), 'configureStatic1'), $instance); + + return $instance; + } + + /** + * Gets the 'foo_bar' service. + * + * @return object A %foo_class% instance + */ + protected function getFooBarService() + { + $class = $this->getParameter('foo_class'); + + return new $class(); + } + + /** + * Gets the 'foo_with_inline' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Foo A Foo instance + */ + protected function getFooWithInlineService() + { + $this->services['foo_with_inline'] = $instance = new \Foo(); + + $instance->setBar(${($_ = isset($this->services['inlined']) ? $this->services['inlined'] : $this->getInlinedService()) && false ?: '_'}); + + return $instance; + } + + /** + * Gets the 'method_call1' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar\FooClass A Bar\FooClass instance + */ + protected function getMethodCall1Service() + { + require_once '%path%foo.php'; + + $this->services['method_call1'] = $instance = new \Bar\FooClass(); + + $instance->setBar($this->get('foo')); + $instance->setBar($this->get('foo2', ContainerInterface::NULL_ON_INVALID_REFERENCE)); + if ($this->has('foo3')) { + $instance->setBar($this->get('foo3', ContainerInterface::NULL_ON_INVALID_REFERENCE)); + } + if ($this->has('foobaz')) { + $instance->setBar($this->get('foobaz', ContainerInterface::NULL_ON_INVALID_REFERENCE)); + } + $instance->setBar(($this->get("foo")->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default")))); + + return $instance; + } + + /** + * Gets the 'new_factory_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \FooBarBaz A FooBarBaz instance + */ + protected function getNewFactoryServiceService() + { + $this->services['new_factory_service'] = $instance = ${($_ = isset($this->services['new_factory']) ? $this->services['new_factory'] : $this->getNewFactoryService()) && false ?: '_'}->getInstance(); + + $instance->foo = 'bar'; + + return $instance; + } + + /** + * Gets the 'request' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @throws RuntimeException always since this service is expected to be injected dynamically + */ + protected function getRequestService() + { + throw new RuntimeException('You have requested a synthetic service ("request"). The DIC does not know how to construct this service.'); + } + + /** + * Gets the 'service_from_static_method' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar\FooClass A Bar\FooClass instance + */ + protected function getServiceFromStaticMethodService() + { + return $this->services['service_from_static_method'] = \Bar\FooClass::getInstance(); + } + + /** + * Gets the 'configurator_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * This service is private. + * If you want to be able to request this service from the container directly, + * make it public, otherwise you might end up with broken code. + * + * @return \ConfClass A ConfClass instance + */ + protected function getConfiguratorServiceService() + { + $this->services['configurator_service'] = $instance = new \ConfClass(); + + $instance->setFoo($this->get('baz')); + + return $instance; + } + + /** + * Gets the 'configurator_service_simple' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * This service is private. + * If you want to be able to request this service from the container directly, + * make it public, otherwise you might end up with broken code. + * + * @return \ConfClass A ConfClass instance + */ + protected function getConfiguratorServiceSimpleService() + { + return $this->services['configurator_service_simple'] = new \ConfClass('bar'); + } + + /** + * Gets the 'factory_simple' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * This service is private. + * If you want to be able to request this service from the container directly, + * make it public, otherwise you might end up with broken code. + * + * @return \SimpleFactoryClass A SimpleFactoryClass instance + */ + protected function getFactorySimpleService() + { + return $this->services['factory_simple'] = new \SimpleFactoryClass('foo'); + } + + /** + * Gets the 'inlined' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * This service is private. + * If you want to be able to request this service from the container directly, + * make it public, otherwise you might end up with broken code. + * + * @return \Bar A Bar instance + */ + protected function getInlinedService() + { + $this->services['inlined'] = $instance = new \Bar(); + + $instance->pub = 'pub'; + $instance->setBaz($this->get('baz')); + + return $instance; + } + + /** + * Gets the 'new_factory' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * This service is private. + * If you want to be able to request this service from the container directly, + * make it public, otherwise you might end up with broken code. + * + * @return \FactoryClass A FactoryClass instance + */ + protected function getNewFactoryService() + { + $this->services['new_factory'] = $instance = new \FactoryClass(); + + $instance->foo = 'bar'; + + return $instance; + } + + /** + * Gets the default parameters. + * + * @return array An array of the default parameters + */ + protected function getDefaultParameters() + { + return array( + 'baz_class' => 'BazClass', + 'foo_class' => 'Bar\\FooClass', + 'foo' => 'bar', + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php new file mode 100644 index 0000000000000000000000000000000000000000..f8b263c2a01f31688f3cfd5a18a62acec8da445c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php @@ -0,0 +1,434 @@ +parameters = $this->getDefaultParameters(); + + $this->services = array(); + $this->methodMap = array( + 'bar' => 'getBarService', + 'baz' => 'getBazService', + 'configured_service' => 'getConfiguredServiceService', + 'configured_service_simple' => 'getConfiguredServiceSimpleService', + 'decorator_service' => 'getDecoratorServiceService', + 'decorator_service_with_name' => 'getDecoratorServiceWithNameService', + 'deprecated_service' => 'getDeprecatedServiceService', + 'factory_service' => 'getFactoryServiceService', + 'factory_service_simple' => 'getFactoryServiceSimpleService', + 'foo' => 'getFooService', + 'foo.baz' => 'getFoo_BazService', + 'foo_bar' => 'getFooBarService', + 'foo_with_inline' => 'getFooWithInlineService', + 'method_call1' => 'getMethodCall1Service', + 'new_factory_service' => 'getNewFactoryServiceService', + 'request' => 'getRequestService', + 'service_from_static_method' => 'getServiceFromStaticMethodService', + ); + $this->aliases = array( + 'alias_for_alias' => 'foo', + 'alias_for_foo' => 'foo', + 'decorated' => 'decorator_service_with_name', + ); + } + + /** + * {@inheritdoc} + */ + public function compile() + { + throw new LogicException('You cannot compile a dumped frozen container.'); + } + + /** + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + + /** + * Gets the 'bar' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar\FooClass A Bar\FooClass instance + */ + protected function getBarService() + { + $a = $this->get('foo.baz'); + + $this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar')); + + $a->configure($instance); + + return $instance; + } + + /** + * Gets the 'baz' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Baz A Baz instance + */ + protected function getBazService() + { + $this->services['baz'] = $instance = new \Baz(); + + $instance->setFoo($this->get('foo_with_inline')); + + return $instance; + } + + /** + * Gets the 'configured_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getConfiguredServiceService() + { + $a = new \ConfClass(); + $a->setFoo($this->get('baz')); + + $this->services['configured_service'] = $instance = new \stdClass(); + + $a->configureStdClass($instance); + + return $instance; + } + + /** + * Gets the 'configured_service_simple' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getConfiguredServiceSimpleService() + { + $this->services['configured_service_simple'] = $instance = new \stdClass(); + + (new \ConfClass('bar'))->configureStdClass($instance); + + return $instance; + } + + /** + * Gets the 'decorator_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getDecoratorServiceService() + { + return $this->services['decorator_service'] = new \stdClass(); + } + + /** + * Gets the 'decorator_service_with_name' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getDecoratorServiceWithNameService() + { + return $this->services['decorator_service_with_name'] = new \stdClass(); + } + + /** + * Gets the 'deprecated_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + * + * @deprecated The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed. + */ + protected function getDeprecatedServiceService() + { + @trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED); + + return $this->services['deprecated_service'] = new \stdClass(); + } + + /** + * Gets the 'factory_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar A Bar instance + */ + protected function getFactoryServiceService() + { + return $this->services['factory_service'] = $this->get('foo.baz')->getInstance(); + } + + /** + * Gets the 'factory_service_simple' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar A Bar instance + */ + protected function getFactoryServiceSimpleService() + { + return $this->services['factory_service_simple'] = (new \SimpleFactoryClass('foo'))->getInstance(); + } + + /** + * Gets the 'foo' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar\FooClass A Bar\FooClass instance + */ + protected function getFooService() + { + $a = $this->get('foo.baz'); + + $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array('bar' => 'foo is bar', 'foobar' => 'bar'), true, $this); + + $instance->foo = 'bar'; + $instance->moo = $a; + $instance->qux = array('bar' => 'foo is bar', 'foobar' => 'bar'); + $instance->setBar($this->get('bar')); + $instance->initialize(); + sc_configure($instance); + + return $instance; + } + + /** + * Gets the 'foo.baz' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \BazClass A BazClass instance + */ + protected function getFoo_BazService() + { + $this->services['foo.baz'] = $instance = \BazClass::getInstance(); + + \BazClass::configureStatic1($instance); + + return $instance; + } + + /** + * Gets the 'foo_bar' service. + * + * @return \Bar\FooClass A Bar\FooClass instance + */ + protected function getFooBarService() + { + return new \Bar\FooClass(); + } + + /** + * Gets the 'foo_with_inline' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Foo A Foo instance + */ + protected function getFooWithInlineService() + { + $a = new \Bar(); + + $this->services['foo_with_inline'] = $instance = new \Foo(); + + $a->pub = 'pub'; + $a->setBaz($this->get('baz')); + + $instance->setBar($a); + + return $instance; + } + + /** + * Gets the 'method_call1' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar\FooClass A Bar\FooClass instance + */ + protected function getMethodCall1Service() + { + require_once '%path%foo.php'; + + $this->services['method_call1'] = $instance = new \Bar\FooClass(); + + $instance->setBar($this->get('foo')); + $instance->setBar(NULL); + $instance->setBar(($this->get("foo")->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default")))); + + return $instance; + } + + /** + * Gets the 'new_factory_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \FooBarBaz A FooBarBaz instance + */ + protected function getNewFactoryServiceService() + { + $a = new \FactoryClass(); + $a->foo = 'bar'; + + $this->services['new_factory_service'] = $instance = $a->getInstance(); + + $instance->foo = 'bar'; + + return $instance; + } + + /** + * Gets the 'request' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @throws RuntimeException always since this service is expected to be injected dynamically + */ + protected function getRequestService() + { + throw new RuntimeException('You have requested a synthetic service ("request"). The DIC does not know how to construct this service.'); + } + + /** + * Gets the 'service_from_static_method' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \Bar\FooClass A Bar\FooClass instance + */ + protected function getServiceFromStaticMethodService() + { + return $this->services['service_from_static_method'] = \Bar\FooClass::getInstance(); + } + + /** + * {@inheritdoc} + */ + public function getParameter($name) + { + $name = strtolower($name); + + if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters) || isset($this->loadedDynamicParameters[$name]))) { + throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); + } + if (isset($this->loadedDynamicParameters[$name])) { + return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } + + return $this->parameters[$name]; + } + + /** + * {@inheritdoc} + */ + public function hasParameter($name) + { + $name = strtolower($name); + + return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters) || isset($this->loadedDynamicParameters[$name]); + } + + /** + * {@inheritdoc} + */ + public function setParameter($name, $value) + { + throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); + } + + /** + * {@inheritdoc} + */ + public function getParameterBag() + { + if (null === $this->parameterBag) { + $parameters = $this->parameters; + foreach ($this->loadedDynamicParameters as $name => $loaded) { + $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); + } + $this->parameterBag = new FrozenParameterBag($parameters); + } + + return $this->parameterBag; + } + + private $loadedDynamicParameters = array(); + private $dynamicParameters = array(); + + /** + * Computes a dynamic parameter. + * + * @param string The name of the dynamic parameter to load + * + * @return mixed The value of the dynamic parameter + * + * @throws InvalidArgumentException When the dynamic parameter does not exist + */ + private function getDynamicParameter($name) + { + throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); + } + + /** + * Gets the default parameters. + * + * @return array An array of the default parameters + */ + protected function getDefaultParameters() + { + return array( + 'baz_class' => 'BazClass', + 'foo_class' => 'Bar\\FooClass', + 'foo' => 'bar', + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php new file mode 100644 index 0000000000000000000000000000000000000000..f14141b8d1b2ccfc1885ebeadc08ec134963e02a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php @@ -0,0 +1,97 @@ +services = array(); + $this->methodMap = array( + 'bar_service' => 'getBarServiceService', + 'baz_service' => 'getBazServiceService', + 'foo_service' => 'getFooServiceService', + ); + $this->privates = array( + 'baz_service' => true, + ); + + $this->aliases = array(); + } + + /** + * {@inheritdoc} + */ + public function compile() + { + throw new LogicException('You cannot compile a dumped frozen container.'); + } + + /** + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + + /** + * Gets the 'bar_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getBarServiceService() + { + return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->getBazServiceService()) && false ?: '_'}); + } + + /** + * Gets the 'foo_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return \stdClass A stdClass instance + */ + protected function getFooServiceService() + { + return $this->services['foo_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->getBazServiceService()) && false ?: '_'}); + } + + /** + * Gets the 'baz_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * This service is private. + * If you want to be able to request this service from the container directly, + * make it public, otherwise you might end up with broken code. + * + * @return \stdClass A stdClass instance + */ + protected function getBazServiceService() + { + return $this->services['baz_service'] = new \stdClass(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/simple.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/simple.php new file mode 100644 index 0000000000000000000000000000000000000000..aa4df998cefb787a1278e15a4294bc4aa9f5a72b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/simple.php @@ -0,0 +1,3 @@ +setParameter('foo', 'foo'); diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extension1/services.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extension1/services.xml new file mode 100644 index 0000000000000000000000000000000000000000..52df38d0c99c061453d7fbaa71c6071088a326cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extension1/services.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extension2/services.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extension2/services.xml new file mode 100644 index 0000000000000000000000000000000000000000..21a7ef58c0eaafdccf9ba9dba73f6e84b36d8ddd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extension2/services.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services1.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services1.xml new file mode 100644 index 0000000000000000000000000000000000000000..792fa07051748bbaf1a724e662a95aa23b782e18 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services1.xml @@ -0,0 +1,19 @@ + + + + + + BAR + + + + + + + + + %project.parameter.foo% + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services2.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services2.xml new file mode 100644 index 0000000000000000000000000000000000000000..67d462be98fbb43c96c94c2a8c08e8a04d355fb5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services2.xml @@ -0,0 +1,19 @@ + + + + + + BAR + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services3.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services3.xml new file mode 100644 index 0000000000000000000000000000000000000000..c23f02a08775069524ae66ce8378d1981cd2440f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services3.xml @@ -0,0 +1,19 @@ + + + + + + BAR + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services4.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services4.xml new file mode 100644 index 0000000000000000000000000000000000000000..2c33c3a7d1b2ddec05fa129e31707b65572bccb6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services4.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services5.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services5.xml new file mode 100644 index 0000000000000000000000000000000000000000..0eaaff2d2cddc604d9bbd5d373a6a9bdeddcefcb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services5.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services6.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services6.xml new file mode 100644 index 0000000000000000000000000000000000000000..a9c01030d1cae89db011b4317413d9a29259604b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services6.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services7.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services7.xml new file mode 100644 index 0000000000000000000000000000000000000000..e77780db6aabb8dac92ea42e867385d1c57ecdca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services7.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/legacy_invalid_alias_definition.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/legacy_invalid_alias_definition.xml new file mode 100644 index 0000000000000000000000000000000000000000..52386e5bf52dfeba14d5aff635d8543fce5c45f4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/legacy_invalid_alias_definition.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/namespaces.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/namespaces.xml new file mode 100644 index 0000000000000000000000000000000000000000..5a05cedd7e79e7e0f5b68e065286922cd5d6157a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/namespaces.xml @@ -0,0 +1,17 @@ + + + + + + + + + foo + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/nonvalid.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/nonvalid.xml new file mode 100644 index 0000000000000000000000000000000000000000..e7b5bc973c9e45ea953de6cd6fa281c97052799c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/nonvalid.xml @@ -0,0 +1,3 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services1.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services1.xml new file mode 100644 index 0000000000000000000000000000000000000000..6aa5732f9afc701148a00dd7883b87c1400cf12a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services1.xml @@ -0,0 +1,2 @@ + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services10.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services10.xml new file mode 100644 index 0000000000000000000000000000000000000000..a4da1bf74cf7852c64efd012d760ab1c3a17c1cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services10.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services13.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services13.xml new file mode 100644 index 0000000000000000000000000000000000000000..1ac4938841d6091b1a8e5d3f5038f75bec3f37ef --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services13.xml @@ -0,0 +1,9 @@ + + + + + true + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services14.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services14.xml new file mode 100644 index 0000000000000000000000000000000000000000..73446214e4920487e1e19259dea4b1d3303ff904 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services14.xml @@ -0,0 +1,19 @@ + + + + + app + + + + + + app + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services2.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services2.xml new file mode 100644 index 0000000000000000000000000000000000000000..f1ac14dd5d343fa3bc0329dfd6352013dd9cb48a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services2.xml @@ -0,0 +1,31 @@ + + + + + a string + bar + + 0 + 4 + null + true + true + false + on + off + 1.3 + 1000.3 + a string + + foo + bar + + + + value + + PHP_EOL + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services21.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services21.xml new file mode 100644 index 0000000000000000000000000000000000000000..329bc3d72a25abd2b45b777069136e19c3731db2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services21.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services22.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services22.xml new file mode 100644 index 0000000000000000000000000000000000000000..fa79d389489fb893243fdd47819d327e4a502632 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services22.xml @@ -0,0 +1,9 @@ + + + + + Bar + Baz + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services23.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services23.xml new file mode 100644 index 0000000000000000000000000000000000000000..3f9e15fd499da2eae150ca631364fb894130f07a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services23.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services24.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services24.xml new file mode 100644 index 0000000000000000000000000000000000000000..476588aa4df97cd865227f1674fdac6a323485d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services24.xml @@ -0,0 +1,9 @@ + + + + + A + B + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services3.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services3.xml new file mode 100644 index 0000000000000000000000000000000000000000..87bf183db32df8c8b5aa0aa28ed3d4779ef47100 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services3.xml @@ -0,0 +1,13 @@ + + + + + foo + + true + false + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services4.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services4.xml new file mode 100644 index 0000000000000000000000000000000000000000..03ad9f8081dd301dceb9366d64b4212e2bcc1d91 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services4_bad_import.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services4_bad_import.xml new file mode 100644 index 0000000000000000000000000000000000000000..0b7f10a309b86368ea6b8ccc052e8abd7c9f4c0c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services4_bad_import.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services5.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services5.xml new file mode 100644 index 0000000000000000000000000000000000000000..347df977dd26bb6ed2a7c7470ce9a46a53b4ee5b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services5.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml new file mode 100644 index 0000000000000000000000000000000000000000..70981ff5450b22c874bfa47d766bd66a2cd4b024 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml @@ -0,0 +1,62 @@ + + + + + + + + + %path%/foo.php + + + foo + + + true + false + + + + + + + + + + + + + + + service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default") + + + + + foo + + + true + false + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services7.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services7.xml new file mode 100644 index 0000000000000000000000000000000000000000..824d8b5d753969de96af6c55f6d0a153b3fc2c5b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services7.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services8.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services8.xml new file mode 100644 index 0000000000000000000000000000000000000000..b17e50043cd1bb1f9ea96025078ca3e72c648170 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services8.xml @@ -0,0 +1,22 @@ + + + + + %baz% + bar + foo is %%foo bar + @escapeme + + true + false + null + 0 + 1000.3 + true + false + null + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml new file mode 100644 index 0000000000000000000000000000000000000000..9ad09ad5918dde47c4ef93e6de7ebada6cc9fb5b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml @@ -0,0 +1,121 @@ + + + + BazClass + Bar\FooClass + bar + + + + + + foo + + + foo is %foo% + %foo% + + true + + bar + + + foo is %foo% + %foo% + + + + + + + + + + + + + + foo + + %foo_bar% + + + + + %path%foo.php + + + + + + + + + + + + + + service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default") + + + + + + + + + pub + + + + + + + + + + + + + + + + + + + + bar + + + + + + + + + The "%service_id%" service is deprecated. You should stop using it, as it will soon be removed. + + + bar + + + + + + bar + + + + + + + foo + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_deprecated.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_deprecated.xml new file mode 100644 index 0000000000000000000000000000000000000000..c19a47adf517f20ba0650f568c3af8fc22e90c98 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_deprecated.xml @@ -0,0 +1,11 @@ + + + + + + + + The "%service_id%" service is deprecated. + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/tag_with_empty_name.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/tag_with_empty_name.xml new file mode 100644 index 0000000000000000000000000000000000000000..164629246247595a75d80f4f12658bc0f8e12e33 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/tag_with_empty_name.xml @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/tag_without_name.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/tag_without_name.xml new file mode 100644 index 0000000000000000000000000000000000000000..bc7373df73cf0d5e34c1d6270679f8cc2bf843f9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/tag_without_name.xml @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/with_key_outside_collection.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/with_key_outside_collection.xml new file mode 100644 index 0000000000000000000000000000000000000000..5f3a2843612df51506b812f867a877d6ee4081e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/with_key_outside_collection.xml @@ -0,0 +1,9 @@ + + + + + foo + bar + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/withdoctype.xml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/withdoctype.xml new file mode 100644 index 0000000000000000000000000000000000000000..f217d5bcacf5402bcd76f4992ccfa8bb90bd177c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/withdoctype.xml @@ -0,0 +1,3 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_calls.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_calls.yml new file mode 100644 index 0000000000000000000000000000000000000000..3f34b07eb0eaaab967b85b17680d67cddd36fe39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_calls.yml @@ -0,0 +1,4 @@ +services: + method_call1: + class: FooClass + calls: foo diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_decorates.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_decorates.yml new file mode 100644 index 0000000000000000000000000000000000000000..79c048a847e2d6c744bd85a791d1c3a7a5e737e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_decorates.yml @@ -0,0 +1,7 @@ +services: + foo: + class: stdClass + bar: + class: stdClass + decorates: "@foo" + arguments: ["@bar.inner"] diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_format.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_format.yml new file mode 100644 index 0000000000000000000000000000000000000000..1f58cac6acdb071762218237bdac59c7659db7da --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_format.yml @@ -0,0 +1,2 @@ +parameters: + FOO: bar diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_import.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_import.yml new file mode 100644 index 0000000000000000000000000000000000000000..0765dc8dd0856794ea09a0daeb5838b8cae7f221 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_import.yml @@ -0,0 +1,2 @@ +imports: + - foo.yml diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_imports.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_imports.yml new file mode 100644 index 0000000000000000000000000000000000000000..1ce9d57c6c728db48bc3c4abaae55fb48909c215 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_imports.yml @@ -0,0 +1,2 @@ +imports: + foo:bar diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_parameters.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_parameters.yml new file mode 100644 index 0000000000000000000000000000000000000000..bbd13ac0b349aa3a03274e3dd15adee58548d4a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_parameters.yml @@ -0,0 +1,2 @@ +parameters: + foo:bar diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_service.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_service.yml new file mode 100644 index 0000000000000000000000000000000000000000..811af3c0efd799c90b04c116275ea7d59b725503 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_service.yml @@ -0,0 +1,2 @@ +services: + foo: bar diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_services.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_services.yml new file mode 100644 index 0000000000000000000000000000000000000000..cfbf17ce5f8c6c9eb387baafcc657ee4180533cc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_services.yml @@ -0,0 +1 @@ +services: foo diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_types1.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_types1.yml new file mode 100644 index 0000000000000000000000000000000000000000..891e01497cadf2640a5f0dafcac38ab2131a1c14 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_types1.yml @@ -0,0 +1,5 @@ +services: + foo_service: + class: FooClass + # types is not an array + autowiring_types: 1 diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_types2.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_types2.yml new file mode 100644 index 0000000000000000000000000000000000000000..fb1d53e15101455d040f3e8a643889a6995d6b8d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_types2.yml @@ -0,0 +1,5 @@ +services: + foo_service: + class: FooClass + # autowiring_types is not a string + autowiring_types: [ 1 ] diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag1.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag1.yml new file mode 100644 index 0000000000000000000000000000000000000000..14536fdb36bf3971a6d768dd462030e7e6261865 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag1.yml @@ -0,0 +1,5 @@ +services: + foo_service: + class: FooClass + # tags is not an array + tags: string diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag2.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag2.yml new file mode 100644 index 0000000000000000000000000000000000000000..90288144c82091428318b9fb946e4e25b34b5cdd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag2.yml @@ -0,0 +1,6 @@ +services: + foo_service: + class: FooClass + tags: + # tag is missing the name key + foo_tag: { foo: bar } diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag3.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag3.yml new file mode 100644 index 0000000000000000000000000000000000000000..72ec4e8f0bc6f72b5145bf775e512fe69812b88a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag3.yml @@ -0,0 +1,6 @@ +services: + foo_service: + class: FooClass + tags: + # tag-attribute is not a scalar + - { name: foo, bar: { foo: foo, bar: bar } } diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag4.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag4.yml new file mode 100644 index 0000000000000000000000000000000000000000..e8e99395b1fdf11ceeb47b99598f2b78a9ea4507 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag4.yml @@ -0,0 +1,6 @@ +services: + foo_service: + class: FooClass + tags: + # tag is not an array + - foo diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/legacy_invalid_alias_definition.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/legacy_invalid_alias_definition.yml new file mode 100644 index 0000000000000000000000000000000000000000..00c011c1ddd09b2081a2f019856c95f6f4a2fa4f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/legacy_invalid_alias_definition.yml @@ -0,0 +1,5 @@ +services: + foo: + alias: bar + factory: foo + parent: quz diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/legacy_invalid_definition.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/legacy_invalid_definition.yml new file mode 100644 index 0000000000000000000000000000000000000000..8487e854d4c3651c2492132d58f6ff9675e0501e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/legacy_invalid_definition.yml @@ -0,0 +1,10 @@ +services: + # This definition is valid and should not raise any deprecation notice + foo: + class: stdClass + arguments: [ 'foo', 'bar' ] + + # This definition is invalid and must raise a deprecation notice + bar: + class: stdClass + private: true # the "private" keyword is invalid diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/nonvalid1.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/nonvalid1.yml new file mode 100644 index 0000000000000000000000000000000000000000..4eddb872b850c3b7a512cbd94759035452398e1e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/nonvalid1.yml @@ -0,0 +1,2 @@ +foo: + bar diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/nonvalid2.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/nonvalid2.yml new file mode 100644 index 0000000000000000000000000000000000000000..c508d5366f70bba37fcc09d128b6537c4adb2c79 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/nonvalid2.yml @@ -0,0 +1 @@ +false diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services1.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services1.yml new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services1.yml @@ -0,0 +1 @@ + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services10.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services10.yml new file mode 100644 index 0000000000000000000000000000000000000000..c66084cdbe8e6bdfb4de6dc2b0a450ca89b735d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services10.yml @@ -0,0 +1,9 @@ +parameters: + project.parameter.foo: BAR + +services: + project.service.foo: + class: BAR + +project: + test: '%project.parameter.foo%' diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services11.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services11.yml new file mode 100644 index 0000000000000000000000000000000000000000..40126f005d608e3b32806335179d68f596815839 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services11.yml @@ -0,0 +1 @@ +foobarfoobar: {} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services13.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services13.yml new file mode 100644 index 0000000000000000000000000000000000000000..d52d355c2d0938908d01b1040a31a6b895c07439 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services13.yml @@ -0,0 +1,3 @@ +# used to test imports in XML +parameters: + imported_from_yaml: true diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services14.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services14.yml new file mode 100644 index 0000000000000000000000000000000000000000..4c188c5fbc7b0ad3a8c76f94e0b2102ca389f35b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services14.yml @@ -0,0 +1,3 @@ +services: + factory: { class: FooBarClass, factory: baz:getClass} + factory_with_static_call: { class: FooBarClass, factory: FooBacFactory::createFooBar} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services2.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services2.yml new file mode 100644 index 0000000000000000000000000000000000000000..91de818f292423ce49251bb4627539395ec3da3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services2.yml @@ -0,0 +1,13 @@ +parameters: + FOO: bar + values: + - true + - false + - 0 + - 1000.3 + - !php/const:PHP_INT_MAX + bar: foo + escape: '@@escapeme' + foo_bar: '@foo_bar' + MixedCase: + MixedCaseKey: value diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services21.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services21.yml new file mode 100644 index 0000000000000000000000000000000000000000..a2617c1688025aa8df1348d4d3ddb46407461a82 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services21.yml @@ -0,0 +1,15 @@ +services: + manager: + class: UserManager + arguments: + - true + calls: + - method: setLogger + arguments: + - '@logger' + - method: setClass + arguments: + - User + tags: + - name: manager + alias: user diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services22.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services22.yml new file mode 100644 index 0000000000000000000000000000000000000000..55d015baea0fbf22d67a4b2756157276548555a2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services22.yml @@ -0,0 +1,8 @@ +services: + foo_service: + class: FooClass + autowiring_types: [ Foo, Bar ] + + baz_service: + class: Baz + autowiring_types: Foo diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services23.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services23.yml new file mode 100644 index 0000000000000000000000000000000000000000..1984c17714633594950b56b2838fb764492a4eac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services23.yml @@ -0,0 +1,4 @@ +services: + bar_service: + class: BarClass + autowire: true diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services24.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services24.yml new file mode 100644 index 0000000000000000000000000000000000000000..1894077e4b42f5469f6a96b02f7b5b5528008bbc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services24.yml @@ -0,0 +1,8 @@ + +services: + foo: + class: Foo + autowire: true + autowiring_types: + - A + - B diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services26.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services26.yml new file mode 100644 index 0000000000000000000000000000000000000000..2ef23c1af545f96a45fadf077ff23b1b88c5891f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services26.yml @@ -0,0 +1,10 @@ +parameters: + env(FOO): foo + bar: '%env(FOO)%' + +services: + test: + class: '%env(FOO)%' + arguments: + - '%env(Bar)%' + - 'foo%bar%baz' diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services3.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services3.yml new file mode 100644 index 0000000000000000000000000000000000000000..0e92cdf5007fe717e24ced9bb0ce7896de7092f4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services3.yml @@ -0,0 +1,5 @@ +parameters: + foo: foo + values: + - true + - false diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services4.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services4.yml new file mode 100644 index 0000000000000000000000000000000000000000..8e0987fd03a6c90baf7632e36ceeb0b9c4c449c4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services4.yml @@ -0,0 +1,7 @@ +imports: + - { resource: services2.yml } + - { resource: services3.yml } + - { resource: "../php/simple.php" } + - { resource: "../ini/parameters.ini", class: Symfony\Component\DependencyInjection\Loader\IniFileLoader } + - { resource: "../ini/parameters2.ini" } + - { resource: "../xml/services13.xml" } diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services4_bad_import.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services4_bad_import.yml new file mode 100644 index 0000000000000000000000000000000000000000..f7089fc4d42f13d63bdc54b7b2312ba9bf90f92e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services4_bad_import.yml @@ -0,0 +1,2 @@ +imports: + - { resource: foo_fake.yml, ignore_errors: true } diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml new file mode 100644 index 0000000000000000000000000000000000000000..20ed7e315a9962bb0f0b782eaaa9ba9dd84f23d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml @@ -0,0 +1,41 @@ +services: + foo: { class: FooClass } + baz: { class: BazClass } + not_shared: { class: FooClass, shared: false } + file: { class: FooClass, file: '%path%/foo.php' } + arguments: { class: FooClass, arguments: [foo, '@foo', [true, false]] } + configurator1: { class: FooClass, configurator: sc_configure } + configurator2: { class: FooClass, configurator: ['@baz', configure] } + configurator3: { class: FooClass, configurator: [BazClass, configureStatic] } + method_call1: + class: FooClass + calls: + - [ setBar, [] ] + - [ setBar ] + - [ setBar, ['@=service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")'] ] + method_call2: + class: FooClass + calls: + - [ setBar, [ foo, '@foo', [true, false] ] ] + alias_for_foo: '@foo' + another_alias_for_foo: + alias: foo + public: false + request: + class: Request + synthetic: true + lazy: true + another_third_alias_for_foo: + alias: foo + decorator_service: + decorates: decorated + decorator_service_with_name: + decorates: decorated + decoration_inner_name: decorated.pif-pouf + decorator_service_with_name_and_priority: + decorates: decorated + decoration_inner_name: decorated.pif-pouf + decoration_priority: 5 + new_factory1: { class: FooBarClass, factory: factory} + new_factory2: { class: FooBarClass, factory: ['@baz', getClass]} + new_factory3: { class: FooBarClass, factory: [BazClass, getInstance]} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services7.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services7.yml new file mode 100644 index 0000000000000000000000000000000000000000..09064f2005f700068405ff36a4a179ac89846c17 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services7.yml @@ -0,0 +1,2 @@ +services: + foo: { class: BarClass } diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services8.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services8.yml new file mode 100644 index 0000000000000000000000000000000000000000..a1fb59035855eeb41c4dffbba23bc9a4b361a334 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services8.yml @@ -0,0 +1,7 @@ +parameters: + foo: '%baz%' + baz: bar + bar: 'foo is %%foo bar' + escape: '@@escapeme' + values: [true, false, null, 0, 1000.3, 'true', 'false', 'null'] + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml new file mode 100644 index 0000000000000000000000000000000000000000..44a174b6edb5b101cbfdc434dfce43a0d544b0d4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml @@ -0,0 +1,111 @@ +parameters: + baz_class: BazClass + foo_class: Bar\FooClass + foo: bar + +services: + foo: + class: Bar\FooClass + tags: + - { name: foo, foo: foo } + - { name: foo, bar: bar, baz: baz } + arguments: [foo, '@foo.baz', { '%foo%': 'foo is %foo%', foobar: '%foo%' }, true, '@service_container'] + properties: { foo: bar, moo: '@foo.baz', qux: { '%foo%': 'foo is %foo%', foobar: '%foo%' } } + calls: + - [setBar, ['@bar']] + - [initialize, { }] + + factory: [Bar\FooClass, getInstance] + configurator: sc_configure + foo.baz: + class: '%baz_class%' + factory: ['%baz_class%', getInstance] + configurator: ['%baz_class%', configureStatic1] + bar: + class: Bar\FooClass + arguments: [foo, '@foo.baz', '%foo_bar%'] + configurator: ['@foo.baz', configure] + foo_bar: + class: '%foo_class%' + shared: false + method_call1: + class: Bar\FooClass + file: '%path%foo.php' + calls: + - [setBar, ['@foo']] + - [setBar, ['@?foo2']] + - [setBar, ['@?foo3']] + - [setBar, ['@?foobaz']] + - [setBar, ['@=service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")']] + + foo_with_inline: + class: Foo + calls: + - [setBar, ['@inlined']] + + inlined: + class: Bar + public: false + properties: { pub: pub } + calls: + - [setBaz, ['@baz']] + + baz: + class: Baz + calls: + - [setFoo, ['@foo_with_inline']] + + request: + class: Request + synthetic: true + configurator_service: + class: ConfClass + public: false + calls: + - [setFoo, ['@baz']] + + configured_service: + class: stdClass + configurator: ['@configurator_service', configureStdClass] + configurator_service_simple: + class: ConfClass + public: false + arguments: ['bar'] + configured_service_simple: + class: stdClass + configurator: ['@configurator_service_simple', configureStdClass] + decorated: + class: stdClass + decorator_service: + class: stdClass + decorates: decorated + decorator_service_with_name: + class: stdClass + decorates: decorated + decoration_inner_name: decorated.pif-pouf + deprecated_service: + class: stdClass + deprecated: The "%service_id%" service is deprecated. You should stop using it, as it will soon be removed. + new_factory: + class: FactoryClass + public: false + properties: { foo: bar } + factory_service: + class: Bar + factory: ['@foo.baz', getInstance] + new_factory_service: + class: FooBarBaz + properties: { foo: bar } + factory: ['@new_factory', getInstance] + service_from_static_method: + class: Bar\FooClass + factory: [Bar\FooClass, getInstance] + factory_simple: + class: SimpleFactoryClass + public: false + arguments: ['foo'] + factory_service_simple: + class: Bar + factory: ['@factory_simple', getInstance] + alias_for_foo: '@foo' + alias_for_alias: '@foo' diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_configurator_short_syntax.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_configurator_short_syntax.yml new file mode 100644 index 0000000000000000000000000000000000000000..68e8137ec2cc78a4ce2dc83c47026a9bc4efd9b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_configurator_short_syntax.yml @@ -0,0 +1,9 @@ +services: + + foo_bar: + class: FooBarClass + configurator: foo_bar_configurator:configure + + foo_bar_with_static_call: + class: FooBarClass + configurator: FooBarConfigurator::configureFooBar diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/tag_name_empty_string.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/tag_name_empty_string.yml new file mode 100644 index 0000000000000000000000000000000000000000..0ea5f53da8cd92cbd3fac1910f8fe94133c87b4c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/tag_name_empty_string.yml @@ -0,0 +1,6 @@ +services: + foo_service: + class: FooClass + tags: + # tag name is an empty string + - { name: '', foo: bar } diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/tag_name_no_string.yml b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/tag_name_no_string.yml new file mode 100644 index 0000000000000000000000000000000000000000..f24cafd225b3cea41e8af3b2b3ff08d35c96f221 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/tag_name_no_string.yml @@ -0,0 +1,6 @@ +services: + foo_service: + class: FooClass + tags: + # tag name is not a string + - { name: [], foo: bar } diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f93965f46ebfbb55a139c54d2c3539ccfe88e36a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.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\Component\DependencyInjection\Tests\LazyProxy\Instantiator; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator; + +/** + * Tests for {@see \Symfony\Component\DependencyInjection\Instantiator\RealServiceInstantiator}. + * + * @author Marco Pivetta + */ +class RealServiceInstantiatorTest extends TestCase +{ + public function testInstantiateProxy() + { + $instantiator = new RealServiceInstantiator(); + $instance = new \stdClass(); + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $callback = function () use ($instance) { + return $instance; + }; + + $this->assertSame($instance, $instantiator->instantiateProxy($container, new Definition(), 'foo', $callback)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/NullDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/NullDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cde2c147e752cc57aa33fd7575d001eb2a6bdc7d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/NullDumperTest.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\LazyProxy\PhpDumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper; + +/** + * Tests for {@see \Symfony\Component\DependencyInjection\PhpDumper\NullDumper}. + * + * @author Marco Pivetta + */ +class NullDumperTest extends TestCase +{ + public function testNullDumper() + { + $dumper = new NullDumper(); + $definition = new Definition('stdClass'); + + $this->assertFalse($dumper->isProxyCandidate($definition)); + $this->assertSame('', $dumper->getProxyFactoryCode($definition, 'foo')); + $this->assertSame('', $dumper->getProxyCode($definition)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/ClosureLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/ClosureLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..125e09b6cf8f043df3b37b87f093fbb99e5cf7c7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/ClosureLoaderTest.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\ClosureLoader; + +class ClosureLoaderTest extends TestCase +{ + public function testSupports() + { + $loader = new ClosureLoader(new ContainerBuilder()); + + $this->assertTrue($loader->supports(function ($container) {}), '->supports() returns true if the resource is loadable'); + $this->assertFalse($loader->supports('foo.foo'), '->supports() returns true if the resource is loadable'); + } + + public function testLoad() + { + $loader = new ClosureLoader($container = new ContainerBuilder()); + + $loader->load(function ($container) { + $container->setParameter('foo', 'foo'); + }); + + $this->assertEquals('foo', $container->getParameter('foo'), '->load() loads a \Closure resource'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/DirectoryLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/DirectoryLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5de6577371b490cbe83791f67936b3dc705ddefe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/DirectoryLoaderTest.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use Symfony\Component\DependencyInjection\Loader\IniFileLoader; +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\DependencyInjection\Loader\DirectoryLoader; +use Symfony\Component\Config\Loader\LoaderResolver; +use Symfony\Component\Config\FileLocator; + +class DirectoryLoaderTest extends TestCase +{ + private static $fixturesPath; + + private $container; + private $loader; + + public static function setUpBeforeClass() + { + self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); + } + + protected function setUp() + { + $locator = new FileLocator(self::$fixturesPath); + $this->container = new ContainerBuilder(); + $this->loader = new DirectoryLoader($this->container, $locator); + $resolver = new LoaderResolver(array( + new PhpFileLoader($this->container, $locator), + new IniFileLoader($this->container, $locator), + new YamlFileLoader($this->container, $locator), + $this->loader, + )); + $this->loader->setResolver($resolver); + } + + public function testDirectoryCanBeLoadedRecursively() + { + $this->loader->load('directory/'); + $this->assertEquals(array('ini' => 'ini', 'yaml' => 'yaml', 'php' => 'php'), $this->container->getParameterBag()->all(), '->load() takes a single directory'); + } + + public function testImports() + { + $this->loader->resolve('directory/import/import.yml')->load('directory/import/import.yml'); + $this->assertEquals(array('ini' => 'ini', 'yaml' => 'yaml'), $this->container->getParameterBag()->all(), '->load() takes a single file that imports a directory'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The file "foo" does not exist (in: + */ + public function testExceptionIsRaisedWhenDirectoryDoesNotExist() + { + $this->loader->load('foo/'); + } + + public function testSupports() + { + $loader = new DirectoryLoader(new ContainerBuilder(), new FileLocator()); + + $this->assertTrue($loader->supports('directory/'), '->supports("directory/") returns true'); + $this->assertTrue($loader->supports('directory/', 'directory'), '->supports("directory/", "directory") returns true'); + $this->assertFalse($loader->supports('directory'), '->supports("directory") returns false'); + $this->assertTrue($loader->supports('directory', 'directory'), '->supports("directory", "directory") returns true'); + $this->assertFalse($loader->supports('directory', 'foo'), '->supports("directory", "foo") returns false'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..27f909436c31125616c4cf8ad5a196161e3fc2d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php @@ -0,0 +1,132 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\IniFileLoader; +use Symfony\Component\Config\FileLocator; + +class IniFileLoaderTest extends TestCase +{ + protected $container; + protected $loader; + + protected function setUp() + { + $this->container = new ContainerBuilder(); + $this->loader = new IniFileLoader($this->container, new FileLocator(realpath(__DIR__.'/../Fixtures/').'/ini')); + } + + public function testIniFileCanBeLoaded() + { + $this->loader->load('parameters.ini'); + $this->assertEquals(array('foo' => 'bar', 'bar' => '%foo%'), $this->container->getParameterBag()->all(), '->load() takes a single file name as its first argument'); + } + + /** + * @dataProvider getTypeConversions + */ + public function testTypeConversions($key, $value, $supported) + { + $this->loader->load('types.ini'); + $parameters = $this->container->getParameterBag()->all(); + $this->assertSame($value, $parameters[$key], '->load() converts values to PHP types'); + } + + /** + * @dataProvider getTypeConversions + * @requires PHP 5.6.1 + * This test illustrates where our conversions differs from INI_SCANNER_TYPED introduced in PHP 5.6.1 + */ + public function testTypeConversionsWithNativePhp($key, $value, $supported) + { + if (defined('HHVM_VERSION_ID')) { + return $this->markTestSkipped(); + } + + if (!$supported) { + return; + } + + $this->loader->load('types.ini'); + $expected = parse_ini_file(__DIR__.'/../Fixtures/ini/types.ini', true, INI_SCANNER_TYPED); + $this->assertSame($value, $expected['parameters'][$key], '->load() converts values to PHP types'); + } + + public function getTypeConversions() + { + return array( + array('true_comment', true, true), + array('true', true, true), + array('false', false, true), + array('on', true, true), + array('off', false, true), + array('yes', true, true), + array('no', false, true), + array('none', false, true), + array('null', null, true), + array('constant', PHP_VERSION, true), + array('12', 12, true), + array('12_string', '12', true), + array('12_comment', 12, true), + array('12_string_comment', '12', true), + array('12_string_comment_again', '12', true), + array('-12', -12, true), + array('1', 1, true), + array('0', 0, true), + array('0b0110', bindec('0b0110'), false), // not supported by INI_SCANNER_TYPED + array('11112222333344445555', '1111,2222,3333,4444,5555', true), + array('0777', 0777, false), // not supported by INI_SCANNER_TYPED + array('255', 0xFF, false), // not supported by INI_SCANNER_TYPED + array('100.0', 1e2, false), // not supported by INI_SCANNER_TYPED + array('-120.0', -1.2E2, false), // not supported by INI_SCANNER_TYPED + array('-10100.1', -10100.1, false), // not supported by INI_SCANNER_TYPED + array('-10,100.1', '-10,100.1', true), + ); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The file "foo.ini" does not exist (in: + */ + public function testExceptionIsRaisedWhenIniFileDoesNotExist() + { + $this->loader->load('foo.ini'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessage The "nonvalid.ini" file is not valid. + */ + public function testExceptionIsRaisedWhenIniFileCannotBeParsed() + { + @$this->loader->load('nonvalid.ini'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessage The "almostvalid.ini" file is not valid. + */ + public function testExceptionIsRaisedWhenIniFileIsAlmostValid() + { + @$this->loader->load('almostvalid.ini'); + } + + public function testSupports() + { + $loader = new IniFileLoader(new ContainerBuilder(), new FileLocator()); + + $this->assertTrue($loader->supports('foo.ini'), '->supports() returns true if the resource is loadable'); + $this->assertFalse($loader->supports('foo.foo'), '->supports() returns true if the resource is loadable'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b936bf5e63ce4d6d9e678d61b2b33e53d12e130e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use Symfony\Component\Config\FileLocator; + +class PhpFileLoaderTest extends TestCase +{ + public function testSupports() + { + $loader = new PhpFileLoader(new ContainerBuilder(), new FileLocator()); + + $this->assertTrue($loader->supports('foo.php'), '->supports() returns true if the resource is loadable'); + $this->assertFalse($loader->supports('foo.foo'), '->supports() returns true if the resource is loadable'); + } + + public function testLoad() + { + $loader = new PhpFileLoader($container = new ContainerBuilder(), new FileLocator()); + + $loader->load(__DIR__.'/../Fixtures/php/simple.php'); + + $this->assertEquals('foo', $container->getParameter('foo'), '->load() loads a PHP file resource'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a420b92cf4512a7698b4422e6dd74f141d793b91 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php @@ -0,0 +1,584 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\DependencyInjection\Loader\IniFileLoader; +use Symfony\Component\Config\Loader\LoaderResolver; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\ExpressionLanguage\Expression; + +class XmlFileLoaderTest extends TestCase +{ + protected static $fixturesPath; + + public static function setUpBeforeClass() + { + self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); + require_once self::$fixturesPath.'/includes/foo.php'; + require_once self::$fixturesPath.'/includes/ProjectExtension.php'; + require_once self::$fixturesPath.'/includes/ProjectWithXsdExtension.php'; + } + + public function testLoad() + { + $loader = new XmlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/ini')); + + try { + $loader->load('foo.xml'); + $this->fail('->load() throws an InvalidArgumentException if the loaded file does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not exist'); + $this->assertStringStartsWith('The file "foo.xml" does not exist (in:', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file does not exist'); + } + } + + public function testParseFile() + { + $loader = new XmlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/ini')); + $r = new \ReflectionObject($loader); + $m = $r->getMethod('parseFileToDOM'); + $m->setAccessible(true); + + try { + $m->invoke($loader, self::$fixturesPath.'/ini/parameters.ini'); + $this->fail('->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); + $this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'parameters.ini'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); + + $e = $e->getPrevious(); + $this->assertInstanceOf('InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); + $this->assertStringStartsWith('[ERROR 4] Start tag expected, \'<\' not found (in', $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); + } + + $loader = new XmlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/xml')); + + try { + $m->invoke($loader, self::$fixturesPath.'/xml/nonvalid.xml'); + $this->fail('->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD'); + $this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'nonvalid.xml'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file'); + + $e = $e->getPrevious(); + $this->assertInstanceOf('InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD'); + $this->assertStringStartsWith('[ERROR 1845] Element \'nonvalid\': No matching global declaration available for the validation root. (in', $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD'); + } + + $xml = $m->invoke($loader, self::$fixturesPath.'/xml/services1.xml'); + $this->assertInstanceOf('DOMDocument', $xml, '->parseFileToDOM() returns an SimpleXMLElement object'); + } + + public function testLoadWithExternalEntitiesDisabled() + { + $disableEntities = libxml_disable_entity_loader(true); + + $containerBuilder = new ContainerBuilder(); + $loader = new XmlFileLoader($containerBuilder, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('services2.xml'); + + libxml_disable_entity_loader($disableEntities); + + $this->assertTrue(count($containerBuilder->getParameterBag()->all()) > 0, 'Parameters can be read from the config file.'); + } + + public function testLoadParameters() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('services2.xml'); + + $actual = $container->getParameterBag()->all(); + $expected = array( + 'a string', + 'foo' => 'bar', + 'values' => array( + 0, + 'integer' => 4, + 100 => null, + 'true', + true, + false, + 'on', + 'off', + 'float' => 1.3, + 1000.3, + 'a string', + array('foo', 'bar'), + ), + 'mixedcase' => array('MixedCaseKey' => 'value'), + 'constant' => PHP_EOL, + ); + + $this->assertEquals($expected, $actual, '->load() converts XML values to PHP ones'); + } + + public function testLoadImports() + { + $container = new ContainerBuilder(); + $resolver = new LoaderResolver(array( + new IniFileLoader($container, new FileLocator(self::$fixturesPath.'/ini')), + new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yml')), + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')), + )); + $loader->setResolver($resolver); + $loader->load('services4.xml'); + + $actual = $container->getParameterBag()->all(); + $expected = array( + 'a string', + 'foo' => 'bar', + 'values' => array( + 0, + 'integer' => 4, + 100 => null, + 'true', + true, + false, + 'on', + 'off', + 'float' => 1.3, + 1000.3, + 'a string', + array('foo', 'bar'), + ), + 'mixedcase' => array('MixedCaseKey' => 'value'), + 'constant' => PHP_EOL, + 'bar' => '%foo%', + 'imported_from_ini' => true, + 'imported_from_yaml' => true, + ); + + $this->assertEquals(array_keys($expected), array_keys($actual), '->load() imports and merges imported files'); + $this->assertTrue($actual['imported_from_ini']); + + // Bad import throws no exception due to ignore_errors value. + $loader->load('services4_bad_import.xml'); + } + + public function testLoadAnonymousServices() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('services5.xml'); + $services = $container->getDefinitions(); + $this->assertCount(6, $services, '->load() attributes unique ids to anonymous services'); + + // anonymous service as an argument + $args = $services['foo']->getArguments(); + $this->assertCount(1, $args, '->load() references anonymous services as "normal" ones'); + $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Reference', $args[0], '->load() converts anonymous services to references to "normal" services'); + $this->assertTrue(isset($services[(string) $args[0]]), '->load() makes a reference to the created ones'); + $inner = $services[(string) $args[0]]; + $this->assertEquals('BarClass', $inner->getClass(), '->load() uses the same configuration as for the anonymous ones'); + $this->assertFalse($inner->isPublic()); + + // inner anonymous services + $args = $inner->getArguments(); + $this->assertCount(1, $args, '->load() references anonymous services as "normal" ones'); + $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Reference', $args[0], '->load() converts anonymous services to references to "normal" services'); + $this->assertTrue(isset($services[(string) $args[0]]), '->load() makes a reference to the created ones'); + $inner = $services[(string) $args[0]]; + $this->assertEquals('BazClass', $inner->getClass(), '->load() uses the same configuration as for the anonymous ones'); + $this->assertFalse($inner->isPublic()); + + // anonymous service as a property + $properties = $services['foo']->getProperties(); + $property = $properties['p']; + $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Reference', $property, '->load() converts anonymous services to references to "normal" services'); + $this->assertTrue(isset($services[(string) $property]), '->load() makes a reference to the created ones'); + $inner = $services[(string) $property]; + $this->assertEquals('BuzClass', $inner->getClass(), '->load() uses the same configuration as for the anonymous ones'); + $this->assertFalse($inner->isPublic()); + + // "wild" service + $service = $container->findTaggedServiceIds('biz_tag'); + $this->assertCount(1, $service); + + foreach ($service as $id => $tag) { + $service = $container->getDefinition($id); + } + $this->assertEquals('BizClass', $service->getClass(), '->load() uses the same configuration as for the anonymous ones'); + $this->assertTrue($service->isPublic()); + + // anonymous services are shared when using decoration definitions + $container->compile(); + $services = $container->getDefinitions(); + $fooArgs = $services['foo']->getArguments(); + $barArgs = $services['bar']->getArguments(); + $this->assertSame($fooArgs[0], $barArgs[0]); + } + + public function testLoadServices() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('services6.xml'); + $services = $container->getDefinitions(); + $this->assertTrue(isset($services['foo']), '->load() parses elements'); + $this->assertFalse($services['not_shared']->isShared(), '->load() parses shared flag'); + $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Definition', $services['foo'], '->load() converts element to Definition instances'); + $this->assertEquals('FooClass', $services['foo']->getClass(), '->load() parses the class attribute'); + $this->assertEquals('%path%/foo.php', $services['file']->getFile(), '->load() parses the file tag'); + $this->assertEquals(array('foo', new Reference('foo'), array(true, false)), $services['arguments']->getArguments(), '->load() parses the argument tags'); + $this->assertEquals('sc_configure', $services['configurator1']->getConfigurator(), '->load() parses the configurator tag'); + $this->assertEquals(array(new Reference('baz'), 'configure'), $services['configurator2']->getConfigurator(), '->load() parses the configurator tag'); + $this->assertEquals(array('BazClass', 'configureStatic'), $services['configurator3']->getConfigurator(), '->load() parses the configurator tag'); + $this->assertEquals(array(array('setBar', array()), array('setBar', array(new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')))), $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag'); + $this->assertEquals(array(array('setBar', array('foo', new Reference('foo'), array(true, false)))), $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag'); + $this->assertEquals('factory', $services['new_factory1']->getFactory(), '->load() parses the factory tag'); + $this->assertEquals(array(new Reference('baz'), 'getClass'), $services['new_factory2']->getFactory(), '->load() parses the factory tag'); + $this->assertEquals(array('BazClass', 'getInstance'), $services['new_factory3']->getFactory(), '->load() parses the factory tag'); + + $aliases = $container->getAliases(); + $this->assertTrue(isset($aliases['alias_for_foo']), '->load() parses elements'); + $this->assertEquals('foo', (string) $aliases['alias_for_foo'], '->load() parses aliases'); + $this->assertTrue($aliases['alias_for_foo']->isPublic()); + $this->assertTrue(isset($aliases['another_alias_for_foo'])); + $this->assertEquals('foo', (string) $aliases['another_alias_for_foo']); + $this->assertFalse($aliases['another_alias_for_foo']->isPublic()); + + $this->assertEquals(array('decorated', null, 0), $services['decorator_service']->getDecoratedService()); + $this->assertEquals(array('decorated', 'decorated.pif-pouf', 0), $services['decorator_service_with_name']->getDecoratedService()); + $this->assertEquals(array('decorated', 'decorated.pif-pouf', 5), $services['decorator_service_with_name_and_priority']->getDecoratedService()); + } + + public function testParsesTags() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('services10.xml'); + + $services = $container->findTaggedServiceIds('foo_tag'); + $this->assertCount(1, $services); + + foreach ($services as $id => $tagAttributes) { + foreach ($tagAttributes as $attributes) { + $this->assertArrayHasKey('other_option', $attributes); + $this->assertEquals('lorem', $attributes['other_option']); + $this->assertArrayHasKey('other-option', $attributes, 'unnormalized tag attributes should not be removed'); + + $this->assertEquals('ciz', $attributes['some_option'], 'no overriding should be done when normalizing'); + $this->assertEquals('cat', $attributes['some-option']); + + $this->assertArrayNotHasKey('an_other_option', $attributes, 'normalization should not be done when an underscore is already found'); + } + } + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + */ + public function testParseTagsWithoutNameThrowsException() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('tag_without_name.xml'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessageRegExp /The tag name for service ".+" in .* must be a non-empty string/ + */ + public function testParseTagWithEmptyNameThrowsException() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('tag_with_empty_name.xml'); + } + + public function testDeprecated() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('services_deprecated.xml'); + + $this->assertTrue($container->getDefinition('foo')->isDeprecated()); + $message = 'The "foo" service is deprecated. You should stop using it, as it will soon be removed.'; + $this->assertSame($message, $container->getDefinition('foo')->getDeprecationMessage('foo')); + + $this->assertTrue($container->getDefinition('bar')->isDeprecated()); + $message = 'The "bar" service is deprecated.'; + $this->assertSame($message, $container->getDefinition('bar')->getDeprecationMessage('bar')); + } + + public function testConvertDomElementToArray() + { + $doc = new \DOMDocument('1.0'); + $doc->loadXML('bar'); + $this->assertEquals('bar', XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + + $doc = new \DOMDocument('1.0'); + $doc->loadXML(''); + $this->assertEquals(array('foo' => 'bar'), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + + $doc = new \DOMDocument('1.0'); + $doc->loadXML('bar'); + $this->assertEquals(array('foo' => 'bar'), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + + $doc = new \DOMDocument('1.0'); + $doc->loadXML('barbar'); + $this->assertEquals(array('foo' => array('value' => 'bar', 'foo' => 'bar')), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + + $doc = new \DOMDocument('1.0'); + $doc->loadXML(''); + $this->assertEquals(array('foo' => null), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + + $doc = new \DOMDocument('1.0'); + $doc->loadXML(''); + $this->assertEquals(array('foo' => null), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + + $doc = new \DOMDocument('1.0'); + $doc->loadXML(''); + $this->assertEquals(array('foo' => array(array('foo' => 'bar'), array('foo' => 'bar'))), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array'); + } + + public function testExtensions() + { + $container = new ContainerBuilder(); + $container->registerExtension(new \ProjectExtension()); + $container->registerExtension(new \ProjectWithXsdExtension()); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + + // extension without an XSD + $loader->load('extensions/services1.xml'); + $container->compile(); + $services = $container->getDefinitions(); + $parameters = $container->getParameterBag()->all(); + + $this->assertTrue(isset($services['project.service.bar']), '->load() parses extension elements'); + $this->assertTrue(isset($parameters['project.parameter.bar']), '->load() parses extension elements'); + + $this->assertEquals('BAR', $services['project.service.foo']->getClass(), '->load() parses extension elements'); + $this->assertEquals('BAR', $parameters['project.parameter.foo'], '->load() parses extension elements'); + + // extension with an XSD + $container = new ContainerBuilder(); + $container->registerExtension(new \ProjectExtension()); + $container->registerExtension(new \ProjectWithXsdExtension()); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('extensions/services2.xml'); + $container->compile(); + $services = $container->getDefinitions(); + $parameters = $container->getParameterBag()->all(); + + $this->assertTrue(isset($services['project.service.bar']), '->load() parses extension elements'); + $this->assertTrue(isset($parameters['project.parameter.bar']), '->load() parses extension elements'); + + $this->assertEquals('BAR', $services['project.service.foo']->getClass(), '->load() parses extension elements'); + $this->assertEquals('BAR', $parameters['project.parameter.foo'], '->load() parses extension elements'); + + $container = new ContainerBuilder(); + $container->registerExtension(new \ProjectExtension()); + $container->registerExtension(new \ProjectWithXsdExtension()); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + + // extension with an XSD (does not validate) + try { + $loader->load('extensions/services3.xml'); + $this->fail('->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); + $this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'services3.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); + + $e = $e->getPrevious(); + $this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); + $this->assertContains('The attribute \'bar\' is not allowed', $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); + } + + // non-registered extension + try { + $loader->load('extensions/services4.xml'); + $this->fail('->load() throws an InvalidArgumentException if the tag is not valid'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tag is not valid'); + $this->assertStringStartsWith('There is no extension able to load the configuration for "project:bar" (in', $e->getMessage(), '->load() throws an InvalidArgumentException if the tag is not valid'); + } + } + + public function testExtensionInPhar() + { + if (extension_loaded('suhosin') && false === strpos(ini_get('suhosin.executor.include.whitelist'), 'phar')) { + $this->markTestSkipped('To run this test, add "phar" to the "suhosin.executor.include.whitelist" settings in your php.ini file.'); + } + + require_once self::$fixturesPath.'/includes/ProjectWithXsdExtensionInPhar.phar'; + + // extension with an XSD in PHAR archive + $container = new ContainerBuilder(); + $container->registerExtension(new \ProjectWithXsdExtensionInPhar()); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('extensions/services6.xml'); + + // extension with an XSD in PHAR archive (does not validate) + try { + $loader->load('extensions/services7.xml'); + $this->fail('->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); + $this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'services7.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); + + $e = $e->getPrevious(); + $this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); + $this->assertContains('The attribute \'bar\' is not allowed', $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD'); + } + } + + public function testSupports() + { + $loader = new XmlFileLoader(new ContainerBuilder(), new FileLocator()); + + $this->assertTrue($loader->supports('foo.xml'), '->supports() returns true if the resource is loadable'); + $this->assertFalse($loader->supports('foo.foo'), '->supports() returns true if the resource is loadable'); + } + + public function testNoNamingConflictsForAnonymousServices() + { + $container = new ContainerBuilder(); + + $loader1 = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml/extension1')); + $loader1->load('services.xml'); + $services = $container->getDefinitions(); + $this->assertCount(2, $services, '->load() attributes unique ids to anonymous services'); + $loader2 = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml/extension2')); + $loader2->load('services.xml'); + $services = $container->getDefinitions(); + $this->assertCount(4, $services, '->load() attributes unique ids to anonymous services'); + + $services = $container->getDefinitions(); + $args1 = $services['extension1.foo']->getArguments(); + $inner1 = $services[(string) $args1[0]]; + $this->assertEquals('BarClass1', $inner1->getClass(), '->load() uses the same configuration as for the anonymous ones'); + $args2 = $services['extension2.foo']->getArguments(); + $inner2 = $services[(string) $args2[0]]; + $this->assertEquals('BarClass2', $inner2->getClass(), '->load() uses the same configuration as for the anonymous ones'); + } + + public function testDocTypeIsNotAllowed() + { + $container = new ContainerBuilder(); + + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + + // document types are not allowed. + try { + $loader->load('withdoctype.xml'); + $this->fail('->load() throws an InvalidArgumentException if the configuration contains a document type'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration contains a document type'); + $this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'withdoctype.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration contains a document type'); + + $e = $e->getPrevious(); + $this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration contains a document type'); + $this->assertSame('Document types are not allowed.', $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration contains a document type'); + } + } + + public function testXmlNamespaces() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('namespaces.xml'); + $services = $container->getDefinitions(); + + $this->assertTrue(isset($services['foo']), '->load() parses elements'); + $this->assertEquals(1, count($services['foo']->getTag('foo.tag')), '->load parses elements'); + $this->assertEquals(array(array('setBar', array('foo'))), $services['foo']->getMethodCalls(), '->load() parses the tag'); + } + + public function testLoadIndexedArguments() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('services14.xml'); + + $this->assertEquals(array('index_0' => 'app'), $container->findDefinition('logger')->getArguments()); + } + + public function testLoadInlinedServices() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('services21.xml'); + + $foo = $container->getDefinition('foo'); + + $fooFactory = $foo->getFactory(); + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Definition', $fooFactory[0]); + $this->assertSame('FooFactory', $fooFactory[0]->getClass()); + $this->assertSame('createFoo', $fooFactory[1]); + + $fooFactoryFactory = $fooFactory[0]->getFactory(); + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Definition', $fooFactoryFactory[0]); + $this->assertSame('Foobar', $fooFactoryFactory[0]->getClass()); + $this->assertSame('createFooFactory', $fooFactoryFactory[1]); + + $fooConfigurator = $foo->getConfigurator(); + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Definition', $fooConfigurator[0]); + $this->assertSame('Bar', $fooConfigurator[0]->getClass()); + $this->assertSame('configureFoo', $fooConfigurator[1]); + + $barConfigurator = $fooConfigurator[0]->getConfigurator(); + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Definition', $barConfigurator[0]); + $this->assertSame('Baz', $barConfigurator[0]->getClass()); + $this->assertSame('configureBar', $barConfigurator[1]); + } + + public function testType() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('services22.xml'); + + $this->assertEquals(array('Bar', 'Baz'), $container->getDefinition('foo')->getAutowiringTypes()); + } + + public function testAutowire() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('services23.xml'); + + $this->assertTrue($container->getDefinition('bar')->isAutowired()); + } + + /** + * @group legacy + * @expectedDeprecation Using the attribute "class" is deprecated for the service "bar" which is defined as an alias %s. + * @expectedDeprecation Using the element "tag" is deprecated for the service "bar" which is defined as an alias %s. + * @expectedDeprecation Using the element "factory" is deprecated for the service "bar" which is defined as an alias %s. + */ + public function testAliasDefinitionContainsUnsupportedElements() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + + $loader->load('legacy_invalid_alias_definition.xml'); + + $this->assertTrue($container->has('bar')); + } + + public function testArgumentWithKeyOutsideCollection() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('with_key_outside_collection.xml'); + + $this->assertSame(array('type' => 'foo', 'bar'), $container->getDefinition('foo')->getArguments()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1cd561a99ecb06b608c4611ed6eff16d776f7276 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php @@ -0,0 +1,339 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\DependencyInjection\Loader\IniFileLoader; +use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use Symfony\Component\Config\Loader\LoaderResolver; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\ExpressionLanguage\Expression; + +class YamlFileLoaderTest extends TestCase +{ + protected static $fixturesPath; + + public static function setUpBeforeClass() + { + self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); + require_once self::$fixturesPath.'/includes/foo.php'; + require_once self::$fixturesPath.'/includes/ProjectExtension.php'; + } + + public function testLoadFile() + { + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/ini')); + $r = new \ReflectionObject($loader); + $m = $r->getMethod('loadFile'); + $m->setAccessible(true); + + try { + $m->invoke($loader, 'foo.yml'); + $this->fail('->load() throws an InvalidArgumentException if the loaded file does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not exist'); + $this->assertEquals('The service file "foo.yml" is not valid.', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file does not exist'); + } + + try { + $m->invoke($loader, 'parameters.ini'); + $this->fail('->load() throws an InvalidArgumentException if the loaded file is not a valid YAML file'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file is not a valid YAML file'); + $this->assertEquals('The service file "parameters.ini" is not valid.', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file is not a valid YAML file'); + } + + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/yaml')); + + foreach (array('nonvalid1', 'nonvalid2') as $fixture) { + try { + $m->invoke($loader, $fixture.'.yml'); + $this->fail('->load() throws an InvalidArgumentException if the loaded file does not validate'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not validate'); + $this->assertStringMatchesFormat('The service file "nonvalid%d.yml" is not valid.', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file does not validate'); + } + } + } + + /** + * @dataProvider provideInvalidFiles + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + */ + public function testLoadInvalidFile($file) + { + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/yaml')); + + $loader->load($file.'.yml'); + } + + public function provideInvalidFiles() + { + return array( + array('bad_parameters'), + array('bad_imports'), + array('bad_import'), + array('bad_services'), + array('bad_service'), + array('bad_calls'), + array('bad_format'), + ); + } + + public function testLoadParameters() + { + $container = new ContainerBuilder(); + $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('services2.yml'); + $this->assertEquals(array('foo' => 'bar', 'mixedcase' => array('MixedCaseKey' => 'value'), 'values' => array(true, false, 0, 1000.3, PHP_INT_MAX), 'bar' => 'foo', 'escape' => '@escapeme', 'foo_bar' => new Reference('foo_bar')), $container->getParameterBag()->all(), '->load() converts YAML keys to lowercase'); + } + + public function testLoadImports() + { + $container = new ContainerBuilder(); + $resolver = new LoaderResolver(array( + new IniFileLoader($container, new FileLocator(self::$fixturesPath.'/ini')), + new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')), + new PhpFileLoader($container, new FileLocator(self::$fixturesPath.'/php')), + $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')), + )); + $loader->setResolver($resolver); + $loader->load('services4.yml'); + + $actual = $container->getParameterBag()->all(); + $expected = array('foo' => 'bar', 'values' => array(true, false, PHP_INT_MAX), 'bar' => '%foo%', 'escape' => '@escapeme', 'foo_bar' => new Reference('foo_bar'), 'mixedcase' => array('MixedCaseKey' => 'value'), 'imported_from_ini' => true, 'imported_from_xml' => true); + $this->assertEquals(array_keys($expected), array_keys($actual), '->load() imports and merges imported files'); + $this->assertTrue($actual['imported_from_ini']); + + // Bad import throws no exception due to ignore_errors value. + $loader->load('services4_bad_import.yml'); + } + + public function testLoadServices() + { + $container = new ContainerBuilder(); + $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('services6.yml'); + $services = $container->getDefinitions(); + $this->assertTrue(isset($services['foo']), '->load() parses service elements'); + $this->assertFalse($services['not_shared']->isShared(), '->load() parses the shared flag'); + $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Definition', $services['foo'], '->load() converts service element to Definition instances'); + $this->assertEquals('FooClass', $services['foo']->getClass(), '->load() parses the class attribute'); + $this->assertEquals('%path%/foo.php', $services['file']->getFile(), '->load() parses the file tag'); + $this->assertEquals(array('foo', new Reference('foo'), array(true, false)), $services['arguments']->getArguments(), '->load() parses the argument tags'); + $this->assertEquals('sc_configure', $services['configurator1']->getConfigurator(), '->load() parses the configurator tag'); + $this->assertEquals(array(new Reference('baz'), 'configure'), $services['configurator2']->getConfigurator(), '->load() parses the configurator tag'); + $this->assertEquals(array('BazClass', 'configureStatic'), $services['configurator3']->getConfigurator(), '->load() parses the configurator tag'); + $this->assertEquals(array(array('setBar', array()), array('setBar', array()), array('setBar', array(new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')))), $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag'); + $this->assertEquals(array(array('setBar', array('foo', new Reference('foo'), array(true, false)))), $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag'); + $this->assertEquals('factory', $services['new_factory1']->getFactory(), '->load() parses the factory tag'); + $this->assertEquals(array(new Reference('baz'), 'getClass'), $services['new_factory2']->getFactory(), '->load() parses the factory tag'); + $this->assertEquals(array('BazClass', 'getInstance'), $services['new_factory3']->getFactory(), '->load() parses the factory tag'); + + $aliases = $container->getAliases(); + $this->assertTrue(isset($aliases['alias_for_foo']), '->load() parses aliases'); + $this->assertEquals('foo', (string) $aliases['alias_for_foo'], '->load() parses aliases'); + $this->assertTrue($aliases['alias_for_foo']->isPublic()); + $this->assertTrue(isset($aliases['another_alias_for_foo'])); + $this->assertEquals('foo', (string) $aliases['another_alias_for_foo']); + $this->assertFalse($aliases['another_alias_for_foo']->isPublic()); + + $this->assertEquals(array('decorated', null, 0), $services['decorator_service']->getDecoratedService()); + $this->assertEquals(array('decorated', 'decorated.pif-pouf', 0), $services['decorator_service_with_name']->getDecoratedService()); + $this->assertEquals(array('decorated', 'decorated.pif-pouf', 5), $services['decorator_service_with_name_and_priority']->getDecoratedService()); + } + + public function testLoadFactoryShortSyntax() + { + $container = new ContainerBuilder(); + $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('services14.yml'); + $services = $container->getDefinitions(); + + $this->assertEquals(array(new Reference('baz'), 'getClass'), $services['factory']->getFactory(), '->load() parses the factory tag with service:method'); + $this->assertEquals(array('FooBacFactory', 'createFooBar'), $services['factory_with_static_call']->getFactory(), '->load() parses the factory tag with Class::method'); + } + + public function testLoadConfiguratorShortSyntax() + { + $container = new ContainerBuilder(); + $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('services_configurator_short_syntax.yml'); + $services = $container->getDefinitions(); + + $this->assertEquals(array(new Reference('foo_bar_configurator'), 'configure'), $services['foo_bar']->getConfigurator(), '->load() parses the configurator tag with service:method'); + $this->assertEquals(array('FooBarConfigurator', 'configureFooBar'), $services['foo_bar_with_static_call']->getConfigurator(), '->load() parses the configurator tag with Class::method'); + } + + public function testExtensions() + { + $container = new ContainerBuilder(); + $container->registerExtension(new \ProjectExtension()); + $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('services10.yml'); + $container->compile(); + $services = $container->getDefinitions(); + $parameters = $container->getParameterBag()->all(); + + $this->assertTrue(isset($services['project.service.bar']), '->load() parses extension elements'); + $this->assertTrue(isset($parameters['project.parameter.bar']), '->load() parses extension elements'); + + $this->assertEquals('BAR', $services['project.service.foo']->getClass(), '->load() parses extension elements'); + $this->assertEquals('BAR', $parameters['project.parameter.foo'], '->load() parses extension elements'); + + try { + $loader->load('services11.yml'); + $this->fail('->load() throws an InvalidArgumentException if the tag is not valid'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tag is not valid'); + $this->assertStringStartsWith('There is no extension able to load the configuration for "foobarfoobar" (in', $e->getMessage(), '->load() throws an InvalidArgumentException if the tag is not valid'); + } + } + + public function testSupports() + { + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator()); + + $this->assertTrue($loader->supports('foo.yml'), '->supports() returns true if the resource is loadable'); + $this->assertTrue($loader->supports('foo.yaml'), '->supports() returns true if the resource is loadable'); + $this->assertFalse($loader->supports('foo.foo'), '->supports() returns true if the resource is loadable'); + } + + public function testNonArrayTagsThrowsException() + { + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/yaml')); + try { + $loader->load('badtag1.yml'); + $this->fail('->load() should throw an exception when the tags key of a service is not an array'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tags key is not an array'); + $this->assertStringStartsWith('Parameter "tags" must be an array for service', $e->getMessage(), '->load() throws an InvalidArgumentException if the tags key is not an array'); + } + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessage A "tags" entry must be an array for service + */ + public function testNonArrayTagThrowsException() + { + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('badtag4.yml'); + } + + public function testTagWithoutNameThrowsException() + { + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/yaml')); + try { + $loader->load('badtag2.yml'); + $this->fail('->load() should throw an exception when a tag is missing the name key'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if a tag is missing the name key'); + $this->assertStringStartsWith('A "tags" entry is missing a "name" key for service ', $e->getMessage(), '->load() throws an InvalidArgumentException if a tag is missing the name key'); + } + } + + public function testTagWithAttributeArrayThrowsException() + { + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/yaml')); + try { + $loader->load('badtag3.yml'); + $this->fail('->load() should throw an exception when a tag-attribute is not a scalar'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if a tag-attribute is not a scalar'); + $this->assertStringStartsWith('A "tags" attribute must be of a scalar-type for service "foo_service", tag "foo", attribute "bar"', $e->getMessage(), '->load() throws an InvalidArgumentException if a tag-attribute is not a scalar'); + } + } + + public function testLoadYamlOnlyWithKeys() + { + $container = new ContainerBuilder(); + $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('services21.yml'); + + $definition = $container->getDefinition('manager'); + $this->assertEquals(array(array('setLogger', array(new Reference('logger'))), array('setClass', array('User'))), $definition->getMethodCalls()); + $this->assertEquals(array(true), $definition->getArguments()); + $this->assertEquals(array('manager' => array(array('alias' => 'user'))), $definition->getTags()); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessageRegExp /The tag name for service ".+" in .+ must be a non-empty string/ + */ + public function testTagWithEmptyNameThrowsException() + { + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('tag_name_empty_string.yml'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessageREgExp /The tag name for service "\.+" must be a non-empty string/ + */ + public function testTagWithNonStringNameThrowsException() + { + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('tag_name_no_string.yml'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + */ + public function testTypesNotArray() + { + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('bad_types1.yml'); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + */ + public function testTypeNotString() + { + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('bad_types2.yml'); + } + + public function testTypes() + { + $container = new ContainerBuilder(); + $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('services22.yml'); + + $this->assertEquals(array('Foo', 'Bar'), $container->getDefinition('foo_service')->getAutowiringTypes()); + $this->assertEquals(array('Foo'), $container->getDefinition('baz_service')->getAutowiringTypes()); + } + + public function testAutowire() + { + $container = new ContainerBuilder(); + $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('services23.yml'); + + $this->assertTrue($container->getDefinition('bar_service')->isAutowired()); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessage The value of the "decorates" option for the "bar" service must be the id of the service without the "@" prefix (replace "@foo" with "foo"). + */ + public function testDecoratedServicesWithWrongSyntaxThrowsException() + { + $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath.'/yaml')); + $loader->load('bad_decorates.yml'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..01fcd2c3ef10b609f5642cf8ad738d903ac4a1e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php @@ -0,0 +1,165 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\ParameterBag; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; + +class EnvPlaceholderParameterBagTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + */ + public function testGetThrowsInvalidArgumentExceptionIfEnvNameContainsNonWordCharacters() + { + $bag = new EnvPlaceholderParameterBag(); + $bag->get('env(%foo%)'); + } + + public function testMergeWillNotDuplicateIdenticalParameters() + { + $envVariableName = 'DB_HOST'; + $parameter = sprintf('env(%s)', $envVariableName); + $firstBag = new EnvPlaceholderParameterBag(); + + // initialize placeholders + $firstBag->get($parameter); + $secondBag = clone $firstBag; + + $firstBag->mergeEnvPlaceholders($secondBag); + $mergedPlaceholders = $firstBag->getEnvPlaceholders(); + + $placeholderForVariable = $mergedPlaceholders[$envVariableName]; + $placeholder = array_values($placeholderForVariable)[0]; + + $this->assertCount(1, $placeholderForVariable); + $this->assertInternalType('string', $placeholder); + $this->assertContains($envVariableName, $placeholder); + } + + public function testMergeWhereFirstBagIsEmptyWillWork() + { + $envVariableName = 'DB_HOST'; + $parameter = sprintf('env(%s)', $envVariableName); + $firstBag = new EnvPlaceholderParameterBag(); + $secondBag = new EnvPlaceholderParameterBag(); + + // initialize placeholder only in second bag + $secondBag->get($parameter); + + $this->assertEmpty($firstBag->getEnvPlaceholders()); + + $firstBag->mergeEnvPlaceholders($secondBag); + $mergedPlaceholders = $firstBag->getEnvPlaceholders(); + + $placeholderForVariable = $mergedPlaceholders[$envVariableName]; + $placeholder = array_values($placeholderForVariable)[0]; + + $this->assertCount(1, $placeholderForVariable); + $this->assertInternalType('string', $placeholder); + $this->assertContains($envVariableName, $placeholder); + } + + public function testMergeWherePlaceholderOnlyExistsInSecond() + { + $uniqueEnvName = 'DB_HOST'; + $commonEnvName = 'DB_USER'; + + $uniqueParamName = sprintf('env(%s)', $uniqueEnvName); + $commonParamName = sprintf('env(%s)', $commonEnvName); + + $firstBag = new EnvPlaceholderParameterBag(); + // initialize common placeholder + $firstBag->get($commonParamName); + $secondBag = clone $firstBag; + + // initialize unique placeholder + $secondBag->get($uniqueParamName); + + $firstBag->mergeEnvPlaceholders($secondBag); + $merged = $firstBag->getEnvPlaceholders(); + + $this->assertCount(1, $merged[$uniqueEnvName]); + // second bag has same placeholder for commonEnvName + $this->assertCount(1, $merged[$commonEnvName]); + } + + public function testMergeWithDifferentIdentifiersForPlaceholders() + { + $envName = 'DB_USER'; + $paramName = sprintf('env(%s)', $envName); + + $firstBag = new EnvPlaceholderParameterBag(); + $secondBag = new EnvPlaceholderParameterBag(); + // initialize placeholders + $firstPlaceholder = $firstBag->get($paramName); + $secondPlaceholder = $secondBag->get($paramName); + + $firstBag->mergeEnvPlaceholders($secondBag); + $merged = $firstBag->getEnvPlaceholders(); + + $this->assertNotEquals($firstPlaceholder, $secondPlaceholder); + $this->assertCount(2, $merged[$envName]); + } + + public function testResolveEnvCastsIntToString() + { + $bag = new EnvPlaceholderParameterBag(); + $bag->get('env(INT_VAR)'); + $bag->set('env(Int_Var)', 2); + $bag->resolve(); + $this->assertSame('2', $bag->all()['env(int_var)']); + } + + public function testResolveEnvAllowsNull() + { + $bag = new EnvPlaceholderParameterBag(); + $bag->get('env(NULL_VAR)'); + $bag->set('env(Null_Var)', null); + $bag->resolve(); + $this->assertNull($bag->all()['env(null_var)']); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage The default value of env parameter "ARRAY_VAR" must be scalar or null, array given. + */ + public function testResolveThrowsOnBadDefaultValue() + { + $bag = new EnvPlaceholderParameterBag(); + $bag->get('env(ARRAY_VAR)'); + $bag->set('env(Array_Var)', array()); + $bag->resolve(); + } + + public function testGetEnvAllowsNull() + { + $bag = new EnvPlaceholderParameterBag(); + $bag->set('env(NULL_VAR)', null); + $bag->get('env(NULL_VAR)'); + $bag->resolve(); + + $this->assertNull($bag->all()['env(null_var)']); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage The default value of an env() parameter must be scalar or null, but "array" given to "env(ARRAY_VAR)". + */ + public function testGetThrowsOnBadDefaultValue() + { + $bag = new EnvPlaceholderParameterBag(); + $bag->set('env(ARRAY_VAR)', array()); + $bag->get('env(ARRAY_VAR)'); + $bag->resolve(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ef9a66f6cff72cf489e0abb912c636823b789566 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\ParameterBag; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; + +class FrozenParameterBagTest extends TestCase +{ + public function testConstructor() + { + $parameters = array( + 'foo' => 'foo', + 'bar' => 'bar', + ); + $bag = new FrozenParameterBag($parameters); + $this->assertEquals($parameters, $bag->all(), '__construct() takes an array of parameters as its first argument'); + } + + /** + * @expectedException \LogicException + */ + public function testClear() + { + $bag = new FrozenParameterBag(array()); + $bag->clear(); + } + + /** + * @expectedException \LogicException + */ + public function testSet() + { + $bag = new FrozenParameterBag(array()); + $bag->set('foo', 'bar'); + } + + /** + * @expectedException \LogicException + */ + public function testAdd() + { + $bag = new FrozenParameterBag(array()); + $bag->add(array()); + } + + /** + * @expectedException \LogicException + */ + public function testRemove() + { + $bag = new FrozenParameterBag(array('foo' => 'bar')); + $bag->remove('foo'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..391e0eb3ff7de9945ec25c4cf00f1f94d3667d34 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php @@ -0,0 +1,251 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\ParameterBag; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; +use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; + +class ParameterBagTest extends TestCase +{ + public function testConstructor() + { + $bag = new ParameterBag($parameters = array( + 'foo' => 'foo', + 'bar' => 'bar', + )); + $this->assertEquals($parameters, $bag->all(), '__construct() takes an array of parameters as its first argument'); + } + + public function testClear() + { + $bag = new ParameterBag($parameters = array( + 'foo' => 'foo', + 'bar' => 'bar', + )); + $bag->clear(); + $this->assertEquals(array(), $bag->all(), '->clear() removes all parameters'); + } + + public function testRemove() + { + $bag = new ParameterBag(array( + 'foo' => 'foo', + 'bar' => 'bar', + )); + $bag->remove('foo'); + $this->assertEquals(array('bar' => 'bar'), $bag->all(), '->remove() removes a parameter'); + $bag->remove('BAR'); + $this->assertEquals(array(), $bag->all(), '->remove() converts key to lowercase before removing'); + } + + public function testGetSet() + { + $bag = new ParameterBag(array('foo' => 'bar')); + $bag->set('bar', 'foo'); + $this->assertEquals('foo', $bag->get('bar'), '->set() sets the value of a new parameter'); + + $bag->set('foo', 'baz'); + $this->assertEquals('baz', $bag->get('foo'), '->set() overrides previously set parameter'); + + $bag->set('Foo', 'baz1'); + $this->assertEquals('baz1', $bag->get('foo'), '->set() converts the key to lowercase'); + $this->assertEquals('baz1', $bag->get('FOO'), '->get() converts the key to lowercase'); + + try { + $bag->get('baba'); + $this->fail('->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException if the key does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException', $e, '->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException if the key does not exist'); + $this->assertEquals('You have requested a non-existent parameter "baba".', $e->getMessage(), '->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException if the key does not exist'); + } + } + + /** + * @dataProvider provideGetThrowParameterNotFoundExceptionData + */ + public function testGetThrowParameterNotFoundException($parameterKey, $exceptionMessage) + { + $bag = new ParameterBag(array( + 'foo' => 'foo', + 'bar' => 'bar', + 'baz' => 'baz', + 'fiz' => array('bar' => array('boo' => 12)), + )); + + if (method_exists($this, 'expectException')) { + $this->expectException(ParameterNotFoundException::class); + $this->expectExceptionMessage($exceptionMessage); + } else { + $this->setExpectedException(ParameterNotFoundException::class, $exceptionMessage); + } + + $bag->get($parameterKey); + } + + public function provideGetThrowParameterNotFoundExceptionData() + { + return array( + array('foo1', 'You have requested a non-existent parameter "foo1". Did you mean this: "foo"?'), + array('bag', 'You have requested a non-existent parameter "bag". Did you mean one of these: "bar", "baz"?'), + array('', 'You have requested a non-existent parameter "".'), + + array('fiz.bar.boo', 'You have requested a non-existent parameter "fiz.bar.boo". You cannot access nested array items, do you want to inject "fiz" instead?'), + ); + } + + public function testHas() + { + $bag = new ParameterBag(array('foo' => 'bar')); + $this->assertTrue($bag->has('foo'), '->has() returns true if a parameter is defined'); + $this->assertTrue($bag->has('Foo'), '->has() converts the key to lowercase'); + $this->assertFalse($bag->has('bar'), '->has() returns false if a parameter is not defined'); + } + + public function testResolveValue() + { + $bag = new ParameterBag(array()); + $this->assertEquals('foo', $bag->resolveValue('foo'), '->resolveValue() returns its argument unmodified if no placeholders are found'); + + $bag = new ParameterBag(array('foo' => 'bar')); + $this->assertEquals('I\'m a bar', $bag->resolveValue('I\'m a %foo%'), '->resolveValue() replaces placeholders by their values'); + $this->assertEquals(array('bar' => 'bar'), $bag->resolveValue(array('%foo%' => '%foo%')), '->resolveValue() replaces placeholders in keys and values of arrays'); + $this->assertEquals(array('bar' => array('bar' => array('bar' => 'bar'))), $bag->resolveValue(array('%foo%' => array('%foo%' => array('%foo%' => '%foo%')))), '->resolveValue() replaces placeholders in nested arrays'); + $this->assertEquals('I\'m a %%foo%%', $bag->resolveValue('I\'m a %%foo%%'), '->resolveValue() supports % escaping by doubling it'); + $this->assertEquals('I\'m a bar %%foo bar', $bag->resolveValue('I\'m a %foo% %%foo %foo%'), '->resolveValue() supports % escaping by doubling it'); + $this->assertEquals(array('foo' => array('bar' => array('ding' => 'I\'m a bar %%foo %%bar'))), $bag->resolveValue(array('foo' => array('bar' => array('ding' => 'I\'m a bar %%foo %%bar')))), '->resolveValue() supports % escaping by doubling it'); + + $bag = new ParameterBag(array('foo' => true)); + $this->assertTrue($bag->resolveValue('%foo%'), '->resolveValue() replaces arguments that are just a placeholder by their value without casting them to strings'); + $bag = new ParameterBag(array('foo' => null)); + $this->assertNull($bag->resolveValue('%foo%'), '->resolveValue() replaces arguments that are just a placeholder by their value without casting them to strings'); + + $bag = new ParameterBag(array('foo' => 'bar', 'baz' => '%%%foo% %foo%%% %%foo%% %%%foo%%%')); + $this->assertEquals('%%bar bar%% %%foo%% %%bar%%', $bag->resolveValue('%baz%'), '->resolveValue() replaces params placed besides escaped %'); + + $bag = new ParameterBag(array('baz' => '%%s?%%s')); + $this->assertEquals('%%s?%%s', $bag->resolveValue('%baz%'), '->resolveValue() is not replacing greedily'); + + $bag = new ParameterBag(array()); + try { + $bag->resolveValue('%foobar%'); + $this->fail('->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existent parameter'); + } catch (ParameterNotFoundException $e) { + $this->assertEquals('You have requested a non-existent parameter "foobar".', $e->getMessage(), '->resolveValue() throws a ParameterNotFoundException if a placeholder references a non-existent parameter'); + } + + try { + $bag->resolveValue('foo %foobar% bar'); + $this->fail('->resolveValue() throws a ParameterNotFoundException if a placeholder references a non-existent parameter'); + } catch (ParameterNotFoundException $e) { + $this->assertEquals('You have requested a non-existent parameter "foobar".', $e->getMessage(), '->resolveValue() throws a ParameterNotFoundException if a placeholder references a non-existent parameter'); + } + + $bag = new ParameterBag(array('foo' => 'a %bar%', 'bar' => array())); + try { + $bag->resolveValue('%foo%'); + $this->fail('->resolveValue() throws a RuntimeException when a parameter embeds another non-string parameter'); + } catch (RuntimeException $e) { + $this->assertEquals('A string value must be composed of strings and/or numbers, but found parameter "bar" of type array inside string value "a %bar%".', $e->getMessage(), '->resolveValue() throws a RuntimeException when a parameter embeds another non-string parameter'); + } + + $bag = new ParameterBag(array('foo' => '%bar%', 'bar' => '%foobar%', 'foobar' => '%foo%')); + try { + $bag->resolveValue('%foo%'); + $this->fail('->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference'); + } catch (ParameterCircularReferenceException $e) { + $this->assertEquals('Circular reference detected for parameter "foo" ("foo" > "bar" > "foobar" > "foo").', $e->getMessage(), '->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference'); + } + + $bag = new ParameterBag(array('foo' => 'a %bar%', 'bar' => 'a %foobar%', 'foobar' => 'a %foo%')); + try { + $bag->resolveValue('%foo%'); + $this->fail('->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference'); + } catch (ParameterCircularReferenceException $e) { + $this->assertEquals('Circular reference detected for parameter "foo" ("foo" > "bar" > "foobar" > "foo").', $e->getMessage(), '->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference'); + } + + $bag = new ParameterBag(array('host' => 'foo.bar', 'port' => 1337)); + $this->assertEquals('foo.bar:1337', $bag->resolveValue('%host%:%port%')); + } + + public function testResolveIndicatesWhyAParameterIsNeeded() + { + $bag = new ParameterBag(array('foo' => '%bar%')); + + try { + $bag->resolve(); + } catch (ParameterNotFoundException $e) { + $this->assertEquals('The parameter "foo" has a dependency on a non-existent parameter "bar".', $e->getMessage()); + } + + $bag = new ParameterBag(array('foo' => '%bar%')); + + try { + $bag->resolve(); + } catch (ParameterNotFoundException $e) { + $this->assertEquals('The parameter "foo" has a dependency on a non-existent parameter "bar".', $e->getMessage()); + } + } + + public function testResolveUnescapesValue() + { + $bag = new ParameterBag(array( + 'foo' => array('bar' => array('ding' => 'I\'m a bar %%foo %%bar')), + 'bar' => 'I\'m a %%foo%%', + )); + + $bag->resolve(); + + $this->assertEquals('I\'m a %foo%', $bag->get('bar'), '->resolveValue() supports % escaping by doubling it'); + $this->assertEquals(array('bar' => array('ding' => 'I\'m a bar %foo %bar')), $bag->get('foo'), '->resolveValue() supports % escaping by doubling it'); + } + + public function testEscapeValue() + { + $bag = new ParameterBag(); + + $bag->add(array( + 'foo' => $bag->escapeValue(array('bar' => array('ding' => 'I\'m a bar %foo %bar', 'zero' => null))), + 'bar' => $bag->escapeValue('I\'m a %foo%'), + )); + + $this->assertEquals('I\'m a %%foo%%', $bag->get('bar'), '->escapeValue() escapes % by doubling it'); + $this->assertEquals(array('bar' => array('ding' => 'I\'m a bar %%foo %%bar', 'zero' => null)), $bag->get('foo'), '->escapeValue() escapes % by doubling it'); + } + + /** + * @dataProvider stringsWithSpacesProvider + */ + public function testResolveStringWithSpacesReturnsString($expected, $test, $description) + { + $bag = new ParameterBag(array('foo' => 'bar')); + + try { + $this->assertEquals($expected, $bag->resolveString($test), $description); + } catch (ParameterNotFoundException $e) { + $this->fail(sprintf('%s - "%s"', $description, $expected)); + } + } + + public function stringsWithSpacesProvider() + { + return array( + array('bar', '%foo%', 'Parameters must be wrapped by %.'), + array('% foo %', '% foo %', 'Parameters should not have spaces.'), + array('{% set my_template = "foo" %}', '{% set my_template = "foo" %}', 'Twig-like strings are not parameters.'), + array('50% is less than 100%', '50% is less than 100%', 'Text between % signs is allowed, if there are spaces.'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..975e5582c22fe8bc7ca1477491fcb004da40f0cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ParameterTest.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Parameter; + +class ParameterTest extends TestCase +{ + public function testConstructor() + { + $ref = new Parameter('foo'); + $this->assertEquals('foo', (string) $ref, '__construct() sets the id of the parameter, which is used for the __toString() method'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ReferenceTest.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ReferenceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ec0803fa3b8b27026e4724f5283af8692df5ea39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ReferenceTest.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\DependencyInjection\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Reference; + +class ReferenceTest extends TestCase +{ + public function testConstructor() + { + $ref = new Reference('foo'); + $this->assertEquals('foo', (string) $ref, '__construct() sets the id of the reference, which is used for the __toString() method'); + } + + public function testCaseInsensitive() + { + $ref = new Reference('FooBar'); + $this->assertEquals('foobar', (string) $ref, 'the id is lowercased as the container is case insensitive'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Variable.php b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Variable.php new file mode 100644 index 0000000000000000000000000000000000000000..ddd43743826f600eda618707ef09802cf670dce3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Variable.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection; + +/** + * Represents a variable. + * + * $var = new Variable('a'); + * + * will be dumped as + * + * $a + * + * by the PHP dumper. + * + * @author Johannes M. Schmitt + */ +class Variable +{ + private $name; + + /** + * @param string $name + */ + public function __construct($name) + { + $this->name = $name; + } + + /** + * Converts the object to a string. + * + * @return string + */ + public function __toString() + { + return $this->name; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/composer.json b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..0f3ae8def8d367b3870233de90c5f563ebb422b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/composer.json @@ -0,0 +1,47 @@ +{ + "name": "symfony/dependency-injection", + "type": "library", + "description": "Symfony DependencyInjection Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/yaml": "~3.2", + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0" + }, + "suggest": { + "symfony/yaml": "", + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them" + }, + "conflict": { + "symfony/yaml": "<3.2" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\DependencyInjection\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..86252d0456ba9aace41180276b4bf675a48329bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/AbstractUriElement.php b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/AbstractUriElement.php new file mode 100644 index 0000000000000000000000000000000000000000..d602d6f3316bfb46d3b994382f86fe93c93d458e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/AbstractUriElement.php @@ -0,0 +1,212 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DomCrawler; + +/** + * Any HTML element that can link to an URI. + * + * @author Fabien Potencier + */ +abstract class AbstractUriElement +{ + /** + * @var \DOMElement + */ + protected $node; + + /** + * @var string The method to use for the element + */ + protected $method; + + /** + * @var string The URI of the page where the element is embedded (or the base href) + */ + protected $currentUri; + + /** + * @param \DOMElement $node A \DOMElement instance + * @param string $currentUri The URI of the page where the link is embedded (or the base href) + * @param string $method The method to use for the link (get by default) + * + * @throws \InvalidArgumentException if the node is not a link + */ + public function __construct(\DOMElement $node, $currentUri, $method = 'GET') + { + if (!in_array(strtolower(substr($currentUri, 0, 4)), array('http', 'file'))) { + throw new \InvalidArgumentException(sprintf('Current URI must be an absolute URL ("%s").', $currentUri)); + } + + $this->setNode($node); + $this->method = $method ? strtoupper($method) : null; + $this->currentUri = $currentUri; + } + + /** + * Gets the node associated with this link. + * + * @return \DOMElement A \DOMElement instance + */ + public function getNode() + { + return $this->node; + } + + /** + * Gets the method associated with this link. + * + * @return string The method + */ + public function getMethod() + { + return $this->method; + } + + /** + * Gets the URI associated with this link. + * + * @return string The URI + */ + public function getUri() + { + $uri = trim($this->getRawUri()); + + // absolute URL? + if (null !== parse_url($uri, PHP_URL_SCHEME)) { + return $uri; + } + + // empty URI + if (!$uri) { + return $this->currentUri; + } + + // an anchor + if ('#' === $uri[0]) { + return $this->cleanupAnchor($this->currentUri).$uri; + } + + $baseUri = $this->cleanupUri($this->currentUri); + + if ('?' === $uri[0]) { + return $baseUri.$uri; + } + + // absolute URL with relative schema + if (0 === strpos($uri, '//')) { + return preg_replace('#^([^/]*)//.*$#', '$1', $baseUri).$uri; + } + + $baseUri = preg_replace('#^(.*?//[^/]*)(?:\/.*)?$#', '$1', $baseUri); + + // absolute path + if ('/' === $uri[0]) { + return $baseUri.$uri; + } + + // relative path + $path = parse_url(substr($this->currentUri, strlen($baseUri)), PHP_URL_PATH); + $path = $this->canonicalizePath(substr($path, 0, strrpos($path, '/')).'/'.$uri); + + return $baseUri.('' === $path || '/' !== $path[0] ? '/' : '').$path; + } + + /** + * Returns raw URI data. + * + * @return string + */ + abstract protected function getRawUri(); + + /** + * Returns the canonicalized URI path (see RFC 3986, section 5.2.4). + * + * @param string $path URI path + * + * @return string + */ + protected function canonicalizePath($path) + { + if ('' === $path || '/' === $path) { + return $path; + } + + if ('.' === substr($path, -1)) { + $path .= '/'; + } + + $output = array(); + + foreach (explode('/', $path) as $segment) { + if ('..' === $segment) { + array_pop($output); + } elseif ('.' !== $segment) { + $output[] = $segment; + } + } + + return implode('/', $output); + } + + /** + * Sets current \DOMElement instance. + * + * @param \DOMElement $node A \DOMElement instance + * + * @throws \LogicException If given node is not an anchor + */ + abstract protected function setNode(\DOMElement $node); + + /** + * Removes the query string and the anchor from the given uri. + * + * @param string $uri The uri to clean + * + * @return string + */ + private function cleanupUri($uri) + { + return $this->cleanupQuery($this->cleanupAnchor($uri)); + } + + /** + * Remove the query string from the uri. + * + * @param string $uri + * + * @return string + */ + private function cleanupQuery($uri) + { + if (false !== $pos = strpos($uri, '?')) { + return substr($uri, 0, $pos); + } + + return $uri; + } + + /** + * Remove the anchor from the uri. + * + * @param string $uri + * + * @return string + */ + private function cleanupAnchor($uri) + { + if (false !== $pos = strpos($uri, '#')) { + return substr($uri, 0, $pos); + } + + return $uri; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..e65176f5ac0b4d040beb8f0c3275fa685b310a6d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/CHANGELOG.md @@ -0,0 +1,53 @@ +CHANGELOG +========= + +3.1.0 +----- + +* All the URI parsing logic have been abstracted in the `AbstractUriElement` class. + The `Link` class is now a child of `AbstractUriElement`. +* Added an `Image` class to crawl images and parse their `src` attribute, + and `selectImage`, `image`, `images` methods in the `Crawler` (the image version of the equivalent `link` methods). + +2.5.0 +----- + +* [BC BREAK] The default value for checkbox and radio inputs without a value attribute have changed + from '1' to 'on' to match the HTML specification. +* [BC BREAK] The typehints on the `Link`, `Form` and `FormField` classes have been changed from + `\DOMNode` to `DOMElement`. Using any other type of `DOMNode` was triggering fatal errors in previous + versions. Code extending these classes will need to update the typehints when overwriting these methods. + +2.4.0 +----- + + * `Crawler::addXmlContent()` removes the default document namespace again if it's an only namespace. + * added support for automatic discovery and explicit registration of document + namespaces for `Crawler::filterXPath()` and `Crawler::filter()` + * improved content type guessing in `Crawler::addContent()` + * [BC BREAK] `Crawler::addXmlContent()` no longer removes the default document + namespace + +2.3.0 +----- + + * added Crawler::html() + * [BC BREAK] Crawler::each() and Crawler::reduce() now return Crawler instances instead of DomElement instances + * added schema relative URL support to links + * added support for HTML5 'form' attribute + +2.2.0 +----- + + * added a way to set raw path to the file in FileFormField - necessary for + simulating HTTP requests + +2.1.0 +----- + + * added support for the HTTP PATCH method + * refactored the Form class internals to support multi-dimensional fields + (the public API is backward compatible) + * added a way to get parsing errors for Crawler::addHtmlContent() and + Crawler::addXmlContent() via libxml functions + * added support for submitting a form without a submit button diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Crawler.php b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Crawler.php new file mode 100644 index 0000000000000000000000000000000000000000..d6dbe1e7a9768f700cc035096437372c0201b24e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Crawler.php @@ -0,0 +1,1174 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DomCrawler; + +use Symfony\Component\CssSelector\CssSelectorConverter; + +/** + * Crawler eases navigation of a list of \DOMNode objects. + * + * @author Fabien Potencier + */ +class Crawler implements \Countable, \IteratorAggregate +{ + /** + * @var string The current URI + */ + protected $uri; + + /** + * @var string The default namespace prefix to be used with XPath and CSS expressions + */ + private $defaultNamespacePrefix = 'default'; + + /** + * @var array A map of manually registered namespaces + */ + private $namespaces = array(); + + /** + * @var string The base href value + */ + private $baseHref; + + /** + * @var \DOMDocument|null + */ + private $document; + + /** + * @var \DOMElement[] + */ + private $nodes = array(); + + /** + * Whether the Crawler contains HTML or XML content (used when converting CSS to XPath). + * + * @var bool + */ + private $isHtml = true; + + /** + * @param mixed $node A Node to use as the base for the crawling + * @param string $currentUri The current URI + * @param string $baseHref The base href value + */ + public function __construct($node = null, $currentUri = null, $baseHref = null) + { + $this->uri = $currentUri; + $this->baseHref = $baseHref ?: $currentUri; + + $this->add($node); + } + + /** + * Returns the current URI. + * + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Returns base href. + * + * @return string + */ + public function getBaseHref() + { + return $this->baseHref; + } + + /** + * Removes all the nodes. + */ + public function clear() + { + $this->nodes = array(); + $this->document = null; + } + + /** + * Adds a node to the current list of nodes. + * + * This method uses the appropriate specialized add*() method based + * on the type of the argument. + * + * @param \DOMNodeList|\DOMNode|array|string|null $node A node + * + * @throws \InvalidArgumentException When node is not the expected type. + */ + public function add($node) + { + if ($node instanceof \DOMNodeList) { + $this->addNodeList($node); + } elseif ($node instanceof \DOMNode) { + $this->addNode($node); + } elseif (is_array($node)) { + $this->addNodes($node); + } elseif (is_string($node)) { + $this->addContent($node); + } elseif (null !== $node) { + throw new \InvalidArgumentException(sprintf('Expecting a DOMNodeList or DOMNode instance, an array, a string, or null, but got "%s".', is_object($node) ? get_class($node) : gettype($node))); + } + } + + /** + * Adds HTML/XML content. + * + * If the charset is not set via the content type, it is assumed + * to be ISO-8859-1, which is the default charset defined by the + * HTTP 1.1 specification. + * + * @param string $content A string to parse as HTML/XML + * @param null|string $type The content type of the string + */ + public function addContent($content, $type = null) + { + if (empty($type)) { + $type = 0 === strpos($content, ']+charset *= *["\']?([a-zA-Z\-0-9_:.]+)/i', $content, $matches)) { + $charset = $matches[1]; + } + + if (null === $charset) { + $charset = 'ISO-8859-1'; + } + + if ('x' === $xmlMatches[1]) { + $this->addXmlContent($content, $charset); + } else { + $this->addHtmlContent($content, $charset); + } + } + + /** + * Adds an HTML content to the list of nodes. + * + * The libxml errors are disabled when the content is parsed. + * + * If you want to get parsing errors, be sure to enable + * internal errors via libxml_use_internal_errors(true) + * and then, get the errors via libxml_get_errors(). Be + * sure to clear errors with libxml_clear_errors() afterward. + * + * @param string $content The HTML content + * @param string $charset The charset + */ + public function addHtmlContent($content, $charset = 'UTF-8') + { + $internalErrors = libxml_use_internal_errors(true); + $disableEntities = libxml_disable_entity_loader(true); + + $dom = new \DOMDocument('1.0', $charset); + $dom->validateOnParse = true; + + set_error_handler(function () { throw new \Exception(); }); + + try { + // Convert charset to HTML-entities to work around bugs in DOMDocument::loadHTML() + $content = mb_convert_encoding($content, 'HTML-ENTITIES', $charset); + } catch (\Exception $e) { + } + + restore_error_handler(); + + if ('' !== trim($content)) { + @$dom->loadHTML($content); + } + + libxml_use_internal_errors($internalErrors); + libxml_disable_entity_loader($disableEntities); + + $this->addDocument($dom); + + $base = $this->filterRelativeXPath('descendant-or-self::base')->extract(array('href')); + + $baseHref = current($base); + if (count($base) && !empty($baseHref)) { + if ($this->baseHref) { + $linkNode = $dom->createElement('a'); + $linkNode->setAttribute('href', $baseHref); + $link = new Link($linkNode, $this->baseHref); + $this->baseHref = $link->getUri(); + } else { + $this->baseHref = $baseHref; + } + } + } + + /** + * Adds an XML content to the list of nodes. + * + * The libxml errors are disabled when the content is parsed. + * + * If you want to get parsing errors, be sure to enable + * internal errors via libxml_use_internal_errors(true) + * and then, get the errors via libxml_get_errors(). Be + * sure to clear errors with libxml_clear_errors() afterward. + * + * @param string $content The XML content + * @param string $charset The charset + * @param int $options Bitwise OR of the libxml option constants + * LIBXML_PARSEHUGE is dangerous, see + * http://symfony.com/blog/security-release-symfony-2-0-17-released + */ + public function addXmlContent($content, $charset = 'UTF-8', $options = LIBXML_NONET) + { + // remove the default namespace if it's the only namespace to make XPath expressions simpler + if (!preg_match('/xmlns:/', $content)) { + $content = str_replace('xmlns', 'ns', $content); + } + + $internalErrors = libxml_use_internal_errors(true); + $disableEntities = libxml_disable_entity_loader(true); + + $dom = new \DOMDocument('1.0', $charset); + $dom->validateOnParse = true; + + if ('' !== trim($content)) { + @$dom->loadXML($content, $options); + } + + libxml_use_internal_errors($internalErrors); + libxml_disable_entity_loader($disableEntities); + + $this->addDocument($dom); + + $this->isHtml = false; + } + + /** + * Adds a \DOMDocument to the list of nodes. + * + * @param \DOMDocument $dom A \DOMDocument instance + */ + public function addDocument(\DOMDocument $dom) + { + if ($dom->documentElement) { + $this->addNode($dom->documentElement); + } + } + + /** + * Adds a \DOMNodeList to the list of nodes. + * + * @param \DOMNodeList $nodes A \DOMNodeList instance + */ + public function addNodeList(\DOMNodeList $nodes) + { + foreach ($nodes as $node) { + if ($node instanceof \DOMNode) { + $this->addNode($node); + } + } + } + + /** + * Adds an array of \DOMNode instances to the list of nodes. + * + * @param \DOMNode[] $nodes An array of \DOMNode instances + */ + public function addNodes(array $nodes) + { + foreach ($nodes as $node) { + $this->add($node); + } + } + + /** + * Adds a \DOMNode instance to the list of nodes. + * + * @param \DOMNode $node A \DOMNode instance + */ + public function addNode(\DOMNode $node) + { + if ($node instanceof \DOMDocument) { + $node = $node->documentElement; + } + + if (null !== $this->document && $this->document !== $node->ownerDocument) { + throw new \InvalidArgumentException('Attaching DOM nodes from multiple documents in the same crawler is forbidden.'); + } + + if (null === $this->document) { + $this->document = $node->ownerDocument; + } + + // Don't add duplicate nodes in the Crawler + if (in_array($node, $this->nodes, true)) { + return; + } + + $this->nodes[] = $node; + } + + /** + * Returns a node given its position in the node list. + * + * @param int $position The position + * + * @return self + */ + public function eq($position) + { + if (isset($this->nodes[$position])) { + return $this->createSubCrawler($this->nodes[$position]); + } + + return $this->createSubCrawler(null); + } + + /** + * Calls an anonymous function on each node of the list. + * + * The anonymous function receives the position and the node wrapped + * in a Crawler instance as arguments. + * + * Example: + * + * $crawler->filter('h1')->each(function ($node, $i) { + * return $node->text(); + * }); + * + * @param \Closure $closure An anonymous function + * + * @return array An array of values returned by the anonymous function + */ + public function each(\Closure $closure) + { + $data = array(); + foreach ($this->nodes as $i => $node) { + $data[] = $closure($this->createSubCrawler($node), $i); + } + + return $data; + } + + /** + * Slices the list of nodes by $offset and $length. + * + * @param int $offset + * @param int $length + * + * @return self + */ + public function slice($offset = 0, $length = null) + { + return $this->createSubCrawler(array_slice($this->nodes, $offset, $length)); + } + + /** + * Reduces the list of nodes by calling an anonymous function. + * + * To remove a node from the list, the anonymous function must return false. + * + * @param \Closure $closure An anonymous function + * + * @return self + */ + public function reduce(\Closure $closure) + { + $nodes = array(); + foreach ($this->nodes as $i => $node) { + if (false !== $closure($this->createSubCrawler($node), $i)) { + $nodes[] = $node; + } + } + + return $this->createSubCrawler($nodes); + } + + /** + * Returns the first node of the current selection. + * + * @return self + */ + public function first() + { + return $this->eq(0); + } + + /** + * Returns the last node of the current selection. + * + * @return self + */ + public function last() + { + return $this->eq(count($this->nodes) - 1); + } + + /** + * Returns the siblings nodes of the current selection. + * + * @return self + * + * @throws \InvalidArgumentException When current node is empty + */ + public function siblings() + { + if (!$this->nodes) { + throw new \InvalidArgumentException('The current node list is empty.'); + } + + return $this->createSubCrawler($this->sibling($this->getNode(0)->parentNode->firstChild)); + } + + /** + * Returns the next siblings nodes of the current selection. + * + * @return self + * + * @throws \InvalidArgumentException When current node is empty + */ + public function nextAll() + { + if (!$this->nodes) { + throw new \InvalidArgumentException('The current node list is empty.'); + } + + return $this->createSubCrawler($this->sibling($this->getNode(0))); + } + + /** + * Returns the previous sibling nodes of the current selection. + * + * @return self + * + * @throws \InvalidArgumentException + */ + public function previousAll() + { + if (!$this->nodes) { + throw new \InvalidArgumentException('The current node list is empty.'); + } + + return $this->createSubCrawler($this->sibling($this->getNode(0), 'previousSibling')); + } + + /** + * Returns the parents nodes of the current selection. + * + * @return self + * + * @throws \InvalidArgumentException When current node is empty + */ + public function parents() + { + if (!$this->nodes) { + throw new \InvalidArgumentException('The current node list is empty.'); + } + + $node = $this->getNode(0); + $nodes = array(); + + while ($node = $node->parentNode) { + if (XML_ELEMENT_NODE === $node->nodeType) { + $nodes[] = $node; + } + } + + return $this->createSubCrawler($nodes); + } + + /** + * Returns the children nodes of the current selection. + * + * @return self + * + * @throws \InvalidArgumentException When current node is empty + */ + public function children() + { + if (!$this->nodes) { + throw new \InvalidArgumentException('The current node list is empty.'); + } + + $node = $this->getNode(0)->firstChild; + + return $this->createSubCrawler($node ? $this->sibling($node) : array()); + } + + /** + * Returns the attribute value of the first node of the list. + * + * @param string $attribute The attribute name + * + * @return string|null The attribute value or null if the attribute does not exist + * + * @throws \InvalidArgumentException When current node is empty + */ + public function attr($attribute) + { + if (!$this->nodes) { + throw new \InvalidArgumentException('The current node list is empty.'); + } + + $node = $this->getNode(0); + + return $node->hasAttribute($attribute) ? $node->getAttribute($attribute) : null; + } + + /** + * Returns the node name of the first node of the list. + * + * @return string The node name + * + * @throws \InvalidArgumentException When current node is empty + */ + public function nodeName() + { + if (!$this->nodes) { + throw new \InvalidArgumentException('The current node list is empty.'); + } + + return $this->getNode(0)->nodeName; + } + + /** + * Returns the node value of the first node of the list. + * + * @return string The node value + * + * @throws \InvalidArgumentException When current node is empty + */ + public function text() + { + if (!$this->nodes) { + throw new \InvalidArgumentException('The current node list is empty.'); + } + + return $this->getNode(0)->nodeValue; + } + + /** + * Returns the first node of the list as HTML. + * + * @return string The node html + * + * @throws \InvalidArgumentException When current node is empty + */ + public function html() + { + if (!$this->nodes) { + throw new \InvalidArgumentException('The current node list is empty.'); + } + + $html = ''; + foreach ($this->getNode(0)->childNodes as $child) { + $html .= $child->ownerDocument->saveHTML($child); + } + + return $html; + } + + /** + * Evaluates an XPath expression. + * + * Since an XPath expression might evaluate to either a simple type or a \DOMNodeList, + * this method will return either an array of simple types or a new Crawler instance. + * + * @param string $xpath An XPath expression + * + * @return array|Crawler An array of evaluation results or a new Crawler instance + */ + public function evaluate($xpath) + { + if (null === $this->document) { + throw new \LogicException('Cannot evaluate the expression on an uninitialized crawler.'); + } + + $data = array(); + $domxpath = $this->createDOMXPath($this->document, $this->findNamespacePrefixes($xpath)); + + foreach ($this->nodes as $node) { + $data[] = $domxpath->evaluate($xpath, $node); + } + + if (isset($data[0]) && $data[0] instanceof \DOMNodeList) { + return $this->createSubCrawler($data); + } + + return $data; + } + + /** + * Extracts information from the list of nodes. + * + * You can extract attributes or/and the node value (_text). + * + * Example: + * + * $crawler->filter('h1 a')->extract(array('_text', 'href')); + * + * @param array $attributes An array of attributes + * + * @return array An array of extracted values + */ + public function extract($attributes) + { + $attributes = (array) $attributes; + $count = count($attributes); + + $data = array(); + foreach ($this->nodes as $node) { + $elements = array(); + foreach ($attributes as $attribute) { + if ('_text' === $attribute) { + $elements[] = $node->nodeValue; + } else { + $elements[] = $node->getAttribute($attribute); + } + } + + $data[] = $count > 1 ? $elements : $elements[0]; + } + + return $data; + } + + /** + * Filters the list of nodes with an XPath expression. + * + * The XPath expression is evaluated in the context of the crawler, which + * is considered as a fake parent of the elements inside it. + * This means that a child selector "div" or "./div" will match only + * the div elements of the current crawler, not their children. + * + * @param string $xpath An XPath expression + * + * @return self + */ + public function filterXPath($xpath) + { + $xpath = $this->relativize($xpath); + + // If we dropped all expressions in the XPath while preparing it, there would be no match + if ('' === $xpath) { + return $this->createSubCrawler(null); + } + + return $this->filterRelativeXPath($xpath); + } + + /** + * Filters the list of nodes with a CSS selector. + * + * This method only works if you have installed the CssSelector Symfony Component. + * + * @param string $selector A CSS selector + * + * @return self + * + * @throws \RuntimeException if the CssSelector Component is not available + */ + public function filter($selector) + { + if (!class_exists('Symfony\\Component\\CssSelector\\CssSelectorConverter')) { + throw new \RuntimeException('Unable to filter with a CSS selector as the Symfony CssSelector 2.8+ is not installed (you can use filterXPath instead).'); + } + + $converter = new CssSelectorConverter($this->isHtml); + + // The CssSelector already prefixes the selector with descendant-or-self:: + return $this->filterRelativeXPath($converter->toXPath($selector)); + } + + /** + * Selects links by name or alt value for clickable images. + * + * @param string $value The link text + * + * @return self + */ + public function selectLink($value) + { + $xpath = sprintf('descendant-or-self::a[contains(concat(\' \', normalize-space(string(.)), \' \'), %s) ', static::xpathLiteral(' '.$value.' ')). + sprintf('or ./img[contains(concat(\' \', normalize-space(string(@alt)), \' \'), %s)]]', static::xpathLiteral(' '.$value.' ')); + + return $this->filterRelativeXPath($xpath); + } + + /** + * Selects images by alt value. + * + * @param string $value The image alt + * + * @return self A new instance of Crawler with the filtered list of nodes + */ + public function selectImage($value) + { + $xpath = sprintf('descendant-or-self::img[contains(normalize-space(string(@alt)), %s)]', static::xpathLiteral($value)); + + return $this->filterRelativeXPath($xpath); + } + + /** + * Selects a button by name or alt value for images. + * + * @param string $value The button text + * + * @return self + */ + public function selectButton($value) + { + $translate = 'translate(@type, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")'; + $xpath = sprintf('descendant-or-self::input[((contains(%s, "submit") or contains(%s, "button")) and contains(concat(\' \', normalize-space(string(@value)), \' \'), %s)) ', $translate, $translate, static::xpathLiteral(' '.$value.' ')). + sprintf('or (contains(%s, "image") and contains(concat(\' \', normalize-space(string(@alt)), \' \'), %s)) or @id=%s or @name=%s] ', $translate, static::xpathLiteral(' '.$value.' '), static::xpathLiteral($value), static::xpathLiteral($value)). + sprintf('| descendant-or-self::button[contains(concat(\' \', normalize-space(string(.)), \' \'), %s) or @id=%s or @name=%s]', static::xpathLiteral(' '.$value.' '), static::xpathLiteral($value), static::xpathLiteral($value)); + + return $this->filterRelativeXPath($xpath); + } + + /** + * Returns a Link object for the first node in the list. + * + * @param string $method The method for the link (get by default) + * + * @return Link A Link instance + * + * @throws \InvalidArgumentException If the current node list is empty or the selected node is not instance of DOMElement + */ + public function link($method = 'get') + { + if (!$this->nodes) { + throw new \InvalidArgumentException('The current node list is empty.'); + } + + $node = $this->getNode(0); + + if (!$node instanceof \DOMElement) { + throw new \InvalidArgumentException(sprintf('The selected node should be instance of DOMElement, got "%s".', get_class($node))); + } + + return new Link($node, $this->baseHref, $method); + } + + /** + * Returns an array of Link objects for the nodes in the list. + * + * @return Link[] An array of Link instances + * + * @throws \InvalidArgumentException If the current node list contains non-DOMElement instances + */ + public function links() + { + $links = array(); + foreach ($this->nodes as $node) { + if (!$node instanceof \DOMElement) { + throw new \InvalidArgumentException(sprintf('The current node list should contain only DOMElement instances, "%s" found.', get_class($node))); + } + + $links[] = new Link($node, $this->baseHref, 'get'); + } + + return $links; + } + + /** + * Returns an Image object for the first node in the list. + * + * @return Image An Image instance + * + * @throws \InvalidArgumentException If the current node list is empty + */ + public function image() + { + if (!count($this)) { + throw new \InvalidArgumentException('The current node list is empty.'); + } + + $node = $this->getNode(0); + + if (!$node instanceof \DOMElement) { + throw new \InvalidArgumentException(sprintf('The selected node should be instance of DOMElement, got "%s".', get_class($node))); + } + + return new Image($node, $this->baseHref); + } + + /** + * Returns an array of Image objects for the nodes in the list. + * + * @return Image[] An array of Image instances + */ + public function images() + { + $images = array(); + foreach ($this as $node) { + if (!$node instanceof \DOMElement) { + throw new \InvalidArgumentException(sprintf('The current node list should contain only DOMElement instances, "%s" found.', get_class($node))); + } + + $images[] = new Image($node, $this->baseHref); + } + + return $images; + } + + /** + * Returns a Form object for the first node in the list. + * + * @param array $values An array of values for the form fields + * @param string $method The method for the form + * + * @return Form A Form instance + * + * @throws \InvalidArgumentException If the current node list is empty or the selected node is not instance of DOMElement + */ + public function form(array $values = null, $method = null) + { + if (!$this->nodes) { + throw new \InvalidArgumentException('The current node list is empty.'); + } + + $node = $this->getNode(0); + + if (!$node instanceof \DOMElement) { + throw new \InvalidArgumentException(sprintf('The selected node should be instance of DOMElement, got "%s".', get_class($node))); + } + + $form = new Form($node, $this->uri, $method, $this->baseHref); + + if (null !== $values) { + $form->setValues($values); + } + + return $form; + } + + /** + * Overloads a default namespace prefix to be used with XPath and CSS expressions. + * + * @param string $prefix + */ + public function setDefaultNamespacePrefix($prefix) + { + $this->defaultNamespacePrefix = $prefix; + } + + /** + * @param string $prefix + * @param string $namespace + */ + public function registerNamespace($prefix, $namespace) + { + $this->namespaces[$prefix] = $namespace; + } + + /** + * Converts string for XPath expressions. + * + * Escaped characters are: quotes (") and apostrophe ('). + * + * Examples: + * + * echo Crawler::xpathLiteral('foo " bar'); + * //prints 'foo " bar' + * + * echo Crawler::xpathLiteral("foo ' bar"); + * //prints "foo ' bar" + * + * echo Crawler::xpathLiteral('a\'b"c'); + * //prints concat('a', "'", 'b"c') + * + * + * @param string $s String to be escaped + * + * @return string Converted string + */ + public static function xpathLiteral($s) + { + if (false === strpos($s, "'")) { + return sprintf("'%s'", $s); + } + + if (false === strpos($s, '"')) { + return sprintf('"%s"', $s); + } + + $string = $s; + $parts = array(); + while (true) { + if (false !== $pos = strpos($string, "'")) { + $parts[] = sprintf("'%s'", substr($string, 0, $pos)); + $parts[] = "\"'\""; + $string = substr($string, $pos + 1); + } else { + $parts[] = "'$string'"; + break; + } + } + + return sprintf('concat(%s)', implode(', ', $parts)); + } + + /** + * Filters the list of nodes with an XPath expression. + * + * The XPath expression should already be processed to apply it in the context of each node. + * + * @param string $xpath + * + * @return self + */ + private function filterRelativeXPath($xpath) + { + $prefixes = $this->findNamespacePrefixes($xpath); + + $crawler = $this->createSubCrawler(null); + + foreach ($this->nodes as $node) { + $domxpath = $this->createDOMXPath($node->ownerDocument, $prefixes); + $crawler->add($domxpath->query($xpath, $node)); + } + + return $crawler; + } + + /** + * Make the XPath relative to the current context. + * + * The returned XPath will match elements matching the XPath inside the current crawler + * when running in the context of a node of the crawler. + * + * @param string $xpath + * + * @return string + */ + private function relativize($xpath) + { + $expressions = array(); + + // An expression which will never match to replace expressions which cannot match in the crawler + // We cannot simply drop + $nonMatchingExpression = 'a[name() = "b"]'; + + $xpathLen = strlen($xpath); + $openedBrackets = 0; + $startPosition = strspn($xpath, " \t\n\r\0\x0B"); + + for ($i = $startPosition; $i <= $xpathLen; ++$i) { + $i += strcspn($xpath, '"\'[]|', $i); + + if ($i < $xpathLen) { + switch ($xpath[$i]) { + case '"': + case "'": + if (false === $i = strpos($xpath, $xpath[$i], $i + 1)) { + return $xpath; // The XPath expression is invalid + } + continue 2; + case '[': + ++$openedBrackets; + continue 2; + case ']': + --$openedBrackets; + continue 2; + } + } + if ($openedBrackets) { + continue; + } + + if ($startPosition < $xpathLen && '(' === $xpath[$startPosition]) { + // If the union is inside some braces, we need to preserve the opening braces and apply + // the change only inside it. + $j = 1 + strspn($xpath, "( \t\n\r\0\x0B", $startPosition + 1); + $parenthesis = substr($xpath, $startPosition, $j); + $startPosition += $j; + } else { + $parenthesis = ''; + } + $expression = rtrim(substr($xpath, $startPosition, $i - $startPosition)); + + if (0 === strpos($expression, 'self::*/')) { + $expression = './'.substr($expression, 8); + } + + // add prefix before absolute element selector + if ('' === $expression) { + $expression = $nonMatchingExpression; + } elseif (0 === strpos($expression, '//')) { + $expression = 'descendant-or-self::'.substr($expression, 2); + } elseif (0 === strpos($expression, './/')) { + $expression = 'descendant-or-self::'.substr($expression, 3); + } elseif (0 === strpos($expression, './')) { + $expression = 'self::'.substr($expression, 2); + } elseif (0 === strpos($expression, 'child::')) { + $expression = 'self::'.substr($expression, 7); + } elseif ('/' === $expression[0] || '.' === $expression[0] || 0 === strpos($expression, 'self::')) { + $expression = $nonMatchingExpression; + } elseif (0 === strpos($expression, 'descendant::')) { + $expression = 'descendant-or-self::'.substr($expression, 12); + } elseif (preg_match('/^(ancestor|ancestor-or-self|attribute|following|following-sibling|namespace|parent|preceding|preceding-sibling)::/', $expression)) { + // the fake root has no parent, preceding or following nodes and also no attributes (even no namespace attributes) + $expression = $nonMatchingExpression; + } elseif (0 !== strpos($expression, 'descendant-or-self::')) { + $expression = 'self::'.$expression; + } + $expressions[] = $parenthesis.$expression; + + if ($i === $xpathLen) { + return implode(' | ', $expressions); + } + + $i += strspn($xpath, " \t\n\r\0\x0B", $i + 1); + $startPosition = $i + 1; + } + + return $xpath; // The XPath expression is invalid + } + + /** + * @param int $position + * + * @return \DOMElement|null + */ + public function getNode($position) + { + if (isset($this->nodes[$position])) { + return $this->nodes[$position]; + } + } + + /** + * @return int + */ + public function count() + { + return count($this->nodes); + } + + /** + * @return \ArrayIterator + */ + public function getIterator() + { + return new \ArrayIterator($this->nodes); + } + + /** + * @param \DOMElement $node + * @param string $siblingDir + * + * @return array + */ + protected function sibling($node, $siblingDir = 'nextSibling') + { + $nodes = array(); + + do { + if ($node !== $this->getNode(0) && $node->nodeType === 1) { + $nodes[] = $node; + } + } while ($node = $node->$siblingDir); + + return $nodes; + } + + /** + * @param \DOMDocument $document + * @param array $prefixes + * + * @return \DOMXPath + * + * @throws \InvalidArgumentException + */ + private function createDOMXPath(\DOMDocument $document, array $prefixes = array()) + { + $domxpath = new \DOMXPath($document); + + foreach ($prefixes as $prefix) { + $namespace = $this->discoverNamespace($domxpath, $prefix); + if (null !== $namespace) { + $domxpath->registerNamespace($prefix, $namespace); + } + } + + return $domxpath; + } + + /** + * @param \DOMXPath $domxpath + * @param string $prefix + * + * @return string + * + * @throws \InvalidArgumentException + */ + private function discoverNamespace(\DOMXPath $domxpath, $prefix) + { + if (isset($this->namespaces[$prefix])) { + return $this->namespaces[$prefix]; + } + + // ask for one namespace, otherwise we'd get a collection with an item for each node + $namespaces = $domxpath->query(sprintf('(//namespace::*[name()="%s"])[last()]', $this->defaultNamespacePrefix === $prefix ? '' : $prefix)); + + if ($node = $namespaces->item(0)) { + return $node->nodeValue; + } + } + + /** + * @param string $xpath + * + * @return array + */ + private function findNamespacePrefixes($xpath) + { + if (preg_match_all('/(?P[a-z_][a-z_0-9\-\.]*+):[^"\/:]/i', $xpath, $matches)) { + return array_unique($matches['prefix']); + } + + return array(); + } + + /** + * Creates a crawler for some subnodes. + * + * @param \DOMElement|\DOMElement[]|\DOMNodeList|null $nodes + * + * @return static + */ + private function createSubCrawler($nodes) + { + $crawler = new static($nodes, $this->uri, $this->baseHref); + $crawler->isHtml = $this->isHtml; + $crawler->document = $this->document; + $crawler->namespaces = $this->namespaces; + + return $crawler; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php new file mode 100644 index 0000000000000000000000000000000000000000..c479daa75ee780983a3e1c5abf1d057c389782fb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php @@ -0,0 +1,324 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DomCrawler\Field; + +/** + * ChoiceFormField represents a choice form field. + * + * It is constructed from a HTML select tag, or a HTML checkbox, or radio inputs. + * + * @author Fabien Potencier + */ +class ChoiceFormField extends FormField +{ + /** + * @var string + */ + private $type; + /** + * @var bool + */ + private $multiple; + /** + * @var array + */ + private $options; + /** + * @var bool + */ + private $validationDisabled = false; + + /** + * Returns true if the field should be included in the submitted values. + * + * @return bool true if the field should be included in the submitted values, false otherwise + */ + public function hasValue() + { + // don't send a value for unchecked checkboxes + if (in_array($this->type, array('checkbox', 'radio')) && null === $this->value) { + return false; + } + + return true; + } + + /** + * Check if the current selected option is disabled. + * + * @return bool + */ + public function isDisabled() + { + if (parent::isDisabled() && 'select' === $this->type) { + return true; + } + + foreach ($this->options as $option) { + if ($option['value'] == $this->value && $option['disabled']) { + return true; + } + } + + return false; + } + + /** + * Sets the value of the field. + * + * @param string $value The value of the field + */ + public function select($value) + { + $this->setValue($value); + } + + /** + * Ticks a checkbox. + * + * @throws \LogicException When the type provided is not correct + */ + public function tick() + { + if ('checkbox' !== $this->type) { + throw new \LogicException(sprintf('You cannot tick "%s" as it is not a checkbox (%s).', $this->name, $this->type)); + } + + $this->setValue(true); + } + + /** + * Ticks a checkbox. + * + * @throws \LogicException When the type provided is not correct + */ + public function untick() + { + if ('checkbox' !== $this->type) { + throw new \LogicException(sprintf('You cannot tick "%s" as it is not a checkbox (%s).', $this->name, $this->type)); + } + + $this->setValue(false); + } + + /** + * Sets the value of the field. + * + * @param string $value The value of the field + * + * @throws \InvalidArgumentException When value type provided is not correct + */ + public function setValue($value) + { + if ('checkbox' === $this->type && false === $value) { + // uncheck + $this->value = null; + } elseif ('checkbox' === $this->type && true === $value) { + // check + $this->value = $this->options[0]['value']; + } else { + if (is_array($value)) { + if (!$this->multiple) { + throw new \InvalidArgumentException(sprintf('The value for "%s" cannot be an array.', $this->name)); + } + + foreach ($value as $v) { + if (!$this->containsOption($v, $this->options)) { + throw new \InvalidArgumentException(sprintf('Input "%s" cannot take "%s" as a value (possible values: %s).', $this->name, $v, implode(', ', $this->availableOptionValues()))); + } + } + } elseif (!$this->containsOption($value, $this->options)) { + throw new \InvalidArgumentException(sprintf('Input "%s" cannot take "%s" as a value (possible values: %s).', $this->name, $value, implode(', ', $this->availableOptionValues()))); + } + + if ($this->multiple) { + $value = (array) $value; + } + + if (is_array($value)) { + $this->value = $value; + } else { + parent::setValue($value); + } + } + } + + /** + * Adds a choice to the current ones. + * + * @param \DOMElement $node + * + * @throws \LogicException When choice provided is not multiple nor radio + * + * @internal + */ + public function addChoice(\DOMElement $node) + { + if (!$this->multiple && 'radio' !== $this->type) { + throw new \LogicException(sprintf('Unable to add a choice for "%s" as it is not multiple or is not a radio button.', $this->name)); + } + + $option = $this->buildOptionValue($node); + $this->options[] = $option; + + if ($node->hasAttribute('checked')) { + $this->value = $option['value']; + } + } + + /** + * Returns the type of the choice field (radio, select, or checkbox). + * + * @return string The type + */ + public function getType() + { + return $this->type; + } + + /** + * Returns true if the field accepts multiple values. + * + * @return bool true if the field accepts multiple values, false otherwise + */ + public function isMultiple() + { + return $this->multiple; + } + + /** + * Initializes the form field. + * + * @throws \LogicException When node type is incorrect + */ + protected function initialize() + { + if ('input' !== $this->node->nodeName && 'select' !== $this->node->nodeName) { + throw new \LogicException(sprintf('A ChoiceFormField can only be created from an input or select tag (%s given).', $this->node->nodeName)); + } + + if ('input' === $this->node->nodeName && 'checkbox' !== strtolower($this->node->getAttribute('type')) && 'radio' !== strtolower($this->node->getAttribute('type'))) { + throw new \LogicException(sprintf('A ChoiceFormField can only be created from an input tag with a type of checkbox or radio (given type is %s).', $this->node->getAttribute('type'))); + } + + $this->value = null; + $this->options = array(); + $this->multiple = false; + + if ('input' == $this->node->nodeName) { + $this->type = strtolower($this->node->getAttribute('type')); + $optionValue = $this->buildOptionValue($this->node); + $this->options[] = $optionValue; + + if ($this->node->hasAttribute('checked')) { + $this->value = $optionValue['value']; + } + } else { + $this->type = 'select'; + if ($this->node->hasAttribute('multiple')) { + $this->multiple = true; + $this->value = array(); + $this->name = str_replace('[]', '', $this->name); + } + + $found = false; + foreach ($this->xpath->query('descendant::option', $this->node) as $option) { + $optionValue = $this->buildOptionValue($option); + $this->options[] = $optionValue; + + if ($option->hasAttribute('selected')) { + $found = true; + if ($this->multiple) { + $this->value[] = $optionValue['value']; + } else { + $this->value = $optionValue['value']; + } + } + } + + // if no option is selected and if it is a simple select box, take the first option as the value + if (!$found && !$this->multiple && !empty($this->options)) { + $this->value = $this->options[0]['value']; + } + } + } + + /** + * Returns option value with associated disabled flag. + * + * @param \DOMElement $node + * + * @return array + */ + private function buildOptionValue(\DOMElement $node) + { + $option = array(); + + $defaultDefaultValue = 'select' === $this->node->nodeName ? '' : 'on'; + $defaultValue = (isset($node->nodeValue) && !empty($node->nodeValue)) ? $node->nodeValue : $defaultDefaultValue; + $option['value'] = $node->hasAttribute('value') ? $node->getAttribute('value') : $defaultValue; + $option['disabled'] = $node->hasAttribute('disabled'); + + return $option; + } + + /** + * Checks whether given value is in the existing options. + * + * @param string $optionValue + * @param array $options + * + * @return bool + */ + public function containsOption($optionValue, $options) + { + if ($this->validationDisabled) { + return true; + } + + foreach ($options as $option) { + if ($option['value'] == $optionValue) { + return true; + } + } + + return false; + } + + /** + * Returns list of available field options. + * + * @return array + */ + public function availableOptionValues() + { + $values = array(); + + foreach ($this->options as $option) { + $values[] = $option['value']; + } + + return $values; + } + + /** + * Disables the internal validation of the field. + * + * @return self + */ + public function disableValidation() + { + $this->validationDisabled = true; + + return $this; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/FileFormField.php b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/FileFormField.php new file mode 100644 index 0000000000000000000000000000000000000000..0e0f94347a5ee8b5737e991de32ec40ec4cc24e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/FileFormField.php @@ -0,0 +1,108 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DomCrawler\Field; + +/** + * FileFormField represents a file form field (an HTML file input tag). + * + * @author Fabien Potencier + */ +class FileFormField extends FormField +{ + /** + * Sets the PHP error code associated with the field. + * + * @param int $error The error code (one of UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_PARTIAL, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_CANT_WRITE, or UPLOAD_ERR_EXTENSION) + * + * @throws \InvalidArgumentException When error code doesn't exist + */ + public function setErrorCode($error) + { + $codes = array(UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_PARTIAL, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_CANT_WRITE, UPLOAD_ERR_EXTENSION); + if (!in_array($error, $codes)) { + throw new \InvalidArgumentException(sprintf('The error code %s is not valid.', $error)); + } + + $this->value = array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => $error, 'size' => 0); + } + + /** + * Sets the value of the field. + * + * @param string $value The value of the field + */ + public function upload($value) + { + $this->setValue($value); + } + + /** + * Sets the value of the field. + * + * @param string $value The value of the field + */ + public function setValue($value) + { + if (null !== $value && is_readable($value)) { + $error = UPLOAD_ERR_OK; + $size = filesize($value); + $info = pathinfo($value); + $name = $info['basename']; + + // copy to a tmp location + $tmp = sys_get_temp_dir().'/'.sha1(uniqid(mt_rand(), true)); + if (array_key_exists('extension', $info)) { + $tmp .= '.'.$info['extension']; + } + if (is_file($tmp)) { + unlink($tmp); + } + copy($value, $tmp); + $value = $tmp; + } else { + $error = UPLOAD_ERR_NO_FILE; + $size = 0; + $name = ''; + $value = ''; + } + + $this->value = array('name' => $name, 'type' => '', 'tmp_name' => $value, 'error' => $error, 'size' => $size); + } + + /** + * Sets path to the file as string for simulating HTTP request. + * + * @param string $path The path to the file + */ + public function setFilePath($path) + { + parent::setValue($path); + } + + /** + * Initializes the form field. + * + * @throws \LogicException When node type is incorrect + */ + protected function initialize() + { + if ('input' !== $this->node->nodeName) { + throw new \LogicException(sprintf('A FileFormField can only be created from an input tag (%s given).', $this->node->nodeName)); + } + + if ('file' !== strtolower($this->node->getAttribute('type'))) { + throw new \LogicException(sprintf('A FileFormField can only be created from an input tag with a type of file (given type is %s).', $this->node->getAttribute('type'))); + } + + $this->setValue(null); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/FormField.php b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/FormField.php new file mode 100644 index 0000000000000000000000000000000000000000..1fa3e1de5f50ee8786dbbe06e2100c05e00e6111 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/FormField.php @@ -0,0 +1,138 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DomCrawler\Field; + +/** + * FormField is the abstract class for all form fields. + * + * @author Fabien Potencier + */ +abstract class FormField +{ + /** + * @var \DOMElement + */ + protected $node; + /** + * @var string + */ + protected $name; + /** + * @var string + */ + protected $value; + /** + * @var \DOMDocument + */ + protected $document; + /** + * @var \DOMXPath + */ + protected $xpath; + /** + * @var bool + */ + protected $disabled; + + /** + * Constructor. + * + * @param \DOMElement $node The node associated with this field + */ + public function __construct(\DOMElement $node) + { + $this->node = $node; + $this->name = $node->getAttribute('name'); + $this->xpath = new \DOMXPath($node->ownerDocument); + + $this->initialize(); + } + + /** + * Returns the label tag associated to the field or null if none. + * + * @return \DOMElement|null + */ + public function getLabel() + { + $xpath = new \DOMXPath($this->node->ownerDocument); + + if ($this->node->hasAttribute('id')) { + $labels = $xpath->query(sprintf('descendant::label[@for="%s"]', $this->node->getAttribute('id'))); + if ($labels->length > 0) { + return $labels->item(0); + } + } + + $labels = $xpath->query('ancestor::label[1]', $this->node); + if ($labels->length > 0) { + return $labels->item(0); + } + + return; + } + + /** + * Returns the name of the field. + * + * @return string The name of the field + */ + public function getName() + { + return $this->name; + } + + /** + * Gets the value of the field. + * + * @return string|array The value of the field + */ + public function getValue() + { + return $this->value; + } + + /** + * Sets the value of the field. + * + * @param string $value The value of the field + */ + public function setValue($value) + { + $this->value = (string) $value; + } + + /** + * Returns true if the field should be included in the submitted values. + * + * @return bool true if the field should be included in the submitted values, false otherwise + */ + public function hasValue() + { + return true; + } + + /** + * Check if the current field is disabled. + * + * @return bool + */ + public function isDisabled() + { + return $this->node->hasAttribute('disabled'); + } + + /** + * Initializes the form field. + */ + abstract protected function initialize(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/InputFormField.php b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/InputFormField.php new file mode 100644 index 0000000000000000000000000000000000000000..090913efa36bd6f74e64fdbbc7a0cab89ea9ab60 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/InputFormField.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\Component\DomCrawler\Field; + +/** + * InputFormField represents an input form field (an HTML input tag). + * + * For inputs with type of file, checkbox, or radio, there are other more + * specialized classes (cf. FileFormField and ChoiceFormField). + * + * @author Fabien Potencier + */ +class InputFormField extends FormField +{ + /** + * Initializes the form field. + * + * @throws \LogicException When node type is incorrect + */ + protected function initialize() + { + if ('input' !== $this->node->nodeName && 'button' !== $this->node->nodeName) { + throw new \LogicException(sprintf('An InputFormField can only be created from an input or button tag (%s given).', $this->node->nodeName)); + } + + if ('checkbox' === strtolower($this->node->getAttribute('type'))) { + throw new \LogicException('Checkboxes should be instances of ChoiceFormField.'); + } + + if ('file' === strtolower($this->node->getAttribute('type'))) { + throw new \LogicException('File inputs should be instances of FileFormField.'); + } + + $this->value = $this->node->getAttribute('value'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/TextareaFormField.php b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/TextareaFormField.php new file mode 100644 index 0000000000000000000000000000000000000000..15526e1c259c6ff8f8ee3fa61fcda553cc99026d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Field/TextareaFormField.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DomCrawler\Field; + +/** + * TextareaFormField represents a textarea form field (an HTML textarea tag). + * + * @author Fabien Potencier + */ +class TextareaFormField extends FormField +{ + /** + * Initializes the form field. + * + * @throws \LogicException When node type is incorrect + */ + protected function initialize() + { + if ('textarea' !== $this->node->nodeName) { + throw new \LogicException(sprintf('A TextareaFormField can only be created from a textarea tag (%s given).', $this->node->nodeName)); + } + + $this->value = ''; + foreach ($this->node->childNodes as $node) { + $this->value .= $node->wholeText; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Form.php b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Form.php new file mode 100644 index 0000000000000000000000000000000000000000..bad1b34935d04d400975bfe85c359a371e86191f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Form.php @@ -0,0 +1,473 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DomCrawler; + +use Symfony\Component\DomCrawler\Field\ChoiceFormField; +use Symfony\Component\DomCrawler\Field\FormField; + +/** + * Form represents an HTML form. + * + * @author Fabien Potencier + */ +class Form extends Link implements \ArrayAccess +{ + /** + * @var \DOMElement + */ + private $button; + + /** + * @var FormFieldRegistry + */ + private $fields; + + /** + * @var string + */ + private $baseHref; + + /** + * Constructor. + * + * @param \DOMElement $node A \DOMElement instance + * @param string $currentUri The URI of the page where the form is embedded + * @param string $method The method to use for the link (if null, it defaults to the method defined by the form) + * @param string $baseHref The URI of the used for relative links, but not for empty action + * + * @throws \LogicException if the node is not a button inside a form tag + */ + public function __construct(\DOMElement $node, $currentUri, $method = null, $baseHref = null) + { + parent::__construct($node, $currentUri, $method); + $this->baseHref = $baseHref; + + $this->initialize(); + } + + /** + * Gets the form node associated with this form. + * + * @return \DOMElement A \DOMElement instance + */ + public function getFormNode() + { + return $this->node; + } + + /** + * Sets the value of the fields. + * + * @param array $values An array of field values + * + * @return $this + */ + public function setValues(array $values) + { + foreach ($values as $name => $value) { + $this->fields->set($name, $value); + } + + return $this; + } + + /** + * Gets the field values. + * + * The returned array does not include file fields (@see getFiles). + * + * @return array An array of field values + */ + public function getValues() + { + $values = array(); + foreach ($this->fields->all() as $name => $field) { + if ($field->isDisabled()) { + continue; + } + + if (!$field instanceof Field\FileFormField && $field->hasValue()) { + $values[$name] = $field->getValue(); + } + } + + return $values; + } + + /** + * Gets the file field values. + * + * @return array An array of file field values + */ + public function getFiles() + { + if (!in_array($this->getMethod(), array('POST', 'PUT', 'DELETE', 'PATCH'))) { + return array(); + } + + $files = array(); + + foreach ($this->fields->all() as $name => $field) { + if ($field->isDisabled()) { + continue; + } + + if ($field instanceof Field\FileFormField) { + $files[$name] = $field->getValue(); + } + } + + return $files; + } + + /** + * Gets the field values as PHP. + * + * This method converts fields with the array notation + * (like foo[bar] to arrays) like PHP does. + * + * @return array An array of field values + */ + public function getPhpValues() + { + $values = array(); + foreach ($this->getValues() as $name => $value) { + $qs = http_build_query(array($name => $value), '', '&'); + if (!empty($qs)) { + parse_str($qs, $expandedValue); + $varName = substr($name, 0, strlen(key($expandedValue))); + $values = array_replace_recursive($values, array($varName => current($expandedValue))); + } + } + + return $values; + } + + /** + * Gets the file field values as PHP. + * + * This method converts fields with the array notation + * (like foo[bar] to arrays) like PHP does. + * The returned array is consistent with the array for field values + * (@see getPhpValues), rather than uploaded files found in $_FILES. + * For a compound file field foo[bar] it will create foo[bar][name], + * instead of foo[name][bar] which would be found in $_FILES. + * + * @return array An array of file field values + */ + public function getPhpFiles() + { + $values = array(); + foreach ($this->getFiles() as $name => $value) { + $qs = http_build_query(array($name => $value), '', '&'); + if (!empty($qs)) { + parse_str($qs, $expandedValue); + $varName = substr($name, 0, strlen(key($expandedValue))); + $values = array_replace_recursive($values, array($varName => current($expandedValue))); + } + } + + return $values; + } + + /** + * Gets the URI of the form. + * + * The returned URI is not the same as the form "action" attribute. + * This method merges the value if the method is GET to mimics + * browser behavior. + * + * @return string The URI + */ + public function getUri() + { + $uri = parent::getUri(); + + if (!in_array($this->getMethod(), array('POST', 'PUT', 'DELETE', 'PATCH'))) { + $query = parse_url($uri, PHP_URL_QUERY); + $currentParameters = array(); + if ($query) { + parse_str($query, $currentParameters); + } + + $queryString = http_build_query(array_merge($currentParameters, $this->getValues()), null, '&'); + + $pos = strpos($uri, '?'); + $base = false === $pos ? $uri : substr($uri, 0, $pos); + $uri = rtrim($base.'?'.$queryString, '?'); + } + + return $uri; + } + + protected function getRawUri() + { + return $this->node->getAttribute('action'); + } + + /** + * Gets the form method. + * + * If no method is defined in the form, GET is returned. + * + * @return string The method + */ + public function getMethod() + { + if (null !== $this->method) { + return $this->method; + } + + return $this->node->getAttribute('method') ? strtoupper($this->node->getAttribute('method')) : 'GET'; + } + + /** + * Returns true if the named field exists. + * + * @param string $name The field name + * + * @return bool true if the field exists, false otherwise + */ + public function has($name) + { + return $this->fields->has($name); + } + + /** + * Removes a field from the form. + * + * @param string $name The field name + */ + public function remove($name) + { + $this->fields->remove($name); + } + + /** + * Gets a named field. + * + * @param string $name The field name + * + * @return FormField The field instance + * + * @throws \InvalidArgumentException When field is not present in this form + */ + public function get($name) + { + return $this->fields->get($name); + } + + /** + * Sets a named field. + * + * @param FormField $field The field + */ + public function set(FormField $field) + { + $this->fields->add($field); + } + + /** + * Gets all fields. + * + * @return FormField[] + */ + public function all() + { + return $this->fields->all(); + } + + /** + * Returns true if the named field exists. + * + * @param string $name The field name + * + * @return bool true if the field exists, false otherwise + */ + public function offsetExists($name) + { + return $this->has($name); + } + + /** + * Gets the value of a field. + * + * @param string $name The field name + * + * @return FormField The associated Field instance + * + * @throws \InvalidArgumentException if the field does not exist + */ + public function offsetGet($name) + { + return $this->fields->get($name); + } + + /** + * Sets the value of a field. + * + * @param string $name The field name + * @param string|array $value The value of the field + * + * @throws \InvalidArgumentException if the field does not exist + */ + public function offsetSet($name, $value) + { + $this->fields->set($name, $value); + } + + /** + * Removes a field from the form. + * + * @param string $name The field name + */ + public function offsetUnset($name) + { + $this->fields->remove($name); + } + + /** + * Disables validation. + * + * @return self + */ + public function disableValidation() + { + foreach ($this->fields->all() as $field) { + if ($field instanceof Field\ChoiceFormField) { + $field->disableValidation(); + } + } + + return $this; + } + + /** + * Sets the node for the form. + * + * Expects a 'submit' button \DOMElement and finds the corresponding form element, or the form element itself. + * + * @param \DOMElement $node A \DOMElement instance + * + * @throws \LogicException If given node is not a button or input or does not have a form ancestor + */ + protected function setNode(\DOMElement $node) + { + $this->button = $node; + if ('button' === $node->nodeName || ('input' === $node->nodeName && in_array(strtolower($node->getAttribute('type')), array('submit', 'button', 'image')))) { + if ($node->hasAttribute('form')) { + // if the node has the HTML5-compliant 'form' attribute, use it + $formId = $node->getAttribute('form'); + $form = $node->ownerDocument->getElementById($formId); + if (null === $form) { + throw new \LogicException(sprintf('The selected node has an invalid form attribute (%s).', $formId)); + } + $this->node = $form; + + return; + } + // we loop until we find a form ancestor + do { + if (null === $node = $node->parentNode) { + throw new \LogicException('The selected node does not have a form ancestor.'); + } + } while ('form' !== $node->nodeName); + } elseif ('form' !== $node->nodeName) { + throw new \LogicException(sprintf('Unable to submit on a "%s" tag.', $node->nodeName)); + } + + $this->node = $node; + } + + /** + * Adds form elements related to this form. + * + * Creates an internal copy of the submitted 'button' element and + * the form node or the entire document depending on whether we need + * to find non-descendant elements through HTML5 'form' attribute. + */ + private function initialize() + { + $this->fields = new FormFieldRegistry(); + + $xpath = new \DOMXPath($this->node->ownerDocument); + + // add submitted button if it has a valid name + if ('form' !== $this->button->nodeName && $this->button->hasAttribute('name') && $this->button->getAttribute('name')) { + if ('input' == $this->button->nodeName && 'image' == strtolower($this->button->getAttribute('type'))) { + $name = $this->button->getAttribute('name'); + $this->button->setAttribute('value', '0'); + + // temporarily change the name of the input node for the x coordinate + $this->button->setAttribute('name', $name.'.x'); + $this->set(new Field\InputFormField($this->button)); + + // temporarily change the name of the input node for the y coordinate + $this->button->setAttribute('name', $name.'.y'); + $this->set(new Field\InputFormField($this->button)); + + // restore the original name of the input node + $this->button->setAttribute('name', $name); + } else { + $this->set(new Field\InputFormField($this->button)); + } + } + + // find form elements corresponding to the current form + if ($this->node->hasAttribute('id')) { + // corresponding elements are either descendants or have a matching HTML5 form attribute + $formId = Crawler::xpathLiteral($this->node->getAttribute('id')); + + $fieldNodes = $xpath->query(sprintf('descendant::input[@form=%s] | descendant::button[@form=%s] | descendant::textarea[@form=%s] | descendant::select[@form=%s] | //form[@id=%s]//input[not(@form)] | //form[@id=%s]//button[not(@form)] | //form[@id=%s]//textarea[not(@form)] | //form[@id=%s]//select[not(@form)]', $formId, $formId, $formId, $formId, $formId, $formId, $formId, $formId)); + foreach ($fieldNodes as $node) { + $this->addField($node); + } + } else { + // do the xpath query with $this->node as the context node, to only find descendant elements + // however, descendant elements with form attribute are not part of this form + $fieldNodes = $xpath->query('descendant::input[not(@form)] | descendant::button[not(@form)] | descendant::textarea[not(@form)] | descendant::select[not(@form)]', $this->node); + foreach ($fieldNodes as $node) { + $this->addField($node); + } + } + + if ($this->baseHref && '' !== $this->node->getAttribute('action')) { + $this->currentUri = $this->baseHref; + } + } + + private function addField(\DOMElement $node) + { + if (!$node->hasAttribute('name') || !$node->getAttribute('name')) { + return; + } + + $nodeName = $node->nodeName; + if ('select' == $nodeName || 'input' == $nodeName && 'checkbox' == strtolower($node->getAttribute('type'))) { + $this->set(new Field\ChoiceFormField($node)); + } elseif ('input' == $nodeName && 'radio' == strtolower($node->getAttribute('type'))) { + // there may be other fields with the same name that are no choice + // fields already registered (see https://github.com/symfony/symfony/issues/11689) + if ($this->has($node->getAttribute('name')) && $this->get($node->getAttribute('name')) instanceof ChoiceFormField) { + $this->get($node->getAttribute('name'))->addChoice($node); + } else { + $this->set(new Field\ChoiceFormField($node)); + } + } elseif ('input' == $nodeName && 'file' == strtolower($node->getAttribute('type'))) { + $this->set(new Field\FileFormField($node)); + } elseif ('input' == $nodeName && !in_array(strtolower($node->getAttribute('type')), array('submit', 'button', 'image'))) { + $this->set(new Field\InputFormField($node)); + } elseif ('textarea' == $nodeName) { + $this->set(new Field\TextareaFormField($node)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/FormFieldRegistry.php b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/FormFieldRegistry.php new file mode 100644 index 0000000000000000000000000000000000000000..9168dd365af9862aa262ca201362dca71f1760cc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/FormFieldRegistry.php @@ -0,0 +1,217 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DomCrawler; + +use Symfony\Component\DomCrawler\Field\FormField; + +/** + * This is an internal class that must not be used directly. + * + * @internal + */ +class FormFieldRegistry +{ + private $fields = array(); + + private $base; + + /** + * Adds a field to the registry. + * + * @param FormField $field The field + */ + public function add(FormField $field) + { + $segments = $this->getSegments($field->getName()); + + $target = &$this->fields; + while ($segments) { + if (!is_array($target)) { + $target = array(); + } + $path = array_shift($segments); + if ('' === $path) { + $target = &$target[]; + } else { + $target = &$target[$path]; + } + } + $target = $field; + } + + /** + * Removes a field and its children from the registry. + * + * @param string $name The fully qualified name of the base field + */ + public function remove($name) + { + $segments = $this->getSegments($name); + $target = &$this->fields; + while (count($segments) > 1) { + $path = array_shift($segments); + if (!array_key_exists($path, $target)) { + return; + } + $target = &$target[$path]; + } + unset($target[array_shift($segments)]); + } + + /** + * Returns the value of the field and its children. + * + * @param string $name The fully qualified name of the field + * + * @return mixed The value of the field + * + * @throws \InvalidArgumentException if the field does not exist + */ + public function &get($name) + { + $segments = $this->getSegments($name); + $target = &$this->fields; + while ($segments) { + $path = array_shift($segments); + if (!array_key_exists($path, $target)) { + throw new \InvalidArgumentException(sprintf('Unreachable field "%s"', $path)); + } + $target = &$target[$path]; + } + + return $target; + } + + /** + * Tests whether the form has the given field. + * + * @param string $name The fully qualified name of the field + * + * @return bool Whether the form has the given field + */ + public function has($name) + { + try { + $this->get($name); + + return true; + } catch (\InvalidArgumentException $e) { + return false; + } + } + + /** + * Set the value of a field and its children. + * + * @param string $name The fully qualified name of the field + * @param mixed $value The value + * + * @throws \InvalidArgumentException if the field does not exist + */ + public function set($name, $value) + { + $target = &$this->get($name); + if ((!is_array($value) && $target instanceof Field\FormField) || $target instanceof Field\ChoiceFormField) { + $target->setValue($value); + } elseif (is_array($value)) { + $fields = self::create($name, $value); + foreach ($fields->all() as $k => $v) { + $this->set($k, $v); + } + } else { + throw new \InvalidArgumentException(sprintf('Cannot set value on a compound field "%s".', $name)); + } + } + + /** + * Returns the list of field with their value. + * + * @return FormField[] The list of fields as array((string) Fully qualified name => (mixed) value) + */ + public function all() + { + return $this->walk($this->fields, $this->base); + } + + /** + * Creates an instance of the class. + * + * This function is made private because it allows overriding the $base and + * the $values properties without any type checking. + * + * @param string $base The fully qualified name of the base field + * @param array $values The values of the fields + * + * @return static + */ + private static function create($base, array $values) + { + $registry = new static(); + $registry->base = $base; + $registry->fields = $values; + + return $registry; + } + + /** + * Transforms a PHP array in a list of fully qualified name / value. + * + * @param array $array The PHP array + * @param string $base The name of the base field + * @param array $output The initial values + * + * @return array The list of fields as array((string) Fully qualified name => (mixed) value) + */ + private function walk(array $array, $base = '', array &$output = array()) + { + foreach ($array as $k => $v) { + $path = empty($base) ? $k : sprintf('%s[%s]', $base, $k); + if (is_array($v)) { + $this->walk($v, $path, $output); + } else { + $output[$path] = $v; + } + } + + return $output; + } + + /** + * Splits a field name into segments as a web browser would do. + * + * + * getSegments('base[foo][3][]') = array('base', 'foo, '3', ''); + * + * + * @param string $name The name of the field + * + * @return string[] The list of segments + */ + private function getSegments($name) + { + if (preg_match('/^(?P[^[]+)(?P(\[.*)|$)/', $name, $m)) { + $segments = array($m['base']); + while (!empty($m['extra'])) { + $extra = $m['extra']; + if (preg_match('/^\[(?P.*?)\](?P.*)$/', $extra, $m)) { + $segments[] = $m['segment']; + } else { + $segments[] = $extra; + } + } + + return $segments; + } + + return array($name); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Image.php b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Image.php new file mode 100644 index 0000000000000000000000000000000000000000..4d6403258057c9dd8fd8ee5ef58ab7ece93a962b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Image.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DomCrawler; + +/** + * Image represents an HTML image (an HTML img tag). + */ +class Image extends AbstractUriElement +{ + public function __construct(\DOMElement $node, $currentUri) + { + parent::__construct($node, $currentUri, 'GET'); + } + + protected function getRawUri() + { + return $this->node->getAttribute('src'); + } + + protected function setNode(\DOMElement $node) + { + if ('img' !== $node->nodeName) { + throw new \LogicException(sprintf('Unable to visualize a "%s" tag.', $node->nodeName)); + } + + $this->node = $node; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Link.php b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Link.php new file mode 100644 index 0000000000000000000000000000000000000000..80a356e4684808764ea79cf9c800a29659948c6d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Link.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DomCrawler; + +/** + * Link represents an HTML link (an HTML a, area or link tag). + * + * @author Fabien Potencier + */ +class Link extends AbstractUriElement +{ + protected function getRawUri() + { + return $this->node->getAttribute('href'); + } + + protected function setNode(\DOMElement $node) + { + if ('a' !== $node->nodeName && 'area' !== $node->nodeName && 'link' !== $node->nodeName) { + throw new \LogicException(sprintf('Unable to navigate from a "%s" tag.', $node->nodeName)); + } + + $this->node = $node; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/README.md b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5fad2e27adc2f1eed6e58909c79fb39d4292d8d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/README.md @@ -0,0 +1,13 @@ +DomCrawler Component +==================== + +The DomCrawler component eases DOM navigation for HTML and XML documents. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/dom_crawler.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/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php new file mode 100755 index 0000000000000000000000000000000000000000..39b4a7aefbd5e8be4939af779db4ae7084298c82 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php @@ -0,0 +1,1204 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DomCrawler\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DomCrawler\Crawler; + +class CrawlerTest extends TestCase +{ + public function testConstructor() + { + $crawler = new Crawler(); + $this->assertCount(0, $crawler, '__construct() returns an empty crawler'); + + $doc = new \DOMDocument(); + $node = $doc->createElement('test'); + + $crawler = new Crawler($node); + $this->assertCount(1, $crawler, '__construct() takes a node as a first argument'); + } + + public function testGetUri() + { + $uri = 'http://symfony.com'; + $crawler = new Crawler(null, $uri); + $this->assertEquals($uri, $crawler->getUri()); + } + + public function testGetBaseHref() + { + $baseHref = 'http://symfony.com'; + $crawler = new Crawler(null, null, $baseHref); + $this->assertEquals($baseHref, $crawler->getBaseHref()); + } + + public function testAdd() + { + $crawler = new Crawler(); + $crawler->add($this->createDomDocument()); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->add() adds nodes from a \DOMDocument'); + + $crawler = new Crawler(); + $crawler->add($this->createNodeList()); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->add() adds nodes from a \DOMNodeList'); + + $list = array(); + foreach ($this->createNodeList() as $node) { + $list[] = $node; + } + $crawler = new Crawler(); + $crawler->add($list); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->add() adds nodes from an array of nodes'); + + $crawler = new Crawler(); + $crawler->add($this->createNodeList()->item(0)); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->add() adds nodes from a \DOMNode'); + + $crawler = new Crawler(); + $crawler->add('Foo'); + $this->assertEquals('Foo', $crawler->filterXPath('//body')->text(), '->add() adds nodes from a string'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testAddInvalidType() + { + $crawler = new Crawler(); + $crawler->add(1); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Attaching DOM nodes from multiple documents in the same crawler is forbidden. + */ + public function testAddMultipleDocumentNode() + { + $crawler = $this->createTestCrawler(); + $crawler->addHtmlContent('
    ', 'UTF-8'); + } + + public function testAddHtmlContent() + { + $crawler = new Crawler(); + $crawler->addHtmlContent('
    ', 'UTF-8'); + + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addHtmlContent() adds nodes from an HTML string'); + } + + public function testAddHtmlContentWithBaseTag() + { + $crawler = new Crawler(); + + $crawler->addHtmlContent('', 'UTF-8'); + + $this->assertEquals('http://symfony.com', $crawler->filterXPath('//base')->attr('href'), '->addHtmlContent() adds nodes from an HTML string'); + $this->assertEquals('http://symfony.com/contact', $crawler->filterXPath('//a')->link()->getUri(), '->addHtmlContent() adds nodes from an HTML string'); + } + + /** + * @requires extension mbstring + */ + public function testAddHtmlContentCharset() + { + $crawler = new Crawler(); + $crawler->addHtmlContent('
    Tiếng Việt', 'UTF-8'); + + $this->assertEquals('Tiếng Việt', $crawler->filterXPath('//div')->text()); + } + + public function testAddHtmlContentInvalidBaseTag() + { + $crawler = new Crawler(null, 'http://symfony.com'); + + $crawler->addHtmlContent('', 'UTF-8'); + + $this->assertEquals('http://symfony.com/contact', current($crawler->filterXPath('//a')->links())->getUri(), '->addHtmlContent() correctly handles a non-existent base tag href attribute'); + } + + public function testAddHtmlContentUnsupportedCharset() + { + $crawler = new Crawler(); + $crawler->addHtmlContent(file_get_contents(__DIR__.'/Fixtures/windows-1250.html'), 'Windows-1250'); + + $this->assertEquals('ŽťÄýů', $crawler->filterXPath('//p')->text()); + } + + /** + * @requires extension mbstring + */ + public function testAddHtmlContentCharsetGbk() + { + $crawler = new Crawler(); + //gbk encode of

    中文

    + $crawler->addHtmlContent(base64_decode('PGh0bWw+PHA+1tDOxDwvcD48L2h0bWw+'), 'gbk'); + + $this->assertEquals('中文', $crawler->filterXPath('//p')->text()); + } + + public function testAddHtmlContentWithErrors() + { + $internalErrors = libxml_use_internal_errors(true); + + $crawler = new Crawler(); + $crawler->addHtmlContent(<<<'EOF' + + + + + + + + +EOF + , 'UTF-8'); + + $errors = libxml_get_errors(); + $this->assertCount(1, $errors); + $this->assertEquals("Tag nav invalid\n", $errors[0]->message); + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + } + + public function testAddXmlContent() + { + $crawler = new Crawler(); + $crawler->addXmlContent('
    ', 'UTF-8'); + + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addXmlContent() adds nodes from an XML string'); + } + + public function testAddXmlContentCharset() + { + $crawler = new Crawler(); + $crawler->addXmlContent('
    Tiếng Việt
    ', 'UTF-8'); + + $this->assertEquals('Tiếng Việt', $crawler->filterXPath('//div')->text()); + } + + public function testAddXmlContentWithErrors() + { + $internalErrors = libxml_use_internal_errors(true); + + $crawler = new Crawler(); + $crawler->addXmlContent(<<<'EOF' + + + + + +
    + + +EOF + , 'UTF-8'); + + $this->assertTrue(count(libxml_get_errors()) > 1); + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + } + + public function testAddContent() + { + $crawler = new Crawler(); + $crawler->addContent('
    ', 'text/html; charset=UTF-8'); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addContent() adds nodes from an HTML string'); + + $crawler = new Crawler(); + $crawler->addContent('
    ', 'text/html; charset=UTF-8; dir=RTL'); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addContent() adds nodes from an HTML string with extended content type'); + + $crawler = new Crawler(); + $crawler->addContent('
    '); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addContent() uses text/html as the default type'); + + $crawler = new Crawler(); + $crawler->addContent('
    ', 'text/xml; charset=UTF-8'); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addContent() adds nodes from an XML string'); + + $crawler = new Crawler(); + $crawler->addContent('
    ', 'text/xml'); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addContent() adds nodes from an XML string'); + + $crawler = new Crawler(); + $crawler->addContent('foo bar', 'text/plain'); + $this->assertCount(0, $crawler, '->addContent() does nothing if the type is not (x|ht)ml'); + + $crawler = new Crawler(); + $crawler->addContent('中文'); + $this->assertEquals('中文', $crawler->filterXPath('//span')->text(), '->addContent() guess wrong charset'); + } + + /** + * @requires extension iconv + */ + public function testAddContentNonUtf8() + { + $crawler = new Crawler(); + $crawler->addContent(iconv('UTF-8', 'SJIS', '日本語')); + $this->assertEquals('日本語', $crawler->filterXPath('//body')->text(), '->addContent() can recognize "Shift_JIS" in html5 meta charset tag'); + } + + public function testAddDocument() + { + $crawler = new Crawler(); + $crawler->addDocument($this->createDomDocument()); + + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addDocument() adds nodes from a \DOMDocument'); + } + + public function testAddNodeList() + { + $crawler = new Crawler(); + $crawler->addNodeList($this->createNodeList()); + + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addNodeList() adds nodes from a \DOMNodeList'); + } + + public function testAddNodes() + { + $list = array(); + foreach ($this->createNodeList() as $node) { + $list[] = $node; + } + + $crawler = new Crawler(); + $crawler->addNodes($list); + + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addNodes() adds nodes from an array of nodes'); + } + + public function testAddNode() + { + $crawler = new Crawler(); + $crawler->addNode($this->createNodeList()->item(0)); + + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addNode() adds nodes from a \DOMNode'); + } + + public function testClear() + { + $doc = new \DOMDocument(); + $node = $doc->createElement('test'); + + $crawler = new Crawler($node); + $crawler->clear(); + $this->assertCount(0, $crawler, '->clear() removes all the nodes from the crawler'); + } + + public function testEq() + { + $crawler = $this->createTestCrawler()->filterXPath('//li'); + $this->assertNotSame($crawler, $crawler->eq(0), '->eq() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->eq() returns a new instance of a crawler'); + + $this->assertEquals('Two', $crawler->eq(1)->text(), '->eq() returns the nth node of the list'); + $this->assertCount(0, $crawler->eq(100), '->eq() returns an empty crawler if the nth node does not exist'); + } + + public function testEach() + { + $data = $this->createTestCrawler()->filterXPath('//ul[1]/li')->each(function ($node, $i) { + return $i.'-'.$node->text(); + }); + + $this->assertEquals(array('0-One', '1-Two', '2-Three'), $data, '->each() executes an anonymous function on each node of the list'); + } + + public function testIteration() + { + $crawler = $this->createTestCrawler()->filterXPath('//li'); + + $this->assertInstanceOf('Traversable', $crawler); + $this->assertContainsOnlyInstancesOf('DOMElement', iterator_to_array($crawler), 'Iterating a Crawler gives DOMElement instances'); + } + + public function testSlice() + { + $crawler = $this->createTestCrawler()->filterXPath('//ul[1]/li'); + $this->assertNotSame($crawler->slice(), $crawler, '->slice() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler->slice(), '->slice() returns a new instance of a crawler'); + + $this->assertCount(3, $crawler->slice(), '->slice() does not slice the nodes in the list if any param is entered'); + $this->assertCount(1, $crawler->slice(1, 1), '->slice() slices the nodes in the list'); + } + + public function testReduce() + { + $crawler = $this->createTestCrawler()->filterXPath('//ul[1]/li'); + $nodes = $crawler->reduce(function ($node, $i) { + return $i !== 1; + }); + $this->assertNotSame($nodes, $crawler, '->reduce() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $nodes, '->reduce() returns a new instance of a crawler'); + + $this->assertCount(2, $nodes, '->reduce() filters the nodes in the list'); + } + + public function testAttr() + { + $this->assertEquals('first', $this->createTestCrawler()->filterXPath('//li')->attr('class'), '->attr() returns the attribute of the first element of the node list'); + + try { + $this->createTestCrawler()->filterXPath('//ol')->attr('class'); + $this->fail('->attr() throws an \InvalidArgumentException if the node list is empty'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->attr() throws an \InvalidArgumentException if the node list is empty'); + } + } + + public function testMissingAttrValueIsNull() + { + $crawler = new Crawler(); + $crawler->addContent('
    ', 'text/html; charset=UTF-8'); + $div = $crawler->filterXPath('//div'); + + $this->assertEquals('sample value', $div->attr('non-empty-attr'), '->attr() reads non-empty attributes correctly'); + $this->assertEquals('', $div->attr('empty-attr'), '->attr() reads empty attributes correctly'); + $this->assertNull($div->attr('missing-attr'), '->attr() reads missing attributes correctly'); + } + + public function testNodeName() + { + $this->assertEquals('li', $this->createTestCrawler()->filterXPath('//li')->nodeName(), '->nodeName() returns the node name of the first element of the node list'); + + try { + $this->createTestCrawler()->filterXPath('//ol')->nodeName(); + $this->fail('->nodeName() throws an \InvalidArgumentException if the node list is empty'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->nodeName() throws an \InvalidArgumentException if the node list is empty'); + } + } + + public function testText() + { + $this->assertEquals('One', $this->createTestCrawler()->filterXPath('//li')->text(), '->text() returns the node value of the first element of the node list'); + + try { + $this->createTestCrawler()->filterXPath('//ol')->text(); + $this->fail('->text() throws an \InvalidArgumentException if the node list is empty'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->text() throws an \InvalidArgumentException if the node list is empty'); + } + } + + public function testHtml() + { + $this->assertEquals('Bar', $this->createTestCrawler()->filterXPath('//a[5]')->html()); + $this->assertEquals('', trim($this->createTestCrawler()->filterXPath('//form[@id="FooFormId"]')->html())); + + try { + $this->createTestCrawler()->filterXPath('//ol')->html(); + $this->fail('->html() throws an \InvalidArgumentException if the node list is empty'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->html() throws an \InvalidArgumentException if the node list is empty'); + } + } + + public function testExtract() + { + $crawler = $this->createTestCrawler()->filterXPath('//ul[1]/li'); + + $this->assertEquals(array('One', 'Two', 'Three'), $crawler->extract('_text'), '->extract() returns an array of extracted data from the node list'); + $this->assertEquals(array(array('One', 'first'), array('Two', ''), array('Three', '')), $crawler->extract(array('_text', 'class')), '->extract() returns an array of extracted data from the node list'); + + $this->assertEquals(array(), $this->createTestCrawler()->filterXPath('//ol')->extract('_text'), '->extract() returns an empty array if the node list is empty'); + } + + public function testFilterXpathComplexQueries() + { + $crawler = $this->createTestCrawler()->filterXPath('//body'); + + $this->assertCount(0, $crawler->filterXPath('/input')); + $this->assertCount(0, $crawler->filterXPath('/body')); + $this->assertCount(1, $crawler->filterXPath('./body')); + $this->assertCount(1, $crawler->filterXPath('.//body')); + $this->assertCount(5, $crawler->filterXPath('.//input')); + $this->assertCount(4, $crawler->filterXPath('//form')->filterXPath('//button | //input')); + $this->assertCount(1, $crawler->filterXPath('body')); + $this->assertCount(6, $crawler->filterXPath('//button | //input')); + $this->assertCount(1, $crawler->filterXPath('//body')); + $this->assertCount(1, $crawler->filterXPath('descendant-or-self::body')); + $this->assertCount(1, $crawler->filterXPath('//div[@id="parent"]')->filterXPath('./div'), 'A child selection finds only the current div'); + $this->assertCount(3, $crawler->filterXPath('//div[@id="parent"]')->filterXPath('descendant::div'), 'A descendant selector matches the current div and its child'); + $this->assertCount(3, $crawler->filterXPath('//div[@id="parent"]')->filterXPath('//div'), 'A descendant selector matches the current div and its child'); + $this->assertCount(5, $crawler->filterXPath('(//a | //div)//img')); + $this->assertCount(7, $crawler->filterXPath('((//a | //div)//img | //ul)')); + $this->assertCount(7, $crawler->filterXPath('( ( //a | //div )//img | //ul )')); + $this->assertCount(1, $crawler->filterXPath("//a[./@href][((./@id = 'Klausi|Claudiu' or normalize-space(string(.)) = 'Klausi|Claudiu' or ./@title = 'Klausi|Claudiu' or ./@rel = 'Klausi|Claudiu') or .//img[./@alt = 'Klausi|Claudiu'])]")); + } + + public function testFilterXPath() + { + $crawler = $this->createTestCrawler(); + $this->assertNotSame($crawler, $crawler->filterXPath('//li'), '->filterXPath() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->filterXPath() returns a new instance of a crawler'); + + $crawler = $this->createTestCrawler()->filterXPath('//ul'); + $this->assertCount(6, $crawler->filterXPath('//li'), '->filterXPath() filters the node list with the XPath expression'); + + $crawler = $this->createTestCrawler(); + $this->assertCount(3, $crawler->filterXPath('//body')->filterXPath('//button')->parents(), '->filterXpath() preserves parents when chained'); + } + + public function testFilterRemovesDuplicates() + { + $crawler = $this->createTestCrawler()->filter('html, body')->filter('li'); + $this->assertCount(6, $crawler, 'The crawler removes duplicates when filtering.'); + } + + public function testFilterXPathWithDefaultNamespace() + { + $crawler = $this->createTestXmlCrawler()->filterXPath('//default:entry/default:id'); + $this->assertCount(1, $crawler, '->filterXPath() automatically registers a namespace'); + $this->assertSame('tag:youtube.com,2008:video:kgZRZmEc9j4', $crawler->text()); + } + + public function testFilterXPathWithCustomDefaultNamespace() + { + $crawler = $this->createTestXmlCrawler(); + $crawler->setDefaultNamespacePrefix('x'); + $crawler = $crawler->filterXPath('//x:entry/x:id'); + + $this->assertCount(1, $crawler, '->filterXPath() lets to override the default namespace prefix'); + $this->assertSame('tag:youtube.com,2008:video:kgZRZmEc9j4', $crawler->text()); + } + + public function testFilterXPathWithNamespace() + { + $crawler = $this->createTestXmlCrawler()->filterXPath('//yt:accessControl'); + $this->assertCount(2, $crawler, '->filterXPath() automatically registers a namespace'); + } + + public function testFilterXPathWithMultipleNamespaces() + { + $crawler = $this->createTestXmlCrawler()->filterXPath('//media:group/yt:aspectRatio'); + $this->assertCount(1, $crawler, '->filterXPath() automatically registers multiple namespaces'); + $this->assertSame('widescreen', $crawler->text()); + } + + public function testFilterXPathWithManuallyRegisteredNamespace() + { + $crawler = $this->createTestXmlCrawler(); + $crawler->registerNamespace('m', 'http://search.yahoo.com/mrss/'); + + $crawler = $crawler->filterXPath('//m:group/yt:aspectRatio'); + $this->assertCount(1, $crawler, '->filterXPath() uses manually registered namespace'); + $this->assertSame('widescreen', $crawler->text()); + } + + public function testFilterXPathWithAnUrl() + { + $crawler = $this->createTestXmlCrawler(); + + $crawler = $crawler->filterXPath('//media:category[@scheme="http://gdata.youtube.com/schemas/2007/categories.cat"]'); + $this->assertCount(1, $crawler); + $this->assertSame('Music', $crawler->text()); + } + + public function testFilterXPathWithFakeRoot() + { + $crawler = $this->createTestCrawler(); + $this->assertCount(0, $crawler->filterXPath('.'), '->filterXPath() returns an empty result if the XPath references the fake root node'); + $this->assertCount(0, $crawler->filterXPath('self::*'), '->filterXPath() returns an empty result if the XPath references the fake root node'); + $this->assertCount(0, $crawler->filterXPath('self::_root'), '->filterXPath() returns an empty result if the XPath references the fake root node'); + } + + public function testFilterXPathWithAncestorAxis() + { + $crawler = $this->createTestCrawler()->filterXPath('//form'); + + $this->assertCount(0, $crawler->filterXPath('ancestor::*'), 'The fake root node has no ancestor nodes'); + } + + public function testFilterXPathWithAncestorOrSelfAxis() + { + $crawler = $this->createTestCrawler()->filterXPath('//form'); + + $this->assertCount(0, $crawler->filterXPath('ancestor-or-self::*'), 'The fake root node has no ancestor nodes'); + } + + public function testFilterXPathWithAttributeAxis() + { + $crawler = $this->createTestCrawler()->filterXPath('//form'); + + $this->assertCount(0, $crawler->filterXPath('attribute::*'), 'The fake root node has no attribute nodes'); + } + + public function testFilterXPathWithAttributeAxisAfterElementAxis() + { + $this->assertCount(3, $this->createTestCrawler()->filterXPath('//form/button/attribute::*'), '->filterXPath() handles attribute axes properly when they are preceded by an element filtering axis'); + } + + public function testFilterXPathWithChildAxis() + { + $crawler = $this->createTestCrawler()->filterXPath('//div[@id="parent"]'); + + $this->assertCount(1, $crawler->filterXPath('child::div'), 'A child selection finds only the current div'); + } + + public function testFilterXPathWithFollowingAxis() + { + $crawler = $this->createTestCrawler()->filterXPath('//a'); + + $this->assertCount(0, $crawler->filterXPath('following::div'), 'The fake root node has no following nodes'); + } + + public function testFilterXPathWithFollowingSiblingAxis() + { + $crawler = $this->createTestCrawler()->filterXPath('//a'); + + $this->assertCount(0, $crawler->filterXPath('following-sibling::div'), 'The fake root node has no following nodes'); + } + + public function testFilterXPathWithNamespaceAxis() + { + $crawler = $this->createTestCrawler()->filterXPath('//button'); + + $this->assertCount(0, $crawler->filterXPath('namespace::*'), 'The fake root node has no namespace nodes'); + } + + public function testFilterXPathWithNamespaceAxisAfterElementAxis() + { + $crawler = $this->createTestCrawler()->filterXPath('//div[@id="parent"]/namespace::*'); + + $this->assertCount(0, $crawler->filterXPath('namespace::*'), 'Namespace axes cannot be requested'); + } + + public function testFilterXPathWithParentAxis() + { + $crawler = $this->createTestCrawler()->filterXPath('//button'); + + $this->assertCount(0, $crawler->filterXPath('parent::*'), 'The fake root node has no parent nodes'); + } + + public function testFilterXPathWithPrecedingAxis() + { + $crawler = $this->createTestCrawler()->filterXPath('//form'); + + $this->assertCount(0, $crawler->filterXPath('preceding::*'), 'The fake root node has no preceding nodes'); + } + + public function testFilterXPathWithPrecedingSiblingAxis() + { + $crawler = $this->createTestCrawler()->filterXPath('//form'); + + $this->assertCount(0, $crawler->filterXPath('preceding-sibling::*'), 'The fake root node has no preceding nodes'); + } + + public function testFilterXPathWithSelfAxes() + { + $crawler = $this->createTestCrawler()->filterXPath('//a'); + + $this->assertCount(0, $crawler->filterXPath('self::a'), 'The fake root node has no "real" element name'); + $this->assertCount(0, $crawler->filterXPath('self::a/img'), 'The fake root node has no "real" element name'); + $this->assertCount(10, $crawler->filterXPath('self::*/a')); + } + + public function testFilter() + { + $crawler = $this->createTestCrawler(); + $this->assertNotSame($crawler, $crawler->filter('li'), '->filter() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->filter() returns a new instance of a crawler'); + + $crawler = $this->createTestCrawler()->filter('ul'); + + $this->assertCount(6, $crawler->filter('li'), '->filter() filters the node list with the CSS selector'); + } + + public function testFilterWithDefaultNamespace() + { + $crawler = $this->createTestXmlCrawler()->filter('default|entry default|id'); + $this->assertCount(1, $crawler, '->filter() automatically registers namespaces'); + $this->assertSame('tag:youtube.com,2008:video:kgZRZmEc9j4', $crawler->text()); + } + + public function testFilterWithNamespace() + { + $crawler = $this->createTestXmlCrawler()->filter('yt|accessControl'); + $this->assertCount(2, $crawler, '->filter() automatically registers namespaces'); + } + + public function testFilterWithMultipleNamespaces() + { + $crawler = $this->createTestXmlCrawler()->filter('media|group yt|aspectRatio'); + $this->assertCount(1, $crawler, '->filter() automatically registers namespaces'); + $this->assertSame('widescreen', $crawler->text()); + } + + public function testFilterWithDefaultNamespaceOnly() + { + $crawler = new Crawler(' + + + http://localhost/foo + weekly + 0.5 + 2012-11-16 + + + http://localhost/bar + weekly + 0.5 + 2012-11-16 + + + '); + + $this->assertEquals(2, $crawler->filter('url')->count()); + } + + public function testSelectLink() + { + $crawler = $this->createTestCrawler(); + $this->assertNotSame($crawler, $crawler->selectLink('Foo'), '->selectLink() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->selectLink() returns a new instance of a crawler'); + + $this->assertCount(1, $crawler->selectLink('Fabien\'s Foo'), '->selectLink() selects links by the node values'); + $this->assertCount(1, $crawler->selectLink('Fabien\'s Bar'), '->selectLink() selects links by the alt attribute of a clickable image'); + + $this->assertCount(2, $crawler->selectLink('Fabien"s Foo'), '->selectLink() selects links by the node values'); + $this->assertCount(2, $crawler->selectLink('Fabien"s Bar'), '->selectLink() selects links by the alt attribute of a clickable image'); + + $this->assertCount(1, $crawler->selectLink('\' Fabien"s Foo'), '->selectLink() selects links by the node values'); + $this->assertCount(1, $crawler->selectLink('\' Fabien"s Bar'), '->selectLink() selects links by the alt attribute of a clickable image'); + + $this->assertCount(4, $crawler->selectLink('Foo'), '->selectLink() selects links by the node values'); + $this->assertCount(4, $crawler->selectLink('Bar'), '->selectLink() selects links by the node values'); + } + + public function testSelectImage() + { + $crawler = $this->createTestCrawler(); + $this->assertNotSame($crawler, $crawler->selectImage('Bar'), '->selectImage() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->selectImage() returns a new instance of a crawler'); + + $this->assertCount(1, $crawler->selectImage('Fabien\'s Bar'), '->selectImage() selects images by alt attribute'); + $this->assertCount(2, $crawler->selectImage('Fabien"s Bar'), '->selectImage() selects images by alt attribute'); + $this->assertCount(1, $crawler->selectImage('\' Fabien"s Bar'), '->selectImage() selects images by alt attribute'); + } + + public function testSelectButton() + { + $crawler = $this->createTestCrawler(); + $this->assertNotSame($crawler, $crawler->selectButton('FooValue'), '->selectButton() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->selectButton() returns a new instance of a crawler'); + + $this->assertEquals(1, $crawler->selectButton('FooValue')->count(), '->selectButton() selects buttons'); + $this->assertEquals(1, $crawler->selectButton('FooName')->count(), '->selectButton() selects buttons'); + $this->assertEquals(1, $crawler->selectButton('FooId')->count(), '->selectButton() selects buttons'); + + $this->assertEquals(1, $crawler->selectButton('BarValue')->count(), '->selectButton() selects buttons'); + $this->assertEquals(1, $crawler->selectButton('BarName')->count(), '->selectButton() selects buttons'); + $this->assertEquals(1, $crawler->selectButton('BarId')->count(), '->selectButton() selects buttons'); + + $this->assertEquals(1, $crawler->selectButton('FooBarValue')->count(), '->selectButton() selects buttons with form attribute too'); + $this->assertEquals(1, $crawler->selectButton('FooBarName')->count(), '->selectButton() selects buttons with form attribute too'); + } + + public function testSelectButtonWithSingleQuotesInNameAttribute() + { + $html = <<<'HTML' + + + +
    +
    + + + + +HTML; + + $crawler = new Crawler($html); + + $this->assertCount(1, $crawler->selectButton('Click \'Here\'')); + } + + public function testSelectButtonWithDoubleQuotesInNameAttribute() + { + $html = <<<'HTML' + + + +
    + Login +
    +
    + + + + +HTML; + + $crawler = new Crawler($html); + + $this->assertCount(1, $crawler->selectButton('Click "Here"')); + } + + public function testLink() + { + $crawler = $this->createTestCrawler('http://example.com/bar/')->selectLink('Foo'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Link', $crawler->link(), '->link() returns a Link instance'); + + $this->assertEquals('POST', $crawler->link('post')->getMethod(), '->link() takes a method as its argument'); + + $crawler = $this->createTestCrawler('http://example.com/bar')->selectLink('GetLink'); + $this->assertEquals('http://example.com/bar?get=param', $crawler->link()->getUri(), '->link() returns a Link instance'); + + try { + $this->createTestCrawler()->filterXPath('//ol')->link(); + $this->fail('->link() throws an \InvalidArgumentException if the node list is empty'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->link() throws an \InvalidArgumentException if the node list is empty'); + } + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The selected node should be instance of DOMElement + */ + public function testInvalidLink() + { + $crawler = $this->createTestCrawler('http://example.com/bar/'); + $crawler->filterXPath('//li/text()')->link(); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The selected node should be instance of DOMElement + */ + public function testInvalidLinks() + { + $crawler = $this->createTestCrawler('http://example.com/bar/'); + $crawler->filterXPath('//li/text()')->link(); + } + + public function testImage() + { + $crawler = $this->createTestCrawler('http://example.com/bar/')->selectImage('Bar'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Image', $crawler->image(), '->image() returns an Image instance'); + + try { + $this->createTestCrawler()->filterXPath('//ol')->image(); + $this->fail('->image() throws an \InvalidArgumentException if the node list is empty'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->image() throws an \InvalidArgumentException if the node list is empty'); + } + } + + public function testSelectLinkAndLinkFiltered() + { + $html = <<<'HTML' + + + +
    + Login +
    +
    + + + + +HTML; + + $crawler = new Crawler($html); + $filtered = $crawler->filterXPath("descendant-or-self::*[@id = 'login-form']"); + + $this->assertCount(0, $filtered->selectLink('Login')); + $this->assertCount(1, $filtered->selectButton('Submit')); + + $filtered = $crawler->filterXPath("descendant-or-self::*[@id = 'action']"); + + $this->assertCount(1, $filtered->selectLink('Login')); + $this->assertCount(0, $filtered->selectButton('Submit')); + + $this->assertCount(1, $crawler->selectLink('Login')->selectLink('Login')); + $this->assertCount(1, $crawler->selectButton('Submit')->selectButton('Submit')); + } + + public function testChaining() + { + $crawler = new Crawler('
    '); + + $this->assertEquals('a', $crawler->filterXPath('//div')->filterXPath('div')->filterXPath('div')->attr('name')); + } + + public function testLinks() + { + $crawler = $this->createTestCrawler('http://example.com/bar/')->selectLink('Foo'); + $this->assertInternalType('array', $crawler->links(), '->links() returns an array'); + + $this->assertCount(4, $crawler->links(), '->links() returns an array'); + $links = $crawler->links(); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Link', $links[0], '->links() returns an array of Link instances'); + + $this->assertEquals(array(), $this->createTestCrawler()->filterXPath('//ol')->links(), '->links() returns an empty array if the node selection is empty'); + } + + public function testImages() + { + $crawler = $this->createTestCrawler('http://example.com/bar/')->selectImage('Bar'); + $this->assertInternalType('array', $crawler->images(), '->images() returns an array'); + + $this->assertCount(4, $crawler->images(), '->images() returns an array'); + $images = $crawler->images(); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Image', $images[0], '->images() returns an array of Image instances'); + + $this->assertEquals(array(), $this->createTestCrawler()->filterXPath('//ol')->links(), '->links() returns an empty array if the node selection is empty'); + } + + public function testForm() + { + $testCrawler = $this->createTestCrawler('http://example.com/bar/'); + $crawler = $testCrawler->selectButton('FooValue'); + $crawler2 = $testCrawler->selectButton('FooBarValue'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Form', $crawler->form(), '->form() returns a Form instance'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Form', $crawler2->form(), '->form() returns a Form instance'); + + $this->assertEquals($crawler->form()->getFormNode()->getAttribute('id'), $crawler2->form()->getFormNode()->getAttribute('id'), '->form() works on elements with form attribute'); + + $this->assertEquals(array('FooName' => 'FooBar', 'TextName' => 'TextValue', 'FooTextName' => 'FooTextValue'), $crawler->form(array('FooName' => 'FooBar'))->getValues(), '->form() takes an array of values to submit as its first argument'); + $this->assertEquals(array('FooName' => 'FooValue', 'TextName' => 'TextValue', 'FooTextName' => 'FooTextValue'), $crawler->form()->getValues(), '->getValues() returns correct form values'); + $this->assertEquals(array('FooBarName' => 'FooBarValue', 'TextName' => 'TextValue', 'FooTextName' => 'FooTextValue'), $crawler2->form()->getValues(), '->getValues() returns correct form values'); + + try { + $this->createTestCrawler()->filterXPath('//ol')->form(); + $this->fail('->form() throws an \InvalidArgumentException if the node list is empty'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->form() throws an \InvalidArgumentException if the node list is empty'); + } + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The selected node should be instance of DOMElement + */ + public function testInvalidForm() + { + $crawler = $this->createTestCrawler('http://example.com/bar/'); + $crawler->filterXPath('//li/text()')->form(); + } + + public function testLast() + { + $crawler = $this->createTestCrawler()->filterXPath('//ul[1]/li'); + $this->assertNotSame($crawler, $crawler->last(), '->last() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->last() returns a new instance of a crawler'); + + $this->assertEquals('Three', $crawler->last()->text()); + } + + public function testFirst() + { + $crawler = $this->createTestCrawler()->filterXPath('//li'); + $this->assertNotSame($crawler, $crawler->first(), '->first() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->first() returns a new instance of a crawler'); + + $this->assertEquals('One', $crawler->first()->text()); + } + + public function testSiblings() + { + $crawler = $this->createTestCrawler()->filterXPath('//li')->eq(1); + $this->assertNotSame($crawler, $crawler->siblings(), '->siblings() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->siblings() returns a new instance of a crawler'); + + $nodes = $crawler->siblings(); + $this->assertEquals(2, $nodes->count()); + $this->assertEquals('One', $nodes->eq(0)->text()); + $this->assertEquals('Three', $nodes->eq(1)->text()); + + $nodes = $this->createTestCrawler()->filterXPath('//li')->eq(0)->siblings(); + $this->assertEquals(2, $nodes->count()); + $this->assertEquals('Two', $nodes->eq(0)->text()); + $this->assertEquals('Three', $nodes->eq(1)->text()); + + try { + $this->createTestCrawler()->filterXPath('//ol')->siblings(); + $this->fail('->siblings() throws an \InvalidArgumentException if the node list is empty'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->siblings() throws an \InvalidArgumentException if the node list is empty'); + } + } + + public function testNextAll() + { + $crawler = $this->createTestCrawler()->filterXPath('//li')->eq(1); + $this->assertNotSame($crawler, $crawler->nextAll(), '->nextAll() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->nextAll() returns a new instance of a crawler'); + + $nodes = $crawler->nextAll(); + $this->assertEquals(1, $nodes->count()); + $this->assertEquals('Three', $nodes->eq(0)->text()); + + try { + $this->createTestCrawler()->filterXPath('//ol')->nextAll(); + $this->fail('->nextAll() throws an \InvalidArgumentException if the node list is empty'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->nextAll() throws an \InvalidArgumentException if the node list is empty'); + } + } + + public function testPreviousAll() + { + $crawler = $this->createTestCrawler()->filterXPath('//li')->eq(2); + $this->assertNotSame($crawler, $crawler->previousAll(), '->previousAll() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->previousAll() returns a new instance of a crawler'); + + $nodes = $crawler->previousAll(); + $this->assertEquals(2, $nodes->count()); + $this->assertEquals('Two', $nodes->eq(0)->text()); + + try { + $this->createTestCrawler()->filterXPath('//ol')->previousAll(); + $this->fail('->previousAll() throws an \InvalidArgumentException if the node list is empty'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->previousAll() throws an \InvalidArgumentException if the node list is empty'); + } + } + + public function testChildren() + { + $crawler = $this->createTestCrawler()->filterXPath('//ul'); + $this->assertNotSame($crawler, $crawler->children(), '->children() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->children() returns a new instance of a crawler'); + + $nodes = $crawler->children(); + $this->assertEquals(3, $nodes->count()); + $this->assertEquals('One', $nodes->eq(0)->text()); + $this->assertEquals('Two', $nodes->eq(1)->text()); + $this->assertEquals('Three', $nodes->eq(2)->text()); + + try { + $this->createTestCrawler()->filterXPath('//ol')->children(); + $this->fail('->children() throws an \InvalidArgumentException if the node list is empty'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->children() throws an \InvalidArgumentException if the node list is empty'); + } + + try { + $crawler = new Crawler('

    '); + $crawler->filter('p')->children(); + $this->assertTrue(true, '->children() does not trigger a notice if the node has no children'); + } catch (\PHPUnit\Framework\Error\Notice $e) { + $this->fail('->children() does not trigger a notice if the node has no children'); + } catch (\PHPUnit_Framework_Error_Notice $e) { + $this->fail('->children() does not trigger a notice if the node has no children'); + } + } + + public function testParents() + { + $crawler = $this->createTestCrawler()->filterXPath('//li[1]'); + $this->assertNotSame($crawler, $crawler->parents(), '->parents() returns a new instance of a crawler'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->parents() returns a new instance of a crawler'); + + $nodes = $crawler->parents(); + $this->assertEquals(3, $nodes->count()); + + $nodes = $this->createTestCrawler()->filterXPath('//html')->parents(); + $this->assertEquals(0, $nodes->count()); + + try { + $this->createTestCrawler()->filterXPath('//ol')->parents(); + $this->fail('->parents() throws an \InvalidArgumentException if the node list is empty'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->parents() throws an \InvalidArgumentException if the node list is empty'); + } + } + + /** + * @dataProvider getBaseTagData + */ + public function testBaseTag($baseValue, $linkValue, $expectedUri, $currentUri = null, $description = null) + { + $crawler = new Crawler('', $currentUri); + $this->assertEquals($expectedUri, $crawler->filterXPath('//a')->link()->getUri(), $description); + } + + public function getBaseTagData() + { + return array( + array('http://base.com', 'link', 'http://base.com/link'), + array('//base.com', 'link', 'https://base.com/link', 'https://domain.com', ' tag can use a schema-less URL'), + array('path/', 'link', 'https://domain.com/path/link', 'https://domain.com', ' tag can set a path'), + array('http://base.com', '#', 'http://base.com#', 'http://domain.com/path/link', ' tag does work with links to an anchor'), + array('http://base.com', '', 'http://base.com', 'http://domain.com/path/link', ' tag does work with empty links'), + ); + } + + /** + * @dataProvider getBaseTagWithFormData + */ + public function testBaseTagWithForm($baseValue, $actionValue, $expectedUri, $currentUri = null, $description = null) + { + $crawler = new Crawler('
    ', + array('bar' => array('InputFormField', 'bar')), + ), + array( + 'appends the submitted button value but not other submit buttons', + ' + ', + array('foobar' => array('InputFormField', 'foobar')), + ), + array( + 'turns an image input into x and y fields', + '', + array('bar.x' => array('InputFormField', '0'), 'bar.y' => array('InputFormField', '0')), + ), + array( + 'returns textareas', + ' + ', + array('foo' => array('TextareaFormField', 'foo')), + ), + array( + 'returns inputs', + ' + ', + array('foo' => array('InputFormField', 'foo')), + ), + array( + 'returns checkboxes', + ' + ', + array('foo' => array('ChoiceFormField', 'foo')), + ), + array( + 'returns not-checked checkboxes', + ' + ', + array('foo' => array('ChoiceFormField', false)), + ), + array( + 'returns radio buttons', + ' + + ', + array('foo' => array('ChoiceFormField', 'bar')), + ), + array( + 'returns file inputs', + ' + ', + array('foo' => array('FileFormField', array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0))), + ), + ); + } + + public function testGetFormNode() + { + $dom = new \DOMDocument(); + $dom->loadHTML('
    '); + + $form = new Form($dom->getElementsByTagName('input')->item(0), 'http://example.com'); + + $this->assertSame($dom->getElementsByTagName('form')->item(0), $form->getFormNode(), '->getFormNode() returns the form node associated with this form'); + } + + public function testGetFormNodeFromNamedForm() + { + $dom = new \DOMDocument(); + $dom->loadHTML('
    '); + + $form = new Form($dom->getElementsByTagName('form')->item(0), 'http://example.com'); + + $this->assertSame($dom->getElementsByTagName('form')->item(0), $form->getFormNode(), '->getFormNode() returns the form node associated with this form'); + } + + public function testGetMethod() + { + $form = $this->createForm('
    '); + $this->assertEquals('GET', $form->getMethod(), '->getMethod() returns get if no method is defined'); + + $form = $this->createForm('
    '); + $this->assertEquals('POST', $form->getMethod(), '->getMethod() returns the method attribute value of the form'); + + $form = $this->createForm('
    ', 'put'); + $this->assertEquals('PUT', $form->getMethod(), '->getMethod() returns the method defined in the constructor if provided'); + + $form = $this->createForm('
    ', 'delete'); + $this->assertEquals('DELETE', $form->getMethod(), '->getMethod() returns the method defined in the constructor if provided'); + + $form = $this->createForm('
    ', 'patch'); + $this->assertEquals('PATCH', $form->getMethod(), '->getMethod() returns the method defined in the constructor if provided'); + } + + public function testGetSetValue() + { + $form = $this->createForm('
    '); + + $this->assertEquals('foo', $form['foo']->getValue(), '->offsetGet() returns the value of a form field'); + + $form['foo'] = 'bar'; + + $this->assertEquals('bar', $form['foo']->getValue(), '->offsetSet() changes the value of a form field'); + + try { + $form['foobar'] = 'bar'; + $this->fail('->offsetSet() throws an \InvalidArgumentException exception if the field does not exist'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->offsetSet() throws an \InvalidArgumentException exception if the field does not exist'); + } + + try { + $form['foobar']; + $this->fail('->offsetSet() throws an \InvalidArgumentException exception if the field does not exist'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->offsetSet() throws an \InvalidArgumentException exception if the field does not exist'); + } + } + + public function testDisableValidation() + { + $form = $this->createForm('
    + + + + '); + + $form->disableValidation(); + + $form['foo[bar]']->select('foo'); + $form['foo[baz]']->select('bar'); + $this->assertEquals('foo', $form['foo[bar]']->getValue(), '->disableValidation() disables validation of all ChoiceFormField.'); + $this->assertEquals('bar', $form['foo[baz]']->getValue(), '->disableValidation() disables validation of all ChoiceFormField.'); + } + + public function testOffsetUnset() + { + $form = $this->createForm('
    '); + unset($form['foo']); + $this->assertFalse(isset($form['foo']), '->offsetUnset() removes a field'); + } + + public function testOffsetExists() + { + $form = $this->createForm('
    '); + + $this->assertTrue(isset($form['foo']), '->offsetExists() return true if the field exists'); + $this->assertFalse(isset($form['bar']), '->offsetExists() return false if the field does not exist'); + } + + public function testGetValues() + { + $form = $this->createForm('
    '); + $this->assertEquals(array('foo[bar]' => 'foo', 'bar' => 'bar', 'baz' => array()), $form->getValues(), '->getValues() returns all form field values'); + + $form = $this->createForm('
    '); + $this->assertEquals(array('bar' => 'bar'), $form->getValues(), '->getValues() does not include not-checked checkboxes'); + + $form = $this->createForm('
    '); + $this->assertEquals(array('bar' => 'bar'), $form->getValues(), '->getValues() does not include file input fields'); + + $form = $this->createForm('
    '); + $this->assertEquals(array('bar' => 'bar'), $form->getValues(), '->getValues() does not include disabled fields'); + } + + public function testSetValues() + { + $form = $this->createForm('
    '); + $form->setValues(array('foo' => false, 'bar' => 'foo')); + $this->assertEquals(array('bar' => 'foo'), $form->getValues(), '->setValues() sets the values of fields'); + } + + public function testMultiselectSetValues() + { + $form = $this->createForm('
    '); + $form->setValues(array('multi' => array('foo', 'bar'))); + $this->assertEquals(array('multi' => array('foo', 'bar')), $form->getValues(), '->setValue() sets the values of select'); + } + + public function testGetPhpValues() + { + $form = $this->createForm('
    '); + $this->assertEquals(array('foo' => array('bar' => 'foo'), 'bar' => 'bar'), $form->getPhpValues(), '->getPhpValues() converts keys with [] to arrays'); + + $form = $this->createForm('
    '); + $this->assertEquals(array('fo.o' => array('ba.r' => 'foo'), 'ba r' => 'bar'), $form->getPhpValues(), '->getPhpValues() preserves periods and spaces in names'); + + $form = $this->createForm('
    '); + $this->assertEquals(array('fo.o' => array('ba.r' => array('foo', 'ba.z' => 'bar'))), $form->getPhpValues(), '->getPhpValues() preserves periods and spaces in names recursively'); + + $form = $this->createForm('
    '); + $this->assertEquals(array('foo' => array('bar' => 'foo'), 'bar' => 'bar'), $form->getPhpValues(), "->getPhpValues() doesn't return empty values"); + } + + public function testGetFiles() + { + $form = $this->createForm('
    '); + $this->assertEquals(array(), $form->getFiles(), '->getFiles() returns an empty array if method is get'); + + $form = $this->createForm('
    '); + $this->assertEquals(array('foo[bar]' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0)), $form->getFiles(), '->getFiles() only returns file fields for POST'); + + $form = $this->createForm('
    ', 'put'); + $this->assertEquals(array('foo[bar]' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0)), $form->getFiles(), '->getFiles() only returns file fields for PUT'); + + $form = $this->createForm('
    ', 'delete'); + $this->assertEquals(array('foo[bar]' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0)), $form->getFiles(), '->getFiles() only returns file fields for DELETE'); + + $form = $this->createForm('
    ', 'patch'); + $this->assertEquals(array('foo[bar]' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0)), $form->getFiles(), '->getFiles() only returns file fields for PATCH'); + + $form = $this->createForm('
    '); + $this->assertEquals(array(), $form->getFiles(), '->getFiles() does not include disabled file fields'); + } + + public function testGetPhpFiles() + { + $form = $this->createForm('
    '); + $this->assertEquals(array('foo' => array('bar' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0))), $form->getPhpFiles(), '->getPhpFiles() converts keys with [] to arrays'); + + $form = $this->createForm('
    '); + $this->assertEquals(array('f.o o' => array('bar' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0))), $form->getPhpFiles(), '->getPhpFiles() preserves periods and spaces in names'); + + $form = $this->createForm('
    '); + $this->assertEquals(array('f.o o' => array('bar' => array('ba.z' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0), array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0)))), $form->getPhpFiles(), '->getPhpFiles() preserves periods and spaces in names recursively'); + } + + /** + * @dataProvider provideGetUriValues + */ + public function testGetUri($message, $form, $values, $uri, $method = null) + { + $form = $this->createForm($form, $method); + $form->setValues($values); + + $this->assertEquals('http://example.com'.$uri, $form->getUri(), '->getUri() '.$message); + } + + public function testGetBaseUri() + { + $dom = new \DOMDocument(); + $dom->loadHTML('
    '); + + $nodes = $dom->getElementsByTagName('input'); + $form = new Form($nodes->item($nodes->length - 1), 'http://www.foo.com/'); + $this->assertEquals('http://www.foo.com/foo.php', $form->getUri()); + } + + public function testGetUriWithAnchor() + { + $form = $this->createForm('
    ', null, 'http://example.com/id/123'); + + $this->assertEquals('http://example.com/id/123#foo', $form->getUri()); + } + + public function testGetUriActionAbsolute() + { + $formHtml = '
    '; + + $form = $this->createForm($formHtml); + $this->assertEquals('https://login.foo.com/login.php?login_attempt=1', $form->getUri(), '->getUri() returns absolute URIs set in the action form'); + + $form = $this->createForm($formHtml, null, 'https://login.foo.com'); + $this->assertEquals('https://login.foo.com/login.php?login_attempt=1', $form->getUri(), '->getUri() returns absolute URIs set in the action form'); + + $form = $this->createForm($formHtml, null, 'https://login.foo.com/bar/'); + $this->assertEquals('https://login.foo.com/login.php?login_attempt=1', $form->getUri(), '->getUri() returns absolute URIs set in the action form'); + + // The action URI haven't the same domain Host have an another domain as Host + $form = $this->createForm($formHtml, null, 'https://www.foo.com'); + $this->assertEquals('https://login.foo.com/login.php?login_attempt=1', $form->getUri(), '->getUri() returns absolute URIs set in the action form'); + + $form = $this->createForm($formHtml, null, 'https://www.foo.com/bar/'); + $this->assertEquals('https://login.foo.com/login.php?login_attempt=1', $form->getUri(), '->getUri() returns absolute URIs set in the action form'); + } + + public function testGetUriAbsolute() + { + $form = $this->createForm('
    ', null, 'http://localhost/foo/'); + $this->assertEquals('http://localhost/foo/foo', $form->getUri(), '->getUri() returns absolute URIs'); + + $form = $this->createForm('
    ', null, 'http://localhost/foo/'); + $this->assertEquals('http://localhost/foo', $form->getUri(), '->getUri() returns absolute URIs'); + } + + public function testGetUriWithOnlyQueryString() + { + $form = $this->createForm('
    ', null, 'http://localhost/foo/bar'); + $this->assertEquals('http://localhost/foo/bar?get=param', $form->getUri(), '->getUri() returns absolute URIs only if the host has been defined in the constructor'); + } + + public function testGetUriWithoutAction() + { + $form = $this->createForm('
    ', null, 'http://localhost/foo/bar'); + $this->assertEquals('http://localhost/foo/bar', $form->getUri(), '->getUri() returns path if no action defined'); + } + + public function provideGetUriValues() + { + return array( + array( + 'returns the URI of the form', + '
    ', + array(), + '/foo', + ), + array( + 'appends the form values if the method is get', + '
    ', + array(), + '/foo?foo=foo', + ), + array( + 'appends the form values and merges the submitted values', + '
    ', + array('foo' => 'bar'), + '/foo?foo=bar', + ), + array( + 'does not append values if the method is post', + '
    ', + array(), + '/foo', + ), + array( + 'does not append values if the method is patch', + '
    ', + array(), + '/foo', + 'PUT', + ), + array( + 'does not append values if the method is delete', + '
    ', + array(), + '/foo', + 'DELETE', + ), + array( + 'does not append values if the method is put', + '
    ', + array(), + '/foo', + 'PATCH', + ), + array( + 'appends the form values to an existing query string', + '
    ', + array(), + '/foo?bar=bar&foo=foo', + ), + array( + 'replaces query values with the form values', + '
    ', + array(), + '/foo?bar=foo', + ), + array( + 'returns an empty URI if the action is empty', + '
    ', + array(), + '/', + ), + array( + 'appends the form values even if the action is empty', + '
    ', + array(), + '/?foo=foo', + ), + array( + 'chooses the path if the action attribute value is a sharp (#)', + '
    ', + array(), + '/#', + ), + ); + } + + public function testHas() + { + $form = $this->createForm('
    '); + + $this->assertFalse($form->has('foo'), '->has() returns false if a field is not in the form'); + $this->assertTrue($form->has('bar'), '->has() returns true if a field is in the form'); + } + + public function testRemove() + { + $form = $this->createForm('
    '); + $form->remove('bar'); + $this->assertFalse($form->has('bar'), '->remove() removes a field'); + } + + public function testGet() + { + $form = $this->createForm('
    '); + + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Field\\InputFormField', $form->get('bar'), '->get() returns the field object associated with the given name'); + + try { + $form->get('foo'); + $this->fail('->get() throws an \InvalidArgumentException if the field does not exist'); + } catch (\InvalidArgumentException $e) { + $this->assertTrue(true, '->get() throws an \InvalidArgumentException if the field does not exist'); + } + } + + public function testAll() + { + $form = $this->createForm('
    '); + + $fields = $form->all(); + $this->assertCount(1, $fields, '->all() return an array of form field objects'); + $this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Field\\InputFormField', $fields['bar'], '->all() return an array of form field objects'); + } + + public function testSubmitWithoutAFormButton() + { + $dom = new \DOMDocument(); + $dom->loadHTML(' + +
    + + + + '); + + $nodes = $dom->getElementsByTagName('form'); + $form = new Form($nodes->item(0), 'http://example.com'); + $this->assertSame($nodes->item(0), $form->getFormNode(), '->getFormNode() returns the form node associated with this form'); + } + + public function testTypeAttributeIsCaseInsensitive() + { + $form = $this->createForm('
    '); + $this->assertTrue($form->has('example.x'), '->has() returns true if the image input was correctly turned into an x and a y fields'); + $this->assertTrue($form->has('example.y'), '->has() returns true if the image input was correctly turned into an x and a y fields'); + } + + public function testFormFieldRegistryAcceptAnyNames() + { + $field = $this->getFormFieldMock('[t:dbt%3adate;]data_daterange_enddate_value'); + + $registry = new FormFieldRegistry(); + $registry->add($field); + $this->assertEquals($field, $registry->get('[t:dbt%3adate;]data_daterange_enddate_value')); + $registry->set('[t:dbt%3adate;]data_daterange_enddate_value', null); + + $form = $this->createForm('
    '); + $form['[t:dbt%3adate;]data_daterange_enddate_value'] = 'bar'; + + $registry->remove('[t:dbt%3adate;]data_daterange_enddate_value'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testFormFieldRegistryGetThrowAnExceptionWhenTheFieldDoesNotExist() + { + $registry = new FormFieldRegistry(); + $registry->get('foo'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testFormFieldRegistrySetThrowAnExceptionWhenTheFieldDoesNotExist() + { + $registry = new FormFieldRegistry(); + $registry->set('foo', null); + } + + public function testFormFieldRegistryHasReturnsTrueWhenTheFQNExists() + { + $registry = new FormFieldRegistry(); + $registry->add($this->getFormFieldMock('foo[bar]')); + + $this->assertTrue($registry->has('foo')); + $this->assertTrue($registry->has('foo[bar]')); + $this->assertFalse($registry->has('bar')); + $this->assertFalse($registry->has('foo[foo]')); + } + + public function testFormRegistryFieldsCanBeRemoved() + { + $registry = new FormFieldRegistry(); + $registry->add($this->getFormFieldMock('foo')); + $registry->remove('foo'); + $this->assertFalse($registry->has('foo')); + } + + public function testFormRegistrySupportsMultivaluedFields() + { + $registry = new FormFieldRegistry(); + $registry->add($this->getFormFieldMock('foo[]')); + $registry->add($this->getFormFieldMock('foo[]')); + $registry->add($this->getFormFieldMock('bar[5]')); + $registry->add($this->getFormFieldMock('bar[]')); + $registry->add($this->getFormFieldMock('bar[baz]')); + + $this->assertEquals( + array('foo[0]', 'foo[1]', 'bar[5]', 'bar[6]', 'bar[baz]'), + array_keys($registry->all()) + ); + } + + public function testFormRegistrySetValues() + { + $registry = new FormFieldRegistry(); + $registry->add($f2 = $this->getFormFieldMock('foo[2]')); + $registry->add($f3 = $this->getFormFieldMock('foo[3]')); + $registry->add($fbb = $this->getFormFieldMock('foo[bar][baz]')); + + $f2 + ->expects($this->exactly(2)) + ->method('setValue') + ->with(2) + ; + + $f3 + ->expects($this->exactly(2)) + ->method('setValue') + ->with(3) + ; + + $fbb + ->expects($this->exactly(2)) + ->method('setValue') + ->with('fbb') + ; + + $registry->set('foo[2]', 2); + $registry->set('foo[3]', 3); + $registry->set('foo[bar][baz]', 'fbb'); + + $registry->set('foo', array( + 2 => 2, + 3 => 3, + 'bar' => array( + 'baz' => 'fbb', + ), + )); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Cannot set value on a compound field "foo[bar]". + */ + public function testFormRegistrySetValueOnCompoundField() + { + $registry = new FormFieldRegistry(); + $registry->add($this->getFormFieldMock('foo[bar][baz]')); + + $registry->set('foo[bar]', 'fbb'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Unreachable field "0" + */ + public function testFormRegistrySetArrayOnNotCompoundField() + { + $registry = new FormFieldRegistry(); + $registry->add($this->getFormFieldMock('bar')); + + $registry->set('bar', array('baz')); + } + + public function testDifferentFieldTypesWithSameName() + { + $dom = new \DOMDocument(); + $dom->loadHTML(' + + +
    + + + + + + + + + + '); + $form = new Form($dom->getElementsByTagName('form')->item(0), 'http://example.com'); + + $this->assertInstanceOf('Symfony\Component\DomCrawler\Field\ChoiceFormField', $form->get('option')); + } + + protected function getFormFieldMock($name, $value = null) + { + $field = $this + ->getMockBuilder('Symfony\\Component\\DomCrawler\\Field\\FormField') + ->setMethods(array('getName', 'getValue', 'setValue', 'initialize')) + ->disableOriginalConstructor() + ->getMock() + ; + + $field + ->expects($this->any()) + ->method('getName') + ->will($this->returnValue($name)) + ; + + $field + ->expects($this->any()) + ->method('getValue') + ->will($this->returnValue($value)) + ; + + return $field; + } + + protected function createForm($form, $method = null, $currentUri = null) + { + $dom = new \DOMDocument(); + $dom->loadHTML(''.$form.''); + + $xPath = new \DOMXPath($dom); + $nodes = $xPath->query('//input | //button'); + + if (null === $currentUri) { + $currentUri = 'http://example.com/'; + } + + return new Form($nodes->item($nodes->length - 1), $currentUri, $method); + } + + protected function createTestHtml5Form() + { + $dom = new \DOMDocument(); + $dom->loadHTML(' + +

    Hello form

    +
    +
    + +
    + + + + +
    +
    +
    + + + +
    + +
    + +
    +
    +
    + + +
    + + + +
    +
    +
    + + + + +

    " layout: + * + * + * use Symfony\Component\Form\Extension\Templating\TemplatingExtension; + * + * $formFactory = Forms::createFormFactoryBuilder() + * ->addExtension(new TemplatingExtension($engine, null, array( + * 'FrameworkBundle:Form', + * 'FrameworkBundle:FormTable', + * ))) + * ->getFormFactory(); + * + * + * @author Bernhard Schussek + */ +final class Forms +{ + /** + * Creates a form factory with the default configuration. + * + * @return FormFactoryInterface The form factory + */ + public static function createFormFactory() + { + return self::createFormFactoryBuilder()->getFormFactory(); + } + + /** + * Creates a form factory builder with the default configuration. + * + * @return FormFactoryBuilderInterface The form factory builder + */ + public static function createFormFactoryBuilder() + { + $builder = new FormFactoryBuilder(); + $builder->addExtension(new CoreExtension()); + + return $builder; + } + + /** + * This class cannot be instantiated. + */ + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Guess/Guess.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Guess/Guess.php new file mode 100644 index 0000000000000000000000000000000000000000..36614ffdb9f93378cd974404775d6b32de2ed655 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Guess/Guess.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Guess; + +use Symfony\Component\Form\Exception\InvalidArgumentException; + +/** + * Base class for guesses made by TypeGuesserInterface implementation. + * + * Each instance contains a confidence value about the correctness of the guess. + * Thus an instance with confidence HIGH_CONFIDENCE is more likely to be + * correct than an instance with confidence LOW_CONFIDENCE. + * + * @author Bernhard Schussek + */ +abstract class Guess +{ + /** + * Marks an instance with a value that is extremely likely to be correct. + * + * @var int + */ + const VERY_HIGH_CONFIDENCE = 3; + + /** + * Marks an instance with a value that is very likely to be correct. + * + * @var int + */ + const HIGH_CONFIDENCE = 2; + + /** + * Marks an instance with a value that is likely to be correct. + * + * @var int + */ + const MEDIUM_CONFIDENCE = 1; + + /** + * Marks an instance with a value that may be correct. + * + * @var int + */ + const LOW_CONFIDENCE = 0; + + /** + * The confidence about the correctness of the value. + * + * One of VERY_HIGH_CONFIDENCE, HIGH_CONFIDENCE, MEDIUM_CONFIDENCE + * and LOW_CONFIDENCE. + * + * @var int + */ + private $confidence; + + /** + * Returns the guess most likely to be correct from a list of guesses. + * + * If there are multiple guesses with the same, highest confidence, the + * returned guess is any of them. + * + * @param Guess[] $guesses An array of guesses + * + * @return self|null + */ + public static function getBestGuess(array $guesses) + { + $result = null; + $maxConfidence = -1; + + foreach ($guesses as $guess) { + if ($maxConfidence < $confidence = $guess->getConfidence()) { + $maxConfidence = $confidence; + $result = $guess; + } + } + + return $result; + } + + /** + * Constructor. + * + * @param int $confidence The confidence + * + * @throws InvalidArgumentException if the given value of confidence is unknown + */ + public function __construct($confidence) + { + if (self::VERY_HIGH_CONFIDENCE !== $confidence && self::HIGH_CONFIDENCE !== $confidence && + self::MEDIUM_CONFIDENCE !== $confidence && self::LOW_CONFIDENCE !== $confidence) { + throw new InvalidArgumentException('The confidence should be one of the constants defined in Guess.'); + } + + $this->confidence = $confidence; + } + + /** + * Returns the confidence that the guessed value is correct. + * + * @return int One of the constants VERY_HIGH_CONFIDENCE, HIGH_CONFIDENCE, + * MEDIUM_CONFIDENCE and LOW_CONFIDENCE + */ + public function getConfidence() + { + return $this->confidence; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Guess/TypeGuess.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Guess/TypeGuess.php new file mode 100644 index 0000000000000000000000000000000000000000..87cc60a0f1ef5ab0e7f88977f46585371147d2c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Guess/TypeGuess.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Guess; + +/** + * Contains a guessed class name and a list of options for creating an instance + * of that class. + * + * @author Bernhard Schussek + */ +class TypeGuess extends Guess +{ + /** + * The guessed field type. + * + * @var string + */ + private $type; + + /** + * The guessed options for creating an instance of the guessed class. + * + * @var array + */ + private $options; + + /** + * Constructor. + * + * @param string $type The guessed field type + * @param array $options The options for creating instances of the + * guessed class + * @param int $confidence The confidence that the guessed class name + * is correct + */ + public function __construct($type, array $options, $confidence) + { + parent::__construct($confidence); + + $this->type = $type; + $this->options = $options; + } + + /** + * Returns the guessed field type. + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Returns the guessed options for creating instances of the guessed type. + * + * @return array + */ + public function getOptions() + { + return $this->options; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Guess/ValueGuess.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Guess/ValueGuess.php new file mode 100644 index 0000000000000000000000000000000000000000..fe40e020ccab899786915c522270faa216356974 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Guess/ValueGuess.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Guess; + +/** + * Contains a guessed value. + * + * @author Bernhard Schussek + */ +class ValueGuess extends Guess +{ + /** + * The guessed value. + * + * @var array + */ + private $value; + + /** + * Constructor. + * + * @param string $value The guessed value + * @param int $confidence The confidence that the guessed class name + * is correct + */ + public function __construct($value, $confidence) + { + parent::__construct($confidence); + + $this->value = $value; + } + + /** + * Returns the guessed value. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Form/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Form/NativeRequestHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Form/NativeRequestHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..3607feb99cc987283e9dc51baccb88e345fc2a9d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/NativeRequestHandler.php @@ -0,0 +1,227 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form; + +use Symfony\Component\Form\Exception\UnexpectedTypeException; +use Symfony\Component\Form\Util\ServerParams; + +/** + * A request handler using PHP's super globals $_GET, $_POST and $_SERVER. + * + * @author Bernhard Schussek + */ +class NativeRequestHandler implements RequestHandlerInterface +{ + /** + * @var ServerParams + */ + private $serverParams; + + /** + * {@inheritdoc} + */ + public function __construct(ServerParams $params = null) + { + $this->serverParams = $params ?: new ServerParams(); + } + + /** + * The allowed keys of the $_FILES array. + * + * @var array + */ + private static $fileKeys = array( + 'error', + 'name', + 'size', + 'tmp_name', + 'type', + ); + + /** + * {@inheritdoc} + */ + public function handleRequest(FormInterface $form, $request = null) + { + if (null !== $request) { + throw new UnexpectedTypeException($request, 'null'); + } + + $name = $form->getName(); + $method = $form->getConfig()->getMethod(); + + if ($method !== self::getRequestMethod()) { + return; + } + + // For request methods that must not have a request body we fetch data + // from the query string. Otherwise we look for data in the request body. + if ('GET' === $method || 'HEAD' === $method || 'TRACE' === $method) { + if ('' === $name) { + $data = $_GET; + } else { + // Don't submit GET requests if the form's name does not exist + // in the request + if (!isset($_GET[$name])) { + return; + } + + $data = $_GET[$name]; + } + } else { + // Mark the form with an error if the uploaded size was too large + // This is done here and not in FormValidator because $_POST is + // empty when that error occurs. Hence the form is never submitted. + if ($this->serverParams->hasPostMaxSizeBeenExceeded()) { + // Submit the form, but don't clear the default values + $form->submit(null, false); + + $form->addError(new FormError( + call_user_func($form->getConfig()->getOption('upload_max_size_message')), + null, + array('{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()) + )); + + return; + } + + $fixedFiles = array(); + foreach ($_FILES as $fileKey => $file) { + $fixedFiles[$fileKey] = self::stripEmptyFiles(self::fixPhpFilesArray($file)); + } + + if ('' === $name) { + $params = $_POST; + $files = $fixedFiles; + } elseif (array_key_exists($name, $_POST) || array_key_exists($name, $fixedFiles)) { + $default = $form->getConfig()->getCompound() ? array() : null; + $params = array_key_exists($name, $_POST) ? $_POST[$name] : $default; + $files = array_key_exists($name, $fixedFiles) ? $fixedFiles[$name] : $default; + } else { + // Don't submit the form if it is not present in the request + return; + } + + if (is_array($params) && is_array($files)) { + $data = array_replace_recursive($params, $files); + } else { + $data = $params ?: $files; + } + } + + // Don't auto-submit the form unless at least one field is present. + if ('' === $name && count(array_intersect_key($data, $form->all())) <= 0) { + return; + } + + $form->submit($data, 'PATCH' !== $method); + } + + /** + * Returns the method used to submit the request to the server. + * + * @return string The request method + */ + private static function getRequestMethod() + { + $method = isset($_SERVER['REQUEST_METHOD']) + ? strtoupper($_SERVER['REQUEST_METHOD']) + : 'GET'; + + if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) { + $method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']); + } + + return $method; + } + + /** + * Fixes a malformed PHP $_FILES array. + * + * PHP has a bug that the format of the $_FILES array differs, depending on + * whether the uploaded file fields had normal field names or array-like + * field names ("normal" vs. "parent[child]"). + * + * This method fixes the array to look like the "normal" $_FILES array. + * + * It's safe to pass an already converted array, in which case this method + * just returns the original array unmodified. + * + * This method is identical to {@link \Symfony\Component\HttpFoundation\FileBag::fixPhpFilesArray} + * and should be kept as such in order to port fixes quickly and easily. + * + * @param array $data + * + * @return array + */ + private static function fixPhpFilesArray($data) + { + if (!is_array($data)) { + return $data; + } + + $keys = array_keys($data); + sort($keys); + + if (self::$fileKeys !== $keys || !isset($data['name']) || !is_array($data['name'])) { + return $data; + } + + $files = $data; + foreach (self::$fileKeys as $k) { + unset($files[$k]); + } + + foreach ($data['name'] as $key => $name) { + $files[$key] = self::fixPhpFilesArray(array( + 'error' => $data['error'][$key], + 'name' => $name, + 'type' => $data['type'][$key], + 'tmp_name' => $data['tmp_name'][$key], + 'size' => $data['size'][$key], + )); + } + + return $files; + } + + /** + * Sets empty uploaded files to NULL in the given uploaded files array. + * + * @param mixed $data The file upload data + * + * @return array|null Returns the stripped upload data + */ + private static function stripEmptyFiles($data) + { + if (!is_array($data)) { + return $data; + } + + $keys = array_keys($data); + sort($keys); + + if (self::$fileKeys === $keys) { + if (UPLOAD_ERR_NO_FILE === $data['error']) { + return; + } + + return $data; + } + + foreach ($data as $key => $value) { + $data[$key] = self::stripEmptyFiles($value); + } + + return $data; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/PreloadedExtension.php b/vendor/symfony/symfony/src/Symfony/Component/Form/PreloadedExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..c9ab2bccaf961261b2b4634bf0234fe288b68fc2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/PreloadedExtension.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form; + +use Symfony\Component\Form\Exception\InvalidArgumentException; + +/** + * A form extension with preloaded types, type extensions and type guessers. + * + * @author Bernhard Schussek + */ +class PreloadedExtension implements FormExtensionInterface +{ + /** + * @var FormTypeInterface[] + */ + private $types = array(); + + /** + * @var array[FormTypeExtensionInterface[]] + */ + private $typeExtensions = array(); + + /** + * @var FormTypeGuesserInterface + */ + private $typeGuesser; + + /** + * Creates a new preloaded extension. + * + * @param FormTypeInterface[] $types The types that the extension should support + * @param FormTypeExtensionInterface[][] $typeExtensions The type extensions that the extension should support + * @param FormTypeGuesserInterface|null $typeGuesser The guesser that the extension should support + */ + public function __construct(array $types, array $typeExtensions, FormTypeGuesserInterface $typeGuesser = null) + { + $this->typeExtensions = $typeExtensions; + $this->typeGuesser = $typeGuesser; + + foreach ($types as $type) { + $this->types[get_class($type)] = $type; + } + } + + /** + * {@inheritdoc} + */ + public function getType($name) + { + if (!isset($this->types[$name])) { + throw new InvalidArgumentException(sprintf('The type "%s" can not be loaded by this extension', $name)); + } + + return $this->types[$name]; + } + + /** + * {@inheritdoc} + */ + public function hasType($name) + { + return isset($this->types[$name]); + } + + /** + * {@inheritdoc} + */ + public function getTypeExtensions($name) + { + return isset($this->typeExtensions[$name]) + ? $this->typeExtensions[$name] + : array(); + } + + /** + * {@inheritdoc} + */ + public function hasTypeExtensions($name) + { + return !empty($this->typeExtensions[$name]); + } + + /** + * {@inheritdoc} + */ + public function getTypeGuesser() + { + return $this->typeGuesser; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/README.md b/vendor/symfony/symfony/src/Symfony/Component/Form/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3fe6f8bbf320688eff1bb64b77ffba0c8fc11305 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/README.md @@ -0,0 +1,13 @@ +Form Component +============== + +The Form component allows you to easily create, process and reuse HTML forms. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/form/index.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/vendor/symfony/symfony/src/Symfony/Component/Form/RequestHandlerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Form/RequestHandlerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..598a7bb17438c1ccbbb86c4ae7b49e2498a558ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/RequestHandlerInterface.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form; + +/** + * Submits forms if they were submitted. + * + * @author Bernhard Schussek + */ +interface RequestHandlerInterface +{ + /** + * Submits a form if it was submitted. + * + * @param FormInterface $form The form to submit + * @param mixed $request The current request + */ + public function handleRequest(FormInterface $form, $request = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php b/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php new file mode 100644 index 0000000000000000000000000000000000000000..b71be3ceb0a5226b4d5e32fbf16e5e135bec10da --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php @@ -0,0 +1,240 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form; + +use Symfony\Component\Form\Exception\UnexpectedTypeException; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\OptionsResolver\OptionsResolver; + +/** + * A wrapper for a form type and its extensions. + * + * @author Bernhard Schussek + */ +class ResolvedFormType implements ResolvedFormTypeInterface +{ + /** + * @var FormTypeInterface + */ + private $innerType; + + /** + * @var FormTypeExtensionInterface[] + */ + private $typeExtensions; + + /** + * @var ResolvedFormTypeInterface|null + */ + private $parent; + + /** + * @var OptionsResolver + */ + private $optionsResolver; + + public function __construct(FormTypeInterface $innerType, array $typeExtensions = array(), ResolvedFormTypeInterface $parent = null) + { + foreach ($typeExtensions as $extension) { + if (!$extension instanceof FormTypeExtensionInterface) { + throw new UnexpectedTypeException($extension, 'Symfony\Component\Form\FormTypeExtensionInterface'); + } + } + + $this->innerType = $innerType; + $this->typeExtensions = $typeExtensions; + $this->parent = $parent; + } + + /** + * {@inheritdoc} + */ + public function getBlockPrefix() + { + return $this->innerType->getBlockPrefix(); + } + + /** + * {@inheritdoc} + */ + public function getParent() + { + return $this->parent; + } + + /** + * {@inheritdoc} + */ + public function getInnerType() + { + return $this->innerType; + } + + /** + * {@inheritdoc} + */ + public function getTypeExtensions() + { + return $this->typeExtensions; + } + + /** + * {@inheritdoc} + */ + public function createBuilder(FormFactoryInterface $factory, $name, array $options = array()) + { + $options = $this->getOptionsResolver()->resolve($options); + + // Should be decoupled from the specific option at some point + $dataClass = isset($options['data_class']) ? $options['data_class'] : null; + + $builder = $this->newBuilder($name, $dataClass, $factory, $options); + $builder->setType($this); + + return $builder; + } + + /** + * {@inheritdoc} + */ + public function createView(FormInterface $form, FormView $parent = null) + { + return $this->newView($parent); + } + + /** + * Configures a form builder for the type hierarchy. + * + * @param FormBuilderInterface $builder The builder to configure + * @param array $options The options used for the configuration + */ + public function buildForm(FormBuilderInterface $builder, array $options) + { + if (null !== $this->parent) { + $this->parent->buildForm($builder, $options); + } + + $this->innerType->buildForm($builder, $options); + + foreach ($this->typeExtensions as $extension) { + $extension->buildForm($builder, $options); + } + } + + /** + * Configures a form view for the type hierarchy. + * + * This method is called before the children of the view are built. + * + * @param FormView $view The form view to configure + * @param FormInterface $form The form corresponding to the view + * @param array $options The options used for the configuration + */ + public function buildView(FormView $view, FormInterface $form, array $options) + { + if (null !== $this->parent) { + $this->parent->buildView($view, $form, $options); + } + + $this->innerType->buildView($view, $form, $options); + + foreach ($this->typeExtensions as $extension) { + $extension->buildView($view, $form, $options); + } + } + + /** + * Finishes a form view for the type hierarchy. + * + * This method is called after the children of the view have been built. + * + * @param FormView $view The form view to configure + * @param FormInterface $form The form corresponding to the view + * @param array $options The options used for the configuration + */ + public function finishView(FormView $view, FormInterface $form, array $options) + { + if (null !== $this->parent) { + $this->parent->finishView($view, $form, $options); + } + + $this->innerType->finishView($view, $form, $options); + + foreach ($this->typeExtensions as $extension) { + /* @var FormTypeExtensionInterface $extension */ + $extension->finishView($view, $form, $options); + } + } + + /** + * Returns the configured options resolver used for this type. + * + * @return \Symfony\Component\OptionsResolver\OptionsResolver The options resolver + */ + public function getOptionsResolver() + { + if (null === $this->optionsResolver) { + if (null !== $this->parent) { + $this->optionsResolver = clone $this->parent->getOptionsResolver(); + } else { + $this->optionsResolver = new OptionsResolver(); + } + + $this->innerType->configureOptions($this->optionsResolver); + + foreach ($this->typeExtensions as $extension) { + $extension->configureOptions($this->optionsResolver); + } + } + + return $this->optionsResolver; + } + + /** + * Creates a new builder instance. + * + * Override this method if you want to customize the builder class. + * + * @param string $name The name of the builder + * @param string $dataClass The data class + * @param FormFactoryInterface $factory The current form factory + * @param array $options The builder options + * + * @return FormBuilderInterface The new builder instance + */ + protected function newBuilder($name, $dataClass, FormFactoryInterface $factory, array $options) + { + if ($this->innerType instanceof ButtonTypeInterface) { + return new ButtonBuilder($name, $options); + } + + if ($this->innerType instanceof SubmitButtonTypeInterface) { + return new SubmitButtonBuilder($name, $options); + } + + return new FormBuilder($name, $dataClass, new EventDispatcher(), $factory, $options); + } + + /** + * Creates a new view instance. + * + * Override this method if you want to customize the view class. + * + * @param FormView|null $parent The parent view, if available + * + * @return FormView A new view instance + */ + protected function newView(FormView $parent = null) + { + return new FormView($parent); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeFactory.php b/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..d93d1c06dfdf3cb6ce67f791d42f22ba56d0dc09 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeFactory.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form; + +/** + * @author Bernhard Schussek + */ +class ResolvedFormTypeFactory implements ResolvedFormTypeFactoryInterface +{ + /** + * {@inheritdoc} + */ + public function createResolvedType(FormTypeInterface $type, array $typeExtensions, ResolvedFormTypeInterface $parent = null) + { + return new ResolvedFormType($type, $typeExtensions, $parent); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeFactoryInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeFactoryInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..3240d77f4f3bc60b1fd5bdb7178d1c2974b2e5a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeFactoryInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form; + +/** + * Creates ResolvedFormTypeInterface instances. + * + * This interface allows you to use your custom ResolvedFormTypeInterface + * implementation, within which you can customize the concrete FormBuilderInterface + * implementations or FormView subclasses that are used by the framework. + * + * @author Bernhard Schussek + */ +interface ResolvedFormTypeFactoryInterface +{ + /** + * Resolves a form type. + * + * @param FormTypeInterface $type + * @param FormTypeExtensionInterface[] $typeExtensions + * @param ResolvedFormTypeInterface|null $parent + * + * @return ResolvedFormTypeInterface + * + * @throws Exception\UnexpectedTypeException if the types parent {@link FormTypeInterface::getParent()} is not a string + * @throws Exception\InvalidArgumentException if the types parent can not be retrieved from any extension + */ + public function createResolvedType(FormTypeInterface $type, array $typeExtensions, ResolvedFormTypeInterface $parent = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..dc3b81d2fa2a845bbfd1d187ae35bf52fdda6dca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormTypeInterface.php @@ -0,0 +1,108 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form; + +use Symfony\Component\OptionsResolver\OptionsResolver; + +/** + * A wrapper for a form type and its extensions. + * + * @author Bernhard Schussek + */ +interface ResolvedFormTypeInterface +{ + /** + * Returns the prefix of the template block name for this type. + * + * @return string The prefix of the template block name + */ + public function getBlockPrefix(); + + /** + * Returns the parent type. + * + * @return self|null The parent type or null + */ + public function getParent(); + + /** + * Returns the wrapped form type. + * + * @return FormTypeInterface The wrapped form type + */ + public function getInnerType(); + + /** + * Returns the extensions of the wrapped form type. + * + * @return FormTypeExtensionInterface[] An array of {@link FormTypeExtensionInterface} instances + */ + public function getTypeExtensions(); + + /** + * Creates a new form builder for this type. + * + * @param FormFactoryInterface $factory The form factory + * @param string $name The name for the builder + * @param array $options The builder options + * + * @return FormBuilderInterface The created form builder + */ + public function createBuilder(FormFactoryInterface $factory, $name, array $options = array()); + + /** + * Creates a new form view for a form of this type. + * + * @param FormInterface $form The form to create a view for + * @param FormView $parent The parent view or null + * + * @return FormView The created form view + */ + public function createView(FormInterface $form, FormView $parent = null); + + /** + * Configures a form builder for the type hierarchy. + * + * @param FormBuilderInterface $builder The builder to configure + * @param array $options The options used for the configuration + */ + public function buildForm(FormBuilderInterface $builder, array $options); + + /** + * Configures a form view for the type hierarchy. + * + * It is called before the children of the view are built. + * + * @param FormView $view The form view to configure + * @param FormInterface $form The form corresponding to the view + * @param array $options The options used for the configuration + */ + public function buildView(FormView $view, FormInterface $form, array $options); + + /** + * Finishes a form view for the type hierarchy. + * + * It is called after the children of the view have been built. + * + * @param FormView $view The form view to configure + * @param FormInterface $form The form corresponding to the view + * @param array $options The options used for the configuration + */ + public function finishView(FormView $view, FormInterface $form, array $options); + + /** + * Returns the configured options resolver used for this type. + * + * @return OptionsResolver The options resolver + */ + public function getOptionsResolver(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/config/validation.xml b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/config/validation.xml new file mode 100644 index 0000000000000000000000000000000000000000..2f2364bde48913fe4bc531647031be27c2ecb918 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/config/validation.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ar.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ar.xlf new file mode 100644 index 0000000000000000000000000000000000000000..990b039d63d4cfcfd0b50ba04d4c77283c219aa4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ar.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + هذا النموذج يجب الا يحتوى على اى حقول اضاÙية. + + + The uploaded file was too large. Please try to upload a smaller file. + مساحة المل٠المرسل كبيرة. من ÙØ¶Ù„Ùƒ حاول ارسال مل٠اصغر. + + + The CSRF token is invalid. Please try to resubmit the form. + قيمة رمز الموقع غير صحيحة. من ÙØ¶Ù„Ùƒ اعد ارسال النموذج. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.az.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.az.xlf new file mode 100644 index 0000000000000000000000000000000000000000..69e447385acda996bb3b3a6e55928cd8aa757dd8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.az.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Bu formada É™lavÉ™ sahÉ™ olmamalıdır. + + + The uploaded file was too large. Please try to upload a smaller file. + YüklÉ™nÉ™n fayl çox böyükdür. LütfÉ™n daha kiçik fayl yüklÉ™yin. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF niÅŸanı yanlışdır. Lütfen formanı yenidÉ™n göndÉ™rin. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.bg.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.bg.xlf new file mode 100644 index 0000000000000000000000000000000000000000..5c768c305f9eedc3275c2ab57cc08039ceaf0523 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.bg.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Тази форма не трÑбва да Ñъдържа допълнителни полета. + + + The uploaded file was too large. Please try to upload a smaller file. + КачениÑÑ‚ файл е твърде голÑм. МолÑ, опитайте да качите по-малък файл. + + + The CSRF token is invalid. Please try to resubmit the form. + Ðевалиден CSRF токен. МолÑ, опитайте да изпратите формата отново. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ca.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ca.xlf new file mode 100644 index 0000000000000000000000000000000000000000..3a2fa484f8496eec1c26350381294347ae24d86f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ca.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Aquest formulari no hauria de contenir camps addicionals. + + + The uploaded file was too large. Please try to upload a smaller file. + L'arxiu pujat és massa gran. Per favor, pugi un arxiu més petit. + + + The CSRF token is invalid. Please try to resubmit the form. + El token CSRF no és vàlid. Per favor, provi d'enviar novament el formulari. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.cs.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.cs.xlf new file mode 100644 index 0000000000000000000000000000000000000000..776da49481816b6e16ca5193223dfa822bc13fec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.cs.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Tato skupina polí nesmí obsahovat další pole. + + + The uploaded file was too large. Please try to upload a smaller file. + Nahraný soubor je příliÅ¡ velký. Nahrajte prosím menší soubor. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF token je neplatný. Zkuste prosím znovu odeslat formulář. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.da.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.da.xlf new file mode 100644 index 0000000000000000000000000000000000000000..c2dd4601f90899bd3813a9778e7273b2ab67f55b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.da.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Feltgruppen mÃ¥ ikke indeholde ekstra felter. + + + The uploaded file was too large. Please try to upload a smaller file. + Den oploadede fil var for stor. Opload venligst en mindre fil. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF nøglen er ugyldig. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.de.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.de.xlf new file mode 100644 index 0000000000000000000000000000000000000000..a9a183197edc6b5090704fab302176856038980c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.de.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Dieses Formular sollte keine zusätzlichen Felder enthalten. + + + The uploaded file was too large. Please try to upload a smaller file. + Die hochgeladene Datei ist zu groß. Versuchen Sie bitte eine kleinere Datei hochzuladen. + + + The CSRF token is invalid. Please try to resubmit the form. + Der CSRF-Token ist ungültig. Versuchen Sie bitte das Formular erneut zu senden. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.el.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.el.xlf new file mode 100644 index 0000000000000000000000000000000000000000..ba2ced74b0111478651a91a83e655c0b87896fd0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.el.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Αυτή η φόÏμα δεν Ï€Ïέπει να πεÏιέχει επιπλέον πεδία. + + + The uploaded file was too large. Please try to upload a smaller file. + Το αÏχείο είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿. ΠαÏακαλοÏμε Ï€Ïοσπαθήστε να ανεβάσετε ένα μικÏότεÏο αÏχείο. + + + The CSRF token is invalid. Please try to resubmit the form. + Το CSRF token δεν είναι έγκυÏο. ΠαÏακαλοÏμε δοκιμάστε να υποβάλετε τη φόÏμα ξανά. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.en.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.en.xlf new file mode 100644 index 0000000000000000000000000000000000000000..b8542d319ddec08e9052bac312b91d3cdb6d3a09 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.en.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + This form should not contain extra fields. + + + The uploaded file was too large. Please try to upload a smaller file. + The uploaded file was too large. Please try to upload a smaller file. + + + The CSRF token is invalid. Please try to resubmit the form. + The CSRF token is invalid. Please try to resubmit the form. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.es.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.es.xlf new file mode 100644 index 0000000000000000000000000000000000000000..b609e53e5600a7c7b076918d0105ad298c3cf242 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.es.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Este formulario no debería contener campos adicionales. + + + The uploaded file was too large. Please try to upload a smaller file. + El archivo subido es demasiado grande. Por favor, suba un archivo más pequeño. + + + The CSRF token is invalid. Please try to resubmit the form. + El token CSRF no es válido. Por favor, pruebe a enviar nuevamente el formulario. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.et.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.et.xlf new file mode 100644 index 0000000000000000000000000000000000000000..1a9867fa209534b3dc014ac1b1d78d5eb9e9e07a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.et.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Väljade grupp ei tohiks sisalda lisaväljasid. + + + The uploaded file was too large. Please try to upload a smaller file. + Üleslaaditud fail oli liiga suur. Palun proovi uuesti väiksema failiga. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF-märgis on vigane. Palun proovi vormi uuesti esitada. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.eu.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.eu.xlf new file mode 100644 index 0000000000000000000000000000000000000000..ba741ab0fc53cba3f3f5342b845d2c65a2793a79 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.eu.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Formulario honek ez luke aparteko eremurik eduki behar. + + + The uploaded file was too large. Please try to upload a smaller file. + Igotako fitxategia handiegia da. Mesedez saiatu fitxategi txikiago bat igotzen. + + + The CSRF token is invalid. + CSRF tokena ez da egokia. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fa.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fa.xlf new file mode 100644 index 0000000000000000000000000000000000000000..468d2f6fdd8dd2a73cdb0b21942c9d5ce2c28c88 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fa.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + این ÙØ±Ù… نباید Ùیلد اضاÙÛŒ داشته باشد. + + + The uploaded file was too large. Please try to upload a smaller file. + ÙØ§ÛŒÙ„ بارگذاری شده بسیار بزرگ است. Ù„Ø·ÙØ§ ÙØ§ÛŒÙ„ کوچکتری را بارگزاری کنید. + + + The CSRF token is invalid. Please try to resubmit the form. + مقدار CSRF نامعتبر است. Ù„Ø·ÙØ§ ÙØ±Ù… را مجددا ارسال ÙØ±Ù…ایید.. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fi.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fi.xlf new file mode 100644 index 0000000000000000000000000000000000000000..4eb393aee90b1044c6310f3495976f4d864914cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fi.xlf @@ -0,0 +1,19 @@ + + + + + + This field group should not contain extra fields. + Tämä kenttäryhmä ei voi sisältää ylimääräisiä kenttiä. + + + The uploaded file was too large. Please try to upload a smaller file. + Ladattu tiedosto on liian iso. Ole hyvä ja lataa pienempi tiedosto. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF tarkiste on virheellinen. Ole hyvä ja yritä lähettää lomake uudestaan. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fr.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fr.xlf new file mode 100644 index 0000000000000000000000000000000000000000..21f9010143afc6bce25345b0f1770266cc4a3336 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fr.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Ce formulaire ne doit pas contenir des champs supplémentaires. + + + The uploaded file was too large. Please try to upload a smaller file. + Le fichier téléchargé est trop volumineux. Merci d'essayer d'envoyer un fichier plus petit. + + + The CSRF token is invalid. Please try to resubmit the form. + Le jeton CSRF est invalide. Veuillez renvoyer le formulaire. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.gl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.gl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..88cc6536ead7f547de19ea58558b4f82756e8dd3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.gl.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Este formulario non debería conter campos adicionais. + + + The uploaded file was too large. Please try to upload a smaller file. + O arquivo subido é demasiado grande. Por favor, suba un arquivo máis pequeno. + + + The CSRF token is invalid. Please try to resubmit the form. + O token CSRF non é válido. Por favor, probe a enviar novamente o formulario. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.he.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.he.xlf new file mode 100644 index 0000000000000000000000000000000000000000..74a71d05a31a848e1197acdd596852885486c402 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.he.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + הטופס ×œ× ×¦×¨×™×š להכיל שדות נוספי×. + + + The uploaded file was too large. Please try to upload a smaller file. + הקובץ שהועלה גדול מדי. נסה להעלות קובץ קטן יותר. + + + The CSRF token is invalid. Please try to resubmit the form. + ×סימון CSRF ×ינו חוקי. ×× × × ×¡×” לשלוח שוב ×ת הטופס. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hr.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hr.xlf new file mode 100644 index 0000000000000000000000000000000000000000..8d0bd29201ef9ca07da5b6c52816286e6e08a35b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hr.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Ovaj obrazac ne smije sadržavati dodatna polja. + + + The uploaded file was too large. Please try to upload a smaller file. + Prenesena datoteka je prevelika. Molim pokuÅ¡ajte prenijeti manju datoteku. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF vrijednost nije ispravna. PokuÅ¡ajte ponovo poslati obrazac. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hu.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hu.xlf new file mode 100644 index 0000000000000000000000000000000000000000..374cfaaea34aceb7a53bd18d81d4ddca43076864 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hu.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Ez a mezÅ‘csoport nem tartalmazhat extra mezÅ‘ket. + + + The uploaded file was too large. Please try to upload a smaller file. + A feltöltött fájl túl nagy. Kérem, próbáljon egy kisebb fájlt feltölteni. + + + The CSRF token is invalid. Please try to resubmit the form. + Érvénytelen CSRF token. Kérem, próbálja újra elküldeni az űrlapot. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hy.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hy.xlf new file mode 100644 index 0000000000000000000000000000000000000000..5a6091f890545324b6b8d6cf78922948ec2905f6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hy.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Ô±ÕµÕ½ Õ±Ö‡Õ¨ Õ¹ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ« Õ¬Ö€Õ¡ÖÕ¸Ö‚ÖÕ«Õ¹ Õ¿Õ¸Õ²Õ¥Ö€. + + + The uploaded file was too large. Please try to upload a smaller file. + ÕŽÕ¥Ö€Õ¢Õ¥Õ¼Õ¶Õ¾Õ¡Õ® Ö†Õ¡ÕµÕ¬Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ´Õ¥Õ® Õ§: Ô½Õ¶Õ¤Ö€Õ¾Õ¸Ö‚Õ´ Õ§ Õ¾Õ¥Ö€Õ¢Õ¥Õ¼Õ¶Õ¥Õ¬ Õ¡Õ¾Õ¥Õ¬Õ« ÖƒÕ¸Ö„Ö€ Õ¹Õ¡ÖƒÕ½Õ« Ö†Õ¡ÕµÕ¬. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF Õ¡Ö€ÕªÕ¥Ö„Õ¨ Õ¡Õ¶Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¥Õ¬Õ« Õ§: Õ“Õ¸Ö€Õ±Õ¥Ö„ Õ¶Õ¸Ö€Õ«Ö Õ¸Ö‚Õ²Õ¡Ö€Õ¯Õ¥Õ¬ Õ±Ö‡Õ¨. + + + + \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.id.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.id.xlf new file mode 100644 index 0000000000000000000000000000000000000000..b067d98474facf8736c796b39370d230e9032bdc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.id.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Gabungan kolom tidak boleh mengandung kolom tambahan. + + + The uploaded file was too large. Please try to upload a smaller file. + Berkas yang di unggah terlalu besar. Silahkan coba unggah berkas yang lebih kecil. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF-Token tidak sah. Silahkan coba kirim ulang formulir. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.it.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.it.xlf new file mode 100644 index 0000000000000000000000000000000000000000..aa15264d9faad4e4846514ec8a529930a4b55ee0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.it.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Questo form non dovrebbe contenere nessun campo extra. + + + The uploaded file was too large. Please try to upload a smaller file. + Il file caricato è troppo grande. Per favore caricare un file più piccolo. + + + The CSRF token is invalid. Please try to resubmit the form. + Il token CSRF non è valido. Provare a reinviare il form. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf new file mode 100644 index 0000000000000000000000000000000000000000..0db5eddbe68a62fc6ca1658ad90b7ca1bea3736a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + フィールドグループã«è¿½åŠ ã®ãƒ•ィールドをå«ã‚“ã§ã¯ãªã‚Šã¾ã›ã‚“。 + + + The uploaded file was too large. Please try to upload a smaller file. + アップロードã•れãŸãƒ•ァイルãŒå¤§ãã™ãŽã¾ã™ã€‚å°ã•ãªãƒ•ァイルã§å†åº¦ã‚¢ãƒƒãƒ—ロードã—ã¦ãã ã•ã„。 + + + The CSRF token is invalid. Please try to resubmit the form. + CSRFトークンãŒç„¡åйã§ã™ã€å†é€ä¿¡ã—ã¦ãã ã•ã„。 + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lb.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lb.xlf new file mode 100644 index 0000000000000000000000000000000000000000..a111ffe3951cded0d34dc0538e12479914ac4429 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lb.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Dës Feldergrupp sollt keng zousätzlech Felder enthalen. + + + The uploaded file was too large. Please try to upload a smaller file. + De geschécktene Fichier ass ze grouss. Versicht wann ech gelift ee méi klenge Fichier eropzelueden. + + + The CSRF token is invalid. Please try to resubmit the form. + Den CSRF-Token ass ongëlteg. Versicht wann ech gelift de Formulaire nach eng Kéier ze schécken. + + + + \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lt.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lt.xlf new file mode 100644 index 0000000000000000000000000000000000000000..25f30887bc1bf2da9d472b67336d2b458f0a8207 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lt.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Forma negali turÄ—ti papildomų laukų. + + + The uploaded file was too large. Please try to upload a smaller file. + Ä®kelta byla yra per didelÄ—. bandykite įkelti mažesnÄ™. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF kodas nepriimtinas. Bandykite siųsti formos užklausÄ… dar kartÄ…. + + + + \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lv.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lv.xlf new file mode 100644 index 0000000000000000000000000000000000000000..9cdfb2cd4864f88a780fbd9d155d34c2ce68d2bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lv.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Å ajÄ veidlapÄ nevajadzÄ“tu bÅ«t papildus ievades laukiem. + + + The uploaded file was too large. Please try to upload a smaller file. + AugÅ¡upielÄdÄ“tÄ faila izmÄ“rs bija par lielu. LÅ«dzu mēģiniet augÅ¡upielÄdÄ“t mazÄka izmÄ“ra failu. + + + The CSRF token is invalid. Please try to resubmit the form. + Dotais CSRF talons nav derÄ«gs. LÅ«dzu mēģiniet vÄ“lreiz iesniegt veidlapu. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.mn.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.mn.xlf new file mode 100644 index 0000000000000000000000000000000000000000..002b01c175b8f5ce616c9505d65eff4de8c7eeaf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.mn.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Форм нÑмÑлт талбар багтаах боломжгүй. + + + The uploaded file was too large. Please try to upload a smaller file. + Upload хийÑÑн файл Ñ…ÑÑ‚Ñрхий том байна. Бага Ñ…ÑмжÑÑÑ‚Ñй файл оруулна уу. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF token буруу байна. Формоо дахин илгÑÑÐ½Ñ Ò¯Ò¯. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.nl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.nl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..3d737d79c1d56e0a37b8e9505965191092b59ea6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.nl.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Dit formulier mag geen extra velden bevatten. + + + The uploaded file was too large. Please try to upload a smaller file. + Het geüploade bestand is te groot. Probeer een kleiner bestand te uploaden. + + + The CSRF token is invalid. Please try to resubmit the form. + De CSRF-token is ongeldig. Probeer het formulier opnieuw te versturen. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.no.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.no.xlf new file mode 100644 index 0000000000000000000000000000000000000000..c64266c99189b67cd2da5157a9a2bad6df86d67d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.no.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Feltgruppen mÃ¥ ikke inneholde ekstra felter. + + + The uploaded file was too large. Please try to upload a smaller file. + Den opplastede filen var for stor. Vennligst last opp en mindre fil. + + + The CSRF token is invalid. + CSRF nøkkelen er ugyldig. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..64def2a69135c53f7d9902846ae791243775de9a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pl.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Ten formularz nie powinien zawierać dodatkowych pól. + + + The uploaded file was too large. Please try to upload a smaller file. + Wgrany plik byÅ‚ za duży. ProszÄ™ spróbować wgrać mniejszy plik. + + + The CSRF token is invalid. Please try to resubmit the form. + Token CSRF jest nieprawidÅ‚owy. ProszÄ™ spróbować wysÅ‚ać formularz ponownie. + + + + \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt.xlf new file mode 100644 index 0000000000000000000000000000000000000000..554a810c68673e1210e83852cc3c336b1273db5d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Este formulário não deveria conter campos extra. + + + The uploaded file was too large. Please try to upload a smaller file. + O arquivo enviado é muito grande. Por favor, tente enviar um ficheiro mais pequeno. + + + The CSRF token is invalid. Please try to resubmit the form. + O token CSRF é inválido. Por favor submeta o formulário novamente. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf new file mode 100644 index 0000000000000000000000000000000000000000..9ae4d719126b5d3e0b51130e3462e6106fe590e1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Este formulário não deve conter campos adicionais. + + + The uploaded file was too large. Please try to upload a smaller file. + O arquivo enviado é muito grande. Por favor, tente enviar um arquivo menor. + + + The CSRF token is invalid. Please try to resubmit the form. + O token CSRF é inválido. Por favor, tente reenviar o formulário. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ro.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ro.xlf new file mode 100644 index 0000000000000000000000000000000000000000..25abab3b6f14816fecf5d409d258f12dc31c171d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ro.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Aceast formular nu ar trebui să conÈ›ină câmpuri suplimentare. + + + The uploaded file was too large. Please try to upload a smaller file. + FiÈ™ierul încărcat a fost prea mare. Vă rugăm sa încărcaÈ›i un fiÈ™ier mai mic. + + + The CSRF token is invalid. Please try to resubmit the form. + Token-ul CSRF este invalid. Vă rugăm să trimiteÈ›i formularul incă o dată. + + + + \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ru.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ru.xlf new file mode 100644 index 0000000000000000000000000000000000000000..8d829f1b46ea4ae528e956e35168c39878246625 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ru.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Эта форма не должна Ñодержать дополнительных полей. + + + The uploaded file was too large. Please try to upload a smaller file. + Загруженный файл Ñлишком большой. ПожалуйÑта, попробуйте загрузить файл меньшего размера. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF значение недопуÑтимо. ПожалуйÑта, попробуйте повторить отправку формы. + + + + \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sk.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sk.xlf new file mode 100644 index 0000000000000000000000000000000000000000..638d0cc4a0b3e3a62a644681247d853364745081 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sk.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Polia by nemali obsahovaÅ¥ ÄalÅ¡ie prvky. + + + The uploaded file was too large. Please try to upload a smaller file. + Odoslaný súbor je príliÅ¡ veľký. Prosím odoÅ¡lite súbor s menÅ¡ou veľkosÅ¥ou. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF token je neplatný. Prosím skúste znovu odoslaÅ¥ formulár. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..cd68c1a1e53772f1ef4cb416a30621e752f475e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sl.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Ta obrazec ne sme vsebovati dodatnih polj. + + + The uploaded file was too large. Please try to upload a smaller file. + Naložena datoteka je prevelika. Prosimo, poizkusite naložiti manjÅ¡o. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF vrednost je napaÄna. Prosimo, ponovno poÅ¡ljite obrazec. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..ff7f550adff3c1effa65f9aab7c9944cd2a8481d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Овај формулар не треба да Ñадржи додатна поља. + + + The uploaded file was too large. Please try to upload a smaller file. + Отпремљена датотека је била превелика. Молим покушајте отпремање мање датотеке. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF вредноÑÑ‚ је невалидна. Покушајте поново. + + + + \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf new file mode 100644 index 0000000000000000000000000000000000000000..6c4be3585718e0501d92c94693823b45b11a0234 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Ovaj formular ne treba da sadrži dodatna polja. + + + The uploaded file was too large. Please try to upload a smaller file. + Otpremljena datoteka je bila prevelika. Molim pokuÅ¡ajte otpremanje manje datoteke. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF vrednost je nevalidna. PokuÅ¡ajte ponovo. + + + + \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf new file mode 100644 index 0000000000000000000000000000000000000000..4e2518b16b19c287a1943845a9596cfde91ec99a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Formuläret kan inte innehÃ¥lla extra fält. + + + The uploaded file was too large. Please try to upload a smaller file. + Den uppladdade filen var för stor. Försök ladda upp en mindre fil. + + + The CSRF token is invalid. + CSRF-symbolen är inte giltig. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.uk.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.uk.xlf new file mode 100644 index 0000000000000000000000000000000000000000..4c739face54f862452b28de1b6f61a24174c0245 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.uk.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + Ð¦Ñ Ñ„Ð¾Ñ€Ð¼Ð° не повинна міÑтити додаткових полів. + + + The uploaded file was too large. Please try to upload a smaller file. + Завантажений файл занадто великий. Будь-лаÑка, Ñпробуйте завантажити файл меншого розміру. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½ÐµÐ´Ð¾Ð¿ÑƒÑтиме. Будь-лаÑка, Ñпробуйте відправити форму знову. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf new file mode 100644 index 0000000000000000000000000000000000000000..8bdf7fb5ca0bcabb35d1c830c3df7962c4023373 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf @@ -0,0 +1,19 @@ + + + + + + This form should not contain extra fields. + 该表å•中ä¸å¯æœ‰é¢å¤–字段. + + + The uploaded file was too large. Please try to upload a smaller file. + 上传文件太大, è¯·é‡æ–°å°è¯•上传一个较å°çš„æ–‡ä»¶. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF 验è¯ç¬¦æ— æ•ˆï¼Œ è¯·é‡æ–°æäº¤. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/ReversedTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Form/ReversedTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..fc5cd12bc37c27fb832a14015bc5f4150a1424ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/ReversedTransformer.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form; + +/** + * Reverses a transformer. + * + * When the transform() method is called, the reversed transformer's + * reverseTransform() method is called and vice versa. + * + * @author Bernhard Schussek + */ +class ReversedTransformer implements DataTransformerInterface +{ + /** + * The reversed transformer. + * + * @var DataTransformerInterface + */ + protected $reversedTransformer; + + /** + * Reverses this transformer. + * + * @param DataTransformerInterface $reversedTransformer + */ + public function __construct(DataTransformerInterface $reversedTransformer) + { + $this->reversedTransformer = $reversedTransformer; + } + + /** + * {@inheritdoc} + */ + public function transform($value) + { + return $this->reversedTransformer->reverseTransform($value); + } + + /** + * {@inheritdoc} + */ + public function reverseTransform($value) + { + return $this->reversedTransformer->transform($value); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/SubmitButton.php b/vendor/symfony/symfony/src/Symfony/Component/Form/SubmitButton.php new file mode 100644 index 0000000000000000000000000000000000000000..4bfc1b6465819c513b9c41f50cef2883788d9181 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/SubmitButton.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form; + +/** + * A button that submits the form. + * + * @author Bernhard Schussek + */ +class SubmitButton extends Button implements ClickableInterface +{ + /** + * @var bool + */ + private $clicked = false; + + /** + * {@inheritdoc} + */ + public function isClicked() + { + return $this->clicked; + } + + /** + * Submits data to the button. + * + * @param null|string $submittedData The data + * @param bool $clearMissing Not used + * + * @return $this + * + * @throws Exception\AlreadySubmittedException If the form has already been submitted. + */ + public function submit($submittedData, $clearMissing = true) + { + parent::submit($submittedData, $clearMissing); + + $this->clicked = null !== $submittedData; + + return $this; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/SubmitButtonBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Form/SubmitButtonBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..931f399daf24398386f30345ffdd154d99111545 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/SubmitButtonBuilder.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\Form; + +/** + * A builder for {@link SubmitButton} instances. + * + * @author Bernhard Schussek + */ +class SubmitButtonBuilder extends ButtonBuilder +{ + /** + * Creates the button. + * + * @return SubmitButton The button + */ + public function getForm() + { + return new SubmitButton($this->getFormConfig()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/SubmitButtonTypeInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Form/SubmitButtonTypeInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..f7ac13f7ec92e9f40b71a6da12bf536f1791c3f9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/SubmitButtonTypeInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form; + +/** + * A type that should be converted into a {@link SubmitButton} instance. + * + * @author Bernhard Schussek + */ +interface SubmitButtonTypeInterface extends FormTypeInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormBuilderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormBuilderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..185a8a12d621f5dca60921164e836aa2e4f26bc1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormBuilderInterface.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Test; + +use Symfony\Component\Form\FormBuilderInterface as BaseFormBuilderInterface; + +interface FormBuilderInterface extends \Iterator, BaseFormBuilderInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormIntegrationTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormIntegrationTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..a5c0b23384d9b758b3a40593527b8667e587fb40 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormIntegrationTestCase.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Test; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Forms; +use Symfony\Component\Form\FormFactoryInterface; + +/** + * @author Bernhard Schussek + */ +abstract class FormIntegrationTestCase extends TestCase +{ + /** + * @var FormFactoryInterface + */ + protected $factory; + + protected function setUp() + { + $this->factory = Forms::createFormFactoryBuilder() + ->addExtensions($this->getExtensions()) + ->getFormFactory(); + } + + protected function getExtensions() + { + return array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..4af46030870cf8d75664c00da3b6e12c65f75ff6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormInterface.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Test; + +use Symfony\Component\Form\FormInterface as BaseFormInterface; + +interface FormInterface extends \Iterator, BaseFormInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..75ddba621278fc9070d541f3370692182f5ecbe6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Test; + +/** + * Base class for performance tests. + * + * Copied from Doctrine 2's OrmPerformanceTestCase. + * + * @author robo + * @author Bernhard Schussek + */ +abstract class FormPerformanceTestCase extends FormIntegrationTestCase +{ + /** + * @var int + */ + protected $maxRunningTime = 0; + + /** + * {@inheritdoc} + */ + protected function runTest() + { + $s = microtime(true); + parent::runTest(); + $time = microtime(true) - $s; + + if ($this->maxRunningTime != 0 && $time > $this->maxRunningTime) { + $this->fail( + sprintf( + 'expected running time: <= %s but was: %s', + + $this->maxRunningTime, + $time + ) + ); + } + } + + /** + * @param int $maxRunningTime + * + * @throws \InvalidArgumentException + */ + public function setMaxRunningTime($maxRunningTime) + { + if (is_int($maxRunningTime) && $maxRunningTime >= 0) { + $this->maxRunningTime = $maxRunningTime; + } else { + throw new \InvalidArgumentException(); + } + } + + /** + * @return int + */ + public function getMaxRunningTime() + { + return $this->maxRunningTime; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Test/TypeTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Test/TypeTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..ff3f78292f5f0fe9526ad502ba3bc40e9392a0ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Test/TypeTestCase.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Test; + +use Symfony\Component\Form\FormBuilder; +use Symfony\Component\EventDispatcher\EventDispatcher; + +abstract class TypeTestCase extends FormIntegrationTestCase +{ + /** + * @var FormBuilder + */ + protected $builder; + + /** + * @var EventDispatcher + */ + protected $dispatcher; + + protected function setUp() + { + parent::setUp(); + + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->builder = new FormBuilder(null, null, $this->dispatcher, $this->factory); + } + + public static function assertDateTimeEquals(\DateTime $expected, \DateTime $actual) + { + self::assertEquals($expected->format('c'), $actual->format('c')); + } + + public static function assertDateIntervalEquals(\DateInterval $expected, \DateInterval $actual) + { + self::assertEquals($expected->format('%RP%yY%mM%dDT%hH%iM%sS'), $actual->format('%RP%yY%mM%dDT%hH%iM%sS')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractBootstrap3HorizontalLayoutTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractBootstrap3HorizontalLayoutTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1273fa505bd2c6432e717b75a0a3a2d15104c6cc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractBootstrap3HorizontalLayoutTest.php @@ -0,0 +1,157 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +abstract class AbstractBootstrap3HorizontalLayoutTest extends AbstractBootstrap3LayoutTest +{ + public function testLabelOnForm() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType'); + $view = $form->createView(); + $this->renderWidget($view, array('label' => 'foo')); + $html = $this->renderLabel($view); + + $this->assertMatchesXpath($html, +'/label + [@class="col-sm-2 control-label required"] + [.="[trans]Name[/trans]"] +' + ); + } + + public function testLabelDoesNotRenderFieldAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderLabel($form->createView(), null, array( + 'attr' => array( + 'class' => 'my&class', + ), + )); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [@class="col-sm-2 control-label required"] +' + ); + } + + public function testLabelWithCustomAttributesPassedDirectly() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderLabel($form->createView(), null, array( + 'label_attr' => array( + 'class' => 'my&class', + ), + )); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [@class="my&class col-sm-2 control-label required"] +' + ); + } + + public function testLabelWithCustomTextAndCustomAttributesPassedDirectly() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderLabel($form->createView(), 'Custom label', array( + 'label_attr' => array( + 'class' => 'my&class', + ), + )); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [@class="my&class col-sm-2 control-label required"] + [.="[trans]Custom label[/trans]"] +' + ); + } + + public function testLabelWithCustomTextAsOptionAndCustomAttributesPassedDirectly() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + 'label' => 'Custom label', + )); + $html = $this->renderLabel($form->createView(), null, array( + 'label_attr' => array( + 'class' => 'my&class', + ), + )); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [@class="my&class col-sm-2 control-label required"] + [.="[trans]Custom label[/trans]"] +' + ); + } + + public function testStartTag() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => 'http://example.com/directory', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('
    ', $html); + } + + public function testStartTagWithOverriddenVars() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'put', + 'action' => 'http://example.com/directory', + )); + + $html = $this->renderStart($form->createView(), array( + 'method' => 'post', + 'action' => 'http://foo.com/directory', + )); + + $this->assertSame('', $html); + } + + public function testStartTagForMultipartForm() + { + $form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => 'http://example.com/directory', + )) + ->add('file', 'Symfony\Component\Form\Extension\Core\Type\FileType') + ->getForm(); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('', $html); + } + + public function testStartTagWithExtraAttributes() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => 'http://example.com/directory', + )); + + $html = $this->renderStart($form->createView(), array( + 'attr' => array('class' => 'foobar'), + )); + + $this->assertSame('', $html); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php new file mode 100644 index 0000000000000000000000000000000000000000..09138b1da7dcdcccdc15073b493b60718fa58738 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php @@ -0,0 +1,2471 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use Symfony\Component\Form\FormError; + +abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest +{ + public function testLabelOnForm() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType'); + $view = $form->createView(); + $this->renderWidget($view, array('label' => 'foo')); + $html = $this->renderLabel($view); + + $this->assertMatchesXpath($html, +'/label + [@class="control-label required"] + [.="[trans]Name[/trans]"] +' + ); + } + + public function testLabelDoesNotRenderFieldAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderLabel($form->createView(), null, array( + 'attr' => array( + 'class' => 'my&class', + ), + )); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [@class="control-label required"] +' + ); + } + + public function testLabelWithCustomAttributesPassedDirectly() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderLabel($form->createView(), null, array( + 'label_attr' => array( + 'class' => 'my&class', + ), + )); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [@class="my&class control-label required"] +' + ); + } + + public function testLabelWithCustomTextAndCustomAttributesPassedDirectly() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderLabel($form->createView(), 'Custom label', array( + 'label_attr' => array( + 'class' => 'my&class', + ), + )); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [@class="my&class control-label required"] + [.="[trans]Custom label[/trans]"] +' + ); + } + + public function testLabelWithCustomTextAsOptionAndCustomAttributesPassedDirectly() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + 'label' => 'Custom label', + )); + $html = $this->renderLabel($form->createView(), null, array( + 'label_attr' => array( + 'class' => 'my&class', + ), + )); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [@class="my&class control-label required"] + [.="[trans]Custom label[/trans]"] +' + ); + } + + public function testErrors() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $form->addError(new FormError('[trans]Error 1[/trans]')); + $form->addError(new FormError('[trans]Error 2[/trans]')); + $view = $form->createView(); + $html = $this->renderErrors($view); + + $this->assertMatchesXpath($html, +'/div + [@class="alert alert-danger"] + [ + ./ul + [@class="list-unstyled"] + [ + ./li + [.=" [trans]Error 1[/trans]"] + [ + ./span[@class="glyphicon glyphicon-exclamation-sign"] + ] + /following-sibling::li + [.=" [trans]Error 2[/trans]"] + [ + ./span[@class="glyphicon glyphicon-exclamation-sign"] + ] + ] + [count(./li)=2] + ] +' + ); + } + + public function testOverrideWidgetBlock() + { + // see custom_widgets.html.twig + $form = $this->factory->createNamed('text_id', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderWidget($form->createView()); + + $this->assertMatchesXpath($html, +'/div + [ + ./input + [@type="text"] + [@id="text_id"] + [@class="form-control"] + ] + [@id="container"] +' + ); + } + + public function testCheckedCheckbox() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', true); + + $this->assertWidgetMatchesXpath($form->createView(), array('id' => 'my&id', 'attr' => array('class' => 'my&class')), +'/div + [@class="checkbox"] + [ + ./label + [.=" [trans]Name[/trans]"] + [ + ./input[@type="checkbox"][@name="name"][@id="my&id"][@class="my&class"][@checked="checked"][@value="1"] + ] + ] +' + ); + } + + public function testUncheckedCheckbox() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', false); + + $this->assertWidgetMatchesXpath($form->createView(), array('id' => 'my&id', 'attr' => array('class' => 'my&class')), +'/div + [@class="checkbox"] + [ + ./label + [.=" [trans]Name[/trans]"] + [ + ./input[@type="checkbox"][@name="name"][@id="my&id"][@class="my&class"][not(@checked)] + ] + ] +' + ); + } + + public function testCheckboxWithValue() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', false, array( + 'value' => 'foo&bar', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('id' => 'my&id', 'attr' => array('class' => 'my&class')), +'/div + [@class="checkbox"] + [ + ./label + [.=" [trans]Name[/trans]"] + [ + ./input[@type="checkbox"][@name="name"][@id="my&id"][@class="my&class"][@value="foo&bar"] + ] + ] +' + ); + } + + public function testSingleChoice() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [not(@required)] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testSingleChoiceAttributesWithMainAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => false, + 'attr' => array('class' => 'bar&baz'), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'bar&baz')), +'/select + [@name="name"] + [@class="bar&baz form-control"] + [not(@required)] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testSingleExpandedChoiceAttributesWithMainAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => true, + 'attr' => array('class' => 'bar&baz'), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'bar&baz')), +'/div + [@class="bar&baz"] + [ + ./div + [@class="radio"] + [ + ./label + [.=" [trans]Choice&A[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [.=" [trans]Choice&B[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testSelectWithSizeBiggerThanOneCanBeRequired() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', null, array( + 'choices' => array('a', 'b'), + 'multiple' => false, + 'expanded' => false, + 'attr' => array('size' => 2), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => '')), +'/select + [@name="name"] + [@required="required"] + [@size="2"] + [count(./option)=2] +' + ); + } + + public function testSingleChoiceWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => false, + 'choice_translation_domain' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [not(@required)] + [ + ./option[@value="&a"][@selected="selected"][.="Choice&A"] + /following-sibling::option[@value="&b"][not(@selected)][.="Choice&B"] + ] + [count(./option)=2] +' + ); + } + + public function testSingleChoiceWithPlaceholderWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => false, + 'required' => false, + 'translation_domain' => false, + 'placeholder' => 'Placeholder&Not&Translated', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [not(@required)] + [ + ./option[@value=""][not(@selected)][not(@disabled)][.="Placeholder&Not&Translated"] + /following-sibling::option[@value="&a"][@selected="selected"][.="Choice&A"] + /following-sibling::option[@value="&b"][not(@selected)][.="Choice&B"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [not(@required)] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][@class="foo&bar"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testSingleChoiceWithPreferred() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'preferred_choices' => array('&b'), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('separator' => '-- sep --', 'attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [not(@required)] + [ + ./option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + /following-sibling::option[@disabled="disabled"][not(@selected)][.="-- sep --"] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceWithPreferredAndNoSeparator() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'preferred_choices' => array('&b'), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('separator' => null, 'attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [not(@required)] + [ + ./option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testSingleChoiceWithPreferredAndBlankSeparator() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'preferred_choices' => array('&b'), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('separator' => '', 'attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [not(@required)] + [ + ./option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + /following-sibling::option[@disabled="disabled"][not(@selected)][.=""] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testChoiceWithOnlyPreferred() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'preferred_choices' => array('&a', '&b'), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@class="my&class form-control"] + [count(./option)=2] +' + ); + } + + public function testSingleChoiceNonRequired() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'required' => false, + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [not(@required)] + [ + ./option[@value=""][.=""] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceNonRequiredNoneSelected() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', null, array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'required' => false, + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [not(@required)] + [ + ./option[@value=""][.=""] + /following-sibling::option[@value="&a"][not(@selected)][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceNonRequiredWithPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => false, + 'required' => false, + 'placeholder' => 'Select&Anything&Not&Me', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [not(@required)] + [ + ./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Select&Anything&Not&Me[/trans]"] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceRequiredWithPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'required' => true, + 'multiple' => false, + 'expanded' => false, + 'placeholder' => 'Test&Me', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [@required="required"] + [ + ./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Test&Me[/trans]"] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceRequiredWithPlaceholderViaView() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'required' => true, + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('placeholder' => '', 'attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [@required="required"] + [ + ./option[@value=""][not(@selected)][not(@disabled)][.=""] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceGrouped() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array( + 'Group&1' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'Group&2' => array('Choice&C' => '&c'), + ), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [./optgroup[@label="[trans]Group&1[/trans]"] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] + ] + [./optgroup[@label="[trans]Group&2[/trans]"] + [./option[@value="&c"][not(@selected)][.="[trans]Choice&C[/trans]"]] + [count(./option)=1] + ] + [count(./optgroup)=2] +' + ); + } + + public function testMultipleChoice() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'required' => true, + 'multiple' => true, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name[]"] + [@class="my&class form-control"] + [@required="required"] + [@multiple="multiple"] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testMultipleChoiceAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), + 'required' => true, + 'multiple' => true, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name[]"] + [@class="my&class form-control"] + [@required="required"] + [@multiple="multiple"] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][@class="foo&bar"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testMultipleChoiceSkipsPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => true, + 'expanded' => false, + 'placeholder' => 'Test&Me', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name[]"] + [@class="my&class form-control"] + [@multiple="multiple"] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testMultipleChoiceNonRequired() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'required' => false, + 'multiple' => true, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name[]"] + [@class="my&class form-control"] + [@multiple="multiple"] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testSingleChoiceExpanded() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="radio"] + [ + ./label + [.=" [trans]Choice&A[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [.=" [trans]Choice&B[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testSingleChoiceExpandedWithLabelsAsFalse() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_label' => false, + 'multiple' => false, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="radio"] + [ + ./label + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [ + ./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testSingleChoiceExpandedWithLabelsSetByCallable() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + 'choice_label' => function ($choice, $label, $value) { + if ('&b' === $choice) { + return false; + } + + return 'label.'.$value; + }, + 'multiple' => false, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="radio"] + [ + ./label + [.=" [trans]label.&a[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [ + ./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [.=" [trans]label.&c[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_2"][@value="&c"][not(@checked)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testSingleChoiceExpandedWithLabelsSetFalseByCallable() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_label' => function () { + return false; + }, + 'multiple' => false, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="radio"] + [ + ./label + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [ + ./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testSingleChoiceExpandedWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => true, + 'choice_translation_domain' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="radio"] + [ + ./label + [.=" Choice&A"] + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [.=" Choice&B"] + [ + ./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testSingleChoiceExpandedAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), + 'multiple' => false, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="radio"] + [ + ./label + [.=" [trans]Choice&A[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [.=" [trans]Choice&B[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)][@class="foo&bar"] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testSingleChoiceExpandedWithPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => true, + 'placeholder' => 'Test&Me', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="radio"] + [ + ./label + [.=" [trans]Test&Me[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_placeholder"][not(@checked)] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [.=" [trans]Choice&A[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@checked] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [.=" [trans]Choice&B[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_1"][not(@checked)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choice_translation_domain' => false, + 'placeholder' => 'Placeholder&Not&Translated', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="radio"] + [ + ./label + [.=" Placeholder&Not&Translated"] + [ + ./input[@type="radio"][@name="name"][@id="name_placeholder"][not(@checked)] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [.=" Choice&A"] + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@checked] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [.=" Choice&B"] + [ + ./input[@type="radio"][@name="name"][@id="name_1"][not(@checked)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testSingleChoiceExpandedWithBooleanValue() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', true, array( + 'choices' => array('Choice&A' => '1', 'Choice&B' => '0'), + 'multiple' => false, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="radio"] + [ + ./label + [.=" [trans]Choice&A[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@checked] + ] + ] + /following-sibling::div + [@class="radio"] + [ + ./label + [.=" [trans]Choice&B[/trans]"] + [ + ./input[@type="radio"][@name="name"][@id="name_1"][not(@checked)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testMultipleChoiceExpanded() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + 'multiple' => true, + 'expanded' => true, + 'required' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="checkbox"] + [ + ./label + [.=" [trans]Choice&A[/trans]"] + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@checked][not(@required)] + ] + ] + /following-sibling::div + [@class="checkbox"] + [ + ./label + [.=" [trans]Choice&B[/trans]"] + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_1"][not(@checked)][not(@required)] + ] + ] + /following-sibling::div + [@class="checkbox"] + [ + ./label + [.=" [trans]Choice&C[/trans]"] + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testMultipleChoiceExpandedWithLabelsAsFalse() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_label' => false, + 'multiple' => true, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="checkbox"] + [ + ./label + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@value="&a"][@checked] + ] + ] + /following-sibling::div + [@class="checkbox"] + [ + ./label + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_1"][@value="&b"][not(@checked)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testMultipleChoiceExpandedWithLabelsSetByCallable() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + 'choice_label' => function ($choice, $label, $value) { + if ('&b' === $choice) { + return false; + } + + return 'label.'.$value; + }, + 'multiple' => true, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), + '/div + [ + ./div + [@class="checkbox"] + [ + ./label + [.=" [trans]label.&a[/trans]"] + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@value="&a"][@checked] + ] + ] + /following-sibling::div + [@class="checkbox"] + [ + ./label + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_1"][@value="&b"][not(@checked)] + ] + ] + /following-sibling::div + [@class="checkbox"] + [ + ./label + [.=" [trans]label.&c[/trans]"] + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_2"][@value="&c"][not(@checked)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testMultipleChoiceExpandedWithLabelsSetFalseByCallable() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_label' => function () { + return false; + }, + 'multiple' => true, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="checkbox"] + [ + ./label + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@value="&a"][@checked] + ] + ] + /following-sibling::div + [@class="checkbox"] + [ + ./label + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_1"][@value="&b"][not(@checked)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testMultipleChoiceExpandedWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + 'multiple' => true, + 'expanded' => true, + 'required' => true, + 'choice_translation_domain' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="checkbox"] + [ + ./label + [.=" Choice&A"] + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@checked][not(@required)] + ] + ] + /following-sibling::div + [@class="checkbox"] + [ + ./label + [.=" Choice&B"] + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_1"][not(@checked)][not(@required)] + ] + ] + /following-sibling::div + [@class="checkbox"] + [ + ./label + [.=" Choice&C"] + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testMultipleChoiceExpandedAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), + 'multiple' => true, + 'expanded' => true, + 'required' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@class="checkbox"] + [ + ./label + [.=" [trans]Choice&A[/trans]"] + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@checked][not(@required)] + ] + ] + /following-sibling::div + [@class="checkbox"] + [ + ./label + [.=" [trans]Choice&B[/trans]"] + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_1"][not(@checked)][not(@required)][@class="foo&bar"] + ] + ] + /following-sibling::div + [@class="checkbox"] + [ + ./label + [.=" [trans]Choice&C[/trans]"] + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)] + ] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] +' + ); + } + + public function testCountry() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CountryType', 'AT'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [./option[@value="AT"][@selected="selected"][.="Austria"]] + [count(./option)>200] +' + ); + } + + public function testCountryWithPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CountryType', 'AT', array( + 'placeholder' => 'Select&Country', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Select&Country[/trans]"]] + [./option[@value="AT"][@selected="selected"][.="Austria"]] + [count(./option)>201] +' + ); + } + + public function testDateTime() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array( + 'input' => 'string', + 'with_seconds' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [ + ./select + [@id="name_date_month"] + [@class="form-control"] + [./option[@value="2"][@selected="selected"]] + /following-sibling::select + [@id="name_date_day"] + [@class="form-control"] + [./option[@value="3"][@selected="selected"]] + /following-sibling::select + [@id="name_date_year"] + [@class="form-control"] + [./option[@value="'.date('Y').'"][@selected="selected"]] + /following-sibling::select + [@id="name_time_hour"] + [@class="form-control"] + [./option[@value="4"][@selected="selected"]] + /following-sibling::select + [@id="name_time_minute"] + [@class="form-control"] + [./option[@value="5"][@selected="selected"]] + ] + [count(.//select)=5] +' + ); + } + + public function testDateTimeWithPlaceholderGlobal() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', null, array( + 'input' => 'string', + 'placeholder' => 'Change&Me', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./select + [@id="name_date_month"] + [@class="form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + /following-sibling::select + [@id="name_date_day"] + [@class="form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + /following-sibling::select + [@id="name_date_year"] + [@class="form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + /following-sibling::select + [@id="name_time_hour"] + [@class="form-control"] + [./option[@value=""][.="[trans]Change&Me[/trans]"]] + /following-sibling::select + [@id="name_time_minute"] + [@class="form-control"] + [./option[@value=""][.="[trans]Change&Me[/trans]"]] + ] + [count(.//select)=5] +' + ); + } + + public function testDateTimeWithHourAndMinute() + { + $data = array('year' => date('Y'), 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5'); + + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', $data, array( + 'input' => 'array', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./select + [@id="name_date_month"] + [@class="form-control"] + [./option[@value="2"][@selected="selected"]] + /following-sibling::select + [@id="name_date_day"] + [@class="form-control"] + [./option[@value="3"][@selected="selected"]] + /following-sibling::select + [@id="name_date_year"] + [@class="form-control"] + [./option[@value="'.date('Y').'"][@selected="selected"]] + /following-sibling::select + [@id="name_time_hour"] + [@class="form-control"] + [./option[@value="4"][@selected="selected"]] + /following-sibling::select + [@id="name_time_minute"] + [@class="form-control"] + [./option[@value="5"][@selected="selected"]] + ] + [count(.//select)=5] +' + ); + } + + public function testDateTimeWithSeconds() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array( + 'input' => 'string', + 'with_seconds' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./select + [@id="name_date_month"] + [@class="form-control"] + [./option[@value="2"][@selected="selected"]] + /following-sibling::select + [@id="name_date_day"] + [@class="form-control"] + [./option[@value="3"][@selected="selected"]] + /following-sibling::select + [@id="name_date_year"] + [@class="form-control"] + [./option[@value="'.date('Y').'"][@selected="selected"]] + /following-sibling::select + [@id="name_time_hour"] + [@class="form-control"] + [./option[@value="4"][@selected="selected"]] + /following-sibling::select + [@id="name_time_minute"] + [@class="form-control"] + [./option[@value="5"][@selected="selected"]] + /following-sibling::select + [@id="name_time_second"] + [@class="form-control"] + [./option[@value="6"][@selected="selected"]] + ] + [count(.//select)=6] +' + ); + } + + public function testDateTimeSingleText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array( + 'input' => 'string', + 'date_widget' => 'single_text', + 'time_widget' => 'single_text', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./input + [@type="date"] + [@id="name_date"] + [@name="name[date]"] + [@class="form-control"] + [@value="2011-02-03"] + /following-sibling::input + [@type="time"] + [@id="name_time"] + [@name="name[time]"] + [@class="form-control"] + [@value="04:05"] + ] +' + ); + } + + public function testDateTimeWithWidgetSingleText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array( + 'input' => 'string', + 'widget' => 'single_text', + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="datetime"] + [@name="name"] + [@class="my&class form-control"] + [@value="2011-02-03T04:05:06Z"] +' + ); + } + + public function testDateTimeWithWidgetSingleTextIgnoreDateAndTimeWidgets() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array( + 'input' => 'string', + 'date_widget' => 'choice', + 'time_widget' => 'choice', + 'widget' => 'single_text', + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="datetime"] + [@name="name"] + [@class="my&class form-control"] + [@value="2011-02-03T04:05:06Z"] +' + ); + } + + public function testDateChoice() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', date('Y').'-02-03', array( + 'input' => 'string', + 'widget' => 'choice', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./select + [@id="name_month"] + [@class="form-control"] + [./option[@value="2"][@selected="selected"]] + /following-sibling::select + [@id="name_day"] + [@class="form-control"] + [./option[@value="3"][@selected="selected"]] + /following-sibling::select + [@id="name_year"] + [@class="form-control"] + [./option[@value="'.date('Y').'"][@selected="selected"]] + ] + [count(./select)=3] +' + ); + } + + public function testDateChoiceWithPlaceholderGlobal() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', null, array( + 'input' => 'string', + 'widget' => 'choice', + 'placeholder' => 'Change&Me', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./select + [@id="name_month"] + [@class="form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + /following-sibling::select + [@id="name_day"] + [@class="form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + /following-sibling::select + [@id="name_year"] + [@class="form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + ] + [count(./select)=3] +' + ); + } + + public function testDateChoiceWithPlaceholderOnYear() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', null, array( + 'input' => 'string', + 'widget' => 'choice', + 'required' => false, + 'placeholder' => array('year' => 'Change&Me'), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./select + [@id="name_month"] + [@class="form-control"] + [./option[@value="1"]] + /following-sibling::select + [@id="name_day"] + [@class="form-control"] + [./option[@value="1"]] + /following-sibling::select + [@id="name_year"] + [@class="form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + ] + [count(./select)=3] +' + ); + } + + public function testDateText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', array( + 'input' => 'string', + 'widget' => 'text', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./input + [@id="name_month"] + [@type="text"] + [@class="form-control"] + [@value="2"] + /following-sibling::input + [@id="name_day"] + [@type="text"] + [@class="form-control"] + [@value="3"] + /following-sibling::input + [@id="name_year"] + [@type="text"] + [@class="form-control"] + [@value="2011"] + ] + [count(./input)=3] +' + ); + } + + public function testDateSingleText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', array( + 'input' => 'string', + 'widget' => 'single_text', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="date"] + [@name="name"] + [@class="my&class form-control"] + [@value="2011-02-03"] +' + ); + } + + public function testBirthDay() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\BirthdayType', '2000-02-03', array( + 'input' => 'string', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./select + [@id="name_month"] + [@class="form-control"] + [./option[@value="2"][@selected="selected"]] + /following-sibling::select + [@id="name_day"] + [@class="form-control"] + [./option[@value="3"][@selected="selected"]] + /following-sibling::select + [@id="name_year"] + [@class="form-control"] + [./option[@value="2000"][@selected="selected"]] + ] + [count(./select)=3] +' + ); + } + + public function testBirthDayWithPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\BirthdayType', '1950-01-01', array( + 'input' => 'string', + 'placeholder' => '', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./select + [@id="name_month"] + [@class="form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.=""]] + [./option[@value="1"][@selected="selected"]] + /following-sibling::select + [@id="name_day"] + [@class="form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.=""]] + [./option[@value="1"][@selected="selected"]] + /following-sibling::select + [@id="name_year"] + [@class="form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.=""]] + [./option[@value="1950"][@selected="selected"]] + ] + [count(./select)=3] +' + ); + } + + public function testEmail() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\EmailType', 'foo&bar'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="email"] + [@name="name"] + [@class="my&class form-control"] + [@value="foo&bar"] + [not(@maxlength)] +' + ); + } + + public function testEmailWithMaxLength() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\EmailType', 'foo&bar', array( + 'attr' => array('maxlength' => 123), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="email"] + [@name="name"] + [@class="my&class form-control"] + [@value="foo&bar"] + [@maxlength="123"] +' + ); + } + + public function testHidden() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\HiddenType', 'foo&bar'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="hidden"] + [@name="name"] + [@class="my&class"] + [@value="foo&bar"] +' + ); + } + + public function testDisabled() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + 'disabled' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="text"] + [@name="name"] + [@class="my&class form-control"] + [@disabled="disabled"] +' + ); + } + + public function testInteger() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\IntegerType', 123); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="number"] + [@name="name"] + [@class="my&class form-control"] + [@value="123"] +' + ); + } + + public function testLanguage() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\LanguageType', 'de'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [./option[@value="de"][@selected="selected"][.="German"]] + [count(./option)>200] +' + ); + } + + public function testLocale() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\LocaleType', 'de_AT'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [./option[@value="de_AT"][@selected="selected"][.="German (Austria)"]] + [count(./option)>200] +' + ); + } + + public function testMoney() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', 1234.56, array( + 'currency' => 'EUR', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('id' => 'my&id', 'attr' => array('class' => 'my&class')), +'/div + [@class="input-group"] + [ + ./span + [@class="input-group-addon"] + [contains(.., "€")] + /following-sibling::input + [@id="my&id"] + [@type="text"] + [@name="name"] + [@class="my&class form-control"] + [@value="1234.56"] + ] +' + ); + } + + public function testNumber() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\NumberType', 1234.56); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="text"] + [@name="name"] + [@class="my&class form-control"] + [@value="1234.56"] +' + ); + } + + public function testPassword() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', 'foo&bar'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="password"] + [@name="name"] + [@class="my&class form-control"] +' + ); + } + + public function testPasswordSubmittedWithNotAlwaysEmpty() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', null, array( + 'always_empty' => false, + )); + $form->submit('foo&bar'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="password"] + [@name="name"] + [@class="my&class form-control"] + [@value="foo&bar"] +' + ); + } + + public function testPasswordWithMaxLength() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', 'foo&bar', array( + 'attr' => array('maxlength' => 123), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="password"] + [@name="name"] + [@class="my&class form-control"] + [@maxlength="123"] +' + ); + } + + public function testPercent() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PercentType', 0.1); + + $this->assertWidgetMatchesXpath($form->createView(), array('id' => 'my&id', 'attr' => array('class' => 'my&class')), +'/div + [@class="input-group"] + [ + ./input + [@id="my&id"] + [@type="text"] + [@name="name"] + [@class="my&class form-control"] + [@value="10"] + /following-sibling::span + [@class="input-group-addon"] + [contains(.., "%")] + ] +' + ); + } + + public function testCheckedRadio() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RadioType', true); + + $this->assertWidgetMatchesXpath($form->createView(), array('id' => 'my&id', 'attr' => array('class' => 'my&class')), +'/div + [@class="radio"] + [ + ./label + [@class="required"] + [ + ./input + [@id="my&id"] + [@type="radio"] + [@name="name"] + [@class="my&class"] + [@checked="checked"] + [@value="1"] + ] + ] +' + ); + } + + public function testUncheckedRadio() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RadioType', false); + + $this->assertWidgetMatchesXpath($form->createView(), array('id' => 'my&id', 'attr' => array('class' => 'my&class')), +'/div + [@class="radio"] + [ + ./label + [@class="required"] + [ + ./input + [@id="my&id"] + [@type="radio"] + [@name="name"] + [@class="my&class"] + [not(@checked)] + ] + ] +' + ); + } + + public function testRadioWithValue() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RadioType', false, array( + 'value' => 'foo&bar', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('id' => 'my&id', 'attr' => array('class' => 'my&class')), +'/div + [@class="radio"] + [ + ./label + [@class="required"] + [ + ./input + [@id="my&id"] + [@type="radio"] + [@name="name"] + [@class="my&class"] + [@value="foo&bar"] + ] + ] +' + ); + } + + public function testRange() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RangeType', 42, array('attr' => array('min' => 5))); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="range"] + [@name="name"] + [@value="42"] + [@min="5"] + [@class="my&class form-control"] +' + ); + } + + public function testRangeWithMinMaxValues() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RangeType', 42, array('attr' => array('min' => 5, 'max' => 57))); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="range"] + [@name="name"] + [@value="42"] + [@min="5"] + [@max="57"] + [@class="my&class form-control"] +' + ); + } + + public function testTextarea() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextareaType', 'foo&bar', array( + 'attr' => array('pattern' => 'foo'), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/textarea + [@name="name"] + [@pattern="foo"] + [@class="my&class form-control"] + [.="foo&bar"] +' + ); + } + + public function testText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'foo&bar'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="text"] + [@name="name"] + [@class="my&class form-control"] + [@value="foo&bar"] + [not(@maxlength)] +' + ); + } + + public function testTextWithMaxLength() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'foo&bar', array( + 'attr' => array('maxlength' => 123), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="text"] + [@name="name"] + [@class="my&class form-control"] + [@value="foo&bar"] + [@maxlength="123"] +' + ); + } + + public function testSearch() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\SearchType', 'foo&bar'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="search"] + [@name="name"] + [@class="my&class form-control"] + [@value="foo&bar"] + [not(@maxlength)] +' + ); + } + + public function testTime() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', array( + 'input' => 'string', + 'with_seconds' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./select + [@id="name_hour"] + [@class="form-control"] + [not(@size)] + [./option[@value="4"][@selected="selected"]] + /following-sibling::select + [@id="name_minute"] + [@class="form-control"] + [not(@size)] + [./option[@value="5"][@selected="selected"]] + ] + [count(./select)=2] +' + ); + } + + public function testTimeWithSeconds() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', array( + 'input' => 'string', + 'with_seconds' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./select + [@id="name_hour"] + [@class="form-control"] + [not(@size)] + [./option[@value="4"][@selected="selected"]] + [count(./option)>23] + /following-sibling::select + [@id="name_minute"] + [@class="form-control"] + [not(@size)] + [./option[@value="5"][@selected="selected"]] + [count(./option)>59] + /following-sibling::select + [@id="name_second"] + [@class="form-control"] + [not(@size)] + [./option[@value="6"][@selected="selected"]] + [count(./option)>59] + ] + [count(./select)=3] +' + ); + } + + public function testTimeText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', array( + 'input' => 'string', + 'widget' => 'text', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./input + [@type="text"] + [@id="name_hour"] + [@name="name[hour]"] + [@class="form-control"] + [@value="04"] + [@required="required"] + [not(@size)] + /following-sibling::input + [@type="text"] + [@id="name_minute"] + [@name="name[minute]"] + [@class="form-control"] + [@value="05"] + [@required="required"] + [not(@size)] + ] + [count(./input)=2] +' + ); + } + + public function testTimeSingleText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', array( + 'input' => 'string', + 'widget' => 'single_text', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="time"] + [@name="name"] + [@class="my&class form-control"] + [@value="04:05"] + [not(@size)] +' + ); + } + + public function testTimeWithPlaceholderGlobal() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', null, array( + 'input' => 'string', + 'placeholder' => 'Change&Me', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./select + [@id="name_hour"] + [@class="form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + [count(./option)>24] + /following-sibling::select + [@id="name_minute"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + [count(./option)>60] + ] + [count(./select)=2] +' + ); + } + + public function testTimeWithPlaceholderOnYear() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', null, array( + 'input' => 'string', + 'required' => false, + 'placeholder' => array('hour' => 'Change&Me'), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/div + [@class="my&class form-inline"] + [ + ./select + [@id="name_hour"] + [@class="form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + [count(./option)>24] + /following-sibling::select + [@id="name_minute"] + [./option[@value="1"]] + [count(./option)>59] + ] + [count(./select)=2] +' + ); + } + + public function testTimezone() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimezoneType', 'Europe/Vienna'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@name="name"] + [@class="my&class form-control"] + [not(@required)] + [./optgroup + [@label="Europe"] + [./option[@value="Europe/Vienna"][@selected="selected"][.="Vienna"]] + ] + [count(./optgroup)>10] + [count(.//option)>200] +' + ); + } + + public function testTimezoneWithPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimezoneType', null, array( + 'placeholder' => 'Select&Timezone', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/select + [@class="my&class form-control"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Select&Timezone[/trans]"]] + [count(./optgroup)>10] + [count(.//option)>201] +' + ); + } + + public function testUrl() + { + $url = 'http://www.google.com?foo1=bar1&foo2=bar2'; + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), +'/input + [@type="url"] + [@name="name"] + [@class="my&class form-control"] + [@value="http://www.google.com?foo1=bar1&foo2=bar2"] +' + ); + } + + public function testButton() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ButtonType'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), + '/button[@type="button"][@name="name"][.="[trans]Name[/trans]"][@class="my&class btn"]' + ); + } + + public function testButtonlabelWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, array( + 'translation_domain' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), + '/button[@type="button"][@name="name"][.="Name"][@class="my&class btn"]' + ); + } + + public function testSubmit() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\SubmitType'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), + '/button[@type="submit"][@name="name"][@class="my&class btn"]' + ); + } + + public function testReset() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ResetType'); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), + '/button[@type="reset"][@name="name"][@class="my&class btn"]' + ); + } + + public function testWidgetAttributes() + { + $form = $this->factory->createNamed('text', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'value', array( + 'required' => true, + 'disabled' => true, + 'attr' => array('readonly' => true, 'maxlength' => 10, 'pattern' => '\d+', 'class' => 'foobar', 'data-foo' => 'bar'), + )); + + $html = $this->renderWidget($form->createView()); + + // compare plain HTML to check the whitespace + $this->assertSame('', $html); + } + + public function testWidgetAttributeNameRepeatedIfTrue() + { + $form = $this->factory->createNamed('text', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'value', array( + 'attr' => array('foo' => true), + )); + + $html = $this->renderWidget($form->createView()); + + // foo="foo" + $this->assertSame('', $html); + } + + public function testButtonAttributes() + { + $form = $this->factory->createNamed('button', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, array( + 'disabled' => true, + 'attr' => array('class' => 'foobar', 'data-foo' => 'bar'), + )); + + $html = $this->renderWidget($form->createView()); + + // compare plain HTML to check the whitespace + $this->assertSame('', $html); + } + + public function testButtonAttributeNameRepeatedIfTrue() + { + $form = $this->factory->createNamed('button', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, array( + 'attr' => array('foo' => true), + )); + + $html = $this->renderWidget($form->createView()); + + // foo="foo" + $this->assertSame('', $html); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php new file mode 100644 index 0000000000000000000000000000000000000000..44e2f1d72dee285ec599ed0fdd9a0c417d00a194 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php @@ -0,0 +1,934 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use Symfony\Component\Form\FormError; +use Symfony\Component\Security\Csrf\CsrfToken; + +abstract class AbstractDivLayoutTest extends AbstractLayoutTest +{ + public function testRow() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $form->addError(new FormError('[trans]Error![/trans]')); + $view = $form->createView(); + $html = $this->renderRow($view); + + $this->assertMatchesXpath($html, +'/div + [ + ./label[@for="name"] + /following-sibling::ul + [./li[.="[trans]Error![/trans]"]] + [count(./li)=1] + /following-sibling::input[@id="name"] + ] +' + ); + } + + public function testRowOverrideVariables() + { + $view = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType')->createView(); + $html = $this->renderRow($view, array( + 'attr' => array('class' => 'my&class'), + 'label' => 'foo&bar', + 'label_attr' => array('class' => 'my&label&class'), + )); + + $this->assertMatchesXpath($html, +'/div + [ + ./label[@for="name"][@class="my&label&class required"][.="[trans]foo&bar[/trans]"] + /following-sibling::input[@id="name"][@class="my&class"] + ] +' + ); + } + + public function testRepeatedRow() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType'); + $form->addError(new FormError('[trans]Error![/trans]')); + $view = $form->createView(); + $html = $this->renderRow($view); + + // The errors of the form are not rendered by intention! + // In practice, repeated fields cannot have errors as all errors + // on them are mapped to the first child. + // (see RepeatedTypeValidatorExtension) + + $this->assertMatchesXpath($html, +'/div + [ + ./label[@for="name_first"] + /following-sibling::input[@id="name_first"] + ] +/following-sibling::div + [ + ./label[@for="name_second"] + /following-sibling::input[@id="name_second"] + ] +' + ); + } + + public function testButtonRow() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ButtonType'); + $view = $form->createView(); + $html = $this->renderRow($view); + + $this->assertMatchesXpath($html, +'/div + [ + ./button[@type="button"][@name="name"] + ] + [count(//label)=0] +' + ); + } + + public function testRest() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('field1', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('field2', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType') + ->add('field3', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('field4', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm() + ->createView(); + + // Render field2 row -> does not implicitly call renderWidget because + // it is a repeated field! + $this->renderRow($view['field2']); + + // Render field3 widget + $this->renderWidget($view['field3']); + + // Rest should only contain field1 and field4 + $html = $this->renderRest($view); + + $this->assertMatchesXpath($html, +'/div + [ + ./label[@for="name_field1"] + /following-sibling::input[@type="text"][@id="name_field1"] + ] +/following-sibling::div + [ + ./label[@for="name_field4"] + /following-sibling::input[@type="text"][@id="name_field4"] + ] + [count(../div)=2] + [count(..//label)=2] + [count(..//input)=3] +/following-sibling::input + [@type="hidden"] + [@id="name__token"] +' + ); + } + + public function testRestWithChildrenForms() + { + $child1 = $this->factory->createNamedBuilder('child1', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('field1', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('field2', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + + $child2 = $this->factory->createNamedBuilder('child2', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('field1', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('field2', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + + $view = $this->factory->createNamedBuilder('parent', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add($child1) + ->add($child2) + ->getForm() + ->createView(); + + // Render child1.field1 row + $this->renderRow($view['child1']['field1']); + + // Render child2.field2 widget (remember that widget don't render label) + $this->renderWidget($view['child2']['field2']); + + // Rest should only contain child1.field2 and child2.field1 + $html = $this->renderRest($view); + + $this->assertMatchesXpath($html, +'/div + [ + ./label[not(@for)] + /following-sibling::div[@id="parent_child1"] + [ + ./div + [ + ./label[@for="parent_child1_field2"] + /following-sibling::input[@id="parent_child1_field2"] + ] + ] + ] + +/following-sibling::div + [ + ./label[not(@for)] + /following-sibling::div[@id="parent_child2"] + [ + ./div + [ + ./label[@for="parent_child2_field1"] + /following-sibling::input[@id="parent_child2_field1"] + ] + ] + ] + [count(//label)=4] + [count(//input[@type="text"])=2] +/following-sibling::input[@type="hidden"][@id="parent__token"] +' + ); + } + + public function testRestAndRepeatedWithRow() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('first', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('password', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType') + ->getForm() + ->createView(); + + $this->renderRow($view['password']); + + $html = $this->renderRest($view); + + $this->assertMatchesXpath($html, +'/div + [ + ./label[@for="name_first"] + /following-sibling::input[@type="text"][@id="name_first"] + ] + [count(.//input)=1] +/following-sibling::input + [@type="hidden"] + [@id="name__token"] +' + ); + } + + public function testRestAndRepeatedWithRowPerChild() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('first', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('password', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType') + ->getForm() + ->createView(); + + $this->renderRow($view['password']['first']); + $this->renderRow($view['password']['second']); + + $html = $this->renderRest($view); + + $this->assertMatchesXpath($html, +'/div + [ + ./label[@for="name_first"] + /following-sibling::input[@type="text"][@id="name_first"] + ] + [count(.//input)=1] + [count(.//label)=1] +/following-sibling::input + [@type="hidden"] + [@id="name__token"] +' + ); + } + + public function testRestAndRepeatedWithWidgetPerChild() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('first', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('password', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType') + ->getForm() + ->createView(); + + // The password form is considered as rendered as all its children + // are rendered + $this->renderWidget($view['password']['first']); + $this->renderWidget($view['password']['second']); + + $html = $this->renderRest($view); + + $this->assertMatchesXpath($html, +'/div + [ + ./label[@for="name_first"] + /following-sibling::input[@type="text"][@id="name_first"] + ] + [count(//input)=2] + [count(//label)=1] +/following-sibling::input + [@type="hidden"] + [@id="name__token"] +' + ); + } + + public function testCollection() + { + $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array('a', 'b'), array( + 'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div[./input[@type="text"][@value="a"]] + /following-sibling::div[./input[@type="text"][@value="b"]] + ] + [count(./div[./input])=2] +' + ); + } + + // https://github.com/symfony/symfony/issues/5038 + public function testCollectionWithAlternatingRowTypes() + { + $data = array( + array('title' => 'a'), + array('title' => 'b'), + ); + $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', $data, array( + 'entry_type' => 'Symfony\Component\Form\Tests\Fixtures\AlternatingRowType', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div[./div/div/input[@type="text"][@value="a"]] + /following-sibling::div[./div/div/textarea[.="b"]] + ] + [count(./div[./div/div/input])=1] + [count(./div[./div/div/textarea])=1] +' + ); + } + + public function testEmptyCollection() + { + $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), array( + 'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [./input[@type="hidden"][@id="names__token"]] + [count(./div)=0] +' + ); + } + + public function testCollectionRow() + { + $collection = $this->factory->createNamedBuilder( + 'collection', + 'Symfony\Component\Form\Extension\Core\Type\CollectionType', + array('a', 'b'), + array('entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType') + ); + + $form = $this->factory->createNamedBuilder('form', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add($collection) + ->getForm(); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [ + ./label[not(@for)] + /following-sibling::div + [ + ./div + [ + ./label[@for="form_collection_0"] + /following-sibling::input[@type="text"][@value="a"] + ] + /following-sibling::div + [ + ./label[@for="form_collection_1"] + /following-sibling::input[@type="text"][@value="b"] + ] + ] + ] + /following-sibling::input[@type="hidden"][@id="form__token"] + ] + [count(.//input)=3] +' + ); + } + + public function testForm() + { + $form = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->setMethod('PUT') + ->setAction('http://example.com') + ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm(); + + // include ampersands everywhere to validate escaping + $html = $this->renderForm($form->createView(), array( + 'id' => 'my&id', + 'attr' => array('class' => 'my&class'), + )); + + $this->assertMatchesXpath($html, +'/form + [ + ./input[@type="hidden"][@name="_method"][@value="PUT"] + /following-sibling::div + [ + ./div + [ + ./label[@for="name_firstName"] + /following-sibling::input[@type="text"][@id="name_firstName"] + ] + /following-sibling::div + [ + ./label[@for="name_lastName"] + /following-sibling::input[@type="text"][@id="name_lastName"] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(.//input)=3] + [@id="my&id"] + [@class="my&class"] + ] + [@method="post"] + [@action="http://example.com"] + [@class="my&class"] +' + ); + } + + public function testFormWidget() + { + $form = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm(); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [ + ./label[@for="name_firstName"] + /following-sibling::input[@type="text"][@id="name_firstName"] + ] + /following-sibling::div + [ + ./label[@for="name_lastName"] + /following-sibling::input[@type="text"][@id="name_lastName"] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(.//input)=3] +' + ); + } + + // https://github.com/symfony/symfony/issues/2308 + public function testNestedFormError() + { + $form = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add($this->factory + ->createNamedBuilder('child', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array('error_bubbling' => false)) + ->add('grandChild', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ) + ->getForm(); + + $form->get('child')->addError(new FormError('[trans]Error![/trans]')); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div/label + /following-sibling::ul[./li[.="[trans]Error![/trans]"]] + ] + [count(.//li[.="[trans]Error![/trans]"])=1] +' + ); + } + + public function testCsrf() + { + $this->csrfTokenManager->expects($this->any()) + ->method('getToken') + ->will($this->returnValue(new CsrfToken('token_id', 'foo&bar'))); + + $form = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add($this->factory + // No CSRF protection on nested forms + ->createNamedBuilder('child', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add($this->factory->createNamedBuilder('grandchild', 'Symfony\Component\Form\Extension\Core\Type\TextType')) + ) + ->getForm(); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + /following-sibling::input[@type="hidden"][@id="name__token"][@value="foo&bar"] + ] + [count(.//input[@type="hidden"])=1] +' + ); + } + + public function testRepeated() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType', 'foobar', array( + 'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [ + ./label[@for="name_first"] + /following-sibling::input[@type="text"][@id="name_first"] + ] + /following-sibling::div + [ + ./label[@for="name_second"] + /following-sibling::input[@type="text"][@id="name_second"] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(.//input)=3] +' + ); + } + + public function testRepeatedWithCustomOptions() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType', null, array( + // the global required value cannot be overridden + 'first_options' => array('label' => 'Test', 'required' => false), + 'second_options' => array('label' => 'Test2'), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [ + ./label[@for="name_first"][.="[trans]Test[/trans]"] + /following-sibling::input[@type="text"][@id="name_first"][@required="required"] + ] + /following-sibling::div + [ + ./label[@for="name_second"][.="[trans]Test2[/trans]"] + /following-sibling::input[@type="text"][@id="name_second"][@required="required"] + ] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(.//input)=3] +' + ); + } + + public function testSearchInputName() + { + $form = $this->factory->createNamedBuilder('full', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('name', 'Symfony\Component\Form\Extension\Core\Type\SearchType') + ->getForm(); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [ + ./label[@for="full_name"] + /following-sibling::input[@type="search"][@id="full_name"][@name="full[name]"] + ] + /following-sibling::input[@type="hidden"][@id="full__token"] + ] + [count(//input)=2] +' + ); + } + + public function testLabelHasNoId() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderRow($form->createView()); + + $this->assertMatchesXpath($html, +'/div + [ + ./label[@for="name"][not(@id)] + /following-sibling::input[@id="name"] + ] +' + ); + } + + public function testLabelIsNotRenderedWhenSetToFalse() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + 'label' => false, + )); + $html = $this->renderRow($form->createView()); + + $this->assertMatchesXpath($html, +'/div + [ + ./input[@id="name"] + ] + [count(//label)=0] +' + ); + } + + /** + * @dataProvider themeBlockInheritanceProvider + */ + public function testThemeBlockInheritance($theme) + { + $view = $this->factory + ->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\EmailType') + ->createView() + ; + + $this->setTheme($view, $theme); + + $this->assertMatchesXpath( + $this->renderWidget($view), + '/input[@type="email"][@rel="theme"]' + ); + } + + /** + * @dataProvider themeInheritanceProvider + */ + public function testThemeInheritance($parentTheme, $childTheme) + { + $child = $this->factory->createNamedBuilder('child', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('field', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + + $view = $this->factory->createNamedBuilder('parent', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('field', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add($child) + ->getForm() + ->createView() + ; + + $this->setTheme($view, $parentTheme); + $this->setTheme($view['child'], $childTheme); + + $this->assertWidgetMatchesXpath($view, array(), +'/div + [ + ./div + [ + ./label[.="parent"] + /following-sibling::input[@type="text"] + ] + /following-sibling::div + [ + ./label[.="child"] + /following-sibling::div + [ + ./div + [ + ./label[.="child"] + /following-sibling::input[@type="text"] + ] + ] + ] + /following-sibling::input[@type="hidden"] + ] +' + ); + } + + /** + * The block "_name_child_label" should be overridden in the theme of the + * implemented driver. + */ + public function testCollectionRowWithCustomBlock() + { + $collection = array('one', 'two', 'three'); + $form = $this->factory->createNamedBuilder('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', $collection) + ->getForm(); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div[./label[.="Custom label: [trans]0[/trans]"]] + /following-sibling::div[./label[.="Custom label: [trans]1[/trans]"]] + /following-sibling::div[./label[.="Custom label: [trans]2[/trans]"]] + ] +' + ); + } + + /** + * The block "_name_c_entry_label" should be overridden in the theme of the + * implemented driver. + */ + public function testChoiceRowWithCustomBlock() + { + $form = $this->factory->createNamedBuilder('name_c', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 'a', array( + 'choices' => array('ChoiceA' => 'a', 'ChoiceB' => 'b'), + 'expanded' => true, + )) + ->getForm(); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./label[.="Custom name label: [trans]ChoiceA[/trans]"] + /following-sibling::label[.="Custom name label: [trans]ChoiceB[/trans]"] + ] +' + ); + } + + public function testSingleChoiceExpandedWithLabelsAsFalse() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_label' => false, + 'multiple' => false, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), + '/div + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + /following-sibling::input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=3] + [count(./label)=1] +' + ); + } + + public function testSingleChoiceExpandedWithLabelsSetByCallable() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + 'choice_label' => function ($choice, $label, $value) { + if ('&b' === $choice) { + return false; + } + + return 'label.'.$value; + }, + 'multiple' => false, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), + '/div + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + /following-sibling::label[@for="name_0"][.="[trans]label.&a[/trans]"] + /following-sibling::input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] + /following-sibling::input[@type="radio"][@name="name"][@id="name_2"][@value="&c"][not(@checked)] + /following-sibling::label[@for="name_2"][.="[trans]label.&c[/trans]"] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=4] + [count(./label)=3] +' + ); + } + + public function testSingleChoiceExpandedWithLabelsSetFalseByCallable() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_label' => function () { + return false; + }, + 'multiple' => false, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), + '/div + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + /following-sibling::input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=3] + [count(./label)=1] +' + ); + } + + public function testMultipleChoiceExpandedWithLabelsAsFalse() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_label' => false, + 'multiple' => true, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@value="&a"][@checked] + /following-sibling::input[@type="checkbox"][@name="name[]"][@id="name_1"][@value="&b"][not(@checked)] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=3] + [count(./label)=1] +' + ); + } + + public function testMultipleChoiceExpandedWithLabelsSetByCallable() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + 'choice_label' => function ($choice, $label, $value) { + if ('&b' === $choice) { + return false; + } + + return 'label.'.$value; + }, + 'multiple' => true, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@value="&a"][@checked] + /following-sibling::label[@for="name_0"][.="[trans]label.&a[/trans]"] + /following-sibling::input[@type="checkbox"][@name="name[]"][@id="name_1"][@value="&b"][not(@checked)] + /following-sibling::input[@type="checkbox"][@name="name[]"][@id="name_2"][@value="&c"][not(@checked)] + /following-sibling::label[@for="name_2"][.="[trans]label.&c[/trans]"] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=4] + [count(./label)=3] +' + ); + } + + public function testMultipleChoiceExpandedWithLabelsSetFalseByCallable() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_label' => function () { + return false; + }, + 'multiple' => true, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@value="&a"][@checked] + /following-sibling::input[@type="checkbox"][@name="name[]"][@id="name_1"][@value="&b"][not(@checked)] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=3] + [count(./label)=1] +' + ); + } + + public function testFormEndWithRest() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('field1', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('field2', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm() + ->createView(); + + $this->renderWidget($view['field1']); + + // Rest should only contain field2 + $html = $this->renderEnd($view); + + // Insert the start tag, the end tag should be rendered by the helper + $this->assertMatchesXpath(''.$html, +'/form + [ + ./div + [ + ./label[@for="name_field2"] + /following-sibling::input[@type="text"][@id="name_field2"] + ] + /following-sibling::input + [@type="hidden"] + [@id="name__token"] + ] +' + ); + } + + public function testFormEndWithoutRest() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('field1', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('field2', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm() + ->createView(); + + $this->renderWidget($view['field1']); + + // Rest should only contain field2, but isn't rendered + $html = $this->renderEnd($view, array('render_rest' => false)); + + $this->assertEquals('', $html); + } + + public function testWidgetContainerAttributes() + { + $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'attr' => array('class' => 'foobar', 'data-foo' => 'bar'), + )); + + $form->add('text', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + + $html = $this->renderWidget($form->createView()); + + // compare plain HTML to check the whitespace + $this->assertContains('
    ', $html); + } + + public function testWidgetContainerAttributeNameRepeatedIfTrue() + { + $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'attr' => array('foo' => true), + )); + + $html = $this->renderWidget($form->createView()); + + // foo="foo" + $this->assertContains('
    ', $html); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..815b4f808a1f150924dc1bbe18a41b80d341d0ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractExtensionTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\AbstractExtension; +use Symfony\Component\Form\Tests\Fixtures\FooType; + +class AbstractExtensionTest extends TestCase +{ + public function testHasType() + { + $loader = new ConcreteExtension(); + $this->assertTrue($loader->hasType('Symfony\Component\Form\Tests\Fixtures\FooType')); + $this->assertFalse($loader->hasType('foo')); + } + + public function testGetType() + { + $loader = new ConcreteExtension(); + $this->assertInstanceOf('Symfony\Component\Form\Tests\Fixtures\FooType', $loader->getType('Symfony\Component\Form\Tests\Fixtures\FooType')); + } +} + +class ConcreteExtension extends AbstractExtension +{ + protected function loadTypes() + { + return array(new FooType()); + } + + protected function loadTypeGuesser() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractFormTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractFormTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4c93e0cc42a1b5d15993e711f6202cbb201ada7b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractFormTest.php @@ -0,0 +1,111 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\FormBuilder; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +abstract class AbstractFormTest extends TestCase +{ + /** + * @var EventDispatcherInterface + */ + protected $dispatcher; + + /** + * @var \Symfony\Component\Form\FormFactoryInterface + */ + protected $factory; + + /** + * @var \Symfony\Component\Form\FormInterface + */ + protected $form; + + protected function setUp() + { + $this->dispatcher = new EventDispatcher(); + $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $this->form = $this->createForm(); + } + + protected function tearDown() + { + $this->dispatcher = null; + $this->factory = null; + $this->form = null; + } + + /** + * @return \Symfony\Component\Form\FormInterface + */ + abstract protected function createForm(); + + /** + * @param string $name + * @param EventDispatcherInterface $dispatcher + * @param string $dataClass + * @param array $options + * + * @return FormBuilder + */ + protected function getBuilder($name = 'name', EventDispatcherInterface $dispatcher = null, $dataClass = null, array $options = array()) + { + return new FormBuilder($name, $dataClass, $dispatcher ?: $this->dispatcher, $this->factory, $options); + } + + /** + * @param string $name + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ + protected function getMockForm($name = 'name') + { + $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $config = $this->getMockBuilder('Symfony\Component\Form\FormConfigInterface')->getMock(); + + $form->expects($this->any()) + ->method('getName') + ->will($this->returnValue($name)); + $form->expects($this->any()) + ->method('getConfig') + ->will($this->returnValue($config)); + + return $form; + } + + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ + protected function getDataMapper() + { + return $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); + } + + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ + protected function getDataTransformer() + { + return $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock(); + } + + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ + protected function getFormValidator() + { + return $this->getMockBuilder('Symfony\Component\Form\FormValidatorInterface')->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php new file mode 100644 index 0000000000000000000000000000000000000000..810a0f7fae78f88d94417fd51884e55ce7fa17b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php @@ -0,0 +1,2464 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use Symfony\Component\Form\FormError; +use Symfony\Component\Form\FormView; +use Symfony\Component\Form\Extension\Csrf\CsrfExtension; +use Symfony\Component\Form\Test\FormIntegrationTestCase; + +abstract class AbstractLayoutTest extends FormIntegrationTestCase +{ + protected $csrfTokenManager; + protected $testableFeatures = array(); + + protected function setUp() + { + if (!extension_loaded('intl')) { + $this->markTestSkipped('Extension intl is required.'); + } + + \Locale::setDefault('en'); + + $this->csrfTokenManager = $this->getMockBuilder('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')->getMock(); + + parent::setUp(); + } + + protected function getExtensions() + { + return array( + new CsrfExtension($this->csrfTokenManager), + ); + } + + protected function tearDown() + { + $this->csrfTokenManager = null; + + parent::tearDown(); + } + + protected function assertXpathNodeValue(\DOMElement $element, $expression, $nodeValue) + { + $xpath = new \DOMXPath($element->ownerDocument); + $nodeList = $xpath->evaluate($expression); + $this->assertEquals(1, $nodeList->length); + $this->assertEquals($nodeValue, $nodeList->item(0)->nodeValue); + } + + protected function assertMatchesXpath($html, $expression, $count = 1) + { + $dom = new \DomDocument('UTF-8'); + try { + // Wrap in node so we can load HTML with multiple tags at + // the top level + $dom->loadXML(''.$html.''); + } catch (\Exception $e) { + $this->fail(sprintf( + "Failed loading HTML:\n\n%s\n\nError: %s", + $html, + $e->getMessage() + )); + } + $xpath = new \DOMXPath($dom); + $nodeList = $xpath->evaluate('/root'.$expression); + + if ($nodeList->length != $count) { + $dom->formatOutput = true; + $this->fail(sprintf( + "Failed asserting that \n\n%s\n\nmatches exactly %s. Matches %s in \n\n%s", + $expression, + $count == 1 ? 'once' : $count.' times', + $nodeList->length == 1 ? 'once' : $nodeList->length.' times', + // strip away and + substr($dom->saveHTML(), 6, -8) + )); + } + } + + protected function assertWidgetMatchesXpath(FormView $view, array $vars, $xpath) + { + // include ampersands everywhere to validate escaping + $html = $this->renderWidget($view, array_merge(array( + 'id' => 'my&id', + 'attr' => array('class' => 'my&class'), + ), $vars)); + + if (!isset($vars['id'])) { + $xpath = trim($xpath).' + [@id="my&id"]'; + } + + if (!isset($vars['attr']['class'])) { + $xpath .= ' + [@class="my&class"]'; + } + + $this->assertMatchesXpath($html, $xpath); + } + + abstract protected function renderForm(FormView $view, array $vars = array()); + + abstract protected function renderLabel(FormView $view, $label = null, array $vars = array()); + + abstract protected function renderErrors(FormView $view); + + abstract protected function renderWidget(FormView $view, array $vars = array()); + + abstract protected function renderRow(FormView $view, array $vars = array()); + + abstract protected function renderRest(FormView $view, array $vars = array()); + + abstract protected function renderStart(FormView $view, array $vars = array()); + + abstract protected function renderEnd(FormView $view, array $vars = array()); + + abstract protected function setTheme(FormView $view, array $themes); + + public function testLabel() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $view = $form->createView(); + $this->renderWidget($view, array('label' => 'foo')); + $html = $this->renderLabel($view); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [.="[trans]Name[/trans]"] +' + ); + } + + public function testLabelWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + 'translation_domain' => false, + )); + + $this->assertMatchesXpath($this->renderLabel($form->createView()), +'/label + [@for="name"] + [.="Name"] +' + ); + } + + public function testLabelOnForm() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType'); + $view = $form->createView(); + $this->renderWidget($view, array('label' => 'foo')); + $html = $this->renderLabel($view); + + $this->assertMatchesXpath($html, +'/label + [@class="required"] + [.="[trans]Name[/trans]"] +' + ); + } + + public function testLabelWithCustomTextPassedAsOption() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + 'label' => 'Custom label', + )); + $html = $this->renderLabel($form->createView()); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [.="[trans]Custom label[/trans]"] +' + ); + } + + public function testLabelWithCustomTextPassedDirectly() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderLabel($form->createView(), 'Custom label'); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [.="[trans]Custom label[/trans]"] +' + ); + } + + public function testLabelWithCustomTextPassedAsOptionAndDirectly() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + 'label' => 'Custom label', + )); + $html = $this->renderLabel($form->createView(), 'Overridden label'); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [.="[trans]Overridden label[/trans]"] +' + ); + } + + public function testLabelDoesNotRenderFieldAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderLabel($form->createView(), null, array( + 'attr' => array( + 'class' => 'my&class', + ), + )); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [@class="required"] +' + ); + } + + public function testLabelWithCustomAttributesPassedDirectly() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderLabel($form->createView(), null, array( + 'label_attr' => array( + 'class' => 'my&class', + ), + )); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [@class="my&class required"] +' + ); + } + + public function testLabelWithCustomTextAndCustomAttributesPassedDirectly() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderLabel($form->createView(), 'Custom label', array( + 'label_attr' => array( + 'class' => 'my&class', + ), + )); + + $this->assertMatchesXpath($html, +'/label + [@for="name"] + [@class="my&class required"] + [.="[trans]Custom label[/trans]"] +' + ); + } + + // https://github.com/symfony/symfony/issues/5029 + public function testLabelWithCustomTextAsOptionAndCustomAttributesPassedDirectly() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + 'label' => 'Custom label', + )); + $html = $this->renderLabel($form->createView(), null, array( + 'label_attr' => array( + 'class' => 'my&class', + ), + )); + + $this->assertMatchesXpath($html, + '/label + [@for="name"] + [@class="my&class required"] + [.="[trans]Custom label[/trans]"] +' + ); + } + + public function testLabelFormatName() + { + $form = $this->factory->createNamedBuilder('myform') + ->add('myfield', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm(); + $view = $form->get('myfield')->createView(); + $html = $this->renderLabel($view, null, array('label_format' => 'form.%name%')); + + $this->assertMatchesXpath($html, +'/label + [@for="myform_myfield"] + [.="[trans]form.myfield[/trans]"] +' + ); + } + + public function testLabelFormatId() + { + $form = $this->factory->createNamedBuilder('myform') + ->add('myfield', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm(); + $view = $form->get('myfield')->createView(); + $html = $this->renderLabel($view, null, array('label_format' => 'form.%id%')); + + $this->assertMatchesXpath($html, +'/label + [@for="myform_myfield"] + [.="[trans]form.myform_myfield[/trans]"] +' + ); + } + + public function testLabelFormatAsFormOption() + { + $options = array('label_format' => 'form.%name%'); + + $form = $this->factory->createNamedBuilder('myform', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, $options) + ->add('myfield', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm(); + $view = $form->get('myfield')->createView(); + $html = $this->renderLabel($view); + + $this->assertMatchesXpath($html, +'/label + [@for="myform_myfield"] + [.="[trans]form.myfield[/trans]"] +' + ); + } + + public function testLabelFormatOverriddenOption() + { + $options = array('label_format' => 'form.%name%'); + + $form = $this->factory->createNamedBuilder('myform', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, $options) + ->add('myfield', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('label_format' => 'field.%name%')) + ->getForm(); + $view = $form->get('myfield')->createView(); + $html = $this->renderLabel($view); + + $this->assertMatchesXpath($html, +'/label + [@for="myform_myfield"] + [.="[trans]field.myfield[/trans]"] +' + ); + } + + public function testLabelWithoutTranslationOnButton() + { + $form = $this->factory->createNamedBuilder('myform', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'translation_domain' => false, + )) + ->add('mybutton', 'Symfony\Component\Form\Extension\Core\Type\ButtonType') + ->getForm(); + $view = $form->get('mybutton')->createView(); + $html = $this->renderWidget($view); + + $this->assertMatchesXpath($html, +'/button + [@type="button"] + [@name="myform[mybutton]"] + [.="Mybutton"] +' + ); + } + + public function testLabelFormatOnButton() + { + $form = $this->factory->createNamedBuilder('myform') + ->add('mybutton', 'Symfony\Component\Form\Extension\Core\Type\ButtonType') + ->getForm(); + $view = $form->get('mybutton')->createView(); + $html = $this->renderWidget($view, array('label_format' => 'form.%name%')); + + $this->assertMatchesXpath($html, +'/button + [@type="button"] + [@name="myform[mybutton]"] + [.="[trans]form.mybutton[/trans]"] +' + ); + } + + public function testLabelFormatOnButtonId() + { + $form = $this->factory->createNamedBuilder('myform') + ->add('mybutton', 'Symfony\Component\Form\Extension\Core\Type\ButtonType') + ->getForm(); + $view = $form->get('mybutton')->createView(); + $html = $this->renderWidget($view, array('label_format' => 'form.%id%')); + + $this->assertMatchesXpath($html, +'/button + [@type="button"] + [@name="myform[mybutton]"] + [.="[trans]form.myform_mybutton[/trans]"] +' + ); + } + + public function testErrors() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $form->addError(new FormError('[trans]Error 1[/trans]')); + $form->addError(new FormError('[trans]Error 2[/trans]')); + $view = $form->createView(); + $html = $this->renderErrors($view); + + $this->assertMatchesXpath($html, +'/ul + [ + ./li[.="[trans]Error 1[/trans]"] + /following-sibling::li[.="[trans]Error 2[/trans]"] + ] + [count(./li)=2] +' + ); + } + + public function testOverrideWidgetBlock() + { + // see custom_widgets.html.twig + $form = $this->factory->createNamed('text_id', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $html = $this->renderWidget($form->createView()); + + $this->assertMatchesXpath($html, +'/div + [ + ./input + [@type="text"] + [@id="text_id"] + ] + [@id="container"] +' + ); + } + + public function testCheckedCheckbox() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', true); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="checkbox"] + [@name="name"] + [@checked="checked"] + [@value="1"] +' + ); + } + + public function testUncheckedCheckbox() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', false); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="checkbox"] + [@name="name"] + [not(@checked)] +' + ); + } + + public function testCheckboxWithValue() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', false, array( + 'value' => 'foo&bar', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="checkbox"] + [@name="name"] + [@value="foo&bar"] +' + ); + } + + public function testSingleChoice() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => false, + )); + + // If the field is collapsed, has no "multiple" attribute, is required but + // has *no* empty value, the "required" must not be added, otherwise + // the resulting HTML is invalid. + // https://github.com/symfony/symfony/issues/8942 + + // HTML 5 spec + // http://www.w3.org/html/wg/drafts/html/master/forms.html#placeholder-label-option + + // "If a select element has a required attribute specified, does not + // have a multiple attribute specified, and has a display size of 1, + // then the select element must have a placeholder label option." + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [not(@required)] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testSelectWithSizeBiggerThanOneCanBeRequired() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', null, array( + 'choices' => array('a', 'b'), + 'multiple' => false, + 'expanded' => false, + 'attr' => array('size' => 2), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [@required="required"] + [@size="2"] + [count(./option)=2] +' + ); + } + + public function testSingleChoiceWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => false, + 'choice_translation_domain' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [not(@required)] + [ + ./option[@value="&a"][@selected="selected"][.="Choice&A"] + /following-sibling::option[@value="&b"][not(@selected)][.="Choice&B"] + ] + [count(./option)=2] +' + ); + } + + public function testSingleChoiceWithPlaceholderWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => false, + 'required' => false, + 'translation_domain' => false, + 'placeholder' => 'Placeholder&Not&Translated', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [not(@required)] + [ + ./option[@value=""][not(@selected)][not(@disabled)][.="Placeholder&Not&Translated"] + /following-sibling::option[@value="&a"][@selected="selected"][.="Choice&A"] + /following-sibling::option[@value="&b"][not(@selected)][.="Choice&B"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [not(@required)] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][@class="foo&bar"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testSingleChoiceAttributesWithMainAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => false, + 'attr' => array('class' => 'bar&baz'), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'bar&baz')), +'/select + [@name="name"] + [@class="bar&baz"] + [not(@required)] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"][not(@id)][not(@name)] + /following-sibling::option[@value="&b"][not(@class)][not(@selected)][.="[trans]Choice&B[/trans]"][not(@id)][not(@name)] + ] + [count(./option)=2] +' + ); + } + + public function testSingleExpandedChoiceAttributesWithMainAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => true, + 'attr' => array('class' => 'bar&baz'), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'bar&baz')), +'/div + [@class="bar&baz"] + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + /following-sibling::label[@for="name_0"][.="[trans]Choice&A[/trans]"] + /following-sibling::input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] + /following-sibling::label[@for="name_1"][.="[trans]Choice&B[/trans]"] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=3] +' + ); + } + + public function testSingleChoiceWithPreferred() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'preferred_choices' => array('&b'), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('separator' => '-- sep --'), +'/select + [@name="name"] + [not(@required)] + [ + ./option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + /following-sibling::option[@disabled="disabled"][not(@selected)][.="-- sep --"] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceWithPreferredAndNoSeparator() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'preferred_choices' => array('&b'), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('separator' => null), +'/select + [@name="name"] + [not(@required)] + [ + ./option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testSingleChoiceWithPreferredAndBlankSeparator() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'preferred_choices' => array('&b'), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array('separator' => ''), +'/select + [@name="name"] + [not(@required)] + [ + ./option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + /following-sibling::option[@disabled="disabled"][not(@selected)][.=""] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testChoiceWithOnlyPreferred() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'preferred_choices' => array('&a', '&b'), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [count(./option)=2] +' + ); + } + + public function testSingleChoiceNonRequired() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'required' => false, + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [not(@required)] + [ + ./option[@value=""][.=""] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceNonRequiredNoneSelected() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', null, array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'required' => false, + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [not(@required)] + [ + ./option[@value=""][.=""] + /following-sibling::option[@value="&a"][not(@selected)][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceNonRequiredWithPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => false, + 'required' => false, + 'placeholder' => 'Select&Anything&Not&Me', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [not(@required)] + [ + ./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Select&Anything&Not&Me[/trans]"] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceRequiredWithPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'required' => true, + 'multiple' => false, + 'expanded' => false, + 'placeholder' => 'Test&Me', + )); + + // The "disabled" attribute was removed again due to a bug in the + // BlackBerry 10 browser. + // See https://github.com/symfony/symfony/pull/7678 + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [@required="required"] + [ + ./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Test&Me[/trans]"] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceRequiredWithPlaceholderViaView() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'required' => true, + 'multiple' => false, + 'expanded' => false, + )); + + // The "disabled" attribute was removed again due to a bug in the + // BlackBerry 10 browser. + // See https://github.com/symfony/symfony/pull/7678 + $this->assertWidgetMatchesXpath($form->createView(), array('placeholder' => ''), +'/select + [@name="name"] + [@required="required"] + [ + ./option[@value=""][not(@selected)][not(@disabled)][.=""] + /following-sibling::option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=3] +' + ); + } + + public function testSingleChoiceGrouped() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array( + 'Group&1' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'Group&2' => array('Choice&C' => '&c'), + ), + 'multiple' => false, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [./optgroup[@label="[trans]Group&1[/trans]"] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] + ] + [./optgroup[@label="[trans]Group&2[/trans]"] + [./option[@value="&c"][not(@selected)][.="[trans]Choice&C[/trans]"]] + [count(./option)=1] + ] + [count(./optgroup)=2] +' + ); + } + + public function testMultipleChoice() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'required' => true, + 'multiple' => true, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name[]"] + [@required="required"] + [@multiple="multiple"] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testMultipleChoiceAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), + 'required' => true, + 'multiple' => true, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name[]"] + [@required="required"] + [@multiple="multiple"] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][@class="foo&bar"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testMultipleChoiceSkipsPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => true, + 'expanded' => false, + 'placeholder' => 'Test&Me', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name[]"] + [@multiple="multiple"] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testMultipleChoiceNonRequired() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'required' => false, + 'multiple' => true, + 'expanded' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name[]"] + [@multiple="multiple"] + [ + ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] + /following-sibling::option[@value="&b"][not(@selected)][.="[trans]Choice&B[/trans]"] + ] + [count(./option)=2] +' + ); + } + + public function testSingleChoiceExpanded() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + /following-sibling::label[@for="name_0"][.="[trans]Choice&A[/trans]"] + /following-sibling::input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] + /following-sibling::label[@for="name_1"][.="[trans]Choice&B[/trans]"] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=3] +' + ); + } + + public function testSingleChoiceExpandedWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => true, + 'choice_translation_domain' => false, + 'placeholder' => 'Placeholder&Not&Translated', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + /following-sibling::label[@for="name_0"][.="Choice&A"] + /following-sibling::input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] + /following-sibling::label[@for="name_1"][.="Choice&B"] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=3] +' + ); + } + + public function testSingleChoiceExpandedAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), + 'multiple' => false, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] + /following-sibling::label[@for="name_0"][.="[trans]Choice&A[/trans]"] + /following-sibling::input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][@class="foo&bar"][not(@checked)] + /following-sibling::label[@for="name_1"][.="[trans]Choice&B[/trans]"] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=3] +' + ); + } + + public function testSingleChoiceExpandedWithPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => true, + 'placeholder' => 'Test&Me', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input[@type="radio"][@name="name"][@id="name_placeholder"][not(@checked)] + /following-sibling::label[@for="name_placeholder"][.="[trans]Test&Me[/trans]"] + /following-sibling::input[@type="radio"][@name="name"][@id="name_0"][@checked] + /following-sibling::label[@for="name_0"][.="[trans]Choice&A[/trans]"] + /following-sibling::input[@type="radio"][@name="name"][@id="name_1"][not(@checked)] + /following-sibling::label[@for="name_1"][.="[trans]Choice&B[/trans]"] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=4] +' + ); + } + + public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choice_translation_domain' => false, + 'placeholder' => 'Placeholder&Not&Translated', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input[@type="radio"][@name="name"][@id="name_placeholder"][not(@checked)] + /following-sibling::label[@for="name_placeholder"][.="Placeholder&Not&Translated"] + /following-sibling::input[@type="radio"][@name="name"][@id="name_0"][@checked] + /following-sibling::label[@for="name_0"][.="Choice&A"] + /following-sibling::input[@type="radio"][@name="name"][@id="name_1"][not(@checked)] + /following-sibling::label[@for="name_1"][.="Choice&B"] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=4] +' + ); + } + + public function testSingleChoiceExpandedWithBooleanValue() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', true, array( + 'choices' => array('Choice&A' => '1', 'Choice&B' => '0'), + 'multiple' => false, + 'expanded' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input[@type="radio"][@name="name"][@id="name_0"][@checked] + /following-sibling::label[@for="name_0"][.="[trans]Choice&A[/trans]"] + /following-sibling::input[@type="radio"][@name="name"][@id="name_1"][not(@checked)] + /following-sibling::label[@for="name_1"][.="[trans]Choice&B[/trans]"] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=3] +' + ); + } + + public function testMultipleChoiceExpanded() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + 'multiple' => true, + 'expanded' => true, + 'required' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@checked][not(@required)] + /following-sibling::label[@for="name_0"][.="[trans]Choice&A[/trans]"] + /following-sibling::input[@type="checkbox"][@name="name[]"][@id="name_1"][not(@checked)][not(@required)] + /following-sibling::label[@for="name_1"][.="[trans]Choice&B[/trans]"] + /following-sibling::input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)] + /following-sibling::label[@for="name_2"][.="[trans]Choice&C[/trans]"] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=4] +' + ); + } + + public function testMultipleChoiceExpandedWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + 'multiple' => true, + 'expanded' => true, + 'required' => true, + 'choice_translation_domain' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@checked][not(@required)] + /following-sibling::label[@for="name_0"][.="Choice&A"] + /following-sibling::input[@type="checkbox"][@name="name[]"][@id="name_1"][not(@checked)][not(@required)] + /following-sibling::label[@for="name_1"][.="Choice&B"] + /following-sibling::input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)] + /following-sibling::label[@for="name_2"][.="Choice&C"] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=4] +' + ); + } + + public function testMultipleChoiceExpandedAttributes() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array('&a', '&c'), array( + 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), + 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), + 'multiple' => true, + 'expanded' => true, + 'required' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@checked][not(@required)] + /following-sibling::label[@for="name_0"][.="[trans]Choice&A[/trans]"] + /following-sibling::input[@type="checkbox"][@name="name[]"][@id="name_1"][@class="foo&bar"][not(@checked)][not(@required)] + /following-sibling::label[@for="name_1"][.="[trans]Choice&B[/trans]"] + /following-sibling::input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)] + /following-sibling::label[@for="name_2"][.="[trans]Choice&C[/trans]"] + /following-sibling::input[@type="hidden"][@id="name__token"] + ] + [count(./input)=4] +' + ); + } + + public function testCountry() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CountryType', 'AT'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [./option[@value="AT"][@selected="selected"][.="Austria"]] + [count(./option)>200] +' + ); + } + + public function testCountryWithPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CountryType', 'AT', array( + 'placeholder' => 'Select&Country', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Select&Country[/trans]"]] + [./option[@value="AT"][@selected="selected"][.="Austria"]] + [count(./option)>201] +' + ); + } + + public function testDateTime() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array( + 'input' => 'string', + 'with_seconds' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@id="name_date"] + [ + ./select + [@id="name_date_month"] + [./option[@value="2"][@selected="selected"]] + /following-sibling::select + [@id="name_date_day"] + [./option[@value="3"][@selected="selected"]] + /following-sibling::select + [@id="name_date_year"] + [./option[@value="'.date('Y').'"][@selected="selected"]] + ] + /following-sibling::div + [@id="name_time"] + [ + ./select + [@id="name_time_hour"] + [./option[@value="4"][@selected="selected"]] + /following-sibling::select + [@id="name_time_minute"] + [./option[@value="5"][@selected="selected"]] + ] + ] + [count(.//select)=5] +' + ); + } + + public function testDateTimeWithPlaceholderGlobal() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', null, array( + 'input' => 'string', + 'placeholder' => 'Change&Me', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@id="name_date"] + [ + ./select + [@id="name_date_month"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + /following-sibling::select + [@id="name_date_day"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + /following-sibling::select + [@id="name_date_year"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + ] + /following-sibling::div + [@id="name_time"] + [ + ./select + [@id="name_time_hour"] + [./option[@value=""][.="[trans]Change&Me[/trans]"]] + /following-sibling::select + [@id="name_time_minute"] + [./option[@value=""][.="[trans]Change&Me[/trans]"]] + ] + ] + [count(.//select)=5] +' + ); + } + + public function testDateTimeWithHourAndMinute() + { + $data = array('year' => date('Y'), 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5'); + + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', $data, array( + 'input' => 'array', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@id="name_date"] + [ + ./select + [@id="name_date_month"] + [./option[@value="2"][@selected="selected"]] + /following-sibling::select + [@id="name_date_day"] + [./option[@value="3"][@selected="selected"]] + /following-sibling::select + [@id="name_date_year"] + [./option[@value="'.date('Y').'"][@selected="selected"]] + ] + /following-sibling::div + [@id="name_time"] + [ + ./select + [@id="name_time_hour"] + [./option[@value="4"][@selected="selected"]] + /following-sibling::select + [@id="name_time_minute"] + [./option[@value="5"][@selected="selected"]] + ] + ] + [count(.//select)=5] +' + ); + } + + public function testDateTimeWithSeconds() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', date('Y').'-02-03 04:05:06', array( + 'input' => 'string', + 'with_seconds' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./div + [@id="name_date"] + [ + ./select + [@id="name_date_month"] + [./option[@value="2"][@selected="selected"]] + /following-sibling::select + [@id="name_date_day"] + [./option[@value="3"][@selected="selected"]] + /following-sibling::select + [@id="name_date_year"] + [./option[@value="'.date('Y').'"][@selected="selected"]] + ] + /following-sibling::div + [@id="name_time"] + [ + ./select + [@id="name_time_hour"] + [./option[@value="4"][@selected="selected"]] + /following-sibling::select + [@id="name_time_minute"] + [./option[@value="5"][@selected="selected"]] + /following-sibling::select + [@id="name_time_second"] + [./option[@value="6"][@selected="selected"]] + ] + ] + [count(.//select)=6] +' + ); + } + + public function testDateTimeSingleText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array( + 'input' => 'string', + 'date_widget' => 'single_text', + 'time_widget' => 'single_text', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input + [@type="date"] + [@id="name_date"] + [@name="name[date]"] + [@value="2011-02-03"] + /following-sibling::input + [@type="time"] + [@id="name_time"] + [@name="name[time]"] + [@value="04:05"] + ] +' + ); + } + + public function testDateTimeWithWidgetSingleText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array( + 'input' => 'string', + 'widget' => 'single_text', + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="datetime"] + [@name="name"] + [@value="2011-02-03T04:05:06Z"] +' + ); + } + + public function testDateTimeWithWidgetSingleTextIgnoreDateAndTimeWidgets() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', array( + 'input' => 'string', + 'date_widget' => 'choice', + 'time_widget' => 'choice', + 'widget' => 'single_text', + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="datetime"] + [@name="name"] + [@value="2011-02-03T04:05:06Z"] +' + ); + } + + public function testDateChoice() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', date('Y').'-02-03', array( + 'input' => 'string', + 'widget' => 'choice', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./select + [@id="name_month"] + [./option[@value="2"][@selected="selected"]] + /following-sibling::select + [@id="name_day"] + [./option[@value="3"][@selected="selected"]] + /following-sibling::select + [@id="name_year"] + [./option[@value="'.date('Y').'"][@selected="selected"]] + ] + [count(./select)=3] +' + ); + } + + public function testDateChoiceWithPlaceholderGlobal() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', null, array( + 'input' => 'string', + 'widget' => 'choice', + 'placeholder' => 'Change&Me', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./select + [@id="name_month"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + /following-sibling::select + [@id="name_day"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + /following-sibling::select + [@id="name_year"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + ] + [count(./select)=3] +' + ); + } + + public function testDateChoiceWithPlaceholderOnYear() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', null, array( + 'input' => 'string', + 'widget' => 'choice', + 'required' => false, + 'placeholder' => array('year' => 'Change&Me'), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./select + [@id="name_month"] + [./option[@value="1"]] + /following-sibling::select + [@id="name_day"] + [./option[@value="1"]] + /following-sibling::select + [@id="name_year"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + ] + [count(./select)=3] +' + ); + } + + public function testDateText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', array( + 'input' => 'string', + 'widget' => 'text', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input + [@id="name_month"] + [@type="text"] + [@value="2"] + /following-sibling::input + [@id="name_day"] + [@type="text"] + [@value="3"] + /following-sibling::input + [@id="name_year"] + [@type="text"] + [@value="2011"] + ] + [count(./input)=3] +' + ); + } + + public function testDateSingleText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', '2011-02-03', array( + 'input' => 'string', + 'widget' => 'single_text', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="date"] + [@name="name"] + [@value="2011-02-03"] +' + ); + } + + public function testDateErrorBubbling() + { + $form = $this->factory->createNamedBuilder('form', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('date', 'Symfony\Component\Form\Extension\Core\Type\DateType') + ->getForm(); + $form->get('date')->addError(new FormError('[trans]Error![/trans]')); + $view = $form->createView(); + + $this->assertEmpty($this->renderErrors($view)); + $this->assertNotEmpty($this->renderErrors($view['date'])); + } + + public function testBirthDay() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\BirthdayType', '2000-02-03', array( + 'input' => 'string', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./select + [@id="name_month"] + [./option[@value="2"][@selected="selected"]] + /following-sibling::select + [@id="name_day"] + [./option[@value="3"][@selected="selected"]] + /following-sibling::select + [@id="name_year"] + [./option[@value="2000"][@selected="selected"]] + ] + [count(./select)=3] +' + ); + } + + public function testBirthDayWithPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\BirthdayType', '1950-01-01', array( + 'input' => 'string', + 'placeholder' => '', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./select + [@id="name_month"] + [./option[@value=""][not(@selected)][not(@disabled)][.=""]] + [./option[@value="1"][@selected="selected"]] + /following-sibling::select + [@id="name_day"] + [./option[@value=""][not(@selected)][not(@disabled)][.=""]] + [./option[@value="1"][@selected="selected"]] + /following-sibling::select + [@id="name_year"] + [./option[@value=""][not(@selected)][not(@disabled)][.=""]] + [./option[@value="1950"][@selected="selected"]] + ] + [count(./select)=3] +' + ); + } + + public function testEmail() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\EmailType', 'foo&bar'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="email"] + [@name="name"] + [@value="foo&bar"] + [not(@maxlength)] +' + ); + } + + public function testEmailWithMaxLength() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\EmailType', 'foo&bar', array( + 'attr' => array('maxlength' => 123), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="email"] + [@name="name"] + [@value="foo&bar"] + [@maxlength="123"] +' + ); + } + + public function testFile() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\FileType'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="file"] +' + ); + } + + public function testHidden() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\HiddenType', 'foo&bar'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="hidden"] + [@name="name"] + [@value="foo&bar"] +' + ); + } + + public function testDisabled() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + 'disabled' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="text"] + [@name="name"] + [@disabled="disabled"] +' + ); + } + + public function testInteger() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\IntegerType', 123); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="number"] + [@name="name"] + [@value="123"] +' + ); + } + + public function testLanguage() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\LanguageType', 'de'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [./option[@value="de"][@selected="selected"][.="German"]] + [count(./option)>200] +' + ); + } + + public function testLocale() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\LocaleType', 'de_AT'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [./option[@value="de_AT"][@selected="selected"][.="German (Austria)"]] + [count(./option)>200] +' + ); + } + + public function testMoney() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', 1234.56, array( + 'currency' => 'EUR', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="text"] + [@name="name"] + [@value="1234.56"] + [contains(.., "€")] +' + ); + } + + public function testNumber() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\NumberType', 1234.56); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="text"] + [@name="name"] + [@value="1234.56"] +' + ); + } + + public function testPassword() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', 'foo&bar'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="password"] + [@name="name"] +' + ); + } + + public function testPasswordSubmittedWithNotAlwaysEmpty() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', null, array( + 'always_empty' => false, + )); + $form->submit('foo&bar'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="password"] + [@name="name"] + [@value="foo&bar"] +' + ); + } + + public function testPasswordWithMaxLength() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', 'foo&bar', array( + 'attr' => array('maxlength' => 123), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="password"] + [@name="name"] + [@maxlength="123"] +' + ); + } + + public function testPercent() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PercentType', 0.1); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="text"] + [@name="name"] + [@value="10"] + [contains(.., "%")] +' + ); + } + + public function testCheckedRadio() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RadioType', true); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="radio"] + [@name="name"] + [@checked="checked"] + [@value="1"] +' + ); + } + + public function testUncheckedRadio() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RadioType', false); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="radio"] + [@name="name"] + [not(@checked)] +' + ); + } + + public function testRadioWithValue() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RadioType', false, array( + 'value' => 'foo&bar', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="radio"] + [@name="name"] + [@value="foo&bar"] +' + ); + } + + public function testRange() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RangeType', 42, array('attr' => array('min' => 5))); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="range"] + [@name="name"] + [@value="42"] + [@min="5"] +' + ); + } + + public function testRangeWithMinMaxValues() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RangeType', 42, array('attr' => array('min' => 5, 'max' => 57))); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="range"] + [@name="name"] + [@value="42"] + [@min="5"] + [@max="57"] +' + ); + } + + public function testTextarea() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextareaType', 'foo&bar', array( + 'attr' => array('pattern' => 'foo'), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/textarea + [@name="name"] + [@pattern="foo"] + [.="foo&bar"] +' + ); + } + + public function testText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'foo&bar'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="text"] + [@name="name"] + [@value="foo&bar"] + [not(@maxlength)] +' + ); + } + + public function testTextWithMaxLength() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'foo&bar', array( + 'attr' => array('maxlength' => 123), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="text"] + [@name="name"] + [@value="foo&bar"] + [@maxlength="123"] +' + ); + } + + public function testSearch() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\SearchType', 'foo&bar'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="search"] + [@name="name"] + [@value="foo&bar"] + [not(@maxlength)] +' + ); + } + + public function testTime() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', array( + 'input' => 'string', + 'with_seconds' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./select + [@id="name_hour"] + [not(@size)] + [./option[@value="4"][@selected="selected"]] + /following-sibling::select + [@id="name_minute"] + [not(@size)] + [./option[@value="5"][@selected="selected"]] + ] + [count(./select)=2] +' + ); + } + + public function testTimeWithSeconds() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', array( + 'input' => 'string', + 'with_seconds' => true, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./select + [@id="name_hour"] + [not(@size)] + [./option[@value="4"][@selected="selected"]] + [count(./option)>23] + /following-sibling::select + [@id="name_minute"] + [not(@size)] + [./option[@value="5"][@selected="selected"]] + [count(./option)>59] + /following-sibling::select + [@id="name_second"] + [not(@size)] + [./option[@value="6"][@selected="selected"]] + [count(./option)>59] + ] + [count(./select)=3] +' + ); + } + + public function testTimeText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', array( + 'input' => 'string', + 'widget' => 'text', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./input + [@type="text"] + [@id="name_hour"] + [@name="name[hour]"] + [@value="04"] + [@size="1"] + [@required="required"] + /following-sibling::input + [@type="text"] + [@id="name_minute"] + [@name="name[minute]"] + [@value="05"] + [@size="1"] + [@required="required"] + ] + [count(./input)=2] +' + ); + } + + public function testTimeSingleText() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', '04:05:06', array( + 'input' => 'string', + 'widget' => 'single_text', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="time"] + [@name="name"] + [@value="04:05"] + [not(@size)] +' + ); + } + + public function testTimeWithPlaceholderGlobal() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', null, array( + 'input' => 'string', + 'placeholder' => 'Change&Me', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./select + [@id="name_hour"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + [count(./option)>24] + /following-sibling::select + [@id="name_minute"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + [count(./option)>60] + ] + [count(./select)=2] +' + ); + } + + public function testTimeWithPlaceholderOnYear() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimeType', null, array( + 'input' => 'string', + 'required' => false, + 'placeholder' => array('hour' => 'Change&Me'), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/div + [ + ./select + [@id="name_hour"] + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Change&Me[/trans]"]] + [count(./option)>24] + /following-sibling::select + [@id="name_minute"] + [./option[@value="1"]] + [count(./option)>59] + ] + [count(./select)=2] +' + ); + } + + public function testTimeErrorBubbling() + { + $form = $this->factory->createNamedBuilder('form', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('time', 'Symfony\Component\Form\Extension\Core\Type\TimeType') + ->getForm(); + $form->get('time')->addError(new FormError('[trans]Error![/trans]')); + $view = $form->createView(); + + $this->assertEmpty($this->renderErrors($view)); + $this->assertNotEmpty($this->renderErrors($view['time'])); + } + + public function testTimezone() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimezoneType', 'Europe/Vienna'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [@name="name"] + [not(@required)] + [./optgroup + [@label="Europe"] + [./option[@value="Europe/Vienna"][@selected="selected"][.="Vienna"]] + ] + [count(./optgroup)>10] + [count(.//option)>200] +' + ); + } + + public function testTimezoneWithPlaceholder() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TimezoneType', null, array( + 'placeholder' => 'Select&Timezone', + 'required' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/select + [./option[@value=""][not(@selected)][not(@disabled)][.="[trans]Select&Timezone[/trans]"]] + [count(./optgroup)>10] + [count(.//option)>201] +' + ); + } + + public function testUrl() + { + $url = 'http://www.google.com?foo1=bar1&foo2=bar2'; + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/input + [@type="url"] + [@name="name"] + [@value="http://www.google.com?foo1=bar1&foo2=bar2"] +' + ); + } + + public function testCollectionPrototype() + { + $form = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType', array('items' => array('one', 'two', 'three'))) + ->add('items', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array('allow_add' => true)) + ->getForm() + ->createView(); + + $html = $this->renderWidget($form); + + $this->assertMatchesXpath($html, + '//div[@id="name_items"][@data-prototype] + | + //table[@id="name_items"][@data-prototype]' + ); + } + + public function testEmptyRootFormName() + { + $form = $this->factory->createNamedBuilder('', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('child', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm(); + + $this->assertMatchesXpath($this->renderWidget($form->createView()), + '//input[@type="hidden"][@id="_token"][@name="_token"] + | + //input[@type="text"][@id="child"][@name="child"]', 2); + } + + public function testButton() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ButtonType'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), + '/button[@type="button"][@name="name"][.="[trans]Name[/trans]"]' + ); + } + + public function testButtonLabelIsEmpty() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ButtonType'); + + $this->assertSame('', $this->renderLabel($form->createView())); + } + + public function testButtonlabelWithoutTranslation() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, array( + 'translation_domain' => false, + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), + '/button[@type="button"][@name="name"][.="Name"]' + ); + } + + public function testSubmit() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\SubmitType'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), + '/button[@type="submit"][@name="name"]' + ); + } + + public function testReset() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ResetType'); + + $this->assertWidgetMatchesXpath($form->createView(), array(), + '/button[@type="reset"][@name="name"]' + ); + } + + public function testStartTag() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => 'http://example.com/directory', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('
    ', $html); + } + + public function testStartTagForPutRequest() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'put', + 'action' => 'http://example.com/directory', + )); + + $html = $this->renderStart($form->createView()); + + $this->assertMatchesXpath($html.'', +'/form + [./input[@type="hidden"][@name="_method"][@value="PUT"]] + [@method="post"] + [@action="http://example.com/directory"]' + ); + } + + public function testStartTagWithOverriddenVars() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'put', + 'action' => 'http://example.com/directory', + )); + + $html = $this->renderStart($form->createView(), array( + 'method' => 'post', + 'action' => 'http://foo.com/directory', + )); + + $this->assertSame('
    ', $html); + } + + public function testStartTagForMultipartForm() + { + $form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => 'http://example.com/directory', + )) + ->add('file', 'Symfony\Component\Form\Extension\Core\Type\FileType') + ->getForm(); + + $html = $this->renderStart($form->createView()); + + $this->assertSame('', $html); + } + + public function testStartTagWithExtraAttributes() + { + $form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'method' => 'get', + 'action' => 'http://example.com/directory', + )); + + $html = $this->renderStart($form->createView(), array( + 'attr' => array('class' => 'foobar'), + )); + + $this->assertSame('', $html); + } + + public function testWidgetAttributes() + { + $form = $this->factory->createNamed('text', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'value', array( + 'required' => true, + 'disabled' => true, + 'attr' => array('readonly' => true, 'maxlength' => 10, 'pattern' => '\d+', 'class' => 'foobar', 'data-foo' => 'bar'), + )); + + $html = $this->renderWidget($form->createView()); + + // compare plain HTML to check the whitespace + $this->assertSame('', $html); + } + + public function testWidgetAttributeNameRepeatedIfTrue() + { + $form = $this->factory->createNamed('text', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'value', array( + 'attr' => array('foo' => true), + )); + + $html = $this->renderWidget($form->createView()); + + // foo="foo" + $this->assertSame('', $html); + } + + public function testWidgetAttributeHiddenIfFalse() + { + $form = $this->factory->createNamed('text', 'Symfony\Component\Form\Extension\Core\Type\TextType', 'value', array( + 'attr' => array('foo' => false), + )); + + $html = $this->renderWidget($form->createView()); + + $this->assertNotContains('foo="', $html); + } + + public function testButtonAttributes() + { + $form = $this->factory->createNamed('button', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, array( + 'disabled' => true, + 'attr' => array('class' => 'foobar', 'data-foo' => 'bar'), + )); + + $html = $this->renderWidget($form->createView()); + + // compare plain HTML to check the whitespace + $this->assertSame('', $html); + } + + public function testButtonAttributeNameRepeatedIfTrue() + { + $form = $this->factory->createNamed('button', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, array( + 'attr' => array('foo' => true), + )); + + $html = $this->renderWidget($form->createView()); + + // foo="foo" + $this->assertSame('', $html); + } + + public function testButtonAttributeHiddenIfFalse() + { + $form = $this->factory->createNamed('button', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', null, array( + 'attr' => array('foo' => false), + )); + + $html = $this->renderWidget($form->createView()); + + $this->assertNotContains('foo="', $html); + } + + public function testTextareaWithWhitespaceOnlyContentRetainsValue() + { + $form = $this->factory->createNamed('textarea', 'Symfony\Component\Form\Extension\Core\Type\TextareaType', ' '); + + $html = $this->renderWidget($form->createView()); + + $this->assertContains('> ', $html); + } + + public function testTextareaWithWhitespaceOnlyContentRetainsValueWhenRenderingForm() + { + $form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', array('textarea' => ' ')) + ->add('textarea', 'Symfony\Component\Form\Extension\Core\Type\TextareaType') + ->getForm(); + + $html = $this->renderForm($form->createView()); + + $this->assertContains('> ', $html); + } + + public function testWidgetContainerAttributeHiddenIfFalse() + { + $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'attr' => array('foo' => false), + )); + + $html = $this->renderWidget($form->createView()); + + // no foo + $this->assertNotContains('foo="', $html); + } + + public function testTranslatedAttributes() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('attr' => array('title' => 'Foo'))) + ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('attr' => array('placeholder' => 'Bar'))) + ->getForm() + ->createView(); + + $html = $this->renderForm($view); + + $this->assertMatchesXpath($html, '/form//input[@title="[trans]Foo[/trans]"]'); + $this->assertMatchesXpath($html, '/form//input[@placeholder="[trans]Bar[/trans]"]'); + } + + public function testAttributesNotTranslatedWhenTranslationDomainIsFalse() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'translation_domain' => false, + )) + ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('attr' => array('title' => 'Foo'))) + ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('attr' => array('placeholder' => 'Bar'))) + ->getForm() + ->createView(); + + $html = $this->renderForm($view); + + $this->assertMatchesXpath($html, '/form//input[@title="Foo"]'); + $this->assertMatchesXpath($html, '/form//input[@placeholder="Bar"]'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f9aa7a5341cb41e99523df7c0c0b8853980202e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php @@ -0,0 +1,382 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\FormError; +use Symfony\Component\Form\FormFactory; +use Symfony\Component\Form\Forms; +use Symfony\Component\Form\RequestHandlerInterface; + +/** + * @author Bernhard Schussek + */ +abstract class AbstractRequestHandlerTest extends TestCase +{ + /** + * @var RequestHandlerInterface + */ + protected $requestHandler; + + /** + * @var FormFactory + */ + protected $factory; + + protected $request; + + protected $serverParams; + + protected function setUp() + { + $this->serverParams = $this->getMockBuilder('Symfony\Component\Form\Util\ServerParams')->setMethods(array('getNormalizedIniPostMaxSize', 'getContentLength'))->getMock(); + $this->requestHandler = $this->getRequestHandler(); + $this->factory = Forms::createFormFactoryBuilder()->getFormFactory(); + $this->request = null; + } + + public function methodExceptGetProvider() + { + return array( + array('POST'), + array('PUT'), + array('DELETE'), + array('PATCH'), + ); + } + + public function methodProvider() + { + return array_merge(array( + array('GET'), + ), $this->methodExceptGetProvider()); + } + + /** + * @dataProvider methodProvider + */ + public function testSubmitIfNameInRequest($method) + { + $form = $this->getMockForm('param1', $method); + + $this->setRequestData($method, array( + 'param1' => 'DATA', + )); + + $form->expects($this->once()) + ->method('submit') + ->with('DATA', 'PATCH' !== $method); + + $this->requestHandler->handleRequest($form, $this->request); + } + + /** + * @dataProvider methodProvider + */ + public function testDoNotSubmitIfWrongRequestMethod($method) + { + $form = $this->getMockForm('param1', $method); + + $otherMethod = 'POST' === $method ? 'PUT' : 'POST'; + + $this->setRequestData($otherMethod, array( + 'param1' => 'DATA', + )); + + $form->expects($this->never()) + ->method('submit'); + + $this->requestHandler->handleRequest($form, $this->request); + } + + /** + * @dataProvider methodExceptGetProvider + */ + public function testDoNoSubmitSimpleFormIfNameNotInRequestAndNotGetRequest($method) + { + $form = $this->getMockForm('param1', $method, false); + + $this->setRequestData($method, array( + 'paramx' => array(), + )); + + $form->expects($this->never()) + ->method('submit'); + + $this->requestHandler->handleRequest($form, $this->request); + } + + /** + * @dataProvider methodExceptGetProvider + */ + public function testDoNotSubmitCompoundFormIfNameNotInRequestAndNotGetRequest($method) + { + $form = $this->getMockForm('param1', $method, true); + + $this->setRequestData($method, array( + 'paramx' => array(), + )); + + $form->expects($this->never()) + ->method('submit'); + + $this->requestHandler->handleRequest($form, $this->request); + } + + public function testDoNotSubmitIfNameNotInRequestAndGetRequest() + { + $form = $this->getMockForm('param1', 'GET'); + + $this->setRequestData('GET', array( + 'paramx' => array(), + )); + + $form->expects($this->never()) + ->method('submit'); + + $this->requestHandler->handleRequest($form, $this->request); + } + + /** + * @dataProvider methodProvider + */ + public function testSubmitFormWithEmptyNameIfAtLeastOneFieldInRequest($method) + { + $form = $this->getMockForm('', $method); + $form->expects($this->any()) + ->method('all') + ->will($this->returnValue(array( + 'param1' => $this->getMockForm('param1'), + 'param2' => $this->getMockForm('param2'), + ))); + + $this->setRequestData($method, $requestData = array( + 'param1' => 'submitted value', + 'paramx' => 'submitted value', + )); + + $form->expects($this->once()) + ->method('submit') + ->with($requestData, 'PATCH' !== $method); + + $this->requestHandler->handleRequest($form, $this->request); + } + + /** + * @dataProvider methodProvider + */ + public function testDoNotSubmitFormWithEmptyNameIfNoFieldInRequest($method) + { + $form = $this->getMockForm('', $method); + $form->expects($this->any()) + ->method('all') + ->will($this->returnValue(array( + 'param1' => $this->getMockForm('param1'), + 'param2' => $this->getMockForm('param2'), + ))); + + $this->setRequestData($method, array( + 'paramx' => 'submitted value', + )); + + $form->expects($this->never()) + ->method('submit'); + + $this->requestHandler->handleRequest($form, $this->request); + } + + /** + * @dataProvider methodExceptGetProvider + */ + public function testMergeParamsAndFiles($method) + { + $form = $this->getMockForm('param1', $method); + $file = $this->getMockFile(); + + $this->setRequestData($method, array( + 'param1' => array( + 'field1' => 'DATA', + ), + ), array( + 'param1' => array( + 'field2' => $file, + ), + )); + + $form->expects($this->once()) + ->method('submit') + ->with(array( + 'field1' => 'DATA', + 'field2' => $file, + ), 'PATCH' !== $method); + + $this->requestHandler->handleRequest($form, $this->request); + } + + /** + * @dataProvider methodExceptGetProvider + */ + public function testParamTakesPrecedenceOverFile($method) + { + $form = $this->getMockForm('param1', $method); + $file = $this->getMockFile(); + + $this->setRequestData($method, array( + 'param1' => 'DATA', + ), array( + 'param1' => $file, + )); + + $form->expects($this->once()) + ->method('submit') + ->with('DATA', 'PATCH' !== $method); + + $this->requestHandler->handleRequest($form, $this->request); + } + + /** + * @dataProvider methodExceptGetProvider + */ + public function testSubmitFileIfNoParam($method) + { + $form = $this->getMockForm('param1', $method); + $file = $this->getMockFile(); + + $this->setRequestData($method, array( + 'param1' => null, + ), array( + 'param1' => $file, + )); + + $form->expects($this->once()) + ->method('submit') + ->with($file, 'PATCH' !== $method); + + $this->requestHandler->handleRequest($form, $this->request); + } + + /** + * @dataProvider methodExceptGetProvider + */ + public function testSubmitMultipleFiles($method) + { + $form = $this->getMockForm('param1', $method); + $file = $this->getMockFile(); + + $this->setRequestData($method, array( + 'param1' => null, + ), array( + 'param2' => $this->getMockFile('2'), + 'param1' => $file, + 'param3' => $this->getMockFile('3'), + )); + + $form->expects($this->once()) + ->method('submit') + ->with($file, 'PATCH' !== $method); + + $this->requestHandler->handleRequest($form, $this->request); + } + + /** + * @dataProvider methodExceptGetProvider + */ + public function testSubmitFileWithNamelessForm($method) + { + $form = $this->getMockForm(null, $method); + $file = $this->getMockFile(); + + $this->setRequestData($method, array( + '' => null, + ), array( + '' => $file, + )); + + $form->expects($this->once()) + ->method('submit') + ->with($file, 'PATCH' !== $method); + + $this->requestHandler->handleRequest($form, $this->request); + } + + /** + * @dataProvider getPostMaxSizeFixtures + */ + public function testAddFormErrorIfPostMaxSizeExceeded($contentLength, $iniMax, $shouldFail, array $errorParams = array()) + { + $this->serverParams->expects($this->once()) + ->method('getContentLength') + ->will($this->returnValue($contentLength)); + $this->serverParams->expects($this->any()) + ->method('getNormalizedIniPostMaxSize') + ->will($this->returnValue($iniMax)); + + $options = array('post_max_size_message' => 'Max {{ max }}!'); + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, $options); + $this->setRequestData('POST', array(), array()); + + $this->requestHandler->handleRequest($form, $this->request); + + if ($shouldFail) { + $error = new FormError($options['post_max_size_message'], null, $errorParams); + $error->setOrigin($form); + + $this->assertEquals(array($error), iterator_to_array($form->getErrors())); + $this->assertTrue($form->isSubmitted()); + } else { + $this->assertCount(0, $form->getErrors()); + $this->assertFalse($form->isSubmitted()); + } + } + + public function getPostMaxSizeFixtures() + { + return array( + array(pow(1024, 3) + 1, '1G', true, array('{{ max }}' => '1G')), + array(pow(1024, 3), '1G', false), + array(pow(1024, 2) + 1, '1M', true, array('{{ max }}' => '1M')), + array(pow(1024, 2), '1M', false), + array(1024 + 1, '1K', true, array('{{ max }}' => '1K')), + array(1024, '1K', false), + array(null, '1K', false), + array(1024, '', false), + array(1024, 0, false), + ); + } + + abstract protected function setRequestData($method, $data, $files = array()); + + abstract protected function getRequestHandler(); + + abstract protected function getMockFile($suffix = ''); + + protected function getMockForm($name, $method = null, $compound = true) + { + $config = $this->getMockBuilder('Symfony\Component\Form\FormConfigInterface')->getMock(); + $config->expects($this->any()) + ->method('getMethod') + ->will($this->returnValue($method)); + $config->expects($this->any()) + ->method('getCompound') + ->will($this->returnValue($compound)); + + $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $form->expects($this->any()) + ->method('getName') + ->will($this->returnValue($name)); + $form->expects($this->any()) + ->method('getConfig') + ->will($this->returnValue($config)); + + return $form; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9902a6dc089f66eabcfe7e67967aa67e5de1ae72 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php @@ -0,0 +1,536 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use Symfony\Component\Form\FormError; +use Symfony\Component\Security\Csrf\CsrfToken; + +abstract class AbstractTableLayoutTest extends AbstractLayoutTest +{ + public function testRow() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $form->addError(new FormError('[trans]Error![/trans]')); + $view = $form->createView(); + $html = $this->renderRow($view); + + $this->assertMatchesXpath($html, +'/tr + [ + ./td + [./label[@for="name"]] + /following-sibling::td + [ + ./ul + [./li[.="[trans]Error![/trans]"]] + [count(./li)=1] + /following-sibling::input[@id="name"] + ] + ] +' + ); + } + + public function testLabelIsNotRenderedWhenSetToFalse() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + 'label' => false, + )); + $html = $this->renderRow($form->createView()); + + $this->assertMatchesXpath($html, +'/tr + [ + ./td + [count(//label)=0] + /following-sibling::td + [./input[@id="name"]] + ] +' + ); + } + + public function testRepeatedRow() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType'); + $html = $this->renderRow($form->createView()); + + $this->assertMatchesXpath($html, +'/tr + [ + ./td + [./label[@for="name_first"]] + /following-sibling::td + [./input[@id="name_first"]] + ] +/following-sibling::tr + [ + ./td + [./label[@for="name_second"]] + /following-sibling::td + [./input[@id="name_second"]] + ] +/following-sibling::tr[@style="display: none"] + [./td[@colspan="2"]/input + [@type="hidden"] + [@id="name__token"] + ] + [count(../tr)=3] +' + ); + } + + public function testRepeatedRowWithErrors() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType'); + $form->addError(new FormError('[trans]Error![/trans]')); + $view = $form->createView(); + $html = $this->renderRow($view); + + // The errors of the form are not rendered by intention! + // In practice, repeated fields cannot have errors as all errors + // on them are mapped to the first child. + // (see RepeatedTypeValidatorExtension) + + $this->assertMatchesXpath($html, +'/tr + [ + ./td + [./label[@for="name_first"]] + /following-sibling::td + [./input[@id="name_first"]] + ] +/following-sibling::tr + [ + ./td + [./label[@for="name_second"]] + /following-sibling::td + [./input[@id="name_second"]] + ] +/following-sibling::tr[@style="display: none"] + [./td[@colspan="2"]/input + [@type="hidden"] + [@id="name__token"] + ] + [count(../tr)=3] +' + ); + } + + public function testButtonRow() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ButtonType'); + $view = $form->createView(); + $html = $this->renderRow($view); + + $this->assertMatchesXpath($html, +'/tr + [ + ./td + [.=""] + /following-sibling::td + [./button[@type="button"][@name="name"]] + ] + [count(//label)=0] +' + ); + } + + public function testRest() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('field1', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('field2', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType') + ->add('field3', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('field4', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm() + ->createView(); + + // Render field2 row -> does not implicitly call renderWidget because + // it is a repeated field! + $this->renderRow($view['field2']); + + // Render field3 widget + $this->renderWidget($view['field3']); + + // Rest should only contain field1 and field4 + $html = $this->renderRest($view); + + $this->assertMatchesXpath($html, +'/tr + [ + ./td + [./label[@for="name_field1"]] + /following-sibling::td + [./input[@id="name_field1"]] + ] +/following-sibling::tr + [ + ./td + [./label[@for="name_field4"]] + /following-sibling::td + [./input[@id="name_field4"]] + ] + [count(../tr)=3] + [count(..//label)=2] + [count(..//input)=3] +/following-sibling::tr[@style="display: none"] + [./td[@colspan="2"]/input + [@type="hidden"] + [@id="name__token"] + ] +' + ); + } + + public function testCollection() + { + $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array('a', 'b'), array( + 'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/table + [ + ./tr[./td/input[@type="text"][@value="a"]] + /following-sibling::tr[./td/input[@type="text"][@value="b"]] + /following-sibling::tr[@style="display: none"][./td[@colspan="2"]/input[@type="hidden"][@id="names__token"]] + ] + [count(./tr[./td/input])=3] +' + ); + } + + public function testEmptyCollection() + { + $form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), array( + 'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/table + [./tr[@style="display: none"][./td[@colspan="2"]/input[@type="hidden"][@id="names__token"]]] + [count(./tr[./td/input])=1] +' + ); + } + + public function testForm() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->setMethod('PUT') + ->setAction('http://example.com') + ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm() + ->createView(); + + $html = $this->renderForm($view, array( + 'id' => 'my&id', + 'attr' => array('class' => 'my&class'), + )); + + $this->assertMatchesXpath($html, +'/form + [ + ./input[@type="hidden"][@name="_method"][@value="PUT"] + /following-sibling::table + [ + ./tr + [ + ./td + [./label[@for="name_firstName"]] + /following-sibling::td + [./input[@id="name_firstName"]] + ] + /following-sibling::tr + [ + ./td + [./label[@for="name_lastName"]] + /following-sibling::td + [./input[@id="name_lastName"]] + ] + /following-sibling::tr[@style="display: none"] + [./td[@colspan="2"]/input + [@type="hidden"] + [@id="name__token"] + ] + ] + [count(.//input)=3] + [@id="my&id"] + [@class="my&class"] + ] + [@method="post"] + [@action="http://example.com"] + [@class="my&class"] +' + ); + } + + public function testFormWidget() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm() + ->createView(); + + $this->assertWidgetMatchesXpath($view, array(), +'/table + [ + ./tr + [ + ./td + [./label[@for="name_firstName"]] + /following-sibling::td + [./input[@id="name_firstName"]] + ] + /following-sibling::tr + [ + ./td + [./label[@for="name_lastName"]] + /following-sibling::td + [./input[@id="name_lastName"]] + ] + /following-sibling::tr[@style="display: none"] + [./td[@colspan="2"]/input + [@type="hidden"] + [@id="name__token"] + ] + ] + [count(.//input)=3] +' + ); + } + + // https://github.com/symfony/symfony/issues/2308 + public function testNestedFormError() + { + $form = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add($this->factory + ->createNamedBuilder('child', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array('error_bubbling' => false)) + ->add('grandChild', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ) + ->getForm(); + + $form->get('child')->addError(new FormError('[trans]Error![/trans]')); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/table + [ + ./tr/td/ul[./li[.="[trans]Error![/trans]"]] + /following-sibling::table[@id="name_child"] + ] + [count(.//li[.="[trans]Error![/trans]"])=1] +' + ); + } + + public function testCsrf() + { + $this->csrfTokenManager->expects($this->any()) + ->method('getToken') + ->will($this->returnValue(new CsrfToken('token_id', 'foo&bar'))); + + $form = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add($this->factory + // No CSRF protection on nested forms + ->createNamedBuilder('child', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add($this->factory->createNamedBuilder('grandchild', 'Symfony\Component\Form\Extension\Core\Type\TextType')) + ) + ->getForm(); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/table + [ + ./tr[@style="display: none"] + [./td[@colspan="2"]/input + [@type="hidden"] + [@id="name__token"] + ] + ] + [count(.//input[@type="hidden"])=1] +' + ); + } + + public function testRepeated() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType', 'foobar', array( + 'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/table + [ + ./tr + [ + ./td + [./label[@for="name_first"]] + /following-sibling::td + [./input[@type="text"][@id="name_first"]] + ] + /following-sibling::tr + [ + ./td + [./label[@for="name_second"]] + /following-sibling::td + [./input[@type="text"][@id="name_second"]] + ] + /following-sibling::tr[@style="display: none"] + [./td[@colspan="2"]/input + [@type="hidden"] + [@id="name__token"] + ] + ] + [count(.//input)=3] +' + ); + } + + public function testRepeatedWithCustomOptions() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RepeatedType', 'foobar', array( + 'type' => 'Symfony\Component\Form\Extension\Core\Type\PasswordType', + 'first_options' => array('label' => 'Test', 'required' => false), + 'second_options' => array('label' => 'Test2'), + )); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/table + [ + ./tr + [ + ./td + [./label[@for="name_first"][.="[trans]Test[/trans]"]] + /following-sibling::td + [./input[@type="password"][@id="name_first"][@required="required"]] + ] + /following-sibling::tr + [ + ./td + [./label[@for="name_second"][.="[trans]Test2[/trans]"]] + /following-sibling::td + [./input[@type="password"][@id="name_second"][@required="required"]] + ] + /following-sibling::tr[@style="display: none"] + [./td[@colspan="2"]/input + [@type="hidden"] + [@id="name__token"] + ] + ] + [count(.//input)=3] +' + ); + } + + /** + * The block "_name_child_label" should be overridden in the theme of the + * implemented driver. + */ + public function testCollectionRowWithCustomBlock() + { + $collection = array('one', 'two', 'three'); + $form = $this->factory->createNamedBuilder('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', $collection) + ->getForm(); + + $this->assertWidgetMatchesXpath($form->createView(), array(), +'/table + [ + ./tr[./td/label[.="Custom label: [trans]0[/trans]"]] + /following-sibling::tr[./td/label[.="Custom label: [trans]1[/trans]"]] + /following-sibling::tr[./td/label[.="Custom label: [trans]2[/trans]"]] + ] +' + ); + } + + public function testFormEndWithRest() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('field1', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('field2', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm() + ->createView(); + + $this->renderWidget($view['field1']); + + // Rest should only contain field2 + $html = $this->renderEnd($view); + + // Insert the start tag, the end tag should be rendered by the helper + // Unfortunately this is not valid HTML, because the surrounding table + // tag is missing. If someone renders a form with table layout + // manually, she should call form_rest() explicitly within the
    + // tag. + $this->assertMatchesXpath(''.$html, +'/form + [ + ./tr + [ + ./td + [./label[@for="name_field2"]] + /following-sibling::td + [./input[@id="name_field2"]] + ] + /following-sibling::tr[@style="display: none"] + [./td[@colspan="2"]/input + [@type="hidden"] + [@id="name__token"] + ] + ] +' + ); + } + + public function testFormEndWithoutRest() + { + $view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('field1', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('field2', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm() + ->createView(); + + $this->renderWidget($view['field1']); + + // Rest should only contain field2, but isn't rendered + $html = $this->renderEnd($view, array('render_rest' => false)); + + $this->assertEquals('', $html); + } + + public function testWidgetContainerAttributes() + { + $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'attr' => array('class' => 'foobar', 'data-foo' => 'bar'), + )); + + $form->add('text', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + + $html = $this->renderWidget($form->createView()); + + // compare plain HTML to check the whitespace + $this->assertContains('
    ', $html); + } + + public function testWidgetContainerAttributeNameRepeatedIfTrue() + { + $form = $this->factory->createNamed('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'attr' => array('foo' => true), + )); + + $html = $this->renderWidget($form->createView()); + + // foo="foo" + $this->assertContains('
    ', $html); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..15df850796ae88008df87eed04be1c68e600be1e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\ButtonBuilder; + +/** + * @author Alexander Cheprasov + */ +class ButtonBuilderTest extends TestCase +{ + public function getValidNames() + { + return array( + array('reset'), + array('submit'), + array('foo'), + array('0'), + array(0), + array('button[]'), + ); + } + + /** + * @dataProvider getValidNames + */ + public function testValidNames($name) + { + $this->assertInstanceOf('\Symfony\Component\Form\ButtonBuilder', new ButtonBuilder($name)); + } + + public function getInvalidNames() + { + return array( + array(''), + array(false), + array(null), + ); + } + + /** + * @dataProvider getInvalidNames + */ + public function testInvalidNames($name) + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}( + '\Symfony\Component\Form\Exception\InvalidArgumentException', + 'Buttons cannot have empty names.' + ); + new ButtonBuilder($name); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonTest.php new file mode 100644 index 0000000000000000000000000000000000000000..08d2d74e65b377abf41dce7317527580fd6ba5e6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ButtonTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\ButtonBuilder; +use Symfony\Component\Form\FormBuilder; + +/** + * @author Bernhard Schussek + */ +class ButtonTest extends TestCase +{ + private $dispatcher; + + private $factory; + + protected function setUp() + { + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + } + + /** + * @dataProvider getDisabledStates + */ + public function testDisabledIfParentIsDisabled($parentDisabled, $buttonDisabled, $result) + { + $form = $this->getFormBuilder('form') + ->setDisabled($parentDisabled) + ->getForm(); + + $button = $this->getButtonBuilder('button') + ->setDisabled($buttonDisabled) + ->getForm(); + + $button->setParent($form); + + $this->assertSame($result, $button->isDisabled()); + } + + public function getDisabledStates() + { + return array( + // parent, button, result + array(true, true, true), + array(true, false, true), + array(false, true, true), + array(false, false, false), + ); + } + + private function getButtonBuilder($name) + { + return new ButtonBuilder($name); + } + + private function getFormBuilder($name) + { + return new FormBuilder($name, null, $this->dispatcher, $this->factory); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CallbackTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CallbackTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9142e1fa3c5e30cd5ada0fff569d5e61a6da6b0b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CallbackTransformerTest.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\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\CallbackTransformer; + +class CallbackTransformerTest extends TestCase +{ + public function testTransform() + { + $transformer = new CallbackTransformer( + function ($value) { return $value.' has been transformed'; }, + function ($value) { return $value.' has reversely been transformed'; } + ); + + $this->assertEquals('foo has been transformed', $transformer->transform('foo')); + $this->assertEquals('bar has reversely been transformed', $transformer->reverseTransform('bar')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fc25cffc1fc2c8108d46406278df50f9f63e8f52 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.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\Component\Form\Tests\ChoiceList; + +use PHPUnit\Framework\TestCase; + +/** + * @author Bernhard Schussek + */ +abstract class AbstractChoiceListTest extends TestCase +{ + /** + * @var \Symfony\Component\Form\ChoiceList\ChoiceListInterface + */ + protected $list; + + /** + * @var array + */ + protected $choices; + + /** + * @var array + */ + protected $values; + + /** + * @var array + */ + protected $structuredValues; + + /** + * @var array + */ + protected $keys; + + /** + * @var mixed + */ + protected $choice1; + + /** + * @var mixed + */ + protected $choice2; + + /** + * @var mixed + */ + protected $choice3; + + /** + * @var mixed + */ + protected $choice4; + + /** + * @var string + */ + protected $value1; + + /** + * @var string + */ + protected $value2; + + /** + * @var string + */ + protected $value3; + + /** + * @var string + */ + protected $value4; + + /** + * @var string + */ + protected $key1; + + /** + * @var string + */ + protected $key2; + + /** + * @var string + */ + protected $key3; + + /** + * @var string + */ + protected $key4; + + protected function setUp() + { + parent::setUp(); + + $this->list = $this->createChoiceList(); + + $choices = $this->getChoices(); + + $this->values = $this->getValues(); + $this->structuredValues = array_combine(array_keys($choices), $this->values); + $this->choices = array_combine($this->values, $choices); + $this->keys = array_combine($this->values, array_keys($choices)); + + // allow access to the individual entries without relying on their indices + reset($this->choices); + reset($this->values); + reset($this->keys); + + for ($i = 1; $i <= 4; ++$i) { + $this->{'choice'.$i} = current($this->choices); + $this->{'value'.$i} = current($this->values); + $this->{'key'.$i} = current($this->keys); + + next($this->choices); + next($this->values); + next($this->keys); + } + } + + public function testGetChoices() + { + $this->assertSame($this->choices, $this->list->getChoices()); + } + + public function testGetValues() + { + $this->assertSame($this->values, $this->list->getValues()); + } + + public function testGetStructuredValues() + { + $this->assertSame($this->values, $this->list->getStructuredValues()); + } + + public function testGetOriginalKeys() + { + $this->assertSame($this->keys, $this->list->getOriginalKeys()); + } + + public function testGetChoicesForValues() + { + $values = array($this->value1, $this->value2); + $this->assertSame(array($this->choice1, $this->choice2), $this->list->getChoicesForValues($values)); + } + + public function testGetChoicesForValuesPreservesKeys() + { + $values = array(5 => $this->value1, 8 => $this->value2); + $this->assertSame(array(5 => $this->choice1, 8 => $this->choice2), $this->list->getChoicesForValues($values)); + } + + public function testGetChoicesForValuesPreservesOrder() + { + $values = array($this->value2, $this->value1); + $this->assertSame(array($this->choice2, $this->choice1), $this->list->getChoicesForValues($values)); + } + + public function testGetChoicesForValuesIgnoresNonExistingValues() + { + $values = array($this->value1, $this->value2, 'foobar'); + $this->assertSame(array($this->choice1, $this->choice2), $this->list->getChoicesForValues($values)); + } + + // https://github.com/symfony/symfony/issues/3446 + public function testGetChoicesForValuesEmpty() + { + $this->assertSame(array(), $this->list->getChoicesForValues(array())); + } + + public function testGetValuesForChoices() + { + $choices = array($this->choice1, $this->choice2); + $this->assertSame(array($this->value1, $this->value2), $this->list->getValuesForChoices($choices)); + } + + public function testGetValuesForChoicesPreservesKeys() + { + $choices = array(5 => $this->choice1, 8 => $this->choice2); + $this->assertSame(array(5 => $this->value1, 8 => $this->value2), $this->list->getValuesForChoices($choices)); + } + + public function testGetValuesForChoicesPreservesOrder() + { + $choices = array($this->choice2, $this->choice1); + $this->assertSame(array($this->value2, $this->value1), $this->list->getValuesForChoices($choices)); + } + + public function testGetValuesForChoicesIgnoresNonExistingChoices() + { + $choices = array($this->choice1, $this->choice2, 'foobar'); + $this->assertSame(array($this->value1, $this->value2), $this->list->getValuesForChoices($choices)); + } + + public function testGetValuesForChoicesEmpty() + { + $this->assertSame(array(), $this->list->getValuesForChoices(array())); + } + + public function testGetChoicesForValuesWithNull() + { + $values = $this->list->getValuesForChoices(array(null)); + + $this->assertNotEmpty($this->list->getChoicesForValues($values)); + } + + /** + * @return \Symfony\Component\Form\ChoiceList\ChoiceListInterface + */ + abstract protected function createChoiceList(); + + abstract protected function getChoices(); + + abstract protected function getValues(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php new file mode 100644 index 0000000000000000000000000000000000000000..37b8dddbbe477bd0221f0a9144b9804f6c51f5cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php @@ -0,0 +1,166 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\ChoiceList; + +use Symfony\Component\Form\ChoiceList\ArrayChoiceList; + +/** + * @author Bernhard Schussek + */ +class ArrayChoiceListTest extends AbstractChoiceListTest +{ + private $object; + + protected function setUp() + { + $this->object = new \stdClass(); + + parent::setUp(); + } + + protected function createChoiceList() + { + return new ArrayChoiceList($this->getChoices()); + } + + protected function getChoices() + { + return array(0, 1, 1.5, '1', 'a', false, true, $this->object, null); + } + + protected function getValues() + { + return array('0', '1', '2', '3', '4', '5', '6', '7', '8'); + } + + public function testCreateChoiceListWithValueCallback() + { + $callback = function ($choice) { + return ':'.$choice; + }; + + $choiceList = new ArrayChoiceList(array(2 => 'foo', 7 => 'bar', 10 => 'baz'), $callback); + + $this->assertSame(array(':foo', ':bar', ':baz'), $choiceList->getValues()); + $this->assertSame(array(':foo' => 'foo', ':bar' => 'bar', ':baz' => 'baz'), $choiceList->getChoices()); + $this->assertSame(array(':foo' => 2, ':bar' => 7, ':baz' => 10), $choiceList->getOriginalKeys()); + $this->assertSame(array(1 => 'foo', 2 => 'baz'), $choiceList->getChoicesForValues(array(1 => ':foo', 2 => ':baz'))); + $this->assertSame(array(1 => ':foo', 2 => ':baz'), $choiceList->getValuesForChoices(array(1 => 'foo', 2 => 'baz'))); + } + + public function testCreateChoiceListWithoutValueCallbackAndDuplicateFreeToStringChoices() + { + $choiceList = new ArrayChoiceList(array(2 => 'foo', 7 => 'bar', 10 => 123)); + + $this->assertSame(array('foo', 'bar', '123'), $choiceList->getValues()); + $this->assertSame(array('foo' => 'foo', 'bar' => 'bar', '123' => 123), $choiceList->getChoices()); + $this->assertSame(array('foo' => 2, 'bar' => 7, '123' => 10), $choiceList->getOriginalKeys()); + $this->assertSame(array(1 => 'foo', 2 => 123), $choiceList->getChoicesForValues(array(1 => 'foo', 2 => '123'))); + $this->assertSame(array(1 => 'foo', 2 => '123'), $choiceList->getValuesForChoices(array(1 => 'foo', 2 => 123))); + } + + public function testCreateChoiceListWithoutValueCallbackAndToStringDuplicates() + { + $choiceList = new ArrayChoiceList(array(2 => 'foo', 7 => '123', 10 => 123)); + + $this->assertSame(array('0', '1', '2'), $choiceList->getValues()); + $this->assertSame(array('0' => 'foo', '1' => '123', '2' => 123), $choiceList->getChoices()); + $this->assertSame(array('0' => 2, '1' => 7, '2' => 10), $choiceList->getOriginalKeys()); + $this->assertSame(array(1 => 'foo', 2 => 123), $choiceList->getChoicesForValues(array(1 => '0', 2 => '2'))); + $this->assertSame(array(1 => '0', 2 => '2'), $choiceList->getValuesForChoices(array(1 => 'foo', 2 => 123))); + } + + public function testCreateChoiceListWithoutValueCallbackAndMixedChoices() + { + $object = new \stdClass(); + $choiceList = new ArrayChoiceList(array(2 => 'foo', 5 => array(7 => '123'), 10 => $object)); + + $this->assertSame(array('0', '1', '2'), $choiceList->getValues()); + $this->assertSame(array('0' => 'foo', '1' => '123', '2' => $object), $choiceList->getChoices()); + $this->assertSame(array('0' => 2, '1' => 7, '2' => 10), $choiceList->getOriginalKeys()); + $this->assertSame(array(1 => 'foo', 2 => $object), $choiceList->getChoicesForValues(array(1 => '0', 2 => '2'))); + $this->assertSame(array(1 => '0', 2 => '2'), $choiceList->getValuesForChoices(array(1 => 'foo', 2 => $object))); + } + + public function testCreateChoiceListWithGroupedChoices() + { + $choiceList = new ArrayChoiceList(array( + 'Group 1' => array('A' => 'a', 'B' => 'b'), + 'Group 2' => array('C' => 'c', 'D' => 'd'), + )); + + $this->assertSame(array('a', 'b', 'c', 'd'), $choiceList->getValues()); + $this->assertSame(array( + 'Group 1' => array('A' => 'a', 'B' => 'b'), + 'Group 2' => array('C' => 'c', 'D' => 'd'), + ), $choiceList->getStructuredValues()); + $this->assertSame(array('a' => 'a', 'b' => 'b', 'c' => 'c', 'd' => 'd'), $choiceList->getChoices()); + $this->assertSame(array('a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D'), $choiceList->getOriginalKeys()); + $this->assertSame(array(1 => 'a', 2 => 'b'), $choiceList->getChoicesForValues(array(1 => 'a', 2 => 'b'))); + $this->assertSame(array(1 => 'a', 2 => 'b'), $choiceList->getValuesForChoices(array(1 => 'a', 2 => 'b'))); + } + + public function testCompareChoicesByIdentityByDefault() + { + $callback = function ($choice) { + return $choice->value; + }; + + $obj1 = (object) array('value' => 'value1'); + $obj2 = (object) array('value' => 'value2'); + + $choiceList = new ArrayChoiceList(array($obj1, $obj2), $callback); + $this->assertSame(array(2 => 'value2'), $choiceList->getValuesForChoices(array(2 => $obj2))); + $this->assertSame(array(2 => 'value2'), $choiceList->getValuesForChoices(array(2 => (object) array('value' => 'value2')))); + } + + public function testGetChoicesForValuesWithContainingNull() + { + $choiceList = new ArrayChoiceList(array('Null' => null)); + + $this->assertSame(array(0 => null), $choiceList->getChoicesForValues(array('0'))); + } + + public function testGetChoicesForValuesWithContainingFalseAndNull() + { + $choiceList = new ArrayChoiceList(array('False' => false, 'Null' => null)); + + $this->assertSame(array(0 => null), $choiceList->getChoicesForValues(array('1'))); + $this->assertSame(array(0 => false), $choiceList->getChoicesForValues(array('0'))); + } + + public function testGetChoicesForValuesWithContainingEmptyStringAndNull() + { + $choiceList = new ArrayChoiceList(array('Empty String' => '', 'Null' => null)); + + $this->assertSame(array(0 => ''), $choiceList->getChoicesForValues(array('0'))); + $this->assertSame(array(0 => null), $choiceList->getChoicesForValues(array('1'))); + } + + public function testGetChoicesForValuesWithContainingEmptyStringAndBooleans() + { + $choiceList = new ArrayChoiceList(array('Empty String' => '', 'True' => true, 'False' => false)); + + $this->assertSame(array(0 => ''), $choiceList->getChoicesForValues(array(''))); + $this->assertSame(array(0 => true), $choiceList->getChoicesForValues(array('1'))); + $this->assertSame(array(0 => false), $choiceList->getChoicesForValues(array('0'))); + } + + public function testGetChoicesForValuesWithContainingEmptyStringAndFloats() + { + $choiceList = new ArrayChoiceList(array('Empty String' => '', '1/3' => 0.3, '1/2' => 0.5)); + + $this->assertSame(array(0 => ''), $choiceList->getChoicesForValues(array(''))); + $this->assertSame(array(0 => 0.3), $choiceList->getChoicesForValues(array('0.3'))); + $this->assertSame(array(0 => 0.5), $choiceList->getChoicesForValues(array('0.5'))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b038865fd803ae4f48b249b22ae94a30ff01e134 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php @@ -0,0 +1,532 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\ChoiceList\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; + +/** + * @author Bernhard Schussek + */ +class CachingFactoryDecoratorTest extends TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $decoratedFactory; + + /** + * @var CachingFactoryDecorator + */ + private $factory; + + protected function setUp() + { + $this->decoratedFactory = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface')->getMock(); + $this->factory = new CachingFactoryDecorator($this->decoratedFactory); + } + + public function testCreateFromChoicesEmpty() + { + $list = new \stdClass(); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromChoices') + ->with(array()) + ->will($this->returnValue($list)); + + $this->assertSame($list, $this->factory->createListFromChoices(array())); + $this->assertSame($list, $this->factory->createListFromChoices(array())); + } + + public function testCreateFromChoicesComparesTraversableChoicesAsArray() + { + // The top-most traversable is converted to an array + $choices1 = new \ArrayIterator(array('A' => 'a')); + $choices2 = array('A' => 'a'); + $list = new \stdClass(); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromChoices') + ->with($choices2) + ->will($this->returnValue($list)); + + $this->assertSame($list, $this->factory->createListFromChoices($choices1)); + $this->assertSame($list, $this->factory->createListFromChoices($choices2)); + } + + public function testCreateFromChoicesFlattensChoices() + { + $choices1 = array('key' => array('A' => 'a')); + $choices2 = array('A' => 'a'); + $list = new \stdClass(); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromChoices') + ->with($choices1) + ->will($this->returnValue($list)); + + $this->assertSame($list, $this->factory->createListFromChoices($choices1)); + $this->assertSame($list, $this->factory->createListFromChoices($choices2)); + } + + /** + * @dataProvider provideSameChoices + */ + public function testCreateFromChoicesSameChoices($choice1, $choice2) + { + $choices1 = array($choice1); + $choices2 = array($choice2); + $list = new \stdClass(); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromChoices') + ->with($choices1) + ->will($this->returnValue($list)); + + $this->assertSame($list, $this->factory->createListFromChoices($choices1)); + $this->assertSame($list, $this->factory->createListFromChoices($choices2)); + } + + /** + * @dataProvider provideDistinguishedChoices + */ + public function testCreateFromChoicesDifferentChoices($choice1, $choice2) + { + $choices1 = array($choice1); + $choices2 = array($choice2); + $list1 = new \stdClass(); + $list2 = new \stdClass(); + + $this->decoratedFactory->expects($this->at(0)) + ->method('createListFromChoices') + ->with($choices1) + ->will($this->returnValue($list1)); + $this->decoratedFactory->expects($this->at(1)) + ->method('createListFromChoices') + ->with($choices2) + ->will($this->returnValue($list2)); + + $this->assertSame($list1, $this->factory->createListFromChoices($choices1)); + $this->assertSame($list2, $this->factory->createListFromChoices($choices2)); + } + + public function testCreateFromChoicesSameValueClosure() + { + $choices = array(1); + $list = new \stdClass(); + $closure = function () {}; + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromChoices') + ->with($choices, $closure) + ->will($this->returnValue($list)); + + $this->assertSame($list, $this->factory->createListFromChoices($choices, $closure)); + $this->assertSame($list, $this->factory->createListFromChoices($choices, $closure)); + } + + public function testCreateFromChoicesDifferentValueClosure() + { + $choices = array(1); + $list1 = new \stdClass(); + $list2 = new \stdClass(); + $closure1 = function () {}; + $closure2 = function () {}; + + $this->decoratedFactory->expects($this->at(0)) + ->method('createListFromChoices') + ->with($choices, $closure1) + ->will($this->returnValue($list1)); + $this->decoratedFactory->expects($this->at(1)) + ->method('createListFromChoices') + ->with($choices, $closure2) + ->will($this->returnValue($list2)); + + $this->assertSame($list1, $this->factory->createListFromChoices($choices, $closure1)); + $this->assertSame($list2, $this->factory->createListFromChoices($choices, $closure2)); + } + + public function testCreateFromLoaderSameLoader() + { + $loader = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); + $list = new \stdClass(); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromLoader') + ->with($loader) + ->will($this->returnValue($list)); + + $this->assertSame($list, $this->factory->createListFromLoader($loader)); + $this->assertSame($list, $this->factory->createListFromLoader($loader)); + } + + public function testCreateFromLoaderDifferentLoader() + { + $loader1 = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); + $loader2 = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); + $list1 = new \stdClass(); + $list2 = new \stdClass(); + + $this->decoratedFactory->expects($this->at(0)) + ->method('createListFromLoader') + ->with($loader1) + ->will($this->returnValue($list1)); + $this->decoratedFactory->expects($this->at(1)) + ->method('createListFromLoader') + ->with($loader2) + ->will($this->returnValue($list2)); + + $this->assertSame($list1, $this->factory->createListFromLoader($loader1)); + $this->assertSame($list2, $this->factory->createListFromLoader($loader2)); + } + + public function testCreateFromLoaderSameValueClosure() + { + $loader = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); + $list = new \stdClass(); + $closure = function () {}; + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromLoader') + ->with($loader, $closure) + ->will($this->returnValue($list)); + + $this->assertSame($list, $this->factory->createListFromLoader($loader, $closure)); + $this->assertSame($list, $this->factory->createListFromLoader($loader, $closure)); + } + + public function testCreateFromLoaderDifferentValueClosure() + { + $loader = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); + $list1 = new \stdClass(); + $list2 = new \stdClass(); + $closure1 = function () {}; + $closure2 = function () {}; + + $this->decoratedFactory->expects($this->at(0)) + ->method('createListFromLoader') + ->with($loader, $closure1) + ->will($this->returnValue($list1)); + $this->decoratedFactory->expects($this->at(1)) + ->method('createListFromLoader') + ->with($loader, $closure2) + ->will($this->returnValue($list2)); + + $this->assertSame($list1, $this->factory->createListFromLoader($loader, $closure1)); + $this->assertSame($list2, $this->factory->createListFromLoader($loader, $closure2)); + } + + public function testCreateViewSamePreferredChoices() + { + $preferred = array('a'); + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view = new \stdClass(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, $preferred) + ->will($this->returnValue($view)); + + $this->assertSame($view, $this->factory->createView($list, $preferred)); + $this->assertSame($view, $this->factory->createView($list, $preferred)); + } + + public function testCreateViewDifferentPreferredChoices() + { + $preferred1 = array('a'); + $preferred2 = array('b'); + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view1 = new \stdClass(); + $view2 = new \stdClass(); + + $this->decoratedFactory->expects($this->at(0)) + ->method('createView') + ->with($list, $preferred1) + ->will($this->returnValue($view1)); + $this->decoratedFactory->expects($this->at(1)) + ->method('createView') + ->with($list, $preferred2) + ->will($this->returnValue($view2)); + + $this->assertSame($view1, $this->factory->createView($list, $preferred1)); + $this->assertSame($view2, $this->factory->createView($list, $preferred2)); + } + + public function testCreateViewSamePreferredChoicesClosure() + { + $preferred = function () {}; + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view = new \stdClass(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, $preferred) + ->will($this->returnValue($view)); + + $this->assertSame($view, $this->factory->createView($list, $preferred)); + $this->assertSame($view, $this->factory->createView($list, $preferred)); + } + + public function testCreateViewDifferentPreferredChoicesClosure() + { + $preferred1 = function () {}; + $preferred2 = function () {}; + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view1 = new \stdClass(); + $view2 = new \stdClass(); + + $this->decoratedFactory->expects($this->at(0)) + ->method('createView') + ->with($list, $preferred1) + ->will($this->returnValue($view1)); + $this->decoratedFactory->expects($this->at(1)) + ->method('createView') + ->with($list, $preferred2) + ->will($this->returnValue($view2)); + + $this->assertSame($view1, $this->factory->createView($list, $preferred1)); + $this->assertSame($view2, $this->factory->createView($list, $preferred2)); + } + + public function testCreateViewSameLabelClosure() + { + $labels = function () {}; + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view = new \stdClass(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, $labels) + ->will($this->returnValue($view)); + + $this->assertSame($view, $this->factory->createView($list, null, $labels)); + $this->assertSame($view, $this->factory->createView($list, null, $labels)); + } + + public function testCreateViewDifferentLabelClosure() + { + $labels1 = function () {}; + $labels2 = function () {}; + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view1 = new \stdClass(); + $view2 = new \stdClass(); + + $this->decoratedFactory->expects($this->at(0)) + ->method('createView') + ->with($list, null, $labels1) + ->will($this->returnValue($view1)); + $this->decoratedFactory->expects($this->at(1)) + ->method('createView') + ->with($list, null, $labels2) + ->will($this->returnValue($view2)); + + $this->assertSame($view1, $this->factory->createView($list, null, $labels1)); + $this->assertSame($view2, $this->factory->createView($list, null, $labels2)); + } + + public function testCreateViewSameIndexClosure() + { + $index = function () {}; + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view = new \stdClass(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, $index) + ->will($this->returnValue($view)); + + $this->assertSame($view, $this->factory->createView($list, null, null, $index)); + $this->assertSame($view, $this->factory->createView($list, null, null, $index)); + } + + public function testCreateViewDifferentIndexClosure() + { + $index1 = function () {}; + $index2 = function () {}; + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view1 = new \stdClass(); + $view2 = new \stdClass(); + + $this->decoratedFactory->expects($this->at(0)) + ->method('createView') + ->with($list, null, null, $index1) + ->will($this->returnValue($view1)); + $this->decoratedFactory->expects($this->at(1)) + ->method('createView') + ->with($list, null, null, $index2) + ->will($this->returnValue($view2)); + + $this->assertSame($view1, $this->factory->createView($list, null, null, $index1)); + $this->assertSame($view2, $this->factory->createView($list, null, null, $index2)); + } + + public function testCreateViewSameGroupByClosure() + { + $groupBy = function () {}; + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view = new \stdClass(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, null, $groupBy) + ->will($this->returnValue($view)); + + $this->assertSame($view, $this->factory->createView($list, null, null, null, $groupBy)); + $this->assertSame($view, $this->factory->createView($list, null, null, null, $groupBy)); + } + + public function testCreateViewDifferentGroupByClosure() + { + $groupBy1 = function () {}; + $groupBy2 = function () {}; + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view1 = new \stdClass(); + $view2 = new \stdClass(); + + $this->decoratedFactory->expects($this->at(0)) + ->method('createView') + ->with($list, null, null, null, $groupBy1) + ->will($this->returnValue($view1)); + $this->decoratedFactory->expects($this->at(1)) + ->method('createView') + ->with($list, null, null, null, $groupBy2) + ->will($this->returnValue($view2)); + + $this->assertSame($view1, $this->factory->createView($list, null, null, null, $groupBy1)); + $this->assertSame($view2, $this->factory->createView($list, null, null, null, $groupBy2)); + } + + public function testCreateViewSameAttributes() + { + $attr = array('class' => 'foobar'); + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view = new \stdClass(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, null, null, $attr) + ->will($this->returnValue($view)); + + $this->assertSame($view, $this->factory->createView($list, null, null, null, null, $attr)); + $this->assertSame($view, $this->factory->createView($list, null, null, null, null, $attr)); + } + + public function testCreateViewDifferentAttributes() + { + $attr1 = array('class' => 'foobar1'); + $attr2 = array('class' => 'foobar2'); + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view1 = new \stdClass(); + $view2 = new \stdClass(); + + $this->decoratedFactory->expects($this->at(0)) + ->method('createView') + ->with($list, null, null, null, null, $attr1) + ->will($this->returnValue($view1)); + $this->decoratedFactory->expects($this->at(1)) + ->method('createView') + ->with($list, null, null, null, null, $attr2) + ->will($this->returnValue($view2)); + + $this->assertSame($view1, $this->factory->createView($list, null, null, null, null, $attr1)); + $this->assertSame($view2, $this->factory->createView($list, null, null, null, null, $attr2)); + } + + public function testCreateViewSameAttributesClosure() + { + $attr = function () {}; + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view = new \stdClass(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, null, null, $attr) + ->will($this->returnValue($view)); + + $this->assertSame($view, $this->factory->createView($list, null, null, null, null, $attr)); + $this->assertSame($view, $this->factory->createView($list, null, null, null, null, $attr)); + } + + public function testCreateViewDifferentAttributesClosure() + { + $attr1 = function () {}; + $attr2 = function () {}; + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $view1 = new \stdClass(); + $view2 = new \stdClass(); + + $this->decoratedFactory->expects($this->at(0)) + ->method('createView') + ->with($list, null, null, null, null, $attr1) + ->will($this->returnValue($view1)); + $this->decoratedFactory->expects($this->at(1)) + ->method('createView') + ->with($list, null, null, null, null, $attr2) + ->will($this->returnValue($view2)); + + $this->assertSame($view1, $this->factory->createView($list, null, null, null, null, $attr1)); + $this->assertSame($view2, $this->factory->createView($list, null, null, null, null, $attr2)); + } + + public function provideSameChoices() + { + $object = (object) array('foo' => 'bar'); + + return array( + array(0, 0), + array('a', 'a'), + // https://github.com/symfony/symfony/issues/10409 + array(chr(181).'meter', chr(181).'meter'), // UTF-8 + array($object, $object), + ); + } + + public function provideDistinguishedChoices() + { + return array( + array(0, false), + array(0, null), + array(0, '0'), + array(0, ''), + array(1, true), + array(1, '1'), + array(1, 'a'), + array('', false), + array('', null), + array(false, null), + // Same properties, but not identical + array((object) array('foo' => 'bar'), (object) array('foo' => 'bar')), + ); + } + + public function provideSameKeyChoices() + { + // Only test types here that can be used as array keys + return array( + array(0, 0), + array(0, '0'), + array('a', 'a'), + array(chr(181).'meter', chr(181).'meter'), + ); + } + + public function provideDistinguishedKeyChoices() + { + // Only test types here that can be used as array keys + return array( + array(0, ''), + array(1, 'a'), + array('', 'a'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..245024824083345a9499f724d5e6e5d54b4813e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php @@ -0,0 +1,791 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\ChoiceList\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\ChoiceList\ArrayChoiceList; +use Symfony\Component\Form\ChoiceList\ChoiceListInterface; +use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory; +use Symfony\Component\Form\ChoiceList\LazyChoiceList; +use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView; +use Symfony\Component\Form\ChoiceList\View\ChoiceListView; +use Symfony\Component\Form\ChoiceList\View\ChoiceView; + +class DefaultChoiceListFactoryTest extends TestCase +{ + private $obj1; + + private $obj2; + + private $obj3; + + private $obj4; + + private $list; + + /** + * @var DefaultChoiceListFactory + */ + private $factory; + + public function getValue($object) + { + return $object->value; + } + + public function getScalarValue($choice) + { + switch ($choice) { + case 'a': return 'a'; + case 'b': return 'b'; + case 'c': return '1'; + case 'd': return '2'; + } + } + + public function getLabel($object) + { + return $object->label; + } + + public function getFormIndex($object) + { + return $object->index; + } + + public function isPreferred($object) + { + return $this->obj2 === $object || $this->obj3 === $object; + } + + public function getAttr($object) + { + return $object->attr; + } + + public function getGroup($object) + { + return $this->obj1 === $object || $this->obj2 === $object ? 'Group 1' : 'Group 2'; + } + + public function getGroupAsObject($object) + { + return $this->obj1 === $object || $this->obj2 === $object + ? new DefaultChoiceListFactoryTest_Castable('Group 1') + : new DefaultChoiceListFactoryTest_Castable('Group 2'); + } + + protected function setUp() + { + $this->obj1 = (object) array('label' => 'A', 'index' => 'w', 'value' => 'a', 'preferred' => false, 'group' => 'Group 1', 'attr' => array()); + $this->obj2 = (object) array('label' => 'B', 'index' => 'x', 'value' => 'b', 'preferred' => true, 'group' => 'Group 1', 'attr' => array('attr1' => 'value1')); + $this->obj3 = (object) array('label' => 'C', 'index' => 'y', 'value' => 1, 'preferred' => true, 'group' => 'Group 2', 'attr' => array('attr2' => 'value2')); + $this->obj4 = (object) array('label' => 'D', 'index' => 'z', 'value' => 2, 'preferred' => false, 'group' => 'Group 2', 'attr' => array()); + $this->list = new ArrayChoiceList( + array('A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4) + ); + $this->factory = new DefaultChoiceListFactory(); + } + + public function testCreateFromChoicesEmpty() + { + $list = $this->factory->createListFromChoices(array()); + + $this->assertSame(array(), $list->getChoices()); + $this->assertSame(array(), $list->getValues()); + } + + public function testCreateFromChoicesFlat() + { + $list = $this->factory->createListFromChoices( + array('A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4) + ); + + $this->assertObjectListWithGeneratedValues($list); + } + + public function testCreateFromChoicesFlatTraversable() + { + $list = $this->factory->createListFromChoices( + new \ArrayIterator(array('A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4)) + ); + + $this->assertObjectListWithGeneratedValues($list); + } + + public function testCreateFromChoicesFlatValuesAsCallable() + { + $list = $this->factory->createListFromChoices( + array('A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4), + array($this, 'getValue') + ); + + $this->assertObjectListWithCustomValues($list); + } + + public function testCreateFromChoicesFlatValuesAsClosure() + { + $list = $this->factory->createListFromChoices( + array('A' => $this->obj1, 'B' => $this->obj2, 'C' => $this->obj3, 'D' => $this->obj4), + function ($object) { return $object->value; } + ); + + $this->assertObjectListWithCustomValues($list); + } + + public function testCreateFromChoicesGrouped() + { + $list = $this->factory->createListFromChoices( + array( + 'Group 1' => array('A' => $this->obj1, 'B' => $this->obj2), + 'Group 2' => array('C' => $this->obj3, 'D' => $this->obj4), + ) + ); + + $this->assertObjectListWithGeneratedValues($list); + } + + public function testCreateFromChoicesGroupedTraversable() + { + $list = $this->factory->createListFromChoices( + new \ArrayIterator(array( + 'Group 1' => array('A' => $this->obj1, 'B' => $this->obj2), + 'Group 2' => array('C' => $this->obj3, 'D' => $this->obj4), + )) + ); + + $this->assertObjectListWithGeneratedValues($list); + } + + public function testCreateFromChoicesGroupedValuesAsCallable() + { + $list = $this->factory->createListFromChoices( + array( + 'Group 1' => array('A' => $this->obj1, 'B' => $this->obj2), + 'Group 2' => array('C' => $this->obj3, 'D' => $this->obj4), + ), + array($this, 'getValue') + ); + + $this->assertObjectListWithCustomValues($list); + } + + public function testCreateFromChoicesGroupedValuesAsClosure() + { + $list = $this->factory->createListFromChoices( + array( + 'Group 1' => array('A' => $this->obj1, 'B' => $this->obj2), + 'Group 2' => array('C' => $this->obj3, 'D' => $this->obj4), + ), + function ($object) { return $object->value; } + ); + + $this->assertObjectListWithCustomValues($list); + } + + public function testCreateFromLoader() + { + $loader = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); + + $list = $this->factory->createListFromLoader($loader); + + $this->assertEquals(new LazyChoiceList($loader), $list); + } + + public function testCreateFromLoaderWithValues() + { + $loader = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); + + $value = function () {}; + $list = $this->factory->createListFromLoader($loader, $value); + + $this->assertEquals(new LazyChoiceList($loader, $value), $list); + } + + public function testCreateViewFlat() + { + $view = $this->factory->createView($this->list); + + $this->assertEquals(new ChoiceListView( + array( + 0 => new ChoiceView($this->obj1, '0', 'A'), + 1 => new ChoiceView($this->obj2, '1', 'B'), + 2 => new ChoiceView($this->obj3, '2', 'C'), + 3 => new ChoiceView($this->obj4, '3', 'D'), + ), array() + ), $view); + } + + public function testCreateViewFlatPreferredChoices() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3) + ); + + $this->assertFlatView($view); + } + + public function testCreateViewFlatPreferredChoicesEmptyArray() + { + $view = $this->factory->createView( + $this->list, + array() + ); + + $this->assertEquals(new ChoiceListView( + array( + 0 => new ChoiceView($this->obj1, '0', 'A'), + 1 => new ChoiceView($this->obj2, '1', 'B'), + 2 => new ChoiceView($this->obj3, '2', 'C'), + 3 => new ChoiceView($this->obj4, '3', 'D'), + ), array() + ), $view); + } + + public function testCreateViewFlatPreferredChoicesAsCallable() + { + $view = $this->factory->createView( + $this->list, + array($this, 'isPreferred') + ); + + $this->assertFlatView($view); + } + + public function testCreateViewFlatPreferredChoicesAsClosure() + { + $obj2 = $this->obj2; + $obj3 = $this->obj3; + + $view = $this->factory->createView( + $this->list, + function ($object) use ($obj2, $obj3) { + return $obj2 === $object || $obj3 === $object; + } + ); + + $this->assertFlatView($view); + } + + public function testCreateViewFlatPreferredChoicesClosureReceivesKey() + { + $view = $this->factory->createView( + $this->list, + function ($object, $key) { + return 'B' === $key || 'C' === $key; + } + ); + + $this->assertFlatView($view); + } + + public function testCreateViewFlatPreferredChoicesClosureReceivesValue() + { + $view = $this->factory->createView( + $this->list, + function ($object, $key, $value) { + return '1' === $value || '2' === $value; + } + ); + + $this->assertFlatView($view); + } + + public function testCreateViewFlatLabelAsCallable() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + array($this, 'getLabel') + ); + + $this->assertFlatView($view); + } + + public function testCreateViewFlatLabelAsClosure() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + function ($object) { + return $object->label; + } + ); + + $this->assertFlatView($view); + } + + public function testCreateViewFlatLabelClosureReceivesKey() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + function ($object, $key) { + return $key; + } + ); + + $this->assertFlatView($view); + } + + public function testCreateViewFlatLabelClosureReceivesValue() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + function ($object, $key, $value) { + switch ($value) { + case '0': return 'A'; + case '1': return 'B'; + case '2': return 'C'; + case '3': return 'D'; + } + } + ); + + $this->assertFlatView($view); + } + + public function testCreateViewFlatIndexAsCallable() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + array($this, 'getFormIndex') + ); + + $this->assertFlatViewWithCustomIndices($view); + } + + public function testCreateViewFlatIndexAsClosure() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + function ($object) { + return $object->index; + } + ); + + $this->assertFlatViewWithCustomIndices($view); + } + + public function testCreateViewFlatIndexClosureReceivesKey() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + function ($object, $key) { + switch ($key) { + case 'A': return 'w'; + case 'B': return 'x'; + case 'C': return 'y'; + case 'D': return 'z'; + } + } + ); + + $this->assertFlatViewWithCustomIndices($view); + } + + public function testCreateViewFlatIndexClosureReceivesValue() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + function ($object, $key, $value) { + switch ($value) { + case '0': return 'w'; + case '1': return 'x'; + case '2': return 'y'; + case '3': return 'z'; + } + } + ); + + $this->assertFlatViewWithCustomIndices($view); + } + + public function testCreateViewFlatGroupByOriginalStructure() + { + $list = new ArrayChoiceList(array( + 'Group 1' => array('A' => $this->obj1, 'B' => $this->obj2), + 'Group 2' => array('C' => $this->obj3, 'D' => $this->obj4), + 'Group empty' => array(), + )); + + $view = $this->factory->createView( + $list, + array($this->obj2, $this->obj3) + ); + + $this->assertGroupedView($view); + } + + public function testCreateViewFlatGroupByEmpty() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + null, // index + array() // ignored + ); + + $this->assertFlatView($view); + } + + public function testCreateViewFlatGroupByAsCallable() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + null, // index + array($this, 'getGroup') + ); + + $this->assertGroupedView($view); + } + + public function testCreateViewFlatGroupByObjectThatCanBeCastToString() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + null, // index + array($this, 'getGroupAsObject') + ); + + $this->assertGroupedView($view); + } + + public function testCreateViewFlatGroupByAsClosure() + { + $obj1 = $this->obj1; + $obj2 = $this->obj2; + + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + null, // index + function ($object) use ($obj1, $obj2) { + return $obj1 === $object || $obj2 === $object ? 'Group 1' : 'Group 2'; + } + ); + + $this->assertGroupedView($view); + } + + public function testCreateViewFlatGroupByClosureReceivesKey() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + null, // index + function ($object, $key) { + return 'A' === $key || 'B' === $key ? 'Group 1' : 'Group 2'; + } + ); + + $this->assertGroupedView($view); + } + + public function testCreateViewFlatGroupByClosureReceivesValue() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + null, // index + function ($object, $key, $value) { + return '0' === $value || '1' === $value ? 'Group 1' : 'Group 2'; + } + ); + + $this->assertGroupedView($view); + } + + public function testCreateViewFlatAttrAsArray() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + null, // index + null, // group + array( + 'B' => array('attr1' => 'value1'), + 'C' => array('attr2' => 'value2'), + ) + ); + + $this->assertFlatViewWithAttr($view); + } + + public function testCreateViewFlatAttrEmpty() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + null, // index + null, // group + array() + ); + + $this->assertFlatView($view); + } + + public function testCreateViewFlatAttrAsCallable() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + null, // index + null, // group + array($this, 'getAttr') + ); + + $this->assertFlatViewWithAttr($view); + } + + public function testCreateViewFlatAttrAsClosure() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + null, // index + null, // group + function ($object) { + return $object->attr; + } + ); + + $this->assertFlatViewWithAttr($view); + } + + public function testCreateViewFlatAttrClosureReceivesKey() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + null, // index + null, // group + function ($object, $key) { + switch ($key) { + case 'B': return array('attr1' => 'value1'); + case 'C': return array('attr2' => 'value2'); + default: return array(); + } + } + ); + + $this->assertFlatViewWithAttr($view); + } + + public function testCreateViewFlatAttrClosureReceivesValue() + { + $view = $this->factory->createView( + $this->list, + array($this->obj2, $this->obj3), + null, // label + null, // index + null, // group + function ($object, $key, $value) { + switch ($value) { + case '1': return array('attr1' => 'value1'); + case '2': return array('attr2' => 'value2'); + default: return array(); + } + } + ); + + $this->assertFlatViewWithAttr($view); + } + + private function assertScalarListWithChoiceValues(ChoiceListInterface $list) + { + $this->assertSame(array('a', 'b', 'c', 'd'), $list->getValues()); + + $this->assertSame(array( + 'a' => 'a', + 'b' => 'b', + 'c' => 'c', + 'd' => 'd', + ), $list->getChoices()); + + $this->assertSame(array( + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + ), $list->getOriginalKeys()); + } + + private function assertObjectListWithGeneratedValues(ChoiceListInterface $list) + { + $this->assertSame(array('0', '1', '2', '3'), $list->getValues()); + + $this->assertSame(array( + 0 => $this->obj1, + 1 => $this->obj2, + 2 => $this->obj3, + 3 => $this->obj4, + ), $list->getChoices()); + + $this->assertSame(array( + 0 => 'A', + 1 => 'B', + 2 => 'C', + 3 => 'D', + ), $list->getOriginalKeys()); + } + + private function assertScalarListWithCustomValues(ChoiceListInterface $list) + { + $this->assertSame(array('a', 'b', '1', '2'), $list->getValues()); + + $this->assertSame(array( + 'a' => 'a', + 'b' => 'b', + 1 => 'c', + 2 => 'd', + ), $list->getChoices()); + + $this->assertSame(array( + 'a' => 'A', + 'b' => 'B', + 1 => 'C', + 2 => 'D', + ), $list->getOriginalKeys()); + } + + private function assertObjectListWithCustomValues(ChoiceListInterface $list) + { + $this->assertSame(array('a', 'b', '1', '2'), $list->getValues()); + + $this->assertSame(array( + 'a' => $this->obj1, + 'b' => $this->obj2, + 1 => $this->obj3, + 2 => $this->obj4, + ), $list->getChoices()); + + $this->assertSame(array( + 'a' => 'A', + 'b' => 'B', + 1 => 'C', + 2 => 'D', + ), $list->getOriginalKeys()); + } + + private function assertFlatView($view) + { + $this->assertEquals(new ChoiceListView( + array( + 0 => new ChoiceView($this->obj1, '0', 'A'), + 3 => new ChoiceView($this->obj4, '3', 'D'), + ), array( + 1 => new ChoiceView($this->obj2, '1', 'B'), + 2 => new ChoiceView($this->obj3, '2', 'C'), + ) + ), $view); + } + + private function assertFlatViewWithCustomIndices($view) + { + $this->assertEquals(new ChoiceListView( + array( + 'w' => new ChoiceView($this->obj1, '0', 'A'), + 'z' => new ChoiceView($this->obj4, '3', 'D'), + ), array( + 'x' => new ChoiceView($this->obj2, '1', 'B'), + 'y' => new ChoiceView($this->obj3, '2', 'C'), + ) + ), $view); + } + + private function assertFlatViewWithAttr($view) + { + $this->assertEquals(new ChoiceListView( + array( + 0 => new ChoiceView($this->obj1, '0', 'A'), + 3 => new ChoiceView($this->obj4, '3', 'D'), + ), array( + 1 => new ChoiceView( + $this->obj2, + '1', + 'B', + array('attr1' => 'value1') + ), + 2 => new ChoiceView( + $this->obj3, + '2', + 'C', + array('attr2' => 'value2') + ), + ) + ), $view); + } + + private function assertGroupedView($view) + { + $this->assertEquals(new ChoiceListView( + array( + 'Group 1' => new ChoiceGroupView( + 'Group 1', + array(0 => new ChoiceView($this->obj1, '0', 'A')) + ), + 'Group 2' => new ChoiceGroupView( + 'Group 2', + array(3 => new ChoiceView($this->obj4, '3', 'D')) + ), + ), array( + 'Group 1' => new ChoiceGroupView( + 'Group 1', + array(1 => new ChoiceView($this->obj2, '1', 'B')) + ), + 'Group 2' => new ChoiceGroupView( + 'Group 2', + array(2 => new ChoiceView($this->obj3, '2', 'C')) + ), + ) + ), $view); + } +} + +class DefaultChoiceListFactoryTest_Castable +{ + private $property; + + public function __construct($property) + { + $this->property = $property; + } + + public function __toString() + { + return $this->property; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d100dcff4a5fd28540be519518072ecc37bad41e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php @@ -0,0 +1,483 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\ChoiceList\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator; +use Symfony\Component\PropertyAccess\PropertyPath; + +/** + * @author Bernhard Schussek + */ +class PropertyAccessDecoratorTest extends TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $decoratedFactory; + + /** + * @var PropertyAccessDecorator + */ + private $factory; + + protected function setUp() + { + $this->decoratedFactory = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface')->getMock(); + $this->factory = new PropertyAccessDecorator($this->decoratedFactory); + } + + public function testCreateFromChoicesPropertyPath() + { + $choices = array((object) array('property' => 'value')); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromChoices') + ->with($choices, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($choices, $callback) { + return array_map($callback, $choices); + })); + + $this->assertSame(array('value'), $this->factory->createListFromChoices($choices, 'property')); + } + + public function testCreateFromChoicesPropertyPathInstance() + { + $choices = array((object) array('property' => 'value')); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromChoices') + ->with($choices, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($choices, $callback) { + return array_map($callback, $choices); + })); + + $this->assertSame(array('value'), $this->factory->createListFromChoices($choices, new PropertyPath('property'))); + } + + /** + * @group legacy + */ + public function testCreateFromChoicesPropertyPathWithCallableString() + { + $choices = array('foo' => 'bar'); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromChoices') + ->with($choices, 'end') + ->willReturn('RESULT'); + + $this->assertSame('RESULT', $this->factory->createListFromChoices($choices, 'end')); + } + + public function testCreateFromLoaderPropertyPath() + { + $loader = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromLoader') + ->with($loader, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($loader, $callback) { + return $callback((object) array('property' => 'value')); + })); + + $this->assertSame('value', $this->factory->createListFromLoader($loader, 'property')); + } + + /** + * @group legacy + */ + public function testCreateFromLoaderPropertyPathWithCallableString() + { + $loader = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromLoader') + ->with($loader, 'end') + ->willReturn('RESULT'); + + $this->assertSame('RESULT', $this->factory->createListFromLoader($loader, 'end')); + } + + // https://github.com/symfony/symfony/issues/5494 + public function testCreateFromChoicesAssumeNullIfValuePropertyPathUnreadable() + { + $choices = array(null); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromChoices') + ->with($choices, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($choices, $callback) { + return array_map($callback, $choices); + })); + + $this->assertSame(array(null), $this->factory->createListFromChoices($choices, 'property')); + } + + // https://github.com/symfony/symfony/issues/5494 + public function testCreateFromChoiceLoaderAssumeNullIfValuePropertyPathUnreadable() + { + $loader = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromLoader') + ->with($loader, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($loader, $callback) { + return $callback(null); + })); + + $this->assertNull($this->factory->createListFromLoader($loader, 'property')); + } + + public function testCreateFromLoaderPropertyPathInstance() + { + $loader = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createListFromLoader') + ->with($loader, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($loader, $callback) { + return $callback((object) array('property' => 'value')); + })); + + $this->assertSame('value', $this->factory->createListFromLoader($loader, new PropertyPath('property'))); + } + + public function testCreateViewPreferredChoicesAsPropertyPath() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($list, $preferred) { + return $preferred((object) array('property' => true)); + })); + + $this->assertTrue($this->factory->createView( + $list, + 'property' + )); + } + + /** + * @group legacy + */ + public function testCreateViewPreferredChoicesAsPropertyPathWithCallableString() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, 'end') + ->willReturn('RESULT'); + + $this->assertSame('RESULT', $this->factory->createView( + $list, + 'end' + )); + } + + public function testCreateViewPreferredChoicesAsPropertyPathInstance() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($list, $preferred) { + return $preferred((object) array('property' => true)); + })); + + $this->assertTrue($this->factory->createView( + $list, + new PropertyPath('property') + )); + } + + // https://github.com/symfony/symfony/issues/5494 + public function testCreateViewAssumeNullIfPreferredChoicesPropertyPathUnreadable() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($list, $preferred) { + return $preferred((object) array('category' => null)); + })); + + $this->assertFalse($this->factory->createView( + $list, + 'category.preferred' + )); + } + + public function testCreateViewLabelsAsPropertyPath() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($list, $preferred, $label) { + return $label((object) array('property' => 'label')); + })); + + $this->assertSame('label', $this->factory->createView( + $list, + null, // preferred choices + 'property' + )); + } + + /** + * @group legacy + */ + public function testCreateViewLabelsAsPropertyPathWithCallableString() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, 'end') + ->willReturn('RESULT'); + + $this->assertSame('RESULT', $this->factory->createView( + $list, + null, // preferred choices + 'end' + )); + } + + public function testCreateViewLabelsAsPropertyPathInstance() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($list, $preferred, $label) { + return $label((object) array('property' => 'label')); + })); + + $this->assertSame('label', $this->factory->createView( + $list, + null, // preferred choices + new PropertyPath('property') + )); + } + + public function testCreateViewIndicesAsPropertyPath() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($list, $preferred, $label, $index) { + return $index((object) array('property' => 'index')); + })); + + $this->assertSame('index', $this->factory->createView( + $list, + null, // preferred choices + null, // label + 'property' + )); + } + + /** + * @group legacy + */ + public function testCreateViewIndicesAsPropertyPathWithCallableString() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, 'end') + ->willReturn('RESULT'); + + $this->assertSame('RESULT', $this->factory->createView( + $list, + null, // preferred choices + null, // label + 'end' + )); + } + + public function testCreateViewIndicesAsPropertyPathInstance() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($list, $preferred, $label, $index) { + return $index((object) array('property' => 'index')); + })); + + $this->assertSame('index', $this->factory->createView( + $list, + null, // preferred choices + null, // label + new PropertyPath('property') + )); + } + + public function testCreateViewGroupsAsPropertyPath() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, null, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($list, $preferred, $label, $index, $groupBy) { + return $groupBy((object) array('property' => 'group')); + })); + + $this->assertSame('group', $this->factory->createView( + $list, + null, // preferred choices + null, // label + null, // index + 'property' + )); + } + + /** + * @group legacy + */ + public function testCreateViewGroupsAsPropertyPathWithCallableString() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, null, 'end') + ->willReturn('RESULT'); + + $this->assertSame('RESULT', $this->factory->createView( + $list, + null, // preferred choices + null, // label + null, // index + 'end' + )); + } + + public function testCreateViewGroupsAsPropertyPathInstance() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, null, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($list, $preferred, $label, $index, $groupBy) { + return $groupBy((object) array('property' => 'group')); + })); + + $this->assertSame('group', $this->factory->createView( + $list, + null, // preferred choices + null, // label + null, // index + new PropertyPath('property') + )); + } + + // https://github.com/symfony/symfony/issues/5494 + public function testCreateViewAssumeNullIfGroupsPropertyPathUnreadable() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, null, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($list, $preferred, $label, $index, $groupBy) { + return $groupBy((object) array('group' => null)); + })); + + $this->assertNull($this->factory->createView( + $list, + null, // preferred choices + null, // label + null, // index + 'group.name' + )); + } + + public function testCreateViewAttrAsPropertyPath() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, null, null, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($list, $preferred, $label, $index, $groupBy, $attr) { + return $attr((object) array('property' => 'attr')); + })); + + $this->assertSame('attr', $this->factory->createView( + $list, + null, // preferred choices + null, // label + null, // index + null, // groups + 'property' + )); + } + + /** + * @group legacy + */ + public function testCreateViewAttrAsPropertyPathWithCallableString() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, null, null, 'end') + ->willReturn('RESULT'); + + $this->assertSame('RESULT', $this->factory->createView( + $list, + null, // preferred choices + null, // label + null, // inde + null, // groups + 'end' + )); + } + + public function testCreateViewAttrAsPropertyPathInstance() + { + $list = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + + $this->decoratedFactory->expects($this->once()) + ->method('createView') + ->with($list, null, null, null, null, $this->isInstanceOf('\Closure')) + ->will($this->returnCallback(function ($list, $preferred, $label, $index, $groupBy, $attr) { + return $attr((object) array('property' => 'attr')); + })); + + $this->assertSame('attr', $this->factory->createView( + $list, + null, // preferred choices + null, // label + null, // index + null, // groups + new PropertyPath('property') + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/LazyChoiceListTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/LazyChoiceListTest.php new file mode 100644 index 0000000000000000000000000000000000000000..61c8a5aa0b0e3ea34ffa70dd6600d1ae03b93840 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/LazyChoiceListTest.php @@ -0,0 +1,208 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\ChoiceList; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\ChoiceList\ArrayChoiceList; +use Symfony\Component\Form\ChoiceList\LazyChoiceList; + +/** + * @author Bernhard Schussek + */ +class LazyChoiceListTest extends TestCase +{ + /** + * @var LazyChoiceList + */ + private $list; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $loadedList; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $loader; + + private $value; + + protected function setUp() + { + $this->loadedList = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); + $this->loader = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); + $this->value = function () {}; + $this->list = new LazyChoiceList($this->loader, $this->value); + } + + public function testGetChoiceLoadersLoadsLoadedListOnFirstCall() + { + $this->loader->expects($this->exactly(2)) + ->method('loadChoiceList') + ->with($this->value) + ->will($this->returnValue($this->loadedList)); + + // The same list is returned by the loader + $this->loadedList->expects($this->exactly(2)) + ->method('getChoices') + ->will($this->returnValue('RESULT')); + + $this->assertSame('RESULT', $this->list->getChoices()); + $this->assertSame('RESULT', $this->list->getChoices()); + } + + /** + * @group legacy + */ + public function testGetChoicesUsesLoadedListWhenLoaderDoesNotCacheChoiceListOnFirstCall() + { + $this->loader->expects($this->at(0)) + ->method('loadChoiceList') + ->with($this->value) + ->willReturn($this->loadedList); + + $this->loader->expects($this->at(1)) + ->method('loadChoiceList') + ->with($this->value) + ->willReturn(new ArrayChoiceList(array('a', 'b'))); + + // The same list is returned by the lazy choice list + $this->loadedList->expects($this->exactly(2)) + ->method('getChoices') + ->will($this->returnValue('RESULT')); + + $this->assertSame('RESULT', $this->list->getChoices()); + $this->assertSame('RESULT', $this->list->getChoices()); + } + + public function testGetValuesLoadsLoadedListOnFirstCall() + { + $this->loader->expects($this->exactly(2)) + ->method('loadChoiceList') + ->with($this->value) + ->will($this->returnValue($this->loadedList)); + + // The same list is returned by the loader + $this->loadedList->expects($this->exactly(2)) + ->method('getValues') + ->will($this->returnValue('RESULT')); + + $this->assertSame('RESULT', $this->list->getValues()); + $this->assertSame('RESULT', $this->list->getValues()); + } + + public function testGetStructuredValuesLoadsLoadedListOnFirstCall() + { + $this->loader->expects($this->exactly(2)) + ->method('loadChoiceList') + ->with($this->value) + ->will($this->returnValue($this->loadedList)); + + // The same list is returned by the loader + $this->loadedList->expects($this->exactly(2)) + ->method('getStructuredValues') + ->will($this->returnValue('RESULT')); + + $this->assertSame('RESULT', $this->list->getStructuredValues()); + $this->assertSame('RESULT', $this->list->getStructuredValues()); + } + + public function testGetOriginalKeysLoadsLoadedListOnFirstCall() + { + $this->loader->expects($this->exactly(2)) + ->method('loadChoiceList') + ->with($this->value) + ->will($this->returnValue($this->loadedList)); + + // The same list is returned by the loader + $this->loadedList->expects($this->exactly(2)) + ->method('getOriginalKeys') + ->will($this->returnValue('RESULT')); + + $this->assertSame('RESULT', $this->list->getOriginalKeys()); + $this->assertSame('RESULT', $this->list->getOriginalKeys()); + } + + public function testGetChoicesForValuesForwardsCallIfListNotLoaded() + { + $this->loader->expects($this->exactly(2)) + ->method('loadChoicesForValues') + ->with(array('a', 'b')) + ->will($this->returnValue('RESULT')); + + $this->assertSame('RESULT', $this->list->getChoicesForValues(array('a', 'b'))); + $this->assertSame('RESULT', $this->list->getChoicesForValues(array('a', 'b'))); + } + + public function testGetChoicesForValuesUsesLoadedList() + { + $this->loader->expects($this->exactly(3)) + ->method('loadChoiceList') + ->with($this->value) + // For BC, the same choice loaded list is returned 3 times + // It should only twice in 4.0 + ->will($this->returnValue($this->loadedList)); + + $this->loader->expects($this->never()) + ->method('loadChoicesForValues'); + + $this->loadedList->expects($this->exactly(2)) + ->method('getChoicesForValues') + ->with(array('a', 'b')) + ->will($this->returnValue('RESULT')); + + // load choice list + $this->list->getChoices(); + + $this->assertSame('RESULT', $this->list->getChoicesForValues(array('a', 'b'))); + $this->assertSame('RESULT', $this->list->getChoicesForValues(array('a', 'b'))); + } + + /** + * @group legacy + */ + public function testGetValuesForChoicesForwardsCallIfListNotLoaded() + { + $this->loader->expects($this->exactly(2)) + ->method('loadValuesForChoices') + ->with(array('a', 'b')) + ->will($this->returnValue('RESULT')); + + $this->assertSame('RESULT', $this->list->getValuesForChoices(array('a', 'b'))); + $this->assertSame('RESULT', $this->list->getValuesForChoices(array('a', 'b'))); + } + + public function testGetValuesForChoicesUsesLoadedList() + { + $this->loader->expects($this->exactly(3)) + ->method('loadChoiceList') + ->with($this->value) + // For BC, the same choice loaded list is returned 3 times + // It should only twice in 4.0 + ->will($this->returnValue($this->loadedList)); + + $this->loader->expects($this->never()) + ->method('loadValuesForChoices'); + + $this->loadedList->expects($this->exactly(2)) + ->method('getValuesForChoices') + ->with(array('a', 'b')) + ->will($this->returnValue('RESULT')); + + // load choice list + $this->list->getChoices(); + + $this->assertSame('RESULT', $this->list->getValuesForChoices(array('a', 'b'))); + $this->assertSame('RESULT', $this->list->getValuesForChoices(array('a', 'b'))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7a1a96d1e62a453569df50db1b0678ca93d75412 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\ChoiceList\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\ChoiceList\LazyChoiceList; +use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader; + +/** + * @author Jules Pietri + */ +class CallbackChoiceLoaderTest extends TestCase +{ + /** + * @var \Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader + */ + private static $loader; + + /** + * @var callable + */ + private static $value; + + /** + * @var array + */ + private static $choices; + + /** + * @var string[] + */ + private static $choiceValues; + + /** + * @var \Symfony\Component\Form\ChoiceList\LazyChoiceList + */ + private static $lazyChoiceList; + + public static function setUpBeforeClass() + { + self::$loader = new CallbackChoiceLoader(function () { + return self::$choices; + }); + self::$value = function ($choice) { + return isset($choice->value) ? $choice->value : null; + }; + self::$choices = array( + (object) array('value' => 'choice_one'), + (object) array('value' => 'choice_two'), + ); + self::$choiceValues = array('choice_one', 'choice_two'); + self::$lazyChoiceList = new LazyChoiceList(self::$loader, self::$value); + } + + public function testLoadChoiceList() + { + $this->assertInstanceOf('\Symfony\Component\Form\ChoiceList\ChoiceListInterface', self::$loader->loadChoiceList(self::$value)); + } + + public function testLoadChoiceListOnlyOnce() + { + $loadedChoiceList = self::$loader->loadChoiceList(self::$value); + + $this->assertSame($loadedChoiceList, self::$loader->loadChoiceList(self::$value)); + } + + public function testLoadChoicesForValuesLoadsChoiceListOnFirstCall() + { + $this->assertSame( + self::$loader->loadChoicesForValues(self::$choiceValues, self::$value), + self::$lazyChoiceList->getChoicesForValues(self::$choiceValues), + 'Choice list should not be reloaded.' + ); + } + + public function testLoadValuesForChoicesLoadsChoiceListOnFirstCall() + { + $this->assertSame( + self::$loader->loadValuesForChoices(self::$choices, self::$value), + self::$lazyChoiceList->getValuesForChoices(self::$choices), + 'Choice list should not be reloaded.' + ); + } + + public static function tearDownAfterClass() + { + self::$loader = null; + self::$value = null; + self::$choices = array(); + self::$choiceValues = array(); + self::$lazyChoiceList = null; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormPerformanceTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormPerformanceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e0a333069c003cc61c44cb3b6405ce154de0f53e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormPerformanceTest.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use Symfony\Component\Form\Test\FormPerformanceTestCase; + +/** + * @author Bernhard Schussek + */ +class CompoundFormPerformanceTest extends FormPerformanceTestCase +{ + /** + * Create a compound form multiple times, as happens in a collection form. + * + * @group benchmark + */ + public function testArrayBasedForm() + { + $this->setMaxRunningTime(1); + + for ($i = 0; $i < 40; ++$i) { + $form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType') + ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->add('gender', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( + 'choices' => array('male' => 'Male', 'female' => 'Female'), + 'required' => false, + )) + ->add('age', 'Symfony\Component\Form\Extension\Core\Type\NumberType') + ->add('birthDate', 'Symfony\Component\Form\Extension\Core\Type\BirthdayType') + ->add('city', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( + // simulate 300 different cities + 'choices' => range(1, 300), + )) + ->getForm(); + + // load the form into a view + $form->createView(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8ae32124a39e271c138f45106137920b093d1457 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/CompoundFormTest.php @@ -0,0 +1,1023 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; +use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler; +use Symfony\Component\Form\FormError; +use Symfony\Component\Form\Forms; +use Symfony\Component\Form\FormView; +use Symfony\Component\Form\SubmitButtonBuilder; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\Form\Tests\Fixtures\FixedDataTransformer; + +class CompoundFormTest extends AbstractFormTest +{ + public function testValidIfAllChildrenAreValid() + { + $this->form->add($this->getBuilder('firstName')->getForm()); + $this->form->add($this->getBuilder('lastName')->getForm()); + + $this->form->submit(array( + 'firstName' => 'Bernhard', + 'lastName' => 'Schussek', + )); + + $this->assertTrue($this->form->isValid()); + } + + public function testInvalidIfChildIsInvalid() + { + $this->form->add($this->getBuilder('firstName')->getForm()); + $this->form->add($this->getBuilder('lastName')->getForm()); + + $this->form->submit(array( + 'firstName' => 'Bernhard', + 'lastName' => 'Schussek', + )); + + $this->form->get('lastName')->addError(new FormError('Invalid')); + + $this->assertFalse($this->form->isValid()); + } + + public function testDisabledFormsValidEvenIfChildrenInvalid() + { + $form = $this->getBuilder('person') + ->setDisabled(true) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->add($this->getBuilder('name')) + ->getForm(); + + $form->submit(array('name' => 'Jacques Doe')); + + $form->get('name')->addError(new FormError('Invalid')); + + $this->assertTrue($form->isValid()); + } + + public function testSubmitForwardsNullIfNotClearMissingButValueIsExplicitlyNull() + { + $child = $this->getMockForm('firstName'); + + $this->form->add($child); + + $child->expects($this->once()) + ->method('submit') + ->with($this->equalTo(null)); + + $this->form->submit(array('firstName' => null), false); + } + + public function testSubmitForwardsNullIfValueIsMissing() + { + $child = $this->getMockForm('firstName'); + + $this->form->add($child); + + $child->expects($this->once()) + ->method('submit') + ->with($this->equalTo(null)); + + $this->form->submit(array()); + } + + public function testSubmitDoesNotForwardNullIfNotClearMissing() + { + $child = $this->getMockForm('firstName'); + + $this->form->add($child); + + $child->expects($this->never()) + ->method('submit'); + + $this->form->submit(array(), false); + } + + public function testSubmitDoesNotAddExtraFieldForNullValues() + { + $factory = Forms::createFormFactoryBuilder() + ->getFormFactory(); + + $child = $factory->createNamed('file', 'Symfony\Component\Form\Extension\Core\Type\FileType', null, array('auto_initialize' => false)); + + $this->form->add($child); + $this->form->submit(array('file' => null), false); + + $this->assertCount(0, $this->form->getExtraData()); + } + + public function testClearMissingFlagIsForwarded() + { + $child = $this->getMockForm('firstName'); + + $this->form->add($child); + + $child->expects($this->once()) + ->method('submit') + ->with($this->equalTo('foo'), false); + + $this->form->submit(array('firstName' => 'foo'), false); + } + + public function testCloneChildren() + { + $child = $this->getBuilder('child')->getForm(); + $this->form->add($child); + + $clone = clone $this->form; + + $this->assertNotSame($this->form, $clone); + $this->assertNotSame($child, $clone['child']); + $this->assertNotSame($this->form['child'], $clone['child']); + } + + public function testNotEmptyIfChildNotEmpty() + { + $child = $this->getMockForm(); + $child->expects($this->once()) + ->method('isEmpty') + ->will($this->returnValue(false)); + + $this->form->setData(null); + $this->form->add($child); + + $this->assertFalse($this->form->isEmpty()); + } + + public function testAdd() + { + $child = $this->getBuilder('foo')->getForm(); + $this->form->add($child); + + $this->assertTrue($this->form->has('foo')); + $this->assertSame($this->form, $child->getParent()); + $this->assertSame(array('foo' => $child), $this->form->all()); + } + + public function testAddUsingNameAndType() + { + $child = $this->getBuilder('foo')->getForm(); + + $this->factory->expects($this->once()) + ->method('createNamed') + ->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + 'bar' => 'baz', + 'auto_initialize' => false, + )) + ->will($this->returnValue($child)); + + $this->form->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('bar' => 'baz')); + + $this->assertTrue($this->form->has('foo')); + $this->assertSame($this->form, $child->getParent()); + $this->assertSame(array('foo' => $child), $this->form->all()); + } + + public function testAddUsingIntegerNameAndType() + { + $child = $this->getBuilder(0)->getForm(); + + $this->factory->expects($this->once()) + ->method('createNamed') + ->with('0', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( + 'bar' => 'baz', + 'auto_initialize' => false, + )) + ->will($this->returnValue($child)); + + // in order to make casting unnecessary + $this->form->add(0, 'Symfony\Component\Form\Extension\Core\Type\TextType', array('bar' => 'baz')); + + $this->assertTrue($this->form->has(0)); + $this->assertSame($this->form, $child->getParent()); + $this->assertSame(array(0 => $child), $this->form->all()); + } + + public function testAddWithoutType() + { + $child = $this->getBuilder('foo')->getForm(); + + $this->factory->expects($this->once()) + ->method('createNamed') + ->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->will($this->returnValue($child)); + + $this->form->add('foo'); + + $this->assertTrue($this->form->has('foo')); + $this->assertSame($this->form, $child->getParent()); + $this->assertSame(array('foo' => $child), $this->form->all()); + } + + public function testAddUsingNameButNoType() + { + $this->form = $this->getBuilder('name', null, '\stdClass') + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + + $child = $this->getBuilder('foo')->getForm(); + + $this->factory->expects($this->once()) + ->method('createForProperty') + ->with('\stdClass', 'foo') + ->will($this->returnValue($child)); + + $this->form->add('foo'); + + $this->assertTrue($this->form->has('foo')); + $this->assertSame($this->form, $child->getParent()); + $this->assertSame(array('foo' => $child), $this->form->all()); + } + + public function testAddUsingNameButNoTypeAndOptions() + { + $this->form = $this->getBuilder('name', null, '\stdClass') + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + + $child = $this->getBuilder('foo')->getForm(); + + $this->factory->expects($this->once()) + ->method('createForProperty') + ->with('\stdClass', 'foo', null, array( + 'bar' => 'baz', + 'auto_initialize' => false, + )) + ->will($this->returnValue($child)); + + $this->form->add('foo', null, array('bar' => 'baz')); + + $this->assertTrue($this->form->has('foo')); + $this->assertSame($this->form, $child->getParent()); + $this->assertSame(array('foo' => $child), $this->form->all()); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\AlreadySubmittedException + */ + public function testAddThrowsExceptionIfAlreadySubmitted() + { + $this->form->submit(array()); + $this->form->add($this->getBuilder('foo')->getForm()); + } + + public function testRemove() + { + $child = $this->getBuilder('foo')->getForm(); + $this->form->add($child); + $this->form->remove('foo'); + + $this->assertNull($child->getParent()); + $this->assertCount(0, $this->form); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\AlreadySubmittedException + */ + public function testRemoveThrowsExceptionIfAlreadySubmitted() + { + $this->form->add($this->getBuilder('foo')->setCompound(false)->getForm()); + $this->form->submit(array('foo' => 'bar')); + $this->form->remove('foo'); + } + + public function testRemoveIgnoresUnknownName() + { + $this->form->remove('notexisting'); + } + + public function testArrayAccess() + { + $child = $this->getBuilder('foo')->getForm(); + + $this->form[] = $child; + + $this->assertTrue(isset($this->form['foo'])); + $this->assertSame($child, $this->form['foo']); + + unset($this->form['foo']); + + $this->assertFalse(isset($this->form['foo'])); + } + + public function testCountable() + { + $this->form->add($this->getBuilder('foo')->getForm()); + $this->form->add($this->getBuilder('bar')->getForm()); + + $this->assertCount(2, $this->form); + } + + public function testIterator() + { + $this->form->add($this->getBuilder('foo')->getForm()); + $this->form->add($this->getBuilder('bar')->getForm()); + + $this->assertSame($this->form->all(), iterator_to_array($this->form)); + } + + public function testAddMapsViewDataToFormIfInitialized() + { + $mapper = $this->getDataMapper(); + $form = $this->getBuilder() + ->setCompound(true) + ->setDataMapper($mapper) + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'foo' => 'bar', + ))) + ->setData('foo') + ->getForm(); + + $child = $this->getBuilder()->getForm(); + $mapper->expects($this->once()) + ->method('mapDataToForms') + ->with('bar', $this->isInstanceOf('\RecursiveIteratorIterator')) + ->will($this->returnCallback(function ($data, \RecursiveIteratorIterator $iterator) use ($child) { + $this->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator()); + $this->assertSame(array($child->getName() => $child), iterator_to_array($iterator)); + })); + + $form->initialize(); + $form->add($child); + } + + public function testAddDoesNotMapViewDataToFormIfNotInitialized() + { + $mapper = $this->getDataMapper(); + $form = $this->getBuilder() + ->setCompound(true) + ->setDataMapper($mapper) + ->getForm(); + + $child = $this->getBuilder()->getForm(); + $mapper->expects($this->never()) + ->method('mapDataToForms'); + + $form->add($child); + } + + public function testAddDoesNotMapViewDataToFormIfInheritData() + { + $mapper = $this->getDataMapper(); + $form = $this->getBuilder() + ->setCompound(true) + ->setDataMapper($mapper) + ->setInheritData(true) + ->getForm(); + + $child = $this->getBuilder()->getForm(); + $mapper->expects($this->never()) + ->method('mapDataToForms'); + + $form->initialize(); + $form->add($child); + } + + public function testSetDataSupportsDynamicAdditionAndRemovalOfChildren() + { + $form = $this->getBuilder() + ->setCompound(true) + // We test using PropertyPathMapper on purpose. The traversal logic + // is currently contained in InheritDataAwareIterator, but even + // if that changes, this test should still function. + ->setDataMapper(new PropertyPathMapper()) + ->getForm(); + + $child = $this->getMockForm('child'); + $childToBeRemoved = $this->getMockForm('removed'); + $childToBeAdded = $this->getMockForm('added'); + + $form->add($child); + $form->add($childToBeRemoved); + + $child->expects($this->once()) + ->method('setData') + ->will($this->returnCallback(function () use ($form, $childToBeAdded) { + $form->remove('removed'); + $form->add($childToBeAdded); + })); + + $childToBeRemoved->expects($this->never()) + ->method('setData'); + + // once when it it is created, once when it is added + $childToBeAdded->expects($this->exactly(2)) + ->method('setData'); + + // pass NULL to all children + $form->setData(array()); + } + + public function testSetDataMapsViewDataToChildren() + { + $mapper = $this->getDataMapper(); + $form = $this->getBuilder() + ->setCompound(true) + ->setDataMapper($mapper) + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'foo' => 'bar', + ))) + ->getForm(); + + $form->add($child1 = $this->getBuilder('firstName')->getForm()); + $form->add($child2 = $this->getBuilder('lastName')->getForm()); + + $mapper->expects($this->once()) + ->method('mapDataToForms') + ->with('bar', $this->isInstanceOf('\RecursiveIteratorIterator')) + ->will($this->returnCallback(function ($data, \RecursiveIteratorIterator $iterator) use ($child1, $child2) { + $this->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator()); + $this->assertSame(array('firstName' => $child1, 'lastName' => $child2), iterator_to_array($iterator)); + })); + + $form->setData('foo'); + } + + public function testSubmitSupportsDynamicAdditionAndRemovalOfChildren() + { + $child = $this->getMockForm('child'); + $childToBeRemoved = $this->getMockForm('removed'); + $childToBeAdded = $this->getMockForm('added'); + + $this->form->add($child); + $this->form->add($childToBeRemoved); + + $form = $this->form; + + $child->expects($this->once()) + ->method('submit') + ->will($this->returnCallback(function () use ($form, $childToBeAdded) { + $form->remove('removed'); + $form->add($childToBeAdded); + })); + + $childToBeRemoved->expects($this->never()) + ->method('submit'); + + $childToBeAdded->expects($this->once()) + ->method('submit'); + + // pass NULL to all children + $this->form->submit(array()); + } + + public function testSubmitMapsSubmittedChildrenOntoExistingViewData() + { + $mapper = $this->getDataMapper(); + $form = $this->getBuilder() + ->setCompound(true) + ->setDataMapper($mapper) + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'foo' => 'bar', + ))) + ->setData('foo') + ->getForm(); + + $form->add($child1 = $this->getBuilder('firstName')->setCompound(false)->getForm()); + $form->add($child2 = $this->getBuilder('lastName')->setCompound(false)->getForm()); + + $mapper->expects($this->once()) + ->method('mapFormsToData') + ->with($this->isInstanceOf('\RecursiveIteratorIterator'), 'bar') + ->will($this->returnCallback(function (\RecursiveIteratorIterator $iterator) use ($child1, $child2) { + $this->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator()); + $this->assertSame(array('firstName' => $child1, 'lastName' => $child2), iterator_to_array($iterator)); + $this->assertEquals('Bernhard', $child1->getData()); + $this->assertEquals('Schussek', $child2->getData()); + })); + + $form->submit(array( + 'firstName' => 'Bernhard', + 'lastName' => 'Schussek', + )); + } + + public function testMapFormsToDataIsNotInvokedIfInheritData() + { + $mapper = $this->getDataMapper(); + $form = $this->getBuilder() + ->setCompound(true) + ->setDataMapper($mapper) + ->setInheritData(true) + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'foo' => 'bar', + ))) + ->getForm(); + + $form->add($child1 = $this->getBuilder('firstName')->setCompound(false)->getForm()); + $form->add($child2 = $this->getBuilder('lastName')->setCompound(false)->getForm()); + + $mapper->expects($this->never()) + ->method('mapFormsToData'); + + $form->submit(array( + 'firstName' => 'Bernhard', + 'lastName' => 'Schussek', + )); + } + + /* + * https://github.com/symfony/symfony/issues/4480 + */ + public function testSubmitRestoresViewDataIfCompoundAndEmpty() + { + $mapper = $this->getDataMapper(); + $object = new \stdClass(); + $form = $this->getBuilder('name', null, 'stdClass') + ->setCompound(true) + ->setDataMapper($mapper) + ->setData($object) + ->getForm(); + + $form->submit(array()); + + $this->assertSame($object, $form->getData()); + } + + public function testSubmitMapsSubmittedChildrenOntoEmptyData() + { + $mapper = $this->getDataMapper(); + $object = new \stdClass(); + $form = $this->getBuilder() + ->setCompound(true) + ->setDataMapper($mapper) + ->setEmptyData($object) + ->setData(null) + ->getForm(); + + $form->add($child = $this->getBuilder('name')->setCompound(false)->getForm()); + + $mapper->expects($this->once()) + ->method('mapFormsToData') + ->with($this->isInstanceOf('\RecursiveIteratorIterator'), $object) + ->will($this->returnCallback(function (\RecursiveIteratorIterator $iterator) use ($child) { + $this->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator()); + $this->assertSame(array('name' => $child), iterator_to_array($iterator)); + })); + + $form->submit(array( + 'name' => 'Bernhard', + )); + } + + public function requestMethodProvider() + { + return array( + array('POST'), + array('PUT'), + array('DELETE'), + array('PATCH'), + ); + } + + /** + * @dataProvider requestMethodProvider + */ + public function testSubmitPostOrPutRequest($method) + { + $path = tempnam(sys_get_temp_dir(), 'sf2'); + touch($path); + + $values = array( + 'author' => array( + 'name' => 'Bernhard', + 'image' => array('filename' => 'foobar.png'), + ), + ); + + $files = array( + 'author' => array( + 'error' => array('image' => UPLOAD_ERR_OK), + 'name' => array('image' => 'upload.png'), + 'size' => array('image' => 123), + 'tmp_name' => array('image' => $path), + 'type' => array('image' => 'image/png'), + ), + ); + + $request = new Request(array(), $values, array(), array(), $files, array( + 'REQUEST_METHOD' => $method, + )); + + $form = $this->getBuilder('author') + ->setMethod($method) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->setRequestHandler(new HttpFoundationRequestHandler()) + ->getForm(); + $form->add($this->getBuilder('name')->getForm()); + $form->add($this->getBuilder('image')->getForm()); + + $form->handleRequest($request); + + $file = new UploadedFile($path, 'upload.png', 'image/png', 123, UPLOAD_ERR_OK); + + $this->assertEquals('Bernhard', $form['name']->getData()); + $this->assertEquals($file, $form['image']->getData()); + + unlink($path); + } + + /** + * @dataProvider requestMethodProvider + */ + public function testSubmitPostOrPutRequestWithEmptyRootFormName($method) + { + $path = tempnam(sys_get_temp_dir(), 'sf2'); + touch($path); + + $values = array( + 'name' => 'Bernhard', + 'extra' => 'data', + ); + + $files = array( + 'image' => array( + 'error' => UPLOAD_ERR_OK, + 'name' => 'upload.png', + 'size' => 123, + 'tmp_name' => $path, + 'type' => 'image/png', + ), + ); + + $request = new Request(array(), $values, array(), array(), $files, array( + 'REQUEST_METHOD' => $method, + )); + + $form = $this->getBuilder('') + ->setMethod($method) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->setRequestHandler(new HttpFoundationRequestHandler()) + ->getForm(); + $form->add($this->getBuilder('name')->getForm()); + $form->add($this->getBuilder('image')->getForm()); + + $form->handleRequest($request); + + $file = new UploadedFile($path, 'upload.png', 'image/png', 123, UPLOAD_ERR_OK); + + $this->assertEquals('Bernhard', $form['name']->getData()); + $this->assertEquals($file, $form['image']->getData()); + $this->assertEquals(array('extra' => 'data'), $form->getExtraData()); + + unlink($path); + } + + /** + * @dataProvider requestMethodProvider + */ + public function testSubmitPostOrPutRequestWithSingleChildForm($method) + { + $path = tempnam(sys_get_temp_dir(), 'sf2'); + touch($path); + + $files = array( + 'image' => array( + 'error' => UPLOAD_ERR_OK, + 'name' => 'upload.png', + 'size' => 123, + 'tmp_name' => $path, + 'type' => 'image/png', + ), + ); + + $request = new Request(array(), array(), array(), array(), $files, array( + 'REQUEST_METHOD' => $method, + )); + + $form = $this->getBuilder('image') + ->setMethod($method) + ->setRequestHandler(new HttpFoundationRequestHandler()) + ->getForm(); + + $form->handleRequest($request); + + $file = new UploadedFile($path, 'upload.png', 'image/png', 123, UPLOAD_ERR_OK); + + $this->assertEquals($file, $form->getData()); + + unlink($path); + } + + /** + * @dataProvider requestMethodProvider + */ + public function testSubmitPostOrPutRequestWithSingleChildFormUploadedFile($method) + { + $path = tempnam(sys_get_temp_dir(), 'sf2'); + touch($path); + + $values = array( + 'name' => 'Bernhard', + ); + + $request = new Request(array(), $values, array(), array(), array(), array( + 'REQUEST_METHOD' => $method, + )); + + $form = $this->getBuilder('name') + ->setMethod($method) + ->setRequestHandler(new HttpFoundationRequestHandler()) + ->getForm(); + + $form->handleRequest($request); + + $this->assertEquals('Bernhard', $form->getData()); + + unlink($path); + } + + public function testSubmitGetRequest() + { + $values = array( + 'author' => array( + 'firstName' => 'Bernhard', + 'lastName' => 'Schussek', + ), + ); + + $request = new Request($values, array(), array(), array(), array(), array( + 'REQUEST_METHOD' => 'GET', + )); + + $form = $this->getBuilder('author') + ->setMethod('GET') + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->setRequestHandler(new HttpFoundationRequestHandler()) + ->getForm(); + $form->add($this->getBuilder('firstName')->getForm()); + $form->add($this->getBuilder('lastName')->getForm()); + + $form->handleRequest($request); + + $this->assertEquals('Bernhard', $form['firstName']->getData()); + $this->assertEquals('Schussek', $form['lastName']->getData()); + } + + public function testSubmitGetRequestWithEmptyRootFormName() + { + $values = array( + 'firstName' => 'Bernhard', + 'lastName' => 'Schussek', + 'extra' => 'data', + ); + + $request = new Request($values, array(), array(), array(), array(), array( + 'REQUEST_METHOD' => 'GET', + )); + + $form = $this->getBuilder('') + ->setMethod('GET') + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->setRequestHandler(new HttpFoundationRequestHandler()) + ->getForm(); + $form->add($this->getBuilder('firstName')->getForm()); + $form->add($this->getBuilder('lastName')->getForm()); + + $form->handleRequest($request); + + $this->assertEquals('Bernhard', $form['firstName']->getData()); + $this->assertEquals('Schussek', $form['lastName']->getData()); + $this->assertEquals(array('extra' => 'data'), $form->getExtraData()); + } + + public function testGetErrors() + { + $this->form->addError($error1 = new FormError('Error 1')); + $this->form->addError($error2 = new FormError('Error 2')); + + $errors = $this->form->getErrors(); + + $this->assertSame( + "ERROR: Error 1\n". + "ERROR: Error 2\n", + (string) $errors + ); + + $this->assertSame(array($error1, $error2), iterator_to_array($errors)); + } + + public function testGetErrorsDeep() + { + $this->form->addError($error1 = new FormError('Error 1')); + $this->form->addError($error2 = new FormError('Error 2')); + + $childForm = $this->getBuilder('Child')->getForm(); + $childForm->addError($nestedError = new FormError('Nested Error')); + $this->form->add($childForm); + + $errors = $this->form->getErrors(true); + + $this->assertSame( + "ERROR: Error 1\n". + "ERROR: Error 2\n". + "ERROR: Nested Error\n", + (string) $errors + ); + + $this->assertSame( + array($error1, $error2, $nestedError), + iterator_to_array($errors) + ); + } + + public function testGetErrorsDeepRecursive() + { + $this->form->addError($error1 = new FormError('Error 1')); + $this->form->addError($error2 = new FormError('Error 2')); + + $childForm = $this->getBuilder('Child')->getForm(); + $childForm->addError($nestedError = new FormError('Nested Error')); + $this->form->add($childForm); + + $errors = $this->form->getErrors(true, false); + + $this->assertSame( + "ERROR: Error 1\n". + "ERROR: Error 2\n". + "Child:\n". + " ERROR: Nested Error\n", + (string) $errors + ); + + $errorsAsArray = iterator_to_array($errors); + + $this->assertSame($error1, $errorsAsArray[0]); + $this->assertSame($error2, $errorsAsArray[1]); + $this->assertInstanceOf('Symfony\Component\Form\FormErrorIterator', $errorsAsArray[2]); + + $nestedErrorsAsArray = iterator_to_array($errorsAsArray[2]); + + $this->assertCount(1, $nestedErrorsAsArray); + $this->assertSame($nestedError, $nestedErrorsAsArray[0]); + } + + // Basic cases are covered in SimpleFormTest + public function testCreateViewWithChildren() + { + $type = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); + $options = array('a' => 'Foo', 'b' => 'Bar'); + $field1 = $this->getMockForm('foo'); + $field2 = $this->getMockForm('bar'); + $view = new FormView(); + $field1View = new FormView(); + $field2View = new FormView(); + + $this->form = $this->getBuilder('form', null, null, $options) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->setType($type) + ->getForm(); + $this->form->add($field1); + $this->form->add($field2); + + $assertChildViewsEqual = function (array $childViews) { + return function (FormView $view) use ($childViews) { + $this->assertSame($childViews, $view->children); + }; + }; + + // First create the view + $type->expects($this->once()) + ->method('createView') + ->will($this->returnValue($view)); + + // Then build it for the form itself + $type->expects($this->once()) + ->method('buildView') + ->with($view, $this->form, $options) + ->will($this->returnCallback($assertChildViewsEqual(array()))); + + // Then add the first child form + $field1->expects($this->once()) + ->method('createView') + ->will($this->returnValue($field1View)); + + // Then the second child form + $field2->expects($this->once()) + ->method('createView') + ->will($this->returnValue($field2View)); + + // Again build the view for the form itself. This time the child views + // exist. + $type->expects($this->once()) + ->method('finishView') + ->with($view, $this->form, $options) + ->will($this->returnCallback($assertChildViewsEqual(array('foo' => $field1View, 'bar' => $field2View)))); + + $this->assertSame($view, $this->form->createView()); + } + + public function testNoClickedButtonBeforeSubmission() + { + $this->assertNull($this->form->getClickedButton()); + } + + public function testNoClickedButton() + { + $button = $this->getMockBuilder('Symfony\Component\Form\SubmitButton') + ->setConstructorArgs(array(new SubmitButtonBuilder('submit'))) + ->setMethods(array('isClicked')) + ->getMock(); + + $button->expects($this->any()) + ->method('isClicked') + ->will($this->returnValue(false)); + + $parentForm = $this->getBuilder('parent')->getForm(); + $nestedForm = $this->getBuilder('nested')->getForm(); + + $this->form->setParent($parentForm); + $this->form->add($button); + $this->form->add($nestedForm); + $this->form->submit(array()); + + $this->assertNull($this->form->getClickedButton()); + } + + public function testClickedButton() + { + $button = $this->getMockBuilder('Symfony\Component\Form\SubmitButton') + ->setConstructorArgs(array(new SubmitButtonBuilder('submit'))) + ->setMethods(array('isClicked')) + ->getMock(); + + $button->expects($this->any()) + ->method('isClicked') + ->will($this->returnValue(true)); + + $this->form->add($button); + $this->form->submit(array()); + + $this->assertSame($button, $this->form->getClickedButton()); + } + + public function testClickedButtonFromNestedForm() + { + $button = $this->getBuilder('submit')->getForm(); + + $nestedForm = $this->getMockBuilder('Symfony\Component\Form\Form') + ->setConstructorArgs(array($this->getBuilder('nested'))) + ->setMethods(array('getClickedButton')) + ->getMock(); + + $nestedForm->expects($this->any()) + ->method('getClickedButton') + ->will($this->returnValue($button)); + + $this->form->add($nestedForm); + $this->form->submit(array()); + + $this->assertSame($button, $this->form->getClickedButton()); + } + + public function testClickedButtonFromParentForm() + { + $button = $this->getBuilder('submit')->getForm(); + + $parentForm = $this->getMockBuilder('Symfony\Component\Form\Form') + ->setConstructorArgs(array($this->getBuilder('parent'))) + ->setMethods(array('getClickedButton')) + ->getMock(); + + $parentForm->expects($this->any()) + ->method('getClickedButton') + ->will($this->returnValue($button)); + + $this->form->setParent($parentForm); + $this->form->submit(array()); + + $this->assertSame($button, $this->form->getClickedButton()); + } + + protected function createForm() + { + return $this->getBuilder() + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..32886e56512987f3aa1b38a3bb7f46545674739f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php @@ -0,0 +1,362 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataMapper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\FormConfigBuilder; +use Symfony\Component\Form\FormConfigInterface; +use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; + +class PropertyPathMapperTest extends TestCase +{ + /** + * @var PropertyPathMapper + */ + private $mapper; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $dispatcher; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $propertyAccessor; + + protected function setUp() + { + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->propertyAccessor = $this->getMockBuilder('Symfony\Component\PropertyAccess\PropertyAccessorInterface')->getMock(); + $this->mapper = new PropertyPathMapper($this->propertyAccessor); + } + + /** + * @param $path + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ + private function getPropertyPath($path) + { + return $this->getMockBuilder('Symfony\Component\PropertyAccess\PropertyPath') + ->setConstructorArgs(array($path)) + ->setMethods(array('getValue', 'setValue')) + ->getMock(); + } + + /** + * @param FormConfigInterface $config + * @param bool $synchronized + * @param bool $submitted + * + * @return \PHPUnit_Framework_MockObject_MockObject + */ + private function getForm(FormConfigInterface $config, $synchronized = true, $submitted = true) + { + $form = $this->getMockBuilder('Symfony\Component\Form\Form') + ->setConstructorArgs(array($config)) + ->setMethods(array('isSynchronized', 'isSubmitted')) + ->getMock(); + + $form->expects($this->any()) + ->method('isSynchronized') + ->will($this->returnValue($synchronized)); + + $form->expects($this->any()) + ->method('isSubmitted') + ->will($this->returnValue($submitted)); + + return $form; + } + + public function testMapDataToFormsPassesObjectRefIfByReference() + { + $car = new \stdClass(); + $engine = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + $this->propertyAccessor->expects($this->once()) + ->method('getValue') + ->with($car, $propertyPath) + ->will($this->returnValue($engine)); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(true); + $config->setPropertyPath($propertyPath); + $form = $this->getForm($config); + + $this->mapper->mapDataToForms($car, array($form)); + + // Can't use isIdentical() above because mocks always clone their + // arguments which can't be disabled in PHPUnit 3.6 + $this->assertSame($engine, $form->getData()); + } + + public function testMapDataToFormsPassesObjectCloneIfNotByReference() + { + $car = new \stdClass(); + $engine = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + $this->propertyAccessor->expects($this->once()) + ->method('getValue') + ->with($car, $propertyPath) + ->will($this->returnValue($engine)); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(false); + $config->setPropertyPath($propertyPath); + $form = $this->getForm($config); + + $this->mapper->mapDataToForms($car, array($form)); + + $this->assertNotSame($engine, $form->getData()); + $this->assertEquals($engine, $form->getData()); + } + + public function testMapDataToFormsIgnoresEmptyPropertyPath() + { + $car = new \stdClass(); + + $config = new FormConfigBuilder(null, '\stdClass', $this->dispatcher); + $config->setByReference(true); + $form = $this->getForm($config); + + $this->assertNull($form->getPropertyPath()); + + $this->mapper->mapDataToForms($car, array($form)); + + $this->assertNull($form->getData()); + } + + public function testMapDataToFormsIgnoresUnmapped() + { + $car = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + $this->propertyAccessor->expects($this->never()) + ->method('getValue'); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(true); + $config->setMapped(false); + $config->setPropertyPath($propertyPath); + $form = $this->getForm($config); + + $this->mapper->mapDataToForms($car, array($form)); + + $this->assertNull($form->getData()); + } + + public function testMapDataToFormsSetsDefaultDataIfPassedDataIsNull() + { + $default = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + $this->propertyAccessor->expects($this->never()) + ->method('getValue'); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(true); + $config->setPropertyPath($propertyPath); + $config->setData($default); + + $form = $this->getMockBuilder('Symfony\Component\Form\Form') + ->setConstructorArgs(array($config)) + ->setMethods(array('setData')) + ->getMock(); + + $form->expects($this->once()) + ->method('setData') + ->with($default); + + $this->mapper->mapDataToForms(null, array($form)); + } + + public function testMapDataToFormsSetsDefaultDataIfPassedDataIsEmptyArray() + { + $default = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + $this->propertyAccessor->expects($this->never()) + ->method('getValue'); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(true); + $config->setPropertyPath($propertyPath); + $config->setData($default); + + $form = $this->getMockBuilder('Symfony\Component\Form\Form') + ->setConstructorArgs(array($config)) + ->setMethods(array('setData')) + ->getMock(); + + $form->expects($this->once()) + ->method('setData') + ->with($default); + + $this->mapper->mapDataToForms(array(), array($form)); + } + + public function testMapFormsToDataWritesBackIfNotByReference() + { + $car = new \stdClass(); + $engine = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + $this->propertyAccessor->expects($this->once()) + ->method('setValue') + ->with($car, $propertyPath, $engine); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(false); + $config->setPropertyPath($propertyPath); + $config->setData($engine); + $form = $this->getForm($config); + + $this->mapper->mapFormsToData(array($form), $car); + } + + public function testMapFormsToDataWritesBackIfByReferenceButNoReference() + { + $car = new \stdClass(); + $engine = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + $this->propertyAccessor->expects($this->once()) + ->method('setValue') + ->with($car, $propertyPath, $engine); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(true); + $config->setPropertyPath($propertyPath); + $config->setData($engine); + $form = $this->getForm($config); + + $this->mapper->mapFormsToData(array($form), $car); + } + + public function testMapFormsToDataWritesBackIfByReferenceAndReference() + { + $car = new \stdClass(); + $engine = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + // $car already contains the reference of $engine + $this->propertyAccessor->expects($this->once()) + ->method('getValue') + ->with($car, $propertyPath) + ->will($this->returnValue($engine)); + + $this->propertyAccessor->expects($this->never()) + ->method('setValue'); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(true); + $config->setPropertyPath($propertyPath); + $config->setData($engine); + $form = $this->getForm($config); + + $this->mapper->mapFormsToData(array($form), $car); + } + + public function testMapFormsToDataIgnoresUnmapped() + { + $car = new \stdClass(); + $engine = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + $this->propertyAccessor->expects($this->never()) + ->method('setValue'); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(true); + $config->setPropertyPath($propertyPath); + $config->setData($engine); + $config->setMapped(false); + $form = $this->getForm($config); + + $this->mapper->mapFormsToData(array($form), $car); + } + + public function testMapFormsToDataIgnoresUnsubmittedForms() + { + $car = new \stdClass(); + $engine = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + $this->propertyAccessor->expects($this->never()) + ->method('setValue'); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(true); + $config->setPropertyPath($propertyPath); + $config->setData($engine); + $form = $this->getForm($config, true, false); + + $this->mapper->mapFormsToData(array($form), $car); + } + + public function testMapFormsToDataIgnoresEmptyData() + { + $car = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + $this->propertyAccessor->expects($this->never()) + ->method('setValue'); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(true); + $config->setPropertyPath($propertyPath); + $config->setData(null); + $form = $this->getForm($config); + + $this->mapper->mapFormsToData(array($form), $car); + } + + public function testMapFormsToDataIgnoresUnsynchronized() + { + $car = new \stdClass(); + $engine = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + $this->propertyAccessor->expects($this->never()) + ->method('setValue'); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(true); + $config->setPropertyPath($propertyPath); + $config->setData($engine); + $form = $this->getForm($config, false); + + $this->mapper->mapFormsToData(array($form), $car); + } + + public function testMapFormsToDataIgnoresDisabled() + { + $car = new \stdClass(); + $engine = new \stdClass(); + $propertyPath = $this->getPropertyPath('engine'); + + $this->propertyAccessor->expects($this->never()) + ->method('setValue'); + + $config = new FormConfigBuilder('name', '\stdClass', $this->dispatcher); + $config->setByReference(true); + $config->setPropertyPath($propertyPath); + $config->setData($engine); + $config->setDisabled(true); + $form = $this->getForm($config); + + $this->mapper->mapFormsToData(array($form), $car); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..220a367655216d21288a81b50217b817f16e2a85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php @@ -0,0 +1,150 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Core\DataTransformer\ArrayToPartsTransformer; + +class ArrayToPartsTransformerTest extends TestCase +{ + private $transformer; + + protected function setUp() + { + $this->transformer = new ArrayToPartsTransformer(array( + 'first' => array('a', 'b', 'c'), + 'second' => array('d', 'e', 'f'), + )); + } + + protected function tearDown() + { + $this->transformer = null; + } + + public function testTransform() + { + $input = array( + 'a' => '1', + 'b' => '2', + 'c' => '3', + 'd' => '4', + 'e' => '5', + 'f' => '6', + ); + + $output = array( + 'first' => array( + 'a' => '1', + 'b' => '2', + 'c' => '3', + ), + 'second' => array( + 'd' => '4', + 'e' => '5', + 'f' => '6', + ), + ); + + $this->assertSame($output, $this->transformer->transform($input)); + } + + public function testTransformEmpty() + { + $output = array( + 'first' => null, + 'second' => null, + ); + + $this->assertSame($output, $this->transformer->transform(null)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testTransformRequiresArray() + { + $this->transformer->transform('12345'); + } + + public function testReverseTransform() + { + $input = array( + 'first' => array( + 'a' => '1', + 'b' => '2', + 'c' => '3', + ), + 'second' => array( + 'd' => '4', + 'e' => '5', + 'f' => '6', + ), + ); + + $output = array( + 'a' => '1', + 'b' => '2', + 'c' => '3', + 'd' => '4', + 'e' => '5', + 'f' => '6', + ); + + $this->assertSame($output, $this->transformer->reverseTransform($input)); + } + + public function testReverseTransformCompletelyEmpty() + { + $input = array( + 'first' => '', + 'second' => '', + ); + + $this->assertNull($this->transformer->reverseTransform($input)); + } + + public function testReverseTransformCompletelyNull() + { + $input = array( + 'first' => null, + 'second' => null, + ); + + $this->assertNull($this->transformer->reverseTransform($input)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformPartiallyNull() + { + $input = array( + 'first' => array( + 'a' => '1', + 'b' => '2', + 'c' => '3', + ), + 'second' => null, + ); + + $this->transformer->reverseTransform($input); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformRequiresArray() + { + $this->transformer->reverseTransform('12345'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BaseDateTimeTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BaseDateTimeTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..385accd7f369ce9f10c521cc6c2b41b2061912bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BaseDateTimeTransformerTest.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; + +class BaseDateTimeTransformerTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException + * @expectedExceptionMessage this_timezone_does_not_exist + */ + public function testConstructFailsIfInputTimezoneIsInvalid() + { + $this->getMockBuilder('Symfony\Component\Form\Extension\Core\DataTransformer\BaseDateTimeTransformer')->setConstructorArgs(array('this_timezone_does_not_exist'))->getMock(); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException + * @expectedExceptionMessage that_timezone_does_not_exist + */ + public function testConstructFailsIfOutputTimezoneIsInvalid() + { + $this->getMockBuilder('Symfony\Component\Form\Extension\Core\DataTransformer\BaseDateTimeTransformer')->setConstructorArgs(array(null, 'that_timezone_does_not_exist'))->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BooleanToStringTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BooleanToStringTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5195092e18b88177f0990ed560634021cff346c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BooleanToStringTransformerTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Core\DataTransformer\BooleanToStringTransformer; + +class BooleanToStringTransformerTest extends TestCase +{ + const TRUE_VALUE = '1'; + + /** + * @var BooleanToStringTransformer + */ + protected $transformer; + + protected function setUp() + { + $this->transformer = new BooleanToStringTransformer(self::TRUE_VALUE); + } + + protected function tearDown() + { + $this->transformer = null; + } + + public function testTransform() + { + $this->assertEquals(self::TRUE_VALUE, $this->transformer->transform(true)); + $this->assertNull($this->transformer->transform(false)); + } + + // https://github.com/symfony/symfony/issues/8989 + public function testTransformAcceptsNull() + { + $this->assertNull($this->transformer->transform(null)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testTransformFailsIfString() + { + $this->transformer->transform('1'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformFailsIfInteger() + { + $this->transformer->reverseTransform(1); + } + + public function testReverseTransform() + { + $this->assertTrue($this->transformer->reverseTransform(self::TRUE_VALUE)); + $this->assertTrue($this->transformer->reverseTransform('foobar')); + $this->assertTrue($this->transformer->reverseTransform('')); + $this->assertFalse($this->transformer->reverseTransform(null)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cf5dbaa6af7dc311f1d17af44b621bacbdf555a0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\ChoiceList\ArrayChoiceList; +use Symfony\Component\Form\Extension\Core\DataTransformer\ChoiceToValueTransformer; + +class ChoiceToValueTransformerTest extends TestCase +{ + protected $transformer; + protected $transformerWithNull; + + protected function setUp() + { + $list = new ArrayChoiceList(array('', false, 'X', true)); + $listWithNull = new ArrayChoiceList(array('', false, 'X', null)); + + $this->transformer = new ChoiceToValueTransformer($list); + $this->transformerWithNull = new ChoiceToValueTransformer($listWithNull); + } + + protected function tearDown() + { + $this->transformer = null; + $this->transformerWithNull = null; + } + + public function transformProvider() + { + return array( + // more extensive test set can be found in FormUtilTest + array('', '', '', '0'), + array(false, '0', false, '1'), + array('X', 'X', 'X', '2'), + array(true, '1', null, '3'), + ); + } + + /** + * @dataProvider transformProvider + */ + public function testTransform($in, $out, $inWithNull, $outWithNull) + { + $this->assertSame($out, $this->transformer->transform($in)); + $this->assertSame($outWithNull, $this->transformerWithNull->transform($inWithNull)); + } + + public function reverseTransformProvider() + { + return array( + // values are expected to be valid choice keys already and stay + // the same + array('', '', '0', ''), + array('0', false, '1', false), + array('X', 'X', '2', 'X'), + array('1', true, '3', null), + ); + } + + /** + * @dataProvider reverseTransformProvider + */ + public function testReverseTransform($in, $out, $inWithNull, $outWithNull) + { + $this->assertSame($out, $this->transformer->reverseTransform($in)); + $this->assertSame($outWithNull, $this->transformerWithNull->reverseTransform($inWithNull)); + } + + public function reverseTransformExpectsStringOrNullProvider() + { + return array( + array(0), + array(true), + array(false), + array(array()), + ); + } + + /** + * @dataProvider reverseTransformExpectsStringOrNullProvider + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformExpectsStringOrNull($value) + { + $this->transformer->reverseTransform($value); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..aa4936f82263e2991aa7eabd005fa56a40576e11 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\ChoiceList\ArrayChoiceList; +use Symfony\Component\Form\Extension\Core\DataTransformer\ChoicesToValuesTransformer; + +class ChoicesToValuesTransformerTest extends TestCase +{ + protected $transformer; + protected $transformerWithNull; + + protected function setUp() + { + $list = new ArrayChoiceList(array('', false, 'X')); + $listWithNull = new ArrayChoiceList(array('', false, 'X', null)); + + $this->transformer = new ChoicesToValuesTransformer($list); + $this->transformerWithNull = new ChoicesToValuesTransformer($listWithNull); + } + + protected function tearDown() + { + $this->transformer = null; + $this->transformerWithNull = null; + } + + public function testTransform() + { + $in = array('', false, 'X'); + $out = array('', '0', 'X'); + + $this->assertSame($out, $this->transformer->transform($in)); + + $in[] = null; + $outWithNull = array('0', '1', '2', '3'); + + $this->assertSame($outWithNull, $this->transformerWithNull->transform($in)); + } + + public function testTransformNull() + { + $this->assertSame(array(), $this->transformer->transform(null)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testTransformExpectsArray() + { + $this->transformer->transform('foobar'); + } + + public function testReverseTransform() + { + // values are expected to be valid choices and stay the same + $in = array('', '0', 'X'); + $out = array('', false, 'X'); + + $this->assertSame($out, $this->transformer->reverseTransform($in)); + // values are expected to be valid choices and stay the same + $inWithNull = array('0', '1', '2', '3'); + $out[] = null; + + $this->assertSame($out, $this->transformerWithNull->reverseTransform($inWithNull)); + } + + public function testReverseTransformNull() + { + $this->assertSame(array(), $this->transformer->reverseTransform(null)); + $this->assertSame(array(), $this->transformerWithNull->reverseTransform(null)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformExpectsArray() + { + $this->transformer->reverseTransform('foobar'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DataTransformerChainTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DataTransformerChainTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fc9f85e3c752e72d0ca64e84129e1fbdf2f41fb2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DataTransformerChainTest.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Core\DataTransformer\DataTransformerChain; + +class DataTransformerChainTest extends TestCase +{ + public function testTransform() + { + $transformer1 = $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock(); + $transformer1->expects($this->once()) + ->method('transform') + ->with($this->identicalTo('foo')) + ->will($this->returnValue('bar')); + $transformer2 = $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock(); + $transformer2->expects($this->once()) + ->method('transform') + ->with($this->identicalTo('bar')) + ->will($this->returnValue('baz')); + + $chain = new DataTransformerChain(array($transformer1, $transformer2)); + + $this->assertEquals('baz', $chain->transform('foo')); + } + + public function testReverseTransform() + { + $transformer2 = $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock(); + $transformer2->expects($this->once()) + ->method('reverseTransform') + ->with($this->identicalTo('foo')) + ->will($this->returnValue('bar')); + $transformer1 = $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock(); + $transformer1->expects($this->once()) + ->method('reverseTransform') + ->with($this->identicalTo('bar')) + ->will($this->returnValue('baz')); + + $chain = new DataTransformerChain(array($transformer1, $transformer2)); + + $this->assertEquals('baz', $chain->reverseTransform('foo')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..d4435d273e04930f30b3f2b9ea10e182a761d171 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalTestCase.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; + +abstract class DateIntervalTestCase extends TestCase +{ + public static function assertDateIntervalEquals(\DateInterval $expected, \DateInterval $actual) + { + self::assertEquals($expected->format('%RP%yY%mM%dDT%hH%iM%sS'), $actual->format('%RP%yY%mM%dDT%hH%iM%sS')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToArrayTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToArrayTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..25ad31f8666b62cfe9b8d34dd09334def20a5c9e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToArrayTransformerTest.php @@ -0,0 +1,265 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use Symfony\Component\Form\Extension\Core\DataTransformer\DateIntervalToArrayTransformer; +use Symfony\Component\Form\Exception\TransformationFailedException; +use Symfony\Component\Form\Exception\UnexpectedTypeException; + +/** + * @author Steffen Roßkamp + */ +class DateIntervalToArrayTransformerTest extends DateIntervalTestCase +{ + public function testTransform() + { + $transformer = new DateIntervalToArrayTransformer(); + $input = new \DateInterval('P1Y2M3DT4H5M6S'); + $output = array( + 'years' => '1', + 'months' => '2', + 'days' => '3', + 'hours' => '4', + 'minutes' => '5', + 'seconds' => '6', + 'invert' => false, + ); + $this->assertSame($output, $transformer->transform($input)); + } + + public function testTransformEmpty() + { + $transformer = new DateIntervalToArrayTransformer(); + $output = array( + 'years' => '', + 'months' => '', + 'days' => '', + 'hours' => '', + 'minutes' => '', + 'seconds' => '', + 'invert' => false, + ); + $this->assertSame($output, $transformer->transform(null)); + } + + public function testTransformEmptyWithFields() + { + $transformer = new DateIntervalToArrayTransformer(array('years', 'weeks', 'minutes', 'seconds')); + $output = array( + 'years' => '', + 'weeks' => '', + 'minutes' => '', + 'seconds' => '', + ); + $this->assertSame($output, $transformer->transform(null)); + } + + public function testTransformWithFields() + { + $transformer = new DateIntervalToArrayTransformer(array('years', 'minutes', 'seconds')); + $input = new \DateInterval('P1Y2M3DT4H5M6S'); + $output = array( + 'years' => '1', + 'minutes' => '5', + 'seconds' => '6', + ); + $this->assertSame($output, $transformer->transform($input)); + } + + public function testTransformWithWeek() + { + $transformer = new DateIntervalToArrayTransformer(array('weeks', 'minutes', 'seconds')); + $input = new \DateInterval('P1Y2M3WT4H5M6S'); + $output = array( + 'weeks' => '3', + 'minutes' => '5', + 'seconds' => '6', + ); + $input = $transformer->transform($input); + ksort($input); + ksort($output); + $this->assertSame($output, $input); + } + + public function testTransformDaysToWeeks() + { + $transformer = new DateIntervalToArrayTransformer(array('weeks', 'minutes', 'seconds')); + $input = new \DateInterval('P1Y2M23DT4H5M6S'); + $output = array( + 'weeks' => '3', + 'minutes' => '5', + 'seconds' => '6', + ); + $input = $transformer->transform($input); + ksort($input); + ksort($output); + $this->assertSame($output, $input); + } + + public function testTransformDaysNotOverflowingToWeeks() + { + $transformer = new DateIntervalToArrayTransformer(array('days', 'minutes', 'seconds')); + $input = new \DateInterval('P1Y2M23DT4H5M6S'); + $output = array( + 'days' => '23', + 'minutes' => '5', + 'seconds' => '6', + ); + $this->assertSame($output, $transformer->transform($input)); + } + + public function testTransformWithInvert() + { + $transformer = new DateIntervalToArrayTransformer(array('years', 'invert')); + $input = new \DateInterval('P1Y'); + $input->invert = 1; + $output = array( + 'years' => '1', + 'invert' => true, + ); + $this->assertSame($output, $transformer->transform($input)); + } + + public function testTransformWithPadding() + { + $transformer = new DateIntervalToArrayTransformer(null, true); + $input = new \DateInterval('P1Y2M3DT4H5M6S'); + $output = array( + 'years' => '01', + 'months' => '02', + 'days' => '03', + 'hours' => '04', + 'minutes' => '05', + 'seconds' => '06', + 'invert' => false, + ); + $this->assertSame($output, $transformer->transform($input)); + } + + public function testTransformWithFieldsAndPadding() + { + $transformer = new DateIntervalToArrayTransformer(array('years', 'minutes', 'seconds'), true); + $input = new \DateInterval('P1Y2M3DT4H5M6S'); + $output = array( + 'years' => '01', + 'minutes' => '05', + 'seconds' => '06', + ); + $this->assertSame($output, $transformer->transform($input)); + } + + public function testReverseTransformRequiresDateTime() + { + $transformer = new DateIntervalToArrayTransformer(); + $this->assertNull($transformer->reverseTransform(null)); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(UnexpectedTypeException::class); + $transformer->reverseTransform('12345'); + } + + public function testReverseTransformWithUnsetFields() + { + $transformer = new DateIntervalToArrayTransformer(); + $input = array('years' => '1'); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(TransformationFailedException::class); + $transformer->reverseTransform($input); + } + + public function testReverseTransformWithEmptyFields() + { + $transformer = new DateIntervalToArrayTransformer(array('years', 'minutes', 'seconds')); + $input = array( + 'years' => '1', + 'minutes' => '', + 'seconds' => '6', + ); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(TransformationFailedException::class, 'This amount of "minutes" is invalid'); + $transformer->reverseTransform($input); + } + + public function testReverseTransformWithWrongInvertType() + { + $transformer = new DateIntervalToArrayTransformer(array('invert')); + $input = array( + 'invert' => '1', + ); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(TransformationFailedException::class, 'The value of "invert" must be boolean'); + $transformer->reverseTransform($input); + } + + public function testReverseTransform() + { + $transformer = new DateIntervalToArrayTransformer(); + $input = array( + 'years' => '1', + 'months' => '2', + 'days' => '3', + 'hours' => '4', + 'minutes' => '5', + 'seconds' => '6', + 'invert' => false, + ); + $output = new \DateInterval('P01Y02M03DT04H05M06S'); + $this->assertDateIntervalEquals($output, $transformer->reverseTransform($input)); + } + + public function testReverseTransformWithWeek() + { + $transformer = new DateIntervalToArrayTransformer( + array('years', 'months', 'weeks', 'hours', 'minutes', 'seconds') + ); + $input = array( + 'years' => '1', + 'months' => '2', + 'weeks' => '3', + 'hours' => '4', + 'minutes' => '5', + 'seconds' => '6', + ); + $output = new \DateInterval('P1Y2M21DT4H5M6S'); + $this->assertDateIntervalEquals($output, $transformer->reverseTransform($input)); + } + + public function testReverseTransformWithFields() + { + $transformer = new DateIntervalToArrayTransformer(array('years', 'minutes', 'seconds')); + $input = array( + 'years' => '1', + 'minutes' => '5', + 'seconds' => '6', + ); + $output = new \DateInterval('P1Y0M0DT0H5M6S'); + $this->assertDateIntervalEquals($output, $transformer->reverseTransform($input)); + } + + public function testBothTransformsWithWeek() + { + $transformer = new DateIntervalToArrayTransformer( + array('years', 'months', 'weeks', 'hours', 'minutes', 'seconds') + ); + $interval = new \DateInterval('P1Y2M21DT4H5M6S'); + $array = array( + 'years' => '1', + 'months' => '2', + 'weeks' => '3', + 'hours' => '4', + 'minutes' => '5', + 'seconds' => '6', + ); + $input = $transformer->transform($interval); + ksort($input); + ksort($array); + $this->assertSame($array, $input); + $interval = new \DateInterval('P1Y2M0DT4H5M6S'); + $input['weeks'] = '0'; + $this->assertDateIntervalEquals($interval, $transformer->reverseTransform($input)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9b831118c2eaa9eaf2876d4d4cadbc27c9bc7588 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.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\Component\Form\Tests\Extension\Core\DataTransformer; + +use Symfony\Component\Form\Extension\Core\DataTransformer\DateIntervalToStringTransformer; +use Symfony\Component\Form\Exception\TransformationFailedException; +use Symfony\Component\Form\Exception\UnexpectedTypeException; + +/** + * @author Steffen Roßkamp + */ +class DateIntervalToStringTransformerTest extends DateIntervalTestCase +{ + public function dataProviderISO() + { + $data = array( + array('P%YY%MM%DDT%HH%IM%SS', 'P00Y00M00DT00H00M00S', 'PT0S'), + array('P%yY%mM%dDT%hH%iM%sS', 'P0Y0M0DT0H0M0S', 'PT0S'), + array('P%yY%mM%dDT%hH%iM%sS', 'P10Y2M3DT16H5M6S', 'P10Y2M3DT16H5M6S'), + array('P%yY%mM%dDT%hH%iM', 'P10Y2M3DT16H5M', 'P10Y2M3DT16H5M'), + array('P%yY%mM%dDT%hH', 'P10Y2M3DT16H', 'P10Y2M3DT16H'), + array('P%yY%mM%dD', 'P10Y2M3D', 'P10Y2M3DT0H'), + ); + + return $data; + } + + public function dataProviderDate() + { + $data = array( + array( + '%y years %m months %d days %h hours %i minutes %s seconds', + '10 years 2 months 3 days 16 hours 5 minutes 6 seconds', + 'P10Y2M3DT16H5M6S', + ), + array( + '%y years %m months %d days %h hours %i minutes', + '10 years 2 months 3 days 16 hours 5 minutes', + 'P10Y2M3DT16H5M', + ), + array('%y years %m months %d days %h hours', '10 years 2 months 3 days 16 hours', 'P10Y2M3DT16H'), + array('%y years %m months %d days', '10 years 2 months 3 days', 'P10Y2M3D'), + array('%y years %m months', '10 years 2 months', 'P10Y2M'), + array('%y year', '1 year', 'P1Y'), + ); + + return $data; + } + + /** + * @dataProvider dataProviderISO + */ + public function testTransform($format, $output, $input) + { + $transformer = new DateIntervalToStringTransformer($format); + $input = new \DateInterval($input); + $this->assertEquals($output, $transformer->transform($input)); + } + + public function testTransformEmpty() + { + $transformer = new DateIntervalToStringTransformer(); + $this->assertSame('', $transformer->transform(null)); + } + + public function testTransformExpectsDateTime() + { + $transformer = new DateIntervalToStringTransformer(); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(UnexpectedTypeException::class); + $transformer->transform('1234'); + } + + /** + * @dataProvider dataProviderISO + */ + public function testReverseTransform($format, $input, $output) + { + $reverseTransformer = new DateIntervalToStringTransformer($format, true); + $interval = new \DateInterval($output); + $this->assertDateIntervalEquals($interval, $reverseTransformer->reverseTransform($input)); + } + + /** + * @dataProvider dataProviderDate + */ + public function testReverseTransformDateString($format, $input, $output) + { + $reverseTransformer = new DateIntervalToStringTransformer($format, true); + $interval = new \DateInterval($output); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(TransformationFailedException::class); + $this->assertDateIntervalEquals($interval, $reverseTransformer->reverseTransform($input)); + } + + public function testReverseTransformEmpty() + { + $reverseTransformer = new DateIntervalToStringTransformer(); + $this->assertNull($reverseTransformer->reverseTransform('')); + } + + public function testReverseTransformExpectsString() + { + $reverseTransformer = new DateIntervalToStringTransformer(); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(UnexpectedTypeException::class); + $reverseTransformer->reverseTransform(1234); + } + + public function testReverseTransformExpectsValidIntervalString() + { + $reverseTransformer = new DateIntervalToStringTransformer(); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(TransformationFailedException::class); + $reverseTransformer->reverseTransform('10Y'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..c6d1a07cd7803e7fbe7beb8b5953cd0af828f1c7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeTestCase.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; + +abstract class DateTimeTestCase extends TestCase +{ + public static function assertDateTimeEquals(\DateTime $expected, \DateTime $actual) + { + self::assertEquals($expected->format('U'), $actual->format('U')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7b81f4775c1068878d81e91ce84c80e9264c2257 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php @@ -0,0 +1,580 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer; + +class DateTimeToArrayTransformerTest extends DateTimeTestCase +{ + public function testTransform() + { + $transformer = new DateTimeToArrayTransformer('UTC', 'UTC'); + + $input = new \DateTime('2010-02-03 04:05:06 UTC'); + + $output = array( + 'year' => '2010', + 'month' => '2', + 'day' => '3', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + ); + + $this->assertSame($output, $transformer->transform($input)); + } + + public function testTransformEmpty() + { + $transformer = new DateTimeToArrayTransformer(); + + $output = array( + 'year' => '', + 'month' => '', + 'day' => '', + 'hour' => '', + 'minute' => '', + 'second' => '', + ); + + $this->assertSame($output, $transformer->transform(null)); + } + + public function testTransformEmptyWithFields() + { + $transformer = new DateTimeToArrayTransformer(null, null, array('year', 'minute', 'second')); + + $output = array( + 'year' => '', + 'minute' => '', + 'second' => '', + ); + + $this->assertSame($output, $transformer->transform(null)); + } + + public function testTransformWithFields() + { + $transformer = new DateTimeToArrayTransformer('UTC', 'UTC', array('year', 'month', 'minute', 'second')); + + $input = new \DateTime('2010-02-03 04:05:06 UTC'); + + $output = array( + 'year' => '2010', + 'month' => '2', + 'minute' => '5', + 'second' => '6', + ); + + $this->assertSame($output, $transformer->transform($input)); + } + + public function testTransformWithPadding() + { + $transformer = new DateTimeToArrayTransformer('UTC', 'UTC', null, true); + + $input = new \DateTime('2010-02-03 04:05:06 UTC'); + + $output = array( + 'year' => '2010', + 'month' => '02', + 'day' => '03', + 'hour' => '04', + 'minute' => '05', + 'second' => '06', + ); + + $this->assertSame($output, $transformer->transform($input)); + } + + public function testTransformDifferentTimezones() + { + $transformer = new DateTimeToArrayTransformer('America/New_York', 'Asia/Hong_Kong'); + + $input = new \DateTime('2010-02-03 04:05:06 America/New_York'); + + $dateTime = new \DateTime('2010-02-03 04:05:06 America/New_York'); + $dateTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); + $output = array( + 'year' => (string) (int) $dateTime->format('Y'), + 'month' => (string) (int) $dateTime->format('m'), + 'day' => (string) (int) $dateTime->format('d'), + 'hour' => (string) (int) $dateTime->format('H'), + 'minute' => (string) (int) $dateTime->format('i'), + 'second' => (string) (int) $dateTime->format('s'), + ); + + $this->assertSame($output, $transformer->transform($input)); + } + + public function testTransformDateTimeImmutable() + { + $transformer = new DateTimeToArrayTransformer('America/New_York', 'Asia/Hong_Kong'); + + $input = new \DateTimeImmutable('2010-02-03 04:05:06 America/New_York'); + + $dateTime = new \DateTimeImmutable('2010-02-03 04:05:06 America/New_York'); + $dateTime = $dateTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); + $output = array( + 'year' => (string) (int) $dateTime->format('Y'), + 'month' => (string) (int) $dateTime->format('m'), + 'day' => (string) (int) $dateTime->format('d'), + 'hour' => (string) (int) $dateTime->format('H'), + 'minute' => (string) (int) $dateTime->format('i'), + 'second' => (string) (int) $dateTime->format('s'), + ); + + $this->assertSame($output, $transformer->transform($input)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testTransformRequiresDateTime() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform('12345'); + } + + public function testReverseTransform() + { + $transformer = new DateTimeToArrayTransformer('UTC', 'UTC'); + + $input = array( + 'year' => '2010', + 'month' => '2', + 'day' => '3', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + ); + + $output = new \DateTime('2010-02-03 04:05:06 UTC'); + + $this->assertDateTimeEquals($output, $transformer->reverseTransform($input)); + } + + public function testReverseTransformWithSomeZero() + { + $transformer = new DateTimeToArrayTransformer('UTC', 'UTC'); + + $input = array( + 'year' => '2010', + 'month' => '2', + 'day' => '3', + 'hour' => '4', + 'minute' => '0', + 'second' => '0', + ); + + $output = new \DateTime('2010-02-03 04:00:00 UTC'); + + $this->assertDateTimeEquals($output, $transformer->reverseTransform($input)); + } + + public function testReverseTransformCompletelyEmpty() + { + $transformer = new DateTimeToArrayTransformer(); + + $input = array( + 'year' => '', + 'month' => '', + 'day' => '', + 'hour' => '', + 'minute' => '', + 'second' => '', + ); + + $this->assertNull($transformer->reverseTransform($input)); + } + + public function testReverseTransformCompletelyEmptySubsetOfFields() + { + $transformer = new DateTimeToArrayTransformer(null, null, array('year', 'month', 'day')); + + $input = array( + 'year' => '', + 'month' => '', + 'day' => '', + ); + + $this->assertNull($transformer->reverseTransform($input)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformPartiallyEmptyYear() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'month' => '2', + 'day' => '3', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformPartiallyEmptyMonth() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'day' => '3', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformPartiallyEmptyDay() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformPartiallyEmptyHour() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'day' => '3', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformPartiallyEmptyMinute() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'day' => '3', + 'hour' => '4', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformPartiallyEmptySecond() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'day' => '3', + 'hour' => '4', + 'minute' => '5', + )); + } + + public function testReverseTransformNull() + { + $transformer = new DateTimeToArrayTransformer(); + + $this->assertNull($transformer->reverseTransform(null)); + } + + public function testReverseTransformDifferentTimezones() + { + $transformer = new DateTimeToArrayTransformer('America/New_York', 'Asia/Hong_Kong'); + + $input = array( + 'year' => '2010', + 'month' => '2', + 'day' => '3', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + ); + + $output = new \DateTime('2010-02-03 04:05:06 Asia/Hong_Kong'); + $output->setTimezone(new \DateTimeZone('America/New_York')); + + $this->assertDateTimeEquals($output, $transformer->reverseTransform($input)); + } + + public function testReverseTransformToDifferentTimezone() + { + $transformer = new DateTimeToArrayTransformer('Asia/Hong_Kong', 'UTC'); + + $input = array( + 'year' => '2010', + 'month' => '2', + 'day' => '3', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + ); + + $output = new \DateTime('2010-02-03 04:05:06 UTC'); + $output->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); + + $this->assertDateTimeEquals($output, $transformer->reverseTransform($input)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformRequiresArray() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform('12345'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithNegativeYear() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '-1', + 'month' => '2', + 'day' => '3', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithNegativeMonth() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '-1', + 'day' => '3', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithNegativeDay() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'day' => '-1', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithNegativeHour() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'day' => '3', + 'hour' => '-1', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithNegativeMinute() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'day' => '3', + 'hour' => '4', + 'minute' => '-1', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithNegativeSecond() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'day' => '3', + 'hour' => '4', + 'minute' => '5', + 'second' => '-1', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithInvalidMonth() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '13', + 'day' => '3', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithInvalidDay() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'day' => '31', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithStringDay() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'day' => 'bazinga', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithStringMonth() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => 'bazinga', + 'day' => '31', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithStringYear() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => 'bazinga', + 'month' => '2', + 'day' => '31', + 'hour' => '4', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithEmptyStringHour() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'day' => '31', + 'hour' => '', + 'minute' => '5', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithEmptyStringMinute() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'day' => '31', + 'hour' => '4', + 'minute' => '', + 'second' => '6', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithEmptyStringSecond() + { + $transformer = new DateTimeToArrayTransformer(); + $transformer->reverseTransform(array( + 'year' => '2010', + 'month' => '2', + 'day' => '31', + 'hour' => '4', + 'minute' => '5', + 'second' => '', + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..50da5d680848824846e0c55b67130339cea5d939 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php @@ -0,0 +1,335 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformer; +use Symfony\Component\Intl\Util\IntlTestHelper; + +class DateTimeToLocalizedStringTransformerTest extends DateTimeTestCase +{ + protected $dateTime; + protected $dateTimeWithoutSeconds; + + protected function setUp() + { + parent::setUp(); + + // Since we test against "de_AT", we need the full implementation + IntlTestHelper::requireFullIntl($this, '57.1'); + + \Locale::setDefault('de_AT'); + + $this->dateTime = new \DateTime('2010-02-03 04:05:06 UTC'); + $this->dateTimeWithoutSeconds = new \DateTime('2010-02-03 04:05:00 UTC'); + } + + protected function tearDown() + { + $this->dateTime = null; + $this->dateTimeWithoutSeconds = null; + } + + public static function assertEquals($expected, $actual, $message = '', $delta = 0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false) + { + if ($expected instanceof \DateTime && $actual instanceof \DateTime) { + $expected = $expected->format('c'); + $actual = $actual->format('c'); + } + + parent::assertEquals($expected, $actual, $message, $delta, $maxDepth, $canonicalize, $ignoreCase); + } + + public function dataProvider() + { + return array( + array(\IntlDateFormatter::SHORT, null, null, '03.02.10, 04:05', '2010-02-03 04:05:00 UTC'), + array(\IntlDateFormatter::MEDIUM, null, null, '03.02.2010, 04:05', '2010-02-03 04:05:00 UTC'), + array(\IntlDateFormatter::LONG, null, null, '3. Februar 2010 um 04:05', '2010-02-03 04:05:00 UTC'), + array(\IntlDateFormatter::FULL, null, null, 'Mittwoch, 3. Februar 2010 um 04:05', '2010-02-03 04:05:00 UTC'), + array(\IntlDateFormatter::SHORT, \IntlDateFormatter::NONE, null, '03.02.10', '2010-02-03 00:00:00 UTC'), + array(\IntlDateFormatter::MEDIUM, \IntlDateFormatter::NONE, null, '03.02.2010', '2010-02-03 00:00:00 UTC'), + array(\IntlDateFormatter::LONG, \IntlDateFormatter::NONE, null, '3. Februar 2010', '2010-02-03 00:00:00 UTC'), + array(\IntlDateFormatter::FULL, \IntlDateFormatter::NONE, null, 'Mittwoch, 3. Februar 2010', '2010-02-03 00:00:00 UTC'), + array(null, \IntlDateFormatter::SHORT, null, '03.02.2010, 04:05', '2010-02-03 04:05:00 UTC'), + array(null, \IntlDateFormatter::MEDIUM, null, '03.02.2010, 04:05:06', '2010-02-03 04:05:06 UTC'), + array(null, \IntlDateFormatter::LONG, null, '03.02.2010, 04:05:06 GMT', '2010-02-03 04:05:06 UTC'), + // see below for extra test case for time format FULL + array(\IntlDateFormatter::NONE, \IntlDateFormatter::SHORT, null, '04:05', '1970-01-01 04:05:00 UTC'), + array(\IntlDateFormatter::NONE, \IntlDateFormatter::MEDIUM, null, '04:05:06', '1970-01-01 04:05:06 UTC'), + array(\IntlDateFormatter::NONE, \IntlDateFormatter::LONG, null, '04:05:06 GMT', '1970-01-01 04:05:06 UTC'), + array(null, null, 'yyyy-MM-dd HH:mm:00', '2010-02-03 04:05:00', '2010-02-03 04:05:00 UTC'), + array(null, null, 'yyyy-MM-dd HH:mm', '2010-02-03 04:05', '2010-02-03 04:05:00 UTC'), + array(null, null, 'yyyy-MM-dd HH', '2010-02-03 04', '2010-02-03 04:00:00 UTC'), + array(null, null, 'yyyy-MM-dd', '2010-02-03', '2010-02-03 00:00:00 UTC'), + array(null, null, 'yyyy-MM', '2010-02', '2010-02-01 00:00:00 UTC'), + array(null, null, 'yyyy', '2010', '2010-01-01 00:00:00 UTC'), + array(null, null, 'dd-MM-yyyy', '03-02-2010', '2010-02-03 00:00:00 UTC'), + array(null, null, 'HH:mm:ss', '04:05:06', '1970-01-01 04:05:06 UTC'), + array(null, null, 'HH:mm:00', '04:05:00', '1970-01-01 04:05:00 UTC'), + array(null, null, 'HH:mm', '04:05', '1970-01-01 04:05:00 UTC'), + array(null, null, 'HH', '04', '1970-01-01 04:00:00 UTC'), + ); + } + + /** + * @dataProvider dataProvider + */ + public function testTransform($dateFormat, $timeFormat, $pattern, $output, $input) + { + $transformer = new DateTimeToLocalizedStringTransformer( + 'UTC', + 'UTC', + $dateFormat, + $timeFormat, + \IntlDateFormatter::GREGORIAN, + $pattern + ); + + $input = new \DateTime($input); + + $this->assertEquals($output, $transformer->transform($input)); + } + + public function testTransformFullTime() + { + $transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', null, \IntlDateFormatter::FULL); + + $this->assertEquals('03.02.2010, 04:05:06 GMT', $transformer->transform($this->dateTime)); + } + + public function testTransformToDifferentLocale() + { + \Locale::setDefault('en_US'); + + $transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC'); + + $this->assertEquals('Feb 3, 2010, 4:05 AM', $transformer->transform($this->dateTime)); + } + + public function testTransformEmpty() + { + $transformer = new DateTimeToLocalizedStringTransformer(); + + $this->assertSame('', $transformer->transform(null)); + } + + public function testTransformWithDifferentTimezones() + { + $transformer = new DateTimeToLocalizedStringTransformer('America/New_York', 'Asia/Hong_Kong'); + + $input = new \DateTime('2010-02-03 04:05:06 America/New_York'); + + $dateTime = clone $input; + $dateTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); + + $this->assertEquals($dateTime->format('d.m.Y, H:i'), $transformer->transform($input)); + } + + public function testReverseTransformWithNoConstructorParameters() + { + $tz = date_default_timezone_get(); + date_default_timezone_set('Europe/Rome'); + + $transformer = new DateTimeToLocalizedStringTransformer(); + + $dateTime = new \DateTime('2010-02-03 04:05'); + + $this->assertEquals( + $dateTime->format('c'), + $transformer->reverseTransform('03.02.2010, 04:05')->format('c') + ); + + date_default_timezone_set($tz); + } + + public function testTransformWithDifferentPatterns() + { + $transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', \IntlDateFormatter::FULL, \IntlDateFormatter::FULL, \IntlDateFormatter::GREGORIAN, 'MM*yyyy*dd HH|mm|ss'); + + $this->assertEquals('02*2010*03 04|05|06', $transformer->transform($this->dateTime)); + } + + public function testTransformDateTimeImmutableTimezones() + { + $transformer = new DateTimeToLocalizedStringTransformer('America/New_York', 'Asia/Hong_Kong'); + + $input = new \DateTimeImmutable('2010-02-03 04:05:06 America/New_York'); + + $dateTime = clone $input; + $dateTime = $dateTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); + + $this->assertEquals($dateTime->format('d.m.Y, H:i'), $transformer->transform($input)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testTransformRequiresValidDateTime() + { + $transformer = new DateTimeToLocalizedStringTransformer(); + $transformer->transform('2010-01-01'); + } + + public function testTransformWrapsIntlErrors() + { + $transformer = new DateTimeToLocalizedStringTransformer(); + + $this->markTestIncomplete('Checking for intl errors needs to be reimplemented'); + + // HOW TO REPRODUCE? + + //$this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Extension\Core\DataTransformer\TransformationFailedException'); + + //$transformer->transform(1.5); + } + + /** + * @dataProvider dataProvider + */ + public function testReverseTransform($dateFormat, $timeFormat, $pattern, $input, $output) + { + $transformer = new DateTimeToLocalizedStringTransformer( + 'UTC', + 'UTC', + $dateFormat, + $timeFormat, + \IntlDateFormatter::GREGORIAN, + $pattern + ); + + $output = new \DateTime($output); + + $this->assertEquals($output, $transformer->reverseTransform($input)); + } + + public function testReverseTransformFullTime() + { + $transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', null, \IntlDateFormatter::FULL); + + $this->assertDateTimeEquals($this->dateTime, $transformer->reverseTransform('03.02.2010, 04:05:06 GMT+00:00')); + } + + public function testReverseTransformFromDifferentLocale() + { + \Locale::setDefault('en_US'); + + $transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC'); + + $this->assertDateTimeEquals($this->dateTimeWithoutSeconds, $transformer->reverseTransform('Feb 3, 2010, 04:05 AM')); + } + + public function testReverseTransformWithDifferentTimezones() + { + $transformer = new DateTimeToLocalizedStringTransformer('America/New_York', 'Asia/Hong_Kong'); + + $dateTime = new \DateTime('2010-02-03 04:05:00 Asia/Hong_Kong'); + $dateTime->setTimezone(new \DateTimeZone('America/New_York')); + + $this->assertDateTimeEquals($dateTime, $transformer->reverseTransform('03.02.2010, 04:05')); + } + + public function testReverseTransformOnlyDateWithDifferentTimezones() + { + $transformer = new DateTimeToLocalizedStringTransformer('Europe/Berlin', 'Pacific/Tahiti', \IntlDateFormatter::FULL, \IntlDateFormatter::FULL, \IntlDateFormatter::GREGORIAN, 'yyyy-MM-dd'); + + $dateTime = new \DateTime('2017-01-10 11:00', new \DateTimeZone('Europe/Berlin')); + + $this->assertDateTimeEquals($dateTime, $transformer->reverseTransform('2017-01-10')); + } + + public function testReverseTransformWithDifferentPatterns() + { + $transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', \IntlDateFormatter::FULL, \IntlDateFormatter::FULL, \IntlDateFormatter::GREGORIAN, 'MM*yyyy*dd HH|mm|ss'); + + $this->assertDateTimeEquals($this->dateTime, $transformer->reverseTransform('02*2010*03 04|05|06')); + } + + public function testReverseTransformDateOnlyWithDstIssue() + { + $transformer = new DateTimeToLocalizedStringTransformer('Europe/Rome', 'Europe/Rome', \IntlDateFormatter::FULL, \IntlDateFormatter::FULL, \IntlDateFormatter::GREGORIAN, 'dd/MM/yyyy'); + + $this->assertDateTimeEquals( + new \DateTime('1978-05-28', new \DateTimeZone('Europe/Rome')), + $transformer->reverseTransform('28/05/1978') + ); + } + + public function testReverseTransformDateOnlyWithDstIssueAndEscapedText() + { + $transformer = new DateTimeToLocalizedStringTransformer('Europe/Rome', 'Europe/Rome', \IntlDateFormatter::FULL, \IntlDateFormatter::FULL, \IntlDateFormatter::GREGORIAN, "'day': dd 'month': MM 'year': yyyy"); + + $this->assertDateTimeEquals( + new \DateTime('1978-05-28', new \DateTimeZone('Europe/Rome')), + $transformer->reverseTransform('day: 28 month: 05 year: 1978') + ); + } + + public function testReverseTransformEmpty() + { + $transformer = new DateTimeToLocalizedStringTransformer(); + + $this->assertNull($transformer->reverseTransform('')); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformRequiresString() + { + $transformer = new DateTimeToLocalizedStringTransformer(); + $transformer->reverseTransform(12345); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWrapsIntlErrors() + { + $transformer = new DateTimeToLocalizedStringTransformer(); + $transformer->reverseTransform('12345'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException + */ + public function testValidateDateFormatOption() + { + new DateTimeToLocalizedStringTransformer(null, null, 'foobar'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException + */ + public function testValidateTimeFormatOption() + { + new DateTimeToLocalizedStringTransformer(null, null, null, 'foobar'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithNonExistingDate() + { + $transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', \IntlDateFormatter::SHORT); + + $this->assertDateTimeEquals($this->dateTimeWithoutSeconds, $transformer->reverseTransform('31.04.10 04:05')); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformOutOfTimestampRange() + { + $transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC'); + $transformer->reverseTransform('1789-07-14'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7e9c2e30c93bcd64d3dba36d5cf24f58c4ff7a07 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToRfc3339Transformer; + +class DateTimeToRfc3339TransformerTest extends DateTimeTestCase +{ + protected $dateTime; + protected $dateTimeWithoutSeconds; + + protected function setUp() + { + parent::setUp(); + + $this->dateTime = new \DateTime('2010-02-03 04:05:06 UTC'); + $this->dateTimeWithoutSeconds = new \DateTime('2010-02-03 04:05:00 UTC'); + } + + protected function tearDown() + { + $this->dateTime = null; + $this->dateTimeWithoutSeconds = null; + } + + public static function assertEquals($expected, $actual, $message = '', $delta = 0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false) + { + if ($expected instanceof \DateTime && $actual instanceof \DateTime) { + $expected = $expected->format('c'); + $actual = $actual->format('c'); + } + + parent::assertEquals($expected, $actual, $message, $delta, $maxDepth, $canonicalize, $ignoreCase); + } + + public function allProvider() + { + return array( + array('UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06Z'), + array('UTC', 'UTC', null, ''), + array('America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:06 America/New_York', '2010-02-03T17:05:06+08:00'), + array('America/New_York', 'Asia/Hong_Kong', null, ''), + array('UTC', 'Asia/Hong_Kong', '2010-02-03 04:05:06 UTC', '2010-02-03T12:05:06+08:00'), + array('America/New_York', 'UTC', '2010-02-03 04:05:06 America/New_York', '2010-02-03T09:05:06Z'), + ); + } + + public function transformProvider() + { + return $this->allProvider(); + } + + public function reverseTransformProvider() + { + return array_merge($this->allProvider(), array( + // format without seconds, as appears in some browsers + array('UTC', 'UTC', '2010-02-03 04:05:00 UTC', '2010-02-03T04:05Z'), + array('America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:00 America/New_York', '2010-02-03T17:05+08:00'), + array('Europe/Amsterdam', 'Europe/Amsterdam', '2013-08-21 10:30:00 Europe/Amsterdam', '2013-08-21T08:30:00Z'), + )); + } + + /** + * @dataProvider transformProvider + */ + public function testTransform($fromTz, $toTz, $from, $to) + { + $transformer = new DateTimeToRfc3339Transformer($fromTz, $toTz); + + $this->assertSame($to, $transformer->transform(null !== $from ? new \DateTime($from) : null)); + } + + /** + * @dataProvider transformProvider + */ + public function testTransformDateTimeImmutable($fromTz, $toTz, $from, $to) + { + $transformer = new DateTimeToRfc3339Transformer($fromTz, $toTz); + + $this->assertSame($to, $transformer->transform(null !== $from ? new \DateTimeImmutable($from) : null)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testTransformRequiresValidDateTime() + { + $transformer = new DateTimeToRfc3339Transformer(); + $transformer->transform('2010-01-01'); + } + + /** + * @dataProvider reverseTransformProvider + */ + public function testReverseTransform($toTz, $fromTz, $to, $from) + { + $transformer = new DateTimeToRfc3339Transformer($toTz, $fromTz); + + if (null !== $to) { + $this->assertDateTimeEquals(new \DateTime($to), $transformer->reverseTransform($from)); + } else { + $this->assertSame($to, $transformer->reverseTransform($from)); + } + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformRequiresString() + { + $transformer = new DateTimeToRfc3339Transformer(); + $transformer->reverseTransform(12345); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithNonExistingDate() + { + $transformer = new DateTimeToRfc3339Transformer('UTC', 'UTC'); + + $transformer->reverseTransform('2010-04-31T04:05Z'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformExpectsValidDateString() + { + $transformer = new DateTimeToRfc3339Transformer('UTC', 'UTC'); + + $transformer->reverseTransform('2010-2010-2010'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7a470537bbf310b9883d0d7fa8997e97e91e3015 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php @@ -0,0 +1,186 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer; + +class DateTimeToStringTransformerTest extends DateTimeTestCase +{ + public function dataProvider() + { + $data = array( + array('Y-m-d H:i:s', '2010-02-03 16:05:06', '2010-02-03 16:05:06 UTC'), + array('Y-m-d H:i:00', '2010-02-03 16:05:00', '2010-02-03 16:05:00 UTC'), + array('Y-m-d H:i', '2010-02-03 16:05', '2010-02-03 16:05:00 UTC'), + array('Y-m-d H', '2010-02-03 16', '2010-02-03 16:00:00 UTC'), + array('Y-m-d', '2010-02-03', '2010-02-03 00:00:00 UTC'), + array('Y-m', '2010-12', '2010-12-01 00:00:00 UTC'), + array('Y', '2010', '2010-01-01 00:00:00 UTC'), + array('d-m-Y', '03-02-2010', '2010-02-03 00:00:00 UTC'), + array('H:i:s', '16:05:06', '1970-01-01 16:05:06 UTC'), + array('H:i:00', '16:05:00', '1970-01-01 16:05:00 UTC'), + array('H:i', '16:05', '1970-01-01 16:05:00 UTC'), + array('H', '16', '1970-01-01 16:00:00 UTC'), + array('Y-z', '2010-33', '2010-02-03 00:00:00 UTC'), + + // different day representations + array('Y-m-j', '2010-02-3', '2010-02-03 00:00:00 UTC'), + array('z', '33', '1970-02-03 00:00:00 UTC'), + + // not bijective + // this will not work as PHP will use actual date to replace missing info + // and after change of date will lookup for closest Wednesday + // i.e. value: 2010-02, PHP value: 2010-02-(today i.e. 20), parsed date: 2010-02-24 + //array('Y-m-D', '2010-02-Wed', '2010-02-03 00:00:00 UTC'), + //array('Y-m-l', '2010-02-Wednesday', '2010-02-03 00:00:00 UTC'), + + // different month representations + array('Y-n-d', '2010-2-03', '2010-02-03 00:00:00 UTC'), + array('Y-M-d', '2010-Feb-03', '2010-02-03 00:00:00 UTC'), + array('Y-F-d', '2010-February-03', '2010-02-03 00:00:00 UTC'), + + // different year representations + array('y-m-d', '10-02-03', '2010-02-03 00:00:00 UTC'), + + // different time representations + array('G:i:s', '16:05:06', '1970-01-01 16:05:06 UTC'), + array('g:i:s a', '4:05:06 pm', '1970-01-01 16:05:06 UTC'), + array('h:i:s a', '04:05:06 pm', '1970-01-01 16:05:06 UTC'), + + // seconds since Unix + array('U', '1265213106', '2010-02-03 16:05:06 UTC'), + + array('Y-z', '2010-33', '2010-02-03 00:00:00 UTC'), + ); + + return $data; + } + + /** + * @dataProvider dataProvider + */ + public function testTransform($format, $output, $input) + { + $transformer = new DateTimeToStringTransformer('UTC', 'UTC', $format); + + $input = new \DateTime($input); + + $this->assertEquals($output, $transformer->transform($input)); + } + + public function testTransformEmpty() + { + $transformer = new DateTimeToStringTransformer(); + + $this->assertSame('', $transformer->transform(null)); + } + + public function testTransformWithDifferentTimezones() + { + $transformer = new DateTimeToStringTransformer('Asia/Hong_Kong', 'America/New_York', 'Y-m-d H:i:s'); + + $input = new \DateTime('2010-02-03 12:05:06 America/New_York'); + $output = $input->format('Y-m-d H:i:s'); + $input->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); + + $this->assertEquals($output, $transformer->transform($input)); + } + + public function testTransformDateTimeImmutable() + { + $transformer = new DateTimeToStringTransformer('Asia/Hong_Kong', 'America/New_York', 'Y-m-d H:i:s'); + + $input = new \DateTimeImmutable('2010-02-03 12:05:06 America/New_York'); + $output = $input->format('Y-m-d H:i:s'); + $input = $input->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); + + $this->assertEquals($output, $transformer->transform($input)); + } + + public function testTransformExpectsDateTime() + { + $transformer = new DateTimeToStringTransformer(); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\TransformationFailedException'); + + $transformer->transform('1234'); + } + + /** + * @dataProvider dataProvider + */ + public function testReverseTransformUsingPipe($format, $input, $output) + { + $reverseTransformer = new DateTimeToStringTransformer('UTC', 'UTC', $format, true); + + $output = new \DateTime($output); + + $this->assertDateTimeEquals($output, $reverseTransformer->reverseTransform($input)); + } + + /** + * @dataProvider dataProvider + */ + public function testReverseTransformWithoutUsingPipe($format, $input, $output) + { + $reverseTransformer = new DateTimeToStringTransformer('UTC', 'UTC', $format, false); + + $output = new \DateTime($output); + + $this->assertDateTimeEquals($output, $reverseTransformer->reverseTransform($input)); + } + + public function testReverseTransformEmpty() + { + $reverseTransformer = new DateTimeToStringTransformer(); + + $this->assertNull($reverseTransformer->reverseTransform('')); + } + + public function testReverseTransformWithDifferentTimezones() + { + $reverseTransformer = new DateTimeToStringTransformer('America/New_York', 'Asia/Hong_Kong', 'Y-m-d H:i:s'); + + $output = new \DateTime('2010-02-03 16:05:06 Asia/Hong_Kong'); + $input = $output->format('Y-m-d H:i:s'); + $output->setTimezone(new \DateTimeZone('America/New_York')); + + $this->assertDateTimeEquals($output, $reverseTransformer->reverseTransform($input)); + } + + public function testReverseTransformExpectsString() + { + $reverseTransformer = new DateTimeToStringTransformer(); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\TransformationFailedException'); + + $reverseTransformer->reverseTransform(1234); + } + + public function testReverseTransformExpectsValidDateString() + { + $reverseTransformer = new DateTimeToStringTransformer(); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\TransformationFailedException'); + + $reverseTransformer->reverseTransform('2010-2010-2010'); + } + + public function testReverseTransformWithNonExistingDate() + { + $reverseTransformer = new DateTimeToStringTransformer(); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\TransformationFailedException'); + + $reverseTransformer->reverseTransform('2010-04-31'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToTimestampTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToTimestampTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7ea8e9a09eb5da8f584eb567dfe93dab13be16e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToTimestampTransformerTest.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer; + +class DateTimeToTimestampTransformerTest extends DateTimeTestCase +{ + public function testTransform() + { + $transformer = new DateTimeToTimestampTransformer('UTC', 'UTC'); + + $input = new \DateTime('2010-02-03 04:05:06 UTC'); + $output = $input->format('U'); + + $this->assertEquals($output, $transformer->transform($input)); + } + + public function testTransformEmpty() + { + $transformer = new DateTimeToTimestampTransformer(); + + $this->assertNull($transformer->transform(null)); + } + + public function testTransformWithDifferentTimezones() + { + $transformer = new DateTimeToTimestampTransformer('Asia/Hong_Kong', 'America/New_York'); + + $input = new \DateTime('2010-02-03 04:05:06 America/New_York'); + $output = $input->format('U'); + $input->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); + + $this->assertEquals($output, $transformer->transform($input)); + } + + public function testTransformFromDifferentTimezone() + { + $transformer = new DateTimeToTimestampTransformer('Asia/Hong_Kong', 'UTC'); + + $input = new \DateTime('2010-02-03 04:05:06 Asia/Hong_Kong'); + + $dateTime = clone $input; + $dateTime->setTimezone(new \DateTimeZone('UTC')); + $output = $dateTime->format('U'); + + $this->assertEquals($output, $transformer->transform($input)); + } + + public function testTransformDateTimeImmutable() + { + $transformer = new DateTimeToTimestampTransformer('Asia/Hong_Kong', 'America/New_York'); + + $input = new \DateTimeImmutable('2010-02-03 04:05:06 America/New_York'); + $output = $input->format('U'); + $input = $input->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); + + $this->assertEquals($output, $transformer->transform($input)); + } + + public function testTransformExpectsDateTime() + { + $transformer = new DateTimeToTimestampTransformer(); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\TransformationFailedException'); + + $transformer->transform('1234'); + } + + public function testReverseTransform() + { + $reverseTransformer = new DateTimeToTimestampTransformer('UTC', 'UTC'); + + $output = new \DateTime('2010-02-03 04:05:06 UTC'); + $input = $output->format('U'); + + $this->assertDateTimeEquals($output, $reverseTransformer->reverseTransform($input)); + } + + public function testReverseTransformEmpty() + { + $reverseTransformer = new DateTimeToTimestampTransformer(); + + $this->assertNull($reverseTransformer->reverseTransform(null)); + } + + public function testReverseTransformWithDifferentTimezones() + { + $reverseTransformer = new DateTimeToTimestampTransformer('Asia/Hong_Kong', 'America/New_York'); + + $output = new \DateTime('2010-02-03 04:05:06 America/New_York'); + $input = $output->format('U'); + $output->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); + + $this->assertDateTimeEquals($output, $reverseTransformer->reverseTransform($input)); + } + + public function testReverseTransformExpectsValidTimestamp() + { + $reverseTransformer = new DateTimeToTimestampTransformer(); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\TransformationFailedException'); + + $reverseTransformer->reverseTransform('2010-2010-2010'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fe1f7d31792fd2c4f407e97be0ebe1bfe52d362e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php @@ -0,0 +1,245 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Core\DataTransformer\IntegerToLocalizedStringTransformer; +use Symfony\Component\Intl\Util\IntlTestHelper; + +class IntegerToLocalizedStringTransformerTest extends TestCase +{ + protected function setUp() + { + parent::setUp(); + + \Locale::setDefault('en'); + } + + public function transformWithRoundingProvider() + { + return array( + // towards positive infinity (1.6 -> 2, -1.6 -> -1) + array(1234.5, '1235', IntegerToLocalizedStringTransformer::ROUND_CEILING), + array(1234.4, '1235', IntegerToLocalizedStringTransformer::ROUND_CEILING), + array(-1234.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_CEILING), + array(-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_CEILING), + // towards negative infinity (1.6 -> 1, -1.6 -> -2) + array(1234.5, '1234', IntegerToLocalizedStringTransformer::ROUND_FLOOR), + array(1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_FLOOR), + array(-1234.5, '-1235', IntegerToLocalizedStringTransformer::ROUND_FLOOR), + array(-1234.4, '-1235', IntegerToLocalizedStringTransformer::ROUND_FLOOR), + // away from zero (1.6 -> 2, -1.6 -> 2) + array(1234.5, '1235', IntegerToLocalizedStringTransformer::ROUND_UP), + array(1234.4, '1235', IntegerToLocalizedStringTransformer::ROUND_UP), + array(-1234.5, '-1235', IntegerToLocalizedStringTransformer::ROUND_UP), + array(-1234.4, '-1235', IntegerToLocalizedStringTransformer::ROUND_UP), + // towards zero (1.6 -> 1, -1.6 -> -1) + array(1234.5, '1234', IntegerToLocalizedStringTransformer::ROUND_DOWN), + array(1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_DOWN), + array(-1234.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_DOWN), + array(-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_DOWN), + // round halves (.5) to the next even number + array(1234.6, '1235', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1234.5, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1233.5, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1232.5, '1232', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(-1234.6, '-1235', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(-1234.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(-1233.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(-1232.5, '-1232', IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + // round halves (.5) away from zero + array(1234.6, '1235', IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + array(1234.5, '1235', IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + array(1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + array(-1234.6, '-1235', IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + array(-1234.5, '-1235', IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + array(-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + // round halves (.5) towards zero + array(1234.6, '1235', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1234.5, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1234.4, '1234', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(-1234.6, '-1235', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(-1234.5, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(-1234.4, '-1234', IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), + ); + } + + /** + * @dataProvider transformWithRoundingProvider + */ + public function testTransformWithRounding($input, $output, $roundingMode) + { + $transformer = new IntegerToLocalizedStringTransformer(null, null, $roundingMode); + + $this->assertEquals($output, $transformer->transform($input)); + } + + public function testReverseTransform() + { + // Since we test against "de_AT", we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $transformer = new IntegerToLocalizedStringTransformer(); + + $this->assertEquals(1, $transformer->reverseTransform('1')); + $this->assertEquals(1, $transformer->reverseTransform('1,5')); + $this->assertEquals(1234, $transformer->reverseTransform('1234,5')); + $this->assertEquals(12345, $transformer->reverseTransform('12345,912')); + } + + public function testReverseTransformEmpty() + { + $transformer = new IntegerToLocalizedStringTransformer(); + + $this->assertNull($transformer->reverseTransform('')); + } + + public function testReverseTransformWithGrouping() + { + // Since we test against "de_DE", we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_DE'); + + $transformer = new IntegerToLocalizedStringTransformer(null, true); + + $this->assertEquals(1234, $transformer->reverseTransform('1.234,5')); + $this->assertEquals(12345, $transformer->reverseTransform('12.345,912')); + $this->assertEquals(1234, $transformer->reverseTransform('1234,5')); + $this->assertEquals(12345, $transformer->reverseTransform('12345,912')); + } + + public function reverseTransformWithRoundingProvider() + { + return array( + // towards positive infinity (1.6 -> 2, -1.6 -> -1) + array('1234,5', 1235, IntegerToLocalizedStringTransformer::ROUND_CEILING), + array('1234,4', 1235, IntegerToLocalizedStringTransformer::ROUND_CEILING), + array('-1234,5', -1234, IntegerToLocalizedStringTransformer::ROUND_CEILING), + array('-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_CEILING), + // towards negative infinity (1.6 -> 1, -1.6 -> -2) + array('1234,5', 1234, IntegerToLocalizedStringTransformer::ROUND_FLOOR), + array('1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_FLOOR), + array('-1234,5', -1235, IntegerToLocalizedStringTransformer::ROUND_FLOOR), + array('-1234,4', -1235, IntegerToLocalizedStringTransformer::ROUND_FLOOR), + // away from zero (1.6 -> 2, -1.6 -> 2) + array('1234,5', 1235, IntegerToLocalizedStringTransformer::ROUND_UP), + array('1234,4', 1235, IntegerToLocalizedStringTransformer::ROUND_UP), + array('-1234,5', -1235, IntegerToLocalizedStringTransformer::ROUND_UP), + array('-1234,4', -1235, IntegerToLocalizedStringTransformer::ROUND_UP), + // towards zero (1.6 -> 1, -1.6 -> -1) + array('1234,5', 1234, IntegerToLocalizedStringTransformer::ROUND_DOWN), + array('1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_DOWN), + array('-1234,5', -1234, IntegerToLocalizedStringTransformer::ROUND_DOWN), + array('-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_DOWN), + // round halves (.5) to the next even number + array('1234,6', 1235, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array('1234,5', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array('1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array('1233,5', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array('1232,5', 1232, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array('-1234,6', -1235, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array('-1234,5', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array('-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array('-1233,5', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + array('-1232,5', -1232, IntegerToLocalizedStringTransformer::ROUND_HALF_EVEN), + // round halves (.5) away from zero + array('1234,6', 1235, IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + array('1234,5', 1235, IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + array('1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + array('-1234,6', -1235, IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + array('-1234,5', -1235, IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + array('-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_UP), + // round halves (.5) towards zero + array('1234,6', 1235, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), + array('1234,5', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), + array('1234,4', 1234, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), + array('-1234,6', -1235, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), + array('-1234,5', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), + array('-1234,4', -1234, IntegerToLocalizedStringTransformer::ROUND_HALF_DOWN), + ); + } + + /** + * @dataProvider reverseTransformWithRoundingProvider + */ + public function testReverseTransformWithRounding($input, $output, $roundingMode) + { + $transformer = new IntegerToLocalizedStringTransformer(null, null, $roundingMode); + + $this->assertEquals($output, $transformer->reverseTransform($input)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformExpectsString() + { + $transformer = new IntegerToLocalizedStringTransformer(); + + $transformer->reverseTransform(1); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformExpectsValidNumber() + { + $transformer = new IntegerToLocalizedStringTransformer(); + + $transformer->reverseTransform('foo'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformDisallowsNaN() + { + $transformer = new IntegerToLocalizedStringTransformer(); + + $transformer->reverseTransform('NaN'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformDisallowsNaN2() + { + $transformer = new IntegerToLocalizedStringTransformer(); + + $transformer->reverseTransform('nan'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformDisallowsInfinity() + { + $transformer = new IntegerToLocalizedStringTransformer(); + + $transformer->reverseTransform('∞'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformDisallowsNegativeInfinity() + { + $transformer = new IntegerToLocalizedStringTransformer(); + + $transformer->reverseTransform('-∞'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..68face130b535dd9ad617a4cdf2bde9bb5fa6d5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Core\DataTransformer\MoneyToLocalizedStringTransformer; +use Symfony\Component\Intl\Util\IntlTestHelper; + +class MoneyToLocalizedStringTransformerTest extends TestCase +{ + public function testTransform() + { + // Since we test against "de_AT", we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $transformer = new MoneyToLocalizedStringTransformer(null, null, null, 100); + + $this->assertEquals('1,23', $transformer->transform(123)); + } + + public function testTransformExpectsNumeric() + { + $transformer = new MoneyToLocalizedStringTransformer(null, null, null, 100); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\TransformationFailedException'); + + $transformer->transform('abcd'); + } + + public function testTransformEmpty() + { + $transformer = new MoneyToLocalizedStringTransformer(); + + $this->assertSame('', $transformer->transform(null)); + } + + public function testReverseTransform() + { + // Since we test against "de_AT", we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $transformer = new MoneyToLocalizedStringTransformer(null, null, null, 100); + + $this->assertEquals(123, $transformer->reverseTransform('1,23')); + } + + public function testReverseTransformExpectsString() + { + $transformer = new MoneyToLocalizedStringTransformer(null, null, null, 100); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\TransformationFailedException'); + + $transformer->reverseTransform(12345); + } + + public function testReverseTransformEmpty() + { + $transformer = new MoneyToLocalizedStringTransformer(); + + $this->assertNull($transformer->reverseTransform('')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d6a466210223221ca7217ecd942863641f7179c6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php @@ -0,0 +1,660 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Core\DataTransformer\NumberToLocalizedStringTransformer; +use Symfony\Component\Intl\Util\IntlTestHelper; + +class NumberToLocalizedStringTransformerTest extends TestCase +{ + protected function setUp() + { + parent::setUp(); + + \Locale::setDefault('en'); + } + + public function provideTransformations() + { + return array( + array(null, '', 'de_AT'), + array(1, '1', 'de_AT'), + array(1.5, '1,5', 'de_AT'), + array(1234.5, '1234,5', 'de_AT'), + array(12345.912, '12345,912', 'de_AT'), + array(1234.5, '1234,5', 'ru'), + array(1234.5, '1234,5', 'fi'), + ); + } + + /** + * @dataProvider provideTransformations + */ + public function testTransform($from, $to, $locale) + { + // Since we test against other locales, we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault($locale); + + $transformer = new NumberToLocalizedStringTransformer(); + + $this->assertSame($to, $transformer->transform($from)); + } + + public function provideTransformationsWithGrouping() + { + return array( + array(1234.5, '1.234,5', 'de_DE'), + array(12345.912, '12.345,912', 'de_DE'), + array(1234.5, '1 234,5', 'fr'), + array(1234.5, '1 234,5', 'ru'), + array(1234.5, '1 234,5', 'fi'), + ); + } + + /** + * @dataProvider provideTransformationsWithGrouping + */ + public function testTransformWithGrouping($from, $to, $locale) + { + // Since we test against other locales, we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault($locale); + + $transformer = new NumberToLocalizedStringTransformer(null, true); + + $this->assertSame($to, $transformer->transform($from)); + } + + public function testTransformWithScale() + { + // Since we test against "de_AT", we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $transformer = new NumberToLocalizedStringTransformer(2); + + $this->assertEquals('1234,50', $transformer->transform(1234.5)); + $this->assertEquals('678,92', $transformer->transform(678.916)); + } + + public function transformWithRoundingProvider() + { + return array( + // towards positive infinity (1.6 -> 2, -1.6 -> -1) + array(0, 1234.5, '1235', NumberToLocalizedStringTransformer::ROUND_CEILING), + array(0, 1234.4, '1235', NumberToLocalizedStringTransformer::ROUND_CEILING), + array(0, -1234.5, '-1234', NumberToLocalizedStringTransformer::ROUND_CEILING), + array(0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_CEILING), + array(1, 123.45, '123,5', NumberToLocalizedStringTransformer::ROUND_CEILING), + array(1, 123.44, '123,5', NumberToLocalizedStringTransformer::ROUND_CEILING), + array(1, -123.45, '-123,4', NumberToLocalizedStringTransformer::ROUND_CEILING), + array(1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_CEILING), + // towards negative infinity (1.6 -> 1, -1.6 -> -2) + array(0, 1234.5, '1234', NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(0, -1234.5, '-1235', NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(0, -1234.4, '-1235', NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(1, 123.45, '123,4', NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(1, -123.45, '-123,5', NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(1, -123.44, '-123,5', NumberToLocalizedStringTransformer::ROUND_FLOOR), + // away from zero (1.6 -> 2, -1.6 -> 2) + array(0, 1234.5, '1235', NumberToLocalizedStringTransformer::ROUND_UP), + array(0, 1234.4, '1235', NumberToLocalizedStringTransformer::ROUND_UP), + array(0, -1234.5, '-1235', NumberToLocalizedStringTransformer::ROUND_UP), + array(0, -1234.4, '-1235', NumberToLocalizedStringTransformer::ROUND_UP), + array(1, 123.45, '123,5', NumberToLocalizedStringTransformer::ROUND_UP), + array(1, 123.44, '123,5', NumberToLocalizedStringTransformer::ROUND_UP), + array(1, -123.45, '-123,5', NumberToLocalizedStringTransformer::ROUND_UP), + array(1, -123.44, '-123,5', NumberToLocalizedStringTransformer::ROUND_UP), + // towards zero (1.6 -> 1, -1.6 -> -1) + array(0, 1234.5, '1234', NumberToLocalizedStringTransformer::ROUND_DOWN), + array(0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_DOWN), + array(0, -1234.5, '-1234', NumberToLocalizedStringTransformer::ROUND_DOWN), + array(0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_DOWN), + array(1, 123.45, '123,4', NumberToLocalizedStringTransformer::ROUND_DOWN), + array(1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_DOWN), + array(1, -123.45, '-123,4', NumberToLocalizedStringTransformer::ROUND_DOWN), + array(1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_DOWN), + // round halves (.5) to the next even number + array(0, 1234.6, '1235', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, 1234.5, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, 1233.5, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, 1232.5, '1232', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, -1234.6, '-1235', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, -1234.5, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, -1233.5, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, -1232.5, '-1232', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, 123.46, '123,5', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, 123.45, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, 123.35, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, 123.25, '123,2', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, -123.46, '-123,5', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, -123.45, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, -123.35, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, -123.25, '-123,2', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + // round halves (.5) away from zero + array(0, 1234.6, '1235', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(0, 1234.5, '1235', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(0, -1234.6, '-1235', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(0, -1234.5, '-1235', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(1, 123.46, '123,5', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(1, 123.45, '123,5', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(1, -123.46, '-123,5', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(1, -123.45, '-123,5', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_UP), + // round halves (.5) towards zero + array(0, 1234.6, '1235', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(0, 1234.5, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(0, 1234.4, '1234', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(0, -1234.6, '-1235', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(0, -1234.5, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(0, -1234.4, '-1234', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1, 123.46, '123,5', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1, 123.45, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1, 123.44, '123,4', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1, -123.46, '-123,5', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1, -123.45, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1, -123.44, '-123,4', NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + ); + } + + /** + * @dataProvider transformWithRoundingProvider + */ + public function testTransformWithRounding($scale, $input, $output, $roundingMode) + { + // Since we test against "de_AT", we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $transformer = new NumberToLocalizedStringTransformer($scale, null, $roundingMode); + + $this->assertEquals($output, $transformer->transform($input)); + } + + public function testTransformDoesNotRoundIfNoScale() + { + // Since we test against "de_AT", we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $transformer = new NumberToLocalizedStringTransformer(null, null, NumberToLocalizedStringTransformer::ROUND_DOWN); + + $this->assertEquals('1234,547', $transformer->transform(1234.547)); + } + + /** + * @dataProvider provideTransformations + */ + public function testReverseTransform($to, $from, $locale) + { + // Since we test against other locales, we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault($locale); + + $transformer = new NumberToLocalizedStringTransformer(); + + $this->assertEquals($to, $transformer->reverseTransform($from)); + } + + /** + * @dataProvider provideTransformationsWithGrouping + */ + public function testReverseTransformWithGrouping($to, $from, $locale) + { + // Since we test against other locales, we need the full implementation + IntlTestHelper::requireFullIntl($this, '4.8.1.1'); + + \Locale::setDefault($locale); + + $transformer = new NumberToLocalizedStringTransformer(null, true); + + $this->assertEquals($to, $transformer->reverseTransform($from)); + } + + /** + * @see https://github.com/symfony/symfony/issues/7609 + */ + public function testReverseTransformWithGroupingAndFixedSpaces() + { + // Since we test against other locales, we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('ru'); + + $transformer = new NumberToLocalizedStringTransformer(null, true); + + $this->assertEquals(1234.5, $transformer->reverseTransform("1\xc2\xa0234,5")); + } + + public function testReverseTransformWithGroupingButWithoutGroupSeparator() + { + // Since we test against "de_AT", we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $transformer = new NumberToLocalizedStringTransformer(null, true); + + // omit group separator + $this->assertEquals(1234.5, $transformer->reverseTransform('1234,5')); + $this->assertEquals(12345.912, $transformer->reverseTransform('12345,912')); + } + + public function reverseTransformWithRoundingProvider() + { + return array( + // towards positive infinity (1.6 -> 2, -1.6 -> -1) + array(0, '1234,5', 1235, NumberToLocalizedStringTransformer::ROUND_CEILING), + array(0, '1234,4', 1235, NumberToLocalizedStringTransformer::ROUND_CEILING), + array(0, '-1234,5', -1234, NumberToLocalizedStringTransformer::ROUND_CEILING), + array(0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_CEILING), + array(1, '123,45', 123.5, NumberToLocalizedStringTransformer::ROUND_CEILING), + array(1, '123,44', 123.5, NumberToLocalizedStringTransformer::ROUND_CEILING), + array(1, '-123,45', -123.4, NumberToLocalizedStringTransformer::ROUND_CEILING), + array(1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_CEILING), + // towards negative infinity (1.6 -> 1, -1.6 -> -2) + array(0, '1234,5', 1234, NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(0, '-1234,5', -1235, NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(0, '-1234,4', -1235, NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(1, '123,45', 123.4, NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(1, '-123,45', -123.5, NumberToLocalizedStringTransformer::ROUND_FLOOR), + array(1, '-123,44', -123.5, NumberToLocalizedStringTransformer::ROUND_FLOOR), + // away from zero (1.6 -> 2, -1.6 -> 2) + array(0, '1234,5', 1235, NumberToLocalizedStringTransformer::ROUND_UP), + array(0, '1234,4', 1235, NumberToLocalizedStringTransformer::ROUND_UP), + array(0, '-1234,5', -1235, NumberToLocalizedStringTransformer::ROUND_UP), + array(0, '-1234,4', -1235, NumberToLocalizedStringTransformer::ROUND_UP), + array(1, '123,45', 123.5, NumberToLocalizedStringTransformer::ROUND_UP), + array(1, '123,44', 123.5, NumberToLocalizedStringTransformer::ROUND_UP), + array(1, '-123,45', -123.5, NumberToLocalizedStringTransformer::ROUND_UP), + array(1, '-123,44', -123.5, NumberToLocalizedStringTransformer::ROUND_UP), + // towards zero (1.6 -> 1, -1.6 -> -1) + array(0, '1234,5', 1234, NumberToLocalizedStringTransformer::ROUND_DOWN), + array(0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_DOWN), + array(0, '-1234,5', -1234, NumberToLocalizedStringTransformer::ROUND_DOWN), + array(0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_DOWN), + array(1, '123,45', 123.4, NumberToLocalizedStringTransformer::ROUND_DOWN), + array(1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_DOWN), + array(1, '-123,45', -123.4, NumberToLocalizedStringTransformer::ROUND_DOWN), + array(1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_DOWN), + array(2, '37.37', 37.37, NumberToLocalizedStringTransformer::ROUND_DOWN), + array(2, '2.01', 2.01, NumberToLocalizedStringTransformer::ROUND_DOWN), + // round halves (.5) to the next even number + array(0, '1234,6', 1235, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, '1234,5', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, '1233,5', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, '1232,5', 1232, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, '-1234,6', -1235, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, '-1234,5', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, '-1233,5', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(0, '-1232,5', -1232, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, '123,46', 123.5, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, '123,45', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, '123,35', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, '123,25', 123.2, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, '-123,46', -123.5, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, '-123,45', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, '-123,35', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + array(1, '-123,25', -123.2, NumberToLocalizedStringTransformer::ROUND_HALF_EVEN), + // round halves (.5) away from zero + array(0, '1234,6', 1235, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(0, '1234,5', 1235, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(0, '-1234,6', -1235, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(0, '-1234,5', -1235, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(1, '123,46', 123.5, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(1, '123,45', 123.5, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(1, '-123,46', -123.5, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(1, '-123,45', -123.5, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + array(1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_UP), + // round halves (.5) towards zero + array(0, '1234,6', 1235, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(0, '1234,5', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(0, '1234,4', 1234, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(0, '-1234,6', -1235, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(0, '-1234,5', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(0, '-1234,4', -1234, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1, '123,46', 123.5, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1, '123,45', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1, '123,44', 123.4, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1, '-123,46', -123.5, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1, '-123,45', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + array(1, '-123,44', -123.4, NumberToLocalizedStringTransformer::ROUND_HALF_DOWN), + ); + } + + /** + * @dataProvider reverseTransformWithRoundingProvider + */ + public function testReverseTransformWithRounding($scale, $input, $output, $roundingMode) + { + $transformer = new NumberToLocalizedStringTransformer($scale, null, $roundingMode); + + $this->assertEquals($output, $transformer->reverseTransform($input)); + } + + public function testReverseTransformDoesNotRoundIfNoScale() + { + $transformer = new NumberToLocalizedStringTransformer(null, null, NumberToLocalizedStringTransformer::ROUND_DOWN); + + $this->assertEquals(1234.547, $transformer->reverseTransform('1234,547')); + } + + public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsNotDot() + { + // Since we test against other locales, we need the full implementation + IntlTestHelper::requireFullIntl($this, '4.8.1.1'); + + \Locale::setDefault('fr'); + $transformer = new NumberToLocalizedStringTransformer(null, true); + + // completely valid format + $this->assertEquals(1234.5, $transformer->reverseTransform('1 234,5')); + // accept dots + $this->assertEquals(1234.5, $transformer->reverseTransform('1 234.5')); + // omit group separator + $this->assertEquals(1234.5, $transformer->reverseTransform('1234,5')); + $this->assertEquals(1234.5, $transformer->reverseTransform('1234.5')); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDot() + { + // Since we test against "de_DE", we need the full implementation + IntlTestHelper::requireFullIntl($this, '4.8.1.1'); + + \Locale::setDefault('de_DE'); + + $transformer = new NumberToLocalizedStringTransformer(null, true); + + $transformer->reverseTransform('1.234.5'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGroupSep() + { + // Since we test against "de_DE", we need the full implementation + IntlTestHelper::requireFullIntl($this, '4.8.1.1'); + + \Locale::setDefault('de_DE'); + + $transformer = new NumberToLocalizedStringTransformer(null, true); + + $transformer->reverseTransform('1234.5'); + } + + public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsDotButNoGroupingUsed() + { + // Since we test against other locales, we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('fr'); + $transformer = new NumberToLocalizedStringTransformer(); + + $this->assertEquals(1234.5, $transformer->reverseTransform('1234,5')); + $this->assertEquals(1234.5, $transformer->reverseTransform('1234.5')); + } + + public function testDecimalSeparatorMayBeCommaIfGroupingSeparatorIsNotComma() + { + // Since we test against other locales, we need the full implementation + IntlTestHelper::requireFullIntl($this, '4.8.1.1'); + + \Locale::setDefault('bg'); + $transformer = new NumberToLocalizedStringTransformer(null, true); + + // completely valid format + $this->assertEquals(1234.5, $transformer->reverseTransform('1 234.5')); + // accept commas + $this->assertEquals(1234.5, $transformer->reverseTransform('1 234,5')); + // omit group separator + $this->assertEquals(1234.5, $transformer->reverseTransform('1234.5')); + $this->assertEquals(1234.5, $transformer->reverseTransform('1234,5')); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsComma() + { + IntlTestHelper::requireFullIntl($this, '4.8.1.1'); + + $transformer = new NumberToLocalizedStringTransformer(null, true); + + $transformer->reverseTransform('1,234,5'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsCommaWithNoGroupSep() + { + IntlTestHelper::requireFullIntl($this, '4.8.1.1'); + + $transformer = new NumberToLocalizedStringTransformer(null, true); + + $transformer->reverseTransform('1234,5'); + } + + public function testDecimalSeparatorMayBeCommaIfGroupingSeparatorIsCommaButNoGroupingUsed() + { + $transformer = new NumberToLocalizedStringTransformer(); + + $this->assertEquals(1234.5, $transformer->reverseTransform('1234,5')); + $this->assertEquals(1234.5, $transformer->reverseTransform('1234.5')); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testTransformExpectsNumeric() + { + $transformer = new NumberToLocalizedStringTransformer(); + + $transformer->transform('foo'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformExpectsString() + { + $transformer = new NumberToLocalizedStringTransformer(); + + $transformer->reverseTransform(1); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformExpectsValidNumber() + { + $transformer = new NumberToLocalizedStringTransformer(); + + $transformer->reverseTransform('foo'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + * + * @see https://github.com/symfony/symfony/issues/3161 + */ + public function testReverseTransformDisallowsNaN() + { + $transformer = new NumberToLocalizedStringTransformer(); + + $transformer->reverseTransform('NaN'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformDisallowsNaN2() + { + $transformer = new NumberToLocalizedStringTransformer(); + + $transformer->reverseTransform('nan'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformDisallowsInfinity() + { + $transformer = new NumberToLocalizedStringTransformer(); + + $transformer->reverseTransform('∞'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformDisallowsInfinity2() + { + $transformer = new NumberToLocalizedStringTransformer(); + + $transformer->reverseTransform('∞,123'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformDisallowsNegativeInfinity() + { + $transformer = new NumberToLocalizedStringTransformer(); + + $transformer->reverseTransform('-∞'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformDisallowsLeadingExtraCharacters() + { + $transformer = new NumberToLocalizedStringTransformer(); + + $transformer->reverseTransform('foo123'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + * @expectedExceptionMessage The number contains unrecognized characters: "foo3" + */ + public function testReverseTransformDisallowsCenteredExtraCharacters() + { + $transformer = new NumberToLocalizedStringTransformer(); + + $transformer->reverseTransform('12foo3'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + * @expectedExceptionMessage The number contains unrecognized characters: "foo8" + */ + public function testReverseTransformDisallowsCenteredExtraCharactersMultibyte() + { + // Since we test against other locales, we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('ru'); + + $transformer = new NumberToLocalizedStringTransformer(null, true); + + $transformer->reverseTransform("12\xc2\xa0345,67foo8"); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + * @expectedExceptionMessage The number contains unrecognized characters: "foo8" + */ + public function testReverseTransformIgnoresTrailingSpacesInExceptionMessage() + { + // Since we test against other locales, we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('ru'); + + $transformer = new NumberToLocalizedStringTransformer(null, true); + + $transformer->reverseTransform("12\xc2\xa0345,67foo8 \xc2\xa0\t"); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + * @expectedExceptionMessage The number contains unrecognized characters: "foo" + */ + public function testReverseTransformDisallowsTrailingExtraCharacters() + { + $transformer = new NumberToLocalizedStringTransformer(); + + $transformer->reverseTransform('123foo'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + * @expectedExceptionMessage The number contains unrecognized characters: "foo" + */ + public function testReverseTransformDisallowsTrailingExtraCharactersMultibyte() + { + // Since we test against other locales, we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('ru'); + + $transformer = new NumberToLocalizedStringTransformer(null, true); + + $transformer->reverseTransform("12\xc2\xa0345,678foo"); + } + + public function testReverseTransformBigInt() + { + $transformer = new NumberToLocalizedStringTransformer(null, true); + + $this->assertEquals(PHP_INT_MAX - 1, (int) $transformer->reverseTransform((string) (PHP_INT_MAX - 1))); + } + + public function testReverseTransformSmallInt() + { + $transformer = new NumberToLocalizedStringTransformer(null, true); + + $this->assertSame(1.0, $transformer->reverseTransform('1')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..abcc72e2315f80eef54e91d3b5d100b37ab2f001 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.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\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer; +use Symfony\Component\Intl\Util\IntlTestHelper; + +class PercentToLocalizedStringTransformerTest extends TestCase +{ + protected function setUp() + { + parent::setUp(); + + \Locale::setDefault('en'); + } + + public function testTransform() + { + $transformer = new PercentToLocalizedStringTransformer(); + + $this->assertEquals('10', $transformer->transform(0.1)); + $this->assertEquals('15', $transformer->transform(0.15)); + $this->assertEquals('12', $transformer->transform(0.1234)); + $this->assertEquals('200', $transformer->transform(2)); + } + + public function testTransformEmpty() + { + $transformer = new PercentToLocalizedStringTransformer(); + + $this->assertEquals('', $transformer->transform(null)); + } + + public function testTransformWithInteger() + { + $transformer = new PercentToLocalizedStringTransformer(null, 'integer'); + + $this->assertEquals('0', $transformer->transform(0.1)); + $this->assertEquals('1', $transformer->transform(1)); + $this->assertEquals('15', $transformer->transform(15)); + $this->assertEquals('16', $transformer->transform(15.9)); + } + + public function testTransformWithScale() + { + // Since we test against "de_AT", we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $transformer = new PercentToLocalizedStringTransformer(2); + + $this->assertEquals('12,34', $transformer->transform(0.1234)); + } + + public function testReverseTransform() + { + $transformer = new PercentToLocalizedStringTransformer(); + + $this->assertEquals(0.1, $transformer->reverseTransform('10')); + $this->assertEquals(0.15, $transformer->reverseTransform('15')); + $this->assertEquals(0.12, $transformer->reverseTransform('12')); + $this->assertEquals(2, $transformer->reverseTransform('200')); + } + + public function testReverseTransformEmpty() + { + $transformer = new PercentToLocalizedStringTransformer(); + + $this->assertNull($transformer->reverseTransform('')); + } + + public function testReverseTransformWithInteger() + { + $transformer = new PercentToLocalizedStringTransformer(null, 'integer'); + + $this->assertEquals(10, $transformer->reverseTransform('10')); + $this->assertEquals(15, $transformer->reverseTransform('15')); + $this->assertEquals(12, $transformer->reverseTransform('12')); + $this->assertEquals(200, $transformer->reverseTransform('200')); + } + + public function testReverseTransformWithScale() + { + // Since we test against "de_AT", we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $transformer = new PercentToLocalizedStringTransformer(2); + + $this->assertEquals(0.1234, $transformer->reverseTransform('12,34')); + } + + public function testTransformExpectsNumeric() + { + $transformer = new PercentToLocalizedStringTransformer(); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\TransformationFailedException'); + + $transformer->transform('foo'); + } + + public function testReverseTransformExpectsString() + { + $transformer = new PercentToLocalizedStringTransformer(); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\TransformationFailedException'); + + $transformer->reverseTransform(1); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5c1d56264ed807f3a116167cceb2024f02cd3cd5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Core\DataTransformer\ValueToDuplicatesTransformer; + +class ValueToDuplicatesTransformerTest extends TestCase +{ + private $transformer; + + protected function setUp() + { + $this->transformer = new ValueToDuplicatesTransformer(array('a', 'b', 'c')); + } + + protected function tearDown() + { + $this->transformer = null; + } + + public function testTransform() + { + $output = array( + 'a' => 'Foo', + 'b' => 'Foo', + 'c' => 'Foo', + ); + + $this->assertSame($output, $this->transformer->transform('Foo')); + } + + public function testTransformEmpty() + { + $output = array( + 'a' => null, + 'b' => null, + 'c' => null, + ); + + $this->assertSame($output, $this->transformer->transform(null)); + } + + public function testReverseTransform() + { + $input = array( + 'a' => 'Foo', + 'b' => 'Foo', + 'c' => 'Foo', + ); + + $this->assertSame('Foo', $this->transformer->reverseTransform($input)); + } + + public function testReverseTransformCompletelyEmpty() + { + $input = array( + 'a' => '', + 'b' => '', + 'c' => '', + ); + + $this->assertNull($this->transformer->reverseTransform($input)); + } + + public function testReverseTransformCompletelyNull() + { + $input = array( + 'a' => null, + 'b' => null, + 'c' => null, + ); + + $this->assertNull($this->transformer->reverseTransform($input)); + } + + public function testReverseTransformEmptyArray() + { + $input = array( + 'a' => array(), + 'b' => array(), + 'c' => array(), + ); + + $this->assertNull($this->transformer->reverseTransform($input)); + } + + public function testReverseTransformZeroString() + { + $input = array( + 'a' => '0', + 'b' => '0', + 'c' => '0', + ); + + $this->assertSame('0', $this->transformer->reverseTransform($input)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformPartiallyNull() + { + $input = array( + 'a' => 'Foo', + 'b' => 'Foo', + 'c' => null, + ); + + $this->transformer->reverseTransform($input); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformDifferences() + { + $input = array( + 'a' => 'Foo', + 'b' => 'Bar', + 'c' => 'Foo', + ); + + $this->transformer->reverseTransform($input); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformRequiresArray() + { + $this->transformer->reverseTransform('12345'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e3fd9523d96d781a04a2c5d7b8ef11b67b5dd2b3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\FormEvent; +use Symfony\Component\Form\Extension\Core\EventListener\FixUrlProtocolListener; + +class FixUrlProtocolListenerTest extends TestCase +{ + public function testFixHttpUrl() + { + $data = 'www.symfony.com'; + $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $event = new FormEvent($form, $data); + + $filter = new FixUrlProtocolListener('http'); + $filter->onSubmit($event); + + $this->assertEquals('http://www.symfony.com', $event->getData()); + } + + public function testSkipKnownUrl() + { + $data = 'http://www.symfony.com'; + $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $event = new FormEvent($form, $data); + + $filter = new FixUrlProtocolListener('http'); + $filter->onSubmit($event); + + $this->assertEquals('http://www.symfony.com', $event->getData()); + } + + public function provideUrlsWithSupportedProtocols() + { + return array( + array('ftp://www.symfony.com'), + array('chrome-extension://foo'), + array('h323://foo'), + array('iris.beep://foo'), + array('foo+bar://foo'), + ); + } + + /** + * @dataProvider provideUrlsWithSupportedProtocols + */ + public function testSkipOtherProtocol($url) + { + $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $event = new FormEvent($form, $url); + + $filter = new FixUrlProtocolListener('http'); + $filter->onSubmit($event); + + $this->assertEquals($url, $event->getData()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/Fixtures/randomhash b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/Fixtures/randomhash new file mode 100644 index 0000000000000000000000000000000000000000..b636f4b8df536b0a85e7cea1a6cf3f0bd3179b96 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/Fixtures/randomhash differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayObjectTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayObjectTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6f46c9d7fab3773ffab8fc750eef53265498f70f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayObjectTest.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\Form\Tests\Extension\Core\EventListener; + +use Symfony\Component\Form\FormBuilder; + +class MergeCollectionListenerArrayObjectTest extends MergeCollectionListenerTest +{ + protected function getData(array $data) + { + return new \ArrayObject($data); + } + + protected function getBuilder($name = 'name') + { + return new FormBuilder($name, '\ArrayObject', $this->dispatcher, $this->factory); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c0f3d59734bcb91bdd229762a2c43b58eb75cb33 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayTest.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\Form\Tests\Extension\Core\EventListener; + +use Symfony\Component\Form\FormBuilder; + +class MergeCollectionListenerArrayTest extends MergeCollectionListenerTest +{ + protected function getData(array $data) + { + return $data; + } + + protected function getBuilder($name = 'name') + { + return new FormBuilder($name, null, $this->dispatcher, $this->factory); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerCustomArrayObjectTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerCustomArrayObjectTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5eb6c7b9fdbdfc1f0ddb4ce04cca6f9e977ec74c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerCustomArrayObjectTest.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\EventListener; + +use Symfony\Component\Form\Tests\Fixtures\CustomArrayObject; +use Symfony\Component\Form\FormBuilder; + +class MergeCollectionListenerCustomArrayObjectTest extends MergeCollectionListenerTest +{ + protected function getData(array $data) + { + return new CustomArrayObject($data); + } + + protected function getBuilder($name = 'name') + { + return new FormBuilder($name, 'Symfony\Component\Form\Tests\Fixtures\CustomArrayObject', $this->dispatcher, $this->factory); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2dcbc359eab9e6eb378a9083b59b640b4442aee3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php @@ -0,0 +1,256 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\FormEvent; +use Symfony\Component\Form\Extension\Core\EventListener\MergeCollectionListener; + +abstract class MergeCollectionListenerTest extends TestCase +{ + protected $dispatcher; + protected $factory; + protected $form; + + protected function setUp() + { + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $this->form = $this->getForm('axes'); + } + + protected function tearDown() + { + $this->dispatcher = null; + $this->factory = null; + $this->form = null; + } + + abstract protected function getBuilder($name = 'name'); + + protected function getForm($name = 'name', $propertyPath = null) + { + $propertyPath = $propertyPath ?: $name; + + return $this->getBuilder($name)->setAttribute('property_path', $propertyPath)->getForm(); + } + + protected function getMockForm() + { + return $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + } + + public function getBooleanMatrix1() + { + return array( + array(true), + array(false), + ); + } + + public function getBooleanMatrix2() + { + return array( + array(true, true), + array(true, false), + array(false, true), + array(false, false), + ); + } + + abstract protected function getData(array $data); + + /** + * @dataProvider getBooleanMatrix1 + */ + public function testAddExtraEntriesIfAllowAdd($allowDelete) + { + $originalData = $this->getData(array(1 => 'second')); + $newData = $this->getData(array(0 => 'first', 1 => 'second', 2 => 'third')); + + $listener = new MergeCollectionListener(true, $allowDelete); + + $this->form->setData($originalData); + + $event = new FormEvent($this->form, $newData); + $listener->onSubmit($event); + + // The original object was modified + if (is_object($originalData)) { + $this->assertSame($originalData, $event->getData()); + } + + // The original object matches the new object + $this->assertEquals($newData, $event->getData()); + } + + /** + * @dataProvider getBooleanMatrix1 + */ + public function testAddExtraEntriesIfAllowAddDontOverwriteExistingIndices($allowDelete) + { + $originalData = $this->getData(array(1 => 'first')); + $newData = $this->getData(array(0 => 'first', 1 => 'second')); + + $listener = new MergeCollectionListener(true, $allowDelete); + + $this->form->setData($originalData); + + $event = new FormEvent($this->form, $newData); + $listener->onSubmit($event); + + // The original object was modified + if (is_object($originalData)) { + $this->assertSame($originalData, $event->getData()); + } + + // The original object matches the new object + $this->assertEquals($this->getData(array(1 => 'first', 2 => 'second')), $event->getData()); + } + + /** + * @dataProvider getBooleanMatrix1 + */ + public function testDoNothingIfNotAllowAdd($allowDelete) + { + $originalDataArray = array(1 => 'second'); + $originalData = $this->getData($originalDataArray); + $newData = $this->getData(array(0 => 'first', 1 => 'second', 2 => 'third')); + + $listener = new MergeCollectionListener(false, $allowDelete); + + $this->form->setData($originalData); + + $event = new FormEvent($this->form, $newData); + $listener->onSubmit($event); + + // We still have the original object + if (is_object($originalData)) { + $this->assertSame($originalData, $event->getData()); + } + + // Nothing was removed + $this->assertEquals($this->getData($originalDataArray), $event->getData()); + } + + /** + * @dataProvider getBooleanMatrix1 + */ + public function testRemoveMissingEntriesIfAllowDelete($allowAdd) + { + $originalData = $this->getData(array(0 => 'first', 1 => 'second', 2 => 'third')); + $newData = $this->getData(array(1 => 'second')); + + $listener = new MergeCollectionListener($allowAdd, true); + + $this->form->setData($originalData); + + $event = new FormEvent($this->form, $newData); + $listener->onSubmit($event); + + // The original object was modified + if (is_object($originalData)) { + $this->assertSame($originalData, $event->getData()); + } + + // The original object matches the new object + $this->assertEquals($newData, $event->getData()); + } + + /** + * @dataProvider getBooleanMatrix1 + */ + public function testDoNothingIfNotAllowDelete($allowAdd) + { + $originalDataArray = array(0 => 'first', 1 => 'second', 2 => 'third'); + $originalData = $this->getData($originalDataArray); + $newData = $this->getData(array(1 => 'second')); + + $listener = new MergeCollectionListener($allowAdd, false); + + $this->form->setData($originalData); + + $event = new FormEvent($this->form, $newData); + $listener->onSubmit($event); + + // We still have the original object + if (is_object($originalData)) { + $this->assertSame($originalData, $event->getData()); + } + + // Nothing was removed + $this->assertEquals($this->getData($originalDataArray), $event->getData()); + } + + /** + * @dataProvider getBooleanMatrix2 + * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException + */ + public function testRequireArrayOrTraversable($allowAdd, $allowDelete) + { + $newData = 'no array or traversable'; + $event = new FormEvent($this->form, $newData); + $listener = new MergeCollectionListener($allowAdd, $allowDelete); + $listener->onSubmit($event); + } + + public function testDealWithNullData() + { + $originalData = $this->getData(array(0 => 'first', 1 => 'second', 2 => 'third')); + $newData = null; + + $listener = new MergeCollectionListener(false, false); + + $this->form->setData($originalData); + + $event = new FormEvent($this->form, $newData); + $listener->onSubmit($event); + + $this->assertSame($originalData, $event->getData()); + } + + /** + * @dataProvider getBooleanMatrix1 + */ + public function testDealWithNullOriginalDataIfAllowAdd($allowDelete) + { + $originalData = null; + $newData = $this->getData(array(0 => 'first', 1 => 'second', 2 => 'third')); + + $listener = new MergeCollectionListener(true, $allowDelete); + + $this->form->setData($originalData); + + $event = new FormEvent($this->form, $newData); + $listener->onSubmit($event); + + $this->assertSame($newData, $event->getData()); + } + + /** + * @dataProvider getBooleanMatrix1 + */ + public function testDontDealWithNullOriginalDataIfNotAllowAdd($allowDelete) + { + $originalData = null; + $newData = $this->getData(array(0 => 'first', 1 => 'second', 2 => 'third')); + + $listener = new MergeCollectionListener(false, $allowDelete); + + $this->form->setData($originalData); + + $event = new FormEvent($this->form, $newData); + $listener->onSubmit($event); + + $this->assertNull($event->getData()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..281581bcffc1c9a19f3743865e80d4be177171a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php @@ -0,0 +1,278 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\EventListener; + +use Doctrine\Common\Collections\ArrayCollection; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener; +use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormEvent; + +class ResizeFormListenerTest extends TestCase +{ + private $dispatcher; + private $factory; + private $form; + + protected function setUp() + { + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $this->form = $this->getBuilder() + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + } + + protected function tearDown() + { + $this->dispatcher = null; + $this->factory = null; + $this->form = null; + } + + protected function getBuilder($name = 'name') + { + return new FormBuilder($name, null, $this->dispatcher, $this->factory); + } + + protected function getForm($name = 'name') + { + return $this->getBuilder($name)->getForm(); + } + + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ + private function getDataMapper() + { + return $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); + } + + protected function getMockForm() + { + return $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + } + + public function testPreSetDataResizesForm() + { + $this->form->add($this->getForm('0')); + $this->form->add($this->getForm('1')); + + $this->factory->expects($this->at(0)) + ->method('createNamed') + ->with(1, 'text', null, array('property_path' => '[1]', 'attr' => array('maxlength' => 10), 'auto_initialize' => false)) + ->will($this->returnValue($this->getForm('1'))); + $this->factory->expects($this->at(1)) + ->method('createNamed') + ->with(2, 'text', null, array('property_path' => '[2]', 'attr' => array('maxlength' => 10), 'auto_initialize' => false)) + ->will($this->returnValue($this->getForm('2'))); + + $data = array(1 => 'string', 2 => 'string'); + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array('attr' => array('maxlength' => 10)), false, false); + $listener->preSetData($event); + + $this->assertFalse($this->form->has('0')); + $this->assertTrue($this->form->has('1')); + $this->assertTrue($this->form->has('2')); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException + */ + public function testPreSetDataRequiresArrayOrTraversable() + { + $data = 'no array or traversable'; + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, false); + $listener->preSetData($event); + } + + public function testPreSetDataDealsWithNullData() + { + $this->factory->expects($this->never())->method('createNamed'); + + $data = null; + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, false); + $listener->preSetData($event); + } + + public function testPreSubmitResizesUpIfAllowAdd() + { + $this->form->add($this->getForm('0')); + + $this->factory->expects($this->once()) + ->method('createNamed') + ->with(1, 'text', null, array('property_path' => '[1]', 'attr' => array('maxlength' => 10), 'auto_initialize' => false)) + ->will($this->returnValue($this->getForm('1'))); + + $data = array(0 => 'string', 1 => 'string'); + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array('attr' => array('maxlength' => 10)), true, false); + $listener->preSubmit($event); + + $this->assertTrue($this->form->has('0')); + $this->assertTrue($this->form->has('1')); + } + + public function testPreSubmitResizesDownIfAllowDelete() + { + $this->form->add($this->getForm('0')); + $this->form->add($this->getForm('1')); + + $data = array(0 => 'string'); + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, true); + $listener->preSubmit($event); + + $this->assertTrue($this->form->has('0')); + $this->assertFalse($this->form->has('1')); + } + + // fix for https://github.com/symfony/symfony/pull/493 + public function testPreSubmitRemovesZeroKeys() + { + $this->form->add($this->getForm('0')); + + $data = array(); + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, true); + $listener->preSubmit($event); + + $this->assertFalse($this->form->has('0')); + } + + public function testPreSubmitDoesNothingIfNotAllowAddNorAllowDelete() + { + $this->form->add($this->getForm('0')); + $this->form->add($this->getForm('1')); + + $data = array(0 => 'string', 2 => 'string'); + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, false); + $listener->preSubmit($event); + + $this->assertTrue($this->form->has('0')); + $this->assertTrue($this->form->has('1')); + $this->assertFalse($this->form->has('2')); + } + + public function testPreSubmitDealsWithNoArrayOrTraversable() + { + $data = 'no array or traversable'; + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, false); + $listener->preSubmit($event); + + $this->assertFalse($this->form->has('1')); + } + + public function testPreSubmitDealsWithNullData() + { + $this->form->add($this->getForm('1')); + + $data = null; + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, true); + $listener->preSubmit($event); + + $this->assertFalse($this->form->has('1')); + } + + // fixes https://github.com/symfony/symfony/pull/40 + public function testPreSubmitDealsWithEmptyData() + { + $this->form->add($this->getForm('1')); + + $data = ''; + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, true); + $listener->preSubmit($event); + + $this->assertFalse($this->form->has('1')); + } + + public function testOnSubmitNormDataRemovesEntriesMissingInTheFormIfAllowDelete() + { + $this->form->add($this->getForm('1')); + + $data = array(0 => 'first', 1 => 'second', 2 => 'third'); + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, true); + $listener->onSubmit($event); + + $this->assertEquals(array(1 => 'second'), $event->getData()); + } + + public function testOnSubmitNormDataDoesNothingIfNotAllowDelete() + { + $this->form->add($this->getForm('1')); + + $data = array(0 => 'first', 1 => 'second', 2 => 'third'); + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, false); + $listener->onSubmit($event); + + $this->assertEquals($data, $event->getData()); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException + */ + public function testOnSubmitNormDataRequiresArrayOrTraversable() + { + $data = 'no array or traversable'; + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, false); + $listener->onSubmit($event); + } + + public function testOnSubmitNormDataDealsWithNullData() + { + $this->form->add($this->getForm('1')); + + $data = null; + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, true); + $listener->onSubmit($event); + + $this->assertEquals(array(), $event->getData()); + } + + public function testOnSubmitDealsWithObjectBackedIteratorAggregate() + { + $this->form->add($this->getForm('1')); + + $data = new \ArrayObject(array(0 => 'first', 1 => 'second', 2 => 'third')); + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, true); + $listener->onSubmit($event); + + $this->assertArrayNotHasKey(0, $event->getData()); + $this->assertArrayNotHasKey(2, $event->getData()); + } + + public function testOnSubmitDealsWithArrayBackedIteratorAggregate() + { + $this->form->add($this->getForm('1')); + + $data = new ArrayCollection(array(0 => 'first', 1 => 'second', 2 => 'third')); + $event = new FormEvent($this->form, $data); + $listener = new ResizeFormListener('text', array(), false, true); + $listener->onSubmit($event); + + $this->assertArrayNotHasKey(0, $event->getData()); + $this->assertArrayNotHasKey(2, $event->getData()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3cfa0607f75a680e1dae030f02f4bee716e19a94 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.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\Component\Form\Tests\Extension\Core\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\FormEvent; +use Symfony\Component\Form\Extension\Core\EventListener\TrimListener; + +class TrimListenerTest extends TestCase +{ + public function testTrim() + { + $data = ' Foo! '; + $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $event = new FormEvent($form, $data); + + $filter = new TrimListener(); + $filter->preSubmit($event); + + $this->assertEquals('Foo!', $event->getData()); + } + + public function testTrimSkipNonStrings() + { + $data = 1234; + $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $event = new FormEvent($form, $data); + + $filter = new TrimListener(); + $filter->preSubmit($event); + + $this->assertSame(1234, $event->getData()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..facab9730908b5b3a7a37f6fc0f925ac863300be --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php @@ -0,0 +1,152 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\Test\TypeTestCase; + +/** + * @author Bernhard Schussek + */ +abstract class BaseTypeTest extends TypeTestCase +{ + const TESTED_TYPE = ''; + + public function testPassDisabledAsOption() + { + $form = $this->factory->create($this->getTestedType(), null, array('disabled' => true)); + + $this->assertTrue($form->isDisabled()); + } + + public function testPassIdAndNameToView() + { + $view = $this->factory->createNamed('name', $this->getTestedType()) + ->createView(); + + $this->assertEquals('name', $view->vars['id']); + $this->assertEquals('name', $view->vars['name']); + $this->assertEquals('name', $view->vars['full_name']); + } + + public function testStripLeadingUnderscoresAndDigitsFromId() + { + $view = $this->factory->createNamed('_09name', $this->getTestedType()) + ->createView(); + + $this->assertEquals('name', $view->vars['id']); + $this->assertEquals('_09name', $view->vars['name']); + $this->assertEquals('_09name', $view->vars['full_name']); + } + + public function testPassIdAndNameToViewWithParent() + { + $view = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE) + ->add('child', $this->getTestedType()) + ->getForm() + ->createView(); + + $this->assertEquals('parent_child', $view['child']->vars['id']); + $this->assertEquals('child', $view['child']->vars['name']); + $this->assertEquals('parent[child]', $view['child']->vars['full_name']); + } + + public function testPassIdAndNameToViewWithGrandParent() + { + $builder = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE) + ->add('child', FormTypeTest::TESTED_TYPE); + $builder->get('child')->add('grand_child', $this->getTestedType()); + $view = $builder->getForm()->createView(); + + $this->assertEquals('parent_child_grand_child', $view['child']['grand_child']->vars['id']); + $this->assertEquals('grand_child', $view['child']['grand_child']->vars['name']); + $this->assertEquals('parent[child][grand_child]', $view['child']['grand_child']->vars['full_name']); + } + + public function testPassTranslationDomainToView() + { + $view = $this->factory->create($this->getTestedType(), null, array( + 'translation_domain' => 'domain', + )) + ->createView(); + + $this->assertSame('domain', $view->vars['translation_domain']); + } + + public function testInheritTranslationDomainFromParent() + { + $view = $this->factory + ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array( + 'translation_domain' => 'domain', + )) + ->add('child', $this->getTestedType()) + ->getForm() + ->createView(); + + $this->assertEquals('domain', $view['child']->vars['translation_domain']); + } + + public function testPreferOwnTranslationDomain() + { + $view = $this->factory + ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array( + 'translation_domain' => 'parent_domain', + )) + ->add('child', $this->getTestedType(), array( + 'translation_domain' => 'domain', + )) + ->getForm() + ->createView(); + + $this->assertEquals('domain', $view['child']->vars['translation_domain']); + } + + public function testDefaultTranslationDomain() + { + $view = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE) + ->add('child', $this->getTestedType()) + ->getForm() + ->createView(); + + $this->assertNull($view['child']->vars['translation_domain']); + } + + public function testPassLabelToView() + { + $view = $this->factory->createNamed('__test___field', $this->getTestedType(), null, array('label' => 'My label')) + ->createView(); + + $this->assertSame('My label', $view->vars['label']); + } + + public function testPassMultipartFalseToView() + { + $view = $this->factory->create($this->getTestedType()) + ->createView(); + + $this->assertFalse($view->vars['multipart']); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + $form = $this->factory->create($this->getTestedType()); + $form->submit(null); + + $this->assertSame($expected, $form->getData()); + $this->assertSame($norm, $form->getNormData()); + $this->assertSame($view, $form->getViewData()); + } + + protected function getTestedType() + { + return static::TESTED_TYPE; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BirthdayTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BirthdayTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7f9130b90ee41f73115dbe9ed022e1b0cd969163 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/BirthdayTypeTest.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\Form\Tests\Extension\Core\Type; + +/** + * @author Stepan Anchugov + */ +class BirthdayTypeTest extends DateTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\BirthdayType'; + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testSetInvalidYearsOption() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'years' => 'bad value', + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ButtonTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ButtonTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4e2b4f49b8dea09d5286432abce27e53ee06f4b6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ButtonTypeTest.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +/** + * @author Bernhard Schussek + */ +class ButtonTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\ButtonType'; + + public function testCreateButtonInstances() + { + $this->assertInstanceOf('Symfony\Component\Form\Button', $this->factory->create(static::TESTED_TYPE)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a9aeb9c270ec779f78c54716dec3eaa7f5046123 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php @@ -0,0 +1,180 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\CallbackTransformer; + +class CheckboxTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CheckboxType'; + + public function testDataIsFalseByDefault() + { + $form = $this->factory->create(static::TESTED_TYPE); + + $this->assertFalse($form->getData()); + $this->assertFalse($form->getNormData()); + $this->assertNull($form->getViewData()); + } + + public function testPassValueToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array('value' => 'foobar')) + ->createView(); + + $this->assertEquals('foobar', $view->vars['value']); + } + + public function testCheckedIfDataTrue() + { + $view = $this->factory->create(static::TESTED_TYPE) + ->setData(true) + ->createView(); + + $this->assertTrue($view->vars['checked']); + } + + public function testCheckedIfDataTrueWithEmptyValue() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array('value' => '')) + ->setData(true) + ->createView(); + + $this->assertTrue($view->vars['checked']); + } + + public function testNotCheckedIfDataFalse() + { + $view = $this->factory->create(static::TESTED_TYPE) + ->setData(false) + ->createView(); + + $this->assertFalse($view->vars['checked']); + } + + public function testSubmitWithValueChecked() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'value' => 'foobar', + )); + $form->submit('foobar'); + + $this->assertTrue($form->getData()); + $this->assertEquals('foobar', $form->getViewData()); + } + + public function testSubmitWithRandomValueChecked() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'value' => 'foobar', + )); + $form->submit('krixikraxi'); + + $this->assertTrue($form->getData()); + $this->assertEquals('foobar', $form->getViewData()); + } + + public function testSubmitWithValueUnchecked() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'value' => 'foobar', + )); + $form->submit(null); + + $this->assertFalse($form->getData()); + $this->assertNull($form->getViewData()); + } + + public function testSubmitWithEmptyValueChecked() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'value' => '', + )); + $form->submit(''); + + $this->assertTrue($form->getData()); + $this->assertSame('', $form->getViewData()); + } + + public function testSubmitWithEmptyValueUnchecked() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'value' => '', + )); + $form->submit(null); + + $this->assertFalse($form->getData()); + $this->assertNull($form->getViewData()); + } + + public function testSubmitWithEmptyValueAndFalseUnchecked() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'value' => '', + )); + $form->submit(false); + + $this->assertFalse($form->getData()); + $this->assertNull($form->getViewData()); + } + + public function testSubmitWithEmptyValueAndTrueChecked() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'value' => '', + )); + $form->submit(true); + + $this->assertTrue($form->getData()); + $this->assertSame('', $form->getViewData()); + } + + /** + * @dataProvider provideCustomModelTransformerData + */ + public function testCustomModelTransformer($data, $checked) + { + // present a binary status field as a checkbox + $transformer = new CallbackTransformer( + function ($value) { + return 'checked' == $value; + }, + function ($value) { + return $value ? 'checked' : 'unchecked'; + } + ); + + $form = $this->factory->createBuilder(static::TESTED_TYPE) + ->addModelTransformer($transformer) + ->getForm(); + + $form->setData($data); + $view = $form->createView(); + + $this->assertSame($data, $form->getData()); + $this->assertSame($checked, $form->getNormData()); + $this->assertEquals($checked, $view->vars['checked']); + } + + public function provideCustomModelTransformerData() + { + return array( + array('checked', true), + array('unchecked', false), + ); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull(false, false, null); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypePerformanceTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypePerformanceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3e0ea22f9dbfa43f578020a0d4b6b09830574df1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypePerformanceTest.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\Test\FormPerformanceTestCase; + +/** + * @author Bernhard Schussek + */ +class ChoiceTypePerformanceTest extends FormPerformanceTestCase +{ + /** + * This test case is realistic in collection forms where each + * row contains the same choice field. + * + * @group benchmark + */ + public function testSameChoiceFieldCreatedMultipleTimes() + { + $this->setMaxRunningTime(1); + $choices = range(1, 300); + + for ($i = 0; $i < 100; ++$i) { + $this->factory->create('Symfony\Component\Form\Extension\Core\Type\ChoiceType', mt_rand(1, 400), array( + 'choices' => $choices, + )); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..93f370341d3195c54f907ae444b6acb3271eddf4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php @@ -0,0 +1,1772 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView; +use Symfony\Component\Form\ChoiceList\View\ChoiceView; + +class ChoiceTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\ChoiceType'; + + private $choices = array( + 'Bernhard' => 'a', + 'Fabien' => 'b', + 'Kris' => 'c', + 'Jon' => 'd', + 'Roman' => 'e', + ); + + private $scalarChoices = array( + 'Yes' => true, + 'No' => false, + 'n/a' => '', + ); + + private $booleanChoicesWithNull = array( + 'Yes' => true, + 'No' => false, + 'n/a' => null, + ); + + private $numericChoicesFlipped = array( + 0 => 'Bernhard', + 1 => 'Fabien', + 2 => 'Kris', + 3 => 'Jon', + 4 => 'Roman', + ); + + private $objectChoices; + + protected $groupedChoices = array( + 'Symfony' => array( + 'Bernhard' => 'a', + 'Fabien' => 'b', + 'Kris' => 'c', + ), + 'Doctrine' => array( + 'Jon' => 'd', + 'Roman' => 'e', + ), + ); + + protected function setUp() + { + parent::setUp(); + + $this->objectChoices = array( + (object) array('id' => 1, 'name' => 'Bernhard'), + (object) array('id' => 2, 'name' => 'Fabien'), + (object) array('id' => 3, 'name' => 'Kris'), + (object) array('id' => 4, 'name' => 'Jon'), + (object) array('id' => 5, 'name' => 'Roman'), + ); + } + + protected function tearDown() + { + parent::tearDown(); + + $this->objectChoices = null; + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testChoicesOptionExpectsArrayOrTraversable() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => new \stdClass(), + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testChoiceLoaderOptionExpectsChoiceLoaderInterface() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'choice_loader' => new \stdClass(), + )); + } + + public function testChoiceListAndChoicesCanBeEmpty() + { + $this->factory->create(static::TESTED_TYPE); + } + + public function testExpandedChoicesOptionsTurnIntoChildren() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'expanded' => true, + 'choices' => $this->choices, + )); + + $this->assertCount(count($this->choices), $form, 'Each choice should become a new field'); + } + + public function testChoiceListWithScalarValues() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => $this->scalarChoices, + ))->createView(); + + $this->assertSame('1', $view->vars['choices'][0]->value); + $this->assertSame('0', $view->vars['choices'][1]->value); + $this->assertSame('', $view->vars['choices'][2]->value); + $this->assertFalse($view->vars['is_selected']($view->vars['choices'][0], $view->vars['value']), 'True value should not be pre selected'); + $this->assertFalse($view->vars['is_selected']($view->vars['choices'][1], $view->vars['value']), 'False value should not be pre selected'); + $this->assertFalse($view->vars['is_selected']($view->vars['choices'][2], $view->vars['value']), 'Empty value should not be pre selected'); + } + + public function testChoiceListWithScalarValuesAndFalseAsPreSetData() + { + $view = $this->factory->create(static::TESTED_TYPE, false, array( + 'choices' => $this->scalarChoices, + ))->createView(); + + $this->assertTrue($view->vars['is_selected']($view->vars['choices'][1]->value, $view->vars['value']), 'False value should be pre selected'); + } + + public function testExpandedChoiceListWithScalarValues() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => $this->scalarChoices, + 'expanded' => true, + ))->createView(); + + $this->assertFalse($view->children[0]->vars['checked'], 'True value should not be pre selected'); + $this->assertFalse($view->children[1]->vars['checked'], 'False value should not be pre selected'); + $this->assertTrue($view->children[2]->vars['checked'], 'Empty value should be pre selected'); + } + + public function testExpandedChoiceListWithBooleanAndNullValues() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => $this->booleanChoicesWithNull, + 'expanded' => true, + ))->createView(); + + $this->assertFalse($view->children[0]->vars['checked'], 'True value should not be pre selected'); + $this->assertFalse($view->children[1]->vars['checked'], 'False value should not be pre selected'); + $this->assertTrue($view->children[2]->vars['checked'], 'Empty value should be pre selected'); + } + + public function testExpandedChoiceListWithScalarValuesAndFalseAsPreSetData() + { + $view = $this->factory->create(static::TESTED_TYPE, false, array( + 'choices' => $this->scalarChoices, + 'expanded' => true, + ))->createView(); + + $this->assertSame('1', $view->vars['choices'][0]->value); + $this->assertSame('0', $view->vars['choices'][1]->value); + $this->assertTrue($view->children[1]->vars['checked'], 'False value should be pre selected'); + $this->assertFalse($view->children[2]->vars['checked'], 'Empty value should not be pre selected'); + } + + public function testExpandedChoiceListWithBooleanAndNullValuesAndFalseAsPreSetData() + { + $view = $this->factory->create(static::TESTED_TYPE, false, array( + 'choices' => $this->booleanChoicesWithNull, + 'expanded' => true, + ))->createView(); + + $this->assertFalse($view->children[0]->vars['checked'], 'True value should not be pre selected'); + $this->assertTrue($view->children[1]->vars['checked'], 'False value should be pre selected'); + $this->assertFalse($view->children[2]->vars['checked'], 'Null value should not be pre selected'); + } + + public function testPlaceholderPresentOnNonRequiredExpandedSingleChoice() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => $this->choices, + )); + + $this->assertTrue(isset($form['placeholder'])); + $this->assertCount(count($this->choices) + 1, $form, 'Each choice should become a new field'); + } + + public function testPlaceholderNotPresentIfRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => true, + 'choices' => $this->choices, + )); + + $this->assertFalse(isset($form['placeholder'])); + $this->assertCount(count($this->choices), $form, 'Each choice should become a new field'); + } + + public function testPlaceholderNotPresentIfMultiple() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'required' => false, + 'choices' => $this->choices, + )); + + $this->assertFalse(isset($form['placeholder'])); + $this->assertCount(count($this->choices), $form, 'Each choice should become a new field'); + } + + public function testPlaceholderNotPresentIfEmptyChoice() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => array( + 'Empty' => '', + 'Not empty' => 1, + ), + )); + + $this->assertFalse(isset($form['placeholder'])); + $this->assertCount(2, $form, 'Each choice should become a new field'); + } + + public function testPlaceholderWithBooleanChoices() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'required' => false, + 'choices' => array( + 'Yes' => true, + 'No' => false, + ), + 'placeholder' => 'Select an option', + )) + ->createView(); + + $this->assertSame('', $view->vars['value'], 'Value should be empty'); + $this->assertSame('1', $view->vars['choices'][0]->value); + $this->assertSame('0', $view->vars['choices'][1]->value, 'Choice "false" should have "0" as value'); + $this->assertFalse($view->vars['is_selected']($view->vars['choices'][1]->value, $view->vars['value']), 'Choice "false" should not be selected'); + } + + public function testPlaceholderWithBooleanChoicesWithFalseAsPreSetData() + { + $view = $this->factory->create(static::TESTED_TYPE, false, array( + 'multiple' => false, + 'expanded' => false, + 'required' => false, + 'choices' => array( + 'Yes' => true, + 'No' => false, + ), + 'placeholder' => 'Select an option', + )) + ->createView(); + + $this->assertSame('0', $view->vars['value'], 'Value should be "0"'); + $this->assertSame('1', $view->vars['choices'][0]->value); + $this->assertSame('0', $view->vars['choices'][1]->value, 'Choice "false" should have "0" as value'); + $this->assertTrue($view->vars['is_selected']($view->vars['choices'][1]->value, $view->vars['value']), 'Choice "false" should be selected'); + } + + public function testPlaceholderWithExpandedBooleanChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => array( + 'Yes' => true, + 'No' => false, + ), + 'placeholder' => 'Select an option', + )); + + $this->assertTrue(isset($form['placeholder']), 'Placeholder should be set'); + $this->assertCount(3, $form, 'Each choice should become a new field, placeholder included'); + + $view = $form->createView(); + + $this->assertSame('', $view->vars['value'], 'Value should be an empty string'); + $this->assertSame('1', $view->vars['choices'][0]->value); + $this->assertSame('0', $view->vars['choices'][1]->value, 'Choice "false" should have "0" as value'); + $this->assertFalse($view->children[1]->vars['checked'], 'Choice "false" should not be selected'); + } + + public function testPlaceholderWithExpandedBooleanChoicesAndWithFalseAsPreSetData() + { + $form = $this->factory->create(static::TESTED_TYPE, false, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => array( + 'Yes' => true, + 'No' => false, + ), + 'placeholder' => 'Select an option', + )); + + $this->assertTrue(isset($form['placeholder']), 'Placeholder should be set'); + $this->assertCount(3, $form, 'Each choice should become a new field, placeholder included'); + + $view = $form->createView(); + + $this->assertSame('0', $view->vars['value'], 'Value should be "0"'); + $this->assertSame('1', $view->vars['choices'][0]->value); + $this->assertSame('0', $view->vars['choices'][1]->value, 'Choice "false" should have "0" as value'); + $this->assertTrue($view->children[1]->vars['checked'], 'Choice "false" should be selected'); + } + + public function testExpandedChoicesOptionsAreFlattened() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'expanded' => true, + 'choices' => $this->groupedChoices, + )); + + $flattened = array(); + foreach ($this->groupedChoices as $choices) { + $flattened = array_merge($flattened, array_keys($choices)); + } + + $this->assertCount($form->count(), $flattened, 'Each nested choice should become a new field, not the groups'); + + foreach ($flattened as $value => $choice) { + $this->assertTrue($form->has($value), 'Flattened choice is named after it\'s value'); + } + } + + public function testExpandedChoicesOptionsAreFlattenedObjectChoices() + { + $obj1 = (object) array('id' => 1, 'name' => 'Bernhard'); + $obj2 = (object) array('id' => 2, 'name' => 'Fabien'); + $obj3 = (object) array('id' => 3, 'name' => 'Kris'); + $obj4 = (object) array('id' => 4, 'name' => 'Jon'); + $obj5 = (object) array('id' => 5, 'name' => 'Roman'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'expanded' => true, + 'choices' => array( + 'Symfony' => array($obj1, $obj2, $obj3), + 'Doctrine' => array($obj4, $obj5), + ), + 'choice_name' => 'id', + )); + + $this->assertSame(5, $form->count(), 'Each nested choice should become a new field, not the groups'); + $this->assertTrue($form->has(1)); + $this->assertTrue($form->has(2)); + $this->assertTrue($form->has(3)); + $this->assertTrue($form->has(4)); + $this->assertTrue($form->has(5)); + } + + public function testExpandedCheckboxesAreNeverRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'required' => true, + 'choices' => $this->choices, + )); + + foreach ($form as $child) { + $this->assertFalse($child->isRequired()); + } + } + + public function testExpandedRadiosAreRequiredIfChoiceChildIsRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => true, + 'choices' => $this->choices, + )); + + foreach ($form as $child) { + $this->assertTrue($child->isRequired()); + } + } + + public function testExpandedRadiosAreNotRequiredIfChoiceChildIsNotRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => $this->choices, + )); + + foreach ($form as $child) { + $this->assertFalse($child->isRequired()); + } + } + + public function testSubmitSingleNonExpanded() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'choices' => $this->choices, + )); + + $form->submit('b'); + + $this->assertEquals('b', $form->getData()); + $this->assertEquals('b', $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleNonExpandedInvalidChoice() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'choices' => $this->choices, + )); + + $form->submit('foobar'); + + $this->assertNull($form->getData()); + $this->assertEquals('foobar', $form->getViewData()); + $this->assertFalse($form->isSynchronized()); + } + + public function testSubmitSingleNonExpandedNull() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'choices' => $this->choices, + )); + + $form->submit(null); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + // In edge cases (for example, when choices are loaded dynamically by a + // loader), the choices may be empty. Make sure to behave the same as when + // choices are available. + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'choices' => array(), + )); + + $form->submit(null); + + $this->assertNull($form->getData()); + $this->assertNull($form->getNormData()); + $this->assertSame('', $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleNonExpandedEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'choices' => $this->choices, + )); + + $form->submit(''); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleNonExpandedEmptyExplicitEmptyChoice() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'choices' => array( + 'Empty' => 'EMPTY_CHOICE', + ), + 'choice_value' => function () { + return ''; + }, + )); + + $form->submit(''); + + $this->assertSame('EMPTY_CHOICE', $form->getData()); + $this->assertSame('', $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + // In edge cases (for example, when choices are loaded dynamically by a + // loader), the choices may be empty. Make sure to behave the same as when + // choices are available. + public function testSubmitSingleNonExpandedEmptyNoChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'choices' => array(), + )); + + $form->submit(''); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleNonExpandedFalse() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'choices' => $this->choices, + )); + + $form->submit(false); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + // In edge cases (for example, when choices are loaded dynamically by a + // loader), the choices may be empty. Make sure to behave the same as when + // choices are available. + public function testSubmitSingleNonExpandedFalseNoChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'choices' => array(), + )); + + $form->submit(false); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleNonExpandedObjectChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'choices' => $this->objectChoices, + 'choice_label' => 'name', + 'choice_value' => 'id', + )); + + // "id" value of the second entry + $form->submit('2'); + + $this->assertEquals($this->objectChoices[1], $form->getData()); + $this->assertEquals('2', $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleChoiceWithEmptyData() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => false, + 'choices' => array('test'), + 'empty_data' => 'test', + )); + + $form->submit(null); + + $this->assertSame('test', $form->getData()); + } + + public function testSubmitMultipleChoiceWithEmptyData() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'choices' => array('test'), + 'empty_data' => array('test'), + )); + + $form->submit(null); + + $this->assertSame(array('test'), $form->getData()); + } + + public function testSubmitSingleChoiceExpandedWithEmptyData() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'choices' => array('test'), + 'empty_data' => 'test', + )); + + $form->submit(null); + + $this->assertSame('test', $form->getData()); + } + + public function testSubmitMultipleChoiceExpandedWithEmptyData() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'choices' => array('test'), + 'empty_data' => array('test'), + )); + + $form->submit(null); + + $this->assertSame(array('test'), $form->getData()); + } + + public function testSubmitMultipleNonExpanded() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'choices' => $this->choices, + )); + + $form->submit(array('a', 'b')); + + $this->assertEquals(array('a', 'b'), $form->getData()); + $this->assertEquals(array('a', 'b'), $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitMultipleNonExpandedEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'choices' => $this->choices, + )); + + $form->submit(array()); + + $this->assertSame(array(), $form->getData()); + $this->assertSame(array(), $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + // In edge cases (for example, when choices are loaded dynamically by a + // loader), the choices may be empty. Make sure to behave the same as when + // choices are available. + public function testSubmitMultipleNonExpandedEmptyNoChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'choices' => array(), + )); + + $form->submit(array()); + + $this->assertSame(array(), $form->getData()); + $this->assertSame(array(), $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitMultipleNonExpandedInvalidScalarChoice() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'choices' => $this->choices, + )); + + $form->submit('foobar'); + + $this->assertNull($form->getData()); + $this->assertEquals('foobar', $form->getViewData()); + $this->assertFalse($form->isSynchronized()); + } + + public function testSubmitMultipleNonExpandedInvalidArrayChoice() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'choices' => $this->choices, + )); + + $form->submit(array('a', 'foobar')); + + $this->assertNull($form->getData()); + $this->assertEquals(array('a', 'foobar'), $form->getViewData()); + $this->assertFalse($form->isSynchronized()); + } + + public function testSubmitMultipleNonExpandedObjectChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'choices' => $this->objectChoices, + 'choice_label' => 'name', + 'choice_value' => 'id', + )); + + $form->submit(array('2', '3')); + + $this->assertEquals(array($this->objectChoices[1], $this->objectChoices[2]), $form->getData()); + $this->assertEquals(array('2', '3'), $form->getViewData()); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleExpandedRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => true, + 'choices' => $this->choices, + )); + + $form->submit('b'); + + $this->assertSame('b', $form->getData()); + $this->assertSame('b', $form->getViewData()); + $this->assertEmpty($form->getExtraData()); + $this->assertTrue($form->isSynchronized()); + + $this->assertFalse($form[0]->getData()); + $this->assertTrue($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertNull($form[0]->getViewData()); + $this->assertSame('b', $form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + public function testSubmitSingleExpandedRequiredInvalidChoice() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => true, + 'choices' => $this->choices, + )); + + $form->submit('foobar'); + + $this->assertNull($form->getData()); + $this->assertSame('foobar', $form->getViewData()); + $this->assertEmpty($form->getExtraData()); + $this->assertFalse($form->isSynchronized()); + + $this->assertFalse($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertNull($form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + public function testSubmitSingleExpandedNonRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => $this->choices, + )); + + $form->submit('b'); + + $this->assertSame('b', $form->getData()); + $this->assertSame('b', $form->getViewData()); + $this->assertEmpty($form->getExtraData()); + $this->assertTrue($form->isSynchronized()); + + $this->assertFalse($form['placeholder']->getData()); + $this->assertFalse($form[0]->getData()); + $this->assertTrue($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertNull($form['placeholder']->getViewData()); + $this->assertNull($form[0]->getViewData()); + $this->assertSame('b', $form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + public function testSubmitSingleExpandedNonRequiredInvalidChoice() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => $this->choices, + )); + + $form->submit('foobar'); + + $this->assertNull($form->getData()); + $this->assertSame('foobar', $form->getViewData()); + $this->assertEmpty($form->getExtraData()); + $this->assertFalse($form->isSynchronized()); + + $this->assertFalse($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertNull($form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + public function testSubmitSingleExpandedRequiredNull() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => true, + 'choices' => $this->choices, + )); + + $form->submit(null); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData(), 'View data should always be a string'); + $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertTrue($form->isSynchronized()); + + $this->assertFalse($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertNull($form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + // In edge cases (for example, when choices are loaded dynamically by a + // loader), the choices may be empty. Make sure to behave the same as when + // choices are available. + public function testSubmitSingleExpandedRequiredNullNoChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => true, + 'choices' => array(), + )); + + $form->submit(null); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData(), 'View data should always be a string'); + $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleExpandedRequiredEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => true, + 'choices' => $this->choices, + )); + + $form->submit(''); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData(), 'View data should always be a string'); + $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertTrue($form->isSynchronized()); + + $this->assertFalse($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertNull($form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + // In edge cases (for example, when choices are loaded dynamically by a + // loader), the choices may be empty. Make sure to behave the same as when + // choices are available. + public function testSubmitSingleExpandedRequiredEmptyNoChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => true, + 'choices' => array(), + )); + + $form->submit(''); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData(), 'View data should always be a string'); + $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleExpandedRequiredFalse() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => true, + 'choices' => $this->choices, + )); + + $form->submit(false); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData(), 'View data should always be a string'); + $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertTrue($form->isSynchronized()); + + $this->assertFalse($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertNull($form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + // In edge cases (for example, when choices are loaded dynamically by a + // loader), the choices may be empty. Make sure to behave the same as when + // choices are available. + public function testSubmitSingleExpandedRequiredFalseNoChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => true, + 'choices' => array(), + )); + + $form->submit(false); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData(), 'View data should always be a string'); + $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleExpandedNonRequiredNull() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => $this->choices, + )); + + $form->submit(null); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData(), 'View data should always be a string'); + $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertTrue($form->isSynchronized()); + + $this->assertTrue($form['placeholder']->getData()); + $this->assertFalse($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertSame('', $form['placeholder']->getViewData()); + $this->assertNull($form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + // In edge cases (for example, when choices are loaded dynamically by a + // loader), the choices may be empty. Make sure to behave the same as when + // choices are available. + public function testSubmitSingleExpandedNonRequiredNullNoChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => array(), + )); + + $form->submit(null); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData(), 'View data should always be a string'); + $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleExpandedNonRequiredEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => $this->choices, + )); + + $form->submit(''); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData(), 'View data should always be a string'); + $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertTrue($form->isSynchronized()); + + $this->assertTrue($form['placeholder']->getData()); + $this->assertFalse($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertSame('', $form['placeholder']->getViewData()); + $this->assertNull($form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + // In edge cases (for example, when choices are loaded dynamically by a + // loader), the choices may be empty. Make sure to behave the same as when + // choices are available. + public function testSubmitSingleExpandedNonRequiredEmptyNoChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => array(), + )); + + $form->submit(''); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData(), 'View data should always be a string'); + $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleExpandedNonRequiredFalse() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => $this->choices, + )); + + $form->submit(false); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData(), 'View data should always be a string'); + $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertTrue($form->isSynchronized()); + + $this->assertTrue($form['placeholder']->getData()); + $this->assertFalse($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertSame('', $form['placeholder']->getViewData()); + $this->assertNull($form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + // In edge cases (for example, when choices are loaded dynamically by a + // loader), the choices may be empty. Make sure to behave the same as when + // choices are available. + public function testSubmitSingleExpandedNonRequiredFalseNoChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'required' => false, + 'choices' => array(), + )); + + $form->submit(false); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData(), 'View data should always be a string'); + $this->assertSame(array(), $form->getExtraData(), 'ChoiceType is compound when expanded, extra data should always be an array'); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitSingleExpandedWithEmptyChild() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'choices' => array( + 'Empty' => '', + 'Not empty' => 1, + ), + )); + + $form->submit(''); + + $this->assertSame('', $form->getData()); + $this->assertTrue($form->isSynchronized()); + + $this->assertTrue($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertSame('', $form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + } + + public function testSubmitSingleExpandedObjectChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'expanded' => true, + 'choices' => $this->objectChoices, + 'choice_label' => 'name', + 'choice_value' => 'id', + )); + + $form->submit('2'); + + $this->assertSame($this->objectChoices[1], $form->getData()); + $this->assertTrue($form->isSynchronized()); + + $this->assertFalse($form[0]->getData()); + $this->assertTrue($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertNull($form[0]->getViewData()); + $this->assertSame('2', $form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + public function testSubmitMultipleExpanded() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'choices' => $this->choices, + )); + + $form->submit(array('a', 'c')); + + $this->assertSame(array('a', 'c'), $form->getData()); + $this->assertSame(array('a', 'c'), $form->getViewData()); + $this->assertEmpty($form->getExtraData()); + $this->assertTrue($form->isSynchronized()); + + $this->assertTrue($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertTrue($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertSame('a', $form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertSame('c', $form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + public function testSubmitMultipleExpandedInvalidScalarChoice() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'choices' => $this->choices, + )); + + $form->submit('foobar'); + + $this->assertNull($form->getData()); + $this->assertSame('foobar', $form->getViewData()); + $this->assertEmpty($form->getExtraData()); + $this->assertFalse($form->isSynchronized()); + + $this->assertFalse($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertNull($form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + public function testSubmitMultipleExpandedInvalidArrayChoice() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'choices' => $this->choices, + )); + + $form->submit(array('a', 'foobar')); + + $this->assertNull($form->getData()); + $this->assertSame(array('a', 'foobar'), $form->getViewData()); + $this->assertEmpty($form->getExtraData()); + $this->assertFalse($form->isSynchronized()); + + $this->assertFalse($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertNull($form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + public function testSubmitMultipleExpandedEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'choices' => $this->choices, + )); + + $form->submit(array()); + + $this->assertSame(array(), $form->getData()); + $this->assertTrue($form->isSynchronized()); + + $this->assertFalse($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertNull($form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + // In edge cases (for example, when choices are loaded dynamically by a + // loader), the choices may be empty. Make sure to behave the same as when + // choices are available. + public function testSubmitMultipleExpandedEmptyNoChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'choices' => array(), + )); + + $form->submit(array()); + + $this->assertSame(array(), $form->getData()); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitMultipleExpandedWithEmptyChild() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'choices' => array( + 'Empty' => '', + 'Not Empty' => 1, + 'Not Empty 2' => 2, + ), + )); + + $form->submit(array('', '2')); + + $this->assertSame(array('', 2), $form->getData()); + $this->assertTrue($form->isSynchronized()); + + $this->assertTrue($form[0]->getData()); + $this->assertFalse($form[1]->getData()); + $this->assertTrue($form[2]->getData()); + $this->assertSame('', $form[0]->getViewData()); + $this->assertNull($form[1]->getViewData()); + $this->assertSame('2', $form[2]->getViewData()); + } + + public function testSubmitMultipleExpandedObjectChoices() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => true, + 'choices' => $this->objectChoices, + 'choice_label' => 'name', + 'choice_value' => 'id', + )); + + $form->submit(array('1', '2')); + + $this->assertSame(array($this->objectChoices[0], $this->objectChoices[1]), $form->getData()); + $this->assertTrue($form->isSynchronized()); + + $this->assertTrue($form[0]->getData()); + $this->assertTrue($form[1]->getData()); + $this->assertFalse($form[2]->getData()); + $this->assertFalse($form[3]->getData()); + $this->assertFalse($form[4]->getData()); + $this->assertSame('1', $form[0]->getViewData()); + $this->assertSame('2', $form[1]->getViewData()); + $this->assertNull($form[2]->getViewData()); + $this->assertNull($form[3]->getViewData()); + $this->assertNull($form[4]->getViewData()); + } + + public function testSingleSelectedObjectChoices() + { + $view = $this->factory->create(static::TESTED_TYPE, $this->objectChoices[3], array( + 'multiple' => false, + 'expanded' => false, + 'choices' => $this->objectChoices, + 'choice_label' => 'name', + 'choice_value' => 'id', + )) + ->createView(); + + /** @var callable $selectedChecker */ + $selectedChecker = $view->vars['is_selected']; + + $this->assertTrue($selectedChecker($view->vars['choices'][3]->value, $view->vars['value'])); + $this->assertFalse($selectedChecker($view->vars['choices'][1]->value, $view->vars['value'])); + } + + public function testMultipleSelectedObjectChoices() + { + $view = $this->factory->create(static::TESTED_TYPE, array($this->objectChoices[3]), array( + 'multiple' => true, + 'expanded' => false, + 'choices' => $this->objectChoices, + 'choice_label' => 'name', + 'choice_value' => 'id', + )) + ->createView(); + + /** @var callable $selectedChecker */ + $selectedChecker = $view->vars['is_selected']; + + $this->assertTrue($selectedChecker($view->vars['choices'][3]->value, $view->vars['value'])); + $this->assertFalse($selectedChecker($view->vars['choices'][1]->value, $view->vars['value'])); + } + + public function testPassRequiredToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => $this->choices, + )) + ->createView(); + + $this->assertTrue($view->vars['required']); + } + + public function testPassNonRequiredToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => false, + 'choices' => $this->choices, + )) + ->createView(); + + $this->assertFalse($view->vars['required']); + } + + public function testPassMultipleToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + 'choices' => $this->choices, + )) + ->createView(); + + $this->assertTrue($view->vars['multiple']); + } + + public function testPassExpandedToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'expanded' => true, + 'choices' => $this->choices, + )) + ->createView(); + + $this->assertTrue($view->vars['expanded']); + } + + public function testPassChoiceTranslationDomainToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => $this->choices, + )) + ->createView(); + + $this->assertNull($view->vars['choice_translation_domain']); + } + + public function testChoiceTranslationDomainWithTrueValueToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => $this->choices, + 'choice_translation_domain' => true, + )) + ->createView(); + + $this->assertNull($view->vars['choice_translation_domain']); + } + + public function testDefaultChoiceTranslationDomainIsSameAsTranslationDomainToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => $this->choices, + 'translation_domain' => 'foo', + )) + ->createView(); + + $this->assertEquals('foo', $view->vars['choice_translation_domain']); + } + + public function testInheritChoiceTranslationDomainFromParent() + { + $view = $this->factory + ->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array( + 'translation_domain' => 'domain', + )) + ->add('child', static::TESTED_TYPE) + ->getForm() + ->createView(); + + $this->assertEquals('domain', $view['child']->vars['choice_translation_domain']); + } + + public function testPlaceholderIsNullByDefaultIfRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'required' => true, + 'choices' => $this->choices, + )) + ->createView(); + + $this->assertNull($view->vars['placeholder']); + } + + public function testPlaceholderIsEmptyStringByDefaultIfNotRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => false, + 'required' => false, + 'choices' => $this->choices, + )) + ->createView(); + + $this->assertSame('', $view->vars['placeholder']); + } + + /** + * @dataProvider getOptionsWithPlaceholder + */ + public function testPassPlaceholderToView($multiple, $expanded, $required, $placeholder, $viewValue) + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => $multiple, + 'expanded' => $expanded, + 'required' => $required, + 'placeholder' => $placeholder, + 'choices' => $this->choices, + )) + ->createView(); + + $this->assertSame($viewValue, $view->vars['placeholder']); + $this->assertFalse($view->vars['placeholder_in_choices']); + } + + /** + * @dataProvider getOptionsWithPlaceholder + */ + public function testDontPassPlaceholderIfContainedInChoices($multiple, $expanded, $required, $placeholder, $viewValue) + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => $multiple, + 'expanded' => $expanded, + 'required' => $required, + 'placeholder' => $placeholder, + 'choices' => array('Empty' => '', 'A' => 'a'), + )) + ->createView(); + + $this->assertNull($view->vars['placeholder']); + $this->assertTrue($view->vars['placeholder_in_choices']); + } + + public function getOptionsWithPlaceholder() + { + return array( + // single non-expanded + array(false, false, false, 'foobar', 'foobar'), + array(false, false, false, '', ''), + array(false, false, false, null, null), + array(false, false, false, false, null), + array(false, false, true, 'foobar', 'foobar'), + array(false, false, true, '', ''), + array(false, false, true, null, null), + array(false, false, true, false, null), + // single expanded + array(false, true, false, 'foobar', 'foobar'), + // radios should never have an empty label + array(false, true, false, '', 'None'), + array(false, true, false, null, null), + array(false, true, false, false, null), + // required radios should never have a placeholder + array(false, true, true, 'foobar', null), + array(false, true, true, '', null), + array(false, true, true, null, null), + array(false, true, true, false, null), + // multiple non-expanded + array(true, false, false, 'foobar', null), + array(true, false, false, '', null), + array(true, false, false, null, null), + array(true, false, false, false, null), + array(true, false, true, 'foobar', null), + array(true, false, true, '', null), + array(true, false, true, null, null), + array(true, false, true, false, null), + // multiple expanded + array(true, true, false, 'foobar', null), + array(true, true, false, '', null), + array(true, true, false, null, null), + array(true, true, false, false, null), + array(true, true, true, 'foobar', null), + array(true, true, true, '', null), + array(true, true, true, null, null), + array(true, true, true, false, null), + ); + } + + public function testPassChoicesToView() + { + $choices = array('A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd'); + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => $choices, + )) + ->createView(); + + $this->assertEquals(array( + new ChoiceView('a', 'a', 'A'), + new ChoiceView('b', 'b', 'B'), + new ChoiceView('c', 'c', 'C'), + new ChoiceView('d', 'd', 'D'), + ), $view->vars['choices']); + } + + public function testPassPreferredChoicesToView() + { + $choices = array('A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd'); + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => $choices, + 'preferred_choices' => array('b', 'd'), + )) + ->createView(); + + $this->assertEquals(array( + 0 => new ChoiceView('a', 'a', 'A'), + 2 => new ChoiceView('c', 'c', 'C'), + ), $view->vars['choices']); + $this->assertEquals(array( + 1 => new ChoiceView('b', 'b', 'B'), + 3 => new ChoiceView('d', 'd', 'D'), + ), $view->vars['preferred_choices']); + } + + public function testPassHierarchicalChoicesToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => $this->groupedChoices, + 'preferred_choices' => array('b', 'd'), + )) + ->createView(); + + $this->assertEquals(array( + 'Symfony' => new ChoiceGroupView('Symfony', array( + 0 => new ChoiceView('a', 'a', 'Bernhard'), + 2 => new ChoiceView('c', 'c', 'Kris'), + )), + 'Doctrine' => new ChoiceGroupView('Doctrine', array( + 4 => new ChoiceView('e', 'e', 'Roman'), + )), + ), $view->vars['choices']); + $this->assertEquals(array( + 'Symfony' => new ChoiceGroupView('Symfony', array( + 1 => new ChoiceView('b', 'b', 'Fabien'), + )), + 'Doctrine' => new ChoiceGroupView('Doctrine', array( + 3 => new ChoiceView('d', 'd', 'Jon'), + )), + ), $view->vars['preferred_choices']); + } + + public function testPassChoiceDataToView() + { + $obj1 = (object) array('value' => 'a', 'label' => 'A'); + $obj2 = (object) array('value' => 'b', 'label' => 'B'); + $obj3 = (object) array('value' => 'c', 'label' => 'C'); + $obj4 = (object) array('value' => 'd', 'label' => 'D'); + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => array($obj1, $obj2, $obj3, $obj4), + 'choice_label' => 'label', + 'choice_value' => 'value', + )) + ->createView(); + + $this->assertEquals(array( + new ChoiceView($obj1, 'a', 'A'), + new ChoiceView($obj2, 'b', 'B'), + new ChoiceView($obj3, 'c', 'C'), + new ChoiceView($obj4, 'd', 'D'), + ), $view->vars['choices']); + } + + public function testAdjustFullNameForMultipleNonExpanded() + { + $view = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'multiple' => true, + 'expanded' => false, + 'choices' => $this->choices, + )) + ->createView(); + + $this->assertSame('name[]', $view->vars['full_name']); + } + + // https://github.com/symfony/symfony/issues/3298 + public function testInitializeWithEmptyChoices() + { + $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'choices' => array(), + )); + } + + public function testInitializeWithDefaultObjectChoice() + { + $obj1 = (object) array('value' => 'a', 'label' => 'A'); + $obj2 = (object) array('value' => 'b', 'label' => 'B'); + $obj3 = (object) array('value' => 'c', 'label' => 'C'); + $obj4 = (object) array('value' => 'd', 'label' => 'D'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => array($obj1, $obj2, $obj3, $obj4), + 'choice_label' => 'label', + 'choice_value' => 'value', + // Used to break because "data_class" was inferred, which needs to + // remain null in every case (because it refers to the view format) + 'data' => $obj3, + )); + + // Trigger data initialization + $this->assertSame('c', $form->getViewData()); + } + + /** + * This covers the case when: + * - Custom choice type added after a choice type. + * - Custom type is expanded. + * - Custom type replaces 'choices' normalizer with a custom one. + * In this case, custom type should not inherit labels from the first added choice type. + */ + public function testCustomChoiceTypeDoesNotInheritChoiceLabels() + { + $builder = $this->factory->createBuilder(); + $builder->add('choice', static::TESTED_TYPE, array( + 'choices' => array( + '1' => '1', + '2' => '2', + ), + ) + ); + $builder->add('subChoice', 'Symfony\Component\Form\Tests\Fixtures\ChoiceSubType'); + $form = $builder->getForm(); + + // The default 'choices' normalizer would fill the $choiceLabels, but it has been replaced + // in the custom choice type, so $choiceLabels->labels remains empty array. + // In this case the 'choice_label' closure returns null and not the closure from the first choice type. + $this->assertNull($form->get('subChoice')->getConfig()->getOption('choice_label')); + } + + /** + * @dataProvider invalidNestedValueTestMatrix + */ + public function testSubmitInvalidNestedValue($multiple, $expanded, $submissionData) + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'choices' => $this->choices, + 'multiple' => $multiple, + 'expanded' => $expanded, + )); + + $form->submit($submissionData); + $this->assertFalse($form->isSynchronized()); + $this->assertEquals('All choices submitted must be NULL or strings.', $form->getTransformationFailure()->getMessage()); + } + + public function invalidNestedValueTestMatrix() + { + return array( + 'non-multiple, non-expanded' => array(false, false, array(array())), + 'non-multiple, expanded' => array(false, true, array(array())), + 'multiple, non-expanded' => array(true, false, array(array())), + 'multiple, expanded' => array(true, true, array(array())), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7ed25ce27e42f3ea734ff6791c6ed0b560cfa902 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php @@ -0,0 +1,367 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\Tests\Fixtures\Author; + +class CollectionTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CollectionType'; + + public function testContainsNoChildByDefault() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => TextTypeTest::TESTED_TYPE, + )); + + $this->assertCount(0, $form); + } + + public function testSetDataAdjustsSize() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => TextTypeTest::TESTED_TYPE, + 'entry_options' => array( + 'attr' => array('maxlength' => 20), + ), + )); + $form->setData(array('foo@foo.com', 'foo@bar.com')); + + $this->assertInstanceOf('Symfony\Component\Form\Form', $form[0]); + $this->assertInstanceOf('Symfony\Component\Form\Form', $form[1]); + $this->assertCount(2, $form); + $this->assertEquals('foo@foo.com', $form[0]->getData()); + $this->assertEquals('foo@bar.com', $form[1]->getData()); + $formAttrs0 = $form[0]->getConfig()->getOption('attr'); + $formAttrs1 = $form[1]->getConfig()->getOption('attr'); + $this->assertEquals(20, $formAttrs0['maxlength']); + $this->assertEquals(20, $formAttrs1['maxlength']); + + $form->setData(array('foo@baz.com')); + $this->assertInstanceOf('Symfony\Component\Form\Form', $form[0]); + $this->assertFalse(isset($form[1])); + $this->assertCount(1, $form); + $this->assertEquals('foo@baz.com', $form[0]->getData()); + $formAttrs0 = $form[0]->getConfig()->getOption('attr'); + $this->assertEquals(20, $formAttrs0['maxlength']); + } + + public function testThrowsExceptionIfObjectIsNotTraversable() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => TextTypeTest::TESTED_TYPE, + )); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\UnexpectedTypeException'); + $form->setData(new \stdClass()); + } + + public function testNotResizedIfSubmittedWithMissingData() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => TextTypeTest::TESTED_TYPE, + )); + $form->setData(array('foo@foo.com', 'bar@bar.com')); + $form->submit(array('foo@bar.com')); + + $this->assertTrue($form->has('0')); + $this->assertTrue($form->has('1')); + $this->assertEquals('foo@bar.com', $form[0]->getData()); + $this->assertEquals('', $form[1]->getData()); + } + + public function testResizedDownIfSubmittedWithMissingDataAndAllowDelete() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => TextTypeTest::TESTED_TYPE, + 'allow_delete' => true, + )); + $form->setData(array('foo@foo.com', 'bar@bar.com')); + $form->submit(array('foo@foo.com')); + + $this->assertTrue($form->has('0')); + $this->assertFalse($form->has('1')); + $this->assertEquals('foo@foo.com', $form[0]->getData()); + $this->assertEquals(array('foo@foo.com'), $form->getData()); + } + + public function testResizedDownIfSubmittedWithEmptyDataAndDeleteEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => TextTypeTest::TESTED_TYPE, + 'allow_delete' => true, + 'delete_empty' => true, + )); + + $form->setData(array('foo@foo.com', 'bar@bar.com')); + $form->submit(array('foo@foo.com', '')); + + $this->assertTrue($form->has('0')); + $this->assertFalse($form->has('1')); + $this->assertEquals('foo@foo.com', $form[0]->getData()); + $this->assertEquals(array('foo@foo.com'), $form->getData()); + } + + public function testDontAddEmptyDataIfDeleteEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => TextTypeTest::TESTED_TYPE, + 'allow_add' => true, + 'delete_empty' => true, + )); + + $form->setData(array('foo@foo.com')); + $form->submit(array('foo@foo.com', '')); + + $this->assertTrue($form->has('0')); + $this->assertFalse($form->has('1')); + $this->assertEquals('foo@foo.com', $form[0]->getData()); + $this->assertEquals(array('foo@foo.com'), $form->getData()); + } + + public function testNoDeleteEmptyIfDeleteNotAllowed() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => TextTypeTest::TESTED_TYPE, + 'allow_delete' => false, + 'delete_empty' => true, + )); + + $form->setData(array('foo@foo.com')); + $form->submit(array('')); + + $this->assertTrue($form->has('0')); + $this->assertEquals('', $form[0]->getData()); + } + + public function testResizedDownIfSubmittedWithCompoundEmptyDataAndDeleteEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => 'Symfony\Component\Form\Tests\Fixtures\AuthorType', + // If the field is not required, no new Author will be created if the + // form is completely empty + 'entry_options' => array('required' => false), + 'allow_add' => true, + 'delete_empty' => true, + )); + + $form->setData(array(new Author('first', 'last'))); + $form->submit(array( + array('firstName' => 's_first', 'lastName' => 's_last'), + array('firstName' => '', 'lastName' => ''), + )); + + $this->assertTrue($form->has('0')); + $this->assertFalse($form->has('1')); + $this->assertEquals(new Author('s_first', 's_last'), $form[0]->getData()); + $this->assertEquals(array(new Author('s_first', 's_last')), $form->getData()); + } + + public function testNotResizedIfSubmittedWithExtraData() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => TextTypeTest::TESTED_TYPE, + )); + $form->setData(array('foo@bar.com')); + $form->submit(array('foo@foo.com', 'bar@bar.com')); + + $this->assertTrue($form->has('0')); + $this->assertFalse($form->has('1')); + $this->assertEquals('foo@foo.com', $form[0]->getData()); + } + + public function testResizedUpIfSubmittedWithExtraDataAndAllowAdd() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => TextTypeTest::TESTED_TYPE, + 'allow_add' => true, + )); + $form->setData(array('foo@bar.com')); + $form->submit(array('foo@bar.com', 'bar@bar.com')); + + $this->assertTrue($form->has('0')); + $this->assertTrue($form->has('1')); + $this->assertEquals('foo@bar.com', $form[0]->getData()); + $this->assertEquals('bar@bar.com', $form[1]->getData()); + $this->assertEquals(array('foo@bar.com', 'bar@bar.com'), $form->getData()); + } + + public function testAllowAddButNoPrototype() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => FormTypeTest::TESTED_TYPE, + 'allow_add' => true, + 'prototype' => false, + )); + + $this->assertFalse($form->has('__name__')); + } + + public function testPrototypeMultipartPropagation() + { + $form = $this->factory + ->create(static::TESTED_TYPE, null, array( + 'entry_type' => FileTypeTest::TESTED_TYPE, + 'allow_add' => true, + 'prototype' => true, + )) + ; + + $this->assertTrue($form->createView()->vars['multipart']); + } + + public function testGetDataDoesNotContainsPrototypeNameBeforeDataAreSet() + { + $form = $this->factory->create(static::TESTED_TYPE, array(), array( + 'entry_type' => FileTypeTest::TESTED_TYPE, + 'prototype' => true, + 'allow_add' => true, + )); + + $data = $form->getData(); + $this->assertFalse(isset($data['__name__'])); + } + + public function testGetDataDoesNotContainsPrototypeNameAfterDataAreSet() + { + $form = $this->factory->create(static::TESTED_TYPE, array(), array( + 'entry_type' => FileTypeTest::TESTED_TYPE, + 'allow_add' => true, + 'prototype' => true, + )); + + $form->setData(array('foobar.png')); + $data = $form->getData(); + $this->assertFalse(isset($data['__name__'])); + } + + public function testPrototypeNameOption() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => FormTypeTest::TESTED_TYPE, + 'prototype' => true, + 'allow_add' => true, + )); + + $this->assertSame('__name__', $form->getConfig()->getAttribute('prototype')->getName(), '__name__ is the default'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'entry_type' => FormTypeTest::TESTED_TYPE, + 'prototype' => true, + 'allow_add' => true, + 'prototype_name' => '__test__', + )); + + $this->assertSame('__test__', $form->getConfig()->getAttribute('prototype')->getName()); + } + + public function testPrototypeDefaultLabel() + { + $form = $this->factory->create(static::TESTED_TYPE, array(), array( + 'entry_type' => FileTypeTest::TESTED_TYPE, + 'allow_add' => true, + 'prototype' => true, + 'prototype_name' => '__test__', + )); + + $this->assertSame('__test__label__', $form->createView()->vars['prototype']->vars['label']); + } + + public function testPrototypeData() + { + $form = $this->factory->create(static::TESTED_TYPE, array(), array( + 'allow_add' => true, + 'prototype' => true, + 'prototype_data' => 'foo', + 'entry_type' => TextTypeTest::TESTED_TYPE, + 'entry_options' => array( + 'data' => 'bar', + 'label' => false, + ), + )); + + $this->assertSame('foo', $form->createView()->vars['prototype']->vars['value']); + $this->assertFalse($form->createView()->vars['prototype']->vars['label']); + } + + public function testPrototypeDefaultRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, array(), array( + 'entry_type' => FileTypeTest::TESTED_TYPE, + 'allow_add' => true, + 'prototype' => true, + 'prototype_name' => '__test__', + )); + + $this->assertTrue($form->createView()->vars['prototype']->vars['required']); + } + + public function testPrototypeSetNotRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, array(), array( + 'entry_type' => FileTypeTest::TESTED_TYPE, + 'allow_add' => true, + 'prototype' => true, + 'prototype_name' => '__test__', + 'required' => false, + )); + + $this->assertFalse($form->createView()->vars['required'], 'collection is not required'); + $this->assertFalse($form->createView()->vars['prototype']->vars['required'], '"prototype" should not be required'); + } + + public function testPrototypeSetNotRequiredIfParentNotRequired() + { + $child = $this->factory->create(static::TESTED_TYPE, array(), array( + 'entry_type' => FileTypeTest::TESTED_TYPE, + 'allow_add' => true, + 'prototype' => true, + 'prototype_name' => '__test__', + )); + + $parent = $this->factory->create(FormTypeTest::TESTED_TYPE, array(), array( + 'required' => false, + )); + + $child->setParent($parent); + $this->assertFalse($parent->createView()->vars['required'], 'Parent is not required'); + $this->assertFalse($child->createView()->vars['required'], 'Child is not required'); + $this->assertFalse($child->createView()->vars['prototype']->vars['required'], '"Prototype" should not be required'); + } + + public function testPrototypeNotOverrideRequiredByEntryOptionsInFavorOfParent() + { + $child = $this->factory->create(static::TESTED_TYPE, array(), array( + 'entry_type' => FileTypeTest::TESTED_TYPE, + 'allow_add' => true, + 'prototype' => true, + 'prototype_name' => '__test__', + 'entry_options' => array( + 'required' => true, + ), + )); + + $parent = $this->factory->create(FormTypeTest::TESTED_TYPE, array(), array( + 'required' => false, + )); + + $child->setParent($parent); + + $this->assertFalse($parent->createView()->vars['required'], 'Parent is not required'); + $this->assertFalse($child->createView()->vars['required'], 'Child is not required'); + $this->assertFalse($child->createView()->vars['prototype']->vars['required'], '"Prototype" should not be required'); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull(array(), array(), array()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e7f91ce4405afcefe4c67c6e466439b4c65197b3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\ChoiceList\View\ChoiceView; +use Symfony\Component\Intl\Util\IntlTestHelper; + +class CountryTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CountryType'; + + protected function setUp() + { + IntlTestHelper::requireIntl($this, false); + + parent::setUp(); + } + + public function testCountriesAreSelectable() + { + $choices = $this->factory->create(static::TESTED_TYPE) + ->createView()->vars['choices']; + + // Don't check objects for identity + $this->assertContains(new ChoiceView('DE', 'DE', 'Germany'), $choices, '', false, false); + $this->assertContains(new ChoiceView('GB', 'GB', 'United Kingdom'), $choices, '', false, false); + $this->assertContains(new ChoiceView('US', 'US', 'United States'), $choices, '', false, false); + $this->assertContains(new ChoiceView('FR', 'FR', 'France'), $choices, '', false, false); + $this->assertContains(new ChoiceView('MY', 'MY', 'Malaysia'), $choices, '', false, false); + } + + public function testUnknownCountryIsNotIncluded() + { + $choices = $this->factory->create(static::TESTED_TYPE, 'country') + ->createView()->vars['choices']; + + foreach ($choices as $choice) { + if ('ZZ' === $choice->value) { + $this->fail('Should not contain choice "ZZ"'); + } + } + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..be9264d7b19db6fae8a65e121493f77b0cb73aaf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\ChoiceList\View\ChoiceView; +use Symfony\Component\Intl\Util\IntlTestHelper; + +class CurrencyTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CurrencyType'; + + protected function setUp() + { + IntlTestHelper::requireIntl($this, false); + + parent::setUp(); + } + + public function testCurrenciesAreSelectable() + { + $choices = $this->factory->create(static::TESTED_TYPE) + ->createView()->vars['choices']; + + $this->assertContains(new ChoiceView('EUR', 'EUR', 'Euro'), $choices, '', false, false); + $this->assertContains(new ChoiceView('USD', 'USD', 'US Dollar'), $choices, '', false, false); + $this->assertContains(new ChoiceView('SIT', 'SIT', 'Slovenian Tolar'), $choices, '', false, false); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dd28f04df5dfb23f959d85875dc3270ec8fa1544 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php @@ -0,0 +1,363 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\Extension\Core\Type\DateIntervalType; +use Symfony\Component\Form\FormError; + +class DateIntervalTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = DateIntervalType::class; + + public function testSubmitDateInterval() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array('input' => 'dateinterval')); + + $form->submit(array( + 'years' => '7', + 'months' => '6', + 'days' => '5', + )); + + $this->assertDateIntervalEquals(new \DateInterval('P7Y6M5D'), $form->getData()); + } + + public function testSubmitString() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array('input' => 'string')); + + $form->submit(array( + 'years' => '7', + 'months' => '6', + 'days' => '5', + )); + + $this->assertSame('P7Y6M5D', $form->getData()); + } + + public function testSubmitArray() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array('input' => 'array')); + + $input = array( + 'years' => '7', + 'months' => '6', + 'days' => '5', + ); + + $form->submit($input); + + $this->assertSame($input, $form->getData()); + } + + public function testSubmitWithoutMonths() + { + $interval = new \DateInterval('P7Y5D'); + + $form = $this->factory->create(static::TESTED_TYPE, $interval, array( + 'input' => 'dateinterval', + 'with_months' => false, + )); + + $form->submit(array( + 'years' => '7', + 'months' => '6', + 'days' => '5', + )); + + $this->assertDateIntervalEquals($interval, $form->getData()); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitWithTime() + { + $interval = new \DateInterval('P7Y6M5DT4H3M2S'); + $form = $this->factory->create(static::TESTED_TYPE, $interval, array( + 'input' => 'dateinterval', + 'with_hours' => true, + 'with_minutes' => true, + 'with_seconds' => true, + )); + + $form->submit(array( + 'years' => '7', + 'months' => '6', + 'days' => '5', + 'hours' => '4', + 'minutes' => '3', + 'seconds' => '2', + )); + + $this->assertDateIntervalEquals($interval, $form->getData()); + $this->assertTrue($form->isSynchronized()); + } + + public function testSubmitWithWeeks() + { + $form = $this->factory->create(static::TESTED_TYPE, new \DateInterval('P0Y'), array( + 'input' => 'dateinterval', + 'with_years' => false, + 'with_months' => false, + 'with_weeks' => true, + 'with_days' => false, + )); + + $form->submit(array( + 'weeks' => '30', + )); + + $this->assertDateIntervalEquals(new \DateInterval('P30W'), $form->getData()); + } + + public function testSubmitWithInvert() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'input' => 'dateinterval', + 'with_invert' => true, + )); + + $form->submit(array( + 'years' => '7', + 'months' => '6', + 'days' => '5', + 'invert' => true, + )); + + $interval = new \DateInterval('P7Y6M5D'); + $interval->invert = 1; + + $this->assertDateIntervalEquals($interval, $form->getData()); + } + + public function testSubmitStringSingleText() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'input' => 'string', + 'widget' => 'single_text', + )); + + $interval = 'P7Y6M5D'; + + $form->submit($interval); + + $this->assertSame($interval, $form->getData()); + $this->assertSame($interval, $form->getViewData()); + } + + public function testSubmitStringSingleTextWithSeconds() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'input' => 'string', + 'widget' => 'single_text', + 'with_hours' => true, + 'with_minutes' => true, + 'with_seconds' => true, + )); + + $interval = 'P7Y6M5DT4H3M2S'; + + $form->submit($interval); + + $this->assertSame($interval, $form->getData()); + $this->assertSame($interval, $form->getViewData()); + } + + public function testSubmitArrayInteger() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'integer', + 'with_invert' => true, + )); + + $years = '7'; + + $form->submit(array( + 'years' => '7', + 'months' => '6', + 'days' => '5', + 'invert' => true, + )); + + $this->assertSame($years, $form['years']->getData()); + $this->assertSame($years, $form['years']->getViewData()); + } + + public function testInitializeWithDateInterval() + { + // Throws an exception if "data_class" option is not explicitly set + // to null in the type + $this->factory->create(static::TESTED_TYPE, new \DateInterval('P0Y')); + } + + public function testPassDefaultPlaceholderToViewIfNotRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => false, + 'with_seconds' => true, + )) + ->createView(); + + $this->assertSame('', $view['years']->vars['placeholder']); + $this->assertSame('', $view['months']->vars['placeholder']); + $this->assertSame('', $view['days']->vars['placeholder']); + $this->assertSame('', $view['seconds']->vars['placeholder']); + } + + public function testPassNoPlaceholderToViewIfRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => true, + 'with_seconds' => true, + )) + ->createView(); + + $this->assertNull($view['years']->vars['placeholder']); + $this->assertNull($view['months']->vars['placeholder']); + $this->assertNull($view['days']->vars['placeholder']); + $this->assertNull($view['seconds']->vars['placeholder']); + } + + public function testPassPlaceholderAsString() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'placeholder' => 'Empty', + 'with_seconds' => true, + )) + ->createView(); + + $this->assertSame('Empty', $view['years']->vars['placeholder']); + $this->assertSame('Empty', $view['months']->vars['placeholder']); + $this->assertSame('Empty', $view['days']->vars['placeholder']); + $this->assertSame('Empty', $view['seconds']->vars['placeholder']); + } + + public function testPassPlaceholderAsArray() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'placeholder' => array( + 'years' => 'Empty years', + 'months' => 'Empty months', + 'days' => 'Empty days', + 'hours' => 'Empty hours', + 'minutes' => 'Empty minutes', + 'seconds' => 'Empty seconds', + ), + 'with_hours' => true, + 'with_minutes' => true, + 'with_seconds' => true, + )) + ->createView(); + + $this->assertSame('Empty years', $view['years']->vars['placeholder']); + $this->assertSame('Empty months', $view['months']->vars['placeholder']); + $this->assertSame('Empty days', $view['days']->vars['placeholder']); + $this->assertSame('Empty hours', $view['hours']->vars['placeholder']); + $this->assertSame('Empty minutes', $view['minutes']->vars['placeholder']); + $this->assertSame('Empty seconds', $view['seconds']->vars['placeholder']); + } + + public function testPassPlaceholderAsPartialArrayAddEmptyIfNotRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => false, + 'placeholder' => array( + 'years' => 'Empty years', + 'days' => 'Empty days', + 'hours' => 'Empty hours', + 'seconds' => 'Empty seconds', + ), + 'with_hours' => true, + 'with_minutes' => true, + 'with_seconds' => true, + )) + ->createView(); + + $this->assertSame('Empty years', $view['years']->vars['placeholder']); + $this->assertSame('', $view['months']->vars['placeholder']); + $this->assertSame('Empty days', $view['days']->vars['placeholder']); + $this->assertSame('Empty hours', $view['hours']->vars['placeholder']); + $this->assertSame('', $view['minutes']->vars['placeholder']); + $this->assertSame('Empty seconds', $view['seconds']->vars['placeholder']); + } + + public function testPassPlaceholderAsPartialArrayAddNullIfRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => true, + 'placeholder' => array( + 'years' => 'Empty years', + 'days' => 'Empty days', + 'hours' => 'Empty hours', + 'seconds' => 'Empty seconds', + ), + 'with_hours' => true, + 'with_minutes' => true, + 'with_seconds' => true, + )) + ->createView(); + + $this->assertSame('Empty years', $view['years']->vars['placeholder']); + $this->assertNull($view['months']->vars['placeholder']); + $this->assertSame('Empty days', $view['days']->vars['placeholder']); + $this->assertSame('Empty hours', $view['hours']->vars['placeholder']); + $this->assertNull($view['minutes']->vars['placeholder']); + $this->assertSame('Empty seconds', $view['seconds']->vars['placeholder']); + } + + public function testDateTypeChoiceErrorsBubbleUp() + { + $error = new FormError('Invalid!'); + $form = $this->factory->create(static::TESTED_TYPE, null); + + $form['years']->addError($error); + + $this->assertSame(array(), iterator_to_array($form['years']->getErrors())); + $this->assertSame(array($error), iterator_to_array($form->getErrors())); + } + + public function testTranslationsAreDisabledForChoiceWidget() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'choice', + 'with_hours' => true, + 'with_minutes' => true, + 'with_seconds' => true, + )); + + $this->assertFalse($form->get('years')->getConfig()->getOption('choice_translation_domain')); + $this->assertFalse($form->get('months')->getConfig()->getOption('choice_translation_domain')); + $this->assertFalse($form->get('days')->getConfig()->getOption('choice_translation_domain')); + $this->assertFalse($form->get('hours')->getConfig()->getOption('choice_translation_domain')); + $this->assertFalse($form->get('minutes')->getConfig()->getOption('choice_translation_domain')); + $this->assertFalse($form->get('seconds')->getConfig()->getOption('choice_translation_domain')); + } + + public function testInvertDoesNotInheritRequiredOption() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'input' => 'dateinterval', + 'with_invert' => true, + 'required' => true, + )); + + $this->assertFalse($form->get('invert')->getConfig()->getOption('required')); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, array( + 'years' => '', + 'months' => '', + 'days' => '', + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..72a14f28f172ee726e772415f4cb3f123f08b360 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php @@ -0,0 +1,583 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\FormError; + +class DateTimeTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\DateTimeType'; + + protected function setUp() + { + \Locale::setDefault('en'); + + parent::setUp(); + } + + public function testSubmitDateTime() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'date_widget' => 'choice', + 'years' => array(2010), + 'time_widget' => 'choice', + 'input' => 'datetime', + )); + + $form->submit(array( + 'date' => array( + 'day' => '2', + 'month' => '6', + 'year' => '2010', + ), + 'time' => array( + 'hour' => '3', + 'minute' => '4', + ), + )); + + $dateTime = new \DateTime('2010-06-02 03:04:00 UTC'); + + $this->assertDateTimeEquals($dateTime, $form->getData()); + } + + public function testSubmitString() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'string', + 'date_widget' => 'choice', + 'years' => array(2010), + 'time_widget' => 'choice', + )); + + $form->submit(array( + 'date' => array( + 'day' => '2', + 'month' => '6', + 'year' => '2010', + ), + 'time' => array( + 'hour' => '3', + 'minute' => '4', + ), + )); + + $this->assertEquals('2010-06-02 03:04:00', $form->getData()); + } + + public function testSubmitTimestamp() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'timestamp', + 'date_widget' => 'choice', + 'years' => array(2010), + 'time_widget' => 'choice', + )); + + $form->submit(array( + 'date' => array( + 'day' => '2', + 'month' => '6', + 'year' => '2010', + ), + 'time' => array( + 'hour' => '3', + 'minute' => '4', + ), + )); + + $dateTime = new \DateTime('2010-06-02 03:04:00 UTC'); + + $this->assertEquals($dateTime->format('U'), $form->getData()); + } + + public function testSubmitWithoutMinutes() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'date_widget' => 'choice', + 'years' => array(2010), + 'time_widget' => 'choice', + 'input' => 'datetime', + 'with_minutes' => false, + )); + + $form->setData(new \DateTime()); + + $input = array( + 'date' => array( + 'day' => '2', + 'month' => '6', + 'year' => '2010', + ), + 'time' => array( + 'hour' => '3', + ), + ); + + $form->submit($input); + + $this->assertDateTimeEquals(new \DateTime('2010-06-02 03:00:00 UTC'), $form->getData()); + } + + public function testSubmitWithSeconds() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'date_widget' => 'choice', + 'years' => array(2010), + 'time_widget' => 'choice', + 'input' => 'datetime', + 'with_seconds' => true, + )); + + $form->setData(new \DateTime()); + + $input = array( + 'date' => array( + 'day' => '2', + 'month' => '6', + 'year' => '2010', + ), + 'time' => array( + 'hour' => '3', + 'minute' => '4', + 'second' => '5', + ), + ); + + $form->submit($input); + + $this->assertDateTimeEquals(new \DateTime('2010-06-02 03:04:05 UTC'), $form->getData()); + } + + public function testSubmitDifferentTimezones() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'America/New_York', + 'view_timezone' => 'Pacific/Tahiti', + 'date_widget' => 'choice', + 'years' => array(2010), + 'time_widget' => 'choice', + 'input' => 'string', + 'with_seconds' => true, + )); + + $dateTime = new \DateTime('2010-06-02 03:04:05 Pacific/Tahiti'); + + $form->submit(array( + 'date' => array( + 'day' => (int) $dateTime->format('d'), + 'month' => (int) $dateTime->format('m'), + 'year' => (int) $dateTime->format('Y'), + ), + 'time' => array( + 'hour' => (int) $dateTime->format('H'), + 'minute' => (int) $dateTime->format('i'), + 'second' => (int) $dateTime->format('s'), + ), + )); + + $dateTime->setTimezone(new \DateTimeZone('America/New_York')); + + $this->assertEquals($dateTime->format('Y-m-d H:i:s'), $form->getData()); + } + + public function testSubmitDifferentTimezonesDateTime() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'America/New_York', + 'view_timezone' => 'Pacific/Tahiti', + 'widget' => 'single_text', + 'input' => 'datetime', + )); + + $outputTime = new \DateTime('2010-06-02 03:04:00 Pacific/Tahiti'); + + $form->submit('2010-06-02T03:04:00-10:00'); + + $outputTime->setTimezone(new \DateTimeZone('America/New_York')); + + $this->assertDateTimeEquals($outputTime, $form->getData()); + $this->assertEquals('2010-06-02T03:04:00-10:00', $form->getViewData()); + } + + public function testSubmitStringSingleText() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'string', + 'widget' => 'single_text', + )); + + $form->submit('2010-06-02T03:04:00Z'); + + $this->assertEquals('2010-06-02 03:04:00', $form->getData()); + $this->assertEquals('2010-06-02T03:04:00Z', $form->getViewData()); + } + + public function testSubmitStringSingleTextWithSeconds() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'string', + 'widget' => 'single_text', + 'with_seconds' => true, + )); + + $form->submit('2010-06-02T03:04:05Z'); + + $this->assertEquals('2010-06-02 03:04:05', $form->getData()); + $this->assertEquals('2010-06-02T03:04:05Z', $form->getViewData()); + } + + public function testSubmitDifferentPattern() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'date_format' => 'MM*yyyy*dd', + 'date_widget' => 'single_text', + 'time_widget' => 'single_text', + 'input' => 'datetime', + )); + + $dateTime = new \DateTime('2010-06-02 03:04'); + + $form->submit(array( + 'date' => '06*2010*02', + 'time' => '03:04', + )); + + $this->assertDateTimeEquals($dateTime, $form->getData()); + } + + public function testInitializeWithDateTime() + { + // Throws an exception if "data_class" option is not explicitly set + // to null in the type + $this->factory->create(static::TESTED_TYPE, new \DateTime()); + } + + public function testSingleTextWidgetShouldUseTheRightInputType() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + )) + ->createView(); + + $this->assertEquals('datetime', $view->vars['type']); + } + + public function testPassDefaultPlaceholderToViewIfNotRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => false, + 'with_seconds' => true, + )) + ->createView(); + + $this->assertSame('', $view['date']['year']->vars['placeholder']); + $this->assertSame('', $view['date']['month']->vars['placeholder']); + $this->assertSame('', $view['date']['day']->vars['placeholder']); + $this->assertSame('', $view['time']['hour']->vars['placeholder']); + $this->assertSame('', $view['time']['minute']->vars['placeholder']); + $this->assertSame('', $view['time']['second']->vars['placeholder']); + } + + public function testPassNoPlaceholderToViewIfRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => true, + 'with_seconds' => true, + )) + ->createView(); + + $this->assertNull($view['date']['year']->vars['placeholder']); + $this->assertNull($view['date']['month']->vars['placeholder']); + $this->assertNull($view['date']['day']->vars['placeholder']); + $this->assertNull($view['time']['hour']->vars['placeholder']); + $this->assertNull($view['time']['minute']->vars['placeholder']); + $this->assertNull($view['time']['second']->vars['placeholder']); + } + + public function testPassPlaceholderAsString() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'placeholder' => 'Empty', + 'with_seconds' => true, + )) + ->createView(); + + $this->assertSame('Empty', $view['date']['year']->vars['placeholder']); + $this->assertSame('Empty', $view['date']['month']->vars['placeholder']); + $this->assertSame('Empty', $view['date']['day']->vars['placeholder']); + $this->assertSame('Empty', $view['time']['hour']->vars['placeholder']); + $this->assertSame('Empty', $view['time']['minute']->vars['placeholder']); + $this->assertSame('Empty', $view['time']['second']->vars['placeholder']); + } + + public function testPassPlaceholderAsArray() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'placeholder' => array( + 'year' => 'Empty year', + 'month' => 'Empty month', + 'day' => 'Empty day', + 'hour' => 'Empty hour', + 'minute' => 'Empty minute', + 'second' => 'Empty second', + ), + 'with_seconds' => true, + )) + ->createView(); + + $this->assertSame('Empty year', $view['date']['year']->vars['placeholder']); + $this->assertSame('Empty month', $view['date']['month']->vars['placeholder']); + $this->assertSame('Empty day', $view['date']['day']->vars['placeholder']); + $this->assertSame('Empty hour', $view['time']['hour']->vars['placeholder']); + $this->assertSame('Empty minute', $view['time']['minute']->vars['placeholder']); + $this->assertSame('Empty second', $view['time']['second']->vars['placeholder']); + } + + public function testPassPlaceholderAsPartialArrayAddEmptyIfNotRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => false, + 'placeholder' => array( + 'year' => 'Empty year', + 'day' => 'Empty day', + 'hour' => 'Empty hour', + 'second' => 'Empty second', + ), + 'with_seconds' => true, + )) + ->createView(); + + $this->assertSame('Empty year', $view['date']['year']->vars['placeholder']); + $this->assertSame('', $view['date']['month']->vars['placeholder']); + $this->assertSame('Empty day', $view['date']['day']->vars['placeholder']); + $this->assertSame('Empty hour', $view['time']['hour']->vars['placeholder']); + $this->assertSame('', $view['time']['minute']->vars['placeholder']); + $this->assertSame('Empty second', $view['time']['second']->vars['placeholder']); + } + + public function testPassPlaceholderAsPartialArrayAddNullIfRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => true, + 'placeholder' => array( + 'year' => 'Empty year', + 'day' => 'Empty day', + 'hour' => 'Empty hour', + 'second' => 'Empty second', + ), + 'with_seconds' => true, + )) + ->createView(); + + $this->assertSame('Empty year', $view['date']['year']->vars['placeholder']); + $this->assertNull($view['date']['month']->vars['placeholder']); + $this->assertSame('Empty day', $view['date']['day']->vars['placeholder']); + $this->assertSame('Empty hour', $view['time']['hour']->vars['placeholder']); + $this->assertNull($view['time']['minute']->vars['placeholder']); + $this->assertSame('Empty second', $view['time']['second']->vars['placeholder']); + } + + public function testPassHtml5TypeIfSingleTextAndHtml5Format() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + )) + ->createView(); + + $this->assertSame('datetime', $view->vars['type']); + } + + public function testDontPassHtml5TypeIfHtml5NotAllowed() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + 'html5' => false, + )) + ->createView(); + + $this->assertFalse(isset($view->vars['type'])); + } + + public function testDontPassHtml5TypeIfNotHtml5Format() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + 'format' => 'yyyy-MM-dd HH:mm', + )) + ->createView(); + + $this->assertFalse(isset($view->vars['type'])); + } + + public function testDontPassHtml5TypeIfNotSingleText() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'text', + )) + ->createView(); + + $this->assertFalse(isset($view->vars['type'])); + } + + public function testDateTypeChoiceErrorsBubbleUp() + { + $error = new FormError('Invalid!'); + $form = $this->factory->create(static::TESTED_TYPE, null); + + $form['date']->addError($error); + + $this->assertSame(array(), iterator_to_array($form['date']->getErrors())); + $this->assertSame(array($error), iterator_to_array($form->getErrors())); + } + + public function testDateTypeSingleTextErrorsBubbleUp() + { + $error = new FormError('Invalid!'); + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'date_widget' => 'single_text', + )); + + $form['date']->addError($error); + + $this->assertSame(array(), iterator_to_array($form['date']->getErrors())); + $this->assertSame(array($error), iterator_to_array($form->getErrors())); + } + + public function testTimeTypeChoiceErrorsBubbleUp() + { + $error = new FormError('Invalid!'); + $form = $this->factory->create(static::TESTED_TYPE, null); + + $form['time']->addError($error); + + $this->assertSame(array(), iterator_to_array($form['time']->getErrors())); + $this->assertSame(array($error), iterator_to_array($form->getErrors())); + } + + public function testTimeTypeSingleTextErrorsBubbleUp() + { + $error = new FormError('Invalid!'); + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'time_widget' => 'single_text', + )); + + $form['time']->addError($error); + + $this->assertSame(array(), iterator_to_array($form['time']->getErrors())); + $this->assertSame(array($error), iterator_to_array($form->getErrors())); + } + + public function testPassDefaultChoiceTranslationDomain() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'with_seconds' => true, + )); + + $view = $form->createView(); + + $this->assertFalse($view['date']['year']->vars['choice_translation_domain']); + $this->assertFalse($view['date']['month']->vars['choice_translation_domain']); + $this->assertFalse($view['date']['day']->vars['choice_translation_domain']); + $this->assertFalse($view['time']['hour']->vars['choice_translation_domain']); + $this->assertFalse($view['time']['minute']->vars['choice_translation_domain']); + $this->assertFalse($view['time']['second']->vars['choice_translation_domain']); + } + + public function testPassChoiceTranslationDomainAsString() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'choice_translation_domain' => 'messages', + 'with_seconds' => true, + )); + + $view = $form->createView(); + $this->assertSame('messages', $view['date']['year']->vars['choice_translation_domain']); + $this->assertSame('messages', $view['date']['month']->vars['choice_translation_domain']); + $this->assertSame('messages', $view['date']['day']->vars['choice_translation_domain']); + $this->assertSame('messages', $view['time']['hour']->vars['choice_translation_domain']); + $this->assertSame('messages', $view['time']['minute']->vars['choice_translation_domain']); + $this->assertSame('messages', $view['time']['second']->vars['choice_translation_domain']); + } + + public function testPassChoiceTranslationDomainAsArray() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'choice_translation_domain' => array( + 'year' => 'foo', + 'month' => 'test', + 'hour' => 'foo', + 'second' => 'test', + ), + 'with_seconds' => true, + )); + + $view = $form->createView(); + $this->assertSame('foo', $view['date']['year']->vars['choice_translation_domain']); + $this->assertSame('test', $view['date']['month']->vars['choice_translation_domain']); + $this->assertFalse($view['date']['day']->vars['choice_translation_domain']); + $this->assertSame('foo', $view['time']['hour']->vars['choice_translation_domain']); + $this->assertFalse($view['time']['minute']->vars['choice_translation_domain']); + $this->assertSame('test', $view['time']['second']->vars['choice_translation_domain']); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, array( + // View data is an array of choice values array + 'date' => array('year' => '', 'month' => '', 'day' => ''), + 'time' => array('hour' => '', 'minute' => ''), + )); + } + + public function testSubmitNullWithText() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'text', + )); + $form->submit(null); + + $this->assertNull($form->getData()); + $this->assertNull($form->getNormData()); + $this->assertSame(array( + // View data is an array of choice values array + 'date' => array('year' => '', 'month' => '', 'day' => ''), + 'time' => array('hour' => '', 'minute' => ''), + ), $form->getViewData()); + } + + public function testSubmitNullWithSingleText() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + )); + $form->submit(null); + + $this->assertNull($form->getData()); + $this->assertNull($form->getNormData()); + $this->assertSame('', $form->getViewData()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c1f95096784fd86c67684d960c363e3956ce37bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php @@ -0,0 +1,978 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\ChoiceList\View\ChoiceView; +use Symfony\Component\Form\FormError; +use Symfony\Component\Intl\Util\IntlTestHelper; + +class DateTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\DateType'; + + private $defaultTimezone; + + protected function setUp() + { + parent::setUp(); + $this->defaultTimezone = date_default_timezone_get(); + } + + protected function tearDown() + { + date_default_timezone_set($this->defaultTimezone); + \Locale::setDefault('en'); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testInvalidWidgetOption() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'fake_widget', + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testInvalidInputOption() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'input' => 'fake_input', + )); + } + + public function testSubmitFromSingleTextDateTimeWithDefaultFormat() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'widget' => 'single_text', + 'input' => 'datetime', + )); + + $form->submit('2010-06-02'); + + $this->assertDateTimeEquals(new \DateTime('2010-06-02 UTC'), $form->getData()); + $this->assertEquals('2010-06-02', $form->getViewData()); + } + + public function testSubmitFromSingleTextDateTimeWithCustomFormat() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'widget' => 'single_text', + 'input' => 'datetime', + 'format' => 'yyyy', + )); + + $form->submit('2010'); + + $this->assertDateTimeEquals(new \DateTime('2010-01-01 UTC'), $form->getData()); + $this->assertEquals('2010', $form->getViewData()); + } + + public function testSubmitFromSingleTextDateTime() + { + // we test against "de_DE", so we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_DE'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => \IntlDateFormatter::MEDIUM, + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'widget' => 'single_text', + 'input' => 'datetime', + )); + + $form->submit('2.6.2010'); + + $this->assertDateTimeEquals(new \DateTime('2010-06-02 UTC'), $form->getData()); + $this->assertEquals('02.06.2010', $form->getViewData()); + } + + public function testSubmitFromSingleTextString() + { + // we test against "de_DE", so we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_DE'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => \IntlDateFormatter::MEDIUM, + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'widget' => 'single_text', + 'input' => 'string', + )); + + $form->submit('2.6.2010'); + + $this->assertEquals('2010-06-02', $form->getData()); + $this->assertEquals('02.06.2010', $form->getViewData()); + } + + public function testSubmitFromSingleTextTimestamp() + { + // we test against "de_DE", so we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_DE'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => \IntlDateFormatter::MEDIUM, + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'widget' => 'single_text', + 'input' => 'timestamp', + )); + + $form->submit('2.6.2010'); + + $dateTime = new \DateTime('2010-06-02 UTC'); + + $this->assertEquals($dateTime->format('U'), $form->getData()); + $this->assertEquals('02.06.2010', $form->getViewData()); + } + + public function testSubmitFromSingleTextRaw() + { + // we test against "de_DE", so we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_DE'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => \IntlDateFormatter::MEDIUM, + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'widget' => 'single_text', + 'input' => 'array', + )); + + $form->submit('2.6.2010'); + + $output = array( + 'day' => '2', + 'month' => '6', + 'year' => '2010', + ); + + $this->assertEquals($output, $form->getData()); + $this->assertEquals('02.06.2010', $form->getViewData()); + } + + public function testSubmitFromText() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'widget' => 'text', + )); + + $text = array( + 'day' => '2', + 'month' => '6', + 'year' => '2010', + ); + + $form->submit($text); + + $dateTime = new \DateTime('2010-06-02 UTC'); + + $this->assertDateTimeEquals($dateTime, $form->getData()); + $this->assertEquals($text, $form->getViewData()); + } + + public function testSubmitFromChoice() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'widget' => 'choice', + 'years' => array(2010), + )); + + $text = array( + 'day' => '2', + 'month' => '6', + 'year' => '2010', + ); + + $form->submit($text); + + $dateTime = new \DateTime('2010-06-02 UTC'); + + $this->assertDateTimeEquals($dateTime, $form->getData()); + $this->assertEquals($text, $form->getViewData()); + } + + public function testSubmitFromChoiceEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'widget' => 'choice', + 'required' => false, + )); + + $text = array( + 'day' => '', + 'month' => '', + 'year' => '', + ); + + $form->submit($text); + + $this->assertNull($form->getData()); + $this->assertEquals($text, $form->getViewData()); + } + + public function testSubmitFromInputDateTimeDifferentPattern() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'format' => 'MM*yyyy*dd', + 'widget' => 'single_text', + 'input' => 'datetime', + )); + + $form->submit('06*2010*02'); + + $this->assertDateTimeEquals(new \DateTime('2010-06-02 UTC'), $form->getData()); + $this->assertEquals('06*2010*02', $form->getViewData()); + } + + public function testSubmitFromInputStringDifferentPattern() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'format' => 'MM*yyyy*dd', + 'widget' => 'single_text', + 'input' => 'string', + )); + + $form->submit('06*2010*02'); + + $this->assertEquals('2010-06-02', $form->getData()); + $this->assertEquals('06*2010*02', $form->getViewData()); + } + + public function testSubmitFromInputTimestampDifferentPattern() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'format' => 'MM*yyyy*dd', + 'widget' => 'single_text', + 'input' => 'timestamp', + )); + + $form->submit('06*2010*02'); + + $dateTime = new \DateTime('2010-06-02 UTC'); + + $this->assertEquals($dateTime->format('U'), $form->getData()); + $this->assertEquals('06*2010*02', $form->getViewData()); + } + + public function testSubmitFromInputRawDifferentPattern() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'format' => 'MM*yyyy*dd', + 'widget' => 'single_text', + 'input' => 'array', + )); + + $form->submit('06*2010*02'); + + $output = array( + 'day' => '2', + 'month' => '6', + 'year' => '2010', + ); + + $this->assertEquals($output, $form->getData()); + $this->assertEquals('06*2010*02', $form->getViewData()); + } + + /** + * @dataProvider provideDateFormats + */ + public function testDatePatternWithFormatOption($format, $pattern) + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => $format, + )) + ->createView(); + + $this->assertEquals($pattern, $view->vars['date_pattern']); + } + + public function provideDateFormats() + { + return array( + array('dMy', '{{ day }}{{ month }}{{ year }}'), + array('d-M-yyyy', '{{ day }}-{{ month }}-{{ year }}'), + array('M d y', '{{ month }} {{ day }} {{ year }}'), + ); + } + + /** + * This test is to check that the strings '0', '1', '2', '3' are not accepted + * as valid IntlDateFormatter constants for FULL, LONG, MEDIUM or SHORT respectively. + * + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testThrowExceptionIfFormatIsNoPattern() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => '0', + 'widget' => 'single_text', + 'input' => 'string', + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + * @expectedExceptionMessage The "format" option should contain the letters "y", "M" and "d". Its current value is "yy". + */ + public function testThrowExceptionIfFormatDoesNotContainYearMonthAndDay() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'months' => array(6, 7), + 'format' => 'yy', + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + * @expectedExceptionMessage The "format" option should contain the letters "y", "M" or "d". Its current value is "wrong". + */ + public function testThrowExceptionIfFormatMissesYearMonthAndDayWithSingleTextWidget() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + 'format' => 'wrong', + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testThrowExceptionIfFormatIsNoConstant() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => 105, + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testThrowExceptionIfFormatIsInvalid() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => array(), + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testThrowExceptionIfYearsIsInvalid() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'years' => 'bad value', + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testThrowExceptionIfMonthsIsInvalid() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'months' => 'bad value', + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testThrowExceptionIfDaysIsInvalid() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'days' => 'bad value', + )); + } + + public function testSetDataWithNegativeTimezoneOffsetStringInput() + { + // we test against "de_DE", so we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_DE'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => \IntlDateFormatter::MEDIUM, + 'model_timezone' => 'UTC', + 'view_timezone' => 'America/New_York', + 'input' => 'string', + 'widget' => 'single_text', + )); + + $form->setData('2010-06-02'); + + // 2010-06-02 00:00:00 UTC + // 2010-06-01 20:00:00 UTC-4 + $this->assertEquals('01.06.2010', $form->getViewData()); + } + + public function testSetDataWithNegativeTimezoneOffsetDateTimeInput() + { + // we test against "de_DE", so we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_DE'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => \IntlDateFormatter::MEDIUM, + 'model_timezone' => 'UTC', + 'view_timezone' => 'America/New_York', + 'input' => 'datetime', + 'widget' => 'single_text', + )); + + $dateTime = new \DateTime('2010-06-02 UTC'); + + $form->setData($dateTime); + + // 2010-06-02 00:00:00 UTC + // 2010-06-01 20:00:00 UTC-4 + $this->assertDateTimeEquals($dateTime, $form->getData()); + $this->assertEquals('01.06.2010', $form->getViewData()); + } + + public function testYearsOption() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'years' => array(2010, 2011), + )); + + $view = $form->createView(); + + $this->assertEquals(array( + new ChoiceView('2010', '2010', '2010'), + new ChoiceView('2011', '2011', '2011'), + ), $view['year']->vars['choices']); + } + + public function testMonthsOption() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'months' => array(6, 7), + 'format' => \IntlDateFormatter::SHORT, + )); + + $view = $form->createView(); + + $this->assertEquals(array( + new ChoiceView(6, '6', '06'), + new ChoiceView(7, '7', '07'), + ), $view['month']->vars['choices']); + } + + public function testMonthsOptionShortFormat() + { + // we test against "de_AT", so we need the full implementation + IntlTestHelper::requireFullIntl($this, '57.1'); + + \Locale::setDefault('de_AT'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'months' => array(1, 4), + 'format' => 'dd.MMM.yy', + )); + + $view = $form->createView(); + + $this->assertEquals(array( + new ChoiceView(1, '1', 'Jän.'), + new ChoiceView(4, '4', 'Apr.'), + ), $view['month']->vars['choices']); + } + + public function testMonthsOptionLongFormat() + { + // we test against "de_AT", so we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'months' => array(1, 4), + 'format' => 'dd.MMMM.yy', + )) + ->createView(); + + $this->assertEquals(array( + new ChoiceView(1, '1', 'Jänner'), + new ChoiceView(4, '4', 'April'), + ), $view['month']->vars['choices']); + } + + public function testMonthsOptionLongFormatWithDifferentTimezone() + { + // we test against "de_AT", so we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'months' => array(1, 4), + 'format' => 'dd.MMMM.yy', + )) + ->createView(); + + $this->assertEquals(array( + new ChoiceView(1, '1', 'Jänner'), + new ChoiceView(4, '4', 'April'), + ), $view['month']->vars['choices']); + } + + public function testIsDayWithinRangeReturnsTrueIfWithin() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'days' => array(6, 7), + )) + ->createView(); + + $this->assertEquals(array( + new ChoiceView(6, '6', '06'), + new ChoiceView(7, '7', '07'), + ), $view['day']->vars['choices']); + } + + public function testIsSynchronizedReturnsTrueIfChoiceAndCompletelyEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'widget' => 'choice', + )); + + $form->submit(array( + 'day' => '', + 'month' => '', + 'year' => '', + )); + + $this->assertTrue($form->isSynchronized()); + } + + public function testIsSynchronizedReturnsTrueIfChoiceAndCompletelyFilled() + { + $form = $this->factory->create(static::TESTED_TYPE, new \DateTime(), array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'widget' => 'choice', + )); + + $form->submit(array( + 'day' => '0', + 'month' => '6', + 'year' => '2010', + )); + + $this->assertTrue($form->isSynchronized()); + } + + public function testIsSynchronizedReturnsFalseIfChoiceAndDayEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'widget' => 'choice', + )); + + $form->submit(array( + 'day' => '', + 'month' => '6', + 'year' => '2010', + )); + + $this->assertFalse($form->isSynchronized()); + } + + public function testPassDatePatternToView() + { + // we test against "de_AT", so we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $view = $this->factory->create(static::TESTED_TYPE) + ->createView(); + + $this->assertSame('{{ day }}{{ month }}{{ year }}', $view->vars['date_pattern']); + } + + public function testPassDatePatternToViewDifferentFormat() + { + // we test against "de_AT", so we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_AT'); + + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => \IntlDateFormatter::LONG, + )) + ->createView(); + + $this->assertSame('{{ day }}{{ month }}{{ year }}', $view->vars['date_pattern']); + } + + public function testPassDatePatternToViewDifferentPattern() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => 'MMyyyydd', + )) + ->createView(); + + $this->assertSame('{{ month }}{{ year }}{{ day }}', $view->vars['date_pattern']); + } + + public function testPassDatePatternToViewDifferentPatternWithSeparators() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'format' => 'MM*yyyy*dd', + )) + ->createView(); + + $this->assertSame('{{ month }}*{{ year }}*{{ day }}', $view->vars['date_pattern']); + } + + public function testDontPassDatePatternIfText() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + )) + ->createView(); + + $this->assertFalse(isset($view->vars['date_pattern'])); + } + + public function testDatePatternFormatWithQuotedStrings() + { + // we test against "es_ES", so we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('es_ES'); + + $view = $this->factory->create(static::TESTED_TYPE, null, array( + // EEEE, d 'de' MMMM 'de' y + 'format' => \IntlDateFormatter::FULL, + )) + ->createView(); + + $this->assertEquals('{{ day }}{{ month }}{{ year }}', $view->vars['date_pattern']); + } + + public function testPassWidgetToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + )) + ->createView(); + + $this->assertSame('single_text', $view->vars['widget']); + } + + public function testInitializeWithDateTime() + { + // Throws an exception if "data_class" option is not explicitly set + // to null in the type + $this->factory->create(static::TESTED_TYPE, new \DateTime()); + } + + public function testSingleTextWidgetShouldUseTheRightInputType() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + )) + ->createView(); + + $this->assertEquals('date', $view->vars['type']); + } + + public function testPassDefaultPlaceholderToViewIfNotRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => false, + )) + ->createView(); + + $this->assertSame('', $view['year']->vars['placeholder']); + $this->assertSame('', $view['month']->vars['placeholder']); + $this->assertSame('', $view['day']->vars['placeholder']); + } + + public function testPassNoPlaceholderToViewIfRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => true, + )) + ->createView(); + + $this->assertNull($view['year']->vars['placeholder']); + $this->assertNull($view['month']->vars['placeholder']); + $this->assertNull($view['day']->vars['placeholder']); + } + + public function testPassPlaceholderAsString() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'placeholder' => 'Empty', + )) + ->createView(); + + $this->assertSame('Empty', $view['year']->vars['placeholder']); + $this->assertSame('Empty', $view['month']->vars['placeholder']); + $this->assertSame('Empty', $view['day']->vars['placeholder']); + } + + public function testPassPlaceholderAsArray() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'placeholder' => array( + 'year' => 'Empty year', + 'month' => 'Empty month', + 'day' => 'Empty day', + ), + )) + ->createView(); + + $this->assertSame('Empty year', $view['year']->vars['placeholder']); + $this->assertSame('Empty month', $view['month']->vars['placeholder']); + $this->assertSame('Empty day', $view['day']->vars['placeholder']); + } + + public function testPassPlaceholderAsPartialArrayAddEmptyIfNotRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => false, + 'placeholder' => array( + 'year' => 'Empty year', + 'day' => 'Empty day', + ), + )) + ->createView(); + + $this->assertSame('Empty year', $view['year']->vars['placeholder']); + $this->assertSame('', $view['month']->vars['placeholder']); + $this->assertSame('Empty day', $view['day']->vars['placeholder']); + } + + public function testPassPlaceholderAsPartialArrayAddNullIfRequired() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => true, + 'placeholder' => array( + 'year' => 'Empty year', + 'day' => 'Empty day', + ), + )) + ->createView(); + + $this->assertSame('Empty year', $view['year']->vars['placeholder']); + $this->assertNull($view['month']->vars['placeholder']); + $this->assertSame('Empty day', $view['day']->vars['placeholder']); + } + + public function testPassHtml5TypeIfSingleTextAndHtml5Format() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + )) + ->createView(); + + $this->assertSame('date', $view->vars['type']); + } + + public function testDontPassHtml5TypeIfHtml5NotAllowed() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + 'html5' => false, + )) + ->createView(); + + $this->assertFalse(isset($view->vars['type'])); + } + + public function testDontPassHtml5TypeIfNotHtml5Format() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + 'format' => \IntlDateFormatter::MEDIUM, + )) + ->createView(); + + $this->assertFalse(isset($view->vars['type'])); + } + + public function testDontPassHtml5TypeIfNotSingleText() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'text', + )) + ->createView(); + + $this->assertFalse(isset($view->vars['type'])); + } + + public function provideCompoundWidgets() + { + return array( + array('text'), + array('choice'), + ); + } + + /** + * @dataProvider provideCompoundWidgets + */ + public function testYearErrorsBubbleUp($widget) + { + $error = new FormError('Invalid!'); + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => $widget, + )); + $form['year']->addError($error); + + $this->assertSame(array(), iterator_to_array($form['year']->getErrors())); + $this->assertSame(array($error), iterator_to_array($form->getErrors())); + } + + /** + * @dataProvider provideCompoundWidgets + */ + public function testMonthErrorsBubbleUp($widget) + { + $error = new FormError('Invalid!'); + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => $widget, + )); + $form['month']->addError($error); + + $this->assertSame(array(), iterator_to_array($form['month']->getErrors())); + $this->assertSame(array($error), iterator_to_array($form->getErrors())); + } + + /** + * @dataProvider provideCompoundWidgets + */ + public function testDayErrorsBubbleUp($widget) + { + $error = new FormError('Invalid!'); + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => $widget, + )); + $form['day']->addError($error); + + $this->assertSame(array(), iterator_to_array($form['day']->getErrors())); + $this->assertSame(array($error), iterator_to_array($form->getErrors())); + } + + public function testYearsFor32BitsMachines() + { + if (4 !== PHP_INT_SIZE) { + $this->markTestSkipped('PHP 32 bit is required.'); + } + + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'years' => range(1900, 2040), + )) + ->createView(); + + $listChoices = array(); + foreach (range(1902, 2037) as $y) { + $listChoices[] = new ChoiceView($y, $y, $y); + } + + $this->assertEquals($listChoices, $view['year']->vars['choices']); + } + + public function testPassDefaultChoiceTranslationDomain() + { + $form = $this->factory->create(static::TESTED_TYPE); + + $view = $form->createView(); + $this->assertFalse($view['year']->vars['choice_translation_domain']); + $this->assertFalse($view['month']->vars['choice_translation_domain']); + $this->assertFalse($view['day']->vars['choice_translation_domain']); + } + + public function testPassChoiceTranslationDomainAsString() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'choice_translation_domain' => 'messages', + )); + + $view = $form->createView(); + $this->assertSame('messages', $view['year']->vars['choice_translation_domain']); + $this->assertSame('messages', $view['month']->vars['choice_translation_domain']); + $this->assertSame('messages', $view['day']->vars['choice_translation_domain']); + } + + public function testPassChoiceTranslationDomainAsArray() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'choice_translation_domain' => array( + 'year' => 'foo', + 'day' => 'test', + ), + )); + + $view = $form->createView(); + $this->assertSame('foo', $view['year']->vars['choice_translation_domain']); + $this->assertFalse($view['month']->vars['choice_translation_domain']); + $this->assertSame('test', $view['day']->vars['choice_translation_domain']); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, array('year' => '', 'month' => '', 'day' => '')); + } + + public function testSubmitNullWithSingleText() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + )); + $form->submit(null); + + $this->assertNull($form->getData()); + $this->assertNull($form->getNormData()); + $this->assertSame('', $form->getViewData()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6f9b4d128d9aa6af1b593fcb6821499fab07e0d8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Forms; +use Symfony\Component\Form\Tests\Fixtures\ChoiceTypeExtension; + +class ExtendedChoiceTypeTest extends TestCase +{ + /** + * @dataProvider provideTestedTypes + */ + public function testChoicesAreOverridden($type) + { + $factory = Forms::createFormFactoryBuilder() + ->addTypeExtension(new ChoiceTypeExtension($type)) + ->getFormFactory() + ; + + $choices = $factory->create($type)->createView()->vars['choices']; + + $this->assertCount(2, $choices); + $this->assertSame('A', $choices[0]->label); + $this->assertSame('a', $choices[0]->value); + $this->assertSame('B', $choices[1]->label); + $this->assertSame('b', $choices[1]->value); + } + + public function provideTestedTypes() + { + yield array(CountryTypeTest::TESTED_TYPE); + yield array(CurrencyTypeTest::TESTED_TYPE); + yield array(LanguageTypeTest::TESTED_TYPE); + yield array(LocaleTypeTest::TESTED_TYPE); + yield array(TimezoneTypeTest::TESTED_TYPE); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1545e8ae9d4b1cf2b4a6bf5a0a3eb96a7a4490ce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php @@ -0,0 +1,137 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +class FileTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\FileType'; + + // https://github.com/symfony/symfony/pull/5028 + public function testSetData() + { + $form = $this->factory->createBuilder(static::TESTED_TYPE)->getForm(); + $data = $this->getMockBuilder('Symfony\Component\HttpFoundation\File\File') + ->setConstructorArgs(array(__DIR__.'/../../../Fixtures/foo', 'foo')) + ->getMock(); + + $form->setData($data); + + // Ensures the data class is defined to accept File instance + $this->assertSame($data, $form->getData()); + } + + public function testSubmit() + { + $form = $this->factory->createBuilder(static::TESTED_TYPE)->getForm(); + $data = $this->createUploadedFileMock('abcdef', 'original.jpg', true); + + $form->submit($data); + + $this->assertSame($data, $form->getData()); + } + + public function testSetDataMultiple() + { + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + 'multiple' => true, + ))->getForm(); + + $data = array( + $this->createUploadedFileMock('abcdef', 'first.jpg', true), + $this->createUploadedFileMock('zyxwvu', 'second.jpg', true), + ); + + $form->setData($data); + $this->assertSame($data, $form->getData()); + } + + public function testSubmitMultiple() + { + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + 'multiple' => true, + ))->getForm(); + + $data = array( + $this->createUploadedFileMock('abcdef', 'first.jpg', true), + $this->createUploadedFileMock('zyxwvu', 'second.jpg', true), + ); + + $form->submit($data); + $this->assertSame($data, $form->getData()); + + $view = $form->createView(); + $this->assertSame('file[]', $view->vars['full_name']); + $this->assertArrayHasKey('multiple', $view->vars['attr']); + } + + public function testDontPassValueToView() + { + $form = $this->factory->create(static::TESTED_TYPE); + $form->submit(array( + 'file' => $this->createUploadedFileMock('abcdef', 'original.jpg', true), + )); + + $this->assertEquals('', $form->createView()->vars['value']); + } + + public function testPassMultipartFalseToView() + { + $view = $this->factory->create(static::TESTED_TYPE) + ->createView(); + + $this->assertTrue($view->vars['multipart']); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, ''); + } + + public function testSubmitNullWhenMultiple() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'multiple' => true, + )); + // submitted data when an input file is uploaded without choosing any file + $form->submit(array(null)); + + $this->assertSame(array(), $form->getData()); + $this->assertSame(array(), $form->getNormData()); + $this->assertSame(array(), $form->getViewData()); + } + + private function createUploadedFileMock($name, $originalName, $valid) + { + $file = $this + ->getMockBuilder('Symfony\Component\HttpFoundation\File\UploadedFile') + ->setConstructorArgs(array(__DIR__.'/../../../Fixtures/foo', 'foo')) + ->getMock() + ; + $file + ->expects($this->any()) + ->method('getBasename') + ->will($this->returnValue($name)) + ; + $file + ->expects($this->any()) + ->method('getClientOriginalName') + ->will($this->returnValue($originalName)) + ; + $file + ->expects($this->any()) + ->method('isValid') + ->will($this->returnValue($valid)) + ; + + return $file; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..640c8761c260bcc307ef781d746913aadbe36a81 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php @@ -0,0 +1,637 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\PropertyAccess\PropertyPath; +use Symfony\Component\Form\CallbackTransformer; +use Symfony\Component\Form\Tests\Fixtures\Author; +use Symfony\Component\Form\Tests\Fixtures\FixedDataTransformer; +use Symfony\Component\Form\FormError; + +class FormTest_AuthorWithoutRefSetter +{ + protected $reference; + + protected $referenceCopy; + + public function __construct($reference) + { + $this->reference = $reference; + $this->referenceCopy = $reference; + } + + // The returned object should be modified by reference without having + // to provide a setReference() method + public function getReference() + { + return $this->reference; + } + + // The returned object is a copy, so setReferenceCopy() must be used + // to update it + public function getReferenceCopy() + { + return is_object($this->referenceCopy) ? clone $this->referenceCopy : $this->referenceCopy; + } + + public function setReferenceCopy($reference) + { + $this->referenceCopy = $reference; + } +} + +class FormTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\FormType'; + + public function testCreateFormInstances() + { + $this->assertInstanceOf('Symfony\Component\Form\Form', $this->factory->create(static::TESTED_TYPE)); + } + + public function testPassRequiredAsOption() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array('required' => false)); + + $this->assertFalse($form->isRequired()); + + $form = $this->factory->create(static::TESTED_TYPE, null, array('required' => true)); + + $this->assertTrue($form->isRequired()); + } + + public function testSubmittedDataIsTrimmedBeforeTransforming() + { + $form = $this->factory->createBuilder(static::TESTED_TYPE) + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'reverse[a]' => 'a', + ))) + ->setCompound(false) + ->getForm(); + + $form->submit(' a '); + + $this->assertEquals('a', $form->getViewData()); + $this->assertEquals('reverse[a]', $form->getData()); + } + + public function testSubmittedDataIsNotTrimmedBeforeTransformingIfNoTrimming() + { + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array('trim' => false)) + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'reverse[ a ]' => ' a ', + ))) + ->setCompound(false) + ->getForm(); + + $form->submit(' a '); + + $this->assertEquals(' a ', $form->getViewData()); + $this->assertEquals('reverse[ a ]', $form->getData()); + } + + public function testNonReadOnlyFormWithReadOnlyParentIsReadOnly() + { + $view = $this->factory->createNamedBuilder('parent', static::TESTED_TYPE, null, array('attr' => array('readonly' => true))) + ->add('child', static::TESTED_TYPE) + ->getForm() + ->createView(); + + $this->assertTrue($view['child']->vars['attr']['readonly']); + } + + public function testReadOnlyFormWithNonReadOnlyParentIsReadOnly() + { + $view = $this->factory->createNamedBuilder('parent', static::TESTED_TYPE) + ->add('child', static::TESTED_TYPE, array('attr' => array('readonly' => true))) + ->getForm() + ->createView(); + + $this->assertTrue($view['child']->vars['attr']['readonly']); + } + + public function testNonReadOnlyFormWithNonReadOnlyParentIsNotReadOnly() + { + $view = $this->factory->createNamedBuilder('parent', static::TESTED_TYPE) + ->add('child', static::TESTED_TYPE) + ->getForm() + ->createView(); + + $this->assertArrayNotHasKey('readonly', $view['child']->vars['attr']); + } + + public function testPassMaxLengthToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array('attr' => array('maxlength' => 10))) + ->createView(); + + $this->assertSame(10, $view->vars['attr']['maxlength']); + } + + public function testDataClassMayBeNull() + { + $this->factory->createBuilder(static::TESTED_TYPE, null, array( + 'data_class' => null, + )); + } + + public function testDataClassMayBeAbstractClass() + { + $this->factory->createBuilder(static::TESTED_TYPE, null, array( + 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AbstractAuthor', + )); + } + + public function testDataClassMayBeInterface() + { + $this->factory->createBuilder(static::TESTED_TYPE, null, array( + 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AuthorInterface', + )); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException + */ + public function testDataClassMustBeValidClassOrInterface() + { + $this->factory->createBuilder(static::TESTED_TYPE, null, array( + 'data_class' => 'foobar', + )); + } + + public function testSubmitWithEmptyDataCreatesObjectIfClassAvailable() + { + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', + 'required' => false, + )) + ->add('firstName', TextTypeTest::TESTED_TYPE) + ->add('lastName', TextTypeTest::TESTED_TYPE) + ->getForm(); + + $this->assertNull($form->getData()); + + // partially empty, still an object is created + $form->submit(array('firstName' => 'Bernhard', 'lastName' => '')); + + $author = new Author(); + $author->firstName = 'Bernhard'; + $author->setLastName(''); + + $this->assertEquals($author, $form->getData()); + } + + public function testSubmitWithDefaultDataDontCreateObject() + { + $defaultAuthor = new Author(); + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + // data class is inferred from the passed object + 'data' => $defaultAuthor, + 'required' => false, + )) + ->add('firstName', TextTypeTest::TESTED_TYPE) + ->add('lastName', TextTypeTest::TESTED_TYPE) + ->getForm(); + + // partially empty + $form->submit(array('firstName' => 'Bernhard', 'lastName' => '')); + + $author = new Author(); + $author->firstName = 'Bernhard'; + $author->setLastName(''); + + $this->assertEquals($author, $form->getData()); + $this->assertSame($defaultAuthor, $form->getData()); + } + + public function testSubmitWithEmptyDataCreatesArrayIfDataClassIsNull() + { + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + 'data_class' => null, + 'required' => false, + )) + ->add('firstName', TextTypeTest::TESTED_TYPE) + ->getForm(); + + $this->assertNull($form->getData()); + + $form->submit(array('firstName' => 'Bernhard')); + + $this->assertSame(array('firstName' => 'Bernhard'), $form->getData()); + } + + public function testSubmitEmptyWithEmptyDataDontCreateObjectIfNotRequired() + { + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', + 'required' => false, + )) + ->add('firstName', TextTypeTest::TESTED_TYPE) + ->add('lastName', TextTypeTest::TESTED_TYPE) + ->getForm(); + + $this->assertNull($form->getData()); + + $form->submit(array('firstName' => '', 'lastName' => '')); + + $this->assertNull($form->getData()); + } + + public function testSubmitEmptyWithEmptyDataCreatesObjectIfRequired() + { + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', + 'required' => true, + )) + ->add('firstName', TextTypeTest::TESTED_TYPE) + ->add('lastName', TextTypeTest::TESTED_TYPE) + ->getForm(); + + $this->assertNull($form->getData()); + + $form->submit(array('firstName' => '', 'lastName' => '')); + + $this->assertEquals(new Author(), $form->getData()); + } + + /* + * We need something to write the field values into + */ + public function testSubmitWithEmptyDataStoresArrayIfNoClassAvailable() + { + $form = $this->factory->createBuilder(static::TESTED_TYPE) + ->add('firstName', TextTypeTest::TESTED_TYPE) + ->getForm(); + + $this->assertNull($form->getData()); + + $form->submit(array('firstName' => 'Bernhard')); + + $this->assertSame(array('firstName' => 'Bernhard'), $form->getData()); + } + + public function testSubmitWithEmptyDataPassesEmptyStringToTransformerIfNotCompound() + { + $form = $this->factory->createBuilder(static::TESTED_TYPE) + ->addViewTransformer(new FixedDataTransformer(array( + // required for the initial, internal setData(null) + '' => 'null', + // required to test that submit(null) is converted to '' + 'empty' => '', + ))) + ->setCompound(false) + ->getForm(); + + $this->assertNull($form->getData()); + $this->assertNull($form->getNormData()); + $this->assertSame('null', $form->getViewData()); + + $form->submit(null); + + $this->assertSame('empty', $form->getData()); + $this->assertSame('empty', $form->getNormData()); + $this->assertSame('', $form->getViewData()); + } + + public function testSubmitWithEmptyDataUsesEmptyDataOption() + { + $author = new Author(); + + $form = $this->factory->createBuilder(static::TESTED_TYPE, null, array( + 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', + 'empty_data' => $author, + )) + ->add('firstName', TextTypeTest::TESTED_TYPE) + ->getForm(); + + $this->assertNull($form->getData()); + $this->assertNull($form->getViewData()); + + $form->submit(array('firstName' => 'Bernhard')); + + $this->assertSame($author, $form->getData()); + $this->assertEquals('Bernhard', $author->firstName); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testAttributesException() + { + $this->factory->create(static::TESTED_TYPE, null, array('attr' => '')); + } + + public function testNameCanBeEmptyString() + { + $form = $this->factory->createNamed('', static::TESTED_TYPE); + + $this->assertEquals('', $form->getName()); + } + + public function testSubformDoesntCallSettersForReferences() + { + $author = new FormTest_AuthorWithoutRefSetter(new Author()); + + $builder = $this->factory->createBuilder(static::TESTED_TYPE, $author); + $builder->add('reference', static::TESTED_TYPE, array( + 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', + )); + $builder->get('reference')->add('firstName', TextTypeTest::TESTED_TYPE); + $form = $builder->getForm(); + + $form->submit(array( + // reference has a getter, but no setter + 'reference' => array( + 'firstName' => 'Foo', + ), + )); + + $this->assertEquals('Foo', $author->getReference()->firstName); + } + + public function testSubformCallsSettersIfTheObjectChanged() + { + // no reference + $author = new FormTest_AuthorWithoutRefSetter(null); + $newReference = new Author(); + + $builder = $this->factory->createBuilder(static::TESTED_TYPE, $author); + $builder->add('referenceCopy', static::TESTED_TYPE, array( + 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', + )); + $builder->get('referenceCopy')->add('firstName', TextTypeTest::TESTED_TYPE); + $form = $builder->getForm(); + + $form['referenceCopy']->setData($newReference); // new author object + + $form->submit(array( + // referenceCopy has a getter that returns a copy + 'referenceCopy' => array( + 'firstName' => 'Foo', + ), + )); + + $this->assertEquals('Foo', $author->getReferenceCopy()->firstName); + } + + public function testSubformCallsSettersIfByReferenceIsFalse() + { + $author = new FormTest_AuthorWithoutRefSetter(new Author()); + + $builder = $this->factory->createBuilder(static::TESTED_TYPE, $author); + $builder->add('referenceCopy', static::TESTED_TYPE, array( + 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', + 'by_reference' => false, + )); + $builder->get('referenceCopy')->add('firstName', TextTypeTest::TESTED_TYPE); + $form = $builder->getForm(); + + $form->submit(array( + // referenceCopy has a getter that returns a copy + 'referenceCopy' => array( + 'firstName' => 'Foo', + ), + )); + + // firstName can only be updated if setReferenceCopy() was called + $this->assertEquals('Foo', $author->getReferenceCopy()->firstName); + } + + public function testSubformCallsSettersIfReferenceIsScalar() + { + $author = new FormTest_AuthorWithoutRefSetter('scalar'); + + $builder = $this->factory->createBuilder(static::TESTED_TYPE, $author); + $builder->add('referenceCopy', static::TESTED_TYPE); + $builder->get('referenceCopy')->addViewTransformer(new CallbackTransformer( + function () {}, + function ($value) { // reverseTransform + return 'foobar'; + } + )); + $form = $builder->getForm(); + + $form->submit(array( + 'referenceCopy' => array(), // doesn't matter actually + )); + + // firstName can only be updated if setReferenceCopy() was called + $this->assertEquals('foobar', $author->getReferenceCopy()); + } + + public function testSubformAlwaysInsertsIntoArrays() + { + $ref1 = new Author(); + $ref2 = new Author(); + $author = array('referenceCopy' => $ref1); + + $builder = $this->factory->createBuilder(static::TESTED_TYPE); + $builder->setData($author); + $builder->add('referenceCopy', static::TESTED_TYPE); + $builder->get('referenceCopy')->addViewTransformer(new CallbackTransformer( + function () {}, + function ($value) use ($ref2) { // reverseTransform + return $ref2; + } + )); + $form = $builder->getForm(); + + $form->submit(array( + 'referenceCopy' => array(), // doesn't matter actually + )); + + // the new reference was inserted into the array + $author = $form->getData(); + $this->assertSame($ref2, $author['referenceCopy']); + } + + public function testPassMultipartTrueIfAnyChildIsMultipartToView() + { + $view = $this->factory->createBuilder(static::TESTED_TYPE) + ->add('foo', TextTypeTest::TESTED_TYPE) + ->add('bar', FileTypeTest::TESTED_TYPE) + ->getForm() + ->createView(); + + $this->assertTrue($view->vars['multipart']); + } + + public function testViewIsNotRenderedByDefault() + { + $view = $this->factory->createBuilder(static::TESTED_TYPE) + ->add('foo', static::TESTED_TYPE) + ->getForm() + ->createView(); + + $this->assertFalse($view->isRendered()); + } + + public function testErrorBubblingIfCompound() + { + $form = $this->factory->create(static::TESTED_TYPE); + + $this->assertTrue($form->getConfig()->getErrorBubbling()); + } + + public function testNoErrorBubblingIfNotCompound() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'compound' => false, + )); + + $this->assertFalse($form->getConfig()->getErrorBubbling()); + } + + public function testOverrideErrorBubbling() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'compound' => false, + 'error_bubbling' => true, + )); + + $this->assertTrue($form->getConfig()->getErrorBubbling()); + } + + public function testPropertyPath() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'property_path' => 'foo', + )); + + $this->assertEquals(new PropertyPath('foo'), $form->getPropertyPath()); + $this->assertTrue($form->getConfig()->getMapped()); + } + + public function testPropertyPathNullImpliesDefault() + { + $form = $this->factory->createNamed('name', static::TESTED_TYPE, null, array( + 'property_path' => null, + )); + + $this->assertEquals(new PropertyPath('name'), $form->getPropertyPath()); + $this->assertTrue($form->getConfig()->getMapped()); + } + + public function testNotMapped() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'property_path' => 'foo', + 'mapped' => false, + )); + + $this->assertEquals(new PropertyPath('foo'), $form->getPropertyPath()); + $this->assertFalse($form->getConfig()->getMapped()); + } + + public function testViewValidNotSubmitted() + { + $view = $this->factory->create(static::TESTED_TYPE) + ->createView(); + + $this->assertTrue($view->vars['valid']); + } + + public function testViewNotValidSubmitted() + { + $form = $this->factory->create(static::TESTED_TYPE); + $form->submit(array()); + $form->addError(new FormError('An error')); + + $this->assertFalse($form->createView()->vars['valid']); + } + + public function testViewSubmittedNotSubmitted() + { + $view = $this->factory->create(static::TESTED_TYPE) + ->createView(); + + $this->assertFalse($view->vars['submitted']); + } + + public function testViewSubmittedSubmitted() + { + $form = $this->factory->create(static::TESTED_TYPE); + $form->submit(array()); + + $this->assertTrue($form->createView()->vars['submitted']); + } + + public function testDataOptionSupersedesSetDataCalls() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'data' => 'default', + 'compound' => false, + )); + + $form->setData('foobar'); + + $this->assertSame('default', $form->getData()); + } + + public function testPassedDataSupersedesSetDataCalls() + { + $form = $this->factory->create(static::TESTED_TYPE, 'default', array( + 'compound' => false, + )); + + $form->setData('foobar'); + + $this->assertSame('default', $form->getData()); + } + + public function testDataOptionSupersedesSetDataCallsIfNull() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'data' => null, + 'compound' => false, + )); + + $form->setData('foobar'); + + $this->assertNull($form->getData()); + } + + public function testNormDataIsPassedToView() + { + $view = $this->factory->createBuilder(static::TESTED_TYPE) + ->addModelTransformer(new FixedDataTransformer(array( + 'foo' => 'bar', + ))) + ->addViewTransformer(new FixedDataTransformer(array( + 'bar' => 'baz', + ))) + ->setData('foo') + ->getForm() + ->createView(); + + $this->assertSame('bar', $view->vars['data']); + $this->assertSame('baz', $view->vars['value']); + } + + // https://github.com/symfony/symfony/issues/6862 + public function testPassZeroLabelToView() + { + $view = $this->factory->create(static::TESTED_TYPE, null, array( + 'label' => '0', + )) + ->createView(); + + $this->assertSame('0', $view->vars['label']); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull(array(), array(), array()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..27a57eea79a698a79426d696cebf889938520996 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Intl\Util\IntlTestHelper; + +class IntegerTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\IntegerType'; + + protected function setUp() + { + IntlTestHelper::requireIntl($this, false); + + parent::setUp(); + } + + public function testSubmitCastsToInteger() + { + $form = $this->factory->create(static::TESTED_TYPE); + + $form->submit('1.678'); + + $this->assertSame(1, $form->getData()); + $this->assertSame('1', $form->getViewData()); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5ea3c4a7321655fc10fb84cdad1702c4df2e9c93 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\ChoiceList\View\ChoiceView; +use Symfony\Component\Intl\Util\IntlTestHelper; + +class LanguageTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\LanguageType'; + + protected function setUp() + { + IntlTestHelper::requireIntl($this, false); + + parent::setUp(); + } + + public function testCountriesAreSelectable() + { + $choices = $this->factory->create(static::TESTED_TYPE) + ->createView()->vars['choices']; + + $this->assertContains(new ChoiceView('en', 'en', 'English'), $choices, '', false, false); + $this->assertContains(new ChoiceView('en_GB', 'en_GB', 'British English'), $choices, '', false, false); + $this->assertContains(new ChoiceView('en_US', 'en_US', 'American English'), $choices, '', false, false); + $this->assertContains(new ChoiceView('fr', 'fr', 'French'), $choices, '', false, false); + $this->assertContains(new ChoiceView('my', 'my', 'Burmese'), $choices, '', false, false); + } + + public function testMultipleLanguagesIsNotIncluded() + { + $choices = $this->factory->create(static::TESTED_TYPE, 'language') + ->createView()->vars['choices']; + + $this->assertNotContains(new ChoiceView('mul', 'mul', 'Mehrsprachig'), $choices, '', false, false); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..58b94517d4572227565a0d6bb999b121927790f9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\ChoiceList\View\ChoiceView; +use Symfony\Component\Intl\Util\IntlTestHelper; + +class LocaleTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\LocaleType'; + + protected function setUp() + { + IntlTestHelper::requireIntl($this, false); + + parent::setUp(); + } + + public function testLocalesAreSelectable() + { + $choices = $this->factory->create(static::TESTED_TYPE) + ->createView()->vars['choices']; + + $this->assertContains(new ChoiceView('en', 'en', 'English'), $choices, '', false, false); + $this->assertContains(new ChoiceView('en_GB', 'en_GB', 'English (United Kingdom)'), $choices, '', false, false); + $this->assertContains(new ChoiceView('zh_Hant_MO', 'zh_Hant_MO', 'Chinese (Traditional, Macau SAR China)'), $choices, '', false, false); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..26098f3ddc56986294df637dfe497c8559b50c52 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.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\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Intl\Util\IntlTestHelper; + +class MoneyTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\MoneyType'; + + protected function setUp() + { + // we test against different locales, so we need the full + // implementation + IntlTestHelper::requireFullIntl($this, false); + + parent::setUp(); + } + + public function testPassMoneyPatternToView() + { + \Locale::setDefault('de_DE'); + + $view = $this->factory->create(static::TESTED_TYPE) + ->createView(); + + $this->assertSame('{{ widget }} €', $view->vars['money_pattern']); + } + + public function testMoneyPatternWorksForYen() + { + \Locale::setDefault('en_US'); + + $view = $this->factory->create(static::TESTED_TYPE, null, array('currency' => 'JPY')) + ->createView(); + + $this->assertTrue((bool) strstr($view->vars['money_pattern'], '¥')); + } + + // https://github.com/symfony/symfony/issues/5458 + public function testPassDifferentPatternsForDifferentCurrencies() + { + \Locale::setDefault('de_DE'); + + $view1 = $this->factory->create(static::TESTED_TYPE, null, array('currency' => 'GBP'))->createView(); + $view2 = $this->factory->create(static::TESTED_TYPE, null, array('currency' => 'EUR'))->createView(); + + $this->assertSame('{{ widget }} £', $view1->vars['money_pattern']); + $this->assertSame('{{ widget }} €', $view2->vars['money_pattern']); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1daec3c05913a36c16c01b6c0694b5c094c97a7a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Intl\Util\IntlTestHelper; + +class NumberTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\NumberType'; + + protected function setUp() + { + parent::setUp(); + + // we test against "de_DE", so we need the full implementation + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('de_DE'); + } + + public function testDefaultFormatting() + { + $form = $this->factory->create(static::TESTED_TYPE); + $form->setData('12345.67890'); + + $this->assertSame('12345,679', $form->createView()->vars['value']); + } + + public function testDefaultFormattingWithGrouping() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array('grouping' => true)); + $form->setData('12345.67890'); + + $this->assertSame('12.345,679', $form->createView()->vars['value']); + } + + public function testDefaultFormattingWithScale() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array('scale' => 2)); + $form->setData('12345.67890'); + + $this->assertSame('12345,68', $form->createView()->vars['value']); + } + + public function testDefaultFormattingWithRounding() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array('scale' => 0, 'rounding_mode' => \NumberFormatter::ROUND_UP)); + $form->setData('12345.54321'); + + $this->assertSame('12346', $form->createView()->vars['value']); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c48240c651f21dcd329b9253959c9bf1bb3ba28c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +class PasswordTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\PasswordType'; + + public function testEmptyIfNotSubmitted() + { + $form = $this->factory->create(static::TESTED_TYPE); + $form->setData('pAs5w0rd'); + + $this->assertSame('', $form->createView()->vars['value']); + } + + public function testEmptyIfSubmitted() + { + $form = $this->factory->create(static::TESTED_TYPE); + $form->submit('pAs5w0rd'); + + $this->assertSame('', $form->createView()->vars['value']); + } + + public function testNotEmptyIfSubmittedAndNotAlwaysEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array('always_empty' => false)); + $form->submit('pAs5w0rd'); + + $this->assertSame('pAs5w0rd', $form->createView()->vars['value']); + } + + public function testNotTrimmed() + { + $form = $this->factory->create(static::TESTED_TYPE, null); + $form->submit(' pAs5w0rd '); + + $this->assertSame(' pAs5w0rd ', $form->getData()); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8021abdb849865b50b1319cb958dd1a0d3b60dd1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php @@ -0,0 +1,193 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\Form; + +class RepeatedTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\RepeatedType'; + + /** + * @var Form + */ + protected $form; + + protected function setUp() + { + parent::setUp(); + + $this->form = $this->factory->create(static::TESTED_TYPE, null, array( + 'type' => TextTypeTest::TESTED_TYPE, + )); + } + + public function testSetData() + { + $this->form->setData('foobar'); + + $this->assertSame('foobar', $this->form['first']->getData()); + $this->assertSame('foobar', $this->form['second']->getData()); + } + + public function testSetOptions() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'type' => TextTypeTest::TESTED_TYPE, + 'options' => array('label' => 'Global'), + )); + + $this->assertSame('Global', $form['first']->getConfig()->getOption('label')); + $this->assertSame('Global', $form['second']->getConfig()->getOption('label')); + $this->assertTrue($form['first']->isRequired()); + $this->assertTrue($form['second']->isRequired()); + } + + public function testSetOptionsPerChild() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + // the global required value cannot be overridden + 'type' => TextTypeTest::TESTED_TYPE, + 'first_options' => array('label' => 'Test', 'required' => false), + 'second_options' => array('label' => 'Test2'), + )); + + $this->assertSame('Test', $form['first']->getConfig()->getOption('label')); + $this->assertSame('Test2', $form['second']->getConfig()->getOption('label')); + $this->assertTrue($form['first']->isRequired()); + $this->assertTrue($form['second']->isRequired()); + } + + public function testSetRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => false, + 'type' => TextTypeTest::TESTED_TYPE, + )); + + $this->assertFalse($form['first']->isRequired()); + $this->assertFalse($form['second']->isRequired()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testSetInvalidOptions() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'type' => TextTypeTest::TESTED_TYPE, + 'options' => 'bad value', + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testSetInvalidFirstOptions() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'type' => TextTypeTest::TESTED_TYPE, + 'first_options' => 'bad value', + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testSetInvalidSecondOptions() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'type' => TextTypeTest::TESTED_TYPE, + 'second_options' => 'bad value', + )); + } + + public function testSetErrorBubblingToTrue() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'error_bubbling' => true, + )); + + $this->assertTrue($form->getConfig()->getOption('error_bubbling')); + $this->assertTrue($form['first']->getConfig()->getOption('error_bubbling')); + $this->assertTrue($form['second']->getConfig()->getOption('error_bubbling')); + } + + public function testSetErrorBubblingToFalse() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'error_bubbling' => false, + )); + + $this->assertFalse($form->getConfig()->getOption('error_bubbling')); + $this->assertFalse($form['first']->getConfig()->getOption('error_bubbling')); + $this->assertFalse($form['second']->getConfig()->getOption('error_bubbling')); + } + + public function testSetErrorBubblingIndividually() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'error_bubbling' => true, + 'options' => array('error_bubbling' => false), + 'second_options' => array('error_bubbling' => true), + )); + + $this->assertTrue($form->getConfig()->getOption('error_bubbling')); + $this->assertFalse($form['first']->getConfig()->getOption('error_bubbling')); + $this->assertTrue($form['second']->getConfig()->getOption('error_bubbling')); + } + + public function testSetOptionsPerChildAndOverwrite() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'type' => TextTypeTest::TESTED_TYPE, + 'options' => array('label' => 'Label'), + 'second_options' => array('label' => 'Second label'), + )); + + $this->assertSame('Label', $form['first']->getConfig()->getOption('label')); + $this->assertSame('Second label', $form['second']->getConfig()->getOption('label')); + $this->assertTrue($form['first']->isRequired()); + $this->assertTrue($form['second']->isRequired()); + } + + public function testSubmitUnequal() + { + $input = array('first' => 'foo', 'second' => 'bar'); + + $this->form->submit($input); + + $this->assertSame('foo', $this->form['first']->getViewData()); + $this->assertSame('bar', $this->form['second']->getViewData()); + $this->assertFalse($this->form->isSynchronized()); + $this->assertSame($input, $this->form->getViewData()); + $this->assertNull($this->form->getData()); + } + + public function testSubmitEqual() + { + $input = array('first' => 'foo', 'second' => 'foo'); + + $this->form->submit($input); + + $this->assertSame('foo', $this->form['first']->getViewData()); + $this->assertSame('foo', $this->form['second']->getViewData()); + $this->assertTrue($this->form->isSynchronized()); + $this->assertSame($input, $this->form->getViewData()); + $this->assertSame('foo', $this->form->getData()); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, array('first' => null, 'second' => null)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/SubmitTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/SubmitTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e86704bcfb2ad0f8488fc0ef4e19d98ee2999c86 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/SubmitTypeTest.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\Component\Form\Tests\Extension\Core\Type; + +/** + * @author Bernhard Schussek + */ +class SubmitTypeTest extends ButtonTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\SubmitType'; + + public function testCreateSubmitButtonInstances() + { + $this->assertInstanceOf('Symfony\Component\Form\SubmitButton', $this->factory->create(static::TESTED_TYPE)); + } + + public function testNotClickedByDefault() + { + $button = $this->factory->create(static::TESTED_TYPE); + + $this->assertFalse($button->isClicked()); + } + + public function testNotClickedIfSubmittedWithNull() + { + $button = $this->factory->create(static::TESTED_TYPE); + $button->submit(null); + + $this->assertFalse($button->isClicked()); + } + + public function testClickedIfSubmittedWithEmptyString() + { + $button = $this->factory->create(static::TESTED_TYPE); + $button->submit(''); + + $this->assertTrue($button->isClicked()); + } + + public function testClickedIfSubmittedWithUnemptyString() + { + $button = $this->factory->create(static::TESTED_TYPE); + $button->submit('foo'); + + $this->assertTrue($button->isClicked()); + } + + public function testSubmitCanBeAddedToForm() + { + $form = $this->factory + ->createBuilder(FormTypeTest::TESTED_TYPE) + ->getForm(); + + $this->assertSame($form, $form->add('send', static::TESTED_TYPE)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c4dba3734876a8475358e85cfa5e2626fedfe7c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +class TextTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\TextType'; + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, ''); + } + + public function testSubmitNullReturnsNullWithEmptyDataAsString() + { + $form = $this->factory->create(static::TESTED_TYPE, 'name', array( + 'empty_data' => '', + )); + + $form->submit(null); + $this->assertSame('', $form->getData()); + $this->assertSame('', $form->getNormData()); + $this->assertSame('', $form->getViewData()); + } + + public function provideZeros() + { + return array( + array(0, '0'), + array('0', '0'), + array('00000', '00000'), + ); + } + + /** + * @dataProvider provideZeros + * + * @see https://github.com/symfony/symfony/issues/1986 + */ + public function testSetDataThroughParamsWithZero($data, $dataAsString) + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'data' => $data, + )); + $view = $form->createView(); + + $this->assertFalse($form->isEmpty()); + + $this->assertSame($dataAsString, $view->vars['value']); + $this->assertSame($dataAsString, $form->getData()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a0913e8068084410ed97e4237a5b770922698de1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php @@ -0,0 +1,771 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\ChoiceList\View\ChoiceView; +use Symfony\Component\Form\FormError; + +class TimeTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\TimeType'; + + public function testSubmitDateTime() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'datetime', + )); + + $input = array( + 'hour' => '3', + 'minute' => '4', + ); + + $form->submit($input); + + $dateTime = new \DateTime('1970-01-01 03:04:00 UTC'); + + $this->assertEquals($dateTime, $form->getData()); + $this->assertEquals($input, $form->getViewData()); + } + + public function testSubmitString() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'string', + )); + + $input = array( + 'hour' => '3', + 'minute' => '4', + ); + + $form->submit($input); + + $this->assertEquals('03:04:00', $form->getData()); + $this->assertEquals($input, $form->getViewData()); + } + + public function testSubmitTimestamp() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'timestamp', + )); + + $input = array( + 'hour' => '3', + 'minute' => '4', + ); + + $form->submit($input); + + $dateTime = new \DateTime('1970-01-01 03:04:00 UTC'); + + $this->assertEquals($dateTime->format('U'), $form->getData()); + $this->assertEquals($input, $form->getViewData()); + } + + public function testSubmitArray() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'array', + )); + + $input = array( + 'hour' => '3', + 'minute' => '4', + ); + + $form->submit($input); + + $this->assertEquals($input, $form->getData()); + $this->assertEquals($input, $form->getViewData()); + } + + public function testSubmitDatetimeSingleText() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'datetime', + 'widget' => 'single_text', + )); + + $form->submit('03:04'); + + $this->assertEquals(new \DateTime('1970-01-01 03:04:00 UTC'), $form->getData()); + $this->assertEquals('03:04', $form->getViewData()); + } + + public function testSubmitDatetimeSingleTextWithoutMinutes() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'datetime', + 'widget' => 'single_text', + 'with_minutes' => false, + )); + + $form->submit('03'); + + $this->assertEquals(new \DateTime('1970-01-01 03:00:00 UTC'), $form->getData()); + $this->assertEquals('03', $form->getViewData()); + } + + public function testSubmitArraySingleText() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'array', + 'widget' => 'single_text', + )); + + $data = array( + 'hour' => '3', + 'minute' => '4', + ); + + $form->submit('03:04'); + + $this->assertEquals($data, $form->getData()); + $this->assertEquals('03:04', $form->getViewData()); + } + + public function testSubmitArraySingleTextWithoutMinutes() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'array', + 'widget' => 'single_text', + 'with_minutes' => false, + )); + + $data = array( + 'hour' => '3', + ); + + $form->submit('03'); + + $this->assertEquals($data, $form->getData()); + $this->assertEquals('03', $form->getViewData()); + } + + public function testSubmitArraySingleTextWithSeconds() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'array', + 'widget' => 'single_text', + 'with_seconds' => true, + )); + + $data = array( + 'hour' => '3', + 'minute' => '4', + 'second' => '5', + ); + + $form->submit('03:04:05'); + + $this->assertEquals($data, $form->getData()); + $this->assertEquals('03:04:05', $form->getViewData()); + } + + public function testSubmitStringSingleText() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'string', + 'widget' => 'single_text', + )); + + $form->submit('03:04'); + + $this->assertEquals('03:04:00', $form->getData()); + $this->assertEquals('03:04', $form->getViewData()); + } + + public function testSubmitStringSingleTextWithoutMinutes() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'string', + 'widget' => 'single_text', + 'with_minutes' => false, + )); + + $form->submit('03'); + + $this->assertEquals('03:00:00', $form->getData()); + $this->assertEquals('03', $form->getViewData()); + } + + public function testSubmitWithSecondsAndBrowserOmissionSeconds() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'string', + 'widget' => 'single_text', + 'with_seconds' => true, + )); + + $form->submit('03:04'); + + $this->assertEquals('03:04:00', $form->getData()); + $this->assertEquals('03:04:00', $form->getViewData()); + } + + public function testSetDataWithoutMinutes() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'datetime', + 'with_minutes' => false, + )); + + $form->setData(new \DateTime('03:04:05 UTC')); + + $this->assertEquals(array('hour' => 3), $form->getViewData()); + } + + public function testSetDataWithSeconds() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'UTC', + 'view_timezone' => 'UTC', + 'input' => 'datetime', + 'with_seconds' => true, + )); + + $form->setData(new \DateTime('03:04:05 UTC')); + + $this->assertEquals(array('hour' => 3, 'minute' => 4, 'second' => 5), $form->getViewData()); + } + + public function testSetDataDifferentTimezones() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'America/New_York', + 'view_timezone' => 'Asia/Hong_Kong', + 'input' => 'string', + 'with_seconds' => true, + )); + + $dateTime = new \DateTime('2013-01-01 12:04:05'); + $dateTime->setTimezone(new \DateTimeZone('America/New_York')); + + $form->setData($dateTime->format('H:i:s')); + + $outputTime = clone $dateTime; + $outputTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); + + $displayedData = array( + 'hour' => (int) $outputTime->format('H'), + 'minute' => (int) $outputTime->format('i'), + 'second' => (int) $outputTime->format('s'), + ); + + $this->assertEquals($displayedData, $form->getViewData()); + } + + public function testSetDataDifferentTimezonesDateTime() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'model_timezone' => 'America/New_York', + 'view_timezone' => 'Asia/Hong_Kong', + 'input' => 'datetime', + 'with_seconds' => true, + )); + + $dateTime = new \DateTime('12:04:05'); + $dateTime->setTimezone(new \DateTimeZone('America/New_York')); + + $form->setData($dateTime); + + $outputTime = clone $dateTime; + $outputTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); + + $displayedData = array( + 'hour' => (int) $outputTime->format('H'), + 'minute' => (int) $outputTime->format('i'), + 'second' => (int) $outputTime->format('s'), + ); + + $this->assertDateTimeEquals($dateTime, $form->getData()); + $this->assertEquals($displayedData, $form->getViewData()); + } + + public function testHoursOption() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'hours' => array(6, 7), + )); + + $view = $form->createView(); + + $this->assertEquals(array( + new ChoiceView('6', '6', '06'), + new ChoiceView('7', '7', '07'), + ), $view['hour']->vars['choices']); + } + + public function testIsMinuteWithinRangeReturnsTrueIfWithin() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'minutes' => array(6, 7), + )); + + $view = $form->createView(); + + $this->assertEquals(array( + new ChoiceView('6', '6', '06'), + new ChoiceView('7', '7', '07'), + ), $view['minute']->vars['choices']); + } + + public function testIsSecondWithinRangeReturnsTrueIfWithin() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'seconds' => array(6, 7), + 'with_seconds' => true, + )); + + $view = $form->createView(); + + $this->assertEquals(array( + new ChoiceView('6', '6', '06'), + new ChoiceView('7', '7', '07'), + ), $view['second']->vars['choices']); + } + + public function testIsPartiallyFilledReturnsFalseIfCompletelyEmpty() + { + $this->markTestIncomplete('Needs to be reimplemented using validators'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'choice', + )); + + $form->submit(array( + 'hour' => '', + 'minute' => '', + )); + + $this->assertFalse($form->isPartiallyFilled()); + } + + public function testIsPartiallyFilledReturnsFalseIfCompletelyEmptyWithSeconds() + { + $this->markTestIncomplete('Needs to be reimplemented using validators'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'choice', + 'with_seconds' => true, + )); + + $form->submit(array( + 'hour' => '', + 'minute' => '', + 'second' => '', + )); + + $this->assertFalse($form->isPartiallyFilled()); + } + + public function testIsPartiallyFilledReturnsFalseIfCompletelyFilled() + { + $this->markTestIncomplete('Needs to be reimplemented using validators'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'choice', + )); + + $form->submit(array( + 'hour' => '0', + 'minute' => '0', + )); + + $this->assertFalse($form->isPartiallyFilled()); + } + + public function testIsPartiallyFilledReturnsFalseIfCompletelyFilledWithSeconds() + { + $this->markTestIncomplete('Needs to be reimplemented using validators'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'choice', + 'with_seconds' => true, + )); + + $form->submit(array( + 'hour' => '0', + 'minute' => '0', + 'second' => '0', + )); + + $this->assertFalse($form->isPartiallyFilled()); + } + + public function testIsPartiallyFilledReturnsTrueIfChoiceAndHourEmpty() + { + $this->markTestIncomplete('Needs to be reimplemented using validators'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'choice', + 'with_seconds' => true, + )); + + $form->submit(array( + 'hour' => '', + 'minute' => '0', + 'second' => '0', + )); + + $this->assertTrue($form->isPartiallyFilled()); + } + + public function testIsPartiallyFilledReturnsTrueIfChoiceAndMinuteEmpty() + { + $this->markTestIncomplete('Needs to be reimplemented using validators'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'choice', + 'with_seconds' => true, + )); + + $form->submit(array( + 'hour' => '0', + 'minute' => '', + 'second' => '0', + )); + + $this->assertTrue($form->isPartiallyFilled()); + } + + public function testIsPartiallyFilledReturnsTrueIfChoiceAndSecondsEmpty() + { + $this->markTestIncomplete('Needs to be reimplemented using validators'); + + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'choice', + 'with_seconds' => true, + )); + + $form->submit(array( + 'hour' => '0', + 'minute' => '0', + 'second' => '', + )); + + $this->assertTrue($form->isPartiallyFilled()); + } + + public function testInitializeWithDateTime() + { + // Throws an exception if "data_class" option is not explicitly set + // to null in the type + $this->factory->create(static::TESTED_TYPE, new \DateTime()); + } + + public function testSingleTextWidgetShouldUseTheRightInputType() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + )); + + $view = $form->createView(); + $this->assertEquals('time', $view->vars['type']); + } + + public function testSingleTextWidgetWithSecondsShouldHaveRightStepAttribute() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + 'with_seconds' => true, + )); + + $view = $form->createView(); + $this->assertArrayHasKey('step', $view->vars['attr']); + $this->assertEquals(1, $view->vars['attr']['step']); + } + + public function testSingleTextWidgetWithSecondsShouldNotOverrideStepAttribute() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + 'with_seconds' => true, + 'attr' => array( + 'step' => 30, + ), + )); + + $view = $form->createView(); + $this->assertArrayHasKey('step', $view->vars['attr']); + $this->assertEquals(30, $view->vars['attr']['step']); + } + + public function testDontPassHtml5TypeIfHtml5NotAllowed() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => 'single_text', + 'html5' => false, + )); + + $view = $form->createView(); + $this->assertFalse(isset($view->vars['type'])); + } + + public function testPassDefaultPlaceholderToViewIfNotRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => false, + 'with_seconds' => true, + )); + + $view = $form->createView(); + $this->assertSame('', $view['hour']->vars['placeholder']); + $this->assertSame('', $view['minute']->vars['placeholder']); + $this->assertSame('', $view['second']->vars['placeholder']); + } + + public function testPassNoPlaceholderToViewIfRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => true, + 'with_seconds' => true, + )); + + $view = $form->createView(); + $this->assertNull($view['hour']->vars['placeholder']); + $this->assertNull($view['minute']->vars['placeholder']); + $this->assertNull($view['second']->vars['placeholder']); + } + + public function testPassPlaceholderAsString() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'placeholder' => 'Empty', + 'with_seconds' => true, + )); + + $view = $form->createView(); + $this->assertSame('Empty', $view['hour']->vars['placeholder']); + $this->assertSame('Empty', $view['minute']->vars['placeholder']); + $this->assertSame('Empty', $view['second']->vars['placeholder']); + } + + public function testPassPlaceholderAsArray() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'placeholder' => array( + 'hour' => 'Empty hour', + 'minute' => 'Empty minute', + 'second' => 'Empty second', + ), + 'with_seconds' => true, + )); + + $view = $form->createView(); + $this->assertSame('Empty hour', $view['hour']->vars['placeholder']); + $this->assertSame('Empty minute', $view['minute']->vars['placeholder']); + $this->assertSame('Empty second', $view['second']->vars['placeholder']); + } + + public function testPassPlaceholderAsPartialArrayAddEmptyIfNotRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => false, + 'placeholder' => array( + 'hour' => 'Empty hour', + 'second' => 'Empty second', + ), + 'with_seconds' => true, + )); + + $view = $form->createView(); + $this->assertSame('Empty hour', $view['hour']->vars['placeholder']); + $this->assertSame('', $view['minute']->vars['placeholder']); + $this->assertSame('Empty second', $view['second']->vars['placeholder']); + } + + public function testPassPlaceholderAsPartialArrayAddNullIfRequired() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'required' => true, + 'placeholder' => array( + 'hour' => 'Empty hour', + 'second' => 'Empty second', + ), + 'with_seconds' => true, + )); + + $view = $form->createView(); + $this->assertSame('Empty hour', $view['hour']->vars['placeholder']); + $this->assertNull($view['minute']->vars['placeholder']); + $this->assertSame('Empty second', $view['second']->vars['placeholder']); + } + + public function provideCompoundWidgets() + { + return array( + array('text'), + array('choice'), + ); + } + + /** + * @dataProvider provideCompoundWidgets + */ + public function testHourErrorsBubbleUp($widget) + { + $error = new FormError('Invalid!'); + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => $widget, + )); + $form['hour']->addError($error); + + $this->assertSame(array(), iterator_to_array($form['hour']->getErrors())); + $this->assertSame(array($error), iterator_to_array($form->getErrors())); + } + + /** + * @dataProvider provideCompoundWidgets + */ + public function testMinuteErrorsBubbleUp($widget) + { + $error = new FormError('Invalid!'); + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => $widget, + )); + $form['minute']->addError($error); + + $this->assertSame(array(), iterator_to_array($form['minute']->getErrors())); + $this->assertSame(array($error), iterator_to_array($form->getErrors())); + } + + /** + * @dataProvider provideCompoundWidgets + */ + public function testSecondErrorsBubbleUp($widget) + { + $error = new FormError('Invalid!'); + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'widget' => $widget, + 'with_seconds' => true, + )); + $form['second']->addError($error); + + $this->assertSame(array(), iterator_to_array($form['second']->getErrors())); + $this->assertSame(array($error), iterator_to_array($form->getErrors())); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\InvalidConfigurationException + */ + public function testInitializeWithSecondsAndWithoutMinutes() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'with_minutes' => false, + 'with_seconds' => true, + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testThrowExceptionIfHoursIsInvalid() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'hours' => 'bad value', + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testThrowExceptionIfMinutesIsInvalid() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'minutes' => 'bad value', + )); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testThrowExceptionIfSecondsIsInvalid() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'seconds' => 'bad value', + )); + } + + public function testPassDefaultChoiceTranslationDomain() + { + $form = $this->factory->create(static::TESTED_TYPE); + + $view = $form->createView(); + $this->assertFalse($view['hour']->vars['choice_translation_domain']); + $this->assertFalse($view['minute']->vars['choice_translation_domain']); + } + + public function testPassChoiceTranslationDomainAsString() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'choice_translation_domain' => 'messages', + 'with_seconds' => true, + )); + + $view = $form->createView(); + $this->assertSame('messages', $view['hour']->vars['choice_translation_domain']); + $this->assertSame('messages', $view['minute']->vars['choice_translation_domain']); + $this->assertSame('messages', $view['second']->vars['choice_translation_domain']); + } + + public function testPassChoiceTranslationDomainAsArray() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'choice_translation_domain' => array( + 'hour' => 'foo', + 'second' => 'test', + ), + 'with_seconds' => true, + )); + + $view = $form->createView(); + $this->assertSame('foo', $view['hour']->vars['choice_translation_domain']); + $this->assertFalse($view['minute']->vars['choice_translation_domain']); + $this->assertSame('test', $view['second']->vars['choice_translation_domain']); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + $view = array('hour' => '', 'minute' => ''); + + parent::testSubmitNull($expected, $norm, $view); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8682efed6935648f8c00c5e00ecc042283eb1bf2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.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\Component\Form\Tests\Extension\Core\Type; + +use Symfony\Component\Form\ChoiceList\View\ChoiceView; + +class TimezoneTypeTest extends BaseTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\TimezoneType'; + + public function testTimezonesAreSelectable() + { + $choices = $this->factory->create(static::TESTED_TYPE) + ->createView()->vars['choices']; + + $this->assertArrayHasKey('Africa', $choices); + $this->assertContains(new ChoiceView('Africa/Kinshasa', 'Africa/Kinshasa', 'Kinshasa'), $choices['Africa'], '', false, false); + + $this->assertArrayHasKey('America', $choices); + $this->assertContains(new ChoiceView('America/New_York', 'America/New_York', 'New York'), $choices['America'], '', false, false); + } + + public function testSubmitNull($expected = null, $norm = null, $view = null) + { + parent::testSubmitNull($expected, $norm, ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ad2d955b317d29f926ec2b91adbe2a8286dafa2c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\Type; + +class UrlTypeTest extends TextTypeTest +{ + const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\UrlType'; + + public function testSubmitAddsDefaultProtocolIfNoneIsIncluded() + { + $form = $this->factory->create(static::TESTED_TYPE, 'name'); + + $form->submit('www.domain.com'); + + $this->assertSame('http://www.domain.com', $form->getData()); + $this->assertSame('http://www.domain.com', $form->getViewData()); + } + + public function testSubmitAddsNoDefaultProtocolIfAlreadyIncluded() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'default_protocol' => 'http', + )); + + $form->submit('ftp://www.domain.com'); + + $this->assertSame('ftp://www.domain.com', $form->getData()); + $this->assertSame('ftp://www.domain.com', $form->getViewData()); + } + + public function testSubmitAddsNoDefaultProtocolIfEmpty() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'default_protocol' => 'http', + )); + + $form->submit(''); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData()); + } + + public function testSubmitAddsNoDefaultProtocolIfNull() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'default_protocol' => 'http', + )); + + $form->submit(null); + + $this->assertNull($form->getData()); + $this->assertSame('', $form->getViewData()); + } + + public function testSubmitAddsNoDefaultProtocolIfSetToNull() + { + $form = $this->factory->create(static::TESTED_TYPE, null, array( + 'default_protocol' => null, + )); + + $form->submit('www.domain.com'); + + $this->assertSame('www.domain.com', $form->getData()); + $this->assertSame('www.domain.com', $form->getViewData()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testThrowExceptionIfDefaultProtocolIsInvalid() + { + $this->factory->create(static::TESTED_TYPE, null, array( + 'default_protocol' => array(), + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fc0dee140b047d8c10041382153a73517a6ef601 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Csrf\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Form; +use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormEvent; +use Symfony\Component\Form\Extension\Csrf\EventListener\CsrfValidationListener; + +class CsrfValidationListenerTest extends TestCase +{ + protected $dispatcher; + protected $factory; + protected $tokenManager; + protected $form; + + protected function setUp() + { + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $this->tokenManager = $this->getMockBuilder('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')->getMock(); + $this->form = $this->getBuilder('post') + ->setDataMapper($this->getDataMapper()) + ->getForm(); + } + + protected function tearDown() + { + $this->dispatcher = null; + $this->factory = null; + $this->tokenManager = null; + $this->form = null; + } + + protected function getBuilder($name = 'name') + { + return new FormBuilder($name, null, $this->dispatcher, $this->factory, array('compound' => true)); + } + + protected function getForm($name = 'name') + { + return $this->getBuilder($name)->getForm(); + } + + protected function getDataMapper() + { + return $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); + } + + protected function getMockForm() + { + return $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + } + + // https://github.com/symfony/symfony/pull/5838 + public function testStringFormData() + { + $data = 'XP4HUzmHPi'; + $event = new FormEvent($this->form, $data); + + $validation = new CsrfValidationListener('csrf', $this->tokenManager, 'unknown', 'Invalid.'); + $validation->preSubmit($event); + + // Validate accordingly + $this->assertSame($data, $event->getData()); + } + + public function testMaxPostSizeExceeded() + { + $serverParams = $this + ->getMockBuilder('\Symfony\Component\Form\Util\ServerParams') + ->disableOriginalConstructor() + ->getMock() + ; + + $serverParams + ->expects($this->once()) + ->method('hasPostMaxSizeBeenExceeded') + ->willReturn(true) + ; + + $event = new FormEvent($this->form, array('csrf' => 'token')); + $validation = new CsrfValidationListener('csrf', $this->tokenManager, 'unknown', 'Error message', null, null, $serverParams); + + $validation->preSubmit($event); + $this->assertEmpty($this->form->getErrors()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0e7261cc2e3c2a83d4b3005446ea64c2ac5e23b4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php @@ -0,0 +1,397 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Csrf\Type; + +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\FormError; +use Symfony\Component\Form\Test\TypeTestCase; +use Symfony\Component\Form\Extension\Csrf\CsrfExtension; +use Symfony\Component\Security\Csrf\CsrfToken; + +class FormTypeCsrfExtensionTest_ChildType extends AbstractType +{ + public function buildForm(FormBuilderInterface $builder, array $options) + { + // The form needs a child in order to trigger CSRF protection by + // default + $builder->add('name', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + } +} + +class FormTypeCsrfExtensionTest extends TypeTestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $tokenManager; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $translator; + + protected function setUp() + { + $this->tokenManager = $this->getMockBuilder('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')->getMock(); + $this->translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock(); + + parent::setUp(); + } + + protected function tearDown() + { + $this->tokenManager = null; + $this->translator = null; + + parent::tearDown(); + } + + protected function getExtensions() + { + return array_merge(parent::getExtensions(), array( + new CsrfExtension($this->tokenManager, $this->translator), + )); + } + + public function testCsrfProtectionByDefaultIfRootAndCompound() + { + $view = $this->factory + ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'compound' => true, + )) + ->createView(); + + $this->assertTrue(isset($view['csrf'])); + } + + public function testNoCsrfProtectionByDefaultIfCompoundButNotRoot() + { + $view = $this->factory + ->createNamedBuilder('root', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add($this->factory + ->createNamedBuilder('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'compound' => true, + )) + ) + ->getForm() + ->get('form') + ->createView(); + + $this->assertFalse(isset($view['csrf'])); + } + + public function testNoCsrfProtectionByDefaultIfRootButNotCompound() + { + $view = $this->factory + ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'compound' => false, + )) + ->createView(); + + $this->assertFalse(isset($view['csrf'])); + } + + public function testCsrfProtectionCanBeDisabled() + { + $view = $this->factory + ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'csrf_protection' => false, + 'compound' => true, + )) + ->createView(); + + $this->assertFalse(isset($view['csrf'])); + } + + public function testGenerateCsrfToken() + { + $this->tokenManager->expects($this->once()) + ->method('getToken') + ->with('TOKEN_ID') + ->will($this->returnValue(new CsrfToken('TOKEN_ID', 'token'))); + + $view = $this->factory + ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'csrf_token_manager' => $this->tokenManager, + 'csrf_token_id' => 'TOKEN_ID', + 'compound' => true, + )) + ->createView(); + + $this->assertEquals('token', $view['csrf']->vars['value']); + } + + public function testGenerateCsrfTokenUsesFormNameAsIntentionByDefault() + { + $this->tokenManager->expects($this->once()) + ->method('getToken') + ->with('FORM_NAME') + ->will($this->returnValue('token')); + + $view = $this->factory + ->createNamed('FORM_NAME', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'csrf_token_manager' => $this->tokenManager, + 'compound' => true, + )) + ->createView(); + + $this->assertEquals('token', $view['csrf']->vars['value']); + } + + public function testGenerateCsrfTokenUsesTypeClassAsIntentionIfEmptyFormName() + { + $this->tokenManager->expects($this->once()) + ->method('getToken') + ->with('Symfony\Component\Form\Extension\Core\Type\FormType') + ->will($this->returnValue('token')); + + $view = $this->factory + ->createNamed('', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'csrf_token_manager' => $this->tokenManager, + 'compound' => true, + )) + ->createView(); + + $this->assertEquals('token', $view['csrf']->vars['value']); + } + + public function provideBoolean() + { + return array( + array(true), + array(false), + ); + } + + /** + * @dataProvider provideBoolean + */ + public function testValidateTokenOnSubmitIfRootAndCompound($valid) + { + $this->tokenManager->expects($this->once()) + ->method('isTokenValid') + ->with(new CsrfToken('TOKEN_ID', 'token')) + ->will($this->returnValue($valid)); + + $form = $this->factory + ->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'csrf_token_manager' => $this->tokenManager, + 'csrf_token_id' => 'TOKEN_ID', + 'compound' => true, + )) + ->add('child', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm(); + + $form->submit(array( + 'child' => 'foobar', + 'csrf' => 'token', + )); + + // Remove token from data + $this->assertSame(array('child' => 'foobar'), $form->getData()); + + // Validate accordingly + $this->assertSame($valid, $form->isValid()); + } + + /** + * @dataProvider provideBoolean + */ + public function testValidateTokenOnSubmitIfRootAndCompoundUsesFormNameAsIntentionByDefault($valid) + { + $this->tokenManager->expects($this->once()) + ->method('isTokenValid') + ->with(new CsrfToken('FORM_NAME', 'token')) + ->will($this->returnValue($valid)); + + $form = $this->factory + ->createNamedBuilder('FORM_NAME', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'csrf_token_manager' => $this->tokenManager, + 'compound' => true, + )) + ->add('child', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm(); + + $form->submit(array( + 'child' => 'foobar', + 'csrf' => 'token', + )); + + // Remove token from data + $this->assertSame(array('child' => 'foobar'), $form->getData()); + + // Validate accordingly + $this->assertSame($valid, $form->isValid()); + } + + /** + * @dataProvider provideBoolean + */ + public function testValidateTokenOnSubmitIfRootAndCompoundUsesTypeClassAsIntentionIfEmptyFormName($valid) + { + $this->tokenManager->expects($this->once()) + ->method('isTokenValid') + ->with(new CsrfToken('Symfony\Component\Form\Extension\Core\Type\FormType', 'token')) + ->will($this->returnValue($valid)); + + $form = $this->factory + ->createNamedBuilder('', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'csrf_token_manager' => $this->tokenManager, + 'compound' => true, + )) + ->add('child', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm(); + + $form->submit(array( + 'child' => 'foobar', + 'csrf' => 'token', + )); + + // Remove token from data + $this->assertSame(array('child' => 'foobar'), $form->getData()); + + // Validate accordingly + $this->assertSame($valid, $form->isValid()); + } + + public function testFailIfRootAndCompoundAndTokenMissing() + { + $this->tokenManager->expects($this->never()) + ->method('isTokenValid'); + + $form = $this->factory + ->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'csrf_token_manager' => $this->tokenManager, + 'csrf_token_id' => 'TOKEN_ID', + 'compound' => true, + )) + ->add('child', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->getForm(); + + $form->submit(array( + 'child' => 'foobar', + // token is missing + )); + + // Remove token from data + $this->assertSame(array('child' => 'foobar'), $form->getData()); + + // Validate accordingly + $this->assertFalse($form->isValid()); + } + + public function testDontValidateTokenIfCompoundButNoRoot() + { + $this->tokenManager->expects($this->never()) + ->method('isTokenValid'); + + $form = $this->factory + ->createNamedBuilder('root', 'Symfony\Component\Form\Extension\Core\Type\FormType') + ->add($this->factory + ->createNamedBuilder('form', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'csrf_token_manager' => $this->tokenManager, + 'csrf_token_id' => 'TOKEN_ID', + 'compound' => true, + )) + ) + ->getForm() + ->get('form'); + + $form->submit(array( + 'child' => 'foobar', + 'csrf' => 'token', + )); + } + + public function testDontValidateTokenIfRootButNotCompound() + { + $this->tokenManager->expects($this->never()) + ->method('isTokenValid'); + + $form = $this->factory + ->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'csrf_token_manager' => $this->tokenManager, + 'csrf_token_id' => 'TOKEN_ID', + 'compound' => false, + )); + + $form->submit(array( + 'csrf' => 'token', + )); + } + + public function testNoCsrfProtectionOnPrototype() + { + $prototypeView = $this->factory + ->create('Symfony\Component\Form\Extension\Core\Type\CollectionType', null, array( + 'entry_type' => __CLASS__.'_ChildType', + 'entry_options' => array( + 'csrf_field_name' => 'csrf', + ), + 'prototype' => true, + 'allow_add' => true, + )) + ->createView() + ->vars['prototype']; + + $this->assertFalse(isset($prototypeView['csrf'])); + $this->assertCount(1, $prototypeView); + } + + public function testsTranslateCustomErrorMessage() + { + $this->tokenManager->expects($this->once()) + ->method('isTokenValid') + ->with(new CsrfToken('TOKEN_ID', 'token')) + ->will($this->returnValue(false)); + + $this->translator->expects($this->once()) + ->method('trans') + ->with('Foobar') + ->will($this->returnValue('[trans]Foobar[/trans]')); + + $form = $this->factory + ->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, array( + 'csrf_field_name' => 'csrf', + 'csrf_token_manager' => $this->tokenManager, + 'csrf_message' => 'Foobar', + 'csrf_token_id' => 'TOKEN_ID', + 'compound' => true, + )) + ->getForm(); + + $form->submit(array( + 'csrf' => 'token', + )); + + $errors = $form->getErrors(); + $expected = new FormError('[trans]Foobar[/trans]'); + $expected->setOrigin($form); + + $this->assertGreaterThan(0, count($errors)); + $this->assertEquals($expected, $errors[0]); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/DataCollectorExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/DataCollectorExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..da84a5b436bd93ff75edd6a6109e475d294a4977 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/DataCollectorExtensionTest.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\Component\Form\Tests\Extension\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\DataCollector\DataCollectorExtension; + +class DataCollectorExtensionTest extends TestCase +{ + /** + * @var DataCollectorExtension + */ + private $extension; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $dataCollector; + + protected function setUp() + { + $this->dataCollector = $this->getMockBuilder('Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface')->getMock(); + $this->extension = new DataCollectorExtension($this->dataCollector); + } + + public function testLoadTypeExtensions() + { + $typeExtensions = $this->extension->getTypeExtensions('Symfony\Component\Form\Extension\Core\Type\FormType'); + + $this->assertInternalType('array', $typeExtensions); + $this->assertCount(1, $typeExtensions); + $this->assertInstanceOf('Symfony\Component\Form\Extension\DataCollector\Type\DataCollectorTypeExtension', array_shift($typeExtensions)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..24c0f8e871da1e304577d4dc1d341fb2c9c8e600 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php @@ -0,0 +1,706 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\DataCollector\FormDataCollector; +use Symfony\Component\Form\Form; +use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormView; + +class FormDataCollectorTest extends TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $dataExtractor; + + /** + * @var FormDataCollector + */ + private $dataCollector; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $dispatcher; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $factory; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $dataMapper; + + /** + * @var Form + */ + private $form; + + /** + * @var Form + */ + private $childForm; + + /** + * @var FormView + */ + private $view; + + /** + * @var FormView + */ + private $childView; + + protected function setUp() + { + $this->dataExtractor = $this->getMockBuilder('Symfony\Component\Form\Extension\DataCollector\FormDataExtractorInterface')->getMock(); + $this->dataCollector = new FormDataCollector($this->dataExtractor); + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $this->dataMapper = $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); + $this->form = $this->createForm('name'); + $this->childForm = $this->createForm('child'); + $this->view = new FormView(); + $this->childView = new FormView(); + } + + public function testBuildPreliminaryFormTree() + { + $this->form->add($this->childForm); + + $this->dataExtractor->expects($this->at(0)) + ->method('extractConfiguration') + ->with($this->form) + ->will($this->returnValue(array('config' => 'foo'))); + $this->dataExtractor->expects($this->at(1)) + ->method('extractConfiguration') + ->with($this->childForm) + ->will($this->returnValue(array('config' => 'bar'))); + + $this->dataExtractor->expects($this->at(2)) + ->method('extractDefaultData') + ->with($this->form) + ->will($this->returnValue(array('default_data' => 'foo'))); + $this->dataExtractor->expects($this->at(3)) + ->method('extractDefaultData') + ->with($this->childForm) + ->will($this->returnValue(array('default_data' => 'bar'))); + + $this->dataExtractor->expects($this->at(4)) + ->method('extractSubmittedData') + ->with($this->form) + ->will($this->returnValue(array('submitted_data' => 'foo'))); + $this->dataExtractor->expects($this->at(5)) + ->method('extractSubmittedData') + ->with($this->childForm) + ->will($this->returnValue(array('submitted_data' => 'bar'))); + + $this->dataCollector->collectConfiguration($this->form); + $this->dataCollector->collectDefaultData($this->form); + $this->dataCollector->collectSubmittedData($this->form); + $this->dataCollector->buildPreliminaryFormTree($this->form); + + $childFormData = array( + 'config' => 'bar', + 'default_data' => 'bar', + 'submitted_data' => 'bar', + 'children' => array(), + ); + + $formData = array( + 'config' => 'foo', + 'default_data' => 'foo', + 'submitted_data' => 'foo', + 'has_children_error' => false, + 'children' => array( + 'child' => $childFormData, + ), + ); + + $this->assertSame(array( + 'forms' => array( + 'name' => $formData, + ), + 'forms_by_hash' => array( + spl_object_hash($this->form) => $formData, + spl_object_hash($this->childForm) => $childFormData, + ), + 'nb_errors' => 0, + ), $this->dataCollector->getData()); + } + + public function testBuildMultiplePreliminaryFormTrees() + { + $form1 = $this->createForm('form1'); + $form2 = $this->createForm('form2'); + + $this->dataExtractor->expects($this->at(0)) + ->method('extractConfiguration') + ->with($form1) + ->will($this->returnValue(array('config' => 'foo'))); + $this->dataExtractor->expects($this->at(1)) + ->method('extractConfiguration') + ->with($form2) + ->will($this->returnValue(array('config' => 'bar'))); + + $this->dataCollector->collectConfiguration($form1); + $this->dataCollector->collectConfiguration($form2); + $this->dataCollector->buildPreliminaryFormTree($form1); + + $form1Data = array( + 'config' => 'foo', + 'children' => array(), + ); + + $this->assertSame(array( + 'forms' => array( + 'form1' => $form1Data, + ), + 'forms_by_hash' => array( + spl_object_hash($form1) => $form1Data, + ), + 'nb_errors' => 0, + ), $this->dataCollector->getData()); + + $this->dataCollector->buildPreliminaryFormTree($form2); + + $form2Data = array( + 'config' => 'bar', + 'children' => array(), + ); + + $this->assertSame(array( + 'forms' => array( + 'form1' => $form1Data, + 'form2' => $form2Data, + ), + 'forms_by_hash' => array( + spl_object_hash($form1) => $form1Data, + spl_object_hash($form2) => $form2Data, + ), + 'nb_errors' => 0, + ), $this->dataCollector->getData()); + } + + public function testBuildSamePreliminaryFormTreeMultipleTimes() + { + $this->dataExtractor->expects($this->at(0)) + ->method('extractConfiguration') + ->with($this->form) + ->will($this->returnValue(array('config' => 'foo'))); + + $this->dataExtractor->expects($this->at(1)) + ->method('extractDefaultData') + ->with($this->form) + ->will($this->returnValue(array('default_data' => 'foo'))); + + $this->dataCollector->collectConfiguration($this->form); + $this->dataCollector->buildPreliminaryFormTree($this->form); + + $formData = array( + 'config' => 'foo', + 'children' => array(), + ); + + $this->assertSame(array( + 'forms' => array( + 'name' => $formData, + ), + 'forms_by_hash' => array( + spl_object_hash($this->form) => $formData, + ), + 'nb_errors' => 0, + ), $this->dataCollector->getData()); + + $this->dataCollector->collectDefaultData($this->form); + $this->dataCollector->buildPreliminaryFormTree($this->form); + + $formData = array( + 'config' => 'foo', + 'default_data' => 'foo', + 'children' => array(), + ); + + $this->assertSame(array( + 'forms' => array( + 'name' => $formData, + ), + 'forms_by_hash' => array( + spl_object_hash($this->form) => $formData, + ), + 'nb_errors' => 0, + ), $this->dataCollector->getData()); + } + + public function testBuildPreliminaryFormTreeWithoutCollectingAnyData() + { + $this->dataCollector->buildPreliminaryFormTree($this->form); + + $formData = array( + 'children' => array(), + ); + + $this->assertSame(array( + 'forms' => array( + 'name' => $formData, + ), + 'forms_by_hash' => array( + spl_object_hash($this->form) => $formData, + ), + 'nb_errors' => 0, + ), $this->dataCollector->getData()); + } + + public function testBuildFinalFormTree() + { + $this->form->add($this->childForm); + $this->view->children['child'] = $this->childView; + + $this->dataExtractor->expects($this->at(0)) + ->method('extractConfiguration') + ->with($this->form) + ->will($this->returnValue(array('config' => 'foo'))); + $this->dataExtractor->expects($this->at(1)) + ->method('extractConfiguration') + ->with($this->childForm) + ->will($this->returnValue(array('config' => 'bar'))); + + $this->dataExtractor->expects($this->at(2)) + ->method('extractDefaultData') + ->with($this->form) + ->will($this->returnValue(array('default_data' => 'foo'))); + $this->dataExtractor->expects($this->at(3)) + ->method('extractDefaultData') + ->with($this->childForm) + ->will($this->returnValue(array('default_data' => 'bar'))); + + $this->dataExtractor->expects($this->at(4)) + ->method('extractSubmittedData') + ->with($this->form) + ->will($this->returnValue(array('submitted_data' => 'foo'))); + $this->dataExtractor->expects($this->at(5)) + ->method('extractSubmittedData') + ->with($this->childForm) + ->will($this->returnValue(array('submitted_data' => 'bar'))); + + $this->dataExtractor->expects($this->at(6)) + ->method('extractViewVariables') + ->with($this->view) + ->will($this->returnValue(array('view_vars' => 'foo'))); + + $this->dataExtractor->expects($this->at(7)) + ->method('extractViewVariables') + ->with($this->childView) + ->will($this->returnValue(array('view_vars' => 'bar'))); + + $this->dataCollector->collectConfiguration($this->form); + $this->dataCollector->collectDefaultData($this->form); + $this->dataCollector->collectSubmittedData($this->form); + $this->dataCollector->collectViewVariables($this->view); + $this->dataCollector->buildFinalFormTree($this->form, $this->view); + + $childFormData = array( + 'view_vars' => 'bar', + 'config' => 'bar', + 'default_data' => 'bar', + 'submitted_data' => 'bar', + 'children' => array(), + ); + + $formData = array( + 'view_vars' => 'foo', + 'config' => 'foo', + 'default_data' => 'foo', + 'submitted_data' => 'foo', + 'has_children_error' => false, + 'children' => array( + 'child' => $childFormData, + ), + ); + + $this->assertSame(array( + 'forms' => array( + 'name' => $formData, + ), + 'forms_by_hash' => array( + spl_object_hash($this->form) => $formData, + spl_object_hash($this->childForm) => $childFormData, + ), + 'nb_errors' => 0, + ), $this->dataCollector->getData()); + } + + public function testSerializeWithFormAddedMultipleTimes() + { + $form1 = $this->createForm('form1'); + $form2 = $this->createForm('form2'); + $child1 = $this->createForm('child1'); + + $form1View = new FormView(); + $form2View = new FormView(); + $child1View = new FormView(); + $child1View->vars['is_selected'] = function ($choice, array $values) { + return in_array($choice, $values, true); + }; + + $form1->add($child1); + $form2->add($child1); + + $form1View->children['child1'] = $child1View; + $form2View->children['child1'] = $child1View; + + $this->dataExtractor->expects($this->at(0)) + ->method('extractConfiguration') + ->with($form1) + ->will($this->returnValue(array('config' => 'foo'))); + $this->dataExtractor->expects($this->at(1)) + ->method('extractConfiguration') + ->with($child1) + ->will($this->returnValue(array('config' => 'bar'))); + + $this->dataExtractor->expects($this->at(2)) + ->method('extractDefaultData') + ->with($form1) + ->will($this->returnValue(array('default_data' => 'foo'))); + $this->dataExtractor->expects($this->at(3)) + ->method('extractDefaultData') + ->with($child1) + ->will($this->returnValue(array('default_data' => 'bar'))); + + $this->dataExtractor->expects($this->at(4)) + ->method('extractSubmittedData') + ->with($form1) + ->will($this->returnValue(array('submitted_data' => 'foo'))); + $this->dataExtractor->expects($this->at(5)) + ->method('extractSubmittedData') + ->with($child1) + ->will($this->returnValue(array('submitted_data' => 'bar'))); + + $this->dataExtractor->expects($this->at(6)) + ->method('extractViewVariables') + ->with($form1View) + ->will($this->returnValue(array('view_vars' => 'foo'))); + + $this->dataExtractor->expects($this->at(7)) + ->method('extractViewVariables') + ->with($child1View) + ->will($this->returnValue(array('view_vars' => $child1View->vars))); + + $this->dataExtractor->expects($this->at(8)) + ->method('extractConfiguration') + ->with($form2) + ->will($this->returnValue(array('config' => 'foo'))); + $this->dataExtractor->expects($this->at(9)) + ->method('extractConfiguration') + ->with($child1) + ->will($this->returnValue(array('config' => 'bar'))); + + $this->dataExtractor->expects($this->at(10)) + ->method('extractDefaultData') + ->with($form2) + ->will($this->returnValue(array('default_data' => 'foo'))); + $this->dataExtractor->expects($this->at(11)) + ->method('extractDefaultData') + ->with($child1) + ->will($this->returnValue(array('default_data' => 'bar'))); + + $this->dataExtractor->expects($this->at(12)) + ->method('extractSubmittedData') + ->with($form2) + ->will($this->returnValue(array('submitted_data' => 'foo'))); + $this->dataExtractor->expects($this->at(13)) + ->method('extractSubmittedData') + ->with($child1) + ->will($this->returnValue(array('submitted_data' => 'bar'))); + + $this->dataExtractor->expects($this->at(14)) + ->method('extractViewVariables') + ->with($form2View) + ->will($this->returnValue(array('view_vars' => 'foo'))); + + $this->dataExtractor->expects($this->at(15)) + ->method('extractViewVariables') + ->with($child1View) + ->will($this->returnValue(array('view_vars' => $child1View->vars))); + + $this->dataCollector->collectConfiguration($form1); + $this->dataCollector->collectDefaultData($form1); + $this->dataCollector->collectSubmittedData($form1); + $this->dataCollector->collectViewVariables($form1View); + $this->dataCollector->buildFinalFormTree($form1, $form1View); + + $this->dataCollector->collectConfiguration($form2); + $this->dataCollector->collectDefaultData($form2); + $this->dataCollector->collectSubmittedData($form2); + $this->dataCollector->collectViewVariables($form2View); + $this->dataCollector->buildFinalFormTree($form2, $form2View); + + $this->dataCollector->serialize(); + } + + public function testFinalFormReliesOnFormViewStructure() + { + $this->form->add($child1 = $this->createForm('first')); + $this->form->add($child2 = $this->createForm('second')); + + $this->view->children['second'] = $this->childView; + + $this->dataCollector->buildPreliminaryFormTree($this->form); + + $child1Data = array( + 'children' => array(), + ); + + $child2Data = array( + 'children' => array(), + ); + + $formData = array( + 'children' => array( + 'first' => $child1Data, + 'second' => $child2Data, + ), + ); + + $this->assertSame(array( + 'forms' => array( + 'name' => $formData, + ), + 'forms_by_hash' => array( + spl_object_hash($this->form) => $formData, + spl_object_hash($child1) => $child1Data, + spl_object_hash($child2) => $child2Data, + ), + 'nb_errors' => 0, + ), $this->dataCollector->getData()); + + $this->dataCollector->buildFinalFormTree($this->form, $this->view); + + $formData = array( + 'children' => array( + // "first" not present in FormView + 'second' => $child2Data, + ), + ); + + $this->assertSame(array( + 'forms' => array( + 'name' => $formData, + ), + 'forms_by_hash' => array( + spl_object_hash($this->form) => $formData, + spl_object_hash($child1) => $child1Data, + spl_object_hash($child2) => $child2Data, + ), + 'nb_errors' => 0, + ), $this->dataCollector->getData()); + } + + public function testChildViewsCanBeWithoutCorrespondingChildForms() + { + // don't add $this->childForm to $this->form! + + $this->view->children['child'] = $this->childView; + + $this->dataExtractor->expects($this->at(0)) + ->method('extractConfiguration') + ->with($this->form) + ->will($this->returnValue(array('config' => 'foo'))); + $this->dataExtractor->expects($this->at(1)) + ->method('extractConfiguration') + ->with($this->childForm) + ->will($this->returnValue(array('config' => 'bar'))); + + // explicitly call collectConfiguration(), since $this->childForm is not + // contained in the form tree + $this->dataCollector->collectConfiguration($this->form); + $this->dataCollector->collectConfiguration($this->childForm); + $this->dataCollector->buildFinalFormTree($this->form, $this->view); + + $childFormData = array( + // no "config" key + 'children' => array(), + ); + + $formData = array( + 'config' => 'foo', + 'children' => array( + 'child' => $childFormData, + ), + ); + + $this->assertSame(array( + 'forms' => array( + 'name' => $formData, + ), + 'forms_by_hash' => array( + spl_object_hash($this->form) => $formData, + // no child entry + ), + 'nb_errors' => 0, + ), $this->dataCollector->getData()); + } + + public function testChildViewsWithoutCorrespondingChildFormsMayBeExplicitlyAssociated() + { + // don't add $this->childForm to $this->form! + + $this->view->children['child'] = $this->childView; + + // but associate the two + $this->dataCollector->associateFormWithView($this->childForm, $this->childView); + + $this->dataExtractor->expects($this->at(0)) + ->method('extractConfiguration') + ->with($this->form) + ->will($this->returnValue(array('config' => 'foo'))); + $this->dataExtractor->expects($this->at(1)) + ->method('extractConfiguration') + ->with($this->childForm) + ->will($this->returnValue(array('config' => 'bar'))); + + // explicitly call collectConfiguration(), since $this->childForm is not + // contained in the form tree + $this->dataCollector->collectConfiguration($this->form); + $this->dataCollector->collectConfiguration($this->childForm); + $this->dataCollector->buildFinalFormTree($this->form, $this->view); + + $childFormData = array( + 'config' => 'bar', + 'children' => array(), + ); + + $formData = array( + 'config' => 'foo', + 'children' => array( + 'child' => $childFormData, + ), + ); + + $this->assertSame(array( + 'forms' => array( + 'name' => $formData, + ), + 'forms_by_hash' => array( + spl_object_hash($this->form) => $formData, + spl_object_hash($this->childForm) => $childFormData, + ), + 'nb_errors' => 0, + ), $this->dataCollector->getData()); + } + + public function testCollectSubmittedDataCountsErrors() + { + $form1 = $this->createForm('form1'); + $childForm1 = $this->createForm('child1'); + $form2 = $this->createForm('form2'); + + $form1->add($childForm1); + $this->dataExtractor + ->method('extractConfiguration') + ->will($this->returnValue(array())); + $this->dataExtractor + ->method('extractDefaultData') + ->will($this->returnValue(array())); + $this->dataExtractor->expects($this->at(4)) + ->method('extractSubmittedData') + ->with($form1) + ->will($this->returnValue(array('errors' => array('foo')))); + $this->dataExtractor->expects($this->at(5)) + ->method('extractSubmittedData') + ->with($childForm1) + ->will($this->returnValue(array('errors' => array('bar', 'bam')))); + $this->dataExtractor->expects($this->at(8)) + ->method('extractSubmittedData') + ->with($form2) + ->will($this->returnValue(array('errors' => array('baz')))); + + $this->dataCollector->collectSubmittedData($form1); + + $data = $this->dataCollector->getData(); + $this->assertSame(3, $data['nb_errors']); + + $this->dataCollector->collectSubmittedData($form2); + + $data = $this->dataCollector->getData(); + $this->assertSame(4, $data['nb_errors']); + } + + public function testCollectSubmittedDataExpandedFormsErrors() + { + $child1Form = $this->createForm('child1'); + $child11Form = $this->createForm('child11'); + $child2Form = $this->createForm('child2'); + $child21Form = $this->createForm('child21'); + + $child1Form->add($child11Form); + $child2Form->add($child21Form); + $this->form->add($child1Form); + $this->form->add($child2Form); + + $this->dataExtractor + ->method('extractConfiguration') + ->will($this->returnValue(array())); + $this->dataExtractor + ->method('extractDefaultData') + ->will($this->returnValue(array())); + $this->dataExtractor->expects($this->at(10)) + ->method('extractSubmittedData') + ->with($this->form) + ->will($this->returnValue(array('errors' => array()))); + $this->dataExtractor->expects($this->at(11)) + ->method('extractSubmittedData') + ->with($child1Form) + ->will($this->returnValue(array('errors' => array()))); + $this->dataExtractor->expects($this->at(12)) + ->method('extractSubmittedData') + ->with($child11Form) + ->will($this->returnValue(array('errors' => array('foo')))); + $this->dataExtractor->expects($this->at(13)) + ->method('extractSubmittedData') + ->with($child2Form) + ->will($this->returnValue(array('errors' => array()))); + $this->dataExtractor->expects($this->at(14)) + ->method('extractSubmittedData') + ->with($child21Form) + ->will($this->returnValue(array('errors' => array()))); + + $this->dataCollector->collectSubmittedData($this->form); + $this->dataCollector->buildPreliminaryFormTree($this->form); + + $data = $this->dataCollector->getData(); + $formData = $data['forms']['name']; + $child1Data = $formData['children']['child1']; + $child11Data = $child1Data['children']['child11']; + $child2Data = $formData['children']['child2']; + $child21Data = $child2Data['children']['child21']; + + $this->assertTrue($formData['has_children_error']); + $this->assertTrue($child1Data['has_children_error']); + $this->assertFalse(isset($child11Data['has_children_error']), 'The leaf data does not contains "has_children_error" property.'); + $this->assertFalse($child2Data['has_children_error']); + $this->assertFalse(isset($child21Data['has_children_error']), 'The leaf data does not contains "has_children_error" property.'); + } + + private function createForm($name) + { + $builder = new FormBuilder($name, null, $this->dispatcher, $this->factory); + $builder->setCompound(true); + $builder->setDataMapper($this->dataMapper); + + return $builder->getForm(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataExtractorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataExtractorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..50fdfd8aa985b7277e712bfcb64042f9aaf6a61f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataExtractorTest.php @@ -0,0 +1,423 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\CallbackTransformer; +use Symfony\Component\Form\Exception\TransformationFailedException; +use Symfony\Component\Form\Extension\DataCollector\FormDataExtractor; +use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormError; +use Symfony\Component\Form\FormView; +use Symfony\Component\Form\Tests\Fixtures\FixedDataTransformer; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Bernhard Schussek + */ +class FormDataExtractorTest extends TestCase +{ + use VarDumperTestTrait; + + /** + * @var FormDataExtractor + */ + private $dataExtractor; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $dispatcher; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $factory; + + protected function setUp() + { + $this->dataExtractor = new FormDataExtractor(); + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + } + + public function testExtractConfiguration() + { + $type = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); + $type->expects($this->any()) + ->method('getInnerType') + ->will($this->returnValue(new \stdClass())); + + $form = $this->createBuilder('name') + ->setType($type) + ->getForm(); + + $this->assertSame(array( + 'id' => 'name', + 'name' => 'name', + 'type_class' => 'stdClass', + 'synchronized' => true, + 'passed_options' => array(), + 'resolved_options' => array(), + ), $this->dataExtractor->extractConfiguration($form)); + } + + public function testExtractConfigurationSortsPassedOptions() + { + $type = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); + $type->expects($this->any()) + ->method('getInnerType') + ->will($this->returnValue(new \stdClass())); + + $options = array( + 'b' => 'foo', + 'a' => 'bar', + 'c' => 'baz', + ); + + $form = $this->createBuilder('name') + ->setType($type) + // passed options are stored in an attribute by + // ResolvedTypeDataCollectorProxy + ->setAttribute('data_collector/passed_options', $options) + ->getForm(); + + $this->assertSame(array( + 'id' => 'name', + 'name' => 'name', + 'type_class' => 'stdClass', + 'synchronized' => true, + 'passed_options' => array( + 'a' => 'bar', + 'b' => 'foo', + 'c' => 'baz', + ), + 'resolved_options' => array(), + ), $this->dataExtractor->extractConfiguration($form)); + } + + public function testExtractConfigurationSortsResolvedOptions() + { + $type = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); + $type->expects($this->any()) + ->method('getInnerType') + ->will($this->returnValue(new \stdClass())); + + $options = array( + 'b' => 'foo', + 'a' => 'bar', + 'c' => 'baz', + ); + + $form = $this->createBuilder('name', $options) + ->setType($type) + ->getForm(); + + $this->assertSame(array( + 'id' => 'name', + 'name' => 'name', + 'type_class' => 'stdClass', + 'synchronized' => true, + 'passed_options' => array(), + 'resolved_options' => array( + 'a' => 'bar', + 'b' => 'foo', + 'c' => 'baz', + ), + ), $this->dataExtractor->extractConfiguration($form)); + } + + public function testExtractConfigurationBuildsIdRecursively() + { + $type = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); + $type->expects($this->any()) + ->method('getInnerType') + ->will($this->returnValue(new \stdClass())); + + $grandParent = $this->createBuilder('grandParent') + ->setCompound(true) + ->setDataMapper($this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock()) + ->getForm(); + $parent = $this->createBuilder('parent') + ->setCompound(true) + ->setDataMapper($this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock()) + ->getForm(); + $form = $this->createBuilder('name') + ->setType($type) + ->getForm(); + + $grandParent->add($parent); + $parent->add($form); + + $this->assertSame(array( + 'id' => 'grandParent_parent_name', + 'name' => 'name', + 'type_class' => 'stdClass', + 'synchronized' => true, + 'passed_options' => array(), + 'resolved_options' => array(), + ), $this->dataExtractor->extractConfiguration($form)); + } + + public function testExtractDefaultData() + { + $form = $this->createBuilder('name')->getForm(); + + $form->setData('Foobar'); + + $this->assertSame(array( + 'default_data' => array( + 'norm' => 'Foobar', + ), + 'submitted_data' => array(), + ), $this->dataExtractor->extractDefaultData($form)); + } + + public function testExtractDefaultDataStoresModelDataIfDifferent() + { + $form = $this->createBuilder('name') + ->addModelTransformer(new FixedDataTransformer(array( + 'Foo' => 'Bar', + ))) + ->getForm(); + + $form->setData('Foo'); + + $this->assertSame(array( + 'default_data' => array( + 'norm' => 'Bar', + 'model' => 'Foo', + ), + 'submitted_data' => array(), + ), $this->dataExtractor->extractDefaultData($form)); + } + + public function testExtractDefaultDataStoresViewDataIfDifferent() + { + $form = $this->createBuilder('name') + ->addViewTransformer(new FixedDataTransformer(array( + 'Foo' => 'Bar', + ))) + ->getForm(); + + $form->setData('Foo'); + + $this->assertSame(array( + 'default_data' => array( + 'norm' => 'Foo', + 'view' => 'Bar', + ), + 'submitted_data' => array(), + ), $this->dataExtractor->extractDefaultData($form)); + } + + public function testExtractSubmittedData() + { + $form = $this->createBuilder('name')->getForm(); + + $form->submit('Foobar'); + + $this->assertSame(array( + 'submitted_data' => array( + 'norm' => 'Foobar', + ), + 'errors' => array(), + 'synchronized' => true, + ), $this->dataExtractor->extractSubmittedData($form)); + } + + public function testExtractSubmittedDataStoresModelDataIfDifferent() + { + $form = $this->createBuilder('name') + ->addModelTransformer(new FixedDataTransformer(array( + 'Foo' => 'Bar', + '' => '', + ))) + ->getForm(); + + $form->submit('Bar'); + + $this->assertSame(array( + 'submitted_data' => array( + 'norm' => 'Bar', + 'model' => 'Foo', + ), + 'errors' => array(), + 'synchronized' => true, + ), $this->dataExtractor->extractSubmittedData($form)); + } + + public function testExtractSubmittedDataStoresViewDataIfDifferent() + { + $form = $this->createBuilder('name') + ->addViewTransformer(new FixedDataTransformer(array( + 'Foo' => 'Bar', + '' => '', + ))) + ->getForm(); + + $form->submit('Bar'); + + $this->assertSame(array( + 'submitted_data' => array( + 'norm' => 'Foo', + 'view' => 'Bar', + ), + 'errors' => array(), + 'synchronized' => true, + ), $this->dataExtractor->extractSubmittedData($form)); + } + + public function testExtractSubmittedDataStoresErrors() + { + $form = $this->createBuilder('name')->getForm(); + + $form->submit('Foobar'); + $form->addError(new FormError('Invalid!')); + + $this->assertSame(array( + 'submitted_data' => array( + 'norm' => 'Foobar', + ), + 'errors' => array( + array('message' => 'Invalid!', 'origin' => spl_object_hash($form), 'trace' => array()), + ), + 'synchronized' => true, + ), $this->dataExtractor->extractSubmittedData($form)); + } + + public function testExtractSubmittedDataStoresErrorOrigin() + { + $form = $this->createBuilder('name')->getForm(); + + $error = new FormError('Invalid!'); + $error->setOrigin($form); + + $form->submit('Foobar'); + $form->addError($error); + + $this->assertSame(array( + 'submitted_data' => array( + 'norm' => 'Foobar', + ), + 'errors' => array( + array('message' => 'Invalid!', 'origin' => spl_object_hash($form), 'trace' => array()), + ), + 'synchronized' => true, + ), $this->dataExtractor->extractSubmittedData($form)); + } + + public function testExtractSubmittedDataStoresErrorCause() + { + $form = $this->createBuilder('name')->getForm(); + + $exception = new \Exception(); + $violation = new ConstraintViolation('Foo', 'Foo', array(), 'Root', 'property.path', 'Invalid!', null, null, null, $exception); + + $form->submit('Foobar'); + $form->addError(new FormError('Invalid!', null, array(), null, $violation)); + $origin = spl_object_hash($form); + + $this->assertDumpMatchesFormat(<< array:1 [ + "norm" => "Foobar" + ] + "errors" => array:1 [ + 0 => array:3 [ + "message" => "Invalid!" + "origin" => "$origin" + "trace" => array:2 [ + 0 => Symfony\Component\Validator\ConstraintViolation { + -message: "Foo" + -messageTemplate: "Foo" + -parameters: [] + -plural: null + -root: "Root" + -propertyPath: "property.path" + -invalidValue: "Invalid!" + -constraint: null + -code: null + -cause: Exception {%A} + } + 1 => Exception {#1} + ] + ] + ] + "synchronized" => true +] +EODUMP + , + $this->dataExtractor->extractSubmittedData($form) + ); + } + + public function testExtractSubmittedDataRemembersIfNonSynchronized() + { + $form = $this->createBuilder('name') + ->addModelTransformer(new CallbackTransformer( + function () {}, + function () { + throw new TransformationFailedException('Fail!'); + } + )) + ->getForm(); + + $form->submit('Foobar'); + + $this->assertSame(array( + 'submitted_data' => array( + 'norm' => 'Foobar', + 'model' => null, + ), + 'errors' => array(), + 'synchronized' => false, + ), $this->dataExtractor->extractSubmittedData($form)); + } + + public function testExtractViewVariables() + { + $view = new FormView(); + + $view->vars = array( + 'b' => 'foo', + 'a' => 'bar', + 'c' => 'baz', + 'id' => 'foo_bar', + 'name' => 'bar', + ); + + $this->assertSame(array( + 'id' => 'foo_bar', + 'name' => 'bar', + 'view_vars' => array( + 'a' => 'bar', + 'b' => 'foo', + 'c' => 'baz', + 'id' => 'foo_bar', + 'name' => 'bar', + ), + ), $this->dataExtractor->extractViewVariables($view)); + } + + /** + * @param string $name + * @param array $options + * + * @return FormBuilder + */ + private function createBuilder($name, array $options = array()) + { + return new FormBuilder($name, null, $this->dispatcher, $this->factory, $options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/DataCollectorTypeExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/DataCollectorTypeExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..de635f64a3f45bdd248a3b8f7a39193a8c8f5964 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/DataCollectorTypeExtensionTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\DataCollector\Type; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\DataCollector\Type\DataCollectorTypeExtension; + +class DataCollectorTypeExtensionTest extends TestCase +{ + /** + * @var DataCollectorTypeExtension + */ + private $extension; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $dataCollector; + + protected function setUp() + { + $this->dataCollector = $this->getMockBuilder('Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface')->getMock(); + $this->extension = new DataCollectorTypeExtension($this->dataCollector); + } + + public function testGetExtendedType() + { + $this->assertEquals('Symfony\Component\Form\Extension\Core\Type\FormType', $this->extension->getExtendedType()); + } + + public function testBuildForm() + { + $builder = $this->getMockBuilder('Symfony\Component\Form\Test\FormBuilderInterface')->getMock(); + $builder->expects($this->atLeastOnce()) + ->method('addEventSubscriber') + ->with($this->isInstanceOf('Symfony\Component\Form\Extension\DataCollector\EventListener\DataCollectorListener')); + + $this->extension->buildForm($builder, array()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DependencyInjection/DependencyInjectionExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DependencyInjection/DependencyInjectionExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8895da5b9b7ea2f258e107855b342295b719e21f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/DependencyInjection/DependencyInjectionExtensionTest.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; +use Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension; + +class DependencyInjectionExtensionTest extends TestCase +{ + public function testGetTypeExtensions() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + + $typeExtension1 = $this->getMockBuilder('Symfony\Component\Form\FormTypeExtensionInterface')->getMock(); + $typeExtension1->expects($this->any()) + ->method('getExtendedType') + ->willReturn('test'); + $typeExtension2 = $this->getMockBuilder('Symfony\Component\Form\FormTypeExtensionInterface')->getMock(); + $typeExtension2->expects($this->any()) + ->method('getExtendedType') + ->willReturn('test'); + $typeExtension3 = $this->getMockBuilder('Symfony\Component\Form\FormTypeExtensionInterface')->getMock(); + $typeExtension3->expects($this->any()) + ->method('getExtendedType') + ->willReturn('other'); + + $services = array( + 'extension1' => $typeExtension1 = $this->createFormTypeExtensionMock('test'), + 'extension2' => $typeExtension2 = $this->createFormTypeExtensionMock('test'), + 'extension3' => $typeExtension3 = $this->createFormTypeExtensionMock('other'), + ); + + $container->expects($this->any()) + ->method('get') + ->willReturnCallback(function ($id) use ($services) { + if (isset($services[$id])) { + return $services[$id]; + } + + throw new ServiceNotFoundException($id); + }); + + $extension = new DependencyInjectionExtension($container, array(), array('test' => array('extension1', 'extension2'), 'other' => array('extension3')), array()); + + $this->assertTrue($extension->hasTypeExtensions('test')); + $this->assertFalse($extension->hasTypeExtensions('unknown')); + $this->assertSame(array($typeExtension1, $typeExtension2), $extension->getTypeExtensions('test')); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException + */ + public function testThrowExceptionForInvalidExtendedType() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + + $typeExtension = $this->getMockBuilder('Symfony\Component\Form\FormTypeExtensionInterface')->getMock(); + $typeExtension->expects($this->any()) + ->method('getExtendedType') + ->willReturn('unmatched'); + + $container->expects($this->any()) + ->method('get') + ->with('extension') + ->willReturn($typeExtension); + + $extension = new DependencyInjectionExtension($container, array(), array('test' => array('extension')), array()); + + $extension->getTypeExtensions('test'); + } + + public function testGetTypeGuesser() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container + ->expects($this->once()) + ->method('get') + ->with('foo') + ->willReturn($this->getMockBuilder('Symfony\Component\Form\FormTypeGuesserInterface')->getMock()); + $extension = new DependencyInjectionExtension($container, array(), array(), array('foo')); + + $this->assertInstanceOf('Symfony\Component\Form\FormTypeGuesserChain', $extension->getTypeGuesser()); + } + + public function testGetTypeGuesserReturnsNullWhenNoTypeGuessersHaveBeenConfigured() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $extension = new DependencyInjectionExtension($container, array(), array(), array()); + + $this->assertNull($extension->getTypeGuesser()); + } + + private function createFormTypeExtensionMock($extendedType) + { + $extension = $this->getMockBuilder('Symfony\Component\Form\FormTypeExtensionInterface')->getMock(); + $extension->expects($this->any())->method('getExtendedType')->willReturn($extendedType); + + return $extension; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/HttpFoundationRequestHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/HttpFoundationRequestHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e71a1fdfd8058eb7038bf6be867010c77e67c389 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/HttpFoundationRequestHandlerTest.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\HttpFoundation; + +use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler; +use Symfony\Component\Form\Tests\AbstractRequestHandlerTest; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\File\UploadedFile; + +/** + * @author Bernhard Schussek + */ +class HttpFoundationRequestHandlerTest extends AbstractRequestHandlerTest +{ + /** + * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException + */ + public function testRequestShouldNotBeNull() + { + $this->requestHandler->handleRequest($this->getMockForm('name', 'GET')); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException + */ + public function testRequestShouldBeInstanceOfRequest() + { + $this->requestHandler->handleRequest($this->getMockForm('name', 'GET'), new \stdClass()); + } + + protected function setRequestData($method, $data, $files = array()) + { + $this->request = Request::create('http://localhost', $method, $data, array(), $files); + } + + protected function getRequestHandler() + { + return new HttpFoundationRequestHandler($this->serverParams); + } + + protected function getMockFile($suffix = '') + { + return new UploadedFile(__DIR__.'/../../Fixtures/foo'.$suffix, 'foo'.$suffix); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorPerformanceTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorPerformanceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9e957d55fe5cbfdaa02a6436b5730511077f7b8b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorPerformanceTest.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Validator\Constraints; + +use Symfony\Component\Form\Extension\Validator\ValidatorExtension; +use Symfony\Component\Form\Test\FormPerformanceTestCase; +use Symfony\Component\Validator\Validation; + +/** + * @author Bernhard Schussek + */ +class FormValidatorPerformanceTest extends FormPerformanceTestCase +{ + protected function getExtensions() + { + return array( + new ValidatorExtension(Validation::createValidator()), + ); + } + + /** + * findClickedButton() used to have an exponential number of calls. + * + * @group benchmark + */ + public function testValidationPerformance() + { + $this->setMaxRunningTime(1); + + $builder = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType'); + + for ($i = 0; $i < 40; ++$i) { + $builder->add($i, 'Symfony\Component\Form\Extension\Core\Type\FormType'); + + $builder->get($i) + ->add('a') + ->add('b') + ->add('c'); + } + + $form = $builder->getForm(); + + $form->submit(null); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..49e32435f11e37e031e3d369c6ab4c32506ed515 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php @@ -0,0 +1,684 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Validator\Constraints; + +use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\Exception\TransformationFailedException; +use Symfony\Component\Form\CallbackTransformer; +use Symfony\Component\Form\FormInterface; +use Symfony\Component\Form\Extension\Validator\Constraints\Form; +use Symfony\Component\Form\Extension\Validator\Constraints\FormValidator; +use Symfony\Component\Form\SubmitButtonBuilder; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest; + +/** + * @author Bernhard Schussek + * + * @todo use ConstraintValidatorTestCase when symfony/validator ~3.2 is required. + */ +class FormValidatorTest extends AbstractConstraintValidatorTest +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $dispatcher; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $factory; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $serverParams; + + protected function setUp() + { + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $this->serverParams = $this->getMockBuilder('Symfony\Component\Form\Extension\Validator\Util\ServerParams')->setMethods(array('getNormalizedIniPostMaxSize', 'getContentLength'))->getMock(); + + parent::setUp(); + } + + protected function createValidator() + { + return new FormValidator($this->serverParams); + } + + public function testValidate() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + $options = array('validation_groups' => array('group1', 'group2')); + $form = $this->getBuilder('name', '\stdClass', $options) + ->setData($object) + ->getForm(); + + $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testValidateConstraints() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + $constraint1 = new NotNull(array('groups' => array('group1', 'group2'))); + $constraint2 = new NotBlank(array('groups' => 'group2')); + + $options = array( + 'validation_groups' => array('group1', 'group2'), + 'constraints' => array($constraint1, $constraint2), + ); + $form = $this->getBuilder('name', '\stdClass', $options) + ->setData($object) + ->getForm(); + + // First default constraints + $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + + // Then custom constraints + $this->expectValidateValueAt(1, 'data', $object, $constraint1, 'group1'); + $this->expectValidateValueAt(2, 'data', $object, $constraint2, 'group2'); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testValidateChildIfValidConstraint() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + + $parent = $this->getBuilder('parent') + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + $options = array( + 'validation_groups' => array('group1', 'group2'), + 'constraints' => array(new Valid()), + ); + $form = $this->getBuilder('name', '\stdClass', $options)->getForm(); + $parent->add($form); + + $form->setData($object); + + $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testDontValidateIfParentWithoutValidConstraint() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + + $parent = $this->getBuilder('parent', null) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + $options = array('validation_groups' => array('group1', 'group2')); + $form = $this->getBuilder('name', '\stdClass', $options)->getForm(); + $parent->add($form); + + $form->setData($object); + + $this->expectNoValidate(); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testMissingConstraintIndex() + { + $object = new \stdClass(); + $form = new FormBuilder('name', '\stdClass', $this->dispatcher, $this->factory); + $form = $form->setData($object)->getForm(); + + $this->expectValidateAt(0, 'data', $object, array('Default')); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testValidateConstraintsOptionEvenIfNoValidConstraint() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + $constraint1 = new NotNull(array('groups' => array('group1', 'group2'))); + $constraint2 = new NotBlank(array('groups' => 'group2')); + + $parent = $this->getBuilder('parent', null) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + $options = array( + 'validation_groups' => array('group1', 'group2'), + 'constraints' => array($constraint1, $constraint2), + ); + $form = $this->getBuilder('name', '\stdClass', $options) + ->setData($object) + ->getForm(); + $parent->add($form); + + $this->expectValidateValueAt(0, 'data', $object, $constraint1, 'group1'); + $this->expectValidateValueAt(1, 'data', $object, $constraint2, 'group2'); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testDontValidateIfNoValidationGroups() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + + $form = $this->getBuilder('name', '\stdClass', array( + 'validation_groups' => array(), + )) + ->setData($object) + ->getForm(); + + $form->setData($object); + + $this->expectNoValidate(); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testDontValidateConstraintsIfNoValidationGroups() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + $constraint1 = $this->getMockBuilder('Symfony\Component\Validator\Constraint')->getMock(); + $constraint2 = $this->getMockBuilder('Symfony\Component\Validator\Constraint')->getMock(); + + $options = array( + 'validation_groups' => array(), + 'constraints' => array($constraint1, $constraint2), + ); + $form = $this->getBuilder('name', '\stdClass', $options) + ->setData($object) + ->getForm(); + + // Launch transformer + $form->submit(array()); + + $this->expectNoValidate(); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testDontValidateIfNotSynchronized() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + + $form = $this->getBuilder('name', '\stdClass', array( + 'invalid_message' => 'invalid_message_key', + // Invalid message parameters must be supported, because the + // invalid message can be a translation key + // see https://github.com/symfony/symfony/issues/5144 + 'invalid_message_parameters' => array('{{ foo }}' => 'bar'), + )) + ->setData($object) + ->addViewTransformer(new CallbackTransformer( + function ($data) { return $data; }, + function () { throw new TransformationFailedException(); } + )) + ->getForm(); + + // Launch transformer + $form->submit('foo'); + + $this->expectNoValidate(); + + $this->validator->validate($form, new Form()); + + $this->buildViolation('invalid_message_key') + ->setParameter('{{ value }}', 'foo') + ->setParameter('{{ foo }}', 'bar') + ->setInvalidValue('foo') + ->setCode(Form::NOT_SYNCHRONIZED_ERROR) + ->setCause($form->getTransformationFailure()) + ->assertRaised(); + } + + public function testAddInvalidErrorEvenIfNoValidationGroups() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + + $form = $this->getBuilder('name', '\stdClass', array( + 'invalid_message' => 'invalid_message_key', + // Invalid message parameters must be supported, because the + // invalid message can be a translation key + // see https://github.com/symfony/symfony/issues/5144 + 'invalid_message_parameters' => array('{{ foo }}' => 'bar'), + 'validation_groups' => array(), + )) + ->setData($object) + ->addViewTransformer(new CallbackTransformer( + function ($data) { return $data; }, + function () { throw new TransformationFailedException(); } + )) + ->getForm(); + + // Launch transformer + $form->submit('foo'); + + $this->expectNoValidate(); + + $this->validator->validate($form, new Form()); + + $this->buildViolation('invalid_message_key') + ->setParameter('{{ value }}', 'foo') + ->setParameter('{{ foo }}', 'bar') + ->setInvalidValue('foo') + ->setCode(Form::NOT_SYNCHRONIZED_ERROR) + ->setCause($form->getTransformationFailure()) + ->assertRaised(); + } + + public function testDontValidateConstraintsIfNotSynchronized() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + $constraint1 = $this->getMockBuilder('Symfony\Component\Validator\Constraint')->getMock(); + $constraint2 = $this->getMockBuilder('Symfony\Component\Validator\Constraint')->getMock(); + + $options = array( + 'invalid_message' => 'invalid_message_key', + 'validation_groups' => array('group1', 'group2'), + 'constraints' => array($constraint1, $constraint2), + ); + $form = $this->getBuilder('name', '\stdClass', $options) + ->setData($object) + ->addViewTransformer(new CallbackTransformer( + function ($data) { return $data; }, + function () { throw new TransformationFailedException(); } + )) + ->getForm(); + + // Launch transformer + $form->submit('foo'); + + $this->expectNoValidate(); + + $this->validator->validate($form, new Form()); + + $this->buildViolation('invalid_message_key') + ->setParameter('{{ value }}', 'foo') + ->setInvalidValue('foo') + ->setCode(Form::NOT_SYNCHRONIZED_ERROR) + ->setCause($form->getTransformationFailure()) + ->assertRaised(); + } + + // https://github.com/symfony/symfony/issues/4359 + public function testDontMarkInvalidIfAnyChildIsNotSynchronized() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + + $failingTransformer = new CallbackTransformer( + function ($data) { return $data; }, + function () { throw new TransformationFailedException(); } + ); + + $form = $this->getBuilder('name', '\stdClass') + ->setData($object) + ->addViewTransformer($failingTransformer) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->add( + $this->getBuilder('child') + ->addViewTransformer($failingTransformer) + ) + ->getForm(); + + // Launch transformer + $form->submit(array('child' => 'foo')); + + $this->expectNoValidate(); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testHandleGroupSequenceValidationGroups() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + $options = array('validation_groups' => new GroupSequence(array('group1', 'group2'))); + $form = $this->getBuilder('name', '\stdClass', $options) + ->setData($object) + ->getForm(); + + $this->expectValidateAt(0, 'data', $object, new GroupSequence(array('group1', 'group2'))); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testHandleCallbackValidationGroups() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + $options = array('validation_groups' => array($this, 'getValidationGroups')); + $form = $this->getBuilder('name', '\stdClass', $options) + ->setData($object) + ->getForm(); + + $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testDontExecuteFunctionNames() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + $options = array('validation_groups' => 'header'); + $form = $this->getBuilder('name', '\stdClass', $options) + ->setData($object) + ->getForm(); + + $this->expectValidateAt(0, 'data', $object, array('header')); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testHandleClosureValidationGroups() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + $options = array('validation_groups' => function (FormInterface $form) { + return array('group1', 'group2'); + }); + $form = $this->getBuilder('name', '\stdClass', $options) + ->setData($object) + ->getForm(); + + $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testUseValidationGroupOfClickedButton() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + + $parent = $this->getBuilder('parent') + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + $form = $this->getForm('name', '\stdClass', array( + 'validation_groups' => 'form_group', + 'constraints' => array(new Valid()), + )); + + $parent->add($form); + $parent->add($this->getSubmitButton('submit', array( + 'validation_groups' => 'button_group', + ))); + + $parent->submit(array('name' => $object, 'submit' => '')); + + $this->expectValidateAt(0, 'data', $object, array('button_group')); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testDontUseValidationGroupOfUnclickedButton() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + + $parent = $this->getBuilder('parent') + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + $form = $this->getForm('name', '\stdClass', array( + 'validation_groups' => 'form_group', + 'constraints' => array(new Valid()), + )); + + $parent->add($form); + $parent->add($this->getSubmitButton('submit', array( + 'validation_groups' => 'button_group', + ))); + + $form->setData($object); + + $this->expectValidateAt(0, 'data', $object, array('form_group')); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testUseInheritedValidationGroup() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + + $parentOptions = array('validation_groups' => 'group'); + $parent = $this->getBuilder('parent', null, $parentOptions) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + $formOptions = array('constraints' => array(new Valid())); + $form = $this->getBuilder('name', '\stdClass', $formOptions)->getForm(); + $parent->add($form); + + $form->setData($object); + + $this->expectValidateAt(0, 'data', $object, array('group')); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testUseInheritedCallbackValidationGroup() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + + $parentOptions = array('validation_groups' => array($this, 'getValidationGroups')); + $parent = $this->getBuilder('parent', null, $parentOptions) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + $formOptions = array('constraints' => array(new Valid())); + $form = $this->getBuilder('name', '\stdClass', $formOptions)->getForm(); + $parent->add($form); + + $form->setData($object); + + $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testUseInheritedClosureValidationGroup() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + + $parentOptions = array( + 'validation_groups' => function (FormInterface $form) { + return array('group1', 'group2'); + }, + ); + $parent = $this->getBuilder('parent', null, $parentOptions) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + $formOptions = array('constraints' => array(new Valid())); + $form = $this->getBuilder('name', '\stdClass', $formOptions)->getForm(); + $parent->add($form); + + $form->setData($object); + + $this->expectValidateAt(0, 'data', $object, array('group1', 'group2')); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testAppendPropertyPath() + { + $object = $this->getMockBuilder('\stdClass')->getMock(); + $form = $this->getBuilder('name', '\stdClass') + ->setData($object) + ->getForm(); + + $this->expectValidateAt(0, 'data', $object, array('Default')); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testDontWalkScalars() + { + $form = $this->getBuilder() + ->setData('scalar') + ->getForm(); + + $this->expectNoValidate(); + + $this->validator->validate($form, new Form()); + + $this->assertNoViolation(); + } + + public function testViolationIfExtraData() + { + $form = $this->getBuilder('parent', null, array('extra_fields_message' => 'Extra!')) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->add($this->getBuilder('child')) + ->getForm(); + + $form->submit(array('foo' => 'bar')); + + $this->expectNoValidate(); + + $this->validator->validate($form, new Form()); + + $this->buildViolation('Extra!') + ->setParameter('{{ extra_fields }}', 'foo') + ->setInvalidValue(array('foo' => 'bar')) + ->setCode(Form::NO_SUCH_FIELD_ERROR) + ->assertRaised(); + } + + public function testNoViolationIfAllowExtraData() + { + $context = $this->getMockExecutionContext(); + + $form = $this + ->getBuilder('parent', null, array('allow_extra_fields' => true)) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->add($this->getBuilder('child')) + ->getForm(); + + $form->submit(array('foo' => 'bar')); + + $context->expects($this->never()) + ->method('addViolation'); + + $this->validator->initialize($context); + $this->validator->validate($form, new Form()); + } + + /** + * Access has to be public, as this method is called via callback array + * in {@link testValidateFormDataCanHandleCallbackValidationGroups()} + * and {@link testValidateFormDataUsesInheritedCallbackValidationGroup()}. + */ + public function getValidationGroups(FormInterface $form) + { + return array('group1', 'group2'); + } + + private function getMockExecutionContext() + { + $context = $this->getMockBuilder('Symfony\Component\Validator\Context\ExecutionContextInterface')->getMock(); + $validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); + $contextualValidator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ContextualValidatorInterface')->getMock(); + + $validator->expects($this->any()) + ->method('inContext') + ->with($context) + ->will($this->returnValue($contextualValidator)); + + $context->expects($this->any()) + ->method('getValidator') + ->will($this->returnValue($validator)); + + return $context; + } + + /** + * @param string $name + * @param string $dataClass + * @param array $options + * + * @return FormBuilder + */ + private function getBuilder($name = 'name', $dataClass = null, array $options = array()) + { + $options = array_replace(array( + 'constraints' => array(), + 'invalid_message_parameters' => array(), + ), $options); + + return new FormBuilder($name, $dataClass, $this->dispatcher, $this->factory, $options); + } + + private function getForm($name = 'name', $dataClass = null, array $options = array()) + { + return $this->getBuilder($name, $dataClass, $options)->getForm(); + } + + private function getSubmitButton($name = 'name', array $options = array()) + { + $builder = new SubmitButtonBuilder($name, $options); + + return $builder->getForm(); + } + + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ + private function getDataMapper() + { + return $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8694f93436b500e8a093a856caf367f9952a5867 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php @@ -0,0 +1,170 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Validator\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormEvent; +use Symfony\Component\Form\Extension\Validator\Constraints\Form; +use Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener; +use Symfony\Component\PropertyAccess\PropertyPath; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationList; + +class ValidationListenerTest extends TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $dispatcher; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $factory; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $validator; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $violationMapper; + + /** + * @var ValidationListener + */ + private $listener; + + private $message; + + private $messageTemplate; + + private $params; + + protected function setUp() + { + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $this->validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); + $this->violationMapper = $this->getMockBuilder('Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapperInterface')->getMock(); + $this->listener = new ValidationListener($this->validator, $this->violationMapper); + $this->message = 'Message'; + $this->messageTemplate = 'Message template'; + $this->params = array('foo' => 'bar'); + } + + private function getConstraintViolation($code = null) + { + return new ConstraintViolation($this->message, $this->messageTemplate, $this->params, null, 'prop.path', null, null, $code, new Form()); + } + + private function getBuilder($name = 'name', $propertyPath = null, $dataClass = null) + { + $builder = new FormBuilder($name, $dataClass, $this->dispatcher, $this->factory); + $builder->setPropertyPath(new PropertyPath($propertyPath ?: $name)); + $builder->setAttribute('error_mapping', array()); + $builder->setErrorBubbling(false); + $builder->setMapped(true); + + return $builder; + } + + private function getForm($name = 'name', $propertyPath = null, $dataClass = null) + { + return $this->getBuilder($name, $propertyPath, $dataClass)->getForm(); + } + + private function getMockForm() + { + return $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + } + + // More specific mapping tests can be found in ViolationMapperTest + public function testMapViolation() + { + $violation = $this->getConstraintViolation(); + $form = $this->getForm('street'); + + $this->validator->expects($this->once()) + ->method('validate') + ->will($this->returnValue(array($violation))); + + $this->violationMapper->expects($this->once()) + ->method('mapViolation') + ->with($violation, $form, false); + + $this->listener->validateForm(new FormEvent($form, null)); + } + + public function testMapViolationAllowsNonSyncIfInvalid() + { + $violation = $this->getConstraintViolation(Form::NOT_SYNCHRONIZED_ERROR); + $form = $this->getForm('street'); + + $this->validator->expects($this->once()) + ->method('validate') + ->will($this->returnValue(array($violation))); + + $this->violationMapper->expects($this->once()) + ->method('mapViolation') + // pass true now + ->with($violation, $form, true); + + $this->listener->validateForm(new FormEvent($form, null)); + } + + public function testValidateIgnoresNonRoot() + { + $form = $this->getMockForm(); + $form->expects($this->once()) + ->method('isRoot') + ->will($this->returnValue(false)); + + $this->validator->expects($this->never()) + ->method('validate'); + + $this->violationMapper->expects($this->never()) + ->method('mapViolation'); + + $this->listener->validateForm(new FormEvent($form, null)); + } + + public function testValidateWithEmptyViolationList() + { + $form = $this->getMockForm(); + $form->expects($this->once()) + ->method('isRoot') + ->will($this->returnValue(true)); + + $this->validator + ->expects($this->once()) + ->method('validate') + ->will($this->returnValue(new ConstraintViolationList())); + + $this->violationMapper + ->expects($this->never()) + ->method('mapViolation'); + + $this->listener->validateForm(new FormEvent($form, null)); + } + + public function testValidatorInterface() + { + $validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); + + $listener = new ValidationListener($validator, $this->violationMapper); + $this->assertAttributeSame($validator, 'validator', $listener); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f12b915b9a3788f1c9a1467d1320250df2d6c4c1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Validator\Type; + +use Symfony\Component\Form\Test\FormInterface; +use Symfony\Component\Validator\Constraints\GroupSequence; + +/** + * @author Bernhard Schussek + */ +abstract class BaseValidatorExtensionTest extends TypeTestCase +{ + public function testValidationGroupNullByDefault() + { + $form = $this->createForm(); + + $this->assertNull($form->getConfig()->getOption('validation_groups')); + } + + public function testValidationGroupsTransformedToArray() + { + $form = $this->createForm(array( + 'validation_groups' => 'group', + )); + + $this->assertEquals(array('group'), $form->getConfig()->getOption('validation_groups')); + } + + public function testValidationGroupsCanBeSetToArray() + { + $form = $this->createForm(array( + 'validation_groups' => array('group1', 'group2'), + )); + + $this->assertEquals(array('group1', 'group2'), $form->getConfig()->getOption('validation_groups')); + } + + public function testValidationGroupsCanBeSetToFalse() + { + $form = $this->createForm(array( + 'validation_groups' => false, + )); + + $this->assertEquals(array(), $form->getConfig()->getOption('validation_groups')); + } + + public function testValidationGroupsCanBeSetToCallback() + { + $form = $this->createForm(array( + 'validation_groups' => array($this, 'testValidationGroupsCanBeSetToCallback'), + )); + + $this->assertInternalType('callable', $form->getConfig()->getOption('validation_groups')); + } + + public function testValidationGroupsCanBeSetToClosure() + { + $form = $this->createForm(array( + 'validation_groups' => function (FormInterface $form) { }, + )); + + $this->assertInternalType('callable', $form->getConfig()->getOption('validation_groups')); + } + + public function testValidationGroupsCanBeSetToGroupSequence() + { + $form = $this->createForm(array( + 'validation_groups' => new GroupSequence(array('group1', 'group2')), + )); + + $this->assertInstanceOf('Symfony\Component\Validator\Constraints\GroupSequence', $form->getConfig()->getOption('validation_groups')); + } + + abstract protected function createForm(array $options = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/FormTypeValidatorExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/FormTypeValidatorExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2bf10bb36bce2e9e80f40ebfad09f5ccaaa84285 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/FormTypeValidatorExtensionTest.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Validator\Type; + +use Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\ConstraintViolationList; + +class FormTypeValidatorExtensionTest extends BaseValidatorExtensionTest +{ + public function testSubmitValidatesData() + { + $builder = $this->factory->createBuilder( + 'Symfony\Component\Form\Extension\Core\Type\FormType', + null, + array( + 'validation_groups' => 'group', + ) + ); + $builder->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\FormType'); + $form = $builder->getForm(); + + $this->validator->expects($this->once()) + ->method('validate') + ->with($this->equalTo($form)) + ->will($this->returnValue(new ConstraintViolationList())); + + // specific data is irrelevant + $form->submit(array()); + } + + public function testValidConstraint() + { + $form = $this->createForm(array('constraints' => $valid = new Valid())); + + $this->assertSame(array($valid), $form->getConfig()->getOption('constraints')); + } + + public function testValidatorInterface() + { + $validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); + + $formTypeValidatorExtension = new FormTypeValidatorExtension($validator); + $this->assertAttributeSame($validator, 'validator', $formTypeValidatorExtension); + } + + protected function createForm(array $options = array()) + { + return $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, $options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/SubmitTypeValidatorExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/SubmitTypeValidatorExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..48fc8de51d9c82352d2c576f08f41b29bf2dae70 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/SubmitTypeValidatorExtensionTest.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\Form\Tests\Extension\Validator\Type; + +class SubmitTypeValidatorExtensionTest extends BaseValidatorExtensionTest +{ + protected function createForm(array $options = array()) + { + return $this->factory->create('Symfony\Component\Form\Extension\Core\Type\SubmitType', null, $options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..cb6000aa8fb81a3b76112a888fb3d59abf3aad84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Validator\Type; + +use Symfony\Component\Form\Test\TypeTestCase as BaseTypeTestCase; +use Symfony\Component\Form\Extension\Validator\ValidatorExtension; + +abstract class TypeTestCase extends BaseTypeTestCase +{ + protected $validator; + + protected function setUp() + { + $this->validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); + $metadata = $this->getMockBuilder('Symfony\Component\Validator\Mapping\ClassMetadata')->disableOriginalConstructor()->getMock(); + $this->validator->expects($this->once())->method('getMetadataFor')->will($this->returnValue($metadata)); + $this->validator->expects($this->any())->method('validate')->will($this->returnValue(array())); + + parent::setUp(); + } + + protected function tearDown() + { + $this->validator = null; + + parent::tearDown(); + } + + protected function getExtensions() + { + return array_merge(parent::getExtensions(), array( + new ValidatorExtension($this->validator), + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8c0984f7e4e13d3bca8dfc6b42b58c70fdc735ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Validator\Type; + +use Symfony\Component\Form\Extension\Validator\Type\UploadValidatorExtension; +use Symfony\Component\OptionsResolver\OptionsResolver; +use Symfony\Component\OptionsResolver\Options; + +class UploadValidatorExtensionTest extends TypeTestCase +{ + public function testPostMaxSizeTranslation() + { + $translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock(); + + $translator->expects($this->any()) + ->method('trans') + ->with($this->equalTo('old max {{ max }}!')) + ->willReturn('translated max {{ max }}!'); + + $extension = new UploadValidatorExtension($translator); + + $resolver = new OptionsResolver(); + $resolver->setDefault('post_max_size_message', 'old max {{ max }}!'); + $resolver->setDefault('upload_max_size_message', function (Options $options, $message) { + return function () use ($options) { + return $options['post_max_size_message']; + }; + }); + + $extension->configureOptions($resolver); + $options = $resolver->resolve(); + + $this->assertEquals('translated max {{ max }}!', call_user_func($options['upload_max_size_message'])); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c3ee7303efa1ef704786b8810c312e765b64df19 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Validator\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Validator\Util\ServerParams; +use Symfony\Component\HttpFoundation\Request; + +class ServerParamsTest extends TestCase +{ + public function testGetContentLengthFromSuperglobals() + { + $serverParams = new ServerParams(); + $this->assertNull($serverParams->getContentLength()); + + $_SERVER['CONTENT_LENGTH'] = 1024; + + $this->assertEquals(1024, $serverParams->getContentLength()); + + unset($_SERVER['CONTENT_LENGTH']); + } + + public function testGetContentLengthFromRequest() + { + $request = Request::create('http://foo', 'GET', array(), array(), array(), array('CONTENT_LENGTH' => 1024)); + $requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->setMethods(array('getCurrentRequest'))->getMock(); + $requestStack->expects($this->once())->method('getCurrentRequest')->will($this->returnValue($request)); + $serverParams = new ServerParams($requestStack); + + $this->assertEquals(1024, $serverParams->getContentLength()); + } + + /** @dataProvider getGetPostMaxSizeTestData */ + public function testGetPostMaxSize($size, $bytes) + { + $serverParams = $this->getMockBuilder('Symfony\Component\Form\Extension\Validator\Util\ServerParams')->setMethods(array('getNormalizedIniPostMaxSize'))->getMock(); + $serverParams + ->expects($this->any()) + ->method('getNormalizedIniPostMaxSize') + ->will($this->returnValue(strtoupper($size))); + + $this->assertEquals($bytes, $serverParams->getPostMaxSize()); + } + + public function getGetPostMaxSizeTestData() + { + return array( + array('2k', 2048), + array('2 k', 2048), + array('8m', 8 * 1024 * 1024), + array('+2 k', 2048), + array('+2???k', 2048), + array('0x10', 16), + array('0xf', 15), + array('010', 8), + array('+0x10 k', 16 * 1024), + array('1g', 1024 * 1024 * 1024), + array('-1', -1), + array('0', 0), + array('2mk', 2048), // the unit must be the last char, so in this case 'k', not 'm' + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1b77e1ff6accb8ceb89f0304d025eb0f84de41ce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Validator; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Validator\ValidatorExtension; + +class ValidatorExtensionTest extends TestCase +{ + public function test2Dot5ValidationApi() + { + $validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\RecursiveValidator') + ->disableOriginalConstructor() + ->getMock(); + $metadata = $this->getMockBuilder('Symfony\Component\Validator\Mapping\ClassMetadata') + ->disableOriginalConstructor() + ->getMock(); + + $validator->expects($this->once()) + ->method('getMetadataFor') + ->with($this->identicalTo('Symfony\Component\Form\Form')) + ->will($this->returnValue($metadata)); + + // Verify that the constraints are added + $metadata->expects($this->once()) + ->method('addConstraint') + ->with($this->isInstanceOf('Symfony\Component\Form\Extension\Validator\Constraints\Form')); + + $metadata->expects($this->once()) + ->method('addPropertyConstraint') + ->with('children', $this->isInstanceOf('Symfony\Component\Validator\Constraints\Valid')); + + $extension = new ValidatorExtension($validator); + $guesser = $extension->loadTypeGuesser(); + + $this->assertInstanceOf('Symfony\Component\Form\Extension\Validator\ValidatorTypeGuesser', $guesser); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7d47737253934e6727dfe6786794a94f2b7ef742 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php @@ -0,0 +1,138 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Validator; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Validator\ValidatorTypeGuesser; +use Symfony\Component\Form\Guess\Guess; +use Symfony\Component\Form\Guess\ValueGuess; +use Symfony\Component\Validator\Constraints\Email; +use Symfony\Component\Validator\Constraints\Length; +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Constraints\IsTrue; +use Symfony\Component\Validator\Constraints\Type; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * @author franek + * @author Bernhard Schussek + */ +class ValidatorTypeGuesserTest extends TestCase +{ + const TEST_CLASS = 'Symfony\Component\Form\Tests\Extension\Validator\ValidatorTypeGuesserTest_TestClass'; + + const TEST_PROPERTY = 'property'; + + /** + * @var ValidatorTypeGuesser + */ + private $guesser; + + /** + * @var ClassMetadata + */ + private $metadata; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $metadataFactory; + + protected function setUp() + { + $this->metadata = new ClassMetadata(self::TEST_CLASS); + $this->metadataFactory = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface')->getMock(); + $this->metadataFactory->expects($this->any()) + ->method('getMetadataFor') + ->with(self::TEST_CLASS) + ->will($this->returnValue($this->metadata)); + $this->guesser = new ValidatorTypeGuesser($this->metadataFactory); + } + + public function guessRequiredProvider() + { + return array( + array(new NotNull(), new ValueGuess(true, Guess::HIGH_CONFIDENCE)), + array(new NotBlank(), new ValueGuess(true, Guess::HIGH_CONFIDENCE)), + array(new IsTrue(), new ValueGuess(true, Guess::HIGH_CONFIDENCE)), + array(new Length(10), new ValueGuess(false, Guess::LOW_CONFIDENCE)), + array(new Range(array('min' => 1, 'max' => 20)), new ValueGuess(false, Guess::LOW_CONFIDENCE)), + ); + } + + /** + * @dataProvider guessRequiredProvider + */ + public function testGuessRequired($constraint, $guess) + { + // add distracting constraint + $this->metadata->addPropertyConstraint(self::TEST_PROPERTY, new Email()); + + // add constraint under test + $this->metadata->addPropertyConstraint(self::TEST_PROPERTY, $constraint); + + $this->assertEquals($guess, $this->guesser->guessRequired(self::TEST_CLASS, self::TEST_PROPERTY)); + } + + public function testGuessRequiredReturnsFalseForUnmappedProperties() + { + $this->assertEquals(new ValueGuess(false, Guess::LOW_CONFIDENCE), $this->guesser->guessRequired(self::TEST_CLASS, self::TEST_PROPERTY)); + } + + public function testGuessMaxLengthForConstraintWithMaxValue() + { + $constraint = new Length(array('max' => '2')); + + $result = $this->guesser->guessMaxLengthForConstraint($constraint); + $this->assertInstanceOf('Symfony\Component\Form\Guess\ValueGuess', $result); + $this->assertEquals(2, $result->getValue()); + $this->assertEquals(Guess::HIGH_CONFIDENCE, $result->getConfidence()); + } + + public function testGuessMaxLengthForConstraintWithMinValue() + { + $constraint = new Length(array('min' => '2')); + + $result = $this->guesser->guessMaxLengthForConstraint($constraint); + $this->assertNull($result); + } + + public function maxLengthTypeProvider() + { + return array( + array('double'), + array('float'), + array('numeric'), + array('real'), + ); + } + + /** + * @dataProvider maxLengthTypeProvider + */ + public function testGuessMaxLengthForConstraintWithType($type) + { + $constraint = new Type($type); + + $result = $this->guesser->guessMaxLengthForConstraint($constraint); + $this->assertInstanceOf('Symfony\Component\Form\Guess\ValueGuess', $result); + $this->assertNull($result->getValue()); + $this->assertEquals(Guess::MEDIUM_CONFIDENCE, $result->getConfidence()); + } +} + +class ValidatorTypeGuesserTest_TestClass +{ + private $property; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dd70b23bda0da18afae1f16677d8eb0d25212fc2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php @@ -0,0 +1,1581 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Validator\ViolationMapper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapper; +use Symfony\Component\Form\Exception\TransformationFailedException; +use Symfony\Component\Form\CallbackTransformer; +use Symfony\Component\Form\Form; +use Symfony\Component\Form\FormInterface; +use Symfony\Component\Form\FormConfigBuilder; +use Symfony\Component\Form\FormError; +use Symfony\Component\PropertyAccess\PropertyPath; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationInterface; + +/** + * @author Bernhard Schussek + */ +class ViolationMapperTest extends TestCase +{ + const LEVEL_0 = 0; + + const LEVEL_1 = 1; + + const LEVEL_1B = 2; + + const LEVEL_2 = 3; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $dispatcher; + + /** + * @var ViolationMapper + */ + private $mapper; + + /** + * @var string + */ + private $message; + + /** + * @var string + */ + private $messageTemplate; + + /** + * @var array + */ + private $params; + + protected function setUp() + { + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->mapper = new ViolationMapper(); + $this->message = 'Message'; + $this->messageTemplate = 'Message template'; + $this->params = array('foo' => 'bar'); + } + + protected function getForm($name = 'name', $propertyPath = null, $dataClass = null, $errorMapping = array(), $inheritData = false, $synchronized = true) + { + $config = new FormConfigBuilder($name, $dataClass, $this->dispatcher, array( + 'error_mapping' => $errorMapping, + )); + $config->setMapped(true); + $config->setInheritData($inheritData); + $config->setPropertyPath($propertyPath); + $config->setCompound(true); + $config->setDataMapper($this->getDataMapper()); + + if (!$synchronized) { + $config->addViewTransformer(new CallbackTransformer( + function ($normData) { return $normData; }, + function () { throw new TransformationFailedException(); } + )); + } + + return new Form($config); + } + + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ + private function getDataMapper() + { + return $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); + } + + /** + * @param $propertyPath + * + * @return ConstraintViolation + */ + protected function getConstraintViolation($propertyPath) + { + return new ConstraintViolation($this->message, $this->messageTemplate, $this->params, null, $propertyPath, null); + } + + /** + * @return FormError + */ + protected function getFormError(ConstraintViolationInterface $violation, FormInterface $form) + { + $error = new FormError($this->message, $this->messageTemplate, $this->params, null, $violation); + $error->setOrigin($form); + + return $error; + } + + public function testMapToFormInheritingParentDataIfDataDoesNotMatch() + { + $violation = $this->getConstraintViolation('children[address].data.foo'); + $parent = $this->getForm('parent'); + $child = $this->getForm('address', 'address', null, array(), true); + $grandChild = $this->getForm('street'); + + $parent->add($child); + $child->add($grandChild); + + $parent->submit(array()); + + $this->mapper->mapViolation($violation, $parent); + + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $child->getName().' should have an error, but has none'); + $this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one'); + } + + public function testFollowDotRules() + { + $violation = $this->getConstraintViolation('data.foo'); + $parent = $this->getForm('parent', null, null, array( + 'foo' => 'address', + )); + $child = $this->getForm('address', null, null, array( + '.' => 'street', + )); + $grandChild = $this->getForm('street', null, null, array( + '.' => 'name', + )); + $grandGrandChild = $this->getForm('name'); + + $parent->add($child); + $child->add($grandChild); + $grandChild->add($grandGrandChild); + + $parent->submit(array()); + + $this->mapper->mapViolation($violation, $parent); + + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertCount(0, $child->getErrors(), $child->getName().' should not have an error, but has one'); + $this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one'); + $this->assertEquals(array($this->getFormError($violation, $grandGrandChild)), iterator_to_array($grandGrandChild->getErrors()), $grandGrandChild->getName().' should have an error, but has none'); + } + + public function testAbortMappingIfNotSynchronized() + { + $violation = $this->getConstraintViolation('children[address].data.street'); + $parent = $this->getForm('parent'); + $child = $this->getForm('address', 'address', null, array(), false, false); + // even though "street" is synchronized, it should not have any errors + // due to its parent not being synchronized + $grandChild = $this->getForm('street', 'street'); + + $parent->add($child); + $child->add($grandChild); + + // invoke the transformer and mark the form unsynchronized + $parent->submit(array()); + + $this->mapper->mapViolation($violation, $parent); + + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertCount(0, $child->getErrors(), $child->getName().' should not have an error, but has one'); + $this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one'); + } + + public function testAbortDotRuleMappingIfNotSynchronized() + { + $violation = $this->getConstraintViolation('data.address'); + $parent = $this->getForm('parent'); + $child = $this->getForm('address', 'address', null, array( + '.' => 'street', + ), false, false); + // even though "street" is synchronized, it should not have any errors + // due to its parent not being synchronized + $grandChild = $this->getForm('street'); + + $parent->add($child); + $child->add($grandChild); + + // invoke the transformer and mark the form unsynchronized + $parent->submit(array()); + + $this->mapper->mapViolation($violation, $parent); + + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertCount(0, $child->getErrors(), $child->getName().' should not have an error, but has one'); + $this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one'); + } + + public function testAbortMappingIfNotSubmitted() + { + $violation = $this->getConstraintViolation('children[address].data.street'); + $parent = $this->getForm('parent'); + $child = $this->getForm('address', 'address'); + $grandChild = $this->getForm('street', 'street'); + + $parent->add($child); + $child->add($grandChild); + + // Disable automatic submission of missing fields + $parent->submit(array(), false); + $child->submit(array(), false); + + // $grandChild is not submitted + + $this->mapper->mapViolation($violation, $parent); + + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertCount(0, $child->getErrors(), $child->getName().' should not have an error, but has one'); + $this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one'); + } + + public function testAbortDotRuleMappingIfNotSubmitted() + { + $violation = $this->getConstraintViolation('data.address'); + $parent = $this->getForm('parent'); + $child = $this->getForm('address', 'address', null, array( + '.' => 'street', + )); + $grandChild = $this->getForm('street'); + + $parent->add($child); + $child->add($grandChild); + + // Disable automatic submission of missing fields + $parent->submit(array(), false); + $child->submit(array(), false); + + // $grandChild is not submitted + + $this->mapper->mapViolation($violation, $parent); + + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertCount(0, $child->getErrors(), $child->getName().' should not have an error, but has one'); + $this->assertCount(0, $grandChild->getErrors(), $grandChild->getName().' should not have an error, but has one'); + } + + public function provideDefaultTests() + { + // The mapping must be deterministic! If a child has the property path "[street]", + // "data[street]" should be mapped, but "data.street" should not! + return array( + // mapping target, child name, its property path, grand child name, its property path, violation path + array(self::LEVEL_0, 'address', 'address', 'street', 'street', ''), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data'), + + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data'), + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].data.street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data[street].prop'), + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'data.address.street'), + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'data.address.street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'data.address[street]'), + array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'data.address[street].prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address].street'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address].street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address][street]'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address][street].prop'), + + array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[street]', 'children[address].data'), + array(self::LEVEL_1, 'address', 'address', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_1, 'address', 'address', 'street', '[street]', 'children[address].data.street.prop'), + array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address].data[street]'), + array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address].data[street].prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[street]', 'data.address.street'), + array(self::LEVEL_1, 'address', 'address', 'street', '[street]', 'data.address.street.prop'), + array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'data.address[street]'), + array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'data.address[street].prop'), + array(self::LEVEL_0, 'address', 'address', 'street', '[street]', 'data[address].street'), + array(self::LEVEL_0, 'address', 'address', 'street', '[street]', 'data[address].street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', '[street]', 'data[address][street]'), + array(self::LEVEL_0, 'address', 'address', 'street', '[street]', 'data[address][street].prop'), + + array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'street', 'children[address].data'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address].data.street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'street', 'children[address].data[street].prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'street', 'data.address.street'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'street', 'data.address.street.prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'street', 'data.address[street]'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'street', 'data.address[street].prop'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'data[address].street'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'data[address].street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'street', 'data[address][street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'street', 'data[address][street].prop'), + + array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'children[address].data'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'children[address].data.street.prop'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address].data[street]'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address].data[street].prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[street]', 'data.address.street'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[street]', 'data.address.street.prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[street]', 'data.address[street]'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[street]', 'data.address[street].prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'data[address].street'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[street]', 'data[address].street.prop'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'data[address][street]'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'data[address][street].prop'), + + array(self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'children[address].data'), + array(self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'children[address].data.street.prop'), + array(self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'children[address].data[street].prop'), + array(self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'data.person.address.street'), + array(self::LEVEL_2, 'address', 'person.address', 'street', 'street', 'data.person.address.street.prop'), + array(self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'data.person.address[street]'), + array(self::LEVEL_1, 'address', 'person.address', 'street', 'street', 'data.person.address[street].prop'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.person[address].street'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.person[address].street.prop'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.person[address][street]'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.person[address][street].prop'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person].address.street'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person].address.street.prop'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person].address[street]'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person].address[street].prop'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person][address].street'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person][address].street.prop'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person][address][street]'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data[person][address][street].prop'), + + array(self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'children[address].data'), + array(self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'children[address].data.street.prop'), + array(self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'children[address].data[street]'), + array(self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'children[address].data[street].prop'), + array(self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'data.person.address.street'), + array(self::LEVEL_1, 'address', 'person.address', 'street', '[street]', 'data.person.address.street.prop'), + array(self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'data.person.address[street]'), + array(self::LEVEL_2, 'address', 'person.address', 'street', '[street]', 'data.person.address[street].prop'), + array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data.person[address].street'), + array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data.person[address].street.prop'), + array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data.person[address][street]'), + array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data.person[address][street].prop'), + array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person].address.street'), + array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person].address.street.prop'), + array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person].address[street]'), + array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person].address[street].prop'), + array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person][address].street'), + array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person][address].street.prop'), + array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person][address][street]'), + array(self::LEVEL_0, 'address', 'person.address', 'street', '[street]', 'data[person][address][street].prop'), + + array(self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'children[address].data'), + array(self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'children[address].data.street.prop'), + array(self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'children[address].data[street].prop'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data.person.address.street'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data.person.address.street.prop'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data.person.address[street]'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data.person.address[street].prop'), + array(self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'data.person[address].street'), + array(self::LEVEL_2, 'address', 'person[address]', 'street', 'street', 'data.person[address].street.prop'), + array(self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'data.person[address][street]'), + array(self::LEVEL_1, 'address', 'person[address]', 'street', 'street', 'data.person[address][street].prop'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person].address.street'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person].address.street.prop'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person].address[street]'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person].address[street].prop'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person][address].street'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person][address].street.prop'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person][address][street]'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', 'street', 'data[person][address][street].prop'), + + array(self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'children[address].data'), + array(self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'children[address].data.street.prop'), + array(self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'children[address].data[street]'), + array(self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'children[address].data[street].prop'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data.person.address.street'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data.person.address.street.prop'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data.person.address[street]'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data.person.address[street].prop'), + array(self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'data.person[address].street'), + array(self::LEVEL_1, 'address', 'person[address]', 'street', '[street]', 'data.person[address].street.prop'), + array(self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'data.person[address][street]'), + array(self::LEVEL_2, 'address', 'person[address]', 'street', '[street]', 'data.person[address][street].prop'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person].address.street'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person].address.street.prop'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person].address[street]'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person].address[street].prop'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person][address].street'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person][address].street.prop'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person][address][street]'), + array(self::LEVEL_0, 'address', 'person[address]', 'street', '[street]', 'data[person][address][street].prop'), + + array(self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'children[address].data'), + array(self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'children[address].data.street.prop'), + array(self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'children[address].data[street].prop'), + array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person.address.street'), + array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person.address.street.prop'), + array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person.address[street]'), + array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person.address[street].prop'), + array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person[address].street'), + array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person[address].street.prop'), + array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person[address][street]'), + array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data.person[address][street].prop'), + array(self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'data[person].address.street'), + array(self::LEVEL_2, 'address', '[person].address', 'street', 'street', 'data[person].address.street.prop'), + array(self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'data[person].address[street]'), + array(self::LEVEL_1, 'address', '[person].address', 'street', 'street', 'data[person].address[street].prop'), + array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data[person][address].street'), + array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data[person][address].street.prop'), + array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data[person][address][street]'), + array(self::LEVEL_0, 'address', '[person].address', 'street', 'street', 'data[person][address][street].prop'), + + array(self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'children[address].data'), + array(self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'children[address].data.street.prop'), + array(self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'children[address].data[street]'), + array(self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'children[address].data[street].prop'), + array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person.address.street'), + array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person.address.street.prop'), + array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person.address[street]'), + array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person.address[street].prop'), + array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person[address].street'), + array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person[address].street.prop'), + array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person[address][street]'), + array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data.person[address][street].prop'), + array(self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'data[person].address.street'), + array(self::LEVEL_1, 'address', '[person].address', 'street', '[street]', 'data[person].address.street.prop'), + array(self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'data[person].address[street]'), + array(self::LEVEL_2, 'address', '[person].address', 'street', '[street]', 'data[person].address[street].prop'), + array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data[person][address].street'), + array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data[person][address].street.prop'), + array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data[person][address][street]'), + array(self::LEVEL_0, 'address', '[person].address', 'street', '[street]', 'data[person][address][street].prop'), + + array(self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'children[address]'), + array(self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'children[address].data'), + array(self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'children[address].data.street.prop'), + array(self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'children[address].data[street].prop'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person.address.street'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person.address.street.prop'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person.address[street]'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person.address[street].prop'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person[address].street'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person[address].street.prop'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person[address][street]'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data.person[address][street].prop'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data[person].address.street'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data[person].address.street.prop'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data[person].address[street]'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', 'street', 'data[person].address[street].prop'), + array(self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'data[person][address].street'), + array(self::LEVEL_2, 'address', '[person][address]', 'street', 'street', 'data[person][address].street.prop'), + array(self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'data[person][address][street]'), + array(self::LEVEL_1, 'address', '[person][address]', 'street', 'street', 'data[person][address][street].prop'), + + array(self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'children[address].data'), + array(self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'children[address].data.street.prop'), + array(self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'children[address].data[street]'), + array(self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'children[address].data[street].prop'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person.address.street'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person.address.street.prop'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person.address[street]'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person.address[street].prop'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person[address].street'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person[address].street.prop'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person[address][street]'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data.person[address][street].prop'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data[person].address.street'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data[person].address.street.prop'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data[person].address[street]'), + array(self::LEVEL_0, 'address', '[person][address]', 'street', '[street]', 'data[person].address[street].prop'), + array(self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'data[person][address].street'), + array(self::LEVEL_1, 'address', '[person][address]', 'street', '[street]', 'data[person][address].street.prop'), + array(self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'data[person][address][street]'), + array(self::LEVEL_2, 'address', '[person][address]', 'street', '[street]', 'data[person][address][street].prop'), + + array(self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data.office'), + array(self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'children[address].data.office.street'), + array(self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'children[address].data.office.street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data.office[street]'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data.office[street].prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office]'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office].street'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office].street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office][street]'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data[office][street].prop'), + array(self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'data.address.office.street'), + array(self::LEVEL_2, 'address', 'address', 'street', 'office.street', 'data.address.office.street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address.office[street]'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address.office[street].prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address[office].street'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address[office].street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address[office][street]'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address[office][street].prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address].office.street'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address].office.street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address].office[street]'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address].office[street].prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address][office].street'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address][office].street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address][office][street]'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office.street', 'data[address][office][street].prop'), + + array(self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data.office'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'children[address].data.office.street'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'children[address].data.office.street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data.office[street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data.office[street].prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office]'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office].street'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office].street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office][street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'children[address].data[office][street].prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address.office.street'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address.office.street.prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address.office[street]'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address.office[street].prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address[office].street'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address[office].street.prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address[office][street]'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office.street', 'data.address[office][street].prop'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'data[address].office.street'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'office.street', 'data[address].office.street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address].office[street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address].office[street].prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address][office].street'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address][office].street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address][office][street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office.street', 'data[address][office][street].prop'), + + array(self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data.office'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data.office.street'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data.office.street.prop'), + array(self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'children[address].data.office[street]'), + array(self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'children[address].data.office[street].prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office]'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office].street'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office].street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office][street]'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'children[address].data[office][street].prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address.office.street'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address.office.street.prop'), + array(self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'data.address.office[street]'), + array(self::LEVEL_2, 'address', 'address', 'street', 'office[street]', 'data.address.office[street].prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address[office].street'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address[office].street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address[office][street]'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office[street]', 'data.address[office][street].prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address].office.street'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address].office.street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address].office[street]'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address].office[street].prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address][office].street'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address][office].street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address][office][street]'), + array(self::LEVEL_0, 'address', 'address', 'street', 'office[street]', 'data[address][office][street].prop'), + + array(self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data.office.street'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data.office.street.prop'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'children[address].data.office[street]'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'children[address].data.office[street].prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office]'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office].street'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office].street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office][street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'children[address].data[office][street].prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address.office.street'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address.office.street.prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address.office[street]'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address.office[street].prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address[office].street'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address[office].street.prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address[office][street]'), + array(self::LEVEL_0, 'address', '[address]', 'street', 'office[street]', 'data.address[office][street].prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address].office.street'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address].office.street.prop'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'data[address].office[street]'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'office[street]', 'data[address].office[street].prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address][office].street'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address][office].street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address][office][street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', 'office[street]', 'data[address][office][street].prop'), + + array(self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office.street'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office.street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office[street]'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data.office[street].prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data[office]'), + array(self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'children[address].data[office].street'), + array(self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'children[address].data[office].street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data[office][street]'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'children[address].data[office][street].prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address.office.street'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address.office.street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address.office[street]'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address.office[street].prop'), + array(self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'data.address[office].street'), + array(self::LEVEL_2, 'address', 'address', 'street', '[office].street', 'data.address[office].street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address[office][street]'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office].street', 'data.address[office][street].prop'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address].office.street'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address].office.street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address].office[street]'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address].office[street].prop'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address][office].street'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address][office].street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address][office][street]'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office].street', 'data[address][office][street].prop'), + + array(self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office.street'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office.street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office[street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data.office[street].prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data[office]'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'children[address].data[office].street'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'children[address].data[office].street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data[office][street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'children[address].data[office][street].prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address.office.street'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address.office.street.prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address.office[street]'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address.office[street].prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address[office].street'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address[office].street.prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address[office][street]'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office].street', 'data.address[office][street].prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address].office.street'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address].office.street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address].office[street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address].office[street].prop'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'data[address][office].street'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[office].street', 'data[address][office].street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address][office][street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office].street', 'data[address][office][street].prop'), + + array(self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office.street'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office.street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office[street]'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data.office[street].prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data[office]'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data[office].street'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'children[address].data[office].street.prop'), + array(self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'children[address].data[office][street]'), + array(self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'children[address].data[office][street].prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address.office.street'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address.office.street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address.office[street]'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address.office[street].prop'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address[office].street'), + array(self::LEVEL_1, 'address', 'address', 'street', '[office][street]', 'data.address[office].street.prop'), + array(self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'data.address[office][street]'), + array(self::LEVEL_2, 'address', 'address', 'street', '[office][street]', 'data.address[office][street].prop'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address].office.street'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address].office.street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address].office[street]'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address].office[street].prop'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address][office].street'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address][office].street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address][office][street]'), + array(self::LEVEL_0, 'address', 'address', 'street', '[office][street]', 'data[address][office][street].prop'), + + array(self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office.street'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office.street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office[street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data.office[street].prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office]'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office].street'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office].street.prop'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office][street]'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'children[address].data[office][street].prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address.office.street'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address.office.street.prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address.office[street]'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address.office[street].prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address[office].street'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address[office].street.prop'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address[office][street]'), + array(self::LEVEL_0, 'address', '[address]', 'street', '[office][street]', 'data.address[office][street].prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address].office.street'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address].office.street.prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address].office[street]'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address].office[street].prop'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address][office].street'), + array(self::LEVEL_1, 'address', '[address]', 'street', '[office][street]', 'data[address][office].street.prop'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'data[address][office][street]'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[office][street]', 'data[address][office][street].prop'), + + // Edge cases which must not occur + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address][street]'), + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address][street].prop'), + array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address][street]'), + array(self::LEVEL_2, 'address', 'address', 'street', '[street]', 'children[address][street].prop'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address][street]'), + array(self::LEVEL_2, 'address', '[address]', 'street', 'street', 'children[address][street].prop'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address][street]'), + array(self::LEVEL_2, 'address', '[address]', 'street', '[street]', 'children[address][street].prop'), + + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'children[person].children[address].children[street]'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'children[person].children[address].data.street'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'children[person].data.address.street'), + array(self::LEVEL_0, 'address', 'person.address', 'street', 'street', 'data.address.street'), + + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].children[office].children[street]'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].children[office].data.street'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'children[address].data.street'), + array(self::LEVEL_1, 'address', 'address', 'street', 'office.street', 'data.address.street'), + ); + } + + /** + * @dataProvider provideDefaultTests + */ + public function testDefaultErrorMapping($target, $childName, $childPath, $grandChildName, $grandChildPath, $violationPath) + { + $violation = $this->getConstraintViolation($violationPath); + $parent = $this->getForm('parent'); + $child = $this->getForm($childName, $childPath); + $grandChild = $this->getForm($grandChildName, $grandChildPath); + + $parent->add($child); + $child->add($grandChild); + + $parent->submit(array()); + + $this->mapper->mapViolation($violation, $parent); + + if (self::LEVEL_0 === $target) { + $this->assertEquals(array($this->getFormError($violation, $parent)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none'); + $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); + $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); + } elseif (self::LEVEL_1 === $target) { + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none'); + $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); + } else { + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); + $this->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none'); + } + } + + public function provideCustomDataErrorTests() + { + return array( + // mapping target, error mapping, child name, its property path, grand child name, its property path, violation path + array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo'), + array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo.prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo]'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo].prop'), + + array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address'), + array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address.prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address]'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address].prop'), + + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo'), + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo]'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].prop'), + + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address.prop'), + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address]'), + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address].prop'), + + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.prop'), + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo]'), + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].prop'), + + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address'), + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address.prop'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address]'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address].prop'), + + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo.prop'), + array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo]'), + array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo].prop'), + + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address.prop'), + array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address]'), + array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address].prop'), + + array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo.street'), + array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo.street.prop'), + array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo[street]'), + array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.foo[street].prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo].street'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo].street.prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo][street]'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[foo][street].prop'), + + array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address.street'), + array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address.street.prop'), + array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address[street]'), + array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', 'street', 'data.address[street].prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address].street'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address].street.prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address][street]'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', 'street', 'data[address][street].prop'), + + array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.foo.street'), + array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.foo.street.prop'), + array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.foo[street]'), + array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.foo[street].prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[foo].street'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[foo].street.prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[foo][street]'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[foo][street].prop'), + + array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.address.street'), + array(self::LEVEL_1, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.address.street.prop'), + array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.address[street]'), + array(self::LEVEL_2, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data.address[street].prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[address].street'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[address].street.prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[address][street]'), + array(self::LEVEL_0, 'foo', 'address', 'address', 'address', 'street', '[street]', 'data[address][street].prop'), + + array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street'), + array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street.prop'), + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street]'), + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street].prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street.prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street]'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street].prop'), + + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address.street'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address.street.prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address[street]'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.address[street].prop'), + array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address].street'), + array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address].street.prop'), + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address][street]'), + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[address][street].prop'), + + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.foo.street'), + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.foo.street.prop'), + array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.foo[street]'), + array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.foo[street].prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[foo].street'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[foo].street.prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[foo][street]'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[foo][street].prop'), + + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.address.street'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.address.street.prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.address[street]'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data.address[street].prop'), + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[address].street'), + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[address].street.prop'), + array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[address][street]'), + array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', '[street]', 'data[address][street].prop'), + + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.street'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.street.prop'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo[street]'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo[street].prop'), + array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].street'), + array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].street.prop'), + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo][street]'), + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo][street].prop'), + + array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address.street'), + array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address.street.prop'), + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address[street]'), + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.address[street].prop'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address].street'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address].street.prop'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address][street]'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[address][street].prop'), + + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.street'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.street.prop'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[street]'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[street].prop'), + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].street'), + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].street.prop'), + array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][street]'), + array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][street].prop'), + + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.address.street'), + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.address.street.prop'), + array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.address[street]'), + array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data.address[street].prop'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[address].street'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[address].street.prop'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[address][street]'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', '[street]', 'data[address][street].prop'), + + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street.prop'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street]'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street].prop'), + array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street'), + array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street.prop'), + array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street]'), + array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street].prop'), + + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address.street'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address.street.prop'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address[street]'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data.address[street].prop'), + array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address].street'), + array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address].street.prop'), + array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address][street]'), + array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', 'street', 'data[address][street].prop'), + + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.foo.street'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.foo.street.prop'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.foo[street]'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.foo[street].prop'), + array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[foo].street'), + array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[foo].street.prop'), + array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[foo][street]'), + array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[foo][street].prop'), + + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.address.street'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.address.street.prop'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.address[street]'), + array(self::LEVEL_0, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data.address[street].prop'), + array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[address].street'), + array(self::LEVEL_1, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[address].street.prop'), + array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[address][street]'), + array(self::LEVEL_2, '[foo]', 'address', 'address', '[address]', 'street', '[street]', 'data[address][street].prop'), + + array(self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar'), + array(self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar]'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar]'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'), + + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'), + array(self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar]'), + array(self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar]'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'), + + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar]'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'), + array(self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar'), + array(self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar]'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'), + + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar]'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'), + array(self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar]'), + array(self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'), + + array(self::LEVEL_2, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street'), + array(self::LEVEL_2, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street.prop'), + array(self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street]'), + array(self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street].prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street.prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street]'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street].prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street.prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street]'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street].prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street.prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street]'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street].prop'), + + array(self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street'), + array(self::LEVEL_1, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street.prop'), + array(self::LEVEL_2, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street]'), + array(self::LEVEL_2, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street].prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street.prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street]'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street].prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street.prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street]'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street].prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street.prop'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street]'), + array(self::LEVEL_0, 'foo.bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street].prop'), + + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street.prop'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street]'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street].prop'), + array(self::LEVEL_2, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street'), + array(self::LEVEL_2, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street.prop'), + array(self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street]'), + array(self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street].prop'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street.prop'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street]'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street].prop'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street.prop'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street]'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street].prop'), + + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street.prop'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street]'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street].prop'), + array(self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street'), + array(self::LEVEL_1, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street.prop'), + array(self::LEVEL_2, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street]'), + array(self::LEVEL_2, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street].prop'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street.prop'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street]'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street].prop'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street.prop'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street]'), + array(self::LEVEL_0, 'foo[bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street].prop'), + + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street.prop'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street]'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street].prop'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street.prop'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street]'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street].prop'), + array(self::LEVEL_2, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street'), + array(self::LEVEL_2, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street.prop'), + array(self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street]'), + array(self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street].prop'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street.prop'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street]'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street].prop'), + + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street.prop'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street]'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street].prop'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street.prop'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street]'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street].prop'), + array(self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street'), + array(self::LEVEL_1, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street.prop'), + array(self::LEVEL_2, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street]'), + array(self::LEVEL_2, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street].prop'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street.prop'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street]'), + array(self::LEVEL_0, '[foo].bar', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street].prop'), + + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar.street.prop'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street]'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo.bar[street].prop'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar].street.prop'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street]'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data.foo[bar][street].prop'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar.street.prop'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street]'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo].bar[street].prop'), + array(self::LEVEL_2, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street'), + array(self::LEVEL_2, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar].street.prop'), + array(self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street]'), + array(self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', 'street', 'data[foo][bar][street].prop'), + + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar.street.prop'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street]'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo.bar[street].prop'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar].street.prop'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street]'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data.foo[bar][street].prop'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar.street.prop'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street]'), + array(self::LEVEL_0, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo].bar[street].prop'), + array(self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street'), + array(self::LEVEL_1, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar].street.prop'), + array(self::LEVEL_2, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street]'), + array(self::LEVEL_2, '[foo][bar]', 'address', 'address', 'address', 'street', '[street]', 'data[foo][bar][street].prop'), + + array(self::LEVEL_2, 'foo', 'address.street', 'address', 'address', 'street', 'street', 'data.foo'), + array(self::LEVEL_2, 'foo', 'address.street', 'address', 'address', 'street', 'street', 'data.foo.prop'), + array(self::LEVEL_2, '[foo]', 'address.street', 'address', 'address', 'street', 'street', 'data[foo]'), + array(self::LEVEL_2, '[foo]', 'address.street', 'address', 'address', 'street', 'street', 'data[foo].prop'), + + array(self::LEVEL_2, 'foo', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo'), + array(self::LEVEL_2, 'foo', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo.prop'), + array(self::LEVEL_2, '[foo]', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo]'), + array(self::LEVEL_2, '[foo]', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo].prop'), + + array(self::LEVEL_2, 'foo', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo'), + array(self::LEVEL_2, 'foo', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo.prop'), + array(self::LEVEL_2, '[foo]', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo]'), + array(self::LEVEL_2, '[foo]', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo].prop'), + + array(self::LEVEL_2, 'foo.bar', 'address.street', 'address', 'address', 'street', 'street', 'data.foo.bar'), + array(self::LEVEL_2, 'foo.bar', 'address.street', 'address', 'address', 'street', 'street', 'data.foo.bar.prop'), + array(self::LEVEL_2, 'foo[bar]', 'address.street', 'address', 'address', 'street', 'street', 'data.foo[bar]'), + array(self::LEVEL_2, 'foo[bar]', 'address.street', 'address', 'address', 'street', 'street', 'data.foo[bar].prop'), + array(self::LEVEL_2, '[foo].bar', 'address.street', 'address', 'address', 'street', 'street', 'data[foo].bar'), + array(self::LEVEL_2, '[foo].bar', 'address.street', 'address', 'address', 'street', 'street', 'data[foo].bar.prop'), + array(self::LEVEL_2, '[foo][bar]', 'address.street', 'address', 'address', 'street', 'street', 'data[foo][bar]'), + array(self::LEVEL_2, '[foo][bar]', 'address.street', 'address', 'address', 'street', 'street', 'data[foo][bar].prop'), + + array(self::LEVEL_2, 'foo.bar', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo.bar'), + array(self::LEVEL_2, 'foo.bar', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo.bar.prop'), + array(self::LEVEL_2, 'foo[bar]', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo[bar]'), + array(self::LEVEL_2, 'foo[bar]', 'address.street', 'address', 'address', 'street', '[street]', 'data.foo[bar].prop'), + array(self::LEVEL_2, '[foo].bar', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo].bar'), + array(self::LEVEL_2, '[foo].bar', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo].bar.prop'), + array(self::LEVEL_2, '[foo][bar]', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo][bar]'), + array(self::LEVEL_2, '[foo][bar]', 'address.street', 'address', 'address', 'street', '[street]', 'data[foo][bar].prop'), + + array(self::LEVEL_2, 'foo.bar', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo.bar'), + array(self::LEVEL_2, 'foo.bar', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo.bar.prop'), + array(self::LEVEL_2, 'foo[bar]', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo[bar]'), + array(self::LEVEL_2, 'foo[bar]', 'address.street', 'address', '[address]', 'street', 'street', 'data.foo[bar].prop'), + array(self::LEVEL_2, '[foo].bar', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo].bar'), + array(self::LEVEL_2, '[foo].bar', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo].bar.prop'), + array(self::LEVEL_2, '[foo][bar]', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo][bar]'), + array(self::LEVEL_2, '[foo][bar]', 'address.street', 'address', '[address]', 'street', 'street', 'data[foo][bar].prop'), + + // Edge cases + array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street'), + array(self::LEVEL_2, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo.street.prop'), + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street]'), + array(self::LEVEL_1, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data.foo[street].prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo].street.prop'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street]'), + array(self::LEVEL_0, 'foo', 'address', 'address', '[address]', 'street', 'street', 'data[foo][street].prop'), + + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.street'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo.street.prop'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo[street]'), + array(self::LEVEL_0, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data.foo[street].prop'), + array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].street'), + array(self::LEVEL_2, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo].street.prop'), + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo][street]'), + array(self::LEVEL_1, '[foo]', 'address', 'address', 'address', 'street', 'street', 'data[foo][street].prop'), + ); + } + + /** + * @dataProvider provideCustomDataErrorTests + */ + public function testCustomDataErrorMapping($target, $mapFrom, $mapTo, $childName, $childPath, $grandChildName, $grandChildPath, $violationPath) + { + $violation = $this->getConstraintViolation($violationPath); + $parent = $this->getForm('parent', null, null, array($mapFrom => $mapTo)); + $child = $this->getForm($childName, $childPath); + $grandChild = $this->getForm($grandChildName, $grandChildPath); + + $parent->add($child); + $child->add($grandChild); + + // Add a field mapped to the first element of $mapFrom + // to try to distract the algorithm + // Only add it if we expect the error to come up on a different + // level than LEVEL_0, because in this case the error would + // (correctly) be mapped to the distraction field + if ($target !== self::LEVEL_0) { + $mapFromPath = new PropertyPath($mapFrom); + $mapFromPrefix = $mapFromPath->isIndex(0) + ? '['.$mapFromPath->getElement(0).']' + : $mapFromPath->getElement(0); + $distraction = $this->getForm('distraction', $mapFromPrefix); + + $parent->add($distraction); + } + + $parent->submit(array()); + + $this->mapper->mapViolation($violation, $parent); + + if ($target !== self::LEVEL_0) { + $this->assertCount(0, $distraction->getErrors(), 'distraction should not have an error, but has one'); + } + + if (self::LEVEL_0 === $target) { + $this->assertEquals(array($this->getFormError($violation, $parent)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none'); + $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); + $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); + } elseif (self::LEVEL_1 === $target) { + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none'); + $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); + } else { + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); + $this->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none'); + } + } + + public function provideCustomFormErrorTests() + { + // This case is different than the data errors, because here the + // left side of the mapping refers to the property path of the actual + // children. In other words, a child error only works if + // 1) the error actually maps to an existing child and + // 2) the property path of that child (relative to the form providing + // the mapping) matches the left side of the mapping + return array( + // mapping target, map from, map to, child name, its property path, grand child name, its property path, violation path + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].children[street].data'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].children[street].data.prop'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data.street'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data.street.prop'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data[street]'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data[street].prop'), + + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street].data.prop'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street.prop'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street].prop'), + + // Property path of the erroneous field and mapping must match exactly + array(self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].children[street].data'), + array(self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].children[street].data.prop'), + array(self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data.street'), + array(self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data.street.prop'), + array(self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data[street]'), + array(self::LEVEL_1B, 'foo', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data[street].prop'), + + array(self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].children[street].data'), + array(self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].children[street].data.prop'), + array(self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data.street'), + array(self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data.street.prop'), + array(self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data[street]'), + array(self::LEVEL_1B, '[foo]', 'address', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo].data[street].prop'), + + array(self::LEVEL_1, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].children[street].data'), + array(self::LEVEL_1, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].children[street].data.prop'), + array(self::LEVEL_2, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data.street'), + array(self::LEVEL_2, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data.street.prop'), + array(self::LEVEL_1, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data[street]'), + array(self::LEVEL_1, '[foo]', 'address', 'foo', '[foo]', 'address', 'address', 'street', 'street', 'children[foo].data[street].prop'), + + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].children[street].data'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].children[street].data.prop'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].data.street'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].data.street.prop'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].data[street]'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo].data[street].prop'), + + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street].data'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street.prop'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street].prop'), + + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].children[street].data'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].children[street].data.prop'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].data.street'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].data.street.prop'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].data[street]'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo].data[street].prop'), + + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street].data.prop'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street.prop'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street].prop'), + + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].children[street].data'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].children[street].data.prop'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].data.street'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].data.street.prop'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].data[street]'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo].data[street].prop'), + + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street].data'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street].data.prop'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_1, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street.prop'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'), + array(self::LEVEL_2, 'foo', 'address', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street].prop'), + + // Map to a nested child + array(self::LEVEL_2, 'foo', 'address.street', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[foo]'), + array(self::LEVEL_2, 'foo', 'address.street', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[foo]'), + array(self::LEVEL_2, 'foo', 'address.street', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[foo]'), + array(self::LEVEL_2, 'foo', 'address.street', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[foo]'), + + // Map from a nested child + array(self::LEVEL_1B, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street]'), + array(self::LEVEL_1B, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_1, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street]'), + array(self::LEVEL_1B, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'), + array(self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street]'), + array(self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_1, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street]'), + array(self::LEVEL_1, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_2, 'address.street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'), + + array(self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street]'), + array(self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_1B, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_1B, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street]'), + array(self::LEVEL_1, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_1B, 'address[street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'), + array(self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street]'), + array(self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_1, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street]'), + array(self::LEVEL_1, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_2, 'address[street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'), + + array(self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street]'), + array(self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_1, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street]'), + array(self::LEVEL_1, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'), + array(self::LEVEL_1B, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street]'), + array(self::LEVEL_1B, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_1, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street]'), + array(self::LEVEL_1B, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_2, '[address].street', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'), + + array(self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].children[street]'), + array(self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_1, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].children[street]'), + array(self::LEVEL_1, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', 'address', 'street', '[street]', 'children[address].data[street]'), + array(self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].children[street]'), + array(self::LEVEL_2, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_1B, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_1B, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].children[street]'), + array(self::LEVEL_1, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data.street'), + array(self::LEVEL_1B, '[address][street]', 'foo', 'foo', 'foo', 'address', '[address]', 'street', '[street]', 'children[address].data[street]'), + ); + } + + /** + * @dataProvider provideCustomFormErrorTests + */ + public function testCustomFormErrorMapping($target, $mapFrom, $mapTo, $errorName, $errorPath, $childName, $childPath, $grandChildName, $grandChildPath, $violationPath) + { + $violation = $this->getConstraintViolation($violationPath); + $parent = $this->getForm('parent', null, null, array($mapFrom => $mapTo)); + $child = $this->getForm($childName, $childPath); + $grandChild = $this->getForm($grandChildName, $grandChildPath); + $errorChild = $this->getForm($errorName, $errorPath); + + $parent->add($child); + $parent->add($errorChild); + $child->add($grandChild); + + $parent->submit(array()); + + $this->mapper->mapViolation($violation, $parent); + + if (self::LEVEL_0 === $target) { + $this->assertCount(0, $errorChild->getErrors(), $errorName.' should not have an error, but has one'); + $this->assertEquals(array($this->getFormError($violation, $parent)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none'); + $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); + $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); + } elseif (self::LEVEL_1 === $target) { + $this->assertCount(0, $errorChild->getErrors(), $errorName.' should not have an error, but has one'); + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none'); + $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); + } elseif (self::LEVEL_1B === $target) { + $this->assertEquals(array($this->getFormError($violation, $errorChild)), iterator_to_array($errorChild->getErrors()), $errorName.' should have an error, but has none'); + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); + $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); + } else { + $this->assertCount(0, $errorChild->getErrors(), $errorName.' should not have an error, but has one'); + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); + $this->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none'); + } + } + + public function provideErrorTestsForFormInheritingParentData() + { + return array( + // mapping target, child name, its property path, grand child name, its property path, violation path + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].children[street].data'), + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].children[street].data.prop'), + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].data.street'), + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'children[address].data.street.prop'), + array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data[street]'), + array(self::LEVEL_1, 'address', 'address', 'street', 'street', 'children[address].data[street].prop'), + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'data.street'), + array(self::LEVEL_2, 'address', 'address', 'street', 'street', 'data.street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[street]'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[street].prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data.address.street'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data.address.street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data.address[street]'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data.address[street].prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address].street'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address].street.prop'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address][street]'), + array(self::LEVEL_0, 'address', 'address', 'street', 'street', 'data[address][street].prop'), + ); + } + + /** + * @dataProvider provideErrorTestsForFormInheritingParentData + */ + public function testErrorMappingForFormInheritingParentData($target, $childName, $childPath, $grandChildName, $grandChildPath, $violationPath) + { + $violation = $this->getConstraintViolation($violationPath); + $parent = $this->getForm('parent'); + $child = $this->getForm($childName, $childPath, null, array(), true); + $grandChild = $this->getForm($grandChildName, $grandChildPath); + + $parent->add($child); + $child->add($grandChild); + + $parent->submit(array()); + + $this->mapper->mapViolation($violation, $parent); + + if (self::LEVEL_0 === $target) { + $this->assertEquals(array($this->getFormError($violation, $parent)), iterator_to_array($parent->getErrors()), $parent->getName().' should have an error, but has none'); + $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); + $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); + } elseif (self::LEVEL_1 === $target) { + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertEquals(array($this->getFormError($violation, $child)), iterator_to_array($child->getErrors()), $childName.' should have an error, but has none'); + $this->assertCount(0, $grandChild->getErrors(), $grandChildName.' should not have an error, but has one'); + } else { + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertCount(0, $child->getErrors(), $childName.' should not have an error, but has one'); + $this->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChildName.' should have an error, but has none'); + } + } + + public function testBacktrackIfSeveralSubFormsWithSamePropertyPath() + { + $parent = $this->getForm('parent'); + $child1 = $this->getForm('subform1', 'address'); + $child2 = $this->getForm('subform2', 'address'); + $child3 = $this->getForm('subform3', null, null, array(), true); + $child4 = $this->getForm('subform4', null, null, array(), true); + $grandChild1 = $this->getForm('street'); + $grandChild2 = $this->getForm('street', '[sub_address1_street]'); + $grandChild3 = $this->getForm('street', '[sub_address2_street]'); + + $parent->add($child1); + $parent->add($child2); + $parent->add($child3); + $parent->add($child4); + $child2->add($grandChild1); + $child3->add($grandChild2); + $child4->add($grandChild3); + + $parent->submit(array()); + + $violation1 = $this->getConstraintViolation('data.address[street]'); + $violation2 = $this->getConstraintViolation('data[sub_address1_street]'); + $violation3 = $this->getConstraintViolation('data[sub_address2_street]'); + $this->mapper->mapViolation($violation1, $parent); + $this->mapper->mapViolation($violation2, $parent); + $this->mapper->mapViolation($violation3, $parent); + + $this->assertCount(0, $parent->getErrors(), $parent->getName().' should not have an error, but has one'); + $this->assertCount(0, $child1->getErrors(), $child1->getName().' should not have an error, but has one'); + $this->assertCount(0, $child2->getErrors(), $child2->getName().' should not have an error, but has one'); + $this->assertCount(0, $child3->getErrors(), $child3->getName().' should not have an error, but has one'); + $this->assertCount(0, $child4->getErrors(), $child4->getName().' should not have an error, but has one'); + $this->assertEquals(array($this->getFormError($violation1, $grandChild1)), iterator_to_array($grandChild1->getErrors()), $grandChild1->getName().' should have an error, but has none'); + $this->assertEquals(array($this->getFormError($violation2, $grandChild2)), iterator_to_array($grandChild2->getErrors()), $grandChild2->getName().' should have an error, but has none'); + $this->assertEquals(array($this->getFormError($violation3, $grandChild3)), iterator_to_array($grandChild3->getErrors()), $grandChild3->getName().' should have an error, but has none'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php new file mode 100644 index 0000000000000000000000000000000000000000..31377dec3e58c681eb8c260c36cd008f8b6f2b40 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php @@ -0,0 +1,247 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Validator\ViolationMapper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationPath; + +/** + * @author Bernhard Schussek + */ +class ViolationPathTest extends TestCase +{ + public function providePaths() + { + return array( + array('children[address]', array( + array('address', true, true), + )), + array('children[address].children[street]', array( + array('address', true, true), + array('street', true, true), + )), + array('children[address][street]', array( + array('address', true, true), + array('street', true, true), + ), 'children[address].children[street]'), + array('children[address].data', array( + array('address', true, true), + ), 'children[address]'), + array('children[address].data.street', array( + array('address', true, true), + array('street', false, false), + )), + array('children[address].data[street]', array( + array('address', true, true), + array('street', false, true), + )), + array('children[address].children[street].data.name', array( + array('address', true, true), + array('street', true, true), + array('name', false, false), + )), + array('children[address].children[street].data[name]', array( + array('address', true, true), + array('street', true, true), + array('name', false, true), + )), + array('data.address', array( + array('address', false, false), + )), + array('data[address]', array( + array('address', false, true), + )), + array('data.address.street', array( + array('address', false, false), + array('street', false, false), + )), + array('data[address].street', array( + array('address', false, true), + array('street', false, false), + )), + array('data.address[street]', array( + array('address', false, false), + array('street', false, true), + )), + array('data[address][street]', array( + array('address', false, true), + array('street', false, true), + )), + // A few invalid examples + array('data', array(), ''), + array('children', array(), ''), + array('children.address', array(), ''), + array('children.address[street]', array(), ''), + ); + } + + /** + * @dataProvider providePaths + */ + public function testCreatePath($string, $entries, $slicedPath = null) + { + if (null === $slicedPath) { + $slicedPath = $string; + } + + $path = new ViolationPath($string); + + $this->assertSame($slicedPath, $path->__toString()); + $this->assertSame(count($entries), count($path->getElements())); + $this->assertSame(count($entries), $path->getLength()); + + foreach ($entries as $index => $entry) { + $this->assertEquals($entry[0], $path->getElement($index)); + $this->assertSame($entry[1], $path->mapsForm($index)); + $this->assertSame($entry[2], $path->isIndex($index)); + $this->assertSame(!$entry[2], $path->isProperty($index)); + } + } + + public function provideParents() + { + return array( + array('children[address]', null), + array('children[address].children[street]', 'children[address]'), + array('children[address].data.street', 'children[address]'), + array('children[address].data[street]', 'children[address]'), + array('data.address', null), + array('data.address.street', 'data.address'), + array('data.address[street]', 'data.address'), + array('data[address].street', 'data[address]'), + array('data[address][street]', 'data[address]'), + ); + } + + /** + * @dataProvider provideParents + */ + public function testGetParent($violationPath, $parentPath) + { + $path = new ViolationPath($violationPath); + $parent = null === $parentPath ? null : new ViolationPath($parentPath); + + $this->assertEquals($parent, $path->getParent()); + } + + public function testGetElement() + { + $path = new ViolationPath('children[address].data[street].name'); + + $this->assertEquals('street', $path->getElement(1)); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testGetElementDoesNotAcceptInvalidIndices() + { + $path = new ViolationPath('children[address].data[street].name'); + + $path->getElement(3); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testGetElementDoesNotAcceptNegativeIndices() + { + $path = new ViolationPath('children[address].data[street].name'); + + $path->getElement(-1); + } + + public function testIsProperty() + { + $path = new ViolationPath('children[address].data[street].name'); + + $this->assertFalse($path->isProperty(1)); + $this->assertTrue($path->isProperty(2)); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testIsPropertyDoesNotAcceptInvalidIndices() + { + $path = new ViolationPath('children[address].data[street].name'); + + $path->isProperty(3); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testIsPropertyDoesNotAcceptNegativeIndices() + { + $path = new ViolationPath('children[address].data[street].name'); + + $path->isProperty(-1); + } + + public function testIsIndex() + { + $path = new ViolationPath('children[address].data[street].name'); + + $this->assertTrue($path->isIndex(1)); + $this->assertFalse($path->isIndex(2)); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testIsIndexDoesNotAcceptInvalidIndices() + { + $path = new ViolationPath('children[address].data[street].name'); + + $path->isIndex(3); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testIsIndexDoesNotAcceptNegativeIndices() + { + $path = new ViolationPath('children[address].data[street].name'); + + $path->isIndex(-1); + } + + public function testMapsForm() + { + $path = new ViolationPath('children[address].data[street].name'); + + $this->assertTrue($path->mapsForm(0)); + $this->assertFalse($path->mapsForm(1)); + $this->assertFalse($path->mapsForm(2)); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testMapsFormDoesNotAcceptInvalidIndices() + { + $path = new ViolationPath('children[address].data[street].name'); + + $path->mapsForm(3); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testMapsFormDoesNotAcceptNegativeIndices() + { + $path = new ViolationPath('children[address].data[street].name'); + + $path->mapsForm(-1); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AbstractAuthor.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AbstractAuthor.php new file mode 100644 index 0000000000000000000000000000000000000000..03a6b724f308ebad7095224779fdc0d48af34032 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AbstractAuthor.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\Form\Tests\Fixtures; + +abstract class AbstractAuthor +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AlternatingRowType.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AlternatingRowType.php new file mode 100644 index 0000000000000000000000000000000000000000..131b3fd61445703ea3f363f8b3352ea9e96cd316 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AlternatingRowType.php @@ -0,0 +1,24 @@ +getFormFactory(); + + $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($formFactory) { + $form = $event->getForm(); + $type = $form->getName() % 2 === 0 + ? 'Symfony\Component\Form\Extension\Core\Type\TextType' + : 'Symfony\Component\Form\Extension\Core\Type\TextareaType'; + $form->add('title', $type); + }); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Author.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Author.php new file mode 100644 index 0000000000000000000000000000000000000000..39765d9df3232abef13375773a032dcdb84ca6ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Author.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +class Author +{ + public $firstName; + private $lastName; + private $australian; + public $child; + private $readPermissions; + + private $privateProperty; + + public function __construct($firstName = null, $lastName = null) + { + $this->firstName = $firstName; + $this->lastName = $lastName; + } + + public function setLastName($lastName) + { + $this->lastName = $lastName; + } + + public function getLastName() + { + return $this->lastName; + } + + private function getPrivateGetter() + { + return 'foobar'; + } + + public function setAustralian($australian) + { + $this->australian = $australian; + } + + public function isAustralian() + { + return $this->australian; + } + + public function setReadPermissions($bool) + { + $this->readPermissions = $bool; + } + + public function hasReadPermissions() + { + return $this->readPermissions; + } + + private function isPrivateIsser() + { + return true; + } + + public function getPrivateSetter() + { + } + + private function setPrivateSetter($data) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AuthorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AuthorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..984cb541ec8e7d8bbf3f58d9d5f2d78141580168 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AuthorInterface.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\Form\Tests\Fixtures; + +interface AuthorInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AuthorType.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AuthorType.php new file mode 100644 index 0000000000000000000000000000000000000000..504f812dff3a521f5814ded623a312919d6ccb9a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/AuthorType.php @@ -0,0 +1,25 @@ +add('firstName') + ->add('lastName') + ; + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults(array( + 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.php new file mode 100644 index 0000000000000000000000000000000000000000..dbd8843d8e7eb927c01adb0684e28dc7e0bf6e27 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.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\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\AbstractType; +use Symfony\Component\OptionsResolver\OptionsResolver; + +/** + * @author Paráda József + */ +class ChoiceSubType extends AbstractType +{ + /** + * {@inheritdoc} + */ + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults(array('expanded' => true)); + $resolver->setNormalizer('choices', function () { + return array( + 'attr1' => 'Attribute 1', + 'attr2' => 'Attribute 2', + ); + }); + } + + /** + * {@inheritdoc} + */ + public function getParent() + { + return 'Symfony\Component\Form\Extension\Core\Type\ChoiceType'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceTypeExtension.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceTypeExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..db4166ff30929e713dae611548b73890f6ac4210 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/ChoiceTypeExtension.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\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\AbstractTypeExtension; +use Symfony\Component\Form\Extension\Core\Type\ChoiceType; +use Symfony\Component\OptionsResolver\OptionsResolver; + +class ChoiceTypeExtension extends AbstractTypeExtension +{ + private $extendedType; + + public function __construct($extendedType = ChoiceType::class) + { + $this->extendedType = $extendedType; + } + + /** + * {@inheritdoc} + */ + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefault('choices', array( + 'A' => 'a', + 'B' => 'b', + )); + } + + /** + * {@inheritdoc} + */ + public function getExtendedType() + { + return $this->extendedType; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/CustomArrayObject.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/CustomArrayObject.php new file mode 100644 index 0000000000000000000000000000000000000000..950f677fd06117f475756a27b94b5b4fe7431b83 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/CustomArrayObject.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +/** + * This class is a hand written simplified version of PHP native `ArrayObject` + * class, to show that it behaves differently than the PHP native implementation. + */ +class CustomArrayObject implements \ArrayAccess, \IteratorAggregate, \Countable, \Serializable +{ + private $array; + + public function __construct(array $array = null) + { + $this->array = $array ?: array(); + } + + public function offsetExists($offset) + { + return array_key_exists($offset, $this->array); + } + + public function offsetGet($offset) + { + return $this->array[$offset]; + } + + public function offsetSet($offset, $value) + { + if (null === $offset) { + $this->array[] = $value; + } else { + $this->array[$offset] = $value; + } + } + + public function offsetUnset($offset) + { + unset($this->array[$offset]); + } + + public function getIterator() + { + return new \ArrayIterator($this->array); + } + + public function count() + { + return count($this->array); + } + + public function serialize() + { + return serialize($this->array); + } + + public function unserialize($serialized) + { + $this->array = (array) unserialize((string) $serialized); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FBooType.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FBooType.php new file mode 100644 index 0000000000000000000000000000000000000000..fd9ca41dfbc8565518e84dbb0b11d9860e3c0fa3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FBooType.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\AbstractType; + +class FBooType extends AbstractType +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedDataTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedDataTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..f7fba56c4211f96183ac202fd54c4361ca868d2d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedDataTransformer.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\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\DataTransformerInterface; +use Symfony\Component\Form\Exception\TransformationFailedException; + +class FixedDataTransformer implements DataTransformerInterface +{ + private $mapping; + + public function __construct(array $mapping) + { + $this->mapping = $mapping; + } + + public function transform($value) + { + if (!array_key_exists($value, $this->mapping)) { + throw new TransformationFailedException(sprintf('No mapping for value "%s"', $value)); + } + + return $this->mapping[$value]; + } + + public function reverseTransform($value) + { + $result = array_search($value, $this->mapping, true); + + if ($result === false) { + throw new TransformationFailedException(sprintf('No reverse mapping for value "%s"', $value)); + } + + return $result; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedFilterListener.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedFilterListener.php new file mode 100644 index 0000000000000000000000000000000000000000..762a10b8c95f9c903adf47849afa69856ca58553 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FixedFilterListener.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\FormEvents; +use Symfony\Component\Form\FormEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +class FixedFilterListener implements EventSubscriberInterface +{ + private $mapping; + + public function __construct(array $mapping) + { + $this->mapping = array_merge(array( + 'preSubmit' => array(), + 'onSubmit' => array(), + 'preSetData' => array(), + ), $mapping); + } + + public function preSubmit(FormEvent $event) + { + $data = $event->getData(); + + if (isset($this->mapping['preSubmit'][$data])) { + $event->setData($this->mapping['preSubmit'][$data]); + } + } + + public function onSubmit(FormEvent $event) + { + $data = $event->getData(); + + if (isset($this->mapping['onSubmit'][$data])) { + $event->setData($this->mapping['onSubmit'][$data]); + } + } + + public function preSetData(FormEvent $event) + { + $data = $event->getData(); + + if (isset($this->mapping['preSetData'][$data])) { + $event->setData($this->mapping['preSetData'][$data]); + } + } + + public static function getSubscribedEvents() + { + return array( + FormEvents::PRE_SUBMIT => 'preSubmit', + FormEvents::SUBMIT => 'onSubmit', + FormEvents::PRE_SET_DATA => 'preSetData', + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Foo.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Foo.php new file mode 100644 index 0000000000000000000000000000000000000000..0920bc3d7275665319bb4022a079d73b691c529b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Foo.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\AbstractType; + +class Foo extends AbstractType +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Foo1Bar2Type.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Foo1Bar2Type.php new file mode 100644 index 0000000000000000000000000000000000000000..17bef7ba1f2db54e1f130d62536f7681e4ef386d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Foo1Bar2Type.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\AbstractType; + +class Foo1Bar2Type extends AbstractType +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooBarHTMLType.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooBarHTMLType.php new file mode 100644 index 0000000000000000000000000000000000000000..c9969273530e6f7545c1c56a2cb5f4c17c9def35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooBarHTMLType.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\AbstractType; + +class FooBarHTMLType extends AbstractType +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooSubType.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooSubType.php new file mode 100644 index 0000000000000000000000000000000000000000..e4a4f3612e19d6c7f783420f146ca682014c5654 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooSubType.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\AbstractType; + +class FooSubType extends AbstractType +{ + public function getParent() + { + return __NAMESPACE__.'\FooType'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooType.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooType.php new file mode 100644 index 0000000000000000000000000000000000000000..2e144ad0bd1c407308a7132b7991df5e1d4d65e6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooType.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\AbstractType; + +class FooType extends AbstractType +{ + public function getParent() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooTypeBarExtension.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooTypeBarExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..8d72132f2f1f65beaa82b9586b0a4c043f177d48 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooTypeBarExtension.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\AbstractTypeExtension; +use Symfony\Component\Form\FormBuilderInterface; + +class FooTypeBarExtension extends AbstractTypeExtension +{ + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder->setAttribute('bar', 'x'); + } + + public function getAllowedOptionValues() + { + return array( + 'a_or_b' => array('c'), + ); + } + + public function getExtendedType() + { + return __NAMESPACE__.'\FooType'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooTypeBazExtension.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooTypeBazExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..646d41f7ffe00c7d442200f0a772da5cd0964827 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/FooTypeBazExtension.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\AbstractTypeExtension; +use Symfony\Component\Form\FormBuilderInterface; + +class FooTypeBazExtension extends AbstractTypeExtension +{ + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder->setAttribute('baz', 'x'); + } + + public function getExtendedType() + { + return __NAMESPACE__.'\FooType'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/TestExtension.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/TestExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..042bee51280e2e2da9f93a57e2aadc12b5eefee6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/TestExtension.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\FormTypeInterface; +use Symfony\Component\Form\FormTypeExtensionInterface; +use Symfony\Component\Form\FormTypeGuesserInterface; +use Symfony\Component\Form\FormExtensionInterface; + +class TestExtension implements FormExtensionInterface +{ + private $types = array(); + + private $extensions = array(); + + private $guesser; + + public function __construct(FormTypeGuesserInterface $guesser) + { + $this->guesser = $guesser; + } + + public function addType(FormTypeInterface $type) + { + $this->types[get_class($type)] = $type; + } + + public function getType($name) + { + return isset($this->types[$name]) ? $this->types[$name] : null; + } + + public function hasType($name) + { + return isset($this->types[$name]); + } + + public function addTypeExtension(FormTypeExtensionInterface $extension) + { + $type = $extension->getExtendedType(); + + if (!isset($this->extensions[$type])) { + $this->extensions[$type] = array(); + } + + $this->extensions[$type][] = $extension; + } + + public function getTypeExtensions($name) + { + return isset($this->extensions[$name]) ? $this->extensions[$name] : array(); + } + + public function hasTypeExtensions($name) + { + return isset($this->extensions[$name]); + } + + public function getTypeGuesser() + { + return $this->guesser; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Type.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Type.php new file mode 100644 index 0000000000000000000000000000000000000000..61ca7d1319886820ebb7a96cf46aaecdc7662cd5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/Type.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Fixtures; + +use Symfony\Component\Form\AbstractType; + +class Type extends AbstractType +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/foo b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/foo new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/foo2 b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/foo2 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/foo3 b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Fixtures/foo3 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e5ac9ad327a690df0498d0016f13400e5bb0d27f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormBuilderTest.php @@ -0,0 +1,241 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\ButtonBuilder; +use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\SubmitButtonBuilder; + +class FormBuilderTest extends TestCase +{ + private $dispatcher; + private $factory; + private $builder; + + protected function setUp() + { + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $this->builder = new FormBuilder('name', null, $this->dispatcher, $this->factory); + } + + protected function tearDown() + { + $this->dispatcher = null; + $this->factory = null; + $this->builder = null; + } + + /** + * Changing the name is not allowed, otherwise the name and property path + * are not synchronized anymore. + * + * @see FormType::buildForm() + */ + public function testNoSetName() + { + $this->assertFalse(method_exists($this->builder, 'setName')); + } + + public function testAddNameNoStringAndNoInteger() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\UnexpectedTypeException'); + $this->builder->add(true); + } + + public function testAddTypeNoString() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Form\Exception\UnexpectedTypeException'); + $this->builder->add('foo', 1234); + } + + public function testAddWithGuessFluent() + { + $this->builder = new FormBuilder('name', 'stdClass', $this->dispatcher, $this->factory); + $builder = $this->builder->add('foo'); + $this->assertSame($builder, $this->builder); + } + + public function testAddIsFluent() + { + $builder = $this->builder->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('bar' => 'baz')); + $this->assertSame($builder, $this->builder); + } + + public function testAdd() + { + $this->assertFalse($this->builder->has('foo')); + $this->builder->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $this->assertTrue($this->builder->has('foo')); + } + + public function testAddIntegerName() + { + $this->assertFalse($this->builder->has(0)); + $this->builder->add(0, 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $this->assertTrue($this->builder->has(0)); + } + + public function testAll() + { + $this->factory->expects($this->once()) + ->method('createNamedBuilder') + ->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->will($this->returnValue(new FormBuilder('foo', null, $this->dispatcher, $this->factory))); + + $this->assertCount(0, $this->builder->all()); + $this->assertFalse($this->builder->has('foo')); + + $this->builder->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $children = $this->builder->all(); + + $this->assertTrue($this->builder->has('foo')); + $this->assertCount(1, $children); + $this->assertArrayHasKey('foo', $children); + } + + /* + * https://github.com/symfony/symfony/issues/4693 + */ + public function testMaintainOrderOfLazyAndExplicitChildren() + { + $this->builder->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $this->builder->add($this->getFormBuilder('bar')); + $this->builder->add('baz', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + + $children = $this->builder->all(); + + $this->assertSame(array('foo', 'bar', 'baz'), array_keys($children)); + } + + public function testAddFormType() + { + $this->assertFalse($this->builder->has('foo')); + $this->builder->add('foo', $this->getMockBuilder('Symfony\Component\Form\FormTypeInterface')->getMock()); + $this->assertTrue($this->builder->has('foo')); + } + + public function testRemove() + { + $this->builder->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $this->builder->remove('foo'); + $this->assertFalse($this->builder->has('foo')); + } + + public function testRemoveUnknown() + { + $this->builder->remove('foo'); + $this->assertFalse($this->builder->has('foo')); + } + + // https://github.com/symfony/symfony/pull/4826 + public function testRemoveAndGetForm() + { + $this->builder->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType'); + $this->builder->remove('foo'); + $form = $this->builder->getForm(); + $this->assertInstanceOf('Symfony\Component\Form\Form', $form); + } + + public function testCreateNoTypeNo() + { + $this->factory->expects($this->once()) + ->method('createNamedBuilder') + ->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array()) + ; + + $this->builder->create('foo'); + } + + public function testAddButton() + { + $this->builder->add(new ButtonBuilder('reset')); + $this->builder->add(new SubmitButtonBuilder('submit')); + } + + public function testGetUnknown() + { + if (method_exists($this, 'expectException')) { + $this->expectException('Symfony\Component\Form\Exception\InvalidArgumentException'); + $this->expectExceptionMessage('The child with the name "foo" does not exist.'); + } else { + $this->setExpectedException('Symfony\Component\Form\Exception\InvalidArgumentException', 'The child with the name "foo" does not exist.'); + } + + $this->builder->get('foo'); + } + + public function testGetExplicitType() + { + $expectedType = 'Symfony\Component\Form\Extension\Core\Type\TextType'; + $expectedName = 'foo'; + $expectedOptions = array('bar' => 'baz'); + + $this->factory->expects($this->once()) + ->method('createNamedBuilder') + ->with($expectedName, $expectedType, null, $expectedOptions) + ->will($this->returnValue($this->getFormBuilder())); + + $this->builder->add($expectedName, $expectedType, $expectedOptions); + $builder = $this->builder->get($expectedName); + + $this->assertNotSame($builder, $this->builder); + } + + public function testGetGuessedType() + { + $expectedName = 'foo'; + $expectedOptions = array('bar' => 'baz'); + + $this->factory->expects($this->once()) + ->method('createBuilderForProperty') + ->with('stdClass', $expectedName, null, $expectedOptions) + ->will($this->returnValue($this->getFormBuilder())); + + $this->builder = new FormBuilder('name', 'stdClass', $this->dispatcher, $this->factory); + $this->builder->add($expectedName, null, $expectedOptions); + $builder = $this->builder->get($expectedName); + + $this->assertNotSame($builder, $this->builder); + } + + public function testGetFormConfigErasesReferences() + { + $builder = new FormBuilder('name', null, $this->dispatcher, $this->factory); + $builder->add(new FormBuilder('child', null, $this->dispatcher, $this->factory)); + + $config = $builder->getFormConfig(); + $reflClass = new \ReflectionClass($config); + $children = $reflClass->getProperty('children'); + $unresolvedChildren = $reflClass->getProperty('unresolvedChildren'); + + $children->setAccessible(true); + $unresolvedChildren->setAccessible(true); + + $this->assertEmpty($children->getValue($config)); + $this->assertEmpty($unresolvedChildren->getValue($config)); + } + + private function getFormBuilder($name = 'name') + { + $mock = $this->getMockBuilder('Symfony\Component\Form\FormBuilder') + ->disableOriginalConstructor() + ->getMock(); + + $mock->expects($this->any()) + ->method('getName') + ->will($this->returnValue($name)); + + return $mock; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormConfigTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormConfigTest.php new file mode 100644 index 0000000000000000000000000000000000000000..21eabba871d38393f592779706481fe82c59d32b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormConfigTest.php @@ -0,0 +1,149 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Exception\UnexpectedTypeException; +use Symfony\Component\Form\FormConfigBuilder; +use Symfony\Component\Form\Exception\InvalidArgumentException; + +/** + * @author Bernhard Schussek + */ +class FormConfigTest extends TestCase +{ + public function getHtml4Ids() + { + return array( + array('z0', true), + array('A0', true), + array('A9', true), + array('Z0', true), + array('#', false), + array('a#', false), + array('a$', false), + array('a%', false), + array('a ', false), + array("a\t", false), + array("a\n", false), + array('a-', true), + array('a_', true), + array('a:', true), + // Periods are allowed by the HTML4 spec, but disallowed by us + // because they break the generated property paths + array('a.', false), + // Contrary to the HTML4 spec, we allow names starting with a + // number, otherwise naming fields by collection indices is not + // possible. + // For root forms, leading digits will be stripped from the + // "id" attribute to produce valid HTML4. + array('0', true), + array('9', true), + // Contrary to the HTML4 spec, we allow names starting with an + // underscore, since this is already a widely used practice in + // Symfony. + // For root forms, leading underscores will be stripped from the + // "id" attribute to produce valid HTML4. + array('_', true), + // Integers are allowed + array(0, true), + array(123, true), + // NULL is allowed + array(null, true), + // Other types are not + array(1.23, false), + array(5., false), + array(true, false), + array(new \stdClass(), false), + ); + } + + /** + * @dataProvider getHtml4Ids + */ + public function testNameAcceptsOnlyNamesValidAsIdsInHtml4($name, $accepted) + { + $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + + try { + new FormConfigBuilder($name, null, $dispatcher); + if (!$accepted) { + $this->fail(sprintf('The value "%s" should not be accepted', $name)); + } + } catch (UnexpectedTypeException $e) { + // if the value was not accepted, but should be, rethrow exception + if ($accepted) { + throw $e; + } + } catch (InvalidArgumentException $e) { + // if the value was not accepted, but should be, rethrow exception + if ($accepted) { + throw $e; + } + } + } + + public function testGetRequestHandlerCreatesNativeRequestHandlerIfNotSet() + { + $config = $this->getConfigBuilder()->getFormConfig(); + + $this->assertInstanceOf('Symfony\Component\Form\NativeRequestHandler', $config->getRequestHandler()); + } + + public function testGetRequestHandlerReusesNativeRequestHandlerInstance() + { + $config1 = $this->getConfigBuilder()->getFormConfig(); + $config2 = $this->getConfigBuilder()->getFormConfig(); + + $this->assertSame($config1->getRequestHandler(), $config2->getRequestHandler()); + } + + public function testSetMethodAllowsGet() + { + $this->getConfigBuilder()->setMethod('GET'); + } + + public function testSetMethodAllowsPost() + { + $this->getConfigBuilder()->setMethod('POST'); + } + + public function testSetMethodAllowsPut() + { + $this->getConfigBuilder()->setMethod('PUT'); + } + + public function testSetMethodAllowsDelete() + { + $this->getConfigBuilder()->setMethod('DELETE'); + } + + public function testSetMethodAllowsPatch() + { + $this->getConfigBuilder()->setMethod('PATCH'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException + */ + public function testSetMethodDoesNotAllowOtherValues() + { + $this->getConfigBuilder()->setMethod('foo'); + } + + private function getConfigBuilder($name = 'name') + { + $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + + return new FormConfigBuilder($name, null, $dispatcher); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormFactoryBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormFactoryBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..854f4f347f75a1cfd11cd5c88fb8ea23cf5f43f4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormFactoryBuilderTest.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\FormFactoryBuilder; +use Symfony\Component\Form\Tests\Fixtures\FooType; + +class FormFactoryBuilderTest extends TestCase +{ + private $registry; + private $guesser; + private $type; + + protected function setUp() + { + $factory = new \ReflectionClass('Symfony\Component\Form\FormFactory'); + $this->registry = $factory->getProperty('registry'); + $this->registry->setAccessible(true); + + $this->guesser = $this->getMockBuilder('Symfony\Component\Form\FormTypeGuesserInterface')->getMock(); + $this->type = new FooType(); + } + + public function testAddType() + { + $factoryBuilder = new FormFactoryBuilder(); + $factoryBuilder->addType($this->type); + + $factory = $factoryBuilder->getFormFactory(); + $registry = $this->registry->getValue($factory); + $extensions = $registry->getExtensions(); + + $this->assertCount(1, $extensions); + $this->assertTrue($extensions[0]->hasType(get_class($this->type))); + $this->assertNull($extensions[0]->getTypeGuesser()); + } + + public function testAddTypeGuesser() + { + $factoryBuilder = new FormFactoryBuilder(); + $factoryBuilder->addTypeGuesser($this->guesser); + + $factory = $factoryBuilder->getFormFactory(); + $registry = $this->registry->getValue($factory); + $extensions = $registry->getExtensions(); + + $this->assertCount(1, $extensions); + $this->assertNotNull($extensions[0]->getTypeGuesser()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormFactoryTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..06ae544f86ab8e4402392b30b7e716da071c89e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormFactoryTest.php @@ -0,0 +1,486 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\FormTypeGuesserChain; +use Symfony\Component\Form\FormFactory; +use Symfony\Component\Form\Guess\Guess; +use Symfony\Component\Form\Guess\ValueGuess; +use Symfony\Component\Form\Guess\TypeGuess; + +/** + * @author Bernhard Schussek + */ +class FormFactoryTest extends TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $guesser1; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $guesser2; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $registry; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $resolvedTypeFactory; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $builder; + + /** + * @var FormFactory + */ + private $factory; + + protected function setUp() + { + $this->resolvedTypeFactory = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeFactoryInterface')->getMock(); + $this->guesser1 = $this->getMockBuilder('Symfony\Component\Form\FormTypeGuesserInterface')->getMock(); + $this->guesser2 = $this->getMockBuilder('Symfony\Component\Form\FormTypeGuesserInterface')->getMock(); + $this->registry = $this->getMockBuilder('Symfony\Component\Form\FormRegistryInterface')->getMock(); + $this->builder = $this->getMockBuilder('Symfony\Component\Form\Test\FormBuilderInterface')->getMock(); + $this->factory = new FormFactory($this->registry, $this->resolvedTypeFactory); + + $this->registry->expects($this->any()) + ->method('getTypeGuesser') + ->will($this->returnValue(new FormTypeGuesserChain(array( + $this->guesser1, + $this->guesser2, + )))); + } + + public function testCreateNamedBuilderWithTypeName() + { + $options = array('a' => '1', 'b' => '2'); + $resolvedOptions = array('a' => '2', 'b' => '3'); + $resolvedType = $this->getMockResolvedType(); + + $this->registry->expects($this->once()) + ->method('getType') + ->with('type') + ->will($this->returnValue($resolvedType)); + + $resolvedType->expects($this->once()) + ->method('createBuilder') + ->with($this->factory, 'name', $options) + ->will($this->returnValue($this->builder)); + + $this->builder->expects($this->any()) + ->method('getOptions') + ->will($this->returnValue($resolvedOptions)); + + $resolvedType->expects($this->once()) + ->method('buildForm') + ->with($this->builder, $resolvedOptions); + + $this->assertSame($this->builder, $this->factory->createNamedBuilder('name', 'type', null, $options)); + } + + public function testCreateNamedBuilderFillsDataOption() + { + $givenOptions = array('a' => '1', 'b' => '2'); + $expectedOptions = array_merge($givenOptions, array('data' => 'DATA')); + $resolvedOptions = array('a' => '2', 'b' => '3', 'data' => 'DATA'); + $resolvedType = $this->getMockResolvedType(); + + $this->registry->expects($this->once()) + ->method('getType') + ->with('type') + ->will($this->returnValue($resolvedType)); + + $resolvedType->expects($this->once()) + ->method('createBuilder') + ->with($this->factory, 'name', $expectedOptions) + ->will($this->returnValue($this->builder)); + + $this->builder->expects($this->any()) + ->method('getOptions') + ->will($this->returnValue($resolvedOptions)); + + $resolvedType->expects($this->once()) + ->method('buildForm') + ->with($this->builder, $resolvedOptions); + + $this->assertSame($this->builder, $this->factory->createNamedBuilder('name', 'type', 'DATA', $givenOptions)); + } + + public function testCreateNamedBuilderDoesNotOverrideExistingDataOption() + { + $options = array('a' => '1', 'b' => '2', 'data' => 'CUSTOM'); + $resolvedOptions = array('a' => '2', 'b' => '3', 'data' => 'CUSTOM'); + $resolvedType = $this->getMockResolvedType(); + + $this->registry->expects($this->once()) + ->method('getType') + ->with('type') + ->will($this->returnValue($resolvedType)); + + $resolvedType->expects($this->once()) + ->method('createBuilder') + ->with($this->factory, 'name', $options) + ->will($this->returnValue($this->builder)); + + $this->builder->expects($this->any()) + ->method('getOptions') + ->will($this->returnValue($resolvedOptions)); + + $resolvedType->expects($this->once()) + ->method('buildForm') + ->with($this->builder, $resolvedOptions); + + $this->assertSame($this->builder, $this->factory->createNamedBuilder('name', 'type', 'DATA', $options)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException + * @expectedExceptionMessage Expected argument of type "string", "stdClass" given + */ + public function testCreateNamedBuilderThrowsUnderstandableException() + { + $this->factory->createNamedBuilder('name', new \stdClass()); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException + * @expectedExceptionMessage Expected argument of type "string", "stdClass" given + */ + public function testCreateThrowsUnderstandableException() + { + $this->factory->create(new \stdClass()); + } + + public function testCreateUsesBlockPrefixIfTypeGivenAsString() + { + $options = array('a' => '1', 'b' => '2'); + $resolvedOptions = array('a' => '2', 'b' => '3'); + + // the interface does not have the method, so use the real class + $resolvedType = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormType') + ->disableOriginalConstructor() + ->getMock(); + + $resolvedType->expects($this->any()) + ->method('getBlockPrefix') + ->willReturn('TYPE_PREFIX'); + + $this->registry->expects($this->any()) + ->method('getType') + ->with('TYPE') + ->will($this->returnValue($resolvedType)); + + $resolvedType->expects($this->once()) + ->method('createBuilder') + ->with($this->factory, 'TYPE_PREFIX', $options) + ->will($this->returnValue($this->builder)); + + $this->builder->expects($this->any()) + ->method('getOptions') + ->will($this->returnValue($resolvedOptions)); + + $resolvedType->expects($this->once()) + ->method('buildForm') + ->with($this->builder, $resolvedOptions); + + $this->builder->expects($this->once()) + ->method('getForm') + ->will($this->returnValue('FORM')); + + $this->assertSame('FORM', $this->factory->create('TYPE', null, $options)); + } + + public function testCreateNamed() + { + $options = array('a' => '1', 'b' => '2'); + $resolvedOptions = array('a' => '2', 'b' => '3'); + $resolvedType = $this->getMockResolvedType(); + + $this->registry->expects($this->once()) + ->method('getType') + ->with('type') + ->will($this->returnValue($resolvedType)); + + $resolvedType->expects($this->once()) + ->method('createBuilder') + ->with($this->factory, 'name', $options) + ->will($this->returnValue($this->builder)); + + $this->builder->expects($this->any()) + ->method('getOptions') + ->will($this->returnValue($resolvedOptions)); + + $resolvedType->expects($this->once()) + ->method('buildForm') + ->with($this->builder, $resolvedOptions); + + $this->builder->expects($this->once()) + ->method('getForm') + ->will($this->returnValue('FORM')); + + $this->assertSame('FORM', $this->factory->createNamed('name', 'type', null, $options)); + } + + public function testCreateBuilderForPropertyWithoutTypeGuesser() + { + $registry = $this->getMockBuilder('Symfony\Component\Form\FormRegistryInterface')->getMock(); + $factory = $this->getMockBuilder('Symfony\Component\Form\FormFactory') + ->setMethods(array('createNamedBuilder')) + ->setConstructorArgs(array($registry, $this->resolvedTypeFactory)) + ->getMock(); + + $factory->expects($this->once()) + ->method('createNamedBuilder') + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array()) + ->will($this->returnValue('builderInstance')); + + $this->builder = $factory->createBuilderForProperty('Application\Author', 'firstName'); + + $this->assertEquals('builderInstance', $this->builder); + } + + public function testCreateBuilderForPropertyCreatesFormWithHighestConfidence() + { + $this->guesser1->expects($this->once()) + ->method('guessType') + ->with('Application\Author', 'firstName') + ->will($this->returnValue(new TypeGuess( + 'Symfony\Component\Form\Extension\Core\Type\TextType', + array('attr' => array('maxlength' => 10)), + Guess::MEDIUM_CONFIDENCE + ))); + + $this->guesser2->expects($this->once()) + ->method('guessType') + ->with('Application\Author', 'firstName') + ->will($this->returnValue(new TypeGuess( + 'Symfony\Component\Form\Extension\Core\Type\PasswordType', + array('attr' => array('maxlength' => 7)), + Guess::HIGH_CONFIDENCE + ))); + + $factory = $this->getMockFactory(array('createNamedBuilder')); + + $factory->expects($this->once()) + ->method('createNamedBuilder') + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\PasswordType', null, array('attr' => array('maxlength' => 7))) + ->will($this->returnValue('builderInstance')); + + $this->builder = $factory->createBuilderForProperty('Application\Author', 'firstName'); + + $this->assertEquals('builderInstance', $this->builder); + } + + public function testCreateBuilderCreatesTextFormIfNoGuess() + { + $this->guesser1->expects($this->once()) + ->method('guessType') + ->with('Application\Author', 'firstName') + ->will($this->returnValue(null)); + + $factory = $this->getMockFactory(array('createNamedBuilder')); + + $factory->expects($this->once()) + ->method('createNamedBuilder') + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + ->will($this->returnValue('builderInstance')); + + $this->builder = $factory->createBuilderForProperty('Application\Author', 'firstName'); + + $this->assertEquals('builderInstance', $this->builder); + } + + public function testOptionsCanBeOverridden() + { + $this->guesser1->expects($this->once()) + ->method('guessType') + ->with('Application\Author', 'firstName') + ->will($this->returnValue(new TypeGuess( + 'Symfony\Component\Form\Extension\Core\Type\TextType', + array('attr' => array('maxlength' => 10)), + Guess::MEDIUM_CONFIDENCE + ))); + + $factory = $this->getMockFactory(array('createNamedBuilder')); + + $factory->expects($this->once()) + ->method('createNamedBuilder') + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array('attr' => array('maxlength' => 11))) + ->will($this->returnValue('builderInstance')); + + $this->builder = $factory->createBuilderForProperty( + 'Application\Author', + 'firstName', + null, + array('attr' => array('maxlength' => 11)) + ); + + $this->assertEquals('builderInstance', $this->builder); + } + + public function testCreateBuilderUsesMaxLengthIfFound() + { + $this->guesser1->expects($this->once()) + ->method('guessMaxLength') + ->with('Application\Author', 'firstName') + ->will($this->returnValue(new ValueGuess( + 15, + Guess::MEDIUM_CONFIDENCE + ))); + + $this->guesser2->expects($this->once()) + ->method('guessMaxLength') + ->with('Application\Author', 'firstName') + ->will($this->returnValue(new ValueGuess( + 20, + Guess::HIGH_CONFIDENCE + ))); + + $factory = $this->getMockFactory(array('createNamedBuilder')); + + $factory->expects($this->once()) + ->method('createNamedBuilder') + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array('attr' => array('maxlength' => 20))) + ->will($this->returnValue('builderInstance')); + + $this->builder = $factory->createBuilderForProperty( + 'Application\Author', + 'firstName' + ); + + $this->assertEquals('builderInstance', $this->builder); + } + + public function testCreateBuilderUsesMaxLengthAndPattern() + { + $this->guesser1->expects($this->once()) + ->method('guessMaxLength') + ->with('Application\Author', 'firstName') + ->will($this->returnValue(new ValueGuess( + 20, + Guess::HIGH_CONFIDENCE + ))); + + $this->guesser2->expects($this->once()) + ->method('guessPattern') + ->with('Application\Author', 'firstName') + ->will($this->returnValue(new ValueGuess( + '.{5,}', + Guess::HIGH_CONFIDENCE + ))); + + $factory = $this->getMockFactory(array('createNamedBuilder')); + + $factory->expects($this->once()) + ->method('createNamedBuilder') + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array('attr' => array('maxlength' => 20, 'pattern' => '.{5,}', 'class' => 'tinymce'))) + ->will($this->returnValue('builderInstance')); + + $this->builder = $factory->createBuilderForProperty( + 'Application\Author', + 'firstName', + null, + array('attr' => array('class' => 'tinymce')) + ); + + $this->assertEquals('builderInstance', $this->builder); + } + + public function testCreateBuilderUsesRequiredSettingWithHighestConfidence() + { + $this->guesser1->expects($this->once()) + ->method('guessRequired') + ->with('Application\Author', 'firstName') + ->will($this->returnValue(new ValueGuess( + true, + Guess::MEDIUM_CONFIDENCE + ))); + + $this->guesser2->expects($this->once()) + ->method('guessRequired') + ->with('Application\Author', 'firstName') + ->will($this->returnValue(new ValueGuess( + false, + Guess::HIGH_CONFIDENCE + ))); + + $factory = $this->getMockFactory(array('createNamedBuilder')); + + $factory->expects($this->once()) + ->method('createNamedBuilder') + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array('required' => false)) + ->will($this->returnValue('builderInstance')); + + $this->builder = $factory->createBuilderForProperty( + 'Application\Author', + 'firstName' + ); + + $this->assertEquals('builderInstance', $this->builder); + } + + public function testCreateBuilderUsesPatternIfFound() + { + $this->guesser1->expects($this->once()) + ->method('guessPattern') + ->with('Application\Author', 'firstName') + ->will($this->returnValue(new ValueGuess( + '[a-z]', + Guess::MEDIUM_CONFIDENCE + ))); + + $this->guesser2->expects($this->once()) + ->method('guessPattern') + ->with('Application\Author', 'firstName') + ->will($this->returnValue(new ValueGuess( + '[a-zA-Z]', + Guess::HIGH_CONFIDENCE + ))); + + $factory = $this->getMockFactory(array('createNamedBuilder')); + + $factory->expects($this->once()) + ->method('createNamedBuilder') + ->with('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array('attr' => array('pattern' => '[a-zA-Z]'))) + ->will($this->returnValue('builderInstance')); + + $this->builder = $factory->createBuilderForProperty( + 'Application\Author', + 'firstName' + ); + + $this->assertEquals('builderInstance', $this->builder); + } + + private function getMockFactory(array $methods = array()) + { + return $this->getMockBuilder('Symfony\Component\Form\FormFactory') + ->setMethods($methods) + ->setConstructorArgs(array($this->registry, $this->resolvedTypeFactory)) + ->getMock(); + } + + private function getMockResolvedType() + { + return $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormRegistryTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormRegistryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5deddff422b42920ec4a57fd986b24e9ef367c4c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormRegistryTest.php @@ -0,0 +1,217 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\FormRegistry; +use Symfony\Component\Form\FormTypeGuesserChain; +use Symfony\Component\Form\ResolvedFormType; +use Symfony\Component\Form\ResolvedFormTypeFactoryInterface; +use Symfony\Component\Form\Tests\Fixtures\FooSubType; +use Symfony\Component\Form\Tests\Fixtures\FooType; +use Symfony\Component\Form\Tests\Fixtures\FooTypeBarExtension; +use Symfony\Component\Form\Tests\Fixtures\FooTypeBazExtension; +use Symfony\Component\Form\Tests\Fixtures\TestExtension; + +/** + * @author Bernhard Schussek + */ +class FormRegistryTest extends TestCase +{ + /** + * @var FormRegistry + */ + private $registry; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject|ResolvedFormTypeFactoryInterface + */ + private $resolvedTypeFactory; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $guesser1; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $guesser2; + + /** + * @var TestExtension + */ + private $extension1; + + /** + * @var TestExtension + */ + private $extension2; + + protected function setUp() + { + $this->resolvedTypeFactory = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeFactory')->getMock(); + $this->guesser1 = $this->getMockBuilder('Symfony\Component\Form\FormTypeGuesserInterface')->getMock(); + $this->guesser2 = $this->getMockBuilder('Symfony\Component\Form\FormTypeGuesserInterface')->getMock(); + $this->extension1 = new TestExtension($this->guesser1); + $this->extension2 = new TestExtension($this->guesser2); + $this->registry = new FormRegistry(array( + $this->extension1, + $this->extension2, + ), $this->resolvedTypeFactory); + } + + public function testGetTypeFromExtension() + { + $type = new FooType(); + $resolvedType = new ResolvedFormType($type); + + $this->extension2->addType($type); + + $this->resolvedTypeFactory->expects($this->once()) + ->method('createResolvedType') + ->with($type) + ->willReturn($resolvedType); + + $this->assertSame($resolvedType, $this->registry->getType(get_class($type))); + } + + public function testLoadUnregisteredType() + { + $type = new FooType(); + $resolvedType = new ResolvedFormType($type); + + $this->resolvedTypeFactory->expects($this->once()) + ->method('createResolvedType') + ->with($type) + ->willReturn($resolvedType); + + $this->assertSame($resolvedType, $this->registry->getType('Symfony\Component\Form\Tests\Fixtures\FooType')); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException + */ + public function testFailIfUnregisteredTypeNoClass() + { + $this->registry->getType('Symfony\Blubb'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException + */ + public function testFailIfUnregisteredTypeNoFormType() + { + $this->registry->getType('stdClass'); + } + + public function testGetTypeWithTypeExtensions() + { + $type = new FooType(); + $ext1 = new FooTypeBarExtension(); + $ext2 = new FooTypeBazExtension(); + $resolvedType = new ResolvedFormType($type, array($ext1, $ext2)); + + $this->extension2->addType($type); + $this->extension1->addTypeExtension($ext1); + $this->extension2->addTypeExtension($ext2); + + $this->resolvedTypeFactory->expects($this->once()) + ->method('createResolvedType') + ->with($type, array($ext1, $ext2)) + ->willReturn($resolvedType); + + $this->assertSame($resolvedType, $this->registry->getType(get_class($type))); + } + + public function testGetTypeConnectsParent() + { + $parentType = new FooType(); + $type = new FooSubType(); + $parentResolvedType = new ResolvedFormType($parentType); + $resolvedType = new ResolvedFormType($type); + + $this->extension1->addType($parentType); + $this->extension2->addType($type); + + $this->resolvedTypeFactory->expects($this->at(0)) + ->method('createResolvedType') + ->with($parentType) + ->willReturn($parentResolvedType); + + $this->resolvedTypeFactory->expects($this->at(1)) + ->method('createResolvedType') + ->with($type, array(), $parentResolvedType) + ->willReturn($resolvedType); + + $this->assertSame($resolvedType, $this->registry->getType(get_class($type))); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException + */ + public function testGetTypeThrowsExceptionIfTypeNotFound() + { + $this->registry->getType('bar'); + } + + public function testHasTypeAfterLoadingFromExtension() + { + $type = new FooType(); + $resolvedType = new ResolvedFormType($type); + + $this->resolvedTypeFactory->expects($this->once()) + ->method('createResolvedType') + ->with($type) + ->willReturn($resolvedType); + + $this->extension2->addType($type); + + $this->assertTrue($this->registry->hasType(get_class($type))); + } + + public function testHasTypeIfFQCN() + { + $this->assertTrue($this->registry->hasType('Symfony\Component\Form\Tests\Fixtures\FooType')); + } + + public function testDoesNotHaveTypeIfNonExistingClass() + { + $this->assertFalse($this->registry->hasType('Symfony\Blubb')); + } + + public function testDoesNotHaveTypeIfNoFormType() + { + $this->assertFalse($this->registry->hasType('stdClass')); + } + + public function testGetTypeGuesser() + { + $expectedGuesser = new FormTypeGuesserChain(array($this->guesser1, $this->guesser2)); + + $this->assertEquals($expectedGuesser, $this->registry->getTypeGuesser()); + + $registry = new FormRegistry( + array($this->getMockBuilder('Symfony\Component\Form\FormExtensionInterface')->getMock()), + $this->resolvedTypeFactory + ); + + $this->assertNull($registry->getTypeGuesser()); + } + + public function testGetExtensions() + { + $expectedExtensions = array($this->extension1, $this->extension2); + + $this->assertEquals($expectedExtensions, $this->registry->getExtensions()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormRendererTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormRendererTest.php new file mode 100644 index 0000000000000000000000000000000000000000..452bb71e8905b652d763b5bc92db501930471d4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/FormRendererTest.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\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; + +class FormRendererTest extends TestCase +{ + public function testHumanize() + { + $renderer = $this->getMockBuilder('Symfony\Component\Form\FormRenderer') + ->setMethods(null) + ->disableOriginalConstructor() + ->getMock() + ; + + $this->assertEquals('Is active', $renderer->humanize('is_active')); + $this->assertEquals('Is active', $renderer->humanize('isActive')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Guess/GuessTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Guess/GuessTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8f7e1d020302a475c4be98be9d2be5aa255251ae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Guess/GuessTest.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Guess; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Guess\Guess; + +class TestGuess extends Guess +{ +} + +class GuessTest extends TestCase +{ + public function testGetBestGuessReturnsGuessWithHighestConfidence() + { + $guess1 = new TestGuess(Guess::MEDIUM_CONFIDENCE); + $guess2 = new TestGuess(Guess::LOW_CONFIDENCE); + $guess3 = new TestGuess(Guess::HIGH_CONFIDENCE); + + $this->assertSame($guess3, Guess::getBestGuess(array($guess1, $guess2, $guess3))); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testGuessExpectsValidConfidence() + { + new TestGuess(5); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..38580063e71952fea2441027ed6d7abbc05726de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php @@ -0,0 +1,219 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use Symfony\Component\Form\NativeRequestHandler; + +/** + * @author Bernhard Schussek + */ +class NativeRequestHandlerTest extends AbstractRequestHandlerTest +{ + private static $serverBackup; + + public static function setUpBeforeClass() + { + self::$serverBackup = $_SERVER; + } + + protected function setUp() + { + parent::setUp(); + + $_GET = array(); + $_POST = array(); + $_FILES = array(); + $_SERVER = array( + // PHPUnit needs this entry + 'SCRIPT_NAME' => self::$serverBackup['SCRIPT_NAME'], + ); + } + + protected function tearDown() + { + parent::tearDown(); + + $_GET = array(); + $_POST = array(); + $_FILES = array(); + $_SERVER = self::$serverBackup; + } + + /** + * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException + */ + public function testRequestShouldBeNull() + { + $this->requestHandler->handleRequest($this->getMockForm('name', 'GET'), 'request'); + } + + public function testMethodOverrideHeaderTakesPrecedenceIfPost() + { + $form = $this->getMockForm('param1', 'PUT'); + + $this->setRequestData('POST', array( + 'param1' => 'DATA', + )); + + $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] = 'PUT'; + + $form->expects($this->once()) + ->method('submit') + ->with('DATA'); + + $this->requestHandler->handleRequest($form, $this->request); + } + + public function testConvertEmptyUploadedFilesToNull() + { + $form = $this->getMockForm('param1', 'POST', false); + + $this->setRequestData('POST', array(), array('param1' => array( + 'name' => '', + 'type' => '', + 'tmp_name' => '', + 'error' => UPLOAD_ERR_NO_FILE, + 'size' => 0, + ))); + + $form->expects($this->once()) + ->method('submit') + ->with($this->identicalTo(null)); + + $this->requestHandler->handleRequest($form, $this->request); + } + + public function testFixBuggyFilesArray() + { + $form = $this->getMockForm('param1', 'POST', false); + + $this->setRequestData('POST', array(), array('param1' => array( + 'name' => array( + 'field' => 'upload.txt', + ), + 'type' => array( + 'field' => 'text/plain', + ), + 'tmp_name' => array( + 'field' => 'owfdskjasdfsa', + ), + 'error' => array( + 'field' => UPLOAD_ERR_OK, + ), + 'size' => array( + 'field' => 100, + ), + ))); + + $form->expects($this->once()) + ->method('submit') + ->with(array( + 'field' => array( + 'name' => 'upload.txt', + 'type' => 'text/plain', + 'tmp_name' => 'owfdskjasdfsa', + 'error' => UPLOAD_ERR_OK, + 'size' => 100, + ), + )); + + $this->requestHandler->handleRequest($form, $this->request); + } + + public function testFixBuggyNestedFilesArray() + { + $form = $this->getMockForm('param1', 'POST'); + + $this->setRequestData('POST', array(), array('param1' => array( + 'name' => array( + 'field' => array('subfield' => 'upload.txt'), + ), + 'type' => array( + 'field' => array('subfield' => 'text/plain'), + ), + 'tmp_name' => array( + 'field' => array('subfield' => 'owfdskjasdfsa'), + ), + 'error' => array( + 'field' => array('subfield' => UPLOAD_ERR_OK), + ), + 'size' => array( + 'field' => array('subfield' => 100), + ), + ))); + + $form->expects($this->once()) + ->method('submit') + ->with(array( + 'field' => array( + 'subfield' => array( + 'name' => 'upload.txt', + 'type' => 'text/plain', + 'tmp_name' => 'owfdskjasdfsa', + 'error' => UPLOAD_ERR_OK, + 'size' => 100, + ), + ), + )); + + $this->requestHandler->handleRequest($form, $this->request); + } + + public function testMethodOverrideHeaderIgnoredIfNotPost() + { + $form = $this->getMockForm('param1', 'POST'); + + $this->setRequestData('GET', array( + 'param1' => 'DATA', + )); + + $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] = 'PUT'; + + $form->expects($this->never()) + ->method('submit'); + + $this->requestHandler->handleRequest($form, $this->request); + } + + protected function setRequestData($method, $data, $files = array()) + { + if ('GET' === $method) { + $_GET = $data; + $_FILES = array(); + } else { + $_POST = $data; + $_FILES = $files; + } + + $_SERVER = array( + 'REQUEST_METHOD' => $method, + // PHPUnit needs this entry + 'SCRIPT_NAME' => self::$serverBackup['SCRIPT_NAME'], + ); + } + + protected function getRequestHandler() + { + return new NativeRequestHandler($this->serverParams); + } + + protected function getMockFile($suffix = '') + { + return array( + 'name' => 'upload'.$suffix.'.txt', + 'type' => 'text/plain', + 'tmp_name' => 'owfdskjasdfsa'.$suffix, + 'error' => UPLOAD_ERR_OK, + 'size' => 100, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dcdba550c487eb9aa65d8358b8c18f2313c3ed76 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php @@ -0,0 +1,394 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\FormTypeExtensionInterface; +use Symfony\Component\Form\FormTypeInterface; +use Symfony\Component\Form\ResolvedFormType; +use Symfony\Component\Form\FormBuilder; +use Symfony\Component\OptionsResolver\OptionsResolver; + +/** + * @author Bernhard Schussek + */ +class ResolvedFormTypeTest extends TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $dispatcher; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $factory; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $dataMapper; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject|FormTypeInterface + */ + private $parentType; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject|FormTypeInterface + */ + private $type; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject|FormTypeExtensionInterface + */ + private $extension1; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject|FormTypeExtensionInterface + */ + private $extension2; + + /** + * @var ResolvedFormType + */ + private $parentResolvedType; + + /** + * @var ResolvedFormType + */ + private $resolvedType; + + protected function setUp() + { + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + $this->dataMapper = $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); + $this->parentType = $this->getMockFormType(); + $this->type = $this->getMockFormType(); + $this->extension1 = $this->getMockFormTypeExtension(); + $this->extension2 = $this->getMockFormTypeExtension(); + $this->parentResolvedType = new ResolvedFormType($this->parentType); + $this->resolvedType = new ResolvedFormType($this->type, array($this->extension1, $this->extension2), $this->parentResolvedType); + } + + public function testGetOptionsResolver() + { + $i = 0; + + $assertIndexAndAddOption = function ($index, $option, $default) use (&$i) { + return function (OptionsResolver $resolver) use (&$i, $index, $option, $default) { + $this->assertEquals($index, $i, 'Executed at index '.$index); + + ++$i; + + $resolver->setDefaults(array($option => $default)); + }; + }; + + // First the default options are generated for the super type + $this->parentType->expects($this->once()) + ->method('configureOptions') + ->will($this->returnCallback($assertIndexAndAddOption(0, 'a', 'a_default'))); + + // The form type itself + $this->type->expects($this->once()) + ->method('configureOptions') + ->will($this->returnCallback($assertIndexAndAddOption(1, 'b', 'b_default'))); + + // And its extensions + $this->extension1->expects($this->once()) + ->method('configureOptions') + ->will($this->returnCallback($assertIndexAndAddOption(2, 'c', 'c_default'))); + + $this->extension2->expects($this->once()) + ->method('configureOptions') + ->will($this->returnCallback($assertIndexAndAddOption(3, 'd', 'd_default'))); + + $givenOptions = array('a' => 'a_custom', 'c' => 'c_custom'); + $resolvedOptions = array('a' => 'a_custom', 'b' => 'b_default', 'c' => 'c_custom', 'd' => 'd_default'); + + $resolver = $this->resolvedType->getOptionsResolver(); + + $this->assertEquals($resolvedOptions, $resolver->resolve($givenOptions)); + } + + public function testCreateBuilder() + { + $givenOptions = array('a' => 'a_custom', 'c' => 'c_custom'); + $resolvedOptions = array('a' => 'a_custom', 'b' => 'b_default', 'c' => 'c_custom', 'd' => 'd_default'); + $optionsResolver = $this->getMockBuilder('Symfony\Component\OptionsResolver\OptionsResolver')->getMock(); + + $this->resolvedType = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormType') + ->setConstructorArgs(array($this->type, array($this->extension1, $this->extension2), $this->parentResolvedType)) + ->setMethods(array('getOptionsResolver')) + ->getMock(); + + $this->resolvedType->expects($this->once()) + ->method('getOptionsResolver') + ->will($this->returnValue($optionsResolver)); + + $optionsResolver->expects($this->once()) + ->method('resolve') + ->with($givenOptions) + ->will($this->returnValue($resolvedOptions)); + + $factory = $this->getMockFormFactory(); + $builder = $this->resolvedType->createBuilder($factory, 'name', $givenOptions); + + $this->assertSame($this->resolvedType, $builder->getType()); + $this->assertSame($resolvedOptions, $builder->getOptions()); + $this->assertNull($builder->getDataClass()); + } + + public function testCreateBuilderWithDataClassOption() + { + $givenOptions = array('data_class' => 'Foo'); + $resolvedOptions = array('data_class' => '\stdClass'); + $optionsResolver = $this->getMockBuilder('Symfony\Component\OptionsResolver\OptionsResolver')->getMock(); + + $this->resolvedType = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormType') + ->setConstructorArgs(array($this->type, array($this->extension1, $this->extension2), $this->parentResolvedType)) + ->setMethods(array('getOptionsResolver')) + ->getMock(); + + $this->resolvedType->expects($this->once()) + ->method('getOptionsResolver') + ->will($this->returnValue($optionsResolver)); + + $optionsResolver->expects($this->once()) + ->method('resolve') + ->with($givenOptions) + ->will($this->returnValue($resolvedOptions)); + + $factory = $this->getMockFormFactory(); + $builder = $this->resolvedType->createBuilder($factory, 'name', $givenOptions); + + $this->assertSame($this->resolvedType, $builder->getType()); + $this->assertSame($resolvedOptions, $builder->getOptions()); + $this->assertSame('\stdClass', $builder->getDataClass()); + } + + public function testBuildForm() + { + $i = 0; + + $assertIndex = function ($index) use (&$i) { + return function () use (&$i, $index) { + $this->assertEquals($index, $i, 'Executed at index '.$index); + + ++$i; + }; + }; + + $options = array('a' => 'Foo', 'b' => 'Bar'); + $builder = $this->getMockBuilder('Symfony\Component\Form\Test\FormBuilderInterface')->getMock(); + + // First the form is built for the super type + $this->parentType->expects($this->once()) + ->method('buildForm') + ->with($builder, $options) + ->will($this->returnCallback($assertIndex(0))); + + // Then the type itself + $this->type->expects($this->once()) + ->method('buildForm') + ->with($builder, $options) + ->will($this->returnCallback($assertIndex(1))); + + // Then its extensions + $this->extension1->expects($this->once()) + ->method('buildForm') + ->with($builder, $options) + ->will($this->returnCallback($assertIndex(2))); + + $this->extension2->expects($this->once()) + ->method('buildForm') + ->with($builder, $options) + ->will($this->returnCallback($assertIndex(3))); + + $this->resolvedType->buildForm($builder, $options); + } + + public function testCreateView() + { + $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + + $view = $this->resolvedType->createView($form); + + $this->assertInstanceOf('Symfony\Component\Form\FormView', $view); + $this->assertNull($view->parent); + } + + public function testCreateViewWithParent() + { + $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $parentView = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); + + $view = $this->resolvedType->createView($form, $parentView); + + $this->assertInstanceOf('Symfony\Component\Form\FormView', $view); + $this->assertSame($parentView, $view->parent); + } + + public function testBuildView() + { + $options = array('a' => '1', 'b' => '2'); + $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $view = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); + + $i = 0; + + $assertIndex = function ($index) use (&$i) { + return function () use (&$i, $index) { + $this->assertEquals($index, $i, 'Executed at index '.$index); + + ++$i; + }; + }; + + // First the super type + $this->parentType->expects($this->once()) + ->method('buildView') + ->with($view, $form, $options) + ->will($this->returnCallback($assertIndex(0))); + + // Then the type itself + $this->type->expects($this->once()) + ->method('buildView') + ->with($view, $form, $options) + ->will($this->returnCallback($assertIndex(1))); + + // Then its extensions + $this->extension1->expects($this->once()) + ->method('buildView') + ->with($view, $form, $options) + ->will($this->returnCallback($assertIndex(2))); + + $this->extension2->expects($this->once()) + ->method('buildView') + ->with($view, $form, $options) + ->will($this->returnCallback($assertIndex(3))); + + $this->resolvedType->buildView($view, $form, $options); + } + + public function testFinishView() + { + $options = array('a' => '1', 'b' => '2'); + $form = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $view = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); + + $i = 0; + + $assertIndex = function ($index) use (&$i) { + return function () use (&$i, $index) { + $this->assertEquals($index, $i, 'Executed at index '.$index); + + ++$i; + }; + }; + + // First the super type + $this->parentType->expects($this->once()) + ->method('finishView') + ->with($view, $form, $options) + ->will($this->returnCallback($assertIndex(0))); + + // Then the type itself + $this->type->expects($this->once()) + ->method('finishView') + ->with($view, $form, $options) + ->will($this->returnCallback($assertIndex(1))); + + // Then its extensions + $this->extension1->expects($this->once()) + ->method('finishView') + ->with($view, $form, $options) + ->will($this->returnCallback($assertIndex(2))); + + $this->extension2->expects($this->once()) + ->method('finishView') + ->with($view, $form, $options) + ->will($this->returnCallback($assertIndex(3))); + + $this->resolvedType->finishView($view, $form, $options); + } + + public function testGetBlockPrefix() + { + $this->type->expects($this->once()) + ->method('getBlockPrefix') + ->willReturn('my_prefix'); + + $resolvedType = new ResolvedFormType($this->type); + + $this->assertSame('my_prefix', $resolvedType->getBlockPrefix()); + } + + /** + * @dataProvider provideTypeClassBlockPrefixTuples + */ + public function testBlockPrefixDefaultsToFQCNIfNoName($typeClass, $blockPrefix) + { + $resolvedType = new ResolvedFormType(new $typeClass()); + + $this->assertSame($blockPrefix, $resolvedType->getBlockPrefix()); + } + + public function provideTypeClassBlockPrefixTuples() + { + return array( + array(__NAMESPACE__.'\Fixtures\FooType', 'foo'), + array(__NAMESPACE__.'\Fixtures\Foo', 'foo'), + array(__NAMESPACE__.'\Fixtures\Type', 'type'), + array(__NAMESPACE__.'\Fixtures\FooBarHTMLType', 'foo_bar_html'), + array(__NAMESPACE__.'\Fixtures\Foo1Bar2Type', 'foo1_bar2'), + array(__NAMESPACE__.'\Fixtures\FBooType', 'f_boo'), + ); + } + + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ + private function getMockFormType($typeClass = 'Symfony\Component\Form\AbstractType') + { + return $this->getMockBuilder($typeClass)->setMethods(array('getBlockPrefix', 'configureOptions', 'finishView', 'buildView', 'buildForm'))->getMock(); + } + + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ + private function getMockFormTypeExtension() + { + return $this->getMockBuilder('Symfony\Component\Form\AbstractTypeExtension')->setMethods(array('getExtendedType', 'configureOptions', 'finishView', 'buildView', 'buildForm'))->getMock(); + } + + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ + private function getMockFormFactory() + { + return $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); + } + + /** + * @param string $name + * @param array $options + * + * @return FormBuilder + */ + protected function getBuilder($name = 'name', array $options = array()) + { + return new FormBuilder($name, null, $this->dispatcher, $this->factory, $options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Resources/TranslationFilesTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Resources/TranslationFilesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..052821c39dfecfeb632b626f10c7edc205ce563a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Resources/TranslationFilesTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Resources; + +use PHPUnit\Framework\TestCase; + +class TranslationFilesTest extends TestCase +{ + /** + * @dataProvider provideTranslationFiles + */ + public function testTranslationFileIsValid($filePath) + { + if (class_exists('PHPUnit_Util_XML')) { + \PHPUnit_Util_XML::loadfile($filePath, false, false, true); + } else { + \PHPUnit\Util\XML::loadfile($filePath, false, false, true); + } + } + + public function provideTranslationFiles() + { + return array_map( + function ($filePath) { return (array) $filePath; }, + glob(dirname(dirname(__DIR__)).'/Resources/translations/*.xlf') + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/SimpleFormTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/SimpleFormTest.php new file mode 100644 index 0000000000000000000000000000000000000000..689f2e8f77ed304740d4d0128a85c7d34ec0e21e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/SimpleFormTest.php @@ -0,0 +1,1069 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests; + +use Symfony\Component\Form\Form; +use Symfony\Component\Form\FormEvent; +use Symfony\Component\Form\FormEvents; +use Symfony\Component\PropertyAccess\PropertyPath; +use Symfony\Component\Form\FormConfigBuilder; +use Symfony\Component\Form\FormError; +use Symfony\Component\Form\Exception\TransformationFailedException; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\Form\Tests\Fixtures\FixedDataTransformer; +use Symfony\Component\Form\Tests\Fixtures\FixedFilterListener; + +class SimpleFormTest_Countable implements \Countable +{ + private $count; + + public function __construct($count) + { + $this->count = $count; + } + + public function count() + { + return $this->count; + } +} + +class SimpleFormTest_Traversable implements \IteratorAggregate +{ + private $iterator; + + public function __construct($count) + { + $this->iterator = new \ArrayIterator($count > 0 ? array_fill(0, $count, 'Foo') : array()); + } + + public function getIterator() + { + return $this->iterator; + } +} + +class SimpleFormTest extends AbstractFormTest +{ + public function testDataIsInitializedToConfiguredValue() + { + $model = new FixedDataTransformer(array( + 'default' => 'foo', + )); + $view = new FixedDataTransformer(array( + 'foo' => 'bar', + )); + + $config = new FormConfigBuilder('name', null, $this->dispatcher); + $config->addViewTransformer($view); + $config->addModelTransformer($model); + $config->setData('default'); + $form = new Form($config); + + $this->assertSame('default', $form->getData()); + $this->assertSame('foo', $form->getNormData()); + $this->assertSame('bar', $form->getViewData()); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + * @expectedExceptionMessage Unable to transform value for property path "name": No mapping for value "arg" + */ + public function testDataTransformationFailure() + { + $model = new FixedDataTransformer(array( + 'default' => 'foo', + )); + $view = new FixedDataTransformer(array( + 'foo' => 'bar', + )); + + $config = new FormConfigBuilder('name', null, $this->dispatcher); + $config->addViewTransformer($view); + $config->addModelTransformer($model); + $config->setData('arg'); + $form = new Form($config); + + $form->getData(); + } + + // https://github.com/symfony/symfony/commit/d4f4038f6daf7cf88ca7c7ab089473cce5ebf7d8#commitcomment-1632879 + public function testDataIsInitializedFromSubmit() + { + $mock = $this->getMockBuilder('\stdClass') + ->setMethods(array('preSetData', 'preSubmit')) + ->getMock(); + $mock->expects($this->at(0)) + ->method('preSetData'); + $mock->expects($this->at(1)) + ->method('preSubmit'); + + $config = new FormConfigBuilder('name', null, $this->dispatcher); + $config->addEventListener(FormEvents::PRE_SET_DATA, array($mock, 'preSetData')); + $config->addEventListener(FormEvents::PRE_SUBMIT, array($mock, 'preSubmit')); + $form = new Form($config); + + // no call to setData() or similar where the object would be + // initialized otherwise + + $form->submit('foobar'); + } + + // https://github.com/symfony/symfony/pull/7789 + public function testFalseIsConvertedToNull() + { + $mock = $this->getMockBuilder('\stdClass') + ->setMethods(array('preSubmit')) + ->getMock(); + $mock->expects($this->once()) + ->method('preSubmit') + ->with($this->callback(function ($event) { + return null === $event->getData(); + })); + + $config = new FormConfigBuilder('name', null, $this->dispatcher); + $config->addEventListener(FormEvents::PRE_SUBMIT, array($mock, 'preSubmit')); + $form = new Form($config); + + $form->submit(false); + + $this->assertTrue($form->isValid()); + $this->assertNull($form->getData()); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\AlreadySubmittedException + */ + public function testSubmitThrowsExceptionIfAlreadySubmitted() + { + $this->form->submit(array()); + $this->form->submit(array()); + } + + public function testSubmitIsIgnoredIfDisabled() + { + $form = $this->getBuilder() + ->setDisabled(true) + ->setData('initial') + ->getForm(); + + $form->submit('new'); + + $this->assertEquals('initial', $form->getData()); + $this->assertTrue($form->isSubmitted()); + } + + public function testNeverRequiredIfParentNotRequired() + { + $parent = $this->getBuilder()->setRequired(false)->getForm(); + $child = $this->getBuilder()->setRequired(true)->getForm(); + + $child->setParent($parent); + + $this->assertFalse($child->isRequired()); + } + + public function testRequired() + { + $parent = $this->getBuilder()->setRequired(true)->getForm(); + $child = $this->getBuilder()->setRequired(true)->getForm(); + + $child->setParent($parent); + + $this->assertTrue($child->isRequired()); + } + + public function testNotRequired() + { + $parent = $this->getBuilder()->setRequired(true)->getForm(); + $child = $this->getBuilder()->setRequired(false)->getForm(); + + $child->setParent($parent); + + $this->assertFalse($child->isRequired()); + } + + /** + * @dataProvider getDisabledStates + */ + public function testAlwaysDisabledIfParentDisabled($parentDisabled, $disabled, $result) + { + $parent = $this->getBuilder()->setDisabled($parentDisabled)->getForm(); + $child = $this->getBuilder()->setDisabled($disabled)->getForm(); + + $child->setParent($parent); + + $this->assertSame($result, $child->isDisabled()); + } + + public function getDisabledStates() + { + return array( + // parent, button, result + array(true, true, true), + array(true, false, true), + array(false, true, true), + array(false, false, false), + ); + } + + public function testGetRootReturnsRootOfParent() + { + $parent = $this->getMockForm(); + $parent->expects($this->once()) + ->method('getRoot') + ->will($this->returnValue('ROOT')); + + $this->form->setParent($parent); + + $this->assertEquals('ROOT', $this->form->getRoot()); + } + + public function testGetRootReturnsSelfIfNoParent() + { + $this->assertSame($this->form, $this->form->getRoot()); + } + + public function testEmptyIfEmptyArray() + { + $this->form->setData(array()); + + $this->assertTrue($this->form->isEmpty()); + } + + public function testEmptyIfEmptyCountable() + { + $this->form = new Form(new FormConfigBuilder('name', __NAMESPACE__.'\SimpleFormTest_Countable', $this->dispatcher)); + + $this->form->setData(new SimpleFormTest_Countable(0)); + + $this->assertTrue($this->form->isEmpty()); + } + + public function testNotEmptyIfFilledCountable() + { + $this->form = new Form(new FormConfigBuilder('name', __NAMESPACE__.'\SimpleFormTest_Countable', $this->dispatcher)); + + $this->form->setData(new SimpleFormTest_Countable(1)); + + $this->assertFalse($this->form->isEmpty()); + } + + public function testEmptyIfEmptyTraversable() + { + $this->form = new Form(new FormConfigBuilder('name', __NAMESPACE__.'\SimpleFormTest_Traversable', $this->dispatcher)); + + $this->form->setData(new SimpleFormTest_Traversable(0)); + + $this->assertTrue($this->form->isEmpty()); + } + + public function testNotEmptyIfFilledTraversable() + { + $this->form = new Form(new FormConfigBuilder('name', __NAMESPACE__.'\SimpleFormTest_Traversable', $this->dispatcher)); + + $this->form->setData(new SimpleFormTest_Traversable(1)); + + $this->assertFalse($this->form->isEmpty()); + } + + public function testEmptyIfNull() + { + $this->form->setData(null); + + $this->assertTrue($this->form->isEmpty()); + } + + public function testEmptyIfEmptyString() + { + $this->form->setData(''); + + $this->assertTrue($this->form->isEmpty()); + } + + public function testNotEmptyIfText() + { + $this->form->setData('foobar'); + + $this->assertFalse($this->form->isEmpty()); + } + + public function testValidIfSubmitted() + { + $form = $this->getBuilder()->getForm(); + $form->submit('foobar'); + + $this->assertTrue($form->isValid()); + } + + public function testValidIfSubmittedAndDisabled() + { + $form = $this->getBuilder()->setDisabled(true)->getForm(); + $form->submit('foobar'); + + $this->assertTrue($form->isValid()); + } + + /** + * @group legacy + * @expectedDeprecation Call Form::isValid() with an unsubmitted form %s. + */ + public function testNotValidIfNotSubmitted() + { + $this->assertFalse($this->form->isValid()); + } + + public function testNotValidIfErrors() + { + $form = $this->getBuilder()->getForm(); + $form->submit('foobar'); + $form->addError(new FormError('Error!')); + + $this->assertFalse($form->isValid()); + } + + public function testHasErrors() + { + $this->form->addError(new FormError('Error!')); + + $this->assertCount(1, $this->form->getErrors()); + } + + public function testHasNoErrors() + { + $this->assertCount(0, $this->form->getErrors()); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\AlreadySubmittedException + */ + public function testSetParentThrowsExceptionIfAlreadySubmitted() + { + $this->form->submit(array()); + $this->form->setParent($this->getBuilder('parent')->getForm()); + } + + public function testSubmitted() + { + $form = $this->getBuilder()->getForm(); + $form->submit('foobar'); + + $this->assertTrue($form->isSubmitted()); + } + + public function testNotSubmitted() + { + $this->assertFalse($this->form->isSubmitted()); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\AlreadySubmittedException + */ + public function testSetDataThrowsExceptionIfAlreadySubmitted() + { + $this->form->submit(array()); + $this->form->setData(null); + } + + public function testSetDataClonesObjectIfNotByReference() + { + $data = new \stdClass(); + $form = $this->getBuilder('name', null, '\stdClass')->setByReference(false)->getForm(); + $form->setData($data); + + $this->assertNotSame($data, $form->getData()); + $this->assertEquals($data, $form->getData()); + } + + public function testSetDataDoesNotCloneObjectIfByReference() + { + $data = new \stdClass(); + $form = $this->getBuilder('name', null, '\stdClass')->setByReference(true)->getForm(); + $form->setData($data); + + $this->assertSame($data, $form->getData()); + } + + public function testSetDataExecutesTransformationChain() + { + // use real event dispatcher now + $form = $this->getBuilder('name', new EventDispatcher()) + ->addEventSubscriber(new FixedFilterListener(array( + 'preSetData' => array( + 'app' => 'filtered', + ), + ))) + ->addModelTransformer(new FixedDataTransformer(array( + '' => '', + 'filtered' => 'norm', + ))) + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'norm' => 'client', + ))) + ->getForm(); + + $form->setData('app'); + + $this->assertEquals('filtered', $form->getData()); + $this->assertEquals('norm', $form->getNormData()); + $this->assertEquals('client', $form->getViewData()); + } + + public function testSetDataExecutesViewTransformersInOrder() + { + $form = $this->getBuilder() + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'first' => 'second', + ))) + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'second' => 'third', + ))) + ->getForm(); + + $form->setData('first'); + + $this->assertEquals('third', $form->getViewData()); + } + + public function testSetDataExecutesModelTransformersInReverseOrder() + { + $form = $this->getBuilder() + ->addModelTransformer(new FixedDataTransformer(array( + '' => '', + 'second' => 'third', + ))) + ->addModelTransformer(new FixedDataTransformer(array( + '' => '', + 'first' => 'second', + ))) + ->getForm(); + + $form->setData('first'); + + $this->assertEquals('third', $form->getNormData()); + } + + /* + * When there is no data transformer, the data must have the same format + * in all three representations + */ + public function testSetDataConvertsScalarToStringIfNoTransformer() + { + $form = $this->getBuilder()->getForm(); + + $form->setData(1); + + $this->assertSame('1', $form->getData()); + $this->assertSame('1', $form->getNormData()); + $this->assertSame('1', $form->getViewData()); + } + + /* + * Data in client format should, if possible, always be a string to + * facilitate differentiation between '0' and '' + */ + public function testSetDataConvertsScalarToStringIfOnlyModelTransformer() + { + $form = $this->getBuilder() + ->addModelTransformer(new FixedDataTransformer(array( + '' => '', + 1 => 23, + ))) + ->getForm(); + + $form->setData(1); + + $this->assertSame(1, $form->getData()); + $this->assertSame(23, $form->getNormData()); + $this->assertSame('23', $form->getViewData()); + } + + /* + * NULL remains NULL in app and norm format to remove the need to treat + * empty values and NULL explicitly in the application + */ + public function testSetDataConvertsNullToStringIfNoTransformer() + { + $form = $this->getBuilder()->getForm(); + + $form->setData(null); + + $this->assertNull($form->getData()); + $this->assertNull($form->getNormData()); + $this->assertSame('', $form->getViewData()); + } + + public function testSetDataIsIgnoredIfDataIsLocked() + { + $form = $this->getBuilder() + ->setData('default') + ->setDataLocked(true) + ->getForm(); + + $form->setData('foobar'); + + $this->assertSame('default', $form->getData()); + } + + public function testPreSetDataChangesDataIfDataIsLocked() + { + $config = new FormConfigBuilder('name', null, $this->dispatcher); + $config + ->setData('default') + ->setDataLocked(true) + ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { + $event->setData('foobar'); + }); + $form = new Form($config); + + $this->assertSame('foobar', $form->getData()); + $this->assertSame('foobar', $form->getNormData()); + $this->assertSame('foobar', $form->getViewData()); + } + + public function testSubmitConvertsEmptyToNullIfNoTransformer() + { + $form = $this->getBuilder()->getForm(); + + $form->submit(''); + + $this->assertNull($form->getData()); + $this->assertNull($form->getNormData()); + $this->assertSame('', $form->getViewData()); + } + + public function testSubmitExecutesTransformationChain() + { + // use real event dispatcher now + $form = $this->getBuilder('name', new EventDispatcher()) + ->addEventSubscriber(new FixedFilterListener(array( + 'preSubmit' => array( + 'client' => 'filteredclient', + ), + 'onSubmit' => array( + 'norm' => 'filterednorm', + ), + ))) + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + // direction is reversed! + 'norm' => 'filteredclient', + 'filterednorm' => 'cleanedclient', + ))) + ->addModelTransformer(new FixedDataTransformer(array( + '' => '', + // direction is reversed! + 'app' => 'filterednorm', + ))) + ->getForm(); + + $form->submit('client'); + + $this->assertEquals('app', $form->getData()); + $this->assertEquals('filterednorm', $form->getNormData()); + $this->assertEquals('cleanedclient', $form->getViewData()); + } + + public function testSubmitExecutesViewTransformersInReverseOrder() + { + $form = $this->getBuilder() + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'third' => 'second', + ))) + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'second' => 'first', + ))) + ->getForm(); + + $form->submit('first'); + + $this->assertEquals('third', $form->getNormData()); + } + + public function testSubmitExecutesModelTransformersInOrder() + { + $form = $this->getBuilder() + ->addModelTransformer(new FixedDataTransformer(array( + '' => '', + 'second' => 'first', + ))) + ->addModelTransformer(new FixedDataTransformer(array( + '' => '', + 'third' => 'second', + ))) + ->getForm(); + + $form->submit('first'); + + $this->assertEquals('third', $form->getData()); + } + + public function testSynchronizedByDefault() + { + $this->assertTrue($this->form->isSynchronized()); + } + + public function testSynchronizedAfterSubmission() + { + $this->form->submit('foobar'); + + $this->assertTrue($this->form->isSynchronized()); + } + + public function testNotSynchronizedIfViewReverseTransformationFailed() + { + $transformer = $this->getDataTransformer(); + $transformer->expects($this->once()) + ->method('reverseTransform') + ->will($this->throwException(new TransformationFailedException())); + + $form = $this->getBuilder() + ->addViewTransformer($transformer) + ->getForm(); + + $form->submit('foobar'); + + $this->assertFalse($form->isSynchronized()); + } + + public function testNotSynchronizedIfModelReverseTransformationFailed() + { + $transformer = $this->getDataTransformer(); + $transformer->expects($this->once()) + ->method('reverseTransform') + ->will($this->throwException(new TransformationFailedException())); + + $form = $this->getBuilder() + ->addModelTransformer($transformer) + ->getForm(); + + $form->submit('foobar'); + + $this->assertFalse($form->isSynchronized()); + } + + public function testEmptyDataCreatedBeforeTransforming() + { + $form = $this->getBuilder() + ->setEmptyData('foo') + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + // direction is reversed! + 'bar' => 'foo', + ))) + ->getForm(); + + $form->submit(''); + + $this->assertEquals('bar', $form->getData()); + } + + public function testEmptyDataFromClosure() + { + $form = $this->getBuilder() + ->setEmptyData(function ($form) { + // the form instance is passed to the closure to allow use + // of form data when creating the empty value + $this->assertInstanceOf('Symfony\Component\Form\FormInterface', $form); + + return 'foo'; + }) + ->addViewTransformer(new FixedDataTransformer(array( + '' => '', + // direction is reversed! + 'bar' => 'foo', + ))) + ->getForm(); + + $form->submit(''); + + $this->assertEquals('bar', $form->getData()); + } + + public function testSubmitResetsErrors() + { + $this->form->addError(new FormError('Error!')); + $this->form->submit('foobar'); + + $this->assertCount(0, $this->form->getErrors()); + } + + public function testCreateView() + { + $type = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); + $view = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); + $form = $this->getBuilder()->setType($type)->getForm(); + + $type->expects($this->once()) + ->method('createView') + ->with($form) + ->will($this->returnValue($view)); + + $this->assertSame($view, $form->createView()); + } + + public function testCreateViewWithParent() + { + $type = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); + $view = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); + $parentForm = $this->getMockBuilder('Symfony\Component\Form\Test\FormInterface')->getMock(); + $parentView = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); + $form = $this->getBuilder()->setType($type)->getForm(); + $form->setParent($parentForm); + + $parentForm->expects($this->once()) + ->method('createView') + ->will($this->returnValue($parentView)); + + $type->expects($this->once()) + ->method('createView') + ->with($form, $parentView) + ->will($this->returnValue($view)); + + $this->assertSame($view, $form->createView()); + } + + public function testCreateViewWithExplicitParent() + { + $type = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeInterface')->getMock(); + $view = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); + $parentView = $this->getMockBuilder('Symfony\Component\Form\FormView')->getMock(); + $form = $this->getBuilder()->setType($type)->getForm(); + + $type->expects($this->once()) + ->method('createView') + ->with($form, $parentView) + ->will($this->returnValue($view)); + + $this->assertSame($view, $form->createView($parentView)); + } + + public function testFormCanHaveEmptyName() + { + $form = $this->getBuilder('')->getForm(); + + $this->assertEquals('', $form->getName()); + } + + public function testSetNullParentWorksWithEmptyName() + { + $form = $this->getBuilder('')->getForm(); + $form->setParent(null); + + $this->assertNull($form->getParent()); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\LogicException + * @expectedExceptionMessage A form with an empty name cannot have a parent form. + */ + public function testFormCannotHaveEmptyNameNotInRootLevel() + { + $this->getBuilder() + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->add($this->getBuilder('')) + ->getForm(); + } + + public function testGetPropertyPathReturnsConfiguredPath() + { + $form = $this->getBuilder()->setPropertyPath('address.street')->getForm(); + + $this->assertEquals(new PropertyPath('address.street'), $form->getPropertyPath()); + } + + // see https://github.com/symfony/symfony/issues/3903 + public function testGetPropertyPathDefaultsToNameIfParentHasDataClass() + { + $parent = $this->getBuilder(null, null, 'stdClass') + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + $form = $this->getBuilder('name')->getForm(); + $parent->add($form); + + $this->assertEquals(new PropertyPath('name'), $form->getPropertyPath()); + } + + // see https://github.com/symfony/symfony/issues/3903 + public function testGetPropertyPathDefaultsToIndexedNameIfParentDataClassIsNull() + { + $parent = $this->getBuilder() + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + $form = $this->getBuilder('name')->getForm(); + $parent->add($form); + + $this->assertEquals(new PropertyPath('[name]'), $form->getPropertyPath()); + } + + public function testGetPropertyPathDefaultsToNameIfFirstParentWithoutInheritDataHasDataClass() + { + $grandParent = $this->getBuilder(null, null, 'stdClass') + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + $parent = $this->getBuilder() + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->setInheritData(true) + ->getForm(); + $form = $this->getBuilder('name')->getForm(); + $grandParent->add($parent); + $parent->add($form); + + $this->assertEquals(new PropertyPath('name'), $form->getPropertyPath()); + } + + public function testGetPropertyPathDefaultsToIndexedNameIfDataClassOfFirstParentWithoutInheritDataIsNull() + { + $grandParent = $this->getBuilder() + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->getForm(); + $parent = $this->getBuilder() + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->setInheritData(true) + ->getForm(); + $form = $this->getBuilder('name')->getForm(); + $grandParent->add($parent); + $parent->add($form); + + $this->assertEquals(new PropertyPath('[name]'), $form->getPropertyPath()); + } + + public function testViewDataMayBeObjectIfDataClassIsNull() + { + $object = new \stdClass(); + $config = new FormConfigBuilder('name', null, $this->dispatcher); + $config->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'foo' => $object, + ))); + $form = new Form($config); + + $form->setData('foo'); + + $this->assertSame($object, $form->getViewData()); + } + + public function testViewDataMayBeArrayAccessIfDataClassIsNull() + { + $arrayAccess = $this->getMockBuilder('\ArrayAccess')->getMock(); + $config = new FormConfigBuilder('name', null, $this->dispatcher); + $config->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'foo' => $arrayAccess, + ))); + $form = new Form($config); + + $form->setData('foo'); + + $this->assertSame($arrayAccess, $form->getViewData()); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\LogicException + */ + public function testViewDataMustBeObjectIfDataClassIsSet() + { + $config = new FormConfigBuilder('name', 'stdClass', $this->dispatcher); + $config->addViewTransformer(new FixedDataTransformer(array( + '' => '', + 'foo' => array('bar' => 'baz'), + ))); + $form = new Form($config); + + $form->setData('foo'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\RuntimeException + */ + public function testSetDataCannotInvokeItself() + { + // Cycle detection to prevent endless loops + $config = new FormConfigBuilder('name', 'stdClass', $this->dispatcher); + $config->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { + $event->getForm()->setData('bar'); + }); + $form = new Form($config); + + $form->setData('foo'); + } + + public function testSubmittingWrongDataIsIgnored() + { + $child = $this->getBuilder('child', $this->dispatcher); + $child->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { + // child form doesn't receive the wrong data that is submitted on parent + $this->assertNull($event->getData()); + }); + + $parent = $this->getBuilder('parent', new EventDispatcher()) + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->add($child) + ->getForm(); + + $parent->submit('not-an-array'); + } + + public function testHandleRequestForwardsToRequestHandler() + { + $handler = $this->getMockBuilder('Symfony\Component\Form\RequestHandlerInterface')->getMock(); + + $form = $this->getBuilder() + ->setRequestHandler($handler) + ->getForm(); + + $handler->expects($this->once()) + ->method('handleRequest') + ->with($this->identicalTo($form), 'REQUEST'); + + $this->assertSame($form, $form->handleRequest('REQUEST')); + } + + public function testFormInheritsParentData() + { + $child = $this->getBuilder('child') + ->setInheritData(true); + + $parent = $this->getBuilder('parent') + ->setCompound(true) + ->setDataMapper($this->getDataMapper()) + ->setData('foo') + ->addModelTransformer(new FixedDataTransformer(array( + 'foo' => 'norm[foo]', + ))) + ->addViewTransformer(new FixedDataTransformer(array( + 'norm[foo]' => 'view[foo]', + ))) + ->add($child) + ->getForm(); + + $this->assertSame('foo', $parent->get('child')->getData()); + $this->assertSame('norm[foo]', $parent->get('child')->getNormData()); + $this->assertSame('view[foo]', $parent->get('child')->getViewData()); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\RuntimeException + */ + public function testInheritDataDisallowsSetData() + { + $form = $this->getBuilder() + ->setInheritData(true) + ->getForm(); + + $form->setData('foo'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\RuntimeException + */ + public function testGetDataRequiresParentToBeSetIfInheritData() + { + $form = $this->getBuilder() + ->setInheritData(true) + ->getForm(); + + $form->getData(); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\RuntimeException + */ + public function testGetNormDataRequiresParentToBeSetIfInheritData() + { + $form = $this->getBuilder() + ->setInheritData(true) + ->getForm(); + + $form->getNormData(); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\RuntimeException + */ + public function testGetViewDataRequiresParentToBeSetIfInheritData() + { + $form = $this->getBuilder() + ->setInheritData(true) + ->getForm(); + + $form->getViewData(); + } + + public function testPostSubmitDataIsNullIfInheritData() + { + $form = $this->getBuilder() + ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { + $this->assertNull($event->getData()); + }) + ->setInheritData(true) + ->getForm(); + + $form->submit('foo'); + } + + public function testSubmitIsNeverFiredIfInheritData() + { + $form = $this->getBuilder() + ->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) { + $this->fail('The SUBMIT event should not be fired'); + }) + ->setInheritData(true) + ->getForm(); + + $form->submit('foo'); + } + + public function testInitializeSetsDefaultData() + { + $config = $this->getBuilder()->setData('DEFAULT')->getFormConfig(); + $form = $this->getMockBuilder('Symfony\Component\Form\Form')->setMethods(array('setData'))->setConstructorArgs(array($config))->getMock(); + + $form->expects($this->once()) + ->method('setData') + ->with($this->identicalTo('DEFAULT')); + + /* @var Form $form */ + $form->initialize(); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\RuntimeException + */ + public function testInitializeFailsIfParent() + { + $parent = $this->getBuilder()->setRequired(false)->getForm(); + $child = $this->getBuilder()->setRequired(true)->getForm(); + + $child->setParent($parent); + + $child->initialize(); + } + + protected function createForm() + { + return $this->getBuilder()->getForm(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4328919651efaf29602be86c4d10903141e5182e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php @@ -0,0 +1,488 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Util\OrderedHashMap; + +/** + * @author Bernhard Schussek + */ +class OrderedHashMapTest extends TestCase +{ + public function testGet() + { + $map = new OrderedHashMap(); + $map['first'] = 1; + + $this->assertSame(1, $map['first']); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testGetNonExistingFails() + { + $map = new OrderedHashMap(); + + $map['first']; + } + + public function testInsertStringKeys() + { + $map = new OrderedHashMap(); + $map['first'] = 1; + $map['second'] = 2; + + $this->assertSame(array('first' => 1, 'second' => 2), iterator_to_array($map)); + } + + public function testInsertNullKeys() + { + $map = new OrderedHashMap(); + $map[] = 1; + $map['foo'] = 2; + $map[] = 3; + + $this->assertSame(array(0 => 1, 'foo' => 2, 1 => 3), iterator_to_array($map)); + } + + /** + * Updates should not change the position of an element, otherwise we could + * turn foreach loops into endless loops if they change the current + * element. + * + * foreach ($map as $index => $value) { + * $map[$index] = $value + 1; + * } + * + * And we don't want this, right? :) + */ + public function testUpdateDoesNotChangeElementPosition() + { + $map = new OrderedHashMap(); + $map['first'] = 1; + $map['second'] = 2; + $map['first'] = 1; + + $this->assertSame(array('first' => 1, 'second' => 2), iterator_to_array($map)); + } + + public function testIsset() + { + $map = new OrderedHashMap(); + $map['first'] = 1; + + $this->assertTrue(isset($map['first'])); + } + + public function testIssetReturnsFalseForNonExisting() + { + $map = new OrderedHashMap(); + + $this->assertFalse(isset($map['first'])); + } + + public function testIssetReturnsFalseForNull() + { + $map = new OrderedHashMap(); + $map['first'] = null; + + $this->assertFalse(isset($map['first'])); + } + + public function testUnset() + { + $map = new OrderedHashMap(); + $map['first'] = 1; + $map['second'] = 2; + + unset($map['first']); + + $this->assertSame(array('second' => 2), iterator_to_array($map)); + } + + public function testUnsetNonExistingSucceeds() + { + $map = new OrderedHashMap(); + + unset($map['first']); + } + + public function testEmptyIteration() + { + $map = new OrderedHashMap(); + $it = $map->getIterator(); + + $it->rewind(); + $this->assertFalse($it->valid()); + $this->assertNull($it->key()); + $this->assertNull($it->current()); + } + + public function testIterationSupportsInsertion() + { + $map = new OrderedHashMap(array('first' => 1)); + $it = $map->getIterator(); + + $it->rewind(); + $this->assertTrue($it->valid()); + $this->assertSame('first', $it->key()); + $this->assertSame(1, $it->current()); + + // dynamic modification + $map['added'] = 2; + + // iterator is unchanged + $this->assertTrue($it->valid()); + $this->assertSame('first', $it->key()); + $this->assertSame(1, $it->current()); + + // continue iteration + $it->next(); + $this->assertTrue($it->valid()); + $this->assertSame('added', $it->key()); + $this->assertSame(2, $it->current()); + + // end of map + $it->next(); + $this->assertFalse($it->valid()); + $this->assertNull($it->key()); + $this->assertNull($it->current()); + } + + public function testIterationSupportsDeletionAndInsertion() + { + $map = new OrderedHashMap(array('first' => 1, 'removed' => 2)); + $it = $map->getIterator(); + + $it->rewind(); + $this->assertTrue($it->valid()); + $this->assertSame('first', $it->key()); + $this->assertSame(1, $it->current()); + + // dynamic modification + unset($map['removed']); + $map['added'] = 3; + + // iterator is unchanged + $this->assertTrue($it->valid()); + $this->assertSame('first', $it->key()); + $this->assertSame(1, $it->current()); + + // continue iteration + $it->next(); + $this->assertTrue($it->valid()); + $this->assertSame('added', $it->key()); + $this->assertSame(3, $it->current()); + + // end of map + $it->next(); + $this->assertFalse($it->valid()); + $this->assertNull($it->key()); + $this->assertNull($it->current()); + } + + public function testIterationSupportsDeletionOfCurrentElement() + { + $map = new OrderedHashMap(array('removed' => 1, 'next' => 2)); + $it = $map->getIterator(); + + $it->rewind(); + $this->assertTrue($it->valid()); + $this->assertSame('removed', $it->key()); + $this->assertSame(1, $it->current()); + + unset($map['removed']); + + // iterator is unchanged + $this->assertTrue($it->valid()); + $this->assertSame('removed', $it->key()); + $this->assertSame(1, $it->current()); + + // continue iteration + $it->next(); + $this->assertTrue($it->valid()); + $this->assertSame('next', $it->key()); + $this->assertSame(2, $it->current()); + + // end of map + $it->next(); + $this->assertFalse($it->valid()); + $this->assertNull($it->key()); + $this->assertNull($it->current()); + } + + public function testIterationIgnoresReplacementOfCurrentElement() + { + $map = new OrderedHashMap(array('replaced' => 1, 'next' => 2)); + $it = $map->getIterator(); + + $it->rewind(); + $this->assertTrue($it->valid()); + $this->assertSame('replaced', $it->key()); + $this->assertSame(1, $it->current()); + + $map['replaced'] = 3; + + // iterator is unchanged + $this->assertTrue($it->valid()); + $this->assertSame('replaced', $it->key()); + $this->assertSame(1, $it->current()); + + // continue iteration + $it->next(); + $this->assertTrue($it->valid()); + $this->assertSame('next', $it->key()); + $this->assertSame(2, $it->current()); + + // end of map + $it->next(); + $this->assertFalse($it->valid()); + $this->assertNull($it->key()); + $this->assertNull($it->current()); + } + + public function testIterationSupportsDeletionOfCurrentAndLastElement() + { + $map = new OrderedHashMap(array('removed' => 1)); + $it = $map->getIterator(); + + $it->rewind(); + $this->assertTrue($it->valid()); + $this->assertSame('removed', $it->key()); + $this->assertSame(1, $it->current()); + + unset($map['removed']); + + // iterator is unchanged + $this->assertTrue($it->valid()); + $this->assertSame('removed', $it->key()); + $this->assertSame(1, $it->current()); + + // end of map + $it->next(); + $this->assertFalse($it->valid()); + $this->assertNull($it->key()); + $this->assertNull($it->current()); + } + + public function testIterationIgnoresReplacementOfCurrentAndLastElement() + { + $map = new OrderedHashMap(array('replaced' => 1)); + $it = $map->getIterator(); + + $it->rewind(); + $this->assertTrue($it->valid()); + $this->assertSame('replaced', $it->key()); + $this->assertSame(1, $it->current()); + + $map['replaced'] = 2; + + // iterator is unchanged + $this->assertTrue($it->valid()); + $this->assertSame('replaced', $it->key()); + $this->assertSame(1, $it->current()); + + // end of map + $it->next(); + $this->assertFalse($it->valid()); + $this->assertNull($it->key()); + $this->assertNull($it->current()); + } + + public function testIterationSupportsDeletionOfPreviousElement() + { + $map = new OrderedHashMap(array('removed' => 1, 'next' => 2, 'onemore' => 3)); + $it = $map->getIterator(); + + $it->rewind(); + $this->assertTrue($it->valid()); + $this->assertSame('removed', $it->key()); + $this->assertSame(1, $it->current()); + + // continue iteration + $it->next(); + $this->assertTrue($it->valid()); + $this->assertSame('next', $it->key()); + $this->assertSame(2, $it->current()); + + unset($map['removed']); + + // iterator is unchanged + $this->assertTrue($it->valid()); + $this->assertSame('next', $it->key()); + $this->assertSame(2, $it->current()); + + // continue iteration + $it->next(); + $this->assertTrue($it->valid()); + $this->assertSame('onemore', $it->key()); + $this->assertSame(3, $it->current()); + + // end of map + $it->next(); + $this->assertFalse($it->valid()); + $this->assertNull($it->key()); + $this->assertNull($it->current()); + } + + public function testIterationIgnoresReplacementOfPreviousElement() + { + $map = new OrderedHashMap(array('replaced' => 1, 'next' => 2, 'onemore' => 3)); + $it = $map->getIterator(); + + $it->rewind(); + $this->assertTrue($it->valid()); + $this->assertSame('replaced', $it->key()); + $this->assertSame(1, $it->current()); + + // continue iteration + $it->next(); + $this->assertTrue($it->valid()); + $this->assertSame('next', $it->key()); + $this->assertSame(2, $it->current()); + + $map['replaced'] = 4; + + // iterator is unchanged + $this->assertTrue($it->valid()); + $this->assertSame('next', $it->key()); + $this->assertSame(2, $it->current()); + + // continue iteration + $it->next(); + $this->assertTrue($it->valid()); + $this->assertSame('onemore', $it->key()); + $this->assertSame(3, $it->current()); + + // end of map + $it->next(); + $this->assertFalse($it->valid()); + $this->assertNull($it->key()); + $this->assertNull($it->current()); + } + + public function testIterationSupportsDeletionOfMultiplePreviousElements() + { + $map = new OrderedHashMap(array('removed' => 1, 'alsoremoved' => 2, 'next' => 3, 'onemore' => 4)); + $it = $map->getIterator(); + + $it->rewind(); + $this->assertTrue($it->valid()); + $this->assertSame('removed', $it->key()); + $this->assertSame(1, $it->current()); + + // continue iteration + $it->next(); + $this->assertTrue($it->valid()); + $this->assertSame('alsoremoved', $it->key()); + $this->assertSame(2, $it->current()); + + // continue iteration + $it->next(); + $this->assertTrue($it->valid()); + $this->assertSame('next', $it->key()); + $this->assertSame(3, $it->current()); + + unset($map['removed'], $map['alsoremoved']); + + // iterator is unchanged + $this->assertTrue($it->valid()); + $this->assertSame('next', $it->key()); + $this->assertSame(3, $it->current()); + + // continue iteration + $it->next(); + $this->assertTrue($it->valid()); + $this->assertSame('onemore', $it->key()); + $this->assertSame(4, $it->current()); + + // end of map + $it->next(); + $this->assertFalse($it->valid()); + $this->assertNull($it->key()); + $this->assertNull($it->current()); + } + + public function testParallelIteration() + { + $map = new OrderedHashMap(array('first' => 1, 'second' => 2)); + $it1 = $map->getIterator(); + $it2 = $map->getIterator(); + + $it1->rewind(); + $this->assertTrue($it1->valid()); + $this->assertSame('first', $it1->key()); + $this->assertSame(1, $it1->current()); + + $it2->rewind(); + $this->assertTrue($it2->valid()); + $this->assertSame('first', $it2->key()); + $this->assertSame(1, $it2->current()); + + // 1: continue iteration + $it1->next(); + $this->assertTrue($it1->valid()); + $this->assertSame('second', $it1->key()); + $this->assertSame(2, $it1->current()); + + // 2: remains unchanged + $this->assertTrue($it2->valid()); + $this->assertSame('first', $it2->key()); + $this->assertSame(1, $it2->current()); + + // 1: advance to end of map + $it1->next(); + $this->assertFalse($it1->valid()); + $this->assertNull($it1->key()); + $this->assertNull($it1->current()); + + // 2: remains unchanged + $this->assertTrue($it2->valid()); + $this->assertSame('first', $it2->key()); + $this->assertSame(1, $it2->current()); + + // 2: continue iteration + $it2->next(); + $this->assertTrue($it2->valid()); + $this->assertSame('second', $it2->key()); + $this->assertSame(2, $it2->current()); + + // 1: remains unchanged + $this->assertFalse($it1->valid()); + $this->assertNull($it1->key()); + $this->assertNull($it1->current()); + + // 2: advance to end of map + $it2->next(); + $this->assertFalse($it2->valid()); + $this->assertNull($it2->key()); + $this->assertNull($it2->current()); + + // 1: remains unchanged + $this->assertFalse($it1->valid()); + $this->assertNull($it1->key()); + $this->assertNull($it1->current()); + } + + public function testCount() + { + $map = new OrderedHashMap(); + $map[] = 1; + $map['foo'] = 2; + unset($map[0]); + $map[] = 3; + + $this->assertCount(2, $map); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2103fa40e55d0a1b5e8ed096c8e970f261756fae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php @@ -0,0 +1,105 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Util\StringUtil; + +class StringUtilTest extends TestCase +{ + public function testTrim() + { + $data = ' Foo! '; + + $this->assertEquals('Foo!', StringUtil::trim($data)); + } + + /** + * @dataProvider spaceProvider + */ + public function testTrimUtf8Separators($hex) + { + // Convert hexadecimal representation into binary + // H: hex string, high nibble first (UCS-2BE) + // *: repeat until end of string + $binary = pack('H*', $hex); + + // Convert UCS-2BE to UTF-8 + $symbol = mb_convert_encoding($binary, 'UTF-8', 'UCS-2BE'); + $symbol = $symbol."ab\ncd".$symbol; + + $this->assertSame("ab\ncd", StringUtil::trim($symbol)); + } + + public function spaceProvider() + { + return array( + // separators + array('0020'), + array('00A0'), + array('1680'), +// array('180E'), + array('2000'), + array('2001'), + array('2002'), + array('2003'), + array('2004'), + array('2005'), + array('2006'), + array('2007'), + array('2008'), + array('2009'), + array('200A'), + array('2028'), + array('2029'), + array('202F'), + array('205F'), + array('3000'), + // controls + array('0009'), + array('000A'), + array('000B'), + array('000C'), + array('000D'), + array('0085'), + // zero width space +// array('200B'), + ); + } + + /** + * @dataProvider fqcnToBlockPrefixProvider + */ + public function testFqcnToBlockPrefix($fqcn, $expectedBlockPrefix) + { + $blockPrefix = StringUtil::fqcnToBlockPrefix($fqcn); + + $this->assertSame($expectedBlockPrefix, $blockPrefix); + } + + public function fqcnToBlockPrefixProvider() + { + return array( + array('TYPE', 'type'), + array('\Type', 'type'), + array('\UserType', 'user'), + array('UserType', 'user'), + array('Vendor\Name\Space\Type', 'type'), + array('Vendor\Name\Space\UserForm', 'user_form'), + array('Vendor\Name\Space\UserType', 'user'), + array('Vendor\Name\Space\usertype', 'user'), + array('Symfony\Component\Form\Form', 'form'), + array('Vendor\Name\Space\BarTypeBazType', 'bar_type_baz'), + array('FooBarBazType', 'foo_bar_baz'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Util/FormUtil.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Util/FormUtil.php new file mode 100644 index 0000000000000000000000000000000000000000..0862179f545c198af847efe8245b539402f0f9b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Util/FormUtil.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Util; + +/** + * @author Bernhard Schussek + */ +class FormUtil +{ + /** + * This class should not be instantiated. + */ + private function __construct() + { + } + + /** + * Returns whether the given data is empty. + * + * This logic is reused multiple times throughout the processing of + * a form and needs to be consistent. PHP's keyword `empty` cannot + * be used as it also considers 0 and "0" to be empty. + * + * @param mixed $data + * + * @return bool + */ + public static function isEmpty($data) + { + // Should not do a check for array() === $data!!! + // This method is used in occurrences where arrays are + // not considered to be empty, ever. + return null === $data || '' === $data; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php new file mode 100644 index 0000000000000000000000000000000000000000..a320344997fa9da4d8a8fbe65630f4ab651aad8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Util/InheritDataAwareIterator.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\Component\Form\Util; + +/** + * Iterator that traverses an array of forms. + * + * Contrary to \ArrayIterator, this iterator recognizes changes in the original + * array during iteration. + * + * You can wrap the iterator into a {@link \RecursiveIterator} in order to + * enter any child form that inherits its parent's data and iterate the children + * of that form as well. + * + * @author Bernhard Schussek + */ +class InheritDataAwareIterator extends \IteratorIterator implements \RecursiveIterator +{ + /** + * {@inheritdoc} + */ + public function getChildren() + { + return new static($this->current()); + } + + /** + * {@inheritdoc} + */ + public function hasChildren() + { + return (bool) $this->current()->getConfig()->getInheritData(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMap.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMap.php new file mode 100644 index 0000000000000000000000000000000000000000..78687032feac6ecb7c74b03de0244f66be2bb840 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMap.php @@ -0,0 +1,174 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Util; + +/** + * A hash map which keeps track of deletions and additions. + * + * Like in associative arrays, elements can be mapped to integer or string keys. + * Unlike associative arrays, the map keeps track of the order in which keys + * were added and removed. This order is reflected during iteration. + * + * The map supports concurrent modification during iteration. That means that + * you can insert and remove elements from within a foreach loop and the + * iterator will reflect those changes accordingly. + * + * While elements that are added during the loop are recognized by the iterator, + * changed elements are not. Otherwise the loop could be infinite if each loop + * changes the current element: + * + * $map = new OrderedHashMap(); + * $map[1] = 1; + * $map[2] = 2; + * $map[3] = 3; + * + * foreach ($map as $index => $value) { + * echo "$index: $value\n" + * if (1 === $index) { + * $map[1] = 4; + * $map[] = 5; + * } + * } + * + * print_r(iterator_to_array($map)); + * + * // => 1: 1 + * // 2: 2 + * // 3: 3 + * // 4: 5 + * // Array + * // ( + * // [1] => 4 + * // [2] => 2 + * // [3] => 3 + * // [4] => 5 + * // ) + * + * The map also supports multiple parallel iterators. That means that you can + * nest foreach loops without affecting each other's iteration: + * + * foreach ($map as $index => $value) { + * foreach ($map as $index2 => $value2) { + * // ... + * } + * } + * + * @author Bernhard Schussek + */ +class OrderedHashMap implements \ArrayAccess, \IteratorAggregate, \Countable +{ + /** + * The elements of the map, indexed by their keys. + * + * @var array + */ + private $elements = array(); + + /** + * The keys of the map in the order in which they were inserted or changed. + * + * @var array + */ + private $orderedKeys = array(); + + /** + * References to the cursors of all open iterators. + * + * @var array + */ + private $managedCursors = array(); + + /** + * Creates a new map. + * + * @param array $elements The elements to insert initially + */ + public function __construct(array $elements = array()) + { + $this->elements = $elements; + $this->orderedKeys = array_keys($elements); + } + + /** + * {@inheritdoc} + */ + public function offsetExists($key) + { + return isset($this->elements[$key]); + } + + /** + * {@inheritdoc} + */ + public function offsetGet($key) + { + if (!isset($this->elements[$key])) { + throw new \OutOfBoundsException('The offset "'.$key.'" does not exist.'); + } + + return $this->elements[$key]; + } + + /** + * {@inheritdoc} + */ + public function offsetSet($key, $value) + { + if (null === $key || !isset($this->elements[$key])) { + if (null === $key) { + $key = array() === $this->orderedKeys + // If the array is empty, use 0 as key + ? 0 + // Imitate PHP's behavior of generating a key that equals + // the highest existing integer key + 1 + : 1 + (int) max($this->orderedKeys); + } + + $this->orderedKeys[] = $key; + } + + $this->elements[$key] = $value; + } + + /** + * {@inheritdoc} + */ + public function offsetUnset($key) + { + if (false !== ($position = array_search($key, $this->orderedKeys))) { + array_splice($this->orderedKeys, $position, 1); + unset($this->elements[$key]); + + foreach ($this->managedCursors as $i => $cursor) { + if ($cursor >= $position) { + --$this->managedCursors[$i]; + } + } + } + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + return new OrderedHashMapIterator($this->elements, $this->orderedKeys, $this->managedCursors); + } + + /** + * {@inheritdoc} + */ + public function count() + { + return count($this->elements); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php new file mode 100644 index 0000000000000000000000000000000000000000..534d74ea6f0e419fe05a686ff103e437e5e20f52 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php @@ -0,0 +1,147 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Util; + +/** + * Iterator for {@link OrderedHashMap} objects. + * + * @author Bernhard Schussek + * + * @internal + */ +class OrderedHashMapIterator implements \Iterator +{ + /** + * @var array + */ + private $elements; + + /** + * @var array + */ + private $orderedKeys; + + /** + * @var int + */ + private $cursor; + + /** + * @var int + */ + private $cursorId; + + /** + * @var array + */ + private $managedCursors; + + /** + * @var string|int|null + */ + private $key; + + /** + * @var mixed + */ + private $current; + + /** + * Creates a new iterator. + * + * @param array $elements The elements of the map, indexed by their + * keys. + * @param array $orderedKeys The keys of the map in the order in which + * they should be iterated. + * @param array $managedCursors An array from which to reference the + * iterator's cursor as long as it is alive. + * This array is managed by the corresponding + * {@link OrderedHashMap} instance to support + * recognizing the deletion of elements. + */ + public function __construct(array &$elements, array &$orderedKeys, array &$managedCursors) + { + $this->elements = &$elements; + $this->orderedKeys = &$orderedKeys; + $this->managedCursors = &$managedCursors; + $this->cursorId = count($managedCursors); + + $this->managedCursors[$this->cursorId] = &$this->cursor; + } + + /** + * Removes the iterator's cursors from the managed cursors of the + * corresponding {@link OrderedHashMap} instance. + */ + public function __destruct() + { + // Use array_splice() instead of isset() to prevent holes in the + // array indices, which would break the initialization of $cursorId + array_splice($this->managedCursors, $this->cursorId, 1); + } + + /** + * {@inheritdoc} + */ + public function current() + { + return $this->current; + } + + /** + * {@inheritdoc} + */ + public function next() + { + ++$this->cursor; + + if (isset($this->orderedKeys[$this->cursor])) { + $this->key = $this->orderedKeys[$this->cursor]; + $this->current = $this->elements[$this->key]; + } else { + $this->key = null; + $this->current = null; + } + } + + /** + * {@inheritdoc} + */ + public function key() + { + return $this->key; + } + + /** + * {@inheritdoc} + */ + public function valid() + { + return null !== $this->key; + } + + /** + * {@inheritdoc} + */ + public function rewind() + { + $this->cursor = 0; + + if (isset($this->orderedKeys[0])) { + $this->key = $this->orderedKeys[0]; + $this->current = $this->elements[$this->key]; + } else { + $this->key = null; + $this->current = null; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Util/ServerParams.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Util/ServerParams.php new file mode 100644 index 0000000000000000000000000000000000000000..b9f5aaff557d68f3f278ff25e3c17bf56d93f5a9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Util/ServerParams.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Util; + +use Symfony\Component\HttpFoundation\RequestStack; + +/** + * @author Bernhard Schussek + */ +class ServerParams +{ + private $requestStack; + + public function __construct(RequestStack $requestStack = null) + { + $this->requestStack = $requestStack; + } + + /** + * Returns true if the POST max size has been exceeded in the request. + * + * @return bool + */ + public function hasPostMaxSizeBeenExceeded() + { + $contentLength = $this->getContentLength(); + $maxContentLength = $this->getPostMaxSize(); + + return $maxContentLength && $contentLength > $maxContentLength; + } + + /** + * Returns maximum post size in bytes. + * + * @return null|int The maximum post size in bytes + */ + public function getPostMaxSize() + { + $iniMax = strtolower($this->getNormalizedIniPostMaxSize()); + + if ('' === $iniMax) { + return; + } + + $max = ltrim($iniMax, '+'); + if (0 === strpos($max, '0x')) { + $max = intval($max, 16); + } elseif (0 === strpos($max, '0')) { + $max = intval($max, 8); + } else { + $max = (int) $max; + } + + switch (substr($iniMax, -1)) { + case 't': $max *= 1024; + case 'g': $max *= 1024; + case 'm': $max *= 1024; + case 'k': $max *= 1024; + } + + return $max; + } + + /** + * Returns the normalized "post_max_size" ini setting. + * + * @return string + */ + public function getNormalizedIniPostMaxSize() + { + return strtoupper(trim(ini_get('post_max_size'))); + } + + /** + * Returns the content length of the request. + * + * @return mixed The request content length + */ + public function getContentLength() + { + if (null !== $this->requestStack && null !== $request = $this->requestStack->getCurrentRequest()) { + return $request->server->get('CONTENT_LENGTH'); + } + + return isset($_SERVER['CONTENT_LENGTH']) + ? (int) $_SERVER['CONTENT_LENGTH'] + : null; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/Util/StringUtil.php b/vendor/symfony/symfony/src/Symfony/Component/Form/Util/StringUtil.php new file mode 100644 index 0000000000000000000000000000000000000000..ee71ae7a52e144895460444533519d704dc88300 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/Util/StringUtil.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Util; + +/** + * @author Issei Murasawa + * @author Bernhard Schussek + */ +class StringUtil +{ + /** + * This class should not be instantiated. + */ + private function __construct() + { + } + + /** + * Returns the trimmed data. + * + * @param string $string + * + * @return string + */ + public static function trim($string) + { + if (null !== $result = @preg_replace('/^[\pZ\p{Cc}]+|[\pZ\p{Cc}]+$/u', '', $string)) { + return $result; + } + + return trim($string); + } + + /** + * Converts a fully-qualified class name to a block prefix. + * + * @param string $fqcn The fully-qualified class name + * + * @return string|null The block prefix or null if not a valid FQCN + */ + public static function fqcnToBlockPrefix($fqcn) + { + // Non-greedy ("+?") to match "type" suffix, if present + if (preg_match('~([^\\\\]+?)(type)?$~i', $fqcn, $matches)) { + return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), $matches[1])); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Form/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..5456f2e082c930370813380ccf4c3e25d8a603ea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/composer.json @@ -0,0 +1,60 @@ +{ + "name": "symfony/form", + "type": "library", + "description": "Symfony Form Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/intl": "^2.8.18|^3.2.5", + "symfony/options-resolver": "~2.8|~3.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/property-access": "~2.8|~3.0" + }, + "require-dev": { + "doctrine/collections": "~1.0", + "symfony/validator": "^2.8.18|^3.2.5", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0", + "symfony/security-csrf": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0", + "symfony/var-dumper": "~3.2" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", + "symfony/doctrine-bridge": "<2.7", + "symfony/framework-bundle": "<2.7", + "symfony/twig-bridge": "<2.7" + }, + "suggest": { + "symfony/validator": "For form validation.", + "symfony/security-csrf": "For protecting forms against CSRF attacks.", + "symfony/twig-bridge": "For templating with Twig.", + "symfony/framework-bundle": "For templating with PHP." + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Form\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Form/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Form/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..1c4acf476238dbbf6294f43adc4bc9102e938ddc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Form/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeader.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeader.php new file mode 100644 index 0000000000000000000000000000000000000000..2aa91dc44cb47d8415d873e10b9b57951191135b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeader.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\Component\HttpFoundation; + +/** + * Represents an Accept-* header. + * + * An accept header is compound with a list of items, + * sorted by descending quality. + * + * @author Jean-François Simon + */ +class AcceptHeader +{ + /** + * @var AcceptHeaderItem[] + */ + private $items = array(); + + /** + * @var bool + */ + private $sorted = true; + + /** + * Constructor. + * + * @param AcceptHeaderItem[] $items + */ + public function __construct(array $items) + { + foreach ($items as $item) { + $this->add($item); + } + } + + /** + * Builds an AcceptHeader instance from a string. + * + * @param string $headerValue + * + * @return self + */ + public static function fromString($headerValue) + { + $index = 0; + + return new self(array_map(function ($itemValue) use (&$index) { + $item = AcceptHeaderItem::fromString($itemValue); + $item->setIndex($index++); + + return $item; + }, preg_split('/\s*(?:,*("[^"]+"),*|,*(\'[^\']+\'),*|,+)\s*/', $headerValue, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE))); + } + + /** + * Returns header value's string representation. + * + * @return string + */ + public function __toString() + { + return implode(',', $this->items); + } + + /** + * Tests if header has given value. + * + * @param string $value + * + * @return bool + */ + public function has($value) + { + return isset($this->items[$value]); + } + + /** + * Returns given value's item, if exists. + * + * @param string $value + * + * @return AcceptHeaderItem|null + */ + public function get($value) + { + return isset($this->items[$value]) ? $this->items[$value] : null; + } + + /** + * Adds an item. + * + * @param AcceptHeaderItem $item + * + * @return $this + */ + public function add(AcceptHeaderItem $item) + { + $this->items[$item->getValue()] = $item; + $this->sorted = false; + + return $this; + } + + /** + * Returns all items. + * + * @return AcceptHeaderItem[] + */ + public function all() + { + $this->sort(); + + return $this->items; + } + + /** + * Filters items on their value using given regex. + * + * @param string $pattern + * + * @return self + */ + public function filter($pattern) + { + return new self(array_filter($this->items, function (AcceptHeaderItem $item) use ($pattern) { + return preg_match($pattern, $item->getValue()); + })); + } + + /** + * Returns first item. + * + * @return AcceptHeaderItem|null + */ + public function first() + { + $this->sort(); + + return !empty($this->items) ? reset($this->items) : null; + } + + /** + * Sorts items by descending quality. + */ + private function sort() + { + if (!$this->sorted) { + uasort($this->items, function ($a, $b) { + $qA = $a->getQuality(); + $qB = $b->getQuality(); + + if ($qA === $qB) { + return $a->getIndex() > $b->getIndex() ? 1 : -1; + } + + return $qA > $qB ? -1 : 1; + }); + + $this->sorted = true; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeaderItem.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeaderItem.php new file mode 100644 index 0000000000000000000000000000000000000000..fb54b4935a9f3e033c80128fd1d95bbe1a777c5b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/AcceptHeaderItem.php @@ -0,0 +1,226 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * Represents an Accept-* header item. + * + * @author Jean-François Simon + */ +class AcceptHeaderItem +{ + /** + * @var string + */ + private $value; + + /** + * @var float + */ + private $quality = 1.0; + + /** + * @var int + */ + private $index = 0; + + /** + * @var array + */ + private $attributes = array(); + + /** + * Constructor. + * + * @param string $value + * @param array $attributes + */ + public function __construct($value, array $attributes = array()) + { + $this->value = $value; + foreach ($attributes as $name => $value) { + $this->setAttribute($name, $value); + } + } + + /** + * Builds an AcceptHeaderInstance instance from a string. + * + * @param string $itemValue + * + * @return self + */ + public static function fromString($itemValue) + { + $bits = preg_split('/\s*(?:;*("[^"]+");*|;*(\'[^\']+\');*|;+)\s*/', $itemValue, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + $value = array_shift($bits); + $attributes = array(); + + $lastNullAttribute = null; + foreach ($bits as $bit) { + if (($start = substr($bit, 0, 1)) === ($end = substr($bit, -1)) && ($start === '"' || $start === '\'')) { + $attributes[$lastNullAttribute] = substr($bit, 1, -1); + } elseif ('=' === $end) { + $lastNullAttribute = $bit = substr($bit, 0, -1); + $attributes[$bit] = null; + } else { + $parts = explode('=', $bit); + $attributes[$parts[0]] = isset($parts[1]) && strlen($parts[1]) > 0 ? $parts[1] : ''; + } + } + + return new self(($start = substr($value, 0, 1)) === ($end = substr($value, -1)) && ($start === '"' || $start === '\'') ? substr($value, 1, -1) : $value, $attributes); + } + + /** + * Returns header value's string representation. + * + * @return string + */ + public function __toString() + { + $string = $this->value.($this->quality < 1 ? ';q='.$this->quality : ''); + if (count($this->attributes) > 0) { + $string .= ';'.implode(';', array_map(function ($name, $value) { + return sprintf(preg_match('/[,;=]/', $value) ? '%s="%s"' : '%s=%s', $name, $value); + }, array_keys($this->attributes), $this->attributes)); + } + + return $string; + } + + /** + * Set the item value. + * + * @param string $value + * + * @return $this + */ + public function setValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * Returns the item value. + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set the item quality. + * + * @param float $quality + * + * @return $this + */ + public function setQuality($quality) + { + $this->quality = $quality; + + return $this; + } + + /** + * Returns the item quality. + * + * @return float + */ + public function getQuality() + { + return $this->quality; + } + + /** + * Set the item index. + * + * @param int $index + * + * @return $this + */ + public function setIndex($index) + { + $this->index = $index; + + return $this; + } + + /** + * Returns the item index. + * + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * Tests if an attribute exists. + * + * @param string $name + * + * @return bool + */ + public function hasAttribute($name) + { + return isset($this->attributes[$name]); + } + + /** + * Returns an attribute by its name. + * + * @param string $name + * @param mixed $default + * + * @return mixed + */ + public function getAttribute($name, $default = null) + { + return isset($this->attributes[$name]) ? $this->attributes[$name] : $default; + } + + /** + * Returns all attributes. + * + * @return array + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Set an attribute. + * + * @param string $name + * @param string $value + * + * @return $this + */ + public function setAttribute($name, $value) + { + if ('q' === $name) { + $this->quality = (float) $value; + } else { + $this->attributes[$name] = (string) $value; + } + + return $this; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ApacheRequest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ApacheRequest.php new file mode 100644 index 0000000000000000000000000000000000000000..84803ebae28fdca5f79f93934317d50ae9109c3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ApacheRequest.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\Component\HttpFoundation; + +/** + * Request represents an HTTP request from an Apache server. + * + * @author Fabien Potencier + */ +class ApacheRequest extends Request +{ + /** + * {@inheritdoc} + */ + protected function prepareRequestUri() + { + return $this->server->get('REQUEST_URI'); + } + + /** + * {@inheritdoc} + */ + protected function prepareBaseUrl() + { + $baseUrl = $this->server->get('SCRIPT_NAME'); + + if (false === strpos($this->server->get('REQUEST_URI'), $baseUrl)) { + // assume mod_rewrite + return rtrim(dirname($baseUrl), '/\\'); + } + + return $baseUrl; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php new file mode 100644 index 0000000000000000000000000000000000000000..0314621907356219f8a7e551c5e24f02a3f1100c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php @@ -0,0 +1,359 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +use Symfony\Component\HttpFoundation\File\File; +use Symfony\Component\HttpFoundation\File\Exception\FileException; + +/** + * BinaryFileResponse represents an HTTP response delivering a file. + * + * @author Niklas Fiekas + * @author stealth35 + * @author Igor Wiedler + * @author Jordan Alliot + * @author Sergey Linnik + */ +class BinaryFileResponse extends Response +{ + protected static $trustXSendfileTypeHeader = false; + + /** + * @var File + */ + protected $file; + protected $offset; + protected $maxlen; + protected $deleteFileAfterSend = false; + + /** + * Constructor. + * + * @param \SplFileInfo|string $file The file to stream + * @param int $status The response status code + * @param array $headers An array of response headers + * @param bool $public Files are public by default + * @param null|string $contentDisposition The type of Content-Disposition to set automatically with the filename + * @param bool $autoEtag Whether the ETag header should be automatically set + * @param bool $autoLastModified Whether the Last-Modified header should be automatically set + */ + public function __construct($file, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) + { + parent::__construct(null, $status, $headers); + + $this->setFile($file, $contentDisposition, $autoEtag, $autoLastModified); + + if ($public) { + $this->setPublic(); + } + } + + /** + * @param \SplFileInfo|string $file The file to stream + * @param int $status The response status code + * @param array $headers An array of response headers + * @param bool $public Files are public by default + * @param null|string $contentDisposition The type of Content-Disposition to set automatically with the filename + * @param bool $autoEtag Whether the ETag header should be automatically set + * @param bool $autoLastModified Whether the Last-Modified header should be automatically set + * + * @return static + */ + public static function create($file = null, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) + { + return new static($file, $status, $headers, $public, $contentDisposition, $autoEtag, $autoLastModified); + } + + /** + * Sets the file to stream. + * + * @param \SplFileInfo|string $file The file to stream + * @param string $contentDisposition + * @param bool $autoEtag + * @param bool $autoLastModified + * + * @return $this + * + * @throws FileException + */ + public function setFile($file, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) + { + if (!$file instanceof File) { + if ($file instanceof \SplFileInfo) { + $file = new File($file->getPathname()); + } else { + $file = new File((string) $file); + } + } + + if (!$file->isReadable()) { + throw new FileException('File must be readable.'); + } + + $this->file = $file; + + if ($autoEtag) { + $this->setAutoEtag(); + } + + if ($autoLastModified) { + $this->setAutoLastModified(); + } + + if ($contentDisposition) { + $this->setContentDisposition($contentDisposition); + } + + return $this; + } + + /** + * Gets the file. + * + * @return File The file to stream + */ + public function getFile() + { + return $this->file; + } + + /** + * Automatically sets the Last-Modified header according the file modification date. + */ + public function setAutoLastModified() + { + $this->setLastModified(\DateTime::createFromFormat('U', $this->file->getMTime())); + + return $this; + } + + /** + * Automatically sets the ETag header according to the checksum of the file. + */ + public function setAutoEtag() + { + $this->setEtag(sha1_file($this->file->getPathname())); + + return $this; + } + + /** + * Sets the Content-Disposition header with the given filename. + * + * @param string $disposition ResponseHeaderBag::DISPOSITION_INLINE or ResponseHeaderBag::DISPOSITION_ATTACHMENT + * @param string $filename Optionally use this filename instead of the real name of the file + * @param string $filenameFallback A fallback filename, containing only ASCII characters. Defaults to an automatically encoded filename + * + * @return $this + */ + public function setContentDisposition($disposition, $filename = '', $filenameFallback = '') + { + if ($filename === '') { + $filename = $this->file->getFilename(); + } + + if ('' === $filenameFallback && (!preg_match('/^[\x20-\x7e]*$/', $filename) || false !== strpos($filename, '%'))) { + $encoding = mb_detect_encoding($filename, null, true); + + for ($i = 0, $filenameLength = mb_strlen($filename, $encoding); $i < $filenameLength; ++$i) { + $char = mb_substr($filename, $i, 1, $encoding); + + if ('%' === $char || ord($char) < 32 || ord($char) > 126) { + $filenameFallback .= '_'; + } else { + $filenameFallback .= $char; + } + } + } + + $dispositionHeader = $this->headers->makeDisposition($disposition, $filename, $filenameFallback); + $this->headers->set('Content-Disposition', $dispositionHeader); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function prepare(Request $request) + { + $this->headers->set('Content-Length', $this->file->getSize()); + + if (!$this->headers->has('Accept-Ranges')) { + // Only accept ranges on safe HTTP methods + $this->headers->set('Accept-Ranges', $request->isMethodSafe(false) ? 'bytes' : 'none'); + } + + if (!$this->headers->has('Content-Type')) { + $this->headers->set('Content-Type', $this->file->getMimeType() ?: 'application/octet-stream'); + } + + if ('HTTP/1.0' !== $request->server->get('SERVER_PROTOCOL')) { + $this->setProtocolVersion('1.1'); + } + + $this->ensureIEOverSSLCompatibility($request); + + $this->offset = 0; + $this->maxlen = -1; + + if (self::$trustXSendfileTypeHeader && $request->headers->has('X-Sendfile-Type')) { + // Use X-Sendfile, do not send any content. + $type = $request->headers->get('X-Sendfile-Type'); + $path = $this->file->getRealPath(); + // Fall back to scheme://path for stream wrapped locations. + if (false === $path) { + $path = $this->file->getPathname(); + } + if (strtolower($type) === 'x-accel-redirect') { + // Do X-Accel-Mapping substitutions. + // @link http://wiki.nginx.org/X-accel#X-Accel-Redirect + foreach (explode(',', $request->headers->get('X-Accel-Mapping', '')) as $mapping) { + $mapping = explode('=', $mapping, 2); + + if (2 === count($mapping)) { + $pathPrefix = trim($mapping[0]); + $location = trim($mapping[1]); + + if (substr($path, 0, strlen($pathPrefix)) === $pathPrefix) { + $path = $location.substr($path, strlen($pathPrefix)); + break; + } + } + } + } + $this->headers->set($type, $path); + $this->maxlen = 0; + } elseif ($request->headers->has('Range')) { + // Process the range headers. + if (!$request->headers->has('If-Range') || $this->hasValidIfRangeHeader($request->headers->get('If-Range'))) { + $range = $request->headers->get('Range'); + $fileSize = $this->file->getSize(); + + list($start, $end) = explode('-', substr($range, 6), 2) + array(0); + + $end = ('' === $end) ? $fileSize - 1 : (int) $end; + + if ('' === $start) { + $start = $fileSize - $end; + $end = $fileSize - 1; + } else { + $start = (int) $start; + } + + if ($start <= $end) { + if ($start < 0 || $end > $fileSize - 1) { + $this->setStatusCode(416); + $this->headers->set('Content-Range', sprintf('bytes */%s', $fileSize)); + } elseif ($start !== 0 || $end !== $fileSize - 1) { + $this->maxlen = $end < $fileSize ? $end - $start + 1 : -1; + $this->offset = $start; + + $this->setStatusCode(206); + $this->headers->set('Content-Range', sprintf('bytes %s-%s/%s', $start, $end, $fileSize)); + $this->headers->set('Content-Length', $end - $start + 1); + } + } + } + } + + return $this; + } + + private function hasValidIfRangeHeader($header) + { + if ($this->getEtag() === $header) { + return true; + } + + if (null === $lastModified = $this->getLastModified()) { + return false; + } + + return $lastModified->format('D, d M Y H:i:s').' GMT' === $header; + } + + /** + * Sends the file. + * + * {@inheritdoc} + */ + public function sendContent() + { + if (!$this->isSuccessful()) { + return parent::sendContent(); + } + + if (0 === $this->maxlen) { + return $this; + } + + $out = fopen('php://output', 'wb'); + $file = fopen($this->file->getPathname(), 'rb'); + + stream_copy_to_stream($file, $out, $this->maxlen, $this->offset); + + fclose($out); + fclose($file); + + if ($this->deleteFileAfterSend) { + unlink($this->file->getPathname()); + } + + return $this; + } + + /** + * {@inheritdoc} + * + * @throws \LogicException when the content is not null + */ + public function setContent($content) + { + if (null !== $content) { + throw new \LogicException('The content cannot be set on a BinaryFileResponse instance.'); + } + } + + /** + * {@inheritdoc} + * + * @return false + */ + public function getContent() + { + return false; + } + + /** + * Trust X-Sendfile-Type header. + */ + public static function trustXSendfileTypeHeader() + { + self::$trustXSendfileTypeHeader = true; + } + + /** + * If this is set to true, the file will be unlinked after the request is send + * Note: If the X-Sendfile header is used, the deleteFileAfterSend setting will not be used. + * + * @param bool $shouldDelete + * + * @return $this + */ + public function deleteFileAfterSend($shouldDelete) + { + $this->deleteFileAfterSend = $shouldDelete; + + return $this; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..6baa1f40b4a82d3a864833266cc6530e60d39d6a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/CHANGELOG.md @@ -0,0 +1,138 @@ +CHANGELOG +========= + +3.1.0 +----- + + * Added support for creating `JsonResponse` with a string of JSON data + +3.0.0 +----- + + * The precedence of parameters returned from `Request::get()` changed from "GET, PATH, BODY" to "PATH, GET, BODY" + +2.8.0 +----- + + * Finding deep items in `ParameterBag::get()` is deprecated since version 2.8 and + will be removed in 3.0. + +2.6.0 +----- + + * PdoSessionHandler changes + - implemented different session locking strategies to prevent loss of data by concurrent access to the same session + - [BC BREAK] save session data in a binary column without base64_encode + - [BC BREAK] added lifetime column to the session table which allows to have different lifetimes for each session + - implemented lazy connections that are only opened when a session is used by either passing a dsn string + explicitly or falling back to session.save_path ini setting + - added a createTable method that initializes a correctly defined table depending on the database vendor + +2.5.0 +----- + + * added `JsonResponse::setEncodingOptions()` & `JsonResponse::getEncodingOptions()` for easier manipulation + of the options used while encoding data to JSON format. + +2.4.0 +----- + + * added RequestStack + * added Request::getEncodings() + * added accessors methods to session handlers + +2.3.0 +----- + + * added support for ranges of IPs in trusted proxies + * `UploadedFile::isValid` now returns false if the file was not uploaded via HTTP (in a non-test mode) + * Improved error-handling of `\Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler` + to ensure the supplied PDO handler throws Exceptions on error (as the class expects). Added related test cases + to verify that Exceptions are properly thrown when the PDO queries fail. + +2.2.0 +----- + + * fixed the Request::create() precedence (URI information always take precedence now) + * added Request::getTrustedProxies() + * deprecated Request::isProxyTrusted() + * [BC BREAK] JsonResponse does not turn a top level empty array to an object anymore, use an ArrayObject to enforce objects + * added a IpUtils class to check if an IP belongs to a CIDR + * added Request::getRealMethod() to get the "real" HTTP method (getMethod() returns the "intended" HTTP method) + * disabled _method request parameter support by default (call Request::enableHttpMethodParameterOverride() to + enable it, and Request::getHttpMethodParameterOverride() to check if it is supported) + * Request::splitHttpAcceptHeader() method is deprecated and will be removed in 2.3 + * Deprecated Flashbag::count() and \Countable interface, will be removed in 2.3 + +2.1.0 +----- + + * added Request::getSchemeAndHttpHost() and Request::getUserInfo() + * added a fluent interface to the Response class + * added Request::isProxyTrusted() + * added JsonResponse + * added a getTargetUrl method to RedirectResponse + * added support for streamed responses + * made Response::prepare() method the place to enforce HTTP specification + * [BC BREAK] moved management of the locale from the Session class to the Request class + * added a generic access to the PHP built-in filter mechanism: ParameterBag::filter() + * made FileBinaryMimeTypeGuesser command configurable + * added Request::getUser() and Request::getPassword() + * added support for the PATCH method in Request + * removed the ContentTypeMimeTypeGuesser class as it is deprecated and never used on PHP 5.3 + * added ResponseHeaderBag::makeDisposition() (implements RFC 6266) + * made mimetype to extension conversion configurable + * [BC BREAK] Moved all session related classes and interfaces into own namespace, as + `Symfony\Component\HttpFoundation\Session` and renamed classes accordingly. + Session handlers are located in the subnamespace `Symfony\Component\HttpFoundation\Session\Handler`. + * SessionHandlers must implement `\SessionHandlerInterface` or extend from the + `Symfony\Component\HttpFoundation\Storage\Handler\NativeSessionHandler` base class. + * Added internal storage driver proxy mechanism for forward compatibility with + PHP 5.4 `\SessionHandler` class. + * Added session handlers for custom Memcache, Memcached and Null session save handlers. + * [BC BREAK] Removed `NativeSessionStorage` and replaced with `NativeFileSessionHandler`. + * [BC BREAK] `SessionStorageInterface` methods removed: `write()`, `read()` and + `remove()`. Added `getBag()`, `registerBag()`. The `NativeSessionStorage` class + is a mediator for the session storage internals including the session handlers + which do the real work of participating in the internal PHP session workflow. + * [BC BREAK] Introduced mock implementations of `SessionStorage` to enable unit + and functional testing without starting real PHP sessions. Removed + `ArraySessionStorage`, and replaced with `MockArraySessionStorage` for unit + tests; removed `FilesystemSessionStorage`, and replaced with`MockFileSessionStorage` + for functional tests. These do not interact with global session ini + configuration values, session functions or `$_SESSION` superglobal. This means + they can be configured directly allowing multiple instances to work without + conflicting in the same PHP process. + * [BC BREAK] Removed the `close()` method from the `Session` class, as this is + now redundant. + * Deprecated the following methods from the Session class: `setFlash()`, `setFlashes()` + `getFlash()`, `hasFlash()`, and `removeFlash()`. Use `getFlashBag()` instead + which returns a `FlashBagInterface`. + * `Session->clear()` now only clears session attributes as before it cleared + flash messages and attributes. `Session->getFlashBag()->all()` clears flashes now. + * Session data is now managed by `SessionBagInterface` to better encapsulate + session data. + * Refactored session attribute and flash messages system to their own + `SessionBagInterface` implementations. + * Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`. This + implementation is ESI compatible. + * Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire + behaviour of messages auto expiring after one page page load. Messages must + be retrieved by `get()` or `all()`. + * Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate + attributes storage behaviour from 2.0.x (default). + * Added `Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag` for + namespace session attributes. + * Flash API can stores messages in an array so there may be multiple messages + per flash type. The old `Session` class API remains without BC break as it + will allow single messages as before. + * Added basic session meta-data to the session to record session create time, + last updated time, and the lifetime of the session cookie that was provided + to the client. + * Request::getClientIp() method doesn't take a parameter anymore but bases + itself on the trustProxy parameter. + * Added isMethod() to Request object. + * [BC BREAK] The methods `getPathInfo()`, `getBaseUrl()` and `getBasePath()` of + a `Request` now all return a raw value (vs a urldecoded value before). Any call + to one of these methods must be checked and wrapped in a `rawurldecode()` if + needed. diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Cookie.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Cookie.php new file mode 100644 index 0000000000000000000000000000000000000000..be13dab85e46d6ed365b64d5e5cd3b63fb03e259 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Cookie.php @@ -0,0 +1,228 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * Represents a cookie. + * + * @author Johannes M. Schmitt + */ +class Cookie +{ + protected $name; + protected $value; + protected $domain; + protected $expire; + protected $path; + protected $secure; + protected $httpOnly; + private $raw; + private $sameSite; + + const SAMESITE_LAX = 'lax'; + const SAMESITE_STRICT = 'strict'; + + /** + * Constructor. + * + * @param string $name The name of the cookie + * @param string $value The value of the cookie + * @param int|string|\DateTimeInterface $expire The time the cookie expires + * @param string $path The path on the server in which the cookie will be available on + * @param string $domain The domain that the cookie is available to + * @param bool $secure Whether the cookie should only be transmitted over a secure HTTPS connection from the client + * @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol + * @param bool $raw Whether the cookie value should be sent with no url encoding + * @param string|null $sameSite Whether the cookie will be available for cross-site requests + * + * @throws \InvalidArgumentException + */ + public function __construct($name, $value = null, $expire = 0, $path = '/', $domain = null, $secure = false, $httpOnly = true, $raw = false, $sameSite = null) + { + // from PHP source code + if (preg_match("/[=,; \t\r\n\013\014]/", $name)) { + throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $name)); + } + + if (empty($name)) { + throw new \InvalidArgumentException('The cookie name cannot be empty.'); + } + + // convert expiration time to a Unix timestamp + if ($expire instanceof \DateTimeInterface) { + $expire = $expire->format('U'); + } elseif (!is_numeric($expire)) { + $expire = strtotime($expire); + + if (false === $expire) { + throw new \InvalidArgumentException('The cookie expiration time is not valid.'); + } + } + + $this->name = $name; + $this->value = $value; + $this->domain = $domain; + $this->expire = 0 < $expire ? (int) $expire : 0; + $this->path = empty($path) ? '/' : $path; + $this->secure = (bool) $secure; + $this->httpOnly = (bool) $httpOnly; + $this->raw = (bool) $raw; + + if (!in_array($sameSite, array(self::SAMESITE_LAX, self::SAMESITE_STRICT, null), true)) { + throw new \InvalidArgumentException('The "sameSite" parameter value is not valid.'); + } + + $this->sameSite = $sameSite; + } + + /** + * Returns the cookie as a string. + * + * @return string The cookie + */ + public function __toString() + { + $str = ($this->isRaw() ? $this->getName() : urlencode($this->getName())).'='; + + if ('' === (string) $this->getValue()) { + $str .= 'deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001); + } else { + $str .= $this->isRaw() ? $this->getValue() : urlencode($this->getValue()); + + if (0 !== $this->getExpiresTime()) { + $str .= '; expires='.gmdate('D, d-M-Y H:i:s T', $this->getExpiresTime()); + } + } + + if ($this->getPath()) { + $str .= '; path='.$this->getPath(); + } + + if ($this->getDomain()) { + $str .= '; domain='.$this->getDomain(); + } + + if (true === $this->isSecure()) { + $str .= '; secure'; + } + + if (true === $this->isHttpOnly()) { + $str .= '; httponly'; + } + + if (null !== $this->getSameSite()) { + $str .= '; samesite='.$this->getSameSite(); + } + + return $str; + } + + /** + * Gets the name of the cookie. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Gets the value of the cookie. + * + * @return string|null + */ + public function getValue() + { + return $this->value; + } + + /** + * Gets the domain that the cookie is available to. + * + * @return string|null + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Gets the time the cookie expires. + * + * @return int + */ + public function getExpiresTime() + { + return $this->expire; + } + + /** + * Gets the path on the server in which the cookie will be available on. + * + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client. + * + * @return bool + */ + public function isSecure() + { + return $this->secure; + } + + /** + * Checks whether the cookie will be made accessible only through the HTTP protocol. + * + * @return bool + */ + public function isHttpOnly() + { + return $this->httpOnly; + } + + /** + * Whether this cookie is about to be cleared. + * + * @return bool + */ + public function isCleared() + { + return $this->expire < time(); + } + + /** + * Checks if the cookie value should be sent with no url encoding. + * + * @return bool + */ + public function isRaw() + { + return $this->raw; + } + + /** + * Gets the SameSite attribute. + * + * @return string|null + */ + public function getSameSite() + { + return $this->sameSite; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Exception/ConflictingHeadersException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Exception/ConflictingHeadersException.php new file mode 100644 index 0000000000000000000000000000000000000000..fa5f1c7873270be55896614197edcc1524f009c0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Exception/ConflictingHeadersException.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Exception; + +/** + * The HTTP request contains headers with conflicting information. + * + * This exception should trigger an HTTP 400 response in your application code. + * + * @author Magnus Nordlander + */ +class ConflictingHeadersException extends \RuntimeException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php new file mode 100644 index 0000000000000000000000000000000000000000..e9c8441ce314b2f5a9eb88350b888fe83030636a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +use Symfony\Component\ExpressionLanguage\ExpressionLanguage; + +/** + * ExpressionRequestMatcher uses an expression to match a Request. + * + * @author Fabien Potencier + */ +class ExpressionRequestMatcher extends RequestMatcher +{ + private $language; + private $expression; + + public function setExpression(ExpressionLanguage $language, $expression) + { + $this->language = $language; + $this->expression = $expression; + } + + public function matches(Request $request) + { + if (!$this->language) { + throw new \LogicException('Unable to match the request as the expression language is not available.'); + } + + return $this->language->evaluate($this->expression, array( + 'request' => $request, + 'method' => $request->getMethod(), + 'path' => rawurldecode($request->getPathInfo()), + 'host' => $request->getHost(), + 'ip' => $request->getClientIp(), + 'attributes' => $request->attributes->all(), + )) && parent::matches($request); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php new file mode 100644 index 0000000000000000000000000000000000000000..41f7a462506b76b9bd9977504fe2cae0062709a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.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\HttpFoundation\File\Exception; + +/** + * Thrown when the access on a file was denied. + * + * @author Bernhard Schussek + */ +class AccessDeniedException extends FileException +{ + /** + * Constructor. + * + * @param string $path The path to the accessed file + */ + public function __construct($path) + { + parent::__construct(sprintf('The file %s could not be accessed', $path)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/FileException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/FileException.php new file mode 100644 index 0000000000000000000000000000000000000000..fad5133e1b745c108b33a2662564eeb1828a789b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/FileException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\File\Exception; + +/** + * Thrown when an error occurred in the component File. + * + * @author Bernhard Schussek + */ +class FileException extends \RuntimeException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..ac90d4035b8ce1d3b94da08dce43c98095d824cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.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\HttpFoundation\File\Exception; + +/** + * Thrown when a file was not found. + * + * @author Bernhard Schussek + */ +class FileNotFoundException extends FileException +{ + /** + * Constructor. + * + * @param string $path The path to the file that was not found + */ + public function __construct($path) + { + parent::__construct(sprintf('The file "%s" does not exist', $path)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php new file mode 100644 index 0000000000000000000000000000000000000000..0444b8778218fb5e63d9ef8370f147c261921515 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.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\HttpFoundation\File\Exception; + +class UnexpectedTypeException extends FileException +{ + public function __construct($value, $expectedType) + { + parent::__construct(sprintf('Expected argument of type %s, %s given', $expectedType, is_object($value) ? get_class($value) : gettype($value))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/UploadException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/UploadException.php new file mode 100644 index 0000000000000000000000000000000000000000..7074e7653d0eda28f662fcd6e168d927dbc2e706 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/Exception/UploadException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\File\Exception; + +/** + * Thrown when an error occurred during file upload. + * + * @author Bernhard Schussek + */ +class UploadException extends FileException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php new file mode 100644 index 0000000000000000000000000000000000000000..e2a67684fcda640de0cc7a71ea32562867501f49 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.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\HttpFoundation\File; + +use Symfony\Component\HttpFoundation\File\Exception\FileException; +use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; +use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; +use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser; + +/** + * A file in the file system. + * + * @author Bernhard Schussek + */ +class File extends \SplFileInfo +{ + /** + * Constructs a new file from the given path. + * + * @param string $path The path to the file + * @param bool $checkPath Whether to check the path or not + * + * @throws FileNotFoundException If the given path is not a file + */ + public function __construct($path, $checkPath = true) + { + if ($checkPath && !is_file($path)) { + throw new FileNotFoundException($path); + } + + parent::__construct($path); + } + + /** + * Returns the extension based on the mime type. + * + * If the mime type is unknown, returns null. + * + * This method uses the mime type as guessed by getMimeType() + * to guess the file extension. + * + * @return string|null The guessed extension or null if it cannot be guessed + * + * @see ExtensionGuesser + * @see getMimeType() + */ + public function guessExtension() + { + $type = $this->getMimeType(); + $guesser = ExtensionGuesser::getInstance(); + + return $guesser->guess($type); + } + + /** + * Returns the mime type of the file. + * + * The mime type is guessed using a MimeTypeGuesser instance, which uses finfo(), + * mime_content_type() and the system binary "file" (in this order), depending on + * which of those are available. + * + * @return string|null The guessed mime type (e.g. "application/pdf") + * + * @see MimeTypeGuesser + */ + public function getMimeType() + { + $guesser = MimeTypeGuesser::getInstance(); + + return $guesser->guess($this->getPathname()); + } + + /** + * Moves the file to a new location. + * + * @param string $directory The destination folder + * @param string $name The new file name + * + * @return self A File object representing the new file + * + * @throws FileException if the target file could not be created + */ + public function move($directory, $name = null) + { + $target = $this->getTargetFile($directory, $name); + + if (!@rename($this->getPathname(), $target)) { + $error = error_get_last(); + throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, strip_tags($error['message']))); + } + + @chmod($target, 0666 & ~umask()); + + return $target; + } + + protected function getTargetFile($directory, $name = null) + { + if (!is_dir($directory)) { + if (false === @mkdir($directory, 0777, true) && !is_dir($directory)) { + throw new FileException(sprintf('Unable to create the "%s" directory', $directory)); + } + } elseif (!is_writable($directory)) { + throw new FileException(sprintf('Unable to write in the "%s" directory', $directory)); + } + + $target = rtrim($directory, '/\\').DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name)); + + return new self($target, false); + } + + /** + * Returns locale independent base name of the given path. + * + * @param string $name The new file name + * + * @return string containing + */ + protected function getName($name) + { + $originalName = str_replace('\\', '/', $name); + $pos = strrpos($originalName, '/'); + $originalName = false === $pos ? $originalName : substr($originalName, $pos + 1); + + return $originalName; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php new file mode 100644 index 0000000000000000000000000000000000000000..921751f6b5af5856866a204807e25b8a0cc2be4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.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\Component\HttpFoundation\File\MimeType; + +/** + * A singleton mime type to file extension guesser. + * + * A default guesser is provided. + * You can register custom guessers by calling the register() + * method on the singleton instance: + * + * $guesser = ExtensionGuesser::getInstance(); + * $guesser->register(new MyCustomExtensionGuesser()); + * + * The last registered guesser is preferred over previously registered ones. + */ +class ExtensionGuesser implements ExtensionGuesserInterface +{ + /** + * The singleton instance. + * + * @var ExtensionGuesser + */ + private static $instance = null; + + /** + * All registered ExtensionGuesserInterface instances. + * + * @var array + */ + protected $guessers = array(); + + /** + * Returns the singleton instance. + * + * @return self + */ + public static function getInstance() + { + if (null === self::$instance) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Registers all natively provided extension guessers. + */ + private function __construct() + { + $this->register(new MimeTypeExtensionGuesser()); + } + + /** + * Registers a new extension guesser. + * + * When guessing, this guesser is preferred over previously registered ones. + * + * @param ExtensionGuesserInterface $guesser + */ + public function register(ExtensionGuesserInterface $guesser) + { + array_unshift($this->guessers, $guesser); + } + + /** + * Tries to guess the extension. + * + * The mime type is passed to each registered mime type guesser in reverse order + * of their registration (last registered is queried first). Once a guesser + * returns a value that is not NULL, this method terminates and returns the + * value. + * + * @param string $mimeType The mime type + * + * @return string The guessed extension or NULL, if none could be guessed + */ + public function guess($mimeType) + { + foreach ($this->guessers as $guesser) { + if (null !== $extension = $guesser->guess($mimeType)) { + return $extension; + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d19a0e5371349302b9aaac37ed9ae51562258b40 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.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\HttpFoundation\File\MimeType; + +/** + * Guesses the file extension corresponding to a given mime type. + */ +interface ExtensionGuesserInterface +{ + /** + * Makes a best guess for a file extension, given a mime type. + * + * @param string $mimeType The mime type + * + * @return string The guessed extension or NULL, if none could be guessed + */ + public function guess($mimeType); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php new file mode 100644 index 0000000000000000000000000000000000000000..f917a06d6ccbf421ffc8d98ae05a9dca8ce729c7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\File\MimeType; + +use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; +use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; + +/** + * Guesses the mime type with the binary "file" (only available on *nix). + * + * @author Bernhard Schussek + */ +class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface +{ + private $cmd; + + /** + * Constructor. + * + * The $cmd pattern must contain a "%s" string that will be replaced + * with the file name to guess. + * + * The command output must start with the mime type of the file. + * + * @param string $cmd The command to run to get the mime type of a file + */ + public function __construct($cmd = 'file -b --mime %s 2>/dev/null') + { + $this->cmd = $cmd; + } + + /** + * Returns whether this guesser is supported on the current OS. + * + * @return bool + */ + public static function isSupported() + { + return '\\' !== DIRECTORY_SEPARATOR && function_exists('passthru') && function_exists('escapeshellarg'); + } + + /** + * {@inheritdoc} + */ + public function guess($path) + { + if (!is_file($path)) { + throw new FileNotFoundException($path); + } + + if (!is_readable($path)) { + throw new AccessDeniedException($path); + } + + if (!self::isSupported()) { + return; + } + + ob_start(); + + // need to use --mime instead of -i. see #6641 + passthru(sprintf($this->cmd, escapeshellarg($path)), $return); + if ($return > 0) { + ob_end_clean(); + + return; + } + + $type = trim(ob_get_clean()); + + if (!preg_match('#^([a-z0-9\-]+/[a-z0-9\-\.]+)#i', $type, $match)) { + // it's not a type, but an error message + return; + } + + return $match[1]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php new file mode 100644 index 0000000000000000000000000000000000000000..6fee94798c9cd9fdc3981656790016fa341ad06f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\File\MimeType; + +use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; +use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; + +/** + * Guesses the mime type using the PECL extension FileInfo. + * + * @author Bernhard Schussek + */ +class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface +{ + private $magicFile; + + /** + * Constructor. + * + * @param string $magicFile A magic file to use with the finfo instance + * + * @see http://www.php.net/manual/en/function.finfo-open.php + */ + public function __construct($magicFile = null) + { + $this->magicFile = $magicFile; + } + + /** + * Returns whether this guesser is supported on the current OS/PHP setup. + * + * @return bool + */ + public static function isSupported() + { + return function_exists('finfo_open'); + } + + /** + * {@inheritdoc} + */ + public function guess($path) + { + if (!is_file($path)) { + throw new FileNotFoundException($path); + } + + if (!is_readable($path)) { + throw new AccessDeniedException($path); + } + + if (!self::isSupported()) { + return; + } + + if (!$finfo = new \finfo(FILEINFO_MIME_TYPE, $this->magicFile)) { + return; + } + + return $finfo->file($path); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php new file mode 100644 index 0000000000000000000000000000000000000000..17fd344b8437cb6f560dfafb8b2cfe8f3d3e5200 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php @@ -0,0 +1,808 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\File\MimeType; + +/** + * Provides a best-guess mapping of mime type to file extension. + */ +class MimeTypeExtensionGuesser implements ExtensionGuesserInterface +{ + /** + * A map of mime types and their default extensions. + * + * This list has been placed under the public domain by the Apache HTTPD project. + * This list has been updated from upstream on 2013-04-23. + * + * @see http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types + * + * @var array + */ + protected $defaultExtensions = array( + 'application/andrew-inset' => 'ez', + 'application/applixware' => 'aw', + 'application/atom+xml' => 'atom', + 'application/atomcat+xml' => 'atomcat', + 'application/atomsvc+xml' => 'atomsvc', + 'application/ccxml+xml' => 'ccxml', + 'application/cdmi-capability' => 'cdmia', + 'application/cdmi-container' => 'cdmic', + 'application/cdmi-domain' => 'cdmid', + 'application/cdmi-object' => 'cdmio', + 'application/cdmi-queue' => 'cdmiq', + 'application/cu-seeme' => 'cu', + 'application/davmount+xml' => 'davmount', + 'application/docbook+xml' => 'dbk', + 'application/dssc+der' => 'dssc', + 'application/dssc+xml' => 'xdssc', + 'application/ecmascript' => 'ecma', + 'application/emma+xml' => 'emma', + 'application/epub+zip' => 'epub', + 'application/exi' => 'exi', + 'application/font-tdpfr' => 'pfr', + 'application/gml+xml' => 'gml', + 'application/gpx+xml' => 'gpx', + 'application/gxf' => 'gxf', + 'application/hyperstudio' => 'stk', + 'application/inkml+xml' => 'ink', + 'application/ipfix' => 'ipfix', + 'application/java-archive' => 'jar', + 'application/java-serialized-object' => 'ser', + 'application/java-vm' => 'class', + 'application/javascript' => 'js', + 'application/json' => 'json', + 'application/jsonml+json' => 'jsonml', + 'application/lost+xml' => 'lostxml', + 'application/mac-binhex40' => 'hqx', + 'application/mac-compactpro' => 'cpt', + 'application/mads+xml' => 'mads', + 'application/marc' => 'mrc', + 'application/marcxml+xml' => 'mrcx', + 'application/mathematica' => 'ma', + 'application/mathml+xml' => 'mathml', + 'application/mbox' => 'mbox', + 'application/mediaservercontrol+xml' => 'mscml', + 'application/metalink+xml' => 'metalink', + 'application/metalink4+xml' => 'meta4', + 'application/mets+xml' => 'mets', + 'application/mods+xml' => 'mods', + 'application/mp21' => 'm21', + 'application/mp4' => 'mp4s', + 'application/msword' => 'doc', + 'application/mxf' => 'mxf', + 'application/octet-stream' => 'bin', + 'application/oda' => 'oda', + 'application/oebps-package+xml' => 'opf', + 'application/ogg' => 'ogx', + 'application/omdoc+xml' => 'omdoc', + 'application/onenote' => 'onetoc', + 'application/oxps' => 'oxps', + 'application/patch-ops-error+xml' => 'xer', + 'application/pdf' => 'pdf', + 'application/pgp-encrypted' => 'pgp', + 'application/pgp-signature' => 'asc', + 'application/pics-rules' => 'prf', + 'application/pkcs10' => 'p10', + 'application/pkcs7-mime' => 'p7m', + 'application/pkcs7-signature' => 'p7s', + 'application/pkcs8' => 'p8', + 'application/pkix-attr-cert' => 'ac', + 'application/pkix-cert' => 'cer', + 'application/pkix-crl' => 'crl', + 'application/pkix-pkipath' => 'pkipath', + 'application/pkixcmp' => 'pki', + 'application/pls+xml' => 'pls', + 'application/postscript' => 'ai', + 'application/prs.cww' => 'cww', + 'application/pskc+xml' => 'pskcxml', + 'application/rdf+xml' => 'rdf', + 'application/reginfo+xml' => 'rif', + 'application/relax-ng-compact-syntax' => 'rnc', + 'application/resource-lists+xml' => 'rl', + 'application/resource-lists-diff+xml' => 'rld', + 'application/rls-services+xml' => 'rs', + 'application/rpki-ghostbusters' => 'gbr', + 'application/rpki-manifest' => 'mft', + 'application/rpki-roa' => 'roa', + 'application/rsd+xml' => 'rsd', + 'application/rss+xml' => 'rss', + 'application/rtf' => 'rtf', + 'application/sbml+xml' => 'sbml', + 'application/scvp-cv-request' => 'scq', + 'application/scvp-cv-response' => 'scs', + 'application/scvp-vp-request' => 'spq', + 'application/scvp-vp-response' => 'spp', + 'application/sdp' => 'sdp', + 'application/set-payment-initiation' => 'setpay', + 'application/set-registration-initiation' => 'setreg', + 'application/shf+xml' => 'shf', + 'application/smil+xml' => 'smi', + 'application/sparql-query' => 'rq', + 'application/sparql-results+xml' => 'srx', + 'application/srgs' => 'gram', + 'application/srgs+xml' => 'grxml', + 'application/sru+xml' => 'sru', + 'application/ssdl+xml' => 'ssdl', + 'application/ssml+xml' => 'ssml', + 'application/tei+xml' => 'tei', + 'application/thraud+xml' => 'tfi', + 'application/timestamped-data' => 'tsd', + 'application/vnd.3gpp.pic-bw-large' => 'plb', + 'application/vnd.3gpp.pic-bw-small' => 'psb', + 'application/vnd.3gpp.pic-bw-var' => 'pvb', + 'application/vnd.3gpp2.tcap' => 'tcap', + 'application/vnd.3m.post-it-notes' => 'pwn', + 'application/vnd.accpac.simply.aso' => 'aso', + 'application/vnd.accpac.simply.imp' => 'imp', + 'application/vnd.acucobol' => 'acu', + 'application/vnd.acucorp' => 'atc', + 'application/vnd.adobe.air-application-installer-package+zip' => 'air', + 'application/vnd.adobe.formscentral.fcdt' => 'fcdt', + 'application/vnd.adobe.fxp' => 'fxp', + 'application/vnd.adobe.xdp+xml' => 'xdp', + 'application/vnd.adobe.xfdf' => 'xfdf', + 'application/vnd.ahead.space' => 'ahead', + 'application/vnd.airzip.filesecure.azf' => 'azf', + 'application/vnd.airzip.filesecure.azs' => 'azs', + 'application/vnd.amazon.ebook' => 'azw', + 'application/vnd.americandynamics.acc' => 'acc', + 'application/vnd.amiga.ami' => 'ami', + 'application/vnd.android.package-archive' => 'apk', + 'application/vnd.anser-web-certificate-issue-initiation' => 'cii', + 'application/vnd.anser-web-funds-transfer-initiation' => 'fti', + 'application/vnd.antix.game-component' => 'atx', + 'application/vnd.apple.installer+xml' => 'mpkg', + 'application/vnd.apple.mpegurl' => 'm3u8', + 'application/vnd.aristanetworks.swi' => 'swi', + 'application/vnd.astraea-software.iota' => 'iota', + 'application/vnd.audiograph' => 'aep', + 'application/vnd.blueice.multipass' => 'mpm', + 'application/vnd.bmi' => 'bmi', + 'application/vnd.businessobjects' => 'rep', + 'application/vnd.chemdraw+xml' => 'cdxml', + 'application/vnd.chipnuts.karaoke-mmd' => 'mmd', + 'application/vnd.cinderella' => 'cdy', + 'application/vnd.claymore' => 'cla', + 'application/vnd.cloanto.rp9' => 'rp9', + 'application/vnd.clonk.c4group' => 'c4g', + 'application/vnd.cluetrust.cartomobile-config' => 'c11amc', + 'application/vnd.cluetrust.cartomobile-config-pkg' => 'c11amz', + 'application/vnd.commonspace' => 'csp', + 'application/vnd.contact.cmsg' => 'cdbcmsg', + 'application/vnd.cosmocaller' => 'cmc', + 'application/vnd.crick.clicker' => 'clkx', + 'application/vnd.crick.clicker.keyboard' => 'clkk', + 'application/vnd.crick.clicker.palette' => 'clkp', + 'application/vnd.crick.clicker.template' => 'clkt', + 'application/vnd.crick.clicker.wordbank' => 'clkw', + 'application/vnd.criticaltools.wbs+xml' => 'wbs', + 'application/vnd.ctc-posml' => 'pml', + 'application/vnd.cups-ppd' => 'ppd', + 'application/vnd.curl.car' => 'car', + 'application/vnd.curl.pcurl' => 'pcurl', + 'application/vnd.dart' => 'dart', + 'application/vnd.data-vision.rdz' => 'rdz', + 'application/vnd.dece.data' => 'uvf', + 'application/vnd.dece.ttml+xml' => 'uvt', + 'application/vnd.dece.unspecified' => 'uvx', + 'application/vnd.dece.zip' => 'uvz', + 'application/vnd.denovo.fcselayout-link' => 'fe_launch', + 'application/vnd.dna' => 'dna', + 'application/vnd.dolby.mlp' => 'mlp', + 'application/vnd.dpgraph' => 'dpg', + 'application/vnd.dreamfactory' => 'dfac', + 'application/vnd.ds-keypoint' => 'kpxx', + 'application/vnd.dvb.ait' => 'ait', + 'application/vnd.dvb.service' => 'svc', + 'application/vnd.dynageo' => 'geo', + 'application/vnd.ecowin.chart' => 'mag', + 'application/vnd.enliven' => 'nml', + 'application/vnd.epson.esf' => 'esf', + 'application/vnd.epson.msf' => 'msf', + 'application/vnd.epson.quickanime' => 'qam', + 'application/vnd.epson.salt' => 'slt', + 'application/vnd.epson.ssf' => 'ssf', + 'application/vnd.eszigno3+xml' => 'es3', + 'application/vnd.ezpix-album' => 'ez2', + 'application/vnd.ezpix-package' => 'ez3', + 'application/vnd.fdf' => 'fdf', + 'application/vnd.fdsn.mseed' => 'mseed', + 'application/vnd.fdsn.seed' => 'seed', + 'application/vnd.flographit' => 'gph', + 'application/vnd.fluxtime.clip' => 'ftc', + 'application/vnd.framemaker' => 'fm', + 'application/vnd.frogans.fnc' => 'fnc', + 'application/vnd.frogans.ltf' => 'ltf', + 'application/vnd.fsc.weblaunch' => 'fsc', + 'application/vnd.fujitsu.oasys' => 'oas', + 'application/vnd.fujitsu.oasys2' => 'oa2', + 'application/vnd.fujitsu.oasys3' => 'oa3', + 'application/vnd.fujitsu.oasysgp' => 'fg5', + 'application/vnd.fujitsu.oasysprs' => 'bh2', + 'application/vnd.fujixerox.ddd' => 'ddd', + 'application/vnd.fujixerox.docuworks' => 'xdw', + 'application/vnd.fujixerox.docuworks.binder' => 'xbd', + 'application/vnd.fuzzysheet' => 'fzs', + 'application/vnd.genomatix.tuxedo' => 'txd', + 'application/vnd.geogebra.file' => 'ggb', + 'application/vnd.geogebra.tool' => 'ggt', + 'application/vnd.geometry-explorer' => 'gex', + 'application/vnd.geonext' => 'gxt', + 'application/vnd.geoplan' => 'g2w', + 'application/vnd.geospace' => 'g3w', + 'application/vnd.gmx' => 'gmx', + 'application/vnd.google-earth.kml+xml' => 'kml', + 'application/vnd.google-earth.kmz' => 'kmz', + 'application/vnd.grafeq' => 'gqf', + 'application/vnd.groove-account' => 'gac', + 'application/vnd.groove-help' => 'ghf', + 'application/vnd.groove-identity-message' => 'gim', + 'application/vnd.groove-injector' => 'grv', + 'application/vnd.groove-tool-message' => 'gtm', + 'application/vnd.groove-tool-template' => 'tpl', + 'application/vnd.groove-vcard' => 'vcg', + 'application/vnd.hal+xml' => 'hal', + 'application/vnd.handheld-entertainment+xml' => 'zmm', + 'application/vnd.hbci' => 'hbci', + 'application/vnd.hhe.lesson-player' => 'les', + 'application/vnd.hp-hpgl' => 'hpgl', + 'application/vnd.hp-hpid' => 'hpid', + 'application/vnd.hp-hps' => 'hps', + 'application/vnd.hp-jlyt' => 'jlt', + 'application/vnd.hp-pcl' => 'pcl', + 'application/vnd.hp-pclxl' => 'pclxl', + 'application/vnd.hydrostatix.sof-data' => 'sfd-hdstx', + 'application/vnd.ibm.minipay' => 'mpy', + 'application/vnd.ibm.modcap' => 'afp', + 'application/vnd.ibm.rights-management' => 'irm', + 'application/vnd.ibm.secure-container' => 'sc', + 'application/vnd.iccprofile' => 'icc', + 'application/vnd.igloader' => 'igl', + 'application/vnd.immervision-ivp' => 'ivp', + 'application/vnd.immervision-ivu' => 'ivu', + 'application/vnd.insors.igm' => 'igm', + 'application/vnd.intercon.formnet' => 'xpw', + 'application/vnd.intergeo' => 'i2g', + 'application/vnd.intu.qbo' => 'qbo', + 'application/vnd.intu.qfx' => 'qfx', + 'application/vnd.ipunplugged.rcprofile' => 'rcprofile', + 'application/vnd.irepository.package+xml' => 'irp', + 'application/vnd.is-xpr' => 'xpr', + 'application/vnd.isac.fcs' => 'fcs', + 'application/vnd.jam' => 'jam', + 'application/vnd.jcp.javame.midlet-rms' => 'rms', + 'application/vnd.jisp' => 'jisp', + 'application/vnd.joost.joda-archive' => 'joda', + 'application/vnd.kahootz' => 'ktz', + 'application/vnd.kde.karbon' => 'karbon', + 'application/vnd.kde.kchart' => 'chrt', + 'application/vnd.kde.kformula' => 'kfo', + 'application/vnd.kde.kivio' => 'flw', + 'application/vnd.kde.kontour' => 'kon', + 'application/vnd.kde.kpresenter' => 'kpr', + 'application/vnd.kde.kspread' => 'ksp', + 'application/vnd.kde.kword' => 'kwd', + 'application/vnd.kenameaapp' => 'htke', + 'application/vnd.kidspiration' => 'kia', + 'application/vnd.kinar' => 'kne', + 'application/vnd.koan' => 'skp', + 'application/vnd.kodak-descriptor' => 'sse', + 'application/vnd.las.las+xml' => 'lasxml', + 'application/vnd.llamagraphics.life-balance.desktop' => 'lbd', + 'application/vnd.llamagraphics.life-balance.exchange+xml' => 'lbe', + 'application/vnd.lotus-1-2-3' => '123', + 'application/vnd.lotus-approach' => 'apr', + 'application/vnd.lotus-freelance' => 'pre', + 'application/vnd.lotus-notes' => 'nsf', + 'application/vnd.lotus-organizer' => 'org', + 'application/vnd.lotus-screencam' => 'scm', + 'application/vnd.lotus-wordpro' => 'lwp', + 'application/vnd.macports.portpkg' => 'portpkg', + 'application/vnd.mcd' => 'mcd', + 'application/vnd.medcalcdata' => 'mc1', + 'application/vnd.mediastation.cdkey' => 'cdkey', + 'application/vnd.mfer' => 'mwf', + 'application/vnd.mfmp' => 'mfm', + 'application/vnd.micrografx.flo' => 'flo', + 'application/vnd.micrografx.igx' => 'igx', + 'application/vnd.mif' => 'mif', + 'application/vnd.mobius.daf' => 'daf', + 'application/vnd.mobius.dis' => 'dis', + 'application/vnd.mobius.mbk' => 'mbk', + 'application/vnd.mobius.mqy' => 'mqy', + 'application/vnd.mobius.msl' => 'msl', + 'application/vnd.mobius.plc' => 'plc', + 'application/vnd.mobius.txf' => 'txf', + 'application/vnd.mophun.application' => 'mpn', + 'application/vnd.mophun.certificate' => 'mpc', + 'application/vnd.mozilla.xul+xml' => 'xul', + 'application/vnd.ms-artgalry' => 'cil', + 'application/vnd.ms-cab-compressed' => 'cab', + 'application/vnd.ms-excel' => 'xls', + 'application/vnd.ms-excel.addin.macroenabled.12' => 'xlam', + 'application/vnd.ms-excel.sheet.binary.macroenabled.12' => 'xlsb', + 'application/vnd.ms-excel.sheet.macroenabled.12' => 'xlsm', + 'application/vnd.ms-excel.template.macroenabled.12' => 'xltm', + 'application/vnd.ms-fontobject' => 'eot', + 'application/vnd.ms-htmlhelp' => 'chm', + 'application/vnd.ms-ims' => 'ims', + 'application/vnd.ms-lrm' => 'lrm', + 'application/vnd.ms-officetheme' => 'thmx', + 'application/vnd.ms-pki.seccat' => 'cat', + 'application/vnd.ms-pki.stl' => 'stl', + 'application/vnd.ms-powerpoint' => 'ppt', + 'application/vnd.ms-powerpoint.addin.macroenabled.12' => 'ppam', + 'application/vnd.ms-powerpoint.presentation.macroenabled.12' => 'pptm', + 'application/vnd.ms-powerpoint.slide.macroenabled.12' => 'sldm', + 'application/vnd.ms-powerpoint.slideshow.macroenabled.12' => 'ppsm', + 'application/vnd.ms-powerpoint.template.macroenabled.12' => 'potm', + 'application/vnd.ms-project' => 'mpp', + 'application/vnd.ms-word.document.macroenabled.12' => 'docm', + 'application/vnd.ms-word.template.macroenabled.12' => 'dotm', + 'application/vnd.ms-works' => 'wps', + 'application/vnd.ms-wpl' => 'wpl', + 'application/vnd.ms-xpsdocument' => 'xps', + 'application/vnd.mseq' => 'mseq', + 'application/vnd.musician' => 'mus', + 'application/vnd.muvee.style' => 'msty', + 'application/vnd.mynfc' => 'taglet', + 'application/vnd.neurolanguage.nlu' => 'nlu', + 'application/vnd.nitf' => 'ntf', + 'application/vnd.noblenet-directory' => 'nnd', + 'application/vnd.noblenet-sealer' => 'nns', + 'application/vnd.noblenet-web' => 'nnw', + 'application/vnd.nokia.n-gage.data' => 'ngdat', + 'application/vnd.nokia.n-gage.symbian.install' => 'n-gage', + 'application/vnd.nokia.radio-preset' => 'rpst', + 'application/vnd.nokia.radio-presets' => 'rpss', + 'application/vnd.novadigm.edm' => 'edm', + 'application/vnd.novadigm.edx' => 'edx', + 'application/vnd.novadigm.ext' => 'ext', + 'application/vnd.oasis.opendocument.chart' => 'odc', + 'application/vnd.oasis.opendocument.chart-template' => 'otc', + 'application/vnd.oasis.opendocument.database' => 'odb', + 'application/vnd.oasis.opendocument.formula' => 'odf', + 'application/vnd.oasis.opendocument.formula-template' => 'odft', + 'application/vnd.oasis.opendocument.graphics' => 'odg', + 'application/vnd.oasis.opendocument.graphics-template' => 'otg', + 'application/vnd.oasis.opendocument.image' => 'odi', + 'application/vnd.oasis.opendocument.image-template' => 'oti', + 'application/vnd.oasis.opendocument.presentation' => 'odp', + 'application/vnd.oasis.opendocument.presentation-template' => 'otp', + 'application/vnd.oasis.opendocument.spreadsheet' => 'ods', + 'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots', + 'application/vnd.oasis.opendocument.text' => 'odt', + 'application/vnd.oasis.opendocument.text-master' => 'odm', + 'application/vnd.oasis.opendocument.text-template' => 'ott', + 'application/vnd.oasis.opendocument.text-web' => 'oth', + 'application/vnd.olpc-sugar' => 'xo', + 'application/vnd.oma.dd2+xml' => 'dd2', + 'application/vnd.openofficeorg.extension' => 'oxt', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx', + 'application/vnd.openxmlformats-officedocument.presentationml.slide' => 'sldx', + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'ppsx', + 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'potx', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'xltx', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'dotx', + 'application/vnd.osgeo.mapguide.package' => 'mgp', + 'application/vnd.osgi.dp' => 'dp', + 'application/vnd.osgi.subsystem' => 'esa', + 'application/vnd.palm' => 'pdb', + 'application/vnd.pawaafile' => 'paw', + 'application/vnd.pg.format' => 'str', + 'application/vnd.pg.osasli' => 'ei6', + 'application/vnd.picsel' => 'efif', + 'application/vnd.pmi.widget' => 'wg', + 'application/vnd.pocketlearn' => 'plf', + 'application/vnd.powerbuilder6' => 'pbd', + 'application/vnd.previewsystems.box' => 'box', + 'application/vnd.proteus.magazine' => 'mgz', + 'application/vnd.publishare-delta-tree' => 'qps', + 'application/vnd.pvi.ptid1' => 'ptid', + 'application/vnd.quark.quarkxpress' => 'qxd', + 'application/vnd.realvnc.bed' => 'bed', + 'application/vnd.recordare.musicxml' => 'mxl', + 'application/vnd.recordare.musicxml+xml' => 'musicxml', + 'application/vnd.rig.cryptonote' => 'cryptonote', + 'application/vnd.rim.cod' => 'cod', + 'application/vnd.rn-realmedia' => 'rm', + 'application/vnd.rn-realmedia-vbr' => 'rmvb', + 'application/vnd.route66.link66+xml' => 'link66', + 'application/vnd.sailingtracker.track' => 'st', + 'application/vnd.seemail' => 'see', + 'application/vnd.sema' => 'sema', + 'application/vnd.semd' => 'semd', + 'application/vnd.semf' => 'semf', + 'application/vnd.shana.informed.formdata' => 'ifm', + 'application/vnd.shana.informed.formtemplate' => 'itp', + 'application/vnd.shana.informed.interchange' => 'iif', + 'application/vnd.shana.informed.package' => 'ipk', + 'application/vnd.simtech-mindmapper' => 'twd', + 'application/vnd.smaf' => 'mmf', + 'application/vnd.smart.teacher' => 'teacher', + 'application/vnd.solent.sdkm+xml' => 'sdkm', + 'application/vnd.spotfire.dxp' => 'dxp', + 'application/vnd.spotfire.sfs' => 'sfs', + 'application/vnd.stardivision.calc' => 'sdc', + 'application/vnd.stardivision.draw' => 'sda', + 'application/vnd.stardivision.impress' => 'sdd', + 'application/vnd.stardivision.math' => 'smf', + 'application/vnd.stardivision.writer' => 'sdw', + 'application/vnd.stardivision.writer-global' => 'sgl', + 'application/vnd.stepmania.package' => 'smzip', + 'application/vnd.stepmania.stepchart' => 'sm', + 'application/vnd.sun.xml.calc' => 'sxc', + 'application/vnd.sun.xml.calc.template' => 'stc', + 'application/vnd.sun.xml.draw' => 'sxd', + 'application/vnd.sun.xml.draw.template' => 'std', + 'application/vnd.sun.xml.impress' => 'sxi', + 'application/vnd.sun.xml.impress.template' => 'sti', + 'application/vnd.sun.xml.math' => 'sxm', + 'application/vnd.sun.xml.writer' => 'sxw', + 'application/vnd.sun.xml.writer.global' => 'sxg', + 'application/vnd.sun.xml.writer.template' => 'stw', + 'application/vnd.sus-calendar' => 'sus', + 'application/vnd.svd' => 'svd', + 'application/vnd.symbian.install' => 'sis', + 'application/vnd.syncml+xml' => 'xsm', + 'application/vnd.syncml.dm+wbxml' => 'bdm', + 'application/vnd.syncml.dm+xml' => 'xdm', + 'application/vnd.tao.intent-module-archive' => 'tao', + 'application/vnd.tcpdump.pcap' => 'pcap', + 'application/vnd.tmobile-livetv' => 'tmo', + 'application/vnd.trid.tpt' => 'tpt', + 'application/vnd.triscape.mxs' => 'mxs', + 'application/vnd.trueapp' => 'tra', + 'application/vnd.ufdl' => 'ufd', + 'application/vnd.uiq.theme' => 'utz', + 'application/vnd.umajin' => 'umj', + 'application/vnd.unity' => 'unityweb', + 'application/vnd.uoml+xml' => 'uoml', + 'application/vnd.vcx' => 'vcx', + 'application/vnd.visio' => 'vsd', + 'application/vnd.visionary' => 'vis', + 'application/vnd.vsf' => 'vsf', + 'application/vnd.wap.wbxml' => 'wbxml', + 'application/vnd.wap.wmlc' => 'wmlc', + 'application/vnd.wap.wmlscriptc' => 'wmlsc', + 'application/vnd.webturbo' => 'wtb', + 'application/vnd.wolfram.player' => 'nbp', + 'application/vnd.wordperfect' => 'wpd', + 'application/vnd.wqd' => 'wqd', + 'application/vnd.wt.stf' => 'stf', + 'application/vnd.xara' => 'xar', + 'application/vnd.xfdl' => 'xfdl', + 'application/vnd.yamaha.hv-dic' => 'hvd', + 'application/vnd.yamaha.hv-script' => 'hvs', + 'application/vnd.yamaha.hv-voice' => 'hvp', + 'application/vnd.yamaha.openscoreformat' => 'osf', + 'application/vnd.yamaha.openscoreformat.osfpvg+xml' => 'osfpvg', + 'application/vnd.yamaha.smaf-audio' => 'saf', + 'application/vnd.yamaha.smaf-phrase' => 'spf', + 'application/vnd.yellowriver-custom-menu' => 'cmp', + 'application/vnd.zul' => 'zir', + 'application/vnd.zzazz.deck+xml' => 'zaz', + 'application/voicexml+xml' => 'vxml', + 'application/widget' => 'wgt', + 'application/winhlp' => 'hlp', + 'application/wsdl+xml' => 'wsdl', + 'application/wspolicy+xml' => 'wspolicy', + 'application/x-7z-compressed' => '7z', + 'application/x-abiword' => 'abw', + 'application/x-ace-compressed' => 'ace', + 'application/x-apple-diskimage' => 'dmg', + 'application/x-authorware-bin' => 'aab', + 'application/x-authorware-map' => 'aam', + 'application/x-authorware-seg' => 'aas', + 'application/x-bcpio' => 'bcpio', + 'application/x-bittorrent' => 'torrent', + 'application/x-blorb' => 'blb', + 'application/x-bzip' => 'bz', + 'application/x-bzip2' => 'bz2', + 'application/x-cbr' => 'cbr', + 'application/x-cdlink' => 'vcd', + 'application/x-cfs-compressed' => 'cfs', + 'application/x-chat' => 'chat', + 'application/x-chess-pgn' => 'pgn', + 'application/x-conference' => 'nsc', + 'application/x-cpio' => 'cpio', + 'application/x-csh' => 'csh', + 'application/x-debian-package' => 'deb', + 'application/x-dgc-compressed' => 'dgc', + 'application/x-director' => 'dir', + 'application/x-doom' => 'wad', + 'application/x-dtbncx+xml' => 'ncx', + 'application/x-dtbook+xml' => 'dtb', + 'application/x-dtbresource+xml' => 'res', + 'application/x-dvi' => 'dvi', + 'application/x-envoy' => 'evy', + 'application/x-eva' => 'eva', + 'application/x-font-bdf' => 'bdf', + 'application/x-font-ghostscript' => 'gsf', + 'application/x-font-linux-psf' => 'psf', + 'application/x-font-otf' => 'otf', + 'application/x-font-pcf' => 'pcf', + 'application/x-font-snf' => 'snf', + 'application/x-font-ttf' => 'ttf', + 'application/x-font-type1' => 'pfa', + 'application/x-font-woff' => 'woff', + 'application/x-freearc' => 'arc', + 'application/x-futuresplash' => 'spl', + 'application/x-gca-compressed' => 'gca', + 'application/x-glulx' => 'ulx', + 'application/x-gnumeric' => 'gnumeric', + 'application/x-gramps-xml' => 'gramps', + 'application/x-gtar' => 'gtar', + 'application/x-hdf' => 'hdf', + 'application/x-install-instructions' => 'install', + 'application/x-iso9660-image' => 'iso', + 'application/x-java-jnlp-file' => 'jnlp', + 'application/x-latex' => 'latex', + 'application/x-lzh-compressed' => 'lzh', + 'application/x-mie' => 'mie', + 'application/x-mobipocket-ebook' => 'prc', + 'application/x-ms-application' => 'application', + 'application/x-ms-shortcut' => 'lnk', + 'application/x-ms-wmd' => 'wmd', + 'application/x-ms-wmz' => 'wmz', + 'application/x-ms-xbap' => 'xbap', + 'application/x-msaccess' => 'mdb', + 'application/x-msbinder' => 'obd', + 'application/x-mscardfile' => 'crd', + 'application/x-msclip' => 'clp', + 'application/x-msdownload' => 'exe', + 'application/x-msmediaview' => 'mvb', + 'application/x-msmetafile' => 'wmf', + 'application/x-msmoney' => 'mny', + 'application/x-mspublisher' => 'pub', + 'application/x-msschedule' => 'scd', + 'application/x-msterminal' => 'trm', + 'application/x-mswrite' => 'wri', + 'application/x-netcdf' => 'nc', + 'application/x-nzb' => 'nzb', + 'application/x-pkcs12' => 'p12', + 'application/x-pkcs7-certificates' => 'p7b', + 'application/x-pkcs7-certreqresp' => 'p7r', + 'application/x-rar-compressed' => 'rar', + 'application/x-rar' => 'rar', + 'application/x-research-info-systems' => 'ris', + 'application/x-sh' => 'sh', + 'application/x-shar' => 'shar', + 'application/x-shockwave-flash' => 'swf', + 'application/x-silverlight-app' => 'xap', + 'application/x-sql' => 'sql', + 'application/x-stuffit' => 'sit', + 'application/x-stuffitx' => 'sitx', + 'application/x-subrip' => 'srt', + 'application/x-sv4cpio' => 'sv4cpio', + 'application/x-sv4crc' => 'sv4crc', + 'application/x-t3vm-image' => 't3', + 'application/x-tads' => 'gam', + 'application/x-tar' => 'tar', + 'application/x-tcl' => 'tcl', + 'application/x-tex' => 'tex', + 'application/x-tex-tfm' => 'tfm', + 'application/x-texinfo' => 'texinfo', + 'application/x-tgif' => 'obj', + 'application/x-ustar' => 'ustar', + 'application/x-wais-source' => 'src', + 'application/x-x509-ca-cert' => 'der', + 'application/x-xfig' => 'fig', + 'application/x-xliff+xml' => 'xlf', + 'application/x-xpinstall' => 'xpi', + 'application/x-xz' => 'xz', + 'application/x-zmachine' => 'z1', + 'application/xaml+xml' => 'xaml', + 'application/xcap-diff+xml' => 'xdf', + 'application/xenc+xml' => 'xenc', + 'application/xhtml+xml' => 'xhtml', + 'application/xml' => 'xml', + 'application/xml-dtd' => 'dtd', + 'application/xop+xml' => 'xop', + 'application/xproc+xml' => 'xpl', + 'application/xslt+xml' => 'xslt', + 'application/xspf+xml' => 'xspf', + 'application/xv+xml' => 'mxml', + 'application/yang' => 'yang', + 'application/yin+xml' => 'yin', + 'application/zip' => 'zip', + 'audio/adpcm' => 'adp', + 'audio/basic' => 'au', + 'audio/midi' => 'mid', + 'audio/mp4' => 'mp4a', + 'audio/mpeg' => 'mpga', + 'audio/ogg' => 'oga', + 'audio/s3m' => 's3m', + 'audio/silk' => 'sil', + 'audio/vnd.dece.audio' => 'uva', + 'audio/vnd.digital-winds' => 'eol', + 'audio/vnd.dra' => 'dra', + 'audio/vnd.dts' => 'dts', + 'audio/vnd.dts.hd' => 'dtshd', + 'audio/vnd.lucent.voice' => 'lvp', + 'audio/vnd.ms-playready.media.pya' => 'pya', + 'audio/vnd.nuera.ecelp4800' => 'ecelp4800', + 'audio/vnd.nuera.ecelp7470' => 'ecelp7470', + 'audio/vnd.nuera.ecelp9600' => 'ecelp9600', + 'audio/vnd.rip' => 'rip', + 'audio/webm' => 'weba', + 'audio/x-aac' => 'aac', + 'audio/x-aiff' => 'aif', + 'audio/x-caf' => 'caf', + 'audio/x-flac' => 'flac', + 'audio/x-matroska' => 'mka', + 'audio/x-mpegurl' => 'm3u', + 'audio/x-ms-wax' => 'wax', + 'audio/x-ms-wma' => 'wma', + 'audio/x-pn-realaudio' => 'ram', + 'audio/x-pn-realaudio-plugin' => 'rmp', + 'audio/x-wav' => 'wav', + 'audio/xm' => 'xm', + 'chemical/x-cdx' => 'cdx', + 'chemical/x-cif' => 'cif', + 'chemical/x-cmdf' => 'cmdf', + 'chemical/x-cml' => 'cml', + 'chemical/x-csml' => 'csml', + 'chemical/x-xyz' => 'xyz', + 'image/bmp' => 'bmp', + 'image/x-ms-bmp' => 'bmp', + 'image/cgm' => 'cgm', + 'image/g3fax' => 'g3', + 'image/gif' => 'gif', + 'image/ief' => 'ief', + 'image/jpeg' => 'jpeg', + 'image/pjpeg' => 'jpeg', + 'image/ktx' => 'ktx', + 'image/png' => 'png', + 'image/prs.btif' => 'btif', + 'image/sgi' => 'sgi', + 'image/svg+xml' => 'svg', + 'image/tiff' => 'tiff', + 'image/vnd.adobe.photoshop' => 'psd', + 'image/vnd.dece.graphic' => 'uvi', + 'image/vnd.dvb.subtitle' => 'sub', + 'image/vnd.djvu' => 'djvu', + 'image/vnd.dwg' => 'dwg', + 'image/vnd.dxf' => 'dxf', + 'image/vnd.fastbidsheet' => 'fbs', + 'image/vnd.fpx' => 'fpx', + 'image/vnd.fst' => 'fst', + 'image/vnd.fujixerox.edmics-mmr' => 'mmr', + 'image/vnd.fujixerox.edmics-rlc' => 'rlc', + 'image/vnd.ms-modi' => 'mdi', + 'image/vnd.ms-photo' => 'wdp', + 'image/vnd.net-fpx' => 'npx', + 'image/vnd.wap.wbmp' => 'wbmp', + 'image/vnd.xiff' => 'xif', + 'image/webp' => 'webp', + 'image/x-3ds' => '3ds', + 'image/x-cmu-raster' => 'ras', + 'image/x-cmx' => 'cmx', + 'image/x-freehand' => 'fh', + 'image/x-icon' => 'ico', + 'image/x-mrsid-image' => 'sid', + 'image/x-pcx' => 'pcx', + 'image/x-pict' => 'pic', + 'image/x-portable-anymap' => 'pnm', + 'image/x-portable-bitmap' => 'pbm', + 'image/x-portable-graymap' => 'pgm', + 'image/x-portable-pixmap' => 'ppm', + 'image/x-rgb' => 'rgb', + 'image/x-tga' => 'tga', + 'image/x-xbitmap' => 'xbm', + 'image/x-xpixmap' => 'xpm', + 'image/x-xwindowdump' => 'xwd', + 'message/rfc822' => 'eml', + 'model/iges' => 'igs', + 'model/mesh' => 'msh', + 'model/vnd.collada+xml' => 'dae', + 'model/vnd.dwf' => 'dwf', + 'model/vnd.gdl' => 'gdl', + 'model/vnd.gtw' => 'gtw', + 'model/vnd.mts' => 'mts', + 'model/vnd.vtu' => 'vtu', + 'model/vrml' => 'wrl', + 'model/x3d+binary' => 'x3db', + 'model/x3d+vrml' => 'x3dv', + 'model/x3d+xml' => 'x3d', + 'text/cache-manifest' => 'appcache', + 'text/calendar' => 'ics', + 'text/css' => 'css', + 'text/csv' => 'csv', + 'text/html' => 'html', + 'text/n3' => 'n3', + 'text/plain' => 'txt', + 'text/prs.lines.tag' => 'dsc', + 'text/richtext' => 'rtx', + 'text/rtf' => 'rtf', + 'text/sgml' => 'sgml', + 'text/tab-separated-values' => 'tsv', + 'text/troff' => 't', + 'text/turtle' => 'ttl', + 'text/uri-list' => 'uri', + 'text/vcard' => 'vcard', + 'text/vnd.curl' => 'curl', + 'text/vnd.curl.dcurl' => 'dcurl', + 'text/vnd.curl.scurl' => 'scurl', + 'text/vnd.curl.mcurl' => 'mcurl', + 'text/vnd.dvb.subtitle' => 'sub', + 'text/vnd.fly' => 'fly', + 'text/vnd.fmi.flexstor' => 'flx', + 'text/vnd.graphviz' => 'gv', + 'text/vnd.in3d.3dml' => '3dml', + 'text/vnd.in3d.spot' => 'spot', + 'text/vnd.sun.j2me.app-descriptor' => 'jad', + 'text/vnd.wap.wml' => 'wml', + 'text/vnd.wap.wmlscript' => 'wmls', + 'text/x-asm' => 's', + 'text/x-c' => 'c', + 'text/x-fortran' => 'f', + 'text/x-pascal' => 'p', + 'text/x-java-source' => 'java', + 'text/x-opml' => 'opml', + 'text/x-nfo' => 'nfo', + 'text/x-setext' => 'etx', + 'text/x-sfv' => 'sfv', + 'text/x-uuencode' => 'uu', + 'text/x-vcalendar' => 'vcs', + 'text/x-vcard' => 'vcf', + 'video/3gpp' => '3gp', + 'video/3gpp2' => '3g2', + 'video/h261' => 'h261', + 'video/h263' => 'h263', + 'video/h264' => 'h264', + 'video/jpeg' => 'jpgv', + 'video/jpm' => 'jpm', + 'video/mj2' => 'mj2', + 'video/mp4' => 'mp4', + 'video/mpeg' => 'mpeg', + 'video/ogg' => 'ogv', + 'video/quicktime' => 'qt', + 'video/vnd.dece.hd' => 'uvh', + 'video/vnd.dece.mobile' => 'uvm', + 'video/vnd.dece.pd' => 'uvp', + 'video/vnd.dece.sd' => 'uvs', + 'video/vnd.dece.video' => 'uvv', + 'video/vnd.dvb.file' => 'dvb', + 'video/vnd.fvt' => 'fvt', + 'video/vnd.mpegurl' => 'mxu', + 'video/vnd.ms-playready.media.pyv' => 'pyv', + 'video/vnd.uvvu.mp4' => 'uvu', + 'video/vnd.vivo' => 'viv', + 'video/webm' => 'webm', + 'video/x-f4v' => 'f4v', + 'video/x-fli' => 'fli', + 'video/x-flv' => 'flv', + 'video/x-m4v' => 'm4v', + 'video/x-matroska' => 'mkv', + 'video/x-mng' => 'mng', + 'video/x-ms-asf' => 'asf', + 'video/x-ms-vob' => 'vob', + 'video/x-ms-wm' => 'wm', + 'video/x-ms-wmv' => 'wmv', + 'video/x-ms-wmx' => 'wmx', + 'video/x-ms-wvx' => 'wvx', + 'video/x-msvideo' => 'avi', + 'video/x-sgi-movie' => 'movie', + 'video/x-smv' => 'smv', + 'x-conference/x-cooltalk' => 'ice', + ); + + /** + * {@inheritdoc} + */ + public function guess($mimeType) + { + return isset($this->defaultExtensions[$mimeType]) ? $this->defaultExtensions[$mimeType] : null; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php new file mode 100644 index 0000000000000000000000000000000000000000..69c803b4993bc5821cbb86a87f9dc1b6fd209730 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php @@ -0,0 +1,144 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\File\MimeType; + +use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; +use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; + +/** + * A singleton mime type guesser. + * + * By default, all mime type guessers provided by the framework are installed + * (if available on the current OS/PHP setup). + * + * You can register custom guessers by calling the register() method on the + * singleton instance. Custom guessers are always called before any default ones. + * + * $guesser = MimeTypeGuesser::getInstance(); + * $guesser->register(new MyCustomMimeTypeGuesser()); + * + * If you want to change the order of the default guessers, just re-register your + * preferred one as a custom one. The last registered guesser is preferred over + * previously registered ones. + * + * Re-registering a built-in guesser also allows you to configure it: + * + * $guesser = MimeTypeGuesser::getInstance(); + * $guesser->register(new FileinfoMimeTypeGuesser('/path/to/magic/file')); + * + * @author Bernhard Schussek + */ +class MimeTypeGuesser implements MimeTypeGuesserInterface +{ + /** + * The singleton instance. + * + * @var MimeTypeGuesser + */ + private static $instance = null; + + /** + * All registered MimeTypeGuesserInterface instances. + * + * @var array + */ + protected $guessers = array(); + + /** + * Returns the singleton instance. + * + * @return self + */ + public static function getInstance() + { + if (null === self::$instance) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Resets the singleton instance. + */ + public static function reset() + { + self::$instance = null; + } + + /** + * Registers all natively provided mime type guessers. + */ + private function __construct() + { + if (FileBinaryMimeTypeGuesser::isSupported()) { + $this->register(new FileBinaryMimeTypeGuesser()); + } + + if (FileinfoMimeTypeGuesser::isSupported()) { + $this->register(new FileinfoMimeTypeGuesser()); + } + } + + /** + * Registers a new mime type guesser. + * + * When guessing, this guesser is preferred over previously registered ones. + * + * @param MimeTypeGuesserInterface $guesser + */ + public function register(MimeTypeGuesserInterface $guesser) + { + array_unshift($this->guessers, $guesser); + } + + /** + * Tries to guess the mime type of the given file. + * + * The file is passed to each registered mime type guesser in reverse order + * of their registration (last registered is queried first). Once a guesser + * returns a value that is not NULL, this method terminates and returns the + * value. + * + * @param string $path The path to the file + * + * @return string The mime type or NULL, if none could be guessed + * + * @throws \LogicException + * @throws FileNotFoundException + * @throws AccessDeniedException + */ + public function guess($path) + { + if (!is_file($path)) { + throw new FileNotFoundException($path); + } + + if (!is_readable($path)) { + throw new AccessDeniedException($path); + } + + if (!$this->guessers) { + $msg = 'Unable to guess the mime type as no guessers are available'; + if (!FileinfoMimeTypeGuesser::isSupported()) { + $msg .= ' (Did you enable the php_fileinfo extension?)'; + } + throw new \LogicException($msg); + } + + foreach ($this->guessers as $guesser) { + if (null !== $mimeType = $guesser->guess($path)) { + return $mimeType; + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..f8c3ad2289cc93fe77ddb2af14ff40e0535c4940 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\File\MimeType; + +use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; +use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; + +/** + * Guesses the mime type of a file. + * + * @author Bernhard Schussek + */ +interface MimeTypeGuesserInterface +{ + /** + * Guesses the mime type of the file with the given path. + * + * @param string $path The path to the file + * + * @return string The mime type or NULL, if none could be guessed + * + * @throws FileNotFoundException If the file does not exist + * @throws AccessDeniedException If the file could not be read + */ + public function guess($path); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/UploadedFile.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/UploadedFile.php new file mode 100644 index 0000000000000000000000000000000000000000..10837726cde5c24a224da0069f147bf2a476431e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/UploadedFile.php @@ -0,0 +1,293 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\File; + +use Symfony\Component\HttpFoundation\File\Exception\FileException; +use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; +use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser; + +/** + * A file uploaded through a form. + * + * @author Bernhard Schussek + * @author Florian Eckerstorfer + * @author Fabien Potencier + */ +class UploadedFile extends File +{ + /** + * Whether the test mode is activated. + * + * Local files are used in test mode hence the code should not enforce HTTP uploads. + * + * @var bool + */ + private $test = false; + + /** + * The original name of the uploaded file. + * + * @var string + */ + private $originalName; + + /** + * The mime type provided by the uploader. + * + * @var string + */ + private $mimeType; + + /** + * The file size provided by the uploader. + * + * @var int|null + */ + private $size; + + /** + * The UPLOAD_ERR_XXX constant provided by the uploader. + * + * @var int + */ + private $error; + + /** + * Accepts the information of the uploaded file as provided by the PHP global $_FILES. + * + * The file object is only created when the uploaded file is valid (i.e. when the + * isValid() method returns true). Otherwise the only methods that could be called + * on an UploadedFile instance are: + * + * * getClientOriginalName, + * * getClientMimeType, + * * isValid, + * * getError. + * + * Calling any other method on an non-valid instance will cause an unpredictable result. + * + * @param string $path The full temporary path to the file + * @param string $originalName The original file name + * @param string|null $mimeType The type of the file as provided by PHP; null defaults to application/octet-stream + * @param int|null $size The file size + * @param int|null $error The error constant of the upload (one of PHP's UPLOAD_ERR_XXX constants); null defaults to UPLOAD_ERR_OK + * @param bool $test Whether the test mode is active + * + * @throws FileException If file_uploads is disabled + * @throws FileNotFoundException If the file does not exist + */ + public function __construct($path, $originalName, $mimeType = null, $size = null, $error = null, $test = false) + { + $this->originalName = $this->getName($originalName); + $this->mimeType = $mimeType ?: 'application/octet-stream'; + $this->size = $size; + $this->error = $error ?: UPLOAD_ERR_OK; + $this->test = (bool) $test; + + parent::__construct($path, UPLOAD_ERR_OK === $this->error); + } + + /** + * Returns the original file name. + * + * It is extracted from the request from which the file has been uploaded. + * Then it should not be considered as a safe value. + * + * @return string|null The original name + */ + public function getClientOriginalName() + { + return $this->originalName; + } + + /** + * Returns the original file extension. + * + * It is extracted from the original file name that was uploaded. + * Then it should not be considered as a safe value. + * + * @return string The extension + */ + public function getClientOriginalExtension() + { + return pathinfo($this->originalName, PATHINFO_EXTENSION); + } + + /** + * Returns the file mime type. + * + * The client mime type is extracted from the request from which the file + * was uploaded, so it should not be considered as a safe value. + * + * For a trusted mime type, use getMimeType() instead (which guesses the mime + * type based on the file content). + * + * @return string|null The mime type + * + * @see getMimeType() + */ + public function getClientMimeType() + { + return $this->mimeType; + } + + /** + * Returns the extension based on the client mime type. + * + * If the mime type is unknown, returns null. + * + * This method uses the mime type as guessed by getClientMimeType() + * to guess the file extension. As such, the extension returned + * by this method cannot be trusted. + * + * For a trusted extension, use guessExtension() instead (which guesses + * the extension based on the guessed mime type for the file). + * + * @return string|null The guessed extension or null if it cannot be guessed + * + * @see guessExtension() + * @see getClientMimeType() + */ + public function guessClientExtension() + { + $type = $this->getClientMimeType(); + $guesser = ExtensionGuesser::getInstance(); + + return $guesser->guess($type); + } + + /** + * Returns the file size. + * + * It is extracted from the request from which the file has been uploaded. + * Then it should not be considered as a safe value. + * + * @return int|null The file size + */ + public function getClientSize() + { + return $this->size; + } + + /** + * Returns the upload error. + * + * If the upload was successful, the constant UPLOAD_ERR_OK is returned. + * Otherwise one of the other UPLOAD_ERR_XXX constants is returned. + * + * @return int The upload error + */ + public function getError() + { + return $this->error; + } + + /** + * Returns whether the file was uploaded successfully. + * + * @return bool True if the file has been uploaded with HTTP and no error occurred + */ + public function isValid() + { + $isOk = $this->error === UPLOAD_ERR_OK; + + return $this->test ? $isOk : $isOk && is_uploaded_file($this->getPathname()); + } + + /** + * Moves the file to a new location. + * + * @param string $directory The destination folder + * @param string $name The new file name + * + * @return File A File object representing the new file + * + * @throws FileException if, for any reason, the file could not have been moved + */ + public function move($directory, $name = null) + { + if ($this->isValid()) { + if ($this->test) { + return parent::move($directory, $name); + } + + $target = $this->getTargetFile($directory, $name); + + if (!@move_uploaded_file($this->getPathname(), $target)) { + $error = error_get_last(); + throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, strip_tags($error['message']))); + } + + @chmod($target, 0666 & ~umask()); + + return $target; + } + + throw new FileException($this->getErrorMessage()); + } + + /** + * Returns the maximum size of an uploaded file as configured in php.ini. + * + * @return int The maximum size of an uploaded file in bytes + */ + public static function getMaxFilesize() + { + $iniMax = strtolower(ini_get('upload_max_filesize')); + + if ('' === $iniMax) { + return PHP_INT_MAX; + } + + $max = ltrim($iniMax, '+'); + if (0 === strpos($max, '0x')) { + $max = intval($max, 16); + } elseif (0 === strpos($max, '0')) { + $max = intval($max, 8); + } else { + $max = (int) $max; + } + + switch (substr($iniMax, -1)) { + case 't': $max *= 1024; + case 'g': $max *= 1024; + case 'm': $max *= 1024; + case 'k': $max *= 1024; + } + + return $max; + } + + /** + * Returns an informative upload error message. + * + * @return string The error message regarding the specified error code + */ + public function getErrorMessage() + { + static $errors = array( + UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d KiB).', + UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.', + UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.', + UPLOAD_ERR_NO_FILE => 'No file was uploaded.', + UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.', + UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.', + UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.', + ); + + $errorCode = $this->error; + $maxFilesize = $errorCode === UPLOAD_ERR_INI_SIZE ? self::getMaxFilesize() / 1024 : 0; + $message = isset($errors[$errorCode]) ? $errors[$errorCode] : 'The file "%s" was not uploaded due to an unknown error.'; + + return sprintf($message, $this->getClientOriginalName(), $maxFilesize); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/FileBag.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/FileBag.php new file mode 100644 index 0000000000000000000000000000000000000000..197eab42f6c99e5ffb57fcda32c2db9df5f26b73 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/FileBag.php @@ -0,0 +1,145 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +use Symfony\Component\HttpFoundation\File\UploadedFile; + +/** + * FileBag is a container for uploaded files. + * + * @author Fabien Potencier + * @author Bulat Shakirzyanov + */ +class FileBag extends ParameterBag +{ + private static $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type'); + + /** + * Constructor. + * + * @param array $parameters An array of HTTP files + */ + public function __construct(array $parameters = array()) + { + $this->replace($parameters); + } + + /** + * {@inheritdoc} + */ + public function replace(array $files = array()) + { + $this->parameters = array(); + $this->add($files); + } + + /** + * {@inheritdoc} + */ + public function set($key, $value) + { + if (!is_array($value) && !$value instanceof UploadedFile) { + throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.'); + } + + parent::set($key, $this->convertFileInformation($value)); + } + + /** + * {@inheritdoc} + */ + public function add(array $files = array()) + { + foreach ($files as $key => $file) { + $this->set($key, $file); + } + } + + /** + * Converts uploaded files to UploadedFile instances. + * + * @param array|UploadedFile $file A (multi-dimensional) array of uploaded file information + * + * @return array A (multi-dimensional) array of UploadedFile instances + */ + protected function convertFileInformation($file) + { + if ($file instanceof UploadedFile) { + return $file; + } + + $file = $this->fixPhpFilesArray($file); + if (is_array($file)) { + $keys = array_keys($file); + sort($keys); + + if ($keys == self::$fileKeys) { + if (UPLOAD_ERR_NO_FILE == $file['error']) { + $file = null; + } else { + $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error']); + } + } else { + $file = array_map(array($this, 'convertFileInformation'), $file); + } + } + + return $file; + } + + /** + * Fixes a malformed PHP $_FILES array. + * + * PHP has a bug that the format of the $_FILES array differs, depending on + * whether the uploaded file fields had normal field names or array-like + * field names ("normal" vs. "parent[child]"). + * + * This method fixes the array to look like the "normal" $_FILES array. + * + * It's safe to pass an already converted array, in which case this method + * just returns the original array unmodified. + * + * @param array $data + * + * @return array + */ + protected function fixPhpFilesArray($data) + { + if (!is_array($data)) { + return $data; + } + + $keys = array_keys($data); + sort($keys); + + if (self::$fileKeys != $keys || !isset($data['name']) || !is_array($data['name'])) { + return $data; + } + + $files = $data; + foreach (self::$fileKeys as $k) { + unset($files[$k]); + } + + foreach ($data['name'] as $key => $name) { + $files[$key] = $this->fixPhpFilesArray(array( + 'error' => $data['error'][$key], + 'name' => $name, + 'type' => $data['type'][$key], + 'tmp_name' => $data['tmp_name'][$key], + 'size' => $data['size'][$key], + )); + } + + return $files; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/HeaderBag.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/HeaderBag.php new file mode 100644 index 0000000000000000000000000000000000000000..29bac5e51341411e0a51630b1996141d67a68407 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/HeaderBag.php @@ -0,0 +1,324 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * HeaderBag is a container for HTTP headers. + * + * @author Fabien Potencier + */ +class HeaderBag implements \IteratorAggregate, \Countable +{ + protected $headers = array(); + protected $cacheControl = array(); + + /** + * Constructor. + * + * @param array $headers An array of HTTP headers + */ + public function __construct(array $headers = array()) + { + foreach ($headers as $key => $values) { + $this->set($key, $values); + } + } + + /** + * Returns the headers as a string. + * + * @return string The headers + */ + public function __toString() + { + if (!$this->headers) { + return ''; + } + + $max = max(array_map('strlen', array_keys($this->headers))) + 1; + $content = ''; + ksort($this->headers); + foreach ($this->headers as $name => $values) { + $name = implode('-', array_map('ucfirst', explode('-', $name))); + foreach ($values as $value) { + $content .= sprintf("%-{$max}s %s\r\n", $name.':', $value); + } + } + + return $content; + } + + /** + * Returns the headers. + * + * @return array An array of headers + */ + public function all() + { + return $this->headers; + } + + /** + * Returns the parameter keys. + * + * @return array An array of parameter keys + */ + public function keys() + { + return array_keys($this->headers); + } + + /** + * Replaces the current HTTP headers by a new set. + * + * @param array $headers An array of HTTP headers + */ + public function replace(array $headers = array()) + { + $this->headers = array(); + $this->add($headers); + } + + /** + * Adds new headers the current HTTP headers set. + * + * @param array $headers An array of HTTP headers + */ + public function add(array $headers) + { + foreach ($headers as $key => $values) { + $this->set($key, $values); + } + } + + /** + * Returns a header value by name. + * + * @param string $key The header name + * @param mixed $default The default value + * @param bool $first Whether to return the first value or all header values + * + * @return string|array The first header value if $first is true, an array of values otherwise + */ + public function get($key, $default = null, $first = true) + { + $key = str_replace('_', '-', strtolower($key)); + + if (!array_key_exists($key, $this->headers)) { + if (null === $default) { + return $first ? null : array(); + } + + return $first ? $default : array($default); + } + + if ($first) { + return count($this->headers[$key]) ? $this->headers[$key][0] : $default; + } + + return $this->headers[$key]; + } + + /** + * Sets a header by name. + * + * @param string $key The key + * @param string|array $values The value or an array of values + * @param bool $replace Whether to replace the actual value or not (true by default) + */ + public function set($key, $values, $replace = true) + { + $key = str_replace('_', '-', strtolower($key)); + + $values = array_values((array) $values); + + if (true === $replace || !isset($this->headers[$key])) { + $this->headers[$key] = $values; + } else { + $this->headers[$key] = array_merge($this->headers[$key], $values); + } + + if ('cache-control' === $key) { + $this->cacheControl = $this->parseCacheControl($values[0]); + } + } + + /** + * Returns true if the HTTP header is defined. + * + * @param string $key The HTTP header + * + * @return bool true if the parameter exists, false otherwise + */ + public function has($key) + { + return array_key_exists(str_replace('_', '-', strtolower($key)), $this->headers); + } + + /** + * Returns true if the given HTTP header contains the given value. + * + * @param string $key The HTTP header name + * @param string $value The HTTP value + * + * @return bool true if the value is contained in the header, false otherwise + */ + public function contains($key, $value) + { + return in_array($value, $this->get($key, null, false)); + } + + /** + * Removes a header. + * + * @param string $key The HTTP header name + */ + public function remove($key) + { + $key = str_replace('_', '-', strtolower($key)); + + unset($this->headers[$key]); + + if ('cache-control' === $key) { + $this->cacheControl = array(); + } + } + + /** + * Returns the HTTP header value converted to a date. + * + * @param string $key The parameter key + * @param \DateTime $default The default value + * + * @return null|\DateTime The parsed DateTime or the default value if the header does not exist + * + * @throws \RuntimeException When the HTTP header is not parseable + */ + public function getDate($key, \DateTime $default = null) + { + if (null === $value = $this->get($key)) { + return $default; + } + + if (false === $date = \DateTime::createFromFormat(DATE_RFC2822, $value)) { + throw new \RuntimeException(sprintf('The %s HTTP header is not parseable (%s).', $key, $value)); + } + + return $date; + } + + /** + * Adds a custom Cache-Control directive. + * + * @param string $key The Cache-Control directive name + * @param mixed $value The Cache-Control directive value + */ + public function addCacheControlDirective($key, $value = true) + { + $this->cacheControl[$key] = $value; + + $this->set('Cache-Control', $this->getCacheControlHeader()); + } + + /** + * Returns true if the Cache-Control directive is defined. + * + * @param string $key The Cache-Control directive + * + * @return bool true if the directive exists, false otherwise + */ + public function hasCacheControlDirective($key) + { + return array_key_exists($key, $this->cacheControl); + } + + /** + * Returns a Cache-Control directive value by name. + * + * @param string $key The directive name + * + * @return mixed|null The directive value if defined, null otherwise + */ + public function getCacheControlDirective($key) + { + return array_key_exists($key, $this->cacheControl) ? $this->cacheControl[$key] : null; + } + + /** + * Removes a Cache-Control directive. + * + * @param string $key The Cache-Control directive + */ + public function removeCacheControlDirective($key) + { + unset($this->cacheControl[$key]); + + $this->set('Cache-Control', $this->getCacheControlHeader()); + } + + /** + * Returns an iterator for headers. + * + * @return \ArrayIterator An \ArrayIterator instance + */ + public function getIterator() + { + return new \ArrayIterator($this->headers); + } + + /** + * Returns the number of headers. + * + * @return int The number of headers + */ + public function count() + { + return count($this->headers); + } + + protected function getCacheControlHeader() + { + $parts = array(); + ksort($this->cacheControl); + foreach ($this->cacheControl as $key => $value) { + if (true === $value) { + $parts[] = $key; + } else { + if (preg_match('#[^a-zA-Z0-9._-]#', $value)) { + $value = '"'.$value.'"'; + } + + $parts[] = "$key=$value"; + } + } + + return implode(', ', $parts); + } + + /** + * Parses a Cache-Control HTTP header. + * + * @param string $header The value of the Cache-Control HTTP header + * + * @return array An array representing the attribute values + */ + protected function parseCacheControl($header) + { + $cacheControl = array(); + preg_match_all('#([a-zA-Z][a-zA-Z_-]*)\s*(?:=(?:"([^"]*)"|([^ \t",;]*)))?#', $header, $matches, PREG_SET_ORDER); + foreach ($matches as $match) { + $cacheControl[strtolower($match[1])] = isset($match[3]) ? $match[3] : (isset($match[2]) ? $match[2] : true); + } + + return $cacheControl; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/IpUtils.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/IpUtils.php new file mode 100644 index 0000000000000000000000000000000000000000..28093be43403fb6c566088981fddecfc3556d40d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/IpUtils.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\HttpFoundation; + +/** + * Http utility functions. + * + * @author Fabien Potencier + */ +class IpUtils +{ + /** + * This class should not be instantiated. + */ + private function __construct() + { + } + + /** + * Checks if an IPv4 or IPv6 address is contained in the list of given IPs or subnets. + * + * @param string $requestIp IP to check + * @param string|array $ips List of IPs or subnets (can be a string if only a single one) + * + * @return bool Whether the IP is valid + */ + public static function checkIp($requestIp, $ips) + { + if (!is_array($ips)) { + $ips = array($ips); + } + + $method = substr_count($requestIp, ':') > 1 ? 'checkIp6' : 'checkIp4'; + + foreach ($ips as $ip) { + if (self::$method($requestIp, $ip)) { + return true; + } + } + + return false; + } + + /** + * Compares two IPv4 addresses. + * In case a subnet is given, it checks if it contains the request IP. + * + * @param string $requestIp IPv4 address to check + * @param string $ip IPv4 address or subnet in CIDR notation + * + * @return bool Whether the request IP matches the IP, or whether the request IP is within the CIDR subnet + */ + public static function checkIp4($requestIp, $ip) + { + if (!filter_var($requestIp, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { + return false; + } + + if (false !== strpos($ip, '/')) { + list($address, $netmask) = explode('/', $ip, 2); + + if ($netmask === '0') { + return filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4); + } + + if ($netmask < 0 || $netmask > 32) { + return false; + } + } else { + $address = $ip; + $netmask = 32; + } + + return 0 === substr_compare(sprintf('%032b', ip2long($requestIp)), sprintf('%032b', ip2long($address)), 0, $netmask); + } + + /** + * Compares two IPv6 addresses. + * In case a subnet is given, it checks if it contains the request IP. + * + * @author David Soria Parra + * + * @see https://github.com/dsp/v6tools + * + * @param string $requestIp IPv6 address to check + * @param string $ip IPv6 address or subnet in CIDR notation + * + * @return bool Whether the IP is valid + * + * @throws \RuntimeException When IPV6 support is not enabled + */ + public static function checkIp6($requestIp, $ip) + { + if (!((extension_loaded('sockets') && defined('AF_INET6')) || @inet_pton('::1'))) { + throw new \RuntimeException('Unable to check Ipv6. Check that PHP was not compiled with option "disable-ipv6".'); + } + + if (false !== strpos($ip, '/')) { + list($address, $netmask) = explode('/', $ip, 2); + + if ($netmask < 1 || $netmask > 128) { + return false; + } + } else { + $address = $ip; + $netmask = 128; + } + + $bytesAddr = unpack('n*', @inet_pton($address)); + $bytesTest = unpack('n*', @inet_pton($requestIp)); + + if (!$bytesAddr || !$bytesTest) { + return false; + } + + for ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; ++$i) { + $left = $netmask - 16 * ($i - 1); + $left = ($left <= 16) ? $left : 16; + $mask = ~(0xffff >> $left) & 0xffff; + if (($bytesAddr[$i] & $mask) != ($bytesTest[$i] & $mask)) { + return false; + } + } + + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/JsonResponse.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/JsonResponse.php new file mode 100644 index 0000000000000000000000000000000000000000..cf1a11ea2c07b690939d7b19600c5b668c0ee54b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/JsonResponse.php @@ -0,0 +1,214 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * Response represents an HTTP response in JSON format. + * + * Note that this class does not force the returned JSON content to be an + * object. It is however recommended that you do return an object as it + * protects yourself against XSSI and JSON-JavaScript Hijacking. + * + * @see https://www.owasp.org/index.php/OWASP_AJAX_Security_Guidelines#Always_return_JSON_with_an_Object_on_the_outside + * + * @author Igor Wiedler + */ +class JsonResponse extends Response +{ + protected $data; + protected $callback; + + // Encode <, >, ', &, and " characters in the JSON, making it also safe to be embedded into HTML. + // 15 === JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT + const DEFAULT_ENCODING_OPTIONS = 15; + + protected $encodingOptions = self::DEFAULT_ENCODING_OPTIONS; + + /** + * @param mixed $data The response data + * @param int $status The response status code + * @param array $headers An array of response headers + * @param bool $json If the data is already a JSON string + */ + public function __construct($data = null, $status = 200, $headers = array(), $json = false) + { + parent::__construct('', $status, $headers); + + if (null === $data) { + $data = new \ArrayObject(); + } + + $json ? $this->setJson($data) : $this->setData($data); + } + + /** + * Factory method for chainability. + * + * Example: + * + * return JsonResponse::create($data, 200) + * ->setSharedMaxAge(300); + * + * @param mixed $data The json response data + * @param int $status The response status code + * @param array $headers An array of response headers + * + * @return static + */ + public static function create($data = null, $status = 200, $headers = array()) + { + return new static($data, $status, $headers); + } + + /** + * Make easier the creation of JsonResponse from raw json. + */ + public static function fromJsonString($data = null, $status = 200, $headers = array()) + { + return new static($data, $status, $headers, true); + } + + /** + * Sets the JSONP callback. + * + * @param string|null $callback The JSONP callback or null to use none + * + * @return $this + * + * @throws \InvalidArgumentException When the callback name is not valid + */ + public function setCallback($callback = null) + { + if (null !== $callback) { + // partially taken from http://www.geekality.net/2011/08/03/valid-javascript-identifier/ + // partially taken from https://github.com/willdurand/JsonpCallbackValidator + // JsonpCallbackValidator is released under the MIT License. See https://github.com/willdurand/JsonpCallbackValidator/blob/v1.1.0/LICENSE for details. + // (c) William Durand + $pattern = '/^[$_\p{L}][$_\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*(?:\[(?:"(?:\\\.|[^"\\\])*"|\'(?:\\\.|[^\'\\\])*\'|\d+)\])*?$/u'; + $reserved = array( + 'break', 'do', 'instanceof', 'typeof', 'case', 'else', 'new', 'var', 'catch', 'finally', 'return', 'void', 'continue', 'for', 'switch', 'while', + 'debugger', 'function', 'this', 'with', 'default', 'if', 'throw', 'delete', 'in', 'try', 'class', 'enum', 'extends', 'super', 'const', 'export', + 'import', 'implements', 'let', 'private', 'public', 'yield', 'interface', 'package', 'protected', 'static', 'null', 'true', 'false', + ); + $parts = explode('.', $callback); + foreach ($parts as $part) { + if (!preg_match($pattern, $part) || in_array($part, $reserved, true)) { + throw new \InvalidArgumentException('The callback name is not valid.'); + } + } + } + + $this->callback = $callback; + + return $this->update(); + } + + /** + * Sets a raw string containing a JSON document to be sent. + * + * @param string $json + * + * @return $this + * + * @throws \InvalidArgumentException + */ + public function setJson($json) + { + $this->data = $json; + + return $this->update(); + } + + /** + * Sets the data to be sent as JSON. + * + * @param mixed $data + * + * @return $this + * + * @throws \InvalidArgumentException + */ + public function setData($data = array()) + { + if (defined('HHVM_VERSION')) { + // HHVM does not trigger any warnings and let exceptions + // thrown from a JsonSerializable object pass through. + // If only PHP did the same... + $data = json_encode($data, $this->encodingOptions); + } else { + try { + // PHP 5.4 and up wrap exceptions thrown by JsonSerializable + // objects in a new exception that needs to be removed. + // Fortunately, PHP 5.5 and up do not trigger any warning anymore. + $data = json_encode($data, $this->encodingOptions); + } catch (\Exception $e) { + if ('Exception' === get_class($e) && 0 === strpos($e->getMessage(), 'Failed calling ')) { + throw $e->getPrevious() ?: $e; + } + throw $e; + } + } + + if (JSON_ERROR_NONE !== json_last_error()) { + throw new \InvalidArgumentException(json_last_error_msg()); + } + + return $this->setJson($data); + } + + /** + * Returns options used while encoding data to JSON. + * + * @return int + */ + public function getEncodingOptions() + { + return $this->encodingOptions; + } + + /** + * Sets options used while encoding data to JSON. + * + * @param int $encodingOptions + * + * @return $this + */ + public function setEncodingOptions($encodingOptions) + { + $this->encodingOptions = (int) $encodingOptions; + + return $this->setData(json_decode($this->data)); + } + + /** + * Updates the content and headers according to the JSON data and callback. + * + * @return $this + */ + protected function update() + { + if (null !== $this->callback) { + // Not using application/javascript for compatibility reasons with older browsers. + $this->headers->set('Content-Type', 'text/javascript'); + + return $this->setContent(sprintf('/**/%s(%s);', $this->callback, $this->data)); + } + + // Only set the header when there is none or when it equals 'text/javascript' (from a previous update with callback) + // in order to not overwrite a custom definition. + if (!$this->headers->has('Content-Type') || 'text/javascript' === $this->headers->get('Content-Type')) { + $this->headers->set('Content-Type', 'application/json'); + } + + return $this->setContent($this->data); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ParameterBag.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ParameterBag.php new file mode 100644 index 0000000000000000000000000000000000000000..c0b36479f5b67c96c504b4deaa3d95e0566d7f66 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ParameterBag.php @@ -0,0 +1,238 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * ParameterBag is a container for key/value pairs. + * + * @author Fabien Potencier + */ +class ParameterBag implements \IteratorAggregate, \Countable +{ + /** + * Parameter storage. + * + * @var array + */ + protected $parameters; + + /** + * Constructor. + * + * @param array $parameters An array of parameters + */ + public function __construct(array $parameters = array()) + { + $this->parameters = $parameters; + } + + /** + * Returns the parameters. + * + * @return array An array of parameters + */ + public function all() + { + return $this->parameters; + } + + /** + * Returns the parameter keys. + * + * @return array An array of parameter keys + */ + public function keys() + { + return array_keys($this->parameters); + } + + /** + * Replaces the current parameters by a new set. + * + * @param array $parameters An array of parameters + */ + public function replace(array $parameters = array()) + { + $this->parameters = $parameters; + } + + /** + * Adds parameters. + * + * @param array $parameters An array of parameters + */ + public function add(array $parameters = array()) + { + $this->parameters = array_replace($this->parameters, $parameters); + } + + /** + * Returns a parameter by name. + * + * @param string $key The key + * @param mixed $default The default value if the parameter key does not exist + * + * @return mixed + */ + public function get($key, $default = null) + { + return array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; + } + + /** + * Sets a parameter by name. + * + * @param string $key The key + * @param mixed $value The value + */ + public function set($key, $value) + { + $this->parameters[$key] = $value; + } + + /** + * Returns true if the parameter is defined. + * + * @param string $key The key + * + * @return bool true if the parameter exists, false otherwise + */ + public function has($key) + { + return array_key_exists($key, $this->parameters); + } + + /** + * Removes a parameter. + * + * @param string $key The key + */ + public function remove($key) + { + unset($this->parameters[$key]); + } + + /** + * Returns the alphabetic characters of the parameter value. + * + * @param string $key The parameter key + * @param string $default The default value if the parameter key does not exist + * + * @return string The filtered value + */ + public function getAlpha($key, $default = '') + { + return preg_replace('/[^[:alpha:]]/', '', $this->get($key, $default)); + } + + /** + * Returns the alphabetic characters and digits of the parameter value. + * + * @param string $key The parameter key + * @param string $default The default value if the parameter key does not exist + * + * @return string The filtered value + */ + public function getAlnum($key, $default = '') + { + return preg_replace('/[^[:alnum:]]/', '', $this->get($key, $default)); + } + + /** + * Returns the digits of the parameter value. + * + * @param string $key The parameter key + * @param string $default The default value if the parameter key does not exist + * + * @return string The filtered value + */ + public function getDigits($key, $default = '') + { + // we need to remove - and + because they're allowed in the filter + return str_replace(array('-', '+'), '', $this->filter($key, $default, FILTER_SANITIZE_NUMBER_INT)); + } + + /** + * Returns the parameter value converted to integer. + * + * @param string $key The parameter key + * @param int $default The default value if the parameter key does not exist + * + * @return int The filtered value + */ + public function getInt($key, $default = 0) + { + return (int) $this->get($key, $default); + } + + /** + * Returns the parameter value converted to boolean. + * + * @param string $key The parameter key + * @param mixed $default The default value if the parameter key does not exist + * + * @return bool The filtered value + */ + public function getBoolean($key, $default = false) + { + return $this->filter($key, $default, FILTER_VALIDATE_BOOLEAN); + } + + /** + * Filter key. + * + * @param string $key Key + * @param mixed $default Default = null + * @param int $filter FILTER_* constant + * @param mixed $options Filter options + * + * @see http://php.net/manual/en/function.filter-var.php + * + * @return mixed + */ + public function filter($key, $default = null, $filter = FILTER_DEFAULT, $options = array()) + { + $value = $this->get($key, $default); + + // Always turn $options into an array - this allows filter_var option shortcuts. + if (!is_array($options) && $options) { + $options = array('flags' => $options); + } + + // Add a convenience check for arrays. + if (is_array($value) && !isset($options['flags'])) { + $options['flags'] = FILTER_REQUIRE_ARRAY; + } + + return filter_var($value, $filter, $options); + } + + /** + * Returns an iterator for parameters. + * + * @return \ArrayIterator An \ArrayIterator instance + */ + public function getIterator() + { + return new \ArrayIterator($this->parameters); + } + + /** + * Returns the number of parameters. + * + * @return int The number of parameters + */ + public function count() + { + return count($this->parameters); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/README.md b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8907f0b9678966d1ca561d4963ddfb239da99609 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/README.md @@ -0,0 +1,14 @@ +HttpFoundation Component +======================== + +The HttpFoundation component defines an object-oriented layer for the HTTP +specification. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/http_foundation/index.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/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RedirectResponse.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RedirectResponse.php new file mode 100644 index 0000000000000000000000000000000000000000..7435999a019f63331bba309d771ce071293b0c67 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RedirectResponse.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * RedirectResponse represents an HTTP response doing a redirect. + * + * @author Fabien Potencier + */ +class RedirectResponse extends Response +{ + protected $targetUrl; + + /** + * Creates a redirect response so that it conforms to the rules defined for a redirect status code. + * + * @param string $url The URL to redirect to. The URL should be a full URL, with schema etc., + * but practically every browser redirects on paths only as well + * @param int $status The status code (302 by default) + * @param array $headers The headers (Location is always set to the given URL) + * + * @throws \InvalidArgumentException + * + * @see http://tools.ietf.org/html/rfc2616#section-10.3 + */ + public function __construct($url, $status = 302, $headers = array()) + { + parent::__construct('', $status, $headers); + + $this->setTargetUrl($url); + + if (!$this->isRedirect()) { + throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status)); + } + + if (301 == $status && !array_key_exists('cache-control', $headers)) { + $this->headers->remove('cache-control'); + } + } + + /** + * {@inheritdoc} + */ + public static function create($url = '', $status = 302, $headers = array()) + { + return new static($url, $status, $headers); + } + + /** + * Returns the target URL. + * + * @return string target URL + */ + public function getTargetUrl() + { + return $this->targetUrl; + } + + /** + * Sets the redirect target of this response. + * + * @param string $url The URL to redirect to + * + * @return $this + * + * @throws \InvalidArgumentException + */ + public function setTargetUrl($url) + { + if (empty($url)) { + throw new \InvalidArgumentException('Cannot redirect to an empty URL.'); + } + + $this->targetUrl = $url; + + $this->setContent( + sprintf(' + + + + + + Redirecting to %1$s + + + Redirecting to %1$s. + +', htmlspecialchars($url, ENT_QUOTES, 'UTF-8'))); + + $this->headers->set('Location', $url); + + return $this; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php new file mode 100644 index 0000000000000000000000000000000000000000..adc73d2b83944fb90818772f3b1453219c67f1a2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php @@ -0,0 +1,2010 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; +use Symfony\Component\HttpFoundation\Session\SessionInterface; + +/** + * Request represents an HTTP request. + * + * The methods dealing with URL accept / return a raw path (% encoded): + * * getBasePath + * * getBaseUrl + * * getPathInfo + * * getRequestUri + * * getUri + * * getUriForPath + * + * @author Fabien Potencier + */ +class Request +{ + const HEADER_FORWARDED = 'forwarded'; + const HEADER_CLIENT_IP = 'client_ip'; + const HEADER_CLIENT_HOST = 'client_host'; + const HEADER_CLIENT_PROTO = 'client_proto'; + const HEADER_CLIENT_PORT = 'client_port'; + + const METHOD_HEAD = 'HEAD'; + const METHOD_GET = 'GET'; + const METHOD_POST = 'POST'; + const METHOD_PUT = 'PUT'; + const METHOD_PATCH = 'PATCH'; + const METHOD_DELETE = 'DELETE'; + const METHOD_PURGE = 'PURGE'; + const METHOD_OPTIONS = 'OPTIONS'; + const METHOD_TRACE = 'TRACE'; + const METHOD_CONNECT = 'CONNECT'; + + /** + * @var string[] + */ + protected static $trustedProxies = array(); + + /** + * @var string[] + */ + protected static $trustedHostPatterns = array(); + + /** + * @var string[] + */ + protected static $trustedHosts = array(); + + /** + * Names for headers that can be trusted when + * using trusted proxies. + * + * The FORWARDED header is the standard as of rfc7239. + * + * The other headers are non-standard, but widely used + * by popular reverse proxies (like Apache mod_proxy or Amazon EC2). + */ + protected static $trustedHeaders = array( + self::HEADER_FORWARDED => 'FORWARDED', + self::HEADER_CLIENT_IP => 'X_FORWARDED_FOR', + self::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST', + self::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO', + self::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT', + ); + + protected static $httpMethodParameterOverride = false; + + /** + * Custom parameters. + * + * @var \Symfony\Component\HttpFoundation\ParameterBag + */ + public $attributes; + + /** + * Request body parameters ($_POST). + * + * @var \Symfony\Component\HttpFoundation\ParameterBag + */ + public $request; + + /** + * Query string parameters ($_GET). + * + * @var \Symfony\Component\HttpFoundation\ParameterBag + */ + public $query; + + /** + * Server and execution environment parameters ($_SERVER). + * + * @var \Symfony\Component\HttpFoundation\ServerBag + */ + public $server; + + /** + * Uploaded files ($_FILES). + * + * @var \Symfony\Component\HttpFoundation\FileBag + */ + public $files; + + /** + * Cookies ($_COOKIE). + * + * @var \Symfony\Component\HttpFoundation\ParameterBag + */ + public $cookies; + + /** + * Headers (taken from the $_SERVER). + * + * @var \Symfony\Component\HttpFoundation\HeaderBag + */ + public $headers; + + /** + * @var string + */ + protected $content; + + /** + * @var array + */ + protected $languages; + + /** + * @var array + */ + protected $charsets; + + /** + * @var array + */ + protected $encodings; + + /** + * @var array + */ + protected $acceptableContentTypes; + + /** + * @var string + */ + protected $pathInfo; + + /** + * @var string + */ + protected $requestUri; + + /** + * @var string + */ + protected $baseUrl; + + /** + * @var string + */ + protected $basePath; + + /** + * @var string + */ + protected $method; + + /** + * @var string + */ + protected $format; + + /** + * @var \Symfony\Component\HttpFoundation\Session\SessionInterface + */ + protected $session; + + /** + * @var string + */ + protected $locale; + + /** + * @var string + */ + protected $defaultLocale = 'en'; + + /** + * @var array + */ + protected static $formats; + + protected static $requestFactory; + + /** + * Constructor. + * + * @param array $query The GET parameters + * @param array $request The POST parameters + * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array $cookies The COOKIE parameters + * @param array $files The FILES parameters + * @param array $server The SERVER parameters + * @param string|resource $content The raw body data + */ + public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + { + $this->initialize($query, $request, $attributes, $cookies, $files, $server, $content); + } + + /** + * Sets the parameters for this request. + * + * This method also re-initializes all properties. + * + * @param array $query The GET parameters + * @param array $request The POST parameters + * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array $cookies The COOKIE parameters + * @param array $files The FILES parameters + * @param array $server The SERVER parameters + * @param string|resource $content The raw body data + */ + public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + { + $this->request = new ParameterBag($request); + $this->query = new ParameterBag($query); + $this->attributes = new ParameterBag($attributes); + $this->cookies = new ParameterBag($cookies); + $this->files = new FileBag($files); + $this->server = new ServerBag($server); + $this->headers = new HeaderBag($this->server->getHeaders()); + + $this->content = $content; + $this->languages = null; + $this->charsets = null; + $this->encodings = null; + $this->acceptableContentTypes = null; + $this->pathInfo = null; + $this->requestUri = null; + $this->baseUrl = null; + $this->basePath = null; + $this->method = null; + $this->format = null; + } + + /** + * Creates a new request with values from PHP's super globals. + * + * @return static + */ + public static function createFromGlobals() + { + // With the php's bug #66606, the php's built-in web server + // stores the Content-Type and Content-Length header values in + // HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH fields. + $server = $_SERVER; + if ('cli-server' === PHP_SAPI) { + if (array_key_exists('HTTP_CONTENT_LENGTH', $_SERVER)) { + $server['CONTENT_LENGTH'] = $_SERVER['HTTP_CONTENT_LENGTH']; + } + if (array_key_exists('HTTP_CONTENT_TYPE', $_SERVER)) { + $server['CONTENT_TYPE'] = $_SERVER['HTTP_CONTENT_TYPE']; + } + } + + $request = self::createRequestFromFactory($_GET, $_POST, array(), $_COOKIE, $_FILES, $server); + + if (0 === strpos($request->headers->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded') + && in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE', 'PATCH')) + ) { + parse_str($request->getContent(), $data); + $request->request = new ParameterBag($data); + } + + return $request; + } + + /** + * Creates a Request based on a given URI and configuration. + * + * The information contained in the URI always take precedence + * over the other information (server and parameters). + * + * @param string $uri The URI + * @param string $method The HTTP method + * @param array $parameters The query (GET) or request (POST) parameters + * @param array $cookies The request cookies ($_COOKIE) + * @param array $files The request files ($_FILES) + * @param array $server The server parameters ($_SERVER) + * @param string $content The raw body data + * + * @return static + */ + public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null) + { + $server = array_replace(array( + 'SERVER_NAME' => 'localhost', + 'SERVER_PORT' => 80, + 'HTTP_HOST' => 'localhost', + 'HTTP_USER_AGENT' => 'Symfony/3.X', + 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + 'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5', + 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', + 'REMOTE_ADDR' => '127.0.0.1', + 'SCRIPT_NAME' => '', + 'SCRIPT_FILENAME' => '', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + 'REQUEST_TIME' => time(), + ), $server); + + $server['PATH_INFO'] = ''; + $server['REQUEST_METHOD'] = strtoupper($method); + + $components = parse_url($uri); + if (isset($components['host'])) { + $server['SERVER_NAME'] = $components['host']; + $server['HTTP_HOST'] = $components['host']; + } + + if (isset($components['scheme'])) { + if ('https' === $components['scheme']) { + $server['HTTPS'] = 'on'; + $server['SERVER_PORT'] = 443; + } else { + unset($server['HTTPS']); + $server['SERVER_PORT'] = 80; + } + } + + if (isset($components['port'])) { + $server['SERVER_PORT'] = $components['port']; + $server['HTTP_HOST'] = $server['HTTP_HOST'].':'.$components['port']; + } + + if (isset($components['user'])) { + $server['PHP_AUTH_USER'] = $components['user']; + } + + if (isset($components['pass'])) { + $server['PHP_AUTH_PW'] = $components['pass']; + } + + if (!isset($components['path'])) { + $components['path'] = '/'; + } + + switch (strtoupper($method)) { + case 'POST': + case 'PUT': + case 'DELETE': + if (!isset($server['CONTENT_TYPE'])) { + $server['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; + } + // no break + case 'PATCH': + $request = $parameters; + $query = array(); + break; + default: + $request = array(); + $query = $parameters; + break; + } + + $queryString = ''; + if (isset($components['query'])) { + parse_str(html_entity_decode($components['query']), $qs); + + if ($query) { + $query = array_replace($qs, $query); + $queryString = http_build_query($query, '', '&'); + } else { + $query = $qs; + $queryString = $components['query']; + } + } elseif ($query) { + $queryString = http_build_query($query, '', '&'); + } + + $server['REQUEST_URI'] = $components['path'].('' !== $queryString ? '?'.$queryString : ''); + $server['QUERY_STRING'] = $queryString; + + return self::createRequestFromFactory($query, $request, array(), $cookies, $files, $server, $content); + } + + /** + * Sets a callable able to create a Request instance. + * + * This is mainly useful when you need to override the Request class + * to keep BC with an existing system. It should not be used for any + * other purpose. + * + * @param callable|null $callable A PHP callable + */ + public static function setFactory($callable) + { + self::$requestFactory = $callable; + } + + /** + * Clones a request and overrides some of its parameters. + * + * @param array $query The GET parameters + * @param array $request The POST parameters + * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array $cookies The COOKIE parameters + * @param array $files The FILES parameters + * @param array $server The SERVER parameters + * + * @return static + */ + public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) + { + $dup = clone $this; + if ($query !== null) { + $dup->query = new ParameterBag($query); + } + if ($request !== null) { + $dup->request = new ParameterBag($request); + } + if ($attributes !== null) { + $dup->attributes = new ParameterBag($attributes); + } + if ($cookies !== null) { + $dup->cookies = new ParameterBag($cookies); + } + if ($files !== null) { + $dup->files = new FileBag($files); + } + if ($server !== null) { + $dup->server = new ServerBag($server); + $dup->headers = new HeaderBag($dup->server->getHeaders()); + } + $dup->languages = null; + $dup->charsets = null; + $dup->encodings = null; + $dup->acceptableContentTypes = null; + $dup->pathInfo = null; + $dup->requestUri = null; + $dup->baseUrl = null; + $dup->basePath = null; + $dup->method = null; + $dup->format = null; + + if (!$dup->get('_format') && $this->get('_format')) { + $dup->attributes->set('_format', $this->get('_format')); + } + + if (!$dup->getRequestFormat(null)) { + $dup->setRequestFormat($this->getRequestFormat(null)); + } + + return $dup; + } + + /** + * Clones the current request. + * + * Note that the session is not cloned as duplicated requests + * are most of the time sub-requests of the main one. + */ + public function __clone() + { + $this->query = clone $this->query; + $this->request = clone $this->request; + $this->attributes = clone $this->attributes; + $this->cookies = clone $this->cookies; + $this->files = clone $this->files; + $this->server = clone $this->server; + $this->headers = clone $this->headers; + } + + /** + * Returns the request as a string. + * + * @return string The request + */ + public function __toString() + { + try { + $content = $this->getContent(); + } catch (\LogicException $e) { + return trigger_error($e, E_USER_ERROR); + } + + return + sprintf('%s %s %s', $this->getMethod(), $this->getRequestUri(), $this->server->get('SERVER_PROTOCOL'))."\r\n". + $this->headers."\r\n". + $content; + } + + /** + * Overrides the PHP global variables according to this request instance. + * + * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE. + * $_FILES is never overridden, see rfc1867 + */ + public function overrideGlobals() + { + $this->server->set('QUERY_STRING', static::normalizeQueryString(http_build_query($this->query->all(), null, '&'))); + + $_GET = $this->query->all(); + $_POST = $this->request->all(); + $_SERVER = $this->server->all(); + $_COOKIE = $this->cookies->all(); + + foreach ($this->headers->all() as $key => $value) { + $key = strtoupper(str_replace('-', '_', $key)); + if (in_array($key, array('CONTENT_TYPE', 'CONTENT_LENGTH'))) { + $_SERVER[$key] = implode(', ', $value); + } else { + $_SERVER['HTTP_'.$key] = implode(', ', $value); + } + } + + $request = array('g' => $_GET, 'p' => $_POST, 'c' => $_COOKIE); + + $requestOrder = ini_get('request_order') ?: ini_get('variables_order'); + $requestOrder = preg_replace('#[^cgp]#', '', strtolower($requestOrder)) ?: 'gp'; + + $_REQUEST = array(); + foreach (str_split($requestOrder) as $order) { + $_REQUEST = array_merge($_REQUEST, $request[$order]); + } + } + + /** + * Sets a list of trusted proxies. + * + * You should only list the reverse proxies that you manage directly. + * + * @param array $proxies A list of trusted proxies + */ + public static function setTrustedProxies(array $proxies) + { + self::$trustedProxies = $proxies; + } + + /** + * Gets the list of trusted proxies. + * + * @return array An array of trusted proxies + */ + public static function getTrustedProxies() + { + return self::$trustedProxies; + } + + /** + * Sets a list of trusted host patterns. + * + * You should only list the hosts you manage using regexs. + * + * @param array $hostPatterns A list of trusted host patterns + */ + public static function setTrustedHosts(array $hostPatterns) + { + self::$trustedHostPatterns = array_map(function ($hostPattern) { + return sprintf('#%s#i', $hostPattern); + }, $hostPatterns); + // we need to reset trusted hosts on trusted host patterns change + self::$trustedHosts = array(); + } + + /** + * Gets the list of trusted host patterns. + * + * @return array An array of trusted host patterns + */ + public static function getTrustedHosts() + { + return self::$trustedHostPatterns; + } + + /** + * Sets the name for trusted headers. + * + * The following header keys are supported: + * + * * Request::HEADER_CLIENT_IP: defaults to X-Forwarded-For (see getClientIp()) + * * Request::HEADER_CLIENT_HOST: defaults to X-Forwarded-Host (see getHost()) + * * Request::HEADER_CLIENT_PORT: defaults to X-Forwarded-Port (see getPort()) + * * Request::HEADER_CLIENT_PROTO: defaults to X-Forwarded-Proto (see getScheme() and isSecure()) + * * Request::HEADER_FORWARDED: defaults to Forwarded (see RFC 7239) + * + * Setting an empty value allows to disable the trusted header for the given key. + * + * @param string $key The header key + * @param string $value The header name + * + * @throws \InvalidArgumentException + */ + public static function setTrustedHeaderName($key, $value) + { + if (!array_key_exists($key, self::$trustedHeaders)) { + throw new \InvalidArgumentException(sprintf('Unable to set the trusted header name for key "%s".', $key)); + } + + self::$trustedHeaders[$key] = $value; + } + + /** + * Gets the trusted proxy header name. + * + * @param string $key The header key + * + * @return string The header name + * + * @throws \InvalidArgumentException + */ + public static function getTrustedHeaderName($key) + { + if (!array_key_exists($key, self::$trustedHeaders)) { + throw new \InvalidArgumentException(sprintf('Unable to get the trusted header name for key "%s".', $key)); + } + + return self::$trustedHeaders[$key]; + } + + /** + * Normalizes a query string. + * + * It builds a normalized query string, where keys/value pairs are alphabetized, + * have consistent escaping and unneeded delimiters are removed. + * + * @param string $qs Query string + * + * @return string A normalized query string for the Request + */ + public static function normalizeQueryString($qs) + { + if ('' == $qs) { + return ''; + } + + $parts = array(); + $order = array(); + + foreach (explode('&', $qs) as $param) { + if ('' === $param || '=' === $param[0]) { + // Ignore useless delimiters, e.g. "x=y&". + // Also ignore pairs with empty key, even if there was a value, e.g. "=value", as such nameless values cannot be retrieved anyway. + // PHP also does not include them when building _GET. + continue; + } + + $keyValuePair = explode('=', $param, 2); + + // GET parameters, that are submitted from a HTML form, encode spaces as "+" by default (as defined in enctype application/x-www-form-urlencoded). + // PHP also converts "+" to spaces when filling the global _GET or when using the function parse_str. This is why we use urldecode and then normalize to + // RFC 3986 with rawurlencode. + $parts[] = isset($keyValuePair[1]) ? + rawurlencode(urldecode($keyValuePair[0])).'='.rawurlencode(urldecode($keyValuePair[1])) : + rawurlencode(urldecode($keyValuePair[0])); + $order[] = urldecode($keyValuePair[0]); + } + + array_multisort($order, SORT_ASC, $parts); + + return implode('&', $parts); + } + + /** + * Enables support for the _method request parameter to determine the intended HTTP method. + * + * Be warned that enabling this feature might lead to CSRF issues in your code. + * Check that you are using CSRF tokens when required. + * If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered + * and used to send a "PUT" or "DELETE" request via the _method request parameter. + * If these methods are not protected against CSRF, this presents a possible vulnerability. + * + * The HTTP method can only be overridden when the real HTTP method is POST. + */ + public static function enableHttpMethodParameterOverride() + { + self::$httpMethodParameterOverride = true; + } + + /** + * Checks whether support for the _method request parameter is enabled. + * + * @return bool True when the _method request parameter is enabled, false otherwise + */ + public static function getHttpMethodParameterOverride() + { + return self::$httpMethodParameterOverride; + } + + /** + * Gets a "parameter" value from any bag. + * + * This method is mainly useful for libraries that want to provide some flexibility. If you don't need the + * flexibility in controllers, it is better to explicitly get request parameters from the appropriate + * public property instead (attributes, query, request). + * + * Order of precedence: PATH (routing placeholders or custom attributes), GET, BODY + * + * @param string $key the key + * @param mixed $default the default value if the parameter key does not exist + * + * @return mixed + */ + public function get($key, $default = null) + { + if ($this !== $result = $this->attributes->get($key, $this)) { + return $result; + } + + if ($this !== $result = $this->query->get($key, $this)) { + return $result; + } + + if ($this !== $result = $this->request->get($key, $this)) { + return $result; + } + + return $default; + } + + /** + * Gets the Session. + * + * @return SessionInterface|null The session + */ + public function getSession() + { + return $this->session; + } + + /** + * Whether the request contains a Session which was started in one of the + * previous requests. + * + * @return bool + */ + public function hasPreviousSession() + { + // the check for $this->session avoids malicious users trying to fake a session cookie with proper name + return $this->hasSession() && $this->cookies->has($this->session->getName()); + } + + /** + * Whether the request contains a Session object. + * + * This method does not give any information about the state of the session object, + * like whether the session is started or not. It is just a way to check if this Request + * is associated with a Session instance. + * + * @return bool true when the Request contains a Session object, false otherwise + */ + public function hasSession() + { + return null !== $this->session; + } + + /** + * Sets the Session. + * + * @param SessionInterface $session The Session + */ + public function setSession(SessionInterface $session) + { + $this->session = $session; + } + + /** + * Returns the client IP addresses. + * + * In the returned array the most trusted IP address is first, and the + * least trusted one last. The "real" client IP address is the last one, + * but this is also the least trusted one. Trusted proxies are stripped. + * + * Use this method carefully; you should use getClientIp() instead. + * + * @return array The client IP addresses + * + * @see getClientIp() + */ + public function getClientIps() + { + $clientIps = array(); + $ip = $this->server->get('REMOTE_ADDR'); + + if (!$this->isFromTrustedProxy()) { + return array($ip); + } + + $hasTrustedForwardedHeader = self::$trustedHeaders[self::HEADER_FORWARDED] && $this->headers->has(self::$trustedHeaders[self::HEADER_FORWARDED]); + $hasTrustedClientIpHeader = self::$trustedHeaders[self::HEADER_CLIENT_IP] && $this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP]); + + if ($hasTrustedForwardedHeader) { + $forwardedHeader = $this->headers->get(self::$trustedHeaders[self::HEADER_FORWARDED]); + preg_match_all('{(for)=("?\[?)([a-z0-9\.:_\-/]*)}', $forwardedHeader, $matches); + $forwardedClientIps = $matches[3]; + + $forwardedClientIps = $this->normalizeAndFilterClientIps($forwardedClientIps, $ip); + $clientIps = $forwardedClientIps; + } + + if ($hasTrustedClientIpHeader) { + $xForwardedForClientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP]))); + + $xForwardedForClientIps = $this->normalizeAndFilterClientIps($xForwardedForClientIps, $ip); + $clientIps = $xForwardedForClientIps; + } + + if ($hasTrustedForwardedHeader && $hasTrustedClientIpHeader && $forwardedClientIps !== $xForwardedForClientIps) { + throw new ConflictingHeadersException('The request has both a trusted Forwarded header and a trusted Client IP header, conflicting with each other with regards to the originating IP addresses of the request. This is the result of a misconfiguration. You should either configure your proxy only to send one of these headers, or configure Symfony to distrust one of them.'); + } + + if (!$hasTrustedForwardedHeader && !$hasTrustedClientIpHeader) { + return $this->normalizeAndFilterClientIps(array(), $ip); + } + + return $clientIps; + } + + /** + * Returns the client IP address. + * + * This method can read the client IP address from the "X-Forwarded-For" header + * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For" + * header value is a comma+space separated list of IP addresses, the left-most + * being the original client, and each successive proxy that passed the request + * adding the IP address where it received the request from. + * + * If your reverse proxy uses a different header name than "X-Forwarded-For", + * ("Client-Ip" for instance), configure it via "setTrustedHeaderName()" with + * the "client-ip" key. + * + * @return string The client IP address + * + * @see getClientIps() + * @see http://en.wikipedia.org/wiki/X-Forwarded-For + */ + public function getClientIp() + { + $ipAddresses = $this->getClientIps(); + + return $ipAddresses[0]; + } + + /** + * Returns current script name. + * + * @return string + */ + public function getScriptName() + { + return $this->server->get('SCRIPT_NAME', $this->server->get('ORIG_SCRIPT_NAME', '')); + } + + /** + * Returns the path being requested relative to the executed script. + * + * The path info always starts with a /. + * + * Suppose this request is instantiated from /mysite on localhost: + * + * * http://localhost/mysite returns an empty string + * * http://localhost/mysite/about returns '/about' + * * http://localhost/mysite/enco%20ded returns '/enco%20ded' + * * http://localhost/mysite/about?var=1 returns '/about' + * + * @return string The raw path (i.e. not urldecoded) + */ + public function getPathInfo() + { + if (null === $this->pathInfo) { + $this->pathInfo = $this->preparePathInfo(); + } + + return $this->pathInfo; + } + + /** + * Returns the root path from which this request is executed. + * + * Suppose that an index.php file instantiates this request object: + * + * * http://localhost/index.php returns an empty string + * * http://localhost/index.php/page returns an empty string + * * http://localhost/web/index.php returns '/web' + * * http://localhost/we%20b/index.php returns '/we%20b' + * + * @return string The raw path (i.e. not urldecoded) + */ + public function getBasePath() + { + if (null === $this->basePath) { + $this->basePath = $this->prepareBasePath(); + } + + return $this->basePath; + } + + /** + * Returns the root URL from which this request is executed. + * + * The base URL never ends with a /. + * + * This is similar to getBasePath(), except that it also includes the + * script filename (e.g. index.php) if one exists. + * + * @return string The raw URL (i.e. not urldecoded) + */ + public function getBaseUrl() + { + if (null === $this->baseUrl) { + $this->baseUrl = $this->prepareBaseUrl(); + } + + return $this->baseUrl; + } + + /** + * Gets the request's scheme. + * + * @return string + */ + public function getScheme() + { + return $this->isSecure() ? 'https' : 'http'; + } + + /** + * Returns the port on which the request is made. + * + * This method can read the client port from the "X-Forwarded-Port" header + * when trusted proxies were set via "setTrustedProxies()". + * + * The "X-Forwarded-Port" header must contain the client port. + * + * If your reverse proxy uses a different header name than "X-Forwarded-Port", + * configure it via "setTrustedHeaderName()" with the "client-port" key. + * + * @return string + */ + public function getPort() + { + if ($this->isFromTrustedProxy()) { + if (self::$trustedHeaders[self::HEADER_CLIENT_PORT] && $port = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PORT])) { + return $port; + } + + if (self::$trustedHeaders[self::HEADER_CLIENT_PROTO] && 'https' === $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PROTO], 'http')) { + return 443; + } + } + + if ($host = $this->headers->get('HOST')) { + if ($host[0] === '[') { + $pos = strpos($host, ':', strrpos($host, ']')); + } else { + $pos = strrpos($host, ':'); + } + + if (false !== $pos) { + return (int) substr($host, $pos + 1); + } + + return 'https' === $this->getScheme() ? 443 : 80; + } + + return $this->server->get('SERVER_PORT'); + } + + /** + * Returns the user. + * + * @return string|null + */ + public function getUser() + { + return $this->headers->get('PHP_AUTH_USER'); + } + + /** + * Returns the password. + * + * @return string|null + */ + public function getPassword() + { + return $this->headers->get('PHP_AUTH_PW'); + } + + /** + * Gets the user info. + * + * @return string A user name and, optionally, scheme-specific information about how to gain authorization to access the server + */ + public function getUserInfo() + { + $userinfo = $this->getUser(); + + $pass = $this->getPassword(); + if ('' != $pass) { + $userinfo .= ":$pass"; + } + + return $userinfo; + } + + /** + * Returns the HTTP host being requested. + * + * The port name will be appended to the host if it's non-standard. + * + * @return string + */ + public function getHttpHost() + { + $scheme = $this->getScheme(); + $port = $this->getPort(); + + if (('http' == $scheme && $port == 80) || ('https' == $scheme && $port == 443)) { + return $this->getHost(); + } + + return $this->getHost().':'.$port; + } + + /** + * Returns the requested URI (path and query string). + * + * @return string The raw URI (i.e. not URI decoded) + */ + public function getRequestUri() + { + if (null === $this->requestUri) { + $this->requestUri = $this->prepareRequestUri(); + } + + return $this->requestUri; + } + + /** + * Gets the scheme and HTTP host. + * + * If the URL was called with basic authentication, the user + * and the password are not added to the generated string. + * + * @return string The scheme and HTTP host + */ + public function getSchemeAndHttpHost() + { + return $this->getScheme().'://'.$this->getHttpHost(); + } + + /** + * Generates a normalized URI (URL) for the Request. + * + * @return string A normalized URI (URL) for the Request + * + * @see getQueryString() + */ + public function getUri() + { + if (null !== $qs = $this->getQueryString()) { + $qs = '?'.$qs; + } + + return $this->getSchemeAndHttpHost().$this->getBaseUrl().$this->getPathInfo().$qs; + } + + /** + * Generates a normalized URI for the given path. + * + * @param string $path A path to use instead of the current one + * + * @return string The normalized URI for the path + */ + public function getUriForPath($path) + { + return $this->getSchemeAndHttpHost().$this->getBaseUrl().$path; + } + + /** + * Returns the path as relative reference from the current Request path. + * + * Only the URIs path component (no schema, host etc.) is relevant and must be given. + * Both paths must be absolute and not contain relative parts. + * Relative URLs from one resource to another are useful when generating self-contained downloadable document archives. + * Furthermore, they can be used to reduce the link size in documents. + * + * Example target paths, given a base path of "/a/b/c/d": + * - "/a/b/c/d" -> "" + * - "/a/b/c/" -> "./" + * - "/a/b/" -> "../" + * - "/a/b/c/other" -> "other" + * - "/a/x/y" -> "../../x/y" + * + * @param string $path The target path + * + * @return string The relative target path + */ + public function getRelativeUriForPath($path) + { + // be sure that we are dealing with an absolute path + if (!isset($path[0]) || '/' !== $path[0]) { + return $path; + } + + if ($path === $basePath = $this->getPathInfo()) { + return ''; + } + + $sourceDirs = explode('/', isset($basePath[0]) && '/' === $basePath[0] ? substr($basePath, 1) : $basePath); + $targetDirs = explode('/', isset($path[0]) && '/' === $path[0] ? substr($path, 1) : $path); + array_pop($sourceDirs); + $targetFile = array_pop($targetDirs); + + foreach ($sourceDirs as $i => $dir) { + if (isset($targetDirs[$i]) && $dir === $targetDirs[$i]) { + unset($sourceDirs[$i], $targetDirs[$i]); + } else { + break; + } + } + + $targetDirs[] = $targetFile; + $path = str_repeat('../', count($sourceDirs)).implode('/', $targetDirs); + + // A reference to the same base directory or an empty subdirectory must be prefixed with "./". + // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used + // as the first segment of a relative-path reference, as it would be mistaken for a scheme name + // (see http://tools.ietf.org/html/rfc3986#section-4.2). + return !isset($path[0]) || '/' === $path[0] + || false !== ($colonPos = strpos($path, ':')) && ($colonPos < ($slashPos = strpos($path, '/')) || false === $slashPos) + ? "./$path" : $path; + } + + /** + * Generates the normalized query string for the Request. + * + * It builds a normalized query string, where keys/value pairs are alphabetized + * and have consistent escaping. + * + * @return string|null A normalized query string for the Request + */ + public function getQueryString() + { + $qs = static::normalizeQueryString($this->server->get('QUERY_STRING')); + + return '' === $qs ? null : $qs; + } + + /** + * Checks whether the request is secure or not. + * + * This method can read the client protocol from the "X-Forwarded-Proto" header + * when trusted proxies were set via "setTrustedProxies()". + * + * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http". + * + * If your reverse proxy uses a different header name than "X-Forwarded-Proto" + * ("SSL_HTTPS" for instance), configure it via "setTrustedHeaderName()" with + * the "client-proto" key. + * + * @return bool + */ + public function isSecure() + { + if ($this->isFromTrustedProxy() && self::$trustedHeaders[self::HEADER_CLIENT_PROTO] && $proto = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PROTO])) { + return in_array(strtolower(current(explode(',', $proto))), array('https', 'on', 'ssl', '1')); + } + + $https = $this->server->get('HTTPS'); + + return !empty($https) && 'off' !== strtolower($https); + } + + /** + * Returns the host name. + * + * This method can read the client host name from the "X-Forwarded-Host" header + * when trusted proxies were set via "setTrustedProxies()". + * + * The "X-Forwarded-Host" header must contain the client host name. + * + * If your reverse proxy uses a different header name than "X-Forwarded-Host", + * configure it via "setTrustedHeaderName()" with the "client-host" key. + * + * @return string + * + * @throws \UnexpectedValueException when the host name is invalid + */ + public function getHost() + { + if ($this->isFromTrustedProxy() && self::$trustedHeaders[self::HEADER_CLIENT_HOST] && $host = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_HOST])) { + $elements = explode(',', $host); + + $host = $elements[count($elements) - 1]; + } elseif (!$host = $this->headers->get('HOST')) { + if (!$host = $this->server->get('SERVER_NAME')) { + $host = $this->server->get('SERVER_ADDR', ''); + } + } + + // trim and remove port number from host + // host is lowercase as per RFC 952/2181 + $host = strtolower(preg_replace('/:\d+$/', '', trim($host))); + + // as the host can come from the user (HTTP_HOST and depending on the configuration, SERVER_NAME too can come from the user) + // check that it does not contain forbidden characters (see RFC 952 and RFC 2181) + // use preg_replace() instead of preg_match() to prevent DoS attacks with long host names + if ($host && '' !== preg_replace('/(?:^\[)?[a-zA-Z0-9-:\]_]+\.?/', '', $host)) { + throw new \UnexpectedValueException(sprintf('Invalid Host "%s"', $host)); + } + + if (count(self::$trustedHostPatterns) > 0) { + // to avoid host header injection attacks, you should provide a list of trusted host patterns + + if (in_array($host, self::$trustedHosts)) { + return $host; + } + + foreach (self::$trustedHostPatterns as $pattern) { + if (preg_match($pattern, $host)) { + self::$trustedHosts[] = $host; + + return $host; + } + } + + throw new \UnexpectedValueException(sprintf('Untrusted Host "%s"', $host)); + } + + return $host; + } + + /** + * Sets the request method. + * + * @param string $method + */ + public function setMethod($method) + { + $this->method = null; + $this->server->set('REQUEST_METHOD', $method); + } + + /** + * Gets the request "intended" method. + * + * If the X-HTTP-Method-Override header is set, and if the method is a POST, + * then it is used to determine the "real" intended HTTP method. + * + * The _method request parameter can also be used to determine the HTTP method, + * but only if enableHttpMethodParameterOverride() has been called. + * + * The method is always an uppercased string. + * + * @return string The request method + * + * @see getRealMethod() + */ + public function getMethod() + { + if (null === $this->method) { + $this->method = strtoupper($this->server->get('REQUEST_METHOD', 'GET')); + + if ('POST' === $this->method) { + if ($method = $this->headers->get('X-HTTP-METHOD-OVERRIDE')) { + $this->method = strtoupper($method); + } elseif (self::$httpMethodParameterOverride) { + $this->method = strtoupper($this->request->get('_method', $this->query->get('_method', 'POST'))); + } + } + } + + return $this->method; + } + + /** + * Gets the "real" request method. + * + * @return string The request method + * + * @see getMethod() + */ + public function getRealMethod() + { + return strtoupper($this->server->get('REQUEST_METHOD', 'GET')); + } + + /** + * Gets the mime type associated with the format. + * + * @param string $format The format + * + * @return string The associated mime type (null if not found) + */ + public function getMimeType($format) + { + if (null === static::$formats) { + static::initializeFormats(); + } + + return isset(static::$formats[$format]) ? static::$formats[$format][0] : null; + } + + /** + * Gets the mime types associated with the format. + * + * @param string $format The format + * + * @return array The associated mime types + */ + public static function getMimeTypes($format) + { + if (null === static::$formats) { + static::initializeFormats(); + } + + return isset(static::$formats[$format]) ? static::$formats[$format] : array(); + } + + /** + * Gets the format associated with the mime type. + * + * @param string $mimeType The associated mime type + * + * @return string|null The format (null if not found) + */ + public function getFormat($mimeType) + { + $canonicalMimeType = null; + if (false !== $pos = strpos($mimeType, ';')) { + $canonicalMimeType = substr($mimeType, 0, $pos); + } + + if (null === static::$formats) { + static::initializeFormats(); + } + + foreach (static::$formats as $format => $mimeTypes) { + if (in_array($mimeType, (array) $mimeTypes)) { + return $format; + } + if (null !== $canonicalMimeType && in_array($canonicalMimeType, (array) $mimeTypes)) { + return $format; + } + } + } + + /** + * Associates a format with mime types. + * + * @param string $format The format + * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type) + */ + public function setFormat($format, $mimeTypes) + { + if (null === static::$formats) { + static::initializeFormats(); + } + + static::$formats[$format] = is_array($mimeTypes) ? $mimeTypes : array($mimeTypes); + } + + /** + * Gets the request format. + * + * Here is the process to determine the format: + * + * * format defined by the user (with setRequestFormat()) + * * _format request attribute + * * $default + * + * @param string $default The default format + * + * @return string The request format + */ + public function getRequestFormat($default = 'html') + { + if (null === $this->format) { + $this->format = $this->attributes->get('_format'); + } + + return null === $this->format ? $default : $this->format; + } + + /** + * Sets the request format. + * + * @param string $format The request format + */ + public function setRequestFormat($format) + { + $this->format = $format; + } + + /** + * Gets the format associated with the request. + * + * @return string|null The format (null if no content type is present) + */ + public function getContentType() + { + return $this->getFormat($this->headers->get('CONTENT_TYPE')); + } + + /** + * Sets the default locale. + * + * @param string $locale + */ + public function setDefaultLocale($locale) + { + $this->defaultLocale = $locale; + + if (null === $this->locale) { + $this->setPhpDefaultLocale($locale); + } + } + + /** + * Get the default locale. + * + * @return string + */ + public function getDefaultLocale() + { + return $this->defaultLocale; + } + + /** + * Sets the locale. + * + * @param string $locale + */ + public function setLocale($locale) + { + $this->setPhpDefaultLocale($this->locale = $locale); + } + + /** + * Get the locale. + * + * @return string + */ + public function getLocale() + { + return null === $this->locale ? $this->defaultLocale : $this->locale; + } + + /** + * Checks if the request method is of specified type. + * + * @param string $method Uppercase request method (GET, POST etc) + * + * @return bool + */ + public function isMethod($method) + { + return $this->getMethod() === strtoupper($method); + } + + /** + * Checks whether or not the method is safe. + * + * @see https://tools.ietf.org/html/rfc7231#section-4.2.1 + * + * @param bool $andCacheable Adds the additional condition that the method should be cacheable. True by default. + * + * @return bool + */ + public function isMethodSafe(/* $andCacheable = true */) + { + if (!func_num_args() || func_get_arg(0)) { + // This deprecation should be turned into a BadMethodCallException in 4.0 (without adding the argument in the signature) + // then setting $andCacheable to false should be deprecated in 4.1 + @trigger_error('Checking only for cacheable HTTP methods with Symfony\Component\HttpFoundation\Request::isMethodSafe() is deprecated since version 3.2 and will throw an exception in 4.0. Disable checking only for cacheable methods by calling the method with `false` as first argument or use the Request::isMethodCacheable() instead.', E_USER_DEPRECATED); + + return in_array($this->getMethod(), array('GET', 'HEAD')); + } + + return in_array($this->getMethod(), array('GET', 'HEAD', 'OPTIONS', 'TRACE')); + } + + /** + * Checks whether or not the method is idempotent. + * + * @return bool + */ + public function isMethodIdempotent() + { + return in_array($this->getMethod(), array('HEAD', 'GET', 'PUT', 'DELETE', 'TRACE', 'OPTIONS', 'PURGE')); + } + + /** + * Checks whether the method is cacheable or not. + * + * @see https://tools.ietf.org/html/rfc7231#section-4.2.3 + * + * @return bool + */ + public function isMethodCacheable() + { + return in_array($this->getMethod(), array('GET', 'HEAD')); + } + + /** + * Returns the request body content. + * + * @param bool $asResource If true, a resource will be returned + * + * @return string|resource The request body content or a resource to read the body stream + * + * @throws \LogicException + */ + public function getContent($asResource = false) + { + $currentContentIsResource = is_resource($this->content); + if (PHP_VERSION_ID < 50600 && false === $this->content) { + throw new \LogicException('getContent() can only be called once when using the resource return type and PHP below 5.6.'); + } + + if (true === $asResource) { + if ($currentContentIsResource) { + rewind($this->content); + + return $this->content; + } + + // Content passed in parameter (test) + if (is_string($this->content)) { + $resource = fopen('php://temp', 'r+'); + fwrite($resource, $this->content); + rewind($resource); + + return $resource; + } + + $this->content = false; + + return fopen('php://input', 'rb'); + } + + if ($currentContentIsResource) { + rewind($this->content); + + return stream_get_contents($this->content); + } + + if (null === $this->content || false === $this->content) { + $this->content = file_get_contents('php://input'); + } + + return $this->content; + } + + /** + * Gets the Etags. + * + * @return array The entity tags + */ + public function getETags() + { + return preg_split('/\s*,\s*/', $this->headers->get('if_none_match'), null, PREG_SPLIT_NO_EMPTY); + } + + /** + * @return bool + */ + public function isNoCache() + { + return $this->headers->hasCacheControlDirective('no-cache') || 'no-cache' == $this->headers->get('Pragma'); + } + + /** + * Returns the preferred language. + * + * @param array $locales An array of ordered available locales + * + * @return string|null The preferred locale + */ + public function getPreferredLanguage(array $locales = null) + { + $preferredLanguages = $this->getLanguages(); + + if (empty($locales)) { + return isset($preferredLanguages[0]) ? $preferredLanguages[0] : null; + } + + if (!$preferredLanguages) { + return $locales[0]; + } + + $extendedPreferredLanguages = array(); + foreach ($preferredLanguages as $language) { + $extendedPreferredLanguages[] = $language; + if (false !== $position = strpos($language, '_')) { + $superLanguage = substr($language, 0, $position); + if (!in_array($superLanguage, $preferredLanguages)) { + $extendedPreferredLanguages[] = $superLanguage; + } + } + } + + $preferredLanguages = array_values(array_intersect($extendedPreferredLanguages, $locales)); + + return isset($preferredLanguages[0]) ? $preferredLanguages[0] : $locales[0]; + } + + /** + * Gets a list of languages acceptable by the client browser. + * + * @return array Languages ordered in the user browser preferences + */ + public function getLanguages() + { + if (null !== $this->languages) { + return $this->languages; + } + + $languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all(); + $this->languages = array(); + foreach ($languages as $lang => $acceptHeaderItem) { + if (false !== strpos($lang, '-')) { + $codes = explode('-', $lang); + if ('i' === $codes[0]) { + // Language not listed in ISO 639 that are not variants + // of any listed language, which can be registered with the + // i-prefix, such as i-cherokee + if (count($codes) > 1) { + $lang = $codes[1]; + } + } else { + for ($i = 0, $max = count($codes); $i < $max; ++$i) { + if ($i === 0) { + $lang = strtolower($codes[0]); + } else { + $lang .= '_'.strtoupper($codes[$i]); + } + } + } + } + + $this->languages[] = $lang; + } + + return $this->languages; + } + + /** + * Gets a list of charsets acceptable by the client browser. + * + * @return array List of charsets in preferable order + */ + public function getCharsets() + { + if (null !== $this->charsets) { + return $this->charsets; + } + + return $this->charsets = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all()); + } + + /** + * Gets a list of encodings acceptable by the client browser. + * + * @return array List of encodings in preferable order + */ + public function getEncodings() + { + if (null !== $this->encodings) { + return $this->encodings; + } + + return $this->encodings = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all()); + } + + /** + * Gets a list of content types acceptable by the client browser. + * + * @return array List of content types in preferable order + */ + public function getAcceptableContentTypes() + { + if (null !== $this->acceptableContentTypes) { + return $this->acceptableContentTypes; + } + + return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all()); + } + + /** + * Returns true if the request is a XMLHttpRequest. + * + * It works if your JavaScript library sets an X-Requested-With HTTP header. + * It is known to work with common JavaScript frameworks: + * + * @see http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript + * + * @return bool true if the request is an XMLHttpRequest, false otherwise + */ + public function isXmlHttpRequest() + { + return 'XMLHttpRequest' == $this->headers->get('X-Requested-With'); + } + + /* + * The following methods are derived from code of the Zend Framework (1.10dev - 2010-01-24) + * + * Code subject to the new BSD license (http://framework.zend.com/license/new-bsd). + * + * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + */ + + protected function prepareRequestUri() + { + $requestUri = ''; + + if ($this->headers->has('X_ORIGINAL_URL')) { + // IIS with Microsoft Rewrite Module + $requestUri = $this->headers->get('X_ORIGINAL_URL'); + $this->headers->remove('X_ORIGINAL_URL'); + $this->server->remove('HTTP_X_ORIGINAL_URL'); + $this->server->remove('UNENCODED_URL'); + $this->server->remove('IIS_WasUrlRewritten'); + } elseif ($this->headers->has('X_REWRITE_URL')) { + // IIS with ISAPI_Rewrite + $requestUri = $this->headers->get('X_REWRITE_URL'); + $this->headers->remove('X_REWRITE_URL'); + } elseif ($this->server->get('IIS_WasUrlRewritten') == '1' && $this->server->get('UNENCODED_URL') != '') { + // IIS7 with URL Rewrite: make sure we get the unencoded URL (double slash problem) + $requestUri = $this->server->get('UNENCODED_URL'); + $this->server->remove('UNENCODED_URL'); + $this->server->remove('IIS_WasUrlRewritten'); + } elseif ($this->server->has('REQUEST_URI')) { + $requestUri = $this->server->get('REQUEST_URI'); + // HTTP proxy reqs setup request URI with scheme and host [and port] + the URL path, only use URL path + $schemeAndHttpHost = $this->getSchemeAndHttpHost(); + if (strpos($requestUri, $schemeAndHttpHost) === 0) { + $requestUri = substr($requestUri, strlen($schemeAndHttpHost)); + } + } elseif ($this->server->has('ORIG_PATH_INFO')) { + // IIS 5.0, PHP as CGI + $requestUri = $this->server->get('ORIG_PATH_INFO'); + if ('' != $this->server->get('QUERY_STRING')) { + $requestUri .= '?'.$this->server->get('QUERY_STRING'); + } + $this->server->remove('ORIG_PATH_INFO'); + } + + // normalize the request URI to ease creating sub-requests from this request + $this->server->set('REQUEST_URI', $requestUri); + + return $requestUri; + } + + /** + * Prepares the base URL. + * + * @return string + */ + protected function prepareBaseUrl() + { + $filename = basename($this->server->get('SCRIPT_FILENAME')); + + if (basename($this->server->get('SCRIPT_NAME')) === $filename) { + $baseUrl = $this->server->get('SCRIPT_NAME'); + } elseif (basename($this->server->get('PHP_SELF')) === $filename) { + $baseUrl = $this->server->get('PHP_SELF'); + } elseif (basename($this->server->get('ORIG_SCRIPT_NAME')) === $filename) { + $baseUrl = $this->server->get('ORIG_SCRIPT_NAME'); // 1and1 shared hosting compatibility + } else { + // Backtrack up the script_filename to find the portion matching + // php_self + $path = $this->server->get('PHP_SELF', ''); + $file = $this->server->get('SCRIPT_FILENAME', ''); + $segs = explode('/', trim($file, '/')); + $segs = array_reverse($segs); + $index = 0; + $last = count($segs); + $baseUrl = ''; + do { + $seg = $segs[$index]; + $baseUrl = '/'.$seg.$baseUrl; + ++$index; + } while ($last > $index && (false !== $pos = strpos($path, $baseUrl)) && 0 != $pos); + } + + // Does the baseUrl have anything in common with the request_uri? + $requestUri = $this->getRequestUri(); + + if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, $baseUrl)) { + // full $baseUrl matches + return $prefix; + } + + if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, rtrim(dirname($baseUrl), '/'.DIRECTORY_SEPARATOR).'/')) { + // directory portion of $baseUrl matches + return rtrim($prefix, '/'.DIRECTORY_SEPARATOR); + } + + $truncatedRequestUri = $requestUri; + if (false !== $pos = strpos($requestUri, '?')) { + $truncatedRequestUri = substr($requestUri, 0, $pos); + } + + $basename = basename($baseUrl); + if (empty($basename) || !strpos(rawurldecode($truncatedRequestUri), $basename)) { + // no match whatsoever; set it blank + return ''; + } + + // If using mod_rewrite or ISAPI_Rewrite strip the script filename + // out of baseUrl. $pos !== 0 makes sure it is not matching a value + // from PATH_INFO or QUERY_STRING + if (strlen($requestUri) >= strlen($baseUrl) && (false !== $pos = strpos($requestUri, $baseUrl)) && $pos !== 0) { + $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl)); + } + + return rtrim($baseUrl, '/'.DIRECTORY_SEPARATOR); + } + + /** + * Prepares the base path. + * + * @return string base path + */ + protected function prepareBasePath() + { + $filename = basename($this->server->get('SCRIPT_FILENAME')); + $baseUrl = $this->getBaseUrl(); + if (empty($baseUrl)) { + return ''; + } + + if (basename($baseUrl) === $filename) { + $basePath = dirname($baseUrl); + } else { + $basePath = $baseUrl; + } + + if ('\\' === DIRECTORY_SEPARATOR) { + $basePath = str_replace('\\', '/', $basePath); + } + + return rtrim($basePath, '/'); + } + + /** + * Prepares the path info. + * + * @return string path info + */ + protected function preparePathInfo() + { + $baseUrl = $this->getBaseUrl(); + + if (null === ($requestUri = $this->getRequestUri())) { + return '/'; + } + + // Remove the query string from REQUEST_URI + if ($pos = strpos($requestUri, '?')) { + $requestUri = substr($requestUri, 0, $pos); + } + + $pathInfo = substr($requestUri, strlen($baseUrl)); + if (null !== $baseUrl && (false === $pathInfo || '' === $pathInfo)) { + // If substr() returns false then PATH_INFO is set to an empty string + return '/'; + } elseif (null === $baseUrl) { + return $requestUri; + } + + return (string) $pathInfo; + } + + /** + * Initializes HTTP request formats. + */ + protected static function initializeFormats() + { + static::$formats = array( + 'html' => array('text/html', 'application/xhtml+xml'), + 'txt' => array('text/plain'), + 'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'), + 'css' => array('text/css'), + 'json' => array('application/json', 'application/x-json'), + 'xml' => array('text/xml', 'application/xml', 'application/x-xml'), + 'rdf' => array('application/rdf+xml'), + 'atom' => array('application/atom+xml'), + 'rss' => array('application/rss+xml'), + 'form' => array('application/x-www-form-urlencoded'), + ); + } + + /** + * Sets the default PHP locale. + * + * @param string $locale + */ + private function setPhpDefaultLocale($locale) + { + // if either the class Locale doesn't exist, or an exception is thrown when + // setting the default locale, the intl module is not installed, and + // the call can be ignored: + try { + if (class_exists('Locale', false)) { + \Locale::setDefault($locale); + } + } catch (\Exception $e) { + } + } + + /* + * Returns the prefix as encoded in the string when the string starts with + * the given prefix, false otherwise. + * + * @param string $string The urlencoded string + * @param string $prefix The prefix not encoded + * + * @return string|false The prefix as it is encoded in $string, or false + */ + private function getUrlencodedPrefix($string, $prefix) + { + if (0 !== strpos(rawurldecode($string), $prefix)) { + return false; + } + + $len = strlen($prefix); + + if (preg_match(sprintf('#^(%%[[:xdigit:]]{2}|.){%d}#', $len), $string, $match)) { + return $match[0]; + } + + return false; + } + + private static function createRequestFromFactory(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + { + if (self::$requestFactory) { + $request = call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content); + + if (!$request instanceof self) { + throw new \LogicException('The Request factory must return an instance of Symfony\Component\HttpFoundation\Request.'); + } + + return $request; + } + + return new static($query, $request, $attributes, $cookies, $files, $server, $content); + } + + /** + * Indicates whether this request originated from a trusted proxy. + * + * This can be useful to determine whether or not to trust the + * contents of a proxy-specific header. + * + * @return bool true if the request came from a trusted proxy, false otherwise + */ + public function isFromTrustedProxy() + { + return self::$trustedProxies && IpUtils::checkIp($this->server->get('REMOTE_ADDR'), self::$trustedProxies); + } + + private function normalizeAndFilterClientIps(array $clientIps, $ip) + { + $clientIps[] = $ip; // Complete the IP chain with the IP the request actually came from + $firstTrustedIp = null; + + foreach ($clientIps as $key => $clientIp) { + // Remove port (unfortunately, it does happen) + if (preg_match('{((?:\d+\.){3}\d+)\:\d+}', $clientIp, $match)) { + $clientIps[$key] = $clientIp = $match[1]; + } + + if (!filter_var($clientIp, FILTER_VALIDATE_IP)) { + unset($clientIps[$key]); + + continue; + } + + if (IpUtils::checkIp($clientIp, self::$trustedProxies)) { + unset($clientIps[$key]); + + // Fallback to this when the client IP falls into the range of trusted proxies + if (null === $firstTrustedIp) { + $firstTrustedIp = $clientIp; + } + } + } + + // Now the IP chain contains only untrusted proxies and the client IP + return $clientIps ? array_reverse($clientIps) : array($firstTrustedIp); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestMatcher.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestMatcher.php new file mode 100644 index 0000000000000000000000000000000000000000..aa4f67b58bb4313659dace783477ba45c23483b8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestMatcher.php @@ -0,0 +1,178 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * RequestMatcher compares a pre-defined set of checks against a Request instance. + * + * @author Fabien Potencier + */ +class RequestMatcher implements RequestMatcherInterface +{ + /** + * @var string|null + */ + private $path; + + /** + * @var string|null + */ + private $host; + + /** + * @var string[] + */ + private $methods = array(); + + /** + * @var string[] + */ + private $ips = array(); + + /** + * @var array + */ + private $attributes = array(); + + /** + * @var string[] + */ + private $schemes = array(); + + /** + * @param string|null $path + * @param string|null $host + * @param string|string[]|null $methods + * @param string|string[]|null $ips + * @param array $attributes + * @param string|string[]|null $schemes + */ + public function __construct($path = null, $host = null, $methods = null, $ips = null, array $attributes = array(), $schemes = null) + { + $this->matchPath($path); + $this->matchHost($host); + $this->matchMethod($methods); + $this->matchIps($ips); + $this->matchScheme($schemes); + + foreach ($attributes as $k => $v) { + $this->matchAttribute($k, $v); + } + } + + /** + * Adds a check for the HTTP scheme. + * + * @param string|string[]|null $scheme An HTTP scheme or an array of HTTP schemes + */ + public function matchScheme($scheme) + { + $this->schemes = null !== $scheme ? array_map('strtolower', (array) $scheme) : array(); + } + + /** + * Adds a check for the URL host name. + * + * @param string|null $regexp A Regexp + */ + public function matchHost($regexp) + { + $this->host = $regexp; + } + + /** + * Adds a check for the URL path info. + * + * @param string|null $regexp A Regexp + */ + public function matchPath($regexp) + { + $this->path = $regexp; + } + + /** + * Adds a check for the client IP. + * + * @param string $ip A specific IP address or a range specified using IP/netmask like 192.168.1.0/24 + */ + public function matchIp($ip) + { + $this->matchIps($ip); + } + + /** + * Adds a check for the client IP. + * + * @param string|string[]|null $ips A specific IP address or a range specified using IP/netmask like 192.168.1.0/24 + */ + public function matchIps($ips) + { + $this->ips = null !== $ips ? (array) $ips : array(); + } + + /** + * Adds a check for the HTTP method. + * + * @param string|string[]|null $method An HTTP method or an array of HTTP methods + */ + public function matchMethod($method) + { + $this->methods = null !== $method ? array_map('strtoupper', (array) $method) : array(); + } + + /** + * Adds a check for request attribute. + * + * @param string $key The request attribute name + * @param string $regexp A Regexp + */ + public function matchAttribute($key, $regexp) + { + $this->attributes[$key] = $regexp; + } + + /** + * {@inheritdoc} + */ + public function matches(Request $request) + { + if ($this->schemes && !in_array($request->getScheme(), $this->schemes, true)) { + return false; + } + + if ($this->methods && !in_array($request->getMethod(), $this->methods, true)) { + return false; + } + + foreach ($this->attributes as $key => $pattern) { + if (!preg_match('{'.$pattern.'}', $request->attributes->get($key))) { + return false; + } + } + + if (null !== $this->path && !preg_match('{'.$this->path.'}', rawurldecode($request->getPathInfo()))) { + return false; + } + + if (null !== $this->host && !preg_match('{'.$this->host.'}i', $request->getHost())) { + return false; + } + + if (IpUtils::checkIp($request->getClientIp(), $this->ips)) { + return true; + } + + // Note to future implementors: add additional checks above the + // foreach above or else your check might not be run! + return count($this->ips) === 0; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..066e7e8bf1deeee3a097fcb460b104aa388b4090 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.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\Component\HttpFoundation; + +/** + * RequestMatcherInterface is an interface for strategies to match a Request. + * + * @author Fabien Potencier + */ +interface RequestMatcherInterface +{ + /** + * Decides whether the rule(s) implemented by the strategy matches the supplied request. + * + * @param Request $request The request to check for a match + * + * @return bool true if the request matches, false otherwise + */ + public function matches(Request $request); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestStack.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestStack.php new file mode 100644 index 0000000000000000000000000000000000000000..3d9cfd0c641944728f0d21dcbbdbe89e5d0a3d85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/RequestStack.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * Request stack that controls the lifecycle of requests. + * + * @author Benjamin Eberlei + */ +class RequestStack +{ + /** + * @var Request[] + */ + private $requests = array(); + + /** + * Pushes a Request on the stack. + * + * This method should generally not be called directly as the stack + * management should be taken care of by the application itself. + */ + public function push(Request $request) + { + $this->requests[] = $request; + } + + /** + * Pops the current request from the stack. + * + * This operation lets the current request go out of scope. + * + * This method should generally not be called directly as the stack + * management should be taken care of by the application itself. + * + * @return Request|null + */ + public function pop() + { + if (!$this->requests) { + return; + } + + return array_pop($this->requests); + } + + /** + * @return Request|null + */ + public function getCurrentRequest() + { + return end($this->requests) ?: null; + } + + /** + * Gets the master Request. + * + * Be warned that making your code aware of the master request + * might make it un-compatible with other features of your framework + * like ESI support. + * + * @return Request|null + */ + public function getMasterRequest() + { + if (!$this->requests) { + return; + } + + return $this->requests[0]; + } + + /** + * Returns the parent request of the current. + * + * Be warned that making your code aware of the parent request + * might make it un-compatible with other features of your framework + * like ESI support. + * + * If current Request is the master request, it returns null. + * + * @return Request|null + */ + public function getParentRequest() + { + $pos = count($this->requests) - 2; + + if (!isset($this->requests[$pos])) { + return; + } + + return $this->requests[$pos]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Response.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Response.php new file mode 100644 index 0000000000000000000000000000000000000000..d1dd193f6eae33c34294c89cd5d63a7216bc7051 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Response.php @@ -0,0 +1,1226 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * Response represents an HTTP response. + * + * @author Fabien Potencier + */ +class Response +{ + const HTTP_CONTINUE = 100; + const HTTP_SWITCHING_PROTOCOLS = 101; + const HTTP_PROCESSING = 102; // RFC2518 + const HTTP_OK = 200; + const HTTP_CREATED = 201; + const HTTP_ACCEPTED = 202; + const HTTP_NON_AUTHORITATIVE_INFORMATION = 203; + const HTTP_NO_CONTENT = 204; + const HTTP_RESET_CONTENT = 205; + const HTTP_PARTIAL_CONTENT = 206; + const HTTP_MULTI_STATUS = 207; // RFC4918 + const HTTP_ALREADY_REPORTED = 208; // RFC5842 + const HTTP_IM_USED = 226; // RFC3229 + const HTTP_MULTIPLE_CHOICES = 300; + const HTTP_MOVED_PERMANENTLY = 301; + const HTTP_FOUND = 302; + const HTTP_SEE_OTHER = 303; + const HTTP_NOT_MODIFIED = 304; + const HTTP_USE_PROXY = 305; + const HTTP_RESERVED = 306; + const HTTP_TEMPORARY_REDIRECT = 307; + const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238 + const HTTP_BAD_REQUEST = 400; + const HTTP_UNAUTHORIZED = 401; + const HTTP_PAYMENT_REQUIRED = 402; + const HTTP_FORBIDDEN = 403; + const HTTP_NOT_FOUND = 404; + const HTTP_METHOD_NOT_ALLOWED = 405; + const HTTP_NOT_ACCEPTABLE = 406; + const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407; + const HTTP_REQUEST_TIMEOUT = 408; + const HTTP_CONFLICT = 409; + const HTTP_GONE = 410; + const HTTP_LENGTH_REQUIRED = 411; + const HTTP_PRECONDITION_FAILED = 412; + const HTTP_REQUEST_ENTITY_TOO_LARGE = 413; + const HTTP_REQUEST_URI_TOO_LONG = 414; + const HTTP_UNSUPPORTED_MEDIA_TYPE = 415; + const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416; + const HTTP_EXPECTATION_FAILED = 417; + const HTTP_I_AM_A_TEAPOT = 418; // RFC2324 + const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540 + const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918 + const HTTP_LOCKED = 423; // RFC4918 + const HTTP_FAILED_DEPENDENCY = 424; // RFC4918 + const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; // RFC2817 + const HTTP_UPGRADE_REQUIRED = 426; // RFC2817 + const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585 + const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585 + const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585 + const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451; + const HTTP_INTERNAL_SERVER_ERROR = 500; + const HTTP_NOT_IMPLEMENTED = 501; + const HTTP_BAD_GATEWAY = 502; + const HTTP_SERVICE_UNAVAILABLE = 503; + const HTTP_GATEWAY_TIMEOUT = 504; + const HTTP_VERSION_NOT_SUPPORTED = 505; + const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295 + const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918 + const HTTP_LOOP_DETECTED = 508; // RFC5842 + const HTTP_NOT_EXTENDED = 510; // RFC2774 + const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC6585 + + /** + * @var \Symfony\Component\HttpFoundation\ResponseHeaderBag + */ + public $headers; + + /** + * @var string + */ + protected $content; + + /** + * @var string + */ + protected $version; + + /** + * @var int + */ + protected $statusCode; + + /** + * @var string + */ + protected $statusText; + + /** + * @var string + */ + protected $charset; + + /** + * Status codes translation table. + * + * The list of codes is complete according to the + * {@link http://www.iana.org/assignments/http-status-codes/ Hypertext Transfer Protocol (HTTP) Status Code Registry} + * (last updated 2016-03-01). + * + * Unless otherwise noted, the status code is defined in RFC2616. + * + * @var array + */ + public static $statusTexts = array( + 100 => 'Continue', + 101 => 'Switching Protocols', + 102 => 'Processing', // RFC2518 + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + 207 => 'Multi-Status', // RFC4918 + 208 => 'Already Reported', // RFC5842 + 226 => 'IM Used', // RFC3229 + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 307 => 'Temporary Redirect', + 308 => 'Permanent Redirect', // RFC7238 + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Timeout', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Payload Too Large', + 414 => 'URI Too Long', + 415 => 'Unsupported Media Type', + 416 => 'Range Not Satisfiable', + 417 => 'Expectation Failed', + 418 => 'I\'m a teapot', // RFC2324 + 421 => 'Misdirected Request', // RFC7540 + 422 => 'Unprocessable Entity', // RFC4918 + 423 => 'Locked', // RFC4918 + 424 => 'Failed Dependency', // RFC4918 + 425 => 'Reserved for WebDAV advanced collections expired proposal', // RFC2817 + 426 => 'Upgrade Required', // RFC2817 + 428 => 'Precondition Required', // RFC6585 + 429 => 'Too Many Requests', // RFC6585 + 431 => 'Request Header Fields Too Large', // RFC6585 + 451 => 'Unavailable For Legal Reasons', // RFC7725 + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported', + 506 => 'Variant Also Negotiates (Experimental)', // RFC2295 + 507 => 'Insufficient Storage', // RFC4918 + 508 => 'Loop Detected', // RFC5842 + 510 => 'Not Extended', // RFC2774 + 511 => 'Network Authentication Required', // RFC6585 + ); + + private static $deprecatedMethods = array( + 'setDate', 'getDate', + 'setExpires', 'getExpires', + 'setLastModified', 'getLastModified', + 'setProtocolVersion', 'getProtocolVersion', + 'setStatusCode', 'getStatusCode', + 'setCharset', 'getCharset', + 'setPrivate', 'setPublic', + 'getAge', 'getMaxAge', 'setMaxAge', 'setSharedMaxAge', + 'getTtl', 'setTtl', 'setClientTtl', + 'getEtag', 'setEtag', + 'hasVary', 'getVary', 'setVary', + 'isInvalid', 'isSuccessful', 'isRedirection', + 'isClientError', 'isOk', 'isForbidden', + 'isNotFound', 'isRedirect', 'isEmpty', + ); + private static $deprecationsTriggered = array( + __CLASS__ => true, + BinaryFileResponse::class => true, + JsonResponse::class => true, + RedirectResponse::class => true, + StreamedResponse::class => true, + ); + + /** + * Constructor. + * + * @param mixed $content The response content, see setContent() + * @param int $status The response status code + * @param array $headers An array of response headers + * + * @throws \InvalidArgumentException When the HTTP status code is not valid + */ + public function __construct($content = '', $status = 200, $headers = array()) + { + $this->headers = new ResponseHeaderBag($headers); + $this->setContent($content); + $this->setStatusCode($status); + $this->setProtocolVersion('1.0'); + + // Deprecations + $class = get_class($this); + if ($this instanceof \PHPUnit_Framework_MockObject_MockObject || $this instanceof \Prophecy\Doubler\DoubleInterface) { + $class = get_parent_class($class); + } + if (isset(self::$deprecationsTriggered[$class])) { + return; + } + + self::$deprecationsTriggered[$class] = true; + foreach (self::$deprecatedMethods as $method) { + $r = new \ReflectionMethod($class, $method); + if (__CLASS__ !== $r->getDeclaringClass()->getName()) { + @trigger_error(sprintf('Extending %s::%s() in %s is deprecated since version 3.2 and won\'t be supported anymore in 4.0 as it will be final.', __CLASS__, $method, $class), E_USER_DEPRECATED); + } + } + } + + /** + * Factory method for chainability. + * + * Example: + * + * return Response::create($body, 200) + * ->setSharedMaxAge(300); + * + * @param mixed $content The response content, see setContent() + * @param int $status The response status code + * @param array $headers An array of response headers + * + * @return static + */ + public static function create($content = '', $status = 200, $headers = array()) + { + return new static($content, $status, $headers); + } + + /** + * Returns the Response as an HTTP string. + * + * The string representation of the Response is the same as the + * one that will be sent to the client only if the prepare() method + * has been called before. + * + * @return string The Response as an HTTP string + * + * @see prepare() + */ + public function __toString() + { + return + sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText)."\r\n". + $this->headers."\r\n". + $this->getContent(); + } + + /** + * Clones the current Response instance. + */ + public function __clone() + { + $this->headers = clone $this->headers; + } + + /** + * Prepares the Response before it is sent to the client. + * + * This method tweaks the Response to ensure that it is + * compliant with RFC 2616. Most of the changes are based on + * the Request that is "associated" with this Response. + * + * @param Request $request A Request instance + * + * @return $this + */ + public function prepare(Request $request) + { + $headers = $this->headers; + + if ($this->isInformational() || $this->isEmpty()) { + $this->setContent(null); + $headers->remove('Content-Type'); + $headers->remove('Content-Length'); + } else { + // Content-type based on the Request + if (!$headers->has('Content-Type')) { + $format = $request->getRequestFormat(); + if (null !== $format && $mimeType = $request->getMimeType($format)) { + $headers->set('Content-Type', $mimeType); + } + } + + // Fix Content-Type + $charset = $this->charset ?: 'UTF-8'; + if (!$headers->has('Content-Type')) { + $headers->set('Content-Type', 'text/html; charset='.$charset); + } elseif (0 === stripos($headers->get('Content-Type'), 'text/') && false === stripos($headers->get('Content-Type'), 'charset')) { + // add the charset + $headers->set('Content-Type', $headers->get('Content-Type').'; charset='.$charset); + } + + // Fix Content-Length + if ($headers->has('Transfer-Encoding')) { + $headers->remove('Content-Length'); + } + + if ($request->isMethod('HEAD')) { + // cf. RFC2616 14.13 + $length = $headers->get('Content-Length'); + $this->setContent(null); + if ($length) { + $headers->set('Content-Length', $length); + } + } + } + + // Fix protocol + if ('HTTP/1.0' != $request->server->get('SERVER_PROTOCOL')) { + $this->setProtocolVersion('1.1'); + } + + // Check if we need to send extra expire info headers + if ('1.0' == $this->getProtocolVersion() && false !== strpos($this->headers->get('Cache-Control'), 'no-cache')) { + $this->headers->set('pragma', 'no-cache'); + $this->headers->set('expires', -1); + } + + $this->ensureIEOverSSLCompatibility($request); + + return $this; + } + + /** + * Sends HTTP headers. + * + * @return $this + */ + public function sendHeaders() + { + // headers have already been sent by the developer + if (headers_sent()) { + return $this; + } + + if (!$this->headers->has('Date')) { + $this->setDate(\DateTime::createFromFormat('U', time())); + } + + // headers + foreach ($this->headers->allPreserveCase() as $name => $values) { + foreach ($values as $value) { + header($name.': '.$value, false, $this->statusCode); + } + } + + // status + header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode); + + // cookies + foreach ($this->headers->getCookies() as $cookie) { + if ($cookie->isRaw()) { + setrawcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly()); + } else { + setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly()); + } + } + + return $this; + } + + /** + * Sends content for the current web response. + * + * @return $this + */ + public function sendContent() + { + echo $this->content; + + return $this; + } + + /** + * Sends HTTP headers and content. + * + * @return $this + */ + public function send() + { + $this->sendHeaders(); + $this->sendContent(); + + if (function_exists('fastcgi_finish_request')) { + fastcgi_finish_request(); + } elseif ('cli' !== PHP_SAPI) { + static::closeOutputBuffers(0, true); + } + + return $this; + } + + /** + * Sets the response content. + * + * Valid types are strings, numbers, null, and objects that implement a __toString() method. + * + * @param mixed $content Content that can be cast to string + * + * @return $this + * + * @throws \UnexpectedValueException + */ + public function setContent($content) + { + if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable(array($content, '__toString'))) { + throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', gettype($content))); + } + + $this->content = (string) $content; + + return $this; + } + + /** + * Gets the current response content. + * + * @return string Content + */ + public function getContent() + { + return $this->content; + } + + /** + * Sets the HTTP protocol version (1.0 or 1.1). + * + * @param string $version The HTTP protocol version + * + * @return $this + */ + public function setProtocolVersion($version) + { + $this->version = $version; + + return $this; + } + + /** + * Gets the HTTP protocol version. + * + * @return string The HTTP protocol version + */ + public function getProtocolVersion() + { + return $this->version; + } + + /** + * Sets the response status code. + * + * @param int $code HTTP status code + * @param mixed $text HTTP status text + * + * If the status text is null it will be automatically populated for the known + * status codes and left empty otherwise. + * + * @return $this + * + * @throws \InvalidArgumentException When the HTTP status code is not valid + */ + public function setStatusCode($code, $text = null) + { + $this->statusCode = $code = (int) $code; + if ($this->isInvalid()) { + throw new \InvalidArgumentException(sprintf('The HTTP status code "%s" is not valid.', $code)); + } + + if (null === $text) { + $this->statusText = isset(self::$statusTexts[$code]) ? self::$statusTexts[$code] : 'unknown status'; + + return $this; + } + + if (false === $text) { + $this->statusText = ''; + + return $this; + } + + $this->statusText = $text; + + return $this; + } + + /** + * Retrieves the status code for the current web response. + * + * @return int Status code + */ + public function getStatusCode() + { + return $this->statusCode; + } + + /** + * Sets the response charset. + * + * @param string $charset Character set + * + * @return $this + */ + public function setCharset($charset) + { + $this->charset = $charset; + + return $this; + } + + /** + * Retrieves the response charset. + * + * @return string Character set + */ + public function getCharset() + { + return $this->charset; + } + + /** + * Returns true if the response is worth caching under any circumstance. + * + * Responses marked "private" with an explicit Cache-Control directive are + * considered uncacheable. + * + * Responses with neither a freshness lifetime (Expires, max-age) nor cache + * validator (Last-Modified, ETag) are considered uncacheable. + * + * @return bool true if the response is worth caching, false otherwise + */ + public function isCacheable() + { + if (!in_array($this->statusCode, array(200, 203, 300, 301, 302, 404, 410))) { + return false; + } + + if ($this->headers->hasCacheControlDirective('no-store') || $this->headers->getCacheControlDirective('private')) { + return false; + } + + return $this->isValidateable() || $this->isFresh(); + } + + /** + * Returns true if the response is "fresh". + * + * Fresh responses may be served from cache without any interaction with the + * origin. A response is considered fresh when it includes a Cache-Control/max-age + * indicator or Expires header and the calculated age is less than the freshness lifetime. + * + * @return bool true if the response is fresh, false otherwise + */ + public function isFresh() + { + return $this->getTtl() > 0; + } + + /** + * Returns true if the response includes headers that can be used to validate + * the response with the origin server using a conditional GET request. + * + * @return bool true if the response is validateable, false otherwise + */ + public function isValidateable() + { + return $this->headers->has('Last-Modified') || $this->headers->has('ETag'); + } + + /** + * Marks the response as "private". + * + * It makes the response ineligible for serving other clients. + * + * @return $this + */ + public function setPrivate() + { + $this->headers->removeCacheControlDirective('public'); + $this->headers->addCacheControlDirective('private'); + + return $this; + } + + /** + * Marks the response as "public". + * + * It makes the response eligible for serving other clients. + * + * @return $this + */ + public function setPublic() + { + $this->headers->addCacheControlDirective('public'); + $this->headers->removeCacheControlDirective('private'); + + return $this; + } + + /** + * Returns true if the response must be revalidated by caches. + * + * This method indicates that the response must not be served stale by a + * cache in any circumstance without first revalidating with the origin. + * When present, the TTL of the response should not be overridden to be + * greater than the value provided by the origin. + * + * @return bool true if the response must be revalidated by a cache, false otherwise + */ + public function mustRevalidate() + { + return $this->headers->hasCacheControlDirective('must-revalidate') || $this->headers->hasCacheControlDirective('proxy-revalidate'); + } + + /** + * Returns the Date header as a DateTime instance. + * + * @return \DateTime A \DateTime instance + * + * @throws \RuntimeException When the header is not parseable + */ + public function getDate() + { + if (!$this->headers->has('Date')) { + $this->setDate(\DateTime::createFromFormat('U', time())); + } + + return $this->headers->getDate('Date'); + } + + /** + * Sets the Date header. + * + * @param \DateTime $date A \DateTime instance + * + * @return $this + */ + public function setDate(\DateTime $date) + { + $date->setTimezone(new \DateTimeZone('UTC')); + $this->headers->set('Date', $date->format('D, d M Y H:i:s').' GMT'); + + return $this; + } + + /** + * Returns the age of the response. + * + * @return int The age of the response in seconds + */ + public function getAge() + { + if (null !== $age = $this->headers->get('Age')) { + return (int) $age; + } + + return max(time() - $this->getDate()->format('U'), 0); + } + + /** + * Marks the response stale by setting the Age header to be equal to the maximum age of the response. + * + * @return $this + */ + public function expire() + { + if ($this->isFresh()) { + $this->headers->set('Age', $this->getMaxAge()); + } + + return $this; + } + + /** + * Returns the value of the Expires header as a DateTime instance. + * + * @return \DateTime|null A DateTime instance or null if the header does not exist + */ + public function getExpires() + { + try { + return $this->headers->getDate('Expires'); + } catch (\RuntimeException $e) { + // according to RFC 2616 invalid date formats (e.g. "0" and "-1") must be treated as in the past + return \DateTime::createFromFormat(DATE_RFC2822, 'Sat, 01 Jan 00 00:00:00 +0000'); + } + } + + /** + * Sets the Expires HTTP header with a DateTime instance. + * + * Passing null as value will remove the header. + * + * @param \DateTime|null $date A \DateTime instance or null to remove the header + * + * @return $this + */ + public function setExpires(\DateTime $date = null) + { + if (null === $date) { + $this->headers->remove('Expires'); + } else { + $date = clone $date; + $date->setTimezone(new \DateTimeZone('UTC')); + $this->headers->set('Expires', $date->format('D, d M Y H:i:s').' GMT'); + } + + return $this; + } + + /** + * Returns the number of seconds after the time specified in the response's Date + * header when the response should no longer be considered fresh. + * + * First, it checks for a s-maxage directive, then a max-age directive, and then it falls + * back on an expires header. It returns null when no maximum age can be established. + * + * @return int|null Number of seconds + */ + public function getMaxAge() + { + if ($this->headers->hasCacheControlDirective('s-maxage')) { + return (int) $this->headers->getCacheControlDirective('s-maxage'); + } + + if ($this->headers->hasCacheControlDirective('max-age')) { + return (int) $this->headers->getCacheControlDirective('max-age'); + } + + if (null !== $this->getExpires()) { + return $this->getExpires()->format('U') - $this->getDate()->format('U'); + } + } + + /** + * Sets the number of seconds after which the response should no longer be considered fresh. + * + * This methods sets the Cache-Control max-age directive. + * + * @param int $value Number of seconds + * + * @return $this + */ + public function setMaxAge($value) + { + $this->headers->addCacheControlDirective('max-age', $value); + + return $this; + } + + /** + * Sets the number of seconds after which the response should no longer be considered fresh by shared caches. + * + * This methods sets the Cache-Control s-maxage directive. + * + * @param int $value Number of seconds + * + * @return $this + */ + public function setSharedMaxAge($value) + { + $this->setPublic(); + $this->headers->addCacheControlDirective('s-maxage', $value); + + return $this; + } + + /** + * Returns the response's time-to-live in seconds. + * + * It returns null when no freshness information is present in the response. + * + * When the responses TTL is <= 0, the response may not be served from cache without first + * revalidating with the origin. + * + * @return int|null The TTL in seconds + */ + public function getTtl() + { + if (null !== $maxAge = $this->getMaxAge()) { + return $maxAge - $this->getAge(); + } + } + + /** + * Sets the response's time-to-live for shared caches. + * + * This method adjusts the Cache-Control/s-maxage directive. + * + * @param int $seconds Number of seconds + * + * @return $this + */ + public function setTtl($seconds) + { + $this->setSharedMaxAge($this->getAge() + $seconds); + + return $this; + } + + /** + * Sets the response's time-to-live for private/client caches. + * + * This method adjusts the Cache-Control/max-age directive. + * + * @param int $seconds Number of seconds + * + * @return $this + */ + public function setClientTtl($seconds) + { + $this->setMaxAge($this->getAge() + $seconds); + + return $this; + } + + /** + * Returns the Last-Modified HTTP header as a DateTime instance. + * + * @return \DateTime|null A DateTime instance or null if the header does not exist + * + * @throws \RuntimeException When the HTTP header is not parseable + */ + public function getLastModified() + { + return $this->headers->getDate('Last-Modified'); + } + + /** + * Sets the Last-Modified HTTP header with a DateTime instance. + * + * Passing null as value will remove the header. + * + * @param \DateTime|null $date A \DateTime instance or null to remove the header + * + * @return $this + */ + public function setLastModified(\DateTime $date = null) + { + if (null === $date) { + $this->headers->remove('Last-Modified'); + } else { + $date = clone $date; + $date->setTimezone(new \DateTimeZone('UTC')); + $this->headers->set('Last-Modified', $date->format('D, d M Y H:i:s').' GMT'); + } + + return $this; + } + + /** + * Returns the literal value of the ETag HTTP header. + * + * @return string|null The ETag HTTP header or null if it does not exist + */ + public function getEtag() + { + return $this->headers->get('ETag'); + } + + /** + * Sets the ETag value. + * + * @param string|null $etag The ETag unique identifier or null to remove the header + * @param bool $weak Whether you want a weak ETag or not + * + * @return $this + */ + public function setEtag($etag = null, $weak = false) + { + if (null === $etag) { + $this->headers->remove('Etag'); + } else { + if (0 !== strpos($etag, '"')) { + $etag = '"'.$etag.'"'; + } + + $this->headers->set('ETag', (true === $weak ? 'W/' : '').$etag); + } + + return $this; + } + + /** + * Sets the response's cache headers (validation and/or expiration). + * + * Available options are: etag, last_modified, max_age, s_maxage, private, and public. + * + * @param array $options An array of cache options + * + * @return $this + * + * @throws \InvalidArgumentException + */ + public function setCache(array $options) + { + if ($diff = array_diff(array_keys($options), array('etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public'))) { + throw new \InvalidArgumentException(sprintf('Response does not support the following options: "%s".', implode('", "', array_values($diff)))); + } + + if (isset($options['etag'])) { + $this->setEtag($options['etag']); + } + + if (isset($options['last_modified'])) { + $this->setLastModified($options['last_modified']); + } + + if (isset($options['max_age'])) { + $this->setMaxAge($options['max_age']); + } + + if (isset($options['s_maxage'])) { + $this->setSharedMaxAge($options['s_maxage']); + } + + if (isset($options['public'])) { + if ($options['public']) { + $this->setPublic(); + } else { + $this->setPrivate(); + } + } + + if (isset($options['private'])) { + if ($options['private']) { + $this->setPrivate(); + } else { + $this->setPublic(); + } + } + + return $this; + } + + /** + * Modifies the response so that it conforms to the rules defined for a 304 status code. + * + * This sets the status, removes the body, and discards any headers + * that MUST NOT be included in 304 responses. + * + * @return $this + * + * @see http://tools.ietf.org/html/rfc2616#section-10.3.5 + */ + public function setNotModified() + { + $this->setStatusCode(304); + $this->setContent(null); + + // remove headers that MUST NOT be included with 304 Not Modified responses + foreach (array('Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified') as $header) { + $this->headers->remove($header); + } + + return $this; + } + + /** + * Returns true if the response includes a Vary header. + * + * @return bool true if the response includes a Vary header, false otherwise + */ + public function hasVary() + { + return null !== $this->headers->get('Vary'); + } + + /** + * Returns an array of header names given in the Vary header. + * + * @return array An array of Vary names + */ + public function getVary() + { + if (!$vary = $this->headers->get('Vary', null, false)) { + return array(); + } + + $ret = array(); + foreach ($vary as $item) { + $ret = array_merge($ret, preg_split('/[\s,]+/', $item)); + } + + return $ret; + } + + /** + * Sets the Vary header. + * + * @param string|array $headers + * @param bool $replace Whether to replace the actual value or not (true by default) + * + * @return $this + */ + public function setVary($headers, $replace = true) + { + $this->headers->set('Vary', $headers, $replace); + + return $this; + } + + /** + * Determines if the Response validators (ETag, Last-Modified) match + * a conditional value specified in the Request. + * + * If the Response is not modified, it sets the status code to 304 and + * removes the actual content by calling the setNotModified() method. + * + * @param Request $request A Request instance + * + * @return bool true if the Response validators match the Request, false otherwise + */ + public function isNotModified(Request $request) + { + if (!$request->isMethodCacheable()) { + return false; + } + + $notModified = false; + $lastModified = $this->headers->get('Last-Modified'); + $modifiedSince = $request->headers->get('If-Modified-Since'); + + if ($etags = $request->getETags()) { + $notModified = in_array($this->getEtag(), $etags) || in_array('*', $etags); + } + + if ($modifiedSince && $lastModified) { + $notModified = strtotime($modifiedSince) >= strtotime($lastModified) && (!$etags || $notModified); + } + + if ($notModified) { + $this->setNotModified(); + } + + return $notModified; + } + + /** + * Is response invalid? + * + * @return bool + * + * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html + */ + public function isInvalid() + { + return $this->statusCode < 100 || $this->statusCode >= 600; + } + + /** + * Is response informative? + * + * @return bool + */ + public function isInformational() + { + return $this->statusCode >= 100 && $this->statusCode < 200; + } + + /** + * Is response successful? + * + * @return bool + */ + public function isSuccessful() + { + return $this->statusCode >= 200 && $this->statusCode < 300; + } + + /** + * Is the response a redirect? + * + * @return bool + */ + public function isRedirection() + { + return $this->statusCode >= 300 && $this->statusCode < 400; + } + + /** + * Is there a client error? + * + * @return bool + */ + public function isClientError() + { + return $this->statusCode >= 400 && $this->statusCode < 500; + } + + /** + * Was there a server side error? + * + * @return bool + */ + public function isServerError() + { + return $this->statusCode >= 500 && $this->statusCode < 600; + } + + /** + * Is the response OK? + * + * @return bool + */ + public function isOk() + { + return 200 === $this->statusCode; + } + + /** + * Is the response forbidden? + * + * @return bool + */ + public function isForbidden() + { + return 403 === $this->statusCode; + } + + /** + * Is the response a not found error? + * + * @return bool + */ + public function isNotFound() + { + return 404 === $this->statusCode; + } + + /** + * Is the response a redirect of some form? + * + * @param string $location + * + * @return bool + */ + public function isRedirect($location = null) + { + return in_array($this->statusCode, array(201, 301, 302, 303, 307, 308)) && (null === $location ?: $location == $this->headers->get('Location')); + } + + /** + * Is the response empty? + * + * @return bool + */ + public function isEmpty() + { + return in_array($this->statusCode, array(204, 304)); + } + + /** + * Cleans or flushes output buffers up to target level. + * + * Resulting level can be greater than target level if a non-removable buffer has been encountered. + * + * @param int $targetLevel The target output buffering level + * @param bool $flush Whether to flush or clean the buffers + */ + public static function closeOutputBuffers($targetLevel, $flush) + { + $status = ob_get_status(true); + $level = count($status); + // PHP_OUTPUT_HANDLER_* are not defined on HHVM 3.3 + $flags = defined('PHP_OUTPUT_HANDLER_REMOVABLE') ? PHP_OUTPUT_HANDLER_REMOVABLE | ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE) : -1; + + while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || $flags === ($s['flags'] & $flags) : $s['del'])) { + if ($flush) { + ob_end_flush(); + } else { + ob_end_clean(); + } + } + } + + /** + * Checks if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9. + * + * @see http://support.microsoft.com/kb/323308 + */ + protected function ensureIEOverSSLCompatibility(Request $request) + { + if (false !== stripos($this->headers->get('Content-Disposition'), 'attachment') && preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT'), $match) == 1 && true === $request->isSecure()) { + if ((int) preg_replace('/(MSIE )(.*?);/', '$2', $match[0]) < 9) { + $this->headers->remove('Cache-Control'); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php new file mode 100644 index 0000000000000000000000000000000000000000..2b630d8a722764f01a602395c1a4cc24914aa19f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php @@ -0,0 +1,304 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * ResponseHeaderBag is a container for Response HTTP headers. + * + * @author Fabien Potencier + */ +class ResponseHeaderBag extends HeaderBag +{ + const COOKIES_FLAT = 'flat'; + const COOKIES_ARRAY = 'array'; + + const DISPOSITION_ATTACHMENT = 'attachment'; + const DISPOSITION_INLINE = 'inline'; + + /** + * @var array + */ + protected $computedCacheControl = array(); + + /** + * @var array + */ + protected $cookies = array(); + + /** + * @var array + */ + protected $headerNames = array(); + + /** + * Constructor. + * + * @param array $headers An array of HTTP headers + */ + public function __construct(array $headers = array()) + { + parent::__construct($headers); + + if (!isset($this->headers['cache-control'])) { + $this->set('Cache-Control', ''); + } + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + $cookies = ''; + foreach ($this->getCookies() as $cookie) { + $cookies .= 'Set-Cookie: '.$cookie."\r\n"; + } + + ksort($this->headerNames); + + return parent::__toString().$cookies; + } + + /** + * Returns the headers, with original capitalizations. + * + * @return array An array of headers + */ + public function allPreserveCase() + { + return array_combine($this->headerNames, $this->headers); + } + + /** + * {@inheritdoc} + */ + public function replace(array $headers = array()) + { + $this->headerNames = array(); + + parent::replace($headers); + + if (!isset($this->headers['cache-control'])) { + $this->set('Cache-Control', ''); + } + } + + /** + * {@inheritdoc} + */ + public function set($key, $values, $replace = true) + { + parent::set($key, $values, $replace); + + $uniqueKey = str_replace('_', '-', strtolower($key)); + $this->headerNames[$uniqueKey] = $key; + + // ensure the cache-control header has sensible defaults + if (in_array($uniqueKey, array('cache-control', 'etag', 'last-modified', 'expires'))) { + $computed = $this->computeCacheControlValue(); + $this->headers['cache-control'] = array($computed); + $this->headerNames['cache-control'] = 'Cache-Control'; + $this->computedCacheControl = $this->parseCacheControl($computed); + } + } + + /** + * {@inheritdoc} + */ + public function remove($key) + { + parent::remove($key); + + $uniqueKey = str_replace('_', '-', strtolower($key)); + unset($this->headerNames[$uniqueKey]); + + if ('cache-control' === $uniqueKey) { + $this->computedCacheControl = array(); + } + } + + /** + * {@inheritdoc} + */ + public function hasCacheControlDirective($key) + { + return array_key_exists($key, $this->computedCacheControl); + } + + /** + * {@inheritdoc} + */ + public function getCacheControlDirective($key) + { + return array_key_exists($key, $this->computedCacheControl) ? $this->computedCacheControl[$key] : null; + } + + /** + * Sets a cookie. + * + * @param Cookie $cookie + */ + public function setCookie(Cookie $cookie) + { + $this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie; + } + + /** + * Removes a cookie from the array, but does not unset it in the browser. + * + * @param string $name + * @param string $path + * @param string $domain + */ + public function removeCookie($name, $path = '/', $domain = null) + { + if (null === $path) { + $path = '/'; + } + + unset($this->cookies[$domain][$path][$name]); + + if (empty($this->cookies[$domain][$path])) { + unset($this->cookies[$domain][$path]); + + if (empty($this->cookies[$domain])) { + unset($this->cookies[$domain]); + } + } + } + + /** + * Returns an array with all cookies. + * + * @param string $format + * + * @return array + * + * @throws \InvalidArgumentException When the $format is invalid + */ + public function getCookies($format = self::COOKIES_FLAT) + { + if (!in_array($format, array(self::COOKIES_FLAT, self::COOKIES_ARRAY))) { + throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', array(self::COOKIES_FLAT, self::COOKIES_ARRAY)))); + } + + if (self::COOKIES_ARRAY === $format) { + return $this->cookies; + } + + $flattenedCookies = array(); + foreach ($this->cookies as $path) { + foreach ($path as $cookies) { + foreach ($cookies as $cookie) { + $flattenedCookies[] = $cookie; + } + } + } + + return $flattenedCookies; + } + + /** + * Clears a cookie in the browser. + * + * @param string $name + * @param string $path + * @param string $domain + * @param bool $secure + * @param bool $httpOnly + */ + public function clearCookie($name, $path = '/', $domain = null, $secure = false, $httpOnly = true) + { + $this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly)); + } + + /** + * Generates a HTTP Content-Disposition field-value. + * + * @param string $disposition One of "inline" or "attachment" + * @param string $filename A unicode string + * @param string $filenameFallback A string containing only ASCII characters that + * is semantically equivalent to $filename. If the filename is already ASCII, + * it can be omitted, or just copied from $filename + * + * @return string A string suitable for use as a Content-Disposition field-value + * + * @throws \InvalidArgumentException + * + * @see RFC 6266 + */ + public function makeDisposition($disposition, $filename, $filenameFallback = '') + { + if (!in_array($disposition, array(self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE))) { + throw new \InvalidArgumentException(sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE)); + } + + if ('' == $filenameFallback) { + $filenameFallback = $filename; + } + + // filenameFallback is not ASCII. + if (!preg_match('/^[\x20-\x7e]*$/', $filenameFallback)) { + throw new \InvalidArgumentException('The filename fallback must only contain ASCII characters.'); + } + + // percent characters aren't safe in fallback. + if (false !== strpos($filenameFallback, '%')) { + throw new \InvalidArgumentException('The filename fallback cannot contain the "%" character.'); + } + + // path separators aren't allowed in either. + if (false !== strpos($filename, '/') || false !== strpos($filename, '\\') || false !== strpos($filenameFallback, '/') || false !== strpos($filenameFallback, '\\')) { + throw new \InvalidArgumentException('The filename and the fallback cannot contain the "/" and "\\" characters.'); + } + + $output = sprintf('%s; filename="%s"', $disposition, str_replace('"', '\\"', $filenameFallback)); + + if ($filename !== $filenameFallback) { + $output .= sprintf("; filename*=utf-8''%s", rawurlencode($filename)); + } + + return $output; + } + + /** + * Returns the calculated value of the cache-control header. + * + * This considers several other headers and calculates or modifies the + * cache-control header to a sensible, conservative value. + * + * @return string + */ + protected function computeCacheControlValue() + { + if (!$this->cacheControl && !$this->has('ETag') && !$this->has('Last-Modified') && !$this->has('Expires')) { + return 'no-cache, private'; + } + + if (!$this->cacheControl) { + // conservative by default + return 'private, must-revalidate'; + } + + $header = $this->getCacheControlHeader(); + if (isset($this->cacheControl['public']) || isset($this->cacheControl['private'])) { + return $header; + } + + // public if s-maxage is defined, private otherwise + if (!isset($this->cacheControl['s-maxage'])) { + return $header.', private'; + } + + return $header; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ServerBag.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ServerBag.php new file mode 100644 index 0000000000000000000000000000000000000000..0d38c08ac0544e0aa62a38889577f54137447dbf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/ServerBag.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * ServerBag is a container for HTTP headers from the $_SERVER variable. + * + * @author Fabien Potencier + * @author Bulat Shakirzyanov + * @author Robert Kiss + */ +class ServerBag extends ParameterBag +{ + /** + * Gets the HTTP headers. + * + * @return array + */ + public function getHeaders() + { + $headers = array(); + $contentHeaders = array('CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true); + foreach ($this->parameters as $key => $value) { + if (0 === strpos($key, 'HTTP_')) { + $headers[substr($key, 5)] = $value; + } + // CONTENT_* are not prefixed with HTTP_ + elseif (isset($contentHeaders[$key])) { + $headers[$key] = $value; + } + } + + if (isset($this->parameters['PHP_AUTH_USER'])) { + $headers['PHP_AUTH_USER'] = $this->parameters['PHP_AUTH_USER']; + $headers['PHP_AUTH_PW'] = isset($this->parameters['PHP_AUTH_PW']) ? $this->parameters['PHP_AUTH_PW'] : ''; + } else { + /* + * php-cgi under Apache does not pass HTTP Basic user/pass to PHP by default + * For this workaround to work, add these lines to your .htaccess file: + * RewriteCond %{HTTP:Authorization} ^(.+)$ + * RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + * + * A sample .htaccess file: + * RewriteEngine On + * RewriteCond %{HTTP:Authorization} ^(.+)$ + * RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + * RewriteCond %{REQUEST_FILENAME} !-f + * RewriteRule ^(.*)$ app.php [QSA,L] + */ + + $authorizationHeader = null; + if (isset($this->parameters['HTTP_AUTHORIZATION'])) { + $authorizationHeader = $this->parameters['HTTP_AUTHORIZATION']; + } elseif (isset($this->parameters['REDIRECT_HTTP_AUTHORIZATION'])) { + $authorizationHeader = $this->parameters['REDIRECT_HTTP_AUTHORIZATION']; + } + + if (null !== $authorizationHeader) { + if (0 === stripos($authorizationHeader, 'basic ')) { + // Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic + $exploded = explode(':', base64_decode(substr($authorizationHeader, 6)), 2); + if (count($exploded) == 2) { + list($headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']) = $exploded; + } + } elseif (empty($this->parameters['PHP_AUTH_DIGEST']) && (0 === stripos($authorizationHeader, 'digest '))) { + // In some circumstances PHP_AUTH_DIGEST needs to be set + $headers['PHP_AUTH_DIGEST'] = $authorizationHeader; + $this->parameters['PHP_AUTH_DIGEST'] = $authorizationHeader; + } elseif (0 === stripos($authorizationHeader, 'bearer ')) { + /* + * XXX: Since there is no PHP_AUTH_BEARER in PHP predefined variables, + * I'll just set $headers['AUTHORIZATION'] here. + * http://php.net/manual/en/reserved.variables.server.php + */ + $headers['AUTHORIZATION'] = $authorizationHeader; + } + } + } + + if (isset($headers['AUTHORIZATION'])) { + return $headers; + } + + // PHP_AUTH_USER/PHP_AUTH_PW + if (isset($headers['PHP_AUTH_USER'])) { + $headers['AUTHORIZATION'] = 'Basic '.base64_encode($headers['PHP_AUTH_USER'].':'.$headers['PHP_AUTH_PW']); + } elseif (isset($headers['PHP_AUTH_DIGEST'])) { + $headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST']; + } + + return $headers; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php new file mode 100644 index 0000000000000000000000000000000000000000..af292e37a4fe47cfff65e7bc995f23371035e626 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php @@ -0,0 +1,157 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Attribute; + +/** + * This class relates to session attribute storage. + */ +class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Countable +{ + private $name = 'attributes'; + + /** + * @var string + */ + private $storageKey; + + /** + * @var array + */ + protected $attributes = array(); + + /** + * Constructor. + * + * @param string $storageKey The key used to store attributes in the session + */ + public function __construct($storageKey = '_sf2_attributes') + { + $this->storageKey = $storageKey; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->name; + } + + public function setName($name) + { + $this->name = $name; + } + + /** + * {@inheritdoc} + */ + public function initialize(array &$attributes) + { + $this->attributes = &$attributes; + } + + /** + * {@inheritdoc} + */ + public function getStorageKey() + { + return $this->storageKey; + } + + /** + * {@inheritdoc} + */ + public function has($name) + { + return array_key_exists($name, $this->attributes); + } + + /** + * {@inheritdoc} + */ + public function get($name, $default = null) + { + return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; + } + + /** + * {@inheritdoc} + */ + public function set($name, $value) + { + $this->attributes[$name] = $value; + } + + /** + * {@inheritdoc} + */ + public function all() + { + return $this->attributes; + } + + /** + * {@inheritdoc} + */ + public function replace(array $attributes) + { + $this->attributes = array(); + foreach ($attributes as $key => $value) { + $this->set($key, $value); + } + } + + /** + * {@inheritdoc} + */ + public function remove($name) + { + $retval = null; + if (array_key_exists($name, $this->attributes)) { + $retval = $this->attributes[$name]; + unset($this->attributes[$name]); + } + + return $retval; + } + + /** + * {@inheritdoc} + */ + public function clear() + { + $return = $this->attributes; + $this->attributes = array(); + + return $return; + } + + /** + * Returns an iterator for attributes. + * + * @return \ArrayIterator An \ArrayIterator instance + */ + public function getIterator() + { + return new \ArrayIterator($this->attributes); + } + + /** + * Returns the number of attributes. + * + * @return int The number of attributes + */ + public function count() + { + return count($this->attributes); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..0d8d17991be704f5f64d41b13bfacc6a70944393 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Attribute; + +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; + +/** + * Attributes store. + * + * @author Drak + */ +interface AttributeBagInterface extends SessionBagInterface +{ + /** + * Checks if an attribute is defined. + * + * @param string $name The attribute name + * + * @return bool true if the attribute is defined, false otherwise + */ + public function has($name); + + /** + * Returns an attribute. + * + * @param string $name The attribute name + * @param mixed $default The default value if not found + * + * @return mixed + */ + public function get($name, $default = null); + + /** + * Sets an attribute. + * + * @param string $name + * @param mixed $value + */ + public function set($name, $value); + + /** + * Returns attributes. + * + * @return array Attributes + */ + public function all(); + + /** + * Sets attributes. + * + * @param array $attributes Attributes + */ + public function replace(array $attributes); + + /** + * Removes an attribute. + * + * @param string $name + * + * @return mixed The removed value or null when it does not exist + */ + public function remove($name); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php new file mode 100644 index 0000000000000000000000000000000000000000..d797a6f23886e9db8d44acba1b9d5cd848894c4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php @@ -0,0 +1,160 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Attribute; + +/** + * This class provides structured storage of session attributes using + * a name spacing character in the key. + * + * @author Drak + */ +class NamespacedAttributeBag extends AttributeBag +{ + /** + * Namespace character. + * + * @var string + */ + private $namespaceCharacter; + + /** + * Constructor. + * + * @param string $storageKey Session storage key + * @param string $namespaceCharacter Namespace character to use in keys + */ + public function __construct($storageKey = '_sf2_attributes', $namespaceCharacter = '/') + { + $this->namespaceCharacter = $namespaceCharacter; + parent::__construct($storageKey); + } + + /** + * {@inheritdoc} + */ + public function has($name) + { + // reference mismatch: if fixed, re-introduced in array_key_exists; keep as it is + $attributes = $this->resolveAttributePath($name); + $name = $this->resolveKey($name); + + if (null === $attributes) { + return false; + } + + return array_key_exists($name, $attributes); + } + + /** + * {@inheritdoc} + */ + public function get($name, $default = null) + { + // reference mismatch: if fixed, re-introduced in array_key_exists; keep as it is + $attributes = $this->resolveAttributePath($name); + $name = $this->resolveKey($name); + + if (null === $attributes) { + return $default; + } + + return array_key_exists($name, $attributes) ? $attributes[$name] : $default; + } + + /** + * {@inheritdoc} + */ + public function set($name, $value) + { + $attributes = &$this->resolveAttributePath($name, true); + $name = $this->resolveKey($name); + $attributes[$name] = $value; + } + + /** + * {@inheritdoc} + */ + public function remove($name) + { + $retval = null; + $attributes = &$this->resolveAttributePath($name); + $name = $this->resolveKey($name); + if (null !== $attributes && array_key_exists($name, $attributes)) { + $retval = $attributes[$name]; + unset($attributes[$name]); + } + + return $retval; + } + + /** + * Resolves a path in attributes property and returns it as a reference. + * + * This method allows structured namespacing of session attributes. + * + * @param string $name Key name + * @param bool $writeContext Write context, default false + * + * @return array + */ + protected function &resolveAttributePath($name, $writeContext = false) + { + $array = &$this->attributes; + $name = (strpos($name, $this->namespaceCharacter) === 0) ? substr($name, 1) : $name; + + // Check if there is anything to do, else return + if (!$name) { + return $array; + } + + $parts = explode($this->namespaceCharacter, $name); + if (count($parts) < 2) { + if (!$writeContext) { + return $array; + } + + $array[$parts[0]] = array(); + + return $array; + } + + unset($parts[count($parts) - 1]); + + foreach ($parts as $part) { + if (null !== $array && !array_key_exists($part, $array)) { + $array[$part] = $writeContext ? array() : null; + } + + $array = &$array[$part]; + } + + return $array; + } + + /** + * Resolves the key from the name. + * + * This is the last part in a dot separated string. + * + * @param string $name + * + * @return string + */ + protected function resolveKey($name) + { + if (false !== $pos = strrpos($name, $this->namespaceCharacter)) { + $name = substr($name, $pos + 1); + } + + return $name; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php new file mode 100644 index 0000000000000000000000000000000000000000..ddd603fdd1efb63d4ee803d1d91c331aabb64265 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.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\Component\HttpFoundation\Session\Flash; + +/** + * AutoExpireFlashBag flash message container. + * + * @author Drak + */ +class AutoExpireFlashBag implements FlashBagInterface +{ + private $name = 'flashes'; + + /** + * Flash messages. + * + * @var array + */ + private $flashes = array('display' => array(), 'new' => array()); + + /** + * The storage key for flashes in the session. + * + * @var string + */ + private $storageKey; + + /** + * Constructor. + * + * @param string $storageKey The key used to store flashes in the session + */ + public function __construct($storageKey = '_sf2_flashes') + { + $this->storageKey = $storageKey; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->name; + } + + public function setName($name) + { + $this->name = $name; + } + + /** + * {@inheritdoc} + */ + public function initialize(array &$flashes) + { + $this->flashes = &$flashes; + + // The logic: messages from the last request will be stored in new, so we move them to previous + // This request we will show what is in 'display'. What is placed into 'new' this time round will + // be moved to display next time round. + $this->flashes['display'] = array_key_exists('new', $this->flashes) ? $this->flashes['new'] : array(); + $this->flashes['new'] = array(); + } + + /** + * {@inheritdoc} + */ + public function add($type, $message) + { + $this->flashes['new'][$type][] = $message; + } + + /** + * {@inheritdoc} + */ + public function peek($type, array $default = array()) + { + return $this->has($type) ? $this->flashes['display'][$type] : $default; + } + + /** + * {@inheritdoc} + */ + public function peekAll() + { + return array_key_exists('display', $this->flashes) ? (array) $this->flashes['display'] : array(); + } + + /** + * {@inheritdoc} + */ + public function get($type, array $default = array()) + { + $return = $default; + + if (!$this->has($type)) { + return $return; + } + + if (isset($this->flashes['display'][$type])) { + $return = $this->flashes['display'][$type]; + unset($this->flashes['display'][$type]); + } + + return $return; + } + + /** + * {@inheritdoc} + */ + public function all() + { + $return = $this->flashes['display']; + $this->flashes = array('new' => array(), 'display' => array()); + + return $return; + } + + /** + * {@inheritdoc} + */ + public function setAll(array $messages) + { + $this->flashes['new'] = $messages; + } + + /** + * {@inheritdoc} + */ + public function set($type, $messages) + { + $this->flashes['new'][$type] = (array) $messages; + } + + /** + * {@inheritdoc} + */ + public function has($type) + { + return array_key_exists($type, $this->flashes['display']) && $this->flashes['display'][$type]; + } + + /** + * {@inheritdoc} + */ + public function keys() + { + return array_keys($this->flashes['display']); + } + + /** + * {@inheritdoc} + */ + public function getStorageKey() + { + return $this->storageKey; + } + + /** + * {@inheritdoc} + */ + public function clear() + { + return $this->all(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php new file mode 100644 index 0000000000000000000000000000000000000000..85b4f00b00f56c8cd85b3417e48c55a6e2dff4b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php @@ -0,0 +1,166 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Flash; + +/** + * FlashBag flash message container. + * + * @author Drak + */ +class FlashBag implements FlashBagInterface +{ + private $name = 'flashes'; + + /** + * Flash messages. + * + * @var array + */ + private $flashes = array(); + + /** + * The storage key for flashes in the session. + * + * @var string + */ + private $storageKey; + + /** + * Constructor. + * + * @param string $storageKey The key used to store flashes in the session + */ + public function __construct($storageKey = '_sf2_flashes') + { + $this->storageKey = $storageKey; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->name; + } + + public function setName($name) + { + $this->name = $name; + } + + /** + * {@inheritdoc} + */ + public function initialize(array &$flashes) + { + $this->flashes = &$flashes; + } + + /** + * {@inheritdoc} + */ + public function add($type, $message) + { + $this->flashes[$type][] = $message; + } + + /** + * {@inheritdoc} + */ + public function peek($type, array $default = array()) + { + return $this->has($type) ? $this->flashes[$type] : $default; + } + + /** + * {@inheritdoc} + */ + public function peekAll() + { + return $this->flashes; + } + + /** + * {@inheritdoc} + */ + public function get($type, array $default = array()) + { + if (!$this->has($type)) { + return $default; + } + + $return = $this->flashes[$type]; + + unset($this->flashes[$type]); + + return $return; + } + + /** + * {@inheritdoc} + */ + public function all() + { + $return = $this->peekAll(); + $this->flashes = array(); + + return $return; + } + + /** + * {@inheritdoc} + */ + public function set($type, $messages) + { + $this->flashes[$type] = (array) $messages; + } + + /** + * {@inheritdoc} + */ + public function setAll(array $messages) + { + $this->flashes = $messages; + } + + /** + * {@inheritdoc} + */ + public function has($type) + { + return array_key_exists($type, $this->flashes) && $this->flashes[$type]; + } + + /** + * {@inheritdoc} + */ + public function keys() + { + return array_keys($this->flashes); + } + + /** + * {@inheritdoc} + */ + public function getStorageKey() + { + return $this->storageKey; + } + + /** + * {@inheritdoc} + */ + public function clear() + { + return $this->all(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..25f3d57b5417b88b17abdc195c83967cfda94367 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Flash; + +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; + +/** + * FlashBagInterface. + * + * @author Drak + */ +interface FlashBagInterface extends SessionBagInterface +{ + /** + * Adds a flash message for type. + * + * @param string $type + * @param string $message + */ + public function add($type, $message); + + /** + * Registers a message for a given type. + * + * @param string $type + * @param string|array $message + */ + public function set($type, $message); + + /** + * Gets flash messages for a given type. + * + * @param string $type Message category type + * @param array $default Default value if $type does not exist + * + * @return array + */ + public function peek($type, array $default = array()); + + /** + * Gets all flash messages. + * + * @return array + */ + public function peekAll(); + + /** + * Gets and clears flash from the stack. + * + * @param string $type + * @param array $default Default value if $type does not exist + * + * @return array + */ + public function get($type, array $default = array()); + + /** + * Gets and clears flashes from the stack. + * + * @return array + */ + public function all(); + + /** + * Sets all flash messages. + * + * @param array $messages + */ + public function setAll(array $messages); + + /** + * Has flash messages for a given type? + * + * @param string $type + * + * @return bool + */ + public function has($type); + + /** + * Returns a list of all defined types. + * + * @return array + */ + public function keys(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php new file mode 100644 index 0000000000000000000000000000000000000000..cdd97375b905418465251231a0d0fd0eb9a8f18a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php @@ -0,0 +1,249 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session; + +use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; +use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; + +/** + * Session. + * + * @author Fabien Potencier + * @author Drak + */ +class Session implements SessionInterface, \IteratorAggregate, \Countable +{ + /** + * Storage driver. + * + * @var SessionStorageInterface + */ + protected $storage; + + /** + * @var string + */ + private $flashName; + + /** + * @var string + */ + private $attributeName; + + /** + * Constructor. + * + * @param SessionStorageInterface $storage A SessionStorageInterface instance + * @param AttributeBagInterface $attributes An AttributeBagInterface instance, (defaults null for default AttributeBag) + * @param FlashBagInterface $flashes A FlashBagInterface instance (defaults null for default FlashBag) + */ + public function __construct(SessionStorageInterface $storage = null, AttributeBagInterface $attributes = null, FlashBagInterface $flashes = null) + { + $this->storage = $storage ?: new NativeSessionStorage(); + + $attributes = $attributes ?: new AttributeBag(); + $this->attributeName = $attributes->getName(); + $this->registerBag($attributes); + + $flashes = $flashes ?: new FlashBag(); + $this->flashName = $flashes->getName(); + $this->registerBag($flashes); + } + + /** + * {@inheritdoc} + */ + public function start() + { + return $this->storage->start(); + } + + /** + * {@inheritdoc} + */ + public function has($name) + { + return $this->storage->getBag($this->attributeName)->has($name); + } + + /** + * {@inheritdoc} + */ + public function get($name, $default = null) + { + return $this->storage->getBag($this->attributeName)->get($name, $default); + } + + /** + * {@inheritdoc} + */ + public function set($name, $value) + { + $this->storage->getBag($this->attributeName)->set($name, $value); + } + + /** + * {@inheritdoc} + */ + public function all() + { + return $this->storage->getBag($this->attributeName)->all(); + } + + /** + * {@inheritdoc} + */ + public function replace(array $attributes) + { + $this->storage->getBag($this->attributeName)->replace($attributes); + } + + /** + * {@inheritdoc} + */ + public function remove($name) + { + return $this->storage->getBag($this->attributeName)->remove($name); + } + + /** + * {@inheritdoc} + */ + public function clear() + { + $this->storage->getBag($this->attributeName)->clear(); + } + + /** + * {@inheritdoc} + */ + public function isStarted() + { + return $this->storage->isStarted(); + } + + /** + * Returns an iterator for attributes. + * + * @return \ArrayIterator An \ArrayIterator instance + */ + public function getIterator() + { + return new \ArrayIterator($this->storage->getBag($this->attributeName)->all()); + } + + /** + * Returns the number of attributes. + * + * @return int The number of attributes + */ + public function count() + { + return count($this->storage->getBag($this->attributeName)->all()); + } + + /** + * {@inheritdoc} + */ + public function invalidate($lifetime = null) + { + $this->storage->clear(); + + return $this->migrate(true, $lifetime); + } + + /** + * {@inheritdoc} + */ + public function migrate($destroy = false, $lifetime = null) + { + return $this->storage->regenerate($destroy, $lifetime); + } + + /** + * {@inheritdoc} + */ + public function save() + { + $this->storage->save(); + } + + /** + * {@inheritdoc} + */ + public function getId() + { + return $this->storage->getId(); + } + + /** + * {@inheritdoc} + */ + public function setId($id) + { + $this->storage->setId($id); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->storage->getName(); + } + + /** + * {@inheritdoc} + */ + public function setName($name) + { + $this->storage->setName($name); + } + + /** + * {@inheritdoc} + */ + public function getMetadataBag() + { + return $this->storage->getMetadataBag(); + } + + /** + * {@inheritdoc} + */ + public function registerBag(SessionBagInterface $bag) + { + $this->storage->registerBag($bag); + } + + /** + * {@inheritdoc} + */ + public function getBag($name) + { + return $this->storage->getBag($name); + } + + /** + * Gets the flashbag interface. + * + * @return FlashBagInterface + */ + public function getFlashBag() + { + return $this->getBag($this->flashName); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..aca18aacbf89fb177ac1d902c56cf26af5957c01 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session; + +/** + * Session Bag store. + * + * @author Drak + */ +interface SessionBagInterface +{ + /** + * Gets this bag's name. + * + * @return string + */ + public function getName(); + + /** + * Initializes the Bag. + * + * @param array $array + */ + public function initialize(array &$array); + + /** + * Gets the storage key for this bag. + * + * @return string + */ + public function getStorageKey(); + + /** + * Clears out data from bag. + * + * @return mixed Whatever data was contained + */ + public function clear(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d3fcd2eec4e730456f7712aad6fbeb65968c2a00 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php @@ -0,0 +1,182 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session; + +use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; + +/** + * Interface for the session. + * + * @author Drak + */ +interface SessionInterface +{ + /** + * Starts the session storage. + * + * @return bool True if session started + * + * @throws \RuntimeException If session fails to start. + */ + public function start(); + + /** + * Returns the session ID. + * + * @return string The session ID + */ + public function getId(); + + /** + * Sets the session ID. + * + * @param string $id + */ + public function setId($id); + + /** + * Returns the session name. + * + * @return mixed The session name + */ + public function getName(); + + /** + * Sets the session name. + * + * @param string $name + */ + public function setName($name); + + /** + * Invalidates the current session. + * + * Clears all session attributes and flashes and regenerates the + * session and deletes the old session from persistence. + * + * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value + * will leave the system settings unchanged, 0 sets the cookie + * to expire with browser session. Time is in seconds, and is + * not a Unix timestamp. + * + * @return bool True if session invalidated, false if error + */ + public function invalidate($lifetime = null); + + /** + * Migrates the current session to a new session id while maintaining all + * session attributes. + * + * @param bool $destroy Whether to delete the old session or leave it to garbage collection + * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value + * will leave the system settings unchanged, 0 sets the cookie + * to expire with browser session. Time is in seconds, and is + * not a Unix timestamp. + * + * @return bool True if session migrated, false if error + */ + public function migrate($destroy = false, $lifetime = null); + + /** + * Force the session to be saved and closed. + * + * This method is generally not required for real sessions as + * the session will be automatically saved at the end of + * code execution. + */ + public function save(); + + /** + * Checks if an attribute is defined. + * + * @param string $name The attribute name + * + * @return bool true if the attribute is defined, false otherwise + */ + public function has($name); + + /** + * Returns an attribute. + * + * @param string $name The attribute name + * @param mixed $default The default value if not found + * + * @return mixed + */ + public function get($name, $default = null); + + /** + * Sets an attribute. + * + * @param string $name + * @param mixed $value + */ + public function set($name, $value); + + /** + * Returns attributes. + * + * @return array Attributes + */ + public function all(); + + /** + * Sets attributes. + * + * @param array $attributes Attributes + */ + public function replace(array $attributes); + + /** + * Removes an attribute. + * + * @param string $name + * + * @return mixed The removed value or null when it does not exist + */ + public function remove($name); + + /** + * Clears all attributes. + */ + public function clear(); + + /** + * Checks if the session was started. + * + * @return bool + */ + public function isStarted(); + + /** + * Registers a SessionBagInterface with the session. + * + * @param SessionBagInterface $bag + */ + public function registerBag(SessionBagInterface $bag); + + /** + * Gets a bag instance by name. + * + * @param string $name + * + * @return SessionBagInterface + */ + public function getBag($name); + + /** + * Gets session meta. + * + * @return MetadataBag + */ + public function getMetadataBag(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..962a3878d9767a92e206ff40d1ffc4a7e6cb02bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php @@ -0,0 +1,119 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; + +/** + * MemcacheSessionHandler. + * + * @author Drak + */ +class MemcacheSessionHandler implements \SessionHandlerInterface +{ + /** + * @var \Memcache Memcache driver + */ + private $memcache; + + /** + * @var int Time to live in seconds + */ + private $ttl; + + /** + * @var string Key prefix for shared environments + */ + private $prefix; + + /** + * Constructor. + * + * List of available options: + * * prefix: The prefix to use for the memcache keys in order to avoid collision + * * expiretime: The time to live in seconds + * + * @param \Memcache $memcache A \Memcache instance + * @param array $options An associative array of Memcache options + * + * @throws \InvalidArgumentException When unsupported options are passed + */ + public function __construct(\Memcache $memcache, array $options = array()) + { + if ($diff = array_diff(array_keys($options), array('prefix', 'expiretime'))) { + throw new \InvalidArgumentException(sprintf( + 'The following options are not supported "%s"', implode(', ', $diff) + )); + } + + $this->memcache = $memcache; + $this->ttl = isset($options['expiretime']) ? (int) $options['expiretime'] : 86400; + $this->prefix = isset($options['prefix']) ? $options['prefix'] : 'sf2s'; + } + + /** + * {@inheritdoc} + */ + public function open($savePath, $sessionName) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function close() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function read($sessionId) + { + return $this->memcache->get($this->prefix.$sessionId) ?: ''; + } + + /** + * {@inheritdoc} + */ + public function write($sessionId, $data) + { + return $this->memcache->set($this->prefix.$sessionId, $data, 0, time() + $this->ttl); + } + + /** + * {@inheritdoc} + */ + public function destroy($sessionId) + { + return $this->memcache->delete($this->prefix.$sessionId); + } + + /** + * {@inheritdoc} + */ + public function gc($maxlifetime) + { + // not required here because memcache will auto expire the records anyhow. + return true; + } + + /** + * Return a Memcache instance. + * + * @return \Memcache + */ + protected function getMemcache() + { + return $this->memcache; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..76b08e2db944c7477e98be5df1c6f2049a0e5982 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -0,0 +1,125 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; + +/** + * MemcachedSessionHandler. + * + * Memcached based session storage handler based on the Memcached class + * provided by the PHP memcached extension. + * + * @see http://php.net/memcached + * + * @author Drak + */ +class MemcachedSessionHandler implements \SessionHandlerInterface +{ + /** + * @var \Memcached Memcached driver + */ + private $memcached; + + /** + * @var int Time to live in seconds + */ + private $ttl; + + /** + * @var string Key prefix for shared environments + */ + private $prefix; + + /** + * Constructor. + * + * List of available options: + * * prefix: The prefix to use for the memcached keys in order to avoid collision + * * expiretime: The time to live in seconds + * + * @param \Memcached $memcached A \Memcached instance + * @param array $options An associative array of Memcached options + * + * @throws \InvalidArgumentException When unsupported options are passed + */ + public function __construct(\Memcached $memcached, array $options = array()) + { + $this->memcached = $memcached; + + if ($diff = array_diff(array_keys($options), array('prefix', 'expiretime'))) { + throw new \InvalidArgumentException(sprintf( + 'The following options are not supported "%s"', implode(', ', $diff) + )); + } + + $this->ttl = isset($options['expiretime']) ? (int) $options['expiretime'] : 86400; + $this->prefix = isset($options['prefix']) ? $options['prefix'] : 'sf2s'; + } + + /** + * {@inheritdoc} + */ + public function open($savePath, $sessionName) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function close() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function read($sessionId) + { + return $this->memcached->get($this->prefix.$sessionId) ?: ''; + } + + /** + * {@inheritdoc} + */ + public function write($sessionId, $data) + { + return $this->memcached->set($this->prefix.$sessionId, $data, time() + $this->ttl); + } + + /** + * {@inheritdoc} + */ + public function destroy($sessionId) + { + return $this->memcached->delete($this->prefix.$sessionId); + } + + /** + * {@inheritdoc} + */ + public function gc($maxlifetime) + { + // not required here because memcached will auto expire the records anyhow. + return true; + } + + /** + * Return a Memcached instance. + * + * @return \Memcached + */ + protected function getMemcached() + { + return $this->memcached; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..8408f000cdbf8627e23844b2906c5781746c5e44 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -0,0 +1,232 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; + +/** + * MongoDB session handler. + * + * @author Markus Bachmann + */ +class MongoDbSessionHandler implements \SessionHandlerInterface +{ + /** + * @var \Mongo|\MongoClient|\MongoDB\Client + */ + private $mongo; + + /** + * @var \MongoCollection + */ + private $collection; + + /** + * @var array + */ + private $options; + + /** + * Constructor. + * + * List of available options: + * * database: The name of the database [required] + * * collection: The name of the collection [required] + * * id_field: The field name for storing the session id [default: _id] + * * data_field: The field name for storing the session data [default: data] + * * time_field: The field name for storing the timestamp [default: time] + * * expiry_field: The field name for storing the expiry-timestamp [default: expires_at] + * + * It is strongly recommended to put an index on the `expiry_field` for + * garbage-collection. Alternatively it's possible to automatically expire + * the sessions in the database as described below: + * + * A TTL collections can be used on MongoDB 2.2+ to cleanup expired sessions + * automatically. Such an index can for example look like this: + * + * db..ensureIndex( + * { "": 1 }, + * { "expireAfterSeconds": 0 } + * ) + * + * More details on: http://docs.mongodb.org/manual/tutorial/expire-data/ + * + * If you use such an index, you can drop `gc_probability` to 0 since + * no garbage-collection is required. + * + * @param \Mongo|\MongoClient|\MongoDB\Client $mongo A MongoDB\Client, MongoClient or Mongo instance + * @param array $options An associative array of field options + * + * @throws \InvalidArgumentException When MongoClient or Mongo instance not provided + * @throws \InvalidArgumentException When "database" or "collection" not provided + */ + public function __construct($mongo, array $options) + { + if (!($mongo instanceof \MongoDB\Client || $mongo instanceof \MongoClient || $mongo instanceof \Mongo)) { + throw new \InvalidArgumentException('MongoClient or Mongo instance required'); + } + + if (!isset($options['database']) || !isset($options['collection'])) { + throw new \InvalidArgumentException('You must provide the "database" and "collection" option for MongoDBSessionHandler'); + } + + $this->mongo = $mongo; + + $this->options = array_merge(array( + 'id_field' => '_id', + 'data_field' => 'data', + 'time_field' => 'time', + 'expiry_field' => 'expires_at', + ), $options); + } + + /** + * {@inheritdoc} + */ + public function open($savePath, $sessionName) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function close() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function destroy($sessionId) + { + $methodName = $this->mongo instanceof \MongoDB\Client ? 'deleteOne' : 'remove'; + + $this->getCollection()->$methodName(array( + $this->options['id_field'] => $sessionId, + )); + + return true; + } + + /** + * {@inheritdoc} + */ + public function gc($maxlifetime) + { + $methodName = $this->mongo instanceof \MongoDB\Client ? 'deleteOne' : 'remove'; + + $this->getCollection()->$methodName(array( + $this->options['expiry_field'] => array('$lt' => $this->createDateTime()), + )); + + return true; + } + + /** + * {@inheritdoc} + */ + public function write($sessionId, $data) + { + $expiry = $this->createDateTime(time() + (int) ini_get('session.gc_maxlifetime')); + + $fields = array( + $this->options['time_field'] => $this->createDateTime(), + $this->options['expiry_field'] => $expiry, + ); + + $options = array('upsert' => true); + + if ($this->mongo instanceof \MongoDB\Client) { + $fields[$this->options['data_field']] = new \MongoDB\BSON\Binary($data, \MongoDB\BSON\Binary::TYPE_OLD_BINARY); + } else { + $fields[$this->options['data_field']] = new \MongoBinData($data, \MongoBinData::BYTE_ARRAY); + $options['multiple'] = false; + } + + $methodName = $this->mongo instanceof \MongoDB\Client ? 'updateOne' : 'update'; + + $this->getCollection()->$methodName( + array($this->options['id_field'] => $sessionId), + array('$set' => $fields), + $options + ); + + return true; + } + + /** + * {@inheritdoc} + */ + public function read($sessionId) + { + $dbData = $this->getCollection()->findOne(array( + $this->options['id_field'] => $sessionId, + $this->options['expiry_field'] => array('$gte' => $this->createDateTime()), + )); + + if (null === $dbData) { + return ''; + } + + if ($dbData[$this->options['data_field']] instanceof \MongoDB\BSON\Binary) { + return $dbData[$this->options['data_field']]->getData(); + } + + return $dbData[$this->options['data_field']]->bin; + } + + /** + * Return a "MongoCollection" instance. + * + * @return \MongoCollection + */ + private function getCollection() + { + if (null === $this->collection) { + $this->collection = $this->mongo->selectCollection($this->options['database'], $this->options['collection']); + } + + return $this->collection; + } + + /** + * Return a Mongo instance. + * + * @return \Mongo|\MongoClient|\MongoDB\Client + */ + protected function getMongo() + { + return $this->mongo; + } + + /** + * Create a date object using the class appropriate for the current mongo connection. + * + * Return an instance of a MongoDate or \MongoDB\BSON\UTCDateTime + * + * @param int $seconds An integer representing UTC seconds since Jan 1 1970. Defaults to now. + * + * @return \MongoDate|\MongoDB\BSON\UTCDateTime + */ + private function createDateTime($seconds = null) + { + if (null === $seconds) { + $seconds = time(); + } + + if ($this->mongo instanceof \MongoDB\Client) { + return new \MongoDB\BSON\UTCDateTime($seconds * 1000); + } + + return new \MongoDate($seconds); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..1be0a398373336163086e0cf0306a4b4f24de14d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.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\Component\HttpFoundation\Session\Storage\Handler; + +/** + * NativeFileSessionHandler. + * + * Native session handler using PHP's built in file storage. + * + * @author Drak + */ +class NativeFileSessionHandler extends NativeSessionHandler +{ + /** + * Constructor. + * + * @param string $savePath Path of directory to save session files + * Default null will leave setting as defined by PHP. + * '/path', 'N;/path', or 'N;octal-mode;/path + * + * @see http://php.net/session.configuration.php#ini.session.save-path for further details. + * + * @throws \InvalidArgumentException On invalid $savePath + */ + public function __construct($savePath = null) + { + if (null === $savePath) { + $savePath = ini_get('session.save_path'); + } + + $baseDir = $savePath; + + if ($count = substr_count($savePath, ';')) { + if ($count > 2) { + throw new \InvalidArgumentException(sprintf('Invalid argument $savePath \'%s\'', $savePath)); + } + + // characters after last ';' are the path + $baseDir = ltrim(strrchr($savePath, ';'), ';'); + } + + if ($baseDir && !is_dir($baseDir) && !@mkdir($baseDir, 0777, true) && !is_dir($baseDir)) { + throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s"', $baseDir)); + } + + ini_set('session.save_path', $savePath); + ini_set('session.save_handler', 'files'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..4ae410f9b9e1fcac6ed6629964b369a220e05e77 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; + +/** + * Adds SessionHandler functionality if available. + * + * @see http://php.net/sessionhandler + */ +class NativeSessionHandler extends \SessionHandler +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..1516d4314a430d03d3b8101f5433bf9213a24ede --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; + +/** + * NullSessionHandler. + * + * Can be used in unit testing or in a situations where persisted sessions are not desired. + * + * @author Drak + */ +class NullSessionHandler implements \SessionHandlerInterface +{ + /** + * {@inheritdoc} + */ + public function open($savePath, $sessionName) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function close() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function read($sessionId) + { + return ''; + } + + /** + * {@inheritdoc} + */ + public function write($sessionId, $data) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function destroy($sessionId) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function gc($maxlifetime) + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..8909a5f401fdc1123ccf244628df4807ddb137bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -0,0 +1,721 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; + +/** + * Session handler using a PDO connection to read and write data. + * + * It works with MySQL, PostgreSQL, Oracle, SQL Server and SQLite and implements + * different locking strategies to handle concurrent access to the same session. + * Locking is necessary to prevent loss of data due to race conditions and to keep + * the session data consistent between read() and write(). With locking, requests + * for the same session will wait until the other one finished writing. For this + * reason it's best practice to close a session as early as possible to improve + * concurrency. PHPs internal files session handler also implements locking. + * + * Attention: Since SQLite does not support row level locks but locks the whole database, + * it means only one session can be accessed at a time. Even different sessions would wait + * for another to finish. So saving session in SQLite should only be considered for + * development or prototypes. + * + * Session data is a binary string that can contain non-printable characters like the null byte. + * For this reason it must be saved in a binary column in the database like BLOB in MySQL. + * Saving it in a character column could corrupt the data. You can use createTable() + * to initialize a correctly defined table. + * + * @see http://php.net/sessionhandlerinterface + * + * @author Fabien Potencier + * @author Michael Williams + * @author Tobias Schultze + */ +class PdoSessionHandler implements \SessionHandlerInterface +{ + /** + * No locking is done. This means sessions are prone to loss of data due to + * race conditions of concurrent requests to the same session. The last session + * write will win in this case. It might be useful when you implement your own + * logic to deal with this like an optimistic approach. + */ + const LOCK_NONE = 0; + + /** + * Creates an application-level lock on a session. The disadvantage is that the + * lock is not enforced by the database and thus other, unaware parts of the + * application could still concurrently modify the session. The advantage is it + * does not require a transaction. + * This mode is not available for SQLite and not yet implemented for oci and sqlsrv. + */ + const LOCK_ADVISORY = 1; + + /** + * Issues a real row lock. Since it uses a transaction between opening and + * closing a session, you have to be careful when you use same database connection + * that you also use for your application logic. This mode is the default because + * it's the only reliable solution across DBMSs. + */ + const LOCK_TRANSACTIONAL = 2; + + /** + * @var \PDO|null PDO instance or null when not connected yet + */ + private $pdo; + + /** + * @var string|null|false DSN string or null for session.save_path or false when lazy connection disabled + */ + private $dsn = false; + + /** + * @var string Database driver + */ + private $driver; + + /** + * @var string Table name + */ + private $table = 'sessions'; + + /** + * @var string Column for session id + */ + private $idCol = 'sess_id'; + + /** + * @var string Column for session data + */ + private $dataCol = 'sess_data'; + + /** + * @var string Column for lifetime + */ + private $lifetimeCol = 'sess_lifetime'; + + /** + * @var string Column for timestamp + */ + private $timeCol = 'sess_time'; + + /** + * @var string Username when lazy-connect + */ + private $username = ''; + + /** + * @var string Password when lazy-connect + */ + private $password = ''; + + /** + * @var array Connection options when lazy-connect + */ + private $connectionOptions = array(); + + /** + * @var int The strategy for locking, see constants + */ + private $lockMode = self::LOCK_TRANSACTIONAL; + + /** + * It's an array to support multiple reads before closing which is manual, non-standard usage. + * + * @var \PDOStatement[] An array of statements to release advisory locks + */ + private $unlockStatements = array(); + + /** + * @var bool True when the current session exists but expired according to session.gc_maxlifetime + */ + private $sessionExpired = false; + + /** + * @var bool Whether a transaction is active + */ + private $inTransaction = false; + + /** + * @var bool Whether gc() has been called + */ + private $gcCalled = false; + + /** + * Constructor. + * + * You can either pass an existing database connection as PDO instance or + * pass a DSN string that will be used to lazy-connect to the database + * when the session is actually used. Furthermore it's possible to pass null + * which will then use the session.save_path ini setting as PDO DSN parameter. + * + * List of available options: + * * db_table: The name of the table [default: sessions] + * * db_id_col: The column where to store the session id [default: sess_id] + * * db_data_col: The column where to store the session data [default: sess_data] + * * db_lifetime_col: The column where to store the lifetime [default: sess_lifetime] + * * db_time_col: The column where to store the timestamp [default: sess_time] + * * db_username: The username when lazy-connect [default: ''] + * * db_password: The password when lazy-connect [default: ''] + * * db_connection_options: An array of driver-specific connection options [default: array()] + * * lock_mode: The strategy for locking, see constants [default: LOCK_TRANSACTIONAL] + * + * @param \PDO|string|null $pdoOrDsn A \PDO instance or DSN string or null + * @param array $options An associative array of options + * + * @throws \InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION + */ + public function __construct($pdoOrDsn = null, array $options = array()) + { + if ($pdoOrDsn instanceof \PDO) { + if (\PDO::ERRMODE_EXCEPTION !== $pdoOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) { + throw new \InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION))', __CLASS__)); + } + + $this->pdo = $pdoOrDsn; + $this->driver = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); + } else { + $this->dsn = $pdoOrDsn; + } + + $this->table = isset($options['db_table']) ? $options['db_table'] : $this->table; + $this->idCol = isset($options['db_id_col']) ? $options['db_id_col'] : $this->idCol; + $this->dataCol = isset($options['db_data_col']) ? $options['db_data_col'] : $this->dataCol; + $this->lifetimeCol = isset($options['db_lifetime_col']) ? $options['db_lifetime_col'] : $this->lifetimeCol; + $this->timeCol = isset($options['db_time_col']) ? $options['db_time_col'] : $this->timeCol; + $this->username = isset($options['db_username']) ? $options['db_username'] : $this->username; + $this->password = isset($options['db_password']) ? $options['db_password'] : $this->password; + $this->connectionOptions = isset($options['db_connection_options']) ? $options['db_connection_options'] : $this->connectionOptions; + $this->lockMode = isset($options['lock_mode']) ? $options['lock_mode'] : $this->lockMode; + } + + /** + * Creates the table to store sessions which can be called once for setup. + * + * Session ID is saved in a column of maximum length 128 because that is enough even + * for a 512 bit configured session.hash_function like Whirlpool. Session data is + * saved in a BLOB. One could also use a shorter inlined varbinary column + * if one was sure the data fits into it. + * + * @throws \PDOException When the table already exists + * @throws \DomainException When an unsupported PDO driver is used + */ + public function createTable() + { + // connect if we are not yet + $this->getConnection(); + + switch ($this->driver) { + case 'mysql': + // We use varbinary for the ID column because it prevents unwanted conversions: + // - character set conversions between server and client + // - trailing space removal + // - case-insensitivity + // - language processing like é == e + $sql = "CREATE TABLE $this->table ($this->idCol VARBINARY(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol MEDIUMINT NOT NULL, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8_bin, ENGINE = InnoDB"; + break; + case 'sqlite': + $sql = "CREATE TABLE $this->table ($this->idCol TEXT NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; + break; + case 'pgsql': + $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(128) NOT NULL PRIMARY KEY, $this->dataCol BYTEA NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; + break; + case 'oci': + $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR2(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; + break; + case 'sqlsrv': + $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(128) NOT NULL PRIMARY KEY, $this->dataCol VARBINARY(MAX) NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; + break; + default: + throw new \DomainException(sprintf('Creating the session table is currently not implemented for PDO driver "%s".', $this->driver)); + } + + try { + $this->pdo->exec($sql); + } catch (\PDOException $e) { + $this->rollback(); + + throw $e; + } + } + + /** + * Returns true when the current session exists but expired according to session.gc_maxlifetime. + * + * Can be used to distinguish between a new session and one that expired due to inactivity. + * + * @return bool Whether current session expired + */ + public function isSessionExpired() + { + return $this->sessionExpired; + } + + /** + * {@inheritdoc} + */ + public function open($savePath, $sessionName) + { + if (null === $this->pdo) { + $this->connect($this->dsn ?: $savePath); + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function read($sessionId) + { + try { + return $this->doRead($sessionId); + } catch (\PDOException $e) { + $this->rollback(); + + throw $e; + } + } + + /** + * {@inheritdoc} + */ + public function gc($maxlifetime) + { + // We delay gc() to close() so that it is executed outside the transactional and blocking read-write process. + // This way, pruning expired sessions does not block them from being started while the current session is used. + $this->gcCalled = true; + + return true; + } + + /** + * {@inheritdoc} + */ + public function destroy($sessionId) + { + // delete the record associated with this id + $sql = "DELETE FROM $this->table WHERE $this->idCol = :id"; + + try { + $stmt = $this->pdo->prepare($sql); + $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + $stmt->execute(); + } catch (\PDOException $e) { + $this->rollback(); + + throw $e; + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function write($sessionId, $data) + { + $maxlifetime = (int) ini_get('session.gc_maxlifetime'); + + try { + // We use a single MERGE SQL query when supported by the database. + $mergeStmt = $this->getMergeStatement($sessionId, $data, $maxlifetime); + if (null !== $mergeStmt) { + $mergeStmt->execute(); + + return true; + } + + $updateStmt = $this->pdo->prepare( + "UPDATE $this->table SET $this->dataCol = :data, $this->lifetimeCol = :lifetime, $this->timeCol = :time WHERE $this->idCol = :id" + ); + $updateStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + $updateStmt->bindParam(':data', $data, \PDO::PARAM_LOB); + $updateStmt->bindParam(':lifetime', $maxlifetime, \PDO::PARAM_INT); + $updateStmt->bindValue(':time', time(), \PDO::PARAM_INT); + $updateStmt->execute(); + + // When MERGE is not supported, like in Postgres < 9.5, we have to use this approach that can result in + // duplicate key errors when the same session is written simultaneously (given the LOCK_NONE behavior). + // We can just catch such an error and re-execute the update. This is similar to a serializable + // transaction with retry logic on serialization failures but without the overhead and without possible + // false positives due to longer gap locking. + if (!$updateStmt->rowCount()) { + try { + $insertStmt = $this->pdo->prepare( + "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)" + ); + $insertStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + $insertStmt->bindParam(':data', $data, \PDO::PARAM_LOB); + $insertStmt->bindParam(':lifetime', $maxlifetime, \PDO::PARAM_INT); + $insertStmt->bindValue(':time', time(), \PDO::PARAM_INT); + $insertStmt->execute(); + } catch (\PDOException $e) { + // Handle integrity violation SQLSTATE 23000 (or a subclass like 23505 in Postgres) for duplicate keys + if (0 === strpos($e->getCode(), '23')) { + $updateStmt->execute(); + } else { + throw $e; + } + } + } + } catch (\PDOException $e) { + $this->rollback(); + + throw $e; + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function close() + { + $this->commit(); + + while ($unlockStmt = array_shift($this->unlockStatements)) { + $unlockStmt->execute(); + } + + if ($this->gcCalled) { + $this->gcCalled = false; + + // delete the session records that have expired + $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol < :time"; + + $stmt = $this->pdo->prepare($sql); + $stmt->bindValue(':time', time(), \PDO::PARAM_INT); + $stmt->execute(); + } + + if (false !== $this->dsn) { + $this->pdo = null; // only close lazy-connection + } + + return true; + } + + /** + * Lazy-connects to the database. + * + * @param string $dsn DSN string + */ + private function connect($dsn) + { + $this->pdo = new \PDO($dsn, $this->username, $this->password, $this->connectionOptions); + $this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); + $this->driver = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); + } + + /** + * Helper method to begin a transaction. + * + * Since SQLite does not support row level locks, we have to acquire a reserved lock + * on the database immediately. Because of https://bugs.php.net/42766 we have to create + * such a transaction manually which also means we cannot use PDO::commit or + * PDO::rollback or PDO::inTransaction for SQLite. + * + * Also MySQLs default isolation, REPEATABLE READ, causes deadlock for different sessions + * due to http://www.mysqlperformanceblog.com/2013/12/12/one-more-innodb-gap-lock-to-avoid/ . + * So we change it to READ COMMITTED. + */ + private function beginTransaction() + { + if (!$this->inTransaction) { + if ('sqlite' === $this->driver) { + $this->pdo->exec('BEGIN IMMEDIATE TRANSACTION'); + } else { + if ('mysql' === $this->driver) { + $this->pdo->exec('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); + } + $this->pdo->beginTransaction(); + } + $this->inTransaction = true; + } + } + + /** + * Helper method to commit a transaction. + */ + private function commit() + { + if ($this->inTransaction) { + try { + // commit read-write transaction which also releases the lock + if ('sqlite' === $this->driver) { + $this->pdo->exec('COMMIT'); + } else { + $this->pdo->commit(); + } + $this->inTransaction = false; + } catch (\PDOException $e) { + $this->rollback(); + + throw $e; + } + } + } + + /** + * Helper method to rollback a transaction. + */ + private function rollback() + { + // We only need to rollback if we are in a transaction. Otherwise the resulting + // error would hide the real problem why rollback was called. We might not be + // in a transaction when not using the transactional locking behavior or when + // two callbacks (e.g. destroy and write) are invoked that both fail. + if ($this->inTransaction) { + if ('sqlite' === $this->driver) { + $this->pdo->exec('ROLLBACK'); + } else { + $this->pdo->rollBack(); + } + $this->inTransaction = false; + } + } + + /** + * Reads the session data in respect to the different locking strategies. + * + * We need to make sure we do not return session data that is already considered garbage according + * to the session.gc_maxlifetime setting because gc() is called after read() and only sometimes. + * + * @param string $sessionId Session ID + * + * @return string The session data + */ + private function doRead($sessionId) + { + $this->sessionExpired = false; + + if (self::LOCK_ADVISORY === $this->lockMode) { + $this->unlockStatements[] = $this->doAdvisoryLock($sessionId); + } + + $selectSql = $this->getSelectSql(); + $selectStmt = $this->pdo->prepare($selectSql); + $selectStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + + do { + $selectStmt->execute(); + $sessionRows = $selectStmt->fetchAll(\PDO::FETCH_NUM); + + if ($sessionRows) { + if ($sessionRows[0][1] + $sessionRows[0][2] < time()) { + $this->sessionExpired = true; + + return ''; + } + + return is_resource($sessionRows[0][0]) ? stream_get_contents($sessionRows[0][0]) : $sessionRows[0][0]; + } + + if (self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) { + // Exclusive-reading of non-existent rows does not block, so we need to do an insert to block + // until other connections to the session are committed. + try { + $insertStmt = $this->pdo->prepare( + "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)" + ); + $insertStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + $insertStmt->bindValue(':data', '', \PDO::PARAM_LOB); + $insertStmt->bindValue(':lifetime', 0, \PDO::PARAM_INT); + $insertStmt->bindValue(':time', time(), \PDO::PARAM_INT); + $insertStmt->execute(); + } catch (\PDOException $e) { + // Catch duplicate key error because other connection created the session already. + // It would only not be the case when the other connection destroyed the session. + if (0 === strpos($e->getCode(), '23')) { + // Retrieve finished session data written by concurrent connection by restarting the loop. + // We have to start a new transaction as a failed query will mark the current transaction as + // aborted in PostgreSQL and disallow further queries within it. + $this->rollback(); + $this->beginTransaction(); + continue; + } + + throw $e; + } + } + + return ''; + } while (true); + } + + /** + * Executes an application-level lock on the database. + * + * @param string $sessionId Session ID + * + * @return \PDOStatement The statement that needs to be executed later to release the lock + * + * @throws \DomainException When an unsupported PDO driver is used + * + * @todo implement missing advisory locks + * - for oci using DBMS_LOCK.REQUEST + * - for sqlsrv using sp_getapplock with LockOwner = Session + */ + private function doAdvisoryLock($sessionId) + { + switch ($this->driver) { + case 'mysql': + // should we handle the return value? 0 on timeout, null on error + // we use a timeout of 50 seconds which is also the default for innodb_lock_wait_timeout + $stmt = $this->pdo->prepare('SELECT GET_LOCK(:key, 50)'); + $stmt->bindValue(':key', $sessionId, \PDO::PARAM_STR); + $stmt->execute(); + + $releaseStmt = $this->pdo->prepare('DO RELEASE_LOCK(:key)'); + $releaseStmt->bindValue(':key', $sessionId, \PDO::PARAM_STR); + + return $releaseStmt; + case 'pgsql': + // Obtaining an exclusive session level advisory lock requires an integer key. + // So we convert the HEX representation of the session id to an integer. + // Since integers are signed, we have to skip one hex char to fit in the range. + if (4 === PHP_INT_SIZE) { + $sessionInt1 = hexdec(substr($sessionId, 0, 7)); + $sessionInt2 = hexdec(substr($sessionId, 7, 7)); + + $stmt = $this->pdo->prepare('SELECT pg_advisory_lock(:key1, :key2)'); + $stmt->bindValue(':key1', $sessionInt1, \PDO::PARAM_INT); + $stmt->bindValue(':key2', $sessionInt2, \PDO::PARAM_INT); + $stmt->execute(); + + $releaseStmt = $this->pdo->prepare('SELECT pg_advisory_unlock(:key1, :key2)'); + $releaseStmt->bindValue(':key1', $sessionInt1, \PDO::PARAM_INT); + $releaseStmt->bindValue(':key2', $sessionInt2, \PDO::PARAM_INT); + } else { + $sessionBigInt = hexdec(substr($sessionId, 0, 15)); + + $stmt = $this->pdo->prepare('SELECT pg_advisory_lock(:key)'); + $stmt->bindValue(':key', $sessionBigInt, \PDO::PARAM_INT); + $stmt->execute(); + + $releaseStmt = $this->pdo->prepare('SELECT pg_advisory_unlock(:key)'); + $releaseStmt->bindValue(':key', $sessionBigInt, \PDO::PARAM_INT); + } + + return $releaseStmt; + case 'sqlite': + throw new \DomainException('SQLite does not support advisory locks.'); + default: + throw new \DomainException(sprintf('Advisory locks are currently not implemented for PDO driver "%s".', $this->driver)); + } + } + + /** + * Return a locking or nonlocking SQL query to read session information. + * + * @return string The SQL string + * + * @throws \DomainException When an unsupported PDO driver is used + */ + private function getSelectSql() + { + if (self::LOCK_TRANSACTIONAL === $this->lockMode) { + $this->beginTransaction(); + + switch ($this->driver) { + case 'mysql': + case 'oci': + case 'pgsql': + return "SELECT $this->dataCol, $this->lifetimeCol, $this->timeCol FROM $this->table WHERE $this->idCol = :id FOR UPDATE"; + case 'sqlsrv': + return "SELECT $this->dataCol, $this->lifetimeCol, $this->timeCol FROM $this->table WITH (UPDLOCK, ROWLOCK) WHERE $this->idCol = :id"; + case 'sqlite': + // we already locked when starting transaction + break; + default: + throw new \DomainException(sprintf('Transactional locks are currently not implemented for PDO driver "%s".', $this->driver)); + } + } + + return "SELECT $this->dataCol, $this->lifetimeCol, $this->timeCol FROM $this->table WHERE $this->idCol = :id"; + } + + /** + * Returns a merge/upsert (i.e. insert or update) statement when supported by the database for writing session data. + * + * @param string $sessionId Session ID + * @param string $data Encoded session data + * @param int $maxlifetime session.gc_maxlifetime + * + * @return \PDOStatement|null The merge statement or null when not supported + */ + private function getMergeStatement($sessionId, $data, $maxlifetime) + { + $mergeSql = null; + switch (true) { + case 'mysql' === $this->driver: + $mergeSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time) ". + "ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)"; + break; + case 'oci' === $this->driver: + // DUAL is Oracle specific dummy table + $mergeSql = "MERGE INTO $this->table USING DUAL ON ($this->idCol = ?) ". + "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". + "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?"; + break; + case 'sqlsrv' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '10', '>='): + // MERGE is only available since SQL Server 2008 and must be terminated by semicolon + // It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx + $mergeSql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ". + "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". + "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;"; + break; + case 'sqlite' === $this->driver: + $mergeSql = "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)"; + break; + case 'pgsql' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '9.5', '>='): + $mergeSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time) ". + "ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; + break; + } + + if (null !== $mergeSql) { + $mergeStmt = $this->pdo->prepare($mergeSql); + + if ('sqlsrv' === $this->driver || 'oci' === $this->driver) { + $mergeStmt->bindParam(1, $sessionId, \PDO::PARAM_STR); + $mergeStmt->bindParam(2, $sessionId, \PDO::PARAM_STR); + $mergeStmt->bindParam(3, $data, \PDO::PARAM_LOB); + $mergeStmt->bindParam(4, $maxlifetime, \PDO::PARAM_INT); + $mergeStmt->bindValue(5, time(), \PDO::PARAM_INT); + $mergeStmt->bindParam(6, $data, \PDO::PARAM_LOB); + $mergeStmt->bindParam(7, $maxlifetime, \PDO::PARAM_INT); + $mergeStmt->bindValue(8, time(), \PDO::PARAM_INT); + } else { + $mergeStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + $mergeStmt->bindParam(':data', $data, \PDO::PARAM_LOB); + $mergeStmt->bindParam(':lifetime', $maxlifetime, \PDO::PARAM_INT); + $mergeStmt->bindValue(':time', time(), \PDO::PARAM_INT); + } + + return $mergeStmt; + } + } + + /** + * Return a PDO instance. + * + * @return \PDO + */ + protected function getConnection() + { + if (null === $this->pdo) { + $this->connect($this->dsn ?: ini_get('session.save_path')); + } + + return $this->pdo; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/WriteCheckSessionHandler.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/WriteCheckSessionHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..d49c36cae58761a736f6763d1d6712c2e244537e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/WriteCheckSessionHandler.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; + +/** + * Wraps another SessionHandlerInterface to only write the session when it has been modified. + * + * @author Adrien Brault + */ +class WriteCheckSessionHandler implements \SessionHandlerInterface +{ + /** + * @var \SessionHandlerInterface + */ + private $wrappedSessionHandler; + + /** + * @var array sessionId => session + */ + private $readSessions; + + public function __construct(\SessionHandlerInterface $wrappedSessionHandler) + { + $this->wrappedSessionHandler = $wrappedSessionHandler; + } + + /** + * {@inheritdoc} + */ + public function close() + { + return $this->wrappedSessionHandler->close(); + } + + /** + * {@inheritdoc} + */ + public function destroy($sessionId) + { + return $this->wrappedSessionHandler->destroy($sessionId); + } + + /** + * {@inheritdoc} + */ + public function gc($maxlifetime) + { + return $this->wrappedSessionHandler->gc($maxlifetime); + } + + /** + * {@inheritdoc} + */ + public function open($savePath, $sessionName) + { + return $this->wrappedSessionHandler->open($savePath, $sessionName); + } + + /** + * {@inheritdoc} + */ + public function read($sessionId) + { + $session = $this->wrappedSessionHandler->read($sessionId); + + $this->readSessions[$sessionId] = $session; + + return $session; + } + + /** + * {@inheritdoc} + */ + public function write($sessionId, $data) + { + if (isset($this->readSessions[$sessionId]) && $data === $this->readSessions[$sessionId]) { + return true; + } + + return $this->wrappedSessionHandler->write($sessionId, $data); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php new file mode 100644 index 0000000000000000000000000000000000000000..322dd560f80879c67aef47904ebae81ae6c2e222 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php @@ -0,0 +1,170 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage; + +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; + +/** + * Metadata container. + * + * Adds metadata to the session. + * + * @author Drak + */ +class MetadataBag implements SessionBagInterface +{ + const CREATED = 'c'; + const UPDATED = 'u'; + const LIFETIME = 'l'; + + /** + * @var string + */ + private $name = '__metadata'; + + /** + * @var string + */ + private $storageKey; + + /** + * @var array + */ + protected $meta = array(self::CREATED => 0, self::UPDATED => 0, self::LIFETIME => 0); + + /** + * Unix timestamp. + * + * @var int + */ + private $lastUsed; + + /** + * @var int + */ + private $updateThreshold; + + /** + * Constructor. + * + * @param string $storageKey The key used to store bag in the session + * @param int $updateThreshold The time to wait between two UPDATED updates + */ + public function __construct($storageKey = '_sf2_meta', $updateThreshold = 0) + { + $this->storageKey = $storageKey; + $this->updateThreshold = $updateThreshold; + } + + /** + * {@inheritdoc} + */ + public function initialize(array &$array) + { + $this->meta = &$array; + + if (isset($array[self::CREATED])) { + $this->lastUsed = $this->meta[self::UPDATED]; + + $timeStamp = time(); + if ($timeStamp - $array[self::UPDATED] >= $this->updateThreshold) { + $this->meta[self::UPDATED] = $timeStamp; + } + } else { + $this->stampCreated(); + } + } + + /** + * Gets the lifetime that the session cookie was set with. + * + * @return int + */ + public function getLifetime() + { + return $this->meta[self::LIFETIME]; + } + + /** + * Stamps a new session's metadata. + * + * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value + * will leave the system settings unchanged, 0 sets the cookie + * to expire with browser session. Time is in seconds, and is + * not a Unix timestamp. + */ + public function stampNew($lifetime = null) + { + $this->stampCreated($lifetime); + } + + /** + * {@inheritdoc} + */ + public function getStorageKey() + { + return $this->storageKey; + } + + /** + * Gets the created timestamp metadata. + * + * @return int Unix timestamp + */ + public function getCreated() + { + return $this->meta[self::CREATED]; + } + + /** + * Gets the last used metadata. + * + * @return int Unix timestamp + */ + public function getLastUsed() + { + return $this->lastUsed; + } + + /** + * {@inheritdoc} + */ + public function clear() + { + // nothing to do + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + } + + private function stampCreated($lifetime = null) + { + $timeStamp = time(); + $this->meta[self::CREATED] = $this->meta[self::UPDATED] = $this->lastUsed = $timeStamp; + $this->meta[self::LIFETIME] = (null === $lifetime) ? ini_get('session.cookie_lifetime') : $lifetime; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php new file mode 100644 index 0000000000000000000000000000000000000000..c26cc1334d6aae9e5b61a2ca14cbe9036d6590d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php @@ -0,0 +1,268 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage; + +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; + +/** + * MockArraySessionStorage mocks the session for unit tests. + * + * No PHP session is actually started since a session can be initialized + * and shutdown only once per PHP execution cycle. + * + * When doing functional testing, you should use MockFileSessionStorage instead. + * + * @author Fabien Potencier + * @author Bulat Shakirzyanov + * @author Drak + */ +class MockArraySessionStorage implements SessionStorageInterface +{ + /** + * @var string + */ + protected $id = ''; + + /** + * @var string + */ + protected $name; + + /** + * @var bool + */ + protected $started = false; + + /** + * @var bool + */ + protected $closed = false; + + /** + * @var array + */ + protected $data = array(); + + /** + * @var MetadataBag + */ + protected $metadataBag; + + /** + * @var array + */ + protected $bags; + + /** + * Constructor. + * + * @param string $name Session name + * @param MetadataBag $metaBag MetadataBag instance + */ + public function __construct($name = 'MOCKSESSID', MetadataBag $metaBag = null) + { + $this->name = $name; + $this->setMetadataBag($metaBag); + } + + /** + * Sets the session data. + * + * @param array $array + */ + public function setSessionData(array $array) + { + $this->data = $array; + } + + /** + * {@inheritdoc} + */ + public function start() + { + if ($this->started) { + return true; + } + + if (empty($this->id)) { + $this->id = $this->generateId(); + } + + $this->loadSession(); + + return true; + } + + /** + * {@inheritdoc} + */ + public function regenerate($destroy = false, $lifetime = null) + { + if (!$this->started) { + $this->start(); + } + + $this->metadataBag->stampNew($lifetime); + $this->id = $this->generateId(); + + return true; + } + + /** + * {@inheritdoc} + */ + public function getId() + { + return $this->id; + } + + /** + * {@inheritdoc} + */ + public function setId($id) + { + if ($this->started) { + throw new \LogicException('Cannot set session ID after the session has started.'); + } + + $this->id = $id; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->name; + } + + /** + * {@inheritdoc} + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * {@inheritdoc} + */ + public function save() + { + if (!$this->started || $this->closed) { + throw new \RuntimeException('Trying to save a session that was not started yet or was already closed'); + } + // nothing to do since we don't persist the session data + $this->closed = false; + $this->started = false; + } + + /** + * {@inheritdoc} + */ + public function clear() + { + // clear out the bags + foreach ($this->bags as $bag) { + $bag->clear(); + } + + // clear out the session + $this->data = array(); + + // reconnect the bags to the session + $this->loadSession(); + } + + /** + * {@inheritdoc} + */ + public function registerBag(SessionBagInterface $bag) + { + $this->bags[$bag->getName()] = $bag; + } + + /** + * {@inheritdoc} + */ + public function getBag($name) + { + if (!isset($this->bags[$name])) { + throw new \InvalidArgumentException(sprintf('The SessionBagInterface %s is not registered.', $name)); + } + + if (!$this->started) { + $this->start(); + } + + return $this->bags[$name]; + } + + /** + * {@inheritdoc} + */ + public function isStarted() + { + return $this->started; + } + + /** + * Sets the MetadataBag. + * + * @param MetadataBag $bag + */ + public function setMetadataBag(MetadataBag $bag = null) + { + if (null === $bag) { + $bag = new MetadataBag(); + } + + $this->metadataBag = $bag; + } + + /** + * Gets the MetadataBag. + * + * @return MetadataBag + */ + public function getMetadataBag() + { + return $this->metadataBag; + } + + /** + * Generates a session ID. + * + * This doesn't need to be particularly cryptographically secure since this is just + * a mock. + * + * @return string + */ + protected function generateId() + { + return hash('sha256', uniqid('ss_mock_', true)); + } + + protected function loadSession() + { + $bags = array_merge($this->bags, array($this->metadataBag)); + + foreach ($bags as $bag) { + $key = $bag->getStorageKey(); + $this->data[$key] = isset($this->data[$key]) ? $this->data[$key] : array(); + $bag->initialize($this->data[$key]); + } + + $this->started = true; + $this->closed = false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php new file mode 100644 index 0000000000000000000000000000000000000000..71f9e555121fa38a4ff97eb332573ffd195336d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php @@ -0,0 +1,138 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage; + +/** + * MockFileSessionStorage is used to mock sessions for + * functional testing when done in a single PHP process. + * + * No PHP session is actually started since a session can be initialized + * and shutdown only once per PHP execution cycle and this class does + * not pollute any session related globals, including session_*() functions + * or session.* PHP ini directives. + * + * @author Drak + */ +class MockFileSessionStorage extends MockArraySessionStorage +{ + /** + * @var string + */ + private $savePath; + + /** + * Constructor. + * + * @param string $savePath Path of directory to save session files + * @param string $name Session name + * @param MetadataBag $metaBag MetadataBag instance + */ + public function __construct($savePath = null, $name = 'MOCKSESSID', MetadataBag $metaBag = null) + { + if (null === $savePath) { + $savePath = sys_get_temp_dir(); + } + + if (!is_dir($savePath) && !@mkdir($savePath, 0777, true) && !is_dir($savePath)) { + throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s"', $savePath)); + } + + $this->savePath = $savePath; + + parent::__construct($name, $metaBag); + } + + /** + * {@inheritdoc} + */ + public function start() + { + if ($this->started) { + return true; + } + + if (!$this->id) { + $this->id = $this->generateId(); + } + + $this->read(); + + $this->started = true; + + return true; + } + + /** + * {@inheritdoc} + */ + public function regenerate($destroy = false, $lifetime = null) + { + if (!$this->started) { + $this->start(); + } + + if ($destroy) { + $this->destroy(); + } + + return parent::regenerate($destroy, $lifetime); + } + + /** + * {@inheritdoc} + */ + public function save() + { + if (!$this->started) { + throw new \RuntimeException('Trying to save a session that was not started yet or was already closed'); + } + + file_put_contents($this->getFilePath(), serialize($this->data)); + + // this is needed for Silex, where the session object is re-used across requests + // in functional tests. In Symfony, the container is rebooted, so we don't have + // this issue + $this->started = false; + } + + /** + * Deletes a session from persistent storage. + * Deliberately leaves session data in memory intact. + */ + private function destroy() + { + if (is_file($this->getFilePath())) { + unlink($this->getFilePath()); + } + } + + /** + * Calculate path to file. + * + * @return string File path + */ + private function getFilePath() + { + return $this->savePath.'/'.$this->id.'.mocksess'; + } + + /** + * Reads session from storage and loads session. + */ + private function read() + { + $filePath = $this->getFilePath(); + $this->data = is_readable($filePath) && is_file($filePath) ? unserialize(file_get_contents($filePath)) : array(); + + $this->loadSession(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php new file mode 100644 index 0000000000000000000000000000000000000000..0b0961741f42368205f7791e1476e0c14f037d3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -0,0 +1,398 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage; + +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler; +use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; +use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy; + +/** + * This provides a base class for session attribute storage. + * + * @author Drak + */ +class NativeSessionStorage implements SessionStorageInterface +{ + /** + * Array of SessionBagInterface. + * + * @var SessionBagInterface[] + */ + protected $bags; + + /** + * @var bool + */ + protected $started = false; + + /** + * @var bool + */ + protected $closed = false; + + /** + * @var AbstractProxy + */ + protected $saveHandler; + + /** + * @var MetadataBag + */ + protected $metadataBag; + + /** + * Constructor. + * + * Depending on how you want the storage driver to behave you probably + * want to override this constructor entirely. + * + * List of options for $options array with their defaults. + * + * @see http://php.net/session.configuration for options + * but we omit 'session.' from the beginning of the keys for convenience. + * + * ("auto_start", is not supported as it tells PHP to start a session before + * PHP starts to execute user-land code. Setting during runtime has no effect). + * + * cache_limiter, "" (use "0" to prevent headers from being sent entirely). + * cookie_domain, "" + * cookie_httponly, "" + * cookie_lifetime, "0" + * cookie_path, "/" + * cookie_secure, "" + * entropy_file, "" + * entropy_length, "0" + * gc_divisor, "100" + * gc_maxlifetime, "1440" + * gc_probability, "1" + * hash_bits_per_character, "4" + * hash_function, "0" + * name, "PHPSESSID" + * referer_check, "" + * serialize_handler, "php" + * use_cookies, "1" + * use_only_cookies, "1" + * use_trans_sid, "0" + * upload_progress.enabled, "1" + * upload_progress.cleanup, "1" + * upload_progress.prefix, "upload_progress_" + * upload_progress.name, "PHP_SESSION_UPLOAD_PROGRESS" + * upload_progress.freq, "1%" + * upload_progress.min-freq, "1" + * url_rewriter.tags, "a=href,area=href,frame=src,form=,fieldset=" + * + * @param array $options Session configuration options + * @param AbstractProxy|NativeSessionHandler|\SessionHandlerInterface|null $handler + * @param MetadataBag $metaBag MetadataBag + */ + public function __construct(array $options = array(), $handler = null, MetadataBag $metaBag = null) + { + session_cache_limiter(''); // disable by default because it's managed by HeaderBag (if used) + ini_set('session.use_cookies', 1); + + session_register_shutdown(); + + $this->setMetadataBag($metaBag); + $this->setOptions($options); + $this->setSaveHandler($handler); + } + + /** + * Gets the save handler instance. + * + * @return AbstractProxy + */ + public function getSaveHandler() + { + return $this->saveHandler; + } + + /** + * {@inheritdoc} + */ + public function start() + { + if ($this->started) { + return true; + } + + if (\PHP_SESSION_ACTIVE === session_status()) { + throw new \RuntimeException('Failed to start the session: already started by PHP.'); + } + + if (ini_get('session.use_cookies') && headers_sent($file, $line)) { + throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line)); + } + + // ok to try and start the session + if (!session_start()) { + throw new \RuntimeException('Failed to start the session'); + } + + $this->loadSession(); + + return true; + } + + /** + * {@inheritdoc} + */ + public function getId() + { + return $this->saveHandler->getId(); + } + + /** + * {@inheritdoc} + */ + public function setId($id) + { + $this->saveHandler->setId($id); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->saveHandler->getName(); + } + + /** + * {@inheritdoc} + */ + public function setName($name) + { + $this->saveHandler->setName($name); + } + + /** + * {@inheritdoc} + */ + public function regenerate($destroy = false, $lifetime = null) + { + // Cannot regenerate the session ID for non-active sessions. + if (\PHP_SESSION_ACTIVE !== session_status()) { + return false; + } + + if (null !== $lifetime) { + ini_set('session.cookie_lifetime', $lifetime); + } + + if ($destroy) { + $this->metadataBag->stampNew(); + } + + $isRegenerated = session_regenerate_id($destroy); + + // The reference to $_SESSION in session bags is lost in PHP7 and we need to re-create it. + // @see https://bugs.php.net/bug.php?id=70013 + $this->loadSession(); + + return $isRegenerated; + } + + /** + * {@inheritdoc} + */ + public function save() + { + session_write_close(); + + $this->closed = true; + $this->started = false; + } + + /** + * {@inheritdoc} + */ + public function clear() + { + // clear out the bags + foreach ($this->bags as $bag) { + $bag->clear(); + } + + // clear out the session + $_SESSION = array(); + + // reconnect the bags to the session + $this->loadSession(); + } + + /** + * {@inheritdoc} + */ + public function registerBag(SessionBagInterface $bag) + { + if ($this->started) { + throw new \LogicException('Cannot register a bag when the session is already started.'); + } + + $this->bags[$bag->getName()] = $bag; + } + + /** + * {@inheritdoc} + */ + public function getBag($name) + { + if (!isset($this->bags[$name])) { + throw new \InvalidArgumentException(sprintf('The SessionBagInterface %s is not registered.', $name)); + } + + if ($this->saveHandler->isActive() && !$this->started) { + $this->loadSession(); + } elseif (!$this->started) { + $this->start(); + } + + return $this->bags[$name]; + } + + /** + * Sets the MetadataBag. + * + * @param MetadataBag $metaBag + */ + public function setMetadataBag(MetadataBag $metaBag = null) + { + if (null === $metaBag) { + $metaBag = new MetadataBag(); + } + + $this->metadataBag = $metaBag; + } + + /** + * Gets the MetadataBag. + * + * @return MetadataBag + */ + public function getMetadataBag() + { + return $this->metadataBag; + } + + /** + * {@inheritdoc} + */ + public function isStarted() + { + return $this->started; + } + + /** + * Sets session.* ini variables. + * + * For convenience we omit 'session.' from the beginning of the keys. + * Explicitly ignores other ini keys. + * + * @param array $options Session ini directives array(key => value) + * + * @see http://php.net/session.configuration + */ + public function setOptions(array $options) + { + $validOptions = array_flip(array( + 'cache_limiter', 'cookie_domain', 'cookie_httponly', + 'cookie_lifetime', 'cookie_path', 'cookie_secure', + 'entropy_file', 'entropy_length', 'gc_divisor', + 'gc_maxlifetime', 'gc_probability', 'hash_bits_per_character', + 'hash_function', 'name', 'referer_check', + 'serialize_handler', 'use_cookies', + 'use_only_cookies', 'use_trans_sid', 'upload_progress.enabled', + 'upload_progress.cleanup', 'upload_progress.prefix', 'upload_progress.name', + 'upload_progress.freq', 'upload_progress.min-freq', 'url_rewriter.tags', + )); + + foreach ($options as $key => $value) { + if (isset($validOptions[$key])) { + ini_set('session.'.$key, $value); + } + } + } + + /** + * Registers session save handler as a PHP session handler. + * + * To use internal PHP session save handlers, override this method using ini_set with + * session.save_handler and session.save_path e.g. + * + * ini_set('session.save_handler', 'files'); + * ini_set('session.save_path', '/tmp'); + * + * or pass in a NativeSessionHandler instance which configures session.save_handler in the + * constructor, for a template see NativeFileSessionHandler or use handlers in + * composer package drak/native-session + * + * @see http://php.net/session-set-save-handler + * @see http://php.net/sessionhandlerinterface + * @see http://php.net/sessionhandler + * @see http://github.com/drak/NativeSession + * + * @param AbstractProxy|NativeSessionHandler|\SessionHandlerInterface|null $saveHandler + * + * @throws \InvalidArgumentException + */ + public function setSaveHandler($saveHandler = null) + { + if (!$saveHandler instanceof AbstractProxy && + !$saveHandler instanceof NativeSessionHandler && + !$saveHandler instanceof \SessionHandlerInterface && + null !== $saveHandler) { + throw new \InvalidArgumentException('Must be instance of AbstractProxy or NativeSessionHandler; implement \SessionHandlerInterface; or be null.'); + } + + // Wrap $saveHandler in proxy and prevent double wrapping of proxy + if (!$saveHandler instanceof AbstractProxy && $saveHandler instanceof \SessionHandlerInterface) { + $saveHandler = new SessionHandlerProxy($saveHandler); + } elseif (!$saveHandler instanceof AbstractProxy) { + $saveHandler = new SessionHandlerProxy(new \SessionHandler()); + } + $this->saveHandler = $saveHandler; + + if ($this->saveHandler instanceof \SessionHandlerInterface) { + session_set_save_handler($this->saveHandler, false); + } + } + + /** + * Load the session with attributes. + * + * After starting the session, PHP retrieves the session from whatever handlers + * are set to (either PHP's internal, or a custom save handler set with session_set_save_handler()). + * PHP takes the return value from the read() handler, unserializes it + * and populates $_SESSION with the result automatically. + * + * @param array|null $session + */ + protected function loadSession(array &$session = null) + { + if (null === $session) { + $session = &$_SESSION; + } + + $bags = array_merge($this->bags, array($this->metadataBag)); + + foreach ($bags as $bag) { + $key = $bag->getStorageKey(); + $session[$key] = isset($session[$key]) ? $session[$key] : array(); + $bag->initialize($session[$key]); + } + + $this->started = true; + $this->closed = false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php new file mode 100644 index 0000000000000000000000000000000000000000..6f02a7fd73d23cd407dc62120c26cdd40db8801d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage; + +use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler; + +/** + * Allows session to be started by PHP and managed by Symfony. + * + * @author Drak + */ +class PhpBridgeSessionStorage extends NativeSessionStorage +{ + /** + * Constructor. + * + * @param AbstractProxy|NativeSessionHandler|\SessionHandlerInterface|null $handler + * @param MetadataBag $metaBag MetadataBag + */ + public function __construct($handler = null, MetadataBag $metaBag = null) + { + $this->setMetadataBag($metaBag); + $this->setSaveHandler($handler); + } + + /** + * {@inheritdoc} + */ + public function start() + { + if ($this->started) { + return true; + } + + $this->loadSession(); + + return true; + } + + /** + * {@inheritdoc} + */ + public function clear() + { + // clear out the bags and nothing else that may be set + // since the purpose of this driver is to share a handler + foreach ($this->bags as $bag) { + $bag->clear(); + } + + // reconnect the bags to the session + $this->loadSession(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php new file mode 100644 index 0000000000000000000000000000000000000000..a7478656d672d4fb6b14467d56026d955a11b7f2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; + +/** + * AbstractProxy. + * + * @author Drak + */ +abstract class AbstractProxy +{ + /** + * Flag if handler wraps an internal PHP session handler (using \SessionHandler). + * + * @var bool + */ + protected $wrapper = false; + + /** + * @var string + */ + protected $saveHandlerName; + + /** + * Gets the session.save_handler name. + * + * @return string + */ + public function getSaveHandlerName() + { + return $this->saveHandlerName; + } + + /** + * Is this proxy handler and instance of \SessionHandlerInterface. + * + * @return bool + */ + public function isSessionHandlerInterface() + { + return $this instanceof \SessionHandlerInterface; + } + + /** + * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler. + * + * @return bool + */ + public function isWrapper() + { + return $this->wrapper; + } + + /** + * Has a session started? + * + * @return bool + */ + public function isActive() + { + return \PHP_SESSION_ACTIVE === session_status(); + } + + /** + * Gets the session ID. + * + * @return string + */ + public function getId() + { + return session_id(); + } + + /** + * Sets the session ID. + * + * @param string $id + * + * @throws \LogicException + */ + public function setId($id) + { + if ($this->isActive()) { + throw new \LogicException('Cannot change the ID of an active session'); + } + + session_id($id); + } + + /** + * Gets the session name. + * + * @return string + */ + public function getName() + { + return session_name(); + } + + /** + * Sets the session name. + * + * @param string $name + * + * @throws \LogicException + */ + public function setName($name) + { + if ($this->isActive()) { + throw new \LogicException('Cannot change the name of an active session'); + } + + session_name($name); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/NativeProxy.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/NativeProxy.php new file mode 100644 index 0000000000000000000000000000000000000000..0db34aa28d38546afc979b9e7a32be121c1fc912 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/NativeProxy.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; + +/** + * NativeProxy. + * + * This proxy is built-in session handlers in PHP 5.3.x + * + * @author Drak + */ +class NativeProxy extends AbstractProxy +{ + /** + * Constructor. + */ + public function __construct() + { + // this makes an educated guess as to what the handler is since it should already be set. + $this->saveHandlerName = ini_get('session.save_handler'); + } + + /** + * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler. + * + * @return bool False + */ + public function isWrapper() + { + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php new file mode 100644 index 0000000000000000000000000000000000000000..c5e97d415bbe22475b100a8e351c6436d89a8427 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; + +/** + * SessionHandler proxy. + * + * @author Drak + */ +class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterface +{ + /** + * @var \SessionHandlerInterface + */ + protected $handler; + + /** + * Constructor. + * + * @param \SessionHandlerInterface $handler + */ + public function __construct(\SessionHandlerInterface $handler) + { + $this->handler = $handler; + $this->wrapper = ($handler instanceof \SessionHandler); + $this->saveHandlerName = $this->wrapper ? ini_get('session.save_handler') : 'user'; + } + + // \SessionHandlerInterface + + /** + * {@inheritdoc} + */ + public function open($savePath, $sessionName) + { + return (bool) $this->handler->open($savePath, $sessionName); + } + + /** + * {@inheritdoc} + */ + public function close() + { + return (bool) $this->handler->close(); + } + + /** + * {@inheritdoc} + */ + public function read($sessionId) + { + return (string) $this->handler->read($sessionId); + } + + /** + * {@inheritdoc} + */ + public function write($sessionId, $data) + { + return (bool) $this->handler->write($sessionId, $data); + } + + /** + * {@inheritdoc} + */ + public function destroy($sessionId) + { + return (bool) $this->handler->destroy($sessionId); + } + + /** + * {@inheritdoc} + */ + public function gc($maxlifetime) + { + return (bool) $this->handler->gc($maxlifetime); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..34f6c4633f4771e9d0f0032f97da039dd5305e13 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage; + +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; + +/** + * StorageInterface. + * + * @author Fabien Potencier + * @author Drak + */ +interface SessionStorageInterface +{ + /** + * Starts the session. + * + * @return bool True if started + * + * @throws \RuntimeException If something goes wrong starting the session. + */ + public function start(); + + /** + * Checks if the session is started. + * + * @return bool True if started, false otherwise + */ + public function isStarted(); + + /** + * Returns the session ID. + * + * @return string The session ID or empty + */ + public function getId(); + + /** + * Sets the session ID. + * + * @param string $id + */ + public function setId($id); + + /** + * Returns the session name. + * + * @return mixed The session name + */ + public function getName(); + + /** + * Sets the session name. + * + * @param string $name + */ + public function setName($name); + + /** + * Regenerates id that represents this storage. + * + * This method must invoke session_regenerate_id($destroy) unless + * this interface is used for a storage object designed for unit + * or functional testing where a real PHP session would interfere + * with testing. + * + * Note regenerate+destroy should not clear the session data in memory + * only delete the session data from persistent storage. + * + * Care: When regenerating the session ID no locking is involved in PHP's + * session design. See https://bugs.php.net/bug.php?id=61470 for a discussion. + * So you must make sure the regenerated session is saved BEFORE sending the + * headers with the new ID. Symfony's HttpKernel offers a listener for this. + * See Symfony\Component\HttpKernel\EventListener\SaveSessionListener. + * Otherwise session data could get lost again for concurrent requests with the + * new ID. One result could be that you get logged out after just logging in. + * + * @param bool $destroy Destroy session when regenerating? + * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value + * will leave the system settings unchanged, 0 sets the cookie + * to expire with browser session. Time is in seconds, and is + * not a Unix timestamp. + * + * @return bool True if session regenerated, false if error + * + * @throws \RuntimeException If an error occurs while regenerating this storage + */ + public function regenerate($destroy = false, $lifetime = null); + + /** + * Force the session to be saved and closed. + * + * This method must invoke session_write_close() unless this interface is + * used for a storage object design for unit or functional testing where + * a real PHP session would interfere with testing, in which case + * it should actually persist the session data if required. + * + * @throws \RuntimeException If the session is saved without being started, or if the session + * is already closed. + */ + public function save(); + + /** + * Clear all session data in memory. + */ + public function clear(); + + /** + * Gets a SessionBagInterface by name. + * + * @param string $name + * + * @return SessionBagInterface + * + * @throws \InvalidArgumentException If the bag does not exist + */ + public function getBag($name); + + /** + * Registers a SessionBagInterface for use. + * + * @param SessionBagInterface $bag + */ + public function registerBag(SessionBagInterface $bag); + + /** + * @return MetadataBag + */ + public function getMetadataBag(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/StreamedResponse.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/StreamedResponse.php new file mode 100644 index 0000000000000000000000000000000000000000..928531309ad0a5bcf7beaa6da9dc4639b320d327 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/StreamedResponse.php @@ -0,0 +1,132 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * StreamedResponse represents a streamed HTTP response. + * + * A StreamedResponse uses a callback for its content. + * + * The callback should use the standard PHP functions like echo + * to stream the response back to the client. The flush() method + * can also be used if needed. + * + * @see flush() + * + * @author Fabien Potencier + */ +class StreamedResponse extends Response +{ + protected $callback; + protected $streamed; + private $headersSent; + + /** + * Constructor. + * + * @param callable|null $callback A valid PHP callback or null to set it later + * @param int $status The response status code + * @param array $headers An array of response headers + */ + public function __construct(callable $callback = null, $status = 200, $headers = array()) + { + parent::__construct(null, $status, $headers); + + if (null !== $callback) { + $this->setCallback($callback); + } + $this->streamed = false; + $this->headersSent = false; + } + + /** + * Factory method for chainability. + * + * @param callable|null $callback A valid PHP callback or null to set it later + * @param int $status The response status code + * @param array $headers An array of response headers + * + * @return static + */ + public static function create($callback = null, $status = 200, $headers = array()) + { + return new static($callback, $status, $headers); + } + + /** + * Sets the PHP callback associated with this Response. + * + * @param callable $callback A valid PHP callback + */ + public function setCallback(callable $callback) + { + $this->callback = $callback; + } + + /** + * {@inheritdoc} + * + * This method only sends the headers once. + */ + public function sendHeaders() + { + if ($this->headersSent) { + return; + } + + $this->headersSent = true; + + parent::sendHeaders(); + } + + /** + * {@inheritdoc} + * + * This method only sends the content once. + */ + public function sendContent() + { + if ($this->streamed) { + return; + } + + $this->streamed = true; + + if (null === $this->callback) { + throw new \LogicException('The Response callback must not be null.'); + } + + call_user_func($this->callback); + } + + /** + * {@inheritdoc} + * + * @throws \LogicException when the content is not null + */ + public function setContent($content) + { + if (null !== $content) { + throw new \LogicException('The content cannot be set on a StreamedResponse instance.'); + } + } + + /** + * {@inheritdoc} + * + * @return false + */ + public function getContent() + { + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cb43bb35168a795b90967623d6d8164bdfe491ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\AcceptHeaderItem; + +class AcceptHeaderItemTest extends TestCase +{ + /** + * @dataProvider provideFromStringData + */ + public function testFromString($string, $value, array $attributes) + { + $item = AcceptHeaderItem::fromString($string); + $this->assertEquals($value, $item->getValue()); + $this->assertEquals($attributes, $item->getAttributes()); + } + + public function provideFromStringData() + { + return array( + array( + 'text/html', + 'text/html', array(), + ), + array( + '"this;should,not=matter"', + 'this;should,not=matter', array(), + ), + array( + "text/plain; charset=utf-8;param=\"this;should,not=matter\";\tfootnotes=true", + 'text/plain', array('charset' => 'utf-8', 'param' => 'this;should,not=matter', 'footnotes' => 'true'), + ), + array( + '"this;should,not=matter";charset=utf-8', + 'this;should,not=matter', array('charset' => 'utf-8'), + ), + ); + } + + /** + * @dataProvider provideToStringData + */ + public function testToString($value, array $attributes, $string) + { + $item = new AcceptHeaderItem($value, $attributes); + $this->assertEquals($string, (string) $item); + } + + public function provideToStringData() + { + return array( + array( + 'text/html', array(), + 'text/html', + ), + array( + 'text/plain', array('charset' => 'utf-8', 'param' => 'this;should,not=matter', 'footnotes' => 'true'), + 'text/plain;charset=utf-8;param="this;should,not=matter";footnotes=true', + ), + ); + } + + public function testValue() + { + $item = new AcceptHeaderItem('value', array()); + $this->assertEquals('value', $item->getValue()); + + $item->setValue('new value'); + $this->assertEquals('new value', $item->getValue()); + + $item->setValue(1); + $this->assertEquals('1', $item->getValue()); + } + + public function testQuality() + { + $item = new AcceptHeaderItem('value', array()); + $this->assertEquals(1.0, $item->getQuality()); + + $item->setQuality(0.5); + $this->assertEquals(0.5, $item->getQuality()); + + $item->setAttribute('q', 0.75); + $this->assertEquals(0.75, $item->getQuality()); + $this->assertFalse($item->hasAttribute('q')); + } + + public function testAttribute() + { + $item = new AcceptHeaderItem('value', array()); + $this->assertEquals(array(), $item->getAttributes()); + $this->assertFalse($item->hasAttribute('test')); + $this->assertNull($item->getAttribute('test')); + $this->assertEquals('default', $item->getAttribute('test', 'default')); + + $item->setAttribute('test', 'value'); + $this->assertEquals(array('test' => 'value'), $item->getAttributes()); + $this->assertTrue($item->hasAttribute('test')); + $this->assertEquals('value', $item->getAttribute('test')); + $this->assertEquals('value', $item->getAttribute('test', 'default')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9929eac28ef01feabe869324fbcbf1d492597060 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\AcceptHeader; +use Symfony\Component\HttpFoundation\AcceptHeaderItem; + +class AcceptHeaderTest extends TestCase +{ + public function testFirst() + { + $header = AcceptHeader::fromString('text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c'); + $this->assertSame('text/html', $header->first()->getValue()); + } + + /** + * @dataProvider provideFromStringData + */ + public function testFromString($string, array $items) + { + $header = AcceptHeader::fromString($string); + $parsed = array_values($header->all()); + // reset index since the fixtures don't have them set + foreach ($parsed as $item) { + $item->setIndex(0); + } + $this->assertEquals($items, $parsed); + } + + public function provideFromStringData() + { + return array( + array('', array()), + array('gzip', array(new AcceptHeaderItem('gzip'))), + array('gzip,deflate,sdch', array(new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch'))), + array("gzip, deflate\t,sdch", array(new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch'))), + array('"this;should,not=matter"', array(new AcceptHeaderItem('this;should,not=matter'))), + ); + } + + /** + * @dataProvider provideToStringData + */ + public function testToString(array $items, $string) + { + $header = new AcceptHeader($items); + $this->assertEquals($string, (string) $header); + } + + public function provideToStringData() + { + return array( + array(array(), ''), + array(array(new AcceptHeaderItem('gzip')), 'gzip'), + array(array(new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch')), 'gzip,deflate,sdch'), + array(array(new AcceptHeaderItem('this;should,not=matter')), 'this;should,not=matter'), + ); + } + + /** + * @dataProvider provideFilterData + */ + public function testFilter($string, $filter, array $values) + { + $header = AcceptHeader::fromString($string)->filter($filter); + $this->assertEquals($values, array_keys($header->all())); + } + + public function provideFilterData() + { + return array( + array('fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4', '/fr.*/', array('fr-FR', 'fr')), + ); + } + + /** + * @dataProvider provideSortingData + */ + public function testSorting($string, array $values) + { + $header = AcceptHeader::fromString($string); + $this->assertEquals($values, array_keys($header->all())); + } + + public function provideSortingData() + { + return array( + 'quality has priority' => array('*;q=0.3,ISO-8859-1,utf-8;q=0.7', array('ISO-8859-1', 'utf-8', '*')), + 'order matters when q is equal' => array('*;q=0.3,ISO-8859-1;q=0.7,utf-8;q=0.7', array('ISO-8859-1', 'utf-8', '*')), + 'order matters when q is equal2' => array('*;q=0.3,utf-8;q=0.7,ISO-8859-1;q=0.7', array('utf-8', 'ISO-8859-1', '*')), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php new file mode 100644 index 0000000000000000000000000000000000000000..157ab90ec59a2b0d2faf9108b0f5f04ec0580c3a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.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\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\ApacheRequest; + +class ApacheRequestTest extends TestCase +{ + /** + * @dataProvider provideServerVars + */ + public function testUriMethods($server, $expectedRequestUri, $expectedBaseUrl, $expectedPathInfo) + { + $request = new ApacheRequest(); + $request->server->replace($server); + + $this->assertEquals($expectedRequestUri, $request->getRequestUri(), '->getRequestUri() is correct'); + $this->assertEquals($expectedBaseUrl, $request->getBaseUrl(), '->getBaseUrl() is correct'); + $this->assertEquals($expectedPathInfo, $request->getPathInfo(), '->getPathInfo() is correct'); + } + + public function provideServerVars() + { + return array( + array( + array( + 'REQUEST_URI' => '/foo/app_dev.php/bar', + 'SCRIPT_NAME' => '/foo/app_dev.php', + 'PATH_INFO' => '/bar', + ), + '/foo/app_dev.php/bar', + '/foo/app_dev.php', + '/bar', + ), + array( + array( + 'REQUEST_URI' => '/foo/bar', + 'SCRIPT_NAME' => '/foo/app_dev.php', + ), + '/foo/bar', + '/foo', + '/bar', + ), + array( + array( + 'REQUEST_URI' => '/app_dev.php/foo/bar', + 'SCRIPT_NAME' => '/app_dev.php', + 'PATH_INFO' => '/foo/bar', + ), + '/app_dev.php/foo/bar', + '/app_dev.php', + '/foo/bar', + ), + array( + array( + 'REQUEST_URI' => '/foo/bar', + 'SCRIPT_NAME' => '/app_dev.php', + ), + '/foo/bar', + '', + '/foo/bar', + ), + array( + array( + 'REQUEST_URI' => '/app_dev.php', + 'SCRIPT_NAME' => '/app_dev.php', + ), + '/app_dev.php', + '/app_dev.php', + '/', + ), + array( + array( + 'REQUEST_URI' => '/', + 'SCRIPT_NAME' => '/app_dev.php', + ), + '/', + '', + '/', + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e4607201a215191c828cf31676e0eca795c2b61f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php @@ -0,0 +1,330 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use Symfony\Component\HttpFoundation\BinaryFileResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\ResponseHeaderBag; +use Symfony\Component\HttpFoundation\Tests\File\FakeFile; + +class BinaryFileResponseTest extends ResponseTestCase +{ + public function testConstruction() + { + $file = __DIR__.'/../README.md'; + $response = new BinaryFileResponse($file, 404, array('X-Header' => 'Foo'), true, null, true, true); + $this->assertEquals(404, $response->getStatusCode()); + $this->assertEquals('Foo', $response->headers->get('X-Header')); + $this->assertTrue($response->headers->has('ETag')); + $this->assertTrue($response->headers->has('Last-Modified')); + $this->assertFalse($response->headers->has('Content-Disposition')); + + $response = BinaryFileResponse::create($file, 404, array(), true, ResponseHeaderBag::DISPOSITION_INLINE); + $this->assertEquals(404, $response->getStatusCode()); + $this->assertFalse($response->headers->has('ETag')); + $this->assertEquals('inline; filename="README.md"', $response->headers->get('Content-Disposition')); + } + + public function testConstructWithNonAsciiFilename() + { + touch(sys_get_temp_dir().'/fööö.html'); + + $response = new BinaryFileResponse(sys_get_temp_dir().'/fööö.html', 200, array(), true, 'attachment'); + + @unlink(sys_get_temp_dir().'/fööö.html'); + + $this->assertSame('fööö.html', $response->getFile()->getFilename()); + } + + /** + * @expectedException \LogicException + */ + public function testSetContent() + { + $response = new BinaryFileResponse(__FILE__); + $response->setContent('foo'); + } + + public function testGetContent() + { + $response = new BinaryFileResponse(__FILE__); + $this->assertFalse($response->getContent()); + } + + public function testSetContentDispositionGeneratesSafeFallbackFilename() + { + $response = new BinaryFileResponse(__FILE__); + $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, 'föö.html'); + + $this->assertSame('attachment; filename="f__.html"; filename*=utf-8\'\'f%C3%B6%C3%B6.html', $response->headers->get('Content-Disposition')); + } + + /** + * @dataProvider provideRanges + */ + public function testRequests($requestRange, $offset, $length, $responseRange) + { + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream'))->setAutoEtag(); + + // do a request to get the ETag + $request = Request::create('/'); + $response->prepare($request); + $etag = $response->headers->get('ETag'); + + // prepare a request for a range of the testing file + $request = Request::create('/'); + $request->headers->set('If-Range', $etag); + $request->headers->set('Range', $requestRange); + + $file = fopen(__DIR__.'/File/Fixtures/test.gif', 'r'); + fseek($file, $offset); + $data = fread($file, $length); + fclose($file); + + $this->expectOutputString($data); + $response = clone $response; + $response->prepare($request); + $response->sendContent(); + + $this->assertEquals(206, $response->getStatusCode()); + $this->assertEquals($responseRange, $response->headers->get('Content-Range')); + } + + /** + * @dataProvider provideRanges + */ + public function testRequestsWithoutEtag($requestRange, $offset, $length, $responseRange) + { + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream')); + + // do a request to get the LastModified + $request = Request::create('/'); + $response->prepare($request); + $lastModified = $response->headers->get('Last-Modified'); + + // prepare a request for a range of the testing file + $request = Request::create('/'); + $request->headers->set('If-Range', $lastModified); + $request->headers->set('Range', $requestRange); + + $file = fopen(__DIR__.'/File/Fixtures/test.gif', 'r'); + fseek($file, $offset); + $data = fread($file, $length); + fclose($file); + + $this->expectOutputString($data); + $response = clone $response; + $response->prepare($request); + $response->sendContent(); + + $this->assertEquals(206, $response->getStatusCode()); + $this->assertEquals($responseRange, $response->headers->get('Content-Range')); + } + + public function provideRanges() + { + return array( + array('bytes=1-4', 1, 4, 'bytes 1-4/35'), + array('bytes=-5', 30, 5, 'bytes 30-34/35'), + array('bytes=30-', 30, 5, 'bytes 30-34/35'), + array('bytes=30-30', 30, 1, 'bytes 30-30/35'), + array('bytes=30-34', 30, 5, 'bytes 30-34/35'), + ); + } + + public function testRangeRequestsWithoutLastModifiedDate() + { + // prevent auto last modified + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream'), true, null, false, false); + + // prepare a request for a range of the testing file + $request = Request::create('/'); + $request->headers->set('If-Range', date('D, d M Y H:i:s').' GMT'); + $request->headers->set('Range', 'bytes=1-4'); + + $this->expectOutputString(file_get_contents(__DIR__.'/File/Fixtures/test.gif')); + $response = clone $response; + $response->prepare($request); + $response->sendContent(); + + $this->assertEquals(200, $response->getStatusCode()); + $this->assertNull($response->headers->get('Content-Range')); + } + + /** + * @dataProvider provideFullFileRanges + */ + public function testFullFileRequests($requestRange) + { + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream'))->setAutoEtag(); + + // prepare a request for a range of the testing file + $request = Request::create('/'); + $request->headers->set('Range', $requestRange); + + $file = fopen(__DIR__.'/File/Fixtures/test.gif', 'r'); + $data = fread($file, 35); + fclose($file); + + $this->expectOutputString($data); + $response = clone $response; + $response->prepare($request); + $response->sendContent(); + + $this->assertEquals(200, $response->getStatusCode()); + } + + public function provideFullFileRanges() + { + return array( + array('bytes=0-'), + array('bytes=0-34'), + array('bytes=-35'), + // Syntactical invalid range-request should also return the full resource + array('bytes=20-10'), + array('bytes=50-40'), + ); + } + + /** + * @dataProvider provideInvalidRanges + */ + public function testInvalidRequests($requestRange) + { + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream'))->setAutoEtag(); + + // prepare a request for a range of the testing file + $request = Request::create('/'); + $request->headers->set('Range', $requestRange); + + $response = clone $response; + $response->prepare($request); + $response->sendContent(); + + $this->assertEquals(416, $response->getStatusCode()); + $this->assertEquals('bytes */35', $response->headers->get('Content-Range')); + } + + public function provideInvalidRanges() + { + return array( + array('bytes=-40'), + array('bytes=30-40'), + ); + } + + /** + * @dataProvider provideXSendfileFiles + */ + public function testXSendfile($file) + { + $request = Request::create('/'); + $request->headers->set('X-Sendfile-Type', 'X-Sendfile'); + + BinaryFileResponse::trustXSendfileTypeHeader(); + $response = BinaryFileResponse::create($file, 200, array('Content-Type' => 'application/octet-stream')); + $response->prepare($request); + + $this->expectOutputString(''); + $response->sendContent(); + + $this->assertContains('README.md', $response->headers->get('X-Sendfile')); + } + + public function provideXSendfileFiles() + { + return array( + array(__DIR__.'/../README.md'), + array('file://'.__DIR__.'/../README.md'), + ); + } + + /** + * @dataProvider getSampleXAccelMappings + */ + public function testXAccelMapping($realpath, $mapping, $virtual) + { + $request = Request::create('/'); + $request->headers->set('X-Sendfile-Type', 'X-Accel-Redirect'); + $request->headers->set('X-Accel-Mapping', $mapping); + + $file = new FakeFile($realpath, __DIR__.'/File/Fixtures/test'); + + BinaryFileResponse::trustXSendfileTypeHeader(); + $response = new BinaryFileResponse($file, 200, array('Content-Type' => 'application/octet-stream')); + $reflection = new \ReflectionObject($response); + $property = $reflection->getProperty('file'); + $property->setAccessible(true); + $property->setValue($response, $file); + + $response->prepare($request); + $this->assertEquals($virtual, $response->headers->get('X-Accel-Redirect')); + } + + public function testDeleteFileAfterSend() + { + $request = Request::create('/'); + + $path = __DIR__.'/File/Fixtures/to_delete'; + touch($path); + $realPath = realpath($path); + $this->assertFileExists($realPath); + + $response = new BinaryFileResponse($realPath, 200, array('Content-Type' => 'application/octet-stream')); + $response->deleteFileAfterSend(true); + + $response->prepare($request); + $response->sendContent(); + + $this->assertFileNotExists($path); + } + + public function testAcceptRangeOnUnsafeMethods() + { + $request = Request::create('/', 'POST'); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream')); + $response->prepare($request); + + $this->assertEquals('none', $response->headers->get('Accept-Ranges')); + } + + public function testAcceptRangeNotOverriden() + { + $request = Request::create('/', 'POST'); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream')); + $response->headers->set('Accept-Ranges', 'foo'); + $response->prepare($request); + + $this->assertEquals('foo', $response->headers->get('Accept-Ranges')); + } + + public function getSampleXAccelMappings() + { + return array( + array('/var/www/var/www/files/foo.txt', '/var/www/=/files/', '/files/var/www/files/foo.txt'), + array('/home/foo/bar.txt', '/var/www/=/files/,/home/foo/=/baz/', '/baz/bar.txt'), + ); + } + + protected function provideResponse() + { + return new BinaryFileResponse(__DIR__.'/../README.md', 200, array('Content-Type' => 'application/octet-stream')); + } + + public static function tearDownAfterClass() + { + $path = __DIR__.'/../Fixtures/to_delete'; + if (file_exists($path)) { + @unlink($path); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c2d1c9b7527a7465b6a26e4990526885181bd929 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php @@ -0,0 +1,180 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Cookie; + +/** + * CookieTest. + * + * @author John Kary + * @author Hugo Hamon + * + * @group time-sensitive + */ +class CookieTest extends TestCase +{ + public function invalidNames() + { + return array( + array(''), + array(',MyName'), + array(';MyName'), + array(' MyName'), + array("\tMyName"), + array("\rMyName"), + array("\nMyName"), + array("\013MyName"), + array("\014MyName"), + ); + } + + /** + * @dataProvider invalidNames + * @expectedException \InvalidArgumentException + */ + public function testInstantiationThrowsExceptionIfCookieNameContainsInvalidCharacters($name) + { + new Cookie($name); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testInvalidExpiration() + { + new Cookie('MyCookie', 'foo', 'bar'); + } + + public function testNegativeExpirationIsNotPossible() + { + $cookie = new Cookie('foo', 'bar', -100); + + $this->assertSame(0, $cookie->getExpiresTime()); + } + + public function testGetValue() + { + $value = 'MyValue'; + $cookie = new Cookie('MyCookie', $value); + + $this->assertSame($value, $cookie->getValue(), '->getValue() returns the proper value'); + } + + public function testGetPath() + { + $cookie = new Cookie('foo', 'bar'); + + $this->assertSame('/', $cookie->getPath(), '->getPath() returns / as the default path'); + } + + public function testGetExpiresTime() + { + $cookie = new Cookie('foo', 'bar', 3600); + + $this->assertEquals(3600, $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date'); + } + + public function testGetExpiresTimeIsCastToInt() + { + $cookie = new Cookie('foo', 'bar', 3600.9); + + $this->assertSame(3600, $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date as an integer'); + } + + public function testConstructorWithDateTime() + { + $expire = new \DateTime(); + $cookie = new Cookie('foo', 'bar', $expire); + + $this->assertEquals($expire->format('U'), $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date'); + } + + /** + * @requires PHP 5.5 + */ + public function testConstructorWithDateTimeImmutable() + { + $expire = new \DateTimeImmutable(); + $cookie = new Cookie('foo', 'bar', $expire); + + $this->assertEquals($expire->format('U'), $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date'); + } + + public function testGetExpiresTimeWithStringValue() + { + $value = '+1 day'; + $cookie = new Cookie('foo', 'bar', $value); + $expire = strtotime($value); + + $this->assertEquals($expire, $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date', 1); + } + + public function testGetDomain() + { + $cookie = new Cookie('foo', 'bar', 3600, '/', '.myfoodomain.com'); + + $this->assertEquals('.myfoodomain.com', $cookie->getDomain(), '->getDomain() returns the domain name on which the cookie is valid'); + } + + public function testIsSecure() + { + $cookie = new Cookie('foo', 'bar', 3600, '/', '.myfoodomain.com', true); + + $this->assertTrue($cookie->isSecure(), '->isSecure() returns whether the cookie is transmitted over HTTPS'); + } + + public function testIsHttpOnly() + { + $cookie = new Cookie('foo', 'bar', 3600, '/', '.myfoodomain.com', false, true); + + $this->assertTrue($cookie->isHttpOnly(), '->isHttpOnly() returns whether the cookie is only transmitted over HTTP'); + } + + public function testCookieIsNotCleared() + { + $cookie = new Cookie('foo', 'bar', time() + 3600 * 24); + + $this->assertFalse($cookie->isCleared(), '->isCleared() returns false if the cookie did not expire yet'); + } + + public function testCookieIsCleared() + { + $cookie = new Cookie('foo', 'bar', time() - 20); + + $this->assertTrue($cookie->isCleared(), '->isCleared() returns true if the cookie has expired'); + } + + public function testToString() + { + $cookie = new Cookie('foo', 'bar', strtotime('Fri, 20-May-2011 15:25:52 GMT'), '/', '.myfoodomain.com', true); + $this->assertEquals('foo=bar; expires=Fri, 20-May-2011 15:25:52 GMT; path=/; domain=.myfoodomain.com; secure; httponly', (string) $cookie, '->__toString() returns string representation of the cookie'); + + $cookie = new Cookie('foo', null, 1, '/admin/', '.myfoodomain.com'); + $this->assertEquals('foo=deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001).'; path=/admin/; domain=.myfoodomain.com; httponly', (string) $cookie, '->__toString() returns string representation of a cleared cookie if value is NULL'); + + $cookie = new Cookie('foo', 'bar', 0, '/', ''); + $this->assertEquals('foo=bar; path=/; httponly', (string) $cookie); + } + + public function testRawCookie() + { + $cookie = new Cookie('foo', 'b a r', 0, '/', null, false, false); + $this->assertFalse($cookie->isRaw()); + $this->assertEquals('foo=b+a+r; path=/', (string) $cookie); + + $cookie = new Cookie('foo', 'b+a+r', 0, '/', null, false, false, true); + $this->assertTrue($cookie->isRaw()); + $this->assertEquals('foo=b+a+r; path=/', (string) $cookie); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1152e46c0be7e5e9adef75a28f1ba4856e0672c8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\ExpressionLanguage\ExpressionLanguage; +use Symfony\Component\HttpFoundation\ExpressionRequestMatcher; +use Symfony\Component\HttpFoundation\Request; + +class ExpressionRequestMatcherTest extends TestCase +{ + /** + * @expectedException \LogicException + */ + public function testWhenNoExpressionIsSet() + { + $expressionRequestMatcher = new ExpressionRequestMatcher(); + $expressionRequestMatcher->matches(new Request()); + } + + /** + * @dataProvider provideExpressions + */ + public function testMatchesWhenParentMatchesIsTrue($expression, $expected) + { + $request = Request::create('/foo'); + $expressionRequestMatcher = new ExpressionRequestMatcher(); + + $expressionRequestMatcher->setExpression(new ExpressionLanguage(), $expression); + $this->assertSame($expected, $expressionRequestMatcher->matches($request)); + } + + /** + * @dataProvider provideExpressions + */ + public function testMatchesWhenParentMatchesIsFalse($expression) + { + $request = Request::create('/foo'); + $request->attributes->set('foo', 'foo'); + $expressionRequestMatcher = new ExpressionRequestMatcher(); + $expressionRequestMatcher->matchAttribute('foo', 'bar'); + + $expressionRequestMatcher->setExpression(new ExpressionLanguage(), $expression); + $this->assertFalse($expressionRequestMatcher->matches($request)); + } + + public function provideExpressions() + { + return array( + array('request.getMethod() == method', true), + array('request.getPathInfo() == path', true), + array('request.getHost() == host', true), + array('request.getClientIp() == ip', true), + array('request.attributes.all() == attributes', true), + array('request.getMethod() == method && request.getPathInfo() == path && request.getHost() == host && request.getClientIp() == ip && request.attributes.all() == attributes', true), + array('request.getMethod() != method', false), + array('request.getMethod() != method && request.getPathInfo() == path && request.getHost() == host && request.getClientIp() == ip && request.attributes.all() == attributes', false), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/FakeFile.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/FakeFile.php new file mode 100644 index 0000000000000000000000000000000000000000..c415989f2f7f8320929c940fc69842dd530fb758 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/FakeFile.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\Component\HttpFoundation\Tests\File; + +use Symfony\Component\HttpFoundation\File\File as OrigFile; + +class FakeFile extends OrigFile +{ + private $realpath; + + public function __construct($realpath, $path) + { + $this->realpath = $realpath; + parent::__construct($path, false); + } + + public function isReadable() + { + return true; + } + + public function getRealpath() + { + return $this->realpath; + } + + public function getSize() + { + return 42; + } + + public function getMTime() + { + return time(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dbd9c44bd802cd53b92ec59189f36464b4ede843 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php @@ -0,0 +1,180 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\File; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\File\File; +use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; + +class FileTest extends TestCase +{ + protected $file; + + public function testGetMimeTypeUsesMimeTypeGuessers() + { + $file = new File(__DIR__.'/Fixtures/test.gif'); + $guesser = $this->createMockGuesser($file->getPathname(), 'image/gif'); + + MimeTypeGuesser::getInstance()->register($guesser); + + $this->assertEquals('image/gif', $file->getMimeType()); + } + + public function testGuessExtensionWithoutGuesser() + { + $file = new File(__DIR__.'/Fixtures/directory/.empty'); + + $this->assertNull($file->guessExtension()); + } + + public function testGuessExtensionIsBasedOnMimeType() + { + $file = new File(__DIR__.'/Fixtures/test'); + $guesser = $this->createMockGuesser($file->getPathname(), 'image/gif'); + + MimeTypeGuesser::getInstance()->register($guesser); + + $this->assertEquals('gif', $file->guessExtension()); + } + + /** + * @requires extension fileinfo + */ + public function testGuessExtensionWithReset() + { + $file = new File(__DIR__.'/Fixtures/other-file.example'); + $guesser = $this->createMockGuesser($file->getPathname(), 'image/gif'); + MimeTypeGuesser::getInstance()->register($guesser); + + $this->assertEquals('gif', $file->guessExtension()); + + MimeTypeGuesser::reset(); + + $this->assertNull($file->guessExtension()); + } + + public function testConstructWhenFileNotExists() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); + + new File(__DIR__.'/Fixtures/not_here'); + } + + public function testMove() + { + $path = __DIR__.'/Fixtures/test.copy.gif'; + $targetDir = __DIR__.'/Fixtures/directory'; + $targetPath = $targetDir.'/test.copy.gif'; + @unlink($path); + @unlink($targetPath); + copy(__DIR__.'/Fixtures/test.gif', $path); + + $file = new File($path); + $movedFile = $file->move($targetDir); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile); + + $this->assertFileExists($targetPath); + $this->assertFileNotExists($path); + $this->assertEquals(realpath($targetPath), $movedFile->getRealPath()); + + @unlink($targetPath); + } + + public function testMoveWithNewName() + { + $path = __DIR__.'/Fixtures/test.copy.gif'; + $targetDir = __DIR__.'/Fixtures/directory'; + $targetPath = $targetDir.'/test.newname.gif'; + @unlink($path); + @unlink($targetPath); + copy(__DIR__.'/Fixtures/test.gif', $path); + + $file = new File($path); + $movedFile = $file->move($targetDir, 'test.newname.gif'); + + $this->assertFileExists($targetPath); + $this->assertFileNotExists($path); + $this->assertEquals(realpath($targetPath), $movedFile->getRealPath()); + + @unlink($targetPath); + } + + public function getFilenameFixtures() + { + return array( + array('original.gif', 'original.gif'), + array('..\\..\\original.gif', 'original.gif'), + array('../../original.gif', 'original.gif'), + array('файлfile.gif', 'файлfile.gif'), + array('..\\..\\файлfile.gif', 'файлfile.gif'), + array('../../файлfile.gif', 'файлfile.gif'), + ); + } + + /** + * @dataProvider getFilenameFixtures + */ + public function testMoveWithNonLatinName($filename, $sanitizedFilename) + { + $path = __DIR__.'/Fixtures/'.$sanitizedFilename; + $targetDir = __DIR__.'/Fixtures/directory/'; + $targetPath = $targetDir.$sanitizedFilename; + @unlink($path); + @unlink($targetPath); + copy(__DIR__.'/Fixtures/test.gif', $path); + + $file = new File($path); + $movedFile = $file->move($targetDir, $filename); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile); + + $this->assertFileExists($targetPath); + $this->assertFileNotExists($path); + $this->assertEquals(realpath($targetPath), $movedFile->getRealPath()); + + @unlink($targetPath); + } + + public function testMoveToAnUnexistentDirectory() + { + $sourcePath = __DIR__.'/Fixtures/test.copy.gif'; + $targetDir = __DIR__.'/Fixtures/directory/sub'; + $targetPath = $targetDir.'/test.copy.gif'; + @unlink($sourcePath); + @unlink($targetPath); + @rmdir($targetDir); + copy(__DIR__.'/Fixtures/test.gif', $sourcePath); + + $file = new File($sourcePath); + $movedFile = $file->move($targetDir); + + $this->assertFileExists($targetPath); + $this->assertFileNotExists($sourcePath); + $this->assertEquals(realpath($targetPath), $movedFile->getRealPath()); + + @unlink($sourcePath); + @unlink($targetPath); + @rmdir($targetDir); + } + + protected function createMockGuesser($path, $mimeType) + { + $guesser = $this->getMockBuilder('Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface')->getMock(); + $guesser + ->expects($this->once()) + ->method('guess') + ->with($this->equalTo($path)) + ->will($this->returnValue($mimeType)) + ; + + return $guesser; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/.unknownextension b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/.unknownextension new file mode 100644 index 0000000000000000000000000000000000000000..4d1ae35ba2c8ec712fa2a379db44ad639ca277bd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/.unknownextension @@ -0,0 +1 @@ +f \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/directory/.empty b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/directory/.empty new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/other-file.example b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/other-file.example new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test new file mode 100644 index 0000000000000000000000000000000000000000..b636f4b8df536b0a85e7cea1a6cf3f0bd3179b96 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test.gif b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test.gif new file mode 100644 index 0000000000000000000000000000000000000000..b636f4b8df536b0a85e7cea1a6cf3f0bd3179b96 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test.gif differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5a2b7a21c325efed6092941388a38ee7a465f5ea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\File\MimeType; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; +use Symfony\Component\HttpFoundation\File\MimeType\FileBinaryMimeTypeGuesser; + +/** + * @requires extension fileinfo + */ +class MimeTypeTest extends TestCase +{ + protected $path; + + public function testGuessImageWithoutExtension() + { + $this->assertEquals('image/gif', MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/test')); + } + + public function testGuessImageWithDirectory() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); + + MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/directory'); + } + + public function testGuessImageWithFileBinaryMimeTypeGuesser() + { + $guesser = MimeTypeGuesser::getInstance(); + $guesser->register(new FileBinaryMimeTypeGuesser()); + $this->assertEquals('image/gif', MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/test')); + } + + public function testGuessImageWithKnownExtension() + { + $this->assertEquals('image/gif', MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/test.gif')); + } + + public function testGuessFileWithUnknownExtension() + { + $this->assertEquals('application/octet-stream', MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/.unknownextension')); + } + + public function testGuessWithIncorrectPath() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); + MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/not_here'); + } + + public function testGuessWithNonReadablePath() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('Can not verify chmod operations on Windows'); + } + + if (!getenv('USER') || 'root' === getenv('USER')) { + $this->markTestSkipped('This test will fail if run under superuser'); + } + + $path = __DIR__.'/../Fixtures/to_delete'; + touch($path); + @chmod($path, 0333); + + if (substr(sprintf('%o', fileperms($path)), -4) == '0333') { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException'); + MimeTypeGuesser::getInstance()->guess($path); + } else { + $this->markTestSkipped('Can not verify chmod operations, change of file permissions failed'); + } + } + + public static function tearDownAfterClass() + { + $path = __DIR__.'/../Fixtures/to_delete'; + if (file_exists($path)) { + @chmod($path, 0666); + @unlink($path); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php new file mode 100644 index 0000000000000000000000000000000000000000..36f122fe7922393b5212434d87e9ee3a9a27a82f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php @@ -0,0 +1,273 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\File; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\File\UploadedFile; + +class UploadedFileTest extends TestCase +{ + protected function setUp() + { + if (!ini_get('file_uploads')) { + $this->markTestSkipped('file_uploads is disabled in php.ini'); + } + } + + public function testConstructWhenFileNotExists() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); + + new UploadedFile( + __DIR__.'/Fixtures/not_here', + 'original.gif', + null + ); + } + + public function testFileUploadsWithNoMimeType() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + 'original.gif', + null, + filesize(__DIR__.'/Fixtures/test.gif'), + UPLOAD_ERR_OK + ); + + $this->assertEquals('application/octet-stream', $file->getClientMimeType()); + + if (extension_loaded('fileinfo')) { + $this->assertEquals('image/gif', $file->getMimeType()); + } + } + + public function testFileUploadsWithUnknownMimeType() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/.unknownextension', + 'original.gif', + null, + filesize(__DIR__.'/Fixtures/.unknownextension'), + UPLOAD_ERR_OK + ); + + $this->assertEquals('application/octet-stream', $file->getClientMimeType()); + } + + public function testGuessClientExtension() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + 'original.gif', + 'image/gif', + filesize(__DIR__.'/Fixtures/test.gif'), + null + ); + + $this->assertEquals('gif', $file->guessClientExtension()); + } + + public function testGuessClientExtensionWithIncorrectMimeType() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + 'original.gif', + 'image/jpeg', + filesize(__DIR__.'/Fixtures/test.gif'), + null + ); + + $this->assertEquals('jpeg', $file->guessClientExtension()); + } + + public function testErrorIsOkByDefault() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + 'original.gif', + 'image/gif', + filesize(__DIR__.'/Fixtures/test.gif'), + null + ); + + $this->assertEquals(UPLOAD_ERR_OK, $file->getError()); + } + + public function testGetClientOriginalName() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + 'original.gif', + 'image/gif', + filesize(__DIR__.'/Fixtures/test.gif'), + null + ); + + $this->assertEquals('original.gif', $file->getClientOriginalName()); + } + + public function testGetClientOriginalExtension() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + 'original.gif', + 'image/gif', + filesize(__DIR__.'/Fixtures/test.gif'), + null + ); + + $this->assertEquals('gif', $file->getClientOriginalExtension()); + } + + /** + * @expectedException \Symfony\Component\HttpFoundation\File\Exception\FileException + */ + public function testMoveLocalFileIsNotAllowed() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + 'original.gif', + 'image/gif', + filesize(__DIR__.'/Fixtures/test.gif'), + UPLOAD_ERR_OK + ); + + $movedFile = $file->move(__DIR__.'/Fixtures/directory'); + } + + public function testMoveLocalFileIsAllowedInTestMode() + { + $path = __DIR__.'/Fixtures/test.copy.gif'; + $targetDir = __DIR__.'/Fixtures/directory'; + $targetPath = $targetDir.'/test.copy.gif'; + @unlink($path); + @unlink($targetPath); + copy(__DIR__.'/Fixtures/test.gif', $path); + + $file = new UploadedFile( + $path, + 'original.gif', + 'image/gif', + filesize($path), + UPLOAD_ERR_OK, + true + ); + + $movedFile = $file->move(__DIR__.'/Fixtures/directory'); + + $this->assertFileExists($targetPath); + $this->assertFileNotExists($path); + $this->assertEquals(realpath($targetPath), $movedFile->getRealPath()); + + @unlink($targetPath); + } + + public function testGetClientOriginalNameSanitizeFilename() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + '../../original.gif', + 'image/gif', + filesize(__DIR__.'/Fixtures/test.gif'), + null + ); + + $this->assertEquals('original.gif', $file->getClientOriginalName()); + } + + public function testGetSize() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + 'original.gif', + 'image/gif', + filesize(__DIR__.'/Fixtures/test.gif'), + null + ); + + $this->assertEquals(filesize(__DIR__.'/Fixtures/test.gif'), $file->getSize()); + + $file = new UploadedFile( + __DIR__.'/Fixtures/test', + 'original.gif', + 'image/gif' + ); + + $this->assertEquals(filesize(__DIR__.'/Fixtures/test'), $file->getSize()); + } + + public function testGetExtension() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + 'original.gif', + null + ); + + $this->assertEquals('gif', $file->getExtension()); + } + + public function testIsValid() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + 'original.gif', + null, + filesize(__DIR__.'/Fixtures/test.gif'), + UPLOAD_ERR_OK, + true + ); + + $this->assertTrue($file->isValid()); + } + + /** + * @dataProvider uploadedFileErrorProvider + */ + public function testIsInvalidOnUploadError($error) + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + 'original.gif', + null, + filesize(__DIR__.'/Fixtures/test.gif'), + $error + ); + + $this->assertFalse($file->isValid()); + } + + public function uploadedFileErrorProvider() + { + return array( + array(UPLOAD_ERR_INI_SIZE), + array(UPLOAD_ERR_FORM_SIZE), + array(UPLOAD_ERR_PARTIAL), + array(UPLOAD_ERR_NO_TMP_DIR), + array(UPLOAD_ERR_EXTENSION), + ); + } + + public function testIsInvalidIfNotHttpUpload() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/test.gif', + 'original.gif', + null, + filesize(__DIR__.'/Fixtures/test.gif'), + UPLOAD_ERR_OK + ); + + $this->assertFalse($file->isValid()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e7defa677713b003bed7c5d8ae5793fcaa8f2048 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php @@ -0,0 +1,149 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\HttpFoundation\FileBag; + +/** + * FileBagTest. + * + * @author Fabien Potencier + * @author Bulat Shakirzyanov + */ +class FileBagTest extends TestCase +{ + /** + * @expectedException \InvalidArgumentException + */ + public function testFileMustBeAnArrayOrUploadedFile() + { + new FileBag(array('file' => 'foo')); + } + + public function testShouldConvertsUploadedFiles() + { + $tmpFile = $this->createTempFile(); + $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0); + + $bag = new FileBag(array('file' => array( + 'name' => basename($tmpFile), + 'type' => 'text/plain', + 'tmp_name' => $tmpFile, + 'error' => 0, + 'size' => 100, + ))); + + $this->assertEquals($file, $bag->get('file')); + } + + public function testShouldSetEmptyUploadedFilesToNull() + { + $bag = new FileBag(array('file' => array( + 'name' => '', + 'type' => '', + 'tmp_name' => '', + 'error' => UPLOAD_ERR_NO_FILE, + 'size' => 0, + ))); + + $this->assertNull($bag->get('file')); + } + + public function testShouldConvertUploadedFilesWithPhpBug() + { + $tmpFile = $this->createTempFile(); + $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0); + + $bag = new FileBag(array( + 'child' => array( + 'name' => array( + 'file' => basename($tmpFile), + ), + 'type' => array( + 'file' => 'text/plain', + ), + 'tmp_name' => array( + 'file' => $tmpFile, + ), + 'error' => array( + 'file' => 0, + ), + 'size' => array( + 'file' => 100, + ), + ), + )); + + $files = $bag->all(); + $this->assertEquals($file, $files['child']['file']); + } + + public function testShouldConvertNestedUploadedFilesWithPhpBug() + { + $tmpFile = $this->createTempFile(); + $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0); + + $bag = new FileBag(array( + 'child' => array( + 'name' => array( + 'sub' => array('file' => basename($tmpFile)), + ), + 'type' => array( + 'sub' => array('file' => 'text/plain'), + ), + 'tmp_name' => array( + 'sub' => array('file' => $tmpFile), + ), + 'error' => array( + 'sub' => array('file' => 0), + ), + 'size' => array( + 'sub' => array('file' => 100), + ), + ), + )); + + $files = $bag->all(); + $this->assertEquals($file, $files['child']['sub']['file']); + } + + public function testShouldNotConvertNestedUploadedFiles() + { + $tmpFile = $this->createTempFile(); + $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0); + $bag = new FileBag(array('image' => array('file' => $file))); + + $files = $bag->all(); + $this->assertEquals($file, $files['image']['file']); + } + + protected function createTempFile() + { + return tempnam(sys_get_temp_dir().'/form_test', 'FormTest'); + } + + protected function setUp() + { + mkdir(sys_get_temp_dir().'/form_test', 0777, true); + } + + protected function tearDown() + { + foreach (glob(sys_get_temp_dir().'/form_test/*') as $file) { + unlink($file); + } + + rmdir(sys_get_temp_dir().'/form_test'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1acf593086772ec4ab64aa3d08f44c3d5154f7d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php @@ -0,0 +1,205 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\HeaderBag; + +class HeaderBagTest extends TestCase +{ + public function testConstructor() + { + $bag = new HeaderBag(array('foo' => 'bar')); + $this->assertTrue($bag->has('foo')); + } + + public function testToStringNull() + { + $bag = new HeaderBag(); + $this->assertEquals('', $bag->__toString()); + } + + public function testToStringNotNull() + { + $bag = new HeaderBag(array('foo' => 'bar')); + $this->assertEquals("Foo: bar\r\n", $bag->__toString()); + } + + public function testKeys() + { + $bag = new HeaderBag(array('foo' => 'bar')); + $keys = $bag->keys(); + $this->assertEquals('foo', $keys[0]); + } + + public function testGetDate() + { + $bag = new HeaderBag(array('foo' => 'Tue, 4 Sep 2012 20:00:00 +0200')); + $headerDate = $bag->getDate('foo'); + $this->assertInstanceOf('DateTime', $headerDate); + } + + /** + * @expectedException \RuntimeException + */ + public function testGetDateException() + { + $bag = new HeaderBag(array('foo' => 'Tue')); + $headerDate = $bag->getDate('foo'); + } + + public function testGetCacheControlHeader() + { + $bag = new HeaderBag(); + $bag->addCacheControlDirective('public', '#a'); + $this->assertTrue($bag->hasCacheControlDirective('public')); + $this->assertEquals('#a', $bag->getCacheControlDirective('public')); + } + + public function testAll() + { + $bag = new HeaderBag(array('foo' => 'bar')); + $this->assertEquals(array('foo' => array('bar')), $bag->all(), '->all() gets all the input'); + + $bag = new HeaderBag(array('FOO' => 'BAR')); + $this->assertEquals(array('foo' => array('BAR')), $bag->all(), '->all() gets all the input key are lower case'); + } + + public function testReplace() + { + $bag = new HeaderBag(array('foo' => 'bar')); + + $bag->replace(array('NOPE' => 'BAR')); + $this->assertEquals(array('nope' => array('BAR')), $bag->all(), '->replace() replaces the input with the argument'); + $this->assertFalse($bag->has('foo'), '->replace() overrides previously set the input'); + } + + public function testGet() + { + $bag = new HeaderBag(array('foo' => 'bar', 'fuzz' => 'bizz')); + $this->assertEquals('bar', $bag->get('foo'), '->get return current value'); + $this->assertEquals('bar', $bag->get('FoO'), '->get key in case insensitive'); + $this->assertEquals(array('bar'), $bag->get('foo', 'nope', false), '->get return the value as array'); + + // defaults + $this->assertNull($bag->get('none'), '->get unknown values returns null'); + $this->assertEquals('default', $bag->get('none', 'default'), '->get unknown values returns default'); + $this->assertEquals(array('default'), $bag->get('none', 'default', false), '->get unknown values returns default as array'); + + $bag->set('foo', 'bor', false); + $this->assertEquals('bar', $bag->get('foo'), '->get return first value'); + $this->assertEquals(array('bar', 'bor'), $bag->get('foo', 'nope', false), '->get return all values as array'); + } + + public function testSetAssociativeArray() + { + $bag = new HeaderBag(); + $bag->set('foo', array('bad-assoc-index' => 'value')); + $this->assertSame('value', $bag->get('foo')); + $this->assertEquals(array('value'), $bag->get('foo', 'nope', false), 'assoc indices of multi-valued headers are ignored'); + } + + public function testContains() + { + $bag = new HeaderBag(array('foo' => 'bar', 'fuzz' => 'bizz')); + $this->assertTrue($bag->contains('foo', 'bar'), '->contains first value'); + $this->assertTrue($bag->contains('fuzz', 'bizz'), '->contains second value'); + $this->assertFalse($bag->contains('nope', 'nope'), '->contains unknown value'); + $this->assertFalse($bag->contains('foo', 'nope'), '->contains unknown value'); + + // Multiple values + $bag->set('foo', 'bor', false); + $this->assertTrue($bag->contains('foo', 'bar'), '->contains first value'); + $this->assertTrue($bag->contains('foo', 'bor'), '->contains second value'); + $this->assertFalse($bag->contains('foo', 'nope'), '->contains unknown value'); + } + + public function testCacheControlDirectiveAccessors() + { + $bag = new HeaderBag(); + $bag->addCacheControlDirective('public'); + + $this->assertTrue($bag->hasCacheControlDirective('public')); + $this->assertTrue($bag->getCacheControlDirective('public')); + $this->assertEquals('public', $bag->get('cache-control')); + + $bag->addCacheControlDirective('max-age', 10); + $this->assertTrue($bag->hasCacheControlDirective('max-age')); + $this->assertEquals(10, $bag->getCacheControlDirective('max-age')); + $this->assertEquals('max-age=10, public', $bag->get('cache-control')); + + $bag->removeCacheControlDirective('max-age'); + $this->assertFalse($bag->hasCacheControlDirective('max-age')); + } + + public function testCacheControlDirectiveParsing() + { + $bag = new HeaderBag(array('cache-control' => 'public, max-age=10')); + $this->assertTrue($bag->hasCacheControlDirective('public')); + $this->assertTrue($bag->getCacheControlDirective('public')); + + $this->assertTrue($bag->hasCacheControlDirective('max-age')); + $this->assertEquals(10, $bag->getCacheControlDirective('max-age')); + + $bag->addCacheControlDirective('s-maxage', 100); + $this->assertEquals('max-age=10, public, s-maxage=100', $bag->get('cache-control')); + } + + public function testCacheControlDirectiveParsingQuotedZero() + { + $bag = new HeaderBag(array('cache-control' => 'max-age="0"')); + $this->assertTrue($bag->hasCacheControlDirective('max-age')); + $this->assertEquals(0, $bag->getCacheControlDirective('max-age')); + } + + public function testCacheControlDirectiveOverrideWithReplace() + { + $bag = new HeaderBag(array('cache-control' => 'private, max-age=100')); + $bag->replace(array('cache-control' => 'public, max-age=10')); + $this->assertTrue($bag->hasCacheControlDirective('public')); + $this->assertTrue($bag->getCacheControlDirective('public')); + + $this->assertTrue($bag->hasCacheControlDirective('max-age')); + $this->assertEquals(10, $bag->getCacheControlDirective('max-age')); + } + + public function testCacheControlClone() + { + $headers = array('foo' => 'bar'); + $bag1 = new HeaderBag($headers); + $bag2 = new HeaderBag($bag1->all()); + + $this->assertEquals($bag1->all(), $bag2->all()); + } + + public function testGetIterator() + { + $headers = array('foo' => 'bar', 'hello' => 'world', 'third' => 'charm'); + $headerBag = new HeaderBag($headers); + + $i = 0; + foreach ($headerBag as $key => $val) { + ++$i; + $this->assertEquals(array($headers[$key]), $val); + } + + $this->assertEquals(count($headers), $i); + } + + public function testCount() + { + $headers = array('foo' => 'bar', 'HELLO' => 'WORLD'); + $headerBag = new HeaderBag($headers); + + $this->assertEquals(count($headers), count($headerBag)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..61aa74861ddeea4e64b7f3570a87e821aa17bc1e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\IpUtils; + +class IpUtilsTest extends TestCase +{ + /** + * @dataProvider testIpv4Provider + */ + public function testIpv4($matches, $remoteAddr, $cidr) + { + $this->assertSame($matches, IpUtils::checkIp($remoteAddr, $cidr)); + } + + public function testIpv4Provider() + { + return array( + array(true, '192.168.1.1', '192.168.1.1'), + array(true, '192.168.1.1', '192.168.1.1/1'), + array(true, '192.168.1.1', '192.168.1.0/24'), + array(false, '192.168.1.1', '1.2.3.4/1'), + array(false, '192.168.1.1', '192.168.1.1/33'), // invalid subnet + array(true, '192.168.1.1', array('1.2.3.4/1', '192.168.1.0/24')), + array(true, '192.168.1.1', array('192.168.1.0/24', '1.2.3.4/1')), + array(false, '192.168.1.1', array('1.2.3.4/1', '4.3.2.1/1')), + array(true, '1.2.3.4', '0.0.0.0/0'), + array(true, '1.2.3.4', '192.168.1.0/0'), + array(false, '1.2.3.4', '256.256.256/0'), // invalid CIDR notation + array(false, 'an_invalid_ip', '192.168.1.0/24'), + ); + } + + /** + * @dataProvider testIpv6Provider + */ + public function testIpv6($matches, $remoteAddr, $cidr) + { + if (!defined('AF_INET6')) { + $this->markTestSkipped('Only works when PHP is compiled without the option "disable-ipv6".'); + } + + $this->assertSame($matches, IpUtils::checkIp($remoteAddr, $cidr)); + } + + public function testIpv6Provider() + { + return array( + array(true, '2a01:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'), + array(false, '2a00:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'), + array(false, '2a01:198:603:0:396e:4789:8e99:890f', '::1'), + array(true, '0:0:0:0:0:0:0:1', '::1'), + array(false, '0:0:603:0:396e:4789:8e99:0001', '::1'), + array(true, '2a01:198:603:0:396e:4789:8e99:890f', array('::1', '2a01:198:603:0::/65')), + array(true, '2a01:198:603:0:396e:4789:8e99:890f', array('2a01:198:603:0::/65', '::1')), + array(false, '2a01:198:603:0:396e:4789:8e99:890f', array('::1', '1a01:198:603:0::/65')), + array(false, '}__test|O:21:"JDatabaseDriverMysqli":3:{s:2', '::1'), + array(false, '2a01:198:603:0:396e:4789:8e99:890f', 'unknown'), + ); + } + + /** + * @expectedException \RuntimeException + * @requires extension sockets + */ + public function testAnIpv6WithOptionDisabledIpv6() + { + if (defined('AF_INET6')) { + $this->markTestSkipped('Only works when PHP is compiled with the option "disable-ipv6".'); + } + + IpUtils::checkIp('2a01:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c8b93778954a8d4c4050a35f59fc15a54fbc06a8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php @@ -0,0 +1,253 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\JsonResponse; + +class JsonResponseTest extends TestCase +{ + public function testConstructorEmptyCreatesJsonObject() + { + $response = new JsonResponse(); + $this->assertSame('{}', $response->getContent()); + } + + public function testConstructorWithArrayCreatesJsonArray() + { + $response = new JsonResponse(array(0, 1, 2, 3)); + $this->assertSame('[0,1,2,3]', $response->getContent()); + } + + public function testConstructorWithAssocArrayCreatesJsonObject() + { + $response = new JsonResponse(array('foo' => 'bar')); + $this->assertSame('{"foo":"bar"}', $response->getContent()); + } + + public function testConstructorWithSimpleTypes() + { + $response = new JsonResponse('foo'); + $this->assertSame('"foo"', $response->getContent()); + + $response = new JsonResponse(0); + $this->assertSame('0', $response->getContent()); + + $response = new JsonResponse(0.1); + $this->assertSame('0.1', $response->getContent()); + + $response = new JsonResponse(true); + $this->assertSame('true', $response->getContent()); + } + + public function testConstructorWithCustomStatus() + { + $response = new JsonResponse(array(), 202); + $this->assertSame(202, $response->getStatusCode()); + } + + public function testConstructorAddsContentTypeHeader() + { + $response = new JsonResponse(); + $this->assertSame('application/json', $response->headers->get('Content-Type')); + } + + public function testConstructorWithCustomHeaders() + { + $response = new JsonResponse(array(), 200, array('ETag' => 'foo')); + $this->assertSame('application/json', $response->headers->get('Content-Type')); + $this->assertSame('foo', $response->headers->get('ETag')); + } + + public function testConstructorWithCustomContentType() + { + $headers = array('Content-Type' => 'application/vnd.acme.blog-v1+json'); + + $response = new JsonResponse(array(), 200, $headers); + $this->assertSame('application/vnd.acme.blog-v1+json', $response->headers->get('Content-Type')); + } + + public function testSetJson() + { + $response = new JsonResponse('1', 200, array(), true); + $this->assertEquals('1', $response->getContent()); + + $response = new JsonResponse('[1]', 200, array(), true); + $this->assertEquals('[1]', $response->getContent()); + + $response = new JsonResponse(null, 200, array()); + $response->setJson('true'); + $this->assertEquals('true', $response->getContent()); + } + + public function testCreate() + { + $response = JsonResponse::create(array('foo' => 'bar'), 204); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); + $this->assertEquals('{"foo":"bar"}', $response->getContent()); + $this->assertEquals(204, $response->getStatusCode()); + } + + public function testStaticCreateEmptyJsonObject() + { + $response = JsonResponse::create(); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); + $this->assertSame('{}', $response->getContent()); + } + + public function testStaticCreateJsonArray() + { + $response = JsonResponse::create(array(0, 1, 2, 3)); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); + $this->assertSame('[0,1,2,3]', $response->getContent()); + } + + public function testStaticCreateJsonObject() + { + $response = JsonResponse::create(array('foo' => 'bar')); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); + $this->assertSame('{"foo":"bar"}', $response->getContent()); + } + + public function testStaticCreateWithSimpleTypes() + { + $response = JsonResponse::create('foo'); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); + $this->assertSame('"foo"', $response->getContent()); + + $response = JsonResponse::create(0); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); + $this->assertSame('0', $response->getContent()); + + $response = JsonResponse::create(0.1); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); + $this->assertSame('0.1', $response->getContent()); + + $response = JsonResponse::create(true); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); + $this->assertSame('true', $response->getContent()); + } + + public function testStaticCreateWithCustomStatus() + { + $response = JsonResponse::create(array(), 202); + $this->assertSame(202, $response->getStatusCode()); + } + + public function testStaticCreateAddsContentTypeHeader() + { + $response = JsonResponse::create(); + $this->assertSame('application/json', $response->headers->get('Content-Type')); + } + + public function testStaticCreateWithCustomHeaders() + { + $response = JsonResponse::create(array(), 200, array('ETag' => 'foo')); + $this->assertSame('application/json', $response->headers->get('Content-Type')); + $this->assertSame('foo', $response->headers->get('ETag')); + } + + public function testStaticCreateWithCustomContentType() + { + $headers = array('Content-Type' => 'application/vnd.acme.blog-v1+json'); + + $response = JsonResponse::create(array(), 200, $headers); + $this->assertSame('application/vnd.acme.blog-v1+json', $response->headers->get('Content-Type')); + } + + public function testSetCallback() + { + $response = JsonResponse::create(array('foo' => 'bar'))->setCallback('callback'); + + $this->assertEquals('/**/callback({"foo":"bar"});', $response->getContent()); + $this->assertEquals('text/javascript', $response->headers->get('Content-Type')); + } + + public function testJsonEncodeFlags() + { + $response = new JsonResponse('<>\'&"'); + + $this->assertEquals('"\u003C\u003E\u0027\u0026\u0022"', $response->getContent()); + } + + public function testGetEncodingOptions() + { + $response = new JsonResponse(); + + $this->assertEquals(JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT, $response->getEncodingOptions()); + } + + public function testSetEncodingOptions() + { + $response = new JsonResponse(); + $response->setData(array(array(1, 2, 3))); + + $this->assertEquals('[[1,2,3]]', $response->getContent()); + + $response->setEncodingOptions(JSON_FORCE_OBJECT); + + $this->assertEquals('{"0":{"0":1,"1":2,"2":3}}', $response->getContent()); + } + + public function testItAcceptsJsonAsString() + { + $response = JsonResponse::fromJsonString('{"foo":"bar"}'); + $this->assertSame('{"foo":"bar"}', $response->getContent()); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testSetCallbackInvalidIdentifier() + { + $response = new JsonResponse('foo'); + $response->setCallback('+invalid'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testSetContent() + { + JsonResponse::create("\xB1\x31"); + } + + /** + * @expectedException \Exception + * @expectedExceptionMessage This error is expected + */ + public function testSetContentJsonSerializeError() + { + $serializable = new JsonSerializableObject(); + + JsonResponse::create($serializable); + } + + public function testSetComplexCallback() + { + $response = JsonResponse::create(array('foo' => 'bar')); + $response->setCallback('ಠ_ಠ["foo"].bar[0]'); + + $this->assertEquals('/**/ಠ_ಠ["foo"].bar[0]({"foo":"bar"});', $response->getContent()); + } +} + +if (interface_exists('JsonSerializable')) { + class JsonSerializableObject implements \JsonSerializable + { + public function jsonSerialize() + { + throw new \Exception('This error is expected'); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5311a0d8036c84e66d324cc73d4c05219f22abcd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php @@ -0,0 +1,194 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\ParameterBag; + +class ParameterBagTest extends TestCase +{ + public function testConstructor() + { + $this->testAll(); + } + + public function testAll() + { + $bag = new ParameterBag(array('foo' => 'bar')); + $this->assertEquals(array('foo' => 'bar'), $bag->all(), '->all() gets all the input'); + } + + public function testKeys() + { + $bag = new ParameterBag(array('foo' => 'bar')); + $this->assertEquals(array('foo'), $bag->keys()); + } + + public function testAdd() + { + $bag = new ParameterBag(array('foo' => 'bar')); + $bag->add(array('bar' => 'bas')); + $this->assertEquals(array('foo' => 'bar', 'bar' => 'bas'), $bag->all()); + } + + public function testRemove() + { + $bag = new ParameterBag(array('foo' => 'bar')); + $bag->add(array('bar' => 'bas')); + $this->assertEquals(array('foo' => 'bar', 'bar' => 'bas'), $bag->all()); + $bag->remove('bar'); + $this->assertEquals(array('foo' => 'bar'), $bag->all()); + } + + public function testReplace() + { + $bag = new ParameterBag(array('foo' => 'bar')); + + $bag->replace(array('FOO' => 'BAR')); + $this->assertEquals(array('FOO' => 'BAR'), $bag->all(), '->replace() replaces the input with the argument'); + $this->assertFalse($bag->has('foo'), '->replace() overrides previously set the input'); + } + + public function testGet() + { + $bag = new ParameterBag(array('foo' => 'bar', 'null' => null)); + + $this->assertEquals('bar', $bag->get('foo'), '->get() gets the value of a parameter'); + $this->assertEquals('default', $bag->get('unknown', 'default'), '->get() returns second argument as default if a parameter is not defined'); + $this->assertNull($bag->get('null', 'default'), '->get() returns null if null is set'); + } + + public function testGetDoesNotUseDeepByDefault() + { + $bag = new ParameterBag(array('foo' => array('bar' => 'moo'))); + + $this->assertNull($bag->get('foo[bar]')); + } + + public function testSet() + { + $bag = new ParameterBag(array()); + + $bag->set('foo', 'bar'); + $this->assertEquals('bar', $bag->get('foo'), '->set() sets the value of parameter'); + + $bag->set('foo', 'baz'); + $this->assertEquals('baz', $bag->get('foo'), '->set() overrides previously set parameter'); + } + + public function testHas() + { + $bag = new ParameterBag(array('foo' => 'bar')); + + $this->assertTrue($bag->has('foo'), '->has() returns true if a parameter is defined'); + $this->assertFalse($bag->has('unknown'), '->has() return false if a parameter is not defined'); + } + + public function testGetAlpha() + { + $bag = new ParameterBag(array('word' => 'foo_BAR_012')); + + $this->assertEquals('fooBAR', $bag->getAlpha('word'), '->getAlpha() gets only alphabetic characters'); + $this->assertEquals('', $bag->getAlpha('unknown'), '->getAlpha() returns empty string if a parameter is not defined'); + } + + public function testGetAlnum() + { + $bag = new ParameterBag(array('word' => 'foo_BAR_012')); + + $this->assertEquals('fooBAR012', $bag->getAlnum('word'), '->getAlnum() gets only alphanumeric characters'); + $this->assertEquals('', $bag->getAlnum('unknown'), '->getAlnum() returns empty string if a parameter is not defined'); + } + + public function testGetDigits() + { + $bag = new ParameterBag(array('word' => 'foo_BAR_012')); + + $this->assertEquals('012', $bag->getDigits('word'), '->getDigits() gets only digits as string'); + $this->assertEquals('', $bag->getDigits('unknown'), '->getDigits() returns empty string if a parameter is not defined'); + } + + public function testGetInt() + { + $bag = new ParameterBag(array('digits' => '0123')); + + $this->assertEquals(123, $bag->getInt('digits'), '->getInt() gets a value of parameter as integer'); + $this->assertEquals(0, $bag->getInt('unknown'), '->getInt() returns zero if a parameter is not defined'); + } + + public function testFilter() + { + $bag = new ParameterBag(array( + 'digits' => '0123ab', + 'email' => 'example@example.com', + 'url' => 'http://example.com/foo', + 'dec' => '256', + 'hex' => '0x100', + 'array' => array('bang'), + )); + + $this->assertEmpty($bag->filter('nokey'), '->filter() should return empty by default if no key is found'); + + $this->assertEquals('0123', $bag->filter('digits', '', FILTER_SANITIZE_NUMBER_INT), '->filter() gets a value of parameter as integer filtering out invalid characters'); + + $this->assertEquals('example@example.com', $bag->filter('email', '', FILTER_VALIDATE_EMAIL), '->filter() gets a value of parameter as email'); + + $this->assertEquals('http://example.com/foo', $bag->filter('url', '', FILTER_VALIDATE_URL, array('flags' => FILTER_FLAG_PATH_REQUIRED)), '->filter() gets a value of parameter as URL with a path'); + + // This test is repeated for code-coverage + $this->assertEquals('http://example.com/foo', $bag->filter('url', '', FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED), '->filter() gets a value of parameter as URL with a path'); + + $this->assertFalse($bag->filter('dec', '', FILTER_VALIDATE_INT, array( + 'flags' => FILTER_FLAG_ALLOW_HEX, + 'options' => array('min_range' => 1, 'max_range' => 0xff), + )), '->filter() gets a value of parameter as integer between boundaries'); + + $this->assertFalse($bag->filter('hex', '', FILTER_VALIDATE_INT, array( + 'flags' => FILTER_FLAG_ALLOW_HEX, + 'options' => array('min_range' => 1, 'max_range' => 0xff), + )), '->filter() gets a value of parameter as integer between boundaries'); + + $this->assertEquals(array('bang'), $bag->filter('array', ''), '->filter() gets a value of parameter as an array'); + } + + public function testGetIterator() + { + $parameters = array('foo' => 'bar', 'hello' => 'world'); + $bag = new ParameterBag($parameters); + + $i = 0; + foreach ($bag as $key => $val) { + ++$i; + $this->assertEquals($parameters[$key], $val); + } + + $this->assertEquals(count($parameters), $i); + } + + public function testCount() + { + $parameters = array('foo' => 'bar', 'hello' => 'world'); + $bag = new ParameterBag($parameters); + + $this->assertEquals(count($parameters), count($bag)); + } + + public function testGetBoolean() + { + $parameters = array('string_true' => 'true', 'string_false' => 'false'); + $bag = new ParameterBag($parameters); + + $this->assertTrue($bag->getBoolean('string_true'), '->getBoolean() gets the string true as boolean true'); + $this->assertFalse($bag->getBoolean('string_false'), '->getBoolean() gets the string false as boolean false'); + $this->assertFalse($bag->getBoolean('unknown'), '->getBoolean() returns false if a parameter is not defined'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d389e83dbe14a76a1c4c9955a20c11796f26c6da --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\RedirectResponse; + +class RedirectResponseTest extends TestCase +{ + public function testGenerateMetaRedirect() + { + $response = new RedirectResponse('foo.bar'); + + $this->assertEquals(1, preg_match( + '##', + preg_replace(array('/\s+/', '/\'/'), array(' ', '"'), $response->getContent()) + )); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testRedirectResponseConstructorNullUrl() + { + $response = new RedirectResponse(null); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testRedirectResponseConstructorWrongStatusCode() + { + $response = new RedirectResponse('foo.bar', 404); + } + + public function testGenerateLocationHeader() + { + $response = new RedirectResponse('foo.bar'); + + $this->assertTrue($response->headers->has('Location')); + $this->assertEquals('foo.bar', $response->headers->get('Location')); + } + + public function testGetTargetUrl() + { + $response = new RedirectResponse('foo.bar'); + + $this->assertEquals('foo.bar', $response->getTargetUrl()); + } + + public function testSetTargetUrl() + { + $response = new RedirectResponse('foo.bar'); + $response->setTargetUrl('baz.beep'); + + $this->assertEquals('baz.beep', $response->getTargetUrl()); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testSetTargetUrlNull() + { + $response = new RedirectResponse('foo.bar'); + $response->setTargetUrl(null); + } + + public function testCreate() + { + $response = RedirectResponse::create('foo', 301); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $response); + $this->assertEquals(301, $response->getStatusCode()); + } + + public function testCacheHeaders() + { + $response = new RedirectResponse('foo.bar', 301); + $this->assertFalse($response->headers->hasCacheControlDirective('no-cache')); + + $response = new RedirectResponse('foo.bar', 301, array('cache-control' => 'max-age=86400')); + $this->assertFalse($response->headers->hasCacheControlDirective('no-cache')); + $this->assertTrue($response->headers->hasCacheControlDirective('max-age')); + + $response = new RedirectResponse('foo.bar', 302); + $this->assertTrue($response->headers->hasCacheControlDirective('no-cache')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6f864d4468fe7bfddf06e92c8956b583c71d84c1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.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\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\RequestMatcher; +use Symfony\Component\HttpFoundation\Request; + +class RequestMatcherTest extends TestCase +{ + /** + * @dataProvider testMethodFixtures + */ + public function testMethod($requestMethod, $matcherMethod, $isMatch) + { + $matcher = new RequestMatcher(); + $matcher->matchMethod($matcherMethod); + $request = Request::create('', $requestMethod); + $this->assertSame($isMatch, $matcher->matches($request)); + + $matcher = new RequestMatcher(null, null, $matcherMethod); + $request = Request::create('', $requestMethod); + $this->assertSame($isMatch, $matcher->matches($request)); + } + + public function testMethodFixtures() + { + return array( + array('get', 'get', true), + array('get', array('get', 'post'), true), + array('get', 'post', false), + array('get', 'GET', true), + array('get', array('GET', 'POST'), true), + array('get', 'POST', false), + ); + } + + public function testScheme() + { + $httpRequest = $request = $request = Request::create(''); + $httpsRequest = $request = $request = Request::create('', 'get', array(), array(), array(), array('HTTPS' => 'on')); + + $matcher = new RequestMatcher(); + $matcher->matchScheme('https'); + $this->assertFalse($matcher->matches($httpRequest)); + $this->assertTrue($matcher->matches($httpsRequest)); + + $matcher->matchScheme('http'); + $this->assertFalse($matcher->matches($httpsRequest)); + $this->assertTrue($matcher->matches($httpRequest)); + + $matcher = new RequestMatcher(); + $this->assertTrue($matcher->matches($httpsRequest)); + $this->assertTrue($matcher->matches($httpRequest)); + } + + /** + * @dataProvider testHostFixture + */ + public function testHost($pattern, $isMatch) + { + $matcher = new RequestMatcher(); + $request = Request::create('', 'get', array(), array(), array(), array('HTTP_HOST' => 'foo.example.com')); + + $matcher->matchHost($pattern); + $this->assertSame($isMatch, $matcher->matches($request)); + + $matcher = new RequestMatcher(null, $pattern); + $this->assertSame($isMatch, $matcher->matches($request)); + } + + public function testHostFixture() + { + return array( + array('.*\.example\.com', true), + array('\.example\.com$', true), + array('^.*\.example\.com$', true), + array('.*\.sensio\.com', false), + array('.*\.example\.COM', true), + array('\.example\.COM$', true), + array('^.*\.example\.COM$', true), + array('.*\.sensio\.COM', false), + ); + } + + public function testPath() + { + $matcher = new RequestMatcher(); + + $request = Request::create('/admin/foo'); + + $matcher->matchPath('/admin/.*'); + $this->assertTrue($matcher->matches($request)); + + $matcher->matchPath('/admin'); + $this->assertTrue($matcher->matches($request)); + + $matcher->matchPath('^/admin/.*$'); + $this->assertTrue($matcher->matches($request)); + + $matcher->matchMethod('/blog/.*'); + $this->assertFalse($matcher->matches($request)); + } + + public function testPathWithLocaleIsNotSupported() + { + $matcher = new RequestMatcher(); + $request = Request::create('/en/login'); + $request->setLocale('en'); + + $matcher->matchPath('^/{_locale}/login$'); + $this->assertFalse($matcher->matches($request)); + } + + public function testPathWithEncodedCharacters() + { + $matcher = new RequestMatcher(); + $request = Request::create('/admin/fo%20o'); + $matcher->matchPath('^/admin/fo o*$'); + $this->assertTrue($matcher->matches($request)); + } + + public function testAttributes() + { + $matcher = new RequestMatcher(); + + $request = Request::create('/admin/foo'); + $request->attributes->set('foo', 'foo_bar'); + + $matcher->matchAttribute('foo', 'foo_.*'); + $this->assertTrue($matcher->matches($request)); + + $matcher->matchAttribute('foo', 'foo'); + $this->assertTrue($matcher->matches($request)); + + $matcher->matchAttribute('foo', '^foo_bar$'); + $this->assertTrue($matcher->matches($request)); + + $matcher->matchAttribute('foo', 'babar'); + $this->assertFalse($matcher->matches($request)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestStackTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestStackTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a84fb26f0b59b72927e5e4c7c7a2460ad22e1a84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestStackTest.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; + +class RequestStackTest extends TestCase +{ + public function testGetCurrentRequest() + { + $requestStack = new RequestStack(); + $this->assertNull($requestStack->getCurrentRequest()); + + $request = Request::create('/foo'); + + $requestStack->push($request); + $this->assertSame($request, $requestStack->getCurrentRequest()); + + $this->assertSame($request, $requestStack->pop()); + $this->assertNull($requestStack->getCurrentRequest()); + + $this->assertNull($requestStack->pop()); + } + + public function testGetMasterRequest() + { + $requestStack = new RequestStack(); + $this->assertNull($requestStack->getMasterRequest()); + + $masterRequest = Request::create('/foo'); + $subRequest = Request::create('/bar'); + + $requestStack->push($masterRequest); + $requestStack->push($subRequest); + + $this->assertSame($masterRequest, $requestStack->getMasterRequest()); + } + + public function testGetParentRequest() + { + $requestStack = new RequestStack(); + $this->assertNull($requestStack->getParentRequest()); + + $masterRequest = Request::create('/foo'); + + $requestStack->push($masterRequest); + $this->assertNull($requestStack->getParentRequest()); + + $firstSubRequest = Request::create('/bar'); + + $requestStack->push($firstSubRequest); + $this->assertSame($masterRequest, $requestStack->getParentRequest()); + + $secondSubRequest = Request::create('/baz'); + + $requestStack->push($secondSubRequest); + $this->assertSame($firstSubRequest, $requestStack->getParentRequest()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a6efcaff44e4da9c89d82f32e1dfe69364fd5ef5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -0,0 +1,2080 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Request; + +class RequestTest extends TestCase +{ + public function testInitialize() + { + $request = new Request(); + + $request->initialize(array('foo' => 'bar')); + $this->assertEquals('bar', $request->query->get('foo'), '->initialize() takes an array of query parameters as its first argument'); + + $request->initialize(array(), array('foo' => 'bar')); + $this->assertEquals('bar', $request->request->get('foo'), '->initialize() takes an array of request parameters as its second argument'); + + $request->initialize(array(), array(), array('foo' => 'bar')); + $this->assertEquals('bar', $request->attributes->get('foo'), '->initialize() takes an array of attributes as its third argument'); + + $request->initialize(array(), array(), array(), array(), array(), array('HTTP_FOO' => 'bar')); + $this->assertEquals('bar', $request->headers->get('FOO'), '->initialize() takes an array of HTTP headers as its sixth argument'); + } + + public function testGetLocale() + { + $request = new Request(); + $request->setLocale('pl'); + $locale = $request->getLocale(); + $this->assertEquals('pl', $locale); + } + + public function testGetUser() + { + $request = Request::create('http://user_test:password_test@test.com/'); + $user = $request->getUser(); + + $this->assertEquals('user_test', $user); + } + + public function testGetPassword() + { + $request = Request::create('http://user_test:password_test@test.com/'); + $password = $request->getPassword(); + + $this->assertEquals('password_test', $password); + } + + public function testIsNoCache() + { + $request = new Request(); + $isNoCache = $request->isNoCache(); + + $this->assertFalse($isNoCache); + } + + public function testGetContentType() + { + $request = new Request(); + $contentType = $request->getContentType(); + + $this->assertNull($contentType); + } + + public function testSetDefaultLocale() + { + $request = new Request(); + $request->setDefaultLocale('pl'); + $locale = $request->getLocale(); + + $this->assertEquals('pl', $locale); + } + + public function testCreate() + { + $request = Request::create('http://test.com/foo?bar=baz'); + $this->assertEquals('http://test.com/foo?bar=baz', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('bar=baz', $request->getQueryString()); + $this->assertEquals(80, $request->getPort()); + $this->assertEquals('test.com', $request->getHttpHost()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('http://test.com/foo', 'GET', array('bar' => 'baz')); + $this->assertEquals('http://test.com/foo?bar=baz', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('bar=baz', $request->getQueryString()); + $this->assertEquals(80, $request->getPort()); + $this->assertEquals('test.com', $request->getHttpHost()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('http://test.com/foo?bar=foo', 'GET', array('bar' => 'baz')); + $this->assertEquals('http://test.com/foo?bar=baz', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('bar=baz', $request->getQueryString()); + $this->assertEquals(80, $request->getPort()); + $this->assertEquals('test.com', $request->getHttpHost()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('https://test.com/foo?bar=baz'); + $this->assertEquals('https://test.com/foo?bar=baz', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('bar=baz', $request->getQueryString()); + $this->assertEquals(443, $request->getPort()); + $this->assertEquals('test.com', $request->getHttpHost()); + $this->assertTrue($request->isSecure()); + + $request = Request::create('test.com:90/foo'); + $this->assertEquals('http://test.com:90/foo', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('test.com', $request->getHost()); + $this->assertEquals('test.com:90', $request->getHttpHost()); + $this->assertEquals(90, $request->getPort()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('https://test.com:90/foo'); + $this->assertEquals('https://test.com:90/foo', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('test.com', $request->getHost()); + $this->assertEquals('test.com:90', $request->getHttpHost()); + $this->assertEquals(90, $request->getPort()); + $this->assertTrue($request->isSecure()); + + $request = Request::create('https://127.0.0.1:90/foo'); + $this->assertEquals('https://127.0.0.1:90/foo', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('127.0.0.1', $request->getHost()); + $this->assertEquals('127.0.0.1:90', $request->getHttpHost()); + $this->assertEquals(90, $request->getPort()); + $this->assertTrue($request->isSecure()); + + $request = Request::create('https://[::1]:90/foo'); + $this->assertEquals('https://[::1]:90/foo', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('[::1]', $request->getHost()); + $this->assertEquals('[::1]:90', $request->getHttpHost()); + $this->assertEquals(90, $request->getPort()); + $this->assertTrue($request->isSecure()); + + $request = Request::create('https://[::1]/foo'); + $this->assertEquals('https://[::1]/foo', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('[::1]', $request->getHost()); + $this->assertEquals('[::1]', $request->getHttpHost()); + $this->assertEquals(443, $request->getPort()); + $this->assertTrue($request->isSecure()); + + $json = '{"jsonrpc":"2.0","method":"echo","id":7,"params":["Hello World"]}'; + $request = Request::create('http://example.com/jsonrpc', 'POST', array(), array(), array(), array(), $json); + $this->assertEquals($json, $request->getContent()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('http://test.com'); + $this->assertEquals('http://test.com/', $request->getUri()); + $this->assertEquals('/', $request->getPathInfo()); + $this->assertEquals('', $request->getQueryString()); + $this->assertEquals(80, $request->getPort()); + $this->assertEquals('test.com', $request->getHttpHost()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('http://test.com?test=1'); + $this->assertEquals('http://test.com/?test=1', $request->getUri()); + $this->assertEquals('/', $request->getPathInfo()); + $this->assertEquals('test=1', $request->getQueryString()); + $this->assertEquals(80, $request->getPort()); + $this->assertEquals('test.com', $request->getHttpHost()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('http://test.com:90/?test=1'); + $this->assertEquals('http://test.com:90/?test=1', $request->getUri()); + $this->assertEquals('/', $request->getPathInfo()); + $this->assertEquals('test=1', $request->getQueryString()); + $this->assertEquals(90, $request->getPort()); + $this->assertEquals('test.com:90', $request->getHttpHost()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('http://username:password@test.com'); + $this->assertEquals('http://test.com/', $request->getUri()); + $this->assertEquals('/', $request->getPathInfo()); + $this->assertEquals('', $request->getQueryString()); + $this->assertEquals(80, $request->getPort()); + $this->assertEquals('test.com', $request->getHttpHost()); + $this->assertEquals('username', $request->getUser()); + $this->assertEquals('password', $request->getPassword()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('http://username@test.com'); + $this->assertEquals('http://test.com/', $request->getUri()); + $this->assertEquals('/', $request->getPathInfo()); + $this->assertEquals('', $request->getQueryString()); + $this->assertEquals(80, $request->getPort()); + $this->assertEquals('test.com', $request->getHttpHost()); + $this->assertEquals('username', $request->getUser()); + $this->assertSame('', $request->getPassword()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('http://test.com/?foo'); + $this->assertEquals('/?foo', $request->getRequestUri()); + $this->assertEquals(array('foo' => ''), $request->query->all()); + + // assume rewrite rule: (.*) --> app/app.php; app/ is a symlink to a symfony web/ directory + $request = Request::create('http://test.com/apparthotel-1234', 'GET', array(), array(), array(), + array( + 'DOCUMENT_ROOT' => '/var/www/www.test.com', + 'SCRIPT_FILENAME' => '/var/www/www.test.com/app/app.php', + 'SCRIPT_NAME' => '/app/app.php', + 'PHP_SELF' => '/app/app.php/apparthotel-1234', + )); + $this->assertEquals('http://test.com/apparthotel-1234', $request->getUri()); + $this->assertEquals('/apparthotel-1234', $request->getPathInfo()); + $this->assertEquals('', $request->getQueryString()); + $this->assertEquals(80, $request->getPort()); + $this->assertEquals('test.com', $request->getHttpHost()); + $this->assertFalse($request->isSecure()); + } + + public function testCreateCheckPrecedence() + { + // server is used by default + $request = Request::create('/', 'DELETE', array(), array(), array(), array( + 'HTTP_HOST' => 'example.com', + 'HTTPS' => 'on', + 'SERVER_PORT' => 443, + 'PHP_AUTH_USER' => 'fabien', + 'PHP_AUTH_PW' => 'pa$$', + 'QUERY_STRING' => 'foo=bar', + 'CONTENT_TYPE' => 'application/json', + )); + $this->assertEquals('example.com', $request->getHost()); + $this->assertEquals(443, $request->getPort()); + $this->assertTrue($request->isSecure()); + $this->assertEquals('fabien', $request->getUser()); + $this->assertEquals('pa$$', $request->getPassword()); + $this->assertEquals('', $request->getQueryString()); + $this->assertEquals('application/json', $request->headers->get('CONTENT_TYPE')); + + // URI has precedence over server + $request = Request::create('http://thomas:pokemon@example.net:8080/?foo=bar', 'GET', array(), array(), array(), array( + 'HTTP_HOST' => 'example.com', + 'HTTPS' => 'on', + 'SERVER_PORT' => 443, + )); + $this->assertEquals('example.net', $request->getHost()); + $this->assertEquals(8080, $request->getPort()); + $this->assertFalse($request->isSecure()); + $this->assertEquals('thomas', $request->getUser()); + $this->assertEquals('pokemon', $request->getPassword()); + $this->assertEquals('foo=bar', $request->getQueryString()); + } + + public function testDuplicate() + { + $request = new Request(array('foo' => 'bar'), array('foo' => 'bar'), array('foo' => 'bar'), array(), array(), array('HTTP_FOO' => 'bar')); + $dup = $request->duplicate(); + + $this->assertEquals($request->query->all(), $dup->query->all(), '->duplicate() duplicates a request an copy the current query parameters'); + $this->assertEquals($request->request->all(), $dup->request->all(), '->duplicate() duplicates a request an copy the current request parameters'); + $this->assertEquals($request->attributes->all(), $dup->attributes->all(), '->duplicate() duplicates a request an copy the current attributes'); + $this->assertEquals($request->headers->all(), $dup->headers->all(), '->duplicate() duplicates a request an copy the current HTTP headers'); + + $dup = $request->duplicate(array('foo' => 'foobar'), array('foo' => 'foobar'), array('foo' => 'foobar'), array(), array(), array('HTTP_FOO' => 'foobar')); + + $this->assertEquals(array('foo' => 'foobar'), $dup->query->all(), '->duplicate() overrides the query parameters if provided'); + $this->assertEquals(array('foo' => 'foobar'), $dup->request->all(), '->duplicate() overrides the request parameters if provided'); + $this->assertEquals(array('foo' => 'foobar'), $dup->attributes->all(), '->duplicate() overrides the attributes if provided'); + $this->assertEquals(array('foo' => array('foobar')), $dup->headers->all(), '->duplicate() overrides the HTTP header if provided'); + } + + public function testDuplicateWithFormat() + { + $request = new Request(array(), array(), array('_format' => 'json')); + $dup = $request->duplicate(); + + $this->assertEquals('json', $dup->getRequestFormat()); + $this->assertEquals('json', $dup->attributes->get('_format')); + + $request = new Request(); + $request->setRequestFormat('xml'); + $dup = $request->duplicate(); + + $this->assertEquals('xml', $dup->getRequestFormat()); + } + + /** + * @dataProvider getFormatToMimeTypeMapProvider + */ + public function testGetFormatFromMimeType($format, $mimeTypes) + { + $request = new Request(); + foreach ($mimeTypes as $mime) { + $this->assertEquals($format, $request->getFormat($mime)); + } + $request->setFormat($format, $mimeTypes); + foreach ($mimeTypes as $mime) { + $this->assertEquals($format, $request->getFormat($mime)); + } + } + + public function testGetFormatFromMimeTypeWithParameters() + { + $request = new Request(); + $this->assertEquals('json', $request->getFormat('application/json; charset=utf-8')); + } + + /** + * @dataProvider getFormatToMimeTypeMapProvider + */ + public function testGetMimeTypeFromFormat($format, $mimeTypes) + { + if (null !== $format) { + $request = new Request(); + $this->assertEquals($mimeTypes[0], $request->getMimeType($format)); + } + } + + /** + * @dataProvider getFormatToMimeTypeMapProvider + */ + public function testGetMimeTypesFromFormat($format, $mimeTypes) + { + if (null !== $format) { + $this->assertEquals($mimeTypes, Request::getMimeTypes($format)); + } + } + + public function testGetMimeTypesFromInexistentFormat() + { + $request = new Request(); + $this->assertNull($request->getMimeType('foo')); + $this->assertEquals(array(), Request::getMimeTypes('foo')); + } + + public function testGetFormatWithCustomMimeType() + { + $request = new Request(); + $request->setFormat('custom', 'application/vnd.foo.api;myversion=2.3'); + $this->assertEquals('custom', $request->getFormat('application/vnd.foo.api;myversion=2.3')); + } + + public function getFormatToMimeTypeMapProvider() + { + return array( + array(null, array(null, 'unexistent-mime-type')), + array('txt', array('text/plain')), + array('js', array('application/javascript', 'application/x-javascript', 'text/javascript')), + array('css', array('text/css')), + array('json', array('application/json', 'application/x-json')), + array('xml', array('text/xml', 'application/xml', 'application/x-xml')), + array('rdf', array('application/rdf+xml')), + array('atom', array('application/atom+xml')), + ); + } + + public function testGetUri() + { + $server = array(); + + // Standard Request on non default PORT + // http://host:8080/index.php/path/info?query=string + + $server['HTTP_HOST'] = 'host:8080'; + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '8080'; + + $server['QUERY_STRING'] = 'query=string'; + $server['REQUEST_URI'] = '/index.php/path/info?query=string'; + $server['SCRIPT_NAME'] = '/index.php'; + $server['PATH_INFO'] = '/path/info'; + $server['PATH_TRANSLATED'] = 'redirect:/index.php/path/info'; + $server['PHP_SELF'] = '/index_dev.php/path/info'; + $server['SCRIPT_FILENAME'] = '/some/where/index.php'; + + $request = new Request(); + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('http://host:8080/index.php/path/info?query=string', $request->getUri(), '->getUri() with non default port'); + + // Use std port number + $server['HTTP_HOST'] = 'host'; + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '80'; + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('http://host/index.php/path/info?query=string', $request->getUri(), '->getUri() with default port'); + + // Without HOST HEADER + unset($server['HTTP_HOST']); + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '80'; + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('http://servername/index.php/path/info?query=string', $request->getUri(), '->getUri() with default port without HOST_HEADER'); + + // Request with URL REWRITING (hide index.php) + // RewriteCond %{REQUEST_FILENAME} !-f + // RewriteRule ^(.*)$ index.php [QSA,L] + // http://host:8080/path/info?query=string + $server = array(); + $server['HTTP_HOST'] = 'host:8080'; + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '8080'; + + $server['REDIRECT_QUERY_STRING'] = 'query=string'; + $server['REDIRECT_URL'] = '/path/info'; + $server['SCRIPT_NAME'] = '/index.php'; + $server['QUERY_STRING'] = 'query=string'; + $server['REQUEST_URI'] = '/path/info?toto=test&1=1'; + $server['SCRIPT_NAME'] = '/index.php'; + $server['PHP_SELF'] = '/index.php'; + $server['SCRIPT_FILENAME'] = '/some/where/index.php'; + + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('http://host:8080/path/info?query=string', $request->getUri(), '->getUri() with rewrite'); + + // Use std port number + // http://host/path/info?query=string + $server['HTTP_HOST'] = 'host'; + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '80'; + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('http://host/path/info?query=string', $request->getUri(), '->getUri() with rewrite and default port'); + + // Without HOST HEADER + unset($server['HTTP_HOST']); + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '80'; + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('http://servername/path/info?query=string', $request->getUri(), '->getUri() with rewrite, default port without HOST_HEADER'); + + // With encoded characters + + $server = array( + 'HTTP_HOST' => 'host:8080', + 'SERVER_NAME' => 'servername', + 'SERVER_PORT' => '8080', + 'QUERY_STRING' => 'query=string', + 'REQUEST_URI' => '/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', + 'SCRIPT_NAME' => '/ba se/index_dev.php', + 'PATH_TRANSLATED' => 'redirect:/index.php/foo bar/in+fo', + 'PHP_SELF' => '/ba se/index_dev.php/path/info', + 'SCRIPT_FILENAME' => '/some/where/ba se/index_dev.php', + ); + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals( + 'http://host:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', + $request->getUri() + ); + + // with user info + + $server['PHP_AUTH_USER'] = 'fabien'; + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('http://host:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', $request->getUri()); + + $server['PHP_AUTH_PW'] = 'symfony'; + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('http://host:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', $request->getUri()); + } + + public function testGetUriForPath() + { + $request = Request::create('http://test.com/foo?bar=baz'); + $this->assertEquals('http://test.com/some/path', $request->getUriForPath('/some/path')); + + $request = Request::create('http://test.com:90/foo?bar=baz'); + $this->assertEquals('http://test.com:90/some/path', $request->getUriForPath('/some/path')); + + $request = Request::create('https://test.com/foo?bar=baz'); + $this->assertEquals('https://test.com/some/path', $request->getUriForPath('/some/path')); + + $request = Request::create('https://test.com:90/foo?bar=baz'); + $this->assertEquals('https://test.com:90/some/path', $request->getUriForPath('/some/path')); + + $server = array(); + + // Standard Request on non default PORT + // http://host:8080/index.php/path/info?query=string + + $server['HTTP_HOST'] = 'host:8080'; + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '8080'; + + $server['QUERY_STRING'] = 'query=string'; + $server['REQUEST_URI'] = '/index.php/path/info?query=string'; + $server['SCRIPT_NAME'] = '/index.php'; + $server['PATH_INFO'] = '/path/info'; + $server['PATH_TRANSLATED'] = 'redirect:/index.php/path/info'; + $server['PHP_SELF'] = '/index_dev.php/path/info'; + $server['SCRIPT_FILENAME'] = '/some/where/index.php'; + + $request = new Request(); + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('http://host:8080/index.php/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with non default port'); + + // Use std port number + $server['HTTP_HOST'] = 'host'; + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '80'; + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('http://host/index.php/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with default port'); + + // Without HOST HEADER + unset($server['HTTP_HOST']); + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '80'; + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('http://servername/index.php/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with default port without HOST_HEADER'); + + // Request with URL REWRITING (hide index.php) + // RewriteCond %{REQUEST_FILENAME} !-f + // RewriteRule ^(.*)$ index.php [QSA,L] + // http://host:8080/path/info?query=string + $server = array(); + $server['HTTP_HOST'] = 'host:8080'; + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '8080'; + + $server['REDIRECT_QUERY_STRING'] = 'query=string'; + $server['REDIRECT_URL'] = '/path/info'; + $server['SCRIPT_NAME'] = '/index.php'; + $server['QUERY_STRING'] = 'query=string'; + $server['REQUEST_URI'] = '/path/info?toto=test&1=1'; + $server['SCRIPT_NAME'] = '/index.php'; + $server['PHP_SELF'] = '/index.php'; + $server['SCRIPT_FILENAME'] = '/some/where/index.php'; + + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('http://host:8080/some/path', $request->getUriForPath('/some/path'), '->getUri() with rewrite'); + + // Use std port number + // http://host/path/info?query=string + $server['HTTP_HOST'] = 'host'; + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '80'; + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('http://host/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with rewrite and default port'); + + // Without HOST HEADER + unset($server['HTTP_HOST']); + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '80'; + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('http://servername/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with rewrite, default port without HOST_HEADER'); + $this->assertEquals('servername', $request->getHttpHost()); + + // with user info + + $server['PHP_AUTH_USER'] = 'fabien'; + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('http://servername/some/path', $request->getUriForPath('/some/path')); + + $server['PHP_AUTH_PW'] = 'symfony'; + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('http://servername/some/path', $request->getUriForPath('/some/path')); + } + + /** + * @dataProvider getRelativeUriForPathData() + */ + public function testGetRelativeUriForPath($expected, $pathinfo, $path) + { + $this->assertEquals($expected, Request::create($pathinfo)->getRelativeUriForPath($path)); + } + + public function getRelativeUriForPathData() + { + return array( + array('me.png', '/foo', '/me.png'), + array('../me.png', '/foo/bar', '/me.png'), + array('me.png', '/foo/bar', '/foo/me.png'), + array('../baz/me.png', '/foo/bar/b', '/foo/baz/me.png'), + array('../../fooz/baz/me.png', '/foo/bar/b', '/fooz/baz/me.png'), + array('baz/me.png', '/foo/bar/b', 'baz/me.png'), + ); + } + + public function testGetUserInfo() + { + $request = new Request(); + + $server = array('PHP_AUTH_USER' => 'fabien'); + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('fabien', $request->getUserInfo()); + + $server['PHP_AUTH_USER'] = '0'; + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('0', $request->getUserInfo()); + + $server['PHP_AUTH_PW'] = '0'; + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('0:0', $request->getUserInfo()); + } + + public function testGetSchemeAndHttpHost() + { + $request = new Request(); + + $server = array(); + $server['SERVER_NAME'] = 'servername'; + $server['SERVER_PORT'] = '90'; + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost()); + + $server['PHP_AUTH_USER'] = 'fabien'; + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost()); + + $server['PHP_AUTH_USER'] = '0'; + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost()); + + $server['PHP_AUTH_PW'] = '0'; + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost()); + } + + /** + * @dataProvider getQueryStringNormalizationData + */ + public function testGetQueryString($query, $expectedQuery, $msg) + { + $request = new Request(); + + $request->server->set('QUERY_STRING', $query); + $this->assertSame($expectedQuery, $request->getQueryString(), $msg); + } + + public function getQueryStringNormalizationData() + { + return array( + array('foo', 'foo', 'works with valueless parameters'), + array('foo=', 'foo=', 'includes a dangling equal sign'), + array('bar=&foo=bar', 'bar=&foo=bar', '->works with empty parameters'), + array('foo=bar&bar=', 'bar=&foo=bar', 'sorts keys alphabetically'), + + // GET parameters, that are submitted from a HTML form, encode spaces as "+" by default (as defined in enctype application/x-www-form-urlencoded). + // PHP also converts "+" to spaces when filling the global _GET or when using the function parse_str. + array('him=John%20Doe&her=Jane+Doe', 'her=Jane%20Doe&him=John%20Doe', 'normalizes spaces in both encodings "%20" and "+"'), + + array('foo[]=1&foo[]=2', 'foo%5B%5D=1&foo%5B%5D=2', 'allows array notation'), + array('foo=1&foo=2', 'foo=1&foo=2', 'allows repeated parameters'), + array('pa%3Dram=foo%26bar%3Dbaz&test=test', 'pa%3Dram=foo%26bar%3Dbaz&test=test', 'works with encoded delimiters'), + array('0', '0', 'allows "0"'), + array('Jane Doe&John%20Doe', 'Jane%20Doe&John%20Doe', 'normalizes encoding in keys'), + array('her=Jane Doe&him=John%20Doe', 'her=Jane%20Doe&him=John%20Doe', 'normalizes encoding in values'), + array('foo=bar&&&test&&', 'foo=bar&test', 'removes unneeded delimiters'), + array('formula=e=m*c^2', 'formula=e%3Dm%2Ac%5E2', 'correctly treats only the first "=" as delimiter and the next as value'), + + // Ignore pairs with empty key, even if there was a value, e.g. "=value", as such nameless values cannot be retrieved anyway. + // PHP also does not include them when building _GET. + array('foo=bar&=a=b&=x=y', 'foo=bar', 'removes params with empty key'), + ); + } + + public function testGetQueryStringReturnsNull() + { + $request = new Request(); + + $this->assertNull($request->getQueryString(), '->getQueryString() returns null for non-existent query string'); + + $request->server->set('QUERY_STRING', ''); + $this->assertNull($request->getQueryString(), '->getQueryString() returns null for empty query string'); + } + + public function testGetHost() + { + $request = new Request(); + + $request->initialize(array('foo' => 'bar')); + $this->assertEquals('', $request->getHost(), '->getHost() return empty string if not initialized'); + + $request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.example.com')); + $this->assertEquals('www.example.com', $request->getHost(), '->getHost() from Host Header'); + + // Host header with port number + $request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.example.com:8080')); + $this->assertEquals('www.example.com', $request->getHost(), '->getHost() from Host Header with port number'); + + // Server values + $request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.example.com')); + $this->assertEquals('www.example.com', $request->getHost(), '->getHost() from server name'); + + $request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.example.com', 'HTTP_HOST' => 'www.host.com')); + $this->assertEquals('www.host.com', $request->getHost(), '->getHost() value from Host header has priority over SERVER_NAME '); + } + + public function testGetPort() + { + $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + 'HTTP_X_FORWARDED_PROTO' => 'https', + 'HTTP_X_FORWARDED_PORT' => '443', + )); + $port = $request->getPort(); + + $this->assertEquals(80, $port, 'Without trusted proxies FORWARDED_PROTO and FORWARDED_PORT are ignored.'); + + Request::setTrustedProxies(array('1.1.1.1')); + $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + 'HTTP_X_FORWARDED_PROTO' => 'https', + 'HTTP_X_FORWARDED_PORT' => '8443', + )); + $this->assertEquals(80, $request->getPort(), 'With PROTO and PORT on untrusted connection server value takes precedence.'); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $this->assertEquals(8443, $request->getPort(), 'With PROTO and PORT set PORT takes precedence.'); + + $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + 'HTTP_X_FORWARDED_PROTO' => 'https', + )); + $this->assertEquals(80, $request->getPort(), 'With only PROTO set getPort() ignores trusted headers on untrusted connection.'); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $this->assertEquals(443, $request->getPort(), 'With only PROTO set getPort() defaults to 443.'); + + $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + 'HTTP_X_FORWARDED_PROTO' => 'http', + )); + $this->assertEquals(80, $request->getPort(), 'If X_FORWARDED_PROTO is set to HTTP getPort() ignores trusted headers on untrusted connection.'); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $this->assertEquals(80, $request->getPort(), 'If X_FORWARDED_PROTO is set to HTTP getPort() returns port of the original request.'); + + $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + 'HTTP_X_FORWARDED_PROTO' => 'On', + )); + $this->assertEquals(80, $request->getPort(), 'With only PROTO set and value is On, getPort() ignores trusted headers on untrusted connection.'); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $this->assertEquals(443, $request->getPort(), 'With only PROTO set and value is On, getPort() defaults to 443.'); + + $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + 'HTTP_X_FORWARDED_PROTO' => '1', + )); + $this->assertEquals(80, $request->getPort(), 'With only PROTO set and value is 1, getPort() ignores trusted headers on untrusted connection.'); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $this->assertEquals(443, $request->getPort(), 'With only PROTO set and value is 1, getPort() defaults to 443.'); + + $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + 'HTTP_X_FORWARDED_PROTO' => 'something-else', + )); + $port = $request->getPort(); + $this->assertEquals(80, $port, 'With only PROTO set and value is not recognized, getPort() defaults to 80.'); + + Request::setTrustedProxies(array()); + } + + /** + * @expectedException \RuntimeException + */ + public function testGetHostWithFakeHttpHostValue() + { + $request = new Request(); + $request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.host.com?query=string')); + $request->getHost(); + } + + public function testGetSetMethod() + { + $request = new Request(); + + $this->assertEquals('GET', $request->getMethod(), '->getMethod() returns GET if no method is defined'); + + $request->setMethod('get'); + $this->assertEquals('GET', $request->getMethod(), '->getMethod() returns an uppercased string'); + + $request->setMethod('PURGE'); + $this->assertEquals('PURGE', $request->getMethod(), '->getMethod() returns the method even if it is not a standard one'); + + $request->setMethod('POST'); + $this->assertEquals('POST', $request->getMethod(), '->getMethod() returns the method POST if no _method is defined'); + + $request->setMethod('POST'); + $request->request->set('_method', 'purge'); + $this->assertEquals('POST', $request->getMethod(), '->getMethod() does not return the method from _method if defined and POST but support not enabled'); + + $request = new Request(); + $request->setMethod('POST'); + $request->request->set('_method', 'purge'); + + $this->assertFalse(Request::getHttpMethodParameterOverride(), 'httpMethodParameterOverride should be disabled by default'); + + Request::enableHttpMethodParameterOverride(); + + $this->assertTrue(Request::getHttpMethodParameterOverride(), 'httpMethodParameterOverride should be enabled now but it is not'); + + $this->assertEquals('PURGE', $request->getMethod(), '->getMethod() returns the method from _method if defined and POST'); + $this->disableHttpMethodParameterOverride(); + + $request = new Request(); + $request->setMethod('POST'); + $request->query->set('_method', 'purge'); + $this->assertEquals('POST', $request->getMethod(), '->getMethod() does not return the method from _method if defined and POST but support not enabled'); + + $request = new Request(); + $request->setMethod('POST'); + $request->query->set('_method', 'purge'); + Request::enableHttpMethodParameterOverride(); + $this->assertEquals('PURGE', $request->getMethod(), '->getMethod() returns the method from _method if defined and POST'); + $this->disableHttpMethodParameterOverride(); + + $request = new Request(); + $request->setMethod('POST'); + $request->headers->set('X-HTTP-METHOD-OVERRIDE', 'delete'); + $this->assertEquals('DELETE', $request->getMethod(), '->getMethod() returns the method from X-HTTP-Method-Override even though _method is set if defined and POST'); + + $request = new Request(); + $request->setMethod('POST'); + $request->headers->set('X-HTTP-METHOD-OVERRIDE', 'delete'); + $this->assertEquals('DELETE', $request->getMethod(), '->getMethod() returns the method from X-HTTP-Method-Override if defined and POST'); + } + + /** + * @dataProvider testGetClientIpsProvider + */ + public function testGetClientIp($expected, $remoteAddr, $httpForwardedFor, $trustedProxies) + { + $request = $this->getRequestInstanceForClientIpTests($remoteAddr, $httpForwardedFor, $trustedProxies); + + $this->assertEquals($expected[0], $request->getClientIp()); + + Request::setTrustedProxies(array()); + } + + /** + * @dataProvider testGetClientIpsProvider + */ + public function testGetClientIps($expected, $remoteAddr, $httpForwardedFor, $trustedProxies) + { + $request = $this->getRequestInstanceForClientIpTests($remoteAddr, $httpForwardedFor, $trustedProxies); + + $this->assertEquals($expected, $request->getClientIps()); + + Request::setTrustedProxies(array()); + } + + /** + * @dataProvider testGetClientIpsForwardedProvider + */ + public function testGetClientIpsForwarded($expected, $remoteAddr, $httpForwarded, $trustedProxies) + { + $request = $this->getRequestInstanceForClientIpsForwardedTests($remoteAddr, $httpForwarded, $trustedProxies); + + $this->assertEquals($expected, $request->getClientIps()); + + Request::setTrustedProxies(array()); + } + + public function testGetClientIpsForwardedProvider() + { + // $expected $remoteAddr $httpForwarded $trustedProxies + return array( + array(array('127.0.0.1'), '127.0.0.1', 'for="_gazonk"', null), + array(array('127.0.0.1'), '127.0.0.1', 'for="_gazonk"', array('127.0.0.1')), + array(array('88.88.88.88'), '127.0.0.1', 'for="88.88.88.88:80"', array('127.0.0.1')), + array(array('192.0.2.60'), '::1', 'for=192.0.2.60;proto=http;by=203.0.113.43', array('::1')), + array(array('2620:0:1cfe:face:b00c::3', '192.0.2.43'), '::1', 'for=192.0.2.43, for=2620:0:1cfe:face:b00c::3', array('::1')), + array(array('2001:db8:cafe::17'), '::1', 'for="[2001:db8:cafe::17]:4711', array('::1')), + ); + } + + public function testGetClientIpsProvider() + { + // $expected $remoteAddr $httpForwardedFor $trustedProxies + return array( + // simple IPv4 + array(array('88.88.88.88'), '88.88.88.88', null, null), + // trust the IPv4 remote addr + array(array('88.88.88.88'), '88.88.88.88', null, array('88.88.88.88')), + + // simple IPv6 + array(array('::1'), '::1', null, null), + // trust the IPv6 remote addr + array(array('::1'), '::1', null, array('::1')), + + // forwarded for with remote IPv4 addr not trusted + array(array('127.0.0.1'), '127.0.0.1', '88.88.88.88', null), + // forwarded for with remote IPv4 addr trusted + array(array('88.88.88.88'), '127.0.0.1', '88.88.88.88', array('127.0.0.1')), + // forwarded for with remote IPv4 and all FF addrs trusted + array(array('88.88.88.88'), '127.0.0.1', '88.88.88.88', array('127.0.0.1', '88.88.88.88')), + // forwarded for with remote IPv4 range trusted + array(array('88.88.88.88'), '123.45.67.89', '88.88.88.88', array('123.45.67.0/24')), + + // forwarded for with remote IPv6 addr not trusted + array(array('1620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3', null), + // forwarded for with remote IPv6 addr trusted + array(array('2620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3', array('1620:0:1cfe:face:b00c::3')), + // forwarded for with remote IPv6 range trusted + array(array('88.88.88.88'), '2a01:198:603:0:396e:4789:8e99:890f', '88.88.88.88', array('2a01:198:603:0::/65')), + + // multiple forwarded for with remote IPv4 addr trusted + array(array('88.88.88.88', '87.65.43.21', '127.0.0.1'), '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', array('123.45.67.89')), + // multiple forwarded for with remote IPv4 addr and some reverse proxies trusted + array(array('87.65.43.21', '127.0.0.1'), '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', array('123.45.67.89', '88.88.88.88')), + // multiple forwarded for with remote IPv4 addr and some reverse proxies trusted but in the middle + array(array('88.88.88.88', '127.0.0.1'), '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', array('123.45.67.89', '87.65.43.21')), + // multiple forwarded for with remote IPv4 addr and all reverse proxies trusted + array(array('127.0.0.1'), '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', array('123.45.67.89', '87.65.43.21', '88.88.88.88', '127.0.0.1')), + + // multiple forwarded for with remote IPv6 addr trusted + array(array('2620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', array('1620:0:1cfe:face:b00c::3')), + // multiple forwarded for with remote IPv6 addr and some reverse proxies trusted + array(array('3620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', array('1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3')), + // multiple forwarded for with remote IPv4 addr and some reverse proxies trusted but in the middle + array(array('2620:0:1cfe:face:b00c::3', '4620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '4620:0:1cfe:face:b00c::3,3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', array('1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3')), + + // client IP with port + array(array('88.88.88.88'), '127.0.0.1', '88.88.88.88:12345, 127.0.0.1', array('127.0.0.1')), + + // invalid forwarded IP is ignored + array(array('88.88.88.88'), '127.0.0.1', 'unknown,88.88.88.88', array('127.0.0.1')), + array(array('88.88.88.88'), '127.0.0.1', '}__test|O:21:"JDatabaseDriverMysqli":3:{s:2,88.88.88.88', array('127.0.0.1')), + ); + } + + /** + * @expectedException \Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException + * @dataProvider testGetClientIpsWithConflictingHeadersProvider + */ + public function testGetClientIpsWithConflictingHeaders($httpForwarded, $httpXForwardedFor) + { + $request = new Request(); + + $server = array( + 'REMOTE_ADDR' => '88.88.88.88', + 'HTTP_FORWARDED' => $httpForwarded, + 'HTTP_X_FORWARDED_FOR' => $httpXForwardedFor, + ); + + Request::setTrustedProxies(array('88.88.88.88')); + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $request->getClientIps(); + } + + public function testGetClientIpsWithConflictingHeadersProvider() + { + // $httpForwarded $httpXForwardedFor + return array( + array('for=87.65.43.21', '192.0.2.60'), + array('for=87.65.43.21, for=192.0.2.60', '192.0.2.60'), + array('for=192.0.2.60', '192.0.2.60,87.65.43.21'), + array('for="::face", for=192.0.2.60', '192.0.2.60,192.0.2.43'), + array('for=87.65.43.21, for=192.0.2.60', '192.0.2.60,87.65.43.21'), + ); + } + + /** + * @dataProvider testGetClientIpsWithAgreeingHeadersProvider + */ + public function testGetClientIpsWithAgreeingHeaders($httpForwarded, $httpXForwardedFor) + { + $request = new Request(); + + $server = array( + 'REMOTE_ADDR' => '88.88.88.88', + 'HTTP_FORWARDED' => $httpForwarded, + 'HTTP_X_FORWARDED_FOR' => $httpXForwardedFor, + ); + + Request::setTrustedProxies(array('88.88.88.88')); + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $request->getClientIps(); + + Request::setTrustedProxies(array()); + } + + public function testGetClientIpsWithAgreeingHeadersProvider() + { + // $httpForwarded $httpXForwardedFor + return array( + array('for="192.0.2.60"', '192.0.2.60'), + array('for=192.0.2.60, for=87.65.43.21', '192.0.2.60,87.65.43.21'), + array('for="[::face]", for=192.0.2.60', '::face,192.0.2.60'), + array('for="192.0.2.60:80"', '192.0.2.60'), + array('for=192.0.2.60;proto=http;by=203.0.113.43', '192.0.2.60'), + array('for="[2001:db8:cafe::17]:4711"', '2001:db8:cafe::17'), + ); + } + + public function testGetContentWorksTwiceInDefaultMode() + { + $req = new Request(); + $this->assertEquals('', $req->getContent()); + $this->assertEquals('', $req->getContent()); + } + + public function testGetContentReturnsResource() + { + $req = new Request(); + $retval = $req->getContent(true); + $this->assertInternalType('resource', $retval); + $this->assertEquals('', fread($retval, 1)); + $this->assertTrue(feof($retval)); + } + + public function testGetContentReturnsResourceWhenContentSetInConstructor() + { + $req = new Request(array(), array(), array(), array(), array(), array(), 'MyContent'); + $resource = $req->getContent(true); + + $this->assertTrue(is_resource($resource)); + $this->assertEquals('MyContent', stream_get_contents($resource)); + } + + public function testContentAsResource() + { + $resource = fopen('php://memory', 'r+'); + fwrite($resource, 'My other content'); + rewind($resource); + + $req = new Request(array(), array(), array(), array(), array(), array(), $resource); + $this->assertEquals('My other content', stream_get_contents($req->getContent(true))); + $this->assertEquals('My other content', $req->getContent()); + } + + /** + * @expectedException \LogicException + * @dataProvider getContentCantBeCalledTwiceWithResourcesProvider + */ + public function testGetContentCantBeCalledTwiceWithResources($first, $second) + { + if (PHP_VERSION_ID >= 50600) { + $this->markTestSkipped('PHP >= 5.6 allows to open php://input several times.'); + } + + $req = new Request(); + $req->getContent($first); + $req->getContent($second); + } + + public function getContentCantBeCalledTwiceWithResourcesProvider() + { + return array( + 'Resource then fetch' => array(true, false), + 'Resource then resource' => array(true, true), + ); + } + + /** + * @dataProvider getContentCanBeCalledTwiceWithResourcesProvider + * @requires PHP 5.6 + */ + public function testGetContentCanBeCalledTwiceWithResources($first, $second) + { + $req = new Request(); + $a = $req->getContent($first); + $b = $req->getContent($second); + + if ($first) { + $a = stream_get_contents($a); + } + + if ($second) { + $b = stream_get_contents($b); + } + + $this->assertSame($a, $b); + } + + public function getContentCanBeCalledTwiceWithResourcesProvider() + { + return array( + 'Fetch then fetch' => array(false, false), + 'Fetch then resource' => array(false, true), + 'Resource then fetch' => array(true, false), + 'Resource then resource' => array(true, true), + ); + } + + public function provideOverloadedMethods() + { + return array( + array('PUT'), + array('DELETE'), + array('PATCH'), + array('put'), + array('delete'), + array('patch'), + ); + } + + /** + * @dataProvider provideOverloadedMethods + */ + public function testCreateFromGlobals($method) + { + $normalizedMethod = strtoupper($method); + + $_GET['foo1'] = 'bar1'; + $_POST['foo2'] = 'bar2'; + $_COOKIE['foo3'] = 'bar3'; + $_FILES['foo4'] = array('bar4'); + $_SERVER['foo5'] = 'bar5'; + + $request = Request::createFromGlobals(); + $this->assertEquals('bar1', $request->query->get('foo1'), '::fromGlobals() uses values from $_GET'); + $this->assertEquals('bar2', $request->request->get('foo2'), '::fromGlobals() uses values from $_POST'); + $this->assertEquals('bar3', $request->cookies->get('foo3'), '::fromGlobals() uses values from $_COOKIE'); + $this->assertEquals(array('bar4'), $request->files->get('foo4'), '::fromGlobals() uses values from $_FILES'); + $this->assertEquals('bar5', $request->server->get('foo5'), '::fromGlobals() uses values from $_SERVER'); + + unset($_GET['foo1'], $_POST['foo2'], $_COOKIE['foo3'], $_FILES['foo4'], $_SERVER['foo5']); + + $_SERVER['REQUEST_METHOD'] = $method; + $_SERVER['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; + $request = RequestContentProxy::createFromGlobals(); + $this->assertEquals($normalizedMethod, $request->getMethod()); + $this->assertEquals('mycontent', $request->request->get('content')); + + unset($_SERVER['REQUEST_METHOD'], $_SERVER['CONTENT_TYPE']); + + Request::createFromGlobals(); + Request::enableHttpMethodParameterOverride(); + $_POST['_method'] = $method; + $_POST['foo6'] = 'bar6'; + $_SERVER['REQUEST_METHOD'] = 'PoSt'; + $request = Request::createFromGlobals(); + $this->assertEquals($normalizedMethod, $request->getMethod()); + $this->assertEquals('POST', $request->getRealMethod()); + $this->assertEquals('bar6', $request->request->get('foo6')); + + unset($_POST['_method'], $_POST['foo6'], $_SERVER['REQUEST_METHOD']); + $this->disableHttpMethodParameterOverride(); + } + + public function testOverrideGlobals() + { + $request = new Request(); + $request->initialize(array('foo' => 'bar')); + + // as the Request::overrideGlobals really work, it erase $_SERVER, so we must backup it + $server = $_SERVER; + + $request->overrideGlobals(); + + $this->assertEquals(array('foo' => 'bar'), $_GET); + + $request->initialize(array(), array('foo' => 'bar')); + $request->overrideGlobals(); + + $this->assertEquals(array('foo' => 'bar'), $_POST); + + $this->assertArrayNotHasKey('HTTP_X_FORWARDED_PROTO', $_SERVER); + + $request->headers->set('X_FORWARDED_PROTO', 'https'); + + Request::setTrustedProxies(array('1.1.1.1')); + $this->assertFalse($request->isSecure()); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $this->assertTrue($request->isSecure()); + Request::setTrustedProxies(array()); + + $request->overrideGlobals(); + + $this->assertArrayHasKey('HTTP_X_FORWARDED_PROTO', $_SERVER); + + $request->headers->set('CONTENT_TYPE', 'multipart/form-data'); + $request->headers->set('CONTENT_LENGTH', 12345); + + $request->overrideGlobals(); + + $this->assertArrayHasKey('CONTENT_TYPE', $_SERVER); + $this->assertArrayHasKey('CONTENT_LENGTH', $_SERVER); + + $request->initialize(array('foo' => 'bar', 'baz' => 'foo')); + $request->query->remove('baz'); + + $request->overrideGlobals(); + + $this->assertEquals(array('foo' => 'bar'), $_GET); + $this->assertEquals('foo=bar', $_SERVER['QUERY_STRING']); + $this->assertEquals('foo=bar', $request->server->get('QUERY_STRING')); + + // restore initial $_SERVER array + $_SERVER = $server; + } + + public function testGetScriptName() + { + $request = new Request(); + $this->assertEquals('', $request->getScriptName()); + + $server = array(); + $server['SCRIPT_NAME'] = '/index.php'; + + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('/index.php', $request->getScriptName()); + + $server = array(); + $server['ORIG_SCRIPT_NAME'] = '/frontend.php'; + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('/frontend.php', $request->getScriptName()); + + $server = array(); + $server['SCRIPT_NAME'] = '/index.php'; + $server['ORIG_SCRIPT_NAME'] = '/frontend.php'; + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('/index.php', $request->getScriptName()); + } + + public function testGetBasePath() + { + $request = new Request(); + $this->assertEquals('', $request->getBasePath()); + + $server = array(); + $server['SCRIPT_FILENAME'] = '/some/where/index.php'; + $request->initialize(array(), array(), array(), array(), array(), $server); + $this->assertEquals('', $request->getBasePath()); + + $server = array(); + $server['SCRIPT_FILENAME'] = '/some/where/index.php'; + $server['SCRIPT_NAME'] = '/index.php'; + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('', $request->getBasePath()); + + $server = array(); + $server['SCRIPT_FILENAME'] = '/some/where/index.php'; + $server['PHP_SELF'] = '/index.php'; + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('', $request->getBasePath()); + + $server = array(); + $server['SCRIPT_FILENAME'] = '/some/where/index.php'; + $server['ORIG_SCRIPT_NAME'] = '/index.php'; + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('', $request->getBasePath()); + } + + public function testGetPathInfo() + { + $request = new Request(); + $this->assertEquals('/', $request->getPathInfo()); + + $server = array(); + $server['REQUEST_URI'] = '/path/info'; + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('/path/info', $request->getPathInfo()); + + $server = array(); + $server['REQUEST_URI'] = '/path%20test/info'; + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('/path%20test/info', $request->getPathInfo()); + } + + public function testGetParameterPrecedence() + { + $request = new Request(); + $request->attributes->set('foo', 'attr'); + $request->query->set('foo', 'query'); + $request->request->set('foo', 'body'); + + $this->assertSame('attr', $request->get('foo')); + + $request->attributes->remove('foo'); + $this->assertSame('query', $request->get('foo')); + + $request->query->remove('foo'); + $this->assertSame('body', $request->get('foo')); + + $request->request->remove('foo'); + $this->assertNull($request->get('foo')); + } + + public function testGetPreferredLanguage() + { + $request = new Request(); + $this->assertNull($request->getPreferredLanguage()); + $this->assertNull($request->getPreferredLanguage(array())); + $this->assertEquals('fr', $request->getPreferredLanguage(array('fr'))); + $this->assertEquals('fr', $request->getPreferredLanguage(array('fr', 'en'))); + $this->assertEquals('en', $request->getPreferredLanguage(array('en', 'fr'))); + $this->assertEquals('fr-ch', $request->getPreferredLanguage(array('fr-ch', 'fr-fr'))); + + $request = new Request(); + $request->headers->set('Accept-language', 'zh, en-us; q=0.8, en; q=0.6'); + $this->assertEquals('en', $request->getPreferredLanguage(array('en', 'en-us'))); + + $request = new Request(); + $request->headers->set('Accept-language', 'zh, en-us; q=0.8, en; q=0.6'); + $this->assertEquals('en', $request->getPreferredLanguage(array('fr', 'en'))); + + $request = new Request(); + $request->headers->set('Accept-language', 'zh, en-us; q=0.8'); + $this->assertEquals('en', $request->getPreferredLanguage(array('fr', 'en'))); + + $request = new Request(); + $request->headers->set('Accept-language', 'zh, en-us; q=0.8, fr-fr; q=0.6, fr; q=0.5'); + $this->assertEquals('en', $request->getPreferredLanguage(array('fr', 'en'))); + } + + public function testIsXmlHttpRequest() + { + $request = new Request(); + $this->assertFalse($request->isXmlHttpRequest()); + + $request->headers->set('X-Requested-With', 'XMLHttpRequest'); + $this->assertTrue($request->isXmlHttpRequest()); + + $request->headers->remove('X-Requested-With'); + $this->assertFalse($request->isXmlHttpRequest()); + } + + /** + * @requires extension intl + */ + public function testIntlLocale() + { + $request = new Request(); + + $request->setDefaultLocale('fr'); + $this->assertEquals('fr', $request->getLocale()); + $this->assertEquals('fr', \Locale::getDefault()); + + $request->setLocale('en'); + $this->assertEquals('en', $request->getLocale()); + $this->assertEquals('en', \Locale::getDefault()); + + $request->setDefaultLocale('de'); + $this->assertEquals('en', $request->getLocale()); + $this->assertEquals('en', \Locale::getDefault()); + } + + public function testGetCharsets() + { + $request = new Request(); + $this->assertEquals(array(), $request->getCharsets()); + $request->headers->set('Accept-Charset', 'ISO-8859-1, US-ASCII, UTF-8; q=0.8, ISO-10646-UCS-2; q=0.6'); + $this->assertEquals(array(), $request->getCharsets()); // testing caching + + $request = new Request(); + $request->headers->set('Accept-Charset', 'ISO-8859-1, US-ASCII, UTF-8; q=0.8, ISO-10646-UCS-2; q=0.6'); + $this->assertEquals(array('ISO-8859-1', 'US-ASCII', 'UTF-8', 'ISO-10646-UCS-2'), $request->getCharsets()); + + $request = new Request(); + $request->headers->set('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'); + $this->assertEquals(array('ISO-8859-1', 'utf-8', '*'), $request->getCharsets()); + } + + public function testGetEncodings() + { + $request = new Request(); + $this->assertEquals(array(), $request->getEncodings()); + $request->headers->set('Accept-Encoding', 'gzip,deflate,sdch'); + $this->assertEquals(array(), $request->getEncodings()); // testing caching + + $request = new Request(); + $request->headers->set('Accept-Encoding', 'gzip,deflate,sdch'); + $this->assertEquals(array('gzip', 'deflate', 'sdch'), $request->getEncodings()); + + $request = new Request(); + $request->headers->set('Accept-Encoding', 'gzip;q=0.4,deflate;q=0.9,compress;q=0.7'); + $this->assertEquals(array('deflate', 'compress', 'gzip'), $request->getEncodings()); + } + + public function testGetAcceptableContentTypes() + { + $request = new Request(); + $this->assertEquals(array(), $request->getAcceptableContentTypes()); + $request->headers->set('Accept', 'application/vnd.wap.wmlscriptc, text/vnd.wap.wml, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html, multipart/mixed, */*'); + $this->assertEquals(array(), $request->getAcceptableContentTypes()); // testing caching + + $request = new Request(); + $request->headers->set('Accept', 'application/vnd.wap.wmlscriptc, text/vnd.wap.wml, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html, multipart/mixed, */*'); + $this->assertEquals(array('application/vnd.wap.wmlscriptc', 'text/vnd.wap.wml', 'application/vnd.wap.xhtml+xml', 'application/xhtml+xml', 'text/html', 'multipart/mixed', '*/*'), $request->getAcceptableContentTypes()); + } + + public function testGetLanguages() + { + $request = new Request(); + $this->assertEquals(array(), $request->getLanguages()); + + $request = new Request(); + $request->headers->set('Accept-language', 'zh, en-us; q=0.8, en; q=0.6'); + $this->assertEquals(array('zh', 'en_US', 'en'), $request->getLanguages()); + $this->assertEquals(array('zh', 'en_US', 'en'), $request->getLanguages()); + + $request = new Request(); + $request->headers->set('Accept-language', 'zh, en-us; q=0.6, en; q=0.8'); + $this->assertEquals(array('zh', 'en', 'en_US'), $request->getLanguages()); // Test out of order qvalues + + $request = new Request(); + $request->headers->set('Accept-language', 'zh, en, en-us'); + $this->assertEquals(array('zh', 'en', 'en_US'), $request->getLanguages()); // Test equal weighting without qvalues + + $request = new Request(); + $request->headers->set('Accept-language', 'zh; q=0.6, en, en-us; q=0.6'); + $this->assertEquals(array('en', 'zh', 'en_US'), $request->getLanguages()); // Test equal weighting with qvalues + + $request = new Request(); + $request->headers->set('Accept-language', 'zh, i-cherokee; q=0.6'); + $this->assertEquals(array('zh', 'cherokee'), $request->getLanguages()); + } + + public function testGetRequestFormat() + { + $request = new Request(); + $this->assertEquals('html', $request->getRequestFormat()); + + // Ensure that setting different default values over time is possible, + // aka. setRequestFormat determines the state. + $this->assertEquals('json', $request->getRequestFormat('json')); + $this->assertEquals('html', $request->getRequestFormat('html')); + + $request = new Request(); + $this->assertNull($request->getRequestFormat(null)); + + $request = new Request(); + $this->assertNull($request->setRequestFormat('foo')); + $this->assertEquals('foo', $request->getRequestFormat(null)); + + $request = new Request(array('_format' => 'foo')); + $this->assertEquals('html', $request->getRequestFormat()); + } + + public function testHasSession() + { + $request = new Request(); + + $this->assertFalse($request->hasSession()); + $request->setSession(new Session(new MockArraySessionStorage())); + $this->assertTrue($request->hasSession()); + } + + public function testGetSession() + { + $request = new Request(); + + $request->setSession(new Session(new MockArraySessionStorage())); + $this->assertTrue($request->hasSession()); + + $session = $request->getSession(); + $this->assertObjectHasAttribute('storage', $session); + $this->assertObjectHasAttribute('flashName', $session); + $this->assertObjectHasAttribute('attributeName', $session); + } + + public function testHasPreviousSession() + { + $request = new Request(); + + $this->assertFalse($request->hasPreviousSession()); + $request->cookies->set('MOCKSESSID', 'foo'); + $this->assertFalse($request->hasPreviousSession()); + $request->setSession(new Session(new MockArraySessionStorage())); + $this->assertTrue($request->hasPreviousSession()); + } + + public function testToString() + { + $request = new Request(); + + $request->headers->set('Accept-language', 'zh, en-us; q=0.8, en; q=0.6'); + + $this->assertContains('Accept-Language: zh, en-us; q=0.8, en; q=0.6', $request->__toString()); + } + + public function testIsMethod() + { + $request = new Request(); + $request->setMethod('POST'); + $this->assertTrue($request->isMethod('POST')); + $this->assertTrue($request->isMethod('post')); + $this->assertFalse($request->isMethod('GET')); + $this->assertFalse($request->isMethod('get')); + + $request->setMethod('GET'); + $this->assertTrue($request->isMethod('GET')); + $this->assertTrue($request->isMethod('get')); + $this->assertFalse($request->isMethod('POST')); + $this->assertFalse($request->isMethod('post')); + } + + /** + * @dataProvider getBaseUrlData + */ + public function testGetBaseUrl($uri, $server, $expectedBaseUrl, $expectedPathInfo) + { + $request = Request::create($uri, 'GET', array(), array(), array(), $server); + + $this->assertSame($expectedBaseUrl, $request->getBaseUrl(), 'baseUrl'); + $this->assertSame($expectedPathInfo, $request->getPathInfo(), 'pathInfo'); + } + + public function getBaseUrlData() + { + return array( + array( + '/fruit/strawberry/1234index.php/blah', + array( + 'SCRIPT_FILENAME' => 'E:/Sites/cc-new/public_html/fruit/index.php', + 'SCRIPT_NAME' => '/fruit/index.php', + 'PHP_SELF' => '/fruit/index.php', + ), + '/fruit', + '/strawberry/1234index.php/blah', + ), + array( + '/fruit/strawberry/1234index.php/blah', + array( + 'SCRIPT_FILENAME' => 'E:/Sites/cc-new/public_html/index.php', + 'SCRIPT_NAME' => '/index.php', + 'PHP_SELF' => '/index.php', + ), + '', + '/fruit/strawberry/1234index.php/blah', + ), + array( + '/foo%20bar/', + array( + 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', + 'SCRIPT_NAME' => '/foo bar/app.php', + 'PHP_SELF' => '/foo bar/app.php', + ), + '/foo%20bar', + '/', + ), + array( + '/foo%20bar/home', + array( + 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', + 'SCRIPT_NAME' => '/foo bar/app.php', + 'PHP_SELF' => '/foo bar/app.php', + ), + '/foo%20bar', + '/home', + ), + array( + '/foo%20bar/app.php/home', + array( + 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', + 'SCRIPT_NAME' => '/foo bar/app.php', + 'PHP_SELF' => '/foo bar/app.php', + ), + '/foo%20bar/app.php', + '/home', + ), + array( + '/foo%20bar/app.php/home%3Dbaz', + array( + 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', + 'SCRIPT_NAME' => '/foo bar/app.php', + 'PHP_SELF' => '/foo bar/app.php', + ), + '/foo%20bar/app.php', + '/home%3Dbaz', + ), + array( + '/foo/bar+baz', + array( + 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo/app.php', + 'SCRIPT_NAME' => '/foo/app.php', + 'PHP_SELF' => '/foo/app.php', + ), + '/foo', + '/bar+baz', + ), + ); + } + + /** + * @dataProvider urlencodedStringPrefixData + */ + public function testUrlencodedStringPrefix($string, $prefix, $expect) + { + $request = new Request(); + + $me = new \ReflectionMethod($request, 'getUrlencodedPrefix'); + $me->setAccessible(true); + + $this->assertSame($expect, $me->invoke($request, $string, $prefix)); + } + + public function urlencodedStringPrefixData() + { + return array( + array('foo', 'foo', 'foo'), + array('fo%6f', 'foo', 'fo%6f'), + array('foo/bar', 'foo', 'foo'), + array('fo%6f/bar', 'foo', 'fo%6f'), + array('f%6f%6f/bar', 'foo', 'f%6f%6f'), + array('%66%6F%6F/bar', 'foo', '%66%6F%6F'), + array('fo+o/bar', 'fo+o', 'fo+o'), + array('fo%2Bo/bar', 'fo+o', 'fo%2Bo'), + ); + } + + private function disableHttpMethodParameterOverride() + { + $class = new \ReflectionClass('Symfony\\Component\\HttpFoundation\\Request'); + $property = $class->getProperty('httpMethodParameterOverride'); + $property->setAccessible(true); + $property->setValue(false); + } + + private function getRequestInstanceForClientIpTests($remoteAddr, $httpForwardedFor, $trustedProxies) + { + $request = new Request(); + + $server = array('REMOTE_ADDR' => $remoteAddr); + if (null !== $httpForwardedFor) { + $server['HTTP_X_FORWARDED_FOR'] = $httpForwardedFor; + } + + if ($trustedProxies) { + Request::setTrustedProxies($trustedProxies); + } + + $request->initialize(array(), array(), array(), array(), array(), $server); + + return $request; + } + + private function getRequestInstanceForClientIpsForwardedTests($remoteAddr, $httpForwarded, $trustedProxies) + { + $request = new Request(); + + $server = array('REMOTE_ADDR' => $remoteAddr); + + if (null !== $httpForwarded) { + $server['HTTP_FORWARDED'] = $httpForwarded; + } + + if ($trustedProxies) { + Request::setTrustedProxies($trustedProxies); + } + + $request->initialize(array(), array(), array(), array(), array(), $server); + + return $request; + } + + public function testTrustedProxies() + { + $request = Request::create('http://example.com/'); + $request->server->set('REMOTE_ADDR', '3.3.3.3'); + $request->headers->set('X_FORWARDED_FOR', '1.1.1.1, 2.2.2.2'); + $request->headers->set('X_FORWARDED_HOST', 'foo.example.com, real.example.com:8080'); + $request->headers->set('X_FORWARDED_PROTO', 'https'); + $request->headers->set('X_FORWARDED_PORT', 443); + $request->headers->set('X_MY_FOR', '3.3.3.3, 4.4.4.4'); + $request->headers->set('X_MY_HOST', 'my.example.com'); + $request->headers->set('X_MY_PROTO', 'http'); + $request->headers->set('X_MY_PORT', 81); + + // no trusted proxies + $this->assertEquals('3.3.3.3', $request->getClientIp()); + $this->assertEquals('example.com', $request->getHost()); + $this->assertEquals(80, $request->getPort()); + $this->assertFalse($request->isSecure()); + + // disabling proxy trusting + Request::setTrustedProxies(array()); + $this->assertEquals('3.3.3.3', $request->getClientIp()); + $this->assertEquals('example.com', $request->getHost()); + $this->assertEquals(80, $request->getPort()); + $this->assertFalse($request->isSecure()); + + // request is forwarded by a non-trusted proxy + Request::setTrustedProxies(array('2.2.2.2')); + $this->assertEquals('3.3.3.3', $request->getClientIp()); + $this->assertEquals('example.com', $request->getHost()); + $this->assertEquals(80, $request->getPort()); + $this->assertFalse($request->isSecure()); + + // trusted proxy via setTrustedProxies() + Request::setTrustedProxies(array('3.3.3.3', '2.2.2.2')); + $this->assertEquals('1.1.1.1', $request->getClientIp()); + $this->assertEquals('real.example.com', $request->getHost()); + $this->assertEquals(443, $request->getPort()); + $this->assertTrue($request->isSecure()); + + // trusted proxy via setTrustedProxies() + Request::setTrustedProxies(array('3.3.3.4', '2.2.2.2')); + $this->assertEquals('3.3.3.3', $request->getClientIp()); + $this->assertEquals('example.com', $request->getHost()); + $this->assertEquals(80, $request->getPort()); + $this->assertFalse($request->isSecure()); + + // check various X_FORWARDED_PROTO header values + Request::setTrustedProxies(array('3.3.3.3', '2.2.2.2')); + $request->headers->set('X_FORWARDED_PROTO', 'ssl'); + $this->assertTrue($request->isSecure()); + + $request->headers->set('X_FORWARDED_PROTO', 'https, http'); + $this->assertTrue($request->isSecure()); + + // custom header names + Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, 'X_MY_FOR'); + Request::setTrustedHeaderName(Request::HEADER_CLIENT_HOST, 'X_MY_HOST'); + Request::setTrustedHeaderName(Request::HEADER_CLIENT_PORT, 'X_MY_PORT'); + Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, 'X_MY_PROTO'); + $this->assertEquals('4.4.4.4', $request->getClientIp()); + $this->assertEquals('my.example.com', $request->getHost()); + $this->assertEquals(81, $request->getPort()); + $this->assertFalse($request->isSecure()); + + // disabling via empty header names + Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, null); + Request::setTrustedHeaderName(Request::HEADER_CLIENT_HOST, null); + Request::setTrustedHeaderName(Request::HEADER_CLIENT_PORT, null); + Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, null); + $this->assertEquals('3.3.3.3', $request->getClientIp()); + $this->assertEquals('example.com', $request->getHost()); + $this->assertEquals(80, $request->getPort()); + $this->assertFalse($request->isSecure()); + + // reset + Request::setTrustedProxies(array()); + Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, 'X_FORWARDED_FOR'); + Request::setTrustedHeaderName(Request::HEADER_CLIENT_HOST, 'X_FORWARDED_HOST'); + Request::setTrustedHeaderName(Request::HEADER_CLIENT_PORT, 'X_FORWARDED_PORT'); + Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, 'X_FORWARDED_PROTO'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testSetTrustedProxiesInvalidHeaderName() + { + Request::create('http://example.com/'); + Request::setTrustedHeaderName('bogus name', 'X_MY_FOR'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testGetTrustedProxiesInvalidHeaderName() + { + Request::create('http://example.com/'); + Request::getTrustedHeaderName('bogus name'); + } + + /** + * @dataProvider iisRequestUriProvider + */ + public function testIISRequestUri($headers, $server, $expectedRequestUri) + { + $request = new Request(); + $request->headers->replace($headers); + $request->server->replace($server); + + $this->assertEquals($expectedRequestUri, $request->getRequestUri(), '->getRequestUri() is correct'); + + $subRequestUri = '/bar/foo'; + $subRequest = Request::create($subRequestUri, 'get', array(), array(), array(), $request->server->all()); + $this->assertEquals($subRequestUri, $subRequest->getRequestUri(), '->getRequestUri() is correct in sub request'); + } + + public function iisRequestUriProvider() + { + return array( + array( + array( + 'X_ORIGINAL_URL' => '/foo/bar', + ), + array(), + '/foo/bar', + ), + array( + array( + 'X_REWRITE_URL' => '/foo/bar', + ), + array(), + '/foo/bar', + ), + array( + array(), + array( + 'IIS_WasUrlRewritten' => '1', + 'UNENCODED_URL' => '/foo/bar', + ), + '/foo/bar', + ), + array( + array( + 'X_ORIGINAL_URL' => '/foo/bar', + ), + array( + 'HTTP_X_ORIGINAL_URL' => '/foo/bar', + ), + '/foo/bar', + ), + array( + array( + 'X_ORIGINAL_URL' => '/foo/bar', + ), + array( + 'IIS_WasUrlRewritten' => '1', + 'UNENCODED_URL' => '/foo/bar', + ), + '/foo/bar', + ), + array( + array( + 'X_ORIGINAL_URL' => '/foo/bar', + ), + array( + 'HTTP_X_ORIGINAL_URL' => '/foo/bar', + 'IIS_WasUrlRewritten' => '1', + 'UNENCODED_URL' => '/foo/bar', + ), + '/foo/bar', + ), + array( + array(), + array( + 'ORIG_PATH_INFO' => '/foo/bar', + ), + '/foo/bar', + ), + array( + array(), + array( + 'ORIG_PATH_INFO' => '/foo/bar', + 'QUERY_STRING' => 'foo=bar', + ), + '/foo/bar?foo=bar', + ), + ); + } + + public function testTrustedHosts() + { + // create a request + $request = Request::create('/'); + + // no trusted host set -> no host check + $request->headers->set('host', 'evil.com'); + $this->assertEquals('evil.com', $request->getHost()); + + // add a trusted domain and all its subdomains + Request::setTrustedHosts(array('^([a-z]{9}\.)?trusted\.com$')); + + // untrusted host + $request->headers->set('host', 'evil.com'); + try { + $request->getHost(); + $this->fail('Request::getHost() should throw an exception when host is not trusted.'); + } catch (\UnexpectedValueException $e) { + $this->assertEquals('Untrusted Host "evil.com"', $e->getMessage()); + } + + // trusted hosts + $request->headers->set('host', 'trusted.com'); + $this->assertEquals('trusted.com', $request->getHost()); + $this->assertEquals(80, $request->getPort()); + + $request->server->set('HTTPS', true); + $request->headers->set('host', 'trusted.com'); + $this->assertEquals('trusted.com', $request->getHost()); + $this->assertEquals(443, $request->getPort()); + $request->server->set('HTTPS', false); + + $request->headers->set('host', 'trusted.com:8000'); + $this->assertEquals('trusted.com', $request->getHost()); + $this->assertEquals(8000, $request->getPort()); + + $request->headers->set('host', 'subdomain.trusted.com'); + $this->assertEquals('subdomain.trusted.com', $request->getHost()); + + // reset request for following tests + Request::setTrustedHosts(array()); + } + + public function testFactory() + { + Request::setFactory(function (array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) { + return new NewRequest(); + }); + + $this->assertEquals('foo', Request::create('/')->getFoo()); + + Request::setFactory(null); + } + + /** + * @dataProvider getLongHostNames + */ + public function testVeryLongHosts($host) + { + $start = microtime(true); + + $request = Request::create('/'); + $request->headers->set('host', $host); + $this->assertEquals($host, $request->getHost()); + $this->assertLessThan(5, microtime(true) - $start); + } + + /** + * @dataProvider getHostValidities + */ + public function testHostValidity($host, $isValid, $expectedHost = null, $expectedPort = null) + { + $request = Request::create('/'); + $request->headers->set('host', $host); + + if ($isValid) { + $this->assertSame($expectedHost ?: $host, $request->getHost()); + if ($expectedPort) { + $this->assertSame($expectedPort, $request->getPort()); + } + } else { + if (method_exists($this, 'expectException')) { + $this->expectException('UnexpectedValueException'); + $this->expectExceptionMessage('Invalid Host'); + } else { + $this->setExpectedException('UnexpectedValueException', 'Invalid Host'); + } + + $request->getHost(); + } + } + + public function getHostValidities() + { + return array( + array('.a', false), + array('a..', false), + array('a.', true), + array("\xE9", false), + array('[::1]', true), + array('[::1]:80', true, '[::1]', 80), + array(str_repeat('.', 101), false), + ); + } + + public function getLongHostNames() + { + return array( + array('a'.str_repeat('.a', 40000)), + array(str_repeat(':', 101)), + ); + } + + /** + * @dataProvider methodIdempotentProvider + */ + public function testMethodIdempotent($method, $idempotent) + { + $request = new Request(); + $request->setMethod($method); + $this->assertEquals($idempotent, $request->isMethodIdempotent()); + } + + public function methodIdempotentProvider() + { + return array( + array('HEAD', true), + array('GET', true), + array('POST', false), + array('PUT', true), + array('PATCH', false), + array('DELETE', true), + array('PURGE', true), + array('OPTIONS', true), + array('TRACE', true), + array('CONNECT', false), + ); + } + + /** + * @dataProvider methodSafeProvider + */ + public function testMethodSafe($method, $safe) + { + $request = new Request(); + $request->setMethod($method); + $this->assertEquals($safe, $request->isMethodSafe(false)); + } + + public function methodSafeProvider() + { + return array( + array('HEAD', true), + array('GET', true), + array('POST', false), + array('PUT', false), + array('PATCH', false), + array('DELETE', false), + array('PURGE', false), + array('OPTIONS', true), + array('TRACE', true), + array('CONNECT', false), + ); + } + + /** + * @group legacy + * @expectedDeprecation Checking only for cacheable HTTP methods with Symfony\Component\HttpFoundation\Request::isMethodSafe() is deprecated since version 3.2 and will throw an exception in 4.0. Disable checking only for cacheable methods by calling the method with `false` as first argument or use the Request::isMethodCacheable() instead. + */ + public function testMethodSafeChecksCacheable() + { + $request = new Request(); + $request->setMethod('OPTIONS'); + $this->assertFalse($request->isMethodSafe()); + } + + /** + * @dataProvider methodCacheableProvider + */ + public function testMethodCacheable($method, $chacheable) + { + $request = new Request(); + $request->setMethod($method); + $this->assertEquals($chacheable, $request->isMethodCacheable()); + } + + public function methodCacheableProvider() + { + return array( + array('HEAD', true), + array('GET', true), + array('POST', false), + array('PUT', false), + array('PATCH', false), + array('DELETE', false), + array('PURGE', false), + array('OPTIONS', false), + array('TRACE', false), + array('CONNECT', false), + ); + } +} + +class RequestContentProxy extends Request +{ + public function getContent($asResource = false) + { + return http_build_query(array('_method' => 'PUT', 'content' => 'mycontent')); + } +} + +class NewRequest extends Request +{ + public function getFoo() + { + return 'foo'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..95284e21e497f798593f3f7af66457f3f3b2dc25 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php @@ -0,0 +1,310 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\ResponseHeaderBag; +use Symfony\Component\HttpFoundation\Cookie; + +/** + * @group time-sensitive + */ +class ResponseHeaderBagTest extends TestCase +{ + /** + * @dataProvider provideAllPreserveCase + */ + public function testAllPreserveCase($headers, $expected) + { + $bag = new ResponseHeaderBag($headers); + + $this->assertEquals($expected, $bag->allPreserveCase(), '->allPreserveCase() gets all input keys in original case'); + } + + public function provideAllPreserveCase() + { + return array( + array( + array('fOo' => 'BAR'), + array('fOo' => array('BAR'), 'Cache-Control' => array('no-cache, private')), + ), + array( + array('ETag' => 'xyzzy'), + array('ETag' => array('xyzzy'), 'Cache-Control' => array('private, must-revalidate')), + ), + array( + array('Content-MD5' => 'Q2hlY2sgSW50ZWdyaXR5IQ=='), + array('Content-MD5' => array('Q2hlY2sgSW50ZWdyaXR5IQ=='), 'Cache-Control' => array('no-cache, private')), + ), + array( + array('P3P' => 'CP="CAO PSA OUR"'), + array('P3P' => array('CP="CAO PSA OUR"'), 'Cache-Control' => array('no-cache, private')), + ), + array( + array('WWW-Authenticate' => 'Basic realm="WallyWorld"'), + array('WWW-Authenticate' => array('Basic realm="WallyWorld"'), 'Cache-Control' => array('no-cache, private')), + ), + array( + array('X-UA-Compatible' => 'IE=edge,chrome=1'), + array('X-UA-Compatible' => array('IE=edge,chrome=1'), 'Cache-Control' => array('no-cache, private')), + ), + array( + array('X-XSS-Protection' => '1; mode=block'), + array('X-XSS-Protection' => array('1; mode=block'), 'Cache-Control' => array('no-cache, private')), + ), + ); + } + + public function testCacheControlHeader() + { + $bag = new ResponseHeaderBag(array()); + $this->assertEquals('no-cache, private', $bag->get('Cache-Control')); + $this->assertTrue($bag->hasCacheControlDirective('no-cache')); + + $bag = new ResponseHeaderBag(array('Cache-Control' => 'public')); + $this->assertEquals('public', $bag->get('Cache-Control')); + $this->assertTrue($bag->hasCacheControlDirective('public')); + + $bag = new ResponseHeaderBag(array('ETag' => 'abcde')); + $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); + $this->assertTrue($bag->hasCacheControlDirective('private')); + $this->assertTrue($bag->hasCacheControlDirective('must-revalidate')); + $this->assertFalse($bag->hasCacheControlDirective('max-age')); + + $bag = new ResponseHeaderBag(array('Expires' => 'Wed, 16 Feb 2011 14:17:43 GMT')); + $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); + + $bag = new ResponseHeaderBag(array( + 'Expires' => 'Wed, 16 Feb 2011 14:17:43 GMT', + 'Cache-Control' => 'max-age=3600', + )); + $this->assertEquals('max-age=3600, private', $bag->get('Cache-Control')); + + $bag = new ResponseHeaderBag(array('Last-Modified' => 'abcde')); + $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); + + $bag = new ResponseHeaderBag(array('Etag' => 'abcde', 'Last-Modified' => 'abcde')); + $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); + + $bag = new ResponseHeaderBag(array('cache-control' => 'max-age=100')); + $this->assertEquals('max-age=100, private', $bag->get('Cache-Control')); + + $bag = new ResponseHeaderBag(array('cache-control' => 's-maxage=100')); + $this->assertEquals('s-maxage=100', $bag->get('Cache-Control')); + + $bag = new ResponseHeaderBag(array('cache-control' => 'private, max-age=100')); + $this->assertEquals('max-age=100, private', $bag->get('Cache-Control')); + + $bag = new ResponseHeaderBag(array('cache-control' => 'public, max-age=100')); + $this->assertEquals('max-age=100, public', $bag->get('Cache-Control')); + + $bag = new ResponseHeaderBag(); + $bag->set('Last-Modified', 'abcde'); + $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); + } + + public function testCacheControlClone() + { + $headers = array('foo' => 'bar'); + $bag1 = new ResponseHeaderBag($headers); + $bag2 = new ResponseHeaderBag($bag1->allPreserveCase()); + $this->assertEquals($bag1->allPreserveCase(), $bag2->allPreserveCase()); + } + + public function testToStringIncludesCookieHeaders() + { + $bag = new ResponseHeaderBag(array()); + $bag->setCookie(new Cookie('foo', 'bar')); + + $this->assertSetCookieHeader('foo=bar; path=/; httponly', $bag); + + $bag->clearCookie('foo'); + + $this->assertSetCookieHeader('foo=deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001).'; path=/; httponly', $bag); + } + + public function testClearCookieSecureNotHttpOnly() + { + $bag = new ResponseHeaderBag(array()); + + $bag->clearCookie('foo', '/', null, true, false); + + $this->assertSetCookieHeader('foo=deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001).'; path=/; secure', $bag); + } + + public function testReplace() + { + $bag = new ResponseHeaderBag(array()); + $this->assertEquals('no-cache, private', $bag->get('Cache-Control')); + $this->assertTrue($bag->hasCacheControlDirective('no-cache')); + + $bag->replace(array('Cache-Control' => 'public')); + $this->assertEquals('public', $bag->get('Cache-Control')); + $this->assertTrue($bag->hasCacheControlDirective('public')); + } + + public function testReplaceWithRemove() + { + $bag = new ResponseHeaderBag(array()); + $this->assertEquals('no-cache, private', $bag->get('Cache-Control')); + $this->assertTrue($bag->hasCacheControlDirective('no-cache')); + + $bag->remove('Cache-Control'); + $bag->replace(array()); + $this->assertEquals('no-cache, private', $bag->get('Cache-Control')); + $this->assertTrue($bag->hasCacheControlDirective('no-cache')); + } + + public function testCookiesWithSameNames() + { + $bag = new ResponseHeaderBag(); + $bag->setCookie(new Cookie('foo', 'bar', 0, '/path/foo', 'foo.bar')); + $bag->setCookie(new Cookie('foo', 'bar', 0, '/path/bar', 'foo.bar')); + $bag->setCookie(new Cookie('foo', 'bar', 0, '/path/bar', 'bar.foo')); + $bag->setCookie(new Cookie('foo', 'bar')); + + $this->assertCount(4, $bag->getCookies()); + + $this->assertSetCookieHeader('foo=bar; path=/path/foo; domain=foo.bar; httponly', $bag); + $this->assertSetCookieHeader('foo=bar; path=/path/bar; domain=foo.bar; httponly', $bag); + $this->assertSetCookieHeader('foo=bar; path=/path/bar; domain=bar.foo; httponly', $bag); + $this->assertSetCookieHeader('foo=bar; path=/; httponly', $bag); + + $cookies = $bag->getCookies(ResponseHeaderBag::COOKIES_ARRAY); + $this->assertTrue(isset($cookies['foo.bar']['/path/foo']['foo'])); + $this->assertTrue(isset($cookies['foo.bar']['/path/bar']['foo'])); + $this->assertTrue(isset($cookies['bar.foo']['/path/bar']['foo'])); + $this->assertTrue(isset($cookies['']['/']['foo'])); + } + + public function testRemoveCookie() + { + $bag = new ResponseHeaderBag(); + $bag->setCookie(new Cookie('foo', 'bar', 0, '/path/foo', 'foo.bar')); + $bag->setCookie(new Cookie('bar', 'foo', 0, '/path/bar', 'foo.bar')); + + $cookies = $bag->getCookies(ResponseHeaderBag::COOKIES_ARRAY); + $this->assertTrue(isset($cookies['foo.bar']['/path/foo'])); + + $bag->removeCookie('foo', '/path/foo', 'foo.bar'); + + $cookies = $bag->getCookies(ResponseHeaderBag::COOKIES_ARRAY); + $this->assertFalse(isset($cookies['foo.bar']['/path/foo'])); + + $bag->removeCookie('bar', '/path/bar', 'foo.bar'); + + $cookies = $bag->getCookies(ResponseHeaderBag::COOKIES_ARRAY); + $this->assertFalse(isset($cookies['foo.bar'])); + } + + public function testRemoveCookieWithNullRemove() + { + $bag = new ResponseHeaderBag(); + $bag->setCookie(new Cookie('foo', 'bar', 0)); + $bag->setCookie(new Cookie('bar', 'foo', 0)); + + $cookies = $bag->getCookies(ResponseHeaderBag::COOKIES_ARRAY); + $this->assertTrue(isset($cookies['']['/'])); + + $bag->removeCookie('foo', null); + $cookies = $bag->getCookies(ResponseHeaderBag::COOKIES_ARRAY); + $this->assertFalse(isset($cookies['']['/']['foo'])); + + $bag->removeCookie('bar', null); + $cookies = $bag->getCookies(ResponseHeaderBag::COOKIES_ARRAY); + $this->assertFalse(isset($cookies['']['/']['bar'])); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testGetCookiesWithInvalidArgument() + { + $bag = new ResponseHeaderBag(); + + $bag->getCookies('invalid_argument'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testMakeDispositionInvalidDisposition() + { + $headers = new ResponseHeaderBag(); + + $headers->makeDisposition('invalid', 'foo.html'); + } + + /** + * @dataProvider provideMakeDisposition + */ + public function testMakeDisposition($disposition, $filename, $filenameFallback, $expected) + { + $headers = new ResponseHeaderBag(); + + $this->assertEquals($expected, $headers->makeDisposition($disposition, $filename, $filenameFallback)); + } + + public function testToStringDoesntMessUpHeaders() + { + $headers = new ResponseHeaderBag(); + + $headers->set('Location', 'http://www.symfony.com'); + $headers->set('Content-type', 'text/html'); + + (string) $headers; + + $allHeaders = $headers->allPreserveCase(); + $this->assertEquals(array('http://www.symfony.com'), $allHeaders['Location']); + $this->assertEquals(array('text/html'), $allHeaders['Content-type']); + } + + public function provideMakeDisposition() + { + return array( + array('attachment', 'foo.html', 'foo.html', 'attachment; filename="foo.html"'), + array('attachment', 'foo.html', '', 'attachment; filename="foo.html"'), + array('attachment', 'foo bar.html', '', 'attachment; filename="foo bar.html"'), + array('attachment', 'foo "bar".html', '', 'attachment; filename="foo \\"bar\\".html"'), + array('attachment', 'foo%20bar.html', 'foo bar.html', 'attachment; filename="foo bar.html"; filename*=utf-8\'\'foo%2520bar.html'), + array('attachment', 'föö.html', 'foo.html', 'attachment; filename="foo.html"; filename*=utf-8\'\'f%C3%B6%C3%B6.html'), + ); + } + + /** + * @dataProvider provideMakeDispositionFail + * @expectedException \InvalidArgumentException + */ + public function testMakeDispositionFail($disposition, $filename) + { + $headers = new ResponseHeaderBag(); + + $headers->makeDisposition($disposition, $filename); + } + + public function provideMakeDispositionFail() + { + return array( + array('attachment', 'foo%20bar.html'), + array('attachment', 'foo/bar.html'), + array('attachment', '/foo.html'), + array('attachment', 'foo\bar.html'), + array('attachment', '\foo.html'), + array('attachment', 'föö.html'), + ); + } + + private function assertSetCookieHeader($expected, ResponseHeaderBag $actual) + { + $this->assertRegExp('#^Set-Cookie:\s+'.preg_quote($expected, '#').'$#m', str_replace("\r\n", "\n", (string) $actual)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1a832a1dcba10b4d26a00c7c3d24b05671c699a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php @@ -0,0 +1,927 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * @group time-sensitive + */ +class ResponseTest extends ResponseTestCase +{ + public function testCreate() + { + $response = Response::create('foo', 301, array('Foo' => 'bar')); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Response', $response); + $this->assertEquals(301, $response->getStatusCode()); + $this->assertEquals('bar', $response->headers->get('foo')); + } + + public function testToString() + { + $response = new Response(); + $response = explode("\r\n", $response); + $this->assertEquals('HTTP/1.0 200 OK', $response[0]); + $this->assertEquals('Cache-Control: no-cache, private', $response[1]); + } + + public function testClone() + { + $response = new Response(); + $responseClone = clone $response; + $this->assertEquals($response, $responseClone); + } + + public function testSendHeaders() + { + $response = new Response(); + $headers = $response->sendHeaders(); + $this->assertObjectHasAttribute('headers', $headers); + $this->assertObjectHasAttribute('content', $headers); + $this->assertObjectHasAttribute('version', $headers); + $this->assertObjectHasAttribute('statusCode', $headers); + $this->assertObjectHasAttribute('statusText', $headers); + $this->assertObjectHasAttribute('charset', $headers); + } + + public function testSend() + { + $response = new Response(); + $responseSend = $response->send(); + $this->assertObjectHasAttribute('headers', $responseSend); + $this->assertObjectHasAttribute('content', $responseSend); + $this->assertObjectHasAttribute('version', $responseSend); + $this->assertObjectHasAttribute('statusCode', $responseSend); + $this->assertObjectHasAttribute('statusText', $responseSend); + $this->assertObjectHasAttribute('charset', $responseSend); + } + + public function testGetCharset() + { + $response = new Response(); + $charsetOrigin = 'UTF-8'; + $response->setCharset($charsetOrigin); + $charset = $response->getCharset(); + $this->assertEquals($charsetOrigin, $charset); + } + + public function testIsCacheable() + { + $response = new Response(); + $this->assertFalse($response->isCacheable()); + } + + public function testIsCacheableWithErrorCode() + { + $response = new Response('', 500); + $this->assertFalse($response->isCacheable()); + } + + public function testIsCacheableWithNoStoreDirective() + { + $response = new Response(); + $response->headers->set('cache-control', 'private'); + $this->assertFalse($response->isCacheable()); + } + + public function testIsCacheableWithSetTtl() + { + $response = new Response(); + $response->setTtl(10); + $this->assertTrue($response->isCacheable()); + } + + public function testMustRevalidate() + { + $response = new Response(); + $this->assertFalse($response->mustRevalidate()); + } + + public function testMustRevalidateWithMustRevalidateCacheControlHeader() + { + $response = new Response(); + $response->headers->set('cache-control', 'must-revalidate'); + + $this->assertTrue($response->mustRevalidate()); + } + + public function testMustRevalidateWithProxyRevalidateCacheControlHeader() + { + $response = new Response(); + $response->headers->set('cache-control', 'proxy-revalidate'); + + $this->assertTrue($response->mustRevalidate()); + } + + public function testSetNotModified() + { + $response = new Response(); + $modified = $response->setNotModified(); + $this->assertObjectHasAttribute('headers', $modified); + $this->assertObjectHasAttribute('content', $modified); + $this->assertObjectHasAttribute('version', $modified); + $this->assertObjectHasAttribute('statusCode', $modified); + $this->assertObjectHasAttribute('statusText', $modified); + $this->assertObjectHasAttribute('charset', $modified); + $this->assertEquals(304, $modified->getStatusCode()); + } + + public function testIsSuccessful() + { + $response = new Response(); + $this->assertTrue($response->isSuccessful()); + } + + public function testIsNotModified() + { + $response = new Response(); + $modified = $response->isNotModified(new Request()); + $this->assertFalse($modified); + } + + public function testIsNotModifiedNotSafe() + { + $request = Request::create('/homepage', 'POST'); + + $response = new Response(); + $this->assertFalse($response->isNotModified($request)); + } + + public function testIsNotModifiedLastModified() + { + $before = 'Sun, 25 Aug 2013 18:32:31 GMT'; + $modified = 'Sun, 25 Aug 2013 18:33:31 GMT'; + $after = 'Sun, 25 Aug 2013 19:33:31 GMT'; + + $request = new Request(); + $request->headers->set('If-Modified-Since', $modified); + + $response = new Response(); + + $response->headers->set('Last-Modified', $modified); + $this->assertTrue($response->isNotModified($request)); + + $response->headers->set('Last-Modified', $before); + $this->assertTrue($response->isNotModified($request)); + + $response->headers->set('Last-Modified', $after); + $this->assertFalse($response->isNotModified($request)); + + $response->headers->set('Last-Modified', ''); + $this->assertFalse($response->isNotModified($request)); + } + + public function testIsNotModifiedEtag() + { + $etagOne = 'randomly_generated_etag'; + $etagTwo = 'randomly_generated_etag_2'; + + $request = new Request(); + $request->headers->set('if_none_match', sprintf('%s, %s, %s', $etagOne, $etagTwo, 'etagThree')); + + $response = new Response(); + + $response->headers->set('ETag', $etagOne); + $this->assertTrue($response->isNotModified($request)); + + $response->headers->set('ETag', $etagTwo); + $this->assertTrue($response->isNotModified($request)); + + $response->headers->set('ETag', ''); + $this->assertFalse($response->isNotModified($request)); + } + + public function testIsNotModifiedLastModifiedAndEtag() + { + $before = 'Sun, 25 Aug 2013 18:32:31 GMT'; + $modified = 'Sun, 25 Aug 2013 18:33:31 GMT'; + $after = 'Sun, 25 Aug 2013 19:33:31 GMT'; + $etag = 'randomly_generated_etag'; + + $request = new Request(); + $request->headers->set('if_none_match', sprintf('%s, %s', $etag, 'etagThree')); + $request->headers->set('If-Modified-Since', $modified); + + $response = new Response(); + + $response->headers->set('ETag', $etag); + $response->headers->set('Last-Modified', $after); + $this->assertFalse($response->isNotModified($request)); + + $response->headers->set('ETag', 'non-existent-etag'); + $response->headers->set('Last-Modified', $before); + $this->assertFalse($response->isNotModified($request)); + + $response->headers->set('ETag', $etag); + $response->headers->set('Last-Modified', $modified); + $this->assertTrue($response->isNotModified($request)); + } + + public function testIsNotModifiedIfModifiedSinceAndEtagWithoutLastModified() + { + $modified = 'Sun, 25 Aug 2013 18:33:31 GMT'; + $etag = 'randomly_generated_etag'; + + $request = new Request(); + $request->headers->set('if_none_match', sprintf('%s, %s', $etag, 'etagThree')); + $request->headers->set('If-Modified-Since', $modified); + + $response = new Response(); + + $response->headers->set('ETag', $etag); + $this->assertTrue($response->isNotModified($request)); + + $response->headers->set('ETag', 'non-existent-etag'); + $this->assertFalse($response->isNotModified($request)); + } + + public function testIsValidateable() + { + $response = new Response('', 200, array('Last-Modified' => $this->createDateTimeOneHourAgo()->format(DATE_RFC2822))); + $this->assertTrue($response->isValidateable(), '->isValidateable() returns true if Last-Modified is present'); + + $response = new Response('', 200, array('ETag' => '"12345"')); + $this->assertTrue($response->isValidateable(), '->isValidateable() returns true if ETag is present'); + + $response = new Response(); + $this->assertFalse($response->isValidateable(), '->isValidateable() returns false when no validator is present'); + } + + public function testGetDate() + { + $oneHourAgo = $this->createDateTimeOneHourAgo(); + $response = new Response('', 200, array('Date' => $oneHourAgo->format(DATE_RFC2822))); + $date = $response->getDate(); + $this->assertEquals($oneHourAgo->getTimestamp(), $date->getTimestamp(), '->getDate() returns the Date header if present'); + + $response = new Response(); + $date = $response->getDate(); + $this->assertEquals(time(), $date->getTimestamp(), '->getDate() returns the current Date if no Date header present'); + + $response = new Response('', 200, array('Date' => $this->createDateTimeOneHourAgo()->format(DATE_RFC2822))); + $now = $this->createDateTimeNow(); + $response->headers->set('Date', $now->format(DATE_RFC2822)); + $date = $response->getDate(); + $this->assertEquals($now->getTimestamp(), $date->getTimestamp(), '->getDate() returns the date when the header has been modified'); + + $response = new Response('', 200); + $response->headers->remove('Date'); + $this->assertInstanceOf('\DateTime', $response->getDate()); + } + + public function testGetMaxAge() + { + $response = new Response(); + $response->headers->set('Cache-Control', 's-maxage=600, max-age=0'); + $this->assertEquals(600, $response->getMaxAge(), '->getMaxAge() uses s-maxage cache control directive when present'); + + $response = new Response(); + $response->headers->set('Cache-Control', 'max-age=600'); + $this->assertEquals(600, $response->getMaxAge(), '->getMaxAge() falls back to max-age when no s-maxage directive present'); + + $response = new Response(); + $response->headers->set('Cache-Control', 'must-revalidate'); + $response->headers->set('Expires', $this->createDateTimeOneHourLater()->format(DATE_RFC2822)); + $this->assertEquals(3600, $response->getMaxAge(), '->getMaxAge() falls back to Expires when no max-age or s-maxage directive present'); + + $response = new Response(); + $response->headers->set('Cache-Control', 'must-revalidate'); + $response->headers->set('Expires', -1); + $this->assertEquals('Sat, 01 Jan 00 00:00:00 +0000', $response->getExpires()->format(DATE_RFC822)); + + $response = new Response(); + $this->assertNull($response->getMaxAge(), '->getMaxAge() returns null if no freshness information available'); + } + + public function testSetSharedMaxAge() + { + $response = new Response(); + $response->setSharedMaxAge(20); + + $cacheControl = $response->headers->get('Cache-Control'); + $this->assertEquals('public, s-maxage=20', $cacheControl); + } + + public function testIsPrivate() + { + $response = new Response(); + $response->headers->set('Cache-Control', 'max-age=100'); + $response->setPrivate(); + $this->assertEquals(100, $response->headers->getCacheControlDirective('max-age'), '->isPrivate() adds the private Cache-Control directive when set to true'); + $this->assertTrue($response->headers->getCacheControlDirective('private'), '->isPrivate() adds the private Cache-Control directive when set to true'); + + $response = new Response(); + $response->headers->set('Cache-Control', 'public, max-age=100'); + $response->setPrivate(); + $this->assertEquals(100, $response->headers->getCacheControlDirective('max-age'), '->isPrivate() adds the private Cache-Control directive when set to true'); + $this->assertTrue($response->headers->getCacheControlDirective('private'), '->isPrivate() adds the private Cache-Control directive when set to true'); + $this->assertFalse($response->headers->hasCacheControlDirective('public'), '->isPrivate() removes the public Cache-Control directive'); + } + + public function testExpire() + { + $response = new Response(); + $response->headers->set('Cache-Control', 'max-age=100'); + $response->expire(); + $this->assertEquals(100, $response->headers->get('Age'), '->expire() sets the Age to max-age when present'); + + $response = new Response(); + $response->headers->set('Cache-Control', 'max-age=100, s-maxage=500'); + $response->expire(); + $this->assertEquals(500, $response->headers->get('Age'), '->expire() sets the Age to s-maxage when both max-age and s-maxage are present'); + + $response = new Response(); + $response->headers->set('Cache-Control', 'max-age=5, s-maxage=500'); + $response->headers->set('Age', '1000'); + $response->expire(); + $this->assertEquals(1000, $response->headers->get('Age'), '->expire() does nothing when the response is already stale/expired'); + + $response = new Response(); + $response->expire(); + $this->assertFalse($response->headers->has('Age'), '->expire() does nothing when the response does not include freshness information'); + + $response = new Response(); + $response->headers->set('Expires', -1); + $response->expire(); + $this->assertNull($response->headers->get('Age'), '->expire() does not set the Age when the response is expired'); + } + + public function testGetTtl() + { + $response = new Response(); + $this->assertNull($response->getTtl(), '->getTtl() returns null when no Expires or Cache-Control headers are present'); + + $response = new Response(); + $response->headers->set('Expires', $this->createDateTimeOneHourLater()->format(DATE_RFC2822)); + $this->assertEquals(3600, $response->getTtl(), '->getTtl() uses the Expires header when no max-age is present'); + + $response = new Response(); + $response->headers->set('Expires', $this->createDateTimeOneHourAgo()->format(DATE_RFC2822)); + $this->assertLessThan(0, $response->getTtl(), '->getTtl() returns negative values when Expires is in past'); + + $response = new Response(); + $response->headers->set('Expires', $response->getDate()->format(DATE_RFC2822)); + $response->headers->set('Age', 0); + $this->assertSame(0, $response->getTtl(), '->getTtl() correctly handles zero'); + + $response = new Response(); + $response->headers->set('Cache-Control', 'max-age=60'); + $this->assertEquals(60, $response->getTtl(), '->getTtl() uses Cache-Control max-age when present'); + } + + public function testSetClientTtl() + { + $response = new Response(); + $response->setClientTtl(10); + + $this->assertEquals($response->getMaxAge(), $response->getAge() + 10); + } + + public function testGetSetProtocolVersion() + { + $response = new Response(); + + $this->assertEquals('1.0', $response->getProtocolVersion()); + + $response->setProtocolVersion('1.1'); + + $this->assertEquals('1.1', $response->getProtocolVersion()); + } + + public function testGetVary() + { + $response = new Response(); + $this->assertEquals(array(), $response->getVary(), '->getVary() returns an empty array if no Vary header is present'); + + $response = new Response(); + $response->headers->set('Vary', 'Accept-Language'); + $this->assertEquals(array('Accept-Language'), $response->getVary(), '->getVary() parses a single header name value'); + + $response = new Response(); + $response->headers->set('Vary', 'Accept-Language User-Agent X-Foo'); + $this->assertEquals(array('Accept-Language', 'User-Agent', 'X-Foo'), $response->getVary(), '->getVary() parses multiple header name values separated by spaces'); + + $response = new Response(); + $response->headers->set('Vary', 'Accept-Language,User-Agent, X-Foo'); + $this->assertEquals(array('Accept-Language', 'User-Agent', 'X-Foo'), $response->getVary(), '->getVary() parses multiple header name values separated by commas'); + + $vary = array('Accept-Language', 'User-Agent', 'X-foo'); + + $response = new Response(); + $response->headers->set('Vary', $vary); + $this->assertEquals($vary, $response->getVary(), '->getVary() parses multiple header name values in arrays'); + + $response = new Response(); + $response->headers->set('Vary', 'Accept-Language, User-Agent, X-foo'); + $this->assertEquals($vary, $response->getVary(), '->getVary() parses multiple header name values in arrays'); + } + + public function testSetVary() + { + $response = new Response(); + $response->setVary('Accept-Language'); + $this->assertEquals(array('Accept-Language'), $response->getVary()); + + $response->setVary('Accept-Language, User-Agent'); + $this->assertEquals(array('Accept-Language', 'User-Agent'), $response->getVary(), '->setVary() replace the vary header by default'); + + $response->setVary('X-Foo', false); + $this->assertEquals(array('Accept-Language', 'User-Agent', 'X-Foo'), $response->getVary(), '->setVary() doesn\'t wipe out earlier Vary headers if replace is set to false'); + } + + public function testDefaultContentType() + { + $headerMock = $this->getMockBuilder('Symfony\Component\HttpFoundation\ResponseHeaderBag')->setMethods(array('set'))->getMock(); + $headerMock->expects($this->at(0)) + ->method('set') + ->with('Content-Type', 'text/html'); + $headerMock->expects($this->at(1)) + ->method('set') + ->with('Content-Type', 'text/html; charset=UTF-8'); + + $response = new Response('foo'); + $response->headers = $headerMock; + + $response->prepare(new Request()); + } + + public function testContentTypeCharset() + { + $response = new Response(); + $response->headers->set('Content-Type', 'text/css'); + + // force fixContentType() to be called + $response->prepare(new Request()); + + $this->assertEquals('text/css; charset=UTF-8', $response->headers->get('Content-Type')); + } + + public function testPrepareDoesNothingIfContentTypeIsSet() + { + $response = new Response('foo'); + $response->headers->set('Content-Type', 'text/plain'); + + $response->prepare(new Request()); + + $this->assertEquals('text/plain; charset=UTF-8', $response->headers->get('content-type')); + } + + public function testPrepareDoesNothingIfRequestFormatIsNotDefined() + { + $response = new Response('foo'); + + $response->prepare(new Request()); + + $this->assertEquals('text/html; charset=UTF-8', $response->headers->get('content-type')); + } + + public function testPrepareSetContentType() + { + $response = new Response('foo'); + $request = Request::create('/'); + $request->setRequestFormat('json'); + + $response->prepare($request); + + $this->assertEquals('application/json', $response->headers->get('content-type')); + } + + public function testPrepareRemovesContentForHeadRequests() + { + $response = new Response('foo'); + $request = Request::create('/', 'HEAD'); + + $length = 12345; + $response->headers->set('Content-Length', $length); + $response->prepare($request); + + $this->assertEquals('', $response->getContent()); + $this->assertEquals($length, $response->headers->get('Content-Length'), 'Content-Length should be as if it was GET; see RFC2616 14.13'); + } + + public function testPrepareRemovesContentForInformationalResponse() + { + $response = new Response('foo'); + $request = Request::create('/'); + + $response->setContent('content'); + $response->setStatusCode(101); + $response->prepare($request); + $this->assertEquals('', $response->getContent()); + $this->assertFalse($response->headers->has('Content-Type')); + $this->assertFalse($response->headers->has('Content-Type')); + + $response->setContent('content'); + $response->setStatusCode(304); + $response->prepare($request); + $this->assertEquals('', $response->getContent()); + $this->assertFalse($response->headers->has('Content-Type')); + $this->assertFalse($response->headers->has('Content-Length')); + } + + public function testPrepareRemovesContentLength() + { + $response = new Response('foo'); + $request = Request::create('/'); + + $response->headers->set('Content-Length', 12345); + $response->prepare($request); + $this->assertEquals(12345, $response->headers->get('Content-Length')); + + $response->headers->set('Transfer-Encoding', 'chunked'); + $response->prepare($request); + $this->assertFalse($response->headers->has('Content-Length')); + } + + public function testPrepareSetsPragmaOnHttp10Only() + { + $request = Request::create('/', 'GET'); + $request->server->set('SERVER_PROTOCOL', 'HTTP/1.0'); + + $response = new Response('foo'); + $response->prepare($request); + $this->assertEquals('no-cache', $response->headers->get('pragma')); + $this->assertEquals('-1', $response->headers->get('expires')); + + $request->server->set('SERVER_PROTOCOL', 'HTTP/1.1'); + $response = new Response('foo'); + $response->prepare($request); + $this->assertFalse($response->headers->has('pragma')); + $this->assertFalse($response->headers->has('expires')); + } + + public function testSetCache() + { + $response = new Response(); + //array('etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public') + try { + $response->setCache(array('wrong option' => 'value')); + $this->fail('->setCache() throws an InvalidArgumentException if an option is not supported'); + } catch (\Exception $e) { + $this->assertInstanceOf('InvalidArgumentException', $e, '->setCache() throws an InvalidArgumentException if an option is not supported'); + $this->assertContains('"wrong option"', $e->getMessage()); + } + + $options = array('etag' => '"whatever"'); + $response->setCache($options); + $this->assertEquals($response->getEtag(), '"whatever"'); + + $now = $this->createDateTimeNow(); + $options = array('last_modified' => $now); + $response->setCache($options); + $this->assertEquals($response->getLastModified()->getTimestamp(), $now->getTimestamp()); + + $options = array('max_age' => 100); + $response->setCache($options); + $this->assertEquals($response->getMaxAge(), 100); + + $options = array('s_maxage' => 200); + $response->setCache($options); + $this->assertEquals($response->getMaxAge(), 200); + + $this->assertTrue($response->headers->hasCacheControlDirective('public')); + $this->assertFalse($response->headers->hasCacheControlDirective('private')); + + $response->setCache(array('public' => true)); + $this->assertTrue($response->headers->hasCacheControlDirective('public')); + $this->assertFalse($response->headers->hasCacheControlDirective('private')); + + $response->setCache(array('public' => false)); + $this->assertFalse($response->headers->hasCacheControlDirective('public')); + $this->assertTrue($response->headers->hasCacheControlDirective('private')); + + $response->setCache(array('private' => true)); + $this->assertFalse($response->headers->hasCacheControlDirective('public')); + $this->assertTrue($response->headers->hasCacheControlDirective('private')); + + $response->setCache(array('private' => false)); + $this->assertTrue($response->headers->hasCacheControlDirective('public')); + $this->assertFalse($response->headers->hasCacheControlDirective('private')); + } + + public function testSendContent() + { + $response = new Response('test response rendering', 200); + + ob_start(); + $response->sendContent(); + $string = ob_get_clean(); + $this->assertContains('test response rendering', $string); + } + + public function testSetPublic() + { + $response = new Response(); + $response->setPublic(); + + $this->assertTrue($response->headers->hasCacheControlDirective('public')); + $this->assertFalse($response->headers->hasCacheControlDirective('private')); + } + + public function testSetExpires() + { + $response = new Response(); + $response->setExpires(null); + + $this->assertNull($response->getExpires(), '->setExpires() remove the header when passed null'); + + $now = $this->createDateTimeNow(); + $response->setExpires($now); + + $this->assertEquals($response->getExpires()->getTimestamp(), $now->getTimestamp()); + } + + public function testSetLastModified() + { + $response = new Response(); + $response->setLastModified($this->createDateTimeNow()); + $this->assertNotNull($response->getLastModified()); + + $response->setLastModified(null); + $this->assertNull($response->getLastModified()); + } + + public function testIsInvalid() + { + $response = new Response(); + + try { + $response->setStatusCode(99); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertTrue($response->isInvalid()); + } + + try { + $response->setStatusCode(650); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertTrue($response->isInvalid()); + } + + $response = new Response('', 200); + $this->assertFalse($response->isInvalid()); + } + + /** + * @dataProvider getStatusCodeFixtures + */ + public function testSetStatusCode($code, $text, $expectedText) + { + $response = new Response(); + + $response->setStatusCode($code, $text); + + $statusText = new \ReflectionProperty($response, 'statusText'); + $statusText->setAccessible(true); + + $this->assertEquals($expectedText, $statusText->getValue($response)); + } + + public function getStatusCodeFixtures() + { + return array( + array('200', null, 'OK'), + array('200', false, ''), + array('200', 'foo', 'foo'), + array('199', null, 'unknown status'), + array('199', false, ''), + array('199', 'foo', 'foo'), + ); + } + + public function testIsInformational() + { + $response = new Response('', 100); + $this->assertTrue($response->isInformational()); + + $response = new Response('', 200); + $this->assertFalse($response->isInformational()); + } + + public function testIsRedirectRedirection() + { + foreach (array(301, 302, 303, 307) as $code) { + $response = new Response('', $code); + $this->assertTrue($response->isRedirection()); + $this->assertTrue($response->isRedirect()); + } + + $response = new Response('', 304); + $this->assertTrue($response->isRedirection()); + $this->assertFalse($response->isRedirect()); + + $response = new Response('', 200); + $this->assertFalse($response->isRedirection()); + $this->assertFalse($response->isRedirect()); + + $response = new Response('', 404); + $this->assertFalse($response->isRedirection()); + $this->assertFalse($response->isRedirect()); + + $response = new Response('', 301, array('Location' => '/good-uri')); + $this->assertFalse($response->isRedirect('/bad-uri')); + $this->assertTrue($response->isRedirect('/good-uri')); + } + + public function testIsNotFound() + { + $response = new Response('', 404); + $this->assertTrue($response->isNotFound()); + + $response = new Response('', 200); + $this->assertFalse($response->isNotFound()); + } + + public function testIsEmpty() + { + foreach (array(204, 304) as $code) { + $response = new Response('', $code); + $this->assertTrue($response->isEmpty()); + } + + $response = new Response('', 200); + $this->assertFalse($response->isEmpty()); + } + + public function testIsForbidden() + { + $response = new Response('', 403); + $this->assertTrue($response->isForbidden()); + + $response = new Response('', 200); + $this->assertFalse($response->isForbidden()); + } + + public function testIsOk() + { + $response = new Response('', 200); + $this->assertTrue($response->isOk()); + + $response = new Response('', 404); + $this->assertFalse($response->isOk()); + } + + public function testIsServerOrClientError() + { + $response = new Response('', 404); + $this->assertTrue($response->isClientError()); + $this->assertFalse($response->isServerError()); + + $response = new Response('', 500); + $this->assertFalse($response->isClientError()); + $this->assertTrue($response->isServerError()); + } + + public function testHasVary() + { + $response = new Response(); + $this->assertFalse($response->hasVary()); + + $response->setVary('User-Agent'); + $this->assertTrue($response->hasVary()); + } + + public function testSetEtag() + { + $response = new Response('', 200, array('ETag' => '"12345"')); + $response->setEtag(); + + $this->assertNull($response->headers->get('Etag'), '->setEtag() removes Etags when call with null'); + } + + /** + * @dataProvider validContentProvider + */ + public function testSetContent($content) + { + $response = new Response(); + $response->setContent($content); + $this->assertEquals((string) $content, $response->getContent()); + } + + /** + * @expectedException \UnexpectedValueException + * @dataProvider invalidContentProvider + */ + public function testSetContentInvalid($content) + { + $response = new Response(); + $response->setContent($content); + } + + public function testSettersAreChainable() + { + $response = new Response(); + + $setters = array( + 'setProtocolVersion' => '1.0', + 'setCharset' => 'UTF-8', + 'setPublic' => null, + 'setPrivate' => null, + 'setDate' => $this->createDateTimeNow(), + 'expire' => null, + 'setMaxAge' => 1, + 'setSharedMaxAge' => 1, + 'setTtl' => 1, + 'setClientTtl' => 1, + ); + + foreach ($setters as $setter => $arg) { + $this->assertEquals($response, $response->{$setter}($arg)); + } + } + + public function testNoDeprecationsAreTriggered() + { + new DefaultResponse(); + $this->getMockBuilder(Response::class)->getMock(); + } + + /** + * @group legacy + * @expectedDeprecation Extending Symfony\Component\HttpFoundation\Response::getDate() in Symfony\Component\HttpFoundation\Tests\ExtendedResponse is deprecated %s. + * @expectedDeprecation Extending Symfony\Component\HttpFoundation\Response::setLastModified() in Symfony\Component\HttpFoundation\Tests\ExtendedResponse is deprecated %s. + */ + public function testDeprecations() + { + new ExtendedResponse(); + + // Deprecations should not be triggered twice + new ExtendedResponse(); + } + + public function validContentProvider() + { + return array( + 'obj' => array(new StringableObject()), + 'string' => array('Foo'), + 'int' => array(2), + ); + } + + public function invalidContentProvider() + { + return array( + 'obj' => array(new \stdClass()), + 'array' => array(array()), + 'bool' => array(true, '1'), + ); + } + + protected function createDateTimeOneHourAgo() + { + return $this->createDateTimeNow()->sub(new \DateInterval('PT1H')); + } + + protected function createDateTimeOneHourLater() + { + return $this->createDateTimeNow()->add(new \DateInterval('PT1H')); + } + + protected function createDateTimeNow() + { + $date = new \DateTime(); + + return $date->setTimestamp(time()); + } + + protected function provideResponse() + { + return new Response(); + } +} + +class StringableObject +{ + public function __toString() + { + return 'Foo'; + } +} + +class DefaultResponse extends Response +{ +} + +class ExtendedResponse extends Response +{ + public function setLastModified(\DateTime $date = null) + { + } + + public function getDate() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..4ead34c1053d5bbfda8d9d58d6452dc462729b04 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ResponseTestCase.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; + +abstract class ResponseTestCase extends TestCase +{ + public function testNoCacheControlHeaderOnAttachmentUsingHTTPSAndMSIE() + { + // Check for HTTPS and IE 8 + $request = new Request(); + $request->server->set('HTTPS', true); + $request->server->set('HTTP_USER_AGENT', 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)'); + + $response = $this->provideResponse(); + $response->headers->set('Content-Disposition', 'attachment; filename="fname.ext"'); + $response->prepare($request); + + $this->assertFalse($response->headers->has('Cache-Control')); + + // Check for IE 10 and HTTPS + $request->server->set('HTTP_USER_AGENT', 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)'); + + $response = $this->provideResponse(); + $response->headers->set('Content-Disposition', 'attachment; filename="fname.ext"'); + $response->prepare($request); + + $this->assertTrue($response->headers->has('Cache-Control')); + + // Check for IE 9 and HTTPS + $request->server->set('HTTP_USER_AGENT', 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)'); + + $response = $this->provideResponse(); + $response->headers->set('Content-Disposition', 'attachment; filename="fname.ext"'); + $response->prepare($request); + + $this->assertTrue($response->headers->has('Cache-Control')); + + // Check for IE 9 and HTTP + $request->server->set('HTTPS', false); + + $response = $this->provideResponse(); + $response->headers->set('Content-Disposition', 'attachment; filename="fname.ext"'); + $response->prepare($request); + + $this->assertTrue($response->headers->has('Cache-Control')); + + // Check for IE 8 and HTTP + $request->server->set('HTTP_USER_AGENT', 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)'); + + $response = $this->provideResponse(); + $response->headers->set('Content-Disposition', 'attachment; filename="fname.ext"'); + $response->prepare($request); + + $this->assertTrue($response->headers->has('Cache-Control')); + + // Check for non-IE and HTTPS + $request->server->set('HTTPS', true); + $request->server->set('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.60 Safari/537.17'); + + $response = $this->provideResponse(); + $response->headers->set('Content-Disposition', 'attachment; filename="fname.ext"'); + $response->prepare($request); + + $this->assertTrue($response->headers->has('Cache-Control')); + + // Check for non-IE and HTTP + $request->server->set('HTTPS', false); + + $response = $this->provideResponse(); + $response->headers->set('Content-Disposition', 'attachment; filename="fname.ext"'); + $response->prepare($request); + + $this->assertTrue($response->headers->has('Cache-Control')); + } + + abstract protected function provideResponse(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ServerBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ServerBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c1d9d12a654ba038243ad9e26d0cf68f6310e944 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/ServerBagTest.php @@ -0,0 +1,170 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\ServerBag; + +/** + * ServerBagTest. + * + * @author Bulat Shakirzyanov + */ +class ServerBagTest extends TestCase +{ + public function testShouldExtractHeadersFromServerArray() + { + $server = array( + 'SOME_SERVER_VARIABLE' => 'value', + 'SOME_SERVER_VARIABLE2' => 'value', + 'ROOT' => 'value', + 'HTTP_CONTENT_TYPE' => 'text/html', + 'HTTP_CONTENT_LENGTH' => '0', + 'HTTP_ETAG' => 'asdf', + 'PHP_AUTH_USER' => 'foo', + 'PHP_AUTH_PW' => 'bar', + ); + + $bag = new ServerBag($server); + + $this->assertEquals(array( + 'CONTENT_TYPE' => 'text/html', + 'CONTENT_LENGTH' => '0', + 'ETAG' => 'asdf', + 'AUTHORIZATION' => 'Basic '.base64_encode('foo:bar'), + 'PHP_AUTH_USER' => 'foo', + 'PHP_AUTH_PW' => 'bar', + ), $bag->getHeaders()); + } + + public function testHttpPasswordIsOptional() + { + $bag = new ServerBag(array('PHP_AUTH_USER' => 'foo')); + + $this->assertEquals(array( + 'AUTHORIZATION' => 'Basic '.base64_encode('foo:'), + 'PHP_AUTH_USER' => 'foo', + 'PHP_AUTH_PW' => '', + ), $bag->getHeaders()); + } + + public function testHttpBasicAuthWithPhpCgi() + { + $bag = new ServerBag(array('HTTP_AUTHORIZATION' => 'Basic '.base64_encode('foo:bar'))); + + $this->assertEquals(array( + 'AUTHORIZATION' => 'Basic '.base64_encode('foo:bar'), + 'PHP_AUTH_USER' => 'foo', + 'PHP_AUTH_PW' => 'bar', + ), $bag->getHeaders()); + } + + public function testHttpBasicAuthWithPhpCgiBogus() + { + $bag = new ServerBag(array('HTTP_AUTHORIZATION' => 'Basic_'.base64_encode('foo:bar'))); + + // Username and passwords should not be set as the header is bogus + $headers = $bag->getHeaders(); + $this->assertFalse(isset($headers['PHP_AUTH_USER'])); + $this->assertFalse(isset($headers['PHP_AUTH_PW'])); + } + + public function testHttpBasicAuthWithPhpCgiRedirect() + { + $bag = new ServerBag(array('REDIRECT_HTTP_AUTHORIZATION' => 'Basic '.base64_encode('username:pass:word'))); + + $this->assertEquals(array( + 'AUTHORIZATION' => 'Basic '.base64_encode('username:pass:word'), + 'PHP_AUTH_USER' => 'username', + 'PHP_AUTH_PW' => 'pass:word', + ), $bag->getHeaders()); + } + + public function testHttpBasicAuthWithPhpCgiEmptyPassword() + { + $bag = new ServerBag(array('HTTP_AUTHORIZATION' => 'Basic '.base64_encode('foo:'))); + + $this->assertEquals(array( + 'AUTHORIZATION' => 'Basic '.base64_encode('foo:'), + 'PHP_AUTH_USER' => 'foo', + 'PHP_AUTH_PW' => '', + ), $bag->getHeaders()); + } + + public function testHttpDigestAuthWithPhpCgi() + { + $digest = 'Digest username="foo", realm="acme", nonce="'.md5('secret').'", uri="/protected, qop="auth"'; + $bag = new ServerBag(array('HTTP_AUTHORIZATION' => $digest)); + + $this->assertEquals(array( + 'AUTHORIZATION' => $digest, + 'PHP_AUTH_DIGEST' => $digest, + ), $bag->getHeaders()); + } + + public function testHttpDigestAuthWithPhpCgiBogus() + { + $digest = 'Digest_username="foo", realm="acme", nonce="'.md5('secret').'", uri="/protected, qop="auth"'; + $bag = new ServerBag(array('HTTP_AUTHORIZATION' => $digest)); + + // Username and passwords should not be set as the header is bogus + $headers = $bag->getHeaders(); + $this->assertFalse(isset($headers['PHP_AUTH_USER'])); + $this->assertFalse(isset($headers['PHP_AUTH_PW'])); + } + + public function testHttpDigestAuthWithPhpCgiRedirect() + { + $digest = 'Digest username="foo", realm="acme", nonce="'.md5('secret').'", uri="/protected, qop="auth"'; + $bag = new ServerBag(array('REDIRECT_HTTP_AUTHORIZATION' => $digest)); + + $this->assertEquals(array( + 'AUTHORIZATION' => $digest, + 'PHP_AUTH_DIGEST' => $digest, + ), $bag->getHeaders()); + } + + public function testOAuthBearerAuth() + { + $headerContent = 'Bearer L-yLEOr9zhmUYRkzN1jwwxwQ-PBNiKDc8dgfB4hTfvo'; + $bag = new ServerBag(array('HTTP_AUTHORIZATION' => $headerContent)); + + $this->assertEquals(array( + 'AUTHORIZATION' => $headerContent, + ), $bag->getHeaders()); + } + + public function testOAuthBearerAuthWithRedirect() + { + $headerContent = 'Bearer L-yLEOr9zhmUYRkzN1jwwxwQ-PBNiKDc8dgfB4hTfvo'; + $bag = new ServerBag(array('REDIRECT_HTTP_AUTHORIZATION' => $headerContent)); + + $this->assertEquals(array( + 'AUTHORIZATION' => $headerContent, + ), $bag->getHeaders()); + } + + /** + * @see https://github.com/symfony/symfony/issues/17345 + */ + public function testItDoesNotOverwriteTheAuthorizationHeaderIfItIsAlreadySet() + { + $headerContent = 'Bearer L-yLEOr9zhmUYRkzN1jwwxwQ-PBNiKDc8dgfB4hTfvo'; + $bag = new ServerBag(array('PHP_AUTH_USER' => 'foo', 'HTTP_AUTHORIZATION' => $headerContent)); + + $this->assertEquals(array( + 'AUTHORIZATION' => $headerContent, + 'PHP_AUTH_USER' => 'foo', + 'PHP_AUTH_PW' => '', + ), $bag->getHeaders()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8c148b58f06c8aec081902c879557defa964fe50 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php @@ -0,0 +1,189 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Attribute; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; + +/** + * Tests AttributeBag. + * + * @author Drak + */ +class AttributeBagTest extends TestCase +{ + /** + * @var array + */ + private $array; + + /** + * @var AttributeBag + */ + private $bag; + + protected function setUp() + { + $this->array = array( + 'hello' => 'world', + 'always' => 'be happy', + 'user.login' => 'drak', + 'csrf.token' => array( + 'a' => '1234', + 'b' => '4321', + ), + 'category' => array( + 'fishing' => array( + 'first' => 'cod', + 'second' => 'sole', + ), + ), + ); + $this->bag = new AttributeBag('_sf2'); + $this->bag->initialize($this->array); + } + + protected function tearDown() + { + $this->bag = null; + $this->array = array(); + } + + public function testInitialize() + { + $bag = new AttributeBag(); + $bag->initialize($this->array); + $this->assertEquals($this->array, $bag->all()); + $array = array('should' => 'change'); + $bag->initialize($array); + $this->assertEquals($array, $bag->all()); + } + + public function testGetStorageKey() + { + $this->assertEquals('_sf2', $this->bag->getStorageKey()); + $attributeBag = new AttributeBag('test'); + $this->assertEquals('test', $attributeBag->getStorageKey()); + } + + public function testGetSetName() + { + $this->assertEquals('attributes', $this->bag->getName()); + $this->bag->setName('foo'); + $this->assertEquals('foo', $this->bag->getName()); + } + + /** + * @dataProvider attributesProvider + */ + public function testHas($key, $value, $exists) + { + $this->assertEquals($exists, $this->bag->has($key)); + } + + /** + * @dataProvider attributesProvider + */ + public function testGet($key, $value, $expected) + { + $this->assertEquals($value, $this->bag->get($key)); + } + + public function testGetDefaults() + { + $this->assertNull($this->bag->get('user2.login')); + $this->assertEquals('default', $this->bag->get('user2.login', 'default')); + } + + /** + * @dataProvider attributesProvider + */ + public function testSet($key, $value, $expected) + { + $this->bag->set($key, $value); + $this->assertEquals($value, $this->bag->get($key)); + } + + public function testAll() + { + $this->assertEquals($this->array, $this->bag->all()); + + $this->bag->set('hello', 'fabien'); + $array = $this->array; + $array['hello'] = 'fabien'; + $this->assertEquals($array, $this->bag->all()); + } + + public function testReplace() + { + $array = array(); + $array['name'] = 'jack'; + $array['foo.bar'] = 'beep'; + $this->bag->replace($array); + $this->assertEquals($array, $this->bag->all()); + $this->assertNull($this->bag->get('hello')); + $this->assertNull($this->bag->get('always')); + $this->assertNull($this->bag->get('user.login')); + } + + public function testRemove() + { + $this->assertEquals('world', $this->bag->get('hello')); + $this->bag->remove('hello'); + $this->assertNull($this->bag->get('hello')); + + $this->assertEquals('be happy', $this->bag->get('always')); + $this->bag->remove('always'); + $this->assertNull($this->bag->get('always')); + + $this->assertEquals('drak', $this->bag->get('user.login')); + $this->bag->remove('user.login'); + $this->assertNull($this->bag->get('user.login')); + } + + public function testClear() + { + $this->bag->clear(); + $this->assertEquals(array(), $this->bag->all()); + } + + public function attributesProvider() + { + return array( + array('hello', 'world', true), + array('always', 'be happy', true), + array('user.login', 'drak', true), + array('csrf.token', array('a' => '1234', 'b' => '4321'), true), + array('category', array('fishing' => array('first' => 'cod', 'second' => 'sole')), true), + array('user2.login', null, false), + array('never', null, false), + array('bye', null, false), + array('bye/for/now', null, false), + ); + } + + public function testGetIterator() + { + $i = 0; + foreach ($this->bag as $key => $val) { + $this->assertEquals($this->array[$key], $val); + ++$i; + } + + $this->assertEquals(count($this->array), $i); + } + + public function testCount() + { + $this->assertEquals(count($this->array), count($this->bag)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d9d9eb7fbee7767cf8c457c9ac875cef9e27d4a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php @@ -0,0 +1,185 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Attribute; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Attribute\NamespacedAttributeBag; + +/** + * Tests NamespacedAttributeBag. + * + * @author Drak + */ +class NamespacedAttributeBagTest extends TestCase +{ + /** + * @var array + */ + private $array; + + /** + * @var NamespacedAttributeBag + */ + private $bag; + + protected function setUp() + { + $this->array = array( + 'hello' => 'world', + 'always' => 'be happy', + 'user.login' => 'drak', + 'csrf.token' => array( + 'a' => '1234', + 'b' => '4321', + ), + 'category' => array( + 'fishing' => array( + 'first' => 'cod', + 'second' => 'sole', + ), + ), + ); + $this->bag = new NamespacedAttributeBag('_sf2', '/'); + $this->bag->initialize($this->array); + } + + protected function tearDown() + { + $this->bag = null; + $this->array = array(); + } + + public function testInitialize() + { + $bag = new NamespacedAttributeBag(); + $bag->initialize($this->array); + $this->assertEquals($this->array, $this->bag->all()); + $array = array('should' => 'not stick'); + $bag->initialize($array); + + // should have remained the same + $this->assertEquals($this->array, $this->bag->all()); + } + + public function testGetStorageKey() + { + $this->assertEquals('_sf2', $this->bag->getStorageKey()); + $attributeBag = new NamespacedAttributeBag('test'); + $this->assertEquals('test', $attributeBag->getStorageKey()); + } + + /** + * @dataProvider attributesProvider + */ + public function testHas($key, $value, $exists) + { + $this->assertEquals($exists, $this->bag->has($key)); + } + + /** + * @dataProvider attributesProvider + */ + public function testGet($key, $value, $expected) + { + $this->assertEquals($value, $this->bag->get($key)); + } + + public function testGetDefaults() + { + $this->assertNull($this->bag->get('user2.login')); + $this->assertEquals('default', $this->bag->get('user2.login', 'default')); + } + + /** + * @dataProvider attributesProvider + */ + public function testSet($key, $value, $expected) + { + $this->bag->set($key, $value); + $this->assertEquals($value, $this->bag->get($key)); + } + + public function testAll() + { + $this->assertEquals($this->array, $this->bag->all()); + + $this->bag->set('hello', 'fabien'); + $array = $this->array; + $array['hello'] = 'fabien'; + $this->assertEquals($array, $this->bag->all()); + } + + public function testReplace() + { + $array = array(); + $array['name'] = 'jack'; + $array['foo.bar'] = 'beep'; + $this->bag->replace($array); + $this->assertEquals($array, $this->bag->all()); + $this->assertNull($this->bag->get('hello')); + $this->assertNull($this->bag->get('always')); + $this->assertNull($this->bag->get('user.login')); + } + + public function testRemove() + { + $this->assertEquals('world', $this->bag->get('hello')); + $this->bag->remove('hello'); + $this->assertNull($this->bag->get('hello')); + + $this->assertEquals('be happy', $this->bag->get('always')); + $this->bag->remove('always'); + $this->assertNull($this->bag->get('always')); + + $this->assertEquals('drak', $this->bag->get('user.login')); + $this->bag->remove('user.login'); + $this->assertNull($this->bag->get('user.login')); + } + + public function testRemoveExistingNamespacedAttribute() + { + $this->assertSame('cod', $this->bag->remove('category/fishing/first')); + } + + public function testRemoveNonexistingNamespacedAttribute() + { + $this->assertNull($this->bag->remove('foo/bar/baz')); + } + + public function testClear() + { + $this->bag->clear(); + $this->assertEquals(array(), $this->bag->all()); + } + + public function attributesProvider() + { + return array( + array('hello', 'world', true), + array('always', 'be happy', true), + array('user.login', 'drak', true), + array('csrf.token', array('a' => '1234', 'b' => '4321'), true), + array('csrf.token/a', '1234', true), + array('csrf.token/b', '4321', true), + array('category', array('fishing' => array('first' => 'cod', 'second' => 'sole')), true), + array('category/fishing', array('first' => 'cod', 'second' => 'sole'), true), + array('category/fishing/missing/first', null, false), + array('category/fishing/first', 'cod', true), + array('category/fishing/second', 'sole', true), + array('category/fishing/missing/second', null, false), + array('user2.login', null, false), + array('never', null, false), + array('bye', null, false), + array('bye/for/now', null, false), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4eb200afa3bdf54688ac00733e8f9080505e9e29 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php @@ -0,0 +1,156 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Flash; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag as FlashBag; + +/** + * AutoExpireFlashBagTest. + * + * @author Drak + */ +class AutoExpireFlashBagTest extends TestCase +{ + /** + * @var \Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag + */ + private $bag; + + /** + * @var array + */ + protected $array = array(); + + protected function setUp() + { + parent::setUp(); + $this->bag = new FlashBag(); + $this->array = array('new' => array('notice' => array('A previous flash message'))); + $this->bag->initialize($this->array); + } + + protected function tearDown() + { + $this->bag = null; + parent::tearDown(); + } + + public function testInitialize() + { + $bag = new FlashBag(); + $array = array('new' => array('notice' => array('A previous flash message'))); + $bag->initialize($array); + $this->assertEquals(array('A previous flash message'), $bag->peek('notice')); + $array = array('new' => array( + 'notice' => array('Something else'), + 'error' => array('a'), + )); + $bag->initialize($array); + $this->assertEquals(array('Something else'), $bag->peek('notice')); + $this->assertEquals(array('a'), $bag->peek('error')); + } + + public function testGetStorageKey() + { + $this->assertEquals('_sf2_flashes', $this->bag->getStorageKey()); + $attributeBag = new FlashBag('test'); + $this->assertEquals('test', $attributeBag->getStorageKey()); + } + + public function testGetSetName() + { + $this->assertEquals('flashes', $this->bag->getName()); + $this->bag->setName('foo'); + $this->assertEquals('foo', $this->bag->getName()); + } + + public function testPeek() + { + $this->assertEquals(array(), $this->bag->peek('non_existing')); + $this->assertEquals(array('default'), $this->bag->peek('non_existing', array('default'))); + $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); + $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); + } + + public function testSet() + { + $this->bag->set('notice', 'Foo'); + $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); + } + + public function testHas() + { + $this->assertFalse($this->bag->has('nothing')); + $this->assertTrue($this->bag->has('notice')); + } + + public function testKeys() + { + $this->assertEquals(array('notice'), $this->bag->keys()); + } + + public function testPeekAll() + { + $array = array( + 'new' => array( + 'notice' => 'Foo', + 'error' => 'Bar', + ), + ); + + $this->bag->initialize($array); + $this->assertEquals(array( + 'notice' => 'Foo', + 'error' => 'Bar', + ), $this->bag->peekAll() + ); + + $this->assertEquals(array( + 'notice' => 'Foo', + 'error' => 'Bar', + ), $this->bag->peekAll() + ); + } + + public function testGet() + { + $this->assertEquals(array(), $this->bag->get('non_existing')); + $this->assertEquals(array('default'), $this->bag->get('non_existing', array('default'))); + $this->assertEquals(array('A previous flash message'), $this->bag->get('notice')); + $this->assertEquals(array(), $this->bag->get('notice')); + } + + public function testSetAll() + { + $this->bag->setAll(array('a' => 'first', 'b' => 'second')); + $this->assertFalse($this->bag->has('a')); + $this->assertFalse($this->bag->has('b')); + } + + public function testAll() + { + $this->bag->set('notice', 'Foo'); + $this->bag->set('error', 'Bar'); + $this->assertEquals(array( + 'notice' => array('A previous flash message'), + ), $this->bag->all() + ); + + $this->assertEquals(array(), $this->bag->all()); + } + + public function testClear() + { + $this->assertEquals(array('notice' => array('A previous flash message')), $this->bag->clear()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f0aa6a61577f4a2fae7caca270b2f6ab7e2ef988 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.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\Component\HttpFoundation\Tests\Session\Flash; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; + +/** + * FlashBagTest. + * + * @author Drak + */ +class FlashBagTest extends TestCase +{ + /** + * @var \Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface + */ + private $bag; + + /** + * @var array + */ + protected $array = array(); + + protected function setUp() + { + parent::setUp(); + $this->bag = new FlashBag(); + $this->array = array('notice' => array('A previous flash message')); + $this->bag->initialize($this->array); + } + + protected function tearDown() + { + $this->bag = null; + parent::tearDown(); + } + + public function testInitialize() + { + $bag = new FlashBag(); + $bag->initialize($this->array); + $this->assertEquals($this->array, $bag->peekAll()); + $array = array('should' => array('change')); + $bag->initialize($array); + $this->assertEquals($array, $bag->peekAll()); + } + + public function testGetStorageKey() + { + $this->assertEquals('_sf2_flashes', $this->bag->getStorageKey()); + $attributeBag = new FlashBag('test'); + $this->assertEquals('test', $attributeBag->getStorageKey()); + } + + public function testGetSetName() + { + $this->assertEquals('flashes', $this->bag->getName()); + $this->bag->setName('foo'); + $this->assertEquals('foo', $this->bag->getName()); + } + + public function testPeek() + { + $this->assertEquals(array(), $this->bag->peek('non_existing')); + $this->assertEquals(array('default'), $this->bag->peek('not_existing', array('default'))); + $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); + $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); + } + + public function testGet() + { + $this->assertEquals(array(), $this->bag->get('non_existing')); + $this->assertEquals(array('default'), $this->bag->get('not_existing', array('default'))); + $this->assertEquals(array('A previous flash message'), $this->bag->get('notice')); + $this->assertEquals(array(), $this->bag->get('notice')); + } + + public function testAll() + { + $this->bag->set('notice', 'Foo'); + $this->bag->set('error', 'Bar'); + $this->assertEquals(array( + 'notice' => array('Foo'), + 'error' => array('Bar'), ), $this->bag->all() + ); + + $this->assertEquals(array(), $this->bag->all()); + } + + public function testSet() + { + $this->bag->set('notice', 'Foo'); + $this->bag->set('notice', 'Bar'); + $this->assertEquals(array('Bar'), $this->bag->peek('notice')); + } + + public function testHas() + { + $this->assertFalse($this->bag->has('nothing')); + $this->assertTrue($this->bag->has('notice')); + } + + public function testKeys() + { + $this->assertEquals(array('notice'), $this->bag->keys()); + } + + public function testPeekAll() + { + $this->bag->set('notice', 'Foo'); + $this->bag->set('error', 'Bar'); + $this->assertEquals(array( + 'notice' => array('Foo'), + 'error' => array('Bar'), + ), $this->bag->peekAll() + ); + $this->assertTrue($this->bag->has('notice')); + $this->assertTrue($this->bag->has('error')); + $this->assertEquals(array( + 'notice' => array('Foo'), + 'error' => array('Bar'), + ), $this->bag->peekAll() + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4d5d337a3c011b4807f7750344865adcc268df25 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php @@ -0,0 +1,222 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; + +/** + * SessionTest. + * + * @author Fabien Potencier + * @author Robert Schönthal + * @author Drak + */ +class SessionTest extends TestCase +{ + /** + * @var \Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface + */ + protected $storage; + + /** + * @var \Symfony\Component\HttpFoundation\Session\SessionInterface + */ + protected $session; + + protected function setUp() + { + $this->storage = new MockArraySessionStorage(); + $this->session = new Session($this->storage, new AttributeBag(), new FlashBag()); + } + + protected function tearDown() + { + $this->storage = null; + $this->session = null; + } + + public function testStart() + { + $this->assertEquals('', $this->session->getId()); + $this->assertTrue($this->session->start()); + $this->assertNotEquals('', $this->session->getId()); + } + + public function testIsStarted() + { + $this->assertFalse($this->session->isStarted()); + $this->session->start(); + $this->assertTrue($this->session->isStarted()); + } + + public function testSetId() + { + $this->assertEquals('', $this->session->getId()); + $this->session->setId('0123456789abcdef'); + $this->session->start(); + $this->assertEquals('0123456789abcdef', $this->session->getId()); + } + + public function testSetName() + { + $this->assertEquals('MOCKSESSID', $this->session->getName()); + $this->session->setName('session.test.com'); + $this->session->start(); + $this->assertEquals('session.test.com', $this->session->getName()); + } + + public function testGet() + { + // tests defaults + $this->assertNull($this->session->get('foo')); + $this->assertEquals(1, $this->session->get('foo', 1)); + } + + /** + * @dataProvider setProvider + */ + public function testSet($key, $value) + { + $this->session->set($key, $value); + $this->assertEquals($value, $this->session->get($key)); + } + + /** + * @dataProvider setProvider + */ + public function testHas($key, $value) + { + $this->session->set($key, $value); + $this->assertTrue($this->session->has($key)); + $this->assertFalse($this->session->has($key.'non_value')); + } + + public function testReplace() + { + $this->session->replace(array('happiness' => 'be good', 'symfony' => 'awesome')); + $this->assertEquals(array('happiness' => 'be good', 'symfony' => 'awesome'), $this->session->all()); + $this->session->replace(array()); + $this->assertEquals(array(), $this->session->all()); + } + + /** + * @dataProvider setProvider + */ + public function testAll($key, $value, $result) + { + $this->session->set($key, $value); + $this->assertEquals($result, $this->session->all()); + } + + /** + * @dataProvider setProvider + */ + public function testClear($key, $value) + { + $this->session->set('hi', 'fabien'); + $this->session->set($key, $value); + $this->session->clear(); + $this->assertEquals(array(), $this->session->all()); + } + + public function setProvider() + { + return array( + array('foo', 'bar', array('foo' => 'bar')), + array('foo.bar', 'too much beer', array('foo.bar' => 'too much beer')), + array('great', 'symfony is great', array('great' => 'symfony is great')), + ); + } + + /** + * @dataProvider setProvider + */ + public function testRemove($key, $value) + { + $this->session->set('hi.world', 'have a nice day'); + $this->session->set($key, $value); + $this->session->remove($key); + $this->assertEquals(array('hi.world' => 'have a nice day'), $this->session->all()); + } + + public function testInvalidate() + { + $this->session->set('invalidate', 123); + $this->session->invalidate(); + $this->assertEquals(array(), $this->session->all()); + } + + public function testMigrate() + { + $this->session->set('migrate', 321); + $this->session->migrate(); + $this->assertEquals(321, $this->session->get('migrate')); + } + + public function testMigrateDestroy() + { + $this->session->set('migrate', 333); + $this->session->migrate(true); + $this->assertEquals(333, $this->session->get('migrate')); + } + + public function testSave() + { + $this->session->start(); + $this->session->save(); + } + + public function testGetId() + { + $this->assertEquals('', $this->session->getId()); + $this->session->start(); + $this->assertNotEquals('', $this->session->getId()); + } + + public function testGetFlashBag() + { + $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface', $this->session->getFlashBag()); + } + + public function testGetIterator() + { + $attributes = array('hello' => 'world', 'symfony' => 'rocks'); + foreach ($attributes as $key => $val) { + $this->session->set($key, $val); + } + + $i = 0; + foreach ($this->session as $key => $val) { + $this->assertEquals($attributes[$key], $val); + ++$i; + } + + $this->assertEquals(count($attributes), $i); + } + + public function testGetCount() + { + $this->session->set('hello', 'world'); + $this->session->set('symfony', 'rocks'); + + $this->assertCount(2, $this->session); + } + + public function testGetMeta() + { + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\MetadataBag', $this->session->getMetadataBag()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..06193c8befbebbccb394f0a610d6b2338f3562e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcacheSessionHandler; + +/** + * @requires extension memcache + * @group time-sensitive + */ +class MemcacheSessionHandlerTest extends TestCase +{ + const PREFIX = 'prefix_'; + const TTL = 1000; + /** + * @var MemcacheSessionHandler + */ + protected $storage; + + protected $memcache; + + protected function setUp() + { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('PHPUnit_MockObject cannot mock the Memcache class on HHVM. See https://github.com/sebastianbergmann/phpunit-mock-objects/pull/289'); + } + + parent::setUp(); + $this->memcache = $this->getMockBuilder('Memcache')->getMock(); + $this->storage = new MemcacheSessionHandler( + $this->memcache, + array('prefix' => self::PREFIX, 'expiretime' => self::TTL) + ); + } + + protected function tearDown() + { + $this->memcache = null; + $this->storage = null; + parent::tearDown(); + } + + public function testOpenSession() + { + $this->assertTrue($this->storage->open('', '')); + } + + public function testCloseSession() + { + $this->assertTrue($this->storage->close()); + } + + public function testReadSession() + { + $this->memcache + ->expects($this->once()) + ->method('get') + ->with(self::PREFIX.'id') + ; + + $this->assertEquals('', $this->storage->read('id')); + } + + public function testWriteSession() + { + $this->memcache + ->expects($this->once()) + ->method('set') + ->with(self::PREFIX.'id', 'data', 0, $this->equalTo(time() + self::TTL, 2)) + ->will($this->returnValue(true)) + ; + + $this->assertTrue($this->storage->write('id', 'data')); + } + + public function testDestroySession() + { + $this->memcache + ->expects($this->once()) + ->method('delete') + ->with(self::PREFIX.'id') + ->will($this->returnValue(true)) + ; + + $this->assertTrue($this->storage->destroy('id')); + } + + public function testGcSession() + { + $this->assertTrue($this->storage->gc(123)); + } + + /** + * @dataProvider getOptionFixtures + */ + public function testSupportedOptions($options, $supported) + { + try { + new MemcacheSessionHandler($this->memcache, $options); + $this->assertTrue($supported); + } catch (\InvalidArgumentException $e) { + $this->assertFalse($supported); + } + } + + public function getOptionFixtures() + { + return array( + array(array('prefix' => 'session'), true), + array(array('expiretime' => 100), true), + array(array('prefix' => 'session', 'expiretime' => 200), true), + array(array('expiretime' => 100, 'foo' => 'bar'), false), + ); + } + + public function testGetConnection() + { + $method = new \ReflectionMethod($this->storage, 'getMemcache'); + $method->setAccessible(true); + + $this->assertInstanceOf('\Memcache', $method->invoke($this->storage)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2e7be359efcfff04427367f21d8d216a660b7882 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler; + +/** + * @requires extension memcached + * @group time-sensitive + */ +class MemcachedSessionHandlerTest extends TestCase +{ + const PREFIX = 'prefix_'; + const TTL = 1000; + + /** + * @var MemcachedSessionHandler + */ + protected $storage; + + protected $memcached; + + protected function setUp() + { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('PHPUnit_MockObject cannot mock the Memcached class on HHVM. See https://github.com/sebastianbergmann/phpunit-mock-objects/pull/289'); + } + + parent::setUp(); + + if (version_compare(phpversion('memcached'), '2.2.0', '>=') && version_compare(phpversion('memcached'), '3.0.0b1', '<')) { + $this->markTestSkipped('Tests can only be run with memcached extension 2.1.0 or lower, or 3.0.0b1 or higher'); + } + + $this->memcached = $this->getMockBuilder('Memcached')->getMock(); + $this->storage = new MemcachedSessionHandler( + $this->memcached, + array('prefix' => self::PREFIX, 'expiretime' => self::TTL) + ); + } + + protected function tearDown() + { + $this->memcached = null; + $this->storage = null; + parent::tearDown(); + } + + public function testOpenSession() + { + $this->assertTrue($this->storage->open('', '')); + } + + public function testCloseSession() + { + $this->assertTrue($this->storage->close()); + } + + public function testReadSession() + { + $this->memcached + ->expects($this->once()) + ->method('get') + ->with(self::PREFIX.'id') + ; + + $this->assertEquals('', $this->storage->read('id')); + } + + public function testWriteSession() + { + $this->memcached + ->expects($this->once()) + ->method('set') + ->with(self::PREFIX.'id', 'data', $this->equalTo(time() + self::TTL, 2)) + ->will($this->returnValue(true)) + ; + + $this->assertTrue($this->storage->write('id', 'data')); + } + + public function testDestroySession() + { + $this->memcached + ->expects($this->once()) + ->method('delete') + ->with(self::PREFIX.'id') + ->will($this->returnValue(true)) + ; + + $this->assertTrue($this->storage->destroy('id')); + } + + public function testGcSession() + { + $this->assertTrue($this->storage->gc(123)); + } + + /** + * @dataProvider getOptionFixtures + */ + public function testSupportedOptions($options, $supported) + { + try { + new MemcachedSessionHandler($this->memcached, $options); + $this->assertTrue($supported); + } catch (\InvalidArgumentException $e) { + $this->assertFalse($supported); + } + } + + public function getOptionFixtures() + { + return array( + array(array('prefix' => 'session'), true), + array(array('expiretime' => 100), true), + array(array('prefix' => 'session', 'expiretime' => 200), true), + array(array('expiretime' => 100, 'foo' => 'bar'), false), + ); + } + + public function testGetConnection() + { + $method = new \ReflectionMethod($this->storage, 'getMemcached'); + $method->setAccessible(true); + + $this->assertInstanceOf('\Memcached', $method->invoke($this->storage)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..eddb610978b65c67660364c1e052e66ff631eb08 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php @@ -0,0 +1,328 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler; + +/** + * @author Markus Bachmann + * @group time-sensitive + */ +class MongoDbSessionHandlerTest extends TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $mongo; + private $storage; + public $options; + + protected function setUp() + { + parent::setUp(); + + if (!extension_loaded('mongo') && !extension_loaded('mongodb')) { + $this->markTestSkipped('The Mongo or MongoDB extension is required.'); + } + + if (phpversion('mongodb')) { + $mongoClass = 'MongoDB\Client'; + } else { + $mongoClass = version_compare(phpversion('mongo'), '1.3.0', '<') ? 'Mongo' : 'MongoClient'; + } + + $this->mongo = $this->getMockBuilder($mongoClass) + ->disableOriginalConstructor() + ->getMock(); + + $this->options = array( + 'id_field' => '_id', + 'data_field' => 'data', + 'time_field' => 'time', + 'expiry_field' => 'expires_at', + 'database' => 'sf2-test', + 'collection' => 'session-test', + ); + + $this->storage = new MongoDbSessionHandler($this->mongo, $this->options); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testConstructorShouldThrowExceptionForInvalidMongo() + { + new MongoDbSessionHandler(new \stdClass(), $this->options); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testConstructorShouldThrowExceptionForMissingOptions() + { + new MongoDbSessionHandler($this->mongo, array()); + } + + public function testOpenMethodAlwaysReturnTrue() + { + $this->assertTrue($this->storage->open('test', 'test'), 'The "open" method should always return true'); + } + + public function testCloseMethodAlwaysReturnTrue() + { + $this->assertTrue($this->storage->close(), 'The "close" method should always return true'); + } + + public function testRead() + { + $collection = $this->createMongoCollectionMock(); + + $this->mongo->expects($this->once()) + ->method('selectCollection') + ->with($this->options['database'], $this->options['collection']) + ->will($this->returnValue($collection)); + + // defining the timeout before the actual method call + // allows to test for "greater than" values in the $criteria + $testTimeout = time() + 1; + + $collection->expects($this->once()) + ->method('findOne') + ->will($this->returnCallback(function ($criteria) use ($testTimeout) { + $this->assertArrayHasKey($this->options['id_field'], $criteria); + $this->assertEquals($criteria[$this->options['id_field']], 'foo'); + + $this->assertArrayHasKey($this->options['expiry_field'], $criteria); + $this->assertArrayHasKey('$gte', $criteria[$this->options['expiry_field']]); + + if (phpversion('mongodb')) { + $this->assertInstanceOf('MongoDB\BSON\UTCDateTime', $criteria[$this->options['expiry_field']]['$gte']); + $this->assertGreaterThanOrEqual(round(((int) $criteria[$this->options['expiry_field']]['$gte']) / 1000), $testTimeout); + } else { + $this->assertInstanceOf('MongoDate', $criteria[$this->options['expiry_field']]['$gte']); + $this->assertGreaterThanOrEqual($criteria[$this->options['expiry_field']]['$gte']->sec, $testTimeout); + } + + $fields = array( + $this->options['id_field'] => 'foo', + ); + + if (phpversion('mongodb')) { + $fields[$this->options['data_field']] = new \MongoDB\BSON\Binary('bar', \MongoDB\BSON\Binary::TYPE_OLD_BINARY); + $fields[$this->options['id_field']] = new \MongoDB\BSON\UTCDateTime(time() * 1000); + } else { + $fields[$this->options['data_field']] = new \MongoBinData('bar', \MongoBinData::BYTE_ARRAY); + $fields[$this->options['id_field']] = new \MongoDate(); + } + + return $fields; + })); + + $this->assertEquals('bar', $this->storage->read('foo')); + } + + public function testWrite() + { + $collection = $this->createMongoCollectionMock(); + + $this->mongo->expects($this->once()) + ->method('selectCollection') + ->with($this->options['database'], $this->options['collection']) + ->will($this->returnValue($collection)); + + $data = array(); + + $methodName = phpversion('mongodb') ? 'updateOne' : 'update'; + + $collection->expects($this->once()) + ->method($methodName) + ->will($this->returnCallback(function ($criteria, $updateData, $options) use (&$data) { + $this->assertEquals(array($this->options['id_field'] => 'foo'), $criteria); + + if (phpversion('mongodb')) { + $this->assertEquals(array('upsert' => true), $options); + } else { + $this->assertEquals(array('upsert' => true, 'multiple' => false), $options); + } + + $data = $updateData['$set']; + })); + + $expectedExpiry = time() + (int) ini_get('session.gc_maxlifetime'); + $this->assertTrue($this->storage->write('foo', 'bar')); + + if (phpversion('mongodb')) { + $this->assertEquals('bar', $data[$this->options['data_field']]->getData()); + $this->assertInstanceOf('MongoDB\BSON\UTCDateTime', $data[$this->options['time_field']]); + $this->assertInstanceOf('MongoDB\BSON\UTCDateTime', $data[$this->options['expiry_field']]); + $this->assertGreaterThanOrEqual($expectedExpiry, round(((int) $data[$this->options['expiry_field']]) / 1000)); + } else { + $this->assertEquals('bar', $data[$this->options['data_field']]->bin); + $this->assertInstanceOf('MongoDate', $data[$this->options['time_field']]); + $this->assertInstanceOf('MongoDate', $data[$this->options['expiry_field']]); + $this->assertGreaterThanOrEqual($expectedExpiry, $data[$this->options['expiry_field']]->sec); + } + } + + public function testWriteWhenUsingExpiresField() + { + $this->options = array( + 'id_field' => '_id', + 'data_field' => 'data', + 'time_field' => 'time', + 'database' => 'sf2-test', + 'collection' => 'session-test', + 'expiry_field' => 'expiresAt', + ); + + $this->storage = new MongoDbSessionHandler($this->mongo, $this->options); + + $collection = $this->createMongoCollectionMock(); + + $this->mongo->expects($this->once()) + ->method('selectCollection') + ->with($this->options['database'], $this->options['collection']) + ->will($this->returnValue($collection)); + + $data = array(); + + $methodName = phpversion('mongodb') ? 'updateOne' : 'update'; + + $collection->expects($this->once()) + ->method($methodName) + ->will($this->returnCallback(function ($criteria, $updateData, $options) use (&$data) { + $this->assertEquals(array($this->options['id_field'] => 'foo'), $criteria); + + if (phpversion('mongodb')) { + $this->assertEquals(array('upsert' => true), $options); + } else { + $this->assertEquals(array('upsert' => true, 'multiple' => false), $options); + } + + $data = $updateData['$set']; + })); + + $this->assertTrue($this->storage->write('foo', 'bar')); + + if (phpversion('mongodb')) { + $this->assertEquals('bar', $data[$this->options['data_field']]->getData()); + $this->assertInstanceOf('MongoDB\BSON\UTCDateTime', $data[$this->options['time_field']]); + $this->assertInstanceOf('MongoDB\BSON\UTCDateTime', $data[$this->options['expiry_field']]); + } else { + $this->assertEquals('bar', $data[$this->options['data_field']]->bin); + $this->assertInstanceOf('MongoDate', $data[$this->options['time_field']]); + $this->assertInstanceOf('MongoDate', $data[$this->options['expiry_field']]); + } + } + + public function testReplaceSessionData() + { + $collection = $this->createMongoCollectionMock(); + + $this->mongo->expects($this->once()) + ->method('selectCollection') + ->with($this->options['database'], $this->options['collection']) + ->will($this->returnValue($collection)); + + $data = array(); + + $methodName = phpversion('mongodb') ? 'updateOne' : 'update'; + + $collection->expects($this->exactly(2)) + ->method($methodName) + ->will($this->returnCallback(function ($criteria, $updateData, $options) use (&$data) { + $data = $updateData; + })); + + $this->storage->write('foo', 'bar'); + $this->storage->write('foo', 'foobar'); + + if (phpversion('mongodb')) { + $this->assertEquals('foobar', $data['$set'][$this->options['data_field']]->getData()); + } else { + $this->assertEquals('foobar', $data['$set'][$this->options['data_field']]->bin); + } + } + + public function testDestroy() + { + $collection = $this->createMongoCollectionMock(); + + $this->mongo->expects($this->once()) + ->method('selectCollection') + ->with($this->options['database'], $this->options['collection']) + ->will($this->returnValue($collection)); + + $methodName = phpversion('mongodb') ? 'deleteOne' : 'remove'; + + $collection->expects($this->once()) + ->method($methodName) + ->with(array($this->options['id_field'] => 'foo')); + + $this->assertTrue($this->storage->destroy('foo')); + } + + public function testGc() + { + $collection = $this->createMongoCollectionMock(); + + $this->mongo->expects($this->once()) + ->method('selectCollection') + ->with($this->options['database'], $this->options['collection']) + ->will($this->returnValue($collection)); + + $methodName = phpversion('mongodb') ? 'deleteOne' : 'remove'; + + $collection->expects($this->once()) + ->method($methodName) + ->will($this->returnCallback(function ($criteria) { + if (phpversion('mongodb')) { + $this->assertInstanceOf('MongoDB\BSON\UTCDateTime', $criteria[$this->options['expiry_field']]['$lt']); + $this->assertGreaterThanOrEqual(time() - 1, round(((int) $criteria[$this->options['expiry_field']]['$lt']) / 1000)); + } else { + $this->assertInstanceOf('MongoDate', $criteria[$this->options['expiry_field']]['$lt']); + $this->assertGreaterThanOrEqual(time() - 1, $criteria[$this->options['expiry_field']]['$lt']->sec); + } + })); + + $this->assertTrue($this->storage->gc(1)); + } + + public function testGetConnection() + { + $method = new \ReflectionMethod($this->storage, 'getMongo'); + $method->setAccessible(true); + + if (phpversion('mongodb')) { + $mongoClass = 'MongoDB\Client'; + } else { + $mongoClass = version_compare(phpversion('mongo'), '1.3.0', '<') ? 'Mongo' : 'MongoClient'; + } + + $this->assertInstanceOf($mongoClass, $method->invoke($this->storage)); + } + + private function createMongoCollectionMock() + { + $collectionClass = 'MongoCollection'; + if (phpversion('mongodb')) { + $collectionClass = 'MongoDB\Collection'; + } + + $collection = $this->getMockBuilder($collectionClass) + ->disableOriginalConstructor() + ->getMock(); + + return $collection; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a6264e51d2a72df84268d2a63ac5485f8f5f2bdb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler; +use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; + +/** + * Test class for NativeFileSessionHandler. + * + * @author Drak + * + * @runTestsInSeparateProcesses + * @preserveGlobalState disabled + */ +class NativeFileSessionHandlerTest extends TestCase +{ + public function testConstruct() + { + $storage = new NativeSessionStorage(array('name' => 'TESTING'), new NativeFileSessionHandler(sys_get_temp_dir())); + + $this->assertEquals('files', $storage->getSaveHandler()->getSaveHandlerName()); + $this->assertEquals('user', ini_get('session.save_handler')); + + $this->assertEquals(sys_get_temp_dir(), ini_get('session.save_path')); + $this->assertEquals('TESTING', ini_get('session.name')); + } + + /** + * @dataProvider savePathDataProvider + */ + public function testConstructSavePath($savePath, $expectedSavePath, $path) + { + $handler = new NativeFileSessionHandler($savePath); + $this->assertEquals($expectedSavePath, ini_get('session.save_path')); + $this->assertTrue(is_dir(realpath($path))); + + rmdir($path); + } + + public function savePathDataProvider() + { + $base = sys_get_temp_dir(); + + return array( + array("$base/foo", "$base/foo", "$base/foo"), + array("5;$base/foo", "5;$base/foo", "$base/foo"), + array("5;0600;$base/foo", "5;0600;$base/foo", "$base/foo"), + ); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testConstructException() + { + $handler = new NativeFileSessionHandler('something;invalid;with;too-many-args'); + } + + public function testConstructDefault() + { + $path = ini_get('session.save_path'); + $storage = new NativeSessionStorage(array('name' => 'TESTING'), new NativeFileSessionHandler()); + + $this->assertEquals($path, ini_get('session.save_path')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeSessionHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeSessionHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5486b2d655ea8e2a61aae88dad517e576dedd6d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeSessionHandlerTest.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler; + +/** + * Test class for NativeSessionHandler. + * + * @author Drak + * + * @runTestsInSeparateProcesses + * @preserveGlobalState disabled + */ +class NativeSessionHandlerTest extends TestCase +{ + public function testConstruct() + { + $handler = new NativeSessionHandler(); + + $this->assertTrue($handler instanceof \SessionHandler); + $this->assertTrue($handler instanceof NativeSessionHandler); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..718fd0f830e492d68e758acdf4d33b0b09a12df5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler; +use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; +use Symfony\Component\HttpFoundation\Session\Session; + +/** + * Test class for NullSessionHandler. + * + * @author Drak + * + * @runTestsInSeparateProcesses + * @preserveGlobalState disabled + */ +class NullSessionHandlerTest extends TestCase +{ + public function testSaveHandlers() + { + $storage = $this->getStorage(); + $this->assertEquals('user', ini_get('session.save_handler')); + } + + public function testSession() + { + session_id('nullsessionstorage'); + $storage = $this->getStorage(); + $session = new Session($storage); + $this->assertNull($session->get('something')); + $session->set('something', 'unique'); + $this->assertEquals('unique', $session->get('something')); + } + + public function testNothingIsPersisted() + { + session_id('nullsessionstorage'); + $storage = $this->getStorage(); + $session = new Session($storage); + $session->start(); + $this->assertEquals('nullsessionstorage', $session->getId()); + $this->assertNull($session->get('something')); + } + + public function getStorage() + { + return new NativeSessionStorage(array(), new NullSessionHandler()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a47120f1807e2d93d73e41a25097d70fe38eef59 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -0,0 +1,370 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler; + +/** + * @requires extension pdo_sqlite + * @group time-sensitive + */ +class PdoSessionHandlerTest extends TestCase +{ + private $dbFile; + + protected function tearDown() + { + // make sure the temporary database file is deleted when it has been created (even when a test fails) + if ($this->dbFile) { + @unlink($this->dbFile); + } + parent::tearDown(); + } + + protected function getPersistentSqliteDsn() + { + $this->dbFile = tempnam(sys_get_temp_dir(), 'sf2_sqlite_sessions'); + + return 'sqlite:'.$this->dbFile; + } + + protected function getMemorySqlitePdo() + { + $pdo = new \PDO('sqlite::memory:'); + $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); + $storage = new PdoSessionHandler($pdo); + $storage->createTable(); + + return $pdo; + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testWrongPdoErrMode() + { + $pdo = $this->getMemorySqlitePdo(); + $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_SILENT); + + $storage = new PdoSessionHandler($pdo); + } + + /** + * @expectedException \RuntimeException + */ + public function testInexistentTable() + { + $storage = new PdoSessionHandler($this->getMemorySqlitePdo(), array('db_table' => 'inexistent_table')); + $storage->open('', 'sid'); + $storage->read('id'); + $storage->write('id', 'data'); + $storage->close(); + } + + /** + * @expectedException \RuntimeException + */ + public function testCreateTableTwice() + { + $storage = new PdoSessionHandler($this->getMemorySqlitePdo()); + $storage->createTable(); + } + + public function testWithLazyDsnConnection() + { + $dsn = $this->getPersistentSqliteDsn(); + + $storage = new PdoSessionHandler($dsn); + $storage->createTable(); + $storage->open('', 'sid'); + $data = $storage->read('id'); + $storage->write('id', 'data'); + $storage->close(); + $this->assertSame('', $data, 'New session returns empty string data'); + + $storage->open('', 'sid'); + $data = $storage->read('id'); + $storage->close(); + $this->assertSame('data', $data, 'Written value can be read back correctly'); + } + + public function testWithLazySavePathConnection() + { + $dsn = $this->getPersistentSqliteDsn(); + + // Open is called with what ini_set('session.save_path', $dsn) would mean + $storage = new PdoSessionHandler(null); + $storage->open($dsn, 'sid'); + $storage->createTable(); + $data = $storage->read('id'); + $storage->write('id', 'data'); + $storage->close(); + $this->assertSame('', $data, 'New session returns empty string data'); + + $storage->open($dsn, 'sid'); + $data = $storage->read('id'); + $storage->close(); + $this->assertSame('data', $data, 'Written value can be read back correctly'); + } + + public function testReadWriteReadWithNullByte() + { + $sessionData = 'da'."\0".'ta'; + + $storage = new PdoSessionHandler($this->getMemorySqlitePdo()); + $storage->open('', 'sid'); + $readData = $storage->read('id'); + $storage->write('id', $sessionData); + $storage->close(); + $this->assertSame('', $readData, 'New session returns empty string data'); + + $storage->open('', 'sid'); + $readData = $storage->read('id'); + $storage->close(); + $this->assertSame($sessionData, $readData, 'Written value can be read back correctly'); + } + + public function testReadConvertsStreamToString() + { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('PHPUnit_MockObject cannot mock the PDOStatement class on HHVM. See https://github.com/sebastianbergmann/phpunit-mock-objects/pull/289'); + } + + $pdo = new MockPdo('pgsql'); + $pdo->prepareResult = $this->getMockBuilder('PDOStatement')->getMock(); + + $content = 'foobar'; + $stream = $this->createStream($content); + + $pdo->prepareResult->expects($this->once())->method('fetchAll') + ->will($this->returnValue(array(array($stream, 42, time())))); + + $storage = new PdoSessionHandler($pdo); + $result = $storage->read('foo'); + + $this->assertSame($content, $result); + } + + public function testReadLockedConvertsStreamToString() + { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('PHPUnit_MockObject cannot mock the PDOStatement class on HHVM. See https://github.com/sebastianbergmann/phpunit-mock-objects/pull/289'); + } + + $pdo = new MockPdo('pgsql'); + $selectStmt = $this->getMockBuilder('PDOStatement')->getMock(); + $insertStmt = $this->getMockBuilder('PDOStatement')->getMock(); + + $pdo->prepareResult = function ($statement) use ($selectStmt, $insertStmt) { + return 0 === strpos($statement, 'INSERT') ? $insertStmt : $selectStmt; + }; + + $content = 'foobar'; + $stream = $this->createStream($content); + $exception = null; + + $selectStmt->expects($this->atLeast(2))->method('fetchAll') + ->will($this->returnCallback(function () use (&$exception, $stream) { + return $exception ? array(array($stream, 42, time())) : array(); + })); + + $insertStmt->expects($this->once())->method('execute') + ->will($this->returnCallback(function () use (&$exception) { + throw $exception = new \PDOException('', '23'); + })); + + $storage = new PdoSessionHandler($pdo); + $result = $storage->read('foo'); + + $this->assertSame($content, $result); + } + + public function testReadingRequiresExactlySameId() + { + $storage = new PdoSessionHandler($this->getMemorySqlitePdo()); + $storage->open('', 'sid'); + $storage->write('id', 'data'); + $storage->write('test', 'data'); + $storage->write('space ', 'data'); + $storage->close(); + + $storage->open('', 'sid'); + $readDataCaseSensitive = $storage->read('ID'); + $readDataNoCharFolding = $storage->read('tést'); + $readDataKeepSpace = $storage->read('space '); + $readDataExtraSpace = $storage->read('space '); + $storage->close(); + + $this->assertSame('', $readDataCaseSensitive, 'Retrieval by ID should be case-sensitive (collation setting)'); + $this->assertSame('', $readDataNoCharFolding, 'Retrieval by ID should not do character folding (collation setting)'); + $this->assertSame('data', $readDataKeepSpace, 'Retrieval by ID requires spaces as-is'); + $this->assertSame('', $readDataExtraSpace, 'Retrieval by ID requires spaces as-is'); + } + + /** + * Simulates session_regenerate_id(true) which will require an INSERT or UPDATE (replace). + */ + public function testWriteDifferentSessionIdThanRead() + { + $storage = new PdoSessionHandler($this->getMemorySqlitePdo()); + $storage->open('', 'sid'); + $storage->read('id'); + $storage->destroy('id'); + $storage->write('new_id', 'data_of_new_session_id'); + $storage->close(); + + $storage->open('', 'sid'); + $data = $storage->read('new_id'); + $storage->close(); + + $this->assertSame('data_of_new_session_id', $data, 'Data of regenerated session id is available'); + } + + public function testWrongUsageStillWorks() + { + // wrong method sequence that should no happen, but still works + $storage = new PdoSessionHandler($this->getMemorySqlitePdo()); + $storage->write('id', 'data'); + $storage->write('other_id', 'other_data'); + $storage->destroy('inexistent'); + $storage->open('', 'sid'); + $data = $storage->read('id'); + $otherData = $storage->read('other_id'); + $storage->close(); + + $this->assertSame('data', $data); + $this->assertSame('other_data', $otherData); + } + + public function testSessionDestroy() + { + $pdo = $this->getMemorySqlitePdo(); + $storage = new PdoSessionHandler($pdo); + + $storage->open('', 'sid'); + $storage->read('id'); + $storage->write('id', 'data'); + $storage->close(); + $this->assertEquals(1, $pdo->query('SELECT COUNT(*) FROM sessions')->fetchColumn()); + + $storage->open('', 'sid'); + $storage->read('id'); + $storage->destroy('id'); + $storage->close(); + $this->assertEquals(0, $pdo->query('SELECT COUNT(*) FROM sessions')->fetchColumn()); + + $storage->open('', 'sid'); + $data = $storage->read('id'); + $storage->close(); + $this->assertSame('', $data, 'Destroyed session returns empty string'); + } + + public function testSessionGC() + { + $previousLifeTime = ini_set('session.gc_maxlifetime', 1000); + $pdo = $this->getMemorySqlitePdo(); + $storage = new PdoSessionHandler($pdo); + + $storage->open('', 'sid'); + $storage->read('id'); + $storage->write('id', 'data'); + $storage->close(); + + $storage->open('', 'sid'); + $storage->read('gc_id'); + ini_set('session.gc_maxlifetime', -1); // test that you can set lifetime of a session after it has been read + $storage->write('gc_id', 'data'); + $storage->close(); + $this->assertEquals(2, $pdo->query('SELECT COUNT(*) FROM sessions')->fetchColumn(), 'No session pruned because gc not called'); + + $storage->open('', 'sid'); + $data = $storage->read('gc_id'); + $storage->gc(-1); + $storage->close(); + + ini_set('session.gc_maxlifetime', $previousLifeTime); + + $this->assertSame('', $data, 'Session already considered garbage, so not returning data even if it is not pruned yet'); + $this->assertEquals(1, $pdo->query('SELECT COUNT(*) FROM sessions')->fetchColumn(), 'Expired session is pruned'); + } + + public function testGetConnection() + { + $storage = new PdoSessionHandler($this->getMemorySqlitePdo()); + + $method = new \ReflectionMethod($storage, 'getConnection'); + $method->setAccessible(true); + + $this->assertInstanceOf('\PDO', $method->invoke($storage)); + } + + public function testGetConnectionConnectsIfNeeded() + { + $storage = new PdoSessionHandler('sqlite::memory:'); + + $method = new \ReflectionMethod($storage, 'getConnection'); + $method->setAccessible(true); + + $this->assertInstanceOf('\PDO', $method->invoke($storage)); + } + + private function createStream($content) + { + $stream = tmpfile(); + fwrite($stream, $content); + fseek($stream, 0); + + return $stream; + } +} + +class MockPdo extends \PDO +{ + public $prepareResult; + private $driverName; + private $errorMode; + + public function __construct($driverName = null, $errorMode = null) + { + $this->driverName = $driverName; + $this->errorMode = null !== $errorMode ?: \PDO::ERRMODE_EXCEPTION; + } + + public function getAttribute($attribute) + { + if (\PDO::ATTR_ERRMODE === $attribute) { + return $this->errorMode; + } + + if (\PDO::ATTR_DRIVER_NAME === $attribute) { + return $this->driverName; + } + + return parent::getAttribute($attribute); + } + + public function prepare($statement, $driverOptions = array()) + { + return is_callable($this->prepareResult) + ? call_user_func($this->prepareResult, $statement, $driverOptions) + : $this->prepareResult; + } + + public function beginTransaction() + { + } + + public function rollBack() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/WriteCheckSessionHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/WriteCheckSessionHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5e41a4743edd5b53cf0757d92546b5815facf68d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/WriteCheckSessionHandlerTest.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\WriteCheckSessionHandler; + +/** + * @author Adrien Brault + */ +class WriteCheckSessionHandlerTest extends TestCase +{ + public function test() + { + $wrappedSessionHandlerMock = $this->getMockBuilder('SessionHandlerInterface')->getMock(); + $writeCheckSessionHandler = new WriteCheckSessionHandler($wrappedSessionHandlerMock); + + $wrappedSessionHandlerMock + ->expects($this->once()) + ->method('close') + ->with() + ->will($this->returnValue(true)) + ; + + $this->assertTrue($writeCheckSessionHandler->close()); + } + + public function testWrite() + { + $wrappedSessionHandlerMock = $this->getMockBuilder('SessionHandlerInterface')->getMock(); + $writeCheckSessionHandler = new WriteCheckSessionHandler($wrappedSessionHandlerMock); + + $wrappedSessionHandlerMock + ->expects($this->once()) + ->method('write') + ->with('foo', 'bar') + ->will($this->returnValue(true)) + ; + + $this->assertTrue($writeCheckSessionHandler->write('foo', 'bar')); + } + + public function testSkippedWrite() + { + $wrappedSessionHandlerMock = $this->getMockBuilder('SessionHandlerInterface')->getMock(); + $writeCheckSessionHandler = new WriteCheckSessionHandler($wrappedSessionHandlerMock); + + $wrappedSessionHandlerMock + ->expects($this->once()) + ->method('read') + ->with('foo') + ->will($this->returnValue('bar')) + ; + + $wrappedSessionHandlerMock + ->expects($this->never()) + ->method('write') + ; + + $this->assertEquals('bar', $writeCheckSessionHandler->read('foo')); + $this->assertTrue($writeCheckSessionHandler->write('foo', 'bar')); + } + + public function testNonSkippedWrite() + { + $wrappedSessionHandlerMock = $this->getMockBuilder('SessionHandlerInterface')->getMock(); + $writeCheckSessionHandler = new WriteCheckSessionHandler($wrappedSessionHandlerMock); + + $wrappedSessionHandlerMock + ->expects($this->once()) + ->method('read') + ->with('foo') + ->will($this->returnValue('bar')) + ; + + $wrappedSessionHandlerMock + ->expects($this->once()) + ->method('write') + ->with('foo', 'baZZZ') + ->will($this->returnValue(true)) + ; + + $this->assertEquals('bar', $writeCheckSessionHandler->read('foo')); + $this->assertTrue($writeCheckSessionHandler->write('foo', 'baZZZ')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1f55a2d5c440dcbc3a911617f3b8c71b374ecd85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; + +/** + * Test class for MetadataBag. + * + * @group time-sensitive + */ +class MetadataBagTest extends TestCase +{ + /** + * @var MetadataBag + */ + protected $bag; + + /** + * @var array + */ + protected $array = array(); + + protected function setUp() + { + parent::setUp(); + $this->bag = new MetadataBag(); + $this->array = array(MetadataBag::CREATED => 1234567, MetadataBag::UPDATED => 12345678, MetadataBag::LIFETIME => 0); + $this->bag->initialize($this->array); + } + + protected function tearDown() + { + $this->array = array(); + $this->bag = null; + parent::tearDown(); + } + + public function testInitialize() + { + $sessionMetadata = array(); + + $bag1 = new MetadataBag(); + $bag1->initialize($sessionMetadata); + $this->assertGreaterThanOrEqual(time(), $bag1->getCreated()); + $this->assertEquals($bag1->getCreated(), $bag1->getLastUsed()); + + sleep(1); + $bag2 = new MetadataBag(); + $bag2->initialize($sessionMetadata); + $this->assertEquals($bag1->getCreated(), $bag2->getCreated()); + $this->assertEquals($bag1->getLastUsed(), $bag2->getLastUsed()); + $this->assertEquals($bag2->getCreated(), $bag2->getLastUsed()); + + sleep(1); + $bag3 = new MetadataBag(); + $bag3->initialize($sessionMetadata); + $this->assertEquals($bag1->getCreated(), $bag3->getCreated()); + $this->assertGreaterThan($bag2->getLastUsed(), $bag3->getLastUsed()); + $this->assertNotEquals($bag3->getCreated(), $bag3->getLastUsed()); + } + + public function testGetSetName() + { + $this->assertEquals('__metadata', $this->bag->getName()); + $this->bag->setName('foo'); + $this->assertEquals('foo', $this->bag->getName()); + } + + public function testGetStorageKey() + { + $this->assertEquals('_sf2_meta', $this->bag->getStorageKey()); + } + + public function testGetLifetime() + { + $bag = new MetadataBag(); + $array = array(MetadataBag::CREATED => 1234567, MetadataBag::UPDATED => 12345678, MetadataBag::LIFETIME => 1000); + $bag->initialize($array); + $this->assertEquals(1000, $bag->getLifetime()); + } + + public function testGetCreated() + { + $this->assertEquals(1234567, $this->bag->getCreated()); + } + + public function testGetLastUsed() + { + $this->assertLessThanOrEqual(time(), $this->bag->getLastUsed()); + } + + public function testClear() + { + $this->bag->clear(); + } + + public function testSkipLastUsedUpdate() + { + $bag = new MetadataBag('', 30); + $timeStamp = time(); + + $created = $timeStamp - 15; + $sessionMetadata = array( + MetadataBag::CREATED => $created, + MetadataBag::UPDATED => $created, + MetadataBag::LIFETIME => 1000, + ); + $bag->initialize($sessionMetadata); + + $this->assertEquals($created, $sessionMetadata[MetadataBag::UPDATED]); + } + + public function testDoesNotSkipLastUsedUpdate() + { + $bag = new MetadataBag('', 30); + $timeStamp = time(); + + $created = $timeStamp - 45; + $sessionMetadata = array( + MetadataBag::CREATED => $created, + MetadataBag::UPDATED => $created, + MetadataBag::LIFETIME => 1000, + ); + $bag->initialize($sessionMetadata); + + $this->assertEquals($timeStamp, $sessionMetadata[MetadataBag::UPDATED]); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..99da778b5fd875fcee835a2940d2742ad1c657fa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; + +/** + * Test class for MockArraySessionStorage. + * + * @author Drak + */ +class MockArraySessionStorageTest extends TestCase +{ + /** + * @var MockArraySessionStorage + */ + private $storage; + + /** + * @var AttributeBag + */ + private $attributes; + + /** + * @var FlashBag + */ + private $flashes; + + private $data; + + protected function setUp() + { + $this->attributes = new AttributeBag(); + $this->flashes = new FlashBag(); + + $this->data = array( + $this->attributes->getStorageKey() => array('foo' => 'bar'), + $this->flashes->getStorageKey() => array('notice' => 'hello'), + ); + + $this->storage = new MockArraySessionStorage(); + $this->storage->registerBag($this->flashes); + $this->storage->registerBag($this->attributes); + $this->storage->setSessionData($this->data); + } + + protected function tearDown() + { + $this->data = null; + $this->flashes = null; + $this->attributes = null; + $this->storage = null; + } + + public function testStart() + { + $this->assertEquals('', $this->storage->getId()); + $this->storage->start(); + $id = $this->storage->getId(); + $this->assertNotEquals('', $id); + $this->storage->start(); + $this->assertEquals($id, $this->storage->getId()); + } + + public function testRegenerate() + { + $this->storage->start(); + $id = $this->storage->getId(); + $this->storage->regenerate(); + $this->assertNotEquals($id, $this->storage->getId()); + $this->assertEquals(array('foo' => 'bar'), $this->storage->getBag('attributes')->all()); + $this->assertEquals(array('notice' => 'hello'), $this->storage->getBag('flashes')->peekAll()); + + $id = $this->storage->getId(); + $this->storage->regenerate(true); + $this->assertNotEquals($id, $this->storage->getId()); + $this->assertEquals(array('foo' => 'bar'), $this->storage->getBag('attributes')->all()); + $this->assertEquals(array('notice' => 'hello'), $this->storage->getBag('flashes')->peekAll()); + } + + public function testGetId() + { + $this->assertEquals('', $this->storage->getId()); + $this->storage->start(); + $this->assertNotEquals('', $this->storage->getId()); + } + + /** + * @expectedException \RuntimeException + */ + public function testUnstartedSave() + { + $this->storage->save(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..53accd38447d3809286da95db538bf33e10cc499 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; + +/** + * Test class for MockFileSessionStorage. + * + * @author Drak + */ +class MockFileSessionStorageTest extends TestCase +{ + /** + * @var string + */ + private $sessionDir; + + /** + * @var MockFileSessionStorage + */ + protected $storage; + + protected function setUp() + { + $this->sessionDir = sys_get_temp_dir().'/sf2test'; + $this->storage = $this->getStorage(); + } + + protected function tearDown() + { + $this->sessionDir = null; + $this->storage = null; + array_map('unlink', glob($this->sessionDir.'/*.session')); + if (is_dir($this->sessionDir)) { + rmdir($this->sessionDir); + } + } + + public function testStart() + { + $this->assertEquals('', $this->storage->getId()); + $this->assertTrue($this->storage->start()); + $id = $this->storage->getId(); + $this->assertNotEquals('', $this->storage->getId()); + $this->assertTrue($this->storage->start()); + $this->assertEquals($id, $this->storage->getId()); + } + + public function testRegenerate() + { + $this->storage->start(); + $this->storage->getBag('attributes')->set('regenerate', 1234); + $this->storage->regenerate(); + $this->assertEquals(1234, $this->storage->getBag('attributes')->get('regenerate')); + $this->storage->regenerate(true); + $this->assertEquals(1234, $this->storage->getBag('attributes')->get('regenerate')); + } + + public function testGetId() + { + $this->assertEquals('', $this->storage->getId()); + $this->storage->start(); + $this->assertNotEquals('', $this->storage->getId()); + } + + public function testSave() + { + $this->storage->start(); + $id = $this->storage->getId(); + $this->assertNotEquals('108', $this->storage->getBag('attributes')->get('new')); + $this->assertFalse($this->storage->getBag('flashes')->has('newkey')); + $this->storage->getBag('attributes')->set('new', '108'); + $this->storage->getBag('flashes')->set('newkey', 'test'); + $this->storage->save(); + + $storage = $this->getStorage(); + $storage->setId($id); + $storage->start(); + $this->assertEquals('108', $storage->getBag('attributes')->get('new')); + $this->assertTrue($storage->getBag('flashes')->has('newkey')); + $this->assertEquals(array('test'), $storage->getBag('flashes')->peek('newkey')); + } + + public function testMultipleInstances() + { + $storage1 = $this->getStorage(); + $storage1->start(); + $storage1->getBag('attributes')->set('foo', 'bar'); + $storage1->save(); + + $storage2 = $this->getStorage(); + $storage2->setId($storage1->getId()); + $storage2->start(); + $this->assertEquals('bar', $storage2->getBag('attributes')->get('foo'), 'values persist between instances'); + } + + /** + * @expectedException \RuntimeException + */ + public function testSaveWithoutStart() + { + $storage1 = $this->getStorage(); + $storage1->save(); + } + + private function getStorage() + { + $storage = new MockFileSessionStorage($this->sessionDir); + $storage->registerBag(new FlashBag()); + $storage->registerBag(new AttributeBag()); + + return $storage; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..818c63a9d2ae23cb00a3c36d4f1c1d9e89886132 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -0,0 +1,247 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler; +use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; +use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy; + +/** + * Test class for NativeSessionStorage. + * + * @author Drak + * + * These tests require separate processes. + * + * @runTestsInSeparateProcesses + * @preserveGlobalState disabled + */ +class NativeSessionStorageTest extends TestCase +{ + private $savePath; + + protected function setUp() + { + $this->iniSet('session.save_handler', 'files'); + $this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sf2test'); + if (!is_dir($this->savePath)) { + mkdir($this->savePath); + } + } + + protected function tearDown() + { + session_write_close(); + array_map('unlink', glob($this->savePath.'/*')); + if (is_dir($this->savePath)) { + rmdir($this->savePath); + } + + $this->savePath = null; + } + + /** + * @param array $options + * + * @return NativeSessionStorage + */ + protected function getStorage(array $options = array()) + { + $storage = new NativeSessionStorage($options); + $storage->registerBag(new AttributeBag()); + + return $storage; + } + + public function testBag() + { + $storage = $this->getStorage(); + $bag = new FlashBag(); + $storage->registerBag($bag); + $this->assertSame($bag, $storage->getBag($bag->getName())); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testRegisterBagException() + { + $storage = $this->getStorage(); + $storage->getBag('non_existing'); + } + + /** + * @expectedException \LogicException + */ + public function testRegisterBagForAStartedSessionThrowsException() + { + $storage = $this->getStorage(); + $storage->start(); + $storage->registerBag(new AttributeBag()); + } + + public function testGetId() + { + $storage = $this->getStorage(); + $this->assertSame('', $storage->getId(), 'Empty ID before starting session'); + + $storage->start(); + $id = $storage->getId(); + $this->assertInternalType('string', $id); + $this->assertNotSame('', $id); + + $storage->save(); + $this->assertSame($id, $storage->getId(), 'ID stays after saving session'); + } + + public function testRegenerate() + { + $storage = $this->getStorage(); + $storage->start(); + $id = $storage->getId(); + $storage->getBag('attributes')->set('lucky', 7); + $storage->regenerate(); + $this->assertNotEquals($id, $storage->getId()); + $this->assertEquals(7, $storage->getBag('attributes')->get('lucky')); + } + + public function testRegenerateDestroy() + { + $storage = $this->getStorage(); + $storage->start(); + $id = $storage->getId(); + $storage->getBag('attributes')->set('legs', 11); + $storage->regenerate(true); + $this->assertNotEquals($id, $storage->getId()); + $this->assertEquals(11, $storage->getBag('attributes')->get('legs')); + } + + public function testSessionGlobalIsUpToDateAfterIdRegeneration() + { + $storage = $this->getStorage(); + $storage->start(); + $storage->getBag('attributes')->set('lucky', 7); + $storage->regenerate(); + $storage->getBag('attributes')->set('lucky', 42); + + $this->assertEquals(42, $_SESSION['_sf2_attributes']['lucky']); + } + + public function testRegenerationFailureDoesNotFlagStorageAsStarted() + { + $storage = $this->getStorage(); + $this->assertFalse($storage->regenerate()); + $this->assertFalse($storage->isStarted()); + } + + public function testDefaultSessionCacheLimiter() + { + $this->iniSet('session.cache_limiter', 'nocache'); + + $storage = new NativeSessionStorage(); + $this->assertEquals('', ini_get('session.cache_limiter')); + } + + public function testExplicitSessionCacheLimiter() + { + $this->iniSet('session.cache_limiter', 'nocache'); + + $storage = new NativeSessionStorage(array('cache_limiter' => 'public')); + $this->assertEquals('public', ini_get('session.cache_limiter')); + } + + public function testCookieOptions() + { + $options = array( + 'cookie_lifetime' => 123456, + 'cookie_path' => '/my/cookie/path', + 'cookie_domain' => 'symfony.example.com', + 'cookie_secure' => true, + 'cookie_httponly' => false, + ); + + $this->getStorage($options); + $temp = session_get_cookie_params(); + $gco = array(); + + foreach ($temp as $key => $value) { + $gco['cookie_'.$key] = $value; + } + + $this->assertEquals($options, $gco); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testSetSaveHandlerException() + { + $storage = $this->getStorage(); + $storage->setSaveHandler(new \stdClass()); + } + + public function testSetSaveHandler() + { + $this->iniSet('session.save_handler', 'files'); + $storage = $this->getStorage(); + $storage->setSaveHandler(); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy', $storage->getSaveHandler()); + $storage->setSaveHandler(null); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy', $storage->getSaveHandler()); + $storage->setSaveHandler(new SessionHandlerProxy(new NativeSessionHandler())); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy', $storage->getSaveHandler()); + $storage->setSaveHandler(new NativeSessionHandler()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy', $storage->getSaveHandler()); + $storage->setSaveHandler(new SessionHandlerProxy(new NullSessionHandler())); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy', $storage->getSaveHandler()); + $storage->setSaveHandler(new NullSessionHandler()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy', $storage->getSaveHandler()); + } + + /** + * @expectedException \RuntimeException + */ + public function testStarted() + { + $storage = $this->getStorage(); + + $this->assertFalse($storage->getSaveHandler()->isActive()); + $this->assertFalse($storage->isStarted()); + + session_start(); + $this->assertTrue(isset($_SESSION)); + $this->assertTrue($storage->getSaveHandler()->isActive()); + + // PHP session might have started, but the storage driver has not, so false is correct here + $this->assertFalse($storage->isStarted()); + + $key = $storage->getMetadataBag()->getStorageKey(); + $this->assertFalse(isset($_SESSION[$key])); + $storage->start(); + } + + public function testRestart() + { + $storage = $this->getStorage(); + $storage->start(); + $id = $storage->getId(); + $storage->getBag('attributes')->set('lucky', 7); + $storage->save(); + $storage->start(); + $this->assertSame($id, $storage->getId(), 'Same session ID after restarting'); + $this->assertSame(7, $storage->getBag('attributes')->get('lucky'), 'Data still available'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b8b98386c3367c482bf94b4b4585753c40e75854 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.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\Component\HttpFoundation\Tests\Session\Storage; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorage; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; + +/** + * Test class for PhpSessionStorage. + * + * @author Drak + * + * These tests require separate processes. + * + * @runTestsInSeparateProcesses + * @preserveGlobalState disabled + */ +class PhpBridgeSessionStorageTest extends TestCase +{ + private $savePath; + + protected function setUp() + { + $this->iniSet('session.save_handler', 'files'); + $this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sf2test'); + if (!is_dir($this->savePath)) { + mkdir($this->savePath); + } + } + + protected function tearDown() + { + session_write_close(); + array_map('unlink', glob($this->savePath.'/*')); + if (is_dir($this->savePath)) { + rmdir($this->savePath); + } + + $this->savePath = null; + } + + /** + * @return PhpBridgeSessionStorage + */ + protected function getStorage() + { + $storage = new PhpBridgeSessionStorage(); + $storage->registerBag(new AttributeBag()); + + return $storage; + } + + public function testPhpSession() + { + $storage = $this->getStorage(); + + $this->assertFalse($storage->getSaveHandler()->isActive()); + $this->assertFalse($storage->isStarted()); + + session_start(); + $this->assertTrue(isset($_SESSION)); + // in PHP 5.4 we can reliably detect a session started + $this->assertTrue($storage->getSaveHandler()->isActive()); + // PHP session might have started, but the storage driver has not, so false is correct here + $this->assertFalse($storage->isStarted()); + + $key = $storage->getMetadataBag()->getStorageKey(); + $this->assertFalse(isset($_SESSION[$key])); + $storage->start(); + $this->assertTrue(isset($_SESSION[$key])); + } + + public function testClear() + { + $storage = $this->getStorage(); + session_start(); + $_SESSION['drak'] = 'loves symfony'; + $storage->getBag('attributes')->set('symfony', 'greatness'); + $key = $storage->getBag('attributes')->getStorageKey(); + $this->assertEquals($_SESSION[$key], array('symfony' => 'greatness')); + $this->assertEquals($_SESSION['drak'], 'loves symfony'); + $storage->clear(); + $this->assertEquals($_SESSION[$key], array()); + $this->assertEquals($_SESSION['drak'], 'loves symfony'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ef1da130a2a1a84d0816b733e8e1aa8e3a209933 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php @@ -0,0 +1,145 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Proxy; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; + +// Note until PHPUnit_Mock_Objects 1.2 is released you cannot mock abstracts due to +// https://github.com/sebastianbergmann/phpunit-mock-objects/issues/73 +class ConcreteProxy extends AbstractProxy +{ +} + +class ConcreteSessionHandlerInterfaceProxy extends AbstractProxy implements \SessionHandlerInterface +{ + public function open($savePath, $sessionName) + { + } + + public function close() + { + } + + public function read($id) + { + } + + public function write($id, $data) + { + } + + public function destroy($id) + { + } + + public function gc($maxlifetime) + { + } +} + +/** + * Test class for AbstractProxy. + * + * @author Drak + */ +class AbstractProxyTest extends TestCase +{ + /** + * @var AbstractProxy + */ + protected $proxy; + + protected function setUp() + { + $this->proxy = new ConcreteProxy(); + } + + protected function tearDown() + { + $this->proxy = null; + } + + public function testGetSaveHandlerName() + { + $this->assertNull($this->proxy->getSaveHandlerName()); + } + + public function testIsSessionHandlerInterface() + { + $this->assertFalse($this->proxy->isSessionHandlerInterface()); + $sh = new ConcreteSessionHandlerInterfaceProxy(); + $this->assertTrue($sh->isSessionHandlerInterface()); + } + + public function testIsWrapper() + { + $this->assertFalse($this->proxy->isWrapper()); + } + + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testIsActive() + { + $this->assertFalse($this->proxy->isActive()); + session_start(); + $this->assertTrue($this->proxy->isActive()); + } + + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testName() + { + $this->assertEquals(session_name(), $this->proxy->getName()); + $this->proxy->setName('foo'); + $this->assertEquals('foo', $this->proxy->getName()); + $this->assertEquals(session_name(), $this->proxy->getName()); + } + + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + * @expectedException \LogicException + */ + public function testNameException() + { + session_start(); + $this->proxy->setName('foo'); + } + + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testId() + { + $this->assertEquals(session_id(), $this->proxy->getId()); + $this->proxy->setId('foo'); + $this->assertEquals('foo', $this->proxy->getId()); + $this->assertEquals(session_id(), $this->proxy->getId()); + } + + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + * @expectedException \LogicException + */ + public function testIdException() + { + session_start(); + $this->proxy->setId('foo'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/NativeProxyTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/NativeProxyTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8ec305344136659294bf2107f641e5542583ce2f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/NativeProxyTest.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\Component\HttpFoundation\Tests\Session\Storage\Proxy; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy; + +/** + * Test class for NativeProxy. + * + * @author Drak + */ +class NativeProxyTest extends TestCase +{ + public function testIsWrapper() + { + $proxy = new NativeProxy(); + $this->assertFalse($proxy->isWrapper()); + } + + public function testGetSaveHandlerName() + { + $name = ini_get('session.save_handler'); + $proxy = new NativeProxy(); + $this->assertEquals($name, $proxy->getSaveHandlerName()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php new file mode 100644 index 0000000000000000000000000000000000000000..682825356a7246a329f25fda230fa960f061d184 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Proxy; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy; + +/** + * Tests for SessionHandlerProxy class. + * + * @author Drak + * + * @runTestsInSeparateProcesses + * @preserveGlobalState disabled + */ +class SessionHandlerProxyTest extends TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_Matcher + */ + private $mock; + + /** + * @var SessionHandlerProxy + */ + private $proxy; + + protected function setUp() + { + $this->mock = $this->getMockBuilder('SessionHandlerInterface')->getMock(); + $this->proxy = new SessionHandlerProxy($this->mock); + } + + protected function tearDown() + { + $this->mock = null; + $this->proxy = null; + } + + public function testOpenTrue() + { + $this->mock->expects($this->once()) + ->method('open') + ->will($this->returnValue(true)); + + $this->assertFalse($this->proxy->isActive()); + $this->proxy->open('name', 'id'); + $this->assertFalse($this->proxy->isActive()); + } + + public function testOpenFalse() + { + $this->mock->expects($this->once()) + ->method('open') + ->will($this->returnValue(false)); + + $this->assertFalse($this->proxy->isActive()); + $this->proxy->open('name', 'id'); + $this->assertFalse($this->proxy->isActive()); + } + + public function testClose() + { + $this->mock->expects($this->once()) + ->method('close') + ->will($this->returnValue(true)); + + $this->assertFalse($this->proxy->isActive()); + $this->proxy->close(); + $this->assertFalse($this->proxy->isActive()); + } + + public function testCloseFalse() + { + $this->mock->expects($this->once()) + ->method('close') + ->will($this->returnValue(false)); + + $this->assertFalse($this->proxy->isActive()); + $this->proxy->close(); + $this->assertFalse($this->proxy->isActive()); + } + + public function testRead() + { + $this->mock->expects($this->once()) + ->method('read'); + + $this->proxy->read('id'); + } + + public function testWrite() + { + $this->mock->expects($this->once()) + ->method('write'); + + $this->proxy->write('id', 'data'); + } + + public function testDestroy() + { + $this->mock->expects($this->once()) + ->method('destroy'); + + $this->proxy->destroy('id'); + } + + public function testGc() + { + $this->mock->expects($this->once()) + ->method('gc'); + + $this->proxy->gc(86400); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f7a99a331e6178303edbe881ac28dc9533d9f6c3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\StreamedResponse; + +class StreamedResponseTest extends TestCase +{ + public function testConstructor() + { + $response = new StreamedResponse(function () { echo 'foo'; }, 404, array('Content-Type' => 'text/plain')); + + $this->assertEquals(404, $response->getStatusCode()); + $this->assertEquals('text/plain', $response->headers->get('Content-Type')); + } + + public function testPrepareWith11Protocol() + { + $response = new StreamedResponse(function () { echo 'foo'; }); + $request = Request::create('/'); + $request->server->set('SERVER_PROTOCOL', 'HTTP/1.1'); + + $response->prepare($request); + + $this->assertEquals('1.1', $response->getProtocolVersion()); + $this->assertNotEquals('chunked', $response->headers->get('Transfer-Encoding'), 'Apache assumes responses with a Transfer-Encoding header set to chunked to already be encoded.'); + } + + public function testPrepareWith10Protocol() + { + $response = new StreamedResponse(function () { echo 'foo'; }); + $request = Request::create('/'); + $request->server->set('SERVER_PROTOCOL', 'HTTP/1.0'); + + $response->prepare($request); + + $this->assertEquals('1.0', $response->getProtocolVersion()); + $this->assertNull($response->headers->get('Transfer-Encoding')); + } + + public function testPrepareWithHeadRequest() + { + $response = new StreamedResponse(function () { echo 'foo'; }); + $request = Request::create('/', 'HEAD'); + + $response->prepare($request); + } + + public function testPrepareWithCacheHeaders() + { + $response = new StreamedResponse(function () { echo 'foo'; }, 200, array('Cache-Control' => 'max-age=600, public')); + $request = Request::create('/', 'GET'); + + $response->prepare($request); + $this->assertEquals('max-age=600, public', $response->headers->get('Cache-Control')); + } + + public function testSendContent() + { + $called = 0; + + $response = new StreamedResponse(function () use (&$called) { ++$called; }); + + $response->sendContent(); + $this->assertEquals(1, $called); + + $response->sendContent(); + $this->assertEquals(1, $called); + } + + /** + * @expectedException \LogicException + */ + public function testSendContentWithNonCallable() + { + $response = new StreamedResponse(null); + $response->sendContent(); + } + + /** + * @expectedException \LogicException + */ + public function testSetContent() + { + $response = new StreamedResponse(function () { echo 'foo'; }); + $response->setContent('foo'); + } + + public function testGetContent() + { + $response = new StreamedResponse(function () { echo 'foo'; }); + $this->assertFalse($response->getContent()); + } + + public function testCreate() + { + $response = StreamedResponse::create(function () {}, 204); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\StreamedResponse', $response); + $this->assertEquals(204, $response->getStatusCode()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/composer.json b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..33364d877fb5476239068194dbdd3ae732e4542c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/composer.json @@ -0,0 +1,37 @@ +{ + "name": "symfony/http-foundation", + "type": "library", + "description": "Symfony HttpFoundation Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..9ffdb43a2d7445eb0562db274c81c6f566fb0d23 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Bundle/Bundle.php new file mode 100644 index 0000000000000000000000000000000000000000..8505bbbddd3f0af9c0757dec8cf07d0086541ea1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Bundle/Bundle.php @@ -0,0 +1,230 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Bundle; + +use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\Console\Application; +use Symfony\Component\Finder\Finder; +use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; + +/** + * An implementation of BundleInterface that adds a few conventions + * for DependencyInjection extensions and Console commands. + * + * @author Fabien Potencier + */ +abstract class Bundle implements BundleInterface +{ + use ContainerAwareTrait; + + protected $name; + protected $extension; + protected $path; + private $namespace; + + /** + * Boots the Bundle. + */ + public function boot() + { + } + + /** + * Shutdowns the Bundle. + */ + public function shutdown() + { + } + + /** + * Builds the bundle. + * + * It is only ever called once when the cache is empty. + * + * This method can be overridden to register compilation passes, + * other extensions, ... + * + * @param ContainerBuilder $container A ContainerBuilder instance + */ + public function build(ContainerBuilder $container) + { + } + + /** + * Returns the bundle's container extension. + * + * @return ExtensionInterface|null The container extension + * + * @throws \LogicException + */ + public function getContainerExtension() + { + if (null === $this->extension) { + $extension = $this->createContainerExtension(); + + if (null !== $extension) { + if (!$extension instanceof ExtensionInterface) { + throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', get_class($extension))); + } + + // check naming convention + $basename = preg_replace('/Bundle$/', '', $this->getName()); + $expectedAlias = Container::underscore($basename); + + if ($expectedAlias != $extension->getAlias()) { + throw new \LogicException(sprintf( + 'Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.', + $expectedAlias, $extension->getAlias() + )); + } + + $this->extension = $extension; + } else { + $this->extension = false; + } + } + + if ($this->extension) { + return $this->extension; + } + } + + /** + * Gets the Bundle namespace. + * + * @return string The Bundle namespace + */ + public function getNamespace() + { + if (null === $this->namespace) { + $this->parseClassName(); + } + + return $this->namespace; + } + + /** + * Gets the Bundle directory path. + * + * @return string The Bundle absolute path + */ + public function getPath() + { + if (null === $this->path) { + $reflected = new \ReflectionObject($this); + $this->path = dirname($reflected->getFileName()); + } + + return $this->path; + } + + /** + * Returns the bundle parent name. + * + * @return string The Bundle parent name it overrides or null if no parent + */ + public function getParent() + { + } + + /** + * Returns the bundle name (the class short name). + * + * @return string The Bundle name + */ + final public function getName() + { + if (null === $this->name) { + $this->parseClassName(); + } + + return $this->name; + } + + /** + * Finds and registers Commands. + * + * Override this method if your bundle commands do not follow the conventions: + * + * * Commands are in the 'Command' sub-directory + * * Commands extend Symfony\Component\Console\Command\Command + * + * @param Application $application An Application instance + */ + public function registerCommands(Application $application) + { + if (!is_dir($dir = $this->getPath().'/Command')) { + return; + } + + if (!class_exists('Symfony\Component\Finder\Finder')) { + throw new \RuntimeException('You need the symfony/finder component to register bundle commands.'); + } + + $finder = new Finder(); + $finder->files()->name('*Command.php')->in($dir); + + $prefix = $this->getNamespace().'\\Command'; + foreach ($finder as $file) { + $ns = $prefix; + if ($relativePath = $file->getRelativePath()) { + $ns .= '\\'.str_replace('/', '\\', $relativePath); + } + $class = $ns.'\\'.$file->getBasename('.php'); + if ($this->container) { + $alias = 'console.command.'.strtolower(str_replace('\\', '_', $class)); + if ($this->container->has($alias)) { + continue; + } + } + $r = new \ReflectionClass($class); + if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract() && !$r->getConstructor()->getNumberOfRequiredParameters()) { + $application->add($r->newInstance()); + } + } + } + + /** + * Returns the bundle's container extension class. + * + * @return string + */ + protected function getContainerExtensionClass() + { + $basename = preg_replace('/Bundle$/', '', $this->getName()); + + return $this->getNamespace().'\\DependencyInjection\\'.$basename.'Extension'; + } + + /** + * Creates the bundle's container extension. + * + * @return ExtensionInterface|null + */ + protected function createContainerExtension() + { + if (class_exists($class = $this->getContainerExtensionClass())) { + return new $class(); + } + } + + private function parseClassName() + { + $pos = strrpos(static::class, '\\'); + $this->namespace = false === $pos ? '' : substr(static::class, 0, $pos); + if (null === $this->name) { + $this->name = false === $pos ? static::class : substr(static::class, $pos + 1); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..25eea1d76dec338e286b9e0f8e69474803ffc490 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Bundle; + +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; + +/** + * BundleInterface. + * + * @author Fabien Potencier + */ +interface BundleInterface extends ContainerAwareInterface +{ + /** + * Boots the Bundle. + */ + public function boot(); + + /** + * Shutdowns the Bundle. + */ + public function shutdown(); + + /** + * Builds the bundle. + * + * It is only ever called once when the cache is empty. + * + * @param ContainerBuilder $container A ContainerBuilder instance + */ + public function build(ContainerBuilder $container); + + /** + * Returns the container extension that should be implicitly loaded. + * + * @return ExtensionInterface|null The default extension or null if there is none + */ + public function getContainerExtension(); + + /** + * Returns the bundle name that this bundle overrides. + * + * Despite its name, this method does not imply any parent/child relationship + * between the bundles, just a way to extend and override an existing + * bundle. + * + * @return string The Bundle name it overrides or null if no parent + */ + public function getParent(); + + /** + * Returns the bundle name (the class short name). + * + * @return string The Bundle name + */ + public function getName(); + + /** + * Gets the Bundle namespace. + * + * @return string The Bundle namespace + */ + public function getNamespace(); + + /** + * Gets the Bundle directory path. + * + * The path should always be returned as a Unix path (with /). + * + * @return string The Bundle absolute path + */ + public function getPath(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..0c95ff56400f790e930b705d78eff89b8afcd45e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CHANGELOG.md @@ -0,0 +1,121 @@ +CHANGELOG +========= + +3.2.0 +----- + + * deprecated `DataCollector::varToString()`, use `cloneVar()` instead + * changed surrogate capability name in `AbstractSurrogate::addSurrogateCapability` to 'symfony' + +3.1.0 +----- + * deprecated passing objects as URI attributes to the ESI and SSI renderers + * deprecated `ControllerResolver::getArguments()` + * added `Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface` + * added `Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface` as argument to `HttpKernel` + * added `Symfony\Component\HttpKernel\Controller\ArgumentResolver` + * added `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::getMethod()` + * added `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::getRedirect()` + * added the `kernel.controller_arguments` event, triggered after controller arguments have been resolved + +3.0.0 +----- + + * removed `Symfony\Component\HttpKernel\Kernel::init()` + * removed `Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle()` and `Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle()` + * removed `Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher::setProfiler()` + * removed `Symfony\Component\HttpKernel\EventListener\FragmentListener::getLocalIpAddresses()` + * removed `Symfony\Component\HttpKernel\EventListener\LocaleListener::setRequest()` + * removed `Symfony\Component\HttpKernel\EventListener\RouterListener::setRequest()` + * removed `Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest()` + * removed `Symfony\Component\HttpKernel\Fragment\FragmentHandler::setRequest()` + * removed `Symfony\Component\HttpKernel\HttpCache\Esi::hasSurrogateEsiCapability()` + * removed `Symfony\Component\HttpKernel\HttpCache\Esi::addSurrogateEsiCapability()` + * removed `Symfony\Component\HttpKernel\HttpCache\Esi::needsEsiParsing()` + * removed `Symfony\Component\HttpKernel\HttpCache\HttpCache::getEsi()` + * removed `Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel` + * removed `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass` + * removed `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener` + * removed `Symfony\Component\HttpKernel\EventListener\EsiListener` + * removed `Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategy` + * removed `Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategyInterface` + * removed `Symfony\Component\HttpKernel\Log\LoggerInterface` + * removed `Symfony\Component\HttpKernel\Log\NullLogger` + * removed `Symfony\Component\HttpKernel\Profiler::import()` + * removed `Symfony\Component\HttpKernel\Profiler::export()` + +2.8.0 +----- + + * deprecated `Profiler::import` and `Profiler::export` + +2.7.0 +----- + + * added the HTTP status code to profiles + +2.6.0 +----- + + * deprecated `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener`, use `Symfony\Component\HttpKernel\EventListener\DebugHandlersListener` instead + * deprecated unused method `Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle` and `Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle` + +2.5.0 +----- + + * deprecated `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass`, use `Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass` instead + +2.4.0 +----- + + * added event listeners for the session + * added the KernelEvents::FINISH_REQUEST event + +2.3.0 +----- + + * [BC BREAK] renamed `Symfony\Component\HttpKernel\EventListener\DeprecationLoggerListener` to `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener` and changed its constructor + * deprecated `Symfony\Component\HttpKernel\Debug\ErrorHandler`, `Symfony\Component\HttpKernel\Debug\ExceptionHandler`, + `Symfony\Component\HttpKernel\Exception\FatalErrorException` and `Symfony\Component\HttpKernel\Exception\FlattenException` + * deprecated `Symfony\Component\HttpKernel\Kernel::init()` + * added the possibility to specify an id an extra attributes to hinclude tags + * added the collect of data if a controller is a Closure in the Request collector + * pass exceptions from the ExceptionListener to the logger using the logging context to allow for more + detailed messages + +2.2.0 +----- + + * [BC BREAK] the path info for sub-request is now always _fragment (or whatever you configured instead of the default) + * added Symfony\Component\HttpKernel\EventListener\FragmentListener + * added Symfony\Component\HttpKernel\UriSigner + * added Symfony\Component\HttpKernel\FragmentRenderer and rendering strategies (in Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface) + * added Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel + * added ControllerReference to create reference of Controllers (used in the FragmentRenderer class) + * [BC BREAK] renamed TimeDataCollector::getTotalTime() to + TimeDataCollector::getDuration() + * updated the MemoryDataCollector to include the memory used in the + kernel.terminate event listeners + * moved the Stopwatch classes to a new component + * added TraceableControllerResolver + * added TraceableEventDispatcher (removed ContainerAwareTraceableEventDispatcher) + * added support for WinCache opcode cache in ConfigDataCollector + +2.1.0 +----- + + * [BC BREAK] the charset is now configured via the Kernel::getCharset() method + * [BC BREAK] the current locale for the user is not stored anymore in the session + * added the HTTP method to the profiler storage + * updated all listeners to implement EventSubscriberInterface + * added TimeDataCollector + * added ContainerAwareTraceableEventDispatcher + * moved TraceableEventDispatcherInterface to the EventDispatcher component + * added RouterListener, LocaleListener, and StreamedResponseListener + * added CacheClearerInterface (and ChainCacheClearer) + * added a kernel.terminate event (via TerminableInterface and PostResponseEvent) + * added a Stopwatch class + * added WarmableInterface + * improved extensibility between bundles + * added profiler storages for Memcache(d), File-based, MongoDB, Redis + * moved Filesystem class to its own component diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..675c584234ef33ceddce196666fa952a0430cf36 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.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\HttpKernel\CacheClearer; + +/** + * CacheClearerInterface. + * + * @author Dustin Dobervich + */ +interface CacheClearerInterface +{ + /** + * Clears any caches necessary. + * + * @param string $cacheDir The cache directory + */ + public function clear($cacheDir); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php new file mode 100644 index 0000000000000000000000000000000000000000..c749c7c0a4e474b7bcc3ac1498b9b0ce2feab1ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\CacheClearer; + +/** + * ChainCacheClearer. + * + * @author Dustin Dobervich + */ +class ChainCacheClearer implements CacheClearerInterface +{ + /** + * @var array + */ + protected $clearers; + + /** + * Constructs a new instance of ChainCacheClearer. + * + * @param array $clearers The initial clearers + */ + public function __construct(array $clearers = array()) + { + $this->clearers = $clearers; + } + + /** + * {@inheritdoc} + */ + public function clear($cacheDir) + { + foreach ($this->clearers as $clearer) { + $clearer->clear($cacheDir); + } + } + + /** + * Adds a cache clearer to the aggregate. + * + * @param CacheClearerInterface $clearer + */ + public function add(CacheClearerInterface $clearer) + { + $this->clearers[] = $clearer; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php new file mode 100644 index 0000000000000000000000000000000000000000..30261b3f7c66066816346ced6d5c2977eccc7a0e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheClearer/Psr6CacheClearer.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\CacheClearer; + +use Psr\Cache\CacheItemPoolInterface; + +/** + * @author Nicolas Grekas + */ +class Psr6CacheClearer implements CacheClearerInterface +{ + private $pools = array(); + + public function addPool(CacheItemPoolInterface $pool) + { + $this->pools[] = $pool; + } + + /** + * {@inheritdoc} + */ + public function clear($cacheDir) + { + foreach ($this->pools as $pool) { + $pool->clear(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php new file mode 100644 index 0000000000000000000000000000000000000000..dba35a639a46c4b959dc2c2368c5a66227512121 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.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\Component\HttpKernel\CacheWarmer; + +/** + * Abstract cache warmer that knows how to write a file to the cache. + * + * @author Fabien Potencier + */ +abstract class CacheWarmer implements CacheWarmerInterface +{ + protected function writeCacheFile($file, $content) + { + $tmpFile = @tempnam(dirname($file), basename($file)); + if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) { + @chmod($file, 0666 & ~umask()); + + return; + } + + throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $file)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php new file mode 100644 index 0000000000000000000000000000000000000000..e5f4e4fa4a2319ea242818ff38f3d00da8b9eaea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\CacheWarmer; + +/** + * Aggregates several cache warmers into a single one. + * + * @author Fabien Potencier + */ +class CacheWarmerAggregate implements CacheWarmerInterface +{ + protected $warmers = array(); + protected $optionalsEnabled = false; + + public function __construct(array $warmers = array()) + { + foreach ($warmers as $warmer) { + $this->add($warmer); + } + } + + public function enableOptionalWarmers() + { + $this->optionalsEnabled = true; + } + + /** + * Warms up the cache. + * + * @param string $cacheDir The cache directory + */ + public function warmUp($cacheDir) + { + foreach ($this->warmers as $warmer) { + if (!$this->optionalsEnabled && $warmer->isOptional()) { + continue; + } + + $warmer->warmUp($cacheDir); + } + } + + /** + * Checks whether this warmer is optional or not. + * + * @return bool always false + */ + public function isOptional() + { + return false; + } + + public function setWarmers(array $warmers) + { + $this->warmers = array(); + foreach ($warmers as $warmer) { + $this->add($warmer); + } + } + + public function add(CacheWarmerInterface $warmer) + { + $this->warmers[] = $warmer; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..8fece5e95407c0f0564813a182fe63791c874379 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.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\Component\HttpKernel\CacheWarmer; + +/** + * Interface for classes able to warm up the cache. + * + * @author Fabien Potencier + */ +interface CacheWarmerInterface extends WarmableInterface +{ + /** + * Checks whether this warmer is optional or not. + * + * Optional warmers can be ignored on certain conditions. + * + * A warmer should return true if the cache can be + * generated incrementally and on-demand. + * + * @return bool true if the warmer is optional, false otherwise + */ + public function isOptional(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..25d8ee8f61a8c81a415784c818374216931ac94d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.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\HttpKernel\CacheWarmer; + +/** + * Interface for classes that support warming their cache. + * + * @author Fabien Potencier + */ +interface WarmableInterface +{ + /** + * Warms up the cache. + * + * @param string $cacheDir The cache directory + */ + public function warmUp($cacheDir); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Client.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Client.php new file mode 100644 index 0000000000000000000000000000000000000000..b1814ad1f3e6b53550c81b91d05e3f2f37b439e1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Client.php @@ -0,0 +1,209 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel; + +use Symfony\Component\BrowserKit\Client as BaseClient; +use Symfony\Component\BrowserKit\Request as DomRequest; +use Symfony\Component\BrowserKit\Response as DomResponse; +use Symfony\Component\BrowserKit\Cookie as DomCookie; +use Symfony\Component\BrowserKit\History; +use Symfony\Component\BrowserKit\CookieJar; +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Client simulates a browser and makes requests to a Kernel object. + * + * @author Fabien Potencier + * + * @method Request|null getRequest() A Request instance + * @method Response|null getResponse() A Response instance + */ +class Client extends BaseClient +{ + protected $kernel; + + /** + * Constructor. + * + * @param HttpKernelInterface $kernel An HttpKernel instance + * @param array $server The server parameters (equivalent of $_SERVER) + * @param History $history A History instance to store the browser history + * @param CookieJar $cookieJar A CookieJar instance to store the cookies + */ + public function __construct(HttpKernelInterface $kernel, array $server = array(), History $history = null, CookieJar $cookieJar = null) + { + // These class properties must be set before calling the parent constructor, as it may depend on it. + $this->kernel = $kernel; + $this->followRedirects = false; + + parent::__construct($server, $history, $cookieJar); + } + + /** + * Makes a request. + * + * @param Request $request A Request instance + * + * @return Response A Response instance + */ + protected function doRequest($request) + { + $response = $this->kernel->handle($request); + + if ($this->kernel instanceof TerminableInterface) { + $this->kernel->terminate($request, $response); + } + + return $response; + } + + /** + * Returns the script to execute when the request must be insulated. + * + * @param Request $request A Request instance + * + * @return string + */ + protected function getScript($request) + { + $kernel = str_replace("'", "\\'", serialize($this->kernel)); + $request = str_replace("'", "\\'", serialize($request)); + + $r = new \ReflectionClass('\\Symfony\\Component\\ClassLoader\\ClassLoader'); + $requirePath = str_replace("'", "\\'", $r->getFileName()); + $symfonyPath = str_replace("'", "\\'", dirname(dirname(dirname(__DIR__)))); + $errorReporting = error_reporting(); + + $code = <<addPrefix('Symfony', '$symfonyPath'); +\$loader->register(); + +\$kernel = unserialize('$kernel'); +\$request = unserialize('$request'); +EOF; + + return $code.$this->getHandleScript(); + } + + protected function getHandleScript() + { + return <<<'EOF' +$response = $kernel->handle($request); + +if ($kernel instanceof Symfony\Component\HttpKernel\TerminableInterface) { + $kernel->terminate($request, $response); +} + +echo serialize($response); +EOF; + } + + /** + * Converts the BrowserKit request to a HttpKernel request. + * + * @param DomRequest $request A DomRequest instance + * + * @return Request A Request instance + */ + protected function filterRequest(DomRequest $request) + { + $httpRequest = Request::create($request->getUri(), $request->getMethod(), $request->getParameters(), $request->getCookies(), $request->getFiles(), $request->getServer(), $request->getContent()); + + foreach ($this->filterFiles($httpRequest->files->all()) as $key => $value) { + $httpRequest->files->set($key, $value); + } + + return $httpRequest; + } + + /** + * Filters an array of files. + * + * This method created test instances of UploadedFile so that the move() + * method can be called on those instances. + * + * If the size of a file is greater than the allowed size (from php.ini) then + * an invalid UploadedFile is returned with an error set to UPLOAD_ERR_INI_SIZE. + * + * @see UploadedFile + * + * @param array $files An array of files + * + * @return array An array with all uploaded files marked as already moved + */ + protected function filterFiles(array $files) + { + $filtered = array(); + foreach ($files as $key => $value) { + if (is_array($value)) { + $filtered[$key] = $this->filterFiles($value); + } elseif ($value instanceof UploadedFile) { + if ($value->isValid() && $value->getSize() > UploadedFile::getMaxFilesize()) { + $filtered[$key] = new UploadedFile( + '', + $value->getClientOriginalName(), + $value->getClientMimeType(), + 0, + UPLOAD_ERR_INI_SIZE, + true + ); + } else { + $filtered[$key] = new UploadedFile( + $value->getPathname(), + $value->getClientOriginalName(), + $value->getClientMimeType(), + $value->getClientSize(), + $value->getError(), + true + ); + } + } + } + + return $filtered; + } + + /** + * Converts the HttpKernel response to a BrowserKit response. + * + * @param Response $response A Response instance + * + * @return DomResponse A DomResponse instance + */ + protected function filterResponse($response) + { + $headers = $response->headers->all(); + if ($response->headers->getCookies()) { + $cookies = array(); + foreach ($response->headers->getCookies() as $cookie) { + $cookies[] = new DomCookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly()); + } + $headers['Set-Cookie'] = $cookies; + } + + // this is needed to support StreamedResponse + ob_start(); + $response->sendContent(); + $content = ob_get_clean(); + + return new DomResponse($content, $response->getStatusCode(), $headers); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php new file mode 100644 index 0000000000000000000000000000000000000000..bad199be94be0bc91f42e8c6a3e2077868bdb893 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Config; + +use Symfony\Component\Config\Resource\SelfCheckingResourceInterface; + +/** + * EnvParametersResource represents resources stored in prefixed environment variables. + * + * @author Chris Wilkinson + */ +class EnvParametersResource implements SelfCheckingResourceInterface, \Serializable +{ + /** + * @var string + */ + private $prefix; + + /** + * @var string + */ + private $variables; + + /** + * Constructor. + * + * @param string $prefix + */ + public function __construct($prefix) + { + $this->prefix = $prefix; + $this->variables = $this->findVariables(); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return serialize($this->getResource()); + } + + /** + * @return array An array with two keys: 'prefix' for the prefix used and 'variables' containing all the variables watched by this resource + */ + public function getResource() + { + return array('prefix' => $this->prefix, 'variables' => $this->variables); + } + + /** + * {@inheritdoc} + */ + public function isFresh($timestamp) + { + return $this->findVariables() === $this->variables; + } + + public function serialize() + { + return serialize(array('prefix' => $this->prefix, 'variables' => $this->variables)); + } + + public function unserialize($serialized) + { + $unserialized = unserialize($serialized); + + $this->prefix = $unserialized['prefix']; + $this->variables = $unserialized['variables']; + } + + private function findVariables() + { + $variables = array(); + + foreach ($_SERVER as $key => $value) { + if (0 === strpos($key, $this->prefix)) { + $variables[$key] = $value; + } + } + + ksort($variables); + + return $variables; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/FileLocator.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/FileLocator.php new file mode 100644 index 0000000000000000000000000000000000000000..169c9ad6e502a1b06c5a2312f1998f4d4f68f500 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/FileLocator.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Config; + +use Symfony\Component\Config\FileLocator as BaseFileLocator; +use Symfony\Component\HttpKernel\KernelInterface; + +/** + * FileLocator uses the KernelInterface to locate resources in bundles. + * + * @author Fabien Potencier + */ +class FileLocator extends BaseFileLocator +{ + private $kernel; + private $path; + + /** + * Constructor. + * + * @param KernelInterface $kernel A KernelInterface instance + * @param null|string $path The path the global resource directory + * @param array $paths An array of paths where to look for resources + */ + public function __construct(KernelInterface $kernel, $path = null, array $paths = array()) + { + $this->kernel = $kernel; + if (null !== $path) { + $this->path = $path; + $paths[] = $path; + } + + parent::__construct($paths); + } + + /** + * {@inheritdoc} + */ + public function locate($file, $currentPath = null, $first = true) + { + if (isset($file[0]) && '@' === $file[0]) { + return $this->kernel->locateResource($file, $this->path, $first); + } + + return parent::locate($file, $currentPath, $first); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..e63daabaa7fe7f0644b78f2694702639ae3ac708 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.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\Component\HttpKernel\Controller; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactoryInterface; + +/** + * Responsible for resolving the arguments passed to an action. + * + * @author Iltar van der Berg + */ +final class ArgumentResolver implements ArgumentResolverInterface +{ + private $argumentMetadataFactory; + + /** + * @var ArgumentValueResolverInterface[] + */ + private $argumentValueResolvers; + + public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFactory = null, array $argumentValueResolvers = array()) + { + $this->argumentMetadataFactory = $argumentMetadataFactory ?: new ArgumentMetadataFactory(); + $this->argumentValueResolvers = $argumentValueResolvers ?: self::getDefaultArgumentValueResolvers(); + } + + /** + * {@inheritdoc} + */ + public function getArguments(Request $request, $controller) + { + $arguments = array(); + + foreach ($this->argumentMetadataFactory->createArgumentMetadata($controller) as $metadata) { + foreach ($this->argumentValueResolvers as $resolver) { + if (!$resolver->supports($request, $metadata)) { + continue; + } + + $resolved = $resolver->resolve($request, $metadata); + + if (!$resolved instanceof \Generator) { + throw new \InvalidArgumentException(sprintf('%s::resolve() must yield at least one value.', get_class($resolver))); + } + + foreach ($resolved as $append) { + $arguments[] = $append; + } + + // continue to the next controller argument + continue 2; + } + + $representative = $controller; + + if (is_array($representative)) { + $representative = sprintf('%s::%s()', get_class($representative[0]), $representative[1]); + } elseif (is_object($representative)) { + $representative = get_class($representative); + } + + throw new \RuntimeException(sprintf('Controller "%s" requires that you provide a value for the "$%s" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one.', $representative, $metadata->getName())); + } + + return $arguments; + } + + public static function getDefaultArgumentValueResolvers() + { + return array( + new RequestAttributeValueResolver(), + new RequestValueResolver(), + new DefaultValueResolver(), + new VariadicValueResolver(), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DefaultValueResolver.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DefaultValueResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..e58fd3ab2bed7a2f9281e0fc5383e9cd2ca67dfa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/DefaultValueResolver.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; + +/** + * Yields the default value defined in the action signature when no value has been given. + * + * @author Iltar van der Berg + */ +final class DefaultValueResolver implements ArgumentValueResolverInterface +{ + /** + * {@inheritdoc} + */ + public function supports(Request $request, ArgumentMetadata $argument) + { + return $argument->hasDefaultValue() || (null !== $argument->getType() && $argument->isNullable() && !$argument->isVariadic()); + } + + /** + * {@inheritdoc} + */ + public function resolve(Request $request, ArgumentMetadata $argument) + { + yield $argument->hasDefaultValue() ? $argument->getDefaultValue() : null; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..05be372d845987afbe37b4573ba4d895098925de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; + +/** + * Yields a non-variadic argument's value from the request attributes. + * + * @author Iltar van der Berg + */ +final class RequestAttributeValueResolver implements ArgumentValueResolverInterface +{ + /** + * {@inheritdoc} + */ + public function supports(Request $request, ArgumentMetadata $argument) + { + return !$argument->isVariadic() && $request->attributes->has($argument->getName()); + } + + /** + * {@inheritdoc} + */ + public function resolve(Request $request, ArgumentMetadata $argument) + { + yield $request->attributes->get($argument->getName()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestValueResolver.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestValueResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..2a5060a612681bd547543e239699678774d474bd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestValueResolver.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; + +/** + * Yields the same instance as the request object passed along. + * + * @author Iltar van der Berg + */ +final class RequestValueResolver implements ArgumentValueResolverInterface +{ + /** + * {@inheritdoc} + */ + public function supports(Request $request, ArgumentMetadata $argument) + { + return Request::class === $argument->getType() || is_subclass_of($argument->getType(), Request::class); + } + + /** + * {@inheritdoc} + */ + public function resolve(Request $request, ArgumentMetadata $argument) + { + yield $request; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/VariadicValueResolver.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/VariadicValueResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..56ae5f191c4d417f6245d81f4a388805078ae45e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/VariadicValueResolver.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; + +/** + * Yields a variadic argument's values from the request attributes. + * + * @author Iltar van der Berg + */ +final class VariadicValueResolver implements ArgumentValueResolverInterface +{ + /** + * {@inheritdoc} + */ + public function supports(Request $request, ArgumentMetadata $argument) + { + return $argument->isVariadic() && $request->attributes->has($argument->getName()); + } + + /** + * {@inheritdoc} + */ + public function resolve(Request $request, ArgumentMetadata $argument) + { + $values = $request->attributes->get($argument->getName()); + + if (!is_array($values)) { + throw new \InvalidArgumentException(sprintf('The action argument "...$%1$s" is required to be an array, the request attribute "%1$s" contains a type of "%2$s" instead.', $argument->getName(), gettype($values))); + } + + foreach ($values as $value) { + yield $value; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolverInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolverInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5c512309662d7d57fb32d3490c8f65b01dfc652d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolverInterface.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Controller; + +use Symfony\Component\HttpFoundation\Request; + +/** + * An ArgumentResolverInterface instance knows how to determine the + * arguments for a specific action. + * + * @author Fabien Potencier + */ +interface ArgumentResolverInterface +{ + /** + * Returns the arguments to pass to the controller. + * + * @param Request $request + * @param callable $controller + * + * @return array An array of arguments to pass to the controller + * + * @throws \RuntimeException When no value could be provided for a required argument + */ + public function getArguments(Request $request, $controller); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentValueResolverInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentValueResolverInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..fd7b09ecf2ede87acfeab0b16be4dd84dc04e990 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentValueResolverInterface.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\Component\HttpKernel\Controller; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; + +/** + * Responsible for resolving the value of an argument based on its metadata. + * + * @author Iltar van der Berg + */ +interface ArgumentValueResolverInterface +{ + /** + * Whether this resolver can resolve the value for the given ArgumentMetadata. + * + * @param Request $request + * @param ArgumentMetadata $argument + * + * @return bool + */ + public function supports(Request $request, ArgumentMetadata $argument); + + /** + * Returns the possible value(s). + * + * @param Request $request + * @param ArgumentMetadata $argument + * + * @return \Generator + */ + public function resolve(Request $request, ArgumentMetadata $argument); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerReference.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerReference.php new file mode 100644 index 0000000000000000000000000000000000000000..3d1592e83aee1fcb71862ee72bd49667cb86f61e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerReference.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Controller; + +use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; + +/** + * Acts as a marker and a data holder for a Controller. + * + * Some methods in Symfony accept both a URI (as a string) or a controller as + * an argument. In the latter case, instead of passing an array representing + * the controller, you can use an instance of this class. + * + * @author Fabien Potencier + * + * @see FragmentRendererInterface + */ +class ControllerReference +{ + public $controller; + public $attributes = array(); + public $query = array(); + + /** + * Constructor. + * + * @param string $controller The controller name + * @param array $attributes An array of parameters to add to the Request attributes + * @param array $query An array of parameters to add to the Request query string + */ + public function __construct($controller, array $attributes = array(), array $query = array()) + { + $this->controller = $controller; + $this->attributes = $attributes; + $this->query = $query; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..f51a5a8efb1c17ce65acd9dd1afa8a72e78d2311 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php @@ -0,0 +1,265 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Controller; + +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * ControllerResolver. + * + * This implementation uses the '_controller' request attribute to determine + * the controller to execute and uses the request attributes to determine + * the controller method arguments. + * + * @author Fabien Potencier + */ +class ControllerResolver implements ArgumentResolverInterface, ControllerResolverInterface +{ + private $logger; + + /** + * If the ...$arg functionality is available. + * + * Requires at least PHP 5.6.0 or HHVM 3.9.1 + * + * @var bool + */ + private $supportsVariadic; + + /** + * If scalar types exists. + * + * @var bool + */ + private $supportsScalarTypes; + + /** + * Constructor. + * + * @param LoggerInterface $logger A LoggerInterface instance + */ + public function __construct(LoggerInterface $logger = null) + { + $this->logger = $logger; + + $this->supportsVariadic = method_exists('ReflectionParameter', 'isVariadic'); + $this->supportsScalarTypes = method_exists('ReflectionParameter', 'getType'); + } + + /** + * {@inheritdoc} + * + * This method looks for a '_controller' request attribute that represents + * the controller name (a string like ClassName::MethodName). + */ + public function getController(Request $request) + { + if (!$controller = $request->attributes->get('_controller')) { + if (null !== $this->logger) { + $this->logger->warning('Unable to look for the controller as the "_controller" parameter is missing.'); + } + + return false; + } + + if (is_array($controller)) { + return $controller; + } + + if (is_object($controller)) { + if (method_exists($controller, '__invoke')) { + return $controller; + } + + throw new \InvalidArgumentException(sprintf('Controller "%s" for URI "%s" is not callable.', get_class($controller), $request->getPathInfo())); + } + + if (false === strpos($controller, ':')) { + if (method_exists($controller, '__invoke')) { + return $this->instantiateController($controller); + } elseif (function_exists($controller)) { + return $controller; + } + } + + $callable = $this->createController($controller); + + if (!is_callable($callable)) { + throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $this->getControllerError($callable))); + } + + return $callable; + } + + /** + * {@inheritdoc} + * + * @deprecated This method is deprecated as of 3.1 and will be removed in 4.0. Implement the ArgumentResolverInterface and inject it in the HttpKernel instead. + */ + public function getArguments(Request $request, $controller) + { + @trigger_error(sprintf('%s is deprecated as of 3.1 and will be removed in 4.0. Implement the %s and inject it in the HttpKernel instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED); + + if (is_array($controller)) { + $r = new \ReflectionMethod($controller[0], $controller[1]); + } elseif (is_object($controller) && !$controller instanceof \Closure) { + $r = new \ReflectionObject($controller); + $r = $r->getMethod('__invoke'); + } else { + $r = new \ReflectionFunction($controller); + } + + return $this->doGetArguments($request, $controller, $r->getParameters()); + } + + /** + * @param Request $request + * @param callable $controller + * @param \ReflectionParameter[] $parameters + * + * @return array The arguments to use when calling the action + * + * @deprecated This method is deprecated as of 3.1 and will be removed in 4.0. Implement the ArgumentResolverInterface and inject it in the HttpKernel instead. + */ + protected function doGetArguments(Request $request, $controller, array $parameters) + { + @trigger_error(sprintf('%s is deprecated as of 3.1 and will be removed in 4.0. Implement the %s and inject it in the HttpKernel instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED); + + $attributes = $request->attributes->all(); + $arguments = array(); + foreach ($parameters as $param) { + if (array_key_exists($param->name, $attributes)) { + if ($this->supportsVariadic && $param->isVariadic() && is_array($attributes[$param->name])) { + $arguments = array_merge($arguments, array_values($attributes[$param->name])); + } else { + $arguments[] = $attributes[$param->name]; + } + } elseif ($param->getClass() && $param->getClass()->isInstance($request)) { + $arguments[] = $request; + } elseif ($param->isDefaultValueAvailable()) { + $arguments[] = $param->getDefaultValue(); + } elseif ($this->supportsScalarTypes && $param->hasType() && $param->allowsNull()) { + $arguments[] = null; + } else { + if (is_array($controller)) { + $repr = sprintf('%s::%s()', get_class($controller[0]), $controller[1]); + } elseif (is_object($controller)) { + $repr = get_class($controller); + } else { + $repr = $controller; + } + + throw new \RuntimeException(sprintf('Controller "%s" requires that you provide a value for the "$%s" argument (because there is no default value or because there is a non optional argument after this one).', $repr, $param->name)); + } + } + + return $arguments; + } + + /** + * Returns a callable for the given controller. + * + * @param string $controller A Controller string + * + * @return callable A PHP callable + * + * @throws \InvalidArgumentException + */ + protected function createController($controller) + { + if (false === strpos($controller, '::')) { + throw new \InvalidArgumentException(sprintf('Unable to find controller "%s".', $controller)); + } + + list($class, $method) = explode('::', $controller, 2); + + if (!class_exists($class)) { + throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); + } + + return array($this->instantiateController($class), $method); + } + + /** + * Returns an instantiated controller. + * + * @param string $class A class name + * + * @return object + */ + protected function instantiateController($class) + { + return new $class(); + } + + private function getControllerError($callable) + { + if (is_string($callable)) { + if (false !== strpos($callable, '::')) { + $callable = explode('::', $callable); + } + + if (class_exists($callable) && !method_exists($callable, '__invoke')) { + return sprintf('Class "%s" does not have a method "__invoke".', $callable); + } + + if (!function_exists($callable)) { + return sprintf('Function "%s" does not exist.', $callable); + } + } + + if (!is_array($callable)) { + return sprintf('Invalid type for controller given, expected string or array, got "%s".', gettype($callable)); + } + + if (2 !== count($callable)) { + return sprintf('Invalid format for controller, expected array(controller, method) or controller::method.'); + } + + list($controller, $method) = $callable; + + if (is_string($controller) && !class_exists($controller)) { + return sprintf('Class "%s" does not exist.', $controller); + } + + $className = is_object($controller) ? get_class($controller) : $controller; + + if (method_exists($controller, $method)) { + return sprintf('Method "%s" on class "%s" should be public and non-abstract.', $method, $className); + } + + $collection = get_class_methods($controller); + + $alternatives = array(); + + foreach ($collection as $item) { + $lev = levenshtein($method, $item); + + if ($lev <= strlen($method) / 3 || false !== strpos($item, $method)) { + $alternatives[] = $item; + } + } + + asort($alternatives); + + $message = sprintf('Expected method "%s" on class "%s"', $method, $className); + + if (count($alternatives) > 0) { + $message .= sprintf(', did you mean "%s"?', implode('", "', $alternatives)); + } else { + $message .= sprintf('. Available methods: "%s".', implode('", "', $collection)); + } + + return $message; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..0dd7cce96d905098eadc78da521e672dc2d21896 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Controller; + +use Symfony\Component\HttpFoundation\Request; + +/** + * A ControllerResolverInterface implementation knows how to determine the + * controller to execute based on a Request object. + * + * It can also determine the arguments to pass to the Controller. + * + * A Controller can be any valid PHP callable. + * + * @author Fabien Potencier + */ +interface ControllerResolverInterface +{ + /** + * Returns the Controller instance associated with a Request. + * + * As several resolvers can exist for a single application, a resolver must + * return false when it is not able to determine the controller. + * + * The resolver must only throw an exception when it should be able to load + * controller but cannot because of some errors made by the developer. + * + * @param Request $request A Request instance + * + * @return callable|false A PHP callable representing the Controller, + * or false if this resolver is not able to determine the controller + * + * @throws \LogicException If the controller can't be found + */ + public function getController(Request $request); + + /** + * Returns the arguments to pass to the controller. + * + * @param Request $request A Request instance + * @param callable $controller A PHP callable + * + * @return array An array of arguments to pass to the controller + * + * @throws \RuntimeException When value for argument given is not provided + * + * @deprecated This method is deprecated as of 3.1 and will be removed in 4.0. Please use the {@see ArgumentResolverInterface} instead. + */ + public function getArguments(Request $request, $controller); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/TraceableArgumentResolver.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/TraceableArgumentResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..6fb0fa66aca7ae906fc6b8c3688c7936526ed030 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/TraceableArgumentResolver.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Controller; + +use Symfony\Component\Stopwatch\Stopwatch; +use Symfony\Component\HttpFoundation\Request; + +/** + * @author Fabien Potencier + */ +class TraceableArgumentResolver implements ArgumentResolverInterface +{ + private $resolver; + private $stopwatch; + + public function __construct(ArgumentResolverInterface $resolver, Stopwatch $stopwatch) + { + $this->resolver = $resolver; + $this->stopwatch = $stopwatch; + } + + /** + * {@inheritdoc} + */ + public function getArguments(Request $request, $controller) + { + $e = $this->stopwatch->start('controller.get_arguments'); + + $ret = $this->resolver->getArguments($request, $controller); + + $e->stop(); + + return $ret; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..ce291b1e3e26907debd17816693947b1cef8d48c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Controller; + +use Symfony\Component\Stopwatch\Stopwatch; +use Symfony\Component\HttpFoundation\Request; + +/** + * TraceableControllerResolver. + * + * @author Fabien Potencier + */ +class TraceableControllerResolver implements ControllerResolverInterface, ArgumentResolverInterface +{ + private $resolver; + private $stopwatch; + private $argumentResolver; + + /** + * Constructor. + * + * @param ControllerResolverInterface $resolver A ControllerResolverInterface instance + * @param Stopwatch $stopwatch A Stopwatch instance + * @param ArgumentResolverInterface $argumentResolver Only required for BC + */ + public function __construct(ControllerResolverInterface $resolver, Stopwatch $stopwatch, ArgumentResolverInterface $argumentResolver = null) + { + $this->resolver = $resolver; + $this->stopwatch = $stopwatch; + $this->argumentResolver = $argumentResolver; + + // BC + if (null === $this->argumentResolver) { + $this->argumentResolver = $resolver; + } + + if (!$this->argumentResolver instanceof TraceableArgumentResolver) { + $this->argumentResolver = new TraceableArgumentResolver($this->argumentResolver, $this->stopwatch); + } + } + + /** + * {@inheritdoc} + */ + public function getController(Request $request) + { + $e = $this->stopwatch->start('controller.get_callable'); + + $ret = $this->resolver->getController($request); + + $e->stop(); + + return $ret; + } + + /** + * {@inheritdoc} + * + * @deprecated This method is deprecated as of 3.1 and will be removed in 4.0. + */ + public function getArguments(Request $request, $controller) + { + @trigger_error(sprintf('The %s method is deprecated as of 3.1 and will be removed in 4.0. Please use the %s instead.', __METHOD__, TraceableArgumentResolver::class), E_USER_DEPRECATED); + + $ret = $this->argumentResolver->getArguments($request, $controller); + + return $ret; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadata.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..32316a8d519e70d9ca676d985dec51019b4af4c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadata.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\ControllerMetadata; + +/** + * Responsible for storing metadata of an argument. + * + * @author Iltar van der Berg + */ +class ArgumentMetadata +{ + private $name; + private $type; + private $isVariadic; + private $hasDefaultValue; + private $defaultValue; + private $isNullable; + + /** + * @param string $name + * @param string $type + * @param bool $isVariadic + * @param bool $hasDefaultValue + * @param mixed $defaultValue + * @param bool $isNullable + */ + public function __construct($name, $type, $isVariadic, $hasDefaultValue, $defaultValue, $isNullable = false) + { + $this->name = $name; + $this->type = $type; + $this->isVariadic = $isVariadic; + $this->hasDefaultValue = $hasDefaultValue; + $this->defaultValue = $defaultValue; + $this->isNullable = $isNullable || null === $type || ($hasDefaultValue && null === $defaultValue); + } + + /** + * Returns the name as given in PHP, $foo would yield "foo". + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Returns the type of the argument. + * + * The type is the PHP class in 5.5+ and additionally the basic type in PHP 7.0+. + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Returns whether the argument is defined as "...$variadic". + * + * @return bool + */ + public function isVariadic() + { + return $this->isVariadic; + } + + /** + * Returns whether the argument has a default value. + * + * Implies whether an argument is optional. + * + * @return bool + */ + public function hasDefaultValue() + { + return $this->hasDefaultValue; + } + + /** + * Returns whether the argument accepts null values. + * + * @return bool + */ + public function isNullable() + { + return $this->isNullable; + } + + /** + * Returns the default value of the argument. + * + * @throws \LogicException if no default value is present; {@see self::hasDefaultValue()} + * + * @return mixed + */ + public function getDefaultValue() + { + if (!$this->hasDefaultValue) { + throw new \LogicException(sprintf('Argument $%s does not have a default value. Use %s::hasDefaultValue() to avoid this exception.', $this->name, __CLASS__)); + } + + return $this->defaultValue; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..d1e7af206804b9d92e1b04edbe1a88812ffc5e86 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\ControllerMetadata; + +/** + * Builds {@see ArgumentMetadata} objects based on the given Controller. + * + * @author Iltar van der Berg + */ +final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface +{ + /** + * If the ...$arg functionality is available. + * + * Requires at least PHP 5.6.0 or HHVM 3.9.1 + * + * @var bool + */ + private $supportsVariadic; + + /** + * If the reflection supports the getType() method to resolve types. + * + * Requires at least PHP 7.0.0 or HHVM 3.11.0 + * + * @var bool + */ + private $supportsParameterType; + + public function __construct() + { + $this->supportsVariadic = method_exists('ReflectionParameter', 'isVariadic'); + $this->supportsParameterType = method_exists('ReflectionParameter', 'getType'); + } + + /** + * {@inheritdoc} + */ + public function createArgumentMetadata($controller) + { + $arguments = array(); + + if (is_array($controller)) { + $reflection = new \ReflectionMethod($controller[0], $controller[1]); + } elseif (is_object($controller) && !$controller instanceof \Closure) { + $reflection = (new \ReflectionObject($controller))->getMethod('__invoke'); + } else { + $reflection = new \ReflectionFunction($controller); + } + + foreach ($reflection->getParameters() as $param) { + $arguments[] = new ArgumentMetadata($param->getName(), $this->getType($param), $this->isVariadic($param), $this->hasDefaultValue($param), $this->getDefaultValue($param), $param->allowsNull()); + } + + return $arguments; + } + + /** + * Returns whether an argument is variadic. + * + * @param \ReflectionParameter $parameter + * + * @return bool + */ + private function isVariadic(\ReflectionParameter $parameter) + { + return $this->supportsVariadic && $parameter->isVariadic(); + } + + /** + * Determines whether an argument has a default value. + * + * @param \ReflectionParameter $parameter + * + * @return bool + */ + private function hasDefaultValue(\ReflectionParameter $parameter) + { + return $parameter->isDefaultValueAvailable(); + } + + /** + * Returns a default value if available. + * + * @param \ReflectionParameter $parameter + * + * @return mixed|null + */ + private function getDefaultValue(\ReflectionParameter $parameter) + { + return $this->hasDefaultValue($parameter) ? $parameter->getDefaultValue() : null; + } + + /** + * Returns an associated type to the given parameter if available. + * + * @param \ReflectionParameter $parameter + * + * @return null|string + */ + private function getType(\ReflectionParameter $parameter) + { + if ($this->supportsParameterType) { + if (!$type = $parameter->getType()) { + return; + } + $typeName = $type instanceof \ReflectionNamedType ? $type->getName() : $type->__toString(); + if ('array' === $typeName && !$type->isBuiltin()) { + // Special case for HHVM with variadics + return; + } + + return $typeName; + } + + if (preg_match('/^(?:[^ ]++ ){4}([a-zA-Z_\x7F-\xFF][^ ]++)/', $parameter, $info)) { + return $info[1]; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..6ea179d783ef038347b3c47b3443564c3dbd430d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactoryInterface.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\HttpKernel\ControllerMetadata; + +/** + * Builds method argument data. + * + * @author Iltar van der Berg + */ +interface ArgumentMetadataFactoryInterface +{ + /** + * @param mixed $controller The controller to resolve the arguments for + * + * @return ArgumentMetadata[] + */ + public function createArgumentMetadata($controller); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/AjaxDataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/AjaxDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..b8405d5945af078c2d00a9817c12fb1e37dae9cc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/AjaxDataCollector.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * AjaxDataCollector. + * + * @author Bart van den Burg + */ +class AjaxDataCollector extends DataCollector +{ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + // all collecting is done client side + } + + public function getName() + { + return 'ajax'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..13db7c4314809e408185fa7a5423d62df8fb32a9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -0,0 +1,285 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +use Symfony\Component\HttpKernel\KernelInterface; +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * ConfigDataCollector. + * + * @author Fabien Potencier + */ +class ConfigDataCollector extends DataCollector +{ + /** + * @var KernelInterface + */ + private $kernel; + private $name; + private $version; + + /** + * Constructor. + * + * @param string $name The name of the application using the web profiler + * @param string $version The version of the application using the web profiler + */ + public function __construct($name = null, $version = null) + { + $this->name = $name; + $this->version = $version; + } + + /** + * Sets the Kernel associated with this Request. + * + * @param KernelInterface $kernel A KernelInterface instance + */ + public function setKernel(KernelInterface $kernel = null) + { + $this->kernel = $kernel; + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + $this->data = array( + 'app_name' => $this->name, + 'app_version' => $this->version, + 'token' => $response->headers->get('X-Debug-Token'), + 'symfony_version' => Kernel::VERSION, + 'symfony_state' => 'unknown', + 'name' => isset($this->kernel) ? $this->kernel->getName() : 'n/a', + 'env' => isset($this->kernel) ? $this->kernel->getEnvironment() : 'n/a', + 'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a', + 'php_version' => PHP_VERSION, + 'xdebug_enabled' => extension_loaded('xdebug'), + 'eaccel_enabled' => extension_loaded('eaccelerator') && ini_get('eaccelerator.enable'), + 'apc_enabled' => extension_loaded('apc') && ini_get('apc.enabled'), + 'xcache_enabled' => extension_loaded('xcache') && ini_get('xcache.cacher'), + 'wincache_enabled' => extension_loaded('wincache') && ini_get('wincache.ocenabled'), + 'zend_opcache_enabled' => extension_loaded('Zend OPcache') && ini_get('opcache.enable'), + 'bundles' => array(), + 'sapi_name' => PHP_SAPI, + ); + + if (isset($this->kernel)) { + foreach ($this->kernel->getBundles() as $name => $bundle) { + $this->data['bundles'][$name] = $bundle->getPath(); + } + + $this->data['symfony_state'] = $this->determineSymfonyState(); + } + } + + public function getApplicationName() + { + return $this->data['app_name']; + } + + public function getApplicationVersion() + { + return $this->data['app_version']; + } + + /** + * Gets the token. + * + * @return string The token + */ + public function getToken() + { + return $this->data['token']; + } + + /** + * Gets the Symfony version. + * + * @return string The Symfony version + */ + public function getSymfonyVersion() + { + return $this->data['symfony_version']; + } + + /** + * Returns the state of the current Symfony release. + * + * @return string One of: unknown, dev, stable, eom, eol + */ + public function getSymfonyState() + { + return $this->data['symfony_state']; + } + + /** + * Gets the PHP version. + * + * @return string The PHP version + */ + public function getPhpVersion() + { + return $this->data['php_version']; + } + + /** + * Gets the application name. + * + * @return string The application name + */ + public function getAppName() + { + return $this->data['name']; + } + + /** + * Gets the environment. + * + * @return string The environment + */ + public function getEnv() + { + return $this->data['env']; + } + + /** + * Returns true if the debug is enabled. + * + * @return bool true if debug is enabled, false otherwise + */ + public function isDebug() + { + return $this->data['debug']; + } + + /** + * Returns true if the XDebug is enabled. + * + * @return bool true if XDebug is enabled, false otherwise + */ + public function hasXDebug() + { + return $this->data['xdebug_enabled']; + } + + /** + * Returns true if EAccelerator is enabled. + * + * @return bool true if EAccelerator is enabled, false otherwise + */ + public function hasEAccelerator() + { + return $this->data['eaccel_enabled']; + } + + /** + * Returns true if APC is enabled. + * + * @return bool true if APC is enabled, false otherwise + */ + public function hasApc() + { + return $this->data['apc_enabled']; + } + + /** + * Returns true if Zend OPcache is enabled. + * + * @return bool true if Zend OPcache is enabled, false otherwise + */ + public function hasZendOpcache() + { + return $this->data['zend_opcache_enabled']; + } + + /** + * Returns true if XCache is enabled. + * + * @return bool true if XCache is enabled, false otherwise + */ + public function hasXCache() + { + return $this->data['xcache_enabled']; + } + + /** + * Returns true if WinCache is enabled. + * + * @return bool true if WinCache is enabled, false otherwise + */ + public function hasWinCache() + { + return $this->data['wincache_enabled']; + } + + /** + * Returns true if any accelerator is enabled. + * + * @return bool true if any accelerator is enabled, false otherwise + */ + public function hasAccelerator() + { + return $this->hasApc() || $this->hasZendOpcache() || $this->hasEAccelerator() || $this->hasXCache() || $this->hasWinCache(); + } + + public function getBundles() + { + return $this->data['bundles']; + } + + /** + * Gets the PHP SAPI name. + * + * @return string The environment + */ + public function getSapiName() + { + return $this->data['sapi_name']; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'config'; + } + + /** + * Tries to retrieve information about the current Symfony version. + * + * @return string One of: dev, stable, eom, eol + */ + private function determineSymfonyState() + { + $now = new \DateTime(); + $eom = \DateTime::createFromFormat('m/Y', Kernel::END_OF_MAINTENANCE)->modify('last day of this month'); + $eol = \DateTime::createFromFormat('m/Y', Kernel::END_OF_LIFE)->modify('last day of this month'); + + if ($now > $eol) { + $versionState = 'eol'; + } elseif ($now > $eom) { + $versionState = 'eom'; + } elseif ('' !== Kernel::EXTRA_VERSION) { + $versionState = 'dev'; + } else { + $versionState = 'stable'; + } + + return $versionState; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..3808852dfaafb6e650ab6d3c56aa89529ef2d0f6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php @@ -0,0 +1,145 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter; +use Symfony\Component\VarDumper\Caster\ClassStub; +use Symfony\Component\VarDumper\Caster\LinkStub; +use Symfony\Component\VarDumper\Caster\StubCaster; +use Symfony\Component\VarDumper\Cloner\ClonerInterface; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Cloner\Stub; +use Symfony\Component\VarDumper\Cloner\VarCloner; + +/** + * DataCollector. + * + * Children of this class must store the collected data in the data property. + * + * @author Fabien Potencier + * @author Bernhard Schussek + */ +abstract class DataCollector implements DataCollectorInterface, \Serializable +{ + protected $data = array(); + + /** + * @var ValueExporter + */ + private $valueExporter; + + /** + * @var ClonerInterface + */ + private $cloner; + + private static $stubsCache = array(); + + public function serialize() + { + return serialize($this->data); + } + + public function unserialize($data) + { + $this->data = unserialize($data); + } + + /** + * Converts the variable into a serializable Data instance. + * + * This array can be displayed in the template using + * the VarDumper component. + * + * @param mixed $var + * + * @return Data + */ + protected function cloneVar($var) + { + if (null === $this->cloner) { + if (class_exists(ClassStub::class)) { + $this->cloner = new VarCloner(); + $this->cloner->setMaxItems(250); + $this->cloner->addCasters(array( + Stub::class => function (Stub $v, array $a, Stub $s, $isNested) { + return $isNested ? $a : StubCaster::castStub($v, $a, $s, true); + }, + )); + } else { + @trigger_error(sprintf('Using the %s() method without the VarDumper component is deprecated since version 3.2 and won\'t be supported in 4.0. Install symfony/var-dumper version 3.2 or above.', __METHOD__), E_USER_DEPRECATED); + $this->cloner = false; + } + } + if (false === $this->cloner) { + if (null === $this->valueExporter) { + $this->valueExporter = new ValueExporter(); + } + + return $this->valueExporter->exportValue($var); + } + + return $this->cloner->cloneVar($this->decorateVar($var)); + } + + /** + * Converts a PHP variable to a string. + * + * @param mixed $var A PHP variable + * + * @return string The string representation of the variable + * + * @deprecated Deprecated since version 3.2, to be removed in 4.0. Use cloneVar() instead. + */ + protected function varToString($var) + { + @trigger_error(sprintf('The %s() method is deprecated since version 3.2 and will be removed in 4.0. Use cloneVar() instead.', __METHOD__), E_USER_DEPRECATED); + + if (null === $this->valueExporter) { + $this->valueExporter = new ValueExporter(); + } + + return $this->valueExporter->exportValue($var); + } + + private function decorateVar($var) + { + if (is_array($var)) { + if (isset($var[0], $var[1]) && is_callable($var)) { + return ClassStub::wrapCallable($var); + } + foreach ($var as $k => $v) { + if ($v !== $d = $this->decorateVar($v)) { + $var[$k] = $d; + } + } + + return $var; + } + if (is_string($var)) { + if (isset(self::$stubsCache[$var])) { + return self::$stubsCache[$var]; + } + if (false !== strpos($var, '\\')) { + $c = (false !== $i = strpos($var, '::')) ? substr($var, 0, $i) : $var; + if (class_exists($c, false) || interface_exists($c, false) || trait_exists($c, false)) { + return self::$stubsCache[$var] = new ClassStub($var); + } + } + if (false !== strpos($var, DIRECTORY_SEPARATOR) && false === strpos($var, '://') && false === strpos($var, "\0") && @is_file($var)) { + return self::$stubsCache[$var] = new LinkStub($var); + } + } + + return $var; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..2820ad5b289b53856b40e2f458a7fd781c8e8bab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * DataCollectorInterface. + * + * @author Fabien Potencier + */ +interface DataCollectorInterface +{ + /** + * Collects data for the given Request and Response. + * + * @param Request $request A Request instance + * @param Response $response A Response instance + * @param \Exception $exception An Exception instance + */ + public function collect(Request $request, Response $response, \Exception $exception = null); + + /** + * Returns the name of the collector. + * + * @return string The collector name + */ + public function getName(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..b638ba79059bdddb7bb107a283fae970cd3fec4b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php @@ -0,0 +1,302 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Stopwatch\Stopwatch; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\CliDumper; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; +use Symfony\Component\VarDumper\Dumper\DataDumperInterface; + +/** + * @author Nicolas Grekas + */ +class DumpDataCollector extends DataCollector implements DataDumperInterface +{ + private $stopwatch; + private $fileLinkFormat; + private $dataCount = 0; + private $isCollected = true; + private $clonesCount = 0; + private $clonesIndex = 0; + private $rootRefs; + private $charset; + private $requestStack; + private $dumper; + private $dumperIsInjected; + + public function __construct(Stopwatch $stopwatch = null, $fileLinkFormat = null, $charset = null, RequestStack $requestStack = null, DataDumperInterface $dumper = null) + { + $this->stopwatch = $stopwatch; + $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + $this->charset = $charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'; + $this->requestStack = $requestStack; + $this->dumper = $dumper; + $this->dumperIsInjected = null !== $dumper; + + // All clones share these properties by reference: + $this->rootRefs = array( + &$this->data, + &$this->dataCount, + &$this->isCollected, + &$this->clonesCount, + ); + } + + public function __clone() + { + $this->clonesIndex = ++$this->clonesCount; + } + + public function dump(Data $data) + { + if ($this->stopwatch) { + $this->stopwatch->start('dump'); + } + if ($this->isCollected) { + $this->isCollected = false; + } + + $trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS, 7); + + $file = $trace[0]['file']; + $line = $trace[0]['line']; + $name = false; + $fileExcerpt = false; + + for ($i = 1; $i < 7; ++$i) { + if (isset($trace[$i]['class'], $trace[$i]['function']) + && 'dump' === $trace[$i]['function'] + && 'Symfony\Component\VarDumper\VarDumper' === $trace[$i]['class'] + ) { + $file = $trace[$i]['file']; + $line = $trace[$i]['line']; + + while (++$i < 7) { + if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && 0 !== strpos($trace[$i]['function'], 'call_user_func')) { + $file = $trace[$i]['file']; + $line = $trace[$i]['line']; + + break; + } elseif (isset($trace[$i]['object']) && $trace[$i]['object'] instanceof \Twig_Template) { + $template = $trace[$i]['object']; + $name = $template->getTemplateName(); + $src = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : false); + $info = $template->getDebugInfo(); + if (isset($info[$trace[$i - 1]['line']])) { + $line = $info[$trace[$i - 1]['line']]; + $file = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getPath() : null; + + if ($src) { + $src = explode("\n", $src); + $fileExcerpt = array(); + + for ($i = max($line - 3, 1), $max = min($line + 3, count($src)); $i <= $max; ++$i) { + $fileExcerpt[] = ''.$this->htmlEncode($src[$i - 1]).''; + } + + $fileExcerpt = '
      '.implode("\n", $fileExcerpt).'
    '; + } + } + break; + } + } + break; + } + } + + if (false === $name) { + $name = str_replace('\\', '/', $file); + $name = substr($name, strrpos($name, '/') + 1); + } + + if ($this->dumper) { + $this->doDump($data, $name, $file, $line); + } + + $this->data[] = compact('data', 'name', 'file', 'line', 'fileExcerpt'); + ++$this->dataCount; + + if ($this->stopwatch) { + $this->stopwatch->stop('dump'); + } + } + + public function collect(Request $request, Response $response, \Exception $exception = null) + { + // Sub-requests and programmatic calls stay in the collected profile. + if ($this->dumper || ($this->requestStack && $this->requestStack->getMasterRequest() !== $request) || $request->isXmlHttpRequest() || $request->headers->has('Origin')) { + return; + } + + // In all other conditions that remove the web debug toolbar, dumps are written on the output. + if (!$this->requestStack + || !$response->headers->has('X-Debug-Token') + || $response->isRedirection() + || ($response->headers->has('Content-Type') && false === strpos($response->headers->get('Content-Type'), 'html')) + || 'html' !== $request->getRequestFormat() + || false === strripos($response->getContent(), '') + ) { + if ($response->headers->has('Content-Type') && false !== strpos($response->headers->get('Content-Type'), 'html')) { + $this->dumper = new HtmlDumper('php://output', $this->charset); + $this->dumper->setDisplayOptions(array('fileLinkFormat' => $this->fileLinkFormat)); + } else { + $this->dumper = new CliDumper('php://output', $this->charset); + } + + foreach ($this->data as $dump) { + $this->doDump($dump['data'], $dump['name'], $dump['file'], $dump['line']); + } + } + } + + public function serialize() + { + if ($this->clonesCount !== $this->clonesIndex) { + return 'a:0:{}'; + } + + $this->data[] = $this->fileLinkFormat; + $this->data[] = $this->charset; + $ser = serialize($this->data); + $this->data = array(); + $this->dataCount = 0; + $this->isCollected = true; + if (!$this->dumperIsInjected) { + $this->dumper = null; + } + + return $ser; + } + + public function unserialize($data) + { + parent::unserialize($data); + $charset = array_pop($this->data); + $fileLinkFormat = array_pop($this->data); + $this->dataCount = count($this->data); + self::__construct($this->stopwatch, $fileLinkFormat, $charset); + } + + public function getDumpsCount() + { + return $this->dataCount; + } + + public function getDumps($format, $maxDepthLimit = -1, $maxItemsPerDepth = -1) + { + $data = fopen('php://memory', 'r+b'); + + if ('html' === $format) { + $dumper = new HtmlDumper($data, $this->charset); + $dumper->setDisplayOptions(array('fileLinkFormat' => $this->fileLinkFormat)); + } else { + throw new \InvalidArgumentException(sprintf('Invalid dump format: %s', $format)); + } + $dumps = array(); + + foreach ($this->data as $dump) { + $dumper->dump($dump['data']->withMaxDepth($maxDepthLimit)->withMaxItemsPerDepth($maxItemsPerDepth)); + $dump['data'] = stream_get_contents($data, -1, 0); + ftruncate($data, 0); + rewind($data); + $dumps[] = $dump; + } + + return $dumps; + } + + public function getName() + { + return 'dump'; + } + + public function __destruct() + { + if (0 === $this->clonesCount-- && !$this->isCollected && $this->data) { + $this->clonesCount = 0; + $this->isCollected = true; + + $h = headers_list(); + $i = count($h); + array_unshift($h, 'Content-Type: '.ini_get('default_mimetype')); + while (0 !== stripos($h[$i], 'Content-Type:')) { + --$i; + } + + if ('cli' !== PHP_SAPI && stripos($h[$i], 'html')) { + $this->dumper = new HtmlDumper('php://output', $this->charset); + $this->dumper->setDisplayOptions(array('fileLinkFormat' => $this->fileLinkFormat)); + } else { + $this->dumper = new CliDumper('php://output', $this->charset); + } + + foreach ($this->data as $i => $dump) { + $this->data[$i] = null; + $this->doDump($dump['data'], $dump['name'], $dump['file'], $dump['line']); + } + + $this->data = array(); + $this->dataCount = 0; + } + } + + private function doDump($data, $name, $file, $line) + { + if ($this->dumper instanceof CliDumper) { + $contextDumper = function ($name, $file, $line, $fmt) { + if ($this instanceof HtmlDumper) { + if ($file) { + $s = $this->style('meta', '%s'); + $f = strip_tags($this->style('', $file)); + $name = strip_tags($this->style('', $name)); + if ($fmt && $link = is_string($fmt) ? strtr($fmt, array('%f' => $file, '%l' => $line)) : $fmt->format($file, $line)) { + $name = sprintf(''.$s.'', strip_tags($this->style('', $link)), $f, $name); + } else { + $name = sprintf(''.$s.'', $f, $name); + } + } else { + $name = $this->style('meta', $name); + } + $this->line = $name.' on line '.$this->style('meta', $line).':'; + } else { + $this->line = $this->style('meta', $name).' on line '.$this->style('meta', $line).':'; + } + $this->dumpLine(0); + }; + $contextDumper = $contextDumper->bindTo($this->dumper, $this->dumper); + $contextDumper($name, $file, $line, $this->fileLinkFormat); + } else { + $cloner = new VarCloner(); + $this->dumper->dump($cloner->cloneVar($name.' on line '.$line.':')); + } + $this->dumper->dump($data); + } + + private function htmlEncode($s) + { + $html = ''; + + $dumper = new HtmlDumper(function ($line) use (&$html) { $html .= $line; }, $this->charset); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + + $cloner = new VarCloner(); + $dumper->dump($cloner->cloneVar($s)); + + return substr(strip_tags($html), 1, -1); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..0a87bc38926deac6e809b2ddbd8b7f810a5264c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface; + +/** + * EventDataCollector. + * + * @author Fabien Potencier + */ +class EventDataCollector extends DataCollector implements LateDataCollectorInterface +{ + protected $dispatcher; + + public function __construct(EventDispatcherInterface $dispatcher = null) + { + $this->dispatcher = $dispatcher; + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + $this->data = array( + 'called_listeners' => array(), + 'not_called_listeners' => array(), + ); + } + + public function lateCollect() + { + if ($this->dispatcher instanceof TraceableEventDispatcherInterface) { + $this->setCalledListeners($this->dispatcher->getCalledListeners()); + $this->setNotCalledListeners($this->dispatcher->getNotCalledListeners()); + } + } + + /** + * Sets the called listeners. + * + * @param array $listeners An array of called listeners + * + * @see TraceableEventDispatcherInterface + */ + public function setCalledListeners(array $listeners) + { + $this->data['called_listeners'] = $listeners; + } + + /** + * Gets the called listeners. + * + * @return array An array of called listeners + * + * @see TraceableEventDispatcherInterface + */ + public function getCalledListeners() + { + return $this->data['called_listeners']; + } + + /** + * Sets the not called listeners. + * + * @param array $listeners An array of not called listeners + * + * @see TraceableEventDispatcherInterface + */ + public function setNotCalledListeners(array $listeners) + { + $this->data['not_called_listeners'] = $listeners; + } + + /** + * Gets the not called listeners. + * + * @return array An array of not called listeners + * + * @see TraceableEventDispatcherInterface + */ + public function getNotCalledListeners() + { + return $this->data['not_called_listeners']; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'events'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..9fe826446b1956be1eb52ed4777d790cd197a627 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * ExceptionDataCollector. + * + * @author Fabien Potencier + */ +class ExceptionDataCollector extends DataCollector +{ + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + if (null !== $exception) { + $this->data = array( + 'exception' => FlattenException::create($exception), + ); + } + } + + /** + * Checks if the exception is not null. + * + * @return bool true if the exception is not null, false otherwise + */ + public function hasException() + { + return isset($this->data['exception']); + } + + /** + * Gets the exception. + * + * @return \Exception The exception + */ + public function getException() + { + return $this->data['exception']; + } + + /** + * Gets the exception message. + * + * @return string The exception message + */ + public function getMessage() + { + return $this->data['exception']->getMessage(); + } + + /** + * Gets the exception code. + * + * @return int The exception code + */ + public function getCode() + { + return $this->data['exception']->getCode(); + } + + /** + * Gets the status code. + * + * @return int The status code + */ + public function getStatusCode() + { + return $this->data['exception']->getStatusCode(); + } + + /** + * Gets the exception trace. + * + * @return array The exception trace + */ + public function getTrace() + { + return $this->data['exception']->getTrace(); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'exception'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..012332de479f742c4df52b8c4077af57d53ef6e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +/** + * LateDataCollectorInterface. + * + * @author Fabien Potencier + */ +interface LateDataCollectorInterface +{ + /** + * Collects data as late as possible. + */ + public function lateCollect(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..358a411ab003271f2b710d7eee6e4d6bd53499ce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php @@ -0,0 +1,184 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +use Symfony\Component\Debug\Exception\SilencedErrorContext; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; + +/** + * LogDataCollector. + * + * @author Fabien Potencier + */ +class LoggerDataCollector extends DataCollector implements LateDataCollectorInterface +{ + private $logger; + + public function __construct($logger = null) + { + if (null !== $logger && $logger instanceof DebugLoggerInterface) { + $this->logger = $logger; + } + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + // everything is done as late as possible + } + + /** + * {@inheritdoc} + */ + public function lateCollect() + { + if (null !== $this->logger) { + $this->data = $this->computeErrorsCount(); + $this->data['logs'] = $this->sanitizeLogs($this->logger->getLogs()); + } + } + + /** + * Gets the logs. + * + * @return array An array of logs + */ + public function getLogs() + { + return isset($this->data['logs']) ? $this->data['logs'] : array(); + } + + public function getPriorities() + { + return isset($this->data['priorities']) ? $this->data['priorities'] : array(); + } + + public function countErrors() + { + return isset($this->data['error_count']) ? $this->data['error_count'] : 0; + } + + public function countDeprecations() + { + return isset($this->data['deprecation_count']) ? $this->data['deprecation_count'] : 0; + } + + public function countWarnings() + { + return isset($this->data['warning_count']) ? $this->data['warning_count'] : 0; + } + + public function countScreams() + { + return isset($this->data['scream_count']) ? $this->data['scream_count'] : 0; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'logger'; + } + + private function sanitizeLogs($logs) + { + $sanitizedLogs = array(); + + foreach ($logs as $log) { + if (!$this->isSilencedOrDeprecationErrorLog($log)) { + $log['context'] = $log['context'] ? $this->cloneVar($log['context']) : $log['context']; + $sanitizedLogs[] = $log; + + continue; + } + + $exception = $log['context']['exception']; + $errorId = md5("{$exception->getSeverity()}/{$exception->getLine()}/{$exception->getFile()}".($exception instanceof \Exception ? "\0".$exception->getMessage() : ''), true); + + if (isset($sanitizedLogs[$errorId])) { + ++$sanitizedLogs[$errorId]['errorCount']; + } else { + $log['context'] = $log['context'] ? $this->cloneVar($log['context']) : $log['context']; + + $log += array( + 'errorCount' => 1, + 'scream' => $exception instanceof SilencedErrorContext, + ); + + $sanitizedLogs[$errorId] = $log; + } + } + + return array_values($sanitizedLogs); + } + + private function isSilencedOrDeprecationErrorLog(array $log) + { + if (!isset($log['context']['exception'])) { + return false; + } + + $exception = $log['context']['exception']; + + if ($exception instanceof SilencedErrorContext) { + return true; + } + + if ($exception instanceof \ErrorException && in_array($exception->getSeverity(), array(E_DEPRECATED, E_USER_DEPRECATED), true)) { + return true; + } + + return false; + } + + private function computeErrorsCount() + { + $count = array( + 'error_count' => $this->logger->countErrors(), + 'deprecation_count' => 0, + 'warning_count' => 0, + 'scream_count' => 0, + 'priorities' => array(), + ); + + foreach ($this->logger->getLogs() as $log) { + if (isset($count['priorities'][$log['priority']])) { + ++$count['priorities'][$log['priority']]['count']; + } else { + $count['priorities'][$log['priority']] = array( + 'count' => 1, + 'name' => $log['priorityName'], + ); + } + if ('WARNING' === $log['priorityName']) { + ++$count['warning_count']; + } + + if ($this->isSilencedOrDeprecationErrorLog($log)) { + if ($log['context']['exception'] instanceof SilencedErrorContext) { + ++$count['scream_count']; + } else { + ++$count['deprecation_count']; + } + } + } + + ksort($count['priorities']); + + return $count; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..93850108444a0d136bf3bb260b9f3ddc32e90fd0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php @@ -0,0 +1,109 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * MemoryDataCollector. + * + * @author Fabien Potencier + */ +class MemoryDataCollector extends DataCollector implements LateDataCollectorInterface +{ + public function __construct() + { + $this->data = array( + 'memory' => 0, + 'memory_limit' => $this->convertToBytes(ini_get('memory_limit')), + ); + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + $this->updateMemoryUsage(); + } + + /** + * {@inheritdoc} + */ + public function lateCollect() + { + $this->updateMemoryUsage(); + } + + /** + * Gets the memory. + * + * @return int The memory + */ + public function getMemory() + { + return $this->data['memory']; + } + + /** + * Gets the PHP memory limit. + * + * @return int The memory limit + */ + public function getMemoryLimit() + { + return $this->data['memory_limit']; + } + + /** + * Updates the memory usage data. + */ + public function updateMemoryUsage() + { + $this->data['memory'] = memory_get_peak_usage(true); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'memory'; + } + + private function convertToBytes($memoryLimit) + { + if ('-1' === $memoryLimit) { + return -1; + } + + $memoryLimit = strtolower($memoryLimit); + $max = strtolower(ltrim($memoryLimit, '+')); + if (0 === strpos($max, '0x')) { + $max = intval($max, 16); + } elseif (0 === strpos($max, '0')) { + $max = intval($max, 8); + } else { + $max = (int) $max; + } + + switch (substr($memoryLimit, -1)) { + case 't': $max *= 1024; + case 'g': $max *= 1024; + case 'm': $max *= 1024; + case 'k': $max *= 1024; + } + + return $max; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..e29cc9da4ddea87c31106434681e125066751da8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php @@ -0,0 +1,402 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +use Symfony\Component\HttpFoundation\ParameterBag; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * RequestDataCollector. + * + * @author Fabien Potencier + */ +class RequestDataCollector extends DataCollector implements EventSubscriberInterface +{ + /** @var \SplObjectStorage */ + protected $controllers; + + public function __construct() + { + $this->controllers = new \SplObjectStorage(); + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + $responseHeaders = $response->headers->all(); + foreach ($response->headers->getCookies() as $cookie) { + $responseHeaders['set-cookie'][] = (string) $cookie; + } + + // attributes are serialized and as they can be anything, they need to be converted to strings. + $attributes = array(); + $route = ''; + foreach ($request->attributes->all() as $key => $value) { + if ('_route' === $key) { + $route = is_object($value) ? $value->getPath() : $value; + $attributes[$key] = $route; + } else { + $attributes[$key] = $value; + } + } + + $content = null; + try { + $content = $request->getContent(); + } catch (\LogicException $e) { + // the user already got the request content as a resource + $content = false; + } + + $sessionMetadata = array(); + $sessionAttributes = array(); + $session = null; + $flashes = array(); + if ($request->hasSession()) { + $session = $request->getSession(); + if ($session->isStarted()) { + $sessionMetadata['Created'] = date(DATE_RFC822, $session->getMetadataBag()->getCreated()); + $sessionMetadata['Last used'] = date(DATE_RFC822, $session->getMetadataBag()->getLastUsed()); + $sessionMetadata['Lifetime'] = $session->getMetadataBag()->getLifetime(); + $sessionAttributes = $session->all(); + $flashes = $session->getFlashBag()->peekAll(); + } + } + + $statusCode = $response->getStatusCode(); + + $this->data = array( + 'method' => $request->getMethod(), + 'format' => $request->getRequestFormat(), + 'content' => $content, + 'content_type' => $response->headers->get('Content-Type', 'text/html'), + 'status_text' => isset(Response::$statusTexts[$statusCode]) ? Response::$statusTexts[$statusCode] : '', + 'status_code' => $statusCode, + 'request_query' => $request->query->all(), + 'request_request' => $request->request->all(), + 'request_headers' => $request->headers->all(), + 'request_server' => $request->server->all(), + 'request_cookies' => $request->cookies->all(), + 'request_attributes' => $attributes, + 'route' => $route, + 'response_headers' => $responseHeaders, + 'session_metadata' => $sessionMetadata, + 'session_attributes' => $sessionAttributes, + 'flashes' => $flashes, + 'path_info' => $request->getPathInfo(), + 'controller' => 'n/a', + 'locale' => $request->getLocale(), + ); + + if (isset($this->data['request_headers']['php-auth-pw'])) { + $this->data['request_headers']['php-auth-pw'] = '******'; + } + + if (isset($this->data['request_server']['PHP_AUTH_PW'])) { + $this->data['request_server']['PHP_AUTH_PW'] = '******'; + } + + if (isset($this->data['request_request']['_password'])) { + $this->data['request_request']['_password'] = '******'; + } + + foreach ($this->data as $key => $value) { + if (!is_array($value)) { + continue; + } + if ('request_headers' === $key || 'response_headers' === $key) { + $value = array_map(function ($v) { return isset($v[0]) && !isset($v[1]) ? $v[0] : $v; }, $value); + } + if ('request_server' !== $key && 'request_cookies' !== $key) { + $this->data[$key] = array_map(array($this, 'cloneVar'), $value); + } + } + + if (isset($this->controllers[$request])) { + $this->data['controller'] = $this->parseController($this->controllers[$request]); + unset($this->controllers[$request]); + } + + if (null !== $session && $session->isStarted()) { + if ($request->attributes->has('_redirected')) { + $this->data['redirect'] = $session->remove('sf_redirect'); + } + + if ($response->isRedirect()) { + $session->set('sf_redirect', array( + 'token' => $response->headers->get('x-debug-token'), + 'route' => $request->attributes->get('_route', 'n/a'), + 'method' => $request->getMethod(), + 'controller' => $this->parseController($request->attributes->get('_controller')), + 'status_code' => $statusCode, + 'status_text' => Response::$statusTexts[(int) $statusCode], + )); + } + } + } + + public function getMethod() + { + return $this->data['method']; + } + + public function getPathInfo() + { + return $this->data['path_info']; + } + + public function getRequestRequest() + { + return new ParameterBag($this->data['request_request']); + } + + public function getRequestQuery() + { + return new ParameterBag($this->data['request_query']); + } + + public function getRequestHeaders() + { + return new ParameterBag($this->data['request_headers']); + } + + public function getRequestServer($raw = false) + { + return new ParameterBag($raw ? $this->data['request_server'] : array_map(array($this, 'cloneVar'), $this->data['request_server'])); + } + + public function getRequestCookies($raw = false) + { + return new ParameterBag($raw ? $this->data['request_cookies'] : array_map(array($this, 'cloneVar'), $this->data['request_cookies'])); + } + + public function getRequestAttributes() + { + return new ParameterBag($this->data['request_attributes']); + } + + public function getResponseHeaders() + { + return new ParameterBag($this->data['response_headers']); + } + + public function getSessionMetadata() + { + return $this->data['session_metadata']; + } + + public function getSessionAttributes() + { + return $this->data['session_attributes']; + } + + public function getFlashes() + { + return $this->data['flashes']; + } + + public function getContent() + { + return $this->data['content']; + } + + public function getContentType() + { + return $this->data['content_type']; + } + + public function getStatusText() + { + return $this->data['status_text']; + } + + public function getStatusCode() + { + return $this->data['status_code']; + } + + public function getFormat() + { + return $this->data['format']; + } + + public function getLocale() + { + return $this->data['locale']; + } + + /** + * Gets the route name. + * + * The _route request attributes is automatically set by the Router Matcher. + * + * @return string The route + */ + public function getRoute() + { + return $this->data['route']; + } + + public function getIdentifier() + { + return $this->data['route'] ?: (is_array($this->data['controller']) ? $this->data['controller']['class'].'::'.$this->data['controller']['method'].'()' : $this->data['controller']); + } + + /** + * Gets the route parameters. + * + * The _route_params request attributes is automatically set by the RouterListener. + * + * @return array The parameters + */ + public function getRouteParams() + { + if (!isset($this->data['request_attributes']['_route_params'])) { + return array(); + } + + $data = $this->data['request_attributes']['_route_params']; + $rawData = $data->getRawData(); + if (!isset($rawData[1])) { + return array(); + } + + $params = array(); + foreach ($rawData[1] as $k => $v) { + $params[$k] = $data->seek($k); + } + + return $params; + } + + /** + * Gets the parsed controller. + * + * @return array|string The controller as a string or array of data + * with keys 'class', 'method', 'file' and 'line' + */ + public function getController() + { + return $this->data['controller']; + } + + /** + * Gets the previous request attributes. + * + * @return array|bool A legacy array of data from the previous redirection response + * or false otherwise + */ + public function getRedirect() + { + return isset($this->data['redirect']) ? $this->data['redirect'] : false; + } + + public function onKernelController(FilterControllerEvent $event) + { + $this->controllers[$event->getRequest()] = $event->getController(); + } + + public function onKernelResponse(FilterResponseEvent $event) + { + if (!$event->isMasterRequest() || !$event->getRequest()->hasSession() || !$event->getRequest()->getSession()->isStarted()) { + return; + } + + if ($event->getRequest()->getSession()->has('sf_redirect')) { + $event->getRequest()->attributes->set('_redirected', true); + } + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::CONTROLLER => 'onKernelController', + KernelEvents::RESPONSE => 'onKernelResponse', + ); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'request'; + } + + /** + * Parse a controller. + * + * @param mixed $controller The controller to parse + * + * @return array|string An array of controller data or a simple string + */ + protected function parseController($controller) + { + if (is_string($controller) && false !== strpos($controller, '::')) { + $controller = explode('::', $controller); + } + + if (is_array($controller)) { + try { + $r = new \ReflectionMethod($controller[0], $controller[1]); + + return array( + 'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0], + 'method' => $controller[1], + 'file' => $r->getFileName(), + 'line' => $r->getStartLine(), + ); + } catch (\ReflectionException $e) { + if (is_callable($controller)) { + // using __call or __callStatic + return array( + 'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0], + 'method' => $controller[1], + 'file' => 'n/a', + 'line' => 'n/a', + ); + } + } + } + + if ($controller instanceof \Closure) { + $r = new \ReflectionFunction($controller); + + return array( + 'class' => $r->getName(), + 'method' => null, + 'file' => $r->getFileName(), + 'line' => $r->getStartLine(), + ); + } + + if (is_object($controller)) { + $r = new \ReflectionClass($controller); + + return array( + 'class' => $r->getName(), + 'method' => null, + 'file' => $r->getFileName(), + 'line' => $r->getStartLine(), + ); + } + + return is_string($controller) ? $controller : 'n/a'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..76d962346175e551f3de4e171e00307188a92f66 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; + +/** + * RouterDataCollector. + * + * @author Fabien Potencier + */ +class RouterDataCollector extends DataCollector +{ + protected $controllers; + + public function __construct() + { + $this->controllers = new \SplObjectStorage(); + + $this->data = array( + 'redirect' => false, + 'url' => null, + 'route' => null, + ); + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + if ($response instanceof RedirectResponse) { + $this->data['redirect'] = true; + $this->data['url'] = $response->getTargetUrl(); + + if ($this->controllers->contains($request)) { + $this->data['route'] = $this->guessRoute($request, $this->controllers[$request]); + } + } + + unset($this->controllers[$request]); + } + + protected function guessRoute(Request $request, $controller) + { + return 'n/a'; + } + + /** + * Remembers the controller associated to each request. + * + * @param FilterControllerEvent $event The filter controller event + */ + public function onKernelController(FilterControllerEvent $event) + { + $this->controllers[$event->getRequest()] = $event->getController(); + } + + /** + * @return bool Whether this request will result in a redirect + */ + public function getRedirect() + { + return $this->data['redirect']; + } + + /** + * @return string|null The target URL + */ + public function getTargetUrl() + { + return $this->data['url']; + } + + /** + * @return string|null The target route + */ + public function getTargetRoute() + { + return $this->data['route']; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'router'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..4ccaafa311ee19eceb33de97ddccbb5b2433863a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.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\HttpKernel\DataCollector; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\KernelInterface; + +/** + * TimeDataCollector. + * + * @author Fabien Potencier + */ +class TimeDataCollector extends DataCollector implements LateDataCollectorInterface +{ + protected $kernel; + protected $stopwatch; + + public function __construct(KernelInterface $kernel = null, $stopwatch = null) + { + $this->kernel = $kernel; + $this->stopwatch = $stopwatch; + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + if (null !== $this->kernel) { + $startTime = $this->kernel->getStartTime(); + } else { + $startTime = $request->server->get('REQUEST_TIME_FLOAT', $request->server->get('REQUEST_TIME')); + } + + $this->data = array( + 'token' => $response->headers->get('X-Debug-Token'), + 'start_time' => $startTime * 1000, + 'events' => array(), + ); + } + + /** + * {@inheritdoc} + */ + public function lateCollect() + { + if (null !== $this->stopwatch && isset($this->data['token'])) { + $this->setEvents($this->stopwatch->getSectionEvents($this->data['token'])); + } + unset($this->data['token']); + } + + /** + * Sets the request events. + * + * @param array $events The request events + */ + public function setEvents(array $events) + { + foreach ($events as $event) { + $event->ensureStopped(); + } + + $this->data['events'] = $events; + } + + /** + * Gets the request events. + * + * @return array The request events + */ + public function getEvents() + { + return $this->data['events']; + } + + /** + * Gets the request elapsed time. + * + * @return float The elapsed time + */ + public function getDuration() + { + if (!isset($this->data['events']['__section__'])) { + return 0; + } + + $lastEvent = $this->data['events']['__section__']; + + return $lastEvent->getOrigin() + $lastEvent->getDuration() - $this->getStartTime(); + } + + /** + * Gets the initialization time. + * + * This is the time spent until the beginning of the request handling. + * + * @return float The elapsed time + */ + public function getInitTime() + { + if (!isset($this->data['events']['__section__'])) { + return 0; + } + + return $this->data['events']['__section__']->getOrigin() - $this->getStartTime(); + } + + /** + * Gets the request time. + * + * @return int The time + */ + public function getStartTime() + { + return $this->data['start_time']; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'time'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php new file mode 100644 index 0000000000000000000000000000000000000000..f1e48311c0429c5bb9dbaf216a84e9199101dbd9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.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\Component\HttpKernel\DataCollector\Util; + +@trigger_error('The '.__NAMESPACE__.'\ValueExporter class is deprecated since version 3.2 and will be removed in 4.0. Use the VarDumper component instead.', E_USER_DEPRECATED); + +/** + * @author Bernhard Schussek + * + * @deprecated since version 3.2, to be removed in 4.0. Use the VarDumper component instead. + */ +class ValueExporter +{ + /** + * Converts a PHP value to a string. + * + * @param mixed $value The PHP value + * @param int $depth only for internal usage + * @param bool $deep only for internal usage + * + * @return string The string representation of the given value + */ + public function exportValue($value, $depth = 1, $deep = false) + { + if ($value instanceof \__PHP_Incomplete_Class) { + return sprintf('__PHP_Incomplete_Class(%s)', $this->getClassNameFromIncomplete($value)); + } + + if (is_object($value)) { + if ($value instanceof \DateTimeInterface) { + return sprintf('Object(%s) - %s', get_class($value), $value->format(\DateTime::ATOM)); + } + + return sprintf('Object(%s)', get_class($value)); + } + + if (is_array($value)) { + if (empty($value)) { + return '[]'; + } + + $indent = str_repeat(' ', $depth); + + $a = array(); + foreach ($value as $k => $v) { + if (is_array($v)) { + $deep = true; + } + $a[] = sprintf('%s => %s', $k, $this->exportValue($v, $depth + 1, $deep)); + } + + if ($deep) { + return sprintf("[\n%s%s\n%s]", $indent, implode(sprintf(", \n%s", $indent), $a), str_repeat(' ', $depth - 1)); + } + + $s = sprintf('[%s]', implode(', ', $a)); + + if (80 > strlen($s)) { + return $s; + } + + return sprintf("[\n%s%s\n]", $indent, implode(sprintf(",\n%s", $indent), $a)); + } + + if (is_resource($value)) { + return sprintf('Resource(%s#%d)', get_resource_type($value), $value); + } + + if (null === $value) { + return 'null'; + } + + if (false === $value) { + return 'false'; + } + + if (true === $value) { + return 'true'; + } + + return (string) $value; + } + + private function getClassNameFromIncomplete(\__PHP_Incomplete_Class $value) + { + $array = new \ArrayObject($value); + + return $array['__PHP_Incomplete_Class_Name']; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..03e3cf89549bacf84cb617e8da57cd36ae79c045 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Debug; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; + +/** + * Formats debug file links. + * + * @author Jérémy Romey + */ +class FileLinkFormatter implements \Serializable +{ + private $fileLinkFormat; + private $requestStack; + private $baseDir; + private $urlFormat; + + public function __construct($fileLinkFormat = null, RequestStack $requestStack = null, $baseDir = null, $urlFormat = null) + { + $fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + if ($fileLinkFormat && !is_array($fileLinkFormat)) { + $i = strpos($f = $fileLinkFormat, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: strlen($f); + $fileLinkFormat = array(substr($f, 0, $i)) + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE); + } + + $this->fileLinkFormat = $fileLinkFormat; + $this->requestStack = $requestStack; + $this->baseDir = $baseDir; + $this->urlFormat = $urlFormat; + } + + public function format($file, $line) + { + if ($fmt = $this->getFileLinkFormat()) { + for ($i = 1; isset($fmt[$i]); ++$i) { + if (0 === strpos($file, $k = $fmt[$i++])) { + $file = substr_replace($file, $fmt[$i], 0, strlen($k)); + break; + } + } + + return strtr($fmt[0], array('%f' => $file, '%l' => $line)); + } + + return false; + } + + public function serialize() + { + return serialize($this->getFileLinkFormat()); + } + + public function unserialize($serialized) + { + $this->fileLinkFormat = unserialize($serialized); + } + + private function getFileLinkFormat() + { + if ($this->fileLinkFormat) { + return $this->fileLinkFormat; + } + if ($this->requestStack && $this->baseDir && $this->urlFormat) { + $request = $this->requestStack->getMasterRequest(); + if ($request instanceof Request) { + return array( + $request->getSchemeAndHttpHost().$request->getBaseUrl().$this->urlFormat, + $this->baseDir.DIRECTORY_SEPARATOR, '', + ); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php new file mode 100644 index 0000000000000000000000000000000000000000..fbc49dffc8daadc73aa734a672ce5927a7025433 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Debug; + +use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher as BaseTraceableEventDispatcher; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\EventDispatcher\Event; + +/** + * Collects some data about event listeners. + * + * This event dispatcher delegates the dispatching to another one. + * + * @author Fabien Potencier + */ +class TraceableEventDispatcher extends BaseTraceableEventDispatcher +{ + /** + * {@inheritdoc} + */ + protected function preDispatch($eventName, Event $event) + { + switch ($eventName) { + case KernelEvents::REQUEST: + $this->stopwatch->openSection(); + break; + case KernelEvents::VIEW: + case KernelEvents::RESPONSE: + // stop only if a controller has been executed + if ($this->stopwatch->isStarted('controller')) { + $this->stopwatch->stop('controller'); + } + break; + case KernelEvents::TERMINATE: + $token = $event->getResponse()->headers->get('X-Debug-Token'); + // There is a very special case when using built-in AppCache class as kernel wrapper, in the case + // of an ESI request leading to a `stale` response [B] inside a `fresh` cached response [A]. + // In this case, `$token` contains the [B] debug token, but the open `stopwatch` section ID + // is equal to the [A] debug token. Trying to reopen section with the [B] token throws an exception + // which must be caught. + try { + $this->stopwatch->openSection($token); + } catch (\LogicException $e) { + } + break; + } + } + + /** + * {@inheritdoc} + */ + protected function postDispatch($eventName, Event $event) + { + switch ($eventName) { + case KernelEvents::CONTROLLER_ARGUMENTS: + $this->stopwatch->start('controller', 'section'); + break; + case KernelEvents::RESPONSE: + $token = $event->getResponse()->headers->get('X-Debug-Token'); + $this->stopwatch->stopSection($token); + break; + case KernelEvents::TERMINATE: + // In the special case described in the `preDispatch` method above, the `$token` section + // does not exist, then closing it throws an exception which must be caught. + $token = $event->getResponse()->headers->get('X-Debug-Token'); + try { + $this->stopwatch->stopSection($token); + } catch (\LogicException $e) { + } + break; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/AddClassesToCachePass.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/AddClassesToCachePass.php new file mode 100644 index 0000000000000000000000000000000000000000..e9d012033d6d4f7d5730a6286e458fe372b7b077 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/AddClassesToCachePass.php @@ -0,0 +1,149 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DependencyInjection; + +use Composer\Autoload\ClassLoader; +use Symfony\Component\Debug\DebugClassLoader; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\HttpKernel\Kernel; + +/** + * Sets the classes to compile in the cache for the container. + * + * @author Fabien Potencier + */ +class AddClassesToCachePass implements CompilerPassInterface +{ + private $kernel; + + public function __construct(Kernel $kernel) + { + $this->kernel = $kernel; + } + + /** + * {@inheritdoc} + */ + public function process(ContainerBuilder $container) + { + $classes = array(); + $annotatedClasses = array(); + foreach ($container->getExtensions() as $extension) { + if ($extension instanceof Extension) { + $classes = array_merge($classes, $extension->getClassesToCompile()); + $annotatedClasses = array_merge($annotatedClasses, $extension->getAnnotatedClassesToCompile()); + } + } + + $classes = $container->getParameterBag()->resolveValue($classes); + $annotatedClasses = $container->getParameterBag()->resolveValue($annotatedClasses); + $existingClasses = $this->getClassesInComposerClassMaps(); + + $this->kernel->setClassCache($this->expandClasses($classes, $existingClasses)); + $this->kernel->setAnnotatedClassCache($this->expandClasses($annotatedClasses, $existingClasses)); + } + + /** + * Expands the given class patterns using a list of existing classes. + * + * @param array $patterns The class patterns to expand + * @param array $classes The existing classes to match against the patterns + * + * @return array A list of classes derivated from the patterns + */ + private function expandClasses(array $patterns, array $classes) + { + $expanded = array(); + + // Explicit classes declared in the patterns are returned directly + foreach ($patterns as $key => $pattern) { + if (substr($pattern, -1) !== '\\' && false === strpos($pattern, '*')) { + unset($patterns[$key]); + $expanded[] = ltrim($pattern, '\\'); + } + } + + // Match patterns with the classes list + $regexps = $this->patternsToRegexps($patterns); + + foreach ($classes as $class) { + $class = ltrim($class, '\\'); + + if ($this->matchAnyRegexps($class, $regexps)) { + $expanded[] = $class; + } + } + + return array_unique($expanded); + } + + private function getClassesInComposerClassMaps() + { + $classes = array(); + + foreach (spl_autoload_functions() as $function) { + if (!is_array($function)) { + continue; + } + + if ($function[0] instanceof DebugClassLoader) { + $function = $function[0]->getClassLoader(); + } + + if (is_array($function) && $function[0] instanceof ClassLoader) { + $classes += array_filter($function[0]->getClassMap()); + } + } + + return array_keys($classes); + } + + private function patternsToRegexps($patterns) + { + $regexps = array(); + + foreach ($patterns as $pattern) { + // Escape user input + $regex = preg_quote(ltrim($pattern, '\\')); + + // Wildcards * and ** + $regex = strtr($regex, array('\\*\\*' => '.*?', '\\*' => '[^\\\\]*?')); + + // If this class does not end by a slash, anchor the end + if (substr($regex, -1) !== '\\') { + $regex .= '$'; + } + + $regexps[] = '{^\\\\'.$regex.'}'; + } + + return $regexps; + } + + private function matchAnyRegexps($class, $regexps) + { + $blacklisted = false !== strpos($class, 'Test'); + + foreach ($regexps as $regex) { + if ($blacklisted && false === strpos($regex, 'Test')) { + continue; + } + + if (preg_match($regex, '\\'.$class)) { + return true; + } + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..c7eca3063c610e21acf9638ff32ea79ad84f7ec2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.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\Component\HttpKernel\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * This extension sub-class provides first-class integration with the + * Config/Definition Component. + * + * You can use this as base class if + * + * a) you use the Config/Definition component for configuration, + * b) your configuration class is named "Configuration", and + * c) the configuration class resides in the DependencyInjection sub-folder. + * + * @author Johannes M. Schmitt + */ +abstract class ConfigurableExtension extends Extension +{ + /** + * {@inheritdoc} + */ + final public function load(array $configs, ContainerBuilder $container) + { + $this->loadInternal($this->processConfiguration($this->getConfiguration($configs, $container), $configs), $container); + } + + /** + * Configures the passed container according to the merged configuration. + * + * @param array $mergedConfig + * @param ContainerBuilder $container + */ + abstract protected function loadInternal(array $mergedConfig, ContainerBuilder $container); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php new file mode 100644 index 0000000000000000000000000000000000000000..a71bed04d330e87ce66cbef1d073183d9c110019 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.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\Component\HttpKernel\DependencyInjection; + +use Symfony\Component\DependencyInjection\Extension\Extension as BaseExtension; + +/** + * Allow adding classes to the class cache. + * + * @author Fabien Potencier + */ +abstract class Extension extends BaseExtension +{ + private $classes = array(); + private $annotatedClasses = array(); + + /** + * Gets the classes to cache. + * + * @return array An array of classes + */ + public function getClassesToCompile() + { + return $this->classes; + } + + /** + * Gets the annotated classes to cache. + * + * @return array An array of classes + */ + public function getAnnotatedClassesToCompile() + { + return $this->annotatedClasses; + } + + /** + * Adds classes to the class cache. + * + * @param array $classes An array of class patterns + */ + public function addClassesToCompile(array $classes) + { + $this->classes = array_merge($this->classes, $classes); + } + + /** + * Adds annotated classes to the class cache. + * + * @param array $annotatedClasses An array of class patterns + */ + public function addAnnotatedClassesToCompile(array $annotatedClasses) + { + $this->annotatedClasses = array_merge($this->annotatedClasses, $annotatedClasses); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php new file mode 100644 index 0000000000000000000000000000000000000000..95cc38827db2727d15db2cd3386fbf591e72533a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; + +/** + * Adds services tagged kernel.fragment_renderer as HTTP content rendering strategies. + * + * @author Fabien Potencier + */ +class FragmentRendererPass implements CompilerPassInterface +{ + private $handlerService; + private $rendererTag; + + /** + * @param string $handlerService Service name of the fragment handler in the container + * @param string $rendererTag Tag name used for fragments + */ + public function __construct($handlerService = 'fragment.handler', $rendererTag = 'kernel.fragment_renderer') + { + $this->handlerService = $handlerService; + $this->rendererTag = $rendererTag; + } + + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition($this->handlerService)) { + return; + } + + $definition = $container->getDefinition($this->handlerService); + foreach ($container->findTaggedServiceIds($this->rendererTag) as $id => $tags) { + $def = $container->getDefinition($id); + if (!$def->isPublic()) { + throw new InvalidArgumentException(sprintf('The service "%s" must be public as fragment renderer are lazy-loaded.', $id)); + } + + if ($def->isAbstract()) { + throw new InvalidArgumentException(sprintf('The service "%s" must not be abstract as fragment renderer are lazy-loaded.', $id)); + } + + $class = $container->getParameterBag()->resolveValue($def->getClass()); + $interface = 'Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface'; + + if (!is_subclass_of($class, $interface)) { + if (!class_exists($class, false)) { + throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); + } + + throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface)); + } + + foreach ($tags as $tag) { + $definition->addMethodCall('addRendererService', array($tag['alias'], $id)); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..3559e39e9001d2f8ec82b5991de646b7ccb0b1dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpKernel\Fragment\FragmentHandler; + +/** + * Lazily loads fragment renderers from the dependency injection container. + * + * @author Fabien Potencier + */ +class LazyLoadingFragmentHandler extends FragmentHandler +{ + private $container; + private $rendererIds = array(); + + /** + * Constructor. + * + * @param ContainerInterface $container A container + * @param RequestStack $requestStack The Request stack that controls the lifecycle of requests + * @param bool $debug Whether the debug mode is enabled or not + */ + public function __construct(ContainerInterface $container, RequestStack $requestStack, $debug = false) + { + $this->container = $container; + + parent::__construct($requestStack, array(), $debug); + } + + /** + * Adds a service as a fragment renderer. + * + * @param string $name The service name + * @param string $renderer The render service id + */ + public function addRendererService($name, $renderer) + { + $this->rendererIds[$name] = $renderer; + } + + /** + * {@inheritdoc} + */ + public function render($uri, $renderer = 'inline', array $options = array()) + { + if (isset($this->rendererIds[$renderer])) { + $this->addRenderer($this->container->get($this->rendererIds[$renderer])); + + unset($this->rendererIds[$renderer]); + } + + return parent::render($uri, $renderer, $options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php new file mode 100644 index 0000000000000000000000000000000000000000..dcd73828de0b1f03236cb1bd82df8376186a28a9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DependencyInjection; + +use Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass as BaseMergeExtensionConfigurationPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +/** + * Ensures certain extensions are always loaded. + * + * @author Kris Wallsmith + */ +class MergeExtensionConfigurationPass extends BaseMergeExtensionConfigurationPass +{ + private $extensions; + + public function __construct(array $extensions) + { + $this->extensions = $extensions; + } + + public function process(ContainerBuilder $container) + { + foreach ($this->extensions as $extension) { + if (!count($container->getExtensionConfig($extension))) { + $container->loadFromExtension($extension, array()); + } + } + + parent::process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/FilterControllerArgumentsEvent.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/FilterControllerArgumentsEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..1dc784ed52aca8a9213797047026c23a94cd8a4f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/FilterControllerArgumentsEvent.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * Allows filtering of controller arguments. + * + * You can call getController() to retrieve the controller and getArguments + * to retrieve the current arguments. With setArguments() you can replace + * arguments that are used to call the controller. + * + * Arguments set in the event must be compatible with the signature of the + * controller. + * + * @author Christophe Coevoet + */ +class FilterControllerArgumentsEvent extends FilterControllerEvent +{ + private $arguments; + + public function __construct(HttpKernelInterface $kernel, callable $controller, array $arguments, Request $request, $requestType) + { + parent::__construct($kernel, $controller, $request, $requestType); + + $this->arguments = $arguments; + } + + /** + * @return array + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * @param array $arguments + */ + public function setArguments(array $arguments) + { + $this->arguments = $arguments; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/FilterControllerEvent.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/FilterControllerEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..e0d46aa4ce3e8a9934c0e046faf86a2ce197de07 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/FilterControllerEvent.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * Allows filtering of a controller callable. + * + * You can call getController() to retrieve the current controller. With + * setController() you can set a new controller that is used in the processing + * of the request. + * + * Controllers should be callables. + * + * @author Bernhard Schussek + */ +class FilterControllerEvent extends KernelEvent +{ + /** + * The current controller. + */ + private $controller; + + public function __construct(HttpKernelInterface $kernel, callable $controller, Request $request, $requestType) + { + parent::__construct($kernel, $request, $requestType); + + $this->setController($controller); + } + + /** + * Returns the current controller. + * + * @return callable + */ + public function getController() + { + return $this->controller; + } + + /** + * Sets a new controller. + * + * @param callable $controller + */ + public function setController(callable $controller) + { + $this->controller = $controller; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..ed816a9d32cf98c853ae8214b89ef8d94b77e7ef --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Allows to filter a Response object. + * + * You can call getResponse() to retrieve the current response. With + * setResponse() you can set a new response that will be returned to the + * browser. + * + * @author Bernhard Schussek + */ +class FilterResponseEvent extends KernelEvent +{ + /** + * The current response object. + * + * @var Response + */ + private $response; + + public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, Response $response) + { + parent::__construct($kernel, $request, $requestType); + + $this->setResponse($response); + } + + /** + * Returns the current response object. + * + * @return Response + */ + public function getResponse() + { + return $this->response; + } + + /** + * Sets a new response object. + * + * @param Response $response + */ + public function setResponse(Response $response) + { + $this->response = $response; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/FinishRequestEvent.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/FinishRequestEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..ee724843cd843b6adbdcc16d87482f97a7304944 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/FinishRequestEvent.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +/** + * Triggered whenever a request is fully processed. + * + * @author Benjamin Eberlei + */ +class FinishRequestEvent extends KernelEvent +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/GetResponseEvent.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/GetResponseEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..4c96a4b7d907a1b6cf90e53d5c7812be0533a6a5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/GetResponseEvent.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\Component\HttpKernel\Event; + +use Symfony\Component\HttpFoundation\Response; + +/** + * Allows to create a response for a request. + * + * Call setResponse() to set the response that will be returned for the + * current request. The propagation of this event is stopped as soon as a + * response is set. + * + * @author Bernhard Schussek + */ +class GetResponseEvent extends KernelEvent +{ + /** + * The response object. + * + * @var Response + */ + private $response; + + /** + * Returns the response object. + * + * @return Response + */ + public function getResponse() + { + return $this->response; + } + + /** + * Sets a response and stops event propagation. + * + * @param Response $response + */ + public function setResponse(Response $response) + { + $this->response = $response; + + $this->stopPropagation(); + } + + /** + * Returns whether a response was set. + * + * @return bool Whether a response was set + */ + public function hasResponse() + { + return null !== $this->response; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..f70ce09e0a40a765c7400df2d611f8acec0ea21d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * Allows to create a response for the return value of a controller. + * + * Call setResponse() to set the response that will be returned for the + * current request. The propagation of this event is stopped as soon as a + * response is set. + * + * @author Bernhard Schussek + */ +class GetResponseForControllerResultEvent extends GetResponseEvent +{ + /** + * The return value of the controller. + * + * @var mixed + */ + private $controllerResult; + + public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, $controllerResult) + { + parent::__construct($kernel, $request, $requestType); + + $this->controllerResult = $controllerResult; + } + + /** + * Returns the return value of the controller. + * + * @return mixed The controller return value + */ + public function getControllerResult() + { + return $this->controllerResult; + } + + /** + * Assigns the return value of the controller. + * + * @param mixed $controllerResult The controller return value + */ + public function setControllerResult($controllerResult) + { + $this->controllerResult = $controllerResult; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/GetResponseForExceptionEvent.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/GetResponseForExceptionEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..003953feac5139261f3db6d6f817dae19fa8f6a9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/GetResponseForExceptionEvent.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * Allows to create a response for a thrown exception. + * + * Call setResponse() to set the response that will be returned for the + * current request. The propagation of this event is stopped as soon as a + * response is set. + * + * You can also call setException() to replace the thrown exception. This + * exception will be thrown if no response is set during processing of this + * event. + * + * @author Bernhard Schussek + */ +class GetResponseForExceptionEvent extends GetResponseEvent +{ + /** + * The exception object. + * + * @var \Exception + */ + private $exception; + + public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, \Exception $e) + { + parent::__construct($kernel, $request, $requestType); + + $this->setException($e); + } + + /** + * Returns the thrown exception. + * + * @return \Exception The thrown exception + */ + public function getException() + { + return $this->exception; + } + + /** + * Replaces the thrown exception. + * + * This exception will be thrown if no response is set in the event. + * + * @param \Exception $exception The thrown exception + */ + public function setException(\Exception $exception) + { + $this->exception = $exception; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/KernelEvent.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/KernelEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..2043a01758ce823e35a485ced1b6e3122fe27513 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/KernelEvent.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\HttpKernel\Event; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\EventDispatcher\Event; + +/** + * Base class for events thrown in the HttpKernel component. + * + * @author Bernhard Schussek + */ +class KernelEvent extends Event +{ + /** + * The kernel in which this event was thrown. + * + * @var HttpKernelInterface + */ + private $kernel; + + /** + * The request the kernel is currently processing. + * + * @var Request + */ + private $request; + + /** + * The request type the kernel is currently processing. One of + * HttpKernelInterface::MASTER_REQUEST and HttpKernelInterface::SUB_REQUEST. + * + * @var int + */ + private $requestType; + + public function __construct(HttpKernelInterface $kernel, Request $request, $requestType) + { + $this->kernel = $kernel; + $this->request = $request; + $this->requestType = $requestType; + } + + /** + * Returns the kernel in which this event was thrown. + * + * @return HttpKernelInterface + */ + public function getKernel() + { + return $this->kernel; + } + + /** + * Returns the request the kernel is currently processing. + * + * @return Request + */ + public function getRequest() + { + return $this->request; + } + + /** + * Returns the request type the kernel is currently processing. + * + * @return int One of HttpKernelInterface::MASTER_REQUEST and + * HttpKernelInterface::SUB_REQUEST + */ + public function getRequestType() + { + return $this->requestType; + } + + /** + * Checks if this is a master request. + * + * @return bool True if the request is a master request + */ + public function isMasterRequest() + { + return HttpKernelInterface::MASTER_REQUEST === $this->requestType; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/PostResponseEvent.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/PostResponseEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..2406fddbe89dbdd23ddce01ee79d2e781579d1ea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Event/PostResponseEvent.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Allows to execute logic after a response was sent. + * + * Since it's only triggered on master requests, the `getRequestType()` method + * will always return the value of `HttpKernelInterface::MASTER_REQUEST`. + * + * @author Jordi Boggiano + */ +class PostResponseEvent extends KernelEvent +{ + private $response; + + public function __construct(HttpKernelInterface $kernel, Request $request, Response $response) + { + parent::__construct($kernel, $request, HttpKernelInterface::MASTER_REQUEST); + + $this->response = $response; + } + + /** + * Returns the response for which this event was thrown. + * + * @return Response + */ + public function getResponse() + { + return $this->response; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php new file mode 100644 index 0000000000000000000000000000000000000000..280844c18313edc243a7ba60eacdd893d86cdd9f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; + +/** + * Adds configured formats to each request. + * + * @author Gildas Quemener + */ +class AddRequestFormatsListener implements EventSubscriberInterface +{ + /** + * @var array + */ + protected $formats; + + /** + * @param array $formats + */ + public function __construct(array $formats) + { + $this->formats = $formats; + } + + /** + * Adds request formats. + * + * @param GetResponseEvent $event + */ + public function onKernelRequest(GetResponseEvent $event) + { + foreach ($this->formats as $format => $mimeTypes) { + $event->getRequest()->setFormat($format, $mimeTypes); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents() + { + return array(KernelEvents::REQUEST => array('onKernelRequest', 1)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php new file mode 100644 index 0000000000000000000000000000000000000000..29e1725adc672963e75093ab75a363a6a3010006 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php @@ -0,0 +1,146 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Psr\Log\LoggerInterface; +use Symfony\Component\Debug\ErrorHandler; +use Symfony\Component\Debug\ExceptionHandler; +use Symfony\Component\EventDispatcher\Event; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpKernel\Event\KernelEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\Console\ConsoleEvents; +use Symfony\Component\Console\Event\ConsoleEvent; +use Symfony\Component\Console\Output\ConsoleOutputInterface; + +/** + * Configures errors and exceptions handlers. + * + * @author Nicolas Grekas + */ +class DebugHandlersListener implements EventSubscriberInterface +{ + private $exceptionHandler; + private $logger; + private $levels; + private $throwAt; + private $scream; + private $fileLinkFormat; + private $scope; + private $firstCall = true; + + /** + * @param callable|null $exceptionHandler A handler that will be called on Exception + * @param LoggerInterface|null $logger A PSR-3 logger + * @param array|int $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants + * @param int|null $throwAt Thrown errors in a bit field of E_* constants, or null to keep the current value + * @param bool $scream Enables/disables screaming mode, where even silenced errors are logged + * @param string|array $fileLinkFormat The format for links to source files + * @param bool $scope Enables/disables scoping mode + */ + public function __construct(callable $exceptionHandler = null, LoggerInterface $logger = null, $levels = E_ALL, $throwAt = E_ALL, $scream = true, $fileLinkFormat = null, $scope = true) + { + $this->exceptionHandler = $exceptionHandler; + $this->logger = $logger; + $this->levels = null === $levels ? E_ALL : $levels; + $this->throwAt = is_numeric($throwAt) ? (int) $throwAt : (null === $throwAt ? null : ($throwAt ? E_ALL : null)); + $this->scream = (bool) $scream; + $this->fileLinkFormat = $fileLinkFormat; + $this->scope = (bool) $scope; + } + + /** + * Configures the error handler. + * + * @param Event|null $event The triggering event + */ + public function configure(Event $event = null) + { + if (!$this->firstCall) { + return; + } + $this->firstCall = false; + if ($this->logger || null !== $this->throwAt) { + $handler = set_error_handler('var_dump'); + $handler = is_array($handler) ? $handler[0] : null; + restore_error_handler(); + if ($handler instanceof ErrorHandler) { + if ($this->logger) { + $handler->setDefaultLogger($this->logger, $this->levels); + if (is_array($this->levels)) { + $levels = 0; + foreach ($this->levels as $type => $log) { + $levels |= $type; + } + } else { + $levels = $this->levels; + } + if ($this->scream) { + $handler->screamAt($levels); + } + if ($this->scope) { + $handler->scopeAt($this->levels); + } else { + $handler->scopeAt(0, true); + } + $this->logger = $this->levels = null; + } + if (null !== $this->throwAt) { + $handler->throwAt($this->throwAt, true); + } + } + } + if (!$this->exceptionHandler) { + if ($event instanceof KernelEvent) { + if (method_exists($event->getKernel(), 'terminateWithException')) { + $this->exceptionHandler = array($event->getKernel(), 'terminateWithException'); + } + } elseif ($event instanceof ConsoleEvent && $app = $event->getCommand()->getApplication()) { + $output = $event->getOutput(); + if ($output instanceof ConsoleOutputInterface) { + $output = $output->getErrorOutput(); + } + $this->exceptionHandler = function ($e) use ($app, $output) { + $app->renderException($e, $output); + }; + } + } + if ($this->exceptionHandler) { + $handler = set_exception_handler('var_dump'); + $handler = is_array($handler) ? $handler[0] : null; + restore_exception_handler(); + if ($handler instanceof ErrorHandler) { + $h = $handler->setExceptionHandler('var_dump') ?: $this->exceptionHandler; + $handler->setExceptionHandler($h); + $handler = is_array($h) ? $h[0] : null; + } + if ($handler instanceof ExceptionHandler) { + $handler->setHandler($this->exceptionHandler); + if (null !== $this->fileLinkFormat) { + $handler->setFileLinkFormat($this->fileLinkFormat); + } + } + $this->exceptionHandler = null; + } + } + + public static function getSubscribedEvents() + { + $events = array(KernelEvents::REQUEST => array('configure', 2048)); + + if ('cli' === PHP_SAPI && defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) { + $events[ConsoleEvents::COMMAND] = array('configure', 2048); + } + + return $events; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php new file mode 100644 index 0000000000000000000000000000000000000000..88acef318722e90c72c75a35cb3483ad2662e7e6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\Console\ConsoleEvents; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\VarDumper\Cloner\ClonerInterface; +use Symfony\Component\VarDumper\Dumper\DataDumperInterface; +use Symfony\Component\VarDumper\VarDumper; + +/** + * Configures dump() handler. + * + * @author Nicolas Grekas + */ +class DumpListener implements EventSubscriberInterface +{ + private $cloner; + private $dumper; + + /** + * @param ClonerInterface $cloner Cloner service + * @param DataDumperInterface $dumper Dumper service + */ + public function __construct(ClonerInterface $cloner, DataDumperInterface $dumper) + { + $this->cloner = $cloner; + $this->dumper = $dumper; + } + + public function configure() + { + $cloner = $this->cloner; + $dumper = $this->dumper; + + VarDumper::setHandler(function ($var) use ($cloner, $dumper) { + $dumper->dump($cloner->cloneVar($var)); + }); + } + + public static function getSubscribedEvents() + { + if (!class_exists(ConsoleEvents::class)) { + return array(); + } + + // Register early to have a working dump() as early as possible + return array(ConsoleEvents::COMMAND => array('configure', 1024)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php new file mode 100644 index 0000000000000000000000000000000000000000..cf3a2f0a530b85db69220d31a70cd12b02dbb462 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Psr\Log\LoggerInterface; +use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; +use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * ExceptionListener. + * + * @author Fabien Potencier + */ +class ExceptionListener implements EventSubscriberInterface +{ + protected $controller; + protected $logger; + + public function __construct($controller, LoggerInterface $logger = null) + { + $this->controller = $controller; + $this->logger = $logger; + } + + public function onKernelException(GetResponseForExceptionEvent $event) + { + $exception = $event->getException(); + $request = $event->getRequest(); + + $this->logException($exception, sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', get_class($exception), $exception->getMessage(), $exception->getFile(), $exception->getLine())); + + $request = $this->duplicateRequest($exception, $request); + + try { + $response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false); + } catch (\Exception $e) { + $this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine())); + + $wrapper = $e; + + while ($prev = $wrapper->getPrevious()) { + if ($exception === $wrapper = $prev) { + throw $e; + } + } + + $prev = new \ReflectionProperty('Exception', 'previous'); + $prev->setAccessible(true); + $prev->setValue($wrapper, $exception); + + throw $e; + } + + $event->setResponse($response); + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::EXCEPTION => array('onKernelException', -128), + ); + } + + /** + * Logs an exception. + * + * @param \Exception $exception The \Exception instance + * @param string $message The error message to log + */ + protected function logException(\Exception $exception, $message) + { + if (null !== $this->logger) { + if (!$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500) { + $this->logger->critical($message, array('exception' => $exception)); + } else { + $this->logger->error($message, array('exception' => $exception)); + } + } + } + + /** + * Clones the request for the exception. + * + * @param \Exception $exception The thrown exception + * @param Request $request The original request + * + * @return Request $request The cloned request + */ + protected function duplicateRequest(\Exception $exception, Request $request) + { + $attributes = array( + '_controller' => $this->controller, + 'exception' => FlattenException::create($exception), + 'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null, + ); + $request = $request->duplicate(null, null, $attributes); + $request->setMethod('GET'); + + return $request; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php new file mode 100644 index 0000000000000000000000000000000000000000..37bf15c3a084f0181a3bb1848c67924273e4a14f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; +use Symfony\Component\HttpKernel\UriSigner; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Handles content fragments represented by special URIs. + * + * All URL paths starting with /_fragment are handled as + * content fragments by this listener. + * + * If throws an AccessDeniedHttpException exception if the request + * is not signed or if it is not an internal sub-request. + * + * @author Fabien Potencier + */ +class FragmentListener implements EventSubscriberInterface +{ + private $signer; + private $fragmentPath; + + /** + * Constructor. + * + * @param UriSigner $signer A UriSigner instance + * @param string $fragmentPath The path that triggers this listener + */ + public function __construct(UriSigner $signer, $fragmentPath = '/_fragment') + { + $this->signer = $signer; + $this->fragmentPath = $fragmentPath; + } + + /** + * Fixes request attributes when the path is '/_fragment'. + * + * @param GetResponseEvent $event A GetResponseEvent instance + * + * @throws AccessDeniedHttpException if the request does not come from a trusted IP. + */ + public function onKernelRequest(GetResponseEvent $event) + { + $request = $event->getRequest(); + + if ($this->fragmentPath !== rawurldecode($request->getPathInfo())) { + return; + } + + if ($request->attributes->has('_controller')) { + // Is a sub-request: no need to parse _path but it should still be removed from query parameters as below. + $request->query->remove('_path'); + + return; + } + + if ($event->isMasterRequest()) { + $this->validateRequest($request); + } + + parse_str($request->query->get('_path', ''), $attributes); + $request->attributes->add($attributes); + $request->attributes->set('_route_params', array_replace($request->attributes->get('_route_params', array()), $attributes)); + $request->query->remove('_path'); + } + + protected function validateRequest(Request $request) + { + // is the Request safe? + if (!$request->isMethodSafe(false)) { + throw new AccessDeniedHttpException(); + } + + // is the Request signed? + // we cannot use $request->getUri() here as we want to work with the original URI (no query string reordering) + if ($this->signer->check($request->getSchemeAndHttpHost().$request->getBaseUrl().$request->getPathInfo().(null !== ($qs = $request->server->get('QUERY_STRING')) ? '?'.$qs : ''))) { + return; + } + + throw new AccessDeniedHttpException(); + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::REQUEST => array(array('onKernelRequest', 48)), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php new file mode 100644 index 0000000000000000000000000000000000000000..99fc78679390cd55766620cd6345c2d2c81a5e38 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\Event\FinishRequestEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\RequestContextAwareInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Initializes the locale based on the current request. + * + * @author Fabien Potencier + */ +class LocaleListener implements EventSubscriberInterface +{ + private $router; + private $defaultLocale; + private $requestStack; + + /** + * Constructor. + * + * @param RequestStack $requestStack A RequestStack instance + * @param string $defaultLocale The default locale + * @param RequestContextAwareInterface|null $router The router + */ + public function __construct(RequestStack $requestStack, $defaultLocale = 'en', RequestContextAwareInterface $router = null) + { + $this->defaultLocale = $defaultLocale; + $this->requestStack = $requestStack; + $this->router = $router; + } + + public function onKernelRequest(GetResponseEvent $event) + { + $request = $event->getRequest(); + $request->setDefaultLocale($this->defaultLocale); + + $this->setLocale($request); + $this->setRouterContext($request); + } + + public function onKernelFinishRequest(FinishRequestEvent $event) + { + if (null !== $parentRequest = $this->requestStack->getParentRequest()) { + $this->setRouterContext($parentRequest); + } + } + + private function setLocale(Request $request) + { + if ($locale = $request->attributes->get('_locale')) { + $request->setLocale($locale); + } + } + + private function setRouterContext(Request $request) + { + if (null !== $this->router) { + $this->router->getContext()->setParameter('_locale', $request->getLocale()); + } + } + + public static function getSubscribedEvents() + { + return array( + // must be registered after the Router to have access to the _locale + KernelEvents::REQUEST => array(array('onKernelRequest', 16)), + KernelEvents::FINISH_REQUEST => array(array('onKernelFinishRequest', 0)), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php new file mode 100644 index 0000000000000000000000000000000000000000..c3772b688e548a3a21325b16db9e8cd283acaaaa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.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\Component\HttpKernel\EventListener; + +use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\Event\PostResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Profiler\Profiler; +use Symfony\Component\HttpFoundation\RequestMatcherInterface; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * ProfilerListener collects data for the current request by listening to the kernel events. + * + * @author Fabien Potencier + */ +class ProfilerListener implements EventSubscriberInterface +{ + protected $profiler; + protected $matcher; + protected $onlyException; + protected $onlyMasterRequests; + protected $exception; + protected $profiles; + protected $requestStack; + protected $parents; + + /** + * Constructor. + * + * @param Profiler $profiler A Profiler instance + * @param RequestStack $requestStack A RequestStack instance + * @param RequestMatcherInterface|null $matcher A RequestMatcher instance + * @param bool $onlyException true if the profiler only collects data when an exception occurs, false otherwise + * @param bool $onlyMasterRequests true if the profiler only collects data when the request is a master request, false otherwise + */ + public function __construct(Profiler $profiler, RequestStack $requestStack, RequestMatcherInterface $matcher = null, $onlyException = false, $onlyMasterRequests = false) + { + $this->profiler = $profiler; + $this->matcher = $matcher; + $this->onlyException = (bool) $onlyException; + $this->onlyMasterRequests = (bool) $onlyMasterRequests; + $this->profiles = new \SplObjectStorage(); + $this->parents = new \SplObjectStorage(); + $this->requestStack = $requestStack; + } + + /** + * Handles the onKernelException event. + * + * @param GetResponseForExceptionEvent $event A GetResponseForExceptionEvent instance + */ + public function onKernelException(GetResponseForExceptionEvent $event) + { + if ($this->onlyMasterRequests && !$event->isMasterRequest()) { + return; + } + + $this->exception = $event->getException(); + } + + /** + * Handles the onKernelResponse event. + * + * @param FilterResponseEvent $event A FilterResponseEvent instance + */ + public function onKernelResponse(FilterResponseEvent $event) + { + $master = $event->isMasterRequest(); + if ($this->onlyMasterRequests && !$master) { + return; + } + + if ($this->onlyException && null === $this->exception) { + return; + } + + $request = $event->getRequest(); + $exception = $this->exception; + $this->exception = null; + + if (null !== $this->matcher && !$this->matcher->matches($request)) { + return; + } + + if (!$profile = $this->profiler->collect($request, $event->getResponse(), $exception)) { + return; + } + + $this->profiles[$request] = $profile; + + $this->parents[$request] = $this->requestStack->getParentRequest(); + } + + public function onKernelTerminate(PostResponseEvent $event) + { + // attach children to parents + foreach ($this->profiles as $request) { + // isset call should be removed when requestStack is required + if (isset($this->parents[$request]) && null !== $parentRequest = $this->parents[$request]) { + if (isset($this->profiles[$parentRequest])) { + $this->profiles[$parentRequest]->addChild($this->profiles[$request]); + } + } + } + + // save profiles + foreach ($this->profiles as $request) { + $this->profiler->saveProfile($this->profiles[$request]); + } + + $this->profiles = new \SplObjectStorage(); + $this->parents = new \SplObjectStorage(); + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::RESPONSE => array('onKernelResponse', -100), + KernelEvents::EXCEPTION => 'onKernelException', + KernelEvents::TERMINATE => array('onKernelTerminate', -1024), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php new file mode 100644 index 0000000000000000000000000000000000000000..eeb2b0fcb23552f10027a5cf287e112d9ec9f804 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.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\Component\HttpKernel\EventListener; + +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * ResponseListener fixes the Response headers based on the Request. + * + * @author Fabien Potencier + */ +class ResponseListener implements EventSubscriberInterface +{ + private $charset; + + public function __construct($charset) + { + $this->charset = $charset; + } + + /** + * Filters the Response. + * + * @param FilterResponseEvent $event A FilterResponseEvent instance + */ + public function onKernelResponse(FilterResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + + $response = $event->getResponse(); + + if (null === $response->getCharset()) { + $response->setCharset($this->charset); + } + + $response->prepare($event->getRequest()); + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::RESPONSE => 'onKernelResponse', + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php new file mode 100644 index 0000000000000000000000000000000000000000..3c46be860810f3ec2012491c73dbde97680ac464 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\Event\FinishRequestEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\Routing\Exception\MethodNotAllowedException; +use Symfony\Component\Routing\Exception\ResourceNotFoundException; +use Symfony\Component\Routing\Matcher\UrlMatcherInterface; +use Symfony\Component\Routing\Matcher\RequestMatcherInterface; +use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Routing\RequestContextAwareInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * Initializes the context from the request and sets request attributes based on a matching route. + * + * @author Fabien Potencier + */ +class RouterListener implements EventSubscriberInterface +{ + private $matcher; + private $context; + private $logger; + private $requestStack; + + /** + * Constructor. + * + * @param UrlMatcherInterface|RequestMatcherInterface $matcher The Url or Request matcher + * @param RequestStack $requestStack A RequestStack instance + * @param RequestContext|null $context The RequestContext (can be null when $matcher implements RequestContextAwareInterface) + * @param LoggerInterface|null $logger The logger + * + * @throws \InvalidArgumentException + */ + public function __construct($matcher, RequestStack $requestStack, RequestContext $context = null, LoggerInterface $logger = null) + { + if (!$matcher instanceof UrlMatcherInterface && !$matcher instanceof RequestMatcherInterface) { + throw new \InvalidArgumentException('Matcher must either implement UrlMatcherInterface or RequestMatcherInterface.'); + } + + if (null === $context && !$matcher instanceof RequestContextAwareInterface) { + throw new \InvalidArgumentException('You must either pass a RequestContext or the matcher must implement RequestContextAwareInterface.'); + } + + $this->matcher = $matcher; + $this->context = $context ?: $matcher->getContext(); + $this->requestStack = $requestStack; + $this->logger = $logger; + } + + private function setCurrentRequest(Request $request = null) + { + if (null !== $request) { + $this->context->fromRequest($request); + } + } + + /** + * After a sub-request is done, we need to reset the routing context to the parent request so that the URL generator + * operates on the correct context again. + * + * @param FinishRequestEvent $event + */ + public function onKernelFinishRequest(FinishRequestEvent $event) + { + $this->setCurrentRequest($this->requestStack->getParentRequest()); + } + + public function onKernelRequest(GetResponseEvent $event) + { + $request = $event->getRequest(); + + $this->setCurrentRequest($request); + + if ($request->attributes->has('_controller')) { + // routing is already done + return; + } + + // add attributes based on the request (routing) + try { + // matching a request is more powerful than matching a URL path + context, so try that first + if ($this->matcher instanceof RequestMatcherInterface) { + $parameters = $this->matcher->matchRequest($request); + } else { + $parameters = $this->matcher->match($request->getPathInfo()); + } + + if (null !== $this->logger) { + $this->logger->info('Matched route "{route}".', array( + 'route' => isset($parameters['_route']) ? $parameters['_route'] : 'n/a', + 'route_parameters' => $parameters, + 'request_uri' => $request->getUri(), + 'method' => $request->getMethod(), + )); + } + + $request->attributes->add($parameters); + unset($parameters['_route'], $parameters['_controller']); + $request->attributes->set('_route_params', $parameters); + } catch (ResourceNotFoundException $e) { + $message = sprintf('No route found for "%s %s"', $request->getMethod(), $request->getPathInfo()); + + if ($referer = $request->headers->get('referer')) { + $message .= sprintf(' (from "%s")', $referer); + } + + throw new NotFoundHttpException($message, $e); + } catch (MethodNotAllowedException $e) { + $message = sprintf('No route found for "%s %s": Method Not Allowed (Allow: %s)', $request->getMethod(), $request->getPathInfo(), implode(', ', $e->getAllowedMethods())); + + throw new MethodNotAllowedHttpException($e->getAllowedMethods(), $message, $e); + } + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::REQUEST => array(array('onKernelRequest', 32)), + KernelEvents::FINISH_REQUEST => array(array('onKernelFinishRequest', 0)), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SaveSessionListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SaveSessionListener.php new file mode 100644 index 0000000000000000000000000000000000000000..36809b59af914aecf4865a91a673b8ec87b68f8d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SaveSessionListener.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; + +/** + * Saves the session, in case it is still open, before sending the response/headers. + * + * This ensures several things in case the developer did not save the session explicitly: + * + * * If a session save handler without locking is used, it ensures the data is available + * on the next request, e.g. after a redirect. PHPs auto-save at script end via + * session_register_shutdown is executed after fastcgi_finish_request. So in this case + * the data could be missing the next request because it might not be saved the moment + * the new request is processed. + * * A locking save handler (e.g. the native 'files') circumvents concurrency problems like + * the one above. But by saving the session before long-running things in the terminate event, + * we ensure the session is not blocked longer than needed. + * * When regenerating the session ID no locking is involved in PHPs session design. See + * https://bugs.php.net/bug.php?id=61470 for a discussion. So in this case, the session must + * be saved anyway before sending the headers with the new session ID. Otherwise session + * data could get lost again for concurrent requests with the new ID. One result could be + * that you get logged out after just logging in. + * + * This listener should be executed as one of the last listeners, so that previous listeners + * can still operate on the open session. This prevents the overhead of restarting it. + * Listeners after closing the session can still work with the session as usual because + * Symfonys session implementation starts the session on demand. So writing to it after + * it is saved will just restart it. + * + * @author Tobias Schultze + */ +class SaveSessionListener implements EventSubscriberInterface +{ + public function onKernelResponse(FilterResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + + $session = $event->getRequest()->getSession(); + if ($session && $session->isStarted()) { + $session->save(); + } + } + + public static function getSubscribedEvents() + { + return array( + // low priority but higher than StreamedResponseListener + KernelEvents::RESPONSE => array(array('onKernelResponse', -1000)), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SessionListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SessionListener.php new file mode 100644 index 0000000000000000000000000000000000000000..2d6adfa0122d2b4d25c084f3a06dde15b044c969 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SessionListener.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\HttpFoundation\Session\SessionInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Sets the session in the request. + * + * @author Johannes M. Schmitt + */ +abstract class SessionListener implements EventSubscriberInterface +{ + public function onKernelRequest(GetResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + + $request = $event->getRequest(); + $session = $this->getSession(); + if (null === $session || $request->hasSession()) { + return; + } + + $request->setSession($session); + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::REQUEST => array('onKernelRequest', 128), + ); + } + + /** + * Gets the session object. + * + * @return SessionInterface|null A SessionInterface instance or null if no session is available + */ + abstract protected function getSession(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php new file mode 100644 index 0000000000000000000000000000000000000000..571cd74e343d0d4b2885785b9f84d80e3ee1f22c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\HttpFoundation\StreamedResponse; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * StreamedResponseListener is responsible for sending the Response + * to the client. + * + * @author Fabien Potencier + */ +class StreamedResponseListener implements EventSubscriberInterface +{ + /** + * Filters the Response. + * + * @param FilterResponseEvent $event A FilterResponseEvent instance + */ + public function onKernelResponse(FilterResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + + $response = $event->getResponse(); + + if ($response instanceof StreamedResponse) { + $response->send(); + } + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::RESPONSE => array('onKernelResponse', -1024), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php new file mode 100644 index 0000000000000000000000000000000000000000..dc815a216f6c00cb920c2690d57982c76fb3930f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.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\Component\HttpKernel\EventListener; + +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\HttpCache\SurrogateInterface; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * SurrogateListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for Surrogates. + * + * @author Fabien Potencier + */ +class SurrogateListener implements EventSubscriberInterface +{ + private $surrogate; + + /** + * Constructor. + * + * @param SurrogateInterface $surrogate An SurrogateInterface instance + */ + public function __construct(SurrogateInterface $surrogate = null) + { + $this->surrogate = $surrogate; + } + + /** + * Filters the Response. + * + * @param FilterResponseEvent $event A FilterResponseEvent instance + */ + public function onKernelResponse(FilterResponseEvent $event) + { + if (!$event->isMasterRequest() || null === $this->surrogate) { + return; + } + + $this->surrogate->addSurrogateControl($event->getResponse()); + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::RESPONSE => 'onKernelResponse', + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php new file mode 100644 index 0000000000000000000000000000000000000000..19a61f169bdf9dd03005becee11a3bcb092d741c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\Session\SessionInterface; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * TestSessionListener. + * + * Saves session in test environment. + * + * @author Bulat Shakirzyanov + * @author Fabien Potencier + */ +abstract class TestSessionListener implements EventSubscriberInterface +{ + public function onKernelRequest(GetResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + + // bootstrap the session + $session = $this->getSession(); + if (!$session) { + return; + } + + $cookies = $event->getRequest()->cookies; + + if ($cookies->has($session->getName())) { + $session->setId($cookies->get($session->getName())); + } + } + + /** + * Checks if session was initialized and saves if current request is master + * Runs on 'kernel.response' in test environment. + * + * @param FilterResponseEvent $event + */ + public function onKernelResponse(FilterResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + + $session = $event->getRequest()->getSession(); + if ($session && $session->isStarted()) { + $session->save(); + $params = session_get_cookie_params(); + $event->getResponse()->headers->setCookie(new Cookie($session->getName(), $session->getId(), 0 === $params['lifetime'] ? 0 : time() + $params['lifetime'], $params['path'], $params['domain'], $params['secure'], $params['httponly'])); + } + } + + public static function getSubscribedEvents() + { + return array( + KernelEvents::REQUEST => array('onKernelRequest', 192), + KernelEvents::RESPONSE => array('onKernelResponse', -128), + ); + } + + /** + * Gets the session object. + * + * @return SessionInterface|null A SessionInterface instance or null if no session is available + */ + abstract protected function getSession(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/TranslatorListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/TranslatorListener.php new file mode 100644 index 0000000000000000000000000000000000000000..6967ad0298b59aa8955d4b894d05f69727cda1fa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/TranslatorListener.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\Event\FinishRequestEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\Translation\TranslatorInterface; + +/** + * Synchronizes the locale between the request and the translator. + * + * @author Fabien Potencier + */ +class TranslatorListener implements EventSubscriberInterface +{ + private $translator; + private $requestStack; + + public function __construct(TranslatorInterface $translator, RequestStack $requestStack) + { + $this->translator = $translator; + $this->requestStack = $requestStack; + } + + public function onKernelRequest(GetResponseEvent $event) + { + $this->setLocale($event->getRequest()); + } + + public function onKernelFinishRequest(FinishRequestEvent $event) + { + if (null === $parentRequest = $this->requestStack->getParentRequest()) { + return; + } + + $this->setLocale($parentRequest); + } + + public static function getSubscribedEvents() + { + return array( + // must be registered after the Locale listener + KernelEvents::REQUEST => array(array('onKernelRequest', 10)), + KernelEvents::FINISH_REQUEST => array(array('onKernelFinishRequest', 0)), + ); + } + + private function setLocale(Request $request) + { + try { + $this->translator->setLocale($request->getLocale()); + } catch (\InvalidArgumentException $e) { + $this->translator->setLocale($request->getDefaultLocale()); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php new file mode 100644 index 0000000000000000000000000000000000000000..00096ccf9e4f29514bec0c56ddbe351be054afbd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; + +/** + * Validates that the headers and other information indicating the + * client IP address of a request are consistent. + * + * @author Magnus Nordlander + */ +class ValidateRequestListener implements EventSubscriberInterface +{ + /** + * Performs the validation. + * + * @param GetResponseEvent $event + */ + public function onKernelRequest(GetResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + $request = $event->getRequest(); + + if ($request::getTrustedProxies()) { + // This will throw an exception if the headers are inconsistent. + $request->getClientIps(); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents() + { + return array( + KernelEvents::REQUEST => array( + array('onKernelRequest', 256), + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..79d8639a5f7d303f8f8fad57f1721d8d5e33f3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Exception; + +/** + * AccessDeniedHttpException. + * + * @author Fabien Potencier + * @author Christophe Coevoet + */ +class AccessDeniedHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($message = null, \Exception $previous = null, $code = 0) + { + parent::__construct(403, $message, $previous, array(), $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..5f68172a8d44ef34b730b13bea912f773e81499b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.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\Component\HttpKernel\Exception; + +/** + * BadRequestHttpException. + * + * @author Ben Ramsey + */ +class BadRequestHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($message = null, \Exception $previous = null, $code = 0) + { + parent::__construct(400, $message, $previous, array(), $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..34d738ed12030586fc99f85aa1375ee8af08bbed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ConflictHttpException.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\Component\HttpKernel\Exception; + +/** + * ConflictHttpException. + * + * @author Ben Ramsey + */ +class ConflictHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($message = null, \Exception $previous = null, $code = 0) + { + parent::__construct(409, $message, $previous, array(), $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/GoneHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/GoneHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..16ea223fae55857fda6abac5f93d24513be0d6d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/GoneHttpException.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\Component\HttpKernel\Exception; + +/** + * GoneHttpException. + * + * @author Ben Ramsey + */ +class GoneHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($message = null, \Exception $previous = null, $code = 0) + { + parent::__construct(410, $message, $previous, array(), $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/HttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/HttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..e8e37605838cc6efb93b40d1e32a209fb6f798bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/HttpException.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Exception; + +/** + * HttpException. + * + * @author Kris Wallsmith + */ +class HttpException extends \RuntimeException implements HttpExceptionInterface +{ + private $statusCode; + private $headers; + + public function __construct($statusCode, $message = null, \Exception $previous = null, array $headers = array(), $code = 0) + { + $this->statusCode = $statusCode; + $this->headers = $headers; + + parent::__construct($message, $code, $previous); + } + + public function getStatusCode() + { + return $this->statusCode; + } + + public function getHeaders() + { + return $this->headers; + } + + /** + * Set response headers. + * + * @param array $headers Response headers + */ + public function setHeaders(array $headers) + { + $this->headers = $headers; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..8aa50a9f4160597b976298ff0774370058997e78 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Exception; + +/** + * Interface for HTTP error exceptions. + * + * @author Kris Wallsmith + */ +interface HttpExceptionInterface +{ + /** + * Returns the status code. + * + * @return int An HTTP response status code + */ + public function getStatusCode(); + + /** + * Returns response headers. + * + * @return array Response headers + */ + public function getHeaders(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..0c4b9431f4b9f793c317f24c1c18a2ed75600490 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.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\Component\HttpKernel\Exception; + +/** + * LengthRequiredHttpException. + * + * @author Ben Ramsey + */ +class LengthRequiredHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($message = null, \Exception $previous = null, $code = 0) + { + parent::__construct(411, $message, $previous, array(), $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..78dd26bf0fd8f0fd6c6922f9e62dc27b67a8b8a0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Exception; + +/** + * MethodNotAllowedHttpException. + * + * @author Kris Wallsmith + */ +class MethodNotAllowedHttpException extends HttpException +{ + /** + * Constructor. + * + * @param array $allow An array of allowed methods + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct(array $allow, $message = null, \Exception $previous = null, $code = 0) + { + $headers = array('Allow' => strtoupper(implode(', ', $allow))); + + parent::__construct(405, $message, $previous, $headers, $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..cc6be4ba45a7d36edc3e1370af5a51a254662493 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.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\Component\HttpKernel\Exception; + +/** + * NotAcceptableHttpException. + * + * @author Ben Ramsey + */ +class NotAcceptableHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($message = null, \Exception $previous = null, $code = 0) + { + parent::__construct(406, $message, $previous, array(), $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..4639e379b90fc94d780f793fc493b5dd71a6d9a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.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\Component\HttpKernel\Exception; + +/** + * NotFoundHttpException. + * + * @author Fabien Potencier + */ +class NotFoundHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($message = null, \Exception $previous = null, $code = 0) + { + parent::__construct(404, $message, $previous, array(), $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..9df0e7b49aa9ba8d09917f3414469449c8d5b73e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.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\Component\HttpKernel\Exception; + +/** + * PreconditionFailedHttpException. + * + * @author Ben Ramsey + */ +class PreconditionFailedHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($message = null, \Exception $previous = null, $code = 0) + { + parent::__construct(412, $message, $previous, array(), $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..08ebca2241e0078e29f52ad5521e76acf9e31c68 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Exception; + +/** + * PreconditionRequiredHttpException. + * + * @author Ben Ramsey + * + * @see http://tools.ietf.org/html/rfc6585 + */ +class PreconditionRequiredHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($message = null, \Exception $previous = null, $code = 0) + { + parent::__construct(428, $message, $previous, array(), $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..32b9e2d26121829a42cc98c667172468c793a434 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Exception; + +/** + * ServiceUnavailableHttpException. + * + * @author Ben Ramsey + */ +class ServiceUnavailableHttpException extends HttpException +{ + /** + * Constructor. + * + * @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0) + { + $headers = array(); + if ($retryAfter) { + $headers = array('Retry-After' => $retryAfter); + } + + parent::__construct(503, $message, $previous, $headers, $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..ab86e0920bc69a8ea4ff5bf353a77d183cccebec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Exception; + +/** + * TooManyRequestsHttpException. + * + * @author Ben Ramsey + * + * @see http://tools.ietf.org/html/rfc6585 + */ +class TooManyRequestsHttpException extends HttpException +{ + /** + * Constructor. + * + * @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0) + { + $headers = array(); + if ($retryAfter) { + $headers = array('Retry-After' => $retryAfter); + } + + parent::__construct(429, $message, $previous, $headers, $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..0dfe42db972809cf2582c8b646eecfa545a226de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Exception; + +/** + * UnauthorizedHttpException. + * + * @author Ben Ramsey + */ +class UnauthorizedHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $challenge WWW-Authenticate challenge string + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($challenge, $message = null, \Exception $previous = null, $code = 0) + { + $headers = array('WWW-Authenticate' => $challenge); + + parent::__construct(401, $message, $previous, $headers, $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..eb13f563f6cbbbc1fbd090295eccfabb135b59c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.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\Component\HttpKernel\Exception; + +/** + * UnprocessableEntityHttpException. + * + * @author Steve Hutchins + */ +class UnprocessableEntityHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($message = null, \Exception $previous = null, $code = 0) + { + parent::__construct(422, $message, $previous, array(), $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php new file mode 100644 index 0000000000000000000000000000000000000000..a9d8fa086f13cdfe1280742623e9d987619bea2c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.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\Component\HttpKernel\Exception; + +/** + * UnsupportedMediaTypeHttpException. + * + * @author Ben Ramsey + */ +class UnsupportedMediaTypeHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($message = null, \Exception $previous = null, $code = 0) + { + parent::__construct(415, $message, $previous, array(), $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php new file mode 100644 index 0000000000000000000000000000000000000000..0d4d26b6765c6b5c4f9124d66cb580a23b69b1b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Fragment; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Controller\ControllerReference; +use Symfony\Component\HttpKernel\HttpCache\SurrogateInterface; +use Symfony\Component\HttpKernel\UriSigner; + +/** + * Implements Surrogate rendering strategy. + * + * @author Fabien Potencier + */ +abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRenderer +{ + private $surrogate; + private $inlineStrategy; + private $signer; + + /** + * Constructor. + * + * The "fallback" strategy when surrogate is not available should always be an + * instance of InlineFragmentRenderer. + * + * @param SurrogateInterface $surrogate An Surrogate instance + * @param FragmentRendererInterface $inlineStrategy The inline strategy to use when the surrogate is not supported + * @param UriSigner $signer + */ + public function __construct(SurrogateInterface $surrogate = null, FragmentRendererInterface $inlineStrategy, UriSigner $signer = null) + { + $this->surrogate = $surrogate; + $this->inlineStrategy = $inlineStrategy; + $this->signer = $signer; + } + + /** + * {@inheritdoc} + * + * Note that if the current Request has no surrogate capability, this method + * falls back to use the inline rendering strategy. + * + * Additional available options: + * + * * alt: an alternative URI to render in case of an error + * * comment: a comment to add when returning the surrogate tag + * + * Note, that not all surrogate strategies support all options. For now + * 'alt' and 'comment' are only supported by ESI. + * + * @see Symfony\Component\HttpKernel\HttpCache\SurrogateInterface + */ + public function render($uri, Request $request, array $options = array()) + { + if (!$this->surrogate || !$this->surrogate->hasSurrogateCapability($request)) { + if ($uri instanceof ControllerReference && $this->containsNonScalars($uri->attributes)) { + @trigger_error('Passing non-scalar values as part of URI attributes to the ESI and SSI rendering strategies is deprecated since version 3.1, and will be removed in 4.0. Use a different rendering strategy or pass scalar values.', E_USER_DEPRECATED); + } + + return $this->inlineStrategy->render($uri, $request, $options); + } + + if ($uri instanceof ControllerReference) { + $uri = $this->generateSignedFragmentUri($uri, $request); + } + + $alt = isset($options['alt']) ? $options['alt'] : null; + if ($alt instanceof ControllerReference) { + $alt = $this->generateSignedFragmentUri($alt, $request); + } + + $tag = $this->surrogate->renderIncludeTag($uri, $alt, isset($options['ignore_errors']) ? $options['ignore_errors'] : false, isset($options['comment']) ? $options['comment'] : ''); + + return new Response($tag); + } + + private function generateSignedFragmentUri($uri, Request $request) + { + if (null === $this->signer) { + throw new \LogicException('You must use a URI when using the ESI rendering strategy or set a URL signer.'); + } + + // we need to sign the absolute URI, but want to return the path only. + $fragmentUri = $this->signer->sign($this->generateFragmentUri($uri, $request, true)); + + return substr($fragmentUri, strlen($request->getSchemeAndHttpHost())); + } + + private function containsNonScalars(array $values) + { + foreach ($values as $value) { + if (is_array($value) && $this->containsNonScalars($value)) { + return true; + } elseif (!is_scalar($value) && null !== $value) { + return true; + } + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php new file mode 100644 index 0000000000000000000000000000000000000000..a4570e3beb0d4ae7db7c094d7582db490e4c2576 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Fragment; + +/** + * Implements the ESI rendering strategy. + * + * @author Fabien Potencier + */ +class EsiFragmentRenderer extends AbstractSurrogateFragmentRenderer +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'esi'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..0d0a0424607c1864caae202a379bec0aaab3bb32 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Fragment; + +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\StreamedResponse; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpKernel\Controller\ControllerReference; + +/** + * Renders a URI that represents a resource fragment. + * + * This class handles the rendering of resource fragments that are included into + * a main resource. The handling of the rendering is managed by specialized renderers. + * + * @author Fabien Potencier + * + * @see FragmentRendererInterface + */ +class FragmentHandler +{ + private $debug; + private $renderers = array(); + private $requestStack; + + /** + * Constructor. + * + * @param RequestStack $requestStack The Request stack that controls the lifecycle of requests + * @param FragmentRendererInterface[] $renderers An array of FragmentRendererInterface instances + * @param bool $debug Whether the debug mode is enabled or not + */ + public function __construct(RequestStack $requestStack, array $renderers = array(), $debug = false) + { + $this->requestStack = $requestStack; + foreach ($renderers as $renderer) { + $this->addRenderer($renderer); + } + $this->debug = $debug; + } + + /** + * Adds a renderer. + * + * @param FragmentRendererInterface $renderer A FragmentRendererInterface instance + */ + public function addRenderer(FragmentRendererInterface $renderer) + { + $this->renderers[$renderer->getName()] = $renderer; + } + + /** + * Renders a URI and returns the Response content. + * + * Available options: + * + * * ignore_errors: true to return an empty string in case of an error + * + * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance + * @param string $renderer The renderer name + * @param array $options An array of options + * + * @return string|null The Response content or null when the Response is streamed + * + * @throws \InvalidArgumentException when the renderer does not exist + * @throws \LogicException when no master request is being handled + */ + public function render($uri, $renderer = 'inline', array $options = array()) + { + if (!isset($options['ignore_errors'])) { + $options['ignore_errors'] = !$this->debug; + } + + if (!isset($this->renderers[$renderer])) { + throw new \InvalidArgumentException(sprintf('The "%s" renderer does not exist.', $renderer)); + } + + if (!$request = $this->requestStack->getCurrentRequest()) { + throw new \LogicException('Rendering a fragment can only be done when handling a Request.'); + } + + return $this->deliver($this->renderers[$renderer]->render($uri, $request, $options)); + } + + /** + * Delivers the Response as a string. + * + * When the Response is a StreamedResponse, the content is streamed immediately + * instead of being returned. + * + * @param Response $response A Response instance + * + * @return string|null The Response content or null when the Response is streamed + * + * @throws \RuntimeException when the Response is not successful + */ + protected function deliver(Response $response) + { + if (!$response->isSuccessful()) { + throw new \RuntimeException(sprintf('Error when rendering "%s" (Status code is %s).', $this->requestStack->getCurrentRequest()->getUri(), $response->getStatusCode())); + } + + if (!$response instanceof StreamedResponse) { + return $response->getContent(); + } + + $response->sendContent(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b177c3ac12ca66f73812bc48462a75695cb04cfe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Fragment; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Controller\ControllerReference; +use Symfony\Component\HttpFoundation\Response; + +/** + * Interface implemented by all rendering strategies. + * + * @author Fabien Potencier + */ +interface FragmentRendererInterface +{ + /** + * Renders a URI and returns the Response content. + * + * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance + * @param Request $request A Request instance + * @param array $options An array of options + * + * @return Response A Response instance + */ + public function render($uri, Request $request, array $options = array()); + + /** + * Gets the name of the strategy. + * + * @return string The strategy name + */ + public function getName(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php new file mode 100644 index 0000000000000000000000000000000000000000..c163a09073b4a7f2e02e6426fc5db2ac90055915 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php @@ -0,0 +1,164 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Fragment; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Templating\EngineInterface; +use Symfony\Component\HttpKernel\Controller\ControllerReference; +use Symfony\Component\HttpKernel\UriSigner; + +/** + * Implements the Hinclude rendering strategy. + * + * @author Fabien Potencier + */ +class HIncludeFragmentRenderer extends RoutableFragmentRenderer +{ + private $globalDefaultTemplate; + private $signer; + private $templating; + private $charset; + + /** + * Constructor. + * + * @param EngineInterface|\Twig_Environment $templating An EngineInterface or a \Twig_Environment instance + * @param UriSigner $signer A UriSigner instance + * @param string $globalDefaultTemplate The global default content (it can be a template name or the content) + * @param string $charset + */ + public function __construct($templating = null, UriSigner $signer = null, $globalDefaultTemplate = null, $charset = 'utf-8') + { + $this->setTemplating($templating); + $this->globalDefaultTemplate = $globalDefaultTemplate; + $this->signer = $signer; + $this->charset = $charset; + } + + /** + * Sets the templating engine to use to render the default content. + * + * @param EngineInterface|\Twig_Environment|null $templating An EngineInterface or a \Twig_Environment instance + * + * @throws \InvalidArgumentException + */ + public function setTemplating($templating) + { + if (null !== $templating && !$templating instanceof EngineInterface && !$templating instanceof \Twig_Environment) { + throw new \InvalidArgumentException('The hinclude rendering strategy needs an instance of \Twig_Environment or Symfony\Component\Templating\EngineInterface'); + } + + $this->templating = $templating; + } + + /** + * Checks if a templating engine has been set. + * + * @return bool true if the templating engine has been set, false otherwise + */ + public function hasTemplating() + { + return null !== $this->templating; + } + + /** + * {@inheritdoc} + * + * Additional available options: + * + * * default: The default content (it can be a template name or the content) + * * id: An optional hx:include tag id attribute + * * attributes: An optional array of hx:include tag attributes + */ + public function render($uri, Request $request, array $options = array()) + { + if ($uri instanceof ControllerReference) { + if (null === $this->signer) { + throw new \LogicException('You must use a proper URI when using the Hinclude rendering strategy or set a URL signer.'); + } + + // we need to sign the absolute URI, but want to return the path only. + $uri = substr($this->signer->sign($this->generateFragmentUri($uri, $request, true)), strlen($request->getSchemeAndHttpHost())); + } + + // We need to replace ampersands in the URI with the encoded form in order to return valid html/xml content. + $uri = str_replace('&', '&', $uri); + + $template = isset($options['default']) ? $options['default'] : $this->globalDefaultTemplate; + if (null !== $this->templating && $template && $this->templateExists($template)) { + $content = $this->templating->render($template); + } else { + $content = $template; + } + + $attributes = isset($options['attributes']) && is_array($options['attributes']) ? $options['attributes'] : array(); + if (isset($options['id']) && $options['id']) { + $attributes['id'] = $options['id']; + } + $renderedAttributes = ''; + if (count($attributes) > 0) { + $flags = ENT_QUOTES | ENT_SUBSTITUTE; + foreach ($attributes as $attribute => $value) { + $renderedAttributes .= sprintf( + ' %s="%s"', + htmlspecialchars($attribute, $flags, $this->charset, false), + htmlspecialchars($value, $flags, $this->charset, false) + ); + } + } + + return new Response(sprintf('%s', $uri, $renderedAttributes, $content)); + } + + /** + * @param string $template + * + * @return bool + */ + private function templateExists($template) + { + if ($this->templating instanceof EngineInterface) { + try { + return $this->templating->exists($template); + } catch (\InvalidArgumentException $e) { + return false; + } + } + + $loader = $this->templating->getLoader(); + if ($loader instanceof \Twig_ExistsLoaderInterface || method_exists($loader, 'exists')) { + return $loader->exists($template); + } + + try { + if (method_exists($loader, 'getSourceContext')) { + $loader->getSourceContext($template); + } else { + $loader->getSource($template); + } + + return true; + } catch (\Twig_Error_Loader $e) { + } + + return false; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'hinclude'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php new file mode 100644 index 0000000000000000000000000000000000000000..a61b239c158b9dadbadefae8d58829f1e065a506 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php @@ -0,0 +1,154 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Fragment; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\Controller\ControllerReference; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * Implements the inline rendering strategy where the Request is rendered by the current HTTP kernel. + * + * @author Fabien Potencier + */ +class InlineFragmentRenderer extends RoutableFragmentRenderer +{ + private $kernel; + private $dispatcher; + + /** + * Constructor. + * + * @param HttpKernelInterface $kernel A HttpKernelInterface instance + * @param EventDispatcherInterface $dispatcher A EventDispatcherInterface instance + */ + public function __construct(HttpKernelInterface $kernel, EventDispatcherInterface $dispatcher = null) + { + $this->kernel = $kernel; + $this->dispatcher = $dispatcher; + } + + /** + * {@inheritdoc} + * + * Additional available options: + * + * * alt: an alternative URI to render in case of an error + */ + public function render($uri, Request $request, array $options = array()) + { + $reference = null; + if ($uri instanceof ControllerReference) { + $reference = $uri; + + // Remove attributes from the generated URI because if not, the Symfony + // routing system will use them to populate the Request attributes. We don't + // want that as we want to preserve objects (so we manually set Request attributes + // below instead) + $attributes = $reference->attributes; + $reference->attributes = array(); + + // The request format and locale might have been overridden by the user + foreach (array('_format', '_locale') as $key) { + if (isset($attributes[$key])) { + $reference->attributes[$key] = $attributes[$key]; + } + } + + $uri = $this->generateFragmentUri($uri, $request, false, false); + + $reference->attributes = array_merge($attributes, $reference->attributes); + } + + $subRequest = $this->createSubRequest($uri, $request); + + // override Request attributes as they can be objects (which are not supported by the generated URI) + if (null !== $reference) { + $subRequest->attributes->add($reference->attributes); + } + + $level = ob_get_level(); + try { + return $this->kernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST, false); + } catch (\Exception $e) { + // we dispatch the exception event to trigger the logging + // the response that comes back is simply ignored + if (isset($options['ignore_errors']) && $options['ignore_errors'] && $this->dispatcher) { + $event = new GetResponseForExceptionEvent($this->kernel, $request, HttpKernelInterface::SUB_REQUEST, $e); + + $this->dispatcher->dispatch(KernelEvents::EXCEPTION, $event); + } + + // let's clean up the output buffers that were created by the sub-request + Response::closeOutputBuffers($level, false); + + if (isset($options['alt'])) { + $alt = $options['alt']; + unset($options['alt']); + + return $this->render($alt, $request, $options); + } + + if (!isset($options['ignore_errors']) || !$options['ignore_errors']) { + throw $e; + } + + return new Response(); + } + } + + protected function createSubRequest($uri, Request $request) + { + $cookies = $request->cookies->all(); + $server = $request->server->all(); + + // Override the arguments to emulate a sub-request. + // Sub-request object will point to localhost as client ip and real client ip + // will be included into trusted header for client ip + try { + if ($trustedHeaderName = Request::getTrustedHeaderName(Request::HEADER_CLIENT_IP)) { + $currentXForwardedFor = $request->headers->get($trustedHeaderName, ''); + + $server['HTTP_'.$trustedHeaderName] = ($currentXForwardedFor ? $currentXForwardedFor.', ' : '').$request->getClientIp(); + } + } catch (\InvalidArgumentException $e) { + // Do nothing + } + + $server['REMOTE_ADDR'] = '127.0.0.1'; + unset($server['HTTP_IF_MODIFIED_SINCE']); + unset($server['HTTP_IF_NONE_MATCH']); + + $subRequest = Request::create($uri, 'get', array(), $cookies, array(), $server); + if ($request->headers->has('Surrogate-Capability')) { + $subRequest->headers->set('Surrogate-Capability', $request->headers->get('Surrogate-Capability')); + } + + if ($session = $request->getSession()) { + $subRequest->setSession($session); + } + + return $subRequest; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'inline'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php new file mode 100644 index 0000000000000000000000000000000000000000..d7eeb89a6befcae152ed34f3e29faa7cab9a5c71 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Fragment; + +use Symfony\Component\HttpKernel\Controller\ControllerReference; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\EventListener\FragmentListener; + +/** + * Adds the possibility to generate a fragment URI for a given Controller. + * + * @author Fabien Potencier + */ +abstract class RoutableFragmentRenderer implements FragmentRendererInterface +{ + private $fragmentPath = '/_fragment'; + + /** + * Sets the fragment path that triggers the fragment listener. + * + * @param string $path The path + * + * @see FragmentListener + */ + public function setFragmentPath($path) + { + $this->fragmentPath = $path; + } + + /** + * Generates a fragment URI for a given controller. + * + * @param ControllerReference $reference A ControllerReference instance + * @param Request $request A Request instance + * @param bool $absolute Whether to generate an absolute URL or not + * @param bool $strict Whether to allow non-scalar attributes or not + * + * @return string A fragment URI + */ + protected function generateFragmentUri(ControllerReference $reference, Request $request, $absolute = false, $strict = true) + { + if ($strict) { + $this->checkNonScalar($reference->attributes); + } + + // We need to forward the current _format and _locale values as we don't have + // a proper routing pattern to do the job for us. + // This makes things inconsistent if you switch from rendering a controller + // to rendering a route if the route pattern does not contain the special + // _format and _locale placeholders. + if (!isset($reference->attributes['_format'])) { + $reference->attributes['_format'] = $request->getRequestFormat(); + } + if (!isset($reference->attributes['_locale'])) { + $reference->attributes['_locale'] = $request->getLocale(); + } + + $reference->attributes['_controller'] = $reference->controller; + + $reference->query['_path'] = http_build_query($reference->attributes, '', '&'); + + $path = $this->fragmentPath.'?'.http_build_query($reference->query, '', '&'); + + if ($absolute) { + return $request->getUriForPath($path); + } + + return $request->getBaseUrl().$path; + } + + private function checkNonScalar($values) + { + foreach ($values as $key => $value) { + if (is_array($value)) { + $this->checkNonScalar($value); + } elseif (!is_scalar($value) && null !== $value) { + throw new \LogicException(sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).', $key)); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/SsiFragmentRenderer.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/SsiFragmentRenderer.php new file mode 100644 index 0000000000000000000000000000000000000000..45e7122f05f1e7a3965c9886e603964d3c495910 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/SsiFragmentRenderer.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Fragment; + +/** + * Implements the SSI rendering strategy. + * + * @author Sebastian Krebs + */ +class SsiFragmentRenderer extends AbstractSurrogateFragmentRenderer +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'ssi'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php new file mode 100644 index 0000000000000000000000000000000000000000..af94bea9ba2c77f83091e8d99e42667bb8becf04 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.php @@ -0,0 +1,138 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\HttpCache; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpKernelInterface; + +/** + * Abstract class implementing Surrogate capabilities to Request and Response instances. + * + * @author Fabien Potencier + * @author Robin Chalas + */ +abstract class AbstractSurrogate implements SurrogateInterface +{ + protected $contentTypes; + protected $phpEscapeMap = array( + array('', '', '', ''), + ); + + /** + * Constructor. + * + * @param array $contentTypes An array of content-type that should be parsed for Surrogate information + * (default: text/html, text/xml, application/xhtml+xml, and application/xml) + */ + public function __construct(array $contentTypes = array('text/html', 'text/xml', 'application/xhtml+xml', 'application/xml')) + { + $this->contentTypes = $contentTypes; + } + + /** + * Returns a new cache strategy instance. + * + * @return ResponseCacheStrategyInterface A ResponseCacheStrategyInterface instance + */ + public function createCacheStrategy() + { + return new ResponseCacheStrategy(); + } + + /** + * {@inheritdoc} + */ + public function hasSurrogateCapability(Request $request) + { + if (null === $value = $request->headers->get('Surrogate-Capability')) { + return false; + } + + return false !== strpos($value, sprintf('%s/1.0', strtoupper($this->getName()))); + } + + /** + * {@inheritdoc} + */ + public function addSurrogateCapability(Request $request) + { + $current = $request->headers->get('Surrogate-Capability'); + $new = sprintf('symfony="%s/1.0"', strtoupper($this->getName())); + + $request->headers->set('Surrogate-Capability', $current ? $current.', '.$new : $new); + } + + /** + * {@inheritdoc} + */ + public function needsParsing(Response $response) + { + if (!$control = $response->headers->get('Surrogate-Control')) { + return false; + } + + $pattern = sprintf('#content="[^"]*%s/1.0[^"]*"#', strtoupper($this->getName())); + + return (bool) preg_match($pattern, $control); + } + + /** + * {@inheritdoc} + */ + public function handle(HttpCache $cache, $uri, $alt, $ignoreErrors) + { + $subRequest = Request::create($uri, Request::METHOD_GET, array(), $cache->getRequest()->cookies->all(), array(), $cache->getRequest()->server->all()); + + try { + $response = $cache->handle($subRequest, HttpKernelInterface::SUB_REQUEST, true); + + if (!$response->isSuccessful()) { + throw new \RuntimeException(sprintf('Error when rendering "%s" (Status code is %s).', $subRequest->getUri(), $response->getStatusCode())); + } + + return $response->getContent(); + } catch (\Exception $e) { + if ($alt) { + return $this->handle($cache, $alt, '', $ignoreErrors); + } + + if (!$ignoreErrors) { + throw $e; + } + } + } + + /** + * Remove the Surrogate from the Surrogate-Control header. + * + * @param Response $response + */ + protected function removeFromControl(Response $response) + { + if (!$response->headers->has('Surrogate-Control')) { + return; + } + + $value = $response->headers->get('Surrogate-Control'); + $upperName = strtoupper($this->getName()); + + if (sprintf('content="%s/1.0"', $upperName) == $value) { + $response->headers->remove('Surrogate-Control'); + } elseif (preg_match(sprintf('#,\s*content="%s/1.0"#', $upperName), $value)) { + $response->headers->set('Surrogate-Control', preg_replace(sprintf('#,\s*content="%s/1.0"#', $upperName), '', $value)); + } elseif (preg_match(sprintf('#content="%s/1.0",\s*#', $upperName), $value)) { + $response->headers->set('Surrogate-Control', preg_replace(sprintf('#content="%s/1.0",\s*#', $upperName), '', $value)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Esi.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Esi.php new file mode 100644 index 0000000000000000000000000000000000000000..d09907ea6220746b3fbc8bbef054f4970f9897d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Esi.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\HttpCache; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Esi implements the ESI capabilities to Request and Response instances. + * + * For more information, read the following W3C notes: + * + * * ESI Language Specification 1.0 (http://www.w3.org/TR/esi-lang) + * + * * Edge Architecture Specification (http://www.w3.org/TR/edge-arch) + * + * @author Fabien Potencier + */ +class Esi extends AbstractSurrogate +{ + public function getName() + { + return 'esi'; + } + + /** + * {@inheritdoc} + */ + public function addSurrogateControl(Response $response) + { + if (false !== strpos($response->getContent(), 'headers->set('Surrogate-Control', 'content="ESI/1.0"'); + } + } + + /** + * {@inheritdoc} + */ + public function renderIncludeTag($uri, $alt = null, $ignoreErrors = true, $comment = '') + { + $html = sprintf('', + $uri, + $ignoreErrors ? ' onerror="continue"' : '', + $alt ? sprintf(' alt="%s"', $alt) : '' + ); + + if (!empty($comment)) { + return sprintf("\n%s", $comment, $html); + } + + return $html; + } + + /** + * {@inheritdoc} + */ + public function process(Request $request, Response $response) + { + $type = $response->headers->get('Content-Type'); + if (empty($type)) { + $type = 'text/html'; + } + + $parts = explode(';', $type); + if (!in_array($parts[0], $this->contentTypes)) { + return $response; + } + + // we don't use a proper XML parser here as we can have ESI tags in a plain text response + $content = $response->getContent(); + $content = preg_replace('#.*?#s', '', $content); + $content = preg_replace('#]+>#s', '', $content); + + $chunks = preg_split('##', $content, -1, PREG_SPLIT_DELIM_CAPTURE); + $chunks[0] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[0]); + + $i = 1; + while (isset($chunks[$i])) { + $options = array(); + preg_match_all('/(src|onerror|alt)="([^"]*?)"/', $chunks[$i], $matches, PREG_SET_ORDER); + foreach ($matches as $set) { + $options[$set[1]] = $set[2]; + } + + if (!isset($options['src'])) { + throw new \RuntimeException('Unable to process an ESI tag without a "src" attribute.'); + } + + $chunks[$i] = sprintf('surrogate->handle($this, %s, %s, %s) ?>'."\n", + var_export($options['src'], true), + var_export(isset($options['alt']) ? $options['alt'] : '', true), + isset($options['onerror']) && 'continue' === $options['onerror'] ? 'true' : 'false' + ); + ++$i; + $chunks[$i] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[$i]); + ++$i; + } + $content = implode('', $chunks); + + $response->setContent($content); + $response->headers->set('X-Body-Eval', 'ESI'); + + // remove ESI/1.0 from the Surrogate-Control header + $this->removeFromControl($response); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php new file mode 100644 index 0000000000000000000000000000000000000000..686f0b852c2020d965e72c552c80168adfd610f3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -0,0 +1,693 @@ + + * + * This code is partially based on the Rack-Cache library by Ryan Tomayko, + * which is released under the MIT license. + * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801) + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\HttpCache; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\TerminableInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Cache provides HTTP caching. + * + * @author Fabien Potencier + */ +class HttpCache implements HttpKernelInterface, TerminableInterface +{ + private $kernel; + private $store; + private $request; + private $surrogate; + private $surrogateCacheStrategy; + private $options = array(); + private $traces = array(); + + /** + * Constructor. + * + * The available options are: + * + * * debug: If true, the traces are added as a HTTP header to ease debugging + * + * * default_ttl The number of seconds that a cache entry should be considered + * fresh when no explicit freshness information is provided in + * a response. Explicit Cache-Control or Expires headers + * override this value. (default: 0) + * + * * private_headers Set of request headers that trigger "private" cache-control behavior + * on responses that don't explicitly state whether the response is + * public or private via a Cache-Control directive. (default: Authorization and Cookie) + * + * * allow_reload Specifies whether the client can force a cache reload by including a + * Cache-Control "no-cache" directive in the request. Set it to ``true`` + * for compliance with RFC 2616. (default: false) + * + * * allow_revalidate Specifies whether the client can force a cache revalidate by including + * a Cache-Control "max-age=0" directive in the request. Set it to ``true`` + * for compliance with RFC 2616. (default: false) + * + * * stale_while_revalidate Specifies the default number of seconds (the granularity is the second as the + * Response TTL precision is a second) during which the cache can immediately return + * a stale response while it revalidates it in the background (default: 2). + * This setting is overridden by the stale-while-revalidate HTTP Cache-Control + * extension (see RFC 5861). + * + * * stale_if_error Specifies the default number of seconds (the granularity is the second) during which + * the cache can serve a stale response when an error is encountered (default: 60). + * This setting is overridden by the stale-if-error HTTP Cache-Control extension + * (see RFC 5861). + * + * @param HttpKernelInterface $kernel An HttpKernelInterface instance + * @param StoreInterface $store A Store instance + * @param SurrogateInterface $surrogate A SurrogateInterface instance + * @param array $options An array of options + */ + public function __construct(HttpKernelInterface $kernel, StoreInterface $store, SurrogateInterface $surrogate = null, array $options = array()) + { + $this->store = $store; + $this->kernel = $kernel; + $this->surrogate = $surrogate; + + // needed in case there is a fatal error because the backend is too slow to respond + register_shutdown_function(array($this->store, 'cleanup')); + + $this->options = array_merge(array( + 'debug' => false, + 'default_ttl' => 0, + 'private_headers' => array('Authorization', 'Cookie'), + 'allow_reload' => false, + 'allow_revalidate' => false, + 'stale_while_revalidate' => 2, + 'stale_if_error' => 60, + ), $options); + } + + /** + * Gets the current store. + * + * @return StoreInterface $store A StoreInterface instance + */ + public function getStore() + { + return $this->store; + } + + /** + * Returns an array of events that took place during processing of the last request. + * + * @return array An array of events + */ + public function getTraces() + { + return $this->traces; + } + + /** + * Returns a log message for the events of the last request processing. + * + * @return string A log message + */ + public function getLog() + { + $log = array(); + foreach ($this->traces as $request => $traces) { + $log[] = sprintf('%s: %s', $request, implode(', ', $traces)); + } + + return implode('; ', $log); + } + + /** + * Gets the Request instance associated with the master request. + * + * @return Request A Request instance + */ + public function getRequest() + { + return $this->request; + } + + /** + * Gets the Kernel instance. + * + * @return HttpKernelInterface An HttpKernelInterface instance + */ + public function getKernel() + { + return $this->kernel; + } + + /** + * Gets the Surrogate instance. + * + * @return SurrogateInterface A Surrogate instance + * + * @throws \LogicException + */ + public function getSurrogate() + { + return $this->surrogate; + } + + /** + * {@inheritdoc} + */ + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + // FIXME: catch exceptions and implement a 500 error page here? -> in Varnish, there is a built-in error page mechanism + if (HttpKernelInterface::MASTER_REQUEST === $type) { + $this->traces = array(); + $this->request = $request; + if (null !== $this->surrogate) { + $this->surrogateCacheStrategy = $this->surrogate->createCacheStrategy(); + } + } + + $path = $request->getPathInfo(); + if ($qs = $request->getQueryString()) { + $path .= '?'.$qs; + } + $this->traces[$request->getMethod().' '.$path] = array(); + + if (!$request->isMethodSafe(false)) { + $response = $this->invalidate($request, $catch); + } elseif ($request->headers->has('expect') || !$request->isMethodCacheable()) { + $response = $this->pass($request, $catch); + } else { + $response = $this->lookup($request, $catch); + } + + $this->restoreResponseBody($request, $response); + + $response->setDate(\DateTime::createFromFormat('U', time(), new \DateTimeZone('UTC'))); + + if (HttpKernelInterface::MASTER_REQUEST === $type && $this->options['debug']) { + $response->headers->set('X-Symfony-Cache', $this->getLog()); + } + + if (null !== $this->surrogate) { + if (HttpKernelInterface::MASTER_REQUEST === $type) { + $this->surrogateCacheStrategy->update($response); + } else { + $this->surrogateCacheStrategy->add($response); + } + } + + $response->prepare($request); + + $response->isNotModified($request); + + return $response; + } + + /** + * {@inheritdoc} + */ + public function terminate(Request $request, Response $response) + { + if ($this->getKernel() instanceof TerminableInterface) { + $this->getKernel()->terminate($request, $response); + } + } + + /** + * Forwards the Request to the backend without storing the Response in the cache. + * + * @param Request $request A Request instance + * @param bool $catch Whether to process exceptions + * + * @return Response A Response instance + */ + protected function pass(Request $request, $catch = false) + { + $this->record($request, 'pass'); + + return $this->forward($request, $catch); + } + + /** + * Invalidates non-safe methods (like POST, PUT, and DELETE). + * + * @param Request $request A Request instance + * @param bool $catch Whether to process exceptions + * + * @return Response A Response instance + * + * @throws \Exception + * + * @see RFC2616 13.10 + */ + protected function invalidate(Request $request, $catch = false) + { + $response = $this->pass($request, $catch); + + // invalidate only when the response is successful + if ($response->isSuccessful() || $response->isRedirect()) { + try { + $this->store->invalidate($request); + + // As per the RFC, invalidate Location and Content-Location URLs if present + foreach (array('Location', 'Content-Location') as $header) { + if ($uri = $response->headers->get($header)) { + $subRequest = Request::create($uri, 'get', array(), array(), array(), $request->server->all()); + + $this->store->invalidate($subRequest); + } + } + + $this->record($request, 'invalidate'); + } catch (\Exception $e) { + $this->record($request, 'invalidate-failed'); + + if ($this->options['debug']) { + throw $e; + } + } + } + + return $response; + } + + /** + * Lookups a Response from the cache for the given Request. + * + * When a matching cache entry is found and is fresh, it uses it as the + * response without forwarding any request to the backend. When a matching + * cache entry is found but is stale, it attempts to "validate" the entry with + * the backend using conditional GET. When no matching cache entry is found, + * it triggers "miss" processing. + * + * @param Request $request A Request instance + * @param bool $catch whether to process exceptions + * + * @return Response A Response instance + * + * @throws \Exception + */ + protected function lookup(Request $request, $catch = false) + { + // if allow_reload and no-cache Cache-Control, allow a cache reload + if ($this->options['allow_reload'] && $request->isNoCache()) { + $this->record($request, 'reload'); + + return $this->fetch($request, $catch); + } + + try { + $entry = $this->store->lookup($request); + } catch (\Exception $e) { + $this->record($request, 'lookup-failed'); + + if ($this->options['debug']) { + throw $e; + } + + return $this->pass($request, $catch); + } + + if (null === $entry) { + $this->record($request, 'miss'); + + return $this->fetch($request, $catch); + } + + if (!$this->isFreshEnough($request, $entry)) { + $this->record($request, 'stale'); + + return $this->validate($request, $entry, $catch); + } + + $this->record($request, 'fresh'); + + $entry->headers->set('Age', $entry->getAge()); + + return $entry; + } + + /** + * Validates that a cache entry is fresh. + * + * The original request is used as a template for a conditional + * GET request with the backend. + * + * @param Request $request A Request instance + * @param Response $entry A Response instance to validate + * @param bool $catch Whether to process exceptions + * + * @return Response A Response instance + */ + protected function validate(Request $request, Response $entry, $catch = false) + { + $subRequest = clone $request; + + // send no head requests because we want content + if ('HEAD' === $request->getMethod()) { + $subRequest->setMethod('GET'); + } + + // add our cached last-modified validator + $subRequest->headers->set('if_modified_since', $entry->headers->get('Last-Modified')); + + // Add our cached etag validator to the environment. + // We keep the etags from the client to handle the case when the client + // has a different private valid entry which is not cached here. + $cachedEtags = $entry->getEtag() ? array($entry->getEtag()) : array(); + $requestEtags = $request->getETags(); + if ($etags = array_unique(array_merge($cachedEtags, $requestEtags))) { + $subRequest->headers->set('if_none_match', implode(', ', $etags)); + } + + $response = $this->forward($subRequest, $catch, $entry); + + if (304 == $response->getStatusCode()) { + $this->record($request, 'valid'); + + // return the response and not the cache entry if the response is valid but not cached + $etag = $response->getEtag(); + if ($etag && in_array($etag, $requestEtags) && !in_array($etag, $cachedEtags)) { + return $response; + } + + $entry = clone $entry; + $entry->headers->remove('Date'); + + foreach (array('Date', 'Expires', 'Cache-Control', 'ETag', 'Last-Modified') as $name) { + if ($response->headers->has($name)) { + $entry->headers->set($name, $response->headers->get($name)); + } + } + + $response = $entry; + } else { + $this->record($request, 'invalid'); + } + + if ($response->isCacheable()) { + $this->store($request, $response); + } + + return $response; + } + + /** + * Forwards the Request to the backend and determines whether the response should be stored. + * + * This methods is triggered when the cache missed or a reload is required. + * + * @param Request $request A Request instance + * @param bool $catch whether to process exceptions + * + * @return Response A Response instance + */ + protected function fetch(Request $request, $catch = false) + { + $subRequest = clone $request; + + // send no head requests because we want content + if ('HEAD' === $request->getMethod()) { + $subRequest->setMethod('GET'); + } + + // avoid that the backend sends no content + $subRequest->headers->remove('if_modified_since'); + $subRequest->headers->remove('if_none_match'); + + $response = $this->forward($subRequest, $catch); + + if ($response->isCacheable()) { + $this->store($request, $response); + } + + return $response; + } + + /** + * Forwards the Request to the backend and returns the Response. + * + * @param Request $request A Request instance + * @param bool $catch Whether to catch exceptions or not + * @param Response $entry A Response instance (the stale entry if present, null otherwise) + * + * @return Response A Response instance + */ + protected function forward(Request $request, $catch = false, Response $entry = null) + { + if ($this->surrogate) { + $this->surrogate->addSurrogateCapability($request); + } + + // modify the X-Forwarded-For header if needed + $forwardedFor = $request->headers->get('X-Forwarded-For'); + if ($forwardedFor) { + $request->headers->set('X-Forwarded-For', $forwardedFor.', '.$request->server->get('REMOTE_ADDR')); + } else { + $request->headers->set('X-Forwarded-For', $request->server->get('REMOTE_ADDR')); + } + + // fix the client IP address by setting it to 127.0.0.1 as HttpCache + // is always called from the same process as the backend. + $request->server->set('REMOTE_ADDR', '127.0.0.1'); + + // make sure HttpCache is a trusted proxy + if (!in_array('127.0.0.1', $trustedProxies = Request::getTrustedProxies())) { + $trustedProxies[] = '127.0.0.1'; + Request::setTrustedProxies($trustedProxies); + } + + // always a "master" request (as the real master request can be in cache) + $response = $this->kernel->handle($request, HttpKernelInterface::MASTER_REQUEST, $catch); + // FIXME: we probably need to also catch exceptions if raw === true + + // we don't implement the stale-if-error on Requests, which is nonetheless part of the RFC + if (null !== $entry && in_array($response->getStatusCode(), array(500, 502, 503, 504))) { + if (null === $age = $entry->headers->getCacheControlDirective('stale-if-error')) { + $age = $this->options['stale_if_error']; + } + + if (abs($entry->getTtl()) < $age) { + $this->record($request, 'stale-if-error'); + + return $entry; + } + } + + $this->processResponseBody($request, $response); + + if ($this->isPrivateRequest($request) && !$response->headers->hasCacheControlDirective('public')) { + $response->setPrivate(); + } elseif ($this->options['default_ttl'] > 0 && null === $response->getTtl() && !$response->headers->getCacheControlDirective('must-revalidate')) { + $response->setTtl($this->options['default_ttl']); + } + + return $response; + } + + /** + * Checks whether the cache entry is "fresh enough" to satisfy the Request. + * + * @param Request $request A Request instance + * @param Response $entry A Response instance + * + * @return bool true if the cache entry if fresh enough, false otherwise + */ + protected function isFreshEnough(Request $request, Response $entry) + { + if (!$entry->isFresh()) { + return $this->lock($request, $entry); + } + + if ($this->options['allow_revalidate'] && null !== $maxAge = $request->headers->getCacheControlDirective('max-age')) { + return $maxAge > 0 && $maxAge >= $entry->getAge(); + } + + return true; + } + + /** + * Locks a Request during the call to the backend. + * + * @param Request $request A Request instance + * @param Response $entry A Response instance + * + * @return bool true if the cache entry can be returned even if it is staled, false otherwise + */ + protected function lock(Request $request, Response $entry) + { + // try to acquire a lock to call the backend + $lock = $this->store->lock($request); + + // there is already another process calling the backend + if (true !== $lock) { + // check if we can serve the stale entry + if (null === $age = $entry->headers->getCacheControlDirective('stale-while-revalidate')) { + $age = $this->options['stale_while_revalidate']; + } + + if (abs($entry->getTtl()) < $age) { + $this->record($request, 'stale-while-revalidate'); + + // server the stale response while there is a revalidation + return true; + } + + // wait for the lock to be released + $wait = 0; + while ($this->store->isLocked($request) && $wait < 5000000) { + usleep(50000); + $wait += 50000; + } + + if ($wait < 5000000) { + // replace the current entry with the fresh one + $new = $this->lookup($request); + $entry->headers = $new->headers; + $entry->setContent($new->getContent()); + $entry->setStatusCode($new->getStatusCode()); + $entry->setProtocolVersion($new->getProtocolVersion()); + foreach ($new->headers->getCookies() as $cookie) { + $entry->headers->setCookie($cookie); + } + } else { + // backend is slow as hell, send a 503 response (to avoid the dog pile effect) + $entry->setStatusCode(503); + $entry->setContent('503 Service Unavailable'); + $entry->headers->set('Retry-After', 10); + } + + return true; + } + + // we have the lock, call the backend + return false; + } + + /** + * Writes the Response to the cache. + * + * @param Request $request A Request instance + * @param Response $response A Response instance + * + * @throws \Exception + */ + protected function store(Request $request, Response $response) + { + if (!$response->headers->has('Date')) { + $response->setDate(\DateTime::createFromFormat('U', time())); + } + try { + $this->store->write($request, $response); + + $this->record($request, 'store'); + + $response->headers->set('Age', $response->getAge()); + } catch (\Exception $e) { + $this->record($request, 'store-failed'); + + if ($this->options['debug']) { + throw $e; + } + } + + // now that the response is cached, release the lock + $this->store->unlock($request); + } + + /** + * Restores the Response body. + * + * @param Request $request A Request instance + * @param Response $response A Response instance + */ + private function restoreResponseBody(Request $request, Response $response) + { + if ($request->isMethod('HEAD') || 304 === $response->getStatusCode()) { + $response->setContent(null); + $response->headers->remove('X-Body-Eval'); + $response->headers->remove('X-Body-File'); + + return; + } + + if ($response->headers->has('X-Body-Eval')) { + ob_start(); + + if ($response->headers->has('X-Body-File')) { + include $response->headers->get('X-Body-File'); + } else { + eval('; ?>'.$response->getContent().'setContent(ob_get_clean()); + $response->headers->remove('X-Body-Eval'); + if (!$response->headers->has('Transfer-Encoding')) { + $response->headers->set('Content-Length', strlen($response->getContent())); + } + } elseif ($response->headers->has('X-Body-File')) { + $response->setContent(file_get_contents($response->headers->get('X-Body-File'))); + } else { + return; + } + + $response->headers->remove('X-Body-File'); + } + + protected function processResponseBody(Request $request, Response $response) + { + if (null !== $this->surrogate && $this->surrogate->needsParsing($response)) { + $this->surrogate->process($request, $response); + } + } + + /** + * Checks if the Request includes authorization or other sensitive information + * that should cause the Response to be considered private by default. + * + * @param Request $request A Request instance + * + * @return bool true if the Request is private, false otherwise + */ + private function isPrivateRequest(Request $request) + { + foreach ($this->options['private_headers'] as $key) { + $key = strtolower(str_replace('HTTP_', '', $key)); + + if ('cookie' === $key) { + if (count($request->cookies->all())) { + return true; + } + } elseif ($request->headers->has($key)) { + return true; + } + } + + return false; + } + + /** + * Records that an event took place. + * + * @param Request $request A Request instance + * @param string $event The event name + */ + private function record(Request $request, $event) + { + $path = $request->getPathInfo(); + if ($qs = $request->getQueryString()) { + $path .= '?'.$qs; + } + $this->traces[$request->getMethod().' '.$path][] = $event; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..39a99e6966c22ab46ae7997e193eb1a2308c31b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php @@ -0,0 +1,93 @@ + + * + * This code is partially based on the Rack-Cache library by Ryan Tomayko, + * which is released under the MIT license. + * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801) + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\HttpCache; + +use Symfony\Component\HttpFoundation\Response; + +/** + * ResponseCacheStrategy knows how to compute the Response cache HTTP header + * based on the different response cache headers. + * + * This implementation changes the master response TTL to the smallest TTL received + * or force validation if one of the surrogates has validation cache strategy. + * + * @author Fabien Potencier + */ +class ResponseCacheStrategy implements ResponseCacheStrategyInterface +{ + private $cacheable = true; + private $embeddedResponses = 0; + private $ttls = array(); + private $maxAges = array(); + private $isNotCacheableResponseEmbedded = false; + + /** + * {@inheritdoc} + */ + public function add(Response $response) + { + if ($response->isValidateable()) { + $this->cacheable = false; + } else { + $maxAge = $response->getMaxAge(); + $this->ttls[] = $response->getTtl(); + $this->maxAges[] = $maxAge; + + if (null === $maxAge) { + $this->isNotCacheableResponseEmbedded = true; + } + } + + ++$this->embeddedResponses; + } + + /** + * {@inheritdoc} + */ + public function update(Response $response) + { + // if we have no embedded Response, do nothing + if (0 === $this->embeddedResponses) { + return; + } + + // Remove validation related headers in order to avoid browsers using + // their own cache, because some of the response content comes from + // at least one embedded response (which likely has a different caching strategy). + if ($response->isValidateable()) { + $response->setEtag(null); + $response->setLastModified(null); + $this->cacheable = false; + } + + if (!$this->cacheable) { + $response->headers->set('Cache-Control', 'no-cache, must-revalidate'); + + return; + } + + $this->ttls[] = $response->getTtl(); + $this->maxAges[] = $response->getMaxAge(); + + if ($this->isNotCacheableResponseEmbedded) { + $response->headers->removeCacheControlDirective('s-maxage'); + } elseif (null !== $maxAge = min($this->maxAges)) { + $response->setSharedMaxAge($maxAge); + $response->headers->set('Age', $maxAge - min($this->ttls)); + } + $response->setMaxAge(0); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d70c2e06ec8b03b112b13875e2d60f2cc0c7eaad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php @@ -0,0 +1,41 @@ + + * + * This code is partially based on the Rack-Cache library by Ryan Tomayko, + * which is released under the MIT license. + * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801) + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\HttpCache; + +use Symfony\Component\HttpFoundation\Response; + +/** + * ResponseCacheStrategyInterface implementations know how to compute the + * Response cache HTTP header based on the different response cache headers. + * + * @author Fabien Potencier + */ +interface ResponseCacheStrategyInterface +{ + /** + * Adds a Response. + * + * @param Response $response + */ + public function add(Response $response); + + /** + * Updates the Response HTTP headers based on the embedded Responses. + * + * @param Response $response + */ + public function update(Response $response); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php new file mode 100644 index 0000000000000000000000000000000000000000..3178c335159657a19281b74504efea1a91ef8324 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Ssi.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\HttpCache; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Ssi implements the SSI capabilities to Request and Response instances. + * + * @author Sebastian Krebs + */ +class Ssi extends AbstractSurrogate +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'ssi'; + } + + /** + * {@inheritdoc} + */ + public function addSurrogateControl(Response $response) + { + if (false !== strpos($response->getContent(), '', $uri); + } + + /** + * {@inheritdoc} + */ + public function process(Request $request, Response $response) + { + $type = $response->headers->get('Content-Type'); + if (empty($type)) { + $type = 'text/html'; + } + + $parts = explode(';', $type); + if (!in_array($parts[0], $this->contentTypes)) { + return $response; + } + + // we don't use a proper XML parser here as we can have SSI tags in a plain text response + $content = $response->getContent(); + + $chunks = preg_split('##', $content, -1, PREG_SPLIT_DELIM_CAPTURE); + $chunks[0] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[0]); + + $i = 1; + while (isset($chunks[$i])) { + $options = array(); + preg_match_all('/(virtual)="([^"]*?)"/', $chunks[$i], $matches, PREG_SET_ORDER); + foreach ($matches as $set) { + $options[$set[1]] = $set[2]; + } + + if (!isset($options['virtual'])) { + throw new \RuntimeException('Unable to process an SSI tag without a "virtual" attribute.'); + } + + $chunks[$i] = sprintf('surrogate->handle($this, %s, \'\', false) ?>'."\n", + var_export($options['virtual'], true) + ); + ++$i; + $chunks[$i] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[$i]); + ++$i; + } + $content = implode('', $chunks); + + $response->setContent($content); + $response->headers->set('X-Body-Eval', 'SSI'); + + // remove SSI/1.0 from the Surrogate-Control header + $this->removeFromControl($response); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php new file mode 100644 index 0000000000000000000000000000000000000000..f5574614b839a8b7d4982f25d90a10d2023eb504 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php @@ -0,0 +1,505 @@ + + * + * This code is partially based on the Rack-Cache library by Ryan Tomayko, + * which is released under the MIT license. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\HttpCache; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Store implements all the logic for storing cache metadata (Request and Response headers). + * + * @author Fabien Potencier + */ +class Store implements StoreInterface +{ + protected $root; + private $keyCache; + private $locks; + + /** + * Constructor. + * + * @param string $root The path to the cache directory + * + * @throws \RuntimeException + */ + public function __construct($root) + { + $this->root = $root; + if (!file_exists($this->root) && !@mkdir($this->root, 0777, true) && !is_dir($this->root)) { + throw new \RuntimeException(sprintf('Unable to create the store directory (%s).', $this->root)); + } + $this->keyCache = new \SplObjectStorage(); + $this->locks = array(); + } + + /** + * Cleanups storage. + */ + public function cleanup() + { + // unlock everything + foreach ($this->locks as $lock) { + flock($lock, LOCK_UN); + fclose($lock); + } + + $this->locks = array(); + } + + /** + * Tries to lock the cache for a given Request, without blocking. + * + * @param Request $request A Request instance + * + * @return bool|string true if the lock is acquired, the path to the current lock otherwise + */ + public function lock(Request $request) + { + $key = $this->getCacheKey($request); + + if (!isset($this->locks[$key])) { + $path = $this->getPath($key); + if (!file_exists(dirname($path)) && false === @mkdir(dirname($path), 0777, true) && !is_dir(dirname($path))) { + return $path; + } + $h = fopen($path, 'cb'); + if (!flock($h, LOCK_EX | LOCK_NB)) { + fclose($h); + + return $path; + } + + $this->locks[$key] = $h; + } + + return true; + } + + /** + * Releases the lock for the given Request. + * + * @param Request $request A Request instance + * + * @return bool False if the lock file does not exist or cannot be unlocked, true otherwise + */ + public function unlock(Request $request) + { + $key = $this->getCacheKey($request); + + if (isset($this->locks[$key])) { + flock($this->locks[$key], LOCK_UN); + fclose($this->locks[$key]); + unset($this->locks[$key]); + + return true; + } + + return false; + } + + public function isLocked(Request $request) + { + $key = $this->getCacheKey($request); + + if (isset($this->locks[$key])) { + return true; // shortcut if lock held by this process + } + + if (!file_exists($path = $this->getPath($key))) { + return false; + } + + $h = fopen($path, 'rb'); + flock($h, LOCK_EX | LOCK_NB, $wouldBlock); + flock($h, LOCK_UN); // release the lock we just acquired + fclose($h); + + return (bool) $wouldBlock; + } + + /** + * Locates a cached Response for the Request provided. + * + * @param Request $request A Request instance + * + * @return Response|null A Response instance, or null if no cache entry was found + */ + public function lookup(Request $request) + { + $key = $this->getCacheKey($request); + + if (!$entries = $this->getMetadata($key)) { + return; + } + + // find a cached entry that matches the request. + $match = null; + foreach ($entries as $entry) { + if ($this->requestsMatch(isset($entry[1]['vary'][0]) ? implode(', ', $entry[1]['vary']) : '', $request->headers->all(), $entry[0])) { + $match = $entry; + + break; + } + } + + if (null === $match) { + return; + } + + list($req, $headers) = $match; + if (file_exists($body = $this->getPath($headers['x-content-digest'][0]))) { + return $this->restoreResponse($headers, $body); + } + + // TODO the metaStore referenced an entity that doesn't exist in + // the entityStore. We definitely want to return nil but we should + // also purge the entry from the meta-store when this is detected. + } + + /** + * Writes a cache entry to the store for the given Request and Response. + * + * Existing entries are read and any that match the response are removed. This + * method calls write with the new list of cache entries. + * + * @param Request $request A Request instance + * @param Response $response A Response instance + * + * @return string The key under which the response is stored + * + * @throws \RuntimeException + */ + public function write(Request $request, Response $response) + { + $key = $this->getCacheKey($request); + $storedEnv = $this->persistRequest($request); + + // write the response body to the entity store if this is the original response + if (!$response->headers->has('X-Content-Digest')) { + $digest = $this->generateContentDigest($response); + + if (false === $this->save($digest, $response->getContent())) { + throw new \RuntimeException('Unable to store the entity.'); + } + + $response->headers->set('X-Content-Digest', $digest); + + if (!$response->headers->has('Transfer-Encoding')) { + $response->headers->set('Content-Length', strlen($response->getContent())); + } + } + + // read existing cache entries, remove non-varying, and add this one to the list + $entries = array(); + $vary = $response->headers->get('vary'); + foreach ($this->getMetadata($key) as $entry) { + if (!isset($entry[1]['vary'][0])) { + $entry[1]['vary'] = array(''); + } + + if ($vary != $entry[1]['vary'][0] || !$this->requestsMatch($vary, $entry[0], $storedEnv)) { + $entries[] = $entry; + } + } + + $headers = $this->persistResponse($response); + unset($headers['age']); + + array_unshift($entries, array($storedEnv, $headers)); + + if (false === $this->save($key, serialize($entries))) { + throw new \RuntimeException('Unable to store the metadata.'); + } + + return $key; + } + + /** + * Returns content digest for $response. + * + * @param Response $response + * + * @return string + */ + protected function generateContentDigest(Response $response) + { + return 'en'.hash('sha256', $response->getContent()); + } + + /** + * Invalidates all cache entries that match the request. + * + * @param Request $request A Request instance + * + * @throws \RuntimeException + */ + public function invalidate(Request $request) + { + $modified = false; + $key = $this->getCacheKey($request); + + $entries = array(); + foreach ($this->getMetadata($key) as $entry) { + $response = $this->restoreResponse($entry[1]); + if ($response->isFresh()) { + $response->expire(); + $modified = true; + $entries[] = array($entry[0], $this->persistResponse($response)); + } else { + $entries[] = $entry; + } + } + + if ($modified && false === $this->save($key, serialize($entries))) { + throw new \RuntimeException('Unable to store the metadata.'); + } + } + + /** + * Determines whether two Request HTTP header sets are non-varying based on + * the vary response header value provided. + * + * @param string $vary A Response vary header + * @param array $env1 A Request HTTP header array + * @param array $env2 A Request HTTP header array + * + * @return bool true if the two environments match, false otherwise + */ + private function requestsMatch($vary, $env1, $env2) + { + if (empty($vary)) { + return true; + } + + foreach (preg_split('/[\s,]+/', $vary) as $header) { + $key = str_replace('_', '-', strtolower($header)); + $v1 = isset($env1[$key]) ? $env1[$key] : null; + $v2 = isset($env2[$key]) ? $env2[$key] : null; + if ($v1 !== $v2) { + return false; + } + } + + return true; + } + + /** + * Gets all data associated with the given key. + * + * Use this method only if you know what you are doing. + * + * @param string $key The store key + * + * @return array An array of data associated with the key + */ + private function getMetadata($key) + { + if (!$entries = $this->load($key)) { + return array(); + } + + return unserialize($entries); + } + + /** + * Purges data for the given URL. + * + * This method purges both the HTTP and the HTTPS version of the cache entry. + * + * @param string $url A URL + * + * @return bool true if the URL exists with either HTTP or HTTPS scheme and has been purged, false otherwise + */ + public function purge($url) + { + $http = preg_replace('#^https#', 'http', $url); + $https = preg_replace('#^http#', 'https', $url); + + return $this->doPurge($http) || $this->doPurge($https); + } + + /** + * Purges data for the given URL. + * + * @param string $url A URL + * + * @return bool true if the URL exists and has been purged, false otherwise + */ + private function doPurge($url) + { + $key = $this->getCacheKey(Request::create($url)); + if (isset($this->locks[$key])) { + flock($this->locks[$key], LOCK_UN); + fclose($this->locks[$key]); + unset($this->locks[$key]); + } + + if (file_exists($path = $this->getPath($key))) { + unlink($path); + + return true; + } + + return false; + } + + /** + * Loads data for the given key. + * + * @param string $key The store key + * + * @return string The data associated with the key + */ + private function load($key) + { + $path = $this->getPath($key); + + return file_exists($path) ? file_get_contents($path) : false; + } + + /** + * Save data for the given key. + * + * @param string $key The store key + * @param string $data The data to store + * + * @return bool + */ + private function save($key, $data) + { + $path = $this->getPath($key); + + if (isset($this->locks[$key])) { + $fp = $this->locks[$key]; + @ftruncate($fp, 0); + @fseek($fp, 0); + $len = @fwrite($fp, $data); + if (strlen($data) !== $len) { + @ftruncate($fp, 0); + + return false; + } + } else { + if (!file_exists(dirname($path)) && false === @mkdir(dirname($path), 0777, true) && !is_dir(dirname($path))) { + return false; + } + + $tmpFile = tempnam(dirname($path), basename($path)); + if (false === $fp = @fopen($tmpFile, 'wb')) { + return false; + } + @fwrite($fp, $data); + @fclose($fp); + + if ($data != file_get_contents($tmpFile)) { + return false; + } + + if (false === @rename($tmpFile, $path)) { + return false; + } + } + + @chmod($path, 0666 & ~umask()); + } + + public function getPath($key) + { + return $this->root.DIRECTORY_SEPARATOR.substr($key, 0, 2).DIRECTORY_SEPARATOR.substr($key, 2, 2).DIRECTORY_SEPARATOR.substr($key, 4, 2).DIRECTORY_SEPARATOR.substr($key, 6); + } + + /** + * Generates a cache key for the given Request. + * + * This method should return a key that must only depend on a + * normalized version of the request URI. + * + * If the same URI can have more than one representation, based on some + * headers, use a Vary header to indicate them, and each representation will + * be stored independently under the same cache key. + * + * @param Request $request A Request instance + * + * @return string A key for the given Request + */ + protected function generateCacheKey(Request $request) + { + return 'md'.hash('sha256', $request->getUri()); + } + + /** + * Returns a cache key for the given Request. + * + * @param Request $request A Request instance + * + * @return string A key for the given Request + */ + private function getCacheKey(Request $request) + { + if (isset($this->keyCache[$request])) { + return $this->keyCache[$request]; + } + + return $this->keyCache[$request] = $this->generateCacheKey($request); + } + + /** + * Persists the Request HTTP headers. + * + * @param Request $request A Request instance + * + * @return array An array of HTTP headers + */ + private function persistRequest(Request $request) + { + return $request->headers->all(); + } + + /** + * Persists the Response HTTP headers. + * + * @param Response $response A Response instance + * + * @return array An array of HTTP headers + */ + private function persistResponse(Response $response) + { + $headers = $response->headers->all(); + $headers['X-Status'] = array($response->getStatusCode()); + + return $headers; + } + + /** + * Restores a Response from the HTTP headers and body. + * + * @param array $headers An array of HTTP headers for the Response + * @param string $body The Response body + * + * @return Response + */ + private function restoreResponse($headers, $body = null) + { + $status = $headers['X-Status'][0]; + unset($headers['X-Status']); + + if (null !== $body) { + $headers['X-Body-File'] = array($body); + } + + return new Response($body, $status, $headers); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..ddc0c04ee39600f3f844d8c689f081b50edf67bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php @@ -0,0 +1,96 @@ + + * + * This code is partially based on the Rack-Cache library by Ryan Tomayko, + * which is released under the MIT license. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\HttpCache; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Interface implemented by HTTP cache stores. + * + * @author Fabien Potencier + */ +interface StoreInterface +{ + /** + * Locates a cached Response for the Request provided. + * + * @param Request $request A Request instance + * + * @return Response|null A Response instance, or null if no cache entry was found + */ + public function lookup(Request $request); + + /** + * Writes a cache entry to the store for the given Request and Response. + * + * Existing entries are read and any that match the response are removed. This + * method calls write with the new list of cache entries. + * + * @param Request $request A Request instance + * @param Response $response A Response instance + * + * @return string The key under which the response is stored + */ + public function write(Request $request, Response $response); + + /** + * Invalidates all cache entries that match the request. + * + * @param Request $request A Request instance + */ + public function invalidate(Request $request); + + /** + * Locks the cache for a given Request. + * + * @param Request $request A Request instance + * + * @return bool|string true if the lock is acquired, the path to the current lock otherwise + */ + public function lock(Request $request); + + /** + * Releases the lock for the given Request. + * + * @param Request $request A Request instance + * + * @return bool False if the lock file does not exist or cannot be unlocked, true otherwise + */ + public function unlock(Request $request); + + /** + * Returns whether or not a lock exists. + * + * @param Request $request A Request instance + * + * @return bool true if lock exists, false otherwise + */ + public function isLocked(Request $request); + + /** + * Purges data for the given URL. + * + * @param string $url A URL + * + * @return bool true if the URL exists and has been purged, false otherwise + */ + public function purge($url); + + /** + * Cleanups storage. + */ + public function cleanup(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5d65fd65a44360e09ce8054b06990cb7659aee8d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\HttpCache; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +interface SurrogateInterface +{ + /** + * Returns surrogate name. + * + * @return string + */ + public function getName(); + + /** + * Returns a new cache strategy instance. + * + * @return ResponseCacheStrategyInterface A ResponseCacheStrategyInterface instance + */ + public function createCacheStrategy(); + + /** + * Checks that at least one surrogate has Surrogate capability. + * + * @param Request $request A Request instance + * + * @return bool true if one surrogate has Surrogate capability, false otherwise + */ + public function hasSurrogateCapability(Request $request); + + /** + * Adds Surrogate-capability to the given Request. + * + * @param Request $request A Request instance + */ + public function addSurrogateCapability(Request $request); + + /** + * Adds HTTP headers to specify that the Response needs to be parsed for Surrogate. + * + * This method only adds an Surrogate HTTP header if the Response has some Surrogate tags. + * + * @param Response $response A Response instance + */ + public function addSurrogateControl(Response $response); + + /** + * Checks that the Response needs to be parsed for Surrogate tags. + * + * @param Response $response A Response instance + * + * @return bool true if the Response needs to be parsed, false otherwise + */ + public function needsParsing(Response $response); + + /** + * Renders a Surrogate tag. + * + * @param string $uri A URI + * @param string $alt An alternate URI + * @param bool $ignoreErrors Whether to ignore errors or not + * @param string $comment A comment to add as an esi:include tag + * + * @return string + */ + public function renderIncludeTag($uri, $alt = null, $ignoreErrors = true, $comment = ''); + + /** + * Replaces a Response Surrogate tags with the included resource content. + * + * @param Request $request A Request instance + * @param Response $response A Response instance + * + * @return Response + */ + public function process(Request $request, Response $response); + + /** + * Handles a Surrogate from the cache. + * + * @param HttpCache $cache An HttpCache instance + * @param string $uri The main URI + * @param string $alt An alternative URI + * @param bool $ignoreErrors Whether to ignore errors or not + * + * @return string + * + * @throws \RuntimeException + * @throws \Exception + */ + public function handle(HttpCache $cache, $uri, $alt, $ignoreErrors); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php new file mode 100644 index 0000000000000000000000000000000000000000..c63a6af832021d24df54dc113b6012fb12904c12 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php @@ -0,0 +1,299 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel; + +use Symfony\Component\HttpKernel\Controller\ArgumentResolver; +use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; +use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; +use Symfony\Component\HttpKernel\Event\FilterControllerArgumentsEvent; +use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\Event\FinishRequestEvent; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent; +use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\HttpKernel\Event\PostResponseEvent; +use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * HttpKernel notifies events to convert a Request object to a Response one. + * + * @author Fabien Potencier + */ +class HttpKernel implements HttpKernelInterface, TerminableInterface +{ + protected $dispatcher; + protected $resolver; + protected $requestStack; + private $argumentResolver; + + public function __construct(EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver, RequestStack $requestStack = null, ArgumentResolverInterface $argumentResolver = null) + { + $this->dispatcher = $dispatcher; + $this->resolver = $resolver; + $this->requestStack = $requestStack ?: new RequestStack(); + $this->argumentResolver = $argumentResolver; + + if (null === $this->argumentResolver) { + @trigger_error(sprintf('As of 3.1 an %s is used to resolve arguments. In 4.0 the $argumentResolver becomes the %s if no other is provided instead of using the $resolver argument.', ArgumentResolverInterface::class, ArgumentResolver::class), E_USER_DEPRECATED); + // fallback in case of deprecations + $this->argumentResolver = $resolver; + } + } + + /** + * {@inheritdoc} + */ + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + $request->headers->set('X-Php-Ob-Level', ob_get_level()); + + try { + return $this->handleRaw($request, $type); + } catch (\Exception $e) { + if ($e instanceof ConflictingHeadersException) { + $e = new BadRequestHttpException('The request headers contain conflicting information regarding the origin of this request.', $e); + } + if (false === $catch) { + $this->finishRequest($request, $type); + + throw $e; + } + + return $this->handleException($e, $request, $type); + } + } + + /** + * {@inheritdoc} + */ + public function terminate(Request $request, Response $response) + { + $this->dispatcher->dispatch(KernelEvents::TERMINATE, new PostResponseEvent($this, $request, $response)); + } + + /** + * @throws \LogicException If the request stack is empty + * + * @internal + */ + public function terminateWithException(\Exception $exception) + { + if (!$request = $this->requestStack->getMasterRequest()) { + throw new \LogicException('Request stack is empty', 0, $exception); + } + + $response = $this->handleException($exception, $request, self::MASTER_REQUEST); + + $response->sendHeaders(); + $response->sendContent(); + + $this->terminate($request, $response); + } + + /** + * Handles a request to convert it to a response. + * + * Exceptions are not caught. + * + * @param Request $request A Request instance + * @param int $type The type of the request (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST) + * + * @return Response A Response instance + * + * @throws \LogicException If one of the listener does not behave as expected + * @throws NotFoundHttpException When controller cannot be found + */ + private function handleRaw(Request $request, $type = self::MASTER_REQUEST) + { + $this->requestStack->push($request); + + // request + $event = new GetResponseEvent($this, $request, $type); + $this->dispatcher->dispatch(KernelEvents::REQUEST, $event); + + if ($event->hasResponse()) { + return $this->filterResponse($event->getResponse(), $request, $type); + } + + // load controller + if (false === $controller = $this->resolver->getController($request)) { + throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.', $request->getPathInfo())); + } + + $event = new FilterControllerEvent($this, $controller, $request, $type); + $this->dispatcher->dispatch(KernelEvents::CONTROLLER, $event); + $controller = $event->getController(); + + // controller arguments + $arguments = $this->argumentResolver->getArguments($request, $controller); + + $event = new FilterControllerArgumentsEvent($this, $controller, $arguments, $request, $type); + $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event); + $controller = $event->getController(); + $arguments = $event->getArguments(); + + // call controller + $response = call_user_func_array($controller, $arguments); + + // view + if (!$response instanceof Response) { + $event = new GetResponseForControllerResultEvent($this, $request, $type, $response); + $this->dispatcher->dispatch(KernelEvents::VIEW, $event); + + if ($event->hasResponse()) { + $response = $event->getResponse(); + } + + if (!$response instanceof Response) { + $msg = sprintf('The controller must return a response (%s given).', $this->varToString($response)); + + // the user may have forgotten to return something + if (null === $response) { + $msg .= ' Did you forget to add a return statement somewhere in your controller?'; + } + throw new \LogicException($msg); + } + } + + return $this->filterResponse($response, $request, $type); + } + + /** + * Filters a response object. + * + * @param Response $response A Response instance + * @param Request $request An error message in case the response is not a Response object + * @param int $type The type of the request (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST) + * + * @return Response The filtered Response instance + * + * @throws \RuntimeException if the passed object is not a Response instance + */ + private function filterResponse(Response $response, Request $request, $type) + { + $event = new FilterResponseEvent($this, $request, $type, $response); + + $this->dispatcher->dispatch(KernelEvents::RESPONSE, $event); + + $this->finishRequest($request, $type); + + return $event->getResponse(); + } + + /** + * Publishes the finish request event, then pop the request from the stack. + * + * Note that the order of the operations is important here, otherwise + * operations such as {@link RequestStack::getParentRequest()} can lead to + * weird results. + * + * @param Request $request + * @param int $type + */ + private function finishRequest(Request $request, $type) + { + $this->dispatcher->dispatch(KernelEvents::FINISH_REQUEST, new FinishRequestEvent($this, $request, $type)); + $this->requestStack->pop(); + } + + /** + * Handles an exception by trying to convert it to a Response. + * + * @param \Exception $e An \Exception instance + * @param Request $request A Request instance + * @param int $type The type of the request + * + * @return Response A Response instance + * + * @throws \Exception + */ + private function handleException(\Exception $e, $request, $type) + { + $event = new GetResponseForExceptionEvent($this, $request, $type, $e); + $this->dispatcher->dispatch(KernelEvents::EXCEPTION, $event); + + // a listener might have replaced the exception + $e = $event->getException(); + + if (!$event->hasResponse()) { + $this->finishRequest($request, $type); + + throw $e; + } + + $response = $event->getResponse(); + + // the developer asked for a specific status code + if ($response->headers->has('X-Status-Code')) { + $response->setStatusCode($response->headers->get('X-Status-Code')); + + $response->headers->remove('X-Status-Code'); + } elseif (!$response->isClientError() && !$response->isServerError() && !$response->isRedirect()) { + // ensure that we actually have an error response + if ($e instanceof HttpExceptionInterface) { + // keep the HTTP status code and headers + $response->setStatusCode($e->getStatusCode()); + $response->headers->add($e->getHeaders()); + } else { + $response->setStatusCode(500); + } + } + + try { + return $this->filterResponse($response, $request, $type); + } catch (\Exception $e) { + return $response; + } + } + + private function varToString($var) + { + if (is_object($var)) { + return sprintf('Object(%s)', get_class($var)); + } + + if (is_array($var)) { + $a = array(); + foreach ($var as $k => $v) { + $a[] = sprintf('%s => %s', $k, $this->varToString($v)); + } + + return sprintf('Array(%s)', implode(', ', $a)); + } + + if (is_resource($var)) { + return sprintf('Resource(%s)', get_resource_type($var)); + } + + if (null === $var) { + return 'null'; + } + + if (false === $var) { + return 'false'; + } + + if (true === $var) { + return 'true'; + } + + return (string) $var; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernelInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernelInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5050bfcfba7c3b1ac14ba2eab7da5a0ba213eb1e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernelInterface.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\Component\HttpKernel; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * HttpKernelInterface handles a Request to convert it to a Response. + * + * @author Fabien Potencier + */ +interface HttpKernelInterface +{ + const MASTER_REQUEST = 1; + const SUB_REQUEST = 2; + + /** + * Handles a Request to convert it to a Response. + * + * When $catch is true, the implementation must catch all exceptions + * and do its best to convert them to a Response instance. + * + * @param Request $request A Request instance + * @param int $type The type of the request + * (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST) + * @param bool $catch Whether to catch exceptions or not + * + * @return Response A Response instance + * + * @throws \Exception When an Exception occurs during processing + */ + public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php new file mode 100644 index 0000000000000000000000000000000000000000..f02c9a9cbde671c5cb59c7b70f8eb7aa988eae07 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php @@ -0,0 +1,752 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel; + +use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; +use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Dumper\PhpDumper; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\DependencyInjection\Loader\IniFileLoader; +use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use Symfony\Component\DependencyInjection\Loader\DirectoryLoader; +use Symfony\Component\DependencyInjection\Loader\ClosureLoader; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; +use Symfony\Component\HttpKernel\Config\EnvParametersResource; +use Symfony\Component\HttpKernel\Config\FileLocator; +use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass; +use Symfony\Component\HttpKernel\DependencyInjection\AddClassesToCachePass; +use Symfony\Component\Config\Loader\LoaderResolver; +use Symfony\Component\Config\Loader\DelegatingLoader; +use Symfony\Component\Config\ConfigCache; +use Symfony\Component\ClassLoader\ClassCollectionLoader; + +/** + * The Kernel is the heart of the Symfony system. + * + * It manages an environment made of bundles. + * + * @author Fabien Potencier + */ +abstract class Kernel implements KernelInterface, TerminableInterface +{ + /** + * @var BundleInterface[] + */ + protected $bundles = array(); + + protected $bundleMap; + protected $container; + protected $rootDir; + protected $environment; + protected $debug; + protected $booted = false; + protected $name; + protected $startTime; + protected $loadClassCache; + + const VERSION = '3.2.6'; + const VERSION_ID = 30206; + const MAJOR_VERSION = 3; + const MINOR_VERSION = 2; + const RELEASE_VERSION = 6; + const EXTRA_VERSION = ''; + + const END_OF_MAINTENANCE = '07/2017'; + const END_OF_LIFE = '01/2018'; + + /** + * Constructor. + * + * @param string $environment The environment + * @param bool $debug Whether to enable debugging or not + */ + public function __construct($environment, $debug) + { + $this->environment = $environment; + $this->debug = (bool) $debug; + $this->rootDir = $this->getRootDir(); + $this->name = $this->getName(); + + if ($this->debug) { + $this->startTime = microtime(true); + } + } + + public function __clone() + { + if ($this->debug) { + $this->startTime = microtime(true); + } + + $this->booted = false; + $this->container = null; + } + + /** + * Boots the current kernel. + */ + public function boot() + { + if (true === $this->booted) { + return; + } + + if ($this->loadClassCache) { + $this->doLoadClassCache($this->loadClassCache[0], $this->loadClassCache[1]); + } + + // init bundles + $this->initializeBundles(); + + // init container + $this->initializeContainer(); + + foreach ($this->getBundles() as $bundle) { + $bundle->setContainer($this->container); + $bundle->boot(); + } + + $this->booted = true; + } + + /** + * {@inheritdoc} + */ + public function terminate(Request $request, Response $response) + { + if (false === $this->booted) { + return; + } + + if ($this->getHttpKernel() instanceof TerminableInterface) { + $this->getHttpKernel()->terminate($request, $response); + } + } + + /** + * {@inheritdoc} + */ + public function shutdown() + { + if (false === $this->booted) { + return; + } + + $this->booted = false; + + foreach ($this->getBundles() as $bundle) { + $bundle->shutdown(); + $bundle->setContainer(null); + } + + $this->container = null; + } + + /** + * {@inheritdoc} + */ + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + if (false === $this->booted) { + $this->boot(); + } + + return $this->getHttpKernel()->handle($request, $type, $catch); + } + + /** + * Gets a HTTP kernel from the container. + * + * @return HttpKernel + */ + protected function getHttpKernel() + { + return $this->container->get('http_kernel'); + } + + /** + * {@inheritdoc} + */ + public function getBundles() + { + return $this->bundles; + } + + /** + * {@inheritdoc} + */ + public function getBundle($name, $first = true) + { + if (!isset($this->bundleMap[$name])) { + throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your %s.php file?', $name, get_class($this))); + } + + if (true === $first) { + return $this->bundleMap[$name][0]; + } + + return $this->bundleMap[$name]; + } + + /** + * {@inheritdoc} + * + * @throws \RuntimeException if a custom resource is hidden by a resource in a derived bundle + */ + public function locateResource($name, $dir = null, $first = true) + { + if ('@' !== $name[0]) { + throw new \InvalidArgumentException(sprintf('A resource name must start with @ ("%s" given).', $name)); + } + + if (false !== strpos($name, '..')) { + throw new \RuntimeException(sprintf('File name "%s" contains invalid characters (..).', $name)); + } + + $bundleName = substr($name, 1); + $path = ''; + if (false !== strpos($bundleName, '/')) { + list($bundleName, $path) = explode('/', $bundleName, 2); + } + + $isResource = 0 === strpos($path, 'Resources') && null !== $dir; + $overridePath = substr($path, 9); + $resourceBundle = null; + $bundles = $this->getBundle($bundleName, false); + $files = array(); + + foreach ($bundles as $bundle) { + if ($isResource && file_exists($file = $dir.'/'.$bundle->getName().$overridePath)) { + if (null !== $resourceBundle) { + throw new \RuntimeException(sprintf('"%s" resource is hidden by a resource from the "%s" derived bundle. Create a "%s" file to override the bundle resource.', + $file, + $resourceBundle, + $dir.'/'.$bundles[0]->getName().$overridePath + )); + } + + if ($first) { + return $file; + } + $files[] = $file; + } + + if (file_exists($file = $bundle->getPath().'/'.$path)) { + if ($first && !$isResource) { + return $file; + } + $files[] = $file; + $resourceBundle = $bundle->getName(); + } + } + + if (count($files) > 0) { + return $first && $isResource ? $files[0] : $files; + } + + throw new \InvalidArgumentException(sprintf('Unable to find file "%s".', $name)); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + if (null === $this->name) { + $this->name = preg_replace('/[^a-zA-Z0-9_]+/', '', basename($this->rootDir)); + if (ctype_digit($this->name[0])) { + $this->name = '_'.$this->name; + } + } + + return $this->name; + } + + /** + * {@inheritdoc} + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * {@inheritdoc} + */ + public function isDebug() + { + return $this->debug; + } + + /** + * {@inheritdoc} + */ + public function getRootDir() + { + if (null === $this->rootDir) { + $r = new \ReflectionObject($this); + $this->rootDir = dirname($r->getFileName()); + } + + return $this->rootDir; + } + + /** + * {@inheritdoc} + */ + public function getContainer() + { + return $this->container; + } + + /** + * Loads the PHP class cache. + * + * This methods only registers the fact that you want to load the cache classes. + * The cache will actually only be loaded when the Kernel is booted. + * + * That optimization is mainly useful when using the HttpCache class in which + * case the class cache is not loaded if the Response is in the cache. + * + * @param string $name The cache name prefix + * @param string $extension File extension of the resulting file + */ + public function loadClassCache($name = 'classes', $extension = '.php') + { + $this->loadClassCache = array($name, $extension); + } + + /** + * @internal + */ + public function setClassCache(array $classes) + { + file_put_contents($this->getCacheDir().'/classes.map', sprintf('getCacheDir().'/annotations.map', sprintf('debug ? $this->startTime : -INF; + } + + /** + * {@inheritdoc} + */ + public function getCacheDir() + { + return $this->rootDir.'/cache/'.$this->environment; + } + + /** + * {@inheritdoc} + */ + public function getLogDir() + { + return $this->rootDir.'/logs'; + } + + /** + * {@inheritdoc} + */ + public function getCharset() + { + return 'UTF-8'; + } + + protected function doLoadClassCache($name, $extension) + { + if (!$this->booted && is_file($this->getCacheDir().'/classes.map')) { + ClassCollectionLoader::load(include($this->getCacheDir().'/classes.map'), $this->getCacheDir(), $name, $this->debug, false, $extension); + } + } + + /** + * Initializes the data structures related to the bundle management. + * + * - the bundles property maps a bundle name to the bundle instance, + * - the bundleMap property maps a bundle name to the bundle inheritance hierarchy (most derived bundle first). + * + * @throws \LogicException if two bundles share a common name + * @throws \LogicException if a bundle tries to extend a non-registered bundle + * @throws \LogicException if a bundle tries to extend itself + * @throws \LogicException if two bundles extend the same ancestor + */ + protected function initializeBundles() + { + // init bundles + $this->bundles = array(); + $topMostBundles = array(); + $directChildren = array(); + + foreach ($this->registerBundles() as $bundle) { + $name = $bundle->getName(); + if (isset($this->bundles[$name])) { + throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s"', $name)); + } + $this->bundles[$name] = $bundle; + + if ($parentName = $bundle->getParent()) { + if (isset($directChildren[$parentName])) { + throw new \LogicException(sprintf('Bundle "%s" is directly extended by two bundles "%s" and "%s".', $parentName, $name, $directChildren[$parentName])); + } + if ($parentName == $name) { + throw new \LogicException(sprintf('Bundle "%s" can not extend itself.', $name)); + } + $directChildren[$parentName] = $name; + } else { + $topMostBundles[$name] = $bundle; + } + } + + // look for orphans + if (!empty($directChildren) && count($diff = array_diff_key($directChildren, $this->bundles))) { + $diff = array_keys($diff); + + throw new \LogicException(sprintf('Bundle "%s" extends bundle "%s", which is not registered.', $directChildren[$diff[0]], $diff[0])); + } + + // inheritance + $this->bundleMap = array(); + foreach ($topMostBundles as $name => $bundle) { + $bundleMap = array($bundle); + $hierarchy = array($name); + + while (isset($directChildren[$name])) { + $name = $directChildren[$name]; + array_unshift($bundleMap, $this->bundles[$name]); + $hierarchy[] = $name; + } + + foreach ($hierarchy as $hierarchyBundle) { + $this->bundleMap[$hierarchyBundle] = $bundleMap; + array_pop($bundleMap); + } + } + } + + /** + * Gets the container class. + * + * @return string The container class + */ + protected function getContainerClass() + { + return $this->name.ucfirst($this->environment).($this->debug ? 'Debug' : '').'ProjectContainer'; + } + + /** + * Gets the container's base class. + * + * All names except Container must be fully qualified. + * + * @return string + */ + protected function getContainerBaseClass() + { + return 'Container'; + } + + /** + * Initializes the service container. + * + * The cached version of the service container is used when fresh, otherwise the + * container is built. + */ + protected function initializeContainer() + { + $class = $this->getContainerClass(); + $cache = new ConfigCache($this->getCacheDir().'/'.$class.'.php', $this->debug); + $fresh = true; + if (!$cache->isFresh()) { + $container = $this->buildContainer(); + $container->compile(); + $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass()); + + $fresh = false; + } + + require_once $cache->getPath(); + + $this->container = new $class(); + $this->container->set('kernel', $this); + + if (!$fresh && $this->container->has('cache_warmer')) { + $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir')); + } + } + + /** + * Returns the kernel parameters. + * + * @return array An array of kernel parameters + */ + protected function getKernelParameters() + { + $bundles = array(); + $bundlesMetadata = array(); + + foreach ($this->bundles as $name => $bundle) { + $bundles[$name] = get_class($bundle); + $bundlesMetadata[$name] = array( + 'parent' => $bundle->getParent(), + 'path' => $bundle->getPath(), + 'namespace' => $bundle->getNamespace(), + ); + } + + return array_merge( + array( + 'kernel.root_dir' => realpath($this->rootDir) ?: $this->rootDir, + 'kernel.environment' => $this->environment, + 'kernel.debug' => $this->debug, + 'kernel.name' => $this->name, + 'kernel.cache_dir' => realpath($this->getCacheDir()) ?: $this->getCacheDir(), + 'kernel.logs_dir' => realpath($this->getLogDir()) ?: $this->getLogDir(), + 'kernel.bundles' => $bundles, + 'kernel.bundles_metadata' => $bundlesMetadata, + 'kernel.charset' => $this->getCharset(), + 'kernel.container_class' => $this->getContainerClass(), + ), + $this->getEnvParameters() + ); + } + + /** + * Gets the environment parameters. + * + * Only the parameters starting with "SYMFONY__" are considered. + * + * @return array An array of parameters + */ + protected function getEnvParameters() + { + $parameters = array(); + foreach ($_SERVER as $key => $value) { + if (0 === strpos($key, 'SYMFONY__')) { + $parameters[strtolower(str_replace('__', '.', substr($key, 9)))] = $value; + } + } + + return $parameters; + } + + /** + * Builds the service container. + * + * @return ContainerBuilder The compiled service container + * + * @throws \RuntimeException + */ + protected function buildContainer() + { + foreach (array('cache' => $this->getCacheDir(), 'logs' => $this->getLogDir()) as $name => $dir) { + if (!is_dir($dir)) { + if (false === @mkdir($dir, 0777, true) && !is_dir($dir)) { + throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n", $name, $dir)); + } + } elseif (!is_writable($dir)) { + throw new \RuntimeException(sprintf("Unable to write in the %s directory (%s)\n", $name, $dir)); + } + } + + $container = $this->getContainerBuilder(); + $container->addObjectResource($this); + $this->prepareContainer($container); + + if (null !== $cont = $this->registerContainerConfiguration($this->getContainerLoader($container))) { + $container->merge($cont); + } + + $container->addCompilerPass(new AddClassesToCachePass($this)); + $container->addResource(new EnvParametersResource('SYMFONY__')); + + return $container; + } + + /** + * Prepares the ContainerBuilder before it is compiled. + * + * @param ContainerBuilder $container A ContainerBuilder instance + */ + protected function prepareContainer(ContainerBuilder $container) + { + $extensions = array(); + foreach ($this->bundles as $bundle) { + if ($extension = $bundle->getContainerExtension()) { + $container->registerExtension($extension); + $extensions[] = $extension->getAlias(); + } + + if ($this->debug) { + $container->addObjectResource($bundle); + } + } + foreach ($this->bundles as $bundle) { + $bundle->build($container); + } + + // ensure these extensions are implicitly loaded + $container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions)); + } + + /** + * Gets a new ContainerBuilder instance used to build the service container. + * + * @return ContainerBuilder + */ + protected function getContainerBuilder() + { + $container = new ContainerBuilder(); + $container->getParameterBag()->add($this->getKernelParameters()); + + if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator')) { + $container->setProxyInstantiator(new RuntimeInstantiator()); + } + + return $container; + } + + /** + * Dumps the service container to PHP code in the cache. + * + * @param ConfigCache $cache The config cache + * @param ContainerBuilder $container The service container + * @param string $class The name of the class to generate + * @param string $baseClass The name of the container's base class + */ + protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, $class, $baseClass) + { + // cache the container + $dumper = new PhpDumper($container); + + if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper')) { + $dumper->setProxyDumper(new ProxyDumper(md5($cache->getPath()))); + } + + $content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass, 'file' => $cache->getPath(), 'debug' => $this->debug)); + + $cache->write($content, $container->getResources()); + } + + /** + * Returns a loader for the container. + * + * @param ContainerInterface $container The service container + * + * @return DelegatingLoader The loader + */ + protected function getContainerLoader(ContainerInterface $container) + { + $locator = new FileLocator($this); + $resolver = new LoaderResolver(array( + new XmlFileLoader($container, $locator), + new YamlFileLoader($container, $locator), + new IniFileLoader($container, $locator), + new PhpFileLoader($container, $locator), + new DirectoryLoader($container, $locator), + new ClosureLoader($container), + )); + + return new DelegatingLoader($resolver); + } + + /** + * Removes comments from a PHP source string. + * + * We don't use the PHP php_strip_whitespace() function + * as we want the content to be readable and well-formatted. + * + * @param string $source A PHP string + * + * @return string The PHP string with the comments removed + */ + public static function stripComments($source) + { + if (!function_exists('token_get_all')) { + return $source; + } + + $rawChunk = ''; + $output = ''; + $tokens = token_get_all($source); + $ignoreSpace = false; + for ($i = 0; isset($tokens[$i]); ++$i) { + $token = $tokens[$i]; + if (!isset($token[1]) || 'b"' === $token) { + $rawChunk .= $token; + } elseif (T_START_HEREDOC === $token[0]) { + $output .= $rawChunk.$token[1]; + do { + $token = $tokens[++$i]; + $output .= isset($token[1]) && 'b"' !== $token ? $token[1] : $token; + } while ($token[0] !== T_END_HEREDOC); + $rawChunk = ''; + } elseif (T_WHITESPACE === $token[0]) { + if ($ignoreSpace) { + $ignoreSpace = false; + + continue; + } + + // replace multiple new lines with a single newline + $rawChunk .= preg_replace(array('/\n{2,}/S'), "\n", $token[1]); + } elseif (in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) { + $ignoreSpace = true; + } else { + $rawChunk .= $token[1]; + + // The PHP-open tag already has a new-line + if (T_OPEN_TAG === $token[0]) { + $ignoreSpace = true; + } + } + } + + $output .= $rawChunk; + + if (PHP_VERSION_ID >= 70000) { + // PHP 7 memory manager will not release after token_get_all(), see https://bugs.php.net/70098 + unset($tokens, $rawChunk); + gc_mem_caches(); + } + + return $output; + } + + public function serialize() + { + return serialize(array($this->environment, $this->debug)); + } + + public function unserialize($data) + { + list($environment, $debug) = unserialize($data); + + $this->__construct($environment, $debug); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/KernelEvents.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/KernelEvents.php new file mode 100644 index 0000000000000000000000000000000000000000..3e961737b844e2c5461905e3622f00c98850c08e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/KernelEvents.php @@ -0,0 +1,119 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel; + +/** + * Contains all events thrown in the HttpKernel component. + * + * @author Bernhard Schussek + */ +final class KernelEvents +{ + /** + * The REQUEST event occurs at the very beginning of request + * dispatching. + * + * This event allows you to create a response for a request before any + * other code in the framework is executed. + * + * @Event("Symfony\Component\HttpKernel\Event\GetResponseEvent") + * + * @var string + */ + const REQUEST = 'kernel.request'; + + /** + * The EXCEPTION event occurs when an uncaught exception appears. + * + * This event allows you to create a response for a thrown exception or + * to modify the thrown exception. + * + * @Event("Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent") + * + * @var string + */ + const EXCEPTION = 'kernel.exception'; + + /** + * The VIEW event occurs when the return value of a controller + * is not a Response instance. + * + * This event allows you to create a response for the return value of the + * controller. + * + * @Event("Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent") + * + * @var string + */ + const VIEW = 'kernel.view'; + + /** + * The CONTROLLER event occurs once a controller was found for + * handling a request. + * + * This event allows you to change the controller that will handle the + * request. + * + * @Event("Symfony\Component\HttpKernel\Event\FilterControllerEvent") + * + * @var string + */ + const CONTROLLER = 'kernel.controller'; + + /** + * The CONTROLLER_ARGUMENTS event occurs once controller arguments have been resolved. + * + * This event allows you to change the arguments that will be passed to + * the controller. + * + * @Event("Symfony\Component\HttpKernel\Event\FilterControllerArgumentsEvent") + * + * @var string + */ + const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments'; + + /** + * The RESPONSE event occurs once a response was created for + * replying to a request. + * + * This event allows you to modify or replace the response that will be + * replied. + * + * @Event("Symfony\Component\HttpKernel\Event\FilterResponseEvent") + * + * @var string + */ + const RESPONSE = 'kernel.response'; + + /** + * The TERMINATE event occurs once a response was sent. + * + * This event allows you to run expensive post-response jobs. + * + * @Event("Symfony\Component\HttpKernel\Event\PostResponseEvent") + * + * @var string + */ + const TERMINATE = 'kernel.terminate'; + + /** + * The FINISH_REQUEST event occurs when a response was generated for a request. + * + * This event allows you to reset the global and environmental state of + * the application, when it was changed during the request. + * + * @Event("Symfony\Component\HttpKernel\Event\FinishRequestEvent") + * + * @var string + */ + const FINISH_REQUEST = 'kernel.finish_request'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/KernelInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/KernelInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d7308ae5e0c1458d3b561af73252908e3bf2a761 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/KernelInterface.php @@ -0,0 +1,164 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; +use Symfony\Component\Config\Loader\LoaderInterface; + +/** + * The Kernel is the heart of the Symfony system. + * + * It manages an environment made of bundles. + * + * @author Fabien Potencier + */ +interface KernelInterface extends HttpKernelInterface, \Serializable +{ + /** + * Returns an array of bundles to register. + * + * @return BundleInterface[] An array of bundle instances + */ + public function registerBundles(); + + /** + * Loads the container configuration. + * + * @param LoaderInterface $loader A LoaderInterface instance + */ + public function registerContainerConfiguration(LoaderInterface $loader); + + /** + * Boots the current kernel. + */ + public function boot(); + + /** + * Shutdowns the kernel. + * + * This method is mainly useful when doing functional testing. + */ + public function shutdown(); + + /** + * Gets the registered bundle instances. + * + * @return BundleInterface[] An array of registered bundle instances + */ + public function getBundles(); + + /** + * Returns a bundle and optionally its descendants by its name. + * + * @param string $name Bundle name + * @param bool $first Whether to return the first bundle only or together with its descendants + * + * @return BundleInterface|BundleInterface[] A BundleInterface instance or an array of BundleInterface instances if $first is false + * + * @throws \InvalidArgumentException when the bundle is not enabled + */ + public function getBundle($name, $first = true); + + /** + * Returns the file path for a given resource. + * + * A Resource can be a file or a directory. + * + * The resource name must follow the following pattern: + * + * "@BundleName/path/to/a/file.something" + * + * where BundleName is the name of the bundle + * and the remaining part is the relative path in the bundle. + * + * If $dir is passed, and the first segment of the path is "Resources", + * this method will look for a file named: + * + * $dir//path/without/Resources + * + * before looking in the bundle resource folder. + * + * @param string $name A resource name to locate + * @param string $dir A directory where to look for the resource first + * @param bool $first Whether to return the first path or paths for all matching bundles + * + * @return string|array The absolute path of the resource or an array if $first is false + * + * @throws \InvalidArgumentException if the file cannot be found or the name is not valid + * @throws \RuntimeException if the name contains invalid/unsafe characters + */ + public function locateResource($name, $dir = null, $first = true); + + /** + * Gets the name of the kernel. + * + * @return string The kernel name + */ + public function getName(); + + /** + * Gets the environment. + * + * @return string The current environment + */ + public function getEnvironment(); + + /** + * Checks if debug mode is enabled. + * + * @return bool true if debug mode is enabled, false otherwise + */ + public function isDebug(); + + /** + * Gets the application root dir. + * + * @return string The application root dir + */ + public function getRootDir(); + + /** + * Gets the current container. + * + * @return ContainerInterface A ContainerInterface instance + */ + public function getContainer(); + + /** + * Gets the request start time (not available if debug is disabled). + * + * @return int The request start timestamp + */ + public function getStartTime(); + + /** + * Gets the cache directory. + * + * @return string The cache directory + */ + public function getCacheDir(); + + /** + * Gets the log directory. + * + * @return string The log directory + */ + public function getLogDir(); + + /** + * Gets the charset of the application. + * + * @return string The charset + */ + public function getCharset(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5635a2184f007a600cda22fc5576afea27f3c59f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Log; + +/** + * DebugLoggerInterface. + * + * @author Fabien Potencier + */ +interface DebugLoggerInterface +{ + /** + * Returns an array of logs. + * + * A log is an array with the following mandatory keys: + * timestamp, message, priority, and priorityName. + * It can also have an optional context key containing an array. + * + * @return array An array of logs + */ + public function getLogs(); + + /** + * Returns the number of errors. + * + * @return int The number of errors + */ + public function countErrors(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php new file mode 100644 index 0000000000000000000000000000000000000000..bd8761f5dd8a85d4d5f2ec24cb90c087415b8b56 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php @@ -0,0 +1,284 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Profiler; + +/** + * Storage for profiler using files. + * + * @author Alexandre Salomé + */ +class FileProfilerStorage implements ProfilerStorageInterface +{ + /** + * Folder where profiler data are stored. + * + * @var string + */ + private $folder; + + /** + * Constructs the file storage using a "dsn-like" path. + * + * Example : "file:/path/to/the/storage/folder" + * + * @param string $dsn The DSN + * + * @throws \RuntimeException + */ + public function __construct($dsn) + { + if (0 !== strpos($dsn, 'file:')) { + throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use FileStorage with an invalid dsn "%s". The expected format is "file:/path/to/the/storage/folder".', $dsn)); + } + $this->folder = substr($dsn, 5); + + if (!is_dir($this->folder) && false === @mkdir($this->folder, 0777, true) && !is_dir($this->folder)) { + throw new \RuntimeException(sprintf('Unable to create the storage directory (%s).', $this->folder)); + } + } + + /** + * {@inheritdoc} + */ + public function find($ip, $url, $limit, $method, $start = null, $end = null, $statusCode = null) + { + $file = $this->getIndexFilename(); + + if (!file_exists($file)) { + return array(); + } + + $file = fopen($file, 'r'); + fseek($file, 0, SEEK_END); + + $result = array(); + while (count($result) < $limit && $line = $this->readLineFromFile($file)) { + $values = str_getcsv($line); + list($csvToken, $csvIp, $csvMethod, $csvUrl, $csvTime, $csvParent, $csvStatusCode) = $values; + $csvTime = (int) $csvTime; + + if ($ip && false === strpos($csvIp, $ip) || $url && false === strpos($csvUrl, $url) || $method && false === strpos($csvMethod, $method) || $statusCode && false === strpos($csvStatusCode, $statusCode)) { + continue; + } + + if (!empty($start) && $csvTime < $start) { + continue; + } + + if (!empty($end) && $csvTime > $end) { + continue; + } + + $result[$csvToken] = array( + 'token' => $csvToken, + 'ip' => $csvIp, + 'method' => $csvMethod, + 'url' => $csvUrl, + 'time' => $csvTime, + 'parent' => $csvParent, + 'status_code' => $csvStatusCode, + ); + } + + fclose($file); + + return array_values($result); + } + + /** + * {@inheritdoc} + */ + public function purge() + { + $flags = \FilesystemIterator::SKIP_DOTS; + $iterator = new \RecursiveDirectoryIterator($this->folder, $flags); + $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST); + + foreach ($iterator as $file) { + if (is_file($file)) { + unlink($file); + } else { + rmdir($file); + } + } + } + + /** + * {@inheritdoc} + */ + public function read($token) + { + if (!$token || !file_exists($file = $this->getFilename($token))) { + return; + } + + return $this->createProfileFromData($token, unserialize(file_get_contents($file))); + } + + /** + * {@inheritdoc} + * + * @throws \RuntimeException + */ + public function write(Profile $profile) + { + $file = $this->getFilename($profile->getToken()); + + $profileIndexed = is_file($file); + if (!$profileIndexed) { + // Create directory + $dir = dirname($file); + if (!is_dir($dir) && false === @mkdir($dir, 0777, true) && !is_dir($dir)) { + throw new \RuntimeException(sprintf('Unable to create the storage directory (%s).', $dir)); + } + } + + // Store profile + $data = array( + 'token' => $profile->getToken(), + 'parent' => $profile->getParentToken(), + 'children' => array_map(function ($p) { return $p->getToken(); }, $profile->getChildren()), + 'data' => $profile->getCollectors(), + 'ip' => $profile->getIp(), + 'method' => $profile->getMethod(), + 'url' => $profile->getUrl(), + 'time' => $profile->getTime(), + 'status_code' => $profile->getStatusCode(), + ); + + if (false === file_put_contents($file, serialize($data))) { + return false; + } + + if (!$profileIndexed) { + // Add to index + if (false === $file = fopen($this->getIndexFilename(), 'a')) { + return false; + } + + fputcsv($file, array( + $profile->getToken(), + $profile->getIp(), + $profile->getMethod(), + $profile->getUrl(), + $profile->getTime(), + $profile->getParentToken(), + $profile->getStatusCode(), + )); + fclose($file); + } + + return true; + } + + /** + * Gets filename to store data, associated to the token. + * + * @param string $token + * + * @return string The profile filename + */ + protected function getFilename($token) + { + // Uses 4 last characters, because first are mostly the same. + $folderA = substr($token, -2, 2); + $folderB = substr($token, -4, 2); + + return $this->folder.'/'.$folderA.'/'.$folderB.'/'.$token; + } + + /** + * Gets the index filename. + * + * @return string The index filename + */ + protected function getIndexFilename() + { + return $this->folder.'/index.csv'; + } + + /** + * Reads a line in the file, backward. + * + * This function automatically skips the empty lines and do not include the line return in result value. + * + * @param resource $file The file resource, with the pointer placed at the end of the line to read + * + * @return mixed A string representing the line or null if beginning of file is reached + */ + protected function readLineFromFile($file) + { + $line = ''; + $position = ftell($file); + + if (0 === $position) { + return; + } + + while (true) { + $chunkSize = min($position, 1024); + $position -= $chunkSize; + fseek($file, $position); + + if (0 === $chunkSize) { + // bof reached + break; + } + + $buffer = fread($file, $chunkSize); + + if (false === ($upTo = strrpos($buffer, "\n"))) { + $line = $buffer.$line; + continue; + } + + $position += $upTo; + $line = substr($buffer, $upTo + 1).$line; + fseek($file, max(0, $position), SEEK_SET); + + if ('' !== $line) { + break; + } + } + + return '' === $line ? null : $line; + } + + protected function createProfileFromData($token, $data, $parent = null) + { + $profile = new Profile($token); + $profile->setIp($data['ip']); + $profile->setMethod($data['method']); + $profile->setUrl($data['url']); + $profile->setTime($data['time']); + $profile->setStatusCode($data['status_code']); + $profile->setCollectors($data['data']); + + if (!$parent && $data['parent']) { + $parent = $this->read($data['parent']); + } + + if ($parent) { + $profile->setParent($parent); + } + + foreach ($data['children'] as $token) { + if (!$token || !file_exists($file = $this->getFilename($token))) { + continue; + } + + $profile->addChild($this->createProfileFromData($token, unserialize(file_get_contents($file)), $profile)); + } + + return $profile; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profile.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profile.php new file mode 100644 index 0000000000000000000000000000000000000000..18070d0602c06ca34b84a0d284486d6e4cb68e3d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profile.php @@ -0,0 +1,292 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Profiler; + +use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; + +/** + * Profile. + * + * @author Fabien Potencier + */ +class Profile +{ + private $token; + + /** + * @var DataCollectorInterface[] + */ + private $collectors = array(); + + private $ip; + private $method; + private $url; + private $time; + private $statusCode; + + /** + * @var Profile + */ + private $parent; + + /** + * @var Profile[] + */ + private $children = array(); + + /** + * Constructor. + * + * @param string $token The token + */ + public function __construct($token) + { + $this->token = $token; + } + + /** + * Sets the token. + * + * @param string $token The token + */ + public function setToken($token) + { + $this->token = $token; + } + + /** + * Gets the token. + * + * @return string The token + */ + public function getToken() + { + return $this->token; + } + + /** + * Sets the parent token. + * + * @param Profile $parent + */ + public function setParent(Profile $parent) + { + $this->parent = $parent; + } + + /** + * Returns the parent profile. + * + * @return self + */ + public function getParent() + { + return $this->parent; + } + + /** + * Returns the parent token. + * + * @return null|string The parent token + */ + public function getParentToken() + { + return $this->parent ? $this->parent->getToken() : null; + } + + /** + * Returns the IP. + * + * @return string The IP + */ + public function getIp() + { + return $this->ip; + } + + /** + * Sets the IP. + * + * @param string $ip + */ + public function setIp($ip) + { + $this->ip = $ip; + } + + /** + * Returns the request method. + * + * @return string The request method + */ + public function getMethod() + { + return $this->method; + } + + public function setMethod($method) + { + $this->method = $method; + } + + /** + * Returns the URL. + * + * @return string The URL + */ + public function getUrl() + { + return $this->url; + } + + public function setUrl($url) + { + $this->url = $url; + } + + /** + * Returns the time. + * + * @return string The time + */ + public function getTime() + { + if (null === $this->time) { + return 0; + } + + return $this->time; + } + + public function setTime($time) + { + $this->time = $time; + } + + /** + * @param int $statusCode + */ + public function setStatusCode($statusCode) + { + $this->statusCode = $statusCode; + } + + /** + * @return int + */ + public function getStatusCode() + { + return $this->statusCode; + } + + /** + * Finds children profilers. + * + * @return self[] + */ + public function getChildren() + { + return $this->children; + } + + /** + * Sets children profiler. + * + * @param Profile[] $children + */ + public function setChildren(array $children) + { + $this->children = array(); + foreach ($children as $child) { + $this->addChild($child); + } + } + + /** + * Adds the child token. + * + * @param Profile $child + */ + public function addChild(Profile $child) + { + $this->children[] = $child; + $child->setParent($this); + } + + /** + * Gets a Collector by name. + * + * @param string $name A collector name + * + * @return DataCollectorInterface A DataCollectorInterface instance + * + * @throws \InvalidArgumentException if the collector does not exist + */ + public function getCollector($name) + { + if (!isset($this->collectors[$name])) { + throw new \InvalidArgumentException(sprintf('Collector "%s" does not exist.', $name)); + } + + return $this->collectors[$name]; + } + + /** + * Gets the Collectors associated with this profile. + * + * @return DataCollectorInterface[] + */ + public function getCollectors() + { + return $this->collectors; + } + + /** + * Sets the Collectors associated with this profile. + * + * @param DataCollectorInterface[] $collectors + */ + public function setCollectors(array $collectors) + { + $this->collectors = array(); + foreach ($collectors as $collector) { + $this->addCollector($collector); + } + } + + /** + * Adds a Collector. + * + * @param DataCollectorInterface $collector A DataCollectorInterface instance + */ + public function addCollector(DataCollectorInterface $collector) + { + $this->collectors[$collector->getName()] = $collector; + } + + /** + * Returns true if a Collector for the given name exists. + * + * @param string $name A collector name + * + * @return bool + */ + public function hasCollector($name) + { + return isset($this->collectors[$name]); + } + + public function __sleep() + { + return array('token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profiler.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profiler.php new file mode 100644 index 0000000000000000000000000000000000000000..f31e243770cbf35bc8f8f37fc3230306bd7f5374 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profiler.php @@ -0,0 +1,270 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Profiler; + +use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; +use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; +use Psr\Log\LoggerInterface; + +/** + * Profiler. + * + * @author Fabien Potencier + */ +class Profiler +{ + /** + * @var ProfilerStorageInterface + */ + private $storage; + + /** + * @var DataCollectorInterface[] + */ + private $collectors = array(); + + /** + * @var LoggerInterface + */ + private $logger; + + /** + * @var bool + */ + private $enabled = true; + + /** + * Constructor. + * + * @param ProfilerStorageInterface $storage A ProfilerStorageInterface instance + * @param LoggerInterface $logger A LoggerInterface instance + */ + public function __construct(ProfilerStorageInterface $storage, LoggerInterface $logger = null) + { + $this->storage = $storage; + $this->logger = $logger; + } + + /** + * Disables the profiler. + */ + public function disable() + { + $this->enabled = false; + } + + /** + * Enables the profiler. + */ + public function enable() + { + $this->enabled = true; + } + + /** + * Loads the Profile for the given Response. + * + * @param Response $response A Response instance + * + * @return Profile|false A Profile instance + */ + public function loadProfileFromResponse(Response $response) + { + if (!$token = $response->headers->get('X-Debug-Token')) { + return false; + } + + return $this->loadProfile($token); + } + + /** + * Loads the Profile for the given token. + * + * @param string $token A token + * + * @return Profile A Profile instance + */ + public function loadProfile($token) + { + return $this->storage->read($token); + } + + /** + * Saves a Profile. + * + * @param Profile $profile A Profile instance + * + * @return bool + */ + public function saveProfile(Profile $profile) + { + // late collect + foreach ($profile->getCollectors() as $collector) { + if ($collector instanceof LateDataCollectorInterface) { + $collector->lateCollect(); + } + } + + if (!($ret = $this->storage->write($profile)) && null !== $this->logger) { + $this->logger->warning('Unable to store the profiler information.', array('configured_storage' => get_class($this->storage))); + } + + return $ret; + } + + /** + * Purges all data from the storage. + */ + public function purge() + { + $this->storage->purge(); + } + + /** + * Finds profiler tokens for the given criteria. + * + * @param string $ip The IP + * @param string $url The URL + * @param string $limit The maximum number of tokens to return + * @param string $method The request method + * @param string $start The start date to search from + * @param string $end The end date to search to + * @param string $statusCode The request status code + * + * @return array An array of tokens + * + * @see http://php.net/manual/en/datetime.formats.php for the supported date/time formats + */ + public function find($ip, $url, $limit, $method, $start, $end, $statusCode = null) + { + return $this->storage->find($ip, $url, $limit, $method, $this->getTimestamp($start), $this->getTimestamp($end), $statusCode); + } + + /** + * Collects data for the given Response. + * + * @param Request $request A Request instance + * @param Response $response A Response instance + * @param \Exception $exception An exception instance if the request threw one + * + * @return Profile|null A Profile instance or null if the profiler is disabled + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + if (false === $this->enabled) { + return; + } + + $profile = new Profile(substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6)); + $profile->setTime(time()); + $profile->setUrl($request->getUri()); + $profile->setMethod($request->getMethod()); + $profile->setStatusCode($response->getStatusCode()); + try { + $profile->setIp($request->getClientIp()); + } catch (ConflictingHeadersException $e) { + $profile->setIp('Unknown'); + } + + $response->headers->set('X-Debug-Token', $profile->getToken()); + + foreach ($this->collectors as $collector) { + $collector->collect($request, $response, $exception); + + // we need to clone for sub-requests + $profile->addCollector(clone $collector); + } + + return $profile; + } + + /** + * Gets the Collectors associated with this profiler. + * + * @return array An array of collectors + */ + public function all() + { + return $this->collectors; + } + + /** + * Sets the Collectors associated with this profiler. + * + * @param DataCollectorInterface[] $collectors An array of collectors + */ + public function set(array $collectors = array()) + { + $this->collectors = array(); + foreach ($collectors as $collector) { + $this->add($collector); + } + } + + /** + * Adds a Collector. + * + * @param DataCollectorInterface $collector A DataCollectorInterface instance + */ + public function add(DataCollectorInterface $collector) + { + $this->collectors[$collector->getName()] = $collector; + } + + /** + * Returns true if a Collector for the given name exists. + * + * @param string $name A collector name + * + * @return bool + */ + public function has($name) + { + return isset($this->collectors[$name]); + } + + /** + * Gets a Collector by name. + * + * @param string $name A collector name + * + * @return DataCollectorInterface A DataCollectorInterface instance + * + * @throws \InvalidArgumentException if the collector does not exist + */ + public function get($name) + { + if (!isset($this->collectors[$name])) { + throw new \InvalidArgumentException(sprintf('Collector "%s" does not exist.', $name)); + } + + return $this->collectors[$name]; + } + + private function getTimestamp($value) + { + if (null === $value || '' == $value) { + return; + } + + try { + $value = new \DateTime(is_numeric($value) ? '@'.$value : $value); + } catch (\Exception $e) { + return; + } + + return $value->getTimestamp(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..ea72af2314f6fc45e819d07234711c8c1e7f701c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Profiler; + +/** + * ProfilerStorageInterface. + * + * @author Fabien Potencier + */ +interface ProfilerStorageInterface +{ + /** + * Finds profiler tokens for the given criteria. + * + * @param string $ip The IP + * @param string $url The URL + * @param string $limit The maximum number of tokens to return + * @param string $method The request method + * @param int|null $start The start date to search from + * @param int|null $end The end date to search to + * + * @return array An array of tokens + */ + public function find($ip, $url, $limit, $method, $start = null, $end = null); + + /** + * Reads data associated with the given token. + * + * The method returns false if the token does not exist in the storage. + * + * @param string $token A token + * + * @return Profile The profile associated with token + */ + public function read($token); + + /** + * Saves a Profile. + * + * @param Profile $profile A Profile instance + * + * @return bool Write operation successful + */ + public function write(Profile $profile); + + /** + * Purges all data from the database. + */ + public function purge(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/README.md b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/README.md new file mode 100644 index 0000000000000000000000000000000000000000..cc5e74b6bca3bc4277de7ee05b0bb74aa3835940 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/README.md @@ -0,0 +1,16 @@ +HttpKernel Component +==================== + +The HttpKernel component provides a structured process for converting a Request +into a Response by making use of the EventDispatcher component. It's flexible +enough to create a full-stack framework (Symfony), a micro-framework (Silex) or +an advanced CMS system (Drupal). + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/http_kernel/index.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/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/TerminableInterface.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/TerminableInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d55a15b87ef2ec4126c39f9184047a946db39d04 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/TerminableInterface.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Terminable extends the Kernel request/response cycle with dispatching a post + * response event after sending the response and before shutting down the kernel. + * + * @author Jordi Boggiano + * @author Pierre Minnieur + */ +interface TerminableInterface +{ + /** + * Terminates a request/response cycle. + * + * Should be called after sending the response and before shutting down the kernel. + * + * @param Request $request A Request instance + * @param Response $response A Response instance + */ + public function terminate(Request $request, Response $response); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..eeefccab81dd0d99deabaef9e1628d4143f46937 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Bundle; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionNotValidBundle\ExtensionNotValidBundle; +use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\ExtensionPresentBundle; +use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle\ExtensionAbsentBundle; +use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand; + +class BundleTest extends TestCase +{ + public function testGetContainerExtension() + { + $bundle = new ExtensionPresentBundle(); + + $this->assertInstanceOf( + 'Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\DependencyInjection\ExtensionPresentExtension', + $bundle->getContainerExtension() + ); + } + + public function testRegisterCommands() + { + $cmd = new FooCommand(); + $app = $this->getMockBuilder('Symfony\Component\Console\Application')->getMock(); + $app->expects($this->once())->method('add')->with($this->equalTo($cmd)); + + $bundle = new ExtensionPresentBundle(); + $bundle->registerCommands($app); + + $bundle2 = new ExtensionAbsentBundle(); + + $this->assertNull($bundle2->registerCommands($app)); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface + */ + public function testGetContainerExtensionWithInvalidClass() + { + $bundle = new ExtensionNotValidBundle(); + $bundle->getContainerExtension(); + } + + public function testHttpKernelRegisterCommandsIgnoresCommandsThatAreRegisteredAsServices() + { + $container = new ContainerBuilder(); + $container->register('console.command.symfony_component_httpkernel_tests_fixtures_extensionpresentbundle_command_foocommand', 'Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand'); + + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->getMock(); + // add() is never called when the found command classes are already registered as services + $application->expects($this->never())->method('add'); + + $bundle = new ExtensionPresentBundle(); + $bundle->setContainer($container); + $bundle->registerCommands($application); + } + + public function testBundleNameIsGuessedFromClass() + { + $bundle = new GuessedNameBundle(); + + $this->assertSame('Symfony\Component\HttpKernel\Tests\Bundle', $bundle->getNamespace()); + $this->assertSame('GuessedNameBundle', $bundle->getName()); + } + + public function testBundleNameCanBeExplicitlyProvided() + { + $bundle = new NamedBundle(); + + $this->assertSame('ExplicitlyNamedBundle', $bundle->getName()); + $this->assertSame('Symfony\Component\HttpKernel\Tests\Bundle', $bundle->getNamespace()); + $this->assertSame('ExplicitlyNamedBundle', $bundle->getName()); + } +} + +class NamedBundle extends Bundle +{ + public function __construct() + { + $this->name = 'ExplicitlyNamedBundle'; + } +} + +class GuessedNameBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1bc853349f230cc10a6d7a21aa104825e5a5de0b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.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\Component\HttpKernel\Tests\CacheClearer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer; + +class ChainCacheClearerTest extends TestCase +{ + protected static $cacheDir; + + public static function setUpBeforeClass() + { + self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf2_cache_clearer_dir'); + } + + public static function tearDownAfterClass() + { + @unlink(self::$cacheDir); + } + + public function testInjectClearersInConstructor() + { + $clearer = $this->getMockClearer(); + $clearer + ->expects($this->once()) + ->method('clear'); + + $chainClearer = new ChainCacheClearer(array($clearer)); + $chainClearer->clear(self::$cacheDir); + } + + public function testInjectClearerUsingAdd() + { + $clearer = $this->getMockClearer(); + $clearer + ->expects($this->once()) + ->method('clear'); + + $chainClearer = new ChainCacheClearer(); + $chainClearer->add($clearer); + $chainClearer->clear(self::$cacheDir); + } + + protected function getMockClearer() + { + return $this->getMockBuilder('Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface')->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d07ade303f10711789e291c8d6a662dc2cecb00a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\CacheWarmer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate; + +class CacheWarmerAggregateTest extends TestCase +{ + protected static $cacheDir; + + public static function setUpBeforeClass() + { + self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf2_cache_warmer_dir'); + } + + public static function tearDownAfterClass() + { + @unlink(self::$cacheDir); + } + + public function testInjectWarmersUsingConstructor() + { + $warmer = $this->getCacheWarmerMock(); + $warmer + ->expects($this->once()) + ->method('warmUp'); + $aggregate = new CacheWarmerAggregate(array($warmer)); + $aggregate->warmUp(self::$cacheDir); + } + + public function testInjectWarmersUsingAdd() + { + $warmer = $this->getCacheWarmerMock(); + $warmer + ->expects($this->once()) + ->method('warmUp'); + $aggregate = new CacheWarmerAggregate(); + $aggregate->add($warmer); + $aggregate->warmUp(self::$cacheDir); + } + + public function testInjectWarmersUsingSetWarmers() + { + $warmer = $this->getCacheWarmerMock(); + $warmer + ->expects($this->once()) + ->method('warmUp'); + $aggregate = new CacheWarmerAggregate(); + $aggregate->setWarmers(array($warmer)); + $aggregate->warmUp(self::$cacheDir); + } + + public function testWarmupDoesCallWarmupOnOptionalWarmersWhenEnableOptionalWarmersIsEnabled() + { + $warmer = $this->getCacheWarmerMock(); + $warmer + ->expects($this->never()) + ->method('isOptional'); + $warmer + ->expects($this->once()) + ->method('warmUp'); + + $aggregate = new CacheWarmerAggregate(array($warmer)); + $aggregate->enableOptionalWarmers(); + $aggregate->warmUp(self::$cacheDir); + } + + public function testWarmupDoesNotCallWarmupOnOptionalWarmersWhenEnableOptionalWarmersIsNotEnabled() + { + $warmer = $this->getCacheWarmerMock(); + $warmer + ->expects($this->once()) + ->method('isOptional') + ->will($this->returnValue(true)); + $warmer + ->expects($this->never()) + ->method('warmUp'); + + $aggregate = new CacheWarmerAggregate(array($warmer)); + $aggregate->warmUp(self::$cacheDir); + } + + protected function getCacheWarmerMock() + { + $warmer = $this->getMockBuilder('Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface') + ->disableOriginalConstructor() + ->getMock(); + + return $warmer; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..05666cb0dcdc7570da7b8e8f55c48def351f3d3a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\CacheWarmer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmer; + +class CacheWarmerTest extends TestCase +{ + protected static $cacheFile; + + public static function setUpBeforeClass() + { + self::$cacheFile = tempnam(sys_get_temp_dir(), 'sf2_cache_warmer_dir'); + } + + public static function tearDownAfterClass() + { + @unlink(self::$cacheFile); + } + + public function testWriteCacheFileCreatesTheFile() + { + $warmer = new TestCacheWarmer(self::$cacheFile); + $warmer->warmUp(dirname(self::$cacheFile)); + + $this->assertFileExists(self::$cacheFile); + } + + /** + * @expectedException \RuntimeException + */ + public function testWriteNonWritableCacheFileThrowsARuntimeException() + { + $nonWritableFile = '/this/file/is/very/probably/not/writable'; + $warmer = new TestCacheWarmer($nonWritableFile); + $warmer->warmUp(dirname($nonWritableFile)); + } +} + +class TestCacheWarmer extends CacheWarmer +{ + protected $file; + + public function __construct($file) + { + $this->file = $file; + } + + public function warmUp($cacheDir) + { + $this->writeCacheFile($this->file, 'content'); + } + + public function isOptional() + { + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ClientTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ClientTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5ce7fb44d2aa2d1dd93cc3e1a3a0d59be238bfe6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ClientTest.php @@ -0,0 +1,205 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\Client; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\StreamedResponse; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\HttpKernel\Tests\Fixtures\TestClient; + +/** + * @group time-sensitive + */ +class ClientTest extends TestCase +{ + public function testDoRequest() + { + $client = new Client(new TestHttpKernel()); + + $client->request('GET', '/'); + $this->assertEquals('Request: /', $client->getResponse()->getContent(), '->doRequest() uses the request handler to make the request'); + $this->assertInstanceOf('Symfony\Component\BrowserKit\Request', $client->getInternalRequest()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Request', $client->getRequest()); + $this->assertInstanceOf('Symfony\Component\BrowserKit\Response', $client->getInternalResponse()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Response', $client->getResponse()); + + $client->request('GET', 'http://www.example.com/'); + $this->assertEquals('Request: /', $client->getResponse()->getContent(), '->doRequest() uses the request handler to make the request'); + $this->assertEquals('www.example.com', $client->getRequest()->getHost(), '->doRequest() uses the request handler to make the request'); + + $client->request('GET', 'http://www.example.com/?parameter=http://google.com'); + $this->assertEquals('http://www.example.com/?parameter='.urlencode('http://google.com'), $client->getRequest()->getUri(), '->doRequest() uses the request handler to make the request'); + } + + public function testGetScript() + { + $client = new TestClient(new TestHttpKernel()); + $client->insulate(); + $client->request('GET', '/'); + + $this->assertEquals('Request: /', $client->getResponse()->getContent(), '->getScript() returns a script that uses the request handler to make the request'); + } + + public function testFilterResponseConvertsCookies() + { + $client = new Client(new TestHttpKernel()); + + $r = new \ReflectionObject($client); + $m = $r->getMethod('filterResponse'); + $m->setAccessible(true); + + $expected31 = array( + 'foo=bar; expires=Sun, 15 Feb 2009 20:00:00 GMT; domain=http://example.com; path=/foo; secure; httponly', + 'foo1=bar1; expires=Sun, 15 Feb 2009 20:00:00 GMT; domain=http://example.com; path=/foo; secure; httponly', + ); + $expected33 = array( + 'foo=bar; expires=Sun, 15-Feb-2009 20:00:00 GMT; max-age='.(strtotime('Sun, 15-Feb-2009 20:00:00 GMT') - time()).'; path=/foo; domain=http://example.com; secure; httponly', + 'foo1=bar1; expires=Sun, 15-Feb-2009 20:00:00 GMT; max-age='.(strtotime('Sun, 15-Feb-2009 20:00:00 GMT') - time()).'; path=/foo; domain=http://example.com; secure; httponly', + ); + + $response = new Response(); + $response->headers->setCookie(new Cookie('foo', 'bar', \DateTime::createFromFormat('j-M-Y H:i:s T', '15-Feb-2009 20:00:00 GMT')->format('U'), '/foo', 'http://example.com', true, true)); + $domResponse = $m->invoke($client, $response); + try { + $this->assertEquals($expected31[0], $domResponse->getHeader('Set-Cookie')); + } catch (\PHPUnit\Framework\ExpectationFailedException $e) { + $this->assertEquals($expected33[0], $domResponse->getHeader('Set-Cookie')); + } catch (\PHPUnit_Framework_ExpectationFailedException $e) { + $this->assertEquals($expected33[0], $domResponse->getHeader('Set-Cookie')); + } + + $response = new Response(); + $response->headers->setCookie(new Cookie('foo', 'bar', \DateTime::createFromFormat('j-M-Y H:i:s T', '15-Feb-2009 20:00:00 GMT')->format('U'), '/foo', 'http://example.com', true, true)); + $response->headers->setCookie(new Cookie('foo1', 'bar1', \DateTime::createFromFormat('j-M-Y H:i:s T', '15-Feb-2009 20:00:00 GMT')->format('U'), '/foo', 'http://example.com', true, true)); + $domResponse = $m->invoke($client, $response); + try { + $this->assertEquals($expected31[0], $domResponse->getHeader('Set-Cookie')); + } catch (\PHPUnit\Framework\ExpectationFailedException $e) { + $this->assertEquals($expected33[0], $domResponse->getHeader('Set-Cookie')); + } catch (\PHPUnit_Framework_ExpectationFailedException $e) { + $this->assertEquals($expected33[0], $domResponse->getHeader('Set-Cookie')); + } + try { + $this->assertEquals($expected31, $domResponse->getHeader('Set-Cookie', false)); + } catch (\PHPUnit\Framework\ExpectationFailedException $e) { + $this->assertEquals($expected33, $domResponse->getHeader('Set-Cookie', false)); + } catch (\PHPUnit_Framework_ExpectationFailedException $e) { + $this->assertEquals($expected33, $domResponse->getHeader('Set-Cookie', false)); + } + } + + public function testFilterResponseSupportsStreamedResponses() + { + $client = new Client(new TestHttpKernel()); + + $r = new \ReflectionObject($client); + $m = $r->getMethod('filterResponse'); + $m->setAccessible(true); + + $response = new StreamedResponse(function () { + echo 'foo'; + }); + + $domResponse = $m->invoke($client, $response); + $this->assertEquals('foo', $domResponse->getContent()); + } + + public function testUploadedFile() + { + $source = tempnam(sys_get_temp_dir(), 'source'); + $target = sys_get_temp_dir().'/sf.moved.file'; + @unlink($target); + + $kernel = new TestHttpKernel(); + $client = new Client($kernel); + + $files = array( + array('tmp_name' => $source, 'name' => 'original', 'type' => 'mime/original', 'size' => 123, 'error' => UPLOAD_ERR_OK), + new UploadedFile($source, 'original', 'mime/original', 123, UPLOAD_ERR_OK, true), + ); + + $file = null; + foreach ($files as $file) { + $client->request('POST', '/', array(), array('foo' => $file)); + + $files = $client->getRequest()->files->all(); + + $this->assertCount(1, $files); + + $file = $files['foo']; + + $this->assertEquals('original', $file->getClientOriginalName()); + $this->assertEquals('mime/original', $file->getClientMimeType()); + $this->assertEquals('123', $file->getClientSize()); + $this->assertTrue($file->isValid()); + } + + $file->move(dirname($target), basename($target)); + + $this->assertFileExists($target); + unlink($target); + } + + public function testUploadedFileWhenNoFileSelected() + { + $kernel = new TestHttpKernel(); + $client = new Client($kernel); + + $file = array('tmp_name' => '', 'name' => '', 'type' => '', 'size' => 0, 'error' => UPLOAD_ERR_NO_FILE); + + $client->request('POST', '/', array(), array('foo' => $file)); + + $files = $client->getRequest()->files->all(); + + $this->assertCount(1, $files); + $this->assertNull($files['foo']); + } + + public function testUploadedFileWhenSizeExceedsUploadMaxFileSize() + { + $source = tempnam(sys_get_temp_dir(), 'source'); + + $kernel = new TestHttpKernel(); + $client = new Client($kernel); + + $file = $this + ->getMockBuilder('Symfony\Component\HttpFoundation\File\UploadedFile') + ->setConstructorArgs(array($source, 'original', 'mime/original', 123, UPLOAD_ERR_OK, true)) + ->setMethods(array('getSize')) + ->getMock() + ; + + $file->expects($this->once()) + ->method('getSize') + ->will($this->returnValue(INF)) + ; + + $client->request('POST', '/', array(), array($file)); + + $files = $client->getRequest()->files->all(); + + $this->assertCount(1, $files); + + $file = $files[0]; + + $this->assertFalse($file->isValid()); + $this->assertEquals(UPLOAD_ERR_INI_SIZE, $file->getError()); + $this->assertEquals('mime/original', $file->getClientMimeType()); + $this->assertEquals('original', $file->getClientOriginalName()); + $this->assertEquals(0, $file->getClientSize()); + + unlink($source); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Config/EnvParametersResourceTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Config/EnvParametersResourceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6fe8a6756899dbdfac3b705442f187232a151d89 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Config/EnvParametersResourceTest.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Config; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\Config\EnvParametersResource; + +class EnvParametersResourceTest extends TestCase +{ + protected $prefix = '__DUMMY_'; + protected $initialEnv; + protected $resource; + + protected function setUp() + { + $this->initialEnv = array( + $this->prefix.'1' => 'foo', + $this->prefix.'2' => 'bar', + ); + + foreach ($this->initialEnv as $key => $value) { + $_SERVER[$key] = $value; + } + + $this->resource = new EnvParametersResource($this->prefix); + } + + protected function tearDown() + { + foreach ($_SERVER as $key => $value) { + if (0 === strpos($key, $this->prefix)) { + unset($_SERVER[$key]); + } + } + } + + public function testGetResource() + { + $this->assertSame( + array('prefix' => $this->prefix, 'variables' => $this->initialEnv), + $this->resource->getResource(), + '->getResource() returns the resource' + ); + } + + public function testToString() + { + $this->assertSame( + serialize(array('prefix' => $this->prefix, 'variables' => $this->initialEnv)), + (string) $this->resource + ); + } + + public function testIsFreshNotChanged() + { + $this->assertTrue( + $this->resource->isFresh(time()), + '->isFresh() returns true if the variables have not changed' + ); + } + + public function testIsFreshValueChanged() + { + reset($this->initialEnv); + $_SERVER[key($this->initialEnv)] = 'baz'; + + $this->assertFalse( + $this->resource->isFresh(time()), + '->isFresh() returns false if a variable has been changed' + ); + } + + public function testIsFreshValueRemoved() + { + reset($this->initialEnv); + unset($_SERVER[key($this->initialEnv)]); + + $this->assertFalse( + $this->resource->isFresh(time()), + '->isFresh() returns false if a variable has been removed' + ); + } + + public function testIsFreshValueAdded() + { + $_SERVER[$this->prefix.'3'] = 'foo'; + + $this->assertFalse( + $this->resource->isFresh(time()), + '->isFresh() returns false if a variable has been added' + ); + } + + public function testSerializeUnserialize() + { + $this->assertEquals($this->resource, unserialize(serialize($this->resource))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Config/FileLocatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Config/FileLocatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6265f0275560ae4d4a9f018bdb966ef0ccf430fc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Config/FileLocatorTest.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Config; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\Config\FileLocator; + +class FileLocatorTest extends TestCase +{ + public function testLocate() + { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); + $kernel + ->expects($this->atLeastOnce()) + ->method('locateResource') + ->with('@BundleName/some/path', null, true) + ->will($this->returnValue('/bundle-name/some/path')); + $locator = new FileLocator($kernel); + $this->assertEquals('/bundle-name/some/path', $locator->locate('@BundleName/some/path')); + + $kernel + ->expects($this->never()) + ->method('locateResource'); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('LogicException'); + $locator->locate('/some/path'); + } + + public function testLocateWithGlobalResourcePath() + { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); + $kernel + ->expects($this->atLeastOnce()) + ->method('locateResource') + ->with('@BundleName/some/path', '/global/resource/path', false); + + $locator = new FileLocator($kernel, '/global/resource/path'); + $locator->locate('@BundleName/some/path', null, false); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php new file mode 100644 index 0000000000000000000000000000000000000000..062ef5c64b49f1c70da04c9062bcef13f84804f4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php @@ -0,0 +1,275 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Controller; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver; +use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory; +use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\ExtendingRequest; +use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\NullableController; +use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\VariadicController; +use Symfony\Component\HttpFoundation\Request; + +class ArgumentResolverTest extends TestCase +{ + /** @var ArgumentResolver */ + private static $resolver; + + public static function setUpBeforeClass() + { + $factory = new ArgumentMetadataFactory(); + $argumentValueResolvers = array( + new RequestAttributeValueResolver(), + new RequestValueResolver(), + new DefaultValueResolver(), + new VariadicValueResolver(), + ); + + self::$resolver = new ArgumentResolver($factory, $argumentValueResolvers); + } + + public function testDefaultState() + { + $this->assertEquals(self::$resolver, new ArgumentResolver()); + $this->assertNotEquals(self::$resolver, new ArgumentResolver(null, array(new RequestAttributeValueResolver()))); + } + + public function testGetArguments() + { + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $controller = array(new self(), 'controllerWithFoo'); + + $this->assertEquals(array('foo'), self::$resolver->getArguments($request, $controller), '->getArguments() returns an array of arguments for the controller method'); + } + + public function testGetArgumentsReturnsEmptyArrayWhenNoArguments() + { + $request = Request::create('/'); + $controller = array(new self(), 'controllerWithoutArguments'); + + $this->assertEquals(array(), self::$resolver->getArguments($request, $controller), '->getArguments() returns an empty array if the method takes no arguments'); + } + + public function testGetArgumentsUsesDefaultValue() + { + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $controller = array(new self(), 'controllerWithFooAndDefaultBar'); + + $this->assertEquals(array('foo', null), self::$resolver->getArguments($request, $controller), '->getArguments() uses default values if present'); + } + + public function testGetArgumentsOverrideDefaultValueByRequestAttribute() + { + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $request->attributes->set('bar', 'bar'); + $controller = array(new self(), 'controllerWithFooAndDefaultBar'); + + $this->assertEquals(array('foo', 'bar'), self::$resolver->getArguments($request, $controller), '->getArguments() overrides default values if provided in the request attributes'); + } + + public function testGetArgumentsFromClosure() + { + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $controller = function ($foo) {}; + + $this->assertEquals(array('foo'), self::$resolver->getArguments($request, $controller)); + } + + public function testGetArgumentsUsesDefaultValueFromClosure() + { + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $controller = function ($foo, $bar = 'bar') {}; + + $this->assertEquals(array('foo', 'bar'), self::$resolver->getArguments($request, $controller)); + } + + public function testGetArgumentsFromInvokableObject() + { + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $controller = new self(); + + $this->assertEquals(array('foo', null), self::$resolver->getArguments($request, $controller)); + + // Test default bar overridden by request attribute + $request->attributes->set('bar', 'bar'); + + $this->assertEquals(array('foo', 'bar'), self::$resolver->getArguments($request, $controller)); + } + + public function testGetArgumentsFromFunctionName() + { + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $request->attributes->set('foobar', 'foobar'); + $controller = __NAMESPACE__.'\controller_function'; + + $this->assertEquals(array('foo', 'foobar'), self::$resolver->getArguments($request, $controller)); + } + + public function testGetArgumentsFailsOnUnresolvedValue() + { + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $request->attributes->set('foobar', 'foobar'); + $controller = array(new self(), 'controllerWithFooBarFoobar'); + + try { + self::$resolver->getArguments($request, $controller); + $this->fail('->getArguments() throws a \RuntimeException exception if it cannot determine the argument value'); + } catch (\Exception $e) { + $this->assertInstanceOf('\RuntimeException', $e, '->getArguments() throws a \RuntimeException exception if it cannot determine the argument value'); + } + } + + public function testGetArgumentsInjectsRequest() + { + $request = Request::create('/'); + $controller = array(new self(), 'controllerWithRequest'); + + $this->assertEquals(array($request), self::$resolver->getArguments($request, $controller), '->getArguments() injects the request'); + } + + public function testGetArgumentsInjectsExtendingRequest() + { + $request = ExtendingRequest::create('/'); + $controller = array(new self(), 'controllerWithExtendingRequest'); + + $this->assertEquals(array($request), self::$resolver->getArguments($request, $controller), '->getArguments() injects the request when extended'); + } + + /** + * @requires PHP 5.6 + */ + public function testGetVariadicArguments() + { + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $request->attributes->set('bar', array('foo', 'bar')); + $controller = array(new VariadicController(), 'action'); + + $this->assertEquals(array('foo', 'foo', 'bar'), self::$resolver->getArguments($request, $controller)); + } + + /** + * @requires PHP 5.6 + * @expectedException \InvalidArgumentException + */ + public function testGetVariadicArgumentsWithoutArrayInRequest() + { + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $request->attributes->set('bar', 'foo'); + $controller = array(new VariadicController(), 'action'); + + self::$resolver->getArguments($request, $controller); + } + + /** + * @requires PHP 5.6 + * @expectedException \InvalidArgumentException + */ + public function testGetArgumentWithoutArray() + { + $factory = new ArgumentMetadataFactory(); + $valueResolver = $this->getMockBuilder(ArgumentValueResolverInterface::class)->getMock(); + $resolver = new ArgumentResolver($factory, array($valueResolver)); + + $valueResolver->expects($this->any())->method('supports')->willReturn(true); + $valueResolver->expects($this->any())->method('resolve')->willReturn('foo'); + + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $request->attributes->set('bar', 'foo'); + $controller = array($this, 'controllerWithFooAndDefaultBar'); + $resolver->getArguments($request, $controller); + } + + /** + * @expectedException \RuntimeException + */ + public function testIfExceptionIsThrownWhenMissingAnArgument() + { + $request = Request::create('/'); + $controller = array($this, 'controllerWithFoo'); + + self::$resolver->getArguments($request, $controller); + } + + /** + * @requires PHP 7.1 + */ + public function testGetNullableArguments() + { + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $request->attributes->set('bar', new \stdClass()); + $request->attributes->set('mandatory', 'mandatory'); + $controller = array(new NullableController(), 'action'); + + $this->assertEquals(array('foo', new \stdClass(), 'value', 'mandatory'), self::$resolver->getArguments($request, $controller)); + } + + /** + * @requires PHP 7.1 + */ + public function testGetNullableArgumentsWithDefaults() + { + $request = Request::create('/'); + $request->attributes->set('mandatory', 'mandatory'); + $controller = array(new NullableController(), 'action'); + + $this->assertEquals(array(null, null, 'value', 'mandatory'), self::$resolver->getArguments($request, $controller)); + } + + public function __invoke($foo, $bar = null) + { + } + + public function controllerWithFoo($foo) + { + } + + public function controllerWithoutArguments() + { + } + + protected function controllerWithFooAndDefaultBar($foo, $bar = null) + { + } + + protected function controllerWithFooBarFoobar($foo, $bar, $foobar) + { + } + + protected function controllerWithRequest(Request $request) + { + } + + protected function controllerWithExtendingRequest(ExtendingRequest $request) + { + } +} + +function controller_function($foo, $foobar) +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php new file mode 100644 index 0000000000000000000000000000000000000000..190e15ad67bca18f6c81f8c0e9cc15a81e6bfe4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php @@ -0,0 +1,331 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Controller; + +use PHPUnit\Framework\TestCase; +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Controller\ControllerResolver; +use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\NullableController; +use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\VariadicController; +use Symfony\Component\HttpFoundation\Request; + +class ControllerResolverTest extends TestCase +{ + public function testGetControllerWithoutControllerParameter() + { + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger->expects($this->once())->method('warning')->with('Unable to look for the controller as the "_controller" parameter is missing.'); + $resolver = $this->createControllerResolver($logger); + + $request = Request::create('/'); + $this->assertFalse($resolver->getController($request), '->getController() returns false when the request has no _controller attribute'); + } + + public function testGetControllerWithLambda() + { + $resolver = $this->createControllerResolver(); + + $request = Request::create('/'); + $request->attributes->set('_controller', $lambda = function () {}); + $controller = $resolver->getController($request); + $this->assertSame($lambda, $controller); + } + + public function testGetControllerWithObjectAndInvokeMethod() + { + $resolver = $this->createControllerResolver(); + + $request = Request::create('/'); + $request->attributes->set('_controller', $this); + $controller = $resolver->getController($request); + $this->assertSame($this, $controller); + } + + public function testGetControllerWithObjectAndMethod() + { + $resolver = $this->createControllerResolver(); + + $request = Request::create('/'); + $request->attributes->set('_controller', array($this, 'controllerMethod1')); + $controller = $resolver->getController($request); + $this->assertSame(array($this, 'controllerMethod1'), $controller); + } + + public function testGetControllerWithClassAndMethod() + { + $resolver = $this->createControllerResolver(); + + $request = Request::create('/'); + $request->attributes->set('_controller', array('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest', 'controllerMethod4')); + $controller = $resolver->getController($request); + $this->assertSame(array('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest', 'controllerMethod4'), $controller); + } + + public function testGetControllerWithObjectAndMethodAsString() + { + $resolver = $this->createControllerResolver(); + + $request = Request::create('/'); + $request->attributes->set('_controller', 'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::controllerMethod1'); + $controller = $resolver->getController($request); + $this->assertInstanceOf('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest', $controller[0], '->getController() returns a PHP callable'); + } + + public function testGetControllerWithClassAndInvokeMethod() + { + $resolver = $this->createControllerResolver(); + + $request = Request::create('/'); + $request->attributes->set('_controller', 'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest'); + $controller = $resolver->getController($request); + $this->assertInstanceOf('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest', $controller); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testGetControllerOnObjectWithoutInvokeMethod() + { + $resolver = $this->createControllerResolver(); + + $request = Request::create('/'); + $request->attributes->set('_controller', new \stdClass()); + $resolver->getController($request); + } + + public function testGetControllerWithFunction() + { + $resolver = $this->createControllerResolver(); + + $request = Request::create('/'); + $request->attributes->set('_controller', 'Symfony\Component\HttpKernel\Tests\Controller\some_controller_function'); + $controller = $resolver->getController($request); + $this->assertSame('Symfony\Component\HttpKernel\Tests\Controller\some_controller_function', $controller); + } + + /** + * @dataProvider getUndefinedControllers + */ + public function testGetControllerOnNonUndefinedFunction($controller, $exceptionName = null, $exceptionMessage = null) + { + $resolver = $this->createControllerResolver(); + if (method_exists($this, 'expectException')) { + $this->expectException($exceptionName); + $this->expectExceptionMessage($exceptionMessage); + } else { + $this->setExpectedException($exceptionName, $exceptionMessage); + } + + $request = Request::create('/'); + $request->attributes->set('_controller', $controller); + $resolver->getController($request); + } + + public function getUndefinedControllers() + { + return array( + array(1, 'InvalidArgumentException', 'Unable to find controller "1".'), + array('foo', 'InvalidArgumentException', 'Unable to find controller "foo".'), + array('oof::bar', 'InvalidArgumentException', 'Class "oof" does not exist.'), + array('stdClass', 'InvalidArgumentException', 'Unable to find controller "stdClass".'), + array('Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::staticsAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Expected method "staticsAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest", did you mean "staticAction"?'), + array('Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::privateAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Method "privateAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest" should be public and non-abstract'), + array('Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::protectedAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Method "protectedAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest" should be public and non-abstract'), + array('Symfony\Component\HttpKernel\Tests\Controller\ControllerTest::undefinedAction', 'InvalidArgumentException', 'The controller for URI "/" is not callable. Expected method "undefinedAction" on class "Symfony\Component\HttpKernel\Tests\Controller\ControllerTest". Available methods: "publicAction", "staticAction"'), + ); + } + + /** + * @group legacy + */ + public function testGetArguments() + { + $resolver = $this->createControllerResolver(); + + $request = Request::create('/'); + $controller = array(new self(), 'testGetArguments'); + $this->assertEquals(array(), $resolver->getArguments($request, $controller), '->getArguments() returns an empty array if the method takes no arguments'); + + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $controller = array(new self(), 'controllerMethod1'); + $this->assertEquals(array('foo'), $resolver->getArguments($request, $controller), '->getArguments() returns an array of arguments for the controller method'); + + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $controller = array(new self(), 'controllerMethod2'); + $this->assertEquals(array('foo', null), $resolver->getArguments($request, $controller), '->getArguments() uses default values if present'); + + $request->attributes->set('bar', 'bar'); + $this->assertEquals(array('foo', 'bar'), $resolver->getArguments($request, $controller), '->getArguments() overrides default values if provided in the request attributes'); + + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $controller = function ($foo) {}; + $this->assertEquals(array('foo'), $resolver->getArguments($request, $controller)); + + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $controller = function ($foo, $bar = 'bar') {}; + $this->assertEquals(array('foo', 'bar'), $resolver->getArguments($request, $controller)); + + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $controller = new self(); + $this->assertEquals(array('foo', null), $resolver->getArguments($request, $controller)); + $request->attributes->set('bar', 'bar'); + $this->assertEquals(array('foo', 'bar'), $resolver->getArguments($request, $controller)); + + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $request->attributes->set('foobar', 'foobar'); + $controller = 'Symfony\Component\HttpKernel\Tests\Controller\some_controller_function'; + $this->assertEquals(array('foo', 'foobar'), $resolver->getArguments($request, $controller)); + + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $request->attributes->set('foobar', 'foobar'); + $controller = array(new self(), 'controllerMethod3'); + + try { + $resolver->getArguments($request, $controller); + $this->fail('->getArguments() throws a \RuntimeException exception if it cannot determine the argument value'); + } catch (\Exception $e) { + $this->assertInstanceOf('\RuntimeException', $e, '->getArguments() throws a \RuntimeException exception if it cannot determine the argument value'); + } + + $request = Request::create('/'); + $controller = array(new self(), 'controllerMethod5'); + $this->assertEquals(array($request), $resolver->getArguments($request, $controller), '->getArguments() injects the request'); + } + + /** + * @requires PHP 5.6 + * @group legacy + */ + public function testGetVariadicArguments() + { + $resolver = new ControllerResolver(); + + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $request->attributes->set('bar', array('foo', 'bar')); + $controller = array(new VariadicController(), 'action'); + $this->assertEquals(array('foo', 'foo', 'bar'), $resolver->getArguments($request, $controller)); + } + + public function testCreateControllerCanReturnAnyCallable() + { + $mock = $this->getMockBuilder('Symfony\Component\HttpKernel\Controller\ControllerResolver')->setMethods(array('createController'))->getMock(); + $mock->expects($this->once())->method('createController')->will($this->returnValue('Symfony\Component\HttpKernel\Tests\Controller\some_controller_function')); + + $request = Request::create('/'); + $request->attributes->set('_controller', 'foobar'); + $mock->getController($request); + } + + /** + * @expectedException \RuntimeException + * @group legacy + */ + public function testIfExceptionIsThrownWhenMissingAnArgument() + { + $resolver = new ControllerResolver(); + $request = Request::create('/'); + + $controller = array($this, 'controllerMethod1'); + + $resolver->getArguments($request, $controller); + } + + /** + * @requires PHP 7.1 + * @group legacy + */ + public function testGetNullableArguments() + { + $resolver = new ControllerResolver(); + + $request = Request::create('/'); + $request->attributes->set('foo', 'foo'); + $request->attributes->set('bar', new \stdClass()); + $request->attributes->set('mandatory', 'mandatory'); + $controller = array(new NullableController(), 'action'); + $this->assertEquals(array('foo', new \stdClass(), 'value', 'mandatory'), $resolver->getArguments($request, $controller)); + } + + /** + * @requires PHP 7.1 + * @group legacy + */ + public function testGetNullableArgumentsWithDefaults() + { + $resolver = new ControllerResolver(); + + $request = Request::create('/'); + $request->attributes->set('mandatory', 'mandatory'); + $controller = array(new NullableController(), 'action'); + $this->assertEquals(array(null, null, 'value', 'mandatory'), $resolver->getArguments($request, $controller)); + } + + protected function createControllerResolver(LoggerInterface $logger = null) + { + return new ControllerResolver($logger); + } + + public function __invoke($foo, $bar = null) + { + } + + public function controllerMethod1($foo) + { + } + + protected function controllerMethod2($foo, $bar = null) + { + } + + protected function controllerMethod3($foo, $bar, $foobar) + { + } + + protected static function controllerMethod4() + { + } + + protected function controllerMethod5(Request $request) + { + } +} + +function some_controller_function($foo, $foobar) +{ +} + +class ControllerTest +{ + public function publicAction() + { + } + + private function privateAction() + { + } + + protected function protectedAction() + { + } + + public static function staticAction() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b4b449f3586111356a3b58a78be1c21661c05210 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php @@ -0,0 +1,148 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\ControllerMetadata; + +use Fake\ImportedAndFake; +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory; +use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\BasicTypesController; +use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\NullableController; +use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\VariadicController; + +class ArgumentMetadataFactoryTest extends TestCase +{ + /** + * @var ArgumentMetadataFactory + */ + private $factory; + + protected function setUp() + { + $this->factory = new ArgumentMetadataFactory(); + } + + public function testSignature1() + { + $arguments = $this->factory->createArgumentMetadata(array($this, 'signature1')); + + $this->assertEquals(array( + new ArgumentMetadata('foo', self::class, false, false, null), + new ArgumentMetadata('bar', 'array', false, false, null), + new ArgumentMetadata('baz', 'callable', false, false, null), + ), $arguments); + } + + public function testSignature2() + { + $arguments = $this->factory->createArgumentMetadata(array($this, 'signature2')); + + $this->assertEquals(array( + new ArgumentMetadata('foo', self::class, false, true, null, true), + new ArgumentMetadata('bar', __NAMESPACE__.'\FakeClassThatDoesNotExist', false, true, null, true), + new ArgumentMetadata('baz', 'Fake\ImportedAndFake', false, true, null, true), + ), $arguments); + } + + public function testSignature3() + { + $arguments = $this->factory->createArgumentMetadata(array($this, 'signature3')); + + $this->assertEquals(array( + new ArgumentMetadata('bar', __NAMESPACE__.'\FakeClassThatDoesNotExist', false, false, null), + new ArgumentMetadata('baz', 'Fake\ImportedAndFake', false, false, null), + ), $arguments); + } + + public function testSignature4() + { + $arguments = $this->factory->createArgumentMetadata(array($this, 'signature4')); + + $this->assertEquals(array( + new ArgumentMetadata('foo', null, false, true, 'default'), + new ArgumentMetadata('bar', null, false, true, 500), + new ArgumentMetadata('baz', null, false, true, array()), + ), $arguments); + } + + public function testSignature5() + { + $arguments = $this->factory->createArgumentMetadata(array($this, 'signature5')); + + $this->assertEquals(array( + new ArgumentMetadata('foo', 'array', false, true, null, true), + new ArgumentMetadata('bar', null, false, false, null), + ), $arguments); + } + + /** + * @requires PHP 5.6 + */ + public function testVariadicSignature() + { + $arguments = $this->factory->createArgumentMetadata(array(new VariadicController(), 'action')); + + $this->assertEquals(array( + new ArgumentMetadata('foo', null, false, false, null), + new ArgumentMetadata('bar', null, true, false, null), + ), $arguments); + } + + /** + * @requires PHP 7.0 + */ + public function testBasicTypesSignature() + { + $arguments = $this->factory->createArgumentMetadata(array(new BasicTypesController(), 'action')); + + $this->assertEquals(array( + new ArgumentMetadata('foo', 'string', false, false, null), + new ArgumentMetadata('bar', 'int', false, false, null), + new ArgumentMetadata('baz', 'float', false, false, null), + ), $arguments); + } + + /** + * @requires PHP 7.1 + */ + public function testNullableTypesSignature() + { + $arguments = $this->factory->createArgumentMetadata(array(new NullableController(), 'action')); + + $this->assertEquals(array( + new ArgumentMetadata('foo', 'string', false, false, null, true), + new ArgumentMetadata('bar', \stdClass::class, false, false, null, true), + new ArgumentMetadata('baz', 'string', false, true, 'value', true), + new ArgumentMetadata('mandatory', null, false, false, null, true), + ), $arguments); + } + + private function signature1(ArgumentMetadataFactoryTest $foo, array $bar, callable $baz) + { + } + + private function signature2(ArgumentMetadataFactoryTest $foo = null, FakeClassThatDoesNotExist $bar = null, ImportedAndFake $baz = null) + { + } + + private function signature3(FakeClassThatDoesNotExist $bar, ImportedAndFake $baz) + { + } + + private function signature4($foo = 'default', $bar = 500, $baz = array()) + { + } + + private function signature5(array $foo = null, $bar) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataTest.php new file mode 100644 index 0000000000000000000000000000000000000000..05351445e00aa062ff23be32bcb0fc082c8a4054 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataTest.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\ControllerMetadata; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; + +class ArgumentMetadataTest extends TestCase +{ + public function testWithBcLayerWithDefault() + { + $argument = new ArgumentMetadata('foo', 'string', false, true, 'default value'); + + $this->assertFalse($argument->isNullable()); + } + + public function testDefaultValueAvailable() + { + $argument = new ArgumentMetadata('foo', 'string', false, true, 'default value', true); + + $this->assertTrue($argument->isNullable()); + $this->assertTrue($argument->hasDefaultValue()); + $this->assertSame('default value', $argument->getDefaultValue()); + } + + /** + * @expectedException \LogicException + */ + public function testDefaultValueUnavailable() + { + $argument = new ArgumentMetadata('foo', 'string', false, false, null, false); + + $this->assertFalse($argument->isNullable()); + $this->assertFalse($argument->hasDefaultValue()); + $argument->getDefaultValue(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6d9f65d0ac6e86223d710d81e9b925840c0a2e58 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector; +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +class ConfigDataCollectorTest extends TestCase +{ + public function testCollect() + { + $kernel = new KernelForTest('test', true); + $c = new ConfigDataCollector(); + $c->setKernel($kernel); + $c->collect(new Request(), new Response()); + + $this->assertSame('test', $c->getEnv()); + $this->assertTrue($c->isDebug()); + $this->assertSame('config', $c->getName()); + $this->assertSame('testkernel', $c->getAppName()); + $this->assertSame(PHP_VERSION, $c->getPhpVersion()); + $this->assertSame(Kernel::VERSION, $c->getSymfonyVersion()); + $this->assertNull($c->getToken()); + + // if else clause because we don't know it + if (extension_loaded('xdebug')) { + $this->assertTrue($c->hasXDebug()); + } else { + $this->assertFalse($c->hasXDebug()); + } + + // if else clause because we don't know it + if (((extension_loaded('eaccelerator') && ini_get('eaccelerator.enable')) + || + (extension_loaded('apc') && ini_get('apc.enabled')) + || + (extension_loaded('Zend OPcache') && ini_get('opcache.enable')) + || + (extension_loaded('xcache') && ini_get('xcache.cacher')) + || + (extension_loaded('wincache') && ini_get('wincache.ocenabled')))) { + $this->assertTrue($c->hasAccelerator()); + } else { + $this->assertFalse($c->hasAccelerator()); + } + } +} + +class KernelForTest extends Kernel +{ + public function getName() + { + return 'testkernel'; + } + + public function registerBundles() + { + } + + public function getBundles() + { + return array(); + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0af51db6ad098bbfcb3d6c0275bbe99c68fe6847 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Tests\Fixtures\DataCollector\CloneVarDataCollector; +use Symfony\Component\VarDumper\Cloner\Stub; +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\CliDumper; + +class DataCollectorTest extends TestCase +{ + public function testCloneVarStringWithScheme() + { + $c = new CloneVarDataCollector('scheme://foo'); + $c->collect(new Request(), new Response()); + $cloner = new VarCloner(); + + $this->assertEquals($cloner->cloneVar('scheme://foo'), $c->getData()); + } + + public function testCloneVarExistingFilePath() + { + $c = new CloneVarDataCollector($filePath = tempnam(sys_get_temp_dir(), 'clone_var_data_collector_')); + $c->collect(new Request(), new Response()); + + $data = $c->getData(); + $this->assertInstanceOf(Stub::class, $data->getRawData()[0][0]); + $this->assertDumpEquals("\"$filePath\"", $data); + } + + private function assertDumpEquals($dump, $data, $message = '') + { + $dumper = new CliDumper(); + $dumper->setColors(false); + + $this->assertSame(rtrim($dump), rtrim($dumper->dump($data, true)), $message); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DumpDataCollectorTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DumpDataCollectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9a306e533e00628a6e5499fdfa1e32ae123efc01 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/DumpDataCollectorTest.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\VarDumper\Cloner\Data; + +/** + * @author Nicolas Grekas + */ +class DumpDataCollectorTest extends TestCase +{ + public function testDump() + { + $data = new Data(array(array(123))); + + $collector = new DumpDataCollector(); + + $this->assertSame('dump', $collector->getName()); + + $collector->dump($data); + $line = __LINE__ - 1; + $this->assertSame(1, $collector->getDumpsCount()); + + $dump = $collector->getDumps('html'); + $this->assertTrue(isset($dump[0]['data'])); + $dump[0]['data'] = preg_replace('/^.*?
     "
    123\n
    \n", + 'name' => 'DumpDataCollectorTest.php', + 'file' => __FILE__, + 'line' => $line, + 'fileExcerpt' => false, + ), + ); + $this->assertEquals($xDump, $dump); + + $this->assertStringMatchesFormat('a:3:{i:0;a:5:{s:4:"data";O:39:"Symfony\Component\VarDumper\Cloner\Data":%a', $collector->serialize()); + $this->assertSame(0, $collector->getDumpsCount()); + $this->assertSame('a:2:{i:0;b:0;i:1;s:5:"UTF-8";}', $collector->serialize()); + } + + public function testCollectDefault() + { + $data = new Data(array(array(123))); + + $collector = new DumpDataCollector(); + + $collector->dump($data); + $line = __LINE__ - 1; + + ob_start(); + $collector->collect(new Request(), new Response()); + $output = ob_get_clean(); + + $this->assertSame("DumpDataCollectorTest.php on line {$line}:\n123\n", $output); + $this->assertSame(1, $collector->getDumpsCount()); + $collector->serialize(); + } + + public function testCollectHtml() + { + $data = new Data(array(array(123))); + + $collector = new DumpDataCollector(null, 'test://%f:%l'); + + $collector->dump($data); + $line = __LINE__ - 1; + $file = __FILE__; + $xOutput = <<DumpDataCollectorTest.php on line {$line}: +123 +
    +EOTXT; + + ob_start(); + $response = new Response(); + $response->headers->set('Content-Type', 'text/html'); + $collector->collect(new Request(), $response); + $output = ob_get_clean(); + $output = preg_replace('#<(script|style).*?#s', '', $output); + $output = preg_replace('/sf-dump-\d+/', 'sf-dump', $output); + + $this->assertSame($xOutput, trim($output)); + $this->assertSame(1, $collector->getDumpsCount()); + $collector->serialize(); + } + + public function testFlush() + { + $data = new Data(array(array(456))); + $collector = new DumpDataCollector(); + $collector->dump($data); + $line = __LINE__ - 1; + + ob_start(); + $collector->__destruct(); + $this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", ob_get_clean()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/ExceptionDataCollectorTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/ExceptionDataCollectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..afad9f58af63836229127fef862a9696fdfc664f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/ExceptionDataCollectorTest.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +class ExceptionDataCollectorTest extends TestCase +{ + public function testCollect() + { + $e = new \Exception('foo', 500); + $c = new ExceptionDataCollector(); + $flattened = FlattenException::create($e); + $trace = $flattened->getTrace(); + + $this->assertFalse($c->hasException()); + + $c->collect(new Request(), new Response(), $e); + + $this->assertTrue($c->hasException()); + $this->assertEquals($flattened, $c->getException()); + $this->assertSame('foo', $c->getMessage()); + $this->assertSame(500, $c->getCode()); + $this->assertSame('exception', $c->getName()); + $this->assertSame($trace, $c->getTrace()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7a5833d4e9093564a60568e6365e47b379e043d4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php @@ -0,0 +1,108 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Debug\Exception\SilencedErrorContext; +use Symfony\Component\HttpKernel\DataCollector\LoggerDataCollector; +use Symfony\Component\VarDumper\Cloner\Data; + +class LoggerDataCollectorTest extends TestCase +{ + private static $data; + + /** + * @dataProvider getCollectTestData + */ + public function testCollect($nb, $logs, $expectedLogs, $expectedDeprecationCount, $expectedScreamCount, $expectedPriorities = null) + { + $logger = $this->getMockBuilder('Symfony\Component\HttpKernel\Log\DebugLoggerInterface')->getMock(); + $logger->expects($this->once())->method('countErrors')->will($this->returnValue($nb)); + $logger->expects($this->exactly(2))->method('getLogs')->will($this->returnValue($logs)); + + // disable cloning the context, to ease fixtures creation. + $c = $this->getMockBuilder(LoggerDataCollector::class) + ->setMethods(array('cloneVar')) + ->setConstructorArgs(array($logger)) + ->getMock(); + $c->expects($this->any())->method('cloneVar')->willReturn(self::$data); + $c->lateCollect(); + + $this->assertEquals('logger', $c->getName()); + $this->assertEquals($nb, $c->countErrors()); + $this->assertEquals($expectedLogs, $c->getLogs()); + $this->assertEquals($expectedDeprecationCount, $c->countDeprecations()); + $this->assertEquals($expectedScreamCount, $c->countScreams()); + + if (isset($expectedPriorities)) { + $this->assertSame($expectedPriorities, $c->getPriorities()); + } + } + + public function getCollectTestData() + { + if (null === self::$data) { + self::$data = new Data(array()); + } + + yield 'simple log' => array( + 1, + array(array('message' => 'foo', 'context' => array(), 'priority' => 100, 'priorityName' => 'DEBUG')), + array(array('message' => 'foo', 'context' => array(), 'priority' => 100, 'priorityName' => 'DEBUG')), + 0, + 0, + ); + + yield 'log with a context' => array( + 1, + array(array('message' => 'foo', 'context' => array('foo' => 'bar'), 'priority' => 100, 'priorityName' => 'DEBUG')), + array(array('message' => 'foo', 'context' => self::$data, 'priority' => 100, 'priorityName' => 'DEBUG')), + 0, + 0, + ); + + if (!class_exists(SilencedErrorContext::class)) { + return; + } + + yield 'logs with some deprecations' => array( + 1, + array( + array('message' => 'foo3', 'context' => array('exception' => new \ErrorException('warning', 0, E_USER_WARNING)), 'priority' => 100, 'priorityName' => 'DEBUG'), + array('message' => 'foo', 'context' => array('exception' => new \ErrorException('deprecated', 0, E_DEPRECATED)), 'priority' => 100, 'priorityName' => 'DEBUG'), + array('message' => 'foo2', 'context' => array('exception' => new \ErrorException('deprecated', 0, E_USER_DEPRECATED)), 'priority' => 100, 'priorityName' => 'DEBUG'), + ), + array( + array('message' => 'foo3', 'context' => self::$data, 'priority' => 100, 'priorityName' => 'DEBUG'), + array('message' => 'foo', 'context' => self::$data, 'priority' => 100, 'priorityName' => 'DEBUG', 'errorCount' => 1, 'scream' => false), + array('message' => 'foo2', 'context' => self::$data, 'priority' => 100, 'priorityName' => 'DEBUG', 'errorCount' => 1, 'scream' => false), + ), + 2, + 0, + array(100 => array('count' => 3, 'name' => 'DEBUG')), + ); + + yield 'logs with some silent errors' => array( + 1, + array( + array('message' => 'foo3', 'context' => array('exception' => new \ErrorException('warning', 0, E_USER_WARNING)), 'priority' => 100, 'priorityName' => 'DEBUG'), + array('message' => 'foo3', 'context' => array('exception' => new SilencedErrorContext(E_USER_WARNING, __FILE__, __LINE__)), 'priority' => 100, 'priorityName' => 'DEBUG'), + ), + array( + array('message' => 'foo3', 'context' => self::$data, 'priority' => 100, 'priorityName' => 'DEBUG'), + array('message' => 'foo3', 'context' => self::$data, 'priority' => 100, 'priorityName' => 'DEBUG', 'errorCount' => 1, 'scream' => true), + ), + 0, + 1, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ab78e9e8e178fcae552a78fa96aa56f50bd2f103 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +class MemoryDataCollectorTest extends TestCase +{ + public function testCollect() + { + $collector = new MemoryDataCollector(); + $collector->collect(new Request(), new Response()); + + $this->assertInternalType('integer', $collector->getMemory()); + $this->assertInternalType('integer', $collector->getMemoryLimit()); + $this->assertSame('memory', $collector->getName()); + } + + /** @dataProvider getBytesConversionTestData */ + public function testBytesConversion($limit, $bytes) + { + $collector = new MemoryDataCollector(); + $method = new \ReflectionMethod($collector, 'convertToBytes'); + $method->setAccessible(true); + $this->assertEquals($bytes, $method->invoke($collector, $limit)); + } + + public function getBytesConversionTestData() + { + return array( + array('2k', 2048), + array('2 k', 2048), + array('8m', 8 * 1024 * 1024), + array('+2 k', 2048), + array('+2???k', 2048), + array('0x10', 16), + array('0xf', 15), + array('010', 8), + array('+0x10 k', 16 * 1024), + array('1g', 1024 * 1024 * 1024), + array('1G', 1024 * 1024 * 1024), + array('-1', -1), + array('0', 0), + array('2mk', 2048), // the unit must be the last char, so in this case 'k', not 'm' + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cc8b4c6500bf0dd70f4dbba67d7b9e3e21574e55 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php @@ -0,0 +1,285 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; +use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\HttpKernel; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector; +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Cloner\VarCloner; + +class RequestDataCollectorTest extends TestCase +{ + public function testCollect() + { + $c = new RequestDataCollector(); + + $c->collect($request = $this->createRequest(), $this->createResponse()); + + $cloner = new VarCloner(); + $attributes = $c->getRequestAttributes(); + + $this->assertSame('request', $c->getName()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestHeaders()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestServer()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestCookies()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $attributes); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestRequest()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestQuery()); + $this->assertSame('html', $c->getFormat()); + $this->assertEquals('foobar', $c->getRoute()); + $this->assertEquals(array('name' => $cloner->cloneVar(array('name' => 'foo'))->seek('name')), $c->getRouteParams()); + $this->assertSame(array(), $c->getSessionAttributes()); + $this->assertSame('en', $c->getLocale()); + $this->assertEquals($cloner->cloneVar($request->attributes->get('resource')), $attributes->get('resource')); + $this->assertEquals($cloner->cloneVar($request->attributes->get('object')), $attributes->get('object')); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getResponseHeaders()); + $this->assertSame('OK', $c->getStatusText()); + $this->assertSame(200, $c->getStatusCode()); + $this->assertSame('application/json', $c->getContentType()); + } + + public function testCollectWithoutRouteParams() + { + $request = $this->createRequest(array()); + + $c = new RequestDataCollector(); + $c->collect($request, $this->createResponse()); + + $this->assertEquals(array(), $c->getRouteParams()); + } + + public function testKernelResponseDoesNotStartSession() + { + $kernel = $this->getMockBuilder(HttpKernelInterface::class)->getMock(); + $request = new Request(); + $session = new Session(new MockArraySessionStorage()); + $request->setSession($session); + $response = new Response(); + + $c = new RequestDataCollector(); + $c->onKernelResponse(new FilterResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST, $response)); + + $this->assertFalse($session->isStarted()); + } + + /** + * @dataProvider provideControllerCallables + */ + public function testControllerInspection($name, $callable, $expected) + { + $c = new RequestDataCollector(); + $request = $this->createRequest(); + $response = $this->createResponse(); + $this->injectController($c, $callable, $request); + $c->collect($request, $response); + + $this->assertSame($expected, $c->getController(), sprintf('Testing: %s', $name)); + } + + public function provideControllerCallables() + { + // make sure we always match the line number + $r1 = new \ReflectionMethod($this, 'testControllerInspection'); + $r2 = new \ReflectionMethod($this, 'staticControllerMethod'); + $r3 = new \ReflectionClass($this); + + // test name, callable, expected + return array( + array( + '"Regular" callable', + array($this, 'testControllerInspection'), + array( + 'class' => __NAMESPACE__.'\RequestDataCollectorTest', + 'method' => 'testControllerInspection', + 'file' => __FILE__, + 'line' => $r1->getStartLine(), + ), + ), + + array( + 'Closure', + function () { return 'foo'; }, + array( + 'class' => __NAMESPACE__.'\{closure}', + 'method' => null, + 'file' => __FILE__, + 'line' => __LINE__ - 5, + ), + ), + + array( + 'Static callback as string', + __NAMESPACE__.'\RequestDataCollectorTest::staticControllerMethod', + array( + 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', + 'method' => 'staticControllerMethod', + 'file' => __FILE__, + 'line' => $r2->getStartLine(), + ), + ), + + array( + 'Static callable with instance', + array($this, 'staticControllerMethod'), + array( + 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', + 'method' => 'staticControllerMethod', + 'file' => __FILE__, + 'line' => $r2->getStartLine(), + ), + ), + + array( + 'Static callable with class name', + array('Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', 'staticControllerMethod'), + array( + 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', + 'method' => 'staticControllerMethod', + 'file' => __FILE__, + 'line' => $r2->getStartLine(), + ), + ), + + array( + 'Callable with instance depending on __call()', + array($this, 'magicMethod'), + array( + 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', + 'method' => 'magicMethod', + 'file' => 'n/a', + 'line' => 'n/a', + ), + ), + + array( + 'Callable with class name depending on __callStatic()', + array('Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', 'magicMethod'), + array( + 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', + 'method' => 'magicMethod', + 'file' => 'n/a', + 'line' => 'n/a', + ), + ), + + array( + 'Invokable controller', + $this, + array( + 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest', + 'method' => null, + 'file' => __FILE__, + 'line' => $r3->getStartLine(), + ), + ), + ); + } + + public function testItIgnoresInvalidCallables() + { + $request = $this->createRequestWithSession(); + $response = new RedirectResponse('/'); + + $c = new RequestDataCollector(); + $c->collect($request, $response); + + $this->assertSame('n/a', $c->getController()); + } + + protected function createRequest($routeParams = array('name' => 'foo')) + { + $request = Request::create('http://test.com/foo?bar=baz'); + $request->attributes->set('foo', 'bar'); + $request->attributes->set('_route', 'foobar'); + $request->attributes->set('_route_params', $routeParams); + $request->attributes->set('resource', fopen(__FILE__, 'r')); + $request->attributes->set('object', new \stdClass()); + + return $request; + } + + private function createRequestWithSession() + { + $request = $this->createRequest(); + $request->attributes->set('_controller', 'Foo::bar'); + $request->setSession(new Session(new MockArraySessionStorage())); + $request->getSession()->start(); + + return $request; + } + + protected function createResponse() + { + $response = new Response(); + $response->setStatusCode(200); + $response->headers->set('Content-Type', 'application/json'); + $response->headers->set('X-Foo-Bar', null); + $response->headers->setCookie(new Cookie('foo', 'bar', 1, '/foo', 'localhost', true, true)); + $response->headers->setCookie(new Cookie('bar', 'foo', new \DateTime('@946684800'))); + $response->headers->setCookie(new Cookie('bazz', 'foo', '2000-12-12')); + + return $response; + } + + /** + * Inject the given controller callable into the data collector. + */ + protected function injectController($collector, $controller, $request) + { + $resolver = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface')->getMock(); + $httpKernel = new HttpKernel(new EventDispatcher(), $resolver, null, $this->getMockBuilder(ArgumentResolverInterface::class)->getMock()); + $event = new FilterControllerEvent($httpKernel, $controller, $request, HttpKernelInterface::MASTER_REQUEST); + $collector->onKernelController($event); + } + + /** + * Dummy method used as controller callable. + */ + public static function staticControllerMethod() + { + throw new \LogicException('Unexpected method call'); + } + + /** + * Magic method to allow non existing methods to be called and delegated. + */ + public function __call($method, $args) + { + throw new \LogicException('Unexpected method call'); + } + + /** + * Magic method to allow non existing methods to be called and delegated. + */ + public static function __callStatic($method, $args) + { + throw new \LogicException('Unexpected method call'); + } + + public function __invoke() + { + throw new \LogicException('Unexpected method call'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/TimeDataCollectorTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/TimeDataCollectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..814b958163dcfa4f30f582ec83720918506f1228 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/TimeDataCollectorTest.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\DataCollector\TimeDataCollector; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * @group time-sensitive + */ +class TimeDataCollectorTest extends TestCase +{ + public function testCollect() + { + $c = new TimeDataCollector(); + + $request = new Request(); + $request->server->set('REQUEST_TIME', 1); + + $c->collect($request, new Response()); + + $this->assertEquals(1000, $c->getStartTime()); + + $request->server->set('REQUEST_TIME_FLOAT', 2); + + $c->collect($request, new Response()); + + $this->assertEquals(2000, $c->getStartTime()); + + $request = new Request(); + $c->collect($request, new Response()); + $this->assertEquals(0, $c->getStartTime()); + + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); + $kernel->expects($this->once())->method('getStartTime')->will($this->returnValue(123456)); + + $c = new TimeDataCollector($kernel); + $request = new Request(); + $request->server->set('REQUEST_TIME', 1); + + $c->collect($request, new Response()); + $this->assertEquals(123456000, $c->getStartTime()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/Util/ValueExporterTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/Util/ValueExporterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5fe92d60e04912ebb8d1120d94772dbac4df7547 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DataCollector/Util/ValueExporterTest.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DataCollector\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter; + +/** + * @group legacy + */ +class ValueExporterTest extends TestCase +{ + /** + * @var ValueExporter + */ + private $valueExporter; + + protected function setUp() + { + $this->valueExporter = new ValueExporter(); + } + + public function testDateTime() + { + $dateTime = new \DateTime('2014-06-10 07:35:40', new \DateTimeZone('UTC')); + $this->assertSame('Object(DateTime) - 2014-06-10T07:35:40+00:00', $this->valueExporter->exportValue($dateTime)); + } + + public function testDateTimeImmutable() + { + $dateTime = new \DateTimeImmutable('2014-06-10 07:35:40', new \DateTimeZone('UTC')); + $this->assertSame('Object(DateTimeImmutable) - 2014-06-10T07:35:40+00:00', $this->valueExporter->exportValue($dateTime)); + } + + public function testIncompleteClass() + { + $foo = new \__PHP_Incomplete_Class(); + $array = new \ArrayObject($foo); + $array['__PHP_Incomplete_Class_Name'] = 'AppBundle/Foo'; + $this->assertSame('__PHP_Incomplete_Class(AppBundle/Foo)', $this->valueExporter->exportValue($foo)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Debug/FileLinkFormatterTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Debug/FileLinkFormatterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d616098a545c733f2842ff1219089ddb6404ecfe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Debug/FileLinkFormatterTest.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Debug; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; + +class FileLinkFormatterTest extends TestCase +{ + public function testWhenNoFileLinkFormatAndNoRequest() + { + $sut = new FileLinkFormatter(); + + $this->assertFalse($sut->format('/kernel/root/src/my/very/best/file.php', 3)); + } + + public function testWhenFileLinkFormatAndNoRequest() + { + $file = __DIR__.DIRECTORY_SEPARATOR.'file.php'; + + $sut = new FileLinkFormatter('debug://open?url=file://%f&line=%l', new RequestStack()); + + $this->assertSame("debug://open?url=file://$file&line=3", $sut->format($file, 3)); + } + + public function testWhenFileLinkFormatAndRequest() + { + $file = __DIR__.DIRECTORY_SEPARATOR.'file.php'; + $baseDir = __DIR__; + $requestStack = new RequestStack(); + $request = new Request(); + $requestStack->push($request); + + $sut = new FileLinkFormatter('debug://open?url=file://%f&line=%l', $requestStack, __DIR__, '/_profiler/open?file=%f&line=%l#line%l'); + + $this->assertSame("debug://open?url=file://$file&line=3", $sut->format($file, 3)); + } + + public function testWhenNoFileLinkFormatAndRequest() + { + $file = __DIR__.DIRECTORY_SEPARATOR.'file.php'; + $requestStack = new RequestStack(); + $request = new Request(); + $requestStack->push($request); + + $request->server->set('SERVER_NAME', 'www.example.org'); + $request->server->set('SERVER_PORT', 80); + $request->server->set('SCRIPT_NAME', '/app.php'); + $request->server->set('SCRIPT_FILENAME', '/web/app.php'); + $request->server->set('REQUEST_URI', '/app.php/example'); + + $sut = new FileLinkFormatter(null, $requestStack, __DIR__, '/_profiler/open?file=%f&line=%l#line%l'); + + $this->assertSame('http://www.example.org/app.php/_profiler/open?file=file.php&line=3#line3', $sut->format($file, 3)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php new file mode 100644 index 0000000000000000000000000000000000000000..aaa82d524cc6bd16a4a12ff764732de571a87238 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Debug; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher; +use Symfony\Component\HttpKernel\HttpKernel; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Stopwatch\Stopwatch; + +class TraceableEventDispatcherTest extends TestCase +{ + public function testStopwatchSections() + { + $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch = new Stopwatch()); + $kernel = $this->getHttpKernel($dispatcher, function () { return new Response(); }); + $request = Request::create('/'); + $response = $kernel->handle($request); + $kernel->terminate($request, $response); + + $events = $stopwatch->getSectionEvents($response->headers->get('X-Debug-Token')); + $this->assertEquals(array( + '__section__', + 'kernel.request', + 'kernel.controller', + 'kernel.controller_arguments', + 'controller', + 'kernel.response', + 'kernel.terminate', + ), array_keys($events)); + } + + public function testStopwatchCheckControllerOnRequestEvent() + { + $stopwatch = $this->getMockBuilder('Symfony\Component\Stopwatch\Stopwatch') + ->setMethods(array('isStarted')) + ->getMock(); + $stopwatch->expects($this->once()) + ->method('isStarted') + ->will($this->returnValue(false)); + + $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch); + + $kernel = $this->getHttpKernel($dispatcher, function () { return new Response(); }); + $request = Request::create('/'); + $kernel->handle($request); + } + + public function testStopwatchStopControllerOnRequestEvent() + { + $stopwatch = $this->getMockBuilder('Symfony\Component\Stopwatch\Stopwatch') + ->setMethods(array('isStarted', 'stop', 'stopSection')) + ->getMock(); + $stopwatch->expects($this->once()) + ->method('isStarted') + ->will($this->returnValue(true)); + $stopwatch->expects($this->once()) + ->method('stop'); + $stopwatch->expects($this->once()) + ->method('stopSection'); + + $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch); + + $kernel = $this->getHttpKernel($dispatcher, function () { return new Response(); }); + $request = Request::create('/'); + $kernel->handle($request); + } + + public function testAddListenerNested() + { + $called1 = false; + $called2 = false; + $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); + $dispatcher->addListener('my-event', function () use ($dispatcher, &$called1, &$called2) { + $called1 = true; + $dispatcher->addListener('my-event', function () use (&$called2) { + $called2 = true; + }); + }); + $dispatcher->dispatch('my-event'); + $this->assertTrue($called1); + $this->assertFalse($called2); + $dispatcher->dispatch('my-event'); + $this->assertTrue($called2); + } + + public function testListenerCanRemoveItselfWhenExecuted() + { + $eventDispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); + $listener1 = function () use ($eventDispatcher, &$listener1) { + $eventDispatcher->removeListener('foo', $listener1); + }; + $eventDispatcher->addListener('foo', $listener1); + $eventDispatcher->addListener('foo', function () {}); + $eventDispatcher->dispatch('foo'); + + $this->assertCount(1, $eventDispatcher->getListeners('foo'), 'expected listener1 to be removed'); + } + + protected function getHttpKernel($dispatcher, $controller) + { + $controllerResolver = $this->getMockBuilder('Symfony\Component\HttpKernel\Controller\ControllerResolverInterface')->getMock(); + $controllerResolver->expects($this->once())->method('getController')->will($this->returnValue($controller)); + $argumentResolver = $this->getMockBuilder('Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface')->getMock(); + $argumentResolver->expects($this->once())->method('getArguments')->will($this->returnValue(array())); + + return new HttpKernel($dispatcher, $controllerResolver, new RequestStack(), $argumentResolver); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/AddClassesToCachePassTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/AddClassesToCachePassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7898756c6c5a10d7a0388cd3149fd1ee32980b6a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/AddClassesToCachePassTest.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\Component\HttpKernel\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\DependencyInjection\AddClassesToCachePass; + +class AddClassesToCachePassTest extends TestCase +{ + public function testExpandClasses() + { + $r = new \ReflectionClass(AddClassesToCachePass::class); + $pass = $r->newInstanceWithoutConstructor(); + $r = new \ReflectionMethod(AddClassesToCachePass::class, 'expandClasses'); + $r->setAccessible(true); + $expand = $r->getClosure($pass); + + $this->assertSame('Foo', $expand(array('Foo'), array())[0]); + $this->assertSame('Foo', $expand(array('\\Foo'), array())[0]); + $this->assertSame('Foo', $expand(array('Foo'), array('\\Foo'))[0]); + $this->assertSame('Foo', $expand(array('Foo'), array('Foo'))[0]); + $this->assertSame('Foo', $expand(array('\\Foo'), array('\\Foo\\Bar'))[0]); + $this->assertSame('Foo', $expand(array('Foo'), array('\\Foo\\Bar'))[0]); + $this->assertSame('Foo', $expand(array('\\Foo'), array('\\Foo\\Bar\\Acme'))[0]); + + $this->assertSame('Foo\\Bar', $expand(array('Foo\\'), array('\\Foo\\Bar'))[0]); + $this->assertSame('Foo\\Bar\\Acme', $expand(array('Foo\\'), array('\\Foo\\Bar\\Acme'))[0]); + $this->assertEmpty($expand(array('Foo\\'), array('\\Foo'))); + + $this->assertSame('Acme\\Foo\\Bar', $expand(array('**\\Foo\\'), array('\\Acme\\Foo\\Bar'))[0]); + $this->assertEmpty($expand(array('**\\Foo\\'), array('\\Foo\\Bar'))); + $this->assertEmpty($expand(array('**\\Foo\\'), array('\\Acme\\Foo'))); + $this->assertEmpty($expand(array('**\\Foo\\'), array('\\Foo'))); + + $this->assertSame('Acme\\Foo', $expand(array('**\\Foo'), array('\\Acme\\Foo'))[0]); + $this->assertEmpty($expand(array('**\\Foo'), array('\\Acme\\Foo\\AcmeBundle'))); + $this->assertEmpty($expand(array('**\\Foo'), array('\\Acme\\FooBar\\AcmeBundle'))); + + $this->assertSame('Foo\\Acme\\Bar', $expand(array('Foo\\*\\Bar'), array('\\Foo\\Acme\\Bar'))[0]); + $this->assertEmpty($expand(array('Foo\\*\\Bar'), array('\\Foo\\Acme\\Bundle\\Bar'))); + + $this->assertSame('Foo\\Acme\\Bar', $expand(array('Foo\\**\\Bar'), array('\\Foo\\Acme\\Bar'))[0]); + $this->assertSame('Foo\\Acme\\Bundle\\Bar', $expand(array('Foo\\**\\Bar'), array('\\Foo\\Acme\\Bundle\\Bar'))[0]); + + $this->assertSame('Acme\\Bar', $expand(array('*\\Bar'), array('\\Acme\\Bar'))[0]); + $this->assertEmpty($expand(array('*\\Bar'), array('\\Bar'))); + $this->assertEmpty($expand(array('*\\Bar'), array('\\Foo\\Acme\\Bar'))); + + $this->assertSame('Foo\\Acme\\Bar', $expand(array('**\\Bar'), array('\\Foo\\Acme\\Bar'))[0]); + $this->assertSame('Foo\\Acme\\Bundle\\Bar', $expand(array('**\\Bar'), array('\\Foo\\Acme\\Bundle\\Bar'))[0]); + $this->assertEmpty($expand(array('**\\Bar'), array('\\Bar'))); + + $this->assertSame('Foo\\Bar', $expand(array('Foo\\*'), array('\\Foo\\Bar'))[0]); + $this->assertEmpty($expand(array('Foo\\*'), array('\\Foo\\Acme\\Bar'))); + + $this->assertSame('Foo\\Bar', $expand(array('Foo\\**'), array('\\Foo\\Bar'))[0]); + $this->assertSame('Foo\\Acme\\Bar', $expand(array('Foo\\**'), array('\\Foo\\Acme\\Bar'))[0]); + + $this->assertSame(array('Foo\\Bar'), $expand(array('Foo\\*'), array('Foo\\Bar', 'Foo\\BarTest'))); + $this->assertSame(array('Foo\\Bar', 'Foo\\BarTest'), $expand(array('Foo\\*', 'Foo\\*Test'), array('Foo\\Bar', 'Foo\\BarTest'))); + + $this->assertSame( + 'Acme\\FooBundle\\Controller\\DefaultController', + $expand(array('**Bundle\\Controller\\'), array('\\Acme\\FooBundle\\Controller\\DefaultController'))[0] + ); + + $this->assertSame( + 'FooBundle\\Controller\\DefaultController', + $expand(array('**Bundle\\Controller\\'), array('\\FooBundle\\Controller\\DefaultController'))[0] + ); + + $this->assertSame( + 'Acme\\FooBundle\\Controller\\Bar\\DefaultController', + $expand(array('**Bundle\\Controller\\'), array('\\Acme\\FooBundle\\Controller\\Bar\\DefaultController'))[0] + ); + + $this->assertSame( + 'Bundle\\Controller\\Bar\\DefaultController', + $expand(array('**Bundle\\Controller\\'), array('\\Bundle\\Controller\\Bar\\DefaultController'))[0] + ); + + $this->assertSame( + 'Acme\\Bundle\\Controller\\Bar\\DefaultController', + $expand(array('**Bundle\\Controller\\'), array('\\Acme\\Bundle\\Controller\\Bar\\DefaultController'))[0] + ); + + $this->assertSame('Foo\\Bar', $expand(array('Foo\\Bar'), array())[0]); + $this->assertSame('Foo\\Acme\\Bar', $expand(array('Foo\\**'), array('\\Foo\\Acme\\Bar'))[0]); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/FragmentRendererPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/FragmentRendererPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0129f3a82a520f1e2134297074b8be593aa82031 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/FragmentRendererPassTest.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass; +use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; + +class FragmentRendererPassTest extends TestCase +{ + /** + * Tests that content rendering not implementing FragmentRendererInterface + * trigger an exception. + * + * @expectedException \InvalidArgumentException + */ + public function testContentRendererWithoutInterface() + { + // one service, not implementing any interface + $services = array( + 'my_content_renderer' => array(array('alias' => 'foo')), + ); + + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); + + $builder = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('hasDefinition', 'findTaggedServiceIds', 'getDefinition'))->getMock(); + $builder->expects($this->any()) + ->method('hasDefinition') + ->will($this->returnValue(true)); + + // We don't test kernel.fragment_renderer here + $builder->expects($this->atLeastOnce()) + ->method('findTaggedServiceIds') + ->will($this->returnValue($services)); + + $builder->expects($this->atLeastOnce()) + ->method('getDefinition') + ->will($this->returnValue($definition)); + + $pass = new FragmentRendererPass(); + $pass->process($builder); + } + + public function testValidContentRenderer() + { + $services = array( + 'my_content_renderer' => array(array('alias' => 'foo')), + ); + + $renderer = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); + $renderer + ->expects($this->once()) + ->method('addMethodCall') + ->with('addRendererService', array('foo', 'my_content_renderer')) + ; + + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); + $definition->expects($this->atLeastOnce()) + ->method('getClass') + ->will($this->returnValue('Symfony\Component\HttpKernel\Tests\DependencyInjection\RendererService')); + $definition + ->expects($this->once()) + ->method('isPublic') + ->will($this->returnValue(true)) + ; + + $builder = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('hasDefinition', 'findTaggedServiceIds', 'getDefinition'))->getMock(); + $builder->expects($this->any()) + ->method('hasDefinition') + ->will($this->returnValue(true)); + + // We don't test kernel.fragment_renderer here + $builder->expects($this->atLeastOnce()) + ->method('findTaggedServiceIds') + ->will($this->returnValue($services)); + + $builder->expects($this->atLeastOnce()) + ->method('getDefinition') + ->will($this->onConsecutiveCalls($renderer, $definition)); + + $pass = new FragmentRendererPass(); + $pass->process($builder); + } +} + +class RendererService implements FragmentRendererInterface +{ + public function render($uri, Request $request = null, array $options = array()) + { + } + + public function getName() + { + return 'test'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/LazyLoadingFragmentHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/LazyLoadingFragmentHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..63090d050340c585215c5d1a8a5bd7c14adfb913 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/LazyLoadingFragmentHandlerTest.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\DependencyInjection\LazyLoadingFragmentHandler; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +class LazyLoadingFragmentHandlerTest extends TestCase +{ + public function test() + { + $renderer = $this->getMockBuilder('Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface')->getMock(); + $renderer->expects($this->once())->method('getName')->will($this->returnValue('foo')); + $renderer->expects($this->any())->method('render')->will($this->returnValue(new Response())); + + $requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->getMock(); + $requestStack->expects($this->any())->method('getCurrentRequest')->will($this->returnValue(Request::create('/'))); + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); + $container->expects($this->once())->method('get')->will($this->returnValue($renderer)); + + $handler = new LazyLoadingFragmentHandler($container, $requestStack, false); + $handler->addRendererService('foo', 'foo'); + + $handler->render('/foo', 'foo'); + + // second call should not lazy-load anymore (see once() above on the get() method) + $handler->render('/foo', 'foo'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php new file mode 100644 index 0000000000000000000000000000000000000000..81fc8b455d18366b8555138e22063330b1c8e375 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass; + +class MergeExtensionConfigurationPassTest extends TestCase +{ + public function testAutoloadMainExtension() + { + $container = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\ContainerBuilder')->setMethods(array('getExtensionConfig', 'loadFromExtension', 'getParameterBag', 'getDefinitions', 'getAliases', 'getExtensions'))->getMock(); + $params = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBag')->getMock(); + + $container->expects($this->at(0)) + ->method('getExtensionConfig') + ->with('loaded') + ->will($this->returnValue(array(array()))); + $container->expects($this->at(1)) + ->method('getExtensionConfig') + ->with('notloaded') + ->will($this->returnValue(array())); + $container->expects($this->once()) + ->method('loadFromExtension') + ->with('notloaded', array()); + + $container->expects($this->any()) + ->method('getParameterBag') + ->will($this->returnValue($params)); + $params->expects($this->any()) + ->method('all') + ->will($this->returnValue(array())); + $container->expects($this->any()) + ->method('getDefinitions') + ->will($this->returnValue(array())); + $container->expects($this->any()) + ->method('getAliases') + ->will($this->returnValue(array())); + $container->expects($this->any()) + ->method('getExtensions') + ->will($this->returnValue(array())); + + $configPass = new MergeExtensionConfigurationPass(array('loaded', 'notloaded')); + $configPass->process($container); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f4878f626f05d6e8dd7bd081f9971287c3a0fc5a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\KernelEvents; + +/** + * Test AddRequestFormatsListener class. + * + * @author Gildas Quemener + */ +class AddRequestFormatsListenerTest extends TestCase +{ + /** + * @var AddRequestFormatsListener + */ + private $listener; + + protected function setUp() + { + $this->listener = new AddRequestFormatsListener(array('csv' => array('text/csv', 'text/plain'))); + } + + protected function tearDown() + { + $this->listener = null; + } + + public function testIsAnEventSubscriber() + { + $this->assertInstanceOf('Symfony\Component\EventDispatcher\EventSubscriberInterface', $this->listener); + } + + public function testRegisteredEvent() + { + $this->assertEquals( + array(KernelEvents::REQUEST => array('onKernelRequest', 1)), + AddRequestFormatsListener::getSubscribedEvents() + ); + } + + public function testSetAdditionalFormats() + { + $request = $this->getRequestMock(); + $event = $this->getGetResponseEventMock($request); + + $request->expects($this->once()) + ->method('setFormat') + ->with('csv', array('text/csv', 'text/plain')); + + $this->listener->onKernelRequest($event); + } + + protected function getRequestMock() + { + return $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + } + + protected function getGetResponseEventMock(Request $request) + { + $event = $this + ->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') + ->disableOriginalConstructor() + ->getMock(); + + $event->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)); + + return $event; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d1349906bbe6991ac419d5db2d4a78e0eece6060 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.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\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Psr\Log\LogLevel; +use Symfony\Component\Console\Event\ConsoleEvent; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\ConsoleEvents; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Input\ArgvInput; +use Symfony\Component\Console\Output\ConsoleOutput; +use Symfony\Component\Debug\ErrorHandler; +use Symfony\Component\Debug\ExceptionHandler; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Event\KernelEvent; +use Symfony\Component\HttpKernel\EventListener\DebugHandlersListener; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\KernelEvents; + +/** + * DebugHandlersListenerTest. + * + * @author Nicolas Grekas + */ +class DebugHandlersListenerTest extends TestCase +{ + public function testConfigure() + { + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $userHandler = function () {}; + $listener = new DebugHandlersListener($userHandler, $logger); + $xHandler = new ExceptionHandler(); + $eHandler = new ErrorHandler(); + $eHandler->setExceptionHandler(array($xHandler, 'handle')); + + $exception = null; + set_error_handler(array($eHandler, 'handleError')); + set_exception_handler(array($eHandler, 'handleException')); + try { + $listener->configure(); + } catch (\Exception $exception) { + } + restore_exception_handler(); + restore_error_handler(); + + if (null !== $exception) { + throw $exception; + } + + $this->assertSame($userHandler, $xHandler->setHandler('var_dump')); + + $loggers = $eHandler->setLoggers(array()); + + $this->assertArrayHasKey(E_DEPRECATED, $loggers); + $this->assertSame(array($logger, LogLevel::INFO), $loggers[E_DEPRECATED]); + } + + public function testConfigureForHttpKernelWithNoTerminateWithException() + { + $listener = new DebugHandlersListener(null); + $eHandler = new ErrorHandler(); + $event = new KernelEvent( + $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), + Request::create('/'), + HttpKernelInterface::MASTER_REQUEST + ); + + $exception = null; + $h = set_exception_handler(array($eHandler, 'handleException')); + try { + $listener->configure($event); + } catch (\Exception $exception) { + } + restore_exception_handler(); + + if (null !== $exception) { + throw $exception; + } + + $this->assertNull($h); + } + + public function testConsoleEvent() + { + $dispatcher = new EventDispatcher(); + $listener = new DebugHandlersListener(null); + $app = $this->getMockBuilder('Symfony\Component\Console\Application')->getMock(); + $app->expects($this->once())->method('getHelperSet')->will($this->returnValue(new HelperSet())); + $command = new Command(__FUNCTION__); + $command->setApplication($app); + $event = new ConsoleEvent($command, new ArgvInput(), new ConsoleOutput()); + + $dispatcher->addSubscriber($listener); + + $xListeners = array( + KernelEvents::REQUEST => array(array($listener, 'configure')), + ConsoleEvents::COMMAND => array(array($listener, 'configure')), + ); + $this->assertSame($xListeners, $dispatcher->getListeners()); + + $exception = null; + $eHandler = new ErrorHandler(); + set_error_handler(array($eHandler, 'handleError')); + set_exception_handler(array($eHandler, 'handleException')); + try { + $dispatcher->dispatch(ConsoleEvents::COMMAND, $event); + } catch (\Exception $exception) { + } + restore_exception_handler(); + restore_error_handler(); + + if (null !== $exception) { + throw $exception; + } + + $xHandler = $eHandler->setExceptionHandler('var_dump'); + $this->assertInstanceOf('Closure', $xHandler); + + $app->expects($this->once()) + ->method('renderException'); + + $xHandler(new \Exception()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..332ec55bceb814b65dcbe59eab3230cb9a4c55c0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\ConsoleEvents; +use Symfony\Component\HttpKernel\EventListener\DumpListener; +use Symfony\Component\VarDumper\Cloner\ClonerInterface; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Dumper\DataDumperInterface; +use Symfony\Component\VarDumper\VarDumper; + +/** + * DumpListenerTest. + * + * @author Nicolas Grekas + */ +class DumpListenerTest extends TestCase +{ + public function testSubscribedEvents() + { + $this->assertSame( + array(ConsoleEvents::COMMAND => array('configure', 1024)), + DumpListener::getSubscribedEvents() + ); + } + + public function testConfigure() + { + $prevDumper = VarDumper::setHandler('var_dump'); + VarDumper::setHandler($prevDumper); + + $cloner = new MockCloner(); + $dumper = new MockDumper(); + + ob_start(); + $exception = null; + $listener = new DumpListener($cloner, $dumper); + + try { + $listener->configure(); + + VarDumper::dump('foo'); + VarDumper::dump('bar'); + + $this->assertSame('+foo-+bar-', ob_get_clean()); + } catch (\Exception $exception) { + } + + VarDumper::setHandler($prevDumper); + + if (null !== $exception) { + throw $exception; + } + } +} + +class MockCloner implements ClonerInterface +{ + public function cloneVar($var) + { + return new Data(array($var.'-')); + } +} + +class MockDumper implements DataDumperInterface +{ + public function dump(Data $data) + { + $rawData = $data->getRawData(); + + echo '+'.$rawData[0]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f5501a3f5978dc3bdd33f7dea866ddbedf41a3c7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php @@ -0,0 +1,149 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\EventListener\ExceptionListener; +use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; +use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Tests\Logger; + +/** + * ExceptionListenerTest. + * + * @author Robert Schönthal + * + * @group time-sensitive + */ +class ExceptionListenerTest extends TestCase +{ + public function testConstruct() + { + $logger = new TestLogger(); + $l = new ExceptionListener('foo', $logger); + + $_logger = new \ReflectionProperty(get_class($l), 'logger'); + $_logger->setAccessible(true); + $_controller = new \ReflectionProperty(get_class($l), 'controller'); + $_controller->setAccessible(true); + + $this->assertSame($logger, $_logger->getValue($l)); + $this->assertSame('foo', $_controller->getValue($l)); + } + + /** + * @dataProvider provider + */ + public function testHandleWithoutLogger($event, $event2) + { + $this->iniSet('error_log', file_exists('/dev/null') ? '/dev/null' : 'nul'); + + $l = new ExceptionListener('foo'); + $l->onKernelException($event); + + $this->assertEquals(new Response('foo'), $event->getResponse()); + + try { + $l->onKernelException($event2); + $this->fail('RuntimeException expected'); + } catch (\RuntimeException $e) { + $this->assertSame('bar', $e->getMessage()); + $this->assertSame('foo', $e->getPrevious()->getMessage()); + } + } + + /** + * @dataProvider provider + */ + public function testHandleWithLogger($event, $event2) + { + $logger = new TestLogger(); + + $l = new ExceptionListener('foo', $logger); + $l->onKernelException($event); + + $this->assertEquals(new Response('foo'), $event->getResponse()); + + try { + $l->onKernelException($event2); + $this->fail('RuntimeException expected'); + } catch (\RuntimeException $e) { + $this->assertSame('bar', $e->getMessage()); + $this->assertSame('foo', $e->getPrevious()->getMessage()); + } + + $this->assertEquals(3, $logger->countErrors()); + $this->assertCount(3, $logger->getLogs('critical')); + } + + public function provider() + { + if (!class_exists('Symfony\Component\HttpFoundation\Request')) { + return array(array(null, null)); + } + + $request = new Request(); + $exception = new \Exception('foo'); + $event = new GetResponseForExceptionEvent(new TestKernel(), $request, 'foo', $exception); + $event2 = new GetResponseForExceptionEvent(new TestKernelThatThrowsException(), $request, 'foo', $exception); + + return array( + array($event, $event2), + ); + } + + public function testSubRequestFormat() + { + $listener = new ExceptionListener('foo', $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock()); + + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $kernel->expects($this->once())->method('handle')->will($this->returnCallback(function (Request $request) { + return new Response($request->getRequestFormat()); + })); + + $request = Request::create('/'); + $request->setRequestFormat('xml'); + + $event = new GetResponseForExceptionEvent($kernel, $request, 'foo', new \Exception('foo')); + $listener->onKernelException($event); + + $response = $event->getResponse(); + $this->assertEquals('xml', $response->getContent()); + } +} + +class TestLogger extends Logger implements DebugLoggerInterface +{ + public function countErrors() + { + return count($this->logs['critical']); + } +} + +class TestKernel implements HttpKernelInterface +{ + public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true) + { + return new Response('foo'); + } +} + +class TestKernelThatThrowsException implements HttpKernelInterface +{ + public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true) + { + throw new \RuntimeException('bar'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..464b2ab462f1d7d750f4c271cecc9228987f66ef --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.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\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\EventListener\FragmentListener; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\UriSigner; + +class FragmentListenerTest extends TestCase +{ + public function testOnlyTriggeredOnFragmentRoute() + { + $request = Request::create('http://example.com/foo?_path=foo%3Dbar%26_controller%3Dfoo'); + + $listener = new FragmentListener(new UriSigner('foo')); + $event = $this->createGetResponseEvent($request); + + $expected = $request->attributes->all(); + + $listener->onKernelRequest($event); + + $this->assertEquals($expected, $request->attributes->all()); + $this->assertTrue($request->query->has('_path')); + } + + public function testOnlyTriggeredIfControllerWasNotDefinedYet() + { + $request = Request::create('http://example.com/_fragment?_path=foo%3Dbar%26_controller%3Dfoo'); + $request->attributes->set('_controller', 'bar'); + + $listener = new FragmentListener(new UriSigner('foo')); + $event = $this->createGetResponseEvent($request, HttpKernelInterface::SUB_REQUEST); + + $expected = $request->attributes->all(); + + $listener->onKernelRequest($event); + + $this->assertEquals($expected, $request->attributes->all()); + } + + /** + * @expectedException \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException + */ + public function testAccessDeniedWithNonSafeMethods() + { + $request = Request::create('http://example.com/_fragment', 'POST'); + + $listener = new FragmentListener(new UriSigner('foo')); + $event = $this->createGetResponseEvent($request); + + $listener->onKernelRequest($event); + } + + /** + * @expectedException \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException + */ + public function testAccessDeniedWithWrongSignature() + { + $request = Request::create('http://example.com/_fragment', 'GET', array(), array(), array(), array('REMOTE_ADDR' => '10.0.0.1')); + + $listener = new FragmentListener(new UriSigner('foo')); + $event = $this->createGetResponseEvent($request); + + $listener->onKernelRequest($event); + } + + public function testWithSignature() + { + $signer = new UriSigner('foo'); + $request = Request::create($signer->sign('http://example.com/_fragment?_path=foo%3Dbar%26_controller%3Dfoo'), 'GET', array(), array(), array(), array('REMOTE_ADDR' => '10.0.0.1')); + + $listener = new FragmentListener($signer); + $event = $this->createGetResponseEvent($request); + + $listener->onKernelRequest($event); + + $this->assertEquals(array('foo' => 'bar', '_controller' => 'foo'), $request->attributes->get('_route_params')); + $this->assertFalse($request->query->has('_path')); + } + + public function testRemovesPathWithControllerDefined() + { + $request = Request::create('http://example.com/_fragment?_path=foo%3Dbar%26_controller%3Dfoo'); + + $listener = new FragmentListener(new UriSigner('foo')); + $event = $this->createGetResponseEvent($request, HttpKernelInterface::SUB_REQUEST); + + $listener->onKernelRequest($event); + + $this->assertFalse($request->query->has('_path')); + } + + public function testRemovesPathWithControllerNotDefined() + { + $signer = new UriSigner('foo'); + $request = Request::create($signer->sign('http://example.com/_fragment?_path=foo%3Dbar'), 'GET', array(), array(), array(), array('REMOTE_ADDR' => '10.0.0.1')); + + $listener = new FragmentListener($signer); + $event = $this->createGetResponseEvent($request); + + $listener->onKernelRequest($event); + + $this->assertFalse($request->query->has('_path')); + } + + private function createGetResponseEvent(Request $request, $requestType = HttpKernelInterface::MASTER_REQUEST) + { + return new GetResponseEvent($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $request, $requestType); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2ce32819e19e44004469be0e7f492b26cf7af699 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\EventListener\LocaleListener; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; + +class LocaleListenerTest extends TestCase +{ + private $requestStack; + + protected function setUp() + { + $this->requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->disableOriginalConstructor()->getMock(); + } + + public function testDefaultLocaleWithoutSession() + { + $listener = new LocaleListener($this->requestStack, 'fr'); + $event = $this->getEvent($request = Request::create('/')); + + $listener->onKernelRequest($event); + $this->assertEquals('fr', $request->getLocale()); + } + + public function testLocaleFromRequestAttribute() + { + $request = Request::create('/'); + session_name('foo'); + $request->cookies->set('foo', 'value'); + + $request->attributes->set('_locale', 'es'); + $listener = new LocaleListener($this->requestStack, 'fr'); + $event = $this->getEvent($request); + + $listener->onKernelRequest($event); + $this->assertEquals('es', $request->getLocale()); + } + + public function testLocaleSetForRoutingContext() + { + // the request context is updated + $context = $this->getMockBuilder('Symfony\Component\Routing\RequestContext')->getMock(); + $context->expects($this->once())->method('setParameter')->with('_locale', 'es'); + + $router = $this->getMockBuilder('Symfony\Component\Routing\Router')->setMethods(array('getContext'))->disableOriginalConstructor()->getMock(); + $router->expects($this->once())->method('getContext')->will($this->returnValue($context)); + + $request = Request::create('/'); + + $request->attributes->set('_locale', 'es'); + $listener = new LocaleListener($this->requestStack, 'fr', $router); + $listener->onKernelRequest($this->getEvent($request)); + } + + public function testRouterResetWithParentRequestOnKernelFinishRequest() + { + // the request context is updated + $context = $this->getMockBuilder('Symfony\Component\Routing\RequestContext')->getMock(); + $context->expects($this->once())->method('setParameter')->with('_locale', 'es'); + + $router = $this->getMockBuilder('Symfony\Component\Routing\Router')->setMethods(array('getContext'))->disableOriginalConstructor()->getMock(); + $router->expects($this->once())->method('getContext')->will($this->returnValue($context)); + + $parentRequest = Request::create('/'); + $parentRequest->setLocale('es'); + + $this->requestStack->expects($this->once())->method('getParentRequest')->will($this->returnValue($parentRequest)); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\FinishRequestEvent')->disableOriginalConstructor()->getMock(); + + $listener = new LocaleListener($this->requestStack, 'fr', $router); + $listener->onKernelFinishRequest($event); + } + + public function testRequestLocaleIsNotOverridden() + { + $request = Request::create('/'); + $request->setLocale('de'); + $listener = new LocaleListener($this->requestStack, 'fr'); + $event = $this->getEvent($request); + + $listener->onKernelRequest($event); + $this->assertEquals('de', $request->getLocale()); + } + + private function getEvent(Request $request) + { + return new GetResponseEvent($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $request, HttpKernelInterface::MASTER_REQUEST); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..751aee8695f37d23c0a11eacaa6a708e13b4d396 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpKernel\EventListener\ProfilerListener; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\HttpKernel\Event\PostResponseEvent; +use Symfony\Component\HttpKernel\Exception\HttpException; +use Symfony\Component\HttpKernel\Kernel; + +class ProfilerListenerTest extends TestCase +{ + /** + * Test a master and sub request with an exception and `onlyException` profiler option enabled. + */ + public function testKernelTerminate() + { + $profile = $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profile') + ->disableOriginalConstructor() + ->getMock(); + + $profiler = $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler') + ->disableOriginalConstructor() + ->getMock(); + + $profiler->expects($this->once()) + ->method('collect') + ->will($this->returnValue($profile)); + + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + + $masterRequest = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request') + ->disableOriginalConstructor() + ->getMock(); + + $subRequest = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request') + ->disableOriginalConstructor() + ->getMock(); + + $response = $this->getMockBuilder('Symfony\Component\HttpFoundation\Response') + ->disableOriginalConstructor() + ->getMock(); + + $requestStack = new RequestStack(); + $requestStack->push($masterRequest); + + $onlyException = true; + $listener = new ProfilerListener($profiler, $requestStack, null, $onlyException); + + // master request + $listener->onKernelResponse(new FilterResponseEvent($kernel, $masterRequest, Kernel::MASTER_REQUEST, $response)); + + // sub request + $listener->onKernelException(new GetResponseForExceptionEvent($kernel, $subRequest, Kernel::SUB_REQUEST, new HttpException(404))); + $listener->onKernelResponse(new FilterResponseEvent($kernel, $subRequest, Kernel::SUB_REQUEST, $response)); + + $listener->onKernelTerminate(new PostResponseEvent($kernel, $masterRequest, $response)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..12a31eb3eeedfb2f3fe0d6ce030267c0bf892d9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\EventListener\ResponseListener; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\EventDispatcher\EventDispatcher; + +class ResponseListenerTest extends TestCase +{ + private $dispatcher; + + private $kernel; + + protected function setUp() + { + $this->dispatcher = new EventDispatcher(); + $listener = new ResponseListener('UTF-8'); + $this->dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + + $this->kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + } + + protected function tearDown() + { + $this->dispatcher = null; + $this->kernel = null; + } + + public function testFilterDoesNothingForSubRequests() + { + $response = new Response('foo'); + + $event = new FilterResponseEvent($this->kernel, new Request(), HttpKernelInterface::SUB_REQUEST, $response); + $this->dispatcher->dispatch(KernelEvents::RESPONSE, $event); + + $this->assertEquals('', $event->getResponse()->headers->get('content-type')); + } + + public function testFilterSetsNonDefaultCharsetIfNotOverridden() + { + $listener = new ResponseListener('ISO-8859-15'); + $this->dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse'), 1); + + $response = new Response('foo'); + + $event = new FilterResponseEvent($this->kernel, Request::create('/'), HttpKernelInterface::MASTER_REQUEST, $response); + $this->dispatcher->dispatch(KernelEvents::RESPONSE, $event); + + $this->assertEquals('ISO-8859-15', $response->getCharset()); + } + + public function testFilterDoesNothingIfCharsetIsOverridden() + { + $listener = new ResponseListener('ISO-8859-15'); + $this->dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse'), 1); + + $response = new Response('foo'); + $response->setCharset('ISO-8859-1'); + + $event = new FilterResponseEvent($this->kernel, Request::create('/'), HttpKernelInterface::MASTER_REQUEST, $response); + $this->dispatcher->dispatch(KernelEvents::RESPONSE, $event); + + $this->assertEquals('ISO-8859-1', $response->getCharset()); + } + + public function testFiltersSetsNonDefaultCharsetIfNotOverriddenOnNonTextContentType() + { + $listener = new ResponseListener('ISO-8859-15'); + $this->dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse'), 1); + + $response = new Response('foo'); + $request = Request::create('/'); + $request->setRequestFormat('application/json'); + + $event = new FilterResponseEvent($this->kernel, $request, HttpKernelInterface::MASTER_REQUEST, $response); + $this->dispatcher->dispatch(KernelEvents::RESPONSE, $event); + + $this->assertEquals('ISO-8859-15', $response->getCharset()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d06679bfe3fe3b369b776f3d99089f92bebadfe8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php @@ -0,0 +1,158 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\EventListener\RouterListener; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\Routing\RequestContext; + +class RouterListenerTest extends TestCase +{ + private $requestStack; + + protected function setUp() + { + $this->requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->disableOriginalConstructor()->getMock(); + } + + /** + * @dataProvider getPortData + */ + public function testPort($defaultHttpPort, $defaultHttpsPort, $uri, $expectedHttpPort, $expectedHttpsPort) + { + $urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\UrlMatcherInterface') + ->disableOriginalConstructor() + ->getMock(); + $context = new RequestContext(); + $context->setHttpPort($defaultHttpPort); + $context->setHttpsPort($defaultHttpsPort); + $urlMatcher->expects($this->any()) + ->method('getContext') + ->will($this->returnValue($context)); + + $listener = new RouterListener($urlMatcher, $this->requestStack); + $event = $this->createGetResponseEventForUri($uri); + $listener->onKernelRequest($event); + + $this->assertEquals($expectedHttpPort, $context->getHttpPort()); + $this->assertEquals($expectedHttpsPort, $context->getHttpsPort()); + $this->assertEquals(0 === strpos($uri, 'https') ? 'https' : 'http', $context->getScheme()); + } + + public function getPortData() + { + return array( + array(80, 443, 'http://localhost/', 80, 443), + array(80, 443, 'http://localhost:90/', 90, 443), + array(80, 443, 'https://localhost/', 80, 443), + array(80, 443, 'https://localhost:90/', 80, 90), + ); + } + + /** + * @param string $uri + * + * @return GetResponseEvent + */ + private function createGetResponseEventForUri($uri) + { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $request = Request::create($uri); + $request->attributes->set('_controller', null); // Prevents going in to routing process + + return new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testInvalidMatcher() + { + new RouterListener(new \stdClass(), $this->requestStack); + } + + public function testRequestMatcher() + { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $request = Request::create('http://localhost/'); + $event = new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); + + $requestMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\RequestMatcherInterface')->getMock(); + $requestMatcher->expects($this->once()) + ->method('matchRequest') + ->with($this->isInstanceOf('Symfony\Component\HttpFoundation\Request')) + ->will($this->returnValue(array())); + + $listener = new RouterListener($requestMatcher, $this->requestStack, new RequestContext()); + $listener->onKernelRequest($event); + } + + public function testSubRequestWithDifferentMethod() + { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $request = Request::create('http://localhost/', 'post'); + $event = new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); + + $requestMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\RequestMatcherInterface')->getMock(); + $requestMatcher->expects($this->any()) + ->method('matchRequest') + ->with($this->isInstanceOf('Symfony\Component\HttpFoundation\Request')) + ->will($this->returnValue(array())); + + $context = new RequestContext(); + + $listener = new RouterListener($requestMatcher, $this->requestStack, new RequestContext()); + $listener->onKernelRequest($event); + + // sub-request with another HTTP method + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $request = Request::create('http://localhost/', 'get'); + $event = new GetResponseEvent($kernel, $request, HttpKernelInterface::SUB_REQUEST); + + $listener->onKernelRequest($event); + + $this->assertEquals('GET', $context->getMethod()); + } + + /** + * @dataProvider getLoggingParameterData + */ + public function testLoggingParameter($parameter, $log, $parameters) + { + $requestMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\RequestMatcherInterface')->getMock(); + $requestMatcher->expects($this->once()) + ->method('matchRequest') + ->will($this->returnValue($parameter)); + + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger->expects($this->once()) + ->method('info') + ->with($this->equalTo($log), $this->equalTo($parameters)); + + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $request = Request::create('http://localhost/'); + + $listener = new RouterListener($requestMatcher, $this->requestStack, new RequestContext(), $logger); + $listener->onKernelRequest(new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST)); + } + + public function getLoggingParameterData() + { + return array( + array(array('_route' => 'foo'), 'Matched route "{route}".', array('route' => 'foo', 'route_parameters' => array('_route' => 'foo'), 'request_uri' => 'http://localhost/', 'method' => 'GET')), + array(array(), 'Matched route "{route}".', array('route' => 'n/a', 'route_parameters' => array(), 'request_uri' => 'http://localhost/', 'method' => 'GET')), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/SurrogateListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/SurrogateListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1e79ebe0523911e80a021cf705c9b1436ce9ee03 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/SurrogateListenerTest.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\HttpCache\Esi; +use Symfony\Component\HttpKernel\EventListener\SurrogateListener; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\EventDispatcher\EventDispatcher; + +class SurrogateListenerTest extends TestCase +{ + public function testFilterDoesNothingForSubRequests() + { + $dispatcher = new EventDispatcher(); + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $response = new Response('foo '); + $listener = new SurrogateListener(new Esi()); + + $dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + $event = new FilterResponseEvent($kernel, new Request(), HttpKernelInterface::SUB_REQUEST, $response); + $dispatcher->dispatch(KernelEvents::RESPONSE, $event); + + $this->assertEquals('', $event->getResponse()->headers->get('Surrogate-Control')); + } + + public function testFilterWhenThereIsSomeEsiIncludes() + { + $dispatcher = new EventDispatcher(); + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $response = new Response('foo '); + $listener = new SurrogateListener(new Esi()); + + $dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + $event = new FilterResponseEvent($kernel, new Request(), HttpKernelInterface::MASTER_REQUEST, $response); + $dispatcher->dispatch(KernelEvents::RESPONSE, $event); + + $this->assertEquals('content="ESI/1.0"', $event->getResponse()->headers->get('Surrogate-Control')); + } + + public function testFilterWhenThereIsNoEsiIncludes() + { + $dispatcher = new EventDispatcher(); + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $response = new Response('foo'); + $listener = new SurrogateListener(new Esi()); + + $dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + $event = new FilterResponseEvent($kernel, new Request(), HttpKernelInterface::MASTER_REQUEST, $response); + $dispatcher->dispatch(KernelEvents::RESPONSE, $event); + + $this->assertEquals('', $event->getResponse()->headers->get('Surrogate-Control')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..52794e0272832812a45d4c113d1d7af301a0b77f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpFoundation\Session\SessionInterface; + +/** + * SessionListenerTest. + * + * Tests SessionListener. + * + * @author Bulat Shakirzyanov + */ +class TestSessionListenerTest extends TestCase +{ + /** + * @var TestSessionListener + */ + private $listener; + + /** + * @var SessionInterface + */ + private $session; + + protected function setUp() + { + $this->listener = $this->getMockForAbstractClass('Symfony\Component\HttpKernel\EventListener\TestSessionListener'); + $this->session = $this->getSession(); + } + + public function testShouldSaveMasterRequestSession() + { + $this->sessionHasBeenStarted(); + $this->sessionMustBeSaved(); + + $this->filterResponse(new Request()); + } + + public function testShouldNotSaveSubRequestSession() + { + $this->sessionMustNotBeSaved(); + + $this->filterResponse(new Request(), HttpKernelInterface::SUB_REQUEST); + } + + public function testDoesNotDeleteCookieIfUsingSessionLifetime() + { + $this->sessionHasBeenStarted(); + + $params = session_get_cookie_params(); + session_set_cookie_params(0, $params['path'], $params['domain'], $params['secure'], $params['httponly']); + + $response = $this->filterResponse(new Request(), HttpKernelInterface::MASTER_REQUEST); + $cookies = $response->headers->getCookies(); + + $this->assertEquals(0, reset($cookies)->getExpiresTime()); + } + + public function testUnstartedSessionIsNotSave() + { + $this->sessionHasNotBeenStarted(); + $this->sessionMustNotBeSaved(); + + $this->filterResponse(new Request()); + } + + private function filterResponse(Request $request, $type = HttpKernelInterface::MASTER_REQUEST) + { + $request->setSession($this->session); + $response = new Response(); + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $event = new FilterResponseEvent($kernel, $request, $type, $response); + + $this->listener->onKernelResponse($event); + + $this->assertSame($response, $event->getResponse()); + + return $response; + } + + private function sessionMustNotBeSaved() + { + $this->session->expects($this->never()) + ->method('save'); + } + + private function sessionMustBeSaved() + { + $this->session->expects($this->once()) + ->method('save'); + } + + private function sessionHasBeenStarted() + { + $this->session->expects($this->once()) + ->method('isStarted') + ->will($this->returnValue(true)); + } + + private function sessionHasNotBeenStarted() + { + $this->session->expects($this->once()) + ->method('isStarted') + ->will($this->returnValue(false)); + } + + private function getSession() + { + $mock = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\Session') + ->disableOriginalConstructor() + ->getMock(); + + // set return value for getName() + $mock->expects($this->any())->method('getName')->will($this->returnValue('MOCKSESSID')); + + return $mock; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TranslatorListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TranslatorListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..23b833177ab61932cd28a128c164f76f08544e12 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/TranslatorListenerTest.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Event\FinishRequestEvent; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\EventListener\TranslatorListener; +use Symfony\Component\HttpKernel\HttpKernelInterface; + +class TranslatorListenerTest extends TestCase +{ + private $listener; + private $translator; + private $requestStack; + + protected function setUp() + { + $this->translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock(); + $this->requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->getMock(); + $this->listener = new TranslatorListener($this->translator, $this->requestStack); + } + + public function testLocaleIsSetInOnKernelRequest() + { + $this->translator + ->expects($this->once()) + ->method('setLocale') + ->with($this->equalTo('fr')); + + $event = new GetResponseEvent($this->createHttpKernel(), $this->createRequest('fr'), HttpKernelInterface::MASTER_REQUEST); + $this->listener->onKernelRequest($event); + } + + public function testDefaultLocaleIsUsedOnExceptionsInOnKernelRequest() + { + $this->translator + ->expects($this->at(0)) + ->method('setLocale') + ->will($this->throwException(new \InvalidArgumentException())); + $this->translator + ->expects($this->at(1)) + ->method('setLocale') + ->with($this->equalTo('en')); + + $event = new GetResponseEvent($this->createHttpKernel(), $this->createRequest('fr'), HttpKernelInterface::MASTER_REQUEST); + $this->listener->onKernelRequest($event); + } + + public function testLocaleIsSetInOnKernelFinishRequestWhenParentRequestExists() + { + $this->translator + ->expects($this->once()) + ->method('setLocale') + ->with($this->equalTo('fr')); + + $this->setMasterRequest($this->createRequest('fr')); + $event = new FinishRequestEvent($this->createHttpKernel(), $this->createRequest('de'), HttpKernelInterface::SUB_REQUEST); + $this->listener->onKernelFinishRequest($event); + } + + public function testLocaleIsNotSetInOnKernelFinishRequestWhenParentRequestDoesNotExist() + { + $this->translator + ->expects($this->never()) + ->method('setLocale'); + + $event = new FinishRequestEvent($this->createHttpKernel(), $this->createRequest('de'), HttpKernelInterface::SUB_REQUEST); + $this->listener->onKernelFinishRequest($event); + } + + public function testDefaultLocaleIsUsedOnExceptionsInOnKernelFinishRequest() + { + $this->translator + ->expects($this->at(0)) + ->method('setLocale') + ->will($this->throwException(new \InvalidArgumentException())); + $this->translator + ->expects($this->at(1)) + ->method('setLocale') + ->with($this->equalTo('en')); + + $this->setMasterRequest($this->createRequest('fr')); + $event = new FinishRequestEvent($this->createHttpKernel(), $this->createRequest('de'), HttpKernelInterface::SUB_REQUEST); + $this->listener->onKernelFinishRequest($event); + } + + private function createHttpKernel() + { + return $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + } + + private function createRequest($locale) + { + $request = new Request(); + $request->setLocale($locale); + + return $request; + } + + private function setMasterRequest($request) + { + $this->requestStack + ->expects($this->any()) + ->method('getParentRequest') + ->will($this->returnValue($request)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8311a76e35a03980a996031cfac43db197c82bb1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.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\Component\HttpKernel\Tests\EventListener; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\EventListener\ValidateRequestListener; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\KernelEvents; + +class ValidateRequestListenerTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException + */ + public function testListenerThrowsWhenMasterRequestHasInconsistentClientIps() + { + $dispatcher = new EventDispatcher(); + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + + $request = new Request(); + $request->setTrustedProxies(array('1.1.1.1')); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $request->headers->set('FORWARDED', '2.2.2.2'); + $request->headers->set('X_FORWARDED_FOR', '3.3.3.3'); + + $dispatcher->addListener(KernelEvents::REQUEST, array(new ValidateRequestListener(), 'onKernelRequest')); + $event = new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); + + $dispatcher->dispatch(KernelEvents::REQUEST, $event); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/AccessDeniedHttpExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/AccessDeniedHttpExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2bfcb2bf8030669a3582256530b2b711b1789316 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/AccessDeniedHttpExceptionTest.php @@ -0,0 +1,13 @@ + 'Test')), + array(array('X-Test' => 1)), + array( + array( + array('X-Test' => 'Test'), + array('X-Test-2' => 'Test-2'), + ), + ), + ); + } + + public function testHeadersDefault() + { + $exception = $this->createException(); + $this->assertSame(array(), $exception->getHeaders()); + } + + /** + * @dataProvider headerDataProvider + */ + public function testHeadersConstructor($headers) + { + $exception = new HttpException(200, null, null, $headers); + $this->assertSame($headers, $exception->getHeaders()); + } + + /** + * @dataProvider headerDataProvider + */ + public function testHeadersSetter($headers) + { + $exception = $this->createException(); + $exception->setHeaders($headers); + $this->assertSame($headers, $exception->getHeaders()); + } + + protected function createException() + { + return new HttpException(200); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/LengthRequiredHttpExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/LengthRequiredHttpExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..462d3ca4fcf27f48750b40579903e43ca9c4c2d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/LengthRequiredHttpExceptionTest.php @@ -0,0 +1,13 @@ +assertSame(array('Allow' => 'GET, PUT'), $exception->getHeaders()); + } + + /** + * @dataProvider headerDataProvider + */ + public function testHeadersSetter($headers) + { + $exception = new MethodNotAllowedHttpException(array('GET')); + $exception->setHeaders($headers); + $this->assertSame($headers, $exception->getHeaders()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/NotAcceptableHttpExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/NotAcceptableHttpExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4c0db7a3cb659ef3787d4e928d8ca86da1ac3917 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/NotAcceptableHttpExceptionTest.php @@ -0,0 +1,13 @@ +assertSame(array('Retry-After' => 10), $exception->getHeaders()); + } + + /** + * @dataProvider headerDataProvider + */ + public function testHeadersSetter($headers) + { + $exception = new ServiceUnavailableHttpException(10); + $exception->setHeaders($headers); + $this->assertSame($headers, $exception->getHeaders()); + } + + protected function createException() + { + return new ServiceUnavailableHttpException(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2079bb3380d20b086d6b597ef5501a4eed0ae424 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php @@ -0,0 +1,29 @@ +assertSame(array('Retry-After' => 10), $exception->getHeaders()); + } + + /** + * @dataProvider headerDataProvider + */ + public function testHeadersSetter($headers) + { + $exception = new TooManyRequestsHttpException(10); + $exception->setHeaders($headers); + $this->assertSame($headers, $exception->getHeaders()); + } + + protected function createException() + { + return new TooManyRequestsHttpException(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnauthorizedHttpExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnauthorizedHttpExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..37a0028dc82573de82e916d2041d0bfc06a9f225 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnauthorizedHttpExceptionTest.php @@ -0,0 +1,24 @@ +assertSame(array('WWW-Authenticate' => 'Challenge'), $exception->getHeaders()); + } + + /** + * @dataProvider headerDataProvider + */ + public function testHeadersSetter($headers) + { + $exception = new UnauthorizedHttpException('Challenge'); + $exception->setHeaders($headers); + $this->assertSame($headers, $exception->getHeaders()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnprocessableEntityHttpExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnprocessableEntityHttpExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..760366c6943a18298b7e5694c890e4571ead2463 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnprocessableEntityHttpExceptionTest.php @@ -0,0 +1,28 @@ +setHeaders($headers); + $this->assertSame($headers, $exception->getHeaders()); + } + + protected function createException() + { + return new UnprocessableEntityHttpException(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnsupportedMediaTypeHttpExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnsupportedMediaTypeHttpExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d47287a1fbc69b4250323991ff5add25a288883e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Exception/UnsupportedMediaTypeHttpExceptionTest.php @@ -0,0 +1,23 @@ +setHeaders($headers); + $this->assertSame($headers, $exception->getHeaders()); + } + + protected function createException($headers = array()) + { + return new UnsupportedMediaTypeHttpException(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/123/Kernel123.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/123/Kernel123.php new file mode 100644 index 0000000000000000000000000000000000000000..b6cf1cba20e75f5ad0d53ee0628195a059ce3be4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/123/Kernel123.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\_123; + +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Config\Loader\LoaderInterface; + +class Kernel123 extends Kernel +{ + public function registerBundles() + { + return array(); + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + } + + public function getCacheDir() + { + return sys_get_temp_dir().'/'.Kernel::VERSION.'/kernel123/cache/'.$this->environment; + } + + public function getLogDir() + { + return sys_get_temp_dir().'/'.Kernel::VERSION.'/kernel123/logs'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/foo.txt b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/foo.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/hide.txt b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/hide.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/Resources/foo.txt b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/Resources/foo.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/bar.txt b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/bar.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/foo.txt b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/foo.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle2Bundle/foo.txt b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle2Bundle/foo.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/foo.txt b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/foo.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/hide.txt b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/hide.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/BasicTypesController.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/BasicTypesController.php new file mode 100644 index 0000000000000000000000000000000000000000..e8e0b603467aa19a8f16609dd344b175268d7447 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/BasicTypesController.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\Controller; + +class BasicTypesController +{ + public function action(string $foo, int $bar, float $baz) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/ExtendingRequest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/ExtendingRequest.php new file mode 100644 index 0000000000000000000000000000000000000000..9b4754b46f39db7634a146f27016d658bb03e44c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/ExtendingRequest.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\Controller; + +use Symfony\Component\HttpFoundation\Request; + +class ExtendingRequest extends Request +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/NullableController.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/NullableController.php new file mode 100644 index 0000000000000000000000000000000000000000..9db4df7b4c17334b28b93eb5847ecdf95bbe8441 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/NullableController.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\Controller; + +class NullableController +{ + public function action(?string $foo, ?\stdClass $bar, ?string $baz = 'value', $mandatory) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/VariadicController.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/VariadicController.php new file mode 100644 index 0000000000000000000000000000000000000000..c39812453bb016a745b92c0807a6271f6a74f057 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/VariadicController.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\Controller; + +class VariadicController +{ + public function action($foo, ...$bar) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/DataCollector/CloneVarDataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/DataCollector/CloneVarDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..867ccdce57892bd567bd1e043fca2b3e911ee3f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/DataCollector/CloneVarDataCollector.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\DataCollector; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\DataCollector\DataCollector; + +class CloneVarDataCollector extends DataCollector +{ + private $varToClone; + + public function __construct($varToClone) + { + $this->varToClone = $varToClone; + } + + public function collect(Request $request, Response $response, \Exception $exception = null) + { + $this->data = $this->cloneVar($this->varToClone); + } + + public function getData() + { + return $this->data; + } + + public function getName() + { + return 'clone_var'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..c8bfd36e662f5e103a33ccfca0ad264bd53d077d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class ExtensionAbsentBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/ExtensionLoadedExtension.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/ExtensionLoadedExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..b43bc665a843ed52d1ef290863bea8b688251d7e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/ExtensionLoadedExtension.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionLoadedBundle\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\Extension; + +class ExtensionLoadedExtension extends Extension +{ + public function load(array $configs, ContainerBuilder $container) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/ExtensionLoadedBundle.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/ExtensionLoadedBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..3af81cb07396dc00669251e7ec6890d9cc124b60 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/ExtensionLoadedBundle.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionLoadedBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class ExtensionLoadedBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/DependencyInjection/ExtensionNotValidExtension.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/DependencyInjection/ExtensionNotValidExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..0fd64316fbfcfc72b489e65176f0e379ec230b53 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/DependencyInjection/ExtensionNotValidExtension.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\HttpKernel\Tests\Fixtures\ExtensionNotValidBundle\DependencyInjection; + +class ExtensionNotValidExtension +{ + public function getAlias() + { + return 'extension_not_valid'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/ExtensionNotValidBundle.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/ExtensionNotValidBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..34e2920392be07f26a23e77408278d91f1b4ad74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/ExtensionNotValidBundle.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionNotValidBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class ExtensionNotValidBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..977976b75f88b04d62aa4f9e8aa4e3391c5e9c3d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command; + +use Symfony\Component\Console\Command\Command; + +class FooCommand extends Command +{ + protected function configure() + { + $this->setName('foo'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php new file mode 100644 index 0000000000000000000000000000000000000000..108571718d1be5808518d6801f6f097dd66c118d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\Extension; + +class ExtensionPresentExtension extends Extension +{ + public function load(array $configs, ContainerBuilder $container) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/ExtensionPresentBundle.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/ExtensionPresentBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..36a7ad404abda7ae81f285c6045f6999e39b9dac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/ExtensionPresentBundle.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class ExtensionPresentBundle extends Bundle +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForOverrideName.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForOverrideName.php new file mode 100644 index 0000000000000000000000000000000000000000..a1102ab7843c3f3ba86a89f986e2ca7c4e0fe775 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForOverrideName.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures; + +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Config\Loader\LoaderInterface; + +class KernelForOverrideName extends Kernel +{ + protected $name = 'overridden'; + + public function registerBundles() + { + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5fd61bbc7e7ce0713466f9d3d64f3b2a743119c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures; + +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Config\Loader\LoaderInterface; + +class KernelForTest extends Kernel +{ + public function getBundleMap() + { + return $this->bundleMap; + } + + public function registerBundles() + { + return array(); + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + } + + public function isBooted() + { + return $this->booted; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/BaseBundle/hide.txt b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/BaseBundle/hide.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/Bundle1Bundle/foo.txt b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/Bundle1Bundle/foo.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/ChildBundle/foo.txt b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/ChildBundle/foo.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/FooBundle/foo.txt b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/FooBundle/foo.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php new file mode 100644 index 0000000000000000000000000000000000000000..e7d60cff3d0be77b2f63e7f56157311da4c83889 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures; + +use Symfony\Component\HttpKernel\Client; + +class TestClient extends Client +{ + protected function getScript($request) + { + $script = parent::getScript($request); + + $autoload = file_exists(__DIR__.'/../../vendor/autoload.php') + ? __DIR__.'/../../vendor/autoload.php' + : __DIR__.'/../../../../../../vendor/autoload.php' + ; + + $script = preg_replace('/(\->register\(\);)/', "$0\nrequire_once '$autoload';\n", $script); + + return $script; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php new file mode 100644 index 0000000000000000000000000000000000000000..da7ef5bd603818fa589a20648fd5fa87b42f98dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fixtures; + +use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface; +use Symfony\Component\EventDispatcher\EventDispatcher; + +class TestEventDispatcher extends EventDispatcher implements TraceableEventDispatcherInterface +{ + public function getCalledListeners() + { + return array('foo'); + } + + public function getNotCalledListeners() + { + return array('bar'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/EsiFragmentRendererTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/EsiFragmentRendererTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bfe922e22c76be15c96467b8209456fb9e3862cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/EsiFragmentRendererTest.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fragment; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\Controller\ControllerReference; +use Symfony\Component\HttpKernel\Fragment\EsiFragmentRenderer; +use Symfony\Component\HttpKernel\HttpCache\Esi; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\UriSigner; + +class EsiFragmentRendererTest extends TestCase +{ + public function testRenderFallbackToInlineStrategyIfEsiNotSupported() + { + $strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy(true)); + $strategy->render('/', Request::create('/')); + } + + /** + * @group legacy + * @expectedDeprecation Passing non-scalar values as part of URI attributes to the ESI and SSI rendering strategies is deprecated %s. + */ + public function testRenderFallbackWithObjectAttributesIsDeprecated() + { + $strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy(true), new UriSigner('foo')); + $request = Request::create('/'); + $reference = new ControllerReference('main_controller', array('foo' => array('a' => array(), 'b' => new \stdClass())), array()); + $strategy->render($reference, $request); + } + + public function testRender() + { + $strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy()); + + $request = Request::create('/'); + $request->setLocale('fr'); + $request->headers->set('Surrogate-Capability', 'ESI/1.0'); + + $this->assertEquals('', $strategy->render('/', $request)->getContent()); + $this->assertEquals("\n", $strategy->render('/', $request, array('comment' => 'This is a comment'))->getContent()); + $this->assertEquals('', $strategy->render('/', $request, array('alt' => 'foo'))->getContent()); + } + + public function testRenderControllerReference() + { + $signer = new UriSigner('foo'); + $strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy(), $signer); + + $request = Request::create('/'); + $request->setLocale('fr'); + $request->headers->set('Surrogate-Capability', 'ESI/1.0'); + + $reference = new ControllerReference('main_controller', array(), array()); + $altReference = new ControllerReference('alt_controller', array(), array()); + + $this->assertEquals( + '', + $strategy->render($reference, $request, array('alt' => $altReference))->getContent() + ); + } + + /** + * @expectedException \LogicException + */ + public function testRenderControllerReferenceWithoutSignerThrowsException() + { + $strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy()); + + $request = Request::create('/'); + $request->setLocale('fr'); + $request->headers->set('Surrogate-Capability', 'ESI/1.0'); + + $strategy->render(new ControllerReference('main_controller'), $request); + } + + /** + * @expectedException \LogicException + */ + public function testRenderAltControllerReferenceWithoutSignerThrowsException() + { + $strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy()); + + $request = Request::create('/'); + $request->setLocale('fr'); + $request->headers->set('Surrogate-Capability', 'ESI/1.0'); + + $strategy->render('/', $request, array('alt' => new ControllerReference('alt_controller'))); + } + + private function getInlineStrategy($called = false) + { + $inline = $this->getMockBuilder('Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer')->disableOriginalConstructor()->getMock(); + + if ($called) { + $inline->expects($this->once())->method('render'); + } + + return $inline; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9c906b50a0bea467f42b03d8909532c6984c009d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.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\Component\HttpKernel\Tests\Fragment; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\Fragment\FragmentHandler; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * @group time-sensitive + */ +class FragmentHandlerTest extends TestCase +{ + private $requestStack; + + protected function setUp() + { + $this->requestStack = $this->getMockBuilder('Symfony\\Component\\HttpFoundation\\RequestStack') + ->disableOriginalConstructor() + ->getMock() + ; + $this->requestStack + ->expects($this->any()) + ->method('getCurrentRequest') + ->will($this->returnValue(Request::create('/'))) + ; + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testRenderWhenRendererDoesNotExist() + { + $handler = new FragmentHandler($this->requestStack); + $handler->render('/', 'foo'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testRenderWithUnknownRenderer() + { + $handler = $this->getHandler($this->returnValue(new Response('foo'))); + + $handler->render('/', 'bar'); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage Error when rendering "http://localhost/" (Status code is 404). + */ + public function testDeliverWithUnsuccessfulResponse() + { + $handler = $this->getHandler($this->returnValue(new Response('foo', 404))); + + $handler->render('/', 'foo'); + } + + public function testRender() + { + $handler = $this->getHandler($this->returnValue(new Response('foo')), array('/', Request::create('/'), array('foo' => 'foo', 'ignore_errors' => true))); + + $this->assertEquals('foo', $handler->render('/', 'foo', array('foo' => 'foo'))); + } + + protected function getHandler($returnValue, $arguments = array()) + { + $renderer = $this->getMockBuilder('Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface')->getMock(); + $renderer + ->expects($this->any()) + ->method('getName') + ->will($this->returnValue('foo')) + ; + $e = $renderer + ->expects($this->any()) + ->method('render') + ->will($returnValue) + ; + + if ($arguments) { + call_user_func_array(array($e, 'with'), $arguments); + } + + $handler = new FragmentHandler($this->requestStack); + $handler->addRenderer($renderer); + + return $handler; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1be052e5e62fdbc37f1caaedbbacf301a64909e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fragment; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\Controller\ControllerReference; +use Symfony\Component\HttpKernel\Fragment\HIncludeFragmentRenderer; +use Symfony\Component\HttpKernel\UriSigner; +use Symfony\Component\HttpFoundation\Request; + +class HIncludeFragmentRendererTest extends TestCase +{ + /** + * @expectedException \LogicException + */ + public function testRenderExceptionWhenControllerAndNoSigner() + { + $strategy = new HIncludeFragmentRenderer(); + $strategy->render(new ControllerReference('main_controller', array(), array()), Request::create('/')); + } + + public function testRenderWithControllerAndSigner() + { + $strategy = new HIncludeFragmentRenderer(null, new UriSigner('foo')); + + $this->assertEquals('', $strategy->render(new ControllerReference('main_controller', array(), array()), Request::create('/'))->getContent()); + } + + public function testRenderWithUri() + { + $strategy = new HIncludeFragmentRenderer(); + $this->assertEquals('', $strategy->render('/foo', Request::create('/'))->getContent()); + + $strategy = new HIncludeFragmentRenderer(null, new UriSigner('foo')); + $this->assertEquals('', $strategy->render('/foo', Request::create('/'))->getContent()); + } + + public function testRenderWithDefault() + { + // only default + $strategy = new HIncludeFragmentRenderer(); + $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default'))->getContent()); + + // only global default + $strategy = new HIncludeFragmentRenderer(null, null, 'global_default'); + $this->assertEquals('global_default', $strategy->render('/foo', Request::create('/'), array())->getContent()); + + // global default and default + $strategy = new HIncludeFragmentRenderer(null, null, 'global_default'); + $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default'))->getContent()); + } + + public function testRenderWithAttributesOptions() + { + // with id + $strategy = new HIncludeFragmentRenderer(); + $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default', 'id' => 'bar'))->getContent()); + + // with attributes + $strategy = new HIncludeFragmentRenderer(); + $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default', 'attributes' => array('p1' => 'v1', 'p2' => 'v2')))->getContent()); + + // with id & attributes + $strategy = new HIncludeFragmentRenderer(); + $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default', 'id' => 'bar', 'attributes' => array('p1' => 'v1', 'p2' => 'v2')))->getContent()); + } + + public function testRenderWithDefaultText() + { + $engine = $this->getMockBuilder('Symfony\\Component\\Templating\\EngineInterface')->getMock(); + $engine->expects($this->once()) + ->method('exists') + ->with('default') + ->will($this->throwException(new \InvalidArgumentException())); + + // only default + $strategy = new HIncludeFragmentRenderer($engine); + $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default'))->getContent()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4864cfb74899f0f9e8af7135be3d6f00d5140c4c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php @@ -0,0 +1,253 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fragment; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpKernel\Controller\ArgumentResolver; +use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; +use Symfony\Component\HttpKernel\Controller\ControllerReference; +use Symfony\Component\HttpKernel\HttpKernel; +use Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\EventDispatcher\EventDispatcher; + +class InlineFragmentRendererTest extends TestCase +{ + public function testRender() + { + $strategy = new InlineFragmentRenderer($this->getKernel($this->returnValue(new Response('foo')))); + + $this->assertEquals('foo', $strategy->render('/', Request::create('/'))->getContent()); + } + + public function testRenderWithControllerReference() + { + $strategy = new InlineFragmentRenderer($this->getKernel($this->returnValue(new Response('foo')))); + + $this->assertEquals('foo', $strategy->render(new ControllerReference('main_controller', array(), array()), Request::create('/'))->getContent()); + } + + public function testRenderWithObjectsAsAttributes() + { + $object = new \stdClass(); + + $subRequest = Request::create('/_fragment?_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dmain_controller'); + $subRequest->attributes->replace(array('object' => $object, '_format' => 'html', '_controller' => 'main_controller', '_locale' => 'en')); + $subRequest->headers->set('x-forwarded-for', array('127.0.0.1')); + $subRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); + + $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($subRequest)); + + $strategy->render(new ControllerReference('main_controller', array('object' => $object), array()), Request::create('/')); + } + + /** + * @group legacy + */ + public function testRenderWithObjectsAsAttributesPassedAsObjectsInTheControllerLegacy() + { + $resolver = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver')->setMethods(array('getController'))->getMock(); + $resolver + ->expects($this->once()) + ->method('getController') + ->will($this->returnValue(function (\stdClass $object, Bar $object1) { + return new Response($object1->getBar()); + })) + ; + + $kernel = new HttpKernel(new EventDispatcher(), $resolver, new RequestStack()); + $renderer = new InlineFragmentRenderer($kernel); + + $response = $renderer->render(new ControllerReference('main_controller', array('object' => new \stdClass(), 'object1' => new Bar()), array()), Request::create('/')); + $this->assertEquals('bar', $response->getContent()); + } + + /** + * @group legacy + */ + public function testRenderWithObjectsAsAttributesPassedAsObjectsInTheController() + { + $resolver = $this->getMockBuilder(ControllerResolverInterface::class)->getMock(); + $resolver + ->expects($this->once()) + ->method('getController') + ->will($this->returnValue(function (\stdClass $object, Bar $object1) { + return new Response($object1->getBar()); + })) + ; + + $kernel = new HttpKernel(new EventDispatcher(), $resolver, new RequestStack(), new ArgumentResolver()); + $renderer = new InlineFragmentRenderer($kernel); + + $response = $renderer->render(new ControllerReference('main_controller', array('object' => new \stdClass(), 'object1' => new Bar()), array()), Request::create('/')); + $this->assertEquals('bar', $response->getContent()); + } + + public function testRenderWithTrustedHeaderDisabled() + { + $trustedHeaderName = Request::getTrustedHeaderName(Request::HEADER_CLIENT_IP); + + Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, ''); + + $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest(Request::create('/'))); + $strategy->render('/', Request::create('/')); + + Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, $trustedHeaderName); + } + + /** + * @expectedException \RuntimeException + */ + public function testRenderExceptionNoIgnoreErrors() + { + $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $dispatcher->expects($this->never())->method('dispatch'); + + $strategy = new InlineFragmentRenderer($this->getKernel($this->throwException(new \RuntimeException('foo'))), $dispatcher); + + $this->assertEquals('foo', $strategy->render('/', Request::create('/'))->getContent()); + } + + public function testRenderExceptionIgnoreErrors() + { + $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $dispatcher->expects($this->once())->method('dispatch')->with(KernelEvents::EXCEPTION); + + $strategy = new InlineFragmentRenderer($this->getKernel($this->throwException(new \RuntimeException('foo'))), $dispatcher); + + $this->assertEmpty($strategy->render('/', Request::create('/'), array('ignore_errors' => true))->getContent()); + } + + public function testRenderExceptionIgnoreErrorsWithAlt() + { + $strategy = new InlineFragmentRenderer($this->getKernel($this->onConsecutiveCalls( + $this->throwException(new \RuntimeException('foo')), + $this->returnValue(new Response('bar')) + ))); + + $this->assertEquals('bar', $strategy->render('/', Request::create('/'), array('ignore_errors' => true, 'alt' => '/foo'))->getContent()); + } + + private function getKernel($returnValue) + { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $kernel + ->expects($this->any()) + ->method('handle') + ->will($returnValue) + ; + + return $kernel; + } + + /** + * Creates a Kernel expecting a request equals to $request + * Allows delta in comparison in case REQUEST_TIME changed by 1 second. + */ + private function getKernelExpectingRequest(Request $request) + { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $kernel + ->expects($this->any()) + ->method('handle') + ->with($this->equalTo($request, 1)) + ; + + return $kernel; + } + + public function testExceptionInSubRequestsDoesNotMangleOutputBuffers() + { + $controllerResolver = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface')->getMock(); + $controllerResolver + ->expects($this->once()) + ->method('getController') + ->will($this->returnValue(function () { + ob_start(); + echo 'bar'; + throw new \RuntimeException(); + })) + ; + + $argumentResolver = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface')->getMock(); + $argumentResolver + ->expects($this->once()) + ->method('getArguments') + ->will($this->returnValue(array())) + ; + + $kernel = new HttpKernel(new EventDispatcher(), $controllerResolver, new RequestStack(), $argumentResolver); + $renderer = new InlineFragmentRenderer($kernel); + + // simulate a main request with output buffering + ob_start(); + echo 'Foo'; + + // simulate a sub-request with output buffering and an exception + $renderer->render('/', Request::create('/'), array('ignore_errors' => true)); + + $this->assertEquals('Foo', ob_get_clean()); + } + + public function testESIHeaderIsKeptInSubrequest() + { + $expectedSubRequest = Request::create('/'); + $expectedSubRequest->headers->set('Surrogate-Capability', 'abc="ESI/1.0"'); + + if (Request::getTrustedHeaderName(Request::HEADER_CLIENT_IP)) { + $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); + $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); + } + + $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); + + $request = Request::create('/'); + $request->headers->set('Surrogate-Capability', 'abc="ESI/1.0"'); + $strategy->render('/', $request); + } + + public function testESIHeaderIsKeptInSubrequestWithTrustedHeaderDisabled() + { + $trustedHeaderName = Request::getTrustedHeaderName(Request::HEADER_CLIENT_IP); + Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, ''); + + $this->testESIHeaderIsKeptInSubrequest(); + + Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, $trustedHeaderName); + } + + public function testHeadersPossiblyResultingIn304AreNotAssignedToSubrequest() + { + $expectedSubRequest = Request::create('/'); + if (Request::getTrustedHeaderName(Request::HEADER_CLIENT_IP)) { + $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); + $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); + } + + $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); + $request = Request::create('/', 'GET', array(), array(), array(), array('HTTP_IF_MODIFIED_SINCE' => 'Fri, 01 Jan 2016 00:00:00 GMT', 'HTTP_IF_NONE_MATCH' => '*')); + $strategy->render('/', $request); + } +} + +class Bar +{ + public $bar = 'bar'; + + public function getBar() + { + return $this->bar; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3a040dedd6e54051b77545555583568f8e6cdd92 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.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\HttpKernel\Tests\Fragment; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Controller\ControllerReference; + +class RoutableFragmentRendererTest extends TestCase +{ + /** + * @dataProvider getGenerateFragmentUriData + */ + public function testGenerateFragmentUri($uri, $controller) + { + $this->assertEquals($uri, $this->callGenerateFragmentUriMethod($controller, Request::create('/'))); + } + + /** + * @dataProvider getGenerateFragmentUriData + */ + public function testGenerateAbsoluteFragmentUri($uri, $controller) + { + $this->assertEquals('http://localhost'.$uri, $this->callGenerateFragmentUriMethod($controller, Request::create('/'), true)); + } + + public function getGenerateFragmentUriData() + { + return array( + array('/_fragment?_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array(), array())), + array('/_fragment?_path=_format%3Dxml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array('_format' => 'xml'), array())), + array('/_fragment?_path=foo%3Dfoo%26_format%3Djson%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array('foo' => 'foo', '_format' => 'json'), array())), + array('/_fragment?bar=bar&_path=foo%3Dfoo%26_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array('foo' => 'foo'), array('bar' => 'bar'))), + array('/_fragment?foo=foo&_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array(), array('foo' => 'foo'))), + array('/_fragment?_path=foo%255B0%255D%3Dfoo%26foo%255B1%255D%3Dbar%26_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array('foo' => array('foo', 'bar')), array())), + ); + } + + public function testGenerateFragmentUriWithARequest() + { + $request = Request::create('/'); + $request->attributes->set('_format', 'json'); + $request->setLocale('fr'); + $controller = new ControllerReference('controller', array(), array()); + + $this->assertEquals('/_fragment?_path=_format%3Djson%26_locale%3Dfr%26_controller%3Dcontroller', $this->callGenerateFragmentUriMethod($controller, $request)); + } + + /** + * @expectedException \LogicException + * @dataProvider getGenerateFragmentUriDataWithNonScalar + */ + public function testGenerateFragmentUriWithNonScalar($controller) + { + $this->callGenerateFragmentUriMethod($controller, Request::create('/')); + } + + public function getGenerateFragmentUriDataWithNonScalar() + { + return array( + array(new ControllerReference('controller', array('foo' => new Foo(), 'bar' => 'bar'), array())), + array(new ControllerReference('controller', array('foo' => array('foo' => 'foo'), 'bar' => array('bar' => new Foo())), array())), + ); + } + + private function callGenerateFragmentUriMethod(ControllerReference $reference, Request $request, $absolute = false) + { + $renderer = $this->getMockForAbstractClass('Symfony\Component\HttpKernel\Fragment\RoutableFragmentRenderer'); + $r = new \ReflectionObject($renderer); + $m = $r->getMethod('generateFragmentUri'); + $m->setAccessible(true); + + return $m->invoke($renderer, $reference, $request, $absolute); + } +} + +class Foo +{ + public $foo; + + public function getFoo() + { + return $this->foo; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/SsiFragmentRendererTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/SsiFragmentRendererTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b537625f2401b91d2671bf23b2bf8dcb7c55b0d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Fragment/SsiFragmentRendererTest.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Fragment; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\Controller\ControllerReference; +use Symfony\Component\HttpKernel\Fragment\SsiFragmentRenderer; +use Symfony\Component\HttpKernel\HttpCache\Ssi; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\UriSigner; + +class SsiFragmentRendererTest extends TestCase +{ + public function testRenderFallbackToInlineStrategyIfSsiNotSupported() + { + $strategy = new SsiFragmentRenderer(new Ssi(), $this->getInlineStrategy(true)); + $strategy->render('/', Request::create('/')); + } + + public function testRender() + { + $strategy = new SsiFragmentRenderer(new Ssi(), $this->getInlineStrategy()); + + $request = Request::create('/'); + $request->setLocale('fr'); + $request->headers->set('Surrogate-Capability', 'SSI/1.0'); + + $this->assertEquals('', $strategy->render('/', $request)->getContent()); + $this->assertEquals('', $strategy->render('/', $request, array('comment' => 'This is a comment'))->getContent(), 'Strategy options should not impact the ssi include tag'); + } + + public function testRenderControllerReference() + { + $signer = new UriSigner('foo'); + $strategy = new SsiFragmentRenderer(new Ssi(), $this->getInlineStrategy(), $signer); + + $request = Request::create('/'); + $request->setLocale('fr'); + $request->headers->set('Surrogate-Capability', 'SSI/1.0'); + + $reference = new ControllerReference('main_controller', array(), array()); + $altReference = new ControllerReference('alt_controller', array(), array()); + + $this->assertEquals( + '', + $strategy->render($reference, $request, array('alt' => $altReference))->getContent() + ); + } + + /** + * @expectedException \LogicException + */ + public function testRenderControllerReferenceWithoutSignerThrowsException() + { + $strategy = new SsiFragmentRenderer(new Ssi(), $this->getInlineStrategy()); + + $request = Request::create('/'); + $request->setLocale('fr'); + $request->headers->set('Surrogate-Capability', 'SSI/1.0'); + + $strategy->render(new ControllerReference('main_controller'), $request); + } + + /** + * @expectedException \LogicException + */ + public function testRenderAltControllerReferenceWithoutSignerThrowsException() + { + $strategy = new SsiFragmentRenderer(new Ssi(), $this->getInlineStrategy()); + + $request = Request::create('/'); + $request->setLocale('fr'); + $request->headers->set('Surrogate-Capability', 'SSI/1.0'); + + $strategy->render('/', $request, array('alt' => new ControllerReference('alt_controller'))); + } + + private function getInlineStrategy($called = false) + { + $inline = $this->getMockBuilder('Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer')->disableOriginalConstructor()->getMock(); + + if ($called) { + $inline->expects($this->once())->method('render'); + } + + return $inline; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a8662b2a2b44b852d26cdbc38fffd6d69f969c15 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php @@ -0,0 +1,248 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\HttpCache; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\HttpCache\Esi; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +class EsiTest extends TestCase +{ + public function testHasSurrogateEsiCapability() + { + $esi = new Esi(); + + $request = Request::create('/'); + $request->headers->set('Surrogate-Capability', 'abc="ESI/1.0"'); + $this->assertTrue($esi->hasSurrogateCapability($request)); + + $request = Request::create('/'); + $request->headers->set('Surrogate-Capability', 'foobar'); + $this->assertFalse($esi->hasSurrogateCapability($request)); + + $request = Request::create('/'); + $this->assertFalse($esi->hasSurrogateCapability($request)); + } + + public function testAddSurrogateEsiCapability() + { + $esi = new Esi(); + + $request = Request::create('/'); + $esi->addSurrogateCapability($request); + $this->assertEquals('symfony="ESI/1.0"', $request->headers->get('Surrogate-Capability')); + + $esi->addSurrogateCapability($request); + $this->assertEquals('symfony="ESI/1.0", symfony="ESI/1.0"', $request->headers->get('Surrogate-Capability')); + } + + public function testAddSurrogateControl() + { + $esi = new Esi(); + + $response = new Response('foo '); + $esi->addSurrogateControl($response); + $this->assertEquals('content="ESI/1.0"', $response->headers->get('Surrogate-Control')); + + $response = new Response('foo'); + $esi->addSurrogateControl($response); + $this->assertEquals('', $response->headers->get('Surrogate-Control')); + } + + public function testNeedsEsiParsing() + { + $esi = new Esi(); + + $response = new Response(); + $response->headers->set('Surrogate-Control', 'content="ESI/1.0"'); + $this->assertTrue($esi->needsParsing($response)); + + $response = new Response(); + $this->assertFalse($esi->needsParsing($response)); + } + + public function testRenderIncludeTag() + { + $esi = new Esi(); + + $this->assertEquals('', $esi->renderIncludeTag('/', '/alt', true)); + $this->assertEquals('', $esi->renderIncludeTag('/', '/alt', false)); + $this->assertEquals('', $esi->renderIncludeTag('/')); + $this->assertEquals(''."\n".'', $esi->renderIncludeTag('/', '/alt', true, 'some comment')); + } + + public function testProcessDoesNothingIfContentTypeIsNotHtml() + { + $esi = new Esi(); + + $request = Request::create('/'); + $response = new Response(); + $response->headers->set('Content-Type', 'text/plain'); + $esi->process($request, $response); + + $this->assertFalse($response->headers->has('x-body-eval')); + } + + public function testMultilineEsiRemoveTagsAreRemoved() + { + $esi = new Esi(); + + $request = Request::create('/'); + $response = new Response(' www.example.com Keep this'."\n www.example.com And this"); + $esi->process($request, $response); + + $this->assertEquals(' Keep this And this', $response->getContent()); + } + + public function testCommentTagsAreRemoved() + { + $esi = new Esi(); + + $request = Request::create('/'); + $response = new Response(' Keep this'); + $esi->process($request, $response); + + $this->assertEquals(' Keep this', $response->getContent()); + } + + public function testProcess() + { + $esi = new Esi(); + + $request = Request::create('/'); + $response = new Response('foo '); + $esi->process($request, $response); + + $this->assertEquals('foo surrogate->handle($this, \'...\', \'alt\', true) ?>'."\n", $response->getContent()); + $this->assertEquals('ESI', $response->headers->get('x-body-eval')); + + $response = new Response('foo '); + $esi->process($request, $response); + + $this->assertEquals('foo surrogate->handle($this, \'foo\\\'\', \'bar\\\'\', true) ?>'."\n", $response->getContent()); + + $response = new Response('foo '); + $esi->process($request, $response); + + $this->assertEquals('foo surrogate->handle($this, \'...\', \'\', false) ?>'."\n", $response->getContent()); + + $response = new Response('foo '); + $esi->process($request, $response); + + $this->assertEquals('foo surrogate->handle($this, \'...\', \'\', false) ?>'."\n", $response->getContent()); + } + + public function testProcessEscapesPhpTags() + { + $esi = new Esi(); + + $request = Request::create('/'); + $response = new Response(''); + $esi->process($request, $response); + + $this->assertEquals('php cript language=php>', $response->getContent()); + } + + /** + * @expectedException \RuntimeException + */ + public function testProcessWhenNoSrcInAnEsi() + { + $esi = new Esi(); + + $request = Request::create('/'); + $response = new Response('foo '); + $esi->process($request, $response); + } + + public function testProcessRemoveSurrogateControlHeader() + { + $esi = new Esi(); + + $request = Request::create('/'); + $response = new Response('foo '); + $response->headers->set('Surrogate-Control', 'content="ESI/1.0"'); + $esi->process($request, $response); + $this->assertEquals('ESI', $response->headers->get('x-body-eval')); + + $response->headers->set('Surrogate-Control', 'no-store, content="ESI/1.0"'); + $esi->process($request, $response); + $this->assertEquals('ESI', $response->headers->get('x-body-eval')); + $this->assertEquals('no-store', $response->headers->get('surrogate-control')); + + $response->headers->set('Surrogate-Control', 'content="ESI/1.0", no-store'); + $esi->process($request, $response); + $this->assertEquals('ESI', $response->headers->get('x-body-eval')); + $this->assertEquals('no-store', $response->headers->get('surrogate-control')); + } + + public function testHandle() + { + $esi = new Esi(); + $cache = $this->getCache(Request::create('/'), new Response('foo')); + $this->assertEquals('foo', $esi->handle($cache, '/', '/alt', true)); + } + + /** + * @expectedException \RuntimeException + */ + public function testHandleWhenResponseIsNot200() + { + $esi = new Esi(); + $response = new Response('foo'); + $response->setStatusCode(404); + $cache = $this->getCache(Request::create('/'), $response); + $esi->handle($cache, '/', '/alt', false); + } + + public function testHandleWhenResponseIsNot200AndErrorsAreIgnored() + { + $esi = new Esi(); + $response = new Response('foo'); + $response->setStatusCode(404); + $cache = $this->getCache(Request::create('/'), $response); + $this->assertEquals('', $esi->handle($cache, '/', '/alt', true)); + } + + public function testHandleWhenResponseIsNot200AndAltIsPresent() + { + $esi = new Esi(); + $response1 = new Response('foo'); + $response1->setStatusCode(404); + $response2 = new Response('bar'); + $cache = $this->getCache(Request::create('/'), array($response1, $response2)); + $this->assertEquals('bar', $esi->handle($cache, '/', '/alt', false)); + } + + protected function getCache($request, $response) + { + $cache = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpCache\HttpCache')->setMethods(array('getRequest', 'handle'))->disableOriginalConstructor()->getMock(); + $cache->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + if (is_array($response)) { + $cache->expects($this->any()) + ->method('handle') + ->will(call_user_func_array(array($this, 'onConsecutiveCalls'), $response)) + ; + } else { + $cache->expects($this->any()) + ->method('handle') + ->will($this->returnValue($response)) + ; + } + + return $cache; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d5cf8ca7ae70dc1bfbc7a72c23bc8f7d16990bce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php @@ -0,0 +1,1293 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\HttpCache; + +use Symfony\Component\HttpKernel\HttpCache\HttpCache; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpKernelInterface; + +/** + * @group time-sensitive + */ +class HttpCacheTest extends HttpCacheTestCase +{ + public function testTerminateDelegatesTerminationOnlyForTerminableInterface() + { + $storeMock = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface') + ->disableOriginalConstructor() + ->getMock(); + + // does not implement TerminableInterface + $kernel = new TestKernel(); + $httpCache = new HttpCache($kernel, $storeMock); + $httpCache->terminate(Request::create('/'), new Response()); + + $this->assertFalse($kernel->terminateCalled, 'terminate() is never called if the kernel class does not implement TerminableInterface'); + + // implements TerminableInterface + $kernelMock = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Kernel') + ->disableOriginalConstructor() + ->setMethods(array('terminate', 'registerBundles', 'registerContainerConfiguration')) + ->getMock(); + + $kernelMock->expects($this->once()) + ->method('terminate'); + + $kernel = new HttpCache($kernelMock, $storeMock); + $kernel->terminate(Request::create('/'), new Response()); + } + + public function testPassesOnNonGetHeadRequests() + { + $this->setNextResponse(200); + $this->request('POST', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertResponseOk(); + $this->assertTraceContains('pass'); + $this->assertFalse($this->response->headers->has('Age')); + } + + public function testInvalidatesOnPostPutDeleteRequests() + { + foreach (array('post', 'put', 'delete') as $method) { + $this->setNextResponse(200); + $this->request($method, '/'); + + $this->assertHttpKernelIsCalled(); + $this->assertResponseOk(); + $this->assertTraceContains('invalidate'); + $this->assertTraceContains('pass'); + } + } + + public function testDoesNotCacheWithAuthorizationRequestHeaderAndNonPublicResponse() + { + $this->setNextResponse(200, array('ETag' => '"Foo"')); + $this->request('GET', '/', array('HTTP_AUTHORIZATION' => 'basic foobarbaz')); + + $this->assertHttpKernelIsCalled(); + $this->assertResponseOk(); + $this->assertEquals('private', $this->response->headers->get('Cache-Control')); + + $this->assertTraceContains('miss'); + $this->assertTraceNotContains('store'); + $this->assertFalse($this->response->headers->has('Age')); + } + + public function testDoesCacheWithAuthorizationRequestHeaderAndPublicResponse() + { + $this->setNextResponse(200, array('Cache-Control' => 'public', 'ETag' => '"Foo"')); + $this->request('GET', '/', array('HTTP_AUTHORIZATION' => 'basic foobarbaz')); + + $this->assertHttpKernelIsCalled(); + $this->assertResponseOk(); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + $this->assertTrue($this->response->headers->has('Age')); + $this->assertEquals('public', $this->response->headers->get('Cache-Control')); + } + + public function testDoesNotCacheWithCookieHeaderAndNonPublicResponse() + { + $this->setNextResponse(200, array('ETag' => '"Foo"')); + $this->request('GET', '/', array(), array('foo' => 'bar')); + + $this->assertHttpKernelIsCalled(); + $this->assertResponseOk(); + $this->assertEquals('private', $this->response->headers->get('Cache-Control')); + $this->assertTraceContains('miss'); + $this->assertTraceNotContains('store'); + $this->assertFalse($this->response->headers->has('Age')); + } + + public function testDoesNotCacheRequestsWithACookieHeader() + { + $this->setNextResponse(200); + $this->request('GET', '/', array(), array('foo' => 'bar')); + + $this->assertHttpKernelIsCalled(); + $this->assertResponseOk(); + $this->assertEquals('private', $this->response->headers->get('Cache-Control')); + $this->assertTraceContains('miss'); + $this->assertTraceNotContains('store'); + $this->assertFalse($this->response->headers->has('Age')); + } + + public function testRespondsWith304WhenIfModifiedSinceMatchesLastModified() + { + $time = \DateTime::createFromFormat('U', time()); + + $this->setNextResponse(200, array('Cache-Control' => 'public', 'Last-Modified' => $time->format(DATE_RFC2822), 'Content-Type' => 'text/plain'), 'Hello World'); + $this->request('GET', '/', array('HTTP_IF_MODIFIED_SINCE' => $time->format(DATE_RFC2822))); + + $this->assertHttpKernelIsCalled(); + $this->assertEquals(304, $this->response->getStatusCode()); + $this->assertEquals('', $this->response->headers->get('Content-Type')); + $this->assertEmpty($this->response->getContent()); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + } + + public function testRespondsWith304WhenIfNoneMatchMatchesETag() + { + $this->setNextResponse(200, array('Cache-Control' => 'public', 'ETag' => '12345', 'Content-Type' => 'text/plain'), 'Hello World'); + $this->request('GET', '/', array('HTTP_IF_NONE_MATCH' => '12345')); + + $this->assertHttpKernelIsCalled(); + $this->assertEquals(304, $this->response->getStatusCode()); + $this->assertEquals('', $this->response->headers->get('Content-Type')); + $this->assertTrue($this->response->headers->has('ETag')); + $this->assertEmpty($this->response->getContent()); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + } + + public function testRespondsWith304OnlyIfIfNoneMatchAndIfModifiedSinceBothMatch() + { + $time = \DateTime::createFromFormat('U', time()); + + $this->setNextResponse(200, array(), '', function ($request, $response) use ($time) { + $response->setStatusCode(200); + $response->headers->set('ETag', '12345'); + $response->headers->set('Last-Modified', $time->format(DATE_RFC2822)); + $response->headers->set('Content-Type', 'text/plain'); + $response->setContent('Hello World'); + }); + + // only ETag matches + $t = \DateTime::createFromFormat('U', time() - 3600); + $this->request('GET', '/', array('HTTP_IF_NONE_MATCH' => '12345', 'HTTP_IF_MODIFIED_SINCE' => $t->format(DATE_RFC2822))); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + + // only Last-Modified matches + $this->request('GET', '/', array('HTTP_IF_NONE_MATCH' => '1234', 'HTTP_IF_MODIFIED_SINCE' => $time->format(DATE_RFC2822))); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + + // Both matches + $this->request('GET', '/', array('HTTP_IF_NONE_MATCH' => '12345', 'HTTP_IF_MODIFIED_SINCE' => $time->format(DATE_RFC2822))); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(304, $this->response->getStatusCode()); + } + + public function testIncrementsMaxAgeWhenNoDateIsSpecifiedEventWhenUsingETag() + { + $this->setNextResponse( + 200, + array( + 'ETag' => '1234', + 'Cache-Control' => 'public, s-maxage=60', + ) + ); + + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + + sleep(2); + + $this->request('GET', '/'); + $this->assertHttpKernelIsNotCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceContains('fresh'); + $this->assertEquals(2, $this->response->headers->get('Age')); + } + + public function testValidatesPrivateResponsesCachedOnTheClient() + { + $this->setNextResponse(200, array(), '', function ($request, $response) { + $etags = preg_split('/\s*,\s*/', $request->headers->get('IF_NONE_MATCH')); + if ($request->cookies->has('authenticated')) { + $response->headers->set('Cache-Control', 'private, no-store'); + $response->setETag('"private tag"'); + if (in_array('"private tag"', $etags)) { + $response->setStatusCode(304); + } else { + $response->setStatusCode(200); + $response->headers->set('Content-Type', 'text/plain'); + $response->setContent('private data'); + } + } else { + $response->headers->set('Cache-Control', 'public'); + $response->setETag('"public tag"'); + if (in_array('"public tag"', $etags)) { + $response->setStatusCode(304); + } else { + $response->setStatusCode(200); + $response->headers->set('Content-Type', 'text/plain'); + $response->setContent('public data'); + } + } + }); + + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('"public tag"', $this->response->headers->get('ETag')); + $this->assertEquals('public data', $this->response->getContent()); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + + $this->request('GET', '/', array(), array('authenticated' => '')); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('"private tag"', $this->response->headers->get('ETag')); + $this->assertEquals('private data', $this->response->getContent()); + $this->assertTraceContains('stale'); + $this->assertTraceContains('invalid'); + $this->assertTraceNotContains('store'); + } + + public function testStoresResponsesWhenNoCacheRequestDirectivePresent() + { + $time = \DateTime::createFromFormat('U', time() + 5); + + $this->setNextResponse(200, array('Cache-Control' => 'public', 'Expires' => $time->format(DATE_RFC2822))); + $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'no-cache')); + + $this->assertHttpKernelIsCalled(); + $this->assertTraceContains('store'); + $this->assertTrue($this->response->headers->has('Age')); + } + + public function testReloadsResponsesWhenCacheHitsButNoCacheRequestDirectivePresentWhenAllowReloadIsSetTrue() + { + $count = 0; + + $this->setNextResponse(200, array('Cache-Control' => 'public, max-age=10000'), '', function ($request, $response) use (&$count) { + ++$count; + $response->setContent(1 == $count ? 'Hello World' : 'Goodbye World'); + }); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('store'); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('fresh'); + + $this->cacheConfig['allow_reload'] = true; + $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'no-cache')); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Goodbye World', $this->response->getContent()); + $this->assertTraceContains('reload'); + $this->assertTraceContains('store'); + } + + public function testDoesNotReloadResponsesWhenAllowReloadIsSetFalseDefault() + { + $count = 0; + + $this->setNextResponse(200, array('Cache-Control' => 'public, max-age=10000'), '', function ($request, $response) use (&$count) { + ++$count; + $response->setContent(1 == $count ? 'Hello World' : 'Goodbye World'); + }); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('store'); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('fresh'); + + $this->cacheConfig['allow_reload'] = false; + $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'no-cache')); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceNotContains('reload'); + + $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'no-cache')); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceNotContains('reload'); + } + + public function testRevalidatesFreshCacheEntryWhenMaxAgeRequestDirectiveIsExceededWhenAllowRevalidateOptionIsSetTrue() + { + $count = 0; + + $this->setNextResponse(200, array(), '', function ($request, $response) use (&$count) { + ++$count; + $response->headers->set('Cache-Control', 'public, max-age=10000'); + $response->setETag($count); + $response->setContent(1 == $count ? 'Hello World' : 'Goodbye World'); + }); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('store'); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('fresh'); + + $this->cacheConfig['allow_revalidate'] = true; + $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'max-age=0')); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Goodbye World', $this->response->getContent()); + $this->assertTraceContains('stale'); + $this->assertTraceContains('invalid'); + $this->assertTraceContains('store'); + } + + public function testDoesNotRevalidateFreshCacheEntryWhenEnableRevalidateOptionIsSetFalseDefault() + { + $count = 0; + + $this->setNextResponse(200, array(), '', function ($request, $response) use (&$count) { + ++$count; + $response->headers->set('Cache-Control', 'public, max-age=10000'); + $response->setETag($count); + $response->setContent(1 == $count ? 'Hello World' : 'Goodbye World'); + }); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('store'); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('fresh'); + + $this->cacheConfig['allow_revalidate'] = false; + $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'max-age=0')); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceNotContains('stale'); + $this->assertTraceNotContains('invalid'); + $this->assertTraceContains('fresh'); + + $this->request('GET', '/', array('HTTP_CACHE_CONTROL' => 'max-age=0')); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceNotContains('stale'); + $this->assertTraceNotContains('invalid'); + $this->assertTraceContains('fresh'); + } + + public function testFetchesResponseFromBackendWhenCacheMisses() + { + $time = \DateTime::createFromFormat('U', time() + 5); + $this->setNextResponse(200, array('Cache-Control' => 'public', 'Expires' => $time->format(DATE_RFC2822))); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceContains('miss'); + $this->assertTrue($this->response->headers->has('Age')); + } + + public function testDoesNotCacheSomeStatusCodeResponses() + { + foreach (array_merge(range(201, 202), range(204, 206), range(303, 305), range(400, 403), range(405, 409), range(411, 417), range(500, 505)) as $code) { + $time = \DateTime::createFromFormat('U', time() + 5); + $this->setNextResponse($code, array('Expires' => $time->format(DATE_RFC2822))); + + $this->request('GET', '/'); + $this->assertEquals($code, $this->response->getStatusCode()); + $this->assertTraceNotContains('store'); + $this->assertFalse($this->response->headers->has('Age')); + } + } + + public function testDoesNotCacheResponsesWithExplicitNoStoreDirective() + { + $time = \DateTime::createFromFormat('U', time() + 5); + $this->setNextResponse(200, array('Expires' => $time->format(DATE_RFC2822), 'Cache-Control' => 'no-store')); + + $this->request('GET', '/'); + $this->assertTraceNotContains('store'); + $this->assertFalse($this->response->headers->has('Age')); + } + + public function testDoesNotCacheResponsesWithoutFreshnessInformationOrAValidator() + { + $this->setNextResponse(); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceNotContains('store'); + } + + public function testCachesResponsesWithExplicitNoCacheDirective() + { + $time = \DateTime::createFromFormat('U', time() + 5); + $this->setNextResponse(200, array('Expires' => $time->format(DATE_RFC2822), 'Cache-Control' => 'public, no-cache')); + + $this->request('GET', '/'); + $this->assertTraceContains('store'); + $this->assertTrue($this->response->headers->has('Age')); + } + + public function testCachesResponsesWithAnExpirationHeader() + { + $time = \DateTime::createFromFormat('U', time() + 5); + $this->setNextResponse(200, array('Cache-Control' => 'public', 'Expires' => $time->format(DATE_RFC2822))); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertNotNull($this->response->headers->get('Date')); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + + $values = $this->getMetaStorageValues(); + $this->assertCount(1, $values); + } + + public function testCachesResponsesWithAMaxAgeDirective() + { + $this->setNextResponse(200, array('Cache-Control' => 'public, max-age=5')); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertNotNull($this->response->headers->get('Date')); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + + $values = $this->getMetaStorageValues(); + $this->assertCount(1, $values); + } + + public function testCachesResponsesWithASMaxAgeDirective() + { + $this->setNextResponse(200, array('Cache-Control' => 's-maxage=5')); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertNotNull($this->response->headers->get('Date')); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + + $values = $this->getMetaStorageValues(); + $this->assertCount(1, $values); + } + + public function testCachesResponsesWithALastModifiedValidatorButNoFreshnessInformation() + { + $time = \DateTime::createFromFormat('U', time()); + $this->setNextResponse(200, array('Cache-Control' => 'public', 'Last-Modified' => $time->format(DATE_RFC2822))); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + } + + public function testCachesResponsesWithAnETagValidatorButNoFreshnessInformation() + { + $this->setNextResponse(200, array('Cache-Control' => 'public', 'ETag' => '"123456"')); + + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + } + + public function testHitsCachedResponsesWithExpiresHeader() + { + $time1 = \DateTime::createFromFormat('U', time() - 5); + $time2 = \DateTime::createFromFormat('U', time() + 5); + $this->setNextResponse(200, array('Cache-Control' => 'public', 'Date' => $time1->format(DATE_RFC2822), 'Expires' => $time2->format(DATE_RFC2822))); + + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertNotNull($this->response->headers->get('Date')); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + + $this->request('GET', '/'); + $this->assertHttpKernelIsNotCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTrue(strtotime($this->responses[0]->headers->get('Date')) - strtotime($this->response->headers->get('Date')) < 2); + $this->assertTrue($this->response->headers->get('Age') > 0); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $this->assertTraceContains('fresh'); + $this->assertTraceNotContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + } + + public function testHitsCachedResponseWithMaxAgeDirective() + { + $time = \DateTime::createFromFormat('U', time() - 5); + $this->setNextResponse(200, array('Date' => $time->format(DATE_RFC2822), 'Cache-Control' => 'public, max-age=10')); + + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertNotNull($this->response->headers->get('Date')); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + + $this->request('GET', '/'); + $this->assertHttpKernelIsNotCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTrue(strtotime($this->responses[0]->headers->get('Date')) - strtotime($this->response->headers->get('Date')) < 2); + $this->assertTrue($this->response->headers->get('Age') > 0); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $this->assertTraceContains('fresh'); + $this->assertTraceNotContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + } + + public function testHitsCachedResponseWithSMaxAgeDirective() + { + $time = \DateTime::createFromFormat('U', time() - 5); + $this->setNextResponse(200, array('Date' => $time->format(DATE_RFC2822), 'Cache-Control' => 's-maxage=10, max-age=0')); + + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertNotNull($this->response->headers->get('Date')); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + + $this->request('GET', '/'); + $this->assertHttpKernelIsNotCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTrue(strtotime($this->responses[0]->headers->get('Date')) - strtotime($this->response->headers->get('Date')) < 2); + $this->assertTrue($this->response->headers->get('Age') > 0); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $this->assertTraceContains('fresh'); + $this->assertTraceNotContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + } + + public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformation() + { + $this->setNextResponse(); + + $this->cacheConfig['default_ttl'] = 10; + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertRegExp('/s-maxage=10/', $this->response->headers->get('Cache-Control')); + + $this->cacheConfig['default_ttl'] = 10; + $this->request('GET', '/'); + $this->assertHttpKernelIsNotCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceContains('fresh'); + $this->assertTraceNotContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertRegExp('/s-maxage=10/', $this->response->headers->get('Cache-Control')); + } + + public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpired() + { + $this->setNextResponse(); + + $this->cacheConfig['default_ttl'] = 2; + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control')); + + $this->request('GET', '/'); + $this->assertHttpKernelIsNotCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceContains('fresh'); + $this->assertTraceNotContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control')); + + // expires the cache + $values = $this->getMetaStorageValues(); + $this->assertCount(1, $values); + $tmp = unserialize($values[0]); + $time = \DateTime::createFromFormat('U', time() - 5); + $tmp[0][1]['date'] = $time->format(DATE_RFC2822); + $r = new \ReflectionObject($this->store); + $m = $r->getMethod('save'); + $m->setAccessible(true); + $m->invoke($this->store, 'md'.hash('sha256', 'http://localhost/'), serialize($tmp)); + + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceContains('stale'); + $this->assertTraceContains('invalid'); + $this->assertTraceContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control')); + + $this->setNextResponse(); + + $this->request('GET', '/'); + $this->assertHttpKernelIsNotCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceContains('fresh'); + $this->assertTraceNotContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control')); + } + + public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpiredWithStatus304() + { + $this->setNextResponse(); + + $this->cacheConfig['default_ttl'] = 2; + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control')); + + $this->request('GET', '/'); + $this->assertHttpKernelIsNotCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceContains('fresh'); + $this->assertTraceNotContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + + // expires the cache + $values = $this->getMetaStorageValues(); + $this->assertCount(1, $values); + $tmp = unserialize($values[0]); + $time = \DateTime::createFromFormat('U', time() - 5); + $tmp[0][1]['date'] = $time->format(DATE_RFC2822); + $r = new \ReflectionObject($this->store); + $m = $r->getMethod('save'); + $m->setAccessible(true); + $m->invoke($this->store, 'md'.hash('sha256', 'http://localhost/'), serialize($tmp)); + + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceContains('stale'); + $this->assertTraceContains('valid'); + $this->assertTraceContains('store'); + $this->assertTraceNotContains('miss'); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control')); + + $this->request('GET', '/'); + $this->assertHttpKernelIsNotCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceContains('fresh'); + $this->assertTraceNotContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control')); + } + + public function testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective() + { + $this->setNextResponse(200, array('Cache-Control' => 'must-revalidate')); + + $this->cacheConfig['default_ttl'] = 10; + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceContains('miss'); + $this->assertTraceNotContains('store'); + $this->assertNotRegExp('/s-maxage/', $this->response->headers->get('Cache-Control')); + $this->assertEquals('Hello World', $this->response->getContent()); + } + + public function testFetchesFullResponseWhenCacheStaleAndNoValidatorsPresent() + { + $time = \DateTime::createFromFormat('U', time() + 5); + $this->setNextResponse(200, array('Cache-Control' => 'public', 'Expires' => $time->format(DATE_RFC2822))); + + // build initial request + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertNotNull($this->response->headers->get('Date')); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $this->assertNotNull($this->response->headers->get('Age')); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + + // go in and play around with the cached metadata directly ... + $values = $this->getMetaStorageValues(); + $this->assertCount(1, $values); + $tmp = unserialize($values[0]); + $time = \DateTime::createFromFormat('U', time()); + $tmp[0][1]['expires'] = $time->format(DATE_RFC2822); + $r = new \ReflectionObject($this->store); + $m = $r->getMethod('save'); + $m->setAccessible(true); + $m->invoke($this->store, 'md'.hash('sha256', 'http://localhost/'), serialize($tmp)); + + // build subsequent request; should be found but miss due to freshness + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTrue($this->response->headers->get('Age') <= 1); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $this->assertTraceContains('stale'); + $this->assertTraceNotContains('fresh'); + $this->assertTraceNotContains('miss'); + $this->assertTraceContains('store'); + $this->assertEquals('Hello World', $this->response->getContent()); + } + + public function testValidatesCachedResponsesWithLastModifiedAndNoFreshnessInformation() + { + $time = \DateTime::createFromFormat('U', time()); + $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($time) { + $response->headers->set('Cache-Control', 'public'); + $response->headers->set('Last-Modified', $time->format(DATE_RFC2822)); + if ($time->format(DATE_RFC2822) == $request->headers->get('IF_MODIFIED_SINCE')) { + $response->setStatusCode(304); + $response->setContent(''); + } + }); + + // build initial request + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertNotNull($this->response->headers->get('Last-Modified')); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + $this->assertTraceNotContains('stale'); + + // build subsequent request; should be found but miss due to freshness + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertNotNull($this->response->headers->get('Last-Modified')); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $this->assertTrue($this->response->headers->get('Age') <= 1); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('stale'); + $this->assertTraceContains('valid'); + $this->assertTraceContains('store'); + $this->assertTraceNotContains('miss'); + } + + public function testValidatesCachedResponsesUseSameHttpMethod() + { + $test = $this; + + $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($test) { + $test->assertSame('OPTIONS', $request->getMethod()); + }); + + // build initial request + $this->request('OPTIONS', '/'); + + // build subsequent request + $this->request('OPTIONS', '/'); + } + + public function testValidatesCachedResponsesWithETagAndNoFreshnessInformation() + { + $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) { + $response->headers->set('Cache-Control', 'public'); + $response->headers->set('ETag', '"12345"'); + if ($response->getETag() == $request->headers->get('IF_NONE_MATCH')) { + $response->setStatusCode(304); + $response->setContent(''); + } + }); + + // build initial request + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertNotNull($this->response->headers->get('ETag')); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + + // build subsequent request; should be found but miss due to freshness + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertNotNull($this->response->headers->get('ETag')); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $this->assertTrue($this->response->headers->get('Age') <= 1); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('stale'); + $this->assertTraceContains('valid'); + $this->assertTraceContains('store'); + $this->assertTraceNotContains('miss'); + } + + public function testReplacesCachedResponsesWhenValidationResultsInNon304Response() + { + $time = \DateTime::createFromFormat('U', time()); + $count = 0; + $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($time, &$count) { + $response->headers->set('Last-Modified', $time->format(DATE_RFC2822)); + $response->headers->set('Cache-Control', 'public'); + switch (++$count) { + case 1: + $response->setContent('first response'); + break; + case 2: + $response->setContent('second response'); + break; + case 3: + $response->setContent(''); + $response->setStatusCode(304); + break; + } + }); + + // first request should fetch from backend and store in cache + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('first response', $this->response->getContent()); + + // second request is validated, is invalid, and replaces cached entry + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('second response', $this->response->getContent()); + + // third response is validated, valid, and returns cached entry + $this->request('GET', '/'); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('second response', $this->response->getContent()); + + $this->assertEquals(3, $count); + } + + public function testPassesHeadRequestsThroughDirectlyOnPass() + { + $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) { + $response->setContent(''); + $response->setStatusCode(200); + $this->assertEquals('HEAD', $request->getMethod()); + }); + + $this->request('HEAD', '/', array('HTTP_EXPECT' => 'something ...')); + $this->assertHttpKernelIsCalled(); + $this->assertEquals('', $this->response->getContent()); + } + + public function testUsesCacheToRespondToHeadRequestsWhenFresh() + { + $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) { + $response->headers->set('Cache-Control', 'public, max-age=10'); + $response->setContent('Hello World'); + $response->setStatusCode(200); + $this->assertNotEquals('HEAD', $request->getMethod()); + }); + + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals('Hello World', $this->response->getContent()); + + $this->request('HEAD', '/'); + $this->assertHttpKernelIsNotCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('', $this->response->getContent()); + $this->assertEquals(strlen('Hello World'), $this->response->headers->get('Content-Length')); + } + + public function testSendsNoContentWhenFresh() + { + $time = \DateTime::createFromFormat('U', time()); + $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($time) { + $response->headers->set('Cache-Control', 'public, max-age=10'); + $response->headers->set('Last-Modified', $time->format(DATE_RFC2822)); + }); + + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals('Hello World', $this->response->getContent()); + + $this->request('GET', '/', array('HTTP_IF_MODIFIED_SINCE' => $time->format(DATE_RFC2822))); + $this->assertHttpKernelIsNotCalled(); + $this->assertEquals(304, $this->response->getStatusCode()); + $this->assertEquals('', $this->response->getContent()); + } + + public function testInvalidatesCachedResponsesOnPost() + { + $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) { + if ('GET' == $request->getMethod()) { + $response->setStatusCode(200); + $response->headers->set('Cache-Control', 'public, max-age=500'); + $response->setContent('Hello World'); + } elseif ('POST' == $request->getMethod()) { + $response->setStatusCode(303); + $response->headers->set('Location', '/'); + $response->headers->remove('Cache-Control'); + $response->setContent(''); + } + }); + + // build initial request to enter into the cache + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + + // make sure it is valid + $this->request('GET', '/'); + $this->assertHttpKernelIsNotCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('fresh'); + + // now POST to same URL + $this->request('POST', '/helloworld'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals('/', $this->response->headers->get('Location')); + $this->assertTraceContains('invalidate'); + $this->assertTraceContains('pass'); + $this->assertEquals('', $this->response->getContent()); + + // now make sure it was actually invalidated + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Hello World', $this->response->getContent()); + $this->assertTraceContains('stale'); + $this->assertTraceContains('invalid'); + $this->assertTraceContains('store'); + } + + public function testServesFromCacheWhenHeadersMatch() + { + $count = 0; + $this->setNextResponse(200, array('Cache-Control' => 'max-age=10000'), '', function ($request, $response) use (&$count) { + $response->headers->set('Vary', 'Accept User-Agent Foo'); + $response->headers->set('Cache-Control', 'public, max-age=10'); + $response->headers->set('X-Response-Count', ++$count); + $response->setContent($request->headers->get('USER_AGENT')); + }); + + $this->request('GET', '/', array('HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/1.0')); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Bob/1.0', $this->response->getContent()); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + + $this->request('GET', '/', array('HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/1.0')); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Bob/1.0', $this->response->getContent()); + $this->assertTraceContains('fresh'); + $this->assertTraceNotContains('store'); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + } + + public function testStoresMultipleResponsesWhenHeadersDiffer() + { + $count = 0; + $this->setNextResponse(200, array('Cache-Control' => 'max-age=10000'), '', function ($request, $response) use (&$count) { + $response->headers->set('Vary', 'Accept User-Agent Foo'); + $response->headers->set('Cache-Control', 'public, max-age=10'); + $response->headers->set('X-Response-Count', ++$count); + $response->setContent($request->headers->get('USER_AGENT')); + }); + + $this->request('GET', '/', array('HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/1.0')); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertEquals('Bob/1.0', $this->response->getContent()); + $this->assertEquals(1, $this->response->headers->get('X-Response-Count')); + + $this->request('GET', '/', array('HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/2.0')); + $this->assertEquals(200, $this->response->getStatusCode()); + $this->assertTraceContains('miss'); + $this->assertTraceContains('store'); + $this->assertEquals('Bob/2.0', $this->response->getContent()); + $this->assertEquals(2, $this->response->headers->get('X-Response-Count')); + + $this->request('GET', '/', array('HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/1.0')); + $this->assertTraceContains('fresh'); + $this->assertEquals('Bob/1.0', $this->response->getContent()); + $this->assertEquals(1, $this->response->headers->get('X-Response-Count')); + + $this->request('GET', '/', array('HTTP_ACCEPT' => 'text/html', 'HTTP_USER_AGENT' => 'Bob/2.0')); + $this->assertTraceContains('fresh'); + $this->assertEquals('Bob/2.0', $this->response->getContent()); + $this->assertEquals(2, $this->response->headers->get('X-Response-Count')); + + $this->request('GET', '/', array('HTTP_USER_AGENT' => 'Bob/2.0')); + $this->assertTraceContains('miss'); + $this->assertEquals('Bob/2.0', $this->response->getContent()); + $this->assertEquals(3, $this->response->headers->get('X-Response-Count')); + } + + public function testShouldCatchExceptions() + { + $this->catchExceptions(); + + $this->setNextResponse(); + $this->request('GET', '/'); + + $this->assertExceptionsAreCaught(); + } + + public function testShouldCatchExceptionsWhenReloadingAndNoCacheRequest() + { + $this->catchExceptions(); + + $this->setNextResponse(); + $this->cacheConfig['allow_reload'] = true; + $this->request('GET', '/', array(), array(), false, array('Pragma' => 'no-cache')); + + $this->assertExceptionsAreCaught(); + } + + public function testShouldNotCatchExceptions() + { + $this->catchExceptions(false); + + $this->setNextResponse(); + $this->request('GET', '/'); + + $this->assertExceptionsAreNotCaught(); + } + + public function testEsiCacheSendsTheLowestTtl() + { + $responses = array( + array( + 'status' => 200, + 'body' => ' ', + 'headers' => array( + 'Cache-Control' => 's-maxage=300', + 'Surrogate-Control' => 'content="ESI/1.0"', + ), + ), + array( + 'status' => 200, + 'body' => 'Hello World!', + 'headers' => array('Cache-Control' => 's-maxage=300'), + ), + array( + 'status' => 200, + 'body' => 'My name is Bobby.', + 'headers' => array('Cache-Control' => 's-maxage=100'), + ), + ); + + $this->setNextResponses($responses); + + $this->request('GET', '/', array(), array(), true); + $this->assertEquals('Hello World! My name is Bobby.', $this->response->getContent()); + + // check for 100 or 99 as the test can be executed after a second change + $this->assertTrue(in_array($this->response->getTtl(), array(99, 100))); + } + + public function testEsiCacheForceValidation() + { + $responses = array( + array( + 'status' => 200, + 'body' => ' ', + 'headers' => array( + 'Cache-Control' => 's-maxage=300', + 'Surrogate-Control' => 'content="ESI/1.0"', + ), + ), + array( + 'status' => 200, + 'body' => 'Hello World!', + 'headers' => array('ETag' => 'foobar'), + ), + array( + 'status' => 200, + 'body' => 'My name is Bobby.', + 'headers' => array('Cache-Control' => 's-maxage=100'), + ), + ); + + $this->setNextResponses($responses); + + $this->request('GET', '/', array(), array(), true); + $this->assertEquals('Hello World! My name is Bobby.', $this->response->getContent()); + $this->assertNull($this->response->getTtl()); + $this->assertTrue($this->response->mustRevalidate()); + $this->assertTrue($this->response->headers->hasCacheControlDirective('private')); + $this->assertTrue($this->response->headers->hasCacheControlDirective('no-cache')); + } + + public function testEsiRecalculateContentLengthHeader() + { + $responses = array( + array( + 'status' => 200, + 'body' => '', + 'headers' => array( + 'Content-Length' => 26, + 'Cache-Control' => 's-maxage=300', + 'Surrogate-Control' => 'content="ESI/1.0"', + ), + ), + array( + 'status' => 200, + 'body' => 'Hello World!', + 'headers' => array(), + ), + ); + + $this->setNextResponses($responses); + + $this->request('GET', '/', array(), array(), true); + $this->assertEquals('Hello World!', $this->response->getContent()); + $this->assertEquals(12, $this->response->headers->get('Content-Length')); + } + + public function testClientIpIsAlwaysLocalhostForForwardedRequests() + { + $this->setNextResponse(); + $this->request('GET', '/', array('REMOTE_ADDR' => '10.0.0.1')); + + $this->assertEquals('127.0.0.1', $this->kernel->getBackendRequest()->server->get('REMOTE_ADDR')); + } + + /** + * @dataProvider getTrustedProxyData + */ + public function testHttpCacheIsSetAsATrustedProxy(array $existing, array $expected) + { + Request::setTrustedProxies($existing); + + $this->setNextResponse(); + $this->request('GET', '/', array('REMOTE_ADDR' => '10.0.0.1')); + + $this->assertEquals($expected, Request::getTrustedProxies()); + } + + public function getTrustedProxyData() + { + return array( + array(array(), array('127.0.0.1')), + array(array('10.0.0.2'), array('10.0.0.2', '127.0.0.1')), + array(array('10.0.0.2', '127.0.0.1'), array('10.0.0.2', '127.0.0.1')), + ); + } + + /** + * @dataProvider getXForwardedForData + */ + public function testXForwarderForHeaderForForwardedRequests($xForwardedFor, $expected) + { + $this->setNextResponse(); + $server = array('REMOTE_ADDR' => '10.0.0.1'); + if (false !== $xForwardedFor) { + $server['HTTP_X_FORWARDED_FOR'] = $xForwardedFor; + } + $this->request('GET', '/', $server); + + $this->assertEquals($expected, $this->kernel->getBackendRequest()->headers->get('X-Forwarded-For')); + } + + public function getXForwardedForData() + { + return array( + array(false, '10.0.0.1'), + array('10.0.0.2', '10.0.0.2, 10.0.0.1'), + array('10.0.0.2, 10.0.0.3', '10.0.0.2, 10.0.0.3, 10.0.0.1'), + ); + } + + public function testXForwarderForHeaderForPassRequests() + { + $this->setNextResponse(); + $server = array('REMOTE_ADDR' => '10.0.0.1'); + $this->request('POST', '/', $server); + + $this->assertEquals('10.0.0.1', $this->kernel->getBackendRequest()->headers->get('X-Forwarded-For')); + } + + public function testEsiCacheRemoveValidationHeadersIfEmbeddedResponses() + { + $time = \DateTime::createFromFormat('U', time()); + + $responses = array( + array( + 'status' => 200, + 'body' => '', + 'headers' => array( + 'Surrogate-Control' => 'content="ESI/1.0"', + 'ETag' => 'hey', + 'Last-Modified' => $time->format(DATE_RFC2822), + ), + ), + array( + 'status' => 200, + 'body' => 'Hey!', + 'headers' => array(), + ), + ); + + $this->setNextResponses($responses); + + $this->request('GET', '/', array(), array(), true); + $this->assertNull($this->response->getETag()); + $this->assertNull($this->response->getLastModified()); + } + + public function testDoesNotCacheOptionsRequest() + { + $this->setNextResponse(200, array('Cache-Control' => 'public, s-maxage=60'), 'get'); + $this->request('GET', '/'); + $this->assertHttpKernelIsCalled(); + + $this->setNextResponse(200, array('Cache-Control' => 'public, s-maxage=60'), 'options'); + $this->request('OPTIONS', '/'); + $this->assertHttpKernelIsCalled(); + + $this->request('GET', '/'); + $this->assertHttpKernelIsNotCalled(); + $this->assertSame('get', $this->response->getContent()); + } +} + +class TestKernel implements HttpKernelInterface +{ + public $terminateCalled = false; + + public function terminate(Request $request, Response $response) + { + $this->terminateCalled = true; + } + + public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..96a66771a06bc366c2024aacb978612ee1198222 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php @@ -0,0 +1,181 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\HttpCache; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpCache\Esi; +use Symfony\Component\HttpKernel\HttpCache\HttpCache; +use Symfony\Component\HttpKernel\HttpCache\Store; +use Symfony\Component\HttpKernel\HttpKernelInterface; + +class HttpCacheTestCase extends TestCase +{ + protected $kernel; + protected $cache; + protected $caches; + protected $cacheConfig; + protected $request; + protected $response; + protected $responses; + protected $catch; + protected $esi; + protected $store; + + protected function setUp() + { + $this->kernel = null; + + $this->cache = null; + $this->esi = null; + $this->caches = array(); + $this->cacheConfig = array(); + + $this->request = null; + $this->response = null; + $this->responses = array(); + + $this->catch = false; + + $this->clearDirectory(sys_get_temp_dir().'/http_cache'); + } + + protected function tearDown() + { + if ($this->cache) { + $this->cache->getStore()->cleanup(); + } + $this->kernel = null; + $this->cache = null; + $this->caches = null; + $this->request = null; + $this->response = null; + $this->responses = null; + $this->cacheConfig = null; + $this->catch = null; + $this->esi = null; + + $this->clearDirectory(sys_get_temp_dir().'/http_cache'); + } + + public function assertHttpKernelIsCalled() + { + $this->assertTrue($this->kernel->hasBeenCalled()); + } + + public function assertHttpKernelIsNotCalled() + { + $this->assertFalse($this->kernel->hasBeenCalled()); + } + + public function assertResponseOk() + { + $this->assertEquals(200, $this->response->getStatusCode()); + } + + public function assertTraceContains($trace) + { + $traces = $this->cache->getTraces(); + $traces = current($traces); + + $this->assertRegExp('/'.$trace.'/', implode(', ', $traces)); + } + + public function assertTraceNotContains($trace) + { + $traces = $this->cache->getTraces(); + $traces = current($traces); + + $this->assertNotRegExp('/'.$trace.'/', implode(', ', $traces)); + } + + public function assertExceptionsAreCaught() + { + $this->assertTrue($this->kernel->isCatchingExceptions()); + } + + public function assertExceptionsAreNotCaught() + { + $this->assertFalse($this->kernel->isCatchingExceptions()); + } + + public function request($method, $uri = '/', $server = array(), $cookies = array(), $esi = false, $headers = array()) + { + if (null === $this->kernel) { + throw new \LogicException('You must call setNextResponse() before calling request().'); + } + + $this->kernel->reset(); + + $this->store = new Store(sys_get_temp_dir().'/http_cache'); + + $this->cacheConfig['debug'] = true; + + $this->esi = $esi ? new Esi() : null; + $this->cache = new HttpCache($this->kernel, $this->store, $this->esi, $this->cacheConfig); + $this->request = Request::create($uri, $method, array(), $cookies, array(), $server); + $this->request->headers->add($headers); + + $this->response = $this->cache->handle($this->request, HttpKernelInterface::MASTER_REQUEST, $this->catch); + + $this->responses[] = $this->response; + } + + public function getMetaStorageValues() + { + $values = array(); + foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(sys_get_temp_dir().'/http_cache/md', \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) { + $values[] = file_get_contents($file); + } + + return $values; + } + + // A basic response with 200 status code and a tiny body. + public function setNextResponse($statusCode = 200, array $headers = array(), $body = 'Hello World', \Closure $customizer = null) + { + $this->kernel = new TestHttpKernel($body, $statusCode, $headers, $customizer); + } + + public function setNextResponses($responses) + { + $this->kernel = new TestMultipleHttpKernel($responses); + } + + public function catchExceptions($catch = true) + { + $this->catch = $catch; + } + + public static function clearDirectory($directory) + { + if (!is_dir($directory)) { + return; + } + + $fp = opendir($directory); + while (false !== $file = readdir($fp)) { + if (!in_array($file, array('.', '..'))) { + if (is_link($directory.'/'.$file)) { + unlink($directory.'/'.$file); + } elseif (is_dir($directory.'/'.$file)) { + self::clearDirectory($directory.'/'.$file); + rmdir($directory.'/'.$file); + } else { + unlink($directory.'/'.$file); + } + } + } + + closedir($fp); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f30a3b6ad94abc49767c2410db26ca63c25469e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php @@ -0,0 +1,78 @@ + + * + * This code is partially based on the Rack-Cache library by Ryan Tomayko, + * which is released under the MIT license. + * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801) + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\HttpCache; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpCache\ResponseCacheStrategy; + +class ResponseCacheStrategyTest extends TestCase +{ + public function testMinimumSharedMaxAgeWins() + { + $cacheStrategy = new ResponseCacheStrategy(); + + $response1 = new Response(); + $response1->setSharedMaxAge(60); + $cacheStrategy->add($response1); + + $response2 = new Response(); + $response2->setSharedMaxAge(3600); + $cacheStrategy->add($response2); + + $response = new Response(); + $response->setSharedMaxAge(86400); + $cacheStrategy->update($response); + + $this->assertSame('60', $response->headers->getCacheControlDirective('s-maxage')); + } + + public function testSharedMaxAgeNotSetIfNotSetInAnyEmbeddedRequest() + { + $cacheStrategy = new ResponseCacheStrategy(); + + $response1 = new Response(); + $response1->setSharedMaxAge(60); + $cacheStrategy->add($response1); + + $response2 = new Response(); + $cacheStrategy->add($response2); + + $response = new Response(); + $response->setSharedMaxAge(86400); + $cacheStrategy->update($response); + + $this->assertFalse($response->headers->hasCacheControlDirective('s-maxage')); + } + + public function testSharedMaxAgeNotSetIfNotSetInMasterRequest() + { + $cacheStrategy = new ResponseCacheStrategy(); + + $response1 = new Response(); + $response1->setSharedMaxAge(60); + $cacheStrategy->add($response1); + + $response2 = new Response(); + $response2->setSharedMaxAge(3600); + $cacheStrategy->add($response2); + + $response = new Response(); + $cacheStrategy->update($response); + + $this->assertFalse($response->headers->hasCacheControlDirective('s-maxage')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/SsiTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/SsiTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1079d37a2770057d650be9fd301bd7d1c55e8e63 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/SsiTest.php @@ -0,0 +1,215 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\HttpCache; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpCache\Ssi; + +class SsiTest extends TestCase +{ + public function testHasSurrogateSsiCapability() + { + $ssi = new Ssi(); + + $request = Request::create('/'); + $request->headers->set('Surrogate-Capability', 'abc="SSI/1.0"'); + $this->assertTrue($ssi->hasSurrogateCapability($request)); + + $request = Request::create('/'); + $request->headers->set('Surrogate-Capability', 'foobar'); + $this->assertFalse($ssi->hasSurrogateCapability($request)); + + $request = Request::create('/'); + $this->assertFalse($ssi->hasSurrogateCapability($request)); + } + + public function testAddSurrogateSsiCapability() + { + $ssi = new Ssi(); + + $request = Request::create('/'); + $ssi->addSurrogateCapability($request); + $this->assertEquals('symfony="SSI/1.0"', $request->headers->get('Surrogate-Capability')); + + $ssi->addSurrogateCapability($request); + $this->assertEquals('symfony="SSI/1.0", symfony="SSI/1.0"', $request->headers->get('Surrogate-Capability')); + } + + public function testAddSurrogateControl() + { + $ssi = new Ssi(); + + $response = new Response('foo '); + $ssi->addSurrogateControl($response); + $this->assertEquals('content="SSI/1.0"', $response->headers->get('Surrogate-Control')); + + $response = new Response('foo'); + $ssi->addSurrogateControl($response); + $this->assertEquals('', $response->headers->get('Surrogate-Control')); + } + + public function testNeedsSsiParsing() + { + $ssi = new Ssi(); + + $response = new Response(); + $response->headers->set('Surrogate-Control', 'content="SSI/1.0"'); + $this->assertTrue($ssi->needsParsing($response)); + + $response = new Response(); + $this->assertFalse($ssi->needsParsing($response)); + } + + public function testRenderIncludeTag() + { + $ssi = new Ssi(); + + $this->assertEquals('', $ssi->renderIncludeTag('/', '/alt', true)); + $this->assertEquals('', $ssi->renderIncludeTag('/', '/alt', false)); + $this->assertEquals('', $ssi->renderIncludeTag('/')); + } + + public function testProcessDoesNothingIfContentTypeIsNotHtml() + { + $ssi = new Ssi(); + + $request = Request::create('/'); + $response = new Response(); + $response->headers->set('Content-Type', 'text/plain'); + $ssi->process($request, $response); + + $this->assertFalse($response->headers->has('x-body-eval')); + } + + public function testProcess() + { + $ssi = new Ssi(); + + $request = Request::create('/'); + $response = new Response('foo '); + $ssi->process($request, $response); + + $this->assertEquals('foo surrogate->handle($this, \'...\', \'\', false) ?>'."\n", $response->getContent()); + $this->assertEquals('SSI', $response->headers->get('x-body-eval')); + + $response = new Response('foo '); + $ssi->process($request, $response); + + $this->assertEquals("foo surrogate->handle(\$this, 'foo\\'', '', false) ?>"."\n", $response->getContent()); + } + + public function testProcessEscapesPhpTags() + { + $ssi = new Ssi(); + + $request = Request::create('/'); + $response = new Response(''); + $ssi->process($request, $response); + + $this->assertEquals('php cript language=php>', $response->getContent()); + } + + /** + * @expectedException \RuntimeException + */ + public function testProcessWhenNoSrcInAnSsi() + { + $ssi = new Ssi(); + + $request = Request::create('/'); + $response = new Response('foo '); + $ssi->process($request, $response); + } + + public function testProcessRemoveSurrogateControlHeader() + { + $ssi = new Ssi(); + + $request = Request::create('/'); + $response = new Response('foo '); + $response->headers->set('Surrogate-Control', 'content="SSI/1.0"'); + $ssi->process($request, $response); + $this->assertEquals('SSI', $response->headers->get('x-body-eval')); + + $response->headers->set('Surrogate-Control', 'no-store, content="SSI/1.0"'); + $ssi->process($request, $response); + $this->assertEquals('SSI', $response->headers->get('x-body-eval')); + $this->assertEquals('no-store', $response->headers->get('surrogate-control')); + + $response->headers->set('Surrogate-Control', 'content="SSI/1.0", no-store'); + $ssi->process($request, $response); + $this->assertEquals('SSI', $response->headers->get('x-body-eval')); + $this->assertEquals('no-store', $response->headers->get('surrogate-control')); + } + + public function testHandle() + { + $ssi = new Ssi(); + $cache = $this->getCache(Request::create('/'), new Response('foo')); + $this->assertEquals('foo', $ssi->handle($cache, '/', '/alt', true)); + } + + /** + * @expectedException \RuntimeException + */ + public function testHandleWhenResponseIsNot200() + { + $ssi = new Ssi(); + $response = new Response('foo'); + $response->setStatusCode(404); + $cache = $this->getCache(Request::create('/'), $response); + $ssi->handle($cache, '/', '/alt', false); + } + + public function testHandleWhenResponseIsNot200AndErrorsAreIgnored() + { + $ssi = new Ssi(); + $response = new Response('foo'); + $response->setStatusCode(404); + $cache = $this->getCache(Request::create('/'), $response); + $this->assertEquals('', $ssi->handle($cache, '/', '/alt', true)); + } + + public function testHandleWhenResponseIsNot200AndAltIsPresent() + { + $ssi = new Ssi(); + $response1 = new Response('foo'); + $response1->setStatusCode(404); + $response2 = new Response('bar'); + $cache = $this->getCache(Request::create('/'), array($response1, $response2)); + $this->assertEquals('bar', $ssi->handle($cache, '/', '/alt', false)); + } + + protected function getCache($request, $response) + { + $cache = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpCache\HttpCache')->setMethods(array('getRequest', 'handle'))->disableOriginalConstructor()->getMock(); + $cache->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + if (is_array($response)) { + $cache->expects($this->any()) + ->method('handle') + ->will(call_user_func_array(array($this, 'onConsecutiveCalls'), $response)) + ; + } else { + $cache->expects($this->any()) + ->method('handle') + ->will($this->returnValue($response)) + ; + } + + return $cache; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8b9e52b03ea9a7cf36f424efe34f7e37cc560c38 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php @@ -0,0 +1,274 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\HttpCache; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpCache\Store; + +class StoreTest extends TestCase +{ + protected $request; + protected $response; + + /** + * @var Store + */ + protected $store; + + protected function setUp() + { + $this->request = Request::create('/'); + $this->response = new Response('hello world', 200, array()); + + HttpCacheTestCase::clearDirectory(sys_get_temp_dir().'/http_cache'); + + $this->store = new Store(sys_get_temp_dir().'/http_cache'); + } + + protected function tearDown() + { + $this->store = null; + $this->request = null; + $this->response = null; + + HttpCacheTestCase::clearDirectory(sys_get_temp_dir().'/http_cache'); + } + + public function testReadsAnEmptyArrayWithReadWhenNothingCachedAtKey() + { + $this->assertEmpty($this->getStoreMetadata('/nothing')); + } + + public function testUnlockFileThatDoesExist() + { + $cacheKey = $this->storeSimpleEntry(); + $this->store->lock($this->request); + + $this->assertTrue($this->store->unlock($this->request)); + } + + public function testUnlockFileThatDoesNotExist() + { + $this->assertFalse($this->store->unlock($this->request)); + } + + public function testRemovesEntriesForKeyWithPurge() + { + $request = Request::create('/foo'); + $this->store->write($request, new Response('foo')); + + $metadata = $this->getStoreMetadata($request); + $this->assertNotEmpty($metadata); + + $this->assertTrue($this->store->purge('/foo')); + $this->assertEmpty($this->getStoreMetadata($request)); + + // cached content should be kept after purging + $path = $this->store->getPath($metadata[0][1]['x-content-digest'][0]); + $this->assertTrue(is_file($path)); + + $this->assertFalse($this->store->purge('/bar')); + } + + public function testStoresACacheEntry() + { + $cacheKey = $this->storeSimpleEntry(); + + $this->assertNotEmpty($this->getStoreMetadata($cacheKey)); + } + + public function testSetsTheXContentDigestResponseHeaderBeforeStoring() + { + $cacheKey = $this->storeSimpleEntry(); + $entries = $this->getStoreMetadata($cacheKey); + list($req, $res) = $entries[0]; + + $this->assertEquals('en9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', $res['x-content-digest'][0]); + } + + public function testFindsAStoredEntryWithLookup() + { + $this->storeSimpleEntry(); + $response = $this->store->lookup($this->request); + + $this->assertNotNull($response); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Response', $response); + } + + public function testDoesNotFindAnEntryWithLookupWhenNoneExists() + { + $request = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); + + $this->assertNull($this->store->lookup($request)); + } + + public function testCanonizesUrlsForCacheKeys() + { + $this->storeSimpleEntry($path = '/test?x=y&p=q'); + $hitsReq = Request::create($path); + $missReq = Request::create('/test?p=x'); + + $this->assertNotNull($this->store->lookup($hitsReq)); + $this->assertNull($this->store->lookup($missReq)); + } + + public function testDoesNotFindAnEntryWithLookupWhenTheBodyDoesNotExist() + { + $this->storeSimpleEntry(); + $this->assertNotNull($this->response->headers->get('X-Content-Digest')); + $path = $this->getStorePath($this->response->headers->get('X-Content-Digest')); + @unlink($path); + $this->assertNull($this->store->lookup($this->request)); + } + + public function testRestoresResponseHeadersProperlyWithLookup() + { + $this->storeSimpleEntry(); + $response = $this->store->lookup($this->request); + + $this->assertEquals($response->headers->all(), array_merge(array('content-length' => 4, 'x-body-file' => array($this->getStorePath($response->headers->get('X-Content-Digest')))), $this->response->headers->all())); + } + + public function testRestoresResponseContentFromEntityStoreWithLookup() + { + $this->storeSimpleEntry(); + $response = $this->store->lookup($this->request); + $this->assertEquals($this->getStorePath('en'.hash('sha256', 'test')), $response->getContent()); + } + + public function testInvalidatesMetaAndEntityStoreEntriesWithInvalidate() + { + $this->storeSimpleEntry(); + $this->store->invalidate($this->request); + $response = $this->store->lookup($this->request); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Response', $response); + $this->assertFalse($response->isFresh()); + } + + public function testSucceedsQuietlyWhenInvalidateCalledWithNoMatchingEntries() + { + $req = Request::create('/test'); + $this->store->invalidate($req); + $this->assertNull($this->store->lookup($this->request)); + } + + public function testDoesNotReturnEntriesThatVaryWithLookup() + { + $req1 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); + $req2 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Bling', 'HTTP_BAR' => 'Bam')); + $res = new Response('test', 200, array('Vary' => 'Foo Bar')); + $this->store->write($req1, $res); + + $this->assertNull($this->store->lookup($req2)); + } + + public function testDoesNotReturnEntriesThatSlightlyVaryWithLookup() + { + $req1 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); + $req2 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bam')); + $res = new Response('test', 200, array('Vary' => array('Foo', 'Bar'))); + $this->store->write($req1, $res); + + $this->assertNull($this->store->lookup($req2)); + } + + public function testStoresMultipleResponsesForEachVaryCombination() + { + $req1 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); + $res1 = new Response('test 1', 200, array('Vary' => 'Foo Bar')); + $key = $this->store->write($req1, $res1); + + $req2 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Bling', 'HTTP_BAR' => 'Bam')); + $res2 = new Response('test 2', 200, array('Vary' => 'Foo Bar')); + $this->store->write($req2, $res2); + + $req3 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Baz', 'HTTP_BAR' => 'Boom')); + $res3 = new Response('test 3', 200, array('Vary' => 'Foo Bar')); + $this->store->write($req3, $res3); + + $this->assertEquals($this->getStorePath('en'.hash('sha256', 'test 3')), $this->store->lookup($req3)->getContent()); + $this->assertEquals($this->getStorePath('en'.hash('sha256', 'test 2')), $this->store->lookup($req2)->getContent()); + $this->assertEquals($this->getStorePath('en'.hash('sha256', 'test 1')), $this->store->lookup($req1)->getContent()); + + $this->assertCount(3, $this->getStoreMetadata($key)); + } + + public function testOverwritesNonVaryingResponseWithStore() + { + $req1 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); + $res1 = new Response('test 1', 200, array('Vary' => 'Foo Bar')); + $key = $this->store->write($req1, $res1); + $this->assertEquals($this->getStorePath('en'.hash('sha256', 'test 1')), $this->store->lookup($req1)->getContent()); + + $req2 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Bling', 'HTTP_BAR' => 'Bam')); + $res2 = new Response('test 2', 200, array('Vary' => 'Foo Bar')); + $this->store->write($req2, $res2); + $this->assertEquals($this->getStorePath('en'.hash('sha256', 'test 2')), $this->store->lookup($req2)->getContent()); + + $req3 = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); + $res3 = new Response('test 3', 200, array('Vary' => 'Foo Bar')); + $key = $this->store->write($req3, $res3); + $this->assertEquals($this->getStorePath('en'.hash('sha256', 'test 3')), $this->store->lookup($req3)->getContent()); + + $this->assertCount(2, $this->getStoreMetadata($key)); + } + + public function testLocking() + { + $req = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar')); + $this->assertTrue($this->store->lock($req)); + + $path = $this->store->lock($req); + $this->assertTrue($this->store->isLocked($req)); + + $this->store->unlock($req); + $this->assertFalse($this->store->isLocked($req)); + } + + protected function storeSimpleEntry($path = null, $headers = array()) + { + if (null === $path) { + $path = '/test'; + } + + $this->request = Request::create($path, 'get', array(), array(), array(), $headers); + $this->response = new Response('test', 200, array('Cache-Control' => 'max-age=420')); + + return $this->store->write($this->request, $this->response); + } + + protected function getStoreMetadata($key) + { + $r = new \ReflectionObject($this->store); + $m = $r->getMethod('getMetadata'); + $m->setAccessible(true); + + if ($key instanceof Request) { + $m1 = $r->getMethod('getCacheKey'); + $m1->setAccessible(true); + $key = $m1->invoke($this->store, $key); + } + + return $m->invoke($this->store, $key); + } + + protected function getStorePath($key) + { + $r = new \ReflectionObject($this->store); + $m = $r->getMethod('getPath'); + $m->setAccessible(true); + + return $m->invoke($this->store, $key); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php new file mode 100644 index 0000000000000000000000000000000000000000..946c7a31cb44b1de90b09fc9a7d539160d933b5f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.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\Component\HttpKernel\Tests\HttpCache; + +use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; +use Symfony\Component\HttpKernel\HttpKernel; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; +use Symfony\Component\EventDispatcher\EventDispatcher; + +class TestHttpKernel extends HttpKernel implements ControllerResolverInterface, ArgumentResolverInterface +{ + protected $body; + protected $status; + protected $headers; + protected $called = false; + protected $customizer; + protected $catch = false; + protected $backendRequest; + + public function __construct($body, $status, $headers, \Closure $customizer = null) + { + $this->body = $body; + $this->status = $status; + $this->headers = $headers; + $this->customizer = $customizer; + + parent::__construct(new EventDispatcher(), $this, null, $this); + } + + public function getBackendRequest() + { + return $this->backendRequest; + } + + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = false) + { + $this->catch = $catch; + $this->backendRequest = $request; + + return parent::handle($request, $type, $catch); + } + + public function isCatchingExceptions() + { + return $this->catch; + } + + public function getController(Request $request) + { + return array($this, 'callController'); + } + + public function getArguments(Request $request, $controller) + { + return array($request); + } + + public function callController(Request $request) + { + $this->called = true; + + $response = new Response($this->body, $this->status, $this->headers); + + if (null !== $customizer = $this->customizer) { + $customizer($request, $response); + } + + return $response; + } + + public function hasBeenCalled() + { + return $this->called; + } + + public function reset() + { + $this->called = false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php new file mode 100644 index 0000000000000000000000000000000000000000..926d8daf531155ab678788d83bf277d283e27a1a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\HttpCache; + +use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; +use Symfony\Component\HttpKernel\HttpKernel; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; +use Symfony\Component\EventDispatcher\EventDispatcher; + +class TestMultipleHttpKernel extends HttpKernel implements ControllerResolverInterface, ArgumentResolverInterface +{ + protected $bodies = array(); + protected $statuses = array(); + protected $headers = array(); + protected $called = false; + protected $backendRequest; + + public function __construct($responses) + { + foreach ($responses as $response) { + $this->bodies[] = $response['body']; + $this->statuses[] = $response['status']; + $this->headers[] = $response['headers']; + } + + parent::__construct(new EventDispatcher(), $this, null, $this); + } + + public function getBackendRequest() + { + return $this->backendRequest; + } + + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = false) + { + $this->backendRequest = $request; + + return parent::handle($request, $type, $catch); + } + + public function getController(Request $request) + { + return array($this, 'callController'); + } + + public function getArguments(Request $request, $controller) + { + return array($request); + } + + public function callController(Request $request) + { + $this->called = true; + + $response = new Response(array_shift($this->bodies), array_shift($this->statuses), array_shift($this->headers)); + + return $response; + } + + public function hasBeenCalled() + { + return $this->called; + } + + public function reset() + { + $this->called = false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b58a251a5938d771398146c267da0454935df235 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php @@ -0,0 +1,375 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; +use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; +use Symfony\Component\HttpKernel\Event\FilterControllerArgumentsEvent; +use Symfony\Component\HttpKernel\HttpKernel; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; +use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\EventDispatcher\EventDispatcher; + +class HttpKernelTest extends TestCase +{ + /** + * @expectedException \RuntimeException + */ + public function testHandleWhenControllerThrowsAnExceptionAndCatchIsTrue() + { + $kernel = $this->getHttpKernel(new EventDispatcher(), function () { throw new \RuntimeException(); }); + + $kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, true); + } + + /** + * @expectedException \RuntimeException + */ + public function testHandleWhenControllerThrowsAnExceptionAndCatchIsFalseAndNoListenerIsRegistered() + { + $kernel = $this->getHttpKernel(new EventDispatcher(), function () { throw new \RuntimeException(); }); + + $kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, false); + } + + public function testHandleWhenControllerThrowsAnExceptionAndCatchIsTrueWithAHandlingListener() + { + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::EXCEPTION, function ($event) { + $event->setResponse(new Response($event->getException()->getMessage())); + }); + + $kernel = $this->getHttpKernel($dispatcher, function () { throw new \RuntimeException('foo'); }); + $response = $kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, true); + + $this->assertEquals('500', $response->getStatusCode()); + $this->assertEquals('foo', $response->getContent()); + } + + public function testHandleWhenControllerThrowsAnExceptionAndCatchIsTrueWithANonHandlingListener() + { + $exception = new \RuntimeException(); + + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::EXCEPTION, function ($event) { + // should set a response, but does not + }); + + $kernel = $this->getHttpKernel($dispatcher, function () use ($exception) { throw $exception; }); + + try { + $kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, true); + $this->fail('LogicException expected'); + } catch (\RuntimeException $e) { + $this->assertSame($exception, $e); + } + } + + public function testHandleExceptionWithARedirectionResponse() + { + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::EXCEPTION, function ($event) { + $event->setResponse(new RedirectResponse('/login', 301)); + }); + + $kernel = $this->getHttpKernel($dispatcher, function () { throw new AccessDeniedHttpException(); }); + $response = $kernel->handle(new Request()); + + $this->assertEquals('301', $response->getStatusCode()); + $this->assertEquals('/login', $response->headers->get('Location')); + } + + public function testHandleHttpException() + { + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::EXCEPTION, function ($event) { + $event->setResponse(new Response($event->getException()->getMessage())); + }); + + $kernel = $this->getHttpKernel($dispatcher, function () { throw new MethodNotAllowedHttpException(array('POST')); }); + $response = $kernel->handle(new Request()); + + $this->assertEquals('405', $response->getStatusCode()); + $this->assertEquals('POST', $response->headers->get('Allow')); + } + + /** + * @dataProvider getStatusCodes + */ + public function testHandleWhenAnExceptionIsHandledWithASpecificStatusCode($responseStatusCode, $expectedStatusCode) + { + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::EXCEPTION, function ($event) use ($responseStatusCode, $expectedStatusCode) { + $event->setResponse(new Response('', $responseStatusCode, array('X-Status-Code' => $expectedStatusCode))); + }); + + $kernel = $this->getHttpKernel($dispatcher, function () { throw new \RuntimeException(); }); + $response = $kernel->handle(new Request()); + + $this->assertEquals($expectedStatusCode, $response->getStatusCode()); + $this->assertFalse($response->headers->has('X-Status-Code')); + } + + public function getStatusCodes() + { + return array( + array(200, 404), + array(404, 200), + array(301, 200), + array(500, 200), + ); + } + + public function testHandleWhenAListenerReturnsAResponse() + { + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::REQUEST, function ($event) { + $event->setResponse(new Response('hello')); + }); + + $kernel = $this->getHttpKernel($dispatcher); + + $this->assertEquals('hello', $kernel->handle(new Request())->getContent()); + } + + /** + * @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException + */ + public function testHandleWhenNoControllerIsFound() + { + $dispatcher = new EventDispatcher(); + $kernel = $this->getHttpKernel($dispatcher, false); + + $kernel->handle(new Request()); + } + + public function testHandleWhenTheControllerIsAClosure() + { + $response = new Response('foo'); + $dispatcher = new EventDispatcher(); + $kernel = $this->getHttpKernel($dispatcher, function () use ($response) { return $response; }); + + $this->assertSame($response, $kernel->handle(new Request())); + } + + public function testHandleWhenTheControllerIsAnObjectWithInvoke() + { + $dispatcher = new EventDispatcher(); + $kernel = $this->getHttpKernel($dispatcher, new Controller()); + + $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); + } + + public function testHandleWhenTheControllerIsAFunction() + { + $dispatcher = new EventDispatcher(); + $kernel = $this->getHttpKernel($dispatcher, 'Symfony\Component\HttpKernel\Tests\controller_func'); + + $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); + } + + public function testHandleWhenTheControllerIsAnArray() + { + $dispatcher = new EventDispatcher(); + $kernel = $this->getHttpKernel($dispatcher, array(new Controller(), 'controller')); + + $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); + } + + public function testHandleWhenTheControllerIsAStaticArray() + { + $dispatcher = new EventDispatcher(); + $kernel = $this->getHttpKernel($dispatcher, array('Symfony\Component\HttpKernel\Tests\Controller', 'staticcontroller')); + + $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); + } + + /** + * @expectedException \LogicException + */ + public function testHandleWhenTheControllerDoesNotReturnAResponse() + { + $dispatcher = new EventDispatcher(); + $kernel = $this->getHttpKernel($dispatcher, function () { return 'foo'; }); + + $kernel->handle(new Request()); + } + + public function testHandleWhenTheControllerDoesNotReturnAResponseButAViewIsRegistered() + { + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::VIEW, function ($event) { + $event->setResponse(new Response($event->getControllerResult())); + }); + + $kernel = $this->getHttpKernel($dispatcher, function () { return 'foo'; }); + + $this->assertEquals('foo', $kernel->handle(new Request())->getContent()); + } + + public function testHandleWithAResponseListener() + { + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::RESPONSE, function ($event) { + $event->setResponse(new Response('foo')); + }); + $kernel = $this->getHttpKernel($dispatcher); + + $this->assertEquals('foo', $kernel->handle(new Request())->getContent()); + } + + public function testHandleAllowChangingControllerArguments() + { + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::CONTROLLER_ARGUMENTS, function (FilterControllerArgumentsEvent $event) { + $event->setArguments(array('foo')); + }); + + $kernel = $this->getHttpKernel($dispatcher, function ($content) { return new Response($content); }); + + $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); + } + + public function testHandleAllowChangingControllerAndArguments() + { + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::CONTROLLER_ARGUMENTS, function (FilterControllerArgumentsEvent $event) { + $oldController = $event->getController(); + $oldArguments = $event->getArguments(); + + $newController = function ($id) use ($oldController, $oldArguments) { + $response = call_user_func_array($oldController, $oldArguments); + + $response->headers->set('X-Id', $id); + + return $response; + }; + + $event->setController($newController); + $event->setArguments(array('bar')); + }); + + $kernel = $this->getHttpKernel($dispatcher, function ($content) { return new Response($content); }, null, array('foo')); + + $this->assertResponseEquals(new Response('foo', 200, array('X-Id' => 'bar')), $kernel->handle(new Request())); + } + + public function testTerminate() + { + $dispatcher = new EventDispatcher(); + $kernel = $this->getHttpKernel($dispatcher); + $dispatcher->addListener(KernelEvents::TERMINATE, function ($event) use (&$called, &$capturedKernel, &$capturedRequest, &$capturedResponse) { + $called = true; + $capturedKernel = $event->getKernel(); + $capturedRequest = $event->getRequest(); + $capturedResponse = $event->getResponse(); + }); + + $kernel->terminate($request = Request::create('/'), $response = new Response()); + $this->assertTrue($called); + $this->assertEquals($kernel, $capturedKernel); + $this->assertEquals($request, $capturedRequest); + $this->assertEquals($response, $capturedResponse); + } + + public function testVerifyRequestStackPushPopDuringHandle() + { + $request = new Request(); + + $stack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->setMethods(array('push', 'pop'))->getMock(); + $stack->expects($this->at(0))->method('push')->with($this->equalTo($request)); + $stack->expects($this->at(1))->method('pop'); + + $dispatcher = new EventDispatcher(); + $kernel = $this->getHttpKernel($dispatcher, null, $stack); + + $kernel->handle($request, HttpKernelInterface::MASTER_REQUEST); + } + + /** + * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException + */ + public function testInconsistentClientIpsOnMasterRequests() + { + $request = new Request(); + $request->setTrustedProxies(array('1.1.1.1')); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $request->headers->set('FORWARDED', '2.2.2.2'); + $request->headers->set('X_FORWARDED_FOR', '3.3.3.3'); + + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::REQUEST, function ($event) { + $event->getRequest()->getClientIp(); + }); + + $kernel = $this->getHttpKernel($dispatcher); + $kernel->handle($request, $kernel::MASTER_REQUEST, false); + } + + private function getHttpKernel(EventDispatcherInterface $eventDispatcher, $controller = null, RequestStack $requestStack = null, array $arguments = array()) + { + if (null === $controller) { + $controller = function () { return new Response('Hello'); }; + } + + $controllerResolver = $this->getMockBuilder(ControllerResolverInterface::class)->getMock(); + $controllerResolver + ->expects($this->any()) + ->method('getController') + ->will($this->returnValue($controller)); + + $argumentResolver = $this->getMockBuilder(ArgumentResolverInterface::class)->getMock(); + $argumentResolver + ->expects($this->any()) + ->method('getArguments') + ->will($this->returnValue($arguments)); + + return new HttpKernel($eventDispatcher, $controllerResolver, $requestStack, $argumentResolver); + } + + private function assertResponseEquals(Response $expected, Response $actual) + { + $expected->setDate($actual->getDate()); + $this->assertEquals($expected, $actual); + } +} + +class Controller +{ + public function __invoke() + { + return new Response('foo'); + } + + public function controller() + { + return new Response('foo'); + } + + public static function staticController() + { + return new Response('foo'); + } +} + +function controller_func() +{ + return new Response('foo'); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/KernelTest.php new file mode 100644 index 0000000000000000000000000000000000000000..501b6240d9d987ec0832f84675b82e59761f112f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/KernelTest.php @@ -0,0 +1,825 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; +use Symfony\Component\HttpKernel\Config\EnvParametersResource; +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest; +use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForOverrideName; + +class KernelTest extends TestCase +{ + public function testConstructor() + { + $env = 'test_env'; + $debug = true; + $kernel = new KernelForTest($env, $debug); + + $this->assertEquals($env, $kernel->getEnvironment()); + $this->assertEquals($debug, $kernel->isDebug()); + $this->assertFalse($kernel->isBooted()); + $this->assertLessThanOrEqual(microtime(true), $kernel->getStartTime()); + $this->assertNull($kernel->getContainer()); + } + + public function testClone() + { + $env = 'test_env'; + $debug = true; + $kernel = new KernelForTest($env, $debug); + + $clone = clone $kernel; + + $this->assertEquals($env, $clone->getEnvironment()); + $this->assertEquals($debug, $clone->isDebug()); + $this->assertFalse($clone->isBooted()); + $this->assertLessThanOrEqual(microtime(true), $clone->getStartTime()); + $this->assertNull($clone->getContainer()); + } + + public function testBootInitializesBundlesAndContainer() + { + $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer')); + $kernel->expects($this->once()) + ->method('initializeBundles'); + $kernel->expects($this->once()) + ->method('initializeContainer'); + + $kernel->boot(); + } + + public function testBootSetsTheContainerToTheBundles() + { + $bundle = $this->getMockBuilder('Symfony\Component\HttpKernel\Bundle\Bundle')->getMock(); + $bundle->expects($this->once()) + ->method('setContainer'); + + $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer', 'getBundles')); + $kernel->expects($this->once()) + ->method('getBundles') + ->will($this->returnValue(array($bundle))); + + $kernel->boot(); + } + + public function testBootSetsTheBootedFlagToTrue() + { + // use test kernel to access isBooted() + $kernel = $this->getKernelForTest(array('initializeBundles', 'initializeContainer')); + $kernel->boot(); + + $this->assertTrue($kernel->isBooted()); + } + + public function testClassCacheIsLoaded() + { + $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer', 'doLoadClassCache')); + $kernel->loadClassCache('name', '.extension'); + $kernel->expects($this->once()) + ->method('doLoadClassCache') + ->with('name', '.extension'); + + $kernel->boot(); + } + + public function testClassCacheIsNotLoadedByDefault() + { + $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer', 'doLoadClassCache')); + $kernel->expects($this->never()) + ->method('doLoadClassCache'); + + $kernel->boot(); + } + + public function testClassCacheIsNotLoadedWhenKernelIsNotBooted() + { + $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer', 'doLoadClassCache')); + $kernel->loadClassCache(); + $kernel->expects($this->never()) + ->method('doLoadClassCache'); + } + + public function testEnvParametersResourceIsAdded() + { + $container = new ContainerBuilder(); + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest') + ->disableOriginalConstructor() + ->setMethods(array('getContainerBuilder', 'prepareContainer', 'getCacheDir', 'getLogDir')) + ->getMock(); + $kernel->expects($this->any()) + ->method('getContainerBuilder') + ->will($this->returnValue($container)); + $kernel->expects($this->any()) + ->method('prepareContainer') + ->will($this->returnValue(null)); + $kernel->expects($this->any()) + ->method('getCacheDir') + ->will($this->returnValue(sys_get_temp_dir())); + $kernel->expects($this->any()) + ->method('getLogDir') + ->will($this->returnValue(sys_get_temp_dir())); + + $reflection = new \ReflectionClass(get_class($kernel)); + $method = $reflection->getMethod('buildContainer'); + $method->setAccessible(true); + $method->invoke($kernel); + + $found = false; + foreach ($container->getResources() as $resource) { + if ($resource instanceof EnvParametersResource) { + $found = true; + break; + } + } + + $this->assertTrue($found); + } + + public function testBootKernelSeveralTimesOnlyInitializesBundlesOnce() + { + $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer')); + $kernel->expects($this->once()) + ->method('initializeBundles'); + + $kernel->boot(); + $kernel->boot(); + } + + public function testShutdownCallsShutdownOnAllBundles() + { + $bundle = $this->getMockBuilder('Symfony\Component\HttpKernel\Bundle\Bundle')->getMock(); + $bundle->expects($this->once()) + ->method('shutdown'); + + $kernel = $this->getKernel(array(), array($bundle)); + + $kernel->boot(); + $kernel->shutdown(); + } + + public function testShutdownGivesNullContainerToAllBundles() + { + $bundle = $this->getMockBuilder('Symfony\Component\HttpKernel\Bundle\Bundle')->getMock(); + $bundle->expects($this->at(3)) + ->method('setContainer') + ->with(null); + + $kernel = $this->getKernel(array('getBundles')); + $kernel->expects($this->any()) + ->method('getBundles') + ->will($this->returnValue(array($bundle))); + + $kernel->boot(); + $kernel->shutdown(); + } + + public function testHandleCallsHandleOnHttpKernel() + { + $type = HttpKernelInterface::MASTER_REQUEST; + $catch = true; + $request = new Request(); + + $httpKernelMock = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernel') + ->disableOriginalConstructor() + ->getMock(); + $httpKernelMock + ->expects($this->once()) + ->method('handle') + ->with($request, $type, $catch); + + $kernel = $this->getKernel(array('getHttpKernel')); + $kernel->expects($this->once()) + ->method('getHttpKernel') + ->will($this->returnValue($httpKernelMock)); + + $kernel->handle($request, $type, $catch); + } + + public function testHandleBootsTheKernel() + { + $type = HttpKernelInterface::MASTER_REQUEST; + $catch = true; + $request = new Request(); + + $httpKernelMock = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernel') + ->disableOriginalConstructor() + ->getMock(); + + $kernel = $this->getKernel(array('getHttpKernel', 'boot')); + $kernel->expects($this->once()) + ->method('getHttpKernel') + ->will($this->returnValue($httpKernelMock)); + + $kernel->expects($this->once()) + ->method('boot'); + + $kernel->handle($request, $type, $catch); + } + + public function testStripComments() + { + $source = <<<'EOF' +assertEquals($expected, $output); + } + + public function testGetRootDir() + { + $kernel = new KernelForTest('test', true); + + $this->assertEquals(__DIR__.DIRECTORY_SEPARATOR.'Fixtures', realpath($kernel->getRootDir())); + } + + public function testGetName() + { + $kernel = new KernelForTest('test', true); + + $this->assertEquals('Fixtures', $kernel->getName()); + } + + public function testOverrideGetName() + { + $kernel = new KernelForOverrideName('test', true); + + $this->assertEquals('overridden', $kernel->getName()); + } + + public function testSerialize() + { + $env = 'test_env'; + $debug = true; + $kernel = new KernelForTest($env, $debug); + + $expected = serialize(array($env, $debug)); + $this->assertEquals($expected, $kernel->serialize()); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testLocateResourceThrowsExceptionWhenNameIsNotValid() + { + $this->getKernel()->locateResource('Foo'); + } + + /** + * @expectedException \RuntimeException + */ + public function testLocateResourceThrowsExceptionWhenNameIsUnsafe() + { + $this->getKernel()->locateResource('@FooBundle/../bar'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testLocateResourceThrowsExceptionWhenBundleDoesNotExist() + { + $this->getKernel()->locateResource('@FooBundle/config/routing.xml'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testLocateResourceThrowsExceptionWhenResourceDoesNotExist() + { + $kernel = $this->getKernel(array('getBundle')); + $kernel + ->expects($this->once()) + ->method('getBundle') + ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle')))) + ; + + $kernel->locateResource('@Bundle1Bundle/config/routing.xml'); + } + + public function testLocateResourceReturnsTheFirstThatMatches() + { + $kernel = $this->getKernel(array('getBundle')); + $kernel + ->expects($this->once()) + ->method('getBundle') + ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle')))) + ; + + $this->assertEquals(__DIR__.'/Fixtures/Bundle1Bundle/foo.txt', $kernel->locateResource('@Bundle1Bundle/foo.txt')); + } + + public function testLocateResourceReturnsTheFirstThatMatchesWithParent() + { + $parent = $this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle'); + $child = $this->getBundle(__DIR__.'/Fixtures/Bundle2Bundle'); + + $kernel = $this->getKernel(array('getBundle')); + $kernel + ->expects($this->exactly(2)) + ->method('getBundle') + ->will($this->returnValue(array($child, $parent))) + ; + + $this->assertEquals(__DIR__.'/Fixtures/Bundle2Bundle/foo.txt', $kernel->locateResource('@ParentAABundle/foo.txt')); + $this->assertEquals(__DIR__.'/Fixtures/Bundle1Bundle/bar.txt', $kernel->locateResource('@ParentAABundle/bar.txt')); + } + + public function testLocateResourceReturnsAllMatches() + { + $parent = $this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle'); + $child = $this->getBundle(__DIR__.'/Fixtures/Bundle2Bundle'); + + $kernel = $this->getKernel(array('getBundle')); + $kernel + ->expects($this->once()) + ->method('getBundle') + ->will($this->returnValue(array($child, $parent))) + ; + + $this->assertEquals(array( + __DIR__.'/Fixtures/Bundle2Bundle/foo.txt', + __DIR__.'/Fixtures/Bundle1Bundle/foo.txt', ), + $kernel->locateResource('@Bundle1Bundle/foo.txt', null, false)); + } + + public function testLocateResourceReturnsAllMatchesBis() + { + $kernel = $this->getKernel(array('getBundle')); + $kernel + ->expects($this->once()) + ->method('getBundle') + ->will($this->returnValue(array( + $this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle'), + $this->getBundle(__DIR__.'/Foobar'), + ))) + ; + + $this->assertEquals( + array(__DIR__.'/Fixtures/Bundle1Bundle/foo.txt'), + $kernel->locateResource('@Bundle1Bundle/foo.txt', null, false) + ); + } + + public function testLocateResourceIgnoresDirOnNonResource() + { + $kernel = $this->getKernel(array('getBundle')); + $kernel + ->expects($this->once()) + ->method('getBundle') + ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle')))) + ; + + $this->assertEquals( + __DIR__.'/Fixtures/Bundle1Bundle/foo.txt', + $kernel->locateResource('@Bundle1Bundle/foo.txt', __DIR__.'/Fixtures') + ); + } + + public function testLocateResourceReturnsTheDirOneForResources() + { + $kernel = $this->getKernel(array('getBundle')); + $kernel + ->expects($this->once()) + ->method('getBundle') + ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/FooBundle', null, null, 'FooBundle')))) + ; + + $this->assertEquals( + __DIR__.'/Fixtures/Resources/FooBundle/foo.txt', + $kernel->locateResource('@FooBundle/Resources/foo.txt', __DIR__.'/Fixtures/Resources') + ); + } + + public function testLocateResourceReturnsTheDirOneForResourcesAndBundleOnes() + { + $kernel = $this->getKernel(array('getBundle')); + $kernel + ->expects($this->once()) + ->method('getBundle') + ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle', null, null, 'Bundle1Bundle')))) + ; + + $this->assertEquals(array( + __DIR__.'/Fixtures/Resources/Bundle1Bundle/foo.txt', + __DIR__.'/Fixtures/Bundle1Bundle/Resources/foo.txt', ), + $kernel->locateResource('@Bundle1Bundle/Resources/foo.txt', __DIR__.'/Fixtures/Resources', false) + ); + } + + public function testLocateResourceOverrideBundleAndResourcesFolders() + { + $parent = $this->getBundle(__DIR__.'/Fixtures/BaseBundle', null, 'BaseBundle', 'BaseBundle'); + $child = $this->getBundle(__DIR__.'/Fixtures/ChildBundle', 'ParentBundle', 'ChildBundle', 'ChildBundle'); + + $kernel = $this->getKernel(array('getBundle')); + $kernel + ->expects($this->exactly(4)) + ->method('getBundle') + ->will($this->returnValue(array($child, $parent))) + ; + + $this->assertEquals(array( + __DIR__.'/Fixtures/Resources/ChildBundle/foo.txt', + __DIR__.'/Fixtures/ChildBundle/Resources/foo.txt', + __DIR__.'/Fixtures/BaseBundle/Resources/foo.txt', + ), + $kernel->locateResource('@BaseBundle/Resources/foo.txt', __DIR__.'/Fixtures/Resources', false) + ); + + $this->assertEquals( + __DIR__.'/Fixtures/Resources/ChildBundle/foo.txt', + $kernel->locateResource('@BaseBundle/Resources/foo.txt', __DIR__.'/Fixtures/Resources') + ); + + try { + $kernel->locateResource('@BaseBundle/Resources/hide.txt', __DIR__.'/Fixtures/Resources', false); + $this->fail('Hidden resources should raise an exception when returning an array of matching paths'); + } catch (\RuntimeException $e) { + } + + try { + $kernel->locateResource('@BaseBundle/Resources/hide.txt', __DIR__.'/Fixtures/Resources', true); + $this->fail('Hidden resources should raise an exception when returning the first matching path'); + } catch (\RuntimeException $e) { + } + } + + public function testLocateResourceOnDirectories() + { + $kernel = $this->getKernel(array('getBundle')); + $kernel + ->expects($this->exactly(2)) + ->method('getBundle') + ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/FooBundle', null, null, 'FooBundle')))) + ; + + $this->assertEquals( + __DIR__.'/Fixtures/Resources/FooBundle/', + $kernel->locateResource('@FooBundle/Resources/', __DIR__.'/Fixtures/Resources') + ); + $this->assertEquals( + __DIR__.'/Fixtures/Resources/FooBundle', + $kernel->locateResource('@FooBundle/Resources', __DIR__.'/Fixtures/Resources') + ); + + $kernel = $this->getKernel(array('getBundle')); + $kernel + ->expects($this->exactly(2)) + ->method('getBundle') + ->will($this->returnValue(array($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle', null, null, 'Bundle1Bundle')))) + ; + + $this->assertEquals( + __DIR__.'/Fixtures/Bundle1Bundle/Resources/', + $kernel->locateResource('@Bundle1Bundle/Resources/') + ); + $this->assertEquals( + __DIR__.'/Fixtures/Bundle1Bundle/Resources', + $kernel->locateResource('@Bundle1Bundle/Resources') + ); + } + + public function testInitializeBundles() + { + $parent = $this->getBundle(null, null, 'ParentABundle'); + $child = $this->getBundle(null, 'ParentABundle', 'ChildABundle'); + + // use test kernel so we can access getBundleMap() + $kernel = $this->getKernelForTest(array('registerBundles')); + $kernel + ->expects($this->once()) + ->method('registerBundles') + ->will($this->returnValue(array($parent, $child))) + ; + $kernel->boot(); + + $map = $kernel->getBundleMap(); + $this->assertEquals(array($child, $parent), $map['ParentABundle']); + } + + public function testInitializeBundlesSupportInheritanceCascade() + { + $grandparent = $this->getBundle(null, null, 'GrandParentBBundle'); + $parent = $this->getBundle(null, 'GrandParentBBundle', 'ParentBBundle'); + $child = $this->getBundle(null, 'ParentBBundle', 'ChildBBundle'); + + // use test kernel so we can access getBundleMap() + $kernel = $this->getKernelForTest(array('registerBundles')); + $kernel + ->expects($this->once()) + ->method('registerBundles') + ->will($this->returnValue(array($grandparent, $parent, $child))) + ; + $kernel->boot(); + + $map = $kernel->getBundleMap(); + $this->assertEquals(array($child, $parent, $grandparent), $map['GrandParentBBundle']); + $this->assertEquals(array($child, $parent), $map['ParentBBundle']); + $this->assertEquals(array($child), $map['ChildBBundle']); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Bundle "ChildCBundle" extends bundle "FooBar", which is not registered. + */ + public function testInitializeBundlesThrowsExceptionWhenAParentDoesNotExists() + { + $child = $this->getBundle(null, 'FooBar', 'ChildCBundle'); + $kernel = $this->getKernel(array(), array($child)); + $kernel->boot(); + } + + public function testInitializeBundlesSupportsArbitraryBundleRegistrationOrder() + { + $grandparent = $this->getBundle(null, null, 'GrandParentCBundle'); + $parent = $this->getBundle(null, 'GrandParentCBundle', 'ParentCBundle'); + $child = $this->getBundle(null, 'ParentCBundle', 'ChildCBundle'); + + // use test kernel so we can access getBundleMap() + $kernel = $this->getKernelForTest(array('registerBundles')); + $kernel + ->expects($this->once()) + ->method('registerBundles') + ->will($this->returnValue(array($parent, $grandparent, $child))) + ; + $kernel->boot(); + + $map = $kernel->getBundleMap(); + $this->assertEquals(array($child, $parent, $grandparent), $map['GrandParentCBundle']); + $this->assertEquals(array($child, $parent), $map['ParentCBundle']); + $this->assertEquals(array($child), $map['ChildCBundle']); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Bundle "ParentCBundle" is directly extended by two bundles "ChildC2Bundle" and "ChildC1Bundle". + */ + public function testInitializeBundlesThrowsExceptionWhenABundleIsDirectlyExtendedByTwoBundles() + { + $parent = $this->getBundle(null, null, 'ParentCBundle'); + $child1 = $this->getBundle(null, 'ParentCBundle', 'ChildC1Bundle'); + $child2 = $this->getBundle(null, 'ParentCBundle', 'ChildC2Bundle'); + + $kernel = $this->getKernel(array(), array($parent, $child1, $child2)); + $kernel->boot(); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Trying to register two bundles with the same name "DuplicateName" + */ + public function testInitializeBundleThrowsExceptionWhenRegisteringTwoBundlesWithTheSameName() + { + $fooBundle = $this->getBundle(null, null, 'FooBundle', 'DuplicateName'); + $barBundle = $this->getBundle(null, null, 'BarBundle', 'DuplicateName'); + + $kernel = $this->getKernel(array(), array($fooBundle, $barBundle)); + $kernel->boot(); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Bundle "CircularRefBundle" can not extend itself. + */ + public function testInitializeBundleThrowsExceptionWhenABundleExtendsItself() + { + $circularRef = $this->getBundle(null, 'CircularRefBundle', 'CircularRefBundle'); + + $kernel = $this->getKernel(array(), array($circularRef)); + $kernel->boot(); + } + + public function testTerminateReturnsSilentlyIfKernelIsNotBooted() + { + $kernel = $this->getKernel(array('getHttpKernel')); + $kernel->expects($this->never()) + ->method('getHttpKernel'); + + $kernel->terminate(Request::create('/'), new Response()); + } + + public function testTerminateDelegatesTerminationOnlyForTerminableInterface() + { + // does not implement TerminableInterface + $httpKernel = new TestKernel(); + + $kernel = $this->getKernel(array('getHttpKernel')); + $kernel->expects($this->once()) + ->method('getHttpKernel') + ->willReturn($httpKernel); + + $kernel->boot(); + $kernel->terminate(Request::create('/'), new Response()); + + $this->assertFalse($httpKernel->terminateCalled, 'terminate() is never called if the kernel class does not implement TerminableInterface'); + + // implements TerminableInterface + $httpKernelMock = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernel') + ->disableOriginalConstructor() + ->setMethods(array('terminate')) + ->getMock(); + + $httpKernelMock + ->expects($this->once()) + ->method('terminate'); + + $kernel = $this->getKernel(array('getHttpKernel')); + $kernel->expects($this->exactly(2)) + ->method('getHttpKernel') + ->will($this->returnValue($httpKernelMock)); + + $kernel->boot(); + $kernel->terminate(Request::create('/'), new Response()); + } + + public function testKernelRootDirNameStartingWithANumber() + { + $dir = __DIR__.'/Fixtures/123'; + require_once $dir.'/Kernel123.php'; + $kernel = new \Symfony\Component\HttpKernel\Tests\Fixtures\_123\Kernel123('dev', true); + $this->assertEquals('_123', $kernel->getName()); + } + + /** + * Returns a mock for the BundleInterface. + * + * @return BundleInterface + */ + protected function getBundle($dir = null, $parent = null, $className = null, $bundleName = null) + { + $bundle = $this + ->getMockBuilder('Symfony\Component\HttpKernel\Bundle\BundleInterface') + ->setMethods(array('getPath', 'getParent', 'getName')) + ->disableOriginalConstructor() + ; + + if ($className) { + $bundle->setMockClassName($className); + } + + $bundle = $bundle->getMockForAbstractClass(); + + $bundle + ->expects($this->any()) + ->method('getName') + ->will($this->returnValue(null === $bundleName ? get_class($bundle) : $bundleName)) + ; + + $bundle + ->expects($this->any()) + ->method('getPath') + ->will($this->returnValue($dir)) + ; + + $bundle + ->expects($this->any()) + ->method('getParent') + ->will($this->returnValue($parent)) + ; + + return $bundle; + } + + /** + * Returns a mock for the abstract kernel. + * + * @param array $methods Additional methods to mock (besides the abstract ones) + * @param array $bundles Bundles to register + * + * @return Kernel + */ + protected function getKernel(array $methods = array(), array $bundles = array()) + { + $methods[] = 'registerBundles'; + + $kernel = $this + ->getMockBuilder('Symfony\Component\HttpKernel\Kernel') + ->setMethods($methods) + ->setConstructorArgs(array('test', false)) + ->getMockForAbstractClass() + ; + $kernel->expects($this->any()) + ->method('registerBundles') + ->will($this->returnValue($bundles)) + ; + $p = new \ReflectionProperty($kernel, 'rootDir'); + $p->setAccessible(true); + $p->setValue($kernel, __DIR__.'/Fixtures'); + + return $kernel; + } + + protected function getKernelForTest(array $methods = array()) + { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest') + ->setConstructorArgs(array('test', false)) + ->setMethods($methods) + ->getMock(); + $p = new \ReflectionProperty($kernel, 'rootDir'); + $p->setAccessible(true); + $p->setValue($kernel, __DIR__.'/Fixtures'); + + return $kernel; + } +} + +class TestKernel implements HttpKernelInterface +{ + public $terminateCalled = false; + + public function terminate() + { + $this->terminateCalled = true; + } + + public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Logger.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Logger.php new file mode 100644 index 0000000000000000000000000000000000000000..63c70bf67aa82ec508e0eff9ce3163e52e15e20d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Logger.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests; + +use Psr\Log\LoggerInterface; + +class Logger implements LoggerInterface +{ + protected $logs; + + public function __construct() + { + $this->clear(); + } + + public function getLogs($level = false) + { + return false === $level ? $this->logs : $this->logs[$level]; + } + + public function clear() + { + $this->logs = array( + 'emergency' => array(), + 'alert' => array(), + 'critical' => array(), + 'error' => array(), + 'warning' => array(), + 'notice' => array(), + 'info' => array(), + 'debug' => array(), + ); + } + + public function log($level, $message, array $context = array()) + { + $this->logs[$level][] = $message; + } + + public function emergency($message, array $context = array()) + { + $this->log('emergency', $message, $context); + } + + public function alert($message, array $context = array()) + { + $this->log('alert', $message, $context); + } + + public function critical($message, array $context = array()) + { + $this->log('critical', $message, $context); + } + + public function error($message, array $context = array()) + { + $this->log('error', $message, $context); + } + + public function warning($message, array $context = array()) + { + $this->log('warning', $message, $context); + } + + public function notice($message, array $context = array()) + { + $this->log('notice', $message, $context); + } + + public function info($message, array $context = array()) + { + $this->log('info', $message, $context); + } + + public function debug($message, array $context = array()) + { + $this->log('debug', $message, $context); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..99ff20756743933c05d600b0163fa0ba493c9bc5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php @@ -0,0 +1,350 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Profiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\Profiler\FileProfilerStorage; +use Symfony\Component\HttpKernel\Profiler\Profile; + +class FileProfilerStorageTest extends TestCase +{ + private $tmpDir; + private $storage; + + protected function setUp() + { + $this->tmpDir = sys_get_temp_dir().'/sf2_profiler_file_storage'; + if (is_dir($this->tmpDir)) { + self::cleanDir(); + } + $this->storage = new FileProfilerStorage('file:'.$this->tmpDir); + $this->storage->purge(); + } + + protected function tearDown() + { + self::cleanDir(); + } + + public function testStore() + { + for ($i = 0; $i < 10; ++$i) { + $profile = new Profile('token_'.$i); + $profile->setIp('127.0.0.1'); + $profile->setUrl('http://foo.bar'); + $profile->setMethod('GET'); + $this->storage->write($profile); + } + $this->assertCount(10, $this->storage->find('127.0.0.1', 'http://foo.bar', 20, 'GET'), '->write() stores data in the storage'); + } + + public function testChildren() + { + $parentProfile = new Profile('token_parent'); + $parentProfile->setIp('127.0.0.1'); + $parentProfile->setUrl('http://foo.bar/parent'); + + $childProfile = new Profile('token_child'); + $childProfile->setIp('127.0.0.1'); + $childProfile->setUrl('http://foo.bar/child'); + + $parentProfile->addChild($childProfile); + + $this->storage->write($parentProfile); + $this->storage->write($childProfile); + + // Load them from storage + $parentProfile = $this->storage->read('token_parent'); + $childProfile = $this->storage->read('token_child'); + + // Check child has link to parent + $this->assertNotNull($childProfile->getParent()); + $this->assertEquals($parentProfile->getToken(), $childProfile->getParentToken()); + + // Check parent has child + $children = $parentProfile->getChildren(); + $this->assertCount(1, $children); + $this->assertEquals($childProfile->getToken(), $children[0]->getToken()); + } + + public function testStoreSpecialCharsInUrl() + { + // The storage accepts special characters in URLs (Even though URLs are not + // supposed to contain them) + $profile = new Profile('simple_quote'); + $profile->setUrl('http://foo.bar/\''); + $this->storage->write($profile); + $this->assertTrue(false !== $this->storage->read('simple_quote'), '->write() accepts single quotes in URL'); + + $profile = new Profile('double_quote'); + $profile->setUrl('http://foo.bar/"'); + $this->storage->write($profile); + $this->assertTrue(false !== $this->storage->read('double_quote'), '->write() accepts double quotes in URL'); + + $profile = new Profile('backslash'); + $profile->setUrl('http://foo.bar/\\'); + $this->storage->write($profile); + $this->assertTrue(false !== $this->storage->read('backslash'), '->write() accepts backslash in URL'); + + $profile = new Profile('comma'); + $profile->setUrl('http://foo.bar/,'); + $this->storage->write($profile); + $this->assertTrue(false !== $this->storage->read('comma'), '->write() accepts comma in URL'); + } + + public function testStoreDuplicateToken() + { + $profile = new Profile('token'); + $profile->setUrl('http://example.com/'); + + $this->assertTrue($this->storage->write($profile), '->write() returns true when the token is unique'); + + $profile->setUrl('http://example.net/'); + + $this->assertTrue($this->storage->write($profile), '->write() returns true when the token is already present in the storage'); + $this->assertEquals('http://example.net/', $this->storage->read('token')->getUrl(), '->write() overwrites the current profile data'); + + $this->assertCount(1, $this->storage->find('', '', 1000, ''), '->find() does not return the same profile twice'); + } + + public function testRetrieveByIp() + { + $profile = new Profile('token'); + $profile->setIp('127.0.0.1'); + $profile->setMethod('GET'); + $this->storage->write($profile); + + $this->assertCount(1, $this->storage->find('127.0.0.1', '', 10, 'GET'), '->find() retrieve a record by IP'); + $this->assertCount(0, $this->storage->find('127.0.%.1', '', 10, 'GET'), '->find() does not interpret a "%" as a wildcard in the IP'); + $this->assertCount(0, $this->storage->find('127.0._.1', '', 10, 'GET'), '->find() does not interpret a "_" as a wildcard in the IP'); + } + + public function testRetrieveByStatusCode() + { + $profile200 = new Profile('statuscode200'); + $profile200->setStatusCode(200); + $this->storage->write($profile200); + + $profile404 = new Profile('statuscode404'); + $profile404->setStatusCode(404); + $this->storage->write($profile404); + + $this->assertCount(1, $this->storage->find(null, null, 10, null, null, null, '200'), '->find() retrieve a record by Status code 200'); + $this->assertCount(1, $this->storage->find(null, null, 10, null, null, null, '404'), '->find() retrieve a record by Status code 404'); + } + + public function testRetrieveByUrl() + { + $profile = new Profile('simple_quote'); + $profile->setIp('127.0.0.1'); + $profile->setUrl('http://foo.bar/\''); + $profile->setMethod('GET'); + $this->storage->write($profile); + + $profile = new Profile('double_quote'); + $profile->setIp('127.0.0.1'); + $profile->setUrl('http://foo.bar/"'); + $profile->setMethod('GET'); + $this->storage->write($profile); + + $profile = new Profile('backslash'); + $profile->setIp('127.0.0.1'); + $profile->setUrl('http://foo\\bar/'); + $profile->setMethod('GET'); + $this->storage->write($profile); + + $profile = new Profile('percent'); + $profile->setIp('127.0.0.1'); + $profile->setUrl('http://foo.bar/%'); + $profile->setMethod('GET'); + $this->storage->write($profile); + + $profile = new Profile('underscore'); + $profile->setIp('127.0.0.1'); + $profile->setUrl('http://foo.bar/_'); + $profile->setMethod('GET'); + $this->storage->write($profile); + + $profile = new Profile('semicolon'); + $profile->setIp('127.0.0.1'); + $profile->setUrl('http://foo.bar/;'); + $profile->setMethod('GET'); + $this->storage->write($profile); + + $this->assertCount(1, $this->storage->find('127.0.0.1', 'http://foo.bar/\'', 10, 'GET'), '->find() accepts single quotes in URLs'); + $this->assertCount(1, $this->storage->find('127.0.0.1', 'http://foo.bar/"', 10, 'GET'), '->find() accepts double quotes in URLs'); + $this->assertCount(1, $this->storage->find('127.0.0.1', 'http://foo\\bar/', 10, 'GET'), '->find() accepts backslash in URLs'); + $this->assertCount(1, $this->storage->find('127.0.0.1', 'http://foo.bar/;', 10, 'GET'), '->find() accepts semicolon in URLs'); + $this->assertCount(1, $this->storage->find('127.0.0.1', 'http://foo.bar/%', 10, 'GET'), '->find() does not interpret a "%" as a wildcard in the URL'); + $this->assertCount(1, $this->storage->find('127.0.0.1', 'http://foo.bar/_', 10, 'GET'), '->find() does not interpret a "_" as a wildcard in the URL'); + } + + public function testStoreTime() + { + $dt = new \DateTime('now'); + $start = $dt->getTimestamp(); + + for ($i = 0; $i < 3; ++$i) { + $dt->modify('+1 minute'); + $profile = new Profile('time_'.$i); + $profile->setIp('127.0.0.1'); + $profile->setUrl('http://foo.bar'); + $profile->setTime($dt->getTimestamp()); + $profile->setMethod('GET'); + $this->storage->write($profile); + } + + $records = $this->storage->find('', '', 3, 'GET', $start, time() + 3 * 60); + $this->assertCount(3, $records, '->find() returns all previously added records'); + $this->assertEquals($records[0]['token'], 'time_2', '->find() returns records ordered by time in descendant order'); + $this->assertEquals($records[1]['token'], 'time_1', '->find() returns records ordered by time in descendant order'); + $this->assertEquals($records[2]['token'], 'time_0', '->find() returns records ordered by time in descendant order'); + + $records = $this->storage->find('', '', 3, 'GET', $start, time() + 2 * 60); + $this->assertCount(2, $records, '->find() should return only first two of the previously added records'); + } + + public function testRetrieveByEmptyUrlAndIp() + { + for ($i = 0; $i < 5; ++$i) { + $profile = new Profile('token_'.$i); + $profile->setMethod('GET'); + $this->storage->write($profile); + } + $this->assertCount(5, $this->storage->find('', '', 10, 'GET'), '->find() returns all previously added records'); + $this->storage->purge(); + } + + public function testRetrieveByMethodAndLimit() + { + foreach (array('POST', 'GET') as $method) { + for ($i = 0; $i < 5; ++$i) { + $profile = new Profile('token_'.$i.$method); + $profile->setMethod($method); + $this->storage->write($profile); + } + } + + $this->assertCount(5, $this->storage->find('', '', 5, 'POST')); + + $this->storage->purge(); + } + + public function testPurge() + { + $profile = new Profile('token1'); + $profile->setIp('127.0.0.1'); + $profile->setUrl('http://example.com/'); + $profile->setMethod('GET'); + $this->storage->write($profile); + + $this->assertTrue(false !== $this->storage->read('token1')); + $this->assertCount(1, $this->storage->find('127.0.0.1', '', 10, 'GET')); + + $profile = new Profile('token2'); + $profile->setIp('127.0.0.1'); + $profile->setUrl('http://example.net/'); + $profile->setMethod('GET'); + $this->storage->write($profile); + + $this->assertTrue(false !== $this->storage->read('token2')); + $this->assertCount(2, $this->storage->find('127.0.0.1', '', 10, 'GET')); + + $this->storage->purge(); + + $this->assertEmpty($this->storage->read('token'), '->purge() removes all data stored by profiler'); + $this->assertCount(0, $this->storage->find('127.0.0.1', '', 10, 'GET'), '->purge() removes all items from index'); + } + + public function testDuplicates() + { + for ($i = 1; $i <= 5; ++$i) { + $profile = new Profile('foo'.$i); + $profile->setIp('127.0.0.1'); + $profile->setUrl('http://example.net/'); + $profile->setMethod('GET'); + + ///three duplicates + $this->storage->write($profile); + $this->storage->write($profile); + $this->storage->write($profile); + } + $this->assertCount(3, $this->storage->find('127.0.0.1', 'http://example.net/', 3, 'GET'), '->find() method returns incorrect number of entries'); + } + + public function testStatusCode() + { + $profile = new Profile('token1'); + $profile->setStatusCode(200); + $this->storage->write($profile); + + $profile = new Profile('token2'); + $profile->setStatusCode(404); + $this->storage->write($profile); + + $tokens = $this->storage->find('', '', 10, ''); + $this->assertCount(2, $tokens); + $this->assertContains($tokens[0]['status_code'], array(200, 404)); + $this->assertContains($tokens[1]['status_code'], array(200, 404)); + } + + public function testMultiRowIndexFile() + { + $iteration = 3; + for ($i = 0; $i < $iteration; ++$i) { + $profile = new Profile('token'.$i); + $profile->setIp('127.0.0.'.$i); + $profile->setUrl('http://foo.bar/'.$i); + + $this->storage->write($profile); + $this->storage->write($profile); + $this->storage->write($profile); + } + + $handle = fopen($this->tmpDir.'/index.csv', 'r'); + for ($i = 0; $i < $iteration; ++$i) { + $row = fgetcsv($handle); + $this->assertEquals('token'.$i, $row[0]); + $this->assertEquals('127.0.0.'.$i, $row[1]); + $this->assertEquals('http://foo.bar/'.$i, $row[3]); + } + $this->assertFalse(fgetcsv($handle)); + } + + public function testReadLineFromFile() + { + $r = new \ReflectionMethod($this->storage, 'readLineFromFile'); + + $r->setAccessible(true); + + $h = tmpfile(); + + fwrite($h, "line1\n\n\nline2\n"); + fseek($h, 0, SEEK_END); + + $this->assertEquals('line2', $r->invoke($this->storage, $h)); + $this->assertEquals('line1', $r->invoke($this->storage, $h)); + } + + protected function cleanDir() + { + $flags = \FilesystemIterator::SKIP_DOTS; + $iterator = new \RecursiveDirectoryIterator($this->tmpDir, $flags); + $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST); + + foreach ($iterator as $file) { + if (is_file($file)) { + unlink($file); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b24873d4b29b14ef9edba85a43884ee4b95d9fc3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\Profiler; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector; +use Symfony\Component\HttpKernel\Profiler\FileProfilerStorage; +use Symfony\Component\HttpKernel\Profiler\Profiler; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\VarDumper\Cloner\Data; + +class ProfilerTest extends TestCase +{ + private $tmp; + private $storage; + + public function testCollect() + { + $request = new Request(); + $request->query->set('foo', 'bar'); + $response = new Response('', 204); + $collector = new RequestDataCollector(); + + $profiler = new Profiler($this->storage); + $profiler->add($collector); + $profile = $profiler->collect($request, $response); + + $this->assertSame(204, $profile->getStatusCode()); + $this->assertSame('GET', $profile->getMethod()); + $this->assertInstanceOf(Data::class, $profiler->get('request')->getRequestQuery()->all()['foo']); + } + + public function testFindWorksWithDates() + { + $profiler = new Profiler($this->storage); + + $this->assertCount(0, $profiler->find(null, null, null, null, '7th April 2014', '9th April 2014')); + } + + public function testFindWorksWithTimestamps() + { + $profiler = new Profiler($this->storage); + + $this->assertCount(0, $profiler->find(null, null, null, null, '1396828800', '1397001600')); + } + + public function testFindWorksWithInvalidDates() + { + $profiler = new Profiler($this->storage); + + $this->assertCount(0, $profiler->find(null, null, null, null, 'some string', '')); + } + + public function testFindWorksWithStatusCode() + { + $profiler = new Profiler($this->storage); + + $this->assertCount(0, $profiler->find(null, null, null, null, null, null, '204')); + } + + protected function setUp() + { + $this->tmp = tempnam(sys_get_temp_dir(), 'sf2_profiler'); + if (file_exists($this->tmp)) { + @unlink($this->tmp); + } + + $this->storage = new FileProfilerStorage('file:'.$this->tmp); + $this->storage->purge(); + } + + protected function tearDown() + { + if (null !== $this->storage) { + $this->storage->purge(); + $this->storage = null; + + @unlink($this->tmp); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php new file mode 100644 index 0000000000000000000000000000000000000000..3ec59272541a444de4a6e072f66351a4ab8d87e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests; + +use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; +use Symfony\Component\HttpKernel\HttpKernel; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; +use Symfony\Component\EventDispatcher\EventDispatcher; + +class TestHttpKernel extends HttpKernel implements ControllerResolverInterface, ArgumentResolverInterface +{ + public function __construct() + { + parent::__construct(new EventDispatcher(), $this, null, $this); + } + + public function getController(Request $request) + { + return array($this, 'callController'); + } + + public function getArguments(Request $request, $controller) + { + return array($request); + } + + public function callController(Request $request) + { + return new Response('Request: '.$request->getRequestUri()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..06de8902dc8cd92b1c306db4a4a8c99ea5f17a97 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.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\Component\HttpKernel\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\UriSigner; + +class UriSignerTest extends TestCase +{ + public function testSign() + { + $signer = new UriSigner('foobar'); + + $this->assertContains('?_hash=', $signer->sign('http://example.com/foo')); + $this->assertContains('&_hash=', $signer->sign('http://example.com/foo?foo=bar')); + } + + public function testCheck() + { + $signer = new UriSigner('foobar'); + + $this->assertFalse($signer->check('http://example.com/foo?_hash=foo')); + $this->assertFalse($signer->check('http://example.com/foo?foo=bar&_hash=foo')); + $this->assertFalse($signer->check('http://example.com/foo?foo=bar&_hash=foo&bar=foo')); + + $this->assertTrue($signer->check($signer->sign('http://example.com/foo'))); + $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar'))); + $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&0=integer'))); + + $this->assertTrue($signer->sign('http://example.com/foo?foo=bar&bar=foo') === $signer->sign('http://example.com/foo?bar=foo&foo=bar')); + } + + public function testCheckWithDifferentArgSeparator() + { + $this->iniSet('arg_separator.output', '&'); + $signer = new UriSigner('foobar'); + + $this->assertSame( + 'http://example.com/foo?baz=bay&foo=bar&_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D', + $signer->sign('http://example.com/foo?foo=bar&baz=bay') + ); + $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay'))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/UriSigner.php b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/UriSigner.php new file mode 100644 index 0000000000000000000000000000000000000000..fa84899064e88be2d78f1512a2ce803406bf21c3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/UriSigner.php @@ -0,0 +1,109 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel; + +/** + * Signs URIs. + * + * @author Fabien Potencier + */ +class UriSigner +{ + private $secret; + + /** + * Constructor. + * + * @param string $secret A secret + */ + public function __construct($secret) + { + $this->secret = $secret; + } + + /** + * Signs a URI. + * + * The given URI is signed by adding a _hash query string parameter + * which value depends on the URI and the secret. + * + * @param string $uri A URI to sign + * + * @return string The signed URI + */ + public function sign($uri) + { + $url = parse_url($uri); + if (isset($url['query'])) { + parse_str($url['query'], $params); + } else { + $params = array(); + } + + $uri = $this->buildUrl($url, $params); + + return $uri.(false === strpos($uri, '?') ? '?' : '&').'_hash='.$this->computeHash($uri); + } + + /** + * Checks that a URI contains the correct hash. + * + * The _hash query string parameter must be the last one + * (as it is generated that way by the sign() method, it should + * never be a problem). + * + * @param string $uri A signed URI + * + * @return bool True if the URI is signed correctly, false otherwise + */ + public function check($uri) + { + $url = parse_url($uri); + if (isset($url['query'])) { + parse_str($url['query'], $params); + } else { + $params = array(); + } + + if (empty($params['_hash'])) { + return false; + } + + $hash = urlencode($params['_hash']); + unset($params['_hash']); + + return $this->computeHash($this->buildUrl($url, $params)) === $hash; + } + + private function computeHash($uri) + { + return urlencode(base64_encode(hash_hmac('sha256', $uri, $this->secret, true))); + } + + private function buildUrl(array $url, array $params = array()) + { + ksort($params, SORT_STRING); + $url['query'] = http_build_query($params, '', '&'); + + $scheme = isset($url['scheme']) ? $url['scheme'].'://' : ''; + $host = isset($url['host']) ? $url['host'] : ''; + $port = isset($url['port']) ? ':'.$url['port'] : ''; + $user = isset($url['user']) ? $url['user'] : ''; + $pass = isset($url['pass']) ? ':'.$url['pass'] : ''; + $pass = ($user || $pass) ? "$pass@" : ''; + $path = isset($url['path']) ? $url['path'] : ''; + $query = isset($url['query']) && $url['query'] ? '?'.$url['query'] : ''; + $fragment = isset($url['fragment']) ? '#'.$url['fragment'] : ''; + + return $scheme.$user.$pass.$host.$port.$path.$query.$fragment; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/composer.json b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..b4e6f23ea92901425c5dd9ed432672f725d86728 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/composer.json @@ -0,0 +1,66 @@ +{ + "name": "symfony/http-kernel", + "type": "library", + "description": "Symfony HttpKernel Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/http-foundation": "~2.8.13|~3.1.6|~3.2", + "symfony/debug": "~2.8|~3.0", + "psr/log": "~1.0" + }, + "require-dev": { + "symfony/browser-kit": "~2.8|~3.0", + "symfony/class-loader": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0", + "symfony/console": "~2.8|~3.0", + "symfony/css-selector": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0", + "symfony/routing": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0", + "symfony/var-dumper": "~3.2" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\HttpKernel\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..b29969b36fe23ed95e0d59e8febb87960030c821 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/phpunit.xml.dist @@ -0,0 +1,38 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + + + + + + Symfony\Component\HttpFoundation + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Inflector/Inflector.php b/vendor/symfony/symfony/src/Symfony/Component/Inflector/Inflector.php new file mode 100644 index 0000000000000000000000000000000000000000..fbe8cc8a45c72fb5fd4f2b3191bc08424cf795b3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Inflector/Inflector.php @@ -0,0 +1,232 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Inflector; + +/** + * Converts words between singular and plural forms. + * + * @author Bernhard Schussek + * + * @internal + */ +final class Inflector +{ + /** + * Map English plural to singular suffixes. + * + * @var array + * + * @see http://english-zone.com/spelling/plurals.html + */ + private static $pluralMap = array( + // First entry: plural suffix, reversed + // Second entry: length of plural suffix + // Third entry: Whether the suffix may succeed a vocal + // Fourth entry: Whether the suffix may succeed a consonant + // Fifth entry: singular suffix, normal + + // bacteria (bacterium), criteria (criterion), phenomena (phenomenon) + array('a', 1, true, true, array('on', 'um')), + + // nebulae (nebula) + array('ea', 2, true, true, 'a'), + + // services (service) + array('secivres', 8, true, true, 'service'), + + // mice (mouse), lice (louse) + array('eci', 3, false, true, 'ouse'), + + // geese (goose) + array('esee', 4, false, true, 'oose'), + + // fungi (fungus), alumni (alumnus), syllabi (syllabus), radii (radius) + array('i', 1, true, true, 'us'), + + // men (man), women (woman) + array('nem', 3, true, true, 'man'), + + // children (child) + array('nerdlihc', 8, true, true, 'child'), + + // oxen (ox) + array('nexo', 4, false, false, 'ox'), + + // indices (index), appendices (appendix), prices (price) + array('seci', 4, false, true, array('ex', 'ix', 'ice')), + + // selfies (selfie) + array('seifles', 7, true, true, 'selfie'), + + // movies (movie) + array('seivom', 6, true, true, 'movie'), + + // feet (foot) + array('teef', 4, true, true, 'foot'), + + // geese (goose) + array('eseeg', 5, true, true, 'goose'), + + // teeth (tooth) + array('hteet', 5, true, true, 'tooth'), + + // news (news) + array('swen', 4, true, true, 'news'), + + // series (series) + array('seires', 6, true, true, 'series'), + + // babies (baby) + array('sei', 3, false, true, 'y'), + + // accesses (access), addresses (address), kisses (kiss) + array('sess', 4, true, false, 'ss'), + + // analyses (analysis), ellipses (ellipsis), funguses (fungus), + // neuroses (neurosis), theses (thesis), emphases (emphasis), + // oases (oasis), crises (crisis), houses (house), bases (base), + // atlases (atlas) + array('ses', 3, true, true, array('s', 'se', 'sis')), + + // objectives (objective), alternative (alternatives) + array('sevit', 5, true, true, 'tive'), + + // drives (drive) + array('sevird', 6, false, true, 'drive'), + + // lives (life), wives (wife) + array('sevi', 4, false, true, 'ife'), + + // moves (move) + array('sevom', 5, true, true, 'move'), + + // hooves (hoof), dwarves (dwarf), elves (elf), leaves (leaf), caves (cave), staves (staff) + array('sev', 3, true, true, array('f', 've', 'ff')), + + // axes (axis), axes (ax), axes (axe) + array('sexa', 4, false, false, array('ax', 'axe', 'axis')), + + // indexes (index), matrixes (matrix) + array('sex', 3, true, false, 'x'), + + // quizzes (quiz) + array('sezz', 4, true, false, 'z'), + + // bureaus (bureau) + array('suae', 4, false, true, 'eau'), + + // roses (rose), garages (garage), cassettes (cassette), + // waltzes (waltz), heroes (hero), bushes (bush), arches (arch), + // shoes (shoe) + array('se', 2, true, true, array('', 'e')), + + // tags (tag) + array('s', 1, true, true, ''), + + // chateaux (chateau) + array('xuae', 4, false, true, 'eau'), + + // people (person) + array('elpoep', 6, true, true, 'person'), + ); + + /** + * This class should not be instantiated. + */ + private function __construct() + { + } + + /** + * Returns the singular form of a word. + * + * If the method can't determine the form with certainty, an array of the + * possible singulars is returned. + * + * @param string $plural A word in plural form + * + * @return string|array The singular form or an array of possible singular + * forms + * + * @internal + */ + public static function singularize($plural) + { + $pluralRev = strrev($plural); + $lowerPluralRev = strtolower($pluralRev); + $pluralLength = strlen($lowerPluralRev); + + // The outer loop iterates over the entries of the plural table + // The inner loop $j iterates over the characters of the plural suffix + // in the plural table to compare them with the characters of the actual + // given plural suffix + foreach (self::$pluralMap as $map) { + $suffix = $map[0]; + $suffixLength = $map[1]; + $j = 0; + + // Compare characters in the plural table and of the suffix of the + // given plural one by one + while ($suffix[$j] === $lowerPluralRev[$j]) { + // Let $j point to the next character + ++$j; + + // Successfully compared the last character + // Add an entry with the singular suffix to the singular array + if ($j === $suffixLength) { + // Is there any character preceding the suffix in the plural string? + if ($j < $pluralLength) { + $nextIsVocal = false !== strpos('aeiou', $lowerPluralRev[$j]); + + if (!$map[2] && $nextIsVocal) { + // suffix may not succeed a vocal but next char is one + break; + } + + if (!$map[3] && !$nextIsVocal) { + // suffix may not succeed a consonant but next char is one + break; + } + } + + $newBase = substr($plural, 0, $pluralLength - $suffixLength); + $newSuffix = $map[4]; + + // Check whether the first character in the plural suffix + // is uppercased. If yes, uppercase the first character in + // the singular suffix too + $firstUpper = ctype_upper($pluralRev[$j - 1]); + + if (is_array($newSuffix)) { + $singulars = array(); + + foreach ($newSuffix as $newSuffixEntry) { + $singulars[] = $newBase.($firstUpper ? ucfirst($newSuffixEntry) : $newSuffixEntry); + } + + return $singulars; + } + + return $newBase.($firstUpper ? ucfirst($newSuffix) : $newSuffix); + } + + // Suffix is longer than word + if ($j === $pluralLength) { + break; + } + } + } + + // Assume that plural and singular is identical + return $plural; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Inflector/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Inflector/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ac30964e87ccba4cf06165c9ff2e5117be66732d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Inflector/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012-2017 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/vendor/symfony/symfony/src/Symfony/Component/Inflector/README.md b/vendor/symfony/symfony/src/Symfony/Component/Inflector/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8b81839dbcca8bf0880e6d8ad407ea8ceea07fdd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Inflector/README.md @@ -0,0 +1,19 @@ +Inflector Component +=================== + +Inflector converts words between their singular and plural forms (English only). + +Disclaimer +---------- + +This component is currently marked as internal. Do not use it in your own code. +Breaking changes may be introduced in the next minor version of Symfony, or the +component itself might even be removed completely. + +Resources +--------- + + * [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/vendor/symfony/symfony/src/Symfony/Component/Inflector/Tests/InflectorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Inflector/Tests/InflectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..be7836736f8ba75bb0df0f533559ab91830ed528 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Inflector/Tests/InflectorTest.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\Component\Inflector\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Inflector\Inflector; + +class InflectorTest extends TestCase +{ + public function singularizeProvider() + { + // see http://english-zone.com/spelling/plurals.html + // see http://www.scribd.com/doc/3271143/List-of-100-Irregular-Plural-Nouns-in-English + return array( + array('accesses', 'access'), + array('addresses', 'address'), + array('agendas', 'agenda'), + array('alumnae', 'alumna'), + array('alumni', 'alumnus'), + array('analyses', array('analys', 'analyse', 'analysis')), + array('antennae', 'antenna'), + array('antennas', 'antenna'), + array('appendices', array('appendex', 'appendix', 'appendice')), + array('arches', array('arch', 'arche')), + array('atlases', array('atlas', 'atlase', 'atlasis')), + array('axes', array('ax', 'axe', 'axis')), + array('babies', 'baby'), + array('bacteria', array('bacterion', 'bacterium')), + array('bases', array('bas', 'base', 'basis')), + array('batches', array('batch', 'batche')), + array('beaux', 'beau'), + array('bees', array('be', 'bee')), + array('boxes', 'box'), + array('boys', 'boy'), + array('bureaus', 'bureau'), + array('bureaux', 'bureau'), + array('buses', array('bus', 'buse', 'busis')), + array('bushes', array('bush', 'bushe')), + array('calves', array('calf', 'calve', 'calff')), + array('cars', 'car'), + array('cassettes', array('cassett', 'cassette')), + array('caves', array('caf', 'cave', 'caff')), + array('chateaux', 'chateau'), + array('cheeses', array('chees', 'cheese', 'cheesis')), + array('children', 'child'), + array('circuses', array('circus', 'circuse', 'circusis')), + array('cliffs', 'cliff'), + array('committee', 'committee'), + array('crises', array('cris', 'crise', 'crisis')), + array('criteria', array('criterion', 'criterium')), + array('cups', 'cup'), + array('data', array('daton', 'datum')), + array('days', 'day'), + array('discos', 'disco'), + array('devices', array('devex', 'devix', 'device')), + array('drives', 'drive'), + array('drivers', 'driver'), + array('dwarves', array('dwarf', 'dwarve', 'dwarff')), + array('echoes', array('echo', 'echoe')), + array('elves', array('elf', 'elve', 'elff')), + array('emphases', array('emphas', 'emphase', 'emphasis')), + array('faxes', 'fax'), + array('feet', 'foot'), + array('feedback', 'feedback'), + array('foci', 'focus'), + array('focuses', array('focus', 'focuse', 'focusis')), + array('formulae', 'formula'), + array('formulas', 'formula'), + array('fungi', 'fungus'), + array('funguses', array('fungus', 'funguse', 'fungusis')), + array('garages', array('garag', 'garage')), + array('geese', 'goose'), + array('halves', array('half', 'halve', 'halff')), + array('hats', 'hat'), + array('heroes', array('hero', 'heroe')), + array('hippopotamuses', array('hippopotamus', 'hippopotamuse', 'hippopotamusis')), //hippopotami + array('hoaxes', 'hoax'), + array('hooves', array('hoof', 'hoove', 'hooff')), + array('houses', array('hous', 'house', 'housis')), + array('indexes', 'index'), + array('indices', array('index', 'indix', 'indice')), + array('ions', 'ion'), + array('irises', array('iris', 'irise', 'irisis')), + array('kisses', 'kiss'), + array('knives', 'knife'), + array('lamps', 'lamp'), + array('leaves', array('leaf', 'leave', 'leaff')), + array('lice', 'louse'), + array('lives', 'life'), + array('matrices', array('matrex', 'matrix', 'matrice')), + array('matrixes', 'matrix'), + array('men', 'man'), + array('mice', 'mouse'), + array('moves', 'move'), + array('movies', 'movie'), + array('nebulae', 'nebula'), + array('neuroses', array('neuros', 'neurose', 'neurosis')), + array('news', 'news'), + array('oases', array('oas', 'oase', 'oasis')), + array('objectives', 'objective'), + array('oxen', 'ox'), + array('parties', 'party'), + array('people', 'person'), + array('persons', 'person'), + array('phenomena', array('phenomenon', 'phenomenum')), + array('photos', 'photo'), + array('pianos', 'piano'), + array('plateaux', 'plateau'), + array('poppies', 'poppy'), + array('prices', array('prex', 'prix', 'price')), + array('quizzes', 'quiz'), + array('radii', 'radius'), + array('roofs', 'roof'), + array('roses', array('ros', 'rose', 'rosis')), + array('sandwiches', array('sandwich', 'sandwiche')), + array('scarves', array('scarf', 'scarve', 'scarff')), + array('schemas', 'schema'), //schemata + array('selfies', 'selfie'), + array('series', 'series'), + array('services', 'service'), + array('sheriffs', 'sheriff'), + array('shoes', array('sho', 'shoe')), + array('spies', 'spy'), + array('staves', array('staf', 'stave', 'staff')), + array('stories', 'story'), + array('strata', array('straton', 'stratum')), + array('suitcases', array('suitcas', 'suitcase', 'suitcasis')), + array('syllabi', 'syllabus'), + array('tags', 'tag'), + array('teeth', 'tooth'), + array('theses', array('thes', 'these', 'thesis')), + array('thieves', array('thief', 'thieve', 'thieff')), + array('trees', array('tre', 'tree')), + array('waltzes', array('waltz', 'waltze')), + array('wives', 'wife'), + + // test casing: if the first letter was uppercase, it should remain so + array('Men', 'Man'), + array('GrandChildren', 'GrandChild'), + array('SubTrees', array('SubTre', 'SubTree')), + + // Known issues + //array('insignia', 'insigne'), + //array('insignias', 'insigne'), + //array('rattles', 'rattle'), + ); + } + + /** + * @dataProvider singularizeProvider + */ + public function testSingularize($plural, $singular) + { + $single = Inflector::singularize($plural); + if (is_string($singular) && is_array($single)) { + $this->fail("--- Expected\n`string`: ".$singular."\n+++ Actual\n`array`: ".implode(', ', $single)); + } elseif (is_array($singular) && is_string($single)) { + $this->fail("--- Expected\n`array`: ".implode(', ', $singular)."\n+++ Actual\n`string`: ".$single); + } + + $this->assertEquals($singular, $single); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Inflector/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Inflector/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..364f8079c65fee3ab6f7ac465e6f820082efbd46 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Inflector/composer.json @@ -0,0 +1,40 @@ +{ + "name": "symfony/inflector", + "type": "library", + "description": "Symfony Inflector Component", + "keywords": [ + "string", + "inflection", + "singularize", + "pluralize", + "words", + "symfony" + ], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Inflector\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Inflector/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Inflector/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..a50659e7e91976de3e08cb1e4f7587d4ba09bf3b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Inflector/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/CONTRIBUTING.md b/vendor/symfony/symfony/src/Symfony/Component/Intl/CONTRIBUTING.md new file mode 100644 index 0000000000000000000000000000000000000000..971e0af7f5903f4ca1ad3c9249a165a4a963711b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/CONTRIBUTING.md @@ -0,0 +1,91 @@ +Contributing to the Intl component +================================== + +A very good way of contributing to the Intl component is by updating the +included data for the ICU version you have installed on your system. + +Preparation +----------- + +To prepare, you need to install the development dependencies of the component. + + $ cd /path/to/Symfony/Component/Intl + $ composer install + +Determining your ICU version +--------------------------- + +The ICU version installed in your PHP environment can be found by running +icu-version.php: + + $ php Resources/bin/icu-version.php + +Updating the ICU data +--------------------- + +To update the data files, run the update-icu-component.php script: + + $ php Resources/bin/update-icu-component.php + +The script needs the binaries "svn" and "make" to be available on your system. +It will download the latest version of the ICU sources for the ICU version +installed in your PHP environment. The script will then compile the "genrb" +binary and use it to compile the ICU data files to binaries. The binaries are +copied to the Resources/ directory of the Icu component found in the +vendor/symfony/icu/ directory. + +Updating the stub data +---------------------- + +In the previous step you updated the Icu component for the ICU version +installed on your system. If you are using the latest ICU version, you should +also create the stub data files which will be used by people who don't have +the intl extension installed. + +To update the stub files, run the update-stubs.php script: + + $ php Resources/bin/update-stubs.php + +The script will fail if you don't have the latest ICU version. If you want to +upgrade the ICU version, adjust the return value of the +`Intl::getIcuStubVersion()` before you run the script. + +The script creates copies of the binary resource bundles in the Icu component +and stores them in the Resources/ directory of the Intl component. The copies +are made for the locale "en" only and are stored in .php files, so that they +can be read even if the intl extension is not available. + +Creating a pull request +----------------------- + +You need to create up to two pull requests: + +* If you updated the Icu component, you need to push that change and create a + pull request in the `symfony/Icu` repository. Make sure to submit the pull + request to the correct master branch. If you updated the ICU data for version + 4.8, your pull request goes to branch `48-master`, for version 49 to + `49-master` and so on. + +* If you updated the stub files of the Intl component, you need to push that + change and create a pull request in the `symfony/symfony` repository. The + pull request should be based on the `master` branch. + +Combining .res files to a .dat-package +-------------------------------------- + +The individual *.res files can be combined into a single .dat-file. +Unfortunately, PHP's `ResourceBundle` class is currently not able to handle +.dat-files. + +Once it is, the following steps have to be followed to build the .dat-file: + +1. Package the resource bundles into a single file + + $ find . -name *.res | sed -e "s/\.\///g" > packagelist.txt + $ pkgdata -p region -T build -d . packagelist.txt + +2. Clean up + + $ rm -rf build packagelist.txt + +3. You can now move region.dat to replace the version bundled with Symfony. diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Collator/Collator.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Collator/Collator.php new file mode 100644 index 0000000000000000000000000000000000000000..c9c69a0f3bfa2bf911191e5e172a31a5e797e8e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Collator/Collator.php @@ -0,0 +1,297 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Collator; + +use Symfony\Component\Intl\Exception\MethodNotImplementedException; +use Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException; +use Symfony\Component\Intl\Globals\IntlGlobals; +use Symfony\Component\Intl\Locale\Locale; + +/** + * Replacement for PHP's native {@link \Collator} class. + * + * The only methods currently supported in this class are: + * + * - {@link \__construct} + * - {@link create} + * - {@link asort} + * - {@link getErrorCode} + * - {@link getErrorMessage} + * - {@link getLocale} + * + * @author Igor Wiedler + * @author Bernhard Schussek + * + * @internal + */ +class Collator +{ + /* Attribute constants */ + const FRENCH_COLLATION = 0; + const ALTERNATE_HANDLING = 1; + const CASE_FIRST = 2; + const CASE_LEVEL = 3; + const NORMALIZATION_MODE = 4; + const STRENGTH = 5; + const HIRAGANA_QUATERNARY_MODE = 6; + const NUMERIC_COLLATION = 7; + + /* Attribute constants values */ + const DEFAULT_VALUE = -1; + + const PRIMARY = 0; + const SECONDARY = 1; + const TERTIARY = 2; + const DEFAULT_STRENGTH = 2; + const QUATERNARY = 3; + const IDENTICAL = 15; + + const OFF = 16; + const ON = 17; + + const SHIFTED = 20; + const NON_IGNORABLE = 21; + + const LOWER_FIRST = 24; + const UPPER_FIRST = 25; + + /* Sorting options */ + const SORT_REGULAR = 0; + const SORT_NUMERIC = 2; + const SORT_STRING = 1; + + /** + * Constructor. + * + * @param string $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") + * + * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed + */ + public function __construct($locale) + { + if ('en' !== $locale && null !== $locale) { + throw new MethodArgumentValueNotImplementedException(__METHOD__, 'locale', $locale, 'Only the locale "en" is supported'); + } + } + + /** + * Static constructor. + * + * @param string $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") + * + * @return self + * + * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed + */ + public static function create($locale) + { + return new self($locale); + } + + /** + * Sort array maintaining index association. + * + * @param array &$array Input array + * @param int $sortFlag Flags for sorting, can be one of the following: + * Collator::SORT_REGULAR - compare items normally (don't change types) + * Collator::SORT_NUMERIC - compare items numerically + * Collator::SORT_STRING - compare items as strings + * + * @return bool True on success or false on failure + */ + public function asort(&$array, $sortFlag = self::SORT_REGULAR) + { + $intlToPlainFlagMap = array( + self::SORT_REGULAR => \SORT_REGULAR, + self::SORT_NUMERIC => \SORT_NUMERIC, + self::SORT_STRING => \SORT_STRING, + ); + + $plainSortFlag = isset($intlToPlainFlagMap[$sortFlag]) ? $intlToPlainFlagMap[$sortFlag] : self::SORT_REGULAR; + + return asort($array, $plainSortFlag); + } + + /** + * Not supported. Compare two Unicode strings. + * + * @param string $str1 The first string to compare + * @param string $str2 The second string to compare + * + * @return bool|int Return the comparison result or false on failure: + * 1 if $str1 is greater than $str2 + * 0 if $str1 is equal than $str2 + * -1 if $str1 is less than $str2 + * + * @see http://www.php.net/manual/en/collator.compare.php + * + * @throws MethodNotImplementedException + */ + public function compare($str1, $str2) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Get a value of an integer collator attribute. + * + * @param int $attr An attribute specifier, one of the attribute constants + * + * @return bool|int The attribute value on success or false on error + * + * @see http://www.php.net/manual/en/collator.getattribute.php + * + * @throws MethodNotImplementedException + */ + public function getAttribute($attr) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Returns collator's last error code. Always returns the U_ZERO_ERROR class constant value. + * + * @return int The error code from last collator call + */ + public function getErrorCode() + { + return IntlGlobals::U_ZERO_ERROR; + } + + /** + * Returns collator's last error message. Always returns the U_ZERO_ERROR_MESSAGE class constant value. + * + * @return string The error message from last collator call + */ + public function getErrorMessage() + { + return 'U_ZERO_ERROR'; + } + + /** + * Returns the collator's locale. + * + * @param int $type Not supported. The locale name type to return (Locale::VALID_LOCALE or Locale::ACTUAL_LOCALE) + * + * @return string The locale used to create the collator. Currently always + * returns "en". + */ + public function getLocale($type = Locale::ACTUAL_LOCALE) + { + return 'en'; + } + + /** + * Not supported. Get sorting key for a string. + * + * @param string $string The string to produce the key from + * + * @return string The collation key for $string + * + * @see http://www.php.net/manual/en/collator.getsortkey.php + * + * @throws MethodNotImplementedException + */ + public function getSortKey($string) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Get current collator's strength. + * + * @return bool|int The current collator's strength or false on failure + * + * @see http://www.php.net/manual/en/collator.getstrength.php + * + * @throws MethodNotImplementedException + */ + public function getStrength() + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Set a collator's attribute. + * + * @param int $attr An attribute specifier, one of the attribute constants + * @param int $val The attribute value, one of the attribute value constants + * + * @return bool True on success or false on failure + * + * @see http://www.php.net/manual/en/collator.setattribute.php + * + * @throws MethodNotImplementedException + */ + public function setAttribute($attr, $val) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Set the collator's strength. + * + * @param int $strength Strength to set, possible values: + * Collator::PRIMARY + * Collator::SECONDARY + * Collator::TERTIARY + * Collator::QUATERNARY + * Collator::IDENTICAL + * Collator::DEFAULT + * + * @return bool True on success or false on failure + * + * @see http://www.php.net/manual/en/collator.setstrength.php + * + * @throws MethodNotImplementedException + */ + public function setStrength($strength) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Sort array using specified collator and sort keys. + * + * @param array &$arr Array of strings to sort + * + * @return bool True on success or false on failure + * + * @see http://www.php.net/manual/en/collator.sortwithsortkeys.php + * + * @throws MethodNotImplementedException + */ + public function sortWithSortKeys(&$arr) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Sort array using specified collator. + * + * @param array &$arr Array of string to sort + * @param int $sortFlag Optional sorting type, one of the following: + * Collator::SORT_REGULAR + * Collator::SORT_NUMERIC + * Collator::SORT_STRING + * + * @return bool True on success or false on failure + * + * @see http://www.php.net/manual/en/collator.sort.php + * + * @throws MethodNotImplementedException + */ + public function sort(&$arr, $sortFlag = self::SORT_REGULAR) + { + throw new MethodNotImplementedException(__METHOD__); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Compiler/BundleCompilerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Compiler/BundleCompilerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..8c9d233d92b8aad3fa385675841f3a4b7ce17996 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Compiler/BundleCompilerInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Bundle\Compiler; + +/** + * Compiles a resource bundle. + * + * @author Bernhard Schussek + * + * @internal + */ +interface BundleCompilerInterface +{ + /** + * Compiles a resource bundle at the given source to the given target + * directory. + * + * @param string $sourcePath + * @param string $targetDir + */ + public function compile($sourcePath, $targetDir); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Compiler/GenrbCompiler.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Compiler/GenrbCompiler.php new file mode 100644 index 0000000000000000000000000000000000000000..9a91888cf57cf5aff8820bda0916320242cdceaa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Compiler/GenrbCompiler.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\Intl\Data\Bundle\Compiler; + +use Symfony\Component\Intl\Exception\RuntimeException; + +/** + * Compiles .txt resource bundles to binary .res files. + * + * @author Bernhard Schussek + * + * @internal + */ +class GenrbCompiler implements BundleCompilerInterface +{ + /** + * @var string The path to the "genrb" executable + */ + private $genrb; + + /** + * Creates a new compiler based on the "genrb" executable. + * + * @param string $genrb Optional. The path to the "genrb" executable + * @param string $envVars Optional. Environment variables to be loaded when + * running "genrb". + * + * @throws RuntimeException If the "genrb" cannot be found. + */ + public function __construct($genrb = 'genrb', $envVars = '') + { + exec('which '.$genrb, $output, $status); + + if (0 !== $status) { + throw new RuntimeException(sprintf( + 'The command "%s" is not installed', + $genrb + )); + } + + $this->genrb = ($envVars ? $envVars.' ' : '').$genrb; + } + + /** + * {@inheritdoc} + */ + public function compile($sourcePath, $targetDir) + { + if (is_dir($sourcePath)) { + $sourcePath .= '/*.txt'; + } + + exec($this->genrb.' --quiet -e UTF-8 -d '.$targetDir.' '.$sourcePath, $output, $status); + + if ($status !== 0) { + throw new RuntimeException(sprintf( + 'genrb failed with status %d while compiling %s to %s.', + $status, + $sourcePath, + $targetDir + )); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BufferedBundleReader.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BufferedBundleReader.php new file mode 100644 index 0000000000000000000000000000000000000000..ff04294683e32c369a166cb03d909f8c2222ad24 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BufferedBundleReader.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Bundle\Reader; + +use Symfony\Component\Intl\Data\Util\RingBuffer; + +/** + * @author Bernhard Schussek + * + * @internal + */ +class BufferedBundleReader implements BundleReaderInterface +{ + /** + * @var BundleReaderInterface + */ + private $reader; + + private $buffer; + + /** + * Buffers a given reader. + * + * @param BundleReaderInterface $reader The reader to buffer + * @param int $bufferSize The number of entries to store + * in the buffer. + */ + public function __construct(BundleReaderInterface $reader, $bufferSize) + { + $this->reader = $reader; + $this->buffer = new RingBuffer($bufferSize); + } + + /** + * {@inheritdoc} + */ + public function read($path, $locale) + { + $hash = $path.'//'.$locale; + + if (!isset($this->buffer[$hash])) { + $this->buffer[$hash] = $this->reader->read($path, $locale); + } + + return $this->buffer[$hash]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php new file mode 100644 index 0000000000000000000000000000000000000000..3cf969bab8134034f4a8520e26d6c36925619320 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php @@ -0,0 +1,184 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Bundle\Reader; + +use Symfony\Component\Intl\Exception\MissingResourceException; +use Symfony\Component\Intl\Exception\OutOfBoundsException; +use Symfony\Component\Intl\Exception\ResourceBundleNotFoundException; +use Symfony\Component\Intl\Locale; +use Symfony\Component\Intl\Data\Util\RecursiveArrayAccess; + +/** + * Default implementation of {@link BundleEntryReaderInterface}. + * + * @author Bernhard Schussek + * + * @see BundleEntryReaderInterface + * + * @internal + */ +class BundleEntryReader implements BundleEntryReaderInterface +{ + /** + * @var BundleReaderInterface + */ + private $reader; + + /** + * A mapping of locale aliases to locales. + * + * @var array + */ + private $localeAliases = array(); + + /** + * Creates an entry reader based on the given resource bundle reader. + * + * @param BundleReaderInterface $reader A resource bundle reader to use + */ + public function __construct(BundleReaderInterface $reader) + { + $this->reader = $reader; + } + + /** + * Stores a mapping of locale aliases to locales. + * + * This mapping is used when reading entries and merging them with their + * fallback locales. If an entry is read for a locale alias (e.g. "mo") + * that points to a locale with a fallback locale ("ro_MD"), the reader + * can continue at the correct fallback locale ("ro"). + * + * @param array $localeAliases A mapping of locale aliases to locales + */ + public function setLocaleAliases($localeAliases) + { + $this->localeAliases = $localeAliases; + } + + /** + * {@inheritdoc} + */ + public function read($path, $locale) + { + return $this->reader->read($path, $locale); + } + + /** + * {@inheritdoc} + */ + public function readEntry($path, $locale, array $indices, $fallback = true) + { + $entry = null; + $isMultiValued = false; + $readSucceeded = false; + $exception = null; + $currentLocale = $locale; + $testedLocales = array(); + + while (null !== $currentLocale) { + // Resolve any aliases to their target locales + if (isset($this->localeAliases[$currentLocale])) { + $currentLocale = $this->localeAliases[$currentLocale]; + } + + try { + $data = $this->reader->read($path, $currentLocale); + $currentEntry = RecursiveArrayAccess::get($data, $indices); + $readSucceeded = true; + + $isCurrentTraversable = $currentEntry instanceof \Traversable; + $isCurrentMultiValued = $isCurrentTraversable || is_array($currentEntry); + + // Return immediately if fallback is disabled or we are dealing + // with a scalar non-null entry + if (!$fallback || (!$isCurrentMultiValued && null !== $currentEntry)) { + return $currentEntry; + } + + // ========================================================= + // Fallback is enabled, entry is either multi-valued or NULL + // ========================================================= + + // If entry is multi-valued, convert to array + if ($isCurrentTraversable) { + $currentEntry = iterator_to_array($currentEntry); + } + + // If previously read entry was multi-valued too, merge them + if ($isCurrentMultiValued && $isMultiValued) { + $currentEntry = array_merge($currentEntry, $entry); + } + + // Keep the previous entry if the current entry is NULL + if (null !== $currentEntry) { + $entry = $currentEntry; + } + + // If this or the previous entry was multi-valued, we are dealing + // with a merged, multi-valued entry now + $isMultiValued = $isMultiValued || $isCurrentMultiValued; + } catch (ResourceBundleNotFoundException $e) { + // Continue if there is a fallback locale for the current + // locale + $exception = $e; + } catch (OutOfBoundsException $e) { + // Remember exception and rethrow if we cannot find anything in + // the fallback locales either + $exception = $e; + } + + // Remember which locales we tried + $testedLocales[] = $currentLocale; + + // Check whether fallback is allowed + if (!$fallback) { + break; + } + + // Then determine fallback locale + $currentLocale = Locale::getFallback($currentLocale); + } + + // Multi-valued entry was merged + if ($isMultiValued) { + return $entry; + } + + // Entry is still NULL, but no read error occurred + if ($readSucceeded) { + return $entry; + } + + // Entry is still NULL, read error occurred. Throw an exception + // containing the detailed path and locale + $errorMessage = sprintf( + 'Couldn\'t read the indices [%s] for the locale "%s" in "%s".', + implode('][', $indices), + $locale, + $path + ); + + // Append fallback locales, if any + if (count($testedLocales) > 1) { + // Remove original locale + array_shift($testedLocales); + + $errorMessage .= sprintf( + ' The indices also couldn\'t be found for the fallback locale(s) "%s".', + implode('", "', $testedLocales) + ); + } + + throw new MissingResourceException($errorMessage, 0, $exception); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReaderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e999440190acaa38c52483bcfd392ccb49022c41 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReaderInterface.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Bundle\Reader; + +use Symfony\Component\Intl\Exception\MissingResourceException; + +/** + * Reads individual entries of a resource file. + * + * @author Bernhard Schussek + * + * @internal + */ +interface BundleEntryReaderInterface extends BundleReaderInterface +{ + /** + * Reads an entry from a resource bundle. + * + * An entry can be selected from the resource bundle by passing the path + * to that entry in the bundle. For example, if the bundle is structured + * like this: + * + * TopLevel + * NestedLevel + * Entry: Value + * + * Then the value can be read by calling: + * + * $reader->readEntry('...', 'en', array('TopLevel', 'NestedLevel', 'Entry')); + * + * @param string $path The path to the resource bundle + * @param string $locale The locale to read + * @param string[] $indices The indices to read from the bundle + * @param bool $fallback Whether to merge the value with the value from + * the fallback locale (e.g. "en" for "en_GB"). + * Only applicable if the result is multivalued + * (i.e. array or \ArrayAccess) or cannot be found + * in the requested locale. + * + * @return mixed Returns an array or {@link \ArrayAccess} instance for + * complex data and a scalar value for simple data. + * + * @throws MissingResourceException If the indices cannot be accessed + */ + public function readEntry($path, $locale, array $indices, $fallback = true); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleReaderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleReaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..8d3da825f77eb8b28e9ff137d6135510f19b984c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleReaderInterface.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Bundle\Reader; + +/** + * Reads resource bundle files. + * + * @author Bernhard Schussek + * + * @internal + */ +interface BundleReaderInterface +{ + /** + * Reads a resource bundle. + * + * @param string $path The path to the resource bundle + * @param string $locale The locale to read + * + * @return mixed Returns an array or {@link \ArrayAccess} instance for + * complex data, a scalar value otherwise. + */ + public function read($path, $locale); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php new file mode 100644 index 0000000000000000000000000000000000000000..9f800ccace7ef84d8404f9d07af1453d9ea7eae6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Bundle\Reader; + +use Symfony\Component\Intl\Exception\ResourceBundleNotFoundException; +use Symfony\Component\Intl\Data\Util\ArrayAccessibleResourceBundle; + +/** + * Reads binary .res resource bundles. + * + * @author Bernhard Schussek + * + * @internal + */ +class IntlBundleReader implements BundleReaderInterface +{ + /** + * {@inheritdoc} + */ + public function read($path, $locale) + { + // Point for future extension: Modify this class so that it works also + // if the \ResourceBundle class is not available. + try { + // Never enable fallback. We want to know if a bundle cannot be found + $bundle = new \ResourceBundle($locale, $path, false); + } catch (\Exception $e) { + // HHVM compatibility: constructor throws on invalid resource + $bundle = null; + } + + // The bundle is NULL if the path does not look like a resource bundle + // (i.e. contain a bunch of *.res files) + if (null === $bundle) { + throw new ResourceBundleNotFoundException(sprintf( + 'The resource bundle "%s/%s.res" could not be found.', + $path, + $locale + )); + } + + // Other possible errors are U_USING_FALLBACK_WARNING and U_ZERO_ERROR, + // which are OK for us. + return new ArrayAccessibleResourceBundle($bundle); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php new file mode 100644 index 0000000000000000000000000000000000000000..84b20abf77ee81d204cfc259c7688547754a715e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Bundle\Reader; + +use Symfony\Component\Intl\Exception\ResourceBundleNotFoundException; +use Symfony\Component\Intl\Exception\RuntimeException; + +/** + * Reads .json resource bundles. + * + * @author Bernhard Schussek + * + * @internal + */ +class JsonBundleReader implements BundleReaderInterface +{ + /** + * {@inheritdoc} + */ + public function read($path, $locale) + { + $fileName = $path.'/'.$locale.'.json'; + + if (!file_exists($fileName)) { + throw new ResourceBundleNotFoundException(sprintf( + 'The resource bundle "%s/%s.json" does not exist.', + $path, + $locale + )); + } + + if (!is_file($fileName)) { + throw new RuntimeException(sprintf( + 'The resource bundle "%s/%s.json" is not a file.', + $path, + $locale + )); + } + + $data = json_decode(file_get_contents($fileName), true); + + if (null === $data) { + throw new RuntimeException(sprintf( + 'The resource bundle "%s/%s.json" contains invalid JSON: %s', + $path, + $locale, + json_last_error_msg() + )); + } + + return $data; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php new file mode 100644 index 0000000000000000000000000000000000000000..57391ce010077eecd71187a5fb8208c008b9151a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Bundle\Reader; + +use Symfony\Component\Intl\Exception\ResourceBundleNotFoundException; +use Symfony\Component\Intl\Exception\RuntimeException; + +/** + * Reads .php resource bundles. + * + * @author Bernhard Schussek + * + * @internal + */ +class PhpBundleReader implements BundleReaderInterface +{ + /** + * {@inheritdoc} + */ + public function read($path, $locale) + { + $fileName = $path.'/'.$locale.'.php'; + + if (!file_exists($fileName)) { + throw new ResourceBundleNotFoundException(sprintf( + 'The resource bundle "%s/%s.php" does not exist.', + $path, + $locale + )); + } + + if (!is_file($fileName)) { + throw new RuntimeException(sprintf( + 'The resource bundle "%s/%s.php" is not a file.', + $path, + $locale + )); + } + + return include $fileName; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/BundleWriterInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/BundleWriterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..ea9a66da6973e30697b458885a63c6550f2e0d31 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/BundleWriterInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Bundle\Writer; + +/** + * Writes resource bundle files. + * + * @author Bernhard Schussek + * + * @internal + */ +interface BundleWriterInterface +{ + /** + * Writes data to a resource bundle. + * + * @param string $path The path to the resource bundle + * @param string $locale The locale to (over-)write + * @param mixed $data The data to write + */ + public function write($path, $locale, $data); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/JsonBundleWriter.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/JsonBundleWriter.php new file mode 100644 index 0000000000000000000000000000000000000000..f3df769e13cc6e6ea5300c1250bcfe1096fe81bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/JsonBundleWriter.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Bundle\Writer; + +/** + * Writes .json resource bundles. + * + * @author Bernhard Schussek + * + * @internal + */ +class JsonBundleWriter implements BundleWriterInterface +{ + /** + * {@inheritdoc} + */ + public function write($path, $locale, $data) + { + if ($data instanceof \Traversable) { + $data = iterator_to_array($data); + } + + array_walk_recursive($data, function (&$value) { + if ($value instanceof \Traversable) { + $value = iterator_to_array($value); + } + }); + + $contents = json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)."\n"; + + file_put_contents($path.'/'.$locale.'.json', $contents); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.php new file mode 100644 index 0000000000000000000000000000000000000000..53d943dcfeda9fe2798809655ca225fbc148a953 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.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\Component\Intl\Data\Bundle\Writer; + +/** + * Writes .php resource bundles. + * + * @author Bernhard Schussek + * + * @internal + */ +class PhpBundleWriter implements BundleWriterInterface +{ + /** + * {@inheritdoc} + */ + public function write($path, $locale, $data) + { + $template = <<<'TEMPLATE' + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Bundle\Writer; + +use Symfony\Component\Intl\Exception\UnexpectedTypeException; + +/** + * Writes .txt resource bundles. + * + * The resulting files can be converted to binary .res files using a + * {@link \Symfony\Component\Intl\ResourceBundle\Compiler\BundleCompilerInterface} + * implementation. + * + * @author Bernhard Schussek + * + * @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt + * + * @internal + */ +class TextBundleWriter implements BundleWriterInterface +{ + /** + * {@inheritdoc} + */ + public function write($path, $locale, $data, $fallback = true) + { + $file = fopen($path.'/'.$locale.'.txt', 'w'); + + $this->writeResourceBundle($file, $locale, $data, $fallback); + + fclose($file); + } + + /** + * Writes a "resourceBundle" node. + * + * @param resource $file The file handle to write to + * @param string $bundleName The name of the bundle + * @param mixed $value The value of the node + * @param bool $fallback Whether the resource bundle should be merged + * with the fallback locale. + * + * @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt + */ + private function writeResourceBundle($file, $bundleName, $value, $fallback) + { + fwrite($file, $bundleName); + + $this->writeTable($file, $value, 0, $fallback); + + fwrite($file, "\n"); + } + + /** + * Writes a "resource" node. + * + * @param resource $file The file handle to write to + * @param mixed $value The value of the node + * @param int $indentation The number of levels to indent + * @param bool $requireBraces Whether to require braces to be printed + * around the value. + * + * @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt + */ + private function writeResource($file, $value, $indentation, $requireBraces = true) + { + if (is_int($value)) { + $this->writeInteger($file, $value); + + return; + } + + if ($value instanceof \Traversable) { + $value = iterator_to_array($value); + } + + if (is_array($value)) { + $intValues = count($value) === count(array_filter($value, 'is_int')); + + $keys = array_keys($value); + + // check that the keys are 0-indexed and ascending + $intKeys = $keys === range(0, count($keys) - 1); + + if ($intValues && $intKeys) { + $this->writeIntVector($file, $value, $indentation); + + return; + } + + if ($intKeys) { + $this->writeArray($file, $value, $indentation); + + return; + } + + $this->writeTable($file, $value, $indentation); + + return; + } + + if (is_bool($value)) { + $value = $value ? 'true' : 'false'; + } + + $this->writeString($file, (string) $value, $requireBraces); + } + + /** + * Writes an "integer" node. + * + * @param resource $file The file handle to write to + * @param int $value The value of the node + * + * @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt + */ + private function writeInteger($file, $value) + { + fprintf($file, ':int{%d}', $value); + } + + /** + * Writes an "intvector" node. + * + * @param resource $file The file handle to write to + * @param array $value The value of the node + * @param int $indentation The number of levels to indent + * + * @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt + */ + private function writeIntVector($file, array $value, $indentation) + { + fwrite($file, ":intvector{\n"); + + foreach ($value as $int) { + fprintf($file, "%s%d,\n", str_repeat(' ', $indentation + 1), $int); + } + + fprintf($file, '%s}', str_repeat(' ', $indentation)); + } + + /** + * Writes a "string" node. + * + * @param resource $file The file handle to write to + * @param string $value The value of the node + * @param bool $requireBraces Whether to require braces to be printed + * around the value. + * + * @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt + */ + private function writeString($file, $value, $requireBraces = true) + { + if ($requireBraces) { + fprintf($file, '{"%s"}', $value); + + return; + } + + fprintf($file, '"%s"', $value); + } + + /** + * Writes an "array" node. + * + * @param resource $file The file handle to write to + * @param array $value The value of the node + * @param int $indentation The number of levels to indent + * + * @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt + */ + private function writeArray($file, array $value, $indentation) + { + fwrite($file, "{\n"); + + foreach ($value as $entry) { + fwrite($file, str_repeat(' ', $indentation + 1)); + + $this->writeResource($file, $entry, $indentation + 1, false); + + fwrite($file, ",\n"); + } + + fprintf($file, '%s}', str_repeat(' ', $indentation)); + } + + /** + * Writes a "table" node. + * + * @param resource $file The file handle to write to + * @param array|\Traversable $value The value of the node + * @param int $indentation The number of levels to indent + * @param bool $fallback Whether the table should be merged + * with the fallback locale. + * + * @throws UnexpectedTypeException When $value is not an array and not a + * \Traversable instance. + */ + private function writeTable($file, $value, $indentation, $fallback = true) + { + if (!is_array($value) && !$value instanceof \Traversable) { + throw new UnexpectedTypeException($value, 'array or \Traversable'); + } + + if (!$fallback) { + fwrite($file, ':table(nofallback)'); + } + + fwrite($file, "{\n"); + + foreach ($value as $key => $entry) { + fwrite($file, str_repeat(' ', $indentation + 1)); + + // escape colons, otherwise they are interpreted as resource types + if (false !== strpos($key, ':') || false !== strpos($key, ' ')) { + $key = '"'.$key.'"'; + } + + fwrite($file, $key); + + $this->writeResource($file, $entry, $indentation + 1); + + fwrite($file, "\n"); + } + + fprintf($file, '%s}', str_repeat(' ', $indentation)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/AbstractDataGenerator.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/AbstractDataGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..6b7cf5a0caf1d029382332d7f4dce1be41c704de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/AbstractDataGenerator.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Generator; + +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Intl\Data\Bundle\Reader\BundleReaderInterface; +use Symfony\Component\Intl\Data\Util\LocaleScanner; +use Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler; +use Symfony\Component\Intl\Data\Bundle\Reader\IntlBundleReader; + +/** + * The rule for compiling the currency bundle. + * + * @author Bernhard Schussek + * + * @internal + */ +abstract class AbstractDataGenerator +{ + /** + * @var GenrbCompiler + */ + private $compiler; + + /** + * @var string + */ + private $dirName; + + public function __construct(GenrbCompiler $compiler, $dirName) + { + $this->compiler = $compiler; + $this->dirName = $dirName; + } + + public function generateData(GeneratorConfig $config) + { + $filesystem = new Filesystem(); + $localeScanner = new LocaleScanner(); + $reader = new IntlBundleReader(); + + $writers = $config->getBundleWriters(); + $tempDir = sys_get_temp_dir().'/icu-data-'.$this->dirName; + + // Prepare filesystem directories + foreach ($writers as $targetDir => $writer) { + $filesystem->remove($targetDir.'/'.$this->dirName); + $filesystem->mkdir($targetDir.'/'.$this->dirName); + } + + $filesystem->remove($tempDir); + $filesystem->mkdir($tempDir); + + $locales = $this->scanLocales($localeScanner, $config->getSourceDir()); + + $this->compileTemporaryBundles($this->compiler, $config->getSourceDir(), $tempDir); + + $this->preGenerate(); + + foreach ($locales as $locale) { + $localeData = $this->generateDataForLocale($reader, $tempDir, $locale); + + if (null !== $localeData) { + foreach ($writers as $targetDir => $writer) { + $writer->write($targetDir.'/'.$this->dirName, $locale, $localeData); + } + } + } + + $rootData = $this->generateDataForRoot($reader, $tempDir); + + if (null !== $rootData) { + foreach ($writers as $targetDir => $writer) { + $writer->write($targetDir.'/'.$this->dirName, 'root', $rootData); + } + } + + $metaData = $this->generateDataForMeta($reader, $tempDir); + + if (null !== $metaData) { + foreach ($writers as $targetDir => $writer) { + $writer->write($targetDir.'/'.$this->dirName, 'meta', $metaData); + } + } + + // Clean up + $filesystem->remove($tempDir); + } + + /** + * @param LocaleScanner $scanner + * @param string $sourceDir + * + * @return string[] + */ + abstract protected function scanLocales(LocaleScanner $scanner, $sourceDir); + + /** + * @param GenrbCompiler $compiler + * @param string $sourceDir + * @param string $tempDir + */ + abstract protected function compileTemporaryBundles(GenrbCompiler $compiler, $sourceDir, $tempDir); + + abstract protected function preGenerate(); + + /** + * @param BundleReaderInterface $reader + * @param string $tempDir + * @param string $displayLocale + * + * @return array|null + */ + abstract protected function generateDataForLocale(BundleReaderInterface $reader, $tempDir, $displayLocale); + + /** + * @param BundleReaderInterface $reader + * @param string $tempDir + * + * @return array|null + */ + abstract protected function generateDataForRoot(BundleReaderInterface $reader, $tempDir); + + /** + * @param BundleReaderInterface $reader + * @param string $tempDir + * + * @return array|null + */ + abstract protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..19cf6eab00a70558c4d42c59d025a4b2adbbe936 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php @@ -0,0 +1,215 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Generator; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleReaderInterface; +use Symfony\Component\Intl\Data\Util\ArrayAccessibleResourceBundle; +use Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler; +use Symfony\Component\Intl\Data\Util\LocaleScanner; + +/** + * The rule for compiling the currency bundle. + * + * @author Bernhard Schussek + * + * @internal + */ +class CurrencyDataGenerator extends AbstractDataGenerator +{ + const UNKNOWN_CURRENCY_ID = 'XXX'; + + const EUROPEAN_COMPOSITE_UNIT_ID = 'XBA'; + + const EUROPEAN_MONETARY_UNIT_ID = 'XBB'; + + const EUROPEAN_UNIT_OF_ACCOUNT_XBC_ID = 'XBC'; + + const EUROPEAN_UNIT_OF_ACCOUNT_XBD_ID = 'XBD'; + + const TESTING_CURRENCY_CODE_ID = 'XTS'; + + const ADB_UNIT_OF_ACCOUNT_ID = 'XUA'; + + const GOLD_ID = 'XAU'; + + const SILVER_ID = 'XAG'; + + const PLATINUM_ID = 'XPT'; + + const PALLADIUM_ID = 'XPD'; + + const SUCRE_ID = 'XSU'; + + const SPECIAL_DRAWING_RIGHTS_ID = 'XDR'; + + /** + * Monetary units excluded from generation. + * + * @var array + */ + private static $blacklist = array( + self::UNKNOWN_CURRENCY_ID => true, + self::EUROPEAN_COMPOSITE_UNIT_ID => true, + self::EUROPEAN_MONETARY_UNIT_ID => true, + self::EUROPEAN_UNIT_OF_ACCOUNT_XBC_ID => true, + self::EUROPEAN_UNIT_OF_ACCOUNT_XBD_ID => true, + self::TESTING_CURRENCY_CODE_ID => true, + self::ADB_UNIT_OF_ACCOUNT_ID => true, + self::GOLD_ID => true, + self::SILVER_ID => true, + self::PLATINUM_ID => true, + self::PALLADIUM_ID => true, + self::SUCRE_ID => true, + self::SPECIAL_DRAWING_RIGHTS_ID => true, + ); + + /** + * Collects all available currency codes. + * + * @var string[] + */ + private $currencyCodes = array(); + + /** + * {@inheritdoc} + */ + protected function scanLocales(LocaleScanner $scanner, $sourceDir) + { + return $scanner->scanLocales($sourceDir.'/curr'); + } + + /** + * {@inheritdoc} + */ + protected function compileTemporaryBundles(GenrbCompiler $compiler, $sourceDir, $tempDir) + { + $compiler->compile($sourceDir.'/curr', $tempDir); + $compiler->compile($sourceDir.'/misc/currencyNumericCodes.txt', $tempDir); + } + + /** + * {@inheritdoc} + */ + protected function preGenerate() + { + $this->currencyCodes = array(); + } + + /** + * {@inheritdoc} + */ + protected function generateDataForLocale(BundleReaderInterface $reader, $tempDir, $displayLocale) + { + $localeBundle = $reader->read($tempDir, $displayLocale); + + if (isset($localeBundle['Currencies']) && null !== $localeBundle['Currencies']) { + $data = array( + 'Version' => $localeBundle['Version'], + 'Names' => $this->generateSymbolNamePairs($localeBundle), + ); + + $this->currencyCodes = array_merge($this->currencyCodes, array_keys($data['Names'])); + + return $data; + } + } + + /** + * {@inheritdoc} + */ + protected function generateDataForRoot(BundleReaderInterface $reader, $tempDir) + { + $rootBundle = $reader->read($tempDir, 'root'); + + return array( + 'Version' => $rootBundle['Version'], + 'Names' => $this->generateSymbolNamePairs($rootBundle), + ); + } + + /** + * {@inheritdoc} + */ + protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir) + { + $rootBundle = $reader->read($tempDir, 'root'); + $supplementalDataBundle = $reader->read($tempDir, 'supplementalData'); + $numericCodesBundle = $reader->read($tempDir, 'currencyNumericCodes'); + + $this->currencyCodes = array_unique($this->currencyCodes); + + sort($this->currencyCodes); + + $data = array( + 'Version' => $rootBundle['Version'], + 'Currencies' => $this->currencyCodes, + 'Meta' => $this->generateCurrencyMeta($supplementalDataBundle), + 'Alpha3ToNumeric' => $this->generateAlpha3ToNumericMapping($numericCodesBundle, $this->currencyCodes), + ); + + $data['NumericToAlpha3'] = $this->generateNumericToAlpha3Mapping($data['Alpha3ToNumeric']); + + return $data; + } + + /** + * @param ArrayAccessibleResourceBundle $rootBundle + * + * @return array + */ + private function generateSymbolNamePairs(ArrayAccessibleResourceBundle $rootBundle) + { + $symbolNamePairs = iterator_to_array($rootBundle['Currencies']); + + // Remove unwanted currencies + $symbolNamePairs = array_diff_key($symbolNamePairs, self::$blacklist); + + return $symbolNamePairs; + } + + private function generateCurrencyMeta(ArrayAccessibleResourceBundle $supplementalDataBundle) + { + // The metadata is already de-duplicated. It contains one key "DEFAULT" + // which is used for currencies that don't have dedicated entries. + return iterator_to_array($supplementalDataBundle['CurrencyMeta']); + } + + private function generateAlpha3ToNumericMapping(ArrayAccessibleResourceBundle $numericCodesBundle, array $currencyCodes) + { + $alpha3ToNumericMapping = iterator_to_array($numericCodesBundle['codeMap']); + + asort($alpha3ToNumericMapping); + + // Filter unknown currencies (e.g. "AYM") + $alpha3ToNumericMapping = array_intersect_key($alpha3ToNumericMapping, array_flip($currencyCodes)); + + return $alpha3ToNumericMapping; + } + + private function generateNumericToAlpha3Mapping(array $alpha3ToNumericMapping) + { + $numericToAlpha3Mapping = array(); + + foreach ($alpha3ToNumericMapping as $alpha3 => $numeric) { + // Make sure that the mapping is stored as table and not as array + $numeric = (string) $numeric; + + if (!isset($numericToAlpha3Mapping[$numeric])) { + $numericToAlpha3Mapping[$numeric] = array(); + } + + $numericToAlpha3Mapping[$numeric][] = $alpha3; + } + + return $numericToAlpha3Mapping; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/GeneratorConfig.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/GeneratorConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..78e16ef4d8dbc8017ee422c2746a982a5472051f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/GeneratorConfig.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Generator; + +use Symfony\Component\Intl\Data\Bundle\Writer\BundleWriterInterface; + +/** + * Stores contextual information for resource bundle generation. + * + * @author Bernhard Schussek + * + * @internal + */ +class GeneratorConfig +{ + /** + * @var string + */ + private $sourceDir; + + /** + * @var string + */ + private $icuVersion; + + /** + * @var BundleWriterInterface[] + */ + private $bundleWriters = array(); + + public function __construct($sourceDir, $icuVersion) + { + $this->sourceDir = $sourceDir; + $this->icuVersion = $icuVersion; + } + + /** + * Adds a writer to be used during the data conversion. + * + * @param string $targetDir The output directory + * @param BundleWriterInterface $writer The writer instance + */ + public function addBundleWriter($targetDir, BundleWriterInterface $writer) + { + $this->bundleWriters[$targetDir] = $writer; + } + + /** + * Returns the writers indexed by their output directories. + * + * @return BundleWriterInterface[] + */ + public function getBundleWriters() + { + return $this->bundleWriters; + } + + /** + * Returns the directory where the source versions of the resource bundles + * are stored. + * + * @return string An absolute path to a directory + */ + public function getSourceDir() + { + return $this->sourceDir; + } + + /** + * Returns the ICU version of the bundles being converted. + * + * @return string The ICU version string + */ + public function getIcuVersion() + { + return $this->icuVersion; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..59987594235f08d05e0ff4dbcabda185f3ab978c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php @@ -0,0 +1,214 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Generator; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleReaderInterface; +use Symfony\Component\Intl\Data\Util\ArrayAccessibleResourceBundle; +use Symfony\Component\Intl\Data\Util\LocaleScanner; +use Symfony\Component\Intl\Exception\RuntimeException; +use Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler; + +/** + * The rule for compiling the language bundle. + * + * @author Bernhard Schussek + * + * @internal + */ +class LanguageDataGenerator extends AbstractDataGenerator +{ + /** + * Source: http://www-01.sil.org/iso639-3/codes.asp. + * + * @var array + */ + private static $preferredAlpha2ToAlpha3Mapping = array( + 'ak' => 'aka', + 'ar' => 'ara', + 'ay' => 'aym', + 'az' => 'aze', + 'bo' => 'bod', + 'cr' => 'cre', + 'cs' => 'ces', + 'cy' => 'cym', + 'de' => 'deu', + 'el' => 'ell', + 'et' => 'est', + 'eu' => 'eus', + 'fa' => 'fas', + 'ff' => 'ful', + 'fr' => 'fra', + 'gn' => 'grn', + 'hy' => 'hye', + 'hr' => 'hrv', + 'ik' => 'ipk', + 'is' => 'isl', + 'iu' => 'iku', + 'ka' => 'kat', + 'kr' => 'kau', + 'kg' => 'kon', + 'kv' => 'kom', + 'ku' => 'kur', + 'lv' => 'lav', + 'mg' => 'mlg', + 'mi' => 'mri', + 'mk' => 'mkd', + 'mn' => 'mon', + 'ms' => 'msa', + 'my' => 'mya', + 'nb' => 'nob', + 'ne' => 'nep', + 'nl' => 'nld', + 'oj' => 'oji', + 'om' => 'orm', + 'or' => 'ori', + 'ps' => 'pus', + 'qu' => 'que', + 'ro' => 'ron', + 'sc' => 'srd', + 'sk' => 'slk', + 'sq' => 'sqi', + 'sr' => 'srp', + 'sw' => 'swa', + 'uz' => 'uzb', + 'yi' => 'yid', + 'za' => 'zha', + 'zh' => 'zho', + ); + + /** + * Collects all available language codes. + * + * @var string[] + */ + private $languageCodes = array(); + + /** + * {@inheritdoc} + */ + protected function scanLocales(LocaleScanner $scanner, $sourceDir) + { + return $scanner->scanLocales($sourceDir.'/lang'); + } + + /** + * {@inheritdoc} + */ + protected function compileTemporaryBundles(GenrbCompiler $compiler, $sourceDir, $tempDir) + { + $compiler->compile($sourceDir.'/lang', $tempDir); + $compiler->compile($sourceDir.'/misc/metadata.txt', $tempDir); + } + + /** + * {@inheritdoc} + */ + protected function preGenerate() + { + $this->languageCodes = array(); + } + + /** + * {@inheritdoc} + */ + protected function generateDataForLocale(BundleReaderInterface $reader, $tempDir, $displayLocale) + { + $localeBundle = $reader->read($tempDir, $displayLocale); + + // isset() on \ResourceBundle returns true even if the value is null + if (isset($localeBundle['Languages']) && null !== $localeBundle['Languages']) { + $data = array( + 'Version' => $localeBundle['Version'], + 'Names' => iterator_to_array($localeBundle['Languages']), + ); + + $this->languageCodes = array_merge($this->languageCodes, array_keys($data['Names'])); + + return $data; + } + } + + /** + * {@inheritdoc} + */ + protected function generateDataForRoot(BundleReaderInterface $reader, $tempDir) + { + } + + /** + * {@inheritdoc} + */ + protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir) + { + $rootBundle = $reader->read($tempDir, 'root'); + $metadataBundle = $reader->read($tempDir, 'metadata'); + + $this->languageCodes = array_unique($this->languageCodes); + + sort($this->languageCodes); + + return array( + 'Version' => $rootBundle['Version'], + 'Languages' => $this->languageCodes, + 'Aliases' => $metadataBundle['languageAlias'], + 'Alpha2ToAlpha3' => $this->generateAlpha2ToAlpha3Mapping($metadataBundle), + ); + } + + private function generateAlpha2ToAlpha3Mapping(ArrayAccessibleResourceBundle $metadataBundle) + { + // Data structure has changed in ICU 5.5 from "languageAlias" to "alias->language" + $aliases = $metadataBundle['languageAlias'] ?: $metadataBundle['alias']['language']; + $alpha2ToAlpha3 = array(); + + foreach ($aliases as $alias => $language) { + // $language is a string before ICU 5.5 + $language = is_string($language) ? $language : $language['replacement']; + if (2 === strlen($language) && 3 === strlen($alias)) { + if (isset(self::$preferredAlpha2ToAlpha3Mapping[$language])) { + // Validate to prevent typos + if (!isset($aliases[self::$preferredAlpha2ToAlpha3Mapping[$language]])) { + throw new RuntimeException( + 'The statically set three-letter mapping '. + self::$preferredAlpha2ToAlpha3Mapping[$language].' '. + 'for the language code '.$language.' seems to be '. + 'invalid. Typo?' + ); + } + + $alpha3 = self::$preferredAlpha2ToAlpha3Mapping[$language]; + $alpha2 = is_string($aliases[$alpha3]) ? $aliases[$alpha3] : $aliases[$alpha3]['replacement']; + + if ($language !== $alpha2) { + throw new RuntimeException( + 'The statically set three-letter mapping '.$alpha3.' '. + 'for the language code '.$language.' seems to be '. + 'an alias for '.$alpha2.'. Wrong mapping?' + ); + } + + $alpha2ToAlpha3[$language] = $alpha3; + } elseif (isset($alpha2ToAlpha3[$language])) { + throw new RuntimeException( + 'Multiple three-letter mappings exist for the language '. + 'code '.$language.'. Please add one of them to the '. + 'property $preferredAlpha2ToAlpha3Mapping.' + ); + } else { + $alpha2ToAlpha3[$language] = $alias; + } + } + } + + return $alpha2ToAlpha3; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..e89e5e8757b67b02885c6701656a9bfb73467e61 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php @@ -0,0 +1,249 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Generator; + +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Intl\Data\Provider\LanguageDataProvider; +use Symfony\Component\Intl\Data\Provider\RegionDataProvider; +use Symfony\Component\Intl\Data\Provider\ScriptDataProvider; +use Symfony\Component\Intl\Data\Util\LocaleScanner; +use Symfony\Component\Intl\Exception\MissingResourceException; +use Symfony\Component\Intl\Exception\ResourceBundleNotFoundException; +use Symfony\Component\Intl\Locale; + +/** + * The rule for compiling the locale bundle. + * + * @author Bernhard Schussek + * + * @internal + */ +class LocaleDataGenerator +{ + /** + * @var string + */ + private $dirName; + + /** + * @var LanguageDataProvider + */ + private $languageDataProvider; + + /** + * @var ScriptDataProvider + */ + private $scriptDataProvider; + + /** + * @var RegionDataProvider + */ + private $regionDataProvider; + + public function __construct($dirName, LanguageDataProvider $languageDataProvider, ScriptDataProvider $scriptDataProvider, RegionDataProvider $regionDataProvider) + { + $this->dirName = $dirName; + $this->languageDataProvider = $languageDataProvider; + $this->scriptDataProvider = $scriptDataProvider; + $this->regionDataProvider = $regionDataProvider; + } + + public function generateData(GeneratorConfig $config) + { + $filesystem = new Filesystem(); + $localeScanner = new LocaleScanner(); + + $writers = $config->getBundleWriters(); + + // Prepare filesystem directories + foreach ($writers as $targetDir => $writer) { + $filesystem->remove($targetDir.'/'.$this->dirName); + $filesystem->mkdir($targetDir.'/'.$this->dirName); + } + + $locales = $localeScanner->scanLocales($config->getSourceDir().'/locales'); + $aliases = $localeScanner->scanAliases($config->getSourceDir().'/locales'); + + // Flip to facilitate lookup + $flippedLocales = array_flip($locales); + + // Don't generate names for aliases (names will be generated for the + // locale they are duplicating) + $displayLocales = array_diff_key($flippedLocales, $aliases); + + ksort($displayLocales); + + // Generate a list of (existing) locale fallbacks + $fallbackMapping = $this->generateFallbackMapping($displayLocales, $aliases); + + $localeNames = array(); + + // Generate locale names for all locales that have translations in + // at least the language or the region bundle + foreach ($displayLocales as $displayLocale => $_) { + $localeNames[$displayLocale] = array(); + + foreach ($locales as $locale) { + try { + // Generate a locale name in the language of each display locale + // Each locale name has the form: "Language (Script, Region, Variant1, ...) + // Script, Region and Variants are optional. If none of them is + // available, the braces are not printed. + if (null !== ($name = $this->generateLocaleName($locale, $displayLocale))) { + $localeNames[$displayLocale][$locale] = $name; + } + } catch (MissingResourceException $e) { + } catch (ResourceBundleNotFoundException $e) { + } + } + } + + // Process again to de-duplicate locales and their fallback locales + // Only keep the differences + foreach ($displayLocales as $displayLocale => $_) { + $fallback = $displayLocale; + + while (isset($fallbackMapping[$fallback])) { + $fallback = $fallbackMapping[$fallback]; + $localeNames[$displayLocale] = array_diff( + $localeNames[$displayLocale], + $localeNames[$fallback] + ); + } + + // If no names remain to be saved for the current locale, skip it + if (0 === count($localeNames[$displayLocale])) { + continue; + } + + foreach ($writers as $targetDir => $writer) { + $writer->write($targetDir.'/'.$this->dirName, $displayLocale, array( + 'Names' => $localeNames[$displayLocale], + )); + } + } + + // Generate aliases, needed to enable proper fallback from alias to its + // target + foreach ($aliases as $alias => $aliasOf) { + foreach ($writers as $targetDir => $writer) { + $writer->write($targetDir.'/'.$this->dirName, $alias, array( + '%%ALIAS' => $aliasOf, + )); + } + } + + // Create root file which maps locale codes to locale codes, for fallback + foreach ($writers as $targetDir => $writer) { + $writer->write($targetDir.'/'.$this->dirName, 'meta', array( + 'Locales' => $locales, + 'Aliases' => $aliases, + )); + } + } + + private function generateLocaleName($locale, $displayLocale) + { + $name = null; + + $lang = \Locale::getPrimaryLanguage($locale); + $script = \Locale::getScript($locale); + $region = \Locale::getRegion($locale); + $variants = \Locale::getAllVariants($locale); + + // Currently the only available variant is POSIX, which we don't want + // to include in the list + if (count($variants) > 0) { + return; + } + + // Some languages are translated together with their region, + // i.e. "en_GB" is translated as "British English" + // we don't include these languages though because they mess up + // the name sorting + // $name = $this->langBundle->getLanguageName($displayLocale, $lang, $region); + + // Some languages are simply not translated + // Example: "az" (Azerbaijani) has no translation in "af" (Afrikaans) + if (null === ($name = $this->languageDataProvider->getName($lang, $displayLocale))) { + return; + } + + // "as" (Assamese) has no "Variants" block + //if (!$langBundle->get('Variants')) { + // continue; + //} + + $extras = array(); + + // Discover the name of the script part of the locale + // i.e. in zh_Hans_MO, "Hans" is the script + if ($script) { + // Some scripts are not translated into every language + if (null === ($scriptName = $this->scriptDataProvider->getName($script, $displayLocale))) { + return; + } + + $extras[] = $scriptName; + } + + // Discover the name of the region part of the locale + // i.e. in de_AT, "AT" is the region + if ($region) { + // Some regions are not translated into every language + if (null === ($regionName = $this->regionDataProvider->getName($region, $displayLocale))) { + return; + } + + $extras[] = $regionName; + } + + if (count($extras) > 0) { + // Remove any existing extras + // For example, in German, zh_Hans is "Chinesisch (vereinfacht)". + // The latter is the script part which is already included in the + // extras and will be appended again with the other extras. + if (preg_match('/^(.+)\s+\([^\)]+\)$/', $name, $matches)) { + $name = $matches[1]; + } + + $name .= ' ('.implode(', ', $extras).')'; + } + + return $name; + } + + private function generateFallbackMapping(array $displayLocales, array $aliases) + { + $mapping = array(); + + foreach ($displayLocales as $displayLocale => $_) { + $mapping[$displayLocale] = null; + $fallback = $displayLocale; + + // Recursively search for a fallback locale until one is found + while (null !== ($fallback = Locale::getFallback($fallback))) { + // Currently, no locale has an alias as fallback locale. + // If this starts to be the case, we need to add code here. + assert(!isset($aliases[$fallback])); + + // Check whether the fallback exists + if (isset($displayLocales[$fallback])) { + $mapping[$displayLocale] = $fallback; + break; + } + } + } + + return $mapping; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..28c90a5ed98b871029819f0c7ce372fa8a1b2f32 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php @@ -0,0 +1,162 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Generator; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleReaderInterface; +use Symfony\Component\Intl\Data\Util\ArrayAccessibleResourceBundle; +use Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler; +use Symfony\Component\Intl\Data\Util\LocaleScanner; + +/** + * The rule for compiling the region bundle. + * + * @author Bernhard Schussek + * + * @see http://source.icu-project.org/repos/icu/icu4j/trunk/main/classes/core/src/com/ibm/icu/util/Region.java + * + * @internal + */ +class RegionDataGenerator extends AbstractDataGenerator +{ + const UNKNOWN_REGION_ID = 'ZZ'; + + const OUTLYING_OCEANIA_REGION_ID = 'QO'; + + const EUROPEAN_UNION_ID = 'EU'; + + const NETHERLANDS_ANTILLES_ID = 'AN'; + + const BOUVET_ISLAND_ID = 'BV'; + + const HEARD_MCDONALD_ISLANDS_ID = 'HM'; + + const CLIPPERTON_ISLAND_ID = 'CP'; + + /** + * Regions excluded from generation. + * + * @var array + */ + private static $blacklist = array( + self::UNKNOWN_REGION_ID => true, + // Look like countries, but are sub-continents + self::OUTLYING_OCEANIA_REGION_ID => true, + self::EUROPEAN_UNION_ID => true, + // No longer exists + self::NETHERLANDS_ANTILLES_ID => true, + // Uninhabited islands + self::BOUVET_ISLAND_ID => true, + self::HEARD_MCDONALD_ISLANDS_ID => true, + self::CLIPPERTON_ISLAND_ID => true, + ); + + /** + * Collects all available language codes. + * + * @var string[] + */ + private $regionCodes = array(); + + /** + * {@inheritdoc} + */ + protected function scanLocales(LocaleScanner $scanner, $sourceDir) + { + return $scanner->scanLocales($sourceDir.'/region'); + } + + /** + * {@inheritdoc} + */ + protected function compileTemporaryBundles(GenrbCompiler $compiler, $sourceDir, $tempDir) + { + $compiler->compile($sourceDir.'/region', $tempDir); + } + + /** + * {@inheritdoc} + */ + protected function preGenerate() + { + $this->regionCodes = array(); + } + + /** + * {@inheritdoc} + */ + protected function generateDataForLocale(BundleReaderInterface $reader, $tempDir, $displayLocale) + { + $localeBundle = $reader->read($tempDir, $displayLocale); + + // isset() on \ResourceBundle returns true even if the value is null + if (isset($localeBundle['Countries']) && null !== $localeBundle['Countries']) { + $data = array( + 'Version' => $localeBundle['Version'], + 'Names' => $this->generateRegionNames($localeBundle), + ); + + $this->regionCodes = array_merge($this->regionCodes, array_keys($data['Names'])); + + return $data; + } + } + + /** + * {@inheritdoc} + */ + protected function generateDataForRoot(BundleReaderInterface $reader, $tempDir) + { + } + + /** + * {@inheritdoc} + */ + protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir) + { + $rootBundle = $reader->read($tempDir, 'root'); + + $this->regionCodes = array_unique($this->regionCodes); + + sort($this->regionCodes); + + return array( + 'Version' => $rootBundle['Version'], + 'Regions' => $this->regionCodes, + ); + } + + /** + * @param ArrayAccessibleResourceBundle $localeBundle + * + * @return array + */ + protected function generateRegionNames(ArrayAccessibleResourceBundle $localeBundle) + { + $unfilteredRegionNames = iterator_to_array($localeBundle['Countries']); + $regionNames = array(); + + foreach ($unfilteredRegionNames as $region => $regionName) { + if (isset(self::$blacklist[$region])) { + continue; + } + + // WORLD/CONTINENT/SUBCONTINENT/GROUPING + if (ctype_digit($region) || is_int($region)) { + continue; + } + + $regionNames[$region] = $regionName; + } + + return $regionNames; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..81390a7621e97baccbd9b68566dac4f098ad2717 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Generator; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleReaderInterface; +use Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler; +use Symfony\Component\Intl\Data\Util\LocaleScanner; + +/** + * The rule for compiling the script bundle. + * + * @author Bernhard Schussek + * + * @internal + */ +class ScriptDataGenerator extends AbstractDataGenerator +{ + /** + * Collects all available language codes. + * + * @var string[] + */ + private $scriptCodes = array(); + + /** + * {@inheritdoc} + */ + protected function scanLocales(LocaleScanner $scanner, $sourceDir) + { + return $scanner->scanLocales($sourceDir.'/lang'); + } + + /** + * {@inheritdoc} + */ + protected function compileTemporaryBundles(GenrbCompiler $compiler, $sourceDir, $tempDir) + { + $compiler->compile($sourceDir.'/lang', $tempDir); + } + + /** + * {@inheritdoc} + */ + protected function preGenerate() + { + $this->scriptCodes = array(); + } + + /** + * {@inheritdoc} + */ + protected function generateDataForLocale(BundleReaderInterface $reader, $tempDir, $displayLocale) + { + $localeBundle = $reader->read($tempDir, $displayLocale); + + // isset() on \ResourceBundle returns true even if the value is null + if (isset($localeBundle['Scripts']) && null !== $localeBundle['Scripts']) { + $data = array( + 'Version' => $localeBundle['Version'], + 'Names' => iterator_to_array($localeBundle['Scripts']), + ); + + $this->scriptCodes = array_merge($this->scriptCodes, array_keys($data['Names'])); + + return $data; + } + } + + /** + * {@inheritdoc} + */ + protected function generateDataForRoot(BundleReaderInterface $reader, $tempDir) + { + } + + /** + * {@inheritdoc} + */ + protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir) + { + $rootBundle = $reader->read($tempDir, 'root'); + + $this->scriptCodes = array_unique($this->scriptCodes); + + sort($this->scriptCodes); + + return array( + 'Version' => $rootBundle['Version'], + 'Scripts' => $this->scriptCodes, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..c2747f08062dae108c405c63c3e6766fca23080e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php @@ -0,0 +1,152 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Provider; + +use Symfony\Component\Intl\Exception\MissingResourceException; +use Symfony\Component\Intl\Locale; +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; + +/** + * Data provider for currency-related data. + * + * @author Bernhard Schussek + * + * @internal + */ +class CurrencyDataProvider +{ + const INDEX_SYMBOL = 0; + + const INDEX_NAME = 1; + + const INDEX_FRACTION_DIGITS = 0; + + const INDEX_ROUNDING_INCREMENT = 1; + + /** + * @var string + */ + private $path; + + /** + * @var BundleEntryReaderInterface + */ + private $reader; + + /** + * Creates a data provider that reads currency-related data from a + * resource bundle. + * + * @param string $path The path to the resource bundle + * @param BundleEntryReaderInterface $reader The reader for reading the resource bundle + */ + public function __construct($path, BundleEntryReaderInterface $reader) + { + $this->path = $path; + $this->reader = $reader; + } + + public function getCurrencies() + { + return $this->reader->readEntry($this->path, 'meta', array('Currencies')); + } + + public function getSymbol($currency, $displayLocale = null) + { + if (null === $displayLocale) { + $displayLocale = Locale::getDefault(); + } + + return $this->reader->readEntry($this->path, $displayLocale, array('Names', $currency, static::INDEX_SYMBOL)); + } + + public function getName($currency, $displayLocale = null) + { + if (null === $displayLocale) { + $displayLocale = Locale::getDefault(); + } + + return $this->reader->readEntry($this->path, $displayLocale, array('Names', $currency, static::INDEX_NAME)); + } + + public function getNames($displayLocale = null) + { + if (null === $displayLocale) { + $displayLocale = Locale::getDefault(); + } + + // ==================================================================== + // For reference: It is NOT possible to return names indexed by + // numeric code here, because some numeric codes map to multiple + // 3-letter codes (e.g. 32 => "ARA", "ARP", "ARS") + // ==================================================================== + + $names = $this->reader->readEntry($this->path, $displayLocale, array('Names')); + + if ($names instanceof \Traversable) { + $names = iterator_to_array($names); + } + + $index = static::INDEX_NAME; + + array_walk($names, function (&$value) use ($index) { + $value = $value[$index]; + }); + + // Sorting by value cannot be done during bundle generation, because + // binary bundles are always sorted by keys + $collator = new \Collator($displayLocale); + $collator->asort($names); + + return $names; + } + + /** + * Data provider for {@link \Symfony\Component\Intl\Currency::getFractionDigits()}. + */ + public function getFractionDigits($currency) + { + try { + return $this->reader->readEntry($this->path, 'meta', array('Meta', $currency, static::INDEX_FRACTION_DIGITS)); + } catch (MissingResourceException $e) { + return $this->reader->readEntry($this->path, 'meta', array('Meta', 'DEFAULT', static::INDEX_FRACTION_DIGITS)); + } + } + + /** + * Data provider for {@link \Symfony\Component\Intl\Currency::getRoundingIncrement()}. + */ + public function getRoundingIncrement($currency) + { + try { + return $this->reader->readEntry($this->path, 'meta', array('Meta', $currency, static::INDEX_ROUNDING_INCREMENT)); + } catch (MissingResourceException $e) { + return $this->reader->readEntry($this->path, 'meta', array('Meta', 'DEFAULT', static::INDEX_ROUNDING_INCREMENT)); + } + } + + /** + * Data provider for {@link \Symfony\Component\Intl\Currency::getNumericCode()}. + */ + public function getNumericCode($currency) + { + return $this->reader->readEntry($this->path, 'meta', array('Alpha3ToNumeric', $currency)); + } + + /** + * Data provider for {@link \Symfony\Component\Intl\Currency::forNumericCode()}. + */ + public function forNumericCode($numericCode) + { + return $this->reader->readEntry($this->path, 'meta', array('NumericToAlpha3', (string) $numericCode)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LanguageDataProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LanguageDataProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..b601c91405b2c7a719ced704b504035e10cb041c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LanguageDataProvider.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Provider; + +use Symfony\Component\Intl\Locale; +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; + +/** + * Data provider for language-related ICU data. + * + * @author Bernhard Schussek + * + * @internal + */ +class LanguageDataProvider +{ + /** + * @var string + */ + private $path; + + /** + * @var BundleEntryReaderInterface + */ + private $reader; + + /** + * Creates a data provider that reads locale-related data from .res files. + * + * @param string $path The path to the directory + * containing the .res files. + * @param BundleEntryReaderInterface $reader The reader for reading the .res + * files. + */ + public function __construct($path, BundleEntryReaderInterface $reader) + { + $this->path = $path; + $this->reader = $reader; + } + + public function getLanguages() + { + return $this->reader->readEntry($this->path, 'meta', array('Languages')); + } + + public function getAliases() + { + return $this->reader->readEntry($this->path, 'root', array('Aliases')); + } + + public function getName($language, $displayLocale = null) + { + if (null === $displayLocale) { + $displayLocale = Locale::getDefault(); + } + + return $this->reader->readEntry($this->path, $displayLocale, array('Names', $language)); + } + + public function getNames($displayLocale = null) + { + if (null === $displayLocale) { + $displayLocale = Locale::getDefault(); + } + + $languages = $this->reader->readEntry($this->path, $displayLocale, array('Names')); + + if ($languages instanceof \Traversable) { + $languages = iterator_to_array($languages); + } + + $collator = new \Collator($displayLocale); + $collator->asort($languages); + + return $languages; + } + + public function getAlpha3Code($language) + { + return $this->reader->readEntry($this->path, 'meta', array('Alpha2ToAlpha3', $language)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LocaleDataProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LocaleDataProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..dc8bd64149f376e3dea05f2682da083f58633bc5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/LocaleDataProvider.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\Component\Intl\Data\Provider; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; +use Symfony\Component\Intl\Locale; + +/** + * Data provider for locale-related ICU data. + * + * @author Bernhard Schussek + * + * @internal + */ +class LocaleDataProvider +{ + /** + * @var string + */ + private $path; + + /** + * @var BundleEntryReaderInterface + */ + private $reader; + + /** + * Creates a data provider that reads locale-related data from .res files. + * + * @param string $path The path to the directory + * containing the .res files. + * @param BundleEntryReaderInterface $reader The reader for reading the .res + * files. + */ + public function __construct($path, BundleEntryReaderInterface $reader) + { + $this->path = $path; + $this->reader = $reader; + } + + public function getLocales() + { + return $this->reader->readEntry($this->path, 'meta', array('Locales')); + } + + public function getAliases() + { + $aliases = $this->reader->readEntry($this->path, 'meta', array('Aliases')); + + if ($aliases instanceof \Traversable) { + $aliases = iterator_to_array($aliases); + } + + return $aliases; + } + + public function getName($locale, $displayLocale = null) + { + if (null === $displayLocale) { + $displayLocale = Locale::getDefault(); + } + + return $this->reader->readEntry($this->path, $displayLocale, array('Names', $locale)); + } + + public function getNames($displayLocale = null) + { + if (null === $displayLocale) { + $displayLocale = Locale::getDefault(); + } + + $names = $this->reader->readEntry($this->path, $displayLocale, array('Names')); + + if ($names instanceof \Traversable) { + $names = iterator_to_array($names); + } + + $collator = new \Collator($displayLocale); + $collator->asort($names); + + return $names; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/RegionDataProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/RegionDataProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..6adea143a1c70fc8f0aebca1a87b7c5b254a09b5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/RegionDataProvider.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Provider; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; +use Symfony\Component\Intl\Locale; + +/** + * Data provider for region-related ICU data. + * + * @author Bernhard Schussek + * + * @internal + */ +class RegionDataProvider +{ + /** + * @var string + */ + private $path; + + /** + * @var BundleEntryReaderInterface + */ + private $reader; + + /** + * Creates a data provider that reads locale-related data from .res files. + * + * @param string $path The path to the directory + * containing the .res files. + * @param BundleEntryReaderInterface $reader The reader for reading the .res + * files. + */ + public function __construct($path, BundleEntryReaderInterface $reader) + { + $this->path = $path; + $this->reader = $reader; + } + + public function getRegions() + { + return $this->reader->readEntry($this->path, 'meta', array('Regions')); + } + + public function getName($region, $displayLocale = null) + { + if (null === $displayLocale) { + $displayLocale = Locale::getDefault(); + } + + return $this->reader->readEntry($this->path, $displayLocale, array('Names', $region)); + } + + public function getNames($displayLocale = null) + { + if (null === $displayLocale) { + $displayLocale = Locale::getDefault(); + } + + $names = $this->reader->readEntry($this->path, $displayLocale, array('Names')); + + if ($names instanceof \Traversable) { + $names = iterator_to_array($names); + } + + $collator = new \Collator($displayLocale); + $collator->asort($names); + + return $names; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/ScriptDataProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/ScriptDataProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..462690d4d4f25669e6e61cef7c48290366e07b2c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Provider/ScriptDataProvider.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Provider; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; +use Symfony\Component\Intl\Locale; + +/** + * Data provider for script-related ICU data. + * + * @author Bernhard Schussek + * + * @internal + */ +class ScriptDataProvider +{ + /** + * @var string + */ + private $path; + + /** + * @var BundleEntryReaderInterface + */ + private $reader; + + /** + * Creates a data provider that reads locale-related data from .res files. + * + * @param string $path The path to the directory + * containing the .res files. + * @param BundleEntryReaderInterface $reader The reader for reading the .res + * files. + */ + public function __construct($path, BundleEntryReaderInterface $reader) + { + $this->path = $path; + $this->reader = $reader; + } + + public function getScripts() + { + return $this->reader->readEntry($this->path, 'meta', array('Scripts')); + } + + public function getName($script, $displayLocale = null) + { + if (null === $displayLocale) { + $displayLocale = Locale::getDefault(); + } + + return $this->reader->readEntry($this->path, $displayLocale, array('Names', $script)); + } + + public function getNames($displayLocale = null) + { + if (null === $displayLocale) { + $displayLocale = Locale::getDefault(); + } + + $names = $this->reader->readEntry($this->path, $displayLocale, array('Names')); + + if ($names instanceof \Traversable) { + $names = iterator_to_array($names); + } + + $collator = new \Collator($displayLocale); + $collator->asort($names); + + return $names; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/ArrayAccessibleResourceBundle.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/ArrayAccessibleResourceBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..dcc2befde6f7339850476454532106471ffac5c1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/ArrayAccessibleResourceBundle.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Util; + +use Symfony\Component\Intl\Exception\BadMethodCallException; + +/** + * Work-around for a bug in PHP's \ResourceBundle implementation. + * + * More information can be found on https://bugs.php.net/bug.php?id=64356. + * This class can be removed once that bug is fixed. + * + * @author Bernhard Schussek + * + * @internal + */ +class ArrayAccessibleResourceBundle implements \ArrayAccess, \IteratorAggregate, \Countable +{ + private $bundleImpl; + + public function __construct(\ResourceBundle $bundleImpl) + { + $this->bundleImpl = $bundleImpl; + } + + public function get($offset) + { + $value = $this->bundleImpl->get($offset); + + return $value instanceof \ResourceBundle ? new static($value) : $value; + } + + public function offsetExists($offset) + { + return null !== $this->bundleImpl->get($offset); + } + + public function offsetGet($offset) + { + return $this->get($offset); + } + + public function offsetSet($offset, $value) + { + throw new BadMethodCallException('Resource bundles cannot be modified.'); + } + + public function offsetUnset($offset) + { + throw new BadMethodCallException('Resource bundles cannot be modified.'); + } + + public function getIterator() + { + return $this->bundleImpl; + } + + public function count() + { + return $this->bundleImpl->count(); + } + + public function getErrorCode() + { + return $this->bundleImpl->getErrorCode(); + } + + public function getErrorMessage() + { + return $this->bundleImpl->getErrorMessage(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php new file mode 100644 index 0000000000000000000000000000000000000000..0604593f6e1d26e2df18b8046bad8bb5264d47d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Util; + +/** + * Scans a directory with data files for locales. + * + * The name of each file with the extension ".txt" is considered, if it "looks" + * like a locale: + * + * - the name must start with two letters; + * - the two letters may optionally be followed by an underscore and any + * sequence of other symbols. + * + * For example, "de" and "de_DE" are considered to be locales. "root" and "meta" + * are not. + * + * @author Bernhard Schussek + * + * @internal + */ +class LocaleScanner +{ + /** + * Returns all locales found in the given directory. + * + * @param string $sourceDir The directory with ICU files + * + * @return array An array of locales. The result also contains locales that + * are in fact just aliases for other locales. Use + * {@link scanAliases()} to determine which of the locales + * are aliases + */ + public function scanLocales($sourceDir) + { + $locales = glob($sourceDir.'/*.txt'); + + // Remove file extension and sort + array_walk($locales, function (&$locale) { $locale = basename($locale, '.txt'); }); + + // Remove non-locales + $locales = array_filter($locales, function ($locale) { + return preg_match('/^[a-z]{2}(_.+)?$/', $locale); + }); + + sort($locales); + + return $locales; + } + + /** + * Returns all locale aliases found in the given directory. + * + * @param string $sourceDir The directory with ICU files + * + * @return array An array with the locale aliases as keys and the aliased + * locales as values + */ + public function scanAliases($sourceDir) + { + $locales = $this->scanLocales($sourceDir); + $aliases = array(); + + // Delete locales that are no aliases + foreach ($locales as $locale) { + $content = file_get_contents($sourceDir.'/'.$locale.'.txt'); + + // Aliases contain the text "%%ALIAS" followed by the aliased locale + if (preg_match('/"%%ALIAS"\{"([^"]+)"\}/', $content, $matches)) { + $aliases[$locale] = $matches[1]; + } + } + + return $aliases; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RecursiveArrayAccess.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RecursiveArrayAccess.php new file mode 100644 index 0000000000000000000000000000000000000000..ff4d2f777ca1fe1020728dca0188863b6ee5605c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RecursiveArrayAccess.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Util; + +use Symfony\Component\Intl\Exception\OutOfBoundsException; + +/** + * @author Bernhard Schussek + * + * @internal + */ +class RecursiveArrayAccess +{ + public static function get($array, array $indices) + { + foreach ($indices as $index) { + // Use array_key_exists() for arrays, isset() otherwise + if (is_array($array)) { + if (array_key_exists($index, $array)) { + $array = $array[$index]; + continue; + } + } elseif ($array instanceof \ArrayAccess) { + if (isset($array[$index])) { + $array = $array[$index]; + continue; + } + } + + throw new OutOfBoundsException(sprintf( + 'The index %s does not exist.', + $index + )); + } + + return $array; + } + + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RingBuffer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RingBuffer.php new file mode 100644 index 0000000000000000000000000000000000000000..b63c31e91970f7ace4b18735b76ecbf720fb604b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Data/Util/RingBuffer.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Data\Util; + +use Symfony\Component\Intl\Exception\OutOfBoundsException; + +/** + * Implements a ring buffer. + * + * A ring buffer is an array-like structure with a fixed size. If the buffer + * is full, the next written element overwrites the first bucket in the buffer, + * then the second and so on. + * + * @author Bernhard Schussek + * + * @internal + */ +class RingBuffer implements \ArrayAccess +{ + private $values = array(); + + private $indices = array(); + + private $cursor = 0; + + private $size; + + public function __construct($size) + { + $this->size = $size; + } + + /** + * {@inheritdoc} + */ + public function offsetExists($key) + { + return isset($this->indices[$key]); + } + + /** + * {@inheritdoc} + */ + public function offsetGet($key) + { + if (!isset($this->indices[$key])) { + throw new OutOfBoundsException(sprintf( + 'The index "%s" does not exist.', + $key + )); + } + + return $this->values[$this->indices[$key]]; + } + + /** + * {@inheritdoc} + */ + public function offsetSet($key, $value) + { + if (false !== ($keyToRemove = array_search($this->cursor, $this->indices))) { + unset($this->indices[$keyToRemove]); + } + + $this->values[$this->cursor] = $value; + $this->indices[$key] = $this->cursor; + + $this->cursor = ($this->cursor + 1) % $this->size; + } + + /** + * {@inheritdoc} + */ + public function offsetUnset($key) + { + if (isset($this->indices[$key])) { + $this->values[$this->indices[$key]] = null; + unset($this->indices[$key]); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/AmPmTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/AmPmTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..66376475c666ba57025c6362d98e9cf91a27e0f6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/AmPmTransformer.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for AM/PM markers format. + * + * @author Igor Wiedler + * + * @internal + */ +class AmPmTransformer extends Transformer +{ + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + return $dateTime->format('A'); + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + return 'AM|PM'; + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array( + 'marker' => $matched, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfWeekTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfWeekTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..a174fdcabc570427915bd5bf220173e3b204dc1e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfWeekTransformer.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\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for day of week format. + * + * @author Igor Wiedler + * + * @internal + */ +class DayOfWeekTransformer extends Transformer +{ + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + $dayOfWeek = $dateTime->format('l'); + switch ($length) { + case 4: + return $dayOfWeek; + case 5: + return $dayOfWeek[0]; + case 6: + return substr($dayOfWeek, 0, 2); + default: + return substr($dayOfWeek, 0, 3); + } + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + switch ($length) { + case 4: + return 'Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday'; + case 5: + return '[MTWFS]'; + case 6: + return 'Mo|Tu|We|Th|Fr|Sa|Su'; + default: + return 'Mon|Tue|Wed|Thu|Fri|Sat|Sun'; + } + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfYearTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfYearTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..5af6dd724336bb8bb9d66ed631baa4644a806d9f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfYearTransformer.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for day of year format. + * + * @author Igor Wiedler + * + * @internal + */ +class DayOfYearTransformer extends Transformer +{ + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + $dayOfYear = $dateTime->format('z') + 1; + + return $this->padLeft($dayOfYear, $length); + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + return '\d{'.$length.'}'; + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..f0ded907c33c55c34017ace337abb4477d7dc2d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/DayTransformer.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for day format. + * + * @author Igor Wiedler + * + * @internal + */ +class DayTransformer extends Transformer +{ + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + return $this->padLeft($dateTime->format('j'), $length); + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + return 1 === $length ? '\d{1,2}' : '\d{'.$length.'}'; + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array( + 'day' => (int) $matched, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..c81e0c73aa4ac43691f99e407b7cec02e9f42ab8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php @@ -0,0 +1,353 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +use Symfony\Component\Intl\Exception\NotImplementedException; +use Symfony\Component\Intl\Globals\IntlGlobals; + +/** + * Parser and formatter for date formats. + * + * @author Igor Wiedler + * + * @internal + */ +class FullTransformer +{ + private $quoteMatch = "'(?:[^']+|'')*'"; + private $implementedChars = 'MLydQqhDEaHkKmsz'; + private $notImplementedChars = 'GYuwWFgecSAZvVW'; + private $regExp; + + /** + * @var Transformer[] + */ + private $transformers; + + private $pattern; + private $timezone; + + /** + * Constructor. + * + * @param string $pattern The pattern to be used to format and/or parse values + * @param string $timezone The timezone to perform the date/time calculations + */ + public function __construct($pattern, $timezone) + { + $this->pattern = $pattern; + $this->timezone = $timezone; + + $implementedCharsMatch = $this->buildCharsMatch($this->implementedChars); + $notImplementedCharsMatch = $this->buildCharsMatch($this->notImplementedChars); + $this->regExp = "/($this->quoteMatch|$implementedCharsMatch|$notImplementedCharsMatch)/"; + + $this->transformers = array( + 'M' => new MonthTransformer(), + 'L' => new MonthTransformer(), + 'y' => new YearTransformer(), + 'd' => new DayTransformer(), + 'q' => new QuarterTransformer(), + 'Q' => new QuarterTransformer(), + 'h' => new Hour1201Transformer(), + 'D' => new DayOfYearTransformer(), + 'E' => new DayOfWeekTransformer(), + 'a' => new AmPmTransformer(), + 'H' => new Hour2400Transformer(), + 'K' => new Hour1200Transformer(), + 'k' => new Hour2401Transformer(), + 'm' => new MinuteTransformer(), + 's' => new SecondTransformer(), + 'z' => new TimeZoneTransformer(), + ); + } + + /** + * Return the array of Transformer objects. + * + * @return Transformer[] Associative array of Transformer objects (format char => Transformer) + */ + public function getTransformers() + { + return $this->transformers; + } + + /** + * Format a DateTime using ICU dateformat pattern. + * + * @param \DateTime $dateTime A DateTime object to be used to generate the formatted value + * + * @return string The formatted value + */ + public function format(\DateTime $dateTime) + { + $formatted = preg_replace_callback($this->regExp, function ($matches) use ($dateTime) { + return $this->formatReplace($matches[0], $dateTime); + }, $this->pattern); + + return $formatted; + } + + /** + * Return the formatted ICU value for the matched date characters. + * + * @param string $dateChars The date characters to be replaced with a formatted ICU value + * @param \DateTime $dateTime A DateTime object to be used to generate the formatted value + * + * @return string The formatted value + * + * @throws NotImplementedException When it encounters a not implemented date character + */ + public function formatReplace($dateChars, $dateTime) + { + $length = strlen($dateChars); + + if ($this->isQuoteMatch($dateChars)) { + return $this->replaceQuoteMatch($dateChars); + } + + if (isset($this->transformers[$dateChars[0]])) { + $transformer = $this->transformers[$dateChars[0]]; + + return $transformer->format($dateTime, $length); + } + + // handle unimplemented characters + if (false !== strpos($this->notImplementedChars, $dateChars[0])) { + throw new NotImplementedException(sprintf('Unimplemented date character "%s" in format "%s"', $dateChars[0], $this->pattern)); + } + } + + /** + * Parse a pattern based string to a timestamp value. + * + * @param \DateTime $dateTime A configured DateTime object to use to perform the date calculation + * @param string $value String to convert to a time value + * + * @return int The corresponding Unix timestamp + * + * @throws \InvalidArgumentException When the value can not be matched with pattern + */ + public function parse(\DateTime $dateTime, $value) + { + $reverseMatchingRegExp = $this->getReverseMatchingRegExp($this->pattern); + $reverseMatchingRegExp = '/^'.$reverseMatchingRegExp.'$/'; + + $options = array(); + + if (preg_match($reverseMatchingRegExp, $value, $matches)) { + $matches = $this->normalizeArray($matches); + + foreach ($this->transformers as $char => $transformer) { + if (isset($matches[$char])) { + $length = strlen($matches[$char]['pattern']); + $options = array_merge($options, $transformer->extractDateOptions($matches[$char]['value'], $length)); + } + } + + // reset error code and message + IntlGlobals::setError(IntlGlobals::U_ZERO_ERROR); + + return $this->calculateUnixTimestamp($dateTime, $options); + } + + // behave like the intl extension + IntlGlobals::setError(IntlGlobals::U_PARSE_ERROR, 'Date parsing failed'); + + return false; + } + + /** + * Retrieve a regular expression to match with a formatted value. + * + * @param string $pattern The pattern to create the reverse matching regular expression + * + * @return string The reverse matching regular expression with named captures being formed by the + * transformer index in the $transformer array + */ + public function getReverseMatchingRegExp($pattern) + { + $escapedPattern = preg_quote($pattern, '/'); + + // ICU 4.8 recognizes slash ("/") in a value to be parsed as a dash ("-") and vice-versa + // when parsing a date/time value + $escapedPattern = preg_replace('/\\\[\-|\/]/', '[\/\-]', $escapedPattern); + + $reverseMatchingRegExp = preg_replace_callback($this->regExp, function ($matches) { + $length = strlen($matches[0]); + $transformerIndex = $matches[0][0]; + + $dateChars = $matches[0]; + if ($this->isQuoteMatch($dateChars)) { + return $this->replaceQuoteMatch($dateChars); + } + + $transformers = $this->getTransformers(); + if (isset($transformers[$transformerIndex])) { + $transformer = $transformers[$transformerIndex]; + $captureName = str_repeat($transformerIndex, $length); + + return "(?P<$captureName>".$transformer->getReverseMatchingRegExp($length).')'; + } + }, $escapedPattern); + + return $reverseMatchingRegExp; + } + + /** + * Check if the first char of a string is a single quote. + * + * @param string $quoteMatch The string to check + * + * @return bool true if matches, false otherwise + */ + public function isQuoteMatch($quoteMatch) + { + return "'" === $quoteMatch[0]; + } + + /** + * Replaces single quotes at the start or end of a string with two single quotes. + * + * @param string $quoteMatch The string to replace the quotes + * + * @return string A string with the single quotes replaced + */ + public function replaceQuoteMatch($quoteMatch) + { + if (preg_match("/^'+$/", $quoteMatch)) { + return str_replace("''", "'", $quoteMatch); + } + + return str_replace("''", "'", substr($quoteMatch, 1, -1)); + } + + /** + * Builds a chars match regular expression. + * + * @param string $specialChars A string of chars to build the regular expression + * + * @return string The chars match regular expression + */ + protected function buildCharsMatch($specialChars) + { + $specialCharsArray = str_split($specialChars); + + $specialCharsMatch = implode('|', array_map(function ($char) { + return $char.'+'; + }, $specialCharsArray)); + + return $specialCharsMatch; + } + + /** + * Normalize a preg_replace match array, removing the numeric keys and returning an associative array + * with the value and pattern values for the matched Transformer. + * + * @param array $data + * + * @return array + */ + protected function normalizeArray(array $data) + { + $ret = array(); + + foreach ($data as $key => $value) { + if (!is_string($key)) { + continue; + } + + $ret[$key[0]] = array( + 'value' => $value, + 'pattern' => $key, + ); + } + + return $ret; + } + + /** + * Calculates the Unix timestamp based on the matched values by the reverse matching regular + * expression of parse(). + * + * @param \DateTime $dateTime The DateTime object to be used to calculate the timestamp + * @param array $options An array with the matched values to be used to calculate the timestamp + * + * @return bool|int The calculated timestamp or false if matched date is invalid + */ + protected function calculateUnixTimestamp(\DateTime $dateTime, array $options) + { + $options = $this->getDefaultValueForOptions($options); + + $year = $options['year']; + $month = $options['month']; + $day = $options['day']; + $hour = $options['hour']; + $hourInstance = $options['hourInstance']; + $minute = $options['minute']; + $second = $options['second']; + $marker = $options['marker']; + $timezone = $options['timezone']; + + // If month is false, return immediately (intl behavior) + if (false === $month) { + IntlGlobals::setError(IntlGlobals::U_PARSE_ERROR, 'Date parsing failed'); + + return false; + } + + // Normalize hour + if ($hourInstance instanceof HourTransformer) { + $hour = $hourInstance->normalizeHour($hour, $marker); + } + + // Set the timezone if different from the default one + if (null !== $timezone && $timezone !== $this->timezone) { + $dateTime->setTimezone(new \DateTimeZone($timezone)); + } + + // Normalize yy year + preg_match_all($this->regExp, $this->pattern, $matches); + if (in_array('yy', $matches[0])) { + $dateTime->setTimestamp(time()); + $year = $year > $dateTime->format('y') + 20 ? 1900 + $year : 2000 + $year; + } + + $dateTime->setDate($year, $month, $day); + $dateTime->setTime($hour, $minute, $second); + + return $dateTime->getTimestamp(); + } + + /** + * Add sensible default values for missing items in the extracted date/time options array. The values + * are base in the beginning of the Unix era. + * + * @param array $options + * + * @return array + */ + private function getDefaultValueForOptions(array $options) + { + return array( + 'year' => isset($options['year']) ? $options['year'] : 1970, + 'month' => isset($options['month']) ? $options['month'] : 1, + 'day' => isset($options['day']) ? $options['day'] : 1, + 'hour' => isset($options['hour']) ? $options['hour'] : 0, + 'hourInstance' => isset($options['hourInstance']) ? $options['hourInstance'] : null, + 'minute' => isset($options['minute']) ? $options['minute'] : 0, + 'second' => isset($options['second']) ? $options['second'] : 0, + 'marker' => isset($options['marker']) ? $options['marker'] : null, + 'timezone' => isset($options['timezone']) ? $options['timezone'] : null, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1200Transformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1200Transformer.php new file mode 100644 index 0000000000000000000000000000000000000000..948e3450443efa2895b2015b73fb107374cda7b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1200Transformer.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for 12 hour format (0-11). + * + * @author Igor Wiedler + * + * @internal + */ +class Hour1200Transformer extends HourTransformer +{ + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + $hourOfDay = $dateTime->format('g'); + $hourOfDay = '12' == $hourOfDay ? '0' : $hourOfDay; + + return $this->padLeft($hourOfDay, $length); + } + + /** + * {@inheritdoc} + */ + public function normalizeHour($hour, $marker = null) + { + if ('PM' === $marker) { + $hour += 12; + } + + return $hour; + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + return '\d{1,2}'; + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array( + 'hour' => (int) $matched, + 'hourInstance' => $this, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1201Transformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1201Transformer.php new file mode 100644 index 0000000000000000000000000000000000000000..19c4d203abe09be8f71e94032d094749729ccdc1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1201Transformer.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for 12 hour format (1-12). + * + * @author Igor Wiedler + * + * @internal + */ +class Hour1201Transformer extends HourTransformer +{ + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + return $this->padLeft($dateTime->format('g'), $length); + } + + /** + * {@inheritdoc} + */ + public function normalizeHour($hour, $marker = null) + { + if ('PM' !== $marker && 12 === $hour) { + $hour = 0; + } elseif ('PM' === $marker && 12 !== $hour) { + // If PM and hour is not 12 (1-12), sum 12 hour + $hour += 12; + } + + return $hour; + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + return '\d{1,2}'; + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array( + 'hour' => (int) $matched, + 'hourInstance' => $this, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2400Transformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2400Transformer.php new file mode 100644 index 0000000000000000000000000000000000000000..e43d0ee8b2aecd142b4cf3a583f995fafaccb24d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2400Transformer.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\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for 24 hour format (0-23). + * + * @author Igor Wiedler + * + * @internal + */ +class Hour2400Transformer extends HourTransformer +{ + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + return $this->padLeft($dateTime->format('G'), $length); + } + + /** + * {@inheritdoc} + */ + public function normalizeHour($hour, $marker = null) + { + if ('AM' == $marker) { + $hour = 0; + } elseif ('PM' == $marker) { + $hour = 12; + } + + return $hour; + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + return '\d{1,2}'; + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array( + 'hour' => (int) $matched, + 'hourInstance' => $this, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2401Transformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2401Transformer.php new file mode 100644 index 0000000000000000000000000000000000000000..df4e671aaf02bb2e8a8572a580f5930a2e421b9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2401Transformer.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for 24 hour format (1-24). + * + * @author Igor Wiedler + * + * @internal + */ +class Hour2401Transformer extends HourTransformer +{ + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + $hourOfDay = $dateTime->format('G'); + $hourOfDay = ('0' == $hourOfDay) ? '24' : $hourOfDay; + + return $this->padLeft($hourOfDay, $length); + } + + /** + * {@inheritdoc} + */ + public function normalizeHour($hour, $marker = null) + { + if ((null === $marker && 24 === $hour) || 'AM' == $marker) { + $hour = 0; + } elseif ('PM' == $marker) { + $hour = 12; + } + + return $hour; + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + return '\d{1,2}'; + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array( + 'hour' => (int) $matched, + 'hourInstance' => $this, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/HourTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/HourTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..349d8e29ae7a905f36a1b87d3f6c2c04ef8f2086 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/HourTransformer.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\Component\Intl\DateFormatter\DateFormat; + +/** + * Base class for hour transformers. + * + * @author Eriksen Costa + * + * @internal + */ +abstract class HourTransformer extends Transformer +{ + /** + * Returns a normalized hour value suitable for the hour transformer type. + * + * @param int $hour The hour value + * @param string $marker An optional AM/PM marker + * + * @return int The normalized hour value + */ + abstract public function normalizeHour($hour, $marker = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MinuteTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MinuteTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..08b5356e3fbd9d0362b5dc01a503c1fafe7a8d02 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MinuteTransformer.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for minute format. + * + * @author Igor Wiedler + * + * @internal + */ +class MinuteTransformer extends Transformer +{ + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + $minuteOfHour = (int) $dateTime->format('i'); + + return $this->padLeft($minuteOfHour, $length); + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + return 1 === $length ? '\d{1,2}' : '\d{'.$length.'}'; + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array( + 'minute' => (int) $matched, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..6d7c819800339e59b48866c843a17b8d1aea351c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php @@ -0,0 +1,148 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for month format. + * + * @author Igor Wiedler + * + * @internal + */ +class MonthTransformer extends Transformer +{ + /** + * @var array + */ + protected static $months = array( + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December', + ); + + /** + * Short months names (first 3 letters). + * + * @var array + */ + protected static $shortMonths = array(); + + /** + * Flipped $months array, $name => $index. + * + * @var array + */ + protected static $flippedMonths = array(); + + /** + * Flipped $shortMonths array, $name => $index. + * + * @var array + */ + protected static $flippedShortMonths = array(); + + /** + * Constructor. + */ + public function __construct() + { + if (0 === count(self::$shortMonths)) { + self::$shortMonths = array_map(function ($month) { + return substr($month, 0, 3); + }, self::$months); + + self::$flippedMonths = array_flip(self::$months); + self::$flippedShortMonths = array_flip(self::$shortMonths); + } + } + + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + $matchLengthMap = array( + 1 => 'n', + 2 => 'm', + 3 => 'M', + 4 => 'F', + ); + + if (isset($matchLengthMap[$length])) { + return $dateTime->format($matchLengthMap[$length]); + } + + if (5 === $length) { + return substr($dateTime->format('M'), 0, 1); + } + + return $this->padLeft($dateTime->format('m'), $length); + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + switch ($length) { + case 1: + $regExp = '\d{1,2}'; + break; + case 3: + $regExp = implode('|', self::$shortMonths); + break; + case 4: + $regExp = implode('|', self::$months); + break; + case 5: + $regExp = '[JFMASOND]'; + break; + default: + $regExp = '\d{'.$length.'}'; + break; + } + + return $regExp; + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + if (!is_numeric($matched)) { + if (3 === $length) { + $matched = self::$flippedShortMonths[$matched] + 1; + } elseif (4 === $length) { + $matched = self::$flippedMonths[$matched] + 1; + } elseif (5 === $length) { + // IntlDateFormatter::parse() always returns false for MMMMM or LLLLL + $matched = false; + } + } else { + $matched = (int) $matched; + } + + return array( + 'month' => $matched, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/QuarterTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/QuarterTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..fa7e91d038f8c96cf475c112c3fafc4a9e029c01 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/QuarterTransformer.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for quarter format. + * + * @author Igor Wiedler + * + * @internal + */ +class QuarterTransformer extends Transformer +{ + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + $month = (int) $dateTime->format('n'); + $quarter = (int) floor(($month - 1) / 3) + 1; + switch ($length) { + case 1: + case 2: + return $this->padLeft($quarter, $length); + case 3: + return 'Q'.$quarter; + default: + $map = array(1 => '1st quarter', 2 => '2nd quarter', 3 => '3rd quarter', 4 => '4th quarter'); + + return $map[$quarter]; + } + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + switch ($length) { + case 1: + case 2: + return '\d{'.$length.'}'; + case 3: + return 'Q\d'; + default: + return '(?:1st|2nd|3rd|4th) quarter'; + } + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/SecondTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/SecondTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..dd2e7bd9f9bb573a8259af6d84e4f7416bb63fd3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/SecondTransformer.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for the second format. + * + * @author Igor Wiedler + * + * @internal + */ +class SecondTransformer extends Transformer +{ + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + $secondOfMinute = (int) $dateTime->format('s'); + + return $this->padLeft($secondOfMinute, $length); + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + return 1 === $length ? '\d{1,2}' : '\d{'.$length.'}'; + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array( + 'second' => (int) $matched, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..3b1ee123ccceb3c628d569ad85872db837da5bc3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +use Symfony\Component\Intl\Exception\NotImplementedException; + +/** + * Parser and formatter for time zone format. + * + * @author Igor Wiedler + * + * @internal + */ +class TimeZoneTransformer extends Transformer +{ + /** + * {@inheritdoc} + * + * @throws NotImplementedException When time zone is different than UTC or GMT (Etc/GMT) + */ + public function format(\DateTime $dateTime, $length) + { + $timeZone = substr($dateTime->getTimezone()->getName(), 0, 3); + + if (!in_array($timeZone, array('Etc', 'UTC', 'GMT'))) { + throw new NotImplementedException('Time zone different than GMT or UTC is not supported as a formatting output.'); + } + + // From ICU >= 4.8, the zero offset is not more used, example: GMT instead of GMT+00:00 + $format = (0 !== (int) $dateTime->format('O')) ? '\G\M\TP' : '\G\M\T'; + + return $dateTime->format($format); + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + return 'GMT[+-]\d{2}:?\d{2}'; + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array( + 'timezone' => self::getEtcTimeZoneId($matched), + ); + } + + /** + * Get an Etc/GMT timezone identifier for the specified timezone. + * + * The PHP documentation for timezones states to not use the 'Other' time zones because them exists + * "for backwards compatibility". However all Etc/GMT time zones are in the tz database 'etcetera' file, + * which indicates they are not deprecated (neither are old names). + * + * Only GMT, Etc/Universal, Etc/Zulu, Etc/Greenwich, Etc/GMT-0, Etc/GMT+0 and Etc/GMT0 are old names and + * are linked to Etc/GMT or Etc/UTC. + * + * @param string $formattedTimeZone A GMT timezone string (GMT-03:00, e.g.) + * + * @return string A timezone identifier + * + * @see http://php.net/manual/en/timezones.others.php + * @see http://www.twinsun.com/tz/tz-link.htm + * + * @throws NotImplementedException When the GMT time zone have minutes offset different than zero + * @throws \InvalidArgumentException When the value can not be matched with pattern + */ + public static function getEtcTimeZoneId($formattedTimeZone) + { + if (preg_match('/GMT(?P[+-])(?P\d{2}):?(?P\d{2})/', $formattedTimeZone, $matches)) { + $hours = (int) $matches['hours']; + $minutes = (int) $matches['minutes']; + $signal = $matches['signal'] == '-' ? '+' : '-'; + + if (0 < $minutes) { + throw new NotImplementedException(sprintf( + 'It is not possible to use a GMT time zone with minutes offset different than zero (0). GMT time zone tried: %s.', + $formattedTimeZone + )); + } + + return 'Etc/GMT'.($hours !== 0 ? $signal.$hours : ''); + } + + throw new \InvalidArgumentException(sprintf('The GMT time zone "%s" does not match with the supported formats GMT[+-]HH:MM or GMT[+-]HHMM.', $formattedTimeZone)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php new file mode 100644 index 0000000000000000000000000000000000000000..26a25db355ca9376da6fc14202d73f409d777d70 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for date formats. + * + * @author Igor Wiedler + * + * @internal + */ +abstract class Transformer +{ + /** + * Format a value using a configured DateTime as date/time source. + * + * + * @param \DateTime $dateTime A DateTime object to be used to generate the formatted value + * @param int $length The formatted value string length + * + * @return string The formatted value + */ + abstract public function format(\DateTime $dateTime, $length); + + /** + * Returns a reverse matching regular expression of a string generated by format(). + * + * @param int $length The length of the value to be reverse matched + * + * @return string The reverse matching regular expression + */ + abstract public function getReverseMatchingRegExp($length); + + /** + * Extract date options from a matched value returned by the processing of the reverse matching + * regular expression. + * + * @param string $matched The matched value + * @param int $length The length of the Transformer pattern string + * + * @return array An associative array + */ + abstract public function extractDateOptions($matched, $length); + + /** + * Pad a string with zeros to the left. + * + * @param string $value The string to be padded + * @param int $length The length to pad + * + * @return string The padded string + */ + protected function padLeft($value, $length) + { + return str_pad($value, $length, '0', STR_PAD_LEFT); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/YearTransformer.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/YearTransformer.php new file mode 100644 index 0000000000000000000000000000000000000000..0b546b774a40c4d171c08c886439bf11200a41e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/YearTransformer.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter\DateFormat; + +/** + * Parser and formatter for year format. + * + * @author Igor Wiedler + * + * @internal + */ +class YearTransformer extends Transformer +{ + /** + * {@inheritdoc} + */ + public function format(\DateTime $dateTime, $length) + { + if (2 === $length) { + return $dateTime->format('y'); + } + + return $this->padLeft($dateTime->format('Y'), $length); + } + + /** + * {@inheritdoc} + */ + public function getReverseMatchingRegExp($length) + { + return 2 === $length ? '\d{2}' : '\d{4}'; + } + + /** + * {@inheritdoc} + */ + public function extractDateOptions($matched, $length) + { + return array( + 'year' => (int) $matched, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..51de358617b1321c4e599635a0469d4f986afa0c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php @@ -0,0 +1,626 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\DateFormatter; + +use Symfony\Component\Intl\Globals\IntlGlobals; +use Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer; +use Symfony\Component\Intl\Exception\MethodNotImplementedException; +use Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException; +use Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException; +use Symfony\Component\Intl\Locale\Locale; + +/** + * Replacement for PHP's native {@link \IntlDateFormatter} class. + * + * The only methods currently supported in this class are: + * + * - {@link __construct} + * - {@link create} + * - {@link format} + * - {@link getCalendar} + * - {@link getDateType} + * - {@link getErrorCode} + * - {@link getErrorMessage} + * - {@link getLocale} + * - {@link getPattern} + * - {@link getTimeType} + * - {@link getTimeZoneId} + * - {@link isLenient} + * - {@link parse} + * - {@link setLenient} + * - {@link setPattern} + * - {@link setTimeZoneId} + * - {@link setTimeZone} + * + * @author Igor Wiedler + * @author Bernhard Schussek + * + * @internal + */ +class IntlDateFormatter +{ + /** + * The error code from the last operation. + * + * @var int + */ + protected $errorCode = IntlGlobals::U_ZERO_ERROR; + + /** + * The error message from the last operation. + * + * @var string + */ + protected $errorMessage = 'U_ZERO_ERROR'; + + /* date/time format types */ + const NONE = -1; + const FULL = 0; + const LONG = 1; + const MEDIUM = 2; + const SHORT = 3; + + /* calendar formats */ + const TRADITIONAL = 0; + const GREGORIAN = 1; + + /** + * Patterns used to format the date when no pattern is provided. + * + * @var array + */ + private $defaultDateFormats = array( + self::NONE => '', + self::FULL => 'EEEE, LLLL d, y', + self::LONG => 'LLLL d, y', + self::MEDIUM => 'LLL d, y', + self::SHORT => 'M/d/yy', + ); + + /** + * Patterns used to format the time when no pattern is provided. + * + * @var array + */ + private $defaultTimeFormats = array( + self::FULL => 'h:mm:ss a zzzz', + self::LONG => 'h:mm:ss a z', + self::MEDIUM => 'h:mm:ss a', + self::SHORT => 'h:mm a', + ); + + /** + * @var int + */ + private $datetype; + + /** + * @var int + */ + private $timetype; + + /** + * @var string + */ + private $pattern; + + /** + * @var \DateTimeZone + */ + private $dateTimeZone; + + /** + * @var bool + */ + private $uninitializedTimeZoneId = false; + + /** + * @var string + */ + private $timeZoneId; + + /** + * Constructor. + * + * @param string $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") + * @param int $datetype Type of date formatting, one of the format type constants + * @param int $timetype Type of time formatting, one of the format type constants + * @param mixed $timezone Timezone identifier + * @param int $calendar Calendar to use for formatting or parsing. The only currently + * supported value is IntlDateFormatter::GREGORIAN (or null using the default calendar, i.e. "GREGORIAN") + * @param string $pattern Optional pattern to use when formatting + * + * @see http://www.php.net/manual/en/intldateformatter.create.php + * @see http://userguide.icu-project.org/formatparse/datetime + * + * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed + * @throws MethodArgumentValueNotImplementedException When $calendar different than GREGORIAN is passed + */ + public function __construct($locale, $datetype, $timetype, $timezone = null, $calendar = self::GREGORIAN, $pattern = null) + { + if ('en' !== $locale && null !== $locale) { + throw new MethodArgumentValueNotImplementedException(__METHOD__, 'locale', $locale, 'Only the locale "en" is supported'); + } + + if (self::GREGORIAN !== $calendar && null !== $calendar) { + throw new MethodArgumentValueNotImplementedException(__METHOD__, 'calendar', $calendar, 'Only the GREGORIAN calendar is supported'); + } + + $this->datetype = $datetype; + $this->timetype = $timetype; + + $this->setPattern($pattern); + $this->setTimeZone($timezone); + } + + /** + * Static constructor. + * + * @param string $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") + * @param int $datetype Type of date formatting, one of the format type constants + * @param int $timetype Type of time formatting, one of the format type constants + * @param string $timezone Timezone identifier + * @param int $calendar Calendar to use for formatting or parsing; default is Gregorian + * One of the calendar constants. + * @param string $pattern Optional pattern to use when formatting + * + * @return self + * + * @see http://www.php.net/manual/en/intldateformatter.create.php + * @see http://userguide.icu-project.org/formatparse/datetime + * + * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed + * @throws MethodArgumentValueNotImplementedException When $calendar different than GREGORIAN is passed + */ + public static function create($locale, $datetype, $timetype, $timezone = null, $calendar = self::GREGORIAN, $pattern = null) + { + return new self($locale, $datetype, $timetype, $timezone, $calendar, $pattern); + } + + /** + * Format the date/time value (timestamp) as a string. + * + * @param int|\DateTime $timestamp The timestamp to format + * + * @return string|bool The formatted value or false if formatting failed + * + * @see http://www.php.net/manual/en/intldateformatter.format.php + * + * @throws MethodArgumentValueNotImplementedException If one of the formatting characters is not implemented + */ + public function format($timestamp) + { + // intl allows timestamps to be passed as arrays - we don't + if (is_array($timestamp)) { + $message = 'Only integer Unix timestamps and DateTime objects are supported'; + + throw new MethodArgumentValueNotImplementedException(__METHOD__, 'timestamp', $timestamp, $message); + } + + // behave like the intl extension + $argumentError = null; + if (!is_int($timestamp) && !$timestamp instanceof \DateTime) { + $argumentError = sprintf('datefmt_format: string \'%s\' is not numeric, which would be required for it to be a valid date', $timestamp); + } + + if (null !== $argumentError) { + IntlGlobals::setError(IntlGlobals::U_ILLEGAL_ARGUMENT_ERROR, $argumentError); + $this->errorCode = IntlGlobals::getErrorCode(); + $this->errorMessage = IntlGlobals::getErrorMessage(); + + return false; + } + + if ($timestamp instanceof \DateTime) { + $timestamp = $timestamp->getTimestamp(); + } + + $transformer = new FullTransformer($this->getPattern(), $this->getTimeZoneId()); + $formatted = $transformer->format($this->createDateTime($timestamp)); + + // behave like the intl extension + IntlGlobals::setError(IntlGlobals::U_ZERO_ERROR); + $this->errorCode = IntlGlobals::getErrorCode(); + $this->errorMessage = IntlGlobals::getErrorMessage(); + + return $formatted; + } + + /** + * Not supported. Formats an object. + * + * @param object $object + * @param mixed $format + * @param string $locale + * + * @return string The formatted value + * + * @see http://www.php.net/manual/en/intldateformatter.formatobject.php + * + * @throws MethodNotImplementedException + */ + public function formatObject($object, $format = null, $locale = null) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Returns the formatter's calendar. + * + * @return int The calendar being used by the formatter. Currently always returns + * IntlDateFormatter::GREGORIAN. + * + * @see http://www.php.net/manual/en/intldateformatter.getcalendar.php + */ + public function getCalendar() + { + return self::GREGORIAN; + } + + /** + * Not supported. Returns the formatter's calendar object. + * + * @return object The calendar's object being used by the formatter + * + * @see http://www.php.net/manual/en/intldateformatter.getcalendarobject.php + * + * @throws MethodNotImplementedException + */ + public function getCalendarObject() + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Returns the formatter's datetype. + * + * @return int The current value of the formatter + * + * @see http://www.php.net/manual/en/intldateformatter.getdatetype.php + */ + public function getDateType() + { + return $this->datetype; + } + + /** + * Returns formatter's last error code. Always returns the U_ZERO_ERROR class constant value. + * + * @return int The error code from last formatter call + * + * @see http://www.php.net/manual/en/intldateformatter.geterrorcode.php + */ + public function getErrorCode() + { + return $this->errorCode; + } + + /** + * Returns formatter's last error message. Always returns the U_ZERO_ERROR_MESSAGE class constant value. + * + * @return string The error message from last formatter call + * + * @see http://www.php.net/manual/en/intldateformatter.geterrormessage.php + */ + public function getErrorMessage() + { + return $this->errorMessage; + } + + /** + * Returns the formatter's locale. + * + * @param int $type Not supported. The locale name type to return (Locale::VALID_LOCALE or Locale::ACTUAL_LOCALE) + * + * @return string The locale used to create the formatter. Currently always + * returns "en". + * + * @see http://www.php.net/manual/en/intldateformatter.getlocale.php + */ + public function getLocale($type = Locale::ACTUAL_LOCALE) + { + return 'en'; + } + + /** + * Returns the formatter's pattern. + * + * @return string The pattern string used by the formatter + * + * @see http://www.php.net/manual/en/intldateformatter.getpattern.php + */ + public function getPattern() + { + return $this->pattern; + } + + /** + * Returns the formatter's time type. + * + * @return string The time type used by the formatter + * + * @see http://www.php.net/manual/en/intldateformatter.gettimetype.php + */ + public function getTimeType() + { + return $this->timetype; + } + + /** + * Returns the formatter's timezone identifier. + * + * @return string The timezone identifier used by the formatter + * + * @see http://www.php.net/manual/en/intldateformatter.gettimezoneid.php + */ + public function getTimeZoneId() + { + if (!$this->uninitializedTimeZoneId) { + return $this->timeZoneId; + } + + return date_default_timezone_get(); + } + + /** + * Not supported. Returns the formatter's timezone. + * + * @return mixed The timezone used by the formatter + * + * @see http://www.php.net/manual/en/intldateformatter.gettimezone.php + * + * @throws MethodNotImplementedException + */ + public function getTimeZone() + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Returns whether the formatter is lenient. + * + * @return bool Currently always returns false + * + * @see http://www.php.net/manual/en/intldateformatter.islenient.php + * + * @throws MethodNotImplementedException + */ + public function isLenient() + { + return false; + } + + /** + * Not supported. Parse string to a field-based time value. + * + * @param string $value String to convert to a time value + * @param int $position Position at which to start the parsing in $value (zero-based) + * If no error occurs before $value is consumed, $parse_pos will + * contain -1 otherwise it will contain the position at which parsing + * ended. If $parse_pos > strlen($value), the parse fails immediately. + * + * @return string Localtime compatible array of integers: contains 24 hour clock value in tm_hour field + * + * @see http://www.php.net/manual/en/intldateformatter.localtime.php + * + * @throws MethodNotImplementedException + */ + public function localtime($value, &$position = 0) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Parse string to a timestamp value. + * + * @param string $value String to convert to a time value + * @param int $position Not supported. Position at which to start the parsing in $value (zero-based) + * If no error occurs before $value is consumed, $parse_pos will + * contain -1 otherwise it will contain the position at which parsing + * ended. If $parse_pos > strlen($value), the parse fails immediately. + * + * @return string Parsed value as a timestamp + * + * @see http://www.php.net/manual/en/intldateformatter.parse.php + * + * @throws MethodArgumentNotImplementedException When $position different than null, behavior not implemented + */ + public function parse($value, &$position = null) + { + // We don't calculate the position when parsing the value + if (null !== $position) { + throw new MethodArgumentNotImplementedException(__METHOD__, 'position'); + } + + $dateTime = $this->createDateTime(0); + $transformer = new FullTransformer($this->getPattern(), $this->getTimeZoneId()); + + $timestamp = $transformer->parse($dateTime, $value); + + // behave like the intl extension. FullTransformer::parse() set the proper error + $this->errorCode = IntlGlobals::getErrorCode(); + $this->errorMessage = IntlGlobals::getErrorMessage(); + + return $timestamp; + } + + /** + * Not supported. Set the formatter's calendar. + * + * @param string $calendar The calendar to use. Default is IntlDateFormatter::GREGORIAN + * + * @return bool true on success or false on failure + * + * @see http://www.php.net/manual/en/intldateformatter.setcalendar.php + * + * @throws MethodNotImplementedException + */ + public function setCalendar($calendar) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Set the leniency of the parser. + * + * Define if the parser is strict or lenient in interpreting inputs that do not match the pattern + * exactly. Enabling lenient parsing allows the parser to accept otherwise flawed date or time + * patterns, parsing as much as possible to obtain a value. Extra space, unrecognized tokens, or + * invalid values ("February 30th") are not accepted. + * + * @param bool $lenient Sets whether the parser is lenient or not. Currently + * only false (strict) is supported. + * + * @return bool true on success or false on failure + * + * @see http://www.php.net/manual/en/intldateformatter.setlenient.php + * + * @throws MethodArgumentValueNotImplementedException When $lenient is true + */ + public function setLenient($lenient) + { + if ($lenient) { + throw new MethodArgumentValueNotImplementedException(__METHOD__, 'lenient', $lenient, 'Only the strict parser is supported'); + } + + return true; + } + + /** + * Set the formatter's pattern. + * + * @param string $pattern A pattern string in conformance with the ICU IntlDateFormatter documentation + * + * @return bool true on success or false on failure + * + * @see http://www.php.net/manual/en/intldateformatter.setpattern.php + * @see http://userguide.icu-project.org/formatparse/datetime + */ + public function setPattern($pattern) + { + if (null === $pattern) { + $pattern = $this->getDefaultPattern(); + } + + $this->pattern = $pattern; + + return true; + } + + /** + * Set the formatter's timezone identifier. + * + * @param string $timeZoneId The time zone ID string of the time zone to use + * If NULL or the empty string, the default time zone for the + * runtime is used. + * + * @return bool true on success or false on failure + * + * @see http://www.php.net/manual/en/intldateformatter.settimezoneid.php + */ + public function setTimeZoneId($timeZoneId) + { + if (null === $timeZoneId) { + $timeZoneId = date_default_timezone_get(); + + $this->uninitializedTimeZoneId = true; + } + + // Backup original passed time zone + $timeZone = $timeZoneId; + + // Get an Etc/GMT time zone that is accepted for \DateTimeZone + if ('GMT' !== $timeZoneId && 0 === strpos($timeZoneId, 'GMT')) { + try { + $timeZoneId = DateFormat\TimeZoneTransformer::getEtcTimeZoneId($timeZoneId); + } catch (\InvalidArgumentException $e) { + // Does nothing, will fallback to UTC + } + } + + try { + $this->dateTimeZone = new \DateTimeZone($timeZoneId); + if ('GMT' !== $timeZoneId && $this->dateTimeZone->getName() !== $timeZoneId) { + $timeZone = $this->getTimeZoneId(); + } + } catch (\Exception $e) { + $timeZoneId = $timeZone = $this->getTimeZoneId(); + $this->dateTimeZone = new \DateTimeZone($timeZoneId); + } + + $this->timeZoneId = $timeZone; + + return true; + } + + /** + * This method was added in PHP 5.5 as replacement for `setTimeZoneId()`. + * + * @param mixed $timeZone + * + * @return bool true on success or false on failure + * + * @see http://www.php.net/manual/en/intldateformatter.settimezone.php + */ + public function setTimeZone($timeZone) + { + if ($timeZone instanceof \IntlTimeZone) { + $timeZone = $timeZone->getID(); + } + + if ($timeZone instanceof \DateTimeZone) { + $timeZone = $timeZone->getName(); + + // DateTimeZone returns the GMT offset timezones without the leading GMT, while our parsing requires it. + if (!empty($timeZone) && ('+' === $timeZone[0] || '-' === $timeZone[0])) { + $timeZone = 'GMT'.$timeZone; + } + } + + return $this->setTimeZoneId($timeZone); + } + + /** + * Create and returns a DateTime object with the specified timestamp and with the + * current time zone. + * + * @param int $timestamp + * + * @return \DateTime + */ + protected function createDateTime($timestamp) + { + $dateTime = new \DateTime(); + $dateTime->setTimestamp($timestamp); + $dateTime->setTimezone($this->dateTimeZone); + + return $dateTime; + } + + /** + * Returns a pattern string based in the datetype and timetype values. + * + * @return string + */ + protected function getDefaultPattern() + { + $patternParts = array(); + if (self::NONE !== $this->datetype) { + $patternParts[] = $this->defaultDateFormats[$this->datetype]; + } + if (self::NONE !== $this->timetype) { + $patternParts[] = $this->defaultTimeFormats[$this->timetype]; + } + + return implode(', ', $patternParts); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/BadMethodCallException.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/BadMethodCallException.php new file mode 100644 index 0000000000000000000000000000000000000000..ca79729f098a1d8c806f7cdf029a0f16b2b76349 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/BadMethodCallException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Exception; + +/** + * Base BadMethodCallException for the Intl component. + * + * @author Bernhard Schussek + */ +class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..4fc076cafbaa9f05350909b9d1cd4c9ff388998e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Exception; + +/** + * Base ExceptionInterface for the Intl component. + * + * @author Bernhard Schussek + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..10f69ee34d650bf9017fca417e72655a615ca461 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Exception; + +/** + * InvalidArgumentException for the Intl component. + * + * @author Bernhard Schussek + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/MethodArgumentNotImplementedException.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/MethodArgumentNotImplementedException.php new file mode 100644 index 0000000000000000000000000000000000000000..3a86da888088e393d79d1a34a81070d546c15853 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/MethodArgumentNotImplementedException.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\Intl\Exception; + +/** + * @author Eriksen Costa + */ +class MethodArgumentNotImplementedException extends NotImplementedException +{ + /** + * Constructor. + * + * @param string $methodName The method name that raised the exception + * @param string $argName The argument name that is not implemented + */ + public function __construct($methodName, $argName) + { + $message = sprintf('The %s() method\'s argument $%s behavior is not implemented.', $methodName, $argName); + parent::__construct($message); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/MethodArgumentValueNotImplementedException.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/MethodArgumentValueNotImplementedException.php new file mode 100644 index 0000000000000000000000000000000000000000..3193483dfe88a00a6cd996d8d9c13df6c3e8ec4d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/MethodArgumentValueNotImplementedException.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Exception; + +/** + * @author Eriksen Costa + */ +class MethodArgumentValueNotImplementedException extends NotImplementedException +{ + /** + * Constructor. + * + * @param string $methodName The method name that raised the exception + * @param string $argName The argument name + * @param string $argValue The argument value that is not implemented + * @param string $additionalMessage An optional additional message to append to the exception message + */ + public function __construct($methodName, $argName, $argValue, $additionalMessage = '') + { + $message = sprintf( + 'The %s() method\'s argument $%s value %s behavior is not implemented.%s', + $methodName, + $argName, + var_export($argValue, true), + $additionalMessage !== '' ? ' '.$additionalMessage.'. ' : '' + ); + + parent::__construct($message); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/MethodNotImplementedException.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/MethodNotImplementedException.php new file mode 100644 index 0000000000000000000000000000000000000000..97b7986bdee92b17fd7b33bc8a121bc9212cdcd9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/MethodNotImplementedException.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Exception; + +/** + * @author Eriksen Costa + */ +class MethodNotImplementedException extends NotImplementedException +{ + /** + * Constructor. + * + * @param string $methodName The name of the method + */ + public function __construct($methodName) + { + parent::__construct(sprintf('The %s() is not implemented.', $methodName)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/MissingResourceException.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/MissingResourceException.php new file mode 100644 index 0000000000000000000000000000000000000000..e2eb3f210e75141df3b4608da8573129c431efef --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/MissingResourceException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Exception; + +/** + * Thrown when an invalid entry of a resource bundle was requested. + * + * @author Bernhard Schussek + */ +class MissingResourceException extends RuntimeException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/NotImplementedException.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/NotImplementedException.php new file mode 100644 index 0000000000000000000000000000000000000000..cf919fecad22ef0995442ff3663fe8db030b0661 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/NotImplementedException.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\Component\Intl\Exception; + +/** + * Base exception class for not implemented behaviors of the intl extension in the Locale component. + * + * @author Eriksen Costa + */ +class NotImplementedException extends RuntimeException +{ + const INTL_INSTALL_MESSAGE = 'Please install the "intl" extension for full localization capabilities.'; + + /** + * Constructor. + * + * @param string $message The exception message. A note to install the intl extension is appended to this string + */ + public function __construct($message) + { + parent::__construct($message.' '.self::INTL_INSTALL_MESSAGE); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/OutOfBoundsException.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/OutOfBoundsException.php new file mode 100644 index 0000000000000000000000000000000000000000..2727141d2bdbaca7a1eb14f20c722e6c54a7c0b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/OutOfBoundsException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Exception; + +/** + * Base OutOfBoundsException for the Intl component. + * + * @author Bernhard Schussek + */ +class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/ResourceBundleNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/ResourceBundleNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..59da5ec0d53d5fe8edc90c45915ea481e167b887 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/ResourceBundleNotFoundException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Exception; + +/** + * @author Bernhard Schussek + */ +class ResourceBundleNotFoundException extends RuntimeException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/RuntimeException.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/RuntimeException.php new file mode 100644 index 0000000000000000000000000000000000000000..989371427fff31e9d2012bbf0d3ddbb002a0d622 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/RuntimeException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Exception; + +/** + * RuntimeException for the Intl component. + * + * @author Bernhard Schussek + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/UnexpectedTypeException.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/UnexpectedTypeException.php new file mode 100644 index 0000000000000000000000000000000000000000..645d4926dad151c9042558248396ec73d70f8e14 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Exception/UnexpectedTypeException.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Exception; + +/** + * Thrown when a method argument had an unexpected type. + * + * @author Bernhard Schussek + */ +class UnexpectedTypeException extends InvalidArgumentException +{ + public function __construct($value, $expectedType) + { + parent::__construct(sprintf('Expected argument of type "%s", "%s" given', $expectedType, is_object($value) ? get_class($value) : gettype($value))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Globals/IntlGlobals.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Globals/IntlGlobals.php new file mode 100644 index 0000000000000000000000000000000000000000..ec2ee174699c55baede1bbb33d5608ce09613540 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Globals/IntlGlobals.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Globals; + +/** + * Provides fake static versions of the global functions in the intl extension. + * + * @author Bernhard Schussek + * + * @internal + */ +abstract class IntlGlobals +{ + /** + * Indicates that no error occurred. + * + * @var int + */ + const U_ZERO_ERROR = 0; + + /** + * Indicates that an invalid argument was passed. + * + * @var int + */ + const U_ILLEGAL_ARGUMENT_ERROR = 1; + + /** + * Indicates that the parse() operation failed. + * + * @var int + */ + const U_PARSE_ERROR = 9; + + /** + * All known error codes. + * + * @var array + */ + private static $errorCodes = array( + self::U_ZERO_ERROR => 'U_ZERO_ERROR', + self::U_ILLEGAL_ARGUMENT_ERROR => 'U_ILLEGAL_ARGUMENT_ERROR', + self::U_PARSE_ERROR => 'U_PARSE_ERROR', + ); + + /** + * The error code of the last operation. + * + * @var int + */ + private static $errorCode = self::U_ZERO_ERROR; + + /** + * The error code of the last operation. + * + * @var int + */ + private static $errorMessage = 'U_ZERO_ERROR'; + + /** + * Returns whether the error code indicates a failure. + * + * @param int $errorCode The error code returned by IntlGlobals::getErrorCode() + * + * @return bool + */ + public static function isFailure($errorCode) + { + return isset(self::$errorCodes[$errorCode]) + && $errorCode > self::U_ZERO_ERROR; + } + + /** + * Returns the error code of the last operation. + * + * Returns IntlGlobals::U_ZERO_ERROR if no error occurred. + * + * @return int + */ + public static function getErrorCode() + { + return self::$errorCode; + } + + /** + * Returns the error message of the last operation. + * + * Returns "U_ZERO_ERROR" if no error occurred. + * + * @return string + */ + public static function getErrorMessage() + { + return self::$errorMessage; + } + + /** + * Returns the symbolic name for a given error code. + * + * @param int $code The error code returned by IntlGlobals::getErrorCode() + * + * @return string + */ + public static function getErrorName($code) + { + if (isset(self::$errorCodes[$code])) { + return self::$errorCodes[$code]; + } + + return '[BOGUS UErrorCode]'; + } + + /** + * Sets the current error. + * + * @param int $code One of the error constants in this class + * @param string $message The ICU class error message + * + * @throws \InvalidArgumentException If the code is not one of the error constants in this class + */ + public static function setError($code, $message = '') + { + if (!isset(self::$errorCodes[$code])) { + throw new \InvalidArgumentException(sprintf('No such error code: "%s"', $code)); + } + + self::$errorMessage = $message ? sprintf('%s: %s', $message, self::$errorCodes[$code]) : self::$errorCodes[$code]; + self::$errorCode = $code; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Intl.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Intl.php new file mode 100644 index 0000000000000000000000000000000000000000..08e2c62e5ca4535ca41c7d69e1b933765e13bd60 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Intl.php @@ -0,0 +1,273 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl; + +use Symfony\Component\Intl\Data\Bundle\Reader\JsonBundleReader; +use Symfony\Component\Intl\Data\Bundle\Reader\BufferedBundleReader; +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReader; +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; +use Symfony\Component\Intl\Data\Provider\ScriptDataProvider; +use Symfony\Component\Intl\ResourceBundle\CurrencyBundle; +use Symfony\Component\Intl\ResourceBundle\CurrencyBundleInterface; +use Symfony\Component\Intl\ResourceBundle\LanguageBundle; +use Symfony\Component\Intl\ResourceBundle\LanguageBundleInterface; +use Symfony\Component\Intl\ResourceBundle\LocaleBundle; +use Symfony\Component\Intl\ResourceBundle\LocaleBundleInterface; +use Symfony\Component\Intl\ResourceBundle\RegionBundle; +use Symfony\Component\Intl\ResourceBundle\RegionBundleInterface; + +/** + * Gives access to internationalization data. + * + * @author Bernhard Schussek + */ +final class Intl +{ + /** + * The number of resource bundles to buffer. Loading the same resource + * bundle for n locales takes up n spots in the buffer. + */ + const BUFFER_SIZE = 10; + + /** + * The directory name of the currency data. + */ + const CURRENCY_DIR = 'currencies'; + + /** + * The directory name of the language data. + */ + const LANGUAGE_DIR = 'languages'; + + /** + * The directory name of the script data. + */ + const SCRIPT_DIR = 'scripts'; + + /** + * The directory name of the locale data. + */ + const LOCALE_DIR = 'locales'; + + /** + * The directory name of the region data. + */ + const REGION_DIR = 'regions'; + + /** + * @var ResourceBundle\CurrencyBundleInterface + */ + private static $currencyBundle; + + /** + * @var ResourceBundle\LanguageBundleInterface + */ + private static $languageBundle; + + /** + * @var ResourceBundle\LocaleBundleInterface + */ + private static $localeBundle; + + /** + * @var ResourceBundle\RegionBundleInterface + */ + private static $regionBundle; + + /** + * @var string|bool|null + */ + private static $icuVersion = false; + + /** + * @var string + */ + private static $icuDataVersion = false; + + /** + * @var BundleEntryReaderInterface + */ + private static $entryReader; + + /** + * Returns whether the intl extension is installed. + * + * @return bool Returns true if the intl extension is installed, false otherwise + */ + public static function isExtensionLoaded() + { + return class_exists('\ResourceBundle'); + } + + /** + * Returns the bundle containing currency information. + * + * @return CurrencyBundleInterface The currency resource bundle + */ + public static function getCurrencyBundle() + { + if (null === self::$currencyBundle) { + self::$currencyBundle = new CurrencyBundle( + self::getDataDirectory().'/'.self::CURRENCY_DIR, + self::getEntryReader(), + self::getLocaleBundle() + ); + } + + return self::$currencyBundle; + } + + /** + * Returns the bundle containing language information. + * + * @return LanguageBundleInterface The language resource bundle + */ + public static function getLanguageBundle() + { + if (null === self::$languageBundle) { + self::$languageBundle = new LanguageBundle( + self::getDataDirectory().'/'.self::LANGUAGE_DIR, + self::getEntryReader(), + self::getLocaleBundle(), + new ScriptDataProvider( + self::getDataDirectory().'/'.self::SCRIPT_DIR, + self::getEntryReader() + ) + ); + } + + return self::$languageBundle; + } + + /** + * Returns the bundle containing locale information. + * + * @return LocaleBundleInterface The locale resource bundle + */ + public static function getLocaleBundle() + { + if (null === self::$localeBundle) { + self::$localeBundle = new LocaleBundle( + self::getDataDirectory().'/'.self::LOCALE_DIR, + self::getEntryReader() + ); + } + + return self::$localeBundle; + } + + /** + * Returns the bundle containing region information. + * + * @return RegionBundleInterface The region resource bundle + */ + public static function getRegionBundle() + { + if (null === self::$regionBundle) { + self::$regionBundle = new RegionBundle( + self::getDataDirectory().'/'.self::REGION_DIR, + self::getEntryReader(), + self::getLocaleBundle() + ); + } + + return self::$regionBundle; + } + + /** + * Returns the version of the installed ICU library. + * + * @return null|string The ICU version or NULL if it could not be determined + */ + public static function getIcuVersion() + { + if (false === self::$icuVersion) { + if (!self::isExtensionLoaded()) { + self::$icuVersion = self::getIcuStubVersion(); + } elseif (defined('INTL_ICU_VERSION')) { + self::$icuVersion = INTL_ICU_VERSION; + } else { + try { + $reflector = new \ReflectionExtension('intl'); + ob_start(); + $reflector->info(); + $output = strip_tags(ob_get_clean()); + preg_match('/^ICU version (?:=>)?(.*)$/m', $output, $matches); + + self::$icuVersion = trim($matches[1]); + } catch (\ReflectionException $e) { + self::$icuVersion = null; + } + } + } + + return self::$icuVersion; + } + + /** + * Returns the version of the installed ICU data. + * + * @return string The version of the installed ICU data + */ + public static function getIcuDataVersion() + { + if (false === self::$icuDataVersion) { + self::$icuDataVersion = trim(file_get_contents(self::getDataDirectory().'/version.txt')); + } + + return self::$icuDataVersion; + } + + /** + * Returns the ICU version that the stub classes mimic. + * + * @return string The ICU version of the stub classes + */ + public static function getIcuStubVersion() + { + return '58.2'; + } + + /** + * Returns the absolute path to the data directory. + * + * @return string The absolute path to the data directory + */ + public static function getDataDirectory() + { + return __DIR__.'/Resources/data'; + } + + /** + * Returns the cached bundle entry reader. + * + * @return BundleEntryReaderInterface The bundle entry reader + */ + private static function getEntryReader() + { + if (null === self::$entryReader) { + self::$entryReader = new BundleEntryReader(new BufferedBundleReader( + new JsonBundleReader(), + self::BUFFER_SIZE + )); + } + + return self::$entryReader; + } + + /** + * This class must not be instantiated. + */ + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Intl/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Intl/Locale.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Locale.php new file mode 100644 index 0000000000000000000000000000000000000000..ee09bd263cd42e804005946f139169f0da7838d1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Locale.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\Component\Intl; + +/** + * Provides access to locale-related data. + * + * @author Bernhard Schussek + * + * @internal + */ +final class Locale extends \Locale +{ + /** + * @var string + */ + private static $defaultFallback = 'en'; + + /** + * Sets the default fallback locale. + * + * The default fallback locale is used as fallback for locales that have no + * fallback otherwise. + * + * @param string $locale The default fallback locale + * + * @see getFallback() + */ + public static function setDefaultFallback($locale) + { + self::$defaultFallback = $locale; + } + + /** + * Returns the default fallback locale. + * + * @return string The default fallback locale + * + * @see setDefaultFallback() + * @see getFallback() + */ + public static function getDefaultFallback() + { + return self::$defaultFallback; + } + + /** + * Returns the fallback locale for a given locale. + * + * For example, the fallback of "fr_FR" is "fr". The fallback of "fr" is + * the default fallback locale configured with {@link setDefaultFallback()}. + * The default fallback locale has no fallback. + * + * @param string $locale The ICU locale code to find the fallback for + * + * @return string|null The ICU locale code of the fallback locale, or null + * if no fallback exists + */ + public static function getFallback($locale) + { + if (false === $pos = strrpos($locale, '_')) { + if (self::$defaultFallback === $locale) { + return 'root'; + } + + // Don't return default fallback for "root", "meta" or others + // Normal locales have two or three letters + if (strlen($locale) < 4) { + return self::$defaultFallback; + } + + return; + } + + return substr($locale, 0, $pos); + } + + /** + * This class must not be instantiated. + */ + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Locale/Locale.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Locale/Locale.php new file mode 100644 index 0000000000000000000000000000000000000000..26087bafa4098c141257a2ed8b934b9d1fc3f2ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Locale/Locale.php @@ -0,0 +1,321 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Locale; + +use Symfony\Component\Intl\Exception\MethodNotImplementedException; + +/** + * Replacement for PHP's native {@link \Locale} class. + * + * The only method supported in this class is {@link getDefault}. This method + * will always return "en". All other methods will throw an exception when used. + * + * @author Eriksen Costa + * @author Bernhard Schussek + * + * @internal + */ +class Locale +{ + const DEFAULT_LOCALE = null; + + /* Locale method constants */ + const ACTUAL_LOCALE = 0; + const VALID_LOCALE = 1; + + /* Language tags constants */ + const LANG_TAG = 'language'; + const EXTLANG_TAG = 'extlang'; + const SCRIPT_TAG = 'script'; + const REGION_TAG = 'region'; + const VARIANT_TAG = 'variant'; + const GRANDFATHERED_LANG_TAG = 'grandfathered'; + const PRIVATE_TAG = 'private'; + + /** + * Not supported. Returns the best available locale based on HTTP "Accept-Language" header according to RFC 2616. + * + * @param string $header The string containing the "Accept-Language" header value + * + * @return string The corresponding locale code + * + * @see http://www.php.net/manual/en/locale.acceptfromhttp.php + * + * @throws MethodNotImplementedException + */ + public static function acceptFromHttp($header) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns a correctly ordered and delimited locale code. + * + * @param array $subtags A keyed array where the keys identify the particular locale code subtag + * + * @return string The corresponding locale code + * + * @see http://www.php.net/manual/en/locale.composelocale.php + * + * @throws MethodNotImplementedException + */ + public static function composeLocale(array $subtags) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Checks if a language tag filter matches with locale. + * + * @param string $langtag The language tag to check + * @param string $locale The language range to check against + * @param bool $canonicalize + * + * @return string The corresponding locale code + * + * @see http://www.php.net/manual/en/locale.filtermatches.php + * + * @throws MethodNotImplementedException + */ + public static function filterMatches($langtag, $locale, $canonicalize = false) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns the variants for the input locale. + * + * @param string $locale The locale to extract the variants from + * + * @return array The locale variants + * + * @see http://www.php.net/manual/en/locale.getallvariants.php + * + * @throws MethodNotImplementedException + */ + public static function getAllVariants($locale) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Returns the default locale. + * + * @return string The default locale code. Always returns 'en' + * + * @see http://www.php.net/manual/en/locale.getdefault.php + */ + public static function getDefault() + { + return 'en'; + } + + /** + * Not supported. Returns the localized display name for the locale language. + * + * @param string $locale The locale code to return the display language from + * @param string $inLocale Optional format locale code to use to display the language name + * + * @return string The localized language display name + * + * @see http://www.php.net/manual/en/locale.getdisplaylanguage.php + * + * @throws MethodNotImplementedException + */ + public static function getDisplayLanguage($locale, $inLocale = null) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns the localized display name for the locale. + * + * @param string $locale The locale code to return the display locale name from + * @param string $inLocale Optional format locale code to use to display the locale name + * + * @return string The localized locale display name + * + * @see http://www.php.net/manual/en/locale.getdisplayname.php + * + * @throws MethodNotImplementedException + */ + public static function getDisplayName($locale, $inLocale = null) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns the localized display name for the locale region. + * + * @param string $locale The locale code to return the display region from + * @param string $inLocale Optional format locale code to use to display the region name + * + * @return string The localized region display name + * + * @see http://www.php.net/manual/en/locale.getdisplayregion.php + * + * @throws MethodNotImplementedException + */ + public static function getDisplayRegion($locale, $inLocale = null) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns the localized display name for the locale script. + * + * @param string $locale The locale code to return the display script from + * @param string $inLocale Optional format locale code to use to display the script name + * + * @return string The localized script display name + * + * @see http://www.php.net/manual/en/locale.getdisplayscript.php + * + * @throws MethodNotImplementedException + */ + public static function getDisplayScript($locale, $inLocale = null) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns the localized display name for the locale variant. + * + * @param string $locale The locale code to return the display variant from + * @param string $inLocale Optional format locale code to use to display the variant name + * + * @return string The localized variant display name + * + * @see http://www.php.net/manual/en/locale.getdisplayvariant.php + * + * @throws MethodNotImplementedException + */ + public static function getDisplayVariant($locale, $inLocale = null) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns the keywords for the locale. + * + * @param string $locale The locale code to extract the keywords from + * + * @return array Associative array with the extracted variants + * + * @see http://www.php.net/manual/en/locale.getkeywords.php + * + * @throws MethodNotImplementedException + */ + public static function getKeywords($locale) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns the primary language for the locale. + * + * @param string $locale The locale code to extract the language code from + * + * @return string|null The extracted language code or null in case of error + * + * @see http://www.php.net/manual/en/locale.getprimarylanguage.php + * + * @throws MethodNotImplementedException + */ + public static function getPrimaryLanguage($locale) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns the region for the locale. + * + * @param string $locale The locale code to extract the region code from + * + * @return string|null The extracted region code or null if not present + * + * @see http://www.php.net/manual/en/locale.getregion.php + * + * @throws MethodNotImplementedException + */ + public static function getRegion($locale) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns the script for the locale. + * + * @param string $locale The locale code to extract the script code from + * + * @return string|null The extracted script code or null if not present + * + * @see http://www.php.net/manual/en/locale.getscript.php + * + * @throws MethodNotImplementedException + */ + public static function getScript($locale) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns the closest language tag for the locale. + * + * @param array $langtag A list of the language tags to compare to locale + * @param string $locale The locale to use as the language range when matching + * @param bool $canonicalize If true, the arguments will be converted to canonical form before matching + * @param string $default The locale to use if no match is found + * + * @see http://www.php.net/manual/en/locale.lookup.php + * + * @throws MethodNotImplementedException + */ + public static function lookup(array $langtag, $locale, $canonicalize = false, $default = null) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns an associative array of locale identifier subtags. + * + * @param string $locale The locale code to extract the subtag array from + * + * @return array Associative array with the extracted subtags + * + * @see http://www.php.net/manual/en/locale.parselocale.php + * + * @throws MethodNotImplementedException + */ + public static function parseLocale($locale) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Sets the default runtime locale. + * + * @param string $locale The locale code + * + * @return bool true on success or false on failure + * + * @see http://www.php.net/manual/en/locale.setdefault.php + * + * @throws MethodNotImplementedException + */ + public static function setDefault($locale) + { + if ('en' !== $locale) { + throw new MethodNotImplementedException(__METHOD__); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..3ded2d07f2faf77b1a1d29faa7cfe83a21ab93c1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php @@ -0,0 +1,904 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\NumberFormatter; + +use Symfony\Component\Intl\Exception\NotImplementedException; +use Symfony\Component\Intl\Exception\MethodNotImplementedException; +use Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException; +use Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException; +use Symfony\Component\Intl\Globals\IntlGlobals; +use Symfony\Component\Intl\Intl; +use Symfony\Component\Intl\Locale\Locale; + +/** + * Replacement for PHP's native {@link \NumberFormatter} class. + * + * The only methods currently supported in this class are: + * + * - {@link __construct} + * - {@link create} + * - {@link formatCurrency} + * - {@link format} + * - {@link getAttribute} + * - {@link getErrorCode} + * - {@link getErrorMessage} + * - {@link getLocale} + * - {@link parse} + * - {@link setAttribute} + * + * @author Eriksen Costa + * @author Bernhard Schussek + * + * @internal + */ +class NumberFormatter +{ + /* Format style constants */ + const PATTERN_DECIMAL = 0; + const DECIMAL = 1; + const CURRENCY = 2; + const PERCENT = 3; + const SCIENTIFIC = 4; + const SPELLOUT = 5; + const ORDINAL = 6; + const DURATION = 7; + const PATTERN_RULEBASED = 9; + const IGNORE = 0; + const DEFAULT_STYLE = 1; + + /* Format type constants */ + const TYPE_DEFAULT = 0; + const TYPE_INT32 = 1; + const TYPE_INT64 = 2; + const TYPE_DOUBLE = 3; + const TYPE_CURRENCY = 4; + + /* Numeric attribute constants */ + const PARSE_INT_ONLY = 0; + const GROUPING_USED = 1; + const DECIMAL_ALWAYS_SHOWN = 2; + const MAX_INTEGER_DIGITS = 3; + const MIN_INTEGER_DIGITS = 4; + const INTEGER_DIGITS = 5; + const MAX_FRACTION_DIGITS = 6; + const MIN_FRACTION_DIGITS = 7; + const FRACTION_DIGITS = 8; + const MULTIPLIER = 9; + const GROUPING_SIZE = 10; + const ROUNDING_MODE = 11; + const ROUNDING_INCREMENT = 12; + const FORMAT_WIDTH = 13; + const PADDING_POSITION = 14; + const SECONDARY_GROUPING_SIZE = 15; + const SIGNIFICANT_DIGITS_USED = 16; + const MIN_SIGNIFICANT_DIGITS = 17; + const MAX_SIGNIFICANT_DIGITS = 18; + const LENIENT_PARSE = 19; + + /* Text attribute constants */ + const POSITIVE_PREFIX = 0; + const POSITIVE_SUFFIX = 1; + const NEGATIVE_PREFIX = 2; + const NEGATIVE_SUFFIX = 3; + const PADDING_CHARACTER = 4; + const CURRENCY_CODE = 5; + const DEFAULT_RULESET = 6; + const PUBLIC_RULESETS = 7; + + /* Format symbol constants */ + const DECIMAL_SEPARATOR_SYMBOL = 0; + const GROUPING_SEPARATOR_SYMBOL = 1; + const PATTERN_SEPARATOR_SYMBOL = 2; + const PERCENT_SYMBOL = 3; + const ZERO_DIGIT_SYMBOL = 4; + const DIGIT_SYMBOL = 5; + const MINUS_SIGN_SYMBOL = 6; + const PLUS_SIGN_SYMBOL = 7; + const CURRENCY_SYMBOL = 8; + const INTL_CURRENCY_SYMBOL = 9; + const MONETARY_SEPARATOR_SYMBOL = 10; + const EXPONENTIAL_SYMBOL = 11; + const PERMILL_SYMBOL = 12; + const PAD_ESCAPE_SYMBOL = 13; + const INFINITY_SYMBOL = 14; + const NAN_SYMBOL = 15; + const SIGNIFICANT_DIGIT_SYMBOL = 16; + const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17; + + /* Rounding mode values used by NumberFormatter::setAttribute() with NumberFormatter::ROUNDING_MODE attribute */ + const ROUND_CEILING = 0; + const ROUND_FLOOR = 1; + const ROUND_DOWN = 2; + const ROUND_UP = 3; + const ROUND_HALFEVEN = 4; + const ROUND_HALFDOWN = 5; + const ROUND_HALFUP = 6; + + /* Pad position values used by NumberFormatter::setAttribute() with NumberFormatter::PADDING_POSITION attribute */ + const PAD_BEFORE_PREFIX = 0; + const PAD_AFTER_PREFIX = 1; + const PAD_BEFORE_SUFFIX = 2; + const PAD_AFTER_SUFFIX = 3; + + /** + * The error code from the last operation. + * + * @var int + */ + protected $errorCode = IntlGlobals::U_ZERO_ERROR; + + /** + * The error message from the last operation. + * + * @var string + */ + protected $errorMessage = 'U_ZERO_ERROR'; + + /** + * @var int + */ + private $style; + + /** + * Default values for the en locale. + * + * @var array + */ + private $attributes = array( + self::FRACTION_DIGITS => 0, + self::GROUPING_USED => 1, + self::ROUNDING_MODE => self::ROUND_HALFEVEN, + ); + + /** + * Holds the initialized attributes code. + * + * @var array + */ + private $initializedAttributes = array(); + + /** + * The supported styles to the constructor $styles argument. + * + * @var array + */ + private static $supportedStyles = array( + 'CURRENCY' => self::CURRENCY, + 'DECIMAL' => self::DECIMAL, + ); + + /** + * Supported attributes to the setAttribute() $attr argument. + * + * @var array + */ + private static $supportedAttributes = array( + 'FRACTION_DIGITS' => self::FRACTION_DIGITS, + 'GROUPING_USED' => self::GROUPING_USED, + 'ROUNDING_MODE' => self::ROUNDING_MODE, + ); + + /** + * The available rounding modes for setAttribute() usage with + * NumberFormatter::ROUNDING_MODE. NumberFormatter::ROUND_DOWN + * and NumberFormatter::ROUND_UP does not have a PHP only equivalent. + * + * @var array + */ + private static $roundingModes = array( + 'ROUND_HALFEVEN' => self::ROUND_HALFEVEN, + 'ROUND_HALFDOWN' => self::ROUND_HALFDOWN, + 'ROUND_HALFUP' => self::ROUND_HALFUP, + 'ROUND_CEILING' => self::ROUND_CEILING, + 'ROUND_FLOOR' => self::ROUND_FLOOR, + 'ROUND_DOWN' => self::ROUND_DOWN, + 'ROUND_UP' => self::ROUND_UP, + ); + + /** + * The mapping between NumberFormatter rounding modes to the available + * modes in PHP's round() function. + * + * @see http://www.php.net/manual/en/function.round.php + * + * @var array + */ + private static $phpRoundingMap = array( + self::ROUND_HALFDOWN => \PHP_ROUND_HALF_DOWN, + self::ROUND_HALFEVEN => \PHP_ROUND_HALF_EVEN, + self::ROUND_HALFUP => \PHP_ROUND_HALF_UP, + ); + + /** + * The list of supported rounding modes which aren't available modes in + * PHP's round() function, but there's an equivalent. Keys are rounding + * modes, values does not matter. + * + * @var array + */ + private static $customRoundingList = array( + self::ROUND_CEILING => true, + self::ROUND_FLOOR => true, + self::ROUND_DOWN => true, + self::ROUND_UP => true, + ); + + /** + * The maximum value of the integer type in 32 bit platforms. + * + * @var int + */ + private static $int32Max = 2147483647; + + /** + * The maximum value of the integer type in 64 bit platforms. + * + * @var int|float + */ + private static $int64Max = 9223372036854775807; + + private static $enSymbols = array( + self::DECIMAL => array('.', ',', ';', '%', '0', '#', '-', '+', '¤', '¤¤', '.', 'E', '‰', '*', '∞', 'NaN', '@', ','), + self::CURRENCY => array('.', ',', ';', '%', '0', '#', '-', '+', '¤', '¤¤', '.', 'E', '‰', '*', '∞', 'NaN', '@', ','), + ); + + private static $enTextAttributes = array( + self::DECIMAL => array('', '', '-', '', ' ', '', ''), + self::CURRENCY => array('¤', '', '-¤', '', ' ', ''), + ); + + /** + * Constructor. + * + * @param string $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") + * @param int $style Style of the formatting, one of the format style constants + * The only supported styles are NumberFormatter::DECIMAL + * and NumberFormatter::CURRENCY. + * @param string $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or + * NumberFormat::PATTERN_RULEBASED. It must conform to the syntax + * described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation + * + * @see http://www.php.net/manual/en/numberformatter.create.php + * @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details + * @see http://www.icu-project.org/apiref/icu4c/classRuleBasedNumberFormat.html#_details + * + * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed + * @throws MethodArgumentValueNotImplementedException When the $style is not supported + * @throws MethodArgumentNotImplementedException When the pattern value is different than null + */ + public function __construct($locale = 'en', $style = null, $pattern = null) + { + if ('en' !== $locale && null !== $locale) { + throw new MethodArgumentValueNotImplementedException(__METHOD__, 'locale', $locale, 'Only the locale "en" is supported'); + } + + if (!in_array($style, self::$supportedStyles)) { + $message = sprintf('The available styles are: %s.', implode(', ', array_keys(self::$supportedStyles))); + throw new MethodArgumentValueNotImplementedException(__METHOD__, 'style', $style, $message); + } + + if (null !== $pattern) { + throw new MethodArgumentNotImplementedException(__METHOD__, 'pattern'); + } + + $this->style = $style; + } + + /** + * Static constructor. + * + * @param string $locale The locale code. The only supported locale is "en" (or null using the default locale, i.e. "en") + * @param int $style Style of the formatting, one of the format style constants + * The only currently supported styles are NumberFormatter::DECIMAL + * and NumberFormatter::CURRENCY. + * @param string $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or + * NumberFormat::PATTERN_RULEBASED. It must conform to the syntax + * described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation + * + * @return self + * + * @see http://www.php.net/manual/en/numberformatter.create.php + * @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details + * @see http://www.icu-project.org/apiref/icu4c/classRuleBasedNumberFormat.html#_details + * + * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed + * @throws MethodArgumentValueNotImplementedException When the $style is not supported + * @throws MethodArgumentNotImplementedException When the pattern value is different than null + */ + public static function create($locale = 'en', $style = null, $pattern = null) + { + return new self($locale, $style, $pattern); + } + + /** + * Format a currency value. + * + * @param float $value The numeric currency value + * @param string $currency The 3-letter ISO 4217 currency code indicating the currency to use + * + * @return string The formatted currency value + * + * @see http://www.php.net/manual/en/numberformatter.formatcurrency.php + * @see https://en.wikipedia.org/wiki/ISO_4217#Active_codes + */ + public function formatCurrency($value, $currency) + { + if ($this->style == self::DECIMAL) { + return $this->format($value); + } + + $symbol = Intl::getCurrencyBundle()->getCurrencySymbol($currency, 'en'); + $fractionDigits = Intl::getCurrencyBundle()->getFractionDigits($currency); + + $value = $this->roundCurrency($value, $currency); + + $negative = false; + if (0 > $value) { + $negative = true; + $value *= -1; + } + + $value = $this->formatNumber($value, $fractionDigits); + + $ret = $symbol.$value; + + return $negative ? '-'.$ret : $ret; + } + + /** + * Format a number. + * + * @param number $value The value to format + * @param int $type Type of the formatting, one of the format type constants + * Only type NumberFormatter::TYPE_DEFAULT is currently supported. + * + * @return bool|string The formatted value or false on error + * + * @see http://www.php.net/manual/en/numberformatter.format.php + * + * @throws NotImplementedException If the method is called with the class $style 'CURRENCY' + * @throws MethodArgumentValueNotImplementedException If the $type is different than TYPE_DEFAULT + */ + public function format($value, $type = self::TYPE_DEFAULT) + { + // The original NumberFormatter does not support this format type + if ($type == self::TYPE_CURRENCY) { + trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING); + + return false; + } + + if ($this->style == self::CURRENCY) { + throw new NotImplementedException(sprintf( + '%s() method does not support the formatting of currencies (instance with CURRENCY style). %s', + __METHOD__, NotImplementedException::INTL_INSTALL_MESSAGE + )); + } + + // Only the default type is supported. + if ($type != self::TYPE_DEFAULT) { + throw new MethodArgumentValueNotImplementedException(__METHOD__, 'type', $type, 'Only TYPE_DEFAULT is supported'); + } + + $fractionDigits = $this->getAttribute(self::FRACTION_DIGITS); + + $value = $this->round($value, $fractionDigits); + $value = $this->formatNumber($value, $fractionDigits); + + // behave like the intl extension + $this->resetError(); + + return $value; + } + + /** + * Returns an attribute value. + * + * @param int $attr An attribute specifier, one of the numeric attribute constants + * + * @return bool|int The attribute value on success or false on error + * + * @see http://www.php.net/manual/en/numberformatter.getattribute.php + */ + public function getAttribute($attr) + { + return isset($this->attributes[$attr]) ? $this->attributes[$attr] : null; + } + + /** + * Returns formatter's last error code. Always returns the U_ZERO_ERROR class constant value. + * + * @return int The error code from last formatter call + * + * @see http://www.php.net/manual/en/numberformatter.geterrorcode.php + */ + public function getErrorCode() + { + return $this->errorCode; + } + + /** + * Returns formatter's last error message. Always returns the U_ZERO_ERROR_MESSAGE class constant value. + * + * @return string The error message from last formatter call + * + * @see http://www.php.net/manual/en/numberformatter.geterrormessage.php + */ + public function getErrorMessage() + { + return $this->errorMessage; + } + + /** + * Returns the formatter's locale. + * + * The parameter $type is currently ignored. + * + * @param int $type Not supported. The locale name type to return (Locale::VALID_LOCALE or Locale::ACTUAL_LOCALE) + * + * @return string The locale used to create the formatter. Currently always + * returns "en". + * + * @see http://www.php.net/manual/en/numberformatter.getlocale.php + */ + public function getLocale($type = Locale::ACTUAL_LOCALE) + { + return 'en'; + } + + /** + * Not supported. Returns the formatter's pattern. + * + * @return bool|string The pattern string used by the formatter or false on error + * + * @see http://www.php.net/manual/en/numberformatter.getpattern.php + * + * @throws MethodNotImplementedException + */ + public function getPattern() + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Returns a formatter symbol value. + * + * @param int $attr A symbol specifier, one of the format symbol constants + * + * @return bool|string The symbol value or false on error + * + * @see http://www.php.net/manual/en/numberformatter.getsymbol.php + */ + public function getSymbol($attr) + { + return array_key_exists($this->style, self::$enSymbols) && array_key_exists($attr, self::$enSymbols[$this->style]) ? self::$enSymbols[$this->style][$attr] : false; + } + + /** + * Not supported. Returns a formatter text attribute value. + * + * @param int $attr An attribute specifier, one of the text attribute constants + * + * @return bool|string The attribute value or false on error + * + * @see http://www.php.net/manual/en/numberformatter.gettextattribute.php + */ + public function getTextAttribute($attr) + { + return array_key_exists($this->style, self::$enTextAttributes) && array_key_exists($attr, self::$enTextAttributes[$this->style]) ? self::$enTextAttributes[$this->style][$attr] : false; + } + + /** + * Not supported. Parse a currency number. + * + * @param string $value The value to parse + * @param string $currency Parameter to receive the currency name (reference) + * @param int $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended + * + * @return bool|string The parsed numeric value of false on error + * + * @see http://www.php.net/manual/en/numberformatter.parsecurrency.php + * + * @throws MethodNotImplementedException + */ + public function parseCurrency($value, &$currency, &$position = null) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Parse a number. + * + * @param string $value The value to parse + * @param int $type Type of the formatting, one of the format type constants. NumberFormatter::TYPE_DOUBLE by default + * @param int $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended + * + * @return int|float|false The parsed value of false on error + * + * @see http://www.php.net/manual/en/numberformatter.parse.php + */ + public function parse($value, $type = self::TYPE_DOUBLE, &$position = 0) + { + if ($type == self::TYPE_DEFAULT || $type == self::TYPE_CURRENCY) { + trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING); + + return false; + } + + $groupSep = $this->getAttribute(self::GROUPING_USED) ? ',' : ''; + + // Any string before the numeric value causes error in the parsing + if (preg_match("/^-?(?:\.\d++|([\d{$groupSep}]++)(?:\.\d++)?)/", $value, $matches)) { + $value = $matches[0]; + $position = strlen($value); + if ($error = $groupSep && isset($matches[1]) && !preg_match('/^\d{1,3}+(?:(?:,\d{3})++|\d*+)$/', $matches[1])) { + $position -= strlen(preg_replace('/^\d{1,3}+(?:(?:,\d++)++|\d*+)/', '', $matches[1])); + } + } else { + $error = 1; + $position = 0; + } + + if ($error) { + IntlGlobals::setError(IntlGlobals::U_PARSE_ERROR, 'Number parsing failed'); + $this->errorCode = IntlGlobals::getErrorCode(); + $this->errorMessage = IntlGlobals::getErrorMessage(); + + return false; + } + + $value = str_replace(',', '', $value); + $value = $this->convertValueDataType($value, $type); + + // behave like the intl extension + $this->resetError(); + + return $value; + } + + /** + * Set an attribute. + * + * @param int $attr An attribute specifier, one of the numeric attribute constants + * The only currently supported attributes are NumberFormatter::FRACTION_DIGITS, + * NumberFormatter::GROUPING_USED and NumberFormatter::ROUNDING_MODE. + * @param int $value The attribute value + * + * @return bool true on success or false on failure + * + * @see http://www.php.net/manual/en/numberformatter.setattribute.php + * + * @throws MethodArgumentValueNotImplementedException When the $attr is not supported + * @throws MethodArgumentValueNotImplementedException When the $value is not supported + */ + public function setAttribute($attr, $value) + { + if (!in_array($attr, self::$supportedAttributes)) { + $message = sprintf( + 'The available attributes are: %s', + implode(', ', array_keys(self::$supportedAttributes)) + ); + + throw new MethodArgumentValueNotImplementedException(__METHOD__, 'attr', $value, $message); + } + + if (self::$supportedAttributes['ROUNDING_MODE'] == $attr && $this->isInvalidRoundingMode($value)) { + $message = sprintf( + 'The supported values for ROUNDING_MODE are: %s', + implode(', ', array_keys(self::$roundingModes)) + ); + + throw new MethodArgumentValueNotImplementedException(__METHOD__, 'attr', $value, $message); + } + + if (self::$supportedAttributes['GROUPING_USED'] == $attr) { + $value = $this->normalizeGroupingUsedValue($value); + } + + if (self::$supportedAttributes['FRACTION_DIGITS'] == $attr) { + $value = $this->normalizeFractionDigitsValue($value); + } + + $this->attributes[$attr] = $value; + $this->initializedAttributes[$attr] = true; + + return true; + } + + /** + * Not supported. Set the formatter's pattern. + * + * @param string $pattern A pattern string in conformance with the ICU DecimalFormat documentation + * + * @return bool true on success or false on failure + * + * @see http://www.php.net/manual/en/numberformatter.setpattern.php + * @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details + * + * @throws MethodNotImplementedException + */ + public function setPattern($pattern) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Set the formatter's symbol. + * + * @param int $attr A symbol specifier, one of the format symbol constants + * @param string $value The value for the symbol + * + * @return bool true on success or false on failure + * + * @see http://www.php.net/manual/en/numberformatter.setsymbol.php + * + * @throws MethodNotImplementedException + */ + public function setSymbol($attr, $value) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Not supported. Set a text attribute. + * + * @param int $attr An attribute specifier, one of the text attribute constants + * @param int $value The attribute value + * + * @return bool true on success or false on failure + * + * @see http://www.php.net/manual/en/numberformatter.settextattribute.php + * + * @throws MethodNotImplementedException + */ + public function setTextAttribute($attr, $value) + { + throw new MethodNotImplementedException(__METHOD__); + } + + /** + * Set the error to the default U_ZERO_ERROR. + */ + protected function resetError() + { + IntlGlobals::setError(IntlGlobals::U_ZERO_ERROR); + $this->errorCode = IntlGlobals::getErrorCode(); + $this->errorMessage = IntlGlobals::getErrorMessage(); + } + + /** + * Rounds a currency value, applying increment rounding if applicable. + * + * When a currency have a rounding increment, an extra round is made after the first one. The rounding factor is + * determined in the ICU data and is explained as of: + * + * "the rounding increment is given in units of 10^(-fraction_digits)" + * + * The only actual rounding data as of this writing, is CHF. + * + * @param float $value The numeric currency value + * @param string $currency The 3-letter ISO 4217 currency code indicating the currency to use + * + * @return string The rounded numeric currency value + * + * @see http://en.wikipedia.org/wiki/Swedish_rounding + * @see http://www.docjar.com/html/api/com/ibm/icu/util/Currency.java.html#1007 + */ + private function roundCurrency($value, $currency) + { + $fractionDigits = Intl::getCurrencyBundle()->getFractionDigits($currency); + $roundingIncrement = Intl::getCurrencyBundle()->getRoundingIncrement($currency); + + // Round with the formatter rounding mode + $value = $this->round($value, $fractionDigits); + + // Swiss rounding + if (0 < $roundingIncrement && 0 < $fractionDigits) { + $roundingFactor = $roundingIncrement / pow(10, $fractionDigits); + $value = round($value / $roundingFactor) * $roundingFactor; + } + + return $value; + } + + /** + * Rounds a value. + * + * @param int|float $value The value to round + * @param int $precision The number of decimal digits to round to + * + * @return int|float The rounded value + */ + private function round($value, $precision) + { + $precision = $this->getUninitializedPrecision($value, $precision); + + $roundingModeAttribute = $this->getAttribute(self::ROUNDING_MODE); + if (isset(self::$phpRoundingMap[$roundingModeAttribute])) { + $value = round($value, $precision, self::$phpRoundingMap[$roundingModeAttribute]); + } elseif (isset(self::$customRoundingList[$roundingModeAttribute])) { + $roundingCoef = pow(10, $precision); + $value *= $roundingCoef; + + switch ($roundingModeAttribute) { + case self::ROUND_CEILING: + $value = ceil($value); + break; + case self::ROUND_FLOOR: + $value = floor($value); + break; + case self::ROUND_UP: + $value = $value > 0 ? ceil($value) : floor($value); + break; + case self::ROUND_DOWN: + $value = $value > 0 ? floor($value) : ceil($value); + break; + } + + $value /= $roundingCoef; + } + + return $value; + } + + /** + * Formats a number. + * + * @param int|float $value The numeric value to format + * @param int $precision The number of decimal digits to use + * + * @return string The formatted number + */ + private function formatNumber($value, $precision) + { + $precision = $this->getUninitializedPrecision($value, $precision); + + return number_format($value, $precision, '.', $this->getAttribute(self::GROUPING_USED) ? ',' : ''); + } + + /** + * Returns the precision value if the DECIMAL style is being used and the FRACTION_DIGITS attribute is uninitialized. + * + * @param int|float $value The value to get the precision from if the FRACTION_DIGITS attribute is uninitialized + * @param int $precision The precision value to returns if the FRACTION_DIGITS attribute is initialized + * + * @return int The precision value + */ + private function getUninitializedPrecision($value, $precision) + { + if ($this->style == self::CURRENCY) { + return $precision; + } + + if (!$this->isInitializedAttribute(self::FRACTION_DIGITS)) { + preg_match('/.*\.(.*)/', (string) $value, $digits); + if (isset($digits[1])) { + $precision = strlen($digits[1]); + } + } + + return $precision; + } + + /** + * Check if the attribute is initialized (value set by client code). + * + * @param string $attr The attribute name + * + * @return bool true if the value was set by client, false otherwise + */ + private function isInitializedAttribute($attr) + { + return isset($this->initializedAttributes[$attr]); + } + + /** + * Returns the numeric value using the $type to convert to the right data type. + * + * @param mixed $value The value to be converted + * @param int $type The type to convert. Can be TYPE_DOUBLE (float) or TYPE_INT32 (int) + * + * @return int|float|false The converted value + */ + private function convertValueDataType($value, $type) + { + if ($type == self::TYPE_DOUBLE) { + $value = (float) $value; + } elseif ($type == self::TYPE_INT32) { + $value = $this->getInt32Value($value); + } elseif ($type == self::TYPE_INT64) { + $value = $this->getInt64Value($value); + } + + return $value; + } + + /** + * Convert the value data type to int or returns false if the value is out of the integer value range. + * + * @param mixed $value The value to be converted + * + * @return int|false The converted value + */ + private function getInt32Value($value) + { + if ($value > self::$int32Max || $value < -self::$int32Max - 1) { + return false; + } + + return (int) $value; + } + + /** + * Convert the value data type to int or returns false if the value is out of the integer value range. + * + * @param mixed $value The value to be converted + * + * @return int|float|false The converted value + */ + private function getInt64Value($value) + { + if ($value > self::$int64Max || $value < -self::$int64Max - 1) { + return false; + } + + if (PHP_INT_SIZE !== 8 && ($value > self::$int32Max || $value < -self::$int32Max - 1)) { + return (float) $value; + } + + return (int) $value; + } + + /** + * Check if the rounding mode is invalid. + * + * @param int $value The rounding mode value to check + * + * @return bool true if the rounding mode is invalid, false otherwise + */ + private function isInvalidRoundingMode($value) + { + if (in_array($value, self::$roundingModes, true)) { + return false; + } + + return true; + } + + /** + * Returns the normalized value for the GROUPING_USED attribute. Any value that can be converted to int will be + * cast to Boolean and then to int again. This way, negative values are converted to 1 and string values to 0. + * + * @param mixed $value The value to be normalized + * + * @return int The normalized value for the attribute (0 or 1) + */ + private function normalizeGroupingUsedValue($value) + { + return (int) (bool) (int) $value; + } + + /** + * Returns the normalized value for the FRACTION_DIGITS attribute. The value is converted to int and if negative, + * the returned value will be 0. + * + * @param mixed $value The value to be normalized + * + * @return int The normalized value for the attribute + */ + private function normalizeFractionDigitsValue($value) + { + $value = (int) $value; + + return (0 > $value) ? 0 : $value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/README.md b/vendor/symfony/symfony/src/Symfony/Component/Intl/README.md new file mode 100644 index 0000000000000000000000000000000000000000..30cb5093c4541521fb986df62210bdcefce386a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/README.md @@ -0,0 +1,19 @@ +Intl Component +============= + +A PHP replacement layer for the C intl extension that also provides access to +the localization data of the ICU library. + +The replacement layer is limited to the locale "en". If you want to use other +locales, you should [install the intl PHP extension] [0] instead. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/intl.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) + +[0]: http://www.php.net/manual/en/intl.setup.php diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/CurrencyBundle.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/CurrencyBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..5a4b35519f8b6b39cc50b81eb4ff13862042f3b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/CurrencyBundle.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\ResourceBundle; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; +use Symfony\Component\Intl\Data\Provider\CurrencyDataProvider; +use Symfony\Component\Intl\Data\Provider\LocaleDataProvider; +use Symfony\Component\Intl\Exception\MissingResourceException; + +/** + * Default implementation of {@link CurrencyBundleInterface}. + * + * @author Bernhard Schussek + * + * @internal + */ +class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInterface +{ + /** + * @var LocaleDataProvider + */ + private $localeProvider; + + /** + * Creates a new currency bundle. + * + * @param string $path + * @param BundleEntryReaderInterface $reader + * @param LocaleDataProvider $localeProvider + */ + public function __construct($path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider) + { + parent::__construct($path, $reader); + + $this->localeProvider = $localeProvider; + } + + /** + * {@inheritdoc} + */ + public function getCurrencySymbol($currency, $displayLocale = null) + { + try { + return $this->getSymbol($currency, $displayLocale); + } catch (MissingResourceException $e) { + return; + } + } + + /** + * {@inheritdoc} + */ + public function getCurrencyName($currency, $displayLocale = null) + { + try { + return $this->getName($currency, $displayLocale); + } catch (MissingResourceException $e) { + return; + } + } + + /** + * {@inheritdoc} + */ + public function getCurrencyNames($displayLocale = null) + { + try { + return $this->getNames($displayLocale); + } catch (MissingResourceException $e) { + return array(); + } + } + + /** + * {@inheritdoc} + */ + public function getFractionDigits($currency) + { + try { + return parent::getFractionDigits($currency); + } catch (MissingResourceException $e) { + return; + } + } + + /** + * {@inheritdoc} + */ + public function getRoundingIncrement($currency) + { + try { + return parent::getRoundingIncrement($currency); + } catch (MissingResourceException $e) { + return; + } + } + + /** + * {@inheritdoc} + */ + public function getLocales() + { + try { + return $this->localeProvider->getLocales(); + } catch (MissingResourceException $e) { + return array(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/CurrencyBundleInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/CurrencyBundleInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..eb82f6849e6a4d8142795b2b3126fe2733df459d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/CurrencyBundleInterface.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\ResourceBundle; + +/** + * Gives access to currency-related ICU data. + * + * @author Bernhard Schussek + */ +interface CurrencyBundleInterface extends ResourceBundleInterface +{ + /** + * Returns the symbol used for a currency. + * + * @param string $currency A currency code (e.g. "EUR") + * @param string $displayLocale Optional. The locale to return the result in + * Defaults to {@link \Locale::getDefault()}. + * + * @return string|null The currency symbol or NULL if not found + */ + public function getCurrencySymbol($currency, $displayLocale = null); + + /** + * Returns the name of a currency. + * + * @param string $currency A currency code (e.g. "EUR") + * @param string $displayLocale Optional. The locale to return the name in + * Defaults to {@link \Locale::getDefault()}. + * + * @return string|null The name of the currency or NULL if not found + */ + public function getCurrencyName($currency, $displayLocale = null); + + /** + * Returns the names of all known currencies. + * + * @param string $displayLocale Optional. The locale to return the names in + * Defaults to {@link \Locale::getDefault()}. + * + * @return string[] A list of currency names indexed by currency codes + */ + public function getCurrencyNames($displayLocale = null); + + /** + * Returns the number of digits after the comma of a currency. + * + * @param string $currency A currency code (e.g. "EUR") + * + * @return int|null The number of digits after the comma or NULL if not found + */ + public function getFractionDigits($currency); + + /** + * Returns the rounding increment of a currency. + * + * The rounding increment indicates to which number a currency is rounded. + * For example, 1230 rounded to the nearest 50 is 1250. 1.234 rounded to the + * nearest 0.65 is 1.3. + * + * @param string $currency A currency code (e.g. "EUR") + * + * @return float|int|null The rounding increment or NULL if not found + */ + public function getRoundingIncrement($currency); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..d12b892a10dcb85b81e756723995236b47d2a313 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\ResourceBundle; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; +use Symfony\Component\Intl\Data\Provider\LanguageDataProvider; +use Symfony\Component\Intl\Data\Provider\LocaleDataProvider; +use Symfony\Component\Intl\Data\Provider\ScriptDataProvider; +use Symfony\Component\Intl\Exception\MissingResourceException; + +/** + * Default implementation of {@link LanguageBundleInterface}. + * + * @author Bernhard Schussek + * + * @internal + */ +class LanguageBundle extends LanguageDataProvider implements LanguageBundleInterface +{ + /** + * @var LocaleDataProvider + */ + private $localeProvider; + + /** + * @var ScriptDataProvider + */ + private $scriptProvider; + + /** + * Creates a new language bundle. + * + * @param string $path + * @param BundleEntryReaderInterface $reader + * @param LocaleDataProvider $localeProvider + * @param ScriptDataProvider $scriptProvider + */ + public function __construct($path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider, ScriptDataProvider $scriptProvider) + { + parent::__construct($path, $reader); + + $this->localeProvider = $localeProvider; + $this->scriptProvider = $scriptProvider; + } + + /** + * {@inheritdoc} + */ + public function getLanguageName($language, $region = null, $displayLocale = null) + { + // Some languages are translated together with their region, + // i.e. "en_GB" is translated as "British English" + if (null !== $region) { + try { + return $this->getName($language.'_'.$region, $displayLocale); + } catch (MissingResourceException $e) { + } + } + + try { + return $this->getName($language, $displayLocale); + } catch (MissingResourceException $e) { + return; + } + } + + /** + * {@inheritdoc} + */ + public function getLanguageNames($displayLocale = null) + { + try { + return $this->getNames($displayLocale); + } catch (MissingResourceException $e) { + return array(); + } + } + + /** + * {@inheritdoc} + */ + public function getScriptName($script, $language = null, $displayLocale = null) + { + try { + return $this->scriptProvider->getName($script, $displayLocale); + } catch (MissingResourceException $e) { + return; + } + } + + /** + * {@inheritdoc} + */ + public function getScriptNames($displayLocale = null) + { + try { + return $this->scriptProvider->getNames($displayLocale); + } catch (MissingResourceException $e) { + return array(); + } + } + + /** + * {@inheritdoc} + */ + public function getLocales() + { + try { + return $this->localeProvider->getLocales(); + } catch (MissingResourceException $e) { + return array(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LanguageBundleInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LanguageBundleInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..aa0c3e0f2c0b6cf653c46cd444072590f758ae5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LanguageBundleInterface.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\ResourceBundle; + +/** + * Gives access to language-related ICU data. + * + * @author Bernhard Schussek + */ +interface LanguageBundleInterface extends ResourceBundleInterface +{ + /** + * Returns the name of a language. + * + * @param string $language A language code (e.g. "en") + * @param string|null $region Optional. A region code (e.g. "US") + * @param string $displayLocale Optional. The locale to return the name in + * Defaults to {@link \Locale::getDefault()}. + * + * @return string|null The name of the language or NULL if not found + */ + public function getLanguageName($language, $region = null, $displayLocale = null); + + /** + * Returns the names of all known languages. + * + * @param string $displayLocale Optional. The locale to return the names in + * Defaults to {@link \Locale::getDefault()}. + * + * @return string[] A list of language names indexed by language codes + */ + public function getLanguageNames($displayLocale = null); + + /** + * Returns the name of a script. + * + * @param string $script A script code (e.g. "Hans") + * @param string $language Optional. A language code (e.g. "zh") + * @param string $displayLocale Optional. The locale to return the name in + * Defaults to {@link \Locale::getDefault()}. + * + * @return string|null The name of the script or NULL if not found + */ + public function getScriptName($script, $language = null, $displayLocale = null); + + /** + * Returns the names of all known scripts. + * + * @param string $displayLocale Optional. The locale to return the names in + * Defaults to {@link \Locale::getDefault()}. + * + * @return string[] A list of script names indexed by script codes + */ + public function getScriptNames($displayLocale = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LocaleBundle.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LocaleBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..b14048a40ff949361887f927d05740f86cfd7841 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LocaleBundle.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\ResourceBundle; + +use Symfony\Component\Intl\Data\Provider\LocaleDataProvider; +use Symfony\Component\Intl\Exception\MissingResourceException; + +/** + * Default implementation of {@link LocaleBundleInterface}. + * + * @author Bernhard Schussek + * + * @internal + */ +class LocaleBundle extends LocaleDataProvider implements LocaleBundleInterface +{ + /** + * {@inheritdoc} + */ + public function getLocales() + { + try { + return parent::getLocales(); + } catch (MissingResourceException $e) { + return array(); + } + } + + /** + * {@inheritdoc} + */ + public function getLocaleName($locale, $displayLocale = null) + { + try { + return $this->getName($locale, $displayLocale); + } catch (MissingResourceException $e) { + return; + } + } + + /** + * {@inheritdoc} + */ + public function getLocaleNames($displayLocale = null) + { + try { + return $this->getNames($displayLocale); + } catch (MissingResourceException $e) { + return array(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LocaleBundleInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LocaleBundleInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..6fa4e5c0abbf595e22d50889bed958373868dedc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/LocaleBundleInterface.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\ResourceBundle; + +/** + * Gives access to locale-related ICU data. + * + * @author Bernhard Schussek + */ +interface LocaleBundleInterface extends ResourceBundleInterface +{ + /** + * Returns the name of a locale. + * + * @param string $locale The locale to return the name of (e.g. "de_AT") + * @param string $displayLocale Optional. The locale to return the name in + * Defaults to {@link \Locale::getDefault()}. + * + * @return string|null The name of the locale or NULL if not found + */ + public function getLocaleName($locale, $displayLocale = null); + + /** + * Returns the names of all known locales. + * + * @param string $displayLocale Optional. The locale to return the names in + * Defaults to {@link \Locale::getDefault()}. + * + * @return string[] A list of locale names indexed by locale codes + */ + public function getLocaleNames($displayLocale = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/RegionBundle.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/RegionBundle.php new file mode 100644 index 0000000000000000000000000000000000000000..29697d6883dd0d10f243a46f13312c2cdecd7ffe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/RegionBundle.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\ResourceBundle; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; +use Symfony\Component\Intl\Data\Provider\LocaleDataProvider; +use Symfony\Component\Intl\Data\Provider\RegionDataProvider; +use Symfony\Component\Intl\Exception\MissingResourceException; + +/** + * Default implementation of {@link RegionBundleInterface}. + * + * @author Bernhard Schussek + * + * @internal + */ +class RegionBundle extends RegionDataProvider implements RegionBundleInterface +{ + /** + * @var LocaleDataProvider + */ + private $localeProvider; + + /** + * Creates a new region bundle. + * + * @param string $path + * @param BundleEntryReaderInterface $reader + * @param LocaleDataProvider $localeProvider + */ + public function __construct($path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider) + { + parent::__construct($path, $reader); + + $this->localeProvider = $localeProvider; + } + + /** + * {@inheritdoc} + */ + public function getCountryName($country, $displayLocale = null) + { + try { + return $this->getName($country, $displayLocale); + } catch (MissingResourceException $e) { + return; + } + } + + /** + * {@inheritdoc} + */ + public function getCountryNames($displayLocale = null) + { + try { + return $this->getNames($displayLocale); + } catch (MissingResourceException $e) { + return array(); + } + } + + /** + * {@inheritdoc} + */ + public function getLocales() + { + try { + return $this->localeProvider->getLocales(); + } catch (MissingResourceException $e) { + return array(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/RegionBundleInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/RegionBundleInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..12d0dd240824c0c8d6211fb674bbe7ee17110c5f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/RegionBundleInterface.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\ResourceBundle; + +/** + * Gives access to region-related ICU data. + * + * @author Bernhard Schussek + */ +interface RegionBundleInterface extends ResourceBundleInterface +{ + /** + * Returns the name of a country. + * + * @param string $country A country code (e.g. "US") + * @param string $displayLocale Optional. The locale to return the name in + * Defaults to {@link \Locale::getDefault()}. + * + * @return string|null The name of the country or NULL if not found + */ + public function getCountryName($country, $displayLocale = null); + + /** + * Returns the names of all known countries. + * + * @param string $displayLocale Optional. The locale to return the names in + * Defaults to {@link \Locale::getDefault()}. + * + * @return string[] A list of country names indexed by country codes + */ + public function getCountryNames($displayLocale = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/ResourceBundleInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/ResourceBundleInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5c4c97483da9470b8c019730a74e3558510789d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/ResourceBundle/ResourceBundleInterface.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\Intl\ResourceBundle; + +/** + * Gives access to ICU data. + * + * @author Bernhard Schussek + */ +interface ResourceBundleInterface +{ + /** + * Returns the list of locales that this bundle supports. + * + * @return string[] A list of locale codes + */ + public function getLocales(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/autoload.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/autoload.php new file mode 100644 index 0000000000000000000000000000000000000000..13e056478168c47e4ebf414dfb4d0c3a9e2c07a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/autoload.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +$autoload = __DIR__.'/../../vendor/autoload.php'; + +if (!file_exists($autoload)) { + bailout('You should run "composer install --dev" in the component before running this script.'); +} + +require_once $autoload; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/common.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/common.php new file mode 100644 index 0000000000000000000000000000000000000000..2e3c0262177370d7ba12c3554dfd4ccaaffa5110 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/common.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +define('LINE_WIDTH', 75); + +define('LINE', str_repeat('-', LINE_WIDTH)."\n"); + +function bailout($message) +{ + echo wordwrap($message, LINE_WIDTH)." Aborting.\n"; + + exit(1); +} + +function strip_minor_versions($version) +{ + preg_match('/^(?P[0-9]\.[0-9]|[0-9]{2,})/', $version, $matches); + + return $matches['version']; +} + +function centered($text) +{ + $padding = (int) ((LINE_WIDTH - strlen($text)) / 2); + + return str_repeat(' ', $padding).$text; +} + +function cd($dir) +{ + if (false === chdir($dir)) { + bailout("Could not switch to directory $dir."); + } +} + +function run($command) +{ + exec($command, $output, $status); + + if (0 !== $status) { + $output = implode("\n", $output); + echo "Error while running:\n ".getcwd().'$ '.$command."\nOutput:\n".LINE."$output\n".LINE; + + bailout("\"$command\" failed."); + } +} + +function get_icu_version_from_genrb($genrb) +{ + exec($genrb.' --version 2>&1', $output, $status); + + if (0 !== $status) { + bailout($genrb.' failed.'); + } + + if (!preg_match('/ICU version ([\d\.]+)/', implode('', $output), $matches)) { + return; + } + + return $matches[1]; +} + +set_exception_handler(function (\Exception $exception) { + echo "\n"; + + $cause = $exception; + $root = true; + + while (null !== $cause) { + if (!$root) { + echo "Caused by\n"; + } + + echo get_class($cause).': '.$cause->getMessage()."\n"; + echo "\n"; + echo $cause->getFile().':'.$cause->getLine()."\n"; + foreach ($cause->getTrace() as $trace) { + echo $trace['file'].':'.$trace['line']."\n"; + } + echo "\n"; + + $cause = $cause->getPrevious(); + $root = false; + } +}); diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/icu.ini b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/icu.ini new file mode 100644 index 0000000000000000000000000000000000000000..df78504d51a8963a84c9756f10ba08b375669431 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/icu.ini @@ -0,0 +1,16 @@ +; ICU data source URLs +; We use always the latest release of a major version. +4.0 = http://source.icu-project.org/repos/icu/icu/tags/release-4-0-1/source +4.2 = http://source.icu-project.org/repos/icu/icu/tags/release-4-2-1/source +4.4 = http://source.icu-project.org/repos/icu/icu/tags/release-4-4-2/source +4.6 = http://source.icu-project.org/repos/icu/icu/tags/release-4-6-1/source +4.8 = http://source.icu-project.org/repos/icu/icu/tags/release-4-8-1-1/source +49 = http://source.icu-project.org/repos/icu/icu/tags/release-49-1-2/source +50 = http://source.icu-project.org/repos/icu/icu/tags/release-50-1-2/source +51 = http://source.icu-project.org/repos/icu/icu/tags/release-51-2/source +52 = http://source.icu-project.org/repos/icu/icu/tags/release-52-1/source +53 = http://source.icu-project.org/repos/icu/icu/tags/release-53-1/source +54 = http://source.icu-project.org/repos/icu/icu/tags/release-54-1/source +55 = http://source.icu-project.org/repos/icu/icu/tags/release-55-1/source +57 = http://source.icu-project.org/repos/icu/icu/tags/release-57-1/source +58 = http://source.icu-project.org/repos/icu/tags/release-58-2/icu4c/source diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/update-data.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/update-data.php new file mode 100644 index 0000000000000000000000000000000000000000..fe527efeccc117e0082e7608be50d20e25e6410d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/bin/update-data.php @@ -0,0 +1,293 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Component\Intl\Data\Bundle\Reader\JsonBundleReader; +use Symfony\Component\Intl\Data\Bundle\Writer\JsonBundleWriter; +use Symfony\Component\Intl\Data\Generator\CurrencyDataGenerator; +use Symfony\Component\Intl\Data\Generator\GeneratorConfig; +use Symfony\Component\Intl\Data\Generator\LanguageDataGenerator; +use Symfony\Component\Intl\Data\Generator\LocaleDataGenerator; +use Symfony\Component\Intl\Data\Generator\RegionDataGenerator; +use Symfony\Component\Intl\Data\Generator\ScriptDataGenerator; +use Symfony\Component\Intl\Data\Provider\LanguageDataProvider; +use Symfony\Component\Intl\Data\Provider\RegionDataProvider; +use Symfony\Component\Intl\Data\Provider\ScriptDataProvider; +use Symfony\Component\Intl\Intl; +use Symfony\Component\Intl\Data\Bundle\Compiler\GenrbCompiler; +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReader; +use Symfony\Component\Intl\Locale; +use Symfony\Component\Intl\Util\IcuVersion; +use Symfony\Component\Intl\Util\SvnRepository; +use Symfony\Component\Filesystem\Filesystem; + +require_once __DIR__.'/common.php'; +require_once __DIR__.'/autoload.php'; + +$argc = $_SERVER['argc']; +$argv = $_SERVER['argv']; + +if ($argc > 3 || 2 === $argc && '-h' === $argv[1]) { + bailout(<<<'MESSAGE' +Usage: php update-icu-component.php + +Updates the ICU data for Symfony to the latest version of ICU. + +If you downloaded the SVN repository before, you can pass the path to the +repository source in the first optional argument. + +If you also built the repository before, you can pass the directory where that +build is stored in the second parameter. The build directory needs to contain +the subdirectories bin/ and lib/. + +For running this script, the intl extension must be loaded and all vendors +must have been installed through composer: + +composer install + +MESSAGE + ); +} + +echo LINE; +echo centered('ICU Resource Bundle Compilation')."\n"; +echo LINE; + +if (!Intl::isExtensionLoaded()) { + bailout('The intl extension for PHP is not installed.'); +} + +$filesystem = new Filesystem(); +$urls = parse_ini_file(__DIR__.'/icu.ini'); + +echo "icu.ini parsed. Available versions:\n"; + +$maxVersion = 0; + +foreach ($urls as $urlVersion => $url) { + $maxVersion = IcuVersion::compare($maxVersion, $urlVersion, '<') + ? $urlVersion + : $maxVersion; + + echo " $urlVersion\n"; +} + +$shortIcuVersion = strip_minor_versions($maxVersion); + +if ($argc >= 2) { + $sourceDir = $argv[1]; + $svn = new SvnRepository($sourceDir); + + echo "Using existing SVN repository at {$sourceDir}.\n"; +} else { + echo "Starting SVN checkout for version $shortIcuVersion. This may take a while...\n"; + + $sourceDir = sys_get_temp_dir().'/icu-data/'.$shortIcuVersion.'/source'; + $svn = SvnRepository::download($urls[$shortIcuVersion], $sourceDir); + + echo "SVN checkout to {$sourceDir} complete.\n"; +} + +if ($argc >= 3) { + $buildDir = $argv[2]; +} else { + // Always build genrb so that we can determine the ICU version of the + // download by running genrb --version + echo "Building genrb.\n"; + + cd($sourceDir); + + echo "Running configure...\n"; + + $buildDir = sys_get_temp_dir().'/icu-data/'.$shortIcuVersion.'/build'; + + $filesystem->remove($buildDir); + $filesystem->mkdir($buildDir); + + run('./configure --prefix='.$buildDir.' 2>&1'); + + echo "Running make...\n"; + + // If the directory "lib" does not exist in the download, create it or we + // will run into problems when building libicuuc.so. + $filesystem->mkdir($sourceDir.'/lib'); + + // If the directory "bin" does not exist in the download, create it or we + // will run into problems when building genrb. + $filesystem->mkdir($sourceDir.'/bin'); + + echo '[1/6] libicudata.so...'; + + cd($sourceDir.'/stubdata'); + run('make 2>&1 && make install 2>&1'); + + echo " ok.\n"; + + echo '[2/6] libicuuc.so...'; + + cd($sourceDir.'/common'); + run('make 2>&1 && make install 2>&1'); + + echo " ok.\n"; + + echo '[3/6] libicui18n.so...'; + + cd($sourceDir.'/i18n'); + run('make 2>&1 && make install 2>&1'); + + echo " ok.\n"; + + echo '[4/6] libicutu.so...'; + + cd($sourceDir.'/tools/toolutil'); + run('make 2>&1 && make install 2>&1'); + + echo " ok.\n"; + + echo '[5/6] libicuio.so...'; + + cd($sourceDir.'/io'); + run('make 2>&1 && make install 2>&1'); + + echo " ok.\n"; + + echo '[6/6] genrb...'; + + cd($sourceDir.'/tools/genrb'); + run('make 2>&1 && make install 2>&1'); + + echo " ok.\n"; +} + +$genrb = $buildDir.'/bin/genrb'; +$genrbEnv = 'LD_LIBRARY_PATH='.$buildDir.'/lib '; + +echo "Using $genrb.\n"; + +$icuVersionInDownload = get_icu_version_from_genrb($genrbEnv.' '.$genrb); + +echo "Preparing resource bundle compilation (version $icuVersionInDownload)...\n"; + +$compiler = new GenrbCompiler($genrb, $genrbEnv); +$config = new GeneratorConfig($sourceDir.'/data', $icuVersionInDownload); + +$baseDir = dirname(__DIR__).'/data'; + +//$txtDir = $baseDir.'/txt'; +$jsonDir = $baseDir; +//$phpDir = $baseDir.'/'.Intl::PHP; +//$resDir = $baseDir.'/'.Intl::RB_V2; + +$targetDirs = array($jsonDir/*, $resDir*/); +$workingDirs = array($jsonDir/*, $txtDir, $resDir*/); + +//$config->addBundleWriter($txtDir, new TextBundleWriter()); +$config->addBundleWriter($jsonDir, new JsonBundleWriter()); + +echo "Starting resource bundle compilation. This may take a while...\n"; + +$filesystem->remove($workingDirs); + +foreach ($workingDirs as $targetDir) { + $filesystem->mkdir(array( + $targetDir.'/'.Intl::CURRENCY_DIR, + $targetDir.'/'.Intl::LANGUAGE_DIR, + $targetDir.'/'.Intl::LOCALE_DIR, + $targetDir.'/'.Intl::REGION_DIR, + $targetDir.'/'.Intl::SCRIPT_DIR, + )); +} + +// We don't want to use fallback to English during generation +Locale::setDefaultFallback(null); + +echo "Generating language data...\n"; + +$generator = new LanguageDataGenerator($compiler, Intl::LANGUAGE_DIR); +$generator->generateData($config); + +//echo "Compiling...\n"; +// +//$compiler->compile($txtDir.'/'.Intl::LANGUAGE_DIR, $resDir.'/'.Intl::LANGUAGE_DIR); + +echo "Generating script data...\n"; + +$generator = new ScriptDataGenerator($compiler, Intl::SCRIPT_DIR); +$generator->generateData($config); + +//echo "Compiling...\n"; +// +//$compiler->compile($txtDir.'/'.Intl::SCRIPT_DIR, $resDir.'/'.Intl::SCRIPT_DIR); + +echo "Generating region data...\n"; + +$generator = new RegionDataGenerator($compiler, Intl::REGION_DIR); +$generator->generateData($config); + +//echo "Compiling...\n"; +// +//$compiler->compile($txtDir.'/'.Intl::REGION_DIR, $resDir.'/'.Intl::REGION_DIR); + +echo "Generating currency data...\n"; + +$generator = new CurrencyDataGenerator($compiler, Intl::CURRENCY_DIR); +$generator->generateData($config); + +//echo "Compiling...\n"; +// +//$compiler->compile($txtDir.'/'.Intl::CURRENCY_DIR, $resDir.'/'.Intl::CURRENCY_DIR); + +echo "Generating locale data...\n"; + +$reader = new BundleEntryReader(new JsonBundleReader()); + +$generator = new LocaleDataGenerator( + Intl::LOCALE_DIR, + new LanguageDataProvider($jsonDir.'/'.Intl::LANGUAGE_DIR, $reader), + new ScriptDataProvider($jsonDir.'/'.Intl::SCRIPT_DIR, $reader), + new RegionDataProvider($jsonDir.'/'.Intl::REGION_DIR, $reader) +); + +$generator->generateData($config); + +//echo "Compiling...\n"; +// +//$compiler->compile($txtDir.'/'.Intl::LOCALE_DIR, $resDir.'/'.Intl::LOCALE_DIR); +// +//$filesystem->remove($txtDir); + +echo "Resource bundle compilation complete.\n"; + +$svnInfo = <<getUrl()} +Revision: {$svn->getLastCommit()->getRevision()} +Author: {$svn->getLastCommit()->getAuthor()} +Date: {$svn->getLastCommit()->getDate()} + +SVN_INFO; + +foreach ($targetDirs as $targetDir) { + $svnInfoFile = $targetDir.'/svn-info.txt'; + + file_put_contents($svnInfoFile, $svnInfo); + + echo "Wrote $svnInfoFile.\n"; + + $versionFile = $targetDir.'/version.txt'; + + file_put_contents($versionFile, "$icuVersionInDownload\n"); + + echo "Wrote $versionFile.\n"; +} + +echo "Done.\n"; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/af.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/af.json new file mode 100644 index 0000000000000000000000000000000000000000..7123daf3a642db6650abdd6494693bb5d821d5e6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/af.json @@ -0,0 +1,669 @@ +{ + "Version": "2.1.29.44", + "Names": { + "AED": [ + "AED", + "Verenigde Arabiese Emirate dirham" + ], + "AFN": [ + "AFN", + "Afgaanse afgani" + ], + "ALL": [ + "ALL", + "Albanese lek" + ], + "AMD": [ + "AMD", + "Armeense dram" + ], + "ANG": [ + "ANG", + "Nederlands-Antilliaanse gulde" + ], + "AOA": [ + "AOA", + "Angolese kwanza" + ], + "ARS": [ + "ARS", + "Argentynse peso" + ], + "AUD": [ + "A$", + "Australiese dollar" + ], + "AWG": [ + "AWG", + "Arubaanse floryn" + ], + "AZN": [ + "AZN", + "Azerbeidjaanse manat" + ], + "BAM": [ + "BAM", + "Bosnies-Herzegowiniese omskakelbare marka" + ], + "BBD": [ + "BBD", + "Barbados-dollar" + ], + "BDT": [ + "BDT", + "Bangladesjiese taka" + ], + "BGN": [ + "BGN", + "Bulgaarse lev" + ], + "BHD": [ + "BHD", + "Bahreinse dinar" + ], + "BIF": [ + "BIF", + "Burundiese frank" + ], + "BMD": [ + "BMD", + "Bermuda-dollar" + ], + "BND": [ + "BND", + "Broeneise dollar" + ], + "BOB": [ + "BOB", + "Boliviaanse boliviano" + ], + "BRL": [ + "R$", + "Brasilliaanse reaal" + ], + "BSD": [ + "BSD", + "Bahamiaanse dollar" + ], + "BTN": [ + "BTN", + "Bhoetanese ngoeltroem" + ], + "BWP": [ + "BWP", + "Botswana pula" + ], + "BYN": [ + "BYN", + "Belo-Russiese roebel" + ], + "BYR": [ + "BYR", + "Belo-Russiese roebel (2000–2016)" + ], + "BZD": [ + "BZD", + "Beliziese dollar" + ], + "CAD": [ + "CA$", + "Kanadese dollar" + ], + "CDF": [ + "CDF", + "Kongolese frank" + ], + "CHF": [ + "CHF", + "Switserse frank" + ], + "CLP": [ + "CLP", + "Chileense peso" + ], + "CNY": [ + "CNÂ¥", + "Sjinese joean renminbi" + ], + "COP": [ + "COP", + "Colombiaanse peso" + ], + "CRC": [ + "CRC", + "Costa Ricaanse colón" + ], + "CUC": [ + "CUC", + "Kubaanse omskakelbare peso" + ], + "CUP": [ + "CUP", + "Kubaanse peso" + ], + "CVE": [ + "CVE", + "Kaap Verdiese escudo" + ], + "CZK": [ + "CZK", + "Tsjeggiese kroon" + ], + "DJF": [ + "DJF", + "Djiboeti frank" + ], + "DKK": [ + "DKK", + "Deense kroon" + ], + "DOP": [ + "DOP", + "Dominikaanse peso" + ], + "DZD": [ + "DZD", + "Algeriese dinar" + ], + "EGP": [ + "EGP", + "Egiptiese pond" + ], + "ERN": [ + "ERN", + "Eritrese nakfa" + ], + "ETB": [ + "ETB", + "Etiopiese birr" + ], + "EUR": [ + "€", + "Euro" + ], + "FJD": [ + "FJD", + "Fidjiaanse dollar" + ], + "FKP": [ + "FKP", + "Falkland-eilande pond" + ], + "GBP": [ + "£", + "Britse pond" + ], + "GEL": [ + "GEL", + "Georgiese lari" + ], + "GHC": [ + "GHC", + "Ghanese cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "Ghanese cedi" + ], + "GIP": [ + "GIP", + "Gibraltarese pond" + ], + "GMD": [ + "GMD", + "Gambiese dalasi" + ], + "GNF": [ + "GNF", + "Guinese frank" + ], + "GNS": [ + "GNS", + "Guinese syli" + ], + "GTQ": [ + "GTQ", + "Guatemalaanse quetzal" + ], + "GYD": [ + "GYD", + "Guyanese dollar" + ], + "HKD": [ + "HK$", + "Hong Kong dollar" + ], + "HNL": [ + "HNL", + "Hondurese lempira" + ], + "HRK": [ + "HRK", + "Kroatiese kuna" + ], + "HTG": [ + "HTG", + "Haïtiaanse gourde" + ], + "HUF": [ + "HUF", + "Hongaarse florint" + ], + "IDR": [ + "IDR", + "Indonesiese roepia" + ], + "ILS": [ + "₪", + "Israeliese nuwe sikkel" + ], + "INR": [ + "₹", + "Indiese roepee" + ], + "IQD": [ + "IQD", + "Irakse dinar" + ], + "IRR": [ + "IRR", + "Iranse rial" + ], + "ISK": [ + "ISK", + "Yslandse kroon" + ], + "ITL": [ + "ITL", + "Italiaanse lier" + ], + "JMD": [ + "JMD", + "Jamaikaanse dollar" + ], + "JOD": [ + "JOD", + "Jordaniese dinar" + ], + "JPY": [ + "JPÂ¥", + "Japannese jen" + ], + "KES": [ + "KES", + "Keniaanse sjieling" + ], + "KGS": [ + "KGS", + "Kirgisiese som" + ], + "KHR": [ + "KHR", + "Kambodjaanse riel" + ], + "KMF": [ + "KMF", + "Comoraanse frank" + ], + "KPW": [ + "KPW", + "Noord-Koreaanse won" + ], + "KRW": [ + "â‚©", + "Suid-Koreaanse won" + ], + "KWD": [ + "KWD", + "Koeweitse dinar" + ], + "KYD": [ + "KYD", + "Cayman-eilande dollar" + ], + "KZT": [ + "KZT", + "Kazakse tenge" + ], + "LAK": [ + "LAK", + "Laosiaanse kip" + ], + "LBP": [ + "LBP", + "Lebanese pond" + ], + "LKR": [ + "LKR", + "Sri Lankaanse roepee" + ], + "LRD": [ + "LRD", + "Liberiese dollar" + ], + "LSL": [ + "LSL", + "Lesotho loti" + ], + "LTL": [ + "LTL", + "Litause litas" + ], + "LVL": [ + "LVL", + "Lettiese lats" + ], + "LYD": [ + "LYD", + "Libiese dinar" + ], + "MAD": [ + "MAD", + "Marokkaanse dirham" + ], + "MDL": [ + "MDL", + "Moldowiese leu" + ], + "MGA": [ + "MGA", + "Malgassiese ariary" + ], + "MKD": [ + "MKD", + "Macedoniese denar" + ], + "MMK": [ + "MMK", + "Mianmese kyat" + ], + "MNT": [ + "MNT", + "Mongoolse toegrik" + ], + "MOP": [ + "MOP", + "Macaose pataca" + ], + "MRO": [ + "MRO", + "Mauritaniese ouguiya" + ], + "MUR": [ + "MUR", + "Mauritiaanse rupee" + ], + "MVR": [ + "MVR", + "Malediviese rufia" + ], + "MWK": [ + "MWK", + "Malawiese kwacha" + ], + "MXN": [ + "MXN", + "Meksikaanse peso" + ], + "MYR": [ + "MYR", + "Maleisiese ringgit" + ], + "MZM": [ + "MZM", + "Mosambiekse metical (1980–2006)" + ], + "MZN": [ + "MZN", + "Mosambiekse metical" + ], + "NAD": [ + "NAD", + "Namibiese dollar" + ], + "NGN": [ + "NGN", + "Nigeriese naira" + ], + "NIO": [ + "NIO", + "Nicaraguaanse córdoba" + ], + "NOK": [ + "NOK", + "Noorse kroon" + ], + "NPR": [ + "NPR", + "Nepalese roepee" + ], + "NZD": [ + "NZ$", + "Nieu-Seeland dollar" + ], + "OMR": [ + "OMR", + "Omaanse rial" + ], + "PAB": [ + "PAB", + "Panamese balboa" + ], + "PEN": [ + "PEN", + "Peruaanse nuwe sol" + ], + "PGK": [ + "PGK", + "Papoea-Nieu-Guinese kina" + ], + "PHP": [ + "PHP", + "Filippynse peso" + ], + "PKR": [ + "PKR", + "Pakistanse roepee" + ], + "PLN": [ + "PLN", + "Poolse zloty" + ], + "PYG": [ + "PYG", + "Paraguaanse guarani" + ], + "QAR": [ + "QAR", + "Katarrese rial" + ], + "RON": [ + "RON", + "Roemeense leu" + ], + "RSD": [ + "RSD", + "Serbiese dinar" + ], + "RUB": [ + "RUB", + "Russiese roebel" + ], + "RWF": [ + "RWF", + "Rwandiese frank" + ], + "SAR": [ + "SAR", + "Saoedi-Arabiese riyal" + ], + "SBD": [ + "SBD", + "Salomonseilande dollar" + ], + "SCR": [ + "SCR", + "Seychellese rupee" + ], + "SDG": [ + "SDG", + "Soedannese pond" + ], + "SDP": [ + "SDP", + "Soedannese pond (1957–1998)" + ], + "SEK": [ + "SEK", + "Sweedse kroon" + ], + "SGD": [ + "SGD", + "Singapoer dollar" + ], + "SHP": [ + "SHP", + "Sint Helena pond" + ], + "SLL": [ + "SLL", + "Sierra Leoniese leone" + ], + "SOS": [ + "SOS", + "Somaliese sjieling" + ], + "SRD": [ + "SRD", + "Surinaamse dollar" + ], + "SSP": [ + "SSP", + "Suid-Soedanese pond" + ], + "STD": [ + "STD", + "São Tomé en Príncipe dobra" + ], + "SYP": [ + "SYP", + "Siriese pond" + ], + "SZL": [ + "SZL", + "Swazilandse lilangeni" + ], + "THB": [ + "฿", + "Thaise baht" + ], + "TJS": [ + "TJS", + "Tadjikse roebel" + ], + "TMT": [ + "TMT", + "Turkmeense manat" + ], + "TND": [ + "TND", + "Tunisiese dinar" + ], + "TOP": [ + "TOP", + "Tongaanse pa’anga" + ], + "TRL": [ + "TRL", + "Turkse lier (1922–2005)" + ], + "TRY": [ + "TRY", + "Turkse lier" + ], + "TTD": [ + "TTD", + "Trinidad en Tobago dollar" + ], + "TWD": [ + "NT$", + "Nuwe Taiwanese dollar" + ], + "TZS": [ + "TZS", + "Tanzaniese sjieling" + ], + "UAH": [ + "UAH", + "Oekraïnse hriwna" + ], + "UGX": [ + "UGX", + "Ugandese sjieling" + ], + "USD": [ + "US$", + "Amerikaanse dollar" + ], + "UYU": [ + "UYU", + "Uruguaanse peso" + ], + "UZS": [ + "UZS", + "Oezbekiese som" + ], + "VEF": [ + "VEF", + "Venezolaanse bolivar" + ], + "VND": [ + "â‚«", + "Viëtnamese dong" + ], + "VUV": [ + "VUV", + "Vanuatuse vatu" + ], + "WST": [ + "WST", + "Samoaanse tala" + ], + "XAF": [ + "FCFA", + "CFA frank BEAC" + ], + "XCD": [ + "EC$", + "Oos-Karibbiese dollar" + ], + "XOF": [ + "CFA", + "CFA frank BCEAO" + ], + "XPF": [ + "CFPF", + "CFP-frank" + ], + "YER": [ + "YER", + "Jemenitiese rial" + ], + "ZAR": [ + "R", + "Suid-Afrikaanse rand" + ], + "ZMK": [ + "ZMK", + "Zambiese kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambiese kwacha" + ], + "ZWD": [ + "ZWD", + "Zimbabwiese dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/af_NA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/af_NA.json new file mode 100644 index 0000000000000000000000000000000000000000..7f76eeefa7e1ae6088e568f3b4ed46683016a4ed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/af_NA.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "NAD": [ + "$", + "Namibiese dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ak.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ak.json new file mode 100644 index 0000000000000000000000000000000000000000..cf259fe2e8bcb47ec895ce403ee04ba1d1610ea2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ak.json @@ -0,0 +1,225 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AED": [ + "AED", + "Æmirete Arab NkabÉ”mu Deram" + ], + "AOA": [ + "AOA", + "Angola Kwanza" + ], + "AUD": [ + "A$", + "Ɔstrelia DÉ”la" + ], + "BHD": [ + "BHD", + "Baren Dina" + ], + "BIF": [ + "BIF", + "Burundi Frank" + ], + "BWP": [ + "BWP", + "Botswana Pula" + ], + "CAD": [ + "CA$", + "Kanada DÉ”la" + ], + "CDF": [ + "CDF", + "Kongo Frank" + ], + "CNY": [ + "CNÂ¥", + "Yuan" + ], + "CVE": [ + "CVE", + "Æskudo" + ], + "DJF": [ + "DJF", + "Gyebuti Frank" + ], + "DZD": [ + "DZD", + "Ɔlgyeria Dina" + ], + "EGP": [ + "EGP", + "Egypt PÉ”n" + ], + "ERN": [ + "ERN", + "Æretereya Nakfa" + ], + "ETB": [ + "ETB", + "Itiopia Bir" + ], + "EUR": [ + "€", + "Iro" + ], + "GBP": [ + "£", + "Breten PÉ”n" + ], + "GHC": [ + "GHC", + "Ghana Sidi (1979–2007)" + ], + "GHS": [ + "GH₵", + "Ghana Sidi" + ], + "GMD": [ + "GMD", + "Gambia Dalasi" + ], + "GNS": [ + "GNS", + "Gini Frank" + ], + "INR": [ + "₹", + "India Rupi" + ], + "JPY": [ + "JPÂ¥", + "Gyapan YÉ›n" + ], + "KES": [ + "KES", + "Kenya Hyelen" + ], + "KMF": [ + "KMF", + "Komoro Frank" + ], + "LRD": [ + "LRD", + "Laeberia DÉ”la" + ], + "LSL": [ + "LSL", + "Lesoto Loti" + ], + "LYD": [ + "LYD", + "Libya Dina" + ], + "MAD": [ + "MAD", + "Moroko Diram" + ], + "MGA": [ + "MGA", + "Madagasi Frank" + ], + "MRO": [ + "MRO", + "MÉ”retenia Ouguiya" + ], + "MUR": [ + "MUR", + "MÉ”rehyeÉ”s Rupi" + ], + "MWK": [ + "MWK", + "Malawi Kwacha" + ], + "MZM": [ + "MZM", + "Mozambik Metical" + ], + "NAD": [ + "NAD", + "Namibia DÉ”la" + ], + "NGN": [ + "NGN", + "Naegyeria Naira" + ], + "RWF": [ + "RWF", + "Rewanda Frank" + ], + "SAR": [ + "SAR", + "Saudi Riyal" + ], + "SCR": [ + "SCR", + "SeyhyÉ›ls Rupi" + ], + "SDG": [ + "SDG", + "Sudan Dina" + ], + "SDP": [ + "SDP", + "Sudan PÉ”n" + ], + "SHP": [ + "SHP", + "St Helena PÉ”n" + ], + "SLL": [ + "SLL", + "Leone" + ], + "SOS": [ + "SOS", + "Somailia Hyelen" + ], + "STD": [ + "STD", + "Sao Tome ne Principe Dobra" + ], + "SZL": [ + "SZL", + "Lilangeni" + ], + "TND": [ + "TND", + "Tunisia Dina" + ], + "TZS": [ + "TZS", + "Tanzania Hyelen" + ], + "UGX": [ + "UGX", + "Uganda Hyelen" + ], + "USD": [ + "US$", + "AmÉ›rika DÉ”la" + ], + "XAF": [ + "FCFA", + "Sefa" + ], + "ZAR": [ + "ZAR", + "Afrika Anaafo Rand" + ], + "ZMK": [ + "ZMK", + "Zambia Kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambia Kwacha" + ], + "ZWD": [ + "ZWD", + "Zimbabwe DÉ”la" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/am.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/am.json new file mode 100644 index 0000000000000000000000000000000000000000..abfaa8b2d588835ba36ec069eb2528a31c5e9ec4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/am.json @@ -0,0 +1,653 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "የተባበሩት የአረብ ኤáˆáˆ¨á‰µáˆµ ዲርሀáˆ" + ], + "AFN": [ + "AFN", + "የአáጋን አáጋኒ" + ], + "ALL": [ + "ALL", + "የአáˆá‰£áŠ•á‹« ሌክ" + ], + "AMD": [ + "AMD", + "የአርመን ድራáˆ" + ], + "ANG": [ + "ANG", + "ኔዘርላንድስ አንቲሊአን ጊáˆá‹°áˆ­" + ], + "AOA": [ + "AOA", + "የአንጎላ ኩዋንዛ" + ], + "ARS": [ + "ARS", + "የአርጀንቲና á”ሶ" + ], + "AUD": [ + "AU$", + "የአá‹áˆµá‰µáˆ«áˆŠá‹« ዶላር" + ], + "AWG": [ + "AWG", + "አሩባን áሎሪን" + ], + "AZN": [ + "AZN", + "የአዛርባጃን ማናት" + ], + "BAM": [ + "BAM", + "የቦስኒያ ሄርዞጎቪና የሚመáŠá‹˜áˆ­ ማርክ" + ], + "BBD": [ + "BBD", + "የባርቤዶስ ዶላር" + ], + "BDT": [ + "BDT", + "የባንáŒáˆ‹á‹²áˆ½ ታካ" + ], + "BGN": [ + "BGN", + "የቡáˆáŒ‹áˆªá‹« ሌቭ" + ], + "BHD": [ + "BHD", + "የባኽሬን ዲናር" + ], + "BIF": [ + "BIF", + "የብሩንዲ áራንክ" + ], + "BMD": [ + "BMD", + "የቤርሙዳ ዶላር" + ], + "BND": [ + "BND", + "የብሩኔ ዶላር" + ], + "BOB": [ + "BOB", + "የቦሊቪያ ቦሊቪያኖ" + ], + "BRL": [ + "R$", + "የብራዚሠሪáˆ" + ], + "BSD": [ + "BSD", + "የባሃማስ ዶላር" + ], + "BTN": [ + "BTN", + "ብáˆá‰³áŠ’á‹ áŠ•áŒ‰áˆá‰µáˆ¨áˆ" + ], + "BWP": [ + "BWP", + "የቦትስዋና á‘ላ" + ], + "BYN": [ + "BYN", + "የቤላሩስያ ሩብáˆ" + ], + "BYR": [ + "BYR", + "የቤላሩስያ ሩብሠ(2000–2016)" + ], + "BZD": [ + "BZD", + "የቤሊዠዶላር" + ], + "CAD": [ + "CA$", + "የካናዳ ዶላር" + ], + "CDF": [ + "CDF", + "የኮንጠáራንክ ኮንáŒáˆŒá‹" + ], + "CHF": [ + "CHF", + "የስዊስ áራንክ" + ], + "CLP": [ + "CLP", + "የቺሊ á”ሶ" + ], + "CNY": [ + "CNÂ¥", + "የቻይና የን" + ], + "COP": [ + "COP", + "የኮሎáˆá‰¢á‹« á”ሶ" + ], + "CRC": [ + "CRC", + "የኮስታሪካ ኮሎን" + ], + "CUC": [ + "CUC", + "የኩባ የሚመáŠá‹˜áˆ­ á”ሶ" + ], + "CUP": [ + "CUP", + "የኩባ á”ሶ" + ], + "CVE": [ + "CVE", + "የኬᕠቫርዲ ኤስኩዶ" + ], + "CZK": [ + "CZK", + "ቼክ ሪáብሊክ ኮሩና" + ], + "DJF": [ + "DJF", + "የጅቡቲ áራንክ" + ], + "DKK": [ + "DKK", + "የዴንማርክ ክሮን" + ], + "DOP": [ + "DOP", + "የዶሚኒክ á”ሶ" + ], + "DZD": [ + "DZD", + "የአáˆáŒ„ሪያ ዲናር" + ], + "EGP": [ + "EGP", + "የáŒá‰¥áŒ½ á“á‹áŠ•á‹µ" + ], + "ERN": [ + "ERN", + "የኤርትራ ናቅá‹" + ], + "ETB": [ + "ብር", + "የኢትዮጵያ ብር" + ], + "EUR": [ + "€", + "ዩሮ" + ], + "FJD": [ + "FJD", + "የáŠáŒ‚ ዶላር" + ], + "FKP": [ + "FKP", + "የáŽáŠ­áˆ‹áŠ•á‹µ ደሴቶች á“á‹áŠ•á‹µ" + ], + "GBP": [ + "£", + "የእንáŒáˆŠá‹ á“á‹áŠ•á‹µ ስተርሊንáŒ" + ], + "GEL": [ + "GEL", + "የጆርጅያ ላሪ" + ], + "GHC": [ + "GHC", + "የጋና ሴዲ" + ], + "GHS": [ + "GHS", + "የጋና ሲዲ" + ], + "GIP": [ + "GIP", + "ጂብራáˆá‰°áˆ­ á“á‹áŠ•á‹µ" + ], + "GMD": [ + "GMD", + "የጋáˆá‰¢á‹« ዳላሲ" + ], + "GNF": [ + "GNF", + "የጊኒ áራንክ" + ], + "GTQ": [ + "GTQ", + "ጓቲማላን ኩቲዛáˆ" + ], + "GYD": [ + "GYD", + "የጉየና ዶላር" + ], + "HKD": [ + "HK$", + "የሆንáŒáŠ®áŠ•áŒ á‹¶áˆ‹áˆ­" + ], + "HNL": [ + "HNL", + "የሃንዱራ ሌáˆá“አይራ" + ], + "HRK": [ + "HRK", + "የክሮሽያ ኩና" + ], + "HTG": [ + "HTG", + "የሃያቲ ጓርዴ" + ], + "HUF": [ + "HUF", + "የáˆáŠ•áŒ‹áˆª áŽáˆªáŠ•á‰µ" + ], + "IDR": [ + "IDR", + "የኢንዶኔዥያ ሩá’ሃ" + ], + "ILS": [ + "₪", + "የእስራኤሠአዲስ ሽቅáˆ" + ], + "INR": [ + "₹", + "የሕንድ ሩá’" + ], + "IQD": [ + "IQD", + "የኢራቅ ዲናር" + ], + "IRR": [ + "IRR", + "የኢራን ሪአáˆ" + ], + "ISK": [ + "ISK", + "የአይስላንድ ክሮና" + ], + "JMD": [ + "JMD", + "የጃማይካ ዶላር" + ], + "JOD": [ + "JOD", + "የጆርዳን ዲናር" + ], + "JPY": [ + "JPÂ¥", + "የጃá“ን የን" + ], + "KES": [ + "KES", + "የኬኒያ ሺሊንáŒ" + ], + "KGS": [ + "KGS", + "የኪርጊስታን ሶáˆ" + ], + "KHR": [ + "KHR", + "የካáˆá‰¦á‹²á‹« ሬáˆ" + ], + "KMF": [ + "KMF", + "የኮሞሮ áራንክ" + ], + "KPW": [ + "KPW", + "የሰሜን ኮሪያ ዎን" + ], + "KRW": [ + "â‚©", + "የደቡብ ኮሪያ ዎን" + ], + "KWD": [ + "KWD", + "የኩዌት ዲናር" + ], + "KYD": [ + "KYD", + "የካይማን ደሴቶች ዶላር" + ], + "KZT": [ + "KZT", + "የካዛኪስታን ተንጌ" + ], + "LAK": [ + "LAK", + "የላኦቲ ኪá•" + ], + "LBP": [ + "LBP", + "የሊባኖስ á“á‹áŠ•á‹µ" + ], + "LKR": [ + "LKR", + "የሲሪላንካ ሩá’" + ], + "LRD": [ + "LRD", + "የላይቤሪያ ዶላር" + ], + "LSL": [ + "LSL", + "የሌሶቶ ሎቲ" + ], + "LTL": [ + "LTL", + "ሊቱዌንያን ሊታስ" + ], + "LVL": [ + "LVL", + "የላቲቫ ላትስ" + ], + "LYD": [ + "LYD", + "የሊቢያ ዲናር" + ], + "MAD": [ + "MAD", + "የሞሮኮ ዲርሀáˆ" + ], + "MDL": [ + "MDL", + "ሞáˆá‹¶á‰«áŠ• ሊኡ" + ], + "MGA": [ + "MGA", + "የማደጋስካር ማላጋስይ አሪያርይ" + ], + "MKD": [ + "MKD", + "የሜቆድንያ ዲናር" + ], + "MMK": [ + "MMK", + "የማያናማር ክያት" + ], + "MNT": [ + "MNT", + "የሞንጎሊያን ቱáŒáˆªáŠ­" + ], + "MOP": [ + "MOP", + "የማካኔዠá“ታካ" + ], + "MRO": [ + "MRO", + "የሞሪቴኒያ ኦá‹áŒ‰á‹«" + ], + "MUR": [ + "MUR", + "የሞሪሸስ ሩá’" + ], + "MVR": [ + "MVR", + "የማáˆá‹²á‰« ሩáŠá‹«" + ], + "MWK": [ + "MWK", + "የማላዊ ኩዋቻ" + ], + "MXN": [ + "MX$", + "የሜክሲኮ á”ሶ" + ], + "MYR": [ + "MYR", + "የማሌዥያ ሪንጊት" + ], + "MZN": [ + "MZN", + "የሞዛáˆá‰¢áŠ­ ሜቲካáˆ" + ], + "NAD": [ + "NAD", + "የናሚቢያ ዶላር" + ], + "NGN": [ + "NGN", + "የናይጄሪያ ናይራ" + ], + "NIO": [ + "NIO", + "የኒካራጓ ኮርዶባ" + ], + "NOK": [ + "NOK", + "የኖርዌይ ክሮን" + ], + "NPR": [ + "NPR", + "የኔá“ሠሩá’" + ], + "NZD": [ + "NZ$", + "የኒá‹á‹šáˆ‹áŠ•á‹µ ዶላር" + ], + "OMR": [ + "OMR", + "የኦማን ሪአáˆ" + ], + "PAB": [ + "PAB", + "á“ናማኒአን ባáˆá‰¦áŠ " + ], + "PEN": [ + "PEN", + "የá”ሩቪያ ኑኤቮ ሶáˆ" + ], + "PGK": [ + "PGK", + "የá“á•á‹‹ ኒዠጊኒ ኪና" + ], + "PHP": [ + "PHP", + "የáŠáˆŠá’ንስ á”ሶ" + ], + "PKR": [ + "PKR", + "የá“ኪስታን ሩá’" + ], + "PLN": [ + "PLN", + "የá–ላንድ á‹áˆŽá‰²" + ], + "PYG": [ + "PYG", + "የá“ራጓይ ጉአራኒ" + ], + "QAR": [ + "QAR", + "የኳታር ሪአáˆ" + ], + "RON": [ + "RON", + "የሮማኒያ ለá‹" + ], + "RSD": [ + "RSD", + "የሰርቢያ ዲናር" + ], + "RUB": [ + "RUB", + "የሩስያ ሩብáˆ" + ], + "RWF": [ + "RWF", + "የሩዋንዳ áራንክ" + ], + "SAR": [ + "SAR", + "የሳá‹á‹² ሪያáˆ" + ], + "SBD": [ + "SBD", + "የሰለሞን ደሴቶች ዶላር" + ], + "SCR": [ + "SCR", + "የሲሼሠሩá’" + ], + "SDG": [ + "SDG", + "የሱዳን ዲናር" + ], + "SDP": [ + "SDP", + "የሱዳን á“á‹áŠ•á‹µ" + ], + "SEK": [ + "SEK", + "የስዊድን ክሮና" + ], + "SGD": [ + "SGD", + "የሲንጋá–ር ዶላር" + ], + "SHP": [ + "SHP", + "የሴይንት ሔሌና á“á‹áŠ•á‹µ" + ], + "SLL": [ + "SLL", + "የሴራሊዎን ሊዎን" + ], + "SOS": [ + "SOS", + "የሶማሌ ሺሊንáŒ" + ], + "SRD": [ + "SRD", + "የሰርናሜዠዶላር" + ], + "SSP": [ + "SSP", + "የደቡብ ሱዳን á“á‹áŠ•á‹µ" + ], + "STD": [ + "STD", + "የሳኦ ቶመ እና á•ሪንሲá ዶብራ" + ], + "SYP": [ + "SYP", + "የሲሪያ á“á‹áŠ•á‹µ" + ], + "SZL": [ + "SZL", + "የስዋዚላንድ ሊላንገኒ" + ], + "THB": [ + "฿", + "የታይላንድ ባህት" + ], + "TJS": [ + "TJS", + "የታጂክስታን ሶሞኒ" + ], + "TMT": [ + "TMT", + "ቱርክሜኒስታኒ ማናት" + ], + "TND": [ + "TND", + "የቱኒዚያ ዲናር" + ], + "TOP": [ + "TOP", + "ቶንጋን á“’አንጋ" + ], + "TRY": [ + "TRY", + "የቱርክ ሊራ" + ], + "TTD": [ + "TTD", + "የትሪንዳድ እና ቶቤጎዶላር" + ], + "TWD": [ + "NT$", + "የአዲሷ ታይዋን ዶላር" + ], + "TZS": [ + "TZS", + "የታንዛኒያ ሺሊንáŒ" + ], + "UAH": [ + "UAH", + "የዩክሬን ሀሪይቭኒአ" + ], + "UGX": [ + "UGX", + "የዩጋንዳ ሺሊንáŒ" + ], + "USD": [ + "US$", + "የአሜሪካን ዶላር" + ], + "UYU": [ + "UYU", + "የኡራጓይ á”ሶ" + ], + "UZS": [ + "UZS", + "የኡá‹á”ኪስታን ሶáˆ" + ], + "VEF": [ + "VEF", + "የቬንá‹á‹Œáˆ‹ ቦሊቫር" + ], + "VND": [ + "â‚«", + "የቭየትናሠዶንáŒ" + ], + "VUV": [ + "VUV", + "የቫንዋንቱ ቫቱ" + ], + "WST": [ + "WST", + "ሳሞአን ታላ" + ], + "XAF": [ + "FCFA", + "የመካከለኛዠአáሪካ ሴዠáራንክ" + ], + "XCD": [ + "EC$", + "የáˆá‹•ራብ ካሪብያን ዶላር" + ], + "XOF": [ + "CFA", + "የáˆá‹•ራብ አáሪካ ሴዠáራንክ" + ], + "XPF": [ + "CFPF", + "ሲ ኤá á’ áራንክ" + ], + "YER": [ + "YER", + "የየመን ሪአáˆ" + ], + "ZAR": [ + "ZAR", + "የደቡብ አáሪካ ራንድ" + ], + "ZMK": [ + "ZMK", + "የዛáˆá‰¢á‹« ክዋቻ (1968–2012)" + ], + "ZMW": [ + "ZMW", + "የዛáˆá‰¢á‹« ክዋቻ" + ], + "ZWD": [ + "ZWD", + "የዚáˆá‰§á‰¡á‹Œ ዶላር" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar.json new file mode 100644 index 0000000000000000000000000000000000000000..95e3c98b368e977aeda071506e93ceecd337bc2d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar.json @@ -0,0 +1,981 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "بيستا أندوري" + ], + "AED": [ + "د.Ø¥.â€", + "درهم إماراتي" + ], + "AFA": [ + "AFA", + "Ø£ÙØºØ§Ù†ÙŠ - 1927-2002" + ], + "AFN": [ + "AFN", + "Ø£ÙØºØ§Ù†ÙŠ" + ], + "ALL": [ + "ALL", + "ليك ألباني" + ], + "AMD": [ + "AMD", + "درام أرميني" + ], + "ANG": [ + "ANG", + "غيلدر أنتيلي هولندي" + ], + "AOA": [ + "AOA", + "كوانزا أنجولي" + ], + "AOK": [ + "AOK", + "كوانزا أنجولي - 1977-1990" + ], + "AON": [ + "AON", + "كوانزا أنجولي جديدة - 1990-2000" + ], + "AOR": [ + "AOR", + "كوانزا أنجولي معدلة - 1995 - 1999" + ], + "ARA": [ + "ARA", + "استرال أرجنتيني" + ], + "ARP": [ + "ARP", + "بيزو أرجنتيني - 1983-1985" + ], + "ARS": [ + "ARS", + "بيزو أرجنتيني" + ], + "ATS": [ + "ATS", + "شلن نمساوي" + ], + "AUD": [ + "AU$", + "دولار أسترالي" + ], + "AWG": [ + "AWG", + "Ùلورن أروبي" + ], + "AZM": [ + "AZM", + "مانات أذريبجاني" + ], + "AZN": [ + "AZN", + "مانات أذربيجان" + ], + "BAD": [ + "BAD", + "دينار البوسنة والهرسك" + ], + "BAM": [ + "BAM", + "مارك البوسنة والهرسك قابل للتحويل" + ], + "BBD": [ + "BBD", + "دولار بربادوسي" + ], + "BDT": [ + "BDT", + "تاكا بنجلاديشي" + ], + "BEC": [ + "BEC", + "ÙØ±Ù†Ùƒ بلجيكي قابل للتحويل" + ], + "BEF": [ + "BEF", + "ÙØ±Ù†Ùƒ بلجيكي" + ], + "BEL": [ + "BEL", + "ÙØ±Ù†Ùƒ بلجيكي مالي" + ], + "BGN": [ + "BGN", + "لي٠بلغاري" + ], + "BHD": [ + "د.ب.â€", + "دينار بحريني" + ], + "BIF": [ + "BIF", + "ÙØ±Ù†Ùƒ بروندي" + ], + "BMD": [ + "BMD", + "دولار برمودي" + ], + "BND": [ + "BND", + "دولار بروناي" + ], + "BOB": [ + "BOB", + "بوليÙيانو بوليÙÙŠ" + ], + "BOP": [ + "BOP", + "بيزو بوليÙÙŠ" + ], + "BOV": [ + "BOV", + "Ù…ÙØ¯ÙˆÙ„ بوليÙÙŠ" + ], + "BRB": [ + "BRB", + "نوÙÙˆ كروزايرو برازيلي - 1967-1986" + ], + "BRC": [ + "BRC", + "كروزادو برازيلي" + ], + "BRE": [ + "BRE", + "كروزايرو برازيلي - 1990-1993" + ], + "BRL": [ + "R$", + "ريال برازيلي" + ], + "BSD": [ + "BSD", + "دولار باهامي" + ], + "BTN": [ + "BTN", + "نولتوم بوتاني" + ], + "BUK": [ + "BUK", + "كيات بورمي" + ], + "BWP": [ + "BWP", + "بولا بتسواني" + ], + "BYB": [ + "BYB", + "روبل بيلاروسي جديد - 1994-1999" + ], + "BYN": [ + "BYN", + "روبل بيلاروسي" + ], + "BYR": [ + "BYR", + "روبل بيلاروسي (٢٠٠٠–٢٠١٦)" + ], + "BZD": [ + "BZD", + "دولار بليزي" + ], + "CAD": [ + "CA$", + "دولار كندي" + ], + "CDF": [ + "CDF", + "ÙØ±Ù†Ùƒ كونغولي" + ], + "CHF": [ + "CHF", + "ÙØ±Ù†Ùƒ سويسري" + ], + "CLP": [ + "CLP", + "بيزو شيلي" + ], + "CNY": [ + "CNÂ¥", + "يوان صيني" + ], + "COP": [ + "COP", + "بيزو كولومبي" + ], + "CRC": [ + "CRC", + "كولن كوستا ريكي" + ], + "CSD": [ + "CSD", + "دينار صربي قديم" + ], + "CSK": [ + "CSK", + "كرونة ØªØ´ÙŠÙƒÙˆØ³Ù„ÙˆÙØ§ÙƒÙŠØ§" + ], + "CUC": [ + "CUC", + "بيزو كوبي قابل للتحويل" + ], + "CUP": [ + "CUP", + "بيزو كوبي" + ], + "CVE": [ + "CVE", + "اسكودو الرأس الخضراء" + ], + "CYP": [ + "CYP", + "جنيه قبرصي" + ], + "CZK": [ + "CZK", + "كرونة تشيكية" + ], + "DDM": [ + "DDM", + "أوستمارك ألماني شرقي" + ], + "DEM": [ + "DEM", + "مارك ألماني" + ], + "DJF": [ + "DJF", + "ÙØ±Ù†Ùƒ جيبوتي" + ], + "DKK": [ + "DKK", + "كرونة دانماركي" + ], + "DOP": [ + "DOP", + "بيزو الدومنيكان" + ], + "DZD": [ + "د.ج.â€", + "دينار جزائري" + ], + "EEK": [ + "EEK", + "كرونة استونية" + ], + "EGP": [ + "ج.Ù….â€", + "جنيه مصري" + ], + "ERN": [ + "ERN", + "Ù†Ø§ÙƒÙØ§ أريتري" + ], + "ESP": [ + "ESP", + "بيزيتا إسباني" + ], + "ETB": [ + "ETB", + "بير أثيوبي" + ], + "EUR": [ + "€", + "يورو" + ], + "FIM": [ + "FIM", + "ماركا Ùنلندي" + ], + "FJD": [ + "FJD", + "دولار Ùيجي" + ], + "FKP": [ + "FKP", + "جنيه جزر Ùوكلاند" + ], + "FRF": [ + "FRF", + "ÙØ±Ù†Ùƒ ÙØ±Ù†Ø³ÙŠ" + ], + "GBP": [ + "£", + "جنيه إسترليني" + ], + "GEL": [ + "GEL", + "لارى جورجي" + ], + "GHC": [ + "GHC", + "سيدي غاني" + ], + "GHS": [ + "GHS", + "سيدي غانا" + ], + "GIP": [ + "GIP", + "جنيه جبل طارق" + ], + "GMD": [ + "GMD", + "دلاسي جامبي" + ], + "GNF": [ + "GNF", + "ÙØ±Ù†Ùƒ غينيا" + ], + "GNS": [ + "GNS", + "سيلي غينيا" + ], + "GQE": [ + "GQE", + "اكويل جونينا غينيا الاستوائيّة" + ], + "GRD": [ + "GRD", + "دراخما يوناني" + ], + "GTQ": [ + "GTQ", + "كوتزال جواتيمالا" + ], + "GWE": [ + "GWE", + "اسكود برتغالي غينيا" + ], + "GWP": [ + "GWP", + "بيزو غينيا بيساو" + ], + "GYD": [ + "GYD", + "دولار غيانا" + ], + "HKD": [ + "HK$", + "دولار هونغ كونغ" + ], + "HNL": [ + "HNL", + "ليمبيرا هنداروس" + ], + "HRD": [ + "HRD", + "دينار كرواتي" + ], + "HRK": [ + "HRK", + "كونا كرواتي" + ], + "HTG": [ + "HTG", + "جوردى هايتي" + ], + "HUF": [ + "HUF", + "Ùورينت مجري" + ], + "IDR": [ + "IDR", + "روبية إندونيسية" + ], + "IEP": [ + "IEP", + "جنيه إيرلندي" + ], + "ILP": [ + "ILP", + "جنيه إسرائيلي" + ], + "ILS": [ + "₪", + "شيكل إسرائيلي جديد" + ], + "INR": [ + "₹", + "روبية هندي" + ], + "IQD": [ + "د.ع.â€", + "دينار عراقي" + ], + "IRR": [ + "ر.Ø¥.", + "ريال إيراني" + ], + "ISK": [ + "ISK", + "كرونه أيسلندي" + ], + "ITL": [ + "ITL", + "ليرة إيطالية" + ], + "JMD": [ + "JMD", + "دولار جامايكي" + ], + "JOD": [ + "د.Ø£.â€", + "دينار أردني" + ], + "JPY": [ + "JPÂ¥", + "ين ياباني" + ], + "KES": [ + "KES", + "شلن كينيي" + ], + "KGS": [ + "KGS", + "سوم قيرغستاني" + ], + "KHR": [ + "KHR", + "رييال كمبودي" + ], + "KMF": [ + "Ù.ج.Ù‚.â€", + "ÙØ±Ù†Ùƒ جزر القمر" + ], + "KPW": [ + "KPW", + "وون كوريا الشمالية" + ], + "KRW": [ + "â‚©", + "وون كوريا الجنوبية" + ], + "KWD": [ + "د.Ùƒ.â€", + "دينار كويتي" + ], + "KYD": [ + "KYD", + "دولار جزر كيمن" + ], + "KZT": [ + "KZT", + "تينغ كازاخستاني" + ], + "LAK": [ + "LAK", + "كيب لاوسي" + ], + "LBP": [ + "Ù„.Ù„.â€", + "جنيه لبناني" + ], + "LKR": [ + "LKR", + "روبية سريلانكية" + ], + "LRD": [ + "LRD", + "دولار ليبيري" + ], + "LSL": [ + "LSL", + "لوتي ليسوتو" + ], + "LTL": [ + "LTL", + "ليتا ليتوانية" + ], + "LTT": [ + "LTT", + "تالوناس ليتواني" + ], + "LUC": [ + "LUC", + "ÙØ±Ù†Ùƒ لوكسمبرج قابل للتحويل" + ], + "LUF": [ + "LUF", + "ÙØ±Ù†Ùƒ لوكسمبرج" + ], + "LUL": [ + "LUL", + "ÙØ±Ù†Ùƒ لوكسمبرج المالي" + ], + "LVL": [ + "LVL", + "لاتس لاتÙيا" + ], + "LVR": [ + "LVR", + "روبل لاتÙيا" + ], + "LYD": [ + "د.Ù„.â€", + "دينار ليبي" + ], + "MAD": [ + "د.Ù….â€", + "درهم مغربي" + ], + "MAF": [ + "MAF", + "ÙØ±Ù†Ùƒ مغربي" + ], + "MDL": [ + "MDL", + "ليو مولدوÙÙŠ" + ], + "MGA": [ + "MGA", + "أرياري مدغشقر" + ], + "MGF": [ + "MGF", + "ÙØ±Ù†Ùƒ مدغشقر" + ], + "MKD": [ + "MKD", + "دينار مقدوني" + ], + "MLF": [ + "MLF", + "ÙØ±Ù†Ùƒ مالي" + ], + "MMK": [ + "MMK", + "كيات ميانمار" + ], + "MNT": [ + "MNT", + "توغروغ منغولي" + ], + "MOP": [ + "MOP", + "باتاكا ماكاوي" + ], + "MRO": [ + "Ø£.Ù….â€", + "أوقية موريتانية" + ], + "MTL": [ + "MTL", + "ليرة مالطية" + ], + "MTP": [ + "MTP", + "جنيه مالطي" + ], + "MUR": [ + "MUR", + "روبية موريشيوسية" + ], + "MVR": [ + "MVR", + "روÙيه جزر المالديÙ" + ], + "MWK": [ + "MWK", + "كواشا مالاوي" + ], + "MXN": [ + "MX$", + "بيزو مكسيكي" + ], + "MXP": [ + "MXP", + "بيزو ÙØ¶ÙŠ Ù…ÙƒØ³ÙŠÙƒÙŠ - 1861-1992" + ], + "MYR": [ + "MYR", + "رينغيت ماليزي" + ], + "MZE": [ + "MZE", + "اسكود موزمبيقي" + ], + "MZN": [ + "MZN", + "متكال موزمبيقي" + ], + "NAD": [ + "NAD", + "دولار ناميبي" + ], + "NGN": [ + "NGN", + "نايرا نيجيري" + ], + "NIC": [ + "NIC", + "كوردوبة نيكاراجوا" + ], + "NIO": [ + "NIO", + "قرطبة نيكاراغوا" + ], + "NLG": [ + "NLG", + "جلدر هولندي" + ], + "NOK": [ + "NOK", + "كرونة نرويجية" + ], + "NPR": [ + "NPR", + "روبية نيبالي" + ], + "NZD": [ + "NZ$", + "دولار نيوزيلندي" + ], + "OMR": [ + "ر.ع.â€", + "ريال عماني" + ], + "PAB": [ + "PAB", + "بالبوا بنمي" + ], + "PEN": [ + "PEN", + "سول جديد البيرو" + ], + "PGK": [ + "PGK", + "كينا بابوا غينيا الجديدة" + ], + "PHP": [ + "PHP", + "بيزو Ùلبيني" + ], + "PKR": [ + "PKR", + "روبية باكستاني" + ], + "PLN": [ + "PLN", + "زلوتي بولندي" + ], + "PLZ": [ + "PLZ", + "زلوتي بولندي - 1950-1995" + ], + "PTE": [ + "PTE", + "اسكود برتغالي" + ], + "PYG": [ + "PYG", + "جواراني باراجواي" + ], + "QAR": [ + "ر.Ù‚.â€", + "ريال قطري" + ], + "RHD": [ + "RHD", + "دولار روديسي" + ], + "ROL": [ + "ROL", + "ليو روماني قديم" + ], + "RON": [ + "RON", + "ليو روماني" + ], + "RSD": [ + "RSD", + "دينار صربي" + ], + "RUB": [ + "RUB", + "روبل روسي" + ], + "RUR": [ + "RUR", + "روبل روسي - 1991-1998" + ], + "RWF": [ + "RWF", + "ÙØ±Ù†Ùƒ رواندي" + ], + "SAR": [ + "ر.س.â€", + "ريال سعودي" + ], + "SBD": [ + "SBD", + "دولار جزر سليمان" + ], + "SCR": [ + "SCR", + "روبية سيشيلية" + ], + "SDD": [ + "د.س.â€", + "دينار سوداني" + ], + "SDG": [ + "ج.س.", + "جنيه سوداني" + ], + "SDP": [ + "SDP", + "جنيه سوداني قديم" + ], + "SEK": [ + "SEK", + "كرونة سويدية" + ], + "SGD": [ + "SGD", + "دولار سنغاÙوري" + ], + "SHP": [ + "SHP", + "جنيه سانت هيلين" + ], + "SIT": [ + "SIT", + "تولار سلوÙيني" + ], + "SKK": [ + "SKK", + "كرونة Ø³Ù„ÙˆÙØ§ÙƒÙŠØ©" + ], + "SLL": [ + "SLL", + "ليون سيراليوني" + ], + "SOS": [ + "SOS", + "شلن صومالي" + ], + "SRD": [ + "SRD", + "دولار سورينامي" + ], + "SRG": [ + "SRG", + "جلدر سورينامي" + ], + "SSP": [ + "SSP", + "جنيه جنوب السودان" + ], + "STD": [ + "STD", + "دوبرا ساو تومي وبرينسيبي" + ], + "SUR": [ + "SUR", + "روبل سوÙيتي" + ], + "SVC": [ + "SVC", + "كولون Ø³Ù„ÙØ§Ø¯ÙˆØ±ÙŠ" + ], + "SYP": [ + "Ù„.س.â€", + "ليرة سورية" + ], + "SZL": [ + "SZL", + "ليلانجيني سوازيلندي" + ], + "THB": [ + "฿", + "باخت تايلاندي" + ], + "TJR": [ + "TJR", + "روبل طاجيكستاني" + ], + "TJS": [ + "TJS", + "سوموني طاجيكستاني" + ], + "TMM": [ + "TMM", + "مانات تركمنستاني" + ], + "TMT": [ + "TMT", + "مانات تركمانستان" + ], + "TND": [ + "د.ت.â€", + "دينار تونسي" + ], + "TOP": [ + "TOP", + "بانغا تونغا" + ], + "TPE": [ + "TPE", + "اسكود تيموري" + ], + "TRL": [ + "TRL", + "ليرة تركي" + ], + "TRY": [ + "TRY", + "ليرة تركية" + ], + "TTD": [ + "TTD", + "دولار ترينداد وتوباجو" + ], + "TWD": [ + "NT$", + "دولار تايواني" + ], + "TZS": [ + "TZS", + "شلن تنزاني" + ], + "UAH": [ + "UAH", + "هريÙنيا أوكراني" + ], + "UGS": [ + "UGS", + "شلن أوغندي - 1966-1987" + ], + "UGX": [ + "UGX", + "شلن أوغندي" + ], + "USD": [ + "US$", + "دولار أمريكي" + ], + "USN": [ + "USN", + "دولار أمريكي (اليوم التالي)â€" + ], + "USS": [ + "USS", + "دولار أمريكي (Ù†ÙØ³ اليوم)â€" + ], + "UYP": [ + "UYP", + "بيزو أوروجواي - 1975-1993" + ], + "UYU": [ + "UYU", + "بيزو اوروغواي" + ], + "UZS": [ + "UZS", + "سوم أوزبكستاني" + ], + "VEB": [ + "VEB", + "Ø¨ÙˆÙ„ÙŠÙØ§Ø± Ùنزويلي - 1871-2008" + ], + "VEF": [ + "VEF", + "Ø¨ÙˆÙ„ÙŠÙØ§Ø± Ùنزويلي" + ], + "VND": [ + "â‚«", + "دونج Ùيتنامي" + ], + "VUV": [ + "VUV", + "ÙØ§ØªÙˆ ÙØ§Ù†ÙˆØ§ØªÙˆ" + ], + "WST": [ + "WST", + "تالا ساموا" + ], + "XAF": [ + "FCFA", + "ÙØ±Ù†Ùƒ وسط Ø£ÙØ±ÙŠÙ‚ÙŠ" + ], + "XCD": [ + "EC$", + "دولار شرق الكاريبي" + ], + "XEU": [ + "XEU", + "وحدة النقد الأوروبية" + ], + "XFO": [ + "XFO", + "ÙØ±Ù†Ùƒ ÙØ±Ù†Ø³ÙŠ Ø°Ù‡Ø¨ÙŠ" + ], + "XFU": [ + "XFU", + "(UIC)ÙØ±Ù†Ùƒ ÙØ±Ù†Ø³ÙŠ" + ], + "XOF": [ + "CFA", + "ÙØ±Ù†Ùƒ غرب Ø£ÙØ±ÙŠÙ‚ÙŠ" + ], + "XPF": [ + "CFPF", + "ÙØ±Ù†Ùƒ سي إ٠بي" + ], + "YDD": [ + "YDD", + "دينار يمني" + ], + "YER": [ + "ر.ÙŠ.â€", + "ريال يمني" + ], + "YUD": [ + "YUD", + "دينار يوغسلاÙÙŠ" + ], + "YUN": [ + "YUN", + "دينار يوغسلاÙÙŠ قابل للتحويل" + ], + "ZAL": [ + "ZAL", + "راند جنوب Ø£ÙØ±ÙŠÙ‚يا -مالي" + ], + "ZAR": [ + "ZAR", + "راند جنوب Ø£ÙØ±ÙŠÙ‚يا" + ], + "ZMK": [ + "ZMK", + "كواشا زامبي - 1968-2012" + ], + "ZMW": [ + "ZMW", + "كواشا زامبي" + ], + "ZRN": [ + "ZRN", + "زائير زائيري جديد" + ], + "ZRZ": [ + "ZRZ", + "زائير زائيري" + ], + "ZWD": [ + "ZWD", + "دولار زمبابوي" + ], + "ZWL": [ + "ZWL", + "دولار زمبابوي 2009" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_DJ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_DJ.json new file mode 100644 index 0000000000000000000000000000000000000000..a0cccc6e8664470fa760a14526fd5ae5744523f4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_DJ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "DJF": [ + "Fdj", + "ÙØ±Ù†Ùƒ جيبوتي" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_ER.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_ER.json new file mode 100644 index 0000000000000000000000000000000000000000..4c3df3603c1f580450ece17f8ab5ca29d6b2d2a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_ER.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ERN": [ + "Nfk", + "Ù†Ø§ÙƒÙØ§ أريتري" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_LB.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_LB.json new file mode 100644 index 0000000000000000000000000000000000000000..f7c67d5e727b3c247646087846d9d010a8b88307 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_LB.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "SDG": [ + "SDG", + "جنيه سوداني" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_SO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_SO.json new file mode 100644 index 0000000000000000000000000000000000000000..e47d8f9610e93f3eeef3527676830d11ae24d771 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_SO.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "SOS": [ + "S", + "شلن صومالي" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_SS.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_SS.json new file mode 100644 index 0000000000000000000000000000000000000000..859b6b198dd8d27e358041c28fa8a411bffc4b75 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ar_SS.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GBP": [ + "GB£", + "جنيه إسترليني" + ], + "SSP": [ + "£", + "جنيه جنوب السودان" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/az.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/az.json new file mode 100644 index 0000000000000000000000000000000000000000..aeea1490274542f026effdadafbda7ee4d8eab80 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/az.json @@ -0,0 +1,1045 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Andora Pesetası" + ], + "AED": [ + "AED", + "BirləşmiÅŸ ÆrÉ™b ÆmirliklÉ™ri DirhÉ™mi" + ], + "AFA": [ + "AFA", + "Æfqanıstan Æfqanisi (1927–2002)" + ], + "AFN": [ + "AFN", + "Æfqanıstan Æfqanisi" + ], + "ALK": [ + "ALK", + "Albaniya Leki (1946–1965)" + ], + "ALL": [ + "ALL", + "Albaniya Leki" + ], + "AMD": [ + "AMD", + "ErmÉ™nistan Dramı" + ], + "ANG": [ + "ANG", + "Niderland Antilyası Gilderi" + ], + "AOA": [ + "AOA", + "Anqola Kvanzası" + ], + "AOK": [ + "AOK", + "Anqola Kvanzasi (1977–1990)" + ], + "AON": [ + "AON", + "Anqola Yeni Kvanzası (1990–2000)" + ], + "AOR": [ + "AOR", + "Anqola Kvanzası (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentina avstralı" + ], + "ARP": [ + "ARP", + "Argentina pesosu (1983–1985)" + ], + "ARS": [ + "ARS", + "Argentina Pesosu" + ], + "ATS": [ + "ATS", + "Avstriya Åžillinqi" + ], + "AUD": [ + "A$", + "Avstraliya Dolları" + ], + "AWG": [ + "AWG", + "Aruba Florini" + ], + "AZM": [ + "AZM", + "AzÉ™rbaycan Manatı (1993–2006)" + ], + "AZN": [ + "₼", + "AzÉ™rbaycan Manatı" + ], + "BAD": [ + "BAD", + "Bosniya-Herseqovina Dinarı" + ], + "BAM": [ + "BAM", + "Bosniya-Herseqovina Markası" + ], + "BBD": [ + "BBD", + "Barbados Dolları" + ], + "BDT": [ + "BDT", + "BanqladeÅŸ Takası" + ], + "BEC": [ + "BEC", + "Belçika Frankı (deyÅŸirik)" + ], + "BEF": [ + "BEF", + "Belçika Frankı" + ], + "BEL": [ + "BEL", + "Belçika Frankı (finans)" + ], + "BGL": [ + "BGL", + "Bolqarıstan Levası" + ], + "BGN": [ + "BGN", + "Bolqarıstan Levi" + ], + "BHD": [ + "BHD", + "BÉ™hreyn Dinarı" + ], + "BIF": [ + "BIF", + "Burundi Frankı" + ], + "BMD": [ + "BMD", + "Bermuda Dolları" + ], + "BND": [ + "BND", + "Bruney Dolları" + ], + "BOB": [ + "BOB", + "Boliviya Bolivianosu" + ], + "BOP": [ + "BOP", + "Boliviya pesosu" + ], + "BOV": [ + "BOV", + "Boliviya mvdolı" + ], + "BRB": [ + "BRB", + "Braziliya kruzeyro novası" + ], + "BRC": [ + "BRC", + "Braziliya kruzadosu" + ], + "BRE": [ + "BRE", + "Braziliya kruzeyrosu (1990–1993)" + ], + "BRL": [ + "R$", + "Braziliya Realı" + ], + "BRN": [ + "BRN", + "Braziliya kruzado novası" + ], + "BRR": [ + "BRR", + "Braziliya kruzeyrosu" + ], + "BSD": [ + "BSD", + "Bahama Dolları" + ], + "BTN": [ + "BTN", + "Butan Nqultrumu" + ], + "BUK": [ + "BUK", + "Burmis Kyatı" + ], + "BWP": [ + "BWP", + "Botsvana Pulası" + ], + "BYB": [ + "BYB", + "Belarus Yeni Rublu (1994–1999)" + ], + "BYN": [ + "BYN", + "Belarus Rublu" + ], + "BYR": [ + "BYR", + "Belarus Rublu (2000–2016)" + ], + "BZD": [ + "BZD", + "Beliz Dolları" + ], + "CAD": [ + "CA$", + "Kanada Dolları" + ], + "CDF": [ + "CDF", + "Konqo Frankı" + ], + "CHE": [ + "CHE", + "WIR Avro" + ], + "CHF": [ + "CHF", + "İsveçrÉ™ Frankı" + ], + "CHW": [ + "CHW", + "WIR Frankası" + ], + "CLP": [ + "CLP", + "Çili Pesosu" + ], + "CNY": [ + "CNÂ¥", + "Çin Yuanı" + ], + "COP": [ + "COP", + "Kolumbiya Pesosu" + ], + "CRC": [ + "CRC", + "Kosta Rika Kolonu" + ], + "CSD": [ + "CSD", + "Serbiya Dinarı (2002–2006)" + ], + "CSK": [ + "CSK", + "Çexoslavakiya Korunası" + ], + "CUC": [ + "CUC", + "Kuba ÇevrilÉ™n Pesosu" + ], + "CUP": [ + "CUP", + "Kuba Pesosu" + ], + "CVE": [ + "CVE", + "Kape Verde Eskudosu" + ], + "CYP": [ + "CYP", + "Kipr Paundu" + ], + "CZK": [ + "CZK", + "Çexiya Korunası" + ], + "DDM": [ + "DDM", + "Şərq Almaniya Ostmarkı" + ], + "DEM": [ + "DEM", + "Alman Markası" + ], + "DJF": [ + "DJF", + "Cibuti Frankı" + ], + "DKK": [ + "DKK", + "Danimarka Kronu" + ], + "DOP": [ + "DOP", + "Dominika Pesosu" + ], + "DZD": [ + "DZD", + "ÆlcÉ™zair Dinarı" + ], + "ECS": [ + "ECS", + "Ekvador Sukresi" + ], + "EEK": [ + "EEK", + "Estoniya Krunu" + ], + "EGP": [ + "EGP", + "Misir Funtu" + ], + "ERN": [ + "ERN", + "Eritreya Nakfası" + ], + "ESA": [ + "ESA", + "İspan Pesetası (A account)" + ], + "ESB": [ + "ESB", + "İspan Pesetası (dÉ™yÅŸirik)" + ], + "ESP": [ + "ESP", + "İspan Pesetası" + ], + "ETB": [ + "ETB", + "Efiopiya Bırrı" + ], + "EUR": [ + "€", + "Avro" + ], + "FIM": [ + "FIM", + "Fin Markası" + ], + "FJD": [ + "FJD", + "Fici Dolları" + ], + "FKP": [ + "FKP", + "Folklend Adaları Funtu" + ], + "FRF": [ + "FRF", + "Fransız Markası" + ], + "GBP": [ + "£", + "Britaniya Funt" + ], + "GEK": [ + "GEK", + "Gürcüstan Kupon Lariti" + ], + "GEL": [ + "GEL", + "Gürcüstan Larisi" + ], + "GHC": [ + "GHC", + "Qana Sedisi (1979–2007)" + ], + "GHS": [ + "GHS", + "Qana Sedisi" + ], + "GIP": [ + "GIP", + "Gibraltar Funtu" + ], + "GMD": [ + "GMD", + "Qambiya Dalasisi" + ], + "GNF": [ + "GNF", + "Qvineya Frankı" + ], + "GNS": [ + "GNS", + "Qvineya Sulisi" + ], + "GQE": [ + "GQE", + "Ekvatoriya Gvineya Ekvele Quneanası" + ], + "GRD": [ + "GRD", + "Yunan Draçması" + ], + "GTQ": [ + "GTQ", + "Qvatemala Küetzalı" + ], + "GWE": [ + "GWE", + "Portugal Qvineya Eskudosu" + ], + "GWP": [ + "GWP", + "Qvineya-Bisau Pesosu" + ], + "GYD": [ + "GYD", + "Qayana Dolları" + ], + "HKD": [ + "HK$", + "Honq Konq Dolları" + ], + "HNL": [ + "HNL", + "Honduras Lempirası" + ], + "HRD": [ + "HRD", + "Xorvatiya Dinarı" + ], + "HRK": [ + "HRK", + "Xorvatiya Kunası" + ], + "HTG": [ + "HTG", + "Haiti Qourdu" + ], + "HUF": [ + "HUF", + "Macarıstan Forinti" + ], + "IDR": [ + "IDR", + "İndoneziya Rupisi" + ], + "IEP": [ + "IEP", + "İrlandiya Paundu" + ], + "ILP": [ + "ILP", + "İzrail Paundu" + ], + "ILR": [ + "ILR", + "İsrail Åžekeli (1980–1985)" + ], + "ILS": [ + "₪", + "İsrail Yeni Åžekeli" + ], + "INR": [ + "₹", + "Hindistan Rupisi" + ], + "IQD": [ + "IQD", + "İraq Dinarı" + ], + "IRR": [ + "IRR", + "İran Rialı" + ], + "ISJ": [ + "ISJ", + "İslandiya Kronu (1918–1981)" + ], + "ISK": [ + "ISK", + "İslandiya Kronu" + ], + "ITL": [ + "ITL", + "İtaliya Lirası" + ], + "JMD": [ + "JMD", + "Yamayka Dolları" + ], + "JOD": [ + "JOD", + "İordaniya Dinarı" + ], + "JPY": [ + "JPÂ¥", + "Yaponiya Yeni" + ], + "KES": [ + "KES", + "Keniya Åžillinqi" + ], + "KGS": [ + "KGS", + "Kırğızıstan Somu" + ], + "KHR": [ + "KHR", + "Kamboca Rieli" + ], + "KMF": [ + "KMF", + "Komor Frankı" + ], + "KPW": [ + "KPW", + "Åžimali Koreya Vonu" + ], + "KRW": [ + "â‚©", + "CÉ™nubi Koreya Vonu" + ], + "KWD": [ + "KWD", + "Küveyt Dinarı" + ], + "KYD": [ + "KYD", + "Kayman Adaları Dolları" + ], + "KZT": [ + "KZT", + "Qazaxıstan Tengesi" + ], + "LAK": [ + "LAK", + "Laos Kipi" + ], + "LBP": [ + "LBP", + "Livan Funtu" + ], + "LKR": [ + "LKR", + "Åžri Lanka Rupisi" + ], + "LRD": [ + "LRD", + "Liberiya Dolları" + ], + "LSL": [ + "LSL", + "Lesoto Lotisi" + ], + "LTL": [ + "LTL", + "Litva Liti" + ], + "LTT": [ + "LTT", + "Litva Talonası" + ], + "LUC": [ + "LUC", + "Luksemburq Frankası (dÉ™yiÅŸik)" + ], + "LUF": [ + "LUF", + "Luksemburq Frankası" + ], + "LUL": [ + "LUL", + "Luksemburq Frankası (finans)" + ], + "LVL": [ + "LVL", + "Latviya Latı" + ], + "LVR": [ + "LVR", + "Latviya Rublu" + ], + "LYD": [ + "LYD", + "Liviya Dinarı" + ], + "MAD": [ + "MAD", + "MÉ™rakeÅŸ DirhÉ™mi" + ], + "MAF": [ + "MAF", + "MÉ™rakeÅŸ Frankası" + ], + "MDL": [ + "MDL", + "Moldova Leyi" + ], + "MGA": [ + "MGA", + "Madaqaskar Ariarisi" + ], + "MGF": [ + "MGF", + "Madaqaskar Frankası" + ], + "MKD": [ + "MKD", + "Makedoniya Dinarı" + ], + "MKN": [ + "MKN", + "Makedoniya Dinarı (1992–1993)" + ], + "MLF": [ + "MLF", + "Mali Frankı" + ], + "MMK": [ + "MMK", + "Myanma Kiyatı" + ], + "MNT": [ + "MNT", + "Monqoliya Tuqriki" + ], + "MOP": [ + "MOP", + "Makao Patakası" + ], + "MRO": [ + "MRO", + "Mavritaniya Ugiyası" + ], + "MTP": [ + "MTP", + "Maltiz Paundu" + ], + "MUR": [ + "MUR", + "Mavriki Rupisi" + ], + "MVR": [ + "MVR", + "Maldiv Rufiyası" + ], + "MWK": [ + "MWK", + "Malavi Kvaçası" + ], + "MXN": [ + "MX$", + "Meksika Pesosu" + ], + "MXP": [ + "MXP", + "Meksika gümüş pesosu" + ], + "MYR": [ + "MYR", + "Malayziya Ringiti" + ], + "MZE": [ + "MZE", + "Mozambik Eskudosu" + ], + "MZM": [ + "MZM", + "Mozambik Metikalı (1980–2006)" + ], + "MZN": [ + "MZN", + "Mozambik Metikalı" + ], + "NAD": [ + "NAD", + "Namibiya Dolları" + ], + "NGN": [ + "NGN", + "Nigeriya Nairası" + ], + "NIC": [ + "NIC", + "Nikaraqua kordobu" + ], + "NIO": [ + "NIO", + "Nikaraqua Kordobası" + ], + "NLG": [ + "NLG", + "Hollandiya Gilderi" + ], + "NOK": [ + "NOK", + "Norveç Kronu" + ], + "NPR": [ + "NPR", + "Nepal Rupisi" + ], + "NZD": [ + "NZ$", + "Yeni Zelandiya Dolları" + ], + "OMR": [ + "OMR", + "Oman Rialı" + ], + "PAB": [ + "PAB", + "Panama Balboası" + ], + "PEI": [ + "PEI", + "Peru Inti" + ], + "PEN": [ + "PEN", + "Peru Nuevo Solu" + ], + "PES": [ + "PES", + "Peru Solu" + ], + "PGK": [ + "PGK", + "Papua Yeni Qvineya Kinası" + ], + "PHP": [ + "PHP", + "Filippin Pesosu" + ], + "PKR": [ + "PKR", + "Pakistan Rupisi" + ], + "PLN": [ + "PLN", + "PolÅŸa Zlotısı" + ], + "PLZ": [ + "PLZ", + "PolÅŸa Zlotısı (1950–1995)" + ], + "PTE": [ + "PTE", + "Portuqal Eskudosu" + ], + "PYG": [ + "PYG", + "Paraqvay Quaranisi" + ], + "QAR": [ + "QAR", + "Qatar Rialı" + ], + "RHD": [ + "RHD", + "Rodezian Dolları" + ], + "ROL": [ + "ROL", + "Rumıniya Leyi (1952–2006)" + ], + "RON": [ + "RON", + "Rumıniya Leyi" + ], + "RSD": [ + "RSD", + "Serbiya Dinarı" + ], + "RUB": [ + "RUB", + "Rusiya Rublu" + ], + "RUR": [ + "RUR", + "Rusiya Rublu (1991–1998)" + ], + "RWF": [ + "RWF", + "Ruanda Frankı" + ], + "SAR": [ + "SAR", + "SÉ™udiyyÉ™ Riyalı" + ], + "SBD": [ + "SBD", + "Solomon Adaları Dolları" + ], + "SCR": [ + "SCR", + "SeyÅŸel Rupisi" + ], + "SDG": [ + "SDG", + "Sudan Funtu" + ], + "SEK": [ + "SEK", + "İsveç Kronu" + ], + "SGD": [ + "SGD", + "Sinqapur Dolları" + ], + "SHP": [ + "SHP", + "MüqÉ™ddÉ™s Yelena Funtu" + ], + "SIT": [ + "SIT", + "Sloveniya Toları" + ], + "SKK": [ + "SKK", + "Slovak Korunası" + ], + "SLL": [ + "SLL", + "Sierra Leon Leonu" + ], + "SOS": [ + "SOS", + "Somali Åžillinqi" + ], + "SRD": [ + "SRD", + "Surinam Dolları" + ], + "SSP": [ + "SSP", + "CÉ™nubi Sudan Funtu" + ], + "STD": [ + "STD", + "San Tom vÉ™ Prinsip Dobrası" + ], + "SUR": [ + "SUR", + "Sovet Rublu" + ], + "SVC": [ + "SVC", + "El Salvador kolonu" + ], + "SYP": [ + "SYP", + "Suriya Funtu" + ], + "SZL": [ + "SZL", + "Svazilend Lilangenini" + ], + "THB": [ + "฿", + "Tayland Batı" + ], + "TJR": [ + "TJR", + "Tacikistan Rublu" + ], + "TJS": [ + "TJS", + "Tacikistan Somonisi" + ], + "TMM": [ + "TMM", + "TürkmÉ™nistan Manatı (1993–2009)" + ], + "TMT": [ + "TMT", + "TürkmÉ™nistan Manatı" + ], + "TND": [ + "TND", + "Tunis Dinarı" + ], + "TOP": [ + "TOP", + "Tonqa Panqası" + ], + "TPE": [ + "TPE", + "Timor Eskudu" + ], + "TRL": [ + "TRL", + "TürkiyÉ™ LirÉ™si (1922–2005)" + ], + "TRY": [ + "TRY", + "TürkiyÉ™ LirÉ™si" + ], + "TTD": [ + "TTD", + "Trinidad vÉ™ Tobaqo Dolları" + ], + "TWD": [ + "NT$", + "Tayvan Yeni Dolları" + ], + "TZS": [ + "TZS", + "Tanzaniya Åžillinqi" + ], + "UAH": [ + "UAH", + "Ukrayna Qrivnası" + ], + "UAK": [ + "UAK", + "Ukrayna Karbovenesası" + ], + "UGS": [ + "UGS", + "Uqanda Åžillinqi (1966–1987)" + ], + "UGX": [ + "UGX", + "Uqanda Åžillinqi" + ], + "USD": [ + "US$", + "ABÅž Dolları" + ], + "USN": [ + "USN", + "ABÅž dolları (yeni gün)" + ], + "USS": [ + "USS", + "ABÅž dolları (hÉ™min gün)" + ], + "UYI": [ + "UYI", + "Uruqvay pesosu Unidades Indexadas" + ], + "UYP": [ + "UYP", + "Uruqvay Pesosu (1975–1993)" + ], + "UYU": [ + "UYU", + "Uruqvay Pesosu" + ], + "UZS": [ + "UZS", + "ÖzbÉ™kistan Somu" + ], + "VEB": [ + "VEB", + "Venesuela Bolivarı (1871–2008)" + ], + "VEF": [ + "VEF", + "Venesuela Bolivarı" + ], + "VND": [ + "â‚«", + "Vyetnam Donqu" + ], + "VNN": [ + "VNN", + "Vyetnam Donqu (1978–1985)" + ], + "VUV": [ + "VUV", + "Vanuatu Vatusu" + ], + "WST": [ + "WST", + "Samoa Talası" + ], + "XAF": [ + "FCFA", + "Kamerun Frankı" + ], + "XCD": [ + "EC$", + "Şərqi Karib Dolları" + ], + "XFO": [ + "XFO", + "Fransız Gızıl Frankı" + ], + "XFU": [ + "XFU", + "Fransız UİC Frankı" + ], + "XOF": [ + "CFA", + "Fil DiÅŸi Sahili Frankı" + ], + "XPF": [ + "CFPF", + "Fransız Polineziyası Frankı" + ], + "YDD": [ + "YDD", + "YÉ™mÉ™n Dinarı" + ], + "YER": [ + "YER", + "YÉ™mÉ™n Rialı" + ], + "YUD": [ + "YUD", + "Yuqoslaviya Dinarı (1966–1990)" + ], + "YUM": [ + "YUM", + "Yuqoslaviya Yeni Dinarı (1994–2002)" + ], + "YUN": [ + "YUN", + "Yuqoslaviya Dinarı (1990–1992)" + ], + "ZAL": [ + "ZAL", + "CÉ™nubi Afrika Randı (finans)" + ], + "ZAR": [ + "ZAR", + "CÉ™nubi Afrika Randı" + ], + "ZMK": [ + "ZMK", + "Zambiya Kvaçası (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambiya Kvaçası" + ], + "ZRN": [ + "ZRN", + "Zair Yeni Zairi (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zair Zairi (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Zimbabve Dolları (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Zimbabve Dolları (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabve Dolları (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/az_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/az_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..a70c089be71ced3d4ad934148be3b58764644a56 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/az_Cyrl.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AZN": [ + "₼", + "AZN" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/be.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/be.json new file mode 100644 index 0000000000000000000000000000000000000000..2ff2cb58c7ededdedc1edb7d79f3149b0e81b709 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/be.json @@ -0,0 +1,625 @@ +{ + "Version": "2.1.29.66", + "Names": { + "AED": [ + "AED", + "дырхем ÐÐЭ" + ], + "AFN": [ + "AFN", + "афганÑкі афгані" + ], + "ALL": [ + "ALL", + "албанÑкі лек" + ], + "AMD": [ + "AMD", + "армÑнÑкі драм" + ], + "ANG": [ + "ANG", + "нідÑрландÑкі антыльÑкі гульдÑн" + ], + "AOA": [ + "AOA", + "ангольÑÐºÐ°Ñ ÐºÐ²Ð°Ð½Ð·Ð°" + ], + "ARS": [ + "ARS", + "аргенцінÑкае пеÑа" + ], + "AUD": [ + "A$", + "аўÑтралійÑкі долар" + ], + "AWG": [ + "AWG", + "арубанÑкі фларын" + ], + "AZN": [ + "AZN", + "азербайджанÑкі манат" + ], + "BAM": [ + "BAM", + "канверÑÐ¾ÑžÐ½Ð°Ñ Ð¼Ð°Ñ€ÐºÐ° БоÑніі Ñ– Герцагавіны" + ], + "BBD": [ + "BBD", + "барбадоÑкі долар" + ], + "BDT": [ + "BDT", + "бангладÑшÑÐºÐ°Ñ Ñ‚Ð°ÐºÐ°" + ], + "BGN": [ + "BGN", + "балгарÑкі леў" + ], + "BHD": [ + "BHD", + "бахрÑйнÑкі дынар" + ], + "BIF": [ + "BIF", + "бурундзійÑкі франк" + ], + "BMD": [ + "BMD", + "бермудÑкі долар" + ], + "BND": [ + "BND", + "брунейÑкі долар" + ], + "BOB": [ + "BOB", + "балівіÑна" + ], + "BRL": [ + "BRL", + "бразільÑкі Ñ€Ñал" + ], + "BSD": [ + "BSD", + "багамÑкі долар" + ], + "BTN": [ + "BTN", + "бутанÑкі нгултрум" + ], + "BWP": [ + "BWP", + "батÑванÑÐºÐ°Ñ Ð¿ÑƒÐ»Ð°" + ], + "BYN": [ + "Br", + "беларуÑкі рубель" + ], + "BYR": [ + "BYR", + "беларуÑкі рубель (2000–2016)" + ], + "BZD": [ + "BZD", + "белізÑкі долар" + ], + "CAD": [ + "CAD", + "канадÑкі долар" + ], + "CDF": [ + "CDF", + "кангалезÑкі франк" + ], + "CHF": [ + "CHF", + "швейцарÑкі франк" + ], + "CLP": [ + "CLP", + "чылійÑкае пеÑа" + ], + "CNY": [ + "CNÂ¥", + "кітайÑкі юань" + ], + "COP": [ + "COP", + "калумбійÑкае пеÑа" + ], + "CRC": [ + "CRC", + "коÑта-рыканÑкі калон" + ], + "CUC": [ + "CUC", + "кубінÑкае канверÑоўнае пеÑа" + ], + "CUP": [ + "CUP", + "кубінÑкае пеÑа" + ], + "CVE": [ + "CVE", + "ÑÑкуда Каба-ВердÑ" + ], + "CZK": [ + "CZK", + "чÑшÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "DJF": [ + "DJF", + "джыбуційÑкі франк" + ], + "DKK": [ + "DKK", + "Ð´Ð°Ñ†ÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "DOP": [ + "DOP", + "дамініканÑкае пеÑа" + ], + "DZD": [ + "DZD", + "алжырÑкі дынар" + ], + "EGP": [ + "EGP", + "егіпецкі фунт" + ], + "ERN": [ + "ERN", + "ÑрытрÑйÑÐºÐ°Ñ Ð½Ð°ÐºÑ„Ð°" + ], + "ETB": [ + "ETB", + "ÑфіопÑкі быр" + ], + "EUR": [ + "€", + "еўра" + ], + "FJD": [ + "FJD", + "фіджыйÑкі долар" + ], + "FKP": [ + "FKP", + "фунт ФалклендÑкіх аÑтравоў" + ], + "GBP": [ + "£", + "брытанÑкі фунт ÑÑ‚Ñрлінгаў" + ], + "GEL": [ + "GEL", + "грузінÑкі лары" + ], + "GHS": [ + "GHS", + "ганÑкі Ñедзі" + ], + "GIP": [ + "GIP", + "гібралтарÑкі фунт" + ], + "GMD": [ + "GMD", + "гамбійÑкі далаÑÑ–" + ], + "GNF": [ + "GNF", + "гвінейÑкі франк" + ], + "GTQ": [ + "GTQ", + "гватÑмальÑкі кетÑаль" + ], + "GYD": [ + "GYD", + "гаÑнÑкі долар" + ], + "HKD": [ + "HK$", + "ганконгÑкі долар" + ], + "HNL": [ + "HNL", + "гандураÑÐºÐ°Ñ Ð»ÐµÐ¼Ð¿Ñ–Ñ€Ð°" + ], + "HRK": [ + "HRK", + "Ñ…Ð°Ñ€Ð²Ð°Ñ†ÐºÐ°Ñ ÐºÑƒÐ½Ð°" + ], + "HTG": [ + "HTG", + "гаіцÑнÑкі гурд" + ], + "HUF": [ + "HUF", + "венгерÑкі форынт" + ], + "IDR": [ + "IDR", + "інданезійÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ñ–Ñ" + ], + "ILS": [ + "₪", + "новы ізраільÑкі шÑкель" + ], + "INR": [ + "₹", + "індыйÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ñ–Ñ" + ], + "IQD": [ + "IQD", + "іракÑкі дынар" + ], + "IRR": [ + "IRR", + "іранÑкі рыал" + ], + "ISK": [ + "ISK", + "Ñ–ÑландÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "JMD": [ + "JMD", + "ÑмайÑкі долар" + ], + "JOD": [ + "JOD", + "іарданÑкі дынар" + ], + "JPY": [ + "Â¥", + "ÑпонÑÐºÐ°Ñ Ñ–ÐµÐ½Ð°" + ], + "KES": [ + "KES", + "кенійÑкі шылінг" + ], + "KGS": [ + "KGS", + "кіргізÑкі Ñом" + ], + "KHR": [ + "KHR", + "камбаджыйÑкі рыÑль" + ], + "KMF": [ + "KMF", + "каморÑкі франк" + ], + "KPW": [ + "KPW", + "паўночнакарÑйÑÐºÐ°Ñ Ð²Ð¾Ð½Ð°" + ], + "KRW": [ + "â‚©", + "паўднёвакарÑйÑÐºÐ°Ñ Ð²Ð¾Ð½Ð°" + ], + "KWD": [ + "KWD", + "кувейцкі дынар" + ], + "KYD": [ + "KYD", + "долар Кайманавых аÑтравоў" + ], + "KZT": [ + "KZT", + "казахÑтанÑкі Ñ‚ÑнгÑ" + ], + "LAK": [ + "LAK", + "лаоÑкі кіп" + ], + "LBP": [ + "LBP", + "ліванÑкі фунт" + ], + "LKR": [ + "LKR", + "шры-ланкійÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ñ–Ñ" + ], + "LRD": [ + "LRD", + "ліберыйÑкі долар" + ], + "LYD": [ + "LYD", + "лівійÑкі дынар" + ], + "MAD": [ + "MAD", + "мараканÑкі дырхам" + ], + "MDL": [ + "MDL", + "малдаўÑкі лей" + ], + "MGA": [ + "MGA", + "малагаÑійÑкі арыÑры" + ], + "MKD": [ + "MKD", + "македонÑкі дÑнар" + ], + "MMK": [ + "MMK", + "м’ÑнманÑкі к’ÑÑ‚" + ], + "MNT": [ + "MNT", + "мангольÑкі тугрык" + ], + "MOP": [ + "MOP", + "патака Макаа" + ], + "MRO": [ + "MRO", + "маўрытанÑÐºÐ°Ñ ÑžÐ³Ñ–Ñ" + ], + "MUR": [ + "MUR", + "маўрыкійÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ñ–Ñ" + ], + "MVR": [ + "MVR", + "мальдыўÑÐºÐ°Ñ Ñ€ÑƒÑ„Ñ–Ñ" + ], + "MWK": [ + "MWK", + "малавійÑÐºÐ°Ñ ÐºÐ²Ð°Ñ‡Ð°" + ], + "MXN": [ + "MX$", + "мекÑіканÑкае пеÑа" + ], + "MYR": [ + "MYR", + "малайзійÑкі рынгіт" + ], + "MZN": [ + "MZN", + "мазамбікÑкі метыкал" + ], + "NAD": [ + "NAD", + "намібійÑкі долар" + ], + "NGN": [ + "NGN", + "нігерыйÑÐºÐ°Ñ Ð½Ð°Ð¹Ñ€Ð°" + ], + "NIO": [ + "NIO", + "нікарагуанÑÐºÐ°Ñ ÐºÐ¾Ñ€Ð´Ð°Ð±Ð°" + ], + "NOK": [ + "NOK", + "нарвежÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "NPR": [ + "NPR", + "непальÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ñ–Ñ" + ], + "NZD": [ + "NZD", + "новазеландÑкі долар" + ], + "OMR": [ + "OMR", + "аманÑкі рыал" + ], + "PAB": [ + "PAB", + "панамÑкае бальбоа" + ], + "PEN": [ + "PEN", + "перуанÑкі новы Ñоль" + ], + "PGK": [ + "PGK", + "кіна" + ], + "PHP": [ + "PHP", + "філіпінÑкае пеÑа" + ], + "PKR": [ + "PKR", + "пакіÑтанÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ñ–Ñ" + ], + "PLN": [ + "PLN", + "польÑкі злоты" + ], + "PYG": [ + "PYG", + "парагвайÑкі гуарані" + ], + "QAR": [ + "QAR", + "катарÑкі рыал" + ], + "RON": [ + "RON", + "румынÑкі лей" + ], + "RSD": [ + "RSD", + "ÑербÑкі дынар" + ], + "RUB": [ + "₽", + "раÑійÑкі рубель" + ], + "RWF": [ + "RWF", + "руандыйÑкі франк" + ], + "SAR": [ + "SAR", + "ÑаудаўÑкі рыÑл" + ], + "SBD": [ + "SBD", + "долар Саламонавых аÑтравоў" + ], + "SCR": [ + "SCR", + "ÑейшÑльÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ñ–Ñ" + ], + "SDG": [ + "SDG", + "ÑуданÑкі фунт" + ], + "SEK": [ + "SEK", + "шведÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "SGD": [ + "SGD", + "ÑінгапурÑкі долар" + ], + "SHP": [ + "SHP", + "фунт СвÑтой Ðлены" + ], + "SLL": [ + "SLL", + "леонÑ" + ], + "SOS": [ + "SOS", + "ÑамалійÑкі шылінг" + ], + "SRD": [ + "SRD", + "ÑурынамÑкі долар" + ], + "SSP": [ + "SSP", + "паўднёваÑуданÑкі фунт" + ], + "STD": [ + "STD", + "добра Сан-Ð¢Ð°Ð¼Ñ Ñ– ПрынÑіпі" + ], + "SYP": [ + "SYP", + "ÑірыйÑкі фунт" + ], + "SZL": [ + "SZL", + "ÑвазілендÑкі лілангені" + ], + "THB": [ + "THB", + "тайÑкі бат" + ], + "TJS": [ + "TJS", + "таджыкÑкі Ñамані" + ], + "TMT": [ + "TMT", + "туркменÑкі манат" + ], + "TND": [ + "TND", + "туніÑкі дынар" + ], + "TOP": [ + "TOP", + "танганÑÐºÐ°Ñ Ð¿Ð°Ð°Ð½Ð³Ð°" + ], + "TRY": [ + "TRY", + "турÑÑ†ÐºÐ°Ñ Ð»Ñ–Ñ€Ð°" + ], + "TTD": [ + "TTD", + "долар Трынідада Ñ– Табага" + ], + "TWD": [ + "NT$", + "новы тайваньÑкі долар" + ], + "TZS": [ + "TZS", + "танзанійÑкі шылінг" + ], + "UAH": [ + "UAH", + "украінÑÐºÐ°Ñ Ð³Ñ€Ñ‹ÑžÐ½Ð°" + ], + "UGX": [ + "UGX", + "угандыйÑкі шылінг" + ], + "USD": [ + "$", + "долар ЗШÐ" + ], + "UYU": [ + "UYU", + "уругвайÑкае пеÑа" + ], + "UZS": [ + "UZS", + "узбекÑкі Ñум" + ], + "VEF": [ + "VEF", + "венеÑуальÑкі балівар" + ], + "VND": [ + "â‚«", + "в’етнамÑкі донг" + ], + "VUV": [ + "VUV", + "вату" + ], + "WST": [ + "WST", + "ÑамаанÑÐºÐ°Ñ Ñ‚Ð°Ð»Ð°" + ], + "XAF": [ + "FCFA", + "цÑнтральнаафрыканÑкі франк КФÐ" + ], + "XCD": [ + "EC$", + "уÑходнекарыбÑкі долар" + ], + "XOF": [ + "CFA", + "заходнеафрыканÑкі франк КФÐ" + ], + "XPF": [ + "CFPF", + "французÑкі ціхаакіÑнÑкі франк" + ], + "YER": [ + "YER", + "еменÑкі рыал" + ], + "ZAR": [ + "ZAR", + "паўднёваафрыканÑкі ранд" + ], + "ZMW": [ + "ZMW", + "замбійÑÐºÐ°Ñ ÐºÐ²Ð°Ñ‡Ð°" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bg.json new file mode 100644 index 0000000000000000000000000000000000000000..7f0e91965eab755ec9e89acb16a52680b1d4ec39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bg.json @@ -0,0 +1,1029 @@ +{ + "Version": "2.1.30.6", + "Names": { + "ADP": [ + "ADP", + "ÐндорÑка пеÑета" + ], + "AED": [ + "AED", + "Дирхам на Обединените арабÑки емирÑтва" + ], + "AFA": [ + "AFA", + "ÐфганиÑтанÑки афган (1927–2002)" + ], + "AFN": [ + "AFN", + "ÐфганиÑтанÑки афган" + ], + "ALL": [ + "ALL", + "ÐлбанÑки лек" + ], + "AMD": [ + "AMD", + "ÐрменÑки драм" + ], + "ANG": [ + "ANG", + "ÐнтилÑки гулден" + ], + "AOA": [ + "AOA", + "ÐнголÑка кванза" + ], + "AOK": [ + "AOK", + "ÐнголÑка кванца (1977–1990)" + ], + "AON": [ + "AON", + "ÐнголÑка нова кванца (1990–2000)" + ], + "AOR": [ + "AOR", + "ÐнголÑка нова кванца (1995–1999)" + ], + "ARA": [ + "ARA", + "ÐржентинÑки авÑтрал" + ], + "ARP": [ + "ARP", + "ÐржентинÑко пеÑо (1983–1985)" + ], + "ARS": [ + "ARS", + "ÐржентинÑко пеÑо" + ], + "ATS": [ + "ATS", + "ÐвÑтрийÑки шилинг" + ], + "AUD": [ + "AUD", + "ÐвÑтралийÑки долар" + ], + "AWG": [ + "AWG", + "ÐрубÑки флорин" + ], + "AZM": [ + "AZM", + "ÐзербайджанÑки манат (1993–2006)" + ], + "AZN": [ + "AZN", + "ÐзербайджанÑки манат" + ], + "BAD": [ + "BAD", + "БоÑна и Херцеговина-динар" + ], + "BAM": [ + "BAM", + "БоÑненÑка конвертируема марка" + ], + "BBD": [ + "BBD", + "БарбадоÑки долар" + ], + "BDT": [ + "BDT", + "Бангладешка така" + ], + "BEC": [ + "BEC", + "БелгийÑки франк (конвертируем)" + ], + "BEF": [ + "BEF", + "БелгийÑки франк" + ], + "BEL": [ + "BEL", + "БелгийÑки франк (финанÑов)" + ], + "BGL": [ + "BGL", + "БългарÑки конвертируем лев (1962–1999)" + ], + "BGN": [ + "лв.", + "БългарÑки лев" + ], + "BHD": [ + "BHD", + "БахрейнÑки динар" + ], + "BIF": [ + "BIF", + "БурундийÑки франк" + ], + "BMD": [ + "BMD", + "БермудÑки долар" + ], + "BND": [ + "BND", + "БрунейÑки долар" + ], + "BOB": [ + "BOB", + "БоливийÑко боливиано" + ], + "BOP": [ + "BOP", + "БоливийÑко пеÑо" + ], + "BOV": [ + "BOV", + "БоливийÑки мвдол" + ], + "BRB": [ + "BRB", + "БразилÑко ново крузейро (1967–1986)" + ], + "BRC": [ + "BRC", + "БразилÑко крозадо" + ], + "BRE": [ + "BRE", + "БразилÑко крузейро (1990–1993)" + ], + "BRL": [ + "BRL", + "БразилÑки реал" + ], + "BRN": [ + "BRN", + "БразилÑко ново крозадо" + ], + "BRR": [ + "BRR", + "БразилÑко крузейро" + ], + "BSD": [ + "BSD", + "БахамÑки долар" + ], + "BTN": [ + "BTN", + "БутанÑки нгултрум" + ], + "BUK": [ + "BUK", + "БирманÑки киат" + ], + "BWP": [ + "BWP", + "БотÑванÑка пула" + ], + "BYB": [ + "BYB", + "БеларуÑка нова рубла (1994–1999)" + ], + "BYN": [ + "BYN", + "БеларуÑка рубла" + ], + "BYR": [ + "BYR", + "БеларуÑка рубла (2000–2016)" + ], + "BZD": [ + "BZD", + "БелизийÑки долар" + ], + "CAD": [ + "CAD", + "КанадÑки долар" + ], + "CDF": [ + "CDF", + "КонгоанÑки франк" + ], + "CHE": [ + "CHE", + "WIR евро" + ], + "CHF": [ + "CHF", + "ШвейцарÑки франк" + ], + "CHW": [ + "CHW", + "WIR франк" + ], + "CLF": [ + "CLF", + "УÑловна разчетна единица на Чили" + ], + "CLP": [ + "CLP", + "ЧилийÑко пеÑо" + ], + "CNY": [ + "CNY", + "КитайÑки юан" + ], + "COP": [ + "COP", + "КолумбийÑко пеÑо" + ], + "COU": [ + "COU", + "КолумбийÑка единица на реалната ÑтойноÑÑ‚" + ], + "CRC": [ + "CRC", + "КоÑтариканÑки колон" + ], + "CSD": [ + "CSD", + "Стар ÑръбÑки динар" + ], + "CSK": [ + "CSK", + "ЧехоÑловашка конвертируема крона" + ], + "CUC": [ + "CUC", + "КубинÑко конвертируемо пеÑо" + ], + "CUP": [ + "CUP", + "КубинÑко пеÑо" + ], + "CVE": [ + "CVE", + "ЕÑкудо на Кабо Верде" + ], + "CYP": [ + "CYP", + "КипърÑка лира" + ], + "CZK": [ + "CZK", + "Чешка крона" + ], + "DDM": [ + "DDM", + "ИзточногерманÑка марка" + ], + "DEM": [ + "DEM", + "ГерманÑка марка" + ], + "DJF": [ + "DJF", + "ДжибутÑки франк" + ], + "DKK": [ + "DKK", + "ДатÑка крона" + ], + "DOP": [ + "DOP", + "ДоминиканÑко пеÑо" + ], + "DZD": [ + "DZD", + "ÐлжирÑки динар" + ], + "ECS": [ + "ECS", + "ЕквадорÑко Ñукре" + ], + "ECV": [ + "ECV", + "ЕквадорÑка банкова единица" + ], + "EEK": [ + "EEK", + "ЕÑтонÑка крона" + ], + "EGP": [ + "EGP", + "ЕгипетÑка лира" + ], + "ERN": [ + "ERN", + "ЕритрейÑка накфа" + ], + "ESP": [ + "ESP", + "ИÑпанÑка пеÑета" + ], + "ETB": [ + "ETB", + "ЕтиопÑки бир" + ], + "EUR": [ + "€", + "Евро" + ], + "FIM": [ + "FIM", + "ФинландÑка марка" + ], + "FJD": [ + "FJD", + "ФиджийÑки долар" + ], + "FKP": [ + "FKP", + "ФолклендÑка лира" + ], + "FRF": [ + "FRF", + "ФренÑки франк" + ], + "GBP": [ + "GBP", + "БританÑка лира" + ], + "GEK": [ + "GEK", + "ГрузинÑки купон" + ], + "GEL": [ + "GEL", + "ГрузинÑки лари" + ], + "GHC": [ + "GHC", + "ГанайÑко Ñеди (1979–2007)" + ], + "GHS": [ + "GHS", + "ГанайÑко Ñеди" + ], + "GIP": [ + "GIP", + "ГибралтарÑка лира" + ], + "GMD": [ + "GMD", + "ГамбийÑко далаÑи" + ], + "GNF": [ + "GNF", + "ГвинейÑки франк" + ], + "GNS": [ + "GNS", + "ГвинейÑка Ñили" + ], + "GQE": [ + "GQE", + "Екваториално гвинейÑко еквеле" + ], + "GRD": [ + "GRD", + "Гръцка драхма" + ], + "GTQ": [ + "GTQ", + "ГватемалÑки кетцал" + ], + "GWE": [ + "GWE", + "ЕÑкудо от ПортугалÑка ГвинеÑ" + ], + "GWP": [ + "GWP", + "ГвинеÑ-БиÑау пеÑо" + ], + "GYD": [ + "GYD", + "ГаÑнÑки долар" + ], + "HKD": [ + "HKD", + "ХонконгÑки долар" + ], + "HNL": [ + "HNL", + "ХондураÑка лемпира" + ], + "HRD": [ + "HRD", + "ХърватÑки динар" + ], + "HRK": [ + "HRK", + "ХърватÑка куна" + ], + "HTG": [ + "HTG", + "ХаитÑки гурд" + ], + "HUF": [ + "HUF", + "УнгарÑки форинт" + ], + "IDR": [ + "IDR", + "ИндонезийÑка рупиÑ" + ], + "IEP": [ + "IEP", + "ИрландÑка лира" + ], + "ILP": [ + "ILP", + "ИзраелÑка лира" + ], + "ILS": [ + "ILS", + "ИзраелÑки нов шекел" + ], + "INR": [ + "INR", + "ИндийÑка рупиÑ" + ], + "IQD": [ + "IQD", + "ИракÑки динар" + ], + "IRR": [ + "IRR", + "ИранÑки риал" + ], + "ISK": [ + "ISK", + "ИÑландÑка крона" + ], + "ITL": [ + "ITL", + "ИталианÑка лира" + ], + "JMD": [ + "JMD", + "ЯмайÑки долар" + ], + "JOD": [ + "JOD", + "ЙорданÑки динар" + ], + "JPY": [ + "JPY", + "ЯпонÑка йена" + ], + "KES": [ + "KES", + "КенийÑки шилинг" + ], + "KGS": [ + "KGS", + "КиргизÑтанÑки Ñом" + ], + "KHR": [ + "KHR", + "КамбоджанÑки риел" + ], + "KMF": [ + "KMF", + "КоморÑки франк" + ], + "KPW": [ + "KPW", + "СевернокорейÑки вон" + ], + "KRW": [ + "KRW", + "ЮжнокорейÑки вон" + ], + "KWD": [ + "KWD", + "КувейтÑки динар" + ], + "KYD": [ + "KYD", + "Кайманов долар" + ], + "KZT": [ + "KZT", + "КазахÑтанÑко тенге" + ], + "LAK": [ + "LAK", + "ЛаоÑки кип" + ], + "LBP": [ + "LBP", + "ЛиванÑка лира" + ], + "LKR": [ + "LKR", + "ШриланкÑка рупиÑ" + ], + "LRD": [ + "LRD", + "ЛиберийÑки долар" + ], + "LSL": [ + "LSL", + "ЛеÑотÑко лоти" + ], + "LTL": [ + "LTL", + "ЛитовÑки литаÑ" + ], + "LTT": [ + "LTT", + "ЛитовÑки талон" + ], + "LUF": [ + "LUF", + "ЛюкÑембургÑки франк" + ], + "LVL": [ + "LVL", + "ЛатвийÑки лат" + ], + "LVR": [ + "LVR", + "ЛатвийÑка рубла" + ], + "LYD": [ + "LYD", + "ЛибийÑки динар" + ], + "MAD": [ + "MAD", + "МароканÑки дирхам" + ], + "MAF": [ + "MAF", + "МароканÑки франк" + ], + "MDL": [ + "MDL", + "МолдовÑко леу" + ], + "MGA": [ + "MGA", + "Малгашко ариари" + ], + "MGF": [ + "MGF", + "Малгашки франк - МадагаÑкар" + ], + "MKD": [ + "MKD", + "МакедонÑки денар" + ], + "MLF": [ + "MLF", + "МалийÑки франк" + ], + "MMK": [ + "MMK", + "МианмарÑки киÑÑ‚" + ], + "MNT": [ + "MNT", + "МонголÑки тугрик" + ], + "MOP": [ + "MOP", + "Патака на Макао" + ], + "MRO": [ + "MRO", + "МавританÑка угиÑ" + ], + "MTL": [ + "MTL", + "МалтийÑка лира" + ], + "MUR": [ + "MUR", + "МаврицийÑка рупиÑ" + ], + "MVR": [ + "MVR", + "МалдивÑка руфиÑ" + ], + "MWK": [ + "MWK", + "МалавийÑка квача" + ], + "MXN": [ + "MXN", + "МекÑиканÑко пеÑо" + ], + "MXP": [ + "MXP", + "МекÑиканÑко Ñребърно пеÑо (1861–1992)" + ], + "MXV": [ + "MXV", + "МекÑиканÑка конвертируема единица (UDI)" + ], + "MYR": [ + "MYR", + "МалайзийÑки рингит" + ], + "MZE": [ + "MZE", + "МозамбикÑко еÑкудо" + ], + "MZM": [ + "MZM", + "МозамбикÑки метикал (1980–2006)" + ], + "MZN": [ + "MZN", + "МозамбикÑки метикал" + ], + "NAD": [ + "NAD", + "ÐамибийÑки долар" + ], + "NGN": [ + "NGN", + "ÐигерийÑка найра" + ], + "NIC": [ + "NIC", + "ÐикарагуанÑка кордоба (1988–1991)" + ], + "NIO": [ + "NIO", + "ÐикарагуанÑка кордоба" + ], + "NLG": [ + "NLG", + "ХоландÑки гулден" + ], + "NOK": [ + "NOK", + "Ðорвежка крона" + ], + "NPR": [ + "NPR", + "ÐепалÑка рупиÑ" + ], + "NZD": [ + "NZD", + "ÐовозеландÑки долар" + ], + "OMR": [ + "OMR", + "ОманÑки риал" + ], + "PAB": [ + "PAB", + "ПанамÑка балбоа" + ], + "PEI": [ + "PEI", + "ПеруанÑко инти" + ], + "PEN": [ + "PEN", + "ПеруанÑки нов Ñол" + ], + "PES": [ + "PES", + "ПеруанÑки Ñол" + ], + "PGK": [ + "PGK", + "Папуа-новогвинейÑка кина" + ], + "PHP": [ + "PHP", + "ФилипинÑко пеÑо" + ], + "PKR": [ + "PKR", + "ПакиÑтанÑка рупиÑ" + ], + "PLN": [ + "PLN", + "ПолÑка злота" + ], + "PLZ": [ + "PLZ", + "ПолÑка злота (1950–1995)" + ], + "PTE": [ + "PTE", + "ПортугалÑко еÑкудо" + ], + "PYG": [ + "PYG", + "ПарагвайÑко гуарани" + ], + "QAR": [ + "QAR", + "КатарÑки риал" + ], + "RHD": [ + "RHD", + "РодезийÑки долар" + ], + "ROL": [ + "ROL", + "Стара румънÑка леÑ" + ], + "RON": [ + "RON", + "РумънÑка леÑ" + ], + "RSD": [ + "RSD", + "СръбÑки динар" + ], + "RUB": [ + "RUB", + "РуÑка рубла" + ], + "RUR": [ + "RUR", + "РуÑка рубла (1991–1998)" + ], + "RWF": [ + "RWF", + "РуандÑки франк" + ], + "SAR": [ + "SAR", + "СаудитÑкоарабÑки риал" + ], + "SBD": [ + "SBD", + "Долар на Соломоновите оÑтрови" + ], + "SCR": [ + "SCR", + "СейшелÑка рупиÑ" + ], + "SDD": [ + "SDD", + "СуданÑки динар" + ], + "SDG": [ + "SDG", + "СуданÑка лира" + ], + "SEK": [ + "SEK", + "ШведÑка крона" + ], + "SGD": [ + "SGD", + "СингапурÑки долар" + ], + "SHP": [ + "SHP", + "Лира на Света Елена" + ], + "SIT": [ + "SIT", + "СловенÑки толар" + ], + "SKK": [ + "SKK", + "Словашка крона" + ], + "SLL": [ + "SLL", + "СиералеонÑко леоне" + ], + "SOS": [ + "SOS", + "СомалийÑки шилинг" + ], + "SRD": [ + "SRD", + "СуринамÑки долар" + ], + "SRG": [ + "SRG", + "СуринамÑки гилдер" + ], + "SSP": [ + "SSP", + "ЮжноÑуданÑка лира" + ], + "STD": [ + "STD", + "Добра на Сао Томе и ПринÑипи" + ], + "SUR": [ + "SUR", + "СъветÑка рубла" + ], + "SVC": [ + "SVC", + "СалвадорÑки колон" + ], + "SYP": [ + "SYP", + "СирийÑка лира" + ], + "SZL": [ + "SZL", + "СвазилендÑки лилангени" + ], + "THB": [ + "THB", + "ТайландÑки бат" + ], + "TJR": [ + "TJR", + "ТаджикиÑтанÑка рубла" + ], + "TJS": [ + "TJS", + "ТаджикиÑтанÑки Ñомони" + ], + "TMM": [ + "TMM", + "ТуркмениÑтанÑки манат" + ], + "TMT": [ + "TMT", + "ТуркменÑки манат" + ], + "TND": [ + "TND", + "ТунизийÑки динар" + ], + "TOP": [ + "TOP", + "ТонганÑка паанга" + ], + "TPE": [ + "TPE", + "ТиморÑко еÑкудо" + ], + "TRL": [ + "TRL", + "ТурÑка лира (1922–2005)" + ], + "TRY": [ + "TRY", + "ТурÑка лира" + ], + "TTD": [ + "TTD", + "Долар на Тринидад и Тобаго" + ], + "TWD": [ + "TWD", + "ТайванÑки долар" + ], + "TZS": [ + "TZS", + "ТанзанийÑки шилинг" + ], + "UAH": [ + "UAH", + "УкраинÑка хривнÑ" + ], + "UAK": [ + "UAK", + "УкраинÑки карбованец" + ], + "UGS": [ + "UGS", + "УгандийÑки шилинг (1966–1987)" + ], + "UGX": [ + "UGX", + "УгандÑки шилинг" + ], + "USD": [ + "щ.д.", + "ЩатÑки долар" + ], + "USN": [ + "USN", + "USN" + ], + "USS": [ + "USS", + "USS" + ], + "UYI": [ + "UYI", + "УругвайÑко пеÑо (Ð¸Ð½Ð´ÐµÐºÑ Ð½Ð° инфлациÑта)" + ], + "UYP": [ + "UYP", + "УругвайÑко пеÑо (1975–1993)" + ], + "UYU": [ + "UYU", + "УругвайÑко пеÑо" + ], + "UZS": [ + "UZS", + "УзбекÑки Ñум" + ], + "VEB": [ + "VEB", + "ВенецуелÑки боливар (1871–2008)" + ], + "VEF": [ + "VEF", + "ВенецуелÑки боливар" + ], + "VND": [ + "VND", + "ВиетнамÑки донг" + ], + "VUV": [ + "VUV", + "ВануатÑко вату" + ], + "WST": [ + "WST", + "СамоанÑка тала" + ], + "XAF": [ + "FCFA", + "ЦентралноафриканÑки франк" + ], + "XCD": [ + "XCD", + "ИзточнокарибÑки долар" + ], + "XEU": [ + "XEU", + "Еку на ЕИО" + ], + "XFO": [ + "XFO", + "ФренÑки златен франк" + ], + "XOF": [ + "CFA", + "ЗападноафриканÑки франк" + ], + "XPF": [ + "CFPF", + "ФренÑкополинезийÑки франк" + ], + "YDD": [ + "YDD", + "ЙеменÑки динар" + ], + "YER": [ + "YER", + "ЙеменÑки риал" + ], + "YUD": [ + "YUD", + "ЮгоÑлавÑки твърд динар" + ], + "YUM": [ + "YUM", + "ЮгоÑлавÑки динар" + ], + "YUN": [ + "YUN", + "ЮгоÑлавÑки конвертируем динар" + ], + "ZAL": [ + "ZAL", + "ЮжноафриканÑки ранд (финанÑов)" + ], + "ZAR": [ + "ZAR", + "ЮжноафриканÑки ранд" + ], + "ZMK": [ + "ZMK", + "ЗамбийÑка квача (1968–2012)" + ], + "ZMW": [ + "ZMW", + "ЗамбийÑка куача" + ], + "ZRN": [ + "ZRN", + "ЗаирÑко ново зайре" + ], + "ZRZ": [ + "ZRZ", + "ЗаирÑко зайре" + ], + "ZWD": [ + "ZWD", + "ЗимбабвийÑки долар" + ], + "ZWL": [ + "ZWL", + "ЗимбабвийÑки долар (2009)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bm.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bm.json new file mode 100644 index 0000000000000000000000000000000000000000..a87eda05b252a4d66e71a641020d056886be38d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bm.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AED": [ + "AED", + "arabu mara kafoli Diram" + ], + "AOA": [ + "AOA", + "angola Kwanza" + ], + "AUD": [ + "A$", + "ositirali Dolar" + ], + "BHD": [ + "BHD", + "bareyini Dinar" + ], + "BIF": [ + "BIF", + "burundi FraÅ‹" + ], + "BWP": [ + "BWP", + "bÉ”tisiwana Pula" + ], + "CAD": [ + "CA$", + "kanada Dolar" + ], + "CDF": [ + "CDF", + "kongole FraÅ‹" + ], + "CHF": [ + "CHF", + "suwisi FraÅ‹" + ], + "CNY": [ + "CNÂ¥", + "siniwa Yuwan" + ], + "CVE": [ + "CVE", + "capivÉ›rdi Esekudo" + ], + "DJF": [ + "DJF", + "jibuti FraÅ‹" + ], + "DZD": [ + "DZD", + "alizeri Dinar" + ], + "EGP": [ + "EGP", + "eziputi Livri" + ], + "ERN": [ + "ERN", + "eritere Nafika" + ], + "ETB": [ + "ETB", + "etiopi Bir" + ], + "EUR": [ + "€", + "ero" + ], + "GBP": [ + "£", + "angilÉ› Livri" + ], + "GHC": [ + "GHC", + "gana Sedi" + ], + "GMD": [ + "GMD", + "gambi Dalasi" + ], + "GNS": [ + "GNS", + "gine FraÅ‹" + ], + "INR": [ + "₹", + "Ændu Rupi" + ], + "JPY": [ + "JPÂ¥", + "zapÉ”ne YÉ›n" + ], + "KES": [ + "KES", + "keniya Siling" + ], + "KMF": [ + "KMF", + "komÉ”ri FraÅ‹" + ], + "LRD": [ + "LRD", + "liberiya Dolar" + ], + "LSL": [ + "LSL", + "lesoto Loti" + ], + "LYD": [ + "LYD", + "libi Dinar" + ], + "MAD": [ + "MAD", + "marÉ”ku Diram" + ], + "MGA": [ + "MGA", + "madagasikari FraÅ‹" + ], + "MRO": [ + "MRO", + "mÉ”ritani Uguwiya" + ], + "MUR": [ + "MUR", + "morisi Rupi" + ], + "MWK": [ + "MWK", + "malawi Kwaca" + ], + "MZM": [ + "MZM", + "mozanbiki Metikali" + ], + "NAD": [ + "NAD", + "namibi Dolar" + ], + "NGN": [ + "NGN", + "nizeriya NÉ›ra" + ], + "RWF": [ + "RWF", + "ruwanda FraÅ‹" + ], + "SAR": [ + "SAR", + "sawudiya Riyal" + ], + "SCR": [ + "SCR", + "sesÉ›li Rupi" + ], + "SDG": [ + "SDG", + "sudani Dinar" + ], + "SDP": [ + "SDP", + "sudani Livri" + ], + "SHP": [ + "SHP", + "ÆlÉ›ni-Senu Livri" + ], + "SLL": [ + "SLL", + "siyeralewÉ”ni LewÉ”ni" + ], + "SOS": [ + "SOS", + "somali Siling" + ], + "STD": [ + "STD", + "sawotome Dobra" + ], + "SZL": [ + "SZL", + "swazilandi Lilangeni" + ], + "TND": [ + "TND", + "tunizi Dinar" + ], + "TZS": [ + "TZS", + "tanzani Siling" + ], + "UGX": [ + "UGX", + "uganda Siling" + ], + "USD": [ + "US$", + "ameriki Dolar" + ], + "XAF": [ + "FCFA", + "sefa FraÅ‹ (BEAC)" + ], + "XOF": [ + "CFA", + "sefa FraÅ‹ (BCEAO)" + ], + "ZAR": [ + "ZAR", + "sudafriki Randi" + ], + "ZMK": [ + "ZMK", + "zambi Kwaca (1968–2012)" + ], + "ZMW": [ + "ZMW", + "zambi Kwaca" + ], + "ZWD": [ + "ZWD", + "zimbabuwe Dolar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bn.json new file mode 100644 index 0000000000000000000000000000000000000000..83f4bb6ff49ccd957eb995fbb886c216e2fdf5cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bn.json @@ -0,0 +1,1061 @@ +{ + "Version": "2.1.29.44", + "Names": { + "ADP": [ + "ADP", + "à¦à§à¦¯à¦¾à¦¨à§à¦¡à§‹à¦°à¦¾à¦¨ পেসেতা" + ], + "AED": [ + "AED", + "সংযà§à¦•à§à¦¤ আরব আমিরাত দিরহাম" + ], + "AFA": [ + "AFA", + "আফগানি (১৯২৭–২০০২)" + ], + "AFN": [ + "AFN", + "আফগান আফগানি" + ], + "ALL": [ + "ALL", + "আলবেনিয়ান লেক" + ], + "AMD": [ + "AMD", + "আরমেনিয়ান দà§à¦°à¦¾à¦®" + ], + "ANG": [ + "ANG", + "নেদারলà§à¦¯à¦¾à¦¨à§à¦¡ à¦à§à¦¯à¦¾à¦¨à§à¦Ÿà¦¿à¦²à¦¿à¦¯à¦¼à¦¾à¦¨ গà§à¦²à§à¦¡à§‡à¦°" + ], + "AOA": [ + "AOA", + "à¦à§à¦¯à¦¾à¦™à§à¦—োলান কওয়ানজা" + ], + "AOK": [ + "AOK", + "à¦à§à¦¯à¦¾à¦™à§à¦—োলান কওয়ানজা (১৯৭৭–১৯৯০)" + ], + "AON": [ + "AON", + "à¦à§à¦¯à¦¾à¦™à§à¦—োলান নতà§à¦¨ কওয়ানজা (১৯৯৫–২০০০)" + ], + "AOR": [ + "AOR", + "à¦à§à¦¯à¦¾à¦™à§à¦—োলান কওয়ানজা (১৯৯৫–১৯৯৯)" + ], + "ARA": [ + "ARA", + "আরà§à¦œà§‡à¦¨à§à¦Ÿà¦¿à¦¨à¦¾ অসà§à¦Ÿà§à¦°à¦¾à¦²" + ], + "ARP": [ + "ARP", + "আরà§à¦œà§‡à¦¨à§à¦Ÿà¦¿à¦¨à¦¾ পেসো (১৯৮৩–১৯৮৫)" + ], + "ARS": [ + "ARS", + "আরà§à¦œà§‡à¦¨à§à¦Ÿà¦¿à¦¨à¦¾ পেসো" + ], + "ATS": [ + "ATS", + "অসà§à¦Ÿà§à¦°à¦¿à¦¯à¦¼à¦¾à¦¨ শিলিং" + ], + "AUD": [ + "A$", + "অসà§à¦Ÿà§à¦°à§‡à¦²à¦¿à¦¯à¦¼à¦¾à¦¨ ডলার" + ], + "AWG": [ + "AWG", + "আরà§à¦¬à¦¾ গিলà§à¦¡à¦¾à¦°" + ], + "AZM": [ + "AZM", + "আজারবাইজান মানাত (১৯৯৩–২০০৬)" + ], + "AZN": [ + "AZN", + "আজারবাইজান মানাত" + ], + "BAD": [ + "BAD", + "বসনিয়া à¦à¦¬à¦‚ হারà§à¦œà§‡à¦—োভিনা দিনার" + ], + "BAM": [ + "BAM", + "বসনিয়া à¦à¦¬à¦‚ হারà§à¦œà§‡à¦—োভিনা মারà§à¦•" + ], + "BBD": [ + "BBD", + "বারà§à¦¬à§‡à¦¡à§‹à¦œ ডলার" + ], + "BDT": [ + "à§³", + "বাংলাদেশী টাকা" + ], + "BEC": [ + "BEC", + "বেলজিয়ান ফà§à¦°à¦¾à¦™à§à¦• (রূপানà§à¦¤à¦°à¦¯à§‹à¦—à§à¦¯)" + ], + "BEF": [ + "BEF", + "বেলজিয়ান ফà§à¦°à¦¾à¦™à§à¦•" + ], + "BEL": [ + "BEL", + "বেলজিয়ান ফà§à¦°à¦¾à¦™à§à¦• (আরà§à¦¥à¦¿à¦•)" + ], + "BGL": [ + "BGL", + "বà§à¦²à¦—েরীয় হারà§à¦¡ লেভ" + ], + "BGN": [ + "BGN", + "বà§à¦²à¦—েরীয় নিউ লেভ" + ], + "BHD": [ + "BHD", + "বাহরাইনি দিনার" + ], + "BIF": [ + "BIF", + "বà§à¦°à§à¦¨à§à¦¡à¦¿ ফà§à¦°à¦¾à¦™à§à¦•" + ], + "BMD": [ + "BMD", + "বারমিউডান ডলার" + ], + "BND": [ + "BND", + "বà§à¦°à§à¦¨à§‡à¦‡ ডলার" + ], + "BOB": [ + "BOB", + "বলিভিয়ানো" + ], + "BOP": [ + "BOP", + "বলিভিয়ান পেসো" + ], + "BOV": [ + "BOV", + "বলিভিয়ান মভডোল" + ], + "BRB": [ + "BRB", + "বà§à¦°à¦¾à¦œà¦¿à¦²à¦¿à¦¯à¦¼à¦¾à¦¨ কà§à¦°à§à¦œà§‡à¦¯à¦¼à¦°à§‹à¦¨à§‹à¦­à§‹ (১৯৬৭–১৯৮৬)" + ], + "BRC": [ + "BRC", + "বà§à¦°à¦¾à¦œà¦¿à¦²à¦¿à¦¯à¦¼à¦¾à¦¨ কà§à¦°à§à¦œà§‡à¦‡à¦¡à¦¾à¦‰" + ], + "BRE": [ + "BRE", + "বà§à¦°à¦¾à¦œà¦¿à¦²à¦¿à¦¯à¦¼à¦¾à¦¨ কà§à¦°à§à¦œà§‡à¦¯à¦¼à¦°à§‹ (১৯৯০–১৯৯৩)" + ], + "BRL": [ + "R$", + "বà§à¦°à¦¾à¦œà¦¿à¦²à¦¿à¦¯à¦¼à¦¾à¦¨ রিয়েল" + ], + "BRN": [ + "BRN", + "বà§à¦°à¦¾à¦œà¦¿à¦²à¦¿à¦¯à¦¼à¦¾à¦¨ কà§à¦°à§à¦œà§‡à¦‡à¦¡à§‹ নোভো" + ], + "BRR": [ + "BRR", + "বà§à¦°à¦¾à¦œà¦¿à¦²à¦¿à¦¯à¦¼à¦¾à¦¨ কà§à¦°à§à¦œà§‡à¦¯à¦¼à¦°à§‹" + ], + "BSD": [ + "BSD", + "বাহামিয়ান ডলার" + ], + "BTN": [ + "BTN", + "ভà§à¦Ÿà¦¾à¦¨à¦¿ à¦à¦¨à¦—à§à¦²à§à¦Ÿà§à¦°à§à¦®" + ], + "BUK": [ + "BUK", + "বরà§à¦®à¦¿ কিয়াৎ" + ], + "BWP": [ + "BWP", + "বতসোয়ানা পà§à¦²à¦¾" + ], + "BYB": [ + "BYB", + "বেলারà§à¦¶à¦¿à¦¯à¦¼à¦¾à¦¨ নিউ রà§à¦¬à§‡à¦² (১৯৯৪–১৯৯৯)" + ], + "BYN": [ + "BYN", + "বেলারà§à¦¶à¦¿à¦¯à¦¼à¦¾à¦¨ রà§à¦¬à§‡à¦²" + ], + "BYR": [ + "BYR", + "বেলারà§à¦¶à¦¿à¦¯à¦¼à¦¾à¦¨ রà§à¦¬à§‡à¦² (2000–2016)" + ], + "BZD": [ + "BZD", + "বেলিজ ডলার" + ], + "CAD": [ + "CA$", + "কানাডিয়ান ডলার" + ], + "CDF": [ + "CDF", + "কঙà§à¦—োলিস ফà§à¦°à§à¦¯à¦¾à¦™à§à¦•" + ], + "CHE": [ + "CHE", + "সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦¨à§à¦¡ ইউরো" + ], + "CHF": [ + "CHF", + "সà§à¦‡à¦¸ ফà§à¦°à¦¾à¦" + ], + "CHW": [ + "CHW", + "সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦¨à§à¦¡ ফà§à¦°à¦¾à¦™à§à¦•" + ], + "CLF": [ + "CLF", + "চিলিয়ান উনিদাদেস দি ফোমেনà§à¦¤à§‹" + ], + "CLP": [ + "CLP", + "চিলি পেসো" + ], + "CNY": [ + "CNÂ¥", + "চীনা য়à§à¦¯à¦¼à¦¾à¦¨" + ], + "COP": [ + "COP", + "কলোমà§à¦¬à¦¿à¦¯à¦¼à¦¾à¦¨ পেসো" + ], + "COU": [ + "COU", + "উনিদাদ দি ভà§à¦¯à¦¾à¦²à§‹à¦° রিয়েল" + ], + "CRC": [ + "CRC", + "কোসà§à¦Ÿà¦¾ রিকা কোলোন" + ], + "CSD": [ + "CSD", + "পà§à¦°à¦¾à¦šà§€à¦¨ সারবিয়ান দিনার" + ], + "CSK": [ + "CSK", + "চেকোসà§à¦²à§‹à¦­à¦¾à¦• হারà§à¦¡ কোরà§à¦¨à¦¾" + ], + "CUC": [ + "CUC", + "কিউবান রূপানà§à¦¤à¦°à¦¯à§‹à¦—à§à¦¯ পেসো" + ], + "CUP": [ + "CUP", + "কিউবান পেসো" + ], + "CVE": [ + "CVE", + "কেপ ভারà§à¦¦à§‡ à¦à¦¸à¦•à§à¦¡à§‹" + ], + "CYP": [ + "CYP", + "সাইপà§à¦°à¦¾à¦¸ পাউনà§à¦¡" + ], + "CZK": [ + "CZK", + "চেক পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦° কোরà§à¦¨à¦¾" + ], + "DDM": [ + "DDM", + "পূরà§à¦¬ জারà§à¦®à¦¾à¦¨ মারà§à¦•" + ], + "DEM": [ + "DEM", + "ডয়চৠমারà§à¦•" + ], + "DJF": [ + "DJF", + "জিবà§à¦¤à¦¿ ফà§à¦°à¦¾à¦™à§à¦•" + ], + "DKK": [ + "DKK", + "ডà§à¦¯à¦¾à¦¨à¦¿à¦¶ কà§à¦°à§Œà¦¨" + ], + "DOP": [ + "DOP", + "ডোমিনিকান পেসো" + ], + "DZD": [ + "DZD", + "আলজেরীয় দিনার" + ], + "ECS": [ + "ECS", + "ইকà§à¦¯à¦¼à¦¾à¦¡à§‹à¦° সà§à¦•à§à¦°à§‡" + ], + "ECV": [ + "ECV", + "ইকà§à¦¯à¦¼à¦¾à¦¡à§‹à¦° উনিদাদেস দি ভেলর কনসতানà§à¦¤à§‡ (ইউভিসি)" + ], + "EEK": [ + "EEK", + "à¦à¦¸à§à¦¤à§‹à¦¨à¦¿à¦¯à¦¼à¦¾ কà§à¦°à§à¦¨à¦¿" + ], + "EGP": [ + "EGP", + "মিশরীয় পাউনà§à¦¡" + ], + "ERN": [ + "ERN", + "à¦à¦°à¦¿à¦Ÿà§à¦°à¦¿à¦¯à¦¼à§‡à¦¨ নাকফা" + ], + "ESA": [ + "ESA", + "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ পেসেতা (à¦à¦•ই হিসাব)" + ], + "ESB": [ + "ESB", + "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ পেসেতা (রূপানà§à¦¤à¦°à¦¯à§‹à¦—à§à¦¯ হিসাব)" + ], + "ESP": [ + "ESP", + "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ পেসেতা" + ], + "ETB": [ + "ETB", + "ইথিওপিয়ান বির" + ], + "EUR": [ + "€", + "ইউরো" + ], + "FIM": [ + "FIM", + "ফিনিস মারà§à¦•া" + ], + "FJD": [ + "FJD", + "ফিজি ডলার" + ], + "FKP": [ + "FKP", + "ফকলà§à¦¯à¦¾à¦¨à§à¦¡ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ পাউনà§à¦¡" + ], + "FRF": [ + "FRF", + "ফরাসি ফà§à¦°à¦¾à¦™à§à¦•" + ], + "GBP": [ + "£", + "বà§à¦°à¦¿à¦Ÿà¦¿à¦¶ পাউনà§à¦¡" + ], + "GEK": [ + "GEK", + "জরà§à¦œà¦¿à¦¯à¦¼à¦¾à¦¨ কà§à¦ªà¦¨ লারিট" + ], + "GEL": [ + "GEL", + "জরà§à¦œà¦¿à¦¯à¦¼à¦¾à¦¨ লারি" + ], + "GHC": [ + "GHC", + "ঘানা সেডি (১৯৭৯–২০০৭)" + ], + "GHS": [ + "GHS", + "ঘানা সেডি" + ], + "GIP": [ + "GIP", + "জিবà§à¦°à¦¾à¦²à§à¦Ÿà¦¾à¦° পাউনà§à¦¡" + ], + "GMD": [ + "GMD", + "গামà§à¦¬à¦¿à¦¯à¦¼à¦¾ ডালাসি" + ], + "GNF": [ + "GNF", + "গিনি ফà§à¦°à¦¾à¦™à§à¦•" + ], + "GNS": [ + "GNS", + "গিনি সাইলি" + ], + "GQE": [ + "GQE", + "ইকà§à¦¯à¦¼à§‡à¦Ÿà§‹à¦°à¦¿à¦¯à¦¼à¦¾à¦² গিনি ইকà§à¦¯à¦¼à¦¿à¦²à¦¿" + ], + "GRD": [ + "GRD", + "গà§à¦°à§€à¦• দà§à¦°à¦¾à¦šà¦®à¦¾" + ], + "GTQ": [ + "GTQ", + "গà§à¦¯à¦¼à¦¾à¦¤à§‡à¦®à¦¾à¦²à¦¾ কà§à¦¯à¦¼à§‡à§Žà¦œà¦¾à¦²" + ], + "GWE": [ + "GWE", + "পরà§à¦¤à§à¦—িজ গিনি à¦à¦¸à¦•à§à¦¡à§‹" + ], + "GWP": [ + "GWP", + "গিনি বিসাউ পেসো" + ], + "GYD": [ + "GYD", + "গাইয়েনা ডলার" + ], + "HKD": [ + "HK$", + "হংকং ডলার" + ], + "HNL": [ + "HNL", + "হনà§à¦¡à§à¦°à¦¾à¦¸ লেমà§à¦ªà¦¿à¦°à¦¾" + ], + "HRD": [ + "HRD", + "কà§à¦°à§‹à¦¯à¦¼à§‡à¦¶à¦¿à¦¯à¦¼à¦¾à¦¨ দিনার" + ], + "HRK": [ + "HRK", + "কà§à¦°à§‹à¦¯à¦¼à§‡à¦¶à¦¿à¦¯à¦¼à¦¾à¦¨ কà§à¦¨à¦¾" + ], + "HTG": [ + "HTG", + "হাইতি গৌরà§à¦¦à§‡" + ], + "HUF": [ + "HUF", + "হাঙà§à¦—েরিয়ান ফোরিনà§à¦Ÿ" + ], + "IDR": [ + "IDR", + "ইনà§à¦¦à§‹à¦¨à§‡à¦¶à¦¿à¦¯à¦¼à¦¾à¦¨ রà§à¦ªà¦¿à¦¯à¦¼à¦¾à¦¹" + ], + "IEP": [ + "IEP", + "ইরিশ পাউনà§à¦¡" + ], + "ILP": [ + "ILP", + "ইসà§à¦°à¦¾à¦‡à¦²à¦¿ পাউনà§à¦¡" + ], + "ILS": [ + "₪", + "ইসà§à¦°à¦¾à¦‡à¦²à¦¿ নতà§à¦¨ শেকেল" + ], + "INR": [ + "₹", + "ভারতীয় রà§à¦ªà¦¿" + ], + "IQD": [ + "IQD", + "ইরাকি দিনার" + ], + "IRR": [ + "IRR", + "ইরানিয়ান রিয়াল" + ], + "ISK": [ + "ISK", + "আইসলà§à¦¯à¦¾à¦¨à§à¦¡ কà§à¦°à§Œà¦¨" + ], + "ITL": [ + "ITL", + "ইতালীয় লিরা" + ], + "JMD": [ + "JMD", + "জামাইকান ডলার" + ], + "JOD": [ + "JOD", + "জরà§à¦¡à¦¾à¦¨à¦¿à¦¯à¦¼à¦¾à¦¨ দিনার" + ], + "JPY": [ + "JPÂ¥", + "জাপানি ইয়েন" + ], + "KES": [ + "KES", + "কেনিয়ান শিলিং" + ], + "KGS": [ + "KGS", + "কিরগিজসà§à¦¤à¦¾à¦¨ সোম" + ], + "KHR": [ + "KHR", + "কমà§à¦¬à§‹à¦¡à¦¿à¦¯à¦¼à¦¾à¦¨ রিয়েল" + ], + "KMF": [ + "KMF", + "কমà§à¦¬à§‹à¦°à§‹ ফà§à¦°à¦¾à¦™à§à¦•" + ], + "KPW": [ + "KPW", + "উতà§à¦¤à¦° কোরিয়ার ওন" + ], + "KRW": [ + "â‚©", + "দকà§à¦·à¦¿à¦£ কোরিয়ান ওন" + ], + "KWD": [ + "KWD", + "কà§à¦¯à¦¼à§‡à¦¤à¦¿ দিনার" + ], + "KYD": [ + "KYD", + "কেমà§à¦¯à¦¾à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œà§‡à¦° ডলার" + ], + "KZT": [ + "KZT", + "কাজাখাসà§à¦¤à¦¾à¦¨à¦¿ টেঙà§à¦—ে" + ], + "LAK": [ + "LAK", + "লেউশান কিপ" + ], + "LBP": [ + "LBP", + "লেবানিজ পাউনà§à¦¡" + ], + "LKR": [ + "LKR", + "শà§à¦°à§€à¦²à¦™à§à¦•ান রà§à¦ªà¦¿" + ], + "LRD": [ + "LRD", + "লিবেরিয়ান ডলার" + ], + "LSL": [ + "LSL", + "লেসà§à¦Ÿà§ লোটি" + ], + "LTL": [ + "LTL", + "লিথà§à¦‡à¦¨à¦¿à¦¯à¦¼à¦¾à¦¨ লিটা" + ], + "LTT": [ + "LTT", + "লিথà§à¦‡à¦¨à¦¿à¦¯à¦¼à¦¾à¦¨ টালোনà§à¦¯à¦¾à¦¸" + ], + "LUC": [ + "LUC", + "লà§à¦•à§à¦¸à§‡à¦®à¦¬à¦¾à¦°à§à¦— রà§à¦ªà¦¾à¦¨à§à¦¤à¦¯à§‹à¦—à§à¦¯ ফà§à¦°à¦¾à¦™à§à¦•" + ], + "LUF": [ + "LUF", + "লà§à¦•à§à¦¸à§‡à¦®à¦¬à¦¾à¦°à§à¦— ফà§à¦°à¦¾à¦™à§à¦•" + ], + "LUL": [ + "LUL", + "লà§à¦•à§à¦¸à§‡à¦®à¦¬à¦¾à¦°à§à¦— ফাইনেনশিয়াল ফà§à¦°à¦¾à¦™à§à¦•" + ], + "LVL": [ + "LVL", + "লà§à¦¯à¦¾à¦Ÿà¦­à¦¿à¦¯à¦¼à¦¾à¦¨ লà§à¦¯à¦¾à¦Ÿà§â€Œà¦¸" + ], + "LVR": [ + "LVR", + "লà§à¦¯à¦¾à¦Ÿà¦­à¦¿à¦¯à¦¼à¦¾à¦¨ রà§à¦¬à¦²" + ], + "LYD": [ + "LYD", + "লিবিয়ান ডলার" + ], + "MAD": [ + "MAD", + "মোরোকà§à¦•ান দিরহাম" + ], + "MAF": [ + "MAF", + "মোরোকà§à¦•ান ফà§à¦°à¦¾à¦™à§à¦•" + ], + "MDL": [ + "MDL", + "মোলà§à¦¡à§‹à¦­à¦¾à¦¨ লেয়à§" + ], + "MGA": [ + "MGA", + "মাদাগাসà§à¦•ার আরিয়ারি" + ], + "MGF": [ + "MGF", + "মাদাগাসà§à¦•ার ফà§à¦°à¦¾à¦™à§à¦•" + ], + "MKD": [ + "MKD", + "মà§à¦¯à¦¾à¦¸à§‡à¦¡à§‹à¦¨à¦¿à¦¯à¦¼à¦¾à¦¨ দিনার" + ], + "MLF": [ + "MLF", + "মালি ফà§à¦°à¦¾à¦™à§à¦•" + ], + "MMK": [ + "MMK", + "মায়ানমার কিয়াত" + ], + "MNT": [ + "MNT", + "মঙà§à¦—োলিয়ান তà§à¦—রিক" + ], + "MOP": [ + "MOP", + "মà§à¦¯à¦¾à¦•à§à¦¯à¦¾à¦“ পাটাকা" + ], + "MRO": [ + "MRO", + "মৌরিতানিয়ান ওউগà§à¦‡à¦¯à¦¼à¦¾" + ], + "MTL": [ + "MTL", + "মালà§à¦Ÿà¦¾ লিরা" + ], + "MTP": [ + "MTP", + "মালà§à¦Ÿà¦¾ পাউনà§à¦¡" + ], + "MUR": [ + "MUR", + "মৌরিতানিয়ান রà§à¦ªà¦¿" + ], + "MVR": [ + "MVR", + "মালদিভিয়ান রà§à¦«à¦¿à¦¯à¦¼à¦¾" + ], + "MWK": [ + "MWK", + "মালাউইয়ান কওয়াচ" + ], + "MXN": [ + "MX$", + "মà§à¦¯à¦¾à¦•à§à¦¸à¦¿à¦•ান পেসো" + ], + "MXP": [ + "MXP", + "মà§à¦¯à¦¾à¦•à§à¦¸à¦¿à¦•ান সিলভার পেসো (১৮৬১–১৯৯২)" + ], + "MXV": [ + "MXV", + "মেকà§à¦¸à¦¿à¦•ান উনিদাদ দি ইনভারà§à¦¸à¦¾à¦¨ (UDI)" + ], + "MYR": [ + "MYR", + "মালয়েশিয়ান রিঙà§à¦—িৎ" + ], + "MZE": [ + "MZE", + "মোজামà§à¦¬à¦¿à¦• à¦à¦¸à¦•à§à¦¡à§‹" + ], + "MZM": [ + "MZM", + "পà§à¦°à¦¾à¦šà§€à¦¨ মোজামà§à¦¬à¦¿à¦• মেটিকেল" + ], + "MZN": [ + "MZN", + "মোজামà§à¦¬à¦¿à¦• মেটিকেল" + ], + "NAD": [ + "NAD", + "নামিবিয়া ডলার" + ], + "NGN": [ + "NGN", + "নাইজেরিয়ান নায়রা" + ], + "NIC": [ + "NIC", + "নিকারাগà§à¦¯à¦¼à¦¾à¦¨ করà§à¦¡à§‹à¦¬à¦¾ (১৯৮৮–১৯৯১)" + ], + "NIO": [ + "NIO", + "নিকারাগà§à¦¯à¦¼à¦¾à¦¨ করà§à¦¡à§‹à¦¬à¦¾" + ], + "NLG": [ + "NLG", + "নেদারলà§à¦¯à¦¾à¦¨à§à¦¡ গà§à¦²à§à¦¡à§‡à¦°" + ], + "NOK": [ + "NOK", + "নরওয়ে কà§à¦°à§Œà¦¨" + ], + "NPR": [ + "NPR", + "নেপালি রà§à¦ªà¦¿" + ], + "NZD": [ + "NZ$", + "নিউজিলà§à¦¯à¦¾à¦¨à§à¦¡ ডলার" + ], + "OMR": [ + "OMR", + "ওমানি রিয়াল" + ], + "PAB": [ + "PAB", + "পানামা বেলবোয়া" + ], + "PEI": [ + "PEI", + "পেরà§à¦­à¦¿à¦¯à¦¼à¦¾à¦¨ ইনà§à¦¤à¦¿" + ], + "PEN": [ + "PEN", + "পেরà§à¦­à¦¿à¦¯à¦¼à¦¾à¦¨ সোল নà§à¦¯à¦¼à§‡à¦­à§‹" + ], + "PES": [ + "PES", + "পেরà§à¦­à¦¿à¦¯à¦¼à¦¾à¦¨ সোল" + ], + "PGK": [ + "PGK", + "পাপà§à¦¯à¦¼à¦¾ নিউ গিনিয়ান কিনা" + ], + "PHP": [ + "PHP", + "ফিলিপাইন পেসো" + ], + "PKR": [ + "PKR", + "পাকিসà§à¦¤à¦¾à¦¨à¦¿ রà§à¦ªà¦¿" + ], + "PLN": [ + "PLN", + "পোলিশ জà§à¦²à§‹à¦Ÿà¦¿" + ], + "PLZ": [ + "PLZ", + "পোলিশ জà§à¦²à§‹à¦Ÿà¦¿ (১৯৫০–১৯৯৫)" + ], + "PTE": [ + "PTE", + "পরà§à¦¤à§à¦—িজ à¦à¦¸à¦•à§à¦¡à§‹" + ], + "PYG": [ + "PYG", + "পà§à¦¯à¦¾à¦°à¦¾à¦—à§à¦¯à¦¼à¦¾à¦¨ গà§à¦¯à¦¼à¦¾à¦°à¦¾à¦¨à¦¿" + ], + "QAR": [ + "QAR", + "কাতার রিয়à§à¦¯à¦¾à¦²" + ], + "RHD": [ + "RHD", + "রোডেশিয়ান ডলার" + ], + "ROL": [ + "ROL", + "পà§à¦°à¦¾à¦šà§€à¦¨ রà§à¦®à¦¾à¦¨à¦¿à¦¯à¦¼à¦¾ লেয়à§" + ], + "RON": [ + "RON", + "রà§à¦®à¦¾à¦¨à¦¿à¦¯à¦¼à¦¾ লেয়à§" + ], + "RSD": [ + "RSD", + "সারবিয়ান দিনার" + ], + "RUB": [ + "RUB", + "রাশিয়ান রà§à¦¬à§‡à¦²" + ], + "RUR": [ + "RUR", + "রাশিয়ান রà§à¦¬à¦² (১৯৯১–১৯৯৮)" + ], + "RWF": [ + "RWF", + "রà§à¦¯à¦¼à¦¾à¦¨à§à¦¡à¦¾à¦¨ ফà§à¦°à¦¾à¦™à§à¦•" + ], + "SAR": [ + "SAR", + "সৌদি রিয়à§à¦¯à¦¾à¦²" + ], + "SBD": [ + "SBD", + "সলোমন দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ ডলার" + ], + "SCR": [ + "SCR", + "সেয়চেলà§à¦²à§‹à¦‡à¦¸ রà§à¦ªà¦¿" + ], + "SDD": [ + "SDD", + "পà§à¦°à¦¾à¦šà§€à¦¨ সà§à¦¦à¦¾à¦¨à¦¿ দিনার" + ], + "SDG": [ + "SDG", + "সà§à¦¦à¦¾à¦¨à¦¿ পাউনà§à¦¡" + ], + "SDP": [ + "SDP", + "পà§à¦°à¦¾à¦šà§€à¦¨ সà§à¦¦à¦¾à¦¨à¦¿ পাউনà§à¦¡" + ], + "SEK": [ + "SEK", + "সà§à¦‡à¦¡à¦¿à¦¶ কà§à¦°à§‹à¦¨à¦¾" + ], + "SGD": [ + "SGD", + "সিঙà§à¦—াপà§à¦° ডলার" + ], + "SHP": [ + "SHP", + "সেনà§à¦Ÿ হেলেনা পাউনà§à¦¡" + ], + "SIT": [ + "SIT", + "সà§à¦²à§‹à¦­à¦¾à¦¨à¦¿à¦¯à¦¼à¦¾ টোলার" + ], + "SKK": [ + "SKK", + "সà§à¦²à§‹à¦­à¦¾à¦• কোরà§à¦¨à¦¾" + ], + "SLL": [ + "SLL", + "সিয়েরালিয়ন লিয়ন" + ], + "SOS": [ + "SOS", + "সোমালি শিলিং" + ], + "SRD": [ + "SRD", + "সà§à¦°à¦¿à¦¨à¦¾à¦® ডলার" + ], + "SRG": [ + "SRG", + "সà§à¦°à¦¿à¦¨à¦¾à¦® গিলà§à¦¡à¦¾à¦°" + ], + "SSP": [ + "SSP", + "দকà§à¦·à¦¿à¦£ সà§à¦¦à¦¾à¦¨à¦¿ পাউনà§à¦¡" + ], + "STD": [ + "STD", + "সাও টোমে à¦à¦¬à¦‚ পà§à¦°à¦¿à¦¨à§à¦¸à¦¿à¦ªà§‡ ডোবরা" + ], + "SUR": [ + "SUR", + "সোভিয়েত রà§à¦¬à¦²" + ], + "SVC": [ + "SVC", + "à¦à¦² সà§à¦¯à¦¾à¦²à¦­à§‹à¦¡à§‹à¦° কোলোন" + ], + "SYP": [ + "SYP", + "সিরিয়ান পাউনà§à¦¡" + ], + "SZL": [ + "SZL", + "সোয়াজিলà§à¦¯à¦¾à¦¨à§à¦¡ লিলাঙà§à¦—েনি" + ], + "THB": [ + "฿", + "থাই বাত" + ], + "TJR": [ + "TJR", + "তাজিকিসà§à¦¤à¦¾à¦¨ রà§à¦¬à¦²" + ], + "TJS": [ + "TJS", + "তাজিকিসà§à¦¤à¦¾à¦¨ সোমোনি" + ], + "TMM": [ + "TMM", + "তà§à¦°à§à¦•মেনিসà§à¦Ÿà¦¾à¦¨à¦¿ মানাত" + ], + "TMT": [ + "TMT", + "তà§à¦°à§à¦•মেনিসà§à¦¤à¦¾à¦¨ মানত" + ], + "TND": [ + "TND", + "তিউনেশিয়ান দিনার" + ], + "TOP": [ + "TOP", + "টোঙà§à¦—া পা’আঙà§à¦—া" + ], + "TPE": [ + "TPE", + "তিমà§à¦° à¦à¦¸à¦•à§à¦¡à§‹" + ], + "TRL": [ + "TRL", + "পà§à¦°à¦¾à¦šà§€à¦¨ তà§à¦°à§à¦•ি লিরা" + ], + "TRY": [ + "TRY", + "তà§à¦°à§à¦•ি লিরা" + ], + "TTD": [ + "TTD", + "তà§à¦°à¦¿à¦¨à¦¿à¦¦à¦¾à¦¦ à¦à¦¬à¦‚ টোবাগো ডলার" + ], + "TWD": [ + "NT$", + "নতà§à¦¨ তাইওয়ান ডলার" + ], + "TZS": [ + "TZS", + "তাঞà§à¦œà¦¨à¦¿à¦¯à¦¼à¦¾ শিলিং" + ], + "UAH": [ + "UAH", + "ইউকà§à¦°à§‡à¦‡à¦¨ হৃভনিয়া" + ], + "UAK": [ + "UAK", + "ইউকà§à¦°à§‡à¦‡à¦¨ কারà§à¦¬à§‹à¦­à§à¦¯à¦¾à¦¨à§à¦Ÿà¦¸" + ], + "UGS": [ + "UGS", + "উগানà§à¦¡à¦¾à¦¨ শিলিং (১৯৬৬–১৯৮৭)" + ], + "UGX": [ + "UGX", + "উগানà§à¦¡à¦¾à¦¨ শিলিং" + ], + "USD": [ + "US$", + "মারà§à¦•িন ডলার" + ], + "USN": [ + "USN", + "মারà§à¦•িন ডলার (পরবরà§à¦¤à§€ দিন)" + ], + "USS": [ + "USS", + "মারà§à¦•িন ডলার (à¦à¦•ই দিন)" + ], + "UYI": [ + "UYI", + "উরà§à¦—à§à¦¯à¦¼à¦¾à¦¯à¦¼à¦¾à¦¨ পেসো à¦à¦¨ উনিদাদেস ইনডেকà§à¦¸à§‡à¦¡à¦¾à¦¸" + ], + "UYP": [ + "UYP", + "উরà§à¦—à§à¦¯à¦¼à§‡ পেসো (১৯৭৫–১৯৯৩)" + ], + "UYU": [ + "UYU", + "উরà§à¦—à§à¦¯à¦¼à§‡ পেসো" + ], + "UZS": [ + "UZS", + "উজবেকিসà§à¦¤à¦¾à¦¨à¦¿ সোম" + ], + "VEB": [ + "VEB", + "ভেনিজà§à¦¯à¦¼à§‡à¦²à¦¾à¦¨ বলিভার (১৮৭১–২০০৮)" + ], + "VEF": [ + "VEF", + "ভেনিজà§à¦¯à¦¼à§‡à¦²à§€à¦¯à¦¼ বলিভার" + ], + "VND": [ + "â‚«", + "ভিয়েতনামি ডঙà§à¦—" + ], + "VUV": [ + "VUV", + "ভানà§à¦¯à¦¼à¦¾à¦¤à§ ভাতà§" + ], + "WST": [ + "WST", + "সামোয়ান টালা" + ], + "XAF": [ + "FCFA", + "মধà§à¦¯ আফà§à¦°à¦¿à¦•ান [CFA] ফà§à¦°à§à¦¯à¦¾à¦™à§à¦•" + ], + "XCD": [ + "EC$", + "পূরà§à¦¬ কà§à¦¯à¦¾à¦°à¦¾à¦¬à¦¿à¦¯à¦¼à¦¾à¦¨ ডলার" + ], + "XEU": [ + "XEU", + "ইউরোপীয় মà§à¦¦à§à¦°à¦¾ à¦à¦•ক" + ], + "XFO": [ + "XFO", + "ফরাসি গোলà§à¦¡ ফà§à¦°à¦¾à¦™à§à¦•" + ], + "XFU": [ + "XFU", + "ফরাসি ইউআইসি - ফà§à¦°à¦¾à¦™à§à¦•" + ], + "XOF": [ + "CFA", + "পশà§à¦šà¦¿à¦® আফà§à¦°à¦¿à¦•ান [CFA] ফà§à¦°à§à¦¯à¦¾à¦™à§à¦•" + ], + "XPF": [ + "CFPF", + "সিà¦à¦«à¦ªà¦¿ ফà§à¦°à§à¦¯à¦¾à¦™à§à¦•" + ], + "YDD": [ + "YDD", + "ইয়েমেনি দিনার" + ], + "YER": [ + "YER", + "ইয়েমেনি রিয়াল" + ], + "YUD": [ + "YUD", + "যà§à¦—োশà§à¦²à¦¾à¦­à¦¿à¦¯à¦¼ হারà§à¦¡ দিনার" + ], + "YUM": [ + "YUM", + "যà§à¦—োশà§à¦²à¦¾à¦­à¦¿à¦¯à¦¼ নোভি দিনার" + ], + "YUN": [ + "YUN", + "যà§à¦—োশà§à¦²à¦¾à¦­à¦¿à¦¯à¦¼ রà§à¦ªà¦¾à¦¨à§à¦¤à¦°à¦¯à§‹à¦—à§à¦¯ দিনার" + ], + "ZAL": [ + "ZAL", + "দকà§à¦·à¦¿à¦£ আফà§à¦°à¦¿à¦•ান র‌à§à¦¯à¦¾à¦¨à§à¦¡" + ], + "ZAR": [ + "ZAR", + "দকà§à¦·à¦¿à¦£ আফà§à¦°à¦¿à¦•ান রেনà§à¦¡" + ], + "ZMK": [ + "ZMK", + "জামà§à¦¬à¦¿à¦¯à¦¼à¦¾à¦¨ কওয়াচা (১৯৬৮–২০১২)" + ], + "ZMW": [ + "ZMW", + "জামà§à¦¬à¦¿à¦¯à¦¼à¦¾à¦¨ কওয়াচা" + ], + "ZRN": [ + "ZRN", + "জাইরিয়ান নিউ জাইরে" + ], + "ZRZ": [ + "ZRZ", + "জাইরিয়ান জাইরে" + ], + "ZWD": [ + "ZWD", + "জিমà§à¦¬à¦¾à¦¬à§à¦¯à¦¼à§‡ ডলার (১৯৮০–২০০৮)" + ], + "ZWL": [ + "ZWL", + "জিমà§à¦¬à¦¾à¦¬à§à¦¯à¦¼à§‡ ডলার (২০০৯)" + ], + "ZWR": [ + "ZWR", + "জিমà§à¦¬à¦¾à¦¬à§à¦¯à¦¼à§‡ ডলার (২০০৮)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bo.json new file mode 100644 index 0000000000000000000000000000000000000000..0603c9bdf5a8c26a1acae316caf0777495e481e2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bo.json @@ -0,0 +1,17 @@ +{ + "Version": "2.1.27.40", + "Names": { + "CNY": [ + "Â¥", + "ཡུ་ཨན་" + ], + "INR": [ + "₹", + "རྒྱ་གར་སྒོར་" + ], + "USD": [ + "US$", + "ཨ་རིའི་སྒོར་" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bo_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bo_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..efe4ce0b22299118c671be0d43fc4045a8a32cd7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bo_IN.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "CNY": [ + "CNÂ¥", + "ཡུ་ཨན་" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/br.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/br.json new file mode 100644 index 0000000000000000000000000000000000000000..ce8e0e5dd564c5b4db6caf60298b09f217bd71d8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/br.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.28.76", + "Names": { + "ADP": [ + "ADP", + "peseta Andorra" + ], + "AED": [ + "AED", + "dirham EAU" + ], + "AFA": [ + "AFA", + "afghani Afghanistan (1927–2002)" + ], + "AFN": [ + "AFN", + "afghani Afghanistan" + ], + "ALK": [ + "ALK", + "lek Albania (1946–1965)" + ], + "ALL": [ + "ALL", + "lek Albania" + ], + "AMD": [ + "AMD", + "dram Armenia" + ], + "ANG": [ + "ANG", + "florin Antilhez nederlandat" + ], + "AOA": [ + "AOA", + "kwanza Angola" + ], + "AOK": [ + "AOK", + "kwanza Angola (1977–1991)" + ], + "AON": [ + "AON", + "kwanza nevez Angola (1990–2000)" + ], + "AOR": [ + "AOR", + "AOR" + ], + "ARA": [ + "ARA", + "ARA" + ], + "ARL": [ + "ARL", + "ARL" + ], + "ARM": [ + "ARM", + "peso Arcʼhantina (1881–1970)" + ], + "ARP": [ + "ARP", + "peso Arcʼhantina (1983–1985)" + ], + "ARS": [ + "ARS", + "peso Arcʼhantina" + ], + "ATS": [ + "ATS", + "schilling Aostria" + ], + "AUD": [ + "$A", + "dollar Aostralia" + ], + "AWG": [ + "AWG", + "florin Aruba" + ], + "AZM": [ + "AZM", + "manat Azerbaidjan (1993–2006)" + ], + "AZN": [ + "AZN", + "manat Azerbaidjan" + ], + "BAD": [ + "BAD", + "dinar Bosnia ha Herzegovina (1992–1994)" + ], + "BAM": [ + "BAM", + "mark kemmadus Bosnia ha Herzegovina" + ], + "BAN": [ + "BAN", + "dinar nevez Bosnia ha Herzegovina (1994–1997)" + ], + "BBD": [ + "BBD", + "dollar Barbados" + ], + "BDT": [ + "BDT", + "taka Bangladesh" + ], + "BEC": [ + "BEC", + "lur Belgia (kemmadus)" + ], + "BEF": [ + "BEF", + "lur Belgia" + ], + "BEL": [ + "BEL", + "BEL" + ], + "BGL": [ + "BGL", + "BGL" + ], + "BGM": [ + "BGM", + "lev sokialour Bulgaria" + ], + "BGN": [ + "BGN", + "lev Bulgaria" + ], + "BGO": [ + "BGO", + "lev Bulgaria (1879–1952)" + ], + "BHD": [ + "BHD", + "dinar Bahrein" + ], + "BIF": [ + "BIF", + "lur Burundi" + ], + "BMD": [ + "BMD", + "dollar Bermuda" + ], + "BND": [ + "BND", + "dollar Brunei" + ], + "BOB": [ + "BOB", + "boliviano Bolivia" + ], + "BOL": [ + "BOL", + "boliviano Bolivia (1863–1963)" + ], + "BOP": [ + "BOP", + "peso Bolivia" + ], + "BOV": [ + "BOV", + "BOV" + ], + "BRB": [ + "BRB", + "BRB" + ], + "BRC": [ + "BRC", + "BRC" + ], + "BRE": [ + "BRE", + "BRE" + ], + "BRL": [ + "BRL", + "real Brazil" + ], + "BRN": [ + "BRN", + "BRN" + ], + "BRR": [ + "BRR", + "BRR" + ], + "BRZ": [ + "BRZ", + "BRZ" + ], + "BSD": [ + "BSD", + "dollar Bahamas" + ], + "BTN": [ + "BTN", + "ngultrum Bhoutan" + ], + "BUK": [ + "BUK", + "kyat Birmania" + ], + "BWP": [ + "BWP", + "pula Botswana" + ], + "BYB": [ + "BYB", + "roubl nevez Belarus (1994–1999)" + ], + "BYN": [ + "BYN", + "roubl Belarus" + ], + "BYR": [ + "BYR", + "roubl Belarus (2000–2016)" + ], + "BZD": [ + "BZD", + "dollar Belize" + ], + "CAD": [ + "$CA", + "dollar Kanada" + ], + "CDF": [ + "CDF", + "lur Kongo" + ], + "CHE": [ + "CHE", + "euro WIR" + ], + "CHF": [ + "CHF", + "lur Suis" + ], + "CHW": [ + "CHW", + "lur WIR" + ], + "CLE": [ + "CLE", + "escudo Chile" + ], + "CLF": [ + "CLF", + "unanenn jediñ Chile" + ], + "CLP": [ + "CLP", + "peso Chile" + ], + "CNX": [ + "CNX", + "dollar Bank poblel Sina" + ], + "CNY": [ + "CNY", + "yuan Sina" + ], + "COP": [ + "COP", + "peso Kolombia" + ], + "COU": [ + "COU", + "COU" + ], + "CRC": [ + "CRC", + "colón Costa Rica" + ], + "CSD": [ + "CSD", + "dinar Serbia (2002–2006)" + ], + "CSK": [ + "CSK", + "CSK" + ], + "CUC": [ + "CUC", + "peso kemmadus Kuba" + ], + "CUP": [ + "CUP", + "peso Kuba" + ], + "CVE": [ + "CVE", + "escudo Kab Glas" + ], + "CYP": [ + "CYP", + "lur Kiprenez" + ], + "CZK": [ + "CZK", + "kurunenn Tchek" + ], + "DDM": [ + "DDM", + "mark Alamagn ar Reter" + ], + "DEM": [ + "DEM", + "mark Alamagn" + ], + "DJF": [ + "DJF", + "lur Djibouti" + ], + "DKK": [ + "DKK", + "kurunenn Danmark" + ], + "DOP": [ + "DOP", + "peso Dominikan" + ], + "DZD": [ + "DZD", + "dinar Aljeria" + ], + "ECS": [ + "ECS", + "ECS" + ], + "ECV": [ + "ECV", + "ECV" + ], + "EEK": [ + "EEK", + "kurunenn Estonia" + ], + "EGP": [ + "EGP", + "lur Egipt" + ], + "ERN": [ + "ERN", + "nakfa Eritrea" + ], + "ESA": [ + "ESA", + "ESA" + ], + "ESB": [ + "ESB", + "peseta gemmadus Spagn" + ], + "ESP": [ + "ESP", + "peseta Spagn" + ], + "ETB": [ + "ETB", + "birr Etiopia" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "mark Finland" + ], + "FJD": [ + "FJD", + "dollar Fidji" + ], + "FKP": [ + "FKP", + "lur Inizi Falkland" + ], + "FRF": [ + "FRF", + "lur gall" + ], + "GBP": [ + "£ RU", + "lur Breizh-Veur" + ], + "GEK": [ + "GEK", + "GEK" + ], + "GEL": [ + "GEL", + "lari Jorjia" + ], + "GHC": [ + "GHC", + "GHC" + ], + "GHS": [ + "GHS", + "cedi Ghana" + ], + "GIP": [ + "GIP", + "lur Jibraltar" + ], + "GMD": [ + "GMD", + "dalasi Gambia" + ], + "GNF": [ + "GNF", + "lur Ginea" + ], + "GNS": [ + "GNS", + "syli Ginea" + ], + "GQE": [ + "GQE", + "ekwele Ginea ar Cʼheheder" + ], + "GRD": [ + "GRD", + "drakm Gres" + ], + "GTQ": [ + "GTQ", + "quetzal Guatemala" + ], + "GWE": [ + "GWE", + "GWE" + ], + "GWP": [ + "GWP", + "peso Ginea-Bissau" + ], + "GYD": [ + "GYD", + "dollar Guyana" + ], + "HKD": [ + "$ HK", + "dollar Hong Kong" + ], + "HNL": [ + "HNL", + "lempira Honduras" + ], + "HRD": [ + "HRD", + "dinar Kroatia" + ], + "HRK": [ + "HRK", + "kuna Kroatia" + ], + "HTG": [ + "HTG", + "gourde Haiti" + ], + "HUF": [ + "HUF", + "forint Hungaria" + ], + "IDR": [ + "IDR", + "roupi Indonezia" + ], + "IEP": [ + "IEP", + "lur Iwerzhon" + ], + "ILP": [ + "ILP", + "lur Israel" + ], + "ILR": [ + "ILR", + "shekel Israel (1980–1985)" + ], + "ILS": [ + "ILS", + "shekel nevez Israel" + ], + "INR": [ + "₹", + "roupi India" + ], + "IQD": [ + "IQD", + "dinar Iraq" + ], + "IRR": [ + "IRR", + "rial Iran" + ], + "ISJ": [ + "ISJ", + "kurunenn Island (1918–1981)" + ], + "ISK": [ + "ISK", + "kurunenn Island" + ], + "ITL": [ + "ITL", + "lur Italia" + ], + "JMD": [ + "JMD", + "dollar Jamaika" + ], + "JOD": [ + "JOD", + "dinar Jordania" + ], + "JPY": [ + "JPY", + "yen Japan" + ], + "KES": [ + "KES", + "shilling Kenya" + ], + "KGS": [ + "KGS", + "som Kyrgyzstan" + ], + "KHR": [ + "KHR", + "riel Kambodja" + ], + "KMF": [ + "KMF", + "lur Komorez" + ], + "KPW": [ + "KPW", + "won Korea an Norzh" + ], + "KRH": [ + "KRH", + "hwan Korea ar Su (1953–1962)" + ], + "KRO": [ + "KRO", + "won Korea ar Su (1945–1953)" + ], + "KRW": [ + "KRW", + "won Korea ar Su" + ], + "KWD": [ + "KWD", + "dinar Koweit" + ], + "KYD": [ + "KYD", + "dollar Inizi Cayman" + ], + "KZT": [ + "KZT", + "tenge Kazakstan" + ], + "LAK": [ + "LAK", + "kip Laos" + ], + "LBP": [ + "LBP", + "lur Liban" + ], + "LKR": [ + "LKR", + "roupi Sri Lanka" + ], + "LRD": [ + "LRD", + "dollar Liberia" + ], + "LSL": [ + "LSL", + "loti Lesotho" + ], + "LTL": [ + "LTL", + "litas Lituania" + ], + "LTT": [ + "LTT", + "talonas Lituania" + ], + "LUC": [ + "LUC", + "lur kemmadus Luksembourg" + ], + "LUF": [ + "LUF", + "lur Luksembourg" + ], + "LUL": [ + "LUL", + "LUL" + ], + "LVL": [ + "LVL", + "lats Latvia" + ], + "LVR": [ + "LVR", + "roubl Latvia" + ], + "LYD": [ + "LYD", + "dinar Libia" + ], + "MAD": [ + "MAD", + "dirham Maroko" + ], + "MAF": [ + "MAF", + "lur Maroko" + ], + "MCF": [ + "MCF", + "lur Monaco" + ], + "MDC": [ + "MDC", + "MDC" + ], + "MDL": [ + "MDL", + "leu Moldova" + ], + "MGA": [ + "MGA", + "ariary Madagaskar" + ], + "MGF": [ + "MGF", + "lur Madagaskar" + ], + "MKD": [ + "MKD", + "denar Makedonia" + ], + "MKN": [ + "MKN", + "denar Makedonia (1992–1993)" + ], + "MLF": [ + "MLF", + "lur Mali" + ], + "MMK": [ + "MMK", + "kyat Myanmar" + ], + "MNT": [ + "MNT", + "tugrik Mongolia" + ], + "MOP": [ + "MOP", + "pataca Macau" + ], + "MRO": [ + "MRO", + "ouguiya Maouritania" + ], + "MTL": [ + "MTL", + "lira Malta" + ], + "MTP": [ + "MTP", + "lur Malta" + ], + "MUR": [ + "MUR", + "roupi Moris" + ], + "MVP": [ + "MVP", + "roupi Maldivez" + ], + "MVR": [ + "MVR", + "rufiyaa Maldivez" + ], + "MWK": [ + "MWK", + "kwacha Malawi" + ], + "MXN": [ + "MX$", + "peso Mecʼhiko" + ], + "MXP": [ + "MXP", + "peso arcʼhant Mecʼhiko (1861–1992)" + ], + "MXV": [ + "MXV", + "MXV" + ], + "MYR": [ + "MYR", + "ringgit Malaysia" + ], + "MZE": [ + "MZE", + "escudo Mozambik" + ], + "MZM": [ + "MZM", + "metical Mozambik (1980–2006)" + ], + "MZN": [ + "MZN", + "metical Mozambik" + ], + "NAD": [ + "NAD", + "dollar Namibia" + ], + "NGN": [ + "NGN", + "naira Nigeria" + ], + "NIC": [ + "NIC", + "cordoba Nicaragua (1988–1991)" + ], + "NIO": [ + "NIO", + "cordoba Nicaragua" + ], + "NLG": [ + "NLG", + "florin an Izelvroioù" + ], + "NOK": [ + "NOK", + "kurunenn Norvegia" + ], + "NPR": [ + "NPR", + "roupi Nepal" + ], + "NZD": [ + "$ ZN", + "dollar Zeland-Nevez" + ], + "OMR": [ + "OMR", + "rial Oman" + ], + "PAB": [ + "PAB", + "balboa Panamá" + ], + "PEI": [ + "PEI", + "PEI" + ], + "PEN": [ + "PEN", + "nuevo sol Perou" + ], + "PES": [ + "PES", + "sol Perou (1863–1965)" + ], + "PGK": [ + "PGK", + "kina Papoua Ginea-Nevez" + ], + "PHP": [ + "PHP", + "peso Filipinez" + ], + "PKR": [ + "PKR", + "roupi Pakistan" + ], + "PLN": [ + "PLN", + "zloty Polonia" + ], + "PLZ": [ + "PLZ", + "zloty Polonia (1950–1995)" + ], + "PTE": [ + "PTE", + "escudo Portugal" + ], + "PYG": [ + "PYG", + "guarani Paraguay" + ], + "QAR": [ + "QAR", + "rial Qatar" + ], + "RHD": [ + "RHD", + "dollar Rodezia" + ], + "ROL": [ + "ROL", + "leu Roumania (1952–2006)" + ], + "RON": [ + "RON", + "leu Roumania" + ], + "RSD": [ + "RSD", + "dinar Serbia" + ], + "RUB": [ + "RUB", + "roubl Rusia" + ], + "RUR": [ + "RUR", + "roubl Rusia (1991–1998)" + ], + "RWF": [ + "RWF", + "lur Rwanda" + ], + "SAR": [ + "SAR", + "riyal Arabia Saoudat" + ], + "SBD": [ + "SBD", + "dollar Inizi Salomon" + ], + "SCR": [ + "SCR", + "roupi Sechelez" + ], + "SDD": [ + "SDD", + "dinar Soudan (1992–2007)" + ], + "SDG": [ + "SDG", + "lur Soudan" + ], + "SDP": [ + "SDP", + "lur Soudan (1957–1998)" + ], + "SEK": [ + "SEK", + "kurunenn Sveden" + ], + "SGD": [ + "SGD", + "dollar Singapour" + ], + "SHP": [ + "SHP", + "lur Saint-Helena" + ], + "SIT": [ + "SIT", + "tolar Slovenia" + ], + "SKK": [ + "SKK", + "kurunenn Slovakia" + ], + "SLL": [ + "SLL", + "leone Sierra Leone" + ], + "SOS": [ + "SOS", + "shilling Somalia" + ], + "SRD": [ + "SRD", + "dollar Surinam" + ], + "SRG": [ + "SRG", + "florin Surinam" + ], + "SSP": [ + "SSP", + "lur Susoudan" + ], + "STD": [ + "STD", + "dobra São Tomé ha Príncipe" + ], + "SUR": [ + "SUR", + "roubl soviedel" + ], + "SVC": [ + "SVC", + "colón Salvador" + ], + "SYP": [ + "SYP", + "lur Siria" + ], + "SZL": [ + "SZL", + "lilangeni Swaziland" + ], + "THB": [ + "THB", + "baht Thailand" + ], + "TJR": [ + "TJR", + "roubl Tadjikistan" + ], + "TJS": [ + "TJS", + "somoni Tadjikistan" + ], + "TMM": [ + "TMM", + "manat Turkmenistan (1993–2009)" + ], + "TMT": [ + "TMT", + "manat Turkmenistan" + ], + "TND": [ + "TND", + "dinar Tunizia" + ], + "TOP": [ + "TOP", + "paÊ»anga Tonga" + ], + "TPE": [ + "TPE", + "escudo Timor" + ], + "TRL": [ + "TRL", + "lur Turkia (1922–2005)" + ], + "TRY": [ + "TRY", + "lur Turkia" + ], + "TTD": [ + "TTD", + "dollar Trinidad ha Tobago" + ], + "TWD": [ + "TWD", + "dollar nevez Taiwan" + ], + "TZS": [ + "TZS", + "shilling Tanzania" + ], + "UAH": [ + "UAH", + "hryvnia Ukraina" + ], + "UAK": [ + "UAK", + "UAK" + ], + "UGS": [ + "UGS", + "shilling Ouganda (1966–1987)" + ], + "UGX": [ + "UGX", + "shilling Ouganda" + ], + "USD": [ + "$ SU", + "dollar SU" + ], + "USN": [ + "USN", + "USN" + ], + "USS": [ + "USS", + "USS" + ], + "UYI": [ + "UYI", + "UYI" + ], + "UYP": [ + "UYP", + "peso Uruguay (1975–1993)" + ], + "UYU": [ + "UYU", + "peso Uruguay" + ], + "UZS": [ + "UZS", + "som Ouzbekistan" + ], + "VEB": [ + "VEB", + "bolivar Venezuela (1871–2008)" + ], + "VEF": [ + "VEF", + "bolivar Venezuela" + ], + "VND": [ + "VND", + "dong Viêt Nam" + ], + "VNN": [ + "VNN", + "dong Viêt Nam (1978–1985)" + ], + "VUV": [ + "VUV", + "vatu Vanuatu" + ], + "WST": [ + "WST", + "tala Samoa" + ], + "XAF": [ + "FCFA", + "lur CFA Kreizafrika" + ], + "XCD": [ + "XCD", + "dollar Karib ar reter" + ], + "XEU": [ + "XEU", + "unanenn jediñ europat" + ], + "XFO": [ + "XFO", + "lur aour Frañs" + ], + "XFU": [ + "XFU", + "lur Unaniezh etrebroadel an hentoù-houarn" + ], + "XOF": [ + "CFA", + "lur CFA Afrika ar Cʼhornôg" + ], + "XPF": [ + "CFPF", + "lur CFP" + ], + "XRE": [ + "XRE", + "XRE" + ], + "YDD": [ + "YDD", + "dinar Yemen" + ], + "YER": [ + "YER", + "rial Yemen" + ], + "YUD": [ + "YUD", + "YUD" + ], + "YUM": [ + "YUM", + "dinar nevez Yougoslavia (1994–2002)" + ], + "YUN": [ + "YUN", + "dinar kemmadus Yougoslavia (1990–1992)" + ], + "YUR": [ + "YUR", + "dinar adreizhet Yougoslavia (1992–1993)" + ], + "ZAL": [ + "ZAL", + "ZAL" + ], + "ZAR": [ + "ZAR", + "rand Suafrika" + ], + "ZMK": [ + "ZMK", + "kwacha Zambia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "kwacha Zambia" + ], + "ZRN": [ + "ZRN", + "ZRN" + ], + "ZRZ": [ + "ZRZ", + "ZRZ" + ], + "ZWD": [ + "ZWD", + "dollar Zimbabwe (1980–2008)" + ], + "ZWL": [ + "ZWL", + "dollar Zimbabwe (2009)" + ], + "ZWR": [ + "ZWR", + "dollar Zimbabwe (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bs.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bs.json new file mode 100644 index 0000000000000000000000000000000000000000..a4a5c21f77b5bbd874288a0b7de0018a65f31751 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bs.json @@ -0,0 +1,1101 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Andorska pezeta" + ], + "AED": [ + "AED", + "Dirham Ujedinjenih Arapskih Emirata" + ], + "AFA": [ + "AFA", + "Avganistanski avgani (1927–2002)" + ], + "AFN": [ + "AFN", + "Afganistanski afgan" + ], + "ALK": [ + "ALK", + "Albanski lek (1946–1965)" + ], + "ALL": [ + "ALL", + "Albanski lek" + ], + "AMD": [ + "AMD", + "Armenski dram" + ], + "ANG": [ + "ANG", + "Holandskoantilski gulden" + ], + "AOA": [ + "AOA", + "Angolska kvanza" + ], + "AOK": [ + "AOK", + "Angolijska kvanza (1977–1991)" + ], + "AON": [ + "AON", + "Angolijska nova kvanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angolijska kvanza reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentinski austral" + ], + "ARP": [ + "ARP", + "Argentinski pezo (1983–1985)" + ], + "ARS": [ + "ARS", + "Argentinski pezos" + ], + "ATS": [ + "ATS", + "Austrijski Å¡iling" + ], + "AUD": [ + "AUD", + "Australijski dolar" + ], + "AWG": [ + "AWG", + "Arubanski florin" + ], + "AZM": [ + "AZM", + "Azerbejdžanski manat (1993–2006)" + ], + "AZN": [ + "AZN", + "Azerbejdžanski manat" + ], + "BAD": [ + "BAD", + "Bosansko-HercegovaÄki dinar" + ], + "BAM": [ + "KM", + "BosanskohercegovaÄka konvertibilna marka" + ], + "BBD": [ + "BBD", + "Barbadoski dolar" + ], + "BDT": [ + "BDT", + "BangladeÅ¡ka taka" + ], + "BEC": [ + "BEC", + "Belgijski frank (konvertibilni)" + ], + "BEF": [ + "BEF", + "Belgijski franak" + ], + "BEL": [ + "BEL", + "Belgijski frank (finansijski)" + ], + "BGL": [ + "BGL", + "Bugarski tvrdi lev" + ], + "BGN": [ + "BGN", + "Bugarski lev" + ], + "BGO": [ + "BGO", + "Bugarski lev (1879–1952)" + ], + "BHD": [ + "BHD", + "Bahreinski dinar" + ], + "BIF": [ + "BIF", + "Burundski franak" + ], + "BMD": [ + "BMD", + "Bermudski dolar" + ], + "BND": [ + "BND", + "Brunejski dolar" + ], + "BOB": [ + "BOB", + "Bolivijski boliviano" + ], + "BOL": [ + "BOL", + "Bolivijski boliviano (1863–1963)" + ], + "BOP": [ + "BOP", + "Bolivijski pezo" + ], + "BOV": [ + "BOV", + "Bolivijski mvdol" + ], + "BRB": [ + "BRB", + "Brazilski kruzeiro novo (1967–1986)" + ], + "BRC": [ + "BRC", + "Brazilski kruzado (1986–1989)" + ], + "BRE": [ + "BRE", + "Brazilski kruzeiro (1990–1993)" + ], + "BRL": [ + "BRL", + "Brazilski real" + ], + "BRN": [ + "BRN", + "Brazilski kruzado novo (1989–1990)" + ], + "BRR": [ + "BRR", + "Brazilski kruzeiro (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Brazilski kruzeiro (1942–1967)" + ], + "BSD": [ + "BSD", + "Bahamski dolar" + ], + "BTN": [ + "BTN", + "Butanski ngultrum" + ], + "BUK": [ + "BUK", + "Burmanski kjat" + ], + "BWP": [ + "BWP", + "Bocvanska pula" + ], + "BYB": [ + "BYB", + "Beloruska nova rublja (1994–1999)" + ], + "BYN": [ + "BYN", + "Bjeloruska rublja" + ], + "BYR": [ + "BYR", + "Bjeloruska rublja (2000–2016)" + ], + "BZD": [ + "BZD", + "Belizeanski dolar" + ], + "CAD": [ + "CAD", + "Kanadski dolar" + ], + "CDF": [ + "CDF", + "Kongoanski franak" + ], + "CHE": [ + "CHE", + "WIR Evro" + ], + "CHF": [ + "CHF", + "Å vicarski franak" + ], + "CHW": [ + "CHW", + "WIR franak" + ], + "CLF": [ + "CLF", + "ÄŒileanski unidades de fomento" + ], + "CLP": [ + "CLP", + "ÄŒileanski pezos" + ], + "CNY": [ + "CNY", + "Kineski juan" + ], + "COP": [ + "COP", + "Kolumbijski pezos" + ], + "CRC": [ + "CRC", + "Kostarikanski kolon" + ], + "CSD": [ + "CSD", + "Srpski dinar (2002–2006)" + ], + "CSK": [ + "CSK", + "ÄŒehoslovaÄka tvrda koruna" + ], + "CUC": [ + "CUC", + "Kubanski konvertibilni pezos" + ], + "CUP": [ + "CUP", + "kubanski pezos" + ], + "CVE": [ + "CVE", + "Zelenortski eskudo" + ], + "CYP": [ + "CYP", + "Kipratska funta" + ], + "CZK": [ + "CZK", + "ÄŒeÅ¡ka kruna" + ], + "DDM": [ + "DDM", + "IstoÄnoevropska marka" + ], + "DEM": [ + "DEM", + "NemaÄka marka" + ], + "DJF": [ + "DJF", + "Džibutski franak" + ], + "DKK": [ + "DKK", + "Danska kruna" + ], + "DOP": [ + "DOP", + "Dominikanski pezos" + ], + "DZD": [ + "DZD", + "Alžirski dinar" + ], + "ECS": [ + "ECS", + "Ekvadorijski sukr" + ], + "ECV": [ + "ECV", + "Ekvadorski unidad de valor konstantin (UVC)" + ], + "EEK": [ + "EEK", + "Estonska kruna" + ], + "EGP": [ + "EGP", + "Egipatska funta" + ], + "ERN": [ + "ERN", + "Eritrejska nakfa" + ], + "ESA": [ + "ESA", + "Å panska pezeta (raÄun) ESA" + ], + "ESB": [ + "ESB", + "Å panska pezeta (konvertibilni raÄun)" + ], + "ESP": [ + "ESP", + "Å panska pezeta" + ], + "ETB": [ + "ETB", + "Etiopski bir" + ], + "EUR": [ + "€", + "Euro" + ], + "FIM": [ + "FIM", + "Finska marka" + ], + "FJD": [ + "FJD", + "Fidžijski dolar" + ], + "FKP": [ + "FKP", + "Folklandska funta" + ], + "FRF": [ + "FRF", + "Francuski franak" + ], + "GBP": [ + "GBP", + "Britanska funta" + ], + "GEK": [ + "GEK", + "Gruzijski kupon larit" + ], + "GEL": [ + "GEL", + "Gruzijski lari" + ], + "GHC": [ + "GHC", + "Ganijski cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "Ganski cedi" + ], + "GIP": [ + "GIP", + "Gibraltarska funta" + ], + "GMD": [ + "GMD", + "Gambijski dalasi" + ], + "GNF": [ + "GNF", + "Gvinejski franak" + ], + "GNS": [ + "GNS", + "Gvinejski sili" + ], + "GQE": [ + "GQE", + "Evatorijalna gvineja ekvele" + ], + "GRD": [ + "GRD", + "Drahma" + ], + "GTQ": [ + "GTQ", + "Gvatemalski kecal" + ], + "GWE": [ + "GWE", + "Portugalska Gvineja eskudo" + ], + "GWP": [ + "GWP", + "Gvineja bisao pezo" + ], + "GYD": [ + "GYD", + "Gvajanski dolar" + ], + "HKD": [ + "HKD", + "HonkonÅ¡ki dolar" + ], + "HNL": [ + "HNL", + "HonduraÅ¡ka lempira" + ], + "HRD": [ + "HRD", + "Hrvatski dinar" + ], + "HRK": [ + "kn", + "Hrvatska kuna" + ], + "HTG": [ + "HTG", + "Haićanski gurd" + ], + "HUF": [ + "HUF", + "MaÄ‘arska forinta" + ], + "IDR": [ + "IDR", + "Indonežanska rupija" + ], + "IEP": [ + "IEP", + "Irska funta" + ], + "ILP": [ + "ILP", + "Izraelska funta" + ], + "ILR": [ + "ILR", + "stari izraelski Å¡ekeli" + ], + "ILS": [ + "ILS", + "Izraelski novi Å¡ekel" + ], + "INR": [ + "₹", + "Indijska rupija" + ], + "IQD": [ + "IQD", + "IraÄki dinar" + ], + "IRR": [ + "IRR", + "Iranski rijal" + ], + "ISJ": [ + "ISJ", + "stara islandska kruna" + ], + "ISK": [ + "ISK", + "Islandska kruna" + ], + "ITL": [ + "ITL", + "Italijanska lira" + ], + "JMD": [ + "JMD", + "JamajÄanski dolar" + ], + "JOD": [ + "JOD", + "Jordanski dinar" + ], + "JPY": [ + "Â¥", + "Japanski jen" + ], + "KES": [ + "KES", + "Kenijski Å¡iling" + ], + "KGS": [ + "KGS", + "Kirgistanski som" + ], + "KHR": [ + "KHR", + "Kambodžanski rijel" + ], + "KMF": [ + "KMF", + "Komorski franak" + ], + "KPW": [ + "KPW", + "Sjevernokorejski von" + ], + "KRH": [ + "KRH", + "Južno-korejski hvan (1953–1962)" + ], + "KRO": [ + "KRO", + "Južno-korejski Von (1945–1953)" + ], + "KRW": [ + "â‚©", + "Južnokorejski von" + ], + "KWD": [ + "KWD", + "Kuvajtski dinar" + ], + "KYD": [ + "KYD", + "Kajmanski dolar" + ], + "KZT": [ + "KZT", + "Kazahstanski tenge" + ], + "LAK": [ + "LAK", + "Laoski kip" + ], + "LBP": [ + "LBP", + "Libanska funta" + ], + "LKR": [ + "LKR", + "Å rilankanska rupija" + ], + "LRD": [ + "LRD", + "Liberijski dolar" + ], + "LSL": [ + "LSL", + "Lesotski loti" + ], + "LTL": [ + "LTL", + "Litvanski litas" + ], + "LTT": [ + "LTT", + "Litvanski talonas" + ], + "LUC": [ + "LUC", + "LuksemburÅ¡ki konvertibilni franak" + ], + "LUF": [ + "LUF", + "LuksemburÅ¡ki franak" + ], + "LUL": [ + "LUL", + "LuksemburÅ¡ki finansijski franak" + ], + "LVL": [ + "LVL", + "Letonski lats" + ], + "LVR": [ + "LVR", + "Latvijska rublja" + ], + "LYD": [ + "LYD", + "Libijski dinar" + ], + "MAD": [ + "MAD", + "Marokanski dirham" + ], + "MAF": [ + "MAF", + "Marokanski franak" + ], + "MDL": [ + "MDL", + "Moldavski lej" + ], + "MGA": [ + "MGA", + "MalagaÅ¡ki arijari" + ], + "MGF": [ + "MGF", + "Malagasijski franak" + ], + "MKD": [ + "MKD", + "Makedonski denar" + ], + "MKN": [ + "MKN", + "Makedonski denar (1992–1993)" + ], + "MLF": [ + "MLF", + "Malijanski franak" + ], + "MMK": [ + "MMK", + "Mijanmarski kjat" + ], + "MNT": [ + "MNT", + "Mongolski tugrik" + ], + "MOP": [ + "MOP", + "Makaonska pataka" + ], + "MRO": [ + "MRO", + "Mauritanijska ugvija" + ], + "MTL": [ + "MTL", + "MalteÅ¡ka lira" + ], + "MTP": [ + "MTP", + "MalteÅ¡ka funta" + ], + "MUR": [ + "MUR", + "Mauricijska rupija" + ], + "MVR": [ + "MVR", + "Maldivska rufija" + ], + "MWK": [ + "MWK", + "Malavijska kvaÄa" + ], + "MXN": [ + "MXN", + "MeksiÄki pezos" + ], + "MXP": [ + "MXP", + "Meksijski srebrno pezo (1861–1992)" + ], + "MXV": [ + "MXV", + "Meksijski unidad de inverzion" + ], + "MYR": [ + "MYR", + "Malezijski ringit" + ], + "MZE": [ + "MZE", + "Mozambijski eskudo" + ], + "MZM": [ + "MZM", + "Mozambijski metikal (1980–2006)" + ], + "MZN": [ + "MZN", + "Mozambijski metikal" + ], + "NAD": [ + "NAD", + "Namibijski dolar" + ], + "NGN": [ + "NGN", + "Nigerijska naira" + ], + "NIC": [ + "NIC", + "NikaragvanÅ¡ka kordoba (1988–1991)" + ], + "NIO": [ + "NIO", + "Nikaragvanska kordoba" + ], + "NLG": [ + "NLG", + "Holandski gulden" + ], + "NOK": [ + "NOK", + "NorveÅ¡ka kruna" + ], + "NPR": [ + "NPR", + "Nepalska rupija" + ], + "NZD": [ + "NZD", + "Novozelandski dolar" + ], + "OMR": [ + "OMR", + "Omanski rijal" + ], + "PAB": [ + "PAB", + "Panamska balboa" + ], + "PEI": [ + "PEI", + "Peruvijski inti" + ], + "PEN": [ + "PEN", + "Peruanski novi sol" + ], + "PES": [ + "PES", + "Peruvijski sol (1863–1965)" + ], + "PGK": [ + "PGK", + "Kina Papue Nove Gvineje" + ], + "PHP": [ + "PHP", + "Filipinski pezos" + ], + "PKR": [ + "PKR", + "Pakistanska rupija" + ], + "PLN": [ + "PLN", + "Poljski zlot" + ], + "PLZ": [ + "PLZ", + "Poljski zloti (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugalski eskudo" + ], + "PYG": [ + "PYG", + "Paragvajski gvarani" + ], + "QAR": [ + "QAR", + "Katarski rijal" + ], + "RHD": [ + "RHD", + "Rodizijski dolar" + ], + "ROL": [ + "ROL", + "Rumunski leu (1952–2006)" + ], + "RON": [ + "RON", + "Rumunski lej" + ], + "RSD": [ + "din.", + "Srpski dinar" + ], + "RUB": [ + "RUB", + "Ruska rublja" + ], + "RUR": [ + "RUR", + "Ruska rublja (1991–1998)" + ], + "RWF": [ + "RWF", + "Ruandski franak" + ], + "SAR": [ + "SAR", + "Saudijski rijal" + ], + "SBD": [ + "SBD", + "Solomonski dolar" + ], + "SCR": [ + "SCR", + "SejÅ¡elska rupija" + ], + "SDD": [ + "SDD", + "Sudanski dinar (1992–2007)" + ], + "SDG": [ + "SDG", + "Sudanska funta" + ], + "SDP": [ + "SDP", + "Sudanska funta (1957–1998)" + ], + "SEK": [ + "SEK", + "Å vedska kruna" + ], + "SGD": [ + "SGD", + "Singapurski dolar" + ], + "SHP": [ + "SHP", + "Svetohelenska funta" + ], + "SIT": [ + "SIT", + "Slovenski tolar" + ], + "SKK": [ + "SKK", + "SlovaÄka kruna" + ], + "SLL": [ + "SLL", + "Sijeraleonski leone" + ], + "SOS": [ + "SOS", + "Somalski Å¡iling" + ], + "SRD": [ + "SRD", + "Surinamski dolar" + ], + "SRG": [ + "SRG", + "Surinamski gilder" + ], + "SSP": [ + "SSP", + "Južnosudanska funta" + ], + "STD": [ + "STD", + "Dobra Sao Toma i Principa" + ], + "SUR": [ + "SUR", + "Sovjetska rublja" + ], + "SVC": [ + "SVC", + "Salvadorski kolon" + ], + "SYP": [ + "SYP", + "Sirijska funta" + ], + "SZL": [ + "SZL", + "Svazilendski lilangeni" + ], + "THB": [ + "฿", + "Tajlandski baht" + ], + "TJR": [ + "TJR", + "Tadžakistanska rublja" + ], + "TJS": [ + "TJS", + "Tadžikistanski somoni" + ], + "TMM": [ + "TMM", + "Turkmenistanski manat (1993–2009)" + ], + "TMT": [ + "TMT", + "Turkmenistanski manat" + ], + "TND": [ + "TND", + "TuniÅ¡ki dinar" + ], + "TOP": [ + "TOP", + "Tonganska panga" + ], + "TPE": [ + "TPE", + "TimorÅ¡ki eskudo" + ], + "TRL": [ + "TRL", + "Turska lira (1922–2005)" + ], + "TRY": [ + "TRY", + "Turska lira" + ], + "TTD": [ + "TTD", + "TrinidadtobaÅ¡ki dolar" + ], + "TWD": [ + "NT$", + "Novi tajvanski dolar" + ], + "TZS": [ + "TZS", + "Tanzanijski Å¡iling" + ], + "UAH": [ + "UAH", + "Ukrajinska hrivnja" + ], + "UAK": [ + "UAK", + "Ukrajinski karbovaneti" + ], + "UGS": [ + "UGS", + "Ugandijski Å¡iling (1966–1987)" + ], + "UGX": [ + "UGX", + "Ugandski Å¡iling" + ], + "USD": [ + "USD", + "AmeriÄki dolar" + ], + "USN": [ + "USN", + "SAD dolar (sledeći dan)" + ], + "USS": [ + "USS", + "SAD dolar (isti dan)" + ], + "UYI": [ + "UYI", + "Urugvajski pezo en unidades indeksades" + ], + "UYP": [ + "UYP", + "Urugvajski pezo (1975–1993)" + ], + "UYU": [ + "UYU", + "Urugvajski pezos" + ], + "UZS": [ + "UZS", + "Uzbekistanski som" + ], + "VEB": [ + "VEB", + "Venecuelanski bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "Venecuelanski bolivar" + ], + "VND": [ + "â‚«", + "Vijetnamski dong" + ], + "VNN": [ + "VNN", + "Vijetnamski dong (1978–1985)" + ], + "VUV": [ + "VUV", + "Vanuatski vatu" + ], + "WST": [ + "WST", + "Samoanska tala" + ], + "XAF": [ + "FCFA", + "CentralnoafriÄki franak (CFA)" + ], + "XCD": [ + "XCD", + "IstoÄnokaripski dolar" + ], + "XEU": [ + "XEU", + "Evropska valutna jedinica" + ], + "XFO": [ + "XFO", + "Francuski zlatni frank" + ], + "XFU": [ + "XFU", + "Francuski UIC-frank" + ], + "XOF": [ + "CFA", + "ZapadnoafriÄki franak (CFA)" + ], + "XPF": [ + "XPF", + "Franak (CFP)" + ], + "XRE": [ + "XRE", + "RINET fondovi" + ], + "YDD": [ + "YDD", + "Jemenski dinar" + ], + "YER": [ + "YER", + "Jemenski rijal" + ], + "YUD": [ + "YUD", + "Jugoslovenski tvrdi dinar" + ], + "YUM": [ + "YUM", + "Jugoslovenski novi dinar" + ], + "YUN": [ + "YUN", + "Jugoslovenski konvertibilni dinar" + ], + "ZAL": [ + "ZAL", + "JužnoafriÄki rand (finansijski)" + ], + "ZAR": [ + "ZAR", + "JužnoafriÄki rand" + ], + "ZMK": [ + "ZMK", + "Zambijska kvaÄa (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambijska kvaÄa" + ], + "ZRN": [ + "ZRN", + "Zairski novi zair (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zairski zair (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Zimbabvejski dolar (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Zimbabvejski dolar (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabvejski dolar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bs_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bs_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..ed5a99d0d4fab5e0a266b0a0ab37b5072b0288d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/bs_Cyrl.json @@ -0,0 +1,1069 @@ +{ + "Version": "2.1.28.76", + "Names": { + "ADP": [ + "ADP", + "ÐндорÑка пезета" + ], + "AED": [ + "AED", + "Уједињени арапÑки емирати дирхам" + ], + "AFA": [ + "AFA", + "ÐвганиÑтанÑки авган (1927–2002)" + ], + "AFN": [ + "AFN", + "ÐвганиÑтанÑки авган" + ], + "ALL": [ + "ALL", + "ÐлбанÑки лек" + ], + "AMD": [ + "AMD", + "ЈерменÑки драм" + ], + "ANG": [ + "ANG", + "ХоландÑки антили гилдер" + ], + "AOA": [ + "AOA", + "анголÑка кванза" + ], + "AOK": [ + "AOK", + "анголијÑка кванза (1977–1990)" + ], + "AON": [ + "AON", + "ÐнголијÑка нова кванза (1990–2000)" + ], + "AOR": [ + "AOR", + "ÐнголÑка кванза реађуÑтадо (1995–1999)" + ], + "ARA": [ + "ARA", + "ÐргентинÑки ауÑтрал" + ], + "ARP": [ + "ARP", + "аргентинÑки пезо (1983–1985)" + ], + "ARS": [ + "ARS", + "аргентинÑки пезо" + ], + "ATS": [ + "ATS", + "ÐуÑтријÑки шилинг" + ], + "AUD": [ + "A$", + "ÐуÑтралијÑки долар" + ], + "AWG": [ + "AWG", + "ÐрубанÑки флорин" + ], + "AZM": [ + "AZM", + "ÐзербејџанÑки манат (1993–2006)" + ], + "AZN": [ + "AZN", + "ÐзербејџанÑки манат" + ], + "BAD": [ + "BAD", + "БоÑанÑко-Херцеговачки динар" + ], + "BAM": [ + "КМ", + "Конвертибилна марка" + ], + "BBD": [ + "BBD", + "Барбадошки долар" + ], + "BDT": [ + "BDT", + "Бангладешка така" + ], + "BEC": [ + "BEC", + "БелгијÑки франак (конвертибилни)" + ], + "BEF": [ + "BEF", + "БелгијÑки франак" + ], + "BEL": [ + "BEL", + "БелгијÑки франак (финанÑијÑки)" + ], + "BGL": [ + "BGL", + "БугарÑки тврди лев" + ], + "BGN": [ + "BGN", + "БугарÑки лев" + ], + "BHD": [ + "BHD", + "БахреинÑки динар" + ], + "BIF": [ + "BIF", + "БурундÑки франак" + ], + "BMD": [ + "BMD", + "БермудÑки долар" + ], + "BND": [ + "BND", + "БрунејÑки долар" + ], + "BOB": [ + "BOB", + "БоливијÑки Боливиано" + ], + "BOP": [ + "BOP", + "БоливијÑки пезо" + ], + "BOV": [ + "BOV", + "БоливијÑки мвдол" + ], + "BRB": [ + "BRB", + "БразилÑки нови крузеиро (1967–1986)" + ], + "BRC": [ + "BRC", + "БразилијÑки крузадо" + ], + "BRE": [ + "BRE", + "БразилÑки крузеиро (1990–1993)" + ], + "BRL": [ + "R$", + "БразилÑки Реал" + ], + "BRN": [ + "BRN", + "БразилијÑки нови крузадо" + ], + "BRR": [ + "BRR", + "БразилÑки крузеиро" + ], + "BSD": [ + "BSD", + "БахамÑки долар" + ], + "BTN": [ + "BTN", + "БутанÑки нгултрум" + ], + "BUK": [ + "BUK", + "БурманÑки кјат" + ], + "BWP": [ + "BWP", + "БоцванÑка пула" + ], + "BYB": [ + "BYB", + "БелоруÑка нова рубља (1994–1999)" + ], + "BYN": [ + "BYN", + "БелоруÑка рубља" + ], + "BYR": [ + "BYR", + "БелоруÑка рубља (2000–2016)" + ], + "BZD": [ + "BZD", + "Белизе долар" + ], + "CAD": [ + "CA$", + "КанадÑки долар" + ], + "CDF": [ + "CDF", + "КонголÑки франак" + ], + "CHE": [ + "CHE", + "WIR евро" + ], + "CHF": [ + "CHF", + "ШвајцарÑки франак" + ], + "CHW": [ + "CHW", + "WIR франак" + ], + "CLF": [ + "CLF", + "ЧилеовÑки ÑƒÐ½Ð¸Ð´Ð°Ð´ÐµÑ Ñе фоменто" + ], + "CLP": [ + "CLP", + "ЧилеанÑки пезо" + ], + "CNY": [ + "CNÂ¥", + "КинеÑки јуан ренминби" + ], + "COP": [ + "COP", + "КолумбијÑки пезо" + ], + "COU": [ + "COU", + "Унидад де валоршки реал" + ], + "CRC": [ + "CRC", + "КоÑтариканÑки колон" + ], + "CSD": [ + "CSD", + "Стари ÑрпÑки динар" + ], + "CSK": [ + "CSK", + "ЧехоÑловачка тврда круна" + ], + "CUC": [ + "CUC", + "кубанÑки конвертибилни пеÑо" + ], + "CUP": [ + "CUP", + "КубанÑки пезо" + ], + "CVE": [ + "CVE", + "ЗеленортÑки еÑкудо" + ], + "CYP": [ + "CYP", + "КипарÑка фунта" + ], + "CZK": [ + "Кч", + "Чешка круна" + ], + "DDM": [ + "DDM", + "ИÑточно-немачка марка" + ], + "DEM": [ + "DEM", + "Ðемачка марка" + ], + "DJF": [ + "DJF", + "ÐибутанÑки франак" + ], + "DKK": [ + "DKK", + "ДанÑка круна" + ], + "DOP": [ + "DOP", + "ДоминиканÑки пезо" + ], + "DZD": [ + "DZD", + "ÐлжирÑки динар" + ], + "ECS": [ + "ECS", + "ЕквадорÑки Ñакр" + ], + "ECV": [ + "ECV", + "ЕквадорÑки унидад де валор конÑтанте" + ], + "EEK": [ + "EEK", + "ЕÑтонÑка кроон" + ], + "EGP": [ + "EGP", + "ЕгипатÑка фунта" + ], + "ERN": [ + "ERN", + "ЕритреанÑка накфа" + ], + "ESA": [ + "ESA", + "ШпанÑка пезета (рачун)" + ], + "ESB": [ + "ESB", + "ШпанÑка пезета (конвертибилнирачун)" + ], + "ESP": [ + "ESP", + "ШпанÑка пезета" + ], + "ETB": [ + "ETB", + "етиопијÑки бир" + ], + "EUR": [ + "€", + "Евро" + ], + "FIM": [ + "FIM", + "ФинÑка марка" + ], + "FJD": [ + "FJD", + "Фиџи долар" + ], + "FKP": [ + "FKP", + "ФокландÑка оÑтрва фунта" + ], + "FRF": [ + "FRF", + "ФранцуÑки франак" + ], + "GBP": [ + "£", + "БританÑка фунта" + ], + "GEK": [ + "GEK", + "ГрузијÑки купон ларит" + ], + "GEL": [ + "GEL", + "ГрузијÑки лари" + ], + "GHC": [ + "GHC", + "ГанÑки цеди (1979–2007)" + ], + "GHS": [ + "GHS", + "ГанÑки цеди" + ], + "GIP": [ + "GIP", + "Гибралташка фунта" + ], + "GMD": [ + "GMD", + "ГамбијÑки далаÑи" + ], + "GNF": [ + "GNF", + "ГвинејÑки франак" + ], + "GNS": [ + "GNS", + "ГвинејÑки Ñили" + ], + "GQE": [ + "GQE", + "Екваторијално-гвинејÑки еквеле" + ], + "GRD": [ + "GRD", + "Грчка драхма" + ], + "GTQ": [ + "GTQ", + "ГватемалÑки квецал" + ], + "GWE": [ + "GWE", + "португалÑка гвинеја еÑкудо" + ], + "GWP": [ + "GWP", + "Гвинеја БиÑао Пезо" + ], + "GYD": [ + "GYD", + "ГујанÑки долар" + ], + "HKD": [ + "HK$", + "Хонгконшки долар" + ], + "HNL": [ + "HNL", + "Хондурашка лемпира" + ], + "HRD": [ + "HRD", + "ХрватÑки динар" + ], + "HRK": [ + "HRK", + "ХрватÑка куна" + ], + "HTG": [ + "HTG", + "ХаићанÑки гурд" + ], + "HUF": [ + "HUF", + "МађарÑка форинта" + ], + "IDR": [ + "IDR", + "ИндонезијÑка рупиа" + ], + "IEP": [ + "IEP", + "ИрÑка фунта" + ], + "ILP": [ + "ILP", + "ИзраелÑка фунта" + ], + "ILR": [ + "ILR", + "Ñтари израелÑки шекели" + ], + "ILS": [ + "₪", + "ИзраелÑки нови шекел" + ], + "INR": [ + "₹", + "ИндијÑки Рупи" + ], + "IQD": [ + "IQD", + "Ирачки динар" + ], + "IRR": [ + "IRR", + "ИранÑки риал" + ], + "ISJ": [ + "ISJ", + "Ñтара иÑландÑка круна" + ], + "ISK": [ + "ISK", + "ИÑландÑка круна" + ], + "ITL": [ + "ITL", + "ИталијанÑка лира" + ], + "JMD": [ + "JMD", + "ЈамајÑки долар" + ], + "JOD": [ + "JOD", + "ЈорданÑки динар" + ], + "JPY": [ + "Â¥", + "ЈапанÑки јен" + ], + "KES": [ + "KES", + "КенијÑки шилинг" + ], + "KGS": [ + "KGS", + "КиргиÑтанÑки Ñом" + ], + "KHR": [ + "KHR", + "КамбоџијÑки риел" + ], + "KMF": [ + "KMF", + "КоморÑки франак" + ], + "KPW": [ + "KPW", + "СевернокорејÑки вон" + ], + "KRW": [ + "â‚©", + "ЈужнокорејÑки Вон" + ], + "KWD": [ + "KWD", + "КувајтÑки динар" + ], + "KYD": [ + "KYD", + "КајманÑка оÑтрва долар" + ], + "KZT": [ + "KZT", + "КазахÑтанÑки тенџ" + ], + "LAK": [ + "LAK", + "Лаошки кип" + ], + "LBP": [ + "LBP", + "ЛебанÑка фунта" + ], + "LKR": [ + "LKR", + "ШриланканÑки рупи" + ], + "LRD": [ + "LRD", + "ЛиберијÑки долар" + ], + "LSL": [ + "LSL", + "ЛеÑото лоти" + ], + "LTL": [ + "LTL", + "ЛитванÑки литаÑ" + ], + "LTT": [ + "LTT", + "ЛитванÑки талонаÑ" + ], + "LUC": [ + "LUC", + "ЛукÑембуршки конвертибилни франак" + ], + "LUF": [ + "LUF", + "ЛукÑембуршки франак" + ], + "LUL": [ + "LUL", + "ЛукÑембуршки финанÑијÑки франак" + ], + "LVL": [ + "LVL", + "ЛатвијÑки лати" + ], + "LVR": [ + "LVR", + "атвијÑка рубља" + ], + "LYD": [ + "LYD", + "ЛибијÑки динар" + ], + "MAD": [ + "MAD", + "МароканÑки дирхам" + ], + "MAF": [ + "MAF", + "МароканÑки франак" + ], + "MDL": [ + "MDL", + "МолдовÑки љу" + ], + "MGA": [ + "MGA", + "МалагаÑијÑки ариари" + ], + "MGF": [ + "MGF", + "МалагаÑијÑки франак" + ], + "MKD": [ + "MKD", + "МакедонÑки денар" + ], + "MLF": [ + "MLF", + "МалијанÑки франак" + ], + "MMK": [ + "MMK", + "Мјанмашки кјат" + ], + "MNT": [ + "MNT", + "МонголÑки тугрик" + ], + "MOP": [ + "MOP", + "Маканишка патака" + ], + "MRO": [ + "MRO", + "МауританијÑка угвија" + ], + "MTL": [ + "MTL", + "Малтешка лира" + ], + "MTP": [ + "MTP", + "Малтешка фунта" + ], + "MUR": [ + "MUR", + "МаурицијÑки рупи" + ], + "MVR": [ + "MVR", + "МалдивијÑка руфија" + ], + "MWK": [ + "MWK", + "МалавијÑка квача" + ], + "MXN": [ + "MX$", + "МекÑички пезо" + ], + "MXP": [ + "MXP", + "МекÑички Ñребрни пезо (1861–1992)" + ], + "MXV": [ + "MXV", + "МекÑички унидад де инверÑион (UDI)" + ], + "MYR": [ + "MYR", + "МалезијÑки ринггит" + ], + "MZE": [ + "MZE", + "МозамбијÑки еÑкудо" + ], + "MZM": [ + "MZM", + "Стари мозамбијÑки метикал" + ], + "MZN": [ + "MZN", + "МозамбијÑки метикал" + ], + "NAD": [ + "NAD", + "намбијÑки долар" + ], + "NGN": [ + "NGN", + "ÐигеријÑка наира" + ], + "NIC": [ + "NIC", + "ÐикарагванÑка кордоба" + ], + "NIO": [ + "NIO", + "ÐикарагванÑка златна кордоба" + ], + "NLG": [ + "NLG", + "ХоландÑки гулден" + ], + "NOK": [ + "NOK", + "Ðорвешка круна" + ], + "NPR": [ + "NPR", + "ÐепалÑки рупи" + ], + "NZD": [ + "NZ$", + "ÐовозеландÑки долар" + ], + "OMR": [ + "OMR", + "ОманÑки ријал" + ], + "PAB": [ + "PAB", + "ПанамÑка балбоа" + ], + "PEI": [ + "PEI", + "ПеруанÑки инти" + ], + "PEN": [ + "PEN", + "ПеруанÑки нуево Ñол" + ], + "PES": [ + "PES", + "ПеруанÑки Ñол" + ], + "PGK": [ + "PGK", + "Папуа ново-гвинејшка кина" + ], + "PHP": [ + "PHP", + "ФилипинÑки пезо" + ], + "PKR": [ + "PKR", + "ПакиÑтанÑки рупи" + ], + "PLN": [ + "зл", + "ПољÑки злот" + ], + "PLZ": [ + "PLZ", + "ПољÑки злоти (1950–1995)" + ], + "PTE": [ + "PTE", + "ПортугалÑки еÑкудо" + ], + "PYG": [ + "PYG", + "ПарагвајÑки гуарни" + ], + "QAR": [ + "QAR", + "Катаршки ријал" + ], + "RHD": [ + "RHD", + "РодејÑкидолар" + ], + "ROL": [ + "ROL", + "Стари румунÑки љу" + ], + "RON": [ + "RON", + "РумунÑки леу" + ], + "RSD": [ + "дин.", + "СрпÑки динар" + ], + "RUB": [ + "RUB", + "РуÑка рубља" + ], + "RUR": [ + "RUR", + "РуÑка рубља (1991–1998)" + ], + "RWF": [ + "RWF", + "РуанданÑки франак" + ], + "SAR": [ + "SAR", + "СаудијÑки ријал" + ], + "SBD": [ + "SBD", + "СоломонÑко-оÑтрвÑки долар" + ], + "SCR": [ + "SCR", + "СејшелÑка рупија" + ], + "SDD": [ + "SDD", + "Стари ÑуданÑки динар" + ], + "SDG": [ + "SDG", + "СуданÑка фунта" + ], + "SDP": [ + "SDP", + "Стара ÑуданÑка фунта" + ], + "SEK": [ + "SEK", + "ШведÑка круна" + ], + "SGD": [ + "SGD", + "СингапурÑки долар" + ], + "SHP": [ + "SHP", + "Св. јеленÑка фунта" + ], + "SIT": [ + "SIT", + "Словеначки толар" + ], + "SKK": [ + "SKK", + "Словачка круна" + ], + "SLL": [ + "SLL", + "Сијера-леоншки леоне" + ], + "SOS": [ + "SOS", + "СОмалијÑки шилинг" + ], + "SRD": [ + "SRD", + "СУринамÑки долар" + ], + "SRG": [ + "SRG", + "СуринамÑки гилдер" + ], + "STD": [ + "STD", + "Сао Томе и Принципе добра" + ], + "SUR": [ + "SUR", + "СовјетÑка рубља" + ], + "SVC": [ + "SVC", + "СалвадорÑки колон" + ], + "SYP": [ + "SYP", + "СиријÑка фунта" + ], + "SZL": [ + "SZL", + "Свази лилангени" + ], + "THB": [ + "THB", + "Таи бахт" + ], + "TJR": [ + "TJR", + "ТаџихиÑтанÑка рубља" + ], + "TJS": [ + "TJS", + "ТаљихиÑтанÑки Ñомони" + ], + "TMM": [ + "TMM", + "ТуркмениÑтанÑки манат (1993–2009)" + ], + "TMT": [ + "TMT", + "ТуркмениÑтанÑки манат" + ], + "TND": [ + "TND", + "ТунизијÑки долар" + ], + "TOP": [ + "TOP", + "Тонгоншка Панга" + ], + "TPE": [ + "TPE", + "Тиморшки еÑкудо" + ], + "TRL": [ + "TRL", + "Стара турÑка лира" + ], + "TRY": [ + "Тл", + "ТурÑка лира" + ], + "TTD": [ + "TTD", + "Тринидад тобагошки долар" + ], + "TWD": [ + "NT$", + "Ðови тајванÑки долар" + ], + "TZS": [ + "TZS", + "ТанзанијÑки шилинг" + ], + "UAH": [ + "UAH", + "УкрајинÑка хривња" + ], + "UAK": [ + "UAK", + "УкрајинÑки карбованети" + ], + "UGS": [ + "UGS", + "УгандÑки шилинг (1966–1987)" + ], + "UGX": [ + "UGX", + "УгандÑки шилинг" + ], + "USD": [ + "US$", + "Ðмерички долар" + ], + "USN": [ + "USN", + "СÐД долар (Ñледећи дан)" + ], + "USS": [ + "USS", + "СÐД долар (иÑти дан)" + ], + "UYI": [ + "UYI", + "УругвајÑки пезо ен ÑƒÐ½Ð¸Ð´Ð°Ð´ÐµÑ Ð¸Ð½Ð´ÐµÐºÑадаÑ" + ], + "UYP": [ + "UYP", + "УругвајÑки пезо (1975–1993)" + ], + "UYU": [ + "UYU", + "УругвајÑки пезо" + ], + "UZS": [ + "UZS", + "УзбекиÑтанÑки Ñом" + ], + "VEB": [ + "VEB", + "ВенецуеланÑки боливар (1871–2008)" + ], + "VEF": [ + "VEF", + "ВенецуеланÑки боливар" + ], + "VND": [ + "â‚«", + "ВијетнамÑки донг" + ], + "VUV": [ + "VUV", + "ВануатÑки вату" + ], + "WST": [ + "WST", + "СамоанÑка тала" + ], + "XAF": [ + "FCFA", + "CFA франак BEAC" + ], + "XCD": [ + "EC$", + "ИÑточно-карибÑки долар" + ], + "XEU": [ + "XEU", + "ЕвропÑка валутна јединица" + ], + "XFO": [ + "XFO", + "ФранцуÑки златни франак" + ], + "XFU": [ + "XFU", + "ФранцуÑки UIC-франак" + ], + "XOF": [ + "CFA", + "CFA франак BCEAO" + ], + "XPF": [ + "CFPF", + "CFP франак" + ], + "XRE": [ + "XRE", + "RINET фонд" + ], + "YDD": [ + "YDD", + "ЈеменÑки динар" + ], + "YER": [ + "YER", + "ЈеменÑки риал" + ], + "YUD": [ + "YUD", + "ЈугоÑловенÑки тврди динар" + ], + "YUM": [ + "YUM", + "ЈугоÑловенÑки нови динар" + ], + "YUN": [ + "YUN", + "ЈугоÑловенÑки конвертибилни динар" + ], + "ZAL": [ + "ZAL", + "Јужно-афрички ранд (финанÑијÑки)" + ], + "ZAR": [ + "ZAR", + "Јужно-афрички ранд" + ], + "ZMK": [ + "ZMK", + "ЗамбијÑка квача (1968–2012)" + ], + "ZMW": [ + "ZMW", + "ЗамбијÑка квача" + ], + "ZRN": [ + "ZRN", + "ЗаирÑки нови заир" + ], + "ZRZ": [ + "ZRZ", + "ЗаирÑки заир" + ], + "ZWD": [ + "ZWD", + "ЗимбабвејÑки долар" + ], + "ZWL": [ + "ZWL", + "ЗимбабвеанÑки долар (2009)" + ], + "ZWR": [ + "ZWR", + "ЗимбабвеанÑки долар (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ca.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ca.json new file mode 100644 index 0000000000000000000000000000000000000000..502630f92f37f7725f043d8626a13afe51179b94 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ca.json @@ -0,0 +1,1138 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "pesseta andorrana" + ], + "AED": [ + "AED", + "dírham de la UEA" + ], + "AFA": [ + "AFA", + "afgani afganès (1927–2002)" + ], + "AFN": [ + "AFN", + "afgani afganès" + ], + "ALK": [ + "ALK", + "lek albanès (1946–1965)" + ], + "ALL": [ + "ALL", + "lek albanès" + ], + "AMD": [ + "AMD", + "dram armeni" + ], + "ANG": [ + "ANG", + "florí de les Antilles Neerlandeses" + ], + "AOA": [ + "AOA", + "kwanza angolès" + ], + "AOK": [ + "AOK", + "kwanza angolès (1977–1991)" + ], + "AON": [ + "AON", + "nou kwanza angolès (1990–2000)" + ], + "AOR": [ + "AOR", + "kwanza angolès reajustat (1995–1999)" + ], + "ARA": [ + "ARA", + "austral argentí" + ], + "ARL": [ + "ARL", + "peso ley argentí (1970–1983)" + ], + "ARM": [ + "ARM", + "peso argentí (1981–1970)" + ], + "ARP": [ + "ARP", + "peso argentí (1983–1985)" + ], + "ARS": [ + "ARS", + "peso argentí" + ], + "ATS": [ + "ATS", + "xíling austríac" + ], + "AUD": [ + "AU$", + "dòlar australià" + ], + "AWG": [ + "AWG", + "florí d’Aruba" + ], + "AZM": [ + "AZM", + "manat azerbaidjanès (1993–2006)" + ], + "AZN": [ + "AZN", + "manat azerbaidjanès" + ], + "BAD": [ + "BAD", + "dinar de Bòsnia i Hercegovina (1992–1994)" + ], + "BAM": [ + "BAM", + "marc convertible de Bòsnia i Hercegovina" + ], + "BAN": [ + "BAN", + "nou dinar de Bòsnia i Hercegovina (1994–1997)" + ], + "BBD": [ + "BBD", + "dòlar de Barbados" + ], + "BDT": [ + "BDT", + "taka de Bangla Desh" + ], + "BEC": [ + "BEC", + "franc belga (convertible)" + ], + "BEF": [ + "BEF", + "franc belga" + ], + "BEL": [ + "BEL", + "franc belga (financer)" + ], + "BGL": [ + "BGL", + "lev fort búlgar" + ], + "BGM": [ + "BGM", + "lev socialista búlgar" + ], + "BGN": [ + "BGN", + "lev búlgar" + ], + "BGO": [ + "BGO", + "lev búlgar (1879–1952)" + ], + "BHD": [ + "BHD", + "dinar de Bahrain" + ], + "BIF": [ + "BIF", + "franc de Burundi" + ], + "BMD": [ + "BMD", + "dòlar de les Bermudes" + ], + "BND": [ + "BND", + "dòlar de Brunei" + ], + "BOB": [ + "BOB", + "bolivià" + ], + "BOL": [ + "BOL", + "boliviano bolivià (1863–1963)" + ], + "BOP": [ + "BOP", + "peso bolivià" + ], + "BOV": [ + "BOV", + "MVDOL bolivià" + ], + "BRB": [ + "BRB", + "cruzeiro novo brasiler (1967–1986)" + ], + "BRC": [ + "BRC", + "cruzado brasiler" + ], + "BRE": [ + "BRE", + "cruzeiro brasiler (1990–1993)" + ], + "BRL": [ + "BRL", + "real brasiler" + ], + "BRN": [ + "BRN", + "cruzado novo brasiler" + ], + "BRR": [ + "BRR", + "cruzeiro brasiler" + ], + "BRZ": [ + "BRZ", + "antic cruzeiro brasiler" + ], + "BSD": [ + "BSD", + "dòlar de les Bahames" + ], + "BTN": [ + "BTN", + "ngultrum de Bhutan" + ], + "BUK": [ + "BUK", + "kyat birmà" + ], + "BWP": [ + "BWP", + "pula de Botswana" + ], + "BYB": [ + "BYB", + "nou ruble bielorús (1994–1999)" + ], + "BYN": [ + "BYN", + "ruble bielorús" + ], + "BYR": [ + "BYR", + "ruble bielorús (2000–2016)" + ], + "BZD": [ + "BZD", + "dòlar de Belize" + ], + "CAD": [ + "CAD", + "dòlar canadenc" + ], + "CDF": [ + "CDF", + "franc congolès" + ], + "CHE": [ + "CHE", + "euro WIR" + ], + "CHF": [ + "CHF", + "franc suís" + ], + "CHW": [ + "CHW", + "franc WIR" + ], + "CLE": [ + "CLE", + "escut xilè" + ], + "CLF": [ + "CLF", + "unidad de fomento xilena" + ], + "CLP": [ + "CLP", + "peso xilè" + ], + "CNY": [ + "Â¥", + "iuan xinès" + ], + "COP": [ + "COP", + "peso colombià" + ], + "COU": [ + "COU", + "unidad de valor real colombiana" + ], + "CRC": [ + "CRC", + "colón costa-riqueny" + ], + "CSD": [ + "CSD", + "dinar serbi antic" + ], + "CSK": [ + "CSK", + "corona forta txecoslovaca" + ], + "CUC": [ + "CUC", + "peso convertible cubà" + ], + "CUP": [ + "CUP", + "peso cubà" + ], + "CVE": [ + "CVE", + "escut de Cap Verd" + ], + "CYP": [ + "CYP", + "lliura xipriota" + ], + "CZK": [ + "CZK", + "corona txeca" + ], + "DDM": [ + "DDM", + "marc de l’Alemanya Oriental" + ], + "DEM": [ + "DEM", + "marc alemany" + ], + "DJF": [ + "DJF", + "franc de Djibouti" + ], + "DKK": [ + "DKK", + "corona danesa" + ], + "DOP": [ + "DOP", + "peso dominicà" + ], + "DZD": [ + "DZD", + "dinar algerià" + ], + "ECS": [ + "ECS", + "sucre equatorià" + ], + "ECV": [ + "ECV", + "unidad de valor constante (UVC) equatoriana" + ], + "EEK": [ + "EEK", + "corona estoniana" + ], + "EGP": [ + "EGP", + "lliura egípcia" + ], + "ERN": [ + "ERN", + "nakfa eritreu" + ], + "ESA": [ + "ESA", + "pesseta espanyola (compte A)" + ], + "ESB": [ + "ESB", + "pesseta espanyola (compte convertible)" + ], + "ESP": [ + "â‚§", + "pesseta espanyola", + {} + ], + "ETB": [ + "ETB", + "birr etíop" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "marc finlandès" + ], + "FJD": [ + "FJD", + "dòlar fijià" + ], + "FKP": [ + "FKP", + "lliura de les illes Malvines" + ], + "FRF": [ + "FRF", + "franc francès" + ], + "GBP": [ + "£", + "lliura esterlina britànica" + ], + "GEK": [ + "GEK", + "cupó de lari georgià" + ], + "GEL": [ + "GEL", + "lari georgià" + ], + "GHC": [ + "GHC", + "cedi ghanès (1979–2007)" + ], + "GHS": [ + "GHS", + "cedi ghanès" + ], + "GIP": [ + "GIP", + "lliura de Gibraltar" + ], + "GMD": [ + "GMD", + "dalasi gambià" + ], + "GNF": [ + "GNF", + "franc guineà" + ], + "GNS": [ + "GNS", + "syli guineà" + ], + "GQE": [ + "GQE", + "ekwele de Guinea Equatorial" + ], + "GRD": [ + "GRD", + "dracma grega" + ], + "GTQ": [ + "GTQ", + "quetzal guatemalenc" + ], + "GWE": [ + "GWE", + "escut de la Guinea Portuguesa" + ], + "GWP": [ + "GWP", + "peso de Guinea Bissau" + ], + "GYD": [ + "GYD", + "dòlar de Guyana" + ], + "HKD": [ + "HK$", + "dòlar de Hong Kong" + ], + "HNL": [ + "HNL", + "lempira hondurenya" + ], + "HRD": [ + "HRD", + "dinar croat" + ], + "HRK": [ + "HRK", + "kuna croata" + ], + "HTG": [ + "HTG", + "gourde haitià" + ], + "HUF": [ + "HUF", + "fòrint hongarès" + ], + "IDR": [ + "IDR", + "rupia indonèsia" + ], + "IEP": [ + "IEP", + "lliura irlandesa" + ], + "ILP": [ + "ILP", + "lliura israeliana" + ], + "ILR": [ + "ILR", + "xéquel israelià" + ], + "ILS": [ + "₪", + "nou xéquel israelià" + ], + "INR": [ + "₹", + "rupia índia" + ], + "IQD": [ + "IQD", + "dinar iraquià" + ], + "IRR": [ + "IRR", + "rial iranià" + ], + "ISJ": [ + "ISJ", + "corona islandesa antiga" + ], + "ISK": [ + "ISK", + "corona islandesa" + ], + "ITL": [ + "ITL", + "lira italiana" + ], + "JMD": [ + "JMD", + "dòlar jamaicà" + ], + "JOD": [ + "JOD", + "dinar jordà" + ], + "JPY": [ + "JPÂ¥", + "ien japonès" + ], + "KES": [ + "KES", + "xíling kenyà" + ], + "KGS": [ + "KGS", + "som kirguís" + ], + "KHR": [ + "KHR", + "riel cambodjà" + ], + "KMF": [ + "KMF", + "franc de les Comores" + ], + "KPW": [ + "KPW", + "won nord-coreà" + ], + "KRH": [ + "KRH", + "hwan sud-coreà (1953–1962)" + ], + "KRO": [ + "KRO", + "antic won sud-coreà" + ], + "KRW": [ + "â‚©", + "won sud-coreà" + ], + "KWD": [ + "KWD", + "dinar kuwaitià" + ], + "KYD": [ + "KYD", + "dòlar de les illes Caiman" + ], + "KZT": [ + "KZT", + "tenge kazakh" + ], + "LAK": [ + "LAK", + "kip laosià" + ], + "LBP": [ + "LBP", + "lliura libanesa" + ], + "LKR": [ + "LKR", + "rupia de Sri Lanka" + ], + "LRD": [ + "LRD", + "dòlar liberià" + ], + "LSL": [ + "LSL", + "loti de Lesotho" + ], + "LTL": [ + "LTL", + "litas lituà" + ], + "LTT": [ + "LTT", + "talonas lituà" + ], + "LUC": [ + "LUC", + "franc convertible luxemburguès" + ], + "LUF": [ + "LUF", + "franc luxemburguès" + ], + "LUL": [ + "LUL", + "franc financer luxemburguès" + ], + "LVL": [ + "LVL", + "lats letó" + ], + "LVR": [ + "LVR", + "ruble letó" + ], + "LYD": [ + "LYD", + "dinar libi" + ], + "MAD": [ + "MAD", + "dírham marroquí" + ], + "MAF": [ + "MAF", + "franc marroquí" + ], + "MCF": [ + "MCF", + "franc monegasc" + ], + "MDC": [ + "MDC", + "cupó moldau" + ], + "MDL": [ + "MDL", + "leu moldau" + ], + "MGA": [ + "MGA", + "ariary malgaix" + ], + "MGF": [ + "MGF", + "franc malgaix" + ], + "MKD": [ + "MKD", + "denar macedoni" + ], + "MKN": [ + "MKN", + "denar macedoni (1992–1993)" + ], + "MLF": [ + "MLF", + "franc malià" + ], + "MMK": [ + "MMK", + "kyat de Myanmar" + ], + "MNT": [ + "MNT", + "tögrög mongol" + ], + "MOP": [ + "MOP", + "pataca de Macau" + ], + "MRO": [ + "MRO", + "ouguiya maurità" + ], + "MTL": [ + "MTL", + "lira maltesa" + ], + "MTP": [ + "MTP", + "lliura maltesa" + ], + "MUR": [ + "MUR", + "rupia mauriciana" + ], + "MVR": [ + "MVR", + "rupia de les Maldives" + ], + "MWK": [ + "MWK", + "kwacha malawià" + ], + "MXN": [ + "MXN", + "peso mexicà" + ], + "MXP": [ + "MXP", + "peso de plata mexicà (1861–1992)" + ], + "MXV": [ + "MXV", + "unidad de inversión (UDI) mexicana" + ], + "MYR": [ + "MYR", + "ringgit de Malàisia" + ], + "MZE": [ + "MZE", + "escut moçambiquès" + ], + "MZM": [ + "MZM", + "antic metical moçambiquès" + ], + "MZN": [ + "MZN", + "metical moçambiquès" + ], + "NAD": [ + "NAD", + "dòlar namibià" + ], + "NGN": [ + "NGN", + "naira nigerià" + ], + "NIC": [ + "NIC", + "córdoba nicaragüenca" + ], + "NIO": [ + "NIO", + "córdoba oro nicaragüenca" + ], + "NLG": [ + "NLG", + "florí neerlandès" + ], + "NOK": [ + "NOK", + "corona noruega" + ], + "NPR": [ + "NPR", + "rupia nepalesa" + ], + "NZD": [ + "NZ$", + "dòlar neozelandès" + ], + "OMR": [ + "OMR", + "rial omanita" + ], + "PAB": [ + "PAB", + "balboa panameny" + ], + "PEI": [ + "PEI", + "inti peruà" + ], + "PEN": [ + "PEN", + "nou sol peruà" + ], + "PES": [ + "PES", + "sol peruà" + ], + "PGK": [ + "PGK", + "kina de Papua Nova Guinea" + ], + "PHP": [ + "PHP", + "peso filipí" + ], + "PKR": [ + "PKR", + "rupia pakistanesa" + ], + "PLN": [ + "PLN", + "zloty polonès" + ], + "PLZ": [ + "PLZ", + "zloty polonès (1950–1995)" + ], + "PTE": [ + "PTE", + "escut portuguès" + ], + "PYG": [ + "PYG", + "guaraní paraguaià" + ], + "QAR": [ + "QAR", + "rial de Qatar" + ], + "RHD": [ + "RHD", + "dòlar rhodesià" + ], + "ROL": [ + "ROL", + "antic leu romanès" + ], + "RON": [ + "RON", + "leu romanès" + ], + "RSD": [ + "RSD", + "dinar serbi" + ], + "RUB": [ + "RUB", + "ruble rus" + ], + "RUR": [ + "RUR", + "ruble rus (1991–1998)" + ], + "RWF": [ + "RWF", + "franc de Ruanda" + ], + "SAR": [ + "SAR", + "rial saudita" + ], + "SBD": [ + "SBD", + "dòlar de les illes Salomó" + ], + "SCR": [ + "SCR", + "rupia de les Seychelles" + ], + "SDD": [ + "SDD", + "dinar sudanès" + ], + "SDG": [ + "SDG", + "lliura sudanesa" + ], + "SDP": [ + "SDP", + "antiga lliura sudanesa" + ], + "SEK": [ + "SEK", + "corona sueca" + ], + "SGD": [ + "SGD", + "dòlar de Singapur" + ], + "SHP": [ + "SHP", + "lliura de Santa Helena" + ], + "SIT": [ + "SIT", + "tolar eslovè" + ], + "SKK": [ + "SKK", + "corona eslovaca" + ], + "SLL": [ + "SLL", + "leone de Sierra Leone" + ], + "SOS": [ + "SOS", + "xíling somali" + ], + "SRD": [ + "SRD", + "dòlar de Surinam" + ], + "SRG": [ + "SRG", + "florí de Surinam" + ], + "SSP": [ + "SSP", + "lliura del Sudan del Sud" + ], + "STD": [ + "STD", + "dobra de São Tomé i Príncipe" + ], + "SUR": [ + "SUR", + "ruble soviètic" + ], + "SVC": [ + "SVC", + "colón salvadorenc" + ], + "SYP": [ + "SYP", + "lliura síria" + ], + "SZL": [ + "SZL", + "lilangeni swazi" + ], + "THB": [ + "฿", + "baht tailandès" + ], + "TJR": [ + "TJR", + "ruble tadjik" + ], + "TJS": [ + "TJS", + "somoni tadjik" + ], + "TMM": [ + "TMM", + "manat turcman (1993–2009)" + ], + "TMT": [ + "TMT", + "manat turcman" + ], + "TND": [ + "TND", + "dinar tunisià" + ], + "TOP": [ + "TOP", + "pa‘anga tongà" + ], + "TPE": [ + "TPE", + "escut de Timor" + ], + "TRL": [ + "TRL", + "lira turca (1922–2005)" + ], + "TRY": [ + "TRY", + "lira turca" + ], + "TTD": [ + "TTD", + "dòlar de Trinitat i Tobago" + ], + "TWD": [ + "NT$", + "nou dòlar de Taiwan" + ], + "TZS": [ + "TZS", + "xíling tanzà" + ], + "UAH": [ + "UAH", + "hrívnia ucraïnesa" + ], + "UAK": [ + "UAK", + "karbóvanets ucraïnès" + ], + "UGS": [ + "UGS", + "xíling ugandès (1966–1987)" + ], + "UGX": [ + "UGX", + "xíling ugandès" + ], + "USD": [ + "USD", + "dòlar dels Estats Units" + ], + "USN": [ + "USN", + "dòlar dels Estats Units (dia següent)" + ], + "USS": [ + "USS", + "dòlar dels Estats Units (mateix dia)" + ], + "UYI": [ + "UYI", + "peso uruguaià en unitats indexades" + ], + "UYP": [ + "UYP", + "peso uruguaià (1975–1993)" + ], + "UYU": [ + "UYU", + "peso uruguaià" + ], + "UZS": [ + "UZS", + "som uzbek" + ], + "VEB": [ + "VEB", + "bolívar veneçolà (1871–2008)" + ], + "VEF": [ + "VEF", + "bolívar veneçolà" + ], + "VND": [ + "â‚«", + "dong vietnamita" + ], + "VNN": [ + "VNN", + "dong vietnamita (1978–1985)" + ], + "VUV": [ + "VUV", + "vatu de Vanuatu" + ], + "WST": [ + "WST", + "tala samoà" + ], + "XAF": [ + "FCFA", + "franc CFA BEAC" + ], + "XCD": [ + "XCD", + "dòlar del Carib Oriental" + ], + "XEU": [ + "XEU", + "unitat de moneda europea" + ], + "XFO": [ + "XFO", + "franc or francès" + ], + "XFU": [ + "XFU", + "franc UIC francès" + ], + "XOF": [ + "CFA", + "franc CFA BCEAO" + ], + "XPF": [ + "CFPF", + "franc CFP" + ], + "XRE": [ + "XRE", + "fons RINET" + ], + "YDD": [ + "YDD", + "dinar iemenita" + ], + "YER": [ + "YER", + "rial iemenita" + ], + "YUD": [ + "YUD", + "dinar fort iugoslau" + ], + "YUM": [ + "YUM", + "nou dinar iugoslau" + ], + "YUN": [ + "YUN", + "dinar convertible iugoslau" + ], + "YUR": [ + "YUR", + "dinar iugoslau reformat (1992–1993)" + ], + "ZAL": [ + "ZAL", + "rand sud-africà (financer)" + ], + "ZAR": [ + "ZAR", + "rand sud-africà" + ], + "ZMK": [ + "ZMK", + "kwacha zambià (1968–2012)" + ], + "ZMW": [ + "ZMW", + "kwacha zambià" + ], + "ZRN": [ + "ZRN", + "nou zaire zairès" + ], + "ZRZ": [ + "ZRZ", + "zaire zairès" + ], + "ZWD": [ + "ZWD", + "dòlar zimbabuès (1980–2008)" + ], + "ZWL": [ + "ZWL", + "dòlar zimbabuès (2009)" + ], + "ZWR": [ + "ZWR", + "dòlar zimbabuès (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ca_FR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ca_FR.json new file mode 100644 index 0000000000000000000000000000000000000000..2556405f6e97d625630d4ea8b53df98d260cf5c8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ca_FR.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "FRF": [ + "F", + "franc francès" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ce.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ce.json new file mode 100644 index 0000000000000000000000000000000000000000..a39d9d927d2165c68f71e525c1d5543eed8ba8f5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ce.json @@ -0,0 +1,625 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AED": [ + "AED", + "Дирхам ӀЦЭ" + ], + "AFN": [ + "AFN", + "ОвхӀан-пачхьалкхан афгани" + ], + "ALL": [ + "ALL", + "Ðлбанин лек" + ], + "AMD": [ + "AMD", + "Эрмалойчоьнан драм" + ], + "ANG": [ + "ANG", + "Ðидерландин Ðнтилин гульден" + ], + "AOA": [ + "AOA", + "Ðнголан кванза" + ], + "ARS": [ + "ARS", + "Ðргентинан пеÑо" + ], + "AUD": [ + "A$", + "ÐвÑтралин доллар" + ], + "AWG": [ + "AWG", + "Ðрубан флорин" + ], + "AZN": [ + "AZN", + "Ðзербайджанан манат" + ], + "BAM": [ + "BAM", + "БоÑнин а, Герцеговинан а хийцалун марка" + ], + "BBD": [ + "BBD", + "БарбадоÑан доллар" + ], + "BDT": [ + "BDT", + "Бангладешан така" + ], + "BGN": [ + "BGN", + "Болгарин лев" + ], + "BHD": [ + "BHD", + "Бахрейнан динар" + ], + "BIF": [ + "BIF", + "Бурундин франк" + ], + "BMD": [ + "BMD", + "Бермудан доллар" + ], + "BND": [ + "BND", + "Брунейн доллар" + ], + "BOB": [ + "BOB", + "Боливин боливиано" + ], + "BRL": [ + "R$", + "Бразилин реал" + ], + "BSD": [ + "BSD", + "Багаман доллар" + ], + "BTN": [ + "BTN", + "Бутанан нгултрум" + ], + "BWP": [ + "BWP", + "БотÑванан пула" + ], + "BYN": [ + "BYN", + "БелоруÑÑин Ñом" + ], + "BYR": [ + "BYR", + "БелоруÑÑин Ñом (2000–2016)" + ], + "BZD": [ + "BZD", + "Белизин доллар" + ], + "CAD": [ + "CA$", + "Канадан доллар" + ], + "CDF": [ + "CDF", + "Конголезин франк" + ], + "CHF": [ + "CHF", + "Швейцарин франк" + ], + "CLP": [ + "CLP", + "Чилин пеÑо" + ], + "CNY": [ + "CNÂ¥", + "Китайн юань" + ], + "COP": [ + "COP", + "Колумбин пеÑо" + ], + "CRC": [ + "CRC", + "КоÑтарикан колон" + ], + "CUC": [ + "CUC", + "Кубан хийцалун пеÑо" + ], + "CUP": [ + "CUP", + "Кубан пеÑо" + ], + "CVE": [ + "CVE", + "Кабо-Верден ÑÑкудо" + ], + "CZK": [ + "CZK", + "Чехин крона" + ], + "DJF": [ + "DJF", + "Джибутин франк" + ], + "DKK": [ + "DKK", + "Данин крона" + ], + "DOP": [ + "DOP", + "Доминикан пеÑо" + ], + "DZD": [ + "DZD", + "Ðлжиран динар" + ], + "EGP": [ + "EGP", + "МиÑаран фунт" + ], + "ERN": [ + "ERN", + "Эритрейн накфа" + ], + "ETB": [ + "ETB", + "Эфиопин быр" + ], + "EUR": [ + "€", + "Евро" + ], + "FJD": [ + "FJD", + "Фиджин доллар" + ], + "FKP": [ + "FKP", + "Фолклендан гӀайренийн фунт" + ], + "GBP": [ + "£", + "Ðнглин фунт" + ], + "GEL": [ + "GEL", + "Гуьржийчоьнан лари" + ], + "GHS": [ + "GHS", + "Ганан Ñеди" + ], + "GIP": [ + "GIP", + "Гибралтаран фунт" + ], + "GMD": [ + "GMD", + "Гамбин далаÑи" + ], + "GNF": [ + "GNF", + "Гвинейн франк" + ], + "GTQ": [ + "GTQ", + "Гватемалан кетÑаль" + ], + "GYD": [ + "GYD", + "Гайанан доллар" + ], + "HKD": [ + "HK$", + "Гонконган доллар" + ], + "HNL": [ + "HNL", + "ГондураÑан лемпира" + ], + "HRK": [ + "HRK", + "Хорватин куна" + ], + "HTG": [ + "HTG", + "Гаитин гурд" + ], + "HUF": [ + "HUF", + "Венгрин форинт" + ], + "IDR": [ + "IDR", + "Индонезин рупи" + ], + "ILS": [ + "₪", + "Израилан керла шекель" + ], + "INR": [ + "₹", + "Индин рупи" + ], + "IQD": [ + "IQD", + "Ӏиракъан динар" + ], + "IRR": [ + "IRR", + "ГӀажарийчоьнан риал" + ], + "ISK": [ + "ISK", + "ИÑландин крона" + ], + "JMD": [ + "JMD", + "Ямайн доллар" + ], + "JOD": [ + "JOD", + "Урданан динар" + ], + "JPY": [ + "JPÂ¥", + "Японин иена" + ], + "KES": [ + "KES", + "Кенин шиллинг" + ], + "KGS": [ + "KGS", + "Киргизин Ñом" + ], + "KHR": [ + "KHR", + "Камбоджан риель" + ], + "KMF": [ + "KMF", + "Коморийн гӀайренийн франк" + ], + "KPW": [ + "KPW", + "КъилбаÑеда Корейн вона" + ], + "KRW": [ + "â‚©", + "Къилба Корейн вона" + ], + "KWD": [ + "KWD", + "Кувейтан динар" + ], + "KYD": [ + "KYD", + "Кайманийн гӀайренийн доллар" + ], + "KZT": [ + "KZT", + "КазахÑтанан тенге" + ], + "LAK": [ + "LAK", + "ЛаоÑан кип" + ], + "LBP": [ + "LBP", + "Ливанан фунт" + ], + "LKR": [ + "LKR", + "Шри-Ланкан рупи" + ], + "LRD": [ + "LRD", + "Либерин доллар" + ], + "LYD": [ + "LYD", + "Ливин динар" + ], + "MAD": [ + "MAD", + "Мароккон дирхам" + ], + "MDL": [ + "MDL", + "Молдавин лей" + ], + "MGA": [ + "MGA", + "МалагаÑийн ариари" + ], + "MKD": [ + "MKD", + "Македонин динар" + ], + "MMK": [ + "MMK", + "МьÑнман кьÑÑ‚" + ], + "MNT": [ + "MNT", + "Монголин тугрик" + ], + "MOP": [ + "MOP", + "Макаон патака" + ], + "MRO": [ + "MRO", + "Мавританин уги" + ], + "MUR": [ + "MUR", + "Маврикин рупи" + ], + "MVR": [ + "MVR", + "Мальдивийн руфи" + ], + "MWK": [ + "MWK", + "Малавин квача" + ], + "MXN": [ + "MX$", + "МекÑикан пеÑо" + ], + "MYR": [ + "MYR", + "Малайзин ринггит" + ], + "MZN": [ + "MZN", + "Мозамбикан метикал" + ], + "NAD": [ + "NAD", + "Ðамибин доллар" + ], + "NGN": [ + "NGN", + "Ðигерин найра" + ], + "NIO": [ + "NIO", + "Ðикарагуан кордоба" + ], + "NOK": [ + "NOK", + "Ðорвегин крона" + ], + "NPR": [ + "NPR", + "Ðепалан рупи" + ], + "NZD": [ + "NZ$", + "Керла Зеландин доллар" + ], + "OMR": [ + "OMR", + "Оманан риал" + ], + "PAB": [ + "PAB", + "Панаман бальбоа" + ], + "PEN": [ + "PEN", + "Перун керла Ñоль" + ], + "PGK": [ + "PGK", + "Папуа — Керла Гвинейн кина" + ], + "PHP": [ + "PHP", + "Филиппинийн пеÑо" + ], + "PKR": [ + "PKR", + "ПакиÑтанан рупи" + ], + "PLN": [ + "PLN", + "Польшан злотый" + ], + "PYG": [ + "PYG", + "Парагвайн гуарани" + ], + "QAR": [ + "QAR", + "Катаран риал" + ], + "RON": [ + "RON", + "Румынин лей" + ], + "RSD": [ + "RSD", + "Сербин динар" + ], + "RUB": [ + "₽", + "РоÑÑийн Ñом" + ], + "RWF": [ + "RWF", + "Руандан франк" + ], + "SAR": [ + "SAR", + "СаӀудийн Ðравин риал" + ], + "SBD": [ + "SBD", + "Соломонан гӀайренийн доллар" + ], + "SCR": [ + "SCR", + "Сейшелан рупи" + ], + "SDG": [ + "SDG", + "Суданан фунт" + ], + "SEK": [ + "SEK", + "Швецин крона" + ], + "SGD": [ + "SGD", + "Сингапуран доллар" + ], + "SHP": [ + "SHP", + "Сийлахьчу Еленин гӀайрен фунт" + ], + "SLL": [ + "SLL", + "Леоне" + ], + "SOS": [ + "SOS", + "Сомалин шиллинг" + ], + "SRD": [ + "SRD", + "Суринаман доллар" + ], + "SSP": [ + "SSP", + "Къилба Суданан фунт" + ], + "STD": [ + "STD", + "Сан-Томен а, ПринÑипин а добра" + ], + "SYP": [ + "SYP", + "Шеман фунт" + ], + "SZL": [ + "SZL", + "Свазилендан лилангени" + ], + "THB": [ + "THB", + "Таиландан бат" + ], + "TJS": [ + "TJS", + "ТаджикиÑтанан Ñомони" + ], + "TMT": [ + "TMT", + "Туркменин керла манат" + ], + "TND": [ + "TND", + "ТуниÑан динар" + ], + "TOP": [ + "TOP", + "Тонганан паанга" + ], + "TRY": [ + "TRY", + "Туркойчоьнан лира" + ], + "TTD": [ + "TTD", + "Тринидадан а, Тобагон а доллар" + ], + "TWD": [ + "NT$", + "Тайванан керла доллар" + ], + "TZS": [ + "TZS", + "Танзанин шиллинг" + ], + "UAH": [ + "UAH", + "Украинан гривна" + ], + "UGX": [ + "UGX", + "Угандан шиллинг" + ], + "USD": [ + "US$", + "ÐЦШн доллар" + ], + "UYU": [ + "UYU", + "Уругвайн пеÑо" + ], + "UZS": [ + "UZS", + "УзбекиÑтанан Ñум" + ], + "VEF": [ + "VEF", + "ВенеÑуÑлан боливар" + ], + "VND": [ + "â‚«", + "Вьетнаман донг" + ], + "VUV": [ + "VUV", + "Вануатун вату" + ], + "WST": [ + "WST", + "Самоанан тала" + ], + "XAF": [ + "FCFA", + "Юккъерчу Ðфрикан КФРфранк" + ], + "XCD": [ + "EC$", + "Малхбален Карибийн доллар" + ], + "XOF": [ + "CFA", + "Малхбузен Ðфрикан КФРфранк" + ], + "XPF": [ + "CFPF", + "Французийн Тийна океанан франк" + ], + "YER": [ + "YER", + "Йеменан риал" + ], + "ZAR": [ + "ZAR", + "Къилба-Ðфрикин Ñ€Ñнд" + ], + "ZMW": [ + "ZMW", + "Замбин квача" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/cs.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/cs.json new file mode 100644 index 0000000000000000000000000000000000000000..9acce92b210620074f96b27bf91244b78326fa6f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/cs.json @@ -0,0 +1,1141 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "andorrská peseta" + ], + "AED": [ + "AED", + "SAE dirham" + ], + "AFA": [ + "AFA", + "afghánský afghán (1927–2002)" + ], + "AFN": [ + "AFN", + "afghánský afghán" + ], + "ALK": [ + "ALK", + "albánský lek (1946–1965)" + ], + "ALL": [ + "ALL", + "albánský lek" + ], + "AMD": [ + "AMD", + "arménský dram" + ], + "ANG": [ + "ANG", + "nizozemskoantilský gulden" + ], + "AOA": [ + "AOA", + "angolská kwanza" + ], + "AOK": [ + "AOK", + "angolská kwanza (1977–1991)" + ], + "AON": [ + "AON", + "angolská kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "angolská kwanza (1995–1999)" + ], + "ARA": [ + "ARA", + "argentinský austral" + ], + "ARL": [ + "ARL", + "argentinské peso ley (1970–1983)" + ], + "ARM": [ + "ARM", + "argentinské peso (1881–1970)" + ], + "ARP": [ + "ARP", + "argentinské peso (1983–1985)" + ], + "ARS": [ + "ARS", + "argentinské peso" + ], + "ATS": [ + "ATS", + "rakouský Å¡ilink" + ], + "AUD": [ + "AU$", + "australský dolar" + ], + "AWG": [ + "AWG", + "arubský zlatý" + ], + "AZM": [ + "AZM", + "ázerbájdžánský manat (1993–2006)" + ], + "AZN": [ + "AZN", + "ázerbájdžánský manat" + ], + "BAD": [ + "BAD", + "bosenský dinár (1992–1994)" + ], + "BAM": [ + "BAM", + "bosenská konvertibilní marka" + ], + "BAN": [ + "BAN", + "bosenský nový dinár (1994–1997)" + ], + "BBD": [ + "BBD", + "barbadoský dolar" + ], + "BDT": [ + "BDT", + "bangladéšská taka" + ], + "BEC": [ + "BEC", + "belgický konvertibilní frank" + ], + "BEF": [ + "BEF", + "belgický frank" + ], + "BEL": [ + "BEL", + "belgický finanÄní frank" + ], + "BGL": [ + "BGL", + "BGL" + ], + "BGM": [ + "BGM", + "BGM" + ], + "BGN": [ + "BGN", + "bulharský lev" + ], + "BGO": [ + "BGO", + "bulharský lev (1879–1952)" + ], + "BHD": [ + "BHD", + "bahrajnský dinár" + ], + "BIF": [ + "BIF", + "burundský frank" + ], + "BMD": [ + "BMD", + "bermudský dolar" + ], + "BND": [ + "BND", + "brunejský dolar" + ], + "BOB": [ + "BOB", + "bolivijský boliviano" + ], + "BOL": [ + "BOL", + "bolivijský boliviano (1863–1963)" + ], + "BOP": [ + "BOP", + "bolivijské peso" + ], + "BOV": [ + "BOV", + "bolivijský mvdol" + ], + "BRB": [ + "BRB", + "brazilské nové cruzeiro (1967–1986)" + ], + "BRC": [ + "BRC", + "brazilské cruzado (1986–1989)" + ], + "BRE": [ + "BRE", + "brazilské cruzeiro (1990–1993)" + ], + "BRL": [ + "R$", + "brazilský real" + ], + "BRN": [ + "BRN", + "brazilské nové cruzado (1989–1990)" + ], + "BRR": [ + "BRR", + "brazilské cruzeiro (1993–1994)" + ], + "BRZ": [ + "BRZ", + "brazilské cruzeiro (1942–1967)" + ], + "BSD": [ + "BSD", + "bahamský dolar" + ], + "BTN": [ + "BTN", + "bhútánský ngultrum" + ], + "BUK": [ + "BUK", + "barmský kyat" + ], + "BWP": [ + "BWP", + "botswanská pula" + ], + "BYB": [ + "BYB", + "bÄ›loruský rubl (1994–1999)" + ], + "BYN": [ + "BYN", + "bÄ›loruský rubl" + ], + "BYR": [ + "BYR", + "bÄ›loruský rubl (2000–2016)" + ], + "BZD": [ + "BZD", + "belizský dolar" + ], + "CAD": [ + "CA$", + "kanadský dolar" + ], + "CDF": [ + "CDF", + "konžský frank" + ], + "CHE": [ + "CHE", + "Å¡výcarské WIR-euro" + ], + "CHF": [ + "CHF", + "Å¡výcarský frank" + ], + "CHW": [ + "CHW", + "Å¡výcarský WIR-frank" + ], + "CLE": [ + "CLE", + "chilské escudo" + ], + "CLF": [ + "CLF", + "chilská úÄetní jednotka (UF)" + ], + "CLP": [ + "CLP", + "chilské peso" + ], + "CNY": [ + "CNÂ¥", + "Äínský jüan" + ], + "COP": [ + "COP", + "kolumbijské peso" + ], + "COU": [ + "COU", + "kolumbijská jednotka reálné hodnoty" + ], + "CRC": [ + "CRC", + "kostarický colón" + ], + "CSD": [ + "CSD", + "srbský dinár (2002–2006)" + ], + "CSK": [ + "KÄs", + "Äeskoslovenská koruna" + ], + "CUC": [ + "CUC", + "kubánské konvertibilní peso" + ], + "CUP": [ + "CUP", + "kubánské peso" + ], + "CVE": [ + "CVE", + "kapverdské escudo" + ], + "CYP": [ + "CYP", + "kyperská libra" + ], + "CZK": [ + "KÄ", + "Äeská koruna" + ], + "DDM": [ + "DDM", + "východonÄ›mecká marka" + ], + "DEM": [ + "DEM", + "nÄ›mecká marka" + ], + "DJF": [ + "DJF", + "džibutský frank" + ], + "DKK": [ + "DKK", + "dánská koruna" + ], + "DOP": [ + "DOP", + "dominikánské peso" + ], + "DZD": [ + "DZD", + "alžírský dinár" + ], + "ECS": [ + "ECS", + "ekvádorský sucre" + ], + "ECV": [ + "ECV", + "ekvádorská jednotka konstantní hodnoty" + ], + "EEK": [ + "EEK", + "estonská koruna" + ], + "EGP": [ + "EGP", + "egyptská libra" + ], + "ERN": [ + "ERN", + "eritrejská nakfa" + ], + "ESA": [ + "ESA", + "Å¡panÄ›lská peseta („A“ úÄet)" + ], + "ESB": [ + "ESB", + "Å¡panÄ›lská peseta (konvertibilní úÄet)" + ], + "ESP": [ + "ESP", + "Å¡panÄ›lská peseta" + ], + "ETB": [ + "ETB", + "etiopský birr" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "finská marka" + ], + "FJD": [ + "FJD", + "fidžijský dolar" + ], + "FKP": [ + "FKP", + "falklandská libra" + ], + "FRF": [ + "FRF", + "francouzský frank" + ], + "GBP": [ + "£", + "britská libra" + ], + "GEK": [ + "GEK", + "gruzínské kuponové lari" + ], + "GEL": [ + "GEL", + "gruzínské lari" + ], + "GHC": [ + "GHC", + "ghanský cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "ghanský cedi" + ], + "GIP": [ + "GIP", + "gibraltarská libra" + ], + "GMD": [ + "GMD", + "gambijský dalasi" + ], + "GNF": [ + "GNF", + "guinejský frank" + ], + "GNS": [ + "GNS", + "guinejský syli" + ], + "GQE": [ + "GQE", + "rovníkovoguinejský ekwele" + ], + "GRD": [ + "GRD", + "Å™ecká drachma" + ], + "GTQ": [ + "GTQ", + "guatemalský quetzal" + ], + "GWE": [ + "GWE", + "portugalskoguinejské escudo" + ], + "GWP": [ + "GWP", + "guinejsko-bissauské peso" + ], + "GYD": [ + "GYD", + "guyanský dolar" + ], + "HKD": [ + "HK$", + "hongkongský dolar" + ], + "HNL": [ + "HNL", + "honduraská lempira" + ], + "HRD": [ + "HRD", + "chorvatský dinár" + ], + "HRK": [ + "HRK", + "chorvatská kuna" + ], + "HTG": [ + "HTG", + "haitský gourde" + ], + "HUF": [ + "HUF", + "maÄarský forint" + ], + "IDR": [ + "IDR", + "indonéská rupie" + ], + "IEP": [ + "IEP", + "irská libra" + ], + "ILP": [ + "ILP", + "izraelská libra" + ], + "ILR": [ + "ILR", + "izraelský Å¡ekel (1980–1985)" + ], + "ILS": [ + "ILS", + "izraelský nový Å¡ekel" + ], + "INR": [ + "INR", + "indická rupie" + ], + "IQD": [ + "IQD", + "irácký dinár" + ], + "IRR": [ + "IRR", + "íránský rijál" + ], + "ISJ": [ + "ISJ", + "islandská koruna (1918–1981)" + ], + "ISK": [ + "ISK", + "islandská koruna" + ], + "ITL": [ + "ITL", + "italská lira" + ], + "JMD": [ + "JMD", + "jamajský dolar" + ], + "JOD": [ + "JOD", + "jordánský dinár" + ], + "JPY": [ + "JPÂ¥", + "japonský jen" + ], + "KES": [ + "KES", + "keňský Å¡ilink" + ], + "KGS": [ + "KGS", + "kyrgyzský som" + ], + "KHR": [ + "KHR", + "kambodžský riel" + ], + "KMF": [ + "KMF", + "komorský frank" + ], + "KPW": [ + "KPW", + "severokorejský won" + ], + "KRH": [ + "KRH", + "jihokorejský hwan (1953–1962)" + ], + "KRO": [ + "KRO", + "jihokorejský won (1945–1953)" + ], + "KRW": [ + "â‚©", + "jihokorejský won" + ], + "KWD": [ + "KWD", + "kuvajtský dinár" + ], + "KYD": [ + "KYD", + "kajmanský dolar" + ], + "KZT": [ + "KZT", + "kazaÅ¡ské tenge" + ], + "LAK": [ + "LAK", + "laoský kip" + ], + "LBP": [ + "LBP", + "libanonská libra" + ], + "LKR": [ + "LKR", + "srílanská rupie" + ], + "LRD": [ + "LRD", + "liberijský dolar" + ], + "LSL": [ + "LSL", + "lesothský loti" + ], + "LTL": [ + "LTL", + "litevský litas" + ], + "LTT": [ + "LTT", + "litevský talonas" + ], + "LUC": [ + "LUC", + "lucemburský konvertibilní frank" + ], + "LUF": [ + "LUF", + "lucemburský frank" + ], + "LUL": [ + "LUL", + "lucemburský finanÄní frank" + ], + "LVL": [ + "LVL", + "lotyÅ¡ský lat" + ], + "LVR": [ + "LVR", + "lotyÅ¡ský rubl" + ], + "LYD": [ + "LYD", + "libyjský dinár" + ], + "MAD": [ + "MAD", + "marocký dinár" + ], + "MAF": [ + "MAF", + "marocký frank" + ], + "MCF": [ + "MCF", + "monacký frank" + ], + "MDC": [ + "MDC", + "moldavský kupon" + ], + "MDL": [ + "MDL", + "moldavský leu" + ], + "MGA": [ + "MGA", + "madagaskarský ariary" + ], + "MGF": [ + "MGF", + "madagaskarský frank" + ], + "MKD": [ + "MKD", + "makedonský denár" + ], + "MKN": [ + "MKN", + "makedonský denár (1992–1993)" + ], + "MLF": [ + "MLF", + "malijský frank" + ], + "MMK": [ + "MMK", + "myanmarský kyat" + ], + "MNT": [ + "MNT", + "mongolský tugrik" + ], + "MOP": [ + "MOP", + "macajská pataca" + ], + "MRO": [ + "MRO", + "mauritánská ouguiya" + ], + "MTL": [ + "MTL", + "maltská lira" + ], + "MTP": [ + "MTP", + "maltská libra" + ], + "MUR": [ + "MUR", + "mauricijská rupie" + ], + "MVP": [ + "MVP", + "maledivská rupie (1947–1981)" + ], + "MVR": [ + "MVR", + "maledivská rupie" + ], + "MWK": [ + "MWK", + "malawijská kwacha" + ], + "MXN": [ + "MX$", + "mexické peso" + ], + "MXP": [ + "MXP", + "mexické stříbrné peso (1861–1992)" + ], + "MXV": [ + "MXV", + "mexická investiÄní jednotka" + ], + "MYR": [ + "MYR", + "malajsijský ringgit" + ], + "MZE": [ + "MZE", + "mosambický escudo" + ], + "MZM": [ + "MZM", + "mosambický metical (1980–2006)" + ], + "MZN": [ + "MZN", + "mozambický metical" + ], + "NAD": [ + "NAD", + "namibijský dolar" + ], + "NGN": [ + "NGN", + "nigerijská naira" + ], + "NIC": [ + "NIC", + "nikaragujská córdoba (1988–1991)" + ], + "NIO": [ + "NIO", + "nikaragujská córdoba" + ], + "NLG": [ + "NLG", + "nizozemský gulden" + ], + "NOK": [ + "NOK", + "norská koruna" + ], + "NPR": [ + "NPR", + "nepálská rupie" + ], + "NZD": [ + "NZ$", + "novozélandský dolar" + ], + "OMR": [ + "OMR", + "ománský rijál" + ], + "PAB": [ + "PAB", + "panamská balboa" + ], + "PEI": [ + "PEI", + "peruánská inti" + ], + "PEN": [ + "PEN", + "peruánský nový sol" + ], + "PES": [ + "PES", + "peruánský sol (1863–1965)" + ], + "PGK": [ + "PGK", + "papuánská nová kina" + ], + "PHP": [ + "PHP", + "filipínské peso" + ], + "PKR": [ + "PKR", + "pákistánská rupie" + ], + "PLN": [ + "PLN", + "polský zlotý" + ], + "PLZ": [ + "PLZ", + "polský zlotý (1950–1995)" + ], + "PTE": [ + "PTE", + "portugalské escudo" + ], + "PYG": [ + "PYG", + "paraguajské guarani" + ], + "QAR": [ + "QAR", + "katarský rijál" + ], + "RHD": [ + "RHD", + "rhodéský dolar" + ], + "ROL": [ + "ROL", + "rumunské leu (1952–2006)" + ], + "RON": [ + "RON", + "rumunský leu" + ], + "RSD": [ + "RSD", + "srbský dinár" + ], + "RUB": [ + "RUB", + "ruský rubl" + ], + "RUR": [ + "RUR", + "ruský rubl (1991–1998)" + ], + "RWF": [ + "RWF", + "rwandský frank" + ], + "SAR": [ + "SAR", + "saúdský rijál" + ], + "SBD": [ + "SBD", + "Å¡alamounský dolar" + ], + "SCR": [ + "SCR", + "seychelská rupie" + ], + "SDD": [ + "SDD", + "súdánský dinár (1992–2007)" + ], + "SDG": [ + "SDG", + "súdánská libra" + ], + "SDP": [ + "SDP", + "súdánská libra (1957–1998)" + ], + "SEK": [ + "SEK", + "Å¡védská koruna" + ], + "SGD": [ + "SGD", + "singapurský dolar" + ], + "SHP": [ + "SHP", + "svatohelenská libra" + ], + "SIT": [ + "SIT", + "slovinský tolar" + ], + "SKK": [ + "SKK", + "slovenská koruna" + ], + "SLL": [ + "SLL", + "sierro-leonský leone" + ], + "SOS": [ + "SOS", + "somálský Å¡ilink" + ], + "SRD": [ + "SRD", + "surinamský dolar" + ], + "SRG": [ + "SRG", + "surinamský zlatý" + ], + "SSP": [ + "SSP", + "jihosúdánská libra" + ], + "STD": [ + "STD", + "svatotomášská dobra" + ], + "SUR": [ + "SUR", + "sovÄ›tský rubl" + ], + "SVC": [ + "SVC", + "salvadorský colón" + ], + "SYP": [ + "SYP", + "syrská libra" + ], + "SZL": [ + "SZL", + "svazijský lilangeni" + ], + "THB": [ + "THB", + "thajský baht" + ], + "TJR": [ + "TJR", + "tádžický rubl" + ], + "TJS": [ + "TJS", + "tádžické somoni" + ], + "TMM": [ + "TMM", + "turkmenský manat (1993–2009)" + ], + "TMT": [ + "TMT", + "turkmenský manat" + ], + "TND": [ + "TND", + "tuniský dinár" + ], + "TOP": [ + "TOP", + "tonžská paanga" + ], + "TPE": [ + "TPE", + "timorské escudo" + ], + "TRL": [ + "TRL", + "turecká lira (1922–2005)" + ], + "TRY": [ + "TRY", + "turecká lira" + ], + "TTD": [ + "TTD", + "trinidadský dolar" + ], + "TWD": [ + "NT$", + "tchajwanský dolar" + ], + "TZS": [ + "TZS", + "tanzanský Å¡ilink" + ], + "UAH": [ + "UAH", + "ukrajinská hÅ™ivna" + ], + "UAK": [ + "UAK", + "ukrajinský karbovanec" + ], + "UGS": [ + "UGS", + "ugandský Å¡ilink (1966–1987)" + ], + "UGX": [ + "UGX", + "ugandský Å¡ilink" + ], + "USD": [ + "US$", + "americký dolar" + ], + "USN": [ + "USN", + "americký dolar (příští den)" + ], + "USS": [ + "USS", + "americký dolar (týž den)" + ], + "UYI": [ + "UYI", + "uruguayské peso (v indexovaných jednotkách)" + ], + "UYP": [ + "UYP", + "uruguayské peso (1975–1993)" + ], + "UYU": [ + "UYU", + "uruguayské peso" + ], + "UZS": [ + "UZS", + "uzbecký sum" + ], + "VEB": [ + "VEB", + "venezuelský bolívar (1871–2008)" + ], + "VEF": [ + "VEF", + "venezuelský bolívar" + ], + "VND": [ + "VND", + "vietnamský dong" + ], + "VNN": [ + "VNN", + "vietnamský dong (1978–1985)" + ], + "VUV": [ + "VUV", + "vanuatský vatu" + ], + "WST": [ + "WST", + "samojská tala" + ], + "XAF": [ + "FCFA", + "CFA\/BEAC frank" + ], + "XCD": [ + "EC$", + "východokaribský dolar" + ], + "XEU": [ + "ECU", + "evropská mÄ›nová jednotka" + ], + "XFO": [ + "XFO", + "francouzský zlatý frank" + ], + "XFU": [ + "XFU", + "francouzský UIC frank" + ], + "XOF": [ + "CFA", + "CFA\/BCEAO frank" + ], + "XPF": [ + "CFPF", + "CFP frank" + ], + "XRE": [ + "XRE", + "kód fondů RINET" + ], + "YDD": [ + "YDD", + "jemenský dinár" + ], + "YER": [ + "YER", + "jemenský rijál" + ], + "YUD": [ + "YUD", + "jugoslávský dinár (1966–1990)" + ], + "YUM": [ + "YUM", + "jugoslávský nový dinár (1994–2002)" + ], + "YUN": [ + "YUN", + "jugoslávský konvertibilní dinár (1990–1992)" + ], + "YUR": [ + "YUR", + "jugoslávský reformovaný dinár (1992–1993)" + ], + "ZAL": [ + "ZAL", + "jihoafrický finanÄní rand" + ], + "ZAR": [ + "ZAR", + "jihoafrický rand" + ], + "ZMK": [ + "ZMK", + "zambijská kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "zambijská kwacha" + ], + "ZRN": [ + "ZRN", + "zairský nový zaire (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "zairský zaire (1971–1993)" + ], + "ZWD": [ + "ZWD", + "zimbabwský dolar (1980–2008)" + ], + "ZWL": [ + "ZWL", + "zimbabwský dolar (2009)" + ], + "ZWR": [ + "ZWR", + "zimbabwský dolar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/cy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/cy.json new file mode 100644 index 0000000000000000000000000000000000000000..9139ec372be0f51dab625482dc032686bfc1eb4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/cy.json @@ -0,0 +1,1057 @@ +{ + "Version": "2.1.30.6", + "Names": { + "AED": [ + "AED", + "Dirham Yr Emiradau Arabaidd Unedig" + ], + "AFA": [ + "AFA", + "Afghani Afghanistan (1927–2002)" + ], + "AFN": [ + "AFN", + "Afghani Afghanistan" + ], + "ALL": [ + "ALL", + "Lek Albania" + ], + "AMD": [ + "AMD", + "Dram Armenia" + ], + "ANG": [ + "ANG", + "Guilder Antilles yr Iseldiroedd" + ], + "AOA": [ + "AOA", + "Kwanza Angola" + ], + "AOK": [ + "AOK", + "Kwanza Angola (1977–1991)" + ], + "AON": [ + "AON", + "Kwanza Newydd Angola (1990–2000)" + ], + "AOR": [ + "AOR", + "Kwanza Ailgymhwysedig Angola (1995–1999)" + ], + "ARA": [ + "ARA", + "Austral yr Ariannin" + ], + "ARL": [ + "ARL", + "Peso Ley yr Ariannin (1970–1983)" + ], + "ARM": [ + "ARM", + "Peso yr Ariannin (1881–1970)" + ], + "ARP": [ + "ARP", + "Peso yr Ariannin (1983–1985)" + ], + "ARS": [ + "ARS", + "Peso yr Ariannin" + ], + "ATS": [ + "ATS", + "Swllt Awstria" + ], + "AUD": [ + "A$", + "Doler Awstralia" + ], + "AWG": [ + "AWG", + "Fflorin Aruba" + ], + "AZM": [ + "AZM", + "Manat Azerbaijan (1993–2006)" + ], + "AZN": [ + "AZN", + "Manat Azerbaijan" + ], + "BAM": [ + "BAM", + "Marc Trosadwy Bosnia a Hercegovina" + ], + "BBD": [ + "BBD", + "Doler Barbados" + ], + "BDT": [ + "BDT", + "Taka Bangladesh" + ], + "BEC": [ + "BEC", + "BEC" + ], + "BEF": [ + "BEF", + "BEF" + ], + "BEL": [ + "BEL", + "BEL" + ], + "BGM": [ + "BGM", + "Lev Sosialaidd Bwlgaria" + ], + "BGN": [ + "BGN", + "Lev Bwlgaria" + ], + "BGO": [ + "BGO", + "Lev Bwlgaria (1879–1952)" + ], + "BHD": [ + "BHD", + "Dinar Bahrain" + ], + "BIF": [ + "BIF", + "Ffranc Burundi" + ], + "BMD": [ + "BMD", + "Doler Bermuda" + ], + "BND": [ + "BND", + "Doler Brunei" + ], + "BOB": [ + "BOB", + "Boliviano Bolifia" + ], + "BOL": [ + "BOL", + "Boliviano Bolifia (1863–1963)" + ], + "BOP": [ + "BOP", + "Peso Bolifia" + ], + "BOV": [ + "BOV", + "Mvdol Bolifia" + ], + "BRB": [ + "BRB", + "Cruzeiro Newydd Brasil (1967–1986)" + ], + "BRC": [ + "BRC", + "Cruzado Brasil (1986–1989)" + ], + "BRE": [ + "BRE", + "Cruzeiro Brasil (1990–1993)" + ], + "BRL": [ + "R$", + "Real Brasil" + ], + "BRN": [ + "BRN", + "Cruzado Newydd Brasil (1989–1990)" + ], + "BRR": [ + "BRR", + "Cruzeiro Brasil (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Cruzeiro Brasil (1942–1967)" + ], + "BSD": [ + "BSD", + "Doler y Bahamas" + ], + "BTN": [ + "BTN", + "Ngultrum Bhutan" + ], + "BUK": [ + "BUK", + "Kyat Byrma" + ], + "BWP": [ + "BWP", + "Pula Botswana" + ], + "BYN": [ + "BYN", + "Rwbl Belarws" + ], + "BYR": [ + "BYR", + "Rwbl Belarws (2000–2016)" + ], + "BZD": [ + "BZD", + "Doler Belize" + ], + "CAD": [ + "CA$", + "Doler Canada" + ], + "CDF": [ + "CDF", + "Ffranc Congo" + ], + "CHE": [ + "CHE", + "CHE" + ], + "CHF": [ + "CHF", + "Ffranc y Swistir" + ], + "CHW": [ + "CHW", + "CHW" + ], + "CLE": [ + "CLE", + "Escudo Chile" + ], + "CLF": [ + "CLF", + "Uned Cyfrifo Chile (UF)" + ], + "CLP": [ + "CLP", + "Peso Chile" + ], + "CNX": [ + "CNX", + "Doler Banc Pobl Tsieina" + ], + "CNY": [ + "CNÂ¥", + "Yuan Tsieina" + ], + "COP": [ + "COP", + "Peso Colombia" + ], + "COU": [ + "COU", + "COU" + ], + "CRC": [ + "CRC", + "Colón Costa Rica" + ], + "CSD": [ + "CSD", + "CSD" + ], + "CUC": [ + "CUC", + "Peso Trosadwy Ciwba" + ], + "CUP": [ + "CUP", + "Peso Ciwba" + ], + "CVE": [ + "CVE", + "Esgwdo Cabo Verde" + ], + "CYP": [ + "CYP", + "Punt Cyprus" + ], + "CZK": [ + "CZK", + "Koruna Tsiec" + ], + "DDM": [ + "DDM", + "DDM" + ], + "DEM": [ + "DEM", + "DEM" + ], + "DJF": [ + "DJF", + "Ffranc Djibouti" + ], + "DKK": [ + "DKK", + "Krone Denmarc" + ], + "DOP": [ + "DOP", + "Peso Gweriniaeth Dominica" + ], + "DZD": [ + "DZD", + "Dinar Algeria" + ], + "ECS": [ + "ECS", + "Sucre Ecuador" + ], + "EGP": [ + "EGP", + "Punt Yr Aifft" + ], + "ERN": [ + "ERN", + "Nakfa Eritrea" + ], + "ESP": [ + "ESP", + "ESP" + ], + "ETB": [ + "ETB", + "Birr Ethiopia" + ], + "EUR": [ + "€", + "Ewro" + ], + "FIM": [ + "FIM", + "FIM" + ], + "FJD": [ + "FJD", + "Doler Ffiji" + ], + "FKP": [ + "FKP", + "Punt Ynysoedd Falkland\/Malvinas" + ], + "FRF": [ + "FRF", + "FRF" + ], + "GBP": [ + "£", + "Punt Prydain" + ], + "GEK": [ + "GEK", + "Kupon Larit Georgia" + ], + "GEL": [ + "GEL", + "Lari Georgia" + ], + "GHC": [ + "GHC", + "Cedi Ghana (1979–2007)" + ], + "GHS": [ + "GHS", + "Cedi Ghana" + ], + "GIP": [ + "GIP", + "Punt Gibraltar" + ], + "GMD": [ + "GMD", + "Dalasi Gambia" + ], + "GNF": [ + "GNF", + "Ffranc Guinée" + ], + "GNS": [ + "GNS", + "Syli Guinée" + ], + "GQE": [ + "GQE", + "Ekwele Guinea Gyhydeddol" + ], + "GRD": [ + "GRD", + "GRD" + ], + "GTQ": [ + "GTQ", + "Quetzal Guatemala" + ], + "GWE": [ + "GWE", + "GWE" + ], + "GWP": [ + "GWP", + "Peso Guiné-Bissau" + ], + "GYD": [ + "GYD", + "Doler Guyana" + ], + "HKD": [ + "HK$", + "Doler Hong Kong" + ], + "HNL": [ + "HNL", + "Lempira Honduras" + ], + "HRD": [ + "HRD", + "HRD" + ], + "HRK": [ + "HRK", + "Kuna Croatia" + ], + "HTG": [ + "HTG", + "Gourde Haiti" + ], + "HUF": [ + "HUF", + "Fforint Hwngari" + ], + "IDR": [ + "IDR", + "Rupiah Indonesia" + ], + "IEP": [ + "IEP", + "Punt Iwerddon" + ], + "ILP": [ + "ILP", + "Punt Israel" + ], + "ILR": [ + "ILR", + "Shegel Israel (1980–1985)" + ], + "ILS": [ + "₪", + "Shegel Newydd Israel" + ], + "INR": [ + "₹", + "Rwpî India" + ], + "IQD": [ + "IQD", + "Dinar Irac" + ], + "IRR": [ + "IRR", + "Rial Iran" + ], + "ISK": [ + "ISK", + "Króna Gwlad yr Iâ" + ], + "ITL": [ + "ITL", + "ITL" + ], + "JMD": [ + "JMD", + "Doler Jamaica" + ], + "JOD": [ + "JOD", + "Dinar Gwlad yr Iorddonen" + ], + "JPY": [ + "JPÂ¥", + "Yen Japan" + ], + "KES": [ + "KES", + "Swllt Kenya" + ], + "KGS": [ + "KGS", + "Som Kyrgyzstan" + ], + "KHR": [ + "KHR", + "Riel Cambodia" + ], + "KMF": [ + "KMF", + "Ffranc Comoros" + ], + "KPW": [ + "KPW", + "Won Gogledd Corea" + ], + "KRH": [ + "KRH", + "Hwan De Corea (1953–1962)" + ], + "KRO": [ + "KRO", + "Won De Corea (1945–1953)" + ], + "KRW": [ + "KRW", + "Won De Corea" + ], + "KWD": [ + "KWD", + "Dinar Kuwait" + ], + "KYD": [ + "KYD", + "Doler Ynysoedd Cayman" + ], + "KZT": [ + "KZT", + "Tenge Kazakstan" + ], + "LAK": [ + "LAK", + "Kip Laos" + ], + "LBP": [ + "LBP", + "Punt Libanus" + ], + "LKR": [ + "LKR", + "Rwpî Sri Lanka" + ], + "LRD": [ + "LRD", + "Doler Liberia" + ], + "LSL": [ + "LSL", + "Loti Lesotho" + ], + "LTL": [ + "LTL", + "Litas Lithwania" + ], + "LTT": [ + "LTT", + "Talonas Lithwania" + ], + "LUC": [ + "LUC", + "LUC" + ], + "LUF": [ + "LUF", + "LUF" + ], + "LUL": [ + "LUL", + "LUL" + ], + "LVL": [ + "LVL", + "Lats Latfia" + ], + "LVR": [ + "LVR", + "LVR" + ], + "LYD": [ + "LYD", + "Dinar Libya" + ], + "MAD": [ + "MAD", + "Dirham Moroco" + ], + "MAF": [ + "MAF", + "Ffranc Moroco" + ], + "MCF": [ + "MCF", + "Ffranc Monaco" + ], + "MDL": [ + "MDL", + "Leu Moldofa" + ], + "MGA": [ + "MGA", + "Ariary Madagascar" + ], + "MGF": [ + "MGF", + "Ffranc Madagascar" + ], + "MKD": [ + "MKD", + "Denar Macedonia" + ], + "MKN": [ + "MKN", + "MKN" + ], + "MLF": [ + "MLF", + "Ffranc Mali" + ], + "MMK": [ + "MMK", + "Kyat Myanmar" + ], + "MNT": [ + "MNT", + "Tugrik Mongolia" + ], + "MOP": [ + "MOP", + "Pataca Macau" + ], + "MRO": [ + "MRO", + "Ouguiya Mauritania" + ], + "MTL": [ + "MTL", + "MTL" + ], + "MTP": [ + "MTP", + "MTP" + ], + "MUR": [ + "MUR", + "Rwpî Mauritius" + ], + "MVP": [ + "MVP", + "Rwpî’r Maldives (1947–1981)" + ], + "MVR": [ + "MVR", + "Rufiyaa’r Maldives" + ], + "MWK": [ + "MWK", + "Kwacha Malawi" + ], + "MXN": [ + "MX$", + "Peso Mecsico" + ], + "MXP": [ + "MXP", + "Peso Arian México (1861–1992)" + ], + "MXV": [ + "MXV", + "Uned Fuddsoddi México" + ], + "MYR": [ + "MYR", + "Ringgit Malaysia" + ], + "MZE": [ + "MZE", + "Escudo Mozambique" + ], + "MZM": [ + "MZM", + "Metical Mozambique (1980–2006)" + ], + "MZN": [ + "MZN", + "Metical Mozambique" + ], + "NAD": [ + "NAD", + "Doler Namibia" + ], + "NGN": [ + "NGN", + "Naira Nigeria" + ], + "NIC": [ + "NIC", + "Córdoba Nicaragua (1988–1991)" + ], + "NIO": [ + "NIO", + "Cordoba Nicaragwa" + ], + "NLG": [ + "NLG", + "Guilder yr Iseldiroedd" + ], + "NOK": [ + "NOK", + "Krone Norwy" + ], + "NPR": [ + "NPR", + "Rwpî Nepal" + ], + "NZD": [ + "NZ$", + "Doler Seland Newydd" + ], + "OMR": [ + "OMR", + "Rial Oman" + ], + "PAB": [ + "PAB", + "Balboa Panama" + ], + "PEI": [ + "PEI", + "Inti Periw" + ], + "PEN": [ + "PEN", + "Nuevo Sol Periw" + ], + "PES": [ + "PES", + "Sol Periw (1863–1965)" + ], + "PGK": [ + "PGK", + "Kina Papua Guinea Newydd" + ], + "PHP": [ + "PHP", + "Peso’r Philipinau" + ], + "PKR": [ + "PKR", + "Rwpî Pacistan" + ], + "PLN": [ + "PLN", + "Zloty Gwlad Pwyl" + ], + "PTE": [ + "PTE", + "PTE" + ], + "PYG": [ + "PYG", + "Guarani Paraguay" + ], + "QAR": [ + "QAR", + "Rial Qatar" + ], + "RHD": [ + "RHD", + "Doler Rhodesia" + ], + "RON": [ + "RON", + "Leu Rwmania" + ], + "RSD": [ + "RSD", + "Dinar Serbia" + ], + "RUB": [ + "RUB", + "Rwbl Rwsia" + ], + "RWF": [ + "RWF", + "Ffranc Rwanda" + ], + "SAR": [ + "SAR", + "Riyal Saudi Arabia" + ], + "SBD": [ + "SBD", + "Doler Ynysoedd Solomon" + ], + "SCR": [ + "SCR", + "Rwpî Seychelles" + ], + "SDD": [ + "SDD", + "Dinar Sudan (1992–2007)" + ], + "SDG": [ + "SDG", + "Punt Sudan" + ], + "SDP": [ + "SDP", + "Punt Sudan (1957–1998)" + ], + "SEK": [ + "SEK", + "Krona Sweden" + ], + "SGD": [ + "SGD", + "Doler Singapore" + ], + "SHP": [ + "SHP", + "Punt Saint Helena" + ], + "SIT": [ + "SIT", + "SIT" + ], + "SLL": [ + "SLL", + "Leone Sierra Leone" + ], + "SOS": [ + "SOS", + "Swllt Somalia" + ], + "SRD": [ + "SRD", + "Doler Surinam" + ], + "SRG": [ + "SRG", + "Guilder Surinam" + ], + "SSP": [ + "SSP", + "Punt De Sudan" + ], + "STD": [ + "STD", + "Dobra São Tomé a Príncipe" + ], + "SVC": [ + "SVC", + "Colón El Salvador" + ], + "SYP": [ + "SYP", + "Punt Syria" + ], + "SZL": [ + "SZL", + "Lilangeni Gwlad Swazi" + ], + "THB": [ + "฿", + "Baht Gwlad Thai" + ], + "TJR": [ + "TJR", + "Rwbl Tajikistan" + ], + "TJS": [ + "TJS", + "Somoni Tajikistan" + ], + "TMM": [ + "TMM", + "Manat Turkmenistan (1993–2009)" + ], + "TMT": [ + "TMT", + "Manat Turkmenistan" + ], + "TND": [ + "TND", + "Dinar Tunisia" + ], + "TOP": [ + "TOP", + "PaÊ»anga Tonga" + ], + "TPE": [ + "TPE", + "Escudo Timor" + ], + "TRL": [ + "TRL", + "Lira Twrci (1922–2005)" + ], + "TRY": [ + "TRY", + "Lira Twrci" + ], + "TTD": [ + "TTD", + "Doler Trinidad a Tobago" + ], + "TWD": [ + "NT$", + "Doler Newydd Taiwan" + ], + "TZS": [ + "TZS", + "Swllt Tanzania" + ], + "UAH": [ + "UAH", + "Hryvnia Wcráin" + ], + "UGS": [ + "UGS", + "Swllt Uganda (1966–1987)" + ], + "UGX": [ + "UGX", + "Swllt Uganda" + ], + "USD": [ + "US$", + "Doler UDA" + ], + "USN": [ + "USN", + "Doler UDA (y diwrnod nesaf)" + ], + "USS": [ + "USS", + "Doler UDA (yr un diwrnod)" + ], + "UYI": [ + "UYI", + "UYI" + ], + "UYP": [ + "UYP", + "Peso Uruguay (1975–1993)" + ], + "UYU": [ + "UYU", + "Peso Uruguay" + ], + "UZS": [ + "UZS", + "Som Uzbekistan" + ], + "VEB": [ + "VEB", + "Bolívar Venezuela (1871–2008)" + ], + "VEF": [ + "VEF", + "Bolívar Venezuela" + ], + "VND": [ + "â‚«", + "Dong Fietnam" + ], + "VNN": [ + "VNN", + "Dong Fietnam (1978–1985)" + ], + "VUV": [ + "VUV", + "Vatu Vanuatu" + ], + "WST": [ + "WST", + "Tala Samoa" + ], + "XAF": [ + "FCFA", + "Ffranc CFA Canol Affrica" + ], + "XCD": [ + "EC$", + "Doler Dwyrain y Caribî" + ], + "XEU": [ + "XEU", + "XEU" + ], + "XOF": [ + "CFA", + "Ffranc CFA Gorllewin Affrica" + ], + "XPF": [ + "CFPF", + "Ffranc CFP" + ], + "YDD": [ + "YDD", + "Dinar Yemen" + ], + "YER": [ + "YER", + "Rial Yemen" + ], + "YUD": [ + "YUD", + "YUD" + ], + "YUM": [ + "YUM", + "YUM" + ], + "YUN": [ + "YUN", + "YUN" + ], + "YUR": [ + "YUR", + "YUR" + ], + "ZAL": [ + "ZAL", + "Rand (ariannol) De Affrica" + ], + "ZAR": [ + "ZAR", + "Rand De Affrica" + ], + "ZMK": [ + "ZMK", + "Kwacha Zambia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha Zambia" + ], + "ZRN": [ + "ZRN", + "Zaire Newydd Zaire (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zaire Zaire (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Doler Zimbabwe (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Doler Zimbabwe (2009)" + ], + "ZWR": [ + "ZWR", + "Doler Zimbabwe (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/da.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/da.json new file mode 100644 index 0000000000000000000000000000000000000000..ba210ddb2f8fbcd53193f6ef5015c6df55473239 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/da.json @@ -0,0 +1,1041 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Andorransk peseta" + ], + "AED": [ + "AED", + "dirham fra de Forenede Arabiske Emirater" + ], + "AFA": [ + "AFA", + "Afghansk afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "afghansk afghani" + ], + "ALL": [ + "ALL", + "albansk lek" + ], + "AMD": [ + "AMD", + "armensk dram" + ], + "ANG": [ + "ANG", + "Nederlandske Antiller-gylden" + ], + "AOA": [ + "AOA", + "angolansk kwanza" + ], + "AOK": [ + "AOK", + "Angolansk kwanza (1977–1990)" + ], + "AON": [ + "AON", + "Angolansk nye kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angolansk kwanza (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentinsk austral" + ], + "ARP": [ + "ARP", + "Argentinsk peso (1983–1985)" + ], + "ARS": [ + "ARS", + "argentinsk peso" + ], + "ATS": [ + "ATS", + "Østrigsk schilling" + ], + "AUD": [ + "AU$", + "australsk dollar" + ], + "AWG": [ + "AWG", + "arubansk florin" + ], + "AZM": [ + "AZM", + "Aserbajdsjansk manat (1993–2006)" + ], + "AZN": [ + "AZN", + "aserbajdsjansk manat" + ], + "BAD": [ + "BAD", + "Bosnien-Hercegovinsk dinar" + ], + "BAM": [ + "BAM", + "bosnien-hercegovinsk konvertibel mark" + ], + "BBD": [ + "BBD", + "barbadisk dollar" + ], + "BDT": [ + "BDT", + "bangladeshisk taka" + ], + "BEC": [ + "BEC", + "Belgisk franc (konvertibel)" + ], + "BEF": [ + "BEF", + "Belgisk franc" + ], + "BEL": [ + "BEL", + "Belgisk franc (financial)" + ], + "BGL": [ + "BGL", + "Bulgarsk hard lev" + ], + "BGN": [ + "BGN", + "bulgarsk lev" + ], + "BHD": [ + "BHD", + "bahrainsk dinar" + ], + "BIF": [ + "BIF", + "burundisk franc" + ], + "BMD": [ + "BMD", + "bermudansk dollar" + ], + "BND": [ + "BND", + "bruneisk dollar" + ], + "BOB": [ + "BOB", + "boliviansk boliviano" + ], + "BOP": [ + "BOP", + "Boliviansk peso" + ], + "BOV": [ + "BOV", + "Boliviansk mvdol" + ], + "BRB": [ + "BRB", + "Brasiliansk cruzeiro novo (1967–1986)" + ], + "BRC": [ + "BRC", + "Brasiliansk cruzado (1986–1989)" + ], + "BRE": [ + "BRE", + "Brasiliansk cruzeiro (1990–1993)" + ], + "BRL": [ + "R$", + "brasiliansk real" + ], + "BRN": [ + "BRN", + "Brasiliansk cruzado novo (1989–1990)" + ], + "BRR": [ + "BRR", + "Brasiliansk cruzeiro (1993–1994)" + ], + "BSD": [ + "BSD", + "bahamansk dollar" + ], + "BTN": [ + "BTN", + "bhutansk ngultrum" + ], + "BUK": [ + "BUK", + "Burmesisk kyat" + ], + "BWP": [ + "BWP", + "botswansk pula" + ], + "BYB": [ + "BYB", + "Hviderussisk rubel (1994–1999)" + ], + "BYN": [ + "BYN", + "hviderussisk rubel" + ], + "BYR": [ + "BYR", + "hviderussisk rubel (2000–2016)" + ], + "BZD": [ + "BZD", + "belizisk dollar" + ], + "CAD": [ + "CA$", + "canadisk dollar" + ], + "CDF": [ + "CDF", + "congolesisk franc" + ], + "CHE": [ + "CHE", + "WIR euro" + ], + "CHF": [ + "CHF", + "schweizerfranc" + ], + "CHW": [ + "CHW", + "WIR franc" + ], + "CLP": [ + "CLP", + "chilensk peso" + ], + "CNY": [ + "CNÂ¥", + "kinesisk yuan" + ], + "COP": [ + "COP", + "colombiansk peso" + ], + "CRC": [ + "CRC", + "costaricansk colón" + ], + "CSD": [ + "CSD", + "Serbisk dinar (2002–2006)" + ], + "CSK": [ + "CSK", + "Tjekkoslovakisk hard koruna" + ], + "CUC": [ + "CUC", + "cubansk konvertibel peso" + ], + "CUP": [ + "CUP", + "cubansk peso" + ], + "CVE": [ + "CVE", + "kapverdisk escudo" + ], + "CYP": [ + "CYP", + "Cypriotisk pund" + ], + "CZK": [ + "CZK", + "tjekkisk koruna" + ], + "DDM": [ + "DDM", + "Østtysk mark" + ], + "DEM": [ + "DEM", + "Tysk mark" + ], + "DJF": [ + "DJF", + "djiboutisk franc" + ], + "DKK": [ + "kr.", + "dansk krone" + ], + "DOP": [ + "DOP", + "dominikansk peso" + ], + "DZD": [ + "DZD", + "algerisk dinar" + ], + "ECS": [ + "ECS", + "Ecuadoriansk sucre" + ], + "EEK": [ + "EEK", + "Estisk kroon" + ], + "EGP": [ + "EGP", + "egyptisk pund" + ], + "ERN": [ + "ERN", + "eritreisk nakfa" + ], + "ESA": [ + "ESA", + "Spansk peseta (A–konto)" + ], + "ESB": [ + "ESB", + "Spansk peseta (konvertibel konto)" + ], + "ESP": [ + "ESP", + "Spansk peseta" + ], + "ETB": [ + "ETB", + "etiopisk birr" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "Finsk mark" + ], + "FJD": [ + "FJD", + "fijiansk dollar" + ], + "FKP": [ + "FKP", + "pund fra Falklandsøerne" + ], + "FRF": [ + "FRF", + "Fransk franc" + ], + "GBP": [ + "£", + "britisk pund" + ], + "GEK": [ + "GEK", + "Georgisk kupon larit" + ], + "GEL": [ + "GEL", + "georgisk lari" + ], + "GHC": [ + "GHC", + "Ghanesisk cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "ghanesisk cedi" + ], + "GIP": [ + "GIP", + "gibraltarisk pund" + ], + "GMD": [ + "GMD", + "gambisk dalasi" + ], + "GNF": [ + "GNF", + "guineansk franc" + ], + "GNS": [ + "GNS", + "Guineansk syli" + ], + "GQE": [ + "GQE", + "Ækvatorialguineask ekwele" + ], + "GRD": [ + "GRD", + "Græsk drakme" + ], + "GTQ": [ + "GTQ", + "guatemalansk quetzal" + ], + "GWE": [ + "GWE", + "Portugisisk guinea escudo" + ], + "GWP": [ + "GWP", + "Guineansk peso" + ], + "GYD": [ + "GYD", + "guyansk dollar" + ], + "HKD": [ + "HK$", + "Hongkong dollar" + ], + "HNL": [ + "HNL", + "honduransk lempira" + ], + "HRD": [ + "HRD", + "Kroatisk dinar" + ], + "HRK": [ + "HRK", + "kroatisk kuna" + ], + "HTG": [ + "HTG", + "haitisk gourde" + ], + "HUF": [ + "HUF", + "ungarsk forint" + ], + "IDR": [ + "IDR", + "indonesisk rupiah" + ], + "IEP": [ + "IEP", + "Irsk pund" + ], + "ILP": [ + "ILP", + "Israelsk pund" + ], + "ILS": [ + "₪", + "ny israelsk shekel" + ], + "INR": [ + "₹", + "indisk rupee" + ], + "IQD": [ + "IQD", + "irakisk dinar" + ], + "IRR": [ + "IRR", + "iransk rial" + ], + "ISK": [ + "ISK", + "islandsk krone" + ], + "ITL": [ + "ITL", + "Italiensk lire" + ], + "JMD": [ + "JMD", + "jamaicansk dollar" + ], + "JOD": [ + "JOD", + "jordansk dinar" + ], + "JPY": [ + "JPÂ¥", + "japansk yen" + ], + "KES": [ + "KES", + "kenyansk shilling" + ], + "KGS": [ + "KGS", + "kirgisisk som" + ], + "KHR": [ + "KHR", + "cambodjansk riel" + ], + "KMF": [ + "KMF", + "comorisk franc" + ], + "KPW": [ + "KPW", + "nordkoreansk won" + ], + "KRW": [ + "â‚©", + "sydkoreansk won" + ], + "KWD": [ + "KWD", + "kuwaitisk dinar" + ], + "KYD": [ + "KYD", + "caymansk dollar" + ], + "KZT": [ + "KZT", + "kasakhisk tenge" + ], + "LAK": [ + "LAK", + "laotisk kip" + ], + "LBP": [ + "LBP", + "libanesisk pund" + ], + "LKR": [ + "LKR", + "srilankansk rupee" + ], + "LRD": [ + "LRD", + "liberisk dollar" + ], + "LSL": [ + "LSL", + "Lesothisk loti" + ], + "LTL": [ + "LTL", + "Litauisk litas" + ], + "LTT": [ + "LTT", + "Litauisk talonas" + ], + "LUC": [ + "LUC", + "Luxembourgsk konvertibel franc" + ], + "LUF": [ + "LUF", + "Luxembourgsk franc" + ], + "LUL": [ + "LUL", + "Luxembourgsk finansiel franc" + ], + "LVL": [ + "LVL", + "Lettisk lat" + ], + "LVR": [ + "LVR", + "Lettisk rubel" + ], + "LYD": [ + "LYD", + "libysk dinar" + ], + "MAD": [ + "MAD", + "marokkansk dirham" + ], + "MAF": [ + "MAF", + "Marokkansk franc" + ], + "MDL": [ + "MDL", + "moldovisk leu" + ], + "MGA": [ + "MGA", + "madagaskisk ariary" + ], + "MGF": [ + "MGF", + "Madagaskisk franc" + ], + "MKD": [ + "MKD", + "makedonsk denar" + ], + "MLF": [ + "MLF", + "Malisk franc" + ], + "MMK": [ + "MMK", + "myanmarsk kyat" + ], + "MNT": [ + "MNT", + "mongolsk tugrik" + ], + "MOP": [ + "MOP", + "macaosk pataca" + ], + "MRO": [ + "MRO", + "mauritansk ouguiya" + ], + "MTL": [ + "MTL", + "Maltesisk lira" + ], + "MTP": [ + "MTP", + "Maltesisk pund" + ], + "MUR": [ + "MUR", + "mauritisk rupee" + ], + "MVR": [ + "MVR", + "maldivisk rufiyaa" + ], + "MWK": [ + "MWK", + "malawisk kwacha" + ], + "MXN": [ + "MX$", + "mexicansk peso" + ], + "MXP": [ + "MXP", + "Mexicansk silver peso (1861–1992)" + ], + "MYR": [ + "MYR", + "malaysisk ringgit" + ], + "MZE": [ + "MZE", + "Mozambiquisk escudo" + ], + "MZM": [ + "MZM", + "Mozambiquisk metical (1980–2006)" + ], + "MZN": [ + "MZN", + "mozambiquisk metical" + ], + "NAD": [ + "NAD", + "namibisk dollar" + ], + "NGN": [ + "NGN", + "nigeriansk naira" + ], + "NIC": [ + "NIC", + "Nicaraguansk cordoba (1988–1991)" + ], + "NIO": [ + "NIO", + "nicaraguansk cordoba" + ], + "NLG": [ + "NLG", + "Hollandsk guilder" + ], + "NOK": [ + "NOK", + "norsk krone" + ], + "NPR": [ + "NPR", + "nepalesisk rupee" + ], + "NZD": [ + "NZ$", + "newzealandsk dollar" + ], + "OMR": [ + "OMR", + "omansk rial" + ], + "PAB": [ + "PAB", + "panamansk balboa" + ], + "PEI": [ + "PEI", + "Peruviansk inti" + ], + "PEN": [ + "PEN", + "peruviansk nuevo sol" + ], + "PES": [ + "PES", + "Peruviansk sol (1863–1965)" + ], + "PGK": [ + "PGK", + "papuansk kina" + ], + "PHP": [ + "PHP", + "filippinsk peso" + ], + "PKR": [ + "PKR", + "pakistansk rupee" + ], + "PLN": [ + "PLN", + "polsk zloty" + ], + "PLZ": [ + "PLZ", + "Polsk zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugisisk escudo" + ], + "PYG": [ + "PYG", + "paraguaysk guarani" + ], + "QAR": [ + "QAR", + "qatarsk rial" + ], + "ROL": [ + "ROL", + "Rumænsk leu (1952–2006)" + ], + "RON": [ + "RON", + "rumænsk leu" + ], + "RSD": [ + "RSD", + "serbisk dinar" + ], + "RUB": [ + "RUB", + "russisk rubel" + ], + "RUR": [ + "RUR", + "Russisk rubel (1991–1998)" + ], + "RWF": [ + "RWF", + "rwandisk franc" + ], + "SAR": [ + "SAR", + "saudiarabisk riyal" + ], + "SBD": [ + "SBD", + "salomonsk dollar" + ], + "SCR": [ + "SCR", + "seychellisk rupee" + ], + "SDD": [ + "SDD", + "Sudansk dinar (1992–2007)" + ], + "SDG": [ + "SDG", + "sudansk pund" + ], + "SDP": [ + "SDP", + "Sudansk pund (1957–1998)" + ], + "SEK": [ + "SEK", + "svensk krone" + ], + "SGD": [ + "SGD", + "singaporeansk dollar" + ], + "SHP": [ + "SHP", + "pund fra Saint Helena" + ], + "SIT": [ + "SIT", + "Slovensk tolar" + ], + "SKK": [ + "SKK", + "Slovakisk koruna" + ], + "SLL": [ + "SLL", + "sierraleonsk leone" + ], + "SOS": [ + "SOS", + "somalisk shilling" + ], + "SRD": [ + "SRD", + "surinamsk dollar" + ], + "SRG": [ + "SRG", + "Surinamsk guilder" + ], + "SSP": [ + "SSP", + "sydsudansk pund" + ], + "STD": [ + "STD", + "dobra fra Sao Tome og Principe" + ], + "SUR": [ + "SUR", + "Sovjetisk rubel" + ], + "SVC": [ + "SVC", + "Salvadoransk colon" + ], + "SYP": [ + "SYP", + "syrisk pund" + ], + "SZL": [ + "SZL", + "swazilandsk lilangeni" + ], + "THB": [ + "฿", + "thailandsk baht" + ], + "TJR": [ + "TJR", + "Tadsjikisk rubel" + ], + "TJS": [ + "TJS", + "tadsjikisk somoni" + ], + "TMM": [ + "TMM", + "Turkmensk manat (1993–2009)" + ], + "TMT": [ + "TMT", + "turkmensk manat" + ], + "TND": [ + "TND", + "tunesisk dinar" + ], + "TOP": [ + "TOP", + "tongansk paÊ»anga" + ], + "TPE": [ + "TPE", + "Escudo fra Timor" + ], + "TRL": [ + "TRL", + "Tyrkisk lire (1922–2005)" + ], + "TRY": [ + "TRY", + "tyrkisk lira" + ], + "TTD": [ + "TTD", + "dollar fra Trinidad og Tobago" + ], + "TWD": [ + "NT$", + "ny taiwansk dollar" + ], + "TZS": [ + "TZS", + "tanzanisk shilling" + ], + "UAH": [ + "UAH", + "ukrainsk grynia" + ], + "UAK": [ + "UAK", + "Ukrainsk karbovanetz" + ], + "UGS": [ + "UGS", + "Ugandisk shilling (1966–1987)" + ], + "UGX": [ + "UGX", + "ugandisk shilling" + ], + "USD": [ + "$", + "amerikansk dollar" + ], + "USN": [ + "USN", + "Amerikansk dollar (næste dag)" + ], + "USS": [ + "USS", + "Amerikansk dollar (samme dag)" + ], + "UYP": [ + "UYP", + "Uruguayansk peso (1975–1993)" + ], + "UYU": [ + "UYU", + "uruguayansk peso" + ], + "UZS": [ + "UZS", + "usbekisk sum" + ], + "VEB": [ + "VEB", + "Venezuelansk bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "venezuelansk bolivar" + ], + "VND": [ + "â‚«", + "vietnamesisk dong" + ], + "VUV": [ + "VUV", + "vanuaisk vatu" + ], + "WST": [ + "WST", + "samoansk tala" + ], + "XAF": [ + "FCFA", + "CFA-franc (BEAC)" + ], + "XCD": [ + "EC$", + "østkaribisk dollar" + ], + "XEU": [ + "XEU", + "ECU" + ], + "XFO": [ + "XFO", + "Fransk guldfranc" + ], + "XFU": [ + "XFU", + "Fransk UIC-franc" + ], + "XOF": [ + "CFA", + "CFA-franc BCEAO" + ], + "XPF": [ + "CFPF", + "CFP-franc" + ], + "XRE": [ + "XRE", + "RINET-fond" + ], + "YDD": [ + "YDD", + "Yemenitisk dinar" + ], + "YER": [ + "YER", + "yemenitisk rial" + ], + "YUD": [ + "YUD", + "Jugoslavisk hard dinar (1966–1990)" + ], + "YUM": [ + "YUM", + "Jugoslavisk noviy dinar (1994–2002)" + ], + "YUN": [ + "YUN", + "Jugoslavisk konvertibel dinar (1990–1992)" + ], + "ZAL": [ + "ZAL", + "Sydafrikansk rand (financial)" + ], + "ZAR": [ + "ZAR", + "sydafrikansk rand" + ], + "ZMK": [ + "ZMK", + "Zambisk kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "zambisk kwacha" + ], + "ZRN": [ + "ZRN", + "Ny zairisk zaire (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zairisk zaire (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Zimbabwisk dollar (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Zimbabwisk dollar (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabwisk dollar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/de.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/de.json new file mode 100644 index 0000000000000000000000000000000000000000..e7460ec3831a42d29fd868078b608f45ce053c75 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/de.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Andorranische Pesete" + ], + "AED": [ + "AED", + "VAE-Dirham" + ], + "AFA": [ + "AFA", + "Afghanische Afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "Afghanischer Afghani" + ], + "ALK": [ + "ALK", + "Albanischer Lek (1946–1965)" + ], + "ALL": [ + "ALL", + "Albanischer Lek" + ], + "AMD": [ + "AMD", + "Armenischer Dram" + ], + "ANG": [ + "ANG", + "Niederländische-Antillen-Gulden" + ], + "AOA": [ + "AOA", + "Angolanischer Kwanza" + ], + "AOK": [ + "AOK", + "Angolanischer Kwanza (1977–1990)" + ], + "AON": [ + "AON", + "Angolanischer Neuer Kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angolanischer Kwanza Reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentinischer Austral" + ], + "ARL": [ + "ARL", + "Argentinischer Peso Ley (1970–1983)" + ], + "ARM": [ + "ARM", + "Argentinischer Peso (1881–1970)" + ], + "ARP": [ + "ARP", + "Argentinischer Peso (1983–1985)" + ], + "ARS": [ + "ARS", + "Argentinischer Peso" + ], + "ATS": [ + "öS", + "Österreichischer Schilling" + ], + "AUD": [ + "AU$", + "Australischer Dollar" + ], + "AWG": [ + "AWG", + "Aruba-Florin" + ], + "AZM": [ + "AZM", + "Aserbaidschan-Manat (1993–2006)" + ], + "AZN": [ + "AZN", + "Aserbaidschan-Manat" + ], + "BAD": [ + "BAD", + "Bosnien und Herzegowina Dinar (1992–1994)" + ], + "BAM": [ + "BAM", + "Bosnien und Herzegowina Konvertierbare Mark" + ], + "BAN": [ + "BAN", + "Bosnien und Herzegowina Neuer Dinar (1994–1997)" + ], + "BBD": [ + "BBD", + "Barbados-Dollar" + ], + "BDT": [ + "BDT", + "Bangladesch-Taka" + ], + "BEC": [ + "BEC", + "Belgischer Franc (konvertibel)" + ], + "BEF": [ + "BEF", + "Belgischer Franc" + ], + "BEL": [ + "BEL", + "Belgischer Finanz-Franc" + ], + "BGL": [ + "BGL", + "Bulgarische Lew (1962–1999)" + ], + "BGM": [ + "BGK", + "Bulgarischer Lew (1952–1962)" + ], + "BGN": [ + "BGN", + "Bulgarischer Lew" + ], + "BGO": [ + "BGJ", + "Bulgarischer Lew (1879–1952)" + ], + "BHD": [ + "BHD", + "Bahrain-Dinar" + ], + "BIF": [ + "BIF", + "Burundi-Franc" + ], + "BMD": [ + "BMD", + "Bermuda-Dollar" + ], + "BND": [ + "BND", + "Brunei-Dollar" + ], + "BOB": [ + "BOB", + "Bolivanischer Boliviano" + ], + "BOL": [ + "BOL", + "Bolivianischer Boliviano (1863–1963)" + ], + "BOP": [ + "BOP", + "Bolivianischer Peso" + ], + "BOV": [ + "BOV", + "Boliviansiche Mvdol" + ], + "BRB": [ + "BRB", + "Brasilianischer Cruzeiro Novo (1967–1986)" + ], + "BRC": [ + "BRC", + "Brasilianischer Cruzado (1986–1989)" + ], + "BRE": [ + "BRE", + "Brasilianischer Cruzeiro (1990–1993)" + ], + "BRL": [ + "R$", + "Brasilianischer Real" + ], + "BRN": [ + "BRN", + "Brasilianischer Cruzado Novo (1989–1990)" + ], + "BRR": [ + "BRR", + "Brasilianischer Cruzeiro (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Brasilianischer Cruzeiro (1942–1967)" + ], + "BSD": [ + "BSD", + "Bahamas-Dollar" + ], + "BTN": [ + "BTN", + "Bhutan-Ngultrum" + ], + "BUK": [ + "BUK", + "Birmanischer Kyat" + ], + "BWP": [ + "BWP", + "Botswanischer Pula" + ], + "BYB": [ + "BYB", + "Belarus-Rubel (1994–1999)" + ], + "BYN": [ + "BYN", + "Weißrussischer Rubel" + ], + "BYR": [ + "BYR", + "Weißrussischer Rubel (2000–2016)" + ], + "BZD": [ + "BZD", + "Belize-Dollar" + ], + "CAD": [ + "CA$", + "Kanadischer Dollar" + ], + "CDF": [ + "CDF", + "Kongo-Franc" + ], + "CHE": [ + "CHE", + "WIR-Euro" + ], + "CHF": [ + "CHF", + "Schweizer Franken" + ], + "CHW": [ + "CHW", + "WIR Franken" + ], + "CLE": [ + "CLE", + "Chilenischer Escudo" + ], + "CLF": [ + "CLF", + "Chilenische Unidades de Fomento" + ], + "CLP": [ + "CLP", + "Chilenischer Peso" + ], + "CNX": [ + "CNX", + "Dollar der Chinesischen Volksbank" + ], + "CNY": [ + "CNÂ¥", + "Renminbi Yuan" + ], + "COP": [ + "COP", + "Kolumbianischer Peso" + ], + "COU": [ + "COU", + "Kolumbianische Unidades de valor real" + ], + "CRC": [ + "CRC", + "Costa-Rica-Colón" + ], + "CSD": [ + "CSD", + "Serbischer Dinar (2002–2006)" + ], + "CSK": [ + "CSK", + "Tschechoslowakische Krone" + ], + "CUC": [ + "CUC", + "Kubanischer Peso (konvertibel)" + ], + "CUP": [ + "CUP", + "Kubanischer Peso" + ], + "CVE": [ + "CVE", + "Cabo-Verde-Escudo" + ], + "CYP": [ + "CYP", + "Zypern-Pfund" + ], + "CZK": [ + "CZK", + "Tschechische Krone" + ], + "DDM": [ + "DDM", + "Mark der DDR" + ], + "DEM": [ + "DM", + "Deutsche Mark" + ], + "DJF": [ + "DJF", + "Dschibuti-Franc" + ], + "DKK": [ + "DKK", + "Dänische Krone" + ], + "DOP": [ + "DOP", + "Dominikanischer Peso" + ], + "DZD": [ + "DZD", + "Algerischer Dinar" + ], + "ECS": [ + "ECS", + "Ecuadorianischer Sucre" + ], + "ECV": [ + "ECV", + "Verrechnungseinheit für Ecuador" + ], + "EEK": [ + "EEK", + "Estnische Krone" + ], + "EGP": [ + "EGP", + "Ägyptisches Pfund" + ], + "ERN": [ + "ERN", + "Eritreischer Nakfa" + ], + "ESA": [ + "ESA", + "Spanische Peseta (A–Konten)" + ], + "ESB": [ + "ESB", + "Spanische Peseta (konvertibel)" + ], + "ESP": [ + "ESP", + "Spanische Peseta" + ], + "ETB": [ + "ETB", + "Äthiopischer Birr" + ], + "EUR": [ + "€", + "Euro" + ], + "FIM": [ + "FIM", + "Finnische Mark" + ], + "FJD": [ + "FJD", + "Fidschi-Dollar" + ], + "FKP": [ + "FKP", + "Falkland-Pfund" + ], + "FRF": [ + "FRF", + "Französischer Franc" + ], + "GBP": [ + "£", + "Britisches Pfund" + ], + "GEK": [ + "GEK", + "Georgischer Kupon Larit" + ], + "GEL": [ + "GEL", + "Georgischer Lari" + ], + "GHC": [ + "GHC", + "Ghanaischer Cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "Ghanaischer Cedi" + ], + "GIP": [ + "GIP", + "Gibraltar-Pfund" + ], + "GMD": [ + "GMD", + "Gambia-Dalasi" + ], + "GNF": [ + "GNF", + "Guinea-Franc" + ], + "GNS": [ + "GNS", + "Guineischer Syli" + ], + "GQE": [ + "GQE", + "Äquatorialguinea-Ekwele" + ], + "GRD": [ + "GRD", + "Griechische Drachme" + ], + "GTQ": [ + "GTQ", + "Guatemaltekischer Quetzal" + ], + "GWE": [ + "GWE", + "Portugiesisch Guinea Escudo" + ], + "GWP": [ + "GWP", + "Guinea-Bissau Peso" + ], + "GYD": [ + "GYD", + "Guyana-Dollar" + ], + "HKD": [ + "HK$", + "Hongkong-Dollar" + ], + "HNL": [ + "HNL", + "Honduras-Lempira" + ], + "HRD": [ + "HRD", + "Kroatischer Dinar" + ], + "HRK": [ + "HRK", + "Kroatischer Kuna" + ], + "HTG": [ + "HTG", + "Haitianische Gourde" + ], + "HUF": [ + "HUF", + "Ungarischer Forint" + ], + "IDR": [ + "IDR", + "Indonesische Rupiah" + ], + "IEP": [ + "IEP", + "Irisches Pfund" + ], + "ILP": [ + "ILP", + "Israelisches Pfund" + ], + "ILR": [ + "ILR", + "Israelischer Schekel (1980–1985)" + ], + "ILS": [ + "₪", + "Israelischer Neuer Schekel" + ], + "INR": [ + "₹", + "Indische Rupie" + ], + "IQD": [ + "IQD", + "Irakischer Dinar" + ], + "IRR": [ + "IRR", + "Iranischer Rial" + ], + "ISJ": [ + "ISJ", + "Isländische Krone (1918–1981)" + ], + "ISK": [ + "ISK", + "Isländische Krone" + ], + "ITL": [ + "ITL", + "Italienische Lira" + ], + "JMD": [ + "JMD", + "Jamaika-Dollar" + ], + "JOD": [ + "JOD", + "Jordanischer Dinar" + ], + "JPY": [ + "Â¥", + "Japanischer Yen" + ], + "KES": [ + "KES", + "Kenia-Schilling" + ], + "KGS": [ + "KGS", + "Kirgisischer Som" + ], + "KHR": [ + "KHR", + "Kambodschanischer Riel" + ], + "KMF": [ + "KMF", + "Komoren-Franc" + ], + "KPW": [ + "KPW", + "Nordkoreanischer Won" + ], + "KRH": [ + "KRH", + "Südkoreanischer Hwan (1953–1962)" + ], + "KRO": [ + "KRO", + "Südkoreanischer Won (1945–1953)" + ], + "KRW": [ + "â‚©", + "Südkoreanischer Won" + ], + "KWD": [ + "KWD", + "Kuwait-Dinar" + ], + "KYD": [ + "KYD", + "Kaiman-Dollar" + ], + "KZT": [ + "KZT", + "Kasachischer Tenge" + ], + "LAK": [ + "LAK", + "Laotischer Kip" + ], + "LBP": [ + "LBP", + "Libanesisches Pfund" + ], + "LKR": [ + "LKR", + "Sri-Lanka-Rupie" + ], + "LRD": [ + "LRD", + "Liberianischer Dollar" + ], + "LSL": [ + "LSL", + "Loti" + ], + "LTL": [ + "LTL", + "Litauischer Litas" + ], + "LTT": [ + "LTT", + "Litauischer Talonas" + ], + "LUC": [ + "LUC", + "Luxemburgischer Franc (konvertibel)" + ], + "LUF": [ + "LUF", + "Luxemburgischer Franc" + ], + "LUL": [ + "LUL", + "Luxemburgischer Finanz-Franc" + ], + "LVL": [ + "LVL", + "Lettischer Lats" + ], + "LVR": [ + "LVR", + "Lettischer Rubel" + ], + "LYD": [ + "LYD", + "Libyscher Dinar" + ], + "MAD": [ + "MAD", + "Marokkanischer Dirham" + ], + "MAF": [ + "MAF", + "Marokkanischer Franc" + ], + "MCF": [ + "MCF", + "Monegassischer Franc" + ], + "MDC": [ + "MDC", + "Moldau-Cupon" + ], + "MDL": [ + "MDL", + "Moldau-Leu" + ], + "MGA": [ + "MGA", + "Madagaskar-Ariary" + ], + "MGF": [ + "MGF", + "Madagaskar-Franc" + ], + "MKD": [ + "MKD", + "Mazedonischer Denar" + ], + "MKN": [ + "MKN", + "Mazedonischer Denar (1992–1993)" + ], + "MLF": [ + "MLF", + "Malischer Franc" + ], + "MMK": [ + "MMK", + "Myanmarischer Kyat" + ], + "MNT": [ + "MNT", + "Mongolischer Tögrög" + ], + "MOP": [ + "MOP", + "Macao-Pataca" + ], + "MRO": [ + "MRO", + "Mauretanischer Ouguiya" + ], + "MTL": [ + "MTL", + "Maltesische Lira" + ], + "MTP": [ + "MTP", + "Maltesisches Pfund" + ], + "MUR": [ + "MUR", + "Mauritius-Rupie" + ], + "MVP": [ + "MVP", + "Malediven-Rupie (alt)" + ], + "MVR": [ + "MVR", + "Malediven-Rufiyaa" + ], + "MWK": [ + "MWK", + "Malawi-Kwacha" + ], + "MXN": [ + "MX$", + "Mexikanischer Peso" + ], + "MXP": [ + "MXP", + "Mexikanischer Silber-Peso (1861–1992)" + ], + "MXV": [ + "MXV", + "Mexicanischer Unidad de Inversion (UDI)" + ], + "MYR": [ + "MYR", + "Malaysischer Ringgit" + ], + "MZE": [ + "MZE", + "Mosambikanischer Escudo" + ], + "MZM": [ + "MZM", + "Mosambikanischer Metical (1980–2006)" + ], + "MZN": [ + "MZN", + "Mosambikanischer Metical" + ], + "NAD": [ + "NAD", + "Namibia-Dollar" + ], + "NGN": [ + "NGN", + "Nigerianischer Naira" + ], + "NIC": [ + "NIC", + "Nicaraguanischer Córdoba (1988–1991)" + ], + "NIO": [ + "NIO", + "Nicaragua-Córdoba" + ], + "NLG": [ + "NLG", + "Niederländischer Gulden" + ], + "NOK": [ + "NOK", + "Norwegische Krone" + ], + "NPR": [ + "NPR", + "Nepalesische Rupie" + ], + "NZD": [ + "NZ$", + "Neuseeland-Dollar" + ], + "OMR": [ + "OMR", + "Omanischer Rial" + ], + "PAB": [ + "PAB", + "Panamaischer Balboa" + ], + "PEI": [ + "PEI", + "Peruanischer Inti" + ], + "PEN": [ + "PEN", + "Peruanischer Sol" + ], + "PES": [ + "PES", + "Peruanischer Sol (1863–1965)" + ], + "PGK": [ + "PGK", + "Papua-Neuguineischer Kina" + ], + "PHP": [ + "PHP", + "Philippinischer Peso" + ], + "PKR": [ + "PKR", + "Pakistanische Rupie" + ], + "PLN": [ + "PLN", + "Polnischer ZÅ‚oty" + ], + "PLZ": [ + "PLZ", + "Polnischer Zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugiesischer Escudo" + ], + "PYG": [ + "PYG", + "Paraguayischer Guaraní" + ], + "QAR": [ + "QAR", + "Katar-Riyal" + ], + "RHD": [ + "RHD", + "Rhodesischer Dollar" + ], + "ROL": [ + "ROL", + "Rumänischer Leu (1952–2006)" + ], + "RON": [ + "RON", + "Rumänischer Leu" + ], + "RSD": [ + "RSD", + "Serbischer Dinar" + ], + "RUB": [ + "RUB", + "Russischer Rubel" + ], + "RUR": [ + "RUR", + "Russischer Rubel (1991–1998)" + ], + "RWF": [ + "RWF", + "Ruanda-Franc" + ], + "SAR": [ + "SAR", + "Saudi-Rial" + ], + "SBD": [ + "SBD", + "Salomonen-Dollar" + ], + "SCR": [ + "SCR", + "Seychellen-Rupie" + ], + "SDD": [ + "SDD", + "Sudanesischer Dinar (1992–2007)" + ], + "SDG": [ + "SDG", + "Sudanesisches Pfund" + ], + "SDP": [ + "SDP", + "Sudanesisches Pfund (1957–1998)" + ], + "SEK": [ + "SEK", + "Schwedische Krone" + ], + "SGD": [ + "SGD", + "Singapur-Dollar" + ], + "SHP": [ + "SHP", + "St. Helena-Pfund" + ], + "SIT": [ + "SIT", + "Slowenischer Tolar" + ], + "SKK": [ + "SKK", + "Slowakische Krone" + ], + "SLL": [ + "SLL", + "Sierra-leonischer Leone" + ], + "SOS": [ + "SOS", + "Somalia-Schilling" + ], + "SRD": [ + "SRD", + "Suriname-Dollar" + ], + "SRG": [ + "SRG", + "Suriname Gulden" + ], + "SSP": [ + "SSP", + "Südsudanesisches Pfund" + ], + "STD": [ + "STD", + "São-toméischer Dobra" + ], + "SUR": [ + "SUR", + "Sowjetischer Rubel" + ], + "SVC": [ + "SVC", + "El Salvador Colon" + ], + "SYP": [ + "SYP", + "Syrisches Pfund" + ], + "SZL": [ + "SZL", + "Swasiländischer Lilangeni" + ], + "THB": [ + "฿", + "Thailändischer Baht" + ], + "TJR": [ + "TJR", + "Tadschikistan Rubel" + ], + "TJS": [ + "TJS", + "Tadschikistan-Somoni" + ], + "TMM": [ + "TMM", + "Turkmenistan-Manat (1993–2009)" + ], + "TMT": [ + "TMT", + "Turkmenistan-Manat" + ], + "TND": [ + "TND", + "Tunesischer Dinar" + ], + "TOP": [ + "TOP", + "Tongaischer PaÊ»anga" + ], + "TPE": [ + "TPE", + "Timor-Escudo" + ], + "TRL": [ + "TRL", + "Türkische Lira (1922–2005)" + ], + "TRY": [ + "TRY", + "Türkische Lira" + ], + "TTD": [ + "TTD", + "Trinidad und Tobago-Dollar" + ], + "TWD": [ + "NT$", + "Neuer Taiwan-Dollar" + ], + "TZS": [ + "TZS", + "Tansania-Schilling" + ], + "UAH": [ + "UAH", + "Ukrainische Hrywnja" + ], + "UAK": [ + "UAK", + "Ukrainischer Karbovanetz" + ], + "UGS": [ + "UGS", + "Uganda-Schilling (1966–1987)" + ], + "UGX": [ + "UGX", + "Uganda-Schilling" + ], + "USD": [ + "$", + "US-Dollar" + ], + "USN": [ + "USN", + "US Dollar (Nächster Tag)" + ], + "USS": [ + "USS", + "US Dollar (Gleicher Tag)" + ], + "UYI": [ + "UYI", + "Uruguayischer Peso (Indexierte Rechnungseinheiten)" + ], + "UYP": [ + "UYP", + "Uruguayischer Peso (1975–1993)" + ], + "UYU": [ + "UYU", + "Uruguayischer Peso" + ], + "UZS": [ + "UZS", + "Usbekistan-Sum" + ], + "VEB": [ + "VEB", + "Venezolanischer Bolívar (1871–2008)" + ], + "VEF": [ + "VEF", + "Venezolanischer Bolívar" + ], + "VND": [ + "â‚«", + "Vietnamesischer Dong" + ], + "VNN": [ + "VNN", + "Vietnamesischer Dong(1978–1985)" + ], + "VUV": [ + "VUV", + "Vanuatu-Vatu" + ], + "WST": [ + "WST", + "Samoanischer Tala" + ], + "XAF": [ + "FCFA", + "CFA-Franc (BEAC)" + ], + "XCD": [ + "EC$", + "Ostkaribischer Dollar" + ], + "XEU": [ + "XEU", + "Europäische Währungseinheit (XEU)" + ], + "XFO": [ + "XFO", + "Französischer Gold-Franc" + ], + "XFU": [ + "XFU", + "Französischer UIC-Franc" + ], + "XOF": [ + "CFA", + "CFA-Franc (BCEAO)" + ], + "XPF": [ + "CFPF", + "CFP-Franc" + ], + "XRE": [ + "XRE", + "RINET Funds" + ], + "YDD": [ + "YDD", + "Jemen-Dinar" + ], + "YER": [ + "YER", + "Jemen-Rial" + ], + "YUD": [ + "YUD", + "Jugoslawischer Dinar (1966–1990)" + ], + "YUM": [ + "YUM", + "Jugoslawischer Neuer Dinar (1994–2002)" + ], + "YUN": [ + "YUN", + "Jugoslawischer Dinar (konvertibel)" + ], + "YUR": [ + "YUR", + "Jugoslawischer reformierter Dinar (1992–1993)" + ], + "ZAL": [ + "ZAL", + "Südafrikanischer Rand (Finanz)" + ], + "ZAR": [ + "ZAR", + "Südafrikanischer Rand" + ], + "ZMK": [ + "ZMK", + "Kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha" + ], + "ZRN": [ + "ZRN", + "Zaire-Neuer Zaïre (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zaire-Zaïre (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Simbabwe-Dollar (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Simbabwe-Dollar (2009)" + ], + "ZWR": [ + "ZWR", + "Simbabwe-Dollar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/de_CH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/de_CH.json new file mode 100644 index 0000000000000000000000000000000000000000..86916be5d6e4958a9d0016e865e1fe7de2309762 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/de_CH.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.29.33", + "Names": { + "BYN": [ + "BYN", + "Weissrussischer Rubel" + ], + "BYR": [ + "BYR", + "Weissrussischer Rubel (2000–2016)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/de_LI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/de_LI.json new file mode 100644 index 0000000000000000000000000000000000000000..a6556312c9a5295d4d6271de586bb0bb8d374ce0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/de_LI.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "EUR": [ + "EUR", + "Euro" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/de_LU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/de_LU.json new file mode 100644 index 0000000000000000000000000000000000000000..0056e3e61d9662fb1e604e970a1f2cb31444ae79 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/de_LU.json @@ -0,0 +1,10 @@ +{ + "Version": "2.1.27.99", + "Names": { + "LUF": [ + "F", + "Luxemburgischer Franc", + {} + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/dz.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/dz.json new file mode 100644 index 0000000000000000000000000000000000000000..9cc1226728522b0e6cf3e3a5cf7e7cfe82838f3a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/dz.json @@ -0,0 +1,301 @@ +{ + "Version": "2.1.29.61", + "Names": { + "AED": [ + "AED", + "ཡུ་ནཱའི་ཊེཌ་ ཨ་རབ་ ཨེ་མེ་རེཊས་ཀྱི་དངུལ་ ཌིར་ཧཱམ" + ], + "AFN": [ + "AFN", + "ཨཕ་གཱན་གྱི་དངུལ་ ཨཕ་ག་ནི" + ], + "AUD": [ + "AU$", + "ཨཱོས་ཊྲེ་ལི་ཡ་གི་དངུལ་ ཌོ་ལར" + ], + "BDT": [ + "BDT", + "བྷང་ལ་དེཤ་གི་དངུལ་ à½à¼‹à½€" + ], + "BMD": [ + "BMD", + "བར་མུ་ཌ་གི་དངུལ་ ཌོ་ལར" + ], + "BRL": [ + "R$", + "བྲ་ཛིལ་གྱི་དངུལ་ རེ་ཡལ" + ], + "BTN": [ + "Nu.", + "དངུལ་ཀྲམ" + ], + "CAD": [ + "CA$", + "ཀེ་ན་ཌ་གི་དངུལ་ ཌོ་ལར" + ], + "CHF": [ + "CHF", + "སུ་ཡིས་ཀྱི་དངུལ་ ཕྲངཀ" + ], + "CLP": [ + "CLP", + "ཅི་ལི་གི་དངུལ་ པེ་སོ" + ], + "CNY": [ + "CNÂ¥", + "རྒྱ་ནག་གི་དངུལ་ ཡུ་à½à½±à½“" + ], + "COP": [ + "COP", + "ཀོ་ལོམ་བྷི་ཡ་གི་དངུལ་ པེ་སོ" + ], + "CUP": [ + "CUP", + "ཀིའུ་བྷ་གི་དངུལ་ པེ་སོ" + ], + "DKK": [ + "DKK", + "ཌེན་མཱཀ་གི་དངུལ་ ཀྲོན" + ], + "DZD": [ + "DZD", + "ཨཱལ་ཇི་རི་ཡ་གི་དངུལ་ ཌའི་ནར" + ], + "EGP": [ + "EGP", + "ཨི་ཇིབཊ་གི་དངུལ་ པ་འུནཌ" + ], + "EUR": [ + "€", + "ཡུ་རོ༌དངུལ་" + ], + "GBP": [ + "£", + "བྲི་ཊིཤ་ པ་འུནཌ་ ཨིས་ཊར་ལིང" + ], + "HKD": [ + "HK$", + "ཧོང་ཀོང་གི་དངུལ་ ཌོ་ལར" + ], + "IDR": [ + "IDR", + "ཨིན་ཌོ་ནེ་ཤི་ཡ་གི་དངུལ་ རུ་པི་ཡ" + ], + "ILS": [ + "ILS", + "ཨིས་རེལ་གྱི་དངུལ་གསརཔ་ ཤེ་ཀེལ" + ], + "INR": [ + "₹", + "རྒྱ་གར་གྱི་དངུལ་ རུ་པི" + ], + "IQD": [ + "IQD", + "ཨི་རཱཀ་གི་དངུལ་ ཌི་ན" + ], + "IRR": [ + "IRR", + "ཨི་རཱན་གྱི་དངུལ་ རི་ཨཱལ" + ], + "ISK": [ + "ISK", + "ཨཱཡིས་ལེནཌ་གི་དངུལ་ ཀྲོ་ན" + ], + "JMD": [ + "JMD", + "ཇཱ་མཻ་ཀ་གི་དངུལ་ ཌོ་ལར" + ], + "JOD": [ + "JOD", + "ཇོར་ཌན་གྱི་དངུལ་ ཌི་ན" + ], + "JPY": [ + "JPÂ¥", + "ཇཱ་པཱན་གྱི་དངུལ་ ཡེན" + ], + "KES": [ + "KES", + "ཀེན་ཡ་གི་དངུལ་ ཤི་ལིང" + ], + "KHR": [ + "KHR", + "ཀེམ་བྷོ་ཌི་ཡ་གི་དངུལ་ རི་ཨཱལ" + ], + "KPW": [ + "KPW", + "ནོརà½à¼‹ ཀོ་རི་ཡ་གི་དངུལ་ à½à½¼à½“" + ], + "KRW": [ + "KRâ‚©", + "སཱའུà½à¼‹ ཀོ་རི་ཡ་གི་དངུལ་ à½à½¼à½“" + ], + "KWD": [ + "KWD", + "ཀུ་à½à½ºà½Šà¼‹à½‚ི་དངུལ་ ཌི་ན" + ], + "KZT": [ + "KZT", + "ཀ་ཛགས་à½à½±à½“་གྱི་དངུལ་ à½à½ºà½„་གེ" + ], + "LAK": [ + "LAK", + "ལཱ་à½à½¼à½¦à¼‹à½€à¾±à½²à¼‹à½‘ངུལ་ ཀིཔ" + ], + "LBP": [ + "LBP", + "ལེ་བ་ནོན་གྱི་དངུལ་ པ་འུནཌ" + ], + "LKR": [ + "LKR", + "ཤྲི་ ལང་ཀ་གི་དངུལ་ རུ་པི" + ], + "LRD": [ + "LRD", + "ལཱའི་བེ་རི་ཡ་གི་དངུལ་ ཌོ་ལར" + ], + "LYD": [ + "LYD", + "ལི་བི་ཡ་གི་དངུལ་ ཌི་ན" + ], + "MAD": [ + "MAD", + "མོ་རོ་ཀོ་གི་དངུལ་ ཌིར་ཧཱམ" + ], + "MMK": [ + "MMK", + "མི་ཡཱན་མར་གྱི་དངུལ་ ཅཱà½" + ], + "MNT": [ + "MNT", + "སོག་པོའི་དངུལ་ à½à½´à¼‹à½‚ྲིཀ" + ], + "MVR": [ + "MVR", + "མཱལ་དིབས་ཀྱི་དངུལ་ རུ་ཕི་ཡ" + ], + "MXN": [ + "MX$", + "མེཀ་སི་ཀོ་གི་དངུལ་ པེ་སོ" + ], + "MYR": [ + "MYR", + "མ་ལེ་ཤི་ཡ་གི་དངུལ་ རིང་གིཊ" + ], + "NOK": [ + "NOK", + "ནོར་à½à½ºà¼‹à½‚ི་དངུལ་ ཀྲོ་ན" + ], + "NPR": [ + "NPR", + "བལ་པོའི་དངུལ་ རུ་པི" + ], + "NZD": [ + "NZ$", + "ནིའུ་ཛི་ལེནཌ་གི་དངུལ་ ཌོ་ལར" + ], + "OMR": [ + "OMR", + "ཨོ་མཱན་གྱི་དངུལ་ རི་ཨཱལ" + ], + "PAB": [ + "PAB", + "པ་ན་མ་གི་དངུལ་ བཱལ་བོ་à½" + ], + "PEN": [ + "PEN", + "པ་རུ་གི་དངུལ་ ནུ་བོ་ སཱོལ" + ], + "PHP": [ + "PHP", + "ཕི་ལི་པིནས་གྱི་དངུལ་ པེ་སོ" + ], + "PKR": [ + "PKR", + "པ་ཀིས་à½à½±à½“་གྱི་དངུལ་ རུ་པི" + ], + "PLN": [ + "PLN", + "པོ་ལེནཌ་ཀྱི་དངུལ ཛ྄ལོ་ཊི" + ], + "QAR": [ + "QAR", + "ཀ་ཊར་གྱི་དངུལ་ རི་ཨཱལ" + ], + "RUB": [ + "RUB", + "ཨུ་རུ་སུ་གི་དངུལ་ རུ་བཱལ" + ], + "SAR": [ + "SAR", + "སཱà½à¼‹à½‘ིའི་དངུལ་ རི་ཡཱལ" + ], + "SCR": [ + "SCR", + "སེ་ཤཱལས་ཀྱི་དངུལ་ རུ་པི" + ], + "SEK": [ + "SEK", + "སུའི་ཌེན་གྱི་དངུལ་ ཀྲོ་ན" + ], + "SGD": [ + "SGD", + "སིང་ག་པོར་གྱི་དངུལ་ ཌོ་ལར" + ], + "SYP": [ + "SYP", + "སི་རི་ཡ་གི་དངུལ་ པ་འུནཌ" + ], + "THB": [ + "TH฿", + "à½à½±à½ à½²à¼‹à½£à½ºà½“ཌ་གི་དངུལ་ བཱà½" + ], + "TJS": [ + "TJS", + "à½à¼‹à½‡à½²à¼‹à½€à½²à½¦à¼‹à½à½±à½“་གྱི་དངུལ་ སོ་མོ་ནི" + ], + "TRY": [ + "TRY", + "ཊཱར་ཀི་གི་དངུལ་ ལི་ར" + ], + "TWD": [ + "NT$", + "ཊཱའི་à½à½±à½“་གི་དངུལ ཌོ་ལར" + ], + "TZS": [ + "TZS", + "ཊཱན་ཛཱ་ནི་ཡ་གི་དངུལ་ ཤི་ལིང" + ], + "UGX": [ + "UGX", + "ཡུ་གྷེན་ཌ་གི་དངུལ་ ཤི་ལིང" + ], + "USD": [ + "US$", + "ཡུ་ཨེས་ ཌོ་ལར" + ], + "UYU": [ + "UYU", + "ཡུ་རུ་གུ་à½à½ à½²à¼‹à½‚ི་དངུལ་ པེ་སོ" + ], + "UZS": [ + "UZS", + "ཨུས་བེ་ཀིས་à½à½±à½“་གྱི་དངུལ་ སོམ" + ], + "VEF": [ + "VEF", + "བེ་ནི་ཛུ་à½à½ºà¼‹à½£à¼‹à½‚ི་དངུལ་ བོ་ལི་བར" + ], + "VND": [ + "â‚«", + "བེཊ་ནཱམ་གྱི་དངུལ་ ཌོང" + ], + "XAF": [ + "XAF", + "XAF" + ], + "ZAR": [ + "ZAR", + "སཱའུà½à¼‹ ཨཕ་རི་ཀ་གི་དངུལ་ རཱནད" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ee.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ee.json new file mode 100644 index 0000000000000000000000000000000000000000..09bbb10f6a3b64dd48b663ca1d15eb27a2e02cdf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ee.json @@ -0,0 +1,1109 @@ +{ + "Version": "2.1.28.76", + "Names": { + "ADP": [ + "ADP", + "andorraga peseta" + ], + "AED": [ + "AED", + "united arab emiratesga dirham" + ], + "AFA": [ + "AFA", + "afghanistanga afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "afghanistanga afghani" + ], + "ALK": [ + "ALK", + "albaniaga lek (1946–1965)" + ], + "ALL": [ + "ALL", + "albaniaga lek" + ], + "AMD": [ + "AMD", + "armeniaga dram" + ], + "ANG": [ + "ANG", + "nedalands antilleaga guilder" + ], + "AOA": [ + "AOA", + "angolaga kwanza" + ], + "AOK": [ + "AOK", + "angolaga kwanza (1977–1991)" + ], + "AON": [ + "AON", + "angolaga kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "angolaga kwanza xoxotÉ” (1995–1999)" + ], + "ARA": [ + "ARA", + "argentinaga austral" + ], + "ARL": [ + "ARL", + "argentinaga peso ley (1970–1983)" + ], + "ARM": [ + "ARM", + "argentinaga peso (1881–1970)" + ], + "ARP": [ + "ARP", + "argentinaga peso (1983–1985)" + ], + "ARS": [ + "ARS", + "argentinaga peso" + ], + "ATS": [ + "ATS", + "É”striaga schilling" + ], + "AUD": [ + "AU$", + "Australiaga dollar" + ], + "AWG": [ + "AWG", + "arubaga lorin" + ], + "AZM": [ + "AZM", + "azerbaidzanga manat (1993–2006)" + ], + "AZN": [ + "AZN", + "azerbaidzanga manat" + ], + "BAD": [ + "BAD", + "bosnia-herzegovinaga dinar (1992–1994)" + ], + "BAM": [ + "BAM", + "bosnia-herzegovinaga convertible mark" + ], + "BAN": [ + "BAN", + "bosnia kple herzegovinaga dinar yeyètÉ” (1994–1997)" + ], + "BBD": [ + "BBD", + "barbadiaga dollar" + ], + "BDT": [ + "BDT", + "bangladeshga taka" + ], + "BEC": [ + "BEC", + "beldziumga franc (convertible)" + ], + "BEF": [ + "BEF", + "beldziumga franc" + ], + "BEL": [ + "BEL", + "beldziumga franc (financial)" + ], + "BGL": [ + "BGL", + "bÉ”lgariaga hard lev" + ], + "BGM": [ + "BGM", + "bÉ”lgariaga socialist lev" + ], + "BGN": [ + "BGN", + "bulgariaga lev" + ], + "BGO": [ + "BGO", + "bulgariaga lev (1879–1952)" + ], + "BHD": [ + "BHD", + "bahrainga dinar" + ], + "BIF": [ + "BIF", + "burundiga franc" + ], + "BMD": [ + "BMD", + "bermudaga dollar" + ], + "BND": [ + "BND", + "bruneiga dollar" + ], + "BOB": [ + "BOB", + "boliviaga boliviano" + ], + "BOL": [ + "BOL", + "boliviaga boliviano (1863–1963)" + ], + "BOP": [ + "BOP", + "boliviaga peso" + ], + "BOV": [ + "BOV", + "boliviaga mvdol" + ], + "BRB": [ + "BRB", + "braziliaga cruzeiro xoxotÉ” (1967–1986)" + ], + "BRC": [ + "BRC", + "brazilia cruzado (1986–1989)" + ], + "BRE": [ + "BRE", + "braziliaga cruzeiro xoxotÉ” gbãtÉ” (1990–1993)" + ], + "BRL": [ + "R$", + "Braziliaga real" + ], + "BRN": [ + "BRN", + "brazilia cruzado xoxotÉ” (1989–1990)" + ], + "BRR": [ + "BRR", + "braziliaga cruzeiro (1993–1994)" + ], + "BRZ": [ + "BRZ", + "braziliaga cruzeiro (1942–1967)" + ], + "BSD": [ + "BSD", + "bahamiaga dollar" + ], + "BTN": [ + "BTN", + "bhutanga ngultrum" + ], + "BUK": [ + "BUK", + "burmaga kyat" + ], + "BWP": [ + "BWP", + "botswanaga pula" + ], + "BYB": [ + "BYB", + "belarusiaga ruble yeytÉ” (1994–1999)" + ], + "BYN": [ + "BYN", + "belarusiaga ruble" + ], + "BYR": [ + "BYR", + "belarusiaga ruble (2000–2016)" + ], + "BZD": [ + "BZD", + "belizega dollar" + ], + "CAD": [ + "CA$", + "Canadaga dollar" + ], + "CDF": [ + "CDF", + "kongoga franc" + ], + "CHE": [ + "CHE", + "WIR euro CHE" + ], + "CHF": [ + "CHF", + "Swissga franc" + ], + "CHW": [ + "CHW", + "WIR euro CHW" + ], + "CLE": [ + "CLE", + "tsilega escudo" + ], + "CLF": [ + "CLF", + "tsilegakÉ”nta dzidzenu UF" + ], + "CLP": [ + "CLP", + "tsilega peso" + ], + "CNX": [ + "CNX", + "tsainatÉ”wo Æ’e gadzraÉ–oÆ’e dollar" + ], + "CNY": [ + "CNÂ¥", + "Chinesega yuan" + ], + "COP": [ + "COP", + "kolombiaga peso" + ], + "COU": [ + "COU", + "kolombiaga vavãtÉ”" + ], + "CRC": [ + "CRC", + "kosta rikaga kolón" + ], + "CSD": [ + "CSD", + "serbiaga dinar (2002–2006)" + ], + "CSK": [ + "CSK", + "tsÉ›koslovakiaga hard koruna" + ], + "CUC": [ + "CUC", + "kubaga convertible peso" + ], + "CUP": [ + "CUP", + "kubaga peso" + ], + "CVE": [ + "CVE", + "kape verdega escudo" + ], + "CYP": [ + "CYP", + "saipriÉ”tga pound" + ], + "CZK": [ + "CZK", + "tsÉ›k repÉ”blikga koruna" + ], + "DDM": [ + "DDM", + "É£edzeÆ’e germaniaga mark" + ], + "DEM": [ + "DEM", + "germaniaga mark" + ], + "DJF": [ + "DJF", + "dziboutiga franc" + ], + "DKK": [ + "DKK", + "Denmarkga krone" + ], + "DOP": [ + "DOP", + "dominicaga peso" + ], + "DZD": [ + "DZD", + "aldzeriaga dinar" + ], + "ECS": [ + "ECS", + "ekuadÉ”ga sucre" + ], + "ECV": [ + "ECV", + "ekuadÉ” dzidzenu matrÉ”matrÉ”" + ], + "EEK": [ + "EEK", + "estoniaga kroon" + ], + "EGP": [ + "EGP", + "egyptega pound" + ], + "ERN": [ + "ERN", + "eritreaga nakfa" + ], + "ESA": [ + "ESA", + "spaniaga peseta (A)" + ], + "ESB": [ + "ESB", + "spaniaga peseta (Convertible)" + ], + "ESP": [ + "ESP", + "spaniaga peseta" + ], + "ETB": [ + "ETB", + "ethiopiaga birr" + ], + "EUR": [ + "€", + "EUR" + ], + "FIM": [ + "FIM", + "finlandga markka" + ], + "FJD": [ + "FJD", + "fidziga dollar" + ], + "FKP": [ + "FKP", + "falklanÉ– Æ’udomekpo dukÉ”wo Æ’e ga pound" + ], + "FRF": [ + "FRF", + "frentsiga franc" + ], + "GBP": [ + "£", + "Britishga pound" + ], + "GEK": [ + "GEK", + "dzÉ”dziaga kupon larit" + ], + "GEL": [ + "GEL", + "dzÉ”dziaga lari" + ], + "GHC": [ + "GHC", + "ghana siÉ–i (1979–2007)" + ], + "GHS": [ + "GH₵", + "ghana siÉ–i" + ], + "GIP": [ + "GIP", + "gilbrataga pound" + ], + "GMD": [ + "GMD", + "gambiaga dalasi" + ], + "GNF": [ + "GNF", + "giniga franc" + ], + "GNS": [ + "GNS", + "giniga syli" + ], + "GQE": [ + "GQE", + "ekuatorial giniga ekwele" + ], + "GRD": [ + "GRD", + "grisiga drachma" + ], + "GTQ": [ + "GTQ", + "guatemalaga quetzal" + ], + "GWE": [ + "GWE", + "pÉ”tugaltÉ”wo Æ’e giniga escudo" + ], + "GWP": [ + "GWP", + "gini-bisau peso" + ], + "GYD": [ + "GYD", + "guyanaga dollar" + ], + "HKD": [ + "HK$", + "Hong Kongga dollar" + ], + "HNL": [ + "HNL", + "honduraga lempira" + ], + "HRD": [ + "HRD", + "kroatiaga dinar" + ], + "HRK": [ + "HRK", + "kroatiaga kuna" + ], + "HTG": [ + "HTG", + "haitiga gourde" + ], + "HUF": [ + "HUF", + "hungariaga forint" + ], + "IDR": [ + "IDR", + "Indonesiaga rupiah" + ], + "IEP": [ + "IEP", + "ireland pound" + ], + "ILP": [ + "ILP", + "israelga pound" + ], + "ILR": [ + "ILR", + "israelga sheqel (1980–1985)" + ], + "ILS": [ + "₪", + "israelga yeyetÉ” sheqel" + ], + "INR": [ + "₹", + "Indiaga rupee" + ], + "IQD": [ + "IQD", + "irakga dinar" + ], + "IRR": [ + "IRR", + "iranga rial" + ], + "ISJ": [ + "ISJ", + "aiselandga króna (1918–1981)" + ], + "ISK": [ + "ISK", + "aiselandga króna" + ], + "ITL": [ + "ITL", + "italiaga lira" + ], + "JMD": [ + "JMD", + "dzamaikaga dollar" + ], + "JOD": [ + "JOD", + "yÉ”danga dinar" + ], + "JPY": [ + "JPÂ¥", + "Japanesega yen" + ], + "KES": [ + "KES", + "kenyaga shilling" + ], + "KGS": [ + "KGS", + "kirgistanga som" + ], + "KHR": [ + "KHR", + "kambodiaga riel" + ], + "KMF": [ + "KMF", + "komoroga franc" + ], + "KPW": [ + "KPW", + "dziehe koreaga won" + ], + "KRH": [ + "KRH", + "anyiehe koreaga hwan (1953–1962)" + ], + "KRO": [ + "KRO", + "anyiehe koreaga won (1945–1953)" + ], + "KRW": [ + "â‚©", + "South Koreaga won" + ], + "KWD": [ + "KWD", + "kuwaitga dinar" + ], + "KYD": [ + "KYD", + "kayman Æ’udomekpoga dollar" + ], + "KZT": [ + "KZT", + "kazakhstanga tenge" + ], + "LAK": [ + "LAK", + "laosga kip" + ], + "LBP": [ + "LBP", + "lebanonga pound" + ], + "LKR": [ + "LKR", + "sri lankaga rupee" + ], + "LRD": [ + "LRD", + "liberiaga dollar" + ], + "LSL": [ + "LSL", + "lesotoga loti" + ], + "LTL": [ + "LTL", + "lithuaniaga litas" + ], + "LTT": [ + "LTT", + "lithuaniaga talonas" + ], + "LUC": [ + "LUC", + "lazembÉ”gga convertible franc" + ], + "LUF": [ + "LUF", + "lazembÉ”gga franc" + ], + "LUL": [ + "LUL", + "lazembÉ”gga gadzikpÉ” franc" + ], + "LVL": [ + "LVL", + "latviaga lats" + ], + "LVR": [ + "LVR", + "latviaga ruble" + ], + "LYD": [ + "LYD", + "libyaga dinar" + ], + "MAD": [ + "MAD", + "morokoga dirham" + ], + "MAF": [ + "MAF", + "morokoga franc" + ], + "MCF": [ + "MCF", + "monegaskga franc" + ], + "MDC": [ + "MDC", + "moldovaga cupon" + ], + "MDL": [ + "MDL", + "moldovaga leu" + ], + "MGA": [ + "MGA", + "malagasega ariary" + ], + "MGF": [ + "MGF", + "malagasega franc" + ], + "MKD": [ + "MKD", + "makedoniaga denar" + ], + "MKN": [ + "MKN", + "makedoniaga denar (1992–1993)" + ], + "MLF": [ + "MLF", + "maliga franc" + ], + "MMK": [ + "MMK", + "myanmaga kyat" + ], + "MNT": [ + "MNT", + "mongoliaga tugrik" + ], + "MOP": [ + "MOP", + "makanesega pataca" + ], + "MRO": [ + "MRO", + "mÉ”ritaniaga ouguiya" + ], + "MTL": [ + "MTL", + "maltaga lira" + ], + "MTP": [ + "MTP", + "maltaga pound" + ], + "MUR": [ + "MUR", + "mÉ”ritiusga rupee" + ], + "MVR": [ + "MVR", + "maldiviaga rufiyaa" + ], + "MXN": [ + "MX$", + "Mexicoga peso" + ], + "MYR": [ + "MYR", + "malaysiaga ringit" + ], + "NGN": [ + "NGN", + "naidzeriaga naira" + ], + "NIC": [ + "NIC", + "nikaraguaga córdoba (1988–1991)" + ], + "NIO": [ + "NIO", + "nikaraguaga córdoba" + ], + "NLG": [ + "NLG", + "hollandga guilder" + ], + "NOK": [ + "NOK", + "Norwayga krone" + ], + "NPR": [ + "NPR", + "nepalga rupee" + ], + "NZD": [ + "NZ$", + "new zealanÉ–ga dollar" + ], + "OMR": [ + "OMR", + "omanga rial" + ], + "PAB": [ + "PAB", + "panamaga balboa" + ], + "PEI": [ + "PEI", + "peruga inti" + ], + "PEN": [ + "PEN", + "peruga nuevo sol" + ], + "PES": [ + "PES", + "peruga nuevo sol (1863–1965)" + ], + "PGK": [ + "PGK", + "papua new guineaga kina" + ], + "PHP": [ + "PHP", + "filipiniga peso" + ], + "PKR": [ + "PKR", + "pakistaniga rupee" + ], + "PLN": [ + "PLN", + "polanÉ–ga zloty" + ], + "PLZ": [ + "PLZ", + "polanÉ–ga zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "pÉ”tugalga escudo" + ], + "PYG": [ + "PYG", + "paraguayga guarani" + ], + "QAR": [ + "QAR", + "katarga rial" + ], + "RHD": [ + "RHD", + "rhodesiaga dollar" + ], + "ROL": [ + "ROL", + "romaniaga leu (1952–2006)" + ], + "RON": [ + "RON", + "romaniaga leu" + ], + "RSD": [ + "RSD", + "serbiaga dinar" + ], + "RUB": [ + "RUB", + "Russiaga ruble" + ], + "RUR": [ + "RUR", + "rÉ”tsiaga ruble (1991–1998)" + ], + "RWF": [ + "RWF", + "rwandaga franc" + ], + "SAR": [ + "SAR", + "Saudi Arabiaga riyal" + ], + "SBD": [ + "SBD", + "solomon Æ’udomekpo dukÉ”wo Æ’e ga dollar" + ], + "SCR": [ + "SCR", + "sÉ›tselsga rupee" + ], + "SDD": [ + "SDD", + "sudanga dinar (1992–2007)" + ], + "SDG": [ + "SDG", + "sudanga pound" + ], + "SDP": [ + "SDP", + "sudanga pound (1957–1998)" + ], + "SEK": [ + "SEK", + "Swedishga krone" + ], + "SGD": [ + "SGD", + "singapÉ”ga dollar" + ], + "SHP": [ + "SHP", + "saint helenaga pound" + ], + "SIT": [ + "SIT", + "slovaniaga tolar" + ], + "SKK": [ + "SKK", + "slovakga koruna" + ], + "SLL": [ + "SLL", + "sierra leonega leone" + ], + "SOS": [ + "SOS", + "somaliaga shilling" + ], + "SRD": [ + "SRD", + "surinamga dollar" + ], + "SRG": [ + "SRG", + "surinamega guilder" + ], + "STD": [ + "STD", + "são tomé kple príncipega dobra" + ], + "SUR": [ + "SUR", + "sovietga rouble" + ], + "SVC": [ + "SVC", + "salvadÉ”ga colón" + ], + "SYP": [ + "SYP", + "syriaga pound" + ], + "SZL": [ + "SZL", + "swaziga lilangeni" + ], + "THB": [ + "฿", + "Thailandga baht" + ], + "TJR": [ + "TJR", + "tajikistanga ruble" + ], + "TJS": [ + "TJS", + "tajikistanga somoni" + ], + "TMM": [ + "TMM", + "turkmenistanga manat (1993–2009)" + ], + "TMT": [ + "TMT", + "turkmenistanga manat" + ], + "TND": [ + "TND", + "tunisiaga dinar" + ], + "TOP": [ + "TOP", + "tonagaga pa’anga" + ], + "TPE": [ + "TPE", + "timÉ”ga escudo" + ], + "TRL": [ + "TRL", + "tÉ›kiiga lira (1922–2005)" + ], + "TRY": [ + "TRY", + "Turkishga lira" + ], + "TTD": [ + "TTD", + "trinidad kple tobagoga dollar" + ], + "TWD": [ + "NT$", + "Taiwanga dollar" + ], + "TZS": [ + "TZS", + "TanzaniatÉ”wofÉ›gadudu" + ], + "UAH": [ + "UAH", + "ukrainega hryvnia" + ], + "UAK": [ + "UAK", + "ukrainega karbovanet" + ], + "UGS": [ + "UGS", + "ugandaga shilling (1966–1987)" + ], + "UGX": [ + "UGX", + "ugandaga shilling" + ], + "USD": [ + "US$", + "US ga dollar" + ], + "USN": [ + "USN", + "us ga dollar (Å‹keke si gbÉ”na tÉ”)" + ], + "USS": [ + "USS", + "us ga dollar (Å‹keke ma ke tÉ”)" + ], + "UYI": [ + "UYI", + "uruguayga peso UYI" + ], + "UYP": [ + "UYP", + "uruguayga peso (1975–1993)" + ], + "UYU": [ + "UYU", + "uruguayga peso" + ], + "UZS": [ + "UZS", + "uzbekistanga som" + ], + "VEB": [ + "VEB", + "venezuelaga bolívar (1871–2008)" + ], + "VEF": [ + "VEF", + "venezuelaga bolívar" + ], + "VND": [ + "â‚«", + "vietnamga dong" + ], + "VNN": [ + "VNN", + "vietnamga dong (1978–1985)" + ], + "VUV": [ + "VUV", + "vanuatuga vatu" + ], + "WST": [ + "WST", + "samaoga tala" + ], + "XAF": [ + "FCFA", + "É£etoÉ–ofe afrikaga CFA franc BEAC" + ], + "XCD": [ + "EC$", + "É£edzeÆ’e caribbeaga dollar" + ], + "XEU": [ + "XEU", + "europa gaÉ–uÉ–u" + ], + "XFO": [ + "XFO", + "fransemega sika franc" + ], + "XFU": [ + "XFU", + "frentsi UIC-franc" + ], + "XOF": [ + "CFA", + "É£etoÉ–ofe afrikaga CFA franc BCEAO" + ], + "XPF": [ + "CFPF", + "CFP ga franc" + ], + "XRE": [ + "XRE", + "RINET gadodo XRE" + ], + "YDD": [ + "YDD", + "yemeniga dinar" + ], + "YER": [ + "YER", + "yemeniga rial" + ], + "YUD": [ + "YUD", + "yugoslaviaga hard dinar (1966–1990)" + ], + "YUM": [ + "YUM", + "yugoslaviaga yeyetÉ” dinar (1994–2002)" + ], + "YUN": [ + "YUN", + "yugoslaviaga convertible dinar (1990–1992)" + ], + "YUR": [ + "YUR", + "yugoslaviaga dinar (1992–1993)" + ], + "ZAL": [ + "ZAL", + "anyiehe afrikaga rand (gadzikpÉ”tÉ”)" + ], + "ZAR": [ + "ZAR", + "South Africaga rand" + ], + "ZMK": [ + "ZMK", + "zambiaga kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "zambiaga kwacha" + ], + "ZRN": [ + "ZRN", + "zairega yeyetÉ” zaire" + ], + "ZRZ": [ + "ZRZ", + "zairega zaire (1971–1993)" + ], + "ZWD": [ + "ZWD", + "zimbabwega dollar (1980–2008)" + ], + "ZWL": [ + "ZWL", + "zimbabwega dollar (2009)" + ], + "ZWR": [ + "ZWR", + "zimbabwega dollar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/el.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/el.json new file mode 100644 index 0000000000000000000000000000000000000000..21339ee0c3ad9fe4f2f542eed5e625d871718bb0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/el.json @@ -0,0 +1,1046 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Πεσέτα ΑνδόÏας" + ], + "AED": [ + "AED", + "ÎτιÏάμ Ηνωμένων ΑÏαβικών ΕμιÏάτων" + ], + "AFA": [ + "AFA", + "Αφγανί Αφγανιστάν (1927–2002)" + ], + "AFN": [ + "AFN", + "Αφγάνι Αφγανιστάν" + ], + "ALL": [ + "ALL", + "Λεκ Αλβανίας" + ], + "AMD": [ + "AMD", + "ÎÏ„Ïαμ ΑÏμενίας" + ], + "ANG": [ + "ANG", + "Γκίλντα Ολλανδικών Αντιλλών" + ], + "AOA": [ + "AOA", + "Κουάνζα Ανγκόλας" + ], + "AOK": [ + "AOK", + "Κουάνζα Ανγκόλας (1977–1990)" + ], + "AON": [ + "AON", + "Îέα Κουάνζα Ανγκόλας (1990–2000)" + ], + "ARA": [ + "ARA", + "ΩστÏάλ ΑÏγετινής" + ], + "ARP": [ + "ARP", + "Πέσο ΑÏγεντινής (1983–1985)" + ], + "ARS": [ + "ARS", + "Πέσο ΑÏγεντινής" + ], + "ATS": [ + "ATS", + "Σελίνι ΑυστÏίας" + ], + "AUD": [ + "A$", + "ΔολάÏιο ΑυστÏαλίας" + ], + "AWG": [ + "AWG", + "ΦλοÏίνι ΑÏοÏμπα" + ], + "AZM": [ + "AZM", + "Μανάτ ΑζεÏμπαϊτζάν (1993–2006)" + ], + "AZN": [ + "AZN", + "Μανάτ ΑζεÏμπαϊτζάν" + ], + "BAD": [ + "BAD", + "ΔηνάÏιο Βοσνίας-ΕÏζεγοβίνης" + ], + "BAM": [ + "BAM", + "ΜετατÏέψιμο ΜάÏκο Βοσνίας-ΕÏζεγοβίνης" + ], + "BBD": [ + "BBD", + "ΔολάÏιο ΜπαÏμπέιντος" + ], + "BDT": [ + "BDT", + "Τάκα Μπαγκλαντές" + ], + "BEC": [ + "BEC", + "ΦÏάγκο Βελγίου (μετατÏέψιμο)" + ], + "BEF": [ + "BEF", + "ΦÏάγκο Βελγίου" + ], + "BEL": [ + "BEL", + "ΦÏάγκο Βελγίου (οικονομικό)" + ], + "BGL": [ + "BGL", + "Μεταλλικό Λεβ ΒουλγαÏίας" + ], + "BGN": [ + "BGN", + "Λεβ ΒουλγαÏίας" + ], + "BHD": [ + "BHD", + "ΔηνάÏιο ΜπαχÏέιν" + ], + "BIF": [ + "BIF", + "ΦÏάγκο ΜπουÏοÏντι" + ], + "BMD": [ + "BMD", + "ΔολάÏιο ΒεÏμοÏδων" + ], + "BND": [ + "BND", + "ΔολάÏιο ΜπÏουνέι" + ], + "BOB": [ + "BOB", + "Μπολιβιάνο Βολιβίας" + ], + "BOP": [ + "BOP", + "Πέσο Βολιβίας" + ], + "BOV": [ + "BOV", + "Μβδολ Βολιβίας" + ], + "BRB": [ + "BRB", + "Îέο ΚÏουζιέÏο Î’Ïαζιλίας (1967–1986)" + ], + "BRC": [ + "BRC", + "ΚÏουζάντο Î’Ïαζιλίας" + ], + "BRE": [ + "BRE", + "ΚÏουζιέÏο Î’Ïαζιλίας (1990–1993)" + ], + "BRL": [ + "R$", + "Ρεάλ Î’Ïαζιλίας" + ], + "BRN": [ + "BRN", + "Îέο ΚÏουζάντο Î’Ïαζιλίας" + ], + "BRR": [ + "BRR", + "ΚÏουζιέÏο Î’Ïαζιλίας" + ], + "BSD": [ + "BSD", + "ΔολάÏιο Μπαχαμών" + ], + "BTN": [ + "BTN", + "ÎγκοÏλτÏουμ Μπουτάν" + ], + "BUK": [ + "BUK", + "Κιατ ΒιÏμανίας" + ], + "BWP": [ + "BWP", + "ΠοÏλα Μποτσουάνας" + ], + "BYB": [ + "BYB", + "Îέο ΡοÏβλι ΛευκοÏωσίας (1994–1999)" + ], + "BYN": [ + "BYN", + "ΡοÏβλι ΛευκοÏωσίας" + ], + "BYR": [ + "BYR", + "ΡοÏβλι ΛευκοÏωσίας (2000–2016)" + ], + "BZD": [ + "BZD", + "ΔολάÏιο Μπελίζ" + ], + "CAD": [ + "CA$", + "ΔολάÏιο Καναδά" + ], + "CDF": [ + "CDF", + "ΦÏάγκο Κονγκό" + ], + "CHE": [ + "CHE", + "ΕυÏÏŽ WIR" + ], + "CHF": [ + "CHF", + "ΦÏάγκο Ελβετίας" + ], + "CHW": [ + "CHW", + "ΦÏάγκο WIR" + ], + "CLF": [ + "CLF", + "Ουνιδάδες ντε φομέντο Χιλής" + ], + "CLP": [ + "CLP", + "Πέσο Χιλής" + ], + "CNY": [ + "CNÂ¥", + "Γουάν Κίνας" + ], + "COP": [ + "COP", + "Πέσο Κολομβίας" + ], + "CRC": [ + "CRC", + "Κολόν Κόστα Ρίκα" + ], + "CSD": [ + "CSD", + "Παλαιό ΔηνάÏιο ΣεÏβίας" + ], + "CSK": [ + "CSK", + "ΣκληÏή ΚοÏόνα Τσεχοσλοβακίας" + ], + "CUC": [ + "CUC", + "ΜετατÏέψιμο πέσο ΚοÏβας" + ], + "CUP": [ + "CUP", + "Πέσο ΚοÏβας" + ], + "CVE": [ + "CVE", + "ΕσκοÏδο ΠÏάσινου ΑκÏωτηÏίου" + ], + "CYP": [ + "CYP", + "ΛίÏα ΚÏÏ€Ïου" + ], + "CZK": [ + "CZK", + "ΚοÏόνα Τσεχίας" + ], + "DDM": [ + "DDM", + "ΟστμάÏκ Ανατολικής ΓεÏμανίας" + ], + "DEM": [ + "DEM", + "ΜάÏκο ΓεÏμανίας" + ], + "DJF": [ + "DJF", + "ΦÏάγκο Τζιμπουτί" + ], + "DKK": [ + "DKK", + "ΚοÏόνα Δανίας" + ], + "DOP": [ + "DOP", + "Πέσο Δομινικανής ΔημοκÏατίας" + ], + "DZD": [ + "DZD", + "ΔηνάÏιο ΑλγεÏίας" + ], + "ECS": [ + "ECS", + "ΣοÏκÏε ΕκουαδόÏ" + ], + "EEK": [ + "EEK", + "ΚοÏόνα Εσθονίας" + ], + "EGP": [ + "EGP", + "ΛίÏα ΑιγÏπτου" + ], + "ERN": [ + "ERN", + "Îάκφα ΕÏυθÏαίας" + ], + "ESA": [ + "ESA", + "πεσέτα Ισπανίας (λογαÏιασμός Α)" + ], + "ESB": [ + "ESB", + "πεσέτα Ισπανίας (μετατÏέψιμος λογαÏιασμός)" + ], + "ESP": [ + "ESP", + "Πεσέτα Ισπανίας" + ], + "ETB": [ + "ETB", + "ÎœÏ€Î¹Ï Î‘Î¹Î¸Î¹Î¿Ï€Î¯Î±Ï‚" + ], + "EUR": [ + "€", + "ΕυÏÏŽ" + ], + "FIM": [ + "FIM", + "ΜάÏκο Φινλανδίας" + ], + "FJD": [ + "FJD", + "ΔολάÏιο Φίτζι" + ], + "FKP": [ + "FKP", + "ΛίÏα Îησιών Φώκλαντ" + ], + "FRF": [ + "FRF", + "ΦÏάγκο Γαλλίας" + ], + "GBP": [ + "£", + "ΛίÏα ΣτεÏλίνα Î’Ïετανίας" + ], + "GEK": [ + "GEK", + "ΚοÏπον ΛάÏι ΓεωÏγίας" + ], + "GEL": [ + "GEL", + "ΛάÏι ΓεωÏγίας" + ], + "GHC": [ + "GHC", + "Σέντι Γκάνας (1979–2007)" + ], + "GHS": [ + "GHS", + "Σέντι Γκάνας" + ], + "GIP": [ + "GIP", + "ΛίÏα ΓιβÏαλτάÏ" + ], + "GMD": [ + "GMD", + "Îταλάσι Γκάμπιας" + ], + "GNF": [ + "GNF", + "ΦÏάγκο Γουινέας" + ], + "GNS": [ + "GNS", + "Συλί Γουινέας" + ], + "GQE": [ + "GQE", + "Εκγουέλε ΙσημεÏινής Γουινέας" + ], + "GRD": [ + "ΔÏχ", + "ΔÏαχμή Ελλάδας", + {} + ], + "GTQ": [ + "GTQ", + "Κουετσάλ Γουατεμάλας" + ], + "GWE": [ + "GWE", + "Γκινέα ΕσκοÏδο ΠοÏτογαλίας" + ], + "GWP": [ + "GWP", + "Πέσο Γουινέας-Μπισάου" + ], + "GYD": [ + "GYD", + "ΔολάÏιο Γουιάνας" + ], + "HKD": [ + "HK$", + "ΔολάÏιο Χονγκ Κονγκ" + ], + "HNL": [ + "HNL", + "ΛεμπίÏα ΟνδοÏÏας" + ], + "HRD": [ + "HRD", + "ΔηνάÏιο ΚÏοατίας" + ], + "HRK": [ + "HRK", + "ΚοÏνα ΚÏοατίας" + ], + "HTG": [ + "HTG", + "ΓκουÏντ Αϊτής" + ], + "HUF": [ + "HUF", + "ΦιοÏίνι ΟυγγαÏίας" + ], + "IDR": [ + "IDR", + "Ρουπία Ινδονησίας" + ], + "IEP": [ + "IEP", + "ΛίÏα ΙÏλανδίας" + ], + "ILP": [ + "ILP", + "ΛίÏα ΙσÏαήλ" + ], + "ILR": [ + "ILR", + "παλιό σεκέλ ΙσÏαήλ" + ], + "ILS": [ + "₪", + "Îέο Σέκελ ΙσÏαήλ" + ], + "INR": [ + "₹", + "Ρουπία Ινδίας" + ], + "IQD": [ + "IQD", + "ΔηνάÏιο ΙÏάκ" + ], + "IRR": [ + "IRR", + "Ριάλ ΙÏάν" + ], + "ISJ": [ + "ISJ", + "Παλιά κοÏόνα Ισλανδίας" + ], + "ISK": [ + "ISK", + "ΚοÏόνα Ισλανδίας" + ], + "ITL": [ + "ITL", + "ΛιÏέτα Ιταλίας" + ], + "JMD": [ + "JMD", + "ΔολάÏιο Τζαμάικας" + ], + "JOD": [ + "JOD", + "ΔηνάÏιο ΙοÏδανίας" + ], + "JPY": [ + "JPÂ¥", + "Γιεν Ιαπωνίας" + ], + "KES": [ + "KES", + "Σελίνι Κένυας" + ], + "KGS": [ + "KGS", + "Σομ ΚιÏγιζίας" + ], + "KHR": [ + "KHR", + "Ρίελ Καμπότζης" + ], + "KMF": [ + "KMF", + "ΦÏάγκο ΚομοÏών" + ], + "KPW": [ + "KPW", + "Γουόν Î’ÏŒÏειας ΚοÏέας" + ], + "KRW": [ + "â‚©", + "Γουόν Îότιας ΚοÏέας" + ], + "KWD": [ + "KWD", + "ΔηνάÏιο Κουβέιτ" + ], + "KYD": [ + "KYD", + "ΔολάÏιο Îήσων Κέιμαν" + ], + "KZT": [ + "KZT", + "Τένγκε Καζακστάν" + ], + "LAK": [ + "LAK", + "Κιπ Λάος" + ], + "LBP": [ + "LBP", + "ΛίÏα Λιβάνου" + ], + "LKR": [ + "LKR", + "Ρουπία ΣÏι Λάνκα" + ], + "LRD": [ + "LRD", + "ΔολάÏιο ΛιβεÏίας" + ], + "LSL": [ + "LSL", + "Λότι Λεσότο" + ], + "LTL": [ + "LTL", + "Λίτα Λιθουανίας" + ], + "LTT": [ + "LTT", + "Ταλόνας Λιθουανίας" + ], + "LUC": [ + "LUC", + "ΜετατÏέψιμο ΦÏάγκο ΛουξεμβοÏÏγου" + ], + "LUF": [ + "LUF", + "ΦÏάγκο ΛουξεμβοÏÏγου" + ], + "LUL": [ + "LUL", + "Οικονομικό ΦÏάγκο ΛουξεμβοÏÏγου" + ], + "LVL": [ + "LVL", + "Λατς Λετονίας" + ], + "LVR": [ + "LVR", + "ΡοÏβλι Λετονίας" + ], + "LYD": [ + "LYD", + "ΔηνάÏιο ΛιβÏης" + ], + "MAD": [ + "MAD", + "ÎτιÏάμ ΜαÏόκου" + ], + "MAF": [ + "MAF", + "ΦÏάγκο ΜαÏόκου" + ], + "MDL": [ + "MDL", + "Λέου Μολδαβίας" + ], + "MGA": [ + "MGA", + "ΑÏιάÏι ΜαδαγασκάÏης" + ], + "MGF": [ + "MGF", + "ΦÏάγκο ΜαδαγασκάÏης" + ], + "MKD": [ + "MKD", + "ΔηνάÏιο ΠΓΔΜ" + ], + "MLF": [ + "MLF", + "ΦÏάγκο Μαλί" + ], + "MMK": [ + "MMK", + "Κιάτ ΜιανμάÏ" + ], + "MNT": [ + "MNT", + "ΤουγκÏίκ Μογγολίας" + ], + "MOP": [ + "MOP", + "Πατάκα Μακάο" + ], + "MRO": [ + "MRO", + "Ουγκίγια ΜαυÏιτανίας" + ], + "MTL": [ + "MTL", + "ΛιÏέτα Μάλτας" + ], + "MTP": [ + "MTP", + "ΛίÏα Μάλτας" + ], + "MUR": [ + "MUR", + "Ρουπία ΜαυÏικίου" + ], + "MVR": [ + "MVR", + "Ρουφίγια Μαλδίβων" + ], + "MWK": [ + "MWK", + "Κουάτσα Μαλάουι" + ], + "MXN": [ + "MX$", + "Πέσο ΜεξικοÏ" + ], + "MXP": [ + "MXP", + "Ασημένιο Πέσο ÎœÎµÎ¾Î¹ÎºÎ¿Ï (1861–1992)" + ], + "MYR": [ + "MYR", + "Ρινγκίτ Μαλαισίας" + ], + "MZE": [ + "MZE", + "ΕσκοÏδο Μοζαμβίκης" + ], + "MZM": [ + "MZM", + "Παλαιό Μετικάλ Μοζαμβίκης" + ], + "MZN": [ + "MZN", + "Μετικάλ Μοζαμβίκης" + ], + "NAD": [ + "NAD", + "ΔολάÏιο Îαμίμπια" + ], + "NGN": [ + "NGN", + "ÎάιÏα ÎιγηÏίας" + ], + "NIC": [ + "NIC", + "ΚόÏδοβα ÎικαÏάγουας" + ], + "NIO": [ + "NIO", + "ΧÏυσή ΚόÏδοβα ÎικαÏάγουας" + ], + "NLG": [ + "NLG", + "Γκίλντα Ολλανδίας" + ], + "NOK": [ + "NOK", + "ΚοÏόνα ÎοÏβηγίας" + ], + "NPR": [ + "NPR", + "Ρουπία Îεπάλ" + ], + "NZD": [ + "NZ$", + "ΔολάÏιο Îέας Ζηλανδίας" + ], + "OMR": [ + "OMR", + "Ριάλ Ομάν" + ], + "PAB": [ + "PAB", + "Μπαλμπόα Παναμά" + ], + "PEI": [ + "PEI", + "Ίντι ΠεÏοÏ" + ], + "PEN": [ + "PEN", + "Îέο Σολ ΠεÏοÏ" + ], + "PES": [ + "PES", + "Σολ ΠεÏοÏ" + ], + "PGK": [ + "PGK", + "Κίνα ΠαποÏας Îέας Γουινέας" + ], + "PHP": [ + "PHP", + "Πέσο Φιλιππίνων" + ], + "PKR": [ + "PKR", + "Ρουπία Πακιστάν" + ], + "PLN": [ + "PLN", + "Ζλότι Πολωνίας" + ], + "PLZ": [ + "PLZ", + "Ζλότυ Πολωνίας (1950–1995)" + ], + "PTE": [ + "PTE", + "ΕσκοÏδο ΠοÏτογαλίας" + ], + "PYG": [ + "PYG", + "ΓκουαÏανί ΠαÏαγουάης" + ], + "QAR": [ + "QAR", + "Ριάλ ΚατάÏ" + ], + "RHD": [ + "RHD", + "ΔολάÏιο Ροδεσίας" + ], + "ROL": [ + "ROL", + "Λέι Ρουμανίας" + ], + "RON": [ + "RON", + "Λέου Ρουμανίας" + ], + "RSD": [ + "RSD", + "ΔηνάÏιο ΣεÏβίας" + ], + "RUB": [ + "RUB", + "ΡοÏβλι Ρωσίας" + ], + "RUR": [ + "RUR", + "ΡοÏβλι Ρωσίας (1991–1998)" + ], + "RWF": [ + "RWF", + "ΦÏάγκο Ρουάντας" + ], + "SAR": [ + "SAR", + "Ριάλ Σαουδικής ΑÏαβίας" + ], + "SBD": [ + "SBD", + "ΔολάÏιο Îήσων Σολομώντος" + ], + "SCR": [ + "SCR", + "Ρουπία Σεϋχελλών" + ], + "SDD": [ + "SDD", + "ΔηνάÏιο Σουδάν" + ], + "SDG": [ + "SDG", + "ΛίÏα Σουδάν" + ], + "SDP": [ + "SDP", + "Παλαιά ΛίÏα Σουδάν" + ], + "SEK": [ + "SEK", + "ΚοÏόνα Σουηδίας" + ], + "SGD": [ + "SGD", + "ΔολάÏιο ΣιγκαποÏÏης" + ], + "SHP": [ + "SHP", + "ΛίÏα Αγίας Ελένης" + ], + "SIT": [ + "SIT", + "Î¤ÏŒÎ»Î±Ï Î£Î»Î¿Î²ÎµÎ½Î¯Î±Ï‚" + ], + "SKK": [ + "SKK", + "ΚοÏόνα Σλοβενίας" + ], + "SLL": [ + "SLL", + "Λεόνε ΣιέÏα Λεόνε" + ], + "SOS": [ + "SOS", + "Σελίνι Σομαλίας" + ], + "SRD": [ + "SRD", + "ΔολάÏιο ΣουÏινάμ" + ], + "SRG": [ + "SRG", + "Γκίλντα ΣουÏινάμ" + ], + "SSP": [ + "SSP", + "ΛίÏα Îότιου Σουδάν" + ], + "STD": [ + "STD", + "ÎτόμπÏα Σάο Τομέ και ΠÏίνσιπε" + ], + "SUR": [ + "SUR", + "Σοβιετικό ΡοÏβλι" + ], + "SVC": [ + "SVC", + "Κολόν Ελ ΣαλβαδόÏ" + ], + "SYP": [ + "SYP", + "ΛίÏα ΣυÏίας" + ], + "SZL": [ + "SZL", + "Λιλανγκένι Σουαζιλάνδης" + ], + "THB": [ + "฿", + "Μπατ Ταϊλάνδης" + ], + "TJR": [ + "TJR", + "ΡοÏβλι Τατζικιστάν" + ], + "TJS": [ + "TJS", + "Σομόνι Τατζικιστάν" + ], + "TMM": [ + "TMM", + "Μανάτ ΤουÏκμενιστάν" + ], + "TMT": [ + "TMT", + "Μάνατ ΤουÏκμενιστάν" + ], + "TND": [ + "TND", + "ΔηνάÏιο Τυνησίας" + ], + "TOP": [ + "TOP", + "Παάγκα νήσων Τόγκα" + ], + "TPE": [ + "TPE", + "ΕσκοÏδο ΤιμόÏ" + ], + "TRL": [ + "TRL", + "Παλιά ΛίÏα ΤουÏκίας" + ], + "TRY": [ + "TRY", + "ΛίÏα ΤουÏκίας" + ], + "TTD": [ + "TTD", + "ΔολάÏιο ΤÏινιντάντ και Τομπάγκο" + ], + "TWD": [ + "NT$", + "Îέο δολάÏιο Ταϊβάν" + ], + "TZS": [ + "TZS", + "Σελίνι Τανζανίας" + ], + "UAH": [ + "UAH", + "ΓÏίβνα ΟυκÏανίας" + ], + "UAK": [ + "UAK", + "ΚαÏμποβανέτς ΟυκÏανίας" + ], + "UGS": [ + "UGS", + "Σελίνι Ουγκάντας (1966–1987)" + ], + "UGX": [ + "UGX", + "Σελίνι Ουγκάντας" + ], + "USD": [ + "$", + "ΔολάÏιο ΗΠΑ" + ], + "USN": [ + "USN", + "ΔολάÏιο ΗΠΑ (επόμενη ημέÏα)" + ], + "USS": [ + "USS", + "ΔολάÏιο ΗΠΑ (ίδια ημέÏα)" + ], + "UYP": [ + "UYP", + "Πέσο ΟυÏουγουάης (1975–1993)" + ], + "UYU": [ + "UYU", + "Πέσο ΟυÏουγουάης" + ], + "UZS": [ + "UZS", + "Σομ Ουζμπεκιστάν" + ], + "VEB": [ + "VEB", + "ÎœÏ€Î¿Î»Î¹Î²Î¬Ï Î’ÎµÎ½ÎµÎ¶Î¿Ï…Î­Î»Î±Ï‚ (1871–2008)" + ], + "VEF": [ + "VEF", + "ÎœÏ€Î¿Î»Î¹Î²Î¬Ï Î’ÎµÎ½ÎµÎ¶Î¿Ï…Î­Î»Î±Ï‚" + ], + "VND": [ + "â‚«", + "Îτονγκ Βιετνάμ" + ], + "VUV": [ + "VUV", + "Î’Î±Ï„Î¿Ï Î’Î±Î½Î¿Ï…Î¬Ï„Î¿Ï…" + ], + "WST": [ + "WST", + "Τάλα Σαμόα" + ], + "XAF": [ + "FCFA", + "ΦÏάγκο CFA ΚεντÏικής ΑφÏικής" + ], + "XCD": [ + "EC$", + "ΔολάÏιο Ανατολικής ΚαÏαϊβικής" + ], + "XEU": [ + "XEU", + "ΕυÏωπαϊκή Συναλλαγματική Μονάδα" + ], + "XFO": [ + "XFO", + "ΧÏυσό ΦÏάγκο Γαλλίας" + ], + "XFU": [ + "XFU", + "UIC-ΦÏάγκο Γαλλίας" + ], + "XOF": [ + "CFA", + "ΦÏάγκο CFA Δυτικής ΑφÏικής" + ], + "XPF": [ + "CFPF", + "ΦÏάγκο CFP" + ], + "YDD": [ + "YDD", + "ΔηνάÏιο Υεμένης" + ], + "YER": [ + "YER", + "Ριάλ Υεμένης" + ], + "YUD": [ + "YUD", + "Μεταλλικό ΔηνάÏιο Γιουγκοσλαβίας" + ], + "YUM": [ + "YUM", + "Îέο ΔηνάÏιο Γιουγκοσλαβίας" + ], + "YUN": [ + "YUN", + "ΜετατÏέψιμο ΔηνάÏιο Γιουγκοσλαβίας" + ], + "ZAL": [ + "ZAL", + "Ραντ Îότιας ΑφÏικής (οικονομικό)" + ], + "ZAR": [ + "ZAR", + "Ραντ Îότιας ΑφÏικής" + ], + "ZMK": [ + "ZMK", + "Κουάνζα ΖαÎÏ (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Κουάτσα Ζάμπιας" + ], + "ZRN": [ + "ZRN", + "Îέο ΖαÎÏ Î–Î±ÎÏ" + ], + "ZRZ": [ + "ZRZ", + "ΖαÎÏ Î–Î±ÎÏ" + ], + "ZWD": [ + "ZWD", + "ΔολάÏιο Ζιμπάμπουε" + ], + "ZWL": [ + "ZWL", + "ΔολάÏιο Ζιμπάμπουε (2009)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en.json new file mode 100644 index 0000000000000000000000000000000000000000..2b92604232a3400674fb36c26430340228c00c22 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.30.50", + "Names": { + "ADP": [ + "ADP", + "Andorran Peseta" + ], + "AED": [ + "AED", + "United Arab Emirates Dirham" + ], + "AFA": [ + "AFA", + "Afghan Afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "Afghan Afghani" + ], + "ALK": [ + "ALK", + "Albanian Lek (1946–1965)" + ], + "ALL": [ + "ALL", + "Albanian Lek" + ], + "AMD": [ + "AMD", + "Armenian Dram" + ], + "ANG": [ + "ANG", + "Netherlands Antillean Guilder" + ], + "AOA": [ + "AOA", + "Angolan Kwanza" + ], + "AOK": [ + "AOK", + "Angolan Kwanza (1977–1991)" + ], + "AON": [ + "AON", + "Angolan New Kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angolan Readjusted Kwanza (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentine Austral" + ], + "ARL": [ + "ARL", + "Argentine Peso Ley (1970–1983)" + ], + "ARM": [ + "ARM", + "Argentine Peso (1881–1970)" + ], + "ARP": [ + "ARP", + "Argentine Peso (1983–1985)" + ], + "ARS": [ + "ARS", + "Argentine Peso" + ], + "ATS": [ + "ATS", + "Austrian Schilling" + ], + "AUD": [ + "A$", + "Australian Dollar" + ], + "AWG": [ + "AWG", + "Aruban Florin" + ], + "AZM": [ + "AZM", + "Azerbaijani Manat (1993–2006)" + ], + "AZN": [ + "AZN", + "Azerbaijani Manat" + ], + "BAD": [ + "BAD", + "Bosnia-Herzegovina Dinar (1992–1994)" + ], + "BAM": [ + "BAM", + "Bosnia-Herzegovina Convertible Mark" + ], + "BAN": [ + "BAN", + "Bosnia-Herzegovina New Dinar (1994–1997)" + ], + "BBD": [ + "BBD", + "Barbadian Dollar" + ], + "BDT": [ + "BDT", + "Bangladeshi Taka" + ], + "BEC": [ + "BEC", + "Belgian Franc (convertible)" + ], + "BEF": [ + "BEF", + "Belgian Franc" + ], + "BEL": [ + "BEL", + "Belgian Franc (financial)" + ], + "BGL": [ + "BGL", + "Bulgarian Hard Lev" + ], + "BGM": [ + "BGM", + "Bulgarian Socialist Lev" + ], + "BGN": [ + "BGN", + "Bulgarian Lev" + ], + "BGO": [ + "BGO", + "Bulgarian Lev (1879–1952)" + ], + "BHD": [ + "BHD", + "Bahraini Dinar" + ], + "BIF": [ + "BIF", + "Burundian Franc" + ], + "BMD": [ + "BMD", + "Bermudan Dollar" + ], + "BND": [ + "BND", + "Brunei Dollar" + ], + "BOB": [ + "BOB", + "Bolivian Boliviano" + ], + "BOL": [ + "BOL", + "Bolivian Boliviano (1863–1963)" + ], + "BOP": [ + "BOP", + "Bolivian Peso" + ], + "BOV": [ + "BOV", + "Bolivian Mvdol" + ], + "BRB": [ + "BRB", + "Brazilian New Cruzeiro (1967–1986)" + ], + "BRC": [ + "BRC", + "Brazilian Cruzado (1986–1989)" + ], + "BRE": [ + "BRE", + "Brazilian Cruzeiro (1990–1993)" + ], + "BRL": [ + "R$", + "Brazilian Real" + ], + "BRN": [ + "BRN", + "Brazilian New Cruzado (1989–1990)" + ], + "BRR": [ + "BRR", + "Brazilian Cruzeiro (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Brazilian Cruzeiro (1942–1967)" + ], + "BSD": [ + "BSD", + "Bahamian Dollar" + ], + "BTN": [ + "BTN", + "Bhutanese Ngultrum" + ], + "BUK": [ + "BUK", + "Burmese Kyat" + ], + "BWP": [ + "BWP", + "Botswanan Pula" + ], + "BYB": [ + "BYB", + "Belarusian Ruble (1994–1999)" + ], + "BYN": [ + "BYN", + "Belarusian Ruble" + ], + "BYR": [ + "BYR", + "Belarusian Ruble (2000–2016)" + ], + "BZD": [ + "BZD", + "Belize Dollar" + ], + "CAD": [ + "CA$", + "Canadian Dollar" + ], + "CDF": [ + "CDF", + "Congolese Franc" + ], + "CHE": [ + "CHE", + "WIR Euro" + ], + "CHF": [ + "CHF", + "Swiss Franc" + ], + "CHW": [ + "CHW", + "WIR Franc" + ], + "CLE": [ + "CLE", + "Chilean Escudo" + ], + "CLF": [ + "CLF", + "Chilean Unit of Account (UF)" + ], + "CLP": [ + "CLP", + "Chilean Peso" + ], + "CNX": [ + "CNX", + "Chinese People’s Bank Dollar" + ], + "CNY": [ + "CNÂ¥", + "Chinese Yuan" + ], + "COP": [ + "COP", + "Colombian Peso" + ], + "COU": [ + "COU", + "Colombian Real Value Unit" + ], + "CRC": [ + "CRC", + "Costa Rican Colón" + ], + "CSD": [ + "CSD", + "Serbian Dinar (2002–2006)" + ], + "CSK": [ + "CSK", + "Czechoslovak Hard Koruna" + ], + "CUC": [ + "CUC", + "Cuban Convertible Peso" + ], + "CUP": [ + "CUP", + "Cuban Peso" + ], + "CVE": [ + "CVE", + "Cape Verdean Escudo" + ], + "CYP": [ + "CYP", + "Cypriot Pound" + ], + "CZK": [ + "CZK", + "Czech Republic Koruna" + ], + "DDM": [ + "DDM", + "East German Mark" + ], + "DEM": [ + "DEM", + "German Mark" + ], + "DJF": [ + "DJF", + "Djiboutian Franc" + ], + "DKK": [ + "DKK", + "Danish Krone" + ], + "DOP": [ + "DOP", + "Dominican Peso" + ], + "DZD": [ + "DZD", + "Algerian Dinar" + ], + "ECS": [ + "ECS", + "Ecuadorian Sucre" + ], + "ECV": [ + "ECV", + "Ecuadorian Unit of Constant Value" + ], + "EEK": [ + "EEK", + "Estonian Kroon" + ], + "EGP": [ + "EGP", + "Egyptian Pound" + ], + "ERN": [ + "ERN", + "Eritrean Nakfa" + ], + "ESA": [ + "ESA", + "Spanish Peseta (A account)" + ], + "ESB": [ + "ESB", + "Spanish Peseta (convertible account)" + ], + "ESP": [ + "ESP", + "Spanish Peseta" + ], + "ETB": [ + "ETB", + "Ethiopian Birr" + ], + "EUR": [ + "€", + "Euro" + ], + "FIM": [ + "FIM", + "Finnish Markka" + ], + "FJD": [ + "FJD", + "Fijian Dollar" + ], + "FKP": [ + "FKP", + "Falkland Islands Pound" + ], + "FRF": [ + "FRF", + "French Franc" + ], + "GBP": [ + "£", + "British Pound" + ], + "GEK": [ + "GEK", + "Georgian Kupon Larit" + ], + "GEL": [ + "GEL", + "Georgian Lari" + ], + "GHC": [ + "GHC", + "Ghanaian Cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "Ghanaian Cedi" + ], + "GIP": [ + "GIP", + "Gibraltar Pound" + ], + "GMD": [ + "GMD", + "Gambian Dalasi" + ], + "GNF": [ + "GNF", + "Guinean Franc" + ], + "GNS": [ + "GNS", + "Guinean Syli" + ], + "GQE": [ + "GQE", + "Equatorial Guinean Ekwele" + ], + "GRD": [ + "GRD", + "Greek Drachma" + ], + "GTQ": [ + "GTQ", + "Guatemalan Quetzal" + ], + "GWE": [ + "GWE", + "Portuguese Guinea Escudo" + ], + "GWP": [ + "GWP", + "Guinea-Bissau Peso" + ], + "GYD": [ + "GYD", + "Guyanaese Dollar" + ], + "HKD": [ + "HK$", + "Hong Kong Dollar" + ], + "HNL": [ + "HNL", + "Honduran Lempira" + ], + "HRD": [ + "HRD", + "Croatian Dinar" + ], + "HRK": [ + "HRK", + "Croatian Kuna" + ], + "HTG": [ + "HTG", + "Haitian Gourde" + ], + "HUF": [ + "HUF", + "Hungarian Forint" + ], + "IDR": [ + "IDR", + "Indonesian Rupiah" + ], + "IEP": [ + "IEP", + "Irish Pound" + ], + "ILP": [ + "ILP", + "Israeli Pound" + ], + "ILR": [ + "ILR", + "Israeli Shekel (1980–1985)" + ], + "ILS": [ + "₪", + "Israeli New Shekel" + ], + "INR": [ + "₹", + "Indian Rupee" + ], + "IQD": [ + "IQD", + "Iraqi Dinar" + ], + "IRR": [ + "IRR", + "Iranian Rial" + ], + "ISJ": [ + "ISJ", + "Icelandic Króna (1918–1981)" + ], + "ISK": [ + "ISK", + "Icelandic Króna" + ], + "ITL": [ + "ITL", + "Italian Lira" + ], + "JMD": [ + "JMD", + "Jamaican Dollar" + ], + "JOD": [ + "JOD", + "Jordanian Dinar" + ], + "JPY": [ + "Â¥", + "Japanese Yen" + ], + "KES": [ + "KES", + "Kenyan Shilling" + ], + "KGS": [ + "KGS", + "Kyrgystani Som" + ], + "KHR": [ + "KHR", + "Cambodian Riel" + ], + "KMF": [ + "KMF", + "Comorian Franc" + ], + "KPW": [ + "KPW", + "North Korean Won" + ], + "KRH": [ + "KRH", + "South Korean Hwan (1953–1962)" + ], + "KRO": [ + "KRO", + "South Korean Won (1945–1953)" + ], + "KRW": [ + "â‚©", + "South Korean Won" + ], + "KWD": [ + "KWD", + "Kuwaiti Dinar" + ], + "KYD": [ + "KYD", + "Cayman Islands Dollar" + ], + "KZT": [ + "KZT", + "Kazakhstani Tenge" + ], + "LAK": [ + "LAK", + "Laotian Kip" + ], + "LBP": [ + "LBP", + "Lebanese Pound" + ], + "LKR": [ + "LKR", + "Sri Lankan Rupee" + ], + "LRD": [ + "LRD", + "Liberian Dollar" + ], + "LSL": [ + "LSL", + "Lesotho Loti" + ], + "LTL": [ + "LTL", + "Lithuanian Litas" + ], + "LTT": [ + "LTT", + "Lithuanian Talonas" + ], + "LUC": [ + "LUC", + "Luxembourgian Convertible Franc" + ], + "LUF": [ + "LUF", + "Luxembourgian Franc" + ], + "LUL": [ + "LUL", + "Luxembourg Financial Franc" + ], + "LVL": [ + "LVL", + "Latvian Lats" + ], + "LVR": [ + "LVR", + "Latvian Ruble" + ], + "LYD": [ + "LYD", + "Libyan Dinar" + ], + "MAD": [ + "MAD", + "Moroccan Dirham" + ], + "MAF": [ + "MAF", + "Moroccan Franc" + ], + "MCF": [ + "MCF", + "Monegasque Franc" + ], + "MDC": [ + "MDC", + "Moldovan Cupon" + ], + "MDL": [ + "MDL", + "Moldovan Leu" + ], + "MGA": [ + "MGA", + "Malagasy Ariary" + ], + "MGF": [ + "MGF", + "Malagasy Franc" + ], + "MKD": [ + "MKD", + "Macedonian Denar" + ], + "MKN": [ + "MKN", + "Macedonian Denar (1992–1993)" + ], + "MLF": [ + "MLF", + "Malian Franc" + ], + "MMK": [ + "MMK", + "Myanmar Kyat" + ], + "MNT": [ + "MNT", + "Mongolian Tugrik" + ], + "MOP": [ + "MOP", + "Macanese Pataca" + ], + "MRO": [ + "MRO", + "Mauritanian Ouguiya" + ], + "MTL": [ + "MTL", + "Maltese Lira" + ], + "MTP": [ + "MTP", + "Maltese Pound" + ], + "MUR": [ + "MUR", + "Mauritian Rupee" + ], + "MVP": [ + "MVP", + "Maldivian Rupee (1947–1981)" + ], + "MVR": [ + "MVR", + "Maldivian Rufiyaa" + ], + "MWK": [ + "MWK", + "Malawian Kwacha" + ], + "MXN": [ + "MX$", + "Mexican Peso" + ], + "MXP": [ + "MXP", + "Mexican Silver Peso (1861–1992)" + ], + "MXV": [ + "MXV", + "Mexican Investment Unit" + ], + "MYR": [ + "MYR", + "Malaysian Ringgit" + ], + "MZE": [ + "MZE", + "Mozambican Escudo" + ], + "MZM": [ + "MZM", + "Mozambican Metical (1980–2006)" + ], + "MZN": [ + "MZN", + "Mozambican Metical" + ], + "NAD": [ + "NAD", + "Namibian Dollar" + ], + "NGN": [ + "NGN", + "Nigerian Naira" + ], + "NIC": [ + "NIC", + "Nicaraguan Córdoba (1988–1991)" + ], + "NIO": [ + "NIO", + "Nicaraguan Córdoba" + ], + "NLG": [ + "NLG", + "Dutch Guilder" + ], + "NOK": [ + "NOK", + "Norwegian Krone" + ], + "NPR": [ + "NPR", + "Nepalese Rupee" + ], + "NZD": [ + "NZ$", + "New Zealand Dollar" + ], + "OMR": [ + "OMR", + "Omani Rial" + ], + "PAB": [ + "PAB", + "Panamanian Balboa" + ], + "PEI": [ + "PEI", + "Peruvian Inti" + ], + "PEN": [ + "PEN", + "Peruvian Sol" + ], + "PES": [ + "PES", + "Peruvian Sol (1863–1965)" + ], + "PGK": [ + "PGK", + "Papua New Guinean Kina" + ], + "PHP": [ + "PHP", + "Philippine Peso" + ], + "PKR": [ + "PKR", + "Pakistani Rupee" + ], + "PLN": [ + "PLN", + "Polish Zloty" + ], + "PLZ": [ + "PLZ", + "Polish Zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "Portuguese Escudo" + ], + "PYG": [ + "PYG", + "Paraguayan Guarani" + ], + "QAR": [ + "QAR", + "Qatari Rial" + ], + "RHD": [ + "RHD", + "Rhodesian Dollar" + ], + "ROL": [ + "ROL", + "Romanian Leu (1952–2006)" + ], + "RON": [ + "RON", + "Romanian Leu" + ], + "RSD": [ + "RSD", + "Serbian Dinar" + ], + "RUB": [ + "RUB", + "Russian Ruble" + ], + "RUR": [ + "RUR", + "Russian Ruble (1991–1998)" + ], + "RWF": [ + "RWF", + "Rwandan Franc" + ], + "SAR": [ + "SAR", + "Saudi Riyal" + ], + "SBD": [ + "SBD", + "Solomon Islands Dollar" + ], + "SCR": [ + "SCR", + "Seychellois Rupee" + ], + "SDD": [ + "SDD", + "Sudanese Dinar (1992–2007)" + ], + "SDG": [ + "SDG", + "Sudanese Pound" + ], + "SDP": [ + "SDP", + "Sudanese Pound (1957–1998)" + ], + "SEK": [ + "SEK", + "Swedish Krona" + ], + "SGD": [ + "SGD", + "Singapore Dollar" + ], + "SHP": [ + "SHP", + "St. Helena Pound" + ], + "SIT": [ + "SIT", + "Slovenian Tolar" + ], + "SKK": [ + "SKK", + "Slovak Koruna" + ], + "SLL": [ + "SLL", + "Sierra Leonean Leone" + ], + "SOS": [ + "SOS", + "Somali Shilling" + ], + "SRD": [ + "SRD", + "Surinamese Dollar" + ], + "SRG": [ + "SRG", + "Surinamese Guilder" + ], + "SSP": [ + "SSP", + "South Sudanese Pound" + ], + "STD": [ + "STD", + "São Tomé & Príncipe Dobra" + ], + "SUR": [ + "SUR", + "Soviet Rouble" + ], + "SVC": [ + "SVC", + "Salvadoran Colón" + ], + "SYP": [ + "SYP", + "Syrian Pound" + ], + "SZL": [ + "SZL", + "Swazi Lilangeni" + ], + "THB": [ + "THB", + "Thai Baht" + ], + "TJR": [ + "TJR", + "Tajikistani Ruble" + ], + "TJS": [ + "TJS", + "Tajikistani Somoni" + ], + "TMM": [ + "TMM", + "Turkmenistani Manat (1993–2009)" + ], + "TMT": [ + "TMT", + "Turkmenistani Manat" + ], + "TND": [ + "TND", + "Tunisian Dinar" + ], + "TOP": [ + "TOP", + "Tongan PaÊ»anga" + ], + "TPE": [ + "TPE", + "Timorese Escudo" + ], + "TRL": [ + "TRL", + "Turkish Lira (1922–2005)" + ], + "TRY": [ + "TRY", + "Turkish Lira" + ], + "TTD": [ + "TTD", + "Trinidad & Tobago Dollar" + ], + "TWD": [ + "NT$", + "New Taiwan Dollar" + ], + "TZS": [ + "TZS", + "Tanzanian Shilling" + ], + "UAH": [ + "UAH", + "Ukrainian Hryvnia" + ], + "UAK": [ + "UAK", + "Ukrainian Karbovanets" + ], + "UGS": [ + "UGS", + "Ugandan Shilling (1966–1987)" + ], + "UGX": [ + "UGX", + "Ugandan Shilling" + ], + "USD": [ + "$", + "US Dollar" + ], + "USN": [ + "USN", + "US Dollar (Next day)" + ], + "USS": [ + "USS", + "US Dollar (Same day)" + ], + "UYI": [ + "UYI", + "Uruguayan Peso (Indexed Units)" + ], + "UYP": [ + "UYP", + "Uruguayan Peso (1975–1993)" + ], + "UYU": [ + "UYU", + "Uruguayan Peso" + ], + "UZS": [ + "UZS", + "Uzbekistani Som" + ], + "VEB": [ + "VEB", + "Venezuelan Bolívar (1871–2008)" + ], + "VEF": [ + "VEF", + "Venezuelan Bolívar" + ], + "VND": [ + "â‚«", + "Vietnamese Dong" + ], + "VNN": [ + "VNN", + "Vietnamese Dong (1978–1985)" + ], + "VUV": [ + "VUV", + "Vanuatu Vatu" + ], + "WST": [ + "WST", + "Samoan Tala" + ], + "XAF": [ + "FCFA", + "Central African CFA Franc" + ], + "XCD": [ + "EC$", + "East Caribbean Dollar" + ], + "XEU": [ + "XEU", + "European Currency Unit" + ], + "XFO": [ + "XFO", + "French Gold Franc" + ], + "XFU": [ + "XFU", + "French UIC-Franc" + ], + "XOF": [ + "CFA", + "West African CFA Franc" + ], + "XPF": [ + "CFPF", + "CFP Franc" + ], + "XRE": [ + "XRE", + "RINET Funds" + ], + "YDD": [ + "YDD", + "Yemeni Dinar" + ], + "YER": [ + "YER", + "Yemeni Rial" + ], + "YUD": [ + "YUD", + "Yugoslavian Hard Dinar (1966–1990)" + ], + "YUM": [ + "YUM", + "Yugoslavian New Dinar (1994–2002)" + ], + "YUN": [ + "YUN", + "Yugoslavian Convertible Dinar (1990–1992)" + ], + "YUR": [ + "YUR", + "Yugoslavian Reformed Dinar (1992–1993)" + ], + "ZAL": [ + "ZAL", + "South African Rand (financial)" + ], + "ZAR": [ + "ZAR", + "South African Rand" + ], + "ZMK": [ + "ZMK", + "Zambian Kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambian Kwacha" + ], + "ZRN": [ + "ZRN", + "Zairean New Zaire (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zairean Zaire (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Zimbabwean Dollar (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Zimbabwean Dollar (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabwean Dollar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_001.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_001.json new file mode 100644 index 0000000000000000000000000000000000000000..383bec0dd4302f916263a9d8ce7b3e7480532516 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_001.json @@ -0,0 +1,41 @@ +{ + "Version": "2.1.29.54", + "Names": { + "BYB": [ + "BYB", + "Belarusian New Rouble (1994–1999)" + ], + "BYN": [ + "BYN", + "Belarusian Rouble" + ], + "BYR": [ + "BYR", + "Belarusian Rouble (2000–2016)" + ], + "JPY": [ + "JPÂ¥", + "Japanese Yen" + ], + "LVR": [ + "LVR", + "Latvian Rouble" + ], + "RUB": [ + "RUB", + "Russian Rouble" + ], + "RUR": [ + "RUR", + "Russian Rouble (1991–1998)" + ], + "TJR": [ + "TJR", + "Tajikistani Rouble" + ], + "USD": [ + "US$", + "US Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_150.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_150.json new file mode 100644 index 0000000000000000000000000000000000000000..aaa978c699d54e6c83f16b19795b5921b0fe8543 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_150.json @@ -0,0 +1,10 @@ +{ + "Version": "2.1.27.40", + "Names": { + "EUR": [ + "€", + "Euro", + {} + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_AG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_AG.json new file mode 100644 index 0000000000000000000000000000000000000000..32edaa85a276af6cbdd79d7b804490c1449625d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_AG.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "XCD": [ + "$", + "East Caribbean Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_AI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_AI.json new file mode 100644 index 0000000000000000000000000000000000000000..32edaa85a276af6cbdd79d7b804490c1449625d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_AI.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "XCD": [ + "$", + "East Caribbean Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_AU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_AU.json new file mode 100644 index 0000000000000000000000000000000000000000..90005dac4ea0a9d7d9bfacbfc36e3a7473157adf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_AU.json @@ -0,0 +1,117 @@ +{ + "Version": "2.1.30.50", + "Names": { + "AUD": [ + "$", + "Australian Dollar" + ], + "BAM": [ + "BAM", + "Bosnia-Herzegovina Convertible Marka" + ], + "BBD": [ + "BBD", + "Barbados Dollar" + ], + "BMD": [ + "BMD", + "Bermuda Dollar" + ], + "BOB": [ + "BOB", + "Boliviano" + ], + "BRL": [ + "BRL", + "Brazilian Real" + ], + "CAD": [ + "CAD", + "Canadian Dollar" + ], + "CNY": [ + "CNY", + "Chinese Yuan" + ], + "EUR": [ + "EUR", + "Euro" + ], + "GBP": [ + "GBP", + "British Pound" + ], + "HKD": [ + "HKD", + "Hong Kong Dollar" + ], + "ILS": [ + "ILS", + "Israeli Shekel" + ], + "INR": [ + "INR", + "Indian Rupee" + ], + "JPY": [ + "JPY", + "Japanese Yen" + ], + "KRW": [ + "KRW", + "South Korean Won" + ], + "MXN": [ + "MXN", + "Mexican Peso" + ], + "NZD": [ + "NZD", + "New Zealand Dollar" + ], + "QAR": [ + "QAR", + "Qatari Riyal" + ], + "SCR": [ + "Rs", + "Seychellois Rupee" + ], + "SRD": [ + "SRD", + "Suriname Dollar" + ], + "TWD": [ + "TWD", + "New Taiwan Dollar" + ], + "USD": [ + "USD", + "US Dollar" + ], + "UYU": [ + "UYU", + "Peso Uruguayo" + ], + "VND": [ + "VND", + "Vietnamese Dong" + ], + "XAF": [ + "XAF", + "Central African CFA Franc" + ], + "XCD": [ + "XCD", + "East Caribbean Dollar" + ], + "XOF": [ + "XOF", + "West African CFA Franc" + ], + "XPF": [ + "CFP", + "CFP Franc" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BB.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BB.json new file mode 100644 index 0000000000000000000000000000000000000000..e7504e19871614192e23f072630c0600b208f1fb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BB.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BBD": [ + "$", + "Barbadian Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BI.json new file mode 100644 index 0000000000000000000000000000000000000000..c636cfa64ebfa10bd951748ff64a57a0fbd03e45 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BI.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BIF": [ + "FBu", + "Burundian Franc" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BM.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BM.json new file mode 100644 index 0000000000000000000000000000000000000000..bfd06409e56653ef782c9635dbbb2cd3ecd621cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BM.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BMD": [ + "$", + "Bermudan Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BS.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BS.json new file mode 100644 index 0000000000000000000000000000000000000000..a6f081f1d0bf2b6320ef090a65c7a0241293fcec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BS.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BSD": [ + "$", + "Bahamian Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BW.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BW.json new file mode 100644 index 0000000000000000000000000000000000000000..79f2b161af575862cd4c8b82f0114b9cf0462744 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BW.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.65", + "Names": { + "BWP": [ + "P", + "Botswanan Pula" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BZ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BZ.json new file mode 100644 index 0000000000000000000000000000000000000000..24863a34b623203c300254d452697d85b2b07cac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_BZ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BZD": [ + "$", + "Belize Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_CA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_CA.json new file mode 100644 index 0000000000000000000000000000000000000000..7600970fba5a55f328a8eb1f49e9d7a38c6d04b0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_CA.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.29.54", + "Names": { + "CAD": [ + "$", + "Canadian Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_CC.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_CC.json new file mode 100644 index 0000000000000000000000000000000000000000..f2a61228e27fcc1b04a6787846bf12f62349efc8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_CC.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AUD": [ + "$", + "Australian Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_CK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_CK.json new file mode 100644 index 0000000000000000000000000000000000000000..db55329e58a3582994ee8fc35ca5f074348c55f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_CK.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "NZD": [ + "$", + "New Zealand Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_CX.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_CX.json new file mode 100644 index 0000000000000000000000000000000000000000..f2a61228e27fcc1b04a6787846bf12f62349efc8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_CX.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AUD": [ + "$", + "Australian Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_DK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_DK.json new file mode 100644 index 0000000000000000000000000000000000000000..f90fcb13d6e44a139dabee3c76fc987d8f5a6fa7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_DK.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "DKK": [ + "kr.", + "Danish Krone" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_DM.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_DM.json new file mode 100644 index 0000000000000000000000000000000000000000..32edaa85a276af6cbdd79d7b804490c1449625d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_DM.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "XCD": [ + "$", + "East Caribbean Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_ER.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_ER.json new file mode 100644 index 0000000000000000000000000000000000000000..10fb31aab03d6df5e250e9b73daee43ead362708 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_ER.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ERN": [ + "Nfk", + "Eritrean Nakfa" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_FJ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_FJ.json new file mode 100644 index 0000000000000000000000000000000000000000..204c7daa0242253abedc43223e5b7adf58931825 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_FJ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "FJD": [ + "$", + "Fijian Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_FK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_FK.json new file mode 100644 index 0000000000000000000000000000000000000000..882f3755ce4993ccddb1fdba8e6faff9e22f434c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_FK.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "FKP": [ + "£", + "Falkland Islands Pound" + ], + "GBP": [ + "GB£", + "British Pound" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GD.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GD.json new file mode 100644 index 0000000000000000000000000000000000000000..32edaa85a276af6cbdd79d7b804490c1449625d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GD.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "XCD": [ + "$", + "East Caribbean Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GG.json new file mode 100644 index 0000000000000000000000000000000000000000..67841c1b1e9bddd0e742efaaa02f4062f8229e5d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GG.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GBP": [ + "£", + "UK Pound" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GH.json new file mode 100644 index 0000000000000000000000000000000000000000..9de2f541c513a596cd86763a2813a04e916c53a5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GH.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GHS": [ + "GH₵", + "Ghanaian Cedi" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GI.json new file mode 100644 index 0000000000000000000000000000000000000000..bd274821787cfe42c5fecac6586ae9df7cceee74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GI.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GBP": [ + "GB£", + "British Pound" + ], + "GIP": [ + "£", + "Gibraltar Pound" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GM.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GM.json new file mode 100644 index 0000000000000000000000000000000000000000..1bb59cb7d2128d37a60cb2cd9ae56faf686bc1c3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GM.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GMD": [ + "D", + "Gambian Dalasi" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GY.json new file mode 100644 index 0000000000000000000000000000000000000000..8d52977729bf1964224351d9877d76d2b53b3bf6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_GY.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GYD": [ + "$", + "Guyanaese Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_IM.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_IM.json new file mode 100644 index 0000000000000000000000000000000000000000..67841c1b1e9bddd0e742efaaa02f4062f8229e5d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_IM.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GBP": [ + "£", + "UK Pound" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_JE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_JE.json new file mode 100644 index 0000000000000000000000000000000000000000..67841c1b1e9bddd0e742efaaa02f4062f8229e5d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_JE.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GBP": [ + "£", + "UK Pound" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_JM.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_JM.json new file mode 100644 index 0000000000000000000000000000000000000000..fa6d0c13b945eabe7ed77993a9ba4cc624713867 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_JM.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "JMD": [ + "$", + "Jamaican Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_KE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_KE.json new file mode 100644 index 0000000000000000000000000000000000000000..710f37837d4000c99cd6a0c487ef3e709ef11926 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_KE.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "KES": [ + "Ksh", + "Kenyan Shilling" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_KI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_KI.json new file mode 100644 index 0000000000000000000000000000000000000000..f2a61228e27fcc1b04a6787846bf12f62349efc8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_KI.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AUD": [ + "$", + "Australian Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_KN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_KN.json new file mode 100644 index 0000000000000000000000000000000000000000..32edaa85a276af6cbdd79d7b804490c1449625d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_KN.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "XCD": [ + "$", + "East Caribbean Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_KY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_KY.json new file mode 100644 index 0000000000000000000000000000000000000000..eae7f2b2fb1b14aca5912e9df815d97a8294f6ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_KY.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "KYD": [ + "$", + "Cayman Islands Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_LC.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_LC.json new file mode 100644 index 0000000000000000000000000000000000000000..32edaa85a276af6cbdd79d7b804490c1449625d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_LC.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "XCD": [ + "$", + "East Caribbean Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_LR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_LR.json new file mode 100644 index 0000000000000000000000000000000000000000..8cafa650478699f0090b2d2baa22d46ef5af24e1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_LR.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "LRD": [ + "$", + "Liberian Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_LS.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_LS.json new file mode 100644 index 0000000000000000000000000000000000000000..19966d0715fdaf2b9a552b07cb9a834a64bc8cfe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_LS.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ZAR": [ + "R", + "South African Rand" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MG.json new file mode 100644 index 0000000000000000000000000000000000000000..cd23e7522282c2d55936d721a3b0b3be71675100 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MG.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MGA": [ + "Ar", + "Malagasy Ariary" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MO.json new file mode 100644 index 0000000000000000000000000000000000000000..6f3d5afb534262100984fd8feb88c4c117d96dda --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MO.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MOP": [ + "MOP$", + "Macanese Pataca" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MS.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MS.json new file mode 100644 index 0000000000000000000000000000000000000000..32edaa85a276af6cbdd79d7b804490c1449625d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MS.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "XCD": [ + "$", + "East Caribbean Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MT.json new file mode 100644 index 0000000000000000000000000000000000000000..97e75549220448205771e867cb053822acee8d9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MT.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GBP": [ + "GB£", + "British Pound" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MU.json new file mode 100644 index 0000000000000000000000000000000000000000..0e9cd08c28dbc9484df6b91b51ebafa0ddcde375 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MU.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MUR": [ + "Rs", + "Mauritian Rupee" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MW.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MW.json new file mode 100644 index 0000000000000000000000000000000000000000..496b75db8a32c50d8281a9b04ab1fbbc30a455f8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MW.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MWK": [ + "MK", + "Malawian Kwacha" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MY.json new file mode 100644 index 0000000000000000000000000000000000000000..fd4998eacf411b6c36434342c428400480d6a5f2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_MY.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MYR": [ + "RM", + "Malaysian Ringgit" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NA.json new file mode 100644 index 0000000000000000000000000000000000000000..ca517971a7d44f6f0f31e3dad1956303970fb382 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NA.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "NAD": [ + "$", + "Namibian Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NF.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NF.json new file mode 100644 index 0000000000000000000000000000000000000000..f2a61228e27fcc1b04a6787846bf12f62349efc8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NF.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AUD": [ + "$", + "Australian Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NG.json new file mode 100644 index 0000000000000000000000000000000000000000..b61270d84c036f8d13673928c30b247315e7f4e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NG.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "NGN": [ + "₦", + "Nigerian Naira" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NH.json new file mode 100644 index 0000000000000000000000000000000000000000..4a64e4e1ff554524b4fa6e6c1d44d2647a1b03c0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NH.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "VUV": [ + "VT", + "Vanuatu Vatu" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NR.json new file mode 100644 index 0000000000000000000000000000000000000000..f2a61228e27fcc1b04a6787846bf12f62349efc8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NR.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AUD": [ + "$", + "Australian Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NU.json new file mode 100644 index 0000000000000000000000000000000000000000..db55329e58a3582994ee8fc35ca5f074348c55f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NU.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "NZD": [ + "$", + "New Zealand Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NZ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NZ.json new file mode 100644 index 0000000000000000000000000000000000000000..db55329e58a3582994ee8fc35ca5f074348c55f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_NZ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "NZD": [ + "$", + "New Zealand Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_PG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_PG.json new file mode 100644 index 0000000000000000000000000000000000000000..8647b20b3e02b77b30384ebd1441182002a412be --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_PG.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "PGK": [ + "K", + "Papua New Guinean Kina" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_PH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_PH.json new file mode 100644 index 0000000000000000000000000000000000000000..7d1a41586a0c85b83a49c7c1b0df91a116331f07 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_PH.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "PHP": [ + "₱", + "Philippine Peso" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_PK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_PK.json new file mode 100644 index 0000000000000000000000000000000000000000..99c4235a2d63cab9fa92f5ec84013189885bb38a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_PK.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "PKR": [ + "Rs", + "Pakistani Rupee" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_PN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_PN.json new file mode 100644 index 0000000000000000000000000000000000000000..db55329e58a3582994ee8fc35ca5f074348c55f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_PN.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "NZD": [ + "$", + "New Zealand Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_RW.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_RW.json new file mode 100644 index 0000000000000000000000000000000000000000..c46230dd4a526a57953f07676f93eed000a47877 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_RW.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "RWF": [ + "RF", + "Rwandan Franc" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SB.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SB.json new file mode 100644 index 0000000000000000000000000000000000000000..a344e1cdfd869ecfb52959a09d277211bc266771 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SB.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "SBD": [ + "$", + "Solomon Islands Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SC.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SC.json new file mode 100644 index 0000000000000000000000000000000000000000..3451c073556b3516620436906d63273ce6fda2bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SC.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "SCR": [ + "SR", + "Seychellois Rupee" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SE.json new file mode 100644 index 0000000000000000000000000000000000000000..f15c55cc918f3b715892eb422c7770166d5bdea8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SE.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "SEK": [ + "kr", + "Swedish Krona" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SG.json new file mode 100644 index 0000000000000000000000000000000000000000..3145fcec6249364d9ebd05b8727d386339a7ee89 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SG.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.29.54", + "Names": { + "SGD": [ + "$", + "Singapore Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SH.json new file mode 100644 index 0000000000000000000000000000000000000000..cdd3dd090279176565723bdcb7fea74c3dd90a27 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SH.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GBP": [ + "GB£", + "British Pound" + ], + "SHP": [ + "£", + "St. Helena Pound" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SL.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SL.json new file mode 100644 index 0000000000000000000000000000000000000000..33502fa2172b0935e08ba32144725cd95fc9fb3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SL.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "SLL": [ + "Le", + "Sierra Leonean Leone" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SS.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SS.json new file mode 100644 index 0000000000000000000000000000000000000000..bf7bb3768eade6f4024b4b427168c7bcd85dfc35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SS.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GBP": [ + "GB£", + "British Pound" + ], + "SSP": [ + "£", + "South Sudanese Pound" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SX.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SX.json new file mode 100644 index 0000000000000000000000000000000000000000..874938b5fd5b66c51e2c5b870eef9f7c1cb44db0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SX.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ANG": [ + "NAf.", + "Netherlands Antillean Guilder" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SZ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SZ.json new file mode 100644 index 0000000000000000000000000000000000000000..1dbee9b29007db9c6e014059039b86d2f95392cc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_SZ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "SZL": [ + "E", + "Swazi Lilangeni" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TK.json new file mode 100644 index 0000000000000000000000000000000000000000..db55329e58a3582994ee8fc35ca5f074348c55f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TK.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "NZD": [ + "$", + "New Zealand Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TO.json new file mode 100644 index 0000000000000000000000000000000000000000..5d23a66641aa5cbbab2d0e2e51c58b8174fc1e66 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TO.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "TOP": [ + "T$", + "Tongan PaÊ»anga" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TT.json new file mode 100644 index 0000000000000000000000000000000000000000..10586b530bb49e636c569bdeac0c7c9a01c874be --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TT.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "TTD": [ + "$", + "Trinidad & Tobago Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TV.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TV.json new file mode 100644 index 0000000000000000000000000000000000000000..f2a61228e27fcc1b04a6787846bf12f62349efc8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TV.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AUD": [ + "$", + "Australian Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TZ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TZ.json new file mode 100644 index 0000000000000000000000000000000000000000..af6a02d05c79971be91559b4a333aa828da70c0b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_TZ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "TZS": [ + "TSh", + "Tanzanian Shilling" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_UG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_UG.json new file mode 100644 index 0000000000000000000000000000000000000000..c9ad30c2ced6721b35b41ffd8d2db9eae78eef47 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_UG.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "UGX": [ + "USh", + "Ugandan Shilling" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_VC.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_VC.json new file mode 100644 index 0000000000000000000000000000000000000000..32edaa85a276af6cbdd79d7b804490c1449625d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_VC.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "XCD": [ + "$", + "East Caribbean Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_VU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_VU.json new file mode 100644 index 0000000000000000000000000000000000000000..4a64e4e1ff554524b4fa6e6c1d44d2647a1b03c0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_VU.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "VUV": [ + "VT", + "Vanuatu Vatu" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_WS.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_WS.json new file mode 100644 index 0000000000000000000000000000000000000000..a551f913ed6f678ff1c6347a24ca5b448cb097e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_WS.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "WST": [ + "WS$", + "Samoan Tala" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_ZA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_ZA.json new file mode 100644 index 0000000000000000000000000000000000000000..95791ea6a4132cca452aadc460c7b60c6d197985 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_ZA.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.64", + "Names": { + "ZAR": [ + "R", + "South African Rand" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_ZM.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_ZM.json new file mode 100644 index 0000000000000000000000000000000000000000..b18306f345e152c8391bb659abdc4bb47ac3f7d4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/en_ZM.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ZMW": [ + "K", + "Zambian Kwacha" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es.json new file mode 100644 index 0000000000000000000000000000000000000000..818b43ec87e6185d6302e118367c3434eaa6fa43 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es.json @@ -0,0 +1,1061 @@ +{ + "Version": "2.1.28.80", + "Names": { + "ADP": [ + "ADP", + "peseta andorrana" + ], + "AED": [ + "AED", + "dírham de los Emiratos Ãrabes Unidos" + ], + "AFA": [ + "AFA", + "afgani (1927–2002)" + ], + "AFN": [ + "AFN", + "afgani" + ], + "ALL": [ + "ALL", + "lek" + ], + "AMD": [ + "AMD", + "dram" + ], + "ANG": [ + "ANG", + "florín de las Antillas Neerlandesas" + ], + "AOA": [ + "AOA", + "kuanza" + ], + "AOK": [ + "AOK", + "kwanza angoleño (1977–1990)" + ], + "AON": [ + "AON", + "nuevo kwanza angoleño (1990–2000)" + ], + "AOR": [ + "AOR", + "kwanza reajustado angoleño (1995–1999)" + ], + "ARA": [ + "ARA", + "austral argentino" + ], + "ARP": [ + "ARP", + "peso argentino (1983–1985)" + ], + "ARS": [ + "ARS", + "peso argentino" + ], + "ATS": [ + "ATS", + "chelín austriaco" + ], + "AUD": [ + "AUD", + "dólar australiano" + ], + "AWG": [ + "AWG", + "florín arubeño" + ], + "AZM": [ + "AZM", + "manat azerí (1993–2006)" + ], + "AZN": [ + "AZN", + "manat azerí" + ], + "BAD": [ + "BAD", + "dinar bosnio" + ], + "BAM": [ + "BAM", + "marco convertible de Bosnia-Herzegovina" + ], + "BBD": [ + "BBD", + "dólar barbadense" + ], + "BDT": [ + "BDT", + "taka" + ], + "BEC": [ + "BEC", + "franco belga (convertible)" + ], + "BEF": [ + "BEF", + "franco belga" + ], + "BEL": [ + "BEL", + "franco belga (financiero)" + ], + "BGL": [ + "BGL", + "lev fuerte búlgaro" + ], + "BGN": [ + "BGN", + "lev búlgaro" + ], + "BHD": [ + "BHD", + "dinar bahreiní" + ], + "BIF": [ + "BIF", + "franco burundés" + ], + "BMD": [ + "BMD", + "dólar de Bermudas" + ], + "BND": [ + "BND", + "dólar bruneano" + ], + "BOB": [ + "BOB", + "boliviano" + ], + "BOP": [ + "BOP", + "peso boliviano" + ], + "BOV": [ + "BOV", + "MVDOL boliviano" + ], + "BRB": [ + "BRB", + "nuevo cruceiro brasileño (1967–1986)" + ], + "BRC": [ + "BRC", + "cruzado brasileño" + ], + "BRE": [ + "BRE", + "cruceiro brasileño (1990–1993)" + ], + "BRL": [ + "BRL", + "real brasileño" + ], + "BRN": [ + "BRN", + "nuevo cruzado brasileño" + ], + "BRR": [ + "BRR", + "cruceiro brasileño" + ], + "BSD": [ + "BSD", + "dólar bahameño" + ], + "BTN": [ + "BTN", + "gultrum" + ], + "BUK": [ + "BUK", + "kyat birmano" + ], + "BWP": [ + "BWP", + "pula" + ], + "BYB": [ + "BYB", + "nuevo rublo bielorruso (1994–1999)" + ], + "BYN": [ + "BYN", + "rublo bielorruso" + ], + "BYR": [ + "BYR", + "rublo bielorruso (2000–2016)" + ], + "BZD": [ + "BZD", + "dólar beliceño" + ], + "CAD": [ + "CA$", + "dólar canadiense" + ], + "CDF": [ + "CDF", + "franco congoleño" + ], + "CHE": [ + "CHE", + "euro WIR" + ], + "CHF": [ + "CHF", + "franco suizo" + ], + "CHW": [ + "CHW", + "franco WIR" + ], + "CLF": [ + "CLF", + "unidad de fomento chilena" + ], + "CLP": [ + "CLP", + "peso chileno" + ], + "CNY": [ + "CNY", + "yuan" + ], + "COP": [ + "COP", + "peso colombiano" + ], + "COU": [ + "COU", + "unidad de valor real colombiana" + ], + "CRC": [ + "CRC", + "colón costarricense" + ], + "CSD": [ + "CSD", + "antiguo dinar serbio" + ], + "CSK": [ + "CSK", + "corona fuerte checoslovaca" + ], + "CUC": [ + "CUC", + "peso cubano convertible" + ], + "CUP": [ + "CUP", + "peso cubano" + ], + "CVE": [ + "CVE", + "escudo de Cabo Verde" + ], + "CYP": [ + "CYP", + "libra chipriota" + ], + "CZK": [ + "CZK", + "corona checa" + ], + "DDM": [ + "DDM", + "ostmark de Alemania del Este" + ], + "DEM": [ + "DEM", + "marco alemán" + ], + "DJF": [ + "DJF", + "franco yibutiano" + ], + "DKK": [ + "DKK", + "corona danesa" + ], + "DOP": [ + "DOP", + "peso dominicano" + ], + "DZD": [ + "DZD", + "dinar argelino" + ], + "ECS": [ + "ECS", + "sucre ecuatoriano" + ], + "ECV": [ + "ECV", + "unidad de valor constante (UVC) ecuatoriana" + ], + "EEK": [ + "EEK", + "corona estonia" + ], + "EGP": [ + "EGP", + "libra egipcia" + ], + "ERN": [ + "ERN", + "nakfa" + ], + "ESA": [ + "ESA", + "peseta española (cuenta A)" + ], + "ESB": [ + "ESB", + "peseta española (cuenta convertible)" + ], + "ESP": [ + "â‚§", + "peseta española" + ], + "ETB": [ + "ETB", + "bir" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "marco finlandés" + ], + "FJD": [ + "FJD", + "dólar fiyiano" + ], + "FKP": [ + "FKP", + "libra malvinense" + ], + "FRF": [ + "FRF", + "franco francés" + ], + "GBP": [ + "GBP", + "libra británica" + ], + "GEK": [ + "GEK", + "kupon larit georgiano" + ], + "GEL": [ + "GEL", + "lari" + ], + "GHC": [ + "GHC", + "cedi ghanés (1979–2007)" + ], + "GHS": [ + "GHS", + "cedi" + ], + "GIP": [ + "GIP", + "libra gibraltareña" + ], + "GMD": [ + "GMD", + "dalasi" + ], + "GNF": [ + "GNF", + "franco guineano" + ], + "GNS": [ + "GNS", + "syli guineano" + ], + "GQE": [ + "GQE", + "ekuele de Guinea Ecuatorial" + ], + "GRD": [ + "GRD", + "dracma griego" + ], + "GTQ": [ + "GTQ", + "quetzal guatemalteco" + ], + "GWE": [ + "GWE", + "escudo de Guinea Portuguesa" + ], + "GWP": [ + "GWP", + "peso de Guinea-Bissáu" + ], + "GYD": [ + "GYD", + "dólar guyanés" + ], + "HKD": [ + "HKD", + "dólar hongkonés" + ], + "HNL": [ + "HNL", + "lempira hondureño" + ], + "HRD": [ + "HRD", + "dinar croata" + ], + "HRK": [ + "HRK", + "kuna" + ], + "HTG": [ + "HTG", + "gourde haitiano" + ], + "HUF": [ + "HUF", + "forinto húngaro" + ], + "IDR": [ + "IDR", + "rupia indonesia" + ], + "IEP": [ + "IEP", + "libra irlandesa" + ], + "ILP": [ + "ILP", + "libra israelí" + ], + "ILS": [ + "ILS", + "nuevo séquel israelí" + ], + "INR": [ + "INR", + "rupia india" + ], + "IQD": [ + "IQD", + "dinar iraquí" + ], + "IRR": [ + "IRR", + "rial iraní" + ], + "ISK": [ + "ISK", + "corona islandesa" + ], + "ITL": [ + "ITL", + "lira italiana" + ], + "JMD": [ + "JMD", + "dólar jamaicano" + ], + "JOD": [ + "JOD", + "dinar jordano" + ], + "JPY": [ + "JPY", + "yen" + ], + "KES": [ + "KES", + "chelín keniano" + ], + "KGS": [ + "KGS", + "som" + ], + "KHR": [ + "KHR", + "riel" + ], + "KMF": [ + "KMF", + "franco comorense" + ], + "KPW": [ + "KPW", + "won norcoreano" + ], + "KRW": [ + "KRW", + "won surcoreano" + ], + "KWD": [ + "KWD", + "dinar kuwaití" + ], + "KYD": [ + "KYD", + "dólar de las Islas Caimán" + ], + "KZT": [ + "KZT", + "tenge kazako" + ], + "LAK": [ + "LAK", + "kip" + ], + "LBP": [ + "LBP", + "libra libanesa" + ], + "LKR": [ + "LKR", + "rupia esrilanquesa" + ], + "LRD": [ + "LRD", + "dólar liberiano" + ], + "LSL": [ + "LSL", + "loti lesothense" + ], + "LTL": [ + "LTL", + "litas lituano" + ], + "LTT": [ + "LTT", + "talonas lituano" + ], + "LUC": [ + "LUC", + "franco convertible luxemburgués" + ], + "LUF": [ + "LUF", + "franco luxemburgués" + ], + "LUL": [ + "LUL", + "franco financiero luxemburgués" + ], + "LVL": [ + "LVL", + "lats letón" + ], + "LVR": [ + "LVR", + "rublo letón" + ], + "LYD": [ + "LYD", + "dinar libio" + ], + "MAD": [ + "MAD", + "dírham marroquí" + ], + "MAF": [ + "MAF", + "franco marroquí" + ], + "MDL": [ + "MDL", + "leu moldavo" + ], + "MGA": [ + "MGA", + "ariari" + ], + "MGF": [ + "MGF", + "franco malgache" + ], + "MKD": [ + "MKD", + "dinar macedonio" + ], + "MLF": [ + "MLF", + "franco malí" + ], + "MMK": [ + "MMK", + "kiat" + ], + "MNT": [ + "MNT", + "tugrik" + ], + "MOP": [ + "MOP", + "pataca de Macao" + ], + "MRO": [ + "MRO", + "uguiya" + ], + "MTL": [ + "MTL", + "lira maltesa" + ], + "MTP": [ + "MTP", + "libra maltesa" + ], + "MUR": [ + "MUR", + "rupia mauriciana" + ], + "MVR": [ + "MVR", + "rufiya" + ], + "MWK": [ + "MWK", + "kwacha malauí" + ], + "MXN": [ + "MXN", + "peso mexicano" + ], + "MXP": [ + "MXP", + "peso de plata mexicano (1861–1992)" + ], + "MXV": [ + "MXV", + "unidad de inversión (UDI) mexicana" + ], + "MYR": [ + "MYR", + "ringit" + ], + "MZE": [ + "MZE", + "escudo mozambiqueño" + ], + "MZM": [ + "MZM", + "antiguo metical mozambiqueño" + ], + "MZN": [ + "MZN", + "metical" + ], + "NAD": [ + "NAD", + "dólar namibio" + ], + "NGN": [ + "NGN", + "naira" + ], + "NIC": [ + "NIC", + "córdoba nicaragüense (1988–1991)" + ], + "NIO": [ + "NIO", + "córdoba nicaragüense" + ], + "NLG": [ + "NLG", + "florín neerlandés" + ], + "NOK": [ + "NOK", + "corona noruega" + ], + "NPR": [ + "NPR", + "rupia nepalí" + ], + "NZD": [ + "NZD", + "dólar neozelandés" + ], + "OMR": [ + "OMR", + "rial omaní" + ], + "PAB": [ + "PAB", + "balboa panameño" + ], + "PEI": [ + "PEI", + "inti peruano" + ], + "PEN": [ + "PEN", + "nuevo sol peruano" + ], + "PES": [ + "PES", + "sol peruano (1863–1965)" + ], + "PGK": [ + "PGK", + "kina" + ], + "PHP": [ + "PHP", + "peso filipino" + ], + "PKR": [ + "PKR", + "rupia pakistaní" + ], + "PLN": [ + "PLN", + "esloti" + ], + "PLZ": [ + "PLZ", + "zloty polaco (1950–1995)" + ], + "PTE": [ + "PTE", + "escudo portugués" + ], + "PYG": [ + "PYG", + "guaraní paraguayo" + ], + "QAR": [ + "QAR", + "rial catarí" + ], + "RHD": [ + "RHD", + "dólar rodesiano" + ], + "ROL": [ + "ROL", + "antiguo leu rumano" + ], + "RON": [ + "RON", + "leu rumano" + ], + "RSD": [ + "RSD", + "dinar serbio" + ], + "RUB": [ + "RUB", + "rublo ruso" + ], + "RUR": [ + "RUR", + "rublo ruso (1991–1998)" + ], + "RWF": [ + "RWF", + "franco ruandés" + ], + "SAR": [ + "SAR", + "rial saudí" + ], + "SBD": [ + "SBD", + "dólar salomonense" + ], + "SCR": [ + "SCR", + "rupia seychellense" + ], + "SDD": [ + "SDD", + "dinar sudanés" + ], + "SDG": [ + "SDG", + "libra sudanesa" + ], + "SDP": [ + "SDP", + "libra sudanesa antigua" + ], + "SEK": [ + "SEK", + "corona sueca" + ], + "SGD": [ + "SGD", + "dólar singapurense" + ], + "SHP": [ + "SHP", + "libra de Santa Elena" + ], + "SIT": [ + "SIT", + "tólar esloveno" + ], + "SKK": [ + "SKK", + "corona eslovaca" + ], + "SLL": [ + "SLL", + "leona" + ], + "SOS": [ + "SOS", + "chelín somalí" + ], + "SRD": [ + "SRD", + "dólar surinamés" + ], + "SRG": [ + "SRG", + "florín surinamés" + ], + "SSP": [ + "SSP", + "libra sursudanesa" + ], + "STD": [ + "STD", + "dobra" + ], + "SUR": [ + "SUR", + "rublo soviético" + ], + "SVC": [ + "SVC", + "colón salvadoreño" + ], + "SYP": [ + "SYP", + "libra siria" + ], + "SZL": [ + "SZL", + "lilangeni" + ], + "THB": [ + "฿", + "bat" + ], + "TJR": [ + "TJR", + "rublo tayiko" + ], + "TJS": [ + "TJS", + "somoni tayiko" + ], + "TMM": [ + "TMM", + "manat turcomano (1993–2009)" + ], + "TMT": [ + "TMT", + "manat turcomano" + ], + "TND": [ + "TND", + "dinar tunecino" + ], + "TOP": [ + "TOP", + "paanga" + ], + "TPE": [ + "TPE", + "escudo timorense" + ], + "TRL": [ + "TRL", + "lira turca (1922–2005)" + ], + "TRY": [ + "TRY", + "lira turca" + ], + "TTD": [ + "TTD", + "dólar de Trinidad y Tobago" + ], + "TWD": [ + "TWD", + "nuevo dólar taiwanés" + ], + "TZS": [ + "TZS", + "chelín tanzano" + ], + "UAH": [ + "UAH", + "grivna" + ], + "UAK": [ + "UAK", + "karbovanet ucraniano" + ], + "UGS": [ + "UGS", + "chelín ugandés (1966–1987)" + ], + "UGX": [ + "UGX", + "chelín ugandés" + ], + "USD": [ + "$", + "dólar estadounidense" + ], + "USN": [ + "USN", + "dólar estadounidense (día siguiente)" + ], + "USS": [ + "USS", + "dólar estadounidense (mismo día)" + ], + "UYI": [ + "UYI", + "peso uruguayo en unidades indexadas" + ], + "UYP": [ + "UYP", + "peso uruguayo (1975–1993)" + ], + "UYU": [ + "UYU", + "peso uruguayo" + ], + "UZS": [ + "UZS", + "sum" + ], + "VEB": [ + "VEB", + "bolívar venezolano (1871–2008)" + ], + "VEF": [ + "VEF", + "bolívar venezolano" + ], + "VND": [ + "â‚«", + "dong" + ], + "VUV": [ + "VUV", + "vatu" + ], + "WST": [ + "WST", + "tala" + ], + "XAF": [ + "XAF", + "franco CFA BEAC" + ], + "XCD": [ + "XCD", + "dólar del Caribe Oriental" + ], + "XEU": [ + "XEU", + "unidad de moneda europea" + ], + "XFO": [ + "XFO", + "franco oro francés" + ], + "XFU": [ + "XFU", + "franco UIC francés" + ], + "XOF": [ + "XOF", + "franco CFA BCEAO" + ], + "XPF": [ + "CFPF", + "franco CFP" + ], + "XRE": [ + "XRE", + "fondos RINET" + ], + "YDD": [ + "YDD", + "dinar yemení" + ], + "YER": [ + "YER", + "rial yemení" + ], + "YUD": [ + "YUD", + "dinar fuerte yugoslavo" + ], + "YUM": [ + "YUM", + "super dinar yugoslavo" + ], + "YUN": [ + "YUN", + "dinar convertible yugoslavo" + ], + "ZAL": [ + "ZAL", + "rand sudafricano (financiero)" + ], + "ZAR": [ + "ZAR", + "rand" + ], + "ZMK": [ + "ZMK", + "kwacha zambiano (1968–2012)" + ], + "ZMW": [ + "ZMW", + "kuacha zambiano" + ], + "ZRN": [ + "ZRN", + "nuevo zaire zaireño" + ], + "ZRZ": [ + "ZRZ", + "zaire zaireño" + ], + "ZWD": [ + "ZWD", + "dólar de Zimbabue" + ], + "ZWL": [ + "ZWL", + "dólar zimbabuense" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_419.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_419.json new file mode 100644 index 0000000000000000000000000000000000000000..680c2b688228b5271ff0dc482f6f3551f1899b0f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_419.json @@ -0,0 +1,33 @@ +{ + "Version": "2.1.27.99", + "Names": { + "AMD": [ + "AMD", + "dram armenio" + ], + "CAD": [ + "CAD", + "dólar canadiense" + ], + "ERN": [ + "ERN", + "nafka" + ], + "EUR": [ + "EUR", + "euro" + ], + "THB": [ + "THB", + "bat" + ], + "USD": [ + "USD", + "dólar estadounidense" + ], + "VND": [ + "VND", + "dong" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_AR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_AR.json new file mode 100644 index 0000000000000000000000000000000000000000..d36c2b64feb13a3eb6cc5510e7b575daee9ac2b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_AR.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ARS": [ + "$", + "peso argentino" + ], + "USD": [ + "US$", + "dólar estadounidense" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_BO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_BO.json new file mode 100644 index 0000000000000000000000000000000000000000..657c269e1b626f93df42795fb9c28418c0e388f8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_BO.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BOB": [ + "Bs", + "boliviano" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_BR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_BR.json new file mode 100644 index 0000000000000000000000000000000000000000..81595203751466627b58ac86209f69246e7e4188 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_BR.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BRL": [ + "R$", + "real brasileño" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_CL.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_CL.json new file mode 100644 index 0000000000000000000000000000000000000000..cd6c1a9dd68a1b52777e5a42787ae5e049b4ba42 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_CL.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.99", + "Names": { + "CLP": [ + "$", + "Peso chileno" + ], + "USD": [ + "US$", + "dólar estadounidense" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_CO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_CO.json new file mode 100644 index 0000000000000000000000000000000000000000..0bf0dc8b131044162e4319f7078302118761296a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_CO.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.99", + "Names": { + "COP": [ + "$", + "peso colombiano" + ], + "USD": [ + "US$", + "dólar estadounidense" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_CR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_CR.json new file mode 100644 index 0000000000000000000000000000000000000000..d5ab35788cc62a48ce6b76ab8054a3f6877ef2a9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_CR.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "CRC": [ + "â‚¡", + "colón costarricense" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_CU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_CU.json new file mode 100644 index 0000000000000000000000000000000000000000..0bfa8154ce4835558a3c8624414319fc9d289d0c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_CU.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "CUP": [ + "$", + "peso cubano" + ], + "USD": [ + "US$", + "dólar estadounidense" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_DO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_DO.json new file mode 100644 index 0000000000000000000000000000000000000000..a871eab0ff9fd5c0d2de15d0873b6d3be8d652c4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_DO.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.99", + "Names": { + "DOP": [ + "RD$", + "peso dominicano" + ], + "USD": [ + "US$", + "dólar estadounidense" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_EC.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_EC.json new file mode 100644 index 0000000000000000000000000000000000000000..b61fca480df015635821fbc2e7e0dbe5e48294b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_EC.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "USD": [ + "$", + "dólar estadounidense" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_GQ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_GQ.json new file mode 100644 index 0000000000000000000000000000000000000000..214a1a95e2adee724b12668d3609420d16bbe5a5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_GQ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "XAF": [ + "FCFA", + "franco CFA BEAC" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_GT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_GT.json new file mode 100644 index 0000000000000000000000000000000000000000..95288e4eba565f0f94e3d8e29c6f9e4cb41f2dc1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_GT.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "GTQ": [ + "Q", + "quetzal" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_HN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_HN.json new file mode 100644 index 0000000000000000000000000000000000000000..6d244ad41bacb5f81f61ac503d9ec0296288542b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_HN.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "HNL": [ + "L", + "lempira hondureño" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_MX.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_MX.json new file mode 100644 index 0000000000000000000000000000000000000000..8c891fef63347d54bfcd9e2a64e3416b669358c8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_MX.json @@ -0,0 +1,221 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AFN": [ + "Af", + "afgani afgano" + ], + "ALL": [ + "ALL", + "lek albanés" + ], + "ANG": [ + "Naf", + "florín de las Antillas Neerlandesas" + ], + "AOA": [ + "Kz", + "kwanza angoleño" + ], + "ARS": [ + "$a", + "peso argentino" + ], + "AUD": [ + "AU$", + "dólar australiano" + ], + "AWG": [ + "Afl.", + "florín arubeño" + ], + "BDT": [ + "BDT", + "taka de Bangladesh" + ], + "BND": [ + "BND", + "dólar de Brunéi" + ], + "BTN": [ + "BTN", + "ngultrum butanés" + ], + "BWP": [ + "BWP", + "pula botsuano" + ], + "CNY": [ + "CNÂ¥", + "yuan chino" + ], + "ETB": [ + "ETB", + "birr etíope" + ], + "GEL": [ + "GEL", + "lari georgiano" + ], + "GHS": [ + "GHS", + "cedi ghanés" + ], + "GMD": [ + "GMD", + "dalasi gambiano" + ], + "HKD": [ + "HKD", + "dólar de Hong Kong" + ], + "HRK": [ + "HRK", + "kuna croata" + ], + "ILS": [ + "ILS", + "nuevo shéquel israelí" + ], + "JPY": [ + "JPY", + "yen japonés" + ], + "KGS": [ + "KGS", + "som kirguís" + ], + "KHR": [ + "KHR", + "riel camboyano" + ], + "KZT": [ + "KZT", + "tenge kazajo" + ], + "LAK": [ + "LAK", + "kip laosiano" + ], + "LKR": [ + "LKR", + "rupia de Sri Lanka" + ], + "MGA": [ + "MGA", + "ariary malgache" + ], + "MMK": [ + "MMK", + "kyat de Myanmar" + ], + "MNT": [ + "MNT", + "tugrik mongol" + ], + "MRO": [ + "MRO", + "ouguiya mauritano" + ], + "MVR": [ + "MVR", + "rufiyaa de Maldivas" + ], + "MXN": [ + "$", + "peso mexicano" + ], + "MYR": [ + "MYR", + "ringgit malayo" + ], + "MZN": [ + "MZN", + "metical mozambiqueño" + ], + "NGN": [ + "NGN", + "naira nigeriano" + ], + "PGK": [ + "PGK", + "kina de Papúa Nueva Guinea" + ], + "PLN": [ + "PLN", + "zloty polaco" + ], + "QAR": [ + "QAR", + "riyal de Qatar" + ], + "SAR": [ + "SAR", + "riyal saudí" + ], + "SBD": [ + "SBD", + "dólar de las Islas Salomón" + ], + "SCR": [ + "SCR", + "rupia de Seychelles" + ], + "SLL": [ + "SLL", + "leone de Sierra Leona" + ], + "STD": [ + "STD", + "dobra de Santo Tomé y Príncipe" + ], + "SZL": [ + "SZL", + "lilangeni suazi" + ], + "THB": [ + "THB", + "baht tailandés" + ], + "TMT": [ + "TMT", + "manat turkmeno" + ], + "TOP": [ + "TOP", + "paÊ»anga tongano" + ], + "UAH": [ + "UAH", + "grivna ucraniana" + ], + "UZS": [ + "UZS", + "som uzbeko" + ], + "VND": [ + "VND", + "dong vietnamita" + ], + "VUV": [ + "VUV", + "vatu vanuatuense" + ], + "WST": [ + "WST", + "tala samoano" + ], + "XPF": [ + "XPF", + "franco CFP" + ], + "ZAR": [ + "ZAR", + "rand sudafricano" + ], + "ZMW": [ + "ZMW", + "kwacha zambiano" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_NI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_NI.json new file mode 100644 index 0000000000000000000000000000000000000000..a498dc3b706ac89daede3c302547610824f6d1ac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_NI.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "NIO": [ + "C$", + "córdoba nicaragüense" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PA.json new file mode 100644 index 0000000000000000000000000000000000000000..c982a720f7cfa0575e23f774989d713b2ec8834a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PA.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "PAB": [ + "B\/.", + "balboa panameño" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PE.json new file mode 100644 index 0000000000000000000000000000000000000000..784c7067043dd720f87f6b386a61ea4bacbf67c1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PE.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "PEN": [ + "S\/", + "nuevo sol peruano" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PH.json new file mode 100644 index 0000000000000000000000000000000000000000..c0c06e8a6a3e09e7fd62aad28c257d3f1f394cbc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PH.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "PHP": [ + "₱", + "peso filipino" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PR.json new file mode 100644 index 0000000000000000000000000000000000000000..b61fca480df015635821fbc2e7e0dbe5e48294b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PR.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "USD": [ + "$", + "dólar estadounidense" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PY.json new file mode 100644 index 0000000000000000000000000000000000000000..4e955dda8a956e605c0476b6874481638ce678f5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_PY.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "PYG": [ + "Gs.", + "guaraní paraguayo" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_SV.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_SV.json new file mode 100644 index 0000000000000000000000000000000000000000..b61fca480df015635821fbc2e7e0dbe5e48294b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_SV.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "USD": [ + "$", + "dólar estadounidense" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_US.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_US.json new file mode 100644 index 0000000000000000000000000000000000000000..44a2947238e16de3d185e51007918800f127ff2d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_US.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.99", + "Names": { + "JPY": [ + "Â¥", + "yen" + ], + "USD": [ + "$", + "dólar estadounidense" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_UY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_UY.json new file mode 100644 index 0000000000000000000000000000000000000000..a68a3e7518263e7753beeb94b33c19ef0470fbf3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_UY.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "USD": [ + "US$", + "dólar estadounidense" + ], + "UYU": [ + "$", + "peso uruguayo" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_VE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_VE.json new file mode 100644 index 0000000000000000000000000000000000000000..76b744670c39002203ee05f79c68434ee09bac8a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/es_VE.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "VEF": [ + "Bs.", + "bolívar venezolano" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/et.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/et.json new file mode 100644 index 0000000000000000000000000000000000000000..4b68ffc34842e7c6a0896a1a9f890724be14dc72 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/et.json @@ -0,0 +1,1042 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Andorra peseeta" + ], + "AED": [ + "AED", + "Araabia Ühendemiraatide dirhem" + ], + "AFA": [ + "AFA", + "Afganistani afgaani (1927–2002)" + ], + "AFN": [ + "AFN", + "Afganistani afgaani" + ], + "ALK": [ + "ALK", + "Albaania lekk (1946–1965)" + ], + "ALL": [ + "ALL", + "Albaania lekk" + ], + "AMD": [ + "AMD", + "Armeenia dramm" + ], + "ANG": [ + "ANG", + "Hollandi Antillide kulden" + ], + "AOA": [ + "AOA", + "Angola kvanza" + ], + "AOK": [ + "AOK", + "Angola kvanza (1977–1990)" + ], + "AON": [ + "AON", + "Angola kvanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angola reformitud kvanza, 1995–1999" + ], + "ARA": [ + "ARA", + "Argentina austral" + ], + "ARM": [ + "ARM", + "Argentina peeso (1881–1970)" + ], + "ARP": [ + "ARP", + "Argentina peeso (1983–1985)" + ], + "ARS": [ + "ARS", + "Argentina peeso" + ], + "ATS": [ + "ATS", + "Austria Å¡illing" + ], + "AUD": [ + "AU$", + "Austraalia dollar" + ], + "AWG": [ + "AWG", + "Aruba kulden" + ], + "AZM": [ + "AZM", + "Aserbaidžaani manat (1993–2006)" + ], + "AZN": [ + "AZN", + "Aserbaidžaani manat" + ], + "BAD": [ + "BAD", + "Bosnia ja Hertsegoviina dinaar (1992–1994)" + ], + "BAM": [ + "BAM", + "Bosnia ja Hertsegoviina konverteeritav mark" + ], + "BAN": [ + "BAN", + "Bosnia ja Hertsegoviina uus dinaar (1994–1997)" + ], + "BBD": [ + "BBD", + "Barbadose dollar" + ], + "BDT": [ + "BDT", + "Bangladeshi taka" + ], + "BEC": [ + "BEC", + "Belgia konverteeritav frank" + ], + "BEF": [ + "BEF", + "Belgia frank" + ], + "BEL": [ + "BEL", + "Belgia arveldusfrank" + ], + "BGL": [ + "BGL", + "Bulgaaria püsiv leev" + ], + "BGN": [ + "BGN", + "Bulgaaria leev" + ], + "BGO": [ + "BGO", + "Bulgaaria leev (1879–1952)" + ], + "BHD": [ + "BHD", + "Bahreini dinaar" + ], + "BIF": [ + "BIF", + "Burundi frank" + ], + "BMD": [ + "BMD", + "Bermuda dollar" + ], + "BND": [ + "BND", + "Brunei dollar" + ], + "BOB": [ + "BOB", + "Boliivia boliviaano" + ], + "BOL": [ + "BOL", + "Boliivia boliviaano (1863–1963)" + ], + "BOP": [ + "BOP", + "Boliivia peeso" + ], + "BRB": [ + "BRB", + "Brasiilia uus kruseiro (1967–1986)" + ], + "BRC": [ + "BRC", + "Brasiilia krusado" + ], + "BRE": [ + "BRE", + "Brasiilia kruseiro (1990–1993)" + ], + "BRL": [ + "R$", + "Brasiilia reaal" + ], + "BRR": [ + "BRR", + "Brasiilia kruseiro (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Brasiilia kruseiro (1942–1967)" + ], + "BSD": [ + "BSD", + "Bahama dollar" + ], + "BTN": [ + "BTN", + "Bhutani ngultrum" + ], + "BUK": [ + "BUK", + "Birma kjatt" + ], + "BWP": [ + "BWP", + "Botswana pula" + ], + "BYB": [ + "BYB", + "Valgevene uus rubla (1994–1999)" + ], + "BYN": [ + "BYN", + "Valgevene rubla" + ], + "BYR": [ + "BYR", + "Valgevene rubla (2000–2016)" + ], + "BZD": [ + "BZD", + "Belize’i dollar" + ], + "CAD": [ + "CA$", + "Kanada dollar" + ], + "CDF": [ + "CDF", + "Kongo frank" + ], + "CHF": [ + "CHF", + "Å veitsi frank" + ], + "CLE": [ + "CLE", + "TÅ¡iili eskuudo" + ], + "CLP": [ + "CLP", + "TÅ¡iili peeso" + ], + "CNY": [ + "CNÂ¥", + "Hiina jüaan" + ], + "COP": [ + "COP", + "Colombia peeso" + ], + "CRC": [ + "CRC", + "Costa Rica koloon" + ], + "CSD": [ + "CSD", + "Serbia dinaar (2002–2006)" + ], + "CUC": [ + "CUC", + "Kuuba konverteeritav peeso" + ], + "CUP": [ + "CUP", + "Kuuba peeso" + ], + "CVE": [ + "CVE", + "Cabo Verde eskuudo" + ], + "CYP": [ + "CYP", + "Küprose nael" + ], + "CZK": [ + "CZK", + "TÅ¡ehhi kroon" + ], + "DDM": [ + "DDM", + "Ida-Saksa mark" + ], + "DEM": [ + "DEM", + "Saksa mark" + ], + "DJF": [ + "DJF", + "Djibouti frank" + ], + "DKK": [ + "DKK", + "Taani kroon" + ], + "DOP": [ + "DOP", + "Dominikaani peeso" + ], + "DZD": [ + "DZD", + "Alžeeria dinaar" + ], + "ECS": [ + "ECS", + "Ecuadori sukre" + ], + "EEK": [ + "kr", + "Eesti kroon", + {} + ], + "EGP": [ + "EGP", + "Egiptuse nael" + ], + "ERN": [ + "ERN", + "Eritrea nakfa" + ], + "ESP": [ + "ESP", + "Hispaania peseeta" + ], + "ETB": [ + "ETB", + "Etioopia birr" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "Soome mark" + ], + "FJD": [ + "FJD", + "Fidži dollar" + ], + "FKP": [ + "FKP", + "Falklandi saarte nael" + ], + "FRF": [ + "FRF", + "Prantsuse frank" + ], + "GBP": [ + "£", + "Suurbritannia naelsterling" + ], + "GEL": [ + "GEL", + "Gruusia lari" + ], + "GHC": [ + "GHC", + "Ghana sedi (1979–2007)" + ], + "GHS": [ + "GHS", + "Ghana sedi" + ], + "GIP": [ + "GIP", + "Gibraltari nael" + ], + "GMD": [ + "GMD", + "Gambia dalasi" + ], + "GNF": [ + "GNF", + "Guinea frank" + ], + "GNS": [ + "GNS", + "Guinea syli" + ], + "GRD": [ + "GRD", + "Kreeka drahm" + ], + "GTQ": [ + "GTQ", + "Guatemala ketsaal" + ], + "GWE": [ + "GWE", + "Portugali Guinea eskuudo" + ], + "GWP": [ + "GWP", + "Guinea-Bissau peeso" + ], + "GYD": [ + "GYD", + "Guyana dollar" + ], + "HKD": [ + "HK$", + "Hongkongi dollar" + ], + "HNL": [ + "HNL", + "Hondurase lempiira" + ], + "HRD": [ + "HRD", + "Horvaatia dinaar" + ], + "HRK": [ + "HRK", + "Horvaatia kuna" + ], + "HTG": [ + "HTG", + "Haiti gurd" + ], + "HUF": [ + "HUF", + "Ungari forint" + ], + "IDR": [ + "IDR", + "Indoneesia ruupia" + ], + "IEP": [ + "IEP", + "Iiri nael" + ], + "ILP": [ + "ILP", + "Iisraeli nael" + ], + "ILR": [ + "ILR", + "Iisraeli seekel (1980–1985)" + ], + "ILS": [ + "₪", + "Iisraeli uus seekel" + ], + "INR": [ + "₹", + "India ruupia" + ], + "IQD": [ + "IQD", + "Iraagi dinaar" + ], + "IRR": [ + "IRR", + "Iraani riaal" + ], + "ISJ": [ + "ISJ", + "Islandi kroon (1918–1981)" + ], + "ISK": [ + "ISK", + "Islandi kroon" + ], + "ITL": [ + "ITL", + "Itaalia liir" + ], + "JMD": [ + "JMD", + "Jamaica dollar" + ], + "JOD": [ + "JOD", + "Jordaania dinaar" + ], + "JPY": [ + "Â¥", + "Jaapani jeen" + ], + "KES": [ + "KES", + "Keenia Å¡illing" + ], + "KGS": [ + "KGS", + "Kõrgõzstani somm" + ], + "KHR": [ + "KHR", + "Kambodža riaal" + ], + "KMF": [ + "KMF", + "Komoori frank" + ], + "KPW": [ + "KPW", + "Põhja-Korea vonn" + ], + "KRO": [ + "KRO", + "Lõuna-Korea vonn (1945–1953)" + ], + "KRW": [ + "â‚©", + "Lõuna-Korea vonn" + ], + "KWD": [ + "KWD", + "Kuveidi dinaar" + ], + "KYD": [ + "KYD", + "Kaimanisaarte dollar" + ], + "KZT": [ + "KZT", + "Kasahstani tenge" + ], + "LAK": [ + "LAK", + "Laose kiip" + ], + "LBP": [ + "LBP", + "Liibanoni nael" + ], + "LKR": [ + "LKR", + "Sri Lanka ruupia" + ], + "LRD": [ + "LRD", + "Libeeria dollar" + ], + "LSL": [ + "LSL", + "Lesotho loti" + ], + "LTL": [ + "LTL", + "Leedu litt" + ], + "LUC": [ + "LUC", + "Luksemburgi konverteeritav frank" + ], + "LUF": [ + "LUF", + "Luksemburgi frank" + ], + "LVL": [ + "LVL", + "Läti latt" + ], + "LVR": [ + "LVR", + "Läti rubla" + ], + "LYD": [ + "LYD", + "Liibüa dinaar" + ], + "MAD": [ + "MAD", + "Maroko dirhem" + ], + "MAF": [ + "MAF", + "Maroko frank" + ], + "MCF": [ + "MCF", + "Monaco frank" + ], + "MDL": [ + "MDL", + "Moldova leu" + ], + "MGA": [ + "MGA", + "Madagaskari ariari" + ], + "MGF": [ + "MGF", + "Madagaskar frank" + ], + "MKD": [ + "MKD", + "Makedoonia dinaar" + ], + "MKN": [ + "MKN", + "Makedoonia dinaar (1992–1993)" + ], + "MLF": [ + "MLF", + "Mali frank" + ], + "MMK": [ + "MMK", + "Myanmari kjatt" + ], + "MNT": [ + "MNT", + "Mongoolia tugrik" + ], + "MOP": [ + "MOP", + "Macau pataaka" + ], + "MRO": [ + "MRO", + "Mauritaania ugia" + ], + "MTL": [ + "MTL", + "Malta liir" + ], + "MTP": [ + "MTP", + "Malta nael" + ], + "MUR": [ + "MUR", + "Mauritiuse ruupia" + ], + "MVP": [ + "MVP", + "Maldiivi ruupia (1947–1981)" + ], + "MVR": [ + "MVR", + "Maldiivi ruupia" + ], + "MWK": [ + "MWK", + "Malawi kvatÅ¡a" + ], + "MXN": [ + "MX$", + "Mehhiko peeso" + ], + "MXP": [ + "MXP", + "Mehhiko peeso (1861–1992)" + ], + "MYR": [ + "MYR", + "Malaisia ringgit" + ], + "MZE": [ + "MZE", + "Mosambiigi eskuudo" + ], + "MZM": [ + "MZM", + "Mosambiigi metikal (1980–2006)" + ], + "MZN": [ + "MZN", + "Mosambiigi metikal" + ], + "NAD": [ + "NAD", + "Namiibia dollar" + ], + "NGN": [ + "NGN", + "Nigeeria naira" + ], + "NIC": [ + "NIC", + "Nicaragua kordoba (1988–1991)" + ], + "NIO": [ + "NIO", + "Nicaragua kordoba" + ], + "NLG": [ + "NLG", + "Hollandi kulden" + ], + "NOK": [ + "NOK", + "Norra kroon" + ], + "NPR": [ + "NPR", + "Nepali ruupia" + ], + "NZD": [ + "NZ$", + "Uus-Meremaa dollar" + ], + "OMR": [ + "OMR", + "Omaani riaal" + ], + "PAB": [ + "PAB", + "Panama balboa" + ], + "PEI": [ + "PEI", + "Peruu inti" + ], + "PEN": [ + "PEN", + "Peruu uus soll" + ], + "PES": [ + "PES", + "Peruu soll (1863–1965)" + ], + "PGK": [ + "PGK", + "Paapua Uus-Guinea kina" + ], + "PHP": [ + "PHP", + "Filipiini peeso" + ], + "PKR": [ + "PKR", + "Pakistani ruupia" + ], + "PLN": [ + "PLN", + "Poola zlott" + ], + "PLZ": [ + "PLZ", + "Poola zlott (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugali eskuudo" + ], + "PYG": [ + "PYG", + "Paraguay guaranii" + ], + "QAR": [ + "QAR", + "Katari riaal" + ], + "RHD": [ + "RHD", + "Rodeesia dollar" + ], + "ROL": [ + "ROL", + "Rumeenia leu (1952–2006)" + ], + "RON": [ + "RON", + "Rumeenia leu" + ], + "RSD": [ + "RSD", + "Serbia dinaar" + ], + "RUB": [ + "RUB", + "Venemaa rubla" + ], + "RUR": [ + "RUR", + "Venemaa rubla (1991–1998)" + ], + "RWF": [ + "RWF", + "Rwanda frank" + ], + "SAR": [ + "SAR", + "Saudi Araabia riaal" + ], + "SBD": [ + "SBD", + "Saalomoni Saarte dollar" + ], + "SCR": [ + "SCR", + "SeiÅ¡elli ruupia" + ], + "SDD": [ + "SDD", + "Sudaani dinaar (1992–2007)" + ], + "SDG": [ + "SDG", + "Sudaani nael" + ], + "SDP": [ + "SDP", + "Sudaani nael (1957–1998)" + ], + "SEK": [ + "SEK", + "Rootsi kroon" + ], + "SGD": [ + "SGD", + "Singapuri dollar" + ], + "SHP": [ + "SHP", + "Saint Helena nael" + ], + "SIT": [ + "SIT", + "Sloveenia tolar" + ], + "SKK": [ + "SKK", + "Slovaki kroon" + ], + "SLL": [ + "SLL", + "Sierra Leone leoone" + ], + "SOS": [ + "SOS", + "Somaalia Å¡illing" + ], + "SRD": [ + "SRD", + "Suriname dollar" + ], + "SRG": [ + "SRG", + "Suriname kulden" + ], + "SSP": [ + "SSP", + "Lõuna-Sudaani nael" + ], + "STD": [ + "STD", + "São Tomé ja Príncipe dobra" + ], + "SUR": [ + "SUR", + "NSVL-i rubla" + ], + "SVC": [ + "SVC", + "El Salvadori koloon" + ], + "SYP": [ + "SYP", + "Süüria nael" + ], + "SZL": [ + "SZL", + "Svaasimaa lilangeni" + ], + "THB": [ + "฿", + "Tai baat" + ], + "TJR": [ + "TJR", + "Tadžikistani rubla" + ], + "TJS": [ + "TJS", + "Tadžikistani somoni" + ], + "TMM": [ + "TMM", + "Türkmenistani manat (1993–2009)" + ], + "TMT": [ + "TMT", + "Türkmenistani manat" + ], + "TND": [ + "TND", + "Tuneesia dinaar" + ], + "TOP": [ + "TOP", + "Tonga pa’anga" + ], + "TPE": [ + "TPE", + "Timori eskuudo" + ], + "TRL": [ + "TRL", + "Türgi liir (1922–2005)" + ], + "TRY": [ + "TRY", + "Türgi liir" + ], + "TTD": [ + "TTD", + "Trinidadi ja Tobago dollar" + ], + "TWD": [ + "NT$", + "Taiwani dollar" + ], + "TZS": [ + "TZS", + "Tansaania Å¡illing" + ], + "UAH": [ + "UAH", + "Ukraina grivna" + ], + "UAK": [ + "UAK", + "Ukraina karbovanets" + ], + "UGS": [ + "UGS", + "Uganda Å¡illing (1966–1987)" + ], + "UGX": [ + "UGX", + "Uganda Å¡illing" + ], + "USD": [ + "$", + "USA dollar" + ], + "USN": [ + "USN", + "USA järgmise päeva dollar" + ], + "USS": [ + "USS", + "USA sama päeva dollar" + ], + "UYP": [ + "UYP", + "Uruguay peeso (1975–1993)" + ], + "UYU": [ + "UYU", + "Uruguay peeso" + ], + "UZS": [ + "UZS", + "Usbekistani somm" + ], + "VEB": [ + "VEB", + "Venezuela boliivar (1871–2008)" + ], + "VEF": [ + "VEF", + "Venezuela boliivar" + ], + "VND": [ + "â‚«", + "Vietnami dong" + ], + "VNN": [ + "VNN", + "Vietnami dong (1978–1985)" + ], + "VUV": [ + "VUV", + "Vanuatu vatu" + ], + "WST": [ + "WST", + "Samoa taala" + ], + "XAF": [ + "FCFA", + "Kesk-Aafrika CFA frank" + ], + "XCD": [ + "EC$", + "Ida-Kariibi dollar" + ], + "XEU": [ + "XEU", + "eküü" + ], + "XFO": [ + "XFO", + "Prantsuse kuldfrank" + ], + "XFU": [ + "XFU", + "Prantsuse UIC-frank" + ], + "XOF": [ + "CFA", + "Lääne-Aafrika CFA frank" + ], + "XPF": [ + "CFPF", + "CFP frank" + ], + "YDD": [ + "YDD", + "Jeemeni dinaar" + ], + "YER": [ + "YER", + "Jeemeni riaal" + ], + "YUM": [ + "YUM", + "Jugoslaavia uus dinaar (1994–2002)" + ], + "YUN": [ + "YUN", + "Jugoslaavia konverteeritav dinaar (1990–1992)" + ], + "ZAR": [ + "ZAR", + "Lõuna-Aafrika rand" + ], + "ZMK": [ + "ZMK", + "Sambia kvatÅ¡a (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Sambia kvatÅ¡a" + ], + "ZRZ": [ + "ZRZ", + "Sairi zaire" + ], + "ZWD": [ + "ZWD", + "Zimbabwe dollar (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Zimbabwe dollar (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabwe dollar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/eu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/eu.json new file mode 100644 index 0000000000000000000000000000000000000000..1b1bad29ff25660bf2a28cda4e2bb8fad8705039 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/eu.json @@ -0,0 +1,646 @@ +{ + "Version": "2.1.29.20", + "Names": { + "AED": [ + "AED", + "Arabiar Emirerri Batuetako dirhama" + ], + "AFN": [ + "AFN", + "Afganistango afghania" + ], + "ALL": [ + "ALL", + "Albaniako leka" + ], + "AMD": [ + "AMD", + "Armeniako drama" + ], + "ANG": [ + "ANG", + "Holandarren Antilletako guilderra" + ], + "AOA": [ + "AOA", + "Angolako kwanza" + ], + "ARS": [ + "ARS", + "Argentinako pesoa" + ], + "AUD": [ + "A$", + "Australiako dolarra" + ], + "AWG": [ + "AWG", + "Arubako florina" + ], + "AZN": [ + "AZN", + "Azerbaijango manata" + ], + "BAM": [ + "BAM", + "Bosnia-Herzegovinako marko trukakorra" + ], + "BBD": [ + "BBD", + "Barbadosetako dolarra" + ], + "BDT": [ + "BDT", + "Bangladesheko taka" + ], + "BGN": [ + "BGN", + "Bulgariako leva" + ], + "BHD": [ + "BHD", + "Bahraingo dinarra" + ], + "BIF": [ + "BIF", + "Burundiko frankoa" + ], + "BMD": [ + "BMD", + "Bermudetako dolarra" + ], + "BND": [ + "BND", + "Bruneiko dolarra" + ], + "BOB": [ + "BOB", + "Boliviako bolivianoa" + ], + "BRL": [ + "R$", + "Brasilgo erreala" + ], + "BSD": [ + "BSD", + "Bahametako dolarra" + ], + "BTN": [ + "BTN", + "Bhutango ngultruma" + ], + "BWP": [ + "BWP", + "Bosniako pula" + ], + "BYN": [ + "BYN", + "Bielorrusiako errubloa" + ], + "BYR": [ + "BYR", + "Bielorrusiako errubloa (2000–2016)" + ], + "BZD": [ + "BZD", + "Belizeko dolarra" + ], + "CAD": [ + "CA$", + "Kanadako dolarra" + ], + "CDF": [ + "CDF", + "Kongoko frankoa" + ], + "CHF": [ + "CHF", + "Suitzako frankoa" + ], + "CLP": [ + "CLP", + "Txileko pesoa" + ], + "CNY": [ + "CNÂ¥", + "Txinako yuana" + ], + "COP": [ + "COP", + "Kolonbiako pesoa" + ], + "CRC": [ + "CRC", + "Costa Ricako colona" + ], + "CUC": [ + "CUC", + "Kubako peso trukakorra" + ], + "CUP": [ + "CUP", + "Kubako pesoa" + ], + "CVE": [ + "CVE", + "Cabo Verdeko ezkutua" + ], + "CZK": [ + "CZK", + "Txekiar Errepublikako koroa" + ], + "DJF": [ + "DJF", + "Djibutiko frankoa" + ], + "DKK": [ + "DKK", + "Danimarkako koroa" + ], + "DOP": [ + "DOP", + "Dominikar Errepublikako pesoa" + ], + "DZD": [ + "DZD", + "Aljeriako dinarra" + ], + "EGP": [ + "EGP", + "Egiptoko libera" + ], + "ERN": [ + "ERN", + "Eritreako nakfa" + ], + "ESP": [ + "â‚§", + "ESP", + {} + ], + "ETB": [ + "ETB", + "Etiopiako birra" + ], + "EUR": [ + "€", + "euroa" + ], + "FJD": [ + "FJD", + "Fijiko dolarra" + ], + "FKP": [ + "FKP", + "Falkland uharteetako libera" + ], + "GBP": [ + "£", + "Libera esterlina" + ], + "GEL": [ + "GEL", + "Georgiako laria" + ], + "GHS": [ + "GHS", + "Ghanako cedia" + ], + "GIP": [ + "GIP", + "Gibraltarreko libera" + ], + "GMD": [ + "GMD", + "Ganbiako dalasia" + ], + "GNF": [ + "GNF", + "Gineako frankoa" + ], + "GTQ": [ + "GTQ", + "Guatemalako quetzala" + ], + "GYD": [ + "GYD", + "Guyanako dolarra" + ], + "HKD": [ + "HK$", + "Hong Kongeko dolarra" + ], + "HNL": [ + "HNL", + "Hondurasko lempira" + ], + "HRK": [ + "HRK", + "Kroaziako kuna" + ], + "HTG": [ + "HTG", + "Haitiko gourdea" + ], + "HUF": [ + "HUF", + "Hungariako florina" + ], + "IDR": [ + "IDR", + "Indonesiako errupia" + ], + "ILS": [ + "₪", + "Israelgo shekel berria" + ], + "INR": [ + "₹", + "Indiako errupia" + ], + "IQD": [ + "IQD", + "Irakeko dinarra" + ], + "IRR": [ + "IRR", + "Irango riala" + ], + "ISK": [ + "ISK", + "Islandiako koroa" + ], + "JMD": [ + "JMD", + "Jamaikako dolarra" + ], + "JOD": [ + "JOD", + "Jordaniako dinarra" + ], + "JPY": [ + "JPÂ¥", + "Japoniako yena" + ], + "KES": [ + "KES", + "Kenyako txelina" + ], + "KGS": [ + "KGS", + "Kirgizistango soma" + ], + "KHR": [ + "KHR", + "Kanbodiako riela" + ], + "KMF": [ + "KMF", + "Komoreetako frankoa" + ], + "KPW": [ + "KPW", + "Ipar Koreako wona" + ], + "KRW": [ + "â‚©", + "Hego Koreako wona" + ], + "KWD": [ + "KWD", + "Kuwaiteko dinarra" + ], + "KYD": [ + "KYD", + "Kaiman uharteetako dolarra" + ], + "KZT": [ + "KZT", + "Kazakhstango tengea" + ], + "LAK": [ + "LAK", + "Laoseko kipa" + ], + "LBP": [ + "LBP", + "Libanoko libera" + ], + "LKR": [ + "LKR", + "Sri Lankako errupia" + ], + "LRD": [ + "LRD", + "Liberiako dolarra" + ], + "LSL": [ + "LSL", + "Lesothoko lotia" + ], + "LTL": [ + "LTL", + "Lituaniako litasa" + ], + "LVL": [ + "LVL", + "Letoniako latsa" + ], + "LYD": [ + "LYD", + "Libiako dinarra" + ], + "MAD": [ + "MAD", + "Marokoko dirhama" + ], + "MDL": [ + "MDL", + "Moldaviako leua" + ], + "MGA": [ + "MGA", + "Madagaskarreko ariarya" + ], + "MKD": [ + "MKD", + "Mazedoniako dinarra" + ], + "MMK": [ + "MMK", + "Myanmarreko kyata" + ], + "MNT": [ + "MNT", + "Mongoliako tugrika" + ], + "MOP": [ + "MOP", + "Macanako pataca" + ], + "MRO": [ + "MRO", + "Mauritaniako ouguiya" + ], + "MUR": [ + "MUR", + "Maurizio uharteetako errupia" + ], + "MVR": [ + "MVR", + "Maldivetako rufiyaa" + ], + "MWK": [ + "MWK", + "Malawiko kwacha" + ], + "MXN": [ + "MX$", + "Mexikoko pesoa" + ], + "MYR": [ + "MYR", + "Malaysiako ringgita" + ], + "MZN": [ + "MZN", + "Mozambikeko metikala" + ], + "NAD": [ + "NAD", + "Namibiako dolarra" + ], + "NGN": [ + "NGN", + "Nigeriako naira" + ], + "NIO": [ + "NIO", + "Nikaraguako cordoba" + ], + "NOK": [ + "NOK", + "Norvegiako koroa" + ], + "NPR": [ + "NPR", + "Nepalgo errupia" + ], + "NZD": [ + "NZ$", + "Zeelanda Berriko dolarra" + ], + "OMR": [ + "OMR", + "Omango riala" + ], + "PAB": [ + "PAB", + "Panamako balboa" + ], + "PEN": [ + "PEN", + "Peruko sol berria" + ], + "PGK": [ + "PGK", + "Papua Ginea Berriko kina" + ], + "PHP": [ + "PHP", + "Filipinetako pesoa" + ], + "PKR": [ + "PKR", + "Pakistango errupia" + ], + "PLN": [ + "PLN", + "Poloniako zlotya" + ], + "PYG": [ + "PYG", + "Paraguaiko guarania" + ], + "QAR": [ + "QAR", + "Qatarreko riala" + ], + "RON": [ + "RON", + "Errumaniako leua" + ], + "RSD": [ + "RSD", + "Serbiako dinarra" + ], + "RUB": [ + "RUB", + "Errusiako errubloa" + ], + "RWF": [ + "RWF", + "Ruandako frankoa" + ], + "SAR": [ + "SAR", + "Arabia Saudiko riala" + ], + "SBD": [ + "SBD", + "Salomon uharteetako dolarra" + ], + "SCR": [ + "SCR", + "Seychelleetako errupia" + ], + "SDG": [ + "SDG", + "Sudango libera" + ], + "SEK": [ + "SEK", + "Suediako koroa" + ], + "SGD": [ + "SGD", + "Singapurreko dolarra" + ], + "SHP": [ + "SHP", + "Santa Helenako libera" + ], + "SLL": [ + "SLL", + "Sierra Leonako leona" + ], + "SOS": [ + "SOS", + "Somaliako txelina" + ], + "SRD": [ + "SRD", + "Surinameko dolarra" + ], + "SSP": [ + "SSP", + "Hego Sudango libera" + ], + "STD": [ + "STD", + "Sao Tomeko eta Principeko dobra" + ], + "SYP": [ + "SYP", + "Siriako libera" + ], + "SZL": [ + "SZL", + "Swazilandiako lilangenia" + ], + "THB": [ + "฿", + "Thailandiako bahta" + ], + "TJS": [ + "TJS", + "Tajikistango somonia" + ], + "TMT": [ + "TMT", + "Turkmenistango manata" + ], + "TND": [ + "TND", + "Tunisiako dinarra" + ], + "TOP": [ + "TOP", + "Tongako PaÊ»anga" + ], + "TRY": [ + "TRY", + "Turkiako lira" + ], + "TTD": [ + "TTD", + "Trinidad eta Tobagoko dolarra" + ], + "TWD": [ + "NT$", + "Taiwango dolar berria" + ], + "TZS": [ + "TZS", + "Tanzaniako txelina" + ], + "UAH": [ + "UAH", + "Ukrainako hryvnia" + ], + "UGX": [ + "UGX", + "Ugandako txelina" + ], + "USD": [ + "US$", + "AEBko dolarra" + ], + "UYU": [ + "UYU", + "Uruguaiko pesoa" + ], + "UZS": [ + "UZS", + "Uzbekistango soma" + ], + "VEF": [ + "VEF", + "Venezuelako bolivarra" + ], + "VND": [ + "â‚«", + "Vietnameko donga" + ], + "VUV": [ + "VUV", + "Vanuatuko vatua" + ], + "WST": [ + "WST", + "Samoko tala" + ], + "XAF": [ + "FCFA", + "Afrika erdialdeko CFA frankoa" + ], + "XCD": [ + "EC$", + "Karibe ekialdeko dolarra" + ], + "XOF": [ + "CFA", + "Afrika mendebaldeko CFA frankoa" + ], + "XPF": [ + "CFPF", + "CFP frankoa" + ], + "YER": [ + "YER", + "Yemengo riala" + ], + "ZAR": [ + "ZAR", + "Hegoafrikako randa" + ], + "ZMK": [ + "ZMK", + "Zambiako kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambiako kwacha" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fa.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fa.json new file mode 100644 index 0000000000000000000000000000000000000000..65cdaee88bf3aa918b77d90acf40e1de42645d09 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fa.json @@ -0,0 +1,845 @@ +{ + "Version": "2.1.29.44", + "Names": { + "ADP": [ + "ADP", + "پزتای آندورا" + ], + "AED": [ + "AED", + "درهم امارات متحدهٔ عربی" + ], + "AFA": [ + "AFA", + "Ø§ÙØºØ§Ù†ÛŒ Ø§ÙØºØ§Ù†Ø³ØªØ§Ù† (Û±Û¹Û²Û· تا Û²Û°Û°Û²)" + ], + "AFN": [ + "Ø‹", + "Ø§ÙØºØ§Ù†ÛŒ Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†" + ], + "ALL": [ + "ALL", + "Ù„Ú© آلبانی" + ], + "AMD": [ + "AMD", + "درام ارمنستان" + ], + "ANG": [ + "ANG", + "گیلدر آنتیل هلند" + ], + "AOA": [ + "AOA", + "کوانزای آنگولا" + ], + "ARP": [ + "ARP", + "پزوی آرژانتین (Û±Û¹Û¸Û³ تا Û±Û¹Û¸Ûµ)â€" + ], + "ARS": [ + "ARS", + "پزوی آرژانتین" + ], + "ATS": [ + "ATS", + "شیلینگ اتریش" + ], + "AUD": [ + "A$", + "دلار استرالیا" + ], + "AWG": [ + "AWG", + "Ùلورین آروبا" + ], + "AZM": [ + "AZM", + "منات جمهوری آذربایجان (Û±Û¹Û¹Û³ تا Û²Û°Û°Û¶)" + ], + "AZN": [ + "AZN", + "منات جمهوری آذربایجان" + ], + "BAD": [ + "BAD", + "دینار بوسنی Ùˆ هرزگوین (Û±Û¹Û¹Û² تا Û±Û¹Û¹Û´)" + ], + "BAM": [ + "BAM", + "مارک تبدیل‌پذیر بوسنی Ùˆ هرزگوین" + ], + "BBD": [ + "BBD", + "دلار باربادوس" + ], + "BDT": [ + "BDT", + "تاکای بنگلادش" + ], + "BEF": [ + "BEF", + "ÙØ±Ø§Ù†Ú© بلژیک" + ], + "BEL": [ + "BEL", + "ÙØ±Ø§Ù†Ú© بلژیک (مالی)" + ], + "BGN": [ + "BGN", + "ل٠بلغارستان" + ], + "BHD": [ + "BHD", + "دینار بحرین" + ], + "BIF": [ + "BIF", + "ÙØ±Ø§Ù†Ú© بوروندی" + ], + "BMD": [ + "BMD", + "دلار برمودا" + ], + "BND": [ + "BND", + "دلار برونئی" + ], + "BOB": [ + "BOB", + "بولیویانوی بولیوی" + ], + "BOP": [ + "BOP", + "پزوی بولیوی" + ], + "BRL": [ + "R$", + "رئال برزیل" + ], + "BSD": [ + "BSD", + "دلار باهاما" + ], + "BTN": [ + "BTN", + "انگولتروم بوتان" + ], + "BWP": [ + "BWP", + "پولای بوتسوانا" + ], + "BYB": [ + "BYB", + "روبل جدید بیلوروسی (Û±Û¹Û¹Û´ تا Û±Û¹Û¹Û¹)" + ], + "BYN": [ + "BYN", + "روبل بیلوروسی" + ], + "BYR": [ + "BYR", + "روبل بیلوروسی (۲۰۰۰–۲۰۱۶)" + ], + "BZD": [ + "BZD", + "دلار بلیز" + ], + "CAD": [ + "$CA", + "دلار کانادا" + ], + "CDF": [ + "CDF", + "ÙØ±Ø§Ù†Ú© Ú©Ù†Ú¯Ùˆ" + ], + "CHF": [ + "CHF", + "ÙØ±Ø§Ù†Ú© سوئیس" + ], + "CLP": [ + "CLP", + "پزوی شیلی" + ], + "CNY": [ + "Â¥CN", + "یوآن چین" + ], + "COP": [ + "COP", + "پزوی کلمبیا" + ], + "CRC": [ + "CRC", + "کولون کاستاریکا" + ], + "CSD": [ + "CSD", + "دینار صربستان (Û²Û°Û°Û² تا Û²Û°Û°Û¶)" + ], + "CUC": [ + "CUC", + "پزوی تبدیل‌پذیر کوبا" + ], + "CUP": [ + "CUP", + "پزوی کوبا" + ], + "CVE": [ + "CVE", + "اسکودوی کیپ‌ورد" + ], + "CYP": [ + "CYP", + "پوند قبرس" + ], + "CZK": [ + "CZK", + "کورونای جمهوری Ú†Ú©" + ], + "DDM": [ + "DDM", + "مارک آلمان شرقی" + ], + "DEM": [ + "DEM", + "مارک آلمان" + ], + "DJF": [ + "DJF", + "ÙØ±Ø§Ù†Ú© جیبوتی" + ], + "DKK": [ + "DKK", + "کرون دانمارک" + ], + "DOP": [ + "DOP", + "پزوی جمهوری دومینیکن" + ], + "DZD": [ + "DZD", + "دینار الجزایر" + ], + "EGP": [ + "EGP", + "لیرهٔ مصر" + ], + "ERN": [ + "ERN", + "Ù†Ø§Ú©ÙØ§ÛŒ اریتره" + ], + "ETB": [ + "ETB", + "بیر اتیوپی" + ], + "EUR": [ + "€", + "یورو" + ], + "FJD": [ + "FJD", + "دلار Ùیجی" + ], + "FKP": [ + "FKP", + "پوند جزایر ÙØ§Ù„کلند" + ], + "FRF": [ + "FRF", + "ÙØ±Ø§Ù†Ú© ÙØ±Ø§Ù†Ø³Ù‡" + ], + "GBP": [ + "£", + "پوند بریتانیا" + ], + "GEL": [ + "GEL", + "لاری گرجستان" + ], + "GHS": [ + "GHS", + "سدی غنا" + ], + "GIP": [ + "GIP", + "پوند جبل‌الطارق" + ], + "GMD": [ + "GMD", + "دالاسی گامبیا" + ], + "GNF": [ + "GNF", + "ÙØ±Ø§Ù†Ú© گینه" + ], + "GRD": [ + "GRD", + "دراخمای یونان" + ], + "GTQ": [ + "GTQ", + "کتزال گواتمالا" + ], + "GWP": [ + "GWP", + "پزوی گینهٔ بیسائو" + ], + "GYD": [ + "GYD", + "دلار گویانا" + ], + "HKD": [ + "$HK", + "دلار هنگ‌کنگ" + ], + "HNL": [ + "HNL", + "لمپیرای هندوراس" + ], + "HRD": [ + "HRD", + "دینار کرواسی" + ], + "HRK": [ + "HRK", + "کونای کرواسی" + ], + "HTG": [ + "HTG", + "گورد هائیتی" + ], + "HUF": [ + "HUF", + "Ùورینت مجارستان" + ], + "IDR": [ + "IDR", + "روپیهٔ اندونزی" + ], + "IEP": [ + "IEP", + "پوند ایرلند" + ], + "ILS": [ + "₪", + "شقل جدید اسرائیل" + ], + "INR": [ + "₹", + "روپیهٔ هند" + ], + "IQD": [ + "IQD", + "دینار عراق" + ], + "IRR": [ + "ریال", + "ریال ایران" + ], + "ISK": [ + "ISK", + "کرونای ایسلند" + ], + "ITL": [ + "ITL", + "لیرهٔ ایتالیا" + ], + "JMD": [ + "JMD", + "دلار جامائیکا" + ], + "JOD": [ + "JOD", + "دینار اردن" + ], + "JPY": [ + "Â¥", + "ین ژاپن" + ], + "KES": [ + "KES", + "شیلینگ کنیا" + ], + "KGS": [ + "KGS", + "سوم قرقیزستان" + ], + "KHR": [ + "KHR", + "ری‌یل کامبوج" + ], + "KMF": [ + "KMF", + "ÙØ±Ø§Ù†Ú© کومورو" + ], + "KPW": [ + "KPW", + "وون کرهٔ شمالی" + ], + "KRW": [ + "â‚©", + "وون کرهٔ جنوبی" + ], + "KWD": [ + "KWD", + "دینار کویت" + ], + "KYD": [ + "KYD", + "دلار جزایر Ú©Ùیمن" + ], + "KZT": [ + "KZT", + "تنگهٔ قزاقستان" + ], + "LAK": [ + "LAK", + "کیپ لائوس" + ], + "LBP": [ + "LBP", + "لیرهٔ لبنان" + ], + "LKR": [ + "LKR", + "روپیهٔ سری‌لانکا" + ], + "LRD": [ + "LRD", + "دلار لیبریا" + ], + "LSL": [ + "LSL", + "لوتی لسوتو" + ], + "LTL": [ + "LTL", + "لیتاس لیتوانی" + ], + "LUF": [ + "LUF", + "ÙØ±Ø§Ù†Ú© لوکزامبورگ" + ], + "LUL": [ + "LUL", + "ÙØ±Ø§Ù†Ú© مالی لوگزامبورگ" + ], + "LVL": [ + "LVL", + "لاتس لتونی" + ], + "LVR": [ + "LVR", + "روبل لتونی" + ], + "LYD": [ + "LYD", + "دینار لیبی" + ], + "MAD": [ + "MAD", + "درهم مراکش" + ], + "MAF": [ + "MAF", + "ÙØ±Ø§Ù†Ú© مراکش" + ], + "MDL": [ + "MDL", + "لئوی مولداوی" + ], + "MGA": [ + "MGA", + "آریاری مالاگاسی" + ], + "MGF": [ + "MGF", + "ÙØ±Ø§Ù†Ú© ماداگاسکار" + ], + "MKD": [ + "MKD", + "دینار مقدونیه" + ], + "MLF": [ + "MLF", + "ÙØ±Ø§Ù†Ú© مالی" + ], + "MMK": [ + "MMK", + "کیات میانمار" + ], + "MNT": [ + "MNT", + "توگریک مغولستان" + ], + "MOP": [ + "MOP", + "پاتاکای ماکائو" + ], + "MRO": [ + "MRO", + "اوگوئیای موریتانی" + ], + "MTL": [ + "MTL", + "لیرهٔ مالت" + ], + "MTP": [ + "MTP", + "پوند مالت" + ], + "MUR": [ + "MUR", + "روپیهٔ موریس" + ], + "MVR": [ + "MVR", + "روپیهٔ مالدیو" + ], + "MWK": [ + "MWK", + "کواچای مالاوی" + ], + "MXN": [ + "$MX", + "پزوی مکزیک" + ], + "MXP": [ + "MXP", + "پزوی نقرهٔ مکزیک (Û±Û¸Û¶Û± تا Û±Û¹Û¹Û²)" + ], + "MYR": [ + "MYR", + "رینگیت مالزی" + ], + "MZE": [ + "MZE", + "اسکودوی موزامبیک" + ], + "MZN": [ + "MZN", + "متیکال موزامبیک" + ], + "NAD": [ + "NAD", + "دلار نامیبیا" + ], + "NGN": [ + "NGN", + "نایرای نیجریه" + ], + "NIO": [ + "NIO", + "کوردوبای نیکاراگوئه" + ], + "NLG": [ + "NLG", + "گیلدر هلند" + ], + "NOK": [ + "NOK", + "کرون نروژ" + ], + "NPR": [ + "NPR", + "روپیهٔ نپال" + ], + "NZD": [ + "$NZ", + "دلار زلاند نو" + ], + "OMR": [ + "OMR", + "ریال عمان" + ], + "PAB": [ + "PAB", + "بالبوای پاناما" + ], + "PEN": [ + "PEN", + "نوئووسول پرو" + ], + "PGK": [ + "PGK", + "کینای پاپوا گینهٔ نو" + ], + "PHP": [ + "PHP", + "پزوی Ùیلیپین" + ], + "PKR": [ + "PKR", + "روپیهٔ پاکستان" + ], + "PLN": [ + "PLN", + "زواتی لهستان" + ], + "PTE": [ + "PTE", + "اسکودوی پرتغال" + ], + "PYG": [ + "PYG", + "گوارانی پاراگوئه" + ], + "QAR": [ + "QAR", + "ریال قطر" + ], + "RHD": [ + "RHD", + "دلار رودزیا" + ], + "RON": [ + "RON", + "لئوی رومانی" + ], + "RSD": [ + "RSD", + "دینار صربستان" + ], + "RUB": [ + "RUB", + "روبل روسیه" + ], + "RUR": [ + "RUR", + "روبل روسیه (Û±Û¹Û¹Û± تا Û±Û¹Û¹Û¸)" + ], + "RWF": [ + "RWF", + "ÙØ±Ø§Ù†Ú© رواندا" + ], + "SAR": [ + "SAR", + "ریال سعودی" + ], + "SBD": [ + "SBD", + "دلار جزایر سلیمان" + ], + "SCR": [ + "SCR", + "روپیهٔ سیشل" + ], + "SDD": [ + "SDD", + "دینار سودان (Û±Û¹Û¹Û² تا Û²Û°Û°Û·)" + ], + "SDG": [ + "SDG", + "لیرهٔ سودان" + ], + "SEK": [ + "SEK", + "کرون سوئد" + ], + "SGD": [ + "SGD", + "دلار سنگاپور" + ], + "SHP": [ + "SHP", + "پوند سنت هلن" + ], + "SLL": [ + "SLL", + "لئون سیرالئون" + ], + "SOS": [ + "SOS", + "شیلینگ سومالی" + ], + "SRD": [ + "SRD", + "دلار سورینام" + ], + "SRG": [ + "SRG", + "گیلدر سورینام" + ], + "SSP": [ + "SSP", + "پوند سودان جنوبی" + ], + "STD": [ + "STD", + "دوبرای سائوتومه Ùˆ پرنسیپ" + ], + "SUR": [ + "SUR", + "روبل شوروی" + ], + "SYP": [ + "SYP", + "لیرهٔ سوریه" + ], + "SZL": [ + "SZL", + "لیلانگنی سوازیلند" + ], + "THB": [ + "฿", + "بات تایلند" + ], + "TJR": [ + "TJR", + "روبل تاجیکستان" + ], + "TJS": [ + "TJS", + "سامانی تاجیکستان" + ], + "TMM": [ + "TMM", + "منات ترکمنستان (Û±Û¹Û¹Û³ تا Û²Û°Û°Û¹)" + ], + "TMT": [ + "TMT", + "منات ترکمنستان" + ], + "TND": [ + "TND", + "دینار تونس" + ], + "TOP": [ + "TOP", + "پاآنگای تونگا" + ], + "TPE": [ + "TPE", + "اسکودوی تیمور" + ], + "TRL": [ + "TRL", + "لیرهٔ ترکیه (Û±Û¹Û²Û² تا Û²Û°Û°Ûµ)" + ], + "TRY": [ + "TRY", + "لیرهٔ ترکیه" + ], + "TTD": [ + "TTD", + "دلار ترینیداد Ùˆ توباگو" + ], + "TWD": [ + "NT$", + "دلار جدید تایوان" + ], + "TZS": [ + "TZS", + "شیلینگ تانزانیا" + ], + "UAH": [ + "UAH", + "هریونیای اوکراین" + ], + "UGS": [ + "UGS", + "شیلینگ اوگاندا (Û±Û¹Û¶Û¶ تا Û±Û¹Û¸Û·)" + ], + "UGX": [ + "UGX", + "شیلینگ اوگاندا" + ], + "USD": [ + "$", + "دلار امریکا" + ], + "USN": [ + "USN", + "دلار امریکا (روز بعد)" + ], + "USS": [ + "USS", + "دلار امریکا (همان روز)" + ], + "UYP": [ + "UYP", + "پزوی اوروگوئه (Û±Û¹Û·Ûµ تا Û±Û¹Û¹Û³)" + ], + "UYU": [ + "UYU", + "پزوی اوروگوئه" + ], + "UZS": [ + "UZS", + "سوم ازبکستان" + ], + "VEB": [ + "VEB", + "بولیوار ونزوئلا (Û±Û¸Û·Û± تا Û²Û°Û°Û¸)" + ], + "VEF": [ + "VEF", + "بولیوار ونزوئلا" + ], + "VND": [ + "â‚«", + "دانگ ویتنام" + ], + "VUV": [ + "VUV", + "واتوی وانوواتو" + ], + "WST": [ + "WST", + "تالای ساموا" + ], + "XAF": [ + "FCFA", + "ÙØ±Ø§Ù†Ú© CFA مرکز Ø§ÙØ±ÛŒÙ‚ا" + ], + "XCD": [ + "$EC", + "دلار شرق کارائیب" + ], + "XFO": [ + "XFO", + "ÙØ±Ø§Ù†Ú© طلای ÙØ±Ø§Ù†Ø³Ù‡" + ], + "XOF": [ + "CFA", + "ÙØ±Ø§Ù†Ú© CFA غرب Ø§ÙØ±ÛŒÙ‚ا" + ], + "XPF": [ + "CFPF", + "ÙØ±Ø§Ù†Ú© اقیانوسیه" + ], + "YDD": [ + "YDD", + "دینار یمن" + ], + "YER": [ + "YER", + "ریال یمن" + ], + "ZAR": [ + "ZAR", + "راند Ø§ÙØ±ÛŒÙ‚ای جنوبی" + ], + "ZMK": [ + "ZMK", + "کواچای زامبیا (Û±Û¹Û¶Û¸ تا Û²Û°Û±Û²)" + ], + "ZMW": [ + "ZMW", + "کواچای زامبیا" + ], + "ZWD": [ + "ZWD", + "دلار زیمبابوه (Û±Û¹Û¸Û° تا Û²Û°Û°Û¸)" + ], + "ZWL": [ + "ZWL", + "دلار زیمبابوه (Û²Û°Û°Û¹)" + ], + "ZWR": [ + "ZWR", + "دلار زیمبابوه (Û²Û°Û°Û¸)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fa_AF.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fa_AF.json new file mode 100644 index 0000000000000000000000000000000000000000..64b372dee9702e41815447783ea0a72e9bdf8f94 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fa_AF.json @@ -0,0 +1,65 @@ +{ + "Version": "2.1.29.44", + "Names": { + "AUD": [ + "A$", + "دالر آسترالیا" + ], + "BND": [ + "BND", + "دالر برونی" + ], + "BYN": [ + "BYN", + "روبل روسیهٔ سÙید" + ], + "BYR": [ + "BYR", + "روبل روسیهٔ سÙید (۲۰۰۰–۲۰۱۶)" + ], + "CAD": [ + "$CA", + "دالر کانادا" + ], + "CHF": [ + "CHF", + "ÙØ±Ø§Ù†Ú© سویس" + ], + "DKK": [ + "DKK", + "کرون دنمارک" + ], + "JPY": [ + "Â¥", + "ین جاپان" + ], + "MXN": [ + "$MX", + "پزوی مکسیکو" + ], + "NLG": [ + "NLG", + "گیلدر هالند" + ], + "NOK": [ + "NOK", + "کرون ناروی" + ], + "SEK": [ + "SEK", + "کرون سویدن" + ], + "SGD": [ + "SGD", + "دالر سینگاپور" + ], + "TJS": [ + "TJS", + "سامانی تاجکستان" + ], + "USD": [ + "$", + "دالر امریکا" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ff.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ff.json new file mode 100644 index 0000000000000000000000000000000000000000..ae3107455f1b03c571791b0b46355fb90fcb728a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ff.json @@ -0,0 +1,225 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AED": [ + "AED", + "Dirham Emiraati Araab DentuÉ—i" + ], + "AOA": [ + "AOA", + "Kwansaa Anngolaa" + ], + "AUD": [ + "A$", + "Dolaar Ostaraalii" + ], + "BHD": [ + "BHD", + "Dinaar Bahrayn" + ], + "BIF": [ + "BIF", + "MbuuÉ—u Burunndi" + ], + "BWP": [ + "BWP", + "Pulaa Botwanaa" + ], + "CAD": [ + "CA$", + "Dolaar Kandaaa" + ], + "CDF": [ + "CDF", + "Faraa Konngo" + ], + "CHF": [ + "CHF", + "Faraa Suwiis" + ], + "CNY": [ + "CNÂ¥", + "Yuam Siin" + ], + "CVE": [ + "CVE", + "Eskudoo Kap Weer" + ], + "DJF": [ + "DJF", + "Faraa Jibutii" + ], + "DZD": [ + "DZD", + "Dinaar Alaseri" + ], + "EGP": [ + "EGP", + "Liibar Ejipt" + ], + "ERN": [ + "ERN", + "Nafka Eriteree" + ], + "ETB": [ + "ETB", + "Biir Ecoppi" + ], + "EUR": [ + "€", + "Oroo" + ], + "GBP": [ + "£", + "Liibar Sterling" + ], + "GHC": [ + "GHC", + "Sedi Ganaa" + ], + "GMD": [ + "GMD", + "Dalasi Gammbi" + ], + "GNS": [ + "GNS", + "Faraa Gine" + ], + "INR": [ + "₹", + "Rupii Enndo" + ], + "JPY": [ + "JPÂ¥", + "Yen Sapoo" + ], + "KES": [ + "KES", + "Siling Keñaa" + ], + "KMF": [ + "KMF", + "Faraa Komoor" + ], + "LRD": [ + "LRD", + "Dolaar Liberiyaa" + ], + "LSL": [ + "LSL", + "Loti Lesotoo" + ], + "LYD": [ + "LYD", + "Dinaar Libi" + ], + "MAD": [ + "MAD", + "Diraham Maruk" + ], + "MGA": [ + "MGA", + "Ariyari Madagaskaar" + ], + "MRO": [ + "MRO", + "Ugiyya Muritani" + ], + "MUR": [ + "MUR", + "Rupii Moriis" + ], + "MWK": [ + "MWK", + "Kuwacca Malaawi" + ], + "MZM": [ + "MZM", + "Metikal Mosammbik" + ], + "NAD": [ + "NAD", + "Dolaar Namibii" + ], + "NGN": [ + "NGN", + "Nayraa Nijeriyaa" + ], + "RWF": [ + "RWF", + "Faraa Ruwanndaa" + ], + "SAR": [ + "SAR", + "Riyaal Arabi Sawdit" + ], + "SCR": [ + "SCR", + "Rupii Seysel" + ], + "SDG": [ + "SDG", + "Liibar Sudaan" + ], + "SHP": [ + "SHP", + "Liibar Sent Helen" + ], + "SLL": [ + "SLL", + "Lewoon Seraa Liyon" + ], + "SOS": [ + "SOS", + "Siling Soomali" + ], + "STD": [ + "STD", + "Dobra Sawo Tome e Prensipe" + ], + "SZL": [ + "SZL", + "Lilangeni Swaasilannda" + ], + "TND": [ + "TND", + "Dinaar Tunisii" + ], + "TZS": [ + "TZS", + "Siling Tansanii" + ], + "UGX": [ + "UGX", + "Siling Uganndaa" + ], + "USD": [ + "US$", + "Dolaar Dowlaaji DentuÉ—i" + ], + "XAF": [ + "FCFA", + "MbuuÉ—i Seefaa BEAC" + ], + "XOF": [ + "CFA", + "MbuuÉ—u Seefaa BCEAO" + ], + "ZAR": [ + "ZAR", + "Rannda Afrik BÅ‹ Worgo" + ], + "ZMK": [ + "ZMK", + "Kuwacca Sammbi (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kuwacca Sammbi" + ], + "ZWD": [ + "ZWD", + "Dolaar Simbaabuwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ff_GN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ff_GN.json new file mode 100644 index 0000000000000000000000000000000000000000..5bcca9826b6010ac6bbc8791be2821c9d7cf45e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ff_GN.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GNF": [ + "FG", + "GNF" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ff_MR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ff_MR.json new file mode 100644 index 0000000000000000000000000000000000000000..1785988ce25f9ea82218b9f7636ec5caa07606f5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ff_MR.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MRO": [ + "UM", + "Ugiyya Muritani" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fi.json new file mode 100644 index 0000000000000000000000000000000000000000..c7c146fd88849b2745698d1d2e5f012c4447da6b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fi.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.29.88", + "Names": { + "ADP": [ + "ADP", + "Andorran peseta" + ], + "AED": [ + "AED", + "Arabiemiirikuntien dirhami" + ], + "AFA": [ + "AFA", + "Afganistanin afgaani (1927–2002)" + ], + "AFN": [ + "AFN", + "Afganistanin afgaani" + ], + "ALK": [ + "ALK", + "Albanian lek (1946–1965)" + ], + "ALL": [ + "ALL", + "Albanian lek" + ], + "AMD": [ + "AMD", + "Armenian dram" + ], + "ANG": [ + "ANG", + "Alankomaiden Antillien guldeni" + ], + "AOA": [ + "AOA", + "Angolan kwanza" + ], + "AOK": [ + "AOK", + "Angolan kwanza (1977–1991)" + ], + "AON": [ + "AON", + "Angolan uusi kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angolan kwanza reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentiinan austral" + ], + "ARL": [ + "ARL", + "Argentiinan ley-peso (1970–1983)" + ], + "ARM": [ + "ARM", + "Argentiinan peso (1881–1970)" + ], + "ARP": [ + "ARP", + "Argentiinan peso (1983–1985)" + ], + "ARS": [ + "ARS", + "Argentiinan peso" + ], + "ATS": [ + "ATS", + "Itävallan Å¡illinki" + ], + "AUD": [ + "AUD", + "Australian dollari" + ], + "AWG": [ + "AWG", + "Aruban floriini" + ], + "AZM": [ + "AZM", + "Azerbaidžanin manat (1993–2006)" + ], + "AZN": [ + "AZN", + "Azerbaidžanin manat" + ], + "BAD": [ + "BAD", + "Bosnia-Hertsegovinan dinaari (1992–1994)" + ], + "BAM": [ + "BAM", + "Bosnia-Hertsegovinan vaihdettava markka" + ], + "BAN": [ + "BAN", + "Bosnia-Hertsegovinan uusi dinaari (1994–1997)" + ], + "BBD": [ + "BBD", + "Barbadosin dollari" + ], + "BDT": [ + "BDT", + "Bangladeshin taka" + ], + "BEC": [ + "BEC", + "Belgian vaihdettava frangi" + ], + "BEF": [ + "BEF", + "Belgian frangi" + ], + "BEL": [ + "BEL", + "Belgian rahoitusfrangi" + ], + "BGL": [ + "BGL", + "Bulgarian kova lev" + ], + "BGM": [ + "BGM", + "Bulgarian sosialistinen lev" + ], + "BGN": [ + "BGN", + "Bulgarian lev" + ], + "BGO": [ + "BGO", + "Bulgarian lev (1879–1952)" + ], + "BHD": [ + "BHD", + "Bahrainin dinaari" + ], + "BIF": [ + "BIF", + "Burundin frangi" + ], + "BMD": [ + "BMD", + "Bermudan dollari" + ], + "BND": [ + "BND", + "Brunein dollari" + ], + "BOB": [ + "BOB", + "Bolivian boliviano" + ], + "BOL": [ + "BOL", + "Bolivian boliviano (1863–1963)" + ], + "BOP": [ + "BOP", + "Bolivian peso" + ], + "BOV": [ + "BOV", + "Bolivian mvdol" + ], + "BRB": [ + "BRB", + "Brasilian uusi cruzeiro (1967–1986)" + ], + "BRC": [ + "BRC", + "Brasilian cruzado (1986–1989)" + ], + "BRE": [ + "BRE", + "Brasilian cruzeiro (1990–1993)" + ], + "BRL": [ + "BRL", + "Brasilian real" + ], + "BRN": [ + "BRN", + "Brasilian uusi cruzado (1989–1990)" + ], + "BRR": [ + "BRR", + "Brasilian cruzeiro (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Brasilian cruzeiro (1942–1967)" + ], + "BSD": [ + "BSD", + "Bahaman dollari" + ], + "BTN": [ + "BTN", + "Bhutanin ngultrum" + ], + "BUK": [ + "BUK", + "Burman kyat" + ], + "BWP": [ + "BWP", + "Botswanan pula" + ], + "BYB": [ + "BYB", + "Valko-Venäjän uusi rupla (1994–1999)" + ], + "BYN": [ + "BYN", + "Valko-Venäjän rupla" + ], + "BYR": [ + "BYR", + "Valko-Venäjän rupla (2000–2016)" + ], + "BZD": [ + "BZD", + "Belizen dollari" + ], + "CAD": [ + "CAD", + "Kanadan dollari" + ], + "CDF": [ + "CDF", + "Kongon frangi" + ], + "CHE": [ + "CHE", + "Sveitsin WIR-euro" + ], + "CHF": [ + "CHF", + "Sveitsin frangi" + ], + "CHW": [ + "CHW", + "Sveitsin WIR-frangi" + ], + "CLE": [ + "CLE", + "Chilen escudo" + ], + "CLF": [ + "CLF", + "Chilen unidades de fomento" + ], + "CLP": [ + "CLP", + "Chilen peso" + ], + "CNX": [ + "CNX", + "Kiinan kansanpankin dollari" + ], + "CNY": [ + "CNY", + "Kiinan juan" + ], + "COP": [ + "COP", + "Kolumbian peso" + ], + "COU": [ + "COU", + "Kolumbian unidad de valor real" + ], + "CRC": [ + "CRC", + "Costa Rican colon" + ], + "CSD": [ + "CSD", + "Serbian dinaari (2002–2006)" + ], + "CSK": [ + "CSK", + "TÅ¡ekkoslovakian kova koruna" + ], + "CUC": [ + "CUC", + "Kuuban vaihdettava peso" + ], + "CUP": [ + "CUP", + "Kuuban peso" + ], + "CVE": [ + "CVE", + "Kap Verden escudo" + ], + "CYP": [ + "CYP", + "Kyproksen punta" + ], + "CZK": [ + "CZK", + "TÅ¡ekin koruna" + ], + "DDM": [ + "DDM", + "Itä-Saksan markka" + ], + "DEM": [ + "DEM", + "Saksan markka" + ], + "DJF": [ + "DJF", + "Djiboutin frangi" + ], + "DKK": [ + "DKK", + "Tanskan kruunu" + ], + "DOP": [ + "DOP", + "Dominikaanisen tasavallan peso" + ], + "DZD": [ + "DZD", + "Algerian dinaari" + ], + "ECS": [ + "ECS", + "Ecuadorin sucre" + ], + "ECV": [ + "ECV", + "Ecuadorin UVC" + ], + "EEK": [ + "EEK", + "Viron kruunu" + ], + "EGP": [ + "EGP", + "Egyptin punta" + ], + "ERN": [ + "ERN", + "Eritrean nakfa" + ], + "ESA": [ + "ESA", + "Espanjan peseta (A–tili)" + ], + "ESB": [ + "ESB", + "Espanjan peseta (vaihdettava tili)" + ], + "ESP": [ + "ESP", + "Espanjan peseta" + ], + "ETB": [ + "ETB", + "Etiopian birr" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "mk", + "Suomen markka" + ], + "FJD": [ + "FJD", + "Fidžin dollari" + ], + "FKP": [ + "FKP", + "Falklandinsaarten punta" + ], + "FRF": [ + "FRF", + "Ranskan frangi" + ], + "GBP": [ + "£", + "Englannin punta" + ], + "GEK": [ + "GEK", + "Georgian kuponkilari" + ], + "GEL": [ + "GEL", + "Georgian lari" + ], + "GHC": [ + "GHC", + "Ghanan cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "Ghanan cedi" + ], + "GIP": [ + "GIP", + "Gibraltarin punta" + ], + "GMD": [ + "GMD", + "Gambian dalasi" + ], + "GNF": [ + "GNF", + "Guinean frangi" + ], + "GNS": [ + "GNS", + "Guinean syli" + ], + "GQE": [ + "GQE", + "Päiväntasaajan Guinean ekwele" + ], + "GRD": [ + "GRD", + "Kreikan drakma" + ], + "GTQ": [ + "GTQ", + "Guatemalan quetzal" + ], + "GWE": [ + "GWE", + "Portugalin Guinean escudo" + ], + "GWP": [ + "GWP", + "Guinea-Bissaun peso" + ], + "GYD": [ + "GYD", + "Guyanan dollari" + ], + "HKD": [ + "HKD", + "Hongkongin dollari" + ], + "HNL": [ + "HNL", + "Hondurasin lempira" + ], + "HRD": [ + "HRD", + "Kroatian dinaari" + ], + "HRK": [ + "HRK", + "Kroatian kuna" + ], + "HTG": [ + "HTG", + "Haitin gourde" + ], + "HUF": [ + "HUF", + "Unkarin forintti" + ], + "IDR": [ + "IDR", + "Indonesian rupia" + ], + "IEP": [ + "IEP", + "Irlannin punta" + ], + "ILP": [ + "ILP", + "Israelin punta" + ], + "ILR": [ + "ILR", + "Israelin sekeli (1980–1985)" + ], + "ILS": [ + "ILS", + "Israelin uusi sekeli" + ], + "INR": [ + "INR", + "Intian rupia" + ], + "IQD": [ + "IQD", + "Irakin dinaari" + ], + "IRR": [ + "IRR", + "Iranin rial" + ], + "ISJ": [ + "ISJ", + "Islannin kruunu (1918–1981)" + ], + "ISK": [ + "ISK", + "Islannin kruunu" + ], + "ITL": [ + "ITL", + "Italian liira" + ], + "JMD": [ + "JMD", + "Jamaikan dollari" + ], + "JOD": [ + "JOD", + "Jordanian dinaari" + ], + "JPY": [ + "Â¥", + "Japanin jeni" + ], + "KES": [ + "KES", + "Kenian Å¡illinki" + ], + "KGS": [ + "KGS", + "Kirgisian som" + ], + "KHR": [ + "KHR", + "Kambodžan riel" + ], + "KMF": [ + "KMF", + "Komorien frangi" + ], + "KPW": [ + "KPW", + "Pohjois-Korean won" + ], + "KRH": [ + "KRH", + "Etelä-Korean hwan (1953–1962)" + ], + "KRO": [ + "KRO", + "Etelä-Korean won (1945–1953)" + ], + "KRW": [ + "KRW", + "Etelä-Korean won" + ], + "KWD": [ + "KWD", + "Kuwaitin dinaari" + ], + "KYD": [ + "KYD", + "Caymansaarten dollari" + ], + "KZT": [ + "KZT", + "Kazakstanin tenge" + ], + "LAK": [ + "LAK", + "Laosin kip" + ], + "LBP": [ + "LBP", + "Libanonin punta" + ], + "LKR": [ + "LKR", + "Sri Lankan rupia" + ], + "LRD": [ + "LRD", + "Liberian dollari" + ], + "LSL": [ + "LSL", + "Lesothon loti" + ], + "LTL": [ + "LTL", + "Liettuan liti" + ], + "LTT": [ + "LTT", + "Liettuan talonas" + ], + "LUC": [ + "LUC", + "Luxemburgin vaihdettava frangi" + ], + "LUF": [ + "LUF", + "Luxemburgin frangi" + ], + "LUL": [ + "LUL", + "Luxemburgin rahoitusfrangi" + ], + "LVL": [ + "LVL", + "Latvian lati" + ], + "LVR": [ + "LVR", + "Latvian rupla" + ], + "LYD": [ + "LYD", + "Libyan dinaari" + ], + "MAD": [ + "MAD", + "Marokon dirhami" + ], + "MAF": [ + "MAF", + "Marokon frangi" + ], + "MCF": [ + "MCF", + "Monacon frangi" + ], + "MDC": [ + "MDC", + "Moldovan kuponkileu" + ], + "MDL": [ + "MDL", + "Moldovan leu" + ], + "MGA": [ + "MGA", + "Madagaskarin ariary" + ], + "MGF": [ + "MGF", + "Madagaskarin frangi" + ], + "MKD": [ + "MKD", + "Makedonian denaari" + ], + "MKN": [ + "MKN", + "Makedonian dinaari (1992–1993)" + ], + "MLF": [ + "MLF", + "Malin frangi" + ], + "MMK": [ + "MMK", + "Myanmarin kyat" + ], + "MNT": [ + "MNT", + "Mongolian tugrik" + ], + "MOP": [ + "MOP", + "Macaon pataca" + ], + "MRO": [ + "MRO", + "Mauritanian ouguiya" + ], + "MTL": [ + "MTL", + "Maltan liira" + ], + "MTP": [ + "MTP", + "Maltan punta" + ], + "MUR": [ + "MUR", + "Mauritiuksen rupia" + ], + "MVP": [ + "MVP", + "Malediivien rupia (1947–1981)" + ], + "MVR": [ + "MVR", + "Malediivien rufiyaa" + ], + "MWK": [ + "MWK", + "Malawin kwacha" + ], + "MXN": [ + "MXN", + "Meksikon peso" + ], + "MXP": [ + "MXP", + "Meksikon hopeapeso (1861–1992)" + ], + "MXV": [ + "MXV", + "Meksikon UDI" + ], + "MYR": [ + "MYR", + "Malesian ringgit" + ], + "MZE": [ + "MZE", + "Mosambikin escudo" + ], + "MZM": [ + "MZM", + "Mosambikin metical (1980–2006)" + ], + "MZN": [ + "MZN", + "Mosambikin metical" + ], + "NAD": [ + "NAD", + "Namibian dollari" + ], + "NGN": [ + "NGN", + "Nigerian naira" + ], + "NIC": [ + "NIC", + "Nicaraguan córdoba (1988–1991)" + ], + "NIO": [ + "NIO", + "Nicaraguan córdoba" + ], + "NLG": [ + "NLG", + "Alankomaiden guldeni" + ], + "NOK": [ + "NOK", + "Norjan kruunu" + ], + "NPR": [ + "NPR", + "Nepalin rupia" + ], + "NZD": [ + "NZD", + "Uuden-Seelannin dollari" + ], + "OMR": [ + "OMR", + "Omanin rial" + ], + "PAB": [ + "PAB", + "Panaman balboa" + ], + "PEI": [ + "PEI", + "Perun inti" + ], + "PEN": [ + "PEN", + "Perun uusi sol" + ], + "PES": [ + "PES", + "Perun sol (1863–1965)" + ], + "PGK": [ + "PGK", + "Papua-Uuden-Guinean kina" + ], + "PHP": [ + "PHP", + "Filippiinien peso" + ], + "PKR": [ + "PKR", + "Pakistanin rupia" + ], + "PLN": [ + "PLN", + "Puolan zloty" + ], + "PLZ": [ + "PLZ", + "Puolan zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugalin escudo" + ], + "PYG": [ + "PYG", + "Paraguayn guarani" + ], + "QAR": [ + "QAR", + "Qatarin rial" + ], + "RHD": [ + "RHD", + "Rhodesian dollari" + ], + "ROL": [ + "ROL", + "Romanian leu (1952–2006)" + ], + "RON": [ + "RON", + "Romanian leu" + ], + "RSD": [ + "RSD", + "Serbian dinaari" + ], + "RUB": [ + "RUB", + "Venäjän rupla" + ], + "RUR": [ + "RUR", + "Venäjän rupla (1991–1998)" + ], + "RWF": [ + "RWF", + "Ruandan frangi" + ], + "SAR": [ + "SAR", + "Saudi-Arabian rial" + ], + "SBD": [ + "SBD", + "Salomonsaarten dollari" + ], + "SCR": [ + "SCR", + "Seychellien rupia" + ], + "SDD": [ + "SDD", + "Sudanin dinaari (1992–2007)" + ], + "SDG": [ + "SDG", + "Sudanin punta" + ], + "SDP": [ + "SDP", + "Sudanin punta (1957–1998)" + ], + "SEK": [ + "SEK", + "Ruotsin kruunu" + ], + "SGD": [ + "SGD", + "Singaporen dollari" + ], + "SHP": [ + "SHP", + "Saint Helenan punta" + ], + "SIT": [ + "SIT", + "Slovenian tolar" + ], + "SKK": [ + "SKK", + "Slovakian koruna" + ], + "SLL": [ + "SLL", + "Sierra Leonen leone" + ], + "SOS": [ + "SOS", + "Somalian Å¡illinki" + ], + "SRD": [ + "SRD", + "Surinamen dollari" + ], + "SRG": [ + "SRG", + "Surinamen guldeni" + ], + "SSP": [ + "SSP", + "Etelä-Sudanin punta" + ], + "STD": [ + "STD", + "São Tomén ja Príncipen dobra" + ], + "SUR": [ + "SUR", + "Neuvostoliiton rupla" + ], + "SVC": [ + "SVC", + "El Salvadorin colon" + ], + "SYP": [ + "SYP", + "Syyrian punta" + ], + "SZL": [ + "SZL", + "Swazimaan lilangeni" + ], + "THB": [ + "THB", + "Thaimaan baht" + ], + "TJR": [ + "TJR", + "Tadžikistanin rupla" + ], + "TJS": [ + "TJS", + "Tadžikistanin somoni" + ], + "TMM": [ + "TMM", + "Turkmenistanin manat (1993–2009)" + ], + "TMT": [ + "TMT", + "Turkmenistanin manat" + ], + "TND": [ + "TND", + "Tunisian dinaari" + ], + "TOP": [ + "TOP", + "Tongan pa’anga" + ], + "TPE": [ + "TPE", + "Timorin escudo" + ], + "TRL": [ + "TRL", + "Turkin liira (1922–2005)" + ], + "TRY": [ + "TRY", + "Turkin liira" + ], + "TTD": [ + "TTD", + "Trinidadin ja Tobagon dollari" + ], + "TWD": [ + "TWD", + "Taiwanin uusi dollari" + ], + "TZS": [ + "TZS", + "Tansanian Å¡illinki" + ], + "UAH": [ + "UAH", + "Ukrainan hryvnia" + ], + "UAK": [ + "UAK", + "Ukrainan karbovanetz" + ], + "UGS": [ + "UGS", + "Ugandan Å¡illinki (1966–1987)" + ], + "UGX": [ + "UGX", + "Ugandan Å¡illinki" + ], + "USD": [ + "$", + "Yhdysvaltain dollari" + ], + "USN": [ + "USN", + "Yhdysvaltain dollari (seuraava päivä)" + ], + "USS": [ + "USS", + "Yhdysvaltain dollari (sama päivä)" + ], + "UYI": [ + "UYI", + "Uruguayn peso en unidades indexadas" + ], + "UYP": [ + "UYP", + "Uruguayn peso (1975–1993)" + ], + "UYU": [ + "UYU", + "Uruguayn peso" + ], + "UZS": [ + "UZS", + "Uzbekistanin som" + ], + "VEB": [ + "VEB", + "Venezuelan bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "Venezuelan bolivar" + ], + "VND": [ + "VND", + "Vietnamin dong" + ], + "VNN": [ + "VNN", + "Vietnamin dong (1978–1985)" + ], + "VUV": [ + "VUV", + "Vanuatun vatu" + ], + "WST": [ + "WST", + "Samoan tala" + ], + "XAF": [ + "FCFA", + "CFA-frangi BEAC" + ], + "XCD": [ + "XCD", + "Itä-Karibian dollari" + ], + "XEU": [ + "XEU", + "Euroopan valuuttayksikkö (ECU)" + ], + "XFO": [ + "XFO", + "Ranskan kultafrangi" + ], + "XFU": [ + "XFU", + "Ranskan UIC-frangi" + ], + "XOF": [ + "CFA", + "CFA-frangi BCEAO" + ], + "XPF": [ + "XPF", + "CFP-frangi" + ], + "XRE": [ + "XRE", + "RINET-rahastot" + ], + "YDD": [ + "YDD", + "Jemenin dinaari" + ], + "YER": [ + "YER", + "Jemenin rial" + ], + "YUD": [ + "YUD", + "Jugoslavian kova dinaari (1966–1990)" + ], + "YUM": [ + "YUM", + "Jugoslavian uusi dinaari (1994–2002)" + ], + "YUN": [ + "YUN", + "Jugoslavian vaihdettava dinaari (1990–1992)" + ], + "YUR": [ + "YUR", + "Jugoslavian uudistettu dinaari (1992–1993)" + ], + "ZAL": [ + "ZAL", + "Etelä-Afrikan rahoitusrandi" + ], + "ZAR": [ + "ZAR", + "Etelä-Afrikan randi" + ], + "ZMK": [ + "ZMK", + "Sambian kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Sambian kwacha" + ], + "ZRN": [ + "ZRN", + "Zairen uusi zaire (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zairen zaire (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Zimbabwen dollari (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Zimbabwen dollari (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabwen dollari (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fo.json new file mode 100644 index 0000000000000000000000000000000000000000..3cb3fd594879a231b5463f2f1e0ee062359cca2b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fo.json @@ -0,0 +1,625 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AED": [ + "AED", + "Sameindu Emirríkini dirham" + ], + "AFN": [ + "AFN", + "Afganistan afghani" + ], + "ALL": [ + "ALL", + "Albania lek" + ], + "AMD": [ + "AMD", + "Armenia dram" + ], + "ANG": [ + "ANG", + "Niðurlonds Karibia gyllin" + ], + "AOA": [ + "AOA", + "Angola kwanza" + ], + "ARS": [ + "ARS", + "Argentina peso" + ], + "AUD": [ + "A$", + "Avstralskur dollari" + ], + "AWG": [ + "AWG", + "Aruba florin" + ], + "AZN": [ + "AZN", + "Aserbadjan manat" + ], + "BAM": [ + "BAM", + "Bosnia-Hersegovina mark (kann vekslast)" + ], + "BBD": [ + "BBD", + "Barbados dollari" + ], + "BDT": [ + "BDT", + "Bangladesj taka" + ], + "BGN": [ + "BGN", + "Bulgaria lev" + ], + "BHD": [ + "BHD", + "Barein dinar" + ], + "BIF": [ + "BIF", + "Burundi frankur" + ], + "BMD": [ + "BMD", + "Bermuda dollari" + ], + "BND": [ + "BND", + "Brunei dollari" + ], + "BOB": [ + "BOB", + "Bolivia boliviano" + ], + "BRL": [ + "R$", + "Brasilianskur real" + ], + "BSD": [ + "BSD", + "Bahamaoyggjar dollari" + ], + "BTN": [ + "BTN", + "Butan ngultrum" + ], + "BWP": [ + "BWP", + "Botsvana pula" + ], + "BYN": [ + "BYN", + "Hvítarussland ruble" + ], + "BYR": [ + "BYR", + "Hvítarussland ruble (2000–2016)" + ], + "BZD": [ + "BZD", + "Belis dollari" + ], + "CAD": [ + "CA$", + "Kanada dollari" + ], + "CDF": [ + "CDF", + "Kongo frankur" + ], + "CHF": [ + "CHF", + "sveisiskur frankur" + ], + "CLP": [ + "CLP", + "Kili peso" + ], + "CNY": [ + "CNÂ¥", + "kinesiskur yuan" + ], + "COP": [ + "COP", + "Kolombia peso" + ], + "CRC": [ + "CRC", + "Kosta Rika colón" + ], + "CUC": [ + "CUC", + "Kuba peso (sum kann vekslast)" + ], + "CUP": [ + "CUP", + "Kuba peso" + ], + "CVE": [ + "CVE", + "Grønhøvdaoyggjar escudo" + ], + "CZK": [ + "CZK", + "Kekkia koruna" + ], + "DJF": [ + "DJF", + "Djibuti frankur" + ], + "DKK": [ + "kr", + "donsk króna" + ], + "DOP": [ + "DOP", + "Dominika peso" + ], + "DZD": [ + "DZD", + "Algeria dinar" + ], + "EGP": [ + "EGP", + "Egyptaland pund" + ], + "ERN": [ + "ERN", + "Eritrea nakfa" + ], + "ETB": [ + "ETB", + "Etiopia birr" + ], + "EUR": [ + "€", + "Evra" + ], + "FJD": [ + "FJD", + "Fiji dollari" + ], + "FKP": [ + "FKP", + "Falklandsoyggjar pund" + ], + "GBP": [ + "£", + "bretsk pund" + ], + "GEL": [ + "GEL", + "Georgia lari" + ], + "GHS": [ + "GHS", + "Gana cedi" + ], + "GIP": [ + "GIP", + "Gibraltar pund" + ], + "GMD": [ + "GMD", + "Gambia dalasi" + ], + "GNF": [ + "GNF", + "Guinea frankur" + ], + "GTQ": [ + "GTQ", + "Guatemala quetzal" + ], + "GYD": [ + "GYD", + "Gujana dollari" + ], + "HKD": [ + "HK$", + "Hong Kong dollari" + ], + "HNL": [ + "HNL", + "Honduras lempira" + ], + "HRK": [ + "HRK", + "Kroatia kuna" + ], + "HTG": [ + "HTG", + "Haiti gourde" + ], + "HUF": [ + "HUF", + "Ungarn forint" + ], + "IDR": [ + "IDR", + "Indonesia rupiah" + ], + "ILS": [ + "₪", + "Ãsrael new sheqel" + ], + "INR": [ + "₹", + "indiskir rupis" + ], + "IQD": [ + "IQD", + "Irak dinar" + ], + "IRR": [ + "IRR", + "iranskir rials" + ], + "ISK": [ + "ISK", + "íslendsk króna" + ], + "JMD": [ + "JMD", + "Jamaika dollari" + ], + "JOD": [ + "JOD", + "Jordan dinar" + ], + "JPY": [ + "JPÂ¥", + "japanskur yen" + ], + "KES": [ + "KES", + "kenjanskur skillingur" + ], + "KGS": [ + "KGS", + "Kirgisia som" + ], + "KHR": [ + "KHR", + "Kambodja riel" + ], + "KMF": [ + "KMF", + "Komoroyggjar frankur" + ], + "KPW": [ + "KPW", + "Norðurkorea won" + ], + "KRW": [ + "â‚©", + "Suðurkorea won" + ], + "KWD": [ + "KWD", + "Kuvait dinar" + ], + "KYD": [ + "KYD", + "Caymanoyggjar dollari" + ], + "KZT": [ + "KZT", + "Kasakstan tenge" + ], + "LAK": [ + "LAK", + "Laos kip" + ], + "LBP": [ + "LBP", + "Libanon pund" + ], + "LKR": [ + "LKR", + "Sri Lanka rupi" + ], + "LRD": [ + "LRD", + "Liberia dollari" + ], + "LYD": [ + "LYD", + "Libya dinar" + ], + "MAD": [ + "MAD", + "Marokko dirham" + ], + "MDL": [ + "MDL", + "Moldova leu" + ], + "MGA": [ + "MGA", + "Madagaskar ariary" + ], + "MKD": [ + "MKD", + "Makedónia denar" + ], + "MMK": [ + "MMK", + "Myanmar (Burma) kyat" + ], + "MNT": [ + "MNT", + "Mongolia tugrik" + ], + "MOP": [ + "MOP", + "Makao pataca" + ], + "MRO": [ + "MRO", + "Móritania ouguiya" + ], + "MUR": [ + "MUR", + "Móritius rupi" + ], + "MVR": [ + "MVR", + "Maldivoyggjar rufiyaa" + ], + "MWK": [ + "MWK", + "Malavi kwacha" + ], + "MXN": [ + "MX$", + "Meksiko peso" + ], + "MYR": [ + "MYR", + "Malaisia ringgit" + ], + "MZN": [ + "MZN", + "Mosambik metical" + ], + "NAD": [ + "NAD", + "Namibia dollari" + ], + "NGN": [ + "NGN", + "Nigeria naira" + ], + "NIO": [ + "NIO", + "Nikaragua córdoba" + ], + "NOK": [ + "NOK", + "norsk króna" + ], + "NPR": [ + "NPR", + "Nepal rupi" + ], + "NZD": [ + "NZ$", + "Nýsæland dollari" + ], + "OMR": [ + "OMR", + "Oman rial" + ], + "PAB": [ + "PAB", + "Panama balboa" + ], + "PEN": [ + "PEN", + "Peru nuevo sol" + ], + "PGK": [ + "PGK", + "Papua Nýguinea kina" + ], + "PHP": [ + "PHP", + "Filipsoyggjar peso" + ], + "PKR": [ + "PKR", + "Pakistan rupi" + ], + "PLN": [ + "PLN", + "Pólland zloty" + ], + "PYG": [ + "PYG", + "Paraguai guarani" + ], + "QAR": [ + "QAR", + "Katar rial" + ], + "RON": [ + "RON", + "Rumenia leu" + ], + "RSD": [ + "RSD", + "Serbia dinar" + ], + "RUB": [ + "RUB", + "Russland ruble" + ], + "RWF": [ + "RWF", + "Ruanda frankur" + ], + "SAR": [ + "SAR", + "Saudiarabia riyal" + ], + "SBD": [ + "SBD", + "Salomonoyggjar dollari" + ], + "SCR": [ + "SCR", + "Seyskelloyggjar rupi" + ], + "SDG": [ + "SDG", + "Sudan pund" + ], + "SEK": [ + "SEK", + "svensk króna" + ], + "SGD": [ + "SGD", + "Singapor dollari" + ], + "SHP": [ + "SHP", + "St. Helena pund" + ], + "SLL": [ + "SLL", + "Sierra Leona leone" + ], + "SOS": [ + "SOS", + "Somalia skillingur" + ], + "SRD": [ + "SRD", + "Surinam dollari" + ], + "SSP": [ + "SSP", + "Suðursudan pund" + ], + "STD": [ + "STD", + "Sao Tome & Prinsipi dobra" + ], + "SYP": [ + "SYP", + "Sýria pund" + ], + "SZL": [ + "SZL", + "Svasiland lilangeni" + ], + "THB": [ + "THB", + "Tailand baht" + ], + "TJS": [ + "TJS", + "Tadsjikistan somoni" + ], + "TMT": [ + "TMT", + "Turkmenistan manat" + ], + "TND": [ + "TND", + "Tunesia dinar" + ], + "TOP": [ + "TOP", + "Tonga paÊ»anga" + ], + "TRY": [ + "TRY", + "Turkaland liri" + ], + "TTD": [ + "TTD", + "Trinidad & Tobago dollari" + ], + "TWD": [ + "NT$", + "Taivan new dollari" + ], + "TZS": [ + "TZS", + "Tansania skillingur" + ], + "UAH": [ + "UAH", + "Ukraina hryvnia" + ], + "UGX": [ + "UGX", + "Uganda skillingur" + ], + "USD": [ + "US$", + "US dollari" + ], + "UYU": [ + "UYU", + "Uruguai peso" + ], + "UZS": [ + "UZS", + "Usbekistan som" + ], + "VEF": [ + "VEF", + "Venesuela bolívar" + ], + "VND": [ + "â‚«", + "Vjetnam dong" + ], + "VUV": [ + "VUV", + "Vanuatu vatu" + ], + "WST": [ + "WST", + "Samoa tala" + ], + "XAF": [ + "FCFA", + "Miðafrika CFA frankur" + ], + "XCD": [ + "EC$", + "Eystur Karibia dollari" + ], + "XOF": [ + "CFA", + "Vesturafrika CFA frankur" + ], + "XPF": [ + "CFPF", + "CFP frankur" + ], + "YER": [ + "YER", + "Jemen rial" + ], + "ZAR": [ + "ZAR", + "Suðurafrika rand" + ], + "ZMW": [ + "ZMW", + "Sambia kwacha" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fo_DK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fo_DK.json new file mode 100644 index 0000000000000000000000000000000000000000..ae82859e2e9e109272f91425038d4ed1d2db468a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fo_DK.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "DKK": [ + "kr.", + "donsk króna" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr.json new file mode 100644 index 0000000000000000000000000000000000000000..39801477043a631ef50abc56101e0479bfa1defd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr.json @@ -0,0 +1,1069 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "peseta andorrane" + ], + "AED": [ + "AED", + "dirham des Émirats arabes unis" + ], + "AFA": [ + "AFA", + "afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "afghani afghan" + ], + "ALK": [ + "ALK", + "lek albanais (1947–1961)" + ], + "ALL": [ + "ALL", + "lek albanais" + ], + "AMD": [ + "AMD", + "dram arménien" + ], + "ANG": [ + "ANG", + "florin antillais" + ], + "AOA": [ + "AOA", + "kwanza angolais" + ], + "AOK": [ + "AOK", + "kwanza angolais (1977–1990)" + ], + "AON": [ + "AON", + "nouveau kwanza angolais (1990–2000)" + ], + "AOR": [ + "AOR", + "kwanza angolais réajusté (1995–1999)" + ], + "ARA": [ + "ARA", + "austral argentin" + ], + "ARP": [ + "ARP", + "peso argentin (1983–1985)" + ], + "ARS": [ + "$AR", + "peso argentin" + ], + "ATS": [ + "ATS", + "schilling autrichien" + ], + "AUD": [ + "$AU", + "dollar australien" + ], + "AWG": [ + "AWG", + "florin arubais" + ], + "AZM": [ + "AZM", + "manat azéri (1993–2006)" + ], + "AZN": [ + "AZN", + "manat azéri" + ], + "BAD": [ + "BAD", + "dinar bosniaque" + ], + "BAM": [ + "BAM", + "mark convertible bosniaque" + ], + "BBD": [ + "BBD", + "dollar barbadien" + ], + "BDT": [ + "BDT", + "taka bangladeshi" + ], + "BEC": [ + "BEC", + "franc belge (convertible)" + ], + "BEF": [ + "FB", + "franc belge" + ], + "BEL": [ + "BEL", + "franc belge (financier)" + ], + "BGL": [ + "BGL", + "lev bulgare (1962–1999)" + ], + "BGN": [ + "BGN", + "lev bulgare" + ], + "BHD": [ + "BHD", + "dinar bahreïni" + ], + "BIF": [ + "BIF", + "franc burundais" + ], + "BMD": [ + "$BM", + "dollar bermudien" + ], + "BND": [ + "$BN", + "dollar brunéien" + ], + "BOB": [ + "BOB", + "boliviano bolivien" + ], + "BOP": [ + "BOP", + "peso bolivien" + ], + "BOV": [ + "BOV", + "mvdol bolivien" + ], + "BRB": [ + "BRB", + "nouveau cruzeiro brésilien (1967–1986)" + ], + "BRC": [ + "BRC", + "cruzado brésilien (1986–1989)" + ], + "BRE": [ + "BRE", + "cruzeiro brésilien (1990–1993)" + ], + "BRL": [ + "R$", + "réal brésilien" + ], + "BRN": [ + "BRN", + "nouveau cruzado" + ], + "BRR": [ + "BRR", + "cruzeiro" + ], + "BSD": [ + "$BS", + "dollar bahaméen" + ], + "BTN": [ + "BTN", + "ngultrum bouthanais" + ], + "BUK": [ + "BUK", + "kyat birman" + ], + "BWP": [ + "BWP", + "pula botswanais" + ], + "BYB": [ + "BYB", + "nouveau rouble biélorusse (1994–1999)" + ], + "BYN": [ + "BYN", + "rouble biélorusse" + ], + "BYR": [ + "BYR", + "rouble biélorusse (2000–2016)" + ], + "BZD": [ + "$BZ", + "dollar bélizéen" + ], + "CAD": [ + "$CA", + "dollar canadien" + ], + "CDF": [ + "CDF", + "franc congolais" + ], + "CHE": [ + "CHE", + "euro WIR" + ], + "CHF": [ + "CHF", + "franc suisse" + ], + "CHW": [ + "CHW", + "franc WIR" + ], + "CLF": [ + "CLF", + "unité d’investissement chilienne" + ], + "CLP": [ + "$CL", + "peso chilien" + ], + "CNY": [ + "CNY", + "yuan renminbi chinois" + ], + "COP": [ + "$CO", + "peso colombien" + ], + "COU": [ + "COU", + "unité de valeur réelle colombienne" + ], + "CRC": [ + "CRC", + "colón costaricain" + ], + "CSD": [ + "CSD", + "dinar serbo-monténégrin" + ], + "CSK": [ + "CSK", + "couronne forte tchécoslovaque" + ], + "CUC": [ + "CUC", + "peso cubain convertible" + ], + "CUP": [ + "CUP", + "peso cubain" + ], + "CVE": [ + "CVE", + "escudo capverdien" + ], + "CYP": [ + "£CY", + "livre chypriote" + ], + "CZK": [ + "CZK", + "couronne tchèque" + ], + "DDM": [ + "DDM", + "mark est-allemand" + ], + "DEM": [ + "DEM", + "mark allemand" + ], + "DJF": [ + "DJF", + "franc djiboutien" + ], + "DKK": [ + "DKK", + "couronne danoise" + ], + "DOP": [ + "DOP", + "peso dominicain" + ], + "DZD": [ + "DZD", + "dinar algérien" + ], + "ECS": [ + "ECS", + "sucre équatorien" + ], + "ECV": [ + "ECV", + "unité de valeur constante équatoriale (UVC)" + ], + "EEK": [ + "EEK", + "couronne estonienne" + ], + "EGP": [ + "EGP", + "livre égyptienne" + ], + "ERN": [ + "ERN", + "nafka érythréen" + ], + "ESA": [ + "ESA", + "peseta espagnole (compte A)" + ], + "ESB": [ + "ESB", + "peseta espagnole (compte convertible)" + ], + "ESP": [ + "ESP", + "peseta espagnole" + ], + "ETB": [ + "ETB", + "birr éthiopien" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "mark finlandais" + ], + "FJD": [ + "$FJ", + "dollar fidjien" + ], + "FKP": [ + "£FK", + "livre des îles Malouines" + ], + "FRF": [ + "F", + "franc français" + ], + "GBP": [ + "£GB", + "livre sterling" + ], + "GEK": [ + "GEK", + "coupon de lari géorgien" + ], + "GEL": [ + "GEL", + "lari géorgien" + ], + "GHC": [ + "GHC", + "cédi" + ], + "GHS": [ + "GHS", + "cédi ghanéen" + ], + "GIP": [ + "£GI", + "livre de Gibraltar" + ], + "GMD": [ + "GMD", + "dalasi gambien" + ], + "GNF": [ + "GNF", + "franc guinéen" + ], + "GNS": [ + "GNS", + "syli guinéen" + ], + "GQE": [ + "GQE", + "ekwélé équatoguinéen" + ], + "GRD": [ + "GRD", + "drachme grecque" + ], + "GTQ": [ + "GTQ", + "quetzal guatémaltèque" + ], + "GWE": [ + "GWE", + "escudo de Guinée portugaise" + ], + "GWP": [ + "GWP", + "peso bissau-guinéen" + ], + "GYD": [ + "GYD", + "dollar du Guyana" + ], + "HKD": [ + "HKD", + "dollar de Hong Kong" + ], + "HNL": [ + "HNL", + "lempira hondurien" + ], + "HRD": [ + "HRD", + "dinar croate" + ], + "HRK": [ + "HRK", + "kuna croate" + ], + "HTG": [ + "HTG", + "gourde haïtienne" + ], + "HUF": [ + "HUF", + "forint hongrois" + ], + "IDR": [ + "IDR", + "roupie indonésienne" + ], + "IEP": [ + "£IE", + "livre irlandaise" + ], + "ILP": [ + "£IL", + "livre israélienne" + ], + "ILS": [ + "₪", + "nouveau shekel israélien" + ], + "INR": [ + "₹", + "roupie indienne" + ], + "IQD": [ + "IQD", + "dinar irakien" + ], + "IRR": [ + "IRR", + "rial iranien" + ], + "ISK": [ + "ISK", + "couronne islandaise" + ], + "ITL": [ + "₤IT", + "lire italienne" + ], + "JMD": [ + "JMD", + "dollar jamaïcain" + ], + "JOD": [ + "JOD", + "dinar jordanien" + ], + "JPY": [ + "JPY", + "yen japonais" + ], + "KES": [ + "KES", + "shilling kényan" + ], + "KGS": [ + "KGS", + "som kirghize" + ], + "KHR": [ + "KHR", + "riel cambodgien" + ], + "KMF": [ + "KMF", + "franc comorien" + ], + "KPW": [ + "KPW", + "won nord-coréen" + ], + "KRW": [ + "â‚©", + "won sud-coréen" + ], + "KWD": [ + "KWD", + "dinar koweïtien" + ], + "KYD": [ + "KYD", + "dollar des îles Caïmans" + ], + "KZT": [ + "KZT", + "tenge kazakh" + ], + "LAK": [ + "LAK", + "kip loatien" + ], + "LBP": [ + "£LB", + "livre libanaise" + ], + "LKR": [ + "LKR", + "roupie srilankaise" + ], + "LRD": [ + "LRD", + "dollar libérien" + ], + "LSL": [ + "LSL", + "loti lesothan" + ], + "LTL": [ + "LTL", + "litas lituanien" + ], + "LTT": [ + "LTT", + "talonas lituanien" + ], + "LUC": [ + "LUC", + "franc convertible luxembourgeois" + ], + "LUF": [ + "LUF", + "franc luxembourgeois" + ], + "LUL": [ + "LUL", + "franc financier luxembourgeois" + ], + "LVL": [ + "LVL", + "lats letton" + ], + "LVR": [ + "LVR", + "rouble letton" + ], + "LYD": [ + "LYD", + "dinar libyen" + ], + "MAD": [ + "MAD", + "dirham marocain" + ], + "MAF": [ + "MAF", + "franc marocain" + ], + "MDL": [ + "MDL", + "leu moldave" + ], + "MGA": [ + "MGA", + "ariary malgache" + ], + "MGF": [ + "MGF", + "franc malgache" + ], + "MKD": [ + "MKD", + "denar macédonien" + ], + "MLF": [ + "MLF", + "franc malien" + ], + "MMK": [ + "MMK", + "kyat myanmarais" + ], + "MNT": [ + "MNT", + "tugrik mongol" + ], + "MOP": [ + "MOP", + "pataca macanaise" + ], + "MRO": [ + "MRO", + "ouguiya mauritanien" + ], + "MTL": [ + "MTL", + "lire maltaise" + ], + "MTP": [ + "£MT", + "livre maltaise" + ], + "MUR": [ + "MUR", + "roupie mauricienne" + ], + "MVR": [ + "MVR", + "rufiyaa maldivien" + ], + "MWK": [ + "MWK", + "kwacha malawite" + ], + "MXN": [ + "$MX", + "peso mexicain" + ], + "MXP": [ + "MXP", + "peso d’argent mexicain (1861–1992)" + ], + "MXV": [ + "MXV", + "unité de conversion mexicaine (UDI)" + ], + "MYR": [ + "MYR", + "ringgit malais" + ], + "MZE": [ + "MZE", + "escudo mozambicain" + ], + "MZM": [ + "MZM", + "métical" + ], + "MZN": [ + "MZN", + "metical mozambicain" + ], + "NAD": [ + "$NA", + "dollar namibien" + ], + "NGN": [ + "NGN", + "naira nigérian" + ], + "NIC": [ + "NIC", + "cordoba" + ], + "NIO": [ + "NIO", + "córdoba oro nicaraguayen" + ], + "NLG": [ + "NLG", + "florin néerlandais" + ], + "NOK": [ + "NOK", + "couronne norvégienne" + ], + "NPR": [ + "NPR", + "roupie népalaise" + ], + "NZD": [ + "$NZ", + "dollar néo-zélandais" + ], + "OMR": [ + "OMR", + "rial omanais" + ], + "PAB": [ + "PAB", + "balboa panaméen" + ], + "PEI": [ + "PEI", + "inti péruvien" + ], + "PEN": [ + "PEN", + "nouveau sol péruvien" + ], + "PES": [ + "PES", + "sol péruvien" + ], + "PGK": [ + "PGK", + "kina papouan-néo-guinéen" + ], + "PHP": [ + "PHP", + "peso philippin" + ], + "PKR": [ + "PKR", + "roupie pakistanaise" + ], + "PLN": [ + "PLN", + "zloty polonais" + ], + "PLZ": [ + "PLZ", + "zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "escudo portugais" + ], + "PYG": [ + "PYG", + "guaraní paraguayen" + ], + "QAR": [ + "QAR", + "rial qatari" + ], + "RHD": [ + "$RH", + "dollar rhodésien" + ], + "ROL": [ + "ROL", + "ancien leu roumain" + ], + "RON": [ + "RON", + "leu roumain" + ], + "RSD": [ + "RSD", + "dinar serbe" + ], + "RUB": [ + "RUB", + "rouble russe" + ], + "RUR": [ + "RUR", + "rouble russe (1991–1998)" + ], + "RWF": [ + "RWF", + "franc rwandais" + ], + "SAR": [ + "SAR", + "rial saoudien" + ], + "SBD": [ + "$SB", + "dollar des îles Salomon" + ], + "SCR": [ + "SCR", + "roupie des Seychelles" + ], + "SDD": [ + "SDD", + "dinar soudanais" + ], + "SDG": [ + "SDG", + "livre soudanaise" + ], + "SDP": [ + "SDP", + "livre soudanaise (1956–2007)" + ], + "SEK": [ + "SEK", + "couronne suédoise" + ], + "SGD": [ + "$SG", + "dollar de Singapour" + ], + "SHP": [ + "SHP", + "livre de Sainte-Hélène" + ], + "SIT": [ + "SIT", + "tolar slovène" + ], + "SKK": [ + "SKK", + "couronne slovaque" + ], + "SLL": [ + "SLL", + "leone sierra-léonais" + ], + "SOS": [ + "SOS", + "shilling somalien" + ], + "SRD": [ + "$SR", + "dollar surinamais" + ], + "SRG": [ + "SRG", + "florin surinamais" + ], + "SSP": [ + "SSP", + "livre sud-soudanaise" + ], + "STD": [ + "STD", + "dobra santoméen" + ], + "SUR": [ + "SUR", + "rouble soviétique" + ], + "SVC": [ + "SVC", + "colón salvadorien" + ], + "SYP": [ + "SYP", + "livre syrienne" + ], + "SZL": [ + "SZL", + "lilangeni swazi" + ], + "THB": [ + "THB", + "baht thaïlandais" + ], + "TJR": [ + "TJR", + "rouble tadjik" + ], + "TJS": [ + "TJS", + "somoni tadjik" + ], + "TMM": [ + "TMM", + "manat turkmène" + ], + "TMT": [ + "TMT", + "nouveau manat turkmène" + ], + "TND": [ + "TND", + "dinar tunisien" + ], + "TOP": [ + "TOP", + "pa’anga tongan" + ], + "TPE": [ + "TPE", + "escudo timorais" + ], + "TRL": [ + "TRL", + "livre turque (1844–2005)" + ], + "TRY": [ + "TRY", + "livre turque" + ], + "TTD": [ + "$TT", + "dollar trinidadien" + ], + "TWD": [ + "TWD", + "nouveau dollar taïwanais" + ], + "TZS": [ + "TZS", + "shilling tanzanien" + ], + "UAH": [ + "UAH", + "hryvnia ukrainienne" + ], + "UAK": [ + "UAK", + "karbovanetz" + ], + "UGS": [ + "UGS", + "shilling ougandais (1966–1987)" + ], + "UGX": [ + "UGX", + "shilling ougandais" + ], + "USD": [ + "$US", + "dollar des États-Unis" + ], + "USN": [ + "USN", + "dollar des Etats-Unis (jour suivant)" + ], + "USS": [ + "USS", + "dollar des Etats-Unis (jour même)" + ], + "UYI": [ + "UYI", + "peso uruguayen (unités indexées)" + ], + "UYP": [ + "UYP", + "peso uruguayen (1975–1993)" + ], + "UYU": [ + "$UY", + "peso uruguayen" + ], + "UZS": [ + "UZS", + "sum ouzbek" + ], + "VEB": [ + "VEB", + "bolivar vénézuélien (1871–2008)" + ], + "VEF": [ + "VEF", + "bolivar vénézuélien" + ], + "VND": [ + "â‚«", + "dông vietnamien" + ], + "VUV": [ + "VUV", + "vatu vanuatuan" + ], + "WST": [ + "WS$", + "tala samoan" + ], + "XAF": [ + "FCFA", + "franc CFA (BEAC)" + ], + "XCD": [ + "XCD", + "dollar des Caraïbes orientales" + ], + "XEU": [ + "XEU", + "unité de compte européenne (ECU)" + ], + "XFO": [ + "XFO", + "franc or" + ], + "XFU": [ + "XFU", + "franc UIC" + ], + "XOF": [ + "CFA", + "franc CFA (BCEAO)" + ], + "XPF": [ + "FCFP", + "franc CFP" + ], + "XRE": [ + "XRE", + "type de fonds RINET" + ], + "YDD": [ + "YDD", + "dinar du Yémen" + ], + "YER": [ + "YER", + "rial yéménite" + ], + "YUD": [ + "YUD", + "nouveau dinar yougoslave" + ], + "YUM": [ + "YUM", + "dinar yougoslave Noviy" + ], + "YUN": [ + "YUN", + "dinar yougoslave convertible" + ], + "ZAL": [ + "ZAL", + "rand sud-africain (financier)" + ], + "ZAR": [ + "ZAR", + "rand sud-africain" + ], + "ZMK": [ + "ZMK", + "kwacha zambien (1968–2012)" + ], + "ZMW": [ + "ZMW", + "kwacha zambien" + ], + "ZRN": [ + "ZRN", + "nouveau zaïre zaïrien" + ], + "ZRZ": [ + "ZRZ", + "zaïre zaïrois" + ], + "ZWD": [ + "ZWD", + "dollar zimbabwéen" + ], + "ZWL": [ + "ZWL", + "dollar zimbabwéen (2009)" + ], + "ZWR": [ + "ZWR", + "dollar zimbabwéen (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_BI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_BI.json new file mode 100644 index 0000000000000000000000000000000000000000..071b4a82fcbbd26508f26810513029265a94db15 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_BI.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BIF": [ + "FBu", + "franc burundais" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_CA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_CA.json new file mode 100644 index 0000000000000000000000000000000000000000..b2c2b3289c3aaf708a7c691c652870d9b2467717 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_CA.json @@ -0,0 +1,141 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ARS": [ + "ARS", + "peso argentin" + ], + "AUD": [ + "$ AU", + "dollar australien" + ], + "BMD": [ + "BMD", + "dollar bermudien" + ], + "BND": [ + "BND", + "dollar brunéien" + ], + "BSD": [ + "BSD", + "dollar bahaméen" + ], + "BZD": [ + "BZD", + "dollar bélizéen" + ], + "CAD": [ + "$", + "dollar canadien" + ], + "CLP": [ + "CLP", + "peso chilien" + ], + "CNY": [ + "CNÂ¥", + "yuan renminbi chinois" + ], + "COP": [ + "COP", + "peso colombien" + ], + "FJD": [ + "FJD", + "dollar fidjien" + ], + "FKP": [ + "FKP", + "livre des ÃŽles Malouines" + ], + "GBP": [ + "£", + "livre sterling" + ], + "GIP": [ + "GIP", + "livre de Gibraltar" + ], + "HKD": [ + "$ HK", + "dollar de Hong Kong" + ], + "ILS": [ + "ILS", + "nouveau shekel israélien" + ], + "INR": [ + "INR", + "roupie indienne" + ], + "JPY": [ + "Â¥", + "yen japonais" + ], + "KRW": [ + "KRW", + "won sud-coréen" + ], + "LBP": [ + "LBP", + "livre libanaise" + ], + "MXN": [ + "MXN", + "peso mexicain" + ], + "NAD": [ + "NAD", + "dollar namibien" + ], + "NZD": [ + "$ NZ", + "dollar néo-zélandais" + ], + "SBD": [ + "SBD", + "dollar des îles Salomon" + ], + "SGD": [ + "$ SG", + "dollar de Singapour" + ], + "SRD": [ + "SRD", + "dollar surinamais" + ], + "TOP": [ + "TOP", + "pa’anga" + ], + "TTD": [ + "TTD", + "dollar de Trinité-et-Tobago" + ], + "USD": [ + "$ US", + "dollar des États-Unis" + ], + "UYU": [ + "UYU", + "peso uruguayen" + ], + "VND": [ + "VND", + "dông vietnamien" + ], + "XAF": [ + "XAF", + "franc CFA (BEAC)" + ], + "XOF": [ + "XOF", + "franc CFA (BCEAO)" + ], + "XPF": [ + "XPF", + "franc CFP" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_CD.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_CD.json new file mode 100644 index 0000000000000000000000000000000000000000..9989b8adde134807a15ca41a70e8c50a305eec9b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_CD.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "CDF": [ + "FC", + "franc congolais" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_DJ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_DJ.json new file mode 100644 index 0000000000000000000000000000000000000000..658bdb8f0f6666e8b64d017cf28f95aa91f3822e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_DJ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "DJF": [ + "Fdj", + "franc djiboutien" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_DZ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_DZ.json new file mode 100644 index 0000000000000000000000000000000000000000..2a15feebe8c2bdddc363399a32d2619057e3d939 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_DZ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "DZD": [ + "DA", + "dinar algérien" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_GN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_GN.json new file mode 100644 index 0000000000000000000000000000000000000000..07766e28c982973091be98ccc4a05891e79e506a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_GN.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GNF": [ + "FG", + "franc guinéen" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_HT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_HT.json new file mode 100644 index 0000000000000000000000000000000000000000..f8ce809cbe6ca7e6378c2555d5c45b8354947a26 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_HT.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.63", + "Names": { + "HTG": [ + "G", + "gourde haïtienne" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_KM.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_KM.json new file mode 100644 index 0000000000000000000000000000000000000000..9658d53518a3f7a0c8656346cecc0e86d957fcce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_KM.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "KMF": [ + "CF", + "franc comorien" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_LU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_LU.json new file mode 100644 index 0000000000000000000000000000000000000000..0fe75282c4017d2a03dc17cde632a22e886b69d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_LU.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.99", + "Names": { + "FRF": [ + "FRF", + "franc français" + ], + "LUF": [ + "F", + "franc luxembourgeois" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_MG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_MG.json new file mode 100644 index 0000000000000000000000000000000000000000..bc36db8a9b0cc47c078cf2dfcef746efd197dd0b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_MG.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MGA": [ + "Ar", + "ariary malgache" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_MR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_MR.json new file mode 100644 index 0000000000000000000000000000000000000000..289e33d74ef9dfbe07ca42fd36a10935fb538435 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_MR.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MRO": [ + "UM", + "ouguiya mauritanien" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_MU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_MU.json new file mode 100644 index 0000000000000000000000000000000000000000..3010d330bda10798ccd748af20f697ed8c36b5e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_MU.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MUR": [ + "Rs", + "roupie mauricienne" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_RW.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_RW.json new file mode 100644 index 0000000000000000000000000000000000000000..bc47b9562b1b13d686f9a54c8088b25a6a8ec97b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_RW.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "RWF": [ + "RF", + "franc rwandais" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_SC.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_SC.json new file mode 100644 index 0000000000000000000000000000000000000000..4f82e936f11efffb46e44287ed2e65b536402f7a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_SC.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "SCR": [ + "SR", + "roupie des Seychelles" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_SY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_SY.json new file mode 100644 index 0000000000000000000000000000000000000000..dcd413fa7f160cf9a198d497646ced1011a0311b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_SY.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "SYP": [ + "LS", + "livre syrienne" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_TN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_TN.json new file mode 100644 index 0000000000000000000000000000000000000000..bc09e05a93335cdae8ee565bf563f69a073957ba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_TN.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "TND": [ + "DT", + "dinar tunisien" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_VU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_VU.json new file mode 100644 index 0000000000000000000000000000000000000000..51570db5c24c8e8eb39246633594bdb13ac34d65 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fr_VU.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "VUV": [ + "VT", + "vatu vanuatuan" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fy.json new file mode 100644 index 0000000000000000000000000000000000000000..53b58a2743d9a673e9cda5580eefd6d9914ff34b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/fy.json @@ -0,0 +1,1125 @@ +{ + "Version": "2.1.29.44", + "Names": { + "ADP": [ + "ADP", + "Andorrese peseta" + ], + "AED": [ + "AED", + "Verenigde Arabyske Emiraten-dirham" + ], + "AFA": [ + "AFA", + "Afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "Afghaanske afghani" + ], + "ALL": [ + "ALL", + "Albanese lek" + ], + "AMD": [ + "AMD", + "Armeense dram" + ], + "ANG": [ + "ANG", + "Nederlânsk-Antilliaanske gûne" + ], + "AOA": [ + "AOA", + "Angolese kwanza" + ], + "AOK": [ + "AOK", + "Angolese kwanza (1977–1990)" + ], + "AON": [ + "AON", + "Angolese nieuwe kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angolese kwanza reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentynske austral" + ], + "ARL": [ + "ARL", + "Argentynske peso ley (1970–1983)" + ], + "ARM": [ + "ARM", + "Argentynske peso (1881–1970)" + ], + "ARP": [ + "ARP", + "Argentynske peso (1983–1985)" + ], + "ARS": [ + "ARS", + "Argentynske peso" + ], + "ATS": [ + "ATS", + "Eastenrykse schilling" + ], + "AUD": [ + "AU$", + "Australyske dollar" + ], + "AWG": [ + "AWG", + "Arubaanske gulden" + ], + "AZM": [ + "AZM", + "Azerbeidzjaanske manat (1993–2006)" + ], + "AZN": [ + "AZN", + "Azerbeidzjaanske manat" + ], + "BAD": [ + "BAD", + "Bosnyske dinar" + ], + "BAM": [ + "BAM", + "Bosnyske convertibele mark" + ], + "BAN": [ + "BAN", + "Nije Bosnyske dinar (1994–1997)" + ], + "BBD": [ + "BBD", + "Barbadaanske dollar" + ], + "BDT": [ + "BDT", + "Bengalese taka" + ], + "BEC": [ + "BEC", + "Belgyske frank (convertibel)" + ], + "BEF": [ + "BEF", + "Belgyske frank" + ], + "BEL": [ + "BEL", + "Belgyske frank (finansjeel)" + ], + "BGL": [ + "BGL", + "Bulgaarse harde lev" + ], + "BGM": [ + "BGM", + "Bulgaarse socialistyske lev" + ], + "BGN": [ + "BGN", + "Bulgaarse lev" + ], + "BGO": [ + "BGO", + "Bulgaarse lev (1879–1952)" + ], + "BHD": [ + "BHD", + "Bahreinse dinar" + ], + "BIF": [ + "BIF", + "Burundese frank" + ], + "BMD": [ + "BMD", + "Bermuda-dollar" + ], + "BND": [ + "BND", + "Bruneise dollar" + ], + "BOB": [ + "BOB", + "Boliviaanske boliviano" + ], + "BOL": [ + "BOL", + "Boliviaanske boliviano (1863–1963)" + ], + "BOP": [ + "BOP", + "Boliviaanske peso" + ], + "BOV": [ + "BOV", + "Boliviaanske mvdol" + ], + "BRB": [ + "BRB", + "Braziliaanske cruzeiro novo (1967–1986)" + ], + "BRC": [ + "BRC", + "Braziliaanske cruzado" + ], + "BRE": [ + "BRE", + "Braziliaanske cruzeiro (1990–1993)" + ], + "BRL": [ + "R$", + "Braziliaanske real" + ], + "BRN": [ + "BRN", + "Braziliaanske cruzado novo" + ], + "BRR": [ + "BRR", + "Braziliaanske cruzeiro" + ], + "BRZ": [ + "BRZ", + "Braziliaanske cruzeiro (1942–1967)" + ], + "BSD": [ + "BSD", + "Bahamaanske dollar" + ], + "BTN": [ + "BTN", + "Bhutaanske ngultrum" + ], + "BUK": [ + "BUK", + "Birmese kyat" + ], + "BWP": [ + "BWP", + "Botswaanske pula" + ], + "BYB": [ + "BYB", + "Wit-Russyske nieuwe roebel (1994–1999)" + ], + "BYN": [ + "BYN", + "Wit-Russyske roebel" + ], + "BYR": [ + "BYR", + "Wit-Russyske roebel (2000–2016)" + ], + "BZD": [ + "BZD", + "Belizaanske dollar" + ], + "CAD": [ + "C$", + "Canadese dollar" + ], + "CDF": [ + "CDF", + "Congolese frank" + ], + "CHE": [ + "CHE", + "WIR euro" + ], + "CHF": [ + "CHF", + "Zwitserse frank" + ], + "CHW": [ + "CHW", + "WIR franc" + ], + "CLE": [ + "CLE", + "Sileenske escudo" + ], + "CLF": [ + "CLF", + "Sileenske unidades de fomento" + ], + "CLP": [ + "CLP", + "Sileenske peso" + ], + "CNY": [ + "CNÂ¥", + "Sineeske yuan renminbi" + ], + "COP": [ + "COP", + "Kolombiaanske peso" + ], + "COU": [ + "COU", + "Unidad de Valor Real" + ], + "CRC": [ + "CRC", + "Costaricaanske colón" + ], + "CSD": [ + "CSD", + "Alde Servyske dinar" + ], + "CSK": [ + "CSK", + "Tsjechoslowaakse harde koruna" + ], + "CUC": [ + "CUC", + "Kubaanske convertibele peso" + ], + "CUP": [ + "CUP", + "Kubaanske peso" + ], + "CVE": [ + "CVE", + "Kaapverdyske escudo" + ], + "CYP": [ + "CYP", + "Cyprysk pûn" + ], + "CZK": [ + "CZK", + "Tsjechyske kroon" + ], + "DDM": [ + "DDM", + "East-Dútske ostmark" + ], + "DEM": [ + "DEM", + "Dútske mark" + ], + "DJF": [ + "DJF", + "Djiboutiaanske frank" + ], + "DKK": [ + "DKK", + "Deenske kroon" + ], + "DOP": [ + "DOP", + "Dominikaanske peso" + ], + "DZD": [ + "DZD", + "Algerynske dinar" + ], + "ECS": [ + "ECS", + "Ecuadoraanske sucre" + ], + "ECV": [ + "ECV", + "Ecuadoraanske unidad de valor constante (UVC)" + ], + "EEK": [ + "EEK", + "Estlânske kroon" + ], + "EGP": [ + "EGP", + "Egyptysk pûn" + ], + "ERN": [ + "ERN", + "Eritrese nakfa" + ], + "ESA": [ + "ESA", + "Spaanske peseta (account A)" + ], + "ESB": [ + "ESB", + "Spaanske peseta (convertibele account)" + ], + "ESP": [ + "ESP", + "Spaanske peseta" + ], + "ETB": [ + "ETB", + "Ethiopyske birr" + ], + "EUR": [ + "€", + "Euro" + ], + "FIM": [ + "FIM", + "Finse markka" + ], + "FJD": [ + "FJ$", + "Fiji-dollar" + ], + "FKP": [ + "FKP", + "Falklâneilânske pûn" + ], + "FRF": [ + "FRF", + "Franske franc" + ], + "GBP": [ + "£", + "Brits pûn" + ], + "GEK": [ + "GEK", + "Georgyske kupon larit" + ], + "GEL": [ + "GEL", + "Georgyske lari" + ], + "GHC": [ + "GHC", + "Ghanese cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "Ghanese cedi" + ], + "GIP": [ + "GIP", + "Gibraltarees pûn" + ], + "GMD": [ + "GMD", + "Gambiaanske dalasi" + ], + "GNF": [ + "GNF", + "Guinese franc" + ], + "GNS": [ + "GNS", + "Guinese syli" + ], + "GQE": [ + "GQE", + "Equatoriaal-Guinese ekwele guineana" + ], + "GRD": [ + "GRD", + "Grykse drachme" + ], + "GTQ": [ + "GTQ", + "Guatemalteekse quetzal" + ], + "GWE": [ + "GWE", + "Portugees-Guinese escudo" + ], + "GWP": [ + "GWP", + "Guinee-Bissause peso" + ], + "GYD": [ + "GYD", + "Guyaanske dollar" + ], + "HKD": [ + "HK$", + "Hongkongske dollar" + ], + "HNL": [ + "HNL", + "Hondurese lempira" + ], + "HRD": [ + "HRD", + "Kroatyske dinar" + ], + "HRK": [ + "HRK", + "Kroatyske kuna" + ], + "HTG": [ + "HTG", + "Haïtiaanske gourde" + ], + "HUF": [ + "HUF", + "Hongaarse forint" + ], + "IDR": [ + "IDR", + "Indonesyske roepia" + ], + "IEP": [ + "IEP", + "Ierske pûn" + ], + "ILP": [ + "ILP", + "Israëlysk pûn" + ], + "ILS": [ + "₪", + "Israëlyske nieuwe shekel" + ], + "INR": [ + "₹", + "Indiase roepie" + ], + "IQD": [ + "IQD", + "Iraakse dinar" + ], + "IRR": [ + "IRR", + "Iraanske rial" + ], + "ISK": [ + "ISK", + "Yslânske kroon" + ], + "ITL": [ + "ITL", + "Italiaanske lire" + ], + "JMD": [ + "JMD", + "Jamaikaanske dollar" + ], + "JOD": [ + "JOD", + "Jordaanske dinar" + ], + "JPY": [ + "JPÂ¥", + "Japanse yen" + ], + "KES": [ + "KES", + "Keniaanske shilling" + ], + "KGS": [ + "KGS", + "Kirgizyske som" + ], + "KHR": [ + "KHR", + "Kambodjaanske riel" + ], + "KMF": [ + "KMF", + "Komorese frank" + ], + "KPW": [ + "KPW", + "Noard-Koreaanske won" + ], + "KRH": [ + "KRH", + "Sûd-Koreaanske hwan (1953–1962)" + ], + "KRO": [ + "KRO", + "Alde Sûd-Koreaanske won (1945–1953)" + ], + "KRW": [ + "â‚©", + "Sûd-Koreaanske won" + ], + "KWD": [ + "KWD", + "Koeweitse dinar" + ], + "KYD": [ + "KYD", + "Caymaneilânske dollar" + ], + "KZT": [ + "KZT", + "Kazachstaanske tenge" + ], + "LAK": [ + "LAK", + "Laotiaanske kip" + ], + "LBP": [ + "LBP", + "Libaneeske pûn" + ], + "LKR": [ + "LKR", + "Sri Lankaanske roepie" + ], + "LRD": [ + "LRD", + "Liberiaanske dollar" + ], + "LSL": [ + "LSL", + "Lesothaanske loti" + ], + "LTL": [ + "LTL", + "Litouwse litas" + ], + "LTT": [ + "LTT", + "Litouwse talonas" + ], + "LUC": [ + "LUC", + "Lúksemboargske convertibele franc" + ], + "LUF": [ + "LUF", + "Lúksemboargske frank" + ], + "LUL": [ + "LUL", + "Lúksemboargske finansjele franc" + ], + "LVL": [ + "LVL", + "Letse lats" + ], + "LVR": [ + "LVR", + "Letse roebel" + ], + "LYD": [ + "LYD", + "Libyske dinar" + ], + "MAD": [ + "MAD", + "Marokkaanske dirham" + ], + "MAF": [ + "MAF", + "Marokkaanske franc" + ], + "MCF": [ + "MCF", + "Monegaskyske frank" + ], + "MDC": [ + "MDC", + "Moldavyske cupon" + ], + "MDL": [ + "MDL", + "Moldavyske leu" + ], + "MGA": [ + "MGA", + "Malagassyske ariary" + ], + "MGF": [ + "MGF", + "Malagassyske franc" + ], + "MKD": [ + "MKD", + "Macedonyske denar" + ], + "MKN": [ + "MKN", + "Macedonyske denar (1992–1993)" + ], + "MLF": [ + "MLF", + "Malinese franc" + ], + "MMK": [ + "MMK", + "Myanmarese kyat" + ], + "MNT": [ + "MNT", + "Mongoalske tugrik" + ], + "MOP": [ + "MOP", + "Macause pataca" + ], + "MRO": [ + "MRO", + "Mauritaanske ouguiya" + ], + "MTL": [ + "MTL", + "Maltese lire" + ], + "MTP": [ + "MTP", + "Maltees pûn" + ], + "MUR": [ + "MUR", + "Mauritiaanske roepie" + ], + "MVR": [ + "MVR", + "Maldivyske rufiyaa" + ], + "MWK": [ + "MWK", + "Malawyske kwacha" + ], + "MXN": [ + "MX$", + "Meksikaanske peso" + ], + "MXP": [ + "MXP", + "Meksikaanske sulveren peso (1861–1992)" + ], + "MXV": [ + "MXV", + "Meksikaanske unidad de inversion (UDI)" + ], + "MYR": [ + "MYR", + "Maleisyske ringgit" + ], + "MZE": [ + "MZE", + "Mozambikaanske escudo" + ], + "MZM": [ + "MZM", + "Alde Mozambikaanske metical" + ], + "MZN": [ + "MZN", + "Mozambikaanske metical" + ], + "NAD": [ + "NAD", + "Namibyske dollar" + ], + "NGN": [ + "NGN", + "Nigeriaanske naira" + ], + "NIC": [ + "NIC", + "Nicaraguaanske córdoba (1988–1991)" + ], + "NIO": [ + "NIO", + "Nicaraguaanske córdoba" + ], + "NLG": [ + "NLG", + "Nederlânske gûne" + ], + "NOK": [ + "NOK", + "Noarske kroon" + ], + "NPR": [ + "NPR", + "Nepalese roepie" + ], + "NZD": [ + "NZ$", + "Nij-Seelânske dollar" + ], + "OMR": [ + "OMR", + "Omaanske rial" + ], + "PAB": [ + "PAB", + "Panamese balboa" + ], + "PEI": [ + "PEI", + "Peruaanske inti" + ], + "PEN": [ + "PEN", + "Peruaanske nieuwe sol" + ], + "PES": [ + "PES", + "Peruaanske sol" + ], + "PGK": [ + "PGK", + "Papuaanske kina" + ], + "PHP": [ + "PHP", + "Filipynske peso" + ], + "PKR": [ + "PKR", + "Pakistaanske roepie" + ], + "PLN": [ + "PLN", + "Poalske zloty" + ], + "PLZ": [ + "PLZ", + "Poalske zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugeeske escudo" + ], + "PYG": [ + "PYG", + "Paraguayaanske guarani" + ], + "QAR": [ + "QAR", + "Katarese rial" + ], + "RHD": [ + "RHD", + "Rhodesyske dollar" + ], + "ROL": [ + "ROL", + "Alde Roemeenske leu" + ], + "RON": [ + "RON", + "Roemeenske leu" + ], + "RSD": [ + "RSD", + "Servyske dinar" + ], + "RUB": [ + "RUB", + "Russyske roebel" + ], + "RUR": [ + "RUR", + "Russyske roebel (1991–1998)" + ], + "RWF": [ + "RWF", + "Rwandese frank" + ], + "SAR": [ + "SAR", + "Saoedi-Arabyske riyal" + ], + "SBD": [ + "SI$", + "Salomon-dollar" + ], + "SCR": [ + "SCR", + "Seychelse roepie" + ], + "SDD": [ + "SDD", + "Soedaneeske dinar" + ], + "SDG": [ + "SDG", + "Soedaneeske pûn" + ], + "SDP": [ + "SDP", + "Soedaneeske pûn (1957–1998)" + ], + "SEK": [ + "SEK", + "Sweedske kroon" + ], + "SGD": [ + "SGD", + "Singaporese dollar" + ], + "SHP": [ + "SHP", + "Sint-Heleenske pûn" + ], + "SIT": [ + "SIT", + "Sloveenske tolar" + ], + "SKK": [ + "SKK", + "Slowaakse koruna" + ], + "SLL": [ + "SLL", + "Sierraleoonse leone" + ], + "SOS": [ + "SOS", + "Somalyske shilling" + ], + "SRD": [ + "SRD", + "Surinaamske dollar" + ], + "SRG": [ + "SRG", + "Surinaamske gulden" + ], + "SSP": [ + "SSP", + "Sûd-Soedaneeske pûn" + ], + "STD": [ + "STD", + "Santomese dobra" + ], + "SUR": [ + "SUR", + "Sovjet-roebel" + ], + "SVC": [ + "SVC", + "Salvadoraanske colón" + ], + "SYP": [ + "SYP", + "Syrysk pûn" + ], + "SZL": [ + "SZL", + "Swazyske lilangeni" + ], + "THB": [ + "฿", + "Thaise baht" + ], + "TJR": [ + "TJR", + "Tadzjikistaanske roebel" + ], + "TJS": [ + "TJS", + "Tadzjikistaanske somoni" + ], + "TMM": [ + "TMM", + "Turkmeense manat (1993–2009)" + ], + "TMT": [ + "TMT", + "Turkmeense manat" + ], + "TND": [ + "TND", + "Tunesyske dinar" + ], + "TOP": [ + "TOP", + "Tongaanske paÊ»anga" + ], + "TPE": [ + "TPE", + "Timorese escudo" + ], + "TRL": [ + "TRL", + "Turkse lire" + ], + "TRY": [ + "TRY", + "Turkse lira" + ], + "TTD": [ + "TTD", + "Trinidad en Tobago-dollar" + ], + "TWD": [ + "NT$", + "Nije Taiwanese dollar" + ], + "TZS": [ + "TZS", + "Tanzaniaanske shilling" + ], + "UAH": [ + "UAH", + "Oekraïense hryvnia" + ], + "UAK": [ + "UAK", + "Oekraïense karbovanetz" + ], + "UGS": [ + "UGS", + "Oegandese shilling (1966–1987)" + ], + "UGX": [ + "UGX", + "Oegandese shilling" + ], + "USD": [ + "US$", + "Amerikaanske dollar" + ], + "USN": [ + "USN", + "Amerikaanske dollar (folgjende dei)" + ], + "USS": [ + "USS", + "Amerikaanske dollar (zelfde dei)" + ], + "UYI": [ + "UYI", + "Uruguayaanske peso en geïndexeerde eenheden" + ], + "UYP": [ + "UYP", + "Uruguayaanske peso (1975–1993)" + ], + "UYU": [ + "UYU", + "Uruguayaanske peso" + ], + "UZS": [ + "UZS", + "Oezbekistaanske sum" + ], + "VEB": [ + "VEB", + "Fenezolaanske bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "Fenezolaanske bolivar" + ], + "VND": [ + "â‚«", + "Fietnameeske dong" + ], + "VNN": [ + "VNN", + "Alde Fietnameeske dong (1978–1985)" + ], + "VUV": [ + "VUV", + "Vanuatuaanske vatu" + ], + "WST": [ + "WST", + "Samoaanske tala" + ], + "XAF": [ + "FCFA", + "CFA-frank" + ], + "XCD": [ + "EC$", + "East-Karibyske dollar" + ], + "XEU": [ + "XEU", + "European Currency Unit" + ], + "XFO": [ + "XFO", + "Franse gouden franc" + ], + "XFU": [ + "XFU", + "Franse UIC-franc" + ], + "XOF": [ + "CFA", + "CFA-franc BCEAO" + ], + "XPF": [ + "XPF", + "CFP-franc" + ], + "XRE": [ + "XRE", + "RINET-fondsen" + ], + "YDD": [ + "YDD", + "Jemenityske dinar" + ], + "YER": [ + "YER", + "Jemenityske rial" + ], + "YUD": [ + "YUD", + "Joegoslavyske harde dinar" + ], + "YUM": [ + "YUM", + "Joegoslavyske noviy-dinar" + ], + "YUN": [ + "YUN", + "Joegoslavyske convertibele dinar" + ], + "YUR": [ + "YUR", + "Joegoslavyske herfoarme dinar (1992–1993)" + ], + "ZAL": [ + "ZAL", + "Sûd-Afrikaanske rand (finansjeel)" + ], + "ZAR": [ + "ZAR", + "Sûd-Afrikaanske rand" + ], + "ZMK": [ + "ZMK", + "Sambiaanske kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Sambiaanske kwacha" + ], + "ZRN": [ + "ZRN", + "Saïreeske nije Saïre" + ], + "ZRZ": [ + "ZRZ", + "Saïreeske Saïre" + ], + "ZWD": [ + "ZWD", + "Simbabwaanske dollar" + ], + "ZWL": [ + "ZWL", + "Simbabwaanske dollar (2009)" + ], + "ZWR": [ + "ZWR", + "Simbabwaanske dollar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ga.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ga.json new file mode 100644 index 0000000000000000000000000000000000000000..224c9386cf0c7b6bfc4e9c17a3410ab4492e716b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ga.json @@ -0,0 +1,1089 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Peseta Andóra" + ], + "AED": [ + "AED", + "Dirham Aontas na nÉimíríochtaí Arabacha" + ], + "AFA": [ + "AFA", + "Afgainí (1927–2002)" + ], + "AFN": [ + "AFN", + "Afghani na hAfganastáine" + ], + "ALK": [ + "ALK", + "Lek na hAlbáine (1946–1965)" + ], + "ALL": [ + "ALL", + "Lek na hAlbáine" + ], + "AMD": [ + "AMD", + "Dram na hAirméine" + ], + "ANG": [ + "ANG", + "Gildear Aintillí na hÃsiltíre" + ], + "AOA": [ + "AOA", + "Kwanza Angóla" + ], + "AOK": [ + "AOK", + "Kwanza Angólach (1977–1990)" + ], + "AON": [ + "AON", + "Kwanza Nua Angólach (1990–2000)" + ], + "AOR": [ + "AOR", + "Kwanza Reajustado Angólach (1995–1999)" + ], + "ARA": [ + "ARA", + "Austral Airgintíneach" + ], + "ARL": [ + "ARL", + "ARL" + ], + "ARM": [ + "ARM", + "Peso na hAirgintíne (1881–1970)" + ], + "ARP": [ + "ARP", + "Peso na hAirgintíne (1983–1985)" + ], + "ARS": [ + "ARS", + "Peso na hAirgintíne" + ], + "ATS": [ + "ATS", + "Scilling Ostarach" + ], + "AUD": [ + "A$", + "Dollar na hAstráile" + ], + "AWG": [ + "AWG", + "Flóirín Arúba" + ], + "AZM": [ + "AZM", + "Manat na hAsarbaiseáine (1993–2006)" + ], + "AZN": [ + "AZN", + "Manat na hAsarbaiseáine" + ], + "BAD": [ + "BAD", + "Dínear Bhoisnia-Heirseagaivéin (1992–1994)" + ], + "BAM": [ + "BAM", + "Marg Inmhalartaithe na Boisnia-Heirseagaivéine" + ], + "BAN": [ + "BAN", + "BAN" + ], + "BBD": [ + "BBD", + "Dollar Bharbadós" + ], + "BDT": [ + "BDT", + "Taka na Banglaidéise" + ], + "BEC": [ + "BEC", + "Franc Beilgeach (inathraithe)" + ], + "BEF": [ + "BEF", + "Franc Beilgeach" + ], + "BEL": [ + "BEL", + "Franc Beilgeach (airgeadúil)" + ], + "BGL": [ + "BGL", + "Lev Crua na Bulgáire" + ], + "BGN": [ + "BGN", + "Lev na Bulgáire" + ], + "BGO": [ + "BGO", + "Lev na Bulgáire (1879–1952)" + ], + "BHD": [ + "BHD", + "Dinar Bhairéin" + ], + "BIF": [ + "BIF", + "Franc na Burúine" + ], + "BMD": [ + "BMD", + "Dollar Bheirmiúda" + ], + "BND": [ + "BND", + "Dollar Bhrúiné" + ], + "BOB": [ + "BOB", + "Boliviano" + ], + "BOL": [ + "BOL", + "BOL" + ], + "BOP": [ + "BOP", + "Peso na Bolaive" + ], + "BOV": [ + "BOV", + "Mvdol na Bolaive" + ], + "BRB": [ + "BRB", + "Cruzeiro Nua na Brasaíle (1967–1986)" + ], + "BRC": [ + "BRC", + "Cruzado na Brasaíle (1986–1989)" + ], + "BRE": [ + "BRE", + "Cruzeiro na Brasaíle (1990–1993)" + ], + "BRL": [ + "R$", + "Real na Brasaíle" + ], + "BRN": [ + "BRN", + "Cruzado Nua na Brasaíle (1989–1990)" + ], + "BRR": [ + "BRR", + "Cruzeiro na Brasaíle (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Cruzeiro na Brasaíle (1942–1967)" + ], + "BSD": [ + "BSD", + "Dollar na mBahámaí" + ], + "BTN": [ + "BTN", + "Ngultrum na Bútáine" + ], + "BUK": [ + "BUK", + "Kyat Bhurma" + ], + "BWP": [ + "BWP", + "Pula na Botsuáine" + ], + "BYB": [ + "BYB", + "Rúbal Nua na Bealarúise (1994–1999)" + ], + "BYN": [ + "BYN", + "Rúbal na Bealarúise" + ], + "BYR": [ + "BYR", + "Rúbal na Bealarúise (2000–2016)" + ], + "BZD": [ + "BZD", + "Dollar na Beilíse" + ], + "CAD": [ + "CA$", + "Dollar Cheanada" + ], + "CDF": [ + "CDF", + "Franc an Chongó" + ], + "CHF": [ + "CHF", + "Franc na hEilvéise" + ], + "CLE": [ + "CLE", + "Escudo na Sile" + ], + "CLF": [ + "CLF", + "Unidades de Fomento na Sile" + ], + "CLP": [ + "CLP", + "Peso na Sile" + ], + "CNY": [ + "CNÂ¥", + "Yuan na Síne" + ], + "COP": [ + "COP", + "Peso na Colóime" + ], + "COU": [ + "COU", + "COU" + ], + "CRC": [ + "CRC", + "Colón Chósta Ríce" + ], + "CSD": [ + "CSD", + "Dinar na Seirbia (2002–2006)" + ], + "CSK": [ + "CSK", + "Koruna Crua na Seicslóvaice" + ], + "CUC": [ + "CUC", + "Peso Inmhalartaithe Chúba" + ], + "CUP": [ + "CUP", + "Peso Chúba" + ], + "CVE": [ + "CVE", + "Escudo Rinn Verde" + ], + "CYP": [ + "CYP", + "Punt na Cipire" + ], + "CZK": [ + "CZK", + "Koruna Phoblacht na Seice" + ], + "DDM": [ + "DDM", + "Ostmark na hOirGhearmáine" + ], + "DEM": [ + "DEM", + "Deutsche Mark" + ], + "DJF": [ + "DJF", + "Franc Djibouti" + ], + "DKK": [ + "DKK", + "Coróin na Danmhairge" + ], + "DOP": [ + "DOP", + "Peso na Poblachta Doiminicí" + ], + "DZD": [ + "DZD", + "Dinar na hAilgéire" + ], + "ECS": [ + "ECS", + "Sucre Eacuadóir" + ], + "ECV": [ + "ECV", + "Unidad de Valor Constante (UVC) Eacuadóir" + ], + "EEK": [ + "EEK", + "Kroon na hEastóine" + ], + "EGP": [ + "EGP", + "Punt na hÉigipte" + ], + "ERN": [ + "ERN", + "Nakfa na hEiritré" + ], + "ESA": [ + "ESA", + "ESA" + ], + "ESB": [ + "ESB", + "ESB" + ], + "ESP": [ + "ESP", + "Peseta na Spáinne" + ], + "ETB": [ + "ETB", + "Birr na hAetóipe" + ], + "EUR": [ + "€", + "Euro" + ], + "FIM": [ + "FIM", + "Markka Fionnlannach" + ], + "FJD": [ + "FJD", + "Dollar Fhidsí" + ], + "FKP": [ + "FKP", + "Punt Oileáin Fháclainne" + ], + "FRF": [ + "FRF", + "Franc Francach" + ], + "GBP": [ + "£", + "Punt Steirling" + ], + "GEK": [ + "GEK", + "Kupon Larit na Grúise" + ], + "GEL": [ + "GEL", + "Lari na Seoirsia" + ], + "GHC": [ + "GHC", + "Cedi Ghána (1979–2007)" + ], + "GHS": [ + "GHS", + "Cedi Ghána" + ], + "GIP": [ + "GIP", + "Punt Ghiobráltar" + ], + "GMD": [ + "GMD", + "Dalasi na Gaimbia" + ], + "GNF": [ + "GNF", + "Franc na Guine" + ], + "GNS": [ + "GNS", + "Syli Guine" + ], + "GQE": [ + "GQE", + "Ekwele Guineana na Guine Meánchriosaí" + ], + "GRD": [ + "GRD", + "Drachma Gréagach" + ], + "GTQ": [ + "GTQ", + "Quetzal Ghuatamala" + ], + "GWE": [ + "GWE", + "Escudo na Guine Portaingéalaí" + ], + "GWP": [ + "GWP", + "Peso Guine-Bhissau" + ], + "GYD": [ + "GYD", + "Dollar na Guáine" + ], + "HKD": [ + "HK$", + "Dollar Hong Cong" + ], + "HNL": [ + "HNL", + "Lempira Hondúras" + ], + "HRD": [ + "HRD", + "Dínear na Cróite" + ], + "HRK": [ + "HRK", + "Kuna na Cróite" + ], + "HTG": [ + "HTG", + "Gourde Háítí" + ], + "HUF": [ + "HUF", + "Forint na hUngáire" + ], + "IDR": [ + "IDR", + "Rupiah na hIndinéise" + ], + "IEP": [ + "IEP", + "Punt Éireannach" + ], + "ILP": [ + "ILP", + "Punt Iosraelach" + ], + "ILS": [ + "₪", + "Seiceal Nua Iosrael" + ], + "INR": [ + "₹", + "Rúipí na hIndia" + ], + "IQD": [ + "IQD", + "Dinar na hIaráice" + ], + "IRR": [ + "IRR", + "Rial na hIaráine" + ], + "ISK": [ + "ISK", + "Króna na hÃoslainne" + ], + "ITL": [ + "ITL", + "Lira na hIodáile" + ], + "JMD": [ + "JMD", + "Dollar na hIamáice" + ], + "JOD": [ + "JOD", + "Dinar na hIordáine" + ], + "JPY": [ + "Â¥", + "Yen na Seapáine" + ], + "KES": [ + "KES", + "Scilling na Céinia" + ], + "KGS": [ + "KGS", + "Som na Cirgeastáine" + ], + "KHR": [ + "KHR", + "Riel na Cambóide" + ], + "KMF": [ + "KMF", + "Franc Oileáin Chomóra" + ], + "KPW": [ + "KPW", + "Won na Cóiré Thuaidh" + ], + "KRH": [ + "KRH", + "KRH" + ], + "KRO": [ + "KRO", + "KRO" + ], + "KRW": [ + "â‚©", + "Won na Cóiré Theas" + ], + "KWD": [ + "KWD", + "Dinar Chuáit" + ], + "KYD": [ + "KYD", + "Dollar Oileáin Cayman" + ], + "KZT": [ + "KZT", + "Tenge na Casacstáine" + ], + "LAK": [ + "LAK", + "Kip Laos" + ], + "LBP": [ + "LBP", + "Punt na Liobáine" + ], + "LKR": [ + "LKR", + "Rúipí Shrí Lanca" + ], + "LRD": [ + "LRD", + "Dollar na Libéire" + ], + "LSL": [ + "LSL", + "Loti Leosóta" + ], + "LTL": [ + "LTL", + "Litas na Liotuáine" + ], + "LTT": [ + "LTT", + "Talonas Liotuánach" + ], + "LUF": [ + "LUF", + "Franc Lucsamburg" + ], + "LVL": [ + "LVL", + "Lats na Laitvia" + ], + "LVR": [ + "LVR", + "Rúbal Laitviach" + ], + "LYD": [ + "LYD", + "Dinar na Libia" + ], + "MAD": [ + "MAD", + "Dirham Mharacó" + ], + "MAF": [ + "MAF", + "Franc Mharacó" + ], + "MDL": [ + "MDL", + "Leu na Moldóive" + ], + "MGA": [ + "MGA", + "Ariary Mhadagascar" + ], + "MGF": [ + "MGF", + "Franc Madagascar" + ], + "MKD": [ + "MKD", + "Denar na Macadóine" + ], + "MKN": [ + "MKN", + "MKN" + ], + "MLF": [ + "MLF", + "Franc Mhailí" + ], + "MMK": [ + "MMK", + "Kyat Mhaenmar" + ], + "MNT": [ + "MNT", + "Tugrik na Mongóile" + ], + "MOP": [ + "MOP", + "Pataca Mhacao" + ], + "MRO": [ + "MRO", + "Ouguiya na Máratáine" + ], + "MTL": [ + "MTL", + "Lira Mhálta" + ], + "MTP": [ + "MTP", + "Punt Mhálta" + ], + "MUR": [ + "MUR", + "Rúipí Oileán Mhuirís" + ], + "MVP": [ + "MVP", + "Rúipí Oileáin Mhaildíve" + ], + "MVR": [ + "MVR", + "Rufiyaa Oileáin Mhaildíve" + ], + "MWK": [ + "MWK", + "Kwacha na Maláive" + ], + "MXN": [ + "MX$", + "Peso Mheicsiceo" + ], + "MXP": [ + "MXP", + "Peso Airgid Mheicsiceo (1861–1992)" + ], + "MXV": [ + "MXV", + "Unidad de Inversion (UDI) Meicsiceo" + ], + "MYR": [ + "MYR", + "Ringgit na Malaeisia" + ], + "MZE": [ + "MZE", + "Escudo Mósaimbíce" + ], + "MZM": [ + "MZM", + "Metical Mósaimbíce" + ], + "MZN": [ + "MZN", + "Metical Mhósaimbíc" + ], + "NAD": [ + "NAD", + "Dollar na Namaibe" + ], + "NGN": [ + "NGN", + "Naira na Nigéire" + ], + "NIC": [ + "NIC", + "Córdoba Nicearagua (1988–1991)" + ], + "NIO": [ + "NIO", + "Córdoba Nicearagua" + ], + "NLG": [ + "NLG", + "Guilder Ãsiltíreach" + ], + "NOK": [ + "NOK", + "Coróin na hIorua" + ], + "NPR": [ + "NPR", + "Rúipí Neipeal" + ], + "NZD": [ + "NZ$", + "Dollar na Nua-Shéalainne" + ], + "OMR": [ + "OMR", + "Rial Óman" + ], + "PAB": [ + "PAB", + "Balboa Phanama" + ], + "PEI": [ + "PEI", + "Inti Pheiriú" + ], + "PEN": [ + "PEN", + "Nuevo Sol Pheiriú" + ], + "PES": [ + "PES", + "Sol Pheiriú (1863–1965)" + ], + "PGK": [ + "PGK", + "Kina Nua-Ghuine Phapua" + ], + "PHP": [ + "PHP", + "Peso na nOileán Filipíneach" + ], + "PKR": [ + "PKR", + "Rúipí na Pacastáine" + ], + "PLN": [ + "PLN", + "Zloty na Polainne" + ], + "PLZ": [ + "PLZ", + "Zloty Polannach (1950–1995)" + ], + "PTE": [ + "PTE", + "Escudo na Portaingéile" + ], + "PYG": [ + "PYG", + "Guaraní Pharagua" + ], + "QAR": [ + "QAR", + "Riyal Chatar" + ], + "ROL": [ + "ROL", + "Leu na Rómáine (1952–2006)" + ], + "RON": [ + "RON", + "Leu na Rómáine" + ], + "RSD": [ + "RSD", + "Dinar na Seirbia" + ], + "RUB": [ + "RUB", + "Rúbal na Rúise" + ], + "RUR": [ + "RUR", + "Rúbal na Rúise (1991–1998)" + ], + "RWF": [ + "RWF", + "Franc Ruanda" + ], + "SAR": [ + "SAR", + "Riyal na hAraibe Sádaí" + ], + "SBD": [ + "SBD", + "Dollar Oileáin Sholomón" + ], + "SCR": [ + "SCR", + "Rúipí na Séiséal" + ], + "SDD": [ + "SDD", + "Dinar na Súdáine (1992–2007)" + ], + "SDG": [ + "SDG", + "Punt na Súdáine" + ], + "SDP": [ + "SDP", + "Punt na Súdáine (1957–1998)" + ], + "SEK": [ + "SEK", + "Coróin na Sualainne" + ], + "SGD": [ + "SGD", + "Dollar Shingeapór" + ], + "SHP": [ + "SHP", + "Punt San Héilin" + ], + "SIT": [ + "SIT", + "Tolar na Slóivéine" + ], + "SKK": [ + "SKK", + "Koruna na Slóvaice" + ], + "SLL": [ + "SLL", + "Leone Shiarra Leon" + ], + "SOS": [ + "SOS", + "Scilling na Somáile" + ], + "SRD": [ + "SRD", + "Dollar Shuranam" + ], + "SRG": [ + "SRG", + "Gildear Shuranam" + ], + "SSP": [ + "SSP", + "Punt na Súdáine Theas" + ], + "STD": [ + "STD", + "Dobra São Tomé agus Príncipe" + ], + "SUR": [ + "SUR", + "Rúbal an Aontais Shóivéadaigh" + ], + "SVC": [ + "SVC", + "Colón na Salvadóire" + ], + "SYP": [ + "SYP", + "Punt na Siria" + ], + "SZL": [ + "SZL", + "Lilangeni na Suasalainne" + ], + "THB": [ + "฿", + "Baht na Téalainne" + ], + "TJR": [ + "TJR", + "Rúbal na Táidsíceastáine" + ], + "TJS": [ + "TJS", + "Somoni na Táidsíceastáine" + ], + "TMM": [ + "TMM", + "Manat na An Tuircméanastáine" + ], + "TMT": [ + "TMT", + "Manat na Tuircméanastáine" + ], + "TND": [ + "TND", + "Dinar na Túinéise" + ], + "TOP": [ + "TOP", + "PaÊ»anga Thonga" + ], + "TPE": [ + "TPE", + "Escudo Tíomóir" + ], + "TRL": [ + "TRL", + "Lira na Tuirce (1922–2005)" + ], + "TRY": [ + "TRY", + "Lira na Tuirce" + ], + "TTD": [ + "TTD", + "Dollar Oileán na Tríonóide agus Tobága" + ], + "TWD": [ + "NT$", + "Dollar Nua na Téaváine" + ], + "TZS": [ + "TZS", + "Scilling na Tansáine" + ], + "UAH": [ + "UAH", + "Hryvnia na hÚcráine" + ], + "UAK": [ + "UAK", + "Karbovanets Úcránach" + ], + "UGS": [ + "UGS", + "Scilling Uganda (1966–1987)" + ], + "UGX": [ + "UGX", + "Scilling Uganda" + ], + "USD": [ + "$", + "Dollar S.A.M." + ], + "USN": [ + "USN", + "Dollar S.A.M. (an chéad lá eile)" + ], + "USS": [ + "USS", + "Dollar S.A.M. (an lá céanna)" + ], + "UYP": [ + "UYP", + "Peso Uragua (1975–1993)" + ], + "UYU": [ + "UYU", + "Peso Uragua" + ], + "UZS": [ + "UZS", + "Sum na hÚisbéiceastáine" + ], + "VEB": [ + "VEB", + "Bolívar Veiniséala (1871–2008)" + ], + "VEF": [ + "VEF", + "Bolívar Veiniséala" + ], + "VND": [ + "â‚«", + "Dong Vítneam" + ], + "VNN": [ + "VNN", + "Dong Vítneam (1978–1985)" + ], + "VUV": [ + "VUV", + "Vatu Vanuatú" + ], + "WST": [ + "WST", + "Tala Shamó" + ], + "XAF": [ + "FCFA", + "Franc CFA na hAfraice Láir" + ], + "XCD": [ + "EC$", + "Dollar na Cairibe Thoir" + ], + "XEU": [ + "XEU", + "Aonad Airgeadra Eorpach" + ], + "XFO": [ + "XFO", + "Franc Ór Francach" + ], + "XFU": [ + "XFU", + "UIC-Franc Francach" + ], + "XOF": [ + "CFA", + "Franc CFA Iarthar na hAfraice" + ], + "XPF": [ + "CFPF", + "Franc CFP" + ], + "XRE": [ + "XRE", + "XRE" + ], + "YDD": [ + "YDD", + "Dínear Éimin" + ], + "YER": [ + "YER", + "Rial Éimin" + ], + "YUD": [ + "YUD", + "Dínear Crua Iúgslavach (1966–1990)" + ], + "YUM": [ + "YUM", + "Dínear Nua Iúgslavach (1994–2002)" + ], + "YUN": [ + "YUN", + "Dínear Inathraithe Iúgslavach" + ], + "YUR": [ + "YUR", + "YUR" + ], + "ZAL": [ + "ZAL", + "Rand na hAfraice Theas (airgeadúil)" + ], + "ZAR": [ + "ZAR", + "Rand na hAfraice Theas" + ], + "ZMK": [ + "ZMK", + "Kwacha Saimbiach (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha na Saimbia" + ], + "ZRN": [ + "ZRN", + "Zaire Nua Sáíreach" + ], + "ZRZ": [ + "ZRZ", + "Zaire Sáíreach" + ], + "ZWD": [ + "ZWD", + "Dollar Siombábach (1980–2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/gd.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/gd.json new file mode 100644 index 0000000000000000000000000000000000000000..27d857091a7b461510a4326314ee24d30052483d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/gd.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.28.76", + "Names": { + "ADP": [ + "ADP", + "Peseta Andorrach" + ], + "AED": [ + "AED", + "Dirham nan Iomaratan Arabach Aonaichte" + ], + "AFA": [ + "AFA", + "Afghani Afghanach (1927–2002)" + ], + "AFN": [ + "AFN", + "Afghani Afghanach" + ], + "ALK": [ + "ALK", + "Lek Albàineach (1946–1965)" + ], + "ALL": [ + "ALL", + "Lek Albàineach" + ], + "AMD": [ + "AMD", + "Dram Airmeineach" + ], + "ANG": [ + "ANG", + "Gulden Eileanan Aintilia nan Tìrean ÃŒsle" + ], + "AOA": [ + "AOA", + "Kwanza Angòlach" + ], + "AOK": [ + "AOK", + "Kwanza Angòlach (1977–1991)" + ], + "AON": [ + "AON", + "Kwanza ùr Angòlach (1990–2000)" + ], + "AOR": [ + "AOR", + "Kwanza ath-ghleusaichte Angòlach (1995–1999)" + ], + "ARA": [ + "ARA", + "Austral Argantaineach" + ], + "ARL": [ + "ARL", + "Peso ley Argantaineach (1970–1983)" + ], + "ARM": [ + "ARM", + "Peso Argantaineach (1881–1970)" + ], + "ARP": [ + "ARP", + "Peso Argantaineach (1983–1985)" + ], + "ARS": [ + "ARS", + "Peso Argantaineach" + ], + "ATS": [ + "ATS", + "Schilling Ostaireach" + ], + "AUD": [ + "A$", + "Dolar Astràilianach" + ], + "AWG": [ + "AWG", + "Florin Arùbach" + ], + "AZM": [ + "AZM", + "Manat Asarbaideànach (1993–2006)" + ], + "AZN": [ + "AZN", + "Manat Asarbaideànach" + ], + "BAD": [ + "BAD", + "Dinar Bhosna agus Hearsagobhana (1992–1994)" + ], + "BAM": [ + "BAM", + "Mark iompachail Bhosna agus Hearsagobhana" + ], + "BAN": [ + "BAN", + "Dinar ùr Bhosna agus Hearsagobhana (1994–1997)" + ], + "BBD": [ + "BBD", + "Dolar Barbadach" + ], + "BDT": [ + "BDT", + "Taka Bangladaiseach" + ], + "BEC": [ + "BEC", + "Franc Beilgeach (iompachail)" + ], + "BEF": [ + "BEF", + "Franc Beilgeach" + ], + "BEL": [ + "BEL", + "Franc Beilgeach (ionmhasail)" + ], + "BGL": [ + "BGL", + "Lev cruaidh Bulgarach" + ], + "BGM": [ + "BGM", + "Lev sòisealach Bulgarach" + ], + "BGN": [ + "BGN", + "Lev Bulgarach" + ], + "BGO": [ + "BGO", + "Lev Bulgarach (1879–1952)" + ], + "BHD": [ + "BHD", + "Dinar Bachraineach" + ], + "BIF": [ + "BIF", + "Franc Burundaidheach" + ], + "BMD": [ + "BMD", + "Dolar Bearmùdach" + ], + "BND": [ + "BND", + "Dolar Brùnaigheach" + ], + "BOB": [ + "BOB", + "Boliviano Boilibhiach" + ], + "BOL": [ + "BOL", + "Boliviano Boilibhiach (1863–1963)" + ], + "BOP": [ + "BOP", + "Peso Boilibhiach" + ], + "BOV": [ + "BOV", + "Mvdol Boilibhiach" + ], + "BRB": [ + "BRB", + "Cruzeiro ùr Braisileach (1967–1986)" + ], + "BRC": [ + "BRC", + "Cruzado Braisileach (1986–1989)" + ], + "BRE": [ + "BRE", + "Cruzeiro Braisileach (1990–1993)" + ], + "BRL": [ + "R$", + "Real Braisileach" + ], + "BRN": [ + "BRN", + "Cruzado ùr Braisileach (1989–1990)" + ], + "BRR": [ + "BRR", + "Cruzeiro Braisileach (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Cruzeiro Braisileach (1942–1967)" + ], + "BSD": [ + "BSD", + "Dolar Bathamach" + ], + "BTN": [ + "BTN", + "Ngultrum Butànach" + ], + "BUK": [ + "BUK", + "Kyat Burmach" + ], + "BWP": [ + "BWP", + "Pula Botsuanach" + ], + "BYB": [ + "BYB", + "Rùbal ùr Bealaruiseach (1994–1999)" + ], + "BYN": [ + "BYN", + "Rùbal Bealaruiseach" + ], + "BYR": [ + "BYR", + "Rùbal Bealaruiseach (2000–2016)" + ], + "BZD": [ + "BZD", + "Dolar Beilìseach" + ], + "CAD": [ + "CA$", + "Dolar Canadach" + ], + "CDF": [ + "CDF", + "Franc Congothach" + ], + "CHE": [ + "CHE", + "Eòro WIR" + ], + "CHF": [ + "CHF", + "Franc Eilbheiseach" + ], + "CHW": [ + "CHW", + "Franc WIR" + ], + "CLE": [ + "CLE", + "Escudo Sileach" + ], + "CLF": [ + "CLF", + "Aonad cunntasachd Sileach (UF)" + ], + "CLP": [ + "CLP", + "Peso Sileach" + ], + "CNX": [ + "CNX", + "Dolar an t-sluagh-bhanca Shìnich" + ], + "CNY": [ + "CNÂ¥", + "Yuan Sìneach" + ], + "COP": [ + "COP", + "Peso Coloimbeach" + ], + "COU": [ + "COU", + "Aonad fìor-luach Coloimbeach" + ], + "CRC": [ + "CRC", + "Colón Costa Rìceach" + ], + "CSD": [ + "CSD", + "Dinar Sèirbeach (2002–2006)" + ], + "CSK": [ + "CSK", + "Koruna cruaidh Seic-Slòbhacach" + ], + "CUC": [ + "CUC", + "Peso iompachail Cùbach" + ], + "CUP": [ + "CUP", + "Peso Cùbach" + ], + "CVE": [ + "CVE", + "Escudo a’ Chip Uaine" + ], + "CYP": [ + "CYP", + "Punnd Cìoprasach" + ], + "CZK": [ + "CZK", + "Koruna Seiceach" + ], + "DDM": [ + "DDM", + "Mark na Gearmailte an Ear" + ], + "DEM": [ + "DEM", + "Mark Gearmailteach" + ], + "DJF": [ + "DJF", + "Franc Diobùtaidheach" + ], + "DKK": [ + "DKK", + "Krone Danmhairgeach" + ], + "DOP": [ + "DOP", + "Peso Doiminiceach" + ], + "DZD": [ + "DZD", + "Dinar Aildireach" + ], + "ECS": [ + "ECS", + "Sucre Eacuadorach" + ], + "ECV": [ + "ECV", + "Aonad luach chunbhalaich Eacuadorach" + ], + "EEK": [ + "EEK", + "Kroon Eastoineach" + ], + "EGP": [ + "EGP", + "Punnd Èipheiteach" + ], + "ERN": [ + "ERN", + "Nakfa Eartrach" + ], + "ESA": [ + "ESA", + "Peseta Spàinnteach (cunntas A)" + ], + "ESB": [ + "ESB", + "Peseta Spàinnteach (cunntas iompachail)" + ], + "ESP": [ + "ESP", + "Peseta Spàinnteach" + ], + "ETB": [ + "ETB", + "Birr Itiopach" + ], + "EUR": [ + "€", + "Eòro" + ], + "FIM": [ + "FIM", + "Markka Fionnlannach" + ], + "FJD": [ + "FJD", + "Dolar Fìditheach" + ], + "FKP": [ + "FKP", + "Punnd Fàclannach" + ], + "FRF": [ + "FRF", + "Franc Frangach" + ], + "GBP": [ + "£", + "Punnd Sasannach" + ], + "GEK": [ + "GEK", + "Kupon larit Cairtbheileach" + ], + "GEL": [ + "GEL", + "Lari Cairtbheileach" + ], + "GHC": [ + "GHC", + "Cedi Gànach (1979–2007)" + ], + "GHS": [ + "GHS", + "Cedi Gànach" + ], + "GIP": [ + "GIP", + "Punnd Diobraltarach" + ], + "GMD": [ + "GMD", + "Dalasi Gaimbitheach" + ], + "GNF": [ + "GNF", + "Franc Ginitheach" + ], + "GNS": [ + "GNS", + "Syli Ginitheach" + ], + "GQE": [ + "GQE", + "Ekwele Gini Meadhan-Chriosaich" + ], + "GRD": [ + "GRD", + "Drachma Greugach" + ], + "GTQ": [ + "GTQ", + "Quetzal Guatamalach" + ], + "GWE": [ + "GWE", + "Escudo Gini na Portagaile" + ], + "GWP": [ + "GWP", + "Peso Gini-Biosothach" + ], + "GYD": [ + "GYD", + "Dolar Guidheànach" + ], + "HKD": [ + "HK$", + "Dolar Hong Kong" + ], + "HNL": [ + "HNL", + "Lempira Hondùrach" + ], + "HRD": [ + "HRD", + "Dinar Cròthaiseach" + ], + "HRK": [ + "HRK", + "Kuna Cròthaiseach" + ], + "HTG": [ + "HTG", + "Gourde Haidhteach" + ], + "HUF": [ + "HUF", + "Forint Ungaireach" + ], + "IDR": [ + "IDR", + "Rupiah Innd-Innseach" + ], + "IEP": [ + "IEP", + "Punnd Èireannach" + ], + "ILP": [ + "ILP", + "Punnd Iosraeleach" + ], + "ILR": [ + "ILR", + "Sheqel Iosraeleach (1980–1985)" + ], + "ILS": [ + "₪", + "Sheqel ùr Iosraeleach" + ], + "INR": [ + "₹", + "Rupee Innseanach" + ], + "IQD": [ + "IQD", + "Dinar Ioràcach" + ], + "IRR": [ + "IRR", + "Rial Iorànach" + ], + "ISJ": [ + "ISJ", + "Króna Innis Tìleach (1918–1981)" + ], + "ISK": [ + "ISK", + "Króna Innis Tìleach" + ], + "ITL": [ + "ITL", + "Lira Eadailteach" + ], + "JMD": [ + "JMD", + "Dolar Diameugach" + ], + "JOD": [ + "JOD", + "Dinar Iòrdanach" + ], + "JPY": [ + "JPÂ¥", + "Yen Seapanach" + ], + "KES": [ + "KES", + "Shilling Ceineach" + ], + "KGS": [ + "KGS", + "Som Cìorgasach" + ], + "KHR": [ + "KHR", + "Riel Cambuideach" + ], + "KMF": [ + "KMF", + "Franc Comorosach" + ], + "KPW": [ + "KPW", + "Won Choirèa a Tuath" + ], + "KRH": [ + "KRH", + "Hwan Choirèa a Deas (1953–1962)" + ], + "KRO": [ + "KRO", + "Won Choirèa a Deas (1945–1953)" + ], + "KRW": [ + "â‚©", + "Won Choirèa a Deas" + ], + "KWD": [ + "KWD", + "Dinar Cuibhèiteach" + ], + "KYD": [ + "KYD", + "Dolar Caimeanach" + ], + "KZT": [ + "KZT", + "Tenge Casachach" + ], + "LAK": [ + "LAK", + "Kip Làthosach" + ], + "LBP": [ + "LBP", + "Punnd Leabanach" + ], + "LKR": [ + "LKR", + "Rupee Sri Lancach" + ], + "LRD": [ + "LRD", + "Dolar Libèireach" + ], + "LSL": [ + "LSL", + "Loti Leasotach" + ], + "LTL": [ + "LTL", + "Litas Liotuaineach" + ], + "LTT": [ + "LTT", + "Talonas Liotuaineach" + ], + "LUC": [ + "LUC", + "Franc iompachail Lugsamburgach" + ], + "LUF": [ + "LUF", + "Franc Lugsamburgach" + ], + "LUL": [ + "LUL", + "Franc ionmhasail Lugsamburgach" + ], + "LVL": [ + "LVL", + "Lats Laitbheach" + ], + "LVR": [ + "LVR", + "Rùbal Laitbheach" + ], + "LYD": [ + "LYD", + "Dinar Libitheach" + ], + "MAD": [ + "MAD", + "Dirham Morocach" + ], + "MAF": [ + "MAF", + "Franc Morocach" + ], + "MCF": [ + "MCF", + "Franc Monacach" + ], + "MDC": [ + "MDC", + "Cupon Moldobhach" + ], + "MDL": [ + "MDL", + "Leu Moldobhach" + ], + "MGA": [ + "MGA", + "Ariary Madagasgarach" + ], + "MGF": [ + "MGF", + "Franc Madagasgarach" + ], + "MKD": [ + "MKD", + "Denar Masadonach" + ], + "MKN": [ + "MKN", + "Denar Masadonach (1992–1993)" + ], + "MLF": [ + "MLF", + "Franc Màilitheach" + ], + "MMK": [ + "MMK", + "Kyat Miànmarach" + ], + "MNT": [ + "MNT", + "Tugrik Mongolach" + ], + "MOP": [ + "MOP", + "Pataca Macàthuach" + ], + "MRO": [ + "MRO", + "Ouguiya Moratàineach" + ], + "MTL": [ + "MTL", + "Lira Maltach" + ], + "MTP": [ + "MTP", + "Punnd Maltach" + ], + "MUR": [ + "MUR", + "Rupee Moiriseasach" + ], + "MVP": [ + "MVP", + "Rupee Maladaibheach" + ], + "MVR": [ + "MVR", + "Rufiyaa Maladaibheach" + ], + "MWK": [ + "MWK", + "Kwacha Malabhaidheach" + ], + "MXN": [ + "MX$", + "Peso Meagsagach" + ], + "MXP": [ + "MXP", + "Peso airgid Meagsagach (1861–1992)" + ], + "MXV": [ + "MXV", + "Aonad inbheistidh Meagsagach" + ], + "MYR": [ + "MYR", + "Ringgit Malaidheach" + ], + "MZE": [ + "MZE", + "Escudo Mòsaimbiceach" + ], + "MZM": [ + "MZM", + "Metical Mòsaimbiceach (1980–2006)" + ], + "MZN": [ + "MZN", + "Metical Mòsaimbiceach" + ], + "NAD": [ + "NAD", + "Dolar Naimibitheach" + ], + "NGN": [ + "NGN", + "Naira Nigèiriach" + ], + "NIC": [ + "NIC", + "Córdoba Niocaragach (1988–1991)" + ], + "NIO": [ + "NIO", + "Córdoba Niocaragach" + ], + "NLG": [ + "NLG", + "Gulden Duitseach" + ], + "NOK": [ + "NOK", + "Krone Nirribheach" + ], + "NPR": [ + "NPR", + "Rupee Neapàlach" + ], + "NZD": [ + "NZ$", + "Dolar Shealainn Nuaidh" + ], + "OMR": [ + "OMR", + "Rial Omànach" + ], + "PAB": [ + "PAB", + "Balboa Panamach" + ], + "PEI": [ + "PEI", + "Inti Pearùthach" + ], + "PEN": [ + "PEN", + "Sol ùr Pearùthach" + ], + "PES": [ + "PES", + "Sol Pearùthach (1863–1965)" + ], + "PGK": [ + "PGK", + "Kina Ghini Nuaidh Paputhaiche" + ], + "PHP": [ + "PHP", + "Peso Filipineach" + ], + "PKR": [ + "PKR", + "Rupee Pagastànach" + ], + "PLN": [ + "PLN", + "ZÅ‚oty Pòlainneach" + ], + "PLZ": [ + "PLZ", + "ZÅ‚oty Pòlainneach (1950–1995)" + ], + "PTE": [ + "PTE", + "Escudo Portagaileach" + ], + "PYG": [ + "PYG", + "Guaraní Paraguaidheach" + ], + "QAR": [ + "QAR", + "Rial Catarach" + ], + "RHD": [ + "RHD", + "Dolar Rhodesiach" + ], + "ROL": [ + "ROL", + "Leu Romàineach (1952–2006)" + ], + "RON": [ + "RON", + "Leu Romàineach" + ], + "RSD": [ + "RSD", + "Dinar Sèirbeach" + ], + "RUB": [ + "RUB", + "Rùbal Ruiseach" + ], + "RUR": [ + "RUR", + "Rùbal Ruiseach (1991–1998)" + ], + "RWF": [ + "RWF", + "Franc Rubhandach" + ], + "SAR": [ + "SAR", + "Riyal Sabhdach" + ], + "SBD": [ + "SBD", + "Dolar Eileanan Sholaimh" + ], + "SCR": [ + "SCR", + "Rupee Seiseallach" + ], + "SDD": [ + "SDD", + "Dinar Sudànach (1992–2007)" + ], + "SDG": [ + "SDG", + "Punnd Sudànach" + ], + "SDP": [ + "SDP", + "Punnd Sudànach (1957–1998)" + ], + "SEK": [ + "SEK", + "Krona Suaineach" + ], + "SGD": [ + "SGD", + "Dolar Singeapòrach" + ], + "SHP": [ + "SHP", + "Punnd Eilean Naomh Eilidh" + ], + "SIT": [ + "SIT", + "Tolar Slòbhaineach" + ], + "SKK": [ + "SKK", + "Koruna Slòbhacach" + ], + "SLL": [ + "SLL", + "Leone Siarra Leòmhannach" + ], + "SOS": [ + "SOS", + "Shilling Somàilitheach" + ], + "SRD": [ + "SRD", + "Dolar Suranamach" + ], + "SRG": [ + "SRG", + "Gulden Suranamach" + ], + "SSP": [ + "SSP", + "Punnd Sudàin a Deas" + ], + "STD": [ + "STD", + "Dobra São Tomé agus Príncipe" + ], + "SUR": [ + "SUR", + "Rùbal Sovietach" + ], + "SVC": [ + "SVC", + "Colón Salbhadorach" + ], + "SYP": [ + "SYP", + "Punnd Siridheach" + ], + "SZL": [ + "SZL", + "Lilangeni Suasaidheach" + ], + "THB": [ + "฿", + "Baht Tàidheach" + ], + "TJR": [ + "TJR", + "Rùbal Taidigeach" + ], + "TJS": [ + "TJS", + "Somoni Taidigeach" + ], + "TMM": [ + "TMM", + "Manat Turcmanach (1993–2009)" + ], + "TMT": [ + "TMT", + "Manat Turcmanach" + ], + "TND": [ + "TND", + "Dinar Tuiniseach" + ], + "TOP": [ + "TOP", + "PaÊ»anga Tongach" + ], + "TPE": [ + "TPE", + "Escudo Tìomorach" + ], + "TRL": [ + "TRL", + "Lira Turcach (1922–2005)" + ], + "TRY": [ + "TRY", + "Lira Turcach" + ], + "TTD": [ + "TTD", + "Dolar Thrianaid agus Thobago" + ], + "TWD": [ + "NT$", + "Dolar ùr Taidh-Bhànach" + ], + "TZS": [ + "TZS", + "Shilling Tansanaidheach" + ], + "UAH": [ + "UAH", + "Hryvnia Ucràineach" + ], + "UAK": [ + "UAK", + "Karbovanets Ucràineach" + ], + "UGS": [ + "UGS", + "Shilling Ugandach (1966–1987)" + ], + "UGX": [ + "UGX", + "Shilling Ugandach" + ], + "USD": [ + "$", + "Dolar nan Stàitean Aonaichte" + ], + "USN": [ + "USN", + "Dolar nan SA (an ath–latha)" + ], + "USS": [ + "USS", + "Dolar nan SA (an aon latha)" + ], + "UYI": [ + "UYI", + "Peso Uruguaidheach (aonadan inneacsaichte)" + ], + "UYP": [ + "UYP", + "Peso Uruguaidheach (1975–1993)" + ], + "UYU": [ + "UYU", + "Peso Uruguaidheach" + ], + "UZS": [ + "UZS", + "Som Usbagach" + ], + "VEB": [ + "VEB", + "Bolívar Bheinisealach (1871–2008)" + ], + "VEF": [ + "VEF", + "Bolívar Bheinisealach" + ], + "VND": [ + "â‚«", + "Dong Bhiet-Namach" + ], + "VNN": [ + "VNN", + "Dong Bhiet-Namach (1978–1985)" + ], + "VUV": [ + "VUV", + "Vatu Vanuatuthach" + ], + "WST": [ + "WST", + "Tala Samothach" + ], + "XAF": [ + "FCFA", + "Franc CFA Meadhan-Afragach" + ], + "XCD": [ + "EC$", + "Dolar Caraibeach earach" + ], + "XEU": [ + "XEU", + "Aonad airgeadra Eòrpach" + ], + "XFO": [ + "XFO", + "Franc òir Frangach" + ], + "XFU": [ + "XFU", + "Franc UIC Frangach" + ], + "XOF": [ + "CFA", + "Franc CFA Afraga an Iar" + ], + "XPF": [ + "CFPF", + "Franc CFP" + ], + "XRE": [ + "XRE", + "Aonad maoine RINET" + ], + "YDD": [ + "YDD", + "Dinar Eamanach" + ], + "YER": [ + "YER", + "Rial Eamanach" + ], + "YUD": [ + "YUD", + "Dinar cruaidh Iùgoslabhach (1966–1990)" + ], + "YUM": [ + "YUM", + "Dinar ùr Iùgoslabhach (1994–2002)" + ], + "YUN": [ + "YUN", + "Dinar iompachail Iùgoslabhach (1990–1992)" + ], + "YUR": [ + "YUR", + "Dinar ath-leasaichte Iùgoslabhach (1992–1993)" + ], + "ZAL": [ + "ZAL", + "Rand Afraga a Deas (ionmhasail)" + ], + "ZAR": [ + "ZAR", + "Rand Afraga a Deas" + ], + "ZMK": [ + "ZMK", + "Kwacha Sàimbitheach (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha Sàimbitheach" + ], + "ZRN": [ + "ZRN", + "Zaïre ùr Zaïreach (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zaïre Zaïreach (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Dolar Sìombabuthach (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Dolar Sìombabuthach (2009)" + ], + "ZWR": [ + "ZWR", + "Dolar Sìombabuthach (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/gl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/gl.json new file mode 100644 index 0000000000000000000000000000000000000000..5512ab882cfbdb9e8a5d77aaad735f30ab6b3457 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/gl.json @@ -0,0 +1,810 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "peseta andorrana" + ], + "AED": [ + "AED", + "Dirham dos Emiratos Ãrabes Unidos" + ], + "AFN": [ + "AFN", + "Afgani afgano" + ], + "ALL": [ + "ALL", + "Lek albanés" + ], + "AMD": [ + "AMD", + "Dram armenio" + ], + "ANG": [ + "ANG", + "Florín das Antillas Neerlandesas" + ], + "AOA": [ + "AOA", + "Kwanza angolano" + ], + "ARP": [ + "ARP", + "Peso arxentino (1983–1985)" + ], + "ARS": [ + "ARS", + "Peso arxentino" + ], + "AUD": [ + "$A", + "Dólar australiano" + ], + "AWG": [ + "AWG", + "Florín de Aruba" + ], + "AZN": [ + "AZN", + "Manat acerbaixano" + ], + "BAM": [ + "BAM", + "Marco convertible de Bosnia e Hercegovina" + ], + "BBD": [ + "BBD", + "Dólar de Barbados" + ], + "BDT": [ + "BDT", + "Taka de Bangladés" + ], + "BEC": [ + "BEC", + "Franco belga (convertible)" + ], + "BEF": [ + "BEF", + "Franco belga" + ], + "BEL": [ + "BEL", + "Franco belga (financeiro)" + ], + "BGN": [ + "BGN", + "Lev búlgaro" + ], + "BHD": [ + "BHD", + "Dinar de Bahrain" + ], + "BIF": [ + "BIF", + "Franco burundiano" + ], + "BMD": [ + "BMD", + "Dólar das Bemudas" + ], + "BND": [ + "BND", + "Dólar de Brunei" + ], + "BOB": [ + "BOB", + "Boliviano" + ], + "BOP": [ + "BOP", + "Peso boliviano" + ], + "BOV": [ + "BOV", + "MVDOL boliviano" + ], + "BRB": [ + "BRB", + "Cruzeiro novo brasileiro (1967–1986)" + ], + "BRC": [ + "BRC", + "Cruzado brasileiro" + ], + "BRE": [ + "BRE", + "Cruzeiro brasileiro (1990–1993)" + ], + "BRL": [ + "$R", + "Real brasileiro" + ], + "BRN": [ + "BRN", + "Cruzado novo brasileiro" + ], + "BRR": [ + "BRR", + "Cruzeiro brasileiro" + ], + "BSD": [ + "BSD", + "Dólar das Bahamas" + ], + "BTN": [ + "BTN", + "Ngultrum butanés" + ], + "BWP": [ + "BWP", + "Pula botsuaniano" + ], + "BYN": [ + "BYN", + "Rublo bielorruso" + ], + "BYR": [ + "BYR", + "Rublo bielorruso (2000–2016)" + ], + "BZD": [ + "BZD", + "Dólar belizense" + ], + "CAD": [ + "$CA", + "Dólar canadense" + ], + "CDF": [ + "CDF", + "Franco congolés" + ], + "CHF": [ + "CHF", + "Franco suízo" + ], + "CLF": [ + "CLF", + "Unidades de fomento chilenas" + ], + "CLP": [ + "CLP", + "Peso chileno" + ], + "CNY": [ + "CNÂ¥", + "Iuán chinés" + ], + "COP": [ + "COP", + "Peso colombiano" + ], + "CRC": [ + "CRC", + "Colón costarriqueño" + ], + "CUC": [ + "CUC", + "Peso cubano convertible" + ], + "CUP": [ + "CUP", + "Peso cubano" + ], + "CVE": [ + "CVE", + "Escudo caboverdiano" + ], + "CZK": [ + "CZK", + "Coroa checa" + ], + "DEM": [ + "DEM", + "Marco alemán" + ], + "DJF": [ + "DJF", + "Franco xibutiano" + ], + "DKK": [ + "DKK", + "Coroa dinamarquesa" + ], + "DOP": [ + "DOP", + "Peso dominicano" + ], + "DZD": [ + "DZD", + "Dinar alxeriano" + ], + "ECS": [ + "ECS", + "Sucre ecuatoriano" + ], + "ECV": [ + "ECV", + "Unidade de valor constante ecuatoriana" + ], + "EGP": [ + "EGP", + "Libra exipcia" + ], + "ERN": [ + "ERN", + "Nakfa eritreo" + ], + "ESA": [ + "ESA", + "Peseta española (conta A)" + ], + "ESB": [ + "ESB", + "Peseta española (conta convertible)" + ], + "ESP": [ + "â‚§", + "Peseta española", + {} + ], + "ETB": [ + "ETB", + "Birr etíope" + ], + "EUR": [ + "€", + "Euro" + ], + "FJD": [ + "FJD", + "Dólar fidxiano" + ], + "FKP": [ + "FKP", + "Libra das Malvinas" + ], + "FRF": [ + "FRF", + "Franco francés" + ], + "GBP": [ + "£", + "Libra esterlina" + ], + "GEL": [ + "GEL", + "Lari xeorxiano" + ], + "GHS": [ + "GHS", + "Cedi de Ghana" + ], + "GIP": [ + "GIP", + "libra xibraltareña" + ], + "GMD": [ + "GMD", + "Dalasi gambiano" + ], + "GNF": [ + "GNF", + "Franco guineano" + ], + "GNS": [ + "GNS", + "Syli guineano" + ], + "GQE": [ + "GQE", + "Ekwele guineana" + ], + "GRD": [ + "GRD", + "Dracma grego" + ], + "GTQ": [ + "GTQ", + "Quetzal guatemalteco" + ], + "GYD": [ + "GYD", + "Dólar güianés" + ], + "HKD": [ + "HK$", + "Dólar de Hong Kong" + ], + "HNL": [ + "HNL", + "Lempira hondureño" + ], + "HRK": [ + "HRK", + "Kuna croata" + ], + "HTG": [ + "HTG", + "Gourde haitiano" + ], + "HUF": [ + "HUF", + "Florín húngaro" + ], + "IDR": [ + "IDR", + "Rupia indonesia" + ], + "IEP": [ + "IEP", + "Libra irlandesa" + ], + "ILS": [ + "₪", + "Novo shequel israelí" + ], + "INR": [ + "₹", + "Rupia india" + ], + "IQD": [ + "IQD", + "Dinar iraquí" + ], + "IRR": [ + "IRR", + "Rial iraniano" + ], + "ISK": [ + "ISK", + "Coroa islandesa" + ], + "ITL": [ + "ITL", + "Lira italiana" + ], + "JMD": [ + "JMD", + "Dólar xamaicano" + ], + "JOD": [ + "JOD", + "Dinar xordano" + ], + "JPY": [ + "JPÂ¥", + "Ien xaponés" + ], + "KES": [ + "KES", + "Xilin kenyano" + ], + "KGS": [ + "KGS", + "Som quirguicistano" + ], + "KHR": [ + "KHR", + "Riel camboxano" + ], + "KMF": [ + "KMF", + "Franco comoriano" + ], + "KPW": [ + "KPW", + "Won norcoreano" + ], + "KRW": [ + "â‚©", + "Won surcoreano" + ], + "KWD": [ + "KWD", + "Dinar kuwaití" + ], + "KYD": [ + "KYD", + "Dólar das Illas Caimán" + ], + "KZT": [ + "KZT", + "Tenge casaco" + ], + "LAK": [ + "LAK", + "Kip laosiano" + ], + "LBP": [ + "LBP", + "Libra libanesa" + ], + "LKR": [ + "LKR", + "Rupia de Sri Lanka" + ], + "LRD": [ + "LRD", + "Dólar liberiano" + ], + "LSL": [ + "LSL", + "Loti de Lesoto" + ], + "LTL": [ + "LTL", + "Litas lituana" + ], + "LUC": [ + "LUC", + "Franco convertible luxemburgués" + ], + "LUF": [ + "LUF", + "Franco luxemburgués" + ], + "LUL": [ + "LUL", + "Franco financeiro luxemburgués" + ], + "LVL": [ + "LVL", + "Lats letón" + ], + "LYD": [ + "LYD", + "Dinar libio" + ], + "MAD": [ + "MAD", + "Dirham marroquí" + ], + "MAF": [ + "MAF", + "Franco marroquí" + ], + "MDL": [ + "MDL", + "Leu moldavo" + ], + "MGA": [ + "MGA", + "Ariary malgaxe" + ], + "MKD": [ + "MKD", + "Dinar macedonio" + ], + "MMK": [ + "MMK", + "Kyat birmano" + ], + "MNT": [ + "MNT", + "Tugrik mongol" + ], + "MOP": [ + "MOP", + "Pataca de Macau" + ], + "MRO": [ + "MRO", + "Ouguiya mauritano" + ], + "MUR": [ + "MUR", + "Rupia mauriciana" + ], + "MVR": [ + "MVR", + "Rupia maldivana" + ], + "MWK": [ + "MWK", + "Kwacha de Malaui" + ], + "MXN": [ + "$MX", + "Peso mexicano" + ], + "MXP": [ + "MXP", + "Peso de prata mexicano (1861–1992)" + ], + "MXV": [ + "MXV", + "Unidade de inversión mexicana" + ], + "MYR": [ + "MYR", + "Ringgit malaio" + ], + "MZN": [ + "MZN", + "Metical de Mozambique" + ], + "NAD": [ + "NAD", + "Dólar namibio" + ], + "NGN": [ + "NGN", + "Naira nixeriano" + ], + "NIC": [ + "NIC", + "Córdoba nicaragüense" + ], + "NIO": [ + "NIO", + "Córdoba de ouro nicaraguano" + ], + "NLG": [ + "NLG", + "Florín holandés" + ], + "NOK": [ + "NOK", + "Coroa norueguesa" + ], + "NPR": [ + "NPR", + "Rupia nepalesa" + ], + "NZD": [ + "NZ$", + "Dólar neozelandés" + ], + "OMR": [ + "OMR", + "Rial omaní" + ], + "PAB": [ + "PAB", + "Balboa panameño" + ], + "PEI": [ + "PEI", + "Inti peruano" + ], + "PEN": [ + "PEN", + "Sol peruano" + ], + "PES": [ + "PES", + "Sol peruano (1863–1965)" + ], + "PGK": [ + "PGK", + "Kina de Papúa-Nova Guinea" + ], + "PHP": [ + "PHP", + "Peso filipino" + ], + "PKR": [ + "PKR", + "Rupia paquistaní" + ], + "PLN": [ + "PLN", + "Zloty polaco" + ], + "PTE": [ + "PTE", + "Escudo portugués" + ], + "PYG": [ + "PYG", + "Guaraní paraguaio" + ], + "QAR": [ + "QAR", + "Rial qatarí" + ], + "RON": [ + "RON", + "Leu romanés" + ], + "RSD": [ + "RSD", + "Dinar serbio" + ], + "RUB": [ + "RUB", + "Rublo ruso" + ], + "RUR": [ + "RUR", + "Rublo ruso (1991–1998)" + ], + "RWF": [ + "RWF", + "Franco ruandés" + ], + "SAR": [ + "SAR", + "Rial saudita" + ], + "SBD": [ + "SBD", + "Dólar das Illas Salomón" + ], + "SCR": [ + "SCR", + "Rupia de Seixeles" + ], + "SDG": [ + "SDG", + "Libra sudanesa" + ], + "SEK": [ + "SEK", + "Coroa sueca" + ], + "SGD": [ + "SGD", + "Dólar de Singapur" + ], + "SHP": [ + "SHP", + "Libra de Santa Helena" + ], + "SLL": [ + "SLL", + "Leone de Serra Leoa" + ], + "SOS": [ + "SOS", + "Xilin somalí" + ], + "SRD": [ + "SRD", + "Dólar surinamés" + ], + "SSP": [ + "SSP", + "Libra sursudanesa" + ], + "STD": [ + "STD", + "Dobra de São Tomé e Príncipe" + ], + "SUR": [ + "SUR", + "Rublo soviético" + ], + "SVC": [ + "SVC", + "Colón salvadoreño" + ], + "SYP": [ + "SYP", + "Libra siria" + ], + "SZL": [ + "SZL", + "Lilangeni de Suacilandia" + ], + "THB": [ + "฿", + "Baht tailandés" + ], + "TJS": [ + "TJS", + "Somoni taxiquistano" + ], + "TMT": [ + "TMT", + "Manat turcomán" + ], + "TND": [ + "TND", + "Dinar tunisiano" + ], + "TOP": [ + "TOP", + "PaÊ»anga de Tonga" + ], + "TRY": [ + "TRY", + "Lira turca" + ], + "TTD": [ + "TTD", + "Dólar de Trinidad e Tobago" + ], + "TWD": [ + "NT$", + "Novo dólar taiwanés" + ], + "TZS": [ + "TZS", + "Xilin tanzano" + ], + "UAH": [ + "UAH", + "Hrivna ucraína" + ], + "UGX": [ + "UGX", + "Xilin ugandés" + ], + "USD": [ + "$", + "Dólar estadounidense" + ], + "UYI": [ + "UYI", + "Peso en unidades indexadas uruguaio" + ], + "UYP": [ + "UYP", + "Peso uruguaio (1975–1993)" + ], + "UYU": [ + "UYU", + "Peso uruguaio" + ], + "UZS": [ + "UZS", + "Som usbeco" + ], + "VEB": [ + "VEB", + "Bolívar venezolano (1871–2008)" + ], + "VEF": [ + "VEF", + "Bolívar venezolano" + ], + "VND": [ + "â‚«", + "Dong vietnamita" + ], + "VUV": [ + "VUV", + "Vatu vanuatiano" + ], + "WST": [ + "WST", + "Tala samoano" + ], + "XAF": [ + "FCFA", + "Franco CFA (BEAC)" + ], + "XCD": [ + "EC$", + "Dólar do Caribe Oriental" + ], + "XOF": [ + "CFA", + "Franco CFA (BCEAO)" + ], + "XPF": [ + "CFPF", + "Franco CFP" + ], + "YER": [ + "YER", + "Rial iemení" + ], + "ZAR": [ + "ZAR", + "Rand surafricano" + ], + "ZMK": [ + "ZMK", + "Kwacha zambiano (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha zambiano" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/gu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/gu.json new file mode 100644 index 0000000000000000000000000000000000000000..507810727d10af185f0332bfa29f1d1df9712fef --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/gu.json @@ -0,0 +1,641 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "યà«àª¨àª¾àªˆàªŸà«‡àª¡ આરબ અમિરાત દિરહામ" + ], + "AFN": [ + "AFN", + "અફà«àª—ાન અફà«àª—ાની" + ], + "ALL": [ + "ALL", + "અલà«àª¬à«‡àª¨àª¿àª¯àª¨ લેક" + ], + "AMD": [ + "AMD", + "અરà«àª®à«‡àª¨àª¿àª¯àª¨ ડà«àª°à«‡àª®" + ], + "ANG": [ + "ANG", + "નેધરલેંડ àªàª‚ટિલિન ગિલà«àª¡àª°" + ], + "AOA": [ + "AOA", + "અંગોલિયન કà«àªµàª¾àª¨à«àªàª¾" + ], + "ARS": [ + "ARS", + "અરà«àªœà«‡àª¨à«àªŸà«€àª¨àª¾ પેસો" + ], + "AUD": [ + "A$", + "ઑસà«àªŸà«àª°à«‡àª²àª¿àª¯àª¨ ડૉલર" + ], + "AWG": [ + "AWG", + "અરà«àª¬àª¨ ફà«àª²à«‹àª°àª¿àª¨" + ], + "AZN": [ + "AZN", + "અàªàª°àª¬à«ˆàªœàª¾àª¨à«€ મનાત" + ], + "BAM": [ + "BAM", + "બોસà«àª¨àª¿àª¯àª¾ અને હરà«àªà«‡àª—ોવિના રૂપાંતર યોગà«àª¯ મારà«àª•" + ], + "BBD": [ + "BBD", + "બારà«àª¬àª¾àª¡àª¿àª¯àª¨ ડોલર" + ], + "BDT": [ + "BDT", + "બાંગલાદેશી ટાકા" + ], + "BGN": [ + "BGN", + "બલà«àª—ેરીયન લેવ" + ], + "BHD": [ + "BHD", + "બેહરિની દિનાર" + ], + "BIF": [ + "BIF", + "બà«àª°à«àª¨à«àª¡àª¿àª¯àª¨ ફà«àª°à«‡àª‚ક" + ], + "BMD": [ + "BMD", + "બરà«àª®à«àª¡àª¨ ડોલર" + ], + "BND": [ + "BND", + "બà«àª°à«àª¨à«‡àª‡ ડોલર" + ], + "BOB": [ + "BOB", + "બોલિવિયન બોલિવિયાનો" + ], + "BRL": [ + "R$", + "બà«àª°àª¾àªàª¿àª²à«€àª¯àª¨ રિઆલ" + ], + "BSD": [ + "BSD", + "બહામિયન ડોલર" + ], + "BTN": [ + "BTN", + "ભà«àª¤àª¾àª¨àª¿àª àªàª‚ગà«àª²à«àª¤à«àª°àª®" + ], + "BWP": [ + "BWP", + "બોતà«àª¸àªµàª¾àª¨àª¨ પà«àª²àª¾" + ], + "BYN": [ + "BYN", + "બેલારà«àª¶àª¿àª¯àª¨ રૂબલ" + ], + "BYR": [ + "BYR", + "બેલારà«àª¶àª¿àª¯àª¨ રૂબલ (2000–2016)" + ], + "BZD": [ + "BZD", + "બેલિઠડોલર" + ], + "CAD": [ + "CA$", + "કેનેડિયન ડૉલર" + ], + "CDF": [ + "CDF", + "કોંગોલિઠફà«àª°à«‡àª‚ક" + ], + "CHF": [ + "CHF", + "સà«àªµàª¿àª¸ ફà«àª°à«‡àª‚ક" + ], + "CLP": [ + "CLP", + "ચિલિઅન પેસો" + ], + "CNY": [ + "CNÂ¥", + "ચાઇનિઠયà«àª†àª¨" + ], + "COP": [ + "COP", + "કોલમà«àª¬àª¿àª¯àª¨ પેસો" + ], + "CRC": [ + "CRC", + "કોસà«àªŸàª¾ રિકન કોલોન" + ], + "CUC": [ + "CUC", + "કà«àª¯à«àª¬àª¨ રૂપાંતર યોગà«àª¯ પેસો" + ], + "CUP": [ + "CUP", + "કà«àª¯à«àª¬àª¨ પેસો" + ], + "CVE": [ + "CVE", + "કેપ વરà«àª¦àª¿àª¯àª¨ àªàª¸à«àª•à«àª¡à«‹" + ], + "CZK": [ + "CZK", + "ચેક રીપબà«àª²àª¿àª• કોરà«àª¨àª¾" + ], + "DJF": [ + "DJF", + "જિબà«àªŸàª¿àª¯àª¨ ફà«àª°à«‡àª‚ક" + ], + "DKK": [ + "DKK", + "ડેનિશ કà«àª°à«‹àª¨" + ], + "DOP": [ + "DOP", + "ડોમિનિકન પેસો" + ], + "DZD": [ + "DZD", + "અલà«àªœàª¿àª°àª¿àª¯àª¨ દિનાર" + ], + "EGP": [ + "EGP", + "ઇજિપà«àª¤àª¿àª¯àª¨ પાઉનà«àª¡" + ], + "ERN": [ + "ERN", + "àªàª°àª¿àªŸà«àª°à«‡àª¯àª¨ નકà«àª«àª¾" + ], + "ETB": [ + "ETB", + "ઇથિયોપીયન બિર" + ], + "EUR": [ + "€", + "યà«àª°à«‹" + ], + "FJD": [ + "FJD", + "ફિજિઅન ડોલર" + ], + "FKP": [ + "FKP", + "ફૉકલેનà«àª¡ આઇલેંડà«àª¸ પાઉનà«àª¡" + ], + "GBP": [ + "£", + "બà«àª°àª¿àªŸàª¿àª¶ પાઉનà«àª¡" + ], + "GEL": [ + "GEL", + "જà«àª¯à«‹àª°à«àªœàª¿àª…ન લારી" + ], + "GHS": [ + "GHS", + "ઘાનાઇયન સેડી" + ], + "GIP": [ + "GIP", + "જીબà«àª°àª¾àª²à«àªŸàª° પાઉનà«àª¡" + ], + "GMD": [ + "GMD", + "ગેમà«àª¬àª¿àª¯àª¨ દલાસી" + ], + "GNF": [ + "GNF", + "ગિનીયન ફà«àª°à«‡àª‚ક" + ], + "GTQ": [ + "GTQ", + "ગà«àªµàª¾àªŸà«‡àª®àª¾àª²àª¾ કà«àª‡àªŸà«àªàª²" + ], + "GYD": [ + "GYD", + "ગયાનિઠડોલર" + ], + "HKD": [ + "HK$", + "હોંગ કોંગ ડૉલર" + ], + "HNL": [ + "HNL", + "હોનà«àª¡à«àª¯à«àª°àª¨ લેમà«àªªàª¿àª°àª¾" + ], + "HRK": [ + "HRK", + "કà«àª°à«‹àªàª¶àª¿àª¯àª¨ કà«àª¯à«àª¨àª¾" + ], + "HTG": [ + "HTG", + "હાઇટિઇન ગોરà«àª¡" + ], + "HUF": [ + "HUF", + "હંગેરીયન ફોરિનà«àª¤" + ], + "IDR": [ + "IDR", + "ઇનà«àª¡à«‹àª¨à«‡àª¶àª¿àª¯àª¨ રૂપિયા" + ], + "ILS": [ + "₪", + "ઇàªàª°àª¾àª¯à«‡àª²à«€ નà«àª¯à« શેકલ" + ], + "INR": [ + "₹", + "ભારતીય રૂપિયા" + ], + "IQD": [ + "IQD", + "ઇરાકી દિનાર" + ], + "IRR": [ + "IRR", + "ઇરાનિયન રિયાલ" + ], + "ISK": [ + "ISK", + "આઇસલેનà«àª¡àª¿àª• કà«àª°à«‹àª¨àª¾" + ], + "JMD": [ + "JMD", + "જમૈકિયન ડોલર" + ], + "JOD": [ + "JOD", + "જોરà«àª¡àª¨àª¿àª¯àª¨ દિનાર" + ], + "JPY": [ + "JPÂ¥", + "જાપાનીઠયેન" + ], + "KES": [ + "KES", + "કેનà«àª¯à«‡àª¨ શિલિંગ" + ], + "KGS": [ + "KGS", + "કિરà«àª—િસà«àª¤àª¾àª¨à«€ સોમ" + ], + "KHR": [ + "KHR", + "કેમà«àª¬à«‹àª¡àª¿àª¯àª¨ રીઅલ" + ], + "KMF": [ + "KMF", + "કોમોરિઅન ફà«àª°à«‡àª‚ક" + ], + "KPW": [ + "KPW", + "ઉતà«àª¤àª° કોરિયન વન" + ], + "KRW": [ + "â‚©", + "દકà«àª·àª¿àª£ કોરિયન વન" + ], + "KWD": [ + "KWD", + "કà«àªµà«ˆàª¤à«€ દિનાર" + ], + "KYD": [ + "KYD", + "કેયમેન આઇલેંડà«àª¸ ડોલર" + ], + "KZT": [ + "KZT", + "કàªàª¾àª•િસà«àª¤àª¾àª¨à«€ ટેંગ" + ], + "LAK": [ + "LAK", + "લાઓશિયન કિપ" + ], + "LBP": [ + "LBP", + "લેબેનિઠપાઉનà«àª¡" + ], + "LKR": [ + "LKR", + "શà«àª°à«€ લંકન રૂપી" + ], + "LRD": [ + "LRD", + "લિબેરિયન ડોલર" + ], + "LSL": [ + "LSL", + "લેસોથો લોતી" + ], + "LTL": [ + "LTL", + "લિથà«àªàª¨àª¿àª¯àª¨ લિતાસ" + ], + "LVL": [ + "LVL", + "લાતવિયન લેતà«àª¸" + ], + "LYD": [ + "LYD", + "લિબà«àª¯àª¨ દિનાર" + ], + "MAD": [ + "MAD", + "મોરોકà«àª•ન દિરહામ" + ], + "MDL": [ + "MDL", + "મોલડોવેન લિયà«" + ], + "MGA": [ + "MGA", + "માલાગેસી અરીઆરી" + ], + "MKD": [ + "MKD", + "મેસેડોનિયન દિનાર" + ], + "MMK": [ + "MMK", + "મà«àª¯àª¾àª‚માર કà«àª¯àª¾àª¤" + ], + "MNT": [ + "MNT", + "મોંગોલિયન ટગરિક" + ], + "MOP": [ + "MOP", + "માકાનિઠપતાકા" + ], + "MRO": [ + "MRO", + "મોરીશેનિયન ઓગà«àª¯àª¾" + ], + "MUR": [ + "MUR", + "મોરેશીઅન રૂપી" + ], + "MVR": [ + "MVR", + "માલà«àª¦àª¿àªµàª¿àª¯àª¨ રà«àª«àª¿àª¯àª¾" + ], + "MWK": [ + "MWK", + "માલાવિયન કà«àªµàª¾àªšàª¾" + ], + "MXN": [ + "MX$", + "મેકà«àª¸àª¿àª•ન પેસો" + ], + "MYR": [ + "MYR", + "મલેશિયન રિંગà«àª—ેટ" + ], + "MZN": [ + "MZN", + "મોàªàª¾àª®à«àª¬àª¿àª•ન મેટિકલ" + ], + "NAD": [ + "NAD", + "નામિબિયન ડોલર" + ], + "NGN": [ + "NGN", + "નાઇજીરિયન નૈરા" + ], + "NIO": [ + "NIO", + "નિકારાગà«àª…ન કોરà«àª¡à«‹àª¬àª¾" + ], + "NOK": [ + "NOK", + "નૉરà«àªµà«‡àªœàª¿àª¯àª¨ કà«àª°à«‹àª¨" + ], + "NPR": [ + "NPR", + "નેપાલિઠરૂપી" + ], + "NZD": [ + "NZ$", + "નà«àª¯à«‚àªàª¿àª²à«‡àª‚ડ ડૉલર" + ], + "OMR": [ + "OMR", + "ઓમાની રિયાલ" + ], + "PAB": [ + "PAB", + "પનામેનિયન બાલà«àª¬à«‹àª†" + ], + "PEN": [ + "PEN", + "પેરà«àªµàª¿àª¯àª¨ નà«àª¯à«àªµà«‹ સોલ" + ], + "PGK": [ + "PGK", + "પાપà«àª† નà«àª¯à«‚ ગિનીયન કિના" + ], + "PHP": [ + "PHP", + "ફિલીપાઇન પેસો" + ], + "PKR": [ + "PKR", + "પાકિસà«àª¤àª¾àª¨à«€ રૂપી" + ], + "PLN": [ + "PLN", + "પોલિસ àªà«àª²à«‹àªŸà«€" + ], + "PYG": [ + "PYG", + "પરાગà«àªµà«‡àª¯àª¨ ગà«àª†àª°àª¾àª¨à«€" + ], + "QAR": [ + "QAR", + "કતારી રિયાલ" + ], + "RON": [ + "RON", + "રોમાનિયન લેઉ" + ], + "RSD": [ + "RSD", + "સરà«àª¬àª¿àª¯àª¨ દિનાર" + ], + "RUB": [ + "RUB", + "રશિયન રૂબલ" + ], + "RWF": [ + "RWF", + "રવાંડન ફà«àª°à«‡àª‚ક" + ], + "SAR": [ + "SAR", + "સાઉદી રિયાલ" + ], + "SBD": [ + "SBD", + "સોલોમન આઇલેંડà«àª¸ ડોલર" + ], + "SCR": [ + "SCR", + "સેશેલોઈ રૂપી" + ], + "SDG": [ + "SDG", + "સà«àª¦àª¾àª¨àª¿àª પાઉનà«àª¡" + ], + "SEK": [ + "SEK", + "સà«àªµà«€àª¡àª¿àª¶ કà«àª°à«‹àª¨àª¾" + ], + "SGD": [ + "SGD", + "સિંગાપà«àª° ડૉલર" + ], + "SHP": [ + "SHP", + "સેંટ હેલેના પાઉનà«àª¡" + ], + "SLL": [ + "SLL", + "સિàªàª°àª¾ લિઓનિઅન લિઓન" + ], + "SOS": [ + "SOS", + "સોમાલી શિલિંગ" + ], + "SRD": [ + "SRD", + "સૂરીનામિઠડોલર" + ], + "SSP": [ + "SSP", + "દકà«àª·àª¿àª£ સà«àª¦àª¾àª¨àª¿àª પાઉનà«àª¡" + ], + "STD": [ + "STD", + "સાઓ ટૉમ àªàª¨à«àª¡ પà«àª°àª¿àª‚સાઇપ ડોબà«àª°àª¾" + ], + "SYP": [ + "SYP", + "સાઇરિયન પાઉનà«àª¡" + ], + "SZL": [ + "SZL", + "સà«àªµàª¾àªà«€ લિલાનà«àª—ેની" + ], + "THB": [ + "฿", + "થાઇ બાહà«àª¤" + ], + "TJS": [ + "TJS", + "તાજિકિસà«àª¤àª¾àª¨à«€ સોમોની" + ], + "TMT": [ + "TMT", + "તà«àª°à«àª•મેનિસà«àª¤àª¾àª¨à«€ મનત" + ], + "TND": [ + "TND", + "ટà«àª¯à«àª¨àª¿àª¶àª¿àª¯àª¨ દિનાર" + ], + "TOP": [ + "TOP", + "ટોંગન પ’અંગા" + ], + "TRY": [ + "TRY", + "તà«àª°à«àª•િશ લિરા" + ], + "TTD": [ + "TTD", + "તà«àª°àª¿àª¨àª¿àª¦àª¾àª¦ અને ટોબેગો ડોલર" + ], + "TWD": [ + "NT$", + "નà«àª¯à« તાઇવાન ડૉલર" + ], + "TZS": [ + "TZS", + "તાનà«àªàª¾àª¨àª¿àª¯àª¨ શિલિંગ" + ], + "UAH": [ + "UAH", + "યà«àª•à«àª°à«‡àª¨àª¿àª¯àª¨ હà«àª°àª¿àªµàª¿àª¨àª¿àª¯àª¾" + ], + "UGX": [ + "UGX", + "યà«àª—ાંડન શિલિંગ" + ], + "USD": [ + "US$", + "યà«àªàª¸ ડોલર" + ], + "UYU": [ + "UYU", + "ઉરà«àª—à«àªµà«‡àª¯àª¨ પેસો" + ], + "UZS": [ + "UZS", + "ઉàªà«àª¬à«‡àª•િસà«àª¤àª¾àª¨ સોમ" + ], + "VEF": [ + "VEF", + "વેનેàªà«àªàª²àª¨ બોલિવર" + ], + "VND": [ + "â‚«", + "વિયેતનામીસ ડોંગ" + ], + "VUV": [ + "VUV", + "વનૌતૠવાતà«" + ], + "WST": [ + "WST", + "સમોઅન તાલા" + ], + "XAF": [ + "FCFA", + "મધà«àª¯ આફà«àª°àª¿àª•ન [CFA] ફà«àª°à«‡àª‚ક" + ], + "XCD": [ + "EC$", + "ઇસà«àªŸ કેરિબિયન ડોલર" + ], + "XOF": [ + "CFA", + "પશà«àªšàª¿àª®à«€ આફà«àª°àª¿àª•ન [CFA] ફà«àª°à«‡àª‚ક" + ], + "XPF": [ + "CFPF", + "[CFP] ફà«àª°à«‡àª‚ક" + ], + "YER": [ + "YER", + "યેમેની રિઆલ" + ], + "ZAR": [ + "ZAR", + "દકà«àª·àª¿àª£ આફà«àª°àª¿àª•à«€ રેંડ" + ], + "ZMK": [ + "ZMK", + "àªàª¾àª®à«àª¬àª¿àª¯àª¨ કà«àªµàª¾àªšàª¾ (1968–2012)" + ], + "ZMW": [ + "ZMW", + "àªàª¾àª®à«àª¬àª¿àª¯àª¨ કà«àªµàª¾àªšàª¾" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ha.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ha.json new file mode 100644 index 0000000000000000000000000000000000000000..e09a54b5d36caddece3a5286faa7127e92995513 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ha.json @@ -0,0 +1,225 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AED": [ + "AED", + "KuÉ—in HaÉ—aÉ—É—iyar Daular Larabawa" + ], + "AOA": [ + "AOA", + "KuÉ—in Angola" + ], + "AUD": [ + "A$", + "Dalar Ostareliya" + ], + "BHD": [ + "BHD", + "KuÉ—in Baharan" + ], + "BIF": [ + "BIF", + "KuÉ—in Burundi" + ], + "BWP": [ + "BWP", + "KuÉ—in Baswana" + ], + "CAD": [ + "CA$", + "Dalar Kanada" + ], + "CDF": [ + "CDF", + "KuÉ—in Kongo" + ], + "CHF": [ + "CHF", + "KuÉ—in Suwizalan" + ], + "CNY": [ + "CNÂ¥", + "KuÉ—in Caina\/Sin" + ], + "CVE": [ + "CVE", + "KuÉ—in Tsibiran Kap Barde" + ], + "DJF": [ + "DJF", + "KuÉ—in Jibuti" + ], + "DZD": [ + "DZD", + "KuÉ—in Aljeriya" + ], + "EGP": [ + "EGP", + "Fam kin Masar" + ], + "ERN": [ + "ERN", + "KuÉ—in Eritireya" + ], + "ETB": [ + "ETB", + "KuÉ—in Habasha" + ], + "EUR": [ + "€", + "Yuro" + ], + "GBP": [ + "£", + "Fam kin Ingila" + ], + "GHC": [ + "GHC", + "Cedi" + ], + "GMD": [ + "GMD", + "KuÉ—in Gambiya" + ], + "GNS": [ + "GNS", + "KuÉ—in Gini" + ], + "INR": [ + "₹", + "KuÉ—in Indiya" + ], + "JPY": [ + "JPÂ¥", + "KuÉ—in Japan" + ], + "KES": [ + "KES", + "Sulen Kenya" + ], + "KMF": [ + "KMF", + "KuÉ—in Kwamoras" + ], + "LRD": [ + "LRD", + "Dalar Laberiya" + ], + "LSL": [ + "LSL", + "KuÉ—in Lesoto" + ], + "LYD": [ + "LYD", + "KuÉ—in Libiya" + ], + "MAD": [ + "MAD", + "KuÉ—in Maroko" + ], + "MGA": [ + "MGA", + "KuÉ—in Madagaskar" + ], + "MRO": [ + "MRO", + "KuÉ—in Moritaniya" + ], + "MUR": [ + "MUR", + "KuÉ—in Moritus" + ], + "MWK": [ + "MWK", + "KuÉ—in Malawi" + ], + "MZM": [ + "MZM", + "KuÉ—in Mozambik" + ], + "NAD": [ + "NAD", + "Dalar Namibiya" + ], + "NGN": [ + "₦", + "Naira" + ], + "RWF": [ + "RWF", + "KuÉ—in Ruwanda" + ], + "SAR": [ + "SAR", + "Riyal" + ], + "SCR": [ + "SCR", + "KuÉ—in Saishal" + ], + "SDG": [ + "SDG", + "Fam kin Sudan" + ], + "SHP": [ + "SHP", + "Fam kin San Helena" + ], + "SLL": [ + "SLL", + "KuÉ—in Salewo" + ], + "SOS": [ + "SOS", + "Sulen Somaliya" + ], + "STD": [ + "STD", + "KuÉ—in Sawo Tome da Paransip" + ], + "SZL": [ + "SZL", + "KuÉ—in Lilangeni" + ], + "TND": [ + "TND", + "KuÉ—in Tunisiya" + ], + "TZS": [ + "TZS", + "Sulen Tanzaniya" + ], + "UGX": [ + "UGX", + "Sule Yuganda" + ], + "USD": [ + "US$", + "Dalar Amurka" + ], + "XAF": [ + "FCFA", + "KuÉ—in Sefa na Afirka Ta Tsakiya" + ], + "XOF": [ + "CFA", + "KuÉ—in Sefa na Afirka Ta Yamma" + ], + "ZAR": [ + "ZAR", + "KuÉ—in Afirka Ta Kudu" + ], + "ZMK": [ + "ZMK", + "KuÉ—in Zambiya (1968–2012)" + ], + "ZMW": [ + "ZMW", + "KuÉ—in Zambiya" + ], + "ZWD": [ + "ZWD", + "Dalar zimbabuwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ha_GH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ha_GH.json new file mode 100644 index 0000000000000000000000000000000000000000..8bebcc500b06eb54bfa2fa33103fefa618c2c9fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ha_GH.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GHS": [ + "GH₵", + "GHS" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/he.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/he.json new file mode 100644 index 0000000000000000000000000000000000000000..114ae41592c1196e9f491150d297eb43b0660da3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/he.json @@ -0,0 +1,869 @@ +{ + "Version": "2.1.29.27", + "Names": { + "ADP": [ + "ADP", + "פזטה ×נדורית" + ], + "AED": [ + "AED", + "×“×™×¨×”× ×©×œ ×יחוד הנסיכויות הערביות" + ], + "AFN": [ + "AFN", + "×פגני ×פגני" + ], + "ALL": [ + "ALL", + "לק ×לבני" + ], + "AMD": [ + "AMD", + "דר×× ×רמני" + ], + "ANG": [ + "ANG", + "גילדר של ×”×× ×˜×™×œ×™× ×”×”×•×œ× ×“×™×™×" + ], + "AOA": [ + "AOA", + "קו×× ×–×” ×נגולי" + ], + "AON": [ + "AON", + "קו×× ×–×” חדש ×נגולי (1990–2000)" + ], + "AOR": [ + "AOR", + "קו×× ×–×” רג׳וסטדו ×נגולי (1995–1999)" + ], + "ARP": [ + "ARP", + "פזו ×רגנטינ××™ (1983–1985)" + ], + "ARS": [ + "ARS", + "פסו ×רגנטינ××™" + ], + "ATS": [ + "ATS", + "שילינג ×וסטרי" + ], + "AUD": [ + "A$", + "דולר ×וסטרלי" + ], + "AWG": [ + "AWG", + "פלורין של ×רובה" + ], + "AZM": [ + "AZM", + "מנ×ט ×זרביג׳×× ×™ (1993–2006)" + ], + "AZN": [ + "AZN", + "מ×× ×ט ×זרביג׳ני" + ], + "BAD": [ + "BAD", + "דינר של בוסניה־הרצגובינה" + ], + "BAM": [ + "BAM", + "מ×רק בר המרה של בוסניה־הרצגובינה" + ], + "BBD": [ + "BBD", + "דולר ברבדי×× ×™" + ], + "BDT": [ + "BDT", + "ט××§×” בנגלדשי" + ], + "BEC": [ + "BEC", + "פרנק בלגי (בר המרה)" + ], + "BEF": [ + "BEF", + "פרנק בלגי" + ], + "BGL": [ + "BGL", + "לב בולגרי ישן" + ], + "BGN": [ + "BGN", + "לב בולגרי" + ], + "BHD": [ + "BHD", + "דינר בחרייני" + ], + "BIF": [ + "BIF", + "פרנק בורונדי" + ], + "BMD": [ + "BMD", + "דולר ברמודה" + ], + "BND": [ + "BND", + "דולר ברוניי" + ], + "BOB": [ + "BOB", + "בוליבי×נו" + ], + "BOP": [ + "BOP", + "פזו בוליבי" + ], + "BRB": [ + "BRB", + "קרוזי×רו חדש ברזיל××™ (1967–1986)" + ], + "BRC": [ + "BRC", + "קרוזדו ברזיל××™" + ], + "BRL": [ + "R$", + "רי×ל ברזיל××™" + ], + "BSD": [ + "BSD", + "דולר בה×מי" + ], + "BTN": [ + "BTN", + "× ×’×•×œ×˜×¨×•× ×‘×”×•×˜× ×™" + ], + "BWP": [ + "BWP", + "פולה בוצוו×× ×™" + ], + "BYN": [ + "BYN", + "רובל בלרוסי" + ], + "BYR": [ + "BYR", + "רובל בלרוסי (2000–2016)" + ], + "BZD": [ + "BZD", + "דולר בליזי" + ], + "CAD": [ + "CA$", + "דולר קנדי" + ], + "CDF": [ + "CDF", + "פרנק קונגולזי" + ], + "CHF": [ + "CHF", + "פרנק שוויצרי" + ], + "CLP": [ + "CLP", + "פסו צ׳יל×× ×™" + ], + "CNY": [ + "‎CN¥‎", + "יו×ן סיני" + ], + "COP": [ + "COP", + "פסו קולומבי×× ×™" + ], + "CRC": [ + "CRC", + "קולון קוסטה־ריקני" + ], + "CSD": [ + "CSD", + "דינר סרבי ישן" + ], + "CUC": [ + "CUC", + "פזו קובני להמרה" + ], + "CUP": [ + "CUP", + "פזו קובני" + ], + "CVE": [ + "CVE", + "×סקודו ×›×£ ורדה" + ], + "CYP": [ + "CYP", + "לירה קפריס×ית" + ], + "CZK": [ + "CZK", + "קורונה צ׳כית" + ], + "DDM": [ + "DDM", + "מרק מזרח גרמני" + ], + "DEM": [ + "DEM", + "מרק גרמני" + ], + "DJF": [ + "DJF", + "פרנק ג׳יבוטי" + ], + "DKK": [ + "DKK", + "כתר דני" + ], + "DOP": [ + "DOP", + "פזו דומיניקני" + ], + "DZD": [ + "DZD", + "דינר ×לג׳ירי" + ], + "ECS": [ + "ECS", + "סוקר ×קו×דורי" + ], + "EEK": [ + "EEK", + "קרון ×סטוני" + ], + "EGP": [ + "EGP", + "לירה מצרית" + ], + "ERN": [ + "ERN", + "× ×קפה ×ריתר××™" + ], + "ESP": [ + "ESP", + "פסטה ספרדי" + ], + "ETB": [ + "ETB", + "ביר ×תיופי" + ], + "EUR": [ + "€", + "×ירו" + ], + "FIM": [ + "FIM", + "מרק פיני" + ], + "FJD": [ + "FJD", + "דולר פיג׳י" + ], + "FKP": [ + "FKP", + "לירה של ××™×™ פוקלנד" + ], + "FRF": [ + "FRF", + "פרנק צרפתי" + ], + "GBP": [ + "£", + "לירה שטרלינג" + ], + "GEL": [ + "GEL", + "לרי ×’×ורגי" + ], + "GHS": [ + "GHS", + "סדי ×’×× ×™" + ], + "GIP": [ + "GIP", + "פ×ונד גיברלטר" + ], + "GMD": [ + "GMD", + "דל×סי גמבי" + ], + "GNF": [ + "GNF", + "פרנק ×’×™× ××™" + ], + "GRD": [ + "GRD", + "דרכמה" + ], + "GTQ": [ + "GTQ", + "קצל גו×טמלי" + ], + "GWP": [ + "GWP", + "פזו ×’×™× ××™" + ], + "GYD": [ + "GYD", + "דולר ×’×™×× ×™" + ], + "HKD": [ + "HK$", + "דולר הונג קונגי" + ], + "HNL": [ + "HNL", + "למפירה הונדורי" + ], + "HRK": [ + "HRK", + "קונה קרו×טי" + ], + "HTG": [ + "HTG", + "גורד ×”×יטי" + ], + "HUF": [ + "HUF", + "פורינט הונגרי" + ], + "IDR": [ + "IDR", + "רופיה ×ינדונזית" + ], + "IEP": [ + "IEP", + "לירה ×ירית" + ], + "ILP": [ + "ל״י", + "לירה ישר×לית" + ], + "ILS": [ + "₪", + "שקל חדש" + ], + "INR": [ + "₹", + "רופי הודי" + ], + "IQD": [ + "IQD", + "דינר עיר××§×™" + ], + "IRR": [ + "IRR", + "רי×ל ×יר×× ×™" + ], + "ISK": [ + "ISK", + "כתר ×יסלנדי" + ], + "ITL": [ + "ITL", + "לירה ×יטלקית" + ], + "JMD": [ + "JMD", + "דולר ג׳מייקני" + ], + "JOD": [ + "JOD", + "דינר ירדני" + ], + "JPY": [ + "Â¥", + "ין יפני" + ], + "KES": [ + "KES", + "שילינג ×§× ×™×™×תי" + ], + "KGS": [ + "KGS", + "×¡×•× ×§×™×¨×’×™×–×™" + ], + "KHR": [ + "KHR", + "ריל קמבודי" + ], + "KMF": [ + "KMF", + "פרנק קומורו××™" + ], + "KPW": [ + "KPW", + "וון צפון קורי×× ×™" + ], + "KRW": [ + "â‚©", + "וון ×“×¨×•× ×§×•×¨×™×× ×™" + ], + "KWD": [ + "KWD", + "דינר כוויתי" + ], + "KYD": [ + "KYD", + "דולר קיימ×× ×™" + ], + "KZT": [ + "KZT", + "טנגה קזחסטני" + ], + "LAK": [ + "LAK", + "קיפ ל××™" + ], + "LBP": [ + "LBP", + "לירה לבנונית" + ], + "LKR": [ + "LKR", + "רופי סרי לנקי" + ], + "LRD": [ + "LRD", + "דולר ליברי" + ], + "LSL": [ + "LSL", + "לוטי לסותי" + ], + "LTL": [ + "LTL", + "×œ×™×˜× ×œ×™×˜××™" + ], + "LUF": [ + "LUF", + "פרנק לוקסמבורגי" + ], + "LVL": [ + "LVL", + "לט לטבי" + ], + "LYD": [ + "LYD", + "דינר לובי" + ], + "MAD": [ + "MAD", + "×“×™×¨×”× ×ž×¨×•×§××™" + ], + "MAF": [ + "MAF", + "פרנק מרוק××™" + ], + "MDL": [ + "MDL", + "לי×ו מולדובני" + ], + "MGA": [ + "MGA", + "×רי×רי מלגשי" + ], + "MGF": [ + "MGF", + "פרנק מדגסק×רי" + ], + "MKD": [ + "MKD", + "דינר מקדוני" + ], + "MMK": [ + "MMK", + "×§×™×ט מי×נמרי" + ], + "MNT": [ + "MNT", + "טוגרוג מונגולי" + ], + "MOP": [ + "MOP", + "פטקה של מק×ו" + ], + "MRO": [ + "MRO", + "×וגוויה מ×וריטני" + ], + "MTL": [ + "MTL", + "לירה מלטית" + ], + "MUR": [ + "MUR", + "רופי מ×וריציני" + ], + "MVR": [ + "MVR", + "רופיה מלדיבית" + ], + "MWK": [ + "MWK", + "קו×צ׳ה מל×וי" + ], + "MXN": [ + "MX$", + "פזו מקסיקני" + ], + "MXP": [ + "MXP", + "פזו מקסיקני (1861 – 1992)" + ], + "MYR": [ + "MYR", + "רינגיט מלזי" + ], + "MZE": [ + "MZE", + "×סקודו מוזמביקי" + ], + "MZM": [ + "MZM", + "מטיקל" + ], + "MZN": [ + "MZN", + "מטיקל מוזמביני" + ], + "NAD": [ + "NAD", + "דולר נמיבי" + ], + "NGN": [ + "NGN", + "× ×ירה ניגרי" + ], + "NIO": [ + "NIO", + "קורדובה ניקרגו××”" + ], + "NLG": [ + "NLG", + "גילדן הולנדי" + ], + "NOK": [ + "NOK", + "כתר נורווגי" + ], + "NPR": [ + "NPR", + "רופי נפ×לי" + ], + "NZD": [ + "NZ$", + "דולר ניו זילנדי" + ], + "OMR": [ + "OMR", + "רי×ל עומ×× ×™" + ], + "PAB": [ + "PAB", + "בלבו××” פנמי" + ], + "PEN": [ + "PEN", + "סול פרו×× ×™ חדש" + ], + "PGK": [ + "PGK", + "×§×™× ×” של פפו××” ×’×™× ××” החדשה" + ], + "PHP": [ + "PHP", + "פזו פיליפיני" + ], + "PKR": [ + "PKR", + "רופי פקיסטני" + ], + "PLN": [ + "PLN", + "זלוטי פולני" + ], + "PTE": [ + "PTE", + "×סקודו פורטוגלי" + ], + "PYG": [ + "PYG", + "גוורני פר×גוו××™" + ], + "QAR": [ + "QAR", + "רי×ל קט×רי" + ], + "ROL": [ + "ROL", + "ל×ו רומני ישן" + ], + "RON": [ + "RON", + "ל×ו רומני" + ], + "RSD": [ + "RSD", + "דינר סרבי" + ], + "RUB": [ + "RUB", + "רובל רוסי" + ], + "RUR": [ + "RUR", + "רובל רוסי (1991 – 1998)" + ], + "RWF": [ + "RWF", + "פרנק רו×נדי" + ], + "SAR": [ + "SAR", + "רי×ל סעודי" + ], + "SBD": [ + "SBD", + "דולר ××™×™ שלמה" + ], + "SCR": [ + "SCR", + "רופי סיישלי" + ], + "SDD": [ + "SDD", + "דינר סודני" + ], + "SDG": [ + "SDG", + "לירה סודנית" + ], + "SDP": [ + "SDP", + "לירה סודנית (1957–1998)" + ], + "SEK": [ + "SEK", + "כתר שוודי" + ], + "SGD": [ + "SGD", + "דולר סינגפורי" + ], + "SHP": [ + "SHP", + "פ×ונד סנט הלני" + ], + "SIT": [ + "SIT", + "טול×ר סלובני" + ], + "SKK": [ + "SKK", + "קורונה סלובקי" + ], + "SLL": [ + "SLL", + "לי×ון סיירה ל×וני" + ], + "SOS": [ + "SOS", + "שילינג סומ×לי" + ], + "SRD": [ + "SRD", + "דולר סורינ×מי" + ], + "SRG": [ + "SRG", + "גילדר סורינ×מי" + ], + "SSP": [ + "SSP", + "לירה דרו×-סודנית" + ], + "STD": [ + "STD", + "דוברה של סן טומה ופרינסיפה" + ], + "SUR": [ + "SUR", + "רובל סובייטי" + ], + "SVC": [ + "SVC", + "קולון סלבדורי" + ], + "SYP": [ + "SYP", + "לירה סורית" + ], + "SZL": [ + "SZL", + "לילנגני סווזי" + ], + "THB": [ + "฿", + "בהט ת×ילנדי" + ], + "TJS": [ + "TJS", + "סומוני טג׳קיסטני" + ], + "TMM": [ + "TMM", + "מנ×ט טורקמ×× ×™" + ], + "TMT": [ + "TMT", + "מ×× ×ט טורקמני" + ], + "TND": [ + "TND", + "דינר טוניס××™" + ], + "TOP": [ + "TOP", + "פ×× ×’×” טונגי" + ], + "TPE": [ + "TPE", + "×סקודו טימור××™" + ], + "TRL": [ + "TRL", + "לירה טורקית" + ], + "TRY": [ + "TRY", + "לירה טורקית חדשה" + ], + "TTD": [ + "TTD", + "דולר טרינידדי" + ], + "TWD": [ + "NT$", + "דולר טייוו×× ×™ חדש" + ], + "TZS": [ + "TZS", + "שילינג טנזני" + ], + "UAH": [ + "UAH", + "גריבנה ×וקר××™× ×™" + ], + "UGS": [ + "UGS", + "שילינג ×וגנדי (1966 – 1987)" + ], + "UGX": [ + "UGX", + "שילינג ×וגנדי" + ], + "USD": [ + "$", + "דולר ×מריק××™" + ], + "USN": [ + "USN", + "דולר ×מריק××™ (×”×™×•× ×”×‘×)" + ], + "USS": [ + "USS", + "דולר ×מריק××™ (×”×™×•× ×”×–×”)" + ], + "UYU": [ + "UYU", + "פסו ×ורוגוו××™" + ], + "UZS": [ + "UZS", + "×¡×•× ×וזבקי" + ], + "VEB": [ + "VEB", + "בוליבר ונצו×לי (1871–2008)" + ], + "VEF": [ + "VEF", + "בוליבר ונצו×לי" + ], + "VND": [ + "â‚«", + "דונג וייטנ×מי" + ], + "VUV": [ + "VUV", + "ו×טו של ונו×טו" + ], + "WST": [ + "WST", + "ט×לה סמו××™" + ], + "XAF": [ + "FCFA", + "פרנק CFA BEAC" + ], + "XCD": [ + "EC$", + "דולר מזרח קריבי" + ], + "XFO": [ + "XFO", + "פרנק זהב" + ], + "XOF": [ + "CFA", + "פרנק CFA BCEAO" + ], + "XPF": [ + "CFPF", + "פרנק פולינזיה הצרפתית" + ], + "YDD": [ + "YDD", + "דינר תימני" + ], + "YER": [ + "YER", + "רי×ל תימני" + ], + "ZAL": [ + "ZAL", + "ר×נד ×“×¨×•× ×פריק××™ (כספי)" + ], + "ZAR": [ + "ZAR", + "ר×נד ×“×¨×•× ×פריק××™" + ], + "ZMK": [ + "ZMK", + "קוו×צ׳ה זמבית (1968–2012)" + ], + "ZMW": [ + "ZMW", + "קוו×צ׳ה זמבית" + ], + "ZRN": [ + "ZRN", + "×–×יר חדש" + ], + "ZWD": [ + "ZWD", + "דולר זימבבו××™" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hi.json new file mode 100644 index 0000000000000000000000000000000000000000..9675026e72b8481d23a52996008cc9305b84d5dd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hi.json @@ -0,0 +1,725 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "संयà¥à¤•à¥à¤¤ अरब अमीरात दिरहाम" + ], + "AFA": [ + "AFA", + "अफगानी (1927–2002)" + ], + "AFN": [ + "AFN", + "अफ़गान अफ़गानी" + ], + "ALL": [ + "ALL", + "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾à¤ˆ लेक" + ], + "AMD": [ + "AMD", + "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾à¤ˆ दà¥à¤°à¤¾à¤®" + ], + "ANG": [ + "ANG", + "नीदरलैंड à¤à¤‚टीलियन गिलà¥à¤¡à¤°" + ], + "AOA": [ + "AOA", + "अंगोला कà¥à¤µà¤¾à¤‚ज़ा" + ], + "ARS": [ + "ARS", + "अरà¥à¤œà¥‡à¤‚टीनी पेसो" + ], + "AUD": [ + "A$", + "ऑसà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾à¤ˆ डॉलर" + ], + "AWG": [ + "AWG", + "अरूबाई फ़à¥à¤²à¥‹à¤°à¤¿à¤¨" + ], + "AZN": [ + "AZN", + "अज़रबैजानी मैनेट" + ], + "BAM": [ + "BAM", + "बोसà¥à¤¨à¤¿à¤¯à¤¾ हरà¥à¤œà¤¼à¥‡à¤—ोविना परिवरà¥à¤¤à¤¨à¥€à¤¯ मारà¥à¤•" + ], + "BBD": [ + "BBD", + "बारà¥à¤¬à¥‡à¤¡à¤¿à¤¯à¤¨ डॉलर" + ], + "BDT": [ + "BDT", + "बांगà¥à¤²à¤¾à¤¦à¥‡à¤¶à¥€ टका" + ], + "BGN": [ + "BGN", + "बà¥à¤²à¥à¤—ारियाई लेव" + ], + "BHD": [ + "BHD", + "बहरीनी दिनार" + ], + "BIF": [ + "BIF", + "बà¥à¤°à¥‚ंडी फ़à¥à¤°à¥ˆà¤‚क" + ], + "BMD": [ + "BMD", + "बरमूडा डॉलर" + ], + "BND": [ + "BND", + "बà¥à¤°à¥‚नेई डॉलर" + ], + "BOB": [ + "BOB", + "बोलिवियाई बोलिवियानो" + ], + "BRL": [ + "R$", + "बà¥à¤°à¤¾à¤œà¤¼à¥€à¤²à¥€ रियाल" + ], + "BSD": [ + "BSD", + "बहामाई डॉलर" + ], + "BTN": [ + "BTN", + "भूटानी नंगलटà¥à¤°à¤®" + ], + "BWP": [ + "BWP", + "बोतà¥à¤¸à¤µà¤¾à¤¨à¤¿à¤¯à¤¾à¤ˆ पà¥à¤²à¤¾" + ], + "BYN": [ + "BYN", + "बेलारूसी रूबल" + ], + "BYR": [ + "BYR", + "बेलारूसी रूबल (2000–2016)" + ], + "BZD": [ + "BZD", + "बेलीज़ डॉलर" + ], + "CAD": [ + "CA$", + "कनाडाई डॉलर" + ], + "CDF": [ + "CDF", + "कोंगोली फ़à¥à¤°à¥ˆà¤‚क" + ], + "CHF": [ + "CHF", + "सà¥à¤µà¤¿à¤¸ फ़à¥à¤°à¥ˆà¤‚क" + ], + "CLP": [ + "CLP", + "चिली पेसो" + ], + "CNY": [ + "CNÂ¥", + "चीनी यà¥à¤†à¤¨" + ], + "COP": [ + "COP", + "कोलंबियाई पेसो" + ], + "CRC": [ + "CRC", + "कोसà¥à¤Ÿà¤¾ रिका कोलोन" + ], + "CSD": [ + "CSD", + "सरà¥à¤¬à¤¿à¤¯ का ढीनार" + ], + "CUC": [ + "CUC", + "कà¥à¤¯à¥‚बाई परिवरà¥à¤¤à¤¨à¥€à¤¯ पेसो" + ], + "CUP": [ + "CUP", + "कà¥à¤¯à¥‚बाई पेसो" + ], + "CVE": [ + "CVE", + "केप वरà¥à¤¡ à¤à¤¸à¥à¤•ूडो" + ], + "CYP": [ + "CYP", + "साईपà¥à¤°à¤¸ पाऊंड" + ], + "CZK": [ + "CZK", + "चेक गणराजà¥à¤¯ कोरà¥à¤¨à¤¾" + ], + "DEM": [ + "DEM", + "डच मारà¥à¤•" + ], + "DJF": [ + "DJF", + "जिबूती फ़à¥à¤°à¥ˆà¤‚क" + ], + "DKK": [ + "DKK", + "डैनिश कà¥à¤°à¥‹à¤¨" + ], + "DOP": [ + "DOP", + "डोमिनिकन पेसो" + ], + "DZD": [ + "DZD", + "अलà¥à¤œà¥€à¤°à¤¿à¤¯à¤¾à¤ˆ दिनार" + ], + "EEK": [ + "EEK", + "à¤à¤¸à¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾à¤ˆ कà¥à¤°à¥‚नà¥" + ], + "EGP": [ + "EGP", + "मिसà¥à¤° पाउंड" + ], + "ERN": [ + "ERN", + "इरीटà¥à¤°à¤¿à¤¯à¤¨ नाकà¥à¤«à¤¼à¤¾" + ], + "ETB": [ + "ETB", + "इथियोपियन बिर" + ], + "EUR": [ + "€", + "यूरो" + ], + "FJD": [ + "FJD", + "फ़िजी डॉलर" + ], + "FKP": [ + "FKP", + "फ़ॉकलैंड दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह पाउंड" + ], + "FRF": [ + "FRF", + "फ़à¥à¤°à¤¾à¤‚सीसी फ़à¥à¤°à¥ˆà¤‚क" + ], + "GBP": [ + "£", + "बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ पाउंड सà¥à¤Ÿà¤°à¥à¤²à¤¿à¤‚ग" + ], + "GEL": [ + "GEL", + "जॉरà¥à¤œà¤¿à¤¯à¤¨ लारी" + ], + "GHS": [ + "GHS", + "घानियन सेडी" + ], + "GIP": [ + "GIP", + "जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤° पाउंड" + ], + "GMD": [ + "GMD", + "गैंबियन डलासी" + ], + "GNF": [ + "GNF", + "गिनीयन फ़à¥à¤°à¥ˆà¤‚क" + ], + "GTQ": [ + "GTQ", + "गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾ कà¥à¤µà¥‡à¤Ÿà¤œà¤¼à¤²" + ], + "GYD": [ + "GYD", + "गयानीज़ डॉलर" + ], + "HKD": [ + "HK$", + "हाà¤à¤—काà¤à¤— डॉलर" + ], + "HNL": [ + "HNL", + "होंडà¥à¤°à¤¨ लेमà¥à¤ªà¤¿à¤°à¤¾" + ], + "HRD": [ + "HRD", + "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¨ दिनार" + ], + "HRK": [ + "HRK", + "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾à¤ˆ कà¥à¤¨à¤¾" + ], + "HTG": [ + "HTG", + "हैतियाई गरà¥à¤¡" + ], + "HUF": [ + "HUF", + "हंगेरियन फ़ोरिंट" + ], + "IDR": [ + "IDR", + "इंडोनेशियाई रà¥à¤ªà¤¿à¤¯à¤¾" + ], + "ILS": [ + "₪", + "इज़राइली नà¥à¤¯à¥‚ शेकेल" + ], + "INR": [ + "₹", + "भारतीय रà¥à¤ªà¤¯à¤¾" + ], + "IQD": [ + "IQD", + "इराकी दिनार" + ], + "IRR": [ + "IRR", + "ईरानी रियाल" + ], + "ISK": [ + "ISK", + "आइसलैंडिक कà¥à¤°à¥‹à¤¨à¤¾" + ], + "ITL": [ + "ITL", + "इतली का लीरा" + ], + "JMD": [ + "JMD", + "जमैकन डॉलर" + ], + "JOD": [ + "JOD", + "जॉरà¥à¤¡à¤¨à¤¿à¤¯à¤¨ दिनार" + ], + "JPY": [ + "JPÂ¥", + "जापानी येन" + ], + "KES": [ + "KES", + "केनà¥à¤¯à¤¾à¤ˆ शिलिंग" + ], + "KGS": [ + "KGS", + "किरà¥à¤—िसà¥à¤¤à¤¾à¤¨à¥€ सोम" + ], + "KHR": [ + "KHR", + "कंबोडियाई रियाल" + ], + "KMF": [ + "KMF", + "कोमोरियन फ़à¥à¤°à¥ˆà¤‚क" + ], + "KPW": [ + "KPW", + "उतà¥à¤¤à¤° कोरियाई वॉन" + ], + "KRW": [ + "â‚©", + "दकà¥à¤·à¤¿à¤£ कोरियाई वॉन" + ], + "KWD": [ + "KWD", + "कà¥à¤µà¥ˆà¤¤à¥€ दिनार" + ], + "KYD": [ + "KYD", + "कैमेन दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह डॉलर" + ], + "KZT": [ + "KZT", + "कज़ाखिसà¥à¤¤à¤¾à¤¨à¥€ टेंज़" + ], + "LAK": [ + "LAK", + "लाओशियन किप" + ], + "LBP": [ + "LBP", + "लेबनानी पाउंड" + ], + "LKR": [ + "LKR", + "शà¥à¤°à¥€à¤²à¤‚काई रà¥à¤ªà¤¯à¤¾" + ], + "LRD": [ + "LRD", + "लाइबेरियाई डॉलर" + ], + "LSL": [ + "LSL", + "लेसोथो लोटी" + ], + "LTL": [ + "LTL", + "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾à¤ˆ लितास" + ], + "LVL": [ + "LVL", + "लातà¥à¤µà¤¿à¤¯à¤¨ लैतà¥à¤¸" + ], + "LYD": [ + "LYD", + "लीबियाई दिनार" + ], + "MAD": [ + "MAD", + "मोरकà¥à¤•ो दिरहम" + ], + "MAF": [ + "MAF", + "मोरकà¥à¤•ो फà¥à¤°à¥ˆà¤‚क" + ], + "MDL": [ + "MDL", + "मोलà¥à¤¡à¥‹à¤µà¤¨ लियू" + ], + "MGA": [ + "MGA", + "मालागासी आरियरी" + ], + "MKD": [ + "MKD", + "मैसीडोनियन दिनार" + ], + "MMK": [ + "MMK", + "मà¥à¤¯à¤¾à¤‚मार कà¥à¤¯à¤¾à¤Ÿ" + ], + "MNT": [ + "MNT", + "मंगोलियाई टगरिक" + ], + "MOP": [ + "MOP", + "मेकानीज़ पाटाका" + ], + "MRO": [ + "MRO", + "मॉरीटेनियन ओगà¥à¤‡à¤¯à¤¾" + ], + "MUR": [ + "MUR", + "मॉरिशियन रà¥à¤ªà¤¯à¤¾" + ], + "MVR": [ + "MVR", + "मालदीवी रà¥à¤«à¤¼à¤¿à¤¯à¤¾" + ], + "MWK": [ + "MWK", + "मालावियन कà¥à¤µà¤¾à¤šà¤¾" + ], + "MXN": [ + "MX$", + "मैकà¥à¤¸à¤¿à¤•न पेसो" + ], + "MYR": [ + "MYR", + "मलेशियाई रिंगित" + ], + "MZN": [ + "MZN", + "मोज़ामà¥à¤¬à¤¿à¤•न मेटिकल" + ], + "NAD": [ + "NAD", + "नामीबियाई डॉलर" + ], + "NGN": [ + "NGN", + "नाइजीरियाई नाइरा" + ], + "NIO": [ + "NIO", + "निकारागà¥à¤…न कोरडोबा" + ], + "NOK": [ + "NOK", + "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¨ कà¥à¤°à¥‹à¤¨" + ], + "NPR": [ + "NPR", + "नेपाली रà¥à¤ªà¤¯à¤¾" + ], + "NZD": [ + "NZ$", + "नà¥à¤¯à¥‚ज़ीलैंड डॉलर" + ], + "OMR": [ + "OMR", + "ओमानी रियाल" + ], + "PAB": [ + "PAB", + "पनामेनियन बैलà¥à¤¬à¥‹à¤†" + ], + "PEN": [ + "PEN", + "पेरूवियन नà¥à¤à¤µà¥‹ सोल" + ], + "PGK": [ + "PGK", + "पापà¥à¤† नà¥à¤¯à¥‚ गिनीयन किना" + ], + "PHP": [ + "PHP", + "फ़िलिपीनी पेसो" + ], + "PKR": [ + "PKR", + "पाकिसà¥à¤¤à¤¾à¤¨à¥€ रà¥à¤ªà¤¯à¤¾" + ], + "PLN": [ + "PLN", + "पोलिश ज़à¥à¤²à¥‰à¤Ÿà¥€" + ], + "PYG": [ + "PYG", + "पैरागà¥à¤µà¤¿à¤¯à¤¨ गà¥à¤†à¤°à¤¾à¤¨à¥€" + ], + "QAR": [ + "QAR", + "क़तरी रियाल" + ], + "RHD": [ + "RHD", + "रोडेशियाई डालर" + ], + "RON": [ + "RON", + "रोमानियाई लà¥à¤¯à¥‚" + ], + "RSD": [ + "RSD", + "सरà¥à¤¬à¤¿à¤¯à¤¨ दिनार" + ], + "RUB": [ + "RUB", + "रूसी रूबल" + ], + "RWF": [ + "RWF", + "रवांडाई फ़à¥à¤°à¥ˆà¤‚क" + ], + "SAR": [ + "SAR", + "सउदी रियाल" + ], + "SBD": [ + "SBD", + "सोलोमन दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह डॉलर" + ], + "SCR": [ + "SCR", + "सेशेलà¥à¤¸à¤¿à¤¯à¤¾à¤ˆ रà¥à¤ªà¤¯à¤¾" + ], + "SDD": [ + "SDD", + "पà¥à¤°à¤¾à¤¨à¥€ सूडानी दिनार" + ], + "SDG": [ + "SDG", + "सूडानी पाउंड" + ], + "SDP": [ + "SDP", + "पà¥à¤°à¤¾à¤¨à¤¾ सूडानी पाउंड" + ], + "SEK": [ + "SEK", + "सà¥à¤µà¥€à¤¡à¥€à¤¶ कà¥à¤°à¥‹à¤¨à¤¾" + ], + "SGD": [ + "SGD", + "सिंगापà¥à¤° डॉलर" + ], + "SHP": [ + "SHP", + "सेंट हेलेना पाउंड" + ], + "SIT": [ + "SIT", + "सà¥à¤²à¥‹à¤µà¥‡à¤¨à¤¿à¤¯à¤¾à¤ˆ तोलार" + ], + "SKK": [ + "SKK", + "सà¥à¤²à¥‹à¤µà¤¾à¤• कोरà¥à¤¨à¤¾" + ], + "SLL": [ + "SLL", + "सिà¤à¤°à¤¾ लियोनियन लियोन" + ], + "SOS": [ + "SOS", + "सोमाली शिलिंग" + ], + "SRD": [ + "SRD", + "सूरीनामी डॉलर" + ], + "SRG": [ + "SRG", + "सूरीनामी गिलà¥à¤¡à¤°" + ], + "SSP": [ + "SSP", + "दकà¥à¤·à¤¿à¤£ सूडानी पाउंड" + ], + "STD": [ + "STD", + "साओ तोम और पà¥à¤°à¤¿à¤‚सिपे डोबरा" + ], + "SUR": [ + "SUR", + "सोवियत रूबल" + ], + "SYP": [ + "SYP", + "सीरियाई पाउंड" + ], + "SZL": [ + "SZL", + "सà¥à¤µà¤¾à¤œà¤¼à¥€ लिलांजेनी" + ], + "THB": [ + "฿", + "थाई बहत" + ], + "TJR": [ + "TJR", + "तजाखी रूबल" + ], + "TJS": [ + "TJS", + "ताजिकिसà¥à¤¤à¤¾à¤¨à¥€ सोमोनी" + ], + "TMT": [ + "TMT", + "तà¥à¤°à¥à¤•मेनिसà¥à¤¤à¤¾à¤¨à¥€ मैनत" + ], + "TND": [ + "TND", + "टà¥à¤¯à¥‚नीशियाई दिनार" + ], + "TOP": [ + "TOP", + "टोंगन पांगा" + ], + "TRL": [ + "TRL", + "पà¥à¤°à¤¾à¤¨à¥€ तà¥à¤°à¥à¤•ी लीरा" + ], + "TRY": [ + "TRY", + "तà¥à¤°à¥à¤•ी लीरा" + ], + "TTD": [ + "TTD", + "तà¥à¤°à¤¿à¤¨à¤¿à¤¦à¤¾à¤¦ और टोबैगो डॉलर" + ], + "TWD": [ + "NT$", + "नया ताईवानी डॉलर" + ], + "TZS": [ + "TZS", + "तंज़ानियाई शिलिंग" + ], + "UAH": [ + "UAH", + "यूकà¥à¤°à¥‡à¤¨à¤¿à¤¯à¤¨ रिवà¥à¤¨à¤¿à¤¯à¤¾" + ], + "UGX": [ + "UGX", + "यà¥à¤—ांडाई शिलिंग" + ], + "USD": [ + "$", + "यूà¤à¤¸ डॉलर" + ], + "USN": [ + "USN", + "अमेरीकी डालर (कल)" + ], + "USS": [ + "USS", + "अमेरीकी डालर (आज)" + ], + "UYU": [ + "UYU", + "उरà¥à¤—à¥à¤µà¤¿à¤¯à¤¨ पेसो" + ], + "UZS": [ + "UZS", + "उज़à¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨ सोम" + ], + "VEB": [ + "VEB", + "वेनेज़à¥à¤à¤²à¤¾ बोलिवर (1871–2008)" + ], + "VEF": [ + "VEF", + "वेनेज़à¥à¤à¤²à¤¾ बोलिवर" + ], + "VND": [ + "â‚«", + "वियतनामी डोंग" + ], + "VUV": [ + "VUV", + "वनà¥à¤†à¤¤à¥‚ वातू" + ], + "WST": [ + "WST", + "समोआई ताला" + ], + "XAF": [ + "FCFA", + "[CFA] फ़à¥à¤°à¥ˆà¤‚क [BEAC]" + ], + "XCD": [ + "EC$", + "पूरà¥à¤µà¥€ कैरिबियाई डॉलर" + ], + "XOF": [ + "CFA", + "पशà¥à¤šà¤¿à¤®à¥€ अफ़à¥à¤°à¥€à¤•ी CFA फà¥à¤°à¥ˆà¤‚क" + ], + "XPF": [ + "CFPF", + "[CFP] फ़à¥à¤°à¥ˆà¤‚क" + ], + "YER": [ + "YER", + "यमनी रियाल" + ], + "ZAR": [ + "ZAR", + "दकà¥à¤·à¤¿à¤£ अफ़à¥à¤°à¥€à¤•ी रैंड" + ], + "ZMK": [ + "ZMK", + "ज़ामà¥à¤¬à¤¿à¤¯à¤¨ कà¥à¤µà¤¾à¤šà¤¾ (1968–2012)" + ], + "ZMW": [ + "ZMW", + "ज़ामà¥à¤¬à¤¿à¤¯à¤¨ कà¥à¤µà¤¾à¤šà¤¾" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hr.json new file mode 100644 index 0000000000000000000000000000000000000000..b96209e5f958474d8a67fc0f6ef878c9fbbddffe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hr.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "andorska pezeta" + ], + "AED": [ + "AED", + "UAE dirham" + ], + "AFA": [ + "AFA", + "afganistanski afgani (1927.–2002.)" + ], + "AFN": [ + "AFN", + "afganistanski afgani" + ], + "ALK": [ + "ALK", + "stari albanski lek" + ], + "ALL": [ + "ALL", + "albanski lek" + ], + "AMD": [ + "AMD", + "armenski dram" + ], + "ANG": [ + "ANG", + "nizozemskoantilski gulden" + ], + "AOA": [ + "AOA", + "angolska kvanza" + ], + "AOK": [ + "AOK", + "angolska kvanza (1977.–1990.)" + ], + "AON": [ + "AON", + "angolska nova kvanza (1990.–2000.)" + ], + "AOR": [ + "AOR", + "angolska kvanza (1995.–1999.)" + ], + "ARA": [ + "ARA", + "argentinski austral" + ], + "ARL": [ + "ARL", + "argentinski pezo lej (1970.–1983.)" + ], + "ARM": [ + "ARM", + "argentinski pezo (1881.–1970.)" + ], + "ARP": [ + "ARP", + "argentinski pezo (1983.–1985.)" + ], + "ARS": [ + "ARS", + "argentinski pezo" + ], + "ATS": [ + "ATS", + "austrijski Å¡iling" + ], + "AUD": [ + "AUD", + "australski dolar" + ], + "AWG": [ + "AWG", + "arupski florin" + ], + "AZM": [ + "AZM", + "azerbajdžanski manat (1993.–2006.)" + ], + "AZN": [ + "AZN", + "azerbajdžanski manat" + ], + "BAD": [ + "BAD", + "bosansko-hercegovaÄki dinar" + ], + "BAM": [ + "BAM", + "konvertibilna marka" + ], + "BAN": [ + "BAN", + "bosansko-hercegovaÄki novi dinar" + ], + "BBD": [ + "BBD", + "barbadoski dolar" + ], + "BDT": [ + "BDT", + "bangladeÅ¡ka taka" + ], + "BEC": [ + "BEC", + "belgijski franak (konvertibilan)" + ], + "BEF": [ + "BEF", + "belgijski franak" + ], + "BEL": [ + "BEL", + "belgijski franak (financijski)" + ], + "BGL": [ + "BGL", + "bugarski Ävrsti lev" + ], + "BGM": [ + "BGM", + "bugarski socijalistiÄki lev" + ], + "BGN": [ + "BGN", + "bugarski lev" + ], + "BGO": [ + "BGO", + "stari bugarski lev" + ], + "BHD": [ + "BHD", + "bahreinski dinar" + ], + "BIF": [ + "BIF", + "burundski franak" + ], + "BMD": [ + "BMD", + "bermudski dolar" + ], + "BND": [ + "BND", + "brunejski dolar" + ], + "BOB": [ + "BOB", + "bolivijski bolivijano" + ], + "BOL": [ + "BOL", + "stari bolivijski bolivijano" + ], + "BOP": [ + "BOP", + "bolivijski pezo" + ], + "BOV": [ + "BOV", + "bolivijski mvdol" + ], + "BRB": [ + "BRB", + "brazilski novi cruzeiro (1967.–1986.)" + ], + "BRC": [ + "BRC", + "brazilski cruzado" + ], + "BRE": [ + "BRE", + "brazilski cruzeiro (1990.–1993.)" + ], + "BRL": [ + "BRL", + "brazilski real" + ], + "BRN": [ + "BRN", + "brazilski novi cruzado" + ], + "BRR": [ + "BRR", + "brazilski cruzeiro" + ], + "BRZ": [ + "BRZ", + "BRZ" + ], + "BSD": [ + "BSD", + "bahamski dolar" + ], + "BTN": [ + "BTN", + "butanski ngultrum" + ], + "BUK": [ + "BUK", + "burmanski kyat" + ], + "BWP": [ + "BWP", + "bocvanska pula" + ], + "BYB": [ + "BYB", + "bjeloruska nova rublja (1994–1999)" + ], + "BYN": [ + "BYN", + "bjeloruska rublja" + ], + "BYR": [ + "BYR", + "bjeloruska rublja (2000–2016)" + ], + "BZD": [ + "BZD", + "belizeanski dolar" + ], + "CAD": [ + "CAD", + "kanadski dolar" + ], + "CDF": [ + "CDF", + "kongoanski franak" + ], + "CHE": [ + "CHE", + "WIR euro" + ], + "CHF": [ + "CHF", + "Å¡vicarski franak" + ], + "CHW": [ + "CHW", + "WIR franak" + ], + "CLE": [ + "CLE", + "Äileanski eskudo" + ], + "CLF": [ + "CLF", + "Äileanski unidades de fomentos" + ], + "CLP": [ + "CLP", + "Äileanski pezo" + ], + "CNX": [ + "CNX", + "kineski narodni dolar" + ], + "CNY": [ + "CNY", + "kineski yuan" + ], + "COP": [ + "COP", + "kolumbijski pezo" + ], + "COU": [ + "COU", + "unidad de valor real" + ], + "CRC": [ + "CRC", + "kostarikanski kolon" + ], + "CSD": [ + "CSD", + "stari srpski dinar" + ], + "CSK": [ + "CSK", + "ÄehoslovaÄka kruna" + ], + "CUC": [ + "CUC", + "kubanski konvertibilni pezo" + ], + "CUP": [ + "CUP", + "kubanski pezo" + ], + "CVE": [ + "CVE", + "zelenortski eskudo" + ], + "CYP": [ + "CYP", + "ciparska funta" + ], + "CZK": [ + "CZK", + "ÄeÅ¡ka kruna" + ], + "DDM": [ + "DDM", + "istoÄnonjemaÄka marka" + ], + "DEM": [ + "DEM", + "njemaÄka marka" + ], + "DJF": [ + "DJF", + "džibutski franak" + ], + "DKK": [ + "DKK", + "danska kruna" + ], + "DOP": [ + "DOP", + "dominikanski pezo" + ], + "DZD": [ + "DZD", + "alžirski dinar" + ], + "ECS": [ + "ECS", + "ekvatorska sukra" + ], + "ECV": [ + "ECV", + "ekvatorski unidad de valor constante (UVC)" + ], + "EEK": [ + "EEK", + "estonska kruna" + ], + "EGP": [ + "EGP", + "egipatska funta" + ], + "ERN": [ + "ERN", + "eritrejska nakfa" + ], + "ESA": [ + "ESA", + "Å¡panjolska pezeta (A raÄun)" + ], + "ESB": [ + "ESB", + "Å¡panjolska pezeta (konvertibilni raÄun)" + ], + "ESP": [ + "ESP", + "Å¡panjolska pezeta" + ], + "ETB": [ + "ETB", + "etiopski bir" + ], + "EUR": [ + "EUR", + "euro" + ], + "FIM": [ + "FIM", + "finska marka" + ], + "FJD": [ + "FJD", + "fidžijski dolar" + ], + "FKP": [ + "FKP", + "falklandska funta" + ], + "FRF": [ + "FRF", + "francuski franak" + ], + "GBP": [ + "GBP", + "britanska funta" + ], + "GEK": [ + "GEK", + "gruzijski kupon larit" + ], + "GEL": [ + "GEL", + "gruzijski lari" + ], + "GHC": [ + "GHC", + "ganski cedi (1979.–2007.)" + ], + "GHS": [ + "GHS", + "ganski cedi" + ], + "GIP": [ + "GIP", + "gibraltarska funta" + ], + "GMD": [ + "GMD", + "gambijski dalas" + ], + "GNF": [ + "GNF", + "gvinejski franak" + ], + "GNS": [ + "GNS", + "gvinejski syli" + ], + "GQE": [ + "GQE", + "ekvatorski gvinejski ekwele" + ], + "GRD": [ + "GRD", + "grÄka drahma" + ], + "GTQ": [ + "GTQ", + "gvatemalski kvecal" + ], + "GWE": [ + "GWE", + "portugalski gvinejski eskudo" + ], + "GWP": [ + "GWP", + "gvinejskobisauski pezo" + ], + "GYD": [ + "GYD", + "gvajanski dolar" + ], + "HKD": [ + "HKD", + "hongkonÅ¡ki dolar" + ], + "HNL": [ + "HNL", + "honduraÅ¡ka lempira" + ], + "HRD": [ + "HRD", + "hrvatski dinar" + ], + "HRK": [ + "HRK", + "hrvatska kuna" + ], + "HTG": [ + "HTG", + "haićanski gourd" + ], + "HUF": [ + "HUF", + "maÄ‘arska forinta" + ], + "IDR": [ + "IDR", + "indonezijska rupija" + ], + "IEP": [ + "IEP", + "irska funta" + ], + "ILP": [ + "ILP", + "izraelska funta" + ], + "ILR": [ + "ILR", + "stari izraelski Å¡ekel" + ], + "ILS": [ + "ILS", + "novi izraelski Å¡ekel" + ], + "INR": [ + "INR", + "indijska rupija" + ], + "IQD": [ + "IQD", + "iraÄki dinar" + ], + "IRR": [ + "IRR", + "iranski rijal" + ], + "ISJ": [ + "ISJ", + "stara islandska kruna" + ], + "ISK": [ + "ISK", + "islandska kruna" + ], + "ITL": [ + "ITL", + "talijanska lira" + ], + "JMD": [ + "JMD", + "jamajÄanski dolar" + ], + "JOD": [ + "JOD", + "jordanski dinar" + ], + "JPY": [ + "JPY", + "japanski jen" + ], + "KES": [ + "KES", + "kenijski Å¡iling" + ], + "KGS": [ + "KGS", + "kirgiski som" + ], + "KHR": [ + "KHR", + "kamboÄ‘anski rijal" + ], + "KMF": [ + "KMF", + "komorski franak" + ], + "KPW": [ + "KPW", + "sjevernokorejski won" + ], + "KRH": [ + "KRH", + "južnokorejski hvan" + ], + "KRO": [ + "KRO", + "stari južnokorejski von" + ], + "KRW": [ + "KRW", + "južnokorejski won" + ], + "KWD": [ + "KWD", + "kuvajtski dinar" + ], + "KYD": [ + "KYD", + "kajmanski dolar" + ], + "KZT": [ + "KZT", + "kazahstanski tenge" + ], + "LAK": [ + "LAK", + "laoski kip" + ], + "LBP": [ + "LBP", + "libanonska funta" + ], + "LKR": [ + "LKR", + "Å¡rilankanska rupija" + ], + "LRD": [ + "LRD", + "liberijski dolar" + ], + "LSL": [ + "LSL", + "lesoto loti" + ], + "LTL": [ + "LTL", + "litavski litas" + ], + "LTT": [ + "LTT", + "litavski talonas" + ], + "LUC": [ + "LUC", + "luksemburÅ¡ki konvertibilni franak" + ], + "LUF": [ + "LUF", + "luksemburÅ¡ki franak" + ], + "LUL": [ + "LUL", + "luksemburÅ¡ki financijski franak" + ], + "LVL": [ + "LVL", + "letonski lats" + ], + "LVR": [ + "LVR", + "letonska rublja" + ], + "LYD": [ + "LYD", + "libijski dinar" + ], + "MAD": [ + "MAD", + "marokanski dirham" + ], + "MAF": [ + "MAF", + "marokanski franak" + ], + "MCF": [ + "MCF", + "MCF" + ], + "MDC": [ + "MDC", + "moldavski kupon" + ], + "MDL": [ + "MDL", + "moldavski lej" + ], + "MGA": [ + "MGA", + "madagaskarski ariary" + ], + "MGF": [ + "MGF", + "madagaskarski franak" + ], + "MKD": [ + "MKD", + "makedonski denar" + ], + "MKN": [ + "MKN", + "stari makedonski denar" + ], + "MLF": [ + "MLF", + "malijski franak" + ], + "MMK": [ + "MMK", + "mjanmarski kjat" + ], + "MNT": [ + "MNT", + "mongolski tugrik" + ], + "MOP": [ + "MOP", + "makaoÅ¡ka pataka" + ], + "MRO": [ + "MRO", + "mauritanijska ouguja" + ], + "MTL": [ + "MTL", + "malteÅ¡ka lira" + ], + "MTP": [ + "MTP", + "malteÅ¡ka funta" + ], + "MUR": [ + "MUR", + "mauricijska rupija" + ], + "MVP": [ + "MVP", + "maldivijska rupija" + ], + "MVR": [ + "MVR", + "maldivijska rufija" + ], + "MWK": [ + "MWK", + "malavijska kvaÄa" + ], + "MXN": [ + "MXN", + "meksiÄki pezo" + ], + "MXP": [ + "MXP", + "meksiÄki srebrni pezo (1861–1992)" + ], + "MXV": [ + "MXV", + "meksiÄki unidad de inversion (UDI)" + ], + "MYR": [ + "MYR", + "malezijski ringit" + ], + "MZE": [ + "MZE", + "mozambijski eskudo" + ], + "MZM": [ + "MZM", + "stari mozambijski metikal" + ], + "MZN": [ + "MZN", + "mozambiÄki metikal" + ], + "NAD": [ + "NAD", + "namibijski dolar" + ], + "NGN": [ + "NGN", + "nigerijska naira" + ], + "NIC": [ + "NIC", + "nikaragvanska kordoba" + ], + "NIO": [ + "NIO", + "nikaragvanska zlatna kordoba" + ], + "NLG": [ + "NLG", + "nizozemski gulden" + ], + "NOK": [ + "NOK", + "norveÅ¡ka kruna" + ], + "NPR": [ + "NPR", + "nepalska rupija" + ], + "NZD": [ + "NZD", + "novozelandski dolar" + ], + "OMR": [ + "OMR", + "omanski rijal" + ], + "PAB": [ + "PAB", + "panamska balboa" + ], + "PEI": [ + "PEI", + "peruanski inti" + ], + "PEN": [ + "PEN", + "peruanski novi sol" + ], + "PES": [ + "PES", + "peruanski sol" + ], + "PGK": [ + "PGK", + "kina Papue Nove Gvineje" + ], + "PHP": [ + "PHP", + "filipinski pezo" + ], + "PKR": [ + "PKR", + "pakistanska rupija" + ], + "PLN": [ + "PLN", + "poljska zlota" + ], + "PLZ": [ + "PLZ", + "poljska zlota (1950.–1995.)" + ], + "PTE": [ + "PTE", + "portugalski eskudo" + ], + "PYG": [ + "PYG", + "paragvajski gvarani" + ], + "QAR": [ + "QAR", + "katarski rial" + ], + "RHD": [ + "RHD", + "rodezijski dolar" + ], + "ROL": [ + "ROL", + "starorumunjski lek" + ], + "RON": [ + "RON", + "rumunjski lej" + ], + "RSD": [ + "RSD", + "srpski dinar" + ], + "RUB": [ + "RUB", + "ruska rublja" + ], + "RUR": [ + "RUR", + "ruska rublja (1991.–1998.)" + ], + "RWF": [ + "RWF", + "ruandski franak" + ], + "SAR": [ + "SAR", + "saudijski rial" + ], + "SBD": [ + "SBD", + "solmonskootoÄni dolar" + ], + "SCR": [ + "SCR", + "sejÅ¡elska rupija" + ], + "SDD": [ + "SDD", + "sudanski dinar" + ], + "SDG": [ + "SDG", + "sudanska funta" + ], + "SDP": [ + "SDP", + "stara sudanska funta" + ], + "SEK": [ + "SEK", + "Å¡vedska kruna" + ], + "SGD": [ + "SGD", + "singapurski dolar" + ], + "SHP": [ + "SHP", + "svetohelenska funta" + ], + "SIT": [ + "SIT", + "slovenski tolar" + ], + "SKK": [ + "SKK", + "slovaÄka kruna" + ], + "SLL": [ + "SLL", + "sijeraleonski leone" + ], + "SOS": [ + "SOS", + "somalijski Å¡iling" + ], + "SRD": [ + "SRD", + "surinamski dolar" + ], + "SRG": [ + "SRG", + "surinamski gulden" + ], + "SSP": [ + "SSP", + "južnosudanska funta" + ], + "STD": [ + "STD", + "dobra Svetog Tome i Principa" + ], + "SUR": [ + "SUR", + "sovjetska rublja" + ], + "SVC": [ + "SVC", + "salvadorski kolon" + ], + "SYP": [ + "SYP", + "sirijska funta" + ], + "SZL": [ + "SZL", + "svazi lilangeni" + ], + "THB": [ + "THB", + "tajlandski baht" + ], + "TJR": [ + "TJR", + "tajikistanska rublja" + ], + "TJS": [ + "TJS", + "tadžikistanski somoni" + ], + "TMM": [ + "TMM", + "turkmenistanski manat (1993.–2009.)" + ], + "TMT": [ + "TMT", + "turkmenistanski manat" + ], + "TND": [ + "TND", + "tuniski dinar" + ], + "TOP": [ + "TOP", + "tongaÅ¡ka pa’anga" + ], + "TPE": [ + "TPE", + "timorski eskudo" + ], + "TRL": [ + "TRL", + "turska lira (1922.–2005.)" + ], + "TRY": [ + "TRY", + "turska lira" + ], + "TTD": [ + "TTD", + "trininadtobaÅ¡ki dolar" + ], + "TWD": [ + "TWD", + "novotajvanski dolar" + ], + "TZS": [ + "TZS", + "tanzanijski Å¡iling" + ], + "UAH": [ + "UAH", + "ukrajinska hrivnja" + ], + "UAK": [ + "UAK", + "ukrajinski karbovanet" + ], + "UGS": [ + "UGS", + "ugandski Å¡iling (1966.–1987.)" + ], + "UGX": [ + "UGX", + "ugandski Å¡iling" + ], + "USD": [ + "USD", + "ameriÄki dolar" + ], + "USN": [ + "USN", + "ameriÄki dolar (sljedeći dan)" + ], + "USS": [ + "USS", + "ameriÄki dolar (isti dan)" + ], + "UYI": [ + "UYI", + "urugvajski pezo en unidades indexadas" + ], + "UYP": [ + "UYP", + "urugvajski pezo (1975.–1993.)" + ], + "UYU": [ + "UYU", + "urugvajski pezo" + ], + "UZS": [ + "UZS", + "uzbekistanski som" + ], + "VEB": [ + "VEB", + "venezuelanski bolivar (1871.–2008.)" + ], + "VEF": [ + "VEF", + "venezuelanski bolivar" + ], + "VND": [ + "VND", + "vijetnamski dong" + ], + "VNN": [ + "VNN", + "vijetnamski dong (1978.–1985.)" + ], + "VUV": [ + "VUV", + "vanuatski vatu" + ], + "WST": [ + "WST", + "samoanska tala" + ], + "XAF": [ + "FCFA", + "CFA franak BEAC" + ], + "XCD": [ + "XCD", + "istoÄnokaripski dolar" + ], + "XEU": [ + "XEU", + "europska monetarna jedinica (ECU)" + ], + "XFO": [ + "XFO", + "francuski zlatni franak" + ], + "XFU": [ + "XFU", + "francuski UIC-franak" + ], + "XOF": [ + "CFA", + "CFA franak BCEAO" + ], + "XPF": [ + "XPF", + "CFP franak" + ], + "XRE": [ + "XRE", + "RINET fondovi" + ], + "YDD": [ + "YDD", + "jemenski dinar" + ], + "YER": [ + "YER", + "jemenski rial" + ], + "YUD": [ + "YUD", + "jugoslavenski Ävrsti dinar" + ], + "YUM": [ + "YUM", + "jugoslavenski novi dinar" + ], + "YUN": [ + "YUN", + "jugoslavenski konvertibilni dinar" + ], + "YUR": [ + "YUR", + "jugoslavenski reformirani dinar" + ], + "ZAL": [ + "ZAL", + "južnoafriÄki rand (financijski)" + ], + "ZAR": [ + "ZAR", + "južnoafriÄki rand" + ], + "ZMK": [ + "ZMK", + "zambijska kvaÄa (1968–2012)" + ], + "ZMW": [ + "ZMW", + "zambijska kvaÄa" + ], + "ZRN": [ + "ZRN", + "zairski novi zair" + ], + "ZRZ": [ + "ZRZ", + "zairski zair" + ], + "ZWD": [ + "ZWD", + "zimbabveanski dolar (1980.–2008.)" + ], + "ZWL": [ + "ZWL", + "zimbabveanski dolar (2009)" + ], + "ZWR": [ + "ZWR", + "zimbabveanski dolar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hr_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hr_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..488f91f824dc8250a28dcb0d4cffb77447c26dc2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hr_BA.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BAM": [ + "KM", + "konvertibilna marka" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hu.json new file mode 100644 index 0000000000000000000000000000000000000000..ca40323ac2099367c32170b75326945dc85fd073 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hu.json @@ -0,0 +1,1065 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Andorrai peseta" + ], + "AED": [ + "AED", + "EAE-dirham" + ], + "AFA": [ + "AFA", + "afgán afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "afgán afghani" + ], + "ALL": [ + "ALL", + "albán lek" + ], + "AMD": [ + "AMD", + "örmény dram" + ], + "ANG": [ + "ANG", + "holland antilláki forint" + ], + "AOA": [ + "AOA", + "angolai kwanza" + ], + "AOK": [ + "AOK", + "Angolai kwanza (1977–1990)" + ], + "AON": [ + "AON", + "Angolai új kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angolai kwanza reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentín austral" + ], + "ARP": [ + "ARP", + "Argentín peso (1983–1985)" + ], + "ARS": [ + "ARS", + "argentin peso" + ], + "ATS": [ + "ATS", + "Osztrák schilling" + ], + "AUD": [ + "AUD", + "ausztrál dollár" + ], + "AWG": [ + "AWG", + "arubai florin" + ], + "AZM": [ + "AZM", + "azerbajdzsáni manat (1993–2006)" + ], + "AZN": [ + "AZN", + "azerbajdzsáni manat" + ], + "BAD": [ + "BAD", + "Bosznia-hercegovinai dínár (1992–1994)" + ], + "BAM": [ + "BAM", + "bosznia-hercegovinai konvertibilis márka" + ], + "BBD": [ + "BBD", + "barbadosi dollár" + ], + "BDT": [ + "BDT", + "bangladesi taka" + ], + "BEC": [ + "BEC", + "Belga frank (konvertibilis)" + ], + "BEF": [ + "BEF", + "Belga frank" + ], + "BEL": [ + "BEL", + "Belga frank (pénzügyi)" + ], + "BGL": [ + "BGL", + "Bolgár kemény leva" + ], + "BGN": [ + "BGN", + "bolgár új leva" + ], + "BHD": [ + "BHD", + "bahreini dinár" + ], + "BIF": [ + "BIF", + "burundi frank" + ], + "BMD": [ + "BMD", + "bermudai dollár" + ], + "BND": [ + "BND", + "brunei dollár" + ], + "BOB": [ + "BOB", + "bolíviai boliviano" + ], + "BOP": [ + "BOP", + "Bolíviai peso" + ], + "BOV": [ + "BOV", + "Bolíviai mvdol" + ], + "BRB": [ + "BRB", + "Brazi cruzeiro novo (1967–1986)" + ], + "BRC": [ + "BRC", + "Brazi cruzado (1986–1989)" + ], + "BRE": [ + "BRE", + "Brazil cruzeiro (1990–1993)" + ], + "BRL": [ + "BRL", + "brazil real" + ], + "BRN": [ + "BRN", + "Brazil cruzado novo (1989–1990)" + ], + "BRR": [ + "BRR", + "Brazil cruzeiro (1993–1994)" + ], + "BSD": [ + "BSD", + "bahamai dollár" + ], + "BTN": [ + "BTN", + "bhutáni ngultrum" + ], + "BUK": [ + "BUK", + "Burmai kyat" + ], + "BWP": [ + "BWP", + "botswanai pula" + ], + "BYB": [ + "BYB", + "Fehérorosz új rubel (1994–1999)" + ], + "BYN": [ + "BYN", + "fehérorosz rubel" + ], + "BYR": [ + "BYR", + "fehérorosz rubel (2000–2016)" + ], + "BZD": [ + "BZD", + "belize-i dollár" + ], + "CAD": [ + "CAD", + "kanadai dollár" + ], + "CDF": [ + "CDF", + "kongói frank" + ], + "CHE": [ + "CHE", + "WIR euro" + ], + "CHF": [ + "CHF", + "svájci frank" + ], + "CHW": [ + "CHW", + "WIR frank" + ], + "CLF": [ + "CLF", + "Chilei unidades de fomento" + ], + "CLP": [ + "CLP", + "chilei peso" + ], + "CNY": [ + "CNY", + "kínai jüan" + ], + "COP": [ + "COP", + "kolumbiai peso" + ], + "COU": [ + "COU", + "Unidad de Valor Real" + ], + "CRC": [ + "CRC", + "Costa Rica-i colon" + ], + "CSD": [ + "CSD", + "szerb dinár" + ], + "CSK": [ + "CSK", + "Csehszlovák kemény korona" + ], + "CUC": [ + "CUC", + "kubai konvertibilis peso" + ], + "CUP": [ + "CUP", + "kubai peso" + ], + "CVE": [ + "CVE", + "Cape Verde-i escudo" + ], + "CYP": [ + "CYP", + "Ciprusi font" + ], + "CZK": [ + "CZK", + "cseh korona" + ], + "DDM": [ + "DDM", + "Kelet-Német márka" + ], + "DEM": [ + "DEM", + "Német márka" + ], + "DJF": [ + "DJF", + "dzsibuti frank" + ], + "DKK": [ + "DKK", + "dán korona" + ], + "DOP": [ + "DOP", + "dominikai peso" + ], + "DZD": [ + "DZD", + "algériai dínár" + ], + "ECS": [ + "ECS", + "Ecuadori sucre" + ], + "ECV": [ + "ECV", + "Ecuadori Unidad de Valor Constante (UVC)" + ], + "EEK": [ + "EEK", + "Észt korona" + ], + "EGP": [ + "EGP", + "egyiptomi font" + ], + "ERN": [ + "ERN", + "eritreai nakfa" + ], + "ESA": [ + "ESA", + "spanyol peseta (A–kontó)" + ], + "ESB": [ + "ESB", + "spanyol peseta (konvertibilis kontó)" + ], + "ESP": [ + "ESP", + "Spanyol peseta" + ], + "ETB": [ + "ETB", + "etiópiai birr" + ], + "EUR": [ + "EUR", + "euró" + ], + "FIM": [ + "FIM", + "Finn markka" + ], + "FJD": [ + "FJD", + "fidzsi dollár" + ], + "FKP": [ + "FKP", + "falkland-szigeteki font" + ], + "FRF": [ + "FRF", + "Francia frank" + ], + "GBP": [ + "GBP", + "brit font" + ], + "GEK": [ + "GEK", + "Grúz kupon larit" + ], + "GEL": [ + "GEL", + "grúz lari" + ], + "GHC": [ + "GHC", + "Ghánai cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "ghánai cedi" + ], + "GIP": [ + "GIP", + "gibraltári font" + ], + "GMD": [ + "GMD", + "gambiai dalasi" + ], + "GNF": [ + "GNF", + "guineai frank" + ], + "GNS": [ + "GNS", + "Guineai syli" + ], + "GQE": [ + "GQE", + "EgyenlítÅ‘i-guineai ekwele guineana" + ], + "GRD": [ + "GRD", + "Görög drachma" + ], + "GTQ": [ + "GTQ", + "guatemalai quetzal" + ], + "GWE": [ + "GWE", + "Portugál guinea escudo" + ], + "GWP": [ + "GWP", + "Guinea-Bissaui peso" + ], + "GYD": [ + "GYD", + "guyanai dollár" + ], + "HKD": [ + "HKD", + "hongkongi dollár" + ], + "HNL": [ + "HNL", + "hodurasi lempira" + ], + "HRD": [ + "HRD", + "Horvát dínár" + ], + "HRK": [ + "HRK", + "horvát kuna" + ], + "HTG": [ + "HTG", + "haiti gourde" + ], + "HUF": [ + "Ft", + "magyar forint" + ], + "IDR": [ + "IDR", + "indonéz rúpia" + ], + "IEP": [ + "IEP", + "Ãr font" + ], + "ILP": [ + "ILP", + "Izraeli font" + ], + "ILS": [ + "ILS", + "izraeli új sékel" + ], + "INR": [ + "INR", + "indiai rúpia" + ], + "IQD": [ + "IQD", + "iraki dínár" + ], + "IRR": [ + "IRR", + "iráni rial" + ], + "ISK": [ + "ISK", + "izlandi korona" + ], + "ITL": [ + "ITL", + "Olasz líra" + ], + "JMD": [ + "JMD", + "jamaicai dollár" + ], + "JOD": [ + "JOD", + "jordániai dínár" + ], + "JPY": [ + "Â¥", + "japán jen" + ], + "KES": [ + "KES", + "kenyai shilling" + ], + "KGS": [ + "KGS", + "kirgizisztáni szom" + ], + "KHR": [ + "KHR", + "kambodzsai riel" + ], + "KMF": [ + "KMF", + "comorei frank" + ], + "KPW": [ + "KPW", + "észak-koreai won" + ], + "KRW": [ + "KRW", + "dél-koreai won" + ], + "KWD": [ + "KWD", + "kuvaiti dínár" + ], + "KYD": [ + "KYD", + "kajmán-szigeteki dollár" + ], + "KZT": [ + "KZT", + "kazahsztáni tenge" + ], + "LAK": [ + "LAK", + "laoszi kip" + ], + "LBP": [ + "LBP", + "libanoni font" + ], + "LKR": [ + "LKR", + "Srí Lanka-i rúpia" + ], + "LRD": [ + "LRD", + "libériai dollár" + ], + "LSL": [ + "LSL", + "Lesothoi loti" + ], + "LTL": [ + "LTL", + "litvániai litas" + ], + "LTT": [ + "LTT", + "Litvániai talonas" + ], + "LUC": [ + "LUC", + "luxemburgi konvertibilis frank" + ], + "LUF": [ + "LUF", + "Luxemburgi frank" + ], + "LUL": [ + "LUL", + "luxemburgi pénzügyi frank" + ], + "LVL": [ + "LVL", + "lett lats" + ], + "LVR": [ + "LVR", + "Lett rubel" + ], + "LYD": [ + "LYD", + "líbiai dínár" + ], + "MAD": [ + "MAD", + "marokkói dirham" + ], + "MAF": [ + "MAF", + "Marokkói frank" + ], + "MDL": [ + "MDL", + "moldován lei" + ], + "MGA": [ + "MGA", + "madagaszkári ariary" + ], + "MGF": [ + "MGF", + "Madagaszkári frank" + ], + "MKD": [ + "MKD", + "macedon dínár" + ], + "MLF": [ + "MLF", + "Mali frank" + ], + "MMK": [ + "MMK", + "mianmari kyat" + ], + "MNT": [ + "MNT", + "mongóliai tugrik" + ], + "MOP": [ + "MOP", + "makaói pataca" + ], + "MRO": [ + "MRO", + "mauritániai ouguiya" + ], + "MTL": [ + "MTL", + "Máltai líra" + ], + "MTP": [ + "MTP", + "Máltai font" + ], + "MUR": [ + "MUR", + "mauritiusi rúpia" + ], + "MVR": [ + "MVR", + "maldív-szigeteki rufiyaa" + ], + "MWK": [ + "MWK", + "malawi kwacha" + ], + "MXN": [ + "MXN", + "mexikói peso" + ], + "MXP": [ + "MXP", + "Mexikói ezüst peso (1861–1992)" + ], + "MXV": [ + "MXV", + "Mexikói Unidad de Inversion (UDI)" + ], + "MYR": [ + "MYR", + "malajziai ringgit" + ], + "MZE": [ + "MZE", + "Mozambik escudo" + ], + "MZM": [ + "MZM", + "Mozambik metical" + ], + "MZN": [ + "MZN", + "mozambiki metikális" + ], + "NAD": [ + "NAD", + "namíbiai dollár" + ], + "NGN": [ + "NGN", + "nigériai naira" + ], + "NIC": [ + "NIC", + "Nikaraguai cordoba" + ], + "NIO": [ + "NIO", + "nicaraguai córdoba" + ], + "NLG": [ + "NLG", + "Holland forint" + ], + "NOK": [ + "NOK", + "norvég korona" + ], + "NPR": [ + "NPR", + "nepáli rúpia" + ], + "NZD": [ + "NZD", + "új-zélandi dollár" + ], + "OMR": [ + "OMR", + "ománi rial" + ], + "PAB": [ + "PAB", + "panamai balboa" + ], + "PEI": [ + "PEI", + "Perui inti" + ], + "PEN": [ + "PEN", + "perui sol nuevo" + ], + "PES": [ + "PES", + "Perui sol" + ], + "PGK": [ + "PGK", + "pápua új-guineai kina" + ], + "PHP": [ + "PHP", + "fülöp-szigeteki peso" + ], + "PKR": [ + "PKR", + "pakisztáni rúpia" + ], + "PLN": [ + "PLN", + "lengyel zloty" + ], + "PLZ": [ + "PLZ", + "Lengyel zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugál escudo" + ], + "PYG": [ + "PYG", + "paraguayi guarani" + ], + "QAR": [ + "QAR", + "katari rial" + ], + "RHD": [ + "RHD", + "rhodéziai dollár" + ], + "ROL": [ + "ROL", + "román lej (1952–2006)" + ], + "RON": [ + "RON", + "román lej" + ], + "RSD": [ + "RSD", + "szerb dínár" + ], + "RUB": [ + "RUB", + "orosz rubel" + ], + "RUR": [ + "RUR", + "orosz rubel (1991–1998)" + ], + "RWF": [ + "RWF", + "ruandai frank" + ], + "SAR": [ + "SAR", + "szaúdi riyal" + ], + "SBD": [ + "SBD", + "salamon-szigeteki dollár" + ], + "SCR": [ + "SCR", + "seychelle-szigeteki rúpia" + ], + "SDD": [ + "SDD", + "Szudáni dínár (1992–2007)" + ], + "SDG": [ + "SDG", + "szudáni font" + ], + "SDP": [ + "SDP", + "Szudáni font (1957–1998)" + ], + "SEK": [ + "SEK", + "svéd korona" + ], + "SGD": [ + "SGD", + "szingapúri dollár" + ], + "SHP": [ + "SHP", + "Szent Ilona-i font" + ], + "SIT": [ + "SIT", + "Szlovén tolar" + ], + "SKK": [ + "SKK", + "Szlovák korona" + ], + "SLL": [ + "SLL", + "Sierra Leone-i leone" + ], + "SOS": [ + "SOS", + "szomáli shilling" + ], + "SRD": [ + "SRD", + "suriname-i dollár" + ], + "SRG": [ + "SRG", + "Suriname-i gulden" + ], + "SSP": [ + "SSP", + "dél-szudáni font" + ], + "STD": [ + "STD", + "São Tomé és Príncipe-i dobra" + ], + "SUR": [ + "SUR", + "Szovjet rubel" + ], + "SVC": [ + "SVC", + "Salvadori colón" + ], + "SYP": [ + "SYP", + "szíriai font" + ], + "SZL": [ + "SZL", + "szváziföldi lilangeni" + ], + "THB": [ + "THB", + "thai baht" + ], + "TJR": [ + "TJR", + "Tádzsikisztáni rubel" + ], + "TJS": [ + "TJS", + "tádzsikisztáni somoni" + ], + "TMM": [ + "TMM", + "türkmenisztáni manat (1993–2009)" + ], + "TMT": [ + "TMT", + "türkmenisztáni manat" + ], + "TND": [ + "TND", + "tunéziai dínár" + ], + "TOP": [ + "TOP", + "tongai paanga" + ], + "TPE": [ + "TPE", + "Timori escudo" + ], + "TRL": [ + "TRL", + "török líra (1922–2005)" + ], + "TRY": [ + "TRY", + "török líra" + ], + "TTD": [ + "TTD", + "Trinidad és Tobago-i dollár" + ], + "TWD": [ + "TWD", + "tajvani új dollár" + ], + "TZS": [ + "TZS", + "tanzániai shilling" + ], + "UAH": [ + "UAH", + "ukrán hrivnya" + ], + "UAK": [ + "UAK", + "Ukrán karbovanec" + ], + "UGS": [ + "UGS", + "Ugandai shilling (1966–1987)" + ], + "UGX": [ + "UGX", + "ugandai shilling" + ], + "USD": [ + "USD", + "USA-dollár" + ], + "USN": [ + "USN", + "USA dollár (következÅ‘ napi)" + ], + "USS": [ + "USS", + "USA dollár (aznapi)" + ], + "UYI": [ + "UYI", + "Uruguayi peso en unidades indexadas" + ], + "UYP": [ + "UYP", + "Uruguay-i peso (1975–1993)" + ], + "UYU": [ + "UYU", + "uruguay-i peso" + ], + "UZS": [ + "UZS", + "üzbegisztáni szum" + ], + "VEB": [ + "VEB", + "Venezuelai bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "venezuelai bolivar" + ], + "VND": [ + "VND", + "vietnami dong" + ], + "VUV": [ + "VUV", + "vanuatui vatu" + ], + "WST": [ + "WST", + "nyugat-szamoai tala" + ], + "XAF": [ + "FCFA", + "CFA frank BEAC" + ], + "XCD": [ + "XCD", + "kelet-karibi dollár" + ], + "XEU": [ + "XEU", + "európai pénznemegység" + ], + "XFO": [ + "XFO", + "Francia arany frank" + ], + "XFU": [ + "XFU", + "Francia UIC-frank" + ], + "XOF": [ + "CFA", + "CFA frank BCEAO" + ], + "XPF": [ + "CFPF", + "csendes-óceáni valutaközösségi frank" + ], + "XRE": [ + "XRE", + "RINET tÅ‘ke" + ], + "YDD": [ + "YDD", + "Jemeni dínár" + ], + "YER": [ + "YER", + "jemeni rial" + ], + "YUD": [ + "YUD", + "Jugoszláv kemény dínár" + ], + "YUM": [ + "YUM", + "Jugoszláv új dínár" + ], + "YUN": [ + "YUN", + "Jugoszláv konvertibilis dínár" + ], + "ZAL": [ + "ZAL", + "Dél-afrikai rand (pénzügyi)" + ], + "ZAR": [ + "ZAR", + "dél-afrikai rand" + ], + "ZMK": [ + "ZMK", + "Zambiai kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "zambiai kwacha" + ], + "ZRN": [ + "ZRN", + "Zairei új zaire" + ], + "ZRZ": [ + "ZRZ", + "Zairei zaire" + ], + "ZWD": [ + "ZWD", + "Zimbabwei dollár (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Zimbabwei dollár (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabwei dollár (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hy.json new file mode 100644 index 0000000000000000000000000000000000000000..d3adee83c020eedfb8103082ad155bb063bce4db --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/hy.json @@ -0,0 +1,637 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "Ô±Ö€Õ¡Õ¢Õ¡Õ¯Õ¡Õ¶ Õ„Õ«Õ¡ÖÕµÕ¡Õ¬ Ô·Õ´Õ«Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€Õ« Õ¤Õ«Ö€Õ°Õ¡Õ´" + ], + "AFN": [ + "AFN", + "Ô±Ö†Õ²Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¡Ö†Õ²Õ¡Õ¶Õ«" + ], + "ALL": [ + "ALL", + "Ô±Õ¬Õ¢Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¬Õ¥Õ¯" + ], + "AMD": [ + "Ö", + "Õ€Õ¡ÕµÕ¯Õ¡Õ¯Õ¡Õ¶ Õ¤Ö€Õ¡Õ´" + ], + "ANG": [ + "ANG", + "Õ†Õ«Õ¤Õ¥Õ¼Õ¬Õ¡Õ¶Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¡Õ¶Õ¿Õ«Õ¬ÕµÕ¡Õ¶ Õ£Õ¸Ö‚Õ¬Õ¤Õ¥Õ¶" + ], + "AOA": [ + "AOA", + "Ô±Õ¶Õ£Õ¸Õ¬Õ¡Õ¯Õ¡Õ¶ Õ¯Õ¾Õ¡Õ¶Õ¦Õ¡" + ], + "ARS": [ + "ARS", + "Ô±Ö€Õ£Õ¥Õ¶Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶ ÕºÕ¥Õ½Õ¸" + ], + "AUD": [ + "A$", + "Ô±Õ¾Õ½Õ¿Ö€Õ¡Õ¬Õ«Õ¡Õ¯Õ¡Õ¶ Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "AWG": [ + "AWG", + "Ô±Ö€Õ¸Ö‚Õ¢Õ¡Õ¯Õ¡Õ¶ Ö†Õ¬Õ¸Ö€Õ«Õ¶" + ], + "AZN": [ + "AZN", + "Ô±Õ¤Ö€Õ¢Õ¥Õ»Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Õ´Õ¡Õ¶Õ¡Õ©" + ], + "BAM": [ + "BAM", + "Ô²Õ¸Õ½Õ¶Õ«Õ¡ Ö‡ Õ€Õ¥Ö€ÖÕ¥Õ£Õ¸Õ¾Õ«Õ¶Õ¡ÕµÕ« ÖƒÕ¸Õ­Õ¡Ö€Õ¯Õ¾Õ¸Õ² Õ´Õ¡Ö€Õ¯" + ], + "BBD": [ + "BBD", + "Ô²Õ¡Ö€Õ¢Õ¡Õ¤Õ¸Õ½ÕµÕ¡Õ¶ Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "BDT": [ + "BDT", + "Ô²Õ¡Õ¶Õ£Õ¬Õ¡Õ¤Õ¥Õ·Õ« Õ¿Õ¡Õ¯Õ¡" + ], + "BGN": [ + "BGN", + "Ô²Õ¸Ö‚Õ¬Õ²Õ¡Ö€Õ¡Õ¯Õ¡Õ¶ Õ¬Ö‡" + ], + "BHD": [ + "BHD", + "Ô²Õ¡Õ°Ö€Õ¥ÕµÕ¶Õ« Õ¤Õ«Õ¶Õ¡Ö€" + ], + "BIF": [ + "BIF", + "Ô²Õ¸Ö‚Ö€Õ¸Ö‚Õ¶Õ¤Õ«Õ¡Õ¯Õ¡Õ¶ Ö†Ö€Õ¡Õ¶Õ¯" + ], + "BMD": [ + "BMD", + "Ô²Õ¥Ö€Õ´Õ¸Ö‚Õ¤ÕµÕ¡Õ¶ Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "BND": [ + "BND", + "Ô²Ö€Õ¸Ö‚Õ¶Õ¥ÕµÕ« Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "BOB": [ + "BOB", + "Ô²Õ¸Õ¬Õ«Õ¾Õ«Õ¡Õ¯Õ¡Õ¶ Õ¢Õ¸Õ¬Õ«Õ¾Õ«Õ¡Õ¶Õ¸" + ], + "BRL": [ + "R$", + "Ô²Ö€Õ¡Õ¦Õ«Õ¬Õ¡Õ¯Õ¡Õ¶ Õ¼Õ¥Õ¡Õ¬" + ], + "BSD": [ + "BSD", + "Ô²Õ¡Õ°Õ¡Õ´ÕµÕ¡Õ¶ Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "BTN": [ + "BTN", + "Ô²Õ¸Ö‚Õ©Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¶Õ£Õ¸Ö‚Õ¬Õ¿Ö€Õ¸Ö‚Õ´" + ], + "BWP": [ + "BWP", + "Ô²Õ¸Õ©Õ½Õ¾Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ ÕºÕ¸Ö‚Õ¬Õ¡" + ], + "BYN": [ + "BYN", + "Ô²Õ¥Õ¬Õ¡Õ¼Õ¸Ö‚Õ½Õ¡Õ¯Õ¡Õ¶ Õ¼Õ¸Ö‚Õ¢Õ¬Õ«" + ], + "BYR": [ + "BYR", + "Ô²Õ¥Õ¬Õ¡Õ¼Õ¸Ö‚Õ½Õ¡Õ¯Õ¡Õ¶ Õ¼Õ¸Ö‚Õ¢Õ¬Õ« (2000–2016)" + ], + "BZD": [ + "BZD", + "Ô²Õ¥Õ¬Õ«Õ¦Õ« Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "CAD": [ + "CA$", + "Ô¿Õ¡Õ¶Õ¡Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "CDF": [ + "CDF", + "Ô¿Õ¸Õ¶Õ£Õ¸ÕµÕ« Ö†Ö€Õ¡Õ¶Õ¯" + ], + "CHF": [ + "CHF", + "Õ‡Õ¾Õ¥ÕµÖÕ¡Ö€Õ¡Õ¯Õ¡Õ¶ Ö†Ö€Õ¡Õ¶Õ¯" + ], + "CLP": [ + "CLP", + "Õ‰Õ«Õ¬Õ«Õ¡Õ¯Õ¡Õ¶ ÕºÕ¥Õ½Õ¸" + ], + "CNY": [ + "CNÂ¥", + "Õ‰Õ«Õ¶Õ¡Õ¯Õ¡Õ¶ ÕµÕ¸Ö‚Õ¡Õ¶" + ], + "COP": [ + "COP", + "Ô¿Õ¸Õ¬Õ¸Ö‚Õ´Õ¢Õ«Õ¡Õ¯Õ¡Õ¶ ÕºÕ¥Õ½Õ¸" + ], + "CRC": [ + "CRC", + "Ô¿Õ¸Õ½Õ¿Õ¡ Ռիկայի Õ¯Õ¸Õ¬Õ¸Õ¶" + ], + "CUC": [ + "CUC", + "Ô¿Õ¸Ö‚Õ¢Õ¡ÕµÕ¡Õ¯Õ¡Õ¶ ÖƒÕ¸Õ­Õ¡Ö€Õ¯Õ¾Õ¸Õ² ÕºÕ¥Õ½Õ¸" + ], + "CUP": [ + "CUP", + "Õ¯Õ¸Ö‚Õ¢Õ¡ÕµÕ¡Õ¯Õ¡Õ¶ ÕºÕ¥Õ½Õ¸" + ], + "CVE": [ + "CVE", + "Ô¿Õ¡Õ¢Õ¸ ÕŽÕ¥Ö€Õ¤Õ¥Õ« Õ§Õ½Õ¯Õ¸Ö‚Õ¤Õ¸" + ], + "CZK": [ + "CZK", + "Õ‰Õ¥Õ­Õ¡Õ¯Õ¡Õ¶ Õ¯Ö€Õ¸Õ¶" + ], + "DJF": [ + "DJF", + "Õ‹Õ«Õ¢Õ¸Ö‚Õ©Õ«Õ« Ö†Ö€Õ¡Õ¶Õ¯" + ], + "DKK": [ + "DKK", + "Ô´Õ¡Õ¶Õ«Õ¡Õ¯Õ¡Õ¶ Õ¯Ö€Õ¸Õ¶" + ], + "DOP": [ + "DOP", + "Ô´Õ¸Õ´Õ«Õ¶Õ«Õ¯ÕµÕ¡Õ¶ ÕºÕ¥Õ½Õ¸" + ], + "DZD": [ + "DZD", + "Ô±Õ¬ÕªÕ«Ö€ÕµÕ¡Õ¶ Õ¤Õ«Õ¶Õ¡Ö€" + ], + "EGP": [ + "EGP", + "ÔµÕ£Õ«ÕºÕ¿Õ¡Õ¯Õ¡Õ¶ Ö†Õ¸Ö‚Õ¶Õ¿" + ], + "ERN": [ + "ERN", + "Ô·Ö€Õ«Õ©Ö€Õ¥Õ¡Õ¯Õ¡Õ¶ Õ¶Õ¡Õ¯Ö†Õ¡" + ], + "ETB": [ + "ETB", + "ÔµÕ©Õ¸Õ¾ÕºÕ«Õ¡Õ¯Õ¡Õ¶ Õ¢Õ«Ö€" + ], + "EUR": [ + "€", + "ÔµÕ¾Ö€Õ¸" + ], + "FJD": [ + "FJD", + "Õ–Õ«Õ»Õ«Õ¡Õ¯Õ¡Õ¶ Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "FKP": [ + "FKP", + "Õ–Õ¸Õ¬Ö„Õ¬Õ¥Õ¶Õ¤ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€Õ« Ö†Õ¸Ö‚Õ¶Õ¿" + ], + "GBP": [ + "£", + "Ô²Ö€Õ«Õ¿Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Ö†Õ¸Ö‚Õ¶Õ¿ Õ½Õ¿Õ¥Ö€Õ¬Õ«Õ¶Õ£" + ], + "GEL": [ + "GEL", + "ÕŽÖ€Õ¡ÖÕ¡Õ¯Õ¡Õ¶ Õ¬Õ¡Ö€Õ«" + ], + "GHS": [ + "GHS", + "Ô³Õ¡Õ¶Õ¡ÕµÕ¡Õ¯Õ¡Õ¶ Õ½Õ¥Õ¤Õ«" + ], + "GIP": [ + "GIP", + "Õ‹Õ«Õ¢Ö€Õ¡Õ¬Õ©Õ¡Ö€Õ« Ö†Õ¸Ö‚Õ¶Õ¿" + ], + "GMD": [ + "GMD", + "Ô³Õ¡Õ´Õ¢Õ«Õ¡Õ¯Õ¡Õ¶ Õ¤Õ¡Õ¬Õ¡Õ½Õ«" + ], + "GNF": [ + "GNF", + "Ô³Õ¾Õ«Õ¶Õ¥Õ¡Õ¯Õ¡Õ¶ Ö†Ö€Õ¡Õ¶Õ¯" + ], + "GTQ": [ + "GTQ", + "Ô³Õ¾Õ¡Õ¿Õ¥Õ´Õ¡Õ¬Õ¡Õ¯Õ¡Õ¶ Õ¯Õ¥Õ¿Õ½Õ¡Õ¬" + ], + "GYD": [ + "GYD", + "Ô³Õ¡ÕµÕ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "HKD": [ + "HK$", + "Õ€Õ¸Õ¶Õ¯Õ¸Õ¶Õ£Õ« Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "HNL": [ + "HNL", + "Õ€Õ¸Õ¶Õ¤Õ¸Ö‚Ö€Õ¡Õ½Õ¡Õ¯Õ¡Õ¶ Õ¬Õ¥Õ´ÕºÕ«Ö€Õ¡" + ], + "HRK": [ + "HRK", + "Ô½Õ¸Ö€Õ¾Õ¡Õ©Õ¡Õ¯Õ¡Õ¶ Õ¯Õ¸Ö‚Õ¶Õ¡" + ], + "HTG": [ + "HTG", + "Õ€Õ¡ÕµÕ«Õ©ÕµÕ¡Õ¶ Õ£Õ¸Ö‚Ö€Õ¤" + ], + "HUF": [ + "HUF", + "Õ€Õ¸Ö‚Õ¶Õ£Õ¡Ö€Õ¡Õ¯Õ¡Õ¶ Ö†Õ¸Ö€Õ«Õ¶Õ¿" + ], + "IDR": [ + "IDR", + "Ô»Õ¶Õ¤Õ¸Õ¶Õ¥Õ¦Õ«Õ¡Õ¯Õ¡Õ¶ Õ¼Õ¸Ö‚ÖƒÕ«" + ], + "ILS": [ + "₪", + "Ô»Õ½Ö€Õ¡ÕµÕ¥Õ¬Õ« Õ¶Õ¸Ö€ Õ·Õ¥Õ¯Õ¥Õ¬" + ], + "INR": [ + "₹", + "Õ€Õ¶Õ¤Õ¯Õ¡Õ¯Õ¡Õ¶ Õ¼Õ¸Ö‚ÖƒÕ«" + ], + "IQD": [ + "IQD", + "Ô»Ö€Õ¡Ö„ÕµÕ¡Õ¶ Õ¤Õ«Õ¶Õ¡Ö€" + ], + "IRR": [ + "IRR", + "Ô»Ö€Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¼Õ«Õ¡Õ¬" + ], + "ISK": [ + "ISK", + "Ô»Õ½Õ¬Õ¡Õ¶Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¯Ö€Õ¸Õ¶" + ], + "JMD": [ + "JMD", + "ÕƒÕ¡Õ´Õ¡ÕµÕ¯Õ¡ÕµÕ« Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "JOD": [ + "JOD", + "Õ€Õ¸Ö€Õ¤Õ¡Õ¶Õ¡Õ¶ÕµÕ¡Õ¶ Õ¤Õ«Õ¶Õ¡Ö€" + ], + "JPY": [ + "JPÂ¥", + "ÕƒÕ¡ÕºÕ¸Õ¶Õ¡Õ¯Õ¡Õ¶ Õ«Õ¥Õ¶" + ], + "KES": [ + "KES", + "Õ”Õ¥Õ¶Õ«Õ¡Õ¯Õ¡Õ¶ Õ·Õ«Õ¬Õ«Õ¶Õ£" + ], + "KGS": [ + "KGS", + "Õ‚Ö€Õ²Õ¦Õ¡Õ¯Õ¡Õ¶ Õ½Õ¸Õ´" + ], + "KHR": [ + "KHR", + "Ô¿Õ¡Õ´Õ¢Õ¸Õ»Õ¡Õ¯Õ¡Õ¶ Õ¼Õ«Õ¥Õ¬" + ], + "KMF": [ + "KMF", + "Ô¿Õ¸Õ´Õ¸Ö€ÕµÕ¡Õ¶ Ö†Ö€Õ¡Õ¶Õ¯" + ], + "KPW": [ + "KPW", + "Õ€ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¯Õ¸Ö€Õ¥Õ¡Õ¯Õ¡Õ¶ Õ¾Õ¸Õ¶" + ], + "KRW": [ + "â‚©", + "Õ€Õ¡Ö€Õ¡Õ¾Õ¯Õ¸Ö€Õ¥Õ¡Õ¯Õ¡Õ¶ Õ¾Õ¸Õ¶" + ], + "KWD": [ + "KWD", + "Õ”Õ¸Ö‚Õ¾Õ¥ÕµÕ©Õ« Õ¤Õ«Õ¶Õ¡Ö€" + ], + "KYD": [ + "KYD", + "Ô¿Õ¡ÕµÕ´Õ¡Õ¶ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€Õ« Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "KZT": [ + "KZT", + "Õ‚Õ¡Õ¦Õ¡Õ­Õ¡Õ¯Õ¡Õ¶ Õ¿Õ¥Õ¶Õ£Õ¥" + ], + "LAK": [ + "LAK", + "Ô¼Õ¡Õ¸Õ½Õ¡Õ¯Õ¡Õ¶ Õ¯Õ«Õº" + ], + "LBP": [ + "LBP", + "Ô¼Õ«Õ¢Õ¡Õ¶Õ¡Õ¶ÕµÕ¡Õ¶ Ö†Õ¸Ö‚Õ¶Õ¿" + ], + "LKR": [ + "LKR", + "Õ‡Ö€Õ« Ô¼Õ¡Õ¶Õ¯Õ¡ÕµÕ« Õ¼Õ¸Ö‚ÖƒÕ«" + ], + "LRD": [ + "LRD", + "Ô¼Õ«Õ¢Õ¥Ö€Õ«Õ¡Õ¯Õ¡Õ¶ Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "LTL": [ + "LTL", + "Ô¼Õ«Õ¿Õ¾Õ¡Õ¯Õ¡Õ¶ Õ¬Õ«Õ¿" + ], + "LVL": [ + "LVL", + "Ô¼Õ¡Õ¿Õ¾Õ«Õ¡Õ¯Õ¡Õ¶ Õ¬Õ¡Õ¿" + ], + "LYD": [ + "LYD", + "Ô¼Õ«Õ¢Õ«Õ¡Õ¯Õ¡Õ¶ Õ¤Õ«Õ¶Õ¡Ö€" + ], + "MAD": [ + "MAD", + "Õ„Õ¡Ö€Õ¸Õ¯Õ¯Õ¸ÕµÕ« Õ¤Õ«Ö€Õ°Õ¡Õ´" + ], + "MDL": [ + "MDL", + "Õ„Õ¸Õ¬Õ¤Õ¸Õ¾Õ¡Õ¯Õ¡Õ¶ Õ¬Õ¥Õµ" + ], + "MGA": [ + "MGA", + "Õ„Õ¡Õ¤Õ¡Õ£Õ¡Õ½Õ¯Õ¡Ö€Õ« Õ¡Ö€Õ«Õ¡Ö€Õ«" + ], + "MKD": [ + "MKD", + "Õ„Õ¡Õ¯Õ¥Õ¤Õ¸Õ¶ÕµÕ¡Õ¶ Õ¤Õ¥Õ¶Õ¡Ö€" + ], + "MMK": [ + "MMK", + "Õ„ÕµÕ¡Õ¶Õ´Õ¡ÕµÕ« Õ¯ÕµÕ¡Õ¿" + ], + "MNT": [ + "MNT", + "Õ„Õ¸Õ¶Õ²Õ¸Õ¬Õ¡Õ¯Õ¡Õ¶ Õ¿Õ¸Ö‚Õ£Ö€Õ«Õ¯" + ], + "MOP": [ + "MOP", + "Õ„Õ¡Õ¯Õ¡Õ¸Ö‚Õ« ÕºÕ¡Õ¿Õ¡Õ¯Õ¡" + ], + "MRO": [ + "MRO", + "Õ„Õ¡Õ¾Ö€Õ«Õ¿Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¸Ö‚Õ£Õ«ÕµÕ¡" + ], + "MUR": [ + "MUR", + "Õ„Õ¡Õ¾Ö€Õ«Õ¯ÕµÕ¡Õ¶ Õ¼Õ¸Ö‚ÖƒÕ«" + ], + "MVR": [ + "MVR", + "Õ„Õ¡Õ¬Õ¤Õ«Õ¾ÕµÕ¡Õ¶ Õ¼Õ¸Ö‚Ö†Õ«ÕµÕ¡" + ], + "MWK": [ + "MWK", + "Õ„Õ¡Õ¬Õ¡Õ¾Õ«Õ¡Õ¯Õ¡Õ¶ Õ¯Õ¾Õ¡Õ¹Õ¡" + ], + "MXN": [ + "MX$", + "Õ„Õ¥Ö„Õ½Õ«Õ¯Õ¡Õ¯Õ¡Õ¶ ÕºÕ¥Õ½Õ¸" + ], + "MYR": [ + "MYR", + "Õ„Õ¡Õ¬Õ¡ÕµÕ¦Õ«Õ¡Õ¯Õ¡Õ¶ Õ¼Õ«Õ¶Õ£Õ«Õ¿" + ], + "MZN": [ + "MZN", + "Õ„Õ¸Õ¦Õ¡Õ´Õ¢Õ«Õ¯ÕµÕ¡Õ¶ Õ´Õ¥Õ¿Õ«Õ¯Õ¡Õ¬" + ], + "NAD": [ + "NAD", + "Õ†Õ¡Õ´Õ«Õ¢Õ«Õ¡Õ¯Õ¡Õ¶ Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "NGN": [ + "NGN", + "Õ†Õ«Õ£Õ¥Ö€Õ«Õ¡Õ¯Õ¡Õ¶ Õ¶Õ¡ÕµÖ€Õ¡" + ], + "NIO": [ + "NIO", + "Õ†Õ«Õ¯Õ¡Ö€Õ¡Õ£Õ¸Ö‚Õ¡Õ¯Õ¡Õ¶ Õ¯Õ¸Ö€Õ¤Õ¸Õ¢Õ¡" + ], + "NOK": [ + "NOK", + "Õ†Õ¸Ö€Õ¾Õ¥Õ£Õ¡Õ¯Õ¡Õ¶ Õ¯Ö€Õ¸Õ¶" + ], + "NPR": [ + "NPR", + "Õ†Õ¥ÕºÕ¡Õ¬Õ« Õ¼Õ¸Ö‚ÖƒÕ«" + ], + "NZD": [ + "NZ$", + "Õ†Õ¸Ö€Õ¦Õ¥Õ¬Õ¡Õ¶Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "OMR": [ + "OMR", + "Õ•Õ´Õ¡Õ¶Õ« Õ¼Õ«Õ¡Õ¬" + ], + "PAB": [ + "PAB", + "ÕŠÕ¡Õ¶Õ¡Õ´Õ¡Õ¯Õ¡Õ¶ Õ¢Õ¡Õ¬Õ¢Õ¸Õ¡" + ], + "PEN": [ + "PEN", + "ÕŠÕ¥Ö€Õ¸Ö‚Õ« Õ¶Õ¸Ö€ Õ½Õ¸Õ¬" + ], + "PGK": [ + "PGK", + "ÕŠÕ¡ÕºÕ¸Ö‚Õ¡ Õ†Õ¸Ö€ Ô³Õ¾Õ«Õ¶Õ¥Õ¡ÕµÕ« Õ¯Õ«Õ¶Õ¡" + ], + "PHP": [ + "PHP", + "Õ–Õ«Õ¬Õ«ÕºÕ«Õ¶ÕµÕ¡Õ¶ ÕºÕ¥Õ½Õ¸" + ], + "PKR": [ + "PKR", + "ÕŠÕ¡Õ¯Õ«Õ½Õ¿Õ¡Õ¶ÕµÕ¡Õ¶ Õ¼Õ¸Ö‚ÖƒÕ«" + ], + "PLN": [ + "PLN", + "Ô¼Õ¥Õ°Õ¡Õ¯Õ¡Õ¶ Õ¦Õ¬Õ¸Õ¿Õ«" + ], + "PYG": [ + "PYG", + "ÕŠÕ¡Ö€Õ¡Õ£Õ¾Õ¡ÕµÕ¡Õ¯Õ¡Õ¶ Õ£Õ¸Ö‚Õ¡Ö€Õ¡Õ¶Õ«" + ], + "QAR": [ + "QAR", + "Ô¿Õ¡Õ¿Õ¡Ö€Õ« Õ¼Õ«Õ¡Õ¬" + ], + "RON": [ + "RON", + "Ռումինական Õ¬Õ¥Õµ" + ], + "RSD": [ + "RSD", + "ÕÕ¥Ö€Õ¢Õ¡Õ¯Õ¡Õ¶ Õ¤Õ«Õ¶Õ¡Ö€" + ], + "RUB": [ + "RUB", + "Ռուսական Õ¼Õ¸Ö‚Õ¢Õ¬Õ«" + ], + "RWF": [ + "RWF", + "Ռուանդական Ö†Ö€Õ¡Õ¶Õ¯" + ], + "SAR": [ + "SAR", + "ÕÕ¡Õ¸Ö‚Õ¤ÕµÕ¡Õ¶ Ô±Ö€Õ¡Õ¢Õ«Õ¡ÕµÕ« Õ¼Õ«Õ¡Õ¬" + ], + "SBD": [ + "SBD", + "ÕÕ¸Õ²Õ¸Õ´Õ¸Õ¶Õ« Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€Õ« Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "SCR": [ + "SCR", + "ÕÕ¥ÕµÕ·Õ¥Õ¬ÕµÕ¡Õ¶ Õ¼Õ¸Ö‚ÖƒÕ«" + ], + "SDG": [ + "SDG", + "ÕÕ¸Ö‚Õ¤Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Ö†Õ¸Ö‚Õ¶Õ¿" + ], + "SEK": [ + "SEK", + "Õ‡Õ¾Õ¥Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¯Ö€Õ¸Õ¶" + ], + "SGD": [ + "SGD", + "ÕÕ«Õ¶Õ£Õ¡ÕºÕ¸Ö‚Ö€Õ« Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "SHP": [ + "SHP", + "ÕÕ¸Ö‚Ö€Õ¢ Õ€Õ¥Õ²Õ«Õ¶Õ¥Õ« Ö†Õ¸Ö‚Õ¶Õ¿" + ], + "SLL": [ + "SLL", + "ÕÕ«Õ¥Õ¼Õ¡ Ô¼Õ¥Õ¸Õ¶Õ¥Õ« Õ¬Õ¥Õ¸Õ¶Õ¥" + ], + "SOS": [ + "SOS", + "ÕÕ¸Õ´Õ¡Õ¬Õ«Õ¡Õ¯Õ¡Õ¶ Õ·Õ«Õ¬Õ«Õ¶Õ£" + ], + "SRD": [ + "SRD", + "ÕÕ¸Ö‚Ö€Õ«Õ¶Õ¡Õ´Õ« Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "SSP": [ + "SSP", + "Õ€Õ¡Ö€Õ¡Õ¾Õ½Õ¸Ö‚Õ¤Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Ö†Õ¸Ö‚Õ¶Õ¿" + ], + "STD": [ + "STD", + "ÕÕ¡Õ¶ ÕÕ¸Õ´Õ¥ Ö‡ Õ“Ö€Õ«Õ¶Õ½Õ«ÕºÕ«Õ« Õ¤Õ¸Õ¢Ö€Õ¡" + ], + "SYP": [ + "SYP", + "ÕÕ«Ö€Õ«Õ¡Õ¯Õ¡Õ¶ Ö†Õ¸Ö‚Õ¶Õ¿" + ], + "SZL": [ + "SZL", + "ÕÕ¾Õ¡Õ¦Õ«Õ¬Õ¥Õ¶Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¬Õ«Õ¬Õ¡Õ¶Õ£Õ¥Õ¶Õ«" + ], + "THB": [ + "฿", + "Ô¹Õ¡ÕµÕ¬Õ¡Õ¶Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¢Õ¡Õ¿" + ], + "TJS": [ + "TJS", + "ÕÕ¡Õ»Õ«Õ¯Õ¡Õ¯Õ¡Õ¶ Õ½Õ¸Õ´Õ¸Õ¶Õ«" + ], + "TMT": [ + "TMT", + "Ô¹Õ¸Ö‚Ö€Ö„Õ´Õ¥Õ¶Õ¡Õ¯Õ¡Õ¶ Õ´Õ¡Õ¶Õ¡Õ©" + ], + "TND": [ + "TND", + "Ô¹Õ¸Ö‚Õ¶Õ«Õ½ÕµÕ¡Õ¶ Õ¤Õ«Õ¶Õ¡Ö€" + ], + "TOP": [ + "TOP", + "ÕÕ¸Õ¶Õ£Õ¡ÕµÕ« ÕºÕ¡Õ¡Õ¶Õ£Õ¡" + ], + "TRY": [ + "TRY", + "Ô¹Õ¸Ö‚Ö€Ö„Õ¡Õ¯Õ¡Õ¶ Õ¬Õ«Ö€Õ¡" + ], + "TTD": [ + "TTD", + "ÕÖ€Õ«Õ¶Õ«Õ¤Õ¡Õ¤ Ö‡ ÕÕ¸Õ¢Õ¡Õ£Õ¸ÕµÕ« Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "TWD": [ + "NT$", + "Ô¹Õ¡ÕµÕ¾Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¶Õ¸Ö€ Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "TZS": [ + "TZS", + "ÕÕ¡Õ¶Õ¦Õ¡Õ¶Õ«Õ¡Õ¯Õ¡Õ¶ Õ·Õ«Õ¬Õ«Õ¶Õ£" + ], + "UAH": [ + "UAH", + "ÕˆÖ‚Õ¯Ö€Õ¡Õ«Õ¶Õ¡Õ¯Õ¡Õ¶ Õ£Ö€Õ«Õ¾Õ¶Õ¡" + ], + "UGX": [ + "UGX", + "ÕˆÖ‚Õ£Õ¡Õ¶Õ¤Õ¡Õ¯Õ¡Õ¶ Õ·Õ«Õ¬Õ«Õ¶Õ£" + ], + "USD": [ + "$", + "Ô±Õ„Õ† Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "UYU": [ + "UYU", + "ÕˆÖ‚Ö€Õ¸Ö‚Õ£Õ¾Õ¡ÕµÕ¡Õ¯Õ¡Õ¶ ÕºÕ¥Õ½Õ¸" + ], + "UZS": [ + "UZS", + "ÕˆÖ‚Õ¦Õ¢Õ¥Õ¯Õ¡Õ¯Õ¡Õ¶ Õ½Õ¸Õ´" + ], + "VEF": [ + "VEF", + "ÕŽÕ¥Õ¶Õ¥Õ½Õ¸Ö‚Õ¥Õ¬Õ¡Õ¯Õ¡Õ¶ Õ¢Õ¸Õ¬Õ«Õ¾Õ¡Ö€" + ], + "VND": [ + "â‚«", + "ÕŽÕ«Õ¥Õ¿Õ¶Õ¡Õ´Õ¡Õ¯Õ¡Õ¶ Õ¤Õ¸Õ¶Õ£" + ], + "VUV": [ + "VUV", + "ÕŽÕ¡Õ¶Õ¸Ö‚Õ¡Õ¿Õ¸Ö‚Õ« Õ¾Õ¡Õ¿Õ¸Ö‚" + ], + "WST": [ + "WST", + "ÕÕ¡Õ´Õ¸Õ¡Õ¯Õ¡Õ¶ Õ¿Õ¡Õ¬Õ¡" + ], + "XAF": [ + "FCFA", + "Ô¿Õ¥Õ¶Õ¿Ö€Õ¸Õ¶Õ¡Õ¯Õ¡Õ¶ Ô±Ö†Ö€Õ«Õ¯Õ¡ÕµÕ« Ô¿Õ–Ô± Ö†Ö€Õ¡Õ¶Õ¯" + ], + "XCD": [ + "EC$", + "Ô±Ö€Ö‡Õ¥Õ¬Õ¡Õ¯Õ¡Ö€Õ«Õ¢ÕµÕ¡Õ¶ Õ¤Õ¸Õ¬Õ¡Ö€" + ], + "XOF": [ + "CFA", + "Ô±Ö€Ö‡Õ´Õ¿ÕµÕ¡Õ¶ Ô±Ö†Ö€Õ«Õ¯Õ¡ÕµÕ« Ô¿Õ–Ô± Ö†Ö€Õ¡Õ¶Õ¯" + ], + "XPF": [ + "CFPF", + "Ô¿ÕŠÕ– Ö†Ö€Õ¡Õ¶Õ¯" + ], + "YER": [ + "YER", + "ÔµÕ´Õ¥Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¼Õ«Õ¡Õ¬" + ], + "ZAR": [ + "ZAR", + "Õ€Õ¡Ö€Õ¡Õ¾Õ¡Ö†Ö€Õ«Õ¯ÕµÕ¡Õ¶ Õ¼Õ¡Õ¶Õ¤" + ], + "ZMK": [ + "ZMK", + "Ô¶Õ¡Õ´Õ¢Õ«Õ¡Õ¯Õ¡Õ¶ Õ¯Õ¾Õ¡Õ¹Õ¡ (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Ô¶Õ¡Õ´Õ¢Õ«Õ¡Õ¯Õ¡Õ¶ Õ¯Õ¾Õ¡Õ¹Õ¡" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/id.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/id.json new file mode 100644 index 0000000000000000000000000000000000000000..ff47301b346c216c29e3a59477ab81adf2d36faf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/id.json @@ -0,0 +1,1137 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Peseta Andorra" + ], + "AED": [ + "AED", + "Dirham Uni Emirat Arab" + ], + "AFA": [ + "AFA", + "Afgani Afganistan (1927–2002)" + ], + "AFN": [ + "AFN", + "Afgani Afganistan" + ], + "ALL": [ + "ALL", + "Lek Albania" + ], + "AMD": [ + "AMD", + "Dram Armenia" + ], + "ANG": [ + "ANG", + "Guilder Antilla Belanda" + ], + "AOA": [ + "AOA", + "Kwanza Angola" + ], + "AOK": [ + "AOK", + "Kwanza Angola (1977–1991)" + ], + "AON": [ + "AON", + "Kwanza Baru Angola (1990–2000)" + ], + "AOR": [ + "AOR", + "Kwanza Angola yang Disesuaikan Lagi (1995–1999)" + ], + "ARA": [ + "ARA", + "Austral Argentina" + ], + "ARL": [ + "ARL", + "Peso Ley Argentina (1970–1983)" + ], + "ARM": [ + "ARM", + "Peso Argentina (1881–1970)" + ], + "ARP": [ + "ARP", + "Peso Argentina (1983–1985)" + ], + "ARS": [ + "ARS", + "Peso Argentina" + ], + "ATS": [ + "ATS", + "Schilling Austria" + ], + "AUD": [ + "AU$", + "Dolar Australia" + ], + "AWG": [ + "AWG", + "Florin Aruba" + ], + "AZM": [ + "AZM", + "Manat Azerbaijan (1993–2006)" + ], + "AZN": [ + "AZN", + "Manat Azerbaijan" + ], + "BAD": [ + "BAD", + "Dinar Bosnia-Herzegovina (1992–1994)" + ], + "BAM": [ + "BAM", + "Mark Konvertibel Bosnia-Herzegovina" + ], + "BAN": [ + "BAN", + "Dinar Baru Bosnia-Herzegovina (1994–1997)" + ], + "BBD": [ + "BBD", + "Dolar Barbados" + ], + "BDT": [ + "BDT", + "Taka Bangladesh" + ], + "BEC": [ + "BEC", + "Franc Belgia (konvertibel)" + ], + "BEF": [ + "BEF", + "Franc Belgia" + ], + "BEL": [ + "BEL", + "Franc Belgia (keuangan)" + ], + "BGL": [ + "BGL", + "Hard Lev Bulgaria" + ], + "BGM": [ + "BGM", + "Socialist Lev Bulgaria" + ], + "BGN": [ + "BGN", + "Lev Bulgaria" + ], + "BGO": [ + "BGO", + "Lev Bulgaria (1879–1952)" + ], + "BHD": [ + "BHD", + "Dinar Bahrain" + ], + "BIF": [ + "BIF", + "Franc Burundi" + ], + "BMD": [ + "BMD", + "Dolar Bermuda" + ], + "BND": [ + "BND", + "Dolar Brunei" + ], + "BOB": [ + "BOB", + "Boliviano" + ], + "BOL": [ + "BOL", + "Boliviano Bolivia (1863–1963)" + ], + "BOP": [ + "BOP", + "Peso Bolivia" + ], + "BOV": [ + "BOV", + "Mvdol Bolivia" + ], + "BRB": [ + "BRB", + "Cruzeiro Baru Brasil (1967–1986)" + ], + "BRC": [ + "BRC", + "Cruzado Brasil (1986–1989)" + ], + "BRE": [ + "BRE", + "Cruzeiro Brasil (1990–1993)" + ], + "BRL": [ + "R$", + "Real Brasil" + ], + "BRN": [ + "BRN", + "Cruzado Baru Brasil (1989–1990)" + ], + "BRR": [ + "BRR", + "Cruzeiro Brasil (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Cruzeiro Brasil (1942–1967)" + ], + "BSD": [ + "BSD", + "Dolar Bahama" + ], + "BTN": [ + "BTN", + "Ngultrum Bhutan" + ], + "BUK": [ + "BUK", + "Kyat Burma" + ], + "BWP": [ + "BWP", + "Pula Botswana" + ], + "BYB": [ + "BYB", + "Rubel Baru Belarus (1994–1999)" + ], + "BYN": [ + "BYN", + "Rubel Belarusia" + ], + "BYR": [ + "BYR", + "Rubel Belarusia (2000–2016)" + ], + "BZD": [ + "BZD", + "Dolar Belize" + ], + "CAD": [ + "CA$", + "Dolar Kanada" + ], + "CDF": [ + "CDF", + "Franc Kongo" + ], + "CHE": [ + "CHE", + "Euro WIR" + ], + "CHF": [ + "CHF", + "Franc Swiss" + ], + "CHW": [ + "CHW", + "Franc WIR" + ], + "CLE": [ + "CLE", + "Escudo Cile" + ], + "CLF": [ + "CLF", + "Satuan Hitung (UF) Cile" + ], + "CLP": [ + "CLP", + "Peso Cile" + ], + "CNY": [ + "CNÂ¥", + "Yuan Tiongkok" + ], + "COP": [ + "COP", + "Peso Kolombia" + ], + "COU": [ + "COU", + "Unit Nilai Nyata Kolombia" + ], + "CRC": [ + "CRC", + "Colon Kosta Rika" + ], + "CSD": [ + "CSD", + "Dinar Serbia (2002–2006)" + ], + "CSK": [ + "CSK", + "Hard Koruna Cheska" + ], + "CUC": [ + "CUC", + "Peso Konvertibel Kuba" + ], + "CUP": [ + "CUP", + "Peso Kuba" + ], + "CVE": [ + "CVE", + "Escudo Tanjung Verde" + ], + "CYP": [ + "CYP", + "Pound Siprus" + ], + "CZK": [ + "CZK", + "Koruna Cheska" + ], + "DDM": [ + "DDM", + "Mark Jerman Timur" + ], + "DEM": [ + "DEM", + "Mark Jerman" + ], + "DJF": [ + "DJF", + "Franc Jibuti" + ], + "DKK": [ + "DKK", + "Krone Denmark" + ], + "DOP": [ + "DOP", + "Peso Dominika" + ], + "DZD": [ + "DZD", + "Dinar Algeria" + ], + "ECS": [ + "ECS", + "Sucre Ekuador" + ], + "ECV": [ + "ECV", + "Satuan Nilai Tetap Ekuador" + ], + "EEK": [ + "EEK", + "Kroon Estonia" + ], + "EGP": [ + "EGP", + "Pound Mesir" + ], + "ERN": [ + "ERN", + "Nakfa Eritrea" + ], + "ESA": [ + "ESA", + "Peseta Spanyol (akun)" + ], + "ESB": [ + "ESB", + "Peseta Spanyol (konvertibel)" + ], + "ESP": [ + "ESP", + "Peseta Spanyol" + ], + "ETB": [ + "ETB", + "Birr Etiopia" + ], + "EUR": [ + "€", + "Euro" + ], + "FIM": [ + "FIM", + "Markka Finlandia" + ], + "FJD": [ + "FJD", + "Dolar Fiji" + ], + "FKP": [ + "FKP", + "Pound Kepulauan Falkland" + ], + "FRF": [ + "FRF", + "Franc Prancis" + ], + "GBP": [ + "£", + "Pound Inggris" + ], + "GEK": [ + "GEK", + "Kupon Larit Georgia" + ], + "GEL": [ + "GEL", + "Lari Georgia" + ], + "GHC": [ + "GHC", + "Cedi Ghana (1979–2007)" + ], + "GHS": [ + "GHS", + "Cedi Ghana" + ], + "GIP": [ + "GIP", + "Pound Gibraltar" + ], + "GMD": [ + "GMD", + "Dalasi Gambia" + ], + "GNF": [ + "GNF", + "Franc Guinea" + ], + "GNS": [ + "GNS", + "Syli Guinea" + ], + "GQE": [ + "GQE", + "Ekuele Guinea Ekuatorial" + ], + "GRD": [ + "GRD", + "Drachma Yunani" + ], + "GTQ": [ + "GTQ", + "Quetzal Guatemala" + ], + "GWE": [ + "GWE", + "Escudo Guinea Portugal" + ], + "GWP": [ + "GWP", + "Peso Guinea-Bissau" + ], + "GYD": [ + "GYD", + "Dolar Guyana" + ], + "HKD": [ + "HK$", + "Dolar Hong Kong" + ], + "HNL": [ + "HNL", + "Lempira Honduras" + ], + "HRD": [ + "HRD", + "Dinar Kroasia" + ], + "HRK": [ + "HRK", + "Kuna Kroasia" + ], + "HTG": [ + "HTG", + "Gourde Haiti" + ], + "HUF": [ + "HUF", + "Forint Hungaria" + ], + "IDR": [ + "Rp", + "Rupiah Indonesia" + ], + "IEP": [ + "IEP", + "Pound Irlandia" + ], + "ILP": [ + "ILP", + "Pound Israel" + ], + "ILR": [ + "ILR", + "Shekel Israel" + ], + "ILS": [ + "₪", + "Shekel Baru Israel" + ], + "INR": [ + "Rs", + "Rupee India" + ], + "IQD": [ + "IQD", + "Dinar Irak" + ], + "IRR": [ + "IRR", + "Rial Iran" + ], + "ISJ": [ + "ISJ", + "Krona Islandia (1918–1981)" + ], + "ISK": [ + "ISK", + "Krona Islandia" + ], + "ITL": [ + "ITL", + "Lira Italia" + ], + "JMD": [ + "JMD", + "Dolar Jamaika" + ], + "JOD": [ + "JOD", + "Dinar Yordania" + ], + "JPY": [ + "JPÂ¥", + "Yen Jepang" + ], + "KES": [ + "KES", + "Shilling Kenya" + ], + "KGS": [ + "KGS", + "Som Kirgistan" + ], + "KHR": [ + "KHR", + "Riel Kamboja" + ], + "KMF": [ + "KMF", + "Franc Komoro" + ], + "KPW": [ + "KPW", + "Won Korea Utara" + ], + "KRH": [ + "KRH", + "Hwan Korea Selatan (1953–1962)" + ], + "KRO": [ + "KRO", + "Won Korea Selatan (1945–1953)" + ], + "KRW": [ + "â‚©", + "Won Korea Selatan" + ], + "KWD": [ + "KWD", + "Dinar Kuwait" + ], + "KYD": [ + "KYD", + "Dolar Kepulauan Cayman" + ], + "KZT": [ + "KZT", + "Tenge Kazakstan" + ], + "LAK": [ + "LAK", + "Kip Laos" + ], + "LBP": [ + "LBP", + "Pound Lebanon" + ], + "LKR": [ + "LKR", + "Rupee Sri Lanka" + ], + "LRD": [ + "LRD", + "Dolar Liberia" + ], + "LSL": [ + "LSL", + "Loti Lesotho" + ], + "LTL": [ + "LTL", + "Litas Lituania" + ], + "LTT": [ + "LTT", + "Talonas Lituania" + ], + "LUC": [ + "LUC", + "Franc Konvertibel Luksemburg" + ], + "LUF": [ + "LUF", + "Franc Luksemburg" + ], + "LUL": [ + "LUL", + "Financial Franc Luksemburg" + ], + "LVL": [ + "LVL", + "Lats Latvia" + ], + "LVR": [ + "LVR", + "Rubel Latvia" + ], + "LYD": [ + "LYD", + "Dinar Libya" + ], + "MAD": [ + "MAD", + "Dirham Maroko" + ], + "MAF": [ + "MAF", + "Franc Maroko" + ], + "MCF": [ + "MCF", + "Franc Monegasque" + ], + "MDC": [ + "MDC", + "Cupon Moldova" + ], + "MDL": [ + "MDL", + "Leu Moldova" + ], + "MGA": [ + "MGA", + "Ariary Madagaskar" + ], + "MGF": [ + "MGF", + "Franc Malagasi" + ], + "MKD": [ + "MKD", + "Denar Makedonia" + ], + "MKN": [ + "MKN", + "Denar Makedonia (1992–1993)" + ], + "MLF": [ + "MLF", + "Franc Mali" + ], + "MMK": [ + "MMK", + "Kyat Myanmar" + ], + "MNT": [ + "MNT", + "Tugrik Mongolia" + ], + "MOP": [ + "MOP", + "Pataca Makau" + ], + "MRO": [ + "MRO", + "Ouguiya Mauritania" + ], + "MTL": [ + "MTL", + "Lira Malta" + ], + "MTP": [ + "MTP", + "Pound Malta" + ], + "MUR": [ + "MUR", + "Rupee Mauritius" + ], + "MVP": [ + "MVP", + "Rufiyaa Maladewa (1947–1981)" + ], + "MVR": [ + "MVR", + "Rufiyaa Maladewa" + ], + "MWK": [ + "MWK", + "Kwacha Malawi" + ], + "MXN": [ + "MX$", + "Peso Meksiko" + ], + "MXP": [ + "MXP", + "Peso Silver Meksiko (1861–1992)" + ], + "MXV": [ + "MXV", + "Unit Investasi Meksiko" + ], + "MYR": [ + "MYR", + "Ringgit Malaysia" + ], + "MZE": [ + "MZE", + "Escudo Mozambik" + ], + "MZM": [ + "MZM", + "Metical Mozambik (1980–2006)" + ], + "MZN": [ + "MZN", + "Metical Mozambik" + ], + "NAD": [ + "NAD", + "Dolar Namibia" + ], + "NGN": [ + "NGN", + "Naira Nigeria" + ], + "NIC": [ + "NIC", + "Cordoba Nikaragua (1988–1991)" + ], + "NIO": [ + "NIO", + "Cordoba Nikaragua" + ], + "NLG": [ + "NLG", + "Guilder Belanda" + ], + "NOK": [ + "NOK", + "Krone Norwegia" + ], + "NPR": [ + "NPR", + "Rupee Nepal" + ], + "NZD": [ + "NZ$", + "Dolar Selandia Baru" + ], + "OMR": [ + "OMR", + "Rial Oman" + ], + "PAB": [ + "PAB", + "Balboa Panama" + ], + "PEI": [ + "PEI", + "Inti Peru" + ], + "PEN": [ + "PEN", + "Nuevo Sol Peru" + ], + "PES": [ + "PES", + "Sol Peru (1863–1965)" + ], + "PGK": [ + "PGK", + "Kina Papua Nugini" + ], + "PHP": [ + "PHP", + "Peso Filipina" + ], + "PKR": [ + "PKR", + "Rupee Pakistan" + ], + "PLN": [ + "PLN", + "Polandia Zloty" + ], + "PLZ": [ + "PLZ", + "Zloty Polandia (1950–1995)" + ], + "PTE": [ + "PTE", + "Escudo Portugal" + ], + "PYG": [ + "PYG", + "Guarani Paraguay" + ], + "QAR": [ + "QAR", + "Rial Qatar" + ], + "RHD": [ + "RHD", + "Dolar Rhodesia" + ], + "ROL": [ + "ROL", + "Leu Rumania (1952–2006)" + ], + "RON": [ + "RON", + "Leu Rumania" + ], + "RSD": [ + "RSD", + "Dinar Serbia" + ], + "RUB": [ + "RUB", + "Rubel Rusia" + ], + "RUR": [ + "RUR", + "Rubel Rusia (1991–1998)" + ], + "RWF": [ + "RWF", + "Franc Rwanda" + ], + "SAR": [ + "SAR", + "Riyal Arab Saudi" + ], + "SBD": [ + "SBD", + "Dolar Kepulauan Solomon" + ], + "SCR": [ + "SCR", + "Rupee Seychelles" + ], + "SDD": [ + "SDD", + "Dinar Sudan (1992–2007)" + ], + "SDG": [ + "SDG", + "Pound Sudan" + ], + "SDP": [ + "SDP", + "Pound Sudan (1957–1998)" + ], + "SEK": [ + "SEK", + "Krona Swedia" + ], + "SGD": [ + "SGD", + "Dolar Singapura" + ], + "SHP": [ + "SHP", + "Pound Saint Helena" + ], + "SIT": [ + "SIT", + "Tolar Slovenia" + ], + "SKK": [ + "SKK", + "Koruna Slovakia" + ], + "SLL": [ + "SLL", + "Leone Sierra Leone" + ], + "SOS": [ + "SOS", + "Shilling Somalia" + ], + "SRD": [ + "SRD", + "Dolar Suriname" + ], + "SRG": [ + "SRG", + "Guilder Suriname" + ], + "SSP": [ + "SSP", + "Pound Sudan Selatan" + ], + "STD": [ + "STD", + "Dobra Sao Tome dan Principe" + ], + "SUR": [ + "SUR", + "Rubel Soviet" + ], + "SVC": [ + "SVC", + "Colon El Savador" + ], + "SYP": [ + "SYP", + "Pound Suriah" + ], + "SZL": [ + "SZL", + "Lilangeni Swaziland" + ], + "THB": [ + "฿", + "Baht Thailand" + ], + "TJR": [ + "TJR", + "Rubel Tajikistan" + ], + "TJS": [ + "TJS", + "Somoni Tajikistan" + ], + "TMM": [ + "TMM", + "Manat Turkmenistan (1993–2009)" + ], + "TMT": [ + "TMT", + "Manat Turkimenistan" + ], + "TND": [ + "TND", + "Dinar Tunisia" + ], + "TOP": [ + "TOP", + "PaÊ»anga Tonga" + ], + "TPE": [ + "TPE", + "Escudo Timor" + ], + "TRL": [ + "TRL", + "Lira Turki (1922–2005)" + ], + "TRY": [ + "TRY", + "Lira Turki" + ], + "TTD": [ + "TTD", + "Dolar Trinidad dan Tobago" + ], + "TWD": [ + "NT$", + "Dolar Baru Taiwan" + ], + "TZS": [ + "TZS", + "Shilling Tanzania" + ], + "UAH": [ + "UAH", + "Hryvnia Ukraina" + ], + "UAK": [ + "UAK", + "Karbovanet Ukraina" + ], + "UGS": [ + "UGS", + "Shilling Uganda (1966–1987)" + ], + "UGX": [ + "UGX", + "Shilling Uganda" + ], + "USD": [ + "US$", + "Dolar Amerika Serikat" + ], + "USN": [ + "USN", + "Dolar AS (Hari berikutnya)" + ], + "USS": [ + "USS", + "Dolar AS (Hari yang sama)" + ], + "UYI": [ + "UYI", + "Peso Uruguay (Unit Diindeks)" + ], + "UYP": [ + "UYP", + "Peso Uruguay (1975–1993)" + ], + "UYU": [ + "UYU", + "Peso Uruguay" + ], + "UZS": [ + "UZS", + "Som Uzbekistan" + ], + "VEB": [ + "VEB", + "Bolivar Venezuela (1871–2008)" + ], + "VEF": [ + "VEF", + "Bolivar Venezuela" + ], + "VND": [ + "â‚«", + "Dong Vietnam" + ], + "VNN": [ + "VNN", + "Dong Vietnam (1978–1985)" + ], + "VUV": [ + "VUV", + "Vatu Vanuatu" + ], + "WST": [ + "WST", + "Tala Samoa" + ], + "XAF": [ + "FCFA", + "Franc CFA BEAC" + ], + "XCD": [ + "EC$", + "Dolar Karibia Timur" + ], + "XEU": [ + "XEU", + "Satuan Mata Uang Eropa" + ], + "XFO": [ + "XFO", + "Franc Gold Perancis" + ], + "XFU": [ + "XFU", + "Franc UIC Perancis" + ], + "XOF": [ + "CFA", + "Franc CFA BCEAO" + ], + "XPF": [ + "CFPF", + "Franc CFP" + ], + "XRE": [ + "XRE", + "Dana RINET" + ], + "YDD": [ + "YDD", + "Dinar Yaman" + ], + "YER": [ + "YER", + "Rial Yaman" + ], + "YUD": [ + "YUD", + "Hard Dinar Yugoslavia (1966–1990)" + ], + "YUM": [ + "YUM", + "Dinar Baru Yugoslavia (1994–2002)" + ], + "YUN": [ + "YUN", + "Dinar Konvertibel Yugoslavia (1990–1992)" + ], + "YUR": [ + "YUR", + "Dinar Reformasi Yugoslavia (1992–1993)" + ], + "ZAL": [ + "ZAL", + "Rand Afrika Selatan (Keuangan)" + ], + "ZAR": [ + "ZAR", + "Rand Afrika Selatan" + ], + "ZMK": [ + "ZMK", + "Kwacha Zambia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha Zambia" + ], + "ZRN": [ + "ZRN", + "Zaire Baru Zaire (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zaire Zaire (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Dolar Zimbabwe (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Dolar Zimbabwe (2009)" + ], + "ZWR": [ + "ZWR", + "Dolar Zimbabwe (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ig.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ig.json new file mode 100644 index 0000000000000000000000000000000000000000..39575432be3ea342964548196d8cab422dfa92c8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ig.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.84", + "Names": { + "CVE": [ + "CVE", + "Escudo Caboverdiano" + ], + "NGN": [ + "₦", + "Naịra" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ii.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ii.json new file mode 100644 index 0000000000000000000000000000000000000000..af456c3fc41e5b64cd07a3d15a99c656090b8c53 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ii.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "CNY": [ + "Â¥", + "CNY" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/in.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/in.json new file mode 100644 index 0000000000000000000000000000000000000000..ff47301b346c216c29e3a59477ab81adf2d36faf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/in.json @@ -0,0 +1,1137 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Peseta Andorra" + ], + "AED": [ + "AED", + "Dirham Uni Emirat Arab" + ], + "AFA": [ + "AFA", + "Afgani Afganistan (1927–2002)" + ], + "AFN": [ + "AFN", + "Afgani Afganistan" + ], + "ALL": [ + "ALL", + "Lek Albania" + ], + "AMD": [ + "AMD", + "Dram Armenia" + ], + "ANG": [ + "ANG", + "Guilder Antilla Belanda" + ], + "AOA": [ + "AOA", + "Kwanza Angola" + ], + "AOK": [ + "AOK", + "Kwanza Angola (1977–1991)" + ], + "AON": [ + "AON", + "Kwanza Baru Angola (1990–2000)" + ], + "AOR": [ + "AOR", + "Kwanza Angola yang Disesuaikan Lagi (1995–1999)" + ], + "ARA": [ + "ARA", + "Austral Argentina" + ], + "ARL": [ + "ARL", + "Peso Ley Argentina (1970–1983)" + ], + "ARM": [ + "ARM", + "Peso Argentina (1881–1970)" + ], + "ARP": [ + "ARP", + "Peso Argentina (1983–1985)" + ], + "ARS": [ + "ARS", + "Peso Argentina" + ], + "ATS": [ + "ATS", + "Schilling Austria" + ], + "AUD": [ + "AU$", + "Dolar Australia" + ], + "AWG": [ + "AWG", + "Florin Aruba" + ], + "AZM": [ + "AZM", + "Manat Azerbaijan (1993–2006)" + ], + "AZN": [ + "AZN", + "Manat Azerbaijan" + ], + "BAD": [ + "BAD", + "Dinar Bosnia-Herzegovina (1992–1994)" + ], + "BAM": [ + "BAM", + "Mark Konvertibel Bosnia-Herzegovina" + ], + "BAN": [ + "BAN", + "Dinar Baru Bosnia-Herzegovina (1994–1997)" + ], + "BBD": [ + "BBD", + "Dolar Barbados" + ], + "BDT": [ + "BDT", + "Taka Bangladesh" + ], + "BEC": [ + "BEC", + "Franc Belgia (konvertibel)" + ], + "BEF": [ + "BEF", + "Franc Belgia" + ], + "BEL": [ + "BEL", + "Franc Belgia (keuangan)" + ], + "BGL": [ + "BGL", + "Hard Lev Bulgaria" + ], + "BGM": [ + "BGM", + "Socialist Lev Bulgaria" + ], + "BGN": [ + "BGN", + "Lev Bulgaria" + ], + "BGO": [ + "BGO", + "Lev Bulgaria (1879–1952)" + ], + "BHD": [ + "BHD", + "Dinar Bahrain" + ], + "BIF": [ + "BIF", + "Franc Burundi" + ], + "BMD": [ + "BMD", + "Dolar Bermuda" + ], + "BND": [ + "BND", + "Dolar Brunei" + ], + "BOB": [ + "BOB", + "Boliviano" + ], + "BOL": [ + "BOL", + "Boliviano Bolivia (1863–1963)" + ], + "BOP": [ + "BOP", + "Peso Bolivia" + ], + "BOV": [ + "BOV", + "Mvdol Bolivia" + ], + "BRB": [ + "BRB", + "Cruzeiro Baru Brasil (1967–1986)" + ], + "BRC": [ + "BRC", + "Cruzado Brasil (1986–1989)" + ], + "BRE": [ + "BRE", + "Cruzeiro Brasil (1990–1993)" + ], + "BRL": [ + "R$", + "Real Brasil" + ], + "BRN": [ + "BRN", + "Cruzado Baru Brasil (1989–1990)" + ], + "BRR": [ + "BRR", + "Cruzeiro Brasil (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Cruzeiro Brasil (1942–1967)" + ], + "BSD": [ + "BSD", + "Dolar Bahama" + ], + "BTN": [ + "BTN", + "Ngultrum Bhutan" + ], + "BUK": [ + "BUK", + "Kyat Burma" + ], + "BWP": [ + "BWP", + "Pula Botswana" + ], + "BYB": [ + "BYB", + "Rubel Baru Belarus (1994–1999)" + ], + "BYN": [ + "BYN", + "Rubel Belarusia" + ], + "BYR": [ + "BYR", + "Rubel Belarusia (2000–2016)" + ], + "BZD": [ + "BZD", + "Dolar Belize" + ], + "CAD": [ + "CA$", + "Dolar Kanada" + ], + "CDF": [ + "CDF", + "Franc Kongo" + ], + "CHE": [ + "CHE", + "Euro WIR" + ], + "CHF": [ + "CHF", + "Franc Swiss" + ], + "CHW": [ + "CHW", + "Franc WIR" + ], + "CLE": [ + "CLE", + "Escudo Cile" + ], + "CLF": [ + "CLF", + "Satuan Hitung (UF) Cile" + ], + "CLP": [ + "CLP", + "Peso Cile" + ], + "CNY": [ + "CNÂ¥", + "Yuan Tiongkok" + ], + "COP": [ + "COP", + "Peso Kolombia" + ], + "COU": [ + "COU", + "Unit Nilai Nyata Kolombia" + ], + "CRC": [ + "CRC", + "Colon Kosta Rika" + ], + "CSD": [ + "CSD", + "Dinar Serbia (2002–2006)" + ], + "CSK": [ + "CSK", + "Hard Koruna Cheska" + ], + "CUC": [ + "CUC", + "Peso Konvertibel Kuba" + ], + "CUP": [ + "CUP", + "Peso Kuba" + ], + "CVE": [ + "CVE", + "Escudo Tanjung Verde" + ], + "CYP": [ + "CYP", + "Pound Siprus" + ], + "CZK": [ + "CZK", + "Koruna Cheska" + ], + "DDM": [ + "DDM", + "Mark Jerman Timur" + ], + "DEM": [ + "DEM", + "Mark Jerman" + ], + "DJF": [ + "DJF", + "Franc Jibuti" + ], + "DKK": [ + "DKK", + "Krone Denmark" + ], + "DOP": [ + "DOP", + "Peso Dominika" + ], + "DZD": [ + "DZD", + "Dinar Algeria" + ], + "ECS": [ + "ECS", + "Sucre Ekuador" + ], + "ECV": [ + "ECV", + "Satuan Nilai Tetap Ekuador" + ], + "EEK": [ + "EEK", + "Kroon Estonia" + ], + "EGP": [ + "EGP", + "Pound Mesir" + ], + "ERN": [ + "ERN", + "Nakfa Eritrea" + ], + "ESA": [ + "ESA", + "Peseta Spanyol (akun)" + ], + "ESB": [ + "ESB", + "Peseta Spanyol (konvertibel)" + ], + "ESP": [ + "ESP", + "Peseta Spanyol" + ], + "ETB": [ + "ETB", + "Birr Etiopia" + ], + "EUR": [ + "€", + "Euro" + ], + "FIM": [ + "FIM", + "Markka Finlandia" + ], + "FJD": [ + "FJD", + "Dolar Fiji" + ], + "FKP": [ + "FKP", + "Pound Kepulauan Falkland" + ], + "FRF": [ + "FRF", + "Franc Prancis" + ], + "GBP": [ + "£", + "Pound Inggris" + ], + "GEK": [ + "GEK", + "Kupon Larit Georgia" + ], + "GEL": [ + "GEL", + "Lari Georgia" + ], + "GHC": [ + "GHC", + "Cedi Ghana (1979–2007)" + ], + "GHS": [ + "GHS", + "Cedi Ghana" + ], + "GIP": [ + "GIP", + "Pound Gibraltar" + ], + "GMD": [ + "GMD", + "Dalasi Gambia" + ], + "GNF": [ + "GNF", + "Franc Guinea" + ], + "GNS": [ + "GNS", + "Syli Guinea" + ], + "GQE": [ + "GQE", + "Ekuele Guinea Ekuatorial" + ], + "GRD": [ + "GRD", + "Drachma Yunani" + ], + "GTQ": [ + "GTQ", + "Quetzal Guatemala" + ], + "GWE": [ + "GWE", + "Escudo Guinea Portugal" + ], + "GWP": [ + "GWP", + "Peso Guinea-Bissau" + ], + "GYD": [ + "GYD", + "Dolar Guyana" + ], + "HKD": [ + "HK$", + "Dolar Hong Kong" + ], + "HNL": [ + "HNL", + "Lempira Honduras" + ], + "HRD": [ + "HRD", + "Dinar Kroasia" + ], + "HRK": [ + "HRK", + "Kuna Kroasia" + ], + "HTG": [ + "HTG", + "Gourde Haiti" + ], + "HUF": [ + "HUF", + "Forint Hungaria" + ], + "IDR": [ + "Rp", + "Rupiah Indonesia" + ], + "IEP": [ + "IEP", + "Pound Irlandia" + ], + "ILP": [ + "ILP", + "Pound Israel" + ], + "ILR": [ + "ILR", + "Shekel Israel" + ], + "ILS": [ + "₪", + "Shekel Baru Israel" + ], + "INR": [ + "Rs", + "Rupee India" + ], + "IQD": [ + "IQD", + "Dinar Irak" + ], + "IRR": [ + "IRR", + "Rial Iran" + ], + "ISJ": [ + "ISJ", + "Krona Islandia (1918–1981)" + ], + "ISK": [ + "ISK", + "Krona Islandia" + ], + "ITL": [ + "ITL", + "Lira Italia" + ], + "JMD": [ + "JMD", + "Dolar Jamaika" + ], + "JOD": [ + "JOD", + "Dinar Yordania" + ], + "JPY": [ + "JPÂ¥", + "Yen Jepang" + ], + "KES": [ + "KES", + "Shilling Kenya" + ], + "KGS": [ + "KGS", + "Som Kirgistan" + ], + "KHR": [ + "KHR", + "Riel Kamboja" + ], + "KMF": [ + "KMF", + "Franc Komoro" + ], + "KPW": [ + "KPW", + "Won Korea Utara" + ], + "KRH": [ + "KRH", + "Hwan Korea Selatan (1953–1962)" + ], + "KRO": [ + "KRO", + "Won Korea Selatan (1945–1953)" + ], + "KRW": [ + "â‚©", + "Won Korea Selatan" + ], + "KWD": [ + "KWD", + "Dinar Kuwait" + ], + "KYD": [ + "KYD", + "Dolar Kepulauan Cayman" + ], + "KZT": [ + "KZT", + "Tenge Kazakstan" + ], + "LAK": [ + "LAK", + "Kip Laos" + ], + "LBP": [ + "LBP", + "Pound Lebanon" + ], + "LKR": [ + "LKR", + "Rupee Sri Lanka" + ], + "LRD": [ + "LRD", + "Dolar Liberia" + ], + "LSL": [ + "LSL", + "Loti Lesotho" + ], + "LTL": [ + "LTL", + "Litas Lituania" + ], + "LTT": [ + "LTT", + "Talonas Lituania" + ], + "LUC": [ + "LUC", + "Franc Konvertibel Luksemburg" + ], + "LUF": [ + "LUF", + "Franc Luksemburg" + ], + "LUL": [ + "LUL", + "Financial Franc Luksemburg" + ], + "LVL": [ + "LVL", + "Lats Latvia" + ], + "LVR": [ + "LVR", + "Rubel Latvia" + ], + "LYD": [ + "LYD", + "Dinar Libya" + ], + "MAD": [ + "MAD", + "Dirham Maroko" + ], + "MAF": [ + "MAF", + "Franc Maroko" + ], + "MCF": [ + "MCF", + "Franc Monegasque" + ], + "MDC": [ + "MDC", + "Cupon Moldova" + ], + "MDL": [ + "MDL", + "Leu Moldova" + ], + "MGA": [ + "MGA", + "Ariary Madagaskar" + ], + "MGF": [ + "MGF", + "Franc Malagasi" + ], + "MKD": [ + "MKD", + "Denar Makedonia" + ], + "MKN": [ + "MKN", + "Denar Makedonia (1992–1993)" + ], + "MLF": [ + "MLF", + "Franc Mali" + ], + "MMK": [ + "MMK", + "Kyat Myanmar" + ], + "MNT": [ + "MNT", + "Tugrik Mongolia" + ], + "MOP": [ + "MOP", + "Pataca Makau" + ], + "MRO": [ + "MRO", + "Ouguiya Mauritania" + ], + "MTL": [ + "MTL", + "Lira Malta" + ], + "MTP": [ + "MTP", + "Pound Malta" + ], + "MUR": [ + "MUR", + "Rupee Mauritius" + ], + "MVP": [ + "MVP", + "Rufiyaa Maladewa (1947–1981)" + ], + "MVR": [ + "MVR", + "Rufiyaa Maladewa" + ], + "MWK": [ + "MWK", + "Kwacha Malawi" + ], + "MXN": [ + "MX$", + "Peso Meksiko" + ], + "MXP": [ + "MXP", + "Peso Silver Meksiko (1861–1992)" + ], + "MXV": [ + "MXV", + "Unit Investasi Meksiko" + ], + "MYR": [ + "MYR", + "Ringgit Malaysia" + ], + "MZE": [ + "MZE", + "Escudo Mozambik" + ], + "MZM": [ + "MZM", + "Metical Mozambik (1980–2006)" + ], + "MZN": [ + "MZN", + "Metical Mozambik" + ], + "NAD": [ + "NAD", + "Dolar Namibia" + ], + "NGN": [ + "NGN", + "Naira Nigeria" + ], + "NIC": [ + "NIC", + "Cordoba Nikaragua (1988–1991)" + ], + "NIO": [ + "NIO", + "Cordoba Nikaragua" + ], + "NLG": [ + "NLG", + "Guilder Belanda" + ], + "NOK": [ + "NOK", + "Krone Norwegia" + ], + "NPR": [ + "NPR", + "Rupee Nepal" + ], + "NZD": [ + "NZ$", + "Dolar Selandia Baru" + ], + "OMR": [ + "OMR", + "Rial Oman" + ], + "PAB": [ + "PAB", + "Balboa Panama" + ], + "PEI": [ + "PEI", + "Inti Peru" + ], + "PEN": [ + "PEN", + "Nuevo Sol Peru" + ], + "PES": [ + "PES", + "Sol Peru (1863–1965)" + ], + "PGK": [ + "PGK", + "Kina Papua Nugini" + ], + "PHP": [ + "PHP", + "Peso Filipina" + ], + "PKR": [ + "PKR", + "Rupee Pakistan" + ], + "PLN": [ + "PLN", + "Polandia Zloty" + ], + "PLZ": [ + "PLZ", + "Zloty Polandia (1950–1995)" + ], + "PTE": [ + "PTE", + "Escudo Portugal" + ], + "PYG": [ + "PYG", + "Guarani Paraguay" + ], + "QAR": [ + "QAR", + "Rial Qatar" + ], + "RHD": [ + "RHD", + "Dolar Rhodesia" + ], + "ROL": [ + "ROL", + "Leu Rumania (1952–2006)" + ], + "RON": [ + "RON", + "Leu Rumania" + ], + "RSD": [ + "RSD", + "Dinar Serbia" + ], + "RUB": [ + "RUB", + "Rubel Rusia" + ], + "RUR": [ + "RUR", + "Rubel Rusia (1991–1998)" + ], + "RWF": [ + "RWF", + "Franc Rwanda" + ], + "SAR": [ + "SAR", + "Riyal Arab Saudi" + ], + "SBD": [ + "SBD", + "Dolar Kepulauan Solomon" + ], + "SCR": [ + "SCR", + "Rupee Seychelles" + ], + "SDD": [ + "SDD", + "Dinar Sudan (1992–2007)" + ], + "SDG": [ + "SDG", + "Pound Sudan" + ], + "SDP": [ + "SDP", + "Pound Sudan (1957–1998)" + ], + "SEK": [ + "SEK", + "Krona Swedia" + ], + "SGD": [ + "SGD", + "Dolar Singapura" + ], + "SHP": [ + "SHP", + "Pound Saint Helena" + ], + "SIT": [ + "SIT", + "Tolar Slovenia" + ], + "SKK": [ + "SKK", + "Koruna Slovakia" + ], + "SLL": [ + "SLL", + "Leone Sierra Leone" + ], + "SOS": [ + "SOS", + "Shilling Somalia" + ], + "SRD": [ + "SRD", + "Dolar Suriname" + ], + "SRG": [ + "SRG", + "Guilder Suriname" + ], + "SSP": [ + "SSP", + "Pound Sudan Selatan" + ], + "STD": [ + "STD", + "Dobra Sao Tome dan Principe" + ], + "SUR": [ + "SUR", + "Rubel Soviet" + ], + "SVC": [ + "SVC", + "Colon El Savador" + ], + "SYP": [ + "SYP", + "Pound Suriah" + ], + "SZL": [ + "SZL", + "Lilangeni Swaziland" + ], + "THB": [ + "฿", + "Baht Thailand" + ], + "TJR": [ + "TJR", + "Rubel Tajikistan" + ], + "TJS": [ + "TJS", + "Somoni Tajikistan" + ], + "TMM": [ + "TMM", + "Manat Turkmenistan (1993–2009)" + ], + "TMT": [ + "TMT", + "Manat Turkimenistan" + ], + "TND": [ + "TND", + "Dinar Tunisia" + ], + "TOP": [ + "TOP", + "PaÊ»anga Tonga" + ], + "TPE": [ + "TPE", + "Escudo Timor" + ], + "TRL": [ + "TRL", + "Lira Turki (1922–2005)" + ], + "TRY": [ + "TRY", + "Lira Turki" + ], + "TTD": [ + "TTD", + "Dolar Trinidad dan Tobago" + ], + "TWD": [ + "NT$", + "Dolar Baru Taiwan" + ], + "TZS": [ + "TZS", + "Shilling Tanzania" + ], + "UAH": [ + "UAH", + "Hryvnia Ukraina" + ], + "UAK": [ + "UAK", + "Karbovanet Ukraina" + ], + "UGS": [ + "UGS", + "Shilling Uganda (1966–1987)" + ], + "UGX": [ + "UGX", + "Shilling Uganda" + ], + "USD": [ + "US$", + "Dolar Amerika Serikat" + ], + "USN": [ + "USN", + "Dolar AS (Hari berikutnya)" + ], + "USS": [ + "USS", + "Dolar AS (Hari yang sama)" + ], + "UYI": [ + "UYI", + "Peso Uruguay (Unit Diindeks)" + ], + "UYP": [ + "UYP", + "Peso Uruguay (1975–1993)" + ], + "UYU": [ + "UYU", + "Peso Uruguay" + ], + "UZS": [ + "UZS", + "Som Uzbekistan" + ], + "VEB": [ + "VEB", + "Bolivar Venezuela (1871–2008)" + ], + "VEF": [ + "VEF", + "Bolivar Venezuela" + ], + "VND": [ + "â‚«", + "Dong Vietnam" + ], + "VNN": [ + "VNN", + "Dong Vietnam (1978–1985)" + ], + "VUV": [ + "VUV", + "Vatu Vanuatu" + ], + "WST": [ + "WST", + "Tala Samoa" + ], + "XAF": [ + "FCFA", + "Franc CFA BEAC" + ], + "XCD": [ + "EC$", + "Dolar Karibia Timur" + ], + "XEU": [ + "XEU", + "Satuan Mata Uang Eropa" + ], + "XFO": [ + "XFO", + "Franc Gold Perancis" + ], + "XFU": [ + "XFU", + "Franc UIC Perancis" + ], + "XOF": [ + "CFA", + "Franc CFA BCEAO" + ], + "XPF": [ + "CFPF", + "Franc CFP" + ], + "XRE": [ + "XRE", + "Dana RINET" + ], + "YDD": [ + "YDD", + "Dinar Yaman" + ], + "YER": [ + "YER", + "Rial Yaman" + ], + "YUD": [ + "YUD", + "Hard Dinar Yugoslavia (1966–1990)" + ], + "YUM": [ + "YUM", + "Dinar Baru Yugoslavia (1994–2002)" + ], + "YUN": [ + "YUN", + "Dinar Konvertibel Yugoslavia (1990–1992)" + ], + "YUR": [ + "YUR", + "Dinar Reformasi Yugoslavia (1992–1993)" + ], + "ZAL": [ + "ZAL", + "Rand Afrika Selatan (Keuangan)" + ], + "ZAR": [ + "ZAR", + "Rand Afrika Selatan" + ], + "ZMK": [ + "ZMK", + "Kwacha Zambia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha Zambia" + ], + "ZRN": [ + "ZRN", + "Zaire Baru Zaire (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zaire Zaire (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Dolar Zimbabwe (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Dolar Zimbabwe (2009)" + ], + "ZWR": [ + "ZWR", + "Dolar Zimbabwe (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/is.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/is.json new file mode 100644 index 0000000000000000000000000000000000000000..bd89c39e519ee1262b627026af37ed292df967ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/is.json @@ -0,0 +1,885 @@ +{ + "Version": "2.1.29.65", + "Names": { + "ADP": [ + "ADP", + "Andorrskur peseti" + ], + "AED": [ + "AED", + "arabískt dírham" + ], + "AFN": [ + "AFN", + "afgani" + ], + "ALL": [ + "ALL", + "albanskt lek" + ], + "AMD": [ + "AMD", + "armenskt dramm" + ], + "ANG": [ + "ANG", + "hollenskt Antillugyllini" + ], + "AOA": [ + "AOA", + "angólsk kvansa" + ], + "ARA": [ + "ARA", + "Argentine Austral" + ], + "ARP": [ + "ARP", + "Argentískur pesi (1983–1985)" + ], + "ARS": [ + "ARS", + "argentínskur pesi" + ], + "ATS": [ + "ATS", + "Austurrískur skildingur" + ], + "AUD": [ + "AUD", + "ástralskur dalur" + ], + "AWG": [ + "AWG", + "arúbönsk flórína" + ], + "AZN": [ + "AZN", + "aserskt manat" + ], + "BAM": [ + "BAM", + "skiptanlegt Bosníu og Hersegóvínu-mark" + ], + "BBD": [ + "BBD", + "barbadoskur dalur" + ], + "BDT": [ + "BDT", + "bangladessk taka" + ], + "BEF": [ + "BEF", + "Belgískur franki" + ], + "BGL": [ + "BGL", + "Lef" + ], + "BGN": [ + "BGN", + "búlgarskt lef" + ], + "BHD": [ + "BHD", + "bareinskur denari" + ], + "BIF": [ + "BIF", + "búrúndískur franki" + ], + "BMD": [ + "BMD", + "Bermúdadalur" + ], + "BND": [ + "BND", + "brúneiskur dalur" + ], + "BOB": [ + "BOB", + "bólivíani" + ], + "BOP": [ + "BOP", + "Bólivískur pesi" + ], + "BOV": [ + "BOV", + "Bolivian Mvdol" + ], + "BRL": [ + "BRL", + "brasilískt ríal" + ], + "BSD": [ + "BSD", + "Bahamadalur" + ], + "BTN": [ + "BTN", + "bútanskt núltrum" + ], + "BUK": [ + "BUK", + "Búrmverskt kjat" + ], + "BWP": [ + "BWP", + "botsvönsk púla" + ], + "BYN": [ + "BYN", + "hvítrússnesk rúbla" + ], + "BYR": [ + "BYR", + "hvítrússnesk rúbla (2000–2016)" + ], + "BZD": [ + "BZD", + "belískur dalur" + ], + "CAD": [ + "CAD", + "Kanadadalur" + ], + "CDF": [ + "CDF", + "kongóskur franki" + ], + "CHF": [ + "CHF", + "svissneskur franki" + ], + "CLF": [ + "CLF", + "Chilean Unidades de Fomento" + ], + "CLP": [ + "CLP", + "síleskur pesi" + ], + "CNY": [ + "CNÂ¥", + "kínverskt júan" + ], + "COP": [ + "COP", + "kólumbískur pesi" + ], + "CRC": [ + "CRC", + "kostarískt kólon" + ], + "CSK": [ + "CSK", + "Tékknesk króna, eldri" + ], + "CUC": [ + "CUC", + "kúbverskur skiptanlegur pesi" + ], + "CUP": [ + "CUP", + "kúbverskur pesi" + ], + "CVE": [ + "CVE", + "grænhöfðeyskur skúti" + ], + "CYP": [ + "CYP", + "Kýpverskt pund" + ], + "CZK": [ + "CZK", + "tékknesk króna" + ], + "DDM": [ + "DDM", + "Austurþýskt mark" + ], + "DEM": [ + "DEM", + "Þýskt mark" + ], + "DJF": [ + "DJF", + "djíbútískur franki" + ], + "DKK": [ + "DKK", + "dönsk króna" + ], + "DOP": [ + "DOP", + "dóminískur pesi" + ], + "DZD": [ + "DZD", + "alsírskur denari" + ], + "ECS": [ + "ECS", + "Ecuador Sucre" + ], + "EEK": [ + "EEK", + "Eistnesk króna" + ], + "EGP": [ + "EGP", + "egypskt pund" + ], + "ERN": [ + "ERN", + "erítresk nakfa" + ], + "ESP": [ + "ESP", + "Spænskur peseti" + ], + "ETB": [ + "ETB", + "eþíópískt birr" + ], + "EUR": [ + "EUR", + "evra" + ], + "FIM": [ + "FIM", + "Finnskt mark" + ], + "FJD": [ + "FJD", + "fidjeyskur dalur" + ], + "FKP": [ + "FKP", + "falklenskt pund" + ], + "FRF": [ + "FRF", + "Franskur franki" + ], + "GBP": [ + "GBP", + "sterlingspund" + ], + "GEL": [ + "GEL", + "georgískur lari" + ], + "GHS": [ + "GHS", + "ganverskur sedi" + ], + "GIP": [ + "GIP", + "Gíbraltarspund" + ], + "GMD": [ + "GMD", + "gambískur dalasi" + ], + "GNF": [ + "GNF", + "Gíneufranki" + ], + "GRD": [ + "GRD", + "Drakma" + ], + "GTQ": [ + "GTQ", + "gvatemalskt kvesal" + ], + "GWE": [ + "GWE", + "Portúgalskur, gíneskur skúti" + ], + "GYD": [ + "GYD", + "gvæjanskur dalur" + ], + "HKD": [ + "HK$", + "Hong Kong-dalur" + ], + "HNL": [ + "HNL", + "hondúrsk lempíra" + ], + "HRK": [ + "HRK", + "króatísk kúna" + ], + "HTG": [ + "HTG", + "haítískur gúrdi" + ], + "HUF": [ + "HUF", + "ungversk fórinta" + ], + "IDR": [ + "IDR", + "indónesísk rúpía" + ], + "IEP": [ + "IEP", + "Ãrskt pund" + ], + "ILP": [ + "ILP", + "Ãsraelskt pund" + ], + "ILS": [ + "₪", + "nýr ísraelskur sikill" + ], + "INR": [ + "INR", + "indversk rúpía" + ], + "IQD": [ + "IQD", + "írakskur denari" + ], + "IRR": [ + "IRR", + "íranskt ríal" + ], + "ISK": [ + "ISK", + "íslensk króna" + ], + "ITL": [ + "ITL", + "Ãtölsk líra" + ], + "JMD": [ + "JMD", + "jamaískur dalur" + ], + "JOD": [ + "JOD", + "jórdanskur denari" + ], + "JPY": [ + "JPÂ¥", + "japanskt jen" + ], + "KES": [ + "KES", + "kenískur skildingur" + ], + "KGS": [ + "KGS", + "kirgiskt som" + ], + "KHR": [ + "KHR", + "kambódískt ríal" + ], + "KMF": [ + "KMF", + "kómoreyskur franki" + ], + "KPW": [ + "KPW", + "norðurkóreskt vonn" + ], + "KRW": [ + "KRW", + "suðurkóreskt vonn" + ], + "KWD": [ + "KWD", + "kúveiskur denari" + ], + "KYD": [ + "KYD", + "caymaneyskur dalur" + ], + "KZT": [ + "KZT", + "kasakst tengi" + ], + "LAK": [ + "LAK", + "laoskt kip" + ], + "LBP": [ + "LBP", + "líbanskt pund" + ], + "LKR": [ + "LKR", + "srílönsk rúpía" + ], + "LRD": [ + "LRD", + "líberískur dalur" + ], + "LSL": [ + "LSL", + "Lesotho Loti" + ], + "LTL": [ + "LTL", + "Litháískt lít" + ], + "LTT": [ + "LTT", + "Lithuanian Talonas" + ], + "LUF": [ + "LUF", + "Lúxemborgarfranki" + ], + "LVL": [ + "LVL", + "Lettneskt lat" + ], + "LVR": [ + "LVR", + "Lettnesk rúbla" + ], + "LYD": [ + "LYD", + "líbískur denari" + ], + "MAD": [ + "MAD", + "marokkóskt dírham" + ], + "MAF": [ + "MAF", + "Marokkóskur franki" + ], + "MDL": [ + "MDL", + "moldavískt lei" + ], + "MGA": [ + "MGA", + "Madagaskararjari" + ], + "MGF": [ + "MGF", + "Madagaskur franki" + ], + "MKD": [ + "MKD", + "makedónskur denari" + ], + "MLF": [ + "MLF", + "Malískur franki" + ], + "MMK": [ + "MMK", + "mjanmarskt kjat" + ], + "MNT": [ + "MNT", + "mongólskur túríkur" + ], + "MOP": [ + "MOP", + "makaósk pataka" + ], + "MRO": [ + "MRO", + "márítönsk úgía" + ], + "MTL": [ + "MTL", + "Meltnesk líra" + ], + "MTP": [ + "MTP", + "Maltneskt pund" + ], + "MUR": [ + "MUR", + "máritísk rúpía" + ], + "MVR": [ + "MVR", + "maldíveysk rúpía" + ], + "MWK": [ + "MWK", + "malavísk kvaka" + ], + "MXN": [ + "MXN", + "mexíkóskur pesi" + ], + "MXP": [ + "MXP", + "Mexíkóskur silfurpesi (1861–1992)" + ], + "MXV": [ + "MXV", + "Mexíkóskur pesi, UDI" + ], + "MYR": [ + "MYR", + "malasískt ringit" + ], + "MZE": [ + "MZE", + "Mósambískur skúti" + ], + "MZN": [ + "MZN", + "mósambískt metikal" + ], + "NAD": [ + "NAD", + "namibískur dalur" + ], + "NGN": [ + "NGN", + "nígerísk næra" + ], + "NIO": [ + "NIO", + "níkaraögsk kordóva" + ], + "NLG": [ + "NLG", + "Hollenskt gyllini" + ], + "NOK": [ + "NOK", + "norsk króna" + ], + "NPR": [ + "NPR", + "nepölsk rúpía" + ], + "NZD": [ + "NZD", + "nýsjálenskur dalur" + ], + "OMR": [ + "OMR", + "ómanskt ríal" + ], + "PAB": [ + "PAB", + "balbói" + ], + "PEN": [ + "PEN", + "perúskt sól" + ], + "PGK": [ + "PGK", + "papúsk kína" + ], + "PHP": [ + "PHP", + "filippseyskur pesi" + ], + "PKR": [ + "PKR", + "pakistönsk rúpía" + ], + "PLN": [ + "PLN", + "pólskt slot" + ], + "PLZ": [ + "PLZ", + "Slot" + ], + "PTE": [ + "PTE", + "Portúgalskur skúti" + ], + "PYG": [ + "PYG", + "paragvæskt gvaraní" + ], + "QAR": [ + "QAR", + "katarskt ríal" + ], + "ROL": [ + "ROL", + "Rúmenskt lei (1952–2006)" + ], + "RON": [ + "RON", + "rúmenskt lei" + ], + "RSD": [ + "RSD", + "serbneskur denari" + ], + "RUB": [ + "RUB", + "rússnesk rúbla" + ], + "RUR": [ + "RUR", + "Rússnesk rúbla (1991–1998)" + ], + "RWF": [ + "RWF", + "rúandskur franki" + ], + "SAR": [ + "SAR", + "sádíarabískt ríal" + ], + "SBD": [ + "SBD", + "salómonseyskur dalur" + ], + "SCR": [ + "SCR", + "Seychellesrúpía" + ], + "SDD": [ + "SDD", + "Súdanskur denari" + ], + "SDG": [ + "SDG", + "súdanskt pund" + ], + "SDP": [ + "SDP", + "Súdanskt pund (1957–1998)" + ], + "SEK": [ + "SEK", + "sænsk króna" + ], + "SGD": [ + "SGD", + "singapúrskur dalur" + ], + "SHP": [ + "SHP", + "helenskt pund" + ], + "SIT": [ + "SIT", + "Slóvenskur dalur" + ], + "SKK": [ + "SKK", + "Slóvakísk króna" + ], + "SLL": [ + "SLL", + "síerraleónsk ljóna" + ], + "SOS": [ + "SOS", + "sómalískur skildingur" + ], + "SRD": [ + "SRD", + "Súrínamdalur" + ], + "SRG": [ + "SRG", + "Suriname Guilder" + ], + "SSP": [ + "SSP", + "suðursúdanskt pund" + ], + "STD": [ + "STD", + "Saó Tóme og Prinsípe-dóbra" + ], + "SUR": [ + "SUR", + "Soviet Rouble" + ], + "SVC": [ + "SVC", + "El Salvador Colon" + ], + "SYP": [ + "SYP", + "sýrlenskt pund" + ], + "SZL": [ + "SZL", + "svasílenskur lílangeni" + ], + "THB": [ + "THB", + "taílenskt bat" + ], + "TJR": [ + "TJR", + "Tadsjiksk rúbla" + ], + "TJS": [ + "TJS", + "tadsjikskur sómóni" + ], + "TMM": [ + "TMM", + "Túrkmenskt manat (1993–2009)" + ], + "TMT": [ + "TMT", + "túrkmenskt manat" + ], + "TND": [ + "TND", + "túnískur denari" + ], + "TOP": [ + "TOP", + "Tongapanga" + ], + "TPE": [ + "TPE", + "Tímorskur skúti" + ], + "TRL": [ + "TRL", + "Tyrknesk líra (1922–2005)" + ], + "TRY": [ + "TRY", + "tyrknesk líra" + ], + "TTD": [ + "TTD", + "Trínidad og Tóbagó-dalur" + ], + "TWD": [ + "TWD", + "taívanskur dalur" + ], + "TZS": [ + "TZS", + "tansanískur skildingur" + ], + "UAH": [ + "UAH", + "úkraínsk hrinja" + ], + "UAK": [ + "UAK", + "Ukrainian Karbovanetz" + ], + "UGX": [ + "UGX", + "úgandskur skildingur" + ], + "USD": [ + "USD", + "Bandaríkjadalur" + ], + "USN": [ + "USN", + "Bandaríkjadalur (næsta dag)" + ], + "USS": [ + "USS", + "Bandaríkjadalur (sama dag)" + ], + "UYU": [ + "UYU", + "úrúgvæskur pesi" + ], + "UZS": [ + "UZS", + "úsbekskt súm" + ], + "VEB": [ + "VEB", + "Bolívar í Venesúela (1871–2008)" + ], + "VEF": [ + "VEF", + "venesúelskur bólívari" + ], + "VND": [ + "VND", + "víetnamskt dong" + ], + "VUV": [ + "VUV", + "vanúatúskt vatú" + ], + "WST": [ + "WST", + "Samóatala" + ], + "XAF": [ + "FCFA", + "miðafrískur franki" + ], + "XCD": [ + "EC$", + "austurkarabískur dalur" + ], + "XFO": [ + "XFO", + "Franskur gullfranki" + ], + "XFU": [ + "XFU", + "Franskur franki, UIC" + ], + "XOF": [ + "CFA", + "vesturafrískur franki" + ], + "XPF": [ + "CFPF", + "pólinesískur franki" + ], + "YDD": [ + "YDD", + "Jemenskur denari" + ], + "YER": [ + "YER", + "jemenskt ríal" + ], + "YUM": [ + "YUM", + "Júgóslavneskur denari" + ], + "ZAL": [ + "ZAL", + "Rand (viðskipta)" + ], + "ZAR": [ + "ZAR", + "suðurafrískt rand" + ], + "ZMK": [ + "ZMK", + "Zambian Kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "sambísk kvaka" + ], + "ZWD": [ + "ZWD", + "Simbabveskur dalur" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/it.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/it.json new file mode 100644 index 0000000000000000000000000000000000000000..a5fda55f9e3230ac6d2628bdf72a2cd472fb2c01 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/it.json @@ -0,0 +1,1038 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "peseta andorrana" + ], + "AED": [ + "AED", + "dirham degli Emirati Arabi Uniti" + ], + "AFA": [ + "AFA", + "afgani (1927–2002)" + ], + "AFN": [ + "AFN", + "afghani" + ], + "ALL": [ + "ALL", + "lek albanese" + ], + "AMD": [ + "AMD", + "dram armeno" + ], + "ANG": [ + "ANG", + "fiorino delle Antille olandesi" + ], + "AOA": [ + "AOA", + "kwanza angolano" + ], + "AOK": [ + "AOK", + "kwanza angolano (1977–1990)" + ], + "AON": [ + "AON", + "nuovo kwanza angolano (1990–2000)" + ], + "AOR": [ + "AOR", + "kwanza reajustado angolano (1995–1999)" + ], + "ARA": [ + "ARA", + "austral argentino" + ], + "ARP": [ + "ARP", + "peso argentino (vecchio Cod.)" + ], + "ARS": [ + "ARS", + "peso argentino" + ], + "ATS": [ + "ATS", + "scellino austriaco" + ], + "AUD": [ + "A$", + "dollaro australiano" + ], + "AWG": [ + "AWG", + "fiorino di Aruba" + ], + "AZM": [ + "AZM", + "manat azero (1993–2006)" + ], + "AZN": [ + "AZN", + "manat azero" + ], + "BAD": [ + "BAD", + "dinar Bosnia-Herzegovina" + ], + "BAM": [ + "BAM", + "marco convertibile della Bosnia-Herzegovina" + ], + "BBD": [ + "BBD", + "dollaro di Barbados" + ], + "BDT": [ + "BDT", + "taka bangladese" + ], + "BEC": [ + "BEC", + "franco belga (convertibile)" + ], + "BEF": [ + "BEF", + "franco belga" + ], + "BEL": [ + "BEL", + "franco belga (finanziario)" + ], + "BGL": [ + "BGL", + "lev bulgaro (1962–1999)" + ], + "BGN": [ + "BGN", + "lev bulgaro" + ], + "BHD": [ + "BHD", + "dinaro del Bahrein" + ], + "BIF": [ + "BIF", + "franco del Burundi" + ], + "BMD": [ + "BMD", + "dollaro delle Bermuda" + ], + "BND": [ + "BND", + "dollaro del Brunei" + ], + "BOB": [ + "BOB", + "boliviano" + ], + "BOP": [ + "BOP", + "peso boliviano" + ], + "BOV": [ + "BOV", + "mvdol boliviano" + ], + "BRB": [ + "BRB", + "cruzeiro novo brasiliano (1967–1986)" + ], + "BRC": [ + "BRC", + "cruzado brasiliano" + ], + "BRE": [ + "BRE", + "cruzeiro brasiliano (1990–1993)" + ], + "BRL": [ + "BRL", + "real brasiliano" + ], + "BRN": [ + "BRN", + "cruzado novo brasiliano" + ], + "BRR": [ + "BRR", + "cruzeiro brasiliano" + ], + "BSD": [ + "BSD", + "dollaro delle Bahamas" + ], + "BTN": [ + "BTN", + "ngultrum bhutanese" + ], + "BUK": [ + "BUK", + "kyat birmano" + ], + "BWP": [ + "BWP", + "pula del Botswana" + ], + "BYB": [ + "BYB", + "nuovo rublo bielorusso (1994–1999)" + ], + "BYN": [ + "BYN", + "rublo bielorusso" + ], + "BYR": [ + "BYR", + "rublo bielorusso (2000–2016)" + ], + "BZD": [ + "BZD", + "dollaro del Belize" + ], + "CAD": [ + "CA$", + "dollaro canadese" + ], + "CDF": [ + "CDF", + "franco congolese" + ], + "CHF": [ + "CHF", + "franco svizzero" + ], + "CLF": [ + "CLF", + "unidades de fomento chilene" + ], + "CLP": [ + "CLP", + "peso cileno" + ], + "CNY": [ + "CNÂ¥", + "renminbi cinese" + ], + "COP": [ + "COP", + "peso colombiano" + ], + "CRC": [ + "CRC", + "colón costaricano" + ], + "CSD": [ + "CSD", + "antico dinaro serbo" + ], + "CSK": [ + "CSK", + "corona forte cecoslovacca" + ], + "CUC": [ + "CUC", + "peso cubano convertibile" + ], + "CUP": [ + "CUP", + "peso cubano" + ], + "CVE": [ + "CVE", + "escudo capoverdiano" + ], + "CYP": [ + "CYP", + "sterlina cipriota" + ], + "CZK": [ + "CZK", + "corona ceca" + ], + "DDM": [ + "DDM", + "ostmark della Germania Orientale" + ], + "DEM": [ + "DEM", + "marco tedesco" + ], + "DJF": [ + "DJF", + "franco di Gibuti" + ], + "DKK": [ + "DKK", + "corona danese" + ], + "DOP": [ + "DOP", + "peso dominicano" + ], + "DZD": [ + "DZD", + "dinaro algerino" + ], + "ECS": [ + "ECS", + "sucre dell’Ecuador" + ], + "ECV": [ + "ECV", + "unidad de valor constante (UVC) dell’Ecuador" + ], + "EEK": [ + "EEK", + "corona dell’Estonia" + ], + "EGP": [ + "EGP", + "sterlina egiziana" + ], + "ERN": [ + "ERN", + "nakfa eritreo" + ], + "ESA": [ + "ESA", + "peseta spagnola account" + ], + "ESB": [ + "ESB", + "peseta spagnola account convertibile" + ], + "ESP": [ + "ESP", + "peseta spagnola" + ], + "ETB": [ + "ETB", + "birr etiope" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "markka finlandese" + ], + "FJD": [ + "FJD", + "dollaro delle Figi" + ], + "FKP": [ + "FKP", + "sterlina delle Falkland" + ], + "FRF": [ + "FRF", + "franco francese" + ], + "GBP": [ + "£", + "sterlina britannica" + ], + "GEK": [ + "GEK", + "kupon larit georgiano" + ], + "GEL": [ + "GEL", + "lari georgiano" + ], + "GHC": [ + "GHC", + "cedi del Ghana" + ], + "GHS": [ + "GHS", + "cedi ghanese" + ], + "GIP": [ + "GIP", + "sterlina di Gibilterra" + ], + "GMD": [ + "GMD", + "dalasi gambiano" + ], + "GNF": [ + "GNF", + "franco della Guinea" + ], + "GNS": [ + "GNS", + "syli della Guinea" + ], + "GQE": [ + "GQE", + "ekwele della Guinea Equatoriale" + ], + "GRD": [ + "GRD", + "dracma greca" + ], + "GTQ": [ + "GTQ", + "quetzal guatemalteco" + ], + "GWE": [ + "GWE", + "escudo della Guinea portoghese" + ], + "GWP": [ + "GWP", + "peso della Guinea-Bissau" + ], + "GYD": [ + "GYD", + "dollaro della Guyana" + ], + "HKD": [ + "HKD", + "dollaro di Hong Kong" + ], + "HNL": [ + "HNL", + "lempira honduregna" + ], + "HRD": [ + "HRD", + "dinaro croato" + ], + "HRK": [ + "HRK", + "kuna croata" + ], + "HTG": [ + "HTG", + "gourde haitiano" + ], + "HUF": [ + "HUF", + "fiorino ungherese" + ], + "IDR": [ + "IDR", + "rupia indonesiana" + ], + "IEP": [ + "IEP", + "sterlina irlandese" + ], + "ILP": [ + "ILP", + "sterlina israeliana" + ], + "ILS": [ + "₪", + "nuovo siclo israeliano" + ], + "INR": [ + "₹", + "rupia indiana" + ], + "IQD": [ + "IQD", + "dinaro iracheno" + ], + "IRR": [ + "IRR", + "rial iraniano" + ], + "ISK": [ + "ISK", + "corona islandese" + ], + "ITL": [ + "ITL", + "lira italiana", + {} + ], + "JMD": [ + "JMD", + "dollaro giamaicano" + ], + "JOD": [ + "JOD", + "dinaro giordano" + ], + "JPY": [ + "JPY", + "yen giapponese" + ], + "KES": [ + "KES", + "scellino keniota" + ], + "KGS": [ + "KGS", + "som kirghiso" + ], + "KHR": [ + "KHR", + "riel cambogiano" + ], + "KMF": [ + "KMF", + "franco comoriano" + ], + "KPW": [ + "KPW", + "won nordcoreano" + ], + "KRW": [ + "KRW", + "won sudcoreano" + ], + "KWD": [ + "KWD", + "dinaro kuwaitiano" + ], + "KYD": [ + "KYD", + "dollaro delle Isole Cayman" + ], + "KZT": [ + "KZT", + "tenge kazako" + ], + "LAK": [ + "LAK", + "kip laotiano" + ], + "LBP": [ + "LBP", + "lira libanese" + ], + "LKR": [ + "LKR", + "rupia di Sri Lanka" + ], + "LRD": [ + "LRD", + "dollaro liberiano" + ], + "LSL": [ + "LSL", + "loti del Lesotho" + ], + "LTL": [ + "LTL", + "litas lituano" + ], + "LTT": [ + "LTT", + "talonas lituani" + ], + "LUC": [ + "LUC", + "franco convertibile del Lussemburgo" + ], + "LUF": [ + "LUF", + "franco del Lussemburgo" + ], + "LUL": [ + "LUL", + "franco finanziario del Lussemburgo" + ], + "LVL": [ + "LVL", + "lats lettone" + ], + "LVR": [ + "LVR", + "rublo lettone" + ], + "LYD": [ + "LYD", + "dinaro libico" + ], + "MAD": [ + "MAD", + "dirham marocchino" + ], + "MAF": [ + "MAF", + "franco marocchino" + ], + "MDL": [ + "MDL", + "leu moldavo" + ], + "MGA": [ + "MGA", + "ariary malgascio" + ], + "MGF": [ + "MGF", + "franco malgascio" + ], + "MKD": [ + "MKD", + "denar macedone" + ], + "MLF": [ + "MLF", + "franco di Mali" + ], + "MMK": [ + "MMK", + "kyat di Myanmar" + ], + "MNT": [ + "MNT", + "tugrik mongolo" + ], + "MOP": [ + "MOP", + "pataca di Macao" + ], + "MRO": [ + "MRO", + "ouguiya della Mauritania" + ], + "MTL": [ + "MTL", + "lira maltese" + ], + "MTP": [ + "MTP", + "sterlina maltese" + ], + "MUR": [ + "MUR", + "rupia mauriziana" + ], + "MVR": [ + "MVR", + "rufiyaa delle Maldive" + ], + "MWK": [ + "MWK", + "kwacha malawiano" + ], + "MXN": [ + "MXN", + "peso messicano" + ], + "MXP": [ + "MXP", + "peso messicano d’argento (1861–1992)" + ], + "MXV": [ + "MXV", + "unidad de inversion (UDI) messicana" + ], + "MYR": [ + "MYR", + "ringgit malese" + ], + "MZE": [ + "MZE", + "escudo del Mozambico" + ], + "MZN": [ + "MZN", + "metical mozambicano" + ], + "NAD": [ + "NAD", + "dollaro namibiano" + ], + "NGN": [ + "NGN", + "naira nigeriana" + ], + "NIC": [ + "NIC", + "cordoba nicaraguense" + ], + "NIO": [ + "NIO", + "córdoba nicaraguense" + ], + "NLG": [ + "NLG", + "fiorino olandese" + ], + "NOK": [ + "NOK", + "corona norvegese" + ], + "NPR": [ + "NPR", + "rupia nepalese" + ], + "NZD": [ + "NZ$", + "dollaro neozelandese" + ], + "OMR": [ + "OMR", + "rial omanita" + ], + "PAB": [ + "PAB", + "balboa panamense" + ], + "PEI": [ + "PEI", + "inti peruviano" + ], + "PEN": [ + "PEN", + "nuovo sol peruviano" + ], + "PES": [ + "PES", + "sol peruviano" + ], + "PGK": [ + "PGK", + "kina papuana" + ], + "PHP": [ + "PHP", + "peso filippino" + ], + "PKR": [ + "PKR", + "rupia pakistana" + ], + "PLN": [ + "PLN", + "zÅ‚oty polacco" + ], + "PLZ": [ + "PLZ", + "zÅ‚oty Polacco (1950–1995)" + ], + "PTE": [ + "PTE", + "escudo portoghese" + ], + "PYG": [ + "PYG", + "guaraní paraguayano" + ], + "QAR": [ + "QAR", + "rial qatariano" + ], + "RHD": [ + "RHD", + "dollaro della Rhodesia" + ], + "ROL": [ + "ROL", + "leu della Romania" + ], + "RON": [ + "RON", + "leu rumeno" + ], + "RSD": [ + "RSD", + "dinaro serbo" + ], + "RUB": [ + "RUB", + "rublo russo" + ], + "RUR": [ + "RUR", + "rublo della CSI" + ], + "RWF": [ + "RWF", + "franco ruandese" + ], + "SAR": [ + "SAR", + "riyal saudita" + ], + "SBD": [ + "SBD", + "dollaro delle Isole Salomone" + ], + "SCR": [ + "SCR", + "rupia delle Seychelles" + ], + "SDD": [ + "SDD", + "dinaro sudanese" + ], + "SDG": [ + "SDG", + "sterlina sudanese" + ], + "SEK": [ + "SEK", + "corona svedese" + ], + "SGD": [ + "SGD", + "dollaro di Singapore" + ], + "SHP": [ + "SHP", + "sterlina di Sant’Elena" + ], + "SIT": [ + "SIT", + "tallero sloveno" + ], + "SKK": [ + "SKK", + "corona slovacca" + ], + "SLL": [ + "SLL", + "leone della Sierra Leone" + ], + "SOS": [ + "SOS", + "scellino somalo" + ], + "SRD": [ + "SRD", + "dollaro del Suriname" + ], + "SRG": [ + "SRG", + "fiorino del Suriname" + ], + "SSP": [ + "SSP", + "sterlina sud-sudanese" + ], + "STD": [ + "STD", + "dobra di Sao Tomé e Principe" + ], + "SUR": [ + "SUR", + "rublo sovietico" + ], + "SVC": [ + "SVC", + "colón salvadoregno" + ], + "SYP": [ + "SYP", + "lira siriana" + ], + "SZL": [ + "SZL", + "lilangeni dello Swaziland" + ], + "THB": [ + "฿", + "baht thailandese" + ], + "TJR": [ + "TJR", + "rublo del Tajikistan" + ], + "TJS": [ + "TJS", + "somoni tagiko" + ], + "TMM": [ + "TMM", + "manat turkmeno (1993–2009)" + ], + "TMT": [ + "TMT", + "manat turkmeno" + ], + "TND": [ + "TND", + "dinaro tunisino" + ], + "TOP": [ + "TOP", + "paÊ»anga tongano" + ], + "TPE": [ + "TPE", + "escudo di Timor" + ], + "TRL": [ + "TRL", + "lira turca (1922–2005)" + ], + "TRY": [ + "TRY", + "lira turca" + ], + "TTD": [ + "TTD", + "dollaro di Trinidad e Tobago" + ], + "TWD": [ + "TWD", + "nuovo dollaro taiwanese" + ], + "TZS": [ + "TZS", + "scellino della Tanzania" + ], + "UAH": [ + "UAH", + "grivnia ucraina" + ], + "UAK": [ + "UAK", + "karbovanetz ucraino" + ], + "UGS": [ + "UGS", + "scellino ugandese (1966–1987)" + ], + "UGX": [ + "UGX", + "scellino ugandese" + ], + "USD": [ + "US$", + "dollaro statunitense" + ], + "USN": [ + "USN", + "dollaro statunitense (next day)" + ], + "USS": [ + "USS", + "dollaro statunitense (same day)" + ], + "UYI": [ + "UYI", + "peso uruguaiano in unità indicizzate" + ], + "UYP": [ + "UYP", + "peso uruguaiano (1975–1993)" + ], + "UYU": [ + "UYU", + "peso uruguayano" + ], + "UZS": [ + "UZS", + "sum uzbeco" + ], + "VEB": [ + "VEB", + "bolivar venezuelano (1871–2008)" + ], + "VEF": [ + "VEF", + "bolívar venezuelano" + ], + "VND": [ + "â‚«", + "dong vietnamita" + ], + "VUV": [ + "VUV", + "vatu di Vanuatu" + ], + "WST": [ + "WST", + "tala samoano" + ], + "XAF": [ + "FCFA", + "franco CFA BEAC" + ], + "XCD": [ + "EC$", + "dollaro dei Caraibi orientali" + ], + "XFO": [ + "XFO", + "franco oro francese" + ], + "XFU": [ + "XFU", + "franco UIC francese" + ], + "XOF": [ + "CFA", + "franco CFA BCEAO" + ], + "XPF": [ + "CFPF", + "franco CFP" + ], + "XRE": [ + "XRE", + "fondi RINET" + ], + "YDD": [ + "YDD", + "dinaro dello Yemen" + ], + "YER": [ + "YER", + "riyal yemenita" + ], + "YUD": [ + "YUD", + "dinaro forte yugoslavo" + ], + "YUM": [ + "YUM", + "dinaro noviy yugoslavo" + ], + "YUN": [ + "YUN", + "dinaro convertibile yugoslavo" + ], + "ZAL": [ + "ZAL", + "rand sudafricano (finanziario)" + ], + "ZAR": [ + "ZAR", + "rand sudafricano" + ], + "ZMK": [ + "ZMK", + "kwacha dello Zambia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "kwacha dello Zambia" + ], + "ZRN": [ + "ZRN", + "nuovo zaire dello Zaire" + ], + "ZRZ": [ + "ZRZ", + "zaire dello Zaire" + ], + "ZWD": [ + "ZWD", + "dollaro dello Zimbabwe" + ], + "ZWL": [ + "ZWL", + "dollaro zimbabwiano (2009)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/iw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/iw.json new file mode 100644 index 0000000000000000000000000000000000000000..114ae41592c1196e9f491150d297eb43b0660da3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/iw.json @@ -0,0 +1,869 @@ +{ + "Version": "2.1.29.27", + "Names": { + "ADP": [ + "ADP", + "פזטה ×נדורית" + ], + "AED": [ + "AED", + "×“×™×¨×”× ×©×œ ×יחוד הנסיכויות הערביות" + ], + "AFN": [ + "AFN", + "×פגני ×פגני" + ], + "ALL": [ + "ALL", + "לק ×לבני" + ], + "AMD": [ + "AMD", + "דר×× ×רמני" + ], + "ANG": [ + "ANG", + "גילדר של ×”×× ×˜×™×œ×™× ×”×”×•×œ× ×“×™×™×" + ], + "AOA": [ + "AOA", + "קו×× ×–×” ×נגולי" + ], + "AON": [ + "AON", + "קו×× ×–×” חדש ×נגולי (1990–2000)" + ], + "AOR": [ + "AOR", + "קו×× ×–×” רג׳וסטדו ×נגולי (1995–1999)" + ], + "ARP": [ + "ARP", + "פזו ×רגנטינ××™ (1983–1985)" + ], + "ARS": [ + "ARS", + "פסו ×רגנטינ××™" + ], + "ATS": [ + "ATS", + "שילינג ×וסטרי" + ], + "AUD": [ + "A$", + "דולר ×וסטרלי" + ], + "AWG": [ + "AWG", + "פלורין של ×רובה" + ], + "AZM": [ + "AZM", + "מנ×ט ×זרביג׳×× ×™ (1993–2006)" + ], + "AZN": [ + "AZN", + "מ×× ×ט ×זרביג׳ני" + ], + "BAD": [ + "BAD", + "דינר של בוסניה־הרצגובינה" + ], + "BAM": [ + "BAM", + "מ×רק בר המרה של בוסניה־הרצגובינה" + ], + "BBD": [ + "BBD", + "דולר ברבדי×× ×™" + ], + "BDT": [ + "BDT", + "ט××§×” בנגלדשי" + ], + "BEC": [ + "BEC", + "פרנק בלגי (בר המרה)" + ], + "BEF": [ + "BEF", + "פרנק בלגי" + ], + "BGL": [ + "BGL", + "לב בולגרי ישן" + ], + "BGN": [ + "BGN", + "לב בולגרי" + ], + "BHD": [ + "BHD", + "דינר בחרייני" + ], + "BIF": [ + "BIF", + "פרנק בורונדי" + ], + "BMD": [ + "BMD", + "דולר ברמודה" + ], + "BND": [ + "BND", + "דולר ברוניי" + ], + "BOB": [ + "BOB", + "בוליבי×נו" + ], + "BOP": [ + "BOP", + "פזו בוליבי" + ], + "BRB": [ + "BRB", + "קרוזי×רו חדש ברזיל××™ (1967–1986)" + ], + "BRC": [ + "BRC", + "קרוזדו ברזיל××™" + ], + "BRL": [ + "R$", + "רי×ל ברזיל××™" + ], + "BSD": [ + "BSD", + "דולר בה×מי" + ], + "BTN": [ + "BTN", + "× ×’×•×œ×˜×¨×•× ×‘×”×•×˜× ×™" + ], + "BWP": [ + "BWP", + "פולה בוצוו×× ×™" + ], + "BYN": [ + "BYN", + "רובל בלרוסי" + ], + "BYR": [ + "BYR", + "רובל בלרוסי (2000–2016)" + ], + "BZD": [ + "BZD", + "דולר בליזי" + ], + "CAD": [ + "CA$", + "דולר קנדי" + ], + "CDF": [ + "CDF", + "פרנק קונגולזי" + ], + "CHF": [ + "CHF", + "פרנק שוויצרי" + ], + "CLP": [ + "CLP", + "פסו צ׳יל×× ×™" + ], + "CNY": [ + "‎CN¥‎", + "יו×ן סיני" + ], + "COP": [ + "COP", + "פסו קולומבי×× ×™" + ], + "CRC": [ + "CRC", + "קולון קוסטה־ריקני" + ], + "CSD": [ + "CSD", + "דינר סרבי ישן" + ], + "CUC": [ + "CUC", + "פזו קובני להמרה" + ], + "CUP": [ + "CUP", + "פזו קובני" + ], + "CVE": [ + "CVE", + "×סקודו ×›×£ ורדה" + ], + "CYP": [ + "CYP", + "לירה קפריס×ית" + ], + "CZK": [ + "CZK", + "קורונה צ׳כית" + ], + "DDM": [ + "DDM", + "מרק מזרח גרמני" + ], + "DEM": [ + "DEM", + "מרק גרמני" + ], + "DJF": [ + "DJF", + "פרנק ג׳יבוטי" + ], + "DKK": [ + "DKK", + "כתר דני" + ], + "DOP": [ + "DOP", + "פזו דומיניקני" + ], + "DZD": [ + "DZD", + "דינר ×לג׳ירי" + ], + "ECS": [ + "ECS", + "סוקר ×קו×דורי" + ], + "EEK": [ + "EEK", + "קרון ×סטוני" + ], + "EGP": [ + "EGP", + "לירה מצרית" + ], + "ERN": [ + "ERN", + "× ×קפה ×ריתר××™" + ], + "ESP": [ + "ESP", + "פסטה ספרדי" + ], + "ETB": [ + "ETB", + "ביר ×תיופי" + ], + "EUR": [ + "€", + "×ירו" + ], + "FIM": [ + "FIM", + "מרק פיני" + ], + "FJD": [ + "FJD", + "דולר פיג׳י" + ], + "FKP": [ + "FKP", + "לירה של ××™×™ פוקלנד" + ], + "FRF": [ + "FRF", + "פרנק צרפתי" + ], + "GBP": [ + "£", + "לירה שטרלינג" + ], + "GEL": [ + "GEL", + "לרי ×’×ורגי" + ], + "GHS": [ + "GHS", + "סדי ×’×× ×™" + ], + "GIP": [ + "GIP", + "פ×ונד גיברלטר" + ], + "GMD": [ + "GMD", + "דל×סי גמבי" + ], + "GNF": [ + "GNF", + "פרנק ×’×™× ××™" + ], + "GRD": [ + "GRD", + "דרכמה" + ], + "GTQ": [ + "GTQ", + "קצל גו×טמלי" + ], + "GWP": [ + "GWP", + "פזו ×’×™× ××™" + ], + "GYD": [ + "GYD", + "דולר ×’×™×× ×™" + ], + "HKD": [ + "HK$", + "דולר הונג קונגי" + ], + "HNL": [ + "HNL", + "למפירה הונדורי" + ], + "HRK": [ + "HRK", + "קונה קרו×טי" + ], + "HTG": [ + "HTG", + "גורד ×”×יטי" + ], + "HUF": [ + "HUF", + "פורינט הונגרי" + ], + "IDR": [ + "IDR", + "רופיה ×ינדונזית" + ], + "IEP": [ + "IEP", + "לירה ×ירית" + ], + "ILP": [ + "ל״י", + "לירה ישר×לית" + ], + "ILS": [ + "₪", + "שקל חדש" + ], + "INR": [ + "₹", + "רופי הודי" + ], + "IQD": [ + "IQD", + "דינר עיר××§×™" + ], + "IRR": [ + "IRR", + "רי×ל ×יר×× ×™" + ], + "ISK": [ + "ISK", + "כתר ×יסלנדי" + ], + "ITL": [ + "ITL", + "לירה ×יטלקית" + ], + "JMD": [ + "JMD", + "דולר ג׳מייקני" + ], + "JOD": [ + "JOD", + "דינר ירדני" + ], + "JPY": [ + "Â¥", + "ין יפני" + ], + "KES": [ + "KES", + "שילינג ×§× ×™×™×תי" + ], + "KGS": [ + "KGS", + "×¡×•× ×§×™×¨×’×™×–×™" + ], + "KHR": [ + "KHR", + "ריל קמבודי" + ], + "KMF": [ + "KMF", + "פרנק קומורו××™" + ], + "KPW": [ + "KPW", + "וון צפון קורי×× ×™" + ], + "KRW": [ + "â‚©", + "וון ×“×¨×•× ×§×•×¨×™×× ×™" + ], + "KWD": [ + "KWD", + "דינר כוויתי" + ], + "KYD": [ + "KYD", + "דולר קיימ×× ×™" + ], + "KZT": [ + "KZT", + "טנגה קזחסטני" + ], + "LAK": [ + "LAK", + "קיפ ל××™" + ], + "LBP": [ + "LBP", + "לירה לבנונית" + ], + "LKR": [ + "LKR", + "רופי סרי לנקי" + ], + "LRD": [ + "LRD", + "דולר ליברי" + ], + "LSL": [ + "LSL", + "לוטי לסותי" + ], + "LTL": [ + "LTL", + "×œ×™×˜× ×œ×™×˜××™" + ], + "LUF": [ + "LUF", + "פרנק לוקסמבורגי" + ], + "LVL": [ + "LVL", + "לט לטבי" + ], + "LYD": [ + "LYD", + "דינר לובי" + ], + "MAD": [ + "MAD", + "×“×™×¨×”× ×ž×¨×•×§××™" + ], + "MAF": [ + "MAF", + "פרנק מרוק××™" + ], + "MDL": [ + "MDL", + "לי×ו מולדובני" + ], + "MGA": [ + "MGA", + "×רי×רי מלגשי" + ], + "MGF": [ + "MGF", + "פרנק מדגסק×רי" + ], + "MKD": [ + "MKD", + "דינר מקדוני" + ], + "MMK": [ + "MMK", + "×§×™×ט מי×נמרי" + ], + "MNT": [ + "MNT", + "טוגרוג מונגולי" + ], + "MOP": [ + "MOP", + "פטקה של מק×ו" + ], + "MRO": [ + "MRO", + "×וגוויה מ×וריטני" + ], + "MTL": [ + "MTL", + "לירה מלטית" + ], + "MUR": [ + "MUR", + "רופי מ×וריציני" + ], + "MVR": [ + "MVR", + "רופיה מלדיבית" + ], + "MWK": [ + "MWK", + "קו×צ׳ה מל×וי" + ], + "MXN": [ + "MX$", + "פזו מקסיקני" + ], + "MXP": [ + "MXP", + "פזו מקסיקני (1861 – 1992)" + ], + "MYR": [ + "MYR", + "רינגיט מלזי" + ], + "MZE": [ + "MZE", + "×סקודו מוזמביקי" + ], + "MZM": [ + "MZM", + "מטיקל" + ], + "MZN": [ + "MZN", + "מטיקל מוזמביני" + ], + "NAD": [ + "NAD", + "דולר נמיבי" + ], + "NGN": [ + "NGN", + "× ×ירה ניגרי" + ], + "NIO": [ + "NIO", + "קורדובה ניקרגו××”" + ], + "NLG": [ + "NLG", + "גילדן הולנדי" + ], + "NOK": [ + "NOK", + "כתר נורווגי" + ], + "NPR": [ + "NPR", + "רופי נפ×לי" + ], + "NZD": [ + "NZ$", + "דולר ניו זילנדי" + ], + "OMR": [ + "OMR", + "רי×ל עומ×× ×™" + ], + "PAB": [ + "PAB", + "בלבו××” פנמי" + ], + "PEN": [ + "PEN", + "סול פרו×× ×™ חדש" + ], + "PGK": [ + "PGK", + "×§×™× ×” של פפו××” ×’×™× ××” החדשה" + ], + "PHP": [ + "PHP", + "פזו פיליפיני" + ], + "PKR": [ + "PKR", + "רופי פקיסטני" + ], + "PLN": [ + "PLN", + "זלוטי פולני" + ], + "PTE": [ + "PTE", + "×סקודו פורטוגלי" + ], + "PYG": [ + "PYG", + "גוורני פר×גוו××™" + ], + "QAR": [ + "QAR", + "רי×ל קט×רי" + ], + "ROL": [ + "ROL", + "ל×ו רומני ישן" + ], + "RON": [ + "RON", + "ל×ו רומני" + ], + "RSD": [ + "RSD", + "דינר סרבי" + ], + "RUB": [ + "RUB", + "רובל רוסי" + ], + "RUR": [ + "RUR", + "רובל רוסי (1991 – 1998)" + ], + "RWF": [ + "RWF", + "פרנק רו×נדי" + ], + "SAR": [ + "SAR", + "רי×ל סעודי" + ], + "SBD": [ + "SBD", + "דולר ××™×™ שלמה" + ], + "SCR": [ + "SCR", + "רופי סיישלי" + ], + "SDD": [ + "SDD", + "דינר סודני" + ], + "SDG": [ + "SDG", + "לירה סודנית" + ], + "SDP": [ + "SDP", + "לירה סודנית (1957–1998)" + ], + "SEK": [ + "SEK", + "כתר שוודי" + ], + "SGD": [ + "SGD", + "דולר סינגפורי" + ], + "SHP": [ + "SHP", + "פ×ונד סנט הלני" + ], + "SIT": [ + "SIT", + "טול×ר סלובני" + ], + "SKK": [ + "SKK", + "קורונה סלובקי" + ], + "SLL": [ + "SLL", + "לי×ון סיירה ל×וני" + ], + "SOS": [ + "SOS", + "שילינג סומ×לי" + ], + "SRD": [ + "SRD", + "דולר סורינ×מי" + ], + "SRG": [ + "SRG", + "גילדר סורינ×מי" + ], + "SSP": [ + "SSP", + "לירה דרו×-סודנית" + ], + "STD": [ + "STD", + "דוברה של סן טומה ופרינסיפה" + ], + "SUR": [ + "SUR", + "רובל סובייטי" + ], + "SVC": [ + "SVC", + "קולון סלבדורי" + ], + "SYP": [ + "SYP", + "לירה סורית" + ], + "SZL": [ + "SZL", + "לילנגני סווזי" + ], + "THB": [ + "฿", + "בהט ת×ילנדי" + ], + "TJS": [ + "TJS", + "סומוני טג׳קיסטני" + ], + "TMM": [ + "TMM", + "מנ×ט טורקמ×× ×™" + ], + "TMT": [ + "TMT", + "מ×× ×ט טורקמני" + ], + "TND": [ + "TND", + "דינר טוניס××™" + ], + "TOP": [ + "TOP", + "פ×× ×’×” טונגי" + ], + "TPE": [ + "TPE", + "×סקודו טימור××™" + ], + "TRL": [ + "TRL", + "לירה טורקית" + ], + "TRY": [ + "TRY", + "לירה טורקית חדשה" + ], + "TTD": [ + "TTD", + "דולר טרינידדי" + ], + "TWD": [ + "NT$", + "דולר טייוו×× ×™ חדש" + ], + "TZS": [ + "TZS", + "שילינג טנזני" + ], + "UAH": [ + "UAH", + "גריבנה ×וקר××™× ×™" + ], + "UGS": [ + "UGS", + "שילינג ×וגנדי (1966 – 1987)" + ], + "UGX": [ + "UGX", + "שילינג ×וגנדי" + ], + "USD": [ + "$", + "דולר ×מריק××™" + ], + "USN": [ + "USN", + "דולר ×מריק××™ (×”×™×•× ×”×‘×)" + ], + "USS": [ + "USS", + "דולר ×מריק××™ (×”×™×•× ×”×–×”)" + ], + "UYU": [ + "UYU", + "פסו ×ורוגוו××™" + ], + "UZS": [ + "UZS", + "×¡×•× ×וזבקי" + ], + "VEB": [ + "VEB", + "בוליבר ונצו×לי (1871–2008)" + ], + "VEF": [ + "VEF", + "בוליבר ונצו×לי" + ], + "VND": [ + "â‚«", + "דונג וייטנ×מי" + ], + "VUV": [ + "VUV", + "ו×טו של ונו×טו" + ], + "WST": [ + "WST", + "ט×לה סמו××™" + ], + "XAF": [ + "FCFA", + "פרנק CFA BEAC" + ], + "XCD": [ + "EC$", + "דולר מזרח קריבי" + ], + "XFO": [ + "XFO", + "פרנק זהב" + ], + "XOF": [ + "CFA", + "פרנק CFA BCEAO" + ], + "XPF": [ + "CFPF", + "פרנק פולינזיה הצרפתית" + ], + "YDD": [ + "YDD", + "דינר תימני" + ], + "YER": [ + "YER", + "רי×ל תימני" + ], + "ZAL": [ + "ZAL", + "ר×נד ×“×¨×•× ×פריק××™ (כספי)" + ], + "ZAR": [ + "ZAR", + "ר×נד ×“×¨×•× ×פריק××™" + ], + "ZMK": [ + "ZMK", + "קוו×צ׳ה זמבית (1968–2012)" + ], + "ZMW": [ + "ZMW", + "קוו×צ׳ה זמבית" + ], + "ZRN": [ + "ZRN", + "×–×יר חדש" + ], + "ZWD": [ + "ZWD", + "דולר זימבבו××™" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ja.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ja.json new file mode 100644 index 0000000000000000000000000000000000000000..2fc36a74c838b5ea8426da13ea76ff16d28de37b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ja.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "アンドラ ペセタ" + ], + "AED": [ + "AED", + "アラブ首長国連邦ディルãƒãƒ " + ], + "AFA": [ + "AFA", + "アフガニスタン アフガニー (1927–2002)" + ], + "AFN": [ + "AFN", + "アフガニスタン アフガニー" + ], + "ALK": [ + "ALK", + "アルãƒãƒ‹ã‚¢ レク (1946–1965)" + ], + "ALL": [ + "ALL", + "アルãƒãƒ‹ã‚¢ レク" + ], + "AMD": [ + "AMD", + "アルメニア ドラム" + ], + "ANG": [ + "ANG", + "オランダ領アンティル ギルダー" + ], + "AOA": [ + "AOA", + "アンゴラ クワンザ" + ], + "AOK": [ + "AOK", + "アンゴラ クワンザ (1977–1991)" + ], + "AON": [ + "AON", + "アンゴラ 新クワンザ (1990–2000)" + ], + "AOR": [ + "AOR", + "アンゴラ 旧クワンザ (1995–1999)" + ], + "ARA": [ + "ARA", + "アルゼンãƒãƒ³ アゥストラール" + ], + "ARL": [ + "ARL", + "アルゼンãƒãƒ³ãƒ»ãƒšã‚½ãƒ»ãƒ¬ã‚¤ï¼ˆ1970–1983)" + ], + "ARM": [ + "ARM", + "アルゼンãƒãƒ³ãƒ»ãƒšã‚½ï¼ˆ1881–1970)" + ], + "ARP": [ + "ARP", + "アルゼンãƒãƒ³ ペソ (1983–1985)" + ], + "ARS": [ + "ARS", + "アルゼンãƒãƒ³ ペソ" + ], + "ATS": [ + "ATS", + "オーストリア シリング" + ], + "AUD": [ + "A$", + "オーストラリア ドル" + ], + "AWG": [ + "AWG", + "アルムギルダー" + ], + "AZM": [ + "AZM", + "アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³ マナト (1993–2006)" + ], + "AZN": [ + "AZN", + "アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³ マナト" + ], + "BAD": [ + "BAD", + "ボスニア・ヘルツェゴビナ ディナール (1992–1994)" + ], + "BAM": [ + "BAM", + "ボスニア マルク (BAM)" + ], + "BAN": [ + "BAN", + "ボスニア・ヘルツェゴビナ 新ディナール(1994–1997)" + ], + "BBD": [ + "BBD", + "ãƒãƒ«ãƒãƒ‰ã‚¹ ドル" + ], + "BDT": [ + "BDT", + "ãƒãƒ³ã‚°ãƒ©ãƒ‡ã‚·ãƒ¥ ã‚¿ã‚«" + ], + "BEC": [ + "BEC", + "ベルギー フラン (BEC)" + ], + "BEF": [ + "BEF", + "ベルギー フラン" + ], + "BEL": [ + "BEL", + "ベルギー フラン (BEL)" + ], + "BGL": [ + "BGL", + "ブルガリア レフ" + ], + "BGM": [ + "BGM", + "ブルガリア社会主義 レフ" + ], + "BGN": [ + "BGN", + "ブルガリア 新レフ" + ], + "BGO": [ + "BGO", + "ブルガリア レフ(1879–1952)" + ], + "BHD": [ + "BHD", + "ãƒãƒ¼ãƒ¬ãƒ¼ãƒ³ ディナール" + ], + "BIF": [ + "BIF", + "ブルンジ フラン" + ], + "BMD": [ + "BMD", + "ãƒãƒŸãƒ¥ãƒ¼ãƒ€ ドル" + ], + "BND": [ + "BND", + "ブルãƒã‚¤ ドル" + ], + "BOB": [ + "BOB", + "ボリビア ボリビアーノ" + ], + "BOL": [ + "BOL", + "ボリビア ボリビアーノ (1863–1963)" + ], + "BOP": [ + "BOP", + "ボリビア ペソ" + ], + "BOV": [ + "BOV", + "ボリビア (Mvdol)" + ], + "BRB": [ + "BRB", + "ブラジル 新クルゼイロ (1967–1986)" + ], + "BRC": [ + "BRC", + "ブラジル クルザード (1986–1989)" + ], + "BRE": [ + "BRE", + "ブラジル クルゼイロ (1990–1993)" + ], + "BRL": [ + "R$", + "ブラジル レアル" + ], + "BRN": [ + "BRN", + "ブラジル 新クルザード (1989–1990)" + ], + "BRR": [ + "BRR", + "ブラジル クルゼイロ (1993–1994)" + ], + "BRZ": [ + "BRZ", + "ブラジル クルゼイロ(1942–1967)" + ], + "BSD": [ + "BSD", + "ãƒãƒãƒž ドル" + ], + "BTN": [ + "BTN", + "ブータン ニュルタム" + ], + "BUK": [ + "BUK", + "ビルマ ãƒãƒ£ãƒƒãƒˆ" + ], + "BWP": [ + "BWP", + "ボツワナ プラ" + ], + "BYB": [ + "BYB", + "ベラルーシ 新ルーブル (1994–1999)" + ], + "BYN": [ + "BYN", + "ベラルーシ ルーブル" + ], + "BYR": [ + "BYR", + "ベラルーシ ルーブル (2000–2016)" + ], + "BZD": [ + "BZD", + "ベリーズ ドル" + ], + "CAD": [ + "CA$", + "カナダ ドル" + ], + "CDF": [ + "CDF", + "コンゴ フラン" + ], + "CHE": [ + "CHE", + "ユーロ (WIR)" + ], + "CHF": [ + "CHF", + "スイス フラン" + ], + "CHW": [ + "CHW", + "フラン (WIR)" + ], + "CLE": [ + "CLE", + "ãƒãƒª エスクード" + ], + "CLF": [ + "CLF", + "ãƒãƒª ウニダ・デ・フォメント (UF)" + ], + "CLP": [ + "CLP", + "ãƒãƒª ペソ" + ], + "CNX": [ + "CNX", + "中国人民銀行ドル" + ], + "CNY": [ + "å…ƒ", + "中国人民元" + ], + "COP": [ + "COP", + "コロンビア ペソ" + ], + "COU": [ + "COU", + "コロンビア レアル (UVR)" + ], + "CRC": [ + "CRC", + "コスタリカ コロン" + ], + "CSD": [ + "CSD", + "セルビア ディナール (2002–2006)" + ], + "CSK": [ + "CSK", + "ãƒã‚§ã‚³ã‚¹ãƒ­ãƒã‚­ã‚¢ コルナ" + ], + "CUC": [ + "CUC", + "キューム兌æ›ãƒšã‚½" + ], + "CUP": [ + "CUP", + "キュームペソ" + ], + "CVE": [ + "CVE", + "カーボベルデ エスクード" + ], + "CYP": [ + "CYP", + "キプロス ãƒãƒ³ãƒ‰" + ], + "CZK": [ + "CZK", + "ãƒã‚§ã‚³ コルナ" + ], + "DDM": [ + "DDM", + "æ±ãƒ‰ã‚¤ãƒ„ マルク" + ], + "DEM": [ + "DEM", + "ドイツ マルク" + ], + "DJF": [ + "DJF", + "ジブムフラン" + ], + "DKK": [ + "DKK", + "デンマーク クローãƒ" + ], + "DOP": [ + "DOP", + "ドミニカ ペソ" + ], + "DZD": [ + "DZD", + "アルジェリア ディナール" + ], + "ECS": [ + "ECS", + "エクアドル スクレ" + ], + "ECV": [ + "ECV", + "エクアドル (UVC)" + ], + "EEK": [ + "EEK", + "エストニア クルーン" + ], + "EGP": [ + "EGP", + "エジプト ãƒãƒ³ãƒ‰" + ], + "ERN": [ + "ERN", + "エリトリア ナクファ" + ], + "ESA": [ + "ESA", + "スペインペセタ(勘定A)" + ], + "ESB": [ + "ESB", + "スペイン å…Œæ›ãƒšã‚»ã‚¿" + ], + "ESP": [ + "ESP", + "スペイン ペセタ" + ], + "ETB": [ + "ETB", + "エãƒã‚ªãƒ”ã‚¢ ブル" + ], + "EUR": [ + "€", + "ユーロ" + ], + "FIM": [ + "FIM", + "フィンランド マルカ" + ], + "FJD": [ + "FJD", + "フィジー諸島 ドル" + ], + "FKP": [ + "FKP", + "フォークランド(マルビナス)諸島 ãƒãƒ³ãƒ‰" + ], + "FRF": [ + "FRF", + "フランス フラン" + ], + "GBP": [ + "£", + "英国ãƒãƒ³ãƒ‰" + ], + "GEK": [ + "GEK", + "ジョージア クーãƒãƒ³ ラリ" + ], + "GEL": [ + "GEL", + "ジョージア ラリ" + ], + "GHC": [ + "GHC", + "ガーナ セディ (1979–2007)" + ], + "GHS": [ + "GHS", + "ガーナ セディ" + ], + "GIP": [ + "GIP", + "ジブラルタル ãƒãƒ³ãƒ‰" + ], + "GMD": [ + "GMD", + "ガンビア ダラシ" + ], + "GNF": [ + "GNF", + "ギニア フラン" + ], + "GNS": [ + "GNS", + "ギニア シリー" + ], + "GQE": [ + "GQE", + "赤é“ギニア エクウェレ" + ], + "GRD": [ + "GRD", + "ギリシャ ドラクマ" + ], + "GTQ": [ + "GTQ", + "グアテマラ ケツァル" + ], + "GWE": [ + "GWE", + "ãƒãƒ«ãƒˆã‚¬ãƒ«é ˜ã‚®ãƒ‹ã‚¢ エスクード" + ], + "GWP": [ + "GWP", + "ギニアビサウ ペソ" + ], + "GYD": [ + "GYD", + "ガイアナ ドル" + ], + "HKD": [ + "HK$", + "香港ドル" + ], + "HNL": [ + "HNL", + "ホンジュラス レンピラ" + ], + "HRD": [ + "HRD", + "クロアãƒã‚¢ ディナール" + ], + "HRK": [ + "HRK", + "クロアãƒã‚¢ クーナ" + ], + "HTG": [ + "HTG", + "ãƒã‚¤ãƒ グールド" + ], + "HUF": [ + "HUF", + "ãƒãƒ³ã‚¬ãƒªãƒ¼ フォリント" + ], + "IDR": [ + "IDR", + "インドãƒã‚·ã‚¢ ルピア" + ], + "IEP": [ + "IEP", + "アイリッシュ ãƒãƒ³ãƒ‰" + ], + "ILP": [ + "ILP", + "イスラエル ãƒãƒ³ãƒ‰" + ], + "ILR": [ + "ILR", + "イスラエル シェケル (1980–1985)" + ], + "ILS": [ + "₪", + "イスラエル新シェケル" + ], + "INR": [ + "₹", + "インド ルピー" + ], + "IQD": [ + "IQD", + "イラク ディナール" + ], + "IRR": [ + "IRR", + "イラン リアル" + ], + "ISJ": [ + "ISJ", + "アイスランド クローナ (1918–1981)" + ], + "ISK": [ + "ISK", + "アイスランド クローナ" + ], + "ITL": [ + "ITL", + "イタリア リラ" + ], + "JMD": [ + "JMD", + "ジャマイカ ドル" + ], + "JOD": [ + "JOD", + "ヨルダン ディナール" + ], + "JPY": [ + "ï¿¥", + "日本円" + ], + "KES": [ + "KES", + "ケニア シリング" + ], + "KGS": [ + "KGS", + "キルギスタン ソム" + ], + "KHR": [ + "KHR", + "カンボジア リエル" + ], + "KMF": [ + "KMF", + "コモロ フラン" + ], + "KPW": [ + "KPW", + "北æœé®®ã‚¦ã‚©ãƒ³" + ], + "KRH": [ + "KRH", + "韓国 ファン(1953–1962)" + ], + "KRO": [ + "KRO", + "韓国 ウォン(1945–1953)" + ], + "KRW": [ + "â‚©", + "韓国ウォン" + ], + "KWD": [ + "KWD", + "クウェート ディナール" + ], + "KYD": [ + "KYD", + "ケイマン諸島 ドル" + ], + "KZT": [ + "KZT", + "カザフスタン テンゲ" + ], + "LAK": [ + "LAK", + "ラオス キープ" + ], + "LBP": [ + "LBP", + "レãƒãƒŽãƒ³ ãƒãƒ³ãƒ‰" + ], + "LKR": [ + "LKR", + "スリランカ ルピー" + ], + "LRD": [ + "LRD", + "リベリア ドル" + ], + "LSL": [ + "LSL", + "レソト ロティ" + ], + "LTL": [ + "LTL", + "リトアニア リタス" + ], + "LTT": [ + "LTT", + "リトアニア タロナ" + ], + "LUC": [ + "LUC", + "ルクセンブルク å…Œæ›ãƒ•ラン" + ], + "LUF": [ + "LUF", + "ルクセンブルグ フラン" + ], + "LUL": [ + "LUL", + "ルクセンブルク 金èžãƒ•ラン" + ], + "LVL": [ + "LVL", + "ラトビア ラッツ" + ], + "LVR": [ + "LVR", + "ラトビア ルーブル" + ], + "LYD": [ + "LYD", + "リビア ディナール" + ], + "MAD": [ + "MAD", + "モロッコ ディルãƒãƒ " + ], + "MAF": [ + "MAF", + "モロッコ フラン" + ], + "MCF": [ + "MCF", + "モãƒã‚¬ã‚¹ã‚¯ フラン" + ], + "MDC": [ + "MDC", + "モルドムクーãƒãƒ³" + ], + "MDL": [ + "MDL", + "モルドムレイ" + ], + "MGA": [ + "MGA", + "マダガスカル アリアリ" + ], + "MGF": [ + "MGF", + "マラガシ フラン" + ], + "MKD": [ + "MKD", + "マケドニア デナル" + ], + "MKN": [ + "MKN", + "マケドニア ディナール(1992–1993)" + ], + "MLF": [ + "MLF", + "マリ フラン" + ], + "MMK": [ + "MMK", + "ミャンマー ãƒãƒ£ãƒƒãƒˆ" + ], + "MNT": [ + "MNT", + "モンゴル トグログ" + ], + "MOP": [ + "MOP", + "マカオ パタカ" + ], + "MRO": [ + "MRO", + "モーリタニア ウギア" + ], + "MTL": [ + "MTL", + "マルタ リラ" + ], + "MTP": [ + "MTP", + "マルタ ãƒãƒ³ãƒ‰" + ], + "MUR": [ + "MUR", + "モーリシャス ルピー" + ], + "MVP": [ + "MVP", + "モルディブ諸島 ルピー" + ], + "MVR": [ + "MVR", + "モルディブ諸島 ルフィア" + ], + "MWK": [ + "MWK", + "マラウィ クワãƒãƒ£" + ], + "MXN": [ + "MX$", + "メキシコ ペソ" + ], + "MXP": [ + "MXP", + "メキシコ ペソ (1861–1992)" + ], + "MXV": [ + "MXV", + "メキシコ (UDI)" + ], + "MYR": [ + "MYR", + "マレーシア リンギット" + ], + "MZE": [ + "MZE", + "モザンピーク エスクード" + ], + "MZM": [ + "MZM", + "モザンビーク メティカル (1980–2006)" + ], + "MZN": [ + "MZN", + "モザンビーク メティカル" + ], + "NAD": [ + "NAD", + "ナミビア ドル" + ], + "NGN": [ + "NGN", + "ナイジェリア ナイラ" + ], + "NIC": [ + "NIC", + "ニカラグア コルドム(1988–1991)" + ], + "NIO": [ + "NIO", + "ニカラグア コルドムオロ" + ], + "NLG": [ + "NLG", + "オランダ ギルダー" + ], + "NOK": [ + "NOK", + "ノルウェー クローãƒ" + ], + "NPR": [ + "NPR", + "ãƒãƒ‘ール ルピー" + ], + "NZD": [ + "NZ$", + "ニュージーランド ドル" + ], + "OMR": [ + "OMR", + "オマーン リアル" + ], + "PAB": [ + "PAB", + "パナマ ãƒãƒ«ãƒœã‚¢" + ], + "PEI": [ + "PEI", + "ペルー インティ" + ], + "PEN": [ + "PEN", + "ペルー 新ソル" + ], + "PES": [ + "PES", + "ペルー ソル (1863–1965)" + ], + "PGK": [ + "PGK", + "パプアニューギニア キナ" + ], + "PHP": [ + "PHP", + "フィリピン ペソ" + ], + "PKR": [ + "PKR", + "パキスタン ルピー" + ], + "PLN": [ + "PLN", + "ãƒãƒ¼ãƒ©ãƒ³ãƒ‰ ズウォティ" + ], + "PLZ": [ + "PLZ", + "ãƒãƒ¼ãƒ©ãƒ³ãƒ‰ ズウォティ (1950–1995)" + ], + "PTE": [ + "PTE", + "ãƒãƒ«ãƒˆã‚¬ãƒ« エスクード" + ], + "PYG": [ + "PYG", + "パラグアイ グアラニ" + ], + "QAR": [ + "QAR", + "カタール リアル" + ], + "RHD": [ + "RHD", + "ローデシア ドル" + ], + "ROL": [ + "ROL", + "ルーマニア レイ (1952–2006)" + ], + "RON": [ + "RON", + "ルーマニア レイ" + ], + "RSD": [ + "RSD", + "ディナール (セルビア)" + ], + "RUB": [ + "RUB", + "ロシア ルーブル" + ], + "RUR": [ + "RUR", + "ロシア ルーブル (1991–1998)" + ], + "RWF": [ + "RWF", + "ルワンダ フラン" + ], + "SAR": [ + "SAR", + "サウジ リヤル" + ], + "SBD": [ + "SBD", + "ソロモン諸島 ドル" + ], + "SCR": [ + "SCR", + "セーシェル ルピー" + ], + "SDD": [ + "SDD", + "スーダン ディナール (1992–2007)" + ], + "SDG": [ + "SDG", + "スーダン ãƒãƒ³ãƒ‰" + ], + "SDP": [ + "SDP", + "スーダン ãƒãƒ³ãƒ‰ (1957–1998)" + ], + "SEK": [ + "SEK", + "スウェーデン クローナ" + ], + "SGD": [ + "SGD", + "シンガãƒãƒ¼ãƒ« ドル" + ], + "SHP": [ + "SHP", + "セントヘレナ島 ãƒãƒ³ãƒ‰" + ], + "SIT": [ + "SIT", + "スロベニア トラール" + ], + "SKK": [ + "SKK", + "スロãƒã‚­ã‚¢ コルナ" + ], + "SLL": [ + "SLL", + "シエラレオムレオン" + ], + "SOS": [ + "SOS", + "ソマリア シリング" + ], + "SRD": [ + "SRD", + "スリナム ドル" + ], + "SRG": [ + "SRG", + "スリナム ギルダー" + ], + "SSP": [ + "SSP", + "å—スーダン ãƒãƒ³ãƒ‰" + ], + "STD": [ + "STD", + "サントメ・プリンシペ ドブラ" + ], + "SUR": [ + "SUR", + "ソ連 ルーブル" + ], + "SVC": [ + "SVC", + "エルサルãƒãƒ‰ãƒ« コロン" + ], + "SYP": [ + "SYP", + "シリア ãƒãƒ³ãƒ‰" + ], + "SZL": [ + "SZL", + "スワジランド リランゲニ" + ], + "THB": [ + "THB", + "タイ ãƒãƒ¼ãƒ„" + ], + "TJR": [ + "TJR", + "タジキスタン ルーブル" + ], + "TJS": [ + "TJS", + "タジキスタン ソモニ" + ], + "TMM": [ + "TMM", + "トルクメニスタン マナト (1993–2009)" + ], + "TMT": [ + "TMT", + "トルクメニスタン マナト" + ], + "TND": [ + "TND", + "ãƒãƒ¥ãƒ‹ã‚¸ã‚¢ ディナール" + ], + "TOP": [ + "TOP", + "トンガ パ・アンガ" + ], + "TPE": [ + "TPE", + "ティモール エスクード" + ], + "TRL": [ + "TRL", + "トルコ リラ (1922–2005)" + ], + "TRY": [ + "TRY", + "新トルコリラ" + ], + "TTD": [ + "TTD", + "トリニダードトãƒã‚´ ドル" + ], + "TWD": [ + "NT$", + "æ–°å°æ¹¾ãƒ‰ãƒ«" + ], + "TZS": [ + "TZS", + "タンザニア シリング" + ], + "UAH": [ + "UAH", + "ウクライナ グリブナ" + ], + "UAK": [ + "UAK", + "ウクライナ カルボãƒãƒãƒ„" + ], + "UGS": [ + "UGS", + "ウガンダ シリング (1966–1987)" + ], + "UGX": [ + "UGX", + "ウガンダ シリング" + ], + "USD": [ + "$", + "米ドル" + ], + "USN": [ + "USN", + "米ドル (翌日)" + ], + "USS": [ + "USS", + "米ドル (当日)" + ], + "UYI": [ + "UYI", + "ウルグアイ ペソエン" + ], + "UYP": [ + "UYP", + "ウルグアイ ペソ (1975–1993)" + ], + "UYU": [ + "UYU", + "ウルグアイ ペソ" + ], + "UZS": [ + "UZS", + "ウズベキスタン スム" + ], + "VEB": [ + "VEB", + "ベãƒã‚ºã‚¨ãƒ© ボリãƒãƒ« (1871–2008)" + ], + "VEF": [ + "VEF", + "ベãƒã‚ºã‚¨ãƒ© ボリãƒãƒ«" + ], + "VND": [ + "â‚«", + "ベトナム ドン" + ], + "VNN": [ + "VNN", + "ベトナム ドン(1978–1985)" + ], + "VUV": [ + "VUV", + "ãƒãƒŒã‚¢ãƒ„ ãƒãƒ„" + ], + "WST": [ + "WST", + "サモア タラ" + ], + "XAF": [ + "FCFA", + "中央アフリカ CFA フラン" + ], + "XCD": [ + "EC$", + "æ±ã‚«ãƒªãƒ– ドル" + ], + "XEU": [ + "XEU", + "ヨーロッパ通貨å˜ä½" + ], + "XFO": [ + "XFO", + "フランス金フラン" + ], + "XFU": [ + "XFU", + "フランス フラン (UIC)" + ], + "XOF": [ + "CFA", + "西アフリカ CFA フラン" + ], + "XPF": [ + "CFPF", + "CFP フラン" + ], + "XRE": [ + "XRE", + "RINET基金" + ], + "YDD": [ + "YDD", + "イエメン ディナール" + ], + "YER": [ + "YER", + "イエメン リアル" + ], + "YUD": [ + "YUD", + "ユーゴスラビア ãƒãƒ¼ãƒ‰ãƒ»ãƒ‡ã‚£ãƒŠãƒ¼ãƒ« (1966–1990)" + ], + "YUM": [ + "YUM", + "ユーゴスラビア ノビ・ディナール (1994–2002)" + ], + "YUN": [ + "YUN", + "ユーゴスラビア å…Œæ›ãƒ‡ã‚£ãƒŠãƒ¼ãƒ« (1990–1992)" + ], + "YUR": [ + "YUR", + "ユーゴスラビア 改é©ãƒ‡ã‚£ãƒŠãƒ¼ãƒ«ï¼ˆ1992–1993)" + ], + "ZAL": [ + "ZAL", + "å—アフリカ ランド (ZAL)" + ], + "ZAR": [ + "ZAR", + "å—アフリカ ランド" + ], + "ZMK": [ + "ZMK", + "ザンビア クワãƒãƒ£ (1968–2012)" + ], + "ZMW": [ + "ZMW", + "ザンビア クワãƒãƒ£" + ], + "ZRN": [ + "ZRN", + "ザイール 新ザイール (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "ザイール ザイール (1971–1993)" + ], + "ZWD": [ + "ZWD", + "ジンãƒãƒ–エ ドル (1980–2008)" + ], + "ZWL": [ + "ZWL", + "ジンãƒãƒ–エ ドル (2009)" + ], + "ZWR": [ + "ZWR", + "シンãƒãƒ–エ ドル(2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ka.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ka.json new file mode 100644 index 0000000000000000000000000000000000000000..4c54c0bd40fd03ced254144517a3476f5897bd4e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ka.json @@ -0,0 +1,957 @@ +{ + "Version": "2.1.29.20", + "Names": { + "ADP": [ + "ADP", + "áƒáƒœáƒ“áƒáƒ áƒ£áƒšáƒ˜ პესეტáƒ" + ], + "AED": [ + "AED", + "áƒáƒ áƒáƒ‘თრგáƒáƒ”რთიáƒáƒœáƒ”ბული სáƒáƒáƒ›áƒ˜áƒ áƒáƒ”ბის დირჰáƒáƒ›áƒ˜" + ], + "AFA": [ + "AFA", + "áƒáƒ•ღáƒáƒœáƒ˜ (1927–2002)" + ], + "AFN": [ + "AFN", + "áƒáƒ•ღáƒáƒœáƒ£áƒ áƒ˜ áƒáƒ•ღáƒáƒœáƒ˜" + ], + "ALL": [ + "ALL", + "áƒáƒšáƒ‘áƒáƒœáƒ£áƒ áƒ˜ ლეკი" + ], + "AMD": [ + "AMD", + "სáƒáƒ›áƒ®áƒ£áƒ áƒ˜ დრáƒáƒ›áƒ˜" + ], + "ANG": [ + "ANG", + "ნიდერლáƒáƒœáƒ“ების áƒáƒœáƒ¢áƒ˜áƒšáƒ”ბის გულდენი" + ], + "AOA": [ + "AOA", + "áƒáƒœáƒ’áƒáƒšáƒ£áƒ áƒ˜ კვáƒáƒœáƒ–áƒ" + ], + "AOK": [ + "AOK", + "áƒáƒœáƒ’áƒáƒšáƒ£áƒ áƒ˜ კვáƒáƒœáƒ–რ(1977–1990)" + ], + "AON": [ + "AON", + "áƒáƒœáƒ’áƒáƒšáƒ£áƒ áƒ˜ áƒáƒ®áƒáƒšáƒ˜ კვáƒáƒœáƒ–რ(1990–2000)" + ], + "AOR": [ + "AOR", + "áƒáƒœáƒ’áƒáƒšáƒ£áƒ áƒ˜ მიტáƒáƒšáƒ”ბული კვáƒáƒœáƒ–რ(1995–1999)" + ], + "ARA": [ + "ARA", + "áƒáƒ áƒ’ენტინული áƒáƒ£áƒ¡áƒ¢áƒ áƒáƒšáƒ˜" + ], + "ARP": [ + "ARP", + "áƒáƒ áƒ’ენტინული პესრ(1983–1985)" + ], + "ARS": [ + "ARS", + "áƒáƒ áƒ’ენტინული პესáƒ" + ], + "ATS": [ + "ATS", + "áƒáƒ•სტრიული შილინგი" + ], + "AUD": [ + "AUD", + "áƒáƒ•სტრáƒáƒšáƒ˜áƒ£áƒ áƒ˜ დáƒáƒšáƒáƒ áƒ˜" + ], + "AWG": [ + "AWG", + "áƒáƒ áƒ£áƒ‘áƒáƒœáƒ£áƒšáƒ˜ გულდენი" + ], + "AZM": [ + "AZM", + "áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ£áƒšáƒ˜ მáƒáƒœáƒáƒ—ი (1993–2006)" + ], + "AZN": [ + "AZN", + "áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ£áƒšáƒ˜ მáƒáƒœáƒáƒ—ი" + ], + "BAD": [ + "BAD", + "ბáƒáƒ¡áƒœáƒ˜áƒ-ჰერცáƒáƒ’áƒáƒ•ინáƒáƒ¡ დინáƒáƒ áƒ˜" + ], + "BAM": [ + "BAM", + "ბáƒáƒ¡áƒœáƒ˜áƒ დრჰერცáƒáƒ’áƒáƒ•ინáƒáƒ¡ კáƒáƒœáƒ•ერტირებáƒáƒ“ი მáƒáƒ áƒ™áƒ" + ], + "BBD": [ + "BBD", + "ბáƒáƒ áƒ‘áƒáƒ“áƒáƒ¡áƒ£áƒšáƒ˜ დáƒáƒšáƒáƒ áƒ˜" + ], + "BDT": [ + "BDT", + "ბáƒáƒœáƒ’ლáƒáƒ“ეშური ტáƒáƒ™áƒ" + ], + "BEC": [ + "BEC", + "ბელგიური ფრáƒáƒœáƒ™áƒ˜ (კáƒáƒ•ერტირებáƒáƒ“ი)" + ], + "BEF": [ + "BEF", + "ბელგიური ფრáƒáƒœáƒ™áƒ˜" + ], + "BEL": [ + "BEL", + "ბელგიური ფრáƒáƒœáƒ™áƒ˜ (ფინáƒáƒœáƒ¡áƒ£áƒ áƒ˜)" + ], + "BGL": [ + "BGL", + "ბულგáƒáƒ áƒ£áƒšáƒ˜ მყáƒáƒ áƒ˜ ლევი" + ], + "BGN": [ + "BGN", + "ბულგáƒáƒ áƒ£áƒšáƒ˜ ლევი" + ], + "BHD": [ + "BHD", + "ბáƒáƒ°áƒ áƒ”ინული დინáƒáƒ áƒ˜" + ], + "BIF": [ + "BIF", + "ბურუნდიული ფრáƒáƒœáƒ™áƒ˜" + ], + "BMD": [ + "BMD", + "ბერმუდული დáƒáƒšáƒáƒ áƒ˜" + ], + "BND": [ + "BND", + "ბრუნეული დáƒáƒšáƒáƒ áƒ˜" + ], + "BOB": [ + "BOB", + "ბáƒáƒšáƒ˜áƒ•იური ბáƒáƒšáƒ˜áƒ•იáƒáƒœáƒ" + ], + "BOP": [ + "BOP", + "ბáƒáƒšáƒ˜áƒ•იური პესáƒ" + ], + "BRB": [ + "BRB", + "ბრáƒáƒ–ილიური კრუზეირრნáƒáƒ•რ(1967–1986)" + ], + "BRC": [ + "BRC", + "ბრáƒáƒ–ილიური კრუზáƒáƒ“áƒ" + ], + "BRE": [ + "BRE", + "ბრáƒáƒ–ილიური კრუზეირრ(1990–1993)" + ], + "BRL": [ + "R$", + "ბრáƒáƒ–ილიური რეáƒáƒšáƒ˜" + ], + "BRN": [ + "BRN", + "ბრáƒáƒ–ილიური კრუზáƒáƒ“რნáƒáƒ•áƒ" + ], + "BRR": [ + "BRR", + "ბრáƒáƒ–ილიური კრუზეირáƒ" + ], + "BSD": [ + "BSD", + "ბáƒáƒ°áƒáƒ›áƒ£áƒ áƒ˜ დáƒáƒšáƒáƒ áƒ˜" + ], + "BTN": [ + "BTN", + "ბუტáƒáƒœáƒ£áƒ áƒ˜ ნგულტრუმი" + ], + "BWP": [ + "BWP", + "ბáƒáƒªáƒ•áƒáƒœáƒ£áƒ áƒ˜ პულáƒ" + ], + "BYB": [ + "BYB", + "áƒáƒ®áƒáƒšáƒ˜ ბელáƒáƒ áƒ£áƒ¡áƒ˜áƒ£áƒšáƒ˜ რუბლი (1994–1999)" + ], + "BYN": [ + "BYN", + "ბელáƒáƒ áƒ£áƒ¡áƒ£áƒšáƒ˜ რუბლი" + ], + "BYR": [ + "BYR", + "ბელáƒáƒ áƒ£áƒ¡áƒ£áƒšáƒ˜ რუბლი (2000–2016)" + ], + "BZD": [ + "BZD", + "ბელიზის დáƒáƒšáƒáƒ áƒ˜" + ], + "CAD": [ + "CA$", + "კáƒáƒœáƒáƒ“ური დáƒáƒšáƒáƒ áƒ˜" + ], + "CDF": [ + "CDF", + "კáƒáƒœáƒ’áƒáƒ¡ ფრáƒáƒœáƒ™áƒ˜" + ], + "CHF": [ + "CHF", + "შვეიცáƒáƒ áƒ˜áƒ£áƒšáƒ˜ ფრáƒáƒœáƒ™áƒ˜" + ], + "CLP": [ + "CLP", + "ჩილეს პესáƒ" + ], + "CNY": [ + "CNY", + "ჩინური იუáƒáƒœáƒ˜" + ], + "COP": [ + "COP", + "კáƒáƒšáƒ£áƒ›áƒ‘იური პესáƒ" + ], + "CRC": [ + "CRC", + "კáƒáƒ¡áƒ¢áƒ-რიკული კáƒáƒšáƒáƒœáƒ˜" + ], + "CSD": [ + "CSD", + "ძველი სერბიული დინáƒáƒ áƒ˜" + ], + "CSK": [ + "CSK", + "ჩეხáƒáƒ¡áƒšáƒáƒ•áƒáƒ™áƒ˜áƒ˜áƒ¡ მყáƒáƒ áƒ˜ კრáƒáƒœáƒ" + ], + "CUC": [ + "CUC", + "კუბური კáƒáƒœáƒ•ერტირებáƒáƒ“ი პესáƒ" + ], + "CUP": [ + "CUP", + "კუბური პესáƒ" + ], + "CVE": [ + "CVE", + "კáƒáƒ‘áƒ-ვერდეს ესკუდáƒ" + ], + "CYP": [ + "CYP", + "კვიპრáƒáƒ¡áƒ˜áƒ¡ გირვáƒáƒœáƒ¥áƒ" + ], + "CZK": [ + "CZK", + "ჩეხური კრáƒáƒœáƒ" + ], + "DDM": [ + "DDM", + "áƒáƒ¦áƒ›áƒáƒ¡áƒáƒ•ლეთ გერმáƒáƒœáƒ£áƒšáƒ˜ მáƒáƒ áƒ™áƒ" + ], + "DEM": [ + "DEM", + "გერმáƒáƒœáƒ£áƒšáƒ˜ მáƒáƒ áƒ™áƒ" + ], + "DJF": [ + "DJF", + "ჯიბუტის ფრáƒáƒœáƒ™áƒ˜" + ], + "DKK": [ + "DKK", + "დáƒáƒœáƒ˜áƒ£áƒ áƒ˜ კრáƒáƒœáƒ" + ], + "DOP": [ + "DOP", + "დáƒáƒ›áƒ˜áƒœáƒ˜áƒ™áƒ£áƒ áƒ˜ პესáƒ" + ], + "DZD": [ + "DZD", + "áƒáƒšáƒŸáƒ˜áƒ áƒ£áƒšáƒ˜ დინáƒáƒ áƒ˜" + ], + "EEK": [ + "EEK", + "ესტáƒáƒœáƒ£áƒ áƒ˜ კრუნáƒ" + ], + "EGP": [ + "EGP", + "ეგვიპტური გირვáƒáƒœáƒ¥áƒ" + ], + "ERN": [ + "ERN", + "ერიტრეის ნáƒáƒ™áƒ¤áƒ" + ], + "ESP": [ + "ESP", + "ესპáƒáƒœáƒ£áƒ áƒ˜ პესეტáƒ" + ], + "ETB": [ + "ETB", + "ეთიáƒáƒžáƒ˜áƒ£áƒ áƒ˜ ბირი" + ], + "EUR": [ + "€", + "ევრáƒ" + ], + "FIM": [ + "FIM", + "ფინური მáƒáƒ áƒ™áƒ" + ], + "FJD": [ + "FJD", + "ფიჯის დáƒáƒšáƒáƒ áƒ˜" + ], + "FKP": [ + "FKP", + "ფáƒáƒšáƒ™áƒšáƒ”ნდის კუნძულების ფუნტი" + ], + "FRF": [ + "FRF", + "ფრáƒáƒœáƒ’ული ფრáƒáƒœáƒ™áƒ˜" + ], + "GBP": [ + "£", + "ბრიტáƒáƒœáƒ£áƒšáƒ˜ გირვáƒáƒœáƒ¥áƒ სტერლინგი" + ], + "GEK": [ + "GEK", + "ქáƒáƒ áƒ—ული კუპáƒáƒœáƒ˜ ლáƒáƒ áƒ˜áƒ—" + ], + "GEL": [ + "₾", + "ქáƒáƒ áƒ—ული ლáƒáƒ áƒ˜" + ], + "GHS": [ + "GHS", + "გáƒáƒœáƒ£áƒ áƒ˜ სედი" + ], + "GIP": [ + "GIP", + "გიბრáƒáƒšáƒ¢áƒáƒ áƒ£áƒšáƒ˜ ფუნტი" + ], + "GMD": [ + "GMD", + "გáƒáƒ›áƒ‘იური დáƒáƒšáƒáƒ¡áƒ˜" + ], + "GNF": [ + "GNF", + "გვინეური ფრáƒáƒœáƒ™áƒ˜" + ], + "GRD": [ + "GRD", + "ბერძნული დრáƒáƒ°áƒ›áƒ" + ], + "GTQ": [ + "GTQ", + "გვáƒáƒ¢áƒ”მáƒáƒšáƒ£áƒ áƒ˜ კეტსáƒáƒšáƒ˜" + ], + "GWE": [ + "GWE", + "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ გინერესკუდáƒ" + ], + "GYD": [ + "GYD", + "გáƒáƒ˜áƒáƒœáƒ£áƒ áƒ˜ დáƒáƒšáƒáƒ áƒ˜" + ], + "HKD": [ + "HKD", + "ჰáƒáƒœáƒ™áƒáƒœáƒ’ის დáƒáƒšáƒáƒ áƒ˜" + ], + "HNL": [ + "HNL", + "ჰáƒáƒœáƒ“ურáƒáƒ¡áƒ£áƒšáƒ˜ ლემპირáƒ" + ], + "HRD": [ + "HRD", + "ხáƒáƒ áƒ•áƒáƒ¢áƒ˜áƒ£áƒšáƒ˜ დინáƒáƒ áƒ˜" + ], + "HRK": [ + "HRK", + "ხáƒáƒ áƒ•áƒáƒ¢áƒ£áƒšáƒ˜ კუნáƒ" + ], + "HTG": [ + "HTG", + "ჰáƒáƒ˜áƒ¢áƒ£áƒ áƒ˜ გურდი" + ], + "HUF": [ + "HUF", + "უნგრული ფáƒáƒ áƒ˜áƒœáƒ¢áƒ˜" + ], + "IDR": [ + "IDR", + "ინდáƒáƒœáƒ”ზიური რუპიáƒ" + ], + "IEP": [ + "IEP", + "ირლáƒáƒœáƒ“იური გირვáƒáƒœáƒ¥áƒ" + ], + "ILS": [ + "ILS", + "ისრáƒáƒ”ლის áƒáƒ®áƒáƒšáƒ˜ შეკელი" + ], + "INR": [ + "INR", + "ინდური რუპიáƒ" + ], + "IQD": [ + "IQD", + "ერáƒáƒ§áƒ£áƒšáƒ˜ დინáƒáƒ áƒ˜" + ], + "IRR": [ + "IRR", + "ირáƒáƒœáƒ£áƒšáƒ˜ რიáƒáƒšáƒ˜" + ], + "ISK": [ + "ISK", + "ისლáƒáƒœáƒ“იური კრáƒáƒœáƒ" + ], + "ITL": [ + "ITL", + "იტáƒáƒšáƒ˜áƒ£áƒ áƒ˜ ლირáƒ" + ], + "JMD": [ + "JMD", + "იáƒáƒ›áƒáƒ˜áƒ™áƒ£áƒ áƒ˜ დáƒáƒšáƒáƒ áƒ˜" + ], + "JOD": [ + "JOD", + "იáƒáƒ áƒ“áƒáƒœáƒ˜áƒ£áƒšáƒ˜ დáƒáƒšáƒáƒ áƒ˜" + ], + "JPY": [ + "JPY", + "იáƒáƒžáƒáƒœáƒ£áƒ áƒ˜ იენი" + ], + "KES": [ + "KES", + "კენიური შილინგი" + ], + "KGS": [ + "KGS", + "ყირგიზული სáƒáƒ›áƒ˜" + ], + "KHR": [ + "KHR", + "კáƒáƒ›áƒ‘áƒáƒ¯áƒ£áƒ áƒ˜ რიელი" + ], + "KMF": [ + "KMF", + "კáƒáƒ›áƒáƒ áƒ£áƒšáƒ˜ ფრáƒáƒœáƒ™áƒ˜" + ], + "KPW": [ + "KPW", + "ჩრდილáƒáƒ”თ კáƒáƒ áƒ”ული ვáƒáƒœáƒ˜" + ], + "KRW": [ + "KRW", + "სáƒáƒ›áƒ®áƒ áƒ”თ კáƒáƒ áƒ”ული ვáƒáƒœáƒ˜" + ], + "KWD": [ + "KWD", + "ქუვეითური დინáƒáƒ áƒ˜" + ], + "KYD": [ + "KYD", + "კáƒáƒ˜áƒ›áƒáƒœáƒ˜áƒ¡ კუნძულების დáƒáƒšáƒáƒ áƒ˜" + ], + "KZT": [ + "KZT", + "ყáƒáƒ–áƒáƒ®áƒ£áƒ áƒ˜ ტენგე" + ], + "LAK": [ + "LAK", + "ლáƒáƒáƒ¡áƒ£áƒ áƒ˜ კიპი" + ], + "LBP": [ + "LBP", + "ლიბáƒáƒœáƒ£áƒ áƒ˜ ფუნტი" + ], + "LKR": [ + "LKR", + "შრი-ლáƒáƒœáƒ™áƒ£áƒ áƒ˜ რუპიáƒ" + ], + "LRD": [ + "LRD", + "ლიბერიული დáƒáƒšáƒáƒ áƒ˜" + ], + "LTL": [ + "LTL", + "ლიტვური ლიტáƒ" + ], + "LTT": [ + "LTT", + "ლიტვური ტáƒáƒšáƒáƒœáƒ˜" + ], + "LUC": [ + "LUC", + "ლუქსემბურგის კáƒáƒœáƒ•ერტირებáƒáƒ“ი ფრáƒáƒœáƒ™áƒ˜" + ], + "LUF": [ + "LUF", + "ლუქსემბურგის ფრáƒáƒœáƒ™áƒ˜" + ], + "LUL": [ + "LUL", + "ლუქსემბურგის ფინáƒáƒœáƒ¡áƒ£áƒ áƒ˜ ფრáƒáƒœáƒ™áƒ˜" + ], + "LVL": [ + "LVL", + "ლáƒáƒ¢áƒ•იური ლáƒáƒ¢áƒ˜" + ], + "LVR": [ + "LVR", + "ლáƒáƒ¢áƒ•იური რუბლი" + ], + "LYD": [ + "LYD", + "ლიბიური დინáƒáƒ áƒ˜" + ], + "MAD": [ + "MAD", + "მáƒáƒ áƒáƒ™áƒáƒ¡ დირჰáƒáƒ›áƒ˜" + ], + "MAF": [ + "MAF", + "მáƒáƒ áƒáƒ™áƒáƒ¡ ფრáƒáƒœáƒ™áƒ˜" + ], + "MDL": [ + "MDL", + "მáƒáƒšáƒ“áƒáƒ•ური ლეუ" + ], + "MGA": [ + "MGA", + "მáƒáƒ“áƒáƒ’áƒáƒ¡áƒ™áƒáƒ áƒ˜áƒ¡ áƒáƒ áƒ˜áƒáƒ áƒ˜" + ], + "MGF": [ + "MGF", + "მáƒáƒ“áƒáƒ’áƒáƒ¡áƒ™áƒáƒ áƒ˜áƒ¡ ფრáƒáƒœáƒ™áƒ˜" + ], + "MKD": [ + "MKD", + "მáƒáƒ™áƒ”დáƒáƒœáƒ˜áƒ£áƒ áƒ˜ დინáƒáƒ áƒ˜" + ], + "MLF": [ + "MLF", + "მáƒáƒšáƒ˜áƒ¡ ფრáƒáƒœáƒ™áƒ˜" + ], + "MMK": [ + "MMK", + "მიáƒáƒœáƒ›áƒáƒ áƒ˜áƒ¡ კიáƒáƒ¢áƒ˜" + ], + "MNT": [ + "MNT", + "მáƒáƒœáƒ¦áƒáƒšáƒ£áƒ áƒ˜ ტუგრიკი" + ], + "MOP": [ + "MOP", + "მáƒáƒ™áƒáƒ£áƒ¡ პáƒáƒ¢áƒáƒ™áƒ" + ], + "MRO": [ + "MRO", + "მáƒáƒ•რიტáƒáƒœáƒ£áƒšáƒ˜ უგიáƒ" + ], + "MTL": [ + "MTL", + "მáƒáƒšáƒ¢áƒ˜áƒ¡ ლირáƒ" + ], + "MTP": [ + "MTP", + "მáƒáƒšáƒ¢áƒ˜áƒ¡ გირვáƒáƒœáƒ¥áƒ" + ], + "MUR": [ + "MUR", + "მáƒáƒ•რიტáƒáƒœáƒ£áƒšáƒ˜ რუპიáƒ" + ], + "MVR": [ + "MVR", + "მáƒáƒšáƒ“ივური რუფიáƒ" + ], + "MWK": [ + "MWK", + "მáƒáƒšáƒáƒ•იური კვáƒáƒ©áƒ" + ], + "MXN": [ + "MX$", + "მექსიკური პესáƒ" + ], + "MXP": [ + "MXP", + "მექსიკური ვერცხლის პესრ(1861–1992)" + ], + "MYR": [ + "MYR", + "მáƒáƒšáƒáƒ˜áƒ–იური რინგიტი" + ], + "MZE": [ + "MZE", + "მáƒáƒ–áƒáƒ›áƒ‘იკური ესკუდáƒ" + ], + "MZM": [ + "MZM", + "ძველი მáƒáƒ–áƒáƒ›áƒ‘იკური მეტიკáƒáƒšáƒ˜" + ], + "MZN": [ + "MZN", + "მáƒáƒ–áƒáƒ›áƒ‘იკური მეტიკáƒáƒšáƒ˜" + ], + "NAD": [ + "NAD", + "ნáƒáƒ›áƒ˜áƒ‘იური დáƒáƒšáƒáƒ áƒ˜" + ], + "NGN": [ + "NGN", + "ნიგერიული ნáƒáƒ˜áƒ áƒ" + ], + "NIC": [ + "NIC", + "ნიკáƒáƒ áƒáƒ’უáƒáƒ¡ კáƒáƒ áƒ“áƒáƒ‘áƒ" + ], + "NIO": [ + "NIO", + "ნიკáƒáƒ áƒáƒ’უული კáƒáƒ áƒ“áƒáƒ‘áƒ" + ], + "NLG": [ + "NLG", + "ჰáƒáƒšáƒáƒœáƒ“იური გულდენი" + ], + "NOK": [ + "NOK", + "ნáƒáƒ áƒ•ეგიული კრáƒáƒœáƒ" + ], + "NPR": [ + "NPR", + "ნეპáƒáƒšáƒ£áƒ áƒ˜ რუპიáƒ" + ], + "NZD": [ + "NZD", + "áƒáƒ®áƒáƒšáƒ˜ ზელáƒáƒœáƒ“იის დáƒáƒšáƒáƒ áƒ˜" + ], + "OMR": [ + "OMR", + "áƒáƒ›áƒáƒœáƒ˜áƒ¡ რიáƒáƒšáƒ˜" + ], + "PAB": [ + "PAB", + "პáƒáƒœáƒáƒ›áƒ£áƒ áƒ˜ ბáƒáƒšáƒ‘áƒáƒ" + ], + "PEI": [ + "PEI", + "პერუს ინტი" + ], + "PEN": [ + "PEN", + "პერუს áƒáƒ®áƒáƒšáƒ˜ სáƒáƒšáƒ˜" + ], + "PES": [ + "PES", + "პერუს სáƒáƒšáƒ˜" + ], + "PGK": [ + "PGK", + "პáƒáƒžáƒ£áƒ-áƒáƒ®áƒáƒšáƒ˜ გვინეის კინáƒ" + ], + "PHP": [ + "PHP", + "ფილიპინური პესáƒ" + ], + "PKR": [ + "PKR", + "პáƒáƒ™áƒ˜áƒ¡áƒ¢áƒáƒœáƒ£áƒ áƒ˜ რუპიáƒ" + ], + "PLN": [ + "PLN", + "პáƒáƒšáƒáƒœáƒ£áƒ áƒ˜ ზლáƒáƒ¢áƒ˜" + ], + "PLZ": [ + "PLZ", + "პáƒáƒšáƒáƒœáƒ£áƒ áƒ˜ ზლáƒáƒ¢áƒ˜ (1950–1995)" + ], + "PTE": [ + "PTE", + "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ ესკუდáƒ" + ], + "PYG": [ + "PYG", + "პáƒáƒ áƒáƒ’ვáƒáƒ£áƒšáƒ˜ გუáƒáƒ áƒáƒœáƒ˜" + ], + "QAR": [ + "QAR", + "კáƒáƒ¢áƒáƒ áƒ˜áƒ¡ რიáƒáƒšáƒ˜" + ], + "RHD": [ + "RHD", + "რáƒáƒ“ეზიული დáƒáƒšáƒáƒ áƒ˜" + ], + "ROL": [ + "ROL", + "ძველი რუმინული ლეუ" + ], + "RON": [ + "RON", + "რუმინული ლეუ" + ], + "RSD": [ + "RSD", + "სერბული დინáƒáƒ áƒ˜" + ], + "RUB": [ + "RUB", + "რუსული რუბლი" + ], + "RUR": [ + "RUR", + "რუსული რუბლი (1991–1998)" + ], + "RWF": [ + "RWF", + "რუáƒáƒœáƒ“ული ფრáƒáƒœáƒ™áƒ˜" + ], + "SAR": [ + "SAR", + "სáƒáƒ£áƒ“ის áƒáƒ áƒáƒ‘ეთის რიáƒáƒšáƒ˜" + ], + "SBD": [ + "SBD", + "სáƒáƒšáƒáƒ›áƒáƒœáƒ˜áƒ¡ კუნძულების დáƒáƒšáƒáƒ áƒ˜" + ], + "SCR": [ + "SCR", + "სეიშელური რუპიáƒ" + ], + "SDD": [ + "SDD", + "სუდáƒáƒœáƒ˜áƒ¡ დინáƒáƒ áƒ˜" + ], + "SDG": [ + "SDG", + "სუდáƒáƒœáƒ£áƒ áƒ˜ ფუნტი" + ], + "SDP": [ + "SDP", + "სუდáƒáƒœáƒ˜áƒ¡ გირვáƒáƒœáƒ¥áƒ" + ], + "SEK": [ + "SEK", + "შვედური კრáƒáƒœáƒ" + ], + "SGD": [ + "SGD", + "სინგáƒáƒžáƒ£áƒ áƒ˜áƒ¡ დáƒáƒšáƒáƒ áƒ˜" + ], + "SHP": [ + "SHP", + "წმ. ელენეს კუნძულის ფუნტი" + ], + "SLL": [ + "SLL", + "სიერáƒ-ლეáƒáƒœáƒ”ს ლეáƒáƒœáƒ”" + ], + "SOS": [ + "SOS", + "სáƒáƒ›áƒáƒšáƒ£áƒ áƒ˜ შილინგი" + ], + "SRD": [ + "SRD", + "სურინáƒáƒ›áƒ£áƒšáƒ˜ დáƒáƒšáƒáƒ áƒ˜" + ], + "SRG": [ + "SRG", + "სურინáƒáƒ›áƒ˜áƒ¡ გულდენი" + ], + "SSP": [ + "SSP", + "სáƒáƒ›áƒ®áƒ áƒ”თ სუდáƒáƒœáƒ£áƒ áƒ˜ ფუნტი" + ], + "STD": [ + "STD", + "სáƒáƒœ-ტáƒáƒ›áƒ” დრპრინსიპის დáƒáƒ‘რáƒ" + ], + "SUR": [ + "SUR", + "სáƒáƒ‘ჭáƒáƒ—რრუბლი" + ], + "SYP": [ + "SYP", + "სირიული ფუნტი" + ], + "SZL": [ + "SZL", + "სვáƒáƒ–ილენდის ლილáƒáƒœáƒ’ენი" + ], + "THB": [ + "THB", + "ტáƒáƒ˜áƒšáƒáƒœáƒ“ური ბáƒáƒ¢áƒ˜" + ], + "TJR": [ + "TJR", + "ტáƒáƒ¯áƒ˜áƒ™áƒ£áƒ áƒ˜ რუბლი" + ], + "TJS": [ + "TJS", + "ტáƒáƒ¯áƒ˜áƒ™áƒ£áƒ áƒ˜ სáƒáƒ›áƒáƒœáƒ˜" + ], + "TMM": [ + "TMM", + "თურქმენული მáƒáƒœáƒáƒ—ი" + ], + "TMT": [ + "TMT", + "თურქმენეთის მáƒáƒœáƒáƒ—ი" + ], + "TND": [ + "TND", + "ტუნისური დინáƒáƒ áƒ˜" + ], + "TOP": [ + "TOP", + "ტáƒáƒœáƒ’áƒáƒœáƒ£áƒ áƒ˜ პáƒáƒáƒœáƒ’áƒ" + ], + "TRL": [ + "TRL", + "თურქული ლირáƒ" + ], + "TRY": [ + "TRY", + "áƒáƒ®áƒáƒšáƒ˜ თურქული ლირáƒ" + ], + "TTD": [ + "TTD", + "ტრინიდáƒáƒ“ დრტáƒáƒ‘áƒáƒ’áƒáƒ¡ დáƒáƒšáƒáƒ áƒ˜" + ], + "TWD": [ + "NT$", + "ტáƒáƒ˜áƒ•áƒáƒœáƒ£áƒ áƒ˜ áƒáƒ®áƒáƒšáƒ˜ დáƒáƒšáƒáƒ áƒ˜" + ], + "TZS": [ + "TZS", + "ტáƒáƒœáƒ–áƒáƒœáƒ˜áƒ£áƒ áƒ˜ შილინგი" + ], + "UAH": [ + "UAH", + "უკრáƒáƒ˜áƒœáƒ£áƒšáƒ˜ გრივნáƒ" + ], + "UAK": [ + "UAK", + "უკრáƒáƒ˜áƒœáƒ£áƒšáƒ˜ კáƒáƒ áƒ‘áƒáƒ•áƒáƒœáƒ”ცი" + ], + "UGS": [ + "UGS", + "უგáƒáƒœáƒ“ური შილინგი (1966–1987)" + ], + "UGX": [ + "UGX", + "უგáƒáƒœáƒ“ური შილინგი" + ], + "USD": [ + "US$", + "áƒáƒ¨áƒ¨ დáƒáƒšáƒáƒ áƒ˜" + ], + "USN": [ + "USN", + "áƒáƒ¨áƒ¨ დáƒáƒšáƒáƒ áƒ˜ (შემდეგი დღე)" + ], + "USS": [ + "USS", + "áƒáƒ¨áƒ¨ დáƒáƒšáƒáƒ áƒ˜ (იგივე დღე)" + ], + "UYP": [ + "UYP", + "ურუგვáƒáƒ˜áƒ¡ პესრ(1975–1993)" + ], + "UYU": [ + "UYU", + "ურუგვáƒáƒ˜áƒ¡ პესáƒ" + ], + "UZS": [ + "UZS", + "უზბეკური სუმი" + ], + "VEB": [ + "VEB", + "ვენესუელის ბáƒáƒšáƒ˜áƒ•áƒáƒ áƒ˜ (1871–2008)" + ], + "VEF": [ + "VEF", + "ვენესუელის ბáƒáƒšáƒ˜áƒ•áƒáƒ áƒ˜" + ], + "VND": [ + "VND", + "ვიეტნáƒáƒ›áƒ£áƒ áƒ˜ დáƒáƒœáƒ’ი" + ], + "VUV": [ + "VUV", + "ვáƒáƒœáƒ£áƒáƒ¢áƒ£áƒ¡ ვáƒáƒ¢áƒ£" + ], + "WST": [ + "WST", + "სáƒáƒ›áƒáƒ£áƒ áƒ˜ ტáƒáƒšáƒ" + ], + "XAF": [ + "FCFA", + "ცენტრáƒáƒšáƒ£áƒ  áƒáƒ¤áƒ áƒ˜áƒ™áƒ£áƒšáƒ˜ CFA ფრáƒáƒœáƒ™áƒ˜" + ], + "XCD": [ + "EC$", + "áƒáƒ¦áƒ›áƒáƒ¡áƒáƒ•ლეთ კáƒáƒ áƒ˜áƒ‘იული დáƒáƒšáƒáƒ áƒ˜" + ], + "XEU": [ + "XEU", + "ევრáƒáƒžáƒ£áƒšáƒ˜ სáƒáƒ•áƒáƒšáƒ£áƒ¢áƒ ერთეული" + ], + "XFO": [ + "XFO", + "ფრáƒáƒœáƒ’ული áƒáƒ¥áƒ áƒáƒ¡ ფრáƒáƒœáƒ™áƒ˜" + ], + "XOF": [ + "CFA", + "(CFA) ფრáƒáƒœáƒ™áƒ˜ (BCEAO)" + ], + "XPF": [ + "CFPF", + "CFP ფრáƒáƒœáƒ™áƒ˜" + ], + "YDD": [ + "YDD", + "იემენის დინáƒáƒ áƒ˜" + ], + "YER": [ + "YER", + "იემენის რეáƒáƒšáƒ˜" + ], + "YUD": [ + "YUD", + "იუგáƒáƒ¡áƒšáƒáƒ•იური მყáƒáƒ áƒ˜ დინáƒáƒ áƒ˜" + ], + "YUM": [ + "YUM", + "იუგáƒáƒ¡áƒšáƒáƒ•იური áƒáƒ®áƒáƒšáƒ˜ დინáƒáƒ áƒ˜" + ], + "YUN": [ + "YUN", + "იუგáƒáƒ¡áƒšáƒáƒ•იური კáƒáƒœáƒ•ერტირებáƒáƒ“ი დინáƒáƒ áƒ˜" + ], + "ZAR": [ + "ZAR", + "სáƒáƒ›áƒ®áƒ áƒ”თ áƒáƒ¤áƒ áƒ˜áƒ™áƒ£áƒšáƒ˜ რáƒáƒœáƒ“ი" + ], + "ZMK": [ + "ZMK", + "ზáƒáƒ›áƒ‘იური კვáƒáƒ­áƒ (1968–2012)" + ], + "ZMW": [ + "ZMW", + "ზáƒáƒ›áƒ‘იური კვáƒáƒ­áƒ" + ], + "ZRN": [ + "ZRN", + "ზáƒáƒ˜áƒ áƒ˜áƒ¡ áƒáƒ®áƒáƒšáƒ˜ ზáƒáƒ˜áƒ áƒ˜" + ], + "ZRZ": [ + "ZRZ", + "ზáƒáƒ˜áƒ áƒ˜áƒ¡ ზáƒáƒ˜áƒ áƒ˜" + ], + "ZWD": [ + "ZWD", + "ზიმბáƒáƒ‘ვეს დáƒáƒšáƒáƒ áƒ˜" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ki.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ki.json new file mode 100644 index 0000000000000000000000000000000000000000..ac99bdc302080de6e97f6dbd0be71fae9ae8a0b5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ki.json @@ -0,0 +1,225 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AED": [ + "AED", + "Dirham ya Falme za Kiarabu" + ], + "AOA": [ + "AOA", + "Kwanza ya Angola" + ], + "AUD": [ + "A$", + "Dola ya Australia" + ], + "BHD": [ + "BHD", + "Dinari ya Bahareni" + ], + "BIF": [ + "BIF", + "Faranga ya Burundi" + ], + "BWP": [ + "BWP", + "Pula ya Botswana" + ], + "CAD": [ + "CA$", + "Ndora ya Kananda" + ], + "CDF": [ + "CDF", + "Faranga ya Kongo" + ], + "CHF": [ + "CHF", + "Faranga ya Uswisi" + ], + "CNY": [ + "CNÂ¥", + "Yuan Renminbi ya China" + ], + "CVE": [ + "CVE", + "Eskudo ya Kepuvede" + ], + "DJF": [ + "DJF", + "Faranga ya Jibuti" + ], + "DZD": [ + "DZD", + "Dinari ya Aljeria" + ], + "EGP": [ + "EGP", + "Pauni ya Misri" + ], + "ERN": [ + "ERN", + "Nakfa ya Eritrea" + ], + "ETB": [ + "ETB", + "Bir ya Uhabeshi" + ], + "EUR": [ + "€", + "Yuro" + ], + "GBP": [ + "£", + "Mbauini cia Ngeretha" + ], + "GHC": [ + "GHC", + "Sedi ya Ghana" + ], + "GMD": [ + "GMD", + "Dalasi ya Gambia" + ], + "GNS": [ + "GNS", + "Faranga ya Gine" + ], + "INR": [ + "₹", + "Rubia rwa India" + ], + "JPY": [ + "JPÂ¥", + "Sarafu ya Kijapani" + ], + "KES": [ + "Ksh", + "Ciringi ya Kenya" + ], + "KMF": [ + "KMF", + "Faranga ya Komoro" + ], + "LRD": [ + "LRD", + "Dola ya Liberia" + ], + "LSL": [ + "LSL", + "Loti ya Lesoto" + ], + "LYD": [ + "LYD", + "Dinari ya Libya" + ], + "MAD": [ + "MAD", + "Dirham ya Moroko" + ], + "MGA": [ + "MGA", + "Ariary ya Bukini" + ], + "MRO": [ + "MRO", + "Ugwiya ya Moritania" + ], + "MUR": [ + "MUR", + "Rupia ya Morisi" + ], + "MWK": [ + "MWK", + "Kwacha ya Malawi" + ], + "MZM": [ + "MZM", + "Metikali ya Msumbiji" + ], + "NAD": [ + "NAD", + "Dola ya Namibia" + ], + "NGN": [ + "NGN", + "Naira ya Nijeria" + ], + "RWF": [ + "RWF", + "Faranga ya Rwanda" + ], + "SAR": [ + "SAR", + "Riyal ya Saudia" + ], + "SCR": [ + "SCR", + "Rupia ya Shelisheli" + ], + "SDG": [ + "SDG", + "Pauni ya Sudani" + ], + "SHP": [ + "SHP", + "Pauni ya Santahelena" + ], + "SLL": [ + "SLL", + "Leoni" + ], + "SOS": [ + "SOS", + "ciringi cia cumarÄ©" + ], + "STD": [ + "STD", + "Dobra ya Sao Tome na Principe" + ], + "SZL": [ + "SZL", + "Lilangeni" + ], + "TND": [ + "TND", + "Dinari ya Tunisia" + ], + "TZS": [ + "TZS", + "ciringi cia Tanizania" + ], + "UGX": [ + "UGX", + "ciringi cia Ũganda" + ], + "USD": [ + "US$", + "Ndora cia Amerika" + ], + "XAF": [ + "FCFA", + "Faranga CFA BEAC" + ], + "XOF": [ + "CFA", + "Faranga CFA BCEAO" + ], + "ZAR": [ + "ZAR", + "Randi ya Afrika Kusini" + ], + "ZMK": [ + "ZMK", + "Kwacha ya Zambia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha ya Zambia" + ], + "ZWD": [ + "ZWD", + "Dola ya Zimbabwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/kk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/kk.json new file mode 100644 index 0000000000000000000000000000000000000000..dfd63ff8ce5c35992358b89611f81484495f7baa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/kk.json @@ -0,0 +1,633 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "Біріккен Ðраб Әмірліктерінің дирхамы" + ], + "AFN": [ + "AFN", + "ÐуғанÑтан афганиі" + ], + "ALL": [ + "ALL", + "ÐÐ»Ð±Ð°Ð½Ð¸Ñ Ð»ÐµÐ³Ñ–" + ], + "AMD": [ + "AMD", + "ÐÑ€Ð¼ÐµÐ½Ð¸Ñ Ð´Ñ€Ð°Ð¼Ñ‹" + ], + "ANG": [ + "ANG", + "Ðидерланд антиль гульдені" + ], + "AOA": [ + "AOA", + "Ðнгола кванзаÑÑ‹" + ], + "ARS": [ + "ARS", + "Ðргентина пеÑоÑÑ‹" + ], + "AUD": [ + "A$", + "ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€Ñ‹" + ], + "AWG": [ + "AWG", + "Ðруба флорині" + ], + "AZN": [ + "AZN", + "Әзірбайжан манаты" + ], + "BAM": [ + "BAM", + "БоÑÐ½Ð¸Ñ Ð¶Ó™Ð½Ðµ Герцеговина айырбаÑталмалы маркаÑÑ‹" + ], + "BBD": [ + "BBD", + "Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€Ñ‹" + ], + "BDT": [ + "BDT", + "Бангладеш такаÑÑ‹" + ], + "BGN": [ + "BGN", + "Ð‘Ð¾Ð»Ð³Ð°Ñ€Ð¸Ñ Ð»ÐµÐ²Ñ–" + ], + "BHD": [ + "BHD", + "Бахрейн динары" + ], + "BIF": [ + "BIF", + "Бурунди франкі" + ], + "BMD": [ + "BMD", + "Бермуд доллары" + ], + "BND": [ + "BND", + "Бруней доллары" + ], + "BOB": [ + "BOB", + "Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ Ð±Ð¾Ð»Ð¸Ð²Ð¸Ð°Ð½Ð¾ÑÑ‹" + ], + "BRL": [ + "R$", + "Ð‘Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ Ñ€ÐµÐ°Ð»Ñ‹" + ], + "BSD": [ + "BSD", + "Багам доллары" + ], + "BTN": [ + "BTN", + "Бутан нгултрумы" + ], + "BWP": [ + "BWP", + "БотÑвана пулаÑÑ‹" + ], + "BYN": [ + "BYN", + "БеларуÑÑŒ рублі" + ], + "BYR": [ + "BYR", + "БеларуÑÑŒ рублі (2000–2016)" + ], + "BZD": [ + "BZD", + "Белиз доллары" + ], + "CAD": [ + "CA$", + "Канада доллары" + ], + "CDF": [ + "CDF", + "Конго франкі" + ], + "CHF": [ + "CHF", + "Ð¨Ð²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ Ñ„Ñ€Ð°Ð½ÐºÑ–" + ], + "CLP": [ + "CLP", + "Чили пеÑоÑÑ‹" + ], + "CNY": [ + "CNÂ¥", + "Қытай юані" + ], + "COP": [ + "COP", + "ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ Ð¿ÐµÑоÑÑ‹" + ], + "CRC": [ + "CRC", + "КоÑта-Рика колоны" + ], + "CUC": [ + "CUC", + "Куба айырбаÑталмалы пеÑоÑÑ‹" + ], + "CUP": [ + "CUP", + "Куба пеÑоÑÑ‹" + ], + "CVE": [ + "CVE", + "Кабо-Верде ÑÑкудоÑÑ‹" + ], + "CZK": [ + "CZK", + "Ð§ÐµÑ…Ð¸Ñ ÐºÑ€Ð¾Ð½Ð°ÑÑ‹" + ], + "DJF": [ + "DJF", + "Джибути франкі" + ], + "DKK": [ + "DKK", + "Дат кроны" + ], + "DOP": [ + "DOP", + "Доминикан пеÑоÑÑ‹" + ], + "DZD": [ + "DZD", + "Ðлжир динары" + ], + "EGP": [ + "EGP", + "МыÑыр фунты" + ], + "ERN": [ + "ERN", + "Ð­Ñ€Ð¸Ñ‚Ñ€ÐµÑ Ð½Ð°ÐºÑ„Ð°ÑÑ‹" + ], + "ETB": [ + "ETB", + "Ð­Ñ„Ð¸Ð¾Ð¿Ð¸Ñ Ð±Ñ‹Ñ€Ñ‹" + ], + "EUR": [ + "€", + "Еуро" + ], + "FJD": [ + "FJD", + "Фиджи доллары" + ], + "FKP": [ + "FKP", + "Фолкленд аралдарының фунты" + ], + "GBP": [ + "£", + "Британдық фунт" + ], + "GEL": [ + "GEL", + "Ð“Ñ€ÑƒÐ·Ð¸Ñ Ð»Ð°Ñ€Ð¸Ñ–" + ], + "GHS": [ + "GHS", + "Гана Ñедиі" + ], + "GIP": [ + "GIP", + "Гибралтар фунты" + ], + "GMD": [ + "GMD", + "Ð“Ð°Ð¼Ð±Ð¸Ñ Ð´Ð°Ð»Ð°Ñиі" + ], + "GNF": [ + "GNF", + "Ð“Ð²Ð¸Ð½ÐµÑ Ñ„Ñ€Ð°Ð½ÐºÑ–" + ], + "GTQ": [ + "GTQ", + "Гватемала кетÑалі" + ], + "GYD": [ + "GYD", + "Гайана доллары" + ], + "HKD": [ + "HK$", + "Гонконг доллары" + ], + "HNL": [ + "HNL", + "Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ Ð»ÐµÐ¼Ð¿Ð¸Ñ€Ð°ÑÑ‹" + ], + "HRK": [ + "HRK", + "Ð¥Ð¾Ñ€Ð²Ð°Ñ‚Ð¸Ñ ÐºÑƒÐ½Ð°ÑÑ‹" + ], + "HTG": [ + "HTG", + "Гаити гурды" + ], + "HUF": [ + "HUF", + "Ð’ÐµÐ½Ð³Ñ€Ð¸Ñ Ñ„Ð¾Ñ€Ð¸Ð½Ñ‚Ñ–" + ], + "IDR": [ + "IDR", + "Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ Ñ€ÑƒÐ¿Ð¸ÑÑÑ‹" + ], + "ILS": [ + "₪", + "Израиль жаңа шекелі" + ], + "INR": [ + "₹", + "ҮндіÑтан рупиÑÑÑ‹" + ], + "IQD": [ + "IQD", + "Ирак динары" + ], + "IRR": [ + "IRR", + "Иран риалы" + ], + "ISK": [ + "ISK", + "ИÑÐ»Ð°Ð½Ð´Ð¸Ñ ÐºÑ€Ð¾Ð½Ð°ÑÑ‹" + ], + "JMD": [ + "JMD", + "Ямайка доллары" + ], + "JOD": [ + "JOD", + "Ð˜Ð¾Ñ€Ð´Ð°Ð½Ð¸Ñ Ð´Ð¸Ð½Ð°Ñ€Ñ‹" + ], + "JPY": [ + "JPÂ¥", + "Ð–Ð°Ð¿Ð¾Ð½Ð¸Ñ Ð¸ÐµÐ½Ð°ÑÑ‹" + ], + "KES": [ + "KES", + "ÐšÐµÐ½Ð¸Ñ ÑˆÐ¸Ð»Ð»Ð¸Ð½Ð³Ñ–" + ], + "KGS": [ + "KGS", + "ҚырғызÑтан Ñомы" + ], + "KHR": [ + "KHR", + "Камбоджа риелі" + ], + "KMF": [ + "KMF", + "Комор аралдары франкі" + ], + "KPW": [ + "KPW", + "СолтүÑтік ÐšÐ¾Ñ€ÐµÑ Ð²Ð¾Ð½Ñ‹" + ], + "KRW": [ + "â‚©", + "ОңтүÑтік ÐšÐ¾Ñ€ÐµÑ Ð²Ð¾Ð½Ñ‹" + ], + "KWD": [ + "KWD", + "Кувейт динары" + ], + "KYD": [ + "KYD", + "Кайман аралдары доллары" + ], + "KZT": [ + "₸", + "ҚазақÑтан теңгеÑÑ–" + ], + "LAK": [ + "LAK", + "Ð›Ð°Ð¾Ñ ÐºÐ¸Ð¿Ñ–" + ], + "LBP": [ + "LBP", + "Ливан фунты" + ], + "LKR": [ + "LKR", + "Шри-Ланка рупиÑÑÑ‹" + ], + "LRD": [ + "LRD", + "Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€Ñ‹" + ], + "LTL": [ + "LTL", + "Литва литы" + ], + "LVL": [ + "LVL", + "Ð›Ð°Ñ‚Ð²Ð¸Ñ Ð»Ð°Ñ‚Ñ‹" + ], + "LYD": [ + "LYD", + "Ð›Ð¸Ð²Ð¸Ñ Ð´Ð¸Ð½Ð°Ñ€Ñ‹" + ], + "MAD": [ + "MAD", + "Марокко дирхамы" + ], + "MDL": [ + "MDL", + "Молдова лейі" + ], + "MGA": [ + "MGA", + "МалагаÑи ариариі" + ], + "MKD": [ + "MKD", + "ÐœÐ°ÐºÐµÐ´Ð¾Ð½Ð¸Ñ Ð´Ð¸Ð½Ð°Ñ€Ñ‹" + ], + "MMK": [ + "MMK", + "МьÑнма кьÑты" + ], + "MNT": [ + "MNT", + "ÐœÐ¾Ò£Ò“Ð¾Ð»Ð¸Ñ Ñ‚ÑƒÐ³Ñ€Ð¸Ð³Ñ–" + ], + "MOP": [ + "MOP", + "Макао патакаÑÑ‹" + ], + "MRO": [ + "MRO", + "ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ ÑƒÐ³Ð¸ÑÑÑ‹" + ], + "MUR": [ + "MUR", + "Маврикий рупиÑÑÑ‹" + ], + "MVR": [ + "MVR", + "Мальдив руфиÑÑÑ‹" + ], + "MWK": [ + "MWK", + "Малави квачаÑÑ‹" + ], + "MXN": [ + "MX$", + "МекÑика пеÑоÑÑ‹" + ], + "MYR": [ + "MYR", + "ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ Ñ€Ð¸Ð½Ð³Ð³Ð¸Ñ‚Ñ–" + ], + "MZN": [ + "MZN", + "Мозамбик метикалы" + ], + "NAD": [ + "NAD", + "ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€Ñ‹" + ], + "NGN": [ + "NGN", + "ÐÐ¸Ð³ÐµÑ€Ð¸Ñ Ð½Ð°Ð¹Ñ€Ð°ÑÑ‹" + ], + "NIO": [ + "NIO", + "Ðикарагуа кордобаÑÑ‹" + ], + "NOK": [ + "NOK", + "ÐÐ¾Ñ€Ð²ÐµÐ³Ð¸Ñ ÐºÑ€Ð¾Ð½Ñ‹" + ], + "NPR": [ + "NPR", + "Ðепал рупиÑÑÑ‹" + ], + "NZD": [ + "NZ$", + "Жаңа Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€Ñ‹" + ], + "OMR": [ + "OMR", + "Оман риалы" + ], + "PAB": [ + "PAB", + "Панама бальбоаÑÑ‹" + ], + "PEN": [ + "PEN", + "Перу жаңа Ñолі" + ], + "PGK": [ + "PGK", + "Папуа - Жаңа Ð“Ð²Ð¸Ð½ÐµÑ ÐºÐ¸Ð½Ð°ÑÑ‹" + ], + "PHP": [ + "PHP", + "Филиппин пеÑоÑÑ‹" + ], + "PKR": [ + "PKR", + "ПәкіÑтан рупиÑÑÑ‹" + ], + "PLN": [ + "PLN", + "Польша злотаÑÑ‹" + ], + "PYG": [ + "PYG", + "Парагвай гуараниі" + ], + "QAR": [ + "QAR", + "Катар риалы" + ], + "RON": [ + "RON", + "Ð ÑƒÐ¼Ñ‹Ð½Ð¸Ñ Ð»ÐµÐ¹Ñ–" + ], + "RSD": [ + "RSD", + "Ð¡ÐµÑ€Ð±Ð¸Ñ Ð´Ð¸Ð½Ð°Ñ€Ñ‹" + ], + "RUB": [ + "₽", + "РеÑей рублі" + ], + "RWF": [ + "RWF", + "Руанда франкі" + ], + "SAR": [ + "SAR", + "Сауд ÐрабиÑÑының риалы" + ], + "SBD": [ + "SBD", + "Соломон аралдары доллары" + ], + "SCR": [ + "SCR", + "Сейшель рупиÑÑÑ‹" + ], + "SDG": [ + "SDG", + "Судан фунты" + ], + "SEK": [ + "SEK", + "Ð¨Ð²ÐµÑ†Ð¸Ñ ÐºÑ€Ð¾Ð½Ñ‹" + ], + "SGD": [ + "SGD", + "Сингапур доллары" + ], + "SHP": [ + "SHP", + "Әулие Елена аралы фунты" + ], + "SLL": [ + "SLL", + "Сьерра-Леоне леонеÑÑ–" + ], + "SOS": [ + "SOS", + "Сомали шиллингі" + ], + "SRD": [ + "SRD", + "Суринам доллары" + ], + "SSP": [ + "SSP", + "ОңтүÑтік Судан фунты" + ], + "STD": [ + "STD", + "Сант-Томе мен ПринÑипи добраÑÑ‹" + ], + "SYP": [ + "SYP", + "Ð¡Ð¸Ñ€Ð¸Ñ Ñ„ÑƒÐ½Ñ‚Ñ‹" + ], + "SZL": [ + "SZL", + "Свазиленд лилангениі" + ], + "THB": [ + "฿", + "Тай баты" + ], + "TJS": [ + "TJS", + "ТәжікÑтан Ñомониі" + ], + "TMT": [ + "TMT", + "ТүрікменÑтан манаты" + ], + "TND": [ + "TND", + "Ð¢ÑƒÐ½Ð¸Ñ Ð´Ð¸Ð½Ð°Ñ€Ñ‹" + ], + "TOP": [ + "TOP", + "Тонга паангаÑÑ‹" + ], + "TRY": [ + "TRY", + "Түрік лираÑÑ‹" + ], + "TTD": [ + "TTD", + "Тринидад және Тобаго доллары" + ], + "TWD": [ + "NT$", + "Жаңа Тайван доллары" + ], + "TZS": [ + "TZS", + "Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ ÑˆÐ¸Ð»Ð»Ð¸Ð½Ð³Ñ–" + ], + "UAH": [ + "UAH", + "Украина гривнаÑÑ‹" + ], + "UGX": [ + "UGX", + "Уганда шиллингі" + ], + "USD": [ + "$", + "ÐҚШ доллары" + ], + "UYU": [ + "UYU", + "Уругвай пеÑоÑÑ‹" + ], + "UZS": [ + "UZS", + "ӨзбекÑтан Ñомы" + ], + "VEF": [ + "VEF", + "ВенеÑуÑла боливары" + ], + "VND": [ + "â‚«", + "Вьетнам донгі" + ], + "VUV": [ + "VUV", + "Вануату ватуы" + ], + "WST": [ + "WST", + "Самоа талаÑÑ‹" + ], + "XAF": [ + "FCFA", + "КФРВЕÐС франкі" + ], + "XCD": [ + "EC$", + "Ð¨Ñ‹Ò“Ñ‹Ñ ÐšÐ°Ñ€Ð¸Ð± доллары" + ], + "XOF": [ + "CFA", + "КФРВСЕÐО франкі" + ], + "XPF": [ + "CFPF", + "КФП франкі" + ], + "YER": [ + "YER", + "Йемен риалы" + ], + "ZAR": [ + "ZAR", + "ОңтүÑтік Ðфрика Ñ€Ñнді" + ], + "ZMW": [ + "ZMW", + "Ð—Ð°Ð¼Ð±Ð¸Ñ ÐºÐ²Ð°Ñ‡Ð°ÑÑ‹" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/kl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/kl.json new file mode 100644 index 0000000000000000000000000000000000000000..d52d7254eb2b7fdeed44d565afba120d9440ac5d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/kl.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "DKK": [ + "kr.", + "DKK" + ], + "EUR": [ + "€", + "euro" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/km.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/km.json new file mode 100644 index 0000000000000000000000000000000000000000..1a9778b6f1e4e365522d9c89810f50c9c70dd077 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/km.json @@ -0,0 +1,637 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "ឌៀរហាំ​អារ៉ាប់រួម" + ], + "AFN": [ + "AFN", + "អាហ្វហ្គានី​អាហ្វហ្គានីស្ážáž¶áž“" + ], + "ALL": [ + "ALL", + "លិក​អាល់បានី" + ], + "AMD": [ + "AMD", + "ដ្រាំ​អាមáŸáž“ី" + ], + "ANG": [ + "ANG", + "ហ្គីឌិន​ហុល្លង់​អង់ទីលៀន" + ], + "AOA": [ + "AOA", + "ក្វាន់ហ្សា​អង់ហ្គោឡា" + ], + "ARS": [ + "ARS", + "ប៉áŸážŸáž½áž¢áž¶áž áŸ’សង់ទីន" + ], + "AUD": [ + "A$", + "ដុល្លារ​អូស្ážáŸ’រាលី" + ], + "AWG": [ + "AWG", + "ហ្វ្រáŸážšážšáž·áž‰â€‹áž¢áž¶ážšáŸ‰áž¼áž”áž¶" + ], + "AZN": [ + "AZN", + "ម៉ាណាážâ€‹áž¢áž¶ážŸáŸŠáŸ‚បៃហ្សង់" + ], + "BAM": [ + "BAM", + "ម៉ាក​អាច​បម្លែង​បាន​បូស្នី" + ], + "BBD": [ + "BBD", + "ដុល្លារ​បាបាដុស" + ], + "BDT": [ + "BDT", + "ážáž¶áž€áž¶â€‹áž”ង់ក្លាដែស" + ], + "BGN": [ + "BGN", + "លីវ​ប៊ុលហ្គារី" + ], + "BHD": [ + "BHD", + "ឌីណា​បារ៉ែន" + ], + "BIF": [ + "BIF", + "ហ្វ្រង់​ប៊ូរុនឌី" + ], + "BMD": [ + "BMD", + "ដុល្លារ​ប៊ឺមុយដា" + ], + "BND": [ + "BND", + "ដុល្លារ​ប្រុយណáŸ" + ], + "BOB": [ + "BOB", + "បូលីវីណូ​បូលីវី" + ], + "BRL": [ + "R$", + "រៀល​ប្រáŸážŸáŸŠáž¸áž›" + ], + "BSD": [ + "BSD", + "ដុល្លារ​បាហាម៉ា" + ], + "BTN": [ + "BTN", + "ញូលážáŸ’រឹម​ប៊ូážáž¶áž“" + ], + "BWP": [ + "BWP", + "ពូឡា​បុážážŸáŸ’វាណា" + ], + "BYN": [ + "BYN", + "រ៉ូបល​បáŸáž¡áž¶ážšáž»ážŸ" + ], + "BYR": [ + "BYR", + "រ៉ូបល​បáŸáž¡áž¶ážšáž»ážŸ (2000–2016)" + ], + "BZD": [ + "BZD", + "ដុល្លារ​បáŸáž›áž¸" + ], + "CAD": [ + "CA$", + "ដុល្លារ​កាណាដា" + ], + "CDF": [ + "CDF", + "ហ្វ្រង់​កុងហ្គោ" + ], + "CHF": [ + "CHF", + "ហ្វ្រង់ស្វីស" + ], + "CLP": [ + "CLP", + "ប៉áŸážŸáž¼ážˆáž¸áž›áž¸" + ], + "CNY": [ + "CNÂ¥", + "យ៉ន់​ចិន" + ], + "COP": [ + "COP", + "ប៉áŸážŸáž¼áž€áž¼áž¡áž»áŸ†áž”៊ី" + ], + "CRC": [ + "CRC", + "កូឡុង​កូស្ážáž¶ážšáž¸áž€áž¶" + ], + "CUC": [ + "CUC", + "ប៉áŸážŸáž¼â€‹áž‚ុយបាអាច​បម្លែង​បាន" + ], + "CUP": [ + "CUP", + "ប៉áŸážŸáž¼áž‚ុយបា" + ], + "CVE": [ + "CVE", + "អ៊ីស្កូឌូ​កាប់វែរ" + ], + "CZK": [ + "CZK", + "កូរុណា​សាធារណៈ​ឆáŸáž€" + ], + "DJF": [ + "DJF", + "ហ្វ្រង់​ជីប៊ូទី" + ], + "DKK": [ + "DKK", + "ក្រូណáŸâ€‹ážŠáž¶ážŽáž¶áž˜áŸ‰áž¶áž€áŸ‹" + ], + "DOP": [ + "DOP", + "ប៉áŸážŸáž¼ážŠáž¼áž˜áž¸áž“ីក" + ], + "DZD": [ + "DZD", + "ឌីណា​អាល់ស៊áŸážšáž¸" + ], + "EGP": [ + "EGP", + "ផោនអáŸáž áŸ’ស៊ីប" + ], + "ERN": [ + "ERN", + "ណាក់ហ្វាអáŸážšáž¸áž‘្រា" + ], + "ETB": [ + "ETB", + "ប៊áŸážšâ€‹áž¢áŸážáŸ’យូពី" + ], + "EUR": [ + "€", + "អឺរ៉ូ" + ], + "FJD": [ + "FJD", + "ដុល្លារ​ហ្វីជី" + ], + "FKP": [ + "FKP", + "ផោន​កោះ​ហ្វក់ឡែន" + ], + "GBP": [ + "£", + "ផោនចក្រភពអង់គ្លáŸážŸ" + ], + "GEL": [ + "GEL", + "ឡារី​​ហ្សកហ្ស៊ី" + ], + "GHS": [ + "GHS", + "ស៊ីឌី​ហ្គាណា" + ], + "GIP": [ + "GIP", + "ផោន​ហ្ស៊ីប្រាល់ážáž¶" + ], + "GMD": [ + "GMD", + "ដាឡាស៊ី​ហ្គាំប៊ី" + ], + "GNF": [ + "GNF", + "ហ្វ្រង់​ហ្គីណáŸ" + ], + "GTQ": [ + "GTQ", + "ហ្គីស្សាល​ក្វាážáŸáž˜áŸ‰áž¶áž¡áž¶" + ], + "GYD": [ + "GYD", + "ដុល្លារ​ហ្គីយ៉ាន" + ], + "HKD": [ + "HK$", + "ដុល្លារ​ហុងកុង" + ], + "HNL": [ + "HNL", + "លិមពីរ៉ា​ហុងឌូរ៉ាស" + ], + "HRK": [ + "HRK", + "គូណា​ក្រូអាáž" + ], + "HTG": [ + "HTG", + "គោឌី​ហៃទី" + ], + "HUF": [ + "HUF", + "ហ្វូរីន​ហុងគ្រី" + ], + "IDR": [ + "IDR", + "រូពីឥណ្ឌូណáŸážŸáŸŠáž¸" + ], + "ILS": [ + "₪", + "ស៊ីគែលážáŸ’មីអ៊ីស្រាអែល" + ], + "INR": [ + "₹", + "រូពីឥណ្ឌា" + ], + "IQD": [ + "IQD", + "ឌីណា​អ៊ីរ៉ាក់" + ], + "IRR": [ + "IRR", + "រៀល​អ៊ីរ៉ង់" + ], + "ISK": [ + "ISK", + "ក្រូណា​អ៊ីស្លង់" + ], + "JMD": [ + "JMD", + "ដុល្លារ​ហ្សាម៉ាអ៊ីក" + ], + "JOD": [ + "JOD", + "ឌីណា​ហ្ស៊កដានី" + ], + "JPY": [ + "JPÂ¥", + "áž™áŸáž“​ជប៉ុន" + ], + "KES": [ + "KES", + "ស៊ីលិញ​កáŸáž“យ៉ា" + ], + "KGS": [ + "KGS", + "សុម​កៀហ្ស៊ីស៊ីស្ážáž¶áž“" + ], + "KHR": [ + "៛", + "រៀល​កម្ពុជា" + ], + "KMF": [ + "KMF", + "ហ្វ្រង់​កូមáŸážš" + ], + "KPW": [ + "KPW", + "វ៉ុនកូរ៉áŸážáž¶áž„ជើង" + ], + "KRW": [ + "â‚©", + "វ៉ុនកូរ៉áŸážáž¶áž„ážáŸ’បូង" + ], + "KWD": [ + "KWD", + "ឌីណា​គុយវ៉ែáž" + ], + "KYD": [ + "KYD", + "ដុល្លារ​កោះ​កៃម៉ែន" + ], + "KZT": [ + "KZT", + "ážáž„់ហ្គី​កាហ្សាក់ស្ážáž¶áž“" + ], + "LAK": [ + "LAK", + "គីប​ឡាវ" + ], + "LBP": [ + "LBP", + "ផោន​លីបង់" + ], + "LKR": [ + "LKR", + "រូពីស្រីលង្កា" + ], + "LRD": [ + "LRD", + "ដុល្លារ​លីប៊ី" + ], + "LTL": [ + "LTL", + "លីážáž¶â€‹áž›áž¸áž‘ុយអានី" + ], + "LVL": [ + "LVL", + "ឡាážáŸ‹â€‹áž¡áŸážáž¼áž“ី" + ], + "LYD": [ + "LYD", + "ឌីណា​លីប៊ី" + ], + "MAD": [ + "MAD", + "ឌៀរហាំ​ម៉ារ៉ុក" + ], + "MDL": [ + "MDL", + "លូ​ម៉ុលដាវី" + ], + "MGA": [ + "MGA", + "អារៀរី​ម៉ាឡាហ្គាស៊ី" + ], + "MKD": [ + "MKD", + "ឌីណាម៉ាសáŸážŠáž¼áž“ី" + ], + "MMK": [ + "MMK", + "គីយ៉ាážâ€‹áž—ូមា" + ], + "MNT": [ + "MNT", + "ទូរីក​ម៉ុងហ្គោលី" + ], + "MOP": [ + "MOP", + "ប៉ាážáž¶áž€áž¶â€‹áž˜áŸ‰áž¶áž€áž¶ážœ" + ], + "MRO": [ + "MRO", + "អ៊ូហ្គីយ៉ា​ម៉ូរីážáž¶áž“ី" + ], + "MUR": [ + "MUR", + "រូពីម៉ូរីážáž¶áž“ី" + ], + "MVR": [ + "MVR", + "រ៉ូហ្វីយ៉ា​ម៉ាល់ឌីវ" + ], + "MWK": [ + "MWK", + "ក្វាចា​ម៉ាឡាវី" + ], + "MXN": [ + "MX$", + "ប៉áŸážŸáž¼áž˜áŸ‰áž·áž€ážŸáž·áž€" + ], + "MYR": [ + "MYR", + "រីងហ្គីážâ€‹áž˜áŸ‰áž¶áž¡áŸážŸáŸŠáž¸" + ], + "MZN": [ + "MZN", + "មីទីážáž›â€‹áž˜áŸ‰áž¼ážŸáŸ†áž”៊ិក" + ], + "NAD": [ + "NAD", + "ដុល្លារ​ណាមីប៊ី" + ], + "NGN": [ + "NGN", + "ណៃរ៉ា​នីហ្សáŸážšáž¸áž™áŸ‰áž¶" + ], + "NIO": [ + "NIO", + "ážážŒáž¼áž”ា​នីការ៉ាហ្គា" + ], + "NOK": [ + "NOK", + "ក្រូណáŸâ€‹áž“áŸážšážœáŸ‰áŸ" + ], + "NPR": [ + "NPR", + "រូពីនáŸáž”៉ាល់" + ], + "NZD": [ + "NZ$", + "ដុល្លារ​នូវែលសáŸáž¡áž„់" + ], + "OMR": [ + "OMR", + "រៀល​រូម៉ានី" + ], + "PAB": [ + "PAB", + "បាល់ប៉ៅ​ប៉ាណាម៉ា" + ], + "PEN": [ + "PEN", + "ញូវ៉ូសូល​ប៉áŸážšáž¼" + ], + "PGK": [ + "PGK", + "គីណាប៉ាពួញូហ្គីណáŸ" + ], + "PHP": [ + "PHP", + "ប៉áŸážŸáž¼áž áŸ’វីលីពីន" + ], + "PKR": [ + "PKR", + "រូពីប៉ាគីស្ážáž¶áž“" + ], + "PLN": [ + "PLN", + "ហ្សូទី​ប៉ូឡូញ" + ], + "PYG": [ + "PYG", + "ហ្គូរីនី​ប៉ារ៉ាហ្គាយ" + ], + "QAR": [ + "QAR", + "រៀល​កាážáž¶" + ], + "RON": [ + "RON", + "លូ​រូម៉ានី" + ], + "RSD": [ + "RSD", + "ឌីណាស៊ែប" + ], + "RUB": [ + "RUB", + "រ៉ូបល​រុស្ស៊ី" + ], + "RWF": [ + "RWF", + "ហ្វ្រង់​រវ៉ាន់ដា" + ], + "SAR": [ + "SAR", + "រីយ៉ាល​អារ៉ាប៊ីសាអូឌីáž" + ], + "SBD": [ + "SBD", + "ដុល្លារ​កោះ​សូឡូម៉ុង" + ], + "SCR": [ + "SCR", + "រូពី​សីស្ហែល" + ], + "SDG": [ + "SDG", + "ផោន​ស៊ូដង់" + ], + "SEK": [ + "SEK", + "ក្រូណា​ស៊ុយអែáž" + ], + "SGD": [ + "SGD", + "ដុល្លារ​​សិង្ហបូរី" + ], + "SHP": [ + "SHP", + "ផោន​សាំងហáŸáž¡áŸážŽáž¶" + ], + "SLL": [ + "SLL", + "លីអ៊ុន​សៀរ៉ាឡáŸáž¢áž¼áž“" + ], + "SOS": [ + "SOS", + "ស៊ីលិញ​សូម៉ាលី" + ], + "SRD": [ + "SRD", + "ដុល្លារ​សូរីណាម" + ], + "SSP": [ + "SSP", + "ផោន​ស៊ូដង់​ážáž¶áž„​ážáŸ’បូង" + ], + "STD": [ + "STD", + "ឌូប្រា​សៅážáž¼áž˜áŸ‰áŸ និងប្រាំងស៊ីប" + ], + "SYP": [ + "SYP", + "ផោន​ស៊ីរី" + ], + "SZL": [ + "SZL", + "លីឡាងហ្គីនី​ស្វាស៊ីឡង់" + ], + "THB": [ + "฿", + "បាážâ€‹ážáŸƒ" + ], + "TJS": [ + "TJS", + "សូមុនី​ážáž¶áž áŸ’ស៊ីគីស្ážáž¶áž“" + ], + "TMT": [ + "TMT", + "ម៉ាណាážâ€‹ážáž½áž€áž˜áŸ‰áŸáž“ីស្ážáž¶áž“" + ], + "TND": [ + "TND", + "ឌីណាទុយនáŸážŸáŸŠáž¸" + ], + "TOP": [ + "TOP", + "ប៉ាអង់កា​ážáž»áž„ហ្គា" + ], + "TRY": [ + "TRY", + "លីរ៉ាទួរគី" + ], + "TTD": [ + "TTD", + "ដុល្លារ​ទ្រីនីដាដ និងážáž¼áž”ាហ្គោ" + ], + "TWD": [ + "NT$", + "ដុល្លារ​ážáŸƒážœáŸ‰áž¶áž“់" + ], + "TZS": [ + "TZS", + "ស៊ីលិញ​ážáž„់សានី" + ], + "UAH": [ + "UAH", + "ហ៊ូនីយ៉ា​អ៊ុយក្រែន" + ], + "UGX": [ + "UGX", + "ស៊ីលិញ​អ៊ូហ្គង់ដា" + ], + "USD": [ + "$", + "ដុល្លារ​អាមáŸážšáž·áž€" + ], + "UYU": [ + "UYU", + "ប៉áŸážŸáž¼áž¢áŸŠáž»áž™ážšáž¼áž áŸ’គាយ" + ], + "UZS": [ + "UZS", + "សុមអ៊ូបáŸáž‚ីស្ážáž¶áž“" + ], + "VEF": [ + "VEF", + "ប៊ូលីវ៉ា​វ៉áŸážŽáŸážŸáŸŠáž»áž™áž¢áŸáž¡áž¶" + ], + "VND": [ + "â‚«", + "ដុង​វៀážážŽáž¶áž˜" + ], + "VUV": [ + "VUV", + "វ៉ាទូវ៉ានូអាទូ" + ], + "WST": [ + "WST", + "ážáž¶áž¡áž¶â€‹ážŸáž¶áž˜áŸážš" + ], + "XAF": [ + "FCFA", + "ហ្វ្រង់ CFA អាហ្វ្រិកកណ្ážáž¶áž›" + ], + "XCD": [ + "EC$", + "ដុល្លារ​ការ៉ាប៊ីន​ážáž¶áž„​កើáž" + ], + "XOF": [ + "CFA", + "ហ្វ្រង់ CFA អាហ្វ្រិកážáž¶áž„លិច" + ], + "XPF": [ + "CFPF", + "ហ្វ្រង់ CFP" + ], + "YER": [ + "YER", + "រៀល​យáŸáž˜áŸ‰áŸ‚áž“" + ], + "ZAR": [ + "ZAR", + "រ៉ង់អាហ្វ្រិកážáž¶áž„ážáŸ’បូង" + ], + "ZMK": [ + "ZMK", + "ក្វាចា សំប៊ី (1968–2012)" + ], + "ZMW": [ + "ZMW", + "ក្វាចាហ្សំប៊ី" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/kn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/kn.json new file mode 100644 index 0000000000000000000000000000000000000000..435d3a9ad96a7cdb217f00f2be68355cc13f8a61 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/kn.json @@ -0,0 +1,641 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "ಸಂಯà³à²•à³à²¤ ಅರಬà³â€Œ ಎಮಿರೇಟà³â€Œâ€Œà²—ಳ ದಿರಾಮà³â€Œâ€Œ" + ], + "AFN": [ + "AFN", + "ಅಫà³â€Œà²˜à²¨à³ ಅಫಗಾನಿ" + ], + "ALL": [ + "ALL", + "ಅಲà³â€Œà²¬à³‡à²¨à²¿à²¯à²¨à³ ಲೆಕà³" + ], + "AMD": [ + "AMD", + "ಅರà³à²®à³†à²¨à²¿à²¯à²¨à³ ಡà³à²°à²¾à²®à³" + ], + "ANG": [ + "ANG", + "ನೆದರà³à²²à³†à²‚ಡà³à²¸à³ ಆಂಟಿಲಿಯನೠಗಿಲà³à²¡à²°à³" + ], + "AOA": [ + "AOA", + "ಅಂಗೋಲಾದ ಕà³à²µà²¾à²¨à³à²à²¾" + ], + "ARS": [ + "ARS", + "ಅರà³à²œà³†à²‚ಟಿನಾ ಪೆಸೊ" + ], + "AUD": [ + "A$", + "ಆಸà³à²Ÿà³à²°à³‡à²²à²¿à²¯à²¨à³ ಡಾಲರà³â€Œ" + ], + "AWG": [ + "AWG", + "ಅರà³à²¬à²¨à³ ಫà³à²²à³Šà²°à³€à²¨à³â€Œâ€Œ" + ], + "AZN": [ + "AZN", + "ಅà²à²°à³â€Œà²¬à³ˆà²œà²¾à²¨à²¿ ಮನಾತà³" + ], + "BAM": [ + "BAM", + "ಬೋಸà³à²¨à²¿à²¯à²¾-ಹರà³à²œà³â€Œà²—ೋವಿನ ಪರಿವರà³à²¤à²¨à³€à²¯ ಗà³à²°à³à²¤à³" + ], + "BBD": [ + "BBD", + "ಬರà³à²¬à²¾à²¡à²¿à²¯à²¨à³ ಡಾಲರà³" + ], + "BDT": [ + "BDT", + "ಬಾಂಗà³à²²à²¾à²¦à³‡à²¶à²¦ ಟಾಕಾ" + ], + "BGN": [ + "BGN", + "ಬಲà³à²—ೇರಿಯನೠಲೆವà³" + ], + "BHD": [ + "BHD", + "ಬಹà³â€Œâ€Œà²°à³ˆà²¨à²¿ ದಿನಾರà³" + ], + "BIF": [ + "BIF", + "ಬà³à²°à³à²‚ದಿಯನೠಫà³à²°à²¾à²‚ಕà³" + ], + "BMD": [ + "BMD", + "ಬರà³à²®à³à²¡à²¨à³ ಡಾಲರà³" + ], + "BND": [ + "BND", + "ಬà³à²°à³‚ನಿ ಡಾಲರà³" + ], + "BOB": [ + "BOB", + "ಬೊಲಿವಿಯಾದ ಬೊಲಿವಿಯಾನೊ" + ], + "BRL": [ + "R$", + "ಬà³à²°à³†à²œà²¿à²²à²¿à²¯à²¨à³â€Œ ರಿಯಲà³" + ], + "BSD": [ + "BSD", + "ಬಹಾಮಿಯನೠಡಾಲರà³" + ], + "BTN": [ + "BTN", + "ಭೂತಾನೀಸೠನà³à²²à³à²¤à²°à²®à³" + ], + "BWP": [ + "BWP", + "ಬೋಟà³à²¸à³â€Œà²µà²¾à²¨à²¨à³ ಪà³à²²à²¾" + ], + "BYN": [ + "BYN", + "ಬೆಲಾರà³à²¸à²¿à²¯à²¨à³ ರೂಬಲà³" + ], + "BYR": [ + "BYR", + "ಬೆಲಾರà³à²¸à²¿à²¯à²¨à³ ರೂಬಲೠ(2000–2016)" + ], + "BZD": [ + "BZD", + "ಬೆಲೀಜೠಡಾಲರà³" + ], + "CAD": [ + "CA$", + "ಕೆನಡಾದ ಡಾಲರà³" + ], + "CDF": [ + "CDF", + "ಕಾಂಗೋಲೀಸೠಫà³à²°à²¾à²‚ಕà³" + ], + "CHF": [ + "CHF", + "ಸà³à²µà²¿à²¸à³ ಫà³à²°à²¾à²‚ಕà³" + ], + "CLP": [ + "CLP", + "ಚಿಲಿಯ ಪೆಸೊ" + ], + "CNY": [ + "CNÂ¥", + "ಚೈನೀಸೠಯà³à²µà²¾à²¨à³" + ], + "COP": [ + "COP", + "ಕೊಲೊಂಬಿಯೋದ ಪೆಸೊ" + ], + "CRC": [ + "CRC", + "ಕೋಸà³à²Ÿ ರಿಕನೠಕೊಲನà³" + ], + "CUC": [ + "CUC", + "ಕà³à²¯à³à²¬à²¾à²¦ ಪರಿವರà³à²¤à²¨à³€à²¯ ಪೆಸೊ" + ], + "CUP": [ + "CUP", + "ಕà³à²¯à³‚ಬಾದ ಪೆಸೊ" + ], + "CVE": [ + "CVE", + "ಕೇಪೠವರà³à²¡à²¿à²¨à³ ಎಸà³â€Œà²•ೂಡೊ" + ], + "CZK": [ + "CZK", + "à²à³†à²•ೠಗಣರಾಜà³à²¯ ಕೊರೂನ" + ], + "DJF": [ + "DJF", + "ಜಿಬೊಟಿಯನೠಫà³à²°à²¾à²‚ಕà³" + ], + "DKK": [ + "DKK", + "ಡà³à²¯à²¾à²¨à²¿à²¶à³ ಕà³à²°à³‹à²¨à³" + ], + "DOP": [ + "DOP", + "ಡೊಮಿನಿಕನೠಪೆಸೊ" + ], + "DZD": [ + "DZD", + "ಅಲà³à²—ೇರಿಯನೠದಿನಾರà³" + ], + "EGP": [ + "EGP", + "ಈಜಿಪà³à²·à²¿à²¯à²¨à³ ಪೌಂಡà³â€" + ], + "ERN": [ + "ERN", + "ಎರಿತà³à²°à²¿à²¯à²¨à³ ನಕà³à²«à²¾" + ], + "ETB": [ + "ETB", + "ಇಥಿಯೋಪಿಯನೠಬಿರà³" + ], + "EUR": [ + "€", + "ಯೂರೊ" + ], + "FJD": [ + "FJD", + "ಫಿಜಿಯನೠಡಾಲರà³" + ], + "FKP": [ + "FKP", + "ಫಾಲà³à²•à³â€Œà²²à³à²¯à²¾à²‚ಡೠದà³à²µà³€à²ªà²—ಳ ಪೌಂಡà³" + ], + "GBP": [ + "£", + "ಬà³à²°à²¿à²Ÿà³€à²·à³ ಪೌಂಡà³" + ], + "GEL": [ + "GEL", + "ಜಾರà³à²œà²¿à²¯à²¾à²¦ ಲಾರಿ" + ], + "GHS": [ + "GHS", + "ಘಾನಾದ ಸೆದಿ" + ], + "GIP": [ + "GIP", + "ಗಿಬà³à²°à²¾à²²à³à²Ÿà²°à³ ಪೌಂಡà³" + ], + "GMD": [ + "GMD", + "ಗà³à²¯à²¾à²‚ಬಿಯಾದ ದಲಾಸಿ" + ], + "GNF": [ + "GNF", + "ಗಿನಿಯನೠಫà³à²°à²¾à²‚ಕà³" + ], + "GTQ": [ + "GTQ", + "ಗà³à²µà²¾à²Ÿà³†à²®à²¾à²²à²¾à²¦ ಕà³à²¯à²¿à²Ÿà³à²¸à²²à³â€Œâ€Œ" + ], + "GYD": [ + "GYD", + "ಗà³à²¯à²¾à²¨à³€à²¸à³â€Œ ಡಾಲರà³â€Œ" + ], + "HKD": [ + "HK$", + "ಹಾಂಗೠಕಾಂಗೠಡಾಲರà³" + ], + "HNL": [ + "HNL", + "ಹೊಂಡà³à²°à²¾à²¨à³â€Œ ಲೆಂಪಿರಾ" + ], + "HRK": [ + "HRK", + "ಕà³à²°à³Šà²¯à³†à²·à³à²¯à²¾à²¦ ಕೂನಾ" + ], + "HTG": [ + "HTG", + "ಹೈಟಿಯ ಗೋರà³à²¦à³†" + ], + "HUF": [ + "HUF", + "ಹಂಗೇರಿಯನೠಫೋರಿಂಟà³" + ], + "IDR": [ + "IDR", + "ಇಂಡೊನೇಷà³à²¯à²¾ ರà³à²ªà³ˆ" + ], + "ILS": [ + "₪", + "ಇಸà³à²°à³‡à²²à²¿ ನà³à²¯à³‚ ಶೇಖಲà³" + ], + "INR": [ + "₹", + "ಭಾರತೀಯ ರೂಪಾಯಿ" + ], + "IQD": [ + "IQD", + "ಇರಾಖಿಯನೠದಿನಾರà³" + ], + "IRR": [ + "IRR", + "ಇರಾನಿಯನೠರಿಯಲà³" + ], + "ISK": [ + "ISK", + "à²à²¸à³â€Œà²²à³à²¯à²¾à²‚ಡಿಕೠಕà³à²°à³‹à²¨à²¾" + ], + "JMD": [ + "JMD", + "ಜಮೈಕನೠಡಾಲರà³" + ], + "JOD": [ + "JOD", + "ಜೋರà³à²¡à²¾à²¨à²¿à²¯à²¨à³ ದಿನಾರà³" + ], + "JPY": [ + "JPÂ¥", + "ಜಪಾನೀಸೠಯೆನà³" + ], + "KES": [ + "KES", + "ಕೆನà³à²¯à²¨à³ ಶಿಲà³à²²à²¿à²‚ಗà³" + ], + "KGS": [ + "KGS", + "ಕಿರà³à²—ಿಸà³à²¤à²¾à²¨à²¿ ಸೋಮà³" + ], + "KHR": [ + "KHR", + "ಕಾಂಬೋಡಿಯನೠರಿಯಲà³" + ], + "KMF": [ + "KMF", + "ಕೊಮೊರಿಯನೠಫà³à²°à²¾à²‚ಕà³" + ], + "KPW": [ + "KPW", + "ಉತà³à²¤à²° ಕೊರಿಯನೠವೋನà³" + ], + "KRW": [ + "â‚©", + "ದಕà³à²·à²¿à²£ ಕೊರಿಯನೠವೊನà³" + ], + "KWD": [ + "KWD", + "ಕà³à²µà³ˆà²¤à³€ ದಿನಾರà³" + ], + "KYD": [ + "KYD", + "ಕೆಮà³à²¯à²¾à²¨à³â€Œ à²à²²à³à²¯à²¾à²‚ಡà³â€Œà²¨ ಡಾಲರà³â€Œ" + ], + "KZT": [ + "KZT", + "ಕಜಾಕಿಸà³à²¤à²¾à²¨à²¿ ತೆಂಗೆ" + ], + "LAK": [ + "LAK", + "ಲೋಟಿಯನೠಕಿಪà³" + ], + "LBP": [ + "LBP", + "ಲೆಬೆನೀಸೠಪೌಂಡà³" + ], + "LKR": [ + "LKR", + "ಶà³à²°à³€à²²à²‚ಕಾದ ರà³à²ªà³€" + ], + "LRD": [ + "LRD", + "ಲಿಬೇರಿಯನೠಡಾಲರà³" + ], + "LSL": [ + "LSL", + "ಲೆಸೊತೊ ಲೊತಿ" + ], + "LTL": [ + "LTL", + "ಲಿಥà³à²¨à²¿à²¯à²¨à³â€Œ ಲಿತಾಸà³â€Œ" + ], + "LVL": [ + "LVL", + "ಲà³à²¯à²¾à²Ÿà³à²µà²¿à²¯à²¨à³ ಲà³à²¯à²¾à²Ÿà³à²¸à³" + ], + "LYD": [ + "LYD", + "ಲಿಬಿಯಾದ ದಿನಾರà³â€Œ" + ], + "MAD": [ + "MAD", + "ಮೊರೊಕನೠದಿರà³â€Œà²¹à²®à³" + ], + "MDL": [ + "MDL", + "ಮಲà³à²¦à³‹à²µà²¾à²¦ ಲೆವೂ" + ], + "MGA": [ + "MGA", + "ಮಲಗಾಸಿ ಅರಿಯಾರಿ" + ], + "MKD": [ + "MKD", + "ಮೆಸಡೋನಿಯನೠದಿನಾರà³" + ], + "MMK": [ + "MMK", + "ಮà³à²¯à²¾à²¨à³à²®à²¾à²°à³ ಕà³à²¯à²¾à²Ÿà³" + ], + "MNT": [ + "MNT", + "ಮಂಗೋಲಿಯಾದ ತà³à²—à³à²°à²¿à²•à³â€Œâ€Œ" + ], + "MOP": [ + "MOP", + "ಮಕà³à²¯à³‚ದ ಪಟಕಾ" + ], + "MRO": [ + "MRO", + "ಮೌರೀಶಿಯನಿಯನೠಒಗಿಯ" + ], + "MUR": [ + "MUR", + "ಮಾರಿಷಿಯನೠರà³à²ªà²¿" + ], + "MVR": [ + "MVR", + "ಮಾಲà³à²¡à³€à²µà²¿à²¯à²¨à³ ರà³à²«à²¿à²¯à²¾" + ], + "MWK": [ + "MWK", + "ಮಲಾವಿಯ ಕà³à²µà²¾à²š" + ], + "MXN": [ + "MX$", + "ಮೆಕà³à²¸à²¿à²•ೊದ ಪೆಸೊ" + ], + "MYR": [ + "MYR", + "ಮಲೇಶಿಯನೠರಿಂಗಿಟà³à²Ÿà³" + ], + "MZN": [ + "MZN", + "ಮೊà²à²¾à²‚ಬಿಕನೠಮೆಟಿಕಲà³" + ], + "NAD": [ + "NAD", + "ನಮೀಬಿಯನೠಡಾಲರà³" + ], + "NGN": [ + "NGN", + "ನೈಜೀರಿಯಾದ ನೇರಾ" + ], + "NIO": [ + "NIO", + "ನಿಕಾರಗà³à²µà²¾à²¦ ಕರà³à²¦à³Šà²¬à²¾" + ], + "NOK": [ + "NOK", + "ನಾರà³à²µà³‡à²¯ ಕà³à²°à³‹à²¨à³" + ], + "NPR": [ + "NPR", + "ನೇಪಾಳದ ರà³à²ªà³€" + ], + "NZD": [ + "NZ$", + "ನà³à²¯à³‚ಜಿಲà³à²¯à²¾à²‚ಡೠಡಾಲರà³" + ], + "OMR": [ + "OMR", + "ಒಮಾನಿ ರಿಯಲà³" + ], + "PAB": [ + "PAB", + "ಪನಾಮಾನಿಯನೠಬಲà³à²¬à³‹à²µà²¾" + ], + "PEN": [ + "PEN", + "ಪೆರà³à²µà²¿à²¯à²¨à³ ನà³à²¯à³†à²µà³Š ಸೊಲà³" + ], + "PGK": [ + "PGK", + "ಪಪà³à²µà²¾ ನà³à²¯à³‚ ಗಿನಿಯನೠಕಿನಾ" + ], + "PHP": [ + "PHP", + "ಫಿಲಿಪà³à²ªà³ˆà²¨à³ ಪೆಸೊ" + ], + "PKR": [ + "PKR", + "ಪಾಕಿಸà³à²¤à²¾à²¨à²¦ ರà³à²ªà³€" + ], + "PLN": [ + "PLN", + "ಪೊಲಿಶೠà²à³à²²à³‹à²Ÿà²¿" + ], + "PYG": [ + "PYG", + "ಪೆರà³à²—à³à²µà³‡à²¯ ಗà³à²µà²¾à²°à²¨à³€" + ], + "QAR": [ + "QAR", + "ಖತಾರಿ ರಿಯಲà³" + ], + "RON": [ + "RON", + "ರೊಮೇನಿಯನೠಲೆವà³" + ], + "RSD": [ + "RSD", + "ಸೆರà³à²¬à²¿à²¯à²¨à³ ದಿನಾರà³" + ], + "RUB": [ + "RUB", + "ರಶಿಯನೠರೂಬಲà³" + ], + "RWF": [ + "RWF", + "ರà³à²µà²¾à²‚ಡನೠಫà³à²°à²¾à²‚ಕà³" + ], + "SAR": [ + "SAR", + "ಸೌದಿ ರಿಯಾಲà³" + ], + "SBD": [ + "SBD", + "ಸೊಲೊಮನೠದà³à²µà³€à²ªà²—ಳ ಡಾಲರà³" + ], + "SCR": [ + "SCR", + "ಸೆಚೊಲಿಯೊಸೠರà³à²ªà²¿" + ], + "SDG": [ + "SDG", + "ಸà³à²¡à²¾à²¨à³€à²¸à³ ಪೌಂಡà³" + ], + "SEK": [ + "SEK", + "ಸà³à²µà³€à²¡à²¿à²·à³ ಕà³à²°à³‹à²¨à²¾" + ], + "SGD": [ + "SGD", + "ಸಿಂಗಾಪà³à²°à³ ಡಾಲರà³â€Œ" + ], + "SHP": [ + "SHP", + "ಸೇಂಟೠಹೆಲೇನಾ ಪೌಂಡà³" + ], + "SLL": [ + "SLL", + "ಸಿಯೆರಾ ಲಿಯೋನಿಯನೠಲಿಯೋನà³" + ], + "SOS": [ + "SOS", + "ಸೊಮಾಲಿ ಶಿಲà³à²²à²¿à²‚ಗà³" + ], + "SRD": [ + "SRD", + "ಸà³à²°à²¿à²¨à²¾à²®à³€à²¸à³ ಡಾಲರà³" + ], + "SSP": [ + "SSP", + "ದಕà³à²·à²¿à²£ ಸೂಡಾನೀಸೠಪೌಂಡà³â€" + ], + "STD": [ + "STD", + "ಸಾವೊ ಟೋಮೠಮತà³à²¤à³ ಪà³à²°à²¿à²¨à³à²¸à²¿à²ªà³ ದೊಬà³à²°à²¾" + ], + "SYP": [ + "SYP", + "ಸಿರಿಯನೠಪೌಂಡà³" + ], + "SZL": [ + "SZL", + "ಸà³à²µà²¾à²œà²¿ ಲಿಲಂಗೆನಿ" + ], + "THB": [ + "฿", + "ಥಾಯೠಬಹà³à²¤à³" + ], + "TJS": [ + "TJS", + "ತಜಕಿಸà³à²¤à²¾à²¨à²¿ ಸೊಮೋನಿ" + ], + "TMT": [ + "TMT", + "ಟರà³à²•à³â€à²®à³†à²¨à²¿à²¸à³à²¤à²¾à²¨à³ ಮನಾತà³" + ], + "TND": [ + "TND", + "ತà³à²¨à³€à²¸à²¿à²¯à²¨à³ ದಿನಾರà³" + ], + "TOP": [ + "TOP", + "ಟೊಂಗಾ ಪಾಂಗ" + ], + "TRY": [ + "TRY", + "ಟರà³à²•ಿಶೠಲಿರಾ" + ], + "TTD": [ + "TTD", + "ಟà³à²°à²¿à²¨à²¿à²¡à²¾à²¡à³ ಮತà³à²¤à³ ಟೊಬಾಗೊ ಡಾಲರà³" + ], + "TWD": [ + "NT$", + "ನà³à²¯à³‚ ತೈವಾನೠಡಾಲರà³" + ], + "TZS": [ + "TZS", + "ತಾನà³â€Œà²œà³‡à²¨à²¿à²¯à²¨à³ ಶಿಲà³à²²à²¿à²‚ಗà³" + ], + "UAH": [ + "UAH", + "ಉಕà³à²°à³‡à²¨à²¿à²¯à²¨à³ ಹà³à²°à²¿à²µà³à²¨à³€à²¯" + ], + "UGX": [ + "UGX", + "ಉಗಾಂಡನೠಶಿಲà³à²²à²¿à²‚ಗà³" + ], + "USD": [ + "$", + "ಅಮೆರಿಕದ ಡಾಲರà³â€Œ" + ], + "UYU": [ + "UYU", + "ಉರà³à²—à³à²µà³†à²¯ ಪೆಸೊ" + ], + "UZS": [ + "UZS", + "ಉಜà³à²¬à³‡à²•ಿಸà³à²¤à²¾à²¨à³ ಸೊಮà³" + ], + "VEF": [ + "VEF", + "ವೆನಿಜà³à²²à²¿à²¯à²¨à³ ಬೊಲಿವರà³" + ], + "VND": [ + "â‚«", + "ವಿಯೆಟà³à²¨à²¾à²®à³€à²¸à³ ಡಾಂಗà³" + ], + "VUV": [ + "VUV", + "ವನೂತೠವತà³" + ], + "WST": [ + "WST", + "ಸಮೋನೠತಲಾ" + ], + "XAF": [ + "FCFA", + "CFA ಫà³à²°à²¾à²‚ಕೠBEAC" + ], + "XCD": [ + "EC$", + "ಪೂರà³à²µ ಕೆರೀಬಿಯನೠಡಾಲರà³" + ], + "XOF": [ + "CFA", + "ಪಶà³à²šà²¿à²® ಆಫà³à²°à²¿à²•ಾದ [CFA] ಫà³à²°à²¾à²‚ಕà³" + ], + "XPF": [ + "CFPF", + "[CFP] ಫà³à²°à²¾à²‚ಕà³" + ], + "YER": [ + "YER", + "ಯೆಮೆನಿ ರಿಯಲà³" + ], + "ZAR": [ + "ZAR", + "ದಕà³à²·à²¿à²£ ಆಫà³à²°à²¿à²•ನೠರಾಂಡà³" + ], + "ZMK": [ + "ZMK", + "ಜಾಂಬಿಯಾ ಕà³à²µà²¾à²š (1968–2012)" + ], + "ZMW": [ + "ZMW", + "ಜಾಂಬಿಯಾ ಕà³à²µà²¾à²š" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ko.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ko.json new file mode 100644 index 0000000000000000000000000000000000000000..106809aef5a3e66f74d1eeea2f5b45fb06fbaeb6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ko.json @@ -0,0 +1,1113 @@ +{ + "Version": "2.1.29.22", + "Names": { + "ADP": [ + "ADP", + "안ë„ë¼ íŽ˜ì„¸íƒ€" + ], + "AED": [ + "AED", + "ì•„ëžì—미리트 디르함" + ], + "AFA": [ + "AFA", + "아프가니 (1927–2002)" + ], + "AFN": [ + "AFN", + "아프가니스탄 아프가니" + ], + "ALL": [ + "ALL", + "알바니아 ë ˆí¬" + ], + "AMD": [ + "AMD", + "아르메니아 드람" + ], + "ANG": [ + "ANG", + "네ëœëž€ë“œë ¹ 안틸레스 길ë”" + ], + "AOA": [ + "AOA", + "ì•™ê³¨ë¼ ì½´ìž" + ], + "AOK": [ + "AOK", + "ì•™ê³¨ë¼ ì½´ìž (1977–1990)" + ], + "AON": [ + "AON", + "ì•™ê³¨ë¼ ì‹ ì½´ìž (1990–2000)" + ], + "AOR": [ + "AOR", + "ì•™ê³¨ë¼ ìž¬ì¡°ì • ì½´ìž (1995–1999)" + ], + "ARA": [ + "ARA", + "아르헨티나 오스트랄" + ], + "ARL": [ + "ARL", + "아르헨티나 페소 ë ˆì´ (1970–1983)" + ], + "ARM": [ + "ARM", + "아르헨티나 페소 (18810–1970)" + ], + "ARP": [ + "ARP", + "아르헨티나 페소 (1983–1985)" + ], + "ARS": [ + "ARS", + "아르헨티나 페소" + ], + "ATS": [ + "ATS", + "호주 실ë§" + ], + "AUD": [ + "AU$", + "호주 달러" + ], + "AWG": [ + "AWG", + "아루바 플로린" + ], + "AZM": [ + "AZM", + "아제르바ì´ì   마나트(1993–2006)" + ], + "AZN": [ + "AZN", + "아제르바ì´ìž” 마나트" + ], + "BAD": [ + "BAD", + "보스니아-헤르체고비나 디나르" + ], + "BAM": [ + "BAM", + "보스니아-헤르체고비나 태환 마르í¬" + ], + "BAN": [ + "BAN", + "보스니아-헤르체고비나 신디나르 (1994–1997)" + ], + "BBD": [ + "BBD", + "바베ì´ë„스 달러" + ], + "BDT": [ + "BDT", + "방글ë¼ë°ì‹œ 타카" + ], + "BEC": [ + "BEC", + "ë²¨ê¸°ì— í”„ëž‘ (태환)" + ], + "BEF": [ + "BEF", + "ë²¨ê¸°ì— í”„ëž‘" + ], + "BEL": [ + "BEL", + "ë²¨ê¸°ì— í”„ëž‘ (금융)" + ], + "BGL": [ + "BGL", + "불가리아 ë™ì „ ë ›" + ], + "BGM": [ + "BGM", + "불가리아 사회주ì˜ìž ë ›" + ], + "BGN": [ + "BGN", + "불가리아 레프" + ], + "BGO": [ + "BGO", + "불가리아 ë › (1879–1952)" + ], + "BHD": [ + "BHD", + "ë°”ë ˆì¸ ë””ë‚˜ë¥´" + ], + "BIF": [ + "BIF", + "부룬디 프랑" + ], + "BMD": [ + "BMD", + "버뮤다 달러" + ], + "BND": [ + "BND", + "ë¶€ë£¨ë‚˜ì´ ë‹¬ëŸ¬" + ], + "BOB": [ + "BOB", + "볼리비아노" + ], + "BOL": [ + "BOL", + "볼리비아 볼리비아노 (1863–1963)" + ], + "BOP": [ + "BOP", + "볼리비아노 페소" + ], + "BOV": [ + "BOV", + "볼리비아노 Mvdol(기금)" + ], + "BRB": [ + "BRB", + "볼리비아노 í¬ë£¨ì œì´ë£¨ 노보 (1967–1986)" + ], + "BRC": [ + "BRC", + "브ë¼ì§ˆ í¬ë£¨ìžë‘" + ], + "BRE": [ + "BRE", + "브ë¼ì§ˆ í¬ë£¨ì œì´ë£¨ (1990–1993)" + ], + "BRL": [ + "R$", + "브ë¼ì§ˆ 레알" + ], + "BRN": [ + "BRN", + "브ë¼ì§ˆ í¬ë£¨ìžë‘ 노보" + ], + "BRR": [ + "BRR", + "브ë¼ì§ˆ í¬ë£¨ì œì´ë£¨" + ], + "BRZ": [ + "BRZ", + "브ë¼ì§ˆ í¬ë£¨ì œì´ë£¨ (1942–1967)" + ], + "BSD": [ + "BSD", + "바하마 달러" + ], + "BTN": [ + "BTN", + "부탄 눌투눔" + ], + "BUK": [ + "BUK", + "버마 차트" + ], + "BWP": [ + "BWP", + "보츠와나 í´ë¼" + ], + "BYB": [ + "BYB", + "벨ë¼ë£¨ìФ ì‹ ê¶Œ 루블 (1994–1999)" + ], + "BYN": [ + "BYN", + "벨ë¼ë£¨ìФ 루블" + ], + "BYR": [ + "BYR", + "벨ë¼ë£¨ìФ 루블 (2000–2016)" + ], + "BZD": [ + "BZD", + "벨리즈 달러" + ], + "CAD": [ + "CA$", + "ìºë‚˜ë‹¤ 달러" + ], + "CDF": [ + "CDF", + "콩고 프랑 콩골ë¼ìФ" + ], + "CHE": [ + "CHE", + "유로 (WIR)" + ], + "CHF": [ + "CHF", + "스위스 프랑" + ], + "CHW": [ + "CHW", + "프랑 (WIR)" + ], + "CLE": [ + "CLE", + "ì¹ ë ˆ ì—스쿠ë„" + ], + "CLF": [ + "CLF", + "ì¹ ë ˆ (UF)" + ], + "CLP": [ + "CLP", + "ì¹ ë ˆ 페소" + ], + "CNY": [ + "CNÂ¥", + "중국 위안화" + ], + "COP": [ + "COP", + "콜롬비아 페소" + ], + "COU": [ + "COU", + "콜롬비아 실가 단위" + ], + "CRC": [ + "CRC", + "코스타리카 콜론" + ], + "CSD": [ + "CSD", + "ê³  세르비아 디나르" + ], + "CSK": [ + "CSK", + "체코슬로바키아 ë™ì „ 코루나" + ], + "CUC": [ + "CUC", + "ì¿ ë°” 태환 페소" + ], + "CUP": [ + "CUP", + "ì¿ ë°” 페소" + ], + "CVE": [ + "CVE", + "ì¹´ë³´ë² ë¥´ë° ì—스쿠ë„" + ], + "CYP": [ + "CYP", + "싸ì´í”„러스 파운드" + ], + "CZK": [ + "CZK", + "ì²´ì½” 공화국 코루나" + ], + "DDM": [ + "DDM", + "ë™ë… 오스트마르í¬" + ], + "DEM": [ + "DEM", + "ë…ì¼ ë§ˆë¥´í¬" + ], + "DJF": [ + "DJF", + "지부티 프랑" + ], + "DKK": [ + "DKK", + "ë´ë§ˆí¬ í¬ë¡œë„¤" + ], + "DOP": [ + "DOP", + "ë„미니카 페소" + ], + "DZD": [ + "DZD", + "알제리 디나르" + ], + "ECS": [ + "ECS", + "ì—ì¿ ì•„ë„르 수í¬ë ˆ" + ], + "ECV": [ + "ECV", + "ì—ì½°ë„르 (UVC)" + ], + "EEK": [ + "EEK", + "ì—스토니아 í¬ë£¬" + ], + "EGP": [ + "EGP", + "ì´ì§‘트 파운드" + ], + "ERN": [ + "ERN", + "ì—리트리아 나í¬íŒŒ" + ], + "ESA": [ + "ESA", + "ìŠ¤íŽ˜ì¸ íŽ˜ì„¸íƒ€(예금)" + ], + "ESB": [ + "ESB", + "ìŠ¤íŽ˜ì¸ íŽ˜ì„¸íƒ€(변환 예금)" + ], + "ESP": [ + "ESP", + "ìŠ¤íŽ˜ì¸ íŽ˜ì„¸íƒ€" + ], + "ETB": [ + "ETB", + "ì—티오피아 비르" + ], + "EUR": [ + "€", + "유로" + ], + "FIM": [ + "FIM", + "핀란드 마르카" + ], + "FJD": [ + "FJD", + "피지 달러" + ], + "FKP": [ + "FKP", + "í¬í´ëžœë“œì œë„ 파운드" + ], + "FRF": [ + "FRF", + "프랑스 프랑" + ], + "GBP": [ + "£", + "파운드" + ], + "GEK": [ + "GEK", + "그루지야 ì§€í ë¼ë¦¬íЏ" + ], + "GEL": [ + "GEL", + "조지아 ë¼ë¦¬" + ], + "GHC": [ + "GHC", + "가나 시디 (1979–2007)" + ], + "GHS": [ + "GHS", + "가나 시디" + ], + "GIP": [ + "GIP", + "지브롤터 파운드" + ], + "GMD": [ + "GMD", + "ê°ë¹„ì•„ 달ë¼ì‹œ" + ], + "GNF": [ + "GNF", + "기니 프랑" + ], + "GNS": [ + "GNS", + "기니 시리" + ], + "GQE": [ + "GQE", + "ì ë„ 기니 ì—쿨 (Ekwele)" + ], + "GRD": [ + "GRD", + "그리스 드ë¼í¬ë§ˆ" + ], + "GTQ": [ + "GTQ", + "과테ë§ë¼ 케트살" + ], + "GWE": [ + "GWE", + "í¬ë¥´íˆ¬ê°ˆë ¹ 기니 ì—스쿠ë„" + ], + "GWP": [ + "GWP", + "ê¸°ë„¤ë¹„ì˜ íŽ˜ì†Œ" + ], + "GYD": [ + "GYD", + "ê°€ì´ì•„나 달러" + ], + "HKD": [ + "HK$", + "í™ì½© 달러" + ], + "HNL": [ + "HNL", + "온ë‘ë¼ìФ 렘피ë¼" + ], + "HRD": [ + "HRD", + "í¬ë¡œì•„í‹°ì•„ 디나르" + ], + "HRK": [ + "HRK", + "í¬ë¡œì•„í‹°ì•„ 쿠나" + ], + "HTG": [ + "HTG", + "하ì´í‹° 구르드" + ], + "HUF": [ + "HUF", + "í—가리 í¬ë¦°íЏ" + ], + "IDR": [ + "IDR", + "ì¸ë„네시아 루피아" + ], + "IEP": [ + "IEP", + "ì•„ì¼ëžœë“œ 파운드" + ], + "ILP": [ + "ILP", + "ì´ìФë¼ì—˜ 파운드" + ], + "ILS": [ + "₪", + "ì´ìФë¼ì—˜ ì‹ ê¶Œ 세켈" + ], + "INR": [ + "₹", + "ì¸ë„ 루피" + ], + "IQD": [ + "IQD", + "ì´ë¼í¬ 디나르" + ], + "IRR": [ + "IRR", + "ì´ëž€ 리얄" + ], + "ISK": [ + "ISK", + "ì•„ì´ìŠ¬ëž€ë“œ í¬ë¡œë‚˜" + ], + "ITL": [ + "ITL", + "ì´íƒˆë¦¬ì•„ 리ë¼" + ], + "JMD": [ + "JMD", + "ìžë©”ì´ì¹´ 달러" + ], + "JOD": [ + "JOD", + "요르단 디나르" + ], + "JPY": [ + "JPÂ¥", + "ì¼ë³¸ 엔화" + ], + "KES": [ + "KES", + "ì¼€ëƒ ì‹¤ë§" + ], + "KGS": [ + "KGS", + "키르기스스탄 솜" + ], + "KHR": [ + "KHR", + "캄보디아 리얄" + ], + "KMF": [ + "KMF", + "코모르 프랑" + ], + "KPW": [ + "KPW", + "ì¡°ì„  ë¯¼ì£¼ì£¼ì˜ ì¸ë¯¼ 공화국 ì›" + ], + "KRH": [ + "KRH", + "대한민국 환 (1953–1962)" + ], + "KRW": [ + "â‚©", + "대한민국 ì›" + ], + "KWD": [ + "KWD", + "쿠웨ì´íЏ 디나르" + ], + "KYD": [ + "KYD", + "ì¼€ì´ë§¨ ì œë„ ë‹¬ëŸ¬" + ], + "KZT": [ + "KZT", + "ì¹´ìží스탄 í…게" + ], + "LAK": [ + "LAK", + "ë¼ì˜¤ìФ 키프" + ], + "LBP": [ + "LBP", + "레바논 파운드" + ], + "LKR": [ + "LKR", + "스리랑카 루피" + ], + "LRD": [ + "LRD", + "ë¼ì´ë² ë¦¬ì•„ 달러" + ], + "LSL": [ + "LSL", + "레소토 로티" + ], + "LTL": [ + "LTL", + "리투아니아 리타" + ], + "LTT": [ + "LTT", + "ë£©ì…ˆë¶€ë¥´í¬ íƒ€ë¡œë‚˜" + ], + "LUC": [ + "LUC", + "ë£©ì…ˆë¶€ë¥´í¬ ë³€í™˜ 프랑" + ], + "LUF": [ + "LUF", + "ë£©ì…ˆë¶€ë¥´í¬ í”„ëž‘" + ], + "LUL": [ + "LUL", + "ë£©ì…ˆë¶€ë¥´í¬ ìž¬ì • 프랑" + ], + "LVL": [ + "LVL", + "ë¼íŠ¸ë¹„ì•„ ë¼íЏ" + ], + "LVR": [ + "LVR", + "ë¼íŠ¸ë¹„ì•„ 루블" + ], + "LYD": [ + "LYD", + "리비아 디나르" + ], + "MAD": [ + "MAD", + "모로코 디렘" + ], + "MAF": [ + "MAF", + "모로코 프랑" + ], + "MCF": [ + "MCF", + "모나코 프랑" + ], + "MDC": [ + "MDC", + "몰ë„ë°” ì¿ í°" + ], + "MDL": [ + "MDL", + "몰ë„ë°” ë ˆì´" + ], + "MGA": [ + "MGA", + "마다가스카르 아리아리" + ], + "MGF": [ + "MGF", + "마다가스카르 프랑" + ], + "MKD": [ + "MKD", + "마케ë„니아 디나르" + ], + "MLF": [ + "MLF", + "ë§ë¦¬ 프랑" + ], + "MMK": [ + "MMK", + "미얀마 키ì–" + ], + "MNT": [ + "MNT", + "몽골 투그릭" + ], + "MOP": [ + "MOP", + "마카오 파타카" + ], + "MRO": [ + "MRO", + "모리타니 우기야" + ], + "MTL": [ + "MTL", + "몰타 리ë¼" + ], + "MTP": [ + "MTP", + "몰타 파운드" + ], + "MUR": [ + "MUR", + "모리셔스 루피" + ], + "MVR": [ + "MVR", + "몰디브 ì œë„ ë£¨í”¼ì•„" + ], + "MWK": [ + "MWK", + "ë§ë¼ìœ„ ì½°ì³" + ], + "MXN": [ + "MX$", + "멕시코 페소" + ], + "MXP": [ + "MXP", + "멕시코 실버 페소 (1861–1992)" + ], + "MXV": [ + "MXV", + "멕시코 (UDI)" + ], + "MYR": [ + "MYR", + "ë§ë ˆì´ì‹œì•„ ë§ê¹ƒ" + ], + "MZE": [ + "MZE", + "ëª¨ìž ë¹„í¬ ì—스쿠ë„" + ], + "MZM": [ + "MZM", + "ê³  ëª¨ìž ë¹„í¬ ë©”í‹°ì¹¼" + ], + "MZN": [ + "MZN", + "ëª¨ìž ë¹„í¬ ë©”í‹°ì¹¼" + ], + "NAD": [ + "NAD", + "나미비아 달러" + ], + "NGN": [ + "NGN", + "니제르 나ì´ë¼" + ], + "NIC": [ + "NIC", + "니카ë¼ê³¼ 코르ë„ë°”" + ], + "NIO": [ + "NIO", + "니카ë¼ê³¼ 코르ë„ë°” 오로" + ], + "NLG": [ + "NLG", + "네ë¸ëž€ë“œ 길ë”" + ], + "NOK": [ + "NOK", + "ë…¸ë¥´ì›¨ì´ í¬ë¡œë„¤" + ], + "NPR": [ + "NPR", + "네팔 루피" + ], + "NZD": [ + "NZ$", + "뉴질랜드 달러" + ], + "OMR": [ + "OMR", + "오만 리얄" + ], + "PAB": [ + "PAB", + "파나마 발보아" + ], + "PEI": [ + "PEI", + "페루 ì¸í‹°" + ], + "PEN": [ + "PEN", + "페루 누ì—ë³´ 솔" + ], + "PES": [ + "PES", + "페루 솔" + ], + "PGK": [ + "PGK", + "파푸아뉴기니 키나" + ], + "PHP": [ + "PHP", + "필리핀 페소" + ], + "PKR": [ + "PKR", + "파키스탄 루피" + ], + "PLN": [ + "PLN", + "í´ëž€ë“œ ì¦ë¡œí‹°" + ], + "PLZ": [ + "PLZ", + "í´ëž€ë“œ ì¦ë¡œí‹° (1950–1995)" + ], + "PTE": [ + "PTE", + "í¬ë¥´íˆ¬ê°ˆ ì—스쿠ë„" + ], + "PYG": [ + "PYG", + "파ë¼ê³¼ì´ ê³¼ë¼ë‹ˆ" + ], + "QAR": [ + "QAR", + "카타르 리얄" + ], + "RHD": [ + "RHD", + "로디지아 달러" + ], + "ROL": [ + "ROL", + "루마니아 ë ˆì´" + ], + "RON": [ + "RON", + "루마니아 레우" + ], + "RSD": [ + "RSD", + "세르비아 디나르" + ], + "RUB": [ + "RUB", + "러시아 루블" + ], + "RUR": [ + "RUR", + "러시아 루블 (1991–1998)" + ], + "RWF": [ + "RWF", + "르완다 프랑" + ], + "SAR": [ + "SAR", + "사우디아ë¼ë¹„ì•„ 리얄" + ], + "SBD": [ + "SBD", + "솔로몬 ì œë„ ë‹¬ëŸ¬" + ], + "SCR": [ + "SCR", + "세ì´ì…¸ 루피" + ], + "SDD": [ + "SDD", + "수단 디나르" + ], + "SDG": [ + "SDG", + "수단 파운드" + ], + "SDP": [ + "SDP", + "ê³  수단 파운드" + ], + "SEK": [ + "SEK", + "ìŠ¤ì›¨ë´ í¬ë¡œë‚˜" + ], + "SGD": [ + "SGD", + "ì‹±ê°€í´ ë‹¬ëŸ¬" + ], + "SHP": [ + "SHP", + "세ì¸íŠ¸í—¬ë ˆë‚˜ 파운드" + ], + "SIT": [ + "SIT", + "슬로베니아 톨ë¼ë¥´" + ], + "SKK": [ + "SKK", + "슬로바키아 코루나" + ], + "SLL": [ + "SLL", + "시ì—ë¼ë¦¬ì˜¨ 리온" + ], + "SOS": [ + "SOS", + "소ë§ë¦¬ì•„ 실ë§" + ], + "SRD": [ + "SRD", + "수리남 달러" + ], + "SRG": [ + "SRG", + "수리남 길ë”" + ], + "SSP": [ + "SSP", + "남수단 파운드" + ], + "STD": [ + "STD", + "ìƒíˆ¬ë©” 프린시페 ë„브ë¼" + ], + "SUR": [ + "SUR", + "소련 루블" + ], + "SVC": [ + "SVC", + "엘살바ë„르 콜론" + ], + "SYP": [ + "SYP", + "시리아 파운드" + ], + "SZL": [ + "SZL", + "스와질란드 릴랑게니" + ], + "THB": [ + "THB", + "태국 바트" + ], + "TJR": [ + "TJR", + "타지키스탄 루블" + ], + "TJS": [ + "TJS", + "타지키스탄 소모니" + ], + "TMM": [ + "TMM", + "투르í¬ë©”니스탄 마나트 (1993–2009)" + ], + "TMT": [ + "TMT", + "투르í¬ë©”니스탄 마나트" + ], + "TND": [ + "TND", + "튀니지 디나르" + ], + "TOP": [ + "TOP", + "통가 파앙가" + ], + "TPE": [ + "TPE", + "티모르 ì—스쿠ë„" + ], + "TRL": [ + "TRL", + "터키 리ë¼" + ], + "TRY": [ + "TRY", + "ì‹  터키 리ë¼" + ], + "TTD": [ + "TTD", + "트리니다드 토바고 달러" + ], + "TWD": [ + "NT$", + "ì‹  타ì´ì™„ 달러" + ], + "TZS": [ + "TZS", + "탄ìžë‹ˆì•„ 실ë§" + ], + "UAH": [ + "UAH", + "ìš°í¬ë¼ì´ë‚˜ 그리브나" + ], + "UAK": [ + "UAK", + "ìš°í¬ë¼ì´ë‚˜ 카보바네츠" + ], + "UGS": [ + "UGS", + "우간다 ì‹¤ë§ (1966–1987)" + ], + "UGX": [ + "UGX", + "우간다 실ë§" + ], + "USD": [ + "US$", + "미국 달러" + ], + "USN": [ + "USN", + "미국 달러(다ìŒë‚ )" + ], + "USS": [ + "USS", + "미국 달러(당ì¼)" + ], + "UYI": [ + "UYI", + "ìš°ë£¨ê³¼ì´ íŽ˜ì†Œ (UI)" + ], + "UYP": [ + "UYP", + "ìš°ë£¨ê³¼ì´ íŽ˜ì†Œ (1975–1993)" + ], + "UYU": [ + "UYU", + "ìš°ë£¨ê³¼ì´ íŽ˜ì†Œ 우루과요" + ], + "UZS": [ + "UZS", + "우즈베키스탄 숨" + ], + "VEB": [ + "VEB", + "ë² ë„¤ì£¼ì—˜ë¼ ë³¼ë¦¬ë°”ë¥´ (1871–2008)" + ], + "VEF": [ + "VEF", + "ë² ë„¤ìˆ˜ì—˜ë¼ ë³¼ë¦¬ë°”ë¥´" + ], + "VND": [ + "â‚«", + "베트남 ë™" + ], + "VNN": [ + "VNN", + "베트남 ë™ (1978–1985)" + ], + "VUV": [ + "VUV", + "바누아투 바투" + ], + "WST": [ + "WST", + "서 사모아 탈ë¼" + ], + "XAF": [ + "FCFA", + "중앙아프리카 CFA 프랑" + ], + "XCD": [ + "EC$", + "ë™ì¹´ë¦¬ë¸Œ 달러" + ], + "XEU": [ + "XEU", + "유럽 환율 단위" + ], + "XFO": [ + "XFO", + "프랑스 프랑 (Gold)" + ], + "XFU": [ + "XFU", + "프랑스 프랑 (UIC)" + ], + "XOF": [ + "CFA", + "서아프리카 CFA 프랑" + ], + "XPF": [ + "CFPF", + "CFP 프랑" + ], + "XRE": [ + "XRE", + "RINET 기금" + ], + "YDD": [ + "YDD", + "예멘 디나르" + ], + "YER": [ + "YER", + "예멘 리알" + ], + "YUD": [ + "YUD", + "유고슬ë¼ë¹„ì•„ ë™ì „ 디나르" + ], + "YUM": [ + "YUM", + "유고슬ë¼ë¹„ì•„ 노비 디나르" + ], + "YUN": [ + "YUN", + "유고슬ë¼ë¹„ì•„ 전환 디나르" + ], + "ZAL": [ + "ZAL", + "남아프리카 랜드 (금융)" + ], + "ZAR": [ + "ZAR", + "남아프리카 랜드" + ], + "ZMK": [ + "ZMK", + "쟘비아 ì½°ì³ (1968–2012)" + ], + "ZMW": [ + "ZMW", + "잠비아 ì½°ì³" + ], + "ZRN": [ + "ZRN", + "ìžì´ë¥´ ì‹ ê¶Œ ìžì´ë¥´" + ], + "ZRZ": [ + "ZRZ", + "ìžì´ë¥´ ìžì´ë¥´" + ], + "ZWD": [ + "ZWD", + "ì§ë°”브웨 달러" + ], + "ZWL": [ + "ZWL", + "ì§ë°”브웨 달러 (2009)" + ], + "ZWR": [ + "ZWR", + "ì§ë°”브웨 달러 (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ks.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ks.json new file mode 100644 index 0000000000000000000000000000000000000000..4d09d7e273d66132fc92b3398015f4d68e668e56 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ks.json @@ -0,0 +1,969 @@ +{ + "Version": "2.1.30.6", + "Names": { + "ADP": [ + "ADP", + "اٮ۪ڑورَن پیسÙٹا" + ], + "AED": [ + "AED", + "Ù…ÙØªØ­Ø¯Û عرب اÙمارات Ø¯ÙØ±ÛÙ…" + ], + "AFN": [ + "AFN", + "Ø§ÙØºØ§Ù† Ø§ÙØºÙ²Ù†ÛŒ" + ], + "ALL": [ + "ALL", + "اٮ۪لبینÙیَن Ù„ÙÚ©" + ], + "AMD": [ + "AMD", + "اَرمانٮ۪ن ڈرٛٮ۪م" + ], + "ANG": [ + "ANG", + "نایدَرلینٛڑ اٮ۪نٹٕلیٖیَن Ú¯Ùلڑَر" + ], + "AOA": [ + "AOA", + "اٮ۪نگولَن کوانزا" + ], + "AOR": [ + "AOR", + "اٮ۪نگولَن کوانٛزا Ø±Ù®ÛªØ¬ÙØ³Ù¹Ø§Ú‘Ùˆ" + ], + "ARA": [ + "ARA", + "أرجَنٹیٖن اَسٹرل" + ], + "ARS": [ + "ARS", + "أرجَنٹیٖن Ù¾ÙØ³Ùˆ" + ], + "ATS": [ + "ATS", + "آسٹریَن Ø´ÙÙ„ÙÙ†Ù›Ú¯" + ], + "AUD": [ + "A$", + "آسٹریلÙیَن ڈالَر" + ], + "AWG": [ + "AWG", + "اَروبَن ÙÙلورÙÙ†" + ], + "AZN": [ + "AZN", + "آزَرباجانی Ù…ÙŽÙ†ÙŽÙ¹" + ], + "BAD": [ + "BAD", + "بوزنÙیاÛَرزÙگووÙنا دیٖنار" + ], + "BAM": [ + "BAM", + "بوزنÙیاÛَرزÙگووÙنا کَنوٲٹیبٕل مارٕک" + ], + "BBD": [ + "BBD", + "بابیڑÙیَن ڈالَر" + ], + "BDT": [ + "BDT", + "بَنگلادیٖشی ٹَکا" + ], + "BEF": [ + "BEF", + "بَلجÙیَن ÙØ±ÛŒÙ†Ù›Ú©" + ], + "BGN": [ + "BGN", + "بیلگیرÙیَن ÛØ§Ú‘ Ù„ÙÙˆ" + ], + "BHD": [ + "BHD", + "بحریٖنی دیٖنار" + ], + "BIF": [ + "BIF", + "Ø¨ÙØ±ÙÙ†Ú‘Ùین ÙØ±ÛŒÙ†Ù›Ú©" + ], + "BMD": [ + "BMD", + "بٔرمیوٗڑَن ڈالَر" + ], + "BND": [ + "BND", + "برٛونی ڈالَر" + ], + "BOB": [ + "BOB", + "بولÙÙˆÙیَن بولوینو" + ], + "BOP": [ + "BOP", + "بولویَن Ù¾ÙØ³Ùˆ" + ], + "BOV": [ + "BOV", + "بولوÙیَن مَوڈال" + ], + "BRB": [ + "BRB", + "برٛازیٖلین Ú©Ø±Ù›ÙˆØ²ÙØ±Ùˆ نووو" + ], + "BRC": [ + "BRC", + "برٛازیٖلین کرٛوزیڑو" + ], + "BRE": [ + "BRE", + "برٛازیٖلین Ú©Ø±Ù›ÙˆØ²ÙØ±Ùˆ" + ], + "BRL": [ + "R$", + "برٛازیٖلین رÙیَل" + ], + "BRN": [ + "BRN", + "برٛازیٖلین کرٛوزیڑو نووو" + ], + "BRR": [ + "BRR", + "برٛازیٖلین کرٛوزیرو" + ], + "BSD": [ + "BSD", + "Ø¨ÛØ§Ù…Ùیَن ڈالر" + ], + "BTN": [ + "BTN", + "بوٗٹینیٖز Ù†Ú¯Ùلٹرٛم" + ], + "BUK": [ + "BUK", + "بٔرمیٖز کیٹ" + ], + "BWP": [ + "BWP", + "بوٹٕسوانَن Ù¾Ùلا" + ], + "BYB": [ + "BYB", + "بÙلیروشÙیَن Ù†ÙÙˆ Ø±ÙØ¨Ù•Ù„" + ], + "BYN": [ + "BYN", + "بÙلیروشÙیَن Ø±ÙØ¨Ù•Ù„" + ], + "BYR": [ + "BYR", + "بÙلیروشÙیَن Ø±ÙØ¨Ù•Ù„ (۲۰۰۰–۲۰۱۶)" + ], + "BZD": [ + "BZD", + "بÙÙ„ÙØ²ÛŒ ڈالر" + ], + "CAD": [ + "CA$", + "کینَڑÙیَن ڈالر" + ], + "CDF": [ + "CDF", + "کونٛگولیٖز ÙØ±Ù›ÛŒÚ©" + ], + "CHE": [ + "CHE", + "ÙˆÙØ± یوٗرو" + ], + "CHF": [ + "CHF", + "سÙÙˆÙØ² ÙØ±ÛŒÚ©" + ], + "CHW": [ + "CHW", + "ÙˆÙØ± ÙØ±Ù›ÛŒÚ©" + ], + "CLF": [ + "CLF", + "Ú†ÙÙ„ÙÙ† یوٗنÙڑیدیٖز Ú‘Ù Ùومیٹو" + ], + "CLP": [ + "CLP", + "Ú†ÙÙ„ÙÙ† Ù¾ÙØ³Ùˆ" + ], + "CNY": [ + "CNÂ¥", + "چینیٖز یَن رÙنمÙنبی" + ], + "COP": [ + "COP", + "کولَمبÙین Ù¾ÙØ³Ùˆ" + ], + "COU": [ + "COU", + "ÙٖیوٗنÙڑیڑ ڑ٠ویلور رÙیل" + ], + "CRC": [ + "CRC", + "کوسٹا رÙÚ©ÙŽÙ† کولَن" + ], + "CSD": [ + "CSD", + "پرٛون سٔربÙین ڈالر" + ], + "CSK": [ + "CSK", + "Ú†Ùکوسولوواک ÛØ§Ú‘ کوروٗنا" + ], + "CUP": [ + "CUP", + "کیوٗبَن Ù¾ÙØ³Ùˆ" + ], + "CYP": [ + "CYP", + "کیپروٹ Ù¾ÙŽÙˆÙÚ‘" + ], + "CZK": [ + "CZK", + "چیک کوریٖنا" + ], + "DDM": [ + "DDM", + "مٔشرÙÙ‚ÛŒ جٔرمَن مارٕک" + ], + "DEM": [ + "DEM", + "جٔرمَن مارٕک" + ], + "DKK": [ + "DKK", + "ÚˆÙ”Ù†ÙØ´ کرٛون" + ], + "DOP": [ + "DOP", + "ڈومÙÙ†ÙÚ©ÙŽÙ† Ù¾ÙØ³Ùˆ" + ], + "DZD": [ + "DZD", + "اٮ۪لجیرÙیَن ڈیٖنار" + ], + "EEK": [ + "EEK", + "اٮ۪سٹونÙیَن کرٛون" + ], + "EGP": [ + "EGP", + "Ø§ÙØ¬ÙپٹÙیَن Ù¾ÙŽÙˆÙÙ†Ú‘" + ], + "ERN": [ + "ERN", + "رÙٹریٖن Ù†ÙŽÙکا" + ], + "ESP": [ + "ESP", + "سÙÙ¾ÛŒÙ†ÙØ´ پیسÙٹا" + ], + "ETB": [ + "ETB", + "Ø§ÙØªÚ¾ÙˆÙ¾Ùیَن Ø¨ÙØ±" + ], + "EUR": [ + "€", + "یوٗرو" + ], + "FIM": [ + "FIM", + "ÙÙÙ†ÙØ´ مارکا" + ], + "FJD": [ + "FJD", + "ÙÙØ¬ÛŒÙ† ڈالر" + ], + "FKP": [ + "FKP", + "ÙÛŒÚ©Ù„ÛŒÙ†Ù›Ú‘ÙØ³ آیلینٛڑ پونٛڑ" + ], + "FRF": [ + "FRF", + "ÙØ±Ù›Ø§Ù†Ø³Ùسی ÙØ±Ù›ÛŒÚ©" + ], + "GBP": [ + "£", + "برطٲنوی پاونٛڑ سٹٔرلÙÙ†Ù›Ú¯" + ], + "GEK": [ + "GEK", + "جارجÙیَن کیوٗپَن لَرÙÙ¹" + ], + "GEL": [ + "GEL", + "جارجÙیَن لاری" + ], + "GHC": [ + "GHC", + "گَنیٚیَن سٮ۪ڑی(۱۹۷۹–۲٠٠۷)" + ], + "GHS": [ + "GHS", + "گَنیٚیَن سٮ۪ڑی" + ], + "GIP": [ + "GIP", + "Ú¯ÙØ¨Ø±ÛŒÙ„ٹَر پَاونٛڑ" + ], + "GMD": [ + "GMD", + "گیمبÙیاÛÙÚ© دلاسی" + ], + "GNF": [ + "GNF", + "Ú¯ÙÙ†Ùیَن ÙØ±Ù›ÛŒÙ†Ù›Ú©" + ], + "GNS": [ + "GNS", + "Ú¯ÙÙ†Ùیَن سÙÙ„ÛŒ" + ], + "GQE": [ + "GQE", + "اÙکویٹورÙیَل Ú¯ÙÙ†Ùیَن اٮ۪کویٖل" + ], + "GRD": [ + "GRD", + "گریٖسÙÚ© ڑرٛٮ۪کما" + ], + "GTQ": [ + "GTQ", + "گواٹَمالَن قیوٗٹزَل" + ], + "GWE": [ + "GWE", + "پورتگیٖزÙÚ© Ú¯ÙÙ†ÛŒ اٮ۪سکیوٗڑو" + ], + "GWP": [ + "GWP", + "Ú¯ÙÙ†ÛŒ Ø¨ÙØ³Ø§ÙˆÙÚ© پٮ۪سو" + ], + "GYD": [ + "GYD", + "گَیَنیٖزÙÚ© ڑالَر" + ], + "HKD": [ + "HK$", + "حانٛگ کانٛگÙÚ© ڑالَر" + ], + "HNL": [ + "HNL", + "حونڑورنÙÚ© لٮ۪مپیٖرا" + ], + "HRD": [ + "HRD", + "کروایشنÙÚ© دیٖنار" + ], + "HRK": [ + "HRK", + "کروایشنÙÚ© کوٗنا" + ], + "HTG": [ + "HTG", + "حیشَنÙÚ© Ú¯ÙˆÚ‘" + ], + "HUF": [ + "HUF", + "حَنگیرÙیَن ÙورÙÙ†Ù›Ù¹" + ], + "IDR": [ + "IDR", + "اÙنڑونیشیاÛÙÚ© رÙÙ¾ÙیاÛ" + ], + "IEP": [ + "IEP", + "اَیرلینڑÙÚ© پاونٛڑ" + ], + "ILP": [ + "ILP", + "Ø§ÙØ²Ø±Ù²ÛŒÙÙ„ÛŒ پاونٛڑ" + ], + "ILS": [ + "₪", + "Ø§ÙØ²Ø±Ù²ÛŒÙÙ„ÛŒ Ù†Ù”ÙˆÛ Ø´Ù®ÛªÙ‚Ù•Ù„" + ], + "INR": [ + "₹", + "ÛÙÙ†Ø¯ÙØ³ØªÙ²Ù†Û رۄپَے" + ], + "IQD": [ + "IQD", + "ایٖراقÙÚ© دیٖنار" + ], + "IRR": [ + "IRR", + "ایٖرانÙÚ© رÙیال" + ], + "ISK": [ + "ISK", + "اَیسلینٛڑÙÚ© کرٛونا" + ], + "ITL": [ + "ITL", + "اÙٹلیٖ ÛŒÙÚ© لیٖرا" + ], + "JMD": [ + "JMD", + "جَمَیکاÛÙÚ© ڑالَر" + ], + "JOD": [ + "JOD", + "جَرڑینیاÛÙÚ© دیٖنار" + ], + "JPY": [ + "JPÂ¥", + "جاپانÙÚ© یَن" + ], + "KES": [ + "KES", + "کٮ۪نیَن Ø´ÙÙ„ÙÙ†Ù›Ú¯" + ], + "KGS": [ + "KGS", + "Ú©ÙØ±Ú¯ÙستانÙÚ© سوم" + ], + "KHR": [ + "KHR", + "کَمبوڑÙیاÛÙÚ© رÙیال" + ], + "KMF": [ + "KMF", + "کومورÙیَن ÙØ±Ù›ÛŒÙ†Ù›Ú©" + ], + "KPW": [ + "KPW", + "جنوٗبی کورÙیَن ÙˆÙŽÙ†" + ], + "KRW": [ + "â‚©", + "ساوتھ کورÙیَن ÙˆÙŽÙ†" + ], + "KWD": [ + "KWD", + "Ù‚ÙویتÙÚ© دیٖنار" + ], + "KYD": [ + "KYD", + "کیمین ججیٖرÙÚ© ڑالَر" + ], + "KZT": [ + "KZT", + "Ú©Ø²Ø§Ú©ÙØ³ØªØ§Ù† ٹینٛج" + ], + "LAK": [ + "LAK", + "لَوٹÙیَن Ú©ÙÙ¾" + ], + "LBP": [ + "LBP", + "لیبنیٖزÙÚ© پاونٛڑ" + ], + "LKR": [ + "LKR", + "سری لَنکاÛÙ•Ú† رۄپَے" + ], + "LRD": [ + "LRD", + "لَیبیرÙیَن ڑالَر" + ], + "LSL": [ + "LSL", + "Ù„ÙØ³ÙˆØªÚ¾Ùˆ لوٹی" + ], + "LTL": [ + "LTL", + "Ù„ÙØªÚ¾ÙˆÛŒÙ†Ùیَن Ù„Ùٹاس" + ], + "LTT": [ + "LTT", + "Ù„ÙØªÚ¾ÙˆÛŒÙ†Ùیَن ٹٮ۪لوناس" + ], + "LUC": [ + "LUC", + "لَکزٕمبورگÙیَن Ú©ÙŽÙ†Ø¤Ø±Ù¹ÙØ¨Ù•Ù„ ÙØ±Ù›ÛŒÙ†Ù›Ú©" + ], + "LUF": [ + "LUF", + "لَکزٕمبورگÙیَن ÙØ±Ù›ÛŒÙ†Ù›Ú©" + ], + "LUL": [ + "LUL", + "لَکزٕمبوگ Ùَینانشَل ÙØ±Ù›ÛŒÙ†Ù›Ú©" + ], + "LVL": [ + "LVL", + "لَتوÙیَن لیٹس" + ], + "LVR": [ + "LVR", + "لَتوÙیَن رَبٕل" + ], + "LYD": [ + "LYD", + "Ù„ÙØ¨ÛŒÙŽÙ† دیٖنار" + ], + "MAD": [ + "MAD", + "موروکَن Ø¯ÙØ±ÛÙŽÙ…" + ], + "MAF": [ + "MAF", + "موروکَن ÙØ±Ù›ÛŒÙ†Ù›Ú©" + ], + "MDL": [ + "MDL", + "مولڑووین لیوٗ" + ], + "MGA": [ + "MGA", + "مٮ۪لٮ۪گیسی اٮ۪ریَری" + ], + "MGF": [ + "MGF", + "مٮ۪لٮ۪گیسی ÙØ±Ù›ÛŒÙ†Ù›Ú©" + ], + "MKD": [ + "MKD", + "مٮ۪کَڑونÙیَن دیٖنار" + ], + "MLF": [ + "MLF", + "میلÙیَن ÙØ±Ù›ÛŒÙ†Ù›Ú©" + ], + "MMK": [ + "MMK", + "Ù…Ùیانما کیاٹ" + ], + "MNT": [ + "MNT", + "مۄنگولÙیَن Ù¹ÙگرÙÚ©" + ], + "MOP": [ + "MOP", + "مٮ۪کانیٖز پَٹاکا" + ], + "MRO": [ + "MRO", + "مورÙٹینÙیَن عوگیوٗیا" + ], + "MTL": [ + "MTL", + "مالٹیٖزÙÚ© لیٖرا" + ], + "MTP": [ + "MTP", + "مالٹیٖزÙÚ© پاونٛڑ" + ], + "MUR": [ + "MUR", + "مورٮ۪شÙیاÛÙ•Ú† رۄپَے" + ], + "MVR": [ + "MVR", + "مالدÙیٖوÙیَن رÙÙÙیا" + ], + "MWK": [ + "MWK", + "مٮ۪لیوÙیَن کواچا" + ], + "MXN": [ + "MX$", + "مٮ۪کسÙÚ©ÙŽÙ† پٮ۪سو" + ], + "MXP": [ + "MXP", + "مٮ۪کسÙÚ©ÙŽÙ† سÙلوَر پٮ۪سو (۱۸۶۱–۱۹۹۲)" + ], + "MYR": [ + "MYR", + "مَلیشÙیَن رÙÙ†Ù›Ú¯ÙÙ¹" + ], + "MZE": [ + "MZE", + "موزیمبÙÚ©ÙŽÙ† سکیوٗڑو" + ], + "MZM": [ + "MZM", + "پرٛون موزیمبÙÚ©ÙŽÙ† مٮ۪ٹÙÚ©ÙŽÙ„" + ], + "MZN": [ + "MZN", + "موزیمبÙÚ©ÙŽÙ† مٮ۪ٹÙÚ©ÙŽÙ„" + ], + "NAD": [ + "NAD", + "Ù†Ø§Ù…ÙØ¨Ùیَن ڑالَر" + ], + "NGN": [ + "NGN", + "نَیجیرÙیَن ڑالَر" + ], + "NIC": [ + "NIC", + "Ù†Ùکٮ۪راگÙوٮ۪ن کورڑوبا" + ], + "NIO": [ + "NIO", + "Ù†Ùکٮ۪راگÙوٮ۪ن کورڑوبا اورو" + ], + "NLG": [ + "NLG", + "ÚˆÙŽÚ† Ú¯Ùلڑَر" + ], + "NOK": [ + "NOK", + "نورویٚیÙÙ†ÙÚ© کرٛون" + ], + "NPR": [ + "NPR", + "نیپالٕچ رۄپَے" + ], + "NZD": [ + "NZ$", + "Ù†ÙوزیٖلینٛڑÙÚ© ڑالَر" + ], + "OMR": [ + "OMR", + "اومÙÙ†ÛŒ رÙیال" + ], + "PAB": [ + "PAB", + "پانامانÙیَن بالبوز" + ], + "PEI": [ + "PEI", + "پٔریوٗوÙیَن اÙÙ†Ù›Ù¹ÛŒ" + ], + "PEN": [ + "PEN", + "پٔریوٗوÙیَن نیوٗاوز سولٕز" + ], + "PES": [ + "PES", + "پٔریوٗوÙیَن سول" + ], + "PGK": [ + "PGK", + "نیوٗ Ù¾ÛŒÙ¾ÙØ¹Ø§ Ú¯ÙÙ†Ùیَن کیٖنا" + ], + "PHP": [ + "PHP", + "Ù¾Ú¾ÙÙ„ÙپایÙÙ”Ù† پٮ۪سو" + ], + "PKR": [ + "PKR", + "Ù¾Ø§Ú©ÙØ³ØªÙ²Ù†Û رۄپَے" + ], + "PLN": [ + "PLN", + "Ù¾ÙˆÙ„ÙØ´ زلوٹی" + ], + "PLZ": [ + "PLZ", + "Ù¾ÙˆÙ„ÙØ´ زلوٹی(۱۹۵٠–۱۹۹۵)" + ], + "PTE": [ + "PTE", + "پورتÙگیٖز اٮ۪سکیوٗڑو" + ], + "PYG": [ + "PYG", + "پٮ۪رٮ۪گیوٗوَیَن Ú¯ÙØ¹Ø§Ø±Ø§Ù†ÛŒ" + ], + "QAR": [ + "QAR", + "قطاری رÙیال" + ], + "RHD": [ + "RHD", + "رھوڑیشÙیَن ڑالَر" + ], + "ROL": [ + "ROL", + "اولڑ رومانÙیَن لٮ۪یوٗ" + ], + "RON": [ + "RON", + "رومانÙیَن لٮ۪یوٗ" + ], + "RSD": [ + "RSD", + "سٔربÙیَن دیٖنار" + ], + "RUB": [ + "RUB", + "رٔشیَن رَبٕل" + ], + "RUR": [ + "RUR", + "رٔشیَن رَبٕل(۱۹۹۱–۱۹۹۸)" + ], + "RWF": [ + "RWF", + "روانٛڑَن ÙØ±Ø§Ù†Ù›Ú©" + ], + "SAR": [ + "SAR", + "سودیٖیÙÚ© رÙیال" + ], + "SBD": [ + "SBD", + "سولَمَن جٔزیٖرÙÚ© ڈالَر" + ], + "SDD": [ + "SDD", + "پرون سوٗڈانÙÚ© دیٖنار" + ], + "SDG": [ + "SDG", + "سوٗڈانÙÚ© پونٛڈ" + ], + "SDP": [ + "SDP", + "پرون سوٗڈانÙÚ© پونٛڈ" + ], + "SEK": [ + "SEK", + "Ø³ÙˆÛŒÙ–ÚˆÙØ´ کَرونا" + ], + "SGD": [ + "SGD", + "سÙنگاپورÙÚ© ڈالَر" + ], + "SHP": [ + "SHP", + "سینٹ ÛیلÙنا پونٛڈ" + ], + "SIT": [ + "SIT", + "سلووینÙÚ© ٹولَر" + ], + "SKK": [ + "SKK", + "سلووَک کَرونا" + ], + "SOS": [ + "SOS", + "سومالی Ø´ÙÙ„ÙÙ†Ù›Ú¯" + ], + "SRD": [ + "SRD", + "Ø³ÙØ±ÛŒÙ–نامÙÚ© ڈالَر" + ], + "SRG": [ + "SRG", + "Ø³ÙØ±ÛŒÙ–نام Ú¯Ùلدَر" + ], + "SUR": [ + "SUR", + "سوویت روبٕل" + ], + "SVC": [ + "SVC", + "سَلویدَرÙÚ© کولَن" + ], + "SYP": [ + "SYP", + "سیٖریاÛÙÚ© پونٛڈ" + ], + "SZL": [ + "SZL", + "سوازی Ù„Ùلَنگیٚنی" + ], + "THB": [ + "THB", + "تھایھک بات" + ], + "TJR": [ + "TJR", + "ØªØ§Ø¬Ú©ÙØ³ØªØ§Ù†ÙÚ© رَبٕل" + ], + "TJS": [ + "TJS", + "تاجÙکتانÙÚ© سَمونی" + ], + "TMM": [ + "TMM", + "تÙÚ©ÙŽÙ…ÙŽÙ†ÙØ³ØªØ§Ù†ÙÚ© مَنَت" + ], + "TND": [ + "TND", + "Ù¹ÙنیشیاÛÙÚ© دیٖنار" + ], + "TOP": [ + "TOP", + "ٹونگَن پانٛگا" + ], + "TPE": [ + "TPE", + "ٹیموریٚسو ایٚکیٖڈو" + ], + "TRL": [ + "TRL", + "پرون ØªÙØ±Ú©ÙØ´ لیرا" + ], + "TRY": [ + "TRY", + "ØªÙØ±Ú©ÛŒÛÙÚ© لیرا" + ], + "TTD": [ + "TTD", + "ٹرÙÙ†Û٠ڈیڈ تÛÙ• ٹوبیگو ڈالَر" + ], + "TWD": [ + "NT$", + "نوٚو تیوانÙÚ© ڈالَر" + ], + "TZS": [ + "TZS", + "تَنزانیاÛÙÚ© Ø´ÙÙ„ÙÙ†Ù›Ú¯" + ], + "UAH": [ + "UAH", + "یوٗکرینیاÛÙÚ© ÛØ±ÙÙˆÙنیا" + ], + "UAK": [ + "UAK", + "یوٗکرینیاÛÙÚ© کاربووَنیٹس" + ], + "UGS": [ + "UGS", + "اÙگاداÛÙÚ© Ø´ÙÙ„ÙÙ†Ù›Ú¯(۱۹۶۶–۱۹۸۷)" + ], + "UGX": [ + "UGX", + "اÙگاداÛÙÚ© Ø´ÙÙ„ÙÙ†Ù›Ú¯" + ], + "USD": [ + "US$", + "یوٗ ایٚس ڈالَر" + ], + "USN": [ + "USN", + "یوٗ ایٚس ڈالَر(پَگاÛ)" + ], + "USS": [ + "USS", + "یوٗ ایٚس ڈالَر(تَمی دًۄÛ)" + ], + "UYI": [ + "UYI", + "Ø§ÙØ±Ú¯Ø§ÛŒÙŽÙ† پیٚسو یوٗنÙڈیڈَس اÙنڈیٚکسَس" + ], + "UYP": [ + "UYP", + "Ø§ÙØ±Ú¯Ø§ÛŒÙŽÙ† پیٚسو(۱۹۷۵–۱۹۹۳)" + ], + "UYU": [ + "UYU", + "Ø§ÙØ±ÙˆÙ—گایَن پیٚسو" + ], + "UZS": [ + "UZS", + "Ø§ÙØ¨ÛŒÚ©Ùستان سوم" + ], + "VEB": [ + "VEB", + "وینٕزوٗلیÙÚ© بولÙوَر (۱۸۷۱–۲۰۰۸)" + ], + "VEF": [ + "VEF", + "وینٕزوٗلیÙÚ© بولÙوَر" + ], + "VND": [ + "â‚«", + "ÙˆÙیَنَمÙÚ© ڈانٛگ" + ], + "VUV": [ + "VUV", + "وَنوٗاَتوٗ وَتوٗ" + ], + "WST": [ + "WST", + "سَمون تَلا" + ], + "XAF": [ + "FCFA", + "سی ایٚ٠اے ÙØ±ÛŒÙ†Ú© بی ایٖ اے سی" + ], + "XCD": [ + "EC$", + "مَشرÙÙ‚ÛŒ Ú©ÛŒØ±ÙØ¨Ùیَن ڈالَر" + ], + "XEU": [ + "XEU", + "یوٗرپی کَرَنسی یوٗنÙÙ¹" + ], + "XFO": [ + "XFO", + "ÙØ±ÛŒÙšÙ†Ú† گولڈ ÙØ±ÛŒÙ†Ú©" + ], + "XFU": [ + "XFU", + "ÙØ±ÛŒÙ›Ù†Ú† یوٗ اے سی ÙØ±ÛŒÙ†Ú©" + ], + "XOF": [ + "CFA", + "سی ایٚ٠اے ÙØ±ÛŒÙ†Ú© بی سی ایٖ اے او" + ], + "XPF": [ + "CFPF", + "سی ایٚ٠پی ÙØ±ÛŒÙ†Ú©" + ], + "XRE": [ + "XRE", + "آر Ø¢Û’ ایٚن ایٖ Ù¹ÛŒ ÙÙŽÙ†Ù›Úˆ" + ], + "YDD": [ + "YDD", + "یَمنÙÚ© دیٖنار" + ], + "YER": [ + "YER", + "یَمنÙÚ© رÙیال" + ], + "YUD": [ + "YUD", + "یوگوسلاوÙیَن ÛØ§Ú‘ دیٖنار" + ], + "YUM": [ + "YUM", + "یوگوسلاوÙیَن نووÙÛ’ دیٖنار" + ], + "YUN": [ + "YUN", + "یوگوسلاوÙیَن Ú©ÙŽÙ†Ø¤Ù¹ÙØ¨Ù•Ù„ دیٖنار" + ], + "ZAR": [ + "ZAR", + "Ø³Ø§ÙˆÙØªÚ¾ Ø§ÙØ±ÛŒÙ–کاÛÙÚ© رینڈ" + ], + "ZMK": [ + "ZMK", + "زÙمبابیÙÚ© کواچا (1968–2012)" + ], + "ZMW": [ + "ZMW", + "زÙمبابیÙÚ© کواچا" + ], + "ZRN": [ + "ZRN", + "زایرÙیَن Ù†ÙÙˆ Ø²Ø§ÛŒÙØ±" + ], + "ZRZ": [ + "ZRZ", + "زَیرÙÚ© ڈالَر" + ], + "ZWD": [ + "ZWD", + "زÙمبابÙÛŒÙÚ© ڈالَر" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ky.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ky.json new file mode 100644 index 0000000000000000000000000000000000000000..6b8b302942d7ec170c5b371fd19c2cf3561d9b90 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ky.json @@ -0,0 +1,633 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "Бириккен Ðраб Эмираттарынын дирхамы" + ], + "AFN": [ + "AFN", + "ÐфганÑтан афганиÑи" + ], + "ALL": [ + "ALL", + "албан леги" + ], + "AMD": [ + "AMD", + "ÐÑ€Ð¼ÐµÐ½Ð¸Ñ Ð´Ñ€Ð°Ð¼Ñ‹" + ], + "ANG": [ + "ANG", + "нидерланд-антил гулдени" + ], + "AOA": [ + "AOA", + "Ðнгола кванзаÑÑ‹" + ], + "ARS": [ + "ARS", + "аргентина пеÑоÑу" + ], + "AUD": [ + "AUD", + "ÐвÑÑ‚Ñ€Ð°Ð»Ð¸Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€Ñ‹" + ], + "AWG": [ + "AWG", + "аруба флорини" + ], + "AZN": [ + "AZN", + "Ðзербайжан манаты" + ], + "BAM": [ + "BAM", + "боÑниÑ-герцоговина конвертациÑлануучу маркаÑÑ‹" + ], + "BBD": [ + "BBD", + "Ð±Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€Ñ‹" + ], + "BDT": [ + "BDT", + "Бангладеш такаÑÑ‹" + ], + "BGN": [ + "BGN", + "болгар левиÑи" + ], + "BHD": [ + "BHD", + "Бахрейн динары" + ], + "BIF": [ + "BIF", + "Бурунди франкы" + ], + "BMD": [ + "BMD", + "бермуд доллары" + ], + "BND": [ + "BND", + "Бруней доллары" + ], + "BOB": [ + "BOB", + "Ð±Ð¾Ð»Ð¸Ð²Ð¸Ñ Ð±Ð¾Ð»Ð¸Ð²Ð¸Ð°Ð½Ð¾Ñу" + ], + "BRL": [ + "BRL", + "Ð±Ñ€Ð°Ð·Ð¸Ð»Ð¸Ñ Ñ€ÐµÐ°Ð»Ñ‹" + ], + "BSD": [ + "BSD", + "багама доллары" + ], + "BTN": [ + "BTN", + "Бутан нгултруму" + ], + "BWP": [ + "BWP", + "БотÑвана пулаÑÑ‹" + ], + "BYN": [ + "BYN", + "беларуÑÑŒ рублу" + ], + "BYR": [ + "BYR", + "беларуÑÑŒ рублу (2000–2016)" + ], + "BZD": [ + "BZD", + "белиз доллары" + ], + "CAD": [ + "CAD", + "канада доллары" + ], + "CDF": [ + "CDF", + "Конго франкы" + ], + "CHF": [ + "CHF", + "ÑˆÐ²ÐµÐ¹Ñ†Ð°Ñ€Ð¸Ñ Ñ„Ñ€Ð°Ð½ÐºÑ‹" + ], + "CLP": [ + "CLP", + "чили пеÑоÑу" + ], + "CNY": [ + "CNÂ¥", + "Кытай юаны" + ], + "COP": [ + "COP", + "ÐºÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ Ð¿ÐµÑоÑу" + ], + "CRC": [ + "CRC", + "коÑта-рика колону" + ], + "CUC": [ + "CUC", + "кубанын конвертациÑлануучу пеÑоÑу" + ], + "CUP": [ + "CUP", + "куба пеÑоÑу" + ], + "CVE": [ + "CVE", + "Кабо-Верде ÑÑкудоÑу" + ], + "CZK": [ + "CZK", + "чех кронаÑÑ‹" + ], + "DJF": [ + "DJF", + "Жибути франкы" + ], + "DKK": [ + "DKK", + "Ð´Ð°Ð½Ð¸Ñ ÐºÑ€Ð¾Ð½Ñƒ" + ], + "DOP": [ + "DOP", + "доминикан пеÑоÑу" + ], + "DZD": [ + "DZD", + "алжир динары" + ], + "EGP": [ + "EGP", + "египет фунту" + ], + "ERN": [ + "ERN", + "Эритреа накфаÑÑ‹" + ], + "ETB": [ + "ETB", + "Ð­Ñ„Ð¸Ð¾Ð¿Ð¸Ñ Ð±Ð¸Ñ€Ñ€Ð¸" + ], + "EUR": [ + "€", + "Евро" + ], + "FJD": [ + "FJD", + "Фижи доллары" + ], + "FKP": [ + "FKP", + "фолкленд аралдарынын фунту" + ], + "GBP": [ + "GBP", + "Ð±Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ Ñ„ÑƒÐ½Ñ‚ Ñтерлинги" + ], + "GEL": [ + "GEL", + "Ð“Ñ€ÑƒÐ·Ð¸Ñ Ð»Ð°Ñ€Ð¸Ñи" + ], + "GHS": [ + "GHS", + "Гана ÑедиÑи" + ], + "GIP": [ + "GIP", + "гибралтар фунту" + ], + "GMD": [ + "GMD", + "Ð“Ð°Ð¼Ð±Ð¸Ñ Ð´Ð°Ð»Ð°ÑиÑи" + ], + "GNF": [ + "GNF", + "Гине франкы" + ], + "GTQ": [ + "GTQ", + "гватемала кетÑалы" + ], + "GYD": [ + "GYD", + "гуйана доллары" + ], + "HKD": [ + "HKD", + "Гонконг доллары" + ], + "HNL": [ + "HNL", + "Ð³Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ Ð»ÐµÐ¼Ð¿Ð¸Ñ€Ð°ÑÑ‹" + ], + "HRK": [ + "HRK", + "хорват кунаÑÑ‹" + ], + "HTG": [ + "HTG", + "гаити гурдуÑу" + ], + "HUF": [ + "HUF", + "венгр форинти" + ], + "IDR": [ + "IDR", + "Ð˜Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ Ñ€ÑƒÐ¿Ð¸Ð¹Ð°ÑÑ‹" + ], + "ILS": [ + "ILS", + "Израилдин жаңы шекели" + ], + "INR": [ + "INR", + "Ð˜Ð½Ð´Ð¸Ñ Ñ€ÑƒÐ¿Ð¸Ñи" + ], + "IQD": [ + "IQD", + "Ирак динары" + ], + "IRR": [ + "IRR", + "Иран риалы" + ], + "ISK": [ + "ISK", + "иÑÐ»Ð°Ð½Ð´Ð¸Ñ ÐºÑ€Ð¾Ð½Ñƒ" + ], + "JMD": [ + "JMD", + "Ñмайка доллары" + ], + "JOD": [ + "JOD", + "Ð™Ð¾Ñ€Ð´Ð°Ð½Ð¸Ñ Ð´Ð¸Ð½Ð°Ñ€Ñ‹" + ], + "JPY": [ + "JPÂ¥", + "Жапан йени" + ], + "KES": [ + "KES", + "ÐšÐµÐ½Ð¸Ñ ÑˆÐ¸Ð»Ð»Ð¸Ð½Ð³Ð¸" + ], + "KGS": [ + "Ñом", + "КыргызÑтан Ñому" + ], + "KHR": [ + "KHR", + "Камбожа риели" + ], + "KMF": [ + "KMF", + "ÐšÐ¾Ð¼Ð¾Ñ€Ð¾Ñ Ñ„Ñ€Ð°Ð½ÐºÑ‹" + ], + "KPW": [ + "KPW", + "Түндүк ÐšÐ¾Ñ€ÐµÑ ÑƒÐ¾Ð½Ñƒ" + ], + "KRW": [ + "KRW", + "Түштүк ÐšÐ¾Ñ€ÐµÑ ÑƒÐ¾Ð½Ñƒ" + ], + "KWD": [ + "KWD", + "Кувейт динары" + ], + "KYD": [ + "KYD", + "кайман доллары" + ], + "KZT": [ + "KZT", + "КазакÑтан теӊгеÑи" + ], + "LAK": [ + "LAK", + "Ð›Ð°Ð¾Ñ ÐºÐ¸Ð±Ð¸" + ], + "LBP": [ + "LBP", + "Ливан фунту" + ], + "LKR": [ + "LKR", + "Шри Ланка рупиÑи" + ], + "LRD": [ + "LRD", + "Ð›Ð¸Ð±ÐµÑ€Ð¸Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€Ñ‹" + ], + "LTL": [ + "LTL", + "литва литаÑÑ‹" + ], + "LVL": [ + "LVL", + "Ð»Ð°Ñ‚Ð²Ð¸Ñ Ð»Ð°Ñ‚Ñ‹" + ], + "LYD": [ + "LYD", + "Ð»Ð¸Ð²Ð¸Ñ Ð´Ð¸Ð½Ð°Ñ€Ñ‹" + ], + "MAD": [ + "MAD", + "марокко дирхамы" + ], + "MDL": [ + "MDL", + "молдован лейи" + ], + "MGA": [ + "MGA", + "МадагаÑкар ариариÑи" + ], + "MKD": [ + "MKD", + "македон денары" + ], + "MMK": [ + "MMK", + "Мйанмар кйаты" + ], + "MNT": [ + "MNT", + "Монгол тугриги" + ], + "MOP": [ + "MOP", + "Макау патакаÑÑ‹" + ], + "MRO": [ + "MRO", + "ÐœÐ°Ð²Ñ€Ð¸Ñ‚Ð°Ð½Ð¸Ñ ÑƒÐ³Ð¸ÑÑÑ‹" + ], + "MUR": [ + "MUR", + "Мавританий рупиÑи" + ], + "MVR": [ + "MVR", + "Малдив руфийаÑÑ‹" + ], + "MWK": [ + "MWK", + "Малави квачаÑÑ‹" + ], + "MXN": [ + "MXN", + "мекÑика пеÑоÑу" + ], + "MYR": [ + "MYR", + "ÐœÐ°Ð»Ð°Ð¹Ð·Ð¸Ñ Ñ€Ð¸Ð½Ð³Ð³Ð¸Ñ‚Ð¸" + ], + "MZN": [ + "MZN", + "Мозамбик метикалы" + ], + "NAD": [ + "NAD", + "ÐÐ°Ð¼Ð¸Ð±Ð¸Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€Ñ‹" + ], + "NGN": [ + "NGN", + "ÐÐ¸Ð³ÐµÑ€Ð¸Ñ Ð½Ð°Ð¹Ñ€Ð°ÑÑ‹" + ], + "NIO": [ + "NIO", + "никарагуа кордобаÑÑ‹" + ], + "NOK": [ + "NOK", + "Ð½Ð¾Ñ€Ð²ÐµÐ³Ð¸Ñ ÐºÑ€Ð¾Ð½Ñƒ" + ], + "NPR": [ + "NPR", + "Ðепал рупиÑи" + ], + "NZD": [ + "NZD", + "Жаӊы Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€Ñ‹" + ], + "OMR": [ + "OMR", + "Оман риалы" + ], + "PAB": [ + "PAB", + "панама балбоаÑÑ‹" + ], + "PEN": [ + "PEN", + "перу нуÑво Ñолу" + ], + "PGK": [ + "PGK", + "Папуа Жаӊы Ð“Ð²Ð¸Ð½ÐµÑ ÐºÐ¸Ð½Ð°ÑÑ‹" + ], + "PHP": [ + "PHP", + "Филиппин пеÑоÑу" + ], + "PKR": [ + "PKR", + "ПакиÑтан рупиÑи" + ], + "PLN": [ + "PLN", + "польша злотыйы" + ], + "PYG": [ + "PYG", + "парагвай гуараниÑи" + ], + "QAR": [ + "QAR", + "Катар риалы" + ], + "RON": [ + "RON", + "румын лейи" + ], + "RSD": [ + "RSD", + "Ñерб динары" + ], + "RUB": [ + "RUB", + "Ð¾Ñ€ÑƒÑ Ñ€ÑƒÐ±Ð»Ñƒ" + ], + "RWF": [ + "RWF", + "Руанда франкы" + ], + "SAR": [ + "SAR", + "Сауд риалы" + ], + "SBD": [ + "SBD", + "Соломон аралдарынын доллары" + ], + "SCR": [ + "SCR", + "Сейшел рупиÑи" + ], + "SDG": [ + "SDG", + "Ñудан фунту" + ], + "SEK": [ + "SEK", + "ÑˆÐ²ÐµÑ†Ð¸Ñ ÐºÑ€Ð¾Ð½Ñƒ" + ], + "SGD": [ + "SGD", + "Сингапур доллары" + ], + "SHP": [ + "SHP", + "Ыйык Елена аралынын фунту" + ], + "SLL": [ + "SLL", + "Сиерра-Леоне леонеÑи" + ], + "SOS": [ + "SOS", + "Сомали шиллинги" + ], + "SRD": [ + "SRD", + "Ñуринам доллары" + ], + "SSP": [ + "SSP", + "Түштүк Судан фунту" + ], + "STD": [ + "STD", + "Сао Томе жана ПринÑипе добраÑÑ‹" + ], + "SYP": [ + "SYP", + "Ð¡Ð¸Ñ€Ð¸Ñ Ñ„ÑƒÐ½Ñ‚Ñƒ" + ], + "SZL": [ + "SZL", + "Свази лилангени" + ], + "THB": [ + "฿", + "Тай баты" + ], + "TJS": [ + "TJS", + "ТажикÑтан ÑомониÑи" + ], + "TMT": [ + "TMT", + "ТүркмөнÑтан манаты" + ], + "TND": [ + "TND", + "Ñ‚ÑƒÐ½Ð¸Ñ Ð´Ð¸Ð½Ð°Ñ€Ñ‹" + ], + "TOP": [ + "TOP", + "Тонга паангаÑÑ‹" + ], + "TRY": [ + "TRY", + "Ð¢Ò¯Ñ€ÐºÐ¸Ñ Ð»Ð¸Ñ€Ð°ÑÑ‹" + ], + "TTD": [ + "TTD", + "тринидад жана тобаго доллары" + ], + "TWD": [ + "TWD", + "Тайвань жаӊы доллары" + ], + "TZS": [ + "TZS", + "Ð¢Ð°Ð½Ð·Ð°Ð½Ð¸Ñ ÑˆÐ¸Ð»Ð»Ð¸Ð½Ð³Ð¸" + ], + "UAH": [ + "UAH", + "украин гривени" + ], + "UGX": [ + "UGX", + "Уганда шиллинги" + ], + "USD": [ + "USD", + "ÐКШ доллары" + ], + "UYU": [ + "UYU", + "уругвай пеÑоÑу" + ], + "UZS": [ + "UZS", + "ӨзбекÑтан Ñуму" + ], + "VEF": [ + "VEF", + "венеÑуÑла боливары" + ], + "VND": [ + "â‚«", + "Вьетнам доӊу" + ], + "VUV": [ + "VUV", + "Вануату ватуÑу" + ], + "WST": [ + "WST", + "Самоа талаÑÑ‹" + ], + "XAF": [ + "FCFA", + "Борбордук Ðфрика КФРфранкы" + ], + "XCD": [ + "XCD", + "чыгыш кариб доллары" + ], + "XOF": [ + "CFA", + "КФРфранкы" + ], + "XPF": [ + "CFPF", + "КФП франкы" + ], + "YER": [ + "YER", + "Йемен риалы" + ], + "ZAR": [ + "ZAR", + "Түштүк Ðфрика ранды" + ], + "ZMW": [ + "ZMW", + "Ð—Ð°Ð¼Ð±Ð¸Ñ ÐºÐ²Ð°Ñ‡Ð°ÑÑ‹" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lb.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lb.json new file mode 100644 index 0000000000000000000000000000000000000000..80795b95a12bf23344b518969833e7139a12846a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lb.json @@ -0,0 +1,1061 @@ +{ + "Version": "2.1.28.76", + "Names": { + "ADP": [ + "ADP", + "Andorranesch Peseta" + ], + "AED": [ + "AED", + "VAE-Dirham" + ], + "AFA": [ + "AFA", + "Afghanesch Afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "Afghanesch Afghani" + ], + "ALL": [ + "ALL", + "Albanesche Lek" + ], + "AMD": [ + "AMD", + "Armeneschen Dram" + ], + "ANG": [ + "ANG", + "Antillen-Gulden" + ], + "AOA": [ + "AOA", + "Angolanesche Kwanza" + ], + "AOK": [ + "AOK", + "Angolanesche Kwanza (1977–1990)" + ], + "AON": [ + "AON", + "Angolaneschen Neie Kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angolanesche Kwanza Reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentineschen Austral" + ], + "ARP": [ + "ARP", + "Argentinesche Peso (1983–1985)" + ], + "ARS": [ + "ARS", + "Argentinesche Peso" + ], + "ATS": [ + "öS", + "Éisträichesche Schilling" + ], + "AUD": [ + "AU$", + "Australeschen Dollar" + ], + "AWG": [ + "AWG", + "Aruba-Florin" + ], + "AZM": [ + "AZM", + "Aserbaidschan-Manat (1993–2006)" + ], + "AZN": [ + "AZN", + "Aserbaidschan-Manat" + ], + "BAD": [ + "BAD", + "Bosnien an Herzegowina Dinar (1992–1994)" + ], + "BAM": [ + "BAM", + "Bosnien an Herzegowina Konvertéierbar Mark" + ], + "BBD": [ + "BBD", + "Barbados-Dollar" + ], + "BDT": [ + "BDT", + "Bangladesch-Taka" + ], + "BEC": [ + "BEC", + "Belsche Frang (konvertibel)" + ], + "BEF": [ + "BEF", + "Belsche Frang" + ], + "BEL": [ + "BEL", + "Belsche Finanz-Frang" + ], + "BGL": [ + "BGL", + "Bulgaresch Lew (1962–1999)" + ], + "BGN": [ + "BGN", + "Bulgaresch Lew" + ], + "BHD": [ + "BHD", + "Bahrain-Dinar" + ], + "BIF": [ + "BIF", + "Burundi-Frang" + ], + "BMD": [ + "BMD", + "Bermuda-Dollar" + ], + "BND": [ + "BND", + "Brunei-Dollar" + ], + "BOB": [ + "BOB", + "Bolivianesche Boliviano" + ], + "BOP": [ + "BOP", + "Bolivianesche Peso" + ], + "BOV": [ + "BOV", + "Bolivianseche Mvdol" + ], + "BRB": [ + "BRB", + "Brasilianesche Cruzeiro Novo (1967–1986)" + ], + "BRC": [ + "BRC", + "Brasilianesche Cruzado (1986–1989)" + ], + "BRE": [ + "BRE", + "Brasilianesche Cruzeiro (1990–1993)" + ], + "BRL": [ + "R$", + "Brasilianesche Real" + ], + "BRN": [ + "BRN", + "Brasilianesche Cruzado Novo (1989–1990)" + ], + "BRR": [ + "BRR", + "Brasilianesche Cruzeiro (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Brasilianesche Cruzeiro (1942–1967)" + ], + "BSD": [ + "BSD", + "Bahama-Dollar" + ], + "BTN": [ + "BTN", + "Bhutan-Ngultrum" + ], + "BUK": [ + "BUK", + "Birmanesche Kyat" + ], + "BWP": [ + "BWP", + "Botswanesch Pula" + ], + "BYB": [ + "BYB", + "Wäissrussesche Rubel (1994–1999)" + ], + "BYN": [ + "BYN", + "Wäissrussesche Rubel" + ], + "BYR": [ + "BYR", + "Wäissrussesche Rubel (2000–2016)" + ], + "BZD": [ + "BZD", + "Belize-Dollar" + ], + "CAD": [ + "CA$", + "Kanadeschen Dollar" + ], + "CDF": [ + "CDF", + "Kongo-Frang" + ], + "CHE": [ + "CHE", + "WIR-Euro" + ], + "CHF": [ + "CHF", + "Schwäizer Frang" + ], + "CHW": [ + "CHW", + "WIR-Frang" + ], + "CLF": [ + "CLF", + "Chileneschen Unidad de Fomento" + ], + "CLP": [ + "CLP", + "Chilenesche Peso" + ], + "CNY": [ + "CNÂ¥", + "Renminbi Yuan" + ], + "COP": [ + "COP", + "Kolumbianesche Peso" + ], + "CRC": [ + "CRC", + "Costa-Rica-Colón" + ], + "CSD": [ + "CSD", + "Serbeschen Dinar (2002–2006)" + ], + "CSK": [ + "CSK", + "Tschechoslowakesch Kroun" + ], + "CUC": [ + "CUC", + "Kubanesche Peso (konvertibel)" + ], + "CUP": [ + "CUP", + "Kubanesche Peso" + ], + "CVE": [ + "CVE", + "Kap-Verde-Escudo" + ], + "CYP": [ + "CYP", + "Zypern-Pond" + ], + "CZK": [ + "CZK", + "Tschechesch Kroun" + ], + "DDM": [ + "DDM", + "DDR-Mark" + ], + "DEM": [ + "DEM", + "Däitsch Mark" + ], + "DJF": [ + "DJF", + "Dschibuti-Frang" + ], + "DKK": [ + "DKK", + "Dänesch Kroun" + ], + "DOP": [ + "DOP", + "Dominikanesche Peso" + ], + "DZD": [ + "DZD", + "Algereschen Dinar" + ], + "ECS": [ + "ECS", + "Ecuadorianesche Sucre" + ], + "ECV": [ + "ECV", + "Verrechnungseenheete fir Ecuador" + ], + "EEK": [ + "EEK", + "Estnesch Kroun" + ], + "EGP": [ + "EGP", + "Egyptescht Pond" + ], + "ERN": [ + "ERN", + "Eritréieschen Nakfa" + ], + "ESA": [ + "ESA", + "Spuenesch Peseta (A–Konten)" + ], + "ESB": [ + "ESB", + "Spuenesch Peseta (konvertibel)" + ], + "ESP": [ + "ESP", + "Spuenesch Peseta" + ], + "ETB": [ + "ETB", + "Ethiopescht Birr" + ], + "EUR": [ + "€", + "Euro" + ], + "FIM": [ + "FIM", + "Finnesch Mark" + ], + "FJD": [ + "FJD", + "Fidschi-Dollar" + ], + "FKP": [ + "FKP", + "Falkland-Pond" + ], + "FRF": [ + "FRF", + "Franséische Frang" + ], + "GBP": [ + "£", + "Britescht Pond" + ], + "GEK": [ + "GEK", + "Georgesche Kupon Larit" + ], + "GEL": [ + "GEL", + "Georgesche Lari" + ], + "GHC": [ + "GHC", + "Ghanaeschen Cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "Ghanaeschen Cedi" + ], + "GIP": [ + "GIP", + "Gibraltar-Pond" + ], + "GMD": [ + "GMD", + "Gambia-Dalasi" + ], + "GNF": [ + "GNF", + "Guinea-Frang" + ], + "GNS": [ + "GNS", + "Guinéiesche Syli" + ], + "GQE": [ + "GQE", + "Equatorialguinea-Ekwele" + ], + "GRD": [ + "GRD", + "Griichesch Drachme" + ], + "GTQ": [ + "GTQ", + "Guatemaltekesche Quetzal" + ], + "GWE": [ + "GWE", + "Portugisesch-Guinea Escudo" + ], + "GWP": [ + "GWP", + "Guinea-Bissau Peso" + ], + "GYD": [ + "GYD", + "Guyana-Dollar" + ], + "HKD": [ + "HK$", + "Hong-Kong-Dollar" + ], + "HNL": [ + "HNL", + "Honduras-Lempira" + ], + "HRD": [ + "HRD", + "Kroateschen Dinar" + ], + "HRK": [ + "HRK", + "Kroatesche Kuna" + ], + "HTG": [ + "HTG", + "Haitianesch Gourde" + ], + "HUF": [ + "HUF", + "Ungaresche Forint" + ], + "IDR": [ + "IDR", + "Indonesesch Rupiah" + ], + "IEP": [ + "IEP", + "Irescht Pond" + ], + "ILP": [ + "ILP", + "Israelescht Pond" + ], + "ILS": [ + "₪", + "Israeleschen Neie Schekel" + ], + "INR": [ + "₹", + "Indesch Rupie" + ], + "IQD": [ + "IQD", + "Irakeschen Dinar" + ], + "IRR": [ + "IRR", + "Iranesch Rial" + ], + "ISK": [ + "ISK", + "Islännesch Kroun" + ], + "ITL": [ + "ITL", + "Italienesch Lira" + ], + "JMD": [ + "JMD", + "Jamaika-Dollar" + ], + "JOD": [ + "JOD", + "Jordaneschen Dinar" + ], + "JPY": [ + "Â¥", + "Japanesche Yen" + ], + "KES": [ + "KES", + "Kenia-Schilling" + ], + "KGS": [ + "KGS", + "Kirgisesche Som" + ], + "KHR": [ + "KHR", + "Kambodschanesche Riel" + ], + "KMF": [ + "KMF", + "Komore-Frang" + ], + "KPW": [ + "KPW", + "Nordkoreanesche Won" + ], + "KRW": [ + "â‚©", + "Südkoreanesche Won" + ], + "KWD": [ + "KWD", + "Kuwait-Dinar" + ], + "KYD": [ + "KYD", + "Kaiman-Dollar" + ], + "KZT": [ + "KZT", + "Kasacheschen Tenge" + ], + "LAK": [ + "LAK", + "Laoteschen Kip" + ], + "LBP": [ + "LBP", + "Libanesescht Pond" + ], + "LKR": [ + "LKR", + "Sri-Lanka-Rupie" + ], + "LRD": [ + "LRD", + "Liberianeschen Dollar" + ], + "LSL": [ + "LSL", + "Loti" + ], + "LTL": [ + "LTL", + "Litauesche Litas" + ], + "LTT": [ + "LTT", + "Litaueschen Talonas" + ], + "LUC": [ + "LUC", + "Lëtzebuerger Frang (konvertibel)" + ], + "LUF": [ + "LUF", + "Lëtzebuerger Frang" + ], + "LUL": [ + "LUL", + "Lëtzebuerger Finanz-Frang" + ], + "LVL": [ + "LVL", + "Lettesche Lats" + ], + "LVR": [ + "LVR", + "Lettesche Rubel" + ], + "LYD": [ + "LYD", + "Libeschen Dinar" + ], + "MAD": [ + "MAD", + "Marokkaneschen Dirham" + ], + "MAF": [ + "MAF", + "Marokkanesche Frang" + ], + "MDL": [ + "MDL", + "Moldawesche Leu" + ], + "MGA": [ + "MGA", + "Madagaskar-Ariary" + ], + "MGF": [ + "MGF", + "Madagaskar-Frang" + ], + "MKD": [ + "MKD", + "Mazedoneschen Denar" + ], + "MLF": [ + "MLF", + "Malesche Frang" + ], + "MMK": [ + "MMK", + "Myanmaresche Kyat" + ], + "MNT": [ + "MNT", + "Mongoleschen Tögrög" + ], + "MOP": [ + "MOP", + "Macau-Pataca" + ], + "MRO": [ + "MRO", + "Mauretaneschen Ouguiya" + ], + "MTL": [ + "MTL", + "Maltesesch Lira" + ], + "MTP": [ + "MTP", + "Maltesescht Pond" + ], + "MUR": [ + "MUR", + "Mauritius-Rupie" + ], + "MVR": [ + "MVR", + "Maldiven-Rupie" + ], + "MWK": [ + "MWK", + "Malawi-Kwacha" + ], + "MXN": [ + "MX$", + "Mexikanesche Peso" + ], + "MXP": [ + "MXP", + "Mexikanesche Sëlwer-Peso (1861–1992)" + ], + "MXV": [ + "MXV", + "Mexikaneschen Unidad de Inversion (UDI)" + ], + "MYR": [ + "MYR", + "Malayseschen Ringgit" + ], + "MZE": [ + "MZE", + "Mosambikaneschen Escudo" + ], + "MZM": [ + "MZM", + "Mosambikanesche Metical (1980–2006)" + ], + "MZN": [ + "MZN", + "Mosambikanesche Metical" + ], + "NAD": [ + "NAD", + "Namibia-Dollar" + ], + "NGN": [ + "NGN", + "Nigerianeschen Naira" + ], + "NIC": [ + "NIC", + "Nicaraguanesche Córdoba (1988–1991)" + ], + "NIO": [ + "NIO", + "Nicaraguanesche Córdoba" + ], + "NLG": [ + "NLG", + "Hollännesche Gulden" + ], + "NOK": [ + "NOK", + "Norwegesch Kroun" + ], + "NPR": [ + "NPR", + "Nepalesesch Rupie" + ], + "NZD": [ + "NZ$", + "Neiséiland-Dollar" + ], + "OMR": [ + "OMR", + "Omanesche Rial" + ], + "PAB": [ + "PAB", + "Panamaesche Balboa" + ], + "PEI": [ + "PEI", + "Peruaneschen Inti" + ], + "PEN": [ + "PEN", + "Peruaneschen Neie Sol" + ], + "PES": [ + "PES", + "Peruanesche Sol (1863–1965)" + ], + "PGK": [ + "PGK", + "Papua-Neiguinéiesche Kina" + ], + "PHP": [ + "PHP", + "Philippinnesche Peso" + ], + "PKR": [ + "PKR", + "Pakistanesch Rupie" + ], + "PLN": [ + "PLN", + "Polneschen Zloty" + ], + "PLZ": [ + "PLZ", + "Polneschen Zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugiseschen Escudo" + ], + "PYG": [ + "PYG", + "Paraguayeschen Guaraní" + ], + "QAR": [ + "QAR", + "Katar-Riyal" + ], + "RHD": [ + "RHD", + "Rhodeseschen Dollar" + ], + "ROL": [ + "ROL", + "Rumänesche Leu (1952–2006)" + ], + "RON": [ + "RON", + "Rumänesche Leu" + ], + "RSD": [ + "RSD", + "Serbeschen Dinar" + ], + "RUB": [ + "RUB", + "Russesche Rubel" + ], + "RUR": [ + "RUR", + "Russesche Rubel (1991–1998)" + ], + "RWF": [ + "RWF", + "Ruanda-Frang" + ], + "SAR": [ + "SAR", + "Saudi-Rial" + ], + "SBD": [ + "SBD", + "Salomonen-Dollar" + ], + "SCR": [ + "SCR", + "Seychellen-Rupie" + ], + "SDD": [ + "SDD", + "Sudaneseschen Dinar (1992–2007)" + ], + "SDG": [ + "SDG", + "Sudanesescht Pond" + ], + "SDP": [ + "SDP", + "Sudanesescht Pond (1957–1998)" + ], + "SEK": [ + "SEK", + "Schwedesch Kroun" + ], + "SGD": [ + "SGD", + "Singapur-Dollar" + ], + "SHP": [ + "SHP", + "St. Helena-Pond" + ], + "SIT": [ + "SIT", + "Sloweneschen Tolar" + ], + "SKK": [ + "SKK", + "Slowakesch Kroun" + ], + "SLL": [ + "SLL", + "Sierra-leonesche Leone" + ], + "SOS": [ + "SOS", + "Somalia-Schilling" + ], + "SRD": [ + "SRD", + "Surinameschen Dollar" + ], + "SRG": [ + "SRG", + "Surinamesche Gulden" + ], + "SSP": [ + "SSP", + "Südsudanesescht Pond" + ], + "STD": [ + "STD", + "São-toméeschen Dobra" + ], + "SUR": [ + "SUR", + "Sowjetesche Rubel" + ], + "SVC": [ + "SVC", + "El-Salvador-Colón" + ], + "SYP": [ + "SYP", + "Syrescht Pond" + ], + "SZL": [ + "SZL", + "Swasilännesche Lilangeni" + ], + "THB": [ + "฿", + "Thailännesche Baht" + ], + "TJR": [ + "TJR", + "Tadschikistan-Rubel" + ], + "TJS": [ + "TJS", + "Tadschikistan-Somoni" + ], + "TMM": [ + "TMM", + "Turkmenistan-Manat (1993–2009)" + ], + "TMT": [ + "TMT", + "Turkmenistan-Manat" + ], + "TND": [ + "TND", + "Tuneseschen Dinar" + ], + "TOP": [ + "TOP", + "Tongaeschen PaÊ»anga" + ], + "TPE": [ + "TPE", + "Timor-Escudo" + ], + "TRL": [ + "TRL", + "Tierkesch Lira (1922–2005)" + ], + "TRY": [ + "TRY", + "Tierkesch Lira" + ], + "TTD": [ + "TTD", + "Trinidad-an-Tobago-Dollar" + ], + "TWD": [ + "NT$", + "Neien Taiwan-Dollar" + ], + "TZS": [ + "TZS", + "Tansania-Schilling" + ], + "UAH": [ + "UAH", + "Ukraineschen Hrywnja" + ], + "UAK": [ + "UAK", + "Ukrainesche Karbovanetz" + ], + "UGS": [ + "UGS", + "Uganda-Schilling (1966–1987)" + ], + "UGX": [ + "UGX", + "Uganda-Schilling" + ], + "USD": [ + "$", + "US-Dollar" + ], + "USN": [ + "USN", + "US Dollar (Nächsten Dag)" + ], + "USS": [ + "USS", + "US Dollar (Selwechten Dag)" + ], + "UYP": [ + "UYP", + "Uruguayesche Peso (1975–1993)" + ], + "UYU": [ + "UYU", + "Uruguayesche Peso" + ], + "UZS": [ + "UZS", + "Usbekistan-Sum" + ], + "VEB": [ + "VEB", + "Venezolanesche Bolívar (1871–2008)" + ], + "VEF": [ + "VEF", + "Venezolanesche Bolívar" + ], + "VND": [ + "â‚«", + "Vietnameseschen Dong" + ], + "VUV": [ + "VUV", + "Vanuatu-Vatu" + ], + "WST": [ + "WST", + "Samoaneschen Tala" + ], + "XAF": [ + "FCFA", + "CFA-Frang (BEAC)" + ], + "XCD": [ + "EC$", + "Ostkaribeschen Dollar" + ], + "XEU": [ + "XEU", + "Europäesch Währungseenheet (XEU)" + ], + "XFO": [ + "XFO", + "Franséische Gold-Frang" + ], + "XFU": [ + "XFU", + "Franséischen UIC-Frang" + ], + "XOF": [ + "CFA", + "CFA-Frang (BCEAO)" + ], + "XPF": [ + "CFPF", + "CFP-Frang" + ], + "XRE": [ + "XRE", + "RINET Funds" + ], + "YDD": [ + "YDD", + "Jemen-Dinar" + ], + "YER": [ + "YER", + "Jemen-Rial" + ], + "YUD": [ + "YUD", + "Jugoslaweschen Dinar (1966–1990)" + ], + "YUM": [ + "YUM", + "Jugoslaweschen Neien Dinar (1994–2002)" + ], + "YUN": [ + "YUN", + "Jugoslaweschen Dinar (konvertibel)" + ], + "ZAL": [ + "ZAL", + "Südafrikanesche Rand (Finanz)" + ], + "ZAR": [ + "ZAR", + "Südafrikanesche Rand" + ], + "ZMK": [ + "ZMK", + "Kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha" + ], + "ZRN": [ + "ZRN", + "Zaire-Neien Zaïre (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zaire-Zaïre (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Simbabwe-Dollar (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Simbabwe-Dollar (2009)" + ], + "ZWR": [ + "ZWR", + "Simbabwe-Dollar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lg.json new file mode 100644 index 0000000000000000000000000000000000000000..b7e1b87d7da856521e9ef986d6a65a771fbbf0e6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lg.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AED": [ + "AED", + "Diraamu eya Emireeti" + ], + "AOA": [ + "AOA", + "Kwanza ey’Angola" + ], + "AUD": [ + "A$", + "Doola ey’Awusiturelya" + ], + "BHD": [ + "BHD", + "Dinaali ey’eBaareeni" + ], + "BIF": [ + "BIF", + "Faranga ey’eburundi" + ], + "BWP": [ + "BWP", + "Pula ey’eBotiswana" + ], + "CAD": [ + "CA$", + "Doola ey’eKanada" + ], + "CDF": [ + "CDF", + "Faranga ey’eKongo" + ], + "CHF": [ + "CHF", + "Faranga ey’eSwitizirandi" + ], + "CNY": [ + "CNÂ¥", + "Yuwani Reniminibi ey’eCayina" + ], + "CVE": [ + "CVE", + "Esikudo ey’Keepu Veredi" + ], + "DJF": [ + "DJF", + "Faranga ey’eJjibuti" + ], + "DZD": [ + "DZD", + "Dinaali ey’Aligerya" + ], + "EGP": [ + "EGP", + "Pawundi ey’eMisiri" + ], + "ERN": [ + "ERN", + "Nakifa ey’Eritureya" + ], + "ETB": [ + "ETB", + "Biiru ey’Esyopya" + ], + "EUR": [ + "€", + "Yuro" + ], + "GBP": [ + "£", + "Pawundi ey’eBungereza" + ], + "GHC": [ + "GHC", + "Sedi ey’eGana" + ], + "GMD": [ + "GMD", + "Dalasi ey’eGambya" + ], + "GNS": [ + "GNS", + "Faranga ey’eGini" + ], + "INR": [ + "₹", + "Rupiya ey’eBuyindi" + ], + "JPY": [ + "JPÂ¥", + "Yeni ey’eJapani" + ], + "KES": [ + "KES", + "Silingi ey’eKenya" + ], + "KMF": [ + "KMF", + "Faranga ey’eKomoro" + ], + "LRD": [ + "LRD", + "Doola ey’eLiberya" + ], + "LSL": [ + "LSL", + "Loti ey’eLesoso" + ], + "LYD": [ + "LYD", + "Dinaali ey’eLibya" + ], + "MAD": [ + "MAD", + "Diraamu ey’eMoroko" + ], + "MGA": [ + "MGA", + "Faranga ey’eMalagase" + ], + "MRO": [ + "MRO", + "Wugwiya ey’eMawritenya" + ], + "MUR": [ + "MUR", + "Rupiya ey’eMawurisyasi" + ], + "MWK": [ + "MWK", + "Kwaca ey’eMalawi" + ], + "MZM": [ + "MZM", + "Metikaali ey’eMozambiiki" + ], + "NAD": [ + "NAD", + "Doola ey’eNamibiya" + ], + "NGN": [ + "NGN", + "Nayira ey’eNayijerya" + ], + "RWF": [ + "RWF", + "Faranga ey’eRwanda" + ], + "SAR": [ + "SAR", + "Riyaali ey’eBuwarabu" + ], + "SCR": [ + "SCR", + "Rupiya ey’eSesere" + ], + "SDG": [ + "SDG", + "Dinaali ey’eSudaani" + ], + "SDP": [ + "SDP", + "Pawundi ey’eSudaani" + ], + "SHP": [ + "SHP", + "Pawundi ey’eSenti Herena" + ], + "SLL": [ + "SLL", + "Lewone" + ], + "SOS": [ + "SOS", + "Silingi ey’eSomaliya" + ], + "STD": [ + "STD", + "Dobura ey’eSantome ne Purincipe" + ], + "SZL": [ + "SZL", + "Lilangeni" + ], + "TND": [ + "TND", + "Dinaali ey’eTunizya" + ], + "TZS": [ + "TZS", + "Silingi ey’eTanzaniya" + ], + "UGX": [ + "USh", + "Silingi eya Yuganda" + ], + "USD": [ + "US$", + "Doola ey’Amerika" + ], + "XAF": [ + "FCFA", + "Faranga ey’omu Afirika eya wakati" + ], + "XOF": [ + "CFA", + "Faranga ey’omu Afirika ey’ebugwanjuba" + ], + "ZAR": [ + "ZAR", + "Randi ey’eSawusafirika" + ], + "ZMK": [ + "ZMK", + "Kwaca ey’eZambya (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwaca ey’eZambya" + ], + "ZWD": [ + "ZWD", + "Doola ey’eZimbabwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ln.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ln.json new file mode 100644 index 0000000000000000000000000000000000000000..5c353313e5890c0c0ee70102a94f88f2e08878cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ln.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AED": [ + "AED", + "DirihamÉ› ya Lémila alabo" + ], + "AOA": [ + "AOA", + "Kwanza ya Angóla" + ], + "AUD": [ + "A$", + "DolarÉ› ya Ositali" + ], + "BHD": [ + "BHD", + "DinarÉ› ya BahrÉ›nÉ›" + ], + "BIF": [ + "BIF", + "Falánga ya Burundi" + ], + "BWP": [ + "BWP", + "Pula ya Botswana" + ], + "CAD": [ + "CA$", + "DolarÉ› ya Kanadá" + ], + "CDF": [ + "FC", + "Falánga ya Kongó" + ], + "CHF": [ + "CHF", + "Falánga ya SwisÉ›" + ], + "CNY": [ + "CNÂ¥", + "YuanÉ› Renminbi ya SinÉ›" + ], + "CVE": [ + "CVE", + "Esikudo ya KapevÉ›rÉ›" + ], + "DJF": [ + "DJF", + "Falánga ya Dzibuti" + ], + "DZD": [ + "DZD", + "DinarÉ› ya Alizeri" + ], + "EGP": [ + "EGP", + "PaunÉ› ya EzípitÉ›" + ], + "ERN": [ + "ERN", + "Nakfa ya ElitlÉ›" + ], + "ETB": [ + "ETB", + "BirÉ› ya Etsiópi" + ], + "EUR": [ + "€", + "ÆlÉ”Ì" + ], + "GBP": [ + "£", + "PaunÉ› ya AngÉ›lÉ›tÉ›ÌlÉ›" + ], + "GHC": [ + "GHC", + "Sedi ya Gana" + ], + "GMD": [ + "GMD", + "Dalasi ya Gambi" + ], + "GNS": [ + "GNS", + "Falánga ya GinÉ›" + ], + "INR": [ + "₹", + "Rupi ya ÃndÉ›" + ], + "JPY": [ + "JPÂ¥", + "Yeni ya ZapÉ”" + ], + "KES": [ + "KES", + "ShilingÉ› ya Kenya" + ], + "KMF": [ + "KMF", + "Falánga ya Komoro" + ], + "LRD": [ + "LRD", + "DolarÉ› ya Liberya" + ], + "LSL": [ + "LSL", + "Loti ya Lesóto" + ], + "LYD": [ + "LYD", + "DinarÉ› ya Libí" + ], + "MAD": [ + "MAD", + "Dirihame ya MarokÉ›" + ], + "MGA": [ + "MGA", + "Falánga ya MadagasikarÉ›" + ], + "MRO": [ + "MRO", + "Ugwiya ya Moritani" + ], + "MUR": [ + "MUR", + "Rupi ya Morisi" + ], + "MWK": [ + "MWK", + "Kwasha ya Malawi" + ], + "MZM": [ + "MZM", + "Metikali ya Mozambiki" + ], + "NAD": [ + "NAD", + "DolarÉ› ya Namibi" + ], + "NGN": [ + "NGN", + "Naira ya Nizerya" + ], + "RWF": [ + "RWF", + "Falánga ya Rwanda" + ], + "SAR": [ + "SAR", + "RiyalÉ› ya Alabi SawuditÉ›" + ], + "SCR": [ + "SCR", + "Rupi ya SÉ›shÉ›lÉ›" + ], + "SDG": [ + "SDG", + "DinarÉ› ya Sudá" + ], + "SDP": [ + "SDP", + "PaunÉ› ya Sudá" + ], + "SHP": [ + "SHP", + "PaunÉ› ya Sántu elena" + ], + "SLL": [ + "SLL", + "LeonÉ›" + ], + "SOS": [ + "SOS", + "ShilingÉ› ya Somali" + ], + "STD": [ + "STD", + "Dobra ya Sao Tomé mpé Presipe" + ], + "SZL": [ + "SZL", + "Lilangeni" + ], + "TND": [ + "TND", + "DinarÉ› ya Tinizi" + ], + "TZS": [ + "TZS", + "ShilingÉ› ya Tanzani" + ], + "UGX": [ + "UGX", + "ShilingÉ› ya Uganda" + ], + "USD": [ + "US$", + "DolarÉ› ya Ameriki" + ], + "XAF": [ + "FCFA", + "Falánga CFA BEAC" + ], + "XOF": [ + "CFA", + "Falánga CFA BCEAO" + ], + "ZAR": [ + "ZAR", + "RandÉ› ya Afríka Súdi" + ], + "ZMK": [ + "ZMK", + "Kwasha ya Zambi (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwasha ya Zambi" + ], + "ZWD": [ + "ZWD", + "DolarÉ› ya ZimbabwÉ›" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ln_AO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ln_AO.json new file mode 100644 index 0000000000000000000000000000000000000000..506f805620ed8bb265e68cd3518c8d15b07e546e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ln_AO.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AOA": [ + "Kz", + "Kwanza ya Angóla" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lo.json new file mode 100644 index 0000000000000000000000000000000000000000..e1c88cd5755f4ef1c2b212e5f5ea4b19ec225dd8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lo.json @@ -0,0 +1,1125 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "ເປເຊຕາ ອັນໂດລາ" + ], + "AED": [ + "AED", + "ສະ​ຫະ​ລັດ​ອາ​ຣັບ​ອາ​ມິ​ເຣດ ເດີ​à»àº®àº¡" + ], + "AFA": [ + "AFA", + "ອັບàºàº²àº™àº´ ອັບàºàº²àº™àº´àºªàº°àº–ານ (1927–2002)" + ], + "AFN": [ + "AFN", + "ອັຟ​àºàº±àº™ ອັຟ​àºàº²â€‹àº™àº´" + ], + "ALL": [ + "ALL", + "ອັລ​ບາ​ນຽນ ເລàº" + ], + "AMD": [ + "AMD", + "ອາ​ເມ​ນຽນ à»àº”ຣມ" + ], + "ANG": [ + "ANG", + "ເນ​ເທີ​à»àº¥àº™ à»àº­àº™â€‹àº•ິ​ລຽນ àºàº´àº§â€‹à»€àº”ີ" + ], + "AOA": [ + "AOA", + "à»àº­àº‡â€‹à»‚àºâ€‹àº¥àº±àº™ ຄວນ​ຊາ" + ], + "AOK": [ + "AOK", + "àºàº§àº²àº™àºŠàº² à»àº­àº‡à»‚àºàº¥àº² (1977–1991)" + ], + "AON": [ + "AON", + "àºàº§àº²àº™àºŠàº² à»àº­àº‡à»‚àºàº¥àº² ໃà»à»ˆ (1995–1999)" + ], + "AOR": [ + "AOR", + "àºàº§àº²àº™àºŠàº²àºàº—ີ່à»àºà»‰à»„ຂໃà»à»ˆ à»àº­àº‡àºàº¹àº¥àº² (1995–1999)" + ], + "ARA": [ + "ARA", + "ອອສຕຣານ ອາàºàºŠàº±àº‡àº•ິນ" + ], + "ARL": [ + "ARL", + "ເປໂຊເລ ອາàºàºŠàº±àº‡àº•ິນ (1970–1983)" + ], + "ARM": [ + "ARM", + "ເປໂຊ ອາàºàºŠàº±àº‡àº•ິນ (1881–1970)" + ], + "ARP": [ + "ARP", + "ເປໂຊ ອາàºàºŠàº±àº‡àº•ິນ (1983–1985)" + ], + "ARS": [ + "ARS", + "ອາ​ເຈນ​ທິ​ນາ ເປ​ໂຊ" + ], + "ATS": [ + "ATS", + "ຊິລລິງ ອົດສະຕາລີ" + ], + "AUD": [ + "A$", + "ອອສ​ເຕຣ​ລຽນ ໂດ​ລ່າ" + ], + "AWG": [ + "AWG", + "ອະຣູà»àºšàº™ ຟລà»àº£àº´àº™" + ], + "AZM": [ + "AZM", + "ມານັດ ອາà»àºŠàºàºšàº²àºàºŠàº²àº™ (1993–2006)" + ], + "AZN": [ + "AZN", + "ອາ​ເຊີ​ໄບ​ຈາ​ນິ ມາ​ນັດ" + ], + "BAD": [ + "BAD", + "ດີນາ ບອສເນຠເຮີເຊໂບວາເນຠ(1992–1994)" + ], + "BAM": [ + "BAM", + "ບອ​ສ​ເນàº-ເຮີ​ເຊ​ໂàºàº§àº´â€‹àº™àº² ຄອນ​ເວີດ​ຕິ​ໂບ ມາàº" + ], + "BAN": [ + "BAN", + "ດີນາໃà»à»ˆ ບອສເນຠເຮີເຊໂບວີນາ(1994–1997)" + ], + "BBD": [ + "BBD", + "ໂດລ່າ ບາບາດຽນ" + ], + "BDT": [ + "BDT", + "ບັງ​ຄລາ​ເທດ ຕາ​àºàº²" + ], + "BEC": [ + "BEC", + "ຟຣັງ ບູນàºàº²àº¥àºµ (ປ່ຽນà»àº›àº‡à»„ດ້)" + ], + "BEF": [ + "BEF", + "ຟຣັງ ບູນàºàº²àº¥àºµ" + ], + "BEL": [ + "BEL", + "ຟຣັງ ບູນàºàº²àº¥àºµ (àºàº²àº™à»€àº‡àº´àº™)" + ], + "BGL": [ + "BGL", + "ຮາດເລບ ບູນàºàº²àº¥àºµ" + ], + "BGM": [ + "BGM", + "ເລບ ສັງຄົມບູນàºàº²àº¥àºµ" + ], + "BGN": [ + "BGN", + "ບັງ​àºàº²â€‹àº£àº½àº™ ເລບ" + ], + "BGO": [ + "BGO", + "ເລບ ບູນàºàº²àº¥àºµ (1879–1952)" + ], + "BHD": [ + "BHD", + "ບາ​ໄຣ​ນິ ດິ​ນາ" + ], + "BIF": [ + "BIF", + "ບຸ​ຣັນ​ດຽນ ຟຣັງ" + ], + "BMD": [ + "BMD", + "ໂດ​ລ່າ​ເບີ​ມິວ​ດາ" + ], + "BND": [ + "BND", + "ບຣູ​ໄນ ໂດ​ລ່າ" + ], + "BOB": [ + "BOB", + "ໂບ​ລິ​ວຽນ ໂບ​ລິ​ເວàºâ€‹à»‚ນ" + ], + "BOL": [ + "BOL", + "ໂລລິເວàºà»‚ນ ໂລລິເວຠ(1863–1963)" + ], + "BOP": [ + "BOP", + "ເປໂຊໂລລິເວàº" + ], + "BOV": [ + "BOV", + "ມະດອນ ໂລລິເວàº" + ], + "BRB": [ + "BRB", + "àºàº£àº¹à»€àºŠà»‚ດບາຊິ ໃà»à»ˆ (1967–1986)" + ], + "BRC": [ + "BRC", + "àºàº£àº¹àºŠàº²à»‚ດບາຊິວ (1986–1989)" + ], + "BRE": [ + "BRE", + "àºàº£àº¹à»€àºŠà»‚ຣ ບາຊິ àºàº£àº¹à»‚ຊ ບາຊິວ (1993–1994)" + ], + "BRL": [ + "R$", + "ບຣາ​ຊິ​ລຽນ ຣຽວ" + ], + "BRN": [ + "BRN", + "àºàº£àº¹àºŠàº²à»‚ດ ບາຊິວ ໃà»à»ˆ (1989–1990)" + ], + "BRR": [ + "BRR", + "àºàº£àº¹à»€àºŠà»‚ຣ ບາຊິວ (1993–1994)" + ], + "BRZ": [ + "BRZ", + "àºàº£àº¹à»€àºŠà»‚ຣ ບາຊິວ (1942–1967)" + ], + "BSD": [ + "BSD", + "ໂດລ່າ ບາຮາມຽນ" + ], + "BTN": [ + "BTN", + "ພູ​ຖານ ງຸນດຣັມ" + ], + "BUK": [ + "BUK", + "ຈາດ ພະມ້າ" + ], + "BWP": [ + "BWP", + "ບອດ​ສະ​ວາ​ນານ ພູ​ລາ" + ], + "BYB": [ + "BYB", + "ຣູໂບ ເບຣາຣຸສ ໃà»à»ˆ(1994–1999)" + ], + "BYN": [ + "BYN", + "ເບ​ລາ​ຣຸ​ສ​ຊຽນ ຣູ​ເບິນ" + ], + "BYR": [ + "BYR", + "ເບ​ລາ​ຣຸ​ສ​ຊຽນ ຣູ​ເບິນ (2000–2016)" + ], + "BZD": [ + "BZD", + "ໂດ​ລ່າ​ເບ​ລິ​ຊ" + ], + "CAD": [ + "CA$", + "ໂດລ່າຄານາດາ" + ], + "CDF": [ + "CDF", + "ຄອງ​ໂàºâ€‹àº¥àºµàºª ຟຣັງ" + ], + "CHE": [ + "CHE", + "ເອີໂຣ WIR" + ], + "CHF": [ + "CHF", + "ສະ​ວິ​ສ ຟ​ຣັງ" + ], + "CHW": [ + "CHW", + "ຟຣັງ WIR" + ], + "CLE": [ + "CLE", + "ເອສàºàº¹à»‚ດ ຊິລີ" + ], + "CLF": [ + "CLF", + "ຫົວໜ່ວàºàºšàº±àº™àºŠàºµ (UF) ຊິລີ" + ], + "CLP": [ + "CLP", + "ຊິ​ລຽນ ເປ​ໂຊ" + ], + "CNY": [ + "CNÂ¥", + "ຈີນ ຢວນ" + ], + "COP": [ + "COP", + "ໂຄ​ລົມ​ບຽນ ເປ​ໂຊ" + ], + "COU": [ + "COU", + "ຫົວໜ່ວàºàº„່າຈິງ ໂຄລັມເບàº" + ], + "CRC": [ + "CRC", + "ໂຄສຕາ ຣິàºàº±àº™ ໂຄລອນ" + ], + "CSD": [ + "CSD", + "ດີນາ ເຊີເບຠ(2002–2006)" + ], + "CSK": [ + "CSK", + "ຮາດໂàºàº£àº¹àº™àº² ເຊັàºà»‚àºàºªàº°à»‚ລວັàº" + ], + "CUC": [ + "CUC", + "ຄິວà»àºšàº™ ຄອນເວີດຕິໂບ ເປໂຊ" + ], + "CUP": [ + "CUP", + "ຄິວà»àºšàº™ ເປໂຊ" + ], + "CVE": [ + "CVE", + "ເຄບ ເວີດ​ດີນ ເອ​ສ​ຄູ​ໂດ" + ], + "CYP": [ + "CYP", + "ປອນ ໄຊປຣັດ" + ], + "CZK": [ + "CZK", + "ໂຄ​ຣູ​ນາ ເຊàº" + ], + "DDM": [ + "DDM", + "ມາຠເຢàºàº¥àº°àº¡àº±àº™ ຕາເວັນອອàº" + ], + "DEM": [ + "DEM", + "ມາຠເຢàºàº¥àº°àº¡àº±àº™" + ], + "DJF": [ + "DJF", + "​ດິ​ບູ​ຈຽນ ຟຣັງ" + ], + "DKK": [ + "DKK", + "à»àº”ນ​ນິ​ຊ ໂຄຣນ" + ], + "DOP": [ + "DOP", + "ໂດ​ມິ​ນິ​àºàº±àº™ ເປ​ໂຊ" + ], + "DZD": [ + "DZD", + "ອັລ​ເຈີ​ຣຽນ ດິ​ນາ" + ], + "ECS": [ + "ECS", + "ຊູເຠເອàºàº²àº§àº²àº”à»" + ], + "ECV": [ + "ECV", + "ຫົວໜ່ວàºàº„່າຄົງທີ່ຂອງເອàºàº²àº§àº²àº”à»" + ], + "EEK": [ + "EEK", + "ຄຣູນເອສ ໂຕເນàº" + ], + "EGP": [ + "EGP", + "ອີ​ຢິບ​ທຽນ ພາວດ໌" + ], + "ERN": [ + "ERN", + "ອິ​ຣິ​ທຣຽນ à»àº™àºâ€‹àºŸâ€‹àº²" + ], + "ESA": [ + "ESA", + "ເປເຊຕາສະເປັນ (ບັນຊີ)" + ], + "ESB": [ + "ESB", + "ເປເຊຕາສະເປນ (ປ່ຽນà»àº›àº‡à»„ດ້)" + ], + "ESP": [ + "ESP", + "ເປເຊຕາ ສະເປນ" + ], + "ETB": [ + "ETB", + "ເອ​ທິ​ໂອ​ປຽນ ເບີ​ຣ໌" + ], + "EUR": [ + "€", + "ຢູ​ໂຣ" + ], + "FIM": [ + "FIM", + "ມາàºàºàº² ຟິນà»àº¥àº™" + ], + "FJD": [ + "FJD", + "ຟິ​ຈຽນ ໂດ​ລ່າ" + ], + "FKP": [ + "FKP", + "ຟອ​ລ໌àºâ€‹à»àº¥àº™ ໄອ​à»àº¥àº™â€‹àºªà»Œ ພາວ​ດ໌" + ], + "FRF": [ + "FRF", + "ຟຣັງ àºàº£àº±à»ˆàº‡" + ], + "GBP": [ + "£", + "ປອນ ສະ​ເຕີ​ຣິງ (ອັງ​àºàº´àº”)" + ], + "GEK": [ + "GEK", + "àºàº¹àº›àº­àº™ ລາຣິທ ຈà»à»€àºˆàº" + ], + "GEL": [ + "GEL", + "ຈà»â€‹àºˆàº½àº™ ລາ​ຣິ" + ], + "GHC": [ + "GHC", + "ເຊດີ àºàº²àº™àº² (1979–2007)" + ], + "GHS": [ + "GHS", + "ເຊ​ດິ àºàº²â€‹àº™àº²â€‹àº­àº½àº™" + ], + "GIP": [ + "GIP", + "àºàº´àºšâ€‹àº£àº²â€‹àº—າ ພາ​ວດ໌" + ], + "GMD": [ + "GMD", + "​à»àºàº¡â€‹àºšàº½àº™ ດາ​ລາ​ຊິ" + ], + "GNF": [ + "GNF", + "àºàº´â€‹àº™àº½àº™ ຟຣັງ" + ], + "GNS": [ + "GNS", + "ໄຊລິ àºàºµàº™àºµ" + ], + "GQE": [ + "GQE", + "ເອັàºà»€àº§à»€àº¥ ອີຄວາຕິຣຽວ àºàº´àº™àºµ" + ], + "GRD": [ + "GRD", + "ດາàºàºŠàº°àº¡àº² ເàºàº£àº±àº" + ], + "GTQ": [ + "GTQ", + "àºàº»àº§à»€àº•ມາລານ ເຄັດຊອນ" + ], + "GWE": [ + "GWE", + "ເອສàºàº¹à»‚ດ àºàºµàº™àºµà»‚ປຕູເàºàº”" + ], + "GWP": [ + "GWP", + "ເປໂຊàºàº´àº™àºµ-ບິສເຊົາ" + ], + "GYD": [ + "GYD", + "àºàº²àºâ€‹àº¢àº²â€‹àº™àºµâ€‹àºª ໂດ​ລ່າ" + ], + "HKD": [ + "HK$", + "ຮອງ​àºàº»àº‡ ໂດ​ລ່າ" + ], + "HNL": [ + "HNL", + "ຮອນດູà»àº£àº™ ເລມພິຣາ" + ], + "HRD": [ + "HRD", + "ດີນາ ໂຄຣເອເຊàº" + ], + "HRK": [ + "HRK", + "ໂຄຣ​ເອ​ທຽນ ຄູ​ນາ" + ], + "HTG": [ + "HTG", + "ໄຮ​ຕຽນ àºàº»àº§â€‹à»€àº”" + ], + "HUF": [ + "HUF", + "ຮັງ​àºàº²â€‹àº£àº½àº™ ຟà»â€‹àº£àº´àº™" + ], + "IDR": [ + "IDR", + "ອິນ​ໂດ​ເນ​ຊຽນ ໂດ​ລ່າ" + ], + "IEP": [ + "IEP", + "ປອນ ໄອຣິຊ" + ], + "ILP": [ + "ILP", + "ປອນ ອີສະລາເອວ" + ], + "ILS": [ + "₪", + "ອິສ​ຣາ​ເອວ​ລິ ນິວ ເຊ​ເàºàº§" + ], + "INR": [ + "₹", + "ອິນ​ເດຠຣູ​ປີ" + ], + "IQD": [ + "IQD", + "ອິ​ຣັàºâ€‹àºàº´ ດິ​ນາ" + ], + "IRR": [ + "IRR", + "ອິ​ຣາ​ນິ ຣຽວ" + ], + "ISK": [ + "ISK", + "ໄອ​ສ໌​à»àº¥àº™â€‹àº”ິຠໂຄຣ​ນາ" + ], + "ITL": [ + "ITL", + "ລິຣາ ອີຕາລີ" + ], + "JMD": [ + "JMD", + "​ຈາ​ໄມ​àºàº±àº™ ໂດ​ລ່າ" + ], + "JOD": [ + "JOD", + "ຈà»â€‹à»àº”​ນຽນ ດິ​ນາ" + ], + "JPY": [ + "JPÂ¥", + "àºàºµà»ˆâ€‹àº›àº¸à»ˆàº™ ເຢນ" + ], + "KES": [ + "KES", + "ເຄນ​ຢັນ ຊິວ​ລິງ" + ], + "KGS": [ + "KGS", + "ຄ​ຣີ​àºàº´àºªâ€‹â€‹àº–າ​ນິ ໂຊມ" + ], + "KHR": [ + "KHR", + "àºàº³â€‹àº›àº¹â€‹à»€àºˆàº ຣຽວ" + ], + "KMF": [ + "KMF", + "ໂຄ​ໂມ​ຣຽນ ຟຣັງ" + ], + "KPW": [ + "KPW", + "ເàºàº»àº²â€‹àº«àº¥àºµâ€‹à»€à»œàº·àº­ ວອນ" + ], + "KRH": [ + "KRH", + "ຮາວານ ເàºàº»àº²àº«àº¼àºµà»€àº™àº·à»‰" + ], + "KRO": [ + "KRO", + "ວອນ ເàºàº»àº²àº«àº¼àºµà»ƒàº•້ (1945–1953)" + ], + "KRW": [ + "â‚©", + "ເàºàº»àº²â€‹àº«àº¥àºµà»ƒàº•້ ວອນ" + ], + "KWD": [ + "KWD", + "ຄູ​ເວ​ຕິ ດິ​ນາ" + ], + "KYD": [ + "KYD", + "ເຄ​à»àº¡àº™ ໄອ​à»àº¥àº™ ໂດ​ລ່າ" + ], + "KZT": [ + "KZT", + "ຄາ​ຊັàºâ€‹àºªàº°â€‹àº–າ​ນິ ເຕັງ​ເຈ" + ], + "LAK": [ + "â‚­", + "ລາວ àºàºµàºš" + ], + "LBP": [ + "LBP", + "ເລ​ບາ​ນີ​ສ ພາວດ໌" + ], + "LKR": [ + "LKR", + "ສີ​ລັງ​àºàº² ຣູ​ປີ" + ], + "LRD": [ + "LRD", + "ລິ​ເບີ​ຣຽນ ໂດ​ລ່າ" + ], + "LSL": [ + "LSL", + "ໂລຕິ ເລໂຊໂຕ" + ], + "LTL": [ + "LTL", + "ລິ​ທົວ​ນຽນ ລິ​ທັ​ສ" + ], + "LTT": [ + "LTT", + "ທາໂລນັສ ລິທົວເນàº" + ], + "LUC": [ + "LUC", + "ຟຣັງ ລຸàºàºŠàº³àºšàº§àº ທີ່ປ່ຽນà»àº›àº‡" + ], + "LUF": [ + "LUF", + "ຟຣັງ ລຸàºàºŠàº³àºšàº§àº" + ], + "LUL": [ + "LUL", + "ຟຣັງ ລຸàºàºŠàº³àºšàº§àº àºàº²àº™à»€àº‡àº´àº™" + ], + "LVL": [ + "LVL", + "ລັດ​ວຽນ ລັດ​ສ໌" + ], + "LVR": [ + "LVR", + "ຣູໂບ ລາວຽນ" + ], + "LYD": [ + "LYD", + "ລິບ​ບຽນ ດິ​ນາ" + ], + "MAD": [ + "MAD", + "ມà»â€‹àº£àº±àº­àºâ€‹à»àº„ນ​ ເດີ​à»àº®àº¡" + ], + "MAF": [ + "MAF", + "ຟຣັງ ໂມຣອàºà»‚àº" + ], + "MCF": [ + "MCF", + "ຟຣັງ ໂມດາໂàº" + ], + "MDC": [ + "MDC", + "ບັດປັນສ່ວນ ມອງໂດວາ" + ], + "MDL": [ + "MDL", + "ມອນ​ໂດ​à»àº§àº™ ເລ​ອູ" + ], + "MGA": [ + "MGA", + "ມາ​ລາ​àºàº²â€‹àºŠàºµ ອາ​ເຣàºâ€‹àº£àºµ" + ], + "MGF": [ + "MGF", + "ຟຣັງ ມາດາàºàº±àº”ສະàºàº²" + ], + "MKD": [ + "MKD", + "à»àº¡àº±àºâ€‹à»€àºŠâ€‹à»‚ດ​ນຽນ ເດ​ນາ" + ], + "MKN": [ + "MKN", + "ດີນາ ມາຊີໂດເນຠ(1992–1993)" + ], + "MLF": [ + "MLF", + "ຟຣັງ ມາລີ" + ], + "MMK": [ + "MMK", + "ມຽນ​ມາ ຈ໊າດ" + ], + "MNT": [ + "MNT", + "ມອງ​ໂàºâ€‹àº¥àº½àº™ ຕູàºàº£àº´àº" + ], + "MOP": [ + "MOP", + "ມາ​ເàºàº»à»‰àº² ປາ​​ຕາ​àºàº²" + ], + "MRO": [ + "MRO", + "ມົວ​ຣິ​ທາ​ນຽນ ອູ​àºàº´àº§â€‹àº¢àº²" + ], + "MTL": [ + "MTL", + "ລິຣາ ມອນຕາ" + ], + "MTP": [ + "MTP", + "ປອນ ມອນຕາ" + ], + "MUR": [ + "MUR", + "ເມົາ​ຣິ​ທຽນ ຣູ​ປີ" + ], + "MVR": [ + "MVR", + "ມັ​ລ​ດິ​ວຽນ ຣູ​ຟິ​ຢາ" + ], + "MWK": [ + "MWK", + "ມາ​ລາ​ວຽນ ຄວາ​ຊາ" + ], + "MXN": [ + "MX$", + "ເມັàºàºŠàº´àºàº±àº™ ເປໂຊ" + ], + "MXP": [ + "MXP", + "ຫົວໜ່ວàºà»€àº‡àº´àº™ ເປໂຊ à»àº¡àº±àºàºŠàº´à»‚àº(1861–1992)" + ], + "MXV": [ + "MXV", + "ຫົວໜ່ວàºàºàº²àº™àº¥àº»àº‡àº—ຶນ à»àº¡àº±àºàºŠàº´à»‚àº" + ], + "MYR": [ + "MYR", + "ມາ​ເລ​ເຊຠຣິງ​àºàº´àº”" + ], + "MZE": [ + "MZE", + "ເອສàºàº¹à»‚ດ ໂມຊຳບິàº" + ], + "MZM": [ + "MZM", + "ເມຕິຄ໠ໂມຊຳບິຠ(1980–2006)" + ], + "MZN": [ + "MZN", + "ໂມ​à»àºŠàº¡â€‹àºšàº´â€‹àºàº±àº™ ເມ​ທິ​ຄອນ" + ], + "NAD": [ + "NAD", + "ນາ​ມິ​ບຽນ ໂດ​ລ່າ" + ], + "NGN": [ + "NGN", + "ໄນ​ຣາ ​ໄນເຈີ​ຣຽນ" + ], + "NIC": [ + "NIC", + "ຄà»à»‚ດບາ ນິàºàº²àº£àº²àºàº»àº§ (1988–1991)" + ], + "NIO": [ + "NIO", + "ນິàºàº²àº£àº²àºàº§àº™ ໂຄໂດບາ" + ], + "NLG": [ + "NLG", + "àºàº´àº¥à»€àº”ີ ເນເທີà»àº¥àº™" + ], + "NOK": [ + "NOK", + "ນà»â€‹à»€àº§â€‹àºàº½àº™ ​ໂຄຣນ" + ], + "NPR": [ + "NPR", + "ເນ​ປານ ຣູ​ປີ" + ], + "NZD": [ + "NZ$", + "ນິວ​ຊີ​à»àº¥àº™ ໂດ​ລ່າ" + ], + "OMR": [ + "OMR", + "ໂອ​ມາ​ນິ ຣຽວ" + ], + "PAB": [ + "PAB", + "ພານາມານຽນ ບອນບົວ" + ], + "PEI": [ + "PEI", + "ອິນຕິ ເປຣູ" + ], + "PEN": [ + "PEN", + "ເປ​ຣູ​ວຽນ ນູ​ໂວ ໂຊ​ລ໌" + ], + "PES": [ + "PES", + "ໂຊນ ເປຣູ (1863–1965)" + ], + "PGK": [ + "PGK", + "ປາ​ປົວ ນິວ àºàº´â€‹àº™àº½àº™ àºàº´â€‹àº™àº²" + ], + "PHP": [ + "PHP", + "ຟິ​ລິບ​ປິນ ເປ​ໂຊ" + ], + "PKR": [ + "PKR", + "ປາ​àºàº´â€‹àºªàº–ານ ຣູ​ປີ" + ], + "PLN": [ + "PLN", + "ໂປ​ລິ​ຊ ຊະ​ລà»â€‹àº•ີ" + ], + "PLZ": [ + "PLZ", + "ຊະລອສຕີ ໂປà»àº¥àº™ (1950–1995)" + ], + "PTE": [ + "PTE", + "ເອສàºàº¹à»‚ດ ໂປຕູເàºàºª" + ], + "PYG": [ + "PYG", + "àºàº§àº²àº£àº²àº™àºµ ປາຣາàºàº§àº²àº" + ], + "QAR": [ + "QAR", + "ຄາ​ຕາ​ຣິ ຣຽວ" + ], + "RHD": [ + "RHD", + "ດອນລາ ໂຣດີເຊàº" + ], + "ROL": [ + "ROL", + "ລິວ ໂຣມາເນàºà»€àºàº»à»ˆàº²" + ], + "RON": [ + "RON", + "ໂຣ​ມາ​ນຽນ ເລ​ອູ" + ], + "RSD": [ + "RSD", + "ເຊີ​ບຽນ ດິ​ນາ" + ], + "RUB": [ + "RUB", + "ຣັສ​ຊຽນ ຣູ​ເບິນ" + ], + "RUR": [ + "RUR", + "ຣູໂບ ຣັດເຊຠ(1991–1998)" + ], + "RWF": [ + "RWF", + "ຣະ​ວັນ​ດັນ ຟຣັງ" + ], + "SAR": [ + "SAR", + "ຊາ​ອູ​ດິ ຣິ​ຢອນ" + ], + "SBD": [ + "SBD", + "ໂຊ​ໂລມອນ ໄອ​à»àº¥àº™ ໂດ​ລ່າ" + ], + "SCR": [ + "SCR", + "ເຊ​ເຊວ​ລອàºâ€‹àºªà»Œ ຣູ​ປີ" + ], + "SDD": [ + "SDD", + "ດີນາ ຊູດານເàºàº»à»ˆàº²" + ], + "SDG": [ + "SDG", + "ຊູ​ດານ​ນີ​ສ ພາວດ໌" + ], + "SDP": [ + "SDP", + "ປອນ ຊູດານເàºàº»à»ˆàº²" + ], + "SEK": [ + "SEK", + "ສະ​ວີ​ດິ​ຊ ໂຄຣ​ນາ" + ], + "SGD": [ + "SGD", + "ສິງ​àºàº°â€‹à»‚ປ ໂດ​ລ່າ" + ], + "SHP": [ + "SHP", + "ເຊນ ເຮ​ເລ​ນາ ພາວດ໌" + ], + "SIT": [ + "SIT", + "ໂຕລາ ສະໂລວິເນàº" + ], + "SKK": [ + "SKK", + "ຄູໂຣນາ ສະໂລວັàº" + ], + "SLL": [ + "SLL", + "ເຊàºâ€‹àº™àº² ​ເລໂອ​ນຽນ ເລ​ໂອນ" + ], + "SOS": [ + "SOS", + "ໂຊ​ມາ​ລິ ຊິວ​ລິງ" + ], + "SRD": [ + "SRD", + "ຊູ​ຣິ​ນາ​ມີ​ສ ໂດ​ລ່າ" + ], + "SRG": [ + "SRG", + "àºàº´àº¥à»€àº”ີ ຊູຣິນາເມ" + ], + "SSP": [ + "SSP", + "ເຊົາ​ທ໌ ຊູ​ດານ​ນີ​ສ ພາວດ໌" + ], + "STD": [ + "STD", + "ເຊົາ ໂທ​ເມ à»àº­àº™ ພ​ຣິນ​ຊິ​ປີ ໂດບຣາ" + ], + "SUR": [ + "SUR", + "ຣູໂບ ໂຊວຽດ" + ], + "SVC": [ + "SVC", + "ໂàºàº¥àº­àº‡ ເອàºàº²àº§àº²àº”à»" + ], + "SYP": [ + "SYP", + "ຊີ​ຣຽນ ພາວດ໌" + ], + "SZL": [ + "SZL", + "ສະ​ວາ​ຊິ ລິ​ລັນ​àºàº´â€‹àº™àºµ" + ], + "THB": [ + "฿", + "ໄທ ບາດ" + ], + "TJR": [ + "TJR", + "ຣູໂບ ຕັຈີàºàº´àºªàº–ານ" + ], + "TJS": [ + "TJS", + "ທາ​ຈິ​àºàº´â€‹â€‹àº–າ​ນິ ໂຊ​ໂມ​ນິ" + ], + "TMM": [ + "TMM", + "ມານັດ ຕວàºà»€àº¡àº™àº´àºªàº–ານ (1966–1987)" + ], + "TMT": [ + "TMT", + "ເຕີàºâ€‹à»€àº¡â€‹àº™àº´â€‹àºªâ€‹àº–າ​ນິ ມາ​ນັດ" + ], + "TND": [ + "TND", + "ຕູ​ນິ​ຊຽນ ດິ​ນາ" + ], + "TOP": [ + "TOP", + "ຕອງ​àºàº±àº™ ປາ​ອັງ​àºàº²" + ], + "TPE": [ + "TPE", + "ເອສàºàº¹à»‚ດ ຕີມà»" + ], + "TRL": [ + "TRL", + "ລີຕາ ຕູຣາàºàºµà»€àºàº»à»ˆàº²" + ], + "TRY": [ + "TRY", + "ເຕີ​àºàº´â€‹àºŠ ລິ​ຣາ" + ], + "TTD": [ + "TTD", + "ທ​ຣິ​ນິ​à»àº”ດ à»àº­àº™ ໂທ​ບາ​ໂຠໂດ​ລ່າ" + ], + "TWD": [ + "NT$", + "ນິວ ໄຕ້​ຫວັນ ໂດ​ລ່າ" + ], + "TZS": [ + "TZS", + "ທານ​ຊາ​ນຽນ ຊິວ​ລິງ" + ], + "UAH": [ + "UAH", + "ຢູ​ເຄຣ​ນຽນ ຮະ​ຣີບ​ເນàº" + ], + "UAK": [ + "UAK", + "ຄາໂບວາເນດ ອູà»àºàº£àº™" + ], + "UGS": [ + "UGS", + "ຊິນລິງ ອູàºàº±àº™àº”າ (1966–1987)" + ], + "UGX": [ + "UGX", + "ອູ​àºàº±àº™â€‹àº”ັນ ຊິວ​ລິງ" + ], + "USD": [ + "US$", + "​ໂດ​ລ່າ​ສະ​ຫະ​ລັດຯ" + ], + "USN": [ + "USN", + "ດອນລາສະຫະລັດ (ມື້ຖັດໄປ)" + ], + "USS": [ + "USS", + "ດອນລາສະຫະລັດ (ມື້ດຽວàºàº±àº™)" + ], + "UYI": [ + "UYI", + "ເປໂຊອູຣຸàºàº§àº (ຫົວໜ່ວàºàº­àº´àº™à»€àº”ັàº)" + ], + "UYP": [ + "UYP", + "ເປໂຊ ອູຣຸàºàº§àº (1975–1993)" + ], + "UYU": [ + "UYU", + "ອູ​ຣຸ​àºàº»àº§â€‹àº¢àº²àº™ ເປ​ໂຊ" + ], + "UZS": [ + "UZS", + "ອຸສເບàºàº´àºªàº–ານິ ໂຊມ" + ], + "VEB": [ + "VEB", + "ໂບລີວາ ເວເນຊູເອລາ (1871–2008)" + ], + "VEF": [ + "VEF", + "ເວ​ເນ​ຊູ​ເອ​ລັນ ໂບ​ລິ​ວາ" + ], + "VND": [ + "â‚«", + "ຫວຽດ​ນາມ ດົງ" + ], + "VNN": [ + "VNN", + "ດົງ ຫວຽດນາມ (1978–1985)" + ], + "VUV": [ + "VUV", + "​ວາ​ນົວ​ຕູ ວາ​ຕູ" + ], + "WST": [ + "WST", + "ຊາ​ໂມນ ທາ​ລາ" + ], + "XAF": [ + "FCFA", + "ສາທາລະນະລັດອາຟຣິàºàº²àºàº²àº‡" + ], + "XCD": [ + "EC$", + "ອີ​ສ ຄາ​ຣິ​ບຽນ ໂດ​ລ່າ" + ], + "XEU": [ + "XEU", + "ຫົວໜ່ວàºàºªàº°àºàº¸àº™à»€àº‡àº´àº™ ເອີຣົບ" + ], + "XFO": [ + "XFO", + "ຟຣັງ ຄຳàºàº£àº±à»ˆàº‡" + ], + "XFU": [ + "XFU", + "ຟຣັງ ຢູໄອຊີ àºàº£àº±à»ˆàº‡" + ], + "XOF": [ + "CFA", + "ຟັງເຊຟານ ອາຟຣິàºàº²àº•າເວັນຕົàº" + ], + "XPF": [ + "CFPF", + "ຊີ​ເອັບ​ພີ ຟຣັງ" + ], + "XRE": [ + "XRE", + "àºàº­àº‡àº—ຶນໄຣເນັດ" + ], + "YDD": [ + "YDD", + "ດີນາ ເຢເມນ" + ], + "YER": [ + "YER", + "ເຢ​ເມ​ນິ ຣຽວ" + ], + "YUD": [ + "YUD", + "ຮາດດີນາ ຢູໂàºàºªàº°àº¥àº²àº§àºµ" + ], + "YUM": [ + "YUM", + "ດີນາໃà»à»ˆ ຢູໂàºàºªàº°àº¥àº²àº§àºµ (1994–2002)" + ], + "YUN": [ + "YUN", + "ດີນາ ທີ່ປ່ຽນສະພາບ ຢູໂàºàºªàº°àº¥àº²àº§àºµ (1990–1992)" + ], + "YUR": [ + "YUR", + "ດີນາ ປະຕິຮູບ ຢູໂàºàºªàº°àº¥àº²àº§àºµ (1992–1993)" + ], + "ZAL": [ + "ZAL", + "à»àº£àº™ ອາຟຣິàºàº²à»ƒàº•້ (àºàº²àº™à»€àº‡àº´àº™)" + ], + "ZAR": [ + "ZAR", + "ເຊົາທ໌ ອາ​ຟຣິ​àºàº±àº™ à»àº£àº™àº”໌" + ], + "ZMK": [ + "ZMK", + "ຄວາຊາ ຊັມເບຠ(1968–2012)" + ], + "ZMW": [ + "ZMW", + "à»àºŠàº¡â€‹àºšàº½àº™ ຄວາ​ຊາ" + ], + "ZRN": [ + "ZRN", + "à»àºŠ ຄອງໂàºà»ƒà»à»ˆ" + ], + "ZRZ": [ + "ZRZ", + "à»àºŠàº„ອງໂàº" + ], + "ZWD": [ + "ZWD", + "ດອນລາ ຊິມບັບເວ (1980–2008)" + ], + "ZWL": [ + "ZWL", + "ດອນລາ ຊິມບັບເວ (2009)" + ], + "ZWR": [ + "ZWR", + "ດອນລາ ຊິມບັບເວ (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lt.json new file mode 100644 index 0000000000000000000000000000000000000000..410c93029b8f52fc284067b9682d1e5649192b4c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lt.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Andoros peseta" + ], + "AED": [ + "AED", + "Jungtinių Arabų Emyratų dirhamas" + ], + "AFA": [ + "AFA", + "Afganistano afganis (1927–2002)" + ], + "AFN": [ + "AFN", + "Afganistano afganis" + ], + "ALK": [ + "ALK", + "Albanijos lekas (1946–1965)" + ], + "ALL": [ + "ALL", + "Albanijos lekas" + ], + "AMD": [ + "AMD", + "ArmÄ—nijos dramas" + ], + "ANG": [ + "ANG", + "Olandijos Antilų guldenas" + ], + "AOA": [ + "AOA", + "Angolos kvanza" + ], + "AOK": [ + "AOK", + "Angolos kvanza (1977–1990)" + ], + "AON": [ + "AON", + "Angolos naujoji kvanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angolos patikslinta kvanza (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentinos australs" + ], + "ARL": [ + "ARL", + "Argentinos pesos ley (1970–1983)" + ], + "ARM": [ + "ARM", + "Argentinos pesai (1881–1970)" + ], + "ARP": [ + "ARP", + "Argentinos pesas (1983–1985)" + ], + "ARS": [ + "ARS", + "Argentinos pesas" + ], + "ATS": [ + "ATS", + "Austrijos Å¡ilingas" + ], + "AUD": [ + "AUD", + "Australijos doleris" + ], + "AWG": [ + "AWG", + "Arubos guldenas" + ], + "AZM": [ + "AZM", + "Azerbaidžano manatas (1993–2006)" + ], + "AZN": [ + "AZN", + "Azerbaidžano manatas" + ], + "BAD": [ + "BAD", + "Bosnijos ir Hercegovinos dinaras (1992–1994)" + ], + "BAM": [ + "BAM", + "Bosnijos ir Hercegovinos konvertuojamoji markÄ—" + ], + "BAN": [ + "BAN", + "Bosnijos ir Hercegovinos naujasis dinaras (1994–1997)" + ], + "BBD": [ + "BBD", + "Barbadoso doleris" + ], + "BDT": [ + "BDT", + "BangladeÅ¡o taka" + ], + "BEC": [ + "BEC", + "Belgijos frankas (konvertuojamas)" + ], + "BEF": [ + "BEF", + "Belgijos frankas" + ], + "BEL": [ + "BEL", + "Belgijos frankas (finansinis)" + ], + "BGL": [ + "BGL", + "Bulgarijos levas (1962–1999)" + ], + "BGM": [ + "BGM", + "Bulgarų socialistų leva" + ], + "BGN": [ + "BGN", + "Bulgarijos levas" + ], + "BGO": [ + "BGO", + "Bulgarijos levas (1879–1952)" + ], + "BHD": [ + "BHD", + "Bahreino dinaras" + ], + "BIF": [ + "BIF", + "Burundžio frankas" + ], + "BMD": [ + "BMD", + "Bermudos doleris" + ], + "BND": [ + "BND", + "BrunÄ—jaus doleris" + ], + "BOB": [ + "BOB", + "Bolivijos bolivijanas" + ], + "BOL": [ + "BOL", + "Bolivijos bolivijanas (1863–1963)" + ], + "BOP": [ + "BOP", + "Bolivijos pesas" + ], + "BOV": [ + "BOV", + "Bolivijos mvdol" + ], + "BRB": [ + "BRB", + "Brazilijos naujieji kruzeirai (1967–1986)" + ], + "BRC": [ + "BRC", + "Brazilijos kruzadai (1986–1989)" + ], + "BRE": [ + "BRE", + "Brazilijos kruzeiras (1990–1993)" + ], + "BRL": [ + "BRL", + "Brazilijos realas" + ], + "BRN": [ + "BRN", + "Brazilijos naujiejis kruzadai (1989–1990)" + ], + "BRR": [ + "BRR", + "Brazilijos kruzeiras (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Brazilijos kruzeirai (1942–1967)" + ], + "BSD": [ + "BSD", + "Bahamų doleris" + ], + "BTN": [ + "BTN", + "Butano ngultrumas" + ], + "BUK": [ + "BUK", + "Birmos kijatas" + ], + "BWP": [ + "BWP", + "Botsvanos pula" + ], + "BYB": [ + "BYB", + "Baltarusijos naujasis rublis (1994–1999)" + ], + "BYN": [ + "BYN", + "Baltarusijos rublis" + ], + "BYR": [ + "BYR", + "Baltarusijos rublis (2000–2016)" + ], + "BZD": [ + "BZD", + "Belizo doleris" + ], + "CAD": [ + "CAD", + "Kanados doleris" + ], + "CDF": [ + "CDF", + "Kongo frankas" + ], + "CHE": [ + "CHE", + "WIR eurai" + ], + "CHF": [ + "CHF", + "Å veicarijos frankas" + ], + "CHW": [ + "CHW", + "WIR frankas" + ], + "CLE": [ + "CLE", + "ÄŒilÄ—s eskudai" + ], + "CLF": [ + "CLF", + "ÄŒilieÄių unidades de fomentos" + ], + "CLP": [ + "CLP", + "ÄŒilÄ—s pesas" + ], + "CNX": [ + "CNX", + "Kinijos \"People\" banko doleris" + ], + "CNY": [ + "CNY", + "Kinijos ženminbi juanis" + ], + "COP": [ + "COP", + "Kolumbijos pesas" + ], + "COU": [ + "COU", + "unidad de valor realai" + ], + "CRC": [ + "CRC", + "Kosta Rikos kolonas" + ], + "CSD": [ + "CSD", + "Serbijos dinaras (2002–2006)" + ], + "CSK": [ + "CSK", + "ÄŒekoslovakų sunkusis korunas" + ], + "CUC": [ + "CUC", + "Kubos konvertuojamasis pesas" + ], + "CUP": [ + "CUP", + "Kubos pesas" + ], + "CVE": [ + "CVE", + "Žaliojo KyÅ¡ulio eskudas" + ], + "CYP": [ + "CYP", + "Kipro svaras" + ], + "CZK": [ + "CZK", + "ÄŒekijos krona" + ], + "DDM": [ + "DDM", + "Rytų Vokietijos markÄ—" + ], + "DEM": [ + "DEM", + "Vokietijos markÄ—" + ], + "DJF": [ + "DJF", + "DžibuÄio frankas" + ], + "DKK": [ + "DKK", + "Danijos krona" + ], + "DOP": [ + "DOP", + "Dominikos pesas" + ], + "DZD": [ + "DZD", + "Alžyro dinaras" + ], + "ECS": [ + "ECS", + "Ekvadoro sukrÄ—" + ], + "ECV": [ + "ECV", + "Ekvadoro constante (UVC)" + ], + "EEK": [ + "EEK", + "Estijos krona" + ], + "EGP": [ + "EGP", + "Egipto svaras" + ], + "ERN": [ + "ERN", + "EritrÄ—jos nakfa" + ], + "ESA": [ + "ESA", + "Ispanų pesetai (A sÄ…skaita)" + ], + "ESB": [ + "ESB", + "Ispanų pesetai (konvertuojama sÄ…skaita)" + ], + "ESP": [ + "ESP", + "Ispanijos peseta" + ], + "ETB": [ + "ETB", + "Etiopijos biras" + ], + "EUR": [ + "€", + "Euras" + ], + "FIM": [ + "FIM", + "Suomijos markÄ—" + ], + "FJD": [ + "FJD", + "Fidžio doleris" + ], + "FKP": [ + "FKP", + "Falklando salų svaras" + ], + "FRF": [ + "FRF", + "PrancÅ«zijos frankas" + ], + "GBP": [ + "GBP", + "Didžiosios Britanijos svaras" + ], + "GEK": [ + "GEK", + "Gruzinų kupon larits" + ], + "GEL": [ + "GEL", + "Gruzijos laris" + ], + "GHC": [ + "GHC", + "Ganos sedis (1979–2007)" + ], + "GHS": [ + "GHS", + "Ganos sedis" + ], + "GIP": [ + "GIP", + "Gibraltaro svaras" + ], + "GMD": [ + "GMD", + "Gambijos dalasis" + ], + "GNF": [ + "GNF", + "GvinÄ—jos frankas" + ], + "GNS": [ + "GNS", + "Guinean sylis" + ], + "GQE": [ + "GQE", + "Pusiaujo Guinean ekwele" + ], + "GRD": [ + "GRD", + "Graikijos drachma" + ], + "GTQ": [ + "GTQ", + "Gvatemalos ketcalis" + ], + "GWE": [ + "GWE", + "Portugalų GvinÄ—jos eskudas" + ], + "GWP": [ + "GWP", + "GvinÄ—jos-Bisau pesas" + ], + "GYD": [ + "GYD", + "Gajanos doleris" + ], + "HKD": [ + "HKD", + "Honkongo doleris" + ], + "HNL": [ + "HNL", + "HondÅ«ro lempira" + ], + "HRD": [ + "HRD", + "Kroatijos dinaras" + ], + "HRK": [ + "HRK", + "Kroatijos kuna" + ], + "HTG": [ + "HTG", + "HaiÄio gurdas" + ], + "HUF": [ + "HUF", + "Vengrijos forintas" + ], + "IDR": [ + "IDR", + "Indonezijos rupija" + ], + "IEP": [ + "IEP", + "Airijos svaras" + ], + "ILP": [ + "ILP", + "Izraelio svaras" + ], + "ILR": [ + "ILR", + "Izraelio Å¡ekelis (1980–1985)" + ], + "ILS": [ + "ILS", + "Izraelio naujasis Å¡ekelis" + ], + "INR": [ + "INR", + "Indijos rupija" + ], + "IQD": [ + "IQD", + "Irako dinaras" + ], + "IRR": [ + "IRR", + "Irano rialas" + ], + "ISJ": [ + "ISJ", + "Islandijos krona (1918–1981)" + ], + "ISK": [ + "ISK", + "Islandijos krona" + ], + "ITL": [ + "ITL", + "Italijos lira" + ], + "JMD": [ + "JMD", + "Jamaikos doleris" + ], + "JOD": [ + "JOD", + "Jordanijos dinaras" + ], + "JPY": [ + "JPY", + "Japonijos jena" + ], + "KES": [ + "KES", + "Kenijos Å¡ilingas" + ], + "KGS": [ + "KGS", + "Kirgizijos somas" + ], + "KHR": [ + "KHR", + "Kambodžos rielis" + ], + "KMF": [ + "KMF", + "Komoro frankas" + ], + "KPW": [ + "KPW", + "Å iaurÄ—s KorÄ—jos vonas" + ], + "KRH": [ + "KRH", + "Pietų KorÄ—jos hwanas (1953–1962)" + ], + "KRO": [ + "KRO", + "Pietų KorÄ—jos vonas (1945–1953)" + ], + "KRW": [ + "KRW", + "Pietų KorÄ—jos vonas" + ], + "KWD": [ + "KWD", + "Kuveito dinaras" + ], + "KYD": [ + "KYD", + "Kaimanų salų doleris" + ], + "KZT": [ + "KZT", + "Kazachstano tengÄ—" + ], + "LAK": [ + "LAK", + "Laoso kipas" + ], + "LBP": [ + "LBP", + "Libano svaras" + ], + "LKR": [ + "LKR", + "Å ri Lankos rupija" + ], + "LRD": [ + "LRD", + "Liberijos doleris" + ], + "LSL": [ + "LSL", + "Lesoto lotis" + ], + "LTL": [ + "LTL", + "Lietuvos litas" + ], + "LTT": [ + "LTT", + "Lietuvos talonas" + ], + "LUC": [ + "LUC", + "Liuksemburgo konvertuojamas frankas" + ], + "LUF": [ + "LUF", + "Liuksemburgo frankas" + ], + "LUL": [ + "LUL", + "Liuksemburgo finansinis frankas" + ], + "LVL": [ + "LVL", + "Latvijos latas" + ], + "LVR": [ + "LVR", + "Latvijos rublis" + ], + "LYD": [ + "LYD", + "Libijos dinaras" + ], + "MAD": [ + "MAD", + "Maroko dirhamas" + ], + "MAF": [ + "MAF", + "Maroko frankas" + ], + "MCF": [ + "MCF", + "Monegasque frankas" + ], + "MDC": [ + "MDC", + "Moldovų cupon" + ], + "MDL": [ + "MDL", + "Moldovos lÄ—ja" + ], + "MGA": [ + "MGA", + "Madagaskaro ariaris" + ], + "MGF": [ + "MGF", + "Madagaskaro frankas" + ], + "MKD": [ + "MKD", + "Makedonijos denaras" + ], + "MKN": [ + "MKN", + "Makedonijos denaras (1992–1993)" + ], + "MLF": [ + "MLF", + "Malio frankas" + ], + "MMK": [ + "MMK", + "Mianmaro kijatas" + ], + "MNT": [ + "MNT", + "Mongolijos tugrikas" + ], + "MOP": [ + "MOP", + "Makao pataka" + ], + "MRO": [ + "MRO", + "Mauritanijos ugija" + ], + "MTL": [ + "MTL", + "Maltos lira" + ], + "MTP": [ + "MTP", + "Maltos svaras" + ], + "MUR": [ + "MUR", + "Mauricijaus rupija" + ], + "MVP": [ + "MVP", + "Maldyvų rupija" + ], + "MVR": [ + "MVR", + "Maldyvų rufija" + ], + "MWK": [ + "MWK", + "Malavio kvaÄa" + ], + "MXN": [ + "MXN", + "Meksikos pesas" + ], + "MXP": [ + "MXP", + "Meksikos sidabrinis pesas (1861–1992)" + ], + "MXV": [ + "MXV", + "Meksikos United de Inversion (UDI)" + ], + "MYR": [ + "MYR", + "Malaizijos ringitas" + ], + "MZE": [ + "MZE", + "Mozambiko eskudas" + ], + "MZM": [ + "MZM", + "Mozambiko metikalis (1980–2006)" + ], + "MZN": [ + "MZN", + "Mozambiko metikalis" + ], + "NAD": [ + "NAD", + "Namibijos doleris" + ], + "NGN": [ + "NGN", + "Nigerijos naira" + ], + "NIC": [ + "NIC", + "Nikaragvos kardoba (1988–1991)" + ], + "NIO": [ + "NIO", + "Nikaragvos kordoba" + ], + "NLG": [ + "NLG", + "Nyderlandų guldenas" + ], + "NOK": [ + "NOK", + "Norvegijos krona" + ], + "NPR": [ + "NPR", + "Nepalo rupija" + ], + "NZD": [ + "NZD", + "Naujosios Zelandijos doleris" + ], + "OMR": [ + "OMR", + "Omano rialas" + ], + "PAB": [ + "PAB", + "Panamos balboja" + ], + "PEI": [ + "PEI", + "Peru intis" + ], + "PEN": [ + "PEN", + "Peru naujasis solis" + ], + "PES": [ + "PES", + "Peru solis (1863–1965)" + ], + "PGK": [ + "PGK", + "Papua Naujosios GvinÄ—jos kina" + ], + "PHP": [ + "PHP", + "Filipinų pesas" + ], + "PKR": [ + "PKR", + "Pakistano rupija" + ], + "PLN": [ + "PLN", + "Lenkijos zlotas" + ], + "PLZ": [ + "PLZ", + "Lenkijos zlotas (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugalijos eskudas" + ], + "PYG": [ + "PYG", + "Paragvajaus guaranis" + ], + "QAR": [ + "QAR", + "Kataro rialas" + ], + "RHD": [ + "RHD", + "Rodezijos doleris" + ], + "ROL": [ + "ROL", + "Rumunijos lÄ—ja (1952–2006)" + ], + "RON": [ + "RON", + "Rumunijos lÄ—ja" + ], + "RSD": [ + "RSD", + "Serbijos dinaras" + ], + "RUB": [ + "RUB", + "Rusijos rublis" + ], + "RUR": [ + "RUR", + "Rusijos rublis (1991–1998)" + ], + "RWF": [ + "RWF", + "Ruandos frankas" + ], + "SAR": [ + "SAR", + "Saudo Arabijos rijalas" + ], + "SBD": [ + "SBD", + "Saliamono salų doleris" + ], + "SCR": [ + "SCR", + "SeiÅ¡elių rupija" + ], + "SDD": [ + "SDD", + "Sudano dinaras (1992–2007)" + ], + "SDG": [ + "SDG", + "Sudano svaras" + ], + "SDP": [ + "SDP", + "Sudano svaras (1957–1998)" + ], + "SEK": [ + "SEK", + "Å vedijos krona" + ], + "SGD": [ + "SGD", + "SingapÅ«ro doleris" + ], + "SHP": [ + "SHP", + "Å v. Elenos salų svaras" + ], + "SIT": [ + "SIT", + "SlovÄ—nijos tolaras" + ], + "SKK": [ + "SKK", + "Slovakijos krona" + ], + "SLL": [ + "SLL", + "Siera LeonÄ—s leonÄ—" + ], + "SOS": [ + "SOS", + "Somalio Å¡ilingas" + ], + "SRD": [ + "SRD", + "Surimano doleris" + ], + "SRG": [ + "SRG", + "Surimano guldenas" + ], + "SSP": [ + "SSP", + "Pietų Sudano svaras" + ], + "STD": [ + "STD", + "San TomÄ—s ir PrincipÄ—s dobra" + ], + "SUR": [ + "SUR", + "Sovietų rublis" + ], + "SVC": [ + "SVC", + "Salvadoro kolonas" + ], + "SYP": [ + "SYP", + "Sirijos svaras" + ], + "SZL": [ + "SZL", + "Svazilando lilangenis" + ], + "THB": [ + "THB", + "Tailando batas" + ], + "TJR": [ + "TJR", + "Tadžikistano rublis" + ], + "TJS": [ + "TJS", + "Tadžikistano somonis" + ], + "TMM": [ + "TMM", + "TurkmÄ—nistano manatas (1993–2009)" + ], + "TMT": [ + "TMT", + "TurkmÄ—nistano manatas" + ], + "TND": [ + "TND", + "Tuniso dinaras" + ], + "TOP": [ + "TOP", + "Tongo paanga" + ], + "TPE": [ + "TPE", + "Timoro eskudas" + ], + "TRL": [ + "TRL", + "Turkijos lira (1922–2005)" + ], + "TRY": [ + "TRY", + "Turkijos lira" + ], + "TTD": [ + "TTD", + "Trinidado ir Tobago doleris" + ], + "TWD": [ + "TWD", + "Taivano naujasis doleris" + ], + "TZS": [ + "TZS", + "Tanzanijos Å¡ilingas" + ], + "UAH": [ + "UAH", + "Ukrainos grivina" + ], + "UAK": [ + "UAK", + "Ukrainos karbovanecas" + ], + "UGS": [ + "UGS", + "Ugandos Å¡ilingas (1966–1987)" + ], + "UGX": [ + "UGX", + "Ugandos Å¡ilingas" + ], + "USD": [ + "USD", + "JAV doleris" + ], + "USN": [ + "USN", + "JAV doleris (kitos dienos)" + ], + "USS": [ + "USS", + "JAV doleris (Å¡ios dienos)" + ], + "UYI": [ + "UYI", + "Urugvajaus pesai en unidades indexadas" + ], + "UYP": [ + "UYP", + "Urugvajaus pesas (1975–1993)" + ], + "UYU": [ + "UYU", + "Urugvajaus pesas" + ], + "UZS": [ + "UZS", + "Uzbekistano sumas" + ], + "VEB": [ + "VEB", + "Venesuelos bolivaras (1871–2008)" + ], + "VEF": [ + "VEF", + "Venesuelos bolivaras" + ], + "VND": [ + "VND", + "Vietnamo dongas" + ], + "VNN": [ + "VNN", + "Vietnamo dongas (1978–1985)" + ], + "VUV": [ + "VUV", + "Vanuatu vatas" + ], + "WST": [ + "WST", + "Samoa tala" + ], + "XAF": [ + "XAF", + "CFA BEAC frankas" + ], + "XCD": [ + "XCD", + "Rytų Karibų doleris" + ], + "XEU": [ + "XEU", + "Europos piniginis vienetas (1993–1999)" + ], + "XFO": [ + "XFO", + "Aukso frankas" + ], + "XFU": [ + "XFU", + "PrancÅ«zijos UIC - frankas" + ], + "XOF": [ + "XOF", + "CFA BCEAO frankas" + ], + "XPF": [ + "XPF", + "CFP frankas" + ], + "XRE": [ + "XRE", + "RINET fondai" + ], + "YDD": [ + "YDD", + "Jemeno dinaras" + ], + "YER": [ + "YER", + "Jemeno rialas" + ], + "YUD": [ + "YUD", + "Jugoslavijos kietasis dinaras (1966–1990)" + ], + "YUM": [ + "YUM", + "Jugoslavijos naujasis dinaras (1994–2002)" + ], + "YUN": [ + "YUN", + "Jugoslavijos konvertuojamas dinaras (1990–1992)" + ], + "YUR": [ + "YUR", + "Jugoslavijos reformuotas dinaras (1992–1993)" + ], + "ZAL": [ + "ZAL", + "Pietų Afrikos finansinis randas" + ], + "ZAR": [ + "ZAR", + "Pietų Afrikos Respublikos randas" + ], + "ZMK": [ + "ZMK", + "Zambijos kvaÄa (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambijos kvaÄa" + ], + "ZRN": [ + "ZRN", + "Zairo naujasis zairas (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zairo zairas (1971–1993)" + ], + "ZWD": [ + "ZWD", + "ZimbabvÄ—s doleris (1980–2008)" + ], + "ZWL": [ + "ZWL", + "ZimbabvÄ—s doleris (2009)" + ], + "ZWR": [ + "ZWR", + "ZimbabvÄ—s doleris (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lu.json new file mode 100644 index 0000000000000000000000000000000000000000..1218f8250db7115bd58b25ee83b624776b19e230 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lu.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AED": [ + "AED", + "Ndiriha wa Lemila alabu" + ], + "AOA": [ + "AOA", + "Kwanza wa Angola" + ], + "AUD": [ + "A$", + "Ndola wa Ositali" + ], + "BHD": [ + "BHD", + "Ndina wa Bahrene" + ], + "BIF": [ + "BIF", + "Nfalanga wa Bulundi" + ], + "BWP": [ + "BWP", + "Pula wa Botswana" + ], + "CAD": [ + "CA$", + "Ndola wa Kanada" + ], + "CDF": [ + "FC", + "Nfalanga wa Kongu" + ], + "CHF": [ + "CHF", + "Nfalanga wa Swise" + ], + "CNY": [ + "CNÂ¥", + "Yuani Renminbi wa Shine" + ], + "CVE": [ + "CVE", + "Esikuludo wa Kapevere" + ], + "DJF": [ + "DJF", + "Nfalanga wa Dzibuti" + ], + "DZD": [ + "DZD", + "Ndina wa Alijeri" + ], + "EGP": [ + "EGP", + "Pauni wa Mushidi" + ], + "ERN": [ + "ERN", + "Nakfa wa Elitle" + ], + "ETB": [ + "ETB", + "Bira wa Etshiopi" + ], + "EUR": [ + "€", + "Iro" + ], + "GBP": [ + "£", + "Pauni wa Angeletele" + ], + "GHC": [ + "GHC", + "Sedi wa Ngana" + ], + "GMD": [ + "GMD", + "Ndalasi wa Ngambi" + ], + "GNS": [ + "GNS", + "Nfalanga wa Ngina" + ], + "INR": [ + "₹", + "Rupi wa Inde" + ], + "JPY": [ + "JPÂ¥", + "Yeni wa ZapÉ”" + ], + "KES": [ + "KES", + "Nshili wa Kenya" + ], + "KMF": [ + "KMF", + "Nfalanga wa Komoru" + ], + "LRD": [ + "LRD", + "Ndola wa Liberya" + ], + "LSL": [ + "LSL", + "Loti wa Lesoto" + ], + "LYD": [ + "LYD", + "Ndina wa Libi" + ], + "MAD": [ + "MAD", + "Ndiriha wa Maroke" + ], + "MGA": [ + "MGA", + "Nfalanga wa Madagasikare" + ], + "MRO": [ + "MRO", + "Ugwiya wa Moritani" + ], + "MUR": [ + "MUR", + "Rupia wa Morisi" + ], + "MWK": [ + "MWK", + "Kwasha wa Malawi" + ], + "MZM": [ + "MZM", + "Metikali wa Mozambiki" + ], + "NAD": [ + "NAD", + "Ndola wa Namibi" + ], + "NGN": [ + "NGN", + "Naira wa Nizerya" + ], + "RWF": [ + "RWF", + "Nfalanga wa Rwanda" + ], + "SAR": [ + "SAR", + "Riyale wa Alabu Nsawu" + ], + "SCR": [ + "SCR", + "Rupya wa Seshele" + ], + "SDG": [ + "SDG", + "Ndina wa Suda" + ], + "SDP": [ + "SDP", + "Pauni wa Suda" + ], + "SHP": [ + "SHP", + "Pauni wa Santu Elena" + ], + "SLL": [ + "SLL", + "Leone" + ], + "SOS": [ + "SOS", + "Nshili wa Somali" + ], + "STD": [ + "STD", + "Dobra wa Sao Tome ne Presipe" + ], + "SZL": [ + "SZL", + "Lilangeni" + ], + "TND": [ + "TND", + "Ndina wa Tinizi" + ], + "TZS": [ + "TZS", + "Nshili wa Tanzani" + ], + "UGX": [ + "UGX", + "Nshili wa Uganda" + ], + "USD": [ + "US$", + "Ndola wa Ameriki" + ], + "XAF": [ + "FCFA", + "Nfalanga CFA BEAC" + ], + "XOF": [ + "CFA", + "Nfalanga CFA BCEAO" + ], + "ZAR": [ + "ZAR", + "Rande wa Afrika wa Mwinshi" + ], + "ZMK": [ + "ZMK", + "Kwasha wa Zambi (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwasha wa Zambi" + ], + "ZWD": [ + "ZWD", + "Ndola wa Zimbabwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lv.json new file mode 100644 index 0000000000000000000000000000000000000000..33f5bdb022f01fb6dc7c5fc315d27980c19c43c3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/lv.json @@ -0,0 +1,781 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "Apvienoto ArÄbu EmirÄtu dirhÄ“ms" + ], + "AFN": [ + "AFN", + "AfganistÄnas afgÄns" + ], + "ALL": [ + "ALL", + "AlbÄnijas leks" + ], + "AMD": [ + "AMD", + "ArmÄ“nijas drams" + ], + "ANG": [ + "ANG", + "NÄ«derlandes Antiļu guldenis" + ], + "AOA": [ + "AOA", + "Angolas kvanza" + ], + "ARS": [ + "ARS", + "ArgentÄ«nas peso" + ], + "ATS": [ + "ATS", + "Austrijas Å¡iliņš" + ], + "AUD": [ + "AU$", + "AustrÄlijas dolÄrs" + ], + "AWG": [ + "AWG", + "Arubas guldenis" + ], + "AZM": [ + "AZM", + "AzerbaidžÄnas manats (1993–2006)" + ], + "AZN": [ + "AZN", + "AzerbaidžÄnas manats" + ], + "BAM": [ + "BAM", + "Bosnijas un Hercogovinas konvertÄ“jamÄ marka" + ], + "BBD": [ + "BBD", + "Barbadosas dolÄrs" + ], + "BDT": [ + "BDT", + "BangladeÅ¡as taka" + ], + "BEF": [ + "BEF", + "Beļģijas franks" + ], + "BGN": [ + "BGN", + "BulgÄrijas leva" + ], + "BHD": [ + "BHD", + "Bahreinas dinÄrs" + ], + "BIF": [ + "BIF", + "Burundi franks" + ], + "BMD": [ + "BMD", + "Bermudu dolÄrs" + ], + "BND": [ + "BND", + "Brunejas dolÄrs" + ], + "BOB": [ + "BOB", + "BolÄ«vijas boliviano" + ], + "BRL": [ + "R$", + "BrazÄ«lijas reÄls" + ], + "BSD": [ + "BSD", + "Bahamu dolÄrs" + ], + "BTN": [ + "BTN", + "ButÄnas ngultrums" + ], + "BWP": [ + "BWP", + "Botsvanas pula" + ], + "BYN": [ + "BYN", + "Baltkrievijas rubelis" + ], + "BYR": [ + "BYR", + "Baltkrievijas rubelis (2000–2016)" + ], + "BZD": [ + "BZD", + "Belizas dolÄrs" + ], + "CAD": [ + "CA$", + "KanÄdas dolÄrs" + ], + "CDF": [ + "CDF", + "KDR franks" + ], + "CHF": [ + "CHF", + "Å veices franks" + ], + "CLP": [ + "CLP", + "Čīles peso" + ], + "CNY": [ + "CNÂ¥", + "Ķīnas juaņs" + ], + "COP": [ + "COP", + "Kolumbijas peso" + ], + "COU": [ + "COU", + "Kolumbijas reÄls" + ], + "CRC": [ + "CRC", + "Kostarikas kolons" + ], + "CUC": [ + "CUC", + "Kubas konvertÄ“jamais peso" + ], + "CUP": [ + "CUP", + "Kubas peso" + ], + "CVE": [ + "CVE", + "Kaboverdes eskudo" + ], + "CYP": [ + "CYP", + "Kipras mÄrciņa" + ], + "CZK": [ + "CZK", + "ÄŒehijas krona" + ], + "DEM": [ + "DEM", + "VÄcijas marka" + ], + "DJF": [ + "DJF", + "Džibutijas franks" + ], + "DKK": [ + "DKK", + "DÄnijas krona" + ], + "DOP": [ + "DOP", + "DominikÄnas peso" + ], + "DZD": [ + "DZD", + "Alžīrijas dinÄrs" + ], + "EEK": [ + "EEK", + "Igaunijas krona" + ], + "EGP": [ + "EGP", + "Ä’Ä£iptes mÄrciņa" + ], + "ERN": [ + "ERN", + "Eritrejas nakfa" + ], + "ESP": [ + "ESP", + "SpÄnijas peseta" + ], + "ETB": [ + "ETB", + "Etiopijas birs" + ], + "EUR": [ + "€", + "eiro" + ], + "FIM": [ + "FIM", + "Somijas marka" + ], + "FJD": [ + "FJD", + "Fidži dolÄrs" + ], + "FKP": [ + "FKP", + "Folklenda Salu mÄrciņa" + ], + "FRF": [ + "FRF", + "Francijas franks" + ], + "GBP": [ + "£", + "LielbritÄnijas mÄrciņa" + ], + "GEL": [ + "GEL", + "Gruzijas lari" + ], + "GHS": [ + "GHS", + "Ganas sedi" + ], + "GIP": [ + "GIP", + "GibraltÄra mÄrciņa" + ], + "GMD": [ + "GMD", + "Gambijas dalasi" + ], + "GNF": [ + "GNF", + "Gvinejas franks" + ], + "GRD": [ + "GRD", + "GrieÄ·ijas drahma" + ], + "GTQ": [ + "GTQ", + "Gvatemalas ketsals" + ], + "GYD": [ + "GYD", + "GajÄnas dolÄrs" + ], + "HKD": [ + "HK$", + "Honkongas dolÄrs" + ], + "HNL": [ + "HNL", + "Hondurasas lempÄ«ra" + ], + "HRK": [ + "HRK", + "HorvÄtijas kuna" + ], + "HTG": [ + "HTG", + "Haiti gurds" + ], + "HUF": [ + "HUF", + "UngÄrijas forints" + ], + "IDR": [ + "IDR", + "IndonÄ“zijas rÅ«pija" + ], + "IEP": [ + "IEP", + "Īrijas mÄrciņa" + ], + "ILS": [ + "₪", + "IzraÄ“las Å¡ekelis" + ], + "INR": [ + "₹", + "Indijas rÅ«pija" + ], + "IQD": [ + "IQD", + "IrÄkas dinÄrs" + ], + "IRR": [ + "IRR", + "IrÄnas riÄls" + ], + "ISK": [ + "ISK", + "Īslandes krona" + ], + "ITL": [ + "ITL", + "ItÄlijas lira" + ], + "JMD": [ + "JMD", + "Jamaikas dolÄrs" + ], + "JOD": [ + "JOD", + "JordÄnas dinÄrs" + ], + "JPY": [ + "Â¥", + "JapÄnas jena" + ], + "KES": [ + "KES", + "Kenijas Å¡iliņš" + ], + "KGS": [ + "KGS", + "KirgizstÄnas soms" + ], + "KHR": [ + "KHR", + "Kambodžas riels" + ], + "KMF": [ + "KMF", + "Komoru franks" + ], + "KPW": [ + "KPW", + "Ziemeļkorejas vona" + ], + "KRW": [ + "â‚©", + "Dienvidkorejas vona" + ], + "KWD": [ + "KWD", + "Kuveitas dinÄrs" + ], + "KYD": [ + "KYD", + "Kaimanu salu dolÄrs" + ], + "KZT": [ + "KZT", + "KazahstÄnas tenge" + ], + "LAK": [ + "LAK", + "Laosas kips" + ], + "LBP": [ + "LBP", + "LibÄnas mÄrciņa" + ], + "LKR": [ + "LKR", + "Å rilankas rÅ«pija" + ], + "LRD": [ + "LRD", + "LibÄ“rijas dolÄrs" + ], + "LSL": [ + "LSL", + "Lesoto loti" + ], + "LTL": [ + "LTL", + "Lietuvas lits" + ], + "LUF": [ + "LUF", + "Luksemburgas franks" + ], + "LVL": [ + "Ls", + "Latvijas lats" + ], + "LVR": [ + "LVR", + "Latvijas rublis" + ], + "LYD": [ + "LYD", + "LÄ«bijas dinÄrs" + ], + "MAD": [ + "MAD", + "Marokas dirhÄ“ms" + ], + "MDL": [ + "MDL", + "Moldovas leja" + ], + "MGA": [ + "MGA", + "Madagaskaras ariari" + ], + "MKD": [ + "MKD", + "MaÄ·edonijas denÄrs" + ], + "MLF": [ + "MLF", + "CFA (Ä€frikas) franks" + ], + "MMK": [ + "MMK", + "Mjanmas kjats" + ], + "MNT": [ + "MNT", + "Mongolijas tugriks" + ], + "MOP": [ + "MOP", + "Makao pataka" + ], + "MRO": [ + "MRO", + "MauritÄnijas ugija" + ], + "MTL": [ + "MTL", + "Maltas lira" + ], + "MTP": [ + "MTP", + "Maltas mÄrciņa" + ], + "MUR": [ + "MUR", + "MaurÄ«cijas rÅ«pija" + ], + "MVR": [ + "MVR", + "MaldÄ«vijas rÅ«fija" + ], + "MWK": [ + "MWK", + "MalÄvijas kvaÄa" + ], + "MXN": [ + "MX$", + "Meksikas peso" + ], + "MYR": [ + "MYR", + "Malaizijas ringits" + ], + "MZE": [ + "MZE", + "Mozambikas eskudo" + ], + "MZM": [ + "MZM", + "Mozambikas vecais metikals" + ], + "MZN": [ + "MZN", + "Mozambikas metikals" + ], + "NAD": [ + "NAD", + "NamÄ«bijas dolÄrs" + ], + "NGN": [ + "NGN", + "NigÄ“rijas naira" + ], + "NIO": [ + "NIO", + "Nikaragvas kordoba" + ], + "NLG": [ + "NLG", + "NÄ«derlandes guldenis" + ], + "NOK": [ + "NOK", + "Norvēģijas krona" + ], + "NPR": [ + "NPR", + "NepÄlas rÅ«pija" + ], + "NZD": [ + "NZ$", + "JaunzÄ“landes dolÄrs" + ], + "OMR": [ + "OMR", + "OmÄnas riÄls" + ], + "PAB": [ + "PAB", + "Panamas balboa" + ], + "PEN": [ + "PEN", + "Peru jaunais sols" + ], + "PGK": [ + "PGK", + "Papua-Jaungvinejas kina" + ], + "PHP": [ + "PHP", + "FilipÄ«nu peso" + ], + "PKR": [ + "PKR", + "PakistÄnas rÅ«pija" + ], + "PLN": [ + "PLN", + "Polijas zlots" + ], + "PTE": [ + "PTE", + "PortugÄles eskudo" + ], + "PYG": [ + "PYG", + "Paragvajas guarani" + ], + "QAR": [ + "QAR", + "Kataras riÄls" + ], + "ROL": [ + "ROL", + "RumÄnijas vecÄ leja" + ], + "RON": [ + "RON", + "RumÄnijas leja" + ], + "RSD": [ + "RSD", + "Serbijas dinÄrs" + ], + "RUB": [ + "RUB", + "Krievijas rublis" + ], + "RWF": [ + "RWF", + "Ruandas franks" + ], + "SAR": [ + "SAR", + "SaÅ«da riÄls" + ], + "SBD": [ + "SBD", + "ZÄlamana Salu dolÄrs" + ], + "SCR": [ + "SCR", + "SeiÅ¡elu salu rÅ«pija" + ], + "SDG": [ + "SDG", + "SudÄnas mÄrciņa" + ], + "SEK": [ + "SEK", + "Zviedrijas krona" + ], + "SGD": [ + "SGD", + "SingapÅ«ras dolÄrs" + ], + "SHP": [ + "SHP", + "Sv.HelÄ“nas salas mÄrciņa" + ], + "SIT": [ + "SIT", + "SlovÄ“nijas tolars" + ], + "SKK": [ + "SKK", + "Slovakijas krona" + ], + "SLL": [ + "SLL", + "Sjerraleones leone" + ], + "SOS": [ + "SOS", + "SomÄlijas Å¡iliņš" + ], + "SRD": [ + "SRD", + "Surinamas dolÄrs" + ], + "SRG": [ + "SRG", + "Surinamas guldenis" + ], + "SSP": [ + "SSP", + "DienvidsudÄnas mÄrciņa" + ], + "STD": [ + "STD", + "Santome un Prinsipi dobra" + ], + "SVC": [ + "SVC", + "Salvadoras kolons" + ], + "SYP": [ + "SYP", + "SÄ«rijas mÄrciņa" + ], + "SZL": [ + "SZL", + "Svazilendas lilangeni" + ], + "THB": [ + "฿", + "Taizemes bÄts" + ], + "TJS": [ + "TJS", + "TadžikistÄnas somons" + ], + "TMM": [ + "TMM", + "TurkmenistÄnas manats (1993–2009)" + ], + "TMT": [ + "TMT", + "TurkmenistÄnas manats" + ], + "TND": [ + "TND", + "Tunisijas dinÄrs" + ], + "TOP": [ + "TOP", + "Tongas paanga" + ], + "TRL": [ + "TRL", + "Turcijas lira (1922–2005)" + ], + "TRY": [ + "TRY", + "Turcijas lira" + ], + "TTD": [ + "TTD", + "TrinidÄdas un TobÄgo dolÄrs" + ], + "TWD": [ + "NT$", + "TaivÄnas jaunais dolÄrs" + ], + "TZS": [ + "TZS", + "TanzÄnijas Å¡iliņš" + ], + "UAH": [ + "UAH", + "Ukrainas grivna" + ], + "UGX": [ + "UGX", + "Ugandas Å¡iliņš" + ], + "USD": [ + "$", + "ASV dolÄrs" + ], + "UYU": [ + "UYU", + "Urugvajas peso" + ], + "UZS": [ + "UZS", + "UzbekistÄnas sums" + ], + "VEB": [ + "VEB", + "VenecuÄ“las bolivÄrs (1871–2008)" + ], + "VEF": [ + "VEF", + "VenecuÄ“las bolivÄrs" + ], + "VND": [ + "â‚«", + "Vjetnamas dongi" + ], + "VUV": [ + "VUV", + "Vanuatu vatu" + ], + "WST": [ + "WST", + "Samoa tala" + ], + "XAF": [ + "FCFA", + "CentrÄlÄfrikas CFA franks" + ], + "XCD": [ + "EC$", + "AustrumkarÄ«bu dolÄrs" + ], + "XEU": [ + "XEU", + "Eiropas norēķinu vienÄ«ba" + ], + "XFO": [ + "XFO", + "Francijas zelta franks" + ], + "XFU": [ + "XFU", + "Francijas UIC franks" + ], + "XOF": [ + "CFA", + "RietumÄfrikas CFA franks" + ], + "XPF": [ + "CFPF", + "CFP franks" + ], + "YER": [ + "YER", + "Jemenas riÄls" + ], + "ZAR": [ + "ZAR", + "DienvidÄfrikas rends" + ], + "ZMK": [ + "ZMK", + "Zambijas kvaÄa (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambijas kvaÄa" + ], + "ZWD": [ + "ZWD", + "Zimbabves dolÄrs" + ], + "ZWL": [ + "ZWL", + "Zimbabves dolÄrs (2009)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/meta.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..c2e67c6ad9793e04e1ae402da79c450fe46e90e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/meta.json @@ -0,0 +1,1652 @@ +{ + "Version": "2.1.30.58", + "Currencies": [ + "ADP", + "AED", + "AFA", + "AFN", + "ALK", + "ALL", + "AMD", + "ANG", + "AOA", + "AOK", + "AON", + "AOR", + "ARA", + "ARL", + "ARM", + "ARP", + "ARS", + "ATS", + "AUD", + "AWG", + "AZM", + "AZN", + "BAD", + "BAM", + "BAN", + "BBD", + "BDT", + "BEC", + "BEF", + "BEL", + "BGL", + "BGM", + "BGN", + "BGO", + "BHD", + "BIF", + "BMD", + "BND", + "BOB", + "BOL", + "BOP", + "BOV", + "BRB", + "BRC", + "BRE", + "BRL", + "BRN", + "BRR", + "BRZ", + "BSD", + "BTN", + "BUK", + "BWP", + "BYB", + "BYN", + "BYR", + "BZD", + "CAD", + "CDF", + "CHE", + "CHF", + "CHW", + "CLE", + "CLF", + "CLP", + "CNX", + "CNY", + "COP", + "COU", + "CRC", + "CSD", + "CSK", + "CUC", + "CUP", + "CVE", + "CYP", + "CZK", + "DDM", + "DEM", + "DJF", + "DKK", + "DOP", + "DZD", + "ECS", + "ECV", + "EEK", + "EGP", + "ERN", + "ESA", + "ESB", + "ESP", + "ETB", + "EUR", + "FIM", + "FJD", + "FKP", + "FRF", + "GBP", + "GEK", + "GEL", + "GHC", + "GHS", + "GIP", + "GMD", + "GNF", + "GNS", + "GQE", + "GRD", + "GTQ", + "GWE", + "GWP", + "GYD", + "HKD", + "HNL", + "HRD", + "HRK", + "HTG", + "HUF", + "IDR", + "IEP", + "ILP", + "ILR", + "ILS", + "INR", + "IQD", + "IRR", + "ISJ", + "ISK", + "ITL", + "JMD", + "JOD", + "JPY", + "KES", + "KGS", + "KHR", + "KMF", + "KPW", + "KRH", + "KRO", + "KRW", + "KWD", + "KYD", + "KZT", + "LAK", + "LBP", + "LKR", + "LRD", + "LSL", + "LTL", + "LTT", + "LUC", + "LUF", + "LUL", + "LVL", + "LVR", + "LYD", + "MAD", + "MAF", + "MCF", + "MDC", + "MDL", + "MGA", + "MGF", + "MKD", + "MKN", + "MLF", + "MMK", + "MNT", + "MOP", + "MRO", + "MTL", + "MTP", + "MUR", + "MVP", + "MVR", + "MWK", + "MXN", + "MXP", + "MXV", + "MYR", + "MZE", + "MZM", + "MZN", + "NAD", + "NGN", + "NIC", + "NIO", + "NLG", + "NOK", + "NPR", + "NZD", + "OMR", + "PAB", + "PEI", + "PEN", + "PES", + "PGK", + "PHP", + "PKR", + "PLN", + "PLZ", + "PTE", + "PYG", + "QAR", + "RHD", + "ROL", + "RON", + "RSD", + "RUB", + "RUR", + "RWF", + "SAR", + "SBD", + "SCR", + "SDD", + "SDG", + "SDP", + "SEK", + "SGD", + "SHP", + "SIT", + "SKK", + "SLL", + "SOS", + "SRD", + "SRG", + "SSP", + "STD", + "SUR", + "SVC", + "SYP", + "SZL", + "THB", + "TJR", + "TJS", + "TMM", + "TMT", + "TND", + "TOP", + "TPE", + "TRL", + "TRY", + "TTD", + "TWD", + "TZS", + "UAH", + "UAK", + "UGS", + "UGX", + "USD", + "USN", + "USS", + "UYI", + "UYP", + "UYU", + "UZS", + "VEB", + "VEF", + "VND", + "VNN", + "VUV", + "WST", + "XAF", + "XCD", + "XEU", + "XFO", + "XFU", + "XOF", + "XPF", + "XRE", + "YDD", + "YER", + "YUD", + "YUM", + "YUN", + "YUR", + "ZAL", + "ZAR", + "ZMK", + "ZMW", + "ZRN", + "ZRZ", + "ZWD", + "ZWL", + "ZWR" + ], + "Meta": { + "ADP": [ + 0, + 0, + 0, + 0 + ], + "AFN": [ + 0, + 0, + 0, + 0 + ], + "ALL": [ + 0, + 0, + 0, + 0 + ], + "AMD": [ + 0, + 0, + 0, + 0 + ], + "BHD": [ + 3, + 0, + 3, + 0 + ], + "BIF": [ + 0, + 0, + 0, + 0 + ], + "BYN": [ + 2, + 0, + 2, + 0 + ], + "BYR": [ + 0, + 0, + 0, + 0 + ], + "CAD": [ + 2, + 0, + 2, + 5 + ], + "CHF": [ + 2, + 0, + 2, + 5 + ], + "CLF": [ + 4, + 0, + 4, + 0 + ], + "CLP": [ + 0, + 0, + 0, + 0 + ], + "COP": [ + 0, + 0, + 0, + 0 + ], + "CRC": [ + 2, + 0, + 0, + 0 + ], + "CZK": [ + 2, + 0, + 0, + 0 + ], + "DEFAULT": [ + 2, + 0, + 2, + 0 + ], + "DJF": [ + 0, + 0, + 0, + 0 + ], + "ESP": [ + 0, + 0, + 0, + 0 + ], + "GNF": [ + 0, + 0, + 0, + 0 + ], + "GYD": [ + 0, + 0, + 0, + 0 + ], + "HUF": [ + 2, + 0, + 0, + 0 + ], + "IDR": [ + 0, + 0, + 0, + 0 + ], + "IQD": [ + 0, + 0, + 0, + 0 + ], + "IRR": [ + 0, + 0, + 0, + 0 + ], + "ISK": [ + 0, + 0, + 0, + 0 + ], + "ITL": [ + 0, + 0, + 0, + 0 + ], + "JOD": [ + 3, + 0, + 3, + 0 + ], + "JPY": [ + 0, + 0, + 0, + 0 + ], + "KMF": [ + 0, + 0, + 0, + 0 + ], + "KPW": [ + 0, + 0, + 0, + 0 + ], + "KRW": [ + 0, + 0, + 0, + 0 + ], + "KWD": [ + 3, + 0, + 3, + 0 + ], + "LAK": [ + 0, + 0, + 0, + 0 + ], + "LBP": [ + 0, + 0, + 0, + 0 + ], + "LUF": [ + 0, + 0, + 0, + 0 + ], + "LYD": [ + 3, + 0, + 3, + 0 + ], + "MGA": [ + 0, + 0, + 0, + 0 + ], + "MGF": [ + 0, + 0, + 0, + 0 + ], + "MMK": [ + 0, + 0, + 0, + 0 + ], + "MNT": [ + 0, + 0, + 0, + 0 + ], + "MRO": [ + 0, + 0, + 0, + 0 + ], + "MUR": [ + 0, + 0, + 0, + 0 + ], + "OMR": [ + 3, + 0, + 3, + 0 + ], + "PKR": [ + 0, + 0, + 0, + 0 + ], + "PYG": [ + 0, + 0, + 0, + 0 + ], + "RSD": [ + 0, + 0, + 0, + 0 + ], + "RWF": [ + 0, + 0, + 0, + 0 + ], + "SLL": [ + 0, + 0, + 0, + 0 + ], + "SOS": [ + 0, + 0, + 0, + 0 + ], + "STD": [ + 0, + 0, + 0, + 0 + ], + "SYP": [ + 0, + 0, + 0, + 0 + ], + "TMM": [ + 0, + 0, + 0, + 0 + ], + "TND": [ + 3, + 0, + 3, + 0 + ], + "TRL": [ + 0, + 0, + 0, + 0 + ], + "TWD": [ + 2, + 0, + 0, + 0 + ], + "TZS": [ + 0, + 0, + 0, + 0 + ], + "UGX": [ + 0, + 0, + 0, + 0 + ], + "UYI": [ + 0, + 0, + 0, + 0 + ], + "UZS": [ + 0, + 0, + 0, + 0 + ], + "VND": [ + 0, + 0, + 0, + 0 + ], + "VUV": [ + 0, + 0, + 0, + 0 + ], + "XAF": [ + 0, + 0, + 0, + 0 + ], + "XOF": [ + 0, + 0, + 0, + 0 + ], + "XPF": [ + 0, + 0, + 0, + 0 + ], + "YER": [ + 0, + 0, + 0, + 0 + ], + "ZMK": [ + 0, + 0, + 0, + 0 + ], + "ZWD": [ + 0, + 0, + 0, + 0 + ] + }, + "Alpha3ToNumeric": { + "AFA": 4, + "ALL": 8, + "DZD": 12, + "ADP": 20, + "AON": 24, + "AZM": 31, + "ARS": 32, + "ARP": 32, + "ARA": 32, + "AUD": 36, + "ATS": 40, + "BSD": 44, + "BHD": 48, + "BDT": 50, + "AMD": 51, + "BBD": 52, + "BEF": 56, + "BMD": 60, + "BTN": 64, + "BOB": 68, + "BAD": 70, + "BWP": 72, + "BRN": 76, + "BRE": 76, + "BRC": 76, + "BZD": 84, + "SBD": 90, + "BND": 96, + "BGL": 100, + "MMK": 104, + "BIF": 108, + "BYB": 112, + "KHR": 116, + "CAD": 124, + "CVE": 132, + "KYD": 136, + "LKR": 144, + "CLP": 152, + "CNY": 156, + "COP": 170, + "KMF": 174, + "ZRN": 180, + "ZRZ": 180, + "CRC": 188, + "HRK": 191, + "HRD": 191, + "CUP": 192, + "CYP": 196, + "CSK": 200, + "CZK": 203, + "DKK": 208, + "DOP": 214, + "ECS": 218, + "SVC": 222, + "GQE": 226, + "ETB": 230, + "ERN": 232, + "EEK": 233, + "FKP": 238, + "FJD": 242, + "FIM": 246, + "FRF": 250, + "DJF": 262, + "GEK": 268, + "GMD": 270, + "DEM": 276, + "DDM": 278, + "GHC": 288, + "GIP": 292, + "GRD": 300, + "GTQ": 320, + "GNF": 324, + "GYD": 328, + "HTG": 332, + "HNL": 340, + "HKD": 344, + "HUF": 348, + "ISK": 352, + "INR": 356, + "IDR": 360, + "IRR": 364, + "IQD": 368, + "IEP": 372, + "ILS": 376, + "ITL": 380, + "JMD": 388, + "JPY": 392, + "KZT": 398, + "JOD": 400, + "KES": 404, + "KPW": 408, + "KRW": 410, + "KWD": 414, + "KGS": 417, + "LAK": 418, + "LBP": 422, + "LSL": 426, + "LVL": 428, + "LVR": 428, + "LRD": 430, + "LYD": 434, + "LTT": 440, + "LTL": 440, + "LUF": 442, + "MOP": 446, + "MGF": 450, + "MWK": 454, + "MYR": 458, + "MVR": 462, + "MLF": 466, + "MTL": 470, + "MRO": 478, + "MUR": 480, + "MXN": 484, + "MNT": 496, + "MDL": 498, + "MAD": 504, + "MZM": 508, + "OMR": 512, + "NAD": 516, + "NPR": 524, + "NLG": 528, + "ANG": 532, + "AWG": 533, + "VUV": 548, + "NZD": 554, + "NIO": 558, + "NGN": 566, + "NOK": 578, + "PKR": 586, + "PAB": 590, + "PGK": 598, + "PYG": 600, + "PEI": 604, + "PEN": 604, + "PES": 604, + "PHP": 608, + "PLZ": 616, + "PTE": 620, + "GWP": 624, + "TPE": 626, + "QAR": 634, + "ROL": 642, + "RUB": 643, + "RWF": 646, + "SHP": 654, + "STD": 678, + "SAR": 682, + "SCR": 690, + "SLL": 694, + "SGD": 702, + "SKK": 703, + "VND": 704, + "SIT": 705, + "SOS": 706, + "ZAR": 710, + "ZWD": 716, + "YDD": 720, + "ESP": 724, + "SSP": 728, + "SDD": 736, + "SRG": 740, + "SZL": 748, + "SEK": 752, + "CHF": 756, + "SYP": 760, + "TJR": 762, + "THB": 764, + "TOP": 776, + "TTD": 780, + "AED": 784, + "TND": 788, + "TRL": 792, + "TMM": 795, + "UGX": 800, + "UAK": 804, + "MKD": 807, + "RUR": 810, + "EGP": 818, + "GBP": 826, + "TZS": 834, + "USD": 840, + "UYU": 858, + "UZS": 860, + "VEB": 862, + "WST": 882, + "YER": 886, + "YUN": 890, + "CSD": 891, + "YUM": 891, + "ZMK": 894, + "TWD": 901, + "CUC": 931, + "ZWL": 932, + "BYN": 933, + "TMT": 934, + "ZWR": 935, + "GHS": 936, + "VEF": 937, + "SDG": 938, + "UYI": 940, + "RSD": 941, + "MZN": 943, + "AZN": 944, + "RON": 946, + "CHE": 947, + "CHW": 948, + "TRY": 949, + "XAF": 950, + "XCD": 951, + "XOF": 952, + "XPF": 953, + "XEU": 954, + "ZMW": 967, + "SRD": 968, + "MGA": 969, + "COU": 970, + "AFN": 971, + "TJS": 972, + "AOA": 973, + "BYR": 974, + "BGN": 975, + "CDF": 976, + "BAM": 977, + "EUR": 978, + "MXV": 979, + "UAH": 980, + "GEL": 981, + "AOR": 982, + "ECV": 983, + "BOV": 984, + "PLN": 985, + "BRL": 986, + "BRR": 987, + "LUL": 988, + "LUC": 989, + "CLF": 990, + "ZAL": 991, + "BEL": 992, + "BEC": 993, + "ESB": 995, + "ESA": 996, + "USN": 997, + "USS": 998 + }, + "NumericToAlpha3": { + "4": [ + "AFA" + ], + "8": [ + "ALL" + ], + "12": [ + "DZD" + ], + "20": [ + "ADP" + ], + "24": [ + "AON" + ], + "31": [ + "AZM" + ], + "32": [ + "ARS", + "ARP", + "ARA" + ], + "36": [ + "AUD" + ], + "40": [ + "ATS" + ], + "44": [ + "BSD" + ], + "48": [ + "BHD" + ], + "50": [ + "BDT" + ], + "51": [ + "AMD" + ], + "52": [ + "BBD" + ], + "56": [ + "BEF" + ], + "60": [ + "BMD" + ], + "64": [ + "BTN" + ], + "68": [ + "BOB" + ], + "70": [ + "BAD" + ], + "72": [ + "BWP" + ], + "76": [ + "BRN", + "BRE", + "BRC" + ], + "84": [ + "BZD" + ], + "90": [ + "SBD" + ], + "96": [ + "BND" + ], + "100": [ + "BGL" + ], + "104": [ + "MMK" + ], + "108": [ + "BIF" + ], + "112": [ + "BYB" + ], + "116": [ + "KHR" + ], + "124": [ + "CAD" + ], + "132": [ + "CVE" + ], + "136": [ + "KYD" + ], + "144": [ + "LKR" + ], + "152": [ + "CLP" + ], + "156": [ + "CNY" + ], + "170": [ + "COP" + ], + "174": [ + "KMF" + ], + "180": [ + "ZRN", + "ZRZ" + ], + "188": [ + "CRC" + ], + "191": [ + "HRK", + "HRD" + ], + "192": [ + "CUP" + ], + "196": [ + "CYP" + ], + "200": [ + "CSK" + ], + "203": [ + "CZK" + ], + "208": [ + "DKK" + ], + "214": [ + "DOP" + ], + "218": [ + "ECS" + ], + "222": [ + "SVC" + ], + "226": [ + "GQE" + ], + "230": [ + "ETB" + ], + "232": [ + "ERN" + ], + "233": [ + "EEK" + ], + "238": [ + "FKP" + ], + "242": [ + "FJD" + ], + "246": [ + "FIM" + ], + "250": [ + "FRF" + ], + "262": [ + "DJF" + ], + "268": [ + "GEK" + ], + "270": [ + "GMD" + ], + "276": [ + "DEM" + ], + "278": [ + "DDM" + ], + "288": [ + "GHC" + ], + "292": [ + "GIP" + ], + "300": [ + "GRD" + ], + "320": [ + "GTQ" + ], + "324": [ + "GNF" + ], + "328": [ + "GYD" + ], + "332": [ + "HTG" + ], + "340": [ + "HNL" + ], + "344": [ + "HKD" + ], + "348": [ + "HUF" + ], + "352": [ + "ISK" + ], + "356": [ + "INR" + ], + "360": [ + "IDR" + ], + "364": [ + "IRR" + ], + "368": [ + "IQD" + ], + "372": [ + "IEP" + ], + "376": [ + "ILS" + ], + "380": [ + "ITL" + ], + "388": [ + "JMD" + ], + "392": [ + "JPY" + ], + "398": [ + "KZT" + ], + "400": [ + "JOD" + ], + "404": [ + "KES" + ], + "408": [ + "KPW" + ], + "410": [ + "KRW" + ], + "414": [ + "KWD" + ], + "417": [ + "KGS" + ], + "418": [ + "LAK" + ], + "422": [ + "LBP" + ], + "426": [ + "LSL" + ], + "428": [ + "LVL", + "LVR" + ], + "430": [ + "LRD" + ], + "434": [ + "LYD" + ], + "440": [ + "LTT", + "LTL" + ], + "442": [ + "LUF" + ], + "446": [ + "MOP" + ], + "450": [ + "MGF" + ], + "454": [ + "MWK" + ], + "458": [ + "MYR" + ], + "462": [ + "MVR" + ], + "466": [ + "MLF" + ], + "470": [ + "MTL" + ], + "478": [ + "MRO" + ], + "480": [ + "MUR" + ], + "484": [ + "MXN" + ], + "496": [ + "MNT" + ], + "498": [ + "MDL" + ], + "504": [ + "MAD" + ], + "508": [ + "MZM" + ], + "512": [ + "OMR" + ], + "516": [ + "NAD" + ], + "524": [ + "NPR" + ], + "528": [ + "NLG" + ], + "532": [ + "ANG" + ], + "533": [ + "AWG" + ], + "548": [ + "VUV" + ], + "554": [ + "NZD" + ], + "558": [ + "NIO" + ], + "566": [ + "NGN" + ], + "578": [ + "NOK" + ], + "586": [ + "PKR" + ], + "590": [ + "PAB" + ], + "598": [ + "PGK" + ], + "600": [ + "PYG" + ], + "604": [ + "PEI", + "PEN", + "PES" + ], + "608": [ + "PHP" + ], + "616": [ + "PLZ" + ], + "620": [ + "PTE" + ], + "624": [ + "GWP" + ], + "626": [ + "TPE" + ], + "634": [ + "QAR" + ], + "642": [ + "ROL" + ], + "643": [ + "RUB" + ], + "646": [ + "RWF" + ], + "654": [ + "SHP" + ], + "678": [ + "STD" + ], + "682": [ + "SAR" + ], + "690": [ + "SCR" + ], + "694": [ + "SLL" + ], + "702": [ + "SGD" + ], + "703": [ + "SKK" + ], + "704": [ + "VND" + ], + "705": [ + "SIT" + ], + "706": [ + "SOS" + ], + "710": [ + "ZAR" + ], + "716": [ + "ZWD" + ], + "720": [ + "YDD" + ], + "724": [ + "ESP" + ], + "728": [ + "SSP" + ], + "736": [ + "SDD" + ], + "740": [ + "SRG" + ], + "748": [ + "SZL" + ], + "752": [ + "SEK" + ], + "756": [ + "CHF" + ], + "760": [ + "SYP" + ], + "762": [ + "TJR" + ], + "764": [ + "THB" + ], + "776": [ + "TOP" + ], + "780": [ + "TTD" + ], + "784": [ + "AED" + ], + "788": [ + "TND" + ], + "792": [ + "TRL" + ], + "795": [ + "TMM" + ], + "800": [ + "UGX" + ], + "804": [ + "UAK" + ], + "807": [ + "MKD" + ], + "810": [ + "RUR" + ], + "818": [ + "EGP" + ], + "826": [ + "GBP" + ], + "834": [ + "TZS" + ], + "840": [ + "USD" + ], + "858": [ + "UYU" + ], + "860": [ + "UZS" + ], + "862": [ + "VEB" + ], + "882": [ + "WST" + ], + "886": [ + "YER" + ], + "890": [ + "YUN" + ], + "891": [ + "CSD", + "YUM" + ], + "894": [ + "ZMK" + ], + "901": [ + "TWD" + ], + "931": [ + "CUC" + ], + "932": [ + "ZWL" + ], + "933": [ + "BYN" + ], + "934": [ + "TMT" + ], + "935": [ + "ZWR" + ], + "936": [ + "GHS" + ], + "937": [ + "VEF" + ], + "938": [ + "SDG" + ], + "940": [ + "UYI" + ], + "941": [ + "RSD" + ], + "943": [ + "MZN" + ], + "944": [ + "AZN" + ], + "946": [ + "RON" + ], + "947": [ + "CHE" + ], + "948": [ + "CHW" + ], + "949": [ + "TRY" + ], + "950": [ + "XAF" + ], + "951": [ + "XCD" + ], + "952": [ + "XOF" + ], + "953": [ + "XPF" + ], + "954": [ + "XEU" + ], + "967": [ + "ZMW" + ], + "968": [ + "SRD" + ], + "969": [ + "MGA" + ], + "970": [ + "COU" + ], + "971": [ + "AFN" + ], + "972": [ + "TJS" + ], + "973": [ + "AOA" + ], + "974": [ + "BYR" + ], + "975": [ + "BGN" + ], + "976": [ + "CDF" + ], + "977": [ + "BAM" + ], + "978": [ + "EUR" + ], + "979": [ + "MXV" + ], + "980": [ + "UAH" + ], + "981": [ + "GEL" + ], + "982": [ + "AOR" + ], + "983": [ + "ECV" + ], + "984": [ + "BOV" + ], + "985": [ + "PLN" + ], + "986": [ + "BRL" + ], + "987": [ + "BRR" + ], + "988": [ + "LUL" + ], + "989": [ + "LUC" + ], + "990": [ + "CLF" + ], + "991": [ + "ZAL" + ], + "992": [ + "BEL" + ], + "993": [ + "BEC" + ], + "995": [ + "ESB" + ], + "996": [ + "ESA" + ], + "997": [ + "USN" + ], + "998": [ + "USS" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mg.json new file mode 100644 index 0000000000000000000000000000000000000000..492db6cdb7c9dda7fe37c786240af376fe90bbfd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mg.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AED": [ + "AED", + "Dirham" + ], + "AOA": [ + "AOA", + "kwanza angoley" + ], + "AUD": [ + "A$", + "Dolara aostralianina" + ], + "BHD": [ + "BHD", + "dinar bahreïni" + ], + "BIF": [ + "BIF", + "Farantsa Borondi" + ], + "BWP": [ + "BWP", + "Pola botsoaney" + ], + "CAD": [ + "CA$", + "Dôlara Kanadianina" + ], + "CDF": [ + "CDF", + "Farantsa kôngôley" + ], + "CHF": [ + "CHF", + "Farantsa soisa" + ], + "CNY": [ + "CNÂ¥", + "Yoan sinoa Renminbi" + ], + "CVE": [ + "CVE", + "Escudo" + ], + "DJF": [ + "DJF", + "Farantsa Djibotianina" + ], + "DZD": [ + "DZD", + "Dinara alzerianina" + ], + "EGP": [ + "EGP", + "vola venty ejipsiana" + ], + "ERN": [ + "ERN", + "Nakfà Eritreanina" + ], + "ETB": [ + "ETB", + "Bir etiopianina" + ], + "EUR": [ + "€", + "Eoro" + ], + "GBP": [ + "£", + "livre sterling" + ], + "GHC": [ + "GHC", + "cédi" + ], + "GMD": [ + "GMD", + "Dalasi gambianina" + ], + "GNS": [ + "GNS", + "Farantsa Gineanina" + ], + "INR": [ + "₹", + "Ropia Indianina" + ], + "JPY": [ + "JPÂ¥", + "Yen Japoney" + ], + "KES": [ + "KES", + "Shilling kenianina" + ], + "KMF": [ + "KMF", + "Farantsa Komorianina" + ], + "LRD": [ + "LRD", + "Dôlara Liberianina" + ], + "LSL": [ + "LSL", + "Loti" + ], + "LYD": [ + "LYD", + "Dinara Libyanina" + ], + "MAD": [ + "MAD", + "Dirham marokianina" + ], + "MGA": [ + "Ar", + "Ariary" + ], + "MRO": [ + "MRO", + "Ouguiya moritanianina" + ], + "MUR": [ + "MUR", + "Ropia maorisianina" + ], + "MWK": [ + "MWK", + "kwacha malawite" + ], + "MZM": [ + "MZM", + "Metikaly" + ], + "NAD": [ + "NAD", + "Dolara namibianina" + ], + "NGN": [ + "NGN", + "Naira nigerianina" + ], + "RWF": [ + "RWF", + "Farantsa Roande" + ], + "SAR": [ + "SAR", + "Rial saodianina" + ], + "SCR": [ + "SCR", + "Ropia Seysheloà" + ], + "SDG": [ + "SDG", + "Dinara Sodaney" + ], + "SDP": [ + "SDP", + "livre soudanaise (1956–2007)" + ], + "SHP": [ + "SHP", + "livre de Sainte-Hélène" + ], + "SLL": [ + "SLL", + "Leone" + ], + "SOS": [ + "SOS", + "Shilling somalianina" + ], + "STD": [ + "STD", + "Dobra" + ], + "SZL": [ + "SZL", + "Lilangeni" + ], + "TND": [ + "TND", + "Dinar tonizianina" + ], + "TZS": [ + "TZS", + "Shilling tanzanianina" + ], + "UGX": [ + "UGX", + "Shilling ogandianina" + ], + "USD": [ + "US$", + "Dolara amerikanina" + ], + "XAF": [ + "FCFA", + "Farantsa CFA (BEAC)" + ], + "XOF": [ + "CFA", + "Farantsa CFA (BCEAO)" + ], + "ZAR": [ + "ZAR", + "Rand afrikanina tatsimo" + ], + "ZMK": [ + "ZMK", + "Kwacha zambianina (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha zambianina" + ], + "ZWD": [ + "ZWD", + "Dôlara Zimbaboeanina" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mk.json new file mode 100644 index 0000000000000000000000000000000000000000..7d6233fdc208cca41c43089293e5e1d43961958f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mk.json @@ -0,0 +1,901 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "ÐндорÑка Пезета" + ], + "AED": [ + "AED", + "Обединети ÐрапÑки Емирати Дирхам" + ], + "AFA": [ + "AFA", + "Ðвгани (1927–2002)" + ], + "AFN": [ + "AFN", + "ÐвганиÑтанÑки авгани" + ], + "ALL": [ + "ALL", + "ÐлбанÑки лек" + ], + "AMD": [ + "AMD", + "ЕрмениÑки Драм" + ], + "ANG": [ + "ANG", + "ХоландÑки антилÑки гилдер" + ], + "AOA": [ + "AOA", + "ÐнголÑка Кванза" + ], + "AOK": [ + "AOK", + "ÐнголÑка Кванза (1977–1990)" + ], + "AON": [ + "AON", + "ÐнголÑка нова Кванза (1990–2000)" + ], + "ARP": [ + "ARP", + "ÐргентинÑки ÐŸÐµÐ·Ð¾Ñ (1983–1985)" + ], + "ARS": [ + "ARS", + "ÐргентинÑки пезоÑ" + ], + "ATS": [ + "ATS", + "ÐвÑтралиÑки Шилинг" + ], + "AUD": [ + "AUD", + "ÐвÑтралиÑки долар" + ], + "AWG": [ + "AWG", + "ÐрубиÑки флорин" + ], + "AZN": [ + "AZN", + "ÐзербејџанÑки манат" + ], + "BAD": [ + "BAD", + "БоÑанÑко-ХерцеговÑки Динар" + ], + "BAM": [ + "BAM", + "БоÑанÑко-ХерцеговÑка конвертибилна марка" + ], + "BBD": [ + "BBD", + "БарбадоÑки долар" + ], + "BDT": [ + "BDT", + "Бангладешка така" + ], + "BEC": [ + "BEC", + "БелгиÑки Франк (конвертибилен)" + ], + "BEF": [ + "BEF", + "БелгиÑки Франк" + ], + "BEL": [ + "BEL", + "БелгиÑки Франк (финанÑиÑки)" + ], + "BGL": [ + "BGL", + "БугарÑки цврÑÑ‚ лев" + ], + "BGN": [ + "BGN", + "БугарÑки лев" + ], + "BHD": [ + "BHD", + "БахреинÑки Динар" + ], + "BIF": [ + "BIF", + "БурундиÑки франк" + ], + "BMD": [ + "BMD", + "БермудÑки долар" + ], + "BND": [ + "BND", + "БрунејÑки долар" + ], + "BOB": [ + "BOB", + "БоливиÑки боливиано" + ], + "BRL": [ + "R$", + "БразилÑки реал" + ], + "BSD": [ + "BSD", + "БахамÑки долар" + ], + "BTN": [ + "BTN", + "БутанÑки нгултрум" + ], + "BWP": [ + "BWP", + "БоцванÑка Пула" + ], + "BYB": [ + "BYB", + "БелоруÑка нова рубља (1994–1999)" + ], + "BYN": [ + "BYN", + "БелоруÑка рубља" + ], + "BYR": [ + "BYR", + "БелоруÑка рубља (2000–2016)" + ], + "BZD": [ + "BZD", + "БелизиÑки Долар" + ], + "CAD": [ + "CA$", + "КанадÑки долар" + ], + "CDF": [ + "CDF", + "КонголÑки франк" + ], + "CHF": [ + "CHF", + "ШвајцарÑки Франк" + ], + "CLP": [ + "CLP", + "ЧилеанÑки пезоÑ" + ], + "CNY": [ + "CNY", + "КинеÑки јуан" + ], + "COP": [ + "COP", + "КолумбиÑки пезоÑ" + ], + "CRC": [ + "CRC", + "КоÑтариканÑки колон" + ], + "CSK": [ + "CSK", + "ЧехоÑловачка цврÑта корона" + ], + "CUC": [ + "CUC", + "КубанÑки Ð¿ÐµÐ·Ð¾Ñ (конвертибилен)" + ], + "CUP": [ + "CUP", + "КубанÑки пезоÑ" + ], + "CVE": [ + "CVE", + "Зелено’ртÑки еÑкудо" + ], + "CYP": [ + "CYP", + "КипарÑка фунта" + ], + "CZK": [ + "CZK", + "Чешка корона" + ], + "DEM": [ + "DEM", + "ГерманÑка Марка" + ], + "DJF": [ + "DJF", + "Ðибути франк" + ], + "DKK": [ + "DKK", + "ДанÑка круна" + ], + "DOP": [ + "DOP", + "ДоминиканÑки ПезоÑ" + ], + "DZD": [ + "DZD", + "ÐлжирÑки динар" + ], + "EGP": [ + "EGP", + "ЕгипетÑка фунта" + ], + "ERN": [ + "ERN", + "ЕритрејÑка накфа" + ], + "ESP": [ + "ESP", + "ШпанÑка Пезета" + ], + "ETB": [ + "ETB", + "ЕтиопиÑки бир" + ], + "EUR": [ + "€", + "Евро" + ], + "FIM": [ + "FIM", + "ФинÑка марка" + ], + "FJD": [ + "FJD", + "ФиџиÑки долар" + ], + "FKP": [ + "FKP", + "ФолкландÑка фунта" + ], + "FRF": [ + "FRF", + "ФранцуÑки франк" + ], + "GBP": [ + "GBP", + "БританÑка Фунта" + ], + "GEL": [ + "GEL", + "ГрузиÑки лари" + ], + "GHC": [ + "GHC", + "ГанајÑки Седи" + ], + "GHS": [ + "GHS", + "ГанÑки Ñеди" + ], + "GIP": [ + "GIP", + "ГибралтарÑка фунта" + ], + "GMD": [ + "GMD", + "ГамбиÑки далаÑи" + ], + "GNF": [ + "GNF", + "ГвинејÑки франк" + ], + "GRD": [ + "GRD", + "Грчка драхма" + ], + "GTQ": [ + "GTQ", + "ГватемалÑки кветцал" + ], + "GWP": [ + "GWP", + "ГвинејÑки БиÑау пезоÑ" + ], + "GYD": [ + "GYD", + "ГвајанÑки долар" + ], + "HKD": [ + "HKD", + "Хонгконшки долар" + ], + "HNL": [ + "HNL", + "ХондурÑка лемпира" + ], + "HRD": [ + "HRD", + "ХрватÑки динар" + ], + "HRK": [ + "HRK", + "ХрватÑка куна" + ], + "HTG": [ + "HTG", + "ХаитÑки гурд" + ], + "HUF": [ + "HUF", + "УнгарÑка форинта" + ], + "IDR": [ + "IDR", + "ИндонезиÑка рупија" + ], + "IEP": [ + "IEP", + "ИрÑка фунта" + ], + "ILP": [ + "ILP", + "ИзрелÑка фунта" + ], + "ILS": [ + "ILS", + "ИзраелÑки нов шекел" + ], + "INR": [ + "INR", + "ИндијÑка рупија" + ], + "IQD": [ + "IQD", + "Ирачки динар" + ], + "IRR": [ + "IRR", + "ИранÑки риал" + ], + "ISK": [ + "ISK", + "ИÑландÑка крона" + ], + "ITL": [ + "ITL", + "ИталијанÑка лира" + ], + "JMD": [ + "JMD", + "ЈамајканÑки долар" + ], + "JOD": [ + "JOD", + "ЈорданÑки динар" + ], + "JPY": [ + "JPY", + "ЈапонÑки јен" + ], + "KES": [ + "KES", + "КениÑки шилинг" + ], + "KGS": [ + "KGS", + "КиргиÑтанÑки Ñом" + ], + "KHR": [ + "KHR", + "КамбоџиÑки рел" + ], + "KMF": [ + "KMF", + "КоморÑки франк" + ], + "KPW": [ + "KPW", + "Северно корејÑки вон" + ], + "KRW": [ + "KRW", + "Јужно корејÑки вон" + ], + "KWD": [ + "KWD", + "КувајтÑки динар" + ], + "KYD": [ + "KYD", + "Долар на кајманÑки оÑтрови" + ], + "KZT": [ + "KZT", + "КазахÑтанÑка тенга" + ], + "LAK": [ + "LAK", + "ЛаоÑки кип" + ], + "LBP": [ + "LBP", + "ЛибанÑка фунта" + ], + "LKR": [ + "LKR", + "ШриланканÑка рупија" + ], + "LRD": [ + "LRD", + "ЛибериÑки долар" + ], + "LSL": [ + "LSL", + "ЛеÑотÑко лоти" + ], + "LTL": [ + "LTL", + "ЛитваниÑка лита" + ], + "LTT": [ + "LTT", + "ЛитваниÑки литаз" + ], + "LUF": [ + "LUF", + "ЛукÑембуршки франк" + ], + "LVL": [ + "LVL", + "ЛатвијÑки лат" + ], + "LVR": [ + "LVR", + "ЛатвијÑка рубља" + ], + "LYD": [ + "LYD", + "ЛибијÑки динар" + ], + "MAD": [ + "MAD", + "МароканÑки Дирхам" + ], + "MAF": [ + "MAF", + "МароканÑки франк" + ], + "MDL": [ + "MDL", + "МолдавÑки леу" + ], + "MGA": [ + "MGA", + "МалагаÑиÑки ариари" + ], + "MKD": [ + "ден", + "МакедонÑки денар" + ], + "MLF": [ + "MLF", + "МалÑки франк" + ], + "MMK": [ + "MMK", + "МјанмарÑки киат" + ], + "MNT": [ + "MNT", + "МонголиÑки тугрик" + ], + "MOP": [ + "MOP", + "Макао патака" + ], + "MRO": [ + "MRO", + "МавританÑка угија" + ], + "MTL": [ + "MTL", + "Малтешка лира" + ], + "MTP": [ + "MTP", + "Малтешка фунта" + ], + "MUR": [ + "MUR", + "МавританÑка рупија" + ], + "MVR": [ + "MVR", + "МалдивиÑка руфија" + ], + "MWK": [ + "MWK", + "МалавиÑка квача" + ], + "MXN": [ + "MX$", + "МекÑиканÑки пезоÑ" + ], + "MXP": [ + "MXP", + "МекÑиканÑки Ñребрен Ð¿ÐµÐ·Ð¾Ñ (1861–1992)" + ], + "MYR": [ + "MYR", + "МалезиÑки рингит" + ], + "MZE": [ + "MZE", + "МозамбиÑко еÑкудо" + ], + "MZM": [ + "MZM", + "Стар мозамбиÑки метикал" + ], + "MZN": [ + "MZN", + "МозамбиÑки метикал" + ], + "NAD": [ + "NAD", + "ÐамибиÑки долар" + ], + "NGN": [ + "NGN", + "ÐигериÑка наира" + ], + "NIC": [ + "NIC", + "ÐикарагванÑка кордоба (1988–1991)" + ], + "NIO": [ + "NIO", + "ÐикарагванÑка кордоба" + ], + "NLG": [ + "NLG", + "ХоландÑки гилдер" + ], + "NOK": [ + "NOK", + "Ðорвешка круна" + ], + "NPR": [ + "NPR", + "ÐепалÑка рупија" + ], + "NZD": [ + "NZD", + "ÐовозеландÑки долар" + ], + "OMR": [ + "OMR", + "ОманÑки риал" + ], + "PAB": [ + "PAB", + "ПанамÑка балбоа" + ], + "PEN": [ + "PEN", + "ПеруанÑки нов Ñол" + ], + "PES": [ + "PES", + "ПеруанÑки Ñол" + ], + "PGK": [ + "PGK", + "Папуа новогвинејÑка кина" + ], + "PHP": [ + "PHP", + "ФилипинÑки пезоÑ" + ], + "PKR": [ + "PKR", + "ПакиÑтанÑка рупија" + ], + "PLN": [ + "PLN", + "ПолÑка злота" + ], + "PLZ": [ + "PLZ", + "ПолÑка злота (1950–1995)" + ], + "PTE": [ + "PTE", + "ПортугалÑко еÑкудо" + ], + "PYG": [ + "PYG", + "ПарагвајÑка гуарана" + ], + "QAR": [ + "QAR", + "КатарÑки риал" + ], + "ROL": [ + "ROL", + "РоманÑка леи (1952–2006)" + ], + "RON": [ + "RON", + "РоманÑка леи" + ], + "RSD": [ + "RSD", + "СрпÑки динар" + ], + "RUB": [ + "RUB", + "РуÑка рубља" + ], + "RUR": [ + "RUR", + "РуÑка рубља (1991–1998)" + ], + "RWF": [ + "RWF", + "РуандÑки франк" + ], + "SAR": [ + "SAR", + "СаудиÑки ријал" + ], + "SBD": [ + "SBD", + "СоломонÑки долар" + ], + "SCR": [ + "SCR", + "СејшелÑка рупија" + ], + "SDD": [ + "SDD", + "Стар ÑуданÑки динар" + ], + "SDG": [ + "SDG", + "СуданÑка фунта" + ], + "SDP": [ + "SDP", + "Стара ÑуданÑка фунта" + ], + "SEK": [ + "SEK", + "ШведÑка круна" + ], + "SGD": [ + "SGD", + "СингапурÑки долар" + ], + "SHP": [ + "SHP", + "Фунта на Света Елена" + ], + "SIT": [ + "SIT", + "Словенечки толар" + ], + "SKK": [ + "SKK", + "Словачка круна" + ], + "SLL": [ + "SLL", + "СиералеонÑко леоне" + ], + "SOS": [ + "SOS", + "СомалијÑки шилинг" + ], + "SRD": [ + "SRD", + "СуринамÑки долар" + ], + "SRG": [ + "SRG", + "СуринамÑки гилдер" + ], + "SSP": [ + "SSP", + "ЈужноÑуданÑка фунта" + ], + "STD": [ + "STD", + "Добра на Сао Томе и ПринÑипе" + ], + "SUR": [ + "SUR", + "СоветÑка рубља" + ], + "SVC": [ + "SVC", + "СалвадорÑки колон" + ], + "SYP": [ + "SYP", + "СиријÑка фунта" + ], + "SZL": [ + "SZL", + "СвазилендÑки лиланген" + ], + "THB": [ + "THB", + "Таи бат" + ], + "TJR": [ + "TJR", + "ТаџикиÑтанÑка рубља" + ], + "TJS": [ + "TJS", + "ТаџикиÑтанÑки Ñомони" + ], + "TMM": [ + "TMM", + "ТуркмениÑтанÑки манат" + ], + "TMT": [ + "TMT", + "ТуркмениÑÑ‚. манат" + ], + "TND": [ + "TND", + "ТунизиÑки динар" + ], + "TOP": [ + "TOP", + "ТонганÑка панга" + ], + "TPE": [ + "TPE", + "ТиморÑки еÑкудо" + ], + "TRL": [ + "TRL", + "ТурÑка лира (1922–2005)" + ], + "TRY": [ + "TRY", + "ТурÑка лира" + ], + "TTD": [ + "TTD", + "Долар на Тринидад и Тобаго" + ], + "TWD": [ + "TWD", + "ТајванÑки нов долар" + ], + "TZS": [ + "TZS", + "ТанзаниÑки шилинг" + ], + "UAH": [ + "UAH", + "УкраинÑка хривнија" + ], + "UGS": [ + "UGS", + "УгандиÑки шилинг (1966–1987)" + ], + "UGX": [ + "UGX", + "УгандиÑки шилинг" + ], + "USD": [ + "US$", + "ÐмериканÑки долар" + ], + "USN": [ + "USN", + "СÐД долар (Next day)" + ], + "USS": [ + "USS", + "СÐД долар (Same day)" + ], + "UYP": [ + "UYP", + "УругвајÑки Ð¿ÐµÐ·Ð¾Ñ (1975–1993)" + ], + "UYU": [ + "UYU", + "УругвајÑки пезоÑ" + ], + "UZS": [ + "UZS", + "УзбекиÑтанÑки Ñом" + ], + "VEB": [ + "VEB", + "ВенецуелÑки боливар (1871–2008)" + ], + "VEF": [ + "VEF", + "ВенецуелÑки боливар" + ], + "VND": [ + "VND", + "ВиетнамÑки донг" + ], + "VUV": [ + "VUV", + "ВанатÑки вату" + ], + "WST": [ + "WST", + "СамоанÑка тала" + ], + "XAF": [ + "FCFA", + "ЦентралноафриканÑки франк" + ], + "XCD": [ + "EC$", + "ИÑточно карибиÑки долар" + ], + "XOF": [ + "CFA", + "ЗападноафриканÑки франк" + ], + "XPF": [ + "CFPF", + "ЦФП франк" + ], + "YDD": [ + "YDD", + "ЈеменÑки динар" + ], + "YER": [ + "YER", + "ЈеменÑки риал" + ], + "YUD": [ + "YUD", + "ЈугоÑловенÑки динар" + ], + "YUN": [ + "YUN", + "ЈугоÑловенÑки конвертибилен динар" + ], + "ZAL": [ + "ZAL", + "Јужно афрички ранд(финанÑиÑки)" + ], + "ZAR": [ + "ZAR", + "ЈужноафриканÑки ранд" + ], + "ZMK": [ + "ZMK", + "ЗамбијÑка квача (1968–2012)" + ], + "ZMW": [ + "ZMW", + "ЗамбијÑка квача" + ], + "ZRN": [ + "ZRN", + "ЗаирÑко новозаире" + ], + "ZRZ": [ + "ZRZ", + "ЗаирÑко заире" + ], + "ZWD": [ + "ZWD", + "ЗимбабвиÑки долар" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ml.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ml.json new file mode 100644 index 0000000000000000000000000000000000000000..eb7dbdb3b0c791895e958d4d4366ad35a2de0221 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ml.json @@ -0,0 +1,1057 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "അൻഡോറൻ പെസെയàµà´±àµà´±" + ], + "AED": [ + "AED", + "à´¯àµà´£àµˆà´±àµà´±à´¡àµ അറബൠഎമിറേറàµà´±àµà´¸àµ ദിർഹം" + ], + "AFA": [ + "AFA", + "à´…à´«àµà´˜à´¾à´¨à´¿ (1927–2002)" + ], + "AFN": [ + "AFN", + "à´…à´«àµâ€Œà´—ാൻ à´…à´«àµâ€Œâ€Œà´—ാനി" + ], + "ALL": [ + "ALL", + "അൽബേനിയൻ ലെകàµ" + ], + "AMD": [ + "AMD", + "അർമേനിയൻ à´¡àµà´°à´¾à´‚" + ], + "ANG": [ + "ANG", + "നെതർലാൻഡàµâ€Œà´¸àµ ആനàµà´±à´¿à´²àµ» ഗിൽഡർ" + ], + "AOA": [ + "AOA", + "അംഗോളൻ â€à´•àµà´µà´¾àµ»à´¸" + ], + "AOK": [ + "AOK", + "അംഗോളൻ â€à´•àµà´µà´¾àµ»à´¸ (1977–1990)" + ], + "AON": [ + "AON", + "അംഗോളൻ â€à´¨àµà´¯àµ‚ à´•àµà´µà´¾àµ»à´¸ (1990–2000)" + ], + "AOR": [ + "AOR", + "അംഗോളൻ â€à´•àµà´µà´¾àµ»à´¸ റിയാജസàµà´±àµà´±à´¾à´¡àµ‹ (1995–1999)" + ], + "ARA": [ + "ARA", + "അർജൻറീൻ à´“à´¸àµà´Ÿàµà´°àµ½" + ], + "ARP": [ + "ARP", + "അർജൻറീൻ പെയàµà´¸àµ‹ (1983–1985)" + ], + "ARS": [ + "ARS", + "അർജൻറീൻ പെസോ" + ], + "ATS": [ + "ATS", + "à´“à´¸àµà´Ÿàµà´°àµ‡à´²à´¿à´¯àµ» à´·à´¿à´²àµà´²à´¿à´‚à´—àµ" + ], + "AUD": [ + "A$", + "à´“à´¸àµà´Ÿàµà´°àµ‡à´²à´¿à´¯àµ» ഡോളർ" + ], + "AWG": [ + "AWG", + "അറൂബൻ à´«àµà´²àµ‹à´±à´¿àµ»" + ], + "AZM": [ + "AZM", + "അസർബയàµà´œà´¾à´¨à´¿à´¯àµ» മനതൠ(1993–2006)" + ], + "AZN": [ + "AZN", + "അസർബൈജാനി മനതàµ" + ], + "BAD": [ + "BAD", + "ബോസàµà´¨à´¿à´¯-ഹെർസഗോവിന ദിനാർ" + ], + "BAM": [ + "BAM", + "ബോസàµâ€Œà´¨à´¿à´¯-ഹെർസഗോവിന കൺവേർടàµà´Ÿà´¬à´¿àµ¾ മാർകàµà´•àµ" + ], + "BBD": [ + "BBD", + "ബാർബഡോസൠഡോളർ" + ], + "BDT": [ + "BDT", + "ബംഗàµà´²à´¾à´¦àµ‡à´¶à´¿ ടാകàµà´•" + ], + "BEC": [ + "BEC", + "ബെൽജിയൻ à´«àµà´°à´¾à´™àµà´•ൠ(കൈമാറàµà´±à´‚ ചെയàµà´¯à´¾à´µàµà´¨àµà´¨à´¤àµ)" + ], + "BEF": [ + "BEF", + "ബെൽജിയൻ à´«àµà´°à´¾à´™àµà´•àµ" + ], + "BEL": [ + "BEL", + "ബൽജിയൻ à´«àµà´°à´¾à´™àµà´•àµ" + ], + "BGL": [ + "BGL", + "ബൾഗേറിയൻ ഹാർഡൠലെവàµ" + ], + "BGN": [ + "BGN", + "ബൾഗേറിയൻ ലെവàµ" + ], + "BHD": [ + "BHD", + "ബഹàµà´±àµˆà´¨à´¿ ദിനാർ" + ], + "BIF": [ + "BIF", + "ബറàµà´£àµà´Ÿà´¿à´¯àµ» à´«àµà´°à´¾à´™àµà´•àµ" + ], + "BMD": [ + "BMD", + "ബെർമàµà´¡àµ» ഡോളർ" + ], + "BND": [ + "BND", + "à´¬àµà´°àµ‚ണൈ ഡോളർ" + ], + "BOB": [ + "BOB", + "ബൊളീവിയൻ ബൊളിവിയാനോ" + ], + "BOP": [ + "BOP", + "ബൊളീവിയൻ പെയàµà´¸àµ‹" + ], + "BOV": [ + "BOV", + "ബൊളീവിയൻ എംവിഡോൾ" + ], + "BRB": [ + "BRB", + "à´¬àµà´°à´¸àµ€à´²à´¿à´¯àµ» à´•àµà´°àµà´¸àµ†à´¯àµà´±àµ‹ നോവോ (1967–1986)" + ], + "BRC": [ + "BRC", + "à´¬àµà´°à´¸àµ€à´²à´¿à´¯àµ» à´•àµà´°àµà´¸à´¾à´¡àµ‹" + ], + "BRE": [ + "BRE", + "à´¬àµà´°à´¸àµ€à´²à´¿à´¯àµ» à´•àµà´°àµà´¸àµ†à´¯àµà´±àµ‹ (1990–1993)" + ], + "BRL": [ + "R$", + "à´¬àµà´°à´¸àµ€à´²à´¿à´¯àµ» റിയാൽ" + ], + "BRN": [ + "BRN", + "à´¬àµà´°à´¸àµ€à´²à´¿à´¯àµ» à´•àµà´°àµà´¸à´¾à´¡àµ‹ നോവോ" + ], + "BRR": [ + "BRR", + "à´¬àµà´°à´¸àµ€à´²à´¿à´¯àµ» à´•àµà´°àµà´¸àµ†à´¯àµà´±àµ‹" + ], + "BSD": [ + "BSD", + "ബഹാമിയൻ ഡോളർ" + ], + "BTN": [ + "BTN", + "ഭൂടàµà´Ÿà´¾à´¨àµ€à´¸àµ ഗൾടàµà´°à´‚" + ], + "BUK": [ + "BUK", + "ബർമീസൠചാറàµà´±àµ" + ], + "BWP": [ + "BWP", + "ബോടàµâ€Œà´¸àµà´µà´¾à´¨àµ» à´ªàµà´¯àµà´²" + ], + "BYB": [ + "BYB", + "ബെലാറഷàµà´¯àµ» à´¨àµà´¯àµ‚ റൂബിൾ (1994–1999)" + ], + "BYN": [ + "BYN", + "ബെലാറàµà´·àµà´¯àµ» റൂബിൾ" + ], + "BYR": [ + "BYR", + "ബെലാറàµà´·àµà´¯àµ» റൂബിൾ (2000–2016)" + ], + "BZD": [ + "BZD", + "ബെലീസൠഡോളർ" + ], + "CAD": [ + "CA$", + "കനേഡിയൻ ഡോളർ" + ], + "CDF": [ + "CDF", + "കോങàµà´•ളീസൠഫàµà´°à´¾à´™àµà´•àµ" + ], + "CHE": [ + "CHE", + "WIR യൂറോ" + ], + "CHF": [ + "CHF", + "à´¸àµà´µà´¿à´¸àµ à´«àµà´°à´¾à´™àµà´•àµ" + ], + "CHW": [ + "CHW", + "WIR à´«àµà´°à´¾à´™àµà´•àµ" + ], + "CLF": [ + "CLF", + "ചിലിയൻ യൂണിഡാഡàµà´¸àµ à´¡à´¿ ഫോമെൻറോ" + ], + "CLP": [ + "CLP", + "ചിലിയൻ പെസോ" + ], + "CNY": [ + "CNÂ¥", + "ചൈനീസൠയàµà´µà´¾àµ»" + ], + "COP": [ + "COP", + "കൊളംബിയൻ പെസോ" + ], + "COU": [ + "COU", + "യൂണിഡാഡൠഡി വാലർ റിയൽ" + ], + "CRC": [ + "CRC", + "കോസàµà´±àµà´±à´¾ റികàµà´•ൻ കോളൻ" + ], + "CSD": [ + "CSD", + "à´ªàµà´°à´¾à´šàµ€à´¨ സെർബിയൻ ദിനാർ" + ], + "CSK": [ + "CSK", + "ചെകàµà´•ോസàµà´²àµŠà´µà´¾à´•àµà´•ൠഹാർഡൠകൊരൂന" + ], + "CUC": [ + "CUC", + "à´•àµà´¯àµ‚ബൻ കൺവേർടàµà´Ÿà´¬à´¿àµ¾ പെസോ" + ], + "CUP": [ + "CUP", + "à´•àµà´¯àµ‚ബൻ പെസോ" + ], + "CVE": [ + "CVE", + "കേപൠവെർദിയൻ à´Žà´¸àµâ€Œà´•àµà´¯àµà´¡àµ‹" + ], + "CYP": [ + "CYP", + "സൈപàµà´°à´¸àµ പൌണàµà´Ÿàµ" + ], + "CZK": [ + "CZK", + "ചെകàµà´•ൠറിപàµà´ªà´¬àµà´²à´¿à´•ൠകൊരàµà´£" + ], + "DDM": [ + "DDM", + "à´•à´¿à´´à´•àµà´•ൻ ജർമൻ à´“à´¸àµà´±àµà´±àµà´®à´¾àµ¼à´•àµà´•àµ" + ], + "DEM": [ + "DEM", + "ജർമൻ മാർകàµà´•àµ" + ], + "DJF": [ + "DJF", + "ദിജിബൗടàµà´Ÿà´¿à´¯àµ» à´«àµà´°à´¾à´™àµà´•àµ" + ], + "DKK": [ + "DKK", + "ഡാനിഷൠകàµà´°àµ‹à´£àµ†" + ], + "DOP": [ + "DOP", + "ഡൊമിനികàµà´•ൻ പെസോ" + ], + "DZD": [ + "DZD", + "അൾജീരിയൻ ദിനാർ" + ], + "ECS": [ + "ECS", + "ഇകàµà´µà´¡àµ‹àµ¼ സൂകàµà´°àµ‡" + ], + "ECV": [ + "ECV", + "ഇകàµà´µà´¡àµ‹àµ¼ യൂണിഡാഡൠവാലർ കോൺസàµà´±àµà´±àµ»à´±àµ† (UVC)" + ], + "EEK": [ + "EEK", + "à´Žà´¸àµà´±àµà´±àµŒà´¨à´¿à´¯àµ» à´•àµà´°àµ‚ൺ" + ], + "EGP": [ + "EGP", + "ഈജിപàµâ€Œà´·àµà´¯àµ» പൗണàµà´Ÿàµ" + ], + "ERN": [ + "ERN", + "എറിതàµà´°à´¿à´¯àµ» നകàµà´«" + ], + "ESA": [ + "ESA", + "à´¸àµà´ªà´¾à´¨à´¿à´·àµ പസെയàµà´±àµà´± (A à´…à´•àµà´•ൌണàµà´Ÿàµ)" + ], + "ESB": [ + "ESB", + "à´¸àµà´ªà´¾à´¨à´¿à´·àµ പസെയàµà´±àµà´± (കൈമാറàµà´±à´‚ ചെയàµà´¯à´¾à´µàµà´¨àµà´¨ à´…à´•àµà´•ൌണàµà´Ÿàµ)" + ], + "ESP": [ + "ESP", + "à´¸àµà´ªà´¾à´¨à´¿à´·àµ പസെയàµà´±àµà´±" + ], + "ETB": [ + "ETB", + "à´Žà´¤àµà´¯àµ‹à´ªàµà´¯àµ» ബിർ" + ], + "EUR": [ + "€", + "യൂറോ" + ], + "FIM": [ + "FIM", + "à´«à´¿à´¨àµà´¨à´¿à´·àµ മാർകàµà´•" + ], + "FJD": [ + "FJD", + "ഫിജിയൻ ഡോളർ" + ], + "FKP": [ + "FKP", + "ഫാകàµà´•àµâ€Œà´²à´¾à´¨àµà´±àµ à´¦àµà´µàµ€à´ªàµà´•à´³àµà´Ÿàµ† പൗണàµà´Ÿàµ" + ], + "FRF": [ + "FRF", + "à´«àµà´°à´¾à´™àµà´•àµ" + ], + "GBP": [ + "£", + "à´¬àµà´°à´¿à´Ÿàµà´Ÿàµ€à´·àµ പൗണàµà´Ÿàµ" + ], + "GEK": [ + "GEK", + "ജോർâ€à´œàµà´œà´¿à´¯àµ» à´•àµà´¯àµ‚പോൺ ലാരിറàµà´±àµ" + ], + "GEL": [ + "GEL", + "ജോർജàµà´œà´¿à´¯àµ» ലാറി" + ], + "GHC": [ + "GHC", + "ഘാന കെഡി (1979–2007)" + ], + "GHS": [ + "GHS", + "ഘാനയൻ കെഡി" + ], + "GIP": [ + "GIP", + "ജിബàµà´°à´¾àµ¾à´Ÿàµà´Ÿàµ¼ പൗണàµà´Ÿàµ" + ], + "GMD": [ + "GMD", + "ഗാംബിയൻ ദലാസി" + ], + "GNF": [ + "GNF", + "ഗിനിയൻ à´«àµà´°à´¾à´™àµà´•àµ" + ], + "GNS": [ + "GNS", + "ഗിനിയ സൈലി" + ], + "GQE": [ + "GQE", + "ഇകàµà´µà´¿à´±àµà´±àµ‹à´±à´¿à´¯àµ½ ഗിനിയ à´Žà´•àµà´µàµ€à´²àµ† ഗിനിയാന" + ], + "GRD": [ + "GRD", + "à´—àµà´°àµ€à´•àµà´•ൠഡàµà´°à´¾à´•àµà´•àµà´®" + ], + "GTQ": [ + "GTQ", + "à´—àµà´µà´¾à´Ÿàµà´Ÿà´¿à´®à´¾à´²àµ» à´•àµà´µàµ†à´±àµà´±àµâ€Œà´¸àµ½" + ], + "GWE": [ + "GWE", + "പോർചàµà´šàµà´—ീസൠഗിനി à´Žà´¸àµà´•àµà´¯àµ‚ഡോ" + ], + "GWP": [ + "GWP", + "ഗിനിയ-ബിസാവൠപെയàµà´¸àµ‹" + ], + "GYD": [ + "GYD", + "ഗയാനീസൠഡോളർ" + ], + "HKD": [ + "HK$", + "ഹോങàµà´•ോങàµà´™àµ ഡോളർ" + ], + "HNL": [ + "HNL", + "ഹോണàµà´Ÿàµà´±àµ» ലെംപിറ" + ], + "HRD": [ + "HRD", + "à´•àµà´°àµŠà´¯àµ‡à´·àµà´¯àµ» ദിനാർ" + ], + "HRK": [ + "HRK", + "à´•àµà´°àµŠà´¯àµ‡à´·àµ» à´•àµà´¯àµà´¨" + ], + "HTG": [ + "HTG", + "ഹെയàµâ€Œà´¤à´¿à´¯àµ» ഗൂർഡàµ" + ], + "HUF": [ + "HUF", + "ഹംഗേറിയൻ ഫോറിനàµà´±àµ" + ], + "IDR": [ + "IDR", + "ഇനàµà´¤àµ‹à´¨àµ‡à´·àµà´¯àµ» à´±àµà´ªà´¿à´¯" + ], + "IEP": [ + "IEP", + "à´à´±à´¿à´·àµ പൌണàµà´Ÿàµ" + ], + "ILP": [ + "ILP", + "ഇസàµà´°à´¯àµ‡à´²à´¿ പൌണàµà´Ÿàµ" + ], + "ILS": [ + "₪", + "ഇസàµà´°à´¾à´¯àµ‡à´²à´¿ à´¨àµà´¯àµ‚ ഷെകàµà´•െൽ" + ], + "INR": [ + "₹", + "ഇനàµà´¤àµà´¯àµ» രൂപ" + ], + "IQD": [ + "IQD", + "ഇറാഖി ദിനാർ" + ], + "IRR": [ + "IRR", + "ഇറാനിയൻ റിയാൽ" + ], + "ISK": [ + "ISK", + "à´à´¸àµâ€Œà´²à´¾àµ»à´¡à´¿à´•ൠകàµà´°àµ‹à´£" + ], + "ITL": [ + "ITL", + "ഇറàµà´±à´¾à´²à´¿à´¯àµ» ലിറ" + ], + "JMD": [ + "JMD", + "ജമൈകàµà´•ൻ ഡോളർ" + ], + "JOD": [ + "JOD", + "ജോർദàµà´¦à´¾à´¨à´¿à´¯àµ» ദിനാർ" + ], + "JPY": [ + "Â¥", + "ജാപàµà´ªà´¨àµ€à´¸àµ യെൻ" + ], + "KES": [ + "KES", + "കെനിയൻ à´·à´¿à´²àµà´²à´¿à´‚à´—àµ" + ], + "KGS": [ + "KGS", + "കിർഗിസàµà´¥à´¾à´¨à´¿ സോം" + ], + "KHR": [ + "KHR", + "കംബോഡിയൻ റീൽ" + ], + "KMF": [ + "KMF", + "കൊമോറിയൻ à´«àµà´°à´¾à´™àµà´•àµ" + ], + "KPW": [ + "KPW", + "ഉതàµà´¤à´° കൊറിയൻ വോൺ" + ], + "KRW": [ + "â‚©", + "ദകàµà´·à´¿à´£ കൊറിയൻ വോൺ" + ], + "KWD": [ + "KWD", + "à´•àµà´µàµˆà´±àµà´±à´¿ ദിനാർ" + ], + "KYD": [ + "KYD", + "കേമാൻ à´à´²àµ»à´¡àµâ€Œà´¸àµ ഡോളർ" + ], + "KZT": [ + "KZT", + "കസാകàµà´•à´¿à´¸àµà´¥à´¾à´¨à´¿ ടെംഗെ" + ], + "LAK": [ + "LAK", + "ലാവോഷിയൻ à´•à´¿à´ªàµ" + ], + "LBP": [ + "LBP", + "ലെബനീസൠപൗണàµà´Ÿàµ" + ], + "LKR": [ + "LKR", + "à´¶àµà´°àµ€à´²à´™àµà´•ൻ à´±àµà´ªàµà´ªàµ€" + ], + "LRD": [ + "LRD", + "ലൈബീരിയൻ ഡോളർ" + ], + "LSL": [ + "LSL", + "ലെസോതോ ലോതàµà´¤à´¿" + ], + "LTL": [ + "LTL", + "ലിതàµà´µà´¾à´¨à´¿à´¯àµ» ലിറàµà´±à´¾à´¸àµ" + ], + "LTT": [ + "LTT", + "ലിതàµà´µà´¾à´¨à´¿à´¯àµ» തലോനാസàµ" + ], + "LUC": [ + "LUC", + "ലകàµà´¸à´‚ബർഗൠകൺവേർടàµà´Ÿà´¿à´¬à´¿àµ¾ à´«àµà´°à´¾à´™àµà´•àµ" + ], + "LUF": [ + "LUF", + "ലകàµà´¸à´‚ബർഗൠഫàµà´°à´¾à´™àµà´•àµ" + ], + "LUL": [ + "LUL", + "ലകàµà´¸à´‚ബർഗൠഫിനാൻഷàµà´¯àµ½ à´«àµà´°à´¾à´™àµà´•àµ" + ], + "LVL": [ + "LVL", + "ലാറàµà´±àµà´µà´¿à´¯àµ» ലാറàµà´±àµà´¸àµ" + ], + "LVR": [ + "LVR", + "ലാറàµà´±àµà´µà´¿à´¯àµ» റൂബിൾ" + ], + "LYD": [ + "LYD", + "ലിബിയൻ ദിനാർ" + ], + "MAD": [ + "MAD", + "മൊറോകàµà´•ൻ ദിർഹം" + ], + "MAF": [ + "MAF", + "മൊറോകàµà´•ൻ à´«àµà´°à´¾à´™àµà´•àµ" + ], + "MDL": [ + "MDL", + "മൊൾഡോവൻ ലിയàµ" + ], + "MGA": [ + "MGA", + "മഡഗാസി à´à´°à´¿à´¯à´±à´¿" + ], + "MGF": [ + "MGF", + "മഡഗാസàµà´•ർ à´«àµà´°à´¾à´™àµà´•àµ" + ], + "MKD": [ + "MKD", + "മാസിഡോണിയൻ ദിനാർ" + ], + "MLF": [ + "MLF", + "മാലി à´«àµà´°à´¾à´™àµà´•àµ" + ], + "MMK": [ + "MMK", + "à´®àµà´¯à´¾àµ»à´®à´¾àµ¼ à´•àµà´¯à´¾à´Ÿàµ" + ], + "MNT": [ + "MNT", + "മംഗോളിയൻ à´¤àµà´—àµà´°à´¿à´•àµ" + ], + "MOP": [ + "MOP", + "മകാനീസൠപതാകàµà´•" + ], + "MRO": [ + "MRO", + "മൗറിറàµà´±àµ‡à´¨à´¿à´¯àµ» ഔഗിയ" + ], + "MTL": [ + "MTL", + "മൽതàµà´¤àµ€à´¸àµ ലിറ" + ], + "MTP": [ + "MTP", + "മൽതàµà´¤àµ€à´¸àµ പൌണàµà´Ÿàµ" + ], + "MUR": [ + "MUR", + "മൗറീഷàµà´¯àµ» à´±àµà´ªàµà´ªàµ€" + ], + "MVR": [ + "MVR", + "മാൽദീവിയൻ à´±àµà´«à´¿à´¯" + ], + "MWK": [ + "MWK", + "മലാവിയൻ à´•àµà´µà´šàµà´šà´¾" + ], + "MXN": [ + "MX$", + "മെകàµà´¸à´¿à´•àµà´•ൻ പെസോ" + ], + "MXP": [ + "MXP", + "മെകàµà´¸à´¿à´•àµà´•ൻ സിൽവർ പെയàµà´¸àµ‹ (1861–1992)" + ], + "MXV": [ + "MXV", + "മെകàµà´¸à´¿à´•àµà´•ൻ യൂണിഡാഡൠഡി ഇൻവെർഷൻ (UDI)" + ], + "MYR": [ + "MYR", + "മലേഷàµà´¯àµ» റിംഗിറàµà´±àµ" + ], + "MZE": [ + "MZE", + "മൊസാനàµà´ªà´¿à´•àµà´•ൠഎസàµà´•àµà´¯àµà´¡àµ‹" + ], + "MZM": [ + "MZM", + "ഓൾഡൠമൊസാനàµà´ªà´¿à´•àµà´•ൠമെറàµà´±à´¿à´•àµà´•ൽ" + ], + "MZN": [ + "MZN", + "മൊസാംബികàµà´•ൻ മെറàµà´±à´¿à´•àµà´•ൽ" + ], + "NAD": [ + "NAD", + "നമീബിയൻ ഡോളർ" + ], + "NGN": [ + "NGN", + "നൈജീരിയൻ നൈറ" + ], + "NIC": [ + "NIC", + "നികരാഗàµà´µàµ» കൊർഡോബ" + ], + "NIO": [ + "NIO", + "നികàµà´•രാഗàµà´µàµ» കോർഡോബ" + ], + "NLG": [ + "NLG", + "നെതർലൻഡàµà´¸àµ ഗിൽഡർ" + ], + "NOK": [ + "NOK", + "നോർവീജിയൻ à´•àµà´°àµ‹à´£àµ†" + ], + "NPR": [ + "NPR", + "നേപàµà´ªà´¾à´³àµ€à´¸àµ à´±àµà´ªàµà´ªàµ€" + ], + "NZD": [ + "NZ$", + "à´¨àµà´¯àµ‚സിലാനàµà´±àµ ഡോളർ" + ], + "OMR": [ + "OMR", + "ഒമാനി റിയാൽ" + ], + "PAB": [ + "PAB", + "പനാമനിയൻ ബാൽബോവ" + ], + "PEI": [ + "PEI", + "പെറൂവിയൻ ഇൻറി" + ], + "PEN": [ + "PEN", + "പെറàµà´µà´¿à´¯àµ» à´¨àµà´¯àµ‚വോ സോൾ" + ], + "PES": [ + "PES", + "പെറൂവിയൻ സോൾ" + ], + "PGK": [ + "PGK", + "പാപàµà´ªàµà´µ à´¨àµà´¯àµ‚ ഗിനിയൻ à´•à´¿à´¨" + ], + "PHP": [ + "PHP", + "ഫിലിപàµà´ªàµ€à´¨à´¿ പെസോ" + ], + "PKR": [ + "PKR", + "പാകàµà´•à´¿à´¸àµà´¥à´¾à´¨à´¿ à´±àµà´ªàµà´ªàµ€" + ], + "PLN": [ + "PLN", + "പോളിഷൠസàµà´²àµ‹à´Ÿàµà´Ÿà´¿" + ], + "PLZ": [ + "PLZ", + "പോളിഷൠസàµà´²àµ‹à´Ÿàµà´Ÿà´¿ (1950–1995)" + ], + "PTE": [ + "PTE", + "പോർചàµà´šàµà´—ീസൠഎസàµà´•àµà´¯àµà´¡àµ‹" + ], + "PYG": [ + "PYG", + "പരാഗàµà´µàµ‡à´¯àµ» à´—àµà´µà´°à´¨àµ€" + ], + "QAR": [ + "QAR", + "à´–à´¤àµà´¤àµ¼ റിയാൽ" + ], + "RHD": [ + "RHD", + "റൊഡേഷàµà´¯àµ» ഡോളർ" + ], + "ROL": [ + "ROL", + "à´ªàµà´°à´¾à´šàµ€à´¨ റൊമേനിയൻ ലിയàµ" + ], + "RON": [ + "RON", + "റൊമാനിയൻ ലെയàµ" + ], + "RSD": [ + "RSD", + "സെർബിയൻ ദിനാർ" + ], + "RUB": [ + "RUB", + "റഷàµà´¯àµ» റൂബിൾ" + ], + "RUR": [ + "RUR", + "റഷàµà´¯àµ» റൂബിൾ (1991–1998)" + ], + "RWF": [ + "RWF", + "à´±àµà´µà´¾à´£àµà´Ÿàµ» à´«àµà´°à´¾à´™àµà´•àµ" + ], + "SAR": [ + "SAR", + "സൗദി റിയാൽ" + ], + "SBD": [ + "SBD", + "സോളമൻ à´¦àµà´µàµ€à´ªàµà´•à´³àµà´Ÿàµ† ഡോളർ" + ], + "SCR": [ + "SCR", + "സീഷെലോയിസൠറàµà´ªàµà´ªàµ€" + ], + "SDD": [ + "SDD", + "à´ªàµà´°à´¾à´šàµ€à´¨ à´¸àµà´¡à´¾à´¨àµ€à´¸àµ ദിനാർ" + ], + "SDG": [ + "SDG", + "à´¸àµà´¡à´¾à´¨àµ€à´¸àµ പൗണàµà´Ÿàµ" + ], + "SDP": [ + "SDP", + "à´ªàµà´°à´¾à´šàµ€à´¨ à´¸àµà´¡à´¾à´¨àµ€à´¸àµ പൌണàµà´Ÿàµ" + ], + "SEK": [ + "SEK", + "à´¸àµà´µàµ€à´¡à´¿à´·àµ à´•àµà´°àµ‹à´£" + ], + "SGD": [ + "SGD", + "സിംഗപàµà´ªàµ‚ർ ഡോളർ" + ], + "SHP": [ + "SHP", + "സെനàµà´±àµ ഹെലീന പൗണàµà´Ÿàµ" + ], + "SIT": [ + "SIT", + "à´¸àµà´²àµŠà´µàµ‡à´¨à´¿à´¯ à´±àµà´±àµ‹à´³àµ¼" + ], + "SKK": [ + "SKK", + "à´¸àµà´²àµ‹à´µà´¾à´•ൠകൊരൂന" + ], + "SLL": [ + "SLL", + "സിയെറ ലിയോണിയൻ ലിയോൺ" + ], + "SOS": [ + "SOS", + "സോമാലി à´·à´¿à´²àµà´²à´¿à´‚à´—àµ" + ], + "SRD": [ + "SRD", + "à´¸àµà´°à´¿à´¨àµ†à´¯à´¿à´®à´¿à´¸àµ ഡോളർ" + ], + "SRG": [ + "SRG", + "സൂരിനാം ഗിൽഡർ" + ], + "SSP": [ + "SSP", + "ദകàµà´·à´¿à´£ à´¸àµà´¡à´¾à´¨àµ€à´¸àµ പൗണàµà´Ÿàµ" + ], + "STD": [ + "STD", + "സാവോ ടോമി ആൻഡൠപàµà´°à´¿àµ»à´¸à´¿à´ªàµ† ഡോബàµà´°" + ], + "SUR": [ + "SUR", + "സോവിയറàµà´±àµ റൂബിൾ" + ], + "SVC": [ + "SVC", + "എൽ സാൽവഡോർ കോളൻ" + ], + "SYP": [ + "SYP", + "സിറിയൻ പൗണàµà´Ÿàµ" + ], + "SZL": [ + "SZL", + "à´¸àµà´µà´¾à´¸à´¿ ലിലാംഗനി" + ], + "THB": [ + "฿", + "തായൠബടàµà´Ÿàµ" + ], + "TJR": [ + "TJR", + "താജികàµà´•à´¿à´¸àµà´¥à´¾àµ» റൂബിൾ" + ], + "TJS": [ + "TJS", + "താജികàµà´•à´¿à´¸àµà´¥à´¾à´¨à´¿ സോംനി" + ], + "TMM": [ + "TMM", + "à´¤àµàµ¼à´•àµà´®àµ†à´¨à´¿à´¸àµà´¥à´¾àµ» മനതàµ" + ], + "TMT": [ + "TMT", + "à´¤àµàµ¼à´•àµà´•àµâ€Œà´®àµ†à´¨à´¿à´¸àµà´¥à´¾à´¨à´¿ മനതàµ" + ], + "TND": [ + "TND", + "à´Ÿàµà´£àµ€à´·àµà´¯àµ» ദിനാർ" + ], + "TOP": [ + "TOP", + "ടോംഗൻ പാംഗ" + ], + "TPE": [ + "TPE", + "തിമോർ à´Žà´¸àµà´•àµà´¯àµ‚ഡോ" + ], + "TRL": [ + "TRL", + "à´ªàµà´°à´¾à´šàµ€à´¨ à´¤àµàµ¼à´•àµà´•ിഷൠലിറ" + ], + "TRY": [ + "TRY", + "ടർകàµà´•ിഷൠലിറ" + ], + "TTD": [ + "TTD", + "à´Ÿàµà´°à´¿à´¨à´¿à´¡à´¾à´¡àµ à´…à´¨àµà´±àµ à´Ÿàµà´¬à´¾à´—ോ ഡോളർ" + ], + "TWD": [ + "NT$", + "à´¨àµà´¯àµ‚ തായàµâ€Œà´µà´¾àµ» ഡോളർ" + ], + "TZS": [ + "TZS", + "ടാൻസാനിയൻ à´·à´¿à´²àµà´²à´¿à´‚à´—àµ" + ], + "UAH": [ + "UAH", + "ഉകàµà´°àµ‡à´¨à´¿à´¯àµ» à´¹àµà´°à´¿à´µàµâ€Œà´¨à´¿à´¯" + ], + "UAK": [ + "UAK", + "à´¯àµà´•àµà´°àµ‡à´¨à´¿à´¯àµ» കാർബോവാനെസàµ" + ], + "UGS": [ + "UGS", + "ഉഗാണàµà´Ÿàµ» à´·à´¿à´²àµà´²à´¿à´‚ഗൠ(1966–1987)" + ], + "UGX": [ + "UGX", + "ഉഗാണàµà´Ÿàµ» à´·à´¿à´²àµà´²à´¿à´‚à´—àµ" + ], + "USD": [ + "$", + "à´¯àµ.à´Žà´¸àµ. ഡോളർ" + ], + "USN": [ + "USN", + "à´¯àµà´Žà´¸àµ ഡോളർ (à´…à´Ÿàµà´¤àµà´¤ ദിവസം)" + ], + "USS": [ + "USS", + "à´¯àµà´Žà´¸àµ ഡോളർ (അതേ ദിവസം)" + ], + "UYI": [ + "UYI", + "ഉറàµà´—àµà´µàµ‡ പെയàµà´¸àµ‹ എൻ യൂണിഡാഡàµà´¸àµ" + ], + "UYP": [ + "UYP", + "ഉറàµà´—àµà´µàµ‡ പെയàµà´¸àµ‹ (1975–1993)" + ], + "UYU": [ + "UYU", + "ഉറàµà´—àµà´µàµ‡à´¯àµ» പെസോ" + ], + "UZS": [ + "UZS", + "ഉസàµâ€Œà´¬àµ†à´•àµà´•à´¿à´¸àµà´¥à´¾à´¨à´¿ സോം" + ], + "VEB": [ + "VEB", + "വെനസàµà´µàµ‡à´²àµ» ബോലിവർ (1871–2008)" + ], + "VEF": [ + "VEF", + "വെനിസàµà´µàµ‡à´²àµ» ബൊളീവർ" + ], + "VND": [ + "â‚«", + "വിയറàµà´±àµà´¨à´¾à´®àµ€à´¸àµ ഡോങàµ" + ], + "VUV": [ + "VUV", + "വനàµà´µà´¾à´¤àµ വാതàµ" + ], + "WST": [ + "WST", + "സമോവൻ താല" + ], + "XAF": [ + "FCFA", + "മദàµà´§àµà´¯ ആഫàµà´°à´¿à´•àµà´•ൻ [CFA] à´«àµà´°à´¾à´™àµà´•àµ" + ], + "XCD": [ + "EC$", + "à´•à´¿à´´à´•àµà´•ൻ കരീബിയൻ ഡോളർ" + ], + "XEU": [ + "XEU", + "യൂറോപàµà´¯àµ» നാണയ യൂണിറàµà´±àµ" + ], + "XFO": [ + "XFO", + "à´«àµà´°àµ†à´žàµà´šàµ ഗോൾഡൠഫàµà´°à´¾à´™àµà´•àµ" + ], + "XFU": [ + "XFU", + "à´«àµà´°àµ†à´žàµà´šàµ UIC-à´«àµà´°à´¾à´™àµà´•àµ" + ], + "XOF": [ + "CFA", + "പശàµà´šà´¿à´® ആഫàµà´°à´¿à´•àµà´•ൻ [CFA] à´«àµà´°à´¾à´™àµà´•àµ" + ], + "XPF": [ + "CFPF", + "CFP à´«àµà´°à´¾à´™àµà´•àµ" + ], + "XRE": [ + "XRE", + "RINET à´«à´£àµà´Ÿàµà´¸àµ" + ], + "YDD": [ + "YDD", + "യമനി ദിനാർ" + ], + "YER": [ + "YER", + "യെമനി റിയാൽ" + ], + "YUD": [ + "YUD", + "യൂഗോസàµà´²àµ‡à´µà´¿à´¯àµ» ഹാർഡൠദിനാർ" + ], + "YUM": [ + "YUM", + "യൂഗോസàµà´²àµ‡à´µà´¿à´¯àµ» നോവി ദിനാർ" + ], + "YUN": [ + "YUN", + "യൂഗോസàµà´²àµ‡à´µà´¿à´¯àµ» കൺവേർടàµà´Ÿà´¿à´¬à´¿àµ¾ ദിനാർ" + ], + "ZAL": [ + "ZAL", + "ദകàµà´·à´¿à´£à´¾à´«àµà´°à´¿à´•àµà´•ൻ റാൻഡൠ(ഫിനാൻഷàµà´¯àµ½)" + ], + "ZAR": [ + "ZAR", + "ദകàµà´·à´¿à´£à´¾à´«àµà´°à´¿à´•àµà´•ൻ റാൻഡàµ" + ], + "ZMK": [ + "ZMK", + "സാംബിയൻ à´•àµà´µà´¾à´š (1968–2012)" + ], + "ZMW": [ + "ZMW", + "സാംബിയൻ à´•àµà´µà´¾à´šàµà´š" + ], + "ZRN": [ + "ZRN", + "സൈറിയൻ à´¨àµà´¯àµ‚ സൈർ" + ], + "ZRZ": [ + "ZRZ", + "സൈറിയൻ സൈർ" + ], + "ZWD": [ + "ZWD", + "സിംബാബàµâ€Œà´µàµ† ഡോളർ" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mn.json new file mode 100644 index 0000000000000000000000000000000000000000..7276cfe7a16d097d6fea3b270acfe514103e9830 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mn.json @@ -0,0 +1,637 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "арабын нÑгдÑÑн Ñмиратын дирхам" + ], + "AFN": [ + "AFN", + "афганиÑтан афгани" + ], + "ALL": [ + "ALL", + "албанийн лек" + ], + "AMD": [ + "AMD", + "арменийн драм" + ], + "ANG": [ + "ANG", + "нидерландын Ð°Ð½Ñ‚Ð¸Ð»Ð»ÑŠÑ Ð³ÑƒÐ»Ð´ÐµÑ€" + ], + "AOA": [ + "AOA", + "ангол кванза" + ], + "ARS": [ + "ARS", + "аргентин пеÑо" + ], + "AUD": [ + "A$", + "авÑтрали доллар" + ], + "AWG": [ + "AWG", + "арубын флорин" + ], + "AZN": [ + "AZN", + "азербайжаны манат" + ], + "BAM": [ + "BAM", + "боÑни-герцеговин хөрвөгч марк" + ], + "BBD": [ + "BBD", + "Ð±Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€" + ], + "BDT": [ + "BDT", + "бангладеш така" + ], + "BGN": [ + "BGN", + "болгарын лев" + ], + "BHD": [ + "BHD", + "бахрейн динар" + ], + "BIF": [ + "BIF", + "бурунд франк" + ], + "BMD": [ + "BMD", + "бермуд доллар" + ], + "BND": [ + "BND", + "бруней доллар" + ], + "BOB": [ + "BOB", + "боливи боливиано" + ], + "BRL": [ + "R$", + "бразилийн рил" + ], + "BSD": [ + "BSD", + "багам доллар" + ], + "BTN": [ + "BTN", + "бутаны нгултрум" + ], + "BWP": [ + "BWP", + "ботÑвани пула" + ], + "BYN": [ + "BYN", + "беларуÑÑŒ рубль" + ], + "BYR": [ + "BYR", + "беларуÑÑŒ рубль (2000–2016)" + ], + "BZD": [ + "BZD", + "белиз доллар" + ], + "CAD": [ + "CA$", + "канад доллар" + ], + "CDF": [ + "CDF", + "конго франк" + ], + "CHF": [ + "CHF", + "швейцарь франк" + ], + "CLP": [ + "CLP", + "чилийн пеÑо" + ], + "CNY": [ + "CNÂ¥", + "Ñ…Ñтад юань" + ], + "COP": [ + "COP", + "колумбын пеÑо" + ], + "CRC": [ + "CRC", + "коÑта рикагийн колон" + ], + "CUC": [ + "CUC", + "кубын хөрвөгч пеÑо" + ], + "CUP": [ + "CUP", + "кубын пеÑо" + ], + "CVE": [ + "CVE", + "кабо-верде ÑÑкудо" + ], + "CZK": [ + "CZK", + "чехийн коруна" + ], + "DJF": [ + "DJF", + "жибоути франк" + ], + "DKK": [ + "DKK", + "данийн крон" + ], + "DOP": [ + "DOP", + "доминиканы пеÑо" + ], + "DZD": [ + "DZD", + "алжир доллар" + ], + "EGP": [ + "EGP", + "египет паунд" + ], + "ERN": [ + "ERN", + "Ñритрей накфа" + ], + "ETB": [ + "ETB", + "Ñтиоп бирр" + ], + "EUR": [ + "€", + "евро" + ], + "FJD": [ + "FJD", + "фижи доллар" + ], + "FKP": [ + "FKP", + "фолклÑнд арлын паунд" + ], + "GBP": [ + "£", + "британийн фунт" + ], + "GEL": [ + "GEL", + "гүржийн лари" + ], + "GHS": [ + "GHS", + "гана Ñеди" + ], + "GIP": [ + "GIP", + "гибралтар паунд" + ], + "GMD": [ + "GMD", + "гамби далаÑи" + ], + "GNF": [ + "GNF", + "гвиней франк" + ], + "GTQ": [ + "GTQ", + "гватемалын кецал" + ], + "GYD": [ + "GYD", + "гайана доллар" + ], + "HKD": [ + "HK$", + "хонгконг доллар" + ], + "HNL": [ + "HNL", + "гондураÑын лемпира" + ], + "HRK": [ + "HRK", + "хорватын куна" + ], + "HTG": [ + "HTG", + "гаитийн гоурд" + ], + "HUF": [ + "HUF", + "унгарын форинт" + ], + "IDR": [ + "IDR", + "индонези рупи" + ], + "ILS": [ + "₪", + "израилийн ÑˆÐ¸Ð½Ñ ÑˆÐµÐºÐµÐ»" + ], + "INR": [ + "₹", + "ÑнÑтхÑг рупи" + ], + "IQD": [ + "IQD", + "ирак динар" + ], + "IRR": [ + "IRR", + "иран риал" + ], + "ISK": [ + "ISK", + "иÑландын крон" + ], + "JMD": [ + "JMD", + "Ñмайк доллар" + ], + "JOD": [ + "JOD", + "йордан динар" + ], + "JPY": [ + "JPÂ¥", + "Ñпон иен" + ], + "KES": [ + "KES", + "кени шиллинг" + ], + "KGS": [ + "KGS", + "кыргыз Ñом" + ], + "KHR": [ + "KHR", + "камбож риел" + ], + "KMF": [ + "KMF", + "комор франк" + ], + "KPW": [ + "KPW", + "хойд ÑÐ¾Ð»Ð¾Ð½Ð³Ð¾Ñ Ð²Ð¾Ð½" + ], + "KRW": [ + "â‚©", + "өмнөд ÑÐ¾Ð»Ð¾Ð½Ð³Ð¾Ñ Ð²Ð¾Ð½" + ], + "KWD": [ + "KWD", + "кувейт динар" + ], + "KYD": [ + "KYD", + "кайман арлын доллар" + ], + "KZT": [ + "KZT", + "казахын Ñ‚ÑнгÑ" + ], + "LAK": [ + "LAK", + "лаоÑын кип" + ], + "LBP": [ + "LBP", + "ливан паунд" + ], + "LKR": [ + "LKR", + "шри-ланк рупи" + ], + "LRD": [ + "LRD", + "либери доллар" + ], + "LTL": [ + "LTL", + "литвийн литаÑ" + ], + "LVL": [ + "LVL", + "латвийн лац" + ], + "LYD": [ + "LYD", + "ливи доллар" + ], + "MAD": [ + "MAD", + "мароккогийн дирхам" + ], + "MDL": [ + "MDL", + "молдавын леу" + ], + "MGA": [ + "MGA", + "малайн ариари" + ], + "MKD": [ + "MKD", + "македони динар" + ], + "MMK": [ + "MMK", + "мьÑнмарын киат" + ], + "MNT": [ + "â‚®", + "төгрөг" + ], + "MOP": [ + "MOP", + "макаогийн патака" + ], + "MRO": [ + "MRO", + "мавритан угиÑ" + ], + "MUR": [ + "MUR", + "мавритын рупи" + ], + "MVR": [ + "MVR", + "мальдив руфиÑ" + ], + "MWK": [ + "MWK", + "малави квача" + ], + "MXN": [ + "MX$", + "мекÑикийн пеÑо" + ], + "MYR": [ + "MYR", + "малайзын рингит" + ], + "MZN": [ + "MZN", + "мозамбик метикал" + ], + "NAD": [ + "NAD", + "намиби доллар" + ], + "NGN": [ + "NGN", + "нигери найра" + ], + "NIO": [ + "NIO", + "никарагуагийн кордоба" + ], + "NOK": [ + "NOK", + "норвегийн крон" + ], + "NPR": [ + "NPR", + "балба рупи" + ], + "NZD": [ + "NZ$", + "ÑˆÐ¸Ð½Ñ Ð·ÐµÐ»Ð°Ð½Ð´ доллар" + ], + "OMR": [ + "OMR", + "омани риал" + ], + "PAB": [ + "PAB", + "панамын бальбоа" + ], + "PEN": [ + "PEN", + "перугийн невоÑоль" + ], + "PGK": [ + "PGK", + "папуа-ÑˆÐ¸Ð½Ñ Ð³Ð²Ð¸Ð½ÐµÐ¹Ð½ кина" + ], + "PHP": [ + "PHP", + "филиппин пеÑо" + ], + "PKR": [ + "PKR", + "пакиÑтан рупи" + ], + "PLN": [ + "PLN", + "польшийн злот" + ], + "PYG": [ + "PYG", + "парагвайн гуарани" + ], + "QAR": [ + "QAR", + "катар риал" + ], + "RON": [ + "RON", + "румыны леу" + ], + "RSD": [ + "RSD", + "Ñерб динар" + ], + "RUB": [ + "RUB", + "Ð¾Ñ€Ð¾Ñ Ñ€ÑƒÐ±Ð»ÑŒ" + ], + "RWF": [ + "RWF", + "руанд франк" + ], + "SAR": [ + "SAR", + "Ñауди риал" + ], + "SBD": [ + "SBD", + "Ñоломон арлын доллар" + ], + "SCR": [ + "SCR", + "Ñейшел рупи" + ], + "SDG": [ + "SDG", + "Ñудан паунд" + ], + "SEK": [ + "SEK", + "шведийн крон" + ], + "SGD": [ + "SGD", + "Ñингапур доллар" + ], + "SHP": [ + "SHP", + "Ñент хелена фунт" + ], + "SLL": [ + "SLL", + "Ñьерра леоны леон" + ], + "SOS": [ + "SOS", + "Ñомали шиллинг" + ], + "SRD": [ + "SRD", + "Ñуринам доллар" + ], + "SSP": [ + "SSP", + "өмнөд Ñудан паунд" + ], + "STD": [ + "STD", + "Ñан-томе ба принÑипи добра" + ], + "SYP": [ + "SYP", + "Ñири паунд" + ], + "SZL": [ + "SZL", + "Ñвазиланд лилангени" + ], + "THB": [ + "฿", + "тайландын бат" + ], + "TJS": [ + "TJS", + "тажикийн Ñомон" + ], + "TMT": [ + "TMT", + "туркмен манат" + ], + "TND": [ + "TND", + "Ñ‚ÑƒÐ½Ð¸Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€" + ], + "TOP": [ + "TOP", + "тонгагийн панга" + ], + "TRY": [ + "TRY", + "туркийн лира" + ], + "TTD": [ + "TTD", + "тринидад ба тобаго доллар" + ], + "TWD": [ + "NT$", + "ÑˆÐ¸Ð½Ñ Ñ‚Ð°Ð¹Ð²Ð°Ð½ÑŒ доллар" + ], + "TZS": [ + "TZS", + "танзани шиллинг" + ], + "UAH": [ + "UAH", + "украины гривнÑ" + ], + "UGX": [ + "UGX", + "уганд шиллинг" + ], + "USD": [ + "$", + "америк доллар" + ], + "UYU": [ + "UYU", + "уругвайн пеÑо" + ], + "UZS": [ + "UZS", + "узбекийн Ñом" + ], + "VEF": [ + "VEF", + "венеÑуÑлийн боливар" + ], + "VND": [ + "â‚«", + "вьетнамын донг" + ], + "VUV": [ + "VUV", + "вануатугийн вату" + ], + "WST": [ + "WST", + "Ñамоагийн тала" + ], + "XAF": [ + "FCFA", + "төв африкийн франк" + ], + "XCD": [ + "EC$", + "зүүн карибийн доллар" + ], + "XOF": [ + "CFA", + "баруун африкийн франк" + ], + "XPF": [ + "CFPF", + "францын колоний франк" + ], + "YER": [ + "YER", + "йемен риал" + ], + "ZAR": [ + "ZAR", + "өмнөд африкийн ранд" + ], + "ZMK": [ + "ZMK", + "Замби квача (1968–2012)" + ], + "ZMW": [ + "ZMW", + "замби квача" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mo.json new file mode 100644 index 0000000000000000000000000000000000000000..115ae26c95496233f9c25aac318b5cba123eac83 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mo.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "MDL": [ + "L", + "leu moldovenesc" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mr.json new file mode 100644 index 0000000000000000000000000000000000000000..3508c60cd667e4a2bef5d6ada1264e078518c3d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mr.json @@ -0,0 +1,641 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "संयà¥à¤•à¥à¤¤ अरब अमीरात दिरहॅम" + ], + "AFN": [ + "AFN", + "अफगाण अफगाणी" + ], + "ALL": [ + "ALL", + "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¨ लेक" + ], + "AMD": [ + "AMD", + "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¨ दà¥à¤°à¥…म" + ], + "ANG": [ + "ANG", + "नेदरलà¤à¤¡à¤šà¤¾ अà¤à¤Ÿà¤¿à¤²à¥€à¤¨ गिलà¥à¤¡à¤°" + ], + "AOA": [ + "AOA", + "अà¤à¤—ोलन कà¥à¤µà¥…नà¥à¤à¤¾" + ], + "ARS": [ + "ARS", + "अरà¥à¤œà¥‡à¤‚टाइन पेसो" + ], + "AUD": [ + "A$", + "ऑसà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¨ डॉलर" + ], + "AWG": [ + "AWG", + "अरà¥à¤¬à¤¾ फà¥à¤²à¥‹à¤°à¤¿à¤¨" + ], + "AZN": [ + "AZN", + "अà¤à¤°à¤¬à¥ˆà¤à¤¾à¤¨à¥€ मानाट" + ], + "BAM": [ + "BAM", + "बोसà¥à¤¨à¤¿à¤¯à¤¾-हरà¥à¤œà¥‡à¤—ोविना विनिमय मारà¥à¤•" + ], + "BBD": [ + "BBD", + "बारà¥à¤¬à¤¾à¤¡à¤¿à¤¯à¤¨ डॉलर" + ], + "BDT": [ + "BDT", + "बांगलादेशी टका" + ], + "BGN": [ + "BGN", + "बलà¥à¤—ेरियन लेव" + ], + "BHD": [ + "BHD", + "बाहरिनी दिनार" + ], + "BIF": [ + "BIF", + "बà¥à¤°à¥à¤‚डियन फà¥à¤°à¤à¤•" + ], + "BMD": [ + "BMD", + "बरà¥à¤®à¥à¤¡à¤¾ डॉलर" + ], + "BND": [ + "BND", + "बà¥à¤°à¥à¤¨à¥‡à¤ˆ डॉलर" + ], + "BOB": [ + "BOB", + "बोलिवà¥à¤¹à¤¿à¤¯à¤¨ बोलिवà¥à¤¹à¤¿à¤¯à¤¾à¤¨à¥‹" + ], + "BRL": [ + "R$", + "बà¥à¤°à¤¾à¤à¤¿à¤²à¤¿à¤¯à¤¨ रियाल" + ], + "BSD": [ + "BSD", + "बहामी डॉलर" + ], + "BTN": [ + "BTN", + "भूतानी à¤à¤‚गलà¥à¤Ÿà¥à¤°à¤®" + ], + "BWP": [ + "BWP", + "बोटà¥à¤¸à¤µà¤¾à¤¨à¤¨ पà¥à¤²à¤¾" + ], + "BYN": [ + "BYN", + "बेलारà¥à¤¶à¤¿à¤¯à¤¨ रà¥à¤¬à¤²" + ], + "BYR": [ + "BYR", + "बेलारà¥à¤¶à¤¿à¤¯à¤¨ रà¥à¤¬à¤² (2000–2016)" + ], + "BZD": [ + "BZD", + "बेलीठडॉलर" + ], + "CAD": [ + "CA$", + "कॅनडियन डॉलर" + ], + "CDF": [ + "CDF", + "काà¤à¤—ोलीज फà¥à¤°à¤à¤•" + ], + "CHF": [ + "CHF", + "सà¥à¤µà¤¿à¤¸ फà¥à¤°à¤à¤•" + ], + "CLP": [ + "CLP", + "चिली पेसो" + ], + "CNY": [ + "CNÂ¥", + "चीनी यà¥à¤†à¤¨" + ], + "COP": [ + "COP", + "कोलंबियन पेसो" + ], + "CRC": [ + "CRC", + "कोसà¥à¤Ÿà¤¾ रिका कोलोन" + ], + "CUC": [ + "CUC", + "कà¥à¤¯à¥‚बन विनिमय पेसो" + ], + "CUP": [ + "CUP", + "कà¥à¤¯à¥‚बन पेसो" + ], + "CVE": [ + "CVE", + "केप वà¥à¤¹à¤°à¥à¤¡à¥‡à¤¯à¤¨ à¤à¤¸à¥à¤•à¥à¤¡à¥‹" + ], + "CZK": [ + "CZK", + "à¤à¥‡à¤• पà¥à¤°à¤œà¤¾à¤¸à¤¤à¥à¤¤à¤¾à¤• कोरà¥à¤¨à¤¾" + ], + "DJF": [ + "DJF", + "जिबौटियन फà¥à¤°à¤à¤•" + ], + "DKK": [ + "DKK", + "डॅनिश कà¥à¤°à¥‹à¤¨" + ], + "DOP": [ + "DOP", + "डोमिनिकन पेसो" + ], + "DZD": [ + "DZD", + "अलà¥à¤œà¥‡à¤°à¤¿à¤¯à¤¨ दिनार" + ], + "EGP": [ + "EGP", + "इजिपà¥à¤¶à¤¿à¤¯à¤¨ पाउंड" + ], + "ERN": [ + "ERN", + "इरिटà¥à¤°à¤¿à¤¯à¤¨ नाकà¥à¤«à¤¾" + ], + "ETB": [ + "ETB", + "इथिओपियन बिर" + ], + "EUR": [ + "€", + "यà¥à¤°à¥‹" + ], + "FJD": [ + "FJD", + "फिजियन डॉलर" + ], + "FKP": [ + "FKP", + "फॉकलंड आयलंड पाउंड" + ], + "GBP": [ + "£", + "बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ पाऊंड" + ], + "GEL": [ + "GEL", + "जॉरà¥à¤œà¤¿à¤¯à¤¨ लारी" + ], + "GHS": [ + "GHS", + "घानीयन सेडी" + ], + "GIP": [ + "GIP", + "जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤° पाउंड" + ], + "GMD": [ + "GMD", + "गामà¥à¤¬à¤¿à¤¯à¤¨ डालासी" + ], + "GNF": [ + "GNF", + "गिनी फà¥à¤°à¤à¤•" + ], + "GTQ": [ + "GTQ", + "गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾à¤šà¥‡ कà¥à¤µà¥‡à¤¤à¥à¤à¤¾à¤²" + ], + "GYD": [ + "GYD", + "गयाना डॉलर" + ], + "HKD": [ + "HK$", + "हाà¤à¤—काà¤à¤— डॉलर" + ], + "HNL": [ + "HNL", + "होनà¥à¤¡à¥à¤°à¤¨ लेंपिरा" + ], + "HRK": [ + "HRK", + "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¨ कूना" + ], + "HTG": [ + "HTG", + "हैती गोअरà¥à¤¡" + ], + "HUF": [ + "HUF", + "हंगेरियन फॉरिनà¥à¤Ÿ" + ], + "IDR": [ + "IDR", + "इंडोनेशियन रà¥à¤ªà¤¿à¤¯à¤¾" + ], + "ILS": [ + "₪", + "ईसà¥à¤¤à¥à¤°à¤¾à¤¯à¤²à¥€ नà¥à¤¯à¥‚ शेकेल" + ], + "INR": [ + "₹", + "भारतीय रà¥à¤ªà¤¯à¤¾" + ], + "IQD": [ + "IQD", + "इराकी दिनार" + ], + "IRR": [ + "IRR", + "इराणी रियाल" + ], + "ISK": [ + "ISK", + "आइसलà¤à¤¡à¤¿à¤• कà¥à¤°à¥‹à¤¨à¤¾" + ], + "JMD": [ + "JMD", + "जमैकन डॉलर" + ], + "JOD": [ + "JOD", + "जॉरà¥à¤¡à¤¨à¤¿à¤¯à¤¨ दिनार" + ], + "JPY": [ + "JPÂ¥", + "जपानी येन" + ], + "KES": [ + "KES", + "केनियन शिलिंग" + ], + "KGS": [ + "KGS", + "किरगिसà¥à¤¤à¤¾à¤¨à¥€ सॉम" + ], + "KHR": [ + "KHR", + "कंबोडियन रियेल" + ], + "KMF": [ + "KMF", + "कोमोरियन फà¥à¤°à¤à¤•" + ], + "KPW": [ + "KPW", + "उतà¥à¤¤à¤° कोरियन वॉन" + ], + "KRW": [ + "â‚©", + "दकà¥à¤·à¤¿à¤£ कोरियन वॉन" + ], + "KWD": [ + "KWD", + "कà¥à¤µà¥ˆà¤¤à¥€ दिनार" + ], + "KYD": [ + "KYD", + "केमेन आयलॅंड डॉलर" + ], + "KZT": [ + "KZT", + "कà¤à¤¾à¤•िसà¥à¤¤à¤¾à¤¨à¥€ तेंगे" + ], + "LAK": [ + "LAK", + "लाओशियन किप" + ], + "LBP": [ + "LBP", + "लेबनीज पाउंड" + ], + "LKR": [ + "LKR", + "शà¥à¤°à¥€à¤²à¤‚कन रà¥à¤ªà¤¯à¤¾" + ], + "LRD": [ + "LRD", + "लाइबेरियन डॉलर" + ], + "LSL": [ + "LSL", + "लेसोटो लोटी" + ], + "LTL": [ + "LTL", + "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¨ लिटास" + ], + "LVL": [ + "LVL", + "लाटà¥à¤µà¥à¤¹à¤¿à¤¯à¤¨ लाटà¥à¤" + ], + "LYD": [ + "LYD", + "लिबियाचा दिनार" + ], + "MAD": [ + "MAD", + "मोरोकà¥à¤•ो दिरहॅम" + ], + "MDL": [ + "MDL", + "मोलà¥à¤¡à¥‹à¤µà¤¨ लेउ" + ], + "MGA": [ + "MGA", + "मालागासी à¤à¤°à¤¿à¤¯à¤¾à¤°à¥€" + ], + "MKD": [ + "MKD", + "मॅसेडोनियन देनार" + ], + "MMK": [ + "MMK", + "मà¥à¤¯à¤¾à¤¨à¤®à¤¾à¤° कà¥à¤¯à¤¾à¤Ÿ" + ], + "MNT": [ + "MNT", + "मंगोलियन टà¥à¤—à¥à¤°à¤¿à¤•" + ], + "MOP": [ + "MOP", + "मॅकॅनीजॠपटाका" + ], + "MRO": [ + "MRO", + "मॉरिटानियन ओगिया" + ], + "MUR": [ + "MUR", + "मॉरिशियन रà¥à¤ªà¥€" + ], + "MVR": [ + "MVR", + "मालदीवियन रà¥à¤«à¤¿à¤¯à¤¾" + ], + "MWK": [ + "MWK", + "मालावियन कà¥à¤µà¤¾à¤šà¤¾" + ], + "MXN": [ + "MX$", + "मेकà¥à¤¸à¤¿à¤•ो पेसो" + ], + "MYR": [ + "MYR", + "मलेशियन रिंगिट" + ], + "MZN": [ + "MZN", + "मोà¤à¤¾à¤‚बिकन मेटिकल" + ], + "NAD": [ + "NAD", + "नमिबियन डॉलर" + ], + "NGN": [ + "NGN", + "नायजेरियन नायरा" + ], + "NIO": [ + "NIO", + "निकारागà¥à¤µà¥‡à¤šà¤¾ कोरà¥à¤¡à¥‹à¤¬à¤¾" + ], + "NOK": [ + "NOK", + "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¨ कà¥à¤°à¥‹à¤¨" + ], + "NPR": [ + "NPR", + "नेपाळी रà¥à¤ªà¤¯à¤¾" + ], + "NZD": [ + "NZ$", + "नà¥à¤¯à¥‚à¤à¥€à¤²à¤à¤¡ डॉलर" + ], + "OMR": [ + "OMR", + "ओमानी रियाल" + ], + "PAB": [ + "PAB", + "पनामा बालà¥à¤¬à¥‹à¤†" + ], + "PEN": [ + "PEN", + "पेरà¥à¤µà¤¿à¤¯à¤¨ नà¥à¤‡à¤µà¥à¤¹à¥‹ सोल" + ], + "PGK": [ + "PGK", + "पापà¥à¤† नà¥à¤¯à¥‚ गिनीयन किना" + ], + "PHP": [ + "PHP", + "फिलिपिनी पेसो" + ], + "PKR": [ + "PKR", + "पाकिसà¥à¤¤à¤¾à¤¨à¥€ रà¥à¤ªà¤¯à¤¾" + ], + "PLN": [ + "PLN", + "पोलिश à¤à¥à¤²à¥‰à¤Ÿà¥€" + ], + "PYG": [ + "PYG", + "परागà¥à¤µà¥‡ गà¥à¤µà¤¾à¤°à¤¾à¤¨à¥€" + ], + "QAR": [ + "QAR", + "कतारी रियाल" + ], + "RON": [ + "RON", + "रोमानियन लेऊ" + ], + "RSD": [ + "RSD", + "सरà¥à¤¬à¤¿à¤¯à¤¨ दिनार" + ], + "RUB": [ + "RUB", + "रशियन रà¥à¤¬à¤²" + ], + "RWF": [ + "RWF", + "रवांडा फà¥à¤°à¤à¤•" + ], + "SAR": [ + "SAR", + "सौदी रियाल" + ], + "SBD": [ + "SBD", + "सोलोमन आयलà¤à¤¡à¥à¤¸ डॉलर" + ], + "SCR": [ + "SCR", + "सेशेलोईस रà¥à¤ªà¥€" + ], + "SDG": [ + "SDG", + "सà¥à¤¦à¤¾à¤¨à¥€ पाउंड" + ], + "SEK": [ + "SEK", + "सà¥à¤µà¥€à¤¡à¤¿à¤¶ कà¥à¤°à¥‹à¤¨à¤¾" + ], + "SGD": [ + "SGD", + "सिंगापूर डॉलर" + ], + "SHP": [ + "SHP", + "सेंट हेलेना पाउंड" + ], + "SLL": [ + "SLL", + "सिà¤à¤°à¤¾ लिऑनचा लिऑन" + ], + "SOS": [ + "SOS", + "सोमाली शिलिंग" + ], + "SRD": [ + "SRD", + "सà¥à¤°à¤¿à¤¨à¤¾à¤®à¥€ डॉलर" + ], + "SSP": [ + "SSP", + "दकà¥à¤·à¤¿à¤£ सà¥à¤¦à¤¾à¤¨à¥€ पाउंड" + ], + "STD": [ + "STD", + "साओ टोम आणि पà¥à¤°à¤¿à¤¨à¥à¤¸à¤¿à¤ªà¥‡ डोबरा" + ], + "SYP": [ + "SYP", + "सीरियन पाउंड" + ], + "SZL": [ + "SZL", + "सà¥à¤µà¤¾à¤à¥€ लीलांगेनी" + ], + "THB": [ + "฿", + "थाई बाहत" + ], + "TJS": [ + "TJS", + "ताजकीसà¥à¤¤à¤¾à¤¨à¥€ सोमोनी" + ], + "TMT": [ + "TMT", + "तà¥à¤°à¥à¤•मेनिसà¥à¤¤à¤¾à¤¨à¥€ मानाट" + ], + "TND": [ + "TND", + "टà¥à¤¯à¥‚निशियन दिनार" + ], + "TOP": [ + "TOP", + "टोंगन पाआंगा" + ], + "TRY": [ + "TRY", + "तà¥à¤°à¥à¤•ी लिरा" + ], + "TTD": [ + "TTD", + "तà¥à¤°à¤¿à¤¨à¤¿à¤¦à¤¾à¤¦ आणि टोबॅगो डॉलर" + ], + "TWD": [ + "NT$", + "नà¥à¤¯à¥‚ तैवान डॉलर" + ], + "TZS": [ + "TZS", + "टांà¤à¤¾à¤¨à¤¿à¤¯à¤¨ शिलिंग" + ], + "UAH": [ + "UAH", + "यà¥à¤•à¥à¤°à¥‡à¤¨à¤¿à¤¯à¤¨ रिवनिया" + ], + "UGX": [ + "UGX", + "यà¥à¤—ांडा शिलिंग" + ], + "USD": [ + "$", + "यूà¤à¤¸ डॉलर" + ], + "UYU": [ + "UYU", + "उरà¥à¤—à¥à¤µà¥‡à¤šà¤¾ पेसो" + ], + "UZS": [ + "UZS", + "उà¤à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨à¥€ सोम" + ], + "VEF": [ + "VEF", + "वà¥à¤¹à¥‡à¤¨à¥‡à¤à¥à¤à¤²à¤¾ बोलिवà¥à¤¹à¤¾à¤°" + ], + "VND": [ + "â‚«", + "वà¥à¤¹à¤¿à¤à¤¤à¤¨à¤¾à¤®à¥€ डोंग" + ], + "VUV": [ + "VUV", + "वानà¥à¤†à¤¤à¥ वाटà¥" + ], + "WST": [ + "WST", + "सामोअन टाला" + ], + "XAF": [ + "FCFA", + "मधà¥à¤¯ आफà¥à¤°à¤¿à¤•न [CFA] फà¥à¤°à¤à¤•" + ], + "XCD": [ + "EC$", + "पूरà¥à¤µ कॅरीबियन डॉलर" + ], + "XOF": [ + "CFA", + "पशà¥à¤šà¤¿à¤® आफà¥à¤°à¤¿à¤•न [CFA] फà¥à¤°à¤à¤•" + ], + "XPF": [ + "CFPF", + "[CFP] फà¥à¤°à¤à¤•" + ], + "YER": [ + "YER", + "येमेनी रियाल" + ], + "ZAR": [ + "ZAR", + "दकà¥à¤·à¤¿à¤£ आफà¥à¤°à¤¿à¤•ी रà¤à¤¡" + ], + "ZMK": [ + "ZMK", + "à¤à¤¾à¤‚बियन कà¥à¤µà¤¾à¤šà¤¾ (1968–2012)" + ], + "ZMW": [ + "ZMW", + "à¤à¤¾à¤‚बियन कà¥à¤µà¤¾à¤šà¤¾" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ms.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ms.json new file mode 100644 index 0000000000000000000000000000000000000000..9ef5603a4f14e2b8dc4e9b39510c815e18fe7ae0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ms.json @@ -0,0 +1,641 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "Dirham Emiriah Arab Bersatu" + ], + "AFN": [ + "AFN", + "Afghani Afghanistan" + ], + "ALL": [ + "ALL", + "Lek Albania" + ], + "AMD": [ + "AMD", + "Dram Armenia" + ], + "ANG": [ + "ANG", + "Guilder Antillean Netherland" + ], + "AOA": [ + "AOA", + "Kwanza Angola" + ], + "ARS": [ + "ARS", + "Peso Argentina" + ], + "AUD": [ + "A$", + "Dolar Australia" + ], + "AWG": [ + "AWG", + "Florin Aruba" + ], + "AZN": [ + "AZN", + "Manat Azerbaijan" + ], + "BAM": [ + "BAM", + "Mark Boleh Tukar Bosnia-Herzegovina" + ], + "BBD": [ + "BBD", + "Dolar Barbados" + ], + "BDT": [ + "BDT", + "Taka Bangladesh" + ], + "BGN": [ + "BGN", + "Lev Bulgaria" + ], + "BHD": [ + "BHD", + "Dinar Bahrain" + ], + "BIF": [ + "BIF", + "Franc Burundia" + ], + "BMD": [ + "BMD", + "Dolar Bermuda" + ], + "BND": [ + "BND", + "Dolar Brunei" + ], + "BOB": [ + "BOB", + "Boliviano Bolivia" + ], + "BRL": [ + "R$", + "Real Brazil" + ], + "BSD": [ + "BSD", + "Dolar Bahamas" + ], + "BTN": [ + "BTN", + "Ngultrum Bhutan" + ], + "BWP": [ + "BWP", + "Pula Botswana" + ], + "BYN": [ + "BYN", + "Rubel Belarus" + ], + "BYR": [ + "BYR", + "Rubel Belarus (2000–2016)" + ], + "BZD": [ + "BZD", + "Dolar Belize" + ], + "CAD": [ + "CAD", + "Dolar Kanada" + ], + "CDF": [ + "CDF", + "Franc Congo" + ], + "CHF": [ + "CHF", + "Franc Switzerland" + ], + "CLP": [ + "CLP", + "Peso Chile" + ], + "CNY": [ + "CNÂ¥", + "Yuan Cina" + ], + "COP": [ + "COP", + "Peso Colombia" + ], + "CRC": [ + "CRC", + "Colon Costa Rica" + ], + "CUC": [ + "CUC", + "Peso Boleh Tukar Cuba" + ], + "CUP": [ + "CUP", + "Peso Cuba" + ], + "CVE": [ + "CVE", + "Escudo Tanjung Verde" + ], + "CZK": [ + "CZK", + "Koruna Republik Czech" + ], + "DJF": [ + "DJF", + "Franc Djibouti" + ], + "DKK": [ + "DKK", + "Krone Denmark" + ], + "DOP": [ + "DOP", + "Peso Dominican" + ], + "DZD": [ + "DZD", + "Dinar Algeria" + ], + "EGP": [ + "EGP", + "Paun Mesir" + ], + "ERN": [ + "ERN", + "ERN" + ], + "ETB": [ + "ETB", + "Birr Ethiopia" + ], + "EUR": [ + "€", + "Euro" + ], + "FJD": [ + "FJD", + "Dolar Fiji" + ], + "FKP": [ + "FKP", + "Paun Kepulauan Falkland" + ], + "GBP": [ + "£", + "Paun British" + ], + "GEL": [ + "GEL", + "Lari Georgia" + ], + "GHS": [ + "GHS", + "Cedi Ghana" + ], + "GIP": [ + "GIP", + "Paun Gibraltar" + ], + "GMD": [ + "GMD", + "Dalasi Gambia" + ], + "GNF": [ + "GNF", + "Franc Guinea" + ], + "GTQ": [ + "GTQ", + "Quetzal Guatemala" + ], + "GYD": [ + "GYD", + "Dolar Guyana" + ], + "HKD": [ + "HK$", + "Dolar Hong Kong" + ], + "HNL": [ + "HNL", + "Lempira Honduras" + ], + "HRK": [ + "HRK", + "Kuna Croatia" + ], + "HTG": [ + "HTG", + "Gourde Haiti" + ], + "HUF": [ + "HUF", + "Forint Hungary" + ], + "IDR": [ + "IDR", + "Rupiah Indonesia" + ], + "ILS": [ + "₪", + "Sheqel Baru Israel" + ], + "INR": [ + "₹", + "Rupee India" + ], + "IQD": [ + "IQD", + "Dinar Iraq" + ], + "IRR": [ + "IRR", + "Rial Iran" + ], + "ISK": [ + "ISK", + "Krona Iceland" + ], + "JMD": [ + "JMD", + "Dolar Jamaica" + ], + "JOD": [ + "JOD", + "Dinar Jordan" + ], + "JPY": [ + "JPÂ¥", + "Yen Jepun" + ], + "KES": [ + "KES", + "Syiling Kenya" + ], + "KGS": [ + "KGS", + "Som Kyrgystani" + ], + "KHR": [ + "KHR", + "Riel Kemboja" + ], + "KMF": [ + "KMF", + "Franc Comoria" + ], + "KPW": [ + "KPW", + "Won Korea Utara" + ], + "KRW": [ + "â‚©", + "Won Korea Selatan" + ], + "KWD": [ + "KWD", + "Dinar Kuwait" + ], + "KYD": [ + "KYD", + "Dolar Kepulauan Cayman" + ], + "KZT": [ + "KZT", + "Tenge Kazakhstan" + ], + "LAK": [ + "LAK", + "Kip Laos" + ], + "LBP": [ + "LBP", + "Paun Lubnan" + ], + "LKR": [ + "LKR", + "Rupee Sri Lanka" + ], + "LRD": [ + "LRD", + "Dolar Liberia" + ], + "LSL": [ + "LSL", + "Loti Lesotho" + ], + "LTL": [ + "LTL", + "Litas Lithuania" + ], + "LVL": [ + "LVL", + "Lats Latvia" + ], + "LYD": [ + "LYD", + "Dinar Libya" + ], + "MAD": [ + "MAD", + "Dirham Maghribi" + ], + "MDL": [ + "MDL", + "Leu Moldova" + ], + "MGA": [ + "MGA", + "Ariary Malagasy" + ], + "MKD": [ + "MKD", + "Denar Macedonia" + ], + "MMK": [ + "MMK", + "Kyat Myanma" + ], + "MNT": [ + "MNT", + "Tugrik Mongolia" + ], + "MOP": [ + "MOP", + "Pataca Macau" + ], + "MRO": [ + "MRO", + "Ouguiya Mauritania" + ], + "MUR": [ + "MUR", + "Rupee Mauritia" + ], + "MVR": [ + "MVR", + "Rufiyaa Maldives" + ], + "MWK": [ + "MWK", + "Kwacha Malawi" + ], + "MXN": [ + "MXN", + "Peso Mexico" + ], + "MYR": [ + "RM", + "Ringgit Malaysia" + ], + "MZN": [ + "MZN", + "Metikal Mozambique" + ], + "NAD": [ + "NAD", + "Dolar Namibia" + ], + "NGN": [ + "NGN", + "Naira Nigeria" + ], + "NIO": [ + "NIO", + "Cordoba Nicaragua" + ], + "NOK": [ + "NOK", + "Krone Norway" + ], + "NPR": [ + "NPR", + "Rupee Nepal" + ], + "NZD": [ + "NZ$", + "Dolar New Zealand" + ], + "OMR": [ + "OMR", + "Rial Oman" + ], + "PAB": [ + "PAB", + "Balboa Panama" + ], + "PEN": [ + "PEN", + "Nuevo Sol Peru" + ], + "PGK": [ + "PGK", + "Kina Papua New Guinea" + ], + "PHP": [ + "PHP", + "Peso Filipina" + ], + "PKR": [ + "PKR", + "Rupee Pakistan" + ], + "PLN": [ + "PLN", + "Zloty Poland" + ], + "PYG": [ + "PYG", + "Guarani Paraguay" + ], + "QAR": [ + "QAR", + "Rial Qatar" + ], + "RON": [ + "RON", + "Leu Romania" + ], + "RSD": [ + "RSD", + "Dinar Serbia" + ], + "RUB": [ + "RUB", + "Rubel Rusia" + ], + "RWF": [ + "RWF", + "Franc Rwanda" + ], + "SAR": [ + "SAR", + "Riyal Saudi" + ], + "SBD": [ + "SBD", + "Dolar Kepulauan Solomon" + ], + "SCR": [ + "SCR", + "Rupee Seychelles" + ], + "SDG": [ + "SDG", + "Paun Sudan" + ], + "SEK": [ + "SEK", + "Krona Sweden" + ], + "SGD": [ + "SGD", + "Dolar Singapura" + ], + "SHP": [ + "SHP", + "Paun Saint Helena" + ], + "SLL": [ + "SLL", + "Leone Sierra Leone" + ], + "SOS": [ + "SOS", + "Syiling Somali" + ], + "SRD": [ + "SRD", + "Dolar Surinam" + ], + "SSP": [ + "SSP", + "Paun Sudan selatan" + ], + "STD": [ + "STD", + "Dobra Sao Tome dan Principe" + ], + "SYP": [ + "SYP", + "Paun Syria" + ], + "SZL": [ + "SZL", + "Lilangeni Swazi" + ], + "THB": [ + "THB", + "Baht Thai" + ], + "TJS": [ + "TJS", + "Somoni Tajikistan" + ], + "TMT": [ + "TMT", + "Manat Turkmenistan" + ], + "TND": [ + "TND", + "Dinar Tunisia" + ], + "TOP": [ + "TOP", + "Tongan PaÊ»anga" + ], + "TRY": [ + "TRY", + "Lira Turki" + ], + "TTD": [ + "TTD", + "Dolar Trinidad dan Tobago" + ], + "TWD": [ + "NT$", + "Dolar Taiwan Baru" + ], + "TZS": [ + "TZS", + "Syiling Tanzania" + ], + "UAH": [ + "UAH", + "Hryvnia Ukraine" + ], + "UGX": [ + "UGX", + "Syiling Uganda" + ], + "USD": [ + "USD", + "Dolar AS" + ], + "UYU": [ + "UYU", + "UYU" + ], + "UZS": [ + "UZS", + "Som Uzbekistan" + ], + "VEF": [ + "VEF", + "Bolivar Venezuela" + ], + "VND": [ + "â‚«", + "Dong Vietnam" + ], + "VUV": [ + "VUV", + "Vatu Vanuatu" + ], + "WST": [ + "WST", + "Tala Samoa" + ], + "XAF": [ + "FCFA", + "Franc CFA BEAC" + ], + "XCD": [ + "EC$", + "Dolar Caribbean Timur" + ], + "XOF": [ + "CFA", + "Franc CFA BCEAO" + ], + "XPF": [ + "CFPF", + "Franc CFP" + ], + "YER": [ + "YER", + "Rial Yaman" + ], + "ZAR": [ + "ZAR", + "Rand Afrika Selatan" + ], + "ZMK": [ + "ZMK", + "Kwacha Zambia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha Zambia" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ms_BN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ms_BN.json new file mode 100644 index 0000000000000000000000000000000000000000..e4888cca29b3740eaeed12889d86dd2e835c5ab0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ms_BN.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BND": [ + "$", + "Dolar Brunei" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ms_SG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ms_SG.json new file mode 100644 index 0000000000000000000000000000000000000000..43167291ea248f0f1b42cc3038138cdc01872fd8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ms_SG.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "SGD": [ + "$", + "Dolar Singapura" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mt.json new file mode 100644 index 0000000000000000000000000000000000000000..15f9dec49118496f741fc164c9af855e42a5f93d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/mt.json @@ -0,0 +1,601 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AED": [ + "AED", + "AED" + ], + "AFN": [ + "AFN", + "AFN" + ], + "ALL": [ + "ALL", + "ALL" + ], + "AMD": [ + "AMD", + "AMD" + ], + "ANG": [ + "ANG", + "ANG" + ], + "AOA": [ + "AOA", + "AOA" + ], + "ARS": [ + "ARS", + "ARS" + ], + "AUD": [ + "A$", + "AUD" + ], + "AWG": [ + "AWG", + "AWG" + ], + "AZN": [ + "AZN", + "AZN" + ], + "BAM": [ + "BAM", + "BAM" + ], + "BBD": [ + "BBD", + "BBD" + ], + "BDT": [ + "BDT", + "BDT" + ], + "BGN": [ + "BGN", + "BGN" + ], + "BHD": [ + "BHD", + "BHD" + ], + "BIF": [ + "BIF", + "BIF" + ], + "BMD": [ + "BMD", + "BMD" + ], + "BND": [ + "BND", + "BND" + ], + "BOB": [ + "BOB", + "BOB" + ], + "BRL": [ + "R$", + "BRL" + ], + "BSD": [ + "BSD", + "BSD" + ], + "BTN": [ + "BTN", + "BTN" + ], + "BWP": [ + "BWP", + "BWP" + ], + "BYN": [ + "BYN", + "BYN" + ], + "BYR": [ + "BYR", + "BYR" + ], + "BZD": [ + "BZD", + "BZD" + ], + "CAD": [ + "CA$", + "CAD" + ], + "CDF": [ + "CDF", + "CDF" + ], + "CHF": [ + "CHF", + "CHF" + ], + "CLP": [ + "CLP", + "CLP" + ], + "COP": [ + "COP", + "COP" + ], + "CRC": [ + "CRC", + "CRC" + ], + "CUC": [ + "CUC", + "CUC" + ], + "CUP": [ + "CUP", + "CUP" + ], + "CVE": [ + "CVE", + "CVE" + ], + "CZK": [ + "CZK", + "CZK" + ], + "DJF": [ + "DJF", + "DJF" + ], + "DOP": [ + "DOP", + "DOP" + ], + "DZD": [ + "DZD", + "DZD" + ], + "EGP": [ + "EGP", + "EGP" + ], + "ERN": [ + "ERN", + "ERN" + ], + "ETB": [ + "ETB", + "ETB" + ], + "EUR": [ + "€", + "ewro" + ], + "FJD": [ + "FJD", + "FJD" + ], + "FKP": [ + "FKP", + "FKP" + ], + "GEL": [ + "GEL", + "GEL" + ], + "GHS": [ + "GHS", + "GHS" + ], + "GIP": [ + "GIP", + "GIP" + ], + "GMD": [ + "GMD", + "GMD" + ], + "GNF": [ + "GNF", + "GNF" + ], + "GTQ": [ + "GTQ", + "GTQ" + ], + "GYD": [ + "GYD", + "GYD" + ], + "HNL": [ + "HNL", + "HNL" + ], + "HRK": [ + "HRK", + "HRK" + ], + "HTG": [ + "HTG", + "HTG" + ], + "HUF": [ + "HUF", + "HUF" + ], + "IDR": [ + "IDR", + "IDR" + ], + "ILS": [ + "₪", + "ILS" + ], + "INR": [ + "₹", + "INR" + ], + "IQD": [ + "IQD", + "IQD" + ], + "IRR": [ + "IRR", + "IRR" + ], + "JMD": [ + "JMD", + "JMD" + ], + "JOD": [ + "JOD", + "JOD" + ], + "KES": [ + "KES", + "KES" + ], + "KGS": [ + "KGS", + "KGS" + ], + "KHR": [ + "KHR", + "KHR" + ], + "KMF": [ + "KMF", + "KMF" + ], + "KPW": [ + "KPW", + "KPW" + ], + "KRW": [ + "â‚©", + "KRW" + ], + "KWD": [ + "KWD", + "KWD" + ], + "KYD": [ + "KYD", + "KYD" + ], + "KZT": [ + "KZT", + "KZT" + ], + "LAK": [ + "LAK", + "LAK" + ], + "LBP": [ + "LBP", + "LBP" + ], + "LKR": [ + "LKR", + "LKR" + ], + "LRD": [ + "LRD", + "LRD" + ], + "LYD": [ + "LYD", + "LYD" + ], + "MAD": [ + "MAD", + "MAD" + ], + "MDL": [ + "MDL", + "MDL" + ], + "MGA": [ + "MGA", + "MGA" + ], + "MKD": [ + "MKD", + "MKD" + ], + "MMK": [ + "MMK", + "MMK" + ], + "MNT": [ + "MNT", + "MNT" + ], + "MOP": [ + "MOP", + "MOP" + ], + "MRO": [ + "MRO", + "MRO" + ], + "MTL": [ + "MTL", + "Lira Maltija" + ], + "MUR": [ + "MUR", + "MUR" + ], + "MVR": [ + "MVR", + "MVR" + ], + "MWK": [ + "MWK", + "MWK" + ], + "MXN": [ + "MX$", + "MXN" + ], + "MYR": [ + "MYR", + "MYR" + ], + "MZN": [ + "MZN", + "MZN" + ], + "NAD": [ + "NAD", + "NAD" + ], + "NGN": [ + "NGN", + "NGN" + ], + "NIO": [ + "NIO", + "NIO" + ], + "NPR": [ + "NPR", + "NPR" + ], + "NZD": [ + "NZ$", + "NZD" + ], + "OMR": [ + "OMR", + "OMR" + ], + "PAB": [ + "PAB", + "PAB" + ], + "PEN": [ + "PEN", + "PEN" + ], + "PGK": [ + "PGK", + "PGK" + ], + "PHP": [ + "PHP", + "PHP" + ], + "PKR": [ + "PKR", + "PKR" + ], + "PLN": [ + "PLN", + "PLN" + ], + "PYG": [ + "PYG", + "PYG" + ], + "QAR": [ + "QAR", + "QAR" + ], + "RON": [ + "RON", + "RON" + ], + "RSD": [ + "RSD", + "RSD" + ], + "RUB": [ + "RUB", + "RUB" + ], + "RWF": [ + "RWF", + "RWF" + ], + "SAR": [ + "SAR", + "SAR" + ], + "SBD": [ + "SBD", + "SBD" + ], + "SCR": [ + "SCR", + "SCR" + ], + "SDG": [ + "SDG", + "SDG" + ], + "SEK": [ + "SEK", + "SEK" + ], + "SGD": [ + "SGD", + "SGD" + ], + "SHP": [ + "SHP", + "SHP" + ], + "SLL": [ + "SLL", + "SLL" + ], + "SOS": [ + "SOS", + "SOS" + ], + "SRD": [ + "SRD", + "SRD" + ], + "SSP": [ + "SSP", + "SSP" + ], + "STD": [ + "STD", + "STD" + ], + "SYP": [ + "SYP", + "SYP" + ], + "SZL": [ + "SZL", + "SZL" + ], + "THB": [ + "THB", + "THB" + ], + "TJS": [ + "TJS", + "TJS" + ], + "TMT": [ + "TMT", + "TMT" + ], + "TND": [ + "TND", + "TND" + ], + "TOP": [ + "TOP", + "TOP" + ], + "TRY": [ + "TRY", + "TRY" + ], + "TTD": [ + "TTD", + "TTD" + ], + "TWD": [ + "NT$", + "TWD" + ], + "TZS": [ + "TZS", + "TZS" + ], + "UAH": [ + "UAH", + "UAH" + ], + "UGX": [ + "UGX", + "UGX" + ], + "USD": [ + "US$", + "USD" + ], + "UYU": [ + "UYU", + "UYU" + ], + "UZS": [ + "UZS", + "UZS" + ], + "VEF": [ + "VEF", + "VEF" + ], + "VND": [ + "â‚«", + "VND" + ], + "VUV": [ + "VUV", + "VUV" + ], + "WST": [ + "WST", + "WST" + ], + "XAF": [ + "FCFA", + "XAF" + ], + "XCD": [ + "EC$", + "XCD" + ], + "XOF": [ + "CFA", + "XOF" + ], + "XPF": [ + "CFPF", + "XPF" + ], + "YER": [ + "YER", + "YER" + ], + "ZAR": [ + "ZAR", + "ZAR" + ], + "ZMW": [ + "ZMW", + "ZMW" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/my.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/my.json new file mode 100644 index 0000000000000000000000000000000000000000..3a734f8df92571b5d75e11787c0f07c704f018db --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/my.json @@ -0,0 +1,701 @@ +{ + "Version": "2.1.30.50", + "Names": { + "AED": [ + "AED", + "အာရပ်ဒူဟမ်း" + ], + "AFN": [ + "AFN", + "အာဖဂန်အာဖဂါနီ" + ], + "ALL": [ + "ALL", + "အယ်ဘေးနီးယား လီá€á€º" + ], + "AMD": [ + "AMD", + "အာမေးနီးယားဒရမ်း" + ], + "ANG": [ + "NAf", + "နယ်သာလန် အန်á€á€®á€œá€”် ဂင်းဒါး" + ], + "AOA": [ + "AOA", + "အင်ဂိုလာ ကန်ဇာ" + ], + "ARP": [ + "ARP", + "အာဂျင်á€á€®á€¸á€”ား ပီဆို (áá‰áˆáƒâ€“áá‰áˆá…)" + ], + "ARS": [ + "ARS", + "အာဂျင်á€á€®á€¸á€”ား ပီဆို" + ], + "AUD": [ + "A$", + "ဩစá€á€¼á€±á€¸á€œá€» ဒေါ်လာ" + ], + "AWG": [ + "Afl", + "အရူးဗာ ဖလိုရင်း" + ], + "AZN": [ + "AZN", + "အဇာဘိုင်ဂျန်မာနá€á€º" + ], + "BAM": [ + "BAM", + "ဘော့စနီးယားနှင့် ဟာဇီဂိုဘီးနားမá€á€ºá€€á€º" + ], + "BBD": [ + "BBD", + "ဘာဘေးဒီယန်း ဒေါ်လာ" + ], + "BDT": [ + "BDT", + "ဘင်္ဂလားဒေ့ရှ် á€á€¬á€€á€¬" + ], + "BEF": [ + "BEF", + "ဘယ်လ်ဂျီယမ် ဖရန့်" + ], + "BGN": [ + "BGN", + "ဘူလ်ဂေးရီးယား လက်ဖ်" + ], + "BHD": [ + "BHD", + "ဘာရိန်းဒီနား" + ], + "BIF": [ + "BIF", + "ဘူရွန်ဒီ ဖရန့်" + ], + "BMD": [ + "BMD", + "ဘာမြူဒါ ဒေါ်လာ" + ], + "BND": [ + "BND", + "ဘရူနိုင်း ဒေါ်လာ" + ], + "BOB": [ + "BOB", + "ဘိုလီးဗီးယား ဘိုလီးဗီယားနို" + ], + "BOP": [ + "BOP", + "ဘိုလီးဘီးယား ပီဆို" + ], + "BRL": [ + "R$", + "ဘရာဇီး ရီးယဲ" + ], + "BSD": [ + "BSD", + "ဘဟားမား ဒေါ်လာ" + ], + "BTN": [ + "BTN", + "ဘူá€á€”်အံဂါလ်ထရန်" + ], + "BUK": [ + "BUK", + "ဗမာ ကျပ်" + ], + "BWP": [ + "BWP", + "ဘော့ဆွာနာ ပုလ" + ], + "BYB": [ + "BYB", + "ဘီလာရုစ် ရူဘယ်အသစ် (áá‰á‰á„–áá‰á‰á‰)" + ], + "BYN": [ + "BYN", + "ဘီလာရုဇ် ရူဘယ်" + ], + "BYR": [ + "BYR", + "ဘီလာရုဇ် ရူဘယ် (á‚á€á€á€â€“á‚á€áá†)" + ], + "BZD": [ + "BZD", + "ဘလိဇ် ဒေါ်လာ" + ], + "CAD": [ + "CA$", + "ကနေဒါ ဒေါ်လာ" + ], + "CDF": [ + "CDF", + "ကွန်ဂို ဖရန့်" + ], + "CHF": [ + "CHF", + "ဆွစ် ဖရန့်" + ], + "CLP": [ + "CLP", + "á€á€»á€®á€œá€® ပီဆို" + ], + "CNY": [ + "CNÂ¥", + "á€á€›á€¯á€á€º ယွမ်" + ], + "COP": [ + "COP", + "ကိုလံဘီယာ ပီဆို" + ], + "CRC": [ + "CRC", + "ကို့စá€á€¬á€›á€®á€€á€¬ ကိုလွန်" + ], + "CUC": [ + "CUC", + "နိုင်ငံá€á€¼á€¬á€¸á€„ွေလဲလှယ်နိုင်သော ကျူးဘားပီဆို" + ], + "CUP": [ + "CUP", + "ကျူးဘား ပီဆို" + ], + "CVE": [ + "CVE", + "ကိá€á€ºá€•်ဗာဒီ အက်စ်á€á€°á€’ို" + ], + "CYP": [ + "CYP", + "ဆိုက်ပရက်စ် ပေါင်" + ], + "CZK": [ + "CZK", + "á€á€»á€€á€ºá€á€­á€¯á€›á€­á€¯á€”ာ" + ], + "DEM": [ + "DEM", + "ဂျာမá€á€® မá€á€º" + ], + "DJF": [ + "DJF", + "ဂျီဘူá€á€® ဖရန့်" + ], + "DKK": [ + "DKK", + "ဒိန်းမá€á€º á€á€›á€­á€¯á€á€¬" + ], + "DOP": [ + "DOP", + "ဒိုမီနီကန် ပီဆို" + ], + "DZD": [ + "DZD", + "အယ်လ်ဂျီးရီးယား ဒီနာ" + ], + "EGP": [ + "EGP", + "အီဂျစ် ပေါင်" + ], + "ERN": [ + "ERN", + "အီရီထရီးယား နာ့á€á€ºá€–ာ" + ], + "ESP": [ + "ESP", + "စပိန် ပယ်စေးá€á€¬" + ], + "ETB": [ + "ETB", + "အီသီယိုးပီးယားဘီးယာ" + ], + "EUR": [ + "€", + "ယူရို" + ], + "FJD": [ + "FJD", + "ဖီဂျီ ဒေါ်လာ" + ], + "FKP": [ + "FKP", + "ဖော့ကလန်ကျွန်းစု ပေါင်" + ], + "FRF": [ + "FRF", + "ပြင်သစ် ဖရန့်" + ], + "GBP": [ + "£", + "ဗြိá€á€­á€žá€»á€¾ ပေါင်" + ], + "GEL": [ + "GEL", + "ဂျော်ဂျီယာလားရီ" + ], + "GHS": [ + "GHS", + "ဂါနာ ဆဲဒီ" + ], + "GIP": [ + "GIP", + "ဂျီဘရော်လ်á€á€¬ ပေါင်" + ], + "GMD": [ + "GMD", + "ဂမ်ဘီယာ ဒါလာစီ" + ], + "GNF": [ + "GNF", + "ဂီးနီ ဖရန့်" + ], + "GTQ": [ + "GTQ", + "ဂွါá€á€®á€™á€¬á€œá€¬ á€á€€á€ºá€‡á€±á€¬á€ºá€œá€º" + ], + "GYD": [ + "GYD", + "ဂိုင်ယာနာ ဒေါ်လာ" + ], + "HKD": [ + "HK$", + "ဟောင်ကောင် ဒေါ်လာ" + ], + "HNL": [ + "HNL", + "ဟွန်ဒူးရပ်စ် လမ်းပီရာ" + ], + "HRK": [ + "HRK", + "á€á€›á€­á€¯á€¡á€±á€¸á€›á€¾á€¬á€¸á€á€°á€¸á€”ာ" + ], + "HTG": [ + "G", + "ဟေá€á€®á€‚ူးအော်ဒ်" + ], + "HUF": [ + "HUF", + "ဟန်ဂေရီယံဖော်ရင့်á€á€º" + ], + "IDR": [ + "IDR", + "အင်ဒိုနီးရှား ရူပီးယား" + ], + "ILP": [ + "ILP", + "အစ္စရေး ပေါင်" + ], + "ILS": [ + "₪", + "အစ္စရေးရှဲကလ်အသစ်" + ], + "INR": [ + "₹", + "အိန္ဒိယ ရူပီး" + ], + "IQD": [ + "IQD", + "အီရá€á€º ဒီနား" + ], + "IRR": [ + "IRR", + "အီရန်ရီအော်လ်" + ], + "ISK": [ + "ISK", + "အိုက်စလန် á€á€›á€­á€¯á€á€¬" + ], + "JMD": [ + "JMD", + "ဂျမေကာ ဒေါ်လာ" + ], + "JOD": [ + "JOD", + "ဂျော်ဒန်ဒီနား" + ], + "JPY": [ + "JPÂ¥", + "ဂျပန်ယန်း" + ], + "KES": [ + "KES", + "ကင်ညာသျှီလင်" + ], + "KGS": [ + "KGS", + "ကာဂျစ္စá€á€”် ဆော်မ်" + ], + "KHR": [ + "KHR", + "ကမ္ဘောဒီးယား ရီးယဲ" + ], + "KMF": [ + "KMF", + "ကိုမိုရိုစ် ဖရန့်" + ], + "KPW": [ + "KPW", + "မြောက်ကိုရီးယား á€á€™á€º" + ], + "KRW": [ + "â‚©", + "á€á€±á€¬á€„်ကိုရီးယား á€á€™á€º" + ], + "KWD": [ + "KWD", + "ကူá€á€­á€á€ºá€’ီနာ" + ], + "KYD": [ + "KYD", + "ကေမန် ကျွန်းစု ဒေါ်လာ" + ], + "KZT": [ + "KZT", + "ကာဇက်စá€á€”် ထိန်ဂျီ" + ], + "LAK": [ + "LAK", + "လာအိုá€á€­á€•်" + ], + "LBP": [ + "LBP", + "လက်ဘနွန် ပေါင်" + ], + "LKR": [ + "LKR", + "သီရိလင်္ကာ ရူပီး" + ], + "LRD": [ + "LRD", + "လိုက်ဘေးရီးယား ဒေါ်လာ" + ], + "LTL": [ + "LTL", + "လစ်သူယေးနီးယားလီá€á€¬á€¸á€…်" + ], + "LVL": [ + "LVL", + "လá€á€ºá€—ီးယားလá€á€º" + ], + "LYD": [ + "LYD", + "လီဗျာ ဒီနာ" + ], + "MAD": [ + "MAD", + "မိုရိုကို ဒရမ်" + ], + "MDL": [ + "MDL", + "မောလ်ဒိုဗာလယ်အို" + ], + "MGA": [ + "MGA", + "မာလာဂါစီ အရီရရီ" + ], + "MKD": [ + "MKD", + "မက်စီဒိုးနီးယား ဒီနာ" + ], + "MMK": [ + "K", + "မြန်မာကျပ်" + ], + "MNT": [ + "MNT", + "မွန်ဂိုးလီးယားထူးဂရá€á€º" + ], + "MOP": [ + "MOP", + "မကာအိုပါá€á€¬á€¸á€€á€¬á€¸" + ], + "MRO": [ + "MRO", + "မော်ရီá€á€±á€¸á€”ီးယား အူဂီးယာ" + ], + "MUR": [ + "MUR", + "မောရစ်ရှ ရူပီး" + ], + "MVR": [ + "MVR", + "မော်လ်ဒိုက်ရူးဖီရာ" + ], + "MWK": [ + "MWK", + "မာလာá€á€®á€á€½á€«á€¸á€á€»á€¬" + ], + "MXN": [ + "MX$", + "မက္ကဆီကို ပီဆို" + ], + "MYR": [ + "MYR", + "မလေးရှား ရင်းဂစ်" + ], + "MZN": [ + "MZN", + "မိုဇမ်ဘစ် မက်á€á€®á€á€šá€ºá€œá€º" + ], + "NAD": [ + "NAD", + "နမီးဘီးယား ဒေါ်လာ" + ], + "NGN": [ + "NGN", + "နိုင်ဂျီးရီးယားနိုင်းရာ" + ], + "NIO": [ + "NIO", + "နီကာရာဂွါ á€á€­á€¯á€¸á€’ိုဘာ" + ], + "NOK": [ + "NOK", + "နော်á€á€± á€á€›á€­á€¯á€á€¬" + ], + "NPR": [ + "NPR", + "နီပေါ ရူပီး" + ], + "NZD": [ + "NZ$", + "နယူးဇီလန် ဒေါ်လာ" + ], + "OMR": [ + "OMR", + "အိုမန်ရီအော်လ်" + ], + "PAB": [ + "B\/.", + "ပနားမား ဘလ်ဘိုးအာ" + ], + "PEN": [ + "PEN", + "ပီရူး နူအီဗိုဆိုးလ်" + ], + "PGK": [ + "PGK", + "ပါပူအာ နယူးဂီနီ á€á€®á€¸á€”ာ" + ], + "PHP": [ + "PHP", + "ဖိလစ်ပိုင် ပီဆို" + ], + "PKR": [ + "PKR", + "ပါကစ္စá€á€”် ရူပီး" + ], + "PLN": [ + "PLN", + "ပိုလန်ဇလော့á€á€®" + ], + "PYG": [ + "PYG", + "ပါရာဂွေးဂွါးအ်နီး" + ], + "QAR": [ + "QAR", + "ကာá€á€¬á€›á€®á€¡á€±á€¬á€ºá€œá€º" + ], + "RON": [ + "RON", + "ရိုမေးနီးယားလယ်အို" + ], + "RSD": [ + "RSD", + "ဆားဘီးယားဒယ်နား" + ], + "RUB": [ + "RUB", + "ရုရှ ရူဘယ်" + ], + "RUR": [ + "RUR", + "ရုရှ ရူဘယ် (áá‰á‰á–áá‰á‰áˆ)" + ], + "RWF": [ + "RWF", + "ရá€á€”်ဒါ ဖရန့်" + ], + "SAR": [ + "SAR", + "ဆော်ဒီအာရေးဗီးယားရီယော်လ်" + ], + "SBD": [ + "SBD", + "ဆော်လမွန်ကျွန်းစု ဒေါ်လာ" + ], + "SCR": [ + "SCR", + "ဆေးရှဲ ရူပီး" + ], + "SDG": [ + "SDG", + "ဆူဒန် ပေါင်" + ], + "SDP": [ + "SDP", + "ဆူဒန် ပေါင်အဟောင်း" + ], + "SEK": [ + "SEK", + "ဆွီဒင် á€á€›á€­á€¯á€á€¬" + ], + "SGD": [ + "SGD", + "စင်္ကာပူ ဒေါ်လာ" + ], + "SHP": [ + "SHP", + "စိန့်ဟယ်လယ်နာ ပေါင်" + ], + "SLL": [ + "SLL", + "ဆီယာရာလီယွန်း လီအိုနီ" + ], + "SOS": [ + "SOS", + "ဆိုမာလီသျှီလင်" + ], + "SRD": [ + "SRD", + "ဆူရီနမ်း ဒေါ်လာ" + ], + "SSP": [ + "SSP", + "á€á€±á€¬á€„်ဆူဒန်ပေါင်" + ], + "STD": [ + "STD", + "ဆောင်á€á€°á€™á€±á€¸á€”ှင့် ပရင်စီပီ ဒိုဘရာ" + ], + "SUR": [ + "SUR", + "ဆိုဗီယက် ရူဗယ်" + ], + "SYP": [ + "SYP", + "ဆီးရီးယား ပေါင်" + ], + "SZL": [ + "SZL", + "ဆွာဇီလန် လီလန်းဂီနီ" + ], + "THB": [ + "฿", + "ထိုင်းဘá€á€º" + ], + "TJS": [ + "TJS", + "á€á€¬á€‚ျစ်ကစ္စá€á€”် ဆိုမိုနီ" + ], + "TMT": [ + "TMT", + "á€á€¬á€·á€á€ºá€™á€„်နစ္စá€á€”် မာနá€á€º" + ], + "TND": [ + "TND", + "á€á€°á€”ီးရှား ဒီနာ" + ], + "TOP": [ + "TOP", + "á€á€½á€”်ဂါဗန်ဂါ" + ], + "TRL": [ + "TRL", + "ရှေးဟောင်းá€á€°á€›á€€á€® လိုင်ရာ" + ], + "TRY": [ + "TRY", + "á€á€°á€›á€€á€® လိုင်ရာ" + ], + "TTD": [ + "TT$", + "ထရီနီဒá€á€ºá€”ှင့် á€á€­á€¯á€˜á€€á€ºá€‚ို ဒေါ်လာ" + ], + "TWD": [ + "NT$", + "ထိုင်á€á€™á€º ဒေါ်လာအသစ်" + ], + "TZS": [ + "TZS", + "á€á€”်ဇန်းနီးယားသျှီလင်" + ], + "UAH": [ + "UAH", + "ယူကရိန်း ဟီရီဗင်းညား" + ], + "UGX": [ + "UGX", + "ယူဂန်းဒါး သျှီလင်" + ], + "USD": [ + "US$", + "အမေရိကန် ဒေါ်လာ" + ], + "USN": [ + "USN", + "အမေရိကန် ဒေါ်လာ (နောက်နေ့)" + ], + "USS": [ + "USS", + "အမေရိကန် ဒေါ်လာ (á€á€”ေ့á€á€Šá€ºá€¸)" + ], + "UYU": [ + "UYU", + "ဥရုဂွေးပီဆို" + ], + "UZS": [ + "UZS", + "ဥဇဘက်ကစ္စá€á€”် ဆော်မ်" + ], + "VEF": [ + "VEF", + "ဗင်နီဇွဲလား ဘိုလီဗာ" + ], + "VND": [ + "â‚«", + "ဗီယက်နမ် ဒေါင်" + ], + "VUV": [ + "VUV", + "ဗနွားá€á€° ဗားထူ" + ], + "WST": [ + "WST", + "ဆမိုအား ထားလာ" + ], + "XAF": [ + "FCFA", + "ကင်မရွန်းဖရန့်" + ], + "XCD": [ + "EC$", + "အရှေ့ကာရစ်ဘီယံဒေါ်လာ" + ], + "XOF": [ + "CFA", + "ဖရန့်" + ], + "XPF": [ + "CFPF", + "CFP ဖရန့်" + ], + "YER": [ + "YER", + "ယီမင်ရီအော်လ်" + ], + "ZAR": [ + "ZAR", + "á€á€±á€¬á€„်အဖရိက ရန်း" + ], + "ZMW": [ + "ZMW", + "ဇင်ဘာဘွေá€á€½á€«á€¸á€á€»á€¬" + ], + "ZWD": [ + "ZWD", + "ဇင်ဘာဘွေ ဒေါ်လာ" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nb.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nb.json new file mode 100644 index 0000000000000000000000000000000000000000..86295846587bc6555b29c2eae3f2942118d8bad6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nb.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.30.7", + "Names": { + "ADP": [ + "ADP", + "andorranske pesetas" + ], + "AED": [ + "AED", + "emiratarabiske dirham" + ], + "AFA": [ + "AFA", + "afgansk afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "afghanske afghani" + ], + "ALK": [ + "ALK", + "albanske lek (1946–1965)" + ], + "ALL": [ + "ALL", + "albanske lek" + ], + "AMD": [ + "AMD", + "armenske dram" + ], + "ANG": [ + "ANG", + "nederlandske antillegylden" + ], + "AOA": [ + "AOA", + "angolanske kwanza" + ], + "AOK": [ + "AOK", + "angolanske kwanza (1977–1990)" + ], + "AON": [ + "AON", + "angolanske nye kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "angolanske omjusterte kwanza (1995–1999)" + ], + "ARA": [ + "ARA", + "argentinske australer" + ], + "ARL": [ + "ARL", + "argentinske peso ley" + ], + "ARM": [ + "ARM", + "argentinsk pesos (1881–1970)" + ], + "ARP": [ + "ARP", + "argentinske pesos (1983–1985)" + ], + "ARS": [ + "ARS", + "argentinske pesos" + ], + "ATS": [ + "ATS", + "østerrikske shilling" + ], + "AUD": [ + "AUD", + "australske dollar" + ], + "AWG": [ + "AWG", + "arubiske floriner" + ], + "AZM": [ + "AZM", + "aserbajdsjanske manat (1993–2006)" + ], + "AZN": [ + "AZN", + "aserbajdsjanske manat" + ], + "BAD": [ + "BAD", + "bosnisk-hercegovinske dinarer (1992–1994)" + ], + "BAM": [ + "BAM", + "bosnisk-hercegovinske konvertible mark" + ], + "BAN": [ + "BAN", + "nye bosnisk-hercegovinske dinarer (1994–1997)" + ], + "BBD": [ + "BBD", + "barbadiske dollar" + ], + "BDT": [ + "BDT", + "bangladeshiske taka" + ], + "BEC": [ + "BEC", + "belgiske franc (konvertible)" + ], + "BEF": [ + "BEF", + "belgiske franc" + ], + "BEL": [ + "BEL", + "belgiske franc (finansielle)" + ], + "BGL": [ + "BGL", + "bulgarske lev (hard)" + ], + "BGM": [ + "BGM", + "bulgarske lev (sosialist)" + ], + "BGN": [ + "BGN", + "bulgarske lev" + ], + "BGO": [ + "BGO", + "bulgarske lev (1879–1952)" + ], + "BHD": [ + "BHD", + "bahrainske dinarer" + ], + "BIF": [ + "BIF", + "burundiske franc" + ], + "BMD": [ + "BMD", + "bermudiske dollar" + ], + "BND": [ + "BND", + "bruneiske dollar" + ], + "BOB": [ + "BOB", + "bolivianske boliviano" + ], + "BOL": [ + "BOL", + "bolivianske boliviano (1863–1963)" + ], + "BOP": [ + "BOP", + "bolivianske pesos" + ], + "BOV": [ + "BOV", + "bolivianske mvdol" + ], + "BRB": [ + "BRB", + "brasilianske cruzeiro novo (1967–1986)" + ], + "BRC": [ + "BRC", + "brasilianske cruzados (1986–1989)" + ], + "BRE": [ + "BRE", + "brasilianske cruzeiro (1990–1993)" + ], + "BRL": [ + "BRL", + "brasilianske real" + ], + "BRN": [ + "BRN", + "brasilianske cruzado novo (1989–1990)" + ], + "BRR": [ + "BRR", + "brasilianske cruzeiro (1993–1994)" + ], + "BRZ": [ + "BRZ", + "brasilianske cruzeiro (1942–1967)" + ], + "BSD": [ + "BSD", + "bahamanske dollar" + ], + "BTN": [ + "BTN", + "bhutanske ngultrum" + ], + "BUK": [ + "BUK", + "burmesiske kyat" + ], + "BWP": [ + "BWP", + "botswanske pula" + ], + "BYB": [ + "BYB", + "hviterussiske nye rubler (1994–1999)" + ], + "BYN": [ + "BYN", + "hviterussiske rubler" + ], + "BYR": [ + "BYR", + "hviterussiske rubler (2000–2016)" + ], + "BZD": [ + "BZD", + "beliziske dollar" + ], + "CAD": [ + "CAD", + "kanadiske dollar" + ], + "CDF": [ + "CDF", + "kongolesiske franc" + ], + "CHE": [ + "CHE", + "WIR euro" + ], + "CHF": [ + "CHF", + "sveitsiske franc" + ], + "CHW": [ + "CHW", + "WIR franc" + ], + "CLE": [ + "CLE", + "chilenske escudo" + ], + "CLF": [ + "CLF", + "chilenske unidades de fomento" + ], + "CLP": [ + "CLP", + "chilenske pesos" + ], + "CNX": [ + "CNX", + "Kinas folkebank dollar" + ], + "CNY": [ + "CNY", + "kinesiske yuan" + ], + "COP": [ + "COP", + "colombianske pesos" + ], + "COU": [ + "COU", + "colombianske unidad de valor real" + ], + "CRC": [ + "CRC", + "costaricanske colón" + ], + "CSD": [ + "CSD", + "serbiske dinarer (2002–2006)" + ], + "CSK": [ + "CSK", + "tsjekkoslovakiske koruna (hard)" + ], + "CUC": [ + "CUC", + "kubanske konvertible pesos" + ], + "CUP": [ + "CUP", + "kubanske pesos" + ], + "CVE": [ + "CVE", + "kappverdiske escudos" + ], + "CYP": [ + "CYP", + "kypriotiske pund" + ], + "CZK": [ + "CZK", + "tsjekkiske koruna" + ], + "DDM": [ + "DDM", + "østtyske mark" + ], + "DEM": [ + "DEM", + "tyske mark" + ], + "DJF": [ + "DJF", + "djiboutiske franc" + ], + "DKK": [ + "DKK", + "danske kroner" + ], + "DOP": [ + "DOP", + "dominikanske pesos" + ], + "DZD": [ + "DZD", + "algeriske dinarer" + ], + "ECS": [ + "ECS", + "ecuadorianske sucre" + ], + "ECV": [ + "ECV", + "ecuadorianske unidad de valor constante (UVC)" + ], + "EEK": [ + "EEK", + "estiske kroon" + ], + "EGP": [ + "EGP", + "egyptiske pund" + ], + "ERN": [ + "ERN", + "eritreiske nakfa" + ], + "ESA": [ + "ESA", + "spanske peseta (A–konto)" + ], + "ESB": [ + "ESB", + "spanske peseta (konvertibel konto)" + ], + "ESP": [ + "ESP", + "spanske peseta" + ], + "ETB": [ + "ETB", + "etiopiske birr" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "finske mark" + ], + "FJD": [ + "FJD", + "fijianske dollar" + ], + "FKP": [ + "FKP", + "falklandspund" + ], + "FRF": [ + "FRF", + "franske franc" + ], + "GBP": [ + "£", + "britiske pund" + ], + "GEK": [ + "GEK", + "georgiske kupon larit" + ], + "GEL": [ + "GEL", + "georgiske lari" + ], + "GHC": [ + "GHC", + "ghanesisk cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "ghanesiske cedi" + ], + "GIP": [ + "GIP", + "gibraltarske pund" + ], + "GMD": [ + "GMD", + "gambiske dalasi" + ], + "GNF": [ + "GNF", + "guineanske franc" + ], + "GNS": [ + "GNS", + "guineanske syli" + ], + "GQE": [ + "GQE", + "ekvatorialguineanske ekwele guineana" + ], + "GRD": [ + "GRD", + "greske drakmer" + ], + "GTQ": [ + "GTQ", + "guatemalanske quetzal" + ], + "GWE": [ + "GWE", + "portugisiske guinea escudo" + ], + "GWP": [ + "GWP", + "Guinea-Bissau-pesos" + ], + "GYD": [ + "GYD", + "guyanske dollar" + ], + "HKD": [ + "HKD", + "Hongkong-dollar" + ], + "HNL": [ + "HNL", + "honduranske lempira" + ], + "HRD": [ + "HRD", + "kroatiske dinarer" + ], + "HRK": [ + "HRK", + "kroatiske kuna" + ], + "HTG": [ + "HTG", + "haitiske gourde" + ], + "HUF": [ + "HUF", + "ungarske forinter" + ], + "IDR": [ + "IDR", + "indonesiske rupier" + ], + "IEP": [ + "IEP", + "irske pund" + ], + "ILP": [ + "ILP", + "israelske pund" + ], + "ILR": [ + "ILR", + "israelske shekler (1980–1985)" + ], + "ILS": [ + "ILS", + "nye israelske shekler" + ], + "INR": [ + "INR", + "indiske rupier" + ], + "IQD": [ + "IQD", + "irakske dinarer" + ], + "IRR": [ + "IRR", + "iranske rialer" + ], + "ISJ": [ + "ISJ", + "islandske kroner (1918–1981)" + ], + "ISK": [ + "ISK", + "islandske kroner" + ], + "ITL": [ + "ITL", + "italienske lire" + ], + "JMD": [ + "JMD", + "jamaikanske dollar" + ], + "JOD": [ + "JOD", + "jordanske dinarer" + ], + "JPY": [ + "JPY", + "japanske yen" + ], + "KES": [ + "KES", + "kenyanske shilling" + ], + "KGS": [ + "KGS", + "kirgisiske som" + ], + "KHR": [ + "KHR", + "kambodsjanske riel" + ], + "KMF": [ + "KMF", + "komoriske franc" + ], + "KPW": [ + "KPW", + "nordkoreanske won" + ], + "KRH": [ + "KRH", + "sørkoreanske hwan (1953–1962)" + ], + "KRO": [ + "KRO", + "sørkoreanske won (1945–1953)" + ], + "KRW": [ + "KRW", + "sørkoreanske won" + ], + "KWD": [ + "KWD", + "kuwaitiske dinarer" + ], + "KYD": [ + "KYD", + "caymanske dollar" + ], + "KZT": [ + "KZT", + "kasakhstanske tenge" + ], + "LAK": [ + "LAK", + "laotiske kip" + ], + "LBP": [ + "LBP", + "libanesiske pund" + ], + "LKR": [ + "LKR", + "srilankiske rupier" + ], + "LRD": [ + "LRD", + "liberiske dollar" + ], + "LSL": [ + "LSL", + "lesothiske loti" + ], + "LTL": [ + "LTL", + "litauiske litas" + ], + "LTT": [ + "LTT", + "litauiske talonas" + ], + "LUC": [ + "LUC", + "luxemburgske konvertible franc" + ], + "LUF": [ + "LUF", + "luxemburgske franc" + ], + "LUL": [ + "LUL", + "luxemburgske finansielle franc" + ], + "LVL": [ + "LVL", + "latviske lats" + ], + "LVR": [ + "LVR", + "latviske rubler" + ], + "LYD": [ + "LYD", + "libyske dinarer" + ], + "MAD": [ + "MAD", + "marokkanske dirham" + ], + "MAF": [ + "MAF", + "marokkanske franc" + ], + "MCF": [ + "MCF", + "MCF" + ], + "MDC": [ + "MDC", + "moldovske cupon" + ], + "MDL": [ + "MDL", + "moldovske leu" + ], + "MGA": [ + "MGA", + "madagassiske ariary" + ], + "MGF": [ + "MGF", + "madagassiske franc" + ], + "MKD": [ + "MKD", + "makedonske denarer" + ], + "MKN": [ + "MKN", + "makedonske denarer (1992–1993)" + ], + "MLF": [ + "MLF", + "maliske franc" + ], + "MMK": [ + "MMK", + "myanmarske kyat" + ], + "MNT": [ + "MNT", + "mongolske tugrik" + ], + "MOP": [ + "MOP", + "makaoiske pataca" + ], + "MRO": [ + "MRO", + "mauritanske ouguiya" + ], + "MTL": [ + "MTL", + "maltesiske lira" + ], + "MTP": [ + "MTP", + "maltesiske pund" + ], + "MUR": [ + "MUR", + "mauritiske rupier" + ], + "MVP": [ + "MVP", + "maldiviske rupier" + ], + "MVR": [ + "MVR", + "maldiviske rufiyaa" + ], + "MWK": [ + "MWK", + "malawiske kwacha" + ], + "MXN": [ + "MXN", + "meksikanske pesos" + ], + "MXP": [ + "MXP", + "meksikanske sølvpesos (1861–1992)" + ], + "MXV": [ + "MXV", + "meksikanske unidad de inversion (UDI)" + ], + "MYR": [ + "MYR", + "malaysiske ringgit" + ], + "MZE": [ + "MZE", + "mosambikiske escudo" + ], + "MZM": [ + "MZM", + "gamle mosambikiske metical" + ], + "MZN": [ + "MZN", + "mosambikiske metical" + ], + "NAD": [ + "NAD", + "namibiske dollar" + ], + "NGN": [ + "NGN", + "nigerianske naira" + ], + "NIC": [ + "NIC", + "nicaraguanske cordoba (1988–1991)" + ], + "NIO": [ + "NIO", + "nicaraguanske córdoba" + ], + "NLG": [ + "NLG", + "nederlandske gylden" + ], + "NOK": [ + "kr", + "norske kroner" + ], + "NPR": [ + "NPR", + "nepalske rupier" + ], + "NZD": [ + "NZD", + "newzealandske dollar" + ], + "OMR": [ + "OMR", + "omanske rialer" + ], + "PAB": [ + "PAB", + "panamanske balboa" + ], + "PEI": [ + "PEI", + "peruvianske inti" + ], + "PEN": [ + "PEN", + "peruanske nuevo sol" + ], + "PES": [ + "PES", + "peruvianske sol (1863–1965)" + ], + "PGK": [ + "PGK", + "papuanske kina" + ], + "PHP": [ + "PHP", + "filippinske pesos" + ], + "PKR": [ + "PKR", + "pakistanske rupier" + ], + "PLN": [ + "PLN", + "polske zloty" + ], + "PLZ": [ + "PLZ", + "polske zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "portugisiske escudo" + ], + "PYG": [ + "PYG", + "paraguayanske guarani" + ], + "QAR": [ + "QAR", + "qatarske rialer" + ], + "RHD": [ + "RHD", + "rhodesiske dollar" + ], + "ROL": [ + "ROL", + "rumenske leu (1952–2006)" + ], + "RON": [ + "RON", + "rumenske leu" + ], + "RSD": [ + "RSD", + "serbiske dinarer" + ], + "RUB": [ + "RUB", + "russiske rubler" + ], + "RUR": [ + "RUR", + "russiske rubler (1991–1998)" + ], + "RWF": [ + "RWF", + "rwandiske franc" + ], + "SAR": [ + "SAR", + "saudiarabiske riyaler" + ], + "SBD": [ + "SBD", + "salomonske dollar" + ], + "SCR": [ + "SCR", + "seychelliske rupier" + ], + "SDD": [ + "SDD", + "sudanesiske dinarer (1992–2007)" + ], + "SDG": [ + "SDG", + "sudanske pund" + ], + "SDP": [ + "SDP", + "sudanesiske pund" + ], + "SEK": [ + "SEK", + "svenske kroner" + ], + "SGD": [ + "SGD", + "singaporske dollar" + ], + "SHP": [ + "SHP", + "sankthelenske pund" + ], + "SIT": [ + "SIT", + "slovenske tolar" + ], + "SKK": [ + "SKK", + "slovakiske koruna" + ], + "SLL": [ + "SLL", + "sierraleonske leone" + ], + "SOS": [ + "SOS", + "somaliske shilling" + ], + "SRD": [ + "SRD", + "surinamske dollar" + ], + "SRG": [ + "SRG", + "surinamske gylden" + ], + "SSP": [ + "SSP", + "sørsudanske pund" + ], + "STD": [ + "STD", + "São Tomé og Príncipe-dobra" + ], + "SUR": [ + "SUR", + "sovjetiske rubler" + ], + "SVC": [ + "SVC", + "salvadoranske colon" + ], + "SYP": [ + "SYP", + "syriske pund" + ], + "SZL": [ + "SZL", + "swazilandske lilangeni" + ], + "THB": [ + "THB", + "thailandske baht" + ], + "TJR": [ + "TJR", + "tadsjikiske rubler" + ], + "TJS": [ + "TJS", + "tadsjikiske somoni" + ], + "TMM": [ + "TMM", + "turkmenske manat (1993–2009)" + ], + "TMT": [ + "TMT", + "turkmenske manat" + ], + "TND": [ + "TND", + "tunisiske dinarer" + ], + "TOP": [ + "TOP", + "tonganske paÊ»anga" + ], + "TPE": [ + "TPE", + "timoresiske escudo" + ], + "TRL": [ + "TRL", + "tyrkiske lire (1922–2005)" + ], + "TRY": [ + "TRY", + "tyrkiske lire" + ], + "TTD": [ + "TTD", + "trinidadiske dollar" + ], + "TWD": [ + "TWD", + "nye taiwanske dollar" + ], + "TZS": [ + "TZS", + "tanzanianske shilling" + ], + "UAH": [ + "UAH", + "ukrainske hryvnia" + ], + "UAK": [ + "UAK", + "ukrainske karbovanetz" + ], + "UGS": [ + "UGS", + "ugandiske shilling (1966–1987)" + ], + "UGX": [ + "UGX", + "ugandiske shilling" + ], + "USD": [ + "USD", + "amerikanske dollar" + ], + "USN": [ + "USN", + "amerikanske dollar (neste dag)" + ], + "USS": [ + "USS", + "amerikanske dollar (samme dag)" + ], + "UYI": [ + "UYI", + "uruguyanske pesos (indekserte enheter)" + ], + "UYP": [ + "UYP", + "uruguayanske pesos (1975–1993)" + ], + "UYU": [ + "UYU", + "uruguayanske pesos" + ], + "UZS": [ + "UZS", + "usbekiske som" + ], + "VEB": [ + "VEB", + "venezuelanske bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "venezuelanske bolivar" + ], + "VND": [ + "VND", + "vietnamesiske dong" + ], + "VNN": [ + "VNN", + "vietnamesiske dong (1978–1985)" + ], + "VUV": [ + "VUV", + "vanuatiske vatu" + ], + "WST": [ + "WST", + "samoanske tala" + ], + "XAF": [ + "XAF", + "sentralafrikanske CFA-franc" + ], + "XCD": [ + "XCD", + "østkaribiske dollar" + ], + "XEU": [ + "XEU", + "europeisk valutaenhet" + ], + "XFO": [ + "XFO", + "franske gullfranc" + ], + "XFU": [ + "XFU", + "franske UIC-franc" + ], + "XOF": [ + "CFA", + "vestafrikanske CFA-franc" + ], + "XPF": [ + "XPF", + "CFP-franc" + ], + "XRE": [ + "XRE", + "RINET-fond" + ], + "YDD": [ + "YDD", + "jemenittiske dinarer" + ], + "YER": [ + "YER", + "jemenittiske rialer" + ], + "YUD": [ + "YUD", + "jugoslaviske dinarer (hard)" + ], + "YUM": [ + "YUM", + "jugoslaviske noviy-dinarer" + ], + "YUN": [ + "YUN", + "jugoslaviske konvertible dinarer" + ], + "YUR": [ + "YUR", + "jugoslaviske reformerte dinarer (1992–1993)" + ], + "ZAL": [ + "ZAL", + "sørafrikanske rand (finansielle)" + ], + "ZAR": [ + "ZAR", + "sørafrikanske rand" + ], + "ZMK": [ + "ZMK", + "zambiske kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "zambiske kwacha" + ], + "ZRN": [ + "ZRN", + "zairiske nye zaire" + ], + "ZRZ": [ + "ZRZ", + "zairiske zaire" + ], + "ZWD": [ + "ZWD", + "zimbabwiske dollar (1980–2008)" + ], + "ZWL": [ + "ZWL", + "zimbabwisk dollar (2009)" + ], + "ZWR": [ + "ZWR", + "zimbabwisk dollar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nd.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nd.json new file mode 100644 index 0000000000000000000000000000000000000000..c0f77d708d0f057bdef15ec1d61ff317188672f9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nd.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.65", + "Names": { + "AED": [ + "AED", + "Dola laseArab" + ], + "AOA": [ + "AOA", + "Kwanza yase Angola" + ], + "AUD": [ + "A$", + "Dola yase Australia" + ], + "BHD": [ + "BHD", + "Dinari yase Bhahareni" + ], + "BIF": [ + "BIF", + "Fulenki yase Bhurundi" + ], + "BWP": [ + "BWP", + "Phula yase Botswana" + ], + "CAD": [ + "CA$", + "Dola yase Khanada" + ], + "CDF": [ + "CDF", + "Fulenki yase Khongo" + ], + "CHF": [ + "CHF", + "Fulenki yase Swisi" + ], + "CNY": [ + "CNÂ¥", + "Yuan Renminbi yase China" + ], + "CVE": [ + "CVE", + "Escudo Caboverdiano" + ], + "DJF": [ + "DJF", + "Fulenki yase Jibhuthi" + ], + "DZD": [ + "DZD", + "Dinali yase Aljeriya" + ], + "EGP": [ + "EGP", + "Phawundi laseGibhide" + ], + "ERN": [ + "ERN", + "Nakfa yase Eritrea" + ], + "ETB": [ + "ETB", + "Dola laseEthiopia" + ], + "EUR": [ + "€", + "Yuro" + ], + "GBP": [ + "£", + "Phawundi yase Ngilandi" + ], + "GHC": [ + "GHC", + "Sedi yase Ghana" + ], + "GMD": [ + "GMD", + "Dalasi yase Gambia" + ], + "GNS": [ + "GNS", + "Fulenki yase Gine" + ], + "INR": [ + "₹", + "Rupi yase Indiya" + ], + "JPY": [ + "JPÂ¥", + "Yeni yase Japhani" + ], + "KES": [ + "KES", + "Shilingi yase Kenya" + ], + "KMF": [ + "KMF", + "Fulenki yase Khomoro" + ], + "LRD": [ + "LRD", + "Dola yase Libheriya" + ], + "LSL": [ + "LSL", + "Lothi yase Lesotho" + ], + "LYD": [ + "LYD", + "Dinari yase Libya" + ], + "MAD": [ + "MAD", + "Dirham yase Morokho" + ], + "MGA": [ + "MGA", + "Fulenki yase Malagasi" + ], + "MRO": [ + "MRO", + "Ugwiya yase Moritaniya" + ], + "MUR": [ + "MUR", + "Rupi yase Morishasi" + ], + "MWK": [ + "MWK", + "Kwacha yase Malawi" + ], + "MZM": [ + "MZM", + "Metikali yase Mozambiki" + ], + "NAD": [ + "NAD", + "Dola yase Namibiya" + ], + "NGN": [ + "NGN", + "Nayira yase Nijeriya" + ], + "RWF": [ + "RWF", + "Fulenki yase Ruwanda" + ], + "SAR": [ + "SAR", + "Riyal yase Saudi" + ], + "SCR": [ + "SCR", + "Rupi yase Seyisheli" + ], + "SDG": [ + "SDG", + "Dinari yase Sudani" + ], + "SDP": [ + "SDP", + "Phawundi yase Sudani" + ], + "SHP": [ + "SHP", + "Phawundindi laseSt Helena" + ], + "SLL": [ + "SLL", + "Leyoni" + ], + "SOS": [ + "SOS", + "Shilingi yase Somaliya" + ], + "STD": [ + "STD", + "Dobra yase Sao Tome lo Principe" + ], + "SZL": [ + "SZL", + "Lilangeni" + ], + "TND": [ + "TND", + "Dinari yase Tunisiya" + ], + "TZS": [ + "TZS", + "Shilingi yase Tanzaniya" + ], + "UGX": [ + "UGX", + "Shilingi yase Uganda" + ], + "USD": [ + "US$", + "Dola yase Amelika" + ], + "XAF": [ + "FCFA", + "Fulenki CFA BEAC" + ], + "XOF": [ + "CFA", + "Fulenki CFA BCEAO" + ], + "ZAR": [ + "ZAR", + "Randi yase Afrika ye Zanzi" + ], + "ZMK": [ + "ZMK", + "Kwacha yase Zambiya (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha yase Zambiya" + ], + "ZWD": [ + "ZWD", + "Dola yase Zimbabwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ne.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ne.json new file mode 100644 index 0000000000000000000000000000000000000000..3126b42730ee5c5ee53411345d5842af34b6d85d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ne.json @@ -0,0 +1,641 @@ +{ + "Version": "2.1.29.20", + "Names": { + "AED": [ + "AED", + "संयà¥à¤•à¥à¤¤ अरब à¤à¤®à¤¿à¤°à¤¾à¤Ÿà¥à¤¸ डिरà¥à¤¹à¤¾à¤®" + ], + "AFA": [ + "AFA", + "अफà¥à¤—ानी(१९२७–२००२)" + ], + "AFN": [ + "AFN", + "अफà¥à¤—ान अफà¥à¤—ानी" + ], + "ALL": [ + "ALL", + "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¨ लेक" + ], + "AMD": [ + "AMD", + "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾à¤²à¥€ डà¥à¤°à¤¾à¤®" + ], + "ANG": [ + "ANG", + "नेदरलà¥à¤¯à¤¾à¤£à¥à¤¡à¥à¤¸ à¤à¤¨à¥à¤Ÿà¤¿à¤²à¤¿à¤¯à¤¨ गिलà¥à¤¡à¤°" + ], + "AOA": [ + "AOA", + "à¤à¤™à¥à¤—ोलान कà¥à¤µà¤¾à¤¨à¥à¤œà¤¾" + ], + "ARS": [ + "ARS", + "अरà¥à¤œà¥‡à¤¨à¥à¤Ÿà¤¿à¤¨à¥€ पेसो" + ], + "AUD": [ + "A$", + "अषà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¨ डलर" + ], + "AWG": [ + "AWG", + "आरूबन फà¥à¤²à¥‹à¤°à¤¿à¤¨" + ], + "AZN": [ + "AZN", + "अजरबैजानी मानात" + ], + "BAM": [ + "BAM", + "बोसà¥à¤¨à¤¿à¤¯à¤¾-हरà¥à¤œà¤—ोभिनिया रूपानà¥à¤¤à¤°à¤¯à¥‹à¤—à¥à¤¯ मारà¥à¤•" + ], + "BBD": [ + "BBD", + "बरà¥à¤¬à¤¾à¤¡à¤¿à¤¯à¤¨ डलर" + ], + "BDT": [ + "BDT", + "बङà¥à¤—लादेशी टाका" + ], + "BGN": [ + "BGN", + "बà¥à¤²à¥à¤—ारियाली लेभ" + ], + "BHD": [ + "BHD", + "बाहारैनी डिनार" + ], + "BIF": [ + "BIF", + "बà¥à¤°à¥‚णà¥à¤¡à¤¿à¤¯à¤¾à¤²à¥€ फà¥à¤°à¤¾à¤¨à¥à¤•" + ], + "BMD": [ + "BMD", + "बरà¥à¤®à¥à¤¡à¤¨ डलर" + ], + "BND": [ + "BND", + "बà¥à¤°à¥à¤¨à¤¾à¤ˆ डलर" + ], + "BOB": [ + "BOB", + "बोलिभियन बोलिभियानो" + ], + "BRL": [ + "R$", + "बà¥à¤°à¤¾à¤œà¤¿à¤²à¤¿à¤¯à¤¨ रियल" + ], + "BSD": [ + "BSD", + "बहामियाली डलर" + ], + "BTN": [ + "BTN", + "भà¥à¤Ÿà¤¾à¤¨à¥€ à¤à¤¨à¥â€Œà¤—à¥à¤²à¥à¤Ÿà¥à¤°à¥à¤®" + ], + "BWP": [ + "BWP", + "बोटà¥à¤¸à¤µà¤¾à¤¨à¤¾à¤¨ पà¥à¤²à¤¾" + ], + "BYN": [ + "BYN", + "बेलारूसी रूबल" + ], + "BYR": [ + "BYR", + "बेलारूसी रूबल (2000–2016)" + ], + "BZD": [ + "BZD", + "वेलिज डलर" + ], + "CAD": [ + "CA$", + "कà¥à¤¯à¤¾à¤¨à¤¾à¤¡à¤¿à¤¯à¤¾à¤²à¥€ डलर" + ], + "CDF": [ + "CDF", + "कङà¥à¤—ोली फà¥à¤°à¤¾à¤¨à¥à¤•" + ], + "CHF": [ + "CHF", + "सà¥à¤µà¤¿à¤¸à¥ फà¥à¤°à¥ˆà¤™à¥à¤•" + ], + "CLP": [ + "CLP", + "चिलियन पेसो" + ], + "CNY": [ + "CNÂ¥", + "चिनिà¤à¤¯à¤¾ यà¥à¤†à¤¨" + ], + "COP": [ + "COP", + "कोलमà¥à¤µà¤¿à¤¯à¤¨ पेसो" + ], + "CRC": [ + "CRC", + "कोषà¥à¤Ÿà¤¾à¤°à¤¿à¤•न कोलोन" + ], + "CUC": [ + "CUC", + "कà¥à¤¯à¥‚वाली रूपानà¥à¤¤à¤°à¤£à¤¯à¥‹à¤—à¥à¤¯ पेसो" + ], + "CUP": [ + "CUP", + "कà¥à¤¯à¥‚वाली पेसो" + ], + "CVE": [ + "CVE", + "केप भरà¥à¤¡à¤¿à¤¯à¤¨ à¤à¤¸à¥à¤•à¥à¤¡à¥‹" + ], + "CZK": [ + "CZK", + "चेख गणतञà¥à¤¤à¥à¤° कोरूना" + ], + "DJF": [ + "DJF", + "जिबौंटियाली फà¥à¤°à¤¾à¤¨à¥à¤•" + ], + "DKK": [ + "DKK", + "डà¥à¤¯à¤¾à¤¨à¤¿à¤¶ कà¥à¤°à¥‹à¤¨" + ], + "DOP": [ + "DOP", + "डोमिनिकन पेसो" + ], + "DZD": [ + "DZD", + "अलà¥à¤œà¥‡à¤°à¤¿à¤¯à¤¾à¤²à¥€ डिनार" + ], + "EGP": [ + "EGP", + "इजिपà¥à¤¸à¤¿à¤¯à¤¨ पाउनà¥à¤¡" + ], + "ERN": [ + "ERN", + "à¤à¤°à¤¿à¤Ÿà¥à¤°à¤¿à¤¯à¤¨ नाकà¥à¤«à¤¾" + ], + "ETB": [ + "ETB", + "इथियोपियाली बिर" + ], + "EUR": [ + "€", + "यà¥à¤°à¥‹" + ], + "FJD": [ + "FJD", + "फिजीयाली डलर" + ], + "FKP": [ + "FKP", + "फकà¥â€Œà¤²à¥à¤¯à¤¾à¤£à¥à¤¡ टापà¥à¤¹à¤°à¥‚का पाउनà¥à¤¡" + ], + "GBP": [ + "£", + "बेलायती पाउणà¥à¤¡ सà¥à¤Ÿà¤°à¥à¤²à¤¿à¤™" + ], + "GEL": [ + "GEL", + "जरà¥à¤œà¤¿à¤¯à¤¾à¤²à¥€ लारी" + ], + "GHS": [ + "GHS", + "घानाली सेडी" + ], + "GIP": [ + "GIP", + "जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤° पाउणà¥à¤¡" + ], + "GMD": [ + "GMD", + "गामà¥à¤µà¤¿à¤¯à¤¾à¤²à¥€ डालासी" + ], + "GNF": [ + "GNF", + "गिनियाली फà¥à¤°à¤¾à¤¨à¥à¤•" + ], + "GTQ": [ + "GTQ", + "गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾ कà¥à¤µà¥‡à¤Ÿà¥à¤œà¤¾à¤²" + ], + "GYD": [ + "GYD", + "गाइनिज डलर" + ], + "HKD": [ + "HK$", + "हङकङ डलर" + ], + "HNL": [ + "HNL", + "होनà¥à¤¡à¥à¤°à¤¾à¤¨ लेमà¥à¤ªà¤¿à¤°à¤¾" + ], + "HRK": [ + "HRK", + "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾à¤²à¥€ कà¥à¤¨à¤¾" + ], + "HTG": [ + "HTG", + "हैटियाली गà¥à¤°à¥à¤¡" + ], + "HUF": [ + "HUF", + "हङà¥à¤—ेरियन फोरिनà¥à¤Ÿ" + ], + "IDR": [ + "IDR", + "इणà¥à¤¡à¥‹à¤¨à¥‡à¤¶à¤¿à¤¯à¤¾à¤²à¥€ रूपियाà¤" + ], + "ILS": [ + "₪", + "इजरायली नयाठशेकेल" + ], + "INR": [ + "₹", + "भारतीय रूपिà¤à¤¯à¤¾" + ], + "IQD": [ + "IQD", + "इराकी डिनार" + ], + "IRR": [ + "IRR", + "इरानियाली रियाल" + ], + "ISK": [ + "ISK", + "आइसलà¥à¤¯à¤¾à¤£à¥à¤¡à¤¿à¤• कà¥à¤°à¥‹à¤¨à¤¾" + ], + "JMD": [ + "JMD", + "जमाइकाली डलर" + ], + "JOD": [ + "JOD", + "जोरà¥à¤¡à¤¾à¤¨à¤¿à¤¯à¤¾à¤²à¥€ डलर" + ], + "JPY": [ + "JPÂ¥", + "जापानी येन" + ], + "KES": [ + "KES", + "केनà¥à¤¯à¤¾à¤²à¥€ शिलिङ" + ], + "KGS": [ + "KGS", + "किरà¥à¤—िसà¥à¤¤à¤¾à¤¨à¥€ सोम" + ], + "KHR": [ + "KHR", + "कमà¥à¤¬à¥‹à¤¡à¤¿à¤¨à¥‡à¤¯à¤¾à¤²à¥€ रियल" + ], + "KMF": [ + "KMF", + "कोमोरियन फà¥à¤°à¤¾à¤¨à¥à¤•" + ], + "KPW": [ + "KPW", + "उतà¥à¤¤à¤° कोरियाली वन" + ], + "KRW": [ + "â‚©", + "दकà¥à¤·à¤¿à¤£ कोरियाली वन" + ], + "KWD": [ + "KWD", + "कà¥à¤µà¥‡à¤¤à¥€ डिनार" + ], + "KYD": [ + "KYD", + "केमà¥à¤¯à¤¾à¤¨ टापà¥à¤¹à¤°à¥‚का डलर" + ], + "KZT": [ + "KZT", + "काजाखसà¥à¤¤à¤¾à¤¨à¥€ टेनà¥à¤œ" + ], + "LAK": [ + "LAK", + "लाओशियन किप" + ], + "LBP": [ + "LBP", + "लेबनाली पाउनà¥à¤¡" + ], + "LKR": [ + "LKR", + "शà¥à¤°à¥€à¤²à¤™à¥à¤•ाली रूपिया" + ], + "LRD": [ + "LRD", + "लिबेरियाली डलर" + ], + "LTL": [ + "LTL", + "लिथà¥à¤¨à¤¿à¤¯à¤¾à¤²à¥€ लिटास" + ], + "LVL": [ + "LVL", + "लाटà¥à¤­à¤¿à¤¯à¤¾à¤²à¥€ लाटà¥à¤¸" + ], + "LYD": [ + "LYD", + "लिवियाली डिनार" + ], + "MAD": [ + "MAD", + "मोरोकà¥à¤•ाली डिरà¥â€Œà¤¹à¤¾à¤®" + ], + "MDL": [ + "MDL", + "मालà¥à¤¡à¥‹à¤­à¤¨ लेउ" + ], + "MGA": [ + "MGA", + "मालागासी à¤à¤°à¤¿à¤†à¤°à¥€" + ], + "MKD": [ + "MKD", + "मà¥à¤¯à¤¾à¤¸à¥‡à¤¡à¥‹à¤¨à¤¿à¤¯à¤¾à¤²à¥€ डेनार" + ], + "MMK": [ + "MMK", + "मà¥à¤¯à¤¾à¤¨à¥à¤®à¤¾ कà¥à¤¯à¤¾à¤Ÿ" + ], + "MNT": [ + "MNT", + "मङà¥à¤—ोलियाली टà¥à¤—à¥à¤°à¤¿à¤•" + ], + "MOP": [ + "MOP", + "माकानिज पटाका" + ], + "MRO": [ + "MRO", + "माउरिटानियानली औगà¥à¤‡à¤¯à¤¾" + ], + "MUR": [ + "MUR", + "माउरिटियन रूपी" + ], + "MVR": [ + "MVR", + "मालडिभियाली रूफियाà¤" + ], + "MWK": [ + "MWK", + "मलाविअन कà¥à¤µà¤¾à¤šà¤¾" + ], + "MXN": [ + "MX$", + "मेकà¥à¤¸à¤¿à¤•न पेसो" + ], + "MYR": [ + "MYR", + "मलेशियाली रिङà¥à¤—ेट" + ], + "MZN": [ + "MZN", + "मोजामà¥à¤µà¤¿à¤•न मेटिकल" + ], + "NAD": [ + "NAD", + "नामिबियन डलर" + ], + "NGN": [ + "NGN", + "नाइजेरियन नाइरा" + ], + "NIO": [ + "NIO", + "निकारागà¥à¤µà¤¾à¤¨ कोरà¥à¤¡à¥‹à¤µà¤¾" + ], + "NOK": [ + "NOK", + "नरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¾à¤²à¥€ कà¥à¤°à¥‹à¤¨" + ], + "NPR": [ + "नेरू", + "नेपाली रूपैयाà¤" + ], + "NZD": [ + "NZ$", + "नà¥à¤¯à¥‚जिलà¥à¤¯à¤¾à¤£à¥à¤¡ डलर" + ], + "OMR": [ + "OMR", + "ओमनी रियल" + ], + "PAB": [ + "PAB", + "पानामानियाली बालà¥à¤¬à¥‹à¤†" + ], + "PEN": [ + "PEN", + "पेरूभियाली नà¥à¤¯à¥‚भो सोल" + ], + "PGK": [ + "PGK", + "पपà¥à¤† नà¥à¤¯à¥‚ गिनियाली किना" + ], + "PHP": [ + "PHP", + "फिलिपिनी पेसो" + ], + "PKR": [ + "PKR", + "पाकिसà¥à¤¤à¤¾à¤¨à¥€ रूपियाà¤" + ], + "PLN": [ + "PLN", + "पोलिश जà¥à¤²à¥‹à¤Ÿà¤¾à¤ˆ" + ], + "PYG": [ + "PYG", + "पारागà¥à¤¯à¤¾à¤²à¥€ गà¥à¤°à¤¾à¤¨à¥€" + ], + "QAR": [ + "QAR", + "कतारी रियल" + ], + "RON": [ + "RON", + "रोमानियाली लेऊ" + ], + "RSD": [ + "RSD", + "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ डिनार" + ], + "RUB": [ + "RUB", + "रूसी रूबल" + ], + "RWF": [ + "RWF", + "रà¥â€Œà¤µà¤¾à¤£à¥à¤¡à¤¾à¤²à¥€ फà¥à¤°à¤¾à¤¨à¥à¤•" + ], + "SAR": [ + "SAR", + "साउदी रियालहरू" + ], + "SBD": [ + "SBD", + "सोलोमन टापà¥à¤¹à¤°à¥‚का डलर" + ], + "SCR": [ + "SCR", + "सेचेलोइस रूपी" + ], + "SDG": [ + "SDG", + "सà¥à¤¡à¤¾à¤¨à¥€ पाउनà¥à¤¡" + ], + "SEK": [ + "SEK", + "सà¥à¤µà¤¿à¤¡à¤¿à¤¶ कà¥à¤°à¥‹à¤¨à¤¾" + ], + "SGD": [ + "SGD", + "सिङà¥à¤—ापà¥à¤° डलर" + ], + "SHP": [ + "SHP", + "सेनà¥à¤Ÿ हेलेना पाउनà¥à¤¡" + ], + "SLL": [ + "SLL", + "सियरा लियोनेन लियोन" + ], + "SOS": [ + "SOS", + "सोमाली शिलिङ" + ], + "SRD": [ + "SRD", + "सà¥à¤°à¤¿à¤¨à¤¾à¤®à¤¿à¤œ डलर" + ], + "SSP": [ + "SSP", + "दकà¥à¤·à¤¿à¤£ सà¥à¤¡à¤¾à¤¨à¥€ पाउनà¥à¤¡" + ], + "STD": [ + "STD", + "साओ टोम र पà¥à¤°à¤¿à¤¨à¥à¤¸à¤¿à¤ª डोबà¥à¤°à¤¾" + ], + "SYP": [ + "SYP", + "सिरियाली पाउनà¥à¤¡" + ], + "SZL": [ + "SZL", + "सà¥à¤µà¤¾à¤œà¥€ लिलानà¥à¤—ेनी" + ], + "THB": [ + "฿", + "थाई भाट" + ], + "TJS": [ + "TJS", + "ताजिकà¥à¤¸à¥à¤¤à¤¾à¤¨à¥€ सोमोनी" + ], + "TMT": [ + "TMT", + "टà¥à¤°à¥à¤•à¥à¤®à¥‡à¤¨à¤¿à¤¸à¥à¤¤à¤¾à¤¨à¥€ मानात" + ], + "TND": [ + "TND", + "टà¥à¤¨à¤¿à¤¸à¤¿à¤¯à¤¾à¤²à¥€ डिनार" + ], + "TOP": [ + "TOP", + "टङà¥à¤—न पाङà¥à¤—ा" + ], + "TRY": [ + "TRY", + "टरà¥à¤•िश लिरा" + ], + "TTD": [ + "TTD", + "तà¥à¤°à¤¿à¤¨à¤¿à¤¡à¤¾à¤¡ र टोबागो डलर" + ], + "TWD": [ + "NT$", + "नयाठताइवान डलर" + ], + "TZS": [ + "TZS", + "ताञà¥à¤œà¤¾à¤¨à¤¿à¤¯à¤¾à¤²à¥€ शिलिङ" + ], + "UAH": [ + "UAH", + "यà¥à¤•à¥à¤°à¥‡à¤¨à¥€ हिरà¥à¤­à¤¿à¤¨à¤¿à¤¯à¤¾" + ], + "UGX": [ + "UGX", + "यà¥à¤—ाणà¥à¤¡à¤¾à¤²à¥€ शिलिङ" + ], + "USD": [ + "US$", + "अमेरिकी डलर" + ], + "UYU": [ + "UYU", + "उरूगà¥à¤µà¤¾à¤¯à¤¾à¤²à¥€ पेसो" + ], + "UZS": [ + "UZS", + "उजà¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨ सोम" + ], + "VEF": [ + "VEF", + "भेनेजà¥à¤à¤²à¤¨ बोलिभर" + ], + "VND": [ + "â‚«", + "भियतनामी डङà¥" + ], + "VUV": [ + "VUV", + "भानà¥à¤†à¤¤à¥‚ भातà¥" + ], + "WST": [ + "WST", + "सामोआन ताला" + ], + "XAF": [ + "FCFA", + "सीà¤à¤«à¥â€Œà¤ फà¥à¤°à¤¾à¤¨à¥à¤• बीइà¤à¤¸à¥€" + ], + "XCD": [ + "EC$", + "पूरà¥à¤µà¥€ कà¥à¤¯à¤¾à¤°à¤¿à¤¬à¤¿à¤¯à¤¨ डलर" + ], + "XOF": [ + "CFA", + "सीà¤à¤«à¥â€Œà¤ फà¥à¤°à¤¾à¤¨à¥à¤• बीसीइà¤à¤“" + ], + "XPF": [ + "CFPF", + "सीà¤à¤«à¥â€Œà¤ªà¥€ फà¥à¤°à¤¾à¤¨à¥à¤•" + ], + "YER": [ + "YER", + "येमेनी रियाल" + ], + "ZAR": [ + "ZAR", + "दकà¥à¤·à¤¿à¤£ अफà¥à¤°à¤¿à¤•ी रà¥â€à¤¯à¤¾à¤¨à¥à¤¡" + ], + "ZMK": [ + "ZMK", + "जामà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ कà¥à¤µà¤¾à¤šà¤¾ (१९६८–२०१२)" + ], + "ZMW": [ + "ZMW", + "जामà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ कà¥à¤µà¤¾à¤šà¤¾" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl.json new file mode 100644 index 0000000000000000000000000000000000000000..bd030b9bff83b53f2f79e64627e4328fdd632c65 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Andorrese peseta" + ], + "AED": [ + "AED", + "Verenigde Arabische Emiraten-dirham" + ], + "AFA": [ + "AFA", + "Afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "Afghaanse afghani" + ], + "ALK": [ + "ALK", + "Albanese lek (1946–1965)" + ], + "ALL": [ + "ALL", + "Albanese lek" + ], + "AMD": [ + "AMD", + "Armeense dram" + ], + "ANG": [ + "ANG", + "Nederlands-Antilliaanse gulden" + ], + "AOA": [ + "AOA", + "Angolese kwanza" + ], + "AOK": [ + "AOK", + "Angolese kwanza (1977–1990)" + ], + "AON": [ + "AON", + "Angolese nieuwe kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angolese kwanza reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentijnse austral" + ], + "ARL": [ + "ARL", + "Argentijnse peso ley (1970–1983)" + ], + "ARM": [ + "ARM", + "Argentijnse peso (1881–1970)" + ], + "ARP": [ + "ARP", + "Argentijnse peso (1983–1985)" + ], + "ARS": [ + "ARS", + "Argentijnse peso" + ], + "ATS": [ + "ATS", + "Oostenrijkse schilling" + ], + "AUD": [ + "AU$", + "Australische dollar" + ], + "AWG": [ + "AWG", + "Arubaanse gulden" + ], + "AZM": [ + "AZM", + "Azerbeidzjaanse manat (1993–2006)" + ], + "AZN": [ + "AZN", + "Azerbeidzjaanse manat" + ], + "BAD": [ + "BAD", + "Bosnische dinar" + ], + "BAM": [ + "BAM", + "Bosnische convertibele mark" + ], + "BAN": [ + "BAN", + "Nieuwe Bosnische dinar (1994–1997)" + ], + "BBD": [ + "BBD", + "Barbadaanse dollar" + ], + "BDT": [ + "BDT", + "Bengalese taka" + ], + "BEC": [ + "BEC", + "Belgische frank (convertibel)" + ], + "BEF": [ + "BEF", + "Belgische frank" + ], + "BEL": [ + "BEL", + "Belgische frank (financieel)" + ], + "BGL": [ + "BGL", + "Bulgaarse harde lev" + ], + "BGM": [ + "BGM", + "Bulgaarse socialistische lev" + ], + "BGN": [ + "BGN", + "Bulgaarse lev" + ], + "BGO": [ + "BGO", + "Bulgaarse lev (1879–1952)" + ], + "BHD": [ + "BHD", + "Bahreinse dinar" + ], + "BIF": [ + "BIF", + "Burundese frank" + ], + "BMD": [ + "BMD", + "Bermuda-dollar" + ], + "BND": [ + "BND", + "Bruneise dollar" + ], + "BOB": [ + "BOB", + "Boliviaanse boliviano" + ], + "BOL": [ + "BOL", + "Boliviaanse boliviano (1863–1963)" + ], + "BOP": [ + "BOP", + "Boliviaanse peso" + ], + "BOV": [ + "BOV", + "Boliviaanse mvdol" + ], + "BRB": [ + "BRB", + "Braziliaanse cruzeiro novo (1967–1986)" + ], + "BRC": [ + "BRC", + "Braziliaanse cruzado" + ], + "BRE": [ + "BRE", + "Braziliaanse cruzeiro (1990–1993)" + ], + "BRL": [ + "R$", + "Braziliaanse real" + ], + "BRN": [ + "BRN", + "Braziliaanse cruzado novo" + ], + "BRR": [ + "BRR", + "Braziliaanse cruzeiro" + ], + "BRZ": [ + "BRZ", + "Braziliaanse cruzeiro (1942–1967)" + ], + "BSD": [ + "BSD", + "Bahamaanse dollar" + ], + "BTN": [ + "BTN", + "Bhutaanse ngultrum" + ], + "BUK": [ + "BUK", + "Birmese kyat" + ], + "BWP": [ + "BWP", + "Botswaanse pula" + ], + "BYB": [ + "BYB", + "Wit-Russische nieuwe roebel (1994–1999)" + ], + "BYN": [ + "BYN", + "Wit-Russische roebel" + ], + "BYR": [ + "BYR", + "Wit-Russische roebel (2000–2016)" + ], + "BZD": [ + "BZD", + "Belizaanse dollar" + ], + "CAD": [ + "C$", + "Canadese dollar" + ], + "CDF": [ + "CDF", + "Congolese frank" + ], + "CHE": [ + "CHE", + "WIR euro" + ], + "CHF": [ + "CHF", + "Zwitserse frank" + ], + "CHW": [ + "CHW", + "WIR franc" + ], + "CLE": [ + "CLE", + "Chileense escudo" + ], + "CLF": [ + "CLF", + "Chileense unidades de fomento" + ], + "CLP": [ + "CLP", + "Chileense peso" + ], + "CNX": [ + "CNX", + "dollar van de Chinese Volksbank" + ], + "CNY": [ + "CNÂ¥", + "Chinese renminbi" + ], + "COP": [ + "COP", + "Colombiaanse peso" + ], + "COU": [ + "COU", + "Unidad de Valor Real" + ], + "CRC": [ + "CRC", + "Costa Ricaanse colon" + ], + "CSD": [ + "CSD", + "Oude Servische dinar" + ], + "CSK": [ + "CSK", + "Tsjechoslowaakse harde koruna" + ], + "CUC": [ + "CUC", + "Cubaanse convertibele peso" + ], + "CUP": [ + "CUP", + "Cubaanse peso" + ], + "CVE": [ + "CVE", + "Kaapverdische escudo" + ], + "CYP": [ + "CYP", + "Cyprisch pond" + ], + "CZK": [ + "CZK", + "Tsjechische kroon" + ], + "DDM": [ + "DDM", + "Oost-Duitse ostmark" + ], + "DEM": [ + "DEM", + "Duitse mark" + ], + "DJF": [ + "DJF", + "Djiboutiaanse frank" + ], + "DKK": [ + "DKK", + "Deense kroon" + ], + "DOP": [ + "DOP", + "Dominicaanse peso" + ], + "DZD": [ + "DZD", + "Algerijnse dinar" + ], + "ECS": [ + "ECS", + "Ecuadoraanse sucre" + ], + "ECV": [ + "ECV", + "Ecuadoraanse unidad de valor constante (UVC)" + ], + "EEK": [ + "EEK", + "Estlandse kroon" + ], + "EGP": [ + "EGP", + "Egyptisch pond" + ], + "ERN": [ + "ERN", + "Eritrese nakfa" + ], + "ESA": [ + "ESA", + "Spaanse peseta (account A)" + ], + "ESB": [ + "ESB", + "Spaanse peseta (convertibele account)" + ], + "ESP": [ + "ESP", + "Spaanse peseta" + ], + "ETB": [ + "ETB", + "Ethiopische birr" + ], + "EUR": [ + "€", + "Euro" + ], + "FIM": [ + "FIM", + "Finse markka" + ], + "FJD": [ + "FJ$", + "Fiji-dollar" + ], + "FKP": [ + "FKP", + "Falklandeilands pond" + ], + "FRF": [ + "FRF", + "Franse franc" + ], + "GBP": [ + "£", + "Brits pond" + ], + "GEK": [ + "GEK", + "Georgische kupon larit" + ], + "GEL": [ + "GEL", + "Georgische lari" + ], + "GHC": [ + "GHC", + "Ghanese cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "Ghanese cedi" + ], + "GIP": [ + "GIP", + "Gibraltarees pond" + ], + "GMD": [ + "GMD", + "Gambiaanse dalasi" + ], + "GNF": [ + "GNF", + "Guinese frank" + ], + "GNS": [ + "GNS", + "Guinese syli" + ], + "GQE": [ + "GQE", + "Equatoriaal-Guinese ekwele guineana" + ], + "GRD": [ + "GRD", + "Griekse drachme" + ], + "GTQ": [ + "GTQ", + "Guatemalteekse quetzal" + ], + "GWE": [ + "GWE", + "Portugees-Guinese escudo" + ], + "GWP": [ + "GWP", + "Guinee-Bissause peso" + ], + "GYD": [ + "GYD", + "Guyaanse dollar" + ], + "HKD": [ + "HK$", + "Hongkongse dollar" + ], + "HNL": [ + "HNL", + "Hondurese lempira" + ], + "HRD": [ + "HRD", + "Kroatische dinar" + ], + "HRK": [ + "HRK", + "Kroatische kuna" + ], + "HTG": [ + "HTG", + "Haïtiaanse gourde" + ], + "HUF": [ + "HUF", + "Hongaarse forint" + ], + "IDR": [ + "IDR", + "Indonesische roepia" + ], + "IEP": [ + "IEP", + "Iers pond" + ], + "ILP": [ + "ILP", + "Israëlisch pond" + ], + "ILR": [ + "ILR", + "Israëlische sjekel (1980–1985)" + ], + "ILS": [ + "₪", + "Israëlische nieuwe shekel" + ], + "INR": [ + "₹", + "Indiase roepie" + ], + "IQD": [ + "IQD", + "Iraakse dinar" + ], + "IRR": [ + "IRR", + "Iraanse rial" + ], + "ISJ": [ + "ISJ", + "IJslandse kroon (1918–1981)" + ], + "ISK": [ + "ISK", + "IJslandse kroon" + ], + "ITL": [ + "ITL", + "Italiaanse lire" + ], + "JMD": [ + "JMD", + "Jamaicaanse dollar" + ], + "JOD": [ + "JOD", + "Jordaanse dinar" + ], + "JPY": [ + "JPÂ¥", + "Japanse yen" + ], + "KES": [ + "KES", + "Keniaanse shilling" + ], + "KGS": [ + "KGS", + "Kirgizische som" + ], + "KHR": [ + "KHR", + "Cambodjaanse riel" + ], + "KMF": [ + "KMF", + "Comorese frank" + ], + "KPW": [ + "KPW", + "Noord-Koreaanse won" + ], + "KRH": [ + "KRH", + "Zuid-Koreaanse hwan (1953–1962)" + ], + "KRO": [ + "KRO", + "Oude Zuid-Koreaanse won (1945–1953)" + ], + "KRW": [ + "â‚©", + "Zuid-Koreaanse won" + ], + "KWD": [ + "KWD", + "Koeweitse dinar" + ], + "KYD": [ + "KYD", + "Kaaimaneilandse dollar" + ], + "KZT": [ + "KZT", + "Kazachse tenge" + ], + "LAK": [ + "LAK", + "Laotiaanse kip" + ], + "LBP": [ + "LBP", + "Libanees pond" + ], + "LKR": [ + "LKR", + "Sri Lankaanse roepie" + ], + "LRD": [ + "LRD", + "Liberiaanse dollar" + ], + "LSL": [ + "LSL", + "Lesothaanse loti" + ], + "LTL": [ + "LTL", + "Litouwse litas" + ], + "LTT": [ + "LTT", + "Litouwse talonas" + ], + "LUC": [ + "LUC", + "Luxemburgse convertibele franc" + ], + "LUF": [ + "LUF", + "Luxemburgse frank" + ], + "LUL": [ + "LUL", + "Luxemburgse financiële franc" + ], + "LVL": [ + "LVL", + "Letse lats" + ], + "LVR": [ + "LVR", + "Letse roebel" + ], + "LYD": [ + "LYD", + "Libische dinar" + ], + "MAD": [ + "MAD", + "Marokkaanse dirham" + ], + "MAF": [ + "MAF", + "Marokkaanse franc" + ], + "MCF": [ + "MCF", + "Monegaskische frank" + ], + "MDC": [ + "MDC", + "Moldavische cupon" + ], + "MDL": [ + "MDL", + "Moldavische leu" + ], + "MGA": [ + "MGA", + "Malagassische ariary" + ], + "MGF": [ + "MGF", + "Malagassische franc" + ], + "MKD": [ + "MKD", + "Macedonische denar" + ], + "MKN": [ + "MKN", + "Macedonische denar (1992–1993)" + ], + "MLF": [ + "MLF", + "Malinese franc" + ], + "MMK": [ + "MMK", + "Myanmarese kyat" + ], + "MNT": [ + "MNT", + "Mongoolse tugrik" + ], + "MOP": [ + "MOP", + "Macause pataca" + ], + "MRO": [ + "MRO", + "Mauritaanse ouguiya" + ], + "MTL": [ + "MTL", + "Maltese lire" + ], + "MTP": [ + "MTP", + "Maltees pond" + ], + "MUR": [ + "MUR", + "Mauritiaanse roepie" + ], + "MVP": [ + "MVP", + "Maldivische roepie" + ], + "MVR": [ + "MVR", + "Maldivische rufiyaa" + ], + "MWK": [ + "MWK", + "Malawische kwacha" + ], + "MXN": [ + "MX$", + "Mexicaanse peso" + ], + "MXP": [ + "MXP", + "Mexicaanse zilveren peso (1861–1992)" + ], + "MXV": [ + "MXV", + "Mexicaanse unidad de inversion (UDI)" + ], + "MYR": [ + "MYR", + "Maleisische ringgit" + ], + "MZE": [ + "MZE", + "Mozambikaanse escudo" + ], + "MZM": [ + "MZM", + "Oude Mozambikaanse metical" + ], + "MZN": [ + "MZN", + "Mozambikaanse metical" + ], + "NAD": [ + "NAD", + "Namibische dollar" + ], + "NGN": [ + "NGN", + "Nigeriaanse naira" + ], + "NIC": [ + "NIC", + "Nicaraguaanse córdoba (1988–1991)" + ], + "NIO": [ + "NIO", + "Nicaraguaanse córdoba" + ], + "NLG": [ + "NLG", + "Nederlandse gulden" + ], + "NOK": [ + "NOK", + "Noorse kroon" + ], + "NPR": [ + "NPR", + "Nepalese roepie" + ], + "NZD": [ + "NZ$", + "Nieuw-Zeelandse dollar" + ], + "OMR": [ + "OMR", + "Omaanse rial" + ], + "PAB": [ + "PAB", + "Panamese balboa" + ], + "PEI": [ + "PEI", + "Peruaanse inti" + ], + "PEN": [ + "PEN", + "Peruaanse nieuwe sol" + ], + "PES": [ + "PES", + "Peruaanse sol" + ], + "PGK": [ + "PGK", + "Papoea-Nieuw-Guinese kina" + ], + "PHP": [ + "PHP", + "Filipijnse peso" + ], + "PKR": [ + "PKR", + "Pakistaanse roepie" + ], + "PLN": [ + "PLN", + "Poolse zloty" + ], + "PLZ": [ + "PLZ", + "Poolse zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugese escudo" + ], + "PYG": [ + "PYG", + "Paraguayaanse guarani" + ], + "QAR": [ + "QAR", + "Qatarese rial" + ], + "RHD": [ + "RHD", + "Rhodesische dollar" + ], + "ROL": [ + "ROL", + "Oude Roemeense leu" + ], + "RON": [ + "RON", + "Roemeense leu" + ], + "RSD": [ + "RSD", + "Servische dinar" + ], + "RUB": [ + "RUB", + "Russische roebel" + ], + "RUR": [ + "RUR", + "Russische roebel (1991–1998)" + ], + "RWF": [ + "RWF", + "Rwandese frank" + ], + "SAR": [ + "SAR", + "Saoedi-Arabische riyal" + ], + "SBD": [ + "SI$", + "Salomon-dollar" + ], + "SCR": [ + "SCR", + "Seychelse roepie" + ], + "SDD": [ + "SDD", + "Soedanese dinar" + ], + "SDG": [ + "SDG", + "Soedanees pond" + ], + "SDP": [ + "SDP", + "Soedanees pond (1957–1998)" + ], + "SEK": [ + "SEK", + "Zweedse kroon" + ], + "SGD": [ + "SGD", + "Singaporese dollar" + ], + "SHP": [ + "SHP", + "Sint-Heleens pond" + ], + "SIT": [ + "SIT", + "Sloveense tolar" + ], + "SKK": [ + "SKK", + "Slowaakse koruna" + ], + "SLL": [ + "SLL", + "Sierraleoonse leone" + ], + "SOS": [ + "SOS", + "Somalische shilling" + ], + "SRD": [ + "SRD", + "Surinaamse dollar" + ], + "SRG": [ + "SRG", + "Surinaamse gulden" + ], + "SSP": [ + "SSP", + "Zuid-Soedanees pond" + ], + "STD": [ + "STD", + "Santomese dobra" + ], + "SUR": [ + "SUR", + "Sovjet-roebel" + ], + "SVC": [ + "SVC", + "Salvadoraanse colón" + ], + "SYP": [ + "SYP", + "Syrisch pond" + ], + "SZL": [ + "SZL", + "Swazische lilangeni" + ], + "THB": [ + "฿", + "Thaise baht" + ], + "TJR": [ + "TJR", + "Tadzjikistaanse roebel" + ], + "TJS": [ + "TJS", + "Tadzjiekse somoni" + ], + "TMM": [ + "TMM", + "Turkmeense manat (1993–2009)" + ], + "TMT": [ + "TMT", + "Turkmeense manat" + ], + "TND": [ + "TND", + "Tunesische dinar" + ], + "TOP": [ + "TOP", + "Tongaanse paÊ»anga" + ], + "TPE": [ + "TPE", + "Timorese escudo" + ], + "TRL": [ + "TRL", + "Turkse lire" + ], + "TRY": [ + "TRY", + "Turkse lira" + ], + "TTD": [ + "TTD", + "Trinidad en Tobago-dollar" + ], + "TWD": [ + "NT$", + "Nieuwe Taiwanese dollar" + ], + "TZS": [ + "TZS", + "Tanzaniaanse shilling" + ], + "UAH": [ + "UAH", + "Oekraïense hryvnia" + ], + "UAK": [ + "UAK", + "Oekraïense karbovanetz" + ], + "UGS": [ + "UGS", + "Oegandese shilling (1966–1987)" + ], + "UGX": [ + "UGX", + "Oegandese shilling" + ], + "USD": [ + "US$", + "Amerikaanse dollar" + ], + "USN": [ + "USN", + "Amerikaanse dollar (volgende dag)" + ], + "USS": [ + "USS", + "Amerikaanse dollar (zelfde dag)" + ], + "UYI": [ + "UYI", + "Uruguayaanse peso en geïndexeerde eenheden" + ], + "UYP": [ + "UYP", + "Uruguayaanse peso (1975–1993)" + ], + "UYU": [ + "UYU", + "Uruguayaanse peso" + ], + "UZS": [ + "UZS", + "Oezbeekse sum" + ], + "VEB": [ + "VEB", + "Venezolaanse bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "Venezolaanse bolivar" + ], + "VND": [ + "â‚«", + "Vietnamese dong" + ], + "VNN": [ + "VNN", + "Vietnamese dong (1978–1985)" + ], + "VUV": [ + "VUV", + "Vanuatuaanse vatu" + ], + "WST": [ + "WST", + "Samoaanse tala" + ], + "XAF": [ + "FCFA", + "CFA-frank" + ], + "XCD": [ + "EC$", + "Oost-Caribische dollar" + ], + "XEU": [ + "XEU", + "European Currency Unit" + ], + "XFO": [ + "XFO", + "Franse gouden franc" + ], + "XFU": [ + "XFU", + "Franse UIC-franc" + ], + "XOF": [ + "CFA", + "CFA-franc BCEAO" + ], + "XPF": [ + "XPF", + "CFP-frank" + ], + "XRE": [ + "XRE", + "RINET-fondsen" + ], + "YDD": [ + "YDD", + "Jemenitische dinar" + ], + "YER": [ + "YER", + "Jemenitische rial" + ], + "YUD": [ + "YUD", + "Joegoslavische harde dinar" + ], + "YUM": [ + "YUM", + "Joegoslavische noviy-dinar" + ], + "YUN": [ + "YUN", + "Joegoslavische convertibele dinar" + ], + "YUR": [ + "YUR", + "Joegoslavische hervormde dinar (1992–1993)" + ], + "ZAL": [ + "ZAL", + "Zuid-Afrikaanse rand (financieel)" + ], + "ZAR": [ + "ZAR", + "Zuid-Afrikaanse rand" + ], + "ZMK": [ + "ZMK", + "Zambiaanse kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambiaanse kwacha" + ], + "ZRN": [ + "ZRN", + "Zaïrese nieuwe zaïre" + ], + "ZRZ": [ + "ZRZ", + "Zaïrese zaïre" + ], + "ZWD": [ + "ZWD", + "Zimbabwaanse dollar" + ], + "ZWL": [ + "ZWL", + "Zimbabwaanse dollar (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabwaanse dollar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_AW.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_AW.json new file mode 100644 index 0000000000000000000000000000000000000000..4c726ec0393b98b3b76e3736a09d2bb41d2f734f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_AW.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AWG": [ + "Afl.", + "Arubaanse gulden" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_BQ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_BQ.json new file mode 100644 index 0000000000000000000000000000000000000000..181f0f26397787fb8a217b41bee25f1bec016d6a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_BQ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "USD": [ + "$", + "Amerikaanse dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_CW.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_CW.json new file mode 100644 index 0000000000000000000000000000000000000000..0fa1277d7912a7c27e37586872880be9e3a703c6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_CW.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ANG": [ + "NAf.", + "Nederlands-Antilliaanse gulden" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_SR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_SR.json new file mode 100644 index 0000000000000000000000000000000000000000..8867f13f220af506ec51fb3ec9016edc5e8e398a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_SR.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "SRD": [ + "$", + "Surinaamse dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_SX.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_SX.json new file mode 100644 index 0000000000000000000000000000000000000000..0fa1277d7912a7c27e37586872880be9e3a703c6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nl_SX.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ANG": [ + "NAf.", + "Nederlands-Antilliaanse gulden" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nn.json new file mode 100644 index 0000000000000000000000000000000000000000..929be73d0d36bb6a293e6b72015499c9d91af257 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/nn.json @@ -0,0 +1,1045 @@ +{ + "Version": "2.1.28.76", + "Names": { + "ADP": [ + "ADP", + "andorransk peseta" + ], + "AED": [ + "AED", + "UAE dirham" + ], + "AFA": [ + "AFA", + "afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "afghani" + ], + "ALL": [ + "ALL", + "albansk lek" + ], + "AMD": [ + "AMD", + "armensk dram" + ], + "ANG": [ + "ANG", + "nederlansk antillegylden" + ], + "AOA": [ + "AOA", + "angolsk kwanza" + ], + "AOK": [ + "AOK", + "angolsk kwanza (1977–1990)" + ], + "AON": [ + "AON", + "angolsk ny kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "angolsk kwanza reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "argentisk austral" + ], + "ARP": [ + "ARP", + "argentinsk peso (1983–1985)" + ], + "ARS": [ + "ARS", + "argentinsk peso" + ], + "ATS": [ + "ATS", + "austerriksk schilling" + ], + "AUD": [ + "A$", + "australsk dollar" + ], + "AWG": [ + "AWG", + "arubisk gylden" + ], + "AZM": [ + "AZM", + "aserbaijansk manat" + ], + "AZN": [ + "AZN", + "aserbajdsjansk manat" + ], + "BAD": [ + "BAD", + "bosnisk-hercegovinsk dinar" + ], + "BAM": [ + "BAM", + "bosnisk-hercegovinsk mark (konvertibel)" + ], + "BBD": [ + "BBD", + "barbadisk dollar" + ], + "BDT": [ + "BDT", + "bangladeshisk taka" + ], + "BEC": [ + "BEC", + "belgisk franc (konvertibel)" + ], + "BEF": [ + "BEF", + "belgisk franc" + ], + "BEL": [ + "BEL", + "belgisk franc (finansiell)" + ], + "BGL": [ + "BGL", + "bulgarsk hard lev" + ], + "BGN": [ + "BGN", + "bulgarsk ny lev" + ], + "BHD": [ + "BHD", + "bahrainsk dinar" + ], + "BIF": [ + "BIF", + "burundisk franc" + ], + "BMD": [ + "BMD", + "bermudisk dollar" + ], + "BND": [ + "BND", + "bruneisk dollar" + ], + "BOB": [ + "BOB", + "boliviano" + ], + "BOP": [ + "BOP", + "bolivisk peso" + ], + "BOV": [ + "BOV", + "bolivisk mvdol" + ], + "BRB": [ + "BRB", + "brasiliansk cruzeiro novo (1967–1986)" + ], + "BRC": [ + "BRC", + "brasiliansk cruzado" + ], + "BRE": [ + "BRE", + "brasiliansk cruzeiro (1990–1993)" + ], + "BRL": [ + "R$", + "brasiliansk real" + ], + "BRN": [ + "BRN", + "brasiliansk cruzado novo" + ], + "BRR": [ + "BRR", + "brasiliansk cruzeiro" + ], + "BSD": [ + "BSD", + "bahamisk dollar" + ], + "BTN": [ + "BTN", + "bhutansk ngultrum" + ], + "BUK": [ + "BUK", + "burmesisk kyat" + ], + "BWP": [ + "BWP", + "botswansk pula" + ], + "BYB": [ + "BYB", + "kviterussisk ny rubel (1994–1999)" + ], + "BYN": [ + "BYN", + "kviterussisk rubel" + ], + "BYR": [ + "BYR", + "kviterussisk rubel (2000–2016)" + ], + "BZD": [ + "BZD", + "belizisk dollar" + ], + "CAD": [ + "CA$", + "kanadisk dollar" + ], + "CDF": [ + "CDF", + "kongolesisk franc" + ], + "CHE": [ + "CHE", + "WIR euro" + ], + "CHF": [ + "CHF", + "sveitsisk franc" + ], + "CHW": [ + "CHW", + "WIR franc" + ], + "CLF": [ + "CLF", + "chilensk unidades de fomento" + ], + "CLP": [ + "CLP", + "chilensk peso" + ], + "CNY": [ + "CNÂ¥", + "kinesisk yuan renminbi" + ], + "COP": [ + "COP", + "colombiansk peso" + ], + "COU": [ + "COU", + "unidad de valor real" + ], + "CRC": [ + "CRC", + "costaricansk colon" + ], + "CSD": [ + "CSD", + "gammal serbisk dinar" + ], + "CSK": [ + "CSK", + "tsjekkoslovakisk koruna (hard)" + ], + "CUP": [ + "CUP", + "kubansk peso" + ], + "CVE": [ + "CVE", + "kappverdisk escudo" + ], + "CYP": [ + "CYP", + "kypriotisk pund" + ], + "CZK": [ + "CZK", + "tsjekkisk koruna" + ], + "DDM": [ + "DDM", + "austtysk mark" + ], + "DEM": [ + "DEM", + "tysk mark" + ], + "DJF": [ + "DJF", + "djiboutisk franc" + ], + "DKK": [ + "DKK", + "dansk krone" + ], + "DOP": [ + "DOP", + "dominikansk peso" + ], + "DZD": [ + "DZD", + "algerisk dinar" + ], + "ECS": [ + "ECS", + "ecuadoriansk sucre" + ], + "ECV": [ + "ECV", + "ecuadoriansk unidad de valor constante (UVC)" + ], + "EEK": [ + "EEK", + "estisk kroon" + ], + "EGP": [ + "EGP", + "egyptisk pund" + ], + "ERN": [ + "ERN", + "eritreisk nakfa" + ], + "ESA": [ + "ESA", + "spansk peseta (A–konto)" + ], + "ESB": [ + "ESB", + "spansk peseta (konvertibel konto)" + ], + "ESP": [ + "ESP", + "spansk peseta" + ], + "ETB": [ + "ETB", + "etiopisk birr" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "finsk mark" + ], + "FJD": [ + "FJD", + "fijiansk dollar" + ], + "FKP": [ + "FKP", + "Falkland-pund" + ], + "FRF": [ + "FRF", + "fransk franc" + ], + "GBP": [ + "£", + "britisk pund" + ], + "GEK": [ + "GEK", + "georgisk kupon larit" + ], + "GEL": [ + "GEL", + "georgisk lari" + ], + "GHC": [ + "GHC", + "ghanesisk cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "ghanesisk cedi" + ], + "GIP": [ + "GIP", + "gibraltarsk pund" + ], + "GMD": [ + "GMD", + "gambisk dalasi" + ], + "GNF": [ + "GNF", + "guineansk franc" + ], + "GNS": [ + "GNS", + "guineansk syli" + ], + "GQE": [ + "GQE", + "ekvatorialguineansk ekwele guineana" + ], + "GRD": [ + "GRD", + "gresk drakme" + ], + "GTQ": [ + "GTQ", + "guatemalansk quetzal" + ], + "GWE": [ + "GWE", + "portugisisk guinea escudo" + ], + "GWP": [ + "GWP", + "Guinea-Bissau-peso" + ], + "GYD": [ + "GYD", + "guyansk dollar" + ], + "HKD": [ + "HK$", + "Hongkong-dollar" + ], + "HNL": [ + "HNL", + "honduransk lempira" + ], + "HRD": [ + "HRD", + "kroatisk dinar" + ], + "HRK": [ + "HRK", + "kroatisk kuna" + ], + "HTG": [ + "HTG", + "haitisk gourde" + ], + "HUF": [ + "HUF", + "ungarsk forint" + ], + "IDR": [ + "IDR", + "indonesisk rupi" + ], + "IEP": [ + "IEP", + "irsk pund" + ], + "ILP": [ + "ILP", + "israelsk pund" + ], + "ILS": [ + "₪", + "israelsk ny shekel" + ], + "INR": [ + "₹", + "indisk rupi" + ], + "IQD": [ + "IQD", + "iraksk dinar" + ], + "IRR": [ + "IRR", + "iransk rial" + ], + "ISK": [ + "ISK", + "islandsk krone" + ], + "ITL": [ + "ITL", + "italiensk lire" + ], + "JMD": [ + "JMD", + "jamaikansk dollar" + ], + "JOD": [ + "JOD", + "jordansk dinar" + ], + "JPY": [ + "JPÂ¥", + "japansk yen" + ], + "KES": [ + "KES", + "kenyansk shilling" + ], + "KGS": [ + "KGS", + "kirgisisk som" + ], + "KHR": [ + "KHR", + "kambodsjansk riel" + ], + "KMF": [ + "KMF", + "komorisk franc" + ], + "KPW": [ + "KPW", + "nordkoreansk won" + ], + "KRW": [ + "â‚©", + "sørkoreansk won" + ], + "KWD": [ + "KWD", + "kuwaitisk dinar" + ], + "KYD": [ + "KYD", + "caymansk dollar" + ], + "KZT": [ + "KZT", + "kasakhstansk tenge" + ], + "LAK": [ + "LAK", + "laotisk kip" + ], + "LBP": [ + "LBP", + "libanesisk pund" + ], + "LKR": [ + "LKR", + "srilankisk rupi" + ], + "LRD": [ + "LRD", + "liberisk dollar" + ], + "LSL": [ + "LSL", + "lesothisk loti" + ], + "LTL": [ + "LTL", + "litauisk lita" + ], + "LTT": [ + "LTT", + "litauisk talona" + ], + "LUC": [ + "LUC", + "luxemburgsk konvertibel franc" + ], + "LUF": [ + "LUF", + "luxemburgsk franc" + ], + "LUL": [ + "LUL", + "luxemburgsk finansiell franc" + ], + "LVL": [ + "LVL", + "latvisk lat" + ], + "LVR": [ + "LVR", + "latvisk rubel" + ], + "LYD": [ + "LYD", + "libysk dinar" + ], + "MAD": [ + "MAD", + "marokkansk dirham" + ], + "MAF": [ + "MAF", + "marokkansk franc" + ], + "MDL": [ + "MDL", + "moldovsk leu" + ], + "MGA": [ + "MGA", + "madagassisk ariary" + ], + "MGF": [ + "MGF", + "madagassisk franc" + ], + "MKD": [ + "MKD", + "makedonsk denar" + ], + "MLF": [ + "MLF", + "malisk franc" + ], + "MMK": [ + "MMK", + "myanmarsk kyat" + ], + "MNT": [ + "MNT", + "mongolsk tugrik" + ], + "MOP": [ + "MOP", + "makaosk pataca" + ], + "MRO": [ + "MRO", + "mauritansk ouguiya" + ], + "MTL": [ + "MTL", + "maltesisk lira" + ], + "MTP": [ + "MTP", + "maltesisk pund" + ], + "MUR": [ + "MUR", + "mauritansk rupi" + ], + "MVR": [ + "MVR", + "maldivisk rufiyaa" + ], + "MWK": [ + "MWK", + "malawisk kwacha" + ], + "MXN": [ + "MX$", + "meksikansk peso" + ], + "MXP": [ + "MXP", + "meksikansk sølvpeso (1861–1992)" + ], + "MXV": [ + "MXV", + "meksikansk unidad de inversion (UDI)" + ], + "MYR": [ + "MYR", + "malaysisk ringgit" + ], + "MZE": [ + "MZE", + "mosambikisk escudo" + ], + "MZM": [ + "MZM", + "gammal mosambikisk metical" + ], + "MZN": [ + "MZN", + "mosambikisk metical" + ], + "NAD": [ + "NAD", + "namibisk dollar" + ], + "NGN": [ + "NGN", + "nigeriansk naira" + ], + "NIC": [ + "NIC", + "nicaraguansk cordoba" + ], + "NIO": [ + "NIO", + "nicaraguansk cordoba oro" + ], + "NLG": [ + "NLG", + "nederlandsk gylden" + ], + "NOK": [ + "kr", + "norsk krone" + ], + "NPR": [ + "NPR", + "nepalsk rupi" + ], + "NZD": [ + "NZ$", + "new zealandsk dollar" + ], + "OMR": [ + "OMR", + "omansk rial" + ], + "PAB": [ + "PAB", + "panamansk balboa" + ], + "PEI": [ + "PEI", + "peruansk inti" + ], + "PEN": [ + "PEN", + "peruansk nuevo sol" + ], + "PES": [ + "PES", + "peruansk sol" + ], + "PGK": [ + "PGK", + "papuansk kina" + ], + "PHP": [ + "PHP", + "filippinsk peso" + ], + "PKR": [ + "PKR", + "pakistansk rupi" + ], + "PLN": [ + "PLN", + "polsk zloty" + ], + "PLZ": [ + "PLZ", + "polsk zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "portugisisk escudo" + ], + "PYG": [ + "PYG", + "paraguayansk guarani" + ], + "QAR": [ + "QAR", + "qatarsk rial" + ], + "RHD": [ + "RHD", + "rhodesisk dollar" + ], + "ROL": [ + "ROL", + "gammal rumensk leu" + ], + "RON": [ + "RON", + "rumensk leu" + ], + "RSD": [ + "RSD", + "serbisk dinar" + ], + "RUB": [ + "RUB", + "russisk rubel" + ], + "RUR": [ + "RUR", + "russisk rubel (1991–1998)" + ], + "RWF": [ + "RWF", + "rwandisk franc" + ], + "SAR": [ + "SAR", + "saudiarabisk rial" + ], + "SBD": [ + "SBD", + "salomonsk dollar" + ], + "SCR": [ + "SCR", + "seychellisk rupi" + ], + "SDD": [ + "SDD", + "gammal sudanesisk dinar" + ], + "SDG": [ + "SDG", + "sudansk pund" + ], + "SDP": [ + "SDP", + "gammalt sudanesisk pund" + ], + "SEK": [ + "SEK", + "svensk krone" + ], + "SGD": [ + "SGD", + "singaporsk dollar" + ], + "SHP": [ + "SHP", + "sankthelensk pund" + ], + "SIT": [ + "SIT", + "slovensk tolar" + ], + "SKK": [ + "SKK", + "slovakisk koruna" + ], + "SLL": [ + "SLL", + "sierraleonsk leone" + ], + "SOS": [ + "SOS", + "somalisk shilling" + ], + "SRD": [ + "SRD", + "surinamsk dollar" + ], + "SRG": [ + "SRG", + "surinamsk gylden" + ], + "STD": [ + "STD", + "Sao Tome og Principe-dobra" + ], + "SUR": [ + "SUR", + "sovjetisk rubel" + ], + "SVC": [ + "SVC", + "salvadoransk colon" + ], + "SYP": [ + "SYP", + "syrisk pund" + ], + "SZL": [ + "SZL", + "swazilandsk lilangeni" + ], + "THB": [ + "THB", + "thailandsk baht" + ], + "TJR": [ + "TJR", + "tadsjikisk rubel" + ], + "TJS": [ + "TJS", + "tadsjikisk somoni" + ], + "TMM": [ + "TMM", + "turkmensk manat" + ], + "TND": [ + "TND", + "tunisisk dinar" + ], + "TOP": [ + "TOP", + "tongansk paÊ»anga" + ], + "TPE": [ + "TPE", + "timoresisk escudo" + ], + "TRL": [ + "TRL", + "gammal tyrkiske lire" + ], + "TRY": [ + "TRY", + "tyrkisk lire" + ], + "TTD": [ + "TTD", + "trinidadisk dollar" + ], + "TWD": [ + "NT$", + "taiwansk ny dollar" + ], + "TZS": [ + "TZS", + "tanzaniansk shilling" + ], + "UAH": [ + "UAH", + "ukrainsk hryvnia" + ], + "UAK": [ + "UAK", + "ukrainsk karbovanetz" + ], + "UGS": [ + "UGS", + "ugandisk shilling (1966–1987)" + ], + "UGX": [ + "UGX", + "ugandisk shilling" + ], + "USD": [ + "US$", + "amerikansk dollar" + ], + "USN": [ + "USN", + "amerikansk dollar (neste dag)" + ], + "USS": [ + "USS", + "amerikansk dollar (same dag)" + ], + "UYI": [ + "UYI", + "uruguayansk peso en unidades indexadas" + ], + "UYP": [ + "UYP", + "uruguayansk peso (1975–1993)" + ], + "UYU": [ + "UYU", + "uruguayansk peso" + ], + "UZS": [ + "UZS", + "usbekisk sum" + ], + "VEB": [ + "VEB", + "venezuelansk bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "venezuelansk bolivar" + ], + "VND": [ + "â‚«", + "vietnamesisk dong" + ], + "VUV": [ + "VUV", + "vanuatuisk vatu" + ], + "WST": [ + "WST", + "vestsamoisk tala" + ], + "XAF": [ + "FCFA", + "CFA franc BEAC" + ], + "XCD": [ + "EC$", + "austkaribisk dollar" + ], + "XEU": [ + "XEU", + "europeisk valutaeining" + ], + "XFO": [ + "XFO", + "fransk gullfranc" + ], + "XFU": [ + "XFU", + "fransk UIC-franc" + ], + "XOF": [ + "CFA", + "CFA franc BCEAO" + ], + "XPF": [ + "CFPF", + "CFP franc" + ], + "XRE": [ + "XRE", + "RINET-fond" + ], + "YDD": [ + "YDD", + "jemenittisk dinar" + ], + "YER": [ + "YER", + "jemenittisk rial" + ], + "YUD": [ + "YUD", + "jugoslavisk dinar (hard)" + ], + "YUM": [ + "YUM", + "jugoslavisk noviy-dinar" + ], + "YUN": [ + "YUN", + "jugoslavisk konvertibel dinar" + ], + "ZAL": [ + "ZAL", + "sørafrikansk rand (finansiell)" + ], + "ZAR": [ + "ZAR", + "sørafrikansk rand" + ], + "ZMK": [ + "ZMK", + "zambisk kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "zambisk kwacha" + ], + "ZRN": [ + "ZRN", + "zairisk ny zaire" + ], + "ZRZ": [ + "ZRZ", + "zairisk zaire" + ], + "ZWD": [ + "ZWD", + "zimbabwisk dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/no.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/no.json new file mode 100644 index 0000000000000000000000000000000000000000..86295846587bc6555b29c2eae3f2942118d8bad6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/no.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.30.7", + "Names": { + "ADP": [ + "ADP", + "andorranske pesetas" + ], + "AED": [ + "AED", + "emiratarabiske dirham" + ], + "AFA": [ + "AFA", + "afgansk afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "afghanske afghani" + ], + "ALK": [ + "ALK", + "albanske lek (1946–1965)" + ], + "ALL": [ + "ALL", + "albanske lek" + ], + "AMD": [ + "AMD", + "armenske dram" + ], + "ANG": [ + "ANG", + "nederlandske antillegylden" + ], + "AOA": [ + "AOA", + "angolanske kwanza" + ], + "AOK": [ + "AOK", + "angolanske kwanza (1977–1990)" + ], + "AON": [ + "AON", + "angolanske nye kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "angolanske omjusterte kwanza (1995–1999)" + ], + "ARA": [ + "ARA", + "argentinske australer" + ], + "ARL": [ + "ARL", + "argentinske peso ley" + ], + "ARM": [ + "ARM", + "argentinsk pesos (1881–1970)" + ], + "ARP": [ + "ARP", + "argentinske pesos (1983–1985)" + ], + "ARS": [ + "ARS", + "argentinske pesos" + ], + "ATS": [ + "ATS", + "østerrikske shilling" + ], + "AUD": [ + "AUD", + "australske dollar" + ], + "AWG": [ + "AWG", + "arubiske floriner" + ], + "AZM": [ + "AZM", + "aserbajdsjanske manat (1993–2006)" + ], + "AZN": [ + "AZN", + "aserbajdsjanske manat" + ], + "BAD": [ + "BAD", + "bosnisk-hercegovinske dinarer (1992–1994)" + ], + "BAM": [ + "BAM", + "bosnisk-hercegovinske konvertible mark" + ], + "BAN": [ + "BAN", + "nye bosnisk-hercegovinske dinarer (1994–1997)" + ], + "BBD": [ + "BBD", + "barbadiske dollar" + ], + "BDT": [ + "BDT", + "bangladeshiske taka" + ], + "BEC": [ + "BEC", + "belgiske franc (konvertible)" + ], + "BEF": [ + "BEF", + "belgiske franc" + ], + "BEL": [ + "BEL", + "belgiske franc (finansielle)" + ], + "BGL": [ + "BGL", + "bulgarske lev (hard)" + ], + "BGM": [ + "BGM", + "bulgarske lev (sosialist)" + ], + "BGN": [ + "BGN", + "bulgarske lev" + ], + "BGO": [ + "BGO", + "bulgarske lev (1879–1952)" + ], + "BHD": [ + "BHD", + "bahrainske dinarer" + ], + "BIF": [ + "BIF", + "burundiske franc" + ], + "BMD": [ + "BMD", + "bermudiske dollar" + ], + "BND": [ + "BND", + "bruneiske dollar" + ], + "BOB": [ + "BOB", + "bolivianske boliviano" + ], + "BOL": [ + "BOL", + "bolivianske boliviano (1863–1963)" + ], + "BOP": [ + "BOP", + "bolivianske pesos" + ], + "BOV": [ + "BOV", + "bolivianske mvdol" + ], + "BRB": [ + "BRB", + "brasilianske cruzeiro novo (1967–1986)" + ], + "BRC": [ + "BRC", + "brasilianske cruzados (1986–1989)" + ], + "BRE": [ + "BRE", + "brasilianske cruzeiro (1990–1993)" + ], + "BRL": [ + "BRL", + "brasilianske real" + ], + "BRN": [ + "BRN", + "brasilianske cruzado novo (1989–1990)" + ], + "BRR": [ + "BRR", + "brasilianske cruzeiro (1993–1994)" + ], + "BRZ": [ + "BRZ", + "brasilianske cruzeiro (1942–1967)" + ], + "BSD": [ + "BSD", + "bahamanske dollar" + ], + "BTN": [ + "BTN", + "bhutanske ngultrum" + ], + "BUK": [ + "BUK", + "burmesiske kyat" + ], + "BWP": [ + "BWP", + "botswanske pula" + ], + "BYB": [ + "BYB", + "hviterussiske nye rubler (1994–1999)" + ], + "BYN": [ + "BYN", + "hviterussiske rubler" + ], + "BYR": [ + "BYR", + "hviterussiske rubler (2000–2016)" + ], + "BZD": [ + "BZD", + "beliziske dollar" + ], + "CAD": [ + "CAD", + "kanadiske dollar" + ], + "CDF": [ + "CDF", + "kongolesiske franc" + ], + "CHE": [ + "CHE", + "WIR euro" + ], + "CHF": [ + "CHF", + "sveitsiske franc" + ], + "CHW": [ + "CHW", + "WIR franc" + ], + "CLE": [ + "CLE", + "chilenske escudo" + ], + "CLF": [ + "CLF", + "chilenske unidades de fomento" + ], + "CLP": [ + "CLP", + "chilenske pesos" + ], + "CNX": [ + "CNX", + "Kinas folkebank dollar" + ], + "CNY": [ + "CNY", + "kinesiske yuan" + ], + "COP": [ + "COP", + "colombianske pesos" + ], + "COU": [ + "COU", + "colombianske unidad de valor real" + ], + "CRC": [ + "CRC", + "costaricanske colón" + ], + "CSD": [ + "CSD", + "serbiske dinarer (2002–2006)" + ], + "CSK": [ + "CSK", + "tsjekkoslovakiske koruna (hard)" + ], + "CUC": [ + "CUC", + "kubanske konvertible pesos" + ], + "CUP": [ + "CUP", + "kubanske pesos" + ], + "CVE": [ + "CVE", + "kappverdiske escudos" + ], + "CYP": [ + "CYP", + "kypriotiske pund" + ], + "CZK": [ + "CZK", + "tsjekkiske koruna" + ], + "DDM": [ + "DDM", + "østtyske mark" + ], + "DEM": [ + "DEM", + "tyske mark" + ], + "DJF": [ + "DJF", + "djiboutiske franc" + ], + "DKK": [ + "DKK", + "danske kroner" + ], + "DOP": [ + "DOP", + "dominikanske pesos" + ], + "DZD": [ + "DZD", + "algeriske dinarer" + ], + "ECS": [ + "ECS", + "ecuadorianske sucre" + ], + "ECV": [ + "ECV", + "ecuadorianske unidad de valor constante (UVC)" + ], + "EEK": [ + "EEK", + "estiske kroon" + ], + "EGP": [ + "EGP", + "egyptiske pund" + ], + "ERN": [ + "ERN", + "eritreiske nakfa" + ], + "ESA": [ + "ESA", + "spanske peseta (A–konto)" + ], + "ESB": [ + "ESB", + "spanske peseta (konvertibel konto)" + ], + "ESP": [ + "ESP", + "spanske peseta" + ], + "ETB": [ + "ETB", + "etiopiske birr" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "finske mark" + ], + "FJD": [ + "FJD", + "fijianske dollar" + ], + "FKP": [ + "FKP", + "falklandspund" + ], + "FRF": [ + "FRF", + "franske franc" + ], + "GBP": [ + "£", + "britiske pund" + ], + "GEK": [ + "GEK", + "georgiske kupon larit" + ], + "GEL": [ + "GEL", + "georgiske lari" + ], + "GHC": [ + "GHC", + "ghanesisk cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "ghanesiske cedi" + ], + "GIP": [ + "GIP", + "gibraltarske pund" + ], + "GMD": [ + "GMD", + "gambiske dalasi" + ], + "GNF": [ + "GNF", + "guineanske franc" + ], + "GNS": [ + "GNS", + "guineanske syli" + ], + "GQE": [ + "GQE", + "ekvatorialguineanske ekwele guineana" + ], + "GRD": [ + "GRD", + "greske drakmer" + ], + "GTQ": [ + "GTQ", + "guatemalanske quetzal" + ], + "GWE": [ + "GWE", + "portugisiske guinea escudo" + ], + "GWP": [ + "GWP", + "Guinea-Bissau-pesos" + ], + "GYD": [ + "GYD", + "guyanske dollar" + ], + "HKD": [ + "HKD", + "Hongkong-dollar" + ], + "HNL": [ + "HNL", + "honduranske lempira" + ], + "HRD": [ + "HRD", + "kroatiske dinarer" + ], + "HRK": [ + "HRK", + "kroatiske kuna" + ], + "HTG": [ + "HTG", + "haitiske gourde" + ], + "HUF": [ + "HUF", + "ungarske forinter" + ], + "IDR": [ + "IDR", + "indonesiske rupier" + ], + "IEP": [ + "IEP", + "irske pund" + ], + "ILP": [ + "ILP", + "israelske pund" + ], + "ILR": [ + "ILR", + "israelske shekler (1980–1985)" + ], + "ILS": [ + "ILS", + "nye israelske shekler" + ], + "INR": [ + "INR", + "indiske rupier" + ], + "IQD": [ + "IQD", + "irakske dinarer" + ], + "IRR": [ + "IRR", + "iranske rialer" + ], + "ISJ": [ + "ISJ", + "islandske kroner (1918–1981)" + ], + "ISK": [ + "ISK", + "islandske kroner" + ], + "ITL": [ + "ITL", + "italienske lire" + ], + "JMD": [ + "JMD", + "jamaikanske dollar" + ], + "JOD": [ + "JOD", + "jordanske dinarer" + ], + "JPY": [ + "JPY", + "japanske yen" + ], + "KES": [ + "KES", + "kenyanske shilling" + ], + "KGS": [ + "KGS", + "kirgisiske som" + ], + "KHR": [ + "KHR", + "kambodsjanske riel" + ], + "KMF": [ + "KMF", + "komoriske franc" + ], + "KPW": [ + "KPW", + "nordkoreanske won" + ], + "KRH": [ + "KRH", + "sørkoreanske hwan (1953–1962)" + ], + "KRO": [ + "KRO", + "sørkoreanske won (1945–1953)" + ], + "KRW": [ + "KRW", + "sørkoreanske won" + ], + "KWD": [ + "KWD", + "kuwaitiske dinarer" + ], + "KYD": [ + "KYD", + "caymanske dollar" + ], + "KZT": [ + "KZT", + "kasakhstanske tenge" + ], + "LAK": [ + "LAK", + "laotiske kip" + ], + "LBP": [ + "LBP", + "libanesiske pund" + ], + "LKR": [ + "LKR", + "srilankiske rupier" + ], + "LRD": [ + "LRD", + "liberiske dollar" + ], + "LSL": [ + "LSL", + "lesothiske loti" + ], + "LTL": [ + "LTL", + "litauiske litas" + ], + "LTT": [ + "LTT", + "litauiske talonas" + ], + "LUC": [ + "LUC", + "luxemburgske konvertible franc" + ], + "LUF": [ + "LUF", + "luxemburgske franc" + ], + "LUL": [ + "LUL", + "luxemburgske finansielle franc" + ], + "LVL": [ + "LVL", + "latviske lats" + ], + "LVR": [ + "LVR", + "latviske rubler" + ], + "LYD": [ + "LYD", + "libyske dinarer" + ], + "MAD": [ + "MAD", + "marokkanske dirham" + ], + "MAF": [ + "MAF", + "marokkanske franc" + ], + "MCF": [ + "MCF", + "MCF" + ], + "MDC": [ + "MDC", + "moldovske cupon" + ], + "MDL": [ + "MDL", + "moldovske leu" + ], + "MGA": [ + "MGA", + "madagassiske ariary" + ], + "MGF": [ + "MGF", + "madagassiske franc" + ], + "MKD": [ + "MKD", + "makedonske denarer" + ], + "MKN": [ + "MKN", + "makedonske denarer (1992–1993)" + ], + "MLF": [ + "MLF", + "maliske franc" + ], + "MMK": [ + "MMK", + "myanmarske kyat" + ], + "MNT": [ + "MNT", + "mongolske tugrik" + ], + "MOP": [ + "MOP", + "makaoiske pataca" + ], + "MRO": [ + "MRO", + "mauritanske ouguiya" + ], + "MTL": [ + "MTL", + "maltesiske lira" + ], + "MTP": [ + "MTP", + "maltesiske pund" + ], + "MUR": [ + "MUR", + "mauritiske rupier" + ], + "MVP": [ + "MVP", + "maldiviske rupier" + ], + "MVR": [ + "MVR", + "maldiviske rufiyaa" + ], + "MWK": [ + "MWK", + "malawiske kwacha" + ], + "MXN": [ + "MXN", + "meksikanske pesos" + ], + "MXP": [ + "MXP", + "meksikanske sølvpesos (1861–1992)" + ], + "MXV": [ + "MXV", + "meksikanske unidad de inversion (UDI)" + ], + "MYR": [ + "MYR", + "malaysiske ringgit" + ], + "MZE": [ + "MZE", + "mosambikiske escudo" + ], + "MZM": [ + "MZM", + "gamle mosambikiske metical" + ], + "MZN": [ + "MZN", + "mosambikiske metical" + ], + "NAD": [ + "NAD", + "namibiske dollar" + ], + "NGN": [ + "NGN", + "nigerianske naira" + ], + "NIC": [ + "NIC", + "nicaraguanske cordoba (1988–1991)" + ], + "NIO": [ + "NIO", + "nicaraguanske córdoba" + ], + "NLG": [ + "NLG", + "nederlandske gylden" + ], + "NOK": [ + "kr", + "norske kroner" + ], + "NPR": [ + "NPR", + "nepalske rupier" + ], + "NZD": [ + "NZD", + "newzealandske dollar" + ], + "OMR": [ + "OMR", + "omanske rialer" + ], + "PAB": [ + "PAB", + "panamanske balboa" + ], + "PEI": [ + "PEI", + "peruvianske inti" + ], + "PEN": [ + "PEN", + "peruanske nuevo sol" + ], + "PES": [ + "PES", + "peruvianske sol (1863–1965)" + ], + "PGK": [ + "PGK", + "papuanske kina" + ], + "PHP": [ + "PHP", + "filippinske pesos" + ], + "PKR": [ + "PKR", + "pakistanske rupier" + ], + "PLN": [ + "PLN", + "polske zloty" + ], + "PLZ": [ + "PLZ", + "polske zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "portugisiske escudo" + ], + "PYG": [ + "PYG", + "paraguayanske guarani" + ], + "QAR": [ + "QAR", + "qatarske rialer" + ], + "RHD": [ + "RHD", + "rhodesiske dollar" + ], + "ROL": [ + "ROL", + "rumenske leu (1952–2006)" + ], + "RON": [ + "RON", + "rumenske leu" + ], + "RSD": [ + "RSD", + "serbiske dinarer" + ], + "RUB": [ + "RUB", + "russiske rubler" + ], + "RUR": [ + "RUR", + "russiske rubler (1991–1998)" + ], + "RWF": [ + "RWF", + "rwandiske franc" + ], + "SAR": [ + "SAR", + "saudiarabiske riyaler" + ], + "SBD": [ + "SBD", + "salomonske dollar" + ], + "SCR": [ + "SCR", + "seychelliske rupier" + ], + "SDD": [ + "SDD", + "sudanesiske dinarer (1992–2007)" + ], + "SDG": [ + "SDG", + "sudanske pund" + ], + "SDP": [ + "SDP", + "sudanesiske pund" + ], + "SEK": [ + "SEK", + "svenske kroner" + ], + "SGD": [ + "SGD", + "singaporske dollar" + ], + "SHP": [ + "SHP", + "sankthelenske pund" + ], + "SIT": [ + "SIT", + "slovenske tolar" + ], + "SKK": [ + "SKK", + "slovakiske koruna" + ], + "SLL": [ + "SLL", + "sierraleonske leone" + ], + "SOS": [ + "SOS", + "somaliske shilling" + ], + "SRD": [ + "SRD", + "surinamske dollar" + ], + "SRG": [ + "SRG", + "surinamske gylden" + ], + "SSP": [ + "SSP", + "sørsudanske pund" + ], + "STD": [ + "STD", + "São Tomé og Príncipe-dobra" + ], + "SUR": [ + "SUR", + "sovjetiske rubler" + ], + "SVC": [ + "SVC", + "salvadoranske colon" + ], + "SYP": [ + "SYP", + "syriske pund" + ], + "SZL": [ + "SZL", + "swazilandske lilangeni" + ], + "THB": [ + "THB", + "thailandske baht" + ], + "TJR": [ + "TJR", + "tadsjikiske rubler" + ], + "TJS": [ + "TJS", + "tadsjikiske somoni" + ], + "TMM": [ + "TMM", + "turkmenske manat (1993–2009)" + ], + "TMT": [ + "TMT", + "turkmenske manat" + ], + "TND": [ + "TND", + "tunisiske dinarer" + ], + "TOP": [ + "TOP", + "tonganske paÊ»anga" + ], + "TPE": [ + "TPE", + "timoresiske escudo" + ], + "TRL": [ + "TRL", + "tyrkiske lire (1922–2005)" + ], + "TRY": [ + "TRY", + "tyrkiske lire" + ], + "TTD": [ + "TTD", + "trinidadiske dollar" + ], + "TWD": [ + "TWD", + "nye taiwanske dollar" + ], + "TZS": [ + "TZS", + "tanzanianske shilling" + ], + "UAH": [ + "UAH", + "ukrainske hryvnia" + ], + "UAK": [ + "UAK", + "ukrainske karbovanetz" + ], + "UGS": [ + "UGS", + "ugandiske shilling (1966–1987)" + ], + "UGX": [ + "UGX", + "ugandiske shilling" + ], + "USD": [ + "USD", + "amerikanske dollar" + ], + "USN": [ + "USN", + "amerikanske dollar (neste dag)" + ], + "USS": [ + "USS", + "amerikanske dollar (samme dag)" + ], + "UYI": [ + "UYI", + "uruguyanske pesos (indekserte enheter)" + ], + "UYP": [ + "UYP", + "uruguayanske pesos (1975–1993)" + ], + "UYU": [ + "UYU", + "uruguayanske pesos" + ], + "UZS": [ + "UZS", + "usbekiske som" + ], + "VEB": [ + "VEB", + "venezuelanske bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "venezuelanske bolivar" + ], + "VND": [ + "VND", + "vietnamesiske dong" + ], + "VNN": [ + "VNN", + "vietnamesiske dong (1978–1985)" + ], + "VUV": [ + "VUV", + "vanuatiske vatu" + ], + "WST": [ + "WST", + "samoanske tala" + ], + "XAF": [ + "XAF", + "sentralafrikanske CFA-franc" + ], + "XCD": [ + "XCD", + "østkaribiske dollar" + ], + "XEU": [ + "XEU", + "europeisk valutaenhet" + ], + "XFO": [ + "XFO", + "franske gullfranc" + ], + "XFU": [ + "XFU", + "franske UIC-franc" + ], + "XOF": [ + "CFA", + "vestafrikanske CFA-franc" + ], + "XPF": [ + "XPF", + "CFP-franc" + ], + "XRE": [ + "XRE", + "RINET-fond" + ], + "YDD": [ + "YDD", + "jemenittiske dinarer" + ], + "YER": [ + "YER", + "jemenittiske rialer" + ], + "YUD": [ + "YUD", + "jugoslaviske dinarer (hard)" + ], + "YUM": [ + "YUM", + "jugoslaviske noviy-dinarer" + ], + "YUN": [ + "YUN", + "jugoslaviske konvertible dinarer" + ], + "YUR": [ + "YUR", + "jugoslaviske reformerte dinarer (1992–1993)" + ], + "ZAL": [ + "ZAL", + "sørafrikanske rand (finansielle)" + ], + "ZAR": [ + "ZAR", + "sørafrikanske rand" + ], + "ZMK": [ + "ZMK", + "zambiske kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "zambiske kwacha" + ], + "ZRN": [ + "ZRN", + "zairiske nye zaire" + ], + "ZRZ": [ + "ZRZ", + "zairiske zaire" + ], + "ZWD": [ + "ZWD", + "zimbabwiske dollar (1980–2008)" + ], + "ZWL": [ + "ZWL", + "zimbabwisk dollar (2009)" + ], + "ZWR": [ + "ZWR", + "zimbabwisk dollar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/om.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/om.json new file mode 100644 index 0000000000000000000000000000000000000000..73a1dd4501fd264464358360f3dcde903af6d7ae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/om.json @@ -0,0 +1,41 @@ +{ + "Version": "2.1.27.98", + "Names": { + "BRL": [ + "R$", + "Brazilian Real" + ], + "CNY": [ + "CNÂ¥", + "Chinese Yuan Renminbi" + ], + "ETB": [ + "Br", + "Itoophiyaa Birrii" + ], + "EUR": [ + "€", + "Euro" + ], + "GBP": [ + "£", + "British Pound" + ], + "INR": [ + "₹", + "Indian Rupee" + ], + "JPY": [ + "JPÂ¥", + "Japanese Yen" + ], + "RUB": [ + "RUB", + "Russian Ruble" + ], + "USD": [ + "US$", + "US Dollar" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/om_KE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/om_KE.json new file mode 100644 index 0000000000000000000000000000000000000000..21ba3e6d4046fa600a64c4961dfdfaf54bbc0da6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/om_KE.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "KES": [ + "Ksh", + "KES" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/or.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/or.json new file mode 100644 index 0000000000000000000000000000000000000000..b7412c4f2f1e328115b9b108a9bef3834fa29517 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/or.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.78", + "Names": { + "INR": [ + "₹", + "ଟଙକା" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/os.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/os.json new file mode 100644 index 0000000000000000000000000000000000000000..adb9aa7978154a0564bd709c9f3baf7b1e0c993b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/os.json @@ -0,0 +1,29 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BRL": [ + "R$", + "Бразилиаг реал" + ], + "EUR": [ + "€", + "Евро" + ], + "GBP": [ + "£", + "Бритайнаг Фунт" + ], + "GEL": [ + "₾", + "Лар" + ], + "RUB": [ + "RUB", + "Сом" + ], + "USD": [ + "$", + "ÐИШ-Ñ‹ Доллар" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/os_RU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/os_RU.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe630ad11808bdc838d4737aa3859b42dec4939 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/os_RU.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GEL": [ + "GEL", + "Лар" + ], + "RUB": [ + "₽", + "Сом" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pa.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pa.json new file mode 100644 index 0000000000000000000000000000000000000000..e825e3f7f4aa19157688338d74ec4c2d2bbfe874 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pa.json @@ -0,0 +1,721 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "ਸੰਯà©à¨•ਤ ਅਰਬ ਅਮੀਰਾਤ ਦਿਰਹਾਮ" + ], + "AFN": [ + "AFN", + "ਅਫ਼ਗਾਨ ਅਫ਼ਗਾਨੀ" + ], + "ALL": [ + "ALL", + "ਅਲਬਾਨੀਆਈ ਲੇਕ" + ], + "AMD": [ + "AMD", + "ਅਰਮੀਨੀਆਈ ਦਰਮ" + ], + "ANG": [ + "ANG", + "ਨੀਦਰਲੈਂਡਸ à¨à¨‚ਟੀਲੀਅਨ ਗਿਲਡਰ" + ], + "AOA": [ + "AOA", + "ਅੰਗੋਲਾ ਕਵਾਂਜਾ" + ], + "ARA": [ + "ARA", + "ਅਰਜਨਟੀਨੀ ਅਸਟਰਾਲ" + ], + "ARL": [ + "ARL", + "ਅਰਜਨਟੀਨੀ ਪੇਸੋ ਲੇ (1970–1983)" + ], + "ARM": [ + "ARM", + "ਅਰਜਨਟੀਨੀ ਪੇਸੋ (1881–1970)" + ], + "ARP": [ + "ARP", + "ਅਰਜਨਟੀਨੀ ਪੇਸੋ (1983–1985)" + ], + "ARS": [ + "ARS", + "ਅਰਜਨਟੀਨੀ ਪੇਸੋ" + ], + "AUD": [ + "A$", + "ਆਸਟà©à¨°à©‡à¨²à©€à¨†à¨ˆ ਡਾਲਰ" + ], + "AWG": [ + "AWG", + "ਅਰੂਬਨ ਫਲੋਰਿਨ" + ], + "AZN": [ + "AZN", + "ਅਜ਼ਰਬਾਈਜਾਨ ਮਾਨਤ" + ], + "BAM": [ + "BAM", + "ਬੋਸਨੀਆ-ਹਰਜ਼ੇਗੋਵੀਨਾ ਬਦਲਣਯੋਗ ਮਾਰਕ" + ], + "BBD": [ + "BBD", + "ਬਾਰਬਾਡੀਅਨ ਡਾਲਰ" + ], + "BDT": [ + "BDT", + "ਬੰਗਲਾਦੇਸ਼ੀ ਟਕਾ" + ], + "BGN": [ + "BGN", + "ਬà©à¨²à¨—ਾਰੀਆਈ ਲੇਵ" + ], + "BHD": [ + "BHD", + "ਬਹਿਰੀਨੀ ਦਿਨਾਰ" + ], + "BIF": [ + "BIF", + "ਬà©à¨°à©à©°à¨¡à©€à¨†à¨ˆ ਫà©à¨°à©ˆà¨‚ਕ" + ], + "BMD": [ + "BMD", + "ਬਰਮੂਡਾ ਡਾਲਰ" + ], + "BND": [ + "BND", + "ਬਰੂਨੇਈ ਡਾਲਰ" + ], + "BOB": [ + "BOB", + "ਬੋਲੀਵੀਅਨ ਬੋਲੀਵੀਅਨੋ" + ], + "BOL": [ + "BOL", + "ਬੋਲੀਵੀਆਈ ਬੋਲੀਵੀਅਨੋ (1863–1963)" + ], + "BOP": [ + "BOP", + "ਬੋਲੀਵੀਆਈ ਪੇਸੋ" + ], + "BOV": [ + "BOV", + "ਬੋਲੀਵੀਆਈ ਮਵਡੋਲ" + ], + "BRB": [ + "BRB", + "ਬà©à¨°à¨¾à¨œà¨¼à©€à¨²à©€à¨†à¨ˆ ਨਿਊ ਕਰà©à¨œà¨¼à¨¿à¨°à©‹à¨¸ (1967–1986)" + ], + "BRC": [ + "BRC", + "ਬà©à¨°à¨¾à¨œà¨¼à©€à¨²à©€à¨†à¨ˆ ਕਰà©à¨œà¨¼à¨¾à¨¡à©‚ (1986–1989)" + ], + "BRE": [ + "BRE", + "ਬà©à¨°à¨¾à¨œà¨¼à©€à¨²à©€à¨†à¨ˆ ਕਰà©à¨œà¨¼à¨¿à¨°à©‹à¨¸ (1990–1993)" + ], + "BRL": [ + "R$", + "ਬà©à¨°à¨¾à¨œà¨¼à©€à¨²à©€à¨†à¨ˆ ਰੀਅਲ" + ], + "BRN": [ + "BRN", + "ਬà©à¨°à¨¾à¨œà¨¼à©€à¨²à©€à¨†à¨ˆ ਨਿਊ ਕਰà©à¨œà¨¼à¨¾à¨¡à©‚ (1989–1990)" + ], + "BRR": [ + "BRR", + "ਬà©à¨°à¨¾à¨œà¨¼à©€à¨²à©€à¨†à¨ˆ ਕਰà©à¨œà¨¼à¨¿à¨°à©‹à¨¸ (1993–1994)" + ], + "BRZ": [ + "BRZ", + "ਬà©à¨°à¨¾à¨œà¨¼à©€à¨²à©€à¨†à¨ˆ ਕਰà©à¨œà¨¼à¨¿à¨°à©‹à¨¸ (1942–1967)" + ], + "BSD": [ + "BSD", + "ਬਾਹਾਮੀਅਨ ਡਾਲਰ" + ], + "BTN": [ + "BTN", + "ਭੂਟਾਨੀ à¨à¨‚ਗਲਟà©à¨°à¨®" + ], + "BWP": [ + "BWP", + "ਬੋਟਸਵਾਨਾ ਪà©à¨²à¨¾" + ], + "BYN": [ + "BYN", + "ਬੇਲਾਰੂਸੀ ਰੂਬਲ" + ], + "BYR": [ + "BYR", + "ਬੇਲਾਰੂਸੀ ਰੂਬਲ (2000–2016)" + ], + "BZD": [ + "BZD", + "ਬੇਲੀਜ਼ ਡਾਲਰ" + ], + "CAD": [ + "CA$", + "ਕੇਨੇਡਿਆਈ ਡਾਲਰ" + ], + "CDF": [ + "CDF", + "ਕਾਂਗੋਲੀਜ਼ ਫà©à¨°à©ˆà¨‚ਕ" + ], + "CHF": [ + "CHF", + "ਸਵਿਸ ਫà©à¨°à©ˆà¨‚ਕ" + ], + "CLP": [ + "CLP", + "ਚਿਲੀ ਪੇਸੋ" + ], + "CNY": [ + "CNÂ¥", + "ਚੀਨੀ ਯà©à¨†à¨¨" + ], + "COP": [ + "COP", + "ਕੋਲੰਬਿਆਈ ਪੇਸੋ" + ], + "CRC": [ + "CRC", + "ਕੋਸਟਾ ਰੀਕਨ ਕੋਲਨ" + ], + "CUC": [ + "CUC", + "ਕਿਊਬਨ ਬਦਲਣਯੋਗ ਪੇਸੋ" + ], + "CUP": [ + "CUP", + "ਕਿਊਬਨ ਪੇਸੋ" + ], + "CVE": [ + "CVE", + "ਕੇਪ ਵਰਡੀਅਨ ਸਕੂਡੋ" + ], + "CZK": [ + "CZK", + "ਚੈਕ ਗਣਰਾਜ ਕੋਰà©à¨¨à¨¾" + ], + "DEM": [ + "DEM", + "ਜਰਮਨ ਮਾਰਕ" + ], + "DJF": [ + "DJF", + "ਜ਼ੀਬੂਤੀਅਨ ਫà©à¨°à©ˆà¨‚ਕ" + ], + "DKK": [ + "DKK", + "ਡੈਨਿਸ਼ ਕਰੌਨ" + ], + "DOP": [ + "DOP", + "ਡੌਮਿਨਿਕਨ ਪੇਸੋ" + ], + "DZD": [ + "DZD", + "ਅਲਜੀਰਿਆਈ ਦਿਨਾਰ" + ], + "EGP": [ + "EGP", + "ਮਿਸਰੀ ਪੌਂਡ" + ], + "ERN": [ + "ERN", + "ਇਰੀਟà©à¨°à¨¿à¨†à¨ˆ ਨਾਫ਼ਾ" + ], + "ETB": [ + "ETB", + "ਇਥੋਪੀਆਈ ਬਿਰ" + ], + "EUR": [ + "€", + "ਯੂਰੋ" + ], + "FJD": [ + "FJD", + "ਫ਼ਿਜ਼ੀ ਡਾਲਰ" + ], + "FKP": [ + "FKP", + "ਫ਼ਾਕਲੈਂਡ ਆਈਲੈਂਡਸ ਪੌਂਡ" + ], + "GBP": [ + "£", + "ਬà©à¨°à¨¿à¨Ÿà¨¿à¨¸à¨¼ ਪੌਂਡ" + ], + "GEL": [ + "GEL", + "ਜਾਰਜੀਆਈ ਲਾਰੀ" + ], + "GHS": [ + "GHS", + "ਘਾਨਾਈ ਸੇਡੀ" + ], + "GIP": [ + "GIP", + "ਜਿਬਰਾਲਟਰ ਪੌਂਡ" + ], + "GMD": [ + "GMD", + "ਗੈਂਬੀਆਈ ਦਲਾਸੀ" + ], + "GNF": [ + "GNF", + "ਗਿਨੀ ਫà©à¨°à©ˆà¨‚ਕ" + ], + "GTQ": [ + "GTQ", + "ਗà©à¨†à¨Ÿà©‡à¨®à¨¾à¨²à¨¾ ਕà©à¨à¨Ÿà¨œà¨¼à¨²" + ], + "GYD": [ + "GYD", + "ਗà©à¨†à¨¨à¨¾à¨†à¨ˆ ਡਾਲਰ" + ], + "HKD": [ + "HK$", + "ਹਾਂਗ ਕਾਂਗ ਡਾਲਰ" + ], + "HNL": [ + "HNL", + "ਹਾਨਡੂਰਨ ਲੇਮਪਿਰਾ" + ], + "HRK": [ + "HRK", + "ਕਰੋà¨à¨¸à¨¼à©€à¨†à¨ˆ ਕà©à¨¨à¨¾" + ], + "HTG": [ + "HTG", + "ਹੈਤੀ ਗੌਰਡੇ" + ], + "HUF": [ + "HUF", + "ਹੰਗਰੀ ਫੋਰਿੰਟ" + ], + "IDR": [ + "IDR", + "ਇੰਡੋਨੇਸ਼ੀਆਈ ਰà©à¨ªà¨¿à¨†à¨¹" + ], + "IEP": [ + "IEP", + "ਆਇਰਿਸ਼ ਪੌਂਡ" + ], + "ILP": [ + "ILP", + "ਇਜ਼ਰਾਈਲੀ ਪੌਂਡ" + ], + "ILS": [ + "₪", + "ਇਜ਼ਰਾਈਲੀ ਨਵੀਂ ਸ਼ੇਕੇਲ" + ], + "INR": [ + "₹", + "ਭਾਰਤੀ ਰà©à¨ªà¨‡à¨†" + ], + "IQD": [ + "IQD", + "ਇਰਾਕੀ ਦਿਨਾਰ" + ], + "IRR": [ + "IRR", + "ਈਰਾਨੀ ਰਿਆਲ" + ], + "ISK": [ + "ISK", + "ਆਈਸਲੈਂਡਿਕ ਕਰੌਨ" + ], + "JMD": [ + "JMD", + "ਜਮਾਇਕਨ ਡਾਲਰ" + ], + "JOD": [ + "JOD", + "ਜਾਰਡਨ ਦਿਨਾਰ" + ], + "JPY": [ + "JPÂ¥", + "ਜਪਾਨੀ ਯੇਨ" + ], + "KES": [ + "KES", + "ਕੀਨੀਆਈ ਸ਼ਿਲਿੰਗ" + ], + "KGS": [ + "KGS", + "ਕਿਰਗਿਸਤਾਨੀ ਸੋਮ" + ], + "KHR": [ + "KHR", + "ਕੰਬੋਡੀਆਈ ਰੀਅਲ" + ], + "KMF": [ + "KMF", + "ਕੋਮੋਰੀਅਨ ਫà©à¨°à©ˆà¨‚ਕ" + ], + "KPW": [ + "KPW", + "ਉੱਤਰੀ ਕੋਰੀਆਈ ਵੋਨ" + ], + "KRW": [ + "â‚©", + "ਦੱਖਣੀ ਕੋਰੀਆਈ ਵੋਨ" + ], + "KWD": [ + "KWD", + "ਕà©à¨µà©ˆà¨¤à©€ ਦਿਨਾਰ" + ], + "KYD": [ + "KYD", + "ਕੇਮੈਨ ਆਈਲੈਂਡਸ ਡਾਲਰ" + ], + "KZT": [ + "KZT", + "ਕਜ਼ਾਖਸਤਾਨੀ ਤੇਂਗੇ" + ], + "LAK": [ + "LAK", + "ਲਾਓਟਿਆਈ ਕਿਪ" + ], + "LBP": [ + "LBP", + "ਲੈਬਨਾਨੀ ਪੌਂਡ" + ], + "LKR": [ + "LKR", + "ਸà©à¨°à©€à¨²à©°à¨•ਾਈ ਰà©à¨ªà¨‡à¨†" + ], + "LRD": [ + "LRD", + "ਲਾਈਬੀਰੀਆਈ ਡਾਲਰ" + ], + "LTL": [ + "LTL", + "ਲਿਥà©à¨†à¨¨à©€à¨†à¨ˆ ਲਿਤਾਸ" + ], + "LVL": [ + "LVL", + "ਲਾਟਵਿਆਈ ਲਾਟਸ" + ], + "LYD": [ + "LYD", + "ਲੀਬੀਅਨ ਦਿਨਾਰ" + ], + "MAD": [ + "MAD", + "ਮੋਰੱਕਨ ਦਿਰਹਾਮ" + ], + "MDL": [ + "MDL", + "ਮੋਲਡੋਵਨ ਲੇਉ" + ], + "MGA": [ + "MGA", + "ਮਾਲਾਗਾਸੀ ਅਰਾਇਰੀ" + ], + "MKD": [ + "MKD", + "ਮੈਕਡੋਨੀਆਈ ਡੇਨਾਰ" + ], + "MMK": [ + "MMK", + "ਮਿਆਂਮਾਰ ਕਿਆਤ" + ], + "MNT": [ + "MNT", + "ਮੰਗੋਲੀਆਈ ਤà©à¨—ਰਿਕ" + ], + "MOP": [ + "MOP", + "ਮੇਕਾਨੀ ਪਟਾਕਾ" + ], + "MRO": [ + "MRO", + "ਮੋਰਿਟਾਨੀਆਈ ਊਗੀਆ" + ], + "MUR": [ + "MUR", + "ਮੌਰਿਸ਼ੀਆਈ ਰà©à¨ªà¨‡à¨†" + ], + "MVR": [ + "MVR", + "ਮਾਲਦੀਵੀ ਰà©à¨«à©€à¨†" + ], + "MWK": [ + "MWK", + "ਮਾਲਾਵੀਆਈ ਕਵਾਚਾ" + ], + "MXN": [ + "MX$", + "ਮੈਕਸੀਕਨ ਪੇਸੋ" + ], + "MYR": [ + "MYR", + "ਮਲੇਸ਼ੀਆਈ ਰਿੰਗਿਟ" + ], + "MZN": [ + "MZN", + "ਮੋਜ਼ਾਮਬੀਕਨ ਮੈਟੀਕਲ" + ], + "NAD": [ + "NAD", + "ਨਾਮੀਬੀਆਈ ਡਾਲਰ" + ], + "NGN": [ + "NGN", + "ਨਾਇਜੀਰੀਆਈ ਨਾਇਰਾ" + ], + "NIO": [ + "NIO", + "ਨਿਕਾਰਾਗà©à¨†à¨ˆ ਕੋਰਡੋਬਾ" + ], + "NOK": [ + "NOK", + "ਨਾਰਵੇਜੀਆਈ ਕਰੌਨ" + ], + "NPR": [ + "NPR", + "ਨੇਪਾਲੀ ਰà©à¨ªà¨‡à¨†" + ], + "NZD": [ + "NZ$", + "ਨਿਊਜ਼ੀਲੈਂਡ ਡਾਲਰ" + ], + "OMR": [ + "OMR", + "ਓਮਾਨੀ ਰਿਆਲ" + ], + "PAB": [ + "PAB", + "ਪਨਾਮੇਨੀਅਨ ਬਾਲਬੋਆ" + ], + "PEN": [ + "PEN", + "ਪੇਰੂਵੀਅਨ ਨਿਊਵੋ ਸੋਲ" + ], + "PGK": [ + "PGK", + "ਪਾਪੂਆ ਨਿਊ ਗਿਨੀਆਈ ਕੀਨਾ" + ], + "PHP": [ + "PHP", + "ਫਿਲਿਪੀਨੀ ਪੇਸੋ" + ], + "PKR": [ + "PKR", + "ਪਾਕਿਸਤਾਨੀ ਰà©à¨ªà¨‡à¨†" + ], + "PLN": [ + "PLN", + "ਪੋਲੈਂਡੀ ਜ਼ਲੌਟੀ" + ], + "PYG": [ + "PYG", + "ਪੈਰਾਗà©à¨µà¨¾à¨‡à¨¨ ਗà©à¨†à¨°à¨¾à¨¨à©€" + ], + "QAR": [ + "QAR", + "ਕਤਰੀ ਰਿਆਲ" + ], + "RON": [ + "RON", + "ਰੋਮਾਨੀਆਈ ਲੇਉ" + ], + "RSD": [ + "RSD", + "ਸਰਬੀਆਈ ਦਿਨਾਰ" + ], + "RUB": [ + "RUB", + "ਰੂਸੀ ਰੂਬਲ" + ], + "RWF": [ + "RWF", + "ਰਵਾਂਡਨ ਫà©à¨°à©ˆà¨‚ਕ" + ], + "SAR": [ + "SAR", + "ਸਾਊਦੀ ਰਿਆਲ" + ], + "SBD": [ + "SBD", + "ਸੋਲੋਮਨ ਆਈਲੈਂਡਸ ਡਾਲਰ" + ], + "SCR": [ + "SCR", + "ਸੇਸ਼ਲਸ ਰà©à¨ªà¨‡à¨†" + ], + "SDG": [ + "SDG", + "ਸੂਡਾਨੀ ਪੌਂਡ" + ], + "SEK": [ + "SEK", + "ਸਵੀਡਿਸ਼ ਕਰੋਨਾ" + ], + "SGD": [ + "SGD", + "ਸਿੰਗਾਪà©à¨° ਡਾਲਰ" + ], + "SHP": [ + "SHP", + "ਸੇਂਟ ਹੇਲੇਨਾ ਪੌਂਡ" + ], + "SLL": [ + "SLL", + "ਸਿà¨à¨°à¨¾ ਲਿਓਨੀਅਨ ਲਿਓਨ" + ], + "SOS": [ + "SOS", + "ਸੋਮਾਲੀ ਸ਼ਿਲਿੰਗ" + ], + "SRD": [ + "SRD", + "ਸੂਰੀਨਾਮੀ ਡਾਲਰ" + ], + "SSP": [ + "SSP", + "ਦੱਖਣੀ ਸੂਡਾਨੀ ਪੌਂਡ" + ], + "STD": [ + "STD", + "ਸਾਉ ਟੋਮੀ à¨à¨‚ਡ ਪà©à¨°à¨¿à©°à¨¸à¨ªà©€ ਡੋਬਰਾ" + ], + "SUR": [ + "SUR", + "ਸੋਵੀਅਤ ਰੂਬਲ" + ], + "SYP": [ + "SYP", + "ਸੀਰੀਆਈ ਪੌਂਡ" + ], + "SZL": [ + "SZL", + "ਸਵਾਜ਼ੀ ਲਾਇਲੈਂਗਨੀ" + ], + "THB": [ + "฿", + "ਥਾਈ ਬਾਹਤ" + ], + "TJS": [ + "TJS", + "ਤਾਜਿਕਿਸਤਾਨੀ ਸੋਮੋਨੀ" + ], + "TMT": [ + "TMT", + "ਤà©à¨°à¨•ਮੇਨਿਸਤਾਨੀ ਮਾਨਤ" + ], + "TND": [ + "TND", + "ਟਿਉਨੀਸ਼ੀਆਈ ਦਿਨਾਰ" + ], + "TOP": [ + "TOP", + "ਟੌਂਗਨ ਪੈਂਗਾ" + ], + "TRY": [ + "TRY", + "ਤà©à¨°à¨•à©€ ਲੀਰਾ" + ], + "TTD": [ + "TTD", + "ਟà©à¨°à¨¿à¨¨à©€à¨¡à¨¾à¨¡ ਅਤੇ ਟੋਬਾਗੋ ਡਾਲਰ" + ], + "TWD": [ + "NT$", + "ਨਵਾਂ ਤਾਇਵਾਨ ਡਾਲਰ" + ], + "TZS": [ + "TZS", + "ਤਨਜ਼ਾਨੀਆਈ ਸ਼ਿਲਿੰਗ" + ], + "UAH": [ + "UAH", + "ਯੂਕਰੇਨੀਆਈ ਰਿਵਨਿਆ" + ], + "UGX": [ + "UGX", + "ਯੂਗਾਂਡੀਆਈ ਸ਼ਿਲਿੰਗ" + ], + "USD": [ + "US$", + "ਯੂ.à¨à¨¸. ਡਾਲਰ" + ], + "UYI": [ + "UYI", + "UYI" + ], + "UYP": [ + "UYP", + "ਉਰੂਗà©à¨µà¨¾à¨‡à¨¨ ਪੇਸੋ (1975–1993)" + ], + "UYU": [ + "UYU", + "ਉਰੂਗà©à¨µà¨¾à¨‡à¨¨ ਪੇਸੋ" + ], + "UZS": [ + "UZS", + "ਉਜ਼ਬੇਕਿਸਤਾਨ ਸੋਮ" + ], + "VEB": [ + "VEB", + "ਵੇਨੇਜ਼ੂà¨à¨²à¨¨ ਬੋਲੀਵਰ (1871–2008)" + ], + "VEF": [ + "VEF", + "ਵੇਨੇਜ਼ੂà¨à¨²à¨¨ ਬੋਲੀਵਰ" + ], + "VND": [ + "â‚«", + "ਵੀਅਤਨਾਮੀ ਡੋਂਗ" + ], + "VNN": [ + "VNN", + "ਵੀਅਤਨਾਮੀ ਡੋਂਗ (1978–1985)" + ], + "VUV": [ + "VUV", + "ਵਾਨੂਆਟੂ ਵਾਟੂ" + ], + "WST": [ + "WST", + "ਸਾਮੋਆਈ ਤਾਲਾ" + ], + "XAF": [ + "FCFA", + "ਕੇਂਦਰੀ ਅਫ਼ਰੀਕੀ [CFA] ਫà©à¨°à©ˆà¨‚ਕ" + ], + "XCD": [ + "EC$", + "ਪੂਰਬੀ ਕੈਰੇਬੀਅਨ ਡਾਲਰ" + ], + "XEU": [ + "XEU", + "ਯੂਰਪੀ ਮà©à¨¦à¨°à¨¾ ਇਕਾਈ" + ], + "XOF": [ + "CFA", + "ਪੱਛਮੀ ਅਫ਼ਰੀਕੀ (CFA) ਫà©à¨°à©ˆà¨‚ਕ" + ], + "XPF": [ + "CFPF", + "ਫà©à¨°à©ˆà¨‚ਕ (CFP)" + ], + "YER": [ + "YER", + "ਯਮਨੀ ਰਿਆਲ" + ], + "ZAR": [ + "ZAR", + "ਦੱਖਣੀ ਅਫਰੀਕੀ ਰੈਂਡ" + ], + "ZMW": [ + "ZMW", + "ਜ਼ਾਮਬੀਆਈ ਕਵਾਚਾ" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pa_Arab.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pa_Arab.json new file mode 100644 index 0000000000000000000000000000000000000000..616d4692f19a7765da46ff14c8ae1b1bea57a671 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pa_Arab.json @@ -0,0 +1,17 @@ +{ + "Version": "2.1.27.40", + "Names": { + "EUR": [ + "€", + "يورو" + ], + "INR": [ + "₹", + "Ø±ÙˆÙ¾Ø¦ÛŒÛ [INR]" + ], + "PKR": [ + "ر", + "روپئیÛ" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pl.json new file mode 100644 index 0000000000000000000000000000000000000000..3c8ccd7fa4e97a1da53be12ae431aa0d4d6a0ba3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pl.json @@ -0,0 +1,1021 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "peseta andorska" + ], + "AED": [ + "AED", + "dirham arabski" + ], + "AFA": [ + "AFA", + "afgani (1927–2002)" + ], + "AFN": [ + "AFN", + "afgani" + ], + "ALL": [ + "ALL", + "lek albaÅ„ski" + ], + "AMD": [ + "AMD", + "dram armeÅ„ski" + ], + "ANG": [ + "ANG", + "gulden antylski" + ], + "AOA": [ + "AOA", + "kwanza angolaÅ„ska" + ], + "AOK": [ + "AOK", + "kwanza angolaÅ„ska (1977–1990)" + ], + "AON": [ + "AON", + "nowa kwanza angolaÅ„ska (1990–2000)" + ], + "AOR": [ + "AOR", + "kwanza angolaÅ„ska Reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "austral argentyÅ„ski" + ], + "ARP": [ + "ARP", + "peso argentyÅ„skie (1983–1985)" + ], + "ARS": [ + "ARS", + "peso argentyÅ„skie" + ], + "ATS": [ + "ATS", + "szyling austriacki" + ], + "AUD": [ + "AUD", + "dolar australijski" + ], + "AWG": [ + "AWG", + "florin arubaÅ„ski" + ], + "AZM": [ + "AZM", + "manat azerbejdżaÅ„ski" + ], + "AZN": [ + "AZN", + "manat azerski" + ], + "BAD": [ + "BAD", + "dinar BoÅ›ni i Hercegowiny" + ], + "BAM": [ + "BAM", + "marka zamienna BoÅ›ni i Hercegowiny" + ], + "BBD": [ + "BBD", + "dolar Barbadosu" + ], + "BDT": [ + "BDT", + "taka bengalska" + ], + "BEC": [ + "BEC", + "frank belgijski (zamienny)" + ], + "BEF": [ + "BEF", + "frank belgijski" + ], + "BEL": [ + "BEL", + "frank belgijski (finansowy)" + ], + "BGL": [ + "BGL", + "lew buÅ‚garski wymienny" + ], + "BGM": [ + "BGM", + "lew buÅ‚garski socjalistyczny" + ], + "BGN": [ + "BGN", + "lew buÅ‚garski" + ], + "BGO": [ + "BGO", + "lew buÅ‚garski (1879–1952)" + ], + "BHD": [ + "BHD", + "dinar bahraÅ„ski" + ], + "BIF": [ + "BIF", + "frank burundyjski" + ], + "BMD": [ + "BMD", + "dolar bermudzki" + ], + "BND": [ + "BND", + "dolar brunejski" + ], + "BOB": [ + "BOB", + "boliviano" + ], + "BOP": [ + "BOP", + "peso boliwijskie" + ], + "BOV": [ + "BOV", + "mvdol boliwijski" + ], + "BRB": [ + "BRB", + "cruzeiro novo brazylijskie (1967–1986)" + ], + "BRC": [ + "BRC", + "cruzado brazylijskie" + ], + "BRE": [ + "BRE", + "cruzeiro brazylijskie (1990–1993)" + ], + "BRL": [ + "R$", + "real brazylijski" + ], + "BRN": [ + "BRN", + "nowe cruzado brazylijskie" + ], + "BRR": [ + "BRR", + "cruzeiro brazylijskie" + ], + "BSD": [ + "BSD", + "dolar bahamski" + ], + "BTN": [ + "BTN", + "ngultrum bhutaÅ„ski" + ], + "BUK": [ + "BUK", + "kyat birmaÅ„ski" + ], + "BWP": [ + "BWP", + "pula botswaÅ„ska" + ], + "BYB": [ + "BYB", + "rubel biaÅ‚oruski (1994–1999)" + ], + "BYN": [ + "BYN", + "rubel biaÅ‚oruski" + ], + "BYR": [ + "BYR", + "rubel biaÅ‚oruski (2000–2016)" + ], + "BZD": [ + "BZD", + "dolar belizeÅ„ski" + ], + "CAD": [ + "CAD", + "dolar kanadyjski" + ], + "CDF": [ + "CDF", + "frank kongijski" + ], + "CHF": [ + "CHF", + "frank szwajcarski" + ], + "CLP": [ + "CLP", + "peso chilijskie" + ], + "CNY": [ + "CNY", + "juan chiÅ„ski" + ], + "COP": [ + "COP", + "peso kolumbijskie" + ], + "CRC": [ + "CRC", + "colon kostarykaÅ„ski" + ], + "CSD": [ + "CSD", + "stary dinar serbski" + ], + "CSK": [ + "CSK", + "korona czechosÅ‚owacka" + ], + "CUC": [ + "CUC", + "peso kubaÅ„skie wymienialne" + ], + "CUP": [ + "CUP", + "peso kubaÅ„skie" + ], + "CVE": [ + "CVE", + "escudo zielonoprzylÄ…dkowe" + ], + "CYP": [ + "CYP", + "funt cypryjski" + ], + "CZK": [ + "CZK", + "korona czeska" + ], + "DDM": [ + "DDM", + "wschodnia marka wschodnioniemiecka" + ], + "DEM": [ + "DEM", + "marka niemiecka" + ], + "DJF": [ + "DJF", + "frank dżibutyjski" + ], + "DKK": [ + "DKK", + "korona duÅ„ska" + ], + "DOP": [ + "DOP", + "peso dominikaÅ„skie" + ], + "DZD": [ + "DZD", + "dinar algierski" + ], + "ECS": [ + "ECS", + "sucre ekwadorski" + ], + "EEK": [ + "EEK", + "korona estoÅ„ska" + ], + "EGP": [ + "EGP", + "funt egipski" + ], + "ERN": [ + "ERN", + "nakfa erytrejska" + ], + "ESA": [ + "ESA", + "peseta hiszpaÅ„ska (Konto A)" + ], + "ESB": [ + "ESB", + "peseta hiszpaÅ„ska (konto wymienne)" + ], + "ESP": [ + "ESP", + "peseta hiszpaÅ„ska" + ], + "ETB": [ + "ETB", + "birr etiopski" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "marka fiÅ„ska" + ], + "FJD": [ + "FJD", + "dolar fidżyjski" + ], + "FKP": [ + "FKP", + "funt falklandzki" + ], + "FRF": [ + "FRF", + "frank francuski" + ], + "GBP": [ + "GBP", + "funt szterling" + ], + "GEK": [ + "GEK", + "kupon gruziÅ„ski larit" + ], + "GEL": [ + "GEL", + "lari gruziÅ„skie" + ], + "GHC": [ + "GHC", + "cedi ghaÅ„skie (1979–2007)" + ], + "GHS": [ + "GHS", + "cedi ghaÅ„ski" + ], + "GIP": [ + "GIP", + "funt gibraltarski" + ], + "GMD": [ + "GMD", + "dalasi gambijskie" + ], + "GNF": [ + "GNF", + "frank gwinejski" + ], + "GNS": [ + "GNS", + "syli gwinejskie" + ], + "GQE": [ + "GQE", + "ekwele gwinejskie Gwinei Równikowej" + ], + "GRD": [ + "GRD", + "drachma grecka" + ], + "GTQ": [ + "GTQ", + "quetzal gwatemalski" + ], + "GWE": [ + "GWE", + "escudo Gwinea Portugalska" + ], + "GWP": [ + "GWP", + "peso Guinea-Bissau" + ], + "GYD": [ + "GYD", + "dolar gujaÅ„ski" + ], + "HKD": [ + "HKD", + "dolar hongkoÅ„ski" + ], + "HNL": [ + "HNL", + "lempira honduraska" + ], + "HRD": [ + "HRD", + "dinar chorwacki" + ], + "HRK": [ + "HRK", + "kuna chorwacka" + ], + "HTG": [ + "HTG", + "gourde haitaÅ„skie" + ], + "HUF": [ + "HUF", + "forint wÄ™gierski" + ], + "IDR": [ + "IDR", + "rupia indonezyjska" + ], + "IEP": [ + "IEP", + "funt irlandzki" + ], + "ILP": [ + "ILP", + "funt izraelski" + ], + "ILS": [ + "ILS", + "nowy szekel izraelski" + ], + "INR": [ + "INR", + "rupia indyjska" + ], + "IQD": [ + "IQD", + "dinar iracki" + ], + "IRR": [ + "IRR", + "rial iraÅ„ski" + ], + "ISK": [ + "ISK", + "korona islandzka" + ], + "ITL": [ + "ITL", + "lir wÅ‚oski" + ], + "JMD": [ + "JMD", + "dolar jamajski" + ], + "JOD": [ + "JOD", + "dinar jordaÅ„ski" + ], + "JPY": [ + "JPY", + "jen japoÅ„ski" + ], + "KES": [ + "KES", + "szyling kenijski" + ], + "KGS": [ + "KGS", + "som kirgiski" + ], + "KHR": [ + "KHR", + "riel kambodżaÅ„ski" + ], + "KMF": [ + "KMF", + "frank komoryjski" + ], + "KPW": [ + "KPW", + "won północnokoreaÅ„ski" + ], + "KRW": [ + "KRW", + "won poÅ‚udniowokoreaÅ„ski" + ], + "KWD": [ + "KWD", + "dinar kuwejcki" + ], + "KYD": [ + "KYD", + "dolar kajmaÅ„ski" + ], + "KZT": [ + "KZT", + "tenge kazachskie" + ], + "LAK": [ + "LAK", + "kip laotaÅ„ski" + ], + "LBP": [ + "LBP", + "funt libaÅ„ski" + ], + "LKR": [ + "LKR", + "rupia lankijska" + ], + "LRD": [ + "LRD", + "dolar liberyjski" + ], + "LSL": [ + "LSL", + "loti Lesoto" + ], + "LTL": [ + "LTL", + "lit litewski" + ], + "LTT": [ + "LTT", + "talon litewski" + ], + "LUF": [ + "LUF", + "frank luksemburski" + ], + "LVL": [ + "LVL", + "Å‚at Å‚otewski" + ], + "LVR": [ + "LVR", + "rubel Å‚otewski" + ], + "LYD": [ + "LYD", + "dinar libijski" + ], + "MAD": [ + "MAD", + "dirham marokaÅ„ski" + ], + "MAF": [ + "MAF", + "frank marokaÅ„ski" + ], + "MDL": [ + "MDL", + "lej moÅ‚dawski" + ], + "MGA": [ + "MGA", + "ariary malgaski" + ], + "MGF": [ + "MGF", + "frank malgaski" + ], + "MKD": [ + "MKD", + "denar macedoÅ„ski" + ], + "MLF": [ + "MLF", + "frank malijski" + ], + "MMK": [ + "MMK", + "kiat birmaÅ„ski" + ], + "MNT": [ + "MNT", + "tugrik mongolski" + ], + "MOP": [ + "MOP", + "pataca Makau" + ], + "MRO": [ + "MRO", + "ouguiya mauretaÅ„ska" + ], + "MTL": [ + "MTL", + "lira maltaÅ„ska" + ], + "MTP": [ + "MTP", + "funt maltaÅ„ski" + ], + "MUR": [ + "MUR", + "rupia maurytyjska" + ], + "MVR": [ + "MVR", + "rupia malediwska" + ], + "MWK": [ + "MWK", + "kwacha malawijska" + ], + "MXN": [ + "MXN", + "peso meksykaÅ„skie" + ], + "MXP": [ + "MXP", + "peso srebrne meksykaÅ„skie (1861–1992)" + ], + "MYR": [ + "MYR", + "ringgit malezyjski" + ], + "MZE": [ + "MZE", + "escudo mozambickie" + ], + "MZM": [ + "MZM", + "metical Mozambik" + ], + "MZN": [ + "MZN", + "metical mozambicki" + ], + "NAD": [ + "NAD", + "dolar namibijski" + ], + "NGN": [ + "NGN", + "naira nigeryjska" + ], + "NIC": [ + "NIC", + "cordoba nikaraguaÅ„ska (1988–1991)" + ], + "NIO": [ + "NIO", + "cordoba nikaraguaÅ„ska" + ], + "NLG": [ + "NLG", + "gulden holenderski" + ], + "NOK": [ + "NOK", + "korona norweska" + ], + "NPR": [ + "NPR", + "rupia nepalska" + ], + "NZD": [ + "NZD", + "dolar nowozelandzki" + ], + "OMR": [ + "OMR", + "rial omaÅ„ski" + ], + "PAB": [ + "PAB", + "balboa panamski" + ], + "PEI": [ + "PEI", + "inti peruwiaÅ„ski" + ], + "PEN": [ + "PEN", + "nowy sol peruwiaÅ„ski" + ], + "PES": [ + "PES", + "sol peruwiaÅ„ski" + ], + "PGK": [ + "PGK", + "kina Papua Nowa Gwinea" + ], + "PHP": [ + "PHP", + "peso filipiÅ„skie" + ], + "PKR": [ + "PKR", + "rupia pakistaÅ„ska" + ], + "PLN": [ + "zÅ‚", + "zÅ‚oty polski" + ], + "PLZ": [ + "PLZ", + "zÅ‚oty polski (1950–1995)" + ], + "PTE": [ + "PTE", + "escudo portugalskie" + ], + "PYG": [ + "PYG", + "guarani paragwajskie" + ], + "QAR": [ + "QAR", + "rial katarski" + ], + "RHD": [ + "RHD", + "dolar rodezyjski" + ], + "ROL": [ + "ROL", + "lej rumuÅ„ski (1952–2006)" + ], + "RON": [ + "RON", + "lej rumuÅ„ski" + ], + "RSD": [ + "RSD", + "dinar serbski" + ], + "RUB": [ + "RUB", + "rubel rosyjski" + ], + "RUR": [ + "RUR", + "rubel rosyjski (1991–1998)" + ], + "RWF": [ + "RWF", + "frank ruandyjski" + ], + "SAR": [ + "SAR", + "rial saudyjski" + ], + "SBD": [ + "SBD", + "dolar Wysp Salomona" + ], + "SCR": [ + "SCR", + "rupia seszelska" + ], + "SDD": [ + "SDD", + "dinar sudaÅ„ski" + ], + "SDG": [ + "SDG", + "funt sudaÅ„ski" + ], + "SDP": [ + "SDP", + "funt sudaÅ„ski (1957–1998)" + ], + "SEK": [ + "SEK", + "korona szwedzka" + ], + "SGD": [ + "SGD", + "dolar singapurski" + ], + "SHP": [ + "SHP", + "funt Wyspy ÅšwiÄ™tej Heleny" + ], + "SIT": [ + "SIT", + "tolar sÅ‚oweÅ„ski" + ], + "SKK": [ + "SKK", + "korona sÅ‚owacka" + ], + "SLL": [ + "SLL", + "leone sierraleoÅ„ski" + ], + "SOS": [ + "SOS", + "szyling somalijski" + ], + "SRD": [ + "SRD", + "dolar surinamski" + ], + "SRG": [ + "SRG", + "gulden surinamski" + ], + "SSP": [ + "SSP", + "funt poÅ‚udniowosudaÅ„ski" + ], + "STD": [ + "STD", + "dobra Wysp ÅšwiÄ™tego Tomasza i Książęcej" + ], + "SUR": [ + "SUR", + "rubel radziecki" + ], + "SVC": [ + "SVC", + "colon salwadorski" + ], + "SYP": [ + "SYP", + "funt syryjski" + ], + "SZL": [ + "SZL", + "lilangeni Suazi" + ], + "THB": [ + "THB", + "baht tajski" + ], + "TJR": [ + "TJR", + "rubel tadżycki" + ], + "TJS": [ + "TJS", + "somoni tadżyckie" + ], + "TMM": [ + "TMM", + "manat turkmeÅ„ski (1993–2009)" + ], + "TMT": [ + "TMT", + "manat turkmeÅ„ski" + ], + "TND": [ + "TND", + "dinar tunezyjski" + ], + "TOP": [ + "TOP", + "pa’anga tongijska" + ], + "TPE": [ + "TPE", + "escudo timorskie" + ], + "TRL": [ + "TRL", + "lira turecka (1922–2005)" + ], + "TRY": [ + "TRY", + "lira turecka" + ], + "TTD": [ + "TTD", + "dolar Trynidadu i Tobago" + ], + "TWD": [ + "TWD", + "nowy dolar tajwaÅ„ski" + ], + "TZS": [ + "TZS", + "szyling tanzaÅ„ski" + ], + "UAH": [ + "UAH", + "hrywna ukraiÅ„ska" + ], + "UAK": [ + "UAK", + "karbowaniec ukraiÅ„ski" + ], + "UGS": [ + "UGS", + "szyling ugandyjski (1966–1987)" + ], + "UGX": [ + "UGX", + "szyling ugandyjski" + ], + "USD": [ + "USD", + "dolar amerykaÅ„ski" + ], + "UYP": [ + "UYP", + "peso urugwajskie (1975–1993)" + ], + "UYU": [ + "UYU", + "peso urugwajskie" + ], + "UZS": [ + "UZS", + "som uzbecki" + ], + "VEB": [ + "VEB", + "boliwar wenezuelski (1871–2008)" + ], + "VEF": [ + "VEF", + "boliwar wenezuelski" + ], + "VND": [ + "VND", + "dong wietnamski" + ], + "VUV": [ + "VUV", + "vatu wanuackie" + ], + "WST": [ + "WST", + "tala samoaÅ„skie" + ], + "XAF": [ + "FCFA", + "frank CFA BEAC" + ], + "XCD": [ + "EC$", + "dolar wschodniokaraibski" + ], + "XEU": [ + "XEU", + "ECU" + ], + "XFO": [ + "XFO", + "frank zÅ‚oty francuski" + ], + "XFU": [ + "XFU", + "UIC-frank francuski" + ], + "XOF": [ + "CFA", + "frank CFA" + ], + "XPF": [ + "CFPF", + "frank CFP" + ], + "YDD": [ + "YDD", + "dinar jemeÅ„ski" + ], + "YER": [ + "YER", + "rial jemeÅ„ski" + ], + "YUM": [ + "YUM", + "nowy dinar jugosÅ‚awiaÅ„ski" + ], + "YUN": [ + "YUN", + "dinar jugosÅ‚awiaÅ„ski wymienny" + ], + "ZAL": [ + "ZAL", + "rand poÅ‚udniowoafrykaÅ„ski (finansowy)" + ], + "ZAR": [ + "ZAR", + "rand poÅ‚udniowoafrykaÅ„ski" + ], + "ZMK": [ + "ZMK", + "kwacha zambijska (1968–2012)" + ], + "ZMW": [ + "ZMW", + "kwacha zambijska" + ], + "ZRN": [ + "ZRN", + "nowy zair zairski" + ], + "ZRZ": [ + "ZRZ", + "zair zairski" + ], + "ZWD": [ + "ZWD", + "dolar Zimbabwe (1980–2008)" + ], + "ZWL": [ + "ZWL", + "dolar Zimbabwe (2009)" + ], + "ZWR": [ + "ZWR", + "dolar Zimbabwe (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ps.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ps.json new file mode 100644 index 0000000000000000000000000000000000000000..60bb7f06f4cee6ae713ad9b86e41a542a854197e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ps.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AFN": [ + "Ø‹", + "Ø§ÙØºØ§Ù†Û" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt.json new file mode 100644 index 0000000000000000000000000000000000000000..851140363ca68cdddf4b6915623bc61ff65ef3bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt.json @@ -0,0 +1,1141 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Peseta de Andorra" + ], + "AED": [ + "AED", + "Dirrã dos Emirados Ãrabes Unidos" + ], + "AFA": [ + "AFA", + "Afegane (1927–2002)" + ], + "AFN": [ + "AFN", + "Afegane afegão" + ], + "ALK": [ + "ALK", + "Lek Albanês (1946–1965)" + ], + "ALL": [ + "ALL", + "Lek albanês" + ], + "AMD": [ + "AMD", + "Dram armênio" + ], + "ANG": [ + "ANG", + "Florim das Antilhas Holandesas" + ], + "AOA": [ + "AOA", + "Kwanza angolano" + ], + "AOK": [ + "AOK", + "Cuanza angolano (1977–1990)" + ], + "AON": [ + "AON", + "Novo cuanza angolano (1990–2000)" + ], + "AOR": [ + "AOR", + "Cuanza angolano reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "Austral argentino" + ], + "ARL": [ + "ARL", + "Peso lei argentino (1970–1983)" + ], + "ARM": [ + "ARM", + "Peso argentino (1881–1970)" + ], + "ARP": [ + "ARP", + "Peso argentino (1983–1985)" + ], + "ARS": [ + "ARS", + "Peso argentino" + ], + "ATS": [ + "ATS", + "Xelim austríaco" + ], + "AUD": [ + "AU$", + "Dólar australiano" + ], + "AWG": [ + "AWG", + "Florim arubano" + ], + "AZM": [ + "AZM", + "Manat azerbaijano (1993–2006)" + ], + "AZN": [ + "AZN", + "Manat azeri" + ], + "BAD": [ + "BAD", + "Dinar da Bósnia-Herzegovina (1992–1994)" + ], + "BAM": [ + "BAM", + "Marco bósnio-herzegovino conversível" + ], + "BAN": [ + "BAN", + "Novo dinar da Bósnia-Herzegovina (1994–1997)" + ], + "BBD": [ + "BBD", + "Dólar barbadense" + ], + "BDT": [ + "BDT", + "Taka bengalesa" + ], + "BEC": [ + "BEC", + "Franco belga (conversível)" + ], + "BEF": [ + "BEF", + "Franco belga" + ], + "BEL": [ + "BEL", + "Franco belga (financeiro)" + ], + "BGL": [ + "BGL", + "Lev forte búlgaro" + ], + "BGM": [ + "BGM", + "Lev socialista búlgaro" + ], + "BGN": [ + "BGN", + "Lev búlgaro" + ], + "BGO": [ + "BGO", + "Lev búlgaro (1879–1952)" + ], + "BHD": [ + "BHD", + "Dinar bareinita" + ], + "BIF": [ + "BIF", + "Franco burundiano" + ], + "BMD": [ + "BMD", + "Dólar bermudense" + ], + "BND": [ + "BND", + "Dólar bruneano" + ], + "BOB": [ + "BOB", + "Boliviano" + ], + "BOL": [ + "BOL", + "Boliviano (1863–1963)" + ], + "BOP": [ + "BOP", + "Peso boliviano" + ], + "BOV": [ + "BOV", + "Mvdol boliviano" + ], + "BRB": [ + "BRB", + "Cruzeiro novo brasileiro (1967–1986)" + ], + "BRC": [ + "BRC", + "Cruzado brasileiro (1986–1989)" + ], + "BRE": [ + "BRE", + "Cruzeiro brasileiro (1990–1993)" + ], + "BRL": [ + "R$", + "Real brasileiro" + ], + "BRN": [ + "BRN", + "Cruzado novo brasileiro (1989–1990)" + ], + "BRR": [ + "BRR", + "Cruzeiro brasileiro (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Cruzeiro brasileiro (1942–1967)" + ], + "BSD": [ + "BSD", + "Dólar bahamense" + ], + "BTN": [ + "BTN", + "Ngultrum butanês" + ], + "BUK": [ + "BUK", + "Kyat birmanês" + ], + "BWP": [ + "BWP", + "Pula botsuanesa" + ], + "BYB": [ + "BYB", + "Rublo novo bielo-russo (1994–1999)" + ], + "BYN": [ + "BYN", + "Rublo bielorrusso" + ], + "BYR": [ + "BYR", + "Rublo bielorrusso (2000–2016)" + ], + "BZD": [ + "BZD", + "Dólar belizenho" + ], + "CAD": [ + "CA$", + "Dólar canadense" + ], + "CDF": [ + "CDF", + "Franco congolês" + ], + "CHE": [ + "CHE", + "Euro WIR" + ], + "CHF": [ + "CHF", + "Franco suíço" + ], + "CHW": [ + "CHW", + "Franco WIR" + ], + "CLE": [ + "CLE", + "Escudo chileno" + ], + "CLF": [ + "CLF", + "Unidades de Fomento chilenas" + ], + "CLP": [ + "CLP", + "Peso chileno" + ], + "CNX": [ + "CNX", + "Dólar do Banco Popular da China" + ], + "CNY": [ + "CNÂ¥", + "Yuan chinês" + ], + "COP": [ + "COP", + "Peso colombiano" + ], + "COU": [ + "COU", + "Unidade de Valor Real" + ], + "CRC": [ + "CRC", + "Colón costarriquenho" + ], + "CSD": [ + "CSD", + "Dinar sérvio (2002–2006)" + ], + "CSK": [ + "CSK", + "Coroa Forte checoslovaca" + ], + "CUC": [ + "CUC", + "Peso cubano conversível" + ], + "CUP": [ + "CUP", + "Peso cubano" + ], + "CVE": [ + "CVE", + "Escudo cabo-verdiano" + ], + "CYP": [ + "CYP", + "Libra cipriota" + ], + "CZK": [ + "CZK", + "Coroa tcheca" + ], + "DDM": [ + "DDM", + "Ostmark da Alemanha Oriental" + ], + "DEM": [ + "DEM", + "Marco alemão" + ], + "DJF": [ + "DJF", + "Franco djibutiense" + ], + "DKK": [ + "DKK", + "Coroa dinamarquesa" + ], + "DOP": [ + "DOP", + "Peso dominicano" + ], + "DZD": [ + "DZD", + "Dinar argelino" + ], + "ECS": [ + "ECS", + "Sucre equatoriano" + ], + "ECV": [ + "ECV", + "Unidade de Valor Constante (UVC) do Equador" + ], + "EEK": [ + "EEK", + "Coroa estoniana" + ], + "EGP": [ + "EGP", + "Libra egípcia" + ], + "ERN": [ + "ERN", + "Nakfa da Eritreia" + ], + "ESA": [ + "ESA", + "Peseta espanhola (conta A)" + ], + "ESB": [ + "ESB", + "Peseta espanhola (conta conversível)" + ], + "ESP": [ + "ESP", + "Peseta espanhola" + ], + "ETB": [ + "ETB", + "Birr etíope" + ], + "EUR": [ + "€", + "Euro" + ], + "FIM": [ + "FIM", + "Marca finlandesa" + ], + "FJD": [ + "FJD", + "Dólar fijiano" + ], + "FKP": [ + "FKP", + "Libra malvinense" + ], + "FRF": [ + "FRF", + "Franco francês" + ], + "GBP": [ + "£", + "Libra britânica" + ], + "GEK": [ + "GEK", + "Cupom Lari georgiano" + ], + "GEL": [ + "GEL", + "Lari georgiano" + ], + "GHC": [ + "GHC", + "Cedi de Gana (1979–2007)" + ], + "GHS": [ + "GHS", + "Cedi ganês" + ], + "GIP": [ + "GIP", + "Libra de Gibraltar" + ], + "GMD": [ + "GMD", + "Dalasi gambiano" + ], + "GNF": [ + "GNF", + "Franco guineano" + ], + "GNS": [ + "GNS", + "Syli da Guiné" + ], + "GQE": [ + "GQE", + "Ekwele da Guiné Equatorial" + ], + "GRD": [ + "GRD", + "Dracma grego" + ], + "GTQ": [ + "GTQ", + "Quetzal guatemalense" + ], + "GWE": [ + "GWE", + "Escudo da Guiné Portuguesa" + ], + "GWP": [ + "GWP", + "Peso da Guiné-Bissau" + ], + "GYD": [ + "GYD", + "Dólar guianense" + ], + "HKD": [ + "HK$", + "Dólar de Hong Kong" + ], + "HNL": [ + "HNL", + "Lempira hondurenha" + ], + "HRD": [ + "HRD", + "Dinar croata" + ], + "HRK": [ + "HRK", + "Kuna croata" + ], + "HTG": [ + "HTG", + "Gourde haitiano" + ], + "HUF": [ + "HUF", + "Forint húngaro" + ], + "IDR": [ + "IDR", + "Rupia indonésia" + ], + "IEP": [ + "IEP", + "Libra irlandesa" + ], + "ILP": [ + "ILP", + "Libra israelita" + ], + "ILR": [ + "ILR", + "Sheqel antigo israelita" + ], + "ILS": [ + "₪", + "Sheqel novo israelita" + ], + "INR": [ + "₹", + "Rupia indiana" + ], + "IQD": [ + "IQD", + "Dinar iraquiano" + ], + "IRR": [ + "IRR", + "Rial iraniano" + ], + "ISJ": [ + "ISJ", + "Coroa antiga islandesa" + ], + "ISK": [ + "ISK", + "Coroa islandesa" + ], + "ITL": [ + "ITL", + "Lira italiana" + ], + "JMD": [ + "JMD", + "Dólar jamaicano" + ], + "JOD": [ + "JOD", + "Dinar jordaniano" + ], + "JPY": [ + "JPÂ¥", + "Iene japonês" + ], + "KES": [ + "KES", + "Xelim queniano" + ], + "KGS": [ + "KGS", + "Som quirguiz" + ], + "KHR": [ + "KHR", + "Riel cambojano" + ], + "KMF": [ + "KMF", + "Franco comorense" + ], + "KPW": [ + "KPW", + "Won norte-coreano" + ], + "KRH": [ + "KRH", + "Hwan da Coreia do Sul (1953–1962)" + ], + "KRO": [ + "KRO", + "Won da Coreia do Sul (1945–1953)" + ], + "KRW": [ + "â‚©", + "Won sul-coreano" + ], + "KWD": [ + "KWD", + "Dinar kuwaitiano" + ], + "KYD": [ + "KYD", + "Dólar das Ilhas Caiman" + ], + "KZT": [ + "KZT", + "Tenge cazaque" + ], + "LAK": [ + "LAK", + "Kip laosiano" + ], + "LBP": [ + "LBP", + "Libra libanesa" + ], + "LKR": [ + "LKR", + "Rupia ceilandesa" + ], + "LRD": [ + "LRD", + "Dólar liberiano" + ], + "LSL": [ + "LSL", + "Loti do Lesoto" + ], + "LTL": [ + "LTL", + "Litas lituano" + ], + "LTT": [ + "LTT", + "Talonas lituano" + ], + "LUC": [ + "LUC", + "Franco conversível de Luxemburgo" + ], + "LUF": [ + "LUF", + "Franco luxemburguês" + ], + "LUL": [ + "LUL", + "Franco financeiro de Luxemburgo" + ], + "LVL": [ + "LVL", + "Lats letão" + ], + "LVR": [ + "LVR", + "Rublo letão" + ], + "LYD": [ + "LYD", + "Dinar líbio" + ], + "MAD": [ + "MAD", + "Dirrã marroquino" + ], + "MAF": [ + "MAF", + "Franco marroquino" + ], + "MCF": [ + "MCF", + "Franco monegasco" + ], + "MDC": [ + "MDC", + "Cupon moldávio" + ], + "MDL": [ + "MDL", + "Leu moldávio" + ], + "MGA": [ + "MGA", + "Ariary malgaxe" + ], + "MGF": [ + "MGF", + "Franco de Madagascar" + ], + "MKD": [ + "MKD", + "Dinar macedônio" + ], + "MKN": [ + "MKN", + "Dinar macedônio (1992–1993)" + ], + "MLF": [ + "MLF", + "Franco de Mali" + ], + "MMK": [ + "MMK", + "Kyat mianmarense" + ], + "MNT": [ + "MNT", + "Tugrik mongol" + ], + "MOP": [ + "MOP", + "Pataca macaense" + ], + "MRO": [ + "MRO", + "Ouguiya mauritana" + ], + "MTL": [ + "MTL", + "Lira maltesa" + ], + "MTP": [ + "MTP", + "Libra maltesa" + ], + "MUR": [ + "MUR", + "Rupia mauriciana" + ], + "MVR": [ + "MVR", + "Rupia maldiva" + ], + "MWK": [ + "MWK", + "Kwacha malawiana" + ], + "MXN": [ + "MX$", + "Peso mexicano" + ], + "MXP": [ + "MXP", + "Peso Prata mexicano (1861–1992)" + ], + "MXV": [ + "MXV", + "Unidade Mexicana de Investimento (UDI)" + ], + "MYR": [ + "MYR", + "Ringgit malaio" + ], + "MZE": [ + "MZE", + "Escudo de Moçambique" + ], + "MZM": [ + "MZM", + "Metical de Moçambique (1980–2006)" + ], + "MZN": [ + "MZN", + "Metical moçambicano" + ], + "NAD": [ + "NAD", + "Dólar namibiano" + ], + "NGN": [ + "NGN", + "Naira nigeriana" + ], + "NIC": [ + "NIC", + "Córdoba nicaraguense (1988–1991)" + ], + "NIO": [ + "NIO", + "Córdoba nicaraguense" + ], + "NLG": [ + "NLG", + "Florim holandês" + ], + "NOK": [ + "NOK", + "Coroa norueguesa" + ], + "NPR": [ + "NPR", + "Rupia nepalesa" + ], + "NZD": [ + "NZ$", + "Dólar neozelandês" + ], + "OMR": [ + "OMR", + "Rial omanense" + ], + "PAB": [ + "PAB", + "Balboa panamenha" + ], + "PEI": [ + "PEI", + "Inti peruano" + ], + "PEN": [ + "PEN", + "Novo sol peruano" + ], + "PES": [ + "PES", + "Sol peruano (1863–1965)" + ], + "PGK": [ + "PGK", + "Kina papuásia" + ], + "PHP": [ + "PHP", + "Peso filipino" + ], + "PKR": [ + "PKR", + "Rupia paquistanesa" + ], + "PLN": [ + "PLN", + "Zloti polonês" + ], + "PLZ": [ + "PLZ", + "Zloti polonês (1950–1995)" + ], + "PTE": [ + "Esc.", + "Escudo português" + ], + "PYG": [ + "PYG", + "Guarani paraguaio" + ], + "QAR": [ + "QAR", + "Rial catariano" + ], + "RHD": [ + "RHD", + "Dólar rodesiano" + ], + "ROL": [ + "ROL", + "Leu romeno (1952–2006)" + ], + "RON": [ + "RON", + "Leu romeno" + ], + "RSD": [ + "RSD", + "Dinar sérvio" + ], + "RUB": [ + "RUB", + "Rublo russo" + ], + "RUR": [ + "RUR", + "Rublo russo (1991–1998)" + ], + "RWF": [ + "RWF", + "Franco ruandês" + ], + "SAR": [ + "SAR", + "Riyal saudita" + ], + "SBD": [ + "SBD", + "Dólar das Ilhas Salomão" + ], + "SCR": [ + "SCR", + "Rupia seichelense" + ], + "SDD": [ + "SDD", + "Dinar sudanês (1992–2007)" + ], + "SDG": [ + "SDG", + "Libra sudanesa" + ], + "SDP": [ + "SDP", + "Libra sudanesa (1957–1998)" + ], + "SEK": [ + "SEK", + "Coroa sueca" + ], + "SGD": [ + "SGD", + "Dólar singapuriano" + ], + "SHP": [ + "SHP", + "Libra de Santa Helena" + ], + "SIT": [ + "SIT", + "Tolar Bons esloveno" + ], + "SKK": [ + "SKK", + "Coroa eslovaca" + ], + "SLL": [ + "SLL", + "Leone de Serra Leoa" + ], + "SOS": [ + "SOS", + "Xelim somaliano" + ], + "SRD": [ + "SRD", + "Dólar surinamês" + ], + "SRG": [ + "SRG", + "Florim do Suriname" + ], + "SSP": [ + "SSP", + "Libra sul-sudanesa" + ], + "STD": [ + "STD", + "Dobra de São Tomé e Príncipe" + ], + "SUR": [ + "SUR", + "Rublo soviético" + ], + "SVC": [ + "SVC", + "Colom salvadorenho" + ], + "SYP": [ + "SYP", + "Libra síria" + ], + "SZL": [ + "SZL", + "Lilangeni suazi" + ], + "THB": [ + "฿", + "Baht tailandês" + ], + "TJR": [ + "TJR", + "Rublo do Tadjiquistão" + ], + "TJS": [ + "TJS", + "Somoni tadjique" + ], + "TMM": [ + "TMM", + "Manat do Turcomenistão (1993–2009)" + ], + "TMT": [ + "TMT", + "Manat turcomeno" + ], + "TND": [ + "TND", + "Dinar tunisiano" + ], + "TOP": [ + "TOP", + "PaÊ»anga tonganesa" + ], + "TPE": [ + "TPE", + "Escudo timorense" + ], + "TRL": [ + "TRL", + "Lira turca (1922–2005)" + ], + "TRY": [ + "TRY", + "Lira turca" + ], + "TTD": [ + "TTD", + "Dólar de Trinidad e Tobago" + ], + "TWD": [ + "NT$", + "Novo dólar taiwanês" + ], + "TZS": [ + "TZS", + "Xelim tanzaniano" + ], + "UAH": [ + "UAH", + "Hryvnia ucraniano" + ], + "UAK": [ + "UAK", + "Karbovanetz ucraniano" + ], + "UGS": [ + "UGS", + "Xelim ugandense (1966–1987)" + ], + "UGX": [ + "UGX", + "Xelim ugandense" + ], + "USD": [ + "US$", + "Dólar americano" + ], + "USN": [ + "USN", + "Dólar norte-americano (Dia seguinte)" + ], + "USS": [ + "USS", + "Dólar norte-americano (Mesmo dia)" + ], + "UYI": [ + "UYI", + "Peso uruguaio en unidades indexadas" + ], + "UYP": [ + "UYP", + "Peso uruguaio (1975–1993)" + ], + "UYU": [ + "UYU", + "Peso uruguaio" + ], + "UZS": [ + "UZS", + "Som uzbeque" + ], + "VEB": [ + "VEB", + "Bolívar venezuelano (1871–2008)" + ], + "VEF": [ + "VEF", + "Bolívar venezuelano" + ], + "VND": [ + "â‚«", + "Dong vietnamita" + ], + "VNN": [ + "VNN", + "Dong vietnamita (1978–1985)" + ], + "VUV": [ + "VUV", + "Vatu vanuatuense" + ], + "WST": [ + "WST", + "Tala samoano" + ], + "XAF": [ + "FCFA", + "Franco CFA de BEAC" + ], + "XCD": [ + "EC$", + "Dólar do Caribe Oriental" + ], + "XEU": [ + "XEU", + "Unidade de Moeda Europeia" + ], + "XFO": [ + "XFO", + "Franco-ouro francês" + ], + "XFU": [ + "XFU", + "Franco UIC francês" + ], + "XOF": [ + "CFA", + "Franco CFA de BCEAO" + ], + "XPF": [ + "CFPF", + "Franco CFP" + ], + "XRE": [ + "XRE", + "Fundos RINET" + ], + "YDD": [ + "YDD", + "Dinar iemenita" + ], + "YER": [ + "YER", + "Rial iemenita" + ], + "YUD": [ + "YUD", + "Dinar forte iugoslavo (1966–1990)" + ], + "YUM": [ + "YUM", + "Dinar noviy iugoslavo (1994–2002)" + ], + "YUN": [ + "YUN", + "Dinar conversível iugoslavo (1990–1992)" + ], + "YUR": [ + "YUR", + "Dinar reformado iugoslavo (1992–1993)" + ], + "ZAL": [ + "ZAL", + "Rand sul-africano (financeiro)" + ], + "ZAR": [ + "ZAR", + "Rand sul-africano" + ], + "ZMK": [ + "ZMK", + "Cuacha zambiano (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha zambiano" + ], + "ZRN": [ + "ZRN", + "Zaire Novo zairense (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Zaire zairense (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Dólar do Zimbábue (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Dólar do Zimbábue (2009)" + ], + "ZWR": [ + "ZWR", + "Dólar do Zimbábue (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_AO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_AO.json new file mode 100644 index 0000000000000000000000000000000000000000..7c4bc51a4de9d76ac9ae1c43e29ca9c1d3521b19 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_AO.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AOA": [ + "Kz", + "Kwanza angolano" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_CV.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_CV.json new file mode 100644 index 0000000000000000000000000000000000000000..8b073d6b23508f0f506c86743f55c126cd5c24a1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_CV.json @@ -0,0 +1,14 @@ +{ + "Version": "2.1.27.40", + "Names": { + "CVE": [ + "​", + "Escudo cabo-verdiano", + {} + ], + "PTE": [ + "​PTE", + "Escudo português" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_LU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_LU.json new file mode 100644 index 0000000000000000000000000000000000000000..f725c1758e39bf6f61d29f04c44a439b16c69f05 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_LU.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "LUF": [ + "F", + "Franco luxemburguês" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_MO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_MO.json new file mode 100644 index 0000000000000000000000000000000000000000..42612416d5e505e3de13a4e6500aeca2ba5878e3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_MO.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MOP": [ + "MOP$", + "Pataca de Macau" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_MZ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_MZ.json new file mode 100644 index 0000000000000000000000000000000000000000..0573e45752271cec508f493b1f3e62be5b7c4d24 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_MZ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MZN": [ + "MTn", + "Metical de Moçambique" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_PT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_PT.json new file mode 100644 index 0000000000000000000000000000000000000000..335fe3a11b267d6fd66ba3c7b19ca7090ff3658c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_PT.json @@ -0,0 +1,330 @@ +{ + "Version": "2.1.29.54", + "Names": { + "AED": [ + "AED", + "Dirham dos Emirados Ãrabes Unidos" + ], + "AFA": [ + "AFA", + "Afeghani (1927–2002)" + ], + "AFN": [ + "AFN", + "Afegani do Afeganistão" + ], + "AMD": [ + "AMD", + "Dram arménio" + ], + "AWG": [ + "AWG", + "Florim de Aruba" + ], + "AZN": [ + "AZN", + "Manat do Azerbaijão" + ], + "BAD": [ + "BAD", + "Dinar da Bósnia-Herzegóvina" + ], + "BAM": [ + "BAM", + "Marco bósnio-herzegóvino conversível" + ], + "BDT": [ + "BDT", + "Taka de Bangladesh" + ], + "BEC": [ + "BEC", + "Franco belga (convertível)" + ], + "BHD": [ + "BHD", + "Dinar baremita" + ], + "BND": [ + "BND", + "Dólar bruneíno" + ], + "BSD": [ + "BSD", + "Dólar das Bahamas" + ], + "BTN": [ + "BTN", + "Ngultrum do Butão" + ], + "BWP": [ + "BWP", + "Pula de Botswana" + ], + "BYB": [ + "BYB", + "Rublo novo bielorusso (1994–1999)" + ], + "BZD": [ + "BZD", + "Dólar belizense" + ], + "CAD": [ + "CA$", + "Dólar canadiano" + ], + "CRC": [ + "CRC", + "Colon costa-riquenho" + ], + "CYP": [ + "CYP", + "Libra de Chipre" + ], + "CZK": [ + "CZK", + "Coroa checa" + ], + "DJF": [ + "DJF", + "Franco jibutiano" + ], + "ECV": [ + "ECV", + "Unidad de Valor Constante (UVC) do Equador" + ], + "FJD": [ + "FJD", + "Dólar de Fiji" + ], + "FKP": [ + "FKP", + "Libra das Ilhas Falkland" + ], + "GBP": [ + "£", + "Libra esterlina britânica" + ], + "GHS": [ + "GHS", + "Cedi de Gana" + ], + "GMD": [ + "GMD", + "Dalasi da Gâmbia" + ], + "GNF": [ + "GNF", + "Franco guineense" + ], + "GTQ": [ + "GTQ", + "Quetzal da Guatemala" + ], + "GYD": [ + "GYD", + "Dólar da Guiana" + ], + "HNL": [ + "HNL", + "Lempira das Honduras" + ], + "KGS": [ + "KGS", + "Som do Quirguistão" + ], + "KMF": [ + "KMF", + "Franco comoriano" + ], + "KYD": [ + "KYD", + "Dólar das Ilhas Caimão" + ], + "KZT": [ + "KZT", + "Tenge do Cazaquistão" + ], + "LAK": [ + "LAK", + "Kip de Laos" + ], + "LKR": [ + "LKR", + "Rupia do Sri Lanka" + ], + "LTL": [ + "LTL", + "Litas da Lituânia" + ], + "LVL": [ + "LVL", + "Lats da Letónia" + ], + "MAD": [ + "MAD", + "Dirham marroquino" + ], + "MDL": [ + "MDL", + "Leu moldavo" + ], + "MGA": [ + "MGA", + "Ariari de Madagáscar" + ], + "MKD": [ + "MKD", + "Dinar macedónio" + ], + "MMK": [ + "MMK", + "Kyat de Mianmar" + ], + "MNT": [ + "MNT", + "Tugrik da Mongólia" + ], + "MOP": [ + "MOP", + "Pataca de Macau" + ], + "MRO": [ + "MRO", + "Ouguiya da Mauritânia" + ], + "MVR": [ + "MVR", + "Rupia das Ilhas Maldivas" + ], + "MWK": [ + "MWK", + "Kwacha do Malawi" + ], + "MXP": [ + "MXP", + "Peso Plata mexicano (1861–1992)" + ], + "MXV": [ + "MXV", + "Unidad de Inversion (UDI) mexicana" + ], + "MZN": [ + "MZN", + "Metical de Moçambique" + ], + "NAD": [ + "NAD", + "Dólar da Namíbia" + ], + "NIC": [ + "NIC", + "Córdoba nicaraguano (1988–1991)" + ], + "NIO": [ + "NIO", + "Córdoba nicaraguano" + ], + "OMR": [ + "OMR", + "Rial de Omã" + ], + "PAB": [ + "PAB", + "Balboa do Panamá" + ], + "PGK": [ + "PGK", + "Kina da Papua-Nova Guiné" + ], + "PLN": [ + "PLN", + "Zloti polaco" + ], + "PTE": [ + "​", + "Escudo português", + {} + ], + "QAR": [ + "QAR", + "Rial do Catar" + ], + "SAR": [ + "SAR", + "Rial saudita" + ], + "SGD": [ + "SGD", + "Dólar de Singapura" + ], + "SOS": [ + "SOS", + "Xelim somali" + ], + "SRD": [ + "SRD", + "Dólar do Suriname" + ], + "SZL": [ + "SZL", + "Lilangeni da Suazilândia" + ], + "THB": [ + "฿", + "Baht da Tailândia" + ], + "TJS": [ + "TJS", + "Somoni do Tajaquistão" + ], + "TMT": [ + "TMT", + "Manat do Turquemenistão" + ], + "TND": [ + "TND", + "Dinar tunisino" + ], + "TOP": [ + "TOP", + "PaÊ»anga de Tonga" + ], + "TTD": [ + "TTD", + "Dólar de Trindade e Tobago" + ], + "UAH": [ + "UAH", + "Hryvnia da Ucrânia" + ], + "USD": [ + "US$", + "Dólar dos Estados Unidos" + ], + "UZS": [ + "UZS", + "Som do Uzbequistão" + ], + "VUV": [ + "VUV", + "Vatu de Vanuatu" + ], + "XAF": [ + "FCFA", + "Franco CFA (BEAC)" + ], + "XCD": [ + "EC$", + "Dólar das Caraíbas Orientais" + ], + "XOF": [ + "CFA", + "Franco CFA (BCEAO)" + ], + "ZMK": [ + "ZMK", + "Kwacha zambiano (1968–2012)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_ST.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_ST.json new file mode 100644 index 0000000000000000000000000000000000000000..439bef558dbc5d64915eacad52b8f69d2eb8b350 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/pt_ST.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "STD": [ + "Db", + "Dobra de São Tomé e Príncipe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/qu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/qu.json new file mode 100644 index 0000000000000000000000000000000000000000..84b814eb75cd0a2665a54e2a2704b355d876fdbd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/qu.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.98", + "Names": { + "PEN": [ + "S\/", + "PEN" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/qu_BO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/qu_BO.json new file mode 100644 index 0000000000000000000000000000000000000000..bc2d907dd7ee97a317f2df084d777c4ad1992bf3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/qu_BO.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BOB": [ + "Bs", + "BOB" + ], + "PEN": [ + "PEN", + "PEN" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/qu_EC.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/qu_EC.json new file mode 100644 index 0000000000000000000000000000000000000000..2d1b810504122104092a0dfb073a12bcc18af856 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/qu_EC.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "PEN": [ + "PEN", + "PEN" + ], + "USD": [ + "$", + "USD" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/rm.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/rm.json new file mode 100644 index 0000000000000000000000000000000000000000..88d5ca726efac7856ae3a531d9a4f6a0d90faa12 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/rm.json @@ -0,0 +1,1117 @@ +{ + "Version": "2.1.28.76", + "Names": { + "ADP": [ + "ADP", + "peseta andorrana" + ], + "AED": [ + "AED", + "dirham dals Emirats Arabs Unids" + ], + "AFA": [ + "AFA", + "afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "afghani" + ], + "ALK": [ + "ALK", + "lek albanais (1947–1961)" + ], + "ALL": [ + "ALL", + "lek" + ], + "AMD": [ + "AMD", + "dram armen" + ], + "ANG": [ + "ANG", + "flurin da las Antillas Olandaisas" + ], + "AOA": [ + "AOA", + "kwanza angolan" + ], + "AOK": [ + "AOK", + "kwanza angolan (1977–1990)" + ], + "AON": [ + "AON", + "nov kwanza angolan" + ], + "AOR": [ + "AOR", + "kwanza angolan reajustado" + ], + "ARA": [ + "ARA", + "austral argentin" + ], + "ARL": [ + "ARL", + "peso argentin ley" + ], + "ARM": [ + "ARM", + "peso argentin moneda nacional" + ], + "ARP": [ + "ARP", + "peso argentin (1983–1985)" + ], + "ARS": [ + "ARS", + "peso argentin" + ], + "ATS": [ + "ATS", + "schilling austriac" + ], + "AUD": [ + "A$", + "dollar australian" + ], + "AWG": [ + "AWG", + "flurin da l’Aruba" + ], + "AZM": [ + "AZM", + "manat aserbaidschanic (1993–2006)" + ], + "AZN": [ + "AZN", + "manat aserbaidschanic" + ], + "BAD": [ + "BAD", + "dinar da la Bosnia ed Erzegovina" + ], + "BAM": [ + "BAM", + "marc convertibel bosniac" + ], + "BAN": [ + "BAN", + "nov dinar da la Bosnia ed Erzegovina" + ], + "BBD": [ + "BBD", + "dollar da Barbados" + ], + "BDT": [ + "BDT", + "taka bangladais" + ], + "BEC": [ + "BEC", + "franc beltg (convertibel)" + ], + "BEF": [ + "BEF", + "franc beltg" + ], + "BEL": [ + "BEL", + "franc beltg (finanzial)" + ], + "BGL": [ + "BGL", + "lev bulgar" + ], + "BGM": [ + "BGM", + "lev bulgar socialistic" + ], + "BGN": [ + "BGN", + "nov lev bulgar" + ], + "BGO": [ + "BGO", + "vegl lev bulgar" + ], + "BHD": [ + "BHD", + "dinar dal Bahrain" + ], + "BIF": [ + "BIF", + "franc dal Burundi" + ], + "BMD": [ + "BMD", + "dollar da las Bermudas" + ], + "BND": [ + "BND", + "dollar dal Brunei" + ], + "BOB": [ + "BOB", + "boliviano" + ], + "BOL": [ + "BOL", + "vegl boliviano" + ], + "BOP": [ + "BOP", + "peso bolivian" + ], + "BOV": [ + "BOV", + "mvdol bolivian" + ], + "BRB": [ + "BRB", + "cruzeiro novo brasilian (1967–1986)" + ], + "BRC": [ + "BRC", + "cruzado brasilian" + ], + "BRE": [ + "BRE", + "cruzeiro brasilian (1990–1993)" + ], + "BRL": [ + "R$", + "real brasilian" + ], + "BRN": [ + "BRN", + "cruzado novo brasilian" + ], + "BRR": [ + "BRR", + "cruzeiro brasilian" + ], + "BRZ": [ + "BRZ", + "vegl cruzeiro brasilian" + ], + "BSD": [ + "BSD", + "dollar da las Bahamas" + ], + "BTN": [ + "BTN", + "ngultrum butanais" + ], + "BUK": [ + "BUK", + "Kyat burmais" + ], + "BWP": [ + "BWP", + "pula da la Botswana" + ], + "BYB": [ + "BYB", + "nov rubel bieloruss (1994–1999)" + ], + "BYN": [ + "BYN", + "rubel bieloruss" + ], + "BYR": [ + "BYR", + "rubel bieloruss (2000–2016)" + ], + "BZD": [ + "BZD", + "dollar dal Belize" + ], + "CAD": [ + "CA$", + "dollar canadais" + ], + "CDF": [ + "CDF", + "franc congolais" + ], + "CHE": [ + "CHE", + "euro WIR" + ], + "CHF": [ + "CHF", + "franc svizzer" + ], + "CHW": [ + "CHW", + "franc WIR" + ], + "CLE": [ + "CLE", + "escudo chilen" + ], + "CLF": [ + "CLF", + "unidades de fomento chilenas" + ], + "CLP": [ + "CLP", + "peso chilen" + ], + "CNY": [ + "CNÂ¥", + "yuan renminbi chinais" + ], + "COP": [ + "COP", + "peso columbian" + ], + "COU": [ + "COU", + "unidad de valor real" + ], + "CRC": [ + "CRC", + "colon da la Costa Rica" + ], + "CSD": [ + "CSD", + "vegl dinar serb" + ], + "CSK": [ + "CSK", + "cruna tschecoslovaca" + ], + "CUP": [ + "CUP", + "peso cuban" + ], + "CVE": [ + "CVE", + "escudo dal Cap Verd" + ], + "CYP": [ + "CYP", + "glivra cipriota" + ], + "CZK": [ + "CZK", + "cruna tscheca" + ], + "DDM": [ + "DDM", + "marc da la Germania da l’Ost" + ], + "DEM": [ + "DEM", + "marc tudestg" + ], + "DJF": [ + "DJF", + "franc dal Dschibuti" + ], + "DKK": [ + "DKK", + "cruna danaisa" + ], + "DOP": [ + "DOP", + "peso dominican" + ], + "DZD": [ + "DZD", + "dinar algerian" + ], + "ECS": [ + "ECS", + "sucre equadorian" + ], + "ECV": [ + "ECV", + "unitad da scuntrada da l’Ecuador" + ], + "EEK": [ + "EEK", + "cruna estona" + ], + "EGP": [ + "EGP", + "glivra egipziana" + ], + "ERN": [ + "ERN", + "nakfa eritreic" + ], + "ESA": [ + "ESA", + "peseta spagnola (conto A)" + ], + "ESB": [ + "ESB", + "peseta spagnola (conto convertibel)" + ], + "ESP": [ + "ESP", + "peseta spagnola" + ], + "ETB": [ + "ETB", + "birr etiopic" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "marc finlandais" + ], + "FJD": [ + "FJD", + "dollar dal Fidschi" + ], + "FKP": [ + "FKP", + "glivra dal Falkland" + ], + "FRF": [ + "FRF", + "franc franzos" + ], + "GBP": [ + "£", + "glivra sterlina" + ], + "GEK": [ + "GEK", + "kupon larit georgian" + ], + "GEL": [ + "GEL", + "lari georgian" + ], + "GHC": [ + "GHC", + "cedi ghanais (1979–2007)" + ], + "GHS": [ + "GHS", + "cedi ghanais" + ], + "GIP": [ + "GIP", + "glivra da Gibraltar" + ], + "GMD": [ + "GMD", + "dalasi gambic" + ], + "GNF": [ + "GNF", + "franc da la Guinea" + ], + "GNS": [ + "GNS", + "syli da la Guinea" + ], + "GQE": [ + "GQE", + "ekwele da la Guinea Equatoriala" + ], + "GRD": [ + "GRD", + "drachma greca" + ], + "GTQ": [ + "GTQ", + "quetzal da la Guatemala" + ], + "GWE": [ + "GWE", + "escudo da la Guinea Portugaisa" + ], + "GWP": [ + "GWP", + "peso da la Guinea-Bissau" + ], + "GYD": [ + "GYD", + "dollar da la Guyana" + ], + "HKD": [ + "HK$", + "dollar da Hongkong" + ], + "HNL": [ + "HNL", + "lempira hondurian" + ], + "HRD": [ + "HRD", + "dinar croat" + ], + "HRK": [ + "HRK", + "kuna croata" + ], + "HTG": [ + "HTG", + "gourde haitian" + ], + "HUF": [ + "HUF", + "forint ungarais" + ], + "IDR": [ + "IDR", + "rupia indonaisa" + ], + "IEP": [ + "IEP", + "glivra indonaisa" + ], + "ILP": [ + "ILP", + "glivra israeliana" + ], + "ILR": [ + "ILR", + "vegl sheqel israelian" + ], + "ILS": [ + "₪", + "sheqel" + ], + "INR": [ + "₹", + "rupia indica" + ], + "IQD": [ + "IQD", + "dinar iracais" + ], + "IRR": [ + "IRR", + "rial iranais" + ], + "ISJ": [ + "ISJ", + "veglia cruna islandaisa" + ], + "ISK": [ + "ISK", + "cruna islandaisa" + ], + "ITL": [ + "ITL", + "lira taliana" + ], + "JMD": [ + "JMD", + "dollar giamaican" + ], + "JOD": [ + "JOD", + "dinar jordanic" + ], + "JPY": [ + "JPÂ¥", + "yen giapunais" + ], + "KES": [ + "KES", + "schilling kenian" + ], + "KGS": [ + "KGS", + "som kirghis" + ], + "KHR": [ + "KHR", + "riel cambodschan" + ], + "KMF": [ + "KMF", + "franc comorian" + ], + "KPW": [ + "KPW", + "won da la Corea dal Nord" + ], + "KRH": [ + "KRH", + "hwan da la Corea dal Sid" + ], + "KRO": [ + "KRO", + "vegl won da la Corea dal Sid" + ], + "KRW": [ + "â‚©", + "won da la Corea dal Sid" + ], + "KWD": [ + "KWD", + "dinar dal Kuwait" + ], + "KYD": [ + "KYD", + "dollar da las Inslas Cayman" + ], + "KZT": [ + "KZT", + "tenge casac" + ], + "LAK": [ + "LAK", + "kip laot" + ], + "LBP": [ + "LBP", + "glivra libanaisa" + ], + "LKR": [ + "LKR", + "rupia da la Sri Lanka" + ], + "LRD": [ + "LRD", + "dollar liberian" + ], + "LSL": [ + "LSL", + "loti dal Lesotho" + ], + "LTL": [ + "LTL", + "litas lituan" + ], + "LTT": [ + "LTT", + "talonas lituan" + ], + "LUC": [ + "LUC", + "franc convertibel luxemburgais" + ], + "LUF": [ + "LUF", + "franc luxemburgais" + ], + "LUL": [ + "LUL", + "franc finanzial luxemburgais" + ], + "LVL": [ + "LVL", + "lats letton" + ], + "LVR": [ + "LVR", + "rubel letton" + ], + "LYD": [ + "LYD", + "dinar libic" + ], + "MAD": [ + "MAD", + "dirham marocan" + ], + "MAF": [ + "MAF", + "franc marocan" + ], + "MCF": [ + "MCF", + "franc monegas" + ], + "MDC": [ + "MDC", + "cupon moldav" + ], + "MDL": [ + "MDL", + "leu moldav" + ], + "MGA": [ + "MGA", + "ariary madagasc" + ], + "MGF": [ + "MGF", + "franc madagasc" + ], + "MKD": [ + "MKD", + "dinar da la Macedonia" + ], + "MKN": [ + "MKN", + "vegl dinar macedon" + ], + "MLF": [ + "MLF", + "franc dal Mali" + ], + "MMK": [ + "MMK", + "Kyat dal Myanmar" + ], + "MNT": [ + "MNT", + "tugrik mongolic" + ], + "MOP": [ + "MOP", + "pataca dal Macao" + ], + "MRO": [ + "MRO", + "ouguiya da la Mauretania" + ], + "MTL": [ + "MTL", + "lira maltaisa" + ], + "MTP": [ + "MTP", + "glivra maltaisa" + ], + "MUR": [ + "MUR", + "rupia dal Mauritius" + ], + "MVP": [ + "MVP", + "rupia da las Maledivas" + ], + "MVR": [ + "MVR", + "rufiyaa da las Maledivas" + ], + "MWK": [ + "MWK", + "kwacha dal Malawi" + ], + "MXN": [ + "MX$", + "peso mexican" + ], + "MXP": [ + "MXP", + "peso d’argient mexican (1861–1992)" + ], + "MXV": [ + "MXV", + "unidad de inversion mexicana (UDI)" + ], + "MYR": [ + "MYR", + "ringgit da la Malaisia" + ], + "MZE": [ + "MZE", + "escudo dal mozambican" + ], + "MZM": [ + "MZM", + "vegl metical mozambican" + ], + "MZN": [ + "MZN", + "metical dal mozambican" + ], + "NAD": [ + "NAD", + "dollar namibian" + ], + "NGN": [ + "NGN", + "naira nigeriana" + ], + "NIC": [ + "NIC", + "cordoba nicaraguan" + ], + "NIO": [ + "NIO", + "cordoba oro nicaraguan" + ], + "NLG": [ + "NLG", + "flurin ollandais" + ], + "NOK": [ + "NOK", + "cruna norvegiaisa" + ], + "NPR": [ + "NPR", + "rupia nepalaisa" + ], + "NZD": [ + "NZ$", + "dollar da la Nova Zelanda" + ], + "OMR": [ + "OMR", + "rial da l’Oman" + ], + "PAB": [ + "PAB", + "balboa dal Panama" + ], + "PEI": [ + "PEI", + "inti peruan" + ], + "PEN": [ + "PEN", + "nov sol peruan" + ], + "PES": [ + "PES", + "sol peruan" + ], + "PGK": [ + "PGK", + "kina da la Papua Nova Guinea" + ], + "PHP": [ + "PHP", + "peso filippin" + ], + "PKR": [ + "PKR", + "rupia pakistana" + ], + "PLN": [ + "PLN", + "zloty polac" + ], + "PLZ": [ + "PLZ", + "zloty polac (1950–1995)" + ], + "PTE": [ + "PTE", + "escudo portugais" + ], + "PYG": [ + "PYG", + "guarani paraguaian" + ], + "QAR": [ + "QAR", + "riyal da Katar" + ], + "RHD": [ + "RHD", + "dollar rodesian" + ], + "ROL": [ + "ROL", + "vegl leu rumen" + ], + "RON": [ + "RON", + "leu rumen" + ], + "RSD": [ + "RSD", + "dinar serb" + ], + "RUB": [ + "RUB", + "rubel russ (nov)" + ], + "RUR": [ + "RUR", + "rubel russ (vegl)" + ], + "RWF": [ + "RWF", + "franc ruandais" + ], + "SAR": [ + "SAR", + "riyal saudit" + ], + "SBD": [ + "SBD", + "dollar da las Salomonas" + ], + "SCR": [ + "SCR", + "rupia da las Seychellas" + ], + "SDD": [ + "SDD", + "dinar sudanais" + ], + "SDG": [ + "SDG", + "glivra sudanaisa" + ], + "SDP": [ + "SDP", + "glivra sudanaisa (1956–2007)" + ], + "SEK": [ + "SEK", + "cruna svedaisa" + ], + "SGD": [ + "SGD", + "dollar dal Singapur" + ], + "SHP": [ + "SHP", + "glivra da Sontg’Elena" + ], + "SIT": [ + "SIT", + "tolar sloven" + ], + "SKK": [ + "SKK", + "cruna slovaca" + ], + "SLL": [ + "SLL", + "leone da la Sierra Leone" + ], + "SOS": [ + "SOS", + "schilling somalian" + ], + "SRD": [ + "SRD", + "dollar surinam" + ], + "SRG": [ + "SRG", + "flurin surinam" + ], + "STD": [ + "STD", + "dobra da São Tomé e Principe" + ], + "SUR": [ + "SUR", + "rubel sovietic" + ], + "SVC": [ + "SVC", + "colon da l’El Salvador" + ], + "SYP": [ + "SYP", + "glivra siriana" + ], + "SZL": [ + "SZL", + "lilangeni dal Swaziland" + ], + "THB": [ + "THB", + "baht tailandais" + ], + "TJR": [ + "TJR", + "rubel dal Tadschikistan" + ], + "TJS": [ + "TJS", + "somoni dal Tadschikistan" + ], + "TMM": [ + "TMM", + "manat turkmen" + ], + "TND": [ + "TND", + "dinar tunesian" + ], + "TOP": [ + "TOP", + "pa’anga da Tonga" + ], + "TPE": [ + "TPE", + "escudo da Timor" + ], + "TRL": [ + "TRL", + "lira tirca" + ], + "TRY": [ + "TRY", + "nova lira tirca" + ], + "TTD": [ + "TTD", + "dollar da Trinidad e Tobago" + ], + "TWD": [ + "NT$", + "nov dollar taiwanais" + ], + "TZS": [ + "TZS", + "schilling tansanian" + ], + "UAH": [ + "UAH", + "hryvnia ucranais" + ], + "UAK": [ + "UAK", + "karbovanetz ucranais" + ], + "UGS": [ + "UGS", + "schilling ucranais" + ], + "UGX": [ + "UGX", + "schilling ugandais" + ], + "USD": [ + "US$", + "dollar dals Stadis Unids da l’America" + ], + "USN": [ + "USN", + "dollar dals Stadis Unids da l’America (proxim di)" + ], + "USS": [ + "USS", + "dollar dals Stadis Unids da l’America (medem di)" + ], + "UYI": [ + "UYI", + "peso da l’Uruguay (unidades indexadas)" + ], + "UYP": [ + "UYP", + "nov peso da l’Uruguay (1975–1993)" + ], + "UYU": [ + "UYU", + "peso da l’Uruguay" + ], + "UZS": [ + "UZS", + "sum usbec" + ], + "VEB": [ + "VEB", + "bolivar venezuelan (1871–2008)" + ], + "VEF": [ + "VEF", + "bolivar venezuelan" + ], + "VND": [ + "â‚«", + "dong vietnamais" + ], + "VNN": [ + "VNN", + "vegl dong vietnamais" + ], + "VUV": [ + "VUV", + "vatu dal Vanuatu" + ], + "WST": [ + "WST", + "tala da la Samoa" + ], + "XAF": [ + "FCFA", + "franc CFA BEAC" + ], + "XCD": [ + "EC$", + "dollar da la Caribica Orientala" + ], + "XFO": [ + "XFO", + "franc d’aur franzos" + ], + "XFU": [ + "XFU", + "franc UIC franzos" + ], + "XOF": [ + "CFA", + "franc CFA BCEAO" + ], + "XPF": [ + "CFPF", + "franc CFP" + ], + "XRE": [ + "XRE", + "fonds RINET" + ], + "YDD": [ + "YDD", + "dinar dal Jemen" + ], + "YER": [ + "YER", + "rial dal Jemen" + ], + "YUD": [ + "YUD", + "dinar jugoslav (1966–1990)" + ], + "YUM": [ + "YUM", + "nov dinar jugoslav" + ], + "YUN": [ + "YUN", + "dinar jugoslav convertibel" + ], + "YUR": [ + "YUR", + "dinar jugoslav refurmà" + ], + "ZAL": [ + "ZAL", + "rand sidafrican (finanzial)" + ], + "ZAR": [ + "ZAR", + "rand sidafrican" + ], + "ZMK": [ + "ZMK", + "kwacha da la sambia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "kwacha da la sambia" + ], + "ZRN": [ + "ZRN", + "nov zaire dal Zaire" + ], + "ZRZ": [ + "ZRZ", + "zaire dal Zaire" + ], + "ZWD": [ + "ZWD", + "dollar dal Simbabwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/rn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/rn.json new file mode 100644 index 0000000000000000000000000000000000000000..a7ea2cf6f6f86b0026132f09939c295751f9073d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/rn.json @@ -0,0 +1,217 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AED": [ + "AED", + "Idiramu ryo muri Leta Zunze Ubumwe z’Abarabu" + ], + "AOA": [ + "AOA", + "Ikwanza ryo muri Angola" + ], + "AUD": [ + "A$", + "Idolari ryo muri Ositaraliya" + ], + "BHD": [ + "BHD", + "Idinari ry’iribahireyini" + ], + "BIF": [ + "FBu", + "Ifaranga ry’Uburundi" + ], + "BWP": [ + "BWP", + "Ipula ryo muri Botswana" + ], + "CAD": [ + "CA$", + "Idolari rya Kanada" + ], + "CDF": [ + "CDF", + "Ifaranga rya Kongo" + ], + "CHF": [ + "CHF", + "Ifaranga ry’Ubusuwisi" + ], + "CNY": [ + "CNÂ¥", + "Iyuwani ryo mu Bushinwa" + ], + "CVE": [ + "CVE", + "Irikaboveridiyano ryo muri Esikudo" + ], + "DJF": [ + "DJF", + "Ifaranga ryo muri Jibuti" + ], + "DZD": [ + "DZD", + "Idinari ryo muri Alijeriya" + ], + "EGP": [ + "EGP", + "Ipawundi rya Misiri" + ], + "ERN": [ + "ERN", + "Irinakufa ryo muri Eritereya" + ], + "ETB": [ + "ETB", + "Ibiri ryo muri Etiyopiya" + ], + "EUR": [ + "€", + "Iyero" + ], + "GBP": [ + "£", + "Ipawundi ryo mu Bwongereza" + ], + "GHC": [ + "GHC", + "Icedi ryo muri Gana" + ], + "GMD": [ + "GMD", + "Idalasi ryo muri Gambiya" + ], + "GNS": [ + "GNS", + "Ifaranga ryo muri Gineya" + ], + "INR": [ + "₹", + "Irupiya ryo mu Buhindi" + ], + "JPY": [ + "JPÂ¥", + "Iyeni ry’Ubuyapani" + ], + "KES": [ + "KES", + "Ishilingi rya Kenya" + ], + "KMF": [ + "KMF", + "Ifaranga rya Komore" + ], + "LRD": [ + "LRD", + "Idolari rya Liberiya" + ], + "LSL": [ + "LSL", + "Iloti ryo muro Lesoto" + ], + "LYD": [ + "LYD", + "Idinari rya Libiya" + ], + "MAD": [ + "MAD", + "Idiramu ryo muri Maroke" + ], + "MGA": [ + "MGA", + "Iriyari ryo muri Madagasikari" + ], + "MRO": [ + "MRO", + "Ugwiya ryo muri Moritaniya" + ], + "MUR": [ + "MUR", + "Irupiya ryo mu birwa bya Morise" + ], + "MWK": [ + "MWK", + "Ikwaca ryo muri Malawi" + ], + "MZM": [ + "MZM", + "Irimetikali ryo muri Mozambike" + ], + "NAD": [ + "NAD", + "Idolari rya Namibiya" + ], + "NGN": [ + "NGN", + "Inayira ryo muri Nijeriya" + ], + "RWF": [ + "RWF", + "Ifaranga ry’u Rwanda" + ], + "SAR": [ + "SAR", + "Iriyari ryo muri Arabiya Sawudite" + ], + "SCR": [ + "SCR", + "Irupiya ryo mu birwa bya Sayisheli" + ], + "SDG": [ + "SDG", + "Ipawundi rya Sudani" + ], + "SHP": [ + "SHP", + "Ipawundi rya Sente Helena" + ], + "SLL": [ + "SLL", + "Ilewone" + ], + "SOS": [ + "SOS", + "Ishilingi ryo muri Somaliya" + ], + "STD": [ + "STD", + "Idobura ryo muri Sawotome na Perensipe" + ], + "SZL": [ + "SZL", + "Ililangeni" + ], + "TND": [ + "TND", + "Idinari ryo muri Tuniziya" + ], + "TZS": [ + "TZS", + "Ishilingi rya Tanzaniya" + ], + "UGX": [ + "UGX", + "Ishilingi ry’Ubugande" + ], + "USD": [ + "US$", + "Idolari ry’abanyamerika" + ], + "ZAR": [ + "ZAR", + "Irandi ryo muri Afurika y’Epfo" + ], + "ZMK": [ + "ZMK", + "Ikwaca ryo muri Zambiya (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Ikwaca ryo muri Zambiya" + ], + "ZWD": [ + "ZWD", + "Idolari ryo muri Zimbabwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ro.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ro.json new file mode 100644 index 0000000000000000000000000000000000000000..b855540f34bee5d936c5155d877367e420cab815 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ro.json @@ -0,0 +1,949 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "pesetă andorrană" + ], + "AED": [ + "AED", + "dirham din Emiratele Arabe Unite" + ], + "AFN": [ + "AFN", + "afgani afgan" + ], + "ALL": [ + "ALL", + "leka albaneză" + ], + "AMD": [ + "AMD", + "dram armenesc" + ], + "ANG": [ + "ANG", + "gulden din Antilele Olandeze" + ], + "AOA": [ + "AOA", + "kwanza angoleză" + ], + "ARP": [ + "ARP", + "peso argentinian (1983–1985)" + ], + "ARS": [ + "ARS", + "peso argentinian" + ], + "ATS": [ + "ATS", + "È™iling austriac" + ], + "AUD": [ + "AUD", + "dolar australian" + ], + "AWG": [ + "AWG", + "florin aruban" + ], + "AZM": [ + "AZM", + "manat azer (1993–2006)" + ], + "AZN": [ + "AZN", + "manat azer" + ], + "BAD": [ + "BAD", + "dinar Bosnia-HerÈ›egovina (1992–1994)" + ], + "BAM": [ + "BAM", + "marcă convertibilă din Bosnia È™i HerÈ›egovina" + ], + "BBD": [ + "BBD", + "dolar din Barbados" + ], + "BDT": [ + "BDT", + "taka din Bangladesh" + ], + "BEC": [ + "BEC", + "franc belgian (convertibil)" + ], + "BEF": [ + "BEF", + "franc belgian" + ], + "BEL": [ + "BEL", + "franc belgian (financiar)" + ], + "BGN": [ + "BGN", + "leva bulgărească" + ], + "BHD": [ + "BHD", + "dinar din Bahrain" + ], + "BIF": [ + "BIF", + "franc burundez" + ], + "BMD": [ + "BMD", + "dolar din Bermuda" + ], + "BND": [ + "BND", + "dolar din Brunei" + ], + "BOB": [ + "BOB", + "boliviano bolivian" + ], + "BOP": [ + "BOP", + "peso bolivian" + ], + "BOV": [ + "BOV", + "mvdol bolivian" + ], + "BRE": [ + "BRE", + "cruzeiro brazilian (1990–1993)" + ], + "BRL": [ + "BRL", + "real brazilian" + ], + "BRR": [ + "BRR", + "cruzeiro brazilian (1993–1994)" + ], + "BSD": [ + "BSD", + "dolar din Bahamas" + ], + "BTN": [ + "BTN", + "ngultrum din Bhutan" + ], + "BUK": [ + "BUK", + "kyat birman" + ], + "BWP": [ + "BWP", + "pula Botswana" + ], + "BYN": [ + "BYN", + "rublă belarusă" + ], + "BYR": [ + "BYR", + "rublă belarusă (2000–2016)" + ], + "BZD": [ + "BZD", + "dolar din Belize" + ], + "CAD": [ + "CAD", + "dolar canadian" + ], + "CDF": [ + "CDF", + "franc congolez" + ], + "CHF": [ + "CHF", + "franc elveÈ›ian" + ], + "CLP": [ + "CLP", + "peso chilian" + ], + "CNY": [ + "CNY", + "yuan chinezesc" + ], + "COP": [ + "COP", + "peso columbian" + ], + "CRC": [ + "CRC", + "colon costarican" + ], + "CSD": [ + "CSD", + "dinar Serbia È™i Muntenegru (2002–2006)" + ], + "CUC": [ + "CUC", + "peso cubanez convertibil" + ], + "CUP": [ + "CUP", + "peso cubanez" + ], + "CVE": [ + "CVE", + "escudo din Capul Verde" + ], + "CYP": [ + "CYP", + "liră cipriotă" + ], + "CZK": [ + "CZK", + "coroană cehă" + ], + "DDM": [ + "DDM", + "marcă est-germană" + ], + "DEM": [ + "DEM", + "marcă germană" + ], + "DJF": [ + "DJF", + "franc djiboutian" + ], + "DKK": [ + "DKK", + "coroană daneză" + ], + "DOP": [ + "DOP", + "peso dominican" + ], + "DZD": [ + "DZD", + "dinar algerian" + ], + "ECS": [ + "ECS", + "sucre Ecuador" + ], + "EEK": [ + "EEK", + "coroană estoniană" + ], + "EGP": [ + "EGP", + "liră egipteană" + ], + "ERN": [ + "ERN", + "nakfa eritreeană" + ], + "ESA": [ + "ESA", + "peseta spaniolă (cont A)" + ], + "ESB": [ + "ESB", + "peseta spaniolă (cont convertibil)" + ], + "ESP": [ + "ESP", + "pesetă spaniolă" + ], + "ETB": [ + "ETB", + "birr etiopian" + ], + "EUR": [ + "EUR", + "euro" + ], + "FIM": [ + "FIM", + "marcă finlandeză" + ], + "FJD": [ + "FJD", + "dolar fijian" + ], + "FKP": [ + "FKP", + "liră din Insulele Falkland" + ], + "FRF": [ + "FRF", + "franc francez" + ], + "GBP": [ + "GBP", + "liră sterlină" + ], + "GEL": [ + "GEL", + "lari georgian" + ], + "GHC": [ + "GHC", + "cedi Ghana (1979–2007)" + ], + "GHS": [ + "GHS", + "cedi ghanez" + ], + "GIP": [ + "GIP", + "liră din Gibraltar" + ], + "GMD": [ + "GMD", + "dalasi din Gambia" + ], + "GNF": [ + "GNF", + "franc guineean" + ], + "GRD": [ + "GRD", + "drahmă grecească" + ], + "GTQ": [ + "GTQ", + "quetzal guatemalez" + ], + "GWP": [ + "GWP", + "peso Guineea-Bissau" + ], + "GYD": [ + "GYD", + "dolar guyanez" + ], + "HKD": [ + "HKD", + "dolar din Hong Kong" + ], + "HNL": [ + "HNL", + "lempira honduriană" + ], + "HRD": [ + "HRD", + "dinar croat" + ], + "HRK": [ + "HRK", + "kuna croată" + ], + "HTG": [ + "HTG", + "gourde din Haiti" + ], + "HUF": [ + "HUF", + "forint maghiar" + ], + "IDR": [ + "IDR", + "rupie indoneziană" + ], + "IEP": [ + "IEP", + "liră irlandeză" + ], + "ILP": [ + "ILP", + "liră israeliană" + ], + "ILS": [ + "ILS", + "È™echel israelian nou" + ], + "INR": [ + "INR", + "rupie indiană" + ], + "IQD": [ + "IQD", + "dinar irakian" + ], + "IRR": [ + "IRR", + "rial iranian" + ], + "ISK": [ + "ISK", + "coroană islandeză" + ], + "ITL": [ + "ITL", + "liră italiană" + ], + "JMD": [ + "JMD", + "dolar jamaican" + ], + "JOD": [ + "JOD", + "dinar iordanian" + ], + "JPY": [ + "JPY", + "yen japonez" + ], + "KES": [ + "KES", + "È™iling kenyan" + ], + "KGS": [ + "KGS", + "som kârgâz" + ], + "KHR": [ + "KHR", + "riel cambodgian" + ], + "KMF": [ + "KMF", + "franc comorian" + ], + "KPW": [ + "KPW", + "won nord-coreean" + ], + "KRW": [ + "KRW", + "won sud-coreean" + ], + "KWD": [ + "KWD", + "dinar kuweitian" + ], + "KYD": [ + "KYD", + "dolar din Insulele Cayman" + ], + "KZT": [ + "KZT", + "tenge kazahă" + ], + "LAK": [ + "LAK", + "kip laoÈ›ian" + ], + "LBP": [ + "LBP", + "liră libaneză" + ], + "LKR": [ + "LKR", + "rupie srilankeză" + ], + "LRD": [ + "LRD", + "dolar liberian" + ], + "LSL": [ + "LSL", + "loti lesothian" + ], + "LTL": [ + "LTL", + "litu lituanian" + ], + "LUC": [ + "LUC", + "franc convertibil luxemburghez" + ], + "LUF": [ + "LUF", + "franc luxemburghez" + ], + "LUL": [ + "LUL", + "franc financiar luxemburghez" + ], + "LVL": [ + "LVL", + "lats letonian" + ], + "LVR": [ + "LVR", + "rublă Letonia" + ], + "LYD": [ + "LYD", + "dinar libian" + ], + "MAD": [ + "MAD", + "dirham marocan" + ], + "MAF": [ + "MAF", + "franc marocan" + ], + "MDL": [ + "MDL", + "leu moldovenesc" + ], + "MGA": [ + "MGA", + "ariary malgaÈ™" + ], + "MGF": [ + "MGF", + "franc Madagascar" + ], + "MKD": [ + "MKD", + "dinar macedonean" + ], + "MLF": [ + "MLF", + "franc Mali" + ], + "MMK": [ + "MMK", + "kyat din Myanmar" + ], + "MNT": [ + "MNT", + "tugrik mongol" + ], + "MOP": [ + "MOP", + "pataca din Macao" + ], + "MRO": [ + "MRO", + "ouguiya mauritană" + ], + "MTL": [ + "MTL", + "liră malteză" + ], + "MUR": [ + "MUR", + "rupie mauritiană" + ], + "MVR": [ + "MVR", + "rufiyaa maldiviană" + ], + "MWK": [ + "MWK", + "kwacha malawiană" + ], + "MXN": [ + "MXN", + "peso mexican" + ], + "MXP": [ + "MXP", + "peso mexican de argint (1861–1992)" + ], + "MYR": [ + "MYR", + "ringgit malaiezian" + ], + "MZE": [ + "MZE", + "escudo Mozambic" + ], + "MZM": [ + "MZM", + "metical Mozambic vechi" + ], + "MZN": [ + "MZN", + "metical mozambican" + ], + "NAD": [ + "NAD", + "dolar namibian" + ], + "NGN": [ + "NGN", + "naira nigeriană" + ], + "NIC": [ + "NIC", + "cordoba nicaraguană (1988–1991)" + ], + "NIO": [ + "NIO", + "cordoba nicaraguană" + ], + "NLG": [ + "NLG", + "gulden olandez" + ], + "NOK": [ + "NOK", + "coroană norvegiană" + ], + "NPR": [ + "NPR", + "rupie nepaleză" + ], + "NZD": [ + "NZD", + "dolar neozeelandez" + ], + "OMR": [ + "OMR", + "rial omanez" + ], + "PAB": [ + "PAB", + "balboa panameză" + ], + "PEI": [ + "PEI", + "inti peruvian" + ], + "PEN": [ + "PEN", + "sol nou peruvian" + ], + "PES": [ + "PES", + "sol peruvian (1863–1965)" + ], + "PGK": [ + "PGK", + "kina din Papua-Noua Guinee" + ], + "PHP": [ + "PHP", + "peso filipinez" + ], + "PKR": [ + "PKR", + "rupie pakistaneză" + ], + "PLN": [ + "PLN", + "zlot polonez" + ], + "PLZ": [ + "PLZ", + "zlot polonez (1950–1995)" + ], + "PYG": [ + "PYG", + "guarani paraguayan" + ], + "QAR": [ + "QAR", + "rial qatarian" + ], + "RHD": [ + "RHD", + "dolar rhodesian" + ], + "ROL": [ + "ROL", + "leu românesc (1952–2006)" + ], + "RON": [ + "RON", + "leu românesc" + ], + "RSD": [ + "RSD", + "dinar sârbesc" + ], + "RUB": [ + "RUB", + "rublă rusească" + ], + "RWF": [ + "RWF", + "franc rwandez" + ], + "SAR": [ + "SAR", + "rial saudit" + ], + "SBD": [ + "SBD", + "dolar din Insulele Solomon" + ], + "SCR": [ + "SCR", + "rupie din Seychelles" + ], + "SDD": [ + "SDD", + "dinar sudanez" + ], + "SDG": [ + "SDG", + "liră sudaneză" + ], + "SDP": [ + "SDP", + "liră sudaneză (1957–1998)" + ], + "SEK": [ + "SEK", + "coroană suedeză" + ], + "SGD": [ + "SGD", + "dolar singaporez" + ], + "SHP": [ + "SHP", + "liră Insula Sf. Elena" + ], + "SIT": [ + "SIT", + "tolar sloven" + ], + "SKK": [ + "SKK", + "coroană slovacă" + ], + "SLL": [ + "SLL", + "leone din Sierra Leone" + ], + "SOS": [ + "SOS", + "È™iling somalez" + ], + "SRD": [ + "SRD", + "dolar surinamez" + ], + "SRG": [ + "SRG", + "gulden Surinam" + ], + "SSP": [ + "SSP", + "liră din Sudanul de Sud" + ], + "STD": [ + "STD", + "dobra Sao Tome È™i Principe" + ], + "SUR": [ + "SUR", + "rublă sovietică" + ], + "SVC": [ + "SVC", + "colon El Salvador" + ], + "SYP": [ + "SYP", + "liră siriană" + ], + "SZL": [ + "SZL", + "lilangeni din Swaziland" + ], + "THB": [ + "THB", + "baht thailandez" + ], + "TJR": [ + "TJR", + "rublă Tadjikistan" + ], + "TJS": [ + "TJS", + "somoni tadjic" + ], + "TMM": [ + "TMM", + "manat turkmen (1993–2009)" + ], + "TMT": [ + "TMT", + "manat turkmen" + ], + "TND": [ + "TND", + "dinar tunisian" + ], + "TOP": [ + "TOP", + "pa’anga tongană" + ], + "TRL": [ + "TRL", + "liră turcească (1922–2005)" + ], + "TRY": [ + "TRY", + "liră turcească" + ], + "TTD": [ + "TTD", + "dolar din Trinidad-Tobago" + ], + "TWD": [ + "TWD", + "dolar nou din Taiwan" + ], + "TZS": [ + "TZS", + "È™iling tanzanian" + ], + "UAH": [ + "UAH", + "hryvna ucraineană" + ], + "UAK": [ + "UAK", + "carboavă ucraineană" + ], + "UGS": [ + "UGS", + "È™iling ugandez (1966–1987)" + ], + "UGX": [ + "UGX", + "È™iling ugandez" + ], + "USD": [ + "USD", + "dolar american" + ], + "USN": [ + "USN", + "dolar american (ziua următoare)" + ], + "USS": [ + "USS", + "dolar american (aceeaÈ™i zi)" + ], + "UYP": [ + "UYP", + "peso Uruguay (1975–1993)" + ], + "UYU": [ + "UYU", + "peso uruguayan" + ], + "UZS": [ + "UZS", + "sum Uzbekistan" + ], + "VEB": [ + "VEB", + "bolivar Venezuela (1871–2008)" + ], + "VEF": [ + "VEF", + "bolivar venezuelean" + ], + "VND": [ + "VND", + "dong vietnamez" + ], + "VUV": [ + "VUV", + "vatu din Vanuatu" + ], + "WST": [ + "WST", + "tala samoană" + ], + "XAF": [ + "FCFA", + "franc CFA BEAC" + ], + "XCD": [ + "XCD", + "dolar din Caraibele de Est" + ], + "XEU": [ + "XEU", + "unitate de monedă europeană" + ], + "XFO": [ + "XFO", + "franc francez de aur" + ], + "XFU": [ + "XFU", + "franc UIC francez" + ], + "XOF": [ + "CFA", + "franc CFA BCEAO" + ], + "XPF": [ + "CFPF", + "franc CFP" + ], + "YDD": [ + "YDD", + "dinar Yemen" + ], + "YER": [ + "YER", + "rial yemenit" + ], + "YUD": [ + "YUD", + "dinar iugoslav greu" + ], + "YUM": [ + "YUM", + "dinar iugoslav nou" + ], + "YUN": [ + "YUN", + "dinar iugoslav convertibil" + ], + "ZAL": [ + "ZAL", + "rand sud-african (financiar)" + ], + "ZAR": [ + "ZAR", + "rand sud-african" + ], + "ZMK": [ + "ZMK", + "kwacha zambian (1968–2012)" + ], + "ZMW": [ + "ZMW", + "kwacha zambian" + ], + "ZRN": [ + "ZRN", + "zair nou" + ], + "ZWD": [ + "ZWD", + "dolar Zimbabwe (1980–2008)" + ], + "ZWL": [ + "ZWL", + "dolar Zimbabwe (2009)" + ], + "ZWR": [ + "ZWR", + "dolar Zimbabwe (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ro_MD.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ro_MD.json new file mode 100644 index 0000000000000000000000000000000000000000..115ae26c95496233f9c25aac318b5cba123eac83 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ro_MD.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "MDL": [ + "L", + "leu moldovenesc" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/root.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/root.json new file mode 100644 index 0000000000000000000000000000000000000000..3926cb92c34ae5fda1ee845127e1780287ecaa84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/root.json @@ -0,0 +1,85 @@ +{ + "Version": "2.1.30.58", + "Names": { + "AUD": [ + "A$", + "AUD" + ], + "BRL": [ + "R$", + "BRL" + ], + "CAD": [ + "CA$", + "CAD" + ], + "CNY": [ + "CNÂ¥", + "CNY" + ], + "EUR": [ + "€", + "EUR" + ], + "GBP": [ + "£", + "GBP" + ], + "HKD": [ + "HK$", + "HKD" + ], + "ILS": [ + "₪", + "ILS" + ], + "INR": [ + "₹", + "INR" + ], + "JPY": [ + "JPÂ¥", + "JPY" + ], + "KRW": [ + "â‚©", + "KRW" + ], + "MXN": [ + "MX$", + "MXN" + ], + "NZD": [ + "NZ$", + "NZD" + ], + "TWD": [ + "NT$", + "TWD" + ], + "USD": [ + "US$", + "USD" + ], + "VND": [ + "â‚«", + "VND" + ], + "XAF": [ + "FCFA", + "XAF" + ], + "XCD": [ + "EC$", + "XCD" + ], + "XOF": [ + "CFA", + "XOF" + ], + "XPF": [ + "CFPF", + "XPF" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru.json new file mode 100644 index 0000000000000000000000000000000000000000..7a7df0ab6e271b443f0ff0714de60b909afdd44b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru.json @@ -0,0 +1,1061 @@ +{ + "Version": "2.1.29.20", + "Names": { + "ADP": [ + "ADP", + "ÐндоррÑÐºÐ°Ñ Ð¿ÐµÑета" + ], + "AED": [ + "AED", + "Дирхам ОÐЭ" + ], + "AFA": [ + "AFA", + "Ðфгани (1927–2002)" + ], + "AFN": [ + "AFN", + "Ðфгани" + ], + "ALL": [ + "ALL", + "ÐлбанÑкий лек" + ], + "AMD": [ + "AMD", + "ÐрмÑнÑкий драм" + ], + "ANG": [ + "ANG", + "ÐидерландÑкий антильÑкий гульден" + ], + "AOA": [ + "AOA", + "ÐнгольÑÐºÐ°Ñ ÐºÐ²Ð°Ð½Ð·Ð°" + ], + "AOK": [ + "AOK", + "ÐнгольÑÐºÐ°Ñ ÐºÐ²Ð°Ð½Ð·Ð° (1977–1990)" + ], + "AON": [ + "AON", + "ÐнгольÑÐºÐ°Ñ Ð½Ð¾Ð²Ð°Ñ ÐºÐ²Ð°Ð½Ð·Ð° (1990–2000)" + ], + "AOR": [ + "AOR", + "ÐнгольÑÐºÐ°Ñ ÐºÐ²Ð°Ð½Ð·Ð° реюÑтадо (1995–1999)" + ], + "ARA": [ + "ARA", + "ÐргентинÑкий ауÑтрал" + ], + "ARP": [ + "ARP", + "ÐргентинÑкое пеÑо (1983–1985)" + ], + "ARS": [ + "ARS", + "ÐргентинÑкое пеÑо" + ], + "ATS": [ + "ATS", + "ÐвÑтрийÑкий шиллинг" + ], + "AUD": [ + "A$", + "ÐвÑтралийÑкий доллар" + ], + "AWG": [ + "AWG", + "ÐрубанÑкий флорин" + ], + "AZM": [ + "AZM", + "Старый азербайджанÑкий манат" + ], + "AZN": [ + "AZN", + "ÐзербайджанÑкий манат" + ], + "BAD": [ + "BAD", + "Динар БоÑнии и Герцеговины" + ], + "BAM": [ + "BAM", + "ÐšÐ¾Ð½Ð²ÐµÑ€Ñ‚Ð¸Ñ€ÑƒÐµÐ¼Ð°Ñ Ð¼Ð°Ñ€ÐºÐ° БоÑнии и Герцеговины" + ], + "BBD": [ + "BBD", + "БарбадоÑÑкий доллар" + ], + "BDT": [ + "BDT", + "БангладешÑÐºÐ°Ñ Ñ‚Ð°ÐºÐ°" + ], + "BEC": [ + "BEC", + "БельгийÑкий франк (конвертируемый)" + ], + "BEF": [ + "BEF", + "БельгийÑкий франк" + ], + "BEL": [ + "BEL", + "БельгийÑкий франк (финанÑовый)" + ], + "BGL": [ + "BGL", + "Лев" + ], + "BGN": [ + "BGN", + "БолгарÑкий лев" + ], + "BHD": [ + "BHD", + "БахрейнÑкий динар" + ], + "BIF": [ + "BIF", + "БурундийÑкий франк" + ], + "BMD": [ + "BMD", + "БермудÑкий доллар" + ], + "BND": [ + "BND", + "БрунейÑкий доллар" + ], + "BOB": [ + "BOB", + "БоливийÑкий боливиано" + ], + "BOP": [ + "BOP", + "БоливийÑкое пеÑо" + ], + "BOV": [ + "BOV", + "БоливийÑкий мвдол" + ], + "BRB": [ + "BRB", + "БразильÑкий новый крузейро (1967–1986)" + ], + "BRC": [ + "BRC", + "БразильÑкое крузадо" + ], + "BRE": [ + "BRE", + "БразильÑкий крузейро (1990–1993)" + ], + "BRL": [ + "R$", + "БразильÑкий реал" + ], + "BRN": [ + "BRN", + "БразильÑкое новое крузадо" + ], + "BRR": [ + "BRR", + "БразильÑкий крузейро" + ], + "BSD": [ + "BSD", + "БагамÑкий доллар" + ], + "BTN": [ + "BTN", + "БутанÑкий нгултрум" + ], + "BUK": [ + "BUK", + "Джа" + ], + "BWP": [ + "BWP", + "БотÑванÑÐºÐ°Ñ Ð¿ÑƒÐ»Ð°" + ], + "BYB": [ + "BYB", + "БелоруÑÑкий рубль (1994–1999)" + ], + "BYN": [ + "BYN", + "БелоруÑÑкий рубль" + ], + "BYR": [ + "BYR", + "БелоруÑÑкий рубль (2000–2016)" + ], + "BZD": [ + "BZD", + "БелизÑкий доллар" + ], + "CAD": [ + "CA$", + "КанадÑкий доллар" + ], + "CDF": [ + "CDF", + "КонголезÑкий франк" + ], + "CHE": [ + "CHE", + "WIR евро" + ], + "CHF": [ + "CHF", + "ШвейцарÑкий франк" + ], + "CHW": [ + "CHW", + "WIR франк" + ], + "CLF": [ + "CLF", + "УÑÐ»Ð¾Ð²Ð½Ð°Ñ Ñ€Ð°ÑÑ‡ÐµÑ‚Ð½Ð°Ñ ÐµÐ´Ð¸Ð½Ð¸Ñ†Ð° Чили" + ], + "CLP": [ + "CLP", + "ЧилийÑкое пеÑо" + ], + "CNY": [ + "CNÂ¥", + "КитайÑкий юань" + ], + "COP": [ + "COP", + "КолумбийÑкое пеÑо" + ], + "COU": [ + "COU", + "Единица реальной ÑтоимоÑти Колумбии" + ], + "CRC": [ + "CRC", + "КоÑтариканÑкий колон" + ], + "CSD": [ + "CSD", + "Старый СербÑкий динар" + ], + "CSK": [ + "CSK", + "ЧехоÑÐ»Ð¾Ð²Ð°Ñ†ÐºÐ°Ñ Ñ‚Ð²ÐµÑ€Ð´Ð°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "CUC": [ + "CUC", + "КубинÑкое конвертируемое пеÑо" + ], + "CUP": [ + "CUP", + "КубинÑкое пеÑо" + ], + "CVE": [ + "CVE", + "ЭÑкудо Кабо-Верде" + ], + "CYP": [ + "CYP", + "КипрÑкий фунт" + ], + "CZK": [ + "CZK", + "ЧешÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "DDM": [ + "DDM", + "ВоÑточногерманÑÐºÐ°Ñ Ð¼Ð°Ñ€ÐºÐ°" + ], + "DEM": [ + "DEM", + "ÐÐµÐ¼ÐµÑ†ÐºÐ°Ñ Ð¼Ð°Ñ€ÐºÐ°" + ], + "DJF": [ + "DJF", + "Франк Джибути" + ], + "DKK": [ + "DKK", + "ДатÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "DOP": [ + "DOP", + "ДоминиканÑкое пеÑо" + ], + "DZD": [ + "DZD", + "ÐлжирÑкий динар" + ], + "ECS": [ + "ECS", + "ЭквадорÑкий Ñукре" + ], + "ECV": [ + "ECV", + "ПоÑтоÑÐ½Ð½Ð°Ñ ÐµÐ´Ð¸Ð½Ð¸Ñ†Ð° ÑтоимоÑти Эквадора" + ], + "EEK": [ + "EEK", + "ЭÑтонÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "EGP": [ + "EGP", + "ЕгипетÑкий фунт" + ], + "ERN": [ + "ERN", + "Ðакфа" + ], + "ESA": [ + "ESA", + "ИÑпанÑÐºÐ°Ñ Ð¿ÐµÑета (Ð)" + ], + "ESB": [ + "ESB", + "ИÑпанÑÐºÐ°Ñ Ð¿ÐµÑета (конвертируемаÑ)" + ], + "ESP": [ + "ESP", + "ИÑпанÑÐºÐ°Ñ Ð¿ÐµÑета" + ], + "ETB": [ + "ETB", + "ЭфиопÑкий быр" + ], + "EUR": [ + "€", + "Евро" + ], + "FIM": [ + "FIM", + "ФинÑÐºÐ°Ñ Ð¼Ð°Ñ€ÐºÐ°" + ], + "FJD": [ + "FJD", + "Доллар Фиджи" + ], + "FKP": [ + "FKP", + "Фунт ФолклендÑких оÑтровов" + ], + "FRF": [ + "FRF", + "ФранцузÑкий франк" + ], + "GBP": [ + "£", + "БританÑкий фунт Ñтерлингов" + ], + "GEK": [ + "GEK", + "ГрузинÑкий купон" + ], + "GEL": [ + "GEL", + "ГрузинÑкий лари" + ], + "GHC": [ + "GHC", + "ГанÑкий Ñеди (1979–2007)" + ], + "GHS": [ + "GHS", + "ГанÑкий Ñеди" + ], + "GIP": [ + "GIP", + "ГибралтарÑкий фунт" + ], + "GMD": [ + "GMD", + "ГамбийÑкий далаÑи" + ], + "GNF": [ + "GNF", + "ГвинейÑкий франк" + ], + "GNS": [ + "GNS", + "ГвинейÑÐºÐ°Ñ Ñили" + ], + "GQE": [ + "GQE", + "Эквеле Ñкваториальной Гвинеи" + ], + "GRD": [ + "GRD", + "ГречеÑÐºÐ°Ñ Ð´Ñ€Ð°Ñ…Ð¼Ð°" + ], + "GTQ": [ + "GTQ", + "ГватемальÑкий кетÑаль" + ], + "GWE": [ + "GWE", + "ЭÑкудо ПортугальÑкой Гвинеи" + ], + "GWP": [ + "GWP", + "ПеÑо Гвинеи-БиÑау" + ], + "GYD": [ + "GYD", + "ГайанÑкий доллар" + ], + "HKD": [ + "HK$", + "ГонконгÑкий доллар" + ], + "HNL": [ + "HNL", + "ГондураÑÑÐºÐ°Ñ Ð»ÐµÐ¼Ð¿Ð¸Ñ€Ð°" + ], + "HRD": [ + "HRD", + "ХорватÑкий динар" + ], + "HRK": [ + "HRK", + "ХорватÑÐºÐ°Ñ ÐºÑƒÐ½Ð°" + ], + "HTG": [ + "HTG", + "ГаитÑнÑкий гурд" + ], + "HUF": [ + "HUF", + "ВенгерÑкий форинт" + ], + "IDR": [ + "IDR", + "ИндонезийÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ" + ], + "IEP": [ + "IEP", + "ИрландÑкий фунт" + ], + "ILP": [ + "ILP", + "ИзраильÑкий фунт" + ], + "ILS": [ + "₪", + "Ðовый израильÑкий шекель" + ], + "INR": [ + "₹", + "ИндийÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ" + ], + "IQD": [ + "IQD", + "ИракÑкий динар" + ], + "IRR": [ + "IRR", + "ИранÑкий риал" + ], + "ISK": [ + "ISK", + "ИÑландÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "ITL": [ + "ITL", + "ИтальÑнÑÐºÐ°Ñ Ð»Ð¸Ñ€Ð°" + ], + "JMD": [ + "JMD", + "ЯмайÑкий доллар" + ], + "JOD": [ + "JOD", + "ИорданÑкий динар" + ], + "JPY": [ + "Â¥", + "ЯпонÑÐºÐ°Ñ Ð¸ÐµÐ½Ð°" + ], + "KES": [ + "KES", + "КенийÑкий шиллинг" + ], + "KGS": [ + "KGS", + "КиргизÑкий Ñом" + ], + "KHR": [ + "KHR", + "КамбоджийÑкий риель" + ], + "KMF": [ + "KMF", + "Франк КоморÑких ОÑтровов" + ], + "KPW": [ + "KPW", + "СеверокорейÑÐºÐ°Ñ Ð²Ð¾Ð½Ð°" + ], + "KRW": [ + "â‚©", + "ЮжнокорейÑÐºÐ°Ñ Ð²Ð¾Ð½Ð°" + ], + "KWD": [ + "KWD", + "КувейтÑкий динар" + ], + "KYD": [ + "KYD", + "Доллар Каймановых оÑтровов" + ], + "KZT": [ + "KZT", + "КазахÑкий тенге" + ], + "LAK": [ + "LAK", + "ЛаоÑÑкий кип" + ], + "LBP": [ + "LBP", + "ЛиванÑкий фунт" + ], + "LKR": [ + "LKR", + "Шри-ланкийÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ" + ], + "LRD": [ + "LRD", + "ЛиберийÑкий доллар" + ], + "LSL": [ + "LSL", + "Лоти" + ], + "LTL": [ + "LTL", + "ЛитовÑкий лит" + ], + "LTT": [ + "LTT", + "ЛитовÑкий талон" + ], + "LUC": [ + "LUC", + "Конвертируемый франк ЛюкÑембурга" + ], + "LUF": [ + "LUF", + "ЛюкÑембургÑкий франк" + ], + "LUL": [ + "LUL", + "ФинанÑовый франк ЛюкÑембурга" + ], + "LVL": [ + "LVL", + "ЛатвийÑкий лат" + ], + "LVR": [ + "LVR", + "ЛатвийÑкий рубль" + ], + "LYD": [ + "LYD", + "ЛивийÑкий динар" + ], + "MAD": [ + "MAD", + "МарокканÑкий дирхам" + ], + "MAF": [ + "MAF", + "МарокканÑкий франк" + ], + "MDL": [ + "MDL", + "МолдавÑкий лей" + ], + "MGA": [ + "MGA", + "МалагаÑийÑкий ариари" + ], + "MGF": [ + "MGF", + "МалагаÑийÑкий франк" + ], + "MKD": [ + "MKD", + "МакедонÑкий денар" + ], + "MLF": [ + "MLF", + "МалийÑкий франк" + ], + "MMK": [ + "MMK", + "МьÑнманÑкий кьÑÑ‚" + ], + "MNT": [ + "MNT", + "МонгольÑкий тугрик" + ], + "MOP": [ + "MOP", + "Патака Макао" + ], + "MRO": [ + "MRO", + "МавританÑÐºÐ°Ñ ÑƒÐ³Ð¸Ñ" + ], + "MTL": [ + "MTL", + "МальтийÑÐºÐ°Ñ Ð»Ð¸Ñ€Ð°" + ], + "MTP": [ + "MTP", + "МальтийÑкий фунт" + ], + "MUR": [ + "MUR", + "МаврикийÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ" + ], + "MVR": [ + "MVR", + "МальдивÑÐºÐ°Ñ Ñ€ÑƒÑ„Ð¸Ñ" + ], + "MWK": [ + "MWK", + "МалавийÑÐºÐ°Ñ ÐºÐ²Ð°Ñ‡Ð°" + ], + "MXN": [ + "MX$", + "МекÑиканÑкое пеÑо" + ], + "MXP": [ + "MXP", + "МекÑиканÑкое ÑеребрÑное пеÑо (1861–1992)" + ], + "MXV": [ + "MXV", + "МекÑиканÑÐºÐ°Ñ Ð¿ÐµÑ€ÐµÑÑ‡ÐµÑ‚Ð½Ð°Ñ ÐµÐ´Ð¸Ð½Ð¸Ñ†Ð° (UDI)" + ], + "MYR": [ + "MYR", + "МалайзийÑкий ринггит" + ], + "MZE": [ + "MZE", + "МозамбикÑкое ÑÑкудо" + ], + "MZM": [ + "MZM", + "Старый мозамбикÑкий метикал" + ], + "MZN": [ + "MZN", + "МозамбикÑкий метикал" + ], + "NAD": [ + "NAD", + "Доллар Ðамибии" + ], + "NGN": [ + "NGN", + "ÐигерийÑÐºÐ°Ñ Ð½Ð°Ð¹Ñ€Ð°" + ], + "NIC": [ + "NIC", + "ÐикарагуанÑÐºÐ°Ñ ÐºÐ¾Ñ€Ð´Ð¾Ð±Ð° (1988–1991)" + ], + "NIO": [ + "NIO", + "ÐикарагуанÑÐºÐ°Ñ ÐºÐ¾Ñ€Ð´Ð¾Ð±Ð°" + ], + "NLG": [ + "NLG", + "ÐидерландÑкий гульден" + ], + "NOK": [ + "NOK", + "ÐорвежÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "NPR": [ + "NPR", + "ÐепальÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ" + ], + "NZD": [ + "NZ$", + "ÐовозеландÑкий доллар" + ], + "OMR": [ + "OMR", + "ОманÑкий риал" + ], + "PAB": [ + "PAB", + "ПанамÑкое бальбоа" + ], + "PEI": [ + "PEI", + "ПеруанÑкое инти" + ], + "PEN": [ + "PEN", + "ПеруанÑкий новый Ñоль" + ], + "PES": [ + "PES", + "ПеруанÑкий Ñоль" + ], + "PGK": [ + "PGK", + "Кина Папуа – Ðовой Гвинеи" + ], + "PHP": [ + "PHP", + "ФилиппинÑкое пеÑо" + ], + "PKR": [ + "PKR", + "ПакиÑтанÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ" + ], + "PLN": [ + "PLN", + "ПольÑкий злотый" + ], + "PLZ": [ + "PLZ", + "Злотый" + ], + "PTE": [ + "PTE", + "ПортугальÑкое ÑÑкудо" + ], + "PYG": [ + "PYG", + "ПарагвайÑкий гуарани" + ], + "QAR": [ + "QAR", + "КатарÑкий риал" + ], + "RHD": [ + "RHD", + "РодезийÑкий доллар" + ], + "ROL": [ + "ROL", + "Старый РумынÑкий лей" + ], + "RON": [ + "RON", + "РумынÑкий лей" + ], + "RSD": [ + "RSD", + "СербÑкий динар" + ], + "RUB": [ + "₽", + "РоÑÑийÑкий рубль" + ], + "RUR": [ + "Ñ€.", + "РоÑÑийÑкий рубль (1991–1998)" + ], + "RWF": [ + "RWF", + "Франк Руанды" + ], + "SAR": [ + "SAR", + "СаудовÑкий риÑл" + ], + "SBD": [ + "SBD", + "Доллар Соломоновых ОÑтровов" + ], + "SCR": [ + "SCR", + "СейшельÑÐºÐ°Ñ Ñ€ÑƒÐ¿Ð¸Ñ" + ], + "SDD": [ + "SDD", + "СуданÑкий динар" + ], + "SDG": [ + "SDG", + "СуданÑкий фунт" + ], + "SDP": [ + "SDP", + "Старый ÑуданÑкий фунт" + ], + "SEK": [ + "SEK", + "ШведÑÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "SGD": [ + "SGD", + "СингапурÑкий доллар" + ], + "SHP": [ + "SHP", + "Фунт оÑтрова СвÑтой Елены" + ], + "SIT": [ + "SIT", + "СловенÑкий толар" + ], + "SKK": [ + "SKK", + "Ð¡Ð»Ð¾Ð²Ð°Ñ†ÐºÐ°Ñ ÐºÑ€Ð¾Ð½Ð°" + ], + "SLL": [ + "SLL", + "Леоне" + ], + "SOS": [ + "SOS", + "СомалийÑкий шиллинг" + ], + "SRD": [ + "SRD", + "СуринамÑкий доллар" + ], + "SRG": [ + "SRG", + "СуринамÑкий гульден" + ], + "SSP": [ + "SSP", + "ЮжноÑуданÑкий фунт" + ], + "STD": [ + "STD", + "Добра Сан-Томе и ПринÑипи" + ], + "SUR": [ + "SUR", + "Рубль СССР" + ], + "SVC": [ + "SVC", + "СальвадорÑкий колон" + ], + "SYP": [ + "SYP", + "СирийÑкий фунт" + ], + "SZL": [ + "SZL", + "СвазилендÑкий лилангени" + ], + "THB": [ + "฿", + "ТаиландÑкий бат" + ], + "TJR": [ + "TJR", + "ТаджикÑкий рубль" + ], + "TJS": [ + "TJS", + "ТаджикÑкий Ñомони" + ], + "TMM": [ + "TMM", + "ТуркменÑкий манат" + ], + "TMT": [ + "ТМТ", + "Ðовый туркменÑкий манат" + ], + "TND": [ + "TND", + "ТуниÑÑкий динар" + ], + "TOP": [ + "TOP", + "ТонганÑÐºÐ°Ñ Ð¿Ð°Ð°Ð½Ð³Ð°" + ], + "TPE": [ + "TPE", + "ТиморÑкое ÑÑкудо" + ], + "TRL": [ + "TRL", + "Ð¢ÑƒÑ€ÐµÑ†ÐºÐ°Ñ Ð»Ð¸Ñ€Ð° (1922–2005)" + ], + "TRY": [ + "TRY", + "Ð¢ÑƒÑ€ÐµÑ†ÐºÐ°Ñ Ð»Ð¸Ñ€Ð°" + ], + "TTD": [ + "TTD", + "Доллар Тринидада и Тобаго" + ], + "TWD": [ + "NT$", + "Ðовый тайваньÑкий доллар" + ], + "TZS": [ + "TZS", + "ТанзанийÑкий шиллинг" + ], + "UAH": [ + "â‚´", + "УкраинÑÐºÐ°Ñ Ð³Ñ€Ð¸Ð²Ð½Ð°" + ], + "UAK": [ + "UAK", + "Карбованец (украинÑкий)" + ], + "UGS": [ + "UGS", + "Старый угандийÑкий шиллинг" + ], + "UGX": [ + "UGX", + "УгандийÑкий шиллинг" + ], + "USD": [ + "$", + "Доллар СШÐ" + ], + "USN": [ + "USN", + "Доллар СШРÑледующего днÑ" + ], + "USS": [ + "USS", + "Доллар СШРтекущего днÑ" + ], + "UYI": [ + "UYI", + "УругвайÑкий пеÑо (Ð¸Ð½Ð´ÐµÐºÑ Ð¸Ð½Ñ„Ð»Ñции)" + ], + "UYP": [ + "UYP", + "УругвайÑкое Ñтарое пеÑо (1975–1993)" + ], + "UYU": [ + "UYU", + "УругвайÑкое пеÑо" + ], + "UZS": [ + "UZS", + "УзбекÑкий Ñум" + ], + "VEB": [ + "VEB", + "ВенеÑуÑльÑкий боливар (1871–2008)" + ], + "VEF": [ + "VEF", + "ВенеÑуÑльÑкий боливар" + ], + "VND": [ + "â‚«", + "ВьетнамÑкий донг" + ], + "VUV": [ + "VUV", + "Вату Вануату" + ], + "WST": [ + "WST", + "СамоанÑÐºÐ°Ñ Ñ‚Ð°Ð»Ð°" + ], + "XAF": [ + "FCFA", + "Франк КФРВЕÐС" + ], + "XCD": [ + "EC$", + "ВоÑточно-карибÑкий доллар" + ], + "XEU": [ + "XEU", + "ЭКЮ (единица европейÑкой валюты)" + ], + "XFO": [ + "XFO", + "ФранцузÑкий золотой франк" + ], + "XFU": [ + "XFU", + "ФранцузÑкий UIC-франк" + ], + "XOF": [ + "CFA", + "Франк КФРВСЕÐО" + ], + "XPF": [ + "CFPF", + "ФранцузÑкий тихоокеанÑкий франк" + ], + "XRE": [ + "XRE", + "единица RINET-фондов" + ], + "YDD": [ + "YDD", + "ЙеменÑкий динар" + ], + "YER": [ + "YER", + "ЙеменÑкий риал" + ], + "YUD": [ + "YUD", + "ЮгоÑлавÑкий твердый динар" + ], + "YUM": [ + "YUM", + "ЮгоÑлавÑкий новый динар" + ], + "YUN": [ + "YUN", + "ЮгоÑлавÑкий динар" + ], + "ZAL": [ + "ZAL", + "ЮжноафриканÑкий Ñ€Ñнд (финанÑовый)" + ], + "ZAR": [ + "ZAR", + "ЮжноафриканÑкий Ñ€Ñнд" + ], + "ZMK": [ + "ZMK", + "Квача (замбийÑкаÑ) (1968–2012)" + ], + "ZMW": [ + "ZMW", + "ЗамбийÑÐºÐ°Ñ ÐºÐ²Ð°Ñ‡Ð°" + ], + "ZRN": [ + "ZRN", + "Ðовый заир" + ], + "ZRZ": [ + "ZRZ", + "Заир" + ], + "ZWD": [ + "ZWD", + "Доллар Зимбабве" + ], + "ZWL": [ + "ZWL", + "Доллар Зимбабве (2009)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru_BY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru_BY.json new file mode 100644 index 0000000000000000000000000000000000000000..65b017c6825bff5097d3e4ad0b2d5c6580bfeeb1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru_BY.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.30.5", + "Names": { + "BYN": [ + "Br", + "БелоруÑÑкий рубль" + ], + "RUR": [ + "RUR", + "РоÑÑийÑкий рубль (1991–1998)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru_KG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru_KG.json new file mode 100644 index 0000000000000000000000000000000000000000..54e54e74172e177cd466b57135ec62980d064353 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru_KG.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "KGS": [ + "Ñом", + "КиргизÑкий Ñом" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru_KZ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru_KZ.json new file mode 100644 index 0000000000000000000000000000000000000000..5d720118ef86411971334979148a7b1b93c9fff4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru_KZ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "KZT": [ + "₸", + "КазахÑкий тенге" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru_MD.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru_MD.json new file mode 100644 index 0000000000000000000000000000000000000000..2cd15cd937a56d6f0452b40f5c38b10c6bf069bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ru_MD.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MDL": [ + "L", + "МолдавÑкий лей" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/rw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/rw.json new file mode 100644 index 0000000000000000000000000000000000000000..1b039aa646103b5f8550ca9868521db7b20c9674 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/rw.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.98", + "Names": { + "RWF": [ + "RF", + "RWF" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/se.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/se.json new file mode 100644 index 0000000000000000000000000000000000000000..e06f39421ce0a8f031cd3d11454919a72c1619fa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/se.json @@ -0,0 +1,45 @@ +{ + "Version": "2.1.27.98", + "Names": { + "DKK": [ + "Dkr", + "DKK" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "suoma márkki" + ], + "HKD": [ + "HK$", + "HKD" + ], + "INR": [ + "₹", + "INR" + ], + "JPY": [ + "JPÂ¥", + "JPY" + ], + "MXN": [ + "MX$", + "MXN" + ], + "NOK": [ + "kr", + "norgga kruvdno" + ], + "SEK": [ + "Skr", + "ruoŧŧa kruvdno" + ], + "THB": [ + "฿", + "THB" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/se_SE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/se_SE.json new file mode 100644 index 0000000000000000000000000000000000000000..0852adfe7f4811b321eecb3a31ddd94732a542e4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/se_SE.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "NOK": [ + "Nkr", + "norgga kruvdno" + ], + "SEK": [ + "kr", + "ruoŧŧa kruvdno" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sg.json new file mode 100644 index 0000000000000000000000000000000000000000..4c193656148385fa4c17e5a4b2d352eee6296fb6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sg.json @@ -0,0 +1,225 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AED": [ + "AED", + "dirâm tî âEmirâti tî Arâbo Ôko" + ], + "AOA": [ + "AOA", + "kwânza tî Angoläa" + ], + "AUD": [ + "A$", + "dolära tî Ostralïi" + ], + "BHD": [ + "BHD", + "dolùara tî Bahrâina" + ], + "BIF": [ + "BIF", + "farânga tî Burundïi" + ], + "BWP": [ + "BWP", + "pûla tî Botswana" + ], + "CAD": [ + "CA$", + "dolära tî kanadäa" + ], + "CDF": [ + "CDF", + "farânga tî Kongöo" + ], + "CHF": [ + "CHF", + "farânga tî Sûîsi" + ], + "CNY": [ + "CNÂ¥", + "yuan renminbi tî Shîni" + ], + "CVE": [ + "CVE", + "eskûêdo tî Kâpo-Vêre" + ], + "DJF": [ + "DJF", + "farânga tî Dibutïi" + ], + "DZD": [ + "DZD", + "dinäri tî Alzerïi" + ], + "EGP": [ + "EGP", + "pôndo tî Kâmitâ" + ], + "ERN": [ + "ERN", + "nakafa tî Eritrëe" + ], + "ETB": [ + "ETB", + "bir tî Etiopïi" + ], + "EUR": [ + "€", + "zoröo" + ], + "GBP": [ + "£", + "pôndo tî Anglëe" + ], + "GHC": [ + "GHC", + "sêdi tî Ganäa" + ], + "GMD": [ + "GMD", + "dalasi tî gambïi" + ], + "GNS": [ + "GNS", + "sili tî Ginëe" + ], + "INR": [ + "₹", + "rupïi tî Ênnde" + ], + "JPY": [ + "JPÂ¥", + "yêni tî Zapön" + ], + "KES": [ + "KES", + "shilîngi tî Kenyäa" + ], + "KMF": [ + "KMF", + "farânga tî Kömôro" + ], + "LRD": [ + "LRD", + "dolära tî Liberïa" + ], + "LSL": [ + "LSL", + "loti tî Lesôtho" + ], + "LYD": [ + "LYD", + "dinäar tî Libïi" + ], + "MAD": [ + "MAD", + "dirâm tî Marôko" + ], + "MGA": [ + "MGA", + "ariâri tî Madagasikära" + ], + "MRO": [ + "MRO", + "ugîya tî Moritanïi" + ], + "MUR": [ + "MUR", + "rupïi tî Mörîsi" + ], + "MWK": [ + "MWK", + "kwâtia tî Malawïi" + ], + "MZM": [ + "MZM", + "metikala tî Mozambîka" + ], + "NAD": [ + "NAD", + "dolära tî Namibïi" + ], + "NGN": [ + "NGN", + "nâîra tî Nizerïa" + ], + "RWF": [ + "RWF", + "farânga tî Ruandäa" + ], + "SAR": [ + "SAR", + "riâli tî Saûdi Arabïi" + ], + "SCR": [ + "SCR", + "rupïi tî Sëyshêle" + ], + "SDG": [ + "SDG", + "pôndo tî Sudäan" + ], + "SHP": [ + "SHP", + "pôndo tî Zûâ Sênt-Helêna" + ], + "SLL": [ + "SLL", + "leône tî Sierâ-Leône" + ], + "SOS": [ + "SOS", + "shilîngi tî Somalïi" + ], + "STD": [ + "STD", + "dôbra tî Sâô Tomë na Prinsîpe" + ], + "SZL": [ + "SZL", + "lilangùeni tî Swazïlânde" + ], + "TND": [ + "TND", + "dinära tî Tunizïi" + ], + "TZS": [ + "TZS", + "shilîngi tî Tanzanïi" + ], + "UGX": [ + "UGX", + "shilîngi tî Ugandäa" + ], + "USD": [ + "US$", + "dol$ara ttî äLetäa-Ôko tî Amerîka" + ], + "XAF": [ + "FCFA", + "farânga CFA (BEAC)" + ], + "XOF": [ + "CFA", + "farânga CFA (BCEAO)" + ], + "ZAR": [ + "ZAR", + "rânde tî Mbongo-Afrîka" + ], + "ZMK": [ + "ZMK", + "kwâtia tî Zambïi (1968–2012)" + ], + "ZMW": [ + "ZMW", + "kwâtia tî Zambïi" + ], + "ZWD": [ + "ZWD", + "dolära tî Zimbäbwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sh.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sh.json new file mode 100644 index 0000000000000000000000000000000000000000..87a460f3a14773686dc3502a13af9603fea064c9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sh.json @@ -0,0 +1,1077 @@ +{ + "Version": "2.1.29.33", + "Names": { + "ADP": [ + "ADP", + "Andorska pezeta" + ], + "AED": [ + "AED", + "UAE dirham" + ], + "AFA": [ + "AFA", + "Avganistanski avgani (1927–2002)" + ], + "AFN": [ + "AFN", + "Avganistanski avgani" + ], + "ALL": [ + "ALL", + "Albanski lek" + ], + "AMD": [ + "AMD", + "Jermenski dram" + ], + "ANG": [ + "ANG", + "Holandskoantilski gulden" + ], + "AOA": [ + "AOA", + "Angolska kvanza" + ], + "AOK": [ + "AOK", + "Angolijska kvanza (1977–1990)" + ], + "AON": [ + "AON", + "Angolijska nova kvanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angolijska kvanza reaÄ‘ustado (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentinski austral" + ], + "ARP": [ + "ARP", + "Argentinski pezo (1983–1985)" + ], + "ARS": [ + "ARS", + "Argentinski pezos" + ], + "ATS": [ + "ATS", + "Austrijski Å¡iling" + ], + "AUD": [ + "AUD", + "Australijski dolar" + ], + "AWG": [ + "AWG", + "Arubanski florin" + ], + "AZM": [ + "AZM", + "Azerbejdžanski manat (1993–2006)" + ], + "AZN": [ + "AZN", + "Azerbejdžanski manat" + ], + "BAD": [ + "BAD", + "Bosansko-HercegovaÄki dinar" + ], + "BAM": [ + "KM", + "Bosansko-hercegovaÄka konvertibilna marka" + ], + "BBD": [ + "BBD", + "BarbadoÅ¡ki dolar" + ], + "BDT": [ + "BDT", + "BangladeÅ¡ka taka" + ], + "BEC": [ + "BEC", + "Belgijski franak (konvertibilni)" + ], + "BEF": [ + "BEF", + "Belgijski franak" + ], + "BEL": [ + "BEL", + "Belgijski franak (finansijski)" + ], + "BGL": [ + "BGL", + "Bugarski tvrdi lev" + ], + "BGN": [ + "BGN", + "Bugarski lev" + ], + "BHD": [ + "BHD", + "Bahreinski dinar" + ], + "BIF": [ + "BIF", + "Burundski franak" + ], + "BMD": [ + "BMD", + "Bermudski dolar" + ], + "BND": [ + "BND", + "Brunejski dolar" + ], + "BOB": [ + "BOB", + "Bolivijski bolivijano" + ], + "BOP": [ + "BOP", + "Bolivijski pezo" + ], + "BOV": [ + "BOV", + "Bolivijski mvdol" + ], + "BRB": [ + "BRB", + "Brazilski novi kruzeiro (1967–1986)" + ], + "BRC": [ + "BRC", + "Brazilijski kruzado" + ], + "BRE": [ + "BRE", + "Brazilski kruzeiro (1990–1993)" + ], + "BRL": [ + "R$", + "Brazilski real" + ], + "BRN": [ + "BRN", + "Brazilijski novi kruzado" + ], + "BRR": [ + "BRR", + "Brazilski kruzeiro" + ], + "BSD": [ + "BSD", + "Bahamski dolar" + ], + "BTN": [ + "BTN", + "Butanski ngultrum" + ], + "BUK": [ + "BUK", + "Burmanski kjat" + ], + "BWP": [ + "BWP", + "Bocvanska pula" + ], + "BYB": [ + "BYB", + "Beloruska nova rublja (1994–1999)" + ], + "BYN": [ + "BYN", + "Beloruska rublja" + ], + "BYR": [ + "BYR", + "Beloruska rublja (2000–2016)" + ], + "BZD": [ + "BZD", + "Beliski dolar" + ], + "CAD": [ + "CA$", + "Kanadski dolar" + ], + "CDF": [ + "CDF", + "Kongoanski franak" + ], + "CHE": [ + "CHE", + "WIR evro" + ], + "CHF": [ + "CHF", + "Å vajcarski franak" + ], + "CHW": [ + "CHW", + "WIR franak" + ], + "CLF": [ + "CLF", + "ÄŒileovski unidades se fomento" + ], + "CLP": [ + "CLP", + "ÄŒileanski pezos" + ], + "CNY": [ + "CNÂ¥", + "Kineski juan" + ], + "COP": [ + "COP", + "Kolumbijski pezos" + ], + "COU": [ + "COU", + "Unidad de valorÅ¡ki real" + ], + "CRC": [ + "CRC", + "Kostarikanski kolon" + ], + "CSD": [ + "CSD", + "Stari srpski dinar" + ], + "CSK": [ + "CSK", + "ÄŒehoslovaÄka tvrda kruna" + ], + "CUC": [ + "CUC", + "Kubanski konvertibilni pezos" + ], + "CUP": [ + "CUP", + "Kubanski pezos" + ], + "CVE": [ + "CVE", + "Zelenortski eskudo" + ], + "CYP": [ + "CYP", + "Kiparska funta" + ], + "CZK": [ + "CZK", + "ÄŒeÅ¡ka kruna" + ], + "DDM": [ + "DDM", + "IstoÄno-nemaÄka marka" + ], + "DEM": [ + "DEM", + "NemaÄka marka" + ], + "DJF": [ + "DJF", + "Džibutanski franak" + ], + "DKK": [ + "DKK", + "Danska kruna" + ], + "DOP": [ + "DOP", + "Dominikanski pezos" + ], + "DZD": [ + "DZD", + "Alžirski dinar" + ], + "ECS": [ + "ECS", + "Ekvadorski sakr" + ], + "ECV": [ + "ECV", + "Ekvadorski unidad de valor konstante" + ], + "EEK": [ + "EEK", + "Estonska kroon" + ], + "EGP": [ + "EGP", + "Egipatska funta" + ], + "ERN": [ + "ERN", + "Eritrejska nakfa" + ], + "ESA": [ + "ESA", + "Å panska pezeta (raÄun)" + ], + "ESB": [ + "ESB", + "Å panska pezeta (konvertibilniraÄun)" + ], + "ESP": [ + "ESP", + "Å panska pezeta" + ], + "ETB": [ + "ETB", + "Etiopski bir" + ], + "EUR": [ + "€", + "Evro" + ], + "FIM": [ + "FIM", + "Finska marka" + ], + "FJD": [ + "FJD", + "Fidžijski dolar" + ], + "FKP": [ + "FKP", + "Foklandska funta" + ], + "FRF": [ + "FRF", + "Francuski franak" + ], + "GBP": [ + "£", + "Britanska funta" + ], + "GEK": [ + "GEK", + "Gruzijski kupon larit" + ], + "GEL": [ + "GEL", + "Gruzijski lari" + ], + "GHC": [ + "GHC", + "Ganski cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "Ganski sedi" + ], + "GIP": [ + "GIP", + "Gibraltarska funta" + ], + "GMD": [ + "GMD", + "Gambijski dalasi" + ], + "GNF": [ + "GNF", + "Gvinejski franak" + ], + "GNS": [ + "GNS", + "Gvinejski sili" + ], + "GQE": [ + "GQE", + "Ekvatorijalno-gvinejski ekvele" + ], + "GRD": [ + "GRD", + "GrÄka drahma" + ], + "GTQ": [ + "GTQ", + "Gvatemalski kecal" + ], + "GWE": [ + "GWE", + "Portugalska gvineja eskudo" + ], + "GWP": [ + "GWP", + "Gvineja Bisao Pezo" + ], + "GYD": [ + "GYD", + "Gvajanski dolar" + ], + "HKD": [ + "HK$", + "HongkonÅ¡ki dolar" + ], + "HNL": [ + "HNL", + "HonduraÅ¡ka lempira" + ], + "HRD": [ + "HRD", + "Hrvatski dinar" + ], + "HRK": [ + "HRK", + "Hrvatska kuna" + ], + "HTG": [ + "HTG", + "Haićanski gurd" + ], + "HUF": [ + "HUF", + "MaÄ‘arska forinta" + ], + "IDR": [ + "IDR", + "Indonežanska rupija" + ], + "IEP": [ + "IEP", + "Irska funta" + ], + "ILP": [ + "ILP", + "Izraelska funta" + ], + "ILR": [ + "ILR", + "Stari izraelski Å¡ekeli" + ], + "ILS": [ + "₪", + "Izraelski novi Å¡ekel" + ], + "INR": [ + "₹", + "Indijska rupija" + ], + "IQD": [ + "IQD", + "IraÄki dinar" + ], + "IRR": [ + "IRR", + "Iranski rijal" + ], + "ISJ": [ + "ISJ", + "Stara islandska kruna" + ], + "ISK": [ + "ISK", + "Islandska kruna" + ], + "ITL": [ + "ITL", + "Italijanska lira" + ], + "JMD": [ + "JMD", + "JamajÄanski dolar" + ], + "JOD": [ + "JOD", + "Jordanski dinar" + ], + "JPY": [ + "Â¥", + "Japanski jen" + ], + "KES": [ + "KES", + "Kenijski Å¡iling" + ], + "KGS": [ + "KGS", + "Kirgistanski som" + ], + "KHR": [ + "KHR", + "Kambodžanski rijel" + ], + "KMF": [ + "KMF", + "Komorski franak" + ], + "KPW": [ + "KPW", + "Severnokorejski von" + ], + "KRW": [ + "KRW", + "Južnokorejski von" + ], + "KWD": [ + "KWD", + "Kuvajtski dinar" + ], + "KYD": [ + "KYD", + "Kajmanski dolar" + ], + "KZT": [ + "KZT", + "Kazahstanski tenge" + ], + "LAK": [ + "LAK", + "LaoÅ¡ki kip" + ], + "LBP": [ + "LBP", + "Libanska funta" + ], + "LKR": [ + "LKR", + "Å rilankanska rupija" + ], + "LRD": [ + "LRD", + "Liberijski dolar" + ], + "LSL": [ + "LSL", + "Lesoto loti" + ], + "LTL": [ + "LTL", + "Litvanski litas" + ], + "LTT": [ + "LTT", + "Litvanski talonas" + ], + "LUC": [ + "LUC", + "LuksemburÅ¡ki konvertibilni franak" + ], + "LUF": [ + "LUF", + "LuksemburÅ¡ki franak" + ], + "LUL": [ + "LUL", + "LuksemburÅ¡ki finansijski franak" + ], + "LVL": [ + "LVL", + "Latvijski lati" + ], + "LVR": [ + "LVR", + "Latvijska rublja" + ], + "LYD": [ + "LYD", + "Libijski dinar" + ], + "MAD": [ + "MAD", + "Marokanski dirham" + ], + "MAF": [ + "MAF", + "Marokanski franak" + ], + "MDL": [ + "MDL", + "Moldavski lej" + ], + "MGA": [ + "MGA", + "Madagaskarski ariari" + ], + "MGF": [ + "MGF", + "Malagasijski franak" + ], + "MKD": [ + "MKD", + "Makedonski denar" + ], + "MLF": [ + "MLF", + "Malijanski franak" + ], + "MMK": [ + "MMK", + "Mjanmarski kjat" + ], + "MNT": [ + "MNT", + "Mongolski tugrik" + ], + "MOP": [ + "MOP", + "Makaoska pataka" + ], + "MRO": [ + "MRO", + "Mauritanijska ogija" + ], + "MTL": [ + "MTL", + "MalteÅ¡ka lira" + ], + "MTP": [ + "MTP", + "MalteÅ¡ka funta" + ], + "MUR": [ + "MUR", + "Mauricijska rupija" + ], + "MVR": [ + "MVR", + "Maldivska rufija" + ], + "MWK": [ + "MWK", + "Malavijska kvaÄa" + ], + "MXN": [ + "MX$", + "MeksiÄki pezos" + ], + "MXP": [ + "MXP", + "MeksiÄki srebrni pezo (1861–1992)" + ], + "MXV": [ + "MXV", + "MeksiÄki unidad de inversion (UDI)" + ], + "MYR": [ + "MYR", + "Malezijski ringit" + ], + "MZE": [ + "MZE", + "Mozambijski eskudo" + ], + "MZM": [ + "MZM", + "Stari mozambijski metikal" + ], + "MZN": [ + "MZN", + "MozambiÄki metikal" + ], + "NAD": [ + "NAD", + "Namibijski dolar" + ], + "NGN": [ + "NGN", + "Nigerijska naira" + ], + "NIC": [ + "NIC", + "Nikaragvanska kordoba" + ], + "NIO": [ + "NIO", + "Nikaragvanska zlatna kordoba" + ], + "NLG": [ + "NLG", + "Holandski gulden" + ], + "NOK": [ + "NOK", + "NorveÅ¡ka kruna" + ], + "NPR": [ + "NPR", + "Nepalska rupija" + ], + "NZD": [ + "NZD", + "Novozelandski dolar" + ], + "OMR": [ + "OMR", + "Omanski rijal" + ], + "PAB": [ + "PAB", + "Panamska balboa" + ], + "PEI": [ + "PEI", + "Peruanski inti" + ], + "PEN": [ + "PEN", + "Peruanski novi sol" + ], + "PES": [ + "PES", + "Peruanski sol" + ], + "PGK": [ + "PGK", + "Papuanska kina" + ], + "PHP": [ + "PHP", + "Filipinski pezos" + ], + "PKR": [ + "PKR", + "Pakistanska rupija" + ], + "PLN": [ + "PLN", + "Poljski zlot" + ], + "PLZ": [ + "PLZ", + "Poljski zloti (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugalski eskudo" + ], + "PYG": [ + "PYG", + "Paragvajski gvarani" + ], + "QAR": [ + "QAR", + "Katarski rijal" + ], + "RHD": [ + "RHD", + "Rodejskidolar" + ], + "ROL": [ + "ROL", + "Rumunski lej" + ], + "RON": [ + "RON", + "Rumunski lej (1952–2006)" + ], + "RSD": [ + "RSD", + "Srpski dinar" + ], + "RUB": [ + "RUB", + "Ruska rublja" + ], + "RUR": [ + "RUR", + "Ruska rublja (1991–1998)" + ], + "RWF": [ + "RWF", + "Ruandski franak" + ], + "SAR": [ + "SAR", + "Saudijski rijal" + ], + "SBD": [ + "SBD", + "Solomonski dolar" + ], + "SCR": [ + "SCR", + "SejÅ¡elska rupija" + ], + "SDD": [ + "SDD", + "Stari sudanski dinar" + ], + "SDG": [ + "SDG", + "Sudanska funta" + ], + "SDP": [ + "SDP", + "Stara sudanska funta" + ], + "SEK": [ + "SEK", + "Å vedska kruna" + ], + "SGD": [ + "SGD", + "Singapurski dolar" + ], + "SHP": [ + "SHP", + "Sv. jelenska funta" + ], + "SIT": [ + "SIT", + "SlovenaÄki tolar" + ], + "SKK": [ + "SKK", + "SlovaÄka kruna" + ], + "SLL": [ + "SLL", + "Sijeraleonski leone" + ], + "SOS": [ + "SOS", + "Somalijski Å¡iling" + ], + "SRD": [ + "SRD", + "Surinamski dolar" + ], + "SRG": [ + "SRG", + "Surinamski gilder" + ], + "SSP": [ + "SSP", + "Južnosudanska funta" + ], + "STD": [ + "STD", + "Saotomska dobra" + ], + "SUR": [ + "SUR", + "Sovjetska rublja" + ], + "SVC": [ + "SVC", + "Salvadorski kolon" + ], + "SYP": [ + "SYP", + "Sirijska funta" + ], + "SZL": [ + "SZL", + "Svazilendski lilangeni" + ], + "THB": [ + "THB", + "Tajlandski bat" + ], + "TJR": [ + "TJR", + "Tadžihistanska rublja" + ], + "TJS": [ + "TJS", + "Tadžikistanski somon" + ], + "TMM": [ + "TMM", + "Turkmenistanski manat (1993–2009)" + ], + "TMT": [ + "TMT", + "Turkmenistanski manat" + ], + "TND": [ + "TND", + "Tuniski dinar" + ], + "TOP": [ + "TOP", + "Tonganska panga" + ], + "TPE": [ + "TPE", + "TimorÅ¡ki eskudo" + ], + "TRL": [ + "TRL", + "Turska lira (1922–2005)" + ], + "TRY": [ + "TRY", + "Turska lira" + ], + "TTD": [ + "TTD", + "Trinidad-tobagoÅ¡ki dolar" + ], + "TWD": [ + "NT$", + "Novi tajvanski dolar" + ], + "TZS": [ + "TZS", + "Tanzanijski Å¡iling" + ], + "UAH": [ + "UAH", + "Ukrajinska hrivnja" + ], + "UAK": [ + "UAK", + "Ukrajinski karbovaneti" + ], + "UGS": [ + "UGS", + "Ugandski Å¡iling (1966–1987)" + ], + "UGX": [ + "UGX", + "Ugandski Å¡iling" + ], + "USD": [ + "US$", + "AmeriÄki dolar" + ], + "USN": [ + "USN", + "SAD dolar (sledeći dan)" + ], + "USS": [ + "USS", + "SAD dolar (isti dan)" + ], + "UYI": [ + "UYI", + "Urugvajski pezo en unidades indeksadas" + ], + "UYP": [ + "UYP", + "Urugvajski pezo (1975–1993)" + ], + "UYU": [ + "UYU", + "Urugvajski pezos" + ], + "UZS": [ + "UZS", + "Uzbekistanski som" + ], + "VEB": [ + "VEB", + "Venecuelanski bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "Venecuelanski bolivar" + ], + "VND": [ + "VND", + "Vijetnamski dong" + ], + "VNN": [ + "VNN", + "Vijetnamski dong (1978–1985)" + ], + "VUV": [ + "VUV", + "Vanuatski vatu" + ], + "WST": [ + "WST", + "Samoanska tala" + ], + "XAF": [ + "FCFA", + "CFA franak BEAC" + ], + "XCD": [ + "EC$", + "IstoÄnokaripski dolar" + ], + "XEU": [ + "XEU", + "Evropska valutna jedinica" + ], + "XFO": [ + "XFO", + "Francuski zlatni franak" + ], + "XFU": [ + "XFU", + "Francuski UIC-franak" + ], + "XOF": [ + "CFA", + "CFA franak BCEAO" + ], + "XPF": [ + "CFPF", + "CFP franak" + ], + "XRE": [ + "XRE", + "RINET fond" + ], + "YDD": [ + "YDD", + "Jemenski dinar" + ], + "YER": [ + "YER", + "Jemenski rijal" + ], + "YUD": [ + "YUD", + "Jugoslovenski tvrdi dinar" + ], + "YUM": [ + "YUM", + "Jugoslovenski novi dinar" + ], + "YUN": [ + "YUN", + "Jugoslovenski konvertibilni dinar" + ], + "ZAL": [ + "ZAL", + "Južno-afriÄki rand (finansijski)" + ], + "ZAR": [ + "ZAR", + "JužnoafriÄki rand" + ], + "ZMK": [ + "ZMK", + "Zambijska kvaÄa (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambijska kvaÄa" + ], + "ZRN": [ + "ZRN", + "Zairski novi zair" + ], + "ZRZ": [ + "ZRZ", + "Zairski zair" + ], + "ZWD": [ + "ZWD", + "Zimbabveanski dolar (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Zimbabveanski dolar (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabveanski dolar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/si.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/si.json new file mode 100644 index 0000000000000000000000000000000000000000..60676655d206afad60093014a898a93ff07a57b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/si.json @@ -0,0 +1,637 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "එක්සත් à¶…à¶»à·à¶¶à·’ එමිරේට්ස් à¶©à·’à¶»à·à¶¸à·Š" + ], + "AFN": [ + "AFN", + "ඇෆ්ගනිථà·à¶± ඇෆ්ගනි" + ], + "ALL": [ + "ALL", + "ඇල්බේනියà·à¶±à·” ලෙක්" + ], + "AMD": [ + "AMD", + "ආර්මේනියà·à¶±à·” à¶©à·Šâ€à¶»à·‘ම්" + ], + "ANG": [ + "ANG", + "නෙදර්ලන්ත ඇන්ටිලියන් ගිල්ඩර්" + ], + "AOA": [ + "AOA", + "ඇන්ගà·à¶½à·à¶±à·” ක්වන්සà·" + ], + "ARS": [ + "ARS", + "ආර්ජන්ටින෠පෙසà·" + ], + "AUD": [ + "A$", + "ඔස්ට්â€à¶»à·šà¶½à·’යà·à¶±à·” ඩොලර්" + ], + "AWG": [ + "AWG", + "අරූබà·à¶±à·” ෆ්ලà·à¶»à·’න්" + ], + "AZN": [ + "AZN", + "අසර්බයිජà·à¶±à·” මනà·à¶§à·Š" + ], + "BAM": [ + "BAM", + "බොස්නිය෠හර්සගොවීන෠පරිවර්ත්â€à¶º මà·à¶»à·Šà¶šà·Š" + ], + "BBD": [ + "BBD", + "à¶¶à·à¶¶à·šà¶©à·’යà·à¶±à·” ඩොලර්" + ], + "BDT": [ + "BDT", + "බංග්ලà·à¶¯à·šà·à·Š à¶§à¶šà·" + ], + "BGN": [ + "BGN", + "බල්ගේරියà·à¶±à·” ලිව්" + ], + "BHD": [ + "BHD", + "බහරේන් à¶©à·’à¶±à·à¶»à·Š" + ], + "BIF": [ + "BIF", + "බුරුන්දි ෆ්â€à¶»à·‘න්ක්" + ], + "BMD": [ + "BMD", + "බර්මියුඩà·à¶±à·” ඩොලර්" + ], + "BND": [ + "BND", + "බෘනà·à¶ºà·’ ඩොලර්" + ], + "BOB": [ + "BOB", + "බොලිවියà·à¶±à·” බොලිවියà·à¶±à·" + ], + "BRL": [ + "R$", + "à¶¶à·Šâ€à¶»à·ƒà·“à¶½ රියල්" + ], + "BSD": [ + "BSD", + "බහමà·à¶±à·” ඩොලර්" + ], + "BTN": [ + "BTN", + "à¶·à·–à¶­à·à¶± නගුල්ට්â€à¶»à¶¸à·Š" + ], + "BWP": [ + "BWP", + "බොට්ස්වà·à¶±à· පුලà·" + ], + "BYN": [ + "BYN", + "බෙලරූස් රූබල්" + ], + "BYR": [ + "BYR", + "බෙලරූස් රූබල් (2000–2016)" + ], + "BZD": [ + "BZD", + "බෙලීස් ඩොලර්" + ], + "CAD": [ + "CA$", + "à¶šà·à¶±à·šà¶©à·’යà·à¶±à·” ඩොලර්" + ], + "CDF": [ + "CDF", + "කොංග෠ෆ්â€à¶»à·‘න්ක්" + ], + "CHF": [ + "CHF", + "ස්විස් ෆ්â€à¶»à·‘න්ක්" + ], + "CLP": [ + "CLP", + "චිලි à¶´à·à·ƒà·" + ], + "CNY": [ + "CNÂ¥", + "à¶ à·“à¶± යුආන්" + ], + "COP": [ + "COP", + "කොලොම්බියà·à¶±à·” පෙසà·" + ], + "CRC": [ + "CRC", + "කොස්ට රික෠කොලà·à¶±à·Š" + ], + "CUC": [ + "CUC", + "මà·à¶»à·”à¶šà·… à·„à·à¶šà·’ කියුබà·à¶±à·” à¶´à·à·ƒà·" + ], + "CUP": [ + "CUP", + "කියුබà·à¶±à·” à¶´à·à·ƒà·" + ], + "CVE": [ + "CVE", + "à¶šà·šà¶´à·Š වර්ඩ් එස්කියුඩà·" + ], + "CZK": [ + "CZK", + "චෙක් රිපබ්ලික් කොරූනà·" + ], + "DJF": [ + "DJF", + "ජිබූති ෆ්â€à¶»à·‘න්ක්" + ], + "DKK": [ + "DKK", + "à¶©à·à¶±à·’à·‚à·Š à¶šà·Šâ€à¶»à·à¶±à·Š" + ], + "DOP": [ + "DOP", + "ඩොමිනිකà·à¶±à·” පෙසà·" + ], + "DZD": [ + "DZD", + "ඇල්ගේරියà·à¶±à·” à¶©à·’à¶±à·à¶»à·Š" + ], + "EGP": [ + "EGP", + "ඊජිප්තු පවුම්" + ], + "ERN": [ + "ERN", + "එරිත්â€à¶»à·’යà·à¶±à·” à¶±à·à¶šà·Šà·†à·" + ], + "ETB": [ + "ETB", + "ඉතියà·à¶´à·’යà·à¶±à·” බීර්" + ], + "EUR": [ + "€", + "යුරà·" + ], + "FJD": [ + "FJD", + "ෆිජියන් ඩොලර්" + ], + "FKP": [ + "FKP", + "à·†à·à¶šà·Šà¶½à¶±à·Šà¶©à·Š දූපත් පවුම්" + ], + "GBP": [ + "£", + "à¶¶à·Šâ€à¶»à·’à¶­à·à¶±à·Šâ€à¶º ස්ටර්ලින් පවුම්" + ], + "GEL": [ + "GEL", + "à¶¢à·à¶¢à·’යà·à¶±à·” à¶½à·à¶»à·“" + ], + "GHS": [ + "GHS", + "à¶à·à¶±à· සෙඩි" + ], + "GIP": [ + "GIP", + "ජිබ්â€à¶»à·à¶½à·Šà¶§à· පවුම්" + ], + "GMD": [ + "GMD", + "à¶œà·à¶¸à·Šà¶¶à·’යà·à¶±à·” දලà·à·ƒà·’" + ], + "GNF": [ + "GNF", + "ගිනියà·à¶±à·” ෆ්රෑන්ක්" + ], + "GTQ": [ + "GTQ", + "à¶œà·à¶­à¶¸à·à¶½à·à¶±à·” ක්වෙට්සල්" + ], + "GYD": [ + "GYD", + "ගයන෠ඩොලර්" + ], + "HKD": [ + "HK$", + "හොංකොං ඩොලර්" + ], + "HNL": [ + "HNL", + "හොන්ඩුරà·à¶±à·” ලෙම්පිරà·" + ], + "HRK": [ + "HRK", + "à¶šà·Šâ€à¶»à·œà¶’ෂියà·à¶±à·” à¶šà·–à¶±à·" + ], + "HTG": [ + "HTG", + "හයිටි à¶œà·à¶»à·Šà¶©à·Š" + ], + "HUF": [ + "HUF", + "හංගේරියà·à¶±à·” ෆරින්ට්" + ], + "IDR": [ + "IDR", + "ඉන්දුනීසියà·à¶±à·” රුපියà·" + ], + "ILS": [ + "₪", + "à¶Šà·à·Šâ€à¶»à·à¶ºà¶½ නව à·à·™à¶šà¶½à·Š" + ], + "INR": [ + "₹", + "ඉන්දියà·à¶±à·” රුපියල්" + ], + "IQD": [ + "IQD", + "ඉරà·à¶š à¶©à·’à¶±à·à¶»à·Š" + ], + "IRR": [ + "IRR", + "ඉරà·à¶± රියà·à¶½à·Š" + ], + "ISK": [ + "ISK", + "අයිස්ලන්තික à¶šà·Šâ€à¶»à·à¶±à·" + ], + "JMD": [ + "JMD", + "à¶¢à·à¶¸à·™à¶ºà·’à¶šà·à¶±à·” ඩොලර්" + ], + "JOD": [ + "JOD", + "à¶¢à·à¶»à·Šà¶¯à·à¶±à·Š à¶©à·’à¶±à·à¶»à·Š" + ], + "JPY": [ + "JPÂ¥", + "ජපන් යෙන්" + ], + "KES": [ + "KES", + "කෙන්යà·à¶±à·” à·à·’ලිං" + ], + "KGS": [ + "KGS", + "කිරිගිස්ථà·à¶± සම්" + ], + "KHR": [ + "KHR", + "à¶šà·à¶¸à·Šà¶¶à·à¶¢ රියේල්" + ], + "KMF": [ + "KMF", + "කොමොරියà·à¶±à·” ෆ්â€à¶»à·‘න්ක්" + ], + "KPW": [ + "KPW", + "උතුරු කොරියà·à¶±à·” වොන්" + ], + "KRW": [ + "â‚©", + "දකුණු කොරියà·à¶±à·” වොන්" + ], + "KWD": [ + "KWD", + "කුවේට් à¶©à·’à¶±à·à¶»à·Š" + ], + "KYD": [ + "KYD", + "කේමන් දූපත් ඩොලර්" + ], + "KZT": [ + "KZT", + "කසකස්ථà·à¶± ටෙන්ග" + ], + "LAK": [ + "LAK", + "à¶½à·à¶•ස් à¶šà·’à¶´à·Š" + ], + "LBP": [ + "LBP", + "ලෙබනන පවුම්" + ], + "LKR": [ + "රු.", + "à·à·Šâ€à¶»à·“ ලංක෠රුපියල" + ], + "LRD": [ + "LRD", + "ලයිබේරියà·à¶±à·” ඩොලර්" + ], + "LTL": [ + "LTL", + "ලිතුවේනියà·à¶±à·”" + ], + "LVL": [ + "LVL", + "à¶½à·à¶§à·Šà·€à·’යà·à¶±à·” à¶½à·à¶§à·Šà·ƒà·Š" + ], + "LYD": [ + "LYD", + "ලිබියà·à¶±à·” à¶©à·’à¶±à·à¶»à·Š" + ], + "MAD": [ + "MAD", + "මොරොක්ක෠ඩිර්හà·à¶¸à·Š" + ], + "MDL": [ + "MDL", + "මà·à¶½à·Šà¶©à·à·€à·à¶±à·” ලෙව්" + ], + "MGA": [ + "MGA", + "මලගà·à·ƒà·’ අරියà·à¶»à·’" + ], + "MKD": [ + "MKD", + "මà·à·ƒà¶©à·à¶±à·’යà·à¶±à·” à¶©à·’à¶±à·à¶»à·Š" + ], + "MMK": [ + "MMK", + "බුරුම ක්යà·à¶§à·Š" + ], + "MNT": [ + "MNT", + "මොන්ගà·à¶½à·’යà·à¶±à·” ටග්â€à¶»à·’à¶šà·Š" + ], + "MOP": [ + "MOP", + "මà·à¶šà¶±à·“ස් à¶´à¶§à¶šà·" + ], + "MRO": [ + "MRO", + "මුරුසි ඔයිගුයියà·" + ], + "MUR": [ + "MUR", + "මුරිසියà·à¶±à·” රුපියල්" + ], + "MVR": [ + "MVR", + "මà·à¶½à¶¯à·’වයින් රුෆියà·" + ], + "MWK": [ + "MWK", + "මලà·à·€à·’ à¶šà·Šà·€à·à¶ à·" + ], + "MXN": [ + "MX$", + "මෙක්සිකà·à¶±à·” ඩොලර්" + ], + "MYR": [ + "MYR", + "මà·à¶½à·šà·ƒà·’යà·à¶±à·” රින්ගිට්" + ], + "MZN": [ + "MZN", + "මොසà·à¶¸à·Šà¶¶à·’කන් මෙටිකල්" + ], + "NAD": [ + "NAD", + "à¶±à·à¶¸à·“බියà·à¶±à·” ඩොලර්" + ], + "NGN": [ + "NGN", + "නයිජීරියà·à¶±à·” නයිරà·" + ], + "NIO": [ + "NIO", + "නිකරගුවà·à¶±à·” කොඩà·à¶¶à·" + ], + "NOK": [ + "NOK", + "නොර්වීජියන් à¶šà·Šâ€à¶»à·à¶±à·Š" + ], + "NPR": [ + "NPR", + "නේපà·à¶½ රුපියල්" + ], + "NZD": [ + "NZ$", + "නවසීලන්ත ඩොලර්" + ], + "OMR": [ + "OMR", + "ඕමà·à¶±à·Š රියà·à¶½à·Š" + ], + "PAB": [ + "PAB", + "à¶´à·à¶±à¶¸à· à¶¶à·à¶½à·Šà¶¶à·" + ], + "PEN": [ + "PEN", + "පේරු නියුව෠සොල්" + ], + "PGK": [ + "PGK", + "à¶´à·à¶´à·”ව෠නිව් ගිනියà·à¶±à·” à¶šà·’à¶±à·" + ], + "PHP": [ + "PHP", + "පිලිපීන පෙසà·" + ], + "PKR": [ + "PKR", + "à¶´à·à¶šà·’ස්ථà·à¶± රුපියල්" + ], + "PLN": [ + "PLN", + "පොලිෂ් ස්ලොටි" + ], + "PYG": [ + "PYG", + "à¶´à·à¶»à¶œà·”වේ ගුවරà·à¶±à·’" + ], + "QAR": [ + "QAR", + "à¶šà¶§à·à¶»à·Š රියà·à¶½à·Š" + ], + "RON": [ + "RON", + "රොමේනියà·à¶±à·” ලෙව්" + ], + "RSD": [ + "RSD", + "සර්බියà·à¶±à·” à¶©à·’à¶±à·à¶»à·Š" + ], + "RUB": [ + "RUB", + "රුසියන් රූබල්" + ], + "RWF": [ + "RWF", + "රුවන්ඩ෠ෆ්â€à¶»à·‘න්ක්" + ], + "SAR": [ + "SAR", + "සවුදි රියà·à¶½à·Š" + ], + "SBD": [ + "SBD", + "සොලමන් දූපත් ඩොලර්" + ], + "SCR": [ + "SCR", + "සීෂෙලියà·à¶±à·” රුපියල" + ], + "SDG": [ + "SDG", + "සුඩà·à¶± පවුම්" + ], + "SEK": [ + "SEK", + "ස්වෙඩිෂ් à¶šà·Šâ€à¶»à·à¶±à·" + ], + "SGD": [ + "SGD", + "සිංගප්පූරු ඩොලර්" + ], + "SHP": [ + "SHP", + "à·à·à¶±à·Šà¶­ හෙලේන෠පවුම්" + ], + "SLL": [ + "SLL", + "සියර෠ලියොන් ලියොන්" + ], + "SOS": [ + "SOS", + "à·ƒà·à¶¸à·à¶½à·’යà·à¶±à·” à·à·’ලිං" + ], + "SRD": [ + "SRD", + "සුරිනà·à¶¸à·Š ඩොලර්" + ], + "SSP": [ + "SSP", + "දකුණු සුඩà·à¶± පවුම්" + ], + "STD": [ + "STD", + "à·ƒà·à¶• à¶­à·à¶¸à·Š සහ à¶´à·Šâ€à¶»à·’න්සිප් දොබ්â€à¶»à·" + ], + "SYP": [ + "SYP", + "සිරියà·à¶±à·” පවුම්" + ], + "SZL": [ + "SZL", + "ස්වà·à·ƒà·’ ලිලන්ජනි" + ], + "THB": [ + "฿", + "à¶­à·à¶ºà·’ à¶¶à·à¶­à·Š" + ], + "TJS": [ + "TJS", + "තජිකිස්ථà·à¶± සමොනි" + ], + "TMT": [ + "TMT", + "තක්මෙනිස්ථà·à¶± මනà·à¶§à·Š" + ], + "TND": [ + "TND", + "ටියුනීසියà·à¶±à·” à¶©à·’à¶±à·à¶»à·Š" + ], + "TOP": [ + "TOP", + "ටොංගà·à¶±à·” à¶´à·à¶±à·Šà¶œà·" + ], + "TRY": [ + "TRY", + "තුර්කි ලිරà·" + ], + "TTD": [ + "TTD", + "à¶§à·Šâ€à¶»à·’නිඩෑඩ් සහ ටොබෑග෠ඩොලර්" + ], + "TWD": [ + "NT$", + "නව à¶­à·à¶ºà·’à·€à·à¶± ඩොලර්" + ], + "TZS": [ + "TZS", + "à¶§à·à¶±à·Šà·ƒà·à¶±à·’යà·à¶±à·” à·à·’ලිං" + ], + "UAH": [ + "UAH", + "යුක්රේන à·„à·Šâ€à¶»à·’ව්නියà·" + ], + "UGX": [ + "UGX", + "උගන්ඩ෠à·à·’ලිං" + ], + "USD": [ + "US$", + "ඇමරිකà·à¶±à·” ඩොලර්" + ], + "UYU": [ + "UYU", + "උරුගුවේ පෙසà·" + ], + "UZS": [ + "UZS", + "උස්බෙකිස්ථà·à¶± සම්" + ], + "VEF": [ + "VEF", + "වෙනිසියුලà·à¶±à·” බොලිවර්" + ], + "VND": [ + "â‚«", + "වියට්නà·à¶¸ ඩොන්" + ], + "VUV": [ + "VUV", + "වනුවà·à¶§à·” à·€à·à¶§à·”" + ], + "WST": [ + "WST", + "à·ƒà·à¶¸à·à·€à· à¶§à·à¶½à·" + ], + "XAF": [ + "FCFA", + "සිෆ්එ ෆ්රෑන්ක් බිඊඑසි" + ], + "XCD": [ + "EC$", + "à¶±à·à¶œà·™à¶±à·„à·’à¶» à¶šà·à¶»à·’බියà·à¶±à·” ඩොලර්" + ], + "XOF": [ + "සිෆ්එ", + "සිෆ්එ ෆ්රෑන්ක් බිසීඊඑඔ" + ], + "XPF": [ + "CFPF", + "à¶´à·Šâ€à¶»à¶‚෠පොලිනීසියà·à¶±à·” ෆ්â€à¶»à·‘න්ක්" + ], + "YER": [ + "YER", + "යේමන රියà·à¶½à·Š" + ], + "ZAR": [ + "ZAR", + "දකුණු à¶…à¶´à·Šâ€à¶»à·’à¶šà·à¶±à·” à¶»à·à¶±à·Šà¶©à·Š" + ], + "ZMK": [ + "ZMK", + "à·ƒà·à¶¸à·Šà¶¶à·’යà·à¶±à·” à¶šà·Šà·€à·à¶ à· (1968–2012)" + ], + "ZMW": [ + "ZMW", + "à·ƒà·à¶¸à·Šà¶¶à·’යà·à¶±à·” à¶šà·Šà·€à·à¶ à·" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sk.json new file mode 100644 index 0000000000000000000000000000000000000000..2d3ba80641586db8c5dc47dfbffc3a08bef55b52 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sk.json @@ -0,0 +1,1013 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "andorská peseta" + ], + "AED": [ + "AED", + "SAE dirham" + ], + "AFN": [ + "AFN", + "afganský afgání" + ], + "ALL": [ + "ALL", + "albánsky lek" + ], + "AMD": [ + "AMD", + "arménsky dram" + ], + "ANG": [ + "ANG", + "antilský gulden" + ], + "AOA": [ + "AOA", + "angolská kwanza" + ], + "AOK": [ + "AOK", + "angolská kwanza (1977–1990)" + ], + "AON": [ + "AON", + "Angolská nová kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "angolská kwanza reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "argentínsky austral" + ], + "ARP": [ + "ARP", + "argentínske peso (1983 – 1985)" + ], + "ARS": [ + "ARS", + "argentínske peso" + ], + "ATS": [ + "ATS", + "rakúsky Å¡iling" + ], + "AUD": [ + "AUD", + "austrálsky dolár" + ], + "AWG": [ + "AWG", + "arubský gulden" + ], + "AZM": [ + "AZM", + "azerbajdžanský manat (1993–2006)" + ], + "AZN": [ + "AZN", + "azerbajdžanský manat" + ], + "BAD": [ + "BAD", + "bosniansko-hercegovinský dinár (1992–1994)" + ], + "BAM": [ + "BAM", + "konvertibilná marka" + ], + "BBD": [ + "BBD", + "barbadoský dolár" + ], + "BDT": [ + "BDT", + "bangladéšska taka" + ], + "BEC": [ + "BEC", + "belgický frank (konvertibilný)" + ], + "BEF": [ + "BEF", + "belgický frank" + ], + "BEL": [ + "BEL", + "belgický frank (finanÄný)" + ], + "BGL": [ + "BGL", + "bulharský tvrdý lev" + ], + "BGN": [ + "BGN", + "bulharský lev" + ], + "BHD": [ + "BHD", + "bahrajnský dinár" + ], + "BIF": [ + "BIF", + "burundský frank" + ], + "BMD": [ + "BMD", + "bermudský dolár" + ], + "BND": [ + "BND", + "brunejský dolár" + ], + "BOB": [ + "BOB", + "bolívijské boliviano" + ], + "BOP": [ + "BOP", + "bolívijské peso" + ], + "BOV": [ + "BOV", + "bolívijské MVDOL" + ], + "BRB": [ + "BRB", + "brazílske cruzeiro novo (1967–1986)" + ], + "BRC": [ + "BRC", + "brazílske cruzado (1986 – 1989)" + ], + "BRE": [ + "BRE", + "brazílske cruzeiro (1990 – 1993)" + ], + "BRL": [ + "BRL", + "brazílsky real" + ], + "BRN": [ + "BRN", + "Brazílske Cruzado Novo" + ], + "BRR": [ + "BRR", + "Brazílske cruzeiro" + ], + "BSD": [ + "BSD", + "bahamský dolár" + ], + "BTN": [ + "BTN", + "bhutánsky ngultrum" + ], + "BUK": [ + "BUK", + "Burmese Kyat" + ], + "BWP": [ + "BWP", + "botswanská pula" + ], + "BYB": [ + "BYB", + "Bieloruský nový rubeľ (1994–1999)" + ], + "BYN": [ + "BYN", + "bieloruský rubeľ" + ], + "BYR": [ + "BYR", + "bieloruský rubeľ (2000–2016)" + ], + "BZD": [ + "BZD", + "belizský dolár" + ], + "CAD": [ + "CAD", + "kanadský dolár" + ], + "CDF": [ + "CDF", + "konžský frank" + ], + "CHF": [ + "CHF", + "Å¡vajÄiarsky frank" + ], + "CLF": [ + "CLF", + "Čílske Unidades de Fomento" + ], + "CLP": [ + "CLP", + "Äilské peso" + ], + "CNY": [ + "CNY", + "Äínsky jüan" + ], + "COP": [ + "COP", + "kolumbijské peso" + ], + "CRC": [ + "CRC", + "kostarický colón" + ], + "CSK": [ + "CSK", + "ÄŒeskoslovenská koruna" + ], + "CUC": [ + "CUC", + "kubánske konvertibilné peso" + ], + "CUP": [ + "CUP", + "kubánske peso" + ], + "CVE": [ + "CVE", + "kapverdské escudo" + ], + "CYP": [ + "CYP", + "Cypruská libra" + ], + "CZK": [ + "CZK", + "Äeská koruna" + ], + "DDM": [ + "DDM", + "Východonemecká marka" + ], + "DEM": [ + "DEM", + "Nemecká marka" + ], + "DJF": [ + "DJF", + "džibutský frank" + ], + "DKK": [ + "DKK", + "dánska koruna" + ], + "DOP": [ + "DOP", + "dominikánske peso" + ], + "DZD": [ + "DZD", + "alžírsky dinár" + ], + "ECS": [ + "ECS", + "Ekuadorský sucre" + ], + "ECV": [ + "ECV", + "Ekuadorský Unidad de Valor Constante (UVC)" + ], + "EEK": [ + "EEK", + "Estónska kroon" + ], + "EGP": [ + "EGP", + "egyptská libra" + ], + "ERN": [ + "ERN", + "eritrejská nakfa" + ], + "ESP": [ + "ESP", + "Å panielská peseta" + ], + "ETB": [ + "ETB", + "etiópsky birr" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "Finská marka" + ], + "FJD": [ + "FJD", + "fidžijský dolár" + ], + "FKP": [ + "FKP", + "falklandská libra" + ], + "FRF": [ + "FRF", + "Francúzsky frank" + ], + "GBP": [ + "GBP", + "britská libra" + ], + "GEK": [ + "GEK", + "Gruzínsky Kupon Larit" + ], + "GEL": [ + "GEL", + "gruzínske lari" + ], + "GHC": [ + "GHC", + "Ghanský cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "ghanské cedi" + ], + "GIP": [ + "GIP", + "gibraltárska libra" + ], + "GMD": [ + "GMD", + "gambijské dalasi" + ], + "GNF": [ + "GNF", + "guinejský frank" + ], + "GNS": [ + "GNS", + "Guinejský syli" + ], + "GQE": [ + "GQE", + "Rovníková Guinea Ekwele Guineana" + ], + "GRD": [ + "GRD", + "Grécka drachma" + ], + "GTQ": [ + "GTQ", + "guatemalský quetzal" + ], + "GWE": [ + "GWE", + "Portugalská Guinea eskudo" + ], + "GWP": [ + "GWP", + "Guinejsko-bissauské peso" + ], + "GYD": [ + "GYD", + "guyanský dolár" + ], + "HKD": [ + "HKD", + "hongkonský dolár" + ], + "HNL": [ + "HNL", + "honduraská lempira" + ], + "HRD": [ + "HRD", + "Chorvátsky dinár" + ], + "HRK": [ + "HRK", + "chorvátska kuna" + ], + "HTG": [ + "HTG", + "haitské gourde" + ], + "HUF": [ + "HUF", + "maÄarský forint" + ], + "IDR": [ + "IDR", + "indonézska rupia" + ], + "IEP": [ + "IEP", + "Ãrska libra" + ], + "ILP": [ + "ILP", + "Izraelská libra" + ], + "ILS": [ + "NIS", + "izraelský Å¡ekel" + ], + "INR": [ + "INR", + "indická rupia" + ], + "IQD": [ + "IQD", + "iracký dinár" + ], + "IRR": [ + "IRR", + "iránsky rial" + ], + "ISK": [ + "ISK", + "islandská koruna" + ], + "ITL": [ + "ITL", + "Talianská lira" + ], + "JMD": [ + "JMD", + "jamajský dolár" + ], + "JOD": [ + "JOD", + "jordánsky dinár" + ], + "JPY": [ + "JPY", + "japonský jen" + ], + "KES": [ + "KES", + "kenský Å¡iling" + ], + "KGS": [ + "KGS", + "kirgizský som" + ], + "KHR": [ + "KHR", + "kambodžský riel" + ], + "KMF": [ + "KMF", + "komorský frank" + ], + "KPW": [ + "KPW", + "severokórejský won" + ], + "KRW": [ + "KRW", + "juhokórejský won" + ], + "KWD": [ + "KWD", + "kuvajtský dinár" + ], + "KYD": [ + "KYD", + "kajmanský dolár" + ], + "KZT": [ + "KZT", + "kazaÅ¡ské tenge" + ], + "LAK": [ + "LAK", + "laoský kip" + ], + "LBP": [ + "LBP", + "libanonská libra" + ], + "LKR": [ + "LKR", + "srílanská rupia" + ], + "LRD": [ + "LRD", + "libérijský dolár" + ], + "LSL": [ + "LSL", + "Lesothský loti" + ], + "LTL": [ + "LTL", + "litovský litas" + ], + "LTT": [ + "LTT", + "Litevský talonas" + ], + "LUF": [ + "LUF", + "Luxemburský frank" + ], + "LVL": [ + "LVL", + "LotyÅ¡ský lat" + ], + "LVR": [ + "LVR", + "LotyÅ¡ský rubeľ" + ], + "LYD": [ + "LYD", + "líbyjský dinár" + ], + "MAD": [ + "MAD", + "marocký dirham" + ], + "MAF": [ + "MAF", + "Marocký frank" + ], + "MDL": [ + "MDL", + "moldavský lei" + ], + "MGA": [ + "MGA", + "malgaÅ¡ský ariary" + ], + "MGF": [ + "MGF", + "Madagaskarský frank" + ], + "MKD": [ + "MKD", + "macedónsky denár" + ], + "MLF": [ + "MLF", + "Malský frank" + ], + "MMK": [ + "MMK", + "mjanmarský kyat" + ], + "MNT": [ + "MNT", + "mongolský tugrik" + ], + "MOP": [ + "MOP", + "macajská pataca" + ], + "MRO": [ + "MRO", + "mauritánska ukija" + ], + "MTL": [ + "MTL", + "Maltská lira" + ], + "MTP": [ + "MTP", + "Maltská libra" + ], + "MUR": [ + "MUR", + "maurícijská rupia" + ], + "MVR": [ + "MVR", + "maldivská rupia" + ], + "MWK": [ + "MWK", + "malawijská kwacha" + ], + "MXN": [ + "MX$", + "mexické peso" + ], + "MXP": [ + "MXP", + "Mexické striborné peso (1861–1992)" + ], + "MXV": [ + "MXV", + "Mexické Unidad de Inversion (UDI)" + ], + "MYR": [ + "MYR", + "malajzijský ringgit" + ], + "MZE": [ + "MZE", + "Mozambické escudo" + ], + "MZM": [ + "MZM", + "Mozambický metical (1980–2006)" + ], + "MZN": [ + "MZN", + "mozambický metical" + ], + "NAD": [ + "NAD", + "namíbijský dolár" + ], + "NGN": [ + "NGN", + "nigérijská naira" + ], + "NIC": [ + "NIC", + "Nikaragujská Cordoba (1988–1991)" + ], + "NIO": [ + "NIO", + "nikaragujská córdoba" + ], + "NLG": [ + "NLG", + "Nizozemský guilder" + ], + "NOK": [ + "NOK", + "nórska koruna" + ], + "NPR": [ + "NPR", + "nepálska rupia" + ], + "NZD": [ + "NZD", + "novozélandský dolár" + ], + "OMR": [ + "OMR", + "ománsky rial" + ], + "PAB": [ + "PAB", + "panamská balboa" + ], + "PEI": [ + "PEI", + "Peruvský inti" + ], + "PEN": [ + "PEN", + "peruánsky nový sol" + ], + "PES": [ + "PES", + "Peruvský sol" + ], + "PGK": [ + "PGK", + "papuánska kina" + ], + "PHP": [ + "PHP", + "filipínske peso" + ], + "PKR": [ + "PKR", + "pakistanská rupia" + ], + "PLN": [ + "PLN", + "poľský zlotý" + ], + "PLZ": [ + "PLZ", + "Polský zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugalské eskudo" + ], + "PYG": [ + "PYG", + "paraguajské guaraní" + ], + "QAR": [ + "QAR", + "katarský rial" + ], + "ROL": [ + "ROL", + "Rumunský leu (1952–2006)" + ], + "RON": [ + "RON", + "rumunský lei" + ], + "RSD": [ + "RSD", + "srbský dinár" + ], + "RUB": [ + "RUB", + "ruský rubeľ" + ], + "RUR": [ + "RUR", + "Ruský rubeľ (1991–1998)" + ], + "RWF": [ + "RWF", + "rwandský frank" + ], + "SAR": [ + "SAR", + "saudskoarabský rial" + ], + "SBD": [ + "SBD", + "Å¡alamúnsky dolár" + ], + "SCR": [ + "SCR", + "seychelská rupia" + ], + "SDD": [ + "SDD", + "Sudánsky dinár" + ], + "SDG": [ + "SDG", + "sudánska libra" + ], + "SDP": [ + "SDP", + "Sudánska libra (1957–1998)" + ], + "SEK": [ + "SEK", + "Å¡védska koruna" + ], + "SGD": [ + "SGD", + "singapurský dolár" + ], + "SHP": [ + "SHP", + "svätohelenská libra" + ], + "SIT": [ + "SIT", + "Slovinský Tolar" + ], + "SKK": [ + "SKK", + "Slovenská koruna" + ], + "SLL": [ + "SLL", + "sierraleonský leone" + ], + "SOS": [ + "SOS", + "somálsky Å¡iling" + ], + "SRD": [ + "SRD", + "surinamský dolár" + ], + "SRG": [ + "SRG", + "Surinamský guilder" + ], + "SSP": [ + "SSP", + "juhosudánska libra" + ], + "STD": [ + "STD", + "svätotomášska dobra" + ], + "SUR": [ + "SUR", + "Sovietsky rubeľ" + ], + "SVC": [ + "SVC", + "Salvádorský colón" + ], + "SYP": [ + "SYP", + "sýrska libra" + ], + "SZL": [ + "SZL", + "svazijské lilangeni" + ], + "THB": [ + "THB", + "thajský baht" + ], + "TJR": [ + "TJR", + "Tadžický rubeľ" + ], + "TJS": [ + "TJS", + "tadžické somoni" + ], + "TMM": [ + "TMM", + "Turkménsky manat (1993–2009)" + ], + "TMT": [ + "TMT", + "turkménsky manat" + ], + "TND": [ + "TND", + "tuniský dinár" + ], + "TOP": [ + "TOP", + "tongská paÊ»anga" + ], + "TPE": [ + "TPE", + "Timorské eskudo" + ], + "TRL": [ + "TRL", + "Turecká lira (1922–2005)" + ], + "TRY": [ + "TRY", + "turecká líra" + ], + "TTD": [ + "TTD", + "trinidadsko-tobažský dolár" + ], + "TWD": [ + "TWD", + "nový taiwanský dolár" + ], + "TZS": [ + "TZS", + "tanzánsky Å¡iling" + ], + "UAH": [ + "UAH", + "ukrajinská hrivna" + ], + "UAK": [ + "UAK", + "Ukrainský karbovanetz" + ], + "UGS": [ + "UGS", + "Ugandan Å¡iling (1966–1987)" + ], + "UGX": [ + "UGX", + "ugandský Å¡iling" + ], + "USD": [ + "USD", + "americký dolár" + ], + "USN": [ + "USN", + "US dolár (Next day)" + ], + "USS": [ + "USS", + "US dolár (Same day)" + ], + "UYP": [ + "UYP", + "Uruguajské peso (1975–1993)" + ], + "UYU": [ + "UYU", + "uruguajské peso" + ], + "UZS": [ + "UZS", + "uzbecký sum" + ], + "VEB": [ + "VEB", + "Venezuelský bolívar (1871–2008)" + ], + "VEF": [ + "VEF", + "venezuelský bolívar" + ], + "VND": [ + "VND", + "vietnamský dong" + ], + "VUV": [ + "VUV", + "vanuatské vatu" + ], + "WST": [ + "WST", + "samojská tala" + ], + "XAF": [ + "FCFA", + "stredoafrický frank" + ], + "XCD": [ + "EC$", + "východokaribský dolár" + ], + "XFO": [ + "XFO", + "Francúzsky zlatý frank" + ], + "XFU": [ + "XFU", + "Francúzsky UIC-frank" + ], + "XOF": [ + "CFA", + "západoafrický frank" + ], + "XPF": [ + "CFPF", + "CFP frank" + ], + "YDD": [ + "YDD", + "Jemenský dinár" + ], + "YER": [ + "YER", + "jemenský rial" + ], + "YUD": [ + "YUD", + "Juhoslávsky dinár [YUD]" + ], + "YUM": [ + "YUM", + "Juhoslávsky Noviy dinár" + ], + "YUN": [ + "YUN", + "Juhoslávsky dinár" + ], + "ZAL": [ + "ZAL", + "Juhoafrický rand (financial)" + ], + "ZAR": [ + "ZAR", + "juhoafrický rand" + ], + "ZMK": [ + "ZMK", + "Zambijská kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "zambijská kwacha" + ], + "ZRN": [ + "ZRN", + "Zairský nový zaire" + ], + "ZRZ": [ + "ZRZ", + "Zairský Zaire" + ], + "ZWD": [ + "ZWD", + "Zimbabwiansky dolár (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Zimbabwiansky dolár (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabwiansky dolár (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sl.json new file mode 100644 index 0000000000000000000000000000000000000000..c4acd0c16ca3367e73471d50c80165a95efd67aa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sl.json @@ -0,0 +1,1053 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "andorska peseta" + ], + "AED": [ + "AED", + "dirham Združenih arabskih emiratov" + ], + "AFA": [ + "AFA", + "stari afganistanski afgani (1927–2002)" + ], + "AFN": [ + "AFN", + "afgani" + ], + "ALL": [ + "ALL", + "albanski lek" + ], + "AMD": [ + "AMD", + "armenski dram" + ], + "ANG": [ + "ANG", + "nizozemsko-antilski gulden" + ], + "AOA": [ + "AOA", + "angolska kvanza" + ], + "AOK": [ + "AOK", + "stara angolska kvanza (1977–1990)" + ], + "AON": [ + "AON", + "angolska nova kvanza (1990–2000)" + ], + "AOR": [ + "AOR", + "konvertibilna angolska kvanza (1995–1999)" + ], + "ARA": [ + "ARA", + "argentinski avstral" + ], + "ARP": [ + "ARP", + "argentinski peso (1983–1985)" + ], + "ARS": [ + "ARS", + "argentinski peso" + ], + "ATS": [ + "ATS", + "avstrijski Å¡iling" + ], + "AUD": [ + "A$", + "avstralski dolar" + ], + "AWG": [ + "AWG", + "arubski florin" + ], + "AZM": [ + "AZM", + "stari azerbajdžanski manat (1993–2006)" + ], + "AZN": [ + "AZN", + "azerbajdžanski manat" + ], + "BAD": [ + "BAD", + "bosansko-hercegovski dinar" + ], + "BAM": [ + "BAM", + "bosansko-hercegovska konvertibilna marka" + ], + "BBD": [ + "BBD", + "barbadoÅ¡ki dolar" + ], + "BDT": [ + "BDT", + "bangladeÅ¡ka taka" + ], + "BEC": [ + "BEC", + "belgijski konvertibilni frank" + ], + "BEF": [ + "BEF", + "belgijski frank" + ], + "BEL": [ + "BEL", + "belgijski finanÄni frank" + ], + "BGL": [ + "BGL", + "stari bolgarski lev" + ], + "BGN": [ + "BGN", + "bolgarski lev" + ], + "BHD": [ + "BHD", + "bahranski dinar" + ], + "BIF": [ + "BIF", + "burundski frank" + ], + "BMD": [ + "BMD", + "bermudski dolar" + ], + "BND": [ + "BND", + "brunejski dolar" + ], + "BOB": [ + "BOB", + "bolivijski boliviano" + ], + "BOP": [ + "BOP", + "bolivijski peso" + ], + "BOV": [ + "BOV", + "bolivijski mvdol" + ], + "BRB": [ + "BRB", + "brazilski novi kruzeiro (1967–1986)" + ], + "BRC": [ + "BRC", + "brazilski kruzado" + ], + "BRE": [ + "BRE", + "stari brazilski kruzeiro (1990–1993)" + ], + "BRL": [ + "R$", + "brazilski real" + ], + "BRN": [ + "BRN", + "novi brazilski kruzado" + ], + "BRR": [ + "BRR", + "brazilski kruzeiro" + ], + "BSD": [ + "BSD", + "bahamski dolar" + ], + "BTN": [ + "BTN", + "butanski ngultrum" + ], + "BUK": [ + "BUK", + "burmanski kjat" + ], + "BWP": [ + "BWP", + "bocvanska pula" + ], + "BYB": [ + "BYB", + "beloruski novi rubelj (1994–1999)" + ], + "BYN": [ + "BYN", + "beloruski rubelj" + ], + "BYR": [ + "BYR", + "beloruski rubelj (2000–2016)" + ], + "BZD": [ + "BZD", + "belizejski dolar" + ], + "CAD": [ + "CAD", + "kanadski dolar" + ], + "CDF": [ + "CDF", + "kongoÅ¡ki frank" + ], + "CHE": [ + "CHE", + "evro WIR" + ], + "CHF": [ + "CHF", + "Å¡vicarski frank" + ], + "CHW": [ + "CHW", + "frank WIR" + ], + "CLF": [ + "CLF", + "Äilski unidades de fomento" + ], + "CLP": [ + "CLP", + "Äilski peso" + ], + "CNY": [ + "CNÂ¥", + "kitajski juan" + ], + "COP": [ + "COP", + "kolumbijski peso" + ], + "COU": [ + "COU", + "kolumbijska enota realne vrednosti" + ], + "CRC": [ + "CRC", + "kostariÅ¡ki kolon" + ], + "CSD": [ + "CSD", + "stari srbski dinar" + ], + "CSK": [ + "CSK", + "ÄeÅ¡koslovaÅ¡ka krona" + ], + "CUC": [ + "CUC", + "kubanski konvertibilni peso" + ], + "CUP": [ + "CUP", + "kubanski peso" + ], + "CVE": [ + "CVE", + "zelenortski eskudo" + ], + "CYP": [ + "CYP", + "ciprski funt" + ], + "CZK": [ + "CZK", + "ÄeÅ¡ka krona" + ], + "DDM": [ + "DDM", + "vzhodnonemÅ¡ka marka" + ], + "DEM": [ + "DEM", + "nemÅ¡ka marka" + ], + "DJF": [ + "DJF", + "džibutski frank" + ], + "DKK": [ + "DKK", + "danska krona" + ], + "DOP": [ + "DOP", + "dominikanski peso" + ], + "DZD": [ + "DZD", + "alžirski dinar" + ], + "ECS": [ + "ECS", + "ekvadorski sukre" + ], + "ECV": [ + "ECV", + "ekvadorska enota realne vrednosti (UVC)" + ], + "EEK": [ + "EEK", + "estonska krona" + ], + "EGP": [ + "EGP", + "egiptovski funt" + ], + "ERN": [ + "ERN", + "eritrejska nakfa" + ], + "ESA": [ + "ESA", + "Å¡panska pezeta (raÄun A)" + ], + "ESB": [ + "ESB", + "Å¡panska pezeta (raÄun B)" + ], + "ESP": [ + "ESP", + "Å¡panska pezeta" + ], + "ETB": [ + "ETB", + "etiopski bir" + ], + "EUR": [ + "€", + "evro" + ], + "FIM": [ + "FIM", + "finska marka" + ], + "FJD": [ + "FJD", + "fidžijski dolar" + ], + "FKP": [ + "FKP", + "falklandski funt" + ], + "FRF": [ + "FRF", + "francoski frank" + ], + "GBP": [ + "£", + "britanski funt" + ], + "GEK": [ + "GEK", + "gruzijski bon lari" + ], + "GEL": [ + "GEL", + "gruzijski lari" + ], + "GHC": [ + "GHC", + "stari ganski cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "ganski cedi" + ], + "GIP": [ + "GIP", + "gibraltarski funt" + ], + "GMD": [ + "GMD", + "gambijski dalasi" + ], + "GNF": [ + "GNF", + "gvinejski frank" + ], + "GNS": [ + "GNS", + "gvinejski sili" + ], + "GQE": [ + "GQE", + "ekwele Ekvatorialne Gvineje" + ], + "GRD": [ + "GRD", + "grÅ¡ka drahma" + ], + "GTQ": [ + "GTQ", + "gvatemalski kecal" + ], + "GWE": [ + "GWE", + "eskudo Portugalske Gvineje" + ], + "GWP": [ + "GWP", + "peso Gvineje Bissau" + ], + "GYD": [ + "GYD", + "gvajanski dolar" + ], + "HKD": [ + "HK$", + "hongkonÅ¡ki dolar" + ], + "HNL": [ + "HNL", + "honduraÅ¡ka lempira" + ], + "HRD": [ + "HRD", + "hrvaÅ¡ki dinar" + ], + "HRK": [ + "HRK", + "hrvaÅ¡ka kuna" + ], + "HTG": [ + "HTG", + "haitski gurd" + ], + "HUF": [ + "HUF", + "madžarski forint" + ], + "IDR": [ + "IDR", + "indonezijska rupija" + ], + "IEP": [ + "IEP", + "irski funt" + ], + "ILP": [ + "ILP", + "izraelski funt" + ], + "ILS": [ + "₪", + "izraelski Å¡ekel" + ], + "INR": [ + "₹", + "indijska rupija" + ], + "IQD": [ + "IQD", + "iraÅ¡ki dinar" + ], + "IRR": [ + "IRR", + "iranski rial" + ], + "ISK": [ + "ISK", + "islandska krona" + ], + "ITL": [ + "ITL", + "italijanska lira" + ], + "JMD": [ + "JMD", + "jamajÅ¡ki dolar" + ], + "JOD": [ + "JOD", + "jordanski dinar" + ], + "JPY": [ + "Â¥", + "japonski jen" + ], + "KES": [ + "KES", + "kenijski Å¡iling" + ], + "KGS": [ + "KGS", + "kirgiÅ¡ki som" + ], + "KHR": [ + "KHR", + "kamboÅ¡ki riel" + ], + "KMF": [ + "KMF", + "komorski frank" + ], + "KPW": [ + "KPW", + "severnokorejski von" + ], + "KRW": [ + "â‚©", + "južnokorejski von" + ], + "KWD": [ + "KWD", + "kuvajtski dinar" + ], + "KYD": [ + "KYD", + "kajmanski dolar" + ], + "KZT": [ + "KZT", + "kazahstanski tenge" + ], + "LAK": [ + "LAK", + "laoÅ¡ki kip" + ], + "LBP": [ + "LBP", + "libanonski funt" + ], + "LKR": [ + "LKR", + "Å¡rilanÅ¡ka rupija" + ], + "LRD": [ + "LRD", + "liberijski dolar" + ], + "LSL": [ + "LSL", + "lesoÅ¡ki loti" + ], + "LTL": [ + "LTL", + "litovski litas" + ], + "LTT": [ + "LTT", + "litvanski litas" + ], + "LUC": [ + "LUC", + "luksemburÅ¡ki konvertibilni frank" + ], + "LUF": [ + "LUF", + "luksemburÅ¡ki frank" + ], + "LUL": [ + "LUL", + "luksemburÅ¡ki finanÄni frank" + ], + "LVL": [ + "LVL", + "latvijski lats" + ], + "LVR": [ + "LVR", + "latvijski rubelj" + ], + "LYD": [ + "LYD", + "libijski dinar" + ], + "MAD": [ + "MAD", + "maroÅ¡ki dirham" + ], + "MAF": [ + "MAF", + "maroÅ¡ki frank" + ], + "MDL": [ + "MDL", + "moldavijski leu" + ], + "MGA": [ + "MGA", + "malgaÅ¡ki ariarij" + ], + "MGF": [ + "MGF", + "malgaÅ¡ki frank" + ], + "MKD": [ + "MKD", + "makedonski denar" + ], + "MLF": [ + "MLF", + "malijski frank" + ], + "MMK": [ + "MMK", + "mjanmarski kjat" + ], + "MNT": [ + "MNT", + "mongolski tugrik" + ], + "MOP": [ + "MOP", + "makavska pataka" + ], + "MRO": [ + "MRO", + "mavretanska uguija" + ], + "MTL": [ + "MTL", + "malteÅ¡ka lira" + ], + "MTP": [ + "MTP", + "malteÅ¡ki funt" + ], + "MUR": [ + "MUR", + "mavricijska rupija" + ], + "MVR": [ + "MVR", + "maldivska rufija" + ], + "MWK": [ + "MWK", + "malavijska kvaÄa" + ], + "MXN": [ + "MX$", + "mehiÅ¡ki peso" + ], + "MXP": [ + "MXP", + "mehiÅ¡ki srebrni peso (1861–1992)" + ], + "MXV": [ + "MXV", + "mehiÅ¡ka inverzna enota (UDI)" + ], + "MYR": [ + "MYR", + "malezijski ringit" + ], + "MZE": [ + "MZE", + "mozambiÅ¡ki eskudo" + ], + "MZM": [ + "MZM", + "stari mozambiÅ¡ki metikal" + ], + "MZN": [ + "MZN", + "mozambiÅ¡ki metikal" + ], + "NAD": [ + "NAD", + "namibijski dolar" + ], + "NGN": [ + "NGN", + "nigerijska naira" + ], + "NIC": [ + "NIC", + "nikaraÅ¡ka kordova" + ], + "NIO": [ + "NIO", + "nikaraÅ¡ka zlata kordova" + ], + "NLG": [ + "NLG", + "nizozemski gulden" + ], + "NOK": [ + "NOK", + "norveÅ¡ka krona" + ], + "NPR": [ + "NPR", + "nepalska rupija" + ], + "NZD": [ + "NZ$", + "novozelandski dolar" + ], + "OMR": [ + "OMR", + "omanski rial" + ], + "PAB": [ + "PAB", + "panamska balboa" + ], + "PEI": [ + "PEI", + "perujski inti" + ], + "PEN": [ + "PEN", + "perujski novi sol" + ], + "PES": [ + "PES", + "perujski sol" + ], + "PGK": [ + "PGK", + "kina Papue Nove Gvineje" + ], + "PHP": [ + "PHP", + "filipinski peso" + ], + "PKR": [ + "PKR", + "pakistanska rupija" + ], + "PLN": [ + "PLN", + "poljski novi zlot" + ], + "PLZ": [ + "PLZ", + "stari poljski zlot (1950–1995)" + ], + "PTE": [ + "PTE", + "portugalski eskudo" + ], + "PYG": [ + "PYG", + "paragvajski gvarani" + ], + "QAR": [ + "QAR", + "katarski rial" + ], + "RHD": [ + "RHD", + "rodezijski dolar" + ], + "ROL": [ + "ROL", + "stari romunski leu" + ], + "RON": [ + "RON", + "romunski leu" + ], + "RSD": [ + "RSD", + "srbski dinar" + ], + "RUB": [ + "RUB", + "ruski rubelj" + ], + "RUR": [ + "RUR", + "ruski rubelj (1991–1998)" + ], + "RWF": [ + "RWF", + "ruandski frank" + ], + "SAR": [ + "SAR", + "saudski rial" + ], + "SBD": [ + "SBD", + "solomonski dolar" + ], + "SCR": [ + "SCR", + "sejÅ¡elska rupija" + ], + "SDD": [ + "SDD", + "stari sudanski dinar" + ], + "SDG": [ + "SDG", + "sudanski funt" + ], + "SDP": [ + "SDP", + "stari sudanski funt" + ], + "SEK": [ + "SEK", + "Å¡vedska krona" + ], + "SGD": [ + "SGD", + "singapurski dolar" + ], + "SHP": [ + "SHP", + "funt Sv. Helene" + ], + "SIT": [ + "SIT", + "slovenski tolar" + ], + "SKK": [ + "SKK", + "slovaÅ¡ka krona" + ], + "SLL": [ + "SLL", + "sieraleonski leone" + ], + "SOS": [ + "SOS", + "somalski Å¡iling" + ], + "SRD": [ + "SRD", + "surinamski dolar" + ], + "SRG": [ + "SRG", + "surinamski gulden" + ], + "SSP": [ + "SSP", + "južnosudanski funt" + ], + "STD": [ + "STD", + "saotomejska dobra" + ], + "SUR": [ + "SUR", + "sovjetski rubelj" + ], + "SVC": [ + "SVC", + "salvadorski kolon" + ], + "SYP": [ + "SYP", + "sirijski funt" + ], + "SZL": [ + "SZL", + "svazijski lilangeni" + ], + "THB": [ + "฿", + "tajski baht" + ], + "TJR": [ + "TJR", + "tadžikistanski rubelj" + ], + "TJS": [ + "TJS", + "tadžikistanski somoni" + ], + "TMM": [ + "TMM", + "turkmenski manat" + ], + "TMT": [ + "TMT", + "turkmenistanski novi manat" + ], + "TND": [ + "TND", + "tunizijski dinar" + ], + "TOP": [ + "TOP", + "tongovska paanga" + ], + "TPE": [ + "TPE", + "timorski eskudo" + ], + "TRL": [ + "TRL", + "stara turÅ¡ka lira" + ], + "TRY": [ + "TRY", + "nova turÅ¡ka lira" + ], + "TTD": [ + "TTD", + "dolar Trinidada in Tobaga" + ], + "TWD": [ + "NT$", + "novi tajvanski dolar" + ], + "TZS": [ + "TZS", + "tanzanijski Å¡iling" + ], + "UAH": [ + "UAH", + "ukrajinska grivna" + ], + "UAK": [ + "UAK", + "ukrajinski karbovanci" + ], + "UGS": [ + "UGS", + "stari ugandski Å¡iling (1966–1987)" + ], + "UGX": [ + "UGX", + "ugandski Å¡iling" + ], + "USD": [ + "$", + "ameriÅ¡ki dolar" + ], + "USN": [ + "USN", + "ameriÅ¡ki dolar, naslednji dan" + ], + "USS": [ + "USS", + "ameriÅ¡ki dolar, isti dan" + ], + "UYP": [ + "UYP", + "stari urugvajski peso (1975–1993)" + ], + "UYU": [ + "UYU", + "urugvajski peso" + ], + "UZS": [ + "UZS", + "uzbeÅ¡ki sum" + ], + "VEB": [ + "VEB", + "venezuelski bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "venezuelski bolivar" + ], + "VND": [ + "â‚«", + "vientnamski dong" + ], + "VUV": [ + "VUV", + "vanuatujski vatu" + ], + "WST": [ + "WST", + "samoanska tala" + ], + "XAF": [ + "FCFA", + "CFA frank BEAC" + ], + "XCD": [ + "EC$", + "vzhodnokaribski dolar" + ], + "XEU": [ + "XEU", + "evropska denarna enota" + ], + "XFO": [ + "XFO", + "zlati frank" + ], + "XFU": [ + "XFU", + "frank UIC" + ], + "XOF": [ + "CFA", + "zahodnoafriÅ¡ki frank CFA" + ], + "XPF": [ + "CFPF", + "CFP frank" + ], + "YDD": [ + "YDD", + "jemenski dinar" + ], + "YER": [ + "YER", + "jemenski rial" + ], + "YUD": [ + "YUD", + "stari jugoslovanski dinar" + ], + "YUM": [ + "YUM", + "novi jugoslovanski dinar" + ], + "YUN": [ + "YUN", + "jugoslovanski konvertibilni dinar" + ], + "ZAL": [ + "ZAL", + "južnoafriÅ¡ki finanÄni rand" + ], + "ZAR": [ + "ZAR", + "južnoafriÅ¡ki rand" + ], + "ZMK": [ + "ZMK", + "zambijska kvaÄa (1968–2012)" + ], + "ZMW": [ + "ZMW", + "zambijska kvaÄa" + ], + "ZRN": [ + "ZRN", + "zairski novi zaire" + ], + "ZRZ": [ + "ZRZ", + "zairski zaire" + ], + "ZWD": [ + "ZWD", + "zimbabvejski dolar" + ], + "ZWL": [ + "ZWL", + "zimbabvejski dolar (2009)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sn.json new file mode 100644 index 0000000000000000000000000000000000000000..97f0c60d983e8b303f5a3a79f873f573982fefc1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sn.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.98", + "Names": { + "AED": [ + "AED", + "Diramu re United Arab Emirates" + ], + "AOA": [ + "AOA", + "Kwanza ye Angola" + ], + "AUD": [ + "A$", + "Dora re Australia" + ], + "BHD": [ + "BHD", + "Dhinari re Bhahareni" + ], + "BIF": [ + "BIF", + "Furenki re Bhurundi" + ], + "BWP": [ + "BWP", + "Pura re Botswana" + ], + "CAD": [ + "CA$", + "Dora re Kanada" + ], + "CDF": [ + "CDF", + "Furenki re Kongo" + ], + "CHF": [ + "CHF", + "Furenki re Swisi" + ], + "CNY": [ + "CNÂ¥", + "Yuan Renminbi ye China" + ], + "CVE": [ + "CVE", + "Dhora re Escudo" + ], + "DJF": [ + "DJF", + "Furenki re Jibhuti" + ], + "DZD": [ + "DZD", + "Dhinari re Aljeria" + ], + "EGP": [ + "EGP", + "Paundi re Ijipita" + ], + "ERN": [ + "ERN", + "Nakfa re Eritrea" + ], + "ETB": [ + "ETB", + "Dhora re Etiopia" + ], + "EUR": [ + "€", + "Yuro" + ], + "GBP": [ + "£", + "Paundi ye Bhiriteni" + ], + "GHC": [ + "GHC", + "Sedi ye Ghana" + ], + "GMD": [ + "GMD", + "Dalasi ye Gambia" + ], + "GNS": [ + "GNS", + "Furenki re Gine" + ], + "INR": [ + "₹", + "Rupe re India" + ], + "JPY": [ + "JPÂ¥", + "Yeni ye Japani" + ], + "KES": [ + "KES", + "Shiringi ye Kenya" + ], + "KMF": [ + "KMF", + "Furenki re Komoro" + ], + "LRD": [ + "LRD", + "Dora re Liberia" + ], + "LSL": [ + "LSL", + "Loti ye Lesoto" + ], + "LYD": [ + "LYD", + "Dinari re Libya" + ], + "MAD": [ + "MAD", + "Dirham ye Moroko" + ], + "MGA": [ + "MGA", + "Furenki re Malagasi" + ], + "MRO": [ + "MRO", + "Ugwiya ye Moritania" + ], + "MUR": [ + "MUR", + "Rupi ye Morishasi" + ], + "MWK": [ + "MWK", + "Kwacha ye Malawi" + ], + "MZM": [ + "MZM", + "Metika ye Mozambiki" + ], + "NAD": [ + "NAD", + "Dora re Namibia" + ], + "NGN": [ + "NGN", + "Naira ye Nijeria" + ], + "RWF": [ + "RWF", + "Furenki re Ruwanda" + ], + "SAR": [ + "SAR", + "Riyali re Saudi" + ], + "SCR": [ + "SCR", + "Rupi re Seyisheri" + ], + "SDG": [ + "SDG", + "Dinari re Sudani" + ], + "SDP": [ + "SDP", + "Paundi re Sudani" + ], + "SHP": [ + "SHP", + "Paundi re Senti Helena" + ], + "SLL": [ + "SLL", + "Leoni" + ], + "SOS": [ + "SOS", + "Shiringi re Somalia" + ], + "STD": [ + "STD", + "Dobra re Sao Tome ne Principe" + ], + "SZL": [ + "SZL", + "Lilangeni" + ], + "TND": [ + "TND", + "Dinari re Tunisia" + ], + "TZS": [ + "TZS", + "Shiringi re Tanzania" + ], + "UGX": [ + "UGX", + "Shiringi re Uganda" + ], + "USD": [ + "US$", + "Dora re Amerika" + ], + "XAF": [ + "FCFA", + "Furenki CFA BEAC" + ], + "XOF": [ + "CFA", + "Furenki CFA BCEAO" + ], + "ZAR": [ + "ZAR", + "Randi" + ], + "ZMK": [ + "ZMK", + "Kwacha ye Zambia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha ye Zambia" + ], + "ZWD": [ + "ZWD", + "Dora re Zimbabwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/so.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/so.json new file mode 100644 index 0000000000000000000000000000000000000000..360d5e155d6dab3ebd266cd5db53796e029eac16 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/so.json @@ -0,0 +1,33 @@ +{ + "Version": "2.1.27.78", + "Names": { + "DJF": [ + "DJF", + "Faran Jabbuuti" + ], + "ETB": [ + "ETB", + "Birta Itoobbiya" + ], + "EUR": [ + "€", + "Yuuroo" + ], + "SAR": [ + "SAR", + "Riyaalka Sacuudiga" + ], + "SOS": [ + "S", + "Shilin soomaali" + ], + "TZS": [ + "TZS", + "Shilin Tansaani" + ], + "USD": [ + "US$", + "Doollar maraykan" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/so_DJ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/so_DJ.json new file mode 100644 index 0000000000000000000000000000000000000000..77cd44900c3cc76f1beea0ae65b1000bb0d90424 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/so_DJ.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "DJF": [ + "Fdj", + "Faran Jabbuuti" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/so_ET.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/so_ET.json new file mode 100644 index 0000000000000000000000000000000000000000..ba1429aa0584c5d6991cbec875aeb7f4321092de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/so_ET.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ETB": [ + "Br", + "Birta Itoobbiya" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/so_KE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/so_KE.json new file mode 100644 index 0000000000000000000000000000000000000000..b27b577bbe67065dc8a0f8d45d5534c3b8413db6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/so_KE.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "KES": [ + "Ksh", + "KES" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sq.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sq.json new file mode 100644 index 0000000000000000000000000000000000000000..83f075c975d6bd57e4a0d8d75d5b7eae93c2faf7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sq.json @@ -0,0 +1,633 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "Dirhami i Emirateve të Bashkuara Arabe" + ], + "AFN": [ + "AFN", + "Afgani afgan" + ], + "ALL": [ + "Lekë", + "Leku shqiptar" + ], + "AMD": [ + "AMD", + "Dramia armene" + ], + "ANG": [ + "ANG", + "Gilderi antilian holandez" + ], + "AOA": [ + "AOA", + "Kuanza e Angolës" + ], + "ARS": [ + "ARS", + "Pesoja argjentinase" + ], + "AUD": [ + "A$", + "Dollari australian" + ], + "AWG": [ + "AWG", + "Florini aruban" + ], + "AZN": [ + "AZN", + "Manata e Azerbajxhanit" + ], + "BAM": [ + "BAM", + "Marka e Bosnjë-Hercegovinës [e shkëmbyeshme]" + ], + "BBD": [ + "BBD", + "Dollari barbadian" + ], + "BDT": [ + "BDT", + "Taka e Bangladeshit" + ], + "BGN": [ + "BGN", + "Leva bullgare" + ], + "BHD": [ + "BHD", + "Dinari i Bahreinit" + ], + "BIF": [ + "BIF", + "Franga burundiane" + ], + "BMD": [ + "BMD", + "Dollari i Bermudeve" + ], + "BND": [ + "BND", + "Dollari i Bruneit" + ], + "BOB": [ + "BOB", + "Boliviani i Bolivisë" + ], + "BRL": [ + "R$", + "Reali brazilian" + ], + "BSD": [ + "BSD", + "Dollari i Bahamasit" + ], + "BTN": [ + "BTN", + "Ngultrumi butanez" + ], + "BWP": [ + "BWP", + "Pula botsuane" + ], + "BYN": [ + "BYN", + "Rubla bjelloruse" + ], + "BYR": [ + "BYR", + "Rubla bjelloruse (2000–2016)" + ], + "BZD": [ + "BZD", + "Dollari i Ishujve Belize" + ], + "CAD": [ + "CA$", + "Dollari kanadez" + ], + "CDF": [ + "CDF", + "Franga kongole" + ], + "CHF": [ + "CHF", + "Franga zvicerane" + ], + "CLP": [ + "CLP", + "Pesoja kiliane" + ], + "CNY": [ + "CNÂ¥", + "Juani kinez" + ], + "COP": [ + "COP", + "Pesoja kolumbiane" + ], + "CRC": [ + "CRC", + "Koloni kostarikan" + ], + "CUC": [ + "CUC", + "Pesoja kubaneze e shkëmbyeshme" + ], + "CUP": [ + "CUP", + "Pesoja kubaneze" + ], + "CVE": [ + "CVE", + "Eskudoja e Kepit të Gjelbër" + ], + "CZK": [ + "CZK", + "Koruna e Republikës Çeke" + ], + "DJF": [ + "DJF", + "Franga xhibutiane" + ], + "DKK": [ + "DKK", + "Korona daneze" + ], + "DOP": [ + "DOP", + "Pesoja dominikane" + ], + "DZD": [ + "DZD", + "Dinari algjerian" + ], + "EGP": [ + "EGP", + "Stërlina egjiptiane" + ], + "ERN": [ + "ERN", + "Nakfa e Eritresë" + ], + "ETB": [ + "ETB", + "Bira etiopiane" + ], + "EUR": [ + "€", + "Euroja" + ], + "FJD": [ + "FJD", + "Dollari i Fixhit" + ], + "FKP": [ + "FKP", + "Stërlina e Ishujve Falkland" + ], + "GBP": [ + "£", + "Sterlina britanike" + ], + "GEL": [ + "GEL", + "Laria gjeorgjiane" + ], + "GHS": [ + "GHS", + "Sejda ganeze" + ], + "GIP": [ + "GIP", + "Sterlina e Gjibraltarit" + ], + "GMD": [ + "GMD", + "Dalasi gambian" + ], + "GNF": [ + "GNF", + "Franga guinease" + ], + "GTQ": [ + "GTQ", + "Kuecali i Guatemalës" + ], + "GYD": [ + "GYD", + "Dollari guajanez" + ], + "HKD": [ + "HK$", + "Dollari i Hong Kongut" + ], + "HNL": [ + "HNL", + "Lempira hondurase" + ], + "HRK": [ + "HRK", + "Kuna kroate" + ], + "HTG": [ + "HTG", + "Gurdi haitian" + ], + "HUF": [ + "HUF", + "Forinta hungareze" + ], + "IDR": [ + "IDR", + "Rupia indoneziane" + ], + "ILS": [ + "₪", + "Shekeli izrealit" + ], + "INR": [ + "₹", + "Rupia indiane" + ], + "IQD": [ + "IQD", + "Dinari irakian" + ], + "IRR": [ + "IRR", + "Riali iranian" + ], + "ISK": [ + "ISK", + "Korona islandeze" + ], + "JMD": [ + "JMD", + "Dollari xhamajkan" + ], + "JOD": [ + "JOD", + "Dinari jordanez" + ], + "JPY": [ + "JPÂ¥", + "Jeni japonez" + ], + "KES": [ + "KES", + "Shilinga keniane" + ], + "KGS": [ + "KGS", + "Soma kirgize" + ], + "KHR": [ + "KHR", + "Riali kamboxhian" + ], + "KMF": [ + "KMF", + "Franga komore" + ], + "KPW": [ + "KPW", + "Uoni koreano-verior" + ], + "KRW": [ + "â‚©", + "Uoni koreano-jugor" + ], + "KWD": [ + "KWD", + "Dinari kuvajtian" + ], + "KYD": [ + "KYD", + "Dollari i Ishujve Kajman" + ], + "KZT": [ + "KZT", + "Tenga kazake" + ], + "LAK": [ + "LAK", + "Kipa e Laosit" + ], + "LBP": [ + "LBP", + "Sterlina libaneze" + ], + "LKR": [ + "LKR", + "Rupia e Sri-Lankës" + ], + "LRD": [ + "LRD", + "Dollari liberian" + ], + "LTL": [ + "LTL", + "Lita lituaneze" + ], + "LVL": [ + "LVL", + "Lata letoneze" + ], + "LYD": [ + "LYD", + "Dinari libian" + ], + "MAD": [ + "MAD", + "Dirhami maroken" + ], + "MDL": [ + "MDL", + "Leu moldav" + ], + "MGA": [ + "MGA", + "Arieri malagez" + ], + "MKD": [ + "MKD", + "Denari maqedonas" + ], + "MMK": [ + "MMK", + "Kiata e Mianmarit" + ], + "MNT": [ + "MNT", + "Tugrika mongole" + ], + "MOP": [ + "MOP", + "Pataka e Makaos" + ], + "MRO": [ + "MRO", + "Ugija mauritane" + ], + "MUR": [ + "MUR", + "Rupia mauritiane" + ], + "MVR": [ + "MVR", + "Rufiu i Maldivit" + ], + "MWK": [ + "MWK", + "Kuaça malaviane" + ], + "MXN": [ + "MX$", + "Pesoja meksikane" + ], + "MYR": [ + "MYR", + "Ringiti malajzian" + ], + "MZN": [ + "MZN", + "Metikali i Mozambikut" + ], + "NAD": [ + "NAD", + "Dollari i Namibisë" + ], + "NGN": [ + "NGN", + "Naira nigeriane" + ], + "NIO": [ + "NIO", + "Kordoba nikaraguane" + ], + "NOK": [ + "NOK", + "Korona norvegjeze" + ], + "NPR": [ + "NPR", + "Rupia nepaleze" + ], + "NZD": [ + "NZ$", + "Dollari i Zelandës së Re" + ], + "OMR": [ + "OMR", + "Riali i Omanit" + ], + "PAB": [ + "PAB", + "Balboa panameze" + ], + "PEN": [ + "PEN", + "Sola nuevo-peruane" + ], + "PGK": [ + "PGK", + "Kina e Papua-Guineas së Re" + ], + "PHP": [ + "PHP", + "Pesoja filipinase" + ], + "PKR": [ + "PKR", + "Rupia pakistaneze" + ], + "PLN": [ + "PLN", + "Zllota polake" + ], + "PYG": [ + "PYG", + "Guarani paraguaian" + ], + "QAR": [ + "QAR", + "Riali i Katarit" + ], + "RON": [ + "RON", + "Leu rumun" + ], + "RSD": [ + "RSD", + "Dinari serb" + ], + "RUB": [ + "RUB", + "Rubla ruse" + ], + "RWF": [ + "RWF", + "Franga ruandeze" + ], + "SAR": [ + "SAR", + "Riali saudit" + ], + "SBD": [ + "SBD", + "Dollari i Ishujve Solomonë" + ], + "SCR": [ + "SCR", + "Rupia e Ishujve Sishelë" + ], + "SDG": [ + "SDG", + "Stërlina sudaneze" + ], + "SEK": [ + "SEK", + "Korona suedeze" + ], + "SGD": [ + "SGD", + "Dollari i Singaporit" + ], + "SHP": [ + "SHP", + "Stërlina e Ishullit të Shën-Helenës" + ], + "SLL": [ + "SLL", + "Leoni i Sierra-Leones" + ], + "SOS": [ + "SOS", + "Shilinga somaleze" + ], + "SRD": [ + "SRD", + "Dollari surinamez" + ], + "SSP": [ + "SSP", + "Stërlina e Sudanit të Jugut" + ], + "STD": [ + "STD", + "Dobra e Sao-Tomes dhe Prinsipes" + ], + "SYP": [ + "SYP", + "Sterlina siriane" + ], + "SZL": [ + "SZL", + "Lilangeni i Suazilandës" + ], + "THB": [ + "฿", + "Bata tajlandeze" + ], + "TJS": [ + "TJS", + "Somona taxhike" + ], + "TMT": [ + "TMT", + "Manata turkmene" + ], + "TND": [ + "TND", + "Dinari tunizian" + ], + "TOP": [ + "TOP", + "Panga tongane" + ], + "TRY": [ + "TRY", + "Lira turke" + ], + "TTD": [ + "TTD", + "Dollari i Trinidadit dhe Tobagos" + ], + "TWD": [ + "NT$", + "Dollari tajvanez" + ], + "TZS": [ + "TZS", + "Shilinga e Tanzanisë" + ], + "UAH": [ + "UAH", + "Rivnia ukrainase" + ], + "UGX": [ + "UGX", + "Shilinga ugandeze" + ], + "USD": [ + "US$", + "Dollari amerikan" + ], + "UYU": [ + "UYU", + "Pesoja uruguaiane" + ], + "UZS": [ + "UZS", + "Soma uzbeke" + ], + "VEF": [ + "VEF", + "Bolivari venezuelian" + ], + "VND": [ + "â‚«", + "Donga vietnameze" + ], + "VUV": [ + "VUV", + "Vatuja e Vanuatusë" + ], + "WST": [ + "WST", + "Tala samoane" + ], + "XAF": [ + "FCFA", + "Franga kamerunase" + ], + "XCD": [ + "EC$", + "Dollari i Karaibeve Lindore" + ], + "XOF": [ + "CFA", + "Franga e Bregut të Fildishtë" + ], + "XPF": [ + "CFPF", + "Franga franceze e Polinezisë" + ], + "YER": [ + "YER", + "Riali i Jemenit" + ], + "ZAR": [ + "ZAR", + "Randi afrikano-jugor" + ], + "ZMW": [ + "ZMW", + "Kuaça e Zambikut" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sq_MK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sq_MK.json new file mode 100644 index 0000000000000000000000000000000000000000..45a167e4209bda12d16d7a87a9c6bcf071873f72 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sq_MK.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MKD": [ + "den", + "Denari maqedonas" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sr.json new file mode 100644 index 0000000000000000000000000000000000000000..5186f98d564543dcefda369158cc2afa1d92e48a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sr.json @@ -0,0 +1,1077 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "ÐндорÑка пезета" + ], + "AED": [ + "AED", + "УÐЕ дирхам" + ], + "AFA": [ + "AFA", + "ÐвганиÑтанÑки авгани (1927–2002)" + ], + "AFN": [ + "AFN", + "ÐвганиÑтанÑки авгани" + ], + "ALL": [ + "ALL", + "ÐлбанÑки лек" + ], + "AMD": [ + "AMD", + "ЈерменÑки драм" + ], + "ANG": [ + "ANG", + "ХоландÑкоантилÑки гулден" + ], + "AOA": [ + "AOA", + "ÐнголÑка кванза" + ], + "AOK": [ + "AOK", + "ÐнголијÑка кванза (1977–1990)" + ], + "AON": [ + "AON", + "ÐнголијÑка нова кванза (1990–2000)" + ], + "AOR": [ + "AOR", + "ÐнголијÑка кванза реађуÑтадо (1995–1999)" + ], + "ARA": [ + "ARA", + "ÐргентинÑки ауÑтрал" + ], + "ARP": [ + "ARP", + "ÐргентинÑки пезо (1983–1985)" + ], + "ARS": [ + "ARS", + "ÐргентинÑки пезоÑ" + ], + "ATS": [ + "ATS", + "ÐуÑтријÑки шилинг" + ], + "AUD": [ + "AUD", + "ÐуÑтралијÑки долар" + ], + "AWG": [ + "AWG", + "ÐрубанÑки флорин" + ], + "AZM": [ + "AZM", + "ÐзербејџанÑки манат (1993–2006)" + ], + "AZN": [ + "AZN", + "ÐзербејџанÑки манат" + ], + "BAD": [ + "BAD", + "БоÑанÑко-Херцеговачки динар" + ], + "BAM": [ + "КМ", + "БоÑанÑко-херцеговачка конвертибилна марка" + ], + "BBD": [ + "BBD", + "Барбадошки долар" + ], + "BDT": [ + "BDT", + "Бангладешка така" + ], + "BEC": [ + "BEC", + "БелгијÑки франак (конвертибилни)" + ], + "BEF": [ + "BEF", + "БелгијÑки франак" + ], + "BEL": [ + "BEL", + "БелгијÑки франак (финанÑијÑки)" + ], + "BGL": [ + "BGL", + "БугарÑки тврди лев" + ], + "BGN": [ + "BGN", + "БугарÑки лев" + ], + "BHD": [ + "BHD", + "БахреинÑки динар" + ], + "BIF": [ + "BIF", + "БурундÑки франак" + ], + "BMD": [ + "BMD", + "БермудÑки долар" + ], + "BND": [ + "BND", + "БрунејÑки долар" + ], + "BOB": [ + "BOB", + "БоливијÑки боливијано" + ], + "BOP": [ + "BOP", + "БоливијÑки пезо" + ], + "BOV": [ + "BOV", + "БоливијÑки мвдол" + ], + "BRB": [ + "BRB", + "БразилÑки нови крузеиро (1967–1986)" + ], + "BRC": [ + "BRC", + "БразилијÑки крузадо" + ], + "BRE": [ + "BRE", + "БразилÑки крузеиро (1990–1993)" + ], + "BRL": [ + "R$", + "БразилÑки реал" + ], + "BRN": [ + "BRN", + "БразилијÑки нови крузадо" + ], + "BRR": [ + "BRR", + "БразилÑки крузеиро" + ], + "BSD": [ + "BSD", + "БахамÑки долар" + ], + "BTN": [ + "BTN", + "БутанÑки нгултрум" + ], + "BUK": [ + "BUK", + "БурманÑки кјат" + ], + "BWP": [ + "BWP", + "БоцванÑка пула" + ], + "BYB": [ + "BYB", + "БелоруÑка нова рубља (1994–1999)" + ], + "BYN": [ + "BYN", + "БелоруÑка рубља" + ], + "BYR": [ + "BYR", + "БелоруÑка рубља (2000–2016)" + ], + "BZD": [ + "BZD", + "БелиÑки долар" + ], + "CAD": [ + "CA$", + "КанадÑки долар" + ], + "CDF": [ + "CDF", + "КонгоанÑки франак" + ], + "CHE": [ + "CHE", + "WIR евро" + ], + "CHF": [ + "CHF", + "ШвајцарÑки франак" + ], + "CHW": [ + "CHW", + "WIR франак" + ], + "CLF": [ + "CLF", + "ЧилеовÑки ÑƒÐ½Ð¸Ð´Ð°Ð´ÐµÑ Ñе фоменто" + ], + "CLP": [ + "CLP", + "ЧилеанÑки пезоÑ" + ], + "CNY": [ + "CNÂ¥", + "КинеÑки јуан" + ], + "COP": [ + "COP", + "КолумбијÑки пезоÑ" + ], + "COU": [ + "COU", + "Унидад де валоршки реал" + ], + "CRC": [ + "CRC", + "КоÑтариканÑки колон" + ], + "CSD": [ + "CSD", + "Стари ÑрпÑки динар" + ], + "CSK": [ + "CSK", + "ЧехоÑловачка тврда круна" + ], + "CUC": [ + "CUC", + "КубанÑки конвертибилни пезоÑ" + ], + "CUP": [ + "CUP", + "КубанÑки пезоÑ" + ], + "CVE": [ + "CVE", + "ЗеленортÑки еÑкудо" + ], + "CYP": [ + "CYP", + "КипарÑка фунта" + ], + "CZK": [ + "CZK", + "Чешка круна" + ], + "DDM": [ + "DDM", + "ИÑточно-немачка марка" + ], + "DEM": [ + "DEM", + "Ðемачка марка" + ], + "DJF": [ + "DJF", + "ÐибутанÑки франак" + ], + "DKK": [ + "DKK", + "ДанÑка круна" + ], + "DOP": [ + "DOP", + "ДоминиканÑки пезоÑ" + ], + "DZD": [ + "DZD", + "ÐлжирÑки динар" + ], + "ECS": [ + "ECS", + "ЕквадорÑки Ñакр" + ], + "ECV": [ + "ECV", + "ЕквадорÑки унидад де валор конÑтанте" + ], + "EEK": [ + "EEK", + "ЕÑтонÑка кроон" + ], + "EGP": [ + "EGP", + "ЕгипатÑка фунта" + ], + "ERN": [ + "ERN", + "EритрејÑка накфa" + ], + "ESA": [ + "ESA", + "ШпанÑка пезета (рачун)" + ], + "ESB": [ + "ESB", + "ШпанÑка пезета (конвертибилнирачун)" + ], + "ESP": [ + "ESP", + "ШпанÑка пезета" + ], + "ETB": [ + "ETB", + "ЕтиопÑки бир" + ], + "EUR": [ + "€", + "Евро" + ], + "FIM": [ + "FIM", + "ФинÑка марка" + ], + "FJD": [ + "FJD", + "ФиџијÑки долар" + ], + "FKP": [ + "FKP", + "ФокландÑка фунта" + ], + "FRF": [ + "FRF", + "ФранцуÑки франак" + ], + "GBP": [ + "£", + "БританÑка фунта" + ], + "GEK": [ + "GEK", + "ГрузијÑки купон ларит" + ], + "GEL": [ + "GEL", + "ГрузијÑки лари" + ], + "GHC": [ + "GHC", + "ГанÑки цеди (1979–2007)" + ], + "GHS": [ + "GHS", + "ГанÑки Ñеди" + ], + "GIP": [ + "GIP", + "ГибралтарÑка фунта" + ], + "GMD": [ + "GMD", + "ГамбијÑки далаÑи" + ], + "GNF": [ + "GNF", + "ГвинејÑки франак" + ], + "GNS": [ + "GNS", + "ГвинејÑки Ñили" + ], + "GQE": [ + "GQE", + "Екваторијално-гвинејÑки еквеле" + ], + "GRD": [ + "GRD", + "Грчка драхма" + ], + "GTQ": [ + "GTQ", + "ГватемалÑки кецал" + ], + "GWE": [ + "GWE", + "ПортугалÑка гвинеја еÑкудо" + ], + "GWP": [ + "GWP", + "Гвинеја БиÑао Пезо" + ], + "GYD": [ + "GYD", + "ГвајанÑки долар" + ], + "HKD": [ + "HK$", + "Хонгконшки долар" + ], + "HNL": [ + "HNL", + "Хондурашка лемпира" + ], + "HRD": [ + "HRD", + "ХрватÑки динар" + ], + "HRK": [ + "HRK", + "ХрватÑка куна" + ], + "HTG": [ + "HTG", + "ХаићанÑки гурд" + ], + "HUF": [ + "HUF", + "МађарÑка форинта" + ], + "IDR": [ + "IDR", + "ИндонежанÑка рупија" + ], + "IEP": [ + "IEP", + "ИрÑка фунта" + ], + "ILP": [ + "ILP", + "ИзраелÑка фунта" + ], + "ILR": [ + "ILR", + "Стари израелÑки шекели" + ], + "ILS": [ + "₪", + "ИзраелÑки нови шекел" + ], + "INR": [ + "₹", + "ИндијÑка рупија" + ], + "IQD": [ + "IQD", + "Ирачки динар" + ], + "IRR": [ + "IRR", + "ИранÑки риjал" + ], + "ISJ": [ + "ISJ", + "Стара иÑландÑка круна" + ], + "ISK": [ + "ISK", + "ИÑландÑка круна" + ], + "ITL": [ + "ITL", + "ИталијанÑка лира" + ], + "JMD": [ + "JMD", + "ЈамајчанÑки долар" + ], + "JOD": [ + "JOD", + "ЈорданÑки динар" + ], + "JPY": [ + "Â¥", + "ЈапанÑки јен" + ], + "KES": [ + "KES", + "КенијÑки шилинг" + ], + "KGS": [ + "KGS", + "КиргиÑтанÑки Ñом" + ], + "KHR": [ + "KHR", + "KамбоџанÑки ријел" + ], + "KMF": [ + "KMF", + "КоморÑки франак" + ], + "KPW": [ + "KPW", + "СевернокорејÑки вон" + ], + "KRW": [ + "KRW", + "ЈужнокорејÑки вон" + ], + "KWD": [ + "KWD", + "КувајтÑки динар" + ], + "KYD": [ + "KYD", + "КајманÑки долар" + ], + "KZT": [ + "KZT", + "КазахÑтанÑки тенге" + ], + "LAK": [ + "LAK", + "Лаошки кип" + ], + "LBP": [ + "LBP", + "ЛибанÑка фунта" + ], + "LKR": [ + "LKR", + "ШриланканÑкa рупиja" + ], + "LRD": [ + "LRD", + "ЛиберијÑки долар" + ], + "LSL": [ + "LSL", + "ЛеÑото лоти" + ], + "LTL": [ + "LTL", + "ЛитванÑки литаÑ" + ], + "LTT": [ + "LTT", + "ЛитванÑки талонаÑ" + ], + "LUC": [ + "LUC", + "ЛукÑембуршки конвертибилни франак" + ], + "LUF": [ + "LUF", + "ЛукÑембуршки франак" + ], + "LUL": [ + "LUL", + "ЛукÑембуршки финанÑијÑки франак" + ], + "LVL": [ + "LVL", + "ЛатвијÑки лати" + ], + "LVR": [ + "LVR", + "ЛатвијÑка рубља" + ], + "LYD": [ + "LYD", + "ЛибијÑки динар" + ], + "MAD": [ + "MAD", + "МароканÑки дирхам" + ], + "MAF": [ + "MAF", + "МароканÑки франак" + ], + "MDL": [ + "MDL", + "МолдавÑки леј" + ], + "MGA": [ + "MGA", + "МадагаÑкарÑки ариари" + ], + "MGF": [ + "MGF", + "МалагаÑијÑки франак" + ], + "MKD": [ + "MKD", + "МакедонÑки денар" + ], + "MLF": [ + "MLF", + "МалијанÑки франак" + ], + "MMK": [ + "MMK", + "МјанмарÑки кјат" + ], + "MNT": [ + "MNT", + "МонголÑки тугрик" + ], + "MOP": [ + "MOP", + "МакаоÑка патака" + ], + "MRO": [ + "MRO", + "МауританијÑка oгија" + ], + "MTL": [ + "MTL", + "Малтешка лира" + ], + "MTP": [ + "MTP", + "Малтешка фунта" + ], + "MUR": [ + "MUR", + "МаурицијÑка рупија" + ], + "MVR": [ + "MVR", + "МалдивÑка руфија" + ], + "MWK": [ + "MWK", + "МалавијÑка квача" + ], + "MXN": [ + "MX$", + "МекÑички пезоÑ" + ], + "MXP": [ + "MXP", + "МекÑички Ñребрни пезо (1861–1992)" + ], + "MXV": [ + "MXV", + "МекÑички унидад де инверÑион (UDI)" + ], + "MYR": [ + "MYR", + "МалезијÑки рингит" + ], + "MZE": [ + "MZE", + "МозамбијÑки еÑкудо" + ], + "MZM": [ + "MZM", + "Стари мозамбијÑки метикал" + ], + "MZN": [ + "MZN", + "Мозамбички метикал" + ], + "NAD": [ + "NAD", + "ÐамибијÑки долар" + ], + "NGN": [ + "NGN", + "ÐигеријÑка наира" + ], + "NIC": [ + "NIC", + "ÐикарагванÑка кордоба" + ], + "NIO": [ + "NIO", + "ÐикарагванÑка златна кордоба" + ], + "NLG": [ + "NLG", + "ХоландÑки гулден" + ], + "NOK": [ + "NOK", + "Ðорвешка круна" + ], + "NPR": [ + "NPR", + "ÐепалÑкa рупиja" + ], + "NZD": [ + "NZD", + "ÐовозеландÑки долар" + ], + "OMR": [ + "OMR", + "ОманÑки ријал" + ], + "PAB": [ + "PAB", + "ПанамÑка балбоа" + ], + "PEI": [ + "PEI", + "ПеруанÑки инти" + ], + "PEN": [ + "PEN", + "ПеруанÑки нови Ñол" + ], + "PES": [ + "PES", + "ПеруанÑки Ñол" + ], + "PGK": [ + "PGK", + "ПапуанÑка кина" + ], + "PHP": [ + "PHP", + "ФилипинÑки пезоÑ" + ], + "PKR": [ + "PKR", + "ПакиÑтанÑкa рупиja" + ], + "PLN": [ + "PLN", + "ПољÑки злот" + ], + "PLZ": [ + "PLZ", + "ПољÑки злоти (1950–1995)" + ], + "PTE": [ + "PTE", + "ПортугалÑки еÑкудо" + ], + "PYG": [ + "PYG", + "ПарагвајÑки гварани" + ], + "QAR": [ + "QAR", + "КатарÑки ријал" + ], + "RHD": [ + "RHD", + "РодејÑкидолар" + ], + "ROL": [ + "ROL", + "РумунÑки леј" + ], + "RON": [ + "RON", + "РумунÑки леј (1952–2006)" + ], + "RSD": [ + "RSD", + "СрпÑки динар" + ], + "RUB": [ + "RUB", + "РуÑка рубља" + ], + "RUR": [ + "RUR", + "РуÑка рубља (1991–1998)" + ], + "RWF": [ + "RWF", + "РуандÑки франак" + ], + "SAR": [ + "SAR", + "СаудијÑки ријал" + ], + "SBD": [ + "SBD", + "СоломонÑки долар" + ], + "SCR": [ + "SCR", + "СејшелÑка рупија" + ], + "SDD": [ + "SDD", + "Стари ÑуданÑки динар" + ], + "SDG": [ + "SDG", + "СуданÑка фунта" + ], + "SDP": [ + "SDP", + "Стара ÑуданÑка фунта" + ], + "SEK": [ + "SEK", + "ШведÑка круна" + ], + "SGD": [ + "SGD", + "СингапурÑки долар" + ], + "SHP": [ + "SHP", + "Св. јеленÑка фунта" + ], + "SIT": [ + "SIT", + "Словеначки толар" + ], + "SKK": [ + "SKK", + "Словачка круна" + ], + "SLL": [ + "SLL", + "СијералеонÑки леоне" + ], + "SOS": [ + "SOS", + "СомалијÑки шилинг" + ], + "SRD": [ + "SRD", + "СуринамÑки долар" + ], + "SRG": [ + "SRG", + "СуринамÑки гилдер" + ], + "SSP": [ + "SSP", + "ЈужноÑуданÑка фунта" + ], + "STD": [ + "STD", + "СаотомÑка добра" + ], + "SUR": [ + "SUR", + "СовјетÑка рубља" + ], + "SVC": [ + "SVC", + "СалвадорÑки колон" + ], + "SYP": [ + "SYP", + "СиријÑка фунта" + ], + "SZL": [ + "SZL", + "СвазилендÑки лилангени" + ], + "THB": [ + "THB", + "ТајландÑки бат" + ], + "TJR": [ + "TJR", + "ТаџихиÑтанÑка рубља" + ], + "TJS": [ + "TJS", + "ТаџикиÑтанÑки Ñомон" + ], + "TMM": [ + "TMM", + "ТуркмениÑтанÑки манат (1993–2009)" + ], + "TMT": [ + "TMT", + "ТуркмениÑтанÑки манат" + ], + "TND": [ + "TND", + "ТуниÑки динар" + ], + "TOP": [ + "TOP", + "ТонганÑка панга" + ], + "TPE": [ + "TPE", + "Тиморшки еÑкудо" + ], + "TRL": [ + "TRL", + "ТурÑка лира (1922–2005)" + ], + "TRY": [ + "TRY", + "ТурÑка лира" + ], + "TTD": [ + "TTD", + "Тринидад-тобагошки долар" + ], + "TWD": [ + "NT$", + "Ðови тајванÑки долар" + ], + "TZS": [ + "TZS", + "ТанзанијÑки шилинг" + ], + "UAH": [ + "UAH", + "УкрајинÑка хривња" + ], + "UAK": [ + "UAK", + "УкрајинÑки карбованети" + ], + "UGS": [ + "UGS", + "УгандÑки шилинг (1966–1987)" + ], + "UGX": [ + "UGX", + "УгандÑки шилинг" + ], + "USD": [ + "US$", + "Ðмерички долар" + ], + "USN": [ + "USN", + "СÐД долар (Ñледећи дан)" + ], + "USS": [ + "USS", + "СÐД долар (иÑти дан)" + ], + "UYI": [ + "UYI", + "УругвајÑки пезо ен ÑƒÐ½Ð¸Ð´Ð°Ð´ÐµÑ Ð¸Ð½Ð´ÐµÐºÑадаÑ" + ], + "UYP": [ + "UYP", + "УругвајÑки пезо (1975–1993)" + ], + "UYU": [ + "UYU", + "УругвајÑки пезоÑ" + ], + "UZS": [ + "UZS", + "УзбекиÑтанÑки Ñом" + ], + "VEB": [ + "VEB", + "ВенецуеланÑки боливар (1871–2008)" + ], + "VEF": [ + "VEF", + "ВенецуеланÑки боливар" + ], + "VND": [ + "VND", + "ВијетнамÑки донг" + ], + "VNN": [ + "VNN", + "ВијетнамÑки донг (1978–1985)" + ], + "VUV": [ + "VUV", + "ВануатÑки вату" + ], + "WST": [ + "WST", + "СамоанÑка тала" + ], + "XAF": [ + "FCFA", + "CFA франак BEAC" + ], + "XCD": [ + "EC$", + "ИÑточнокарипÑки долар" + ], + "XEU": [ + "XEU", + "ЕвропÑка валутна јединица" + ], + "XFO": [ + "XFO", + "ФранцуÑки златни франак" + ], + "XFU": [ + "XFU", + "ФранцуÑки UIC-франак" + ], + "XOF": [ + "CFA", + "ЦФРфранак БЦЕÐО" + ], + "XPF": [ + "CFPF", + "CFP франак" + ], + "XRE": [ + "XRE", + "RINET фонд" + ], + "YDD": [ + "YDD", + "ЈеменÑки динар" + ], + "YER": [ + "YER", + "ЈеменÑки риjал" + ], + "YUD": [ + "YUD", + "ЈугоÑловенÑки тврди динар" + ], + "YUM": [ + "YUM", + "ЈугоÑловенÑки нови динар" + ], + "YUN": [ + "YUN", + "ЈугоÑловенÑки конвертибилни динар" + ], + "ZAL": [ + "ZAL", + "Јужно-афрички ранд (финанÑијÑки)" + ], + "ZAR": [ + "ZAR", + "Јужноафрички ранд" + ], + "ZMK": [ + "ZMK", + "ЗамбијÑка квача (1968–2012)" + ], + "ZMW": [ + "ZMW", + "ЗамбијÑка квача" + ], + "ZRN": [ + "ZRN", + "ЗаирÑки нови заир" + ], + "ZRZ": [ + "ZRZ", + "ЗаирÑки заир" + ], + "ZWD": [ + "ZWD", + "ЗимбабвеанÑки долар (1980–2008)" + ], + "ZWL": [ + "ZWL", + "ЗимбабвеанÑки долар (2009)" + ], + "ZWR": [ + "ZWR", + "ЗимбабвеанÑки долар (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sr_Latn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sr_Latn.json new file mode 100644 index 0000000000000000000000000000000000000000..87a460f3a14773686dc3502a13af9603fea064c9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sr_Latn.json @@ -0,0 +1,1077 @@ +{ + "Version": "2.1.29.33", + "Names": { + "ADP": [ + "ADP", + "Andorska pezeta" + ], + "AED": [ + "AED", + "UAE dirham" + ], + "AFA": [ + "AFA", + "Avganistanski avgani (1927–2002)" + ], + "AFN": [ + "AFN", + "Avganistanski avgani" + ], + "ALL": [ + "ALL", + "Albanski lek" + ], + "AMD": [ + "AMD", + "Jermenski dram" + ], + "ANG": [ + "ANG", + "Holandskoantilski gulden" + ], + "AOA": [ + "AOA", + "Angolska kvanza" + ], + "AOK": [ + "AOK", + "Angolijska kvanza (1977–1990)" + ], + "AON": [ + "AON", + "Angolijska nova kvanza (1990–2000)" + ], + "AOR": [ + "AOR", + "Angolijska kvanza reaÄ‘ustado (1995–1999)" + ], + "ARA": [ + "ARA", + "Argentinski austral" + ], + "ARP": [ + "ARP", + "Argentinski pezo (1983–1985)" + ], + "ARS": [ + "ARS", + "Argentinski pezos" + ], + "ATS": [ + "ATS", + "Austrijski Å¡iling" + ], + "AUD": [ + "AUD", + "Australijski dolar" + ], + "AWG": [ + "AWG", + "Arubanski florin" + ], + "AZM": [ + "AZM", + "Azerbejdžanski manat (1993–2006)" + ], + "AZN": [ + "AZN", + "Azerbejdžanski manat" + ], + "BAD": [ + "BAD", + "Bosansko-HercegovaÄki dinar" + ], + "BAM": [ + "KM", + "Bosansko-hercegovaÄka konvertibilna marka" + ], + "BBD": [ + "BBD", + "BarbadoÅ¡ki dolar" + ], + "BDT": [ + "BDT", + "BangladeÅ¡ka taka" + ], + "BEC": [ + "BEC", + "Belgijski franak (konvertibilni)" + ], + "BEF": [ + "BEF", + "Belgijski franak" + ], + "BEL": [ + "BEL", + "Belgijski franak (finansijski)" + ], + "BGL": [ + "BGL", + "Bugarski tvrdi lev" + ], + "BGN": [ + "BGN", + "Bugarski lev" + ], + "BHD": [ + "BHD", + "Bahreinski dinar" + ], + "BIF": [ + "BIF", + "Burundski franak" + ], + "BMD": [ + "BMD", + "Bermudski dolar" + ], + "BND": [ + "BND", + "Brunejski dolar" + ], + "BOB": [ + "BOB", + "Bolivijski bolivijano" + ], + "BOP": [ + "BOP", + "Bolivijski pezo" + ], + "BOV": [ + "BOV", + "Bolivijski mvdol" + ], + "BRB": [ + "BRB", + "Brazilski novi kruzeiro (1967–1986)" + ], + "BRC": [ + "BRC", + "Brazilijski kruzado" + ], + "BRE": [ + "BRE", + "Brazilski kruzeiro (1990–1993)" + ], + "BRL": [ + "R$", + "Brazilski real" + ], + "BRN": [ + "BRN", + "Brazilijski novi kruzado" + ], + "BRR": [ + "BRR", + "Brazilski kruzeiro" + ], + "BSD": [ + "BSD", + "Bahamski dolar" + ], + "BTN": [ + "BTN", + "Butanski ngultrum" + ], + "BUK": [ + "BUK", + "Burmanski kjat" + ], + "BWP": [ + "BWP", + "Bocvanska pula" + ], + "BYB": [ + "BYB", + "Beloruska nova rublja (1994–1999)" + ], + "BYN": [ + "BYN", + "Beloruska rublja" + ], + "BYR": [ + "BYR", + "Beloruska rublja (2000–2016)" + ], + "BZD": [ + "BZD", + "Beliski dolar" + ], + "CAD": [ + "CA$", + "Kanadski dolar" + ], + "CDF": [ + "CDF", + "Kongoanski franak" + ], + "CHE": [ + "CHE", + "WIR evro" + ], + "CHF": [ + "CHF", + "Å vajcarski franak" + ], + "CHW": [ + "CHW", + "WIR franak" + ], + "CLF": [ + "CLF", + "ÄŒileovski unidades se fomento" + ], + "CLP": [ + "CLP", + "ÄŒileanski pezos" + ], + "CNY": [ + "CNÂ¥", + "Kineski juan" + ], + "COP": [ + "COP", + "Kolumbijski pezos" + ], + "COU": [ + "COU", + "Unidad de valorÅ¡ki real" + ], + "CRC": [ + "CRC", + "Kostarikanski kolon" + ], + "CSD": [ + "CSD", + "Stari srpski dinar" + ], + "CSK": [ + "CSK", + "ÄŒehoslovaÄka tvrda kruna" + ], + "CUC": [ + "CUC", + "Kubanski konvertibilni pezos" + ], + "CUP": [ + "CUP", + "Kubanski pezos" + ], + "CVE": [ + "CVE", + "Zelenortski eskudo" + ], + "CYP": [ + "CYP", + "Kiparska funta" + ], + "CZK": [ + "CZK", + "ÄŒeÅ¡ka kruna" + ], + "DDM": [ + "DDM", + "IstoÄno-nemaÄka marka" + ], + "DEM": [ + "DEM", + "NemaÄka marka" + ], + "DJF": [ + "DJF", + "Džibutanski franak" + ], + "DKK": [ + "DKK", + "Danska kruna" + ], + "DOP": [ + "DOP", + "Dominikanski pezos" + ], + "DZD": [ + "DZD", + "Alžirski dinar" + ], + "ECS": [ + "ECS", + "Ekvadorski sakr" + ], + "ECV": [ + "ECV", + "Ekvadorski unidad de valor konstante" + ], + "EEK": [ + "EEK", + "Estonska kroon" + ], + "EGP": [ + "EGP", + "Egipatska funta" + ], + "ERN": [ + "ERN", + "Eritrejska nakfa" + ], + "ESA": [ + "ESA", + "Å panska pezeta (raÄun)" + ], + "ESB": [ + "ESB", + "Å panska pezeta (konvertibilniraÄun)" + ], + "ESP": [ + "ESP", + "Å panska pezeta" + ], + "ETB": [ + "ETB", + "Etiopski bir" + ], + "EUR": [ + "€", + "Evro" + ], + "FIM": [ + "FIM", + "Finska marka" + ], + "FJD": [ + "FJD", + "Fidžijski dolar" + ], + "FKP": [ + "FKP", + "Foklandska funta" + ], + "FRF": [ + "FRF", + "Francuski franak" + ], + "GBP": [ + "£", + "Britanska funta" + ], + "GEK": [ + "GEK", + "Gruzijski kupon larit" + ], + "GEL": [ + "GEL", + "Gruzijski lari" + ], + "GHC": [ + "GHC", + "Ganski cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "Ganski sedi" + ], + "GIP": [ + "GIP", + "Gibraltarska funta" + ], + "GMD": [ + "GMD", + "Gambijski dalasi" + ], + "GNF": [ + "GNF", + "Gvinejski franak" + ], + "GNS": [ + "GNS", + "Gvinejski sili" + ], + "GQE": [ + "GQE", + "Ekvatorijalno-gvinejski ekvele" + ], + "GRD": [ + "GRD", + "GrÄka drahma" + ], + "GTQ": [ + "GTQ", + "Gvatemalski kecal" + ], + "GWE": [ + "GWE", + "Portugalska gvineja eskudo" + ], + "GWP": [ + "GWP", + "Gvineja Bisao Pezo" + ], + "GYD": [ + "GYD", + "Gvajanski dolar" + ], + "HKD": [ + "HK$", + "HongkonÅ¡ki dolar" + ], + "HNL": [ + "HNL", + "HonduraÅ¡ka lempira" + ], + "HRD": [ + "HRD", + "Hrvatski dinar" + ], + "HRK": [ + "HRK", + "Hrvatska kuna" + ], + "HTG": [ + "HTG", + "Haićanski gurd" + ], + "HUF": [ + "HUF", + "MaÄ‘arska forinta" + ], + "IDR": [ + "IDR", + "Indonežanska rupija" + ], + "IEP": [ + "IEP", + "Irska funta" + ], + "ILP": [ + "ILP", + "Izraelska funta" + ], + "ILR": [ + "ILR", + "Stari izraelski Å¡ekeli" + ], + "ILS": [ + "₪", + "Izraelski novi Å¡ekel" + ], + "INR": [ + "₹", + "Indijska rupija" + ], + "IQD": [ + "IQD", + "IraÄki dinar" + ], + "IRR": [ + "IRR", + "Iranski rijal" + ], + "ISJ": [ + "ISJ", + "Stara islandska kruna" + ], + "ISK": [ + "ISK", + "Islandska kruna" + ], + "ITL": [ + "ITL", + "Italijanska lira" + ], + "JMD": [ + "JMD", + "JamajÄanski dolar" + ], + "JOD": [ + "JOD", + "Jordanski dinar" + ], + "JPY": [ + "Â¥", + "Japanski jen" + ], + "KES": [ + "KES", + "Kenijski Å¡iling" + ], + "KGS": [ + "KGS", + "Kirgistanski som" + ], + "KHR": [ + "KHR", + "Kambodžanski rijel" + ], + "KMF": [ + "KMF", + "Komorski franak" + ], + "KPW": [ + "KPW", + "Severnokorejski von" + ], + "KRW": [ + "KRW", + "Južnokorejski von" + ], + "KWD": [ + "KWD", + "Kuvajtski dinar" + ], + "KYD": [ + "KYD", + "Kajmanski dolar" + ], + "KZT": [ + "KZT", + "Kazahstanski tenge" + ], + "LAK": [ + "LAK", + "LaoÅ¡ki kip" + ], + "LBP": [ + "LBP", + "Libanska funta" + ], + "LKR": [ + "LKR", + "Å rilankanska rupija" + ], + "LRD": [ + "LRD", + "Liberijski dolar" + ], + "LSL": [ + "LSL", + "Lesoto loti" + ], + "LTL": [ + "LTL", + "Litvanski litas" + ], + "LTT": [ + "LTT", + "Litvanski talonas" + ], + "LUC": [ + "LUC", + "LuksemburÅ¡ki konvertibilni franak" + ], + "LUF": [ + "LUF", + "LuksemburÅ¡ki franak" + ], + "LUL": [ + "LUL", + "LuksemburÅ¡ki finansijski franak" + ], + "LVL": [ + "LVL", + "Latvijski lati" + ], + "LVR": [ + "LVR", + "Latvijska rublja" + ], + "LYD": [ + "LYD", + "Libijski dinar" + ], + "MAD": [ + "MAD", + "Marokanski dirham" + ], + "MAF": [ + "MAF", + "Marokanski franak" + ], + "MDL": [ + "MDL", + "Moldavski lej" + ], + "MGA": [ + "MGA", + "Madagaskarski ariari" + ], + "MGF": [ + "MGF", + "Malagasijski franak" + ], + "MKD": [ + "MKD", + "Makedonski denar" + ], + "MLF": [ + "MLF", + "Malijanski franak" + ], + "MMK": [ + "MMK", + "Mjanmarski kjat" + ], + "MNT": [ + "MNT", + "Mongolski tugrik" + ], + "MOP": [ + "MOP", + "Makaoska pataka" + ], + "MRO": [ + "MRO", + "Mauritanijska ogija" + ], + "MTL": [ + "MTL", + "MalteÅ¡ka lira" + ], + "MTP": [ + "MTP", + "MalteÅ¡ka funta" + ], + "MUR": [ + "MUR", + "Mauricijska rupija" + ], + "MVR": [ + "MVR", + "Maldivska rufija" + ], + "MWK": [ + "MWK", + "Malavijska kvaÄa" + ], + "MXN": [ + "MX$", + "MeksiÄki pezos" + ], + "MXP": [ + "MXP", + "MeksiÄki srebrni pezo (1861–1992)" + ], + "MXV": [ + "MXV", + "MeksiÄki unidad de inversion (UDI)" + ], + "MYR": [ + "MYR", + "Malezijski ringit" + ], + "MZE": [ + "MZE", + "Mozambijski eskudo" + ], + "MZM": [ + "MZM", + "Stari mozambijski metikal" + ], + "MZN": [ + "MZN", + "MozambiÄki metikal" + ], + "NAD": [ + "NAD", + "Namibijski dolar" + ], + "NGN": [ + "NGN", + "Nigerijska naira" + ], + "NIC": [ + "NIC", + "Nikaragvanska kordoba" + ], + "NIO": [ + "NIO", + "Nikaragvanska zlatna kordoba" + ], + "NLG": [ + "NLG", + "Holandski gulden" + ], + "NOK": [ + "NOK", + "NorveÅ¡ka kruna" + ], + "NPR": [ + "NPR", + "Nepalska rupija" + ], + "NZD": [ + "NZD", + "Novozelandski dolar" + ], + "OMR": [ + "OMR", + "Omanski rijal" + ], + "PAB": [ + "PAB", + "Panamska balboa" + ], + "PEI": [ + "PEI", + "Peruanski inti" + ], + "PEN": [ + "PEN", + "Peruanski novi sol" + ], + "PES": [ + "PES", + "Peruanski sol" + ], + "PGK": [ + "PGK", + "Papuanska kina" + ], + "PHP": [ + "PHP", + "Filipinski pezos" + ], + "PKR": [ + "PKR", + "Pakistanska rupija" + ], + "PLN": [ + "PLN", + "Poljski zlot" + ], + "PLZ": [ + "PLZ", + "Poljski zloti (1950–1995)" + ], + "PTE": [ + "PTE", + "Portugalski eskudo" + ], + "PYG": [ + "PYG", + "Paragvajski gvarani" + ], + "QAR": [ + "QAR", + "Katarski rijal" + ], + "RHD": [ + "RHD", + "Rodejskidolar" + ], + "ROL": [ + "ROL", + "Rumunski lej" + ], + "RON": [ + "RON", + "Rumunski lej (1952–2006)" + ], + "RSD": [ + "RSD", + "Srpski dinar" + ], + "RUB": [ + "RUB", + "Ruska rublja" + ], + "RUR": [ + "RUR", + "Ruska rublja (1991–1998)" + ], + "RWF": [ + "RWF", + "Ruandski franak" + ], + "SAR": [ + "SAR", + "Saudijski rijal" + ], + "SBD": [ + "SBD", + "Solomonski dolar" + ], + "SCR": [ + "SCR", + "SejÅ¡elska rupija" + ], + "SDD": [ + "SDD", + "Stari sudanski dinar" + ], + "SDG": [ + "SDG", + "Sudanska funta" + ], + "SDP": [ + "SDP", + "Stara sudanska funta" + ], + "SEK": [ + "SEK", + "Å vedska kruna" + ], + "SGD": [ + "SGD", + "Singapurski dolar" + ], + "SHP": [ + "SHP", + "Sv. jelenska funta" + ], + "SIT": [ + "SIT", + "SlovenaÄki tolar" + ], + "SKK": [ + "SKK", + "SlovaÄka kruna" + ], + "SLL": [ + "SLL", + "Sijeraleonski leone" + ], + "SOS": [ + "SOS", + "Somalijski Å¡iling" + ], + "SRD": [ + "SRD", + "Surinamski dolar" + ], + "SRG": [ + "SRG", + "Surinamski gilder" + ], + "SSP": [ + "SSP", + "Južnosudanska funta" + ], + "STD": [ + "STD", + "Saotomska dobra" + ], + "SUR": [ + "SUR", + "Sovjetska rublja" + ], + "SVC": [ + "SVC", + "Salvadorski kolon" + ], + "SYP": [ + "SYP", + "Sirijska funta" + ], + "SZL": [ + "SZL", + "Svazilendski lilangeni" + ], + "THB": [ + "THB", + "Tajlandski bat" + ], + "TJR": [ + "TJR", + "Tadžihistanska rublja" + ], + "TJS": [ + "TJS", + "Tadžikistanski somon" + ], + "TMM": [ + "TMM", + "Turkmenistanski manat (1993–2009)" + ], + "TMT": [ + "TMT", + "Turkmenistanski manat" + ], + "TND": [ + "TND", + "Tuniski dinar" + ], + "TOP": [ + "TOP", + "Tonganska panga" + ], + "TPE": [ + "TPE", + "TimorÅ¡ki eskudo" + ], + "TRL": [ + "TRL", + "Turska lira (1922–2005)" + ], + "TRY": [ + "TRY", + "Turska lira" + ], + "TTD": [ + "TTD", + "Trinidad-tobagoÅ¡ki dolar" + ], + "TWD": [ + "NT$", + "Novi tajvanski dolar" + ], + "TZS": [ + "TZS", + "Tanzanijski Å¡iling" + ], + "UAH": [ + "UAH", + "Ukrajinska hrivnja" + ], + "UAK": [ + "UAK", + "Ukrajinski karbovaneti" + ], + "UGS": [ + "UGS", + "Ugandski Å¡iling (1966–1987)" + ], + "UGX": [ + "UGX", + "Ugandski Å¡iling" + ], + "USD": [ + "US$", + "AmeriÄki dolar" + ], + "USN": [ + "USN", + "SAD dolar (sledeći dan)" + ], + "USS": [ + "USS", + "SAD dolar (isti dan)" + ], + "UYI": [ + "UYI", + "Urugvajski pezo en unidades indeksadas" + ], + "UYP": [ + "UYP", + "Urugvajski pezo (1975–1993)" + ], + "UYU": [ + "UYU", + "Urugvajski pezos" + ], + "UZS": [ + "UZS", + "Uzbekistanski som" + ], + "VEB": [ + "VEB", + "Venecuelanski bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "Venecuelanski bolivar" + ], + "VND": [ + "VND", + "Vijetnamski dong" + ], + "VNN": [ + "VNN", + "Vijetnamski dong (1978–1985)" + ], + "VUV": [ + "VUV", + "Vanuatski vatu" + ], + "WST": [ + "WST", + "Samoanska tala" + ], + "XAF": [ + "FCFA", + "CFA franak BEAC" + ], + "XCD": [ + "EC$", + "IstoÄnokaripski dolar" + ], + "XEU": [ + "XEU", + "Evropska valutna jedinica" + ], + "XFO": [ + "XFO", + "Francuski zlatni franak" + ], + "XFU": [ + "XFU", + "Francuski UIC-franak" + ], + "XOF": [ + "CFA", + "CFA franak BCEAO" + ], + "XPF": [ + "CFPF", + "CFP franak" + ], + "XRE": [ + "XRE", + "RINET fond" + ], + "YDD": [ + "YDD", + "Jemenski dinar" + ], + "YER": [ + "YER", + "Jemenski rijal" + ], + "YUD": [ + "YUD", + "Jugoslovenski tvrdi dinar" + ], + "YUM": [ + "YUM", + "Jugoslovenski novi dinar" + ], + "YUN": [ + "YUN", + "Jugoslovenski konvertibilni dinar" + ], + "ZAL": [ + "ZAL", + "Južno-afriÄki rand (finansijski)" + ], + "ZAR": [ + "ZAR", + "JužnoafriÄki rand" + ], + "ZMK": [ + "ZMK", + "Zambijska kvaÄa (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambijska kvaÄa" + ], + "ZRN": [ + "ZRN", + "Zairski novi zair" + ], + "ZRZ": [ + "ZRZ", + "Zairski zair" + ], + "ZWD": [ + "ZWD", + "Zimbabveanski dolar (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Zimbabveanski dolar (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabveanski dolar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sv.json new file mode 100644 index 0000000000000000000000000000000000000000..1b00d12e9ba0f0828911886a4e36de18179bd9c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sv.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.30.7", + "Names": { + "ADP": [ + "ADP", + "andorransk peseta" + ], + "AED": [ + "AED", + "Förenade Arabemiratens dirham" + ], + "AFA": [ + "AFA", + "afghani (1927–2002)" + ], + "AFN": [ + "AFN", + "afghansk afghani" + ], + "ALK": [ + "ALK", + "albansk lek (1946–1965)" + ], + "ALL": [ + "ALL", + "albansk lek" + ], + "AMD": [ + "AMD", + "armenisk dram" + ], + "ANG": [ + "ANG", + "Nederländska Antillernas gulden" + ], + "AOA": [ + "AOA", + "angolansk kwanza" + ], + "AOK": [ + "AOK", + "angolansk kwanza (1977–1990)" + ], + "AON": [ + "AON", + "angolansk ny kwanza (1990–2000)" + ], + "AOR": [ + "AOR", + "angolansk kwanza reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "argentinsk austral" + ], + "ARL": [ + "ARL", + "argentisk peso (1970–1983)" + ], + "ARM": [ + "ARM", + "argentisk peso (1881–1969)" + ], + "ARP": [ + "ARP", + "argentinsk peso (1983–1985)" + ], + "ARS": [ + "ARS", + "argentinsk peso" + ], + "ATS": [ + "ATS", + "österrikisk schilling" + ], + "AUD": [ + "AUD", + "australisk dollar" + ], + "AWG": [ + "AWG", + "arubansk florin" + ], + "AZM": [ + "AZM", + "azerbajdzjansk manat (1993–2006)" + ], + "AZN": [ + "AZN", + "azerbajdzjansk manat" + ], + "BAD": [ + "BAD", + "bosnisk-hercegovinsk dinar (1992–1994)" + ], + "BAM": [ + "BAM", + "bosnisk-hercegovinsk mark (konvertibel)" + ], + "BAN": [ + "BAN", + "bosnisk-hercegovinsk dinar (1994–1998)" + ], + "BBD": [ + "Bds$", + "Barbados-dollar" + ], + "BDT": [ + "BDT", + "bangladeshisk taka" + ], + "BEC": [ + "BEC", + "belgisk franc (konvertibel)" + ], + "BEF": [ + "BEF", + "belgisk franc" + ], + "BEL": [ + "BEL", + "belgisk franc (finansiell)" + ], + "BGL": [ + "BGL", + "bulgarisk hÃ¥rd lev (1962–1999)" + ], + "BGM": [ + "BGM", + "bulgarisk lev (1952–1962)" + ], + "BGN": [ + "BGN", + "bulgarisk lev" + ], + "BGO": [ + "BGO", + "bulgarisk lev (1881–1952)" + ], + "BHD": [ + "BHD", + "bahrainsk dinar" + ], + "BIF": [ + "BIF", + "burundisk franc" + ], + "BMD": [ + "BM$", + "Bermuda-dollar" + ], + "BND": [ + "BND", + "bruneisk dollar" + ], + "BOB": [ + "BOB", + "boliviansk boliviano" + ], + "BOL": [ + "BOL", + "boliviansk boliviano (1864–1963)" + ], + "BOP": [ + "BOP", + "boliviansk peso" + ], + "BOV": [ + "BOV", + "boliviansk mvdol" + ], + "BRB": [ + "BRB", + "brasiliansk cruzeiro novo (1967–1986)" + ], + "BRC": [ + "BRC", + "brasiliansk cruzado" + ], + "BRE": [ + "BRE", + "brasiliansk cruzeiro (1990–1993)" + ], + "BRL": [ + "BR$", + "brasiliansk real" + ], + "BRN": [ + "BRN", + "brasiliansk cruzado novo" + ], + "BRR": [ + "BRR", + "brasiliansk cruzeiro" + ], + "BRZ": [ + "BRZ", + "brasiliansk cruzeiro (1942–1967)" + ], + "BSD": [ + "BS$", + "bahamansk dollar" + ], + "BTN": [ + "BTN", + "bhutanesisk ngultrum" + ], + "BUK": [ + "BUK", + "burmesisk kyat" + ], + "BWP": [ + "BWP", + "botswansk pula" + ], + "BYB": [ + "BYB", + "vitrysk ny rubel (1994–1999)" + ], + "BYN": [ + "BYN", + "vitrysk rubel" + ], + "BYR": [ + "BYR", + "vitrysk rubel (2000–2016)" + ], + "BZD": [ + "BZ$", + "belizisk dollar" + ], + "CAD": [ + "CA$", + "kanadensisk dollar" + ], + "CDF": [ + "CDF", + "kongolesisk franc" + ], + "CHE": [ + "CHE", + "euro (konvertibelt konto, WIR Bank, Schweiz)" + ], + "CHF": [ + "CHF", + "schweizisk franc" + ], + "CHW": [ + "CHW", + "franc (konvertibelt konto, WIR Bank, Schweiz)" + ], + "CLE": [ + "CLE", + "chilensk escudo (1960–1975)" + ], + "CLF": [ + "CLF", + "chilensk unidad de fomento" + ], + "CLP": [ + "CLP", + "chilensk peso" + ], + "CNX": [ + "CNX", + "kinesisk dollar" + ], + "CNY": [ + "CNY", + "kinesisk yuan" + ], + "COP": [ + "COP", + "colombiansk peso" + ], + "COU": [ + "COU", + "colombiansk unidad de valor real" + ], + "CRC": [ + "CRC", + "costarikansk colón" + ], + "CSD": [ + "CSD", + "serbisk dinar (2002–2006)" + ], + "CSK": [ + "CSK", + "tjeckoslovakisk krona (–1993)" + ], + "CUC": [ + "CUC", + "kubansk peso (konvertibel)" + ], + "CUP": [ + "CUP", + "kubansk peso" + ], + "CVE": [ + "CVE", + "kapverdisk escudo" + ], + "CYP": [ + "CYP", + "cypriotiskt pund" + ], + "CZK": [ + "CZK", + "tjeckisk koruna" + ], + "DDM": [ + "DDM", + "östtysk mark" + ], + "DEM": [ + "DEM", + "tysk mark" + ], + "DJF": [ + "DJF", + "djiboutisk franc" + ], + "DKK": [ + "Dkr", + "dansk krona" + ], + "DOP": [ + "RD$", + "dominikansk peso" + ], + "DZD": [ + "DZD", + "algerisk dinar" + ], + "ECS": [ + "ECS", + "ecuadoriansk sucre" + ], + "ECV": [ + "ECV", + "ecuadoriansk unidad de valor constante" + ], + "EEK": [ + "Ekr", + "estnisk krona" + ], + "EGP": [ + "EG£", + "egyptiskt pund" + ], + "ERN": [ + "ERN", + "eritreansk nakfa" + ], + "ESA": [ + "ESA", + "spansk peseta (konto)" + ], + "ESB": [ + "ESB", + "spansk peseta (konvertibelt konto)" + ], + "ESP": [ + "ESP", + "spansk peseta" + ], + "ETB": [ + "ETB", + "etiopisk birr" + ], + "EUR": [ + "€", + "euro" + ], + "FIM": [ + "FIM", + "finsk mark" + ], + "FJD": [ + "FJD", + "Fijidollar" + ], + "FKP": [ + "FKP", + "Falklandspund" + ], + "FRF": [ + "FRF", + "fransk franc" + ], + "GBP": [ + "GBP", + "brittiskt pund" + ], + "GEK": [ + "GEK", + "georgisk kupon larit" + ], + "GEL": [ + "GEL", + "georgisk lari" + ], + "GHC": [ + "GHC", + "ghanansk cedi (1979–2007)" + ], + "GHS": [ + "GHS", + "ghanansk cedi" + ], + "GIP": [ + "GIP", + "gibraltiskt pund" + ], + "GMD": [ + "GMD", + "gambisk dalasi" + ], + "GNF": [ + "GNF", + "guineansk franc" + ], + "GNS": [ + "GNS", + "guineansk syli" + ], + "GQE": [ + "GQE", + "ekvatorialguineansk ekwele" + ], + "GRD": [ + "GRD", + "grekisk drachma" + ], + "GTQ": [ + "GTQ", + "guatemalansk quetzal" + ], + "GWE": [ + "GWE", + "Portugisiska Guinea-escudo" + ], + "GWP": [ + "GWP", + "Guinea-Bissau-peso" + ], + "GYD": [ + "GYD", + "Guyanadollar" + ], + "HKD": [ + "HKD", + "Hongkongdollar" + ], + "HNL": [ + "HNL", + "honduransk lempira" + ], + "HRD": [ + "HRD", + "kroatisk dinar" + ], + "HRK": [ + "HRK", + "kroatisk kuna" + ], + "HTG": [ + "HTG", + "haitisk gourde" + ], + "HUF": [ + "HUF", + "ungersk forint" + ], + "IDR": [ + "IDR", + "indonesisk rupie" + ], + "IEP": [ + "IE£", + "irländskt pund" + ], + "ILP": [ + "ILP", + "israeliskt pund" + ], + "ILR": [ + "ILR", + "israelisk shekel (1980–1985)" + ], + "ILS": [ + "₪", + "israelisk ny shekel" + ], + "INR": [ + "INR", + "indisk rupie" + ], + "IQD": [ + "IQD", + "irakisk dinar" + ], + "IRR": [ + "IRR", + "iransk rial" + ], + "ISJ": [ + "ISJ", + "isländsk gammal krona" + ], + "ISK": [ + "Ikr", + "isländsk krona" + ], + "ITL": [ + "ITL", + "italiensk lire" + ], + "JMD": [ + "JM$", + "Jamaica-dollar" + ], + "JOD": [ + "JOD", + "jordansk dinar" + ], + "JPY": [ + "JPY", + "japansk yen" + ], + "KES": [ + "KES", + "kenyansk shilling" + ], + "KGS": [ + "KGS", + "kirgizisk som" + ], + "KHR": [ + "KHR", + "kambodjansk riel" + ], + "KMF": [ + "KMF", + "komorisk franc" + ], + "KPW": [ + "KPW", + "nordkoreansk won" + ], + "KRH": [ + "KRH", + "sydkoreansk hwan (1953–1962)" + ], + "KRO": [ + "KRO", + "sydkoreansk won (1945–1953)" + ], + "KRW": [ + "KRW", + "sydkoreansk won" + ], + "KWD": [ + "KWD", + "kuwaitisk dinar" + ], + "KYD": [ + "KYD", + "Cayman-dollar" + ], + "KZT": [ + "KZT", + "kazakisk tenge" + ], + "LAK": [ + "LAK", + "laotisk kip" + ], + "LBP": [ + "LBP", + "libanesiskt pund" + ], + "LKR": [ + "LKR", + "srilankesisk rupie" + ], + "LRD": [ + "LRD", + "liberiansk dollar" + ], + "LSL": [ + "LSL", + "lesothisk loti" + ], + "LTL": [ + "LTL", + "litauisk litas" + ], + "LTT": [ + "LTT", + "litauisk talonas" + ], + "LUC": [ + "LUC", + "luxemburgsk franc (konvertibel)" + ], + "LUF": [ + "LUF", + "luxemburgsk franc" + ], + "LUL": [ + "LUL", + "luxemburgsk franc (finansiell)" + ], + "LVL": [ + "LVL", + "lettisk lats" + ], + "LVR": [ + "LVR", + "lettisk rubel" + ], + "LYD": [ + "LYD", + "libysk dinar" + ], + "MAD": [ + "MAD", + "marockansk dirham" + ], + "MAF": [ + "MAF", + "marockansk franc" + ], + "MCF": [ + "MCF", + "monegaskisk franc (–2001)" + ], + "MDC": [ + "MDC", + "moldavisk cupon (1992–1993)" + ], + "MDL": [ + "MDL", + "moldavisk leu" + ], + "MGA": [ + "MGA", + "madagaskisk ariary" + ], + "MGF": [ + "MGF", + "madagaskisk franc" + ], + "MKD": [ + "MKD", + "makedonisk denar" + ], + "MKN": [ + "MKN", + "makedonisk denar (1992–1993)" + ], + "MLF": [ + "MLF", + "malisk franc" + ], + "MMK": [ + "MMK", + "myanmarisk kyat" + ], + "MNT": [ + "MNT", + "mongolisk tögrög" + ], + "MOP": [ + "MOP", + "makanesisk pataca" + ], + "MRO": [ + "MRO", + "mauretansk ouguiya" + ], + "MTL": [ + "MTL", + "maltesisk lire" + ], + "MTP": [ + "MTP", + "maltesiskt pund" + ], + "MUR": [ + "MUR", + "mauritisk rupie" + ], + "MVP": [ + "MVP", + "maldivisk rupie" + ], + "MVR": [ + "MVR", + "maldivisk rufiyaa" + ], + "MWK": [ + "MWK", + "malawisk kwacha" + ], + "MXN": [ + "MX$", + "mexikansk peso" + ], + "MXP": [ + "MXP", + "mexikansk silverpeso (1861–1992)" + ], + "MXV": [ + "MXV", + "mexikansk unidad de inversion" + ], + "MYR": [ + "MYR", + "malaysisk ringgit" + ], + "MZE": [ + "MZE", + "moçambikisk escudo" + ], + "MZM": [ + "MZM", + "gammal moçambikisk metical" + ], + "MZN": [ + "MZN", + "moçambikisk metical" + ], + "NAD": [ + "NAD", + "namibisk dollar" + ], + "NGN": [ + "NGN", + "nigeriansk naira" + ], + "NIC": [ + "NIC", + "nicaraguansk córdoba (1998–1991)" + ], + "NIO": [ + "NIO", + "nicaraguansk córdoba" + ], + "NLG": [ + "NLG", + "nederländsk gulden" + ], + "NOK": [ + "Nkr", + "norsk krona" + ], + "NPR": [ + "NPR", + "nepalesisk rupie" + ], + "NZD": [ + "NZD", + "nyzeeländsk dollar" + ], + "OMR": [ + "OMR", + "omansk rial" + ], + "PAB": [ + "PAB", + "panamansk balboa" + ], + "PEI": [ + "PEI", + "peruansk inti" + ], + "PEN": [ + "PEN", + "peruansk nuevo sol" + ], + "PES": [ + "PES", + "peruansk sol (1863–1965)" + ], + "PGK": [ + "PGK", + "papuansk kina" + ], + "PHP": [ + "PHP", + "filippinsk peso" + ], + "PKR": [ + "PKR", + "pakistansk rupie" + ], + "PLN": [ + "PLN", + "polsk zloty" + ], + "PLZ": [ + "PLZ", + "polsk zloty (1950–1995)" + ], + "PTE": [ + "PTE", + "portugisisk escudo" + ], + "PYG": [ + "PYG", + "paraguayansk guarani" + ], + "QAR": [ + "QAR", + "qatarisk rial" + ], + "RHD": [ + "RHD", + "rhodesisk dollar" + ], + "ROL": [ + "ROL", + "rumänsk leu (1952–2005)" + ], + "RON": [ + "RON", + "rumänsk leu" + ], + "RSD": [ + "RSD", + "serbisk dinar" + ], + "RUB": [ + "RUB", + "rysk rubel" + ], + "RUR": [ + "RUR", + "rysk rubel (1991–1998)" + ], + "RWF": [ + "RWF", + "rwandisk franc" + ], + "SAR": [ + "SAR", + "saudisk riyal" + ], + "SBD": [ + "SBD", + "Salomondollar" + ], + "SCR": [ + "SCR", + "seychellisk rupie" + ], + "SDD": [ + "SDD", + "sudansk dinar (1992–2007)" + ], + "SDG": [ + "SDG", + "sudanesiskt pund" + ], + "SDP": [ + "SDP", + "sudanskt pund (1916–1992)" + ], + "SEK": [ + "kr", + "svensk krona" + ], + "SGD": [ + "SGD", + "singaporiansk dollar" + ], + "SHP": [ + "SHP", + "S:t Helena-pund" + ], + "SIT": [ + "SIT", + "slovensk tolar" + ], + "SKK": [ + "SKK", + "slovakisk koruna" + ], + "SLL": [ + "SLL", + "sierraleonsk leone" + ], + "SOS": [ + "SOS", + "somalisk shilling" + ], + "SRD": [ + "SRD", + "surinamesisk dollar" + ], + "SRG": [ + "SRG", + "surinamesisk gulden" + ], + "SSP": [ + "SSP", + "sydsudanesiskt pund" + ], + "STD": [ + "STD", + "saotomeansk dobra" + ], + "SUR": [ + "SUR", + "sovjetisk rubel" + ], + "SVC": [ + "SVC", + "salvadoransk colón" + ], + "SYP": [ + "SYP", + "syriskt pund" + ], + "SZL": [ + "SZL", + "swaziländsk lilangeni" + ], + "THB": [ + "THB", + "thailändsk baht" + ], + "TJR": [ + "TJR", + "tadzjikisk rubel" + ], + "TJS": [ + "TJS", + "tadzjikisk somoni" + ], + "TMM": [ + "TMM", + "turkmenistansk manat (1993–2009)" + ], + "TMT": [ + "TMT", + "turkmenistansk manat" + ], + "TND": [ + "TND", + "tunisisk dinar" + ], + "TOP": [ + "TOP", + "tongansk paÊ»anga" + ], + "TPE": [ + "TPE", + "timoriansk escudo" + ], + "TRL": [ + "TRL", + "turkisk lire (1922–2005)" + ], + "TRY": [ + "TRY", + "turkisk lira" + ], + "TTD": [ + "TTD", + "Trinidad och Tobago-dollar" + ], + "TWD": [ + "TWD", + "Taiwandollar" + ], + "TZS": [ + "TZS", + "tanzanisk shilling" + ], + "UAH": [ + "UAH", + "ukrainsk hryvnia" + ], + "UAK": [ + "UAK", + "ukrainsk karbovanetz" + ], + "UGS": [ + "UGS", + "ugandisk shilling (1966–1987)" + ], + "UGX": [ + "UGX", + "ugandisk shilling" + ], + "USD": [ + "US$", + "US-dollar" + ], + "USN": [ + "USN", + "US-dollar (nästa dag)" + ], + "USS": [ + "USS", + "US-dollar (samma dag)" + ], + "UYI": [ + "UYI", + "uruguayansk peso en unidades indexadas" + ], + "UYP": [ + "UYP", + "uruguayansk peso (1975–1993)" + ], + "UYU": [ + "UYU", + "uruguayansk peso" + ], + "UZS": [ + "UZS", + "uzbekisk sum" + ], + "VEB": [ + "VEB", + "venezuelansk bolivar (1871–2008)" + ], + "VEF": [ + "VEF", + "venezuelansk bolívar" + ], + "VND": [ + "VND", + "vietnamesisk dong" + ], + "VNN": [ + "VNN", + "vietnamesisk dong (1978–1985)" + ], + "VUV": [ + "VUV", + "vanuatisk vatu" + ], + "WST": [ + "WST", + "västsamoansk tala" + ], + "XAF": [ + "FCFA", + "centralafrikansk franc" + ], + "XCD": [ + "EC$", + "östkaribisk dollar" + ], + "XEU": [ + "XEU", + "europeisk valutaenhet" + ], + "XFO": [ + "XFO", + "fransk guldfranc" + ], + "XFU": [ + "XFU", + "internationella järnvägsunionens franc" + ], + "XOF": [ + "CFA", + "västafrikansk franc" + ], + "XPF": [ + "CFPF", + "CFP-franc" + ], + "XRE": [ + "XRE", + "RINET-fond" + ], + "YDD": [ + "YDD", + "jemenitisk dinar" + ], + "YER": [ + "YER", + "jemenitisk rial" + ], + "YUD": [ + "YUD", + "jugoslavisk dinar (1966–1990)" + ], + "YUM": [ + "YUM", + "jugoslavisk dinar (1994–2002)" + ], + "YUN": [ + "YUN", + "jugoslavisk dinar (1990–1992)" + ], + "YUR": [ + "YUR", + "jugoslavisk dinar (1992–1993)" + ], + "ZAL": [ + "ZAL", + "sydafrikansk rand (finansiell)" + ], + "ZAR": [ + "ZAR", + "sydafrikansk rand" + ], + "ZMK": [ + "ZMK", + "zambisk kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "zambisk kwacha" + ], + "ZRN": [ + "ZRN", + "zairisk ny zaire" + ], + "ZRZ": [ + "ZRZ", + "zairisk zaire" + ], + "ZWD": [ + "ZWD", + "Zimbabwe-dollar" + ], + "ZWL": [ + "ZWL", + "Zimbabwe-dollar (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabwe-dollar (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sw.json new file mode 100644 index 0000000000000000000000000000000000000000..8b89a907fa3189d6ec23aec1eb7104d73abcce86 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sw.json @@ -0,0 +1,661 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "Dirham ya Falme za Kiarabu" + ], + "AFN": [ + "AFN", + "Afghani ya Afghanistan" + ], + "ALL": [ + "ALL", + "Lek ya Albania" + ], + "AMD": [ + "AMD", + "Dram ya Armenia" + ], + "ANG": [ + "ANG", + "Guilder ya Antili za Kiholanzi" + ], + "AOA": [ + "AOA", + "Kwanza ya Angola" + ], + "ARS": [ + "ARS", + "Peso ya Ajentina" + ], + "AUD": [ + "A$", + "Dola ya Australia" + ], + "AWG": [ + "AWG", + "Florin ya Aruba" + ], + "AZN": [ + "AZN", + "Manat ya Azebaijani" + ], + "BAM": [ + "BAM", + "Mark Inayoweza Kubadilishwa ya Bosnia na Hezegovina" + ], + "BBD": [ + "BBD", + "Dola ya Barbados" + ], + "BDT": [ + "BDT", + "Taka ya Bangladeshi" + ], + "BGN": [ + "BGN", + "Lev ya Bulgaria" + ], + "BHD": [ + "BHD", + "Dinar ya Bahareni" + ], + "BIF": [ + "BIF", + "Faranga ya Burundi" + ], + "BMD": [ + "BMD", + "Dola ya Bermuda" + ], + "BND": [ + "BND", + "Dola ya Brunei" + ], + "BOB": [ + "BOB", + "Boliviano ya Bolivia" + ], + "BRL": [ + "R$", + "Real ya Brazil" + ], + "BSD": [ + "BSD", + "Dola ya Bahamas" + ], + "BTN": [ + "BTN", + "Ngultrum ya Bhutan" + ], + "BWP": [ + "BWP", + "Pula ya Botswana" + ], + "BYN": [ + "BYN", + "Ruble ya Belarusi" + ], + "BYR": [ + "BYR", + "Ruble ya Belarusi (2000–2016)" + ], + "BZD": [ + "BZD", + "Dola ya Belize" + ], + "CAD": [ + "CA$", + "Dola ya Kanada" + ], + "CDF": [ + "CDF", + "Faranga ya Kongo" + ], + "CHF": [ + "CHF", + "Faranga ya Uswisi" + ], + "CLP": [ + "CLP", + "Peso ya Chile" + ], + "CNY": [ + "CNÂ¥", + "Yuan ya Uchina" + ], + "COP": [ + "COP", + "Peso ya Kolombia" + ], + "CRC": [ + "CRC", + "Colon ya Kostarika" + ], + "CUC": [ + "CUC", + "Peso ya Cuba Inayoweza Kubadilishwa" + ], + "CUP": [ + "CUP", + "Peso ya Cuba" + ], + "CVE": [ + "CVE", + "Eskudo ya Cape Verde" + ], + "CZK": [ + "CZK", + "Koruna ya Jamhuri ya Cheki" + ], + "DJF": [ + "DJF", + "Faranga ya Jibuti" + ], + "DKK": [ + "DKK", + "Krone ya Denmaki" + ], + "DOP": [ + "DOP", + "Peso ya Dominika" + ], + "DZD": [ + "DZD", + "Dinari ya Aljeria" + ], + "EGP": [ + "EGP", + "Pauni ya Misri" + ], + "ERN": [ + "ERN", + "Nakfa ya Eritrea" + ], + "ETB": [ + "ETB", + "Birr ya Uhabeshi" + ], + "EUR": [ + "€", + "Yuro" + ], + "FJD": [ + "FJD", + "Dola ya Fiji" + ], + "FKP": [ + "FKP", + "Pauni ya Visiwa vya Falkland" + ], + "GBP": [ + "£", + "Pauni ya Uingereza" + ], + "GEL": [ + "GEL", + "Lari ya Georgia" + ], + "GHC": [ + "GHC", + "Sedi ya Ghana" + ], + "GHS": [ + "GHS", + "Cedi ya Ghana" + ], + "GIP": [ + "GIP", + "Pauni ya Gibraltar" + ], + "GMD": [ + "GMD", + "Dalasi ya Gambia" + ], + "GNF": [ + "GNF", + "Faranga ya Guinea" + ], + "GNS": [ + "GNS", + "Faranga ya Gine" + ], + "GTQ": [ + "GTQ", + "Quetzal ya Guatemala" + ], + "GYD": [ + "GYD", + "Dola ya Guyana" + ], + "HKD": [ + "HK$", + "Dola ya Hong Kong" + ], + "HNL": [ + "HNL", + "Lempira ya Hondurasi" + ], + "HRK": [ + "HRK", + "Kuna ya Kroeshia" + ], + "HTG": [ + "HTG", + "Gourde ya Haiti" + ], + "HUF": [ + "HUF", + "Forint ya Hungaria" + ], + "IDR": [ + "IDR", + "Rupiah ya Indonesia" + ], + "ILS": [ + "₪", + "Shekeli Mpya ya Israel" + ], + "INR": [ + "₹", + "Rupia ya India" + ], + "IQD": [ + "IQD", + "Dinar ya Iraki" + ], + "IRR": [ + "IRR", + "Rial ya Iran" + ], + "ISK": [ + "ISK", + "Krona ya Aisilandi" + ], + "JMD": [ + "JMD", + "Dola ya Jamaica" + ], + "JOD": [ + "JOD", + "Dinar ya Yordani" + ], + "JPY": [ + "JPÂ¥", + "Yen ya Japani" + ], + "KES": [ + "Ksh", + "Shilingi ya Kenya" + ], + "KGS": [ + "KGS", + "Som ya Kyrgystani" + ], + "KHR": [ + "KHR", + "Riel ya Kambodia" + ], + "KMF": [ + "KMF", + "Faranga ya Komoro" + ], + "KPW": [ + "KPW", + "Won ya Korea Kaskazini" + ], + "KRW": [ + "â‚©", + "Won ya Korea Kusini" + ], + "KWD": [ + "KWD", + "Dinar ya Kuwaiti" + ], + "KYD": [ + "KYD", + "Dola ya Visiwa vya Cayman" + ], + "KZT": [ + "KZT", + "Tenge ya Kazakistani" + ], + "LAK": [ + "LAK", + "Kip ya Laosi" + ], + "LBP": [ + "LBP", + "Pauni ya Lebanon" + ], + "LKR": [ + "LKR", + "Rupia ya Sri Lanka" + ], + "LRD": [ + "LRD", + "Dola ya Liberia" + ], + "LSL": [ + "LSL", + "Loti ya Lesoto" + ], + "LTL": [ + "LTL", + "Litas ya Lithuania" + ], + "LVL": [ + "LVL", + "Lats ya Lativia" + ], + "LYD": [ + "LYD", + "Dinari ya Libya" + ], + "MAD": [ + "MAD", + "Dirham ya Moroko" + ], + "MDL": [ + "MDL", + "Leu ya Moldova" + ], + "MGA": [ + "MGA", + "Ariari ya Madagaska" + ], + "MKD": [ + "MKD", + "Denar ya Masedonia" + ], + "MMK": [ + "MMK", + "Kyat ya Myama" + ], + "MNT": [ + "MNT", + "Tugrik ya Mongolia" + ], + "MOP": [ + "MOP", + "Pataca ya Macau" + ], + "MRO": [ + "MRO", + "Ouguiya ya Moritania" + ], + "MUR": [ + "MUR", + "Rupia ya Morisi" + ], + "MVR": [ + "MVR", + "Rufiyaa ya Maldivi" + ], + "MWK": [ + "MWK", + "Kwacha ya Malawi" + ], + "MXN": [ + "MX$", + "Peso ya Meksiko" + ], + "MYR": [ + "MYR", + "Ringgit ya Malaysia" + ], + "MZM": [ + "MZM", + "Metikali ya Msumbiji (1980–2006)" + ], + "MZN": [ + "MZN", + "Metikali ya Msumbiji" + ], + "NAD": [ + "NAD", + "Dola ya Namibia" + ], + "NGN": [ + "NGN", + "Naira ya Nijeria" + ], + "NIO": [ + "NIO", + "Cordoba ya Nikaragua" + ], + "NOK": [ + "NOK", + "Krone ya Norwe" + ], + "NPR": [ + "NPR", + "Rupia ya Nepali" + ], + "NZD": [ + "NZ$", + "Dola ya Nyuzilandi" + ], + "OMR": [ + "OMR", + "Rial ya Omani" + ], + "PAB": [ + "PAB", + "Balboa ya Panama" + ], + "PEN": [ + "PEN", + "Nuevo Sol ya Peru" + ], + "PGK": [ + "PGK", + "Kina ya Papua New Guinea" + ], + "PHP": [ + "PHP", + "Peso ya Ufilipino" + ], + "PKR": [ + "PKR", + "Rupia ya Pakistani" + ], + "PLN": [ + "PLN", + "Zloty ya Polandi" + ], + "PYG": [ + "PYG", + "Guarani ya Paragwai" + ], + "QAR": [ + "QAR", + "Rial ya Qatari" + ], + "RON": [ + "RON", + "Leu ya Romania" + ], + "RSD": [ + "RSD", + "Dinar ya Serbia" + ], + "RUB": [ + "RUB", + "Ruble ya Urusi" + ], + "RWF": [ + "RWF", + "Faranga ya Rwanda" + ], + "SAR": [ + "SAR", + "Riyal ya Saudia" + ], + "SBD": [ + "SBD", + "Dola ya Visiwa vya Solomon" + ], + "SCR": [ + "SCR", + "Rupia ya Ushelisheli" + ], + "SDG": [ + "SDG", + "Pauni ya Sudani" + ], + "SDP": [ + "SDP", + "Pauni ya Sudani (1957–1998)" + ], + "SEK": [ + "SEK", + "Krona ya Uswidi" + ], + "SGD": [ + "SGD", + "Dola ya Singapore" + ], + "SHP": [ + "SHP", + "Pauni ya Santahelena" + ], + "SLL": [ + "SLL", + "Leone" + ], + "SOS": [ + "SOS", + "Shilingi ya Somalia" + ], + "SRD": [ + "SRD", + "Dola ya Suriname" + ], + "SSP": [ + "SSP", + "Pauni ya Sudani Kusini" + ], + "STD": [ + "STD", + "Dobra ya Sao Tome na Principe" + ], + "SYP": [ + "SYP", + "Pauni ya Syria" + ], + "SZL": [ + "SZL", + "Lilangeni" + ], + "THB": [ + "฿", + "Baht ya Tailandi" + ], + "TJS": [ + "TJS", + "Somoni ya Tajikistani" + ], + "TMT": [ + "TMT", + "Manat ya Turukimenistani" + ], + "TND": [ + "TND", + "Dinari ya Tunisia" + ], + "TOP": [ + "TOP", + "PaÊ»anga ya Tonga" + ], + "TRY": [ + "TRY", + "Lira ya Uturuki" + ], + "TTD": [ + "TTD", + "Dola ya Trinidad na Tobago" + ], + "TWD": [ + "NT$", + "Dola ya Taiwan" + ], + "TZS": [ + "TSh", + "Shilingi ya Tanzania" + ], + "UAH": [ + "UAH", + "Hryvnia ya Ukrania" + ], + "UGX": [ + "UGX", + "Shilingi ya Uganda" + ], + "USD": [ + "US$", + "Dola ya Marekani" + ], + "UYU": [ + "UYU", + "Peso ya Urugwai" + ], + "UZS": [ + "UZS", + "Som ya Uzibekistani" + ], + "VEF": [ + "VEF", + "Bolivar ya Venezuela" + ], + "VND": [ + "â‚«", + "Dong ya Vietnam" + ], + "VUV": [ + "VUV", + "Vatu ya Vanuatu" + ], + "WST": [ + "WST", + "Tala ya Samoa" + ], + "XAF": [ + "FCFA", + "Faranga ya Afrika ya Kati CFA" + ], + "XCD": [ + "EC$", + "Dola ya Karibea ya Mashariki" + ], + "XOF": [ + "CFA", + "Faranga ya Afrika Magharibi CFA" + ], + "XPF": [ + "CFPF", + "Faranga ya CFP" + ], + "YER": [ + "YER", + "Rial ya Yemeni" + ], + "ZAR": [ + "ZAR", + "Randi ya Afrika Kusini" + ], + "ZMK": [ + "ZMK", + "Kwacha ya Zambia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha ya Zambia" + ], + "ZWD": [ + "ZWD", + "Dola ya Zimbabwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sw_CD.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sw_CD.json new file mode 100644 index 0000000000000000000000000000000000000000..89e99e13b2df6afd007008a0d62722224d1a2caa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sw_CD.json @@ -0,0 +1,41 @@ +{ + "Version": "2.1.27.99", + "Names": { + "CDF": [ + "FC", + "Faranga ya Kongo" + ], + "CNY": [ + "CNÂ¥", + "Yuan Renminbi ya China" + ], + "ETB": [ + "ETB", + "Bir ya Uhabeshi" + ], + "JPY": [ + "JPÂ¥", + "Sarafu ya Kijapani" + ], + "MGA": [ + "MGA", + "Ariary ya Bukini" + ], + "MRO": [ + "MRO", + "Ugwiya ya Moritania" + ], + "SCR": [ + "SCR", + "Rupia ya Shelisheli" + ], + "XAF": [ + "FCFA", + "Faranga CFA BEAC" + ], + "XOF": [ + "CFA", + "Faranga CFA BCEAO" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sw_UG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sw_UG.json new file mode 100644 index 0000000000000000000000000000000000000000..5c4ab4a1d8bbafe2c5fc130262a2753521f51595 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/sw_UG.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "UGX": [ + "USh", + "Shilingi ya Uganda" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ta.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ta.json new file mode 100644 index 0000000000000000000000000000000000000000..fc6ee675ea847861022cb5af2e90b05cf97c8c4d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ta.json @@ -0,0 +1,641 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "à®à®•à¯à®•ிய அரப௠எமிரேடà¯à®¸à¯ திரà¯à®¹à®¾à®®à¯" + ], + "AFN": [ + "AFN", + "ஆஃபà¯à®•ான௠ஆஃபà¯à®•ானி" + ], + "ALL": [ + "ALL", + "அலà¯à®ªà¯‡à®©à®¿à®¯à®©à¯ லெகà¯" + ], + "AMD": [ + "AMD", + "ஆரà¯à®®à¯‡à®©à®¿à®¯à®©à¯ டà¯à®°à®¾à®®à¯" + ], + "ANG": [ + "ANG", + "நெதரà¯à®²à¯‡à®£à¯à®Ÿà¯à®¸à¯ அனà¯à®Ÿà®¿à®²à®¿à®¯à®©à¯ கிலà¯à®Ÿà®°à¯" + ], + "AOA": [ + "AOA", + "à®…à®™à¯à®•ோலன௠கà¯à®µà®¾à®©à¯à®¸à®¾" + ], + "ARS": [ + "ARS", + "à®…à®°à¯à®œà¯†à®©à¯à®Ÿà¯ˆà®©à¯ பெசோ" + ], + "AUD": [ + "A$", + "ஆஸà¯à®¤à®¿à®°à¯‡à®²à®¿à®¯ டாலரà¯" + ], + "AWG": [ + "AWG", + "à®…à®°à¯à®ªà®©à¯ ஃபà¯à®³à¯‹à®°à®¿à®©à¯" + ], + "AZN": [ + "AZN", + "அசரà¯à®ªà¯ˆà®œà®¾à®©à®¿ மனதà¯" + ], + "BAM": [ + "BAM", + "போஸà¯à®©à®¿à®¯à®¾-ஹெரà¯à®¸à¯‡à®•ோவினா கனà¯à®µà¯†à®°à¯à®Ÿà®¿à®ªà®¿à®²à¯ மாரà¯à®•à¯" + ], + "BBD": [ + "BBD", + "பாரà¯à®ªà¯‡à®Ÿà®¿à®¯à®©à¯ டாலரà¯" + ], + "BDT": [ + "BDT", + "பஙà¯à®•ளாதேஷி டாகா" + ], + "BGN": [ + "BGN", + "பலà¯à®•ேரியன௠லேவà¯" + ], + "BHD": [ + "BHD", + "பஹà¯à®°à¯ˆà®©à®¿ தினாரà¯" + ], + "BIF": [ + "BIF", + "பà¯à®°à¯à®£à¯à®Ÿà®¿à®¯à®©à¯ ஃபà¯à®°à®¾à®™à¯à®•à¯" + ], + "BMD": [ + "BMD", + "பெரà¯à®®à¯à®Ÿà®©à¯ டாலரà¯" + ], + "BND": [ + "BND", + "பà¯à®°à¯‚னே டாலரà¯" + ], + "BOB": [ + "BOB", + "பொலிவியன௠பொலிவியானோ" + ], + "BRL": [ + "R$", + "பிரேசிலியன௠ரியாலà¯" + ], + "BSD": [ + "BSD", + "பஹாமியன௠டாலரà¯" + ], + "BTN": [ + "BTN", + "பூடà¯à®Ÿà®¾à®©à¯€à®¸à¯ கà¯à®²à¯à®Ÿà¯à®°à®®à¯" + ], + "BWP": [ + "BWP", + "போடà¯à®¸à¯à®µà®¾à®©à®©à¯ பà¯à®²à®¾" + ], + "BYN": [ + "BYN", + "பெலரà¯à®šà®¿à®¯à®©à¯ ரூபிளà¯" + ], + "BYR": [ + "BYR", + "பெலரà¯à®šà®¿à®¯à®©à¯ ரூபிள௠(2000–2016)" + ], + "BZD": [ + "BZD", + "பெலீஸ௠டாலரà¯" + ], + "CAD": [ + "CA$", + "கனடியன௠டாலரà¯" + ], + "CDF": [ + "CDF", + "காஙà¯à®•ோலீஸ௠ஃபà¯à®°à®¾à®™à¯à®•à¯" + ], + "CHF": [ + "CHF", + "சà¯à®µà®¿à®¸à¯ ஃபà¯à®°à®¾à®™à¯à®•à¯" + ], + "CLP": [ + "CLP", + "சிலியன௠பெசோ" + ], + "CNY": [ + "CNÂ¥", + "சீன யà¯à®µà®¾à®©à¯" + ], + "COP": [ + "COP", + "கொலமà¯à®ªà®¿à®¯à®©à¯ பெசோ" + ], + "CRC": [ + "CRC", + "கோஸà¯à®Ÿà®¾ ரிகன௠கொலோனà¯" + ], + "CUC": [ + "CUC", + "கியூபன௠கனà¯à®µà¯†à®°à¯à®Ÿà®¿à®ªà®¿à®²à¯ பெசோ" + ], + "CUP": [ + "CUP", + "கியூபன௠பெசோ" + ], + "CVE": [ + "CVE", + "கேப௠வெரà¯à®Ÿà®¿à®¯à®©à¯ எஸà¯à®•à¯à®Ÿà¯‹" + ], + "CZK": [ + "CZK", + "செக௠கà¯à®Ÿà®¿à®¯à®°à®šà¯ கொரà¯à®©à®¾" + ], + "DJF": [ + "DJF", + "ஜிபவà¯à®Ÿà®¿à®¯à¯†à®©à¯ ஃபà¯à®°à®¾à®™à¯à®•à¯" + ], + "DKK": [ + "DKK", + "டேனிஷ௠கà¯à®°à¯‹à®©à¯" + ], + "DOP": [ + "DOP", + "டொமினிகà¯à®•ன௠பெசோ" + ], + "DZD": [ + "DZD", + "அலà¯à®œà¯€à®°à®¿à®¯à®©à¯ தினாரà¯" + ], + "EGP": [ + "EGP", + "எகிபà¯à®¤à®¿à®¯ பவà¯à®£à¯à®Ÿà¯" + ], + "ERN": [ + "ERN", + "எரிதà¯à®°à®¿à®¯à®©à¯ நகà¯à®ƒà®ªà®¾" + ], + "ETB": [ + "ETB", + "எதà¯à®¤à®¿à®¯à¯‹à®ªà¯à®ªà®¿à®¯à®©à¯ பிரà¯" + ], + "EUR": [ + "€", + "யூரோ" + ], + "FJD": [ + "FJD", + "ஃபிஜியன௠டாலரà¯" + ], + "FKP": [ + "FKP", + "ஃபாகà¯à®²à®¾à®¨à¯à®¤à¯ தீவà¯à®•ள௠பவà¯à®£à¯à®Ÿà¯" + ], + "GBP": [ + "£", + "பிரிடà¯à®Ÿà®¿à®·à¯ பவà¯à®£à¯à®Ÿà¯" + ], + "GEL": [ + "GEL", + "ஜாரà¯à®œà®¿à®¯à®©à¯ லாரி" + ], + "GHS": [ + "GHS", + "கானயன௠சேடி" + ], + "GIP": [ + "GIP", + "ஜிபà¯à®°à®¾à®²à¯à®Ÿà®°à¯ பவà¯à®£à¯à®Ÿà¯" + ], + "GMD": [ + "GMD", + "கேமà¯à®ªà®¿à®¯à®©à¯ தலாசி" + ], + "GNF": [ + "GNF", + "கினியன௠ஃபà¯à®°à®¾à®™à¯à®•à¯" + ], + "GTQ": [ + "GTQ", + "கà¯à®µà®¾à®¤à¯†à®®à®¾à®²à®©à¯ கà¯à®¯à¯à®Ÿà¯à®¸à®²à¯" + ], + "GYD": [ + "GYD", + "கயானீஸ௠டாலரà¯" + ], + "HKD": [ + "HK$", + "ஹாஙà¯à®•ாங௠டாலரà¯" + ], + "HNL": [ + "HNL", + "ஹோனà¯à®Ÿà¯‚ரன௠லெமà¯à®ªà¯€à®°à®¾" + ], + "HRK": [ + "HRK", + "கà¯à®°à¯‹à®·à®¿à®¯à®©à¯ கà¯à®©à®¾" + ], + "HTG": [ + "HTG", + "ஹைடà¯à®Ÿà®¿à®¯à®©à¯ கோரà¯à®Ÿà¯‡" + ], + "HUF": [ + "HUF", + "ஹஙà¯à®•ேரியன௠ஃபோரினà¯à®Ÿà¯" + ], + "IDR": [ + "IDR", + "இநà¯à®¤à¯‹à®©à¯‡à®·à®¿à®¯à®©à¯ à®°à¯à®ªà®¿à®¯à®¾" + ], + "ILS": [ + "₪", + "இஸà¯à®°à¯‡à®²à®¿ நியூ ஷிகேலà¯" + ], + "INR": [ + "₹", + "இநà¯à®¤à®¿à®¯ ரூபாயà¯" + ], + "IQD": [ + "IQD", + "ஈராகà¯à®•ி தினாரà¯" + ], + "IRR": [ + "IRR", + "ஈரானியன௠ரியாலà¯" + ], + "ISK": [ + "ISK", + "à®à®¸à¯à®²à®¾à®£à¯à®Ÿà®¿à®•௠கà¯à®°à¯‹à®©à®¾" + ], + "JMD": [ + "JMD", + "ஜமைகà¯à®•ன௠டாலரà¯" + ], + "JOD": [ + "JOD", + "ஜோரà¯à®Ÿà®¾à®©à®¿à®¯ தினாரà¯" + ], + "JPY": [ + "Â¥", + "ஜபà¯à®ªà®¾à®©à®¿à®¯ யெனà¯" + ], + "KES": [ + "KES", + "கெனà¯à®¯à®©à¯ ஷிலà¯à®²à®¿à®™à¯" + ], + "KGS": [ + "KGS", + "கிரà¯à®•ிஸà¯à®¤à®¾à®©à®¿ சோமà¯" + ], + "KHR": [ + "KHR", + "கமà¯à®ªà¯‹à®Ÿà®¿à®¯à®©à¯ ரியெலà¯" + ], + "KMF": [ + "KMF", + "கமோரியன௠ஃபà¯à®°à®¾à®™à¯à®•à¯" + ], + "KPW": [ + "KPW", + "வட கொரிய வானà¯" + ], + "KRW": [ + "â‚©", + "தென௠கொரிய வானà¯" + ], + "KWD": [ + "KWD", + "கà¯à®µà¯ˆà®¤à¯à®¤à®¿ தினாரà¯" + ], + "KYD": [ + "KYD", + "கேமன௠தீவà¯à®•ள௠டாலரà¯" + ], + "KZT": [ + "KZT", + "கஸகஸà¯à®¤à®¾à®©à®¿ டெனà¯à®•ே" + ], + "LAK": [ + "LAK", + "லவோஷியன௠கிபà¯" + ], + "LBP": [ + "LBP", + "லெபனீஸ௠பவà¯à®£à¯à®Ÿà¯" + ], + "LKR": [ + "LKR", + "இலஙà¯à®•ை ரூபாயà¯" + ], + "LRD": [ + "LRD", + "லைபீரியன௠டாலரà¯" + ], + "LSL": [ + "LSL", + "லெசோதோ லோடà¯à®Ÿà®¿" + ], + "LTL": [ + "LTL", + "லிதà¯à®µà¯‡à®©à®¿à®¯à®©à¯ லிடஸà¯" + ], + "LVL": [ + "LVL", + "லதà¯à®µà®¿à®¯à®©à¯ லாடà¯à®¸à¯" + ], + "LYD": [ + "LYD", + "லிபியன௠தினாரà¯" + ], + "MAD": [ + "MAD", + "மொராகà¯à®•ன௠திரà¯à®¹à®¾à®®à¯" + ], + "MDL": [ + "MDL", + "மாலà¯à®Ÿà¯‹à®µà®©à¯ லியூ" + ], + "MGA": [ + "MGA", + "மலகாசி à®à®°à®¿à®¯à®°à®¿" + ], + "MKD": [ + "MKD", + "மாசிடோனியன௠டேனாரà¯" + ], + "MMK": [ + "MMK", + "மியானà¯à®®à®°à¯ கியாதà¯" + ], + "MNT": [ + "MNT", + "மஙà¯à®•ோலியன௠டà¯à®•à¯à®°à®¿à®•à¯" + ], + "MOP": [ + "MOP", + "மெகனீஸ௠படாகா" + ], + "MRO": [ + "MRO", + "மொரிஷானியன௠ஒகà¯à®¯à®¾" + ], + "MUR": [ + "MUR", + "மொரீஷியன௠ரà¯à®ªà¯€" + ], + "MVR": [ + "MVR", + "மாலதà¯à®¤à¯€à®µà¯ à®°à¯à®ƒà®ªà®¿à®¯à®¾" + ], + "MWK": [ + "MWK", + "மலாவியன௠கà¯à®µà®¾à®šà¯à®šà®¾" + ], + "MXN": [ + "MX$", + "மெகà¯à®¸à®¿à®•ன௠பெசோ" + ], + "MYR": [ + "MYR", + "மலேஷியன௠ரிஙà¯à®•ிடà¯" + ], + "MZN": [ + "MZN", + "மொசாமà¯à®ªà®¿à®•ன௠மெடிகலà¯" + ], + "NAD": [ + "NAD", + "நமீபியன௠டாலரà¯" + ], + "NGN": [ + "NGN", + "நைஜீரியன௠நைரா" + ], + "NIO": [ + "NIO", + "நிகரகà¯à®µà®©à¯ கோரà¯à®Ÿà¯‹à®ªà®¾" + ], + "NOK": [ + "NOK", + "நாரà¯à®µà¯‡à®œà®¿à®¯à®©à¯ கà¯à®°à¯‹à®©à¯" + ], + "NPR": [ + "NPR", + "நேபாளீஸ௠ரூபாயà¯" + ], + "NZD": [ + "NZ$", + "நியூசிலாநà¯à®¤à¯ டாலரà¯" + ], + "OMR": [ + "OMR", + "ஓமானி ரியாலà¯" + ], + "PAB": [ + "PAB", + "பனாமானியன௠பாலà¯à®ªà¯‹à®µà®¾" + ], + "PEN": [ + "PEN", + "பெரூவியன௠சோலà¯" + ], + "PGK": [ + "PGK", + "பபà¯à®µà®¾ நியூ கினியன௠கினா" + ], + "PHP": [ + "PHP", + "பிலிபà¯à®ªà¯ˆà®©à¯ பெசோ" + ], + "PKR": [ + "PKR", + "பாகிஸà¯à®¤à®¾à®©à®¿ ரூபாயà¯" + ], + "PLN": [ + "PLN", + "போலிஷ௠ஸà¯à®²à®¾à®Ÿà¯à®Ÿà®¿" + ], + "PYG": [ + "PYG", + "பராகà¯à®µà®©à¯ கà¯à®µà®¾à®°à®¾à®©à®¿" + ], + "QAR": [ + "QAR", + "கதà¯à®¤à®¾à®°à®¿ ரியாலà¯" + ], + "RON": [ + "RON", + "ரோமானியன௠லியூ" + ], + "RSD": [ + "RSD", + "செரà¯à®ªà®¿à®¯à®©à¯ தினாரà¯" + ], + "RUB": [ + "RUB", + "ரஷியன௠ரூபிளà¯" + ], + "RWF": [ + "RWF", + "à®°à¯à®µà®¾à®£à¯à®Ÿà®©à¯ ஃபà¯à®°à®¾à®™à¯à®•à¯" + ], + "SAR": [ + "SAR", + "சவà¯à®¤à®¿ ரியாலà¯" + ], + "SBD": [ + "SBD", + "சாலமன௠தீவà¯à®•ள௠டாலரà¯" + ], + "SCR": [ + "SCR", + "சிசீலோயிஸ௠ரà¯à®ªà¯€" + ], + "SDG": [ + "SDG", + "சூடானீஸ௠பவà¯à®£à¯à®Ÿà¯" + ], + "SEK": [ + "SEK", + "ஸà¯à®µà¯€à®Ÿà®¿à®·à¯ கà¯à®°à¯‹à®©à®¾" + ], + "SGD": [ + "SGD", + "சிஙà¯à®•பà¯à®ªà¯‚ர௠டாலரà¯" + ], + "SHP": [ + "SHP", + "செயினà¯à®Ÿà¯ ஹெலேனா பவà¯à®£à¯à®Ÿà¯" + ], + "SLL": [ + "SLL", + "சியாரா லியோனியன௠லியோனà¯" + ], + "SOS": [ + "SOS", + "சோமாலி ஷிலà¯à®²à®¿à®™à¯" + ], + "SRD": [ + "SRD", + "சà¯à®°à®¿à®©à®¾à®®à¯€à®¸à¯ டாலரà¯" + ], + "SSP": [ + "SSP", + "தெறà¯à®•௠சூடானீஸ௠பவà¯à®£à¯à®Ÿà¯" + ], + "STD": [ + "STD", + "சாவ௠டோமி மறà¯à®±à¯à®®à¯ பிரினà¯à®¸à¯à®ªà®¿ டோபà¯à®°à®¾" + ], + "SYP": [ + "SYP", + "சிரியன௠பவà¯à®£à¯à®Ÿà¯" + ], + "SZL": [ + "SZL", + "சà¯à®µà®¾à®¸à®¿ லிலாஙà¯à®•னி" + ], + "THB": [ + "฿", + "தாய௠பாடà¯" + ], + "TJS": [ + "TJS", + "தஜிகிஸà¯à®¤à®¾à®©à®¿ சோமோனி" + ], + "TMT": [ + "TMT", + "தà¯à®°à¯à®•à¯à®®à¯†à®©à®¿à®¸à¯à®¤à®¾à®©à®¿ மனதà¯" + ], + "TND": [ + "TND", + "தà¯à®©à®¿à®·à®¿à®¯à®©à¯ தினாரà¯" + ], + "TOP": [ + "TOP", + "தொஙà¯à®•ான௠பஙà¯à®•ா" + ], + "TRY": [ + "TRY", + "தà¯à®°à¯à®•à¯à®•ிஷ௠லீரா" + ], + "TTD": [ + "TTD", + "டிரினிடாட௠மறà¯à®±à¯à®®à¯ டோபாகோ டாலரà¯" + ], + "TWD": [ + "NT$", + "பà¯à®¤à®¿à®¯ தைவான௠டாலரà¯" + ], + "TZS": [ + "TZS", + "தானà¯à®šà®¾à®©à®¿à®¯à®©à¯ ஷிலà¯à®²à®¿à®™à¯" + ], + "UAH": [ + "UAH", + "உகà¯à®°à¯ˆà®©à®¿à®¯à®©à¯ ஹிரைவà¯à®©à®¿à®¯à®¾" + ], + "UGX": [ + "UGX", + "உகாணà¯à®Ÿà®©à¯ ஷிலà¯à®²à®¿à®™à¯" + ], + "USD": [ + "$", + "அமெரிகà¯à®• டாலரà¯" + ], + "UYU": [ + "UYU", + "உரà¯à®•à¯à®µà¯‡à®¯à®©à¯ பெசோ" + ], + "UZS": [ + "UZS", + "உஸà¯à®ªà¯†à®•à¯à®•ிஸà¯à®¤à®¾à®©à®¿ சோமà¯" + ], + "VEF": [ + "VEF", + "வெனிசà¯à®²à®©à¯ போலிவரà¯" + ], + "VND": [ + "â‚«", + "வியடà¯à®¨à®¾à®®à¯€à®¸à¯ டாஙà¯" + ], + "VUV": [ + "VUV", + "வனà¯à®µà®¾à®Ÿà¯à®Ÿà¯ வாடà¯à®Ÿà¯" + ], + "WST": [ + "WST", + "சமோவான௠தாலா" + ], + "XAF": [ + "FCFA", + "மதà¯à®¤à®¿à®¯ ஆபà¯à®ªà®¿à®°à®¿à®•à¯à®• CFA ஃபà¯à®°à®¾à®™à¯à®•à¯" + ], + "XCD": [ + "EC$", + "கிழகà¯à®•௠கரீபியன௠டாலரà¯" + ], + "XOF": [ + "CFA", + "மேறà¯à®•௠ஆபà¯à®ªà®¿à®°à®¿à®•à¯à®• CFA ஃபà¯à®°à®¾à®™à¯à®•à¯" + ], + "XPF": [ + "CFPF", + "ஃபà¯à®°à®¾à®™à¯à®•௠(CFP)" + ], + "YER": [ + "YER", + "à®à®®à®©à®¿ ரியாலà¯" + ], + "ZAR": [ + "ZAR", + "தென௠ஆபà¯à®°à®¿à®•à¯à®• ராணà¯à®Ÿà¯" + ], + "ZMK": [ + "ZMK", + "ஸாமà¯à®ªà®¿à®¯à®©à¯ கà¯à®µà®¾à®šà®¾ (1968–2012)" + ], + "ZMW": [ + "ZMW", + "ஸாமà¯à®ªà®¿à®¯à®©à¯ கà¯à®µà®¾à®šà¯à®šà®¾" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ta_LK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ta_LK.json new file mode 100644 index 0000000000000000000000000000000000000000..efd56a650e72bf1a503280b497df2ed082c6d415 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ta_LK.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "LKR": [ + "Rs.", + "இலஙà¯à®•ை ரூபாயà¯" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ta_MY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ta_MY.json new file mode 100644 index 0000000000000000000000000000000000000000..979a587ed500f23faca7f34c21ef93e1f2b63f63 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ta_MY.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MYR": [ + "RM", + "மலேஷியன௠ரிஙà¯à®•ிடà¯" + ], + "SGD": [ + "S$", + "சிஙà¯à®•பà¯à®ªà¯‚ர௠டாலரà¯" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ta_SG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ta_SG.json new file mode 100644 index 0000000000000000000000000000000000000000..f77daea527e633f15756dc680654704906453849 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ta_SG.json @@ -0,0 +1,17 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MYR": [ + "RM", + "மலேஷியன௠ரிஙà¯à®•ிடà¯" + ], + "SGD": [ + "$", + "சிஙà¯à®•பà¯à®ªà¯‚ர௠டாலரà¯" + ], + "USD": [ + "US$", + "அமெரிகà¯à®• டாலரà¯" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/te.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/te.json new file mode 100644 index 0000000000000000000000000000000000000000..422b85c0ea8c3d93a5f90a7e9556d496922e63b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/te.json @@ -0,0 +1,641 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "à°¯à±à°¨à±ˆà°Ÿà±†à°¡à± ఆరబౠఎమిరేటà±à°¸à± దిరామà±" + ], + "AFN": [ + "AFN", + "ఆఫà±à°˜à°¾à°¨à± ఆఫà±à°˜à°¾à°¨à°¿" + ], + "ALL": [ + "ALL", + "ఆలà±à°¬à±‡à°¨à°¿à°¯à°¨à± లేకà±" + ], + "AMD": [ + "AMD", + "అమెరికనౠడà±à°°à°¾à°®à±" + ], + "ANG": [ + "ANG", + "నెదరà±à°²à°¾à°‚à°¡à±à°¸à± యాంటిలà±à°²à°¿à°¯à°¨à± à°—à°¿à°²à±â€Œà°¡à°°à±" + ], + "AOA": [ + "AOA", + "అంగోలానౠకà±à°µà°¾à°¨à±â€Œà°œà°¾" + ], + "ARS": [ + "ARS", + "à°…à°°à±à°œà±†à°‚టీనా పెసో" + ], + "AUD": [ + "A$", + "ఆసà±à°Ÿà±à°°à±‡à°²à°¿à°¯à°¨à± డాలరà±" + ], + "AWG": [ + "AWG", + "à°…à°°à±à°¬à°¨à± à°«à±à°²à±‹à°°à°¿à°¨à±" + ], + "AZN": [ + "AZN", + "అజరà±à°¬à±ˆà°œà°¾à°¨à± మానటà±" + ], + "BAM": [ + "BAM", + "బోసà±à°¨à°¿à°¯à°¾-హెరà±à°œà°—ోవినా మారà±à°ªà°¿à°¡à°¿ చెయà±à°¯à°—లిగే మారà±à°•à±" + ], + "BBD": [ + "BBD", + "బరà±à°¬à°¾à°¡à°¿à°¯à°¨à± డాలరà±" + ], + "BDT": [ + "BDT", + "బాంగà±à°²à°¾à°¦à±‡à°¶à± టాకా" + ], + "BGN": [ + "BGN", + "బలà±à°—ేరియనౠలేవà±" + ], + "BHD": [ + "BHD", + "బహà±à°°à±†à°¯à°¿à°¨à± దినారà±" + ], + "BIF": [ + "BIF", + "à°¬à±à°°à°¿à°‚డియనౠఫà±à°°à°¾à°‚à°•à±" + ], + "BMD": [ + "BMD", + "బెరà±à°®à±à°¡à°¨à± డాలరà±" + ], + "BND": [ + "BND", + "à°¬à±à°°à±‚నై డాలరà±" + ], + "BOB": [ + "BOB", + "బొలీవియనౠబొలీవియానో" + ], + "BRL": [ + "R$", + "à°¬à±à°°à±†à°œà°¿à°²à°¿à°¯à°¨à± రియలà±" + ], + "BSD": [ + "BSD", + "బహామియనౠడాలరà±" + ], + "BTN": [ + "BTN", + "భూటానీయà±à°² à°—à±à°²à±â€Œà°Ÿà±à°°à±à°®à±" + ], + "BWP": [ + "BWP", + "బోటà±à°¸à±â€Œà°µà°¾à°¨à°¾ à°ªà±à°²à°¾" + ], + "BYN": [ + "BYN", + "బెలరూసియనౠరూబలà±" + ], + "BYR": [ + "BYR", + "బెలరూసియనౠరూబలౠ(2000–2016)" + ], + "BZD": [ + "BZD", + "బెలీజౠడాలరà±" + ], + "CAD": [ + "CA$", + "కెనడియనౠడాలరà±" + ], + "CDF": [ + "CDF", + "కొంగోలిసౠఫà±à°°à°¾à°‚à°•à±" + ], + "CHF": [ + "CHF", + "à°¸à±à°µà°¿à°¸à± à°«à±à°°à°¾à°‚à°•à±" + ], + "CLP": [ + "CLP", + "చిలియనౠపెసో" + ], + "CNY": [ + "CNÂ¥", + "చైనా దేశ à°¯à±à°µà°¾à°¨à±" + ], + "COP": [ + "COP", + "కొలంబియనౠపెసో" + ], + "CRC": [ + "CRC", + "కోసà±à°Ÿà°¾ రికనౠకోలోనà±" + ], + "CUC": [ + "CUC", + "à°•à±à°¯à±‚బనౠకనà±à°µà°°à±à°Ÿà°¬à±à°²à± పెసో" + ], + "CUP": [ + "CUP", + "à°•à±à°¯à±‚బనౠపెసో" + ], + "CVE": [ + "CVE", + "కేపౠవెరà±à°¡à°¿à°¯à°¨à± à°Žà°¸à±à°•à±à°¡à±‹" + ], + "CZK": [ + "CZK", + "చెకౠరిపబà±à°²à°¿à°•ౠకోరà±à°¨à°¾" + ], + "DJF": [ + "DJF", + "జిబోటియనౠఫà±à°°à°¾à°‚à°•à±" + ], + "DKK": [ + "DKK", + "డానిషౠకà±à°°à±‹à°¨à±" + ], + "DOP": [ + "DOP", + "డోమినికనౠపెసో" + ], + "DZD": [ + "DZD", + "à°…à°²à±à°œà±€à°°à°¿à°¯à°¨à± దీనారà±" + ], + "EGP": [ + "EGP", + "ఈజిపà±à°·à°¿à°¯à°¨à± పౌండà±" + ], + "ERN": [ + "ERN", + "à°Žà°°à°¿à°Ÿà±à°°à±€à°¨à± నకà±à°«à°¾" + ], + "ETB": [ + "ETB", + "ఇథియోపియనౠబరà±" + ], + "EUR": [ + "€", + "à°¯à±à°°à±Š" + ], + "FJD": [ + "FJD", + "ఫీజియనౠడాలరà±" + ], + "FKP": [ + "FKP", + "ఫాకà±â€Œà°²à±à°¯à°¾à°‚డౠదీవà±à°²à± పౌండà±" + ], + "GBP": [ + "£", + "à°¬à±à°°à°¿à°Ÿà°¿à°·à± పౌండà±" + ], + "GEL": [ + "GEL", + "జారà±à°œà°¿à°¯à°¨à± లారి" + ], + "GHS": [ + "GHS", + "గానెయనౠసెడి" + ], + "GIP": [ + "GIP", + "జిబà±à°°à°²à±â€Œà°Ÿà±‚రౠపౌండà±" + ], + "GMD": [ + "GMD", + "గాంబియనౠదలాసి" + ], + "GNF": [ + "GNF", + "à°—à±à°µà°¿à°¨à°¿à°¯à°¨à± à°«à±à°°à°¾à°‚à°•à±" + ], + "GTQ": [ + "GTQ", + "à°—à±à°¯à±à°Ÿà±†à°®à°¾à°²à°¨à± à°•à±à°µà±†à°Ÿà±â€Œà°œà°²à±" + ], + "GYD": [ + "GYD", + "à°—à±à°¯à°¨à°¿à°¯à°¾à°¸à± డాలరà±" + ], + "HKD": [ + "HK$", + "హాంకాంగౠడాలరà±" + ], + "HNL": [ + "HNL", + "హోండà±à°°à°¨à± లెమిపిరా" + ], + "HRK": [ + "HRK", + "à°•à±à°°à±Šà°¯à±‡à°·à°¿à°¯à°¨à± à°•à±à°¯à±‚à°¨" + ], + "HTG": [ + "HTG", + "హైటియనౠగà±à°µà±‹à°°à±à°¡à±‡" + ], + "HUF": [ + "HUF", + "హంగేరియనౠఫోరినà±à°Ÿà±" + ], + "IDR": [ + "IDR", + "ఇండోనేషియా రూపాయి" + ], + "ILS": [ + "₪", + "à°à°°à°¾à°¯à°¿à°²à°¿ à°¨à±à°¯à±‚ షెకà±à°¯à±†à°²à±" + ], + "INR": [ + "₹", + "రూపాయి" + ], + "IQD": [ + "IQD", + "ఇరాకీ దీనారà±" + ], + "IRR": [ + "IRR", + "ఇరానియనౠరీయలà±" + ], + "ISK": [ + "ISK", + "à°à°¸à±à°²à°¾à°‚à°¡à°¿à°•à± à°•à±à°°à±‹à°¨à°¾" + ], + "JMD": [ + "JMD", + "జమైకనౠడాలరà±" + ], + "JOD": [ + "JOD", + "జోరà±â€Œà°¡à°¾à°¨à°¿à°¯à°¨à± దీనారà±" + ], + "JPY": [ + "JPÂ¥", + "జపానౠదేశ యెసà±" + ], + "KES": [ + "KES", + "కెనà±à°¯à°¾à°¨à± à°·à°¿à°²à±à°²à°¿à°‚à°—à±" + ], + "KGS": [ + "KGS", + "à°•à°¿à°°à±à°—à°¿à°¸à±à°¥à°¾à°¨à°¿ సౌమà±" + ], + "KHR": [ + "KHR", + "కాంబోడియనౠరీలà±" + ], + "KMF": [ + "KMF", + "కొమోరియనౠఫà±à°°à°¾à°‚à°•à±" + ], + "KPW": [ + "KPW", + "ఉతà±à°¤à°° కొరియా వోనà±" + ], + "KRW": [ + "â‚©", + "దకà±à°·à°¿à°£ కొరియా వోనà±" + ], + "KWD": [ + "KWD", + "à°•à±à°µà±ˆà°Ÿà± దీనారà±" + ], + "KYD": [ + "KYD", + "కేమానౠదీవà±à°² డాలరà±" + ], + "KZT": [ + "KZT", + "ఖజికిసà±à°¥à°¾à°¨à± టెంగే" + ], + "LAK": [ + "LAK", + "లాటియనౠకిపà±" + ], + "LBP": [ + "LBP", + "లెబనీసౠపౌండà±" + ], + "LKR": [ + "LKR", + "à°¶à±à°°à±€à°²à°‚à°• రూపాయి" + ], + "LRD": [ + "LRD", + "లిబేరియనౠడాలరà±" + ], + "LSL": [ + "LSL", + "లెసోధో లోటి" + ], + "LTL": [ + "LTL", + "లిథోనియనౠలీటాసà±" + ], + "LVL": [ + "LVL", + "లాతà±à°µà°¿à°¯à°¨à± లాటà±à°¸à±" + ], + "LYD": [ + "LYD", + "లిబియనౠదీనారà±" + ], + "MAD": [ + "MAD", + "మోరోకనౠదిరà±à°¹à±à°®à±" + ], + "MDL": [ + "MDL", + "మోలà±â€Œà°¡à±‹à°µà°¨à± à°²à±à°¯à±‚" + ], + "MGA": [ + "MGA", + "మలగసీ అరియరీ" + ], + "MKD": [ + "MKD", + "మెసిడోనియనౠదినారà±" + ], + "MMK": [ + "MMK", + "మయనà±à°®à°¾à°°à± à°•à±à°¯à°¾à°Ÿà±" + ], + "MNT": [ + "MNT", + "మంగోలియనౠటà±à°—à±à°°à°¿à°•à±" + ], + "MOP": [ + "MOP", + "మకనీసౠపటాక" + ], + "MRO": [ + "MRO", + "మౌరిటానియనౠఒగà±à°¯à°¿à°¯à°¾" + ], + "MUR": [ + "MUR", + "మారిషనౠరూపాయి" + ], + "MVR": [ + "MVR", + "మాలà±à°¦à±€à°µà°¿à°¯à°¨à± à°°à±à°«à°¿à°¯à°¾" + ], + "MWK": [ + "MWK", + "మలావియనౠకà±à°µà°¾à°šà°¾" + ], + "MXN": [ + "MX$", + "మెకà±à°¸à°¿à°•నౠపెసో" + ], + "MYR": [ + "MYR", + "మలేషియా à°°à°¿à°‚à°—à±à°—à°¿à°Ÿà±" + ], + "MZN": [ + "MZN", + "మొజాంబికనౠమెటికలà±" + ], + "NAD": [ + "NAD", + "నమిబియనౠడాలరà±" + ], + "NGN": [ + "NGN", + "నైజీరియనౠనైరా" + ], + "NIO": [ + "NIO", + "నికరగà±à°¯à±à°¯à°¨à± కొరà±â€Œà°¡à±à°¬à±" + ], + "NOK": [ + "NOK", + "నారà±à°µà±‡à°œà±€à°¯à°¨à± à°•à±à°°à±‹à°¨à±" + ], + "NPR": [ + "NPR", + "నేపాలీయà±à°² రూపాయి" + ], + "NZD": [ + "NZ$", + "à°¨à±à°¯à±‚జిలాండౠడాలరà±" + ], + "OMR": [ + "OMR", + "ఒమాని రీయలà±" + ], + "PAB": [ + "PAB", + "పనామనియనౠబలà±à°¬à±‹à°µ" + ], + "PEN": [ + "PEN", + "పెరà±à°µà°¿à°¯à°¨à± à°¨à±à°¯à±‚వో సోలà±" + ], + "PGK": [ + "PGK", + "పపà±à°¯à±‚ à°¨à±à°¯à±‚ à°—à±à°¯à°¿à°¨à°¿à°¯à°¨à± కినా" + ], + "PHP": [ + "PHP", + "ఫిలిపà±à°ªà°¿à°¨à± పెసో" + ], + "PKR": [ + "PKR", + "పాకిసà±à°¥à°¾à°¨à± రూపాయి" + ], + "PLN": [ + "PLN", + "పోలిషౠజà±à°²à±‹à°Ÿà±€" + ], + "PYG": [ + "PYG", + "పరగà±à°µà°¾à°¯à°¨à± à°—à±à°µà°¾à°°à°¨à°¿" + ], + "QAR": [ + "QAR", + "à°•à±à°µà°¾à°Ÿà°°à°¿ రీయలà±" + ], + "RON": [ + "RON", + "రోమానియానౠలెయà±" + ], + "RSD": [ + "RSD", + "సెరà±à°¬à°¿à°¯à°¨à± దీనారà±" + ], + "RUB": [ + "RUB", + "à°°à°·à±à°¯à°¨à± రూబలà±" + ], + "RWF": [ + "RWF", + "à°°à±à°µà°¾à°¨à°¡à°¾à°¨à± à°«à±à°°à°¾à°‚à°•à±" + ], + "SAR": [ + "SAR", + "సౌది రియలà±" + ], + "SBD": [ + "SBD", + "సోలోమనౠదీవà±à°² డాలరà±" + ], + "SCR": [ + "SCR", + "సెయిచెలà±à°²à±‹à°¯à°¿à°¸à± రూపాయి" + ], + "SDG": [ + "SDG", + "à°¸à±à°¡à°¾à°¨à±€à°¸à± పౌండà±" + ], + "SEK": [ + "SEK", + "à°¸à±à°µà±€à°¡à°¿à°·à± à°•à±à°°à±‹à°¨à°¾" + ], + "SGD": [ + "SGD", + "సింగపూరౠడాలరà±" + ], + "SHP": [ + "SHP", + "సెయింటౠహెలెనా పౌండà±" + ], + "SLL": [ + "SLL", + "సీయిరౠలియోనియనౠలీయోనà±" + ], + "SOS": [ + "SOS", + "సొమాలి à°·à°¿à°²à±à°²à°¿à°‚à°—à±" + ], + "SRD": [ + "SRD", + "à°¸à±à°°à°¿à°¨à°¾à°®à±€à°¯à±à°² డాలరà±" + ], + "SSP": [ + "SSP", + "దకà±à°·à°¿à°£ à°¸à±à°¡à°¾à°¨à±€à°¸à± పౌండà±" + ], + "STD": [ + "STD", + "సావో టోమౠమరియౠపà±à°°à°¿à°¨à±à°¸à°¿à°ªà°¿ డోబà±à°°à°¾" + ], + "SYP": [ + "SYP", + "సిరీయనౠపౌండà±" + ], + "SZL": [ + "SZL", + "à°¸à±à°µà°¾à°œà°¿ లిలానà±à°—ేని" + ], + "THB": [ + "฿", + "థాయౠబాటà±" + ], + "TJS": [ + "TJS", + "తజికిసà±à°¥à°¾à°¨à± సమోని" + ], + "TMT": [ + "TMT", + "à°¤à±à°°à±à°•à±â€Œà°®à±†à°¨à°¿à°¸à±à°¥à°¾à°¨à°¿ మనాటà±" + ], + "TND": [ + "TND", + "à°¤à±à°¨à±€à°·à°¿à°¯à°¨à± దీనారà±" + ], + "TOP": [ + "TOP", + "టోంగానౠపాంʻగా" + ], + "TRY": [ + "TRY", + "à°¤à±à°°à±à°•ిషౠలిరా" + ], + "TTD": [ + "TTD", + "à°Ÿà±à°°à°¿à°¨à°¿à°¡à°¾à°¡à± మరియౠటొబాగో డాలరà±" + ], + "TWD": [ + "NT$", + "à°•à±à°°à±Šà°¤à±à°¤ తైవానౠడాలరà±" + ], + "TZS": [ + "TZS", + "టాంజానియనౠషిలà±à°²à°¿à°‚à°—à±" + ], + "UAH": [ + "UAH", + "ఉకà±à°°à°¯à°¿à°¨à°¿à°¯à°¨à± à°¹à±à°°à°¿à°µà±â€Œà°¨à°¿à°¯à°¾" + ], + "UGX": [ + "UGX", + "ఉగాండనౠషిలà±à°²à°¿à°‚à°—à±" + ], + "USD": [ + "$", + "అమెరికా డాలరà±" + ], + "UYU": [ + "UYU", + "ఉరà±à°—à±à°µà±†à°¯à°¨à± పెసో" + ], + "UZS": [ + "UZS", + "ఉజà±â€Œà°¬à±†à°•à°¿à°¸à±à°¤à°¾à°¨à± సౌమà±" + ], + "VEF": [ + "VEF", + "వెనà±à°œà±à°²à°¾ బోలివరà±" + ], + "VND": [ + "â‚«", + "వియతà±à°¨à°¾à°®à±€à°¯à±à°² డాంగà±" + ], + "VUV": [ + "VUV", + "వనాటౠవటà±" + ], + "WST": [ + "WST", + "సమోయనౠతాలా" + ], + "XAF": [ + "FCFA", + "సెంటà±à°°à°²à± ఆఫà±à°°à°¿à°•నౠసిఎఫà±â€Œà°Ž à°«à±à°°à°¾à°‚à°•à±" + ], + "XCD": [ + "EC$", + "తూరà±à°ªà± కరీబియనౠడాలరà±" + ], + "XOF": [ + "CFA", + "పశà±à°šà°¿à°® ఆఫà±à°°à°¿à°•నౠసిà°à°«à±à° à°«à±à°°à°¾à°‚à°•à±" + ], + "XPF": [ + "CFPF", + "సిఎఫà±â€Œà°ªà°¿ à°«à±à°°à°¾à°‚à°•à±" + ], + "YER": [ + "YER", + "à°Žà°®à±à°¨à±€ రీయలà±" + ], + "ZAR": [ + "ZAR", + "దకà±à°·à°¿à°£ ఆఫà±à°°à°¿à°•à°¾ à°°à±à°¯à°¾à°‚à°¡à±" + ], + "ZMK": [ + "ZMK", + "జాంబియనౠకà±à°µà°¾à°šà°¾ (1968–2012)" + ], + "ZMW": [ + "ZMW", + "జాంబియనౠకà±à°µà°¾à°šà°¾" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/th.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/th.json new file mode 100644 index 0000000000000000000000000000000000000000..e171cf2da4ea037ec39566bd495ea4133377c1cb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/th.json @@ -0,0 +1,1125 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "เปเซตาอันดอร์รา" + ], + "AED": [ + "AED", + "เดอร์à¹à¸®à¸¡à¸ªà¸«à¸£à¸±à¸à¸­à¸²à¸«à¸£à¸±à¸šà¹€à¸­à¸¡à¸´à¹€à¸£à¸•ส์" + ], + "AFA": [ + "AFA", + "อัฟà¸à¸²à¸™à¸µà¸­à¸±à¸Ÿà¸à¸²à¸™à¸´à¸ªà¸–าน (1927–2002)" + ], + "AFN": [ + "AFN", + "อัฟà¸à¸²à¸™à¸´à¸­à¸±à¸Ÿà¸à¸²à¸™à¸´à¸ªà¸–าน" + ], + "ALL": [ + "ALL", + "เลà¸à¹à¸­à¸¥à¹€à¸šà¹€à¸™à¸µà¸¢" + ], + "AMD": [ + "AMD", + "à¹à¸”รมอาร์เมเนีย" + ], + "ANG": [ + "ANG", + "à¸à¸´à¸¥à¹€à¸”อร์เนเธอร์à¹à¸¥à¸™à¸”์à¹à¸­à¸™à¸—ิลลิส" + ], + "AOA": [ + "AOA", + "à¸à¸§à¸²à¸™à¸‹à¸²à¹à¸­à¸‡à¹‚à¸à¸¥à¸²" + ], + "AOK": [ + "AOK", + "à¸à¸§à¸²à¸™à¸‹à¸²à¹à¸­à¸‡à¹‚à¸à¸¥à¸² (1977–1990)" + ], + "AON": [ + "AON", + "นิวà¸à¸§à¸²à¸™à¸‹à¸²à¹à¸­à¸‡à¹‚à¸à¸¥à¸² (1990–2000)" + ], + "AOR": [ + "AOR", + "à¸à¸§à¸²à¸™à¸‹à¸²à¸£à¸µà¸ˆà¸±à¸ªà¸—าโดà¹à¸­à¸‡à¹‚à¸à¸¥à¸² (1995–1999)" + ], + "ARA": [ + "ARA", + "ออสตรัลอาร์เจนตินา" + ], + "ARL": [ + "ARL", + "เปโซเลย์อาร์เจนตินา (1970–1983)" + ], + "ARM": [ + "ARM", + "เปโซอาร์เจนตินา (1881–1970)" + ], + "ARP": [ + "ARP", + "เปโซอาร์เจนตินา (1983–1985)" + ], + "ARS": [ + "ARS", + "เปโซอาร์เจนตินา" + ], + "ATS": [ + "ATS", + "ชิลลิงออสเตรีย" + ], + "AUD": [ + "AU$", + "ดอลลาร์ออสเตรเลีย" + ], + "AWG": [ + "AWG", + "ฟลอรินอารูบา" + ], + "AZM": [ + "AZM", + "มานัตอาเซอร์ไบจาน (1993–2006)" + ], + "AZN": [ + "AZN", + "มานัตอาเซอร์ไบจาน" + ], + "BAD": [ + "BAD", + "ดีนาร์บอสเนีย-เฮอร์เซโà¸à¸§à¸µà¸™à¸²" + ], + "BAM": [ + "BAM", + "มาร์à¸à¸šà¸­à¸ªà¹€à¸™à¸µà¸¢-เฮอร์เซโà¸à¸§à¸µà¸™à¸²" + ], + "BAN": [ + "BAN", + "ดีนาร์ใหม่บอสเนีย-เฮอร์เซโà¸à¸§à¸µà¸™à¸² (1994–1997)" + ], + "BBD": [ + "BBD", + "ดอลลาร์บาร์เบโดส" + ], + "BDT": [ + "BDT", + "ตาà¸à¸²à¸šà¸±à¸‡à¸à¸¥à¸²à¹€à¸—ศ" + ], + "BEC": [ + "BEC", + "ฟรังà¸à¹Œà¹€à¸šà¸¥à¹€à¸¢à¸µà¸¢à¸¡ (เปลี่ยนà¹à¸›à¸¥à¸‡à¹„ด้)" + ], + "BEF": [ + "BEF", + "ฟรังà¸à¹Œà¹€à¸šà¸¥à¹€à¸¢à¸µà¸¢à¸¡" + ], + "BEL": [ + "BEL", + "ฟรังà¸à¹Œà¹€à¸šà¸¥à¹€à¸¢à¸µà¸¢à¸¡ (à¸à¸²à¸£à¹€à¸‡à¸´à¸™)" + ], + "BGL": [ + "BGL", + "ฮาร์ดเลฟบัลà¹à¸à¹€à¸£à¸µà¸¢" + ], + "BGM": [ + "BGM", + "โซเชียลลิสต์เลฟบัลà¹à¸à¹€à¸£à¸µà¸¢" + ], + "BGN": [ + "BGN", + "เลฟบัลà¹à¸à¹€à¸£à¸µà¸¢" + ], + "BGO": [ + "BGO", + "เลฟบัลเà¸à¹€à¸£à¸µà¸¢ (1879–1952)" + ], + "BHD": [ + "BHD", + "ดีนาร์บาห์เรน" + ], + "BIF": [ + "BIF", + "ฟรังà¸à¹Œà¸šà¸¸à¸£à¸¸à¸™à¸”ี" + ], + "BMD": [ + "BMD", + "ดอลลาร์เบอร์มิวดา" + ], + "BND": [ + "BND", + "ดอลลาร์บรูไน" + ], + "BOB": [ + "BOB", + "โบลิเวียโนโบลิเวีย" + ], + "BOL": [ + "BOL", + "โบลิเวียโนโบลิเวีย (1863–1963)" + ], + "BOP": [ + "BOP", + "เปโซโบลิเวีย" + ], + "BOV": [ + "BOV", + "มฟดอลโบลิเวีย" + ], + "BRB": [ + "BRB", + "ครูเซโรโนโวบราซิล (1967–1986)" + ], + "BRC": [ + "BRC", + "ครูซาโดบราซิล" + ], + "BRE": [ + "BRE", + "ครูเซโรบราซิล (1990–1993)" + ], + "BRL": [ + "R$", + "เรียลบราซิล" + ], + "BRN": [ + "BRN", + "ครูซาโดโนโวบราซิล" + ], + "BRR": [ + "BRR", + "ครูเซโรบราซิล" + ], + "BRZ": [ + "BRZ", + "ครูเซโรบราซิล (1942–1967)" + ], + "BSD": [ + "BSD", + "ดอลลาร์บาฮามาส" + ], + "BTN": [ + "BTN", + "เอ็งà¸à¸¸à¸¥à¸•รัมภูà¸à¸²à¸™" + ], + "BUK": [ + "BUK", + "จ๊าดพม่า" + ], + "BWP": [ + "BWP", + "ปูลาบอตสวานา" + ], + "BYB": [ + "BYB", + "นิวรูเบิลเบลารุส (1994–1999)" + ], + "BYN": [ + "BYN", + "รูเบิลเบลารุส" + ], + "BYR": [ + "BYR", + "รูเบิลเบลารุส (2000–2016)" + ], + "BZD": [ + "BZD", + "ดอลลาร์เบลีซ" + ], + "CAD": [ + "CA$", + "ดอลลาร์à¹à¸„นาดา" + ], + "CDF": [ + "CDF", + "ฟรังà¸à¹Œà¸„องโà¸" + ], + "CHE": [ + "CHE", + "ยูโรดับเบิลยูไออาร์" + ], + "CHF": [ + "CHF", + "ฟรังà¸à¹Œà¸ªà¸§à¸´à¸ª" + ], + "CHW": [ + "CHW", + "ฟรังà¸à¹Œà¸”ับเบิลยูไออาร์" + ], + "CLE": [ + "CLE", + "เอสคูโดชิลี" + ], + "CLF": [ + "CLF", + "ฟูเมนโตชิลี" + ], + "CLP": [ + "CLP", + "เปโซชิลี" + ], + "CNY": [ + "CNÂ¥", + "หยวนจีน" + ], + "COP": [ + "COP", + "เปโซโคลอมเบีย" + ], + "COU": [ + "COU", + "วาเลอร์เรียลโคลอมเบีย" + ], + "CRC": [ + "CRC", + "โà¸à¸¥à¸­à¸‡à¸„อสตาริà¸à¸²" + ], + "CSD": [ + "CSD", + "ดีนาร์เซอร์เบียเà¸à¹ˆà¸²" + ], + "CSK": [ + "CSK", + "ฮาร์ดโครูนาเช็à¸à¹‚à¸à¸ªà¹‚ลวัà¸" + ], + "CUC": [ + "CUC", + "เปโซคิวบา (à¹à¸›à¸¥à¸‡à¸ªà¸ à¸²à¸ž)" + ], + "CUP": [ + "CUP", + "เปโซคิวบา" + ], + "CVE": [ + "CVE", + "เอสคูโดเคปเวิร์ด" + ], + "CYP": [ + "CYP", + "ปอนด์ไซปรัส" + ], + "CZK": [ + "CZK", + "โครูนาสาธารณรัà¸à¹€à¸Šà¹‡à¸" + ], + "DDM": [ + "DDM", + "มาร์à¸à¹€à¸¢à¸­à¸£à¸¡à¸±à¸™à¸•ะวันออà¸" + ], + "DEM": [ + "DEM", + "มาร์à¸à¹€à¸¢à¸­à¸£à¸¡à¸±à¸™" + ], + "DJF": [ + "DJF", + "ฟรังà¸à¹Œà¸ˆà¸´à¸šà¸¹à¸•ี" + ], + "DKK": [ + "DKK", + "โครนเดนมาร์à¸" + ], + "DOP": [ + "DOP", + "เปโซโดมินิà¸à¸±à¸™" + ], + "DZD": [ + "DZD", + "ดีนาร์à¹à¸­à¸¥à¸ˆà¸µà¹€à¸£à¸µà¸¢" + ], + "ECS": [ + "ECS", + "ซูเà¸à¸£à¹€à¸­à¸à¸§à¸²à¸”อร์" + ], + "ECV": [ + "ECV", + "วาเลอร์คอนสà¹à¸•นต์เอà¸à¸§à¸²à¸”อร์" + ], + "EEK": [ + "EEK", + "ครูนเอสโตเนีย" + ], + "EGP": [ + "EGP", + "ปอนด์อียิปต์" + ], + "ERN": [ + "ERN", + "à¹à¸™à¸à¸Ÿà¸²à¹€à¸­à¸£à¸´à¹€à¸—รีย" + ], + "ESA": [ + "ESA", + "เปเซตาสเปน (บัà¸à¸Šà¸µà¹€à¸­)" + ], + "ESB": [ + "ESB", + "เปเซตาสเปน (บัà¸à¸Šà¸µà¸—ี่เปลี่ยนà¹à¸›à¸¥à¸‡à¹„ด้)" + ], + "ESP": [ + "ESP", + "เปเซตาสเปน" + ], + "ETB": [ + "ETB", + "เบอรร์เอธิโอเปีย" + ], + "EUR": [ + "€", + "ยูโร" + ], + "FIM": [ + "FIM", + "มาร์à¸à¸à¸²à¸Ÿà¸´à¸™à¹à¸¥à¸™à¸”์" + ], + "FJD": [ + "FJD", + "ดอลลาร์ฟิจิ" + ], + "FKP": [ + "FKP", + "ปอนด์หมู่เà¸à¸²à¸°à¸Ÿà¸­à¸¥à¹Œà¸à¹à¸¥à¸™à¸”์" + ], + "FRF": [ + "FRF", + "ฟรังà¸à¹Œà¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª" + ], + "GBP": [ + "£", + "ปอนด์สเตอร์ลิง (สหราชอาณาจัà¸à¸£)" + ], + "GEK": [ + "GEK", + "คูปอนลาริตจอร์เจีย" + ], + "GEL": [ + "GEL", + "ลารีจอร์เจีย" + ], + "GHC": [ + "GHC", + "เซดีà¸à¸²à¸™à¸² (1979–2007)" + ], + "GHS": [ + "GHS", + "เซดีà¸à¸²à¸™à¸²" + ], + "GIP": [ + "GIP", + "ปอนด์ยิบรอลตาร์" + ], + "GMD": [ + "GMD", + "ดาลาซีà¹à¸à¸¡à¹€à¸šà¸µà¸¢" + ], + "GNF": [ + "GNF", + "ฟรังà¸à¹Œà¸à¸´à¸™à¸µ" + ], + "GNS": [ + "GNS", + "ไซลีà¸à¸´à¸™à¸µ" + ], + "GQE": [ + "GQE", + "เอ็à¸à¹€à¸§à¹€à¸¥à¸­à¸´à¹€à¸„วทอเรียลà¸à¸´à¸™à¸µ" + ], + "GRD": [ + "GRD", + "ดรัชมาà¸à¸£à¸µà¸" + ], + "GTQ": [ + "GTQ", + "เควตซัลà¸à¸±à¸§à¹€à¸•มาลา" + ], + "GWE": [ + "GWE", + "เอสคูโดà¸à¸´à¸™à¸µà¹‚ปรตุเà¸à¸ª" + ], + "GWP": [ + "GWP", + "เปโซà¸à¸´à¸™à¸µ-บิสเซา" + ], + "GYD": [ + "GYD", + "ดอลลาร์à¸à¸²à¸¢à¸­à¸²à¸™à¸²" + ], + "HKD": [ + "HK$", + "ดอลลาร์ฮ่องà¸à¸‡" + ], + "HNL": [ + "HNL", + "เลมปิราฮอนดูรัส" + ], + "HRD": [ + "HRD", + "ดีนาร์โครเอเชีย" + ], + "HRK": [ + "HRK", + "คูนาโครเอเชีย" + ], + "HTG": [ + "HTG", + "à¸à¸¹à¸£à¹Œà¸”เฮติ" + ], + "HUF": [ + "HUF", + "ฟอรินต์ฮังà¸à¸²à¸£à¸µ" + ], + "IDR": [ + "IDR", + "รูเปียห์อินโดนีเซีย" + ], + "IEP": [ + "IEP", + "ปอนด์ไอริช" + ], + "ILP": [ + "ILP", + "ปอนด์อิสราเอล" + ], + "ILS": [ + "₪", + "นิวเชเà¸à¸¥à¸­à¸´à¸ªà¸£à¸²à¹€à¸­à¸¥" + ], + "INR": [ + "₹", + "รูปีอินเดีย" + ], + "IQD": [ + "IQD", + "ดีนาร์อิรัà¸" + ], + "IRR": [ + "IRR", + "เรียลอิหร่าน" + ], + "ISK": [ + "ISK", + "โครนาไอซ์à¹à¸¥à¸™à¸”์" + ], + "ITL": [ + "ITL", + "ลีราอิตาลี" + ], + "JMD": [ + "JMD", + "ดอลลาร์จาเมà¸à¸²" + ], + "JOD": [ + "JOD", + "ดีนาร์จอร์à¹à¸”น" + ], + "JPY": [ + "Â¥", + "เยนà¸à¸µà¹ˆà¸›à¸¸à¹ˆà¸™" + ], + "KES": [ + "KES", + "ชิลลิงเคนยา" + ], + "KGS": [ + "KGS", + "ซอมคีร์à¸à¸µà¸‹à¸ªà¸–าน" + ], + "KHR": [ + "KHR", + "เรียลà¸à¸±à¸¡à¸žà¸¹à¸Šà¸²" + ], + "KMF": [ + "KMF", + "ฟรังà¸à¹Œà¸„อโมโรส" + ], + "KPW": [ + "KPW", + "วอนเà¸à¸²à¸«à¸¥à¸µà¹€à¸«à¸™à¸·à¸­" + ], + "KRH": [ + "KRH", + "ฮวานเà¸à¸²à¸«à¸¥à¸µà¹ƒà¸•้ (1953–1962)" + ], + "KRO": [ + "KRO", + "วอนเà¸à¸²à¸«à¸¥à¸µà¹ƒà¸•้ (1945–1953)" + ], + "KRW": [ + "â‚©", + "วอนเà¸à¸²à¸«à¸¥à¸µà¹ƒà¸•้" + ], + "KWD": [ + "KWD", + "ดีนาร์คูเวต" + ], + "KYD": [ + "KYD", + "ดอลลาร์หมู่เà¸à¸²à¸°à¹€à¸„ย์à¹à¸¡à¸™" + ], + "KZT": [ + "KZT", + "เทงเจคาซัคสถาน" + ], + "LAK": [ + "LAK", + "à¸à¸µà¸šà¸¥à¸²à¸§" + ], + "LBP": [ + "LBP", + "ปอนด์เลบานอน" + ], + "LKR": [ + "LKR", + "รูปีศรีลังà¸à¸²" + ], + "LRD": [ + "LRD", + "ดอลลาร์ไลบีเรีย" + ], + "LSL": [ + "LSL", + "โลตีเลโซโท" + ], + "LTL": [ + "LTL", + "ลีตัสลิทัวเนีย" + ], + "LTT": [ + "LTT", + "ทาโลนัสลิทัวเนีย" + ], + "LUC": [ + "LUC", + "คอนเวอร์ทิเบิลฟรังà¸à¹Œà¸¥à¸±à¸à¹€à¸‹à¸¡à¹€à¸šà¸´à¸£à¹Œà¸" + ], + "LUF": [ + "LUF", + "ฟรังà¸à¹Œà¸¥à¸±à¸à¹€à¸‹à¸¡à¹€à¸šà¸´à¸£à¹Œà¸" + ], + "LUL": [ + "LUL", + "ไฟà¹à¸™à¸¥à¹€à¸Šà¸µà¸¢à¸¥à¸Ÿà¸£à¸±à¸‡à¸à¹Œà¸¥à¸±à¸à¹€à¸‹à¸¡à¹€à¸šà¸´à¸£à¹Œà¸" + ], + "LVL": [ + "LVL", + "ลัตส์ลัตเวีย" + ], + "LVR": [ + "LVR", + "รูเบิลลัตเวีย" + ], + "LYD": [ + "LYD", + "ดีนาร์ลิเบีย" + ], + "MAD": [ + "MAD", + "ดีà¹à¸£à¸«à¹Œà¸¡à¹‚มร็อà¸à¹‚à¸" + ], + "MAF": [ + "MAF", + "ฟรังà¸à¹Œà¹‚มร็อà¸à¹‚à¸" + ], + "MCF": [ + "MCF", + "ฟรังà¸à¹Œà¹‚มนาโà¸" + ], + "MDC": [ + "MDC", + "บัตรปันส่วนมอลโดวา" + ], + "MDL": [ + "MDL", + "ลิวมอลโดวา" + ], + "MGA": [ + "MGA", + "อาเรียรีมาลาà¸à¸²à¸‹à¸µ" + ], + "MGF": [ + "MGF", + "ฟรังà¸à¹Œà¸¡à¸²à¸”าà¸à¸±à¸ªà¸à¸²à¸£à¹Œ" + ], + "MKD": [ + "MKD", + "ดีนาร์มาซิโดเนีย" + ], + "MKN": [ + "MKN", + "ดีนาร์มาซิโดเนีย (1992–1993)" + ], + "MLF": [ + "MLF", + "ฟรังà¸à¹Œà¸¡à¸²à¸¥à¸µ" + ], + "MMK": [ + "MMK", + "จ๊าตพม่า" + ], + "MNT": [ + "MNT", + "ทูà¸à¸£à¸´à¸à¸¡à¸­à¸‡à¹‚à¸à¹€à¸¥à¸µà¸¢" + ], + "MOP": [ + "MOP", + "ปาตาà¸à¸²à¸¡à¸²à¹€à¸à¹Šà¸²" + ], + "MRO": [ + "MRO", + "อูà¸à¸µà¸¢à¸²à¸¡à¸­à¸£à¸´à¹€à¸•เนีย" + ], + "MTL": [ + "MTL", + "ลีรามอลตา" + ], + "MTP": [ + "MTP", + "ปอนด์มอลตา" + ], + "MUR": [ + "MUR", + "รูปีมอริเชียส" + ], + "MVR": [ + "MVR", + "รูฟิยามัลดีฟส์" + ], + "MWK": [ + "MWK", + "ควาชามาลาวี" + ], + "MXN": [ + "MX$", + "เปโซเม็à¸à¸‹à¸´à¹‚à¸" + ], + "MXP": [ + "MXP", + "เงินเปโซเม็à¸à¸‹à¸´à¹‚ภ(1861–1992)" + ], + "MXV": [ + "MXV", + "ยูนิà¹à¸”ด ดี อินเวอร์ชั่น เม็à¸à¸‹à¸´à¹‚à¸" + ], + "MYR": [ + "MYR", + "ริงà¸à¸´à¸•มาเลเซีย" + ], + "MZE": [ + "MZE", + "เอสคูโดโมซัมบิà¸" + ], + "MZM": [ + "MZM", + "เมติคัลโมซัมบิà¸à¹€à¸à¹ˆà¸²" + ], + "MZN": [ + "MZN", + "เมติคัลโมซัมบิà¸" + ], + "NAD": [ + "NAD", + "ดอลลาร์นามิเบีย" + ], + "NGN": [ + "NGN", + "ไนราไนจีเรีย" + ], + "NIC": [ + "NIC", + "คอร์โดบานิà¸à¸²à¸£à¸²à¸à¸±à¸§" + ], + "NIO": [ + "NIO", + "à¸à¸­à¸£à¹Œà¹‚ดบานิà¸à¸²à¸£à¸²à¸à¸±à¸§" + ], + "NLG": [ + "NLG", + "à¸à¸´à¸¥à¹€à¸”อร์เนเธอร์à¹à¸¥à¸™à¸”์" + ], + "NOK": [ + "NOK", + "โครนนอร์เวย์" + ], + "NPR": [ + "NPR", + "รูปีเนปาล" + ], + "NZD": [ + "NZ$", + "ดอลลาร์นิวซีà¹à¸¥à¸™à¸”์" + ], + "OMR": [ + "OMR", + "เรียลโอมาน" + ], + "PAB": [ + "PAB", + "บัลบัวปานามา" + ], + "PEI": [ + "PEI", + "อินตีเปรู" + ], + "PEN": [ + "PEN", + "นูโวซอลเปรู" + ], + "PES": [ + "PES", + "ซอลเปรู" + ], + "PGK": [ + "PGK", + "à¸à¸µà¸™à¸²à¸›à¸²à¸›à¸±à¸§à¸™à¸´à¸§à¸à¸´à¸™à¸µ" + ], + "PHP": [ + "PHP", + "เปโซฟิลิปปินส์" + ], + "PKR": [ + "PKR", + "รูปีปาà¸à¸µà¸ªà¸–าน" + ], + "PLN": [ + "PLN", + "ซลอตีโปà¹à¸¥à¸™à¸”์" + ], + "PLZ": [ + "PLZ", + "ซลอตีโปà¹à¸¥à¸™à¸”์ (1950–1995)" + ], + "PTE": [ + "PTE", + "เอสคูโดโปรตุเà¸à¸ª" + ], + "PYG": [ + "PYG", + "à¸à¸§à¸²à¸£à¸²à¸™à¸µà¸›à¸²à¸£à¸²à¸à¸§à¸±à¸¢" + ], + "QAR": [ + "QAR", + "เรียลà¸à¸²à¸•าร์" + ], + "RHD": [ + "RHD", + "ดอลลาร์โรดีเซีย" + ], + "ROL": [ + "ROL", + "ลิวโรมาเนียเà¸à¹ˆà¸²" + ], + "RON": [ + "RON", + "ลิวโรมาเนีย" + ], + "RSD": [ + "RSD", + "ดีนาร์เซอร์เบีย" + ], + "RUB": [ + "RUB", + "รูเบิลรัสเซีย" + ], + "RUR": [ + "RUR", + "รูเบิลรัสเซีย (1991–1998)" + ], + "RWF": [ + "RWF", + "ฟรังà¸à¹Œà¸£à¸§à¸±à¸™à¸”า" + ], + "SAR": [ + "SAR", + "ริยัลซาอุดีอาระเบีย" + ], + "SBD": [ + "SBD", + "ดอลลาร์หมู่เà¸à¸²à¸°à¹‚ซโลมอน" + ], + "SCR": [ + "SCR", + "รูปีเซเชลส์" + ], + "SDD": [ + "SDD", + "ดีนาร์ซูดานเà¸à¹ˆà¸²" + ], + "SDG": [ + "SDG", + "ปอนด์ซูดาน" + ], + "SDP": [ + "SDP", + "ปอนด์ซูดานเà¸à¹ˆà¸²" + ], + "SEK": [ + "SEK", + "โครนาสวีเดน" + ], + "SGD": [ + "SGD", + "ดอลลาร์สิงคโปร์" + ], + "SHP": [ + "SHP", + "ปอนด์เซนต์เฮเลนา" + ], + "SIT": [ + "SIT", + "ทอลาร์สโลวีเนีย" + ], + "SKK": [ + "SKK", + "โครูนาสโลวัà¸" + ], + "SLL": [ + "SLL", + "ลีโอนเซียร์ราลีโอน" + ], + "SOS": [ + "SOS", + "ชิลลิงโซมาเลีย" + ], + "SRD": [ + "SRD", + "ดอลลาร์ซูรินาเม" + ], + "SRG": [ + "SRG", + "à¸à¸´à¸¥à¹€à¸”อร์ซูรินาเม" + ], + "SSP": [ + "SSP", + "ปอนด์ซูดานใต้" + ], + "STD": [ + "STD", + "ดอบราเซาตูเมà¹à¸¥à¸°à¸›à¸£à¸´à¸™à¸‹à¸´à¸›à¸µ" + ], + "SUR": [ + "SUR", + "รูเบิลโซเวียต" + ], + "SVC": [ + "SVC", + "โคลอนเอลซัลวาดอร์" + ], + "SYP": [ + "SYP", + "ปอนด์ซีเรีย" + ], + "SZL": [ + "SZL", + "ลิลันเจนีสวาซิ" + ], + "THB": [ + "THB", + "บาทไทย" + ], + "TJR": [ + "TJR", + "รูเบิลทาจิà¸à¸´à¸ªà¸–าน" + ], + "TJS": [ + "TJS", + "โซโมนิทาจิà¸à¸´à¸ªà¸–าน" + ], + "TMM": [ + "TMM", + "มานัตเติร์à¸à¹€à¸¡à¸™à¸´à¸ªà¸–าน (1993–2009)" + ], + "TMT": [ + "TMT", + "มานัตเติร์à¸à¹€à¸¡à¸™à¸´à¸ªà¸–าน" + ], + "TND": [ + "TND", + "ดีนาร์ตูนิเซีย" + ], + "TOP": [ + "TOP", + "พาà¹à¸­à¸‡à¸à¸²à¸•องà¸à¸²" + ], + "TPE": [ + "TPE", + "เอสคูโดติมอร์" + ], + "TRL": [ + "TRL", + "ลีราตุรà¸à¸µà¹€à¸à¹ˆà¸²" + ], + "TRY": [ + "TRY", + "ลีราตุรà¸à¸µ" + ], + "TTD": [ + "TTD", + "ดอลลาร์ตรินิà¹à¸”ดà¹à¸¥à¸°à¹‚ตเบโà¸" + ], + "TWD": [ + "NT$", + "ดอลลาร์ไต้หวันใหม่" + ], + "TZS": [ + "TZS", + "ชิลลิงà¹à¸—นซาเนีย" + ], + "UAH": [ + "UAH", + "ฮรีฟเนียยูเครน" + ], + "UAK": [ + "UAK", + "คาร์โบวาเนตซ์ยูเครน" + ], + "UGS": [ + "UGS", + "ชิลลิงยูà¸à¸±à¸™à¸”า (1966–1987)" + ], + "UGX": [ + "UGX", + "ชิลลิงยูà¸à¸±à¸™à¸”า" + ], + "USD": [ + "US$", + "ดอลลาร์สหรัà¸" + ], + "USN": [ + "USN", + "ดอลลาร์สหรัภ(วันถัดไป)" + ], + "USS": [ + "USS", + "ดอลลาร์สหรัภ(วันเดียวà¸à¸±à¸™)" + ], + "UYI": [ + "UYI", + "เปโซเอนยูนิà¹à¸”ดเซสอินเด็à¸à¸‹à¸²à¹à¸”สอุรุà¸à¸§à¸±à¸¢" + ], + "UYP": [ + "UYP", + "เปโซอุรุà¸à¸§à¸±à¸¢ (1975–1993)" + ], + "UYU": [ + "UYU", + "เปโซอุรุà¸à¸§à¸±à¸¢" + ], + "UZS": [ + "UZS", + "ซอมอุซเบà¸à¸´à¸ªà¸–าน" + ], + "VEB": [ + "VEB", + "โบลิวาร์เวเนซุเอลา (1871–2008)" + ], + "VEF": [ + "VEF", + "โบลิวาร์เวเนซุเอลา" + ], + "VND": [ + "â‚«", + "ดองเวียดนาม" + ], + "VNN": [ + "VNN", + "ดองเวียดนาม (1978–1985)" + ], + "VUV": [ + "VUV", + "วาตูวานูอาตู" + ], + "WST": [ + "WST", + "ทาลาซามัว" + ], + "XAF": [ + "FCFA", + "ฟรังà¸à¹Œà¹€à¸‹à¸Ÿà¸²à¸˜à¸™à¸²à¸„ารรัà¸à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¸à¸¥à¸²à¸‡" + ], + "XCD": [ + "EC$", + "ดอลลาร์à¹à¸„ริบเบียนตะวันออà¸" + ], + "XEU": [ + "XEU", + "หน่วยสà¸à¸¸à¸¥à¹€à¸‡à¸´à¸™à¸¢à¸¸à¹‚รป" + ], + "XFO": [ + "XFO", + "ฟรังà¸à¹Œà¸—องà¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª" + ], + "XFU": [ + "XFU", + "ฟรังà¸à¹Œà¸¢à¸¹à¹„อซีà¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª" + ], + "XOF": [ + "CFA", + "ฟรังà¸à¹Œà¹€à¸‹à¸Ÿà¸²à¸˜à¸™à¸²à¸„ารà¸à¸¥à¸²à¸‡à¸£à¸±à¸à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¸•ะวันตà¸" + ], + "XPF": [ + "CFPF", + "ฟรังà¸à¹Œà¸‹à¸µà¹€à¸­à¸Ÿà¸žà¸µ" + ], + "XRE": [ + "XRE", + "à¸à¸­à¸‡à¸—ุนไรเน็ต" + ], + "YDD": [ + "YDD", + "ดีนาร์เยเมน" + ], + "YER": [ + "YER", + "เรียลเยเมน" + ], + "YUD": [ + "YUD", + "ฮาร์ดดีนาร์ยูโà¸à¸ªà¸¥à¸²à¹€à¸§à¸µà¸¢" + ], + "YUM": [ + "YUM", + "โนวิย์ดีนาร์ยูโà¸à¸ªà¸¥à¸²à¹€à¸§à¸µà¸¢" + ], + "YUN": [ + "YUN", + "คอนเวอร์ทิเบิลดีนาร์ยูโà¸à¸ªà¸¥à¸²à¹€à¸§à¸µà¸¢" + ], + "YUR": [ + "YUR", + "ดีนาร์ปà¸à¸´à¸£à¸¹à¸›à¸¢à¸¹à¹‚à¸à¸ªà¸¥à¸²à¹€à¸§à¸µà¸¢ (1992–1993)" + ], + "ZAL": [ + "ZAL", + "à¹à¸£à¸™à¸”์à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¹ƒà¸•้ (à¸à¸²à¸£à¹€à¸‡à¸´à¸™)" + ], + "ZAR": [ + "ZAR", + "à¹à¸£à¸™à¸”์à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¹ƒà¸•้" + ], + "ZMK": [ + "ZMK", + "ควาชาà¹à¸‹à¸¡à¹€à¸šà¸µà¸¢ (1968–2012)" + ], + "ZMW": [ + "ZMW", + "ควาชาà¹à¸‹à¸¡à¹€à¸šà¸µà¸¢" + ], + "ZRN": [ + "ZRN", + "นิวà¹à¸‹à¸£à¹Œà¸„องโà¸" + ], + "ZRZ": [ + "ZRZ", + "à¹à¸‹à¸£à¹Œà¸„องโà¸" + ], + "ZWD": [ + "ZWD", + "ดอลลาร์ซิมบับเว" + ], + "ZWL": [ + "ZWL", + "ดอลลาร์ซิมบับเว (2009)" + ], + "ZWR": [ + "ZWR", + "ดอลลาร์ซิมบับเว (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ti.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ti.json new file mode 100644 index 0000000000000000000000000000000000000000..07084b93cc1860b83adb60c40ae11274e0070dde --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ti.json @@ -0,0 +1,41 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BRL": [ + "R$", + "የብራዚሠሪáˆ" + ], + "CNY": [ + "CNÂ¥", + "የቻይና ዩአን ረንሚንቢ" + ], + "ETB": [ + "Br", + "የኢትዮጵያ ብር" + ], + "EUR": [ + "€", + "አá‹áˆ®" + ], + "GBP": [ + "£", + "የእንáŒáˆŠá‹ á“á‹áŠ•á‹µ ስተርሊንáŒ" + ], + "INR": [ + "₹", + "የሕንድ ሩá’" + ], + "JPY": [ + "JPÂ¥", + "የጃá“ን የን" + ], + "RUB": [ + "RUB", + "የራሻ ሩብáˆ" + ], + "USD": [ + "US$", + "የአሜሪካን ዶላር" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ti_ER.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ti_ER.json new file mode 100644 index 0000000000000000000000000000000000000000..ab0a8eeabcc6b5bd4abde99c275bd374aa277234 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ti_ER.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ERN": [ + "Nfk", + "ERN" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/tl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/tl.json new file mode 100644 index 0000000000000000000000000000000000000000..764db79ba63e11950129385e578944bd4bc48c8f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/tl.json @@ -0,0 +1,665 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "United Arab Emirates Dirham" + ], + "AFN": [ + "AFN", + "Afghan Afghani" + ], + "ALL": [ + "ALL", + "Albanian Lek" + ], + "AMD": [ + "AMD", + "Armenian Dram" + ], + "ANG": [ + "ANG", + "Antillean Guilder ng Netherlands" + ], + "AOA": [ + "AOA", + "Angolan Kwanza" + ], + "ARS": [ + "ARS", + "Piso ng Argentina" + ], + "AUD": [ + "A$", + "Dolyar ng Australya" + ], + "AWG": [ + "AWG", + "Florin ng Aruba" + ], + "AZN": [ + "AZN", + "Azerbaijani Manat" + ], + "BAM": [ + "BAM", + "Bosnia-Herzegovina Convertible Mark" + ], + "BBD": [ + "BBD", + "Dolyar ng Barbados" + ], + "BDT": [ + "BDT", + "Bangladeshi Taka" + ], + "BGN": [ + "BGN", + "Bulgarian Lev" + ], + "BHD": [ + "BHD", + "Bahraini Dinar" + ], + "BIF": [ + "BIF", + "Burundian Franc" + ], + "BMD": [ + "BMD", + "Dolyar ng Bermuda" + ], + "BND": [ + "BND", + "Dolyar ng Brunei" + ], + "BOB": [ + "BOB", + "Boliviano ng Bolivia" + ], + "BRL": [ + "R$", + "Real ng Barzil" + ], + "BSD": [ + "BSD", + "Dolyar ng Bahamas" + ], + "BTN": [ + "BTN", + "Bhutanese Ngultrum" + ], + "BWP": [ + "BWP", + "Botswanan Pula" + ], + "BYN": [ + "BYN", + "Belarusian Ruble" + ], + "BYR": [ + "BYR", + "Belarusian Ruble (2000–2016)" + ], + "BZD": [ + "BZD", + "Dolyar ng Belize" + ], + "CAD": [ + "CA$", + "Dolyar ng Canada" + ], + "CDF": [ + "CDF", + "Congolese Franc" + ], + "CHF": [ + "CHF", + "Swiss Franc" + ], + "CLP": [ + "CLP", + "Piso ng Chile" + ], + "CNY": [ + "CNÂ¥", + "Chinese Yuan" + ], + "COP": [ + "COP", + "Piso ng Colombia" + ], + "CRC": [ + "CRC", + "Colón ng Costa Rica" + ], + "CUC": [ + "CUC", + "Convertible na Piso ng Cuba" + ], + "CUP": [ + "CUP", + "Piso ng Cuba" + ], + "CVE": [ + "CVE", + "Cape Verdean Escudo" + ], + "CZK": [ + "CZK", + "Czech Republic Koruna" + ], + "DEM": [ + "DEM", + "Deutsche Marks" + ], + "DJF": [ + "DJF", + "Djiboutian Franc" + ], + "DKK": [ + "DKK", + "Danish Krone" + ], + "DOP": [ + "DOP", + "Piso ng Dominican" + ], + "DZD": [ + "DZD", + "Algerian Dinar" + ], + "EEK": [ + "EEK", + "Estonian Kroon" + ], + "EGP": [ + "EGP", + "Egyptian Pound" + ], + "ERN": [ + "ERN", + "Eritrean Nakfa" + ], + "ETB": [ + "ETB", + "Ethiopian Birr" + ], + "EUR": [ + "€", + "Euro" + ], + "FJD": [ + "FJD", + "Dolyar ng Fiji" + ], + "FKP": [ + "FKP", + "Pound ng Falkland Islands" + ], + "FRF": [ + "FRF", + "French Franc" + ], + "GBP": [ + "£", + "British Pound" + ], + "GEL": [ + "GEL", + "Georgian Lari" + ], + "GHS": [ + "GHS", + "Ghanaian Cedi" + ], + "GIP": [ + "GIP", + "Gibraltar Pound" + ], + "GMD": [ + "GMD", + "Gambian Dalasi" + ], + "GNF": [ + "GNF", + "Guinean Franc" + ], + "GTQ": [ + "GTQ", + "Quetzal ng Guatemala" + ], + "GYD": [ + "GYD", + "Dolyar ng Guyanese" + ], + "HKD": [ + "HK$", + "Dolyar ng Hong Kong" + ], + "HNL": [ + "HNL", + "Lempira ng Honduras" + ], + "HRK": [ + "HRK", + "Croatian Kuna" + ], + "HTG": [ + "HTG", + "Gourde ng Haiti" + ], + "HUF": [ + "HUF", + "Hungarian Forint" + ], + "IDR": [ + "IDR", + "Indonesian Rupiah" + ], + "ILS": [ + "₪", + "Israeli New Sheqel" + ], + "INR": [ + "₹", + "Indian Rupee" + ], + "IQD": [ + "IQD", + "Iraqi Dinar" + ], + "IRR": [ + "IRR", + "Iranian Rial" + ], + "ISK": [ + "ISK", + "Icelandic Króna" + ], + "JMD": [ + "JMD", + "Dolyar ng Jamaica" + ], + "JOD": [ + "JOD", + "Jordanian Dinar" + ], + "JPY": [ + "Â¥", + "Japanese Yen" + ], + "KES": [ + "KES", + "Kenyan Shilling" + ], + "KGS": [ + "KGS", + "Kyrgystani Som" + ], + "KHR": [ + "KHR", + "Cambodian Riel" + ], + "KMF": [ + "KMF", + "Comorian Franc" + ], + "KPW": [ + "KPW", + "Won ng Hilagang Korea" + ], + "KRW": [ + "â‚©", + "Won ng Timog Korea" + ], + "KWD": [ + "KWD", + "Kuwaiti Dinar" + ], + "KYD": [ + "KYD", + "Dolyar ng Cayman Islands" + ], + "KZT": [ + "KZT", + "Kazakhstani Tenge" + ], + "LAK": [ + "LAK", + "Laotian Kip" + ], + "LBP": [ + "LBP", + "Pound ng Lebanon" + ], + "LKR": [ + "LKR", + "Sri Lankan Rupee" + ], + "LRD": [ + "LRD", + "Dolyar ng Liberia" + ], + "LSL": [ + "LSL", + "Lesotho Loti" + ], + "LTL": [ + "LTL", + "Lithuanian Litas" + ], + "LVL": [ + "LVL", + "Latvian Lats" + ], + "LYD": [ + "LYD", + "Libyan Dinar" + ], + "MAD": [ + "MAD", + "Moroccan Dirham" + ], + "MDL": [ + "MDL", + "Moldovan Leu" + ], + "MGA": [ + "MGA", + "Malagasy Ariary" + ], + "MKD": [ + "MKD", + "Macedonian Denar" + ], + "MMK": [ + "MMK", + "Myanmar Kyat" + ], + "MNT": [ + "MNT", + "Mongolian Tugrik" + ], + "MOP": [ + "MOP", + "Macanese Pataca" + ], + "MRO": [ + "MRO", + "Mauritanian Ouguiya" + ], + "MUR": [ + "MUR", + "Mauritian Rupee" + ], + "MVR": [ + "MVR", + "Maldivian Rufiyaa" + ], + "MWK": [ + "MWK", + "Malawian Kwacha" + ], + "MXN": [ + "MX$", + "Piso ng Mexico" + ], + "MYR": [ + "MYR", + "Malaysian Ringgit" + ], + "MZN": [ + "MZN", + "Mozambican Metical" + ], + "NAD": [ + "NAD", + "Dolyar ng Namibia" + ], + "NGN": [ + "NGN", + "Nigerian Naira" + ], + "NIO": [ + "NIO", + "Córdoba ng Nicaragua" + ], + "NOK": [ + "NOK", + "Norwegian Krone" + ], + "NPR": [ + "NPR", + "Nepalese Rupee" + ], + "NZD": [ + "NZ$", + "Dolyar ng New Zealand" + ], + "OMR": [ + "OMR", + "Omani Rial" + ], + "PAB": [ + "PAB", + "Balboa ng Panama" + ], + "PEN": [ + "PEN", + "Peruvian Nuevo Sol" + ], + "PGK": [ + "PGK", + "Papua New Guinean Kina" + ], + "PHP": [ + "₱", + "Piso ng Pilipinas" + ], + "PKR": [ + "PKR", + "Pakistani Rupee" + ], + "PLN": [ + "PLN", + "Polish Zloty" + ], + "PYG": [ + "PYG", + "Paraguayan Guarani" + ], + "QAR": [ + "QAR", + "Qatari Rial" + ], + "RON": [ + "RON", + "Romanian Leu" + ], + "RSD": [ + "RSD", + "Serbian Dinar" + ], + "RUB": [ + "RUB", + "Russian Ruble" + ], + "RWF": [ + "RWF", + "Rwandan Franc" + ], + "SAR": [ + "SAR", + "Saudi Riyal" + ], + "SBD": [ + "SBD", + "Dolyar ng Solomon Islands" + ], + "SCR": [ + "SCR", + "Seychellois Rupee" + ], + "SDG": [ + "SDG", + "Pound ng Sudan" + ], + "SEK": [ + "SEK", + "Swedish Krona" + ], + "SGD": [ + "SGD", + "Dolyar ng Singapore" + ], + "SHP": [ + "SHP", + "Saint Helena Pound" + ], + "SIT": [ + "SIT", + "Slovenian Tolar" + ], + "SKK": [ + "SKK", + "Slovak Koruna" + ], + "SLL": [ + "SLL", + "Sierra Leonean Leone" + ], + "SOS": [ + "SOS", + "Somali Shilling" + ], + "SRD": [ + "SRD", + "Dolyar ng Suriname" + ], + "SSP": [ + "SSP", + "Pound ng Timog Sudan" + ], + "STD": [ + "STD", + "São Tomé & Príncipe Dobra" + ], + "SYP": [ + "SYP", + "Syrian Pound" + ], + "SZL": [ + "SZL", + "Swazi Lilangeni" + ], + "THB": [ + "฿", + "Thai Baht" + ], + "TJS": [ + "TJS", + "Tajikistani Somoni" + ], + "TMT": [ + "TMT", + "Turkmenistani Manat" + ], + "TND": [ + "TND", + "Tunisian Dinar" + ], + "TOP": [ + "TOP", + "Tongan PaÊ»anga" + ], + "TRY": [ + "TRY", + "Turkish Lira" + ], + "TTD": [ + "TTD", + "Dolyar ng Trinidad and Tobago" + ], + "TWD": [ + "NT$", + "Dolyar ng New Taiwan" + ], + "TZS": [ + "TZS", + "Tanzanian Shilling" + ], + "UAH": [ + "UAH", + "Ukrainian Hryvnia" + ], + "UGX": [ + "UGX", + "Ugandan Shilling" + ], + "USD": [ + "$", + "Dolyar ng US" + ], + "UYU": [ + "UYU", + "Piso ng Uruguay" + ], + "UZS": [ + "UZS", + "Uzbekistan Som" + ], + "VEB": [ + "VEB", + "Venezuelan Bolívar (1871–2008)" + ], + "VEF": [ + "VEF", + "Bolívar ng Venezuela" + ], + "VND": [ + "â‚«", + "Vietnamese Dong" + ], + "VUV": [ + "VUV", + "Vanuatu Vatu" + ], + "WST": [ + "WST", + "Samoan Tala" + ], + "XAF": [ + "FCFA", + "CFA Franc BEAC" + ], + "XCD": [ + "EC$", + "Dolyar ng Silangang Caribbean" + ], + "XOF": [ + "CFA", + "CFA Franc ng Kanlurang Africa" + ], + "XPF": [ + "CFPF", + "CFP Franc" + ], + "YER": [ + "YER", + "Yemeni Rial" + ], + "ZAR": [ + "ZAR", + "Rand ng Timog Africa" + ], + "ZMK": [ + "ZMK", + "Zambian Kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambian Kwacha" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/to.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/to.json new file mode 100644 index 0000000000000000000000000000000000000000..ae02bcc9713f22dc7325af2e1bc757b4c344111c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/to.json @@ -0,0 +1,45 @@ +{ + "Version": "2.1.27.98", + "Names": { + "AUD": [ + "AUD$", + "AUD" + ], + "BRL": [ + "R$", + "BRL" + ], + "FJD": [ + "FJD", + "FJD" + ], + "NZD": [ + "NZD$", + "NZD" + ], + "PGK": [ + "PGK", + "PGK" + ], + "SBD": [ + "SBD", + "SBD" + ], + "TOP": [ + "T$", + "PaÊ»anga fakatonga" + ], + "VUV": [ + "VUV", + "VUV" + ], + "WST": [ + "WST", + "Tala fakahaÊ»amoa" + ], + "XPF": [ + "CFPF", + "XPF" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/tr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/tr.json new file mode 100644 index 0000000000000000000000000000000000000000..b82a5ec5a368f2cb4bdda6469cb9821a180c6013 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/tr.json @@ -0,0 +1,1146 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Andorra Pezetası" + ], + "AED": [ + "AED", + "BirleÅŸik Arap Emirlikleri Dirhemi" + ], + "AFA": [ + "AFA", + "Afganistan Afganisi (1927–2002)" + ], + "AFN": [ + "AFN", + "Afganistan Afganisi" + ], + "ALK": [ + "ALK", + "Arnavutluk Leki (1946–1965)" + ], + "ALL": [ + "ALL", + "Arnavutluk Leki" + ], + "AMD": [ + "AMD", + "Ermenistan Dramı" + ], + "ANG": [ + "ANG", + "Hollanda Antilleri Guldeni" + ], + "AOA": [ + "AOA", + "Angola Kvanzası" + ], + "AOK": [ + "AOK", + "Angola Kvanzası (1977–1990)" + ], + "AON": [ + "AON", + "Yeni Angola Kvanzası (1990–2000)" + ], + "AOR": [ + "AOR", + "Angola Kvanzası Reajustado (1995–1999)" + ], + "ARA": [ + "ARA", + "Arjantin Australi" + ], + "ARL": [ + "ARL", + "Arjantin Peso Leyi (1970–1983)" + ], + "ARM": [ + "ARM", + "Arjantin Pesosu (1881–1970)" + ], + "ARP": [ + "ARP", + "Arjantin Pezosu (1983–1985)" + ], + "ARS": [ + "ARS", + "Arjantin Pesosu" + ], + "ATS": [ + "ATS", + "Avusturya Åžilini" + ], + "AUD": [ + "AU$", + "Avustralya Doları" + ], + "AWG": [ + "AWG", + "Aruba Florini" + ], + "AZM": [ + "AZM", + "Azerbaycan Manatı (1993–2006)" + ], + "AZN": [ + "AZN", + "Azerbaycan Manatı" + ], + "BAD": [ + "BAD", + "Bosna Hersek Dinarı" + ], + "BAM": [ + "BAM", + "Konvertibl Bosna Hersek Markı" + ], + "BAN": [ + "BAN", + "Yeni Bosna Hersek Dinarı (1994–1997)" + ], + "BBD": [ + "BBD", + "Barbados Doları" + ], + "BDT": [ + "BDT", + "BangladeÅŸ Takası" + ], + "BEC": [ + "BEC", + "Belçika Frangı (konvertibl)" + ], + "BEF": [ + "BEF", + "Belçika Frangı" + ], + "BEL": [ + "BEL", + "Belçika Frangı (finansal)" + ], + "BGL": [ + "BGL", + "Bulgar Levası (Hard)" + ], + "BGM": [ + "BGM", + "Sosyalist Bulgaristan Levası" + ], + "BGN": [ + "BGN", + "Bulgar Levası" + ], + "BGO": [ + "BGO", + "Bulgar Levası (1879–1952)" + ], + "BHD": [ + "BHD", + "Bahreyn Dinarı" + ], + "BIF": [ + "BIF", + "Burundi Frangı" + ], + "BMD": [ + "BMD", + "Bermuda Doları" + ], + "BND": [ + "BND", + "Brunei Doları" + ], + "BOB": [ + "BOB", + "Bolivya Bolivyanosu" + ], + "BOL": [ + "BOL", + "Bolivya Bolivyanosu (1863–1963)" + ], + "BOP": [ + "BOP", + "Bolivya Pezosu" + ], + "BOV": [ + "BOV", + "Bolivya Mvdolu" + ], + "BRB": [ + "BRB", + "Yeni Brezilya Kruzeirosu (1967–1986)" + ], + "BRC": [ + "BRC", + "Brezilya Kruzadosu" + ], + "BRE": [ + "BRE", + "Brezilya Kruzeirosu (1990–1993)" + ], + "BRL": [ + "R$", + "Brezilya Reali" + ], + "BRN": [ + "BRN", + "Yeni Brezilya Kruzadosu" + ], + "BRR": [ + "BRR", + "Brezilya Kruzeirosu" + ], + "BRZ": [ + "BRZ", + "Brezilya Kruzeirosu (1942–1967)" + ], + "BSD": [ + "BSD", + "Bahama Doları" + ], + "BTN": [ + "BTN", + "Bhutan Ngultrumu" + ], + "BUK": [ + "BUK", + "Burma Kyatı" + ], + "BWP": [ + "BWP", + "Botsvana Pulası" + ], + "BYB": [ + "BYB", + "Yeni Beyaz Rusya Rublesi (1994–1999)" + ], + "BYN": [ + "BYN", + "Beyaz Rusya Rublesi" + ], + "BYR": [ + "BYR", + "Beyaz Rusya Rublesi (2000–2016)" + ], + "BZD": [ + "BZD", + "Belize Doları" + ], + "CAD": [ + "CA$", + "Kanada Doları" + ], + "CDF": [ + "CDF", + "Kongo Frangı" + ], + "CHE": [ + "CHE", + "WIR Avrosu" + ], + "CHF": [ + "CHF", + "İsviçre Frangı" + ], + "CHW": [ + "CHW", + "WIR Frangı" + ], + "CLE": [ + "CLE", + "Åžili Esküdosu" + ], + "CLF": [ + "CLF", + "Åžili Unidades de Fomento" + ], + "CLP": [ + "CLP", + "Åžili Pesosu" + ], + "CNX": [ + "CNX", + "Çin Halk Cumhuriyeti Merkez Bankası Doları" + ], + "CNY": [ + "CNÂ¥", + "Çin Yuanı" + ], + "COP": [ + "COP", + "Kolombiya Pesosu" + ], + "COU": [ + "COU", + "Unidad de Valor Real" + ], + "CRC": [ + "CRC", + "Kosta Rika Kolonu" + ], + "CSD": [ + "CSD", + "Eski Sırbistan Dinarı" + ], + "CSK": [ + "CSK", + "Çekoslavak Korunası (Hard)" + ], + "CUC": [ + "CUC", + "Konvertibl Küba Pesosu" + ], + "CUP": [ + "CUP", + "Küba Pesosu" + ], + "CVE": [ + "CVE", + "Cape Verde Esküdosu" + ], + "CYP": [ + "CYP", + "Güney Kıbrıs Lirası" + ], + "CZK": [ + "CZK", + "Çek Cumhuriyeti Korunası" + ], + "DDM": [ + "DDM", + "DoÄŸu Alman Markı" + ], + "DEM": [ + "DEM", + "Alman Markı" + ], + "DJF": [ + "DJF", + "Cibuti Frangı" + ], + "DKK": [ + "DKK", + "Danimarka Kronu" + ], + "DOP": [ + "DOP", + "Dominik Pesosu" + ], + "DZD": [ + "DZD", + "Cezayir Dinarı" + ], + "ECS": [ + "ECS", + "Ekvador Sukresi" + ], + "ECV": [ + "ECV", + "Ekvador Unidad de Valor Constante (UVC)" + ], + "EEK": [ + "EEK", + "Estonya Krunu" + ], + "EGP": [ + "EGP", + "Mısır Lirası" + ], + "ERN": [ + "ERN", + "Eritre Nakfası" + ], + "ESA": [ + "ESA", + "İspanyol Pezetası (A hesabı)" + ], + "ESB": [ + "ESB", + "İspanyol Pezetası (konvertibl hesap)" + ], + "ESP": [ + "ESP", + "İspanyol Pezetası" + ], + "ETB": [ + "ETB", + "Etiyopya Birri" + ], + "EUR": [ + "€", + "Euro" + ], + "FIM": [ + "FIM", + "Fin Markkası" + ], + "FJD": [ + "FJD", + "Fiji Doları" + ], + "FKP": [ + "FKP", + "Falkland Adaları Lirası" + ], + "FRF": [ + "FRF", + "Fransız Frangı" + ], + "GBP": [ + "£", + "İngiliz Sterlini" + ], + "GEK": [ + "GEK", + "Gürcistan Kupon Larisi" + ], + "GEL": [ + "GEL", + "Gürcistan Larisi" + ], + "GHC": [ + "GHC", + "Gana Sedisi (1979–2007)" + ], + "GHS": [ + "GHS", + "Gana Sedisi" + ], + "GIP": [ + "GIP", + "Cebelitarık Lirası" + ], + "GMD": [ + "GMD", + "Gambiya Dalasisi" + ], + "GNF": [ + "GNF", + "Gine Frangı" + ], + "GNS": [ + "GNS", + "Gine Sylisi" + ], + "GQE": [ + "GQE", + "Ekvator Ginesi Ekuelesi" + ], + "GRD": [ + "GRD", + "Yunan Drahmisi" + ], + "GTQ": [ + "GTQ", + "Guatemala Quetzalı" + ], + "GWE": [ + "GWE", + "Portekiz Ginesi Esküdosu" + ], + "GWP": [ + "GWP", + "Gine-Bissau Pezosu" + ], + "GYD": [ + "GYD", + "Guyana Doları" + ], + "HKD": [ + "HK$", + "Hong Kong Doları" + ], + "HNL": [ + "HNL", + "Honduras Lempirası" + ], + "HRD": [ + "HRD", + "Hırvatistan Dinarı" + ], + "HRK": [ + "HRK", + "Hırvatistan Kunası" + ], + "HTG": [ + "HTG", + "Haiti Gurdu" + ], + "HUF": [ + "HUF", + "Macar Forinti" + ], + "IDR": [ + "IDR", + "Endonezya Rupiahı" + ], + "IEP": [ + "IEP", + "İrlanda Lirası" + ], + "ILP": [ + "ILP", + "İsrail Lirası" + ], + "ILR": [ + "ILR", + "İsrail Åžekeli (1980–1985)" + ], + "ILS": [ + "₪", + "Yeni İsrail Åžekeli" + ], + "INR": [ + "₹", + "Hindistan Rupisi" + ], + "IQD": [ + "IQD", + "Irak Dinarı" + ], + "IRR": [ + "IRR", + "İran Riyali" + ], + "ISJ": [ + "ISJ", + "İzlanda Kronu (1918–1981)" + ], + "ISK": [ + "ISK", + "İzlanda Kronu" + ], + "ITL": [ + "ITL", + "İtalyan Lireti" + ], + "JMD": [ + "JMD", + "Jamaika Doları" + ], + "JOD": [ + "JOD", + "Ürdün Dinarı" + ], + "JPY": [ + "Â¥", + "Japon Yeni" + ], + "KES": [ + "KES", + "Kenya Åžilini" + ], + "KGS": [ + "KGS", + "Kırgızistan Somu" + ], + "KHR": [ + "KHR", + "Kamboçya Rieli" + ], + "KMF": [ + "KMF", + "Komorlar Frangı" + ], + "KPW": [ + "KPW", + "Kuzey Kore Wonu" + ], + "KRH": [ + "KRH", + "Güney Kore Hwanı (1953–1962)" + ], + "KRO": [ + "KRO", + "Güney Kore Wonu (1945–1953)" + ], + "KRW": [ + "â‚©", + "Güney Kore Wonu" + ], + "KWD": [ + "KWD", + "Kuveyt Dinarı" + ], + "KYD": [ + "KYD", + "Cayman Adaları Doları" + ], + "KZT": [ + "KZT", + "Kazakistan Tengesi" + ], + "LAK": [ + "LAK", + "Laos Kipi" + ], + "LBP": [ + "LBP", + "Lübnan Lirası" + ], + "LKR": [ + "LKR", + "Sri Lanka Rupisi" + ], + "LRD": [ + "LRD", + "Liberya Doları" + ], + "LSL": [ + "LSL", + "Lesotho Lotisi" + ], + "LTL": [ + "LTL", + "Litvanya Litası" + ], + "LTT": [ + "LTT", + "Litvanya Talonu" + ], + "LUC": [ + "LUC", + "Konvertibl Lüksemburg Frangı" + ], + "LUF": [ + "LUF", + "Lüksemburg Frangı" + ], + "LUL": [ + "LUL", + "Finansal Lüksemburg Frangı" + ], + "LVL": [ + "LVL", + "Letonya Latı" + ], + "LVR": [ + "LVR", + "Letonya Rublesi" + ], + "LYD": [ + "LYD", + "Libya Dinarı" + ], + "MAD": [ + "MAD", + "Fas Dirhemi" + ], + "MAF": [ + "MAF", + "Fas Frangı" + ], + "MCF": [ + "MCF", + "Monako Frangı" + ], + "MDC": [ + "MDC", + "Moldova Kuponu" + ], + "MDL": [ + "MDL", + "Moldova Leyi" + ], + "MGA": [ + "MGA", + "Madagaskar Ariarisi" + ], + "MGF": [ + "MGF", + "Madagaskar Frangı" + ], + "MKD": [ + "MKD", + "Makedonya Dinarı" + ], + "MKN": [ + "MKN", + "Makedonya Dinarı (1992–1993)" + ], + "MLF": [ + "MLF", + "Mali Frangı" + ], + "MMK": [ + "MMK", + "Myanmar Kyatı" + ], + "MNT": [ + "MNT", + "MoÄŸolistan Tugriki" + ], + "MOP": [ + "MOP", + "Makao Patakası" + ], + "MRO": [ + "MRO", + "Moritanya Ouguiyası" + ], + "MTL": [ + "MTL", + "Malta Lirası" + ], + "MTP": [ + "MTP", + "Malta Sterlini" + ], + "MUR": [ + "MUR", + "Mauritius Rupisi" + ], + "MVP": [ + "MVP", + "Maldiv Rupisi" + ], + "MVR": [ + "MVR", + "Maldiv Rufiyaası" + ], + "MWK": [ + "MWK", + "Malavi Kvaçası" + ], + "MXN": [ + "MX$", + "Meksika Pesosu" + ], + "MXP": [ + "MXP", + "Gümüş Meksika Pezosu (1861–1992)" + ], + "MXV": [ + "MXV", + "Meksika Unidad de Inversion (UDI)" + ], + "MYR": [ + "MYR", + "Malezya Ringgiti" + ], + "MZE": [ + "MZE", + "Mozambik Esküdosu" + ], + "MZM": [ + "MZM", + "Eski Mozambik Metikali" + ], + "MZN": [ + "MZN", + "Mozambik Metikali" + ], + "NAD": [ + "NAD", + "Namibya Doları" + ], + "NGN": [ + "NGN", + "Nijerya Nairası" + ], + "NIC": [ + "NIC", + "Nikaragua Kordobası (1988–1991)" + ], + "NIO": [ + "NIO", + "Nikaragua Kordobası" + ], + "NLG": [ + "NLG", + "Hollanda Florini" + ], + "NOK": [ + "NOK", + "Norveç Kronu" + ], + "NPR": [ + "NPR", + "Nepal Rupisi" + ], + "NZD": [ + "NZ$", + "Yeni Zelanda Doları" + ], + "OMR": [ + "OMR", + "Umman Riyali" + ], + "PAB": [ + "PAB", + "Panama Balboası" + ], + "PEI": [ + "PEI", + "Peru İnti" + ], + "PEN": [ + "PEN", + "Peru Nuevo Solü" + ], + "PES": [ + "PES", + "Peru Solu" + ], + "PGK": [ + "PGK", + "Papua Yeni Gine Kinası" + ], + "PHP": [ + "PHP", + "Filipinler Pesosu" + ], + "PKR": [ + "PKR", + "Pakistan Rupisi" + ], + "PLN": [ + "PLN", + "Polonya Zlotisi" + ], + "PLZ": [ + "PLZ", + "Polonya Zlotisi (1950–1995)" + ], + "PTE": [ + "PTE", + "Portekiz Esküdosu" + ], + "PYG": [ + "PYG", + "Paraguay Guaranisi" + ], + "QAR": [ + "QAR", + "Katar Riyali" + ], + "RHD": [ + "RHD", + "Rodezya Doları" + ], + "ROL": [ + "ROL", + "Eski Romen Leyi" + ], + "RON": [ + "RON", + "Romen Leyi" + ], + "RSD": [ + "RSD", + "Sırp Dinarı" + ], + "RUB": [ + "RUB", + "Rus Rublesi" + ], + "RUR": [ + "RUR", + "Rus Rublesi (1991–1998)" + ], + "RWF": [ + "RWF", + "Ruanda Frangı" + ], + "SAR": [ + "SAR", + "Suudi Arabistan Riyali" + ], + "SBD": [ + "SBD", + "Solomon Adaları Doları" + ], + "SCR": [ + "SCR", + "SeyÅŸeller Rupisi" + ], + "SDD": [ + "SDD", + "Eski Sudan Dinarı" + ], + "SDG": [ + "SDG", + "Sudan Lirası" + ], + "SDP": [ + "SDP", + "Eski Sudan Lirası" + ], + "SEK": [ + "SEK", + "İsveç Kronu" + ], + "SGD": [ + "SGD", + "Singapur Doları" + ], + "SHP": [ + "SHP", + "Saint Helena Lirası" + ], + "SIT": [ + "SIT", + "Slovenya Toları" + ], + "SKK": [ + "SKK", + "Slovak Korunası" + ], + "SLL": [ + "SLL", + "Sierra Leone Leonesi" + ], + "SOS": [ + "SOS", + "Somali Åžilini" + ], + "SRD": [ + "SRD", + "Surinam Doları" + ], + "SRG": [ + "SRG", + "Surinam Guldeni" + ], + "SSP": [ + "SSP", + "Güney Sudan Lirası" + ], + "STD": [ + "STD", + "São Tomé ve Príncipe Dobrası" + ], + "SUR": [ + "SUR", + "Sovyet Rublesi" + ], + "SVC": [ + "SVC", + "El Salvador Kolonu" + ], + "SYP": [ + "SYP", + "Suriye Lirası" + ], + "SZL": [ + "SZL", + "Svaziland Lilangenisi" + ], + "THB": [ + "฿", + "Tayland Bahtı" + ], + "TJR": [ + "TJR", + "Tacikistan Rublesi" + ], + "TJS": [ + "TJS", + "Tacikistan Somonisi" + ], + "TMM": [ + "TMM", + "Türkmenistan Manatı (1993–2009)" + ], + "TMT": [ + "TMT", + "Türkmenistan Manatı" + ], + "TND": [ + "TND", + "Tunus Dinarı" + ], + "TOP": [ + "TOP", + "Tonga PaÊ»angası" + ], + "TPE": [ + "TPE", + "Timor Esküdosu" + ], + "TRL": [ + "TRL", + "Eski Türk Lirası" + ], + "TRY": [ + "₺", + "Türk Lirası", + {} + ], + "TTD": [ + "TTD", + "Trinidad ve Tobago Doları" + ], + "TWD": [ + "NT$", + "Yeni Tayvan Doları" + ], + "TZS": [ + "TZS", + "Tanzanya Åžilini" + ], + "UAH": [ + "UAH", + "Ukrayna Grivnası" + ], + "UAK": [ + "UAK", + "Ukrayna Karbovanetz" + ], + "UGS": [ + "UGS", + "Uganda Åžilini (1966–1987)" + ], + "UGX": [ + "UGX", + "Uganda Åžilini" + ], + "USD": [ + "$", + "ABD Doları" + ], + "USN": [ + "USN", + "ABD Doları (Ertesi gün)" + ], + "USS": [ + "USS", + "ABD Doları (Aynı gün)" + ], + "UYI": [ + "UYI", + "Uruguay Peso en Unidades Indexadas" + ], + "UYP": [ + "UYP", + "Uruguay Pezosu (1975–1993)" + ], + "UYU": [ + "UYU", + "Uruguay Pesosu" + ], + "UZS": [ + "UZS", + "Özbekistan Somu" + ], + "VEB": [ + "VEB", + "Venezuela Bolivarı (1871–2008)" + ], + "VEF": [ + "VEF", + "Venezuela Bolivarı" + ], + "VND": [ + "â‚«", + "Vietnam Dongu" + ], + "VNN": [ + "VNN", + "Vietnam Dongu (1978–1985)" + ], + "VUV": [ + "VUV", + "Vanuatu Vatusu" + ], + "WST": [ + "WST", + "Samoa Talası" + ], + "XAF": [ + "FCFA", + "CFA Frangı BEAC" + ], + "XCD": [ + "EC$", + "DoÄŸu Karayip Doları" + ], + "XEU": [ + "XEU", + "Avrupa Para Birimi" + ], + "XFO": [ + "XFO", + "Fransız Altın Frangı" + ], + "XFU": [ + "XFU", + "Fransız UIC-Frangı" + ], + "XOF": [ + "CFA", + "CFA Frangı BCEAO" + ], + "XPF": [ + "CFPF", + "CFP Frangı" + ], + "XRE": [ + "XRE", + "RINET Fonları" + ], + "YDD": [ + "YDD", + "Yemen Dinarı" + ], + "YER": [ + "YER", + "Yemen Riyali" + ], + "YUD": [ + "YUD", + "Yugoslav Dinarı (Hard)" + ], + "YUM": [ + "YUM", + "Yeni Yugoslav Dinarı" + ], + "YUN": [ + "YUN", + "Konvertibl Yugoslav Dinarı" + ], + "YUR": [ + "YUR", + "İyileÅŸtirilmiÅŸ Yugoslav Dinarı (1992–1993)" + ], + "ZAL": [ + "ZAL", + "Güney Afrika Randı (finansal)" + ], + "ZAR": [ + "ZAR", + "Güney Afrika Randı" + ], + "ZMK": [ + "ZMK", + "Zambiya Kvaçası (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Zambiya Kvaçası" + ], + "ZRN": [ + "ZRN", + "Yeni Zaire Zairesi" + ], + "ZRZ": [ + "ZRZ", + "Zaire Zairesi" + ], + "ZWD": [ + "ZWD", + "Zimbabve Doları" + ], + "ZWL": [ + "ZWL", + "Zimbabve Doları (2009)" + ], + "ZWR": [ + "ZWR", + "Zimbabve Doları (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ug.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ug.json new file mode 100644 index 0000000000000000000000000000000000000000..ae1455ac93303d1d84b938d66da671a4f2d18627 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ug.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.28.76", + "Names": { + "ADP": [ + "ADP", + "ئاندورران Ù¾ÛØ³Ûتاسى" + ], + "AED": [ + "AED", + "ئەرەب بىرلەشمە خەلىپىلىكى دەرھەمى" + ], + "AFA": [ + "AFA", + "Ø¦Ø§ÙØºØ§Ù† Ø¦Ø§ÙØºØ§Ù†Ù‰ (1927–2002)" + ], + "AFN": [ + "AFN", + "Ø¦Ø§ÙØºØ§Ù† Ø¦Ø§ÙØºØ§Ù†Ù‰" + ], + "ALK": [ + "ALK", + "ئالبانىيە Ù„Ûكى (1946–1965)" + ], + "ALL": [ + "ALL", + "ئالبانىيە Ù„Ûكى" + ], + "AMD": [ + "AMD", + "ئەرمÛنىيە دىرامى" + ], + "ANG": [ + "ANG", + "گوللاندىيەگە قاراشلىق ئانتىللÛÙ† گۇلدÛنى" + ], + "AOA": [ + "AOA", + "ئانگولا كۇۋانزاسى" + ], + "AOK": [ + "AOK", + "ئانگولا كۇۋانزاسى (1977–1991)" + ], + "AON": [ + "AON", + "ئانگولا ÙŠÛÚ­Ù‰ كۇۋانزاسى (1990–2000)" + ], + "AOR": [ + "AOR", + "ئانگولا قايتا تەڭشەلگەن كۇۋانزاسى (1995–1999)" + ], + "ARA": [ + "ARA", + "ئارگÛنتىنا ئاۋسترالى" + ], + "ARL": [ + "ARL", + "ئارگÛنتىنا Ù¾ÛØ³Ùˆ Ù„Ûيى (1970–1983)" + ], + "ARM": [ + "ARM", + "ئارگÛنتىنا Ù¾ÛØ³ÙˆØ³Ù‰ (1881–1970)" + ], + "ARP": [ + "ARP", + "ئارگÛنتىنا Ù¾ÛØ³ÙˆØ³Ù‰ (1983–1985)" + ], + "ARS": [ + "ARS", + "ئارگÛنتىنا Ù¾ÛØ³ÙˆØ³Ù‰" + ], + "ATS": [ + "ATS", + "ئاۋسترىيە شىللىڭى" + ], + "AUD": [ + "A$", + "ئاۋسترالىيە دوللىرى" + ], + "AWG": [ + "AWG", + "ئارۇبان Ùىلورۇنى" + ], + "AZM": [ + "AZM", + "ئەزەربەيجان ماناتى (1993–2006)" + ], + "AZN": [ + "AZN", + "ئەزەربەيجان ماناتى" + ], + "BAD": [ + "BAD", + "بوسنىيە-Ø®ÛØ±ØªØ³Ûگوۋىنا دىنارى (1992–1994)" + ], + "BAM": [ + "BAM", + "بوسنىيە-Ø®ÛØ±ØªØ³Ûگوۋىنا ئالماشتۇرۇشچان ماركى" + ], + "BAN": [ + "BAN", + "بوسنىيە-Ø®ÛØ±ØªØ³Ûگوۋىنا ÙŠÛÚ­Ù‰ دىنارى (1994–1997)" + ], + "BBD": [ + "BBD", + "باربادوس دوللىرى" + ], + "BDT": [ + "BDT", + "باڭلادىش تاكاسى" + ], + "BEC": [ + "BEC", + "بÛلگىيە ÙØ±Ø§Ù†ÙƒÙ‰ (ئالماشتۇرۇشچان)" + ], + "BEF": [ + "BEF", + "بÛلگىيە ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "BEL": [ + "BEL", + "بÛلگىيە ÙØ±Ø§Ù†ÙƒÙ‰ (پۇل–مۇئامىلە)" + ], + "BGL": [ + "BGL", + "بۇلغارىيە قاتتىق Ù„Ûۋاسى" + ], + "BGM": [ + "BGM", + "بۇلغارىيە ئىجتىمائىي Ù„Ûۋاسى" + ], + "BGN": [ + "BGN", + "بۇلغارىيە Ù„Ûۋاسى" + ], + "BGO": [ + "BGO", + "بۇلغارىيە Ù„Ûۋاسى (1879–1952)" + ], + "BHD": [ + "BHD", + "بەھرەين دىنارى" + ], + "BIF": [ + "BIF", + "بۇرۇندى ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "BMD": [ + "BMD", + "Ø¨ÛØ±Ù…ۇدا دوللىرى" + ], + "BND": [ + "BND", + "بىرۇنÛÙŠ دوللىرى" + ], + "BOB": [ + "BOB", + "بولىۋىيە بولىۋىيانوسى" + ], + "BOL": [ + "BOL", + "بولىۋىيە بولىۋىيانوسى (1863–1963)" + ], + "BOP": [ + "BOP", + "بولىۋىيە پىسوسى" + ], + "BOV": [ + "BOV", + "بولىۋىيە مۇدولى" + ], + "BRB": [ + "BRB", + "بىرازىلىيە ÙŠÛÚ­Ù‰ ÙƒØ±Û‡Ø²ÛØ±ÙˆØ³Ù‰ (1967–1986)" + ], + "BRC": [ + "BRC", + "بىرازىلىيە كرۇزادوسى (1986–1989)" + ], + "BRE": [ + "BRE", + "بىرازىلىيە ÙŠÛÚ­Ù‰ ÙƒØ±Û‡Ø²ÛØ±ÙˆØ³Ù‰ (1990–1993)" + ], + "BRL": [ + "R$", + "بىرازىلىيە رىيالى" + ], + "BRN": [ + "BRN", + "بىرازىلىيە ÙŠÛÚ­Ù‰ كرۇزادوسى (1989–1990)" + ], + "BRR": [ + "BRR", + "بىرازىلىيە ÙƒØ±Û‡Ø²ÛØ±ÙˆØ³Ù‰ (1993–1994)" + ], + "BRZ": [ + "BRZ", + "بىرازىلىيە ÙƒØ±Û‡Ø²ÛØ±ÙˆØ³Ù‰ (1942–1967)" + ], + "BSD": [ + "BSD", + "باھاما دوللىرى" + ], + "BTN": [ + "BTN", + "بۇتان نگۇلترۇمى" + ], + "BUK": [ + "BUK", + "بىرما كىياتى" + ], + "BWP": [ + "BWP", + "بوتسۋانا پۇلاسى" + ], + "BYB": [ + "BYB", + "بÛلارۇسىيە ÙŠÛÚ­Ù‰ رۇبلىسى (1994–1999)" + ], + "BYN": [ + "BYN", + "بÛلارۇسىيە رۇبلىسى" + ], + "BYR": [ + "BYR", + "بÛلارۇسىيە رۇبلىسى (۲۰۰۰–۲۰۱۶)" + ], + "BZD": [ + "BZD", + "بÛلىز دوللىرى" + ], + "CAD": [ + "CA$", + "كانادا دوللىرى" + ], + "CDF": [ + "CDF", + "كونگو ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "CHE": [ + "CHE", + "WIR ياۋرو" + ], + "CHF": [ + "CHF", + "Ø´Ù‰Û‹ÛØªØ³Ù‰ÙŠÛ• ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "CHW": [ + "CHW", + "WIR ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "CLE": [ + "CLE", + "چىلى Ø¦ÛØ³ÙƒÛ‡Ø¯ÙˆØ³Ù‰" + ], + "CLF": [ + "CLF", + "چىلى Ú¾ÛØ³Ø§Ø¨Ø§Øª بىرلىكى (UF)" + ], + "CLP": [ + "CLP", + "چىلى Ù¾ÛØ³ÙˆØ³Ù‰" + ], + "CNX": [ + "CNX", + "جۇڭگو خەلق بانكىسى دوللىرى" + ], + "CNY": [ + "ï¿¥", + "جۇڭگو يۈەنى" + ], + "COP": [ + "COP", + "كولومبىيە Ù¾ÛØ³ÙˆØ³Ù‰" + ], + "COU": [ + "COU", + "كولومبىيە ھەقىقىي قىممەت بىرلىكى" + ], + "CRC": [ + "CRC", + "كوستارىكا كولونى" + ], + "CSD": [ + "CSD", + "Ø³ÛØ±Ø¨Ù‰ÙŠÛ• دىنارى (2002–2006)" + ], + "CSK": [ + "CSK", + "Ú†ÛØ®Ø³Ù‰Ù„وۋاكىيە قاتتىق كورۇناسى" + ], + "CUC": [ + "CUC", + "كۇبا ئالماشتۇرۇشچان Ù¾ÛØ³ÙˆØ³Ù‰" + ], + "CUP": [ + "CUP", + "كۇبا Ù¾ÛØ³ÙˆØ³Ù‰" + ], + "CVE": [ + "CVE", + "ÙŠÛØ´Ù‰Ù„ تۇمشۇق Ø¦ÛØ³ÙƒÛ‡Ø¯ÙˆØ³Ù‰" + ], + "CYP": [ + "CYP", + "سىپرۇس Ùوند Ø³ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "CZK": [ + "CZK", + "Ú†ÛØ® جۇمھۇرىيىتى كورۇناسى" + ], + "DDM": [ + "DDM", + "شەرقىي Ú¯ÛØ±Ù…انىيە ماركى" + ], + "DEM": [ + "DEM", + "Ú¯ÛØ±Ù…انىيە ماركى" + ], + "DJF": [ + "DJF", + "جىبۇتى ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "DKK": [ + "DKK", + "دانىيە كرونى" + ], + "DOP": [ + "DOP", + "دومىنىكا Ù¾ÛØ³ÙˆØ³Ù‰" + ], + "DZD": [ + "DZD", + "ئالجىرىيە دىنارى" + ], + "ECS": [ + "ECS", + "ئÛكۋادور Ø³Û‡ÙƒØ±ÛØ³Ù‰" + ], + "ECV": [ + "ECV", + "ئÛكۋادور تۇراقلىق قىممەت بىرلىكى" + ], + "EEK": [ + "EEK", + "Ø¦ÛØ³ØªÙˆÙ†Ù‰ÙŠÛ• كرۇنى" + ], + "EGP": [ + "EGP", + "مىسىر Ùوند Ø³Ù‰ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "ERN": [ + "ERN", + "Ø¦ÛØ±Ù‰ØªØ±ÛÙŠÛ• Ù†Ø§ÙƒÙØ§Ø³Ù‰" + ], + "ESA": [ + "ESA", + "ئىسپانىيە Ù¾ÛØ³Ûتاسى (A Ú¾ÛØ³Ø§Ø¨Ø§Øª)" + ], + "ESB": [ + "ESB", + "ئىسپانىيە Ù¾ÛØ³Ûتاسى (ئالماشتۇرۇش Ú¾ÛØ³Ø§Ø¨Ø§ØªÙ‰)" + ], + "ESP": [ + "ESP", + "ئىسپانىيە Ù¾ÛØ³Ûتاسى" + ], + "ETB": [ + "ETB", + "ئÛÙىيوپىيە بىررى" + ], + "EUR": [ + "€", + "ياۋرو" + ], + "FIM": [ + "FIM", + "Ùىنلاندىيە مارككاسى" + ], + "FJD": [ + "FJD", + "Ùىجى دوللىرى" + ], + "FKP": [ + "FKP", + "ÙØ§Ù„كلاند ئاراللىرى Ùوند Ø³Ù‰ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "FRF": [ + "FRF", + "Ùىرانسىيە ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "GBP": [ + "£", + "ئەنگلىيە Ùوند Ø³Ù‰ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "GEK": [ + "GEK", + "گىرۇزىيە كۇپون لارىتى" + ], + "GEL": [ + "GEL", + "گىرۇزىيە لارىسى" + ], + "GHC": [ + "GHC", + "گانا Ø³ÛØ¯Ù‰Ø³Ù‰ (1979–2007)" + ], + "GHS": [ + "GHS", + "گانا Ø³ÛØ¯Ù‰Ø³Ù‰" + ], + "GIP": [ + "GIP", + "جەبىلتارىق Ùوند Ø³Ù‰ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "GMD": [ + "GMD", + "گامبىيە دالاسى" + ], + "GNF": [ + "GNF", + "گىۋىنÛÙŠÛ• ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "GNS": [ + "GNS", + "گىۋىنÛÙŠÛ• سىلىسى" + ], + "GQE": [ + "GQE", + "ئÛكۋاتور گىۋىنÛÙŠÛ• ئÛÙƒÛ‹ÛÙ„ÛØ³Ù‰" + ], + "GRD": [ + "GRD", + "Ú¯Ù‰Ø±ÛØªØ³Ù‰ÙŠÛ• دراخماسى" + ], + "GTQ": [ + "GTQ", + "گىۋاتÛمالا ÙƒÛ‡Û‹ÛØªØ²Ø§Ù„Ù‰" + ], + "GWE": [ + "GWE", + "پورتۇگالىيە گىۋىنÛÙŠÛ• Ø¦ÛØ³ÙƒÛ‡Ø¯ÙˆØ³Ù‰" + ], + "GWP": [ + "GWP", + "گىۋىنÛÙŠÛ•-بىسسائۇ Ù¾ÛØ³ÙˆØ³Ù‰" + ], + "GYD": [ + "GYD", + "گىۋىئانا دوللىرى" + ], + "HKD": [ + "HK$", + "شياڭگاڭ دوللىرى" + ], + "HNL": [ + "HNL", + "ھوندۇراس Ù„Ûمپىراسى" + ], + "HRD": [ + "HRD", + "كىرودىيە دىنارى" + ], + "HRK": [ + "HRK", + "كىرودىيە كۇناسى" + ], + "HTG": [ + "HTG", + "ھايتى Ú¯Û‡Ø±Ø¯ÛØ³Ù‰" + ], + "HUF": [ + "HUF", + "Û‹Ûنگىرىيە ÙورÛنتى" + ], + "IDR": [ + "IDR", + "Ú¾Ù‰Ù†Ø¯ÙˆÙ†ÛØ²Ù‰ÙŠÛ• رۇپىيەسى" + ], + "IEP": [ + "IEP", + "ئىرÛلاندىيە ÙÙˆÙ†Ø¯Ø³ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "ILP": [ + "ILP", + "ئىسرائىلىيە ÙÙˆÙ†Ø¯Ø³ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "ILR": [ + "ILR", + "ئىسرائىل Ø´ÛÙƒÛلى (1980–1985)" + ], + "ILS": [ + "₪", + "ئىسرائىل ÙŠÛÚ­Ù‰ Ø´ÛÙƒÛلى" + ], + "INR": [ + "₹", + "ھىندىستان رۇپىسى" + ], + "IQD": [ + "IQD", + "ئىراق دىنارى" + ], + "IRR": [ + "IRR", + "ئىران رىيالى" + ], + "ISJ": [ + "ISJ", + "ئىسلاندىيە كروناسى (1918–1981)" + ], + "ISK": [ + "ISK", + "ئىسلاندىيە كروناسى" + ], + "ITL": [ + "ITL", + "ئىتالىيە لىراسى" + ], + "JMD": [ + "JMD", + "يامايكا دوللىرى" + ], + "JOD": [ + "JOD", + "ئىيوردانىيە دىنارى" + ], + "JPY": [ + "JPÂ¥", + "ياپونىيە ÙŠÛنى" + ], + "KES": [ + "KES", + "ÙƒÛنىيە شىللىڭى" + ], + "KGS": [ + "KGS", + "قىرغىزىستان سومى" + ], + "KHR": [ + "KHR", + "كامبودژا رىئÛلى" + ], + "KMF": [ + "KMF", + "كومورو ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "KPW": [ + "KPW", + "شىمالىي كورÛÙŠÛ• ۋونى" + ], + "KRH": [ + "KRH", + "جەنۇبىي كورÛÙŠÛ• خۋانى (1953–1962)" + ], + "KRO": [ + "KRO", + "جەنۇبىي كورÛÙŠÛ• ۋونى (1945–1953)" + ], + "KRW": [ + "â‚©", + "جەنۇبىي كورÛÙŠÛ• ۋونى" + ], + "KWD": [ + "KWD", + "كۇۋەيت دىنارى" + ], + "KYD": [ + "KYD", + "كايمان ئاراللىرى دوللىرى" + ], + "KZT": [ + "KZT", + "قازاقىستان تەڭگىسى" + ], + "LAK": [ + "LAK", + "لائوس كىپى" + ], + "LBP": [ + "LBP", + "لىۋان Ùوند Ø³Ù‰ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "LKR": [ + "LKR", + "سىرىلانكا رۇپىسى" + ], + "LRD": [ + "LRD", + "Ù„Ù‰Ø¨ÛØ±Ù‰ÙŠÛ• دوللىرى" + ], + "LSL": [ + "LSL", + "Ù„ÛØ³ÙˆØªÙˆ لوتىسى" + ], + "LTL": [ + "LTL", + "لىتۋا لىتاسى" + ], + "LTT": [ + "LTT", + "لىتۋا تالوناسى" + ], + "LUC": [ + "LUC", + "ليۇكسÛمبۇرگ ئالماشتۇرۇشچان Ù¾ÛØ³ÙˆØ³Ù‰" + ], + "LUF": [ + "LUF", + "ليۇكسÛمبۇرگ ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "LUL": [ + "LUL", + "لىيۇكسÛمبۇرگ Ù¾Û‡Ù„-مۇئامىلە ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "LVL": [ + "LVL", + "لاتۋىيە لاتى" + ], + "LVR": [ + "LVR", + "لاتۋىيە رۇبلىسى" + ], + "LYD": [ + "LYD", + "لىۋىيە دىنارى" + ], + "MAD": [ + "MAD", + "ماراكەش دىرھەمى" + ], + "MAF": [ + "MAF", + "ماراكەش ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "MCF": [ + "MCF", + "موناكو ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "MDC": [ + "MDC", + "مولدوۋا كۇپونى" + ], + "MDL": [ + "MDL", + "مولدوۋا Ù„ÛÛ‹Ù‰" + ], + "MGA": [ + "MGA", + "ماداغاسقار ئارىئارىسى" + ], + "MGF": [ + "MGF", + "ماداغاسقار ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "MKD": [ + "MKD", + "Ù…Ø§ÙƒÛØ¯ÙˆÙ†Ù‰ÙŠÛ• دىنارى" + ], + "MKN": [ + "MKN", + "Ù…Ø§ÙƒÛØ¯ÙˆÙ†Ù‰ÙŠÛ• دىنارى (1992–1993)" + ], + "MLF": [ + "MLF", + "مالى ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "MMK": [ + "MMK", + "مىيانمار كىياتى" + ], + "MNT": [ + "MNT", + "موڭغۇلىيە تۈگرىكى" + ], + "MOP": [ + "MOP", + "ئاۋمÛÙ† پاتاكاسى" + ], + "MRO": [ + "MRO", + "ماۋرىتانىيە ئۇگىيەسى" + ], + "MTL": [ + "MTL", + "مالتا لىراسى" + ], + "MTP": [ + "MTP", + "مالتا ÙÙˆÙ†Ø¯Ø³ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "MUR": [ + "MUR", + "ماۋرىتىئۇس رۇپىسى" + ], + "MVP": [ + "MVP", + "مالدىۋى رۇپىسى" + ], + "MVR": [ + "MVR", + "مالدىۋى رۇÙىياسى" + ], + "MWK": [ + "MWK", + "مالاۋى كۋاچاسى" + ], + "MXN": [ + "MX$", + "Ù…Ûكسىكا Ù¾ÛØ³ÙˆØ³Ù‰" + ], + "MXP": [ + "MXP", + "Ù…Ûكسىكا كۈمۈش Ù¾ÛØ³ÙˆØ³Ù‰ (1861–1992)" + ], + "MXV": [ + "MXV", + "Ù…Ûكسىكا مەبلەغ بىرلىكى" + ], + "MYR": [ + "MYR", + "مالايشىيا رىڭگىتى" + ], + "MZE": [ + "MZE", + "موزامبىك Ø¦ÛØ³ÙƒÛ‡Ø¯ÙˆØ³Ù‰" + ], + "MZM": [ + "MZM", + "موزامبىك Ù…ÛØªÙ‰ÙƒØ§Ù„Ù‰ (1980–2006)" + ], + "MZN": [ + "MZN", + "موزامبىك Ù…ÛØªÙ‰ÙƒØ§Ù„Ù‰" + ], + "NAD": [ + "NAD", + "نامىبىيە دوللىرى" + ], + "NGN": [ + "NGN", + "Ù†Ù‰Ú¯ÛØ±Ù‰ÙŠÛ• نايراسى" + ], + "NIC": [ + "NIC", + "Ù†Ù‰Ú¯ÛØ±Ù‰ÙŠÛ• كوردوباسى (1988–1991)" + ], + "NIO": [ + "NIO", + "Ù†Ù‰Ú¯ÛØ±Ù‰ÙŠÛ• كوردوباسى" + ], + "NLG": [ + "NLG", + "گوللاندىيە گۈلدىنى" + ], + "NOK": [ + "NOK", + "نورۋÛگىيە كرونى" + ], + "NPR": [ + "NPR", + "Ù†Ûپال رۇپىسى" + ], + "NZD": [ + "NZ$", + "ÙŠÛÚ­Ù‰ زÛلاندىيە دوللىرى" + ], + "OMR": [ + "OMR", + "ئومان رىيالى" + ], + "PAB": [ + "PAB", + "پاناما بالبوئاسى" + ], + "PEI": [ + "PEI", + "Ù¾ÛØ±Û‡ ئىنتىسى" + ], + "PEN": [ + "PEN", + "Ù¾ÛØ±Û‡ ÙŠÛÚ­Ù‰ سولى" + ], + "PES": [ + "PES", + "Ù¾ÛØ±Û‡ سولى (1863–1965)" + ], + "PGK": [ + "PGK", + "پاپۇئا ÙŠÛÚ­Ù‰ گىۋىنÛÙŠÛ• كىناسى" + ], + "PHP": [ + "PHP", + "Ùىلىپپىن Ù¾ÛØ³ÙˆØ³Ù‰" + ], + "PKR": [ + "PKR", + "پاكىستان رۇپىسى" + ], + "PLN": [ + "PLN", + "پولشا زىلوتى" + ], + "PLZ": [ + "PLZ", + "پولشا زىلوتى (1950–1995)" + ], + "PTE": [ + "PTE", + "پورتۇگالىيە Ø¦ÛØ³ÙƒÛ‡Ø¯ÙˆØ³Ù‰" + ], + "PYG": [ + "PYG", + "پاراگۋاي گۇئارانىسى" + ], + "QAR": [ + "QAR", + "قاتار رىيالى" + ], + "RHD": [ + "RHD", + "Ø±ÙˆØ¯ÛØ²Ù‰ÙŠÛ• دوللىرى" + ], + "ROL": [ + "ROL", + "رۇمىنىيە Ù„Ûيى (1952–2006)" + ], + "RON": [ + "RON", + "رۇمىنىيە Ù„Ûيى" + ], + "RSD": [ + "RSD", + "Ø³ÛØ±Ø¨Ù‰ÙŠÛ• دىنارى" + ], + "RUB": [ + "RUB", + "رۇسىيە رۇبلىسى" + ], + "RUR": [ + "RUR", + "رۇسىيە رۇبلىسى (1991–1998)" + ], + "RWF": [ + "RWF", + "رۋاندا ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "SAR": [ + "SAR", + "سەئۇدى رىيالى" + ], + "SBD": [ + "SBD", + "سولومون ئاراللىرى دوللىرى" + ], + "SCR": [ + "SCR", + "سÛيشÛÙ„ رۇپىسى" + ], + "SDD": [ + "SDD", + "سۇدان دىنارى (1992–2007)" + ], + "SDG": [ + "SDG", + "سۇدان ÙÙˆÙ†Ø¯Ø³ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "SDP": [ + "SDP", + "سۇدان ÙÙˆÙ†Ø¯Ø³ØªÛØ±Ù„Ù‰Ú­Ù‰ (1957–1998)" + ], + "SEK": [ + "SEK", + "Ø´Ù‰Û‹ÛØªØ³Ù‰ÙŠÛ• كروناسى" + ], + "SGD": [ + "SGD", + "سىنگاپور دوللىرى" + ], + "SHP": [ + "SHP", + "ساينىت-Ú¾ÛÙ„Ûنا ÙÙˆÙ†Ø¯Ø³ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "SIT": [ + "SIT", + "سىلوۋÛنىيە تولارى" + ], + "SKK": [ + "SKK", + "سىلوۋاكىيە كورۇناسى" + ], + "SLL": [ + "SLL", + "Ø³ÛØ±Ø±Ø§Ù„ÛØ¦ÙˆÙ† Ù„ÛØ¦ÙˆÙ†Ûسى" + ], + "SOS": [ + "SOS", + "سومالى شىللىڭى" + ], + "SRD": [ + "SRD", + "سۇرىنام دوللىرى" + ], + "SRG": [ + "SRG", + "سۇرىنام گۈلدىنى" + ], + "SSP": [ + "SSP", + "جەنۇبىي سۇدان ÙÙˆÙ†Ø¯Ø³ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "STD": [ + "STD", + "سان-ØªÙˆÙ…Û Û‹Û• پىرىنسىپى دوبراسى" + ], + "SUR": [ + "SUR", + "سوۋىت رۇبلىسى" + ], + "SVC": [ + "SVC", + "سالۋادور كولونى" + ], + "SYP": [ + "SYP", + "سۈرىيە ÙÙˆÙ†Ø¯Ø³ØªÛØ±Ù„Ù‰Ú­Ù‰" + ], + "SZL": [ + "SZL", + "Ø³Ù‰Û‹ÛØ²Ù‰Ù„اند لىلانگÛنى" + ], + "THB": [ + "THB", + "تايلاند باختى" + ], + "TJR": [ + "TJR", + "تاجىكىستان رۇبلىسى" + ], + "TJS": [ + "TJS", + "تاجىكىستان سومونىسى" + ], + "TMM": [ + "TMM", + "تۈركمەنىستان ماناتى (1993–2009)" + ], + "TMT": [ + "TMT", + "تۈركمەنىستان ماناتى" + ], + "TND": [ + "TND", + "تۇنىس دىنارى" + ], + "TOP": [ + "TOP", + "تونگا پائانگاسى" + ], + "TPE": [ + "TPE", + "تىمور Ø¦ÛØ³ÙƒÛ‡Ø¯ÙˆØ³Ù‰" + ], + "TRL": [ + "TRL", + "تۈركىيە لىراسى (1922–2005)" + ], + "TRY": [ + "TRY", + "تۈركىيە لىراسى" + ], + "TTD": [ + "TTD", + "تىرىنىداد Û‹Û• توباگو دوللىرى" + ], + "TWD": [ + "NT$", + "ÙŠÛÚ­Ù‰ تەيۋەن دوللىرى" + ], + "TZS": [ + "TZS", + "تانزانىيە شىللىڭى" + ], + "UAH": [ + "UAH", + "ئۇكرائىنا خرىۋناسى" + ], + "UAK": [ + "UAK", + "ئۇكرائىنا ÙƒØ§Ø±Ø¨ÙˆÛ‹Ø§Ù†ÛØªØ³Ù‰" + ], + "UGS": [ + "UGS", + "ئۇگاندا شىللىڭى (1966–1987)" + ], + "UGX": [ + "UGX", + "ئۇگاندا شىللىڭى" + ], + "USD": [ + "$", + "Ø¦Ø§Ù…ÛØ±Ù‰ÙƒØ§ دوللىرى" + ], + "USN": [ + "USN", + "Ø¦Ø§Ù…ÛØ±Ù‰ÙƒØ§ دوللىرى (ÙƒÛيىنكى ÙƒÛˆÙ†)" + ], + "USS": [ + "USS", + "Ø¦Ø§Ù…ÛØ±Ù‰ÙƒØ§ دوللىرى (ئوخشاش ÙƒÛˆÙ†)" + ], + "UYI": [ + "UYI", + "ئۇرۇگۋاي Ù¾ÛØ³ÙˆØ³Ù‰ (ئىندÛكىسلاش بىرلىكى)" + ], + "UYP": [ + "UYP", + "ئۇرۇگۋاي Ù¾ÛØ³ÙˆØ³Ù‰ (1975–1993)" + ], + "UYU": [ + "UYU", + "ئۇرۇگۋاي Ù¾ÛØ³ÙˆØ³Ù‰" + ], + "UZS": [ + "UZS", + "ئۆزبÛكىستان سومى" + ], + "VEB": [ + "VEB", + "Û‹ÛÙ†ÛØ²Û‡Ø¦Ûلا بولىۋارى (1871–2008)" + ], + "VEF": [ + "VEF", + "Û‹ÛÙ†ÛØ²Û‡Ø¦Ûلا بولىۋارى" + ], + "VND": [ + "â‚«", + "Û‹Ù‰ÙŠÛØªÙ†Ø§Ù… دوڭى" + ], + "VNN": [ + "VNN", + "Û‹Ù‰ÙŠÛØªÙ†Ø§Ù… دوڭى (1978–1985)" + ], + "VUV": [ + "VUV", + "ۋانۇئاتۇ ۋاتۇسى" + ], + "WST": [ + "WST", + "ساموئا تالاسى" + ], + "XAF": [ + "FCFA", + "Ø¦Ø§ÙØ±Ù‰Ù‚ا قىتئەسى Ù¾Û‡Ù„-مۇئامىلە ئىتتىپاقى ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "XCD": [ + "EC$", + "شەرقىي كارىب دوللىرى" + ], + "XEU": [ + "XEU", + "ياۋروپا Ù¾Û‡Ù„ بىرلىكى" + ], + "XFO": [ + "XFO", + "Ùىرانسىيە ئالتۇن ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "XFU": [ + "XFU", + "Ùىرانسىيە UIC ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "XOF": [ + "CFA", + "Ø¦Ø§ÙØ±Ù‰Ù‚ا قىتئەسى Ù¾Û‡Ù„-مۇئامىلە ئىتتىپاقى ÙØ±Ø§Ù†ÙƒÙ‰ (BCEAO)" + ], + "XPF": [ + "CFPF", + "تىنچ ئوكيان Ù¾Û‡Ù„-مۇئامىلە ئورتاق گەۋدىسى ÙØ±Ø§Ù†ÙƒÙ‰" + ], + "XRE": [ + "XRE", + "RINET Ùوندى" + ], + "YDD": [ + "YDD", + "ÙŠÛ•Ù…Û•Ù† دىنارى" + ], + "YER": [ + "YER", + "ÙŠÛ•Ù…Û•Ù† رىيالى" + ], + "YUD": [ + "YUD", + "يۇگوسلاۋىيە قاتتىق دىنارى (1966–1990)" + ], + "YUM": [ + "YUM", + "يۇگوسلاۋىيە ÙŠÛÚ­Ù‰ دىنارى (1994–2002)" + ], + "YUN": [ + "YUN", + "يۇگوسلاۋىيە ئالماشتۇرۇشچان دىنارى (1990–1992)" + ], + "YUR": [ + "YUR", + "يۇگوسلاۋىيە ئىسلاھات دىنارى (1992–1993)" + ], + "ZAL": [ + "ZAL", + "جەنۇبىي Ø¦Ø§ÙØ±Ù‰Ù‚ا راندى (پۇل–مۇئامىلە)" + ], + "ZAR": [ + "ZAR", + "جەنۇبىي Ø¦Ø§ÙØ±Ù‰Ù‚ا راندى" + ], + "ZMK": [ + "ZMK", + "زامبىيە كۋاچاسى (1968–2012)" + ], + "ZMW": [ + "ZMW", + "زامبىيە كۋاچاسى" + ], + "ZRN": [ + "ZRN", + "زايىر ÙŠÛÚ­Ù‰ زايىرى (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "زايىر زايىرى (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Ø²Ù‰Ù…Ø¨Ø§Ø¨Û‹Û Ø¯ÙˆÙ„Ù„Ù‰Ø±Ù‰ (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Ø²Ù‰Ù…Ø¨Ø§Ø¨Û‹Û Ø¯ÙˆÙ„Ù„Ù‰Ø±Ù‰ (2009)" + ], + "ZWR": [ + "ZWR", + "Ø²Ù‰Ù…Ø¨Ø§Ø¨Û‹Û Ø¯ÙˆÙ„Ù„Ù‰Ø±Ù‰ (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/uk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/uk.json new file mode 100644 index 0000000000000000000000000000000000000000..7b27577f68f44846ff4efa850e558f3b4fcdc718 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/uk.json @@ -0,0 +1,1061 @@ +{ + "Version": "2.1.29.38", + "Names": { + "ADP": [ + "ADP", + "андоррÑька пеÑета" + ], + "AED": [ + "AED", + "дирхам ОÐЕ" + ], + "AFA": [ + "AFA", + "афгані (1927–2002)" + ], + "AFN": [ + "AFN", + "афганÑький афгані" + ], + "ALL": [ + "ALL", + "албанÑький лек" + ], + "AMD": [ + "AMD", + "вірменÑький драм" + ], + "ANG": [ + "ANG", + "нідерландÑький антильÑький гульден" + ], + "AOA": [ + "AOA", + "ангольÑька кванза" + ], + "AOK": [ + "AOK", + "ангольÑька кванза (1977–1990)" + ], + "AON": [ + "AON", + "ангольÑька нова кванза (1990–2000)" + ], + "AOR": [ + "AOR", + "ангольÑька кванза реаджаÑтадо (1995–1999)" + ], + "ARA": [ + "ARA", + "аргентинÑький авÑтрал" + ], + "ARP": [ + "ARP", + "аргентинÑький пеÑо (1983–1985)" + ], + "ARS": [ + "ARS", + "аргентинÑький пеÑо" + ], + "ATS": [ + "ATS", + "авÑтрійÑький шилінг" + ], + "AUD": [ + "AUD", + "авÑтралійÑький долар" + ], + "AWG": [ + "AWG", + "арубÑький флорин" + ], + "AZM": [ + "AZM", + "азербайджанÑький манат (1993–2006)" + ], + "AZN": [ + "AZN", + "азербайджанÑький манат" + ], + "BAD": [ + "BAD", + "динар (БоÑÐ½Ñ–Ñ Ñ– Герцеговина)" + ], + "BAM": [ + "BAM", + "конвертована марка БоÑнії Ñ– Герцеговини" + ], + "BBD": [ + "BBD", + "барбадоÑький долар" + ], + "BDT": [ + "BDT", + "бангладеÑька така" + ], + "BEC": [ + "BEC", + "бельгійÑький франк (конвертований)" + ], + "BEF": [ + "BEF", + "бельгійÑький франк" + ], + "BEL": [ + "BEL", + "бельгійÑький франк (фінанÑовий)" + ], + "BGL": [ + "BGL", + "болгарÑький твердий лев" + ], + "BGN": [ + "BGN", + "болгарÑький лев" + ], + "BHD": [ + "BHD", + "бахрейнÑький динар" + ], + "BIF": [ + "BIF", + "бурундійÑький франк" + ], + "BMD": [ + "BMD", + "бермудÑький долар" + ], + "BND": [ + "BND", + "брунейÑький долар" + ], + "BOB": [ + "BOB", + "болівійÑький болівіано" + ], + "BOP": [ + "BOP", + "болівійÑьке пеÑо" + ], + "BOV": [ + "BOV", + "болівійÑький мвдол" + ], + "BRB": [ + "BRB", + "бразильÑьке нове крузейро (1967–1986)" + ], + "BRC": [ + "BRC", + "бразильÑьке крузадо" + ], + "BRE": [ + "BRE", + "бразильÑьке крузейро (1990–1993)" + ], + "BRL": [ + "BRL", + "бразильÑький реал" + ], + "BRN": [ + "BRN", + "бразильÑьке нове крузадо" + ], + "BRR": [ + "BRR", + "бразильÑьке крузейро" + ], + "BSD": [ + "BSD", + "багамÑький долар" + ], + "BTN": [ + "BTN", + "бутанÑький нгултрум" + ], + "BUK": [ + "BUK", + "бірманÑький кіат" + ], + "BWP": [ + "BWP", + "ботÑванÑька пула" + ], + "BYB": [ + "BYB", + "білоруÑький новий рубль (1994–1999)" + ], + "BYN": [ + "BYN", + "білоруÑький рубль" + ], + "BYR": [ + "BYR", + "білоруÑький рубль (2000–2016)" + ], + "BZD": [ + "BZD", + "белізький долар" + ], + "CAD": [ + "CAD", + "канадÑький долар" + ], + "CDF": [ + "CDF", + "конголезький франк" + ], + "CHE": [ + "CHE", + "євро WIR" + ], + "CHF": [ + "CHF", + "швейцарÑький франк" + ], + "CHW": [ + "CHW", + "франк WIR" + ], + "CLF": [ + "CLF", + "чилійÑький ÑŽÐ½Ñ–Ð´Ð°Ð´ÐµÑ Ð´Ðµ фоменто" + ], + "CLP": [ + "CLP", + "чилійÑький пеÑо" + ], + "CNY": [ + "CNY", + "китайÑький юань" + ], + "COP": [ + "COP", + "колумбійÑький пеÑо" + ], + "COU": [ + "COU", + "Ð¾Ð´Ð¸Ð½Ð¸Ñ†Ñ Ñ€ÐµÐ°Ð»ÑŒÐ½Ð¾Ñ— вартоÑті" + ], + "CRC": [ + "CRC", + "коÑтариканÑький колон" + ], + "CSD": [ + "CSD", + "Ñтарий ÑербÑький динар" + ], + "CSK": [ + "CSK", + "чехоÑловацька тверда крона" + ], + "CUC": [ + "CUC", + "кубинÑький конвертований пеÑо" + ], + "CUP": [ + "CUP", + "кубинÑький пеÑо" + ], + "CVE": [ + "CVE", + "еÑкудо Кабо-Верде" + ], + "CYP": [ + "CYP", + "кіпрÑький фунт" + ], + "CZK": [ + "CZK", + "чеÑька крона" + ], + "DDM": [ + "DDM", + "марка ÐДР" + ], + "DEM": [ + "DEM", + "німецька марка" + ], + "DJF": [ + "DJF", + "джибутійÑький франк" + ], + "DKK": [ + "DKK", + "данÑька крона" + ], + "DOP": [ + "DOP", + "домініканÑький пеÑо" + ], + "DZD": [ + "DZD", + "алжирÑький динар" + ], + "ECS": [ + "ECS", + "еквадорÑький Ñукре" + ], + "ECV": [ + "ECV", + "еквадорÑький юнідад де валор конÑтанте" + ], + "EEK": [ + "EEK", + "еÑтонÑька крона" + ], + "EGP": [ + "EGP", + "єгипетÑький фунт" + ], + "ERN": [ + "ERN", + "еритрейÑька накфа" + ], + "ESA": [ + "ESA", + "Ñ–ÑпанÑька пеÑета (\"Ð\" рахунок)" + ], + "ESB": [ + "ESB", + "Ñ–ÑпанÑька пеÑета (конвертовані рахунки)" + ], + "ESP": [ + "ESP", + "Ñ–ÑпанÑька пеÑета" + ], + "ETB": [ + "ETB", + "ефіопÑький бир" + ], + "EUR": [ + "EUR", + "євро" + ], + "FIM": [ + "FIM", + "фінлÑндÑька марка" + ], + "FJD": [ + "FJD", + "фіджійÑький долар" + ], + "FKP": [ + "FKP", + "фунт ФолклендÑьких оÑтровів" + ], + "FRF": [ + "FRF", + "французький франк" + ], + "GBP": [ + "GBP", + "англійÑький фунт" + ], + "GEK": [ + "GEK", + "грузинÑький купон" + ], + "GEL": [ + "GEL", + "грузинÑький ларі" + ], + "GHC": [ + "GHC", + "ганÑький Ñеді (1979–2007)" + ], + "GHS": [ + "GHS", + "ганÑький Ñеді" + ], + "GIP": [ + "GIP", + "гібралтарÑький фунт" + ], + "GMD": [ + "GMD", + "гамбійÑький далаÑÑ–" + ], + "GNF": [ + "GNF", + "гвінейÑький франк" + ], + "GNS": [ + "GNS", + "гвінейÑьке Ñілі" + ], + "GQE": [ + "GQE", + "еквеле (Екваторіальна ÒвінеÑ)" + ], + "GRD": [ + "GRD", + "грецька драхма" + ], + "GTQ": [ + "GTQ", + "гватемальÑький кетÑаль" + ], + "GWE": [ + "GWE", + "еÑкудо португальÑької гвінеї" + ], + "GWP": [ + "GWP", + "пеÑо Гвінеї-БіÑау" + ], + "GYD": [ + "GYD", + "гаÑнÑький долар" + ], + "HKD": [ + "HKD", + "гонконгÑький долар" + ], + "HNL": [ + "HNL", + "гондураÑька лемпіра" + ], + "HRD": [ + "HRD", + "хорватÑький динар" + ], + "HRK": [ + "HRK", + "хорватÑька куна" + ], + "HTG": [ + "HTG", + "гаїтÑнÑький гурд" + ], + "HUF": [ + "HUF", + "угорÑький форинт" + ], + "IDR": [ + "IDR", + "індонезійÑька рупіÑ" + ], + "IEP": [ + "IEP", + "ірландÑький фунт" + ], + "ILP": [ + "ILP", + "ізраїльÑький фунт" + ], + "ILS": [ + "ILS", + "ізраїльÑький новий шекель" + ], + "INR": [ + "INR", + "індійÑька рупіÑ" + ], + "IQD": [ + "IQD", + "іракÑький динар" + ], + "IRR": [ + "IRR", + "іранÑький ріал" + ], + "ISK": [ + "ISK", + "Ñ–ÑландÑька крона" + ], + "ITL": [ + "ITL", + "італійÑька ліра" + ], + "JMD": [ + "JMD", + "ÑмайÑький долар" + ], + "JOD": [ + "JOD", + "йорданÑький динар" + ], + "JPY": [ + "Â¥", + "ÑпонÑька єна" + ], + "KES": [ + "KES", + "кенійÑький шилінг" + ], + "KGS": [ + "KGS", + "киргизький Ñом" + ], + "KHR": [ + "KHR", + "камбоджійÑький рієль" + ], + "KMF": [ + "KMF", + "коморÑький франк" + ], + "KPW": [ + "KPW", + "північнокорейÑький вон" + ], + "KRW": [ + "KRW", + "південнокорейÑький вон" + ], + "KWD": [ + "KWD", + "кувейтÑький динар" + ], + "KYD": [ + "KYD", + "долар Кайманових оÑтровів" + ], + "KZT": [ + "KZT", + "казахÑтанÑький тенге" + ], + "LAK": [ + "LAK", + "лаоÑький кіп" + ], + "LBP": [ + "LBP", + "ліванÑький фунт" + ], + "LKR": [ + "LKR", + "шрі-ланкійÑька рупіÑ" + ], + "LRD": [ + "LRD", + "ліберійÑький долар" + ], + "LSL": [ + "LSL", + "леÑотÑький лоті" + ], + "LTL": [ + "LTL", + "литовÑький літ" + ], + "LTT": [ + "LTT", + "литовÑький талон" + ], + "LUC": [ + "LUC", + "люкÑембурґÑький франк (конвертований)" + ], + "LUF": [ + "LUF", + "люкÑембурзький франк" + ], + "LUL": [ + "LUL", + "люкÑембурґÑький франк (фінанÑовий)" + ], + "LVL": [ + "LVL", + "латвійÑький лат" + ], + "LVR": [ + "LVR", + "латвійÑький рубль" + ], + "LYD": [ + "LYD", + "лівійÑький динар" + ], + "MAD": [ + "MAD", + "марокканÑький дирхам" + ], + "MAF": [ + "MAF", + "марокканÑький франк" + ], + "MDL": [ + "MDL", + "молдовÑький лей" + ], + "MGA": [ + "MGA", + "малагаÑійÑький аріарі" + ], + "MGF": [ + "MGF", + "мадагаÑкарÑький франк" + ], + "MKD": [ + "MKD", + "македонÑький денар" + ], + "MLF": [ + "MLF", + "малійÑький франк" + ], + "MMK": [ + "MMK", + "кʼÑÑ‚ МʼÑнми" + ], + "MNT": [ + "MNT", + "монгольÑький тугрик" + ], + "MOP": [ + "MOP", + "патака Макао" + ], + "MRO": [ + "MRO", + "мавританÑька угіÑ" + ], + "MTL": [ + "MTL", + "мальтійÑька ліра" + ], + "MTP": [ + "MTP", + "мальтійÑький фунт" + ], + "MUR": [ + "MUR", + "маврикійÑька рупіÑ" + ], + "MVR": [ + "MVR", + "мальдівÑька руфіÑ" + ], + "MWK": [ + "MWK", + "малавійÑька квача" + ], + "MXN": [ + "MXN", + "мекÑиканÑький пеÑо" + ], + "MXP": [ + "MXP", + "мекÑиканÑьке Ñрібне пеÑо (1861–1992)" + ], + "MXV": [ + "MXV", + "мекÑиканÑький юнідад де інверÑіон" + ], + "MYR": [ + "MYR", + "малайзійÑький рингіт" + ], + "MZE": [ + "MZE", + "мозамбіцький еÑкудо" + ], + "MZM": [ + "MZM", + "Ñтарий мозамбіцький метикал" + ], + "MZN": [ + "MZN", + "мозамбіцький метикал" + ], + "NAD": [ + "NAD", + "намібійÑький долар" + ], + "NGN": [ + "NGN", + "нігерійÑька найра" + ], + "NIC": [ + "NIC", + "нікарагуанÑька кордоба (1988–1991)" + ], + "NIO": [ + "NIO", + "нікарагуанÑька кордоба" + ], + "NLG": [ + "NLG", + "нідерландÑький гульден" + ], + "NOK": [ + "NOK", + "норвезька крона" + ], + "NPR": [ + "NPR", + "непальÑька рупіÑ" + ], + "NZD": [ + "NZD", + "новозеландÑький долар" + ], + "OMR": [ + "OMR", + "оманÑький ріал" + ], + "PAB": [ + "PAB", + "панамÑька бальбоа" + ], + "PEI": [ + "PEI", + "перуанÑький інті" + ], + "PEN": [ + "PEN", + "перуанÑький новий Ñол" + ], + "PES": [ + "PES", + "перуанÑький Ñол" + ], + "PGK": [ + "PGK", + "кіна Папуа Ðової Гвінеї" + ], + "PHP": [ + "PHP", + "філіппінÑький пеÑо" + ], + "PKR": [ + "PKR", + "пакиÑтанÑька рупіÑ" + ], + "PLN": [ + "PLN", + "польÑький злотий" + ], + "PLZ": [ + "PLZ", + "польÑький злотий (1950–1995)" + ], + "PTE": [ + "PTE", + "португальÑький еÑкудо" + ], + "PYG": [ + "PYG", + "парагвайÑький гуарані" + ], + "QAR": [ + "QAR", + "катарÑький ріал" + ], + "RHD": [ + "RHD", + "родезійÑький долар" + ], + "ROL": [ + "ROL", + "Ñтарий румунÑький лей" + ], + "RON": [ + "RON", + "румунÑький лей" + ], + "RSD": [ + "RSD", + "ÑербÑький динар" + ], + "RUB": [ + "RUB", + "роÑійÑький рубль" + ], + "RUR": [ + "RUR", + "роÑійÑький рубль (1991–1998)" + ], + "RWF": [ + "RWF", + "руандійÑький франк" + ], + "SAR": [ + "SAR", + "ÑаудівÑький ріал" + ], + "SBD": [ + "SBD", + "долар Соломонових ОÑтровів" + ], + "SCR": [ + "SCR", + "ÑейшельÑька рупіÑ" + ], + "SDD": [ + "SDD", + "ÑуданÑький динар" + ], + "SDG": [ + "SDG", + "ÑуданÑький фунт" + ], + "SDP": [ + "SDP", + "Ñтарий ÑуданÑький фунт" + ], + "SEK": [ + "SEK", + "шведÑька крона" + ], + "SGD": [ + "SGD", + "ÑінгапурÑький долар" + ], + "SHP": [ + "SHP", + "фунт оÑтрова СвÑтої Єлени" + ], + "SIT": [ + "SIT", + "ÑловенÑький толар" + ], + "SKK": [ + "SKK", + "Ñловацька крона" + ], + "SLL": [ + "SLL", + "леоне Сьєрра-Леоне" + ], + "SOS": [ + "SOS", + "ÑомалійÑький шилінг" + ], + "SRD": [ + "SRD", + "ÑуринамÑький долар" + ], + "SRG": [ + "SRG", + "ÑуринамÑький гульден" + ], + "SSP": [ + "SSP", + "південноÑуданÑький фунт" + ], + "STD": [ + "STD", + "добра Сан-Томе Ñ– ПринÑіпі" + ], + "SUR": [ + "SUR", + "радÑнÑький рубль" + ], + "SVC": [ + "SVC", + "ÑальвадорÑький колон" + ], + "SYP": [ + "SYP", + "ÑирійÑький фунт" + ], + "SZL": [ + "SZL", + "ÑвазілендÑький лілангені" + ], + "THB": [ + "THB", + "таїландÑький бат" + ], + "TJR": [ + "TJR", + "таджицький рубль" + ], + "TJS": [ + "TJS", + "таджицький Ñомоні" + ], + "TMM": [ + "TMM", + "туркменÑький манат (1993–2009)" + ], + "TMT": [ + "TMT", + "туркменÑький манат" + ], + "TND": [ + "TND", + "туніÑький динар" + ], + "TOP": [ + "TOP", + "тонганÑька паанга" + ], + "TPE": [ + "TPE", + "тіморÑький еÑкудо" + ], + "TRL": [ + "TRL", + "турецька ліра (1922–2005)" + ], + "TRY": [ + "TRY", + "турецька ліра" + ], + "TTD": [ + "TTD", + "долар Тринідаду Ñ– Тобаго" + ], + "TWD": [ + "TWD", + "новий тайванÑький долар" + ], + "TZS": [ + "TZS", + "танзанійÑький шилінг" + ], + "UAH": [ + "â‚´", + "українÑька гривнÑ" + ], + "UAK": [ + "крб.", + "українÑький карбованець" + ], + "UGS": [ + "UGS", + "угандійÑький шилінг (1966–1987)" + ], + "UGX": [ + "UGX", + "угандійÑький шилінг" + ], + "USD": [ + "USD", + "долар СШÐ" + ], + "USN": [ + "USN", + "долар СШР(наÑтупного днÑ)" + ], + "USS": [ + "USS", + "долар СШР(цього днÑ)" + ], + "UYI": [ + "UYI", + "уругвайÑький пеÑо в індекÑованих одиницÑÑ…" + ], + "UYP": [ + "UYP", + "уругвайÑьке пеÑо (1975–1993)" + ], + "UYU": [ + "UYU", + "уругвайÑький пеÑо" + ], + "UZS": [ + "UZS", + "узбецький Ñум" + ], + "VEB": [ + "VEB", + "венеÑуельÑький болівар (1871–2008)" + ], + "VEF": [ + "VEF", + "венеÑуельÑький болівар" + ], + "VND": [ + "VND", + "вʼєтнамÑький донг" + ], + "VUV": [ + "VUV", + "вануатÑький вату" + ], + "WST": [ + "WST", + "ÑамоанÑька тала" + ], + "XAF": [ + "FCFA", + "центральноафриканÑький франк" + ], + "XCD": [ + "XCD", + "ÑхіднокарибÑький долар" + ], + "XEU": [ + "XEU", + "європейÑька валютна одиницÑ" + ], + "XFO": [ + "XFO", + "французький золотий франк" + ], + "XFU": [ + "XFU", + "французький франк UIC" + ], + "XOF": [ + "CFA", + "західноафриканÑький франк" + ], + "XPF": [ + "CFPF", + "французький тихоокеанÑький франк" + ], + "XRE": [ + "XRE", + "фонди RINET" + ], + "YDD": [ + "YDD", + "єменÑький динар" + ], + "YER": [ + "YER", + "єменÑький ріал" + ], + "YUD": [ + "YUD", + "югоÑлавÑький твердий динар" + ], + "YUM": [ + "YUM", + "югоÑлавÑький новий динар" + ], + "YUN": [ + "YUN", + "югоÑлавÑький конвертований динар" + ], + "ZAL": [ + "ZAL", + "південноафриканÑький фінанÑовий ранд" + ], + "ZAR": [ + "ZAR", + "південноафриканÑький ранд" + ], + "ZMK": [ + "ZMK", + "замбійÑька квача (1968–2012)" + ], + "ZMW": [ + "ZMW", + "замбійÑька квача" + ], + "ZRN": [ + "ZRN", + "заїрÑький новий заїр" + ], + "ZRZ": [ + "ZRZ", + "заїрÑький заїр" + ], + "ZWD": [ + "ZWD", + "зімбабвійÑький долар" + ], + "ZWL": [ + "ZWL", + "зімбабвійÑький долар (2009)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ur.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ur.json new file mode 100644 index 0000000000000000000000000000000000000000..17d4e257df2a6cfa3ab12d1b63118c7cb6189ce9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ur.json @@ -0,0 +1,661 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AED": [ + "AED", + "Ù…ØªØ­Ø¯Û Ø¹Ø±Ø¨ اماراتی درÛÙ…" + ], + "AFN": [ + "AFN", + "Ø§ÙØºØ§Ù† Ø§ÙØºØ§Ù†ÛŒ" + ], + "ALL": [ + "ALL", + "البانیا کا لیک" + ], + "AMD": [ + "AMD", + "آرمینیائی ڈرم" + ], + "ANG": [ + "ANG", + "نیدر لینڈز انٹیلیئن گلڈر" + ], + "AOA": [ + "AOA", + "انگولا کا کوانزا" + ], + "ARS": [ + "ARS", + "ارجنٹائن پیسÛ" + ], + "AUD": [ + "A$", + "آسٹریلین ڈالر" + ], + "AWG": [ + "AWG", + "اروبن ÙلورÙÙ†" + ], + "AZN": [ + "AZN", + "آذربائجانی منات" + ], + "BAM": [ + "BAM", + "بوسنیا ÛØ±Ø²ÛŒÚ¯ÙˆÙˆÛŒÙ†Ø§ کا قابل منتقلی نشان" + ], + "BBD": [ + "BBD", + "باربیڈین ڈالر" + ], + "BDT": [ + "BDT", + "Ø¨Ù†Ú¯Ù„Û Ø¯ÛŒØ´ÛŒ ٹکا" + ], + "BGN": [ + "BGN", + "بلغارین لیو" + ], + "BHD": [ + "BHD", + "بحرینی دینار" + ], + "BIF": [ + "BIF", + "برونڈیئن ÙØ±Ø§Ù†Ú©" + ], + "BMD": [ + "BMD", + "برموڈا ڈالر" + ], + "BND": [ + "BND", + "برونئی ڈالر" + ], + "BOB": [ + "BOB", + "بولیوین بولیویانو" + ], + "BRL": [ + "R$", + "برازیلی ریئل" + ], + "BSD": [ + "BSD", + "Ø¨ÛØ§Ù…انی ڈالر" + ], + "BTN": [ + "BTN", + "بھوٹانی Ú¯Ùلٹرم" + ], + "BWP": [ + "BWP", + "بوتسوانا کا پولا" + ], + "BYN": [ + "BYN", + "بیلاروسی روبل" + ], + "BYR": [ + "BYR", + "بیلاروسی روبل (۲۰۰۰–۲۰۱۶)" + ], + "BZD": [ + "BZD", + "بیلائز ڈالر" + ], + "CAD": [ + "CA$", + "کنیڈین ڈالر" + ], + "CDF": [ + "CDF", + "کانگولیز ÙØ±Ø§Ù†Ú©" + ], + "CHF": [ + "CHF", + "سوئس ÙØ±Ø§Ù†Ú©Ø³" + ], + "CLP": [ + "CLP", + "چلّین پیسÛ" + ], + "CNY": [ + "CNÂ¥", + "چینی یوآن" + ], + "COP": [ + "COP", + "کولمبین پیسÛ" + ], + "CRC": [ + "CRC", + "کوسٹا ریکا کا کولن" + ], + "CUC": [ + "CUC", + "کیوبا کا قابل منتقلی پیسو" + ], + "CUP": [ + "CUP", + "کیوبا کا پیسو" + ], + "CVE": [ + "CVE", + "کیپ ورڈی کا اسکیوڈو" + ], + "CZK": [ + "CZK", + "جمÛÙˆØ±ÛŒÛ Ú†ÛŒÚ© کرونا" + ], + "DEM": [ + "DEM", + "ÚˆÚ† مارکس" + ], + "DJF": [ + "DJF", + "جبوتی ÙØ±Ø§Ù†Ú©" + ], + "DKK": [ + "DKK", + "ڈنمارک کرون" + ], + "DOP": [ + "DOP", + "ڈومنیکن پیسو" + ], + "DZD": [ + "DZD", + "الجیریائی دینار" + ], + "EEK": [ + "EEK", + "ایسٹونین کرون" + ], + "EGP": [ + "EGP", + "مصری پاؤنڈ" + ], + "ERN": [ + "ERN", + "اریٹیریا کا ناÙکا" + ], + "ETB": [ + "ETB", + "ایتھوپیائی Ø¨ÙØ±Ù‘" + ], + "EUR": [ + "€", + "یورو" + ], + "FJD": [ + "FJD", + "ÙØ¬ÛŒ کا ڈالر" + ], + "FKP": [ + "FKP", + "ÙØ§Ú©Ù„ینڈ آئلینڈز پونڈ" + ], + "GBP": [ + "£", + "انگلستانی پاونڈ سٹرلنگ" + ], + "GEL": [ + "GEL", + "جارجیائی لاری" + ], + "GHS": [ + "GHS", + "گھانا کا سیڈی" + ], + "GIP": [ + "GIP", + "جبل الطارق پونڈ" + ], + "GMD": [ + "GMD", + "گامبیا کا ڈلاسی" + ], + "GNF": [ + "GNF", + "Ú¯Ù†ÛŒ ÙØ±Ø§Ù†Ú©" + ], + "GTQ": [ + "GTQ", + "گواٹے مالا کا کوئٹزل" + ], + "GYD": [ + "GYD", + "گویانیز ڈالر" + ], + "HKD": [ + "HK$", + "ھانگ کانگ ڈالر" + ], + "HNL": [ + "HNL", + "Ûونڈوران لیمپیرا" + ], + "HRK": [ + "HRK", + "کروشین کونا" + ], + "HTG": [ + "HTG", + "Ûیتی کا گؤرڈی" + ], + "HUF": [ + "HUF", + "Ûنگرین Ùورنٹ" + ], + "IDR": [ + "IDR", + "انڈونیشین روپیÛ" + ], + "ILS": [ + "₪", + "اسرائیلی نیا شیکل" + ], + "INR": [ + "₹", + "بھارتی روپیÛ" + ], + "IQD": [ + "IQD", + "عراقی دینار" + ], + "IRR": [ + "IRR", + "ایرانی ریال" + ], + "ISK": [ + "ISK", + "آئس لينڈی کرونا" + ], + "JMD": [ + "JMD", + "جمائیکن ڈالر" + ], + "JOD": [ + "JOD", + "اردنی دینار" + ], + "JPY": [ + "JPÂ¥", + "جاپانی ین" + ], + "KES": [ + "KES", + "کینیائی شلنگ" + ], + "KGS": [ + "KGS", + "کرغستانی سوم" + ], + "KHR": [ + "KHR", + "کمبوڈیائی ریئل" + ], + "KMF": [ + "KMF", + "کوموریئن ÙØ±Ø§Ù†Ú©" + ], + "KPW": [ + "KPW", + "شمالی کوریائی وون" + ], + "KRW": [ + "â‚©", + "جنوبی کوریائی وون" + ], + "KWD": [ + "KWD", + "کویتی دینار" + ], + "KYD": [ + "KYD", + "کیمین آئلینڈز ڈالر" + ], + "KZT": [ + "KZT", + "قزاخستانی ٹینگ" + ], + "LAK": [ + "LAK", + "لاؤشیائی Ú©ÙÙ¾" + ], + "LBP": [ + "LBP", + "لبنانی پونڈ" + ], + "LKR": [ + "LKR", + "سری لنکائی روپیÛ" + ], + "LRD": [ + "LRD", + "لائبریائی ڈالر" + ], + "LSL": [ + "LSL", + "لیسوتھو لوٹی" + ], + "LTL": [ + "LTL", + "لیتھوینیائی لیٹاس" + ], + "LVL": [ + "LVL", + "لاتویائی لیٹس" + ], + "LYD": [ + "LYD", + "لیبیائی دینار" + ], + "MAD": [ + "MAD", + "مراکشی درÛÙ…" + ], + "MDL": [ + "MDL", + "مالدووی لیو" + ], + "MGA": [ + "MGA", + "ملاگاسی اریاری" + ], + "MKD": [ + "MKD", + "مقدونیائی دینار" + ], + "MMK": [ + "MMK", + "میانما کیاٹ" + ], + "MNT": [ + "MNT", + "منگولیائی ٹگرÙ" + ], + "MOP": [ + "MOP", + "میکانیز پٹاکا" + ], + "MRO": [ + "MRO", + "موریطانیائی اوگوئیا" + ], + "MUR": [ + "MUR", + "ماریشس کا روپیÛ" + ], + "MVR": [ + "MVR", + "مالدیپ کا روÙÛŒÛ" + ], + "MWK": [ + "MWK", + "ملاوی کواچا" + ], + "MXN": [ + "MX$", + "میکسیکی پیسÛ" + ], + "MYR": [ + "MYR", + "ملیشیائی رنگÙÙ¹" + ], + "MZN": [ + "MZN", + "موزامبیقی میٹیکل" + ], + "NAD": [ + "NAD", + "نامیبیائی ڈالر" + ], + "NGN": [ + "NGN", + "نائیجیریائی نائرا" + ], + "NIO": [ + "NIO", + "نکارا گوا کا کورڈوبا" + ], + "NOK": [ + "NOK", + "ناروے کرون" + ], + "NPR": [ + "NPR", + "نیپالی روپیÛ" + ], + "NZD": [ + "NZ$", + "نیوزی لینڈ ڈالر" + ], + "OMR": [ + "OMR", + "عمانی ریال" + ], + "PAB": [ + "PAB", + "Ù¾Ù†Ø§Ù…Û Ú©Ø§ بالبوآ" + ], + "PEN": [ + "PEN", + "پیروین نیووسول" + ], + "PGK": [ + "PGK", + "پاپوآ نیو Ú¯Ù†ÛŒ کا کینا" + ], + "PHP": [ + "PHP", + "Ùلپائینی پیسÛ" + ], + "PKR": [ + "Rs", + "پاکستانی روپیÛ" + ], + "PLN": [ + "PLN", + "پولش زلوٹی" + ], + "PYG": [ + "PYG", + "پیراگوئے کا گوآرنی" + ], + "QAR": [ + "QAR", + "قطری ریال" + ], + "RON": [ + "RON", + "رومانیائی لیو" + ], + "RSD": [ + "RSD", + "سربین دینار" + ], + "RUB": [ + "RUB", + "روسی روبل" + ], + "RWF": [ + "RWF", + "روانڈا کا ÙØ±Ø§Ù†Ú©" + ], + "SAR": [ + "SAR", + "سعودی ریال" + ], + "SBD": [ + "SBD", + "سولومن آئلینڈز ڈالر" + ], + "SCR": [ + "SCR", + "سشلی کا روپیÛ" + ], + "SDG": [ + "SDG", + "سوڈانی پاؤنڈ" + ], + "SEK": [ + "SEK", + "سویڈن کرونا" + ], + "SGD": [ + "SGD", + "سنگا پور ڈالر" + ], + "SHP": [ + "SHP", + "سینٹ Ûیلینا پاؤنڈ" + ], + "SIT": [ + "SIT", + "سلوانین ٹولر" + ], + "SKK": [ + "SKK", + "سلووک کرونا" + ], + "SLL": [ + "SLL", + "سیئرا لیون لیون" + ], + "SOS": [ + "SOS", + "صومالی شلنگ" + ], + "SRD": [ + "SRD", + "سورینامی ڈالر" + ], + "SSP": [ + "SSP", + "جنوبی سوڈانی پاؤنڈ" + ], + "STD": [ + "STD", + "ساؤ ٹوم اور پرنسپے ڈوبرا" + ], + "SYP": [ + "SYP", + "شامی پونڈ" + ], + "SZL": [ + "SZL", + "سوازی لیلانجینی" + ], + "THB": [ + "฿", + "تھائی Ø¨Ø§ÛØª" + ], + "TJS": [ + "TJS", + "تاجکستانی سومونی" + ], + "TMT": [ + "TMT", + "ترکمانستانی منات" + ], + "TND": [ + "TND", + "تیونیسیائی دینار" + ], + "TOP": [ + "TOP", + "ٹونگن پانگا" + ], + "TRY": [ + "TRY", + "ترکی لیرا" + ], + "TTD": [ + "TTD", + "ترینیداد اور ٹوباگو کا ڈالر" + ], + "TWD": [ + "NT$", + "نیو تائیوان ڈالر" + ], + "TZS": [ + "TZS", + "تنزانیائی شلنگ" + ], + "UAH": [ + "UAH", + "یوکرینیائی ÛØ±ÛŒÙˆÙ†ÛŒØ§" + ], + "UGX": [ + "UGX", + "یوگانڈا شلنگ" + ], + "USD": [ + "$", + "امریکی ڈالر" + ], + "UYU": [ + "UYU", + "یوروگویان پیسو" + ], + "UZS": [ + "UZS", + "ازبکستان سوم" + ], + "VEB": [ + "VEB", + "وینزویلا بولیور (1871–2008)" + ], + "VEF": [ + "VEF", + "وینزویلا بولیور" + ], + "VND": [ + "â‚«", + "ویتنامی ڈانگ" + ], + "VUV": [ + "VUV", + "وینوواتو واتو" + ], + "WST": [ + "WST", + "ساموآ کا ٹالا" + ], + "XAF": [ + "FCFA", + "وسطی Ø§ÙØ±ÛŒÙ‚ÛŒ [CFA] ÙØ±Ø§Ù†Ú©" + ], + "XCD": [ + "EC$", + "مشرقی کریبیا کا ڈالر" + ], + "XOF": [ + "CFA", + "مغربی Ø§ÙØ±ÛŒÙ‚ÛŒ [CFA] ÙØ±Ø§Ù†Ú©" + ], + "XPF": [ + "CFPF", + "CFP ÙØ±Ø§Ù†Ú©" + ], + "YER": [ + "YER", + "یمنی ریال" + ], + "ZAR": [ + "ZAR", + "جنوبی Ø§ÙØ±ÛŒÙ‚ÛŒ رانڈ" + ], + "ZMK": [ + "ZMK", + "زامبیائی کواچا (1968–2012)" + ], + "ZMW": [ + "ZMW", + "زامبیائی کواچا" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ur_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ur_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..c8d41f8d3d1b7d64a7b87de322785e2e0bd21a13 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/ur_IN.json @@ -0,0 +1,41 @@ +{ + "Version": "2.1.27.79", + "Names": { + "CRC": [ + "CRC", + "کوسٹا ریکا کولون" + ], + "CUC": [ + "CUC", + "قابل منتقلی کیوبائی پیسو" + ], + "CUP": [ + "CUP", + "کیوبائی پیسو" + ], + "CVE": [ + "CVE", + "کیپ ورڈی اسکیوڈو" + ], + "ERN": [ + "ERN", + "اریٹیریائی Ù†Ø§Ú©ÙØ§" + ], + "GBP": [ + "£", + "برطانوی پاونڈ سٹرلنگ" + ], + "GHS": [ + "GHS", + "گھانی سیڈی" + ], + "PKR": [ + "PKR", + "پاکستانی روپیÛ" + ], + "WST": [ + "WST", + "ساموآئی ٹالا" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/uz.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/uz.json new file mode 100644 index 0000000000000000000000000000000000000000..4deddb97627744b286eaf95294d1b8ae2334704b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/uz.json @@ -0,0 +1,633 @@ +{ + "Version": "2.1.29.44", + "Names": { + "AED": [ + "AED", + "Birlashgan Arab Amirliklari dirhami" + ], + "AFN": [ + "AFN", + "Afg‘oniston afg‘oniysi" + ], + "ALL": [ + "ALL", + "Albaniya leki" + ], + "AMD": [ + "AMD", + "Armaniston drami" + ], + "ANG": [ + "ANG", + "Niderlandiya antil guldeni" + ], + "AOA": [ + "AOA", + "Angola kvanzasi" + ], + "ARS": [ + "ARS", + "Argentina pesosi" + ], + "AUD": [ + "A$", + "Avstraliya dollari" + ], + "AWG": [ + "AWG", + "Aruba florini" + ], + "AZN": [ + "AZN", + "Ozarbayjon manati" + ], + "BAM": [ + "BAM", + "Bosniya va Gertsegovina ayirboshlash markasi" + ], + "BBD": [ + "BBD", + "Barbados dollari" + ], + "BDT": [ + "BDT", + "Bangladesh takasi" + ], + "BGN": [ + "BGN", + "Bolgariya levi" + ], + "BHD": [ + "BHD", + "Bahrayn dinori" + ], + "BIF": [ + "BIF", + "Burundi franki" + ], + "BMD": [ + "BMD", + "Bermuda dollari" + ], + "BND": [ + "BND", + "Bruney dollari" + ], + "BOB": [ + "BOB", + "Boliviya bolivianosi" + ], + "BRL": [ + "R$", + "Braziliya reali" + ], + "BSD": [ + "BSD", + "Bagama dollari" + ], + "BTN": [ + "BTN", + "Butan ngultrumi" + ], + "BWP": [ + "BWP", + "Botsvana pulasi" + ], + "BYN": [ + "BYN", + "Belarus rubli" + ], + "BYR": [ + "BYR", + "Belarus rubli (2000–2016)" + ], + "BZD": [ + "BZD", + "Beliz dollari" + ], + "CAD": [ + "CA$", + "Kanada dollari" + ], + "CDF": [ + "CDF", + "Kongo franki" + ], + "CHF": [ + "CHF", + "Shveytsariya franki" + ], + "CLP": [ + "CLP", + "Chili pesosi" + ], + "CNY": [ + "CNÂ¥", + "Xitoy yuani" + ], + "COP": [ + "COP", + "Kolumbiya pesosi" + ], + "CRC": [ + "CRC", + "Kosta-Rika koloni" + ], + "CUC": [ + "CUC", + "Kuba ayirboshlash pesosi" + ], + "CUP": [ + "CUP", + "Kuba pesosi" + ], + "CVE": [ + "CVE", + "Kabo-Verde eskudosi" + ], + "CZK": [ + "CZK", + "Chexiya kronasi" + ], + "DJF": [ + "DJF", + "Jibuti franki" + ], + "DKK": [ + "DKK", + "Daniya kronasi" + ], + "DOP": [ + "DOP", + "Dominikana pesosi" + ], + "DZD": [ + "DZD", + "Jazoir dinori" + ], + "EGP": [ + "EGP", + "Misr funti" + ], + "ERN": [ + "ERN", + "Eritreya nakfasi" + ], + "ETB": [ + "ETB", + "Efiopiya biri" + ], + "EUR": [ + "€", + "Yevro" + ], + "FJD": [ + "FJD", + "Fiji dollari" + ], + "FKP": [ + "FKP", + "Folklend orollari funti" + ], + "GBP": [ + "£", + "Angliya funt sterlingi" + ], + "GEL": [ + "GEL", + "Gruziya larisi" + ], + "GHS": [ + "GHS", + "Gana sedisi" + ], + "GIP": [ + "GIP", + "Gibraltar funti" + ], + "GMD": [ + "GMD", + "Gambiya dalasisi" + ], + "GNF": [ + "GNF", + "Gvineya franki" + ], + "GTQ": [ + "GTQ", + "Gvatemala ketsali" + ], + "GYD": [ + "GYD", + "Gayana dollari" + ], + "HKD": [ + "HK$", + "Gonkong dollari" + ], + "HNL": [ + "HNL", + "Gonduras lempirasi" + ], + "HRK": [ + "HRK", + "Xorvatiya kunasi" + ], + "HTG": [ + "HTG", + "Gaiti gurdi" + ], + "HUF": [ + "HUF", + "Vengriya forinti" + ], + "IDR": [ + "IDR", + "Indoneziya rupiyasi" + ], + "ILS": [ + "₪", + "Isroil yangi shekeli" + ], + "INR": [ + "₹", + "Hindiston rupiyasi" + ], + "IQD": [ + "IQD", + "Iroq dinori" + ], + "IRR": [ + "IRR", + "Eron riyoli" + ], + "ISK": [ + "ISK", + "Islandiya kronasi" + ], + "JMD": [ + "JMD", + "Yamayka dollari" + ], + "JOD": [ + "JOD", + "Iordaniya dinori" + ], + "JPY": [ + "JPÂ¥", + "Yaponiya iyenasi" + ], + "KES": [ + "KES", + "Keniya shillingi" + ], + "KGS": [ + "KGS", + "Qirg‘iziston somi" + ], + "KHR": [ + "KHR", + "Kambodja rieli" + ], + "KMF": [ + "KMF", + "Komor orollari franki" + ], + "KPW": [ + "KPW", + "Shimoliy Koreya voni" + ], + "KRW": [ + "â‚©", + "Janubiy Koreya voni" + ], + "KWD": [ + "KWD", + "Kuvayt dinori" + ], + "KYD": [ + "KYD", + "Kayman orollari dollari" + ], + "KZT": [ + "KZT", + "Qozog‘iston tengesi" + ], + "LAK": [ + "LAK", + "Laos kipi" + ], + "LBP": [ + "LBP", + "Livan funti" + ], + "LKR": [ + "LKR", + "Shri-Lanka rupiyasi" + ], + "LRD": [ + "LRD", + "Liberiya dollari" + ], + "LTL": [ + "LTL", + "Litva liti" + ], + "LVL": [ + "LVL", + "Latviya lati" + ], + "LYD": [ + "LYD", + "Liviya dinori" + ], + "MAD": [ + "MAD", + "Marokash dirhami" + ], + "MDL": [ + "MDL", + "Moldova leyi" + ], + "MGA": [ + "MGA", + "Malagasi ariarisi" + ], + "MKD": [ + "MKD", + "Makedoniya dinori" + ], + "MMK": [ + "MMK", + "Myanma kyati" + ], + "MNT": [ + "MNT", + "Mongoliya tugriki" + ], + "MOP": [ + "MOP", + "Makao patakasi" + ], + "MRO": [ + "MRO", + "Mavritaniya uqiyasi" + ], + "MUR": [ + "MUR", + "Mavritaniya rupiyasi" + ], + "MVR": [ + "MVR", + "Maldiv rupiyasi" + ], + "MWK": [ + "MWK", + "Malavi kvachasi" + ], + "MXN": [ + "MX$", + "Meksika pesosi" + ], + "MYR": [ + "MYR", + "Malayziya ringgiti" + ], + "MZN": [ + "MZN", + "Mozambik metikali" + ], + "NAD": [ + "NAD", + "Namibiya dollari" + ], + "NGN": [ + "NGN", + "Nigeriya nayrasi" + ], + "NIO": [ + "NIO", + "Nikaragua kordobasi" + ], + "NOK": [ + "NOK", + "Norvegiya kronasi" + ], + "NPR": [ + "NPR", + "Nepal rupiyasi" + ], + "NZD": [ + "NZ$", + "Yangi Zelandiya dollari" + ], + "OMR": [ + "OMR", + "Ummon riyoli" + ], + "PAB": [ + "PAB", + "Panama balboasi" + ], + "PEN": [ + "PEN", + "Peru yangi soli" + ], + "PGK": [ + "PGK", + "Papua – Yangi Gvineya kinasi" + ], + "PHP": [ + "PHP", + "Filippin pesosi" + ], + "PKR": [ + "PKR", + "Pokiston rupiyasi" + ], + "PLN": [ + "PLN", + "Polsha zlotiyi" + ], + "PYG": [ + "PYG", + "Paragvay guaranisi" + ], + "QAR": [ + "QAR", + "Qatar riyoli" + ], + "RON": [ + "RON", + "Ruminiya leyi" + ], + "RSD": [ + "RSD", + "Serbiya dinori" + ], + "RUB": [ + "RUB", + "Rossiya rubli" + ], + "RWF": [ + "RWF", + "Ruanda franki" + ], + "SAR": [ + "SAR", + "Saudiya Arabistoni riyoli" + ], + "SBD": [ + "SBD", + "Solomon orollari dollari" + ], + "SCR": [ + "SCR", + "Seyshel rupiyasi" + ], + "SDG": [ + "SDG", + "Sudan funti" + ], + "SEK": [ + "SEK", + "Shvetsiya kronasi" + ], + "SGD": [ + "SGD", + "Singapur dollari" + ], + "SHP": [ + "SHP", + "Muqaddas Yelena oroli funti" + ], + "SLL": [ + "SLL", + "Syerra-Leone leonesi" + ], + "SOS": [ + "SOS", + "Somali shillingi" + ], + "SRD": [ + "SRD", + "Surinam dollari" + ], + "SSP": [ + "SSP", + "Janubiy Sudan funti" + ], + "STD": [ + "STD", + "San-Tome va Prinsipi dobrasi" + ], + "SYP": [ + "SYP", + "Suriya funti" + ], + "SZL": [ + "SZL", + "Svazilend lilangenisi" + ], + "THB": [ + "THB", + "Tailand bati" + ], + "TJS": [ + "TJS", + "Tojikiston somoniysi" + ], + "TMT": [ + "TMT", + "Turkmaniston manati" + ], + "TND": [ + "TND", + "Tunis dinori" + ], + "TOP": [ + "TOP", + "Tonga paangasi" + ], + "TRY": [ + "TRY", + "Turk lirasi" + ], + "TTD": [ + "TTD", + "Trinidad va Tobago dollari" + ], + "TWD": [ + "NT$", + "Yangi Tayvan dollari" + ], + "TZS": [ + "TZS", + "Tanzaniya shillingi" + ], + "UAH": [ + "UAH", + "Ukraina grivnasi" + ], + "UGX": [ + "UGX", + "Uganda shillingi" + ], + "USD": [ + "US$", + "AQSH dollari" + ], + "UYU": [ + "UYU", + "Urugvay pesosi" + ], + "UZS": [ + "soÊ»m", + "O‘zbekiston so‘mi" + ], + "VEF": [ + "VEF", + "Venesuela bolivari" + ], + "VND": [ + "â‚«", + "Vyetnam dongi" + ], + "VUV": [ + "VUV", + "Vanuatu vatusi" + ], + "WST": [ + "WST", + "Samoa talasi" + ], + "XAF": [ + "FCFA", + "Markaziy Afrika CFA franki" + ], + "XCD": [ + "EC$", + "Sharqiy Karib dollari" + ], + "XOF": [ + "CFA", + "G‘arbiy Afrika CFA franki" + ], + "XPF": [ + "CFPF", + "Fransuz Polineziyasi franki" + ], + "YER": [ + "YER", + "Yaman riyoli" + ], + "ZAR": [ + "ZAR", + "Janubiy Afrika rendi" + ], + "ZMW": [ + "ZMW", + "Zambiya kvachasi" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/uz_Arab.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/uz_Arab.json new file mode 100644 index 0000000000000000000000000000000000000000..5e5e2aea1cf81a69eef498cb639ec33980402e21 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/uz_Arab.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AFN": [ + "Ø‹", + "Ø§ÙØºØ§Ù†ÛŒ" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/uz_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/uz_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..7c732b614d48a0a68f2a60e0470267f475da7ee9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/uz_Cyrl.json @@ -0,0 +1,233 @@ +{ + "Version": "2.1.27.98", + "Names": { + "ANG": [ + "ANG", + "Голланд Ðнтил гульдени" + ], + "ARS": [ + "ARS", + "Ðргентина пеÑоÑи" + ], + "AUD": [ + "A$", + "AUD" + ], + "AWG": [ + "AWG", + "Ðруба флорини" + ], + "BBD": [ + "BBD", + "Ð‘Ð°Ñ€Ð±Ð°Ð´Ð¾Ñ Ð´Ð¾Ð»Ð»Ð°Ñ€Ð¸" + ], + "BMD": [ + "BMD", + "Бермуда доллари" + ], + "BOB": [ + "BOB", + "Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ Ð±Ð¾Ð»Ð²Ð¸Ð°Ð½Ð¸" + ], + "BRL": [ + "R$", + "Бразил реали" + ], + "BSD": [ + "BSD", + "Багама доллари" + ], + "BZD": [ + "BZD", + "Белиз доллари" + ], + "CAD": [ + "CA$", + "Канада доллари" + ], + "CLP": [ + "CLP", + "Чили пеÑоÑи" + ], + "CNY": [ + "CNÂ¥", + "Хитой юани" + ], + "COP": [ + "COP", + "ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ Ð¿ÐµÑоÑи" + ], + "CRC": [ + "CRC", + "КоÑта-Рика колони" + ], + "CUC": [ + "CUC", + "Куба Ðйирбошлаш пеÑоÑи" + ], + "CUP": [ + "CUP", + "Куба пеÑоÑи" + ], + "DOP": [ + "DOP", + "Доминикан пеÑоÑи" + ], + "DZD": [ + "DZD", + "Жазоир динори" + ], + "EGP": [ + "EGP", + "МиÑÑ€ фунти" + ], + "EUR": [ + "€", + "Евро" + ], + "FKP": [ + "FKP", + "Фолькленд ороли фунти" + ], + "GBP": [ + "£", + "Инглиз фунт" + ], + "GTQ": [ + "GTQ", + "Гватемала кветзали" + ], + "GYD": [ + "GYD", + "ГаÑна доллари" + ], + "HKD": [ + "HK$", + "HKD" + ], + "HNL": [ + "HNL", + "Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ Ð»ÐµÐ¼Ð¿Ð¸Ñ€Ð°Ñи" + ], + "HTG": [ + "HTG", + "Гаити гурдаÑи" + ], + "ILS": [ + "₪", + "ILS" + ], + "INR": [ + "₹", + "Ҳинд рупиÑÑи" + ], + "JMD": [ + "JMD", + "Ямайка доллари" + ], + "JPY": [ + "JPÂ¥", + "Япон йенаÑи" + ], + "KRW": [ + "â‚©", + "KRW" + ], + "KYD": [ + "KYD", + "Кайман ороли Доллари" + ], + "LYD": [ + "LYD", + "Ð›Ð¸Ð²Ð¸Ñ Ð´Ð¸Ð½Ð¾Ñ€Ð¸" + ], + "MAD": [ + "MAD", + "Марокаш дирҳами" + ], + "MXN": [ + "MX$", + "МекÑика пеÑоÑи" + ], + "NIO": [ + "NIO", + "Ðикарагуа кордобаÑи" + ], + "NZD": [ + "NZ$", + "NZD" + ], + "PAB": [ + "PAB", + "Панама бальбоаÑи" + ], + "PEN": [ + "PEN", + "Перу нуево Ñол" + ], + "PYG": [ + "PYG", + "Парагвай гуарани" + ], + "RON": [ + "RON", + "RON" + ], + "RUB": [ + "RUB", + "Ð ÑƒÑ Ñ€ÑƒÐ±Ð»Ð¸" + ], + "SRD": [ + "SRD", + "Суринам доллари" + ], + "THB": [ + "฿", + "THB" + ], + "TTD": [ + "TTD", + "Тринидад ва Тобаго доллари" + ], + "TWD": [ + "NT$", + "TWD" + ], + "USD": [ + "US$", + "ÐҚШ доллари" + ], + "UYU": [ + "UYU", + "Уругвай пеÑоÑи" + ], + "UZS": [ + "Ñўм", + "ЎзбекиÑтон Ñўм" + ], + "VEF": [ + "VEF", + "ВенеÑуÑла боливари" + ], + "VND": [ + "â‚«", + "VND" + ], + "XAF": [ + "FCFA", + "XAF" + ], + "XCD": [ + "EC$", + "Шарқий Кариб доллари" + ], + "XOF": [ + "CFA", + "XOF" + ], + "XPF": [ + "CFPF", + "XPF" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/vi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/vi.json new file mode 100644 index 0000000000000000000000000000000000000000..650b131761905fd09231b7d3f678deb3d3a69596 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/vi.json @@ -0,0 +1,1125 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "Äồng Peseta cá»§a Andora" + ], + "AED": [ + "AED", + "Dirham UAE" + ], + "AFA": [ + "AFA", + "Äồng Afghani cá»§a Afghanistan (1927–2002)" + ], + "AFN": [ + "AFN", + "Afghani Afghanistan" + ], + "ALL": [ + "ALL", + "Lek Albania" + ], + "AMD": [ + "AMD", + "Dram Armenia" + ], + "ANG": [ + "ANG", + "Guilder Tây Ấn Hà Lan" + ], + "AOA": [ + "AOA", + "Kwanza Angola" + ], + "AOK": [ + "AOK", + "Äồng Kwanza cá»§a Angola (1977–1991)" + ], + "AON": [ + "AON", + "Äồng Kwanza Má»›i cá»§a Angola (1990–2000)" + ], + "AOR": [ + "AOR", + "Äồng Kwanza Äiá»u chỉnh lại cá»§a Angola (1995–1999)" + ], + "ARA": [ + "ARA", + "Äồng Austral cá»§a Argentina" + ], + "ARL": [ + "ARL", + "Äồng Peso Ley cá»§a Argentina (1970–1983)" + ], + "ARM": [ + "ARM", + "Äồng Peso Argentina (1881–1970)" + ], + "ARP": [ + "ARP", + "Äồng Peso Argentina (1983–1985)" + ], + "ARS": [ + "ARS", + "Peso Argentina" + ], + "ATS": [ + "ATS", + "Äồng Schiling Ão" + ], + "AUD": [ + "AU$", + "Äô la Australia" + ], + "AWG": [ + "AWG", + "Florin Aruba" + ], + "AZM": [ + "AZM", + "Äồng Manat cá»§a Azerbaijan (1993–2006)" + ], + "AZN": [ + "AZN", + "Manat Azerbaijan" + ], + "BAD": [ + "BAD", + "Äồng Dinar cá»§a Bosnia-Herzegovina (1992–1994)" + ], + "BAM": [ + "BAM", + "Mark Bosnia-Herzegovina có thể chuyển đổi" + ], + "BAN": [ + "BAN", + "Äồng Dinar Má»›i cá»§a Bosnia-Herzegovina (1994–1997)" + ], + "BBD": [ + "BBD", + "Äô la Barbados" + ], + "BDT": [ + "BDT", + "Taka Bangladesh" + ], + "BEC": [ + "BEC", + "Äồng Franc Bỉ (có thể chuyển đổi)" + ], + "BEF": [ + "BEF", + "Äồng Franc Bỉ" + ], + "BEL": [ + "BEL", + "Äồng Franc Bỉ (tài chính)" + ], + "BGL": [ + "BGL", + "Äồng Lev Xu cá»§a Bun-ga-ri" + ], + "BGM": [ + "BGM", + "Äồng Lev Xã há»™i chá»§ nghÄ©a cá»§a Bun-ga-ri" + ], + "BGN": [ + "BGN", + "Lev Bulgaria" + ], + "BGO": [ + "BGO", + "Äồng Lev cá»§a Bun-ga-ri (1879–1952)" + ], + "BHD": [ + "BHD", + "Dinar Bahrain" + ], + "BIF": [ + "BIF", + "Franc Burundi" + ], + "BMD": [ + "BMD", + "Äô la Bermuda" + ], + "BND": [ + "BND", + "Äô la Brunei" + ], + "BOB": [ + "BOB", + "Boliviano Bolivia" + ], + "BOL": [ + "BOL", + "Äồng Boliviano cá»§a Bolivia (1863–1963)" + ], + "BOP": [ + "BOP", + "Äồng Peso Bolivia" + ], + "BOV": [ + "BOV", + "Äồng Mvdol Bolivia" + ], + "BRB": [ + "BRB", + "Äồng Cruzerio Má»›i cá»§a Braxin (1967–1986)" + ], + "BRC": [ + "BRC", + "Äồng Cruzado cá»§a Braxin (1986–1989)" + ], + "BRE": [ + "BRE", + "Äồng Cruzerio cá»§a Braxin (1990–1993)" + ], + "BRL": [ + "R$", + "Real Braxin" + ], + "BRN": [ + "BRN", + "Äồng Cruzado Má»›i cá»§a Braxin (1989–1990)" + ], + "BRR": [ + "BRR", + "Äồng Cruzeiro cá»§a Braxin (1993–1994)" + ], + "BRZ": [ + "BRZ", + "Äồng Cruzeiro cá»§a Braxin (1942–1967)" + ], + "BSD": [ + "BSD", + "Äô la Bahamas" + ], + "BTN": [ + "BTN", + "Ngultrum Bhutan" + ], + "BUK": [ + "BUK", + "Äồng Kyat Miến Äiện" + ], + "BWP": [ + "BWP", + "Pula Botswana" + ], + "BYB": [ + "BYB", + "Äồng Rúp Má»›i cá»§a Belarus (1994–1999)" + ], + "BYN": [ + "BYN", + "Rúp Belarus" + ], + "BYR": [ + "BYR", + "Rúp Belarus (2000–2016)" + ], + "BZD": [ + "BZD", + "Äô la Belize" + ], + "CAD": [ + "CA$", + "Äô la Canada" + ], + "CDF": [ + "CDF", + "Franc Congo" + ], + "CHE": [ + "CHE", + "Äồng Euro WIR" + ], + "CHF": [ + "CHF", + "Franc Thụy sÄ©" + ], + "CHW": [ + "CHW", + "Äồng France WIR" + ], + "CLE": [ + "CLE", + "Äồng Escudo cá»§a Chile" + ], + "CLF": [ + "CLF", + "ÄÆ¡n vị Kế toán cá»§a Chile (UF)" + ], + "CLP": [ + "CLP", + "Peso Chile" + ], + "CNY": [ + "CNÂ¥", + "Nhân dân tệ" + ], + "COP": [ + "COP", + "Peso Colombia" + ], + "COU": [ + "COU", + "ÄÆ¡n vị Giá trị Thá»±c cá»§a Colombia" + ], + "CRC": [ + "CRC", + "Colón Costa Rica" + ], + "CSD": [ + "CSD", + "Äồng Dinar cá»§a Serbia (2002–2006)" + ], + "CSK": [ + "CSK", + "Äồng Koruna Xu cá»§a Czechoslovakia" + ], + "CUC": [ + "CUC", + "Peso Cuba có thể chuyển đổi" + ], + "CUP": [ + "CUP", + "Peso Cuba" + ], + "CVE": [ + "CVE", + "Escudo Cape Verde" + ], + "CYP": [ + "CYP", + "Äồng Bảng Síp" + ], + "CZK": [ + "CZK", + "Koruna Cá»™ng hòa Séc" + ], + "DDM": [ + "DDM", + "Äồng Mark Äông Äức" + ], + "DEM": [ + "DEM", + "Äồng Mark Äức" + ], + "DJF": [ + "DJF", + "Franc Djibouti" + ], + "DKK": [ + "DKK", + "Krone Äan Mạch" + ], + "DOP": [ + "DOP", + "Peso Dominica" + ], + "DZD": [ + "DZD", + "Dinar Algeria" + ], + "ECS": [ + "ECS", + "Äồng Scure Ecuador" + ], + "ECV": [ + "ECV", + "ÄÆ¡n vị Giá trị Không đổi cá»§a Ecuador" + ], + "EEK": [ + "EEK", + "Crun Extônia" + ], + "EGP": [ + "EGP", + "Bảng Ai Cập" + ], + "ERN": [ + "ERN", + "Nakfa Eritrea" + ], + "ESA": [ + "ESA", + "Äồng Peseta Tây Ban Nha (Tài khoản)" + ], + "ESB": [ + "ESB", + "Äồng Peseta Tây Ban Nha (tài khoản có thể chuyển đổi)" + ], + "ESP": [ + "ESP", + "Äồng Peseta Tây Ban Nha" + ], + "ETB": [ + "ETB", + "Birr Ethiopia" + ], + "EUR": [ + "€", + "Euro" + ], + "FIM": [ + "FIM", + "Äồng Markka Phần Lan" + ], + "FJD": [ + "FJD", + "Äô la Fiji" + ], + "FKP": [ + "FKP", + "Bảng Quần đảo Falkland" + ], + "FRF": [ + "FRF", + "Franc Pháp" + ], + "GBP": [ + "£", + "Bảng Anh" + ], + "GEK": [ + "GEK", + "Äồng Kupon Larit cá»§a Georgia" + ], + "GEL": [ + "GEL", + "Lari Gruzia" + ], + "GHC": [ + "GHC", + "Cedi Ghana (1979–2007)" + ], + "GHS": [ + "GHS", + "Cedi Ghana" + ], + "GIP": [ + "GIP", + "Bảng Gibraltar" + ], + "GMD": [ + "GMD", + "Dalasi Gambia" + ], + "GNF": [ + "GNF", + "Franc Guinea" + ], + "GNS": [ + "GNS", + "Syli Guinea" + ], + "GQE": [ + "GQE", + "Äồng Ekwele cá»§a Guinea Xích Äạo" + ], + "GRD": [ + "GRD", + "Drachma Hy Lạp" + ], + "GTQ": [ + "GTQ", + "Quetzal Guatemala" + ], + "GWE": [ + "GWE", + "Äồng Guinea Escudo Bồ Äào Nha" + ], + "GWP": [ + "GWP", + "Peso Guinea-Bissau" + ], + "GYD": [ + "GYD", + "Äô la Guyana" + ], + "HKD": [ + "HK$", + "Äô la Hồng Kông" + ], + "HNL": [ + "HNL", + "Lempira Honduras" + ], + "HRD": [ + "HRD", + "Äồng Dinar Croatia" + ], + "HRK": [ + "HRK", + "Kuna Croatia" + ], + "HTG": [ + "HTG", + "Gourde Haiti" + ], + "HUF": [ + "HUF", + "Forint Hungary" + ], + "IDR": [ + "IDR", + "Rupiah Indonesia" + ], + "IEP": [ + "IEP", + "Pao Ai-len" + ], + "ILP": [ + "ILP", + "Pao Ixraen" + ], + "ILS": [ + "₪", + "Sheqel Israel má»›i" + ], + "INR": [ + "₹", + "Rupee Ấn Äá»™" + ], + "IQD": [ + "IQD", + "Dinar I-rắc" + ], + "IRR": [ + "IRR", + "Rial Iran" + ], + "ISK": [ + "ISK", + "Króna Iceland" + ], + "ITL": [ + "ITL", + "Lia Ã" + ], + "JMD": [ + "JMD", + "Äô la Jamaica" + ], + "JOD": [ + "JOD", + "Dinar Jordan" + ], + "JPY": [ + "JPÂ¥", + "Yên Nhật" + ], + "KES": [ + "KES", + "Shilling Kenya" + ], + "KGS": [ + "KGS", + "Som Kyrgyzstan" + ], + "KHR": [ + "KHR", + "Riel Campuchia" + ], + "KMF": [ + "KMF", + "Franc Comoros" + ], + "KPW": [ + "KPW", + "Won Triá»u Tiên" + ], + "KRH": [ + "KRH", + "Äồng Hwan Hàn Quốc (1953–1962)" + ], + "KRO": [ + "KRO", + "Äồng Won Hàn Quốc (1945–1953)" + ], + "KRW": [ + "â‚©", + "Won Hàn Quốc" + ], + "KWD": [ + "KWD", + "Dinar Kuwait" + ], + "KYD": [ + "KYD", + "Äô la Quần đảo Cayman" + ], + "KZT": [ + "KZT", + "Tenge Kazakhstan" + ], + "LAK": [ + "LAK", + "Kip Lào" + ], + "LBP": [ + "LBP", + "Bảng Li-băng" + ], + "LKR": [ + "LKR", + "Rupee Sri Lanka" + ], + "LRD": [ + "LRD", + "Äô la Liberia" + ], + "LSL": [ + "LSL", + "Ioti Lesotho" + ], + "LTL": [ + "LTL", + "Litas Lít-va" + ], + "LTT": [ + "LTT", + "Äồng Talonas Litva" + ], + "LUC": [ + "LUC", + "Äồng Franc Luxembourg có thể chuyển đổi" + ], + "LUF": [ + "LUF", + "Äồng Franc Luxembourg" + ], + "LUL": [ + "LUL", + "Äồng Franc Luxembourg tài chính" + ], + "LVL": [ + "LVL", + "Lats Latvia" + ], + "LVR": [ + "LVR", + "Äồng Rúp Latvia" + ], + "LYD": [ + "LYD", + "Dinar Libi" + ], + "MAD": [ + "MAD", + "Dirham Ma-rốc" + ], + "MAF": [ + "MAF", + "Äồng Franc Ma-rốc" + ], + "MCF": [ + "MCF", + "Äồng Franc Monegasque" + ], + "MDC": [ + "MDC", + "Äồng Cupon Moldova" + ], + "MDL": [ + "MDL", + "Leu Moldova" + ], + "MGA": [ + "MGA", + "Ariary Malagasy" + ], + "MGF": [ + "MGF", + "Äồng Franc Magalasy" + ], + "MKD": [ + "MKD", + "Denar Macedonia" + ], + "MKN": [ + "MKN", + "Äồng Denar Macedonia (1992–1993)" + ], + "MLF": [ + "MLF", + "Äồng Franc Mali" + ], + "MMK": [ + "MMK", + "Kyat Myanma" + ], + "MNT": [ + "MNT", + "Tugrik Mông Cổ" + ], + "MOP": [ + "MOP", + "Pataca Ma Cao" + ], + "MRO": [ + "MRO", + "Ouguiya Mauritania" + ], + "MTL": [ + "MTL", + "Lia xứ Man-tÆ¡" + ], + "MTP": [ + "MTP", + "Äồng Bảng Malta" + ], + "MUR": [ + "MUR", + "Rupee Mauritius" + ], + "MVR": [ + "MVR", + "Rufiyaa Maldives" + ], + "MWK": [ + "MWK", + "Kwacha Malawi" + ], + "MXN": [ + "MX$", + "Peso Mexico" + ], + "MXP": [ + "MXP", + "Äồng Peso Bạc Mê-hi-cô (1861–1992)" + ], + "MXV": [ + "MXV", + "ÄÆ¡n vị Äầu tư Mê-hi-cô" + ], + "MYR": [ + "MYR", + "Ringgit Malaysia" + ], + "MZE": [ + "MZE", + "Escudo Mozambique" + ], + "MZM": [ + "MZM", + "Äồng Metical Mozambique (1980–2006)" + ], + "MZN": [ + "MZN", + "Metical Mozambique" + ], + "NAD": [ + "NAD", + "Äô la Namibia" + ], + "NGN": [ + "NGN", + "Naira Nigeria" + ], + "NIC": [ + "NIC", + "Äồng Córdoba Nicaragua (1988–1991)" + ], + "NIO": [ + "NIO", + "Córdoba Nicaragua" + ], + "NLG": [ + "NLG", + "Äồng Guilder Hà Lan" + ], + "NOK": [ + "NOK", + "Krone Na Uy" + ], + "NPR": [ + "NPR", + "Rupee Nepal" + ], + "NZD": [ + "NZ$", + "Äô la New Zealand" + ], + "OMR": [ + "OMR", + "Rial Oman" + ], + "PAB": [ + "PAB", + "Balboa Panama" + ], + "PEI": [ + "PEI", + "Äồng Inti Peru" + ], + "PEN": [ + "PEN", + "Nuevo Sol Peru" + ], + "PES": [ + "PES", + "Äồng Sol Peru (1863–1965)" + ], + "PGK": [ + "PGK", + "Kina Papua New Guinean" + ], + "PHP": [ + "PHP", + "Peso Philipin" + ], + "PKR": [ + "PKR", + "Rupee Pakistan" + ], + "PLN": [ + "PLN", + "Zloty Ba Lan" + ], + "PLZ": [ + "PLZ", + "Äồng Zloty Ba Lan (1950–1995)" + ], + "PTE": [ + "PTE", + "Äồng Escudo Bồ Äào Nha" + ], + "PYG": [ + "PYG", + "Guarani Paraguay" + ], + "QAR": [ + "QAR", + "Rial Qatar" + ], + "RHD": [ + "RHD", + "Äồng Äô la Rhode" + ], + "ROL": [ + "ROL", + "Äồng Leu Rumani (1952–2006)" + ], + "RON": [ + "RON", + "Leu Romania" + ], + "RSD": [ + "RSD", + "Dinar Serbia" + ], + "RUB": [ + "RUB", + "Rúp Nga" + ], + "RUR": [ + "RUR", + "Äồng Rúp Nga (1991–1998)" + ], + "RWF": [ + "RWF", + "Franc Rwanda" + ], + "SAR": [ + "SAR", + "Riyal Ả Rập Xê-út" + ], + "SBD": [ + "SBD", + "Äô la quần đảo Solomon" + ], + "SCR": [ + "SCR", + "Rupee Seychelles" + ], + "SDD": [ + "SDD", + "Äồng Dinar Sudan (1992–2007)" + ], + "SDG": [ + "SDG", + "Bảng Sudan" + ], + "SDP": [ + "SDP", + "Äồng Bảng Sudan (1957–1998)" + ], + "SEK": [ + "SEK", + "Krona Thụy Äiển" + ], + "SGD": [ + "SGD", + "Äô la Singapore" + ], + "SHP": [ + "SHP", + "Bảng St. Helena" + ], + "SIT": [ + "SIT", + "Tôla Xlôvênia" + ], + "SKK": [ + "SKK", + "Cuaron Xlôvác" + ], + "SLL": [ + "SLL", + "Leone Sierra Leone" + ], + "SOS": [ + "SOS", + "Schilling Somali" + ], + "SRD": [ + "SRD", + "Äô la Suriname" + ], + "SRG": [ + "SRG", + "Äồng Guilder Surinam" + ], + "SSP": [ + "SSP", + "Bảng Nam Sudan" + ], + "STD": [ + "STD", + "Dobra São Tomé và Príncipe" + ], + "SUR": [ + "SUR", + "Äồng Rúp Sô viết" + ], + "SVC": [ + "SVC", + "Colón El Salvador" + ], + "SYP": [ + "SYP", + "Bảng Syria" + ], + "SZL": [ + "SZL", + "Lilangeni Swaziland" + ], + "THB": [ + "฿", + "Bạt Thái Lan" + ], + "TJR": [ + "TJR", + "Äồng Rúp Tajikistan" + ], + "TJS": [ + "TJS", + "Somoni Tajikistan" + ], + "TMM": [ + "TMM", + "Äồng Manat Turkmenistan (1993–2009)" + ], + "TMT": [ + "TMT", + "Manat Turkmenistan" + ], + "TND": [ + "TND", + "Dinar Tunisia" + ], + "TOP": [ + "TOP", + "PaÊ»anga Tonga" + ], + "TPE": [ + "TPE", + "Äồng Escudo Timor" + ], + "TRL": [ + "TRL", + "Lia Thổ NhÄ© Kỳ (1922–2005)" + ], + "TRY": [ + "TRY", + "Lia Thổ NhÄ© Kỳ" + ], + "TTD": [ + "TTD", + "Äô la Trinidad và Tobago" + ], + "TWD": [ + "NT$", + "Äô la Äài Loan má»›i" + ], + "TZS": [ + "TZS", + "Shilling Tanzania" + ], + "UAH": [ + "UAH", + "Hryvnia Ucraina" + ], + "UAK": [ + "UAK", + "Äồng Karbovanets Ucraina" + ], + "UGS": [ + "UGS", + "Äồng Shilling Uganda (1966–1987)" + ], + "UGX": [ + "UGX", + "Shilling Uganda" + ], + "USD": [ + "US$", + "Äô la Mỹ" + ], + "USN": [ + "USN", + "Äô la Mỹ (Ngày tiếp theo)" + ], + "USS": [ + "USS", + "Äô la Mỹ (Cùng ngày)" + ], + "UYI": [ + "UYI", + "Äồng Peso Uruguay (ÄÆ¡n vị Theo chỉ số)" + ], + "UYP": [ + "UYP", + "Äồng Peso Uruguay (1975–1993)" + ], + "UYU": [ + "UYU", + "Peso Uruguay" + ], + "UZS": [ + "UZS", + "Som Uzbekistan" + ], + "VEB": [ + "VEB", + "Äồng bolívar cá»§a Venezuela (1871–2008)" + ], + "VEF": [ + "VEF", + "Bolívar Venezuela" + ], + "VND": [ + "â‚«", + "Äồng Việt Nam" + ], + "VNN": [ + "VNN", + "Äồng Việt Nam (1978–1985)" + ], + "VUV": [ + "VUV", + "Vatu Vanuatu" + ], + "WST": [ + "WST", + "Tala Samoa" + ], + "XAF": [ + "FCFA", + "Franc CFA Trung Phi" + ], + "XCD": [ + "EC$", + "Äô la Äông Caribê" + ], + "XEU": [ + "XEU", + "ÄÆ¡n vị Tiá»n Châu Âu" + ], + "XFO": [ + "XFO", + "Äồng France Pháp Vàng" + ], + "XFU": [ + "XFU", + "Äồng UIC-Franc Pháp" + ], + "XOF": [ + "CFA", + "Franc CFA Tây Phi" + ], + "XPF": [ + "CFPF", + "Franc CFP" + ], + "XRE": [ + "XRE", + "Quỹ RINET" + ], + "YDD": [ + "YDD", + "Äồng Dinar Yemen" + ], + "YER": [ + "YER", + "Rial Yemen" + ], + "YUD": [ + "YUD", + "Äồng Dinar Nam Tư Xu (1966–1990)" + ], + "YUM": [ + "YUM", + "Äồng Dinar Nam Tư Má»›i (1994–2002)" + ], + "YUN": [ + "YUN", + "Äồng Dinar Nam Tư Có thể chuyển đổi (1990–1992)" + ], + "YUR": [ + "YUR", + "Äồng Dinar Nam Tư Tái cÆ¡ cấu (1992–1993)" + ], + "ZAL": [ + "ZAL", + "Äồng Rand Nam Phi (tài chính)" + ], + "ZAR": [ + "ZAR", + "Rand Nam Phi" + ], + "ZMK": [ + "ZMK", + "Äồng kwacha cá»§a Zambia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kwacha Zambia" + ], + "ZRN": [ + "ZRN", + "Äồng Zaire Má»›i (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "Äồng Zaire (1971–1993)" + ], + "ZWD": [ + "ZWD", + "Äồng Äô la Zimbabwe (1980–2008)" + ], + "ZWL": [ + "ZWL", + "Äồng Äô la Zimbabwe (2009)" + ], + "ZWR": [ + "ZWR", + "Äồng Äô la Zimbabwe (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/yi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/yi.json new file mode 100644 index 0000000000000000000000000000000000000000..29c645d0c5ffa62d11f1728d4bd19b59106b4628 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/yi.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.27.97", + "Names": { + "BRL": [ + "R$", + "בר×זיל רע×ל" + ], + "BZD": [ + "BZD", + "בעליז ד×ל×ַר" + ], + "CHF": [ + "CHF", + "שווייצער פֿר×Ö·× ×§" + ], + "CNY": [ + "CNÂ¥", + "כינעזישער יו×ן" + ], + "EUR": [ + "€", + "×ייר×" + ], + "GBP": [ + "£", + "פֿונט שטערלינג" + ], + "INR": [ + "₹", + "×ינדישער רופי" + ], + "JPY": [ + "JPÂ¥", + "×™×פ×נעזישער יען" + ], + "RUB": [ + "RUB", + "רוסישער רובל" + ], + "SEK": [ + "SEK", + "שוועדישע קר×× ×¢" + ], + "USD": [ + "US$", + "×מעריק×נער ד×ל×ר" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/yo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/yo.json new file mode 100644 index 0000000000000000000000000000000000000000..6255d054b1c9d80ac0ec347b05b8467cf01e4a56 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/yo.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AED": [ + "AED", + "Diami ti Awon OrílẹÌède Arabu" + ], + "AOA": [ + "AOA", + "Wansa ti OrílẹÌède Àngólà" + ], + "AUD": [ + "A$", + "Dá»la ti OrílẹÌède Ãstràlìá" + ], + "BHD": [ + "BHD", + "Dina ti OrílẹÌède Báránì" + ], + "BIF": [ + "BIF", + "Faransi ti OrílẹÌède Bùùrúndì" + ], + "BWP": [ + "BWP", + "Pula ti OrílẹÌède Bá»Ì€tìsúwánà" + ], + "CAD": [ + "CA$", + "Dá»la ti OrílẹÌède Kánádà" + ], + "CDF": [ + "CDF", + "Faransi ti OrílẹÌède Kóngò" + ], + "CHF": [ + "CHF", + "Faransi ti OrílẹÌède Siwisi" + ], + "CNY": [ + "CNÂ¥", + "Reminibi ti OrílẹÌède ṣáínà" + ], + "CVE": [ + "CVE", + "Kabofediano ti OrílẹÌède Esuodo" + ], + "DJF": [ + "DJF", + "Faransi ti OrílẹÌède Dibouti" + ], + "DZD": [ + "DZD", + "Dina ti OrílẹÌède Àlùgèríánì" + ], + "EGP": [ + "EGP", + "pá»á»n ti OrílẹÌède Egipiti" + ], + "ERN": [ + "ERN", + "Nakifa ti OrílẹÌède Eriteriani" + ], + "ETB": [ + "ETB", + "Biri ti OrílẹÌède Eutopia" + ], + "EUR": [ + "€", + "Uro" + ], + "GBP": [ + "£", + "Pá»á»n ti OrílẹÌède Bírítísì" + ], + "GHC": [ + "GHC", + "á¹£idi ti OrílẹÌède Gana" + ], + "GMD": [ + "GMD", + "Dalasi ti OrílẹÌède Gamibia" + ], + "GNS": [ + "GNS", + "Faransi ti OrílẹÌède Gini" + ], + "INR": [ + "₹", + "Rupi ti OrílẹÌède Indina" + ], + "JPY": [ + "JPÂ¥", + "Yeni ti OrílẹÌède Japani" + ], + "KES": [ + "KES", + "á¹£iili ti OrílẹÌède Kenya" + ], + "KMF": [ + "KMF", + "Faransi ti OrílẹÌède á¹£omoriani" + ], + "LRD": [ + "LRD", + "Dá»la ti OrílẹÌède Liberia" + ], + "LSL": [ + "LSL", + "Loti ti OrílẹÌède Lesoto" + ], + "LYD": [ + "LYD", + "Dina ti OrílẹÌède Libiya" + ], + "MAD": [ + "MAD", + "Dirami ti OrílẹÌède Moroko" + ], + "MGA": [ + "MGA", + "Faransi ti OrílẹÌède Malagasi" + ], + "MRO": [ + "MRO", + "Ouguiya ti OrílẹÌède Maritania" + ], + "MUR": [ + "MUR", + "Rupi ti OrílẹÌède Maritiusi" + ], + "MWK": [ + "MWK", + "Kaá¹£a ti OrílẹÌède Malawi" + ], + "MZM": [ + "MZM", + "Metika ti OrílẹÌède Mosamibiki" + ], + "NAD": [ + "NAD", + "Dá»la ti OrílẹÌède Namibia" + ], + "NGN": [ + "₦", + "Naira ti OrílẹÌède Nàìjíríà" + ], + "RWF": [ + "RWF", + "Faransi ti OrílẹÌède Ruwanda" + ], + "SAR": [ + "SAR", + "Riya ti OrílẹÌède Saudi" + ], + "SCR": [ + "SCR", + "Rupi ti OrílẹÌède Sayiselesi" + ], + "SDG": [ + "SDG", + "Dina ti OrílẹÌède Sudani" + ], + "SDP": [ + "SDP", + "Pá»á»un ti OrílẹÌède Sudani" + ], + "SHP": [ + "SHP", + "Pá»á»un ti OrílẹÌède Ì£Elena" + ], + "SLL": [ + "SLL", + "Lioni" + ], + "SOS": [ + "SOS", + "Sile ti OrílẹÌède Somali" + ], + "STD": [ + "STD", + "Dobira ti OrílẹÌède Sao tome Ati Pirisipe" + ], + "SZL": [ + "SZL", + "Lilangeni" + ], + "TND": [ + "TND", + "Dina ti OrílẹÌède Tunisia" + ], + "TZS": [ + "TZS", + "Sile ti OrílẹÌède Tansania" + ], + "UGX": [ + "UGX", + "Siile ti OrílẹÌède Uganda" + ], + "USD": [ + "US$", + "Dá»la ti OrílẹÌède Amerika" + ], + "XAF": [ + "FCFA", + "Faransi ti OrílẹÌède BEKA" + ], + "XOF": [ + "CFA", + "Faransi ti OrílẹÌède BIKEAO" + ], + "ZAR": [ + "ZAR", + "Randi ti OrílẹÌède Ariwa Afirika" + ], + "ZMK": [ + "ZMK", + "Kawaá¹£a ti OrílẹÌède Saabia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kawaá¹£a ti OrílẹÌède Saabia" + ], + "ZWD": [ + "ZWD", + "Dá»la ti OrílẹÌède Siibabuwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/yo_BJ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/yo_BJ.json new file mode 100644 index 0000000000000000000000000000000000000000..0a7177cfa047315f50c8b0ee7036af63100c7522 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/yo_BJ.json @@ -0,0 +1,217 @@ +{ + "Version": "2.1.29.54", + "Names": { + "AED": [ + "AED", + "Diami ti Awon OrílÉ›Ìède Arabu" + ], + "AOA": [ + "AOA", + "Wansa ti OrílÉ›Ìède Àngólà" + ], + "AUD": [ + "A$", + "DÉ”la ti OrílÉ›Ìède Ãstràlìá" + ], + "BHD": [ + "BHD", + "Dina ti OrílÉ›Ìède Báránì" + ], + "BIF": [ + "BIF", + "Faransi ti OrílÉ›Ìède Bùùrúndì" + ], + "BWP": [ + "BWP", + "Pula ti OrílÉ›Ìède Bɔ̀tìsúwánà" + ], + "CAD": [ + "CA$", + "DÉ”la ti OrílÉ›Ìède Kánádà" + ], + "CDF": [ + "CDF", + "Faransi ti OrílÉ›Ìède Kóngò" + ], + "CHF": [ + "CHF", + "Faransi ti OrílÉ›Ìède Siwisi" + ], + "CNY": [ + "CNÂ¥", + "Reminibi ti OrílÉ›Ìède sháínà" + ], + "CVE": [ + "CVE", + "Kabofediano ti OrílÉ›Ìède Esuodo" + ], + "DJF": [ + "DJF", + "Faransi ti OrílÉ›Ìède Dibouti" + ], + "DZD": [ + "DZD", + "Dina ti OrílÉ›Ìède Àlùgèríánì" + ], + "EGP": [ + "EGP", + "pɔɔn ti OrílÉ›Ìède Egipiti" + ], + "ERN": [ + "ERN", + "Nakifa ti OrílÉ›Ìède Eriteriani" + ], + "ETB": [ + "ETB", + "Biri ti OrílÉ›Ìède Eutopia" + ], + "GBP": [ + "£", + "Pɔɔn ti OrílÉ›Ìède Bírítísì" + ], + "GHC": [ + "GHC", + "shidi ti OrílÉ›Ìède Gana" + ], + "GMD": [ + "GMD", + "Dalasi ti OrílÉ›Ìède Gamibia" + ], + "GNS": [ + "GNS", + "Faransi ti OrílÉ›Ìède Gini" + ], + "INR": [ + "₹", + "Rupi ti OrílÉ›Ìède Indina" + ], + "JPY": [ + "JPÂ¥", + "Yeni ti OrílÉ›Ìède Japani" + ], + "KES": [ + "KES", + "shiili ti OrílÉ›Ìède Kenya" + ], + "KMF": [ + "KMF", + "Faransi ti OrílÉ›Ìède shomoriani" + ], + "LRD": [ + "LRD", + "DÉ”la ti OrílÉ›Ìède Liberia" + ], + "LSL": [ + "LSL", + "Loti ti OrílÉ›Ìède Lesoto" + ], + "LYD": [ + "LYD", + "Dina ti OrílÉ›Ìède Libiya" + ], + "MAD": [ + "MAD", + "Dirami ti OrílÉ›Ìède Moroko" + ], + "MGA": [ + "MGA", + "Faransi ti OrílÉ›Ìède Malagasi" + ], + "MRO": [ + "MRO", + "Ouguiya ti OrílÉ›Ìède Maritania" + ], + "MUR": [ + "MUR", + "Rupi ti OrílÉ›Ìède Maritiusi" + ], + "MWK": [ + "MWK", + "Kasha ti OrílÉ›Ìède Malawi" + ], + "MZM": [ + "MZM", + "Metika ti OrílÉ›Ìède Mosamibiki" + ], + "NAD": [ + "NAD", + "DÉ”la ti OrílÉ›Ìède Namibia" + ], + "NGN": [ + "₦", + "Naira ti OrílÉ›Ìède Nàìjíríà" + ], + "RWF": [ + "RWF", + "Faransi ti OrílÉ›Ìède Ruwanda" + ], + "SAR": [ + "SAR", + "Riya ti OrílÉ›Ìède Saudi" + ], + "SCR": [ + "SCR", + "Rupi ti OrílÉ›Ìède Sayiselesi" + ], + "SDG": [ + "SDG", + "Dina ti OrílÉ›Ìède Sudani" + ], + "SDP": [ + "SDP", + "Pɔɔun ti OrílÉ›Ìède Sudani" + ], + "SHP": [ + "SHP", + "Pɔɔun ti OrílÉ›Ìède Ì£Elena" + ], + "SOS": [ + "SOS", + "Sile ti OrílÉ›Ìède Somali" + ], + "STD": [ + "STD", + "Dobira ti OrílÉ›Ìède Sao tome Ati Pirisipe" + ], + "TND": [ + "TND", + "Dina ti OrílÉ›Ìède Tunisia" + ], + "TZS": [ + "TZS", + "Sile ti OrílÉ›Ìède Tansania" + ], + "UGX": [ + "UGX", + "Siile ti OrílÉ›Ìède Uganda" + ], + "USD": [ + "US$", + "DÉ”la ti OrílÉ›Ìède Amerika" + ], + "XAF": [ + "FCFA", + "Faransi ti OrílÉ›Ìède BEKA" + ], + "XOF": [ + "CFA", + "Faransi ti OrílÉ›Ìède BIKEAO" + ], + "ZAR": [ + "ZAR", + "Randi ti OrílÉ›Ìède Ariwa Afirika" + ], + "ZMK": [ + "ZMK", + "Kawasha ti OrílÉ›Ìède Saabia (1968–2012)" + ], + "ZMW": [ + "ZMW", + "Kawasha ti OrílÉ›Ìède Saabia" + ], + "ZWD": [ + "ZWD", + "DÉ”la ti OrílÉ›Ìède Siibabuwe" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh.json new file mode 100644 index 0000000000000000000000000000000000000000..cb70f59e4a8b6e8999e880ba9c34b336a56036cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh.json @@ -0,0 +1,1141 @@ +{ + "Version": "2.1.29.84", + "Names": { + "ADP": [ + "ADP", + "安é“尔比塞塔" + ], + "AED": [ + "AED", + "阿è”酋迪拉姆" + ], + "AFA": [ + "AFA", + "阿富汗尼 (1927–2002)" + ], + "AFN": [ + "AFN", + "阿富汗尼" + ], + "ALK": [ + "ALK", + "阿尔巴尼亚列克(1946–1965)" + ], + "ALL": [ + "ALL", + "阿尔巴尼亚列克" + ], + "AMD": [ + "AMD", + "亚美尼亚德拉姆" + ], + "ANG": [ + "ANG", + "è·å±žå®‰çš„列斯盾" + ], + "AOA": [ + "AOA", + "安哥拉宽扎" + ], + "AOK": [ + "AOK", + "安哥拉宽扎 (1977–1990)" + ], + "AON": [ + "AON", + "安哥拉新宽扎 (1990–2000)" + ], + "AOR": [ + "AOR", + "å®‰å“¥æ‹‰é‡æ–°è°ƒæ•´å®½æ‰Ž (1995–1999)" + ], + "ARA": [ + "ARA", + "阿根廷奥斯特拉尔" + ], + "ARL": [ + "ARL", + "阿根廷法定比索 (1970–1983)" + ], + "ARM": [ + "ARM", + "阿根廷比索 (1881–1970)" + ], + "ARP": [ + "ARP", + "阿根廷比索 (1983–1985)" + ], + "ARS": [ + "ARS", + "阿根廷比索" + ], + "ATS": [ + "ATS", + "奥地利先令" + ], + "AUD": [ + "AU$", + "澳大利亚元" + ], + "AWG": [ + "AWG", + "阿é²å·´å¼—ç½—æž—" + ], + "AZM": [ + "AZM", + "阿塞拜疆马纳特 (1993–2006)" + ], + "AZN": [ + "AZN", + "阿塞拜疆马纳特" + ], + "BAD": [ + "BAD", + "波士尼亚-赫塞哥维纳第纳尔 (1992–1994)" + ], + "BAM": [ + "BAM", + "波斯尼亚-黑塞哥维那å¯å…‘æ¢é©¬å…‹" + ], + "BAN": [ + "BAN", + "波士尼亚-赫塞哥维纳新第纳尔 (1994–1997)" + ], + "BBD": [ + "BBD", + "巴巴多斯元" + ], + "BDT": [ + "BDT", + "孟加拉塔å¡" + ], + "BEC": [ + "BEC", + "比利时法郎(å¯å…‘æ¢ï¼‰" + ], + "BEF": [ + "BEF", + "比利时法郎" + ], + "BEL": [ + "BEL", + "比利时法郎(金èžï¼‰" + ], + "BGL": [ + "BGL", + "ä¿åŠ åˆ©äºšç¡¬åˆ—å¼—" + ], + "BGM": [ + "BGM", + "ä¿åŠ åˆ©äºšç¤¾ä¼šå…šåˆ—å¼—" + ], + "BGN": [ + "BGN", + "ä¿åŠ åˆ©äºšåˆ—å¼—" + ], + "BGO": [ + "BGO", + "ä¿åŠ åˆ©äºšåˆ—å¼— (1879–1952)" + ], + "BHD": [ + "BHD", + "巴林第纳尔" + ], + "BIF": [ + "BIF", + "布隆迪法郎" + ], + "BMD": [ + "BMD", + "百慕大元" + ], + "BND": [ + "BND", + "文莱元" + ], + "BOB": [ + "BOB", + "玻利维亚诺" + ], + "BOL": [ + "BOL", + "玻利维亚诺 (1863–1963)" + ], + "BOP": [ + "BOP", + "玻利维亚比索" + ], + "BOV": [ + "BOV", + "玻利维亚 Mvdol(资金)" + ], + "BRB": [ + "BRB", + "巴西新克é²èµ›ç½— (1967–1986)" + ], + "BRC": [ + "BRC", + "å·´è¥¿å…‹é²æ‰Žå¤š (1986–1989)" + ], + "BRE": [ + "BRE", + "巴西克é²å¡žç½— (1990–1993)" + ], + "BRL": [ + "R$", + "巴西雷亚尔" + ], + "BRN": [ + "BRN", + "å·´è¥¿æ–°å…‹é²æ‰Žå¤š (1989–1990)" + ], + "BRR": [ + "BRR", + "巴西克é²å¡žç½— (1993–1994)" + ], + "BRZ": [ + "BRZ", + "巴西克é²å¡žç½— (1942–1967)" + ], + "BSD": [ + "BSD", + "巴哈马元" + ], + "BTN": [ + "BTN", + "ä¸ä¸¹åŠªå°”ç‰¹é²å§†" + ], + "BUK": [ + "BUK", + "ç¼…å…ƒ" + ], + "BWP": [ + "BWP", + "åšèŒ¨ç“¦çº³æ™®æ‹‰" + ], + "BYB": [ + "BYB", + "白俄罗斯新å¢å¸ƒ (1994–1999)" + ], + "BYN": [ + "BYN", + "白俄罗斯å¢å¸ƒ" + ], + "BYR": [ + "BYR", + "白俄罗斯å¢å¸ƒ (2000–2016)" + ], + "BZD": [ + "BZD", + "伯利兹元" + ], + "CAD": [ + "CA$", + "加拿大元" + ], + "CDF": [ + "CDF", + "刚果法郎" + ], + "CHE": [ + "CHE", + "欧元 (WIR)" + ], + "CHF": [ + "CHF", + "瑞士法郎" + ], + "CHW": [ + "CHW", + "法郎 (WIR)" + ], + "CLE": [ + "CLE", + "智利埃斯库多" + ], + "CLF": [ + "CLF", + "智利(资金)" + ], + "CLP": [ + "CLP", + "智利比索" + ], + "CNY": [ + "ï¿¥", + "人民å¸" + ], + "COP": [ + "COP", + "哥伦比亚比索" + ], + "COU": [ + "COU", + "哥伦比亚å¸" + ], + "CRC": [ + "CRC", + "哥斯达黎加科朗" + ], + "CSD": [ + "CSD", + "旧塞尔维亚第纳尔" + ], + "CSK": [ + "CSK", + "æ·å…‹ç¡¬å…‹æœ—" + ], + "CUC": [ + "CUC", + "å¤å·´å¯å…‘æ¢æ¯”ç´¢" + ], + "CUP": [ + "CUP", + "å¤å·´æ¯”ç´¢" + ], + "CVE": [ + "CVE", + "佛得角埃斯库多" + ], + "CYP": [ + "CYP", + "塞浦路斯镑" + ], + "CZK": [ + "CZK", + "æ·å…‹å…‹æœ—" + ], + "DDM": [ + "DDM", + "东德奥斯特马克" + ], + "DEM": [ + "DEM", + "德国马克" + ], + "DJF": [ + "DJF", + "å‰å¸ƒææ³•郎" + ], + "DKK": [ + "DKK", + "丹麦克朗" + ], + "DOP": [ + "DOP", + "多米尼加比索" + ], + "DZD": [ + "DZD", + "阿尔åŠåˆ©äºšç¬¬çº³å°”" + ], + "ECS": [ + "ECS", + "厄瓜多尔è‹å…‹é›·" + ], + "ECV": [ + "ECV", + "厄瓜多尔 (UVC)" + ], + "EEK": [ + "EEK", + "爱沙尼亚克朗" + ], + "EGP": [ + "EGP", + "埃åŠé•‘" + ], + "ERN": [ + "ERN", + "厄立特里亚纳克法" + ], + "ESA": [ + "ESA", + "西ç­ç‰™æ¯”å¡žå¡”ï¼ˆå¸æˆ· A)" + ], + "ESB": [ + "ESB", + "西ç­ç‰™æ¯”塞塔(兑æ¢å¸æˆ·ï¼‰" + ], + "ESP": [ + "ESP", + "西ç­ç‰™æ¯”塞塔" + ], + "ETB": [ + "ETB", + "埃塞俄比亚比尔" + ], + "EUR": [ + "€", + "欧元" + ], + "FIM": [ + "FIM", + "芬兰马克" + ], + "FJD": [ + "FJD", + "æ–æµŽå…ƒ" + ], + "FKP": [ + "FKP", + "ç¦å…‹å…°ç¾¤å²›é•‘" + ], + "FRF": [ + "FRF", + "法国法郎" + ], + "GBP": [ + "£", + "英镑" + ], + "GEK": [ + "GEK", + "乔治亚库蓬拉瑞特" + ], + "GEL": [ + "GEL", + "æ ¼é²å‰äºšæ‹‰é‡Œ" + ], + "GHC": [ + "GHC", + "加纳塞第" + ], + "GHS": [ + "GHS", + "加纳塞地" + ], + "GIP": [ + "GIP", + "直布罗陀镑" + ], + "GMD": [ + "GMD", + "冈比亚达拉西" + ], + "GNF": [ + "GNF", + "几内亚法郎" + ], + "GNS": [ + "GNS", + "几内亚西里" + ], + "GQE": [ + "GQE", + "赤é“几内亚埃奎勒" + ], + "GRD": [ + "GRD", + "希腊德拉克马" + ], + "GTQ": [ + "GTQ", + "å±åœ°é©¬æ‹‰æ ¼æŸ¥å°”" + ], + "GWE": [ + "GWE", + "è‘¡è„牙几内亚埃斯库多" + ], + "GWP": [ + "GWP", + "å‡ å†…äºšæ¯”ç»æ¯”ç´¢" + ], + "GYD": [ + "GYD", + "圭亚那元" + ], + "HKD": [ + "HK$", + "港元" + ], + "HNL": [ + "HNL", + "洪都拉斯伦皮拉" + ], + "HRD": [ + "HRD", + "克罗地亚第纳尔" + ], + "HRK": [ + "HRK", + "克罗地亚库纳" + ], + "HTG": [ + "HTG", + "海地å¤å¾·" + ], + "HUF": [ + "HUF", + "åŒˆç‰™åˆ©ç¦æž—" + ], + "IDR": [ + "IDR", + "å°åº¦å°¼è¥¿äºšç›¾" + ], + "IEP": [ + "IEP", + "爱尔兰镑" + ], + "ILP": [ + "ILP", + "以色列镑" + ], + "ILR": [ + "ILS", + "以色列谢克尔(1980–1985)" + ], + "ILS": [ + "₪", + "以色列新谢克尔" + ], + "INR": [ + "₹", + "å°åº¦å¢æ¯”" + ], + "IQD": [ + "IQD", + "伊拉克第纳尔" + ], + "IRR": [ + "IRR", + "伊朗里亚尔" + ], + "ISJ": [ + "ISJ", + "冰岛克朗(1918–1981)" + ], + "ISK": [ + "ISK", + "冰岛克朗" + ], + "ITL": [ + "ITL", + "æ„大利里拉" + ], + "JMD": [ + "JMD", + "牙买加元" + ], + "JOD": [ + "JOD", + "约旦第纳尔" + ], + "JPY": [ + "JPÂ¥", + "日元" + ], + "KES": [ + "KES", + "肯尼亚先令" + ], + "KGS": [ + "KGS", + "å‰å°”剿–¯æ–¯å¦ç´¢å§†" + ], + "KHR": [ + "KHR", + "柬埔寨瑞尔" + ], + "KMF": [ + "KMF", + "科摩罗法郎" + ], + "KPW": [ + "KPW", + "æœé²œå…ƒ" + ], + "KRH": [ + "KRH", + "韩元 (1953–1962)" + ], + "KRO": [ + "KRO", + "韩元 (1945–1953)" + ], + "KRW": [ + "₩", + "韩元" + ], + "KWD": [ + "KWD", + "ç§‘å¨ç‰¹ç¬¬çº³å°”" + ], + "KYD": [ + "KYD", + "开曼元" + ], + "KZT": [ + "KZT", + "哈è¨å…‹æ–¯å¦åšæˆˆ" + ], + "LAK": [ + "LAK", + "è€æŒåŸºæ™®" + ], + "LBP": [ + "LBP", + "黎巴嫩镑" + ], + "LKR": [ + "LKR", + "斯里兰å¡å¢æ¯”" + ], + "LRD": [ + "LRD", + "利比里亚元" + ], + "LSL": [ + "LSL", + "莱索托洛蒂" + ], + "LTL": [ + "LTL", + "立陶宛立特" + ], + "LTT": [ + "LTT", + "立陶宛塔咯å‘å¸" + ], + "LUC": [ + "LUC", + "墿£®å ¡å¯å…‘æ¢æ³•郎" + ], + "LUF": [ + "LUF", + "墿£®å ¡æ³•郎" + ], + "LUL": [ + "LUL", + "墿£®å ¡é‡‘èžæ³•郎" + ], + "LVL": [ + "LVL", + "拉脱维亚拉特" + ], + "LVR": [ + "LVR", + "拉脱维亚å¢å¸ƒ" + ], + "LYD": [ + "LYD", + "利比亚第纳尔" + ], + "MAD": [ + "MAD", + "摩洛哥迪拉姆" + ], + "MAF": [ + "MAF", + "摩洛哥法郎" + ], + "MCF": [ + "MCF", + "摩纳哥法郎" + ], + "MDC": [ + "MDC", + "摩尔多瓦库邦" + ], + "MDL": [ + "MDL", + "摩尔多瓦列伊" + ], + "MGA": [ + "MGA", + "马达加斯加阿里亚里" + ], + "MGF": [ + "MGF", + "马达加斯加法郎" + ], + "MKD": [ + "MKD", + "马其顿第纳尔" + ], + "MKN": [ + "MKN", + "马其顿第纳尔 (1992–1993)" + ], + "MLF": [ + "MLF", + "马里法郎" + ], + "MMK": [ + "MMK", + "缅甸元" + ], + "MNT": [ + "MNT", + "è’™å¤å›¾æ ¼é‡Œå…‹" + ], + "MOP": [ + "MOP", + "澳门å¸" + ], + "MRO": [ + "MRO", + "毛里塔尼亚乌å‰äºš" + ], + "MTL": [ + "MTL", + "马耳他里拉" + ], + "MTP": [ + "MTP", + "马耳他镑" + ], + "MUR": [ + "MUR", + "æ¯›é‡Œæ±‚æ–¯å¢æ¯”" + ], + "MVP": [ + "MVP", + "马尔代夫墿¯”(1947–1981)" + ], + "MVR": [ + "MVR", + "马尔代夫å¢è²äºš" + ], + "MWK": [ + "MWK", + "马拉维克瓦查" + ], + "MXN": [ + "MX$", + "墨西哥比索" + ], + "MXP": [ + "MXP", + "墨西哥银比索 (1861–1992)" + ], + "MXV": [ + "MXV", + "墨西哥(资金)" + ], + "MYR": [ + "MYR", + "马æ¥è¥¿äºšæž—å‰ç‰¹" + ], + "MZE": [ + "MZE", + "莫桑比克埃斯库多" + ], + "MZM": [ + "MZM", + "旧莫桑比克美æå¡" + ], + "MZN": [ + "MZN", + "莫桑比克美æå¡" + ], + "NAD": [ + "NAD", + "纳米比亚元" + ], + "NGN": [ + "NGN", + "尼日利亚奈拉" + ], + "NIC": [ + "NIC", + "尼加拉瓜科多巴 (1988–1991)" + ], + "NIO": [ + "NIO", + "尼加拉瓜科多巴" + ], + "NLG": [ + "NLG", + "è·å…°ç›¾" + ], + "NOK": [ + "NOK", + "挪å¨å…‹æœ—" + ], + "NPR": [ + "NPR", + "å°¼æ³Šå°”å¢æ¯”" + ], + "NZD": [ + "NZ$", + "新西兰元" + ], + "OMR": [ + "OMR", + "阿曼里亚尔" + ], + "PAB": [ + "PAB", + "巴拿马巴波亚" + ], + "PEI": [ + "PEI", + "秘é²å°ç¬¬" + ], + "PEN": [ + "PEN", + "ç§˜é²æ–°ç´¢å°”" + ], + "PES": [ + "PES", + "秘é²ç´¢å°” (1863–1965)" + ], + "PGK": [ + "PGK", + "巴布亚新几内亚基那" + ], + "PHP": [ + "PHP", + "è²å¾‹å®¾æ¯”ç´¢" + ], + "PKR": [ + "PKR", + "巴基斯å¦å¢æ¯”" + ], + "PLN": [ + "PLN", + "波兰兹罗æ" + ], + "PLZ": [ + "PLZ", + "波兰兹罗æ (1950–1995)" + ], + "PTE": [ + "PTE", + "è‘¡è„牙埃斯库多" + ], + "PYG": [ + "PYG", + "巴拉圭瓜拉尼" + ], + "QAR": [ + "QAR", + "å¡å¡”尔里亚尔" + ], + "RHD": [ + "RHD", + "罗得西亚元" + ], + "ROL": [ + "ROL", + "旧罗马尼亚列伊" + ], + "RON": [ + "RON", + "罗马尼亚列伊" + ], + "RSD": [ + "RSD", + "塞尔维亚第纳尔" + ], + "RUB": [ + "RUB", + "ä¿„ç½—æ–¯å¢å¸ƒ" + ], + "RUR": [ + "RUR", + "俄国å¢å¸ƒ (1991–1998)" + ], + "RWF": [ + "RWF", + "墿—ºè¾¾æ³•郎" + ], + "SAR": [ + "SAR", + "沙特里亚尔" + ], + "SBD": [ + "SBD", + "所罗门群岛元" + ], + "SCR": [ + "SCR", + "å¡žèˆŒå°”å¢æ¯”" + ], + "SDD": [ + "SDD", + "è‹ä¸¹ç¬¬çº³å°” (1992–2007)" + ], + "SDG": [ + "SDG", + "è‹ä¸¹é•‘" + ], + "SDP": [ + "SDP", + "æ—§è‹ä¸¹é•‘" + ], + "SEK": [ + "SEK", + "瑞典克朗" + ], + "SGD": [ + "SGD", + "新加å¡å…ƒ" + ], + "SHP": [ + "SHP", + "圣赫勒拿群岛磅" + ], + "SIT": [ + "SIT", + "斯洛文尼亚托拉尔" + ], + "SKK": [ + "SKK", + "斯洛ä¼å…‹å…‹æœ—" + ], + "SLL": [ + "SLL", + "塞拉利昂利昂" + ], + "SOS": [ + "SOS", + "索马里先令" + ], + "SRD": [ + "SRD", + "è‹é‡Œå—å…ƒ" + ], + "SRG": [ + "SRG", + "è‹é‡Œå—盾" + ], + "SSP": [ + "SSP", + "å—è‹ä¸¹é•‘" + ], + "STD": [ + "STD", + "圣多美和普林西比多布拉" + ], + "SUR": [ + "SUR", + "è‹è”å¢å¸ƒ" + ], + "SVC": [ + "SVC", + "è¨å°”瓦多科朗" + ], + "SYP": [ + "SYP", + "å™åˆ©äºšé•‘" + ], + "SZL": [ + "SZL", + "æ–¯å¨å£«å…°é‡Œå…°å‰å°¼" + ], + "THB": [ + "THB", + "æ³°é“¢" + ], + "TJR": [ + "TJR", + "å¡”å‰å…‹æ–¯å¦å¢å¸ƒ" + ], + "TJS": [ + "TJS", + "å¡”å‰å…‹æ–¯å¦ç´¢èޫ尼" + ], + "TMM": [ + "TMM", + "土库曼斯å¦é©¬çº³ç‰¹ (1993–2009)" + ], + "TMT": [ + "TMT", + "土库曼斯å¦é©¬çº³ç‰¹" + ], + "TND": [ + "TND", + "çªå°¼æ–¯ç¬¬çº³å°”" + ], + "TOP": [ + "TOP", + "汤加潘加" + ], + "TPE": [ + "TPE", + "叿±¶åŸƒæ–¯åº“多" + ], + "TRL": [ + "TRL", + "土耳其里拉 (1922–2005)" + ], + "TRY": [ + "TRY", + "土耳其里拉" + ], + "TTD": [ + "TTD", + "特立尼达和多巴哥元" + ], + "TWD": [ + "NT$", + "æ–°å°å¸" + ], + "TZS": [ + "TZS", + "妿¡‘尼亚先令" + ], + "UAH": [ + "UAH", + "乌克兰格里夫纳" + ], + "UAK": [ + "UAK", + "乌克兰å¸" + ], + "UGS": [ + "UGS", + "乌干达先令 (1966–1987)" + ], + "UGX": [ + "UGX", + "乌干达先令" + ], + "USD": [ + "US$", + "美元" + ], + "USN": [ + "USN", + "美元(次日)" + ], + "USS": [ + "USS", + "美元(当日)" + ], + "UYI": [ + "UYI", + "乌拉圭比索(索引å•ä½ï¼‰" + ], + "UYP": [ + "UYP", + "乌拉圭比索 (1975–1993)" + ], + "UYU": [ + "UYU", + "乌拉圭比索" + ], + "UZS": [ + "UZS", + "乌兹别克斯å¦è‹å§†" + ], + "VEB": [ + "VEB", + "委内瑞拉玻利瓦尔 (1871–2008)" + ], + "VEF": [ + "VEF", + "委内瑞拉玻利瓦尔" + ], + "VND": [ + "â‚«", + "è¶Šå—盾" + ], + "VNN": [ + "VNN", + "è¶Šå—盾 (1978–1985)" + ], + "VUV": [ + "VUV", + "瓦努阿图瓦图" + ], + "WST": [ + "WST", + "è¨æ‘©äºšå¡”拉" + ], + "XAF": [ + "FCFA", + "ä¸­éžæ³•郎" + ], + "XCD": [ + "EC$", + "东加勒比元" + ], + "XEU": [ + "XEU", + "欧洲货å¸å•ä½" + ], + "XFO": [ + "XFO", + "法国金法郎" + ], + "XFU": [ + "XFU", + "法国法郎 (UIC)" + ], + "XOF": [ + "CFA", + "è¥¿éžæ³•郎" + ], + "XPF": [ + "CFPF", + "太平洋法郎" + ], + "XRE": [ + "XRE", + "RINET 基金" + ], + "YDD": [ + "YDD", + "也门第纳尔" + ], + "YER": [ + "YER", + "也门里亚尔" + ], + "YUD": [ + "YUD", + "å—æ–¯æ‹‰å¤«ç¡¬ç¬¬çº³å°” (1966–1990)" + ], + "YUM": [ + "YUM", + "å—æ–¯æ‹‰å¤«æ–°ç¬¬çº³å°” (1994–2002)" + ], + "YUN": [ + "YUN", + "å—æ–¯æ‹‰å¤«å¯å…‘æ¢ç¬¬çº³å°” (1990–1992)" + ], + "YUR": [ + "YUR", + "å—æ–¯æ‹‰å¤«æ”¹è‰¯ç¬¬çº³å°” (1992–1993)" + ], + "ZAL": [ + "ZAL", + "å—éžå…°ç‰¹ (金èž)" + ], + "ZAR": [ + "ZAR", + "å—éžå…°ç‰¹" + ], + "ZMK": [ + "ZMK", + "赞比亚克瓦查 (1968–2012)" + ], + "ZMW": [ + "ZMW", + "赞比亚克瓦查" + ], + "ZRN": [ + "ZRN", + "新扎伊尔 (1993–1998)" + ], + "ZRZ": [ + "ZRZ", + "扎伊尔 (1971–1993)" + ], + "ZWD": [ + "ZWD", + "津巴布韦元 (1980–2008)" + ], + "ZWL": [ + "ZWL", + "津巴布韦元 (2009)" + ], + "ZWR": [ + "ZWR", + "津巴布韦元 (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_HK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_HK.json new file mode 100644 index 0000000000000000000000000000000000000000..8d1392dd36e5b515790c837e05e2c71a0ce5aeaa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_HK.json @@ -0,0 +1,257 @@ +{ + "Version": "2.1.27.99", + "Names": { + "AED": [ + "AED", + "阿拉伯è¯åˆé…‹é•·åœ‹è¿ªçˆ¾æ±—" + ], + "AUD": [ + "AU$", + "澳元" + ], + "AWG": [ + "AWG", + "阿魯巴盾" + ], + "AZN": [ + "AZN", + "亞塞拜疆馬ç´ç‰¹" + ], + "BAD": [ + "BAD", + "波斯尼亞-赫塞哥維ç´ç¬¬ç´çˆ¾" + ], + "BAM": [ + "BAM", + "波斯尼亞-赫塞哥維ç´å¯è½‰æ›é¦¬å…‹" + ], + "BBD": [ + "BBD", + "巴巴多斯元" + ], + "BIF": [ + "BIF", + "布隆迪法郎" + ], + "BWP": [ + "BWP", + "åšèŒ¨ç“¦ç´æ™®æ‹‰" + ], + "BZD": [ + "BZD", + "伯利茲元" + ], + "CAD": [ + "CA$", + "加拿大元" + ], + "CRC": [ + "CRC", + "哥斯é”黎加科郎" + ], + "CVE": [ + "CVE", + "佛得角埃斯庫多" + ], + "DJF": [ + "DJF", + "å‰å¸ƒææ³•郎" + ], + "DOP": [ + "DOP", + "多米尼加披索" + ], + "ETB": [ + "ETB", + "埃塞俄比亞比爾" + ], + "GEL": [ + "GEL", + "格魯å‰äºžæ‹‰é‡Œ" + ], + "GHS": [ + "GHS", + "加ç´å¡žåœ°" + ], + "GMD": [ + "GMD", + "å²¡æ¯”äºžé”æ‹‰è¥¿" + ], + "GTQ": [ + "GTQ", + "å±åœ°é¦¬æ‹‰æ ¼æŸ¥çˆ¾" + ], + "HKD": [ + "HK$", + "港元" + ], + "HRK": [ + "HRK", + "克羅地亞庫ç´" + ], + "ITL": [ + "ITL", + "æ„大利里拉" + ], + "KES": [ + "KES", + "肯雅先令" + ], + "KHR": [ + "KHR", + "柬埔寨里爾" + ], + "KPW": [ + "KPW", + "北韓圜" + ], + "KRW": [ + "â‚©", + "韓圓" + ], + "KZT": [ + "KZT", + "哈薩克å¦å‰" + ], + "LAK": [ + "LAK", + "è€æ’¾åŸºæ™®" + ], + "LRD": [ + "LRD", + "利比利亞元" + ], + "MDL": [ + "MDL", + "摩爾多瓦列伊" + ], + "MRO": [ + "MRO", + "毛里塔尼亞çƒå‰äºž" + ], + "MUR": [ + "MUR", + "毛里裘斯盧布" + ], + "MVR": [ + "MVR", + "馬爾代夫盧éžäºž" + ], + "MZN": [ + "MZN", + "莫桑比克梅蒂å¡çˆ¾" + ], + "NGN": [ + "NGN", + "尼日利亞奈拉" + ], + "NZD": [ + "NZ$", + "ç´è¥¿è˜­å…ƒ" + ], + "OMR": [ + "OMR", + "阿曼里奧" + ], + "PGK": [ + "PGK", + "巴布亞新幾內亞基那" + ], + "QAR": [ + "QAR", + "å¡å¡”爾里亞爾" + ], + "RSD": [ + "RSD", + "塞爾維亞第ç´çˆ¾" + ], + "RWF": [ + "RWF", + "ç›§æ—ºé”æ³•郎" + ], + "SAR": [ + "SAR", + "沙特阿拉伯里亞爾" + ], + "SBD": [ + "SBD", + "所羅門群島元" + ], + "SCR": [ + "SCR", + "塞舌爾盧比" + ], + "SGD": [ + "SGD", + "新加å¡å…ƒ" + ], + "SLL": [ + "SLL", + "塞拉利昂利昂" + ], + "SOS": [ + "SOS", + "索馬里先令" + ], + "SRD": [ + "SRD", + "蘇里å—å…ƒ" + ], + "STD": [ + "STD", + "è–多美和普林西比多布拉" + ], + "SYP": [ + "SYP", + "æ•利亞鎊" + ], + "SZL": [ + "SZL", + "æ–¯å¨å£«è˜­é‡Œæœ—å‰å°¼" + ], + "TOP": [ + "TOP", + "湯加潘加" + ], + "TTD": [ + "TTD", + "åƒé‡Œé”和多巴哥元" + ], + "TWD": [ + "NT$", + "æ–°å°å¹£" + ], + "TZS": [ + "TZS", + "妿¡‘尼亞先令" + ], + "VUV": [ + "VUV", + "瓦努阿圖瓦圖" + ], + "XAF": [ + "FCFA", + "ä¸­éžæ³•郎" + ], + "XCD": [ + "EC$", + "æ±åŠ å‹’æ¯”å…ƒ" + ], + "XOF": [ + "CFA", + "å¤šå“¥éžæ´²å…±åŒé«”法郎" + ], + "XPF": [ + "CFPF", + "太平洋法郎" + ], + "YER": [ + "YER", + "也門里雅" + ], + "ZMW": [ + "ZMW", + "贊比亞克瓦查" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hans_HK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hans_HK.json new file mode 100644 index 0000000000000000000000000000000000000000..b5e8f8743dc52941c79d23922d4a21d95806aec0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hans_HK.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.99", + "Names": { + "CNY": [ + "CNÂ¥", + "人民å¸" + ], + "KYD": [ + "KYD", + "开曼群岛元" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hans_MO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hans_MO.json new file mode 100644 index 0000000000000000000000000000000000000000..b6e2805fea556bc9e8e8f2f5c21a92f5a9a9ac2d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hans_MO.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.99", + "Names": { + "CNY": [ + "CNÂ¥", + "人民å¸" + ], + "MOP": [ + "MOP$", + "澳门å¸" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hans_SG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hans_SG.json new file mode 100644 index 0000000000000000000000000000000000000000..a30758e677cf06fb25105260059a171f35468600 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hans_SG.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.99", + "Names": { + "CNY": [ + "CNÂ¥", + "人民å¸" + ], + "SGD": [ + "$", + "新加å¡å…ƒ" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hant.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hant.json new file mode 100644 index 0000000000000000000000000000000000000000..13dfe0172797da652e3561f5baaa2c0a61984985 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hant.json @@ -0,0 +1,1145 @@ +{ + "Version": "2.1.28.79", + "Names": { + "ADP": [ + "ADP", + "安é“爾陪士特" + ], + "AED": [ + "AED", + "阿拉伯è¯åˆå¤§å…¬åœ‹è¿ªçˆ¾æ±—" + ], + "AFA": [ + "AFA", + "阿富汗尼 (1927–2002)" + ], + "AFN": [ + "AFN", + "阿富汗尼" + ], + "ALK": [ + "ALK", + "阿爾巴尼亞列克 (1946–1965)" + ], + "ALL": [ + "ALL", + "阿爾巴尼亞列克" + ], + "AMD": [ + "AMD", + "亞美尼亞德拉姆" + ], + "ANG": [ + "ANG", + "è·å±¬å®‰åœ°åˆ—斯盾" + ], + "AOA": [ + "AOA", + "安哥拉寬扎" + ], + "AOK": [ + "AOK", + "安哥拉寬扎 (1977–1990)" + ], + "AON": [ + "AON", + "安哥拉新寬扎 (1990–2000)" + ], + "AOR": [ + "AOR", + "安哥拉新調寬扎 (1995–1999)" + ], + "ARA": [ + "ARA", + "阿根廷奧斯特ç´çˆ¾" + ], + "ARL": [ + "ARL", + "阿根廷披索 (1970–1983)" + ], + "ARM": [ + "ARM", + "阿根廷披索 (1881–1970)" + ], + "ARP": [ + "ARP", + "阿根廷披索 (1983–1985)" + ], + "ARS": [ + "ARS", + "阿根廷披索" + ], + "ATS": [ + "ATS", + "奧地利先令" + ], + "AUD": [ + "AU$", + "澳幣" + ], + "AWG": [ + "AWG", + "阿路巴盾" + ], + "AZM": [ + "AZM", + "亞塞拜然馬ç´ç‰¹ (1993–2006)" + ], + "AZN": [ + "AZN", + "亞塞拜然馬ç´ç‰¹" + ], + "BAD": [ + "BAD", + "波士尼亞-赫塞哥維ç´ç¬¬ç´çˆ¾" + ], + "BAM": [ + "BAM", + "波士尼亞-赫塞哥維ç´å¯è½‰æ›é¦¬å…‹" + ], + "BAN": [ + "BAN", + "波士尼亞-èµ«å¡žå“¥ç¶­ç´æ–°ç¬¬ç´çˆ¾" + ], + "BBD": [ + "BBD", + "å·´è²å¤šå…ƒ" + ], + "BDT": [ + "BDT", + "孟加拉塔å¡" + ], + "BEC": [ + "BEC", + "比利時法郎(å¯è½‰æ›ï¼‰" + ], + "BEF": [ + "BEF", + "比利時法郎" + ], + "BEL": [ + "BEL", + "比利時法郎(金èžï¼‰" + ], + "BGL": [ + "BGL", + "ä¿åŠ åˆ©äºžç¡¬åˆ—å¼—" + ], + "BGM": [ + "BGM", + "ä¿åŠ åˆ©äºžç¤¾æœƒé»¨åˆ—å¼—" + ], + "BGN": [ + "BGN", + "ä¿åŠ åˆ©äºžæ–°åˆ—å¼—" + ], + "BGO": [ + "BGO", + "ä¿åŠ åˆ©äºžåˆ—å¼— (1879–1952)" + ], + "BHD": [ + "BHD", + "巴林第ç´çˆ¾" + ], + "BIF": [ + "BIF", + "蒲隆地法郎" + ], + "BMD": [ + "BMD", + "百慕é”å¹£" + ], + "BND": [ + "BND", + "æ±¶èŠå…ƒ" + ], + "BOB": [ + "BOB", + "玻利維亞諾" + ], + "BOL": [ + "BOL", + "玻利維亞玻利維亞諾 (1863–1963)" + ], + "BOP": [ + "BOP", + "玻利維亞披索" + ], + "BOV": [ + "BOV", + "玻利維亞幕多" + ], + "BRB": [ + "BRB", + "巴西克魯薩多農瓦 (1967–1986)" + ], + "BRC": [ + "BRC", + "巴西克魯賽羅 (1986–1989)" + ], + "BRE": [ + "BRE", + "巴西克魯賽羅 (1990–1993)" + ], + "BRL": [ + "R$", + "巴西里拉" + ], + "BRN": [ + "BRN", + "巴西克如爾é”農瓦" + ], + "BRR": [ + "BRR", + "巴西克魯賽羅 (1993–1994)" + ], + "BRZ": [ + "BRZ", + "巴西克魯賽羅 (1942 –1967)" + ], + "BSD": [ + "BSD", + "巴哈馬元" + ], + "BTN": [ + "BTN", + "ä¸ä¸¹é‚£ç‰¹å€«" + ], + "BUK": [ + "BUK", + "緬甸基雅特" + ], + "BWP": [ + "BWP", + "波札那普拉" + ], + "BYB": [ + "BYB", + "白俄羅斯新盧布 (1994–1999)" + ], + "BYN": [ + "BYN", + "白俄羅斯盧布" + ], + "BYR": [ + "BYR", + "白俄羅斯盧布 (2000–2016)" + ], + "BZD": [ + "BZD", + "è²é‡Œæ–¯å…ƒ" + ], + "CAD": [ + "CA$", + "加幣" + ], + "CDF": [ + "CDF", + "剛果法郎" + ], + "CHE": [ + "CHE", + "æ­å…ƒ (WIR)" + ], + "CHF": [ + "CHF", + "瑞士法郎" + ], + "CHW": [ + "CHW", + "法郎 (WIR)" + ], + "CLE": [ + "CLE", + "智利埃斯庫多" + ], + "CLF": [ + "CLF", + "塿ž—æ²¹é”佛曼跎" + ], + "CLP": [ + "CLP", + "智利披索" + ], + "CNX": [ + "CNX", + "CNX" + ], + "CNY": [ + "CNÂ¥", + "人民幣" + ], + "COP": [ + "COP", + "哥倫比亞披索" + ], + "COU": [ + "COU", + "哥倫比亞幣 (COU)" + ], + "CRC": [ + "CRC", + "哥斯大黎加科朗" + ], + "CSD": [ + "CSD", + "舊塞爾維亞第ç´çˆ¾" + ], + "CSK": [ + "CSK", + "æ·å…‹æ–¯æ´›ä¼å…‹ç¡¬å…‹æœ—" + ], + "CUC": [ + "CUC", + "å¤å·´å¯è½‰æ›æŠ«ç´¢" + ], + "CUP": [ + "CUP", + "å¤å·´æŠ«ç´¢" + ], + "CVE": [ + "CVE", + "維德角埃斯庫多" + ], + "CYP": [ + "CYP", + "賽普勒斯鎊" + ], + "CZK": [ + "CZK", + "æ·å…‹å…‹æœ—" + ], + "DDM": [ + "DDM", + "æ±å¾·å¥§æ–¯ç‰¹é¦¬å…‹" + ], + "DEM": [ + "DEM", + "德國馬克" + ], + "DJF": [ + "DJF", + "å‰å¸ƒåœ°æ³•郎" + ], + "DKK": [ + "DKK", + "丹麥克朗" + ], + "DOP": [ + "DOP", + "多明尼加披索" + ], + "DZD": [ + "DZD", + "阿爾åŠåˆ©äºžç¬¬ç´çˆ¾" + ], + "ECS": [ + "ECS", + "厄瓜多蘇克雷" + ], + "ECV": [ + "ECV", + "厄瓜多爾由里é”ç“¦åº·æ–¯å¦ (UVC)" + ], + "EEK": [ + "EEK", + "愛沙尼亞克朗" + ], + "EGP": [ + "EGP", + "埃åŠéŽŠ" + ], + "ERN": [ + "ERN", + "厄立特里亞ç´å…‹æ³•" + ], + "ESA": [ + "ESA", + "西ç­ç‰™æ¯”塞塔(會計單ä½ï¼‰" + ], + "ESB": [ + "ESB", + "西ç­ç‰™æ¯”塞塔(å¯è½‰æ›æœƒè¨ˆå–®ä½ï¼‰" + ], + "ESP": [ + "ESP", + "西ç­ç‰™é™ªå£«ç‰¹" + ], + "ETB": [ + "ETB", + "衣索比亞比爾" + ], + "EUR": [ + "€", + "æ­å…ƒ" + ], + "FIM": [ + "FIM", + "芬蘭馬克" + ], + "FJD": [ + "FJD", + "æ–æ¿Ÿå…ƒ" + ], + "FKP": [ + "FKP", + "ç¦å…‹è˜­ç¾¤å³¶éŽŠ" + ], + "FRF": [ + "FRF", + "法國法郎" + ], + "GBP": [ + "£", + "英鎊" + ], + "GEK": [ + "GEK", + "å–¬æ²»äºžåº«æ—æ‹‰é‡Œ" + ], + "GEL": [ + "GEL", + "喬治亞拉里" + ], + "GHC": [ + "GHC", + "迦ç´è³½åœ° (1979–2007)" + ], + "GHS": [ + "GHS", + "迦ç´å¡žåœ°" + ], + "GIP": [ + "GIP", + "直布羅陀鎊" + ], + "GMD": [ + "GMD", + "ç”˜æ¯”äºžé”æ‹‰è¥¿" + ], + "GNF": [ + "GNF", + "幾內亞法郎" + ], + "GNS": [ + "GNS", + "幾內亞西里" + ], + "GQE": [ + "GQE", + "赤é“幾內亞埃奎勒" + ], + "GRD": [ + "GRD", + "希臘德拉克馬" + ], + "GTQ": [ + "GTQ", + "瓜地馬拉格查爾" + ], + "GWE": [ + "GWE", + "葡屬幾內亞埃斯庫多" + ], + "GWP": [ + "GWP", + "幾內亞比索披索" + ], + "GYD": [ + "GYD", + "圭亞那元" + ], + "HKD": [ + "HK$", + "港幣" + ], + "HNL": [ + "HNL", + "洪都拉斯倫皮拉" + ], + "HRD": [ + "HRD", + "克羅埃西亞第ç´çˆ¾" + ], + "HRK": [ + "HRK", + "克羅埃西亞庫ç´" + ], + "HTG": [ + "HTG", + "海地å¤å¾·" + ], + "HUF": [ + "HUF", + "åŒˆç‰™åˆ©ç¦æž—" + ], + "IDR": [ + "IDR", + "å°å°¼ç›¾" + ], + "IEP": [ + "IEP", + "愛爾蘭鎊" + ], + "ILP": [ + "ILP", + "以色列鎊" + ], + "ILR": [ + "ILR", + "以色列è¬å…‹çˆ¾ (1980–1985)" + ], + "ILS": [ + "₪", + "以色列新è¬å…‹çˆ¾" + ], + "INR": [ + "₹", + "å°åº¦ç›§æ¯”" + ], + "IQD": [ + "IQD", + "伊拉克第ç´çˆ¾" + ], + "IRR": [ + "IRR", + "伊朗里亞爾" + ], + "ISJ": [ + "ISJ", + "冰島克朗 (1918–1981)" + ], + "ISK": [ + "ISK", + "冰島克朗" + ], + "ITL": [ + "ITL", + "義大利里拉" + ], + "JMD": [ + "JMD", + "牙買加元" + ], + "JOD": [ + "JOD", + "約旦第ç´çˆ¾" + ], + "JPY": [ + "Â¥", + "日圓" + ], + "KES": [ + "KES", + "肯尼亞先令" + ], + "KGS": [ + "KGS", + "å‰çˆ¾å‰æ–¯ç´¢å§†" + ], + "KHR": [ + "KHR", + "柬埔寨瑞爾" + ], + "KMF": [ + "KMF", + "科摩羅法郎" + ], + "KPW": [ + "KPW", + "北韓圓" + ], + "KRH": [ + "KRH", + "å—韓圜" + ], + "KRO": [ + "KRO", + "å—韓圓" + ], + "KRW": [ + "₩", + "韓圓" + ], + "KWD": [ + "KWD", + "ç§‘å¨ç‰¹ç¬¬ç´çˆ¾" + ], + "KYD": [ + "KYD", + "開曼群島元" + ], + "KZT": [ + "KZT", + "塿‰Žå…‹æ–¯å¦å¦å‰" + ], + "LAK": [ + "LAK", + "寮國基普" + ], + "LBP": [ + "LBP", + "黎巴嫩鎊" + ], + "LKR": [ + "LKR", + "斯里蘭å¡ç›§æ¯”" + ], + "LRD": [ + "LRD", + "賴比瑞亞元" + ], + "LSL": [ + "LSL", + "賴索托洛蒂" + ], + "LTL": [ + "LTL", + "立陶宛立特" + ], + "LTT": [ + "LTT", + "立陶宛特羅" + ], + "LUC": [ + "LUC", + "盧森堡å¯å…Œæ›æ³•郎" + ], + "LUF": [ + "LUF", + "盧森堡法郎" + ], + "LUL": [ + "LUL", + "ç›§æ£®å ¡é‡‘èžæ³•郎" + ], + "LVL": [ + "LVL", + "拉脫維亞拉特銀幣" + ], + "LVR": [ + "LVR", + "拉脫維亞盧布" + ], + "LYD": [ + "LYD", + "利比亞第ç´çˆ¾" + ], + "MAD": [ + "MAD", + "摩洛哥迪拉姆" + ], + "MAF": [ + "MAF", + "摩洛哥法郎" + ], + "MCF": [ + "MCF", + "æ‘©ç´å“¥æ³•郎" + ], + "MDC": [ + "MDC", + "摩爾多瓦券" + ], + "MDL": [ + "MDL", + "æ‘©æœé›²åˆ—伊" + ], + "MGA": [ + "MGA", + "馬é”加斯加阿里亞里" + ], + "MGF": [ + "MGF", + "馬é”加斯加法郎" + ], + "MKD": [ + "MKD", + "馬其頓第ç´çˆ¾" + ], + "MKN": [ + "MKN", + "馬其頓第ç´çˆ¾ (1992–1993)" + ], + "MLF": [ + "MLF", + "馬里法郎" + ], + "MMK": [ + "MMK", + "緬甸元" + ], + "MNT": [ + "MNT", + "è’™å¤åœ–格里克" + ], + "MOP": [ + "MOP", + "澳門元" + ], + "MRO": [ + "MRO", + "茅利塔尼亞çƒå‰äºž" + ], + "MTL": [ + "MTL", + "馬爾他里拉" + ], + "MTP": [ + "MTP", + "馬爾他鎊" + ], + "MUR": [ + "MUR", + "模里西斯盧比" + ], + "MVP": [ + "MVP", + "馬爾地夫盧比" + ], + "MVR": [ + "MVR", + "馬爾地夫盧éžäºž" + ], + "MWK": [ + "MWK", + "馬拉維克瓦查" + ], + "MXN": [ + "MX$", + "墨西哥披索" + ], + "MXP": [ + "MXP", + "墨西哥銀披索 (1861–1992)" + ], + "MXV": [ + "MXV", + "墨西哥轉æ›å–®ä½ (UDI)" + ], + "MYR": [ + "MYR", + "馬來西亞令å‰" + ], + "MZE": [ + "MZE", + "莫三比克埃斯庫多" + ], + "MZM": [ + "MZM", + "莫三比克梅蒂å¡çˆ¾ (1980–2006)" + ], + "MZN": [ + "MZN", + "莫三比克梅蒂å¡çˆ¾" + ], + "NAD": [ + "NAD", + "ç´ç±³æ¯”亞元" + ], + "NGN": [ + "NGN", + "奈åŠåˆ©äºžå¥ˆæ‹‰" + ], + "NIC": [ + "NIC", + "尼加拉瓜科多巴" + ], + "NIO": [ + "NIO", + "尼加拉瓜金科多巴" + ], + "NLG": [ + "NLG", + "è·è˜­ç›¾" + ], + "NOK": [ + "NOK", + "挪å¨å…‹æœ—" + ], + "NPR": [ + "NPR", + "尼泊爾盧比" + ], + "NZD": [ + "NZ$", + "ç´è¥¿è˜­å¹£" + ], + "OMR": [ + "OMR", + "阿曼里亞爾" + ], + "PAB": [ + "PAB", + "巴拿馬巴波亞" + ], + "PEI": [ + "PEI", + "祕魯因蒂" + ], + "PEN": [ + "PEN", + "秘魯新太陽幣" + ], + "PES": [ + "PES", + "秘魯索爾 (1863–1965)" + ], + "PGK": [ + "PGK", + "巴布亞ç´å¹¾å…§äºžåŸºé‚£" + ], + "PHP": [ + "PHP", + "è²å¾‹è³“披索" + ], + "PKR": [ + "PKR", + "巴基斯å¦ç›§æ¯”" + ], + "PLN": [ + "PLN", + "波蘭茲羅æ" + ], + "PLZ": [ + "PLZ", + "波蘭茲羅æ (1950–1995)" + ], + "PTE": [ + "PTE", + "è‘¡è„牙埃斯庫多" + ], + "PYG": [ + "PYG", + "巴拉圭瓜拉尼" + ], + "QAR": [ + "QAR", + "å¡é”里亞爾" + ], + "RHD": [ + "RHD", + "羅德西亞元" + ], + "ROL": [ + "ROL", + "舊羅馬尼亞列伊" + ], + "RON": [ + "RON", + "羅馬尼亞列伊" + ], + "RSD": [ + "RSD", + "塞爾維亞戴ç´" + ], + "RUB": [ + "RUB", + "俄羅斯盧布" + ], + "RUR": [ + "RUR", + "俄羅斯盧布 (1991–1998)" + ], + "RWF": [ + "RWF", + "ç›§å®‰é”æ³•郎" + ], + "SAR": [ + "SAR", + "æ²™çƒåœ°é‡Œäºžçˆ¾" + ], + "SBD": [ + "SBD", + "索羅門群島元" + ], + "SCR": [ + "SCR", + "塞席爾盧比" + ], + "SDD": [ + "SDD", + "蘇丹第ç´çˆ¾" + ], + "SDG": [ + "SDG", + "蘇丹鎊" + ], + "SDP": [ + "SDP", + "舊蘇丹鎊" + ], + "SEK": [ + "SEK", + "瑞典克朗" + ], + "SGD": [ + "SGD", + "新加å¡å¹£" + ], + "SHP": [ + "SHP", + "è–赫勒拿鎊" + ], + "SIT": [ + "SIT", + "斯洛維尼亞托勒" + ], + "SKK": [ + "SKK", + "斯洛ä¼å…‹å…‹æœ—" + ], + "SLL": [ + "SLL", + "ç…å­å±±åˆ©æ˜‚" + ], + "SOS": [ + "SOS", + "索馬利亞先令" + ], + "SRD": [ + "SRD", + "蘇利å—å…ƒ" + ], + "SRG": [ + "SRG", + "蘇利å—基爾" + ], + "SSP": [ + "SSP", + "å—蘇丹鎊" + ], + "STD": [ + "STD", + "è–多美島和普林西比島多布拉" + ], + "SUR": [ + "SUR", + "蘇è¯ç›§å¸ƒ" + ], + "SVC": [ + "SVC", + "薩爾瓦多科郎" + ], + "SYP": [ + "SYP", + "敘利亞鎊" + ], + "SZL": [ + "SZL", + "å²ç“¦æ¿Ÿè˜­é‡Œæœ—å‰å°¼" + ], + "THB": [ + "THB", + "泰銖" + ], + "TJR": [ + "TJR", + "å¡”å‰å…‹ç›§å¸ƒ" + ], + "TJS": [ + "TJS", + "å¡”å‰å…‹ç´¢èޫ尼" + ], + "TMM": [ + "TMM", + "土庫曼馬ç´ç‰¹ (1993–2009)" + ], + "TMT": [ + "TMT", + "土庫曼馬ç´ç‰¹" + ], + "TND": [ + "TND", + "çªå°¼è¥¿äºžç¬¬ç´çˆ¾" + ], + "TOP": [ + "TOP", + "æ±åŠ æ½˜åŠ " + ], + "TPE": [ + "TPE", + "叿±¶åŸƒæ–¯åº«å¤š" + ], + "TRL": [ + "TRL", + "土耳其里拉" + ], + "TRY": [ + "TRY", + "新土耳其里拉" + ], + "TTD": [ + "TTD", + "åƒé‡Œé”åŠæ‰˜å·´å“¥å…ƒ" + ], + "TWD": [ + "$", + "æ–°å°å¹£" + ], + "TZS": [ + "TZS", + "å¦å°šå°¼äºžå…ˆä»¤" + ], + "UAH": [ + "UAH", + "çƒå…‹è˜­æ ¼é‡Œå¤«ç´" + ], + "UAK": [ + "UAK", + "çƒå…‹è˜­å¡æœ¬ç“¦é‚£èŒ²" + ], + "UGS": [ + "UGS", + "çƒå¹²é”先令 (1966–1987)" + ], + "UGX": [ + "UGX", + "çƒå¹²é”先令" + ], + "USD": [ + "US$", + "美元" + ], + "USN": [ + "USN", + "美元(次日)" + ], + "USS": [ + "USS", + "美元(當日)" + ], + "UYI": [ + "UYI", + "çƒæ‹‰åœ­æŠ«ç´¢ï¼ˆæŒ‡æ•¸å–®ä½ï¼‰" + ], + "UYP": [ + "UYP", + "çƒæ‹‰åœ­æŠ«ç´¢ (1975–1993)" + ], + "UYU": [ + "UYU", + "çƒæ‹‰åœ­æŠ«ç´¢" + ], + "UZS": [ + "UZS", + "çƒèŒ²åˆ¥å…‹ç´¢å§†" + ], + "VEB": [ + "VEB", + "委內瑞拉玻利瓦 (1871–2008)" + ], + "VEF": [ + "VEF", + "委內瑞拉玻利瓦" + ], + "VND": [ + "â‚«", + "è¶Šå—盾" + ], + "VNN": [ + "VNN", + "è¶Šå—盾 (1978–1985)" + ], + "VUV": [ + "VUV", + "è¬é‚£æœç“¦åœ–" + ], + "WST": [ + "WST", + "西薩摩亞塔拉" + ], + "XAF": [ + "FCFA", + "法郎 (CFA–BEAC)" + ], + "XCD": [ + "EC$", + "格瑞那é”å…ƒ" + ], + "XEU": [ + "XEU", + "æ­æ´²è²¨å¹£å–®ä½ (XEU)" + ], + "XFO": [ + "XFO", + "法國金法郎" + ], + "XFU": [ + "XFU", + "法國法郎 (UIC)" + ], + "XOF": [ + "CFA", + "法郎 (CFA–BCEAO)" + ], + "XPF": [ + "CFPF", + "法郎 (CFP)" + ], + "XRE": [ + "XRE", + "RINET 基金" + ], + "YDD": [ + "YDD", + "葉門第ç´çˆ¾" + ], + "YER": [ + "YER", + "葉門里亞爾" + ], + "YUD": [ + "YUD", + "å—æ–¯æ‹‰å¤«ç¬¬ç´çˆ¾ç¡¬å¹£" + ], + "YUM": [ + "YUM", + "å—æ–¯æ‹‰å¤«æŒªå¨äºžç¬¬ç´çˆ¾" + ], + "YUN": [ + "YUN", + "å—æ–¯æ‹‰å¤«å¯è½‰æ›ç¬¬ç´çˆ¾" + ], + "YUR": [ + "YUR", + "å—æ–¯æ‹‰å¤«æ”¹é©ç¬¬ç´çˆ¾ (1992–1993)" + ], + "ZAL": [ + "ZAL", + "å—éžè˜­ç‰¹ï¼ˆé‡‘èžï¼‰" + ], + "ZAR": [ + "ZAR", + "å—éžè˜­ç‰¹" + ], + "ZMK": [ + "ZMK", + "尚比亞克瓦查 (1968–2012)" + ], + "ZMW": [ + "ZMW", + "尚比亞克瓦查" + ], + "ZRN": [ + "ZRN", + "薩伊新扎伊爾" + ], + "ZRZ": [ + "ZRZ", + "薩伊扎伊爾" + ], + "ZWD": [ + "ZWD", + "辛巴å¨å…ƒ (1980–2008)" + ], + "ZWL": [ + "ZWL", + "辛巴å¨å…ƒ (2009)" + ], + "ZWR": [ + "ZWR", + "辛巴å¨å…ƒ (2008)" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hant_HK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hant_HK.json new file mode 100644 index 0000000000000000000000000000000000000000..8d1392dd36e5b515790c837e05e2c71a0ce5aeaa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hant_HK.json @@ -0,0 +1,257 @@ +{ + "Version": "2.1.27.99", + "Names": { + "AED": [ + "AED", + "阿拉伯è¯åˆé…‹é•·åœ‹è¿ªçˆ¾æ±—" + ], + "AUD": [ + "AU$", + "澳元" + ], + "AWG": [ + "AWG", + "阿魯巴盾" + ], + "AZN": [ + "AZN", + "亞塞拜疆馬ç´ç‰¹" + ], + "BAD": [ + "BAD", + "波斯尼亞-赫塞哥維ç´ç¬¬ç´çˆ¾" + ], + "BAM": [ + "BAM", + "波斯尼亞-赫塞哥維ç´å¯è½‰æ›é¦¬å…‹" + ], + "BBD": [ + "BBD", + "巴巴多斯元" + ], + "BIF": [ + "BIF", + "布隆迪法郎" + ], + "BWP": [ + "BWP", + "åšèŒ¨ç“¦ç´æ™®æ‹‰" + ], + "BZD": [ + "BZD", + "伯利茲元" + ], + "CAD": [ + "CA$", + "加拿大元" + ], + "CRC": [ + "CRC", + "哥斯é”黎加科郎" + ], + "CVE": [ + "CVE", + "佛得角埃斯庫多" + ], + "DJF": [ + "DJF", + "å‰å¸ƒææ³•郎" + ], + "DOP": [ + "DOP", + "多米尼加披索" + ], + "ETB": [ + "ETB", + "埃塞俄比亞比爾" + ], + "GEL": [ + "GEL", + "格魯å‰äºžæ‹‰é‡Œ" + ], + "GHS": [ + "GHS", + "加ç´å¡žåœ°" + ], + "GMD": [ + "GMD", + "å²¡æ¯”äºžé”æ‹‰è¥¿" + ], + "GTQ": [ + "GTQ", + "å±åœ°é¦¬æ‹‰æ ¼æŸ¥çˆ¾" + ], + "HKD": [ + "HK$", + "港元" + ], + "HRK": [ + "HRK", + "克羅地亞庫ç´" + ], + "ITL": [ + "ITL", + "æ„大利里拉" + ], + "KES": [ + "KES", + "肯雅先令" + ], + "KHR": [ + "KHR", + "柬埔寨里爾" + ], + "KPW": [ + "KPW", + "北韓圜" + ], + "KRW": [ + "â‚©", + "韓圓" + ], + "KZT": [ + "KZT", + "哈薩克å¦å‰" + ], + "LAK": [ + "LAK", + "è€æ’¾åŸºæ™®" + ], + "LRD": [ + "LRD", + "利比利亞元" + ], + "MDL": [ + "MDL", + "摩爾多瓦列伊" + ], + "MRO": [ + "MRO", + "毛里塔尼亞çƒå‰äºž" + ], + "MUR": [ + "MUR", + "毛里裘斯盧布" + ], + "MVR": [ + "MVR", + "馬爾代夫盧éžäºž" + ], + "MZN": [ + "MZN", + "莫桑比克梅蒂å¡çˆ¾" + ], + "NGN": [ + "NGN", + "尼日利亞奈拉" + ], + "NZD": [ + "NZ$", + "ç´è¥¿è˜­å…ƒ" + ], + "OMR": [ + "OMR", + "阿曼里奧" + ], + "PGK": [ + "PGK", + "巴布亞新幾內亞基那" + ], + "QAR": [ + "QAR", + "å¡å¡”爾里亞爾" + ], + "RSD": [ + "RSD", + "塞爾維亞第ç´çˆ¾" + ], + "RWF": [ + "RWF", + "ç›§æ—ºé”æ³•郎" + ], + "SAR": [ + "SAR", + "沙特阿拉伯里亞爾" + ], + "SBD": [ + "SBD", + "所羅門群島元" + ], + "SCR": [ + "SCR", + "塞舌爾盧比" + ], + "SGD": [ + "SGD", + "新加å¡å…ƒ" + ], + "SLL": [ + "SLL", + "塞拉利昂利昂" + ], + "SOS": [ + "SOS", + "索馬里先令" + ], + "SRD": [ + "SRD", + "蘇里å—å…ƒ" + ], + "STD": [ + "STD", + "è–多美和普林西比多布拉" + ], + "SYP": [ + "SYP", + "æ•利亞鎊" + ], + "SZL": [ + "SZL", + "æ–¯å¨å£«è˜­é‡Œæœ—å‰å°¼" + ], + "TOP": [ + "TOP", + "湯加潘加" + ], + "TTD": [ + "TTD", + "åƒé‡Œé”和多巴哥元" + ], + "TWD": [ + "NT$", + "æ–°å°å¹£" + ], + "TZS": [ + "TZS", + "妿¡‘尼亞先令" + ], + "VUV": [ + "VUV", + "瓦努阿圖瓦圖" + ], + "XAF": [ + "FCFA", + "ä¸­éžæ³•郎" + ], + "XCD": [ + "EC$", + "æ±åŠ å‹’æ¯”å…ƒ" + ], + "XOF": [ + "CFA", + "å¤šå“¥éžæ´²å…±åŒé«”法郎" + ], + "XPF": [ + "CFPF", + "太平洋法郎" + ], + "YER": [ + "YER", + "也門里雅" + ], + "ZMW": [ + "ZMW", + "贊比亞克瓦查" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hant_MO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hant_MO.json new file mode 100644 index 0000000000000000000000000000000000000000..2beaf4c3959d9013b2fcb1920f6a3a417b41ce3d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_Hant_MO.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MOP": [ + "MOP$", + "澳門元" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_MO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_MO.json new file mode 100644 index 0000000000000000000000000000000000000000..2beaf4c3959d9013b2fcb1920f6a3a417b41ce3d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_MO.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "MOP": [ + "MOP$", + "澳門元" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_SG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_SG.json new file mode 100644 index 0000000000000000000000000000000000000000..a30758e677cf06fb25105260059a171f35468600 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zh_SG.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.99", + "Names": { + "CNY": [ + "CNÂ¥", + "人民å¸" + ], + "SGD": [ + "$", + "新加å¡å…ƒ" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zu.json new file mode 100644 index 0000000000000000000000000000000000000000..607fb136be4f625b56f71ceaad3d3f31e6727cf4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/currencies/zu.json @@ -0,0 +1,641 @@ +{ + "Version": "2.1.29.22", + "Names": { + "AED": [ + "AED", + "i-Dirham yase-United Arab Emirates" + ], + "AFN": [ + "AFN", + "i-Afghan Afghani" + ], + "ALL": [ + "ALL", + "i-Albanian Lek" + ], + "AMD": [ + "AMD", + "i-Armenian Dram" + ], + "ANG": [ + "ANG", + "i-Netherlands Antillean Guilder" + ], + "AOA": [ + "AOA", + "i-Angolan Kwanza" + ], + "ARS": [ + "ARS", + "i-Argentina Peso" + ], + "AUD": [ + "A$", + "i-Austrilian Dollar" + ], + "AWG": [ + "AWG", + "i-Aruban Florin" + ], + "AZN": [ + "AZN", + "i-Azerbaijani Manat" + ], + "BAM": [ + "BAM", + "i-Bosnia-Herzegovina Convertible Mark" + ], + "BBD": [ + "BBD", + "i-Barbadian Dollar" + ], + "BDT": [ + "BDT", + "i-Bangladeshi Taka" + ], + "BGN": [ + "BGN", + "i-Bulgarian Lev" + ], + "BHD": [ + "BHD", + "i-Bahraini Dinar" + ], + "BIF": [ + "BIF", + "i-Burundian Franc" + ], + "BMD": [ + "BMD", + "i-Bermudan Dollar" + ], + "BND": [ + "BND", + "i-Brunei Dollar" + ], + "BOB": [ + "BOB", + "i-Bolivian Boliviano" + ], + "BRL": [ + "R$", + "i-Brazilian Real" + ], + "BSD": [ + "BSD", + "i-Bahamian Dollar" + ], + "BTN": [ + "BTN", + "i-Bhutanese Ngultrum" + ], + "BWP": [ + "BWP", + "i-Botswana Pula" + ], + "BYN": [ + "BYN", + "i-Belarusian Ruble" + ], + "BYR": [ + "BYR", + "i-Belarusian Ruble (2000–2016)" + ], + "BZD": [ + "BZD", + "i-Belize Dollar" + ], + "CAD": [ + "CA$", + "i-Candian Dollar" + ], + "CDF": [ + "CDF", + "i-Congolese Franc" + ], + "CHF": [ + "CHF", + "i-Swiss Franc" + ], + "CLP": [ + "CLP", + "i-Chilean Peso" + ], + "CNY": [ + "CNÂ¥", + "i-Chinese Yuan" + ], + "COP": [ + "COP", + "i-Colombian Peso" + ], + "CRC": [ + "CRC", + "i-Costa Rican Colón" + ], + "CUC": [ + "CUC", + "i-Cuban Convertable Peso" + ], + "CUP": [ + "CUP", + "i-Cuban Peso" + ], + "CVE": [ + "CVE", + "i-Cape Verdean Escudo" + ], + "CZK": [ + "CZK", + "i-Czech Republic Koruna" + ], + "DJF": [ + "DJF", + "i-Djiboutian Franc" + ], + "DKK": [ + "DKK", + "i-Danish Krone" + ], + "DOP": [ + "DOP", + "i-Dominican Peso" + ], + "DZD": [ + "DZD", + "i-Algerian Dinar" + ], + "EGP": [ + "EGP", + "i-Egyptian Pound" + ], + "ERN": [ + "ERN", + "i-Eritrean Nakfa" + ], + "ETB": [ + "ETB", + "i-Ethopian Birr" + ], + "EUR": [ + "€", + "i-Euro" + ], + "FJD": [ + "FJD", + "i-Fijian Dollar" + ], + "FKP": [ + "FKP", + "i-Falkland Islands Pound" + ], + "GBP": [ + "£", + "i-British Pound" + ], + "GEL": [ + "GEL", + "i-Georgian Lari" + ], + "GHS": [ + "GHS", + "i-Ghanaian Cedi" + ], + "GIP": [ + "GIP", + "i-Gibraltar Pound" + ], + "GMD": [ + "GMD", + "i-Gambian Dalasi" + ], + "GNF": [ + "GNF", + "i-Gunean Franc" + ], + "GTQ": [ + "GTQ", + "i-Guatemalan Quetzal" + ], + "GYD": [ + "GYD", + "i-Guyanaese Dollar" + ], + "HKD": [ + "HK$", + "i-Hong Kong Dollar" + ], + "HNL": [ + "HNL", + "i-Honduran Lempira" + ], + "HRK": [ + "HRK", + "i-Croatian Kuna" + ], + "HTG": [ + "HTG", + "i-Haitian Gourde" + ], + "HUF": [ + "HUF", + "i-Hungarian Forint" + ], + "IDR": [ + "IDR", + "i-Indonesian Rupiah" + ], + "ILS": [ + "₪", + "i-Israeli New Sheqel" + ], + "INR": [ + "₹", + "i-Indian Rupee" + ], + "IQD": [ + "IQD", + "i-Iraqi Dinar" + ], + "IRR": [ + "IRR", + "i-Iranian Rial" + ], + "ISK": [ + "ISK", + "i-Icelandic Króna" + ], + "JMD": [ + "JMD", + "i-Jamaican Dollar" + ], + "JOD": [ + "JOD", + "i-Jordanian Dinar" + ], + "JPY": [ + "JPÂ¥", + "i-Japanese Yen" + ], + "KES": [ + "KES", + "i-Kenyan Shilling" + ], + "KGS": [ + "KGS", + "i-Kyrgystani Som" + ], + "KHR": [ + "KHR", + "i-Cambodian Riel" + ], + "KMF": [ + "KMF", + "i-Comorian Franc" + ], + "KPW": [ + "KPW", + "i-North Korean Won" + ], + "KRW": [ + "â‚©", + "i-South Korean Won" + ], + "KWD": [ + "KWD", + "i-Kuwaiti Dinar" + ], + "KYD": [ + "KYD", + "i-Cayman Islands Dollar" + ], + "KZT": [ + "KZT", + "i-Kazakhstani Tenge" + ], + "LAK": [ + "LAK", + "i-Laotian Kip" + ], + "LBP": [ + "LBP", + "i-Lebanese Pound" + ], + "LKR": [ + "LKR", + "i-Sri Lankan Rupee" + ], + "LRD": [ + "LRD", + "i-Liberian Dollar" + ], + "LSL": [ + "LSL", + "i-Lesotho Loti" + ], + "LTL": [ + "LTL", + "i-Lithuanian Litas" + ], + "LVL": [ + "LVL", + "i-Latvian Lats" + ], + "LYD": [ + "LYD", + "i-Libyan Dinar" + ], + "MAD": [ + "MAD", + "i-Moroccan Dirham" + ], + "MDL": [ + "MDL", + "i-Moldovan Leu" + ], + "MGA": [ + "MGA", + "i-Malagasy Ariary" + ], + "MKD": [ + "MKD", + "i-Macedonian Denar" + ], + "MMK": [ + "MMK", + "i-Myanma Kyat" + ], + "MNT": [ + "MNT", + "i-Mongolian Tugrik" + ], + "MOP": [ + "MOP", + "i-Macanese Pataca" + ], + "MRO": [ + "MRO", + "i-Mauritanian Ouguiya" + ], + "MUR": [ + "MUR", + "i-Mauritian Rupee" + ], + "MVR": [ + "MVR", + "i-Maldivian Rufiyana" + ], + "MWK": [ + "MWK", + "i-Malawian Kwacha" + ], + "MXN": [ + "MX$", + "i-Mexican Peso" + ], + "MYR": [ + "MYR", + "i-Malaysian Ringgit" + ], + "MZN": [ + "MZN", + "i-Mozambican Metical" + ], + "NAD": [ + "NAD", + "i-Namibian Dollar" + ], + "NGN": [ + "NGN", + "i-Nigerian Naira" + ], + "NIO": [ + "NIO", + "i-Nicaraguan Córdoba" + ], + "NOK": [ + "NOK", + "i-Norwegian Krone" + ], + "NPR": [ + "NPR", + "i-Nepalese Rupee" + ], + "NZD": [ + "NZ$", + "i-New Zealand Dollar" + ], + "OMR": [ + "OMR", + "i-Omani Rial" + ], + "PAB": [ + "PAB", + "i-Panamanian Balboa" + ], + "PEN": [ + "PEN", + "i-Peruvian Nuevo Sol" + ], + "PGK": [ + "PGK", + "i-Papua New Guinean Kina" + ], + "PHP": [ + "PHP", + "i-Philippine Peso" + ], + "PKR": [ + "PKR", + "i-Pakistani Rupee" + ], + "PLN": [ + "PLN", + "i-Polish Zloty" + ], + "PYG": [ + "PYG", + "i-Paraguayan Guarani" + ], + "QAR": [ + "QAR", + "i-Qatari Rial" + ], + "RON": [ + "RON", + "i-Romanian Leu" + ], + "RSD": [ + "RSD", + "i-Serbian Dinar" + ], + "RUB": [ + "RUB", + "i-Russian Ruble" + ], + "RWF": [ + "RWF", + "i-Rwandan Franc" + ], + "SAR": [ + "SAR", + "i-Saudi Riyal" + ], + "SBD": [ + "SBD", + "i-Solomon Islands Dollar" + ], + "SCR": [ + "SCR", + "i-Seychellois Rupee" + ], + "SDG": [ + "SDG", + "i-Sudanese Pound" + ], + "SEK": [ + "SEK", + "i-Swedish Krona" + ], + "SGD": [ + "SGD", + "i-Singapore Dollar" + ], + "SHP": [ + "SHP", + "i-Saint Helena Pound" + ], + "SLL": [ + "SLL", + "i-Sierra Leonean Leone" + ], + "SOS": [ + "SOS", + "i-Somali Shilling" + ], + "SRD": [ + "SRD", + "i-Surinamese Dollar" + ], + "SSP": [ + "SSP", + "i-South Sudanese Pound" + ], + "STD": [ + "STD", + "i-São Tomé kanye ne-Príncipe Dobra" + ], + "SYP": [ + "SYP", + "i-Syrian Pound" + ], + "SZL": [ + "SZL", + "i-Swazi Lilangeni" + ], + "THB": [ + "฿", + "i-Thai Baht" + ], + "TJS": [ + "TJS", + "i-Tajikistani Somoni" + ], + "TMT": [ + "TMT", + "i-Turkmenistani Manat" + ], + "TND": [ + "TND", + "i-Tunisian Dinar" + ], + "TOP": [ + "TOP", + "i-Tongan PaÊ»anga" + ], + "TRY": [ + "TRY", + "i-Turkish Lira" + ], + "TTD": [ + "TTD", + "i-Trinidad and Tobago Dollar" + ], + "TWD": [ + "NT$", + "i-New Taiwan Dollar" + ], + "TZS": [ + "TZS", + "i-Tanzanian Shilling" + ], + "UAH": [ + "UAH", + "i-Ukrainian Hryvnia" + ], + "UGX": [ + "UGX", + "i-Ugandan Shilling" + ], + "USD": [ + "US$", + "i-US Dollar" + ], + "UYU": [ + "UYU", + "i-Uruguayan Peso" + ], + "UZS": [ + "UZS", + "i-Uzbekistan Som" + ], + "VEF": [ + "VEF", + "i-Venezuelan Bolívar" + ], + "VND": [ + "â‚«", + "i-Vietnamese Dong" + ], + "VUV": [ + "VUV", + "i-Vanuatu Vatu" + ], + "WST": [ + "WST", + "i-Samoan Tala" + ], + "XAF": [ + "FCFA", + "i-Central African CFA Franc" + ], + "XCD": [ + "EC$", + "i-East Caribbean Dollar" + ], + "XOF": [ + "CFA", + "i-West African CFA Franc" + ], + "XPF": [ + "CFPF", + "i-CFP Franc" + ], + "YER": [ + "YER", + "i-Yemeni Rial" + ], + "ZAR": [ + "R", + "i-South African Rand" + ], + "ZMK": [ + "ZMK", + "i-Zambian Kwacha (1968–2012)" + ], + "ZMW": [ + "ZMW", + "i-Zambian Kwacha" + ] + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/af.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/af.json new file mode 100644 index 0000000000000000000000000000000000000000..086768c60a3ef68032bbe2e40e5d51f634c923a1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/af.json @@ -0,0 +1,401 @@ +{ + "Version": "2.1.29.44", + "Names": { + "aa": "Afar", + "ab": "Abkasies", + "ace": "Asjinees", + "ach": "Akoli", + "ada": "Adangme", + "ady": "Adyghe", + "af": "Afrikaans", + "agq": "Aghem", + "ain": "Ainu", + "ak": "Akan", + "ale": "Aleut", + "alt": "Suid-Altai", + "am": "Amharies", + "an": "Aragonees", + "anp": "Angika", + "ar": "Arabies", + "ar_001": "Moderne Standaard Arabies", + "arc": "Aramees", + "arn": "Mapuche", + "arp": "Arapaho", + "as": "Assamees", + "asa": "Asu", + "ast": "Asturies", + "av": "Avaries", + "awa": "Awadhi", + "ay": "Aymara", + "az": "Azerbeidjans", + "ba": "Baskir", + "ban": "Balinees", + "bas": "Basaa", + "be": "Belo-Russies", + "bem": "Bemba", + "bez": "Bena", + "bg": "Bulgaars", + "bgn": "Wes-Balochi", + "bho": "Bhojpuri", + "bi": "Bislama", + "bin": "Bini", + "bla": "Siksika", + "bm": "Bambara", + "bn": "Bengaals", + "bo": "Tibettaans", + "br": "Bretons", + "brx": "Bodo", + "bs": "Bosnies", + "bug": "Buginees", + "byn": "Blin", + "ca": "Katalaans", + "ce": "Tsjetsjen", + "ceb": "Cebuano", + "cgg": "Sjiga", + "ch": "Chamorro", + "chk": "Chuukees", + "chm": "Mari", + "cho": "Choctaw", + "chr": "Cherokees", + "chy": "Cheyennees", + "ckb": "Sorani Koerdies", + "co": "Korsikaans", + "cop": "Kopties", + "crs": "Seselwa Franskreools", + "cs": "Tsjeggies", + "cu": "Kerkslawies", + "cv": "Chuvash", + "cy": "Wallies", + "da": "Deens", + "dak": "Dakotaans", + "dar": "Dakota", + "dav": "Taita", + "de": "Duits", + "de_CH": "Switserse hoog-Duits", + "dgr": "Dogrib", + "dje": "Zarma", + "dsb": "Lae Sorbies", + "dua": "Duala", + "dv": "Divehi", + "dyo": "Jola-Fonyi", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embu", + "ee": "Ewe", + "efi": "Efik", + "egy": "Antieke Egipties", + "eka": "Ekajuk", + "el": "Grieks", + "en": "Engels", + "eo": "Esperanto", + "es": "Spaans", + "es_419": "Spaans (Suid-Amerika)", + "et": "Estnies", + "eu": "Baskies", + "ewo": "Ewondo", + "fa": "Persies", + "ff": "Fulah", + "fi": "Fins", + "fil": "Filippyns", + "fj": "Fidjiaans", + "fo": "Faroees", + "fon": "Fon", + "fr": "Frans", + "fur": "Friuliaans", + "fy": "Wes-Fries", + "ga": "Iers", + "gaa": "Gaa", + "gag": "Gagauz", + "gd": "Skotse Gallies", + "gez": "Geez", + "gil": "Gilbertees", + "gl": "Galisies", + "gn": "Guarani", + "gor": "Gorontalo", + "got": "Goties", + "grc": "Antieke Grieks", + "gsw": "Switserse Duits", + "gu": "Goedjarati", + "guz": "Gusii", + "gv": "Manx", + "gwi": "Gwichʼin", + "ha": "Hausa", + "haw": "Hawaiies", + "he": "Hebreeus", + "hi": "Hindi", + "hil": "Hiligaynon", + "hit": "Hetities", + "hmn": "Hmong", + "hr": "Kroaties", + "hsb": "Hoog-Sorbies", + "ht": "Haïtiaans", + "hu": "Hongaars", + "hup": "Hupa", + "hy": "Armeens", + "hz": "Herero", + "ia": "Interlingua", + "iba": "Ibanees", + "ibb": "Ibibio", + "id": "Indonesies", + "ie": "Interlingue", + "ig": "Igbo", + "ii": "Sichuan Yi", + "ilo": "Iloko", + "inh": "Ingush", + "io": "Ido", + "is": "Yslands", + "it": "Italiaans", + "iu": "Innuïties", + "ja": "Japannees", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jv": "Javaans", + "ka": "Georgies", + "kab": "Kabyle", + "kac": "Kachin", + "kaj": "Jju", + "kam": "Kamba", + "kbd": "Kabardiaans", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Kabuverdianu", + "kfo": "Koro", + "kg": "Kongolees", + "kha": "Khasi", + "khq": "Koyra Chiini", + "ki": "Kikuyu", + "kj": "Kuanyama", + "kk": "Kazaks", + "kkj": "Kako", + "kl": "Kalaallisut", + "kln": "Kalenjin", + "km": "Khmer", + "kmb": "Kimbundu", + "kn": "Kannada", + "ko": "Koreaans", + "koi": "Komi-Permyaks", + "kok": "Konkani", + "kpe": "Kpellees", + "kr": "Kanuri", + "krc": "Karachay-Balkar", + "krl": "Karelies", + "kru": "Kurukh", + "ks": "Kasjmirs", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Keuls", + "ku": "Koerdies", + "kum": "Kumyk", + "kv": "Komi", + "kw": "Kornies", + "ky": "Kirgisies", + "la": "Latyn", + "lad": "Ladino", + "lag": "Langi", + "lb": "Luxemburgs", + "lez": "Lezghies", + "lg": "Ganda", + "li": "Limburgs", + "lkt": "Lakota", + "ln": "Lingaals", + "lo": "Lao", + "loz": "Lozi", + "lrc": "Noord-Luri", + "lt": "Litaus", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lun": "Lunda", + "luo": "Luo", + "lus": "Mizo", + "luy": "Luyia", + "lv": "Letties", + "mad": "Madurees", + "mag": "Magahi", + "mai": "Maithili", + "mak": "Makasar", + "mas": "Masai", + "mdf": "Moksha", + "men": "Mende", + "mer": "Meru", + "mfe": "Morisjen", + "mg": "Malgassies", + "mgh": "Makhuwa-Meetto", + "mgo": "Meta’", + "mh": "Marshallees", + "mi": "Maori", + "mic": "Micmac", + "min": "Minangkabaus", + "mk": "Masedonies", + "ml": "Malabaars", + "mn": "Mongools", + "mni": "Manipuri", + "moh": "Mohawk", + "mos": "Mossi", + "mr": "Marathi", + "ms": "Maleis", + "mt": "Maltees", + "mua": "Mundang", + "mul": "Veelvuldige tale", + "mus": "Kreek", + "mwl": "Mirandees", + "my": "Birmaans", + "myv": "Erzya", + "mzn": "Masanderani", + "na": "Nauru", + "nap": "Neapolitaans", + "naq": "Nama", + "nb": "Noorse BokmÃ¥l", + "nd": "Noord-Ndebele", + "nds": "Lae Duits", + "nds_NL": "Nedersaksies", + "ne": "Nepalees", + "new": "Newari", + "ng": "Ndonga", + "nia": "Nias", + "niu": "Niuean", + "nl": "Nederlands", + "nl_BE": "Vlaams", + "nmg": "Kwasio", + "nn": "Noorweegse Nynorsk", + "nnh": "Ngiemboon", + "no": "Noors", + "nog": "Nogai", + "nqo": "N’Ko", + "nr": "Suid-Ndebele", + "nso": "Noord-Sotho", + "nus": "Nuer", + "nv": "Navajo", + "ny": "Nyanja", + "nyn": "Nyankole", + "oc": "Oksitaans", + "om": "Oromo", + "or": "Oriya", + "os": "Osseties", + "pa": "Pandjabi", + "pag": "Pangasinan", + "pam": "Pampanga", + "pap": "Papiamento", + "pau": "Palauaans", + "pcm": "Nigeriese Pidgin", + "phn": "Fenisies", + "pl": "Pools", + "prg": "Pruisies", + "ps": "Pasjto", + "pt": "Portugees", + "qu": "Quechua", + "quc": "K’iche’", + "rap": "Rapanui", + "rar": "Rarotongaans", + "rm": "Reto-Romaans", + "rn": "Rundi", + "ro": "Roemeens", + "ro_MD": "Moldawies", + "rof": "Rombo", + "root": "Root", + "ru": "Russies", + "rup": "Aromanies", + "rw": "Rwandees", + "rwk": "Rwa", + "sa": "Sanskrit", + "sad": "Sandawees", + "sah": "Sakhaans", + "saq": "Samburu", + "sat": "Santalies", + "sba": "Ngambay", + "sbp": "Sangu", + "sc": "Sardinies", + "scn": "Sisiliaans", + "sco": "Skots", + "sd": "Sindhi", + "sdh": "Suid-Koerdies", + "se": "Noord-Sami", + "seh": "Sena", + "ses": "Koyraboro Senni", + "sg": "Sango", + "sh": "Serwo-Kroaties", + "shi": "Tachelhit", + "shn": "Shan", + "si": "Sinhala", + "sk": "Slowaaks", + "sl": "Sloweens", + "sm": "Samoaans", + "sma": "Suid-Sami", + "smj": "Lule Sami", + "smn": "Inari Sami", + "sms": "Skolt Sami", + "sn": "Shona", + "snk": "Soninke", + "so": "Somalies", + "sq": "Albanees", + "sr": "Serwies", + "srn": "Sranan Tongo", + "ss": "Swazi", + "ssy": "Saho", + "st": "Suid-Sotho", + "su": "Sundanees", + "suk": "Sukuma", + "sv": "Sweeds", + "sw": "Swahili", + "sw_CD": "Swahili (Kongo)", + "swb": "Comoraans", + "syr": "Siriese", + "ta": "Tamil", + "te": "Teloegoe", + "tem": "Timne", + "teo": "Teso", + "tet": "Tetoem", + "tg": "Tadzjieks", + "th": "Thai", + "ti": "Tigrinya", + "tig": "Tigre", + "tk": "Turkmeens", + "tlh": "Klingon", + "tn": "Tswana", + "to": "Tongaans", + "tpi": "Tok Pisin", + "tr": "Turks", + "trv": "Taroko", + "ts": "Tsonga", + "tt": "Tataars", + "tum": "Toemboeka", + "tvl": "Tuvalu", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Tahities", + "tyv": "Tuvinees", + "tzm": "Sentraal Atlas Tamazight", + "udm": "Udmurt", + "ug": "Uighur", + "uk": "Oekraïens", + "umb": "Umbundu", + "und": "Onbekende of ongeldige taal", + "ur": "Oerdoe", + "uz": "Oezbeeks", + "vai": "Vai", + "ve": "Venda", + "vi": "Viëtnamees", + "vo": "Volapük", + "vun": "Vunjo", + "wa": "Walloon", + "wae": "Walser", + "wal": "Wolaytta", + "war": "Waray", + "wbp": "Warlpiri", + "wo": "Wolof", + "xal": "Kalmyk", + "xh": "Xhosa", + "xog": "Soga", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "Jiddisj", + "yo": "Yoruba", + "yue": "Kantonees", + "zgh": "Standaard Marokkaanse Tamazight", + "zh": "Sjinees", + "zu": "Zoeloe", + "zun": "Zuni", + "zxx": "Geen linguistiese inhoud", + "zza": "Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ak.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ak.json new file mode 100644 index 0000000000000000000000000000000000000000..9f6d5ce2b9ec809d37059a9ce5926780dc67d389 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ak.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ak": "Akan", + "am": "Amarik", + "ar": "Arabik", + "be": "Belarus kasa", + "bg": "BÉ”lgeria kasa", + "bn": "Bengali kasa", + "cs": "KyÉ›k kasa", + "de": "Gyaaman", + "el": "Greek kasa", + "en": "BorÉ”fo", + "es": "Spain kasa", + "fa": "Pɛɛhyia kasa", + "fr": "FrÉ›nkye", + "ha": "Hausa", + "hi": "Hindi", + "hu": "Hangri kasa", + "id": "Indonihyia kasa", + "ig": "Igbo", + "it": "Italy kasa", + "ja": "Gyapan kasa", + "jv": "Gyabanis kasa", + "km": "Kambodia kasa", + "ko": "Korea kasa", + "ms": "Malay kasa", + "my": "Bɛɛmis kasa", + "ne": "NÉ›pal kasa", + "nl": "Dɛɛkye", + "pa": "Pungyabi kasa", + "pl": "PÉ”land kasa", + "pt": "Pɔɔtugal kasa", + "ro": "Romenia kasa", + "ru": "Rahyia kasa", + "rw": "Rewanda kasa", + "so": "Somalia kasa", + "sv": "Sweden kasa", + "ta": "Tamil kasa", + "th": "Taeland kasa", + "tr": "Tɛɛki kasa", + "uk": "Ukren kasa", + "ur": "Urdu kasa", + "vi": "ViÉ›tnam kasa", + "yo": "Yoruba", + "zh": "Kyaena kasa", + "zu": "Zulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/am.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/am.json new file mode 100644 index 0000000000000000000000000000000000000000..24dccaaee9206ffb968a244bc784d122dee37cde --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/am.json @@ -0,0 +1,470 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "አá‹áˆ­áŠ›", + "ab": "አብáˆá‹šáŠ›", + "ace": "አቻይንኛ", + "ach": "አኮሊኛ", + "ada": "አዳንáŒáˆœ", + "ady": "አድይáŒáˆ„", + "ae": "አቬስታን", + "af": "አáሪካንኛ", + "afh": "አáሪሂሊ", + "agq": "አገáˆ", + "ain": "አይኑ", + "ak": "አካንኛ", + "akk": "አካዲያን", + "akz": "አላባማ", + "ale": "አáˆá‹©á‰µ", + "alt": "ደቡባዊ አáˆá‰³á‹­", + "am": "አማርኛ", + "an": "አራጎንስ", + "anp": "አንጊካ", + "ar": "ዓረብኛ", + "ar_001": "ዘመናዊ መደበኛ ዓረብኛ", + "arc": "አራማይክ", + "arn": "ማá‘ቼ", + "aro": "አራኦና", + "arp": "አራá“ሆ", + "arq": "የአáˆáŒ„ሪያ ዓረብኛ", + "arw": "አራዋክ", + "as": "አሳሜዛዊ", + "asa": "አሱ", + "ase": "የአሜሪካ የáˆáˆáŠ­á‰µ ቋንቋ", + "ast": "አá‹áˆµá‰µáˆªá‹«áŠ•", + "av": "አቫሪክ", + "awa": "አዋድሂ", + "ay": "አያማርኛ", + "az": "አዘርባጃንኛ", + "ba": "ባስኪርኛ", + "bal": "ባሉቺ", + "ban": "ባሊኔስ", + "bar": "ባቫሪያን", + "bas": "ባሳ", + "bax": "ባሙን", + "bbc": "ባታካ ቶባ", + "be": "ቤላራሻኛ", + "bej": "ቤጃ", + "bem": "ቤáˆá‰£", + "bew": "ቤታዊ", + "bez": "ቤና", + "bfd": "ባá‰á‰µ", + "bfq": "ባዳጋ", + "bg": "ቡáˆáŒ‹áˆªáŠ›", + "bgn": "የáˆá‹•ራብ ባሎቺ", + "bho": "ቦáŒáˆª", + "bi": "ቢስላáˆáŠ›", + "bik": "ቢኮáˆ", + "bin": "ቢኒ", + "bjn": "ባንጃር", + "bla": "ሲክሲካ", + "bm": "ባáˆá‰£áˆ­áŠ›", + "bn": "ቤንጋሊኛ", + "bo": "ቲቤታንኛ", + "bpy": "ቢሹንá‘ሪያ", + "bqi": "ባክህቲያሪ", + "br": "ብሬቶንኛ", + "bra": "ብራጅ", + "brh": "ብራáˆá‹ª", + "brx": "ቦዶ", + "bs": "ቦስኒያንኛ", + "bss": "አኮስ", + "bua": "ቡሪያት", + "bug": "ቡጊኔá‹", + "bum": "ቡሉ", + "byn": "ብሊን", + "ca": "ካታላንኛ", + "cad": "ካዶ", + "car": "ካሪብ", + "cay": "ካዩጋ", + "cch": "አትሳáˆ", + "ce": "ችችን", + "ceb": "ካቡዋኖ", + "cgg": "ቺጋኛ", + "ch": "ቻሞሮ", + "chb": "ቺብቻ", + "chg": "ቻጋታይ", + "chk": "ቹክስ", + "chm": "ማሪ", + "chn": "ቺኑክ ጃርጎን", + "cho": "ቾክታዋ", + "chp": "ቺá”á‹á‹«áŠ•", + "chr": "ቼሮኬኛ", + "chy": "ችዬኔ", + "ckb": "የሶራኒ ኩርድኛ", + "co": "ኮርሲካኛ", + "cop": "ኮá•ቲክ", + "cps": "ካá’á‹áŠ–áŠ•", + "cr": "ክሪ", + "crh": "ክሪሚያን ተርኪሽ", + "crs": "ሰሰላዊ ክሬኦሊ áˆáˆ¨áŠ•áˆ³á‹­áŠ›", + "cs": "ቼክኛ", + "cu": "ቸርች ስላቪክ", + "cv": "ቹቫሽ", + "cy": "ወáˆáˆ½", + "da": "ዴኒሽ", + "dak": "ዳኮታ", + "dar": "ዳርáŒá‹‹", + "dav": "ታይታኛ", + "de": "ጀርመን", + "de_AT": "የኦስትሪያ ጀርመን", + "de_CH": "የስዊዠከáተኛ ጀርመንኛ", + "del": "ዳላዌር", + "dgr": "á‹¶áŒáˆªá‰¥", + "din": "ዲንካ", + "dje": "ዛርማኛ", + "doi": "á‹¶áŒáˆª", + "dsb": "የታችኛዠሰርቢያንኛ", + "dtp": "ሴንተራሠዱሰን", + "dua": "ዱዋላኛ", + "dv": "ዲቬህ", + "dyo": "ጆላ áŽáŠ•á‹«áŠ›", + "dyu": "ድዩላ", + "dz": "ድዞንáŒáŠ»áŠ›", + "dzg": "ዳዛጋ", + "ebu": "ኢቦኛ", + "ee": "ኢዊ", + "efi": "ኤáŠáŠ­", + "egy": "የጥንታዊ áŒá‰¥áŒ½áŠ›", + "eka": "ኤካáŒáŠ­", + "el": "áŒáˆªáŠ­áŠ›", + "en": "እንáŒáˆŠá‹áŠ›", + "en_AU": "የአá‹áˆµá‰µáˆ«áˆŠá‹« እንáŒáˆŠá‹áŠ›", + "en_CA": "የካናዳ እንáŒáˆŠá‹áŠ›", + "en_GB": "የብሪቲሽ እንáŒáˆŠá‹áŠ›", + "en_US": "የአሜሪካ እንáŒáˆŠá‹áŠ›", + "eo": "ኤስáራንቶ", + "es": "ስá“ንሽኛ", + "es_419": "የላቲን አሜሪካ ስá“ኒሽ", + "es_ES": "የአá‹áˆ®á“ ስá“ንሽኛ", + "es_MX": "የሜክሲኮ ስá“ንሽኛ", + "esu": "ሴንተራሠዩá’ክ", + "et": "ኢስቶኒያንኛ", + "eu": "ባስክኛ", + "ewo": "ኤዎንዶ", + "fa": "áርሺያኛ", + "ff": "á‰áˆ‹áˆ…", + "fi": "áŠáŠ’áˆ½", + "fil": "áŠáˆŠá’ንኛ", + "fj": "áŠáŒ‚ኛ", + "fo": "á‹áˆ®áŠ›", + "fon": "áŽáŠ•", + "fr": "áˆáˆ¨áŠ•áˆ³á‹­áŠ›", + "fr_CA": "የካናዳ áˆáˆ¨áŠ•áˆ³á‹­áŠ›", + "fr_CH": "የስዊዠáˆáˆ¨áŠ•áˆ³á‹­áŠ›", + "frc": "ካáŒáŠ• áሬንች", + "frp": "አርá’ታን", + "fur": "áሩሊያን", + "fy": "የáˆá‹•ራብ áሪስኛ", + "ga": "አይሪሽ", + "gaa": "ጋ", + "gag": "ጋጉá‹áŠ›", + "gan": "ጋን ቻይንኛ", + "gd": "የስኮቲሽ ጌáˆáŠ­áŠ›", + "gez": "áŒá‹•á‹áŠ›", + "gil": "ጅáˆá‰ áˆ­á‰µáˆµ", + "gl": "ጋሊሺያ", + "gn": "ጓራኒኛ", + "gor": "ጎሮንታሎ", + "grc": "የጥንታዊ áŒáˆªáŠ­", + "gsw": "የስዊዠጀርመን", + "gu": "ጉጃርቲኛ", + "guz": "ጉስሊኛ", + "gv": "ማንክስኛ", + "gwi": "áŒá‹Šá‰ºáŠ•", + "ha": "ሃá‹áˆ³áŠ›", + "hak": "ሃካ ቻይንኛ", + "haw": "ሃዊያኛ", + "he": "ዕብራስጥ", + "hi": "ሒንዱኛ", + "hil": "ሂሊጋይኖን", + "hmn": "ህሞንáŒ", + "hr": "ክሮሽያንኛ", + "hsb": "የላይኛዠሶርቢያንኛ", + "hsn": "ዢያንጠቻይንኛ", + "ht": "ሃይትኛ", + "hu": "ሀንጋሪኛ", + "hup": "áˆá“", + "hy": "አርመናዊ", + "hz": "ሄሬሮ", + "ia": "ኢንቴርሊንጓ", + "iba": "ኢባን", + "ibb": "ኢቢቦ", + "id": "ኢንዶኔዥኛ", + "ie": "እንተርሊንáŒá‹ˆ", + "ig": "ኢáŒá‰¦áŠ›", + "ii": "ሲቹንዪኛ", + "ik": "እኑá’ያቅኛ", + "ilo": "ኢሎኮ", + "inh": "ኢንጉሽ", + "io": "ኢዶ", + "is": "አይስላንድኛ", + "it": "ጣሊያንኛ", + "iu": "እኑክቲቱትኛ", + "ja": "ጃá“ንኛ", + "jbo": "ሎጅባን", + "jgo": "ንጎባኛ", + "jmc": "ማቻሜኛ", + "jv": "ጃቫንኛ", + "ka": "ጆርጂያን", + "kab": "ካብይáˆ", + "kac": "ካቺን", + "kaj": "ካጅ", + "kam": "ካáˆá‰£", + "kbd": "ካባርዲያን", + "kcg": "ታያá•", + "kde": "ማኮንዴ", + "kea": "ካቡቨርዲያኑ", + "kfo": "ኮሮ", + "kg": "ኮንጎኛ", + "kha": "ክሃሲ", + "khq": "ኮይራ ቺኒ", + "ki": "ኪኩዩ", + "kj": "ኩንያማ", + "kk": "ካዛክኛ", + "kkj": "ካኮ", + "kl": "ካላሊሱትኛ", + "kln": "ካለንጂን", + "km": "ክህመርኛ", + "kmb": "ኪáˆá‰¡áŠ•á‹±", + "kn": "ካናዳኛ", + "ko": "ኮሪያኛ", + "koi": "ኮሚ á”ርáˆá‹«áŠ­", + "kok": "ኮንካኒ", + "kpe": "ክá”ሌ", + "kr": "ካኑሪ", + "krc": "ካራቻይ-ባáˆáŠ«áˆ­", + "krl": "ካረሊኛ", + "kru": "ኩሩክ", + "ks": "ካሽሚርኛ", + "ksb": "ሻáˆá‰£áˆ‹", + "ksf": "ባáŠá‹«", + "ksh": "ኮሎáŠá‹«áŠ•", + "ku": "ኩርድሽኛ", + "kum": "ኩማይክ", + "kv": "ኮሚ", + "kw": "ኮርኒሽ", + "ky": "ኪርጊá‹áŠ›", + "la": "ላቲንኛ", + "lad": "ላዲኖ", + "lag": "ላንጊ", + "lb": "ሉክዘáˆá‰ áˆ­áŒˆáˆ­áŠ›", + "lez": "ሌá‹áŒŠá‹«áŠ•", + "lg": "ጋንዳኛ", + "li": "ሊáˆá‰¡áˆ­áŒŠáˆ½", + "lkt": "ላኮታ", + "ln": "ሊንጋላኛ", + "lo": "ላኦስኛ", + "loz": "ሎዚኛ", + "lrc": "ሰሜናዊ ሉሪ", + "lt": "ሉቴንያንኛ", + "lu": "ሉባ ካታንጋ", + "lua": "ሉባ-ሉáˆ", + "lun": "ሉንዳ", + "luo": "ሉኦ", + "lus": "ሚዞ", + "luy": "ሉዪያ", + "lv": "ላትቪያን", + "mad": "ማዱረስ", + "mag": "ማጋሂ", + "mai": "ማይተሊ", + "mak": "ማካሳር", + "mas": "ማሳይ", + "mdf": "ሞክሻ", + "men": "ሜንዴ", + "mer": "ሜሩ", + "mfe": "ሞሪሲየኛ", + "mg": "ማላጋስኛ", + "mgh": "ማኩዋ ሜቶ", + "mgo": "ሜታ", + "mh": "ማርሻሌá‹áŠ›", + "mi": "ማኦሪኛ", + "mic": "ሚክማክ", + "min": "ሚናንáŒáŠ«á‰£áŠ¡", + "mk": "ማሴዶንኛ", + "ml": "ማላያላáˆáŠ›", + "mn": "ሞንጎላዊኛ", + "mni": "ማኒá‘ሪ", + "moh": "ሞሃá‹áŠ­", + "mos": "ሞሲ", + "mr": "ማራቲኛ", + "ms": "ማላይኛ", + "mt": "ማáˆá‰²áˆµáŠ›", + "mua": "ሙንዳንáŒ", + "mul": "ባለብዙ ቋንቋዎች", + "mus": "ክሪክ", + "mwl": "ሚራንዴá‹áŠ›", + "my": "ቡርማኛ", + "myv": "ኤርá‹á‹«", + "mzn": "ማዛንደራኒ", + "na": "ናኡሩ", + "nan": "ሚን ኛን ቻይንኛ", + "nap": "ኒአá–ሊታን", + "naq": "ናማ", + "nb": "የኖርዌይ ቦክማáˆ", + "nd": "ሰሜን ንዴብሌ", + "nds": "የታችኛዠጀርመን", + "nds_NL": "የታችኛዠሳክሰን", + "ne": "ኔá“ሊኛ", + "new": "áŠá‹‹áˆª", + "ng": "ንዶንጋ", + "nia": "ኒአስ", + "niu": "ኒዩአንኛ", + "njo": "ኦ ናጋ", + "nl": "ደች", + "nl_BE": "áሌሚሽ", + "nmg": "ክዋሲዮ", + "nn": "የኖርዌይ ናይኖርስክ", + "nnh": "ኒጊáˆá‰¡áŠ•", + "no": "ኖርዌጂያን", + "nog": "ኖጋይ", + "nqo": "ንኮ", + "nr": "ደቡብ ንደቤሌ", + "nso": "ሰሜናዊ ሶቶ", + "nus": "ኑዌር", + "nv": "ናቫጆ", + "nwc": "ክላሲክ ኔዋሪ", + "ny": "ንያንጃ", + "nyn": "ኒያንኮáˆáŠ›", + "oc": "ኦኪታንኛ", + "om": "ኦሮሞኛ", + "or": "ኦዲያኛ", + "os": "ኦሴቲክ", + "pa": "á‘ንጃብኛ", + "pag": "á“ንጋሲናንኛ", + "pam": "á“áˆá“ንጋ", + "pap": "á“á’አሜንቶ", + "pau": "á“ላኡአን", + "pcm": "የናይጄሪያ á’ጂን", + "pl": "á–ሊሽኛ", + "prg": "áሩሳንኛ", + "ps": "á“ሽቶኛ", + "pt": "á–ርቹጋáˆáŠ›", + "pt_BR": "የብራዚሠá–ርቹጋáˆáŠ›", + "pt_PT": "የአá‹áˆ®á“ á–ርቹጋáˆáŠ›", + "qu": "ኵቿኛ", + "quc": "ኪቼ", + "qug": "ቺáˆá‰¦áˆ«á‹ž ሃይላንድ ኩቹዋ", + "rap": "ራá“ኑኢ", + "rar": "ራሮቶንጋ", + "rm": "ሮማንሽ", + "rn": "ሩንዲኛ", + "ro": "ሮማኒያን", + "ro_MD": "ሞáˆá‹³á‰ªá‹«áŠ•áŠ›", + "rof": "ሮáˆá‰¦", + "root": "ሩት", + "ru": "ራሽያኛ", + "rup": "አሮማንያን", + "rw": "ኪንያርዋንድኛ", + "rwk": "ርዋ", + "sa": "ሳንስክሪትኛ", + "sad": "ሳንዳዌ", + "sah": "ሳክሃ", + "saq": "ሳáˆá‰¡áˆ©", + "sat": "ሳንታሊ", + "sba": "ንጋáˆá‰£á‹­", + "sbp": "ሳንጉ", + "sc": "ሳርዲንያንኛ", + "scn": "ሲሲሊያንኛ", + "sco": "ስኮትስ", + "sd": "ሲንድሂኛ", + "sdh": "ደቡባዊ ኩርዲሽ", + "se": "ሰሜናዊ ሳሚ", + "seh": "ሴና", + "ses": "ኮይራቦሮ ሴኒ", + "sg": "ሳንጎኛ", + "sh": "ሰርቦ-ክሮኤሽያኛ", + "shi": "ታቼáˆáˆ‚ት", + "shn": "ሻን", + "shu": "ቻዲያን ዓረብኛ", + "si": "ሲንሃáˆáŠ›", + "sid": "ሲዳáˆáŠ›", + "sk": "ስሎቫክኛ", + "sl": "ስሎቪኛ", + "sm": "ሳሞአኛ", + "sma": "ደቡባዊ ሳሚ", + "smj": "ሉሌ ሳሚ", + "smn": "ኢናሪ ሳሚ", + "sms": "ስኮáˆá‰µ ሳሚ", + "sn": "ሾናኛ", + "snk": "ሶኒንኬ", + "so": "ሱማáˆáŠ›", + "sq": "አáˆá‰£áŠ•á‹«áŠ•áŠ›", + "sr": "ሰርቢኛ", + "srn": "ስራናን ቶንጎ", + "ss": "ስዋቲኛ", + "ssy": "ሳሆኛ", + "st": "ደቡባዊ ሶቶ", + "su": "ሱዳንኛ", + "suk": "ሱኩማ", + "sv": "ስዊድንኛ", + "sw": "ስዋሂሊኛ", + "sw_CD": "ኮንጎ ስዋሂሊ", + "swb": "ኮሞሪያን", + "syc": "ክላሲክ ኔይራ", + "syr": "ሲሪያክ", + "ta": "ታሚáˆáŠ›", + "te": "ተሉጉኛ", + "tem": "ቲáˆáŠ”", + "teo": "ቴሶ", + "tet": "ቴተáˆ", + "tg": "ታጂኪኛ", + "th": "ታይኛ", + "ti": "ትáŒáˆ­áŠ›", + "tig": "ትáŒáˆ¨", + "tk": "ቱርክሜንኛ", + "tl": "ታጋሎገኛ", + "tlh": "ክሊንጎንኛ", + "tn": "ጽዋናዊኛ", + "to": "ቶንጋኛ", + "tpi": "ቶክ á’ሲን", + "tr": "ቱርክኛ", + "trv": "ታሮኮ", + "ts": "ጾንጋኛ", + "tt": "ታታርኛ", + "tum": "ቱáˆá‰¡áŠ«", + "tvl": "ቱቫሉ", + "tw": "ትዊኛ", + "twq": "ታሳዋቅ", + "ty": "ታሂታንኛ", + "tyv": "ቱቪንያንኛ", + "tzm": "መካከለኛ አትላስ ታማዚáŒá‰µ", + "udm": "ኡድሙርት", + "ug": "ኡዊáŒáˆáˆ­áŠ›", + "uk": "ዩክሬንኛ", + "umb": "ኡáˆá‰¡áŠ•á‹±", + "und": "á‹«áˆá‰³á‹ˆá‰€ ቋንቋ", + "ur": "ኡርዱኛ", + "uz": "ኡá‹á‰¤áŠ­áŠ›", + "vai": "ቫይ", + "ve": "ቬንዳ", + "vi": "ቪየትናáˆáŠ›", + "vo": "ቮላá‘ክኛ", + "vun": "ቩንጆ", + "wa": "ዋሎን", + "wae": "á‹‹áˆáˆ°áˆ­", + "wal": "ወላይትኛ", + "war": "ዋራይ", + "wbp": "ዋርáˆá’ሪ", + "wo": "ዎሎáኛ", + "wuu": "ዉ ቻይንኛ", + "xal": "ካáˆáˆ›á‹­áŠ­", + "xh": "ዞሳኛ", + "xog": "ሶጋ", + "yav": "ያንáŒá‰¤áŠ•áŠ›", + "ybb": "የáˆá‰£", + "yi": "ይዲሽኛ", + "yo": "ዮሩባዊኛ", + "yue": "ካንቶኒá‹", + "za": "ዡዋንáŒáŠ›", + "zbl": "ብሊስይáˆá‰¦áˆáˆµ", + "zgh": "መደበኛ የሞሮኮ ታማዚáŒá‰µ", + "zh": "ቻይንኛ", + "zh_Hans": "ቀለሠያለ ቻይንኛ", + "zh_Hant": "ባህላዊ ቻይንኛ", + "zu": "ዙሉኛ", + "zun": "ዙኒ", + "zxx": "ቋንቋዊ ይዘት አይደለáˆ", + "zza": "ዛዛ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ar.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ar.json new file mode 100644 index 0000000000000000000000000000000000000000..0dee4ffea8271ca05ffdc5c374fa8ecce72eba92 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ar.json @@ -0,0 +1,533 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "Ø§Ù„Ø£ÙØ§Ø±ÙŠØ©", + "ab": "الأبخازية", + "ace": "الأتشينيزية", + "ach": "الأكولية", + "ada": "الأدانجمية", + "ady": "الأديغة", + "ae": "Ø§Ù„Ø£ÙØ³ØªÙŠØ©", + "af": "Ø§Ù„Ø£ÙØ±ÙŠÙ‚انية", + "afh": "Ø§Ù„Ø£ÙØ±ÙŠÙ‡ÙŠÙ„ية", + "agq": "الأغم", + "ain": "الآينوية", + "ak": "الأكانية", + "akk": "الأكادية", + "ale": "الأليوتية", + "alt": "الألطائية الجنوبية", + "am": "الأمهرية", + "an": "الأراغونية", + "ang": "الإنجليزية القديمة", + "anp": "الأنجيكا", + "ar": "العربية", + "ar_001": "العربية الرسمية الحديثة", + "arc": "الآرامية", + "arn": "المابودونغونية", + "arp": "الأراباهو", + "ars": "اللهجة النجدية", + "arw": "الأراواكية", + "as": "الأسامية", + "asa": "الآسو", + "ast": "الأسترية", + "av": "الأوارية", + "awa": "الأوادية", + "ay": "الأيمارا", + "az": "الأذربيجانية", + "ba": "الباشكيرية", + "bal": "البلوشية", + "ban": "اللغة البالية", + "bas": "الباسا", + "bax": "بامن", + "bbj": "لغة الغومالا", + "be": "البيلاروسية", + "bej": "البيجا", + "bem": "البيمبا", + "bez": "بينا", + "bfd": "لغة الباÙوت", + "bg": "البلغارية", + "bgn": "البلوشية الغربية", + "bho": "البهوجبورية", + "bi": "البيسلامية", + "bik": "البيكولية", + "bin": "البينية", + "bkm": "لغة الكوم", + "bla": "السيكسيكية", + "bm": "البامبارا", + "bn": "البنغالية", + "bo": "التبتية", + "br": "البريتونية", + "bra": "البراجية", + "brx": "البودو", + "bs": "البوسنية", + "bss": "أكوس", + "bua": "البرياتية", + "bug": "البجينيزية", + "bum": "لغة البولو", + "byn": "البلينية", + "byv": "لغة الميدومبا", + "ca": "الكتالانية", + "cad": "الكادو", + "car": "الكاريبية", + "cay": "الكايوجية", + "cch": "الأتسام", + "ce": "الشيشانية", + "ceb": "السيبونية", + "cgg": "تشيغا", + "ch": "التشامورو", + "chb": "التشيبشا", + "chg": "التشاجاتاي", + "chk": "التشكيزية", + "chm": "الماري", + "chn": "الشينوك جارجون", + "cho": "الشوكتو", + "chp": "الشيباوايان", + "chr": "الشيروكي", + "chy": "الشايان", + "ckb": "السورانية الكردية", + "co": "الكورسيكية", + "cop": "القبطية", + "cr": "الكرى", + "crh": "لغة تتار القرم", + "crs": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© الكريولية السيشيلية", + "cs": "التشيكية", + "csb": "الكاشبايان", + "cu": "سلاÙية كنسية", + "cv": "Ø§Ù„ØªØ´ÙˆÙØ§Ø´ÙŠ", + "cy": "الويلزية", + "da": "الدانماركية", + "dak": "الداكوتا", + "dar": "الدارجوا", + "dav": "تيتا", + "de": "الألمانية", + "de_AT": "الألمانية النمساوية", + "de_CH": "الألمانية العليا السويسرية", + "del": "الديلوير", + "den": "السلاÙية", + "dgr": "الدوجريب", + "din": "الدنكا", + "dje": "الزارمية", + "doi": "الدوجرية", + "dsb": "صوربيا السÙلى", + "dua": "الديولا", + "dum": "الهولندية الوسطى", + "dv": "المالديÙية", + "dyo": "جولا Ùونيا", + "dyu": "الدايلا", + "dz": "الزونخاية", + "dzg": "القرعانية", + "ebu": "إمبو", + "ee": "الإيوي", + "efi": "الإÙيك", + "egy": "المصرية القديمة", + "eka": "الإكاجك", + "el": "اليونانية", + "elx": "الإمايت", + "en": "الإنجليزية", + "en_AU": "الإنجليزية الأسترالية", + "en_CA": "الإنجليزية الكندية", + "en_GB": "الإنجليزية البريطانية", + "en_US": "الإنجليزية الأمريكية", + "enm": "الإنجليزية الوسطى", + "eo": "الإسبرانتو", + "es": "الإسبانية", + "es_419": "الإسبانية أمريكا اللاتينية", + "es_ES": "الإسبانية الأوروبية", + "es_MX": "الإسبانية المكسيكية", + "et": "الإستونية", + "eu": "لغة الباسك", + "ewo": "الإيوندو", + "fa": "Ø§Ù„ÙØ§Ø±Ø³ÙŠØ©", + "fan": "Ø§Ù„ÙØ§Ù†Ø¬", + "fat": "Ø§Ù„ÙØ§Ù†ØªÙŠ", + "ff": "الÙولانية", + "fi": "الÙنلندية", + "fil": "الÙلبينية", + "fj": "الÙيجية", + "fo": "Ø§Ù„ÙØ§Ø±ÙˆÙŠØ©", + "fon": "الÙون", + "fr": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ©", + "fr_CA": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© الكندية", + "fr_CH": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© السويسرية", + "frm": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© الوسطى", + "fro": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© القديمة", + "frr": "Ø§Ù„ÙØ±ÙŠØ²ÙŠÙ†ÙŠØ© الشمالية", + "frs": "Ø§Ù„ÙØ±ÙŠØ²ÙŠÙ†ÙŠØ© الشرقية", + "fur": "Ø§Ù„ÙØ±ÙŠÙ„ايان", + "fy": "Ø§Ù„ÙØ±ÙŠØ²ÙŠØ§Ù†", + "ga": "الأيرلندية", + "gaa": "الجا", + "gag": "الغاغوز", + "gan": "الغان الصينية", + "gay": "الجايو", + "gba": "الجبيا", + "gd": "الغيلية الأسكتلندية", + "gez": "الجعزية", + "gil": "لغة أهل جبل طارق", + "gl": "الجاليكية", + "gmh": "الألمانية العليا الوسطى", + "gn": "الغوارانية", + "goh": "الألمانية العليا القديمة", + "gon": "الجندي", + "gor": "الجورونتالو", + "got": "القوطية", + "grb": "الجريبو", + "grc": "اليونانية القديمة", + "gsw": "الألمانية السويسرية", + "gu": "الغوجاراتية", + "guz": "الغيزية", + "gv": "المنكية", + "gwi": "غوتشن", + "ha": "الهوسا", + "hai": "الهيدا", + "hak": "الهاكا الصينية", + "haw": "لغة أهل الهاواي", + "he": "العبرية", + "hi": "الهندية", + "hil": "الهيليجينون", + "hit": "الحثية", + "hmn": "الهمونجية", + "ho": "الهيري موتو", + "hr": "الكرواتية", + "hsb": "الصوربية العليا", + "hsn": "شيانغ الصينية", + "ht": "الكريولية الهايتية", + "hu": "الهنغارية", + "hup": "الهبا", + "hy": "الأرمينية", + "hz": "الهيريرو", + "ia": "اللّغة الوسيطة", + "iba": "الإيبان", + "ibb": "الإيبيبيوية", + "id": "الإندونيسية", + "ie": "الإنترلينج", + "ig": "الإيجبو", + "ii": "السيتشيون يي", + "ik": "الإينبياك", + "ilo": "الإيلوكو", + "inh": "الإنجوشية", + "io": "الإيدو", + "is": "الأيسلندية", + "it": "الإيطالية", + "iu": "الإينكتيتت", + "ja": "اليابانية", + "jbo": "اللوجبان", + "jgo": "نغومبا", + "jmc": "الماتشامية", + "jpr": "Ø§Ù„ÙØ§Ø±Ø³ÙŠØ© اليهودية", + "jrb": "العربية اليهودية", + "jv": "الجاوية", + "ka": "الجورجية", + "kaa": "الكارا-كالباك", + "kab": "القبيلية", + "kac": "الكاتشين", + "kaj": "الجو", + "kam": "الكامبا", + "kaw": "الكوي", + "kbd": "الكاباردايان", + "kbl": "كانمبو", + "kcg": "التايابية", + "kde": "ماكونده", + "kea": "كابوÙيرديانو", + "kfo": "الكورو", + "kg": "الكونغو", + "kha": "الكازية", + "kho": "الخوتانيز", + "khq": "كويرا تشيني", + "ki": "الكيكيو", + "kj": "الكيونياما", + "kk": "الكازاخستانية", + "kkj": "لغة الكاكو", + "kl": "الكالاليست", + "kln": "كالينجين", + "km": "الخميرية", + "kmb": "الكيمبندو", + "kn": "الكانادا", + "ko": "الكورية", + "koi": "كومي-بيرماياك", + "kok": "الكونكانية", + "kos": "الكوسراين", + "kpe": "الكبيل", + "kr": "الكانيوري", + "krc": "الكاراتشاي-بالكار", + "krl": "الكاريلية", + "kru": "الكوروخ", + "ks": "الكشميرية", + "ksb": "شامبالا", + "ksf": "لغة الباÙيا", + "ksh": "لغة الكولونيان", + "ku": "الكردية", + "kum": "القموقية", + "kut": "الكتيناي", + "kv": "الكومي", + "kw": "الكورنية", + "ky": "القيرغيزية", + "la": "اللاتينية", + "lad": "اللادينو", + "lag": "لانجي", + "lah": "اللاهندا", + "lam": "اللامبا", + "lb": "اللكسمبورغية", + "lez": "الليزجية", + "lg": "الجاندا", + "li": "الليمبرجيشية", + "lkt": "لاكوتا", + "ln": "اللينجالا", + "lo": "اللاوية", + "lol": "منغولى", + "loz": "اللوزي", + "lrc": "اللرية الشمالية", + "lt": "الليتوانية", + "lu": "اللبا-كاتانجا", + "lua": "اللبا-لؤلؤ", + "lui": "اللوسينو", + "lun": "اللوندا", + "luo": "اللو", + "lus": "الميزو", + "luy": "لغة اللويا", + "lv": "اللاتÙية", + "mad": "المادريز", + "mag": "الماجا", + "mai": "المايثيلي", + "mak": "الماكاسار", + "man": "الماندينغ", + "mas": "الماساي", + "mde": "مابا", + "mdf": "الموكشا", + "mdr": "الماندار", + "men": "الميند", + "mer": "الميرو", + "mfe": "المورسيانية", + "mg": "المالاجاشية", + "mga": "الأيرلندية الوسطى", + "mgh": "ماخاوا-ميتو", + "mgo": "ميتا", + "mh": "المارشالية", + "mi": "الماورية", + "mic": "الميكماكيونية", + "min": "المينانجكاباو", + "mk": "المقدونية", + "ml": "المالايالامية", + "mn": "المنغولية", + "mnc": "المانشو", + "mni": "المانيبورية", + "moh": "الموهوك", + "mos": "الموسي", + "mr": "الماراثية", + "ms": "الماليزية", + "mt": "المالطية", + "mua": "مندنج", + "mul": "لغات متعددة", + "mus": "الكريك", + "mwl": "الميرانديز", + "mwr": "الماروارية", + "my": "البورمية", + "myv": "الأرزية", + "mzn": "المازندرانية", + "na": "النورو", + "nan": "مين-نان الصينية", + "nap": "النابولية", + "naq": "لغة الناما", + "nb": "النرويجية بوكمال", + "nd": "النديبيل الشمالية", + "nds": "الألمانية السÙلى", + "nds_NL": "السكسونية السÙلى", + "ne": "النيبالية", + "new": "النوارية", + "ng": "الندونجا", + "nia": "النياس", + "niu": "النيوي", + "nl": "الهولندية", + "nl_BE": "الÙلمنكية", + "nmg": "كواسيو", + "nn": "النرويجية نينورسك", + "nnh": "لغة النجيمبون", + "no": "النرويجية", + "nog": "النوجاي", + "non": "النورس القديم", + "nqo": "أنكو", + "nr": "النديبيل الجنوبي", + "nso": "السوتو الشمالية", + "nus": "النوير", + "nv": "Ø§Ù„Ù†Ø§ÙØ§Ø¬Ùˆ", + "nwc": "النوارية التقليدية", + "ny": "النيانجا", + "nym": "النيامويزي", + "nyn": "النيانكول", + "nyo": "النيورو", + "nzi": "النزيما", + "oc": "الأوكيتانية", + "oj": "الأوجيبوا", + "om": "الأورومية", + "or": "اللغة الأورية", + "os": "الأوسيتيك", + "osa": "الأوساج", + "ota": "التركية العثمانية", + "pa": "البنجابية", + "pag": "البانجاسينان", + "pal": "البهلوية", + "pam": "البامبانجا", + "pap": "البابيامينتو", + "pau": "البالوان", + "pcm": "البدجنية النيجيرية", + "peo": "Ø§Ù„ÙØ§Ø±Ø³ÙŠØ© القديمة", + "phn": "الÙينيقية", + "pi": "البالية", + "pl": "البولندية", + "pon": "البوهنبيايان", + "prg": "البروسياوية", + "pro": "Ø§Ù„Ø¨Ø±ÙˆÙØ§Ù†Ø³ÙŠØ© القديمة", + "ps": "البشتونية", + "pt": "البرتغالية", + "pt_BR": "البرتغالية البرازيلية", + "pt_PT": "البرتغالية الأوروبية", + "qu": "الكويتشوا", + "quc": "كيشي", + "raj": "الراجاسثانية", + "rap": "الراباني", + "rar": "الراروتونجاني", + "rm": "الرومانشية", + "rn": "الرندي", + "ro": "الرومانية", + "ro_MD": "المولدوÙية", + "rof": "الرومبو", + "rom": "الغجرية", + "root": "الجذر", + "ru": "الروسية", + "rup": "الأرومانيان", + "rw": "الكينيارواندا", + "rwk": "الروا", + "sa": "السنسكريتية", + "sad": "السانداوي", + "sah": "الساخية", + "sam": "الآرامية السامرية", + "saq": "سامبورو", + "sas": "الساساك", + "sat": "السانتالي", + "sba": "نامبي", + "sbp": "سانغو", + "sc": "السردينية", + "scn": "الصقلية", + "sco": "الأسكتلندية", + "sd": "السندية", + "sdh": "الكردية الجنوبية", + "se": "السامي الشمالية", + "see": "السنيكا", + "seh": "سينا", + "sel": "السيلكب", + "ses": "كويرابورو سيني", + "sg": "السانجو", + "sga": "الأيرلندية القديمة", + "sh": "صربية-كرواتية", + "shi": "تشلحيت", + "shn": "الشان", + "shu": "العربية التشادية", + "si": "السنهالية", + "sid": "السيدامو", + "sk": "Ø§Ù„Ø³Ù„ÙˆÙØ§ÙƒÙŠØ©", + "sl": "Ø§Ù„Ø³Ù„ÙˆÙØ§Ù†ÙŠØ©", + "sm": "الساموائية", + "sma": "السامي الجنوبي", + "smj": "اللول سامي", + "smn": "الإيناري سامي", + "sms": "السكولت سامي", + "sn": "الشونا", + "snk": "السونينك", + "so": "الصومالية", + "sog": "السوجدين", + "sq": "الألبانية", + "sr": "الصربية", + "srn": "السرانان تونجو", + "srr": "السرر", + "ss": "السواتي", + "ssy": "لغة الساهو", + "st": "السوتو الجنوبية", + "su": "السوندانية", + "suk": "السوكوما", + "sus": "السوسو", + "sux": "السومارية", + "sv": "السويدية", + "sw": "السواحلية", + "sw_CD": "الكونغو السواحلية", + "swb": "القمرية", + "syc": "سريانية تقليدية", + "syr": "السريانية", + "ta": "التاميلية", + "te": "التيلوجو", + "tem": "التيمن", + "teo": "تيسو", + "ter": "التيرينو", + "tet": "التيتم", + "tg": "الطاجيكية", + "th": "التايلاندية", + "ti": "التغرينية", + "tig": "التيغرية", + "tiv": "التيÙ", + "tk": "التركمانية", + "tkl": "التوكيلاو", + "tl": "التاغالوغية", + "tlh": "الكلينجون", + "tli": "التلينغيتية", + "tmh": "التاماشيك", + "tn": "التسوانية", + "to": "التونغية", + "tog": "تونجا - نياسا", + "tpi": "التوك بيسين", + "tr": "التركية", + "trv": "لغة التاروكو", + "ts": "السونجا", + "tsi": "التسيمشيان", + "tt": "التترية", + "tum": "التامبوكا", + "tvl": "Ø§Ù„ØªÙˆÙØ§Ù„Ùˆ", + "tw": "التوي", + "twq": "تاساواق", + "ty": "التاهيتية", + "tyv": "التوÙية", + "tzm": "الأمازيغية وسط الأطلس", + "udm": "الأدمرت", + "ug": "الأويغورية", + "uga": "اليجاريتيك", + "uk": "الأوكرانية", + "umb": "الأمبندو", + "und": "لغة غير Ù…Ø¹Ø±ÙˆÙØ©", + "ur": "الأوردية", + "uz": "الأوزبكية", + "vai": "Ø§Ù„ÙØ§ÙŠ", + "ve": "الÙيندا", + "vi": "الÙيتنامية", + "vo": "لغة الÙولابوك", + "vot": "الÙوتيك", + "vun": "الÙونجو", + "wa": "الولونية", + "wae": "الوالسر", + "wal": "الولاياتا", + "war": "الواراي", + "was": "الواشو", + "wbp": "وارلبيري", + "wo": "الولوÙية", + "wuu": "الوو الصينية", + "xal": "الكالميك", + "xh": "الخوسا", + "xog": "السوغا", + "yao": "الياو", + "yap": "اليابيز", + "yav": "يانجبن", + "ybb": "يمبا", + "yi": "اليديشية", + "yo": "اليوروبية", + "yue": "الكَنْتÙونية", + "za": "الزهيونج", + "zap": "الزابوتيك", + "zbl": "رموز المعايير الأساسية", + "zen": "الزيناجا", + "zgh": "التمازيغية المغربية القياسية", + "zh": "الصينية", + "zh_Hans": "الصينية المبسطة", + "zh_Hant": "الصينية التقليدية", + "zu": "الزولو", + "zun": "الزونية", + "zxx": "بدون محتوى لغوي", + "zza": "زازا" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ar_EG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ar_EG.json new file mode 100644 index 0000000000000000000000000000000000000000..6ce492dc16f860879af2895c31f3dc9b4cfc200c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ar_EG.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "da": "الدنماركية" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ar_LY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ar_LY.json new file mode 100644 index 0000000000000000000000000000000000000000..11e849cac8299d100e7b87b95f15a00a843c5672 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ar_LY.json @@ -0,0 +1,14 @@ +{ + "Version": "2.1.27.99", + "Names": { + "arn": "المابودونجونية", + "gn": "الغورانية", + "hsb": "صوربيا العليا", + "lo": "اللاوو", + "sh": "الكرواتية الصربية", + "sma": "سامي الجنوبية", + "sw": "السواحيلية", + "sw_CD": "السواحيلية الكونغولية", + "ti": "التيغرينية" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ar_SA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ar_SA.json new file mode 100644 index 0000000000000000000000000000000000000000..c683ab735cc45cdc44c67681ad2319faea98559f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ar_SA.json @@ -0,0 +1,15 @@ +{ + "Version": "2.1.27.99", + "Names": { + "arn": "المابودونجونية", + "gn": "الغورانية", + "hsb": "صوربيا العليا", + "lo": "اللاوو", + "or": "الأورية", + "sh": "الكرواتية الصربية", + "sma": "سامي الجنوبية", + "sw": "السواحيلية", + "sw_CD": "السواحيلية الكونغولية", + "ti": "التيغرينية" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/as.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/as.json new file mode 100644 index 0000000000000000000000000000000000000000..ec884a5b4730bc1fb0cc2180bc95b29712c8e79f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/as.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "as": "অসমীয়া" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/az.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/az.json new file mode 100644 index 0000000000000000000000000000000000000000..d151c8b84af61d332da9436adf3325254dbcefef --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/az.json @@ -0,0 +1,516 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afar", + "ab": "abxaz", + "ace": "akin", + "ach": "akoli", + "ada": "adanqme", + "ady": "aduge", + "ae": "avestan", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aqhem", + "ain": "aynu", + "ak": "akan", + "akk": "akkad", + "ale": "aleut", + "alt": "cÉ™nubi altay", + "am": "amhar", + "an": "araqon", + "ang": "qÉ™dim ingilis", + "anp": "angika", + "ar": "É™rÉ™b", + "ar_001": "müasir standart É™rÉ™b", + "arc": "aramik", + "arn": "mapuçe", + "arp": "arapaho", + "arw": "aravak", + "as": "assam", + "asa": "asu", + "ast": "asturiya", + "av": "avar", + "awa": "avadhi", + "ay": "aymara", + "az": "azÉ™rbaycan", + "az_Arab": "cÉ™nubi azÉ™rbaycan", + "ba": "baÅŸqırd", + "bal": "baluc", + "ban": "balli", + "bas": "basa", + "be": "belarus", + "bej": "beja", + "bem": "bemba", + "bez": "bena", + "bg": "bolqar", + "bgn": "qÉ™rbi bÉ™luc", + "bho": "bxoçpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bla": "siksikÉ™", + "bm": "bambara", + "bn": "benqal", + "bo": "tibet", + "br": "breton", + "bra": "braj", + "brx": "bodo", + "bs": "bosniak", + "bua": "buryat", + "bug": "bugin", + "byn": "blin", + "ca": "katalan", + "cad": "keddo", + "car": "karib", + "cch": "atsam", + "ce": "çeçen", + "ceb": "sebuan", + "cgg": "çiqa", + "ch": "çamoro", + "chb": "çibça", + "chg": "çaÄŸatay", + "chk": "çukiz", + "chm": "mari", + "chn": "çinuk lÉ™hçəsi", + "cho": "çoktau", + "chp": "çipevyan", + "chr": "çeroki", + "chy": "çeyen", + "ckb": "soran", + "co": "korsika", + "cop": "kopt", + "cr": "kri", + "crh": "krım türkcÉ™si", + "cs": "çex", + "csb": "kaÅŸubyan", + "cu": "slavyan", + "cv": "çuvaÅŸ", + "cy": "uels", + "da": "danimarka", + "dak": "dakota", + "dar": "darqva", + "dav": "taita", + "de": "alman", + "de_AT": "Avstriya almancası", + "de_CH": "İsveçrÉ™ yüksÉ™k almancası", + "del": "delaver", + "den": "slavey", + "dgr": "doqrib", + "din": "dinka", + "dje": "zarma", + "doi": "doqri", + "dsb": "aÅŸağı sorb", + "dua": "duala", + "dum": "orta holland", + "dv": "maldiv", + "dyo": "diola", + "dyu": "dyula", + "dz": "dzonqa", + "dzg": "dazaqa", + "ebu": "embu", + "ee": "eve", + "efi": "efik", + "egy": "qÉ™dim misir", + "eka": "ekacuk", + "el": "yunan", + "elx": "elamit", + "en": "ingilis", + "en_AU": "Avstraliya ingiliscÉ™si", + "en_CA": "Kanada ingiliscÉ™si", + "en_GB": "Britaniya ingiliscÉ™si", + "en_US": "Amerika ingiliscÉ™si", + "enm": "orta ingilis", + "eo": "esperanto", + "es": "ispan", + "es_419": "Latın Amerikası ispancası", + "es_ES": "Kastiliya ispancası", + "es_MX": "Meksika ispancası", + "et": "eston", + "eu": "bask", + "ewo": "evondo", + "fa": "fars", + "fan": "fang", + "fat": "fanti", + "ff": "fula", + "fi": "fin", + "fil": "filippin", + "fj": "fici", + "fo": "farer", + "fon": "fon", + "fr": "fransız", + "fr_CA": "Kanada fransızcası", + "fr_CH": "İsveçrÉ™ fransızcası", + "frm": "orta fransız", + "fro": "qÉ™dim fransız", + "frr": "ÅŸimali fris", + "fur": "friul", + "fy": "qÉ™rbi friz", + "ga": "irland", + "gaa": "qa", + "gag": "qaqauz", + "gan": "qan", + "gay": "qayo", + "gba": "qabaya", + "gd": "Åžotlandiya keltcÉ™si", + "gez": "qez", + "gil": "qilbert", + "gl": "qalisiya", + "gmh": "orta yüksÉ™k alman", + "gn": "quarani", + "goh": "qÉ™dim alman", + "gon": "qondi", + "gor": "qorontalo", + "got": "gotça", + "grb": "qrebo", + "grc": "qÉ™dim yunan", + "gsw": "İsveçrÉ™ almancası", + "gu": "qucarat", + "guz": "qusi", + "gv": "manks", + "gwi": "qviçin", + "ha": "hausa", + "hai": "hayda", + "hak": "hakka", + "haw": "havay", + "he": "ivrit", + "hi": "hind", + "hil": "hiliqaynon", + "hit": "hittit", + "hmn": "monq", + "ho": "hiri motu", + "hr": "xorvat", + "hsb": "yuxarı sorb", + "hsn": "syan", + "ht": "haiti kreol", + "hu": "macar", + "hup": "hupa", + "hy": "ermÉ™ni", + "hz": "herero", + "ia": "interlinqua", + "iba": "iban", + "ibb": "ibibio", + "id": "indoneziya", + "ie": "interlinqve", + "ig": "iqbo", + "ii": "siçuan yi", + "ik": "inupiaq", + "ilo": "iloko", + "inh": "inquÅŸ", + "io": "ido", + "is": "island", + "it": "italyan", + "iu": "inuktitut", + "ja": "yapon", + "jbo": "loÄŸban", + "jgo": "nqomba", + "jmc": "maçam", + "jpr": "ivrit-fars", + "jrb": "ivrit-É™rÉ™b", + "jv": "yava", + "ka": "gürcü", + "kaa": "qaraqalpaq", + "kab": "kabile", + "kac": "kaçin", + "kaj": "ju", + "kam": "kamba", + "kaw": "kavi", + "kbd": "kabarda-çərkÉ™z", + "kcg": "tiyap", + "kde": "makond", + "kea": "kabuverdian", + "kfo": "koro", + "kg": "konqo", + "kha": "xazi", + "kho": "xotan", + "khq": "koyra çiini", + "ki": "kikuyu", + "kj": "kuanyama", + "kk": "qazax", + "kkj": "kako", + "kl": "kalaallisut", + "kln": "kalencin", + "km": "kxmer", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "koreya", + "koi": "komi-permyak", + "kok": "konkani", + "kos": "kosreyan", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "qaraçay-balkar", + "krl": "karel", + "kru": "kurux", + "ks": "kəşmir", + "ksb": "ÅŸambala", + "ksf": "bafia", + "ksh": "köln", + "ku": "kürd", + "kum": "kumık", + "kut": "kutenay", + "kv": "komi", + "kw": "korn", + "ky": "qırğız", + "la": "latın", + "lad": "sefard", + "lag": "langi", + "lah": "qÉ™rbi pÉ™ncab", + "lam": "lamba", + "lb": "lüksemburq", + "lez": "lÉ™zgi", + "lg": "qanda", + "li": "limburq", + "lkt": "lakota", + "ln": "linqala", + "lo": "laos", + "lol": "monqo", + "loz": "lozi", + "lrc": "ÅŸimali luri", + "lt": "litva", + "lu": "luba-katanqa", + "lua": "luba-lulua", + "lui": "luyseno", + "lun": "lunda", + "luo": "luo", + "lus": "mizo", + "luy": "luyia", + "lv": "latış", + "mad": "maduriz", + "mag": "maqahi", + "mai": "maitili", + "mak": "makasar", + "man": "mÉ™ndinqo", + "mas": "masay", + "mdf": "mokÅŸa", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "morisien", + "mg": "malaqas", + "mga": "orta irland", + "mgh": "maxuva-meetto", + "mgo": "meta’", + "mh": "marÅŸal", + "mi": "maori", + "mic": "mikmak", + "min": "minanqkaban", + "mk": "makedon", + "ml": "malayalam", + "mn": "monqol", + "mnc": "mançu", + "mni": "manipüri", + "moh": "mohavk", + "mos": "mosi", + "mr": "marathi", + "ms": "malay", + "mt": "malta", + "mua": "mundanq", + "mul": "çoxsaylı dillÉ™r", + "mus": "krik", + "mwl": "mirand", + "mwr": "maruari", + "my": "birman", + "myv": "erzya", + "mzn": "mazandaran", + "na": "nauru", + "nan": "Min Nan", + "nap": "neapolitan", + "naq": "nama", + "nb": "bokmal norveç", + "nd": "ÅŸimali ndebele", + "nds": "aÅŸağı alman", + "nds_NL": "aÅŸağı sakson", + "ne": "nepal", + "new": "nevari", + "ng": "ndonqa", + "nia": "nias", + "niu": "niyuan", + "nl": "holland", + "nl_BE": "flamand", + "nmg": "kvasio", + "nn": "nünorsk norveç", + "nnh": "ngiemboon", + "no": "norveç", + "nog": "noqay", + "non": "qÉ™dim nors", + "nqo": "nqo", + "nr": "cÉ™nubi ndebele", + "nso": "ÅŸimal soto", + "nus": "nuer", + "nv": "navayo", + "ny": "nyanca", + "nym": "nyamvezi", + "nyn": "nyankol", + "nyo": "nyoro", + "nzi": "nzima", + "oc": "oksitan", + "oj": "ocibva", + "om": "oromo", + "or": "odiya", + "os": "osetin", + "osa": "osage", + "ota": "osman", + "pa": "pÉ™ncab", + "pag": "panqasinan", + "pal": "pÉ™hlÉ™vi", + "pam": "pampanqa", + "pap": "papyamento", + "pau": "palayan", + "pcm": "niger kreol", + "peo": "qÉ™dim fars", + "phn": "foyenik", + "pi": "pali", + "pl": "polyak", + "pon": "ponpey", + "pro": "qÉ™dim provansal", + "ps": "puÅŸtu", + "pt": "portuqal", + "pt_BR": "Braziliya portuqalcası", + "pt_PT": "Portuqaliya portuqalcası", + "qu": "keçua", + "quc": "kiçe", + "raj": "racastani", + "rap": "rapanui", + "rar": "rarotonqan", + "rm": "romanÅŸ", + "rn": "rundi", + "ro": "rumın", + "ro_MD": "moldav", + "rof": "rombo", + "rom": "roman", + "root": "rut", + "ru": "rus", + "rup": "aroman", + "rw": "kinyarvanda", + "rwk": "rua", + "sa": "sanskrit", + "sad": "sandave", + "sah": "saxa", + "sam": "samaritan", + "saq": "samburu", + "sas": "sasak", + "sat": "santal", + "sba": "nqambay", + "sbp": "sanqu", + "sc": "sardin", + "scn": "siciliya", + "sco": "skots", + "sd": "sindhi", + "sdh": "cÉ™nubi kürd", + "se": "ÅŸimali sami", + "seh": "sena", + "sel": "selkup", + "ses": "koyraboro senni", + "sg": "sanqo", + "sga": "qÉ™dim irland", + "sh": "serb-xorvat", + "shi": "taçelit", + "shn": "ÅŸan", + "si": "sinhala", + "sid": "sidamo", + "sk": "slovak", + "sl": "sloven", + "sm": "samoa", + "sma": "cÉ™nubi sami", + "smj": "lule sami", + "smn": "inari sami", + "sms": "skolt sami", + "sn": "ÅŸona", + "snk": "soninke", + "so": "somali", + "sog": "soqdiyen", + "sq": "alban", + "sr": "serb", + "srn": "sranan tonqo", + "srr": "serer", + "ss": "svati", + "ssy": "saho", + "st": "sesoto", + "su": "sundan", + "suk": "sukuma", + "sus": "susu", + "sux": "sumeryan", + "sv": "isveç", + "sw": "suahili", + "sw_CD": "Konqo suahilicÉ™si", + "swb": "komor", + "syr": "suriya", + "ta": "tamil", + "te": "teluqu", + "tem": "timne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tacik", + "th": "tay", + "ti": "tiqrin", + "tig": "tiqre", + "tiv": "tiv", + "tk": "türkmÉ™n", + "tkl": "tokelay", + "tl": "taqaloq", + "tlh": "klinqon", + "tli": "tlinqit", + "tmh": "tamaÅŸek", + "tn": "svana", + "to": "tonqa", + "tog": "nyasa tonqa", + "tpi": "tok pisin", + "tr": "türk", + "trv": "taroko", + "ts": "sonqa", + "tsi": "simÅŸyan", + "tt": "tatar", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "tvi", + "twq": "tasavaq", + "ty": "taxiti", + "tyv": "tuvinyan", + "tzm": "MÉ™rkÉ™zi Atlas tamazicÉ™si", + "udm": "udmurt", + "ug": "uyÄŸur", + "uga": "uqarit", + "uk": "ukrayna", + "umb": "umbundu", + "und": "namÉ™lum dil", + "ur": "urdu", + "uz": "özbÉ™k", + "vai": "vai", + "ve": "venda", + "vi": "vyetnam", + "vo": "volapük", + "vot": "votik", + "vun": "vunyo", + "wa": "valun", + "wae": "valles", + "wal": "valamo", + "war": "varay", + "was": "vaÅŸo", + "wbp": "valpiri", + "wo": "volof", + "wuu": "vu", + "xal": "kalmık", + "xh": "xosa", + "xog": "soqa", + "yao": "yao", + "yap": "yapiz", + "yav": "yanqben", + "ybb": "yemba", + "yi": "idiÅŸ", + "yo": "yoruba", + "yue": "kanton", + "za": "çjuan", + "zap": "zapotek", + "zbl": "blisimbols", + "zen": "zenaqa", + "zgh": "tamazi", + "zh": "çin", + "zh_Hans": "sadÉ™ləşmiÅŸ çin", + "zh_Hant": "É™nÉ™nÉ™vi çin", + "zu": "zulu", + "zun": "zuni", + "zxx": "dil mÉ™zmunu yoxdur", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/az_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/az_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..d1c274640d46665f5c67f8397a55c4340001b784 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/az_Cyrl.json @@ -0,0 +1,393 @@ +{ + "Version": "2.1.27.40", + "Names": { + "aa": "афар", + "ab": "абхаз", + "ace": "акин", + "ada": "адангме", + "ady": "адуÒе", + "af": "африкаанÑ", + "agq": "агһем", + "ain": "ајну", + "ak": "акан", + "ale": "алеут", + "alt": "ҹәнуби алтај", + "am": "амһар", + "an": "арагон", + "anp": "анÒика", + "ar": "әрәб", + "ar_001": "мүаÑир Ñтандарт әрәб", + "arn": "арауканҹа", + "arp": "арапаһо", + "as": "аÑÑам", + "asa": "аÑу", + "ast": "аÑтурија", + "av": "авар", + "awa": "авадһи", + "ay": "ајмара", + "az": "азәрбајҹан", + "ba": "башгырд", + "ban": "балли", + "bas": "баÑа", + "be": "беларуÑ", + "bem": "бемба", + "bez": "бена", + "bg": "булгар", + "bho": "бхочпури", + "bi": "биÑлама", + "bin": "бини", + "bla": "ÑикÑикә", + "bm": "бамбара", + "bn": "бенгал", + "bo": "тибет", + "br": "бретон", + "brx": "бодо", + "bs": "боÑниак", + "bug": "буÒин", + "byn": "блин", + "ca": "каталан", + "ce": "чечен", + "ceb": "Ñебуан", + "cgg": "чига", + "ch": "чаморо", + "chk": "чукиз", + "chm": "мари", + "cho": "чоктау", + "chr": "чероки", + "chy": "чејен", + "ckb": "Ñоран", + "co": "корÑика", + "crs": "Ñејшел креолу", + "cs": "чех", + "cu": "Ñлавјан", + "cv": "чуваш", + "cy": "уелÑ", + "da": "данимарка", + "dak": "дакота", + "dar": "даргва", + "dav": "таита", + "de": "алман", + "de_AT": "ÐвÑтрија алманҹаÑÑ‹", + "de_CH": "ИÑвечрә јүкÑәк алманҹаÑÑ‹", + "dgr": "догриб", + "dje": "зарма", + "dsb": "ашағы Ñорб", + "dua": "дуала", + "dv": "малдив", + "dyo": "диола", + "dz": "дзонга", + "dzg": "дазага", + "ebu": "ембу", + "ee": "еве", + "efi": "ефик", + "eka": "екаҹук", + "el": "јунан", + "en": "инÒилиÑ", + "en_AU": "ÐвÑтралија инÒилиÑÒ¹Ó™Ñи", + "en_CA": "Канада инÒилиÑÒ¹Ó™Ñи", + "en_GB": "Британија инÒилиÑÒ¹Ó™Ñи", + "en_US": "Ðмерика инÒилиÑÒ¹Ó™Ñи", + "eo": "еÑперанто", + "es": "иÑпан", + "es_419": "Латын ÐмерикаÑÑ‹ иÑпанҹаÑÑ‹", + "es_ES": "КаÑтилија иÑпанҹаÑÑ‹", + "es_MX": "МекÑика иÑпанҹаÑÑ‹", + "et": "еÑтон", + "eu": "баÑк", + "ewo": "евондо", + "fa": "фарÑ", + "ff": "фула", + "fi": "фин", + "fil": "филиппин", + "fj": "фиҹи", + "fo": "фарер", + "fon": "фон", + "fr": "франÑыз", + "fr_CA": "Канада франÑызҹаÑÑ‹", + "fr_CH": "ИÑвечрә франÑызҹаÑÑ‹", + "fur": "фриул", + "fy": "гәрби фриз", + "ga": "ирланд", + "gaa": "га", + "gd": "шотланд келт", + "gez": "гез", + "gil": "гилберт", + "gl": "галиÑија", + "gn": "гуарани", + "gor": "горонтало", + "gsw": "ИÑвечрә алманҹаÑÑ‹", + "gu": "гуҹарат", + "guz": "гуÑи", + "gv": "манкÑ", + "gwi": "гвичин", + "ha": "һауÑа", + "haw": "һавај", + "he": "иврит", + "hi": "һинд", + "hil": "һилигајнон", + "hmn": "монг", + "hr": "хорват", + "hsb": "јухары Ñорб", + "ht": "һаити креол", + "hu": "маҹар", + "hup": "һупа", + "hy": "ермәни", + "hz": "һереро", + "ia": "интерлингве", + "iba": "ибан", + "ibb": "ибибио", + "id": "индонезија", + "ig": "игбо", + "ilo": "илоко", + "inh": "ингуш", + "io": "идо", + "is": "иÑланд", + "it": "италјан", + "iu": "инуктитут", + "ja": "јапон", + "jbo": "лоғбан", + "jgo": "нгомба", + "jmc": "мачам", + "jv": "јава", + "ka": "Òүрҹү", + "kab": "кабиле", + "kac": "качин", + "kaj": "жу", + "kam": "камба", + "kbd": "кабарда-чәркәз", + "kcg": "тви", + "kde": "маконде", + "kea": "кабувердиан", + "kfo": "коро", + "kha": "хази", + "khq": "којра чиини", + "ki": "кикују", + "kj": "куанјама", + "kk": "газах", + "kkj": "како", + "kl": "калааллиÑут", + "kln": "каленҹин", + "km": "кхмер", + "kmb": "кимбунду", + "kn": "каннада", + "ko": "кореја", + "kok": "конкани", + "kpe": "кпелле", + "kr": "канури", + "krc": "гарачај-балкар", + "krl": "карел", + "kru": "курух", + "ks": "кәшмир", + "ksb": "шамбала", + "ksf": "бафиа", + "ksh": "көлн", + "ku": "күрд", + "kum": "кумык", + "kv": "коми", + "kw": "корн", + "ky": "гырғыз", + "la": "латын", + "lad": "Ñефард", + "lag": "ланÒи", + "lb": "лүкÑембург", + "lez": "ләзÒи", + "lg": "ганда", + "li": "лимбург", + "lkt": "лакота", + "ln": "лингала", + "lo": "лаоÑ", + "loz": "лози", + "lrc": "шимали лури", + "lt": "литва", + "lu": "луба-катанга", + "lua": "луба-лулуа", + "lun": "лунда", + "luo": "луо", + "lus": "мизо", + "luy": "лујиа", + "lv": "латыш", + "mad": "мадуриз", + "mag": "магаһи", + "mai": "маитили", + "mak": "макаÑар", + "mas": "маÑај", + "mdf": "мокша", + "men": "менде", + "mer": "меру", + "mfe": "мориÑиен", + "mg": "малагаÑ", + "mgh": "махува-меетто", + "mgo": "метаʼ", + "mh": "маршал", + "mi": "маори", + "mic": "микмак", + "min": "минангкабан", + "mk": "македон", + "ml": "малајалам", + "mn": "монгол", + "mni": "манипүри", + "moh": "моһавк", + "mos": "моÑи", + "mr": "маратһи", + "ms": "малај", + "mt": "малта", + "mua": "мунданг", + "mul": "чохÑајлы дилләр", + "mus": "крик", + "mwl": "миранд", + "my": "бирман", + "myv": "ерзја", + "mzn": "мазандаран", + "na": "науру", + "nap": "неаполитан", + "naq": "нама", + "nb": "бокмал норвеч", + "nd": "шимали ндебеле", + "nds_NL": "ашағы ÑакÑон", + "ne": "непал", + "new": "невари", + "ng": "ндонга", + "nia": "ниаÑ", + "niu": "нијуан", + "nl": "һолланд", + "nl_BE": "фламанд", + "nmg": "кваÑио", + "nn": "нүнорÑк норвеч", + "nnh": "нÒиембоон", + "nog": "ногај", + "nqo": "нго", + "nr": "ҹәнуби ндебеле", + "nso": "шимали Ñото", + "nus": "нуер", + "nv": "навајо", + "ny": "нјанҹа", + "nyn": "нјанкол", + "oc": "окÑитан", + "om": "оромо", + "or": "одија", + "os": "оÑетин", + "pa": "пәнҹаб", + "pag": "пангаÑинан", + "pam": "пампанга", + "pap": "папјаменто", + "pau": "палајан", + "pcm": "ниÒер креол", + "pl": "полјак", + "prg": "пруÑÑ", + "ps": "пушту", + "pt": "португал", + "pt_BR": "Бразилија португалҹаÑÑ‹", + "pt_PT": "Португалија португалҹаÑÑ‹", + "qu": "кечуа", + "quc": "киче", + "rap": "рапануи", + "rar": "раротонган", + "rm": "романш", + "rn": "рунди", + "ro": "румын", + "rof": "ромбо", + "root": "рут", + "ru": "руÑ", + "rup": "ароман", + "rw": "кинјарванда", + "rwk": "руа", + "sa": "ÑанÑкрит", + "sad": "Ñандаве", + "sah": "Ñаха", + "saq": "Ñамбуру", + "sat": "Ñантал", + "sba": "нгамбај", + "sbp": "Ñангу", + "sc": "Ñардин", + "scn": "Ñиҹилија", + "sco": "ÑкотÑ", + "sd": "Ñиндһи", + "se": "шимали Ñами", + "seh": "Ñена", + "ses": "којраборо Ñенни", + "sg": "Ñанго", + "shi": "тачелит", + "shn": "шан", + "si": "Ñинһала", + "sk": "Ñловак", + "sl": "Ñловен", + "sm": "Ñамоа", + "sma": "ҹәнуби Ñами", + "smj": "луле Ñами", + "smn": "инари Ñами", + "sms": "Ñколт Ñами", + "sn": "шона", + "snk": "Ñонинке", + "so": "Ñомали", + "sq": "албан", + "sr": "Ñерб", + "srn": "Ñранан тонго", + "ss": "Ñвати", + "ssy": "Ñаһо", + "st": "ÑеÑото", + "su": "Ñундан", + "suk": "Ñукума", + "sv": "иÑвеч", + "sw": "Ñуаһили", + "sw_CD": "Конго ÑуаһилиҹәÑи", + "swb": "комор", + "syr": "Ñурија", + "ta": "тамил", + "te": "телугу", + "tem": "тимне", + "teo": "теÑо", + "tet": "тетум", + "tg": "таҹик", + "th": "тај", + "ti": "тигрин", + "tig": "тигре", + "tk": "түркмән", + "tlh": "клингон", + "tn": "Ñвана", + "to": "тонган", + "tpi": "ток пиÑин", + "tr": "түрк", + "trv": "тароко", + "ts": "Ñонга", + "tt": "татар", + "tum": "тумбука", + "tvl": "тувалу", + "twq": "таÑаваг", + "ty": "тахити", + "tyv": "тувинјан", + "tzm": "Мәркәзи ÐÑ‚Ð»Ð°Ñ Ñ‚Ð°Ð¼Ð°Ð·Ð¸Ò¹Ó™Ñи", + "udm": "удмурт", + "ug": "ујғур", + "uk": "украјна", + "umb": "умбунду", + "und": "намәлум дил", + "ur": "урду", + "uz": "өзбәк", + "vai": "ваи", + "ve": "венда", + "vi": "вјетнам", + "vo": "волапүк", + "vun": "вунјо", + "wa": "валун", + "wae": "валлеÑ", + "wal": "валамо", + "war": "варај", + "wo": "волоф", + "xal": "калмык", + "xh": "хоÑа", + "xog": "Ñога", + "yav": "јангбен", + "ybb": "јемба", + "yi": "идиш", + "yo": "јоруба", + "yue": "кантон", + "zgh": "тамази", + "zh": "чин", + "zh_Hans": "Ñадәләшмиш чин", + "zh_Hant": "әнәнәви чин", + "zu": "зулу", + "zun": "зуни", + "zxx": "дил мәзмуну јохдур", + "zza": "заза" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/be.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/be.json new file mode 100644 index 0000000000000000000000000000000000000000..7666d419ca93f1d2c9b80fe2a8fc39c136b3846c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/be.json @@ -0,0 +1,424 @@ +{ + "Version": "2.1.29.66", + "Names": { + "aa": "афарÑкаÑ", + "ab": "абхазÑкаÑ", + "ace": "ачÑÑ…", + "ada": "адангмÑ", + "ady": "адыгейÑкаÑ", + "af": "афрыкаанÑ", + "agq": "агем", + "ain": "айнÑкаÑ", + "ak": "акан", + "akk": "акадÑкаÑ", + "ale": "алеуцкаÑ", + "alt": "паўднёваалтайÑкаÑ", + "am": "амхарÑкаÑ", + "an": "арагонÑкаÑ", + "ang": "ÑтараанглійÑкаÑ", + "anp": "ангіка", + "ar": "арабÑкаÑ", + "ar_001": "ÑучаÑÐ½Ð°Ñ ÑÑ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ð°Ñ Ð°Ñ€Ð°Ð±ÑкаÑ", + "arc": "арамейÑкаÑ", + "arn": "мапудунгун", + "arp": "арапаха", + "as": "аÑамÑкаÑ", + "asa": "аÑу", + "ast": "аÑтурыйÑкаÑ", + "av": "аварÑкаÑ", + "awa": "авадхі", + "ay": "аймара", + "az": "азербайджанÑкаÑ", + "ba": "башкірÑкаÑ", + "ban": "балійÑкаÑ", + "bas": "баÑаа", + "be": "беларуÑкаÑ", + "bem": "бемба", + "bez": "бена", + "bg": "балгарÑкаÑ", + "bgn": "заходнÑÑ Ð±ÐµÐ»ÑƒÐ´Ð¶ÑкаÑ", + "bho": "бхаджпуры", + "bi": "біÑлама", + "bin": "Ñда", + "bla": "блÑкфут", + "bm": "бамбара", + "bn": "бенгальÑкаÑ", + "bo": "тыбецкаÑ", + "br": "брÑтонÑкаÑ", + "brx": "бода", + "bs": "баÑнійÑкаÑ", + "bua": "бурацкаÑ", + "bug": "бугіÑ", + "byn": "білен", + "ca": "каталанÑкаÑ", + "ce": "чачÑнÑкаÑ", + "ceb": "Ñебуана", + "cgg": "чыга", + "ch": "чамора", + "chb": "чыбча", + "chk": "чуук", + "chm": "мары", + "cho": "чокта", + "chr": "чÑрокі", + "chy": "шÑйен", + "ckb": "цÑнтральнакурдÑкаÑ", + "co": "карÑіканÑкаÑ", + "cop": "копцкаÑ", + "crs": "ÑÑÑÑльва", + "cs": "чÑшÑкаÑ", + "cu": "царкоўнаÑлавÑнÑкаÑ", + "cv": "чувашÑкаÑ", + "cy": "валійÑкаÑ", + "da": "дацкаÑ", + "dak": "дакота", + "dar": "даргінÑкаÑ", + "dav": "таіта", + "de": "нÑмецкаÑ", + "de_AT": "аўÑтрыйÑÐºÐ°Ñ Ð½ÑмецкаÑ", + "de_CH": "швейцарÑÐºÐ°Ñ ÑÑ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ð°Ñ Ð½ÑмецкаÑ", + "dgr": "догрыб", + "dje": "зарма", + "dsb": "ніжнÑлужыцкаÑ", + "dua": "дуала", + "dv": "мальдыўÑкаÑ", + "dyo": "джола-фоньі", + "dz": "дзонг-кÑ", + "dzg": "дазага", + "ebu": "Ñмбу", + "ee": "Ñве", + "efi": "Ñфік", + "egy": "ÑтаражытнаегіпецкаÑ", + "eka": "Ñкаджук", + "el": "грÑчаÑкаÑ", + "en": "англійÑкаÑ", + "en_AU": "аўÑтралійÑÐºÐ°Ñ Ð°Ð½Ð³Ð»Ñ–Ð¹ÑкаÑ", + "en_CA": "канадÑÐºÐ°Ñ Ð°Ð½Ð³Ð»Ñ–Ð¹ÑкаÑ", + "en_GB": "брытанÑÐºÐ°Ñ Ð°Ð½Ð³Ð»Ñ–Ð¹ÑкаÑ", + "en_US": "амерыканÑÐºÐ°Ñ Ð°Ð½Ð³Ð»Ñ–Ð¹ÑкаÑ", + "eo": "ÑÑперанта", + "es": "Ñ–ÑпанÑкаÑ", + "es_419": "лацінаамерыканÑÐºÐ°Ñ Ñ–ÑпанÑкаÑ", + "es_ES": "еўрапейÑÐºÐ°Ñ Ñ–ÑпанÑкаÑ", + "es_MX": "мекÑіканÑÐºÐ°Ñ Ñ–ÑпанÑкаÑ", + "et": "ÑÑтонÑкаÑ", + "eu": "баÑкÑкаÑ", + "ewo": "Ñвонда", + "fa": "фарÑÑ–", + "ff": "фула", + "fi": "фінÑкаÑ", + "fil": "філіпінÑкаÑ", + "fj": "фіджыйÑкаÑ", + "fo": "фарÑÑ€ÑкаÑ", + "fon": "фон", + "fr": "французÑкаÑ", + "fr_CA": "канадÑÐºÐ°Ñ Ñ„Ñ€Ð°Ð½Ñ†ÑƒÐ·ÑкаÑ", + "fr_CH": "швейцарÑÐºÐ°Ñ Ñ„Ñ€Ð°Ð½Ñ†ÑƒÐ·ÑкаÑ", + "fro": "ÑтарафранцузÑкаÑ", + "fur": "фрыульÑкаÑ", + "fy": "заходнÑÑ Ñ„Ñ€Ñ‹Ð·ÑкаÑ", + "ga": "ірландÑкаÑ", + "gaa": "га", + "gag": "гагаузÑкаÑ", + "gd": "шатландÑÐºÐ°Ñ Ð³ÑльÑкаÑ", + "gez": "геÑз", + "gil": "кірыбаці", + "gl": "галіÑійÑкаÑ", + "gn": "гуарані", + "gor": "гарантала", + "grc": "ÑтаражытнагрÑчаÑкаÑ", + "gsw": "швейцарÑÐºÐ°Ñ Ð½ÑмецкаÑ", + "gu": "гуджараці", + "guz": "гуÑÑ–Ñ–", + "gv": "мÑнÑкаÑ", + "gwi": "гуіч’ін", + "ha": "хауÑа", + "haw": "гавайÑкаÑ", + "he": "іўрыт", + "hi": "хіндзі", + "hil": "хілігайнон", + "hmn": "хмонг", + "hr": "харвацкаÑ", + "hsb": "верхнÑлужыцкаÑ", + "ht": "гаіцÑнÑÐºÐ°Ñ ÐºÑ€ÑольÑкаÑ", + "hu": "венгерÑкаÑ", + "hup": "хупа", + "hy": "армÑнÑкаÑ", + "hz": "герÑра", + "ia": "інтÑрлінгва", + "iba": "ібан", + "ibb": "ібібіÑ", + "id": "інданезійÑкаÑ", + "ie": "інтÑрлінгвÑ", + "ig": "ігба", + "ii": "ÑычуаньÑÐºÐ°Ñ Ð¹Ñ–", + "ilo": "ілакана", + "inh": "інгушÑкаÑ", + "io": "іда", + "is": "Ñ–ÑландÑкаÑ", + "it": "італьÑнÑкаÑ", + "iu": "інуктытут", + "ja": "ÑпонÑкаÑ", + "jbo": "ложбан", + "jgo": "нгомба", + "jmc": "мачамбÑ", + "jv": "ÑванÑкаÑ", + "ka": "грузінÑкаÑ", + "kab": "кабільÑкаÑ", + "kac": "качынÑкаÑ", + "kaj": "дджу", + "kam": "камба", + "kbd": "кабардзінÑкаÑ", + "kcg": "т’Ñп", + "kde": "макондÑ", + "kea": "кабувердыÑну", + "kfo": "кора", + "kha": "кхаÑÑ–", + "khq": "койра чыіні", + "ki": "кікуйю", + "kj": "куаньÑма", + "kk": "казахÑкаÑ", + "kkj": "како", + "kl": "грÑнландÑкаÑ", + "kln": "календжын", + "km": "кхмерÑкаÑ", + "kmb": "кімбунду", + "kn": "канада", + "ko": "карÑйÑкаÑ", + "koi": "комі-пÑрмÑцкаÑ", + "kok": "канкані", + "kpe": "кпеле", + "kr": "кануры", + "krc": "карачай-балкарÑкаÑ", + "krl": "карÑльÑкаÑ", + "kru": "курух", + "ks": "кашмірÑкаÑ", + "ksb": "шамбала", + "ksf": "бафіÑ", + "ksh": "кёльнÑкаÑ", + "ku": "курдÑкаÑ", + "kum": "кумыцкаÑ", + "kv": "комі", + "kw": "корнÑкаÑ", + "ky": "кіргізÑкаÑ", + "la": "лацінÑкаÑ", + "lad": "ладына", + "lag": "лангі", + "lb": "люкÑембургÑкаÑ", + "lez": "лезгінÑкаÑ", + "lg": "ганда", + "li": "лімбургÑкаÑ", + "lkt": "лакота", + "ln": "лінгала", + "lo": "лаоÑкаÑ", + "lol": "монга", + "loz": "лозі", + "lrc": "Ð¿Ð°ÑžÐ½Ð¾Ñ‡Ð½Ð°Ñ Ð»ÑƒÑ€Ñ‹", + "lt": "літоўÑкаÑ", + "lu": "луба-катанга", + "lua": "луба-каÑаі", + "lun": "лунда", + "luo": "луо", + "lus": "мізо", + "luy": "луйÑ", + "lv": "латышÑкаÑ", + "mad": "мадурÑкаÑ", + "mag": "магахі", + "mai": "майтхілі", + "mak": "макаÑар", + "man": "мандынг", + "mas": "мааÑай", + "mdf": "макшанÑкаÑ", + "men": "мендÑ", + "mer": "меру", + "mfe": "марыÑьен", + "mg": "малагаÑійÑкаÑ", + "mgh": "макуўа-меета", + "mgo": "мета", + "mh": "маршальÑкаÑ", + "mi": "маары", + "mic": "мікмак", + "min": "мінангкабау", + "mk": "македонÑкаÑ", + "ml": "малаÑлам", + "mn": "мангольÑкаÑ", + "mni": "мейтÑй", + "moh": "мохак", + "mos": "моÑÑ–", + "mr": "маратхі", + "ms": "малайÑкаÑ", + "mt": "мальтыйÑкаÑ", + "mua": "мунданг", + "mul": "некалькі моў", + "mus": "муÑкогі", + "mwl": "мірандыйÑкаÑ", + "my": "бірманÑкаÑ", + "myv": "ÑрзÑнÑкаÑ", + "mzn": "мазандÑранÑкаÑ", + "na": "науру", + "nap": "неапалітанÑкаÑ", + "naq": "нама", + "nb": "нарвежÑÐºÐ°Ñ (букмол)", + "nd": "Ð¿Ð°ÑžÐ½Ð¾Ñ‡Ð½Ð°Ñ Ð½Ð´Ñбеле", + "nds": "ніжненÑмецкаÑ", + "nds_NL": "ніжнеÑакÑонÑкаÑ", + "ne": "непальÑкаÑ", + "new": "неўары", + "ng": "ндонга", + "nia": "ніаÑ", + "niu": "ніўÑ", + "nl": "нідÑрландÑкаÑ", + "nl_BE": "фламандÑкаÑ", + "nmg": "нгумба", + "nn": "нарвежÑÐºÐ°Ñ (нюношк)", + "nnh": "нг’ембон", + "no": "нарвежÑкаÑ", + "nog": "нагайÑкаÑ", + "non": "ÑтаранарвежÑкаÑ", + "nqo": "нко", + "nr": "Ð¿Ð°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ Ð½Ð´Ñбеле", + "nso": "Ð¿Ð°ÑžÐ½Ð¾Ñ‡Ð½Ð°Ñ Ñота", + "nus": "нуÑÑ€", + "nv": "наваха", + "ny": "ньÑнджа", + "nyn": "ньÑнколе", + "oc": "акÑітанÑкаÑ", + "oj": "аджыбва", + "om": "арома", + "or": "орыÑ", + "os": "аÑецінÑкаÑ", + "pa": "панджабі", + "pag": "пангаÑінан", + "pam": "пампанга", + "pap": "пап’Ñменту", + "pau": "палау", + "pcm": "нігерыйÑкі піджын", + "peo": "ÑтараперÑідÑкаÑ", + "phn": "фінікійÑкаÑ", + "pl": "польÑкаÑ", + "prg": "пруÑкаÑ", + "pro": "ÑтараправанÑальÑкаÑ", + "ps": "пушту", + "pt": "партугальÑкаÑ", + "pt_BR": "бразільÑÐºÐ°Ñ Ð¿Ð°Ñ€Ñ‚ÑƒÐ³Ð°Ð»ÑŒÑкаÑ", + "pt_PT": "еўрапейÑÐºÐ°Ñ Ð¿Ð°Ñ€Ñ‚ÑƒÐ³Ð°Ð»ÑŒÑкаÑ", + "qu": "кечуа", + "quc": "кічÑ", + "raj": "раджаÑтханÑкаÑ", + "rap": "рапануі", + "rar": "раратонг", + "rm": "Ñ€ÑтараманÑкаÑ", + "rn": "рундзі", + "ro": "румынÑкаÑ", + "ro_MD": "малдаўÑÐºÐ°Ñ Ñ€ÑƒÐ¼Ñ‹Ð½ÑкаÑ", + "rof": "ромба", + "root": "корань", + "ru": "руÑкаÑ", + "rup": "арумунÑкаÑ", + "rw": "руанда", + "rwk": "руа", + "sa": "ÑанÑкрыт", + "sad": "ÑандаўÑ", + "sah": "ÑкуцкаÑ", + "saq": "Ñамбуру", + "sat": "Ñанталі", + "sba": "нгамбай", + "sbp": "Ñангу", + "sc": "ÑардзінÑкаÑ", + "scn": "ÑіцылійÑкаÑ", + "sco": "шатландÑкаÑ", + "sd": "Ñіндхі", + "sdh": "паўднёвакурдÑкаÑ", + "se": "паўночнаÑаамÑкаÑ", + "seh": "Ñена", + "ses": "кайрабора ÑÑні", + "sg": "Ñанга", + "sga": "ÑтараірландÑкаÑ", + "sh": "ÑербÑкахарвацкаÑ", + "shi": "ташÑльхіт", + "shn": "шан", + "si": "ÑінгальÑкаÑ", + "sk": "ÑлавацкаÑ", + "sl": "ÑлавенÑкаÑ", + "sm": "Ñамоа", + "sma": "паўднёваÑаамÑкаÑ", + "smj": "луле-ÑаамÑкаÑ", + "smn": "інары-ÑаамÑкаÑ", + "sms": "колта-ÑаамÑкаÑ", + "sn": "шона", + "snk": "Ñанінке", + "so": "Ñамалі", + "sq": "албанÑкаÑ", + "sr": "ÑербÑкаÑ", + "srn": "Ñранан-тонга", + "ss": "Ñуаці", + "ssy": "Ñаха", + "st": "Ð¿Ð°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ Ñота", + "su": "Ñунда", + "suk": "Ñукума", + "sux": "шумерÑкаÑ", + "sv": "шведÑкаÑ", + "sw": "Ñуахілі", + "sw_CD": "кангалезÑÐºÐ°Ñ Ñуахілі", + "swb": "каморÑкаÑ", + "syr": "ÑірыйÑкаÑ", + "ta": "тамільÑкаÑ", + "te": "Ñ‚Ñлугу", + "tem": "Ñ‚ÑмнÑ", + "teo": "Ñ‚ÑÑо", + "tet": "Ñ‚Ñтум", + "tg": "таджыкÑкаÑ", + "th": "тайÑкаÑ", + "ti": "тыгрыньÑ", + "tig": "тыгрÑ", + "tk": "туркменÑкаÑ", + "tlh": "клінган", + "tn": "Ñ‚Ñвана", + "to": "танганÑкаÑ", + "tpi": "ток-піÑін", + "tr": "турÑцкаÑ", + "trv": "тарока", + "ts": "Ñ‚Ñонга", + "tt": "татарÑкаÑ", + "tum": "тумбука", + "tvl": "тувалу", + "twq": "таÑаўак", + "ty": "таіці", + "tyv": "тувінÑкаÑ", + "tzm": "цÑнтральнаатлаÑÐºÐ°Ñ Ñ‚Ð°Ð¼Ð°Ð·Ñ–Ñ…Ñ‚", + "udm": "удмурцкаÑ", + "ug": "уйгурÑкаÑ", + "uk": "украінÑкаÑ", + "umb": "умбунду", + "und": "невÑÐ´Ð¾Ð¼Ð°Ñ Ð¼Ð¾Ð²Ð°", + "ur": "урду", + "uz": "узбекÑкаÑ", + "vai": "ваі", + "ve": "венда", + "vi": "в’етнамÑкаÑ", + "vo": "валапюк", + "vun": "вунджо", + "wa": "валонÑкаÑ", + "wae": "вальшÑкаÑ", + "wal": "волайта", + "war": "варай", + "wbp": "варлпіры", + "wo": "валоф", + "xal": "калмыцкаÑ", + "xh": "коÑа", + "xog": "Ñога", + "yav": "ÑнгбÑн", + "ybb": "йемба", + "yi": "ідыш", + "yo": "ёруба", + "yue": "кантонÑкі дыÑлект кітайÑкай", + "zap": "ÑапатÑк", + "zgh": "ÑÑ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ð°Ñ Ð¼Ð°Ñ€Ð°ÐºÐ°Ð½ÑÐºÐ°Ñ Ñ‚Ð°Ð¼Ð°Ð·Ñ–Ñ…Ñ‚", + "zh": "кітайÑкаÑ", + "zh_Hans": "ÑÐ¿Ñ€Ð¾ÑˆÑ‡Ð°Ð½Ð°Ñ ÐºÑ–Ñ‚Ð°Ð¹ÑкаÑ", + "zh_Hant": "Ñ‚Ñ€Ð°Ð´Ñ‹Ñ†Ñ‹Ð¹Ð½Ð°Ñ ÐºÑ–Ñ‚Ð°Ð¹ÑкаÑ", + "zu": "зулу", + "zun": "зуні", + "zxx": "нÑма моўнага матÑрыÑлу", + "zza": "зазакі" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bg.json new file mode 100644 index 0000000000000000000000000000000000000000..54da08cb8728959e313fd28f00ccc1fd270b8273 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bg.json @@ -0,0 +1,502 @@ +{ + "Version": "2.1.30.6", + "Names": { + "aa": "афар", + "ab": "абхазки", + "ace": "ачинÑки", + "ach": "аколи", + "ada": "адангме", + "ady": "адиге", + "ae": "авеÑÑ‚Ñки", + "af": "африкаанÑ", + "afh": "африхили", + "agq": "агем", + "ain": "айну", + "ak": "акан", + "akk": "акадÑки", + "ale": "алеутÑки", + "alt": "южноалтайÑки", + "am": "амхарÑки", + "an": "арагонÑки", + "ang": "ÑтароанглийÑки", + "anp": "ангика", + "ar": "арабÑки", + "ar_001": "Ñъвременен Ñтандартен арабÑки", + "arc": "арамейÑки", + "arn": "мапуче", + "arp": "арапахо", + "arw": "аравак", + "as": "аÑамÑки", + "asa": "аÑу", + "ast": "аÑтурÑки", + "av": "аварÑки", + "awa": "авади", + "ay": "аймара", + "az": "азербайджанÑки", + "ba": "башкирÑки", + "bal": "балучи", + "ban": "балийÑки", + "bas": "баÑа", + "be": "беларуÑки", + "bej": "беÑ", + "bem": "бемба", + "bez": "бена", + "bg": "българÑки", + "bgn": "западен балочи", + "bho": "божпури", + "bi": "биÑлама", + "bik": "биколÑки", + "bin": "бини", + "bla": "ÑикÑика", + "bm": "бамбара", + "bn": "бенгалÑки", + "bo": "тибетÑки", + "br": "бретонÑки", + "bra": "брадж", + "brx": "бодо", + "bs": "боÑненÑки", + "bua": "бурÑÑ‚Ñки", + "bug": "бугинÑки", + "byn": "биленÑки", + "ca": "каталонÑки", + "cad": "каддо", + "car": "карибÑки", + "cch": "атÑам", + "ce": "чеченÑки", + "ceb": "Ñебуано", + "cgg": "чига", + "ch": "чаморо", + "chb": "чибча", + "chg": "чагатай", + "chk": "чуук", + "chm": "марийÑки", + "chn": "жаргон чинуук", + "cho": "чокто", + "chp": "чиипувÑки", + "chr": "чероки", + "chy": "чейенÑки", + "ckb": "кюрдÑки (централен)", + "co": "корÑиканÑки", + "cop": "коптÑки", + "cr": "крии", + "crh": "кримÑкотатарÑки", + "crs": "ÑеÑелва, креолÑки френÑки", + "cs": "чешки", + "csb": "кашубÑки", + "cu": "църковноÑлавÑнÑки", + "cv": "чувашки", + "cy": "уелÑки", + "da": "датÑки", + "dak": "дакотÑки", + "dar": "даргва", + "dav": "таита", + "de": "немÑки", + "del": "делауер", + "den": "Ñлейви", + "dgr": "догриб", + "din": "динка", + "dje": "зарма", + "doi": "догри", + "dsb": "долноÑръбÑки", + "dua": "дуала", + "dum": "Ñредновековен холандÑки", + "dv": "дивехи", + "dyo": "диола", + "dyu": "диула", + "dz": "дзонха", + "dzg": "дазага", + "ebu": "ембу", + "ee": "еве", + "efi": "ефик", + "egy": "древноегипетÑки", + "eka": "екажук", + "el": "гръцки", + "elx": "еламитÑки", + "en": "английÑки", + "en_US": "английÑки (СÐЩ)", + "enm": "Ñредновековен английÑки", + "eo": "еÑперанто", + "es": "иÑпанÑки", + "et": "еÑтонÑки", + "eu": "баÑки", + "ewo": "евондо", + "fa": "перÑийÑки", + "fan": "фанг", + "fat": "фанти", + "ff": "фула", + "fi": "финÑки", + "fil": "филипинÑки", + "fj": "фиджийÑки", + "fo": "фарьорÑки", + "fon": "фон", + "fr": "френÑки", + "frm": "Ñредновековен френÑки", + "fro": "ÑтарофренÑки", + "frr": "Ñеверен фризÑки", + "frs": "източнофризийÑки", + "fur": "фриулианÑки", + "fy": "фризийÑки", + "ga": "ирландÑки", + "gaa": "га", + "gag": "гагаузки", + "gay": "гайо", + "gba": "гбаÑ", + "gd": "шотландÑки галÑки", + "gez": "гииз", + "gil": "гилбертÑки", + "gl": "галиÑийÑки", + "gmh": "ÑредновиÑоконемÑки", + "gn": "гуарани", + "goh": "ÑтаровиÑоконемÑки", + "gon": "гонди", + "gor": "горонтало", + "got": "готичеÑки", + "grb": "гребо", + "grc": "древногръцки", + "gsw": "швейцарÑки немÑки", + "gu": "гуджарати", + "guz": "гуÑии", + "gv": "манкÑки", + "gwi": "гвичин", + "ha": "хауза", + "hai": "хайда", + "haw": "хавайÑки", + "he": "иврит", + "hi": "хинди", + "hil": "хилигайнон", + "hit": "хитÑки", + "hmn": "хмонг", + "ho": "хири моту", + "hr": "хърватÑки", + "hsb": "горнолужишки", + "ht": "хаитÑнÑки креолÑки", + "hu": "унгарÑки", + "hup": "хупа", + "hy": "арменÑки", + "hz": "хереро", + "ia": "интерлингва", + "iba": "ибан", + "ibb": "ибибио", + "id": "индонезийÑки", + "ie": "окÑидентал", + "ig": "игбо", + "ii": "ÑъчуанÑки и", + "ik": "инупиак", + "ilo": "илоко", + "inh": "ингушетÑки", + "io": "идо", + "is": "иÑландÑки", + "it": "италианÑки", + "iu": "инуктитут", + "ja": "ÑпонÑки", + "jbo": "ложбан", + "jgo": "нгомба", + "jmc": "мачаме", + "jpr": "юдео-перÑийÑки", + "jrb": "юдео-арабÑки", + "jv": "ÑванÑки", + "ka": "грузинÑки", + "kaa": "каракалпашки", + "kab": "кабилÑки", + "kac": "качинÑки", + "kaj": "жжу", + "kam": "камба", + "kaw": "кави", + "kbd": "кабардиан", + "kcg": "туап", + "kde": "маконде", + "kea": "кабовердианÑки", + "kfo": "коро", + "kg": "конгоанÑки", + "kha": "кхаÑи", + "kho": "котÑки", + "khq": "койра чиини", + "ki": "кикую", + "kj": "кванÑма", + "kk": "казахÑки", + "kkj": "како", + "kl": "гренландÑки", + "kln": "календжин", + "km": "кхмерÑки", + "kmb": "кимбунду", + "kn": "каннада", + "ko": "корейÑки", + "koi": "коми-пермÑкÑки", + "kok": "конкани", + "kos": "коÑраен", + "kpe": "кпеле", + "kr": "канури", + "krc": "карачай-балкарÑки", + "krl": "карелÑки", + "kru": "курук", + "ks": "кашмирÑки", + "ksb": "шамбала", + "ksf": "бафиÑ", + "ksh": "кьолнÑки", + "ku": "кюрдÑки", + "kum": "кумикÑки", + "kut": "кутенай", + "kv": "коми", + "kw": "корнуолÑки", + "ky": "киргизки", + "la": "латинÑки", + "lad": "ладино", + "lag": "ланги", + "lah": "лахнда", + "lam": "ламба", + "lb": "люкÑембургÑки", + "lez": "лезгинÑки", + "lg": "ганда", + "li": "лимбургÑки", + "lkt": "лакота", + "ln": "лингала", + "lo": "лаоÑки", + "lol": "монго", + "loz": "лози", + "lrc": "Ñеверен лури", + "lt": "литовÑки", + "lu": "луба катанга", + "lua": "луба-лулуа", + "lui": "луиÑеньо", + "lun": "лунда", + "luo": "луо", + "lus": "мизо", + "luy": "луÑ", + "lv": "латвийÑки", + "mad": "мадурÑки", + "mag": "магахи", + "mai": "майтхили", + "mak": "макаÑар", + "man": "мандинго", + "mas": "маÑайÑки", + "mdf": "мокша", + "mdr": "мандар", + "men": "менде", + "mer": "меру", + "mfe": "мориÑиен", + "mg": "малгашки", + "mga": "Ñредновековен ирландÑки", + "mgh": "макуа мето", + "mgo": "мета", + "mh": "маршалезе", + "mi": "маорÑки", + "mic": "микмак", + "min": "минангкабау", + "mk": "македонÑки", + "ml": "малаÑлам", + "mn": "монголÑки", + "mnc": "манджурÑки", + "mni": "манипури", + "moh": "мохоук", + "mos": "моÑи", + "mr": "марати", + "ms": "малайÑки", + "mt": "малтийÑки", + "mua": "мунданг", + "mul": "многоезични", + "mus": "крик", + "mwl": "мирандийÑки", + "mwr": "марвари", + "my": "бирманÑки", + "myv": "ерзиа", + "mzn": "мазандари", + "na": "науру", + "nap": "неаполитанÑки", + "naq": "нама", + "nb": "норвежки (букмол)", + "nd": "Ñеверен ндебеле", + "nds": "долнонемÑки", + "nds_NL": "долноÑакÑонÑки", + "ne": "непалÑки", + "new": "неварÑки", + "ng": "ндонга", + "nia": "ниаÑ", + "niu": "ниуеан", + "nl": "нидерландÑки", + "nl_BE": "фламандÑки", + "nmg": "кваÑио", + "nn": "норвежки (нюношк)", + "nnh": "нгиембун", + "no": "норвежки", + "nog": "ногаи", + "non": "Ñтаронорвежки", + "nqo": "нко", + "nr": "южен ндебеле", + "nso": "Ñеверен Ñото", + "nus": "нуер", + "nv": "навахо", + "nwc": "клаÑичеÑки невари", + "ny": "нÑнджа", + "nym": "ниамвези", + "nyn": "нианколе", + "nyo": "нуоро", + "nzi": "нзима", + "oc": "окÑитанÑки", + "oj": "оджибва", + "om": "оромо", + "or": "ориÑ", + "os": "оÑетÑки", + "osa": "оÑейджи", + "ota": "отоманÑки турÑки", + "pa": "пенджабÑки", + "pag": "пангаÑинан", + "pal": "пахлави", + "pam": "пампанга", + "pap": "папиаменто", + "pau": "палауан", + "pcm": "нигерийÑки пиджин", + "peo": "ÑтароперÑийÑки", + "phn": "финикийÑки", + "pi": "пали", + "pl": "полÑки", + "pon": "понапеан", + "prg": "пруÑки", + "pro": "ÑтаропрованÑалÑки", + "ps": "пущу", + "pt": "португалÑки", + "qu": "кечуа", + "quc": "киче", + "raj": "раджаÑтанÑки", + "rap": "рапа нуи", + "rar": "раротонга", + "rm": "ретороманÑки", + "rn": "рунди", + "ro": "румънÑки", + "ro_MD": "молдовÑки", + "rof": "ромбо", + "rom": "ромÑки", + "root": "роот", + "ru": "руÑки", + "rup": "арумънÑки", + "rw": "кинÑруанда", + "rwk": "рва", + "sa": "ÑанÑкрит", + "sad": "Ñандаве", + "sah": "ÑкутÑки", + "sam": "ÑамаританÑки арамейÑки", + "saq": "Ñамбуру", + "sas": "ÑаÑак", + "sat": "Ñантали", + "sba": "нгамбай", + "sbp": "Ñангу", + "sc": "ÑардинÑки", + "scn": "ÑицилианÑки", + "sco": "шотландÑки", + "sd": "Ñиндхи", + "sdh": "южнокюрдÑки", + "se": "ÑеверноÑаамÑки", + "seh": "Ñена", + "sel": "Ñелкуп", + "ses": "койраборо Ñени", + "sg": "Ñанго", + "sga": "ÑтароирландÑки", + "sh": "ÑърбохърватÑки", + "shi": "ташелхит", + "shn": "шан", + "si": "ÑинхалÑки", + "sid": "Ñидамо", + "sk": "Ñловашки", + "sl": "ÑловенÑки", + "sm": "ÑамоанÑки", + "sma": "южноÑаамÑки", + "smj": "луле-ÑаамÑки", + "smn": "инари-ÑаамÑки", + "sms": "Ñколт-ÑаамÑки", + "sn": "шона", + "snk": "Ñонинке", + "so": "ÑомалийÑки", + "sog": "ÑогдийÑки", + "sq": "албанÑки", + "sr": "ÑръбÑки", + "srn": "Ñранан тонго", + "srr": "Ñерер", + "ss": "Ñвати", + "ssy": "Ñахо", + "st": "ÑеÑото", + "su": "ÑунданÑки", + "suk": "Ñукума", + "sus": "ÑуÑу", + "sux": "шумерÑки", + "sv": "шведÑки", + "sw": "Ñуахили", + "sw_CD": "конгоанÑки Ñуахили", + "swb": "коморÑки", + "syc": "клаÑичеÑки ÑирийÑки", + "syr": "ÑирийÑки", + "ta": "тамилÑки", + "te": "телугу", + "tem": "темне", + "teo": "теÑо", + "ter": "терено", + "tet": "тетум", + "tg": "таджикÑки", + "th": "тайÑки", + "ti": "тигринÑ", + "tig": "тигре", + "tiv": "тив", + "tk": "туркменÑки", + "tkl": "токелайÑки", + "tl": "тагалог", + "tlh": "клингонÑки", + "tli": "тлингит", + "tmh": "тамашек", + "tn": "Ñ‚Ñвана", + "to": "тонга", + "tog": "нианÑа тонга", + "tpi": "ток пиÑин", + "tr": "турÑки", + "trv": "тароко", + "ts": "цонга", + "tsi": "цимшианÑки", + "tt": "татарÑки", + "tum": "тумбука", + "tvl": "тувалуанÑки", + "tw": "туи", + "twq": "таÑавак", + "ty": "таитÑнÑки", + "tyv": "тувинÑки", + "tzm": "централноатлаÑки тамазигт", + "udm": "удмуртÑки", + "ug": "уйгурÑки", + "uga": "угаритÑки", + "uk": "украинÑки", + "umb": "умбунду", + "und": "неопределен", + "ur": "урду", + "uz": "узбекÑки", + "vai": "ваи", + "ve": "венда", + "vi": "виетнамÑки", + "vo": "волапюк", + "vot": "вотик", + "vun": "вунджо", + "wa": "валонÑки", + "wae": "валзерÑки немÑки", + "wal": "валамо", + "war": "варай", + "was": "уашо", + "wbp": "валпири", + "wo": "волоф", + "xal": "калмик", + "xh": "кÑоÑа", + "xog": "Ñога", + "yao": "Ñо", + "yap": "Ñпезе", + "yav": "Ñнгбен", + "ybb": "йемба", + "yi": "идиш", + "yo": "йоруба", + "yue": "кантонÑки", + "za": "зуанг", + "zap": "запотек", + "zbl": "Ð±Ð»Ð¸Ñ Ñимволи", + "zen": "зенага", + "zgh": "Ñтандартен мароканÑки тамазигт", + "zh": "китайÑки", + "zh_Hans": "китайÑки (опроÑтен)", + "zu": "зулуÑки", + "zun": "зуни", + "zxx": "без лингвиÑтично Ñъдържание", + "zza": "заза" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bm.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bm.json new file mode 100644 index 0000000000000000000000000000000000000000..c696388371eea3c74c76ab8e0d198e0a8231a88b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bm.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ak": "akankan", + "am": "amarikikan", + "ar": "larabukan", + "be": "biyelorisikan", + "bg": "buligarikan", + "bm": "bamanakan", + "bn": "bÉ›ngalikan", + "cs": "cÉ›kikan", + "de": "alimaɲikan", + "el": "gÉ›rÉ›sikan", + "en": "angilÉ›kan", + "es": "esipaɲolkan", + "fa": "perisanikan", + "fr": "tubabukan", + "ha": "awusakan", + "hi": "inidikan", + "hu": "oÅ‹irikan", + "id": "Ændonezikan", + "ig": "igibokan", + "it": "italikan", + "ja": "zapÉ”nekan", + "jv": "javanekan", + "km": "kambojikan", + "ko": "korekan", + "ms": "malÉ›zikan", + "my": "birimanikan", + "ne": "nepalekan", + "nl": "olandekan", + "pa": "pÉ›nijabikan", + "pl": "polonekan", + "pt": "pÉ”ritigalikan", + "ro": "rumanikan", + "ru": "irisikan", + "rw": "ruwandakan", + "so": "somalikan", + "sv": "suwÉ›dikan", + "ta": "tamulikan", + "th": "tayikan", + "tr": "turikikan", + "uk": "ukÉ›rÉ›nikan", + "ur": "urudukan", + "vi": "wiyÉ›tinamukan", + "yo": "yorubakan", + "zh": "siniwakan", + "zu": "zulukan" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bn.json new file mode 100644 index 0000000000000000000000000000000000000000..8acbc3a9c0d206f387c1d764f934a1782aab6ecd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bn.json @@ -0,0 +1,520 @@ +{ + "Version": "2.1.29.44", + "Names": { + "aa": "আফার", + "ab": "আবখাজিয়ান", + "ace": "অà§à¦¯à¦¾à¦šà¦¾à¦‡à¦¨à¦¿à¦œ", + "ach": "আকোলি", + "ada": "অদাগà§à¦®à§‡", + "ady": "আদেগে", + "ae": "আবেসà§à¦¤à§€à¦¯à¦¼", + "af": "আফà§à¦°à¦¿à¦•ান", + "afh": "আফà§à¦°à¦¿à¦¹à¦¿à¦²à¦¿", + "agq": "à¦à¦˜à§‡à¦®", + "ain": "আইনà§", + "ak": "আকান", + "akk": "আকà§à¦•াদিয়ান", + "ale": "আলেউত", + "alt": "দকà§à¦·à¦¿à¦¨ আলতাই", + "am": "আমহারিক", + "an": "আরà§à¦—োনিজ", + "ang": "পà§à¦°à¦¾à¦šà§€à¦¨ ইংরেজী", + "anp": "আঙà§à¦—িকা", + "ar": "আরবী", + "ar_001": "আধà§à¦¨à¦¿à¦• আদরà§à¦¶ আরবী", + "arc": "আরামাইক", + "arn": "মাপà§à¦šà¦¿", + "arp": "আরাপাহো", + "arw": "আরাওয়াক", + "as": "আসামি", + "asa": "আসà§", + "ast": "আসà§à¦¤à§à¦°à¦¿à¦¯à¦¼", + "av": "আভেরিক", + "awa": "আওয়াধি", + "ay": "আয়মারা", + "az": "আজারবাইজানী", + "ba": "বাশকির", + "bal": "বেলà§à¦šà§€", + "ban": "বালিনীয়", + "bas": "বাসা", + "be": "বেলারà§à¦¶à¦¿à¦¯à¦¼", + "bej": "বেজা", + "bem": "বেমà§à¦¬à¦¾", + "bez": "বেনা", + "bg": "বà§à¦²à¦—েরিয়", + "bgn": "পশà§à¦šà¦¿à¦® বালোচি", + "bho": "ভোজপà§à¦°à¦¿", + "bi": "বিসলামা", + "bik": "বিকোল", + "bin": "বিনি", + "bla": "সিকসিকা", + "bm": "বামবারা", + "bn": "বাংলা", + "bo": "তিবà§à¦¬à¦¤à¦¿", + "br": "বà§à¦°à§‡à¦Ÿà¦¨", + "bra": "বà§à¦°à¦¾à¦œ", + "brx": "বোড়ো", + "bs": "বসনীয়ান", + "bua": "বà§à¦°à¦¿à¦¯à¦¼à¦¾à¦¤", + "bug": "বà§à¦—িনি", + "byn": "বà§à¦²à¦¿à¦¨", + "ca": "কাতালান", + "cad": "কà§à¦¯à¦¾à¦¡à§‹", + "car": "কà§à¦¯à¦¾à¦°à¦¿à¦¬", + "cch": "আতà§à¦¸à¦¾à¦®", + "ce": "চেচেন", + "ceb": "চেবà§à¦¯à¦¼à¦¾à¦¨à§‹", + "cgg": "চিগা", + "ch": "চামোরো", + "chb": "চিবচা", + "chg": "চাগাতাই", + "chk": "চà§à¦•ি", + "chm": "মারি", + "chn": "চিনà§à¦• জারà§à¦—ন", + "cho": "চকটোও", + "chp": "চিপেওয়ান", + "chr": "চেরোকী", + "chy": "শাইয়েন", + "ckb": "মধà§à¦¯ কà§à¦°à§à¦¦à¦¿à¦¶", + "co": "করà§à¦¸à¦¿à¦•ান", + "cop": "কপটিক", + "cr": "কà§à¦°à¦¿", + "crh": "কà§à¦°à¦¿à¦®à¦¿à¦¯à¦¼à¦¾à¦¨ তà§à¦°à§à¦•ি", + "crs": "সেসেলওয়া কà§à¦°à§‡à¦“ল ফà§à¦°à§‡à¦žà§à¦š", + "cs": "চেক", + "csb": "কাশà§à¦¬à¦¿à¦¯à¦¼à¦¾à¦¨", + "cu": "চারà§à¦š সà§à¦²à¦¾à¦­à¦¿à¦•", + "cv": "চà§à¦¬à¦¾à¦¸", + "cy": "ওয়েলশ", + "da": "ডেনিশ", + "dak": "ডাকোটা", + "dar": "দারà§à¦—ওয়া", + "dav": "তাইতা", + "de": "জারà§à¦®à¦¾à¦¨", + "de_AT": "অসà§à¦Ÿà§à¦°à¦¿à¦¯à¦¼à¦¾à¦¨ জারà§à¦®à¦¾à¦¨", + "de_CH": "সà§à¦‡à¦¸ হাই জারà§à¦®à¦¾à¦¨", + "del": "ডেলাওয়ের", + "den": "সà§à¦²à§à¦¯à¦¾à¦­", + "dgr": "দোগà§à¦°à§€à¦¬", + "din": "ডিংকা", + "dje": "জারà§à¦®à¦¾", + "doi": "ডোগরি", + "dsb": "নিমà§à¦¨à¦¤à¦° সোরà§à¦¬à¦¿à¦¯à¦¼à¦¾à¦¨", + "dua": "দà§à¦¯à¦¼à¦¾à¦²à¦¾", + "dum": "মধà§à¦¯ ডাচ", + "dv": "দিবেহি", + "dyo": "জলা-ফনী", + "dyu": "ডিউলা", + "dz": "জোঙà§à¦—া", + "dzg": "দাগাজা", + "ebu": "à¦à¦®à§à¦¬à§", + "ee": "ইউয়ি", + "efi": "à¦à¦«à¦¿à¦•", + "egy": "পà§à¦°à¦¾à¦šà§€à¦¨ মিশরীয়", + "eka": "ইকাজà§à¦•", + "el": "গà§à¦°à¦¿à¦•", + "elx": "à¦à¦²à¦¾à¦®à¦¾à¦‡à¦Ÿ", + "en": "ইংরেজি", + "en_AU": "অসà§à¦Ÿà§à¦°à§‡à¦²à§€à¦¯à¦¼ ইংরেজি", + "en_CA": "কানাডীয় ইংরেজি", + "en_GB": "বà§à¦°à¦¿à¦Ÿà¦¿à¦¶ ইংরেজি", + "en_US": "আমেরিকার ইংরেজি", + "enm": "মধà§à¦¯ ইংরেজি", + "eo": "à¦à¦¸à§à¦ªà§‡à¦°à¦¾à¦¨à§à¦¤à§‹", + "es": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶", + "es_419": "লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨ আমেরিকান সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶", + "es_ES": "ইউরোপীয় সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶", + "es_MX": "মà§à¦¯à¦¾à¦•à§à¦¸à¦¿à¦•ান সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶", + "et": "à¦à¦¸à§à¦¤à§‹à¦¨à§€à¦¯à¦¼", + "eu": "বাসà§à¦•", + "ewo": "ইওনà§à¦¡à§‹", + "fa": "ফারà§à¦¸à¦¿", + "fan": "ফà§à¦¯à¦¾à¦™à§à¦—", + "fat": "ফানà§à¦¤à¦¿", + "ff": "ফà§à¦²à¦¾à¦¹à§", + "fi": "ফিনিশ", + "fil": "ফিলিপিনো", + "fj": "ফিজিআন", + "fo": "ফারোস", + "fon": "ফন", + "fr": "ফরাসি", + "fr_CA": "কানাডীয় ফরাসি", + "fr_CH": "সà§à¦‡à¦¸ ফরাসি", + "frm": "মধà§à¦¯ ফরাসি", + "fro": "পà§à¦°à¦¾à¦šà§€à¦¨ ফরাসি", + "frr": "উতà§à¦¤à¦°à¦¾à¦žà§à¦šà¦²à§€à¦¯à¦¼ ফà§à¦°à¦¿à¦¸à¦¿à¦¯à¦¼à¦¾à¦¨", + "frs": "পূরà§à¦¬ ফà§à¦°à¦¿à¦¸à¦¿à¦¯à¦¼", + "fur": "ফà§à¦°à¦¿à¦‰à¦²à¦¿à¦¯à¦¼à¦¾à¦¨", + "fy": "পশà§à¦šà¦¿à¦® ফà§à¦°à¦¿à¦¸à¦¿à¦¯à¦¼à¦¾à¦¨", + "ga": "আইরিশ", + "gaa": "গা", + "gag": "গাগাউজ", + "gan": "gan", + "gay": "গায়ো", + "gba": "বায়া", + "gd": "সà§à¦•টস-গà§à¦¯à§‡à¦²à¦¿à¦•", + "gez": "গীজ", + "gil": "গিলবারà§à¦Ÿà¦¿à¦œ", + "gl": "গà§à¦¯à¦¾à¦²à¦¿à¦¶à¦¿à¦¯à¦¼", + "gmh": "মধà§à¦¯-উচà§à¦š জারà§à¦®à¦¾à¦¨à¦¿", + "gn": "গà§à¦¯à¦¼à¦¾à¦°à¦¾à¦¨à¦¿", + "goh": "পà§à¦°à¦¾à¦šà§€à¦¨ উচà§à¦š জারà§à¦®à¦¾à¦¨à¦¿", + "gon": "গোনà§à¦¡à¦¿", + "gor": "গোরোনà§à¦¤à¦¾à¦²à§‹", + "got": "গথিক", + "grb": "গà§à¦°à§‡à¦¬à§‹", + "grc": "পà§à¦°à¦¾à¦šà§€à¦¨ গà§à¦°à§€à¦•", + "gsw": "সà§à¦‡à¦¸ জারà§à¦®à¦¾à¦¨", + "gu": "গà§à¦œà¦°à¦¾à¦Ÿà¦¿", + "guz": "গà§à¦¸à§€", + "gv": "মà§à¦¯à¦¾à¦™à§à¦•স", + "gwi": "গওইচà§â€™à¦‡à¦¨", + "ha": "হাউসা", + "hai": "হাইডা", + "hak": "hak", + "haw": "হাওয়াইয়ান", + "he": "হিবà§à¦°à§", + "hi": "হিনà§à¦¦à¦¿", + "hil": "হিলিগà§à¦¯à¦¾à¦¯à¦¼à¦¨à§‹à¦¨", + "hit": "হিটà§à¦Ÿà¦¿à¦Ÿ", + "hmn": "হà§â€Œà¦®à§‹à¦™", + "ho": "হিরি মোতà§", + "hr": "কà§à¦°à§‹à¦¯à¦¼à§‡à¦¶à§€à¦¯à¦¼", + "hsb": "উচà§à¦š সোরà§à¦¬à¦¿à¦¯à¦¼à¦¾à¦¨", + "hsn": "Xiang চীনা", + "ht": "হাইতিয়ান", + "hu": "হাঙà§à¦—েরীয়", + "hup": "হà§à¦ªà¦¾", + "hy": "আরà§à¦®à§‡à¦¨à¦¿à¦¯à¦¼", + "hz": "হেরেরো", + "ia": "ইনà§à¦Ÿà¦¾à¦°à¦²à¦¿à¦™à§à¦—à§à¦¯à¦¼à¦¾", + "iba": "ইবান", + "ibb": "ইবিবিও", + "id": "ইনà§à¦¦à§‹à¦¨à§‡à¦¶à§€à¦¯à¦¼", + "ie": "ইনà§à¦Ÿà¦¾à¦°à¦²à¦¿à¦™à§à¦—", + "ig": "ইগà§â€Œà¦¬à§‹", + "ii": "সিচà§à¦¯à¦¼à¦¾à¦¨ য়ি", + "ik": "ইনà§à¦ªà¦¿à¦¯à¦¼à¦¾à¦•", + "ilo": "ইলোকো", + "inh": "ইঙà§à¦—à§à¦¶", + "io": "ইডো", + "is": "আইসলà§à¦¯à¦¾à¦¨à§à¦¡à§€à¦¯à¦¼", + "it": "ইতালিয়", + "iu": "ইনà§à¦•à§à¦Ÿà¦¿à¦Ÿà§à¦Ÿ", + "ja": "জাপানি", + "jbo": "লোজবান", + "jgo": "গোমà§à¦¬à¦¾", + "jmc": "মাকামে", + "jpr": "জà§à¦¦à§‡à¦“ ফারà§à¦¸à¦¿", + "jrb": "জà§à¦¦à§‡à¦“ আরবি", + "jv": "জাভানিজ", + "ka": "জরà§à¦œà¦¿à¦¯à¦¼à¦¾à¦¨", + "kaa": "কারা-কালà§à¦ªà¦¾à¦•", + "kab": "কাবাইলে", + "kac": "কাচিন", + "kaj": "অজà§à¦œà§", + "kam": "কামà§à¦¬à¦¾", + "kaw": "কাউই", + "kbd": "কাবারà§à¦¡à¦¿à¦¯à¦¼à¦¾à¦¨", + "kcg": "টাইয়াপ", + "kde": "মাকোনà§à¦¦à§‡", + "kea": "কাবà§à¦­à¦¾à¦°à¦¦à¦¿à¦¯à¦¼à¦¾à¦¨à§", + "kfo": "কোরো", + "kg": "কঙà§à¦—à§‹", + "kha": "খাশি", + "kho": "খোটানিজ", + "khq": "কোয়রা চীনি", + "ki": "কিকà§à¦¯à¦¼à§", + "kj": "কোয়ানিয়ামা", + "kk": "কাজাখ", + "kkj": "কাকো", + "kl": "কà§à¦¯à¦¾à¦²à¦¾à¦²à§à¦²à¦¿à¦¸à§à¦Ÿ", + "kln": "কালেনজিন", + "km": "খমের", + "kmb": "কিমà§à¦¬à§à¦¨à§à¦¦à§", + "kn": "কনà§à¦¨à¦¡à¦¼", + "ko": "কোরিয়ান", + "koi": "কমি-পারমিআক", + "kok": "কোঙà§à¦•ানি", + "kos": "কোসà§à¦°à¦¾à¦‡à¦¨", + "kpe": "কà§â€Œà¦ªà§‡à¦²à§à¦²à§‡", + "kr": "কানà§à¦°à¦¿", + "krc": "কারচে-বালà§à¦•ার", + "krl": "কারেলিয়ান", + "kru": "কà§à¦°à§à¦–", + "ks": "কাশà§à¦®à§€à¦°à¦¿", + "ksb": "শামà§à¦¬à¦¾à¦²à¦¾", + "ksf": "বাফিয়া", + "ksh": "কলà§à¦¶", + "ku": "কà§à¦°à§à¦¦à¦¿à¦¶", + "kum": "কà§à¦®à¦¿à¦•", + "kut": "কà§à¦Ÿà§‡à¦¨à¦¾à¦‡", + "kv": "কোমি", + "kw": "করà§à¦£à¦¿à¦¶", + "ky": "কিরà§à¦—িজ", + "la": "লাটিন", + "lad": "লাডিনো", + "lag": "লাঙà§à¦—ি", + "lah": "লানà§à¦¡à¦¾", + "lam": "লামà§à¦¬à¦¾", + "lb": "লà§à¦•à§à¦¸à§‡à¦®à¦¬à¦¾à¦°à§à¦—ীয়", + "lez": "লেজঘিয়ান", + "lg": "গানà§à¦¡à¦¾", + "li": "লিমà§à¦¬à§à¦°à§à¦—িশ", + "lkt": "লাকোটা", + "ln": "লিঙà§à¦—ালা", + "lo": "লাও", + "lol": "মোঙà§à¦—à§‹", + "loz": "লোজি", + "lrc": "উতà§à¦¤à¦° লà§à¦°à¦¿", + "lt": "লিথà§à¦¯à¦¼à§‡à¦¨à§€à¦¯à¦¼", + "lu": "লà§à¦¬à¦¾-কাটাঙà§à¦—া", + "lua": "লà§à¦¬à¦¾-লà§à¦²à§à¦¯à¦¼à¦¾", + "lui": "লà§à¦‡à¦¸à§‡à¦¨à§‹", + "lun": "লà§à¦¨à§à¦¡à¦¾", + "luo": "লà§à¦¯à¦¼à§‹", + "lus": "মিজো", + "luy": "লà§à¦‡à¦¯à¦¼à¦¾", + "lv": "লাতà§â€Œà¦­à§€à¦¯à¦¼", + "mad": "মাদà§à¦°à§‡à¦¸à§‡", + "mag": "মাগাহি", + "mai": "মৈথিলি", + "mak": "মà§à¦¯à¦¾à¦•াসার", + "man": "মà§à¦¯à¦¾à¦¨à§à¦¡à¦¿à¦™à§à¦—à§‹", + "mas": "মাসাই", + "mdf": "মোকশা", + "mdr": "মà§à¦¯à¦¾à¦£à§à¦¡à¦¾à¦°", + "men": "মেনà§à¦¡à§‡", + "mer": "মেরà§", + "mfe": "মরিসিয়ান", + "mg": "মালাগাসি", + "mga": "মধà§à¦¯ আইরিশ", + "mgh": "মাখà§à¦¯à¦¼à¦¾-মেতà§à¦¤à§‹", + "mgo": "মেটা", + "mh": "মারà§à¦¶à¦¾à¦²à¦¿à¦œ", + "mi": "মাওরি", + "mic": "মিকমà§à¦¯à¦¾à¦•", + "min": "মিনাঙà§à¦—à§â€Œà¦•াবাউ", + "mk": "মà§à¦¯à¦¾à¦¸à¦¿à¦¡à§‹à¦¨à§€à¦¯à¦¼", + "ml": "মালায়ালাম", + "mn": "মঙà§à¦—োলিয়", + "mnc": "মাঞà§à¦šà§", + "mni": "মণিপà§à¦°à§€", + "moh": "মোহাওক", + "mos": "মসি", + "mr": "মারাঠি", + "ms": "মালয়", + "mt": "মলà§à¦Ÿà¦¿à¦¯à¦¼", + "mua": "মà§à¦¦à¦¾à¦™à§à¦—", + "mul": "à¦à¦•াধিক ভাষা", + "mus": "কà§à¦°à¦¿à¦•", + "mwl": "মিরানà§à¦¡à¦¿à¦œ", + "mwr": "মারোয়ারি", + "my": "বরà§à¦®à¦¿", + "myv": "à¦à¦°à¦œà¦¿à¦¯à¦¼à¦¾", + "mzn": "মাজানদেরানি", + "na": "নাউরà§", + "nan": "nan", + "nap": "নেয়াপোলিটান", + "naq": "নামা", + "nb": "নরওয়েজিয়ান বোকমাল", + "nd": "উতà§à¦¤à¦° à¦à¦¨à§à¦¦à§‡à¦¬à¦¿à¦²à¦¿", + "nds": "নিমà§à¦¨ জারà§à¦®à¦¾à¦¨à¦¿", + "nds_NL": "লো সà§à¦¯à¦¾à¦•à§à¦¸à¦¨", + "ne": "নেপালী", + "new": "নেওয়ারি", + "ng": "à¦à¦¨à§à¦¦à§‹à¦™à§à¦—া", + "nia": "নিয়াস", + "niu": "নিউয়ান", + "nl": "ডাচ", + "nl_BE": "ফà§à¦²à§‡à¦®à¦¿à¦¶", + "nmg": "কোয়াসিও", + "nn": "নরওয়েজীয়ান নিনরà§à¦¸à§à¦•", + "nnh": "নিঙà§à¦—েমà§à¦¬à§à¦¨", + "no": "নরওয়েজীয়", + "nog": "নোগাই", + "non": "পà§à¦°à¦¾à¦šà§€à¦¨ নরà§à¦¸", + "nqo": "à¦à¦¨â€™à¦•à§‹", + "nr": "দকà§à¦·à¦¿à¦£ à¦à¦¨à¦¡à§‡à¦¬à§‡à¦²à§‡", + "nso": "উতà§à¦¤à¦°à¦¾à¦žà§à¦šà¦²à§€à¦¯à¦¼ সোথো", + "nus": "নà§à¦¯à¦¼à¦¾à¦°", + "nv": "নাভাজো", + "nwc": "পà§à¦°à¦¾à¦šà§€à¦¨ নেওয়ারী", + "ny": "নায়াঞà§à¦œà¦¾", + "nym": "নà§à¦¯à¦¾à¦¯à¦¼à¦¾à¦®à¦“য়েজি", + "nyn": "নà§à¦¯à¦¾à¦¯à¦¼à¦¾à¦™à§à¦•োলে", + "nyo": "নà§à¦¯à§‹à¦°à§‹", + "nzi": "à¦à¦¨à¦œà¦¿à¦®à¦¾", + "oc": "অকà§à¦¸à¦¿à¦Ÿà¦¾à¦¨", + "oj": "ওজিবওয়া", + "om": "অরোমো", + "or": "ওড়িয়া", + "os": "ওসেটিক", + "osa": "ওসেজ", + "ota": "অটোমান তà§à¦°à§à¦•ি", + "pa": "পাঞà§à¦œà¦¾à¦¬à§€", + "pag": "পাঙà§à¦—াসিনান", + "pal": "পাহà§à¦²à¦¾à¦­à¦¿", + "pam": "পামà§à¦ªà¦¾à¦™à§à¦—া", + "pap": "পাপিয়ামেনà§à¦Ÿà§‹", + "pau": "পালায়à§à¦¯à¦¼à¦¾à¦¨", + "pcm": "নাজেরিয় পিজিন", + "peo": "পà§à¦°à¦¾à¦šà§€à¦¨ ফারà§à¦¸à¦¿", + "phn": "ফোনিশীয়ান", + "pi": "পালি", + "pl": "পোলিশ", + "pon": "পোহà§à¦¨à¦ªà§‡à¦‡à¦¯à¦¼à¦¾à¦¨", + "prg": "পà§à¦°à§à¦¶à¦¿à¦¯à¦¼à¦¾à¦¨", + "pro": "পà§à¦°à¦¾à¦šà§€à¦¨ পà§à¦°à§‹à¦­à§‡à¦¨à¦¸à¦¾à¦²", + "ps": "পাশà§à¦¤à§", + "pt": "পরà§à¦¤à§à¦—ীজ", + "pt_BR": "বà§à¦°à¦¾à¦œà¦¿à¦²à§‡à¦° পরà§à¦¤à§à¦—ীজ", + "pt_PT": "ইউরোপের পরà§à¦¤à§à¦—ীজ", + "qu": "কেচà§à¦¯à¦¼à¦¾", + "quc": "কি‘চে", + "raj": "রাজসà§à¦¥à¦¾à¦¨à§€", + "rap": "রাপানà§à¦‡", + "rar": "রারোটোংগান", + "rm": "রোমানà§à¦¸", + "rn": "রà§à¦¨à§à¦¦à¦¿", + "ro": "রোমানীয়", + "ro_MD": "মলদাভিয়", + "rof": "রমà§à¦¬à§‹", + "rom": "রোমানি", + "root": "মূল", + "ru": "রà§à¦¶", + "rup": "আরমেনিয়ান", + "rw": "কিনয়ারোয়ানà§à¦¡à¦¾", + "rwk": "রাওয়া", + "sa": "সংসà§à¦•ৃত", + "sad": "সà§à¦¯à¦¾à¦¨à§à¦¡à¦¾à¦“য়ে", + "sah": "শাখা", + "sam": "সামারিটান আরামিক", + "saq": "সামবà§à¦°à§", + "sas": "সাসাক", + "sat": "সাà¦à¦“তালি", + "sba": "নà§à¦¯à¦¾à¦—ামà§à¦¬à§‡", + "sbp": "সাঙà§à¦—à§", + "sc": "সারà§à¦¡à¦¿à¦¨à¦¿à¦¯à¦¼à¦¾à¦¨", + "scn": "সিসিলিয়ান", + "sco": "সà§à¦•টস", + "sd": "সিনà§à¦§à¦¿", + "sdh": "দকà§à¦·à¦¿à¦£ কà§à¦°à§à¦¦à¦¿à¦¶", + "se": "উতà§à¦¤à¦°à¦¾à¦žà§à¦šà¦²à§€à¦¯à¦¼ সামি", + "seh": "সেনা", + "sel": "সেলà§à¦•à§à¦ª", + "ses": "কোয়রাবেনো সেনà§à¦¨à§€", + "sg": "সাঙà§à¦—à§‹", + "sga": "পà§à¦°à¦¾à¦šà§€à¦¨ আইরিশ", + "sh": "সারà§à¦¬à§‹-কà§à¦°à§‹à¦¯à¦¼à§‡à¦¶à¦¿à¦¯à¦¼", + "shi": "তাচেলহিত", + "shn": "শান", + "si": "সিংহলী", + "sid": "সিডামো", + "sk": "সà§à¦²à§‹à¦­à¦¾à¦•", + "sl": "সà§à¦²à§‹à¦­à§‡à¦¨à§€à¦¯à¦¼", + "sm": "সামোয়ান", + "sma": "দকà§à¦·à¦¿à¦£à¦¾à¦žà§à¦šà¦²à§€à¦¯à¦¼ সামি", + "smj": "লà§à¦²à§‡ সামি", + "smn": "ইনারি সামি", + "sms": "সà§à¦•োলà§à¦Ÿ সামি", + "sn": "শোনা", + "snk": "সোনিঙà§à¦•ে", + "so": "সোমালি", + "sog": "সোগডিয়ান", + "sq": "আলবেনীয়", + "sr": "সারà§à¦¬à§€à¦¯à¦¼", + "srn": "সà§à¦°à¦¾à¦¨à¦¾à¦¨ টোঙà§à¦—à§‹", + "srr": "সেরের", + "ss": "সোয়াতি", + "ssy": "সাহো", + "st": "দকà§à¦·à¦¿à¦¨ সোথো", + "su": "সà§à¦¦à¦¾à¦¨à§€", + "suk": "সà§à¦•à§à¦®à¦¾", + "sus": "সà§à¦¸à§", + "sux": "সà§à¦®à§‡à¦°à§€à¦¯à¦¼", + "sv": "সà§à¦‡à¦¡à¦¿à¦¶", + "sw": "সোয়াহিলি", + "sw_CD": "কঙà§à¦—à§‹ সোয়াহিলি", + "swb": "কমোরিয়ান", + "syc": "পà§à¦°à¦¾à¦šà§€à¦¨ সিরিও", + "syr": "সিরিয়াক", + "ta": "তামিল", + "te": "তেলেগà§", + "tem": "টাইমà§à¦¨à§‡", + "teo": "তেসো", + "ter": "তেরেনো", + "tet": "তেতà§à¦®", + "tg": "তাজিক", + "th": "থাই", + "ti": "তিগরিনিয়া", + "tig": "টাইগà§à¦°à§‡", + "tiv": "টিভ", + "tk": "তà§à¦°à§à¦•মেনী", + "tkl": "টোকেলাউ", + "tl": "তাগালগ", + "tlh": "কà§à¦²à¦¿à¦™à§à¦—ন", + "tli": "তà§à¦²à¦¿à¦™à§à¦—িট", + "tmh": "তামাশেক", + "tn": "সোয়ানা", + "to": "টোঙà§à¦—ান", + "tog": "নায়াসা টোঙà§à¦—া", + "tpi": "টোক পিসিন", + "tr": "তà§à¦°à§à¦•à§€", + "trv": "তারোকো", + "ts": "সঙà§à¦—া", + "tsi": "সিমশিয়ান", + "tt": "তাতার", + "tum": "তà§à¦®à§à¦¬à§à¦•া", + "tvl": "টà§à¦­à¦¾à¦²à§", + "tw": "টোয়াই", + "twq": "তাসাওয়াক", + "ty": "তাহিতিয়ান", + "tyv": "টà§à¦­à¦¿à¦¨à¦¿à¦¯à¦¼à¦¾à¦¨", + "tzm": "সেনà§à¦Ÿà§à¦°à¦¾à¦² আটলাস তামাজিগাত", + "udm": "উডমà§à¦°à§à¦Ÿ", + "ug": "উইঘà§à¦°", + "uga": "উগারিটিক", + "uk": "ইউকà§à¦°à§‡à¦¨à§€à¦¯à¦¼", + "umb": "উমà§à¦¬à§à¦¨à§à¦¦à§", + "und": "অজানা ভাষা", + "ur": "উরà§à¦¦à§", + "uz": "উজবেকীয়", + "vai": "ভাই", + "ve": "ভেনà§à¦¡à¦¾", + "vi": "ভিয়েতনামী", + "vo": "ভোলাপà§à¦•", + "vot": "ভোটিক", + "vun": "ভà§à¦žà§à¦œà§‹", + "wa": "ওয়ালà§à¦¨", + "wae": "ওয়ালসের", + "wal": "ওয়ালামো", + "war": "ওয়ারে", + "was": "ওয়াশো", + "wbp": "ওয়ারà§à¦²à¦ªà¦¿à¦°à¦¿", + "wo": "উওলোফ", + "wuu": "Wu চীনা", + "xal": "কালà§à¦®à¦‡à¦•", + "xh": "জোসা", + "xog": "সোগা", + "yao": "ইয়াও", + "yap": "ইয়াপেসে", + "yav": "য়াঙà§à¦—বেন", + "ybb": "য়েমà§à¦¬à¦¾", + "yi": "য়িদà§à¦¦à¦¿à¦¶", + "yo": "ইওরà§à¦¬à¦¾", + "yue": "কà§à¦¯à¦¾à¦¨à¦Ÿà§‹à¦¨à§€à¦œ", + "za": "à¦à§à§à¦¯à¦¼à¦¾à¦™", + "zap": "জাপোটেক", + "zbl": "চিতà§à¦° ভাষা", + "zen": "জেনাগা", + "zgh": "আদরà§à¦¶ মরকà§à¦•োন তামাজিগাত", + "zh": "চীনা", + "zh_Hans": "সরলীকৃত চীনা", + "zh_Hant": "à¦à¦¤à¦¿à¦¹à§à¦¯à¦¬à¦¾à¦¹à¦¿ চীনা", + "zu": "জà§à¦²à§", + "zun": "জà§à¦¨à¦¿", + "zxx": "ভাষাভিতà§à¦¤à¦¿à¦• বিষয়বসà§à¦¤à§ নেই", + "zza": "জাজা" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bn_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bn_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..1a2cc3e31115867e1bfcde1f5c550693a38fb5bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bn_IN.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.29.54", + "Names": { + "ksh": "কোলোনিয়ান" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bo.json new file mode 100644 index 0000000000000000000000000000000000000000..eae5e9b57c24fedd4432732122e9b4f69f278745 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bo.json @@ -0,0 +1,17 @@ +{ + "Version": "2.1.27.40", + "Names": { + "bo": "བོད་སà¾à½‘་", + "dz": "རྫོང་à½", + "en": "དབྱིན་ཇིའི་སà¾à½‘à¼", + "en_CA": "དབྱིན་ཇིའི་སà¾à½‘༠(à½à½ºà¼‹à½“་ཌ་)", + "en_GB": "དབྱིན་ཇིའི་སà¾à½‘༠(དབྱིན་ལན་)", + "en_US": "དབྱིན་ཇིའི་སà¾à½‘༠(ཨ་རི་)", + "hi": "ཧིན་དི", + "ja": "ཉི་ཧོང་སà¾à½‘་", + "ne": "ནེ་པ་ལི", + "ru": "ཨུ་རུ་སུ་སà¾à½‘་", + "zh": "རྒྱ་སà¾à½‘་", + "zza": "ཟ་ཟའ་སà¾à½‘à¼" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/br.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/br.json new file mode 100644 index 0000000000000000000000000000000000000000..84c5a55fb7c0095a90e66050af30dc5ddb4ac217 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/br.json @@ -0,0 +1,477 @@ +{ + "Version": "2.1.28.76", + "Names": { + "aa": "afar", + "ab": "abkhazeg", + "ace": "achineg", + "ach": "acoli", + "ada": "adangme", + "ady": "adygeieg", + "ae": "avesteg", + "aeb": "arabeg Tunizia", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainoueg", + "ak": "akan", + "akk": "akadeg", + "akz": "alabamaeg", + "ale": "aleouteg", + "aln": "gegeg", + "alt": "altaieg ar Su", + "am": "amhareg", + "an": "aragoneg", + "ang": "hensaozneg", + "anp": "angika", + "ar": "arabeg", + "ar_001": "arabeg modern", + "arc": "arameeg", + "arn": "araoukaneg", + "aro": "araona", + "arp": "arapaho", + "arq": "arabeg Aljeria", + "arw": "arawakeg", + "ary": "arabeg Maroko", + "arz": "arabeg Egipt", + "as": "asameg", + "asa": "asu", + "ase": "yezh sinoù Amerika", + "ast": "asturianeg", + "av": "avar", + "awa": "awadhi", + "ay": "aymara", + "az": "azerbaidjaneg", + "ba": "bachkir", + "bal": "baloutchi", + "ban": "balineg", + "bar": "bavarieg", + "bas": "basaa", + "be": "belaruseg", + "bej": "bedawieg", + "bem": "bemba", + "bez": "bena", + "bg": "bulgareg", + "bgn": "baloutchi ar Cʼhornôg", + "bho": "bhojpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bm": "bambara", + "bn": "bengali", + "bo": "tibetaneg", + "br": "brezhoneg", + "bra": "braj", + "brh": "brahweg", + "brx": "bodo", + "bs": "bosneg", + "bss": "akoose", + "bua": "bouriat", + "bug": "bugi", + "byn": "blin", + "ca": "katalaneg", + "cad": "caddo", + "car": "karibeg", + "cch": "atsam", + "ce": "tchetcheneg", + "ceb": "cebuano", + "ch": "chamorru", + "chb": "chibcha", + "chm": "marieg", + "cho": "choktaw", + "chp": "chipewyan", + "chr": "cherokee", + "chy": "cheyenne", + "ckb": "kurdeg sorani", + "co": "korseg", + "cop": "kopteg", + "cr": "kri", + "crh": "turkeg Krimea", + "cs": "tchekeg", + "csb": "kachoubeg", + "cu": "slavoneg iliz", + "cv": "tchouvatch", + "cy": "kembraeg", + "da": "daneg", + "dak": "dakota", + "dar": "dargwa", + "de": "alamaneg", + "de_AT": "alamaneg Aostria", + "de_CH": "alamaneg uhel Suis", + "del": "delaware", + "dgr": "dogrib", + "din": "dinka", + "doi": "dogri", + "dsb": "izelsorabeg", + "dum": "nederlandeg krenn", + "dv": "divehi", + "dyu": "dyula", + "dz": "dzongkha", + "ebu": "embu", + "ee": "ewe", + "efi": "efik", + "egy": "henegipteg", + "eka": "ekajuk", + "el": "gresianeg", + "elx": "elameg", + "en": "saozneg", + "en_AU": "saozneg Aostralia", + "en_CA": "saozneg Kanada", + "en_GB": "saozneg Breizh-Veur", + "en_US": "saozneg Amerika", + "enm": "krennsaozneg", + "eo": "esperanteg", + "es": "spagnoleg", + "es_419": "spagnoleg Amerika latin", + "es_ES": "spagnoleg Europa", + "es_MX": "spagnoleg Mecʼhiko", + "et": "estoneg", + "eu": "euskareg", + "ewo": "ewondo", + "fa": "perseg", + "fan": "fang", + "fat": "fanti", + "fi": "finneg", + "fil": "filipineg", + "fit": "finneg traoñienn an Torne", + "fj": "fidjieg", + "fo": "faeroeg", + "fon": "fon", + "fr": "galleg", + "fr_CA": "galleg Kanada", + "fr_CH": "galleg Suis", + "frc": "galleg cajun", + "frm": "krenncʼhalleg", + "fro": "hencʼhalleg", + "frp": "arpitaneg", + "frr": "frizeg an Norzh", + "frs": "frizeg ar Reter", + "fur": "frioulaneg", + "fy": "frizeg ar Cʼhornôg", + "ga": "iwerzhoneg", + "gaa": "ga", + "gag": "gagaouzeg", + "gan": "sinaeg Gan", + "gay": "gayo", + "gba": "gbaya", + "gd": "skoseg", + "gez": "gezeg", + "gil": "gilberteg", + "gl": "galizeg", + "gmh": "krennalamaneg uhel", + "gn": "guarani", + "goh": "henalamaneg uhel", + "gor": "gorontalo", + "got": "goteg", + "grb": "grebo", + "grc": "hencʼhresianeg", + "gsw": "alamaneg Suis", + "gu": "gujarati", + "gv": "manaveg", + "ha": "haousa", + "hai": "haida", + "hak": "sinaeg Hakka", + "haw": "hawaieg", + "he": "hebraeg", + "hi": "hindi", + "hil": "hiligaynon", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "kroateg", + "hsb": "uhelsorabeg", + "hsn": "sinaeg Xian", + "ht": "haitieg", + "hu": "hungareg", + "hup": "hupa", + "hy": "armenianeg", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonezeg", + "ie": "interlingue", + "ig": "igbo", + "ii": "yieg Sichuan", + "ik": "inupiaq", + "inh": "ingoucheg", + "io": "ido", + "is": "islandeg", + "it": "italianeg", + "iu": "inuktitut", + "ja": "japaneg", + "jam": "kreoleg Jamaika", + "jpr": "yuzev-perseg", + "jrb": "yuzev-arabeg", + "jv": "javaneg", + "ka": "jorjianeg", + "kaa": "karakalpak", + "kab": "kabileg", + "kac": "kachin", + "kam": "kamba", + "kbd": "kabardeg", + "kea": "kabuverdianu", + "kg": "kongo", + "kha": "khasi", + "kho": "khotaneg", + "ki": "kikuyu", + "kj": "kwanyama", + "kk": "kazak", + "km": "khmer", + "kmb": "kimbundu", + "kn": "kanareg", + "ko": "koreaneg", + "kok": "konkani", + "kos": "kosrae", + "kpe": "kpelle", + "kr": "kanouri", + "krc": "karatchay-balkar", + "krl": "karelieg", + "kru": "kurukh", + "ks": "kashmiri", + "ksh": "koluneg", + "ku": "kurdeg", + "kut": "kutenai", + "kw": "kerneveureg", + "ky": "kirgiz", + "la": "latin", + "lad": "ladino", + "lah": "lahnda", + "lam": "lamba", + "lb": "luksembourgeg", + "lez": "lezgi", + "lfn": "lingua franca nova", + "lg": "ganda", + "li": "limbourgeg", + "lij": "ligurieg", + "ln": "lingala", + "lo": "laoseg", + "lol": "mongo", + "loz": "lozi", + "lt": "lituaneg", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "lushai", + "luy": "luyia", + "lv": "latvieg", + "lzh": "sinaeg lennegel", + "mag": "magahi", + "mai": "maithili", + "mas": "masai", + "mdf": "moksha", + "mdr": "mandar", + "men": "mende", + "mfe": "moriseg", + "mg": "malgacheg", + "mga": "krenniwerzhoneg", + "mh": "marshall", + "mi": "maori", + "mk": "makedoneg", + "ml": "malayalam", + "mn": "mongoleg", + "mnc": "manchou", + "mni": "manipuri", + "moh": "mohawk", + "mr": "marathi", + "mrj": "marieg ar Cʼhornôg", + "ms": "malayseg", + "mt": "malteg", + "mul": "yezhoù lies", + "mus": "muskogi", + "mwl": "mirandeg", + "my": "birmaneg", + "myv": "erza", + "na": "naurueg", + "nan": "sinaeg Min Nan", + "nap": "napolitaneg", + "nb": "norvegeg bokmÃ¥l", + "nd": "ndebele an Norzh", + "nds": "alamaneg izel", + "nds_NL": "saksoneg izel", + "ne": "nepaleg", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niue", + "njo": "aoeg", + "nl": "nederlandeg", + "nl_BE": "flandrezeg", + "nn": "norvegeg nynorsk", + "no": "norvegeg", + "nog": "nogay", + "non": "hennorseg", + "nov": "novial", + "nr": "ndebele ar Su", + "nso": "sotho an Norzh", + "nv": "navacʼho", + "nwc": "newari klasel", + "ny": "nyanja", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "oc": "okitaneg", + "oj": "ojibwa", + "or": "oriya", + "os": "oseteg", + "osa": "osage", + "ota": "turkeg otoman", + "pa": "punjabi", + "pag": "pangasinan", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palau", + "pcd": "pikardeg", + "pdc": "alamaneg Pennsylvania", + "peo": "henberseg", + "phn": "fenikianeg", + "pi": "pali", + "pl": "poloneg", + "pms": "piemonteg", + "pnt": "ponteg", + "pon": "pohnpei", + "prg": "henbruseg", + "pro": "henbrovañseg", + "ps": "pachto", + "pt": "portugaleg", + "pt_BR": "portugaleg Brazil", + "pt_PT": "portugaleg Europa", + "qu": "kechuaeg", + "qug": "kichuaeg Chimborazo", + "raj": "rajasthani", + "rap": "rapanui", + "rar": "rarotonga", + "rgn": "romagnoleg", + "rm": "romañcheg", + "rn": "rundi", + "ro": "roumaneg", + "ro_MD": "moldoveg", + "rof": "rombo", + "rom": "romanieg", + "ru": "rusianeg", + "rup": "aroumaneg", + "rw": "kinyarwanda", + "rwk": "rwa", + "sa": "sanskriteg", + "sad": "sandawe", + "sah": "yakouteg", + "sam": "arameeg ar Samaritaned", + "sas": "sasak", + "sat": "santali", + "sc": "sardeg", + "scn": "sikilieg", + "sco": "skoteg", + "sd": "sindhi", + "sdc": "sasareseg", + "se": "sámi an Norzh", + "sg": "sango", + "sga": "heniwerzhoneg", + "sh": "serb-kroateg", + "shi": "tacheliteg", + "shn": "shan", + "shu": "arabeg Tchad", + "si": "singhaleg", + "sid": "sidamo", + "sk": "slovakeg", + "sl": "sloveneg", + "sm": "samoan", + "sma": "sámi ar Su", + "smj": "sámi LuleÃ¥", + "smn": "sámi Inari", + "sms": "sámi Skolt", + "sn": "shona", + "snk": "soninke", + "so": "somali", + "sog": "sogdieg", + "sq": "albaneg", + "sr": "serbeg", + "srr": "serer", + "ss": "swati", + "st": "sotho ar Su", + "su": "sundaneg", + "sux": "sumereg", + "sv": "svedeg", + "sw": "swahili", + "sw_CD": "swahili Kongo", + "swb": "komoreg", + "syc": "sirieg klasel", + "syr": "sirieg", + "szl": "silezieg", + "ta": "tamileg", + "tcy": "touloueg", + "te": "telougou", + "ter": "tereno", + "tet": "tetum", + "tg": "tadjik", + "th": "thai", + "ti": "tigrigna", + "tig": "tigreaneg", + "tiv": "tiv", + "tk": "turkmeneg", + "tkl": "tokelau", + "tl": "tagalog", + "tlh": "klingon", + "tli": "tinglit", + "tmh": "tamacheg", + "tn": "tswana", + "to": "tonga", + "tog": "nyasa tonga", + "tpi": "tok pisin", + "tr": "turkeg", + "tru": "turoyoeg", + "ts": "tsonga", + "tsi": "tsimshian", + "tt": "tatar", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "twi", + "ty": "tahitianeg", + "tyv": "touva", + "tzm": "tamazigteg Kreizatlas", + "udm": "oudmourteg", + "ug": "ouigoureg", + "uga": "ougariteg", + "uk": "ukraineg", + "umb": "umbundu", + "und": "yezh dianav", + "ur": "ourdou", + "uz": "ouzbekeg", + "vai": "vai", + "ve": "venda", + "vec": "venezieg", + "vep": "vepseg", + "vi": "vietnameg", + "vls": "flandrezeg ar c’hornôg", + "vo": "volapük", + "vot": "votyakeg", + "vro": "voroeg", + "wa": "walloneg", + "wae": "walser", + "wal": "walamo", + "war": "waray", + "was": "washo", + "wo": "wolof", + "wuu": "sinaeg Wu", + "xal": "kalmouk", + "xh": "xhosa", + "xmf": "megreleg", + "yao": "yao", + "yap": "yapeg", + "yi": "yiddish", + "yo": "yorouba", + "yue": "kantoneg", + "za": "zhuang", + "zap": "zapoteg", + "zbl": "Bliss", + "zea": "zelandeg", + "zen": "zenaga", + "zgh": "tamacheg Maroko standart", + "zh": "sinaeg", + "zh_Hans": "sinaeg eeunaet", + "zh_Hant": "sinaeg hengounel", + "zu": "zouloueg", + "zun": "zuni", + "zxx": "diyezh" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bs.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bs.json new file mode 100644 index 0000000000000000000000000000000000000000..639a5fecde4490c416dcc3962993c2ff1b12af26 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bs.json @@ -0,0 +1,517 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afarski", + "ab": "abhaski", + "ace": "acehneski", + "ach": "akoli", + "ada": "adangmejski", + "ady": "adigejski", + "ae": "avestanski", + "af": "afrikans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainu", + "ak": "akan", + "akk": "akadijski", + "ale": "aleutski", + "alt": "južni altai", + "am": "amharski", + "an": "aragonski", + "ang": "staroengleski", + "anp": "angika", + "ar": "arapski", + "ar_001": "moderni standardni arapski", + "arc": "aramejski", + "arn": "mapuÅ¡ki", + "arp": "arapaho", + "arw": "aravak", + "as": "asamski", + "asa": "asu", + "ast": "asturijski", + "av": "avarski", + "awa": "avadhi", + "ay": "ajmara", + "az": "azerbejdžanski", + "ba": "baÅ¡kirski", + "bal": "baluÄi", + "ban": "balinezijski", + "bas": "basa", + "bax": "bamunski", + "bbj": "gomala", + "be": "bjeloruski", + "bej": "beja", + "bem": "bemba", + "bez": "bena", + "bfd": "bafut", + "bg": "bugarski", + "bgn": "zapadni beluÄki", + "bho": "bojpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bengalski", + "bo": "tibetanski", + "br": "bretonski", + "bra": "braj", + "brx": "bodo", + "bs": "bosanski", + "bss": "akoski", + "bua": "buriat", + "bug": "bugiÅ¡ki", + "bum": "bulu", + "byn": "blin", + "byv": "medumba", + "ca": "katalonski", + "cad": "kado", + "car": "karipski", + "cay": "kajuga", + "cch": "atsam", + "ce": "ÄeÄenski", + "ceb": "cebuano", + "cgg": "Äiga", + "ch": "Äamoro", + "chb": "ÄibÄa", + "chg": "Äagatai", + "chk": "Äukeski", + "chm": "mari", + "chn": "Äinukski žargon", + "cho": "Äoktav", + "chp": "Äipvijanski", + "chr": "Äiroki", + "chy": "Äejenski", + "ckb": "centralnokurdski", + "co": "korzikanski", + "cop": "koptski", + "cr": "kri", + "crh": "krimski turski", + "crs": "seselva kreolski francuski", + "cs": "ÄeÅ¡ki", + "csb": "kaÅ¡ubijanski", + "cu": "staroslavenski", + "cv": "ÄuvaÅ¡ki", + "cy": "velÅ¡ki", + "da": "danski", + "dak": "dakota", + "dar": "dargva", + "dav": "taita", + "de": "njemaÄki", + "de_CH": "gornjonjemaÄki (Å vicarska)", + "del": "delaver", + "den": "slave", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "donjolužiÄkosrpski", + "dua": "duala", + "dum": "srednjovjekovni holandski", + "dv": "divehi", + "dyo": "jola-foni", + "dyu": "diula", + "dz": "džonga", + "dzg": "dazaga", + "ebu": "embu", + "ee": "eve", + "efi": "efik", + "egy": "staroegipatski", + "eka": "ekajuk", + "el": "grÄki", + "elx": "elamitski", + "en": "engleski", + "enm": "srednjovjekovni engleski", + "eo": "esperanto", + "es": "Å¡panski", + "et": "estonski", + "eu": "baskijski", + "ewo": "evondo", + "fa": "perzijski", + "fan": "fang", + "fat": "fanti", + "ff": "fulah", + "fi": "finski", + "fil": "filipino", + "fj": "fidžijski", + "fo": "farski", + "fon": "fon", + "fr": "francuski", + "frm": "srednjovjekovni francuski", + "fro": "starofrancuski", + "frr": "sjeverni frizijski", + "frs": "istoÄnofrizijski", + "fur": "friulijski", + "fy": "zapadni frizijski", + "ga": "irski", + "gaa": "ga", + "gag": "gagauÅ¡ki", + "gay": "gajo", + "gba": "gbaja", + "gd": "Å¡kotski galski", + "gez": "staroetiopski", + "gil": "gilbertski", + "gl": "galicijski", + "gmh": "srednjovjekovni gornjonjemaÄki", + "gn": "gvarani", + "goh": "staronjemaÄki", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotski", + "grb": "grebo", + "grc": "starogrÄki", + "gsw": "njemaÄki (Å vicarska)", + "gu": "gudžarati", + "guz": "gusi", + "gv": "manks", + "gwi": "gviÄin", + "ha": "hausa", + "hai": "haida", + "haw": "havajski", + "he": "hebrejski", + "hi": "hindu", + "hil": "hiligajnon", + "hit": "hitite", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "hrvatski", + "hsb": "gornjolužiÄkosrpski", + "ht": "haićanski", + "hu": "maÄ‘arski", + "hup": "hupa", + "hy": "armenski", + "hz": "herero", + "ia": "interlingva", + "iba": "iban", + "ibb": "ibibio", + "id": "indonezijski", + "ie": "interlingve", + "ig": "igbo", + "ii": "siÄuan ji", + "ik": "inupiak", + "ilo": "iloko", + "inh": "inguÅ¡etski", + "io": "ido", + "is": "islandski", + "it": "talijanski", + "iu": "inuktitut", + "ja": "japanski", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "makame", + "jpr": "judeo-perzijski", + "jrb": "judeo-arapski", + "jv": "javanski", + "ka": "gruzijski", + "kaa": "kara-kalpak", + "kab": "kabile", + "kac": "kaÄin", + "kaj": "kaju", + "kam": "kamba", + "kaw": "kavi", + "kbd": "kabardijski", + "kbl": "kanembu", + "kcg": "tjap", + "kde": "makonde", + "kea": "zelenortski", + "kfo": "koro", + "kg": "kongo", + "kha": "kasi", + "kho": "kotanizijski", + "khq": "kojra Äini", + "ki": "kikuju", + "kj": "kuanjama", + "kk": "kazaÄki", + "kkj": "kako", + "kl": "kalalisutski", + "kln": "kalenjin", + "km": "kmerski", + "kmb": "kimbundu", + "kn": "kanada", + "ko": "korejski", + "koi": "komi-permski", + "kok": "konkani", + "kos": "kosrejski", + "kpe": "kpele", + "kr": "kanuri", + "krc": "karaÄaj-balkar", + "kri": "krio", + "krl": "karelijski", + "kru": "kuruÅ¡ki", + "ks": "kaÅ¡mirski", + "ksb": "Å¡ambala", + "ksf": "bafia", + "ksh": "kelnski", + "ku": "kurdski", + "kum": "kumik", + "kut": "kutenai", + "kv": "komi", + "kw": "kornski", + "ky": "kirgiÅ¡ki", + "la": "latinski", + "lad": "ladino", + "lag": "langi", + "lah": "landa", + "lam": "lamba", + "lb": "luksemburÅ¡ki", + "lez": "lezgijski", + "lg": "ganda", + "li": "limburÅ¡ki", + "lkt": "lakota", + "ln": "lingala", + "lo": "laoÅ¡ki", + "lol": "mongo", + "loz": "lozi", + "lrc": "sjeverni luri", + "lt": "litvanski", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "mizo", + "luy": "luhija", + "lv": "latvijski", + "mad": "madureÅ¡ki", + "maf": "mafa", + "mag": "magahi", + "mai": "maitili", + "mak": "makasar", + "man": "mandingo", + "mas": "masai", + "mde": "maba", + "mdf": "mokÅ¡a", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "mauricijski kreolski", + "mg": "malagaÅ¡ki", + "mga": "srednjovjekovni irski", + "mgh": "makuva-meto", + "mgo": "meta", + "mh": "marÅ¡alski", + "mi": "maorski", + "mic": "mikmak", + "min": "minangkabau", + "mk": "makedonski", + "ml": "malajalam", + "mn": "mongolski", + "mnc": "manÄu", + "mni": "manipuri", + "moh": "mohavk", + "mos": "mosi", + "mr": "marati", + "ms": "malajski", + "mt": "malteÅ¡ki", + "mua": "mundang", + "mul": "viÅ¡e jezika", + "mus": "kriÅ¡ki", + "mwl": "mirandeÅ¡ki", + "mwr": "marvari", + "my": "burmanski", + "mye": "mjene", + "myv": "erzija", + "mzn": "mazanderanski", + "na": "nauru", + "nap": "napolitanski", + "naq": "nama", + "nb": "norveÅ¡ki (Bokmal)", + "nd": "sjeverni ndebele", + "nds": "donjonjemaÄki", + "nds_NL": "donjosaksonski", + "ne": "nepalski", + "new": "nevari", + "ng": "ndonga", + "nia": "nias", + "niu": "niuean", + "nl": "holandski", + "nl_BE": "flamanski", + "nmg": "kvasio", + "nn": "norveÅ¡ki (Nynorsk)", + "nnh": "ngiembon", + "no": "norveÅ¡ki", + "nog": "nogai", + "non": "staronordijski", + "nqo": "nko", + "nr": "južni ndebele", + "nso": "sjeverni soto", + "nus": "nuer", + "nv": "navaho", + "nwc": "klasiÄni nevari", + "ny": "njanja", + "nym": "njamvezi", + "nyn": "njankole", + "nyo": "njoro", + "nzi": "nzima", + "oc": "oksitanski", + "oj": "ojibva", + "om": "oromo", + "or": "orijski", + "os": "osetski", + "osa": "osage", + "ota": "osmanski turski", + "pa": "pandžapski", + "pag": "pangasinski", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauanski", + "pcm": "nigerijski pidžin", + "peo": "staroperzijski", + "phn": "feniÄanski", + "pi": "pali", + "pl": "poljski", + "pon": "ponpejski", + "prg": "pruski", + "pro": "staroprovansalski", + "ps": "paÅ¡tu", + "pt": "portugalski", + "qu": "keÄua", + "quc": "kiÄe", + "raj": "rajastani", + "rap": "rapanui", + "rar": "rarotongan", + "rm": "reto-romanski", + "rn": "rundi", + "ro": "rumunski", + "ro_MD": "moldavski", + "rof": "rombo", + "rom": "romani", + "root": "korijenski", + "ru": "ruski", + "rup": "arumunski", + "rw": "kinjarvanda", + "rwk": "rua", + "sa": "sanskrit", + "sad": "sandave", + "sah": "jakutski", + "sam": "samaritanski aramejski", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "sba": "ngambaj", + "sbp": "sangu", + "sc": "sardinijski", + "scn": "sicilijanski", + "sco": "Å¡kotski", + "sd": "sindi", + "sdh": "južni kurdski", + "se": "sjeverni sami", + "see": "seneka", + "seh": "sena", + "sel": "selkup", + "ses": "kojraboro seni", + "sg": "sango", + "sga": "staroirski", + "sh": "srpskohrvatski", + "shi": "tahelhit", + "shn": "Å¡an", + "shu": "Äadski arapski", + "si": "sinhaleÅ¡ki", + "sid": "sidamo", + "sk": "slovaÄki", + "sl": "slovenski", + "sm": "samoanski", + "sma": "južni sami", + "smj": "lule sami", + "smn": "inari sami", + "sms": "skolt sami", + "sn": "Å¡ona", + "snk": "soninke", + "so": "somalski", + "sog": "sogdien", + "sq": "albanski", + "sr": "srpski", + "srn": "srananski tongo", + "srr": "serer", + "ss": "svati", + "ssy": "saho", + "st": "južni soto", + "su": "sundanski", + "suk": "sukuma", + "sus": "susu", + "sux": "sumerski", + "sv": "Å¡vedski", + "sw": "svahili", + "swb": "komorski", + "syc": "klasiÄni sirijski", + "syr": "sirijski", + "ta": "tamilski", + "te": "telugu", + "tem": "timne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadžiÄki", + "th": "tajlandski", + "ti": "tigrinja", + "tig": "tigre", + "tiv": "tiv", + "tk": "turkmenski", + "tkl": "tokelau", + "tl": "tagalog", + "tlh": "klingonski", + "tli": "tlingit", + "tmh": "tamaÅ¡ek", + "tn": "tsvana", + "to": "tonganski", + "tog": "njasa tonga", + "tpi": "tok pisin", + "tr": "turski", + "trv": "taroko", + "ts": "tsonga", + "tsi": "tsimÅ¡ian", + "tt": "tatarski", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "tvi", + "twq": "tasavak", + "ty": "tahićanski", + "tyv": "tuvinijski", + "tzm": "centralnoatlaski tamazigt", + "udm": "udmurt", + "ug": "ujgurski", + "uga": "ugaritski", + "uk": "ukrajinski", + "umb": "umbundu", + "und": "nepoznati jezik", + "ur": "urdu", + "uz": "uzbeÄki", + "vai": "vai", + "ve": "venda", + "vi": "vijetnamski", + "vo": "volapuk", + "vot": "votski", + "vun": "vunjo", + "wa": "valun", + "wae": "valser", + "wal": "valamo", + "war": "varej", + "was": "vaÅ¡o", + "wbp": "varlpiri", + "wo": "volof", + "xal": "kalmik", + "xh": "hosa", + "xog": "soga", + "yao": "jao", + "yap": "japeÅ¡ki", + "yav": "jangben", + "ybb": "jemba", + "yi": "jidiÅ¡", + "yo": "jorubanski", + "yue": "kantonski", + "za": "zuang", + "zap": "zapoteÄki", + "zbl": "blis simboli", + "zen": "zenaga", + "zgh": "standardni marokanski tamazigt", + "zh": "kineski", + "zh_Hans": "kineski (pojednostavljeni)", + "zh_Hant": "kineski (tradicionalni)", + "zu": "zulu", + "zun": "zuni", + "zxx": "bez lingvistiÄkog sadržaja", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bs_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bs_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..170e9ce1ed482c23455809f4c770ebc8954193ed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/bs_Cyrl.json @@ -0,0 +1,446 @@ +{ + "Version": "2.1.28.76", + "Names": { + "aa": "афарÑки", + "ab": "абказијÑки", + "ace": "ачинеÑки", + "ach": "аколи", + "ada": "адангмејÑки", + "ady": "адигејÑки", + "ae": "авеÑтанÑки", + "af": "африканерÑки", + "afh": "африхили", + "ain": "аину", + "ak": "акан", + "akk": "акадијÑки", + "ale": "аљут", + "alt": "јужни алтаи", + "am": "амхарÑки", + "an": "арагонежанÑки", + "ang": "ÑтароенглеÑки", + "anp": "ангика", + "ar": "арапÑки", + "arc": "армајÑки", + "arn": "ароканијÑки", + "arp": "арапахо", + "arw": "аравак", + "as": "аÑемијÑки", + "ast": "аÑтуријÑки", + "av": "аварÑки", + "awa": "авадхи", + "ay": "ајмара", + "az": "азербејџанÑки", + "ba": "башкир", + "bal": "балучи", + "ban": "балинезијÑки", + "bas": "баÑа", + "be": "белоруÑки", + "bej": "беја", + "bem": "бемба", + "bg": "бугарÑки", + "bho": "бојпури", + "bi": "биÑлама", + "bik": "бикол", + "bin": "бини", + "bla": "ÑиÑика", + "bm": "бамбара", + "bn": "бенглаÑки", + "bo": "тибетанÑки", + "br": "бретонÑки", + "bra": "брај", + "bs": "боÑанÑки", + "bua": "буриат", + "bug": "бугинежанÑки", + "byn": "блин", + "ca": "каталонÑки", + "cad": "кадо", + "car": "карипÑки", + "cch": "атÑамÑки", + "ce": "чеченÑки", + "ceb": "цебуано", + "ch": "чаморо", + "chb": "чибча", + "chg": "чагатаи", + "chk": "чукеÑки", + "chm": "мари", + "chn": "чинукÑки", + "cho": "чоктавÑки", + "chp": "чипвијанÑки", + "chr": "чероки", + "chy": "чејенÑки", + "co": "корзиканÑки", + "cop": "коптÑки", + "cr": "кри", + "crh": "кримеанÑки турÑки", + "cs": "чешки", + "csb": "кашубијанÑки", + "cu": "ÑтароÑловенÑки", + "cv": "чувашки", + "cy": "велшки", + "da": "данÑки", + "dak": "дакота", + "dar": "даргва", + "de": "немачки", + "de_AT": "ÐуÑтријÑки немачки", + "de_CH": "ШвајцарÑки виÑоки немачки", + "del": "делавер", + "den": "ÑлавÑки", + "dgr": "догриб", + "din": "динка", + "doi": "догри", + "dsb": "ниÑки ÑорбијанÑки", + "dua": "дуала", + "dum": "Ñредњи холандÑки", + "dv": "дивехијÑки", + "dyu": "ђула", + "dz": "џонга", + "ee": "еве", + "efi": "ефикÑки", + "egy": "ÑтароегипатÑки", + "eka": "екајук", + "el": "грчки", + "elx": "еламитÑки", + "en": "енглеÑки", + "en_AU": "ÐуÑтралијÑки енглеÑки", + "en_CA": "КанадÑки енглеÑки", + "en_GB": "БританÑки енглеÑки", + "en_US": "СÐД енглеÑки", + "enm": "Ñредњи енглеÑки", + "eo": "еÑперанто", + "es": "шпанÑки", + "es_419": "Латино-амерички шпанÑки", + "es_ES": "ИберијÑки шпанÑки", + "et": "еÑтонÑки", + "eu": "баÑкијÑки", + "ewo": "евондо", + "fa": "перÑијÑки", + "fan": "фанг", + "fat": "фанти", + "ff": "фулах", + "fi": "финÑки", + "fil": "тагалог", + "fj": "фиджијÑки", + "fo": "фарÑки", + "fon": "фон", + "fr": "француÑки", + "fr_CA": "КанадÑки француÑки", + "fr_CH": "ШвајцарÑки француÑки", + "frm": "Ñредњи француÑки", + "fro": "ÑтарофранцуÑки", + "frr": "Ñеверно-фризијÑки", + "frs": "иÑточни фризијÑки", + "fur": "фриулијÑки", + "fy": "фризијÑки", + "ga": "ирÑки", + "gaa": "га", + "gay": "гајо", + "gba": "гбаја", + "gd": "шкотÑки галÑки", + "gez": "џиз", + "gil": "гилбертшки", + "gl": "галÑки", + "gmh": "Ñредњи виÑоки немачки", + "gn": "гварани", + "goh": "Ñтаронемачки", + "gon": "гонди", + "gor": "горонтало", + "got": "готÑки", + "grb": "гребо", + "grc": "Ñтарогрчки", + "gsw": "швајцарÑки немачки", + "gu": "гуџарати", + "gv": "манкÑ", + "gwi": "гвич’ин", + "ha": "хауÑа", + "hai": "хаида", + "haw": "хавајÑки", + "he": "хебрејÑки", + "hi": "хинди", + "hil": "хилигајнон", + "hit": "хитите", + "hmn": "хмонг", + "ho": "хири моту", + "hr": "хрватÑки", + "hsb": "горњи ÑорбијÑки", + "ht": "хаитÑки", + "hu": "мађарÑки", + "hup": "хупа", + "hy": "јерменÑки", + "hz": "хереро", + "ia": "интерлингва", + "iba": "ибан", + "id": "индонежанÑки", + "ie": "међујезички", + "ig": "игбо", + "ii": "Ñичуан ји", + "ik": "унупиак", + "ilo": "илоко", + "inh": "ингвишки", + "io": "идо", + "is": "иÑландÑки", + "it": "италијанÑки", + "iu": "инуктитут", + "ja": "јапанÑки", + "jbo": "лојбан", + "jpr": "јудео-перÑијÑки", + "jrb": "јудео-арапÑки", + "jv": "јаванÑки", + "ka": "грузијÑки", + "kaa": "кара-калпашки", + "kab": "кабиле", + "kac": "качин", + "kaj": "ђу", + "kam": "камба", + "kaw": "кави", + "kbd": "кабардијÑки", + "kcg": "тјап", + "kfo": "коро", + "kg": "конго", + "kha": "каÑи", + "kho": "котанешки", + "ki": "кикују", + "kj": "куањама", + "kk": "козачки", + "kl": "калалиÑут", + "km": "кмерÑки", + "kmb": "кимбунду", + "kn": "канада", + "ko": "корејÑки", + "kok": "конкани", + "kos": "коÑреанÑки", + "kpe": "кпеле", + "kr": "канури", + "krc": "карачај-балкар", + "krl": "карелијÑки", + "kru": "курукх", + "ks": "кашмирÑки", + "ku": "курдÑки", + "kum": "кумик", + "kut": "кутенаи", + "kv": "коми", + "kw": "корнишки", + "ky": "киргиÑки", + "la": "латинÑки", + "lad": "ладино", + "lah": "ланда", + "lam": "ламба", + "lb": "лукÑембуршки", + "lez": "лезгиан", + "lg": "ганда", + "li": "лимбургиш", + "ln": "лингала", + "lo": "лаоÑки", + "lol": "монго", + "loz": "лози", + "lt": "литванÑки", + "lu": "луба-катанга", + "lua": "луба-лулуа", + "lui": "луиÑено", + "lun": "лунда", + "luo": "луо", + "lus": "лушаи", + "lv": "летонÑки", + "mad": "мадурешки", + "mag": "магахи", + "mai": "маитили", + "mak": "макаÑар", + "man": "мандинго", + "mas": "маÑаи", + "mdf": "мокша", + "mdr": "мандар", + "men": "менде", + "mg": "малагаÑијÑки", + "mga": "Ñредњи ирÑки", + "mh": "маршалÑки", + "mi": "маорÑки", + "mic": "микмак", + "min": "минангкабау", + "mk": "македонÑки", + "ml": "малајалам", + "mn": "монголÑки", + "mnc": "манчу", + "mni": "манипури", + "moh": "махавÑки", + "mos": "моÑи", + "mr": "марати", + "ms": "малајÑки", + "mt": "мелтешки", + "mul": "више језика", + "mus": "кришки", + "mwl": "мирандешки", + "mwr": "марвари", + "my": "бурманÑки", + "myv": "ерзија", + "na": "науру", + "nap": "неаполитанÑки", + "nb": "норвешки бокмал", + "nd": "Ñеверни ндебеле", + "nds": "ниÑки немачки", + "ne": "непалÑки", + "new": "невари", + "ng": "ндонга", + "nia": "ниаÑ", + "niu": "ниуеан", + "nl": "холандÑки", + "nl_BE": "фламанÑки", + "nn": "норвешки њорÑк", + "no": "норвешки", + "nog": "ногаи", + "non": "Ñтари норÑки", + "nqo": "н’ко", + "nr": "јужни ндебеле", + "nso": "Ñеверни Ñото", + "nv": "навахо", + "nwc": "клаÑични невари", + "ny": "њања", + "nym": "њамвези", + "nyn": "њанколе", + "nyo": "њоро", + "nzi": "нзима", + "oc": "прованÑалÑки", + "oj": "ојибва", + "om": "оромо", + "or": "оријÑки", + "os": "оÑетÑки", + "osa": "оÑаге", + "ota": "отоманÑки турÑки", + "pa": "панџабÑки", + "pag": "пангаÑинÑки", + "pal": "пахлави", + "pam": "пампанга", + "pap": "папиаменто", + "pau": "палауанÑки", + "peo": "ÑтароперÑијÑки", + "phn": "феничанÑки", + "pi": "пали", + "pl": "пољÑки", + "pon": "понпејÑки", + "pro": "ÑтаропрованÑалÑки", + "ps": "паштунÑки", + "pt": "португалÑки", + "pt_BR": "БразилÑки португалÑки", + "pt_PT": "ИберијÑки португалÑки", + "qu": "квенча", + "raj": "рађаÑтани", + "rap": "рапануи", + "rar": "раротонган", + "rm": "рето-романÑки", + "rn": "рунди", + "ro": "румунÑки", + "ro_MD": "молдавÑки", + "rom": "романи", + "root": "рут", + "ru": "руÑки", + "rup": "ароманијÑки", + "rw": "кинјаруанда", + "sa": "ÑанÑкрит", + "sad": "Ñандаве", + "sah": "јакут", + "sam": "ÑамаританÑки арамејÑки", + "sas": "ÑаÑак", + "sat": "Ñантали", + "sc": "ÑардињаÑки", + "scn": "ÑицилијанÑки", + "sco": "шкотÑки", + "sd": "Ñинди", + "se": "Ñеверни Ñами", + "sel": "Ñелкап", + "sg": "Ñанго", + "sga": "ÑтароирÑки", + "sh": "ÑрпÑкохрватÑки", + "shn": "шан", + "si": "ÑингалеÑки", + "sid": "Ñидамо", + "sk": "Ñловачки", + "sl": "Ñловеначки", + "sm": "ÑамоанÑки", + "sma": "јужни Ñами", + "smj": "луле Ñами", + "smn": "инари Ñами", + "sms": "ÑколтÑки језик", + "sn": "шона", + "snk": "Ñонинке", + "so": "ÑомалÑки", + "sog": "ÑоџијенÑки", + "sq": "албанÑки", + "sr": "ÑрпÑки", + "srn": "ÑрананÑки тонго", + "srr": "Ñерер", + "ss": "Ñвати", + "st": "ÑеÑото", + "su": "ÑунданÑки", + "suk": "Ñукума", + "sus": "ÑуÑу", + "sux": "ÑумерÑки", + "sv": "шведÑки", + "sw": "Ñвахили", + "swb": "коморÑки", + "syc": "клаÑични ÑиријÑки", + "syr": "ÑиријÑки", + "ta": "тамилÑки", + "te": "телугу", + "tem": "тимне", + "ter": "терено", + "tet": "тетум", + "tg": "тађик", + "th": "тајландÑки", + "ti": "тигриња", + "tig": "тигре", + "tiv": "тив", + "tk": "туркменÑки", + "tkl": "токелау", + "tl": "тагалÑки", + "tlh": "клингонÑки", + "tli": "тлингит", + "tmh": "тамашек", + "tn": "Ñ‚Ñвана", + "to": "тонга", + "tog": "њаÑа тонга", + "tpi": "ток пиÑин", + "tr": "турÑки", + "ts": "Ñ‚Ñонга", + "tsi": "Ñ‚Ñимшиан", + "tt": "татарÑки", + "tum": "тумбука", + "tvl": "тувалу", + "tw": "тви", + "ty": "тахићанÑки", + "tyv": "тувинијÑки", + "udm": "удмурт", + "ug": "ујгурÑки", + "uga": "угаритÑки", + "uk": "украјинÑки", + "umb": "умбунду", + "und": "непознат или неважећи језик", + "ur": "урду", + "uz": "узбечки", + "vai": "ваи", + "ve": "венда", + "vi": "вијетнамÑки", + "vo": "волапук", + "vot": "вотÑки", + "wa": "валун", + "wal": "валамо", + "war": "варај", + "was": "вашо", + "wo": "волоф", + "xal": "калмик", + "xh": "кÑхоÑа", + "yao": "јао", + "yap": "јапешки", + "yi": "јидиш", + "yo": "јоруба", + "yue": "кантонÑки", + "za": "жуанг", + "zap": "запотечки", + "zbl": "блиÑимболи", + "zen": "зенага", + "zh": "кинеÑки", + "zh_Hans": "кинеÑки (поједноÑтављен)", + "zh_Hant": "кинеÑки (традиционални)", + "zu": "зулу", + "zun": "зуни", + "zxx": "без лингвиÑтичког Ñадржаја", + "zza": "заза" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ca.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ca.json new file mode 100644 index 0000000000000000000000000000000000000000..2d5c92e70acf858bce05b3fd8a162ca6d70546e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ca.json @@ -0,0 +1,574 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "àfar", + "ab": "abkhaz", + "ace": "atjeh", + "ach": "acoli", + "ada": "adangme", + "ady": "adigué", + "ae": "avèstic", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainu", + "ak": "àkan", + "akk": "accadi", + "akz": "alabama", + "ale": "aleuta", + "aln": "albanès geg", + "alt": "altaic meridional", + "am": "amhàric", + "an": "aragonès", + "ang": "anglès antic", + "anp": "angika", + "ar": "àrab", + "ar_001": "àrab estàndard modern", + "arc": "arameu", + "arn": "araucà", + "aro": "araona", + "arp": "arapaho", + "arw": "arauac", + "arz": "àrab egipci", + "as": "assamès", + "asa": "pare", + "ase": "llengua de signes americana", + "ast": "asturià", + "av": "àvar", + "awa": "awadhi", + "ay": "aimara", + "az": "azerbaidjanès", + "ba": "baixkir", + "bal": "balutxi", + "ban": "balinès", + "bar": "bavarès", + "bas": "basa", + "bax": "bamum", + "bbj": "ghomala", + "be": "bielorús", + "bej": "beja", + "bem": "bemba", + "bez": "bena", + "bfd": "bafut", + "bfq": "badaga", + "bg": "búlgar", + "bgn": "balutxi occidental", + "bho": "bhojpuri", + "bi": "bislama", + "bik": "bicol", + "bin": "bini", + "bkm": "kom", + "bla": "blackfoot", + "bm": "bambara", + "bn": "bengalí", + "bo": "tibetà", + "br": "bretó", + "bra": "braj", + "brh": "brahui", + "brx": "bodo", + "bs": "bosnià", + "bss": "akoose", + "bua": "buriat", + "bug": "bugui", + "bum": "seki", + "byn": "bilin", + "byv": "medumba", + "ca": "català", + "cad": "caddo", + "car": "carib", + "cay": "cayuga", + "cch": "atsam", + "ce": "txetxè", + "ceb": "cebuà", + "cgg": "chiga", + "ch": "chamorro", + "chb": "txibtxa", + "chg": "txagatai", + "chk": "chuuk", + "chm": "mari", + "chn": "pidgin chinook", + "cho": "choctaw", + "chp": "chipewyan", + "chr": "cherokee", + "chy": "xeienne", + "ckb": "kurd sorani", + "co": "cors", + "cop": "copte", + "cr": "cree", + "crh": "tàtar de Crimea", + "crs": "francès crioll de les Seychelles", + "cs": "txec", + "csb": "caixubi", + "cu": "eslau eclesiàstic", + "cv": "txuvaix", + "cy": "gal·lès", + "da": "danès", + "dak": "dakota", + "dar": "darguà", + "dav": "taita", + "de": "alemany", + "de_AT": "alemany austríac", + "de_CH": "alt alemany suís", + "del": "delaware", + "den": "slavi", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "baix sòrab", + "dua": "douala", + "dum": "neerlandès mitjà", + "dv": "divehi", + "dyo": "diola", + "dyu": "jula", + "dz": "dzongka", + "dzg": "dazaga", + "ebu": "embu", + "ee": "ewe", + "efi": "efik", + "egl": "emilià", + "egy": "egipci antic", + "eka": "ekajuk", + "el": "grec", + "elx": "elamita", + "en": "anglès", + "en_AU": "anglès australià", + "en_CA": "anglès canadenc", + "en_GB": "anglès britànic", + "en_US": "anglès americà", + "enm": "anglès mitjà", + "eo": "esperanto", + "es": "espanyol", + "es_419": "espanyol hispanoamericà", + "es_ES": "espanyol europeu", + "es_MX": "espanyol de Mèxic", + "et": "estonià", + "eu": "basc", + "ewo": "ewondo", + "ext": "extremeny", + "fa": "persa", + "fan": "fang", + "fat": "fanti", + "ff": "ful", + "fi": "finès", + "fil": "filipí", + "fj": "fijià", + "fo": "feroès", + "fon": "fon", + "fr": "francès", + "fr_CA": "francès canadenc", + "fr_CH": "francès suís", + "frm": "francès mitjà", + "fro": "francès antic", + "frr": "frisó septentrional", + "frs": "frisó oriental", + "fur": "friülà", + "fy": "frisó occidental", + "ga": "irlandès", + "gaa": "ga", + "gag": "gagaús", + "gan": "xinès gan", + "gay": "gayo", + "gba": "gbaya", + "gd": "gaèlic escocès", + "gez": "gueez", + "gil": "gilbertès", + "gl": "gallec", + "glk": "gilaki", + "gmh": "alt alemany mitjà", + "gn": "guaraní", + "goh": "alt alemany antic", + "gom": "concani de Goa", + "gon": "gondi", + "gor": "gorontalo", + "got": "gòtic", + "grb": "grebo", + "grc": "grec antic", + "gsw": "alemany suís", + "gu": "gujarati", + "guc": "wayú", + "guz": "gusí", + "gv": "manx", + "gwi": "gwichin", + "ha": "haussa", + "hai": "haida", + "hak": "xinès hakka", + "haw": "hawaià", + "he": "hebreu", + "hi": "hindi", + "hif": "hindi de Fiji", + "hil": "hiligainon", + "hit": "hitita", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "croat", + "hsb": "alt sòrab", + "hsn": "xinès xiang", + "ht": "haitià", + "hu": "hongarès", + "hup": "hupa", + "hy": "armeni", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonesi", + "ie": "interlingue", + "ig": "igbo", + "ii": "yi sichuan", + "ik": "inupiak", + "ilo": "ilocà", + "inh": "ingúix", + "io": "ido", + "is": "islandès", + "it": "italià", + "iu": "inuktitut", + "ja": "japonès", + "jam": "crioll anglès de Jamaica", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jpr": "judeopersa", + "jrb": "judeoàrab", + "jv": "javanès", + "ka": "georgià", + "kaa": "karakalpak", + "kab": "cabilenc", + "kac": "katxin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardí", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "crioll capverdià", + "ken": "kenyang", + "kfo": "koro", + "kg": "kongo", + "kgp": "kaingà", + "kha": "khasi", + "kho": "khotanès", + "khq": "koyra chiini", + "ki": "kikuiu", + "kj": "kuanyama", + "kk": "kazakh", + "kkj": "kako", + "kl": "grenlandès", + "kln": "kalenjin", + "km": "khmer", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "coreà", + "koi": "komi-permiac", + "kok": "concani", + "kos": "kosraeà", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karatxai", + "kri": "krio", + "krl": "carelià", + "kru": "kurukh", + "ks": "caixmiri", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "colognian", + "ku": "kurd", + "kum": "kúmik", + "kut": "kutenai", + "kv": "komi", + "kw": "còrnic", + "ky": "kirguís", + "la": "llatí", + "lad": "ladí", + "lag": "langi", + "lah": "panjabi occidental", + "lam": "lamba", + "lb": "luxemburguès", + "lez": "lesguià", + "lg": "ganda", + "li": "limburguès", + "lij": "lígur", + "lkt": "lakota", + "lmo": "llombard", + "ln": "lingala", + "lo": "laosià", + "lol": "mongo", + "loz": "lozi", + "lrc": "luri septentrional", + "lt": "lituà", + "lu": "luba katanga", + "lua": "luba-lulua", + "lui": "luisenyo", + "lun": "lunda", + "luo": "luo", + "lus": "mizo", + "luy": "luyia", + "lv": "letó", + "lzh": "xinès clàssic", + "lzz": "laz", + "mad": "madurès", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makassar", + "man": "mandinga", + "mas": "massai", + "mde": "maba", + "mdf": "mordovià moksa", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "mauricià", + "mg": "malgaix", + "mga": "gaèlic irlandès mitjà", + "mgh": "makhuwa-metto", + "mgo": "meta’", + "mh": "marshallès", + "mi": "maori", + "mic": "micmac", + "min": "minangkabau", + "mk": "macedoni", + "ml": "malaiàlam", + "mn": "mongol", + "mnc": "manxú", + "mni": "manipurí", + "moh": "mohawk", + "mos": "moré", + "mr": "marathi", + "mrj": "mari occidental", + "ms": "malai", + "mt": "maltès", + "mua": "mundang", + "mul": "llengües vàries", + "mus": "creek", + "mwl": "mirandès", + "mwr": "marwari", + "my": "birmà", + "mye": "myene", + "myv": "mordovià erza", + "mzn": "mazanderani", + "na": "nauruà", + "nan": "xinès min del sud", + "nap": "napolità", + "naq": "nama", + "nb": "noruec bokmÃ¥l", + "nd": "ndebele septentrional", + "nds": "baix alemany", + "nds_NL": "baix saxó", + "ne": "nepalès", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niueà", + "nl": "neerlandès", + "nl_BE": "flamenc", + "nmg": "bissio", + "nn": "noruec nynorsk", + "nnh": "ngiemboon", + "no": "noruec", + "nog": "nogai", + "non": "nòrdic antic", + "nov": "novial", + "nqo": "n’Ko", + "nr": "ndebele meridional", + "nso": "sotho septentrional", + "nus": "nuer", + "nv": "navaho", + "nwc": "newari clàssic", + "ny": "nyanja", + "nym": "nyamwesi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzema", + "oc": "occità", + "oj": "ojibwa", + "om": "oromo", + "or": "oriya", + "os": "osseta", + "osa": "osage", + "ota": "turc otomà", + "pa": "panjabi", + "pag": "pangasi", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauà", + "pcd": "picard", + "pcm": "pidgin de Nigèria", + "pdc": "alemany pennsilvanià", + "peo": "persa antic", + "pfl": "alemany palatí", + "phn": "fenici", + "pi": "pali", + "pl": "polonès", + "pms": "piemontès", + "pnt": "pòntic", + "pon": "ponapeà", + "prg": "prussià", + "pro": "provençal antic", + "ps": "paixtu", + "pt": "portuguès", + "pt_BR": "portuguès del Brasil", + "pt_PT": "portuguès de Portugal", + "qu": "quítxua", + "quc": "quitxé", + "raj": "rajasthani", + "rap": "rapanui", + "rar": "rarotongà", + "rgn": "romanyès", + "rm": "retoromànic", + "rn": "rundi", + "ro": "romanès", + "ro_MD": "moldau", + "rof": "rombo", + "rom": "romaní", + "root": "arrel", + "ru": "rus", + "rup": "aromanès", + "rw": "ruandès", + "rwk": "rwo", + "sa": "sànscrit", + "sad": "sandawe", + "sah": "iacut", + "sam": "arameu samarità", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sard", + "scn": "sicilià", + "sco": "escocès", + "sd": "sindhi", + "sdc": "sasserès", + "sdh": "kurd meridional", + "se": "sami septentrional", + "see": "seneca", + "seh": "sena", + "sel": "selkup", + "ses": "songhai oriental", + "sg": "sango", + "sga": "irlandès antic", + "sh": "serbocroat", + "shi": "taixelhit", + "shn": "xan", + "shu": "àrab txadià", + "si": "singalès", + "sid": "sidamo", + "sk": "eslovac", + "sl": "eslovè", + "sm": "samoà", + "sma": "sami meridional", + "smj": "sami lule", + "smn": "sami d’Inari", + "sms": "sami skolt", + "sn": "shona", + "snk": "soninke", + "so": "somali", + "sog": "sogdià", + "sq": "albanès", + "sr": "serbi", + "srn": "sranan", + "srr": "serer", + "ss": "swazi", + "ssy": "saho", + "st": "sotho meridional", + "su": "sundanès", + "suk": "sukuma", + "sus": "susú", + "sux": "sumeri", + "sv": "suec", + "sw": "suahili", + "sw_CD": "suahili del Congo", + "swb": "comorià", + "syc": "siríac clàssic", + "syr": "siríac", + "szl": "silesià", + "ta": "tàmil", + "te": "telugu", + "tem": "temne", + "teo": "teso", + "ter": "terena", + "tet": "tetun", + "tg": "tadjik", + "th": "tailandès", + "ti": "tigrinya", + "tig": "tigre", + "tiv": "tiv", + "tk": "turcman", + "tkl": "tokelauès", + "tkr": "tsakhur", + "tl": "tagal", + "tlh": "klingonià", + "tli": "tlingit", + "tly": "talix", + "tmh": "amazic", + "tn": "setswana", + "to": "tongalès", + "tog": "tonga", + "tpi": "tok pisin", + "tr": "turc", + "trv": "taroko", + "ts": "tsonga", + "tsi": "tsimshià", + "tt": "tàtar", + "ttt": "tat meridional", + "tum": "tumbuka", + "tvl": "tuvaluà", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitià", + "tyv": "tuvinià", + "tzm": "amazic del Marroc central", + "udm": "udmurt", + "ug": "uigur", + "uga": "ugarític", + "uk": "ucraïnès", + "umb": "umbundu", + "und": "idioma desconegut", + "ur": "urdú", + "uz": "uzbek", + "vai": "vai", + "ve": "venda", + "vec": "vènet", + "vep": "vepse", + "vi": "vietnamita", + "vls": "flamenc occidental", + "vo": "volapük", + "vot": "vòtic", + "vun": "vunjo", + "wa": "való", + "wae": "walser", + "wal": "ameto", + "war": "waray", + "was": "washo", + "wbp": "warlpiri", + "wo": "wòlof", + "wuu": "xinès wu", + "xal": "calmuc", + "xh": "xosa", + "xmf": "mingrelià", + "xog": "soga", + "yao": "yao", + "yap": "yapeà", + "yav": "yangben", + "ybb": "yemba", + "yi": "jiddisch", + "yo": "ioruba", + "yue": "cantonès", + "za": "zhuang", + "zap": "zapoteca", + "zbl": "símbols Bliss", + "zea": "zelandès", + "zen": "zenaga", + "zgh": "amazic estàndard marroquí", + "zh": "xinès", + "zh_Hans": "xinès simplificat", + "zh_Hant": "xinès tradicional", + "zu": "zulu", + "zun": "zuni", + "zxx": "sense contingut lingüístic", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ce.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ce.json new file mode 100644 index 0000000000000000000000000000000000000000..865d2c4ea66ec22d0b868397fbbd42d2a6640c20 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ce.json @@ -0,0 +1,235 @@ +{ + "Version": "2.1.28.76", + "Names": { + "ab": "абхазхойн", + "af": "африкаанÑ", + "agq": "агхӀем", + "ak": "акан", + "am": "амхаройн", + "ar": "Ӏаьрбийн", + "ar_001": "ХӀинца болу Ñтандартан Ӏаьрбийн", + "arn": "арауканхойн", + "as": "аÑÑамийн", + "asa": "аÑу", + "az": "азербайджанийн", + "ba": "башкирийн", + "be": "белоруÑийн", + "bem": "бемба", + "bez": "бена", + "bg": "болгарийн", + "bgn": "малхбузен-белуджийн", + "bm": "бамбара", + "bn": "бенгалийн", + "bo": "тибетхойн", + "br": "бретонийн", + "brx": "бодо", + "bs": "боÑнийн", + "ca": "каталонийн", + "ce": "нохчийн", + "cgg": "чига", + "chr": "чероки", + "ckb": "юккъерчу курдийн", + "co": "корÑиканийн", + "cs": "чехийн", + "cv": "чувашийн", + "cy": "валлийн", + "da": "датхойн", + "dav": "таита", + "de": "немцойн", + "de_AT": "авÑтрин немцойн", + "de_CH": "швейцарин лакхара немцойн", + "dje": "зарма", + "dsb": "Ñорбийн", + "dua": "дуала", + "dyo": "дьола-фоньи", + "dz": "дзонг-кÑ", + "ebu": "Ñмбу", + "ee": "Ñве", + "el": "грекийн", + "en": "ингалÑан", + "en_AU": "ÐвÑтралин ингалÑан", + "en_CA": "канадан ингалÑан", + "en_GB": "британин ингалÑан", + "en_US": "американ ингалÑан", + "eo": "ÑÑперанто", + "es": "иÑпанхойн", + "es_419": "латинан американ иÑпанхойн", + "es_ES": "европан иÑпанхойн", + "es_MX": "мекÑикан иÑпанхойн", + "et": "ÑÑтонийн", + "eu": "баÑкийн", + "fa": "гӀажарийн", + "fi": "финнийн", + "fil": "филиппинийн", + "fj": "фиджи", + "fo": "фарерийн", + "fr": "французийн", + "fr_CA": "канадан французийн", + "fr_CH": "швейцарин французийн", + "fy": "малхбузен-фризийн", + "ga": "ирландхойн", + "gag": "гагаузийн", + "gl": "галиÑийн", + "gn": "гуарани", + "gsw": "швейцарин немцойн", + "gu": "гуджарати", + "guz": "гуÑии", + "gv": "мÑнийн", + "ha": "хауÑа", + "haw": "гавайн", + "he": "жугтийн", + "hi": "хинди", + "hr": "хорватийн", + "hsb": "лакхара Ñербийн", + "ht": "гаитийн", + "hu": "венгрийн", + "hy": "Ñрмалойн", + "id": "индонезихойн", + "ig": "игбо", + "ii": "Ñычуань", + "is": "иÑландхойн", + "it": "итальÑнийн", + "iu": "инуктитут", + "ja": "Ñпонийн", + "jgo": "нгомба", + "jmc": "мачаме", + "jv": "Ñванийн", + "ka": "гуьржийн", + "kab": "кабилийн", + "kam": "камба", + "kde": "маконде", + "kea": "кабувердьÑну", + "khq": "койра чиини", + "ki": "кикуйю", + "kk": "казахийн", + "kl": "гренландхойн", + "kln": "календжин", + "km": "кхмерийн", + "kn": "каннада", + "ko": "корейн", + "koi": "коми-пермÑкийн", + "kok": "конкани", + "ks": "кашмири", + "ksb": "шамбала", + "ksf": "бафиа", + "ku": "курдийн", + "kw": "корнуоллийн", + "ky": "гӀиргӀизойн", + "la": "латинан", + "lag": "ланги", + "lb": "люкÑембургхойн", + "lg": "ганда", + "lkt": "лакота", + "ln": "лингала", + "lo": "лаоÑÑийн", + "lrc": "къилбаÑеда лури", + "lt": "литвахойн", + "lu": "луба-катанга", + "luo": "луо (Кени а, Танзани а)", + "luy": "лухьÑ", + "lv": "латышийн", + "mas": "маÑаи", + "mer": "меру", + "mfe": "маврикин креолийн", + "mg": "малагаÑийн", + "mgh": "макуа-меетто", + "mgo": "мета", + "mi": "маори", + "mk": "македонхойн", + "ml": "малаÑлам", + "mn": "монголийн", + "moh": "мохаук", + "mr": "маратхи", + "ms": "малайн", + "mt": "мальтойн", + "mua": "мунданг", + "my": "бирманийн", + "mzn": "мазандеранхойн", + "naq": "нама", + "nb": "норвегийн букмол", + "nd": "къилбаÑеда ндебели", + "nds": "лахара германхойн", + "nds_NL": "лахара ÑакÑонийн", + "ne": "непалхойн", + "nl": "голландхойн", + "nl_BE": "фламандийн", + "nmg": "кваÑио", + "nn": "норвегийн нюнорÑк", + "nqo": "нко", + "nus": "нуÑÑ€", + "nyn": "ньÑнколе", + "om": "оромо", + "or": "ори", + "pa": "панджаби", + "pl": "полÑкийн", + "ps": "пушту", + "pt": "португалихойн", + "pt_BR": "бразилин португалихойн", + "pt_PT": "европан португалихойн", + "qu": "кечуа", + "quc": "киче", + "rm": "романшийн", + "rn": "рунди", + "ro": "румынийн", + "ro_MD": "молдавийн", + "rof": "ромбо", + "ru": "оьрÑийн", + "rw": "киньÑруанда", + "rwk": "руанда", + "sa": "ÑанÑкрит", + "saq": "Ñамбуру", + "sbp": "Ñангу", + "sd": "Ñиндхи", + "se": "къилбаÑеда Ñаамийн", + "seh": "Ñена", + "ses": "койраборо Ñенни", + "sg": "Ñанго", + "shi": "тахелхит", + "si": "Ñингалхойн", + "sk": "Ñловакийн", + "sl": "Ñловенийн", + "sma": "Ñаамийн (къилба)", + "smj": "луле-Ñаамийн", + "smn": "инари-Ñаамийн", + "sms": "Ñкольт-Ñаамийн", + "sn": "шона", + "so": "Ñомали", + "sq": "албанойн", + "sr": "Ñербийн", + "su": "Ñунданхойн", + "sv": "шведийн", + "sw": "Ñуахили", + "sw_CD": "Ñуахили (Конго)", + "ta": "тамилхойн", + "te": "телугу", + "teo": "теÑо", + "tg": "таджикийн", + "th": "тайн", + "ti": "тигриньÑ", + "tk": "туркменийн", + "to": "тонганийн", + "tr": "туркойн", + "tt": "гӀезалойн", + "twq": "таÑавак", + "tzm": "тамазигхтийн", + "ug": "уйгурийн", + "uk": "украинийн", + "und": "боьвзуш боцу мотт", + "ur": "урду", + "uz": "узбекийн", + "vai": "ваи", + "vi": "вьетнамхойн", + "vun": "вунджо", + "wbp": "варлпири", + "wo": "волоф", + "xh": "коÑа", + "xog": "Ñога", + "yo": "йоруба", + "zgh": "мороккон Ñтандартан тамазигхтийн", + "zh": "китайн", + "zh_Hans": "атта китайн", + "zh_Hant": "ламаÑтан китайн", + "zu": "зулу", + "zxx": "меттан чулацам боцуш" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/cs.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/cs.json new file mode 100644 index 0000000000000000000000000000000000000000..dd6a35f6c55de1435ca9420d0b51a22e7a4f129a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/cs.json @@ -0,0 +1,610 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afarÅ¡tina", + "ab": "abcházÅ¡tina", + "ace": "acehÅ¡tina", + "ach": "akolÅ¡tina", + "ada": "adangme", + "ady": "adygejÅ¡tina", + "ae": "avestánÅ¡tina", + "aeb": "arabÅ¡tina (tuniská)", + "af": "afrikánÅ¡tina", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainÅ¡tina", + "ak": "akanÅ¡tina", + "akk": "akkadÅ¡tina", + "akz": "alabamÅ¡tina", + "ale": "aleutÅ¡tina", + "aln": "albánÅ¡tina (Gheg)", + "alt": "altajÅ¡tina (jižní)", + "am": "amharÅ¡tina", + "an": "aragonÅ¡tina", + "ang": "staroangliÄtina", + "anp": "angika", + "ar": "arabÅ¡tina", + "ar_001": "arabÅ¡tina (moderní standardní)", + "arc": "aramejÅ¡tina", + "arn": "mapudungun", + "aro": "araonÅ¡tina", + "arp": "arapažština", + "arq": "arabÅ¡tina (alžírská)", + "arw": "arawacké jazyky", + "ary": "arabÅ¡tina (marocká)", + "arz": "arabÅ¡tina (egyptská)", + "as": "ásámÅ¡tina", + "asa": "asu", + "ase": "znaková Å™eÄ (americká)", + "ast": "asturÅ¡tina", + "av": "avarÅ¡tina", + "avk": "kotava", + "awa": "awadhÅ¡tina", + "ay": "ajmarÅ¡tina", + "az": "ázerbájdžánÅ¡tina", + "ba": "baÅ¡kirÅ¡tina", + "bal": "balúÄÅ¡tina", + "ban": "balijÅ¡tina", + "bar": "bavorÅ¡tina", + "bas": "basa", + "bax": "bamun", + "bbc": "batak toba", + "bbj": "ghomala", + "be": "bÄ›loruÅ¡tina", + "bej": "bedža", + "bem": "bembÅ¡tina", + "bew": "batavÅ¡tina", + "bez": "bena", + "bfd": "bafut", + "bfq": "badagÅ¡tina", + "bg": "bulharÅ¡tina", + "bgn": "balúÄÅ¡tina (západní)", + "bho": "bhojpurÅ¡tina", + "bi": "bislamÅ¡tina", + "bik": "bikolÅ¡tina", + "bin": "bini", + "bjn": "bandžarÅ¡tina", + "bkm": "kom", + "bla": "siksika", + "bm": "bambarÅ¡tina", + "bn": "bengálÅ¡tina", + "bo": "tibetÅ¡tina", + "bpy": "biÅ¡nuprijskomanipurÅ¡tina", + "bqi": "bachtijárÅ¡tina", + "br": "bretonÅ¡tina", + "bra": "bradžština", + "brh": "brahujÅ¡tina", + "brx": "bodoÅ¡tina", + "bs": "bosenÅ¡tina", + "bss": "akoose", + "bua": "burjatÅ¡tina", + "bug": "bugiÅ¡tina", + "bum": "bulu", + "byn": "blinÅ¡tina", + "byv": "medumba", + "ca": "katalánÅ¡tina", + "cad": "caddo", + "car": "karibÅ¡tina", + "cay": "kajugÅ¡tina", + "cch": "atsam", + "ce": "ÄeÄenÅ¡tina", + "ceb": "cebuánÅ¡tina", + "cgg": "kiga", + "ch": "Äamoro", + "chb": "ÄibÄa", + "chg": "ÄagatajÅ¡tina", + "chk": "ÄukÅ¡tina", + "chm": "marijÅ¡tina", + "chn": "Äinuk pidžin", + "cho": "ÄoktÅ¡tina", + "chp": "ÄipevajÅ¡tina", + "chr": "ÄerokézÅ¡tina", + "chy": "ÄejenÅ¡tina", + "ckb": "kurdÅ¡tina (sorání)", + "co": "korsiÄtina", + "cop": "koptÅ¡tina", + "cps": "kapiznonÅ¡tina", + "cr": "kríjÅ¡tina", + "crh": "tureÄtina (krymská)", + "crs": "kreolÅ¡tina (seychelská)", + "cs": "ÄeÅ¡tina", + "csb": "kaÅ¡ubÅ¡tina", + "cu": "staroslovÄ›nÅ¡tina", + "cv": "ÄuvaÅ¡tina", + "cy": "velÅ¡tina", + "da": "dánÅ¡tina", + "dak": "dakotÅ¡tina", + "dar": "dargÅ¡tina", + "dav": "taita", + "de": "nÄ›mÄina", + "de_CH": "nÄ›mÄina standardní (Å výcarsko)", + "del": "delawarÅ¡tina", + "den": "slejvÅ¡tina (athabaský jazyk)", + "dgr": "dogrib", + "din": "dinkÅ¡tina", + "dje": "zarmÅ¡tina", + "doi": "dogarÅ¡tina", + "dsb": "dolnolužická srbÅ¡tina", + "dtp": "kadazandusunÅ¡tina", + "dua": "dualÅ¡tina", + "dum": "holandÅ¡tina (stÅ™edovÄ›ká)", + "dv": "maledivÅ¡tina", + "dyo": "jola-fonyi", + "dyu": "djula", + "dz": "dzongkä", + "dzg": "dazaga", + "ebu": "embu", + "ee": "eweÅ¡tina", + "efi": "efikÅ¡tina", + "egl": "emilijÅ¡tina", + "egy": "egyptÅ¡tina stará", + "eka": "ekajuk", + "el": "Å™eÄtina", + "elx": "elamitÅ¡tina", + "en": "angliÄtina", + "en_GB": "angliÄtina (Velká Británie)", + "en_US": "angliÄtina (USA)", + "enm": "angliÄtina (stÅ™edovÄ›ká)", + "eo": "esperanto", + "es": "Å¡panÄ›lÅ¡tina", + "es_ES": "Å¡panÄ›lÅ¡tina (Evropa)", + "esu": "jupikÅ¡tina (stÅ™edoaljaÅ¡ská)", + "et": "estonÅ¡tina", + "eu": "baskiÄtina", + "ewo": "ewondo", + "ext": "extremadurÅ¡tina", + "fa": "perÅ¡tina", + "fan": "fang", + "fat": "fantÅ¡tina", + "ff": "fulbÅ¡tina", + "fi": "finÅ¡tina", + "fil": "filipínÅ¡tina", + "fit": "finÅ¡tina (tornedalská)", + "fj": "fidžijÅ¡tina", + "fo": "faerÅ¡tina", + "fon": "fonÅ¡tina", + "fr": "francouzÅ¡tina", + "frc": "francouzÅ¡tina (kajunská)", + "frm": "francouzÅ¡tina (stÅ™edovÄ›ká)", + "fro": "francouzÅ¡tina (stará)", + "frp": "franko-provensálÅ¡tina", + "frr": "fríština (severní)", + "frs": "fríština (východní)", + "fur": "furlanÅ¡tina", + "fy": "fríština (západní)", + "ga": "irÅ¡tina", + "gaa": "gaÅ¡tina", + "gag": "gagauzÅ¡tina", + "gan": "ÄínÅ¡tina (dialekty Gan)", + "gay": "gayo", + "gba": "gbaja", + "gbz": "daríjÅ¡tina (zoroastrijská)", + "gd": "skotská gaelÅ¡tina", + "gez": "geez", + "gil": "kiribatÅ¡tina", + "gl": "galicijÅ¡tina", + "glk": "gilaÄtina", + "gmh": "hornonÄ›mÄina (stÅ™edovÄ›ká)", + "gn": "guaranÅ¡tina", + "goh": "hornonÄ›mÄina (stará)", + "gom": "konkánÅ¡tina (Goa)", + "gon": "góndÅ¡tina", + "gor": "gorontalo", + "got": "gótÅ¡tina", + "grb": "grebo", + "grc": "staroÅ™eÄtina", + "gsw": "nÄ›mÄina (Å výcarsko)", + "gu": "gudžarátÅ¡tina", + "guc": "wayúuÅ¡tina", + "gur": "frafra", + "guz": "gusii", + "gv": "manÅ¡tina", + "gwi": "gwichʼin", + "ha": "hauÅ¡tina", + "hai": "haidÅ¡tina", + "hak": "ÄínÅ¡tina (dialekty Hakka)", + "haw": "havajÅ¡tina", + "he": "hebrejÅ¡tina", + "hi": "hindÅ¡tina", + "hif": "hindÅ¡tina (Fidži)", + "hil": "hiligajnonÅ¡tina", + "hit": "chetitÅ¡tina", + "hmn": "hmongÅ¡tina", + "ho": "hiri motu", + "hr": "chorvatÅ¡tina", + "hsb": "hornolužická srbÅ¡tina", + "hsn": "ÄínÅ¡tina (dialekty Xiang)", + "ht": "haitÅ¡tina", + "hu": "maÄarÅ¡tina", + "hup": "hupa", + "hy": "arménÅ¡tina", + "hz": "hererÅ¡tina", + "ia": "interlingua", + "iba": "ibanÅ¡tina", + "ibb": "ibibio", + "id": "indonéština", + "ie": "interlingue", + "ig": "igboÅ¡tina", + "ii": "iÅ¡tina (seÄuánská)", + "ik": "inupiakÅ¡tina", + "ilo": "ilokánÅ¡tina", + "inh": "inguÅ¡tina", + "io": "ido", + "is": "islandÅ¡tina", + "it": "italÅ¡tina", + "iu": "inuktitutÅ¡tina", + "izh": "ingrijÅ¡tina", + "ja": "japonÅ¡tina", + "jam": "jamajská kreolÅ¡tina", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "maÅ¡ame", + "jpr": "judeoperÅ¡tina", + "jrb": "judeoarabÅ¡tina", + "jut": "jutÅ¡tina", + "jv": "javánÅ¡tina", + "ka": "gruzínÅ¡tina", + "kaa": "karakalpaÄtina", + "kab": "kabylÅ¡tina", + "kac": "kaÄijÅ¡tina", + "kaj": "jju", + "kam": "kambÅ¡tina", + "kaw": "kawi", + "kbd": "kabardinÅ¡tina", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "kapverdÅ¡tina", + "ken": "kenyang", + "kfo": "koro", + "kg": "konžština", + "kgp": "kaingang", + "kha": "khásí", + "kho": "chotánÅ¡tina", + "khq": "koyra chiini", + "khw": "chovarÅ¡tina", + "ki": "kikujÅ¡tina", + "kiu": "zazakÅ¡tina", + "kj": "kuaňamÅ¡tina", + "kk": "kazaÅ¡tina", + "kkj": "kako", + "kl": "grónÅ¡tina", + "kln": "kalendžin", + "km": "khmérÅ¡tina", + "kmb": "kimbundÅ¡tina", + "kn": "kannadÅ¡tina", + "ko": "korejÅ¡tina", + "koi": "komi-permjaÄtina", + "kok": "konkánÅ¡tina", + "kos": "kosrajÅ¡tina", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karaÄajevo-balkarÅ¡tina", + "kri": "krio", + "krj": "kinaraj-a", + "krl": "karelÅ¡tina", + "kru": "kuruchÅ¡tina", + "ks": "kaÅ¡mírÅ¡tina", + "ksb": "Å¡ambala", + "ksf": "bafia", + "ksh": "kolínÅ¡tina", + "ku": "kurdÅ¡tina", + "kum": "kumyÄtina", + "kut": "kutenajÅ¡tina", + "kv": "komijÅ¡tina", + "kw": "kornÅ¡tina", + "ky": "kyrgyzÅ¡tina", + "la": "latina", + "lad": "ladinÅ¡tina", + "lag": "langi", + "lah": "lahndÅ¡tina", + "lam": "lambÅ¡tina", + "lb": "lucemburÅ¡tina", + "lez": "lezginÅ¡tina", + "lfn": "lingua franca nova", + "lg": "gandÅ¡tina", + "li": "limburÅ¡tina", + "lij": "ligurÅ¡tina", + "liv": "livonÅ¡tina", + "lkt": "lakotÅ¡tina", + "lmo": "lombardÅ¡tina", + "ln": "lingalÅ¡tina", + "lo": "laoÅ¡tina", + "lol": "mongÅ¡tina", + "loz": "lozÅ¡tina", + "lrc": "lúrÅ¡tina (severní)", + "lt": "litevÅ¡tina", + "ltg": "latgalÅ¡tina", + "lu": "lubu-katanžština", + "lua": "luba-luluaÅ¡tina", + "lui": "luiseňo", + "lun": "lundÅ¡tina", + "luo": "luoÅ¡tina", + "lus": "mizoÅ¡tina", + "luy": "luhja", + "lv": "lotyÅ¡tina", + "lzh": "ÄínÅ¡tina (klasická)", + "lzz": "lazÅ¡tina", + "mad": "madurÅ¡tina", + "maf": "mafa", + "mag": "magahijÅ¡tina", + "mai": "maithiliÅ¡tina", + "mak": "makasarÅ¡tina", + "man": "mandingÅ¡tina", + "mas": "masajÅ¡tina", + "mde": "maba", + "mdf": "mokÅ¡anÅ¡tina", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "mauricijská kreolÅ¡tina", + "mg": "malgaÅ¡tina", + "mga": "irÅ¡tina (stÅ™edovÄ›ká)", + "mgh": "makhuwa-meetto", + "mgo": "meta’", + "mh": "maršálÅ¡tina", + "mi": "maorÅ¡tina", + "mic": "micmac", + "min": "minangkabau", + "mk": "makedonÅ¡tina", + "ml": "malajálamÅ¡tina", + "mn": "mongolÅ¡tina", + "mnc": "mandžuÅ¡tina", + "mni": "manipurÅ¡tina", + "moh": "mohawkÅ¡tina", + "mos": "mosi", + "mr": "maráthÅ¡tina", + "mrj": "marijÅ¡tina (západní)", + "ms": "malajÅ¡tina", + "mt": "maltÅ¡tina", + "mua": "mundang", + "mul": "složené (víceřádkové) jazyky", + "mus": "kríkÅ¡tina", + "mwl": "mirandÅ¡tina", + "mwr": "márvárÅ¡tina", + "mwv": "mentavajÅ¡tina", + "my": "barmÅ¡tina", + "mye": "myene", + "myv": "erzjanÅ¡tina", + "mzn": "mázandaránÅ¡tina", + "na": "naurÅ¡tina", + "nan": "ÄínÅ¡tina (dialekty Minnan)", + "nap": "neapolÅ¡tina", + "naq": "namaÅ¡tina", + "nb": "norÅ¡tina (bokmÃ¥l)", + "nd": "ndebele (Zimbabwe)", + "nds": "dolnonÄ›mÄina", + "nds_NL": "dolnosaÅ¡tina", + "ne": "nepálÅ¡tina", + "new": "névárÅ¡tina", + "ng": "ndondÅ¡tina", + "nia": "nias", + "niu": "niueÅ¡tina", + "njo": "ao (jazyky Nágálandu)", + "nl": "nizozemÅ¡tina", + "nl_BE": "vlámÅ¡tina", + "nmg": "kwasio", + "nn": "norÅ¡tina (nynorsk)", + "nnh": "ngiemboon", + "no": "norÅ¡tina", + "nog": "nogajÅ¡tina", + "non": "norÅ¡tina historická", + "nov": "novial", + "nqo": "n’ko", + "nr": "ndebele (Jižní Afrika)", + "nso": "sotÅ¡tina (severní)", + "nus": "nuerÅ¡tina", + "nv": "navažština", + "nwc": "newarÅ¡tina (klasická)", + "ny": "ňandžština", + "nym": "ňamwežština", + "nyn": "ňankolÅ¡tina", + "nyo": "ňorÅ¡tina", + "nzi": "nzima", + "oc": "okcitánÅ¡tina", + "oj": "odžibvejÅ¡tina", + "om": "oromÅ¡tina", + "or": "urijÅ¡tina", + "os": "osetÅ¡tina", + "osa": "osage", + "ota": "tureÄtina (osmanská)", + "pa": "paňdžábÅ¡tina", + "pag": "pangasinanÅ¡tina", + "pal": "pahlavÅ¡tina", + "pam": "papangau", + "pap": "papiamento", + "pau": "palauÅ¡tina", + "pcd": "picardÅ¡tina", + "pcm": "nigerijský pidžin", + "pdc": "nÄ›mÄina (pensylvánská)", + "pdt": "nÄ›mÄina (plautdietsch)", + "peo": "staroperÅ¡tina", + "pfl": "falÄtina", + "phn": "féniÄtina", + "pi": "pálí", + "pl": "polÅ¡tina", + "pms": "piemonÅ¡tina", + "pnt": "pontÅ¡tina", + "pon": "pohnpeiÅ¡tina", + "prg": "pruÅ¡tina", + "pro": "provensálÅ¡tina", + "ps": "paÅ¡tÅ¡tina", + "pt": "portugalÅ¡tina", + "pt_PT": "portugalÅ¡tina (Evropa)", + "qu": "keÄuánÅ¡tina", + "quc": "kiÄé", + "qug": "keÄuánÅ¡tina (chimborazo)", + "raj": "rádžastánÅ¡tina", + "rap": "rapanujÅ¡tina", + "rar": "rarotongánÅ¡tina", + "rgn": "romaňolÅ¡tina", + "rif": "rífÅ¡tina", + "rm": "rétorománÅ¡tina", + "rn": "kirundÅ¡tina", + "ro": "rumunÅ¡tina", + "ro_MD": "moldavÅ¡tina", + "rof": "rombo", + "rom": "romÅ¡tina", + "root": "koÅ™en", + "rtm": "rotumanÅ¡tina", + "ru": "ruÅ¡tina", + "rue": "rusínÅ¡tina", + "rug": "rovianÅ¡tina", + "rup": "arumunÅ¡tina", + "rw": "kiňarwandÅ¡tina", + "rwk": "rwa", + "sa": "sanskrt", + "sad": "sandawÅ¡tina", + "sah": "jakutÅ¡tina", + "sam": "samarÅ¡tina", + "saq": "samburu", + "sas": "sasakÅ¡tina", + "sat": "santálÅ¡tina", + "saz": "saurášterÅ¡tina", + "sba": "ngambay", + "sbp": "sangoÅ¡tina", + "sc": "sardÅ¡tina", + "scn": "sicilÅ¡tina", + "sco": "skotÅ¡tina", + "sd": "sindhÅ¡tina", + "sdc": "sassarÅ¡tina", + "sdh": "kurdÅ¡tina (jižní)", + "se": "sámÅ¡tina (severní)", + "see": "seneca", + "seh": "sena", + "sei": "seriÅ¡tina", + "sel": "selkupÅ¡tina", + "ses": "koyraboro senni", + "sg": "sangÅ¡tina", + "sga": "irÅ¡tina (stará)", + "sgs": "žemaitÅ¡tina", + "sh": "srbochorvatÅ¡tina", + "shi": "taÅ¡elhit", + "shn": "Å¡anÅ¡tina", + "shu": "arabÅ¡tina (Äadská)", + "si": "sinhálÅ¡tina", + "sid": "sidamo", + "sk": "slovenÅ¡tina", + "sl": "slovinÅ¡tina", + "sli": "nÄ›mÄina (slezská)", + "sly": "selajarÅ¡tina", + "sm": "samojÅ¡tina", + "sma": "sámÅ¡tina (jižní)", + "smj": "sámÅ¡tina (lulejská)", + "smn": "sámÅ¡tina (inarijská)", + "sms": "sámÅ¡tina (skoltská)", + "sn": "Å¡onÅ¡tina", + "snk": "sonikÅ¡tina", + "so": "somálÅ¡tina", + "sog": "sogdÅ¡tina", + "sq": "albánÅ¡tina", + "sr": "srbÅ¡tina", + "srn": "sranan tongo", + "srr": "sererÅ¡tina", + "ss": "siswatÅ¡tina", + "ssy": "saho", + "st": "sotÅ¡tina (jižní)", + "stq": "fríština (saterlandská)", + "su": "sundÅ¡tina", + "suk": "sukuma", + "sus": "susu", + "sux": "sumerÅ¡tina", + "sv": "Å¡védÅ¡tina", + "sw": "svahilÅ¡tina", + "sw_CD": "svahilÅ¡tina (Kongo)", + "swb": "komorÅ¡tina", + "syc": "syrÅ¡tina (klasická)", + "syr": "syrÅ¡tina", + "szl": "slezÅ¡tina", + "ta": "tamilÅ¡tina", + "tcy": "tuluÅ¡tina", + "te": "telugÅ¡tina", + "tem": "temne", + "teo": "teso", + "ter": "tereno", + "tet": "tetumÅ¡tina", + "tg": "tádžiÄtina", + "th": "thajÅ¡tina", + "ti": "tigrinijÅ¡tina", + "tig": "tigrejÅ¡tina", + "tiv": "tivÅ¡tina", + "tk": "turkmenÅ¡tina", + "tkl": "tokelauÅ¡tina", + "tkr": "cachurÅ¡tina", + "tl": "tagalog", + "tlh": "klingonÅ¡tina", + "tli": "tlingit", + "tly": "talyÅ¡tina", + "tmh": "tamaÅ¡ek", + "tn": "setswanÅ¡tina", + "to": "tongánÅ¡tina", + "tog": "tonžština (nyasa)", + "tpi": "tok pisin", + "tr": "tureÄtina", + "tru": "turojÅ¡tina", + "trv": "taroko", + "ts": "tsonga", + "tsd": "tsakonÅ¡tina", + "tsi": "tsimÅ¡ijské jazyky", + "tt": "tatarÅ¡tina", + "ttt": "tatÅ¡tina", + "tum": "tumbukÅ¡tina", + "tvl": "tuvalÅ¡tina", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitÅ¡tina", + "tyv": "tuvinÅ¡tina", + "tzm": "tamazight (stÅ™ední Maroko)", + "udm": "udmurtÅ¡tina", + "ug": "ujgurÅ¡tina", + "uga": "ugaritÅ¡tina", + "uk": "ukrajinÅ¡tina", + "umb": "umbundu", + "und": "neznámý jazyk", + "ur": "urdÅ¡tina", + "uz": "uzbeÄtina", + "vai": "vai", + "ve": "venda", + "vec": "benátÅ¡tina", + "vep": "vepÅ¡tina", + "vi": "vietnamÅ¡tina", + "vls": "vlámÅ¡tina (západní)", + "vmf": "nÄ›mÄina (mohansko-franské dialekty)", + "vo": "volapük", + "vot": "votÅ¡tina", + "vro": "võruÅ¡tina", + "vun": "vunjo", + "wa": "valonÅ¡tina", + "wae": "nÄ›mÄina (walser)", + "wal": "wolajtÅ¡tina", + "war": "warajÅ¡tina", + "was": "waÅ¡tina", + "wbp": "warlpiri", + "wo": "wolofÅ¡tina", + "wuu": "ÄínÅ¡tina (dialekty Wu)", + "xal": "kalmyÄtina", + "xh": "xhoÅ¡tina", + "xmf": "mingrelÅ¡tina", + "xog": "sogÅ¡tina", + "yao": "jaoÅ¡tina", + "yap": "japÅ¡tina", + "yav": "jangbenÅ¡tina", + "ybb": "yemba", + "yi": "jidiÅ¡", + "yo": "jorubÅ¡tina", + "yrl": "nheengatu", + "yue": "kantonÅ¡tina", + "za": "ÄuangÅ¡tina", + "zap": "zapotéÄtina", + "zbl": "bliss systém", + "zea": "zélandÅ¡tina", + "zen": "zenaga", + "zgh": "tamazight (standardní marocký)", + "zh": "ÄínÅ¡tina", + "zh_Hans": "ÄínÅ¡tina (zjednoduÅ¡ená)", + "zu": "zuluÅ¡tina", + "zun": "zunijÅ¡tina", + "zxx": "žádný jazykový obsah", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/cy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/cy.json new file mode 100644 index 0000000000000000000000000000000000000000..b68fbb5c8391492313fc7d810ccccee19724e77b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/cy.json @@ -0,0 +1,538 @@ +{ + "Version": "2.1.30.6", + "Names": { + "aa": "Affareg", + "ab": "Abchaseg", + "ace": "Acehneg", + "ach": "Acoli", + "ada": "Adangmeg", + "ady": "Circaseg Gorllewinol", + "ae": "Afestaneg", + "aeb": "Arabeg Tunisia", + "af": "Affricâneg", + "afh": "Affrihili", + "agq": "Aghemeg", + "ain": "Ainŵeg", + "ak": "Acaneg", + "akk": "Acadeg", + "akz": "Alabamäeg", + "ale": "Alewteg", + "aln": "Ghegeg Albania", + "alt": "Altäeg Deheuol", + "am": "Amhareg", + "an": "Aragoneg", + "ang": "Hen Saesneg", + "anp": "Angika", + "ar": "Arabeg", + "ar_001": "Arabeg Modern Safonol", + "arc": "Aramaeg", + "arn": "Arawcaneg", + "aro": "Araonaeg", + "arp": "Arapaho", + "arq": "Arabeg Algeria", + "arw": "Arawaceg", + "ary": "Arabeg Moroco", + "arz": "Arabeg yr Aifft", + "as": "Asameg", + "asa": "Asw", + "ase": "Iaith Arwyddion America", + "ast": "Astwrianeg", + "av": "Afareg", + "awa": "Awadhi", + "ay": "Aymareg", + "az": "Aserbaijaneg", + "az_Arab": "Aserbaijaneg Deheuol", + "ba": "Bashcorteg", + "bal": "Balwtsi", + "ban": "Balïeg", + "bas": "Basâeg", + "bax": "Bamwmeg", + "be": "Belarwseg", + "bej": "Bejäeg", + "bem": "Bembeg", + "bez": "Bena", + "bfd": "Baffwteg", + "bfq": "Badaga", + "bg": "Bwlgareg", + "bgn": "Balochi Gorllewinol", + "bho": "Bhojpuri", + "bi": "Bislama", + "bin": "Bini", + "bkm": "Comeg", + "bla": "Siksika", + "bm": "Bambareg", + "bn": "Bengaleg", + "bo": "Tibeteg", + "br": "Llydaweg", + "brh": "Brahui", + "brx": "Bodo", + "bs": "Bosnieg", + "bss": "Acwseg", + "bua": "Bwriateg", + "bug": "Buginese", + "bum": "Bwlw", + "byn": "Blin", + "ca": "Catalaneg", + "cad": "Cado", + "car": "Caribeg", + "cch": "Atsameg", + "ce": "Tsietsieneg", + "ceb": "Cebuano", + "cgg": "Tsiga", + "ch": "Tsiamorro", + "chk": "Chuukese", + "chm": "Marieg", + "cho": "Siocto", + "chr": "Tsierocî", + "chy": "Cheyenne", + "ckb": "Cwrdeg Sorani", + "co": "Corseg", + "cop": "Copteg", + "cr": "Cri", + "crh": "Tyrceg y Crimea", + "crs": "Ffrangeg Seselwa Creole", + "cs": "Tsieceg", + "cu": "Hen Slafoneg", + "cv": "Tshwfasheg", + "cy": "Cymraeg", + "da": "Daneg", + "dak": "Dacotaeg", + "dar": "Dargwa", + "dav": "Taita", + "de": "Almaeneg", + "de_AT": "Almaeneg Awstria", + "de_CH": "Almaeneg Safonol y Swistir", + "dgr": "Dogrib", + "din": "Dinca", + "dje": "Zarmaeg", + "doi": "Dogri", + "dsb": "Sorbeg Isaf", + "dua": "Diwaleg", + "dum": "Iseldireg Canol", + "dv": "Difehi", + "dyo": "Jola-Fonyi", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embw", + "ee": "Ewe", + "efi": "Efik", + "egy": "Hen Eiffteg", + "eka": "Ekajuk", + "el": "Groeg", + "elx": "Elameg", + "en": "Saesneg", + "en_AU": "Saesneg Awstralia", + "en_CA": "Saesneg Canada", + "en_GB": "Saesneg Prydain", + "en_US": "Saesneg America", + "enm": "Saesneg Canol", + "eo": "Esperanto", + "es": "Sbaeneg", + "es_419": "Sbaeneg America Ladin", + "es_ES": "Sbaeneg Ewrop", + "es_MX": "Sbaeneg Mecsico", + "et": "Estoneg", + "eu": "Basgeg", + "ewo": "Ewondo", + "ext": "Extremadureg", + "fa": "Perseg", + "fat": "Ffanti", + "ff": "Ffwla", + "fi": "Ffinneg", + "fil": "Ffilipineg", + "fit": "Ffinneg Tornedal", + "fj": "Ffijïeg", + "fo": "Ffaröeg", + "fon": "Fon", + "fr": "Ffrangeg", + "fr_CA": "Ffrangeg Canada", + "fr_CH": "Ffrangeg y Swistir", + "frc": "Ffrangeg Cajwn", + "frm": "Ffrangeg Canol", + "fro": "Hen Ffrangeg", + "frp": "Arpitaneg", + "frr": "Ffriseg Gogleddol", + "frs": "Ffriseg y Dwyrain", + "fur": "Ffriwleg", + "fy": "Ffriseg y Gorllewin", + "ga": "Gwyddeleg", + "gaa": "Ga", + "gag": "Gagauz", + "gay": "Gaio", + "gba": "Gbaia", + "gbz": "Dareg y Zoroastriaid", + "gd": "Gaeleg yr Alban", + "gez": "Geez", + "gil": "Gilberteg", + "gl": "Galisieg", + "gmh": "Almaeneg Uchel Canol", + "gn": "Guaraní", + "goh": "Hen Almaeneg Uchel", + "gor": "Gorontalo", + "got": "Gotheg", + "grc": "Hen Roeg", + "gsw": "Almaeneg y Swistir", + "gu": "Gwjarati", + "guz": "Gusii", + "gv": "Manaweg", + "gwi": "Gwichʼin", + "ha": "Hawsa", + "hai": "Haida", + "haw": "Hawäieg", + "he": "Hebraeg", + "hi": "Hindi", + "hil": "Hiligaynon", + "hit": "Hetheg", + "hmn": "Hmongeg", + "hr": "Croateg", + "hsb": "Sorbeg Uchaf", + "ht": "Creol Haiti", + "hu": "Hwngareg", + "hup": "Hupa", + "hy": "Armeneg", + "hz": "Herero", + "ia": "Interlingua", + "iba": "Ibaneg", + "ibb": "Ibibio", + "id": "Indoneseg", + "ie": "Interlingue", + "ig": "Igbo", + "ii": "Nwosw", + "ik": "Inwpiaceg", + "ilo": "Ilocaneg", + "inh": "Ingwsieg", + "io": "Ido", + "is": "Islandeg", + "it": "Eidaleg", + "iu": "Inwctitwt", + "ja": "Japaneeg", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Matsiame", + "jpr": "Iddew-Bersieg", + "jrb": "Iddew-Arabeg", + "jv": "Jafanaeg", + "ka": "Georgeg", + "kaa": "Cara-Calpaceg", + "kab": "Cabileg", + "kac": "Kachin", + "kaj": "Jju", + "kam": "Camba", + "kbd": "Circaseg Dwyreiniol", + "kcg": "Tyapeg", + "kde": "Macondeg", + "kea": "Caboferdianeg", + "kfo": "Koro", + "kg": "Congo", + "kha": "Càseg", + "khq": "Koyra Chiini", + "khw": "Chowareg", + "ki": "Kikuyu", + "kj": "Kuanyama", + "kk": "Casacheg", + "kkj": "Kako", + "kl": "Kalaallisut", + "kln": "Kalenjin", + "km": "Chmereg", + "kmb": "Kimbundu", + "kn": "Kannada", + "ko": "Coreeg", + "koi": "Komi-Permyak", + "kok": "Concani", + "kpe": "Kpelle", + "kr": "Canwri", + "krc": "Karachay-Balkar", + "krl": "Careleg", + "kru": "Kurukh", + "ks": "Cashmireg", + "ksb": "Shambala", + "ksf": "Baffia", + "ksh": "Cwleneg", + "ku": "Cwrdeg", + "kum": "Cwmiceg", + "kv": "Comi", + "kw": "Cernyweg", + "ky": "Cirgiseg", + "la": "Lladin", + "lad": "Iddew-Sbaeneg", + "lag": "Langi", + "lah": "Lahnda", + "lam": "Lamba", + "lb": "Lwcsembwrgeg", + "lez": "Lezgheg", + "lg": "Ganda", + "li": "Limbwrgeg", + "lkt": "Lakota", + "lmo": "Lombardeg", + "ln": "Lingala", + "lo": "Laoeg", + "lol": "Mongo", + "loz": "Lozi", + "lrc": "Luri Gogleddol", + "lt": "Lithwaneg", + "ltg": "Latgaleg", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lun": "Lwnda", + "luo": "Lŵo", + "lus": "Lwshaieg", + "luy": "Lwyia", + "lv": "Latfieg", + "mad": "Madwreg", + "mag": "Magahi", + "mai": "Maithili", + "mak": "Macasareg", + "man": "Mandingo", + "mas": "Masai", + "mdf": "Mocsia", + "mdr": "Mandareg", + "men": "Mendeg", + "mer": "Mêrw", + "mfe": "Morisyen", + "mg": "Malagaseg", + "mga": "Gwyddeleg Canol", + "mgh": "Makhuwa-Meetto", + "mgo": "Meta", + "mh": "Marsialeg", + "mi": "Maori", + "mic": "Micmaceg", + "min": "Minangkabau", + "mk": "Macedoneg", + "ml": "Malayalam", + "mn": "Mongoleg", + "mnc": "Manshw", + "mni": "Manipwri", + "moh": "Mohoceg", + "mos": "Mosi", + "mr": "Marathi", + "mrj": "Mari Gorllewinol", + "ms": "Maleieg", + "mt": "Malteg", + "mua": "Mundang", + "mul": "Mwy nag un iaith", + "mus": "Creek", + "mwl": "Mirandeg", + "mwr": "Marwari", + "my": "Byrmaneg", + "myv": "Erzya", + "mzn": "Masanderani", + "na": "Nawrŵeg", + "nap": "Naplieg", + "naq": "Nama", + "nb": "Norwyeg BokmÃ¥l", + "nd": "Ndebele Gogleddol", + "nds": "Almaeneg Isel", + "nds_NL": "Sacsoneg Isel", + "ne": "Nepaleg", + "new": "Newaeg", + "ng": "Ndonga", + "nia": "Nias", + "niu": "Niuean", + "njo": "Ao Naga", + "nl": "Iseldireg", + "nl_BE": "Fflemeg", + "nmg": "Kwasio", + "nn": "Norwyeg Nynorsk", + "nnh": "Ngiemboon", + "no": "Norwyeg", + "nog": "Nogai", + "non": "Hen Norseg", + "nqo": "N’Ko", + "nr": "Ndebele Deheuol", + "nso": "Sotho Gogleddol", + "nus": "Nŵereg", + "nv": "Nafaho", + "nwc": "Hen Newari", + "ny": "Nianja", + "nym": "Niamwezi", + "nyn": "Niancole", + "nyo": "Nioro", + "nzi": "Nzimeg", + "oc": "Ocsitaneg", + "oj": "Ojibwa", + "om": "Oromo", + "or": "Oriya", + "os": "Oseteg", + "osa": "Osageg", + "ota": "Tyrceg Otoman", + "pa": "Pwnjabeg", + "pag": "Pangasineg", + "pal": "Pahlafi", + "pam": "Pampanga", + "pap": "Papiamento", + "pau": "Palawan", + "pcd": "Picardeg", + "pcm": "Pidgin Nigeria", + "pdc": "Almaeneg Pensylfania", + "peo": "Hen Bersieg", + "pfl": "Almaeneg Palatin", + "phn": "Phoeniceg", + "pi": "Pali", + "pl": "Pwyleg", + "pms": "Piedmonteg", + "pnt": "Ponteg", + "pon": "Pohnpeianeg", + "prg": "Prwseg", + "pro": "Hen Brofensaleg", + "ps": "Pashto", + "pt": "Portiwgeeg", + "pt_BR": "Portiwgeeg Brasil", + "pt_PT": "Portiwgeeg Ewrop", + "qu": "Quechua", + "quc": "K’iche’", + "raj": "Rajasthaneg", + "rap": "Rapanŵi", + "rar": "Raratongeg", + "rm": "Románsh", + "rn": "Rwndi", + "ro": "Rwmaneg", + "ro_MD": "Moldofeg", + "rof": "Rombo", + "rom": "Romani", + "root": "Y Gwraidd", + "rtm": "Rotumaneg", + "ru": "Rwseg", + "rup": "Aromaneg", + "rw": "Ciniarŵandeg", + "rwk": "Rwa", + "sa": "Sansgrit", + "sad": "Sandäweg", + "sah": "Sakha", + "sam": "Aramaeg Samaria", + "saq": "Sambŵrw", + "sas": "Sasaceg", + "sat": "Santali", + "sba": "Ngambeieg", + "sbp": "Sangw", + "sc": "Sardeg", + "scn": "Sisileg", + "sco": "Sgoteg", + "sd": "Sindhi", + "sdc": "Sasareseg Sardinia", + "sdh": "Cwrdeg Deheuol", + "se": "Sami Gogleddol", + "see": "Seneca", + "seh": "Sena", + "sei": "Seri", + "sel": "Selcypeg", + "ses": "Koyraboro Senni", + "sg": "Sango", + "sga": "Hen Wyddeleg", + "sgs": "Samogiteg", + "sh": "Serbo-Croateg", + "shi": "Tachelhit", + "shn": "Shan", + "shu": "Arabeg Chad", + "si": "Sinhaleg", + "sid": "Sidamo", + "sk": "Slofaceg", + "sl": "Slofeneg", + "sli": "Is-silesieg", + "sm": "Samöeg", + "sma": "Sami Deheuol", + "smj": "Sami Lwle", + "smn": "Sami Inari", + "sms": "Sami Scolt", + "sn": "Shona", + "snk": "Soninceg", + "so": "Somaleg", + "sog": "Sogdeg", + "sq": "Albaneg", + "sr": "Serbeg", + "srn": "Sranan Tongo", + "srr": "Serereg", + "ss": "Swati", + "ssy": "Saho", + "st": "Sesotheg Deheuol", + "stq": "Ffriseg Saterland", + "su": "Swndaneg", + "suk": "Swcwma", + "sus": "Swsŵeg", + "sux": "Swmereg", + "sv": "Swedeg", + "sw": "Swahili", + "sw_CD": "Swahili’r Congo", + "swb": "Comoreg", + "syc": "Hen Syrieg", + "syr": "Syrieg", + "szl": "Silesieg", + "ta": "Tamileg", + "tcy": "Tulu", + "te": "Telugu", + "tem": "Timneg", + "teo": "Teso", + "ter": "Terena", + "tet": "Tetumeg", + "tg": "Tajiceg", + "th": "Thai", + "ti": "Tigrinya", + "tig": "Tigreg", + "tiv": "Tifeg", + "tk": "Twrcmeneg", + "tkl": "Tocelaweg", + "tkr": "Tsakhureg", + "tl": "Tagalog", + "tlh": "Klingon", + "tli": "Llingit", + "tly": "Talysheg", + "tmh": "Tamasheceg", + "tn": "Tswana", + "to": "Tongeg", + "tpi": "Tok Pisin", + "tr": "Tyrceg", + "trv": "Taroko", + "ts": "Tsongaeg", + "tsd": "Tsaconeg", + "tt": "Tatareg", + "tum": "Twmbwca", + "tvl": "Twfalweg", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Tahitïeg", + "tyv": "Twfwnieg", + "tzm": "Tamaseit Canolbarth Moroco", + "udm": "Fotiaceg", + "ug": "Uighur", + "uga": "Wgariteg", + "uk": "Wcreineg", + "umb": "Umbundu", + "und": "Iaith Anhysbys", + "ur": "Wrdw", + "uz": "Wsbeceg", + "vai": "Faieg", + "ve": "Fendeg", + "vec": "Feniseg", + "vep": "Feps", + "vi": "Fietnameg", + "vls": "Fflemeg Gorllewinol", + "vo": "Folapük", + "vot": "Foteg", + "vun": "Funjo", + "wa": "Walwneg", + "wae": "Walsereg", + "wal": "Walamo", + "war": "Winarayeg", + "was": "Washo", + "wbp": "Warlpiri", + "wo": "Woloff", + "xal": "Calmyceg", + "xh": "Xhosa", + "xog": "Soga", + "yav": "Iangben", + "ybb": "Iembaeg", + "yi": "Iddew-Almaeneg", + "yo": "Iorwba", + "yue": "Cantoneeg", + "zap": "Zapoteceg", + "zbl": "Blisssymbols", + "zea": "Zêlandeg", + "zgh": "Tamaseit Safonol", + "zh": "Tsieineeg", + "zh_Hans": "Tsieineeg Symledig", + "zh_Hant": "Tsieineeg Traddodiadol", + "zu": "Swlw", + "zun": "Zuni", + "zxx": "Dim cynnwys ieithyddol", + "zza": "Zazäeg" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/da.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/da.json new file mode 100644 index 0000000000000000000000000000000000000000..aa161584b86c57f35af02fb31bf445347eb0179d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/da.json @@ -0,0 +1,533 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afar", + "ab": "abkhasisk", + "ace": "achinesisk", + "ach": "acoli", + "ada": "adangme", + "ady": "adyghe", + "ae": "avestan", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainu", + "ak": "akan", + "akk": "akkadisk", + "ale": "aleutisk", + "alt": "sydaltaisk", + "am": "amharisk", + "an": "aragonesisk", + "ang": "oldengelsk", + "anp": "angika", + "ar": "arabisk", + "ar_001": "moderne standardarabisk", + "arc": "aramæisk", + "arn": "mapudungun", + "arp": "arapaho", + "arw": "arawak", + "as": "assamesisk", + "asa": "asu", + "ast": "asturisk", + "av": "avarisk", + "awa": "awadhi", + "ay": "aymara", + "az": "aserbajdsjansk", + "ba": "bashkir", + "bal": "baluchi", + "ban": "balinesisk", + "bas": "basaa", + "bax": "bamun", + "bbj": "ghomala", + "be": "hviderussisk", + "bej": "beja", + "bem": "bemba", + "bez": "bena", + "bfd": "bafut", + "bg": "bulgarsk", + "bgn": "vestbaluchi", + "bho": "bhojpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bengali", + "bo": "tibetansk", + "br": "bretonsk", + "bra": "braj", + "brx": "bodo", + "bs": "bosnisk", + "bss": "bakossi", + "bua": "buriatisk", + "bug": "buginesisk", + "bum": "bulu", + "byn": "blin", + "byv": "medumba", + "ca": "catalansk", + "cad": "caddo", + "car": "caribisk", + "cay": "cayuga", + "cch": "atsam", + "ce": "tjetjensk", + "ceb": "cebuano", + "cgg": "chiga", + "ch": "chamorro", + "chb": "chibcha", + "chg": "chagatai", + "chk": "chuukese", + "chm": "mari", + "chn": "chinook", + "cho": "choctaw", + "chp": "chipewyan", + "chr": "cherokee", + "chy": "cheyenne", + "ckb": "sorani", + "co": "korsikansk", + "cop": "koptisk", + "cr": "cree", + "crh": "krim-tyrkisk", + "crs": "seselwa (kreol-fransk)", + "cs": "tjekkisk", + "csb": "kasjubisk", + "cu": "kirkeslavisk", + "cv": "chuvash", + "cy": "walisisk", + "da": "dansk", + "dak": "dakota", + "dar": "dargwa", + "dav": "taita", + "de": "tysk", + "de_AT": "østrigsk tysk", + "de_CH": "schweizerhøjtysk", + "del": "delaware", + "den": "athapaskisk", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "nedersorbisk", + "dua": "duala", + "dum": "middelhollandsk", + "dv": "divehi", + "dyo": "jola-fonyi", + "dyu": "dyula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "kiembu", + "ee": "ewe", + "efi": "efik", + "egy": "oldegyptisk", + "eka": "ekajuk", + "el": "græsk", + "elx": "elamitisk", + "en": "engelsk", + "en_AU": "australsk engelsk", + "en_CA": "canadisk engelsk", + "en_GB": "britisk engelsk", + "en_US": "amerikansk engelsk", + "enm": "middelengelsk", + "eo": "esperanto", + "es": "spansk", + "es_419": "latinamerikansk spansk", + "es_ES": "europæisk spansk", + "es_MX": "mexicansk spansk", + "et": "estisk", + "eu": "baskisk", + "ewo": "ewondo", + "fa": "persisk", + "fan": "fang", + "fat": "fanti", + "ff": "fulah", + "fi": "finsk", + "fil": "filippinsk", + "fj": "fijiansk", + "fo": "færøsk", + "fon": "fon", + "fr": "fransk", + "fr_CA": "canadisk fransk", + "fr_CH": "schweizisk fransk", + "frm": "middelfransk", + "fro": "oldfransk", + "frr": "nordfrisisk", + "frs": "østfrisisk", + "fur": "friulian", + "fy": "frisisk", + "ga": "irsk", + "gaa": "ga", + "gag": "gagauzisk", + "gan": "gan-kinesisk", + "gay": "gayo", + "gba": "gbaya", + "gd": "skotsk gælisk", + "gez": "geez", + "gil": "gilbertesisk", + "gl": "galicisk", + "gmh": "middelhøjtysk", + "gn": "guarani", + "goh": "oldhøjtysk", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotisk", + "grb": "grebo", + "grc": "oldgræsk", + "gsw": "schweizertysk", + "gu": "gujarati", + "guz": "gusii", + "gv": "manx", + "gwi": "gwichin", + "ha": "hausa", + "hai": "haida", + "hak": "hakka-kinesisk", + "haw": "hawaiiansk", + "he": "hebraisk", + "hi": "hindi", + "hil": "hiligaynon", + "hit": "hittitisk", + "hmn": "hmong", + "ho": "hirimotu", + "hr": "kroatisk", + "hsb": "øvresorbisk", + "hsn": "xiang-kinesisk", + "ht": "haitisk", + "hu": "ungarsk", + "hup": "hupa", + "hy": "armensk", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonesisk", + "ie": "interlingue", + "ig": "igbo", + "ii": "sichuan yi", + "ik": "inupiaq", + "ilo": "iloko", + "inh": "ingush", + "io": "ido", + "is": "islandsk", + "it": "italiensk", + "iu": "inuktitut", + "ja": "japansk", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jpr": "jødisk-persisk", + "jrb": "jødisk-arabisk", + "jv": "javanesisk", + "ka": "georgisk", + "kaa": "karakalpakisk", + "kab": "kabylisk", + "kac": "kachin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardian", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "kapverdisk", + "kfo": "koro", + "kg": "kongo", + "kha": "khasi", + "kho": "khotanesisk", + "khq": "koyra-chiini", + "ki": "kikuyu", + "kj": "kuanyama", + "kk": "kasakhisk", + "kkj": "kako", + "kl": "grønlandsk", + "kln": "kalenjin", + "km": "khmer", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "koreansk", + "koi": "komi-permjakisk", + "kok": "konkani", + "kos": "kosraean", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karatjai-balkar", + "krl": "karelsk", + "kru": "kurukh", + "ks": "kashmiri", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "kölsch", + "ku": "kurdisk", + "kum": "kymyk", + "kut": "kutenaj", + "kv": "komi", + "kw": "cornisk", + "ky": "kirgisisk", + "la": "latin", + "lad": "ladino", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "luxembourgsk", + "lez": "lezghian", + "lg": "ganda", + "li": "limburgsk", + "lkt": "lakota", + "ln": "lingala", + "lo": "lao", + "lol": "mongo", + "loz": "lozi", + "lrc": "nordluri", + "lt": "litauisk", + "lu": "luba-Katanga", + "lua": "luba-Lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "lushai", + "luy": "luyana", + "lv": "lettisk", + "mad": "madurese", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makasar", + "man": "mandingo", + "mas": "masai", + "mde": "maba", + "mdf": "moksha", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "morisyen", + "mg": "malagassisk", + "mga": "middelirsk", + "mgh": "makhuwa-meetto", + "mgo": "meta", + "mh": "marshallese", + "mi": "maori", + "mic": "micmac", + "min": "minangkabau", + "mk": "makedonsk", + "ml": "malayalam", + "mn": "mongolsk", + "mnc": "manchu", + "mni": "manipuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "marathisk", + "ms": "malajisk", + "mt": "maltesisk", + "mua": "mundang", + "mul": "flere sprog", + "mus": "creek", + "mwl": "mirandesisk", + "mwr": "marwari", + "my": "burmesisk", + "mye": "myene", + "myv": "erzya", + "mzn": "mazenisk", + "na": "nauru", + "nan": "min-kinesisk", + "nap": "neapolitansk", + "naq": "nama", + "nb": "norsk bokmÃ¥l", + "nd": "nordndebele", + "nds": "nedertysk", + "ne": "nepalesisk", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niueansk", + "nl": "hollandsk", + "nl_BE": "flamsk", + "nmg": "kwasio", + "nn": "nynorsk", + "nnh": "ngiemboon", + "no": "norsk", + "nog": "nogai", + "non": "oldislandsk", + "nqo": "n-ko", + "nr": "sydndebele", + "nso": "nordsotho", + "nus": "nuer", + "nv": "navajo", + "nwc": "klassisk newarisk", + "ny": "nyanja", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro-sprog", + "nzi": "nzima", + "oc": "occitansk", + "oj": "ojibwa", + "om": "oromo", + "or": "oriya", + "os": "ossetisk", + "osa": "osage", + "ota": "osmannisk tyrkisk", + "pa": "punjabisk", + "pag": "pangasinan", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauansk", + "pcm": "nigeriansk pidgin", + "peo": "oldpersisk", + "phn": "fønikisk", + "pi": "pali", + "pl": "polsk", + "pon": "ponape", + "prg": "preussisk", + "pro": "oldprovencalsk", + "ps": "pashto", + "pt": "portugisisk", + "pt_BR": "brasiliansk portugisisk", + "pt_PT": "europæisk portugisisk", + "qu": "quechua", + "quc": "quiché", + "raj": "rajasthani", + "rap": "rapanui", + "rar": "rarotonga", + "rm": "rætoromansk", + "rn": "rundi", + "ro": "rumænsk", + "ro_MD": "moldovisk", + "rof": "rombo", + "rom": "romani", + "root": "rod", + "ru": "russisk", + "rup": "arumænsk", + "rw": "kinyarwanda", + "rwk": "rwa", + "sa": "sanskrit", + "sad": "sandawe", + "sah": "yakut", + "sam": "samaritansk aramæisk", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardinsk", + "scn": "siciliansk", + "sco": "skotsk", + "sd": "sindhi", + "sdh": "sydkurdisk", + "se": "nordsamisk", + "see": "seneca", + "seh": "sena", + "sel": "selkupisk", + "ses": "koyraboro senni", + "sg": "sango", + "sga": "oldirsk", + "sh": "serbokroatisk", + "shi": "tachelhit", + "shn": "shan", + "shu": "tchadisk arabisk", + "si": "singalesisk", + "sid": "sidamo", + "sk": "slovakisk", + "sl": "slovensk", + "sm": "samoansk", + "sma": "sydsamisk", + "smj": "lulesamisk", + "smn": "enaresamisk", + "sms": "skoltesamisk", + "sn": "shona", + "snk": "soninke", + "so": "somalisk", + "sog": "sogdiansk", + "sq": "albansk", + "sr": "serbisk", + "srn": "sranan tongo", + "srr": "serer", + "ss": "swati", + "ssy": "saho", + "st": "sydsotho", + "su": "sundanesisk", + "suk": "sukuma", + "sus": "susu", + "sux": "sumerisk", + "sv": "svensk", + "sw": "swahili", + "sw_CD": "congolesisk swahili", + "swb": "shimaore", + "syc": "klassisk syrisk", + "syr": "syrisk", + "ta": "tamilsk", + "te": "telugu", + "tem": "temne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadsjikisk", + "th": "thai", + "ti": "tigrinya", + "tig": "tigre", + "tiv": "tivi", + "tk": "turkmensk", + "tkl": "tokelau", + "tl": "tagalog", + "tlh": "klingon", + "tli": "tlingit", + "tmh": "tamashek", + "tn": "tswana", + "to": "tongansk", + "tog": "nyasa tongansk", + "tpi": "tok pisin", + "tr": "tyrkisk", + "trv": "taroko", + "ts": "tsonga", + "tsi": "tsimshisk", + "tt": "tatarisk", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitiansk", + "tyv": "tuvinian", + "tzm": "centralmarokkansk tamazight", + "udm": "udmurt", + "ug": "uygurisk", + "uga": "ugaristisk", + "uk": "ukrainsk", + "umb": "umbundu", + "und": "ukendt sprog", + "ur": "urdu", + "uz": "usbekisk", + "vai": "vai", + "ve": "venda", + "vi": "vietnamesisk", + "vo": "volapyk", + "vot": "votisk", + "vun": "vunjo", + "wa": "vallonsk", + "wae": "walsertysk", + "wal": "walamo", + "war": "waray", + "was": "washo", + "wbp": "walbiri", + "wo": "wolof", + "wuu": "wu-kinesisk", + "xal": "kalmyk", + "xh": "isiXhosa", + "xog": "soga", + "yao": "yao", + "yap": "yapese", + "yav": "yangben", + "ybb": "yemba", + "yi": "jiddisch", + "yo": "yoruba", + "yue": "kantonesisk", + "za": "zhuang", + "zap": "zapotec", + "zbl": "blissymboler", + "zen": "zenaga", + "zgh": "tamazight", + "zh": "kinesisk", + "zh_Hans": "forenklet kinesisk", + "zh_Hant": "traditionelt kinesisk", + "zu": "zulu", + "zun": "zuni", + "zxx": "intet sprogligt indhold", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/de.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/de.json new file mode 100644 index 0000000000000000000000000000000000000000..d030ca22bf536491b47003b82376cb436f3dfd36 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/de.json @@ -0,0 +1,619 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "Afar", + "ab": "Abchasisch", + "ace": "Aceh", + "ach": "Acholi", + "ada": "Adangme", + "ady": "Adygeisch", + "ae": "Avestisch", + "aeb": "Tunesisches Arabisch", + "af": "Afrikaans", + "afh": "Afrihili", + "agq": "Aghem", + "ain": "Ainu", + "ak": "Akan", + "akk": "Akkadisch", + "akz": "Alabama", + "ale": "Aleutisch", + "aln": "Gegisch", + "alt": "Süd-Altaisch", + "am": "Amharisch", + "an": "Aragonesisch", + "ang": "Altenglisch", + "anp": "Angika", + "ar": "Arabisch", + "ar_001": "Modernes Hocharabisch", + "arc": "Aramäisch", + "arn": "Mapudungun", + "aro": "Araona", + "arp": "Arapaho", + "arq": "Algerisches Arabisch", + "arw": "Arawak", + "ary": "Marokkanisches Arabisch", + "arz": "Ägyptisches Arabisch", + "as": "Assamesisch", + "asa": "Asu", + "ase": "Amerikanische Gebärdensprache", + "ast": "Asturianisch", + "av": "Awarisch", + "avk": "Kotava", + "awa": "Awadhi", + "ay": "Aymara", + "az": "Aserbaidschanisch", + "ba": "Baschkirisch", + "bal": "Belutschisch", + "ban": "Balinesisch", + "bar": "Bairisch", + "bas": "Basaa", + "bax": "Bamun", + "bbc": "Batak Toba", + "bbj": "Ghomala", + "be": "Weißrussisch", + "bej": "Bedauye", + "bem": "Bemba", + "bew": "Betawi", + "bez": "Bena", + "bfd": "Bafut", + "bfq": "Badaga", + "bg": "Bulgarisch", + "bgn": "Westliches Belutschi", + "bho": "Bhodschpuri", + "bi": "Bislama", + "bik": "Bikol", + "bin": "Bini", + "bjn": "Banjaresisch", + "bkm": "Kom", + "bla": "Blackfoot", + "bm": "Bambara", + "bn": "Bengalisch", + "bo": "Tibetisch", + "bpy": "Bishnupriya", + "bqi": "Bachtiarisch", + "br": "Bretonisch", + "bra": "Braj-Bhakha", + "brh": "Brahui", + "brx": "Bodo", + "bs": "Bosnisch", + "bss": "Akoose", + "bua": "Burjatisch", + "bug": "Buginesisch", + "bum": "Bulu", + "byn": "Blin", + "byv": "Medumba", + "ca": "Katalanisch", + "cad": "Caddo", + "car": "Karibisch", + "cay": "Cayuga", + "cch": "Atsam", + "ce": "Tschetschenisch", + "ceb": "Cebuano", + "cgg": "Rukiga", + "ch": "Chamorro", + "chb": "Chibcha", + "chg": "Tschagataisch", + "chk": "Chuukesisch", + "chm": "Mari", + "chn": "Chinook", + "cho": "Choctaw", + "chp": "Chipewyan", + "chr": "Cherokee", + "chy": "Cheyenne", + "ckb": "Zentralkurdisch", + "co": "Korsisch", + "cop": "Koptisch", + "cps": "Capiznon", + "cr": "Cree", + "crh": "Krimtatarisch", + "crs": "Seychellenkreol", + "cs": "Tschechisch", + "csb": "Kaschubisch", + "cu": "Kirchenslawisch", + "cv": "Tschuwaschisch", + "cy": "Walisisch", + "da": "Dänisch", + "dak": "Dakota", + "dar": "Darginisch", + "dav": "Taita", + "de": "Deutsch", + "de_AT": "Österreichisches Deutsch", + "de_CH": "Schweizer Hochdeutsch", + "del": "Delaware", + "den": "Slave", + "dgr": "Dogrib", + "din": "Dinka", + "dje": "Zarma", + "doi": "Dogri", + "dsb": "Niedersorbisch", + "dtp": "Zentral-Dusun", + "dua": "Duala", + "dum": "Mittelniederländisch", + "dv": "Dhivehi", + "dyo": "Diola", + "dyu": "Dyula", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embu", + "ee": "Ewe", + "efi": "Efik", + "egl": "Emilianisch", + "egy": "Ägyptisch", + "eka": "Ekajuk", + "el": "Griechisch", + "elx": "Elamisch", + "en": "Englisch", + "en_AU": "Australisches Englisch", + "en_CA": "Kanadisches Englisch", + "en_GB": "Britisches Englisch", + "en_US": "Amerikanisches Englisch", + "enm": "Mittelenglisch", + "eo": "Esperanto", + "es": "Spanisch", + "es_419": "Lateinamerikanisches Spanisch", + "es_ES": "Europäisches Spanisch", + "es_MX": "Mexikanisches Spanisch", + "esu": "Zentral-Alaska-Yupik", + "et": "Estnisch", + "eu": "Baskisch", + "ewo": "Ewondo", + "ext": "Extremadurisch", + "fa": "Persisch", + "fan": "Pangwe", + "fat": "Fanti", + "ff": "Ful", + "fi": "Finnisch", + "fil": "Filipino", + "fit": "Meänkieli", + "fj": "Fidschi", + "fo": "Färöisch", + "fon": "Fon", + "fr": "Französisch", + "fr_CA": "Kanadisches Französisch", + "fr_CH": "Schweizer Französisch", + "frc": "Cajun", + "frm": "Mittelfranzösisch", + "fro": "Altfranzösisch", + "frp": "Frankoprovenzalisch", + "frr": "Nordfriesisch", + "frs": "Ostfriesisch", + "fur": "Friaulisch", + "fy": "Westfriesisch", + "ga": "Irisch", + "gaa": "Ga", + "gag": "Gagausisch", + "gan": "Gan", + "gay": "Gayo", + "gba": "Gbaya", + "gbz": "Gabri", + "gd": "Schottisches Gälisch", + "gez": "Geez", + "gil": "Kiribatisch", + "gl": "Galicisch", + "glk": "Gilaki", + "gmh": "Mittelhochdeutsch", + "gn": "Guarani", + "goh": "Althochdeutsch", + "gom": "Goa-Konkani", + "gon": "Gondi", + "gor": "Mongondou", + "got": "Gotisch", + "grb": "Grebo", + "grc": "Altgriechisch", + "gsw": "Schweizerdeutsch", + "gu": "Gujarati", + "guc": "Wayúu", + "gur": "Farefare", + "guz": "Gusii", + "gv": "Manx", + "gwi": "Kutchin", + "ha": "Haussa", + "hai": "Haida", + "hak": "Hakka", + "haw": "Hawaiisch", + "he": "Hebräisch", + "hi": "Hindi", + "hif": "Fidschi-Hindi", + "hil": "Hiligaynon", + "hit": "Hethitisch", + "hmn": "Miao", + "ho": "Hiri-Motu", + "hr": "Kroatisch", + "hsb": "Obersorbisch", + "hsn": "Xiang", + "ht": "Haiti-Kreolisch", + "hu": "Ungarisch", + "hup": "Hupa", + "hy": "Armenisch", + "hz": "Herero", + "ia": "Interlingua", + "iba": "Iban", + "ibb": "Ibibio", + "id": "Indonesisch", + "ie": "Interlingue", + "ig": "Igbo", + "ii": "Yi", + "ik": "Inupiak", + "ilo": "Ilokano", + "inh": "Inguschisch", + "io": "Ido", + "is": "Isländisch", + "it": "Italienisch", + "iu": "Inuktitut", + "izh": "Ischorisch", + "ja": "Japanisch", + "jam": "Jamaikanisch-Kreolisch", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jpr": "Jüdisch-Persisch", + "jrb": "Jüdisch-Arabisch", + "jut": "Jütisch", + "jv": "Javanisch", + "ka": "Georgisch", + "kaa": "Karakalpakisch", + "kab": "Kabylisch", + "kac": "Kachin", + "kaj": "Jju", + "kam": "Kamba", + "kaw": "Kawi", + "kbd": "Kabardinisch", + "kbl": "Kanembu", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Kabuverdianu", + "ken": "Kenyang", + "kfo": "Koro", + "kg": "Kongolesisch", + "kgp": "Kaingang", + "kha": "Khasi", + "kho": "Sakisch", + "khq": "Koyra Chiini", + "khw": "Khowar", + "ki": "Kikuyu", + "kiu": "Kirmanjki", + "kj": "Kwanyama", + "kk": "Kasachisch", + "kkj": "Kako", + "kl": "Grönländisch", + "kln": "Kalenjin", + "km": "Khmer", + "kmb": "Kimbundu", + "kn": "Kannada", + "ko": "Koreanisch", + "koi": "Komi-Permjakisch", + "kok": "Konkani", + "kos": "Kosraeanisch", + "kpe": "Kpelle", + "kr": "Kanuri", + "krc": "Karatschaiisch-Balkarisch", + "kri": "Krio", + "krj": "Kinaray-a", + "krl": "Karelisch", + "kru": "Oraon", + "ks": "Kaschmiri", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Kölsch", + "ku": "Kurdisch", + "kum": "Kumükisch", + "kut": "Kutenai", + "kv": "Komi", + "kw": "Kornisch", + "ky": "Kirgisisch", + "la": "Latein", + "lad": "Ladino", + "lag": "Langi", + "lah": "Lahnda", + "lam": "Lamba", + "lb": "Luxemburgisch", + "lez": "Lesgisch", + "lfn": "Lingua Franca Nova", + "lg": "Ganda", + "li": "Limburgisch", + "lij": "Ligurisch", + "liv": "Livisch", + "lkt": "Lakota", + "lmo": "Lombardisch", + "ln": "Lingala", + "lo": "Laotisch", + "lol": "Mongo", + "loz": "Lozi", + "lrc": "Nördliches Luri", + "lt": "Litauisch", + "ltg": "Lettgallisch", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lui": "Luiseno", + "lun": "Lunda", + "luo": "Luo", + "lus": "Lushai", + "luy": "Luhya", + "lv": "Lettisch", + "lzh": "Klassisches Chinesisch", + "lzz": "Lasisch", + "mad": "Maduresisch", + "maf": "Mafa", + "mag": "Khotta", + "mai": "Maithili", + "mak": "Makassarisch", + "man": "Malinke", + "mas": "Massai", + "mde": "Maba", + "mdf": "Mokschanisch", + "mdr": "Mandaresisch", + "men": "Mende", + "mer": "Meru", + "mfe": "Morisyen", + "mg": "Madagassisch", + "mga": "Mittelirisch", + "mgh": "Makhuwa-Meetto", + "mgo": "Meta’", + "mh": "Marschallesisch", + "mi": "Maori", + "mic": "Micmac", + "min": "Minangkabau", + "mk": "Mazedonisch", + "ml": "Malayalam", + "mn": "Mongolisch", + "mnc": "Mandschurisch", + "mni": "Meithei", + "moh": "Mohawk", + "mos": "Mossi", + "mr": "Marathi", + "mrj": "Bergmari", + "ms": "Malaiisch", + "mt": "Maltesisch", + "mua": "Mundang", + "mul": "Mehrsprachig", + "mus": "Muskogee", + "mwl": "Mirandesisch", + "mwr": "Marwari", + "mwv": "Mentawai", + "my": "Birmanisch", + "mye": "Myene", + "myv": "Ersja-Mordwinisch", + "mzn": "Masanderanisch", + "na": "Nauruisch", + "nan": "Min Nan", + "nap": "Neapolitanisch", + "naq": "Nama", + "nb": "Norwegisch BokmÃ¥l", + "nd": "Nord-Ndebele", + "nds": "Niederdeutsch", + "nds_NL": "Niedersächsisch", + "ne": "Nepalesisch", + "new": "Newari", + "ng": "Ndonga", + "nia": "Nias", + "niu": "Niue", + "njo": "Ao-Naga", + "nl": "Niederländisch", + "nl_BE": "Flämisch", + "nmg": "Kwasio", + "nn": "Norwegisch Nynorsk", + "nnh": "Ngiemboon", + "no": "Norwegisch", + "nog": "Nogai", + "non": "Altnordisch", + "nov": "Novial", + "nqo": "N’Ko", + "nr": "Süd-Ndebele", + "nso": "Nord-Sotho", + "nus": "Nuer", + "nv": "Navajo", + "nwc": "Alt-Newari", + "ny": "Nyanja", + "nym": "Nyamwezi", + "nyn": "Nyankole", + "nyo": "Nyoro", + "nzi": "Nzima", + "oc": "Okzitanisch", + "oj": "Ojibwa", + "om": "Oromo", + "or": "Oriya", + "os": "Ossetisch", + "osa": "Osage", + "ota": "Osmanisch", + "pa": "Punjabi", + "pag": "Pangasinan", + "pal": "Mittelpersisch", + "pam": "Pampanggan", + "pap": "Papiamento", + "pau": "Palau", + "pcd": "Picardisch", + "pcm": "Nigerianisches Pidgin", + "pdc": "Pennsylvaniadeutsch", + "pdt": "Plautdietsch", + "peo": "Altpersisch", + "pfl": "Pfälzisch", + "phn": "Phönizisch", + "pi": "Pali", + "pl": "Polnisch", + "pms": "Piemontesisch", + "pnt": "Pontisch", + "pon": "Ponapeanisch", + "prg": "Altpreußisch", + "pro": "Altprovenzalisch", + "ps": "Paschtu", + "pt": "Portugiesisch", + "pt_BR": "Brasilianisches Portugiesisch", + "pt_PT": "Europäisches Portugiesisch", + "qu": "Quechua", + "quc": "K’iche’", + "qug": "Chimborazo Hochland-Quechua", + "raj": "Rajasthani", + "rap": "Rapanui", + "rar": "Rarotonganisch", + "rgn": "Romagnol", + "rif": "Tarifit", + "rm": "Rätoromanisch", + "rn": "Rundi", + "ro": "Rumänisch", + "ro_MD": "Moldauisch", + "rof": "Rombo", + "rom": "Romani", + "root": "Root", + "rtm": "Rotumanisch", + "ru": "Russisch", + "rue": "Russinisch", + "rug": "Roviana", + "rup": "Aromunisch", + "rw": "Kinyarwanda", + "rwk": "Rwa", + "sa": "Sanskrit", + "sad": "Sandawe", + "sah": "Jakutisch", + "sam": "Samaritanisch", + "saq": "Samburu", + "sas": "Sasak", + "sat": "Santali", + "saz": "Saurashtra", + "sba": "Ngambay", + "sbp": "Sangu", + "sc": "Sardisch", + "scn": "Sizilianisch", + "sco": "Schottisch", + "sd": "Sindhi", + "sdc": "Sassarisch", + "sdh": "Südkurdisch", + "se": "Nordsamisch", + "see": "Seneca", + "seh": "Sena", + "sei": "Seri", + "sel": "Selkupisch", + "ses": "Koyra Senni", + "sg": "Sango", + "sga": "Altirisch", + "sgs": "Samogitisch", + "sh": "Serbo-Kroatisch", + "shi": "Taschelhit", + "shn": "Schan", + "shu": "Tschadisch-Arabisch", + "si": "Singhalesisch", + "sid": "Sidamo", + "sk": "Slowakisch", + "sl": "Slowenisch", + "sli": "Schlesisch (Niederschlesisch)", + "sly": "Selayar", + "sm": "Samoanisch", + "sma": "Südsamisch", + "smj": "Lule-Samisch", + "smn": "Inari-Samisch", + "sms": "Skolt-Samisch", + "sn": "Shona", + "snk": "Soninke", + "so": "Somali", + "sog": "Sogdisch", + "sq": "Albanisch", + "sr": "Serbisch", + "srn": "Srananisch", + "srr": "Serer", + "ss": "Swazi", + "ssy": "Saho", + "st": "Süd-Sotho", + "stq": "Saterfriesisch", + "su": "Sundanesisch", + "suk": "Sukuma", + "sus": "Susu", + "sux": "Sumerisch", + "sv": "Schwedisch", + "sw": "Suaheli", + "sw_CD": "Kongo-Swahili", + "swb": "Komorisch", + "syc": "Altsyrisch", + "syr": "Syrisch", + "szl": "Schlesisch (Wasserpolnisch)", + "ta": "Tamil", + "tcy": "Tulu", + "te": "Telugu", + "tem": "Temne", + "teo": "Teso", + "ter": "Tereno", + "tet": "Tetum", + "tg": "Tadschikisch", + "th": "Thailändisch", + "ti": "Tigrinya", + "tig": "Tigre", + "tiv": "Tiv", + "tk": "Turkmenisch", + "tkl": "Tokelauanisch", + "tkr": "Tsachurisch", + "tl": "Tagalog", + "tlh": "Klingonisch", + "tli": "Tlingit", + "tly": "Talisch", + "tmh": "Tamaseq", + "tn": "Tswana", + "to": "Tongaisch", + "tog": "Nyasa Tonga", + "tpi": "Neumelanesisch", + "tr": "Türkisch", + "tru": "Turoyo", + "trv": "Taroko", + "ts": "Tsonga", + "tsd": "Tsakonisch", + "tsi": "Tsimshian", + "tt": "Tatarisch", + "ttt": "Tatisch", + "tum": "Tumbuka", + "tvl": "Tuvaluisch", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Tahitisch", + "tyv": "Tuwinisch", + "tzm": "Zentralatlas-Tamazight", + "udm": "Udmurtisch", + "ug": "Uigurisch", + "uga": "Ugaritisch", + "uk": "Ukrainisch", + "umb": "Umbundu", + "und": "Unbekannte Sprache", + "ur": "Urdu", + "uz": "Usbekisch", + "vai": "Vai", + "ve": "Venda", + "vec": "Venetisch", + "vep": "Wepsisch", + "vi": "Vietnamesisch", + "vls": "Westflämisch", + "vmf": "Mainfränkisch", + "vo": "Volapük", + "vot": "Wotisch", + "vro": "Võro", + "vun": "Vunjo", + "wa": "Wallonisch", + "wae": "Walliserdeutsch", + "wal": "Walamo", + "war": "Waray", + "was": "Washo", + "wbp": "Warlpiri", + "wo": "Wolof", + "wuu": "Wu", + "xal": "Kalmückisch", + "xh": "Xhosa", + "xmf": "Mingrelisch", + "xog": "Soga", + "yao": "Yao", + "yap": "Yapesisch", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "Jiddisch", + "yo": "Yoruba", + "yrl": "Nheengatu", + "yue": "Kantonesisch", + "za": "Zhuang", + "zap": "Zapotekisch", + "zbl": "Bliss-Symbole", + "zea": "Seeländisch", + "zen": "Zenaga", + "zgh": "Tamazight", + "zh": "Chinesisch", + "zh_Hans": "Chinesisch (vereinfacht)", + "zh_Hant": "Chinesisch (traditionell)", + "zu": "Zulu", + "zun": "Zuni", + "zxx": "Keine Sprachinhalte", + "zza": "Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/de_AT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/de_AT.json new file mode 100644 index 0000000000000000000000000000000000000000..03a8f7d17c66064f2c1d5dca88a603a79db890bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/de_AT.json @@ -0,0 +1,18 @@ +{ + "Version": "2.1.28.73", + "Names": { + "ar_001": "modernes Hocharabisch", + "car": "karibische Sprache", + "chb": "Chibcha-Sprache", + "del": "Delawarisch", + "fur": "Friulanisch", + "ha": "Hausa", + "haw": "Hawaiianisch", + "hmn": "Miao-Sprache", + "mus": "Muskogee-Sprache", + "niu": "Niueanisch", + "pag": "Pangasinensisch", + "sh": "Serbokroatisch", + "szl": "Schlesisch" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/de_CH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/de_CH.json new file mode 100644 index 0000000000000000000000000000000000000000..a3556e398ed0215353b4fa5e86dd460fce1713aa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/de_CH.json @@ -0,0 +1,18 @@ +{ + "Version": "2.1.29.33", + "Names": { + "ace": "Aceh-Sprache", + "ach": "Acholi-Sprache", + "bas": "Basaa-Sprache", + "be": "Weissrussisch", + "bik": "Bikol-Sprache", + "bin": "Bini-Sprache", + "chb": "Chibcha-Sprache", + "din": "Dinka-Sprache", + "fan": "Pangwe-Sprache", + "gba": "Gbaya-Sprache", + "kmb": "Kimbundu-Sprache", + "mus": "Muskogee-Sprache", + "prg": "Altpreussisch" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/de_LU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/de_LU.json new file mode 100644 index 0000000000000000000000000000000000000000..062eb0bcc8bbd90503e98f12cdb7773039ac996e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/de_LU.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.99", + "Names": { + "be": "Belarussisch" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/dz.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/dz.json new file mode 100644 index 0000000000000000000000000000000000000000..0ea5c2aef194ba719c92f1b945a85042a720f445 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/dz.json @@ -0,0 +1,143 @@ +{ + "Version": "2.1.29.61", + "Names": { + "aa": "ཨ་ཕར་à½", + "ab": "ཨཱབ་à½à¼‹à½Ÿà½²à¼‹à½¡à¼‹à½", + "af": "ཨཕ་རི་ཀཱནས་à½", + "am": "ཨམ་ཧ་རིཀ་à½", + "ar": "ཨེ་ར་བིཀ་à½", + "as": "ཨ་ས་མིས་à½", + "az": "ཨ་ཛར་བྷའི་ཇཱན་à½", + "be": "བེལ་ཨ་རུས་à½", + "bg": "བཱལ་གེ་རི་ཡཱན་à½", + "bn": "བངྒ་ལ་à½", + "bo": "བོད་à½", + "bs": "བྷོས་ནི་ཡཱན་à½", + "ca": "ཀེ་ཊ་ལཱན་à½", + "cs": "ཅེཀ་à½", + "cy": "à½à½ºà½£à½¤à¼‹à½", + "da": "ཌེ་ནིཤ་à½", + "dak": "ད་ཀོ་à½à¼‹à½", + "de": "ཇཱར་མཱན་à½", + "de_AT": "ཨཱོས་ཊྲི་ཡཱན་ཇཱར་མཱན་à½", + "de_CH": "སུ་ཡིས་གི་མà½à½¼à¼‹à½¦à½ à½²à¼‹à½‡à½±à½¢à¼‹à½˜à½±à½“་à½", + "dv": "དི་བེ་ཧི་à½", + "dz": "རྫོང་à½", + "el": "གྲིཀ་à½", + "en": "ཨིང་ལིཤ་à½", + "en_AU": "ཨཱོས་ཊྲེ་ལི་ཡཱན་ཨིང་ལིཤ་à½", + "en_CA": "ཀེ་ན་ཌི་ཡཱན་ཨིང་ལིཤ་à½", + "en_GB": "བྲི་ཊིཤ་ཨིང་ལིཤ་à½", + "en_US": "ཡུ་ཨེས་ཨིང་ལིཤ་à½", + "eo": "ཨེས་པ་རཱན་à½à½¼à¼‹à½", + "es": "ཨིས་པེ་ནིཤ་à½", + "es_419": "ལེ་ཊིན་ཨ་མེ་རི་ཀཱན་གི་ཨིས་པེ་ནིཤ་à½", + "es_ES": "ཡུ་རོབ་ཀྱི་ཨིས་པེ་ནིཤ་à½", + "et": "ཨེས་ཊོ་ནི་ཡཱན་à½", + "eu": "བཱསཀ་à½", + "fa": "པར་ཤི་ཡཱན་à½", + "fi": "ཕི་ནིཤ་à½", + "fil": "ཕི་ལི་པི་ནོ་à½", + "fj": "ཕི་ཇི་ཡཱན་à½", + "fo": "ཕཱ་རོ་ཨིས་à½", + "fr": "ཕྲནཅ་à½", + "fr_CA": "ཀེ་ན་ཌི་ཡཱན་ཕྲནཅ་à½", + "fr_CH": "སུ་ཡིས་ཕྲནཅ་à½", + "fy": "ནུབ་ཕྼི་སི་ཡན་à½", + "ga": "ཨཱའི་རིཤ་à½", + "gl": "གལ་ཨིས་ཨི་ཡན་à½", + "gn": "གུ་à½à¼‹à½¢à¼‹à½“ི་à½", + "gsw": "སུ་ཡིས་ཇཱར་མཱན་à½", + "gu": "གུ་ཇ་ར་à½à½²à¼‹à½", + "ha": "ཧà½à¼‹à½¦à¼‹à½", + "haw": "ཧ་à½à¼‹à½¡à½²à½ à½²à¼‹à½", + "he": "ཧེ་བྲུ་à½", + "hi": "ཧིན་དི་à½", + "hr": "ཀྲོ་ཨེ་ཤི་ཡཱན་à½", + "ht": "ཧེ་à½à½²à¼‹à½¡à½±à½“་à½", + "hu": "ཧཱང་གྷ་རི་ཡཱན་à½", + "hy": "ཨར་མི་ནི་ཡཱན་à½", + "id": "ཨིན་ཌོ་ནེ་ཤི་ཡཱན་à½", + "ig": "ཨིག་བོ་à½", + "is": "ཨ་ཡིས་ལེན་ཌིཀ་à½", + "it": "ཨི་ཊ་ལི་ཡཱན་à½", + "ja": "ཇཱ་པཱ་ནིས་à½", + "jv": "ཇཱ་བ་ནིས་à½", + "ka": "ཇཽ་ཇི་ཡཱན་à½", + "kac": "ཀ་ཆིན་à½", + "kfo": "ཀོ་རོ་à½", + "kk": "ཀ་ཛགས་à½", + "km": "à½à½ºà¼‹à½˜à½ºà½¢à¼‹à½", + "kn": "ཀ་ན་ཌ་à½", + "ko": "ཀོ་རི་ཡཱན་à½", + "ks": "ཀཱཤ་མི་རི་à½", + "ku": "ཀར་ཌིཤ་à½", + "ky": "ཀིར་གིས་à½", + "la": "ལེ་ཊིན་à½", + "lb": "ལག་ཛམ་བོརྒ་à½", + "lo": "ལཱ་à½à½¼à½¦à¼‹à½", + "lt": "ལི་à½à½´à¼‹à½à½ºà¼‹à½“ི་ཡཱན་à½", + "lv": "ལཊ་བི་ཡཱན་à½", + "mg": "མ་ལ་ག་སི་à½", + "mi": "མ་ཨོ་རི་à½", + "mk": "མ་སེ་ཌོ་ནི་ཡཱན་à½", + "ml": "མ་ལ་ཡ་ལམ་à½", + "mnc": "མན་ཇུ་à½", + "mr": "མ་ར་à½à½²à¼‹à½", + "ms": "མ་ལེ་à½", + "mt": "མཱལ་ཊ་à½", + "my": "བར་མིས་à½", + "nb": "ནོར་à½à½ºà¼‹à½‡à½²à¼‹à½¡à½±à½“་བོཀ་མཱལ་à½", + "ne": "ནེ་པཱལི་à½", + "nl": "ཌཆ་à½", + "nl_BE": "ཕྷེལེ་མིཤ་à½", + "nn": "ནོར་à½à½ºà¼‹à½‡à½²à¼‹à½¡à½±à½“་ནོརསཀ་à½", + "no": "ནོར་à½à½²à¼‹à½‡à½²à¼‹à½¡à½“་à½", + "or": "ཨོ་རི་ཡ་à½", + "pa": "པཱན་ཇ་བི་à½", + "pl": "པོ་ལིཤ་à½", + "ps": "པཱཤ་à½à½¼à¼‹à½", + "pt": "པོར་ཅུ་གིས་à½", + "pt_BR": "བྲ་ཛི་ལི་ཡཱན་པོར་ཅུ་གིས་à½", + "pt_PT": "ཨི་བེ་རི་ཡཱན་པོར་ཅུ་གིས་à½", + "qu": "ཀྭེ་ཆུ་ཨ་à½", + "rm": "རོ་མེ་ནིཤ་à½", + "ro": "རོ་མེ་ནི་ཡཱན་à½", + "ru": "ཨུ་རུ་སུའི་à½", + "sa": "སཾསà¾à¾²à¾€à½à¼‹à½", + "sd": "སིན་དཱི་à½", + "shn": "ཤཱན་à½", + "si": "སིང་ཧ་ལ་à½", + "sk": "སུ་ལོ་བཱཀ་à½", + "sl": "སུ་ལོ་བི་ནི་ཡཱན་à½", + "so": "སོ་མ་ལི་à½", + "sq": "ཨཱལ་བེ་ནི་ཡཱན་à½", + "sr": "སཱར་བྷི་ཡཱན་à½", + "su": "སཱུན་ད་ནིས་à½", + "sv": "སུའི་ཌིཤ་à½", + "sw": "སྭཱ་ཧི་ལི་à½", + "ta": "à½à¼‹à½˜à½²à½£à¼‹à½", + "te": "à½à½ºà¼‹à½£à½´à¼‹à½‚ུ་à½", + "tg": "à½à¼‹à½‡à½²à½€à¼‹à½", + "th": "à½à½±à½ à½²à¼‹à½", + "ti": "à½à½²à½‚་རི་ཉ་à½", + "tk": "ཊཱརཀ་མེན་à½", + "to": "ཊོང་གྷན་à½", + "tr": "ཊཱར་ཀིཤ་à½", + "tt": "ཊ་ཊར་à½", + "ug": "à½à½²à¼‹à½‚ུར་à½", + "uk": "ཡུ་ཀེ་རེ་ནི་ཡཱན་à½", + "und": "à½à¼‹à½„ོ་མ་ཤེསཔ", + "ur": "ཨུར་དུ་à½", + "uz": "ཨུས་བེཀ་à½", + "vi": "བེཊ་ནཱ་མིས་à½", + "wo": "à½à½¼à¼‹à½£à½¼à½•་à½", + "xh": "ཞོ་ས་à½", + "yo": "ཡོ་རུ་བ་à½", + "zh": "རྒྱ་མི་à½", + "zh_Hans": "རྒྱ་མི་à½à¼‹à½ à½‡à½˜à¼‹à½¦à½„མ", + "zh_Hant": "སྔ་དུས་ཀྱི་རྒྱ་མི་à½", + "zu": "ཟུ་ལུ་à½", + "zxx": "སà¾à½‘་རིག་ནང་དོན་མེདཔ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ee.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ee.json new file mode 100644 index 0000000000000000000000000000000000000000..c901b192dafd3889897ddd0c41c9ce9abe17ba6f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ee.json @@ -0,0 +1,178 @@ +{ + "Version": "2.1.28.76", + "Names": { + "ab": "abkhaziagbe", + "af": "afrikaangbe", + "agq": "aghemgbe", + "ak": "blugbe", + "am": "amhariagbe", + "ar": "Arabiagbe", + "as": "assamegbe", + "asa": "asagbe", + "ay": "aymargbe", + "az": "azerbaijangbe", + "be": "belarusiagbe", + "bem": "bembagbe", + "bez": "benagbe", + "bg": "bulgariagbe", + "bm": "bambaragbe", + "bn": "Bengaligbe", + "bo": "tibetagbe", + "br": "bretongbe", + "brx": "bodogbe", + "bs": "bosniagbe", + "ca": "katalagbe", + "cs": "tsÉ›kgbe", + "cy": "walesgbe", + "da": "denmarkgbe", + "de": "Germaniagbe", + "de_AT": "Germaniagbe (Austria)", + "de_CH": "Germaniagbe (Switzerland)", + "dv": "divehgbe", + "dz": "dzongkhagbe", + "ebu": "embugbe", + "ee": "EÊ‹egbe", + "efi": "efigbe", + "el": "grisigbe", + "en": "Yevugbe", + "en_AU": "Yevugbe (Australia)", + "en_CA": "Yevugbe (Canada)", + "en_GB": "Yevugbe (Britain)", + "en_US": "Yevugbe (America)", + "eo": "esperantogbe", + "es": "Spanishgbe", + "es_419": "Spanishgbe (Latin America)", + "es_ES": "Spanishgbe (Europe)", + "es_MX": "Spanishgbe (Mexico)", + "et": "estoniagbe", + "eu": "basqugbe", + "fa": "persiagbe", + "fi": "finlanÉ–gbe", + "fil": "filipingbe", + "fj": "fidzigbe", + "fr": "Fransegbe", + "fr_CA": "Fransegbe (Canada)", + "fr_CH": "Fransegbe (Switzerland)", + "ga": "irelanÉ–gbe", + "gl": "galatagbe", + "gn": "guarangbe", + "gsw": "swizerlanÉ–tÉ”wo Æ’e germaniagbe", + "gu": "gujarati", + "ha": "hausagbe", + "haw": "hawaigbe", + "he": "hebrigbe", + "hi": "Hindigbe", + "hr": "kroatiagbe", + "ht": "haitigbe", + "hu": "hungarigbe", + "hy": "armeniagbe", + "id": "Indonesiagbe", + "ig": "igbogbe", + "is": "icelanÉ–gbe", + "it": "Italiagbe", + "ja": "Japangbe", + "jv": "dzavangbe", + "ka": "gÉ”giagbe", + "kea": "cape verdegbe", + "kk": "kazakhstangbe", + "km": "khmergbe", + "kn": "kannadagbe", + "ko": "Koreagbe", + "ks": "kashmirgbe", + "ku": "kurdiagbe", + "ky": "kirghistangbe", + "la": "latin", + "lah": "lahndagbe", + "lb": "laksembÉ”ggbe", + "ln": "lingala", + "lo": "laogbe", + "lt": "lithuaniagbe", + "luy": "luyiagbe", + "lv": "latviagbe", + "mg": "malagasegbe", + "mi": "maorgbe", + "mk": "makedoniagbe", + "ml": "malayagbe", + "mn": "mongoliagbe", + "mr": "marathiagbe", + "ms": "malaygbe", + "mt": "maltagbe", + "mul": "gbegbÉ”gblÉ” sÉ”gbÉ”wo", + "my": "burmagbe", + "nb": "nÉ”weigbe bokmÃ¥l", + "nd": "dziehe ndebelegbe", + "ne": "nepalgbe", + "nl": "Hollandgbe", + "nl_BE": "Flemishgbe", + "nn": "nÉ”weigbe ninÉ”sk", + "no": "nÉ”weigbe", + "nso": "dziehe sothogbe", + "ny": "nyanjagbe", + "or": "oriyagbe", + "os": "ossetiagbe", + "pa": "pundzabgbe", + "pl": "Polishgbe", + "ps": "pashtogbe", + "pt": "Portuguesegbe", + "pt_BR": "Portuguesegbe (Brazil)", + "pt_PT": "Portuguesegbe (Europe)", + "qu": "kwetsuagbe", + "rm": "romanshgbe", + "rn": "rundigbe", + "ro": "romaniagbe", + "rof": "rombogbe", + "ru": "Russiagbe", + "rw": "ruwandagbe", + "rwk": "rwagbe", + "sa": "sanskrigbe", + "sah": "sakagbe", + "sd": "sindhgbe", + "se": "dziehe samigbe", + "sg": "sangogbe", + "sh": "serbo-croatiagbe", + "si": "sinhalgbe", + "sk": "slovakiagbe", + "sl": "sloveniagbe", + "sm": "samoagbe", + "sn": "shonagbe", + "so": "somaliagbe", + "sq": "albaniagbe", + "sr": "serbiagbe", + "ss": "swatgbe", + "st": "anyiehe sothogbe", + "sv": "swedengbe", + "sw": "swahili", + "swb": "komorogbe", + "ta": "tamilgbe", + "te": "telegugbe", + "tet": "tetumgbe", + "tg": "tadzikistangbe", + "th": "Thailandgbe", + "ti": "tigrinyagbe", + "tk": "tÉ›kmengbe", + "tl": "tagalogbe", + "tn": "tswanagbe", + "to": "tongagbe", + "tpi": "tok pisigbe", + "tr": "Turkishgbe", + "ts": "tsongagbe", + "ty": "tahitigbe", + "ug": "uighurgbe", + "uk": "ukraingbe", + "und": "gbegbÉ”gblÉ” manya", + "ur": "urdugbe", + "uz": "uzbekistangbe", + "ve": "vendagbe", + "vi": "vietnamgbe", + "wae": "walsegbe", + "wo": "wolofgbe", + "xh": "xhosagbe", + "yo": "yorubagbe", + "yue": "cantongbe", + "zh": "Chinagbe", + "zh_Hans": "tsainagbe", + "zh_Hant": "blema tsainagbe", + "zu": "zulugbe", + "zxx": "gbegbÉ”gblÉ” manÉ”mee" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/el.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/el.json new file mode 100644 index 0000000000000000000000000000000000000000..aa3d7e1447a4c6cfcb9da3cb9dbb359cad0986ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/el.json @@ -0,0 +1,530 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "ΑφάÏ", + "ab": "Αμπχαζικά", + "ace": "Αχινίζ", + "ach": "Ακολί", + "ada": "Αντάνγκμε", + "ady": "Αντιγκέα", + "ae": "Αβεστάν", + "af": "ΑφÏικάανς", + "afh": "ΑφÏιχίλι", + "agq": "Αγκέμ", + "ain": "ΑϊνοÏ", + "ak": "Ακάν", + "akk": "Ακάντιαν", + "ale": "ΑλοÏÏ„", + "alt": "Îότια Αλαταϊκά", + "am": "ΑμαÏικά", + "an": "ΑÏαγκονικά", + "ang": "Παλαιά Αγγλικά", + "anp": "Ανγκικά", + "ar": "ΑÏαβικά", + "ar_001": "ΣÏγχÏονα Τυπικά ΑÏαβικά", + "arc": "ΑÏαμαϊκά", + "arn": "ΑÏουκάνιαν", + "arp": "ΑÏάπαχο", + "arw": "ΑÏαγουάκ", + "as": "Ασαμεζικά", + "asa": "Άσου", + "ast": "ΑστουÏιανά", + "av": "ΆβαÏικ", + "awa": "Αγουαντί", + "ay": "ΑϊμάÏα", + "az": "ΑζεÏμπαϊτζανικά", + "ba": "ΜπασκίÏ", + "bal": "ΜπαλοÏτσι", + "ban": "Μπαλινίζ", + "bas": "Μπάσα", + "bax": "ΜπαμοÏν", + "bbj": "Γκομάλα", + "be": "ΛευκοÏωσικά", + "bej": "Μπέζα", + "bem": "Μπέμπα", + "bez": "Μπένα", + "bfd": "ΜπαφοÏÏ„", + "bg": "ΒουλγαÏικά", + "bgn": "Δυτικά Μπαλοχικά", + "bho": "ΜποζποÏÏι", + "bi": "Μπισλάμα", + "bik": "Μπικόλ", + "bin": "Μπίνι", + "bkm": "Κομ", + "bla": "Σικσίκα", + "bm": "ΜπαμπάÏα", + "bn": "Μπενγκάλι", + "bo": "Θιβετιανά", + "br": "Î’Ïετονικά", + "bra": "ΜπÏατζ", + "brx": "Μπόντο", + "bs": "Βοσνιακά", + "bss": "Ακόσι", + "bua": "ΜπουÏιάτ", + "bug": "Μπουγκίζ", + "bum": "ΜπουλοÏ", + "byn": "Μπλιν", + "byv": "ΜεντοÏμπα", + "ca": "Καταλανικά", + "cad": "Κάντο", + "car": "ΚαÏίμπ", + "cay": "ΚαγιοÏγκα", + "cch": "Ατσάμ", + "ce": "Τσετσενικά", + "ceb": "Κεμπουάνο", + "cgg": "Τσίγκα", + "ch": "ΚαμόÏÏο", + "chb": "Τσίμπτσα", + "chg": "Τσαγκατάι", + "chk": "Τσουκίζι", + "chm": "ΜάÏι", + "chn": "Ιδιωματικά ΣινοÏκ", + "cho": "Τσοκτάου", + "chp": "Τσίπιουαν", + "chr": "ΤσεÏόκι", + "chy": "Σεγιέν", + "ckb": "ΚουÏδικά ΣοÏάνι", + "co": "ΚοÏσικανικά", + "cop": "Κοπτικά", + "cr": "ΚÏι", + "crh": "ΤουÏκικά ΚÏιμαίας", + "crs": "ΚÏεολικά Γαλλικά Σεϋχελλών", + "cs": "Τσεχικά", + "csb": "ΚασοÏμπιαν", + "cu": "Εκκλησιαστικά Σλαβικά", + "cv": "Τσουβασικά", + "cy": "Ουαλικά", + "da": "Δανικά", + "dak": "Îτακότα", + "dar": "ÎτάÏγκουα", + "dav": "Τάιτα", + "de": "ΓεÏμανικά", + "de_AT": "ΓεÏμανικά ΑυστÏίας", + "de_CH": "Άνω ΓεÏμανικά Ελβετίας", + "del": "ÎτέλαγουεÏ", + "den": "Σλαβικά", + "dgr": "ÎτόγκÏιμπ", + "din": "Îτίνκα", + "dje": "ΖάÏμα", + "doi": "ÎτόγκÏι", + "dsb": "Γλώσσα Κάτω Λουσατίας", + "dua": "Îτουάλα", + "dum": "Μέσα Ολλανδικά", + "dv": "Îτιβέχι", + "dyo": "Τζόλα-Φόνι", + "dyu": "ÎτογιοÏλα", + "dz": "Îτζόνγκχα", + "dzg": "Îταζάγκα", + "ebu": "Έμπου", + "ee": "Γι", + "efi": "Εφίκ", + "egy": "ΑÏχαία Αιγυπτιακά", + "eka": "ΕκατζοÏκ", + "el": "Ελληνικά", + "elx": "Ελαμάιτ", + "en": "Αγγλικά", + "en_AU": "Αγγλικά ΑυστÏαλίας", + "en_CA": "Αγγλικά Καναδά", + "en_GB": "Αγγλικά Ηνωμένου Βασιλείου", + "en_US": "Αγγλικά ΑμεÏικής", + "enm": "Μέσα Αγγλικά", + "eo": "ΕσπεÏάντο", + "es": "Ισπανικά", + "es_419": "Ισπανικά Λατινικής ΑμεÏικής", + "es_ES": "Ισπανικά ΕυÏώπης", + "es_MX": "Ισπανικά ΜεξικοÏ", + "et": "Εσθονικά", + "eu": "Βασκικά", + "ewo": "Εγουόντο", + "fa": "ΠεÏσικά", + "fan": "Φανγκ", + "fat": "Φάντι", + "ff": "Φουλάχ", + "fi": "Φινλανδικά", + "fil": "Φιλιππινεζικά", + "fj": "Φίτζι", + "fo": "ΦαÏόε", + "fon": "Φον", + "fr": "Γαλλικά", + "fr_CA": "Γαλλικά Καναδά", + "fr_CH": "Γαλλικά Ελβετίας", + "frm": "Μέσα Γαλλικά", + "fro": "Παλαιά Γαλλικά", + "frr": "Î’ÏŒÏεια ΦÏιζιανά", + "frs": "Ανατολικά ΦÏιζιανά", + "fur": "ΦÏιοÏλιαν", + "fy": "Δυτικά ΦÏιζιανά", + "ga": "ΙÏλανδικά", + "gaa": "Γκα", + "gag": "Γκαγκάουζ", + "gay": "Γκάγιο", + "gba": "Γκμπάγια", + "gd": "Σκωτικά Κελτικά", + "gez": "Γκιζ", + "gil": "ΓκιλμπεÏτίζ", + "gl": "Γαλικιανά", + "gmh": "Μέσα Άνω ΓεÏμανικά", + "gn": "ΓκουαÏανί", + "goh": "Παλαιά Άνω ΓεÏμανικά", + "gon": "Γκόντι", + "gor": "ΓκοÏοντάλο", + "got": "Γοτθικά", + "grb": "ΓκÏίμπο", + "grc": "ΑÏχαία Ελληνικά", + "gsw": "ΓεÏμανικά Ελβετίας", + "gu": "ΓκουγιαÏάτι", + "guz": "ΓκοÏσι", + "gv": "Μανξ", + "gwi": "Γκουίτσιν", + "ha": "Χάουσα", + "hai": "Χάιντα", + "haw": "Χαβανεζικά", + "he": "ΕβÏαϊκά", + "hi": "Χίντι", + "hil": "Χιλιγκαγιόν", + "hit": "Χιτίτε", + "hmn": "Χμονγκ", + "ho": "ΧίÏι Μότου", + "hr": "ΚÏοατικά", + "hsb": "Γλώσσα Άνω Λουσατίας", + "ht": "Αϊτιανά", + "hu": "ΟυγγÏικά", + "hup": "ΧοÏπα", + "hy": "ΑÏμενικά", + "hz": "ΧεÏέÏο", + "ia": "ΙντεÏλίνγκουα", + "iba": "Ιμπάν", + "ibb": "Ιμπίμπιο", + "id": "Ινδονησιακά", + "ie": "ΙντεÏλίνγκουε", + "ig": "Ίγκμπο", + "ii": "Σικουάν Γι", + "ik": "Ινουπιάκ", + "ilo": "Ιλόκο", + "inh": "ΙνγκοÏÏ‚", + "io": "Ίντο", + "is": "Ισλανδικά", + "it": "Ιταλικά", + "iu": "ΙνουκτιτοÏÏ„", + "ja": "Ιαπωνικά", + "jbo": "Λόζμπαν", + "jgo": "Îγκόμπα", + "jmc": "Μάχαμε", + "jpr": "Ιουδαϊκά-ΠεÏσικά", + "jrb": "Ιουδαϊκά-ΑÏαβικά", + "jv": "Ιαβανεζικά", + "ka": "ΓεωÏγιανά", + "kaa": "ΚάÏα-Καλπάκ", + "kab": "Καμπίλε", + "kac": "Κατσίν", + "kaj": "Τζου", + "kam": "Κάμπα", + "kaw": "Κάουι", + "kbd": "ΚαμπαÏντιανά", + "kbl": "Κανέμπου", + "kcg": "Τιάπ", + "kde": "Μακόντε", + "kea": "Γλώσσα του ΠÏάσινου ΑκÏωτηÏίου", + "kfo": "ΚόÏο", + "kg": "Κονγκό", + "kha": "Κάσι", + "kho": "Κοτανικά", + "khq": "ΚόιÏα Τσίνι", + "ki": "ΚικοÏγιου", + "kj": "Κουανιγιάμα", + "kk": "Καζακικά", + "kkj": "Κάκο", + "kl": "Καλαάλισουτ", + "kln": "Καλεντζίν", + "km": "Καμποτζιανά", + "kmb": "ΚιμποÏντου", + "kn": "Κανάντα", + "ko": "ΚοÏεατικά", + "koi": "Κόμι-ΠεÏμιάκ", + "kok": "Κονκάνι", + "kos": "ΚοσÏαενικά", + "kpe": "Κπέλε", + "kr": "ΚανοÏÏι", + "krc": "ΚαÏατσάι-ΜπαλκάÏ", + "krl": "ΚαÏελιακά", + "kru": "ΚουÏοÏχ", + "ks": "ΚασμίÏι", + "ksb": "Σάμπαλα", + "ksf": "Μπάφια", + "ksh": "Κολωνικά", + "ku": "ΚουÏδικά", + "kum": "ΚουμγιοÏκ", + "kut": "Κουτενάι", + "kv": "Κόμι", + "kw": "ΚόÏνις", + "ky": "ΚυÏγιζικά", + "la": "Λατινικά", + "lad": "Λαδίνο", + "lag": "Λάνγκι", + "lah": "Λάχδα", + "lam": "Λάμπα", + "lb": "ΛουξεμβουÏγιανά", + "lez": "Λαζγκιάν", + "lg": "Γκάντα", + "li": "ΛιμβουÏγιανά", + "lkt": "Λακότα", + "ln": "Λινγκάλα", + "lo": "Λαοθιανά", + "lol": "Μόνγκο", + "loz": "Λόζι", + "lrc": "Î’ÏŒÏεια ΛοÏÏι", + "lt": "Λιθουανικά", + "lu": "ΛοÏμπα-Κατάνγκα", + "lua": "ΛοÏμπα-ΛουλοÏα", + "lui": "Λουισένο", + "lun": "ΛοÏντα", + "luo": "ΛοÏο", + "lus": "Λουσάι", + "luy": "Λουχία", + "lv": "Λετονικά", + "mad": "ΜαντουÏίζ", + "maf": "Μάφα", + "mag": "Μαγκάχι", + "mai": "Μαϊτχίλι", + "mak": "ΜακαζάÏ", + "man": "Μαντίνγκο", + "mas": "Μασάι", + "mde": "Μάμπα", + "mdf": "Μόκσα", + "mdr": "ΜανδάÏ", + "men": "Μέντε", + "mer": "ΜεÏοÏ", + "mfe": "ΜοÏίσιεν", + "mg": "Μαλαγάσι", + "mga": "Μέσα ΙÏλανδικά", + "mgh": "ΜακοÏβα-Μέτο", + "mgo": "Μετά", + "mh": "ΜάÏσαλ", + "mi": "ΜάοÏι", + "mic": "Μικμάκ", + "min": "Μινανγκαμπάου", + "mk": "Σλαβομακεδονικά", + "ml": "Μαλαγιαλάμ", + "mn": "Μογγολικά", + "mnc": "ΜαντσοÏ", + "mni": "ΜανιποÏÏι", + "moh": "Μοχόκ", + "mos": "Μόσι", + "mr": "ΜαÏάθι", + "ms": "Μαλάι", + "mt": "Μαλτεζικά", + "mua": "Μουντάνγκ", + "mul": "Πολλαπλές γλώσσες", + "mus": "ΚÏικ", + "mwl": "ΜιÏαντεζικά", + "mwr": "ΜαÏγουάÏι", + "my": "ΒιÏμανικά", + "mye": "Μιένε", + "myv": "ΈÏζυα", + "mzn": "ΜαζαντεÏάνι", + "na": "ÎαοÏÏου", + "nap": "Îαπολιτανικά", + "naq": "Îάμα", + "nb": "ÎοÏβηγικά Μποκμάλ", + "nd": "Î’ÏŒÏεια Îτεμπέλε", + "nds": "Κάτω ΓεÏμανικά", + "nds_NL": "Κάτω ΓεÏμανικά Ολλανδίας", + "ne": "Îεπάλι", + "new": "ÎεγουάÏι", + "ng": "Îτόνγκα", + "nia": "Îίας", + "niu": "ÎιοÏεαν", + "nl": "Ολλανδικά", + "nl_BE": "Φλαμανδικά", + "nmg": "Κβάσιο", + "nn": "ÎοÏβηγικά ÎινόÏσκ", + "nnh": "ÎγκιεμποÏν", + "no": "ÎοÏβηγικά", + "nog": "Îογκάι", + "non": "Παλαιά ÎοÏβηγικά", + "nqo": "Î’Κο", + "nr": "Îότια Îτέμπελε", + "nso": "Î’ÏŒÏεια Σόθο", + "nus": "ÎουέÏ", + "nv": "Îάβαχο", + "nwc": "Κλασικά ÎεουάÏι", + "ny": "Îιάντζα", + "nym": "Îιαμγουέζι", + "nyn": "Îιανκόλε", + "nyo": "ÎιόÏο", + "nzi": "Îζίμα", + "oc": "Οξιτανικά", + "oj": "Οζιβίγουα", + "om": "ΟÏόμο", + "or": "ΟÏίγια", + "os": "Οσετικά", + "osa": "Οσάζ", + "ota": "Οθωμανικά ΤουÏκικά", + "pa": "Παντζαπικά", + "pag": "Πανγκασινάν", + "pal": "Παχλάβι", + "pam": "Παμπάνγκα", + "pap": "Παπιαμέντο", + "pau": "Παλάουαν", + "pcm": "Πίτζιν ÎιγηÏίας", + "peo": "ΑÏχαία ΠεÏσικά", + "phn": "Φοινικικά", + "pi": "Πάλι", + "pl": "Πολωνικά", + "pon": "Πομπηικά", + "prg": "ΠÏωσικά", + "pro": "Παλαιά ΠÏοβανσάλ", + "ps": "Πάστο", + "pt": "ΠοÏτογαλικά", + "pt_BR": "ΠοÏτογαλικά Î’Ïαζιλίας", + "pt_PT": "ΠοÏτογαλικά ΕυÏώπης", + "qu": "ΚετσοÏα", + "quc": "Κισέ", + "raj": "Ραζασθάνι", + "rap": "ΡαπανοÏι", + "rar": "ΡαÏοτονγκάν", + "rm": "Ρομανικά", + "rn": "ΡοÏντι", + "ro": "Ρουμανικά", + "ro_MD": "Μολδαβικά", + "rof": "Ρόμπο", + "rom": "Ρομανί", + "root": "Ρουτ", + "ru": "Ρωσικά", + "rup": "ΑÏομανικά", + "rw": "ΚινιαÏβάντα", + "rwk": "Ρουά", + "sa": "ΣανσκÏιτικά", + "sad": "Σαντάγουε", + "sah": "ΓιακοÏÏ„", + "sam": "ΣαμαÏίτικα ΑÏαμαϊκά", + "saq": "ΣαμποÏÏου", + "sas": "Σασάκ", + "sat": "Σαντάλι", + "sba": "Îγκαμπέι", + "sbp": "Σάνγκου", + "sc": "ΣαÏδινικά", + "scn": "Σικελιανά", + "sco": "Σκωτικά", + "sd": "Σίντι", + "sdh": "Îότια ΚουÏδικά", + "se": "Î’ÏŒÏεια Σάμι", + "see": "Σένεκα", + "seh": "Σένα", + "sel": "ΣελκοÏÏ€", + "ses": "ΚοϊÏαμπόÏο Σένι", + "sg": "Σάνγκο", + "sga": "Παλαιά ΙÏλανδικά", + "sh": "ΣεÏβοκÏοατικά", + "shi": "Τασελχίτ", + "shn": "Σαν", + "shu": "ΑÏαβικά του Τσαντ", + "si": "Σινχαλεζικά", + "sid": "Σιντάμο", + "sk": "Σλοβακικά", + "sl": "Σλοβενικά", + "sm": "Σαμόαν", + "sma": "Îότια Σάμι", + "smj": "ΛοÏλε Σάμι", + "smn": "ΙνάÏι Σάμι", + "sms": "Σκολτ Σάμι", + "sn": "Σχόνα", + "snk": "Σονίνκε", + "so": "Σομάλι", + "sog": "Σογκντιέν", + "sq": "Αλβανικά", + "sr": "ΣεÏβικά", + "srn": "ΣÏανάν Τόνγκο", + "srr": "ΣεÏέÏ", + "ss": "Σουάτι", + "ssy": "Σάχο", + "st": "Îότια Σόθο", + "su": "Σουνδανικά", + "suk": "ΣουκοÏμα", + "sus": "ΣοÏσου", + "sux": "ΣουμεÏικά", + "sv": "Σουηδικά", + "sw": "Σουαχίλι", + "sw_CD": "Κονγκό Σουαχίλι", + "swb": "ΚομόÏÏια", + "syc": "Κλασικά ΣυÏιακά", + "syr": "ΣυÏιακά", + "ta": "Ταμίλ", + "te": "ΤελοÏγκου", + "tem": "Τίμνε", + "teo": "Τέσο", + "ter": "ΤεÏένο", + "tet": "Τέτουμ", + "tg": "Τατζικικά", + "th": "Ταϊλανδικά", + "ti": "ΤιγκÏινικά", + "tig": "ΤίγκÏε", + "tiv": "Τιβ", + "tk": "ΤουÏκμενικά", + "tkl": "Τοκελάου", + "tl": "Τάγκαλογκ", + "tlh": "Κλίνγκον", + "tli": "Τλίνγκιτ", + "tmh": "Ταμασέκ", + "tn": "Τσουάνα", + "to": "Τονγκανικά", + "tog": "Îιάσα Τόνγκα", + "tpi": "Τοκ Πισίν", + "tr": "ΤουÏκικά", + "trv": "ΤαÏόκο", + "ts": "Τσόνγκα", + "tsi": "Τσίμσιαν", + "tt": "ΤατάÏ", + "tum": "ΤουμποÏκα", + "tvl": "ΤουβαλοÏ", + "tw": "ΤοÏι", + "twq": "Τασαβάκ", + "ty": "Ταϊτιανά", + "tyv": "Τουβινικά", + "tzm": "Ταμαζίτ ΚεντÏÎ¹ÎºÎ¿Ï ÎœÎ±Ïόκο", + "udm": "ΟυντμοÏÏÏ„", + "ug": "ΟυιγουÏικά", + "uga": "ΟυγκαÏιτικά", + "uk": "ΟυκÏανικά", + "umb": "ΟυμποÏντου", + "und": "Άγνωστη γλώσσα", + "ur": "ΟυÏντοÏ", + "uz": "Ουζμπεκικά", + "vai": "Βάι", + "ve": "Βένδα", + "vi": "Βιετναμικά", + "vo": "Βόλαπικ", + "vot": "Βότικ", + "vun": "ΒοÏντζο", + "wa": "ΓουαλοÏν", + "wae": "ΒάλσεÏ", + "wal": "Γουάλαμο", + "war": "ΓουάÏει", + "was": "Γουασό", + "wbp": "ΓουαÏλπίÏι", + "wo": "Γουόλοφ", + "wuu": "wuu", + "xal": "Καλμίκ", + "xh": "Ζόσα", + "xog": "Σόγκα", + "yao": "Γιάο", + "yap": "Γιαπίζ", + "yav": "Γιανγκμπέν", + "ybb": "Γιέμπα", + "yi": "Γίντις", + "yo": "ΓιοÏοÏμπα", + "yue": "Καντονέζικα", + "za": "Ζουάνγκ", + "zap": "Ζάποτεκ", + "zbl": "ΣÏμβολα Bliss", + "zen": "Ζενάγκα", + "zgh": "Τυπικά Ταμαζίγκτ ΜαÏόκου", + "zh": "Κινεζικά", + "zh_Hans": "Απλοποιημένα Κινεζικά", + "zh_Hant": "ΠαÏαδοσιακά Κινεζικά", + "zu": "ΖουλοÏ", + "zun": "ΖοÏνι", + "zxx": "ΧωÏίς γλωσσολογικό πεÏιεχόμενο", + "zza": "Ζάζα" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/en.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/en.json new file mode 100644 index 0000000000000000000000000000000000000000..abb1d892c18f4a8754ee1968bb8ba8145611f433 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/en.json @@ -0,0 +1,621 @@ +{ + "Version": "2.1.30.50", + "Names": { + "aa": "Afar", + "ab": "Abkhazian", + "ace": "Achinese", + "ach": "Acoli", + "ada": "Adangme", + "ady": "Adyghe", + "ae": "Avestan", + "aeb": "Tunisian Arabic", + "af": "Afrikaans", + "afh": "Afrihili", + "agq": "Aghem", + "ain": "Ainu", + "ak": "Akan", + "akk": "Akkadian", + "akz": "Alabama", + "ale": "Aleut", + "aln": "Gheg Albanian", + "alt": "Southern Altai", + "am": "Amharic", + "an": "Aragonese", + "ang": "Old English", + "anp": "Angika", + "ar": "Arabic", + "ar_001": "Modern Standard Arabic", + "arc": "Aramaic", + "arn": "Mapuche", + "aro": "Araona", + "arp": "Arapaho", + "arq": "Algerian Arabic", + "ars": "Najdi Arabic", + "arw": "Arawak", + "ary": "Moroccan Arabic", + "arz": "Egyptian Arabic", + "as": "Assamese", + "asa": "Asu", + "ase": "American Sign Language", + "ast": "Asturian", + "av": "Avaric", + "avk": "Kotava", + "awa": "Awadhi", + "ay": "Aymara", + "az": "Azerbaijani", + "ba": "Bashkir", + "bal": "Baluchi", + "ban": "Balinese", + "bar": "Bavarian", + "bas": "Basaa", + "bax": "Bamun", + "bbc": "Batak Toba", + "bbj": "Ghomala", + "be": "Belarusian", + "bej": "Beja", + "bem": "Bemba", + "bew": "Betawi", + "bez": "Bena", + "bfd": "Bafut", + "bfq": "Badaga", + "bg": "Bulgarian", + "bgn": "Western Balochi", + "bho": "Bhojpuri", + "bi": "Bislama", + "bik": "Bikol", + "bin": "Bini", + "bjn": "Banjar", + "bkm": "Kom", + "bla": "Siksika", + "bm": "Bambara", + "bn": "Bangla", + "bo": "Tibetan", + "bpy": "Bishnupriya", + "bqi": "Bakhtiari", + "br": "Breton", + "bra": "Braj", + "brh": "Brahui", + "brx": "Bodo", + "bs": "Bosnian", + "bss": "Akoose", + "bua": "Buriat", + "bug": "Buginese", + "bum": "Bulu", + "byn": "Blin", + "byv": "Medumba", + "ca": "Catalan", + "cad": "Caddo", + "car": "Carib", + "cay": "Cayuga", + "cch": "Atsam", + "ce": "Chechen", + "ceb": "Cebuano", + "cgg": "Chiga", + "ch": "Chamorro", + "chb": "Chibcha", + "chg": "Chagatai", + "chk": "Chuukese", + "chm": "Mari", + "chn": "Chinook Jargon", + "cho": "Choctaw", + "chp": "Chipewyan", + "chr": "Cherokee", + "chy": "Cheyenne", + "ckb": "Central Kurdish", + "co": "Corsican", + "cop": "Coptic", + "cps": "Capiznon", + "cr": "Cree", + "crh": "Crimean Turkish", + "crs": "Seselwa Creole French", + "cs": "Czech", + "csb": "Kashubian", + "cu": "Church Slavic", + "cv": "Chuvash", + "cy": "Welsh", + "da": "Danish", + "dak": "Dakota", + "dar": "Dargwa", + "dav": "Taita", + "de": "German", + "de_AT": "Austrian German", + "de_CH": "Swiss High German", + "del": "Delaware", + "den": "Slave", + "dgr": "Dogrib", + "din": "Dinka", + "dje": "Zarma", + "doi": "Dogri", + "dsb": "Lower Sorbian", + "dtp": "Central Dusun", + "dua": "Duala", + "dum": "Middle Dutch", + "dv": "Divehi", + "dyo": "Jola-Fonyi", + "dyu": "Dyula", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embu", + "ee": "Ewe", + "efi": "Efik", + "egl": "Emilian", + "egy": "Ancient Egyptian", + "eka": "Ekajuk", + "el": "Greek", + "elx": "Elamite", + "en": "English", + "en_AU": "Australian English", + "en_CA": "Canadian English", + "en_GB": "British English", + "en_US": "American English", + "enm": "Middle English", + "eo": "Esperanto", + "es": "Spanish", + "es_419": "Latin American Spanish", + "es_ES": "European Spanish", + "es_MX": "Mexican Spanish", + "esu": "Central Yupik", + "et": "Estonian", + "eu": "Basque", + "ewo": "Ewondo", + "ext": "Extremaduran", + "fa": "Persian", + "fa_AF": "Dari", + "fan": "Fang", + "fat": "Fanti", + "ff": "Fulah", + "fi": "Finnish", + "fil": "Filipino", + "fit": "Tornedalen Finnish", + "fj": "Fijian", + "fo": "Faroese", + "fon": "Fon", + "fr": "French", + "fr_CA": "Canadian French", + "fr_CH": "Swiss French", + "frc": "Cajun French", + "frm": "Middle French", + "fro": "Old French", + "frp": "Arpitan", + "frr": "Northern Frisian", + "frs": "Eastern Frisian", + "fur": "Friulian", + "fy": "Western Frisian", + "ga": "Irish", + "gaa": "Ga", + "gag": "Gagauz", + "gan": "Gan Chinese", + "gay": "Gayo", + "gba": "Gbaya", + "gbz": "Zoroastrian Dari", + "gd": "Scottish Gaelic", + "gez": "Geez", + "gil": "Gilbertese", + "gl": "Galician", + "glk": "Gilaki", + "gmh": "Middle High German", + "gn": "Guarani", + "goh": "Old High German", + "gom": "Goan Konkani", + "gon": "Gondi", + "gor": "Gorontalo", + "got": "Gothic", + "grb": "Grebo", + "grc": "Ancient Greek", + "gsw": "Swiss German", + "gu": "Gujarati", + "guc": "Wayuu", + "gur": "Frafra", + "guz": "Gusii", + "gv": "Manx", + "gwi": "Gwichʼin", + "ha": "Hausa", + "hai": "Haida", + "hak": "Hakka Chinese", + "haw": "Hawaiian", + "he": "Hebrew", + "hi": "Hindi", + "hif": "Fiji Hindi", + "hil": "Hiligaynon", + "hit": "Hittite", + "hmn": "Hmong", + "ho": "Hiri Motu", + "hr": "Croatian", + "hsb": "Upper Sorbian", + "hsn": "Xiang Chinese", + "ht": "Haitian Creole", + "hu": "Hungarian", + "hup": "Hupa", + "hy": "Armenian", + "hz": "Herero", + "ia": "Interlingua", + "iba": "Iban", + "ibb": "Ibibio", + "id": "Indonesian", + "ie": "Interlingue", + "ig": "Igbo", + "ii": "Sichuan Yi", + "ik": "Inupiaq", + "ilo": "Iloko", + "inh": "Ingush", + "io": "Ido", + "is": "Icelandic", + "it": "Italian", + "iu": "Inuktitut", + "izh": "Ingrian", + "ja": "Japanese", + "jam": "Jamaican Creole English", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jpr": "Judeo-Persian", + "jrb": "Judeo-Arabic", + "jut": "Jutish", + "jv": "Javanese", + "ka": "Georgian", + "kaa": "Kara-Kalpak", + "kab": "Kabyle", + "kac": "Kachin", + "kaj": "Jju", + "kam": "Kamba", + "kaw": "Kawi", + "kbd": "Kabardian", + "kbl": "Kanembu", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Kabuverdianu", + "ken": "Kenyang", + "kfo": "Koro", + "kg": "Kongo", + "kgp": "Kaingang", + "kha": "Khasi", + "kho": "Khotanese", + "khq": "Koyra Chiini", + "khw": "Khowar", + "ki": "Kikuyu", + "kiu": "Kirmanjki", + "kj": "Kuanyama", + "kk": "Kazakh", + "kkj": "Kako", + "kl": "Kalaallisut", + "kln": "Kalenjin", + "km": "Khmer", + "kmb": "Kimbundu", + "kn": "Kannada", + "ko": "Korean", + "koi": "Komi-Permyak", + "kok": "Konkani", + "kos": "Kosraean", + "kpe": "Kpelle", + "kr": "Kanuri", + "krc": "Karachay-Balkar", + "kri": "Krio", + "krj": "Kinaray-a", + "krl": "Karelian", + "kru": "Kurukh", + "ks": "Kashmiri", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Colognian", + "ku": "Kurdish", + "kum": "Kumyk", + "kut": "Kutenai", + "kv": "Komi", + "kw": "Cornish", + "ky": "Kyrgyz", + "la": "Latin", + "lad": "Ladino", + "lag": "Langi", + "lah": "Lahnda", + "lam": "Lamba", + "lb": "Luxembourgish", + "lez": "Lezghian", + "lfn": "Lingua Franca Nova", + "lg": "Ganda", + "li": "Limburgish", + "lij": "Ligurian", + "liv": "Livonian", + "lkt": "Lakota", + "lmo": "Lombard", + "ln": "Lingala", + "lo": "Lao", + "lol": "Mongo", + "loz": "Lozi", + "lrc": "Northern Luri", + "lt": "Lithuanian", + "ltg": "Latgalian", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lui": "Luiseno", + "lun": "Lunda", + "luo": "Luo", + "lus": "Mizo", + "luy": "Luyia", + "lv": "Latvian", + "lzh": "Literary Chinese", + "lzz": "Laz", + "mad": "Madurese", + "maf": "Mafa", + "mag": "Magahi", + "mai": "Maithili", + "mak": "Makasar", + "man": "Mandingo", + "mas": "Masai", + "mde": "Maba", + "mdf": "Moksha", + "mdr": "Mandar", + "men": "Mende", + "mer": "Meru", + "mfe": "Morisyen", + "mg": "Malagasy", + "mga": "Middle Irish", + "mgh": "Makhuwa-Meetto", + "mgo": "Metaʼ", + "mh": "Marshallese", + "mi": "Maori", + "mic": "Mi'kmaq", + "min": "Minangkabau", + "mk": "Macedonian", + "ml": "Malayalam", + "mn": "Mongolian", + "mnc": "Manchu", + "mni": "Manipuri", + "moh": "Mohawk", + "mos": "Mossi", + "mr": "Marathi", + "mrj": "Western Mari", + "ms": "Malay", + "mt": "Maltese", + "mua": "Mundang", + "mul": "Multiple languages", + "mus": "Creek", + "mwl": "Mirandese", + "mwr": "Marwari", + "mwv": "Mentawai", + "my": "Burmese", + "mye": "Myene", + "myv": "Erzya", + "mzn": "Mazanderani", + "na": "Nauru", + "nan": "Min Nan Chinese", + "nap": "Neapolitan", + "naq": "Nama", + "nb": "Norwegian BokmÃ¥l", + "nd": "North Ndebele", + "nds": "Low German", + "nds_NL": "Low Saxon", + "ne": "Nepali", + "new": "Newari", + "ng": "Ndonga", + "nia": "Nias", + "niu": "Niuean", + "njo": "Ao Naga", + "nl": "Dutch", + "nl_BE": "Flemish", + "nmg": "Kwasio", + "nn": "Norwegian Nynorsk", + "nnh": "Ngiemboon", + "no": "Norwegian", + "nog": "Nogai", + "non": "Old Norse", + "nov": "Novial", + "nqo": "N’Ko", + "nr": "South Ndebele", + "nso": "Northern Sotho", + "nus": "Nuer", + "nv": "Navajo", + "nwc": "Classical Newari", + "ny": "Nyanja", + "nym": "Nyamwezi", + "nyn": "Nyankole", + "nyo": "Nyoro", + "nzi": "Nzima", + "oc": "Occitan", + "oj": "Ojibwa", + "om": "Oromo", + "or": "Odia", + "os": "Ossetic", + "osa": "Osage", + "ota": "Ottoman Turkish", + "pa": "Punjabi", + "pag": "Pangasinan", + "pal": "Pahlavi", + "pam": "Pampanga", + "pap": "Papiamento", + "pau": "Palauan", + "pcd": "Picard", + "pcm": "Nigerian Pidgin", + "pdc": "Pennsylvania German", + "pdt": "Plautdietsch", + "peo": "Old Persian", + "pfl": "Palatine German", + "phn": "Phoenician", + "pi": "Pali", + "pl": "Polish", + "pms": "Piedmontese", + "pnt": "Pontic", + "pon": "Pohnpeian", + "prg": "Prussian", + "pro": "Old Provençal", + "ps": "Pashto", + "pt": "Portuguese", + "pt_BR": "Brazilian Portuguese", + "pt_PT": "European Portuguese", + "qu": "Quechua", + "quc": "Kʼicheʼ", + "qug": "Chimborazo Highland Quichua", + "raj": "Rajasthani", + "rap": "Rapanui", + "rar": "Rarotongan", + "rgn": "Romagnol", + "rif": "Riffian", + "rm": "Romansh", + "rn": "Rundi", + "ro": "Romanian", + "ro_MD": "Moldavian", + "rof": "Rombo", + "rom": "Romany", + "root": "Root", + "rtm": "Rotuman", + "ru": "Russian", + "rue": "Rusyn", + "rug": "Roviana", + "rup": "Aromanian", + "rw": "Kinyarwanda", + "rwk": "Rwa", + "sa": "Sanskrit", + "sad": "Sandawe", + "sah": "Sakha", + "sam": "Samaritan Aramaic", + "saq": "Samburu", + "sas": "Sasak", + "sat": "Santali", + "saz": "Saurashtra", + "sba": "Ngambay", + "sbp": "Sangu", + "sc": "Sardinian", + "scn": "Sicilian", + "sco": "Scots", + "sd": "Sindhi", + "sdc": "Sassarese Sardinian", + "sdh": "Southern Kurdish", + "se": "Northern Sami", + "see": "Seneca", + "seh": "Sena", + "sei": "Seri", + "sel": "Selkup", + "ses": "Koyraboro Senni", + "sg": "Sango", + "sga": "Old Irish", + "sgs": "Samogitian", + "sh": "Serbo-Croatian", + "shi": "Tachelhit", + "shn": "Shan", + "shu": "Chadian Arabic", + "si": "Sinhala", + "sid": "Sidamo", + "sk": "Slovak", + "sl": "Slovenian", + "sli": "Lower Silesian", + "sly": "Selayar", + "sm": "Samoan", + "sma": "Southern Sami", + "smj": "Lule Sami", + "smn": "Inari Sami", + "sms": "Skolt Sami", + "sn": "Shona", + "snk": "Soninke", + "so": "Somali", + "sog": "Sogdien", + "sq": "Albanian", + "sr": "Serbian", + "srn": "Sranan Tongo", + "srr": "Serer", + "ss": "Swati", + "ssy": "Saho", + "st": "Southern Sotho", + "stq": "Saterland Frisian", + "su": "Sundanese", + "suk": "Sukuma", + "sus": "Susu", + "sux": "Sumerian", + "sv": "Swedish", + "sw": "Swahili", + "sw_CD": "Congo Swahili", + "swb": "Comorian", + "syc": "Classical Syriac", + "syr": "Syriac", + "szl": "Silesian", + "ta": "Tamil", + "tcy": "Tulu", + "te": "Telugu", + "tem": "Timne", + "teo": "Teso", + "ter": "Tereno", + "tet": "Tetum", + "tg": "Tajik", + "th": "Thai", + "ti": "Tigrinya", + "tig": "Tigre", + "tiv": "Tiv", + "tk": "Turkmen", + "tkl": "Tokelau", + "tkr": "Tsakhur", + "tl": "Tagalog", + "tlh": "Klingon", + "tli": "Tlingit", + "tly": "Talysh", + "tmh": "Tamashek", + "tn": "Tswana", + "to": "Tongan", + "tog": "Nyasa Tonga", + "tpi": "Tok Pisin", + "tr": "Turkish", + "tru": "Turoyo", + "trv": "Taroko", + "ts": "Tsonga", + "tsd": "Tsakonian", + "tsi": "Tsimshian", + "tt": "Tatar", + "ttt": "Muslim Tat", + "tum": "Tumbuka", + "tvl": "Tuvalu", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Tahitian", + "tyv": "Tuvinian", + "tzm": "Central Atlas Tamazight", + "udm": "Udmurt", + "ug": "Uyghur", + "uga": "Ugaritic", + "uk": "Ukrainian", + "umb": "Umbundu", + "und": "Unknown language", + "ur": "Urdu", + "uz": "Uzbek", + "vai": "Vai", + "ve": "Venda", + "vec": "Venetian", + "vep": "Veps", + "vi": "Vietnamese", + "vls": "West Flemish", + "vmf": "Main-Franconian", + "vo": "Volapük", + "vot": "Votic", + "vro": "Võro", + "vun": "Vunjo", + "wa": "Walloon", + "wae": "Walser", + "wal": "Wolaytta", + "war": "Waray", + "was": "Washo", + "wbp": "Warlpiri", + "wo": "Wolof", + "wuu": "Wu Chinese", + "xal": "Kalmyk", + "xh": "Xhosa", + "xmf": "Mingrelian", + "xog": "Soga", + "yao": "Yao", + "yap": "Yapese", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "Yiddish", + "yo": "Yoruba", + "yrl": "Nheengatu", + "yue": "Cantonese", + "za": "Zhuang", + "zap": "Zapotec", + "zbl": "Blissymbols", + "zea": "Zeelandic", + "zen": "Zenaga", + "zgh": "Standard Moroccan Tamazight", + "zh": "Chinese", + "zh_Hans": "Simplified Chinese", + "zh_Hant": "Traditional Chinese", + "zu": "Zulu", + "zun": "Zuni", + "zxx": "No linguistic content", + "zza": "Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/en_AU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/en_AU.json new file mode 100644 index 0000000000000000000000000000000000000000..a7b137689fbc93608cfaa742e171a7f302d41db8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/en_AU.json @@ -0,0 +1,7 @@ +{ + "Version": "2.1.30.50", + "Names": { + "en_US": "United States English", + "ro_MD": "Moldovan" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/en_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/en_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..f5e58a7d5a28432628df55cd3a2e19536948de6b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/en_IN.json @@ -0,0 +1,7 @@ +{ + "Version": "2.1.27.99", + "Names": { + "bn": "Bengali", + "or": "Oriya" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/en_NZ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/en_NZ.json new file mode 100644 index 0000000000000000000000000000000000000000..e2a40b0c76a63a60ab7e9992999c9109e9de3284 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/en_NZ.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "mi": "MÄori" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/eo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/eo.json new file mode 100644 index 0000000000000000000000000000000000000000..cceb705e89ac3d1c7d30131d8dac763431403fb2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/eo.json @@ -0,0 +1,158 @@ +{ + "Version": "2.1.27.40", + "Names": { + "aa": "afara", + "ab": "abÄ¥aza", + "af": "afrikansa", + "am": "amhara", + "ar": "araba", + "as": "asama", + "ay": "ajmara", + "az": "azerbajÄana", + "ba": "baÅkira", + "be": "belorusa", + "bg": "bulgara", + "bi": "bislamo", + "bn": "bengala", + "bo": "tibeta", + "br": "bretona", + "bs": "bosnia", + "ca": "kataluna", + "co": "korsika", + "cs": "ĉeÄ¥a", + "cy": "kimra", + "da": "dana", + "de": "germana", + "dv": "mahla", + "dz": "dzonko", + "efi": "ibibioefika", + "el": "greka", + "en": "angla", + "eo": "esperanto", + "es": "hispana", + "et": "estona", + "eu": "eÅ­ska", + "fa": "persa", + "fi": "finna", + "fil": "filipina", + "fj": "fiÄia", + "fo": "feroa", + "fr": "franca", + "fy": "frisa", + "ga": "irlanda", + "gd": "gaela", + "gl": "galega", + "gn": "gvarania", + "gu": "guÄarata", + "ha": "haÅ­sa", + "haw": "havaja", + "he": "hebrea", + "hi": "hinda", + "hr": "kroata", + "ht": "haitia kreola", + "hu": "hungara", + "hy": "armena", + "ia": "interlingvao", + "id": "indonezia", + "ie": "okcidentalo", + "ik": "eskima", + "is": "islanda", + "it": "itala", + "iu": "inuita", + "ja": "japana", + "jv": "java", + "ka": "kartvela", + "kk": "kazaÄ¥a", + "kl": "gronlanda", + "km": "kmera", + "kn": "kanara", + "ko": "korea", + "ks": "kaÅmira", + "ku": "kurda", + "ky": "kirgiza", + "la": "latino", + "lb": "luksemburga", + "ln": "lingala", + "lo": "laÅ­a", + "lt": "litova", + "lv": "latva", + "mg": "malagasa", + "mi": "maoria", + "mk": "makedona", + "ml": "malajalama", + "mn": "mongola", + "mr": "marata", + "ms": "malaja", + "mt": "malta", + "my": "birma", + "na": "naura", + "nb": "dannorvega", + "ne": "nepala", + "nl": "nederlanda", + "nn": "novnorvega", + "no": "norvega", + "oc": "okcitana", + "om": "oroma", + "or": "orijo", + "pa": "panÄaba", + "pl": "pola", + "ps": "paÅtoa", + "pt": "portugala", + "pt_BR": "brazilportugala", + "pt_PT": "eÅ­ropportugala", + "qu": "keĉua", + "rm": "romanĉa", + "rn": "burunda", + "ro": "rumana", + "ru": "rusa", + "rw": "ruanda", + "sa": "sanskrito", + "sd": "sinda", + "sg": "sangoa", + "sh": "serbo-Kroata", + "si": "sinhala", + "sk": "slovaka", + "sl": "slovena", + "sm": "samoa", + "sn": "Åona", + "so": "somala", + "sq": "albana", + "sr": "serba", + "ss": "svazia", + "st": "sota", + "su": "sunda", + "sv": "sveda", + "sw": "svahila", + "ta": "tamila", + "te": "telugua", + "tg": "taÄika", + "th": "taja", + "ti": "tigraja", + "tk": "turkmena", + "tl": "tagaloga", + "tlh": "klingona", + "tn": "cvana", + "to": "tongaa", + "tr": "turka", + "ts": "conga", + "tt": "tatara", + "tw": "tw", + "ug": "ujgura", + "uk": "ukraina", + "und": "nekonata lingvo", + "ur": "urduo", + "uz": "uzbeka", + "vi": "vjetnama", + "vo": "volapuko", + "wo": "volofa", + "xh": "ksosa", + "yi": "jida", + "yo": "joruba", + "za": "Äuanga", + "zh": "ĉina", + "zh_Hans": "ĉina simpligita", + "zh_Hant": "ĉina tradicia", + "zu": "zulua", + "zxx": "nelingvaĵo" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es.json new file mode 100644 index 0000000000000000000000000000000000000000..9ca4cea58a3f0da69d91587967ac59d82a6476ef --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es.json @@ -0,0 +1,534 @@ +{ + "Version": "2.1.28.80", + "Names": { + "aa": "afar", + "ab": "abjasio", + "ace": "acehnés", + "ach": "acoli", + "ada": "adangme", + "ady": "adigué", + "ae": "avéstico", + "af": "afrikáans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainu", + "ak": "akan", + "akk": "acadio", + "ale": "aleutiano", + "alt": "altái meridional", + "am": "amárico", + "an": "aragonés", + "ang": "inglés antiguo", + "anp": "angika", + "ar": "árabe", + "ar_001": "árabe estándar moderno", + "arc": "arameo", + "arn": "mapuche", + "arp": "arapaho", + "arw": "arahuaco", + "as": "asamés", + "asa": "asu", + "ast": "asturiano", + "av": "avar", + "awa": "avadhi", + "ay": "aimara", + "az": "azerbaiyano", + "ba": "baskir", + "bal": "baluchi", + "ban": "balinés", + "bas": "basaa", + "bax": "bamún", + "bbj": "ghomala", + "be": "bielorruso", + "bej": "beja", + "bem": "bemba", + "bez": "bena", + "bfd": "bafut", + "bg": "búlgaro", + "bgn": "baluchi occidental", + "bho": "bhoyapurí", + "bi": "bislama", + "bik": "bicol", + "bin": "bini", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bengalí", + "bo": "tibetano", + "br": "bretón", + "bra": "braj", + "brx": "bodo", + "bs": "bosnio", + "bss": "akoose", + "bua": "buriato", + "bug": "buginés", + "bum": "bulu", + "byn": "blin", + "byv": "medumba", + "ca": "catalán", + "cad": "caddo", + "car": "caribe", + "cay": "cayuga", + "cch": "atsam", + "ce": "checheno", + "ceb": "cebuano", + "cgg": "chiga", + "ch": "chamorro", + "chb": "chibcha", + "chg": "chagatái", + "chk": "trukés", + "chm": "marí", + "chn": "jerga chinuk", + "cho": "choctaw", + "chp": "chipewyan", + "chr": "cheroqui", + "chy": "cheyene", + "ckb": "kurdo sorani", + "co": "corso", + "cop": "copto", + "cr": "cree", + "crh": "tártaro de Crimea", + "crs": "criollo seychelense", + "cs": "checo", + "csb": "casubio", + "cu": "eslavo eclesiástico", + "cv": "chuvasio", + "cy": "galés", + "da": "danés", + "dak": "dakota", + "dar": "dargva", + "dav": "taita", + "de": "alemán", + "de_AT": "alemán austríaco", + "de_CH": "alto alemán suizo", + "del": "delaware", + "den": "slave", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "bajo sorbio", + "dua": "duala", + "dum": "neerlandés medio", + "dv": "divehi", + "dyo": "jola-fonyi", + "dyu": "diula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embu", + "ee": "ewé", + "efi": "efik", + "egy": "egipcio antiguo", + "eka": "ekajuk", + "el": "griego", + "elx": "elamita", + "en": "inglés", + "en_AU": "inglés australiano", + "en_CA": "inglés canadiense", + "en_GB": "inglés británico", + "en_US": "inglés estadounidense", + "enm": "inglés medio", + "eo": "esperanto", + "es": "español", + "es_419": "español latinoamericano", + "es_ES": "español de España", + "es_MX": "español de México", + "et": "estonio", + "eu": "euskera", + "ewo": "ewondo", + "fa": "persa", + "fan": "fang", + "fat": "fanti", + "ff": "fula", + "fi": "finés", + "fil": "filipino", + "fj": "fiyiano", + "fo": "feroés", + "fon": "fon", + "fr": "francés", + "fr_CA": "francés canadiense", + "fr_CH": "francés suizo", + "frm": "francés medio", + "fro": "francés antiguo", + "frr": "frisón septentrional", + "frs": "frisón oriental", + "fur": "friulano", + "fy": "frisón occidental", + "ga": "irlandés", + "gaa": "ga", + "gag": "gagauzo", + "gan": "chino gan", + "gay": "gayo", + "gba": "gbaya", + "gd": "gaélico escocés", + "gez": "geez", + "gil": "gilbertés", + "gl": "gallego", + "gmh": "alto alemán medio", + "gn": "guaraní", + "goh": "alto alemán antiguo", + "gon": "gondi", + "gor": "gorontalo", + "got": "gótico", + "grb": "grebo", + "grc": "griego antiguo", + "gsw": "alemán suizo", + "gu": "guyaratí", + "guz": "gusii", + "gv": "manés", + "gwi": "kutchin", + "ha": "hausa", + "hai": "haida", + "hak": "chino hakka", + "haw": "hawaiano", + "he": "hebreo", + "hi": "hindi", + "hil": "hiligaynon", + "hit": "hitita", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "croata", + "hsb": "alto sorbio", + "hsn": "chino xiang", + "ht": "criollo haitiano", + "hu": "húngaro", + "hup": "hupa", + "hy": "armenio", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonesio", + "ie": "interlingue", + "ig": "igbo", + "ii": "yi de Sichuán", + "ik": "inupiaq", + "ilo": "ilocano", + "inh": "ingush", + "io": "ido", + "is": "islandés", + "it": "italiano", + "iu": "inuktitut", + "ja": "japonés", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jpr": "judeo-persa", + "jrb": "judeo-árabe", + "jv": "javanés", + "ka": "georgiano", + "kaa": "karakalpako", + "kab": "cabila", + "kac": "kachin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardiano", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "criollo caboverdiano", + "kfo": "koro", + "kg": "kongo", + "kha": "khasi", + "kho": "kotanés", + "khq": "koyra chiini", + "ki": "kikuyu", + "kj": "kuanyama", + "kk": "kazajo", + "kkj": "kako", + "kl": "groenlandés", + "kln": "kalenjin", + "km": "jemer", + "kmb": "kimbundu", + "kn": "canarés", + "ko": "coreano", + "koi": "komi permio", + "kok": "konkaní", + "kos": "kosraeano", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karachay-balkar", + "krl": "carelio", + "kru": "kurukh", + "ks": "cachemiro", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "kölsch", + "ku": "kurdo", + "kum": "kumyk", + "kut": "kutenai", + "kv": "komi", + "kw": "córnico", + "ky": "kirguís", + "la": "latín", + "lad": "ladino", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "luxemburgués", + "lez": "lezgiano", + "lg": "ganda", + "li": "limburgués", + "lkt": "lakota", + "ln": "lingala", + "lo": "lao", + "lol": "mongo", + "loz": "lozi", + "lrc": "lorí septentrional", + "lt": "lituano", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseño", + "lun": "lunda", + "luo": "luo", + "lus": "mizo", + "luy": "luyia", + "lv": "letón", + "mad": "madurés", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "macasar", + "man": "mandingo", + "mas": "masái", + "mde": "maba", + "mdf": "moksha", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "criollo mauriciano", + "mg": "malgache", + "mga": "irlandés medio", + "mgh": "makhuwa-meetto", + "mgo": "meta’", + "mh": "marshalés", + "mi": "maorí", + "mic": "micmac", + "min": "minangkabau", + "mk": "macedonio", + "ml": "malayalam", + "mn": "mongol", + "mnc": "manchú", + "mni": "manipuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "maratí", + "ms": "malayo", + "mt": "maltés", + "mua": "mundang", + "mul": "varios idiomas", + "mus": "creek", + "mwl": "mirandés", + "mwr": "marwari", + "my": "birmano", + "mye": "myene", + "myv": "erzya", + "mzn": "mazandaraní", + "na": "nauruano", + "nan": "chino min nan", + "nap": "napolitano", + "naq": "nama", + "nb": "noruego bokmal", + "nd": "ndebele septentrional", + "nds": "bajo alemán", + "nds_NL": "bajo sajón", + "ne": "nepalí", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niueano", + "nl": "neerlandés", + "nl_BE": "flamenco", + "nmg": "kwasio", + "nn": "noruego nynorsk", + "nnh": "ngiemboon", + "no": "noruego", + "nog": "nogai", + "non": "nórdico antiguo", + "nqo": "n’ko", + "nr": "ndebele meridional", + "nso": "sesotho septentrional", + "nus": "nuer", + "nv": "navajo", + "nwc": "newari clásico", + "ny": "nyanja", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzima", + "oc": "occitano", + "oj": "ojibwa", + "om": "oromo", + "or": "oriya", + "os": "osético", + "osa": "osage", + "ota": "turco otomano", + "pa": "panyabí", + "pag": "pangasinán", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauano", + "pcm": "pidgin de Nigeria", + "peo": "persa antiguo", + "phn": "fenicio", + "pi": "pali", + "pl": "polaco", + "pon": "pohnpeiano", + "prg": "prusiano", + "pro": "provenzal antiguo", + "ps": "pastún", + "pt": "portugués", + "pt_BR": "portugués de Brasil", + "pt_PT": "portugués de Portugal", + "qu": "quechua", + "quc": "quiché", + "raj": "rajasthani", + "rap": "rapanui", + "rar": "rarotongano", + "rm": "romanche", + "rn": "kirundi", + "ro": "rumano", + "ro_MD": "moldavo", + "rof": "rombo", + "rom": "romaní", + "root": "raíz", + "ru": "ruso", + "rup": "arrumano", + "rw": "kinyarwanda", + "rwk": "rwa", + "sa": "sánscrito", + "sad": "sandawe", + "sah": "sakha", + "sam": "arameo samaritano", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardo", + "scn": "siciliano", + "sco": "escocés", + "sd": "sindhi", + "sdh": "kurdo meridional", + "se": "sami septentrional", + "see": "seneca", + "seh": "sena", + "sel": "selkup", + "ses": "koyraboro senni", + "sg": "sango", + "sga": "irlandés antiguo", + "sh": "serbocroata", + "shi": "tashelhit", + "shn": "shan", + "shu": "árabe chadiano", + "si": "cingalés", + "sid": "sidamo", + "sk": "eslovaco", + "sl": "esloveno", + "sm": "samoano", + "sma": "sami meridional", + "smj": "sami lule", + "smn": "sami inari", + "sms": "sami skolt", + "sn": "shona", + "snk": "soninké", + "so": "somalí", + "sog": "sogdiano", + "sq": "albanés", + "sr": "serbio", + "srn": "sranan tongo", + "srr": "serer", + "ss": "suazi", + "ssy": "saho", + "st": "sesotho meridional", + "su": "sundanés", + "suk": "sukuma", + "sus": "susu", + "sux": "sumerio", + "sv": "sueco", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "swb": "comorense", + "syc": "siríaco clásico", + "syr": "siriaco", + "ta": "tamil", + "te": "telugu", + "tem": "temne", + "teo": "teso", + "ter": "tereno", + "tet": "tetún", + "tg": "tayiko", + "th": "tailandés", + "ti": "tigriña", + "tig": "tigré", + "tiv": "tiv", + "tk": "turcomano", + "tkl": "tokelauano", + "tl": "tagalo", + "tlh": "klingon", + "tli": "tlingit", + "tmh": "tamashek", + "tn": "setsuana", + "to": "tongano", + "tog": "tonga del Nyasa", + "tpi": "tok pisin", + "tr": "turco", + "trv": "taroko", + "ts": "tsonga", + "tsi": "tsimshiano", + "tt": "tártaro", + "tum": "tumbuka", + "tvl": "tuvaluano", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitiano", + "tyv": "tuviniano", + "tzm": "tamazight del Atlas Central", + "udm": "udmurt", + "ug": "uigur", + "uga": "ugarítico", + "uk": "ucraniano", + "umb": "umbundu", + "und": "lengua desconocida", + "ur": "urdu", + "uz": "uzbeko", + "vai": "vai", + "ve": "venda", + "vi": "vietnamita", + "vo": "volapük", + "vot": "vótico", + "vun": "vunjo", + "wa": "valón", + "wae": "walser", + "wal": "wolayta", + "war": "waray", + "was": "washo", + "wbp": "warlpiri", + "wo": "wólof", + "wuu": "chino wu", + "xal": "kalmyk", + "xh": "xhosa", + "xog": "soga", + "yao": "yao", + "yap": "yapés", + "yav": "yangben", + "ybb": "yemba", + "yi": "yidis", + "yo": "yoruba", + "yue": "cantonés", + "za": "zhuang", + "zap": "zapoteco", + "zbl": "símbolos Bliss", + "zen": "zenaga", + "zgh": "tamazight estándar marroquí", + "zh": "chino", + "zh_Hans": "chino simplificado", + "zh_Hant": "chino tradicional", + "zu": "zulú", + "zun": "zuñi", + "zxx": "sin contenido lingüístico", + "zza": "zazaki" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_419.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_419.json new file mode 100644 index 0000000000000000000000000000000000000000..6ac93d2912d0dd71b390294e8e029a6bd15d5e3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_419.json @@ -0,0 +1,27 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "achenés", + "ady": "adigeo", + "arp": "arapajó", + "eu": "vasco", + "grc": "griego clásico", + "gu": "gujarati", + "hsb": "sorbio alto", + "ht": "haitiano", + "kea": "Criollo (Cabo Verde)", + "lo": "laosiano", + "luo": "luo", + "prg": "prusiano antiguo", + "rm": "retorrománico", + "shu": "árabe (Chad)", + "sw": "swahili", + "sw_CD": "swahili (Congo)", + "tzm": "tamazight del Marruecos Central", + "vai": "vai", + "wal": "walamo", + "wuu": "wu", + "yi": "yídish", + "zun": "zuni" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_AR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_AR.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_AR.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_BO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_BO.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_BO.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_CL.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_CL.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_CL.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_CO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_CO.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_CO.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_CR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_CR.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_CR.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_DO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_DO.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_DO.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_EC.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_EC.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_EC.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_GT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_GT.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_GT.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_HN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_HN.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_HN.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_MX.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_MX.json new file mode 100644 index 0000000000000000000000000000000000000000..e64f710c96bf8358417c443483127a4d321ccb02 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_MX.json @@ -0,0 +1,32 @@ +{ + "Version": "2.1.28.76", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "ba": "bashkir", + "bas": "basa", + "bax": "bamun", + "bho": "bhojpuri", + "dum": "neerlandés medieval", + "enm": "inglés medieval", + "eu": "euskera", + "frm": "francés medieval", + "gan": "gan (China)", + "gmh": "alemán de la alta edad media", + "grc": "griego antiguo", + "hak": "kejia (China)", + "hsn": "xiang (China)", + "lo": "lao", + "mga": "irlandés medieval", + "nan": "min nan (Chino)", + "nso": "sotho septentrional", + "pa": "punyabí", + "rn": "kiroundi", + "shu": "árabe chadiano", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_NI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_NI.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_NI.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_PA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_PA.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_PA.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_PE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_PE.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_PE.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_PR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_PR.json new file mode 100644 index 0000000000000000000000000000000000000000..12e6a0ef526ad7f719f812024987c9c8b3baa7dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_PR.json @@ -0,0 +1,12 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "grc": "griego antiguo", + "nso": "sotho septentrional", + "ss": "siswati", + "wo": "wolof" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_PY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_PY.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_PY.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_SV.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_SV.json new file mode 100644 index 0000000000000000000000000000000000000000..12e6a0ef526ad7f719f812024987c9c8b3baa7dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_SV.json @@ -0,0 +1,12 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "grc": "griego antiguo", + "nso": "sotho septentrional", + "ss": "siswati", + "wo": "wolof" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_US.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_US.json new file mode 100644 index 0000000000000000000000000000000000000000..e9ff9dbc3b5b9777184a830afd556eb04f97b870 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_US.json @@ -0,0 +1,31 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bas": "basa", + "bax": "bamun", + "bho": "bhojpuri", + "bua": "buriat", + "dum": "neerlandés medieval", + "enm": "inglés medieval", + "frm": "francés medieval", + "gmh": "alemán de la alta edad media", + "grc": "griego antiguo", + "hak": "hak", + "hsb": "alto sorbio", + "kea": "criollo caboverdiano", + "lus": "lushai", + "mga": "irlandés medieval", + "nan": "nan", + "nso": "sotho septentrional", + "pcm": "pcm", + "rn": "kiroundi", + "shu": "árabe chadiano", + "ss": "siswati", + "sw_CD": "swahili del Congo", + "tn": "setchwana", + "wo": "wolof", + "wuu": "wuu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_VE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_VE.json new file mode 100644 index 0000000000000000000000000000000000000000..0e0d965f5a2894ff1dbf2023d61a7de0459ba131 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/es_VE.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ace": "acehnés", + "arp": "arapaho", + "bho": "bhojpuri", + "eu": "euskera", + "grc": "griego antiguo", + "lo": "lao", + "nso": "sotho septentrional", + "pa": "punyabí", + "ss": "siswati", + "sw": "suajili", + "sw_CD": "suajili del Congo", + "tn": "setswana", + "wo": "wolof", + "zgh": "tamazight marroquí estándar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/et.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/et.json new file mode 100644 index 0000000000000000000000000000000000000000..925b616e27d20ce3f71bee7102f6b2c04daada48 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/et.json @@ -0,0 +1,610 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afari", + "ab": "abhaasi", + "ace": "atÅ¡ehi", + "ach": "atÅ¡oli", + "ada": "adangme", + "ady": "adõgee", + "ae": "avesta", + "aeb": "Tuneesia araabia", + "af": "afrikaani", + "afh": "afrihili", + "agq": "aghemi", + "ain": "ainu", + "ak": "akani", + "akk": "akadi", + "akz": "alabama", + "ale": "aleuudi", + "aln": "geegi", + "alt": "altai", + "am": "amhara", + "an": "aragoni", + "ang": "vanainglise", + "anp": "angika", + "ar": "araabia", + "ar_001": "araabia (tänapäevane)", + "arc": "aramea", + "arn": "mapudunguni", + "aro": "araona", + "arp": "arapaho", + "arq": "Alžeeria araabia", + "arw": "aravaki", + "ary": "Maroko araabia", + "arz": "Egiptuse araabia", + "as": "assami", + "asa": "asu", + "ase": "Ameerika viipekeel", + "ast": "astuuria", + "av": "avaari", + "awa": "avadhi", + "ay": "aimara", + "az": "aserbaidžaani", + "ba": "baÅ¡kiiri", + "bal": "belutÅ¡i", + "ban": "bali", + "bar": "baieri", + "bas": "basa", + "bax": "bamuni", + "bbc": "bataki", + "bbj": "ghomala", + "be": "valgevene", + "bej": "bedža", + "bem": "bemba", + "bew": "betavi", + "bez": "bena", + "bfd": "bafuti", + "bfq": "badaga", + "bg": "bulgaaria", + "bgn": "läänebelutÅ¡i", + "bho": "bhodžpuri", + "bi": "bislama", + "bik": "bikoli", + "bin": "edo", + "bjn": "bandžari", + "bkm": "komi (Aafrika)", + "bla": "mustjalaindiaani", + "bm": "bambara", + "bn": "bengali", + "bo": "tiibeti", + "bpy": "biÅ¡nuprija", + "bqi": "bahtiari", + "br": "bretooni", + "bra": "bradži", + "brh": "brahui", + "brx": "bodo", + "bs": "bosnia", + "bss": "akoose", + "bua": "burjaadi", + "bug": "bugi", + "bum": "bulu", + "byn": "bilini", + "byv": "medumba", + "ca": "katalaani", + "cad": "kado", + "car": "kariibi", + "cay": "kajuka", + "cch": "atsami", + "ce": "tÅ¡etÅ¡eeni", + "ceb": "sebu", + "cgg": "tÅ¡iga", + "ch": "tÅ¡amorro", + "chb": "tÅ¡ibtÅ¡a", + "chg": "tÅ¡agatai", + "chk": "tÅ¡uugi", + "chm": "mari", + "chn": "tÅ¡inuki žargoon", + "cho": "tÅ¡okto", + "chp": "tÅ¡ipevai", + "chr": "tÅ¡erokii", + "chy": "Å¡aieeni", + "ckb": "sorani", + "co": "korsika", + "cop": "kopti", + "cps": "kapisnoni", + "cr": "krii", + "crh": "krimmitatari", + "crs": "seiÅ¡elli", + "cs": "tÅ¡ehhi", + "csb": "kaÅ¡uubi", + "cu": "kirikuslaavi", + "cv": "tÅ¡uvaÅ¡i", + "cy": "kõmri", + "da": "taani", + "dak": "siuu", + "dar": "dargi", + "dav": "davida", + "de": "saksa", + "de_AT": "Austria saksa", + "de_CH": "Å veitsi ülemsaksa", + "del": "delavari", + "den": "sleivi", + "dgr": "dogribi", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "alamsorbi", + "dtp": "keskdusuni", + "dua": "duala", + "dum": "keskhollandi", + "dv": "maldiivi", + "dyo": "fonji", + "dyu": "djula", + "dz": "dzongkha", + "dzg": "daza", + "ebu": "embu", + "ee": "eve", + "efi": "efiki", + "egl": "emiilia", + "egy": "egiptuse", + "eka": "ekadžuki", + "el": "kreeka", + "elx": "eelami", + "en": "inglise", + "en_AU": "Austraalia inglise", + "en_CA": "Kanada inglise", + "en_GB": "Briti inglise", + "en_US": "Ameerika inglise", + "enm": "keskinglise", + "eo": "esperanto", + "es": "hispaania", + "es_419": "Ladina-Ameerika hispaania", + "es_ES": "Euroopa hispaania", + "es_MX": "Mehhiko hispaania", + "esu": "keskjupiki", + "et": "eesti", + "eu": "baski", + "ewo": "evondo", + "ext": "estremenju", + "fa": "pärsia", + "fan": "fangi", + "fat": "fanti", + "ff": "fula", + "fi": "soome", + "fil": "filipiini", + "fit": "meä", + "fj": "fidži", + "fo": "fääri", + "fon": "foni", + "fr": "prantsuse", + "fr_CA": "Kanada prantsuse", + "fr_CH": "Å veitsi prantsuse", + "frc": "cajun’i", + "frm": "keskprantsuse", + "fro": "vanaprantsuse", + "frp": "frankoprovansi", + "frr": "põhjafriisi", + "frs": "idafriisi", + "fur": "friuuli", + "fy": "läänefriisi", + "ga": "iiri", + "gaa": "gaa", + "gag": "gagauusi", + "gan": "kani", + "gay": "gajo", + "gba": "gbaja", + "gd": "gaeli", + "gez": "etioopia", + "gil": "kiribati", + "gl": "galeegi", + "glk": "gilaki", + "gmh": "keskülemsaksa", + "gn": "guaranii", + "goh": "vanaülemsaksa", + "gon": "gondi", + "gor": "gorontalo", + "got": "gooti", + "grb": "grebo", + "grc": "vanakreeka", + "gsw": "Å¡veitsisaksa", + "gu": "gudžarati", + "guc": "vajuu", + "gur": "farefare", + "guz": "gusii", + "gv": "mänksi", + "gwi": "gvitÅ¡ini", + "ha": "hausa", + "hai": "haida", + "hak": "hakka", + "haw": "havai", + "he": "heebrea", + "hi": "hindi", + "hif": "Fidži hindi", + "hil": "hiligainoni", + "hit": "heti", + "hmn": "hmongi", + "ho": "hirimotu", + "hr": "horvaadi", + "hsb": "ülemsorbi", + "hsn": "sjangi", + "ht": "haiti", + "hu": "ungari", + "hup": "hupa", + "hy": "armeenia", + "hz": "herero", + "ia": "interlingua", + "iba": "ibani", + "ibb": "ibibio", + "id": "indoneesia", + "ie": "interlingue", + "ig": "ibo", + "ii": "Sichuani jii", + "ik": "injupiaki", + "ilo": "iloko", + "inh": "inguÅ¡i", + "io": "ido", + "is": "islandi", + "it": "itaalia", + "iu": "inuktituti", + "izh": "isuri", + "ja": "jaapani", + "jam": "Jamaica kreoolkeel", + "jbo": "ložban", + "jgo": "ngomba", + "jmc": "matÅ¡ame", + "jpr": "juudipärsia", + "jrb": "juudiaraabia", + "jut": "jüüti", + "jv": "jaava", + "ka": "gruusia", + "kaa": "karakalpaki", + "kab": "kabiili", + "kac": "katÅ¡ini", + "kaj": "jju", + "kam": "kamba", + "kaw": "kaavi", + "kbd": "kabardi-tÅ¡erkessi", + "kbl": "kanembu", + "kcg": "tjapi", + "kde": "makonde", + "kea": "kabuverdianu", + "kfo": "koro", + "kg": "kongo", + "kgp": "kaingangi", + "kha": "khasi", + "kho": "saka", + "khq": "koyra chiini", + "khw": "khovari", + "ki": "kikuju", + "kiu": "kõrmandžki", + "kj": "kvanjama", + "kk": "kasahhi", + "kkj": "kako", + "kl": "grööni", + "kln": "kalendžini", + "km": "khmeeri", + "kmb": "mbundu", + "kn": "kannada", + "ko": "korea", + "koi": "permikomi", + "kok": "konkani", + "kos": "kosrae", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karatÅ¡ai-balkaari", + "kri": "krio", + "krj": "kinaraia", + "krl": "karjala", + "kru": "kuruhhi", + "ks": "kaÅ¡miiri", + "ksb": "Å¡ambala", + "ksf": "bafia", + "ksh": "kölni", + "ku": "kurdi", + "kum": "kumõki", + "kut": "kutenai", + "kv": "komi", + "kw": "korni", + "ky": "kirgiisi", + "la": "ladina", + "lad": "ladiino", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "letseburgi", + "lez": "lesgi", + "lg": "ganda", + "li": "limburgi", + "lij": "liguuri", + "liv": "liivi", + "lkt": "lakota", + "lmo": "lombardi", + "ln": "lingala", + "lo": "lao", + "lol": "mongo", + "loz": "lozi", + "lrc": "põhjaluri", + "lt": "leedu", + "ltg": "latgali", + "lu": "luba", + "lua": "lulua", + "lui": "luisenjo", + "lun": "lunda", + "luo": "luo", + "lus": "luÅ¡ei", + "luy": "luhja", + "lv": "läti", + "lzh": "klassikaline hiina", + "lzz": "lazi", + "mad": "madura", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makassari", + "man": "malinke", + "mas": "masai", + "mde": "maba", + "mdf": "mokÅ¡a", + "mdr": "mandari", + "men": "mende", + "mer": "meru", + "mfe": "Mauritiuse kreoolkeel", + "mg": "malagassi", + "mga": "keskiiri", + "mgh": "makhuwa-meetto", + "mgo": "meta", + "mh": "marÅ¡alli", + "mi": "maoori", + "mic": "mikmaki", + "min": "minangkabau", + "mk": "makedoonia", + "ml": "malajalami", + "mn": "mongoli", + "mnc": "mandžu", + "mni": "manipuri", + "moh": "mohoogi", + "mos": "more", + "mr": "marathi", + "mrj": "mäemari", + "ms": "malai", + "mt": "malta", + "mua": "mundangi", + "mul": "mitu keelt", + "mus": "maskogi", + "mwl": "miranda", + "mwr": "marvari", + "mwv": "mentavei", + "my": "birma", + "mye": "mjene", + "myv": "ersa", + "mzn": "mazandaraani", + "na": "nauru", + "nan": "lõunamini", + "nap": "napoli", + "naq": "nama", + "nb": "norra bokmÃ¥l", + "nd": "põhjandebele", + "nds": "alamsaksa", + "nds_NL": "Hollandi alamsaksa", + "ne": "nepali", + "new": "nevari", + "ng": "ndonga", + "nia": "niasi", + "niu": "niue", + "njo": "ao", + "nl": "hollandi", + "nl_BE": "flaami", + "nmg": "kwasio", + "nn": "uusnorra", + "nnh": "ngiembooni", + "no": "norra", + "nog": "nogai", + "non": "vanapõhjala", + "nov": "noviaal", + "nqo": "nkoo", + "nr": "lõunandebele", + "nso": "põhjasotho", + "nus": "nueri", + "nv": "navaho", + "nwc": "vananevari", + "ny": "njandža", + "nym": "njamvesi", + "nyn": "nkole", + "nyo": "njoro", + "nzi": "nzima", + "oc": "oksitaani", + "oj": "odžibvei", + "om": "oromo", + "or": "oria", + "os": "osseedi", + "osa": "oseidži", + "ota": "osmanitürgi", + "pa": "pandžabi", + "pag": "pangasinani", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "belau", + "pcd": "pikardi", + "pcm": "Nigeeria pidžinkeel", + "pdc": "Pennsylvania saksa", + "pdt": "mennoniidisaksa", + "peo": "vanapärsia", + "pfl": "Pfalzi", + "phn": "foiniikia", + "pi": "paali", + "pl": "poola", + "pms": "piemonte", + "pnt": "pontose", + "pon": "poonpei", + "prg": "preisi", + "pro": "vanaprovansi", + "ps": "puÅ¡tu", + "pt": "portugali", + "pt_BR": "Brasiilia portugali", + "pt_PT": "Euroopa portugali", + "qu": "ketÅ¡ua", + "quc": "kitÅ¡e", + "raj": "radžastani", + "rap": "rapanui", + "rar": "rarotonga", + "rgn": "romanja", + "rif": "riifi", + "rm": "romanÅ¡i", + "rn": "rundi", + "ro": "rumeenia", + "ro_MD": "moldova", + "rof": "rombo", + "rom": "mustlaskeel", + "root": "root", + "rtm": "rotuma", + "ru": "vene", + "rue": "russiini", + "rug": "roviana", + "rup": "aromuuni", + "rw": "ruanda", + "rwk": "rvaa", + "sa": "sanskriti", + "sad": "sandave", + "sah": "jakuudi", + "sam": "Samaaria aramea", + "saq": "samburu", + "sas": "sasaki", + "sat": "santali", + "saz": "sauraÅ¡tra", + "sba": "ngambai", + "sbp": "sangu", + "sc": "sardi", + "scn": "sitsiilia", + "sco": "Å¡oti", + "sd": "sindhi", + "sdh": "lõunakurdi", + "se": "põhjasaami", + "see": "seneka", + "seh": "sena", + "sei": "seri", + "sel": "sölkupi", + "ses": "koyraboro senni", + "sg": "sango", + "sga": "vanaiiri", + "sgs": "žemaidi", + "sh": "serbia-horvaadi", + "shi": "Å¡ilha", + "shn": "Å¡ani", + "shu": "TÅ¡aadi araabia", + "si": "singali", + "sid": "sidamo", + "sk": "slovaki", + "sl": "sloveeni", + "sli": "alamsileesia", + "sly": "selajari", + "sm": "samoa", + "sma": "lõunasaami", + "smj": "Lule saami", + "smn": "Inari saami", + "sms": "koltasaami", + "sn": "Å¡ona", + "snk": "soninke", + "so": "somaali", + "sog": "sogdi", + "sq": "albaania", + "sr": "serbia", + "srn": "sranani", + "srr": "sereri", + "ss": "svaasi", + "ssy": "saho", + "st": "lõunasotho", + "stq": "saterfriisi", + "su": "sunda", + "suk": "sukuma", + "sus": "susu", + "sux": "sumeri", + "sv": "rootsi", + "sw": "suahiili", + "sw_CD": "Kongo suahiili", + "swb": "komoori", + "syc": "vanasüüria", + "syr": "süüria", + "szl": "sileesia", + "ta": "tamili", + "tcy": "tulu", + "te": "telugu", + "tem": "temne", + "teo": "teso", + "ter": "tereno", + "tet": "tetumi", + "tg": "tadžiki", + "th": "tai", + "ti": "tigrinja", + "tig": "tigree", + "tiv": "tivi", + "tk": "türkmeeni", + "tkl": "tokelau", + "tkr": "tsahhi", + "tl": "tagalogi", + "tlh": "klingoni", + "tli": "tlingiti", + "tly": "talõši", + "tmh": "tamaÅ¡eki", + "tn": "tsvana", + "to": "tonga", + "tog": "tÅ¡itonga", + "tpi": "uusmelaneesia", + "tr": "türgi", + "tru": "turojo", + "trv": "taroko", + "ts": "tsonga", + "tsd": "tsakoonia", + "tsi": "tÅ¡imÅ¡i", + "tt": "tatari", + "ttt": "lõunataadi", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "tvii", + "twq": "taswaqi", + "ty": "tahiti", + "tyv": "tõva", + "tzm": "tamasikti", + "udm": "udmurdi", + "ug": "uiguuri", + "uga": "ugariti", + "uk": "ukraina", + "umb": "umbundu", + "und": "määramata keel", + "ur": "urdu", + "uz": "usbeki", + "vai": "vai", + "ve": "venda", + "vec": "veneti", + "vep": "vepsa", + "vi": "vietnami", + "vls": "lääneflaami", + "vmf": "Maini frangi", + "vo": "volapüki", + "vot": "vadja", + "vro": "võru", + "vun": "vundžo", + "wa": "vallooni", + "wae": "walseri", + "wal": "volaita", + "war": "varai", + "was": "vaÅ¡o", + "wbp": "varlpiri", + "wo": "volofi", + "wuu": "uu", + "xal": "kalmõki", + "xh": "koosa", + "xmf": "megreli", + "xog": "soga", + "yao": "jao", + "yap": "japi", + "yav": "yangbeni", + "ybb": "jemba", + "yi": "jidiÅ¡i", + "yo": "joruba", + "yrl": "njengatu", + "yue": "kantoni", + "za": "tÅ¡uangi", + "zap": "sapoteegi", + "zbl": "Blissi sümbolid", + "zea": "zeelandi", + "zen": "zenaga", + "zgh": "tamasikti (Maroko)", + "zh": "hiina", + "zu": "suulu", + "zun": "sunji", + "zxx": "mittekeeleline", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/eu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/eu.json new file mode 100644 index 0000000000000000000000000000000000000000..b9c9486b65a1182fe7d0b38fa5d9f0cb0a61e713 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/eu.json @@ -0,0 +1,404 @@ +{ + "Version": "2.1.29.20", + "Names": { + "aa": "afarera", + "ab": "abkhazera", + "ace": "acehnera", + "ach": "acholiera", + "ada": "adangmera", + "ady": "adyghera", + "af": "afrikaansa", + "agq": "aghemera", + "ain": "ainuera", + "ak": "akanera", + "ale": "aleutera", + "alt": "hegoaldeko altaiera", + "am": "amharera", + "an": "aragoiera", + "anp": "angikera", + "ar": "arabiera", + "ar_001": "arabiera moderno estandarra", + "arn": "maputxea", + "arp": "arapahoa", + "as": "assamera", + "asa": "asua", + "ast": "asturiera", + "av": "avarera", + "awa": "awadhiera", + "ay": "aimara", + "az": "azerbaijanera", + "ba": "bashkirrera", + "ban": "baliera", + "bas": "basaa", + "be": "bielorrusiera", + "bem": "bembera", + "bez": "benera", + "bg": "bulgariera", + "bho": "bhojpurera", + "bi": "bislama", + "bin": "edoera", + "bla": "siksikera", + "bm": "bambarera", + "bn": "bengalera", + "bo": "tibetera", + "br": "bretoiera", + "brx": "bodoera", + "bs": "bosniera", + "bug": "buginera", + "byn": "bilena", + "ca": "katalana", + "ce": "txetxeniera", + "ceb": "cebuera", + "cgg": "chigera", + "ch": "chamorrera", + "chk": "chuukera", + "chm": "mariera", + "cho": "choctaw", + "chr": "txerokiera", + "chy": "cheyennera", + "ckb": "sorania", + "co": "korsikera", + "crs": "seselwa frantses-kreolera", + "cs": "txekiera", + "cu": "Elizako eslaviera", + "cv": "chuvashera", + "cy": "galesera", + "da": "daniera", + "dak": "dakotera", + "dar": "dargvera", + "dav": "taitera", + "de": "alemana", + "de_AT": "Austriako alemana", + "de_CH": "aleman garaia (Suitza)", + "dgr": "dogribera", + "dje": "zarmera", + "dsb": "behe-sorabiera", + "dua": "dualera", + "dv": "divehiera", + "dyo": "fonyi jolera", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embua", + "ee": "eweera", + "efi": "efikera", + "eka": "akajuka", + "el": "greziera", + "en": "ingelesa", + "en_AU": "Australiako ingelesa", + "en_CA": "Kanadako ingelesa", + "en_GB": "Britainia Handiko ingelesa", + "en_US": "AEBko ingelesa", + "eo": "esperantoa", + "es": "espainiera", + "es_419": "Latinoamerikako espainiera", + "es_ES": "espainiera (Europa)", + "es_MX": "Mexikoko espainiera", + "et": "estoniera", + "eu": "euskara", + "ewo": "ewondera", + "fa": "persiera", + "ff": "fula", + "fi": "finlandiera", + "fil": "tagaloga", + "fj": "fijiera", + "fo": "faroera", + "fon": "fona", + "fr": "frantsesa", + "fr_CA": "Kanadako frantsesa", + "fr_CH": "Suitzako frantsesa", + "fur": "friuliera", + "fy": "frisiera", + "ga": "gaelikoa", + "gaa": "ga", + "gag": "gagauzera", + "gd": "eskoziako gaelikoa", + "gez": "ge’ez", + "gil": "gilbertera", + "gl": "galiziera", + "gn": "guaraniera", + "gor": "gorontaloa", + "gsw": "alemana (Suitza)", + "gu": "gujaratera", + "guz": "gusiiera", + "gv": "manxera", + "gwi": "gwichʼin", + "ha": "hausa", + "haw": "hawaiiera", + "he": "hebreera", + "hi": "hindia", + "hil": "hiligainona", + "hmn": "hmong", + "hr": "kroaziera", + "hsb": "goi-sorabiera", + "ht": "Haitiko kreolera", + "hu": "hungariera", + "hup": "hupera", + "hy": "armeniera", + "hz": "herera", + "ia": "interlingua", + "iba": "ibanera", + "ibb": "ibibioera", + "id": "indonesiera", + "ie": "interlingue", + "ig": "igboera", + "ii": "sichuan yia", + "ilo": "ilokanera", + "inh": "ingushera", + "io": "ido", + "is": "islandiera", + "it": "italiera", + "iu": "inuitera", + "ja": "japoniera", + "jbo": "lojbanera", + "jgo": "ngomba", + "jmc": "machamera", + "jv": "javera", + "ka": "georgiera", + "kab": "kabilera", + "kac": "jingpoera", + "kaj": "kaiji", + "kam": "kambera", + "kbd": "kabardiera", + "kcg": "kataba", + "kde": "makondera", + "kea": "Cabo Verdeko kreola", + "kfo": "koroa", + "kg": "kikongoa", + "kha": "kashia", + "khq": "koyra chiiniera", + "ki": "kikuyuera", + "kj": "kuanyama", + "kk": "kazakhera", + "kkj": "kakoa", + "kl": "kalaallisutera", + "kln": "kalenjinera", + "km": "khemerera", + "kmb": "kimbundua", + "kn": "kannadera", + "ko": "koreera", + "koi": "komi-permyakera", + "kok": "konkaniera", + "kpe": "kpellea", + "kr": "kanuriera", + "krc": "karachayera-balkarera", + "krl": "kareliera", + "kru": "kurukhera", + "ks": "kashmirera", + "ksb": "shambalera", + "ksf": "bafiera", + "ksh": "koloniera", + "ku": "kurduera", + "kum": "kumykera", + "kv": "komiera", + "kw": "kornubiera", + "ky": "kirgizera", + "la": "latina", + "lad": "ladinera", + "lag": "langiera", + "lb": "luxenburgera", + "lez": "lezgiera", + "lg": "gandera", + "li": "limburgera", + "lkt": "lakotera", + "ln": "lingala", + "lo": "laosera", + "loz": "loziera", + "lrc": "iparraldeko lurera", + "lt": "lituaniera", + "lu": "luba-katangera", + "lua": "txilubera", + "lun": "lundera", + "luo": "luoera", + "lus": "mizoa", + "luy": "luhyera", + "lv": "letoniera", + "mad": "madurera", + "mag": "magahiera", + "mai": "maithilera", + "mak": "makasarera", + "mas": "masaiera", + "mdf": "mokxera", + "men": "mendeera", + "mer": "meruera", + "mfe": "Mauritaniako kreolera", + "mg": "malagasyera", + "mgh": "makhuwa-meettoera", + "mgo": "metera", + "mh": "marshallera", + "mi": "maoriera", + "mic": "mikmakera", + "min": "minangkabauera", + "mk": "mazedoniera", + "ml": "malayalamera", + "mn": "mongoliera", + "mni": "manipurera", + "moh": "mohawkera", + "mos": "moreera", + "mr": "marathera", + "ms": "malaysiera", + "mt": "maltera", + "mua": "mudangera", + "mul": "hizkuntza anitzak", + "mus": "creera", + "mwl": "mirandera", + "my": "burmatarra", + "myv": "erziera", + "mzn": "mazandarandera", + "na": "nauruera", + "nap": "napoliera", + "naq": "namera", + "nb": "bokmala (Norvegia)", + "nd": "iparraldeko ndebeleera", + "nds_NL": "behe-saxoiera", + "ne": "nepalera", + "new": "newarera", + "ng": "ndongera", + "nia": "niasa", + "niu": "niuera", + "nl": "nederlandera", + "nl_BE": "flandriera", + "nmg": "kwasiera", + "nn": "nynorsk norvegiera", + "nnh": "ngiemboonera", + "no": "norvegiera", + "nog": "nogaiera", + "nqo": "n’koera", + "nr": "hegoaldeko ndebelera", + "nso": "pediera", + "nus": "nuerera", + "nv": "navahoera", + "ny": "nyanja", + "nyn": "ankolera", + "oc": "okzitaniera", + "om": "oromoera", + "or": "oriya", + "os": "osetiera", + "pa": "punjabera", + "pag": "pangasinanera", + "pam": "pampangera", + "pap": "papiamentoa", + "pau": "palauera", + "pcm": "Nigeriako pidgina", + "pl": "poloniera", + "prg": "prusiera", + "ps": "paxtuera", + "pt": "portugesa", + "pt_BR": "Brasilgo portugesa", + "pt_PT": "portugesa (Europa)", + "qu": "quechuera", + "quc": "k’iche’ra", + "rap": "rapa nui", + "rar": "rarotongera", + "rm": "erromantxera", + "rn": "rundiera", + "ro": "errumaniera", + "ro_MD": "moldaviera", + "rof": "romboera", + "root": "erroa", + "ru": "errusiera", + "rup": "aromania", + "rw": "kinyaruanda", + "rwk": "rwaera", + "sa": "sanskritoa", + "sad": "sandawea", + "sah": "sakhera", + "saq": "samburuera", + "sat": "santalera", + "sba": "ngambayera", + "sbp": "sanguera", + "sc": "sardiniera", + "scn": "siziliera", + "sco": "eskoziera", + "sd": "sindhia", + "se": "iparraldeko samiera", + "seh": "senera", + "ses": "koyraboro sennia", + "sg": "sangoera", + "sh": "serbokroaziera", + "shi": "tachelhita", + "shn": "shanera", + "si": "sinhala", + "sk": "eslovakiera", + "sl": "esloveniera", + "sm": "samoera", + "sma": "hegoaldeko samiera", + "smj": "lule samiera", + "smn": "inari-samiera", + "sms": "skolt samiera", + "sn": "shonera", + "snk": "soninkera", + "so": "somaliera", + "sq": "albaniera", + "sr": "serbiera", + "srn": "srananera", + "ss": "swatiera", + "ssy": "sahoa", + "st": "hegoaldeko sothoera", + "su": "sundanera", + "suk": "sukumera", + "sv": "suediera", + "sw": "swahili", + "sw_CD": "Kongoko swahilia", + "swb": "komoreera", + "syr": "asiriera", + "ta": "tamilera", + "te": "teluguera", + "tem": "temnea", + "teo": "tesoera", + "tet": "tetuma", + "tg": "tajikistanera", + "th": "thailandiera", + "ti": "tigriñera", + "tig": "tigrea", + "tk": "turkmeniera", + "tl": "tagalog", + "tlh": "klingonera", + "tn": "tswanera", + "to": "tongera", + "tpi": "tok pisina", + "tr": "turkiera", + "trv": "tarokoa", + "ts": "tsongera", + "tt": "tatarera", + "tum": "tumbukera", + "tvl": "tuvaluera", + "tw": "twia", + "twq": "tasawaqa", + "ty": "tahitiera", + "tyv": "tuvera", + "tzm": "Maroko erdialdeko tamazighta", + "udm": "udmurtera", + "ug": "uigurrera", + "uk": "ukrainera", + "umb": "umbunduera", + "und": "hizkuntza ezezaguna", + "ur": "urdua", + "uz": "uzbekera", + "vai": "vaiera", + "ve": "vendera", + "vi": "vietnamera", + "vo": "volapüka", + "vun": "vunjoa", + "wa": "valoniera", + "wae": "walserera", + "wal": "welayta", + "war": "samerera", + "wo": "wolofera", + "xal": "kalmykera", + "xh": "xhosera", + "xog": "sogera", + "yav": "jangbenera", + "ybb": "yemba", + "yi": "yiddisha", + "yo": "yorubera", + "yue": "kantonera", + "zgh": "tamazight estandarra", + "zh": "txinera", + "zh_Hans": "txinera soildua", + "zh_Hant": "txinera tradizionala", + "zu": "zuluera", + "zun": "zuñia", + "zxx": "ez dago eduki linguistikorik", + "zza": "zazakia" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fa.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fa.json new file mode 100644 index 0000000000000000000000000000000000000000..0446ec74d6b5a89ead07348f8ab9fa09f0432e53 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fa.json @@ -0,0 +1,531 @@ +{ + "Version": "2.1.29.44", + "Names": { + "aa": "Ø¢ÙØ§Ø±ÛŒ", + "ab": "آبخازی", + "ace": "آچئی", + "ach": "آچولیایی", + "ada": "آدانگمه‌ای", + "ady": "آدیجیایی", + "ae": "اوستایی", + "aeb": "عربی تونسی", + "af": "Ø¢ÙØ±ÛŒÚ©Ø§Ù†Ø³", + "afh": "Ø¢ÙØ±ÛŒÙ‡ÛŒÙ„ÛŒ", + "agq": "آگیم", + "ain": "آینویی", + "ak": "آکان", + "akk": "اکدی", + "akz": "آلابامایی", + "ale": "آلئوتی", + "alt": "آلتایی جنوبی", + "am": "امهری", + "an": "آراگونی", + "ang": "انگلیسی باستان", + "anp": "آنگیکا", + "ar": "عربی", + "ar_001": "عربی رسمی", + "arc": "آرامی", + "arn": "ماپوچه‌ای", + "arp": "آراپاهویی", + "arq": "عربی الجزایری", + "arw": "آراواکی", + "ary": "عربی مراکشی", + "arz": "عربی مصری", + "as": "آسامی", + "asa": "آسو", + "ast": "آستوری", + "av": "آواری", + "awa": "اودهی", + "ay": "آیمارایی", + "az": "ترکی آذربایجانی", + "az_Arab": "ترکی آذری جنوبی", + "ba": "باشغیری", + "bal": "بلوچی", + "ban": "بالیایی", + "bar": "باواریایی", + "bas": "باسایی", + "bax": "بمونی", + "be": "بلاروسی", + "bej": "بجایی", + "bem": "بمبایی", + "bez": "بنایی", + "bg": "بلغاری", + "bgn": "بلوچی غربی", + "bho": "بوجپوری", + "bi": "بیسلاما", + "bik": "بیکولی", + "bin": "بینی", + "bla": "سیکسیکا", + "bm": "بامبارایی", + "bn": "بنگالی", + "bo": "تبتی", + "bqi": "لری بختیاری", + "br": "برتون", + "bra": "براج", + "brh": "براهویی", + "brx": "بودویی", + "bs": "بوسنیایی", + "bua": "بوریاتی", + "bug": "بوگیایی", + "byn": "بلین", + "ca": "کاتالان", + "cad": "کادویی", + "car": "کاریبی", + "ce": "Ú†Ú†Ù†ÛŒ", + "ceb": "سبویی", + "cgg": "چیگا", + "ch": "چامورویی", + "chb": "چیبچا", + "chg": "جغتایی", + "chk": "Ú†ÙˆÚ©ÛŒ", + "chm": "ماریایی", + "cho": "چوکتویی", + "chp": "چیپه‌ویه‌ای", + "chr": "چروکیایی", + "chy": "شایانی", + "ckb": "کردی مرکزی", + "co": "کورسی", + "cop": "قبطی", + "cr": "کریایی", + "crh": "ترکی کریمه", + "crs": "سیشل آمیختهٔ ÙØ±Ø§Ù†Ø³ÙˆÛŒ", + "cs": "Ú†Ú©ÛŒ", + "csb": "کاشوبی", + "cu": "اسلاوی کلیسایی", + "cv": "چوواشی", + "cy": "ولزی", + "da": "دانمارکی", + "dak": "داکوتایی", + "dar": "دارقینی", + "dav": "تایتا", + "de": "آلمانی", + "de_AT": "آلمانی اتریش", + "de_CH": "آلمانی معیار سوئیس", + "del": "دلاواری", + "dgr": "دوگریب", + "din": "دینکایی", + "dje": "زرما", + "doi": "دوگری", + "dsb": "ØµÙØ±Ø¨ÛŒ سÙÙ„ÛŒ", + "dua": "دوآلایی", + "dum": "هلندی میانه", + "dv": "دیوهی", + "dyo": "دیولا Ùونی", + "dyu": "دایولایی", + "dz": "جونخایی", + "dzg": "دازاگایی", + "ebu": "امبو", + "ee": "اوه‌ای", + "efi": "اÙیکی", + "egy": "مصری کهن", + "eka": "اکاجوک", + "el": "یونانی", + "elx": "عیلامی", + "en": "انگلیسی", + "en_AU": "انگلیسی استرالیا", + "en_CA": "انگلیسی کانادا", + "en_GB": "انگلیسی بریتانیا", + "en_US": "انگلیسی امریکا", + "enm": "انگلیسی میانه", + "eo": "اسپرانتو", + "es": "اسپانیایی", + "es_419": "اسپانیایی امریکای لاتین", + "es_ES": "اسپانیایی اروپا", + "es_MX": "اسپانیایی مکزیک", + "et": "استونیایی", + "eu": "باسکی", + "ewo": "اواندو", + "fa": "ÙØ§Ø±Ø³ÛŒ", + "fa_AF": "دری", + "fan": "ÙØ§Ù†Ú¯ÛŒ", + "fat": "ÙØ§Ù†ØªÛŒØ§ÛŒÛŒ", + "ff": "Ùولایی", + "fi": "Ùنلاندی", + "fil": "Ùیلیپینی", + "fj": "Ùیجیایی", + "fo": "ÙØ§Ø±ÙˆÛŒÛŒ", + "fon": "Ùونی", + "fr": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ", + "fr_CA": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ کانادا", + "fr_CH": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ سوئیس", + "frc": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ کادین", + "frm": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ میانه", + "fro": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ باستان", + "frr": "ÙØ±ÛŒØ²ÛŒ شمالی", + "frs": "ÙØ±ÛŒØ²ÛŒ شرقی", + "fur": "ÙØ±ÛŒÙˆÙ„یایی", + "fy": "ÙØ±ÛŒØ²ÛŒ غربی", + "ga": "ایرلندی", + "gaa": "گایی", + "gag": "گاگائوزیایی", + "gay": "گایویی", + "gba": "گبایایی", + "gbz": "دری زرتشتی", + "gd": "گیلی اسکاتلندی", + "gez": "گی‌ئزی", + "gil": "گیلبرتی", + "gl": "گالیسیایی", + "glk": "گیلکی", + "gmh": "آلمانی معیار میانه", + "gn": "گوارانی", + "goh": "آلمانی علیای باستان", + "gon": "گوندی", + "gor": "گورونتالو", + "got": "گوتی", + "grb": "گریبویی", + "grc": "یونانی کهن", + "gsw": "آلمانی سوئیسی", + "gu": "گجراتی", + "guz": "گوسی", + "gv": "مانی", + "gwi": "گویچ این", + "ha": "هوسیایی", + "hai": "هایدایی", + "haw": "هاوائیایی", + "he": "عبری", + "hi": "هندی", + "hif": "هندی Ùیجیایی", + "hil": "هیلی‌گاینونی", + "hit": "هیتی", + "hmn": "همونگ", + "ho": "موتویی هیری", + "hr": "کروات", + "hsb": "ØµÙØ±Ø¨ÛŒ علیا", + "ht": "هائیتیایی", + "hu": "مجاری", + "hup": "هوپا", + "hy": "ارمنی", + "hz": "هریرویی", + "ia": "میان‌زبان", + "iba": "ایبانی", + "ibb": "ایبیبویی", + "id": "اندونزیایی", + "ie": "اکسیدنتال", + "ig": "ایگبویی", + "ii": "یی سیچوان", + "ik": "اینوپیک", + "ilo": "ایلوکویی", + "inh": "اینگوشی", + "io": "ایدو", + "is": "ایسلندی", + "it": "ایتالیایی", + "iu": "اینوکتیتوت", + "ja": "ژاپنی", + "jbo": "لوجبان", + "jgo": "نگومبا", + "jmc": "ماچامه‌ای", + "jpr": "ÙØ§Ø±Ø³ÛŒ یهودی", + "jrb": "عربی یهودی", + "jv": "جاوه‌ای", + "ka": "گرجی", + "kaa": "قره‌قالپاقی", + "kab": "قبایلی", + "kac": "کاچینی", + "kaj": "جو", + "kam": "کامبایی", + "kaw": "کاویایی", + "kbd": "کاباردینی", + "kcg": "تیاپی", + "kde": "ماکونده", + "kea": "کابووردیانو", + "kfo": "کورو", + "kg": "کنگویی", + "kha": "خاسیایی", + "kho": "ختنی", + "khq": "کوجراچینی", + "khw": "کهوار", + "ki": "کیکویویی", + "kiu": "کرمانجی", + "kj": "کوانیاما", + "kk": "قزاقی", + "kkj": "کاکایی", + "kl": "گرینلندی", + "kln": "کالنجین", + "km": "خمری", + "kmb": "کیمبوندویی", + "kn": "کانارا", + "ko": "کره‌ای", + "koi": "کومی پرمیاک", + "kok": "کنکانی", + "kpe": "کپله‌ای", + "kr": "کانوریایی", + "krc": "Ù‚Ø±Ù‡â€ŒÚ†Ø§ÛŒÛŒâ€Ø¨Ø§Ù„کاری", + "krl": "کاریلیانی", + "kru": "کوروخی", + "ks": "کشمیری", + "ksb": "شامبالا", + "ksf": "باÙیایی", + "ksh": "ریپواری", + "ku": "کردی", + "kum": "کومیکی", + "kut": "کوتنی", + "kv": "کومیایی", + "kw": "کرنوالی", + "ky": "قرقیزی", + "la": "لاتین", + "lad": "لادینو", + "lag": "لانگی", + "lah": "لاهندا", + "lam": "لامبا", + "lb": "لوگزامبورگی", + "lez": "لزگی", + "lg": "گاندایی", + "li": "لیمبورگی", + "lkt": "لاکوتا", + "ln": "لینگالا", + "lo": "لائوسی", + "lol": "مونگویی", + "loz": "لوزیایی", + "lrc": "لری شمالی", + "lt": "لیتوانیایی", + "lu": "لوباییâ€Ú©Ø§ØªØ§Ù†Ú¯Ø§", + "lua": "لوباییâ€Ù„ولوا", + "lui": "لویسنو", + "lun": "لوندایی", + "luo": "لوئویی", + "lus": "لوشه‌ای", + "luy": "لویا", + "lv": "لتونیایی", + "lzh": "چینی ادبی", + "mad": "مادورایی", + "mag": "ماگاهیایی", + "mai": "مایدیلی", + "mak": "ماکاسار", + "man": "ماندینگویی", + "mas": "ماسایی", + "mdf": "مکشایی", + "mdr": "ماندار", + "men": "منده‌ای", + "mer": "مرویی", + "mfe": "موریسین", + "mg": "مالاگاسیایی", + "mga": "ایرلندی میانه", + "mgh": "ماکوا متو", + "mgo": "متایی", + "mh": "مارشالی", + "mi": "مائوریایی", + "mic": "میکماکی", + "min": "مینانگ‌کابویی", + "mk": "مقدونی", + "ml": "مالایالامی", + "mn": "مغولی", + "mnc": "مانچویی", + "mni": "میته‌ای", + "moh": "موهاکی", + "mos": "ماسیایی", + "mr": "مراتی", + "ms": "مالایی", + "mt": "مالتی", + "mua": "ماندانگی", + "mul": "چندین زبان", + "mus": "کریکی", + "mwl": "میراندی", + "mwr": "مارواری", + "my": "برمه‌ای", + "myv": "ارزیایی", + "mzn": "مازندرانی", + "na": "نائورویی", + "nap": "ناپلی", + "naq": "نامایی", + "nb": "نروژی بوک‌مÙÙ„", + "nd": "انده‌بله‌ای شمالی", + "nds": "آلمانی سÙÙ„ÛŒ", + "nds_NL": "ساکسونی سÙÙ„ÛŒ", + "ne": "نپالی", + "new": "نواریایی", + "ng": "اندونگایی", + "nia": "نیاسی", + "niu": "نیویی", + "nl": "هلندی", + "nl_BE": "Ùلمنگی", + "nmg": "کوازیو", + "nn": "نروژی Ù†ÛŒâ€ŒÙ†ÙØ´Ú©", + "nnh": "انگیمبونی", + "no": "نروژی", + "nog": "نغایی", + "non": "نرس باستان", + "nqo": "Ù†Ú©Ùˆ", + "nr": "انده‌بله‌ای جنوبی", + "nso": "سوتویی شمالی", + "nus": "نویر", + "nv": "ناواهویی", + "nwc": "نواریایی کلاسیک", + "ny": "نیانجایی", + "nym": "نیام‌وزیایی", + "nyn": "نیانکوله‌ای", + "nyo": "نیورویی", + "nzi": "نزیمایی", + "oc": "اوکیتایی", + "oj": "اوجیبوایی", + "om": "اورومویی", + "or": "اوریه‌ای", + "os": "آسی", + "osa": "اوسیجی", + "ota": "ترکی عثمانی", + "pa": "پنجابی", + "pag": "پانگاسینانی", + "pal": "پهلوی", + "pam": "پامپانگایی", + "pap": "پاپیامنتو", + "pau": "پالائویی", + "pcm": "نیم‌زبان نیجریه‌ای", + "pdc": "آلمانی پنسیلوانیایی", + "peo": "ÙØ§Ø±Ø³ÛŒ باستان", + "phn": "Ùنیقی", + "pi": "پالی", + "pl": "لهستانی", + "pon": "پانپیی", + "prg": "پروسی", + "pro": "پرووانسی باستان", + "ps": "پشتو", + "pt": "پرتغالی", + "pt_BR": "پرتغالی برزیل", + "pt_PT": "پرتغالی اروپا", + "qu": "کچوایی", + "quc": "کیچه‌", + "raj": "راجستانی", + "rap": "راپانویی", + "rar": "راروتونگایی", + "rm": "رومانش", + "rn": "روندیایی", + "ro": "رومانیایی", + "ro_MD": "مولداویایی", + "rof": "رومبویی", + "rom": "رومانویی", + "root": "ریشه", + "ru": "روسی", + "rup": "آرومانی", + "rw": "کینیارواندایی", + "rwk": "روایی", + "sa": "سانسکریت", + "sad": "سانداوه‌ای", + "sah": "یاقوتی", + "sam": "آرامی سامری", + "saq": "سامبورو", + "sas": "ساساکی", + "sat": "سانتالی", + "sba": "انگامبایی", + "sbp": "سانگویی", + "sc": "ساردینیایی", + "scn": "سیسیلی", + "sco": "اسکاتلندی", + "sd": "سندی", + "sdh": "کردی جنوبی", + "se": "سامی شمالی", + "seh": "سنا", + "sel": "سلکوپی", + "ses": "کویرابورا سنی", + "sg": "سانگو", + "sga": "ایرلندی باستان", + "sh": "صرب Ùˆ کرواتی", + "shi": "تاچل‌هیت", + "shn": "شانی", + "shu": "عربی چادی", + "si": "سینهالی", + "sid": "سیدامویی", + "sk": "اسلواکی", + "sl": "اسلوونیایی", + "sli": "سیلزیایی سÙÙ„ÛŒ", + "sm": "ساموآیی", + "sma": "سامی جنوبی", + "smj": "لوله سامی", + "smn": "ایناری سامی", + "sms": "اسکولت سامی", + "sn": "شونایی", + "snk": "سونینکه‌ای", + "so": "سومالیایی", + "sog": "سغدی", + "sq": "آلبانیایی", + "sr": "صربی", + "srn": "تاکی‌تاکی", + "srr": "سریری", + "ss": "سوازیایی", + "ssy": "ساهو", + "st": "سوتویی جنوبی", + "su": "سوندایی", + "suk": "سوکومایی", + "sus": "سوسویی", + "sux": "سومری", + "sv": "سوئدی", + "sw": "سواحیلی", + "sw_CD": "سواحیلی Ú©Ù†Ú¯Ùˆ", + "swb": "کوموری", + "syc": "سریانی کلاسیک", + "syr": "سریانی", + "szl": "سیلزیایی", + "ta": "تامیلی", + "te": "تلوگویی", + "tem": "تمنه‌ای", + "teo": "تسویی", + "ter": "ترنو", + "tet": "تتومی", + "tg": "تاجیکی", + "th": "تایلندی", + "ti": "تیگرینیایی", + "tig": "تیگره‌ای", + "tiv": "تیوی", + "tk": "ترکمنی", + "tl": "تاگالوگی", + "tlh": "کلینگون", + "tli": "تلین‌گیتی", + "tmh": "تاماشقی", + "tn": "تسوانایی", + "to": "تونگایی", + "tog": "تونگایی نیاسا", + "tpi": "توک‌پیسینی", + "tr": "ترکی استانبولی", + "trv": "تاروکویی", + "ts": "تسونگایی", + "tsi": "تسیم‌شیانی", + "tt": "تاتاری", + "tum": "تومبوکایی", + "tvl": "تووالویی", + "tw": "توی‌یایی", + "twq": "تسواکی", + "ty": "تاهیتیایی", + "tyv": "تووایی", + "tzm": "آمازیغی اطلس مرکزی", + "udm": "اودمورتی", + "ug": "اویغوری", + "uga": "اوگاریتی", + "uk": "اوکراینی", + "umb": "امبوندویی", + "und": "زبان نامشخص", + "ur": "اردو", + "uz": "ازبکی", + "vai": "ویایی", + "ve": "وندایی", + "vi": "ویتنامی", + "vo": "ولاپوک", + "vot": "وتی", + "vun": "ونجو", + "wa": "والونی", + "wae": "والسر", + "wal": "والامو", + "war": "وارایی", + "was": "واشویی", + "wbp": "وارلپیری", + "wo": "ولوÙÛŒ", + "xal": "قلموقی", + "xh": "خوسایی", + "xog": "سوگایی", + "yao": "یائویی", + "yap": "یاپی", + "yav": "یانگبنی", + "ybb": "یمبایی", + "yi": "یدی", + "yo": "یوروبایی", + "yue": "کانتونی", + "za": "چوانگی", + "zap": "زاپوتکی", + "zen": "زناگا", + "zgh": "آمازیغی معیار مراکش", + "zh": "چینی", + "zh_Hans": "چینی ساده‌شده", + "zh_Hant": "چینی سنتی", + "zu": "زولویی", + "zun": "زونیایی", + "zxx": "بدون محتوای زبانی", + "zza": "زازایی" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fa_AF.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fa_AF.json new file mode 100644 index 0000000000000000000000000000000000000000..505dd2bf98043f307474f6cbb5fd12539baf61bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fa_AF.json @@ -0,0 +1,31 @@ +{ + "Version": "2.1.29.44", + "Names": { + "ab": "Ø§ÙØ±ÛŒÚ©Ø§Ù†Ø³", + "as": "اسامی", + "az": "آذربایجانی", + "ba": "باشقیری", + "ckb": "کردی سورانی", + "dv": "مالدیوی", + "es": "هسپانوی", + "fi": "Ùنلندی", + "ga": "آیرلندی", + "hr": "کروشیایی", + "id": "اندونیزیایی", + "is": "آیسلندی", + "it": "ایتالوی", + "ja": "جاپانی", + "ko": "کوریایی", + "ky": "قرغزی", + "mn": "مغلی", + "ne": "نیپالی", + "nl": "هالندی", + "no": "نارویژی", + "pl": "پولندی", + "pt": "پرتگالی", + "sq": "البانیایی", + "sv": "سویدنی", + "sw": "سواحلی", + "tg": "تاجکی" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ff.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ff.json new file mode 100644 index 0000000000000000000000000000000000000000..605f829c246de8a8b3a4c26972d04bf37c77f105 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ff.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ak": "Akaan", + "am": "Amarik", + "ar": "Aarabeere", + "be": "Belaruuse", + "bg": "Bulgariire", + "bn": "Bengali", + "cs": "Cekkere", + "de": "Docceere", + "el": "Gerke", + "en": "Engeleere", + "es": "Español", + "fa": "Perseere", + "ff": "Pulaar", + "fr": "Farayseere", + "ha": "HawsaÅ‹koore", + "hi": "Hinndi", + "hu": "Hongariire", + "id": "Endonesiire", + "ig": "Igiboore", + "it": "Italiyeere", + "ja": "Saponeere", + "jv": "Sawaneere", + "km": "Kemeere", + "ko": "Koreere", + "ms": "Malayeere", + "my": "Burmeese", + "ne": "Nepaaleere", + "nl": "Dacceere", + "pa": "Punjabeere", + "pl": "Poloneere", + "pt": "Purtugeere", + "ro": "Romaneere", + "ru": "Riis", + "rw": "Ruwaanndeere", + "so": "Somalii", + "sv": "Sweedeere", + "ta": "Tamil", + "th": "Taay", + "tr": "Turkeere", + "uk": "Ukereneere", + "ur": "Urdu", + "vi": "Wiyetnameere", + "yo": "Yorrubaa", + "zh": "Sinuwaare", + "zu": "SuluÅ‹koore" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fi.json new file mode 100644 index 0000000000000000000000000000000000000000..cf39b44c81c648bea4f0cf27d4647dadc0aaeccc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fi.json @@ -0,0 +1,619 @@ +{ + "Version": "2.1.29.88", + "Names": { + "aa": "afar", + "ab": "abhaasi", + "ace": "atÅ¡eh", + "ach": "atÅ¡oli", + "ada": "adangme", + "ady": "adyge", + "ae": "avesta", + "aeb": "tunisianarabia", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainu", + "ak": "akan", + "akk": "akkadi", + "akz": "alabama", + "ale": "aleutti", + "aln": "gegi", + "alt": "altai", + "am": "amhara", + "an": "aragonia", + "ang": "muinaisenglanti", + "anp": "angika", + "ar": "arabia", + "ar_001": "yleisarabia", + "arc": "valtakunnanaramea", + "arn": "mapudungun", + "aro": "araona", + "arp": "arapaho", + "arq": "algerianarabia", + "arw": "arawak", + "ary": "marokonarabia", + "arz": "egyptinarabia", + "as": "assami", + "asa": "asu", + "ase": "amerikkalainen viittomakieli", + "ast": "asturia", + "av": "avaari", + "avk": "kotava", + "awa": "awadhi", + "ay": "aimara", + "az": "azeri", + "ba": "baÅ¡kiiri", + "bal": "belutÅ¡i", + "ban": "bali", + "bar": "baijeri", + "bas": "basaa", + "bax": "bamum", + "bbc": "batak-toba", + "bbj": "ghomala", + "be": "valkovenäjä", + "bej": "bedža", + "bem": "bemba", + "bew": "betawi", + "bez": "bena", + "bfd": "fut", + "bfq": "badaga", + "bg": "bulgaria", + "bgn": "länsibelutÅ¡i", + "bho": "bhodžpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bjn": "banjar", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bengali", + "bo": "tiibet", + "bpy": "biÅ¡nupria", + "bqi": "bahtiari", + "br": "bretoni", + "bra": "bradž", + "brh": "brahui", + "brx": "bodo", + "bs": "bosnia", + "bss": "koose", + "bua": "burjaatti", + "bug": "bugi", + "bum": "bulu", + "byn": "bilin", + "byv": "medumba", + "ca": "katalaani", + "cad": "caddo", + "car": "karibi", + "cay": "cayuga", + "cch": "atsam", + "ce": "tÅ¡etÅ¡eeni", + "ceb": "cebuano", + "cgg": "kiga", + "ch": "tÅ¡amorro", + "chb": "tÅ¡ibtÅ¡a", + "chg": "tÅ¡agatai", + "chk": "chuuk", + "chm": "mari", + "chn": "chinook-jargon", + "cho": "choctaw", + "chp": "chipewyan", + "chr": "cherokee", + "chy": "cheyenne", + "ckb": "sorani", + "co": "korsika", + "cop": "kopti", + "cps": "capiznon", + "cr": "cree", + "crh": "krimintataari", + "crs": "seychellienkreoli", + "cs": "tÅ¡ekki", + "csb": "kaÅ¡ubi", + "cu": "kirkkoslaavi", + "cv": "tÅ¡uvassi", + "cy": "kymri", + "da": "tanska", + "dak": "dakota", + "dar": "dargi", + "dav": "taita", + "de": "saksa", + "de_AT": "itävallansaksa", + "de_CH": "sveitsinyläsaksa", + "del": "delaware", + "den": "slevi", + "dgr": "dogrib", + "din": "dinka", + "dje": "djerma", + "doi": "dogri", + "dsb": "alasorbi", + "dtp": "dusun", + "dua": "duala", + "dum": "keskihollanti", + "dv": "divehi", + "dyo": "jola-fonyi", + "dyu": "djula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embu", + "ee": "ewe", + "efi": "efik", + "egl": "emilia", + "egy": "muinaisegypti", + "eka": "ekajuk", + "el": "kreikka", + "elx": "elami", + "en": "englanti", + "en_AU": "australianenglanti", + "en_CA": "kanadanenglanti", + "en_GB": "britannianenglanti", + "en_US": "amerikanenglanti", + "enm": "keskienglanti", + "eo": "esperanto", + "es": "espanja", + "es_419": "amerikanespanja", + "es_ES": "euroopanespanja", + "es_MX": "meksikonespanja", + "esu": "alaskanjupik", + "et": "viro", + "eu": "baski", + "ewo": "ewondo", + "ext": "extremadura", + "fa": "farsi", + "fan": "fang", + "fat": "fanti", + "ff": "fulani", + "fi": "suomi", + "fil": "filipino", + "fit": "meänkieli", + "fj": "fidži", + "fo": "fääri", + "fon": "fon", + "fr": "ranska", + "fr_CA": "kanadanranska", + "fr_CH": "sveitsinranska", + "frc": "cajun", + "frm": "keskiranska", + "fro": "muinaisranska", + "frp": "arpitaani", + "frr": "pohjoisfriisi", + "frs": "itäfriisi", + "fur": "friuli", + "fy": "länsifriisi", + "ga": "iiri", + "gaa": "ga", + "gag": "gagauzi", + "gan": "gan-kiina", + "gay": "gajo", + "gba": "gbaja", + "gbz": "zoroastrialaisdari", + "gd": "gaeli", + "gez": "ge’ez", + "gil": "kiribati", + "gl": "galicia", + "glk": "gilaki", + "gmh": "keskiyläsaksa", + "gn": "guarani", + "goh": "muinaisyläsaksa", + "gom": "goankonkani", + "gon": "gondi", + "gor": "gorontalo", + "got": "gootti", + "grb": "grebo", + "grc": "muinaiskreikka", + "gsw": "sveitsinsaksa", + "gu": "gudžarati", + "guc": "wayuu", + "gur": "frafra", + "guz": "gusii", + "gv": "manksi", + "gwi": "gwitÅ¡in", + "ha": "hausa", + "hai": "haida", + "hak": "hakka-kiina", + "haw": "havaiji", + "he": "heprea", + "hi": "hindi", + "hif": "fidžinhindi", + "hil": "hiligaino", + "hit": "heetti", + "hmn": "hmong", + "ho": "hiri-motu", + "hr": "kroatia", + "hsb": "yläsorbi", + "hsn": "xiang-kiina", + "ht": "haiti", + "hu": "unkari", + "hup": "hupa", + "hy": "armenia", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonesia", + "ie": "interlingue", + "ig": "igbo", + "ii": "sichuanin-yi", + "ik": "inupiaq", + "ilo": "iloko", + "inh": "inguuÅ¡i", + "io": "ido", + "is": "islanti", + "it": "italia", + "iu": "inuktitut", + "izh": "inkeroinen", + "ja": "japani", + "jam": "jamaikankreolienglanti", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jpr": "juutalaispersia", + "jrb": "juutalaisarabia", + "jut": "juutti", + "jv": "jaava", + "ka": "georgia", + "kaa": "karakalpakki", + "kab": "kabyyli", + "kac": "katÅ¡in", + "kaj": "jju", + "kam": "kamba", + "kaw": "kavi", + "kbd": "kabardi", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "kapverdenkreoli", + "ken": "kenyang", + "kfo": "norsunluurannikonkoro", + "kg": "kongo", + "kgp": "kaingang", + "kha": "khasi", + "kho": "khotani", + "khq": "koyra chiini", + "khw": "khowar", + "ki": "kikuju", + "kiu": "kirmanjki", + "kj": "kuanjama", + "kk": "kazakki", + "kkj": "kako", + "kl": "kalaallisut", + "kln": "kalenjin", + "km": "khmer", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "korea", + "koi": "komipermjakki", + "kok": "konkani", + "kos": "kosrae", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karatÅ¡ai-balkaari", + "kri": "krio", + "krj": "kinaray-a", + "krl": "karjala", + "kru": "kurukh", + "ks": "kaÅ¡miri", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "kölsch", + "ku": "kurdi", + "kum": "kumykki", + "kut": "kutenai", + "kv": "komi", + "kw": "korni", + "ky": "kirgiisi", + "la": "latina", + "lad": "ladino", + "lag": "lango", + "lah": "lahnda", + "lam": "lamba", + "lb": "luxemburg", + "lez": "lezgi", + "lfn": "lingua franca nova", + "lg": "ganda", + "li": "limburg", + "lij": "liguuri", + "liv": "liivi", + "lkt": "lakota", + "lmo": "lombardi", + "ln": "lingala", + "lo": "lao", + "lol": "mongo", + "loz": "lozi", + "lrc": "pohjoisluri", + "lt": "liettua", + "ltg": "latgalli", + "lu": "katanganluba", + "lua": "luluanluba", + "lui": "luiseño", + "lun": "lunda", + "luo": "luo", + "lus": "lusai", + "luy": "luhya", + "lv": "latvia", + "lzh": "klassinen kiina", + "lzz": "lazi", + "mad": "madura", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makassar", + "man": "mandingo", + "mas": "maasai", + "mde": "maba", + "mdf": "mokÅ¡a", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "morisyen", + "mg": "malagassi", + "mga": "keski-iiri", + "mgh": "makua-meetto", + "mgo": "meta’", + "mh": "marshall", + "mi": "maori", + "mic": "micmac", + "min": "minangkabau", + "mk": "makedonia", + "ml": "malajalam", + "mn": "mongoli", + "mnc": "mantÅ¡u", + "mni": "manipuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "marathi", + "mrj": "vuorimari", + "ms": "malaiji", + "mt": "malta", + "mua": "mundang", + "mul": "useita kieliä", + "mus": "creek", + "mwl": "mirandeesi", + "mwr": "marwari", + "mwv": "mentawai", + "my": "burma", + "mye": "myene", + "myv": "ersä", + "mzn": "mazandarani", + "na": "nauru", + "nan": "min nan -kiina", + "nap": "napoli", + "naq": "nama", + "nb": "norjan bokmÃ¥l", + "nd": "pohjois-ndebele", + "nds": "alasaksa", + "nds_NL": "alankomaidenalasaksa", + "ne": "nepali", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niue", + "njo": "ao naga", + "nl": "hollanti", + "nl_BE": "flaami", + "nmg": "kwasio", + "nn": "norjan nynorsk", + "nnh": "ngiemboon", + "no": "norja", + "nog": "nogai", + "non": "muinaisnorja", + "nov": "novial", + "nqo": "n’ko", + "nr": "etelä-ndebele", + "nso": "pohjoissotho", + "nus": "nuer", + "nv": "navajo", + "nwc": "klassinen newari", + "ny": "njandža", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzima", + "oc": "oksitaani", + "oj": "odžibwa", + "om": "oromo", + "or": "orija", + "os": "osseetti", + "osa": "osage", + "ota": "osmani", + "pa": "pandžabi", + "pag": "pangasinan", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamentu", + "pau": "palau", + "pcd": "picardi", + "pcm": "nigerianpidgin", + "pdc": "pennsylvaniansaksa", + "pdt": "plautdietsch", + "peo": "muinaispersia", + "pfl": "pfaltsi", + "phn": "foinikia", + "pi": "paali", + "pl": "puola", + "pms": "piemonte", + "pnt": "pontoksenkreikka", + "pon": "pohnpei", + "prg": "muinaispreussi", + "pro": "muinaisprovensaali", + "ps": "paÅ¡tu", + "pt": "portugali", + "pt_BR": "brasilianportugali", + "pt_PT": "euroopanportugali", + "qu": "ketÅ¡ua", + "quc": "kʼicheʼ", + "qug": "chimborazonylänköketÅ¡ua", + "raj": "radžastani", + "rap": "rapanui", + "rar": "rarotonga", + "rgn": "romagnoli", + "rif": "tarifit", + "rm": "retoromaani", + "rn": "rundi", + "ro": "romania", + "ro_MD": "moldova", + "rof": "rombo", + "rom": "romani", + "root": "juuri", + "rtm": "rotuma", + "ru": "venäjä", + "rue": "ruteeni", + "rug": "roviana", + "rup": "aromania", + "rw": "ruanda", + "rwk": "rwa", + "sa": "sanskrit", + "sad": "sandawe", + "sah": "jakuutti", + "sam": "samarianaramea", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "saz": "sauraÅ¡tri", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardi", + "scn": "sisilia", + "sco": "skotti", + "sd": "sindhi", + "sdc": "sassarinsardi", + "sdh": "eteläkurdi", + "se": "pohjoissaame", + "see": "seneca", + "seh": "sena", + "sei": "seri", + "sel": "selkuppi", + "ses": "koyraboro senni", + "sg": "sango", + "sga": "muinaisiiri", + "sgs": "samogiitti", + "sh": "serbokroaatti", + "shi": "taÅ¡elhit", + "shn": "shan", + "shu": "tÅ¡adinarabia", + "si": "sinhala", + "sid": "sidamo", + "sk": "slovakki", + "sl": "sloveeni", + "sli": "sleesiansaksa", + "sly": "selayar", + "sm": "samoa", + "sma": "eteläsaame", + "smj": "luulajansaame", + "smn": "inarinsaame", + "sms": "koltansaame", + "sn": "Å¡ona", + "snk": "soninke", + "so": "somali", + "sog": "sogdi", + "sq": "albania", + "sr": "serbia", + "srn": "sranan", + "srr": "serer", + "ss": "swazi", + "ssy": "saho", + "st": "eteläsotho", + "stq": "saterlandinfriisi", + "su": "sunda", + "suk": "sukuma", + "sus": "susu", + "sux": "sumeri", + "sv": "ruotsi", + "sw": "swahili", + "sw_CD": "kingwana", + "swb": "komori", + "syc": "muinaissyyria", + "syr": "syyria", + "szl": "sleesia", + "ta": "tamili", + "tcy": "tulu", + "te": "telugu", + "tem": "temne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadžikki", + "th": "thai", + "ti": "tigrinja", + "tig": "tigre", + "tiv": "tiv", + "tk": "turkmeeni", + "tkl": "tokelau", + "tkr": "tsahuri", + "tl": "tagalog", + "tlh": "klingon", + "tli": "tlingit", + "tly": "taliÅ¡i", + "tmh": "tamaÅ¡ek", + "tn": "tswana", + "to": "tonga", + "tog": "malawintonga", + "tpi": "tok-pisin", + "tr": "turkki", + "tru": "turojo", + "trv": "taroko", + "ts": "tsonga", + "tsd": "tsakonia", + "tsi": "tsimÅ¡i", + "tt": "tataari", + "ttt": "tati", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahiti", + "tyv": "tuva", + "tzm": "keskiatlaksentamazight", + "udm": "udmurtti", + "ug": "uiguuri", + "uga": "ugarit", + "uk": "ukraina", + "umb": "mbundu", + "und": "tuntematon kieli", + "ur": "urdu", + "uz": "uzbekki", + "vai": "vai", + "ve": "venda", + "vec": "venetsia", + "vep": "vepsä", + "vi": "vietnam", + "vls": "länsiflaami", + "vmf": "maininfrankki", + "vo": "volapük", + "vot": "vatja", + "vro": "võro", + "vun": "vunjo", + "wa": "valloni", + "wae": "walser", + "wal": "wolaitta", + "war": "waray", + "was": "washo", + "wbp": "warlpiri", + "wo": "wolof", + "wuu": "wu-kiina", + "xal": "kalmukki", + "xh": "xhosa", + "xmf": "mingreli", + "xog": "soga", + "yao": "jao", + "yap": "japi", + "yav": "yangben", + "ybb": "yemba", + "yi": "jiddiÅ¡", + "yo": "joruba", + "yrl": "ñeengatú", + "yue": "kantoninkiina", + "za": "zhuang", + "zap": "zapoteekki", + "zbl": "blisskieli", + "zea": "seelanti", + "zen": "zenaga", + "zgh": "vakioitu tamazight", + "zh": "kiina", + "zh_Hans": "yksinkertaistettu kiina", + "zh_Hant": "perinteinen kiina", + "zu": "zulu", + "zun": "zuni", + "zxx": "ei kielellistä sisältöä", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fo.json new file mode 100644 index 0000000000000000000000000000000000000000..af84846b1457cce4fe4f0d6013e96434a8018b86 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fo.json @@ -0,0 +1,403 @@ +{ + "Version": "2.1.28.76", + "Names": { + "aa": "afar", + "ab": "abkhasiskt", + "ace": "achinese", + "ada": "adangme", + "ady": "adyghe", + "af": "afrikaans", + "agq": "aghem", + "ain": "ainu", + "ak": "akan", + "ale": "aleut", + "alt": "suður altai", + "am": "amhariskt", + "an": "aragoniskt", + "anp": "angika", + "ar": "arabiskt", + "ar_001": "nútíðar vanligt arabiskt", + "arn": "mapuche", + "arp": "arapaho", + "as": "assamesiskt", + "asa": "asu", + "ast": "asturianskt", + "av": "avariskt", + "awa": "awadhi", + "ay": "aymara", + "az": "aserbajdsjanskt", + "ba": "bashkir", + "ban": "balinesiskt", + "bas": "basaa", + "be": "hvitarussiskt", + "bem": "bemba", + "bez": "bena", + "bg": "bulgarskt", + "bgn": "vestur balochi", + "bho": "bhojpuri", + "bi": "bislama", + "bin": "bini", + "bla": "siksika", + "bm": "bambara", + "bn": "bengalskt", + "bo": "tibetskt", + "br": "bretonskt", + "brx": "bodo", + "bs": "bosniskt", + "bss": "bakossi", + "bug": "buginesiskt", + "byn": "blin", + "ca": "katalani", + "ce": "tjetjenskt", + "ceb": "cebuano", + "cgg": "chiga", + "ch": "chamorro", + "chk": "chuukese", + "chm": "mari", + "cho": "choctaw", + "chr": "cherokee", + "chy": "cheyenne", + "ckb": "miðkurdiskt", + "co": "korsikanskt", + "crs": "seselwa creole franskt", + "cs": "kekkiskt", + "cu": "kirkju sláviskt", + "cv": "chuvash", + "cy": "walisiskt", + "da": "danskt", + "dak": "dakota", + "dar": "dargwa", + "dav": "taita", + "de": "týskt", + "de_CH": "høgt týskt (Sveis)", + "dgr": "dogrib", + "dje": "sarma", + "dsb": "lágt sorbian", + "dua": "duala", + "dv": "divehi", + "dyo": "jola-fonyi", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embu", + "ee": "ewe", + "efi": "efik", + "eka": "ekajuk", + "el": "grikskt", + "en": "enskt", + "eo": "esperanto", + "es": "spanskt", + "et": "estiskt", + "eu": "baskiskt", + "ewo": "ewondo", + "fa": "persiskt", + "ff": "fulah", + "fi": "finskt", + "fil": "filipiniskt", + "fj": "fijimál", + "fo": "føroyskt", + "fon": "fon", + "fr": "franskt", + "fur": "friuliskt", + "fy": "vestur frísiskt", + "ga": "írskt", + "gaa": "ga", + "gag": "gagauz", + "gan": "gan kinesiskt", + "gd": "skotskt gæliskt", + "gez": "geez", + "gil": "kiribatiskt", + "gl": "galisiskt", + "gn": "guarani", + "gor": "gorontalo", + "gsw": "týskt (Sveis)", + "gu": "gujarati", + "guz": "gusii", + "gv": "manx", + "gwi": "gwich’in", + "ha": "hausa", + "hak": "hakka kinesiskt", + "haw": "hawaiianskt", + "he": "hebraiskt", + "hi": "hindi", + "hil": "hiligaynon", + "hmn": "hmong", + "hr": "kroatiskt", + "hsb": "ovara sorbian", + "hsn": "xiang kinesiskt", + "ht": "haitiskt", + "hu": "ungarskt", + "hup": "hupa", + "hy": "armenskt", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonesiskt", + "ie": "interlingue", + "ig": "igbo", + "ii": "sichuan yi", + "ilo": "iloko", + "inh": "inguish", + "io": "ido", + "is": "íslendskt", + "it": "italskt", + "iu": "inuktitut", + "ja": "japanskt", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jv": "javanskt", + "ka": "georgiskt", + "kab": "kabyle", + "kac": "kachin", + "kaj": "jju", + "kam": "kamba", + "kbd": "kabardinskt", + "kcg": "tyap", + "kde": "makonde", + "kea": "grønhøvdaoyggjarskt", + "kfo": "koro", + "kha": "khasi", + "khq": "koyra chiini", + "ki": "kikuyu", + "kj": "kuanyama", + "kk": "kazakh", + "kkj": "kako", + "kl": "kalaallisut", + "kln": "kalenjin", + "km": "khmer", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "koreanskt", + "koi": "komi-permyak", + "kok": "konkani", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karachay-balkar", + "krl": "karelskt", + "kru": "kurukh", + "ks": "kashmiri", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "kølnskt", + "ku": "kurdiskt", + "kum": "kumyk", + "kv": "komi", + "kw": "corniskt", + "ky": "kyrgyz", + "la": "latín", + "lad": "ladino", + "lag": "langi", + "lah": "lahnda", + "lb": "luksemborgskt", + "lez": "lezghian", + "lg": "ganda", + "li": "limburgiskt", + "lkt": "lakota", + "ln": "lingala", + "lo": "laoskt", + "loz": "lozi", + "lrc": "norður luri", + "lt": "litaviskt", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lun": "lunda", + "luo": "luo", + "lus": "mizo", + "luy": "luyia", + "lv": "lettiskt", + "mad": "maduresiskt", + "mag": "magahi", + "mai": "maithili", + "mak": "makasar", + "mas": "masai", + "mdf": "moksha", + "men": "mende", + "mer": "meru", + "mfe": "morisyen", + "mg": "malagassiskt", + "mgh": "makhuwa-meetto", + "mgo": "metaʼ", + "mh": "marshallesiskt", + "mi": "maori", + "mic": "micmac", + "min": "minangkabau", + "mk": "makedónskt", + "ml": "malayalam", + "mn": "mongolskt", + "mni": "manupuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "marathi", + "ms": "malaiiskt", + "mt": "maltiskt", + "mua": "mundang", + "mul": "ymisk mál", + "mus": "creek", + "mwl": "mirandesiskt", + "my": "burmesiskt", + "myv": "erzya", + "mzn": "mazanderani", + "na": "nauru", + "nan": "min nan kinesiskt", + "nap": "napolitanskt", + "naq": "nama", + "nb": "norskt bókmál", + "nd": "norður ndebele", + "nds": "lágt týskt", + "nds_NL": "lágt saksiskt", + "ne": "nepalskt", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niuean", + "nl": "hálendskt", + "nl_BE": "flamskt", + "nmg": "kwasio", + "nn": "nýnorskt", + "nnh": "ngiemboon", + "no": "norskt", + "nog": "nogai", + "nqo": "nʼko", + "nr": "suður ndebele", + "nso": "norður sotho", + "nus": "nuer", + "nv": "navajo", + "ny": "nyanja", + "nyn": "nyankole", + "oc": "occitanskt", + "om": "oromo", + "or": "oriya", + "os": "ossetiskt", + "pa": "punjabi", + "pag": "pangasinan", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauan", + "pcm": "nigeriskt pidgin", + "pl": "pólskt", + "prg": "prusslanskt", + "ps": "pashto", + "pt": "portugiskiskt", + "pt_BR": "portugiskiskt (Brasilia)", + "pt_PT": "portugiskiskt (Evropa)", + "qu": "quechua", + "quc": "kʼicheʼ", + "rap": "rapanui", + "rar": "rarotongiskt", + "rm": "retoromanskt", + "rn": "rundi", + "ro": "rumenskt", + "ro_MD": "moldaviskt", + "rof": "rombo", + "root": "root", + "ru": "russiskt", + "rup": "aromenskt", + "rw": "kinyarwanda", + "rwk": "rwa", + "sa": "sanskrit", + "sad": "sandawe", + "sah": "sakha", + "saq": "samburu", + "sat": "santali", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardiskt", + "scn": "sisilanskt", + "sco": "skotskt", + "sd": "sindhi", + "sdh": "suður kurdiskt", + "se": "norður sámiskt", + "seh": "sena", + "ses": "koyraboro senni", + "sg": "sango", + "sh": "serbokroatiskt", + "shi": "tachelhit", + "shn": "shan", + "si": "singalesiskt", + "sk": "slovakiskt", + "sl": "slovenskt", + "sm": "sámoiskt", + "sma": "suður sámiskt", + "smj": "lule sámiskt", + "smn": "inari sami", + "sms": "skolt sámiskt", + "sn": "shona", + "snk": "soninke", + "so": "somaliskt", + "sq": "albanskt", + "sr": "serbiskt", + "srn": "sranan tongo", + "ss": "swatiskt", + "ssy": "saho", + "st": "sesotho", + "su": "sundanesiskt", + "suk": "sukuma", + "sv": "svenskt", + "sw": "swahili", + "sw_CD": "kongo svahili", + "swb": "komoriskt", + "syr": "syriac", + "ta": "tamilskt", + "te": "telugu", + "tem": "timne", + "teo": "teso", + "tet": "tetum", + "tg": "tajik", + "th": "tailendskt", + "ti": "tigrinya", + "tig": "tigre", + "tk": "turkmenskt", + "tl": "tagalog", + "tlh": "klingonskt", + "tn": "tswana", + "to": "tonganskt", + "tpi": "tok pisin", + "tr": "turkiskt", + "trv": "taroko", + "ts": "tsonga", + "tt": "tatar", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitiskt", + "tyv": "tuvinian", + "tzm": "miðatlasfjøll tamazight", + "udm": "udmurt", + "ug": "uyghur", + "uk": "ukrainskt", + "umb": "umbundu", + "und": "ókent mál", + "ur": "urdu", + "uz": "usbekiskt", + "vai": "vai", + "ve": "venda", + "vi": "vjetnamesiskt", + "vo": "volapykk", + "vun": "vunjo", + "wa": "walloon", + "wae": "walser", + "wal": "wolaytta", + "war": "waray", + "wbp": "warlpiri", + "wo": "wolof", + "wuu": "wu kinesiskt", + "xal": "kalmyk", + "xh": "xhosa", + "xog": "soga", + "yav": "yangben", + "ybb": "yemba", + "yi": "jiddiskt", + "yo": "yoruba", + "yue": "kantonesiskt", + "zgh": "vanligt marokanskt tamazight", + "zh": "kinesiskt", + "zh_Hans": "einkult kinesiskt", + "zh_Hant": "vanligt kinesiskt", + "zu": "sulu", + "zun": "zuni", + "zxx": "einki málsligt innihald", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fr.json new file mode 100644 index 0000000000000000000000000000000000000000..9d0f184f88fd997e6035c0a4d778c4735fd96436 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fr.json @@ -0,0 +1,616 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afar", + "ab": "abkhaze", + "ace": "aceh", + "ach": "acoli", + "ada": "adangme", + "ady": "adyghéen", + "ae": "avestique", + "aeb": "arabe tunisien", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "aïnou", + "ak": "akan", + "akk": "akkadien", + "akz": "alabama", + "ale": "aléoute", + "aln": "guègue", + "alt": "altaï du Sud", + "am": "amharique", + "an": "aragonais", + "ang": "ancien anglais", + "anp": "angika", + "ar": "arabe", + "ar_001": "arabe standard moderne", + "arc": "araméen", + "arn": "mapuche", + "aro": "araona", + "arp": "arapaho", + "arq": "arabe algérien", + "arw": "arawak", + "ary": "arabe marocain", + "arz": "arabe égyptien", + "as": "assamais", + "asa": "assou", + "ase": "langue des signes américaine", + "ast": "asturien", + "av": "avar", + "avk": "kotava", + "awa": "awadhi", + "ay": "aymara", + "az": "azéri", + "ba": "bachkir", + "bal": "baloutchi", + "ban": "balinais", + "bar": "bavarois", + "bas": "bassa", + "bax": "bamoun", + "bbc": "batak toba", + "bbj": "ghomala", + "be": "biélorusse", + "bej": "bedja", + "bem": "bemba", + "bew": "betawi", + "bez": "béna", + "bfd": "bafut", + "bfq": "badaga", + "bg": "bulgare", + "bgn": "baloutchi occidental", + "bho": "bhojpuri", + "bi": "bichelamar", + "bik": "bikol", + "bin": "bini", + "bjn": "banjar", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bengali", + "bo": "tibétain", + "bpy": "bishnupriya", + "bqi": "bakhtiari", + "br": "breton", + "bra": "braj", + "brh": "brahoui", + "brx": "bodo", + "bs": "bosniaque", + "bss": "akoose", + "bua": "bouriate", + "bug": "bugi", + "bum": "boulou", + "byn": "blin", + "byv": "médumba", + "ca": "catalan", + "cad": "caddo", + "car": "caribe", + "cay": "cayuga", + "cch": "atsam", + "ce": "tchétchène", + "ceb": "cebuano", + "cgg": "kiga", + "ch": "chamorro", + "chb": "chibcha", + "chg": "tchaghataï", + "chk": "chuuk", + "chm": "mari", + "chn": "jargon chinook", + "cho": "choctaw", + "chp": "chipewyan", + "chr": "cherokee", + "chy": "cheyenne", + "ckb": "sorani", + "co": "corse", + "cop": "copte", + "cps": "capiznon", + "cr": "cree", + "crh": "turc de Crimée", + "crs": "créole seychellois", + "cs": "tchèque", + "csb": "kachoube", + "cu": "slavon d’église", + "cv": "tchouvache", + "cy": "gallois", + "da": "danois", + "dak": "dakota", + "dar": "dargwa", + "dav": "taita", + "de": "allemand", + "de_AT": "allemand autrichien", + "de_CH": "allemand suisse", + "del": "delaware", + "den": "esclave", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "bas-sorabe", + "dtp": "dusun central", + "dua": "douala", + "dum": "moyen néerlandais", + "dv": "maldivien", + "dyo": "diola-fogny", + "dyu": "dioula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embou", + "ee": "éwé", + "efi": "éfik", + "egl": "émilien", + "egy": "égyptien ancien", + "eka": "ékadjouk", + "el": "grec", + "elx": "élamite", + "en": "anglais", + "en_AU": "anglais australien", + "en_CA": "anglais canadien", + "en_GB": "anglais britannique", + "en_US": "anglais américain", + "enm": "moyen anglais", + "eo": "espéranto", + "es": "espagnol", + "esu": "youpik central", + "et": "estonien", + "eu": "basque", + "ewo": "éwondo", + "ext": "estrémègne", + "fa": "persan", + "fan": "fang", + "fat": "fanti", + "ff": "peul", + "fi": "finnois", + "fil": "filipino", + "fit": "finnois tornédalien", + "fj": "fidjien", + "fo": "féroïen", + "fon": "fon", + "fr": "français", + "fr_CA": "français canadien", + "fr_CH": "français suisse", + "frc": "français cadien", + "frm": "moyen français", + "fro": "ancien français", + "frp": "francoprovençal", + "frr": "frison du Nord", + "frs": "frison oriental", + "fur": "frioulan", + "fy": "frison occidental", + "ga": "irlandais", + "gaa": "ga", + "gag": "gagaouze", + "gan": "gan", + "gay": "gayo", + "gba": "gbaya", + "gbz": "dari zoroastrien", + "gd": "gaélique écossais", + "gez": "guèze", + "gil": "gilbertin", + "gl": "galicien", + "glk": "gilaki", + "gmh": "moyen haut-allemand", + "gn": "guarani", + "goh": "ancien haut allemand", + "gom": "konkani de Goa", + "gon": "gondi", + "gor": "gorontalo", + "got": "gothique", + "grb": "grebo", + "grc": "grec ancien", + "gsw": "suisse allemand", + "gu": "goudjerati", + "guc": "wayuu", + "gur": "gurenne", + "guz": "gusii", + "gv": "mannois", + "gwi": "gwichʼin", + "ha": "haoussa", + "hai": "haida", + "hak": "hakka", + "haw": "hawaïen", + "he": "hébreu", + "hi": "hindi", + "hif": "hindi fidjien", + "hil": "hiligaynon", + "hit": "hittite", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "croate", + "hsb": "haut-sorabe", + "hsn": "xiang", + "ht": "créole haïtien", + "hu": "hongrois", + "hup": "hupa", + "hy": "arménien", + "hz": "héréro", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonésien", + "ie": "interlingue", + "ig": "igbo", + "ii": "yi du Sichuan", + "ik": "inupiaq", + "ilo": "ilokano", + "inh": "ingouche", + "io": "ido", + "is": "islandais", + "it": "italien", + "iu": "inuktitut", + "izh": "ingrien", + "ja": "japonais", + "jam": "créole jamaïcain", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "matchamé", + "jpr": "judéo-persan", + "jrb": "judéo-arabe", + "jut": "jute", + "jv": "javanais", + "ka": "géorgien", + "kaa": "karakalpak", + "kab": "kabyle", + "kac": "kachin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardin", + "kbl": "kanembou", + "kcg": "tyap", + "kde": "makondé", + "kea": "capverdien", + "ken": "kényang", + "kfo": "koro", + "kg": "kongo", + "kgp": "caingangue", + "kha": "khasi", + "kho": "khotanais", + "khq": "koyra chiini", + "khw": "khowar", + "ki": "kikuyu", + "kiu": "kirmanjki", + "kj": "kouanyama", + "kk": "kazakh", + "kkj": "kako", + "kl": "groenlandais", + "kln": "kalendjin", + "km": "khmer", + "kmb": "kimboundou", + "kn": "kannada", + "ko": "coréen", + "koi": "komi-permiak", + "kok": "konkani", + "kos": "kosraéen", + "kpe": "kpellé", + "kr": "kanouri", + "krc": "karatchaï balkar", + "kri": "krio", + "krj": "kinaray-a", + "krl": "carélien", + "kru": "kouroukh", + "ks": "kashmiri", + "ksb": "chambala", + "ksf": "bafia", + "ksh": "francique ripuaire", + "ku": "kurde", + "kum": "koumyk", + "kut": "kutenai", + "kv": "komi", + "kw": "cornique", + "ky": "kirghize", + "la": "latin", + "lad": "ladino", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "luxembourgeois", + "lez": "lezghien", + "lfn": "lingua franca nova", + "lg": "ganda", + "li": "limbourgeois", + "lij": "ligure", + "liv": "livonien", + "lkt": "lakota", + "lmo": "lombard", + "ln": "lingala", + "lo": "lao", + "lol": "mongo", + "loz": "lozi", + "lrc": "lori du Nord", + "lt": "lituanien", + "ltg": "latgalien", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseño", + "lun": "lunda", + "luo": "luo", + "lus": "lushaï", + "luy": "luhya", + "lv": "letton", + "lzh": "chinois littéraire", + "lzz": "laze", + "mad": "madourais", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makassar", + "man": "mandingue", + "mas": "massaï", + "mde": "maba", + "mdf": "moksa", + "mdr": "mandar", + "men": "mendé", + "mer": "mérou", + "mfe": "créole mauricien", + "mg": "malgache", + "mga": "moyen irlandais", + "mgh": "makhuwa-meetto", + "mgo": "méta’", + "mh": "marshallais", + "mi": "maori", + "mic": "micmac", + "min": "minangkabau", + "mk": "macédonien", + "ml": "malayalam", + "mn": "mongol", + "mnc": "mandchou", + "mni": "manipuri", + "moh": "mohawk", + "mos": "moré", + "mr": "marathe", + "mrj": "mari occidental", + "ms": "malais", + "mt": "maltais", + "mua": "moundang", + "mul": "multilingue", + "mus": "creek", + "mwl": "mirandais", + "mwr": "marwarî", + "mwv": "mentawaï", + "my": "birman", + "mye": "myènè", + "myv": "erzya", + "mzn": "mazandérani", + "na": "nauruan", + "nan": "minnan", + "nap": "napolitain", + "naq": "nama", + "nb": "norvégien bokmÃ¥l", + "nd": "ndébélé du Nord", + "nds": "bas-allemand", + "nds_NL": "bas-saxon néerlandais", + "ne": "népalais", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niuéen", + "njo": "Ao", + "nl": "néerlandais", + "nl_BE": "flamand", + "nmg": "kwasio", + "nn": "norvégien nynorsk", + "nnh": "ngiemboon", + "no": "norvégien", + "nog": "nogaï", + "non": "vieux norrois", + "nov": "novial", + "nqo": "n’ko", + "nr": "ndébélé du Sud", + "nso": "sotho du Nord", + "nus": "nuer", + "nv": "navaho", + "nwc": "newarî classique", + "ny": "nyanja", + "nym": "nyamwezi", + "nyn": "nyankolé", + "nyo": "nyoro", + "nzi": "nzema", + "oc": "occitan", + "oj": "ojibwa", + "om": "oromo", + "or": "oriya", + "os": "ossète", + "osa": "osage", + "ota": "turc ottoman", + "pa": "pendjabi", + "pag": "pangasinan", + "pal": "pahlavi", + "pam": "pampangan", + "pap": "papiamento", + "pau": "palau", + "pcd": "picard", + "pcm": "pidgin nigérian", + "pdc": "pennsilfaanisch", + "pdt": "bas-prussien", + "peo": "persan ancien", + "pfl": "allemand palatin", + "phn": "phénicien", + "pi": "pali", + "pl": "polonais", + "pms": "piémontais", + "pnt": "pontique", + "pon": "pohnpei", + "prg": "prussien", + "pro": "provençal ancien", + "ps": "pachto", + "pt": "portugais", + "pt_BR": "portugais brésilien", + "pt_PT": "portugais européen", + "qu": "quechua", + "quc": "k’iche’", + "qug": "quichua du Haut-Chimborazo", + "raj": "rajasthani", + "rap": "rapanui", + "rar": "rarotongien", + "rgn": "romagnol", + "rif": "rifain", + "rm": "romanche", + "rn": "roundi", + "ro": "roumain", + "ro_MD": "moldave", + "rof": "rombo", + "rom": "romani", + "root": "racine", + "rtm": "rotuman", + "ru": "russe", + "rue": "ruthène", + "rug": "roviana", + "rup": "valaque", + "rw": "rwanda", + "rwk": "rwa", + "sa": "sanskrit", + "sad": "sandawe", + "sah": "iakoute", + "sam": "araméen samaritain", + "saq": "sambourou", + "sas": "sasak", + "sat": "santal", + "saz": "saurashtra", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sarde", + "scn": "sicilien", + "sco": "écossais", + "sd": "sindhi", + "sdc": "sarde sassarais", + "sdh": "kurde du Sud", + "se": "sami du Nord", + "see": "seneca", + "seh": "cisena", + "sei": "séri", + "sel": "selkoupe", + "ses": "koyraboro senni", + "sg": "sangho", + "sga": "ancien irlandais", + "sgs": "samogitien", + "sh": "serbo-croate", + "shi": "chleuh", + "shn": "shan", + "shu": "arabe tchadien", + "si": "cinghalais", + "sid": "sidamo", + "sk": "slovaque", + "sl": "slovène", + "sli": "bas-silésien", + "sly": "sélayar", + "sm": "samoan", + "sma": "sami du Sud", + "smj": "sami de Lule", + "smn": "sami d’Inari", + "sms": "sami skolt", + "sn": "shona", + "snk": "soninké", + "so": "somali", + "sog": "sogdien", + "sq": "albanais", + "sr": "serbe", + "srn": "sranan tongo", + "srr": "sérère", + "ss": "swati", + "ssy": "saho", + "st": "sotho du Sud", + "stq": "saterlandais", + "su": "soundanais", + "suk": "soukouma", + "sus": "soussou", + "sux": "sumérien", + "sv": "suédois", + "sw": "swahili", + "sw_CD": "swahili du Congo", + "swb": "comorien", + "syc": "syriaque classique", + "syr": "syriaque", + "szl": "silésien", + "ta": "tamoul", + "tcy": "toulou", + "te": "télougou", + "tem": "temne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadjik", + "th": "thaï", + "ti": "tigrigna", + "tig": "tigré", + "tiv": "tiv", + "tk": "turkmène", + "tkl": "tokelau", + "tkr": "tsakhour", + "tl": "tagalog", + "tlh": "klingon", + "tli": "tlingit", + "tly": "talysh", + "tmh": "tamacheq", + "tn": "tswana", + "to": "tonguien", + "tog": "tonga nyasa", + "tpi": "tok pisin", + "tr": "turc", + "tru": "touroyo", + "trv": "taroko", + "ts": "tsonga", + "tsd": "tsakonien", + "tsi": "tsimshian", + "tt": "tatar", + "ttt": "tati caucasien", + "tum": "toumbouka", + "tvl": "tuvalu", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitien", + "tyv": "touva", + "tzm": "tamazight du Maroc central", + "udm": "oudmourte", + "ug": "ouïghour", + "uga": "ougaritique", + "uk": "ukrainien", + "umb": "oumboundou", + "und": "langue indéterminée", + "ur": "ourdou", + "uz": "ouzbek", + "vai": "vaï", + "ve": "venda", + "vec": "vénitien", + "vep": "vepse", + "vi": "vietnamien", + "vls": "flamand occidental", + "vmf": "franconien du Main", + "vo": "volapuk", + "vot": "vote", + "vro": "võro", + "vun": "vunjo", + "wa": "wallon", + "wae": "walser", + "wal": "walamo", + "war": "waray", + "was": "washo", + "wbp": "warlpiri", + "wo": "wolof", + "wuu": "wu", + "xal": "kalmouk", + "xh": "xhosa", + "xmf": "mingrélien", + "xog": "soga", + "yao": "yao", + "yap": "yapois", + "yav": "yangben", + "ybb": "yemba", + "yi": "yiddish", + "yo": "yoruba", + "yrl": "nheengatou", + "yue": "cantonais", + "za": "zhuang", + "zap": "zapotèque", + "zbl": "symboles Bliss", + "zea": "zélandais", + "zen": "zenaga", + "zgh": "amazighe standard marocain", + "zh": "chinois", + "zh_Hans": "chinois simplifié", + "zh_Hant": "chinois traditionnel", + "zu": "zoulou", + "zun": "zuñi", + "zxx": "sans contenu linguistique", + "zza": "zazaki" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fr_BE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fr_BE.json new file mode 100644 index 0000000000000000000000000000000000000000..6ec770c4b71f96bcc041790cc5d95f9b725ecbc7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fr_BE.json @@ -0,0 +1,15 @@ +{ + "Version": "2.1.27.40", + "Names": { + "frp": "franco-provençal", + "goh": "ancien haut-allemand", + "got": "gotique", + "gu": "gujarati", + "njo": "ao", + "se": "same du Nord", + "sma": "same du Sud", + "smj": "same de Lule", + "smn": "same d’Inari", + "sms": "same skolt" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fr_CA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fr_CA.json new file mode 100644 index 0000000000000000000000000000000000000000..6d987ac30068f30b333928099ba862abc262254e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fr_CA.json @@ -0,0 +1,62 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ady": "adygué", + "ang": "vieil anglais", + "arn": "araukan", + "az": "azerbaïdjanais", + "bez": "bena", + "bik": "bicol", + "byn": "bilen", + "byv": "medumba", + "chg": "tchagatay", + "chn": "chinook", + "ckb": "kurde central", + "cr": "cri", + "den": "slave", + "dgr": "tlicho", + "esu": "yupik central", + "ewo": "ewondo", + "frc": "cajun", + "goh": "vieux haut-allemand", + "gu": "gujarati", + "ilo": "ilocano", + "kbd": "kabarde", + "ken": "kenyang", + "kl": "kalaallisut", + "ksh": "kölsch", + "liv": "live", + "luo": "luo", + "lzh": "chinois classique", + "mgo": "meta’", + "mwr": "marwari", + "nds": "bas allemand", + "nds_NL": "bas saxon", + "njo": "ao naga", + "nwc": "newari classique", + "nyn": "nkole", + "or": "odia", + "pau": "palauan", + "pdc": "allemand de Pennsylvanie", + "pdt": "bas allemand mennonite", + "peo": "vieux perse", + "pfl": "palatin", + "pro": "ancien occitan", + "rar": "rarotonga", + "rup": "aroumain", + "sat": "santali", + "sdh": "kurde méridional", + "se": "same du Nord", + "sei": "seri", + "sg": "sango", + "sga": "vieil irlandais", + "sly": "selayar", + "sma": "same du Sud", + "smj": "same de Lule", + "sms": "same skolt", + "sw_CD": "swahili congolais", + "tru": "turoyo", + "tzm": "tamazight", + "vo": "volapük" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fr_CH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fr_CH.json new file mode 100644 index 0000000000000000000000000000000000000000..7a98f48b07ba25eb61268a2025a51269a901da89 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fr_CH.json @@ -0,0 +1,8 @@ +{ + "Version": "2.1.27.96", + "Names": { + "gu": "goudjrati", + "pdc": "allemand de Pennsylvanie", + "sdh": "kurde méridional" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fy.json new file mode 100644 index 0000000000000000000000000000000000000000..e13ecce5a1033e890a58b4fcf4627cf12d09ee03 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/fy.json @@ -0,0 +1,517 @@ +{ + "Version": "2.1.29.44", + "Names": { + "aa": "Afar", + "ab": "Abchazysk", + "ace": "Atjeesk", + "ach": "Akoli", + "ada": "Adangme", + "ady": "Adyghe", + "ae": "Avestysk", + "af": "Afrikaansk", + "afh": "Afrihili", + "agq": "Aghem", + "ain": "Ainu", + "ak": "Akan", + "akk": "Akkadysk", + "ale": "Aleut", + "alt": "Sûd-Altaïsk", + "am": "Amhaarsk", + "an": "Aragoneesk", + "ang": "âldingelsk", + "anp": "Angika", + "ar": "Arabysk", + "ar_001": "Modern standert Arabysk", + "arc": "Arameesk", + "arn": "Araukaansk", + "arp": "Arapaho", + "arw": "Arawak", + "as": "Assameesk", + "asa": "Asu", + "ast": "Asturysk", + "av": "Avarysk", + "awa": "Awadhi", + "ay": "Aymara", + "az": "Azerbeidzjaansk", + "ba": "Basjkiersk", + "bal": "Baloetsjysk", + "ban": "Balineesk", + "bas": "Basa", + "bax": "Bamoun", + "bbj": "Ghomala’", + "be": "Wyt-Russysk", + "bej": "Beja", + "bem": "Bemba", + "bez": "Bena", + "bfd": "Bafut", + "bg": "Bulgaarsk", + "bho": "Bhojpuri", + "bi": "Bislama", + "bik": "Bikol", + "bin": "Bini", + "bkm": "Kom", + "bla": "Siksika", + "bm": "Bambara", + "bn": "Bengaalsk", + "bo": "Tibetaansk", + "br": "Bretonsk", + "bra": "Braj", + "brx": "Bodo", + "bs": "Bosnysk", + "bss": "Akoose", + "bua": "Buriat", + "bug": "Bugineesk", + "bum": "Bulu", + "byn": "Blin", + "byv": "Medumba", + "ca": "Katalaansk", + "cad": "Kaddo", + "car": "Karibysk", + "cay": "Cayuga", + "cch": "Atsam", + "ce": "Tsjetsjeensk", + "ceb": "Cebuano", + "cgg": "Chiga", + "ch": "Chamorro", + "chb": "Chibcha", + "chg": "Chagatai", + "chk": "Chuukeesk", + "chm": "Mari", + "chn": "Chinook-jargon", + "cho": "Choctaw", + "chp": "Chipewyan", + "chr": "Cherokee", + "chy": "Cheyenne", + "ckb": "Soranî", + "co": "Korsikaansk", + "cop": "Koptysk", + "cr": "Cree", + "crh": "Krim-Tataarsk", + "cs": "Tsjechysk", + "csb": "Kasjoebysk", + "cu": "Kerkslavysk", + "cv": "Tsjoevasjysk", + "cy": "Welsk", + "da": "Deensk", + "dak": "Dakota", + "dar": "Dargwa", + "dav": "Taita", + "de": "Dútsk", + "de_AT": "Eastenryks Dútsk", + "de_CH": "Switsersk Heechdútsk", + "del": "Delaware", + "den": "Slave", + "dgr": "Dogrib", + "din": "Dinka", + "dje": "Zarma", + "doi": "Dogri", + "dsb": "Nedersorbysk", + "dua": "Duala", + "dum": "Middelnederlânsk", + "dv": "Divehi", + "dyo": "Jola-Fonyi", + "dyu": "Dyula", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embu", + "ee": "Ewe", + "efi": "Efik", + "egy": "Aldegyptysk", + "eka": "Ekajuk", + "el": "Gryks", + "elx": "Elamitysk", + "en": "Ingelsk", + "en_AU": "Australysk Ingelsk", + "en_CA": "Kanadeesk Ingelsk", + "en_GB": "Britsk Ingelsk", + "en_US": "Amerikaansk Ingelsk", + "enm": "Middelingelsk", + "eo": "Esperanto", + "es": "Spaansk", + "es_419": "Latynsk-Amerikaansk Spaansk", + "es_ES": "Europeesk Spaansk", + "es_MX": "Meksikaansk Spaansk", + "et": "Estlânsk", + "eu": "Baskysk", + "ewo": "Ewondo", + "fa": "Perzysk", + "fan": "Fang", + "fat": "Fanti", + "ff": "Fulah", + "fi": "Finsk", + "fil": "Filipynsk", + "fj": "Fijysk", + "fo": "Faeröersk", + "fon": "Fon", + "fr": "Frânsk", + "fr_CA": "Kanadeesk Frânsk", + "fr_CH": "Switserse Frânsk", + "frm": "Middelfrânsk", + "fro": "Aldfrânsk", + "frr": "Noard-Frysk", + "frs": "East-Frysk", + "fur": "Friulysk", + "fy": "West-Frysk", + "ga": "Iersk", + "gaa": "Ga", + "gay": "Gayo", + "gba": "Gbaya", + "gd": "Schotsk Gaelic", + "gez": "Geez", + "gil": "Gilberteesk", + "gl": "Galisysk", + "gmh": "Middelheechdútsk", + "gn": "Guaraní", + "goh": "Alsheechdútsk", + "gon": "Gondi", + "gor": "Gorontalo", + "got": "Gothysk", + "grb": "Grebo", + "grc": "Aldgryks", + "gsw": "Switsers Dútsk", + "gu": "Gujarati", + "guz": "Gusii", + "gv": "Manks", + "gwi": "Gwichʼin", + "ha": "Hausa", + "hai": "Haida", + "haw": "Hawaïaansk", + "he": "Hebreeuwsk", + "hi": "Hindi", + "hil": "Hiligaynon", + "hit": "Hettitysk", + "hmn": "Hmong", + "ho": "Hiri Motu", + "hr": "Kroatysk", + "hsb": "Oppersorbysk", + "ht": "Haïtiaansk", + "hu": "Hongaarsk", + "hup": "Hupa", + "hy": "Armeensk", + "hz": "Herero", + "ia": "Interlingua", + "iba": "Iban", + "ibb": "Ibibio", + "id": "Yndonezysk", + "ie": "Interlingue", + "ig": "Igbo", + "ii": "Sichuan Yi", + "ik": "Inupiaq", + "ilo": "Iloko", + "inh": "Ingoesj", + "io": "Ido", + "is": "Yslâns", + "it": "Italiaansk", + "iu": "Inuktitut", + "ja": "Japans", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jpr": "Judeo-Perzysk", + "jrb": "Judeo-Arabysk", + "jv": "Javaansk", + "ka": "Georgysk", + "kaa": "Karakalpaks", + "kab": "Kabyle", + "kac": "Kachin", + "kaj": "Jju", + "kam": "Kamba", + "kaw": "Kawi", + "kbd": "Kabardysk", + "kbl": "Kanembu", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Kaapverdysk Creools", + "kfo": "Koro", + "kg": "Kongo", + "kha": "Khasi", + "kho": "Khotaneesk", + "khq": "Koyra Chiini", + "ki": "Kikuyu", + "kj": "Kuanyama", + "kk": "Kazachs", + "kkj": "Kako", + "kl": "Grienlâns", + "kln": "Kalenjin", + "km": "Khmer", + "kmb": "Kimbundu", + "kn": "Kannada", + "ko": "Koreaansk", + "kok": "Konkani", + "kos": "Kosraeaansk", + "kpe": "Kpelle", + "kr": "Kanuri", + "krc": "Karachay-Balkar", + "krl": "Karelysk", + "kru": "Kurukh", + "ks": "Kasjmiri", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Kölsch", + "ku": "Koerdysk", + "kum": "Koemuks", + "kut": "Kutenai", + "kv": "Komi", + "kw": "Cornish", + "ky": "Kirgizysk", + "la": "Latyn", + "lad": "Ladino", + "lag": "Langi", + "lah": "Lahnda", + "lam": "Lamba", + "lb": "Luxemburgs", + "lez": "Lezgysk", + "lg": "Ganda", + "li": "Limburgs", + "lkt": "Lakota", + "ln": "Lingala", + "lo": "Laotiaansk", + "lol": "Mongo", + "loz": "Lozi", + "lt": "Litouws", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lui": "Luiseno", + "lun": "Lunda", + "luo": "Luo", + "lus": "Lushai", + "luy": "Luyia", + "lv": "Letlâns", + "mad": "Madurees", + "maf": "Mafa", + "mag": "Magahi", + "mai": "Maithili", + "mak": "Makassaars", + "man": "Mandingo", + "mas": "Masai", + "mde": "Maba", + "mdf": "Moksha", + "mdr": "Mandar", + "men": "Mende", + "mer": "Meru", + "mfe": "Morisyen", + "mg": "Malagasysk", + "mga": "Middeliers", + "mgh": "Makhuwa-Meetto", + "mgo": "Meta’", + "mh": "Marshallees", + "mi": "Maori", + "mic": "Mi’kmaq", + "min": "Minangkabau", + "mk": "Macedonysk", + "ml": "Malayalam", + "mn": "Mongools", + "mnc": "Mantsjoe", + "mni": "Manipoeri", + "moh": "Mohawk", + "mos": "Mossi", + "mr": "Marathi", + "ms": "Maleis", + "mt": "Maltees", + "mua": "Mundang", + "mul": "Meardere talen", + "mus": "Creek", + "mwl": "Mirandees", + "mwr": "Marwari", + "my": "Birmees", + "mye": "Myene", + "myv": "Erzja", + "na": "Nauruaansk", + "nap": "Napolitaansk", + "naq": "Nama", + "nb": "Noors - BokmÃ¥l", + "nd": "Noard-Ndbele", + "nds": "Laagduits", + "ne": "Nepalees", + "new": "Newari", + "ng": "Ndonga", + "nia": "Nias", + "niu": "Niueaansk", + "nl": "Nederlânsk", + "nl_BE": "Vlaams", + "nmg": "Ngumba", + "nn": "Noors - Nynorsk", + "nnh": "Ngiemboon", + "no": "Noors", + "nog": "Nogai", + "non": "Aldnoarsk", + "nqo": "N’ko", + "nr": "Sûd-Ndbele", + "nso": "Noard-Sotho", + "nus": "Nuer", + "nv": "Navajo", + "nwc": "Klassiek Newari", + "ny": "Nyanja", + "nym": "Nyamwezi", + "nyn": "Nyankole", + "nyo": "Nyoro", + "nzi": "Nzima", + "oc": "Occitaansk", + "oj": "Ojibwa", + "om": "Oromo", + "or": "Odia", + "os": "Ossetysk", + "osa": "Osage", + "ota": "Ottomaansk-Turks", + "pa": "Punjabi", + "pag": "Pangasinan", + "pal": "Pahlavi", + "pam": "Pampanga", + "pap": "Papiaments", + "pau": "Palauaansk", + "peo": "Aldperzysk", + "phn": "Foenisysk", + "pi": "Pali", + "pl": "Poalsk", + "pon": "Pohnpeiaansk", + "pro": "Aldprovençaals", + "ps": "Pasjtoe", + "pt": "Portugeesk", + "pt_BR": "Brazyljaansk Portugees", + "pt_PT": "Europees Portugees", + "qu": "Quechua", + "raj": "Rajasthani", + "rap": "Rapanui", + "rar": "Rarotongan", + "rm": "Reto-Romaansk", + "rn": "Kirundi", + "ro": "Roemeensk", + "ro_MD": "Moldavysk", + "rof": "Rombo", + "rom": "Romani", + "root": "Root", + "ru": "Russysk", + "rup": "Aromaniaansk", + "rw": "Kinyarwanda", + "rwk": "Rwa", + "sa": "Sanskriet", + "sad": "Sandawe", + "sah": "Jakoets", + "sam": "Samaritaansk-Arameesk", + "saq": "Samburu", + "sas": "Sasak", + "sat": "Santali", + "sba": "Ngambay", + "sbp": "Sangu", + "sc": "Sardinysk", + "scn": "Siciliaansk", + "sco": "Schots", + "sd": "Sindhi", + "se": "Noard-Samysk", + "see": "Seneca", + "seh": "Sena", + "sel": "Selkup", + "ses": "Koyraboro Senni", + "sg": "Sango", + "sga": "Aldyrsk", + "sh": "Servokroatysk", + "shi": "Tashelhiyt", + "shn": "Shan", + "shu": "Tsjadysk Arabysk", + "si": "Singalees", + "sid": "Sidamo", + "sk": "Slowaaks", + "sl": "Sloveensk", + "sm": "Samoaansk", + "sma": "Sûd-Samysk", + "smj": "Lule Sami", + "smn": "Inari Sami", + "sms": "Skolt Sami", + "sn": "Shona", + "snk": "Soninke", + "so": "Somalysk", + "sog": "Sogdysk", + "sq": "Albaneesk", + "sr": "Servysk", + "srn": "Sranantongo", + "srr": "Serer", + "ss": "Swazi", + "ssy": "Saho", + "st": "Sûd-Sotho", + "su": "Soendaneesk", + "suk": "Sukuma", + "sus": "Soesoe", + "sux": "Soemerysk", + "sv": "Zweeds", + "sw": "Swahili", + "sw_CD": "Congo Swahili", + "swb": "Shimaore", + "syc": "Klassiek Syrysk", + "syr": "Syrysk", + "ta": "Tamil", + "te": "Telugu", + "tem": "Timne", + "teo": "Teso", + "ter": "Tereno", + "tet": "Tetun", + "tg": "Tadzjieks", + "th": "Thais", + "ti": "Tigrinya", + "tig": "Tigre", + "tiv": "Tiv", + "tk": "Turkmeens", + "tkl": "Tokelaus", + "tl": "Tagalog", + "tlh": "Klingon", + "tli": "Tlingit", + "tmh": "Tamashek", + "tn": "Tswana", + "to": "Tongaansk", + "tog": "Nyasa Tonga", + "tpi": "Tok Pisin", + "tr": "Turks", + "trv": "Taroko", + "ts": "Tsonga", + "tsi": "Tsimshian", + "tt": "Tataars", + "tum": "Toemboeka", + "tvl": "Tuvaluaansk", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Tahitysk", + "tyv": "Tuvinysk", + "tzm": "Tamazight (Sintraal-Marokko)", + "udm": "Oedmoerts", + "ug": "Oeigoers", + "uga": "Oegaritysk", + "uk": "Oekraïens", + "umb": "Umbundu", + "und": "Onbekende taal", + "ur": "Urdu", + "uz": "Oezbeeks", + "vai": "Vai", + "ve": "Venda", + "vi": "Vietnamees", + "vo": "Volapük", + "vot": "Votysk", + "vun": "Vunjo", + "wa": "Waals", + "wae": "Walser", + "wal": "Walamo", + "war": "Waray", + "was": "Washo", + "wo": "Wolof", + "xal": "Kalmyk", + "xh": "Xhosa", + "xog": "Soga", + "yao": "Yao", + "yap": "Yapees", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "Jiddysk", + "yo": "Yoruba", + "yue": "Kantoneesk", + "za": "Zhuang", + "zap": "Zapotec", + "zbl": "Blissymbolen", + "zen": "Zenaga", + "zgh": "Standert Marokkaanske Tamazight", + "zh": "Sineesk", + "zh_Hans": "Ferienfâldich Sineesk", + "zh_Hant": "Tradisjoneel Sineesk", + "zu": "Zulu", + "zun": "Zuni", + "zxx": "Gjin linguïstyske ynhâld", + "zza": "Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ga.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ga.json new file mode 100644 index 0000000000000000000000000000000000000000..221745625d8a5fc6adbda397c584cddb6cda292d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ga.json @@ -0,0 +1,299 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "Afáiris", + "ab": "Abcáisis", + "ady": "Adaigéis", + "ae": "Aivéistis", + "af": "Afracáinis", + "ain": "Aidhniúis", + "ak": "Acáinis", + "akk": "Acáidis", + "am": "Amáiris", + "an": "Aragóinis", + "ang": "Sean-Bhéarla", + "ar": "Araibis", + "ar_001": "Araibis Chaighdeánach", + "arc": "Aramais", + "arn": "Mapúitsis", + "as": "Asaimis", + "ast": "Astúiris", + "av": "Aváiris", + "ay": "Aidhmiris", + "az": "Asarbaiseáinis", + "ba": "Baiscíris", + "ban": "Bailís", + "bar": "Baváiris", + "be": "Bealarúisis", + "bem": "Beimbis", + "bg": "Bulgáiris", + "bi": "Bioslaimis", + "bn": "Beangáilis", + "bo": "Tibéidis", + "br": "Briotáinis", + "bs": "Boisnis", + "bua": "Buiriáitis", + "bug": "Buiginis", + "ca": "Catalóinis", + "ce": "Seisnis", + "ceb": "Seabúáinis", + "ch": "Seamóiris", + "chm": "Mairis", + "chr": "Seiricis", + "co": "Corsaicis", + "cop": "Coptais", + "cr": "Craís", + "cs": "Seicis", + "csb": "Caisiúibis", + "cu": "Slavais na hEaglaise", + "cv": "Suvaisis", + "cy": "Breatnais", + "da": "Danmhairgis", + "dav": "Taita", + "de": "Gearmáinis", + "de_AT": "Gearmáinis Ostarach", + "de_CH": "Ard-Ghearmáinis Eilvéiseach", + "dje": "Zarmais", + "dsb": "Sorbais Ãochtarach", + "dum": "Meán-Ollainnis", + "dv": "Divéihis", + "dz": "Seoinicis", + "egy": "Sean-Éigiptis", + "el": "Gréigis", + "en": "Béarla", + "en_AU": "Béarla Astrálach", + "en_CA": "Béarla Ceanadach", + "en_GB": "Béarla Briotanach", + "en_US": "Béarla Meiriceánach", + "enm": "Meán-Bhéarla", + "eo": "Esperanto", + "es": "Spáinnis", + "es_419": "Spáinnis Mheiriceá Laidinigh", + "es_ES": "Spáinnis Eorpach", + "es_MX": "Spáinnis Mheicsiceach", + "et": "Eastóinis", + "eu": "Bascais", + "fa": "Peirsis", + "ff": "Fuláinis", + "fi": "Fionlainnis", + "fil": "Filipínis", + "fj": "Fidsis", + "fo": "Faróis", + "fr": "Fraincis", + "fr_CA": "Fraincis Cheanadach", + "fr_CH": "Fraincis Eilvéiseach", + "frm": "Meán-Fhraincis", + "fro": "Sean-Fhraincis", + "frr": "Freaslainnis an Tuaiscirt", + "fur": "Friúilis", + "fy": "Freaslainnis Iartharach", + "ga": "Gaeilge", + "gd": "Gaeilge na hAlban", + "gez": "Aetóipis", + "gl": "Gailísis", + "gmh": "Meán-Ard-Ghearmáinis", + "gn": "Guaráinis", + "goh": "Sean-Ard-Ghearmáinis", + "grc": "Sean-Ghréigis", + "gsw": "Gearmáinis Eilvéiseach", + "gu": "Gúisearáitis", + "guc": "Uaúis", + "gv": "Manainnis", + "ha": "Hásais", + "hak": "Haicéis", + "haw": "Haváis", + "he": "Eabhrais", + "hi": "Hiondúis", + "hif": "Hiondúis Fhidsí", + "hil": "Hilgeanóinis", + "hit": "Hitis", + "hmn": "Mongais", + "ho": "Motúis Hírí", + "hr": "Cróitis", + "hsb": "Sorbais Uachtarach", + "ht": "Criól Háítíoch", + "hu": "Ungáiris", + "hup": "Húipis", + "hy": "Airméinis", + "hz": "Heiréiris", + "ia": "Interlingua", + "ibb": "Ibibis", + "id": "Indinéisis", + "ie": "Interlingue", + "ig": "Ãogbóis", + "ik": "Iniúipiaicis", + "inh": "Iongúis", + "io": "Ido", + "is": "Ãoslainnis", + "it": "Iodáilis", + "iu": "Ionúitis", + "ja": "Seapáinis", + "jbo": "Lojban", + "jut": "Iútlainnis", + "jv": "Iáivis", + "ka": "Seoirsis", + "kaa": "Cara-Chalpáis", + "kg": "Congóis", + "ki": "Ciocúis", + "kj": "Cuainiáimis", + "kk": "Casaicis", + "kl": "Kalaallisut", + "km": "Ciméiris", + "kn": "Cannadais", + "ko": "Cóiréis", + "kok": "Concáinis", + "kr": "Canúiris", + "krl": "Cairéilis", + "kru": "Curúicis", + "ks": "Caismíris", + "ku": "Coirdis", + "kv": "Coimis", + "kw": "Coirnis", + "ky": "Cirgisis", + "la": "Laidin", + "lad": "Laidínis", + "lah": "Puinseáibis Iartharach", + "lb": "Lucsambuirgis", + "lg": "Lugandais", + "lij": "Liogúiris", + "liv": "Liovóinis", + "lmo": "Lombairdis", + "ln": "Liongáilis", + "lo": "Laoisis", + "lt": "Liotuáinis", + "lu": "Lúba-Cataingis", + "lv": "Laitvis", + "men": "Meindis", + "mg": "Malagáisis", + "mga": "Meán-Ghaeilge", + "mh": "Mairsillis", + "mi": "Maorais", + "mk": "Macadóinis", + "ml": "Mailéalaimis", + "mn": "Mongóilis", + "mni": "Manapúiris", + "moh": "Móháicis", + "mr": "Maraitis", + "mrj": "Mairis Iartharach", + "ms": "Malaeis", + "mt": "Máltais", + "mul": "Ilteangacha", + "mwl": "Mioraindéis", + "mwr": "Marmhairis", + "my": "Burmais", + "na": "Nárúis", + "nb": "Ioruais BokmÃ¥l", + "nd": "Ndeibéilis an Tuaiscirt", + "nds": "Gearmáinis Ãochtarach", + "nds_NL": "Sacsainis Ãochtarach", + "ne": "Neipeailis", + "ng": "Ndongais", + "niu": "Níobhais", + "nl": "Ollainnis", + "nl_BE": "Pléimeannais", + "nn": "Nua-Ioruais", + "no": "Ioruais", + "non": "Sean-Lochlainnis", + "nr": "Ndeibéilis an Deiscirt", + "nso": "Sútúis an Tuaiscirt", + "nv": "Navachóis", + "ny": "Siséivis", + "oc": "Ocsatáinis", + "oj": "Óisibis", + "om": "Oraimis", + "or": "Oirísis", + "os": "Oiséitis", + "pa": "Puinseáibis", + "peo": "Sean-Pheirsis", + "pi": "Páilis", + "pl": "Polainnis", + "prg": "Prúisis", + "ps": "Paistis", + "pt": "Portaingéilis", + "pt_BR": "Portaingéilis na Brasaíle", + "pt_PT": "Portaingéilis Ibéarach", + "qu": "Ceatsuais", + "quc": "Cuitséis", + "rm": "Rómainis", + "rn": "Rúindis", + "ro": "Rómáinis", + "ro_MD": "Moldáivis", + "rom": "Romainis", + "ru": "Rúisis", + "rup": "Arómáinis", + "rw": "Ciniaruaindis", + "sa": "Sanscrait", + "sah": "Sachais", + "sam": "Aramais Shamárach", + "sat": "Santáilis", + "sc": "Sairdínis", + "scn": "Sicilis", + "sco": "Albainis", + "sd": "Sindis", + "se": "Sáimis Thuaidh", + "sg": "Sangóis", + "sga": "Sean-Ghaeilge", + "sh": "Seirbea-Chróitis", + "shi": "Tachelhit", + "si": "Siolóinis", + "sk": "Slóvaicis", + "sl": "Slóivéinis", + "sm": "Samóis", + "smj": "Sáimis Lule", + "sn": "Seoinis", + "so": "Somáilis", + "sog": "Sogdánais", + "sq": "Albáinis", + "sr": "Seirbis", + "ss": "Suaisis", + "st": "Seasóitis", + "su": "Sundais", + "sux": "Suiméiris", + "sv": "Sualainnis", + "sw": "Svahaílis", + "sw_CD": "Svahaílis an Chongó", + "syr": "Siricis", + "szl": "Siléisis", + "ta": "Tamailis", + "te": "Teileagúis", + "tg": "Táidsícis", + "th": "Téalainnis", + "ti": "Tigrinis", + "tk": "Tuircméinis", + "tl": "Tagálaigis", + "tlh": "Klingon", + "tn": "Suáinis", + "to": "Tongais", + "tr": "Tuircis", + "ts": "Songais", + "tt": "Tatairis", + "tw": "Tíbhis", + "ty": "Taihítis", + "udm": "Udmairtis", + "ug": "Uigiúiris", + "uk": "Úcráinis", + "und": "Teanga Anaithnid", + "ur": "Urdúis", + "uz": "Úisbéiceastáinis", + "ve": "Veindis", + "vec": "Veinéisis", + "vi": "Vítneaimis", + "vls": "Pléimeannais Iartharach", + "vo": "Volapük", + "wa": "Vallúnais", + "wo": "Volaifis", + "xal": "Cailmícis", + "xh": "Cóisis", + "yi": "Giúdais", + "yo": "Iarúibis", + "yue": "Cantainis", + "za": "Siuáingis", + "zea": "Séalainnis", + "zh": "Sínis", + "zh_Hans": "Sínis Shimplithe", + "zh_Hant": "Sínis Thraidisiúnta", + "zu": "Súlúis", + "zun": "Zúinis", + "zxx": "Gan ábhar teangeolaíoch" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/gd.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/gd.json new file mode 100644 index 0000000000000000000000000000000000000000..b12ad19274d5590fe95ffefb76762fa7052ad41d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/gd.json @@ -0,0 +1,597 @@ +{ + "Version": "2.1.28.76", + "Names": { + "aa": "Afar", + "ab": "Abchasais", + "ace": "Basa Acèh", + "ach": "Acoli", + "ada": "Adangme", + "ady": "Adyghe", + "ae": "Avestanais", + "aeb": "Arabais Thuiniseach", + "af": "Afraganais", + "afh": "Afrihili", + "agq": "Aghem", + "ain": "Ainu", + "ak": "Akan", + "akk": "Acadais", + "akz": "Alabama", + "ale": "Aleutais", + "aln": "Albàinis Ghegeach", + "alt": "Altais Dheasach", + "am": "Amtharais", + "an": "Aragonais", + "ang": "Seann-Bheurla", + "anp": "Angika", + "ar": "Arabais", + "ar_001": "Nuadh-Arabais Stannardach", + "arc": "Aramais", + "arn": "Mapudungun", + "aro": "Araona", + "arp": "Arapaho", + "arq": "Arabais Aildireach", + "arw": "Arawak", + "ary": "Arabais Mhorocach", + "arz": "Arabais Èipheiteach", + "as": "Asamais", + "asa": "Asu", + "ase": "Cainnt-shanais na h-Aimeireaga", + "ast": "Astùrais", + "av": "Avarais", + "avk": "Kotava", + "awa": "Awadhi", + "ay": "Aymara", + "az": "Asarbaideànais", + "ba": "Bashkir", + "bal": "Baluchì", + "ban": "Cànan Bali", + "bas": "Basaa", + "bax": "Bamun", + "bbc": "Batak Toba", + "bbj": "Ghomala", + "be": "Bealaruisis", + "bej": "Beja", + "bem": "Bemba", + "bew": "Betawi", + "bez": "Bena", + "bfd": "Bafut", + "bfq": "Badaga", + "bg": "Bulgarais", + "bgn": "Balochi Shiarach", + "bho": "Bhojpuri", + "bi": "Bislama", + "bik": "Bikol", + "bin": "Bini", + "bjn": "Banjar", + "bkm": "Kom", + "bla": "Siksika", + "bm": "Bambara", + "bn": "Bangla", + "bo": "Tibeitis", + "bpy": "Bishnupriya", + "bqi": "Bakhtiari", + "br": "Breatnais", + "bra": "Braj", + "brh": "Brahui", + "brx": "Bodo", + "bs": "Bosnais", + "bss": "Akoose", + "bua": "Buriat", + "bug": "Cànan nam Bugis", + "bum": "Bulu", + "byn": "Blin", + "byv": "Medumba", + "ca": "Catalanais", + "cad": "Caddo", + "car": "Carib", + "cay": "Cayuga", + "cch": "Atsam", + "ce": "Deideanais", + "ceb": "Cebuano", + "cgg": "Chiga", + "ch": "Chamorro", + "chb": "Chibcha", + "chg": "Chagatai", + "chk": "Cànan Chuuk", + "chm": "Mari", + "chn": "Chinuk Wawa", + "cho": "Choctaw", + "chp": "Chipewyan", + "chr": "Cherokee", + "chy": "Cheyenne", + "ckb": "Cùrdais Mheadhanach", + "co": "Corsais", + "cop": "Coptais", + "cps": "Capiznon", + "cr": "Cree", + "crh": "Turcais Chriomach", + "crs": "Seiseallais", + "cs": "Seicis", + "csb": "Caisiubais", + "cu": "Slàbhais na h-Eaglaise", + "cv": "Chuvash", + "cy": "Cuimris", + "da": "Danmhairgis", + "dak": "Dakota", + "dar": "Dargwa", + "dav": "Taita", + "de": "Gearmailtis", + "de_AT": "Gearmailtis na h-Ostaire", + "de_CH": "Àrd-Ghearmailtis na h-Eilbheise", + "del": "Delaware", + "den": "Slavey", + "dgr": "Dogrib", + "din": "Dinka", + "dje": "Zarma", + "doi": "Dogri", + "dsb": "Sòrbais ÃŒochdarach", + "dtp": "Dusun Mheadhanach", + "dua": "Duala", + "dum": "Meadhan-Dhuitsis", + "dv": "Divehi", + "dyo": "Jola-Fonyi", + "dyu": "Dyula", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embu", + "ee": "Ewe", + "efi": "Efik", + "egy": "Èipheitis Àrsaidh", + "eka": "Ekajuk", + "el": "Greugais", + "elx": "Elamais", + "en": "Beurla", + "en_AU": "Beurla Astràilia", + "en_CA": "Beurla Chanada", + "en_GB": "Beurla Bhreatainn", + "en_US": "Beurla na h-Aimeireaga", + "enm": "Meadhan-Bheurla", + "eo": "Esperanto", + "es": "Spàinntis", + "es_419": "Spàinntis na h-Aimeireaga Laidinneach", + "es_ES": "Spàinntis Eòrpach", + "es_MX": "Spàinntis Mheagsagach", + "esu": "Yupik Mheadhanach", + "et": "Eastoinis", + "eu": "Basgais", + "ewo": "Ewondo", + "ext": "Cànan na h-Extremadura", + "fa": "Peirsis", + "fan": "Fang", + "fat": "Fanti", + "ff": "Fulah", + "fi": "Fionnlannais", + "fil": "Filipinis", + "fit": "Meänkieli", + "fj": "Fìdis", + "fo": "Fàrothais", + "fon": "Fon", + "fr": "Fraingis", + "fr_CA": "Fraingis Chanada", + "fr_CH": "Fraingis Eilbheiseach", + "frc": "Fraingis nan Cajun", + "frm": "Meadhan-Fhraingis", + "fro": "Seann-Fhraingis", + "frp": "Arpitan", + "frr": "Frìoslannais Thuathach", + "frs": "Frìoslannais Earach", + "fur": "Friùilis", + "fy": "Frìoslannais Shiarach", + "ga": "Gaeilge", + "gaa": "Ga", + "gag": "Gagauz", + "gan": "Gan", + "gay": "Gayo", + "gba": "Gbaya", + "gbz": "Dari Zoroastrach", + "gd": "Gàidhlig", + "gez": "Ge’ez", + "gil": "Ciribeasais", + "gl": "Gailìsis", + "glk": "Gilaki", + "gmh": "Meadhan-Àrd-Gearmailtis", + "gn": "Guaraní", + "goh": "Seann-Àrd-Gearmailtis", + "gom": "Konkani Goa", + "gon": "Gondi", + "gor": "Gorontalo", + "got": "Gotais", + "grb": "Grebo", + "grc": "Greugais Àrsaidh", + "gsw": "Gearmailtis Eilbheiseach", + "gu": "Gujarati", + "guc": "Wayuu", + "gur": "Frafra", + "guz": "Gusii", + "gv": "Gaelg", + "gwi": "Gwichʼin", + "ha": "Hausa", + "hai": "Haida", + "hak": "Hakka", + "haw": "Cànan Hawai’i", + "he": "Eabhra", + "hi": "Hindis", + "hif": "Hindis Fhìditheach", + "hil": "Hiligaynon", + "hit": "Cànan Het", + "hmn": "Hmong", + "ho": "Hiri Motu", + "hr": "Cròthaisis", + "hsb": "Sòrbais Uachdarach", + "hsn": "Xiang", + "ht": "Crìtheol Haidhti", + "hu": "Ungairis", + "hup": "Hupa", + "hy": "Airmeinis", + "hz": "Herero", + "ia": "Interlingua", + "iba": "Iban", + "ibb": "Ibibio", + "id": "Innd-Innsis", + "ie": "Interlingue", + "ig": "Igbo", + "ii": "Yi Sichuan", + "ik": "Inupiaq", + "ilo": "Iloko", + "inh": "Ingush", + "io": "Ido", + "is": "Innis Tìlis", + "it": "Eadailtis", + "iu": "Inuktitut", + "ja": "Seapanais", + "jam": "Beurla Crìtheolach Diameuga", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jpr": "Peirsis Iùdhach", + "jrb": "Arabais Iùdhach", + "jv": "Deàbhanais", + "ka": "Cairtbheilis", + "kaa": "Kara-Kalpak", + "kab": "Kabyle", + "kac": "Kachin", + "kaj": "Jju", + "kam": "Kamba", + "kaw": "Kawi", + "kbd": "Cabardais", + "kbl": "Kanembu", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Kabuverdianu", + "ken": "Kenyang", + "kfo": "Koro", + "kg": "Kongo", + "kgp": "Kaingang", + "kha": "Khasi", + "kho": "Cànan Khotan", + "khq": "Koyra Chiini", + "khw": "Khowar", + "ki": "Kikuyu", + "kiu": "Kirmanjki", + "kj": "Kuanyama", + "kk": "Casachais", + "kkj": "Kako", + "kl": "Kalaallisut", + "kln": "Kalenjin", + "km": "Cmèar", + "kmb": "Kimbundu", + "kn": "Kannada", + "ko": "Coirèanais", + "koi": "Komi-Permyak", + "kok": "Konkani", + "kpe": "Kpelle", + "kr": "Kanuri", + "krc": "Karachay-Balkar", + "kri": "Krio", + "krj": "Kinaray-a", + "krl": "Cairealais", + "kru": "Kurukh", + "ks": "Caismiris", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Gearmailtis Chologne", + "ku": "Cùrdais", + "kum": "Kumyk", + "kut": "Kutenai", + "kv": "Komi", + "kw": "Còrnais", + "ky": "Cìorgasais", + "la": "Laideann", + "lad": "Ladino", + "lag": "Langi", + "lah": "Lahnda", + "lam": "Lamba", + "lb": "Lugsamburgais", + "lez": "Leasgais", + "lfn": "Lingua Franca Nova", + "lg": "Ganda", + "li": "Cànan Limburg", + "lij": "Liogùrais", + "lkt": "Lakhóta", + "lmo": "Lombardais", + "ln": "Lingala", + "lo": "Làtho", + "lol": "Mongo", + "loz": "Lozi", + "lrc": "Luri Thuathach", + "lt": "Liotuainis", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lui": "Luiseño", + "lun": "Lunda", + "luo": "Luo", + "lus": "Mizo", + "luy": "Luyia", + "lv": "Laitbheis", + "lzh": "Sìnis an Litreachais", + "lzz": "Laz", + "mad": "Cànan Madhura", + "maf": "Mafa", + "mag": "Magahi", + "mai": "Maithili", + "mak": "Makasar", + "man": "Mandingo", + "mas": "Maasai", + "mde": "Maba", + "mdf": "Moksha", + "mdr": "Mandar", + "men": "Mende", + "mer": "Meru", + "mfe": "Morisyen", + "mg": "Malagasais", + "mga": "Meadhan-Ghaeilge", + "mgh": "Makhuwa-Meetto", + "mgo": "Meta’", + "mh": "Marshallais", + "mi": "MÄori", + "mic": "Mi’kmaq", + "min": "Minangkabau", + "mk": "Masadonais", + "ml": "Malayalam", + "mn": "Mongolais", + "mnc": "Manchu", + "mni": "Manipuri", + "moh": "Mohawk", + "mos": "Mossi", + "mr": "Marathi", + "mrj": "Mari Shiarach", + "ms": "Malaidhis", + "mt": "Maltais", + "mua": "Mundang", + "mul": "Iomadh cànan", + "mus": "Creek", + "mwl": "Miorandais", + "mwr": "Marwari", + "mwv": "Mentawai", + "my": "Burmais", + "mye": "Myene", + "myv": "Erzya", + "mzn": "Mazanderani", + "na": "Nabhru", + "nan": "Min Nan", + "nap": "Eadailtis Napoli", + "naq": "Nama", + "nb": "BokmÃ¥l na Nirribhidh", + "nd": "Ndebele Thuathach", + "nds": "Gearmailtis ÃŒochdarach", + "nds_NL": "Sagsannais ÃŒochdarach", + "ne": "Neapàlais", + "new": "Newari", + "ng": "Ndonga", + "nia": "Nias", + "niu": "Cànan Niue", + "njo": "Ao Naga", + "nl": "Duitsis", + "nl_BE": "Flannrais", + "nmg": "Kwasio", + "nn": "Nynorsk na Nirribhidh", + "nnh": "Ngiemboon", + "no": "Nirribhis", + "nog": "Nogai", + "non": "Seann-Lochlannais", + "nov": "Novial", + "nqo": "N’Ko", + "nr": "Ndebele Dheasach", + "nso": "Sesotho sa Leboa", + "nus": "Nuer", + "nv": "Navajo", + "nwc": "Newari Chlasaigeach", + "ny": "Nyanja", + "nym": "Nyamwezi", + "nyn": "Nyankole", + "nyo": "Nyoro", + "nzi": "Nzima", + "oc": "Ogsatanais", + "oj": "Ojibwa", + "om": "Oromo", + "or": "Odia", + "os": "Ossetic", + "osa": "Osage", + "ota": "Turcais Otomanach", + "pa": "Panjabi", + "pag": "Pangasinan", + "pal": "Pahlavi", + "pam": "Pampanga", + "pap": "Papiamentu", + "pau": "Palabhais", + "pcd": "Picard", + "pcm": "Beurla Nigèiriach", + "pdc": "Gearmailtis Phennsylvania", + "pdt": "Plautdietsch", + "peo": "Seann-Pheirsis", + "phn": "Phenicis", + "pi": "Pali", + "pl": "Pòlainnis", + "pms": "Piedmontese", + "pon": "Cànan Pohnpei", + "prg": "Pruisis", + "pro": "Seann-Phrovençal", + "ps": "Pashto", + "pt": "Portagailis", + "pt_BR": "Portagailis Bhraisileach", + "pt_PT": "Portagailis Eòrpach", + "qu": "Quechua", + "quc": "K’iche’", + "qug": "Quichua Àrd-tìr Chimborazo", + "raj": "Rajasthani", + "rap": "Rapa Nui", + "rar": "Cànan Rarotonga", + "rgn": "Romagnol", + "rm": "Rumains", + "rn": "Kirundi", + "ro": "Romàinis", + "ro_MD": "Moldobhais", + "rof": "Rombo", + "rom": "Romanais", + "root": "Root", + "ru": "Ruisis", + "rue": "Rusyn", + "rug": "Roviana", + "rup": "Aromanais", + "rw": "Kinyarwanda", + "rwk": "Rwa", + "sa": "Sanskrit", + "sad": "Sandawe", + "sah": "Sakha", + "sam": "Aramais Shamaritanach", + "saq": "Samburu", + "sas": "Sasak", + "sat": "Santali", + "saz": "Saurashtra", + "sba": "Ngambay", + "sbp": "Sangu", + "sc": "Sàrdais", + "scn": "Sisilis", + "sco": "Albais", + "sd": "Sindhi", + "sdc": "Sassarese", + "sdh": "Cùrdais Dheasach", + "se": "Sàmais Thuathach", + "see": "Seneca", + "seh": "Sena", + "sei": "Seri", + "sel": "Selkup", + "ses": "Koyraboro Senni", + "sg": "Sango", + "sga": "Seann-Ghaeilge", + "sh": "Sèirb-Chròthaisis", + "shi": "Tachelhit", + "shn": "Shan", + "shu": "Arabais Seàdach", + "si": "Sinhala", + "sid": "Sidamo", + "sk": "Slòbhacais", + "sl": "Slòbhainis", + "sly": "Selayar", + "sm": "Samothais", + "sma": "Sàmais Dheasach", + "smj": "Sàmais Lule", + "smn": "Sàmais Inari", + "sms": "Sàmais Skolt", + "sn": "Shona", + "snk": "Soninke", + "so": "Somàilis", + "sq": "Albàinis", + "sr": "Sèirbis", + "srn": "Sranan Tongo", + "srr": "Serer", + "ss": "Swati", + "ssy": "Saho", + "st": "Sesotho", + "su": "Cànan Sunda", + "suk": "Sukuma", + "sus": "Susu", + "sux": "Cànan Sumer", + "sv": "Suainis", + "sw": "Kiswahili", + "sw_CD": "Kiswahili na Congo", + "swb": "Comorais", + "syc": "Suraidheac Chlasaigeach", + "syr": "Suraidheac", + "ta": "Taimilis", + "tcy": "Tulu", + "te": "Telugu", + "tem": "Timne", + "teo": "Teso", + "ter": "Terêna", + "tet": "Tetum", + "tg": "Taidigis", + "th": "Cànan nan Tàidh", + "ti": "Tigrinya", + "tig": "Tigre", + "tiv": "Tiv", + "tk": "Turcmanais", + "tkl": "Tokelau", + "tkr": "Tsakhur", + "tl": "Tagalog", + "tlh": "Klingon", + "tli": "Tlingit", + "tly": "Talysh", + "tmh": "Tamashek", + "tn": "Tswana", + "to": "Tonga", + "tog": "Nyasa Tonga", + "tpi": "Tok Pisin", + "tr": "Turcais", + "tru": "Turoyo", + "trv": "Taroko", + "ts": "Tsonga", + "tsi": "Tsimshian", + "tt": "Tatarais", + "ttt": "Tati", + "tum": "Tumbuka", + "tvl": "Tubhalu", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Cànan Tahiti", + "tyv": "Cànan Tuva", + "tzm": "Tamazight an Atlais Mheadhanaich", + "udm": "Udmurt", + "ug": "Ùigiurais", + "uk": "Ucràinis", + "umb": "Umbundu", + "und": "Cànan neo-aithnichte", + "ur": "Ùrdu", + "uz": "Usbagais", + "vai": "Vai", + "ve": "Venda", + "vep": "Veps", + "vi": "Bhiet-Namais", + "vls": "Flannrais Siarach", + "vo": "Volapük", + "vro": "Võro", + "vun": "Vunjo", + "wa": "Walloon", + "wae": "Gearmailtis Wallis", + "wal": "Wolaytta", + "war": "Waray", + "was": "Washo", + "wbp": "Warlpiri", + "wo": "Wolof", + "wuu": "Wu", + "xal": "Kalmyk", + "xh": "Xhosa", + "xog": "Soga", + "yao": "Yao", + "yap": "Cànan Yap", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "Iùdhais", + "yo": "Yoruba", + "yrl": "Nheengatu", + "yue": "Cantonais", + "za": "Zhuang", + "zap": "Zapotec", + "zbl": "Comharran Bliss", + "zea": "Cànan Zeeland", + "zen": "Zenaga", + "zgh": "Tamazight Stannardach Moroco", + "zh": "Sìnis", + "zh_Hans": "Sìnis Shimplichte", + "zh_Hant": "Sìnis Thradaiseanta", + "zu": "Zulu", + "zun": "Zuñi", + "zxx": "Susbaint nach eil ’na chànan", + "zza": "Zazaki" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/gl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/gl.json new file mode 100644 index 0000000000000000000000000000000000000000..047eff3c5f595fa366d5147a8378449abcddcf0d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/gl.json @@ -0,0 +1,410 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afar", + "ab": "abkhazo", + "ace": "achinés", + "ach": "acholí", + "ada": "adangme", + "ady": "adigueo", + "af": "africáner", + "agq": "aghem", + "ain": "ainu", + "ak": "akán", + "ale": "aleutiano", + "alt": "altai meridional", + "am": "amárico", + "an": "aragonés", + "anp": "angika", + "ar": "árabe", + "ar_001": "árabe estándar moderno", + "arc": "arameo", + "arn": "mapuche", + "arp": "arapahoe", + "as": "asamés", + "asa": "asu", + "ast": "asturiano", + "av": "avar", + "awa": "awadhi", + "ay": "aimará", + "az": "acerbaixano", + "ba": "baskir", + "ban": "balinés", + "bas": "basaa", + "be": "bielorruso", + "bem": "bemba", + "bez": "bena", + "bg": "búlgaro", + "bgn": "baluchi occidental", + "bho": "bhojpuri", + "bi": "bislama", + "bin": "bini", + "bla": "siksiká", + "bm": "bambaro", + "bn": "bengalí", + "bo": "tibetano", + "br": "bretón", + "brx": "bodo", + "bs": "bosníaco", + "bug": "buginés", + "byn": "blin", + "ca": "catalán", + "ce": "checheno", + "ceb": "cebuano", + "cgg": "kiga", + "ch": "chamorro", + "chk": "chuukese", + "chm": "mari", + "cho": "choctaw", + "chr": "cheroqui", + "chy": "cheién", + "ckb": "kurdo soraní", + "co": "corso", + "crs": "seselwa (crioulo das Seixeles)", + "cs": "checo", + "cu": "eslavo eclesiástico", + "cv": "chuvash", + "cy": "galés", + "da": "dinamarqués", + "dak": "dakota", + "dar": "dargwa", + "dav": "taita", + "de": "alemán", + "de_AT": "alemán austríaco", + "de_CH": "alto alemán suízo", + "dgr": "dogrib", + "dje": "zarma", + "dsb": "baixo sorabio", + "dua": "duala", + "dv": "divehi", + "dyo": "jola-fonyi", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embu", + "ee": "ewe", + "efi": "efik", + "egy": "exipcio antigo", + "eka": "ekajuk", + "el": "grego", + "en": "inglés", + "en_AU": "inglés australiano", + "en_CA": "inglés canadiano", + "en_GB": "inglés británico", + "en_US": "inglés dos Estados Unidos", + "eo": "esperanto", + "es": "español", + "es_419": "español latinoamericano", + "es_ES": "castelán", + "es_MX": "español de México", + "et": "estoniano", + "eu": "éuscaro", + "ewo": "ewondo", + "fa": "persa", + "ff": "fula", + "fi": "finés", + "fil": "filipino", + "fj": "fidxiano", + "fo": "feroés", + "fon": "fon", + "fr": "francés", + "fr_CA": "francés canadiano", + "fr_CH": "francés suízo", + "fur": "friuliano", + "fy": "frisón", + "ga": "irlandés", + "gaa": "ga", + "gag": "gagauz", + "gd": "gaélico escocés", + "gez": "ge’ez", + "gil": "kiribatiano", + "gl": "galego", + "gn": "guaraní", + "gor": "gorontalo", + "grc": "grego antigo", + "gsw": "alemán suízo", + "gu": "guxaratí", + "guz": "gusii", + "gv": "manx", + "gwi": "gwichʼin", + "ha": "hausa", + "haw": "hawaiano", + "he": "hebreo", + "hi": "hindi", + "hil": "hiligaynon", + "hmn": "hmong", + "hr": "croata", + "hsb": "alto sorbio", + "ht": "haitiano", + "hu": "húngaro", + "hup": "hupa", + "hy": "armenio", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonesio", + "ig": "ibo", + "ii": "yi sichuanés", + "ilo": "iloko", + "inh": "ingush", + "io": "ido", + "is": "islandés", + "it": "italiano", + "iu": "inuktitut", + "ja": "xaponés", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jv": "xavanés", + "ka": "xeorxiano", + "kab": "kabile", + "kac": "kachin", + "kaj": "jju", + "kam": "kamba", + "kbd": "cabardiano", + "kcg": "tyap", + "kde": "makonde", + "kea": "caboverdiano", + "kfo": "koro", + "kg": "kongo", + "kha": "khasi", + "khq": "koyra chiini", + "ki": "kikuyu", + "kj": "kuanyama", + "kk": "casaco", + "kkj": "kako", + "kl": "groenlandés occidental", + "kln": "kalenjin", + "km": "khmer", + "kmb": "kimbundu", + "kn": "canarés", + "ko": "coreano", + "koi": "komi permio", + "kok": "konkani", + "kpe": "kpelle", + "kr": "canuri", + "krc": "carachaio-bálcara", + "krl": "carelio", + "kru": "kurukh", + "ks": "cachemir", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "kölsch", + "ku": "kurdo", + "kum": "kumyk", + "kv": "komi", + "kw": "córnico", + "ky": "quirguiz", + "la": "latín", + "lad": "ladino", + "lag": "langi", + "lb": "luxemburgués", + "lez": "lezgui", + "lg": "ganda", + "li": "limburgués", + "lkt": "lakota", + "ln": "lingala", + "lo": "laosiano", + "loz": "lozi", + "lrc": "luri do norte", + "lt": "lituano", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lun": "lunda", + "luo": "luo", + "lus": "mizo", + "luy": "luyia", + "lv": "letón", + "mad": "madurés", + "mag": "magahi", + "mai": "maithili", + "mak": "makasar", + "mas": "masai", + "mdf": "moksha", + "men": "mende", + "mer": "meru", + "mfe": "crioulo mauriciano", + "mg": "malgaxe", + "mgh": "makhuwa-meetto", + "mgo": "meta’", + "mh": "marshalés", + "mi": "maorí", + "mic": "micmac", + "min": "minangkabau", + "mk": "macedonio", + "ml": "malabar", + "mn": "mongol", + "mni": "manipuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "marathi", + "ms": "malaio", + "mt": "maltés", + "mua": "mundang", + "mul": "varias linguas", + "mus": "creek", + "mwl": "mirandés", + "my": "birmano", + "myv": "erzya", + "mzn": "mazandaraní", + "na": "nauru", + "nap": "napolitano", + "naq": "nama", + "nb": "noruegués bokmal", + "nd": "ndebele do norte", + "nds": "baixo alemán", + "nds_NL": "baixo saxón", + "ne": "nepalí", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niuano", + "nl": "holandés", + "nl_BE": "flamenco", + "nmg": "kwasio", + "nn": "noruegués nynorsk", + "nnh": "ngiemboon", + "no": "noruegués", + "nog": "nogai", + "nqo": "n’ko", + "nr": "ndebele do sur", + "nso": "sesotho sa leboa", + "nus": "nuer", + "nv": "navajo", + "ny": "chewa", + "nyn": "nyankole", + "oc": "occitano", + "om": "oromo", + "or": "oriya", + "os": "osetio", + "pa": "panxabiano", + "pag": "pangasinan", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauano", + "pcm": "pidgin nixeriano", + "pl": "polaco", + "prg": "prusiano", + "ps": "pashtu", + "pt": "portugués", + "pt_BR": "portugués brasileiro", + "pt_PT": "portugués europeo", + "qu": "quechua", + "quc": "quiché", + "rap": "rapanui", + "rar": "rarotongano", + "rm": "romanche", + "rn": "rundi", + "ro": "romanés", + "ro_MD": "moldavo", + "rof": "rombo", + "root": "raíz", + "ru": "ruso", + "rup": "aromanés", + "rw": "ruandés", + "rwk": "rwa", + "sa": "sánscrito", + "sad": "sandawe", + "sah": "sakha", + "saq": "samburu", + "sat": "santali", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardo", + "scn": "siciliano", + "sco": "escocés", + "sd": "sindhi", + "sdh": "kurdo meridional", + "se": "saami do norte", + "seh": "sena", + "ses": "koyraboro senni", + "sg": "sango", + "sh": "serbocroata", + "shi": "tachelhit", + "shn": "shan", + "si": "cingalés", + "sk": "eslovaco", + "sl": "esloveno", + "sm": "samoano", + "sma": "saami meridional", + "smj": "saami de Lule", + "smn": "saami de Inari", + "sms": "saami de Skolt", + "sn": "shona", + "snk": "soninke", + "so": "somalí", + "sq": "albanés", + "sr": "serbio", + "srn": "sranan tongo", + "ss": "swati", + "ssy": "saho", + "st": "sesotho", + "su": "sundanés", + "suk": "sukuma", + "sv": "sueco", + "sw": "suahili", + "sw_CD": "suahili congolés", + "swb": "comoriano", + "syr": "siríaco", + "ta": "támil", + "te": "telugú", + "tem": "timne", + "teo": "teso", + "tet": "tetun", + "tg": "taxico", + "th": "tailandés", + "ti": "tigriña", + "tig": "tigré", + "tk": "turcomán", + "tl": "tagalo", + "tlh": "klingon", + "tn": "tswana", + "to": "tonganés", + "tpi": "tok pisin", + "tr": "turco", + "trv": "taroko", + "ts": "tsonga", + "tt": "tártaro", + "tum": "tumbuka", + "tvl": "tuvaluano", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitiano", + "tyv": "tuvaniano", + "tzm": "tamazight do Marrocos Central", + "udm": "udmurto", + "ug": "uigur", + "uk": "ucraíno", + "umb": "umbundu", + "und": "lingua descoñecida", + "ur": "urdú", + "uz": "uzbeco", + "vai": "vai", + "ve": "venda", + "vi": "vietnamita", + "vo": "volapuk", + "vun": "vunjo", + "wa": "valón", + "wae": "walser", + "wal": "wolaytta", + "war": "waray-waray", + "wbp": "walrpiri", + "wo": "wólof", + "xal": "calmuco", + "xh": "xhosa", + "xog": "soga", + "yav": "yangben", + "ybb": "yemba", + "yi": "yiddish", + "yo": "yoruba", + "yue": "cantonés", + "zgh": "tamazight de Marrocos estándar", + "zh": "chinés", + "zh_Hans": "chinés simplificado", + "zh_Hant": "chinés tradicional", + "zu": "zulú", + "zun": "zuni", + "zxx": "sen contido lingüístico", + "zza": "zazaki" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/gu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/gu.json new file mode 100644 index 0000000000000000000000000000000000000000..17ce96e8a143a7ba930faa4c1531b5de922b221e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/gu.json @@ -0,0 +1,533 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "અફાર", + "ab": "અબખાજિયન", + "ace": "અચીની", + "ach": "àªàª•ોલી", + "ada": "અદાંગà«àª®à«€", + "ady": "અદિઘે", + "ae": "અવેસà«àª¤àª¨", + "af": "આફà«àª°àª¿àª•નà«àª¸", + "afh": "અફà«àª°àª¿àª¹àª¿àª²à«€", + "agq": "અઘેમ", + "ain": "àªàª¨à«", + "ak": "અકાન", + "akk": "અકà«àª•ાદીયાન", + "ale": "અલેઉત", + "alt": "દકà«àª·àª¿àª£ અલà«àª¤àª¾àª‡", + "am": "àªàª®à«àª¹àª¾àª°àª¿àª•", + "an": "અરà«àª—ોનીàª", + "ang": "જà«àª¨à«€ અંગà«àª°à«‡àªœà«€", + "anp": "અંગીકા", + "ar": "અરબી", + "ar_001": "મોડરà«àª¨ સà«àªŸàª¾àª¨à«àª¡àª°à«àª¡ અરબી", + "arc": "àªàª°àª®à«ˆàª•", + "arn": "મેપà«àªšà«‡", + "arp": "અરાપાહો", + "arq": "આલà«àªœà«‡àª°àª¿àª¯àª¨ અરબી", + "arw": "અરાવક", + "ary": "મોરોકà«àª•ન અરબી", + "arz": "ઈજિપà«àª¶àª¿àª¯àª¨ અરબી", + "as": "આસામી", + "asa": "અસà«", + "ast": "અસà«àª¤à«àª°àª¿àª¯àª¨", + "av": "અવેરિક", + "awa": "અવધી", + "ay": "આયમારા", + "az": "અàªàª°àª¬à«ˆàªœàª¾àª¨à«€", + "ba": "બશà«àª•ીર", + "bal": "બલૂચી", + "ban": "બાલિનીસ", + "bas": "બસા", + "bax": "બામન", + "be": "બેલારà«àª¶àª¿àª¯àª¨", + "bej": "બેજા", + "bem": "બેમà«àª¬àª¾", + "bez": "બેના", + "bg": "બલà«àª—ેરિયન", + "bgn": "પશà«àªšàª¿àª®à«€ બાલોચી", + "bho": "ભોજપà«àª°à«€", + "bi": "બિસà«àª²àª¾àª®àª¾", + "bik": "બિકોલ", + "bin": "બિની", + "bla": "સિકà«àª¸àª¿àª•ા", + "bm": "બામà«àª¬àª¾àª°àª¾", + "bn": "બંગાળી", + "bo": "તિબેટીયન", + "bpy": "બિષà«àª¨à«àªªà«àª°àª¿àª¯àª¾", + "br": "બà«àª°à«‡àªŸà«‹àª¨", + "bra": "વà«àª°àªœ", + "brh": "બà«àª°àª¾àª¹à«àªˆ", + "brx": "બોડો", + "bs": "બોસà«àª¨àª¿àª¯àª¨", + "bua": "બà«àª°àª¿àª¯àª¾àª¤", + "bug": "બà«àª—િનીસ", + "byn": "બà«àª²àª¿àª¨", + "ca": "કતલાન", + "cad": "કડà«àª¡à«‹", + "car": "કરિબ", + "cch": "અતà«àª¸àª®", + "ce": "ચેચન", + "ceb": "સિબà«àª†àª¨à«‹", + "cgg": "ચિગા", + "ch": "કેમોરો", + "chb": "ચિબà«àªšàª¾", + "chg": "છગાતાઇ", + "chk": "ચૂકીસ", + "chm": "મારી", + "chn": "ચિનૂક જારà«àª—ન", + "cho": "ચોકà«àª¤à«Œ", + "chp": "શિપેવà«àª¯àª¾àª¨", + "chr": "શેરોકી", + "chy": "શેયેનà«àª¨", + "ckb": "સેનà«àªŸà«àª°àª² કà«àª°à«àª¦àª¿àª¶", + "co": "કોરà«àª¸àª¿àª•ન", + "cop": "કોપà«àªŸàª¿àª•", + "cr": "કà«àª°à«€", + "crh": "કà«àª°àª¿àª®àª¿àª¯àª¨ તà«àª°à«àª•à«€", + "crs": "સેસેલà«àªµàª¾ કà«àª°à«‡àª“લે ફà«àª°à«‡àª¨à«àªš", + "cs": "ચેક", + "csb": "કાશà«àª¬àª¿àª¯àª¨", + "cu": "ચરà«àªš સà«àª²àª¾àªµàª¿àª•", + "cv": "ચૂવાશ", + "cy": "વેલà«àª¶", + "da": "ડેનિશ", + "dak": "દાકોતા", + "dar": "દારà«àª—વા", + "dav": "તૈતા", + "de": "જરà«àª®àª¨", + "de_AT": "ઓસà«àªŸà«àª°àª¿àª…ન જરà«àª®àª¨", + "de_CH": "સà«àªµàª¿àª¸ હાય જરà«àª®àª¨", + "del": "દેલવેર", + "den": "સà«àª²à«‡àªµ", + "dgr": "ડોગà«àª°àª¿àª¬", + "din": "દિનà«àª•ા", + "dje": "àªàª°à«àª®àª¾", + "doi": "ડોગà«àª°à«€", + "dsb": "નિમà«àª¨ સોરà«àª¬àª¿àª¯àª¨", + "dua": "દà«àª†àª²àª¾", + "dum": "મધà«àª¯ ડચ", + "dv": "દિવેહી", + "dyo": "જોલા-ફોનà«àª¯à«€", + "dyu": "ડà«àª¯à«àª²àª¾", + "dz": "ડà«àªà«‹àª‚ગà«àª–ા", + "dzg": "દાàªàª¾àª—ા", + "ebu": "àªàª®à«àª¬à«", + "ee": "ઈવ", + "efi": "àªàª«àª¿àª•", + "egy": "પà«àª°àª¾àªšà«€àª¨ ઇજીપà«àª¶àª¿àª¯àª¨", + "eka": "àªàª•ાજà«àª•", + "el": "ગà«àª°à«€àª•", + "elx": "àªàª²àª¾àª®àª¾àª‡àªŸ", + "en": "અંગà«àª°à«‡àªœà«€", + "en_AU": "ઓસà«àªŸà«àª°à«‡àª²àª¿àª¯àª¨ અંગà«àª°à«‡àªœà«€", + "en_CA": "કેનેડિયન અંગà«àª°à«‡àªœà«€", + "en_GB": "બà«àª°àª¿àªŸàª¿àª¶ અંગà«àª°à«‡àªœà«€", + "en_US": "અમેરિકન અંગà«àª°à«‡àªœà«€", + "enm": "મિડિલ અંગà«àª°à«‡àªœà«€", + "eo": "àªàª¸à«àªªà«‡àª°àª¾àª¨à«àªŸà«‹", + "es": "સà«àªªà«‡àª¨àª¿àª¶", + "es_419": "લેટિન અમેરિકન સà«àªªà«‡àª¨àª¿àª¶", + "es_ES": "યà«àª°à«‹àªªàª¿àª¯àª¨ સà«àªªà«‡àª¨àª¿àª¶", + "es_MX": "મેકà«àª¸àª¿àª•ન સà«àªªà«‡àª¨àª¿àª¶", + "et": "àªàª¸à«àªŸà«‹àª¨àª¿àª¯àª¨", + "eu": "બાસà«àª•", + "ewo": "ઇવોનà«àª¡à«‹", + "fa": "ફારસી", + "fan": "ફેંગ", + "fat": "ફનà«àªŸà«€", + "ff": "ફà«àª²àª¾àª¹", + "fi": "ફિનિશ", + "fil": "ફિલિપિનો", + "fj": "ફીજીયન", + "fo": "ફોરિસà«àª¤", + "fon": "ફોન", + "fr": "ફà«àª°à«‡àª¨à«àªš", + "fr_CA": "કેનેડિયન ફà«àª°à«‡àª‚ચ", + "fr_CH": "સà«àªµàª¿àª¸ ફà«àª°à«‡àª‚ચ", + "frm": "મિડિલ ફà«àª°à«‡àª‚ચ", + "fro": "જૂની ફà«àª°à«‡àª‚ચ", + "frr": "ઉતà«àª¤àª°à«€àª¯ ફà«àª°àª¿àª¶àª¿àª¯àª¨", + "frs": "પૂરà«àªµ ફà«àª°àª¿àª¶àª¿àª¯àª¨", + "fur": "ફà«àª°àª¿àª¯à«àª²àª¿àª¯àª¾àª¨", + "fy": "પશà«àªšàª¿àª®à«€ ફà«àª°àª¿àª¸àª¿àª¯àª¨", + "ga": "આઇરિશ", + "gaa": "ગા", + "gag": "ગાગાàª", + "gan": "gan", + "gay": "ગાયો", + "gba": "બાયા", + "gbz": "àªà«‹àª°à«‹àª¸à«àªŸà«àª°àª¿àª…ન દારી", + "gd": "સà«àª•ોટીસ ગેલિક", + "gez": "ગીàª", + "gil": "જિલà«àª¬àª°àªŸà«€àª", + "gl": "ગેલિશિયન", + "gmh": "મધà«àª¯ હાઇ જરà«àª®àª¨", + "gn": "ગà«àª†àª°àª¾àª¨à«€", + "goh": "જૂની હાઇ જરà«àª®àª¨", + "gom": "ગોઅન કોંકણી", + "gon": "ગોંડી", + "gor": "ગોરોનà«àª¤àª¾àª²à«‹", + "got": "ગોથિક", + "grb": "ગà«àª°à«‡àª¬à«‹", + "grc": "પà«àª°àª¾àªšà«€àª¨ ગà«àª°à«€àª•", + "gsw": "સà«àªµàª¿àª¸ જરà«àª®àª¨", + "gu": "ગà«àªœàª°àª¾àª¤à«€", + "guz": "ગà«àª¸à«€", + "gv": "માંકà«àª¸", + "gwi": "ગà«àªµàª¿àªšâ€™àª‡àª¨", + "ha": "હૌસા", + "hai": "હૈડા", + "hak": "hak", + "haw": "હાવાઇયન", + "he": "હીબà«àª°à«", + "hi": "હિનà«àª¦à«€", + "hif": "ફીજી હિંદી", + "hil": "હિલિગેનોન", + "hit": "હિટà«àªŸàª¿àª¤à«‡", + "hmn": "હમોંગ", + "ho": "હિરી મોટૂ", + "hr": "કà«àª°à«‹àªàª¶àª¿àª¯àª¨", + "hsb": "અપà«àªªàª° સોરà«àª¬àª¿àª¯àª¨", + "hsn": "hsn", + "ht": "હૈતીયન", + "hu": "હંગેરિયન", + "hup": "હૂપા", + "hy": "આરà«àª®à«‡àª¨àª¿àª¯àª¨", + "hz": "હેરેરો", + "ia": "ઇંટરલિંગà«àª†", + "iba": "ઇબાન", + "ibb": "ઈબિબિયો", + "id": "ઇનà«àª¡à«‹àª¨à«‡àª¶àª¿àª¯àª¨", + "ie": "ઇંટરલિંગ", + "ig": "ઇગà«àª¬à«‹", + "ii": "સિચà«àª†àª¨ યી", + "ik": "ઇનà«àªªàª¿àª¯àª¾àª•", + "ilo": "ઇલોકો", + "inh": "ઇંગà«àª¶", + "io": "ઈડો", + "is": "આઇસલેનà«àª¡àª¿àª•", + "it": "ઇટાલિયન", + "iu": "ઇનà«àª•િટૂટ", + "ja": "જાપાનીàª", + "jbo": "લોજà«àª¬àª¾àª¨", + "jgo": "નગોમà«àª¬àª¾", + "jmc": "મકામે", + "jpr": "જà«àª¦à«‡àª“-પરà«àª¶àª¿àª¯àª¨", + "jrb": "જà«àª¦à«‡àª“-અરબી", + "jv": "જાવાનીસ", + "ka": "જà«àª¯à«‹àª°à«àªœàª¿àª…ન", + "kaa": "કારા-કલà«àªªàª•", + "kab": "કબાઇલ", + "kac": "કાચિન", + "kaj": "જà«àªœà«", + "kam": "કમà«àª¬àª¾", + "kaw": "કાવી", + "kbd": "કબારà«àª¡àª¿àª¯àª¨", + "kcg": "તà«àª¯àª¾àªª", + "kde": "મકોનà«àª¡à«‡", + "kea": "કાબà«àªµàª°à«àª¡àª¿àª†àª¨à«", + "kfo": "કોરો", + "kg": "કોંગો", + "kha": "ખાસી", + "kho": "ખોતાનીસ", + "khq": "કોયરા ચિનિ", + "ki": "કિકà«àª¯à«‚", + "kj": "કà«àªµàª¾àª¨à«àª¯àª¾àª®àª¾", + "kk": "કàªàª¾àª–", + "kkj": "કાકો", + "kl": "કલાલà«àª²àª¿àª¸à«àª¤", + "kln": "કલેજિન", + "km": "ખà«àª®à«‡àª°", + "kmb": "કિમà«àª¬àª¨à«àª¦à«", + "kn": "કનà«àª¨àª¡", + "ko": "કોરિયન", + "koi": "કોમી-પરà«àª®à«àª¯àª¾àª•", + "kok": "કોંકણી", + "kos": "કોસરિયન", + "kpe": "કà«àªªà«‡àª²à«àª²à«‡", + "kr": "કનà«àª°à«€", + "krc": "કરાચય-બલà«àª•ાર", + "krl": "કરેલિયન", + "kru": "કà«àª°à«‚ખ", + "ks": "કાશà«àª®à«€àª°à«€", + "ksb": "શમà«àª¬àª¾àª²àª¾", + "ksf": "બફિયા", + "ksh": "કોલોગà«àª¨àª¿àª¯àª¨", + "ku": "કà«àª°à«àª¦àª¿àª¶", + "kum": "કà«àª®à«€àª•", + "kut": "કà«àª¤à«‡àª¨àª¾àª‡", + "kv": "કોમી", + "kw": "કોરà«àª¨àª¿àª¶", + "ky": "કિરà«àª—à«€àª", + "la": "લેટિન", + "lad": "લાદીનો", + "lag": "લંગી", + "lah": "લાહનà«àª¡àª¾", + "lam": "લામà«àª¬àª¾", + "lb": "લકà«àªà«‡àª®àª¬àª°à«àª—િશ", + "lez": "લેàªàª§à«€àª¯àª¨", + "lfn": "લિંગà«àªµàª¾ ફેનà«àª•ા નોવા", + "lg": "ગાંડા", + "li": "લિંબૂરà«àª—િશ", + "lkt": "લાકોટા", + "ln": "લિંગાલા", + "lo": "લાઓથિયન", + "lol": "મોંગો", + "loz": "લોàªà«€", + "lrc": "ઉતà«àª¤àª°à«€àª¯ લà«àª°à«€", + "lt": "લિથà«àª¨àª¿àª¯àª¨", + "lu": "લૂબા-કટાંગા", + "lua": "લૂબા-લà«àª²à«àª†", + "lui": "લà«àª‡àª¸à«‡àª¨à«‹", + "lun": "લà«àª¨à«àª¡àª¾", + "luo": "લà«àª¯à«àª“", + "lus": "મિàªà«‹", + "luy": "લà«àªˆàª¯àª¾", + "lv": "લાતવિયન", + "mad": "માદà«àª°à«€àª¸", + "mag": "મગહી", + "mai": "મૈથિલી", + "mak": "મકાસર", + "man": "મનà«àª¡àª¿àª¨à«àª—à«‹", + "mas": "મસાઇ", + "mdf": "મોકà«àª·", + "mdr": "મંદાર", + "men": "મેનà«àª¡à«‡", + "mer": "મેરà«", + "mfe": "મોરીસà«àª¯à«‡àª¨", + "mg": "મલાગસી", + "mga": "મધà«àª¯ આઈરિશ", + "mgh": "માખà«àªµàª¾-મીટà«àªŸà«", + "mgo": "મેતા", + "mh": "મારà«àª¶àª²à«€àª", + "mi": "માઓરી", + "mic": "મિકમેક", + "min": "મિનાંગà«àª•ાબાઉ", + "mk": "મેસેડોનિયન", + "ml": "મલયાલમ", + "mn": "મોંગોલિયન", + "mnc": "માનà«àªšà«", + "mni": "મણિપà«àª°à«€", + "moh": "મોહૌક", + "mos": "મોસà«àª¸à«€", + "mr": "મરાઠી", + "mrj": "પશà«àªšàª¿àª®à«€ મારી", + "ms": "મલય", + "mt": "માલà«àªŸàª¿àª", + "mua": "મà«àª¨àª¡àª¾àª¨à«àª—", + "mul": "બહà«àªµàª¿àª§ ભાષાઓ", + "mus": "કà«àª°àª¿àª•", + "mwl": "મિરાંડી", + "mwr": "મારવાડી", + "my": "બરà«àª®à«€àª", + "myv": "àªàª°à«àªàª¯àª¾", + "mzn": "મàªàª¾àª¨à«àª¦à«‡àª°àª¾àª¨à«€", + "na": "નાઉરૂ", + "nan": "nan", + "nap": "નેપોલિટાન", + "naq": "નમા", + "nb": "નોરà«àªµà«‡àªœà«€àª¯àª¨ બોકમાલ", + "nd": "ઉતà«àª¤àª° દેબેલ", + "nds": "લો જરà«àª®àª¨", + "nds_NL": "લો સેકà«àª¸à«‹àª¨", + "ne": "નેપાળી", + "new": "નેવારી", + "ng": "ડોનà«àª—ા", + "nia": "નિયાસ", + "niu": "નિયà«àª†àª¨", + "nl": "ડચ", + "nl_BE": "ફà«àª²à«‡àª®àª¿àª¶", + "nmg": "કà«àªµàª¾àª¸àª¿àª“", + "nn": "નૉરà«àªµà«‡àªœà«€àª¯àª¨ નાયનૉરà«àª¸à«àª•", + "nnh": "નીàªàª®àª¬à«àª¨", + "no": "નૉરà«àªµà«‡àªœà«€àª¯àª¨", + "nog": "નોગાઇ", + "non": "જૂની નોરà«àª¸", + "nqo": "àªàª¨â€™àª•à«‹", + "nr": "દકà«àª·àª¿àª£ દેબેલ", + "nso": "ઉતરી સોથો", + "nus": "નà«àªàª°", + "nv": "નાવાજો", + "nwc": "પરંપરાગત નેવારી", + "ny": "નà«àª¯àª¾àª¨à«àªœàª¾", + "nym": "નà«àª¯àª¾àª®àªµà«‡àªà«€", + "nyn": "નà«àª¯àª¾àª¨àª•ોલ", + "nyo": "નà«àª¯à«‹àª°à«‹", + "nzi": "નà«àªàª¿àª®àª¾", + "oc": "ઓકà«àª¸àª¿àªŸàª¨", + "oj": "ઓજિબà«àªµàª¾", + "om": "ઓરોમો", + "or": "ઉડિયા", + "os": "ઓસà«àª¸à«‡àªŸàª¿àª•", + "osa": "ઓસેજ", + "ota": "ઓટોમાન તà«àª°à«àª•િશ", + "pa": "પંજાબી", + "pag": "પંગાસીનાન", + "pal": "પહલવી", + "pam": "પમà«àªªàª¾àª¨à«àª—ા", + "pap": "પાપિયામેનà«àªŸà«‹", + "pau": "પલાઉઆન", + "pcm": "નાજેરીયન પીજીન", + "peo": "જૂની ફારસી", + "phn": "ફોનિશિયન", + "pi": "પાલી", + "pl": "પોલીશ", + "pon": "પોહપિàªàª¨", + "prg": "પà«àª°à«àª¸à«àª¸à«€àª¯àª¨", + "pro": "જà«àª¨à«€ પà«àª°à«‹àªµà«‡àª¨à«àª¸àª²", + "ps": "પશà«àª¤à«‹", + "pt": "પોરà«àªŸà«àª—à«€àª", + "pt_BR": "બà«àª°àª¾àªàª¿àª²à«€àª¯àª¨ પોરà«àªŸà«àª—à«€àª", + "pt_PT": "યà«àª°à«‹àªªàª¿àª¯àª¨ પોરà«àªŸà«àª—à«€àª", + "qu": "કà«àªµà«‡àªšà«àª†", + "quc": "કિચે", + "raj": "રાજસà«àª¥àª¾àª¨à«€", + "rap": "રાપાનà«àª‡", + "rar": "રારોટોંગન", + "rm": "રોમાનà«àª¶", + "rn": "રૂનà«àª¦à«€", + "ro": "રોમાનિયન", + "ro_MD": "મોલડાવિયન", + "rof": "રોમà«àª¬à«‹", + "rom": "રોમાની", + "root": "રૂટ", + "ru": "રશિયન", + "rup": "અરોમેનિયન", + "rw": "કિનà«àª¯àª¾àª°àªµàª¾àª¨à«àª¡àª¾", + "rwk": "રવા", + "sa": "સંસà«àª•ૃત", + "sad": "સોંડવે", + "sah": "સખા", + "sam": "સામરિટાન અરેમિક", + "saq": "સમà«àª¬à«àª°à«", + "sas": "સાસાક", + "sat": "સંતાલી", + "sba": "નà«àª—ામà«àª¬à«‡àª¯", + "sbp": "સાંગà«", + "sc": "સારà«àª¦àª¿àª¨àª¿àª¯àª¨", + "scn": "સિસિલિયાન", + "sco": "સà«àª•ોટà«àª¸", + "sd": "સિંધી", + "sdh": "સરà«àª˜àª¨ કà«àª°à«àª¦à«€àª¶", + "se": "ઉતà«àª¤àª°à«€àª¯ સામી", + "seh": "સેના", + "sel": "સેલà«àª•પ", + "ses": "કોયરાબોરો સેનà«àª¨à«€", + "sg": "સાંગો", + "sga": "જૂની આયરિશ", + "sh": "સરà«àª¬à«‹-કà«àª°à«‹àªàª¶àª¿àª¯àª¨", + "shi": "તેશીલહિટ", + "shn": "શેન", + "si": "સિંહાલી", + "sid": "સિદામો", + "sk": "સà«àª²à«‹àªµà«…ક", + "sl": "સà«àª²à«‹àªµà«‡àª¨àª¿àª¯àª¨", + "sm": "સામોન", + "sma": "દકà«àª·àª¿àª£ સામી", + "smj": "લà«àª¯à«àª² સામી", + "smn": "ઇનારી સામી", + "sms": "સà«àª•ોલà«àªŸ સામી", + "sn": "શોના", + "snk": "સોનિનà«àª•ે", + "so": "સોમાલી", + "sog": "સોગà«àª¡àª¿àªàª¨", + "sq": "અલà«àª¬à«‡àª¨àª¿àª¯àª¨", + "sr": "સરà«àª¬àª¿àª¯àª¨", + "srn": "સà«àª°àª¾àª¨àª¨ ટોનà«àª—à«‹", + "srr": "સેરેર", + "ss": "સà«àªµàª¾àª¤à«€", + "ssy": "સાહો", + "st": "સદરà«àª¨ સોથો", + "su": "સંડેનીàª", + "suk": "સà«àª•à«àª®àª¾", + "sus": "સà«àª¸à«", + "sux": "સà«àª®à«‡àª°àª¿àª¯àª¨", + "sv": "સà«àªµà«€àª¡àª¿àª¶", + "sw": "સà«àªµàª¾àª¹àª¿àª²à«€", + "sw_CD": "કોંગો સà«àªµàª¾àª¹àª¿àª²à«€", + "swb": "કોમોરિયન", + "syc": "પરંપરાગત સિરિàªàª•", + "syr": "સિરિàªàª•", + "ta": "તમિલ", + "tcy": "તà«àª²à«", + "te": "તેલà«àª—à«", + "tem": "ટિમà«àª¨à«‡", + "teo": "તેસો", + "ter": "તેરેનો", + "tet": "તેતà«àª®", + "tg": "તાજીક", + "th": "થાઈ", + "ti": "ટાઇગà«àª°àª¿àª¨àª¿àª¯àª¾", + "tig": "ટાઇગà«àª°à«‡", + "tiv": "તિવ", + "tk": "તà«àª°à«àª•મેન", + "tkl": "તોકેલાઉ", + "tl": "ટાગાલોગ", + "tlh": "કà«àª²àª¿àª¨à«àª—ોન", + "tli": "કà«àª²à«€àª¨à«àª—કિટ", + "tmh": "તામાશેખ", + "tn": "તà«àª¸à«àªµàª¾àª¨àª¾", + "to": "ટોંગાન", + "tog": "નà«àª¯àª¾àª¸àª¾ ટોનà«àª—ા", + "tpi": "ટોક પિસિન", + "tr": "ટરà«àª•ીશ", + "trv": "ટારોકો", + "ts": "સોંગા", + "tsi": "સિમà«àª¶àª¿àª¯àª¨", + "tt": "તતાર", + "ttt": "મà«àª¸à«àª²àª¿àª® તાટ", + "tum": "તà«àª®à«àª¬à«àª•ા", + "tvl": "તà«àªµàª¾àª²à«", + "tw": "ટà«àªµàª¾àª‡", + "twq": "તસાવાક", + "ty": "તાહિતિયન", + "tyv": "ટà«àªµà«€àª¨àª¿àª¯àª¨", + "tzm": "સેનà«àªŸà«àª°àª² àªàªŸà«àª²àª¸ તામાàªàª¿àª—à«àªŸ", + "udm": "ઉદમà«àª°à«àª¤", + "ug": "ઉઇગà«àª°", + "uga": "યà«àª—ેરિટિક", + "uk": "યà«àª•à«àª°à«‡àª¨àª¿àª¯àª¨", + "umb": "ઉમà«àª¬à«àª¨à«àª¡à«‚", + "und": "અજà«àªžàª¾àª¤ ભાષા", + "ur": "ઉરà«àª¦à«‚", + "uz": "ઉàªà«àª¬à«‡àª•", + "vai": "વાઇ", + "ve": "વેનà«àª¦àª¾", + "vi": "વિયેતનામીસ", + "vo": "વોલાપà«àª•", + "vot": "વોટિક", + "vun": "વà«àª¨à«àªœà«‹", + "wa": "વાલૂન", + "wae": "વેલà«àª¸à«‡àª°", + "wal": "વોલાયટà«àªŸàª¾", + "war": "વારેય", + "was": "વાશો", + "wbp": "વારà«àª²à«àªªà«€àª°à«€", + "wo": "વોલોફ", + "wuu": "wuu", + "xal": "કાલà«àª®àª¿àª•", + "xh": "ખોસા", + "xog": "સોગા", + "yao": "યાઓ", + "yap": "યાપીસ", + "yav": "યાનà«àª—બેન", + "ybb": "યેમà«àª¬àª¾", + "yi": "યિદà«àª¦àª¿àª¶", + "yo": "યોરૂબા", + "yue": "કેંટોનીàª", + "za": "àªà«àª†àª—", + "zap": "àªà«‡àªªà«‹àªŸà«‡àª•", + "zbl": "બà«àª²àª¿àª¸àª¿àª®à«àª¬à«‹àª²à«àª¸", + "zen": "àªà«‡àª¨àª¾àª—ા", + "zgh": "પà«àª°àª®àª¾àª£àª­à«‚ત મોરોકà«àª•ન તામાàªàª¿àª—à«àªŸ", + "zh": "ચાઇનીàª", + "zh_Hans": "સરળીકૃત ચાઇનીàª", + "zh_Hant": "પારંપરિક ચાઇનીàª", + "zu": "àªà«àª²à«", + "zun": "àªà«‚ની", + "zxx": "કોઇ ભાષાશાસà«àª¤à«àª°à«€àª¯ સામગà«àª°à«€ નથી", + "zza": "àªàª¾àªàª¾" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/gv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/gv.json new file mode 100644 index 0000000000000000000000000000000000000000..d273e28e43fc6ede2f2ca325e2e210e414b61ae8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/gv.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "gv": "Gaelg" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ha.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ha.json new file mode 100644 index 0000000000000000000000000000000000000000..1728e5c584134ce9407d7c5e79fb3ba14949a880 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ha.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ak": "Akan", + "am": "Amharik", + "ar": "Larabci", + "be": "Belarusanci", + "bg": "Bulgaranci", + "bn": "Bengali", + "cs": "Harshen Cak", + "de": "Jamusanci", + "el": "Girkanci", + "en": "Turanci", + "es": "Ispaniyanci", + "fa": "Parisanci", + "fr": "Faransanci", + "ha": "Hausa", + "hi": "Harshen Hindi", + "hu": "Harshen Hungari", + "id": "Harshen Indunusiya", + "ig": "Inyamuranci", + "it": "Italiyanci", + "ja": "Japananci", + "jv": "Jabananci", + "km": "Harshen Kimar", + "ko": "Harshen Koreya", + "ms": "Harshen Malai", + "my": "Burmanci", + "ne": "Nepali", + "nl": "Holanci", + "pa": "Punjabi", + "pl": "Harshen Polan", + "pt": "Harshen Portugal", + "ro": "Romaniyanci", + "ru": "Rashanci", + "rw": "Kiniyaruwanda", + "so": "Somali", + "sv": "Harshen Suwedan", + "ta": "Tamil", + "th": "Thai", + "tr": "Harshen Turkiyya", + "uk": "Harshen Yukuren", + "ur": "Harshen Urdu", + "vi": "Harshen Biyetinam", + "yo": "Yarbanci", + "zh": "Harshen Sin", + "zu": "Harshen Zulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/he.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/he.json new file mode 100644 index 0000000000000000000000000000000000000000..66cfacc7b06ab6af69db148e993f4ba4a6cb1ffc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/he.json @@ -0,0 +1,524 @@ +{ + "Version": "2.1.29.27", + "Names": { + "aa": "×פ×רית", + "ab": "×בחזית", + "ace": "×כינזית", + "ach": "×קולי", + "ada": "×דנמה", + "ady": "×דיגית", + "ae": "×בסטן", + "af": "×פריק×נס", + "afh": "×פריהילי", + "agq": "××”×™×™×", + "ain": "×ינו", + "ak": "××§×ן", + "akk": "×כדית", + "ale": "×ל×וט", + "alt": "×לט××™ דרומית", + "am": "×מהרית", + "an": "×ר×גונית", + "ang": "×נגלית עתיקה", + "anp": "×נג׳יקה", + "ar": "ערבית", + "ar_001": "ערבית ספרותית", + "arc": "×רמית", + "arn": "×ר×וקנית", + "arp": "×רפהו", + "arw": "×רוו××§", + "as": "×ס×מית", + "asa": "×סו", + "ast": "×סטורית", + "av": "×ב×רית", + "awa": "×וו×דית", + "ay": "×יימ×רית", + "az": "×זרית", + "ba": "בשקירית", + "bal": "ב×לוצ׳י", + "ban": "בלינזית", + "bar": "בוו×רית", + "bas": "בס××", + "bax": "במו×", + "bbj": "גומ×לה", + "be": "בל×רוסית", + "bej": "בז׳ה", + "bem": "במבה", + "bez": "בנה", + "bfd": "ב×פוט", + "bg": "בולגרית", + "bgn": "ב×לוצ׳י מערבית", + "bho": "בוג׳פורי", + "bi": "ביסלמה", + "bik": "ביקול", + "bin": "ביני", + "bkm": "קו×", + "bla": "סיקסיקה", + "bm": "במב×רה", + "bn": "בנגלית", + "bo": "טיבטית", + "br": "ברטונית", + "bra": "בר×ג׳", + "brx": "בודו", + "bs": "בוסנית", + "bss": "×קוסה", + "bua": "בורי×ט", + "bug": "בוגינזית", + "bum": "בולו", + "byn": "בלין", + "byv": "מדומבה", + "ca": "קטל×נית", + "cad": "×§×דו", + "car": "×§×ריב", + "cay": "×§×יוגה", + "cch": "×טס×", + "ce": "צ׳צ׳נית", + "ceb": "קבו×נו", + "cgg": "צ׳יגה", + "ch": "צ׳מורו", + "chb": "צ׳יבצ׳ה", + "chg": "צ׳××’×ט××™", + "chk": "צ׳וקסה", + "chm": "מ×רי", + "chn": "ניב צ׳ינוק", + "cho": "צ׳וקט×ו", + "chp": "צ׳יפווי×ן", + "chr": "צ׳רוקי", + "chy": "ש×יין", + "ckb": "כורדית סור×נית", + "co": "קורסיקנית", + "cop": "קופטית", + "cr": "קרי", + "crh": "טטרית של קרי×", + "crs": "קרי×ולית (סיישל)", + "cs": "צ׳כית", + "csb": "קשובית", + "cu": "סל×בית כנסייתית עתיקה", + "cv": "צ׳וב×ש", + "cy": "וולשית", + "da": "דנית", + "dak": "דקוטה", + "dar": "דרגווה", + "dav": "ט×יטה", + "de": "גרמנית", + "de_CH": "גרמנית (שוויץ)", + "del": "דל×וור", + "den": "סל×בית", + "dgr": "דוגריב", + "din": "דינקה", + "dje": "×–×רמה", + "doi": "דוגרי", + "dsb": "סורבית נמוכה", + "dua": "דו×לה", + "dum": "הולנדית תיכונה", + "dv": "דיבהי", + "dyo": "ג׳ולה פונית", + "dyu": "דיולה", + "dz": "דזונקה", + "dzg": "דז×× ×’×”", + "ebu": "×מבו", + "ee": "×ווה", + "efi": "×פיק", + "egy": "מצרית עתיקה", + "eka": "×קיוק", + "el": "יוונית", + "elx": "עילמית", + "en": "×נגלית", + "en_GB": "×נגלית (בריטניה)", + "enm": "×נגלית תיכונה", + "eo": "×ספרנטו", + "es": "ספרדית", + "et": "×סטונית", + "eu": "בסקית", + "ewo": "×וונדו", + "fa": "פרסית", + "fan": "פנג", + "fat": "פ×נטי", + "ff": "פולה", + "fi": "פינית", + "fil": "פיליפינית", + "fj": "פיג׳ית", + "fo": "פ×רו×זית", + "fon": "פון", + "fr": "צרפתית", + "fr_CH": "צרפתית (שוויץ)", + "frm": "צרפתית תיכונה", + "fro": "צרפתית עתיקה", + "frr": "פריזית צפונית", + "frs": "פריזית מזרחית", + "fur": "פריולית", + "fy": "פריזית מערבית", + "ga": "×ירית", + "gaa": "×’×", + "gag": "×’×’×וזית", + "gan": "סינית ×’×ן", + "gay": "×’×יו", + "gba": "גב××™×”", + "gd": "×’×לית סקוטית", + "gez": "×’×¢×–", + "gil": "קיריבטית", + "gl": "גליצי×נית", + "gmh": "גרמנית בינונית-גבוהה", + "gn": "גו×רני", + "goh": "גרמנית עתיקה גבוהה", + "gon": "גונדי", + "gor": "גורונט×לו", + "got": "גותית", + "grb": "גרבו", + "grc": "יוונית עתיקה", + "gsw": "גרמנית שוויצרית", + "gu": "גוג׳×רטי", + "guz": "גוסי", + "gv": "מ×נית", + "gwi": "גוויצ׳ן", + "ha": "×”×וסה", + "hai": "×”×ידה", + "hak": "סינית ×”××§×”", + "haw": "הוו×ית", + "he": "עברית", + "hi": "הינדי", + "hil": "היליג×ינון", + "hit": "חתית", + "hmn": "המונג", + "ho": "הירי מוטו", + "hr": "קרו×טית", + "hsb": "סורבית גבוהה", + "hsn": "סינית שי×× ×’", + "ht": "קרי×ולית (×”×יטי)", + "hu": "הונגרית", + "hup": "הופה", + "hy": "×רמנית", + "hz": "הררו", + "ia": "â€×ינטרלינגו××”", + "iba": "×יב×ן", + "ibb": "×יביביו", + "id": "×ינדונזית", + "ie": "×ינטרלינגה", + "ig": "×יגבו", + "ii": "סצ׳ו×ן ×™×™", + "ik": "×ינופי××§", + "ilo": "×ילוקו", + "inh": "×ינגושית", + "io": "×ידו", + "is": "×יסלנדית", + "it": "×יטלקית", + "iu": "×ינוקטיטוט", + "ja": "יפנית", + "jbo": "לוז׳ב×ן", + "jgo": "נגומבה", + "jmc": "מ××§×מה", + "jpr": "פרסית יהודית", + "jrb": "ערבית יהודית", + "jv": "×™×וו×ית", + "ka": "×’×ורגית", + "kaa": "×§×ר×-קלפ××§", + "kab": "קבילה", + "kac": "קצ׳ין", + "kaj": "ג׳ו", + "kam": "קמבה", + "kaw": "×§×ווי", + "kbd": "קברדית", + "kbl": "קנמבו", + "kcg": "טי×פ", + "kde": "מקונדה", + "kea": "×§×בוורדי×נו", + "kfo": "קורו", + "kg": "קונגו", + "kha": "×§×”×סי", + "kho": "קוט×נזית", + "khq": "קוירה צ׳יני", + "ki": "קיקויו", + "kj": "קו×× ×™×מה", + "kk": "קזחית", + "kkj": "×§×קו", + "kl": "גרינלנדית", + "kln": "קלנג׳ין", + "km": "חמרית", + "kmb": "קימבונדו", + "kn": "×§× ×דה", + "ko": "קורי×נית", + "koi": "קומי-פרמי×קית", + "kok": "קונק×× ×™", + "kos": "קוסר××™×ן", + "kpe": "קפלה", + "kr": "×§×נורי", + "krc": "קר×צ׳י-בלקר", + "krl": "×§×רלית", + "kru": "קורוק", + "ks": "קשמירית", + "ksb": "שמב×לה", + "ksf": "ב×פיה", + "ksh": "קולוני×ן", + "ku": "כורדית", + "kum": "קומיקית", + "kut": "קוטנ××™", + "kv": "קומי", + "kw": "קורנית", + "ky": "קירגיזית", + "la": "לטינית", + "lad": "לדינו", + "lag": "ל×× ×’×™", + "lah": "לנדה", + "lam": "למבה", + "lb": "לוקסמבורגית", + "lez": "לזגית", + "lg": "×’×נדה", + "li": "לימבורגית", + "lkt": "לקוטה", + "ln": "לינגלה", + "lo": "ל×ו", + "lol": "מונגו", + "loz": "לוזית", + "lrc": "לורית צפונית", + "lt": "ליט×ית", + "lu": "לובה-קטנגה", + "lua": "לובה-לולו××”", + "lui": "לויסנו", + "lun": "לונדה", + "luo": "לו×ו", + "lus": "מיזו", + "luy": "לויה", + "lv": "לטבית", + "mad": "מדורזית", + "maf": "מ×פ××”", + "mag": "מ××’×הית", + "mai": "מ×יטילית", + "mak": "מקס×ר", + "man": "מנדינגו", + "mas": "מס×ית", + "mde": "מ×ב×", + "mdf": "מוקשה", + "mdr": "מנד×ר", + "men": "מנדה", + "mer": "מרו", + "mfe": "קרי×ולית מ×וריצי×נית", + "mg": "מלגשית", + "mga": "×ירית תיכונה", + "mgh": "מ×קוו××” מטו", + "mgo": "מט×", + "mh": "מרשלית", + "mi": "מ×ורית", + "mic": "מיקמק", + "min": "מיננגקב×ו", + "mk": "מקדונית", + "ml": "מלי×ל××", + "mn": "מונגולית", + "mnc": "מנצ׳ו", + "mni": "מניפורית", + "moh": "מוהוק", + "mos": "מוסי", + "mr": "מר×טהי", + "ms": "מל×ית", + "mt": "מלטית", + "mua": "מונד×× ×’", + "mul": "מספר שפות", + "mus": "קריק", + "mwl": "מירנדזית", + "mwr": "מרוו×רי", + "my": "בורמזית", + "mye": "מ×יין", + "myv": "×רזיה", + "mzn": "מ××–×נדר×× ×™", + "na": "× ×ורית", + "nan": "סינית מין × ×ן", + "nap": "נפוליטנית", + "naq": "× ×מה", + "nb": "נורווגית ספרותית", + "nd": "נדבלה צפונית", + "nds": "גרמנית תחתית", + "nds_NL": "סקסונית תחתית", + "ne": "נפ×לית", + "new": "נוו×רי", + "ng": "נדונגה", + "nia": "× ×™×ס", + "niu": "ניו×ן", + "nl": "הולנדית", + "nl_BE": "פלמית", + "nmg": "קוו×סיו", + "nn": "נורווגית חדשה", + "nnh": "× ×’×™×מבון", + "no": "נורווגית", + "nog": "נוג××™", + "non": "â€× ×•רדית עתיקה", + "nqo": "נ׳קו", + "nr": "נדבלה דרומית", + "nso": "סותו צפונית", + "nus": "נו×ר", + "nv": "× ×וו×חו", + "nwc": "נוו×רית קל×סית", + "ny": "× ×™×נג׳ה", + "nym": "× ×™×מווזי", + "nyn": "× ×™×נקולה", + "nyo": "ניורו", + "nzi": "נזימה", + "oc": "×וקסיטנית", + "oj": "×וג׳יבווה", + "om": "×ורומו", + "or": "×וריה", + "os": "×וסטית", + "osa": "×וסג׳", + "ota": "טורקית עותומנית", + "pa": "פנג׳×בי", + "pag": "פנגסינ×ן", + "pal": "פל×בי", + "pam": "פמפ×× ×™×”", + "pap": "פפי×מנטו", + "pau": "פלוו×ן", + "pcm": "ניגרית פידג׳ית", + "peo": "פרסית עתיקה", + "phn": "פיניקית", + "pi": "פ×לי", + "pl": "פולנית", + "pon": "פונפי×ן", + "prg": "פרוסית", + "pro": "פרובנס×ל עתיקה", + "ps": "פ×שטו", + "pt": "פורטוגזית", + "qu": "קצ׳ו××”", + "quc": "קיצ׳ה", + "raj": "ר×ג׳סט×× ×™", + "rap": "רפ×נוי", + "rar": "ררוטונג×ן", + "rm": "רומ×נש", + "rn": "קירונדי", + "ro": "רומנית", + "ro_MD": "מולדבית", + "rof": "רומבו", + "rom": "רומ×× ×™", + "root": "רוט", + "ru": "רוסית", + "rup": "×רומנית", + "rw": "קנירו×נדית", + "rwk": "ר×ווה", + "sa": "סנסקריט", + "sad": "סנד×ווה", + "sah": "ס××—×”", + "sam": "×רמית שומרונית", + "saq": "סמבורו", + "sas": "ס×סק", + "sat": "ס×נט×לי", + "sba": "נגמב××™", + "sbp": "ס×נגו", + "sc": "סרדינית", + "scn": "סיצילי×נית", + "sco": "סקוטית", + "sd": "סינדהית", + "sdh": "כורדית דרומית", + "se": "סמי צפונית", + "see": "סנקה", + "seh": "סנה", + "sel": "סלקופ", + "ses": "קויר×בורו סני", + "sg": "סנגו", + "sga": "×ירית עתיקה", + "sh": "סרבו-קרו×טית", + "shi": "שילה", + "shn": "ש×ן", + "shu": "ערבית צ׳×דית", + "si": "סינהלה", + "sid": "סיד×מו", + "sk": "סלובקית", + "sl": "סלובנית", + "sm": "סמו×ית", + "sma": "ס×מי דרומית", + "smj": "לולה ס×מי", + "smn": "××™× ×רי ס×מי", + "sms": "סקולט ס×מי", + "sn": "שונה", + "snk": "סונינקה", + "so": "סומלית", + "sog": "סוגדי×ן", + "sq": "×לבנית", + "sr": "סרבית", + "srn": "סרנ×ן טונגו", + "srr": "סרר", + "ss": "ס×ווזי", + "ssy": "ס×הו", + "st": "סותו דרומית", + "su": "סונדנזית", + "suk": "סוקומה", + "sus": "סוסו", + "sux": "שומרית", + "sv": "שוודית", + "sw": "סווהילי", + "sw_CD": "סווהילי קונגו", + "syc": "סירית קל×סית", + "syr": "סורית", + "ta": "טמילית", + "te": "טלוגו", + "tem": "טימנה", + "teo": "טסו", + "ter": "טרנו", + "tet": "טטו×", + "tg": "טג׳יקית", + "th": "ת×ית", + "ti": "תיגרינית", + "tig": "טיגרית", + "tiv": "טיב", + "tk": "טורקמנית", + "tkl": "טוקל×ו", + "tl": "ט××’×לוג", + "tlh": "קלינגון", + "tli": "טלינגיט", + "tmh": "טמ×שק", + "tn": "סוו×× ×”", + "to": "טונג×ית", + "tog": "× ×™×סה טונגה", + "tpi": "טוק פיסין", + "tr": "טורקית", + "trv": "טרוקו", + "ts": "טסונגה", + "tsi": "טסימשי×ן", + "tt": "טטרית", + "tum": "טומבוקה", + "tvl": "טוב×לו", + "tw": "טווי", + "twq": "טסוו××§", + "ty": "טהיטית", + "tyv": "טובינית", + "tzm": "טמזייט של מרכז מרוקו", + "udm": "×ודמורט", + "ug": "×ויגור", + "uga": "×וגריתית", + "uk": "×וקר×ינית", + "umb": "×ומבונדו", + "und": "שפה ×œ× ×™×“×•×¢×”", + "ur": "×ורדו", + "uz": "×וזבקית", + "vai": "וו××™", + "ve": "וונדה", + "vi": "וי×טנמית", + "vo": "â€×•ול×פיק", + "vot": "ווטיק", + "vun": "וונג׳ו", + "wa": "וו×לון", + "wae": "וו×לסר", + "wal": "וולי×טה", + "war": "וור××™", + "was": "וו×שו", + "wbp": "וורלפירי", + "wo": "וולוף", + "wuu": "סינית וו", + "xal": "קלמיקית", + "xh": "קוסה", + "xog": "סוגה", + "yao": "×™×ו", + "yap": "×™×פזית", + "yav": "×™×נגבן", + "ybb": "ימבה", + "yi": "יידיש", + "yo": "יורובה", + "yue": "קנטונזית", + "za": "זו×× ×’", + "zap": "×–×פוטק", + "zbl": "בליסימבולס", + "zen": "×–× ××’×”", + "zgh": "תמזיע׳ת מרוק×ית תקנית", + "zh": "סינית", + "zh_Hans": "סינית פשוטה", + "zh_Hant": "סינית מסורתית", + "zu": "זולו", + "zun": "זוני", + "zxx": "×œ×œ× ×ª×•×›×Ÿ לשוני", + "zza": "×–××–×" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/hi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/hi.json new file mode 100644 index 0000000000000000000000000000000000000000..9ba864904de11140718e8fa538283002d286c1fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/hi.json @@ -0,0 +1,516 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "अफ़ार", + "ab": "अबà¥à¤–़ाज़ियन", + "ace": "अचाइनीस", + "ach": "अकोली", + "ada": "अदानà¥à¤—मे", + "ady": "अदिघे", + "ae": "अवसà¥à¤¤à¤¾à¤ˆ", + "af": "अफ़à¥à¤°à¥€à¤•ी", + "afh": "अफà¥à¤°à¤¿à¤¹à¤¿à¤²à¥€", + "agq": "अगà¥à¤¹à¥‡à¤®", + "ain": "à¤à¤¨à¥‚", + "ak": "अकन", + "akk": "अकà¥à¤•ादी", + "ale": "अलेउत", + "alt": "दकà¥à¤·à¤¿à¤£à¥€ अलà¥à¤¤à¤¾à¤ˆ", + "am": "अमà¥à¤¹à¥‡à¤°à¥€", + "an": "अरà¥à¤—ोनी", + "ang": "पà¥à¤°à¤¾à¤¨à¥€ अंगà¥à¤°à¥‡à¤œà¤¼à¥€", + "anp": "अंगिका", + "ar": "अरबी", + "ar_001": "आधà¥à¤¨à¤¿à¤• मानक अरबी", + "arc": "à¤à¤°à¥‡à¤®à¥‡à¤•", + "arn": "मापूचे", + "arp": "अराफाओ", + "arw": "अरावक", + "as": "असमिया", + "asa": "असà¥", + "ast": "असà¥à¤¤à¥à¤°à¤¿à¤¯à¤¨", + "av": "अवेरिक", + "awa": "अवधी", + "ay": "आयमारा", + "az": "अज़रबैजानी", + "ba": "बशख़िर", + "bal": "बलूची", + "ban": "बालिनीस", + "bas": "बसा", + "be": "बेलारूसी", + "bej": "बेजा", + "bem": "बेमà¥à¤¬à¤¾", + "bez": "बेना", + "bg": "बà¥à¤²à¥à¤—ारियाई", + "bgn": "पशà¥à¤šà¤¿à¤®à¥€ बलोची", + "bho": "भोजपà¥à¤°à¥€", + "bi": "बिसà¥à¤²à¤¾à¤®à¤¾", + "bik": "बिकोल", + "bin": "बिनी", + "bla": "सिकà¥à¤¸à¤¿à¤•ा", + "bm": "बामà¥à¤¬à¤¾à¤°à¤¾", + "bn": "बंगाली", + "bo": "तिबà¥à¤¬à¤¤à¥€", + "br": "बà¥à¤°à¥‡à¤Ÿà¤¨", + "bra": "बà¥à¤°à¤œ", + "brx": "बोडो", + "bs": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "bua": "बà¥à¤°à¤¿à¤¯à¤¾à¤¤", + "bug": "बगिनीस", + "byn": "बà¥à¤²à¤¿à¤¨", + "ca": "कातालान", + "cad": "कैडà¥à¤¡à¥‹", + "car": "कैरिब", + "cch": "अतà¥à¤¸à¤®", + "ce": "चेचन", + "ceb": "सिबà¥à¤†à¤¨à¥‹", + "cgg": "शिगा", + "ch": "कमोरो", + "chb": "चिबà¥à¤šà¤¾", + "chg": "छगाताई", + "chk": "चूकीस", + "chm": "मारी", + "chn": "चिनूक जारगॉन", + "cho": "चोकà¥à¤¤à¥Œ", + "chp": "शिपेवà¥à¤¯à¤¾à¤¨", + "chr": "शेरोकी", + "chy": "शेयेनà¥à¤¨", + "ckb": "सोरानी कà¥à¤°à¥à¤¦à¤¿à¤¶", + "co": "कोरà¥à¤¸à¥€à¤•न", + "cop": "कॉपà¥à¤Ÿà¤¿à¤•", + "cr": "कà¥à¤°à¥€", + "crh": "कà¥à¤°à¥€à¤®à¥€à¤¨ तà¥à¤°à¥à¤•ी", + "crs": "सेसेलà¥à¤µà¤¾ कà¥à¤°à¤¿à¤“ल फà¥à¤°à¥‡à¤‚च", + "cs": "चेक", + "csb": "काशà¥à¤¬à¤¿à¤¯à¤¨", + "cu": "चरà¥à¤š सालà¥à¤µà¤¿à¤•", + "cv": "चूवाश", + "cy": "वेलà¥à¤¶", + "da": "डेनिश", + "dak": "दाकोता", + "dar": "दारà¥à¤—वा", + "dav": "तैता", + "de": "जरà¥à¤®à¤¨", + "de_AT": "ऑसà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾à¤ˆ जरà¥à¤®à¤¨", + "de_CH": "सà¥à¤µà¤¿à¤¸ उचà¥à¤š जरà¥à¤®à¤¨", + "del": "डिलैवेयर", + "den": "सà¥à¤²à¥‡à¤µ", + "dgr": "डोगà¥à¤°à¤¿à¤¬", + "din": "दिनà¥à¤•ा", + "dje": "à¤à¤¾à¤°à¥à¤®à¤¾", + "doi": "डोगà¥à¤°à¥€", + "dsb": "निचला सॉरà¥à¤¬à¤¿à¤¯à¤¨", + "dua": "दà¥à¤†à¤²à¤¾", + "dum": "मधà¥à¤¯à¤•ालीन पà¥à¤°à¥à¤¤à¤—ाली", + "dv": "दिवेही", + "dyo": "जोला-फोंई", + "dyu": "डà¥à¤¯à¥à¤²à¤¾", + "dz": "ज़ोनà¥à¤—खा", + "dzg": "दज़ागा", + "ebu": "à¤à¤®à¥à¤¬à¥", + "ee": "ईवे", + "efi": "à¤à¤«à¤¿à¤•", + "egy": "पà¥à¤°à¤¾à¤šà¥€à¤¨ मिसà¥à¤°à¥€", + "eka": "à¤à¤•ाजà¥à¤•", + "el": "यूनानी", + "elx": "à¤à¤²à¤¾à¤®à¤¾à¤‡à¤Ÿ", + "en": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€", + "en_AU": "ऑसà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾à¤ˆ अंगà¥à¤°à¥‡à¤œà¤¼à¥€", + "en_CA": "कनाडाई अंगà¥à¤°à¥‡à¤œà¤¼à¥€", + "en_GB": "बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ अंगà¥à¤°à¥‡à¤œà¤¼à¥€", + "en_US": "अमेरिकी अंगà¥à¤°à¥‡à¤œà¤¼à¥€", + "enm": "मधà¥à¤¯à¤•ालीन अंगà¥à¤°à¥‡à¤œà¤¼à¥€", + "eo": "à¤à¤¸à¥à¤ªà¥‡à¤°à¥‡à¤‚तो", + "es": "सà¥à¤ªà¥‡à¤¨à¥€", + "es_419": "लैटिन अमेरिकी सà¥à¤ªà¥‡à¤¨à¤¿à¤¶", + "es_ES": "यूरोपीय सà¥à¤ªà¥‡à¤¨à¤¿à¤¶", + "es_MX": "मैकà¥à¤¸à¤¿à¤•न सà¥à¤ªà¥‡à¤¨à¤¿à¤¶", + "et": "à¤à¤¸à¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "eu": "बासà¥à¤•", + "ewo": "इवोनà¥à¤¡à¥‹", + "fa": "फ़ारसी", + "fan": "फैनà¥à¤—", + "fat": "फनà¥à¤Ÿà¥€", + "ff": "फà¥à¤²à¤¾à¤¹", + "fi": "फ़िनिश", + "fil": "फ़िलिपीनो", + "fj": "फ़ीजी", + "fo": "फ़ैरोइज़", + "fon": "फॉन", + "fr": "फ़à¥à¤°à¥‡à¤‚च", + "fr_CA": "कनाडाई फ़à¥à¤°à¥‡à¤‚च", + "fr_CH": "सà¥à¤µà¤¿à¤¸ फ़à¥à¤°à¥‡à¤‚च", + "frm": "मधà¥à¤¯à¤•ालीन फ़à¥à¤°à¤¾à¤‚सीसी", + "fro": "पà¥à¤°à¤¾à¤¤à¤¨ फ़à¥à¤°à¤¾à¤‚सीसी", + "frr": "उतà¥à¤¤à¤°à¥€ फ़à¥à¤°à¥€à¤¸à¤¿à¤¯à¤¾à¤ˆ", + "frs": "पूरà¥à¤µà¥€ फ़à¥à¤°à¥€à¤¸à¤¿à¤¯à¤¾à¤ˆ", + "fur": "फà¥à¤°à¥€à¤¯à¥à¤²à¥€à¤¯à¤¾à¤¨", + "fy": "पशà¥à¤šà¤¿à¤®à¥€ फ़à¥à¤°à¤¿à¤¸à¤¿à¤¯à¤¾à¤ˆ", + "ga": "आइरिश", + "gaa": "गा", + "gag": "गागौज़", + "gay": "गायो", + "gba": "गà¥à¤¬à¤¾à¤¯à¤¾", + "gd": "सà¥à¤•ॉटिश गाà¤à¤²à¤¿à¤•", + "gez": "गीज़", + "gil": "गिलà¥à¤¬à¤°à¤¤à¥€à¤¸", + "gl": "गैलिशियन", + "gmh": "मधà¥à¤¯à¤•ालीन हाइ जरà¥à¤®à¤¨", + "gn": "गà¥à¤†à¤°à¤¾à¤¨à¥€", + "goh": "पà¥à¤°à¤¾à¤¤à¤¨ हाइ जरà¥à¤®à¤¨", + "gon": "गाà¤à¤¡à¥€", + "gor": "गोरोनà¥à¤¤à¤¾à¤²à¥‹", + "got": "गॉथिक", + "grb": "गà¥à¤°à¥‡à¤¬à¥‹", + "grc": "पà¥à¤°à¤¾à¤šà¥€à¤¨ यूनानी", + "gsw": "सà¥à¤µà¤¿à¤¸ जरà¥à¤®à¤¨", + "gu": "गà¥à¤œà¤°à¤¾à¤¤à¥€", + "guz": "गà¥à¤¸à¥€", + "gv": "मैंकà¥à¤¸", + "gwi": "गà¥à¤µà¤¿à¤šâ€™à¤‡à¤¨", + "ha": "हौसा", + "hai": "हैडा", + "haw": "हवाई", + "he": "हिबà¥à¤°à¥‚", + "hi": "हिनà¥à¤¦à¥€", + "hil": "हिलिगेनन", + "hit": "हिताइत", + "hmn": "हà¥à¤®à¥‰à¤‚ग", + "ho": "हिरी मोटू", + "hr": "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾à¤ˆ", + "hsb": "ऊपरी सॉरà¥à¤¬à¤¿à¤¯à¤¨", + "ht": "हैतियाई", + "hu": "हंगेरियाई", + "hup": "हूपा", + "hy": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "hz": "हरैरो", + "ia": "ईनà¥à¤Ÿà¤°à¤²à¤¿à¤‚गà¥à¤†", + "iba": "इबान", + "ibb": "इबिबियो", + "id": "इंडोनेशियाई", + "ie": "ईनà¥à¤Ÿà¤°à¤²à¤¿à¤‚गà¥à¤‡", + "ig": "ईगà¥à¤¬à¥‹", + "ii": "सिचà¥à¤†à¤¨ यी", + "ik": "इनà¥à¤ªà¤¿à¤¯à¤¾à¤•à¥", + "ilo": "इलोको", + "inh": "इंगà¥à¤¶", + "io": "इडौ", + "is": "आइसलैंडिक", + "it": "इतालवी", + "iu": "इनूकीटूतà¥", + "ja": "जापानी", + "jbo": "लोजà¥à¤¬à¤¾à¤¨", + "jgo": "नगोंबा", + "jmc": "मैकहैमे", + "jpr": "जà¥à¤¦à¥‡à¤“-परà¥à¤¶à¤¿à¤¯à¤¨", + "jrb": "जà¥à¤¦à¥‡à¤“-अरेबिक", + "jv": "जावानीज़", + "ka": "जॉरà¥à¤œà¤¿à¤¯à¤¾à¤ˆ", + "kaa": "कारा-कलà¥à¤ªà¤•", + "kab": "कबाइल", + "kac": "काचिन", + "kaj": "जà¥à¤œà¥", + "kam": "कमà¥à¤¬à¤¾", + "kaw": "कावी", + "kbd": "कबारà¥à¤¡à¤¿à¤¯à¤¨", + "kcg": "तà¥à¤¯à¤¾à¤ª", + "kde": "मैकोंड", + "kea": "काबà¥à¤µà¥‡à¤°à¥à¤¦à¤¿à¤¯à¤¾à¤¨à¥", + "kfo": "कोरो", + "kg": "कोंगो", + "kha": "खासी", + "kho": "खोतानीस", + "khq": "कोयरा चीनी", + "ki": "किकà¥à¤¯à¥‚", + "kj": "कà¥à¤µà¤¾à¤¨à¥à¤¯à¤¾à¤®à¤¾", + "kk": "कज़ाख़", + "kkj": "काको", + "kl": "कलालीसà¥à¤¤", + "kln": "कलेंजिन", + "km": "खमेर", + "kmb": "किमà¥à¤¬à¤¨à¥à¤¦à¥", + "kn": "कनà¥à¤¨à¤¡à¤¼", + "ko": "कोरियाई", + "koi": "कोमी-परà¥à¤®à¤¯à¤¾à¤•", + "kok": "कोंकणी", + "kos": "कोसरैन", + "kpe": "कà¥à¤ªà¥‡à¤²", + "kr": "कनà¥à¤°à¥€", + "krc": "कराचय-बलà¥à¤•ार", + "krl": "करेलियन", + "kru": "कà¥à¤°à¥‚ख", + "ks": "कशà¥à¤®à¥€à¤°à¥€", + "ksb": "शमà¥à¤¬à¤¾à¤²à¤¾", + "ksf": "बफिआ", + "ksh": "कोलोनियाई", + "ku": "कà¥à¤°à¥à¤¦à¤¿à¤¶", + "kum": "कà¥à¤®à¥€à¤•", + "kut": "कà¥à¤¯à¥‚तनाई", + "kv": "कोमी", + "kw": "कोरà¥à¤¨à¤¿à¤¶", + "ky": "किरà¥à¤—ीज़", + "la": "लैटिन", + "lad": "लादीनो", + "lag": "लांगि", + "lah": "लाहà¥à¤¨à¥à¤¡à¤¾", + "lam": "लामà¥à¤¬à¤¾", + "lb": "लगà¥à¤œà¤¼à¤®à¤¬à¤°à¥à¤—ी", + "lez": "लेज़à¥à¤˜à¥€à¤¯à¤¨", + "lg": "गांडा", + "li": "लिंबरà¥à¤—िश", + "lkt": "लैकोटा", + "ln": "लिंगाला", + "lo": "लाओ", + "lol": "मोंगो", + "loz": "लोज़ी", + "lrc": "उतà¥à¤¤à¤°à¥€ लूरी", + "lt": "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "lu": "लà¥à¤¯à¥‚बा-कटांगा", + "lua": "लà¥à¤¯à¥‚बा-लà¥à¤²à¥à¤†", + "lui": "लà¥à¤‡à¤¸à¥‡à¤¨à¥‹", + "lun": "लà¥à¤¨à¥à¤¡à¤¾", + "luo": "लà¥à¤¯à¥à¤“", + "lus": "लà¥à¤¶à¤¾à¤ˆ", + "luy": "लà¥à¤¯à¥à¤ˆà¤†", + "lv": "लातवियाई", + "mad": "मादà¥à¤°à¥€à¤¸", + "mag": "मगही", + "mai": "मैथिली", + "mak": "मकासर", + "man": "मनà¥à¤¡à¤¿à¤¨à¥à¤—ो", + "mas": "मसाई", + "mdf": "मोकà¥à¤·", + "mdr": "मंदार", + "men": "मेनà¥à¤¡à¥‡", + "mer": "मेरà¥", + "mfe": "मोरीसà¥à¤¯à¥‡à¤¨", + "mg": "मालागासी", + "mga": "मधà¥à¤¯à¤•ालीन आइरिश", + "mgh": "मैखà¥à¤µà¤¾-मीटà¥à¤Ÿà¥‹", + "mgo": "मेटा", + "mh": "मारà¥à¤¶à¤²à¥€à¤œà¤¼", + "mi": "माओरी", + "mic": "मिकमैक", + "min": "मिनांगà¥à¤•ाबाउ", + "mk": "मैसिडोनियाई", + "ml": "मलयालम", + "mn": "मंगोलियाई", + "mnc": "मनà¥à¤šà¥", + "mni": "मणिपà¥à¤°à¥€", + "moh": "मोहौक", + "mos": "मोसà¥à¤¸à¥€", + "mr": "मराठी", + "ms": "मलय", + "mt": "मालà¥à¤Ÿà¥€à¤œà¤¼", + "mua": "मà¥à¤‚डैंग", + "mul": "à¤à¤•ाधिक भाषाà¤à¤", + "mus": "कà¥à¤°à¥€à¤•", + "mwl": "मिरांडी", + "mwr": "मारवाड़ी", + "my": "बरà¥à¤®à¥€à¤œà¤¼", + "myv": "à¤à¤°à¥à¤œà¤¼à¤¯à¤¾", + "mzn": "माज़नà¥à¤¦à¥‡à¤°à¤¾à¤¨à¥€", + "na": "नाउरू", + "nan": "nan", + "nap": "नीपोलिटन", + "naq": "नामा", + "nb": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¾à¤ˆ बोकमाल", + "nd": "उतà¥à¤¤à¤°à¥€ देबेल", + "nds": "निचला जरà¥à¤®à¤¨", + "nds_NL": "निचली सैकà¥à¤¸à¤¨", + "ne": "नेपाली", + "new": "नेवाड़ी", + "ng": "डोनà¥à¤—ा", + "nia": "नियास", + "niu": "नियà¥à¤†à¤¨", + "nl": "डच", + "nl_BE": "फ़à¥à¤²à¥‡à¤®à¤¿à¤¶", + "nmg": "कà¥à¤µà¤¾à¤¸à¤¿à¤“", + "nn": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¾à¤ˆ नॉयनॉरà¥à¤¸à¥à¤•", + "nnh": "गैमà¥à¤¬à¥‚", + "no": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¾à¤ˆ", + "nog": "नोगाई", + "non": "पà¥à¤°à¤¾à¤¨à¤¾ नॉरà¥à¤¸", + "nqo": "à¤à¤¨à¥à¤•ो", + "nr": "दकà¥à¤·à¤¿à¤£ देबेल", + "nso": "उतà¥à¤¤à¤°à¥€ सोथो", + "nus": "नà¥à¤à¤°", + "nv": "नावाजो", + "nwc": "पारमà¥à¤ªà¤°à¤¿à¤• नेवारी", + "ny": "नà¥à¤¯à¤¾à¤¨à¤œà¤¾", + "nym": "नà¥à¤¯à¤¾à¤®à¤µà¥‡à¤œà¤¼à¥€", + "nyn": "नà¥à¤¯à¤¾à¤¨à¤•ोल", + "nyo": "नà¥à¤¯à¥‹à¤°à¥‹", + "nzi": "नà¥à¤œà¤¼à¥€à¤®à¤¾", + "oc": "ओसीटान", + "oj": "ओजिबà¥à¤µà¤¾", + "om": "ओरोमो", + "or": "उड़िया", + "os": "ओसà¥à¤¸à¥‡à¤Ÿà¤¿à¤•", + "osa": "ओसेज", + "ota": "ओटोमान तà¥à¤°à¥à¤•िश", + "pa": "पंजाबी", + "pag": "पंगासीनान", + "pal": "पाहà¥à¤²à¤¾à¤µà¥€", + "pam": "पामà¥à¤ªà¤¾à¤¨à¥à¤—ा", + "pap": "पापियामेनà¥à¤Ÿà¥‹", + "pau": "पलोउआन", + "pcm": "नाइजीरियाई पिडगिन", + "peo": "पà¥à¤°à¤¾à¤¨à¥€ फारसी", + "phn": "फोà¤à¤¨à¤¿à¤¶à¤¿à¤¯à¤¨", + "pi": "पाली", + "pl": "पोलिश", + "pon": "पोहà¥à¤¨à¤ªà¤¿à¤à¤¨", + "prg": "पà¥à¤°à¥à¤¶à¤¿à¤¯à¤¾à¤ˆ", + "pro": "पà¥à¤°à¤¾à¤¨à¥€ पà¥à¤°à¥‹à¤µà¥‡à¤¨à¥à¤¸à¤²", + "ps": "पशà¥à¤¤à¥‹", + "pt": "पà¥à¤°à¥à¤¤à¤—ाली", + "pt_BR": "बà¥à¤°à¤¾à¤œà¤¼à¥€à¤²à¥€ पà¥à¤°à¥à¤¤à¤—ाली", + "pt_PT": "यूरोपीय पà¥à¤°à¥à¤¤à¤—ाली", + "qu": "कà¥à¤µà¥‡à¤šà¥à¤†", + "quc": "किश", + "raj": "राजसà¥à¤¥à¤¾à¤¨à¥€", + "rap": "रापानà¥à¤ˆ", + "rar": "रारोतोंगन", + "rm": "रोमानà¥à¤¶", + "rn": "रà¥à¤¨à¥à¤¦à¥€", + "ro": "रोमानियाई", + "ro_MD": "मोलडावियन", + "rof": "रोमà¥à¤¬à¥‹", + "rom": "रोमानी", + "root": "रूट", + "ru": "रूसी", + "rup": "अरोमानियन", + "rw": "किनà¥à¤¯à¤¾à¤°à¤µà¤¾à¤‚डा", + "rwk": "रवा", + "sa": "संसà¥à¤•ृत", + "sad": "सनà¥à¤¡à¤¾à¤µà¥‡", + "sah": "याकूत", + "sam": "सामैरिटन अरैमिक", + "saq": "सैमà¥à¤¬à¥à¤°à¥", + "sas": "सासाक", + "sat": "संताली", + "sba": "नà¥à¤—ामà¥à¤¬à¥‡", + "sbp": "सैंगà¥", + "sc": "सारà¥à¤¦à¤¿à¤¨à¤¿à¤¯à¤¨", + "scn": "सिसिलियन", + "sco": "सà¥à¤•ॉटà¥à¤¸", + "sd": "सिंधी", + "sdh": "दकà¥à¤·à¤¿à¤£à¥€ कारà¥à¤¡à¤¿à¤¶", + "se": "नॉरà¥à¤¦à¤¨ सामी", + "seh": "सेना", + "sel": "सेलà¥à¤•प", + "ses": "कोयराबोरो सेनà¥à¤¨à¥€", + "sg": "सांगो", + "sga": "पà¥à¤°à¤¾à¤¨à¥€ आइरिश", + "sh": "सेरà¥à¤¬à¥‹-कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾à¤ˆ", + "shi": "तैचेलà¥à¤¹à¤¿à¤¤", + "shn": "शैन", + "si": "सिंहली", + "sid": "सिदामो", + "sk": "सà¥à¤²à¥‹à¤µà¤¾à¤•", + "sl": "सà¥à¤²à¥‹à¤µà¥‡à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "sm": "सामोन", + "sma": "दकà¥à¤·à¤¿à¤£ सामी", + "smj": "लà¥à¤¯à¥à¤² सामी", + "smn": "इनारी सामी", + "sms": "सà¥à¤•ोलà¥à¤Ÿ सामी", + "sn": "शोणा", + "snk": "सोनिनà¥à¤•े", + "so": "सोमाली", + "sog": "सोगà¥à¤¡à¤¿à¤à¤¨", + "sq": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "sr": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ", + "srn": "सà¥à¤°à¤¾à¤¨à¤¾à¤¨ टॉनà¥à¤—ो", + "srr": "सेरेर", + "ss": "सà¥à¤µà¤¾à¤¤à¥€", + "ssy": "साहो", + "st": "सेसोथो", + "su": "सà¥à¤‚डानी", + "suk": "सà¥à¤•à¥à¤®à¤¾", + "sus": "सà¥à¤¸à¥", + "sux": "सà¥à¤®à¥‡à¤°à¤¿à¤¯à¤¨", + "sv": "सà¥à¤µà¥€à¤¡à¤¿à¤¶", + "sw": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€", + "sw_CD": "कांगो सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€", + "swb": "कोमोरियन", + "syc": "कà¥à¤²à¤¾à¤¸à¤¿à¤•ल सिरिà¤à¤•", + "syr": "सिरिà¤à¤•", + "ta": "तमिल", + "te": "तेलà¥à¤—ू", + "tem": "टिमà¥à¤¨à¥‡", + "teo": "टेसो", + "ter": "तेरेनो", + "tet": "तेतà¥à¤®", + "tg": "ताजिक", + "th": "थाई", + "ti": "तिगà¥à¤°à¥€à¤¨à¥à¤¯à¤¾", + "tig": "टाइगà¥à¤°à¥‡", + "tiv": "तिव", + "tk": "तà¥à¤°à¥à¤•मेन", + "tkl": "तोकेलाऊ", + "tl": "टैगलॉग", + "tlh": "कà¥à¤²à¤¿à¤‚गन", + "tli": "तà¥à¤²à¤¿à¤‚गित", + "tmh": "तामाशेक", + "tn": "सेतà¥à¤¸à¥à¤µà¤¾à¤¨à¤¾", + "to": "टोंगन", + "tog": "नà¥à¤¯à¤¾à¤¸à¤¾ टोनà¥à¤—ा", + "tpi": "टोक पिसिन", + "tr": "तà¥à¤°à¥à¤•ी", + "trv": "तारोको", + "ts": "सोंगा", + "tsi": "तà¥à¤¸à¤¿à¤®à¥€à¤¶à¤¿à¤¯à¤¨", + "tt": "तातार", + "tum": "तमà¥à¤¬à¥‚का", + "tvl": "तà¥à¤µà¤¾à¤²à¥", + "tw": "टà¥à¤µà¥€", + "twq": "टासवाक", + "ty": "ताहितियन", + "tyv": "तà¥à¤µà¥€à¤¨à¤¿à¤¯à¤¨", + "tzm": "मधà¥à¤¯ à¤à¤Ÿà¤²à¤¸ तमाज़ित", + "udm": "उदमà¥à¤°à¥à¤¤", + "ug": "विघà¥à¤°", + "uga": "यà¥à¤—ैरिटिक", + "uk": "यूकà¥à¤°à¥‡à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "umb": "उमà¥à¤¬à¥à¤¨à¥à¤¡à¥", + "und": "अजà¥à¤žà¤¾à¤¤ भाषा", + "ur": "उरà¥à¤¦à¥‚", + "uz": "उज़à¥à¤¬à¥‡à¤•", + "vai": "वाई", + "ve": "वेनà¥à¤¦à¤¾", + "vi": "वियतनामी", + "vo": "वोलापà¥à¤•", + "vot": "वॉटिक", + "vun": "वà¥à¤‚जो", + "wa": "वालà¥à¤²à¥‚न", + "wae": "वालà¥à¤¸à¤°", + "wal": "वलामो", + "war": "वारै", + "was": "वाशो", + "wbp": "वॉलà¥à¤ªà¥‡à¤°à¥€", + "wo": "वोलोफ़", + "xal": "कालà¥à¤®à¤¿à¤•", + "xh": "ख़ोसा", + "xog": "सोगा", + "yao": "याओ", + "yap": "यापीस", + "yav": "यांगबेन", + "ybb": "येंबा", + "yi": "यहूदी", + "yo": "योरूबा", + "yue": "कैंटोनीज़", + "za": "ज़à¥à¤†à¤‚ग", + "zap": "ज़ेपोटेक", + "zbl": "बà¥à¤²à¤¿à¤¸à¤¿à¤®à¥à¤¬à¥‰à¤²à¥à¤¸", + "zen": "ज़ेनानà¥à¤—ा", + "zgh": "मानक मोरकà¥à¤•न तामाज़ाइट", + "zh": "चीनी", + "zh_Hans": "सरलीकृत चीनी", + "zh_Hant": "पारंपरिक चीनी", + "zu": "ज़à¥à¤²à¥‚", + "zun": "ज़ूनी", + "zxx": "कोई भाषा सामगà¥à¤°à¥€ नहीं", + "zza": "ज़ाज़ा" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/hr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/hr.json new file mode 100644 index 0000000000000000000000000000000000000000..4ef69f857ad545532c2569f9ee880f207f6142be --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/hr.json @@ -0,0 +1,535 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afarski", + "ab": "abhaski", + "ace": "aÄinski", + "ach": "aÄoli", + "ada": "adangme", + "ady": "adigejski", + "ae": "avestiÄki", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainuski", + "ak": "akanski", + "akk": "akadski", + "ale": "aleutski", + "alt": "južni altai", + "am": "amharski", + "an": "aragonski", + "ang": "staroengleski", + "anp": "angika", + "ar": "arapski", + "ar_001": "moderni standardni arapski", + "arc": "aramejski", + "arn": "mapuche", + "arp": "arapaho", + "arw": "aravaÄki", + "as": "asamski", + "asa": "asu", + "ast": "asturijski", + "av": "avarski", + "awa": "awadhi", + "ay": "ajmarski", + "az": "azerbajdžanski", + "az_Arab": "južnoazerbajdžanski", + "ba": "baÅ¡kirski", + "bal": "beluÄki", + "ban": "balijski", + "bas": "basa", + "bax": "bamunski", + "bbj": "ghomala", + "be": "bjeloruski", + "bej": "beja", + "bem": "bemba", + "bez": "bena", + "bfd": "bafut", + "bg": "bugarski", + "bgn": "zapadnobaludžijski", + "bho": "bhojpuri", + "bi": "bislama", + "bik": "bikolski", + "bin": "bini", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bangla", + "bo": "tibetski", + "br": "bretonski", + "bra": "braj", + "brx": "bodo", + "bs": "bosanski", + "bss": "akoose", + "bua": "burjatski", + "bug": "buginski", + "bum": "bulu", + "byn": "blin", + "byv": "medumba", + "ca": "katalonski", + "cad": "caddo", + "car": "karipski", + "cay": "cayuga", + "cch": "atsam", + "ce": "ÄeÄenski", + "ceb": "cebuano", + "cgg": "chiga", + "ch": "chamorro", + "chb": "ÄibÄa", + "chg": "Äagatajski", + "chk": "chuukese", + "chm": "marijski", + "chn": "chinook žargon", + "cho": "choctaw", + "chp": "chipewyan", + "chr": "Äerokijski", + "chy": "Äejenski", + "ckb": "soranski kurdski", + "co": "korziÄki", + "cop": "koptski", + "cr": "cree", + "crh": "krimski turski", + "crs": "sejÅ¡elski kreolski", + "cs": "ÄeÅ¡ki", + "csb": "kaÅ¡upski", + "cu": "crkvenoslavenski", + "cv": "ÄuvaÅ¡ki", + "cy": "velÅ¡ki", + "da": "danski", + "dak": "dakota jezik", + "dar": "dargwa", + "dav": "taita", + "de": "njemaÄki", + "de_AT": "austrijski njemaÄki", + "de_CH": "gornjonjemaÄki (Å¡vicarski)", + "del": "delavarski", + "den": "slave", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "donjolužiÄki", + "dua": "duala", + "dum": "srednjonizozemski", + "dv": "divehi", + "dyo": "jola-fonyi", + "dyu": "dyula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embu", + "ee": "ewe", + "efi": "efik", + "egy": "staroegipatski", + "eka": "ekajuk", + "el": "grÄki", + "elx": "elamitski", + "en": "engleski", + "en_AU": "australski engleski", + "en_CA": "kanadski engleski", + "en_GB": "britanski engleski", + "en_US": "ameriÄki engleski", + "enm": "srednjoengleski", + "eo": "esperanto", + "es": "Å¡panjolski", + "es_419": "latinoameriÄki Å¡panjolski", + "es_ES": "europski Å¡panjolski", + "es_MX": "meksiÄki Å¡panjolski", + "et": "estonski", + "eu": "baskijski", + "ewo": "ewondo", + "fa": "perzijski", + "fan": "fang", + "fat": "fanti", + "ff": "fula", + "fi": "finski", + "fil": "filipinski", + "fj": "fidžijski", + "fo": "ferojski", + "fon": "fon", + "fr": "francuski", + "fr_CA": "kanadski francuski", + "fr_CH": "Å¡vicarski francuski", + "frm": "srednjofrancuski", + "fro": "starofrancuski", + "frr": "sjevernofrizijski", + "frs": "istoÄnofrizijski", + "fur": "furlanski", + "fy": "zapadnofrizijski", + "ga": "irski", + "gaa": "ga", + "gag": "gagauski", + "gan": "gan kineski", + "gay": "gayo", + "gba": "gbaya", + "gd": "Å¡kotski gaelski", + "gez": "geez", + "gil": "gilbertski", + "gl": "galicijski", + "gmh": "srednjogornjonjemaÄki", + "gn": "gvaranski", + "goh": "starovisokonjemaÄki", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotski", + "grb": "grebo", + "grc": "starogrÄki", + "gsw": "Å¡vicarski njemaÄki", + "gu": "gudžaratski", + "guz": "gusii", + "gv": "manski", + "gwi": "gwich’in", + "ha": "hausa", + "hai": "haidi", + "hak": "hakka kineski", + "haw": "havajski", + "he": "hebrejski", + "hi": "hindski", + "hil": "hiligaynonski", + "hit": "hetitski", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "hrvatski", + "hsb": "gornjolužiÄki", + "hsn": "xiang kineski", + "ht": "haićanski kreolski", + "hu": "maÄ‘arski", + "hup": "hupa", + "hy": "armenski", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonezijski", + "ie": "interligua", + "ig": "igbo", + "ii": "sichuan yi", + "ik": "inupiaq", + "ilo": "iloko", + "inh": "inguÅ¡etski", + "io": "ido", + "is": "islandski", + "it": "talijanski", + "iu": "inuktitut", + "ja": "japanski", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jpr": "judejsko-perzijski", + "jrb": "judejsko-arapski", + "jv": "javanski", + "ka": "gruzijski", + "kaa": "kara-kalpak", + "kab": "kabilski", + "kac": "kaÄinski", + "kaj": "kaje", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardinski", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "zelenortski", + "kfo": "koro", + "kg": "kongo", + "kha": "khasi", + "kho": "khotanese", + "khq": "koyra chiini", + "ki": "kikuyu", + "kj": "kuanyama", + "kk": "kazaÅ¡ki", + "kkj": "kako", + "kl": "kalaallisut", + "kln": "kalenjin", + "km": "kmerski", + "kmb": "kimbundu", + "kn": "karnataÄki", + "ko": "korejski", + "koi": "komi-permski", + "kok": "konkani", + "kos": "naurski", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karachay-balkar", + "krl": "karelijski", + "kru": "kuruÅ¡ki", + "ks": "kaÅ¡mirski", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "kelnski", + "ku": "kurdski", + "kum": "kumyk", + "kut": "kutenai", + "kv": "komi", + "kw": "kornski", + "ky": "kirgiski", + "la": "latinski", + "lad": "ladino", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "luksemburÅ¡ki", + "lez": "lezgiÅ¡ki", + "lg": "ganda", + "li": "limburÅ¡ki", + "lkt": "lakota", + "ln": "lingala", + "lo": "laoski", + "lol": "mongo", + "loz": "lozi", + "lrc": "sjevernolurski", + "lt": "litavski", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "lushai", + "luy": "luyia", + "lv": "latvijski", + "mad": "madurski", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makasar", + "man": "mandingo", + "mas": "masajski", + "mde": "maba", + "mdf": "moksha", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "mauricijski kreolski", + "mg": "malgaÅ¡ki", + "mga": "srednjoirski", + "mgh": "makhuwa-meetto", + "mgo": "meta’", + "mh": "marÅ¡alski", + "mi": "maorski", + "mic": "micmac", + "min": "minangkabau", + "mk": "makedonski", + "ml": "malajalamski", + "mn": "mongolski", + "mnc": "mandžurski", + "mni": "manipurski", + "moh": "mohok", + "mos": "mossi", + "mr": "marathski", + "ms": "malajski", + "mt": "malteÅ¡ki", + "mua": "mundang", + "mul": "viÅ¡e jezika", + "mus": "creek", + "mwl": "mirandski", + "mwr": "marwari", + "my": "burmanski", + "mye": "myene", + "myv": "mordvinski", + "mzn": "mazanderanski", + "na": "nauru", + "nan": "min nan kineski", + "nap": "napolitanski", + "naq": "nama", + "nb": "norveÅ¡ki bokmÃ¥l", + "nd": "sjeverni ndebele", + "nds": "donjonjemaÄki", + "nds_NL": "donjosaksonski", + "ne": "nepalski", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niujski", + "nl": "nizozemski", + "nl_BE": "flamanski", + "nmg": "kwasio", + "nn": "norveÅ¡ki nynorsk", + "nnh": "ngiemboon", + "no": "norveÅ¡ki", + "nog": "nogajski", + "non": "staronorveÅ¡ki", + "nqo": "n’ko", + "nr": "južni ndebele", + "nso": "sjeverni sotski", + "nus": "nuerski", + "nv": "navajo", + "nwc": "klasiÄni newari", + "ny": "njandža", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzima", + "oc": "okcitanski", + "oj": "ojibwa", + "om": "oromski", + "or": "orijski", + "os": "osetski", + "osa": "osage", + "ota": "turski - otomanski", + "pa": "pandžapski", + "pag": "pangasinan", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauanski", + "pcm": "nigerijski pidžin", + "peo": "staroperzijski", + "phn": "feniÄki", + "pi": "pali", + "pl": "poljski", + "pon": "pohnpeian", + "prg": "pruski", + "pro": "staroprovansalski", + "ps": "paÅ¡tunski", + "pt": "portugalski", + "pt_BR": "brazilski portugalski", + "pt_PT": "europski portugalski", + "qu": "keÄuanski", + "quc": "kiÄe", + "raj": "rajasthani", + "rap": "rapa nui", + "rar": "rarotonÅ¡ki", + "rm": "retoromanski", + "rn": "rundi", + "ro": "rumunjski", + "ro_MD": "moldavski", + "rof": "rombo", + "rom": "romski", + "root": "korijenski", + "ru": "ruski", + "rup": "aromunski", + "rw": "kinyarwanda", + "rwk": "rwa", + "sa": "sanskrtski", + "sad": "sandawe", + "sah": "jakutski", + "sam": "samarijanski aramejski", + "saq": "samburu", + "sas": "sasak", + "sat": "santalski", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardski", + "scn": "sicilijski", + "sco": "Å¡kotski", + "sd": "sindski", + "sdh": "južnokurdski", + "se": "sjeverni sami", + "see": "seneca", + "seh": "sena", + "sel": "selkupski", + "ses": "koyraboro senni", + "sg": "sango", + "sga": "staroirski", + "sh": "srpsko-hrvatski", + "shi": "tachelhit", + "shn": "shan", + "shu": "Äadski arapski", + "si": "sinhaleÅ¡ki", + "sid": "sidamo", + "sk": "slovaÄki", + "sl": "slovenski", + "sm": "samoanski", + "sma": "južni sami", + "smj": "lule sami", + "smn": "inari sami", + "sms": "skolt sami", + "sn": "shona", + "snk": "soninke", + "so": "somalski", + "sog": "sogdien", + "sq": "albanski", + "sr": "srpski", + "srn": "sranan tongo", + "srr": "serer", + "ss": "svati", + "ssy": "saho", + "st": "sesotski", + "su": "sundanski", + "suk": "sukuma", + "sus": "susu", + "sux": "sumerski", + "sv": "Å¡vedski", + "sw": "svahili", + "sw_CD": "kongoanski svahili", + "swb": "komorski", + "syc": "klasiÄni sirski", + "syr": "sirijski", + "ta": "tamilski", + "te": "teluÅ¡ki", + "tem": "temne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadžiÄki", + "th": "tajlandski", + "ti": "tigrinja", + "tig": "tigriÅ¡ki", + "tiv": "tiv", + "tk": "turkmenski", + "tkl": "tokelaunski", + "tl": "tagalog", + "tlh": "klingonski", + "tli": "tlingit", + "tmh": "tamaÅ¡eÄki", + "tn": "cvana", + "to": "tonganski", + "tog": "nyasa tonga", + "tpi": "tok pisin", + "tr": "turski", + "trv": "taroko", + "ts": "tsonga", + "tsi": "tsimshian", + "tt": "tatarski", + "tum": "tumbuka", + "tvl": "tuvaluanski", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahićanski", + "tyv": "tuvinski", + "tzm": "tamaÅ¡ek (Srednji Atlas)", + "udm": "udmurtski", + "ug": "ujgurski", + "uga": "ugaritski", + "uk": "ukrajinski", + "umb": "umbundu", + "und": "nepoznati jezik", + "ur": "urdski", + "uz": "uzbeÄki", + "vai": "vai", + "ve": "venda", + "vi": "vijetnamski", + "vo": "volapük", + "vot": "votski", + "vun": "vunjo", + "wa": "valonski", + "wae": "walserski", + "wal": "walamo", + "war": "waray", + "was": "washo", + "wbp": "warlpiri", + "wo": "volof", + "wuu": "wu kineski", + "xal": "kalmyk", + "xh": "xhosa", + "xog": "soga", + "yao": "yao", + "yap": "japski", + "yav": "yangben", + "ybb": "yemba", + "yi": "jidiÅ¡", + "yo": "jorupski", + "yue": "kantonski", + "za": "zhuang", + "zap": "zapoteÄki", + "zbl": "Blissovi simboli", + "zen": "zenaga", + "zgh": "standardni marokanski tamaÅ¡ek", + "zh": "kineski", + "zh_Hans": "kineski (pojednostavljeni)", + "zh_Hant": "kineski (tradicionalni)", + "zu": "zulu", + "zun": "zuni", + "zxx": "bez jeziÄnog sadržaja", + "zza": "zazaki" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/hu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/hu.json new file mode 100644 index 0000000000000000000000000000000000000000..74317019b49ee69a730d678ed4e665f8ac900c16 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/hu.json @@ -0,0 +1,534 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afar", + "ab": "abház", + "ace": "achinéz", + "ach": "akoli", + "ada": "adangme", + "ady": "adyghe", + "ae": "avesztán", + "af": "afrikaans", + "afh": "afrihili", + "agq": "agem", + "ain": "ainu", + "ak": "akan", + "akk": "akkád", + "ale": "aleut", + "alt": "dél-altaji", + "am": "amhara", + "an": "aragonéz", + "ang": "óangol", + "anp": "angika", + "ar": "arab", + "ar_001": "modern szabányos arab", + "arc": "arámi", + "arn": "mapucse", + "arp": "arapaho", + "arw": "aravak", + "as": "asszámi", + "asa": "asu", + "ast": "asztúr", + "av": "avar", + "awa": "awádi", + "ay": "ajmara", + "az": "azerbajdzsáni", + "ba": "baskír", + "bal": "balucsi", + "ban": "balinéz", + "bas": "basza", + "bax": "bamun", + "bbj": "gomala", + "be": "belarusz", + "bej": "bedzsa", + "bem": "bemba", + "bez": "bena", + "bfd": "bafut", + "bg": "bolgár", + "bgn": "nyugati beludzs", + "bho": "bodzspuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bangla", + "bo": "tibeti", + "br": "breton", + "bra": "braj", + "brx": "bodo", + "bs": "bosnyák", + "bss": "koszi", + "bua": "burját", + "bug": "buginéz", + "bum": "bulu", + "byn": "blin", + "byv": "medumba", + "ca": "katalán", + "cad": "caddo", + "car": "karib", + "cay": "kajuga", + "cch": "atszam", + "ce": "csecsen", + "ceb": "szebuano", + "cgg": "kiga", + "ch": "csamoró", + "chb": "csibcsa", + "chg": "csagatáj", + "chk": "csukéz", + "chm": "mari", + "chn": "csinuk zsargon", + "cho": "csoktó", + "chp": "csipevé", + "chr": "cseroki", + "chy": "csejen", + "ckb": "közép-ázsiai kurd", + "co": "korzikai", + "cop": "kopt", + "cr": "krí", + "crh": "krími tatár", + "crs": "szeszelva kreol francia", + "cs": "cseh", + "csb": "kasub", + "cu": "egyházi szláv", + "cv": "csuvas", + "cy": "walesi", + "da": "dán", + "dak": "dakota", + "dar": "dargva", + "dav": "taita", + "de": "német", + "de_AT": "osztrák német", + "de_CH": "svájci felnémet", + "del": "delavár", + "den": "szlevi", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "alsó-szorb", + "dua": "duala", + "dum": "közép holland", + "dv": "divehi", + "dyo": "jola-fonyi", + "dyu": "diula", + "dz": "dzsonga", + "dzg": "dazaga", + "ebu": "embu", + "ee": "eve", + "efi": "efik", + "egy": "óegyiptomi", + "eka": "ekadzsuk", + "el": "görög", + "elx": "elamit", + "en": "angol", + "en_AU": "ausztrál angol", + "en_CA": "kanadai angol", + "en_GB": "brit angol", + "en_US": "amerikai angol", + "enm": "közép angol", + "eo": "eszperantó", + "es": "spanyol", + "es_419": "latin-amerikai spanyol", + "es_ES": "európai spanyol", + "es_MX": "spanyol (mexikói)", + "et": "észt", + "eu": "baszk", + "ewo": "evondo", + "fa": "perzsa", + "fan": "fang", + "fat": "fanti", + "ff": "fulani", + "fi": "finn", + "fil": "filippínó", + "fj": "fidzsi", + "fo": "feröeri", + "fon": "fon", + "fr": "francia", + "fr_CA": "kanadai francia", + "fr_CH": "svájci francia", + "frm": "közép francia", + "fro": "ófrancia", + "frr": "északi fríz", + "frs": "keleti fríz", + "fur": "friuli", + "fy": "nyugati fríz", + "ga": "ír", + "gaa": "ga", + "gag": "gagauz", + "gan": "gan kínai", + "gay": "gajo", + "gba": "gbaja", + "gd": "skóciai kelta", + "gez": "geez", + "gil": "ikiribati", + "gl": "gallego", + "gmh": "közép felsÅ‘ német", + "gn": "guarani", + "goh": "ófelsÅ‘ német", + "gon": "gondi", + "gor": "gorontalo", + "got": "gót", + "grb": "grebó", + "grc": "ógörög", + "gsw": "svájci német", + "gu": "gudzsaráti", + "guz": "guszii", + "gv": "man-szigeti", + "gwi": "gvicsin", + "ha": "hausza", + "hai": "haida", + "hak": "hakka kínai", + "haw": "hawaii", + "he": "héber", + "hi": "hindi", + "hil": "ilokano", + "hit": "hittite", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "horvát", + "hsb": "felsÅ‘-szorb", + "hsn": "xiang kínai", + "ht": "haiti kreol", + "hu": "magyar", + "hup": "hupa", + "hy": "örmény", + "hz": "herero", + "ia": "interlingva", + "iba": "iban", + "ibb": "ibibio", + "id": "indonéz", + "ie": "interlingue", + "ig": "igbó", + "ii": "szecsuán ji", + "ik": "inupiak", + "ilo": "ilokó", + "inh": "ingus", + "io": "idó", + "is": "izlandi", + "it": "olasz", + "iu": "inuktitut", + "ja": "japán", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jpr": "zsidó-perzsa", + "jrb": "zsidó-arab", + "jv": "jávai", + "ka": "grúz", + "kaa": "kara-kalpak", + "kab": "kabije", + "kac": "kacsin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardi", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "kabuverdianu", + "kfo": "koro", + "kg": "kongo", + "kha": "kaszi", + "kho": "kotanéz", + "khq": "kojra-csíni", + "ki": "kikuju", + "kj": "kuanyama", + "kk": "kazah", + "kkj": "kakó", + "kl": "grönlandi", + "kln": "kalendzsin", + "km": "khmer", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "koreai", + "koi": "komi-permják", + "kok": "konkani", + "kos": "kosrei", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karacsáj-balkár", + "krl": "karelai", + "kru": "kuruh", + "ks": "kasmíri", + "ksb": "sambala", + "ksf": "bafia", + "ksh": "kölsch", + "ku": "kurd", + "kum": "kumük", + "kut": "kutenai", + "kv": "komi", + "kw": "korni", + "ky": "kirgiz", + "la": "latin", + "lad": "ladino", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "luxemburgi", + "lez": "lezg", + "lg": "ganda", + "li": "limburgi", + "lkt": "lakota", + "ln": "lingala", + "lo": "lao", + "lol": "mongó", + "loz": "lozi", + "lrc": "északi luri", + "lt": "litván", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "lushai", + "luy": "lujia", + "lv": "lett", + "mad": "madurai", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makaszar", + "man": "mandingó", + "mas": "masai", + "mde": "maba", + "mdf": "moksán", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "mauritiusi kreol", + "mg": "malgas", + "mga": "közép ír", + "mgh": "makua-metó", + "mgo": "meta’", + "mh": "marshalli", + "mi": "maori", + "mic": "mikmak", + "min": "minangkabau", + "mk": "macedón", + "ml": "malajálam", + "mn": "mongol", + "mnc": "mandzsu", + "mni": "manipuri", + "moh": "mohawk", + "mos": "moszi", + "mr": "maráthi", + "ms": "maláj", + "mt": "máltai", + "mua": "mundang", + "mul": "többszörös nyelvek", + "mus": "krík", + "mwl": "mirandéz", + "mwr": "márvári", + "my": "burmai", + "mye": "myene", + "myv": "erzjány", + "mzn": "mázanderáni", + "na": "naurui", + "nan": "min nan kínai", + "nap": "nápolyi", + "naq": "nama", + "nb": "norvég (bokmál)", + "nd": "északi ndebele", + "nds": "alsónémet", + "nds_NL": "alsószász", + "ne": "nepáli", + "new": "nevari", + "ng": "ndonga", + "nia": "nias", + "niu": "niuei", + "nl": "holland", + "nl_BE": "flamand", + "nmg": "ngumba", + "nn": "norvég (nynrosk)", + "nnh": "ngiemboon", + "no": "norvég", + "nog": "nogaj", + "non": "óskandináv", + "nqo": "n’kó", + "nr": "déli ndebele", + "nso": "északi szeszotó", + "nus": "nuer", + "nv": "navahó", + "nwc": "klasszikus newari", + "ny": "nyandzsa", + "nym": "nyamvézi", + "nyn": "nyankole", + "nyo": "nyoró", + "nzi": "nzima", + "oc": "okszitán", + "oj": "ojibva", + "om": "oromo", + "or": "odia", + "os": "oszét", + "osa": "osage", + "ota": "ottomán török", + "pa": "pandzsábi", + "pag": "pangaszinan", + "pal": "pahlavi", + "pam": "pampangan", + "pap": "papiamento", + "pau": "palaui", + "pcm": "nigériai pidgin", + "peo": "óperzsa", + "phn": "fÅ‘niciai", + "pi": "pali", + "pl": "lengyel", + "pon": "pohnpei", + "prg": "porosz", + "pro": "óprovánszi", + "ps": "pastu", + "pt": "portugál", + "pt_BR": "brazíliai portugál", + "pt_PT": "európai portugál", + "qu": "kecsua", + "quc": "kicse", + "raj": "radzsasztáni", + "rap": "rapanui", + "rar": "rarotongai", + "rm": "rétoromán", + "rn": "kirundi", + "ro": "román", + "ro_MD": "moldvai", + "rof": "rombo", + "rom": "roma", + "root": "Å‘si", + "ru": "orosz", + "rup": "aromán", + "rw": "kinyarvanda", + "rwk": "rwo", + "sa": "szanszkrit", + "sad": "szandave", + "sah": "szaha", + "sam": "szamaritánus arámi", + "saq": "szamburu", + "sas": "sasak", + "sat": "szantáli", + "sba": "ngambay", + "sbp": "szangu", + "sc": "szardíniai", + "scn": "szicíliai", + "sco": "skót", + "sd": "szindhi", + "sdh": "dél-kurd", + "se": "északi számi", + "see": "szeneka", + "seh": "szena", + "sel": "szölkup", + "ses": "kojra-szenni", + "sg": "szangó", + "sga": "óír", + "sh": "szerbhorvát", + "shi": "tachelhit", + "shn": "san", + "shu": "csádi arab", + "si": "szingaléz", + "sid": "szidamó", + "sk": "szlovák", + "sl": "szlovén", + "sm": "szamoai", + "sma": "déli számi", + "smj": "lulei számi", + "smn": "inari számi", + "sms": "kolta számi", + "sn": "sona", + "snk": "szoninke", + "so": "szomáli", + "sog": "sogdien", + "sq": "albán", + "sr": "szerb", + "srn": "szranai tongó", + "srr": "szerer", + "ss": "sziszuati", + "ssy": "szahó", + "st": "déli szeszotó", + "su": "szundanéz", + "suk": "szukuma", + "sus": "szuszu", + "sux": "sumér", + "sv": "svéd", + "sw": "szuahéli", + "sw_CD": "kongói szuahéli", + "swb": "comorei", + "syc": "klasszikus szír", + "syr": "szír", + "ta": "tamil", + "te": "telugu", + "tem": "temne", + "teo": "teszó", + "ter": "terenó", + "tet": "tetum", + "tg": "tadzsik", + "th": "thai", + "ti": "tigrinya", + "tig": "tigré", + "tiv": "tiv", + "tk": "türkmén", + "tkl": "tokelaui", + "tl": "tagalog", + "tlh": "klingon", + "tli": "tlingit", + "tmh": "tamasek", + "tn": "szecsuáni", + "to": "tongai", + "tog": "nyugati nyasza", + "tpi": "tok pisin", + "tr": "török", + "trv": "tarokó", + "ts": "conga", + "tsi": "csimsiáni", + "tt": "tatár", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "twi", + "twq": "szavák", + "ty": "tahiti", + "tyv": "tuvai", + "tzm": "közép-atlaszi tamazigt", + "udm": "udmurt", + "ug": "ujgur", + "uga": "ugariti", + "uk": "ukrán", + "umb": "umbundu", + "und": "ismeretlen nyelv", + "ur": "urdu", + "uz": "üzbég", + "vai": "vai", + "ve": "venda", + "vi": "vietnami", + "vo": "volapük", + "vot": "votják", + "vun": "vunjo", + "wa": "vallon", + "wae": "walser", + "wal": "valamo", + "war": "varaó", + "was": "vasó", + "wbp": "warlpiri", + "wo": "volof", + "wuu": "wu kínai", + "xal": "kalmük", + "xh": "xhosza", + "xog": "szoga", + "yao": "jaó", + "yap": "japi", + "yav": "jangben", + "ybb": "jemba", + "yi": "jiddis", + "yo": "joruba", + "yue": "kantoni", + "za": "zsuang", + "zap": "zapoték", + "zbl": "Bliss jelképrendszer", + "zen": "zenaga", + "zgh": "marokkói tamazight", + "zh": "kínai", + "zh_Hans": "egyszerűsített kínai", + "zh_Hant": "hagyományos kínai", + "zu": "zulu", + "zun": "zuni", + "zxx": "nincs nyelvészeti tartalom", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/hy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/hy.json new file mode 100644 index 0000000000000000000000000000000000000000..b89bb266cb97a64564a7485f6082f313bc250718 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/hy.json @@ -0,0 +1,469 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "Õ¡Ö†Õ¡Ö€Õ¥Ö€Õ¥Õ¶", + "ab": "Õ¡Õ¢Õ­Õ¡Õ¦Õ¥Ö€Õ¥Õ¶", + "ace": "Õ¡Õ¹Õ¥Õ°Õ¥Ö€Õ¥Õ¶", + "ach": "Õ¡Õ¹Õ¸Õ¬Õ«", + "ada": "Õ¡Õ¤Õ¡Õ¶Õ£Õ´Õ¥Ö€Õ¥Õ¶", + "ady": "Õ¡Õ¤Õ«Õ²Õ¥Ö€Õ¥Õ¶", + "aeb": "Õ©Õ¸Ö‚Õ¶Õ«Õ½Õ¡Õ¯Õ¡Õ¶ Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶", + "af": "Õ¡Ö†Ö€Õ«Õ¯Õ¡Õ¡Õ¶Õ½", + "agq": "Õ¡Õ²Õ¥Õ´", + "ain": "Õ¡ÕµÕ¶Õ¥Ö€Õ¥Õ¶", + "ak": "Õ¡Ö„Õ¡Õ¶", + "akk": "Õ¡Ö„Ö„Õ¡Õ¤Õ¥Ö€Õ¥Õ¶", + "ale": "Õ¡Õ¬Õ¥Õ¸Ö‚Õ©Õ¥Ö€Õ¥Õ¶", + "alt": "Õ°Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ Õ¡Õ¬Õ©Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "am": "Õ¡Õ´Õ°Õ¡Ö€Õ¥Ö€Õ¥Õ¶", + "an": "Õ¡Ö€Õ¡Õ£Õ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "ang": "Õ°Õ«Õ¶ Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶", + "anp": "Õ¡Õ¶Õ£Õ«Õ¯Õ¡", + "ar": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶", + "ar_001": "Õ¡Ö€Õ¤Õ« Õ¨Õ¶Õ¤Õ°Õ¡Õ¶Õ¸Ö‚Ö€ Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶", + "arc": "Õ¡Ö€Õ¡Õ´Õ¥Õ¥Ö€Õ¥Õ¶", + "arn": "Õ´Õ¡ÕºÕ¸Ö‚Õ¹Õ«", + "arp": "Õ¡Ö€Õ¡ÕºÕ¡Õ°Õ¸", + "arq": "Õ¡Õ¬ÕªÕ«Ö€Õ¡Õ¯Õ¡Õ¶ Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶", + "arz": "Õ¥Õ£Õ«ÕºÕ¿Õ¡Õ¯Õ¡Õ¶ Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶", + "as": "Õ¡Õ½Õ¡Õ´Õ¥Ö€Õ¥Õ¶", + "asa": "Õ¡Õ½Õ¸Ö‚", + "ase": "Õ¡Õ´Õ¥Ö€Õ«Õ¯ÕµÕ¡Õ¶ ÕªÕ¥Õ½Õ¿Õ¥Ö€Õ« Õ¬Õ¥Õ¦Õ¸Ö‚", + "ast": "Õ¡Õ½Õ¿Õ¸Ö‚Ö€Õ¥Ö€Õ¥Õ¶", + "av": "Õ¡Õ¾Õ¡Ö€Õ¥Ö€Õ¥Õ¶", + "awa": "Õ¡Õ¾Õ¡Õ¤Õ°Õ«", + "ay": "Õ¡ÕµÕ´Õ¡Ö€Õ¡", + "az": "Õ¡Õ¤Ö€Õ¢Õ¥Õ»Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "ba": "Õ¢Õ¡Õ·Õ¯Õ«Ö€Õ¥Ö€Õ¥Õ¶", + "ban": "Õ¢Õ¡Õ¬Õ«Õ¥Ö€Õ¥Õ¶", + "bas": "Õ¢Õ¡Õ½Õ¡Õ¡", + "be": "Õ¢Õ¥Õ¬Õ¡Õ¼Õ¸Ö‚Õ½Õ¥Ö€Õ¥Õ¶", + "bem": "Õ¢Õ¥Õ´Õ¢Õ¡", + "bez": "Õ¢Õ¥Õ¶Õ¡", + "bg": "Õ¢Õ¸Ö‚Õ¬Õ²Õ¡Ö€Õ¥Ö€Õ¥Õ¶", + "bgn": "Õ¡Ö€Ö‡Õ´Õ¿Õ¡Õ¢Õ¥Õ¬Õ¸Ö‚Õ»Õ«Õ¥Ö€Õ¥Õ¶", + "bi": "Õ¢Õ«Õ½Õ¬Õ¡Õ´Õ¡", + "bin": "Õ¢Õ«Õ¶Õ«", + "bla": "Õ½Õ«Õ¯Õ½Õ«Õ¯Õ¡", + "bm": "Õ¢Õ¡Õ´Õ¢Õ¡Ö€Õ¡", + "bn": "Õ¢Õ¥Õ¶Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "bo": "Õ¿Õ«Õ¢Õ¥Õ©Õ¥Ö€Õ¥Õ¶", + "br": "Õ¢Ö€Õ¥Õ¿Õ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "brx": "Õ¢Õ¸Õ¤Õ¸", + "bs": "Õ¢Õ¸Õ½Õ¶Õ«Õ¥Ö€Õ¥Õ¶", + "bss": "Õ¡Ö„Õ¸Ö‚Õ¦", + "bug": "Õ¢Õ¸Ö‚Õ£Õ«Õ¥Ö€Õ¥Õ¶", + "byn": "Õ¢Õ«Õ¬Õ«Õ¶", + "ca": "Õ¯Õ¡Õ¿Õ¡Õ¬Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "ce": "Õ¹Õ¥Õ¹Õ¥Õ¶Õ¥Ö€Õ¥Õ¶", + "ceb": "Õ¯Õ¡Õ¢Õ¸Ö‚Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "cgg": "Õ¹Õ«Õ£Õ¡", + "ch": "Õ¹Õ¡Õ´Õ¸Õ¼Õ¸", + "chk": "Õ¿Ö€Õ¸Ö‚Õ¯Õ¥Ö€Õ¥Õ¶", + "chm": "Õ´Õ¡Ö€Õ«", + "cho": "Õ¹Õ¸Õ¯Õ¿Õ¸", + "chr": "Õ¹Õ¥Ö€Õ¸Õ¯Õ«", + "chy": "Õ·Õ¡ÕµÕ¥Õ¶", + "ckb": "Õ½Õ¸Ö€Õ¡Õ¶Õ« Ö„Ö€Õ¤Õ¥Ö€Õ¥Õ¶", + "co": "Õ¯Õ¸Ö€Õ½Õ«Õ¯Õ¥Ö€Õ¥Õ¶", + "cop": "Õ²ÕºÕ¿Õ¥Ö€Õ¥Õ¶", + "crh": "Õ²Ö€Õ«Õ´ÕµÕ¡Õ¶ Õ©Õ¸Ö‚Ö€Ö„Õ¥Ö€Õ¥Õ¶", + "cs": "Õ¹Õ¥Õ­Õ¥Ö€Õ¥Õ¶", + "cu": "Õ¥Õ¯Õ¥Õ²Õ¥ÖÕ¡Õ¯Õ¡Õ¶ Õ½Õ¬Õ¡Õ¾Õ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "cv": "Õ¹Õ¸Ö‚Õ¾Õ¡Õ·Õ¥Ö€Õ¥Õ¶", + "cy": "Õ¸Ö‚Õ¥Õ¬Õ½Õ¥Ö€Õ¥Õ¶", + "da": "Õ¤Õ¡Õ¶Õ«Õ¥Ö€Õ¥Õ¶", + "dak": "Õ¤Õ¡Õ¯Õ¸Õ¿Õ¡", + "dar": "Õ¤Õ¡Ö€Õ£Õ«Õ¶Õ¥Ö€Õ¥Õ¶", + "dav": "Õ©Õ¡Õ«Õ©Õ¡", + "de": "Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "de_AT": "Õ¡Õ¾Õ½Õ¿Ö€Õ«Õ¡Õ¯Õ¡Õ¶ Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "de_CH": "Õ·Õ¾Õ¥ÕµÖÕ¡Ö€Õ¡Õ¯Õ¡Õ¶ Õ¾Õ¥Ö€Õ«Õ¶ Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "dgr": "Õ¤Õ¸Õ£Ö€Õ«Õ¢", + "dje": "Õ¦Õ¡Ö€Õ´Õ¡", + "dsb": "Õ½Õ¿Õ¸Ö€Õ«Õ¶ Õ½Õ¸Ö€Õ¢Õ¥Ö€Õ¥Õ¶", + "dua": "Õ¤Õ¸Ö‚Õ¡Õ¬Õ¡", + "dv": "Õ´Õ¡Õ¬Õ¤Õ«Õ¾Õ¥Ö€Õ¥Õ¶", + "dyo": "Õ»Õ¸Õ¬Õ¡-Ö†Õ¸Õ¶ÕµÕ«", + "dz": "Õ»Õ¸Õ¶Õ£Ö„Õ°Õ¡", + "dzg": "Õ¤Õ¡Õ¦Õ¡Õ£Õ¡", + "ebu": "Õ§Õ´Õ¢Õ¸Ö‚", + "ee": "Õ§Õ¾Õ¥", + "efi": "Õ§Ö†Õ«Õ¯", + "egy": "Õ°Õ«Õ¶ Õ¥Õ£Õ«ÕºÕ¿Õ¥Ö€Õ¥Õ¶", + "eka": "Õ§Õ¯Õ¡Õ»Õ¸Ö‚Õ¯", + "el": "Õ°Õ¸Ö‚Õ¶Õ¡Ö€Õ¥Õ¶", + "en": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶", + "en_AU": "Õ¡Õ¾Õ½Õ¿Ö€Õ¡Õ¬Õ«Õ¡Õ¯Õ¡Õ¶ Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶", + "en_CA": "Õ¯Õ¡Õ¶Õ¡Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶", + "en_GB": "Õ¢Ö€Õ«Õ¿Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶", + "en_US": "Õ¡Õ´Õ¥Ö€Õ«Õ¯ÕµÕ¡Õ¶ Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶", + "eo": "Õ§Õ½ÕºÕ¥Ö€Õ¡Õ¶Õ¿Õ¸", + "es": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "es_419": "Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ´Õ¥Ö€Õ«Õ¯ÕµÕ¡Õ¶ Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "es_ES": "Õ¥Õ¾Ö€Õ¸ÕºÕ¡Õ¯Õ¡Õ¶ Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "es_MX": "Õ´Õ¥Ö„Õ½Õ«Õ¯Õ¡Õ¯Õ¡Õ¶ Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "et": "Õ§Õ½Õ¿Õ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "eu": "Õ¢Õ¡Õ½Õ¯Õ¥Ö€Õ¥Õ¶", + "ewo": "Õ§Õ¾Õ¸Õ¶Õ¤Õ¸", + "fa": "ÕºÕ¡Ö€Õ½Õ¯Õ¥Ö€Õ¥Õ¶", + "ff": "Ö†Õ¸Ö‚Õ¬Õ¡Õ°", + "fi": "Ö†Õ«Õ¶Õ¶Õ¥Ö€Õ¥Õ¶", + "fil": "Ö†Õ«Õ¬Õ«ÕºÕ«Õ¶Õ¥Ö€Õ¥Õ¶", + "fit": "Õ¿Õ¸Ö€Õ¶Õ¡Õ¤Õ¥Õ¬Õ¥Õ¶ Ö†Õ«Õ¶Õ¶Õ¥Ö€Õ¥Õ¶", + "fj": "Ö†Õ«Õ»Õ«Õ¥Ö€Õ¥Õ¶", + "fo": "Ö†Õ¡Ö€ÕµÕ¸Ö€Õ¥Ö€Õ¥Õ¶", + "fon": "Ö†Õ¸Õ¶", + "fr": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶", + "fr_CA": "Õ¯Õ¡Õ¶Õ¡Õ¤Õ¡Õ¯Õ¡Õ¶ Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶", + "fr_CH": "Õ·Õ¾Õ¥ÕµÖÕ¡Ö€Õ¡Õ¯Õ¡Õ¶ Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶", + "fro": "Õ°Õ«Õ¶ Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶", + "frs": "Õ¡Ö€Ö‡Õ¥Õ¬Õ¡Ö†Ö€Õ«Õ¦Õ¥Ö€Õ¥Õ¶", + "fur": "Ö†Ö€Õ«Õ¸Ö‚Õ¬Õ«Õ¥Ö€Õ¥Õ¶", + "fy": "Õ¡Ö€Ö‡Õ´Õ¿Õ¡Ö†Ö€Õ«Õ¦Õ¥Ö€Õ¥Õ¶", + "ga": "Õ«Õ¼Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶", + "gaa": "Õ£Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "gag": "Õ£Õ¡Õ£Õ¡Õ¸Ö‚Õ¦Õ¥Ö€Õ¥Õ¶", + "gbz": "Õ¦Ö€Õ¡Õ¤Õ¡Õ·Õ¿Õ¡Õ¯Õ¡Õ¶ Õ¤Õ¡Ö€Õ«", + "gd": "Õ£Õ¡Õ¥Õ¬Õ¥Ö€Õ¥Õ¶", + "gez": "Õ£Õ¥Õ¥Õ¦", + "gil": "Õ¯Õ«Ö€Õ«Õ¢Õ¡Õ¿Õ«", + "gl": "Õ£Õ¡Õ¬Õ«Õ½Õ¥Ö€Õ¥Õ¶", + "gn": "Õ£Õ¸Ö‚Õ¡Ö€Õ¡Õ¶Õ«", + "goh": "Õ°Õ«Õ¶ Õ¾Õ¥Ö€Õ«Õ¶ Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "gor": "Õ£Õ¸Ö€Õ¸Õ¶Õ¿Õ¡Õ¬Õ¸", + "got": "Õ£Õ¸Õ©Õ¥Ö€Õ¥Õ¶", + "grc": "Õ°Õ«Õ¶ Õ°Õ¸Ö‚Õ¶Õ¡Ö€Õ¥Õ¶", + "gsw": "Õ·Õ¾Õ¥ÕµÖÕ¡Ö€Õ¡Õ¯Õ¡Õ¶ Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "gu": "Õ£Õ¸Ö‚Õ»Õ¡Ö€Õ¡Õ©Õ«", + "guc": "Õ¾Õ¡ÕµÕ¸Ö‚Õ¸Ö‚", + "guz": "Õ£Õ¸Ö‚Õ½Õ«", + "gv": "Õ´Õ¥Õ¶Õ¥Ö€Õ¥Õ¶", + "gwi": "Õ£Õ¾Õ«Õ¹Õ«Õ¶", + "ha": "Õ°Õ¡Õ¸Ö‚Õ½Õ¡", + "haw": "Õ°Õ¡Õ¾Õ¡ÕµÕ«Õ¥Ö€Õ¥Õ¶", + "he": "Õ¥Õ¢Ö€Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "hi": "Õ°Õ«Õ¶Õ¤Õ«", + "hil": "Õ°Õ«Õ¬Õ«Õ£Õ¡ÕµÕ¶Õ¸Õ¶", + "hmn": "Õ°Õ´Õ¸Õ¶Õ£", + "hr": "Õ­Õ¸Ö€Õ¾Õ¡Õ©Õ¥Ö€Õ¥Õ¶", + "hsb": "Õ¾Õ¥Ö€Õ«Õ¶ Õ½Õ¸Ö€Õ¢Õ¥Ö€Õ¥Õ¶", + "hsn": "Õ½ÕµÕ¡Õ¶ Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶", + "ht": "Õ­Õ¡Õ¼Õ¶Õ¡Õ¯Õ¥Ö€Õ¿ Õ°Õ¡ÕµÕ«Õ©Õ¥Ö€Õ¥Õ¶", + "hu": "Õ°Õ¸Ö‚Õ¶Õ£Õ¡Ö€Õ¥Ö€Õ¥Õ¶", + "hup": "Õ°Õ¸Ö‚ÕºÕ¡", + "hy": "Õ°Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "hz": "Õ°Õ¥Ö€Õ¥Ö€Õ¸", + "iba": "Õ«Õ¢Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "ibb": "Õ«Õ¢Õ«Õ¢Õ«Õ¸", + "id": "Õ«Õ¶Õ¤Õ¸Õ¶Õ¥Õ¦Õ¥Ö€Õ¥Õ¶", + "ig": "Õ«Õ£Õ¢Õ¸", + "ii": "Õ½Õ«Õ¹Õ¸Ö‚Õ¡Õ¶", + "ilo": "Õ«Õ¬Õ¸Õ¯Õ¥Ö€Õ¥Õ¶", + "inh": "Õ«Õ¶Õ£Õ¸Ö‚Õ·Õ¥Ö€Õ¥Õ¶", + "io": "Õ«Õ¤Õ¸", + "is": "Õ«Õ½Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶", + "it": "Õ«Õ¿Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "iu": "Õ«Õ¶Õ¸Ö‚Õ¯Õ¿Õ«Õ¿Õ¸Ö‚Õ¿", + "ja": "Õ³Õ¡ÕºÕ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "jbo": "Õ¬Õ¸ÕªÕ¢Õ¡Õ¶", + "jgo": "Õ¶Õ£Õ¸Õ´Õ¢Õ¡", + "jmc": "Õ´Õ¡Õ·Õ¡Õ´Õ¥", + "jv": "Õ³Õ¡Õ¾Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "ka": "Õ¾Ö€Õ¡ÖÕ¥Ö€Õ¥Õ¶", + "kab": "Õ¯Õ¡Õ¢Õ«Õ¬Õ¥Ö€Õ¥Õ¶", + "kac": "Õ¯Õ¡Õ¹Õ«Õ¶Õ¥Ö€Õ¥Õ¶", + "kaj": "Õ»ÕµÕ¸Ö‚", + "kam": "Õ¯Õ¡Õ´Õ¢Õ¡", + "kcg": "Õ¿Õ«Õ¡Õº", + "kde": "Õ´Õ¡Õ¯Õ¸Õ¶Õ¤Õ¥", + "kea": "Õ¯Õ¡Õ¢Õ¸Ö‚Õ¾Õ¥Ö€Õ¤ÕµÕ¡Õ¶Õ¸Ö‚", + "kfo": "Õ¯Õ¸Ö€Õ¸", + "kha": "Õ¯Õ­Õ¡Õ½Õ«", + "khq": "Õ¯Õ¸ÕµÖ€Õ¡ Õ¹Õ«Õ¶Õ«", + "ki": "Õ¯Õ«Õ¯Õ¸Ö‚ÕµÕ¸Ö‚", + "kj": "Õ¯Õ¸Ö‚Õ¡Õ¶ÕµÕ¡Õ´Õ¡", + "kk": "Õ²Õ¡Õ¦Õ¡Õ­Õ¥Ö€Õ¥Õ¶", + "kkj": "Õ¯Õ¡Õ¯Õ¸", + "kl": "Õ¯Õ¡Õ¬Õ¡Õ¡Õ¬Õ«Õ½Õ¸Ö‚Õ¿", + "kln": "Õ¯Õ¡Õ¬Õ¥Õ¶Õ»Õ«Õ¶", + "km": "Ö„Õ´Õ¥Ö€Õ¥Ö€Õ¥Õ¶", + "kmb": "Õ¯Õ«Õ´Õ¢Õ¸Ö‚Õ¶Õ¤Õ¸Ö‚", + "kn": "Õ¯Õ¡Õ¶Õ¶Õ¡Õ¤Õ¡", + "ko": "Õ¯Õ¸Ö€Õ¥Õ¥Ö€Õ¥Õ¶", + "koi": "ÕºÕ¥Ö€Õ´ÕµÕ¡Õ¯ Õ¯Õ¸Õ´Õ«Õ¥Ö€Õ¥Õ¶", + "kok": "Õ¯Õ¸Õ¶Õ¯Õ¡Õ¶Õ«", + "kpe": "Õ¯ÕºÕ¥Õ¬Õ¬Õ¥Õ¥Ö€Õ¥Õ¶", + "kr": "Õ¯Õ¡Õ¶Õ¸Ö‚Ö€Õ«", + "krc": "Õ¯Õ¡Ö€Õ¡Õ¹Õ¡Õµ-Õ¢Õ¡Õ¬Õ¯Õ¡Ö€Õ¥Ö€Õ¥Õ¶", + "krl": "Õ¯Õ¡Ö€Õ¥Õ¬Õ¥Ö€Õ¥Õ¶", + "kru": "Õ¯Õ¸Ö‚Ö€Õ¸Ö‚Õ­", + "ks": "Ö„Õ¡Õ·Õ´Õ«Ö€Õ¥Ö€Õ¥Õ¶", + "ksb": "Õ·Õ¡Õ´Õ¢Õ¡Õ¬Õ¡", + "ksf": "Õ¢Õ¡Ö†Õ«Õ¡", + "ksh": "Ö„ÕµÕ¸Õ¬Õ¶Õ¥Ö€Õ¥Õ¶", + "ku": "Ö„Ö€Õ¤Õ¥Ö€Õ¥Õ¶", + "kum": "Õ¯Õ¸Ö‚Õ´Õ«Õ¯Õ¥Ö€Õ¥Õ¶", + "kv": "Õ¯Õ¸Õ´Õ«Õ¥Ö€Õ¥Õ¶", + "kw": "Õ¯Õ¸Õ¼Õ¶Õ¥Ö€Õ¥Õ¶", + "ky": "Õ²Ö€Õ²Õ¦Õ¥Ö€Õ¥Õ¶", + "la": "Õ¬Õ¡Õ¿Õ«Õ¶Õ¥Ö€Õ¥Õ¶", + "lad": "Õ¬Õ¡Õ¤Õ«Õ¶Õ¸", + "lag": "Õ¬Õ¡Õ¶Õ£Õ«", + "lb": "Õ¬ÕµÕ¸Ö‚Ö„Õ½Õ¥Õ´Õ¢Õ¸Ö‚Ö€Õ£Õ¥Ö€Õ¥Õ¶", + "lez": "Õ¬Õ¥Õ¦Õ£Õ«Õ¥Ö€Õ¥Õ¶", + "lg": "Õ£Õ¡Õ¶Õ¤Õ¡", + "li": "Õ¬Õ«Õ´Õ¢Õ¸Ö‚Ö€Õ£Õ¥Ö€Õ¥Õ¶", + "lkt": "Õ¬Õ¡Õ¯Õ¸Õ¿Õ¡", + "ln": "Õ¬Õ«Õ¶Õ£Õ¡Õ¬Õ¡", + "lo": "Õ¬Õ¡Õ¸Õ½Õ¥Ö€Õ¥Õ¶", + "loz": "Õ¬Õ¸Õ¦Õ«", + "lrc": "Õ°ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Õ¬Õ¸Ö‚Ö€Õ«Õ¥Ö€Õ¥Õ¶", + "lt": "Õ¬Õ«Õ¿Õ¾Õ¥Ö€Õ¥Õ¶", + "lu": "Õ¬Õ¸Ö‚Õ¢Õ¡-Õ¯Õ¡Õ¿Õ¡Õ¶Õ£Õ¡", + "lua": "Õ¬Õ¸Ö‚Õ¢Õ¡-Õ¬Õ¸Ö‚Õ¬Õ¸Ö‚Õ¡", + "lun": "Õ¬Õ¸Ö‚Õ¶Õ¤Õ¡", + "luo": "Õ¬Õ¸Ö‚Õ¸", + "lus": "Õ´Õ«Õ¦Õ¸", + "luy": "Õ¬Õ¸Ö‚ÕµÕ¡", + "lv": "Õ¬Õ¡Õ¿Õ¾Õ«Õ¥Ö€Õ¥Õ¶", + "mad": "Õ´Õ¡Õ¤Õ¸Ö‚Ö€Õ¥Ö€Õ¥Õ¶", + "mag": "Õ´Õ¡Õ£Õ¡Õ°Õ«", + "mai": "Õ´Õ¡ÕµÕ©Õ«Õ¬Õ«", + "mak": "Õ´Õ¡Õ¯Õ¡Õ½Õ¡Ö€Õ¥Ö€Õ¥Õ¶", + "mas": "Õ´Õ¡Õ½Õ¡Õ«", + "mdf": "Õ´Õ¸Õ¯Õ·Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "men": "Õ´Õ¥Õ¶Õ¤Õ¥", + "mer": "Õ´Õ¥Ö€Õ¸Ö‚", + "mfe": "Õ´Õ¸Ö€Õ«Õ½ÕµÕ¥Õ¶", + "mg": "Õ´Õ¡Õ¬Õ£Õ¡Õ·Õ¥Ö€Õ¥Õ¶", + "mgh": "Õ´Õ¡Ö„Õ¸Ö‚Õ¡-Õ´Õ¥Õ¿Õ¿Õ¸", + "mgo": "Õ´Õ¥Õ¿Õ¡", + "mh": "Õ´Õ¡Ö€Õ·Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "mi": "Õ´Õ¡Õ¸Ö€Õ«", + "mic": "Õ´Õ«Õ¯Õ´Õ¡Õ¯", + "min": "Õ´Õ«Õ¶Õ¡Õ¶Õ£Õ¯Õ¡Õ¢Õ¡Õ¸Ö‚", + "mk": "Õ´Õ¡Õ¯Õ¥Õ¤Õ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "ml": "Õ´Õ¡Õ¬Õ¡ÕµÕ¡Õ¬Õ¡Õ´", + "mn": "Õ´Õ¸Õ¶Õ²Õ¸Õ¬Õ¥Ö€Õ¥Õ¶", + "mni": "Õ´Õ¡Õ¶Õ«ÕºÕ¸Ö‚Ö€Õ«", + "moh": "Õ´Õ¸Õ°Õ¡Õ¾Ö„", + "mos": "Õ´Õ¸Õ½Õ½Õ«", + "mr": "Õ´Õ¡Ö€Õ¡Õ©Õ«", + "mrj": "Õ¡Ö€Ö‡Õ´Õ¿Õ¡Õ´Õ¡Ö€Õ«Õ¥Ö€Õ¥Õ¶", + "ms": "Õ´Õ¡Õ¬Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "mt": "Õ´Õ¡Õ¬Õ©Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "mua": "Õ´Õ¸Ö‚Õ¶Õ¤Õ¡Õ¶Õ£", + "mul": "Õ¢Õ¡Õ¦Õ´Õ¡Õ¬Õ¥Õ¦Õ¸Ö‚", + "mus": "Õ¯Ö€Õ«Õ¯", + "mwl": "Õ´Õ«Ö€Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶", + "my": "Õ¢Õ«Ö€Õ´Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "myv": "Õ§Ö€Õ¦ÕµÕ¡", + "mzn": "Õ´Õ¡Õ¦Õ¡Õ¶Õ¤Õ¡Ö€Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "na": "Õ¶Õ¡Õ¸Ö‚Ö€Õ¸Ö‚", + "nap": "Õ¶Õ¥Õ¡ÕºÕ¸Õ¬Õ¥Ö€Õ¥Õ¶", + "naq": "Õ¶Õ¡Õ´Õ¡", + "nb": "Õ¶Õ¸Ö€Õ¾Õ¥Õ£Õ¥Ö€Õ¥Õ¶ Õ¢Õ¸Ö‚Õ¯Õ´Õ¸Õ¬", + "nd": "Õ°ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Õ¶Õ¤Õ¥Õ¢Õ¥Õ¬Õ¥", + "nds_NL": "Õ½Õ¿Õ¸Ö€Õ«Õ¶ Õ½Õ¡Ö„Õ½Õ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "ne": "Õ¶Õ¥ÕºÕ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "new": "Õ¶Õ¥Õ¾Õ¡Ö€Õ¥Ö€Õ¥Õ¶", + "ng": "Õ¶Õ¤Õ¸Õ¶Õ£Õ¡", + "nia": "Õ¶Õ«Õ¡Õ½Õ¥Ö€Õ¥Õ¶", + "niu": "Õ¶Õ«Õ¸Ö‚Õ¥Ö€Õ¥Õ¶", + "nl": "Õ°Õ¸Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶", + "nl_BE": "Ö†Õ¬Õ¡Õ´Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶", + "nmg": "Õ¯Õ¾Õ¡Õ½Õ«Õ¸", + "nn": "Õ¶Õ¸Ö€Õ¾Õ¥Õ£Õ¥Ö€Õ¥Õ¶ Õ¶ÕµÕ¸Ö‚Õ¶Õ¸Ö€Õ½Õ¯", + "nnh": "Õ¶Õ£Õ«Õ¥Õ´Õ¢Õ¸Ö‚Õ¶", + "no": "Õ¶Õ¸Ö€Õ¾Õ¥Õ£Õ¥Ö€Õ¥Õ¶", + "nog": "Õ¶Õ¸Õ£Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "non": "Õ°Õ«Õ¶ Õ¶Õ¸Ö€Õ¾Õ¥Õ£Õ¥Ö€Õ¥Õ¶", + "nqo": "Õ¶Õ¯Õ¸", + "nr": "Õ°Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ Õ¶Õ¤Õ¥Õ¢Õ¥Õ¬Õ¥", + "nso": "Õ°ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Õ½Õ¸Õ©Õ¸", + "nus": "Õ¶Õ¸Ö‚Õ¥Ö€", + "nv": "Õ¶Õ¡Õ¾Õ¡Õ­Õ¸", + "ny": "Õ¶ÕµÕ¡Õ¶Õ»Õ¡", + "nyn": "Õ¶ÕµÕ¡Õ¶Õ¯Õ¸Õ¬Õ¥", + "oc": "Ö…Ö„Õ½Õ«Õ¿Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "oj": "Ö…Õ»Õ«Õ¢Õ¾Õ¡", + "om": "Ö…Ö€Õ¸Õ´Õ¸", + "or": "Ö…Ö€Õ«ÕµÕ¡", + "os": "Ö…Õ½Õ¥Ö€Õ¥Õ¶", + "osa": "Ö…Õ½Õ¥ÕµÕ»", + "ota": "Ö…Õ½Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "pa": "ÖƒÕ¥Õ¶Õ»Õ¡Õ¢Õ¥Ö€Õ¥Õ¶", + "pag": "ÕºÕ¡Õ¶Õ£Õ¡Õ½Õ«Õ¶Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "pal": "ÕºÕ¡Õ°Õ¬Õ¡Õ¾Õ¥Ö€Õ¥Õ¶", + "pam": "ÕºÕ¡Õ´ÕºÕ¡Õ¶Õ£Õ¡Õ¥Ö€Õ¥Õ¶", + "pap": "ÕºÕ¡ÕºÕµÕ¡Õ´Õ¥Õ¶Õ¿Õ¸Ö‚", + "pau": "ÕºÕ¡Õ¬Õ¡Õ¸Ö‚Õ¥Ö€Õ¥Õ¶", + "pcd": "ÕºÕ«Õ¯Õ¡Ö€Õ¤Õ¥Ö€Õ¥Õ¶", + "pdc": "ÖƒÕ¥Õ¶Õ½Õ«Õ¬Õ¾Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "pdt": "ÕºÕ¬Õ¡Õ¿Õ¡Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "peo": "Õ°Õ«Õ¶ ÕºÕ¡Ö€Õ½Õ¯Õ¥Ö€Õ¥Õ¶", + "pfl": "ÕºÕ¡Õ¬Õ¡Õ¿Õ«Õ¶ÕµÕ¡Õ¶ Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "phn": "ÖƒÕµÕ¸Ö‚Õ¶Õ«Õ¯Õ¥Ö€Õ¥Õ¶", + "pi": "ÕºÕ¡Õ¬Õ«", + "pl": "Õ¬Õ¥Õ°Õ¥Ö€Õ¥Õ¶", + "pms": "ÕºÕ«Õ¥Õ´Õ¸Õ¶Õ¿Õ¥Ö€Õ¥Õ¶", + "pnt": "ÕºÕ¸Õ¶Õ¿Õ¥Ö€Õ¥Õ¶", + "pon": "ÕºÕ¸Õ¶ÕºÕ¥Õ¥Ö€Õ¥Õ¶", + "prg": "ÕºÖ€Õ¸Ö‚Õ½Õ¥Ö€Õ¥Õ¶", + "pro": "Õ°Õ«Õ¶ ÕºÖ€Õ¸Õ¾Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶", + "ps": "ÖƒÕ¸Ö‚Õ·Õ©Õ¸Ö‚", + "pt": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "pt_BR": "Õ¢Ö€Õ¡Õ¦Õ«Õ¬Õ¡Õ¯Õ¡Õ¶ ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "pt_PT": "Õ¥Õ¾Ö€Õ¸ÕºÕ¡Õ¯Õ¡Õ¶ ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "qu": "Õ¯Õ¥Õ¹Õ¸Ö‚Õ¡", + "quc": "Ö„Õ«Õ¹Õ¥", + "raj": "Õ¼Õ¡Õ»Õ¡Õ½Õ¿Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "rap": "Õ¼Õ¡ÕºÕ¡Õ¶Õ¸Ö‚Õ«", + "rar": "Õ¼Õ¡Ö€Õ¸Õ¿Õ¸Õ¶Õ£Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "rgn": "Õ¼Õ¸Õ´Õ¡Õ¶Õ«Õ¸Õ¬Õ¥Ö€Õ¥Õ¶", + "rif": "Õ¼Õ«Ö†Õ¥Ö€Õ¥Õ¶", + "rm": "Õ¼Õ¸Õ´Õ¡Õ¶Õ·Õ¥Ö€Õ¥Õ¶", + "rn": "Õ¼Õ¸Ö‚Õ¶Õ¤Õ«", + "ro": "Õ¼Õ¸Ö‚Õ´Õ«Õ¶Õ¥Ö€Õ¥Õ¶", + "ro_MD": "Õ´Õ¸Õ¬Õ¤Õ¸Õ¾Õ¥Ö€Õ¥Õ¶", + "rof": "Õ¼Õ¸Õ´Õ¢Õ¸", + "rom": "Õ¼Õ¸Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "root": "Õ¼Õ¸Ö‚Õ¿Õ¥Ö€Õ¥Õ¶", + "rtm": "Õ¼Õ¸Õ¿Õ¸Ö‚Õ´Õ¡Õ¶", + "ru": "Õ¼Õ¸Ö‚Õ½Õ¥Ö€Õ¥Õ¶", + "rue": "Õ¼Õ¸Ö‚Õ½Õ«Õ¶Õ¥Ö€Õ¥Õ¶", + "rug": "Õ¼Õ¸Õ¾Õ«Õ¡Õ¶Õ¡", + "rup": "Õ¡Ö€Õ¸Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "rw": "Õ¯Õ«Õ¶ÕµÕ¡Õ¼Õ¸Ö‚Õ¡Õ¶Õ¤Õ¡", + "rwk": "Õ¼Õ¾Õ¡", + "sa": "Õ½Õ¡Õ¶Õ½Õ¯Ö€Õ«Õ¿", + "sad": "Õ½Õ¡Õ¶Õ¤Õ¡Õ¾Õ¥", + "sah": "ÕµÕ¡Õ¯Õ¸Ö‚Õ¿Õ¥Ö€Õ¥Õ¶", + "saq": "Õ½Õ¡Õ´Õ¢Õ¸Ö‚Ö€Õ¸Ö‚", + "sat": "Õ½Õ¡Õ¶Õ¿Õ¡Õ¬Õ«", + "sba": "Õ¶Õ£Õ¡Õ´Õ¢Õ¡Õµ", + "sbp": "Õ½Õ¡Õ¶Õ£Õ¸Ö‚", + "sc": "Õ½Õ¡Ö€Õ¤Õ«Õ¶Õ¥Ö€Õ¥Õ¶", + "scn": "Õ½Õ«ÖÕ«Õ¬Õ«Õ¥Ö€Õ¥Õ¶", + "sco": "Õ·Õ¸Õ¿Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶", + "sd": "Õ½Õ«Õ¶Õ¤Õ°Õ«", + "sdh": "Õ°Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ Ö„Ö€Õ¤Õ¥Ö€Õ¥Õ¶", + "se": "Õ°ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Õ½Õ¡Õ¡Õ´Õ«", + "seh": "Õ½Õ¥Õ¶Õ¡", + "ses": "Õ¯Õ¸ÕµÖ€Õ¡Õ¢Õ¸Ö€Õ¸ Õ½Õ¥Õ¶Õ¶Õ«", + "sg": "Õ½Õ¡Õ¶Õ£Õ¸", + "sga": "Õ°Õ«Õ¶ Õ«Õ¼Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶", + "sh": "Õ½Õ¥Ö€Õ¢Õ¡-Õ­Õ¸Ö€Õ¾Õ¡Õ©Õ¥Ö€Õ¥Õ¶", + "shi": "Õ¿Õ¡Õ·Õ¥Õ¬Õ°Õ«Õ©", + "shn": "Õ·Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "si": "Õ½Õ«Õ¶Õ°Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "sk": "Õ½Õ¬Õ¸Õ¾Õ¡Õ¯Õ¥Ö€Õ¥Õ¶", + "sl": "Õ½Õ¬Õ¸Õ¾Õ¥Õ¶Õ¥Ö€Õ¥Õ¶", + "sma": "Õ°Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ Õ½Õ¡Õ¡Õ´Õ¥Ö€Õ¥Õ¶", + "smj": "Õ¬Õ¸Ö‚Õ¬Õ¥ Õ½Õ¡Õ¡Õ´Õ«", + "smn": "Õ«Õ¶Õ¡Ö€Õ« Õ½Õ¡Õ¡Õ´Õ¥Ö€Õ¥Õ¶", + "sms": "Õ½Õ¯Õ¸Õ¬Õ¿ Õ½Õ¡Õ¡Õ´Õ¥Ö€Õ¥Õ¶", + "sn": "Õ·Õ¸Õ¶Õ¡", + "snk": "Õ½Õ¸Õ¶Õ«Õ¶Õ¯Õ¥", + "so": "Õ½Õ¸Õ´Õ¡Õ¬Õ«Õ¥Ö€Õ¥Õ¶", + "sq": "Õ¡Õ¬Õ¢Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "sr": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶", + "srn": "Õ½Ö€Õ¡Õ¶Õ¡Õ¶ Õ¿Õ¸Õ¶Õ£Õ¸", + "ss": "Õ½Õ¾Õ¡Õ¦Õ¥Ö€Õ¥Õ¶", + "ssy": "Õ½Õ¡Õ°Õ¸Õ¥Ö€Õ¥Õ¶", + "st": "Õ°Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ Õ½Õ¸Õ©Õ¸", + "su": "Õ½Õ¸Ö‚Õ¶Õ¤Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "suk": "Õ½Õ¸Ö‚Õ¯Õ¸Ö‚Õ´Õ¡", + "sv": "Õ·Õ¾Õ¥Õ¤Õ¥Ö€Õ¥Õ¶", + "sw": "Õ½Õ¸Ö‚Õ¡Õ°Õ«Õ¬Õ«", + "sw_CD": "Õ¯Õ¸Õ¶Õ£Õ¸ÕµÕ« Õ½Õ¸Ö‚Õ¡Õ°Õ«Õ¬Õ«", + "swb": "Õ¯Õ¸Õ´Õ¸Ö€Õ¥Ö€Õ¥Õ¶", + "syr": "Õ¡Õ½Õ¸Ö€Õ¥Ö€Õ¥Õ¶", + "ta": "Õ©Õ¡Õ´Õ«Õ¬Õ¥Ö€Õ¥Õ¶", + "tcy": "Õ¿Õ¸Ö‚Õ¬Õ¸Ö‚", + "te": "Õ©Õ¥Õ¬Õ¸Ö‚Õ£Õ¸Ö‚", + "tem": "Õ¿Õ¥Õ´Õ¶Õ¥", + "teo": "Õ¿Õ¥Õ½Õ¸", + "ter": "Õ¿Õ¥Ö€Õ¥Õ¶Õ¸", + "tet": "Õ¿Õ¥Õ¿Õ¸Ö‚Õ´", + "tg": "Õ¿Õ¡Õ»Õ«Õ¯Õ¥Ö€Õ¥Õ¶", + "th": "Õ©Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "ti": "Õ¿Õ«Õ£Ö€Õ«Õ¶ÕµÕ¡", + "tig": "Õ¿Õ«Õ£Ö€Õ¥", + "tiv": "Õ¿Õ«Õ¾Õ¥Ö€Õ¥Õ¶", + "tk": "Õ©Õ¸Ö‚Ö€Ö„Õ´Õ¥Õ¶Õ¥Ö€Õ¥Õ¶", + "tkl": "Õ¿Õ¸Õ¯Õ¥Õ¬Õ¡Õ¸Ö‚", + "tkr": "ÖÕ¡Õ­Õ¸Ö‚Ö€", + "tl": "Õ¿Õ¡Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "tlh": "Õ¯Õ¬Õ«Õ¶Õ£Õ¸Õ¶", + "tli": "Õ¿Õ¬Õ«Õ¶Õ£Õ«Õ¿", + "tly": "Õ©Õ¡Õ¬Õ«Õ·Õ¥Ö€Õ¥Õ¶", + "tmh": "Õ¿Õ¡Õ´Õ¡Õ·Õ¥Õ¯", + "tn": "ÖÕ¾Õ¡Õ¶Õ¡", + "to": "Õ¿Õ¸Õ¶Õ£Õ¥Ö€Õ¥Õ¶", + "tpi": "Õ¿Õ¸Õ¯ ÖƒÕ«Õ½Õ«Õ¶", + "tr": "Õ©Õ¸Ö‚Ö€Ö„Õ¥Ö€Õ¥Õ¶", + "tru": "Õ¿Õ¸Ö‚Ö€Õ¸ÕµÕ¸", + "trv": "Õ¿Õ¡Ö€Õ¸Õ¯Õ¸", + "ts": "ÖÕ¸Õ¶Õ£Õ¡", + "tsd": "ÖÕ¡Õ¯Õ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "tsi": "ÖÕ«Õ´Õ·ÕµÕ¡Õ¶", + "tt": "Õ©Õ¡Õ©Õ¡Ö€Õ¥Ö€Õ¥Õ¶", + "tum": "Õ¿Õ¸Ö‚Õ´Õ¢Õ¸Ö‚Õ¯Õ¡", + "tvl": "Õ©Õ¸Ö‚Õ¾Õ¡Õ¬Õ¸Ö‚Õ¥Ö€Õ¥Õ¶", + "tw": "Õ¿Õ¸Ö‚Õ«", + "twq": "Õ¿Õ¡Õ½Õ¡Õ¾Õ¡Ö„", + "ty": "Õ©Õ¡Õ«Õ¿Õ¥Ö€Õ¥Õ¶", + "tyv": "Õ¿Õ¸Ö‚Õ¾Õ¥Ö€Õ¥Õ¶", + "tzm": "Õ¯Õ¥Õ¶Õ¿Ö€Õ¸Õ¶Õ¡Õ¿Õ¬Õ¡Õ½ÕµÕ¡Õ¶ Õ©Õ¡Õ´Õ¡Õ¦Õ«Õ²Õ¿", + "udm": "Õ¸Ö‚Õ¤Õ´Õ¸Ö‚Ö€Õ¿Õ¥Ö€Õ¥Õ¶", + "ug": "Õ¸Ö‚ÕµÕ²Õ¸Ö‚Ö€Õ¥Ö€Õ¥Õ¶", + "uga": "Õ¸Ö‚Õ£Õ¡Ö€Õ«Õ¿Õ¥Ö€Õ¥Õ¶", + "uk": "Õ¸Ö‚Õ¯Ö€Õ¡Õ«Õ¶Õ¥Ö€Õ¥Õ¶", + "umb": "Õ¸Ö‚Õ´Õ¢Õ¸Ö‚Õ¶Õ¤Õ¸Ö‚", + "und": "Õ¡Õ¶Õ°Õ¡ÕµÕ¿ Õ¬Õ¥Õ¦Õ¸Ö‚", + "ur": "Õ¸Ö‚Ö€Õ¤Õ¸Ö‚", + "uz": "Õ¸Ö‚Õ¦Õ¢Õ¥Õ¯Õ¥Ö€Õ¥Õ¶", + "vai": "Õ¾Õ¡Õ«", + "ve": "Õ¾Õ¥Õ¶Õ¤Õ¡", + "vec": "Õ¾Õ¥Õ¶Õ¥Õ¿Õ¥Ö€Õ¥Õ¶", + "vep": "Õ¾Õ¥ÕºÕ½Õ¥Ö€Õ¥Õ¶", + "vi": "Õ¾Õ«Õ¥Õ¿Õ¶Õ¡Õ´Õ¥Ö€Õ¥Õ¶", + "vls": "Õ¡Ö€Ö‡Õ´Õ¿Õ¡Ö†Õ¬Õ¡Õ´Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶", + "vo": "Õ¾Õ¸Õ¬Õ¡ÕºÕµÕ¸Ö‚Õ¯", + "vot": "Õ¾Õ¸Õ¤Õ¥Ö€Õ¥Õ¶", + "vro": "Õ¾Õ¸Ö€Õ¸", + "vun": "Õ¾Õ¸Ö‚Õ¶Õ»Õ¸", + "wa": "Õ¾Õ¡Õ¬Õ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "wae": "Õ¾Õ¡Õ¬Õ½Õ¥Ö€Õ¥Õ¶", + "wal": "Õ¾Õ¸Õ¬Õ¡ÕµÕ¿Õ¡", + "war": "Õ¾Õ¡Ö€Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "was": "Õ¾Õ¡Õ·Õ¸", + "wbp": "Õ¾Õ¡Ö€Õ¬ÕºÕ«Ö€Õ«", + "wo": "Õ¾Õ¸Õ¬Õ¸Ö†", + "wuu": "Õ¾Õ¸Ö‚ Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶", + "xal": "Õ¯Õ¡Õ¬Õ´Õ«Õ¯Õ¥Ö€Õ¥Õ¶", + "xh": "Ö„Õ¸Õ½Õ¡", + "xog": "Õ½Õ¸Õ£Õ¡", + "yao": "ÕµÕ¡Õ¸", + "yap": "ÕµÕ¡ÖƒÕ¥Ö€Õ¥Õ¶", + "yav": "ÕµÕ¡Õ¶Õ£Õ¢Õ¥Õ¶", + "ybb": "Õ¥Õ´Õ¢Õ¡", + "yi": "Õ«Õ¤Õ«Õ·", + "yo": "ÕµÕ¸Ö€Õ¸Ö‚Õ¢Õ¡", + "yue": "Õ¯Õ¡Õ¶Õ¿Õ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "za": "ÕªÕ¸Ö‚Õ¡Õ¶Õ£", + "zap": "Õ½Õ¡ÕºÕ¸Õ¿Õ¥Õ¯Õ¥Ö€Õ¥Õ¶", + "zea": "Õ¦Õ¥ÕµÕ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶", + "zen": "Õ¦Õ¥Õ¶Õ¡Õ£Õ¡", + "zgh": "Õ¨Õ¶Õ¤Õ°Õ¡Õ¶Õ¸Ö‚Ö€ Õ´Õ¡Ö€Õ¸Õ¯ÕµÕ¡Õ¶ Õ©Õ¡Õ´Õ¡Õ¦Õ«Õ²Õ¿", + "zh": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶", + "zh_Hans": "ÕºÕ¡Ö€Õ¦Õ¥ÖÕ¾Õ¡Õ® Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶", + "zh_Hant": "Õ¡Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶", + "zu": "Õ¦Õ¸Ö‚Õ¬Õ¸Ö‚Õ¥Ö€Õ¥Õ¶", + "zun": "Õ¦Õ¸Ö‚Õ¶Õ«Õ¥Ö€Õ¥Õ¶", + "zxx": "Õ¡Õ¼Õ¡Õ¶Ö Õ¬Õ¥Õ¦Õ¾Õ¡ÕµÕ«Õ¶ Õ¢Õ¸Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¸Ö‚Õ©ÕµÕ¡Õ¶", + "zza": "Õ¦Õ¡Õ¦Õ¡Õ¥Ö€Õ¥Õ¶" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/id.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/id.json new file mode 100644 index 0000000000000000000000000000000000000000..e289c0af4488d319ccbff21fa0152cc8b435d2ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/id.json @@ -0,0 +1,546 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "Afar", + "ab": "Abkhaz", + "ace": "Aceh", + "ach": "Acoli", + "ada": "Adangme", + "ady": "Adygei", + "ae": "Avesta", + "aeb": "Arab Tunisia", + "af": "Afrikaans", + "afh": "Afrihili", + "agq": "Aghem", + "ain": "Ainu", + "ak": "Akan", + "akk": "Akkadia", + "akz": "Alabama", + "ale": "Aleut", + "alt": "Altai Selatan", + "am": "Amharik", + "an": "Aragon", + "ang": "Inggris Kuno", + "anp": "Angika", + "ar": "Arab", + "ar_001": "Arab Standar Modern", + "arc": "Aram", + "arn": "Mapuche", + "arp": "Arapaho", + "arq": "Arab Aljazair", + "arw": "Arawak", + "ary": "Arab Maroko", + "arz": "Arab Mesir", + "as": "Assam", + "asa": "Asu", + "ase": "Bahasa Isyarat Amerika", + "ast": "Asturia", + "av": "Avar", + "awa": "Awadhi", + "ay": "Aymara", + "az": "Azerbaijani", + "ba": "Bashkir", + "bal": "Baluchi", + "ban": "Bali", + "bar": "Bavaria", + "bas": "Basa", + "bax": "Bamun", + "bbc": "Batak Toba", + "bbj": "Ghomala", + "be": "Belarusia", + "bej": "Beja", + "bem": "Bemba", + "bew": "Betawi", + "bez": "Bena", + "bfd": "Bafut", + "bg": "Bulgaria", + "bgn": "Balochi Barat", + "bho": "Bhojpuri", + "bi": "Bislama", + "bik": "Bikol", + "bin": "Bini", + "bjn": "Banjar", + "bkm": "Kom", + "bla": "Siksika", + "bm": "Bambara", + "bn": "Bengali", + "bo": "Tibet", + "br": "Breton", + "bra": "Braj", + "brx": "Bodo", + "bs": "Bosnia", + "bss": "Akoose", + "bua": "Buriat", + "bug": "Bugis", + "bum": "Bulu", + "byn": "Blin", + "byv": "Medumba", + "ca": "Katalan", + "cad": "Kado", + "car": "Karib", + "cay": "Cayuga", + "cch": "Atsam", + "ce": "Chechen", + "ceb": "Cebuano", + "cgg": "Kiga", + "ch": "Chamorro", + "chb": "Chibcha", + "chg": "Chagatai", + "chk": "Chuuke", + "chm": "Mari", + "chn": "Jargon Chinook", + "cho": "Koktaw", + "chp": "Chipewyan", + "chr": "Cherokee", + "chy": "Cheyenne", + "ckb": "Kurdi Sorani", + "co": "Korsika", + "cop": "Koptik", + "cr": "Kree", + "crh": "Tatar Krimea", + "crs": "Seselwa Kreol Prancis", + "cs": "Cheska", + "csb": "Kashubia", + "cu": "Bahasa Gereja Slavonia", + "cv": "Chuvash", + "cy": "Welsh", + "da": "Dansk", + "dak": "Dakota", + "dar": "Dargwa", + "dav": "Taita", + "de": "Jerman", + "de_CH": "Jerman Tinggi (Swiss)", + "del": "Delaware", + "den": "Slave", + "dgr": "Dogrib", + "din": "Dinka", + "dje": "Zarma", + "doi": "Dogri", + "dsb": "Sorbia Rendah", + "dua": "Duala", + "dum": "Belanda Abad Pertengahan", + "dv": "Divehi", + "dyo": "Jola-Fonyi", + "dyu": "Dyula", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embu", + "ee": "Ewe", + "efi": "Efik", + "egy": "Mesir Kuno", + "eka": "Ekajuk", + "el": "Yunani", + "elx": "Elam", + "en": "Inggris", + "en_GB": "Inggris (Inggris)", + "enm": "Inggris Abad Pertengahan", + "eo": "Esperanto", + "es": "Spanyol", + "es_ES": "Spanyol (Eropa)", + "et": "Esti", + "eu": "Basque", + "ewo": "Ewondo", + "fa": "Persia", + "fan": "Fang", + "fat": "Fanti", + "ff": "Fula", + "fi": "Suomi", + "fil": "Filipino", + "fj": "Fiji", + "fo": "Faroe", + "fon": "Fon", + "fr": "Prancis", + "frm": "Prancis Abad Pertengahan", + "fro": "Prancis Kuno", + "frp": "Arpitan", + "frr": "Frisia Utara", + "frs": "Frisia Timur", + "fur": "Friuli", + "fy": "Frisia Barat", + "ga": "Irlandia", + "gaa": "Ga", + "gag": "Gagauz", + "gay": "Gayo", + "gba": "Gbaya", + "gd": "Gaelik Skotlandia", + "gez": "Geez", + "gil": "Gilbert", + "gl": "Galisia", + "glk": "Gilaki", + "gmh": "Jerman Abad Pertengahan", + "gn": "Guarani", + "goh": "Jerman Kuno", + "gon": "Gondi", + "gor": "Gorontalo", + "got": "Gotik", + "grb": "Grebo", + "grc": "Yunani Kuno", + "gsw": "Jerman (Swiss)", + "gu": "Gujarat", + "guz": "Gusii", + "gv": "Manx", + "gwi": "Gwich’in", + "ha": "Hausa", + "hai": "Haida", + "haw": "Hawaii", + "he": "Ibrani", + "hi": "Hindi", + "hif": "Hindi Fiji", + "hil": "Hiligaynon", + "hit": "Hitit", + "hmn": "Hmong", + "ho": "Hiri Motu", + "hr": "Kroasia", + "hsb": "Sorbia Atas", + "ht": "Kreol Haiti", + "hu": "Hungaria", + "hup": "Hupa", + "hy": "Armenia", + "hz": "Herero", + "ia": "Interlingua", + "iba": "Iban", + "ibb": "Ibibio", + "id": "Indonesia", + "ie": "Interlingue", + "ig": "Igbo", + "ii": "Sichuan Yi", + "ik": "Inupiak", + "ilo": "Iloko", + "inh": "Ingushetia", + "io": "Ido", + "is": "Islandia", + "it": "Italia", + "iu": "Inuktitut", + "ja": "Jepang", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jpr": "Ibrani-Persia", + "jrb": "Ibrani-Arab", + "jv": "Jawa", + "ka": "Georgia", + "kaa": "Kara-Kalpak", + "kab": "Kabyle", + "kac": "Kachin", + "kaj": "Jju", + "kam": "Kamba", + "kaw": "Kawi", + "kbd": "Kabardi", + "kbl": "Kanembu", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Kabuverdianu", + "ken": "Kenyang", + "kfo": "Koro", + "kg": "Kongo", + "kha": "Khasi", + "kho": "Khotan", + "khq": "Koyra Chiini", + "ki": "Kikuyu", + "kj": "Kuanyama", + "kk": "Kazakh", + "kkj": "Kako", + "kl": "Kalaallisut", + "kln": "Kalenjin", + "km": "Khmer", + "kmb": "Kimbundu", + "kn": "Kannada", + "ko": "Korea", + "koi": "Komi-Permyak", + "kok": "Konkani", + "kos": "Kosre", + "kpe": "Kpelle", + "kr": "Kanuri", + "krc": "Karachai Balkar", + "kri": "Krio", + "krl": "Karelia", + "kru": "Kuruk", + "ks": "Kashmir", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Dialek Kolsch", + "ku": "Kurdi", + "kum": "Kumyk", + "kut": "Kutenai", + "kv": "Komi", + "kw": "Kornish", + "ky": "Kirgiz", + "la": "Latin", + "lad": "Ladino", + "lag": "Langi", + "lah": "Lahnda", + "lam": "Lamba", + "lb": "Luksemburg", + "lez": "Lezghia", + "lg": "Ganda", + "li": "Limburgia", + "lij": "Liguria", + "lkt": "Lakota", + "ln": "Lingala", + "lo": "Lao", + "lol": "Mongo", + "loz": "Lozi", + "lrc": "Luri Utara", + "lt": "Lituavi", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lui": "Luiseno", + "lun": "Lunda", + "luo": "Luo", + "lus": "Mizo", + "luy": "Luyia", + "lv": "Latvi", + "lzz": "Laz", + "mad": "Madura", + "maf": "Mafa", + "mag": "Magahi", + "mai": "Maithili", + "mak": "Makasar", + "man": "Mandingo", + "mas": "Masai", + "mde": "Maba", + "mdf": "Moksha", + "mdr": "Mandar", + "men": "Mende", + "mer": "Meru", + "mfe": "Morisien", + "mg": "Malagasi", + "mga": "Irlandia Abad Pertengahan", + "mgh": "Makhuwa-Meetto", + "mgo": "Meta’", + "mh": "Marshall", + "mi": "Maori", + "mic": "Mikmak", + "min": "Minangkabau", + "mk": "Makedonia", + "ml": "Malayalam", + "mn": "Mongolia", + "mnc": "Manchuria", + "mni": "Manipuri", + "moh": "Mohawk", + "mos": "Mossi", + "mr": "Marathi", + "ms": "Melayu", + "mt": "Malta", + "mua": "Mundang", + "mul": "Beberapa Bahasa", + "mus": "Bahasa Muskogee", + "mwl": "Miranda", + "mwr": "Marwari", + "mwv": "Mentawai", + "my": "Burma", + "mye": "Myene", + "myv": "Eryza", + "mzn": "Mazanderani", + "na": "Nauru", + "nap": "Neapolitan", + "naq": "Nama", + "nb": "BokmÃ¥l Norwegia", + "nd": "Ndebele Utara", + "nds": "Jerman Rendah", + "ne": "Nepali", + "new": "Newari", + "ng": "Ndonga", + "nia": "Nias", + "niu": "Niuea", + "nl": "Belanda", + "nmg": "Kwasio", + "nn": "Nynorsk Norwegia", + "nnh": "Ngiemboon", + "no": "Norwegia", + "nog": "Nogai", + "non": "Norse Kuno", + "nqo": "N’Ko", + "nr": "Ndebele Selatan", + "nso": "Sotho Utara", + "nus": "Nuer", + "nv": "Navajo", + "nwc": "Newari Klasik", + "ny": "Nyanja", + "nym": "Nyamwezi", + "nyn": "Nyankole", + "nyo": "Nyoro", + "nzi": "Nzima", + "oc": "Ositania", + "oj": "Ojibwa", + "om": "Oromo", + "or": "Oriya", + "os": "Ossetia", + "osa": "Osage", + "ota": "Turki Osmani", + "pa": "Punjabi", + "pag": "Pangasina", + "pal": "Pahlevi", + "pam": "Pampanga", + "pap": "Papiamento", + "pau": "Palau", + "pcm": "Pidgin Nigeria", + "pdc": "Jerman Pennsylvania", + "peo": "Persia Kuno", + "phn": "Funisia", + "pi": "Pali", + "pl": "Polski", + "pon": "Pohnpeia", + "prg": "Prusia", + "pro": "Provencal Lama", + "ps": "Pashto", + "pt": "Portugis", + "pt_PT": "Portugis (Eropa)", + "qu": "Quechua", + "quc": "Kʼicheʼ", + "raj": "Rajasthani", + "rap": "Rapanui", + "rar": "Rarotonga", + "rm": "Reto-Roman", + "rn": "Rundi", + "ro": "Rumania", + "ro_MD": "Moldavia", + "rof": "Rombo", + "rom": "Romani", + "root": "Root", + "rtm": "Rotuma", + "ru": "Rusia", + "rup": "Aromania", + "rw": "Kinyarwanda", + "rwk": "Rwa", + "sa": "Sanskerta", + "sad": "Sandawe", + "sah": "Sakha", + "sam": "Aram Samaria", + "saq": "Samburu", + "sas": "Sasak", + "sat": "Santali", + "sba": "Ngambai", + "sbp": "Sangu", + "sc": "Sardinia", + "scn": "Sisilia", + "sco": "Skotlandia", + "sd": "Sindhi", + "sdh": "Kurdi Selatan", + "se": "Sami Utara", + "see": "Seneca", + "seh": "Sena", + "sei": "Seri", + "sel": "Selkup", + "ses": "Koyraboro Senni", + "sg": "Sango", + "sga": "Irlandia Kuno", + "sh": "Serbo-Kroasia", + "shi": "Tachelhit", + "shn": "Shan", + "shu": "Arab Suwa", + "si": "Sinhala", + "sid": "Sidamo", + "sk": "Slovak", + "sl": "Sloven", + "sli": "Silesia Rendah", + "sly": "Selayar", + "sm": "Samoa", + "sma": "Sami Selatan", + "smj": "Lule Sami", + "smn": "Inari Sami", + "sms": "Skolt Sami", + "sn": "Shona", + "snk": "Soninke", + "so": "Somali", + "sog": "Sogdien", + "sq": "Albania", + "sr": "Serb", + "srn": "Sranan Tongo", + "srr": "Serer", + "ss": "Swati", + "ssy": "Saho", + "st": "Sotho Selatan", + "su": "Sunda", + "suk": "Sukuma", + "sus": "Susu", + "sux": "Sumeria", + "sv": "Swedia", + "sw": "Swahili", + "sw_CD": "Kongo Swahili", + "swb": "Komoria", + "syc": "Suriah Klasik", + "syr": "Suriah", + "szl": "Silesia", + "ta": "Tamil", + "tcy": "Tulu", + "te": "Telugu", + "tem": "Timne", + "teo": "Teso", + "ter": "Tereno", + "tet": "Tetun", + "tg": "Tajik", + "th": "Thai", + "ti": "Tigrinya", + "tig": "Tigre", + "tiv": "Tiv", + "tk": "Turkmen", + "tkl": "Tokelau", + "tl": "Tagalog", + "tlh": "Klingon", + "tli": "Tlingit", + "tmh": "Tamashek", + "tn": "Tswana", + "to": "Tonga", + "tog": "Nyasa Tonga", + "tpi": "Tok Pisin", + "tr": "Turki", + "tru": "Turoyo", + "trv": "Taroko", + "ts": "Tsonga", + "tsi": "Tsimshia", + "tt": "Tatar", + "ttt": "Tat Muslim", + "tum": "Tumbuka", + "tvl": "Tuvalu", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Tahiti", + "tyv": "Tuvinia", + "tzm": "Tamazight Maroko Tengah", + "udm": "Udmurt", + "ug": "Uyghur", + "uga": "Ugarit", + "uk": "Ukraina", + "umb": "Umbundu", + "und": "Bahasa Tidak Dikenal", + "ur": "Urdu", + "uz": "Uzbek", + "vai": "Vai", + "ve": "Venda", + "vec": "Venesia", + "vi": "Vietnam", + "vo": "Volapuk", + "vot": "Votia", + "vun": "Vunjo", + "wa": "Walloon", + "wae": "Walser", + "wal": "Walamo", + "war": "Warai", + "was": "Washo", + "wbp": "Warlpiri", + "wo": "Wolof", + "xal": "Kalmuk", + "xh": "Xhosa", + "xog": "Soga", + "yao": "Yao", + "yap": "Yapois", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "Yiddish", + "yo": "Yoruba", + "yue": "Kanton", + "za": "Zhuang", + "zap": "Zapotek", + "zbl": "Blissymbol", + "zen": "Zenaga", + "zgh": "Tamazight Maroko Standar", + "zh": "Tionghoa", + "zh_Hans": "Tionghoa (Aksara Sederhana)", + "zh_Hant": "Tionghoa (Aksara Tradisional)", + "zu": "Zulu", + "zun": "Zuni", + "zxx": "Tidak ada konten linguistik", + "zza": "Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ig.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ig.json new file mode 100644 index 0000000000000000000000000000000000000000..7cf0a6fbfecb4e2fd02257548e4298872f9e076d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ig.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.27.84", + "Names": { + "ak": "Akan", + "am": "Amariikị", + "ar": "Arabiikị", + "be": "Belaruusu", + "bg": "Bá»lụgarịa", + "bn": "Bengali", + "cs": "Cheekị", + "de": "Jamaan", + "el": "Giriikị", + "en": "Oyibo", + "es": "Panya", + "fa": "Peshan", + "fr": "Fụrench", + "ha": "Awụsa", + "hi": "Hindi", + "hu": "Magịya", + "id": "Indonisia", + "ig": "Igbo", + "it": "Italo", + "ja": "Japanese", + "jv": "Java", + "km": "Keme, Etiti", + "ko": "Koria", + "ms": "Maleyi", + "my": "Mịanma", + "ne": "Nepali", + "nl": "Dá»á»ch", + "pa": "Punjabi", + "pl": "Poliishi", + "pt": "Potoki", + "ro": "Rumenia", + "ru": "Rá»shan", + "rw": "Rụwanda", + "so": "Somali", + "sv": "Sụwidiishi", + "ta": "Tamụlụ", + "th": "Taị", + "tr": "Tá»kiishi", + "uk": "Ukureenị", + "ur": "Urudu", + "vi": "Viyetịnaamụ", + "yo": "Yoruba", + "zh": "Mandarịịnị", + "zu": "Zulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ii.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ii.json new file mode 100644 index 0000000000000000000000000000000000000000..2d50558f6009dd9059fa5236d2101f3e4fe7ae91 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ii.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.40", + "Names": { + "de": "ꄓꇩꉙ", + "en": "ꑱꇩꉙ", + "es": "ꑭꀠꑸꉙ", + "fr": "ꃔꇩꉙ", + "ii": "ꆈꌠꉙ", + "it": "ꑴꄊꆺꉙ", + "ja": "êꀪꉙ", + "pt": "êꄨꑸꉙ", + "pt_BR": "ꀠꑟêꄨꑸꉙ", + "ru": "ꊉꇩꉙ", + "und": "ꅉꀋꌠꅇꂷ", + "zh": "êꇩꉙ", + "zh_Hans": "êˆê¯êꇩꉙ", + "zh_Hant": "ꀎê‹êꇩꉙ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/in.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/in.json new file mode 100644 index 0000000000000000000000000000000000000000..e289c0af4488d319ccbff21fa0152cc8b435d2ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/in.json @@ -0,0 +1,546 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "Afar", + "ab": "Abkhaz", + "ace": "Aceh", + "ach": "Acoli", + "ada": "Adangme", + "ady": "Adygei", + "ae": "Avesta", + "aeb": "Arab Tunisia", + "af": "Afrikaans", + "afh": "Afrihili", + "agq": "Aghem", + "ain": "Ainu", + "ak": "Akan", + "akk": "Akkadia", + "akz": "Alabama", + "ale": "Aleut", + "alt": "Altai Selatan", + "am": "Amharik", + "an": "Aragon", + "ang": "Inggris Kuno", + "anp": "Angika", + "ar": "Arab", + "ar_001": "Arab Standar Modern", + "arc": "Aram", + "arn": "Mapuche", + "arp": "Arapaho", + "arq": "Arab Aljazair", + "arw": "Arawak", + "ary": "Arab Maroko", + "arz": "Arab Mesir", + "as": "Assam", + "asa": "Asu", + "ase": "Bahasa Isyarat Amerika", + "ast": "Asturia", + "av": "Avar", + "awa": "Awadhi", + "ay": "Aymara", + "az": "Azerbaijani", + "ba": "Bashkir", + "bal": "Baluchi", + "ban": "Bali", + "bar": "Bavaria", + "bas": "Basa", + "bax": "Bamun", + "bbc": "Batak Toba", + "bbj": "Ghomala", + "be": "Belarusia", + "bej": "Beja", + "bem": "Bemba", + "bew": "Betawi", + "bez": "Bena", + "bfd": "Bafut", + "bg": "Bulgaria", + "bgn": "Balochi Barat", + "bho": "Bhojpuri", + "bi": "Bislama", + "bik": "Bikol", + "bin": "Bini", + "bjn": "Banjar", + "bkm": "Kom", + "bla": "Siksika", + "bm": "Bambara", + "bn": "Bengali", + "bo": "Tibet", + "br": "Breton", + "bra": "Braj", + "brx": "Bodo", + "bs": "Bosnia", + "bss": "Akoose", + "bua": "Buriat", + "bug": "Bugis", + "bum": "Bulu", + "byn": "Blin", + "byv": "Medumba", + "ca": "Katalan", + "cad": "Kado", + "car": "Karib", + "cay": "Cayuga", + "cch": "Atsam", + "ce": "Chechen", + "ceb": "Cebuano", + "cgg": "Kiga", + "ch": "Chamorro", + "chb": "Chibcha", + "chg": "Chagatai", + "chk": "Chuuke", + "chm": "Mari", + "chn": "Jargon Chinook", + "cho": "Koktaw", + "chp": "Chipewyan", + "chr": "Cherokee", + "chy": "Cheyenne", + "ckb": "Kurdi Sorani", + "co": "Korsika", + "cop": "Koptik", + "cr": "Kree", + "crh": "Tatar Krimea", + "crs": "Seselwa Kreol Prancis", + "cs": "Cheska", + "csb": "Kashubia", + "cu": "Bahasa Gereja Slavonia", + "cv": "Chuvash", + "cy": "Welsh", + "da": "Dansk", + "dak": "Dakota", + "dar": "Dargwa", + "dav": "Taita", + "de": "Jerman", + "de_CH": "Jerman Tinggi (Swiss)", + "del": "Delaware", + "den": "Slave", + "dgr": "Dogrib", + "din": "Dinka", + "dje": "Zarma", + "doi": "Dogri", + "dsb": "Sorbia Rendah", + "dua": "Duala", + "dum": "Belanda Abad Pertengahan", + "dv": "Divehi", + "dyo": "Jola-Fonyi", + "dyu": "Dyula", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embu", + "ee": "Ewe", + "efi": "Efik", + "egy": "Mesir Kuno", + "eka": "Ekajuk", + "el": "Yunani", + "elx": "Elam", + "en": "Inggris", + "en_GB": "Inggris (Inggris)", + "enm": "Inggris Abad Pertengahan", + "eo": "Esperanto", + "es": "Spanyol", + "es_ES": "Spanyol (Eropa)", + "et": "Esti", + "eu": "Basque", + "ewo": "Ewondo", + "fa": "Persia", + "fan": "Fang", + "fat": "Fanti", + "ff": "Fula", + "fi": "Suomi", + "fil": "Filipino", + "fj": "Fiji", + "fo": "Faroe", + "fon": "Fon", + "fr": "Prancis", + "frm": "Prancis Abad Pertengahan", + "fro": "Prancis Kuno", + "frp": "Arpitan", + "frr": "Frisia Utara", + "frs": "Frisia Timur", + "fur": "Friuli", + "fy": "Frisia Barat", + "ga": "Irlandia", + "gaa": "Ga", + "gag": "Gagauz", + "gay": "Gayo", + "gba": "Gbaya", + "gd": "Gaelik Skotlandia", + "gez": "Geez", + "gil": "Gilbert", + "gl": "Galisia", + "glk": "Gilaki", + "gmh": "Jerman Abad Pertengahan", + "gn": "Guarani", + "goh": "Jerman Kuno", + "gon": "Gondi", + "gor": "Gorontalo", + "got": "Gotik", + "grb": "Grebo", + "grc": "Yunani Kuno", + "gsw": "Jerman (Swiss)", + "gu": "Gujarat", + "guz": "Gusii", + "gv": "Manx", + "gwi": "Gwich’in", + "ha": "Hausa", + "hai": "Haida", + "haw": "Hawaii", + "he": "Ibrani", + "hi": "Hindi", + "hif": "Hindi Fiji", + "hil": "Hiligaynon", + "hit": "Hitit", + "hmn": "Hmong", + "ho": "Hiri Motu", + "hr": "Kroasia", + "hsb": "Sorbia Atas", + "ht": "Kreol Haiti", + "hu": "Hungaria", + "hup": "Hupa", + "hy": "Armenia", + "hz": "Herero", + "ia": "Interlingua", + "iba": "Iban", + "ibb": "Ibibio", + "id": "Indonesia", + "ie": "Interlingue", + "ig": "Igbo", + "ii": "Sichuan Yi", + "ik": "Inupiak", + "ilo": "Iloko", + "inh": "Ingushetia", + "io": "Ido", + "is": "Islandia", + "it": "Italia", + "iu": "Inuktitut", + "ja": "Jepang", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jpr": "Ibrani-Persia", + "jrb": "Ibrani-Arab", + "jv": "Jawa", + "ka": "Georgia", + "kaa": "Kara-Kalpak", + "kab": "Kabyle", + "kac": "Kachin", + "kaj": "Jju", + "kam": "Kamba", + "kaw": "Kawi", + "kbd": "Kabardi", + "kbl": "Kanembu", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Kabuverdianu", + "ken": "Kenyang", + "kfo": "Koro", + "kg": "Kongo", + "kha": "Khasi", + "kho": "Khotan", + "khq": "Koyra Chiini", + "ki": "Kikuyu", + "kj": "Kuanyama", + "kk": "Kazakh", + "kkj": "Kako", + "kl": "Kalaallisut", + "kln": "Kalenjin", + "km": "Khmer", + "kmb": "Kimbundu", + "kn": "Kannada", + "ko": "Korea", + "koi": "Komi-Permyak", + "kok": "Konkani", + "kos": "Kosre", + "kpe": "Kpelle", + "kr": "Kanuri", + "krc": "Karachai Balkar", + "kri": "Krio", + "krl": "Karelia", + "kru": "Kuruk", + "ks": "Kashmir", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Dialek Kolsch", + "ku": "Kurdi", + "kum": "Kumyk", + "kut": "Kutenai", + "kv": "Komi", + "kw": "Kornish", + "ky": "Kirgiz", + "la": "Latin", + "lad": "Ladino", + "lag": "Langi", + "lah": "Lahnda", + "lam": "Lamba", + "lb": "Luksemburg", + "lez": "Lezghia", + "lg": "Ganda", + "li": "Limburgia", + "lij": "Liguria", + "lkt": "Lakota", + "ln": "Lingala", + "lo": "Lao", + "lol": "Mongo", + "loz": "Lozi", + "lrc": "Luri Utara", + "lt": "Lituavi", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lui": "Luiseno", + "lun": "Lunda", + "luo": "Luo", + "lus": "Mizo", + "luy": "Luyia", + "lv": "Latvi", + "lzz": "Laz", + "mad": "Madura", + "maf": "Mafa", + "mag": "Magahi", + "mai": "Maithili", + "mak": "Makasar", + "man": "Mandingo", + "mas": "Masai", + "mde": "Maba", + "mdf": "Moksha", + "mdr": "Mandar", + "men": "Mende", + "mer": "Meru", + "mfe": "Morisien", + "mg": "Malagasi", + "mga": "Irlandia Abad Pertengahan", + "mgh": "Makhuwa-Meetto", + "mgo": "Meta’", + "mh": "Marshall", + "mi": "Maori", + "mic": "Mikmak", + "min": "Minangkabau", + "mk": "Makedonia", + "ml": "Malayalam", + "mn": "Mongolia", + "mnc": "Manchuria", + "mni": "Manipuri", + "moh": "Mohawk", + "mos": "Mossi", + "mr": "Marathi", + "ms": "Melayu", + "mt": "Malta", + "mua": "Mundang", + "mul": "Beberapa Bahasa", + "mus": "Bahasa Muskogee", + "mwl": "Miranda", + "mwr": "Marwari", + "mwv": "Mentawai", + "my": "Burma", + "mye": "Myene", + "myv": "Eryza", + "mzn": "Mazanderani", + "na": "Nauru", + "nap": "Neapolitan", + "naq": "Nama", + "nb": "BokmÃ¥l Norwegia", + "nd": "Ndebele Utara", + "nds": "Jerman Rendah", + "ne": "Nepali", + "new": "Newari", + "ng": "Ndonga", + "nia": "Nias", + "niu": "Niuea", + "nl": "Belanda", + "nmg": "Kwasio", + "nn": "Nynorsk Norwegia", + "nnh": "Ngiemboon", + "no": "Norwegia", + "nog": "Nogai", + "non": "Norse Kuno", + "nqo": "N’Ko", + "nr": "Ndebele Selatan", + "nso": "Sotho Utara", + "nus": "Nuer", + "nv": "Navajo", + "nwc": "Newari Klasik", + "ny": "Nyanja", + "nym": "Nyamwezi", + "nyn": "Nyankole", + "nyo": "Nyoro", + "nzi": "Nzima", + "oc": "Ositania", + "oj": "Ojibwa", + "om": "Oromo", + "or": "Oriya", + "os": "Ossetia", + "osa": "Osage", + "ota": "Turki Osmani", + "pa": "Punjabi", + "pag": "Pangasina", + "pal": "Pahlevi", + "pam": "Pampanga", + "pap": "Papiamento", + "pau": "Palau", + "pcm": "Pidgin Nigeria", + "pdc": "Jerman Pennsylvania", + "peo": "Persia Kuno", + "phn": "Funisia", + "pi": "Pali", + "pl": "Polski", + "pon": "Pohnpeia", + "prg": "Prusia", + "pro": "Provencal Lama", + "ps": "Pashto", + "pt": "Portugis", + "pt_PT": "Portugis (Eropa)", + "qu": "Quechua", + "quc": "Kʼicheʼ", + "raj": "Rajasthani", + "rap": "Rapanui", + "rar": "Rarotonga", + "rm": "Reto-Roman", + "rn": "Rundi", + "ro": "Rumania", + "ro_MD": "Moldavia", + "rof": "Rombo", + "rom": "Romani", + "root": "Root", + "rtm": "Rotuma", + "ru": "Rusia", + "rup": "Aromania", + "rw": "Kinyarwanda", + "rwk": "Rwa", + "sa": "Sanskerta", + "sad": "Sandawe", + "sah": "Sakha", + "sam": "Aram Samaria", + "saq": "Samburu", + "sas": "Sasak", + "sat": "Santali", + "sba": "Ngambai", + "sbp": "Sangu", + "sc": "Sardinia", + "scn": "Sisilia", + "sco": "Skotlandia", + "sd": "Sindhi", + "sdh": "Kurdi Selatan", + "se": "Sami Utara", + "see": "Seneca", + "seh": "Sena", + "sei": "Seri", + "sel": "Selkup", + "ses": "Koyraboro Senni", + "sg": "Sango", + "sga": "Irlandia Kuno", + "sh": "Serbo-Kroasia", + "shi": "Tachelhit", + "shn": "Shan", + "shu": "Arab Suwa", + "si": "Sinhala", + "sid": "Sidamo", + "sk": "Slovak", + "sl": "Sloven", + "sli": "Silesia Rendah", + "sly": "Selayar", + "sm": "Samoa", + "sma": "Sami Selatan", + "smj": "Lule Sami", + "smn": "Inari Sami", + "sms": "Skolt Sami", + "sn": "Shona", + "snk": "Soninke", + "so": "Somali", + "sog": "Sogdien", + "sq": "Albania", + "sr": "Serb", + "srn": "Sranan Tongo", + "srr": "Serer", + "ss": "Swati", + "ssy": "Saho", + "st": "Sotho Selatan", + "su": "Sunda", + "suk": "Sukuma", + "sus": "Susu", + "sux": "Sumeria", + "sv": "Swedia", + "sw": "Swahili", + "sw_CD": "Kongo Swahili", + "swb": "Komoria", + "syc": "Suriah Klasik", + "syr": "Suriah", + "szl": "Silesia", + "ta": "Tamil", + "tcy": "Tulu", + "te": "Telugu", + "tem": "Timne", + "teo": "Teso", + "ter": "Tereno", + "tet": "Tetun", + "tg": "Tajik", + "th": "Thai", + "ti": "Tigrinya", + "tig": "Tigre", + "tiv": "Tiv", + "tk": "Turkmen", + "tkl": "Tokelau", + "tl": "Tagalog", + "tlh": "Klingon", + "tli": "Tlingit", + "tmh": "Tamashek", + "tn": "Tswana", + "to": "Tonga", + "tog": "Nyasa Tonga", + "tpi": "Tok Pisin", + "tr": "Turki", + "tru": "Turoyo", + "trv": "Taroko", + "ts": "Tsonga", + "tsi": "Tsimshia", + "tt": "Tatar", + "ttt": "Tat Muslim", + "tum": "Tumbuka", + "tvl": "Tuvalu", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Tahiti", + "tyv": "Tuvinia", + "tzm": "Tamazight Maroko Tengah", + "udm": "Udmurt", + "ug": "Uyghur", + "uga": "Ugarit", + "uk": "Ukraina", + "umb": "Umbundu", + "und": "Bahasa Tidak Dikenal", + "ur": "Urdu", + "uz": "Uzbek", + "vai": "Vai", + "ve": "Venda", + "vec": "Venesia", + "vi": "Vietnam", + "vo": "Volapuk", + "vot": "Votia", + "vun": "Vunjo", + "wa": "Walloon", + "wae": "Walser", + "wal": "Walamo", + "war": "Warai", + "was": "Washo", + "wbp": "Warlpiri", + "wo": "Wolof", + "xal": "Kalmuk", + "xh": "Xhosa", + "xog": "Soga", + "yao": "Yao", + "yap": "Yapois", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "Yiddish", + "yo": "Yoruba", + "yue": "Kanton", + "za": "Zhuang", + "zap": "Zapotek", + "zbl": "Blissymbol", + "zen": "Zenaga", + "zgh": "Tamazight Maroko Standar", + "zh": "Tionghoa", + "zh_Hans": "Tionghoa (Aksara Sederhana)", + "zh_Hant": "Tionghoa (Aksara Tradisional)", + "zu": "Zulu", + "zun": "Zuni", + "zxx": "Tidak ada konten linguistik", + "zza": "Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/is.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/is.json new file mode 100644 index 0000000000000000000000000000000000000000..14b2714c91da57540f7a0854526d4af16f12a1b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/is.json @@ -0,0 +1,518 @@ +{ + "Version": "2.1.29.65", + "Names": { + "aa": "afár", + "ab": "abkasíska", + "ace": "akkíska", + "ach": "acoli", + "ada": "adangme", + "ady": "adýge", + "ae": "avestíska", + "af": "afríkanska", + "afh": "afríhílí", + "agq": "aghem", + "ain": "aínu (Japan)", + "ak": "akan", + "akk": "akkadíska", + "ale": "aleúska", + "alt": "suðuraltaíska", + "am": "amharíska", + "an": "aragonska", + "ang": "fornenska", + "anp": "angíka", + "ar": "arabíska", + "ar_001": "stöðluð nútímaarabíska", + "arc": "arameíska", + "arn": "arákaníska", + "arp": "arapahó", + "arw": "aravakska", + "as": "assamska", + "asa": "asu", + "ast": "astúríska", + "av": "avaríska", + "awa": "avadí", + "ay": "aímara", + "az": "aserska", + "ba": "baskír", + "bal": "balúkí", + "ban": "balíska", + "bas": "basa", + "bax": "bamun", + "be": "hvítrússneska", + "bej": "beja", + "bem": "bemba", + "bez": "bena", + "bg": "búlgarska", + "bgn": "vesturbalotsí", + "bho": "bojpúrí", + "bi": "bíslama", + "bik": "bíkol", + "bin": "bíní", + "bla": "siksika", + "bm": "bambara", + "bn": "bengalska", + "bo": "tíbeska", + "br": "bretónska", + "bra": "braí", + "brx": "bódó", + "bs": "bosníska", + "bss": "bakossi", + "bua": "búríat", + "bug": "búgíska", + "byn": "blín", + "ca": "katalónska", + "cad": "kaddó", + "car": "karíbamál", + "cay": "kajúga", + "cch": "atsam", + "ce": "tsjetsjenska", + "ceb": "kebúanó", + "cgg": "kíga", + "ch": "kamorró", + "chb": "síbsja", + "chg": "sjagataí", + "chk": "sjúkíska", + "chm": "marí", + "chn": "sínúk", + "cho": "sjoktá", + "chp": "sípevíska", + "chr": "Cherokee-mál", + "chy": "sjeyen", + "ckb": "sorani-kúrdíska", + "co": "korsíska", + "cop": "koptíska", + "cr": "krí", + "crh": "krímtyrkneska", + "crs": "Seselwa kreólsk franska", + "cs": "tékkneska", + "csb": "kasúbíska", + "cu": "kirkjuslavneska", + "cv": "sjúvas", + "cy": "velska", + "da": "danska", + "dak": "dakóta", + "dar": "dargva", + "dav": "taíta", + "de": "þýska", + "de_AT": "austurrísk þýska", + "de_CH": "svissnesk háþýska", + "del": "delaver", + "den": "slavneska", + "dgr": "dogríb", + "din": "dinka", + "dje": "zarma", + "doi": "dogrí", + "dsb": "lágsorbneska", + "dua": "dúala", + "dum": "miðhollenska", + "dv": "dívehí", + "dyo": "jola-fonyi", + "dyu": "djúla", + "dz": "dsongka", + "dzg": "dazaga", + "ebu": "embu", + "ee": "ewe", + "efi": "efík", + "egy": "fornegypska", + "eka": "ekajúk", + "el": "gríska", + "elx": "elamít", + "en": "enska", + "en_AU": "áströlsk enska", + "en_CA": "kanadísk enska", + "en_GB": "bresk enska", + "en_US": "bandarísk enska", + "enm": "miðenska", + "eo": "esperantó", + "es": "spænska", + "es_419": "rómönsk-amerísk spænska", + "es_ES": "evrópsk spænska", + "es_MX": "mexíkósk spænska", + "et": "eistneska", + "eu": "baskneska", + "ewo": "evondó", + "fa": "persneska", + "fan": "fang", + "fat": "fantí", + "ff": "fúla", + "fi": "finnska", + "fil": "filippseyska", + "fj": "fídjeyska", + "fo": "færeyska", + "fon": "fón", + "fr": "franska", + "fr_CA": "kanadísk franska", + "fr_CH": "svissnesk franska", + "frm": "miðfranska", + "fro": "fornfranska", + "frr": "norðurfrísneska", + "frs": "austurfrísneska", + "fur": "fríúlska", + "fy": "vesturfrísneska", + "ga": "írska", + "gaa": "ga", + "gag": "gagás", + "gay": "gajó", + "gba": "gbaja", + "gd": "skosk gelíska", + "gez": "gís", + "gil": "gilberska", + "gl": "galíanska", + "gmh": "miðháþýska", + "gn": "gvaraní", + "goh": "fornháþýska", + "gon": "gondí", + "gor": "gorontaló", + "got": "gotneska", + "grb": "gerbó", + "grc": "forngríska", + "gsw": "svissnesk þýska", + "gu": "gújaratí", + "guz": "gusii", + "gv": "manska", + "gwi": "gvísín", + "ha": "hása", + "hai": "haída", + "haw": "havaíska", + "he": "hebreska", + "hi": "hindí", + "hil": "híligaínon", + "hit": "hettitíska", + "hmn": "hmong", + "ho": "hírímótú", + "hr": "króatíska", + "hsb": "hásorbneska", + "ht": "haítíska", + "hu": "ungverska", + "hup": "húpa", + "hy": "armenska", + "hz": "hereró", + "ia": "alþjóðatunga", + "iba": "íban", + "ibb": "ibibio", + "id": "indónesíska", + "ie": "interlingve", + "ig": "ígbó", + "ii": "sísúanjí", + "ik": "ínúpíak", + "ilo": "ílokó", + "inh": "ingús", + "io": "ídó", + "is": "íslenska", + "it": "ítalska", + "iu": "inúktitút", + "ja": "japanska", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "masjáme", + "jpr": "gyðingapersneska", + "jrb": "gyðingaarabíska", + "jv": "javanska", + "ka": "georgíska", + "kaa": "karakalpak", + "kab": "kabíle", + "kac": "kasín", + "kaj": "jju", + "kam": "kamba", + "kaw": "kaví", + "kbd": "kabardíska", + "kcg": "tyap", + "kde": "makonde", + "kea": "grænhöfðeyska", + "kfo": "koro", + "kg": "kongóska", + "kha": "kasí", + "kho": "kotaska", + "khq": "koyra chiini", + "ki": "kíkújú", + "kj": "kúanjama", + "kk": "kasakska", + "kkj": "kako", + "kl": "grænlenska", + "kln": "kalenjin", + "km": "kmer", + "kmb": "kimbúndú", + "kn": "kannada", + "ko": "kóreska", + "koi": "kómí-permyak", + "kok": "konkaní", + "kos": "kosraska", + "kpe": "kpelle", + "kr": "kanúrí", + "krc": "karasaíbalkar", + "krl": "karélska", + "kru": "kúrúk", + "ks": "kasmírska", + "ksb": "sjambala", + "ksf": "bafía", + "ksh": "kölníska", + "ku": "kúrdíska", + "kum": "kúmík", + "kut": "kútenaí", + "kv": "komíska", + "kw": "kornbreska", + "ky": "kirgiska", + "la": "latína", + "lad": "ladínska", + "lag": "langí", + "lah": "landa", + "lam": "lamba", + "lb": "lúxemborgíska", + "lez": "lesgíska", + "lg": "ganda", + "li": "limbúrgíska", + "lkt": "lakóta", + "ln": "lingala", + "lo": "laó", + "lol": "mongó", + "loz": "lozi", + "lrc": "norðurlúrí", + "lt": "litháíska", + "lu": "lúbakatanga", + "lua": "luba-lulua", + "lui": "lúisenó", + "lun": "lúnda", + "luo": "lúó", + "lus": "lúsaí", + "luy": "luyia", + "lv": "lettneska", + "mad": "madúrska", + "mag": "magahí", + "mai": "maítílí", + "mak": "makasar", + "man": "mandingó", + "mas": "masaí", + "mdf": "moksa", + "mdr": "mandar", + "men": "mende", + "mer": "merú", + "mfe": "máritíska", + "mg": "malagasíska", + "mga": "miðírska", + "mgh": "makhuwa-meetto", + "mgo": "meta’", + "mh": "marshallska", + "mi": "maorí", + "mic": "mikmak", + "min": "mínangkabá", + "mk": "makedónska", + "ml": "malajalam", + "mn": "mongólska", + "mnc": "mansjú", + "mni": "manípúrí", + "moh": "móhíska", + "mos": "mossí", + "mr": "maratí", + "ms": "malaíska", + "mt": "maltneska", + "mua": "mundang", + "mul": "margvísleg mál", + "mus": "krík", + "mwl": "mirandesíska", + "mwr": "marvarí", + "my": "burmneska", + "myv": "ersja", + "mzn": "masanderaní", + "na": "nárúska", + "nap": "napólíska", + "naq": "nama", + "nb": "norskt bókmál", + "nd": "norður-ndebele", + "nds": "lágþýska; lágsaxneska", + "nds_NL": "lágsaxneska", + "ne": "nepalska", + "new": "nevarí", + "ng": "ndonga", + "nia": "nías", + "niu": "níveska", + "nl": "hollenska", + "nl_BE": "flæmska", + "nmg": "kwasio", + "nn": "nýnorska", + "nnh": "ngiemboon", + "no": "norska", + "nog": "nógaí", + "non": "norræna", + "nqo": "n’ko", + "nr": "suðurndebele", + "nso": "norðursótó", + "nus": "núer", + "nv": "navahó", + "nwc": "klassísk nevaríska", + "ny": "njanja; sísjeva; sjeva", + "nym": "njamvesí", + "nyn": "nyankole", + "nyo": "njóró", + "nzi": "nsíma", + "oc": "oksítaníska", + "oj": "ojibva", + "om": "oromo", + "or": "óría", + "os": "ossetíska", + "osa": "ósage", + "ota": "tyrkneska, ottóman", + "pa": "púnjabí", + "pag": "pangasínmál", + "pal": "palaví", + "pam": "pampanga", + "pap": "papíamentó", + "pau": "paláska", + "pcm": "nígerískt pidgin", + "peo": "fornpersneska", + "phn": "fönikíska", + "pi": "palí", + "pl": "pólska", + "pon": "ponpeiska", + "prg": "prússneska", + "pro": "fornpróvensalska", + "ps": "pastú", + "pt": "portúgalska", + "pt_BR": "brasílísk portúgalska", + "pt_PT": "evrópsk portúgalska", + "qu": "kvesjúa", + "quc": "kiche", + "raj": "rajastaní", + "rap": "rapanúí", + "rar": "rarótongska", + "rm": "rómanska", + "rn": "rúndí", + "ro": "rúmenska", + "ro_MD": "moldóvska", + "rof": "rombó", + "rom": "romaní", + "root": "rót", + "ru": "rússneska", + "rup": "arúmenska", + "rw": "kínjarvanda", + "rwk": "rúa", + "sa": "sanskrít", + "sad": "sandave", + "sah": "jakút", + "sam": "samversk arameíska", + "saq": "sambúrú", + "sas": "sasak", + "sat": "santalí", + "sba": "ngambay", + "sbp": "sangú", + "sc": "sardínska", + "scn": "sikileyska", + "sco": "skoska", + "sd": "sindí", + "sdh": "suðurkúrdíska", + "se": "norðursamíska", + "seh": "sena", + "sel": "selkúp", + "ses": "koíraboró-senní", + "sg": "sangó", + "sga": "fornírska", + "sh": "serbókróatíska", + "shi": "tachelhit", + "shn": "sjan", + "si": "singalíska", + "sid": "sídamó", + "sk": "slóvakíska", + "sl": "slóvenska", + "sm": "samóska", + "sma": "suðursamíska", + "smj": "lúlesamíska", + "smn": "enaresamíska", + "sms": "skoltesamíska", + "sn": "shona", + "snk": "sóninke", + "so": "sómalska", + "sog": "sogdíen", + "sq": "albanska", + "sr": "serbneska", + "srn": "sranan tongo", + "srr": "serer", + "ss": "svatí", + "ssy": "saho", + "st": "suðursótó", + "su": "súndanska", + "suk": "súkúma", + "sus": "súsú", + "sux": "súmerska", + "sv": "sænska", + "sw": "svahílí", + "sw_CD": "Kongó-svahílí", + "swb": "shimaoríska", + "syc": "klassísk sýrlenska", + "syr": "sýrlenska", + "ta": "tamílska", + "te": "telúgú", + "tem": "tímne", + "teo": "tesó", + "ter": "terenó", + "tet": "tetúm", + "tg": "tadsjikska", + "th": "taílenska", + "ti": "tígrinja", + "tig": "tígre", + "tiv": "tív", + "tk": "túrkmenska", + "tkl": "tókeláska", + "tl": "tagalog", + "tlh": "klingonska", + "tli": "tlingit", + "tmh": "tamasjek", + "tn": "tsúana", + "to": "tongverska", + "tog": "tongverska (nyasa)", + "tpi": "tokpisin", + "tr": "tyrkneska", + "trv": "tarókó", + "ts": "tsonga", + "tsi": "tsimsíska", + "tt": "tatarska", + "tum": "túmbúka", + "tvl": "túvalúska", + "tw": "tví", + "twq": "tasawaq", + "ty": "tahítíska", + "tyv": "túvínska", + "tzm": "tamazight", + "udm": "údmúrt", + "ug": "úígúr", + "uga": "úgarítíska", + "uk": "úkraínska", + "umb": "úmbúndú", + "und": "óþekkt tungumál", + "ur": "úrdú", + "uz": "úsbekska", + "vai": "vaí", + "ve": "venda", + "vi": "víetnamska", + "vo": "volapyk", + "vot": "votíska", + "vun": "vunjó", + "wa": "vallónska", + "wae": "valser", + "wal": "valamó", + "war": "varaí", + "was": "vasjó", + "wbp": "varlpiri", + "wo": "volof", + "xal": "kalmúkska", + "xh": "sósa", + "xog": "sóga", + "yao": "jaó", + "yap": "japíska", + "yav": "yangben", + "ybb": "yemba", + "yi": "jiddíska", + "yo": "jórúba", + "yue": "kantoneska", + "za": "súang", + "zap": "sapótek", + "zbl": "blisstákn", + "zen": "senaga", + "zgh": "staðlað marokkóskt tamazight", + "zh": "kínverska", + "zh_Hans": "kínverska (einfölduð)", + "zh_Hant": "kínverska (hefðbundin)", + "zu": "súlú", + "zun": "súní", + "zxx": "ekkert tungumálaefni", + "zza": "zázáíska" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/it.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/it.json new file mode 100644 index 0000000000000000000000000000000000000000..095e153b56768d65799bb7059d1e077fecca4fd7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/it.json @@ -0,0 +1,613 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afar", + "ab": "abcaso", + "ace": "accinese", + "ach": "acioli", + "ada": "adangme", + "ady": "adyghe", + "ae": "avestan", + "aeb": "arabo tunisino", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainu", + "ak": "akan", + "akk": "accado", + "akz": "alabama", + "ale": "aleuto", + "aln": "albanese ghego", + "alt": "altai meridionale", + "am": "amarico", + "an": "aragonese", + "ang": "inglese antico", + "anp": "angika", + "ar": "arabo", + "ar_001": "arabo moderno standard", + "arc": "aramaico", + "arn": "mapuche", + "aro": "araona", + "arp": "arapaho", + "arq": "arabo algerino", + "arw": "aruaco", + "ary": "arabo marocchino", + "arz": "arabo egiziano", + "as": "assamese", + "asa": "asu", + "ase": "lingua dei segni americana", + "ast": "asturiano", + "av": "avaro", + "avk": "kotava", + "awa": "awadhi", + "ay": "aymara", + "az": "azerbaigiano", + "ba": "baschiro", + "bal": "beluci", + "ban": "balinese", + "bar": "bavarese", + "bas": "basa", + "bax": "bamun", + "bbc": "batak toba", + "bbj": "ghomala", + "be": "bielorusso", + "bej": "begia", + "bem": "wemba", + "bew": "betawi", + "bez": "bena", + "bfd": "bafut", + "bfq": "badaga", + "bg": "bulgaro", + "bgn": "beluci occidentale", + "bho": "bhojpuri", + "bi": "bislama", + "bik": "bicol", + "bin": "bini", + "bjn": "banjar", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bengalese", + "bo": "tibetano", + "bpy": "bishnupriya", + "bqi": "bakhtiari", + "br": "bretone", + "bra": "braj", + "brh": "brahui", + "brx": "bodo", + "bs": "bosniaco", + "bss": "akoose", + "bua": "buriat", + "bug": "bugi", + "bum": "bulu", + "byn": "blin", + "byv": "medumba", + "ca": "catalano", + "cad": "caddo", + "car": "caribico", + "cay": "cayuga", + "cch": "atsam", + "ce": "ceceno", + "ceb": "cebuano", + "cgg": "chiga", + "ch": "chamorro", + "chb": "chibcha", + "chg": "ciagataico", + "chk": "chuukese", + "chm": "mari", + "chn": "gergo chinook", + "cho": "choctaw", + "chp": "chipewyan", + "chr": "cherokee", + "chy": "cheyenne", + "ckb": "curdo sorani", + "co": "corso", + "cop": "copto", + "cps": "capiznon", + "cr": "cree", + "crh": "turco crimeo", + "crs": "creolo delle Seychelles", + "cs": "ceco", + "csb": "kashubian", + "cu": "slavo della Chiesa", + "cv": "ciuvascio", + "cy": "gallese", + "da": "danese", + "dak": "dakota", + "dar": "dargwa", + "dav": "taita", + "de": "tedesco", + "de_AT": "tedesco austriaco", + "de_CH": "alto tedesco svizzero", + "del": "delaware", + "den": "slave", + "dgr": "dogrib", + "din": "dinca", + "dje": "zarma", + "doi": "dogri", + "dsb": "basso sorabo", + "dtp": "dusun centrale", + "dua": "duala", + "dum": "olandese medio", + "dv": "divehi", + "dyo": "jola-fony", + "dyu": "diula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embu", + "ee": "ewe", + "efi": "efik", + "egl": "emiliano", + "egy": "egiziano antico", + "eka": "ekajuka", + "el": "greco", + "elx": "elamitico", + "en": "inglese", + "en_AU": "inglese australiano", + "en_CA": "inglese canadese", + "en_GB": "inglese britannico", + "en_US": "inglese americano", + "enm": "inglese medio", + "eo": "esperanto", + "es": "spagnolo", + "es_419": "spagnolo latinoamericano", + "es_ES": "spagnolo europeo", + "es_MX": "spagnolo messicano", + "esu": "yupik centrale", + "et": "estone", + "eu": "basco", + "ewo": "ewondo", + "ext": "estremegno", + "fa": "persiano", + "fan": "fang", + "fat": "fanti", + "ff": "fulah", + "fi": "finlandese", + "fil": "filippino", + "fit": "finlandese del Tornedalen", + "fj": "figiano", + "fo": "faroese", + "fon": "fon", + "fr": "francese", + "fr_CA": "francese canadese", + "fr_CH": "francese svizzero", + "frc": "francese cajun", + "frm": "francese medio", + "fro": "francese antico", + "frp": "francoprovenzale", + "frr": "frisone settentrionale", + "frs": "frisone orientale", + "fur": "friulano", + "fy": "frisone occidentale", + "ga": "irlandese", + "gaa": "ga", + "gag": "gagauzo", + "gan": "gan", + "gay": "gayo", + "gba": "gbaya", + "gbz": "dari zoroastriano", + "gd": "gaelico scozzese", + "gez": "geez", + "gil": "gilbertese", + "gl": "galiziano", + "glk": "gilaki", + "gmh": "tedesco medio alto", + "gn": "guaraní", + "goh": "tedesco antico alto", + "gom": "konkani goano", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotico", + "grb": "grebo", + "grc": "greco antico", + "gsw": "tedesco svizzero", + "gu": "gujarati", + "guc": "wayuu", + "guz": "gusii", + "gv": "mannese", + "gwi": "gwichʼin", + "ha": "hausa", + "hai": "haida", + "hak": "hakka", + "haw": "hawaiano", + "he": "ebraico", + "hi": "hindi", + "hif": "hindi figiano", + "hil": "ilongo", + "hit": "hittite", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "croato", + "hsb": "alto sorabo", + "hsn": "xiang", + "ht": "haitiano", + "hu": "ungherese", + "hup": "hupa", + "hy": "armeno", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonesiano", + "ie": "interlingue", + "ig": "igbo", + "ii": "sichuan yi", + "ik": "inupiak", + "ilo": "ilocano", + "inh": "ingush", + "io": "ido", + "is": "islandese", + "it": "italiano", + "iu": "inuktitut", + "izh": "ingrico", + "ja": "giapponese", + "jam": "creolo giamaicano", + "jbo": "lojban", + "jgo": "ngamambo", + "jmc": "machame", + "jpr": "giudeo persiano", + "jrb": "giudeo arabo", + "jut": "jutlandico", + "jv": "giavanese", + "ka": "georgiano", + "kaa": "kara-kalpak", + "kab": "cabilo", + "kac": "kachin", + "kaj": "kai", + "kam": "kamba", + "kaw": "kawi", + "kbd": "cabardino", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "capoverdiano", + "kfo": "koro", + "kg": "kongo", + "kgp": "kaingang", + "kha": "khasi", + "kho": "khotanese", + "khq": "koyra chiini", + "khw": "khowar", + "ki": "kikuyu", + "kiu": "kirmanjki", + "kj": "kuanyama", + "kk": "kazako", + "kkj": "kako", + "kl": "groenlandese", + "kln": "kalenjin", + "km": "khmer", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "coreano", + "koi": "permiaco", + "kok": "konkani", + "kos": "kosraean", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karachay-Balkar", + "krl": "careliano", + "kru": "kurukh", + "ks": "kashmiri", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "coloniese", + "ku": "curdo", + "kum": "kumyk", + "kut": "kutenai", + "kv": "komi", + "kw": "cornico", + "ky": "chirghiso", + "la": "latino", + "lad": "giudeo-spagnolo", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "lussemburghese", + "lez": "lesgo", + "lfn": "Lingua Franca Nova", + "lg": "ganda", + "li": "limburghese", + "lij": "ligure", + "liv": "livone", + "lkt": "lakota", + "lmo": "lombardo", + "ln": "lingala", + "lo": "lao", + "lol": "lolo bantu", + "loz": "lozi", + "lrc": "luri settentrionale", + "lt": "lituano", + "ltg": "letgallo", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "lushai", + "luy": "luyia", + "lv": "lettone", + "lzh": "cinese classico", + "lzz": "laz", + "mad": "madurese", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makasar", + "man": "mandingo", + "mas": "masai", + "mde": "maba", + "mdf": "moksha", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "creolo mauriziano", + "mg": "malgascio", + "mga": "irlandese medio", + "mgh": "makhuwa-meetto", + "mgo": "meta’", + "mh": "marshallese", + "mi": "maori", + "mic": "micmac", + "min": "menangkabau", + "mk": "macedone", + "ml": "malayalam", + "mn": "mongolo", + "mnc": "manchu", + "mni": "manipuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "marathi", + "mrj": "mari occidentale", + "ms": "malese", + "mt": "maltese", + "mua": "mundang", + "mul": "multilingua", + "mus": "creek", + "mwl": "mirandese", + "mwr": "marwari", + "mwv": "mentawai", + "my": "birmano", + "mye": "myene", + "myv": "erzya", + "mzn": "mazandarani", + "na": "nauru", + "nan": "min nan", + "nap": "napoletano", + "naq": "nama", + "nb": "norvegese bokmÃ¥l", + "nd": "ndebele del nord", + "nds": "basso tedesco", + "nds_NL": "basso tedesco olandese", + "ne": "nepalese", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niue", + "njo": "ao", + "nl": "olandese", + "nl_BE": "fiammingo", + "nmg": "kwasio", + "nn": "norvegese nynorsk", + "nnh": "ngiemboon", + "no": "norvegese", + "nog": "nogai", + "non": "norse antico", + "nov": "novial", + "nqo": "n’ko", + "nr": "ndebele del sud", + "nso": "sotho del nord", + "nus": "nuer", + "nv": "navajo", + "nwc": "newari classico", + "ny": "nyanja", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzima", + "oc": "occitano", + "oj": "ojibwa", + "om": "oromo", + "or": "oriya", + "os": "ossetico", + "osa": "osage", + "ota": "turco ottomano", + "pa": "punjabi", + "pag": "pangasinan", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palau", + "pcd": "piccardo", + "pcm": "pidgin nigeriano", + "pdc": "tedesco della Pennsylvania", + "peo": "persiano antico", + "pfl": "tedesco palatino", + "phn": "fenicio", + "pi": "pali", + "pl": "polacco", + "pms": "piemontese", + "pnt": "pontico", + "pon": "ponape", + "prg": "prussiano", + "pro": "provenzale antico", + "ps": "pashto", + "pt": "portoghese", + "pt_BR": "portoghese brasiliano", + "pt_PT": "portoghese europeo", + "qu": "quechua", + "quc": "k’iche’", + "qug": "quechua dell’altopiano del Chimborazo", + "raj": "rajasthani", + "rap": "rapanui", + "rar": "rarotonga", + "rgn": "romagnolo", + "rif": "tarifit", + "rm": "romancio", + "rn": "rundi", + "ro": "rumeno", + "ro_MD": "moldavo", + "rof": "rombo", + "rom": "romani", + "root": "root", + "rtm": "rotumano", + "ru": "russo", + "rue": "ruteno", + "rug": "roviana", + "rup": "arumeno", + "rw": "kinyarwanda", + "rwk": "rwa", + "sa": "sanscrito", + "sad": "sandawe", + "sah": "yakut", + "sam": "aramaico samaritano", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "saz": "saurashtra", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardo", + "scn": "siciliano", + "sco": "scozzese", + "sd": "sindhi", + "sdc": "sassarese", + "sdh": "curdo meridionale", + "se": "sami del nord", + "see": "seneca", + "seh": "sena", + "sei": "seri", + "sel": "selkup", + "ses": "koyraboro senni", + "sg": "sango", + "sga": "irlandese antico", + "sgs": "samogitico", + "sh": "serbo-croato", + "shi": "tashelhit", + "shn": "shan", + "shu": "arabo ciadiano", + "si": "singalese", + "sid": "sidamo", + "sk": "slovacco", + "sl": "sloveno", + "sli": "tedesco slesiano", + "sly": "selayar", + "sm": "samoano", + "sma": "sami del sud", + "smj": "sami di Lule", + "smn": "sami di Inari", + "sms": "sami skolt", + "sn": "shona", + "snk": "soninke", + "so": "somalo", + "sog": "sogdiano", + "sq": "albanese", + "sr": "serbo", + "srn": "sranan tongo", + "srr": "serer", + "ss": "swati", + "ssy": "saho", + "st": "sotho del sud", + "stq": "saterfriesisch", + "su": "sundanese", + "suk": "sukuma", + "sus": "susu", + "sux": "sumero", + "sv": "svedese", + "sw": "swahili", + "sw_CD": "swahili del Congo", + "swb": "comoriano", + "syc": "siriaco classico", + "syr": "siriaco", + "szl": "slesiano", + "ta": "tamil", + "tcy": "tulu", + "te": "telugu", + "tem": "temne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tagico", + "th": "thai", + "ti": "tigrino", + "tig": "tigre", + "tiv": "tiv", + "tk": "turcomanno", + "tkl": "tokelau", + "tkr": "tsakhur", + "tl": "tagalog", + "tlh": "klingon", + "tli": "tlingit", + "tly": "taliscio", + "tmh": "tamashek", + "tn": "tswana", + "to": "tongano", + "tog": "nyasa del Tonga", + "tpi": "tok pisin", + "tr": "turco", + "tru": "turoyo", + "trv": "taroko", + "ts": "tsonga", + "tsd": "zaconico", + "tsi": "tsimshian", + "tt": "tataro", + "ttt": "tat islamico", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "ci", + "twq": "tasawaq", + "ty": "taitiano", + "tyv": "tuvinian", + "tzm": "tamazight", + "udm": "udmurt", + "ug": "uiguro", + "uga": "ugaritico", + "uk": "ucraino", + "umb": "mbundu", + "und": "lingua imprecisata", + "ur": "urdu", + "uz": "usbeco", + "vai": "vai", + "ve": "venda", + "vec": "veneto", + "vep": "vepso", + "vi": "vietnamita", + "vls": "fiammingo occidentale", + "vo": "volapük", + "vot": "voto", + "vro": "võro", + "vun": "vunjo", + "wa": "vallone", + "wae": "walser", + "wal": "walamo", + "war": "waray", + "was": "washo", + "wbp": "warlpiri", + "wo": "wolof", + "wuu": "wu", + "xal": "kalmyk", + "xh": "xhosa", + "xmf": "mengrelio", + "xog": "soga", + "yao": "yao (bantu)", + "yap": "yapese", + "yav": "yangben", + "ybb": "yemba", + "yi": "yiddish", + "yo": "yoruba", + "yrl": "nheengatu", + "yue": "cantonese", + "za": "zhuang", + "zap": "zapotec", + "zbl": "blissymbol", + "zea": "zelandese", + "zen": "zenaga", + "zgh": "tamazight del Marocco standard", + "zh": "cinese", + "zh_Hans": "cinese semplificato", + "zh_Hant": "cinese tradizionale", + "zu": "zulu", + "zun": "zuni", + "zxx": "nessun contenuto linguistico", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/iw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/iw.json new file mode 100644 index 0000000000000000000000000000000000000000..66cfacc7b06ab6af69db148e993f4ba4a6cb1ffc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/iw.json @@ -0,0 +1,524 @@ +{ + "Version": "2.1.29.27", + "Names": { + "aa": "×פ×רית", + "ab": "×בחזית", + "ace": "×כינזית", + "ach": "×קולי", + "ada": "×דנמה", + "ady": "×דיגית", + "ae": "×בסטן", + "af": "×פריק×נס", + "afh": "×פריהילי", + "agq": "××”×™×™×", + "ain": "×ינו", + "ak": "××§×ן", + "akk": "×כדית", + "ale": "×ל×וט", + "alt": "×לט××™ דרומית", + "am": "×מהרית", + "an": "×ר×גונית", + "ang": "×נגלית עתיקה", + "anp": "×נג׳יקה", + "ar": "ערבית", + "ar_001": "ערבית ספרותית", + "arc": "×רמית", + "arn": "×ר×וקנית", + "arp": "×רפהו", + "arw": "×רוו××§", + "as": "×ס×מית", + "asa": "×סו", + "ast": "×סטורית", + "av": "×ב×רית", + "awa": "×וו×דית", + "ay": "×יימ×רית", + "az": "×זרית", + "ba": "בשקירית", + "bal": "ב×לוצ׳י", + "ban": "בלינזית", + "bar": "בוו×רית", + "bas": "בס××", + "bax": "במו×", + "bbj": "גומ×לה", + "be": "בל×רוסית", + "bej": "בז׳ה", + "bem": "במבה", + "bez": "בנה", + "bfd": "ב×פוט", + "bg": "בולגרית", + "bgn": "ב×לוצ׳י מערבית", + "bho": "בוג׳פורי", + "bi": "ביסלמה", + "bik": "ביקול", + "bin": "ביני", + "bkm": "קו×", + "bla": "סיקסיקה", + "bm": "במב×רה", + "bn": "בנגלית", + "bo": "טיבטית", + "br": "ברטונית", + "bra": "בר×ג׳", + "brx": "בודו", + "bs": "בוסנית", + "bss": "×קוסה", + "bua": "בורי×ט", + "bug": "בוגינזית", + "bum": "בולו", + "byn": "בלין", + "byv": "מדומבה", + "ca": "קטל×נית", + "cad": "×§×דו", + "car": "×§×ריב", + "cay": "×§×יוגה", + "cch": "×טס×", + "ce": "צ׳צ׳נית", + "ceb": "קבו×נו", + "cgg": "צ׳יגה", + "ch": "צ׳מורו", + "chb": "צ׳יבצ׳ה", + "chg": "צ׳××’×ט××™", + "chk": "צ׳וקסה", + "chm": "מ×רי", + "chn": "ניב צ׳ינוק", + "cho": "צ׳וקט×ו", + "chp": "צ׳יפווי×ן", + "chr": "צ׳רוקי", + "chy": "ש×יין", + "ckb": "כורדית סור×נית", + "co": "קורסיקנית", + "cop": "קופטית", + "cr": "קרי", + "crh": "טטרית של קרי×", + "crs": "קרי×ולית (סיישל)", + "cs": "צ׳כית", + "csb": "קשובית", + "cu": "סל×בית כנסייתית עתיקה", + "cv": "צ׳וב×ש", + "cy": "וולשית", + "da": "דנית", + "dak": "דקוטה", + "dar": "דרגווה", + "dav": "ט×יטה", + "de": "גרמנית", + "de_CH": "גרמנית (שוויץ)", + "del": "דל×וור", + "den": "סל×בית", + "dgr": "דוגריב", + "din": "דינקה", + "dje": "×–×רמה", + "doi": "דוגרי", + "dsb": "סורבית נמוכה", + "dua": "דו×לה", + "dum": "הולנדית תיכונה", + "dv": "דיבהי", + "dyo": "ג׳ולה פונית", + "dyu": "דיולה", + "dz": "דזונקה", + "dzg": "דז×× ×’×”", + "ebu": "×מבו", + "ee": "×ווה", + "efi": "×פיק", + "egy": "מצרית עתיקה", + "eka": "×קיוק", + "el": "יוונית", + "elx": "עילמית", + "en": "×נגלית", + "en_GB": "×נגלית (בריטניה)", + "enm": "×נגלית תיכונה", + "eo": "×ספרנטו", + "es": "ספרדית", + "et": "×סטונית", + "eu": "בסקית", + "ewo": "×וונדו", + "fa": "פרסית", + "fan": "פנג", + "fat": "פ×נטי", + "ff": "פולה", + "fi": "פינית", + "fil": "פיליפינית", + "fj": "פיג׳ית", + "fo": "פ×רו×זית", + "fon": "פון", + "fr": "צרפתית", + "fr_CH": "צרפתית (שוויץ)", + "frm": "צרפתית תיכונה", + "fro": "צרפתית עתיקה", + "frr": "פריזית צפונית", + "frs": "פריזית מזרחית", + "fur": "פריולית", + "fy": "פריזית מערבית", + "ga": "×ירית", + "gaa": "×’×", + "gag": "×’×’×וזית", + "gan": "סינית ×’×ן", + "gay": "×’×יו", + "gba": "גב××™×”", + "gd": "×’×לית סקוטית", + "gez": "×’×¢×–", + "gil": "קיריבטית", + "gl": "גליצי×נית", + "gmh": "גרמנית בינונית-גבוהה", + "gn": "גו×רני", + "goh": "גרמנית עתיקה גבוהה", + "gon": "גונדי", + "gor": "גורונט×לו", + "got": "גותית", + "grb": "גרבו", + "grc": "יוונית עתיקה", + "gsw": "גרמנית שוויצרית", + "gu": "גוג׳×רטי", + "guz": "גוסי", + "gv": "מ×נית", + "gwi": "גוויצ׳ן", + "ha": "×”×וסה", + "hai": "×”×ידה", + "hak": "סינית ×”××§×”", + "haw": "הוו×ית", + "he": "עברית", + "hi": "הינדי", + "hil": "היליג×ינון", + "hit": "חתית", + "hmn": "המונג", + "ho": "הירי מוטו", + "hr": "קרו×טית", + "hsb": "סורבית גבוהה", + "hsn": "סינית שי×× ×’", + "ht": "קרי×ולית (×”×יטי)", + "hu": "הונגרית", + "hup": "הופה", + "hy": "×רמנית", + "hz": "הררו", + "ia": "â€×ינטרלינגו××”", + "iba": "×יב×ן", + "ibb": "×יביביו", + "id": "×ינדונזית", + "ie": "×ינטרלינגה", + "ig": "×יגבו", + "ii": "סצ׳ו×ן ×™×™", + "ik": "×ינופי××§", + "ilo": "×ילוקו", + "inh": "×ינגושית", + "io": "×ידו", + "is": "×יסלנדית", + "it": "×יטלקית", + "iu": "×ינוקטיטוט", + "ja": "יפנית", + "jbo": "לוז׳ב×ן", + "jgo": "נגומבה", + "jmc": "מ××§×מה", + "jpr": "פרסית יהודית", + "jrb": "ערבית יהודית", + "jv": "×™×וו×ית", + "ka": "×’×ורגית", + "kaa": "×§×ר×-קלפ××§", + "kab": "קבילה", + "kac": "קצ׳ין", + "kaj": "ג׳ו", + "kam": "קמבה", + "kaw": "×§×ווי", + "kbd": "קברדית", + "kbl": "קנמבו", + "kcg": "טי×פ", + "kde": "מקונדה", + "kea": "×§×בוורדי×נו", + "kfo": "קורו", + "kg": "קונגו", + "kha": "×§×”×סי", + "kho": "קוט×נזית", + "khq": "קוירה צ׳יני", + "ki": "קיקויו", + "kj": "קו×× ×™×מה", + "kk": "קזחית", + "kkj": "×§×קו", + "kl": "גרינלנדית", + "kln": "קלנג׳ין", + "km": "חמרית", + "kmb": "קימבונדו", + "kn": "×§× ×דה", + "ko": "קורי×נית", + "koi": "קומי-פרמי×קית", + "kok": "קונק×× ×™", + "kos": "קוסר××™×ן", + "kpe": "קפלה", + "kr": "×§×נורי", + "krc": "קר×צ׳י-בלקר", + "krl": "×§×רלית", + "kru": "קורוק", + "ks": "קשמירית", + "ksb": "שמב×לה", + "ksf": "ב×פיה", + "ksh": "קולוני×ן", + "ku": "כורדית", + "kum": "קומיקית", + "kut": "קוטנ××™", + "kv": "קומי", + "kw": "קורנית", + "ky": "קירגיזית", + "la": "לטינית", + "lad": "לדינו", + "lag": "ל×× ×’×™", + "lah": "לנדה", + "lam": "למבה", + "lb": "לוקסמבורגית", + "lez": "לזגית", + "lg": "×’×נדה", + "li": "לימבורגית", + "lkt": "לקוטה", + "ln": "לינגלה", + "lo": "ל×ו", + "lol": "מונגו", + "loz": "לוזית", + "lrc": "לורית צפונית", + "lt": "ליט×ית", + "lu": "לובה-קטנגה", + "lua": "לובה-לולו××”", + "lui": "לויסנו", + "lun": "לונדה", + "luo": "לו×ו", + "lus": "מיזו", + "luy": "לויה", + "lv": "לטבית", + "mad": "מדורזית", + "maf": "מ×פ××”", + "mag": "מ××’×הית", + "mai": "מ×יטילית", + "mak": "מקס×ר", + "man": "מנדינגו", + "mas": "מס×ית", + "mde": "מ×ב×", + "mdf": "מוקשה", + "mdr": "מנד×ר", + "men": "מנדה", + "mer": "מרו", + "mfe": "קרי×ולית מ×וריצי×נית", + "mg": "מלגשית", + "mga": "×ירית תיכונה", + "mgh": "מ×קוו××” מטו", + "mgo": "מט×", + "mh": "מרשלית", + "mi": "מ×ורית", + "mic": "מיקמק", + "min": "מיננגקב×ו", + "mk": "מקדונית", + "ml": "מלי×ל××", + "mn": "מונגולית", + "mnc": "מנצ׳ו", + "mni": "מניפורית", + "moh": "מוהוק", + "mos": "מוסי", + "mr": "מר×טהי", + "ms": "מל×ית", + "mt": "מלטית", + "mua": "מונד×× ×’", + "mul": "מספר שפות", + "mus": "קריק", + "mwl": "מירנדזית", + "mwr": "מרוו×רי", + "my": "בורמזית", + "mye": "מ×יין", + "myv": "×רזיה", + "mzn": "מ××–×נדר×× ×™", + "na": "× ×ורית", + "nan": "סינית מין × ×ן", + "nap": "נפוליטנית", + "naq": "× ×מה", + "nb": "נורווגית ספרותית", + "nd": "נדבלה צפונית", + "nds": "גרמנית תחתית", + "nds_NL": "סקסונית תחתית", + "ne": "נפ×לית", + "new": "נוו×רי", + "ng": "נדונגה", + "nia": "× ×™×ס", + "niu": "ניו×ן", + "nl": "הולנדית", + "nl_BE": "פלמית", + "nmg": "קוו×סיו", + "nn": "נורווגית חדשה", + "nnh": "× ×’×™×מבון", + "no": "נורווגית", + "nog": "נוג××™", + "non": "â€× ×•רדית עתיקה", + "nqo": "נ׳קו", + "nr": "נדבלה דרומית", + "nso": "סותו צפונית", + "nus": "נו×ר", + "nv": "× ×וו×חו", + "nwc": "נוו×רית קל×סית", + "ny": "× ×™×נג׳ה", + "nym": "× ×™×מווזי", + "nyn": "× ×™×נקולה", + "nyo": "ניורו", + "nzi": "נזימה", + "oc": "×וקסיטנית", + "oj": "×וג׳יבווה", + "om": "×ורומו", + "or": "×וריה", + "os": "×וסטית", + "osa": "×וסג׳", + "ota": "טורקית עותומנית", + "pa": "פנג׳×בי", + "pag": "פנגסינ×ן", + "pal": "פל×בי", + "pam": "פמפ×× ×™×”", + "pap": "פפי×מנטו", + "pau": "פלוו×ן", + "pcm": "ניגרית פידג׳ית", + "peo": "פרסית עתיקה", + "phn": "פיניקית", + "pi": "פ×לי", + "pl": "פולנית", + "pon": "פונפי×ן", + "prg": "פרוסית", + "pro": "פרובנס×ל עתיקה", + "ps": "פ×שטו", + "pt": "פורטוגזית", + "qu": "קצ׳ו××”", + "quc": "קיצ׳ה", + "raj": "ר×ג׳סט×× ×™", + "rap": "רפ×נוי", + "rar": "ררוטונג×ן", + "rm": "רומ×נש", + "rn": "קירונדי", + "ro": "רומנית", + "ro_MD": "מולדבית", + "rof": "רומבו", + "rom": "רומ×× ×™", + "root": "רוט", + "ru": "רוסית", + "rup": "×רומנית", + "rw": "קנירו×נדית", + "rwk": "ר×ווה", + "sa": "סנסקריט", + "sad": "סנד×ווה", + "sah": "ס××—×”", + "sam": "×רמית שומרונית", + "saq": "סמבורו", + "sas": "ס×סק", + "sat": "ס×נט×לי", + "sba": "נגמב××™", + "sbp": "ס×נגו", + "sc": "סרדינית", + "scn": "סיצילי×נית", + "sco": "סקוטית", + "sd": "סינדהית", + "sdh": "כורדית דרומית", + "se": "סמי צפונית", + "see": "סנקה", + "seh": "סנה", + "sel": "סלקופ", + "ses": "קויר×בורו סני", + "sg": "סנגו", + "sga": "×ירית עתיקה", + "sh": "סרבו-קרו×טית", + "shi": "שילה", + "shn": "ש×ן", + "shu": "ערבית צ׳×דית", + "si": "סינהלה", + "sid": "סיד×מו", + "sk": "סלובקית", + "sl": "סלובנית", + "sm": "סמו×ית", + "sma": "ס×מי דרומית", + "smj": "לולה ס×מי", + "smn": "××™× ×רי ס×מי", + "sms": "סקולט ס×מי", + "sn": "שונה", + "snk": "סונינקה", + "so": "סומלית", + "sog": "סוגדי×ן", + "sq": "×לבנית", + "sr": "סרבית", + "srn": "סרנ×ן טונגו", + "srr": "סרר", + "ss": "ס×ווזי", + "ssy": "ס×הו", + "st": "סותו דרומית", + "su": "סונדנזית", + "suk": "סוקומה", + "sus": "סוסו", + "sux": "שומרית", + "sv": "שוודית", + "sw": "סווהילי", + "sw_CD": "סווהילי קונגו", + "syc": "סירית קל×סית", + "syr": "סורית", + "ta": "טמילית", + "te": "טלוגו", + "tem": "טימנה", + "teo": "טסו", + "ter": "טרנו", + "tet": "טטו×", + "tg": "טג׳יקית", + "th": "ת×ית", + "ti": "תיגרינית", + "tig": "טיגרית", + "tiv": "טיב", + "tk": "טורקמנית", + "tkl": "טוקל×ו", + "tl": "ט××’×לוג", + "tlh": "קלינגון", + "tli": "טלינגיט", + "tmh": "טמ×שק", + "tn": "סוו×× ×”", + "to": "טונג×ית", + "tog": "× ×™×סה טונגה", + "tpi": "טוק פיסין", + "tr": "טורקית", + "trv": "טרוקו", + "ts": "טסונגה", + "tsi": "טסימשי×ן", + "tt": "טטרית", + "tum": "טומבוקה", + "tvl": "טוב×לו", + "tw": "טווי", + "twq": "טסוו××§", + "ty": "טהיטית", + "tyv": "טובינית", + "tzm": "טמזייט של מרכז מרוקו", + "udm": "×ודמורט", + "ug": "×ויגור", + "uga": "×וגריתית", + "uk": "×וקר×ינית", + "umb": "×ומבונדו", + "und": "שפה ×œ× ×™×“×•×¢×”", + "ur": "×ורדו", + "uz": "×וזבקית", + "vai": "וו××™", + "ve": "וונדה", + "vi": "וי×טנמית", + "vo": "â€×•ול×פיק", + "vot": "ווטיק", + "vun": "וונג׳ו", + "wa": "וו×לון", + "wae": "וו×לסר", + "wal": "וולי×טה", + "war": "וור××™", + "was": "וו×שו", + "wbp": "וורלפירי", + "wo": "וולוף", + "wuu": "סינית וו", + "xal": "קלמיקית", + "xh": "קוסה", + "xog": "סוגה", + "yao": "×™×ו", + "yap": "×™×פזית", + "yav": "×™×נגבן", + "ybb": "ימבה", + "yi": "יידיש", + "yo": "יורובה", + "yue": "קנטונזית", + "za": "זו×× ×’", + "zap": "×–×פוטק", + "zbl": "בליסימבולס", + "zen": "×–× ××’×”", + "zgh": "תמזיע׳ת מרוק×ית תקנית", + "zh": "סינית", + "zh_Hans": "סינית פשוטה", + "zh_Hant": "סינית מסורתית", + "zu": "זולו", + "zun": "זוני", + "zxx": "×œ×œ× ×ª×•×›×Ÿ לשוני", + "zza": "×–××–×" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ja.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ja.json new file mode 100644 index 0000000000000000000000000000000000000000..95a2ff27d36b623c25f5f8bc5af51fbab2b02c1a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ja.json @@ -0,0 +1,612 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "アファル語", + "ab": "アブãƒã‚ºèªž", + "ace": "ã‚¢ãƒã‚§èªž", + "ach": "ã‚¢ãƒãƒ§ãƒªèªž", + "ada": "アダングメ語", + "ady": "アディゲ語", + "ae": "アヴェスタ語", + "aeb": "ãƒãƒ¥ãƒ‹ã‚¸ã‚¢ãƒ»ã‚¢ãƒ©ãƒ“ア語", + "af": "アフリカーンス語", + "afh": "アフリヒリ語", + "agq": "アゲム語", + "ain": "アイヌ語", + "ak": "アカン語", + "akk": "アッカド語", + "akz": "アラãƒãƒžèªž", + "ale": "アレウト語", + "aln": "ゲグ・アルãƒãƒ‹ã‚¢èªž", + "alt": "å—アルタイ語", + "am": "アムãƒãƒ©èªž", + "an": "アラゴン語", + "ang": "å¤è‹±èªž", + "anp": "アンギカ語", + "ar": "アラビア語", + "ar_001": "ç¾ä»£æ¨™æº–アラビア語", + "arc": "アラム語", + "arn": "マプãƒã‚§èªž", + "aro": "アラオナ語", + "arp": "アラパホー語", + "arq": "アルジェリア・アラビア語", + "arw": "アラワク語", + "ary": "モロッコ・アラビア語", + "arz": "エジプト・アラビア語", + "as": "アッサム語", + "asa": "アス語", + "ase": "アメリカ手話", + "ast": "アストゥリアス語", + "av": "アヴァル語", + "avk": "コタヴァ", + "awa": "アワディー語", + "ay": "アイマラ語", + "az": "アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³èªž", + "ba": "ãƒã‚·ã‚­ãƒ¼ãƒ«èªž", + "bal": "ãƒãƒ«ãƒ¼ãƒãƒ¼èªž", + "ban": "ãƒãƒªèªž", + "bar": "ãƒã‚¤ã‚¨ãƒ«ãƒ³ãƒ»ã‚ªãƒ¼ã‚¹ãƒˆãƒªã‚¢èªž", + "bas": "ãƒã‚µèªž", + "bax": "ãƒãƒ ãƒ³èªž", + "bbc": "トãƒãƒ»ãƒã‚¿ã‚¯èªž", + "bbj": "ゴーマラ語", + "be": "ベラルーシ語", + "bej": "ベジャ語", + "bem": "ベンãƒèªž", + "bew": "ベタウィ語", + "bez": "ベナ語", + "bfd": "ãƒãƒ•ット語", + "bfq": "ãƒãƒ€ã‚¬èªž", + "bg": "ブルガリア語", + "bgn": "西ãƒãƒ­ãƒ¼ãƒãƒ¼èªž", + "bho": "ボージュプリー語", + "bi": "ビスラマ語", + "bik": "ビコル語", + "bin": "ビニ語", + "bjn": "ãƒãƒ³ã‚¸ãƒ£ãƒ«èªž", + "bkm": "コム語", + "bla": "シクシカ語", + "bm": "ãƒãƒ³ãƒãƒ©èªž", + "bn": "ベンガル語", + "bo": "ãƒãƒ™ãƒƒãƒˆèªž", + "bpy": "ビシュヌプリヤ・マニプリ語", + "bqi": "ãƒãƒ•ティヤーリー語", + "br": "ブルトン語", + "bra": "ブラジ語", + "brh": "ブラフイ語", + "brx": "ボド語", + "bs": "ボスニア語", + "bss": "アコース語", + "bua": "ブリヤート語", + "bug": "ブギ語", + "bum": "ブル語", + "byn": "ビリン語", + "byv": "メドゥンãƒèªž", + "ca": "カタロニア語", + "cad": "カドー語", + "car": "カリブ語", + "cay": "カユーガ語", + "cch": "ãƒãƒ£ãƒ¯ã‚¤èªž", + "ce": "ãƒã‚§ãƒã‚§ãƒ³èªž", + "ceb": "セブアノ語", + "cgg": "ãƒã‚¬èªž", + "ch": "ãƒãƒ£ãƒ¢ãƒ­èªž", + "chb": "ãƒãƒ–ãƒãƒ£èªž", + "chg": "ãƒãƒ£ã‚¬ã‚¿ã‚¤èªž", + "chk": "ãƒãƒ¥ãƒ¼ã‚¯èªž", + "chm": "マリ語", + "chn": "ãƒãƒŒãƒ¼ã‚¯æ··æˆèªž", + "cho": "ãƒãƒ§ã‚¯ãƒˆãƒ¼èªž", + "chp": "ãƒãƒšãƒ¯ã‚¤ã‚¢ãƒ³èªž", + "chr": "ãƒã‚§ãƒ­ã‚­ãƒ¼èªž", + "chy": "シャイアン語", + "ckb": "クルド語(ソラニー)", + "co": "コルシカ語", + "cop": "コプト語", + "cps": "カピス語", + "cr": "クリー語", + "crh": "クリミア・タタール語", + "crs": "セーシェル・クレオール語", + "cs": "ãƒã‚§ã‚³èªž", + "csb": "カシューブ語", + "cu": "教会スラブ語", + "cv": "ãƒãƒ¥ãƒ´ã‚¡ã‚·èªž", + "cy": "ウェールズ語", + "da": "デンマーク語", + "dak": "ダコタ語", + "dar": "ダルガン語", + "dav": "タイタ語", + "de": "ドイツ語", + "de_CH": "標準ドイツ語 (スイス)", + "del": "デラウェア語", + "den": "スレイビー語", + "dgr": "ドグリブ語", + "din": "ディンカ語", + "dje": "ザルマ語", + "doi": "ドーグリー語", + "dsb": "低地ソルブ語", + "dtp": "中央ドゥスン語", + "dua": "ドゥアラ語", + "dum": "中世オランダ語", + "dv": "ディベヒ語", + "dyo": "ジョラï¼ãƒ•ォニィ語", + "dyu": "ジュラ語", + "dz": "ゾンカ語", + "dzg": "ダザガ語", + "ebu": "エンブ語", + "ee": "エウェ語", + "efi": "エフィク語", + "egl": "エミリア語", + "egy": "å¤ä»£ã‚¨ã‚¸ãƒ—ト語", + "eka": "エカジュク語", + "el": "ギリシャ語", + "elx": "エラム語", + "en": "英語", + "en_AU": "オーストラリア英語", + "en_CA": "カナダ英語", + "en_GB": "イギリス英語", + "en_US": "アメリカ英語", + "enm": "中英語", + "eo": "エスペラント語", + "es": "スペイン語", + "es_ES": "スペイン語 (イベリアåŠå³¶)", + "esu": "中央アラスカ・ユピック語", + "et": "エストニア語", + "eu": "ãƒã‚¹ã‚¯èªž", + "ewo": "エウォンド語", + "ext": "エストレマドゥーラ語", + "fa": "ペルシア語", + "fan": "ファング語", + "fat": "ファンティー語", + "ff": "フラ語", + "fi": "フィンランド語", + "fil": "フィリピノ語", + "fit": "トルãƒãƒ€ãƒ¼ãƒ«ãƒ»ãƒ•ィンランド語", + "fj": "フィジー語", + "fo": "フェロー語", + "fon": "フォン語", + "fr": "フランス語", + "frc": "ケイジャン・フランス語", + "frm": "中期フランス語", + "fro": "å¤ãƒ•ランス語", + "frp": "アルピタン語", + "frr": "北フリジア語", + "frs": "æ±ãƒ•リジア語", + "fur": "フリウリ語", + "fy": "西フリジア語", + "ga": "アイルランド語", + "gaa": "ガ語", + "gag": "ガガウズ語", + "gan": "贛語", + "gay": "ガヨ語", + "gba": "ãƒãƒ¤èªž", + "gbz": "ダリー語(ゾロアスター教)", + "gd": "スコットランド・ゲール語", + "gez": "ゲエズ語", + "gil": "キリãƒã‚¹èªž", + "gl": "ガリシア語", + "glk": "ギラキ語", + "gmh": "中高ドイツ語", + "gn": "グアラニー語", + "goh": "å¤é«˜ãƒ‰ã‚¤ãƒ„語", + "gom": "ゴア・コンカニ語", + "gon": "ゴーンディー語", + "gor": "ゴロンタロ語", + "got": "ゴート語", + "grb": "グレボ語", + "grc": "å¤ä»£ã‚®ãƒªã‚·ãƒ£èªž", + "gsw": "スイスドイツ語", + "gu": "グジャラート語", + "guc": "ワユ語", + "gur": "フラフラ語", + "guz": "グシイ語", + "gv": "マン島語", + "gwi": "グウィッãƒãƒ³èªž", + "ha": "ãƒã‚¦ã‚µèªž", + "hai": "ãƒã‚¤ãƒ€èªž", + "hak": "客家語", + "haw": "ãƒãƒ¯ã‚¤èªž", + "he": "ヘブライ語", + "hi": "ヒンディー語", + "hif": "フィジー・ヒンディー語", + "hil": "ヒリガイノン語", + "hit": "ヒッタイト語", + "hmn": "フモン語", + "ho": "ヒリモツ語", + "hr": "クロアãƒã‚¢èªž", + "hsb": "高地ソルブ語", + "hsn": "湘語", + "ht": "ãƒã‚¤ãƒèªž", + "hu": "ãƒãƒ³ã‚¬ãƒªãƒ¼èªž", + "hup": "フパ語", + "hy": "アルメニア語", + "hz": "ヘレロ語", + "ia": "インターリングア", + "iba": "イãƒãƒ³èªž", + "ibb": "イビビオ語", + "id": "インドãƒã‚·ã‚¢èªž", + "ie": "インターリング", + "ig": "イボ語", + "ii": "å››å·ã‚¤èªž", + "ik": "イヌピアック語", + "ilo": "イロカノ語", + "inh": "イングーシ語", + "io": "イド語", + "is": "アイスランド語", + "it": "イタリア語", + "iu": "イヌクウティトット語", + "izh": "イングリア語", + "ja": "日本語", + "jam": "ジャマイカ・クレオール語", + "jbo": "ロジãƒãƒ³èªž", + "jgo": "ンゴンãƒèªž", + "jmc": "マãƒãƒ£ãƒ¡èªž", + "jpr": "ユダヤ・ペルシア語", + "jrb": "ユダヤ・アラビア語", + "jut": "ユトランド語", + "jv": "ジャワ語", + "ka": "ジョージア語", + "kaa": "カラカルパク語", + "kab": "カビル語", + "kac": "ã‚«ãƒãƒ³èªž", + "kaj": "カジェ語", + "kam": "カンãƒèªž", + "kaw": "カウィ語", + "kbd": "ã‚«ãƒãƒ«ãƒ‰èªž", + "kbl": "ã‚«ãƒãƒ³ãƒ–語", + "kcg": "カタブ語", + "kde": "マコンデ語", + "kea": "カーボベルデ・クレオール語", + "ken": "ニャン語", + "kfo": "コロ語", + "kg": "コンゴ語", + "kgp": "カインガング語", + "kha": "カシ語", + "kho": "コータン語", + "khq": "コイラ・ãƒãƒ¼ãƒ‹èªž", + "khw": "コワール語", + "ki": "キクユ語", + "kiu": "キルマンジュキ語", + "kj": "クワニャマ語", + "kk": "カザフ語", + "kkj": "カコ語", + "kl": "グリーンランド語", + "kln": "カレンジン語", + "km": "クメール語", + "kmb": "キンブンド語", + "kn": "カンナダ語", + "ko": "韓国語", + "koi": "コミ・ペルミャク語", + "kok": "コンカニ語", + "kos": "コスラエ語", + "kpe": "クペレ語", + "kr": "カヌリ語", + "krc": "カラãƒãƒ£ã‚¤ãƒ»ãƒãƒ«ã‚«ãƒ«èªž", + "kri": "クリオ語", + "krj": "キナライア語", + "krl": "カレリア語", + "kru": "クルク語", + "ks": "カシミール語", + "ksb": "サンãƒãƒ¼èªž", + "ksf": "ãƒãƒ•ィア語", + "ksh": "ケルン語", + "ku": "クルド語", + "kum": "クムク語", + "kut": "クテナイ語", + "kv": "コミ語", + "kw": "コーンウォール語", + "ky": "キルギス語", + "la": "ラテン語", + "lad": "ラディノ語", + "lag": "ランギ語", + "lah": "ラフンダー語", + "lam": "ランãƒèªž", + "lb": "ルクセンブルク語", + "lez": "レズギ語", + "lfn": "リングア・フランカ・ノãƒ", + "lg": "ガンダ語", + "li": "リンブルフ語", + "lij": "リグリア語", + "liv": "リヴォニア語", + "lkt": "ラコタ語", + "lmo": "ロンãƒãƒ«ãƒ‰èªž", + "ln": "リンガラ語", + "lo": "ラオ語", + "lol": "モンゴ語", + "loz": "ロジ語", + "lrc": "北ロル語", + "lt": "リトアニア語", + "ltg": "ラトガリア語", + "lu": "ルãƒãƒ»ã‚«ã‚¿ãƒ³ã‚¬èªž", + "lua": "ルãƒãƒ»ãƒ«ãƒ«ã‚¢èªž", + "lui": "ルイセーニョ語", + "lun": "ルンダ語", + "luo": "ルオ語", + "lus": "ルシャイ語", + "luy": "ルヒヤ語", + "lv": "ラトビア語", + "lzh": "漢文", + "lzz": "ラズ語", + "mad": "マドゥラ語", + "maf": "マファ語", + "mag": "マガヒー語", + "mai": "マイティリー語", + "mak": "マカッサル語", + "man": "マンディンゴ語", + "mas": "マサイ語", + "mde": "マãƒèªž", + "mdf": "モクシャ語", + "mdr": "マンダル語", + "men": "メンデ語", + "mer": "メル語", + "mfe": "モーリシャス・クレオール語", + "mg": "マダガスカル語", + "mga": "中期アイルランド語", + "mgh": "マクア・ミート語", + "mgo": "メタ語", + "mh": "マーシャル語", + "mi": "マオリ語", + "mic": "ミクマク語", + "min": "ミナンカãƒã‚¦èªž", + "mk": "マケドニア語", + "ml": "マラヤーラム語", + "mn": "モンゴル語", + "mnc": "満州語", + "mni": "マニプリ語", + "moh": "モーホーク語", + "mos": "モシ語", + "mr": "マラーティー語", + "mrj": "山地マリ語", + "ms": "マレー語", + "mt": "マルタ語", + "mua": "ムンダン語", + "mul": "複数言語", + "mus": "クリーク語", + "mwl": "ミランダ語", + "mwr": "マールワーリー語", + "mwv": "メンタワイ語", + "my": "ミャンマー語", + "mye": "ミエãƒèªž", + "myv": "エルジャ語", + "mzn": "マーザンダラーン語", + "na": "ナウル語", + "nan": "é–©å—語", + "nap": "ナãƒãƒªèªž", + "naq": "ナマ語", + "nb": "ノルウェー語(ブークモール)", + "nd": "北ンデベレ語", + "nds": "低地ドイツ語", + "ne": "ãƒãƒ‘ール語", + "new": "ãƒãƒ¯ãƒ¼ãƒ«èªž", + "ng": "ンドンガ語", + "nia": "ニアス語", + "niu": "ニウーエイ語", + "njo": "アオ・ナガ語", + "nl": "オランダ語", + "nl_BE": "フレミッシュ語", + "nmg": "クワシオ語", + "nn": "ノルウェー語(ニーノシュク)", + "nnh": "ンジエムブーン語", + "no": "ノルウェー語", + "nog": "ノガイ語", + "non": "å¤ãƒŽãƒ«ãƒ‰èªž", + "nov": "ノヴィアル", + "nqo": "ンコ語", + "nr": "å—ンデベレ語", + "nso": "北部ソト語", + "nus": "ヌエル語", + "nv": "ナãƒãƒ›èªž", + "nwc": "å¤å…¸ãƒãƒ¯ãƒ¼ãƒ«èªž", + "ny": "ニャンジャ語", + "nym": "ニャムウェジ語", + "nyn": "ニャンコレ語", + "nyo": "ニョロ語", + "nzi": "ンゼマ語", + "oc": "オック語", + "oj": "オジブウェー語", + "om": "オロモ語", + "or": "オリヤー語", + "os": "オセット語", + "osa": "オセージ語", + "ota": "オスマントルコ語", + "pa": "パンジャブ語", + "pag": "パンガシナン語", + "pal": "パフラヴィー語", + "pam": "パンパンガ語", + "pap": "パピアメント語", + "pau": "パラオ語", + "pcd": "ピカルディ語", + "pcm": "ナイジェリア・ピジン語", + "pdc": "ペンシルベニア・ドイツ語", + "pdt": "メノナイト低地ドイツ語", + "peo": "å¤ä»£ãƒšãƒ«ã‚·ã‚¢èªž", + "pfl": "プファルツ語", + "phn": "フェニキア語", + "pi": "パーリ語", + "pl": "ãƒãƒ¼ãƒ©ãƒ³ãƒ‰èªž", + "pms": "ピエモンテ語", + "pnt": "ãƒãƒ³ãƒˆã‚¹ãƒ»ã‚®ãƒªã‚·ãƒ£èªž", + "pon": "ãƒãƒ³ãƒšã‚¤èªž", + "prg": "プロシア語", + "pro": "夿œŸãƒ—ロãƒãƒ³ã‚¹èªž", + "ps": "パシュトゥー語", + "pt": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž", + "pt_PT": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (イベリアåŠå³¶)", + "qu": "ケãƒãƒ¥ã‚¢èªž", + "quc": "ã‚­ãƒã‚§èªž", + "qug": "ãƒãƒ³ãƒœãƒ©ã‚½é«˜åœ°ã‚±ãƒãƒ¥ã‚¢èªž", + "raj": "ラージャスターン語", + "rap": "ラパヌイ語", + "rar": "ラロトンガ語", + "rgn": "ロマーニャ語", + "rif": "リーフ語", + "rm": "ロマンシュ語", + "rn": "ルンディ語", + "ro": "ルーマニア語", + "ro_MD": "モルダビア語", + "rof": "ロンボ語", + "rom": "ロマーニー語", + "root": "ルート", + "rtm": "ロツマ語", + "ru": "ロシア語", + "rue": "ルシン語", + "rug": "ロヴィアナ語", + "rup": "アルーマニア語", + "rw": "キニアルワンダ語", + "rwk": "ルワ語", + "sa": "サンスクリット語", + "sad": "サンダウェ語", + "sah": "サãƒèªž", + "sam": "サマリア・アラム語", + "saq": "サンブル語", + "sas": "ササク語", + "sat": "サンターリー語", + "saz": "サウラーシュトラ語", + "sba": "ンガムãƒã‚¤èªž", + "sbp": "サング語", + "sc": "サルデーニャ語", + "scn": "ã‚·ãƒãƒªã‚¢èªž", + "sco": "スコットランド語", + "sd": "シンド語", + "sdc": "サッサリ・サルデーニャ語", + "sdh": "å—部クルド語", + "se": "北サーミ語", + "see": "ã‚»ãƒã‚«èªž", + "seh": "セナ語", + "sei": "セリ語", + "sel": "セリクプ語", + "ses": "コイラボロ・センニ語", + "sg": "サンゴ語", + "sga": "å¤ã‚¢ã‚¤ãƒ«ãƒ©ãƒ³ãƒ‰èªž", + "sgs": "サモギティア語", + "sh": "セルボ・クロアãƒã‚¢èªž", + "shi": "タシルãƒã‚¤ãƒˆèªž", + "shn": "シャン語", + "shu": "ãƒãƒ£ãƒ‰ãƒ»ã‚¢ãƒ©ãƒ“ア語", + "si": "シンãƒãƒ©èªž", + "sid": "シダモ語", + "sk": "スロãƒã‚­ã‚¢èªž", + "sl": "スロベニア語", + "sli": "低シレジア語", + "sly": "スラヤール語", + "sm": "サモア語", + "sma": "å—サーミ語", + "smj": "ルレ・サーミ語", + "smn": "イナリ・サーミ語", + "sms": "スコルト・サーミ語", + "sn": "ショナ語", + "snk": "ソニンケ語", + "so": "ソマリ語", + "sog": "ソグド語", + "sq": "アルãƒãƒ‹ã‚¢èªž", + "sr": "セルビア語", + "srn": "スリナム語", + "srr": "セレル語", + "ss": "スワジ語", + "ssy": "サホ語", + "st": "å—部ソト語", + "stq": "ザーターフリジア語", + "su": "スンダ語", + "suk": "スクマ語", + "sus": "スス語", + "sux": "シュメール語", + "sv": "スウェーデン語", + "sw": "スワヒリ語", + "sw_CD": "コンゴ・スワヒリ語", + "swb": "コモロ語", + "syc": "å¤å…¸ã‚·ãƒªã‚¢èªž", + "syr": "シリア語", + "szl": "シレジア語", + "ta": "タミル語", + "tcy": "トゥル語", + "te": "テルグ語", + "tem": "テムãƒèªž", + "teo": "テソ語", + "ter": "テレーノ語", + "tet": "テトゥン語", + "tg": "タジク語", + "th": "タイ語", + "ti": "ティグリニア語", + "tig": "ティグレ語", + "tiv": "ティブ語", + "tk": "トルクメン語", + "tkl": "トケラウ語", + "tkr": "ツァフル語", + "tl": "タガログ語", + "tlh": "クリンゴン語", + "tli": "トリンギット語", + "tly": "タリシュ語", + "tmh": "タマシェク語", + "tn": "ツワナ語", + "to": "トンガ語", + "tog": "トンガ語(ニアサ)", + "tpi": "トク・ピシン語", + "tr": "トルコ語", + "tru": "トゥロヨ語", + "trv": "タロコ語", + "ts": "ツォンガ語", + "tsd": "ツァコン語", + "tsi": "ãƒãƒ ã‚·ãƒ¥èªž", + "tt": "タタール語", + "ttt": "ムスリム・タタール語", + "tum": "トゥンブカ語", + "tvl": "ツãƒãƒ«èªž", + "tw": "トウィ語", + "twq": "タサワク語", + "ty": "タヒãƒèªž", + "tyv": "トゥヴァ語", + "tzm": "中央アトラス・タマジクト語", + "udm": "ウドムルト語", + "ug": "ウイグル語", + "uga": "ウガリト語", + "uk": "ウクライナ語", + "umb": "ムブンドゥ語", + "und": "è¨€èªžä¸æ˜Ž", + "ur": "ウルドゥー語", + "uz": "ウズベク語", + "vai": "ヴァイ語", + "ve": "ベンダ語", + "vec": "ヴェãƒãƒˆèªž", + "vep": "ヴェプス語", + "vi": "ベトナム語", + "vls": "西フラマン語", + "vmf": "マインフランク語", + "vo": "ヴォラピュク語", + "vot": "ヴォート語", + "vro": "ヴォロ語", + "vun": "ヴンジョ語", + "wa": "ワロン語", + "wae": "ヴァリス語", + "wal": "ウォライタ語", + "war": "ワライ語", + "was": "ワショ語", + "wbp": "ワルピリ語", + "wo": "ウォロフ語", + "wuu": "呉語", + "xal": "カルムイク語", + "xh": "コサ語", + "xmf": "メグレル語", + "xog": "ソガ語", + "yao": "ヤオ語", + "yap": "ヤップ語", + "yav": "ヤンベン語", + "ybb": "イエンãƒèªž", + "yi": "イディッシュ語", + "yo": "ヨルãƒèªž", + "yrl": "ニェエンガトゥ語", + "yue": "広æ±èªž", + "za": "ãƒãƒ¯ãƒ³èªž", + "zap": "サãƒãƒ†ã‚«èªž", + "zbl": "ブリスシンボル", + "zea": "ゼーラント語", + "zen": "ゼナガ語", + "zgh": "標準モロッコ タマジクト語", + "zh": "中国語", + "zh_Hans": "簡体中国語", + "zh_Hant": "ç¹ä½“中国語", + "zu": "ズールー語", + "zun": "ズニ語", + "zxx": "言語的内容ãªã—", + "zza": "ザザ語" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ka.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ka.json new file mode 100644 index 0000000000000000000000000000000000000000..6c83bebe2fba00a14f84016bdb1590158c6b4c83 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ka.json @@ -0,0 +1,482 @@ +{ + "Version": "2.1.29.20", + "Names": { + "aa": "áƒáƒ¤áƒáƒ áƒ˜", + "ab": "áƒáƒ¤áƒ®áƒáƒ–ური", + "ace": "áƒáƒ©áƒ”ხური", + "ach": "áƒáƒ©áƒáƒšáƒ˜", + "ada": "áƒáƒ“áƒáƒœáƒ’მე", + "ady": "áƒáƒ“იღეური", + "ae": "áƒáƒ•ესტური", + "af": "áƒáƒ¤áƒ áƒ˜áƒ™áƒáƒáƒœáƒ¡áƒ˜", + "agq": "áƒáƒ¦áƒ”მი", + "ain": "áƒáƒ˜áƒœáƒ£áƒ£áƒ áƒ˜", + "ak": "áƒáƒ™áƒáƒœáƒ˜", + "akk": "áƒáƒ¥áƒáƒ“ური", + "ale": "áƒáƒšáƒ”უტური", + "alt": "სáƒáƒ›áƒ®áƒ áƒ”თ áƒáƒšáƒ—áƒáƒ£áƒ áƒ˜", + "am": "áƒáƒ›áƒ°áƒáƒ áƒ£áƒšáƒ˜", + "an": "áƒáƒ áƒáƒ’áƒáƒœáƒ£áƒšáƒ˜", + "ang": "ძველი ინგლისური", + "anp": "áƒáƒœáƒ’იკáƒ", + "ar": "áƒáƒ áƒáƒ‘ული", + "ar_001": "თáƒáƒœáƒáƒ›áƒ”დრáƒáƒ•ე სტáƒáƒœáƒ“áƒáƒ áƒ¢áƒ£áƒšáƒ˜ áƒáƒ áƒáƒ‘ული", + "arc": "áƒáƒ áƒáƒ›áƒ”ული", + "arn": "მáƒáƒžáƒ£áƒ“უნგუნი", + "arp": "áƒáƒ áƒáƒžáƒáƒ°áƒ", + "arw": "áƒáƒ áƒáƒ•áƒáƒ™áƒ˜", + "as": "áƒáƒ¡áƒáƒ›áƒ£áƒ áƒ˜", + "asa": "áƒáƒ¡áƒ£", + "ast": "áƒáƒ¡áƒ¢áƒ£áƒ áƒ˜áƒ£áƒšáƒ˜", + "av": "ხუნძური", + "awa": "áƒáƒ•áƒáƒ“ი", + "ay": "áƒáƒ˜áƒ›áƒáƒ áƒ", + "az": "áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ£áƒšáƒ˜", + "ba": "ბáƒáƒ¨áƒ™áƒ˜áƒ áƒ£áƒšáƒ˜", + "bal": "ბელუჯი", + "ban": "ბáƒáƒšáƒ˜áƒœáƒ£áƒ áƒ˜", + "bas": "ბáƒáƒ¡áƒ", + "bax": "ბáƒáƒ›áƒ£áƒœáƒ˜", + "be": "ბელáƒáƒ áƒ£áƒ¡áƒ£áƒšáƒ˜", + "bej": "ბეჯáƒ", + "bem": "ბემბáƒ", + "bez": "ბენáƒ", + "bg": "ბულგáƒáƒ áƒ£áƒšáƒ˜", + "bgn": "დáƒáƒ¡áƒáƒ•ლეთ ბელუჯი", + "bho": "ბáƒáƒ¯áƒžáƒ£áƒ áƒ˜", + "bi": "ბისლáƒáƒ›áƒ", + "bin": "ბინი", + "bla": "სიკსიკáƒ", + "bm": "ბáƒáƒ›áƒ‘áƒáƒ áƒ", + "bn": "ბენგáƒáƒšáƒ£áƒ áƒ˜", + "bo": "ტიბეტური", + "br": "ბრეტáƒáƒœáƒ£áƒšáƒ˜", + "bra": "ბრáƒáƒ¯áƒ˜", + "brx": "ბáƒáƒ“áƒ", + "bs": "ბáƒáƒ¡áƒœáƒ˜áƒ£áƒ áƒ˜", + "bua": "ბურიáƒáƒ¢áƒ£áƒšáƒ˜", + "bug": "ბუგინური", + "byn": "ბილინი", + "ca": "კáƒáƒ¢áƒáƒšáƒáƒœáƒ£áƒ áƒ˜", + "cay": "კáƒáƒ˜áƒ£áƒ’áƒ", + "ce": "ჩეჩნური", + "ceb": "სებუáƒáƒœáƒ", + "cgg": "ჩიგáƒ", + "ch": "ჩáƒáƒ›áƒáƒ áƒ", + "chb": "ჩიბჩáƒ", + "chk": "ჩუკáƒáƒ¢áƒ™áƒ£áƒ áƒ˜", + "chm": "მáƒáƒ áƒ˜áƒ£áƒšáƒ˜", + "chn": "ჩინუკის ჟáƒáƒ áƒ’áƒáƒœáƒ˜", + "cho": "ჩáƒáƒ™áƒ¢áƒ", + "chp": "ჩიპევიáƒáƒœáƒ˜", + "chr": "ჩერáƒáƒ™áƒ˜", + "chy": "ჩეიენი", + "ckb": "სáƒáƒ áƒáƒœáƒ˜ ქურთული", + "co": "კáƒáƒ áƒ¡áƒ˜áƒ™áƒ£áƒšáƒ˜", + "cop": "კáƒáƒžáƒ¢áƒ£áƒ áƒ˜", + "cr": "კრი", + "crh": "ყირიმულ-თურქული", + "crs": "სესელვáƒ-კრეáƒáƒšáƒ£áƒ áƒ˜ ფრáƒáƒœáƒ’ული", + "cs": "ჩეხური", + "csb": "კáƒáƒ¨áƒ£áƒ‘ური", + "cu": "სáƒáƒ”კლესირსლáƒáƒ•ური", + "cv": "ჩუვáƒáƒ¨áƒ£áƒ áƒ˜", + "cy": "უელსური", + "da": "დáƒáƒœáƒ˜áƒ£áƒ áƒ˜", + "dak": "დáƒáƒ™áƒáƒ¢áƒ£áƒ áƒ˜", + "dar": "დáƒáƒ áƒ’უული", + "dav": "ტáƒáƒ˜áƒ¢áƒ", + "de": "გერმáƒáƒœáƒ£áƒšáƒ˜", + "de_AT": "áƒáƒ•სტრიული გერმáƒáƒœáƒ£áƒšáƒ˜", + "de_CH": "შვეიცáƒáƒ áƒ˜áƒ£áƒšáƒ˜ ზემáƒáƒ’ერმáƒáƒœáƒ£áƒšáƒ˜", + "del": "დელáƒáƒ•ერული", + "den": "სლეივი", + "dgr": "დáƒáƒ’რიბი", + "din": "დინკáƒ", + "dje": "ზáƒáƒ áƒ›áƒ", + "doi": "დáƒáƒ’რი", + "dsb": "ქვემáƒáƒ¡áƒáƒ áƒ‘ული", + "dua": "დუáƒáƒšáƒ", + "dum": "სáƒáƒ¨áƒ£áƒáƒšáƒ ჰáƒáƒšáƒáƒœáƒ“იური", + "dv": "დივეჰი", + "dyo": "დიáƒáƒšáƒ", + "dyu": "დიულáƒ", + "dz": "ძáƒáƒœáƒ’კხáƒ", + "dzg": "დáƒáƒ–áƒáƒ’áƒ", + "ebu": "ემბუ", + "ee": "ევე", + "efi": "ეფიკი", + "egy": "ძველეგვიპტური", + "eka": "ეკáƒáƒ¯áƒ£áƒ™áƒ˜", + "el": "ბერძნული", + "en": "ინგლისური", + "en_AU": "áƒáƒ•სტრáƒáƒšáƒ˜áƒ£áƒ áƒ˜ ინგლისური", + "en_CA": "კáƒáƒœáƒáƒ“ური ინგლისური", + "en_GB": "ბრიტáƒáƒœáƒ£áƒšáƒ˜ ინგლისური", + "en_US": "áƒáƒ›áƒ”რიკული ინგლისური", + "enm": "სáƒáƒ¨áƒ£áƒáƒšáƒ ინგლისური", + "eo": "ესპერáƒáƒœáƒ¢áƒ", + "es": "ესპáƒáƒœáƒ£áƒ áƒ˜", + "es_419": "ლáƒáƒ—ინურ áƒáƒ›áƒ”რიკული ესპáƒáƒœáƒ£áƒ áƒ˜", + "es_ES": "ევრáƒáƒžáƒ£áƒšáƒ˜ ესპáƒáƒœáƒ£áƒ áƒ˜", + "es_MX": "მექსიკური ესპáƒáƒœáƒ£áƒ áƒ˜", + "et": "ესტáƒáƒœáƒ£áƒ áƒ˜", + "eu": "ბáƒáƒ¡áƒ™áƒ£áƒ áƒ˜", + "ewo": "ევáƒáƒœáƒ“áƒ", + "fa": "სპáƒáƒ áƒ¡áƒ£áƒšáƒ˜", + "ff": "ფულáƒ", + "fi": "ფინური", + "fil": "ფილიპინური", + "fj": "ფიჯი", + "fo": "ფáƒáƒ áƒ”რული", + "fon": "ფáƒáƒœáƒ˜", + "fr": "ფრáƒáƒœáƒ’ული", + "fr_CA": "კáƒáƒœáƒáƒ“ური ფრáƒáƒœáƒ’ული", + "fr_CH": "შვეიცáƒáƒ áƒ˜áƒ£áƒšáƒ˜ ფრáƒáƒœáƒ’ული", + "frm": "სáƒáƒ¨áƒ£áƒáƒšáƒ ფრáƒáƒœáƒ’ული", + "fro": "ძველი ფრáƒáƒœáƒ’ული", + "frr": "ჩრდილáƒáƒ¤áƒ áƒ˜áƒ–იული", + "frs": "áƒáƒ¦áƒ›áƒáƒ¡áƒáƒ•ლეთფრიზიული", + "fur": "ფრიულური", + "fy": "დáƒáƒ¡áƒáƒ•ლეთფრიზიული", + "ga": "ირლáƒáƒœáƒ“იური", + "gaa": "გáƒ", + "gag": "გáƒáƒ’áƒáƒ£áƒ–ური", + "gba": "გბáƒáƒ˜áƒ", + "gd": "შáƒáƒ¢áƒšáƒáƒœáƒ“იური გელური", + "gez": "გეეზი", + "gil": "გილბერტული", + "gl": "გáƒáƒšáƒ˜áƒ¡áƒ˜áƒ£áƒ áƒ˜", + "gmh": "სáƒáƒ¨áƒ£áƒáƒšáƒ ზემáƒáƒ’ერმáƒáƒœáƒ£áƒšáƒ˜", + "gn": "გუáƒáƒ áƒáƒœáƒ˜", + "goh": "ძველი ზემáƒáƒ’ერმáƒáƒœáƒ£áƒšáƒ˜", + "gon": "გáƒáƒœáƒ“ი", + "gor": "გáƒáƒ áƒáƒœáƒ¢áƒáƒšáƒ", + "got": "გáƒáƒ—ური", + "grc": "ძველი ბერძნული", + "gsw": "შვეიცáƒáƒ áƒ˜áƒ£áƒšáƒ˜ გერმáƒáƒœáƒ£áƒšáƒ˜", + "gu": "გუჯáƒáƒ áƒáƒ—ი", + "guz": "გუსიი", + "gv": "მენური", + "gwi": "გვიჩინი", + "ha": "ჰáƒáƒ£áƒ¡áƒ", + "haw": "ჰáƒáƒ•áƒáƒ˜áƒ£áƒ áƒ˜", + "he": "ებრáƒáƒ£áƒšáƒ˜", + "hi": "ჰინდი", + "hil": "ჰილიგáƒáƒ˜áƒœáƒáƒœáƒ˜", + "hit": "ხეთური", + "hmn": "ჰმáƒáƒœáƒ’ი", + "hr": "ხáƒáƒ áƒ•áƒáƒ¢áƒ£áƒšáƒ˜", + "hsb": "ზემáƒáƒ¡áƒáƒ áƒ‘ული", + "ht": "ჰáƒáƒ˜áƒ¢áƒ˜áƒ£áƒ áƒ˜ კრეáƒáƒšáƒ˜", + "hu": "უნგრული", + "hup": "ჰუპáƒ", + "hy": "სáƒáƒ›áƒ®áƒ£áƒ áƒ˜", + "hz": "ჰერერáƒ", + "ia": "ინტერლინგუáƒáƒšáƒ£áƒ áƒ˜", + "iba": "იბáƒáƒœáƒ˜", + "ibb": "იბიბიáƒ", + "id": "ინდáƒáƒœáƒ”ზიური", + "ie": "ინტერლინგი", + "ig": "იგბáƒ", + "ii": "სიჩუáƒáƒœáƒ˜áƒ¡ ი", + "ilo": "ილáƒáƒ™áƒ", + "inh": "ინგუშური", + "io": "იდáƒ", + "is": "ისლáƒáƒœáƒ“იური", + "it": "იტáƒáƒšáƒ˜áƒ£áƒ áƒ˜", + "iu": "ინუკტიტუტი", + "ja": "იáƒáƒžáƒáƒœáƒ£áƒ áƒ˜", + "jbo": "ლáƒáƒŸáƒ‘áƒáƒœáƒ˜", + "jgo": "ნგáƒáƒ›áƒ‘áƒ", + "jmc": "კიმáƒáƒ¨áƒáƒ›áƒ˜", + "jpr": "იუდეáƒ-სპáƒáƒ áƒ¡áƒ£áƒšáƒ˜", + "jrb": "იუდეáƒ-áƒáƒ áƒáƒ‘ული", + "jv": "იáƒáƒ•ური", + "ka": "ქáƒáƒ áƒ—ული", + "kaa": "ყáƒáƒ áƒáƒ§áƒáƒšáƒ¤áƒáƒ®áƒ£áƒ áƒ˜", + "kab": "კáƒáƒ‘ილური", + "kac": "კáƒáƒ©áƒ˜áƒœáƒ˜", + "kaj": "კáƒáƒ¯áƒ˜", + "kam": "კáƒáƒ›áƒ‘áƒ", + "kbd": "ყáƒáƒ‘áƒáƒ áƒ“áƒáƒ£áƒšáƒ˜", + "kcg": "ტიáƒáƒžáƒ˜", + "kde": "მáƒáƒ™áƒáƒœáƒ“ე", + "kea": "კáƒáƒ‘უვერდიáƒáƒœáƒ£", + "kfo": "კáƒáƒ áƒ", + "kg": "კáƒáƒœáƒ’áƒ", + "kha": "ხáƒáƒ¡áƒ˜", + "khq": "კáƒáƒ˜áƒ áƒ-ჩიინი", + "ki": "კიკუიუ", + "kj": "კუნáƒáƒ›áƒ", + "kk": "ყáƒáƒ–áƒáƒ®áƒ£áƒ áƒ˜", + "kkj": "კáƒáƒ™áƒ", + "kl": "დáƒáƒ¡áƒáƒ•ლეთ გრენლáƒáƒœáƒ“იური", + "kln": "კáƒáƒšáƒ”ნჯინი", + "km": "ქმერული", + "kmb": "კიმბუნდუ", + "kn": "კáƒáƒœáƒáƒ“áƒ", + "ko": "კáƒáƒ áƒ”ული", + "koi": "კáƒáƒ›áƒ˜-პერმიáƒáƒ™áƒ£áƒšáƒ˜", + "kok": "კáƒáƒœáƒ™áƒáƒœáƒ˜", + "kos": "კუსáƒáƒ˜áƒ”", + "kpe": "კპელე", + "kr": "კáƒáƒœáƒ£áƒ áƒ˜", + "krc": "ყáƒáƒ áƒáƒ©áƒáƒ£áƒš-ბáƒáƒšáƒ§áƒáƒ áƒ£áƒšáƒ˜", + "krl": "კáƒáƒ áƒ”ლიური", + "kru": "კურუქი", + "ks": "ქáƒáƒ¨áƒ›áƒ˜áƒ áƒ£áƒšáƒ˜", + "ksb": "შáƒáƒ›áƒ‘áƒáƒšáƒ", + "ksf": "ბáƒáƒ¤áƒ˜áƒ", + "ksh": "კიáƒáƒšáƒ¨áƒ˜", + "ku": "ქურთული", + "kum": "ყუმუხური", + "kut": "კუტენáƒáƒ˜", + "kv": "კáƒáƒ›áƒ˜", + "kw": "კáƒáƒ áƒœáƒ£áƒšáƒ˜", + "ky": "ყირგიზული", + "la": "ლáƒáƒ—ინური", + "lad": "ლáƒáƒ“ინáƒ", + "lag": "ლáƒáƒœáƒ’ი", + "lah": "ლáƒáƒœáƒ“áƒ", + "lam": "ლáƒáƒ›áƒ‘áƒ", + "lb": "ლუქსემბურგული", + "lez": "ლეზგიური", + "lg": "გáƒáƒœáƒ“áƒ", + "li": "ლიმბურგული", + "lkt": "ლáƒáƒ™áƒáƒ¢áƒ", + "ln": "ლინგáƒáƒšáƒ", + "lo": "ლáƒáƒáƒ¡áƒ£áƒ áƒ˜", + "lol": "მáƒáƒœáƒ’áƒ", + "loz": "ლáƒáƒ–ი", + "lrc": "ჩრდილáƒáƒ”თ ლური", + "lt": "ლიტვური", + "lu": "ლუბáƒ-კáƒáƒ¢áƒáƒœáƒ’áƒ", + "lua": "ლუბáƒ-ლულუáƒ", + "lui": "ლუისენიáƒ", + "lun": "ლუნდáƒ", + "luo": "ლუáƒ", + "lus": "მიზáƒ", + "luy": "ლუჰიáƒ", + "lv": "ლáƒáƒ¢áƒ•იური", + "mad": "მáƒáƒ“ურული", + "maf": "მáƒáƒ¤áƒ", + "mag": "მáƒáƒ’áƒáƒ°áƒ˜", + "mai": "მáƒáƒ˜áƒ—ილი", + "mak": "მáƒáƒ™áƒáƒ¡áƒáƒ áƒ˜", + "mas": "მáƒáƒ¡áƒáƒ˜", + "mde": "მáƒáƒ‘áƒ", + "mdf": "მáƒáƒ¥áƒ¨áƒ", + "men": "მენდე", + "mer": "მერუ", + "mfe": "მáƒáƒ áƒ˜áƒ¡áƒ˜áƒ”ნი", + "mg": "მáƒáƒšáƒáƒ’áƒáƒ¡áƒ˜áƒ£áƒ áƒ˜", + "mga": "სáƒáƒ¨áƒ£áƒáƒšáƒ ირლáƒáƒœáƒ“იური", + "mgh": "მáƒáƒ¥áƒ£áƒ•áƒ-მეეტáƒ", + "mgo": "მეტáƒ-ენáƒ", + "mh": "მáƒáƒ áƒ¨áƒáƒšáƒ£áƒ áƒ˜", + "mi": "მáƒáƒáƒ áƒ˜", + "mic": "მიკმáƒáƒ™áƒ˜", + "min": "მინáƒáƒœáƒ’კáƒáƒ‘áƒáƒ£", + "mk": "მáƒáƒ™áƒ”დáƒáƒœáƒ£áƒ áƒ˜", + "ml": "მáƒáƒšáƒáƒ˜áƒáƒšáƒáƒ›áƒ£áƒ áƒ˜", + "mn": "მáƒáƒœáƒ¦áƒáƒšáƒ£áƒ áƒ˜", + "mnc": "მáƒáƒœáƒ¯áƒ£áƒ áƒ˜áƒ£áƒšáƒ˜", + "mni": "მáƒáƒœáƒ˜áƒžáƒ£áƒ áƒ˜", + "moh": "მáƒáƒ°áƒáƒ£áƒ™áƒ£áƒ áƒ˜", + "mos": "მáƒáƒ¡áƒ˜", + "mr": "მáƒáƒ áƒáƒ—ჰი", + "ms": "მáƒáƒšáƒáƒ˜áƒ£áƒ áƒ˜", + "mt": "მáƒáƒšáƒ¢áƒ£áƒ áƒ˜", + "mua": "მუნდáƒáƒœáƒ’ი", + "mul": "სხვáƒáƒ“áƒáƒ¡áƒ®áƒ•რენáƒ", + "mus": "კრიკი", + "mwl": "მირáƒáƒœáƒ“ული", + "mwr": "მáƒáƒ áƒ•áƒáƒ áƒ˜", + "my": "ბირმული", + "mye": "მიენე", + "myv": "ერზიáƒ", + "mzn": "მáƒáƒ–áƒáƒœáƒ“ერáƒáƒœáƒ£áƒšáƒ˜", + "na": "ნáƒáƒ£áƒ áƒ£", + "nap": "ნეáƒáƒžáƒáƒšáƒ˜áƒ¢áƒáƒœáƒ£áƒ áƒ˜", + "naq": "ნáƒáƒ›áƒ", + "nb": "ნáƒáƒ áƒ•ეგიული ბუკმáƒáƒšáƒ˜", + "nd": "ჩრდილáƒáƒ”თ ნდებელე", + "nds": "ქვემáƒáƒ’ერმáƒáƒœáƒ£áƒšáƒ˜", + "nds_NL": "ქვემáƒáƒ¡áƒáƒ¥áƒ¡áƒáƒœáƒ£áƒ áƒ˜", + "ne": "ნეპáƒáƒšáƒ£áƒ áƒ˜", + "new": "ნევáƒáƒ áƒ˜", + "ng": "ნდáƒáƒœáƒ’áƒ", + "nia": "ნიáƒáƒ¡áƒ˜", + "niu": "ნიუე", + "nl": "ნიდერლáƒáƒœáƒ“ური", + "nl_BE": "ფლáƒáƒ›áƒáƒœáƒ“იური", + "nmg": "კვáƒáƒ¡áƒ˜áƒ", + "nn": "ნáƒáƒ áƒ•ეგიული ნიუნáƒáƒ áƒ¡áƒ™áƒ˜", + "nnh": "ნგიმბუნი", + "no": "ნáƒáƒ áƒ•ეგიული", + "nog": "ნáƒáƒ¦áƒáƒ£áƒ áƒ˜", + "non": "ძველსკáƒáƒœáƒ“ინáƒáƒ•იური", + "nqo": "ნკáƒ", + "nr": "სáƒáƒ›áƒ®áƒ áƒ”თ ნდებელური", + "nso": "ჩრდილáƒáƒ”თ სáƒáƒ—áƒ", + "nus": "ნუერი", + "nv": "ნáƒáƒ•áƒáƒ®áƒ", + "nwc": "კლáƒáƒ¡áƒ˜áƒ™áƒ£áƒ áƒ˜ ნევáƒáƒ áƒ£áƒšáƒ˜", + "ny": "ნიáƒáƒœáƒ¯áƒ", + "nym": "ნიáƒáƒ›áƒ•ეზი", + "nyn": "ნიáƒáƒœáƒ™áƒáƒšáƒ”", + "nyo": "ნიáƒáƒ áƒ", + "nzi": "ნზიმáƒ", + "oc": "áƒáƒ¥áƒ¡áƒ˜áƒ¢áƒáƒœáƒ£áƒ áƒ˜", + "oj": "áƒáƒ¯áƒ˜áƒ‘ვე", + "om": "áƒáƒ áƒáƒ›áƒ", + "or": "áƒáƒ áƒ˜áƒ", + "os": "áƒáƒ¡áƒ£áƒ áƒ˜", + "pa": "პენჯáƒáƒ‘ური", + "pag": "პáƒáƒœáƒ’áƒáƒ¡áƒ˜áƒœáƒáƒœáƒ˜", + "pal": "ფáƒáƒšáƒáƒ£áƒ áƒ˜", + "pam": "პáƒáƒ›áƒžáƒáƒœáƒ’áƒ", + "pap": "პáƒáƒžáƒ˜áƒáƒ›áƒ”ნტáƒ", + "pau": "ფáƒáƒšáƒáƒ£áƒáƒœáƒ˜", + "pcm": "ნიგერიული კრეáƒáƒšáƒ£áƒ áƒ˜", + "peo": "ძველი სპáƒáƒ áƒ¡áƒ£áƒšáƒ˜", + "phn": "ფინიკიური", + "pi": "პáƒáƒšáƒ˜", + "pl": "პáƒáƒšáƒáƒœáƒ£áƒ áƒ˜", + "prg": "პრუსიული", + "pro": "ძველი პრáƒáƒ•áƒáƒœáƒ¡áƒ£áƒšáƒ˜", + "ps": "პუშტუ", + "pt": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜", + "pt_BR": "ბრáƒáƒ–ილიური პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜", + "pt_PT": "ევრáƒáƒžáƒ£áƒšáƒ˜ პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜", + "qu": "კეჩუáƒ", + "quc": "კიჩე", + "raj": "რáƒáƒ¯áƒáƒ¡áƒ—áƒáƒœáƒ˜", + "rap": "რáƒáƒžáƒáƒœáƒ£áƒ˜", + "rar": "რáƒáƒ áƒáƒ¢áƒáƒœáƒ’ული", + "rm": "რეტáƒáƒ áƒáƒ›áƒáƒœáƒ£áƒšáƒ˜", + "rn": "რუნდი", + "ro": "რუმინული", + "ro_MD": "მáƒáƒšáƒ“áƒáƒ•ური", + "rof": "რáƒáƒ›áƒ‘áƒ", + "rom": "ბáƒáƒ¨áƒ£áƒ áƒ˜", + "root": "ძირეული ენáƒ", + "ru": "რუსული", + "rup": "áƒáƒ áƒáƒ›áƒáƒœáƒ£áƒšáƒ˜", + "rw": "კინიáƒáƒ áƒ£áƒáƒœáƒ“áƒ", + "rwk": "რუáƒ", + "sa": "სáƒáƒœáƒ¡áƒ™áƒ áƒ˜áƒ¢áƒ˜", + "sad": "სáƒáƒœáƒ“áƒáƒ•ე", + "sah": "იáƒáƒ™áƒ£áƒ¢áƒ£áƒ áƒ˜", + "sam": "სáƒáƒ›áƒáƒ áƒ˜áƒ£áƒš-áƒáƒ áƒáƒ›áƒ”ული", + "saq": "სáƒáƒ›áƒ‘ურუ", + "sat": "სáƒáƒœáƒ¢áƒáƒšáƒ˜", + "sba": "ნგáƒáƒ›áƒ‘áƒáƒ˜", + "sbp": "სáƒáƒœáƒ’უ", + "sc": "სáƒáƒ áƒ“ინიული", + "scn": "სიცილიური", + "sco": "შáƒáƒ¢áƒšáƒáƒœáƒ“იური", + "sd": "სინდჰური", + "sdh": "სáƒáƒ›áƒ®áƒ áƒ”თქურთული", + "se": "ჩრდილáƒáƒ”თ სáƒáƒáƒ›áƒ£áƒ áƒ˜", + "see": "სენეკáƒ", + "seh": "სენáƒ", + "sel": "სელკუპური", + "ses": "კáƒáƒ˜áƒ áƒáƒ‘áƒáƒ áƒ-სენი", + "sg": "სáƒáƒœáƒ’áƒ", + "sga": "ძველი ირლáƒáƒœáƒ“იური", + "sh": "სერბულ-ხáƒáƒ áƒ•áƒáƒ¢áƒ£áƒšáƒ˜", + "shi": "შილჰáƒ", + "shn": "შáƒáƒœáƒ˜", + "shu": "ჩáƒáƒ“ური áƒáƒ áƒáƒ‘ული", + "si": "სინჰáƒáƒšáƒ£áƒ áƒ˜", + "sk": "სლáƒáƒ•áƒáƒ™áƒ£áƒ áƒ˜", + "sl": "სლáƒáƒ•ენური", + "sm": "სáƒáƒ›áƒáƒ", + "sma": "სáƒáƒ›áƒ®áƒ áƒ”თსáƒáƒ›áƒ£áƒ áƒ˜", + "smj": "ლულე-სáƒáƒáƒ›áƒ£áƒ áƒ˜", + "smn": "ინáƒáƒ áƒ˜-სáƒáƒáƒ›áƒ£áƒ áƒ˜", + "sms": "სკáƒáƒšáƒ¢-სáƒáƒáƒ›áƒ£áƒ áƒ˜", + "sn": "შáƒáƒœáƒ", + "snk": "სáƒáƒœáƒ˜áƒœáƒ™áƒ”", + "so": "სáƒáƒ›áƒáƒšáƒ˜áƒ£áƒ áƒ˜", + "sq": "áƒáƒšáƒ‘áƒáƒœáƒ£áƒ áƒ˜", + "sr": "სერბული", + "srn": "სრáƒáƒœáƒáƒœ ტáƒáƒœáƒ’áƒ", + "ss": "სუáƒáƒ¢áƒ˜", + "ssy": "სáƒáƒ°áƒ", + "st": "სáƒáƒ›áƒ®áƒ áƒ”თ სáƒáƒ—áƒáƒ¡ ენáƒ", + "su": "სუნდური", + "suk": "სუკუმáƒ", + "sux": "შუმერული", + "sv": "შვედური", + "sw": "სუáƒáƒ°áƒ˜áƒšáƒ˜", + "sw_CD": "კáƒáƒœáƒ’áƒáƒ¡ სუáƒáƒ°áƒ˜áƒšáƒ˜", + "swb": "კáƒáƒ›áƒáƒ áƒ£áƒšáƒ˜", + "syc": "კლáƒáƒ¡áƒ˜áƒ™áƒ£áƒ áƒ˜ სირიული", + "syr": "სირიული", + "ta": "ტáƒáƒ›áƒ˜áƒšáƒ£áƒ áƒ˜", + "te": "ტელუგუ", + "tem": "ტინმე", + "teo": "ტესáƒ", + "tet": "ტეტუმი", + "tg": "ტáƒáƒ¯áƒ˜áƒ™áƒ£áƒ áƒ˜", + "th": "ტáƒáƒ˜", + "ti": "ტიგრინიáƒ", + "tig": "თიგრე", + "tk": "თურქმენული", + "tlh": "კლინგáƒáƒœáƒ˜", + "tn": "ტსვáƒáƒœáƒ", + "to": "ტáƒáƒœáƒ’áƒáƒœáƒ£áƒ áƒ˜", + "tpi": "ტáƒáƒ™-პისინი", + "tr": "თურქული", + "trv": "ტáƒáƒ áƒáƒ™áƒ", + "ts": "ტსáƒáƒœáƒ’áƒ", + "tt": "თáƒáƒ—რული", + "tum": "ტუმბუკáƒ", + "tvl": "ტუვáƒáƒšáƒ£", + "tw": "თუი", + "twq": "ტáƒáƒ¡áƒáƒ•áƒáƒ¥áƒ˜", + "ty": "ტáƒáƒ˜áƒ¢áƒ£áƒ áƒ˜", + "tyv": "ტუვáƒ", + "tzm": "ცენტრáƒáƒšáƒ£áƒ áƒ˜ მáƒáƒ áƒáƒ™áƒáƒ¡ ტáƒáƒ›áƒáƒ–იგხტი", + "udm": "უდმურტული", + "ug": "უიღურული", + "uga": "უგáƒáƒ áƒ˜áƒ—ული", + "uk": "უკრáƒáƒ˜áƒœáƒ£áƒšáƒ˜", + "umb": "უმბუნდუ", + "und": "უცნáƒáƒ‘ი ენáƒ", + "ur": "ურდუ", + "uz": "უზბეკური", + "vai": "ვáƒáƒ˜", + "ve": "ვენდáƒ", + "vi": "ვიეტნáƒáƒ›áƒ£áƒ áƒ˜", + "vo": "ვáƒáƒšáƒáƒžáƒ£áƒ™áƒ˜", + "vun": "ვუნჯáƒ", + "wa": "ვáƒáƒšáƒáƒœáƒ£áƒ áƒ˜", + "wae": "ვáƒáƒšáƒ¡áƒ”რი", + "wal": "ველáƒáƒ˜áƒ—áƒ", + "war": "ვáƒáƒ áƒáƒ˜", + "wbp": "ვáƒáƒšáƒžáƒ˜áƒ áƒ˜", + "wo": "ვáƒáƒšáƒáƒ¤áƒ£áƒ áƒ˜", + "xal": "ყáƒáƒšáƒ›áƒ£áƒ®áƒ£áƒ áƒ˜", + "xh": "ქჰáƒáƒ¡áƒ", + "xog": "სáƒáƒ’áƒ", + "yav": "იáƒáƒœáƒ’ბენი", + "ybb": "იემბáƒ", + "yi": "იდიში", + "yo": "იáƒáƒ áƒ£áƒ‘áƒ", + "yue": "კáƒáƒœáƒ¢áƒáƒœáƒ£áƒ áƒ˜", + "zbl": "ბლისსიმბáƒáƒšáƒáƒ”ბი", + "zen": "ზენáƒáƒ’áƒ", + "zgh": "სტáƒáƒœáƒ“áƒáƒ áƒ¢áƒ£áƒšáƒ˜ მáƒáƒ áƒáƒ™áƒáƒ£áƒšáƒ˜ ტáƒáƒ›áƒáƒ–იგხტი", + "zh": "ჩინური", + "zh_Hans": "გáƒáƒ›áƒáƒ áƒ¢áƒ˜áƒ•ებული ჩინური", + "zh_Hant": "ტრáƒáƒ“იციული ჩინური", + "zu": "ზულუ", + "zun": "ზუნი", + "zxx": "ლინგვისტური შიგთáƒáƒ•სი áƒáƒ  áƒáƒ áƒ˜áƒ¡", + "zza": "ზáƒáƒ–áƒáƒ™áƒ˜" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ki.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ki.json new file mode 100644 index 0000000000000000000000000000000000000000..ea54607c124c51de453ca60b30a28cd10ef393ac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ki.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ak": "Kiakan", + "am": "Kiamhari", + "ar": "KÄ©arabu", + "be": "Kibelarusi", + "bg": "Kibulgaria", + "bn": "Kibangla", + "cs": "Kichecki", + "de": "KÄ©njeremani", + "el": "Kigiriki", + "en": "GÄ©thungÅ©", + "es": "Kihispania", + "fa": "Kiajemi", + "fr": "KÄ©baranja", + "ha": "Kihausa", + "hi": "KÄ©hÄ©ndÄ©", + "hu": "Kihungari", + "id": "Kiindonesia", + "ig": "Kiigbo", + "it": "KÄ©taliano", + "ja": "KÄ©njabani", + "jv": "Kijava", + "ki": "Gikuyu", + "km": "Kikambodia", + "ko": "Kikorea", + "ms": "Kimalesia", + "my": "Kiburma", + "ne": "Kinepali", + "nl": "Kiholanzi", + "pa": "Kipunjabi", + "pl": "Kipolandi", + "pt": "Kireno", + "ro": "Kiromania", + "ru": "KÄ©racia", + "rw": "Kinyarwanda", + "so": "KÄ©cumarÄ©", + "sv": "Kiswidi", + "ta": "Kitamil", + "th": "Kitailandi", + "tr": "Kituruki", + "uk": "Kiukrania", + "ur": "Kiurdu", + "vi": "Kivietinamu", + "yo": "Kiyoruba", + "zh": "KÄ©caina", + "zu": "Kizulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/kk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/kk.json new file mode 100644 index 0000000000000000000000000000000000000000..6bab52fe5b4c1f7c8efa336628716f341cc197f9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/kk.json @@ -0,0 +1,393 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "афар тілі", + "ab": "абхаз тілі", + "ace": "ачех тілі", + "ada": "адангме тілі", + "ady": "адыгей тілі", + "af": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ Ñ‚Ñ–Ð»Ñ–", + "agq": "агхем тілі", + "ain": "айну тілі", + "ak": "акан тілі", + "ale": "алеут тілі", + "alt": "оңтүÑтік алтай тілі", + "am": "амхар тілі", + "an": "арагон тілі", + "anp": "ангика тілі", + "ar": "араб тілі", + "ar_001": "қазіргі Ñтандартты араб тілі", + "arn": "мапуче тілі", + "arp": "арапахо тілі", + "as": "аÑÑам тілі", + "asa": "аÑу тілі", + "ast": "аÑÑ‚ÑƒÑ€Ð¸Ñ Ñ‚Ñ–Ð»Ñ–", + "av": "авар тілі", + "awa": "авадхи тілі", + "ay": "аймара тілі", + "az": "әзірбайжан тілі", + "ba": "башқұрт тілі", + "ban": "бали тілі", + "bas": "баÑа тілі", + "be": "беларуÑÑŒ тілі", + "bem": "бемба тілі", + "bez": "бена тілі", + "bg": "болгар тілі", + "bgn": "Ð±Ð°Ñ‚Ñ‹Ñ Ð±Ð°Ð»ÑƒÑ‡Ð¸ тілі", + "bho": "бходжпури тілі", + "bi": "биÑлама тілі", + "bin": "бини тілі", + "bla": "ÑикÑика тілі", + "bm": "бамбара тілі", + "bn": "бенгал тілі", + "bo": "тибет тілі", + "br": "бретон тілі", + "brx": "бодо тілі", + "bs": "боÑÐ½Ð¸Ñ Ñ‚Ñ–Ð»Ñ–", + "bug": "Ð±ÑƒÐ³Ð¸Ñ Ñ‚Ñ–Ð»Ñ–", + "byn": "блин тілі", + "ca": "каталан тілі", + "ce": "шешен тілі", + "ceb": "Ñебуано тілі", + "cgg": "кига тілі", + "ch": "чаморро тілі", + "chk": "чуук тілі", + "chm": "мари тілі", + "cho": "чокто тілі", + "chr": "чероки тілі", + "chy": "шайен тілі", + "ckb": "Ñорани тілі", + "co": "корÑика тілі", + "crs": "Ñейшельдік креол тілі", + "cs": "чех тілі", + "cu": "шіркеулік ÑлавÑн тілі", + "cv": "чуваш тілі", + "cy": "валлий тілі", + "da": "дат тілі", + "dak": "дакота тілі", + "dar": "даргин тілі", + "dav": "таита тілі", + "de": "Ð½ÐµÐ¼Ñ–Ñ Ñ‚Ñ–Ð»Ñ–", + "dgr": "догриб тілі", + "dje": "зарма тілі", + "dsb": "төменгі лужица тілі", + "dua": "дуала тілі", + "dv": "дивехи тілі", + "dyo": "диола тілі", + "dz": "дзонг-ÐºÑ Ñ‚Ñ–Ð»Ñ–", + "dzg": "дазага тілі", + "ebu": "Ñмбу тілі", + "ee": "Ñве тілі", + "efi": "Ñфик тілі", + "eka": "Ñкаджук тілі", + "el": "грек тілі", + "en": "ағылшын тілі", + "en_US": "ағылшын тілі (ÐҚШ)", + "eo": "ÑÑперанто тілі", + "es": "иÑпан тілі", + "et": "ÑÑтон тілі", + "eu": "баÑк тілі", + "ewo": "Ñвондо тілі", + "fa": "парÑÑ‹ тілі", + "ff": "фула тілі", + "fi": "фин тілі", + "fil": "филиппин тілі", + "fj": "фиджи тілі", + "fo": "фарер тілі", + "fon": "фон тілі", + "fr": "француз тілі", + "fur": "фриуль тілі", + "fy": "Ð±Ð°Ñ‚Ñ‹Ñ Ñ„Ñ€Ð¸Ð· тілі", + "ga": "ирланд тілі", + "gaa": "га тілі", + "gag": "гагауз тілі", + "gd": "гÑль тілі", + "gez": "геÑз тілі", + "gil": "гильберт тілі", + "gl": "галиÑÐ¸Ñ Ñ‚Ñ–Ð»Ñ–", + "gn": "гуарани тілі", + "gor": "горонтало тілі", + "gsw": "швейцариÑлық Ð½ÐµÐ¼Ñ–Ñ Ñ‚Ñ–Ð»Ñ–", + "gu": "гуджарати тілі", + "guz": "гуÑии тілі", + "gv": "мÑн тілі", + "gwi": "гвичин тілі", + "ha": "хауÑа тілі", + "haw": "гавайи тілі", + "he": "иврит тілі", + "hi": "хинди тілі", + "hil": "хилигайнон тілі", + "hmn": "хмонг тілі", + "hr": "хорват тілі", + "hsb": "жоғарғы лужица тілі", + "ht": "гаити тілі", + "hu": "венгр тілі", + "hup": "хупа тілі", + "hy": "армÑн тілі", + "hz": "гереро тілі", + "ia": "интерлингва тілі", + "iba": "ибан тілі", + "ibb": "ибибио тілі", + "id": "Ð¸Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ Ñ‚Ñ–Ð»Ñ–", + "ie": "интерлингве тілі", + "ig": "игбо тілі", + "ii": "Ñычуан и тілі", + "ilo": "илоко тілі", + "inh": "ингуш тілі", + "io": "идо тілі", + "is": "иÑланд тілі", + "it": "итальÑн тілі", + "iu": "инуктитут тілі", + "ja": "жапон тілі", + "jbo": "ложбан тілі", + "jgo": "нгомба тілі", + "jmc": "мачаме тілі", + "jv": "Ñва тілі", + "ka": "грузин тілі", + "kab": "кабил тілі", + "kac": "качин тілі", + "kaj": "джу тілі", + "kam": "камба тілі", + "kbd": "кабардин тілі", + "kcg": "тьÑп тілі", + "kde": "маконде тілі", + "kea": "кабувердьÑну тілі", + "kfo": "коро тілі", + "kha": "кхаÑи тілі", + "khq": "койра чини тілі", + "ki": "кикуйю тілі", + "kj": "кваньÑма тілі", + "kk": "қазақ тілі", + "kkj": "како тілі", + "kl": "калаалиÑут тілі", + "kln": "каленжин тілі", + "km": "кхмер тілі", + "kmb": "кимбунду тілі", + "kn": "каннада тілі", + "ko": "корей тілі", + "koi": "коми-пермÑк тілі", + "kok": "конкани тілі", + "kpe": "кпелле тілі", + "kr": "канури тілі", + "krc": "қарашай-балқар тілі", + "krl": "карель тілі", + "kru": "курух тілі", + "ks": "кашмир тілі", + "ksb": "шамбала тілі", + "ksf": "бафиа тілі", + "ksh": "кёльн тілі", + "ku": "күрд тілі", + "kum": "құмық тілі", + "kv": "коми тілі", + "kw": "корн тілі", + "ky": "қырғыз тілі", + "la": "латын тілі", + "lad": "ладино тілі", + "lag": "ланги тілі", + "lb": "люкÑембург тілі", + "lez": "лезгин тілі", + "lg": "ганда тілі", + "li": "лимбург тілі", + "lkt": "лакота тілі", + "ln": "лингала тілі", + "lo": "Ð»Ð°Ð¾Ñ Ñ‚Ñ–Ð»Ñ–", + "loz": "лози тілі", + "lrc": "ÑолтүÑтік люри тілі", + "lt": "литва тілі", + "lu": "луба-катанга тілі", + "lua": "луба-лулуа тілі", + "lun": "лунда тілі", + "luo": "луо тілі", + "lus": "мизо тілі", + "luy": "лухиа тілі", + "lv": "латыш тілі", + "mad": "мадур тілі", + "mag": "магахи тілі", + "mai": "майтхили тілі", + "mak": "макаÑар тілі", + "mas": "маÑай тілі", + "mdf": "мокша тілі", + "men": "менде тілі", + "mer": "меру тілі", + "mfe": "мориÑиен тілі", + "mg": "малагаÑи тілі", + "mgh": "макуа-меетто тілі", + "mgo": "мета тілі", + "mh": "маршалл тілі", + "mi": "маори тілі", + "mic": "микмак тілі", + "min": "минангкабау тілі", + "mk": "македон тілі", + "ml": "малаÑлам тілі", + "mn": "моңғол тілі", + "mni": "манипури тілі", + "moh": "могавк тілі", + "mos": "моÑÑи тілі", + "mr": "маратхи тілі", + "ms": "малай тілі", + "mt": "мальта тілі", + "mua": "мунданг тілі", + "mul": "бірнеше тіл", + "mus": "крик тілі", + "mwl": "миранд тілі", + "my": "бирма тілі", + "myv": "ÑрзÑн тілі", + "mzn": "мазандеран тілі", + "na": "науру тілі", + "nap": "неаполитан тілі", + "naq": "нама тілі", + "nb": "норвегиÑлық букмол тілі", + "nd": "ÑолтүÑтік ндебеле тілі", + "nds": "төменгі Ð½ÐµÐ¼Ñ–Ñ Ñ‚Ñ–Ð»Ñ–", + "nds_NL": "төменгі ÑакÑон тілі", + "ne": "непал тілі", + "new": "невар тілі", + "ng": "ндонга тілі", + "nia": "Ð½Ð¸Ð°Ñ Ñ‚Ñ–Ð»Ñ–", + "niu": "Ð½Ð¸ÑƒÑ Ñ‚Ñ–Ð»Ñ–", + "nl": "нидерланд тілі", + "nl_BE": "фламанд тілі", + "nmg": "кваÑио тілі", + "nn": "норвегиÑлық нюнорÑк тілі", + "nnh": "нгиембун тілі", + "no": "норвег тілі", + "nog": "ноғай тілі", + "nqo": "нко тілі", + "nr": "оңтүÑтік ндебеле тілі", + "nso": "ÑолтүÑтік Ñото тілі", + "nus": "нуÑÑ€ тілі", + "nv": "навахо тілі", + "ny": "ньÑнджа тілі", + "nyn": "нианколе тілі", + "oc": "окÑитан тілі", + "om": "оромо тілі", + "or": "Ð¾Ñ€Ð¸Ñ Ñ‚Ñ–Ð»Ñ–", + "os": "оÑетин тілі", + "pa": "пенджаб тілі", + "pag": "пангаÑинан тілі", + "pam": "пампанга тілі", + "pap": "папьÑменто тілі", + "pau": "палау тілі", + "pcm": "нигериÑлық пиджин тілі", + "pl": "полÑк тілі", + "prg": "пруÑÑÐ¸Ñ Ñ‚Ñ–Ð»Ñ–", + "ps": "пушту тілі", + "pt": "португал тілі", + "qu": "кечуа тілі", + "quc": "киче тілі", + "rap": "рапануй тілі", + "rar": "раротонган тілі", + "rm": "романш тілі", + "rn": "рунди тілі", + "ro": "румын тілі", + "ro_MD": "молдован тілі", + "rof": "ромбо тілі", + "root": "ата тіл", + "ru": "Ð¾Ñ€Ñ‹Ñ Ñ‚Ñ–Ð»Ñ–", + "rup": "арумын тілі", + "rw": "киньÑруанда тілі", + "rwk": "руа тілі", + "sa": "ÑанÑкрит тілі", + "sad": "Ñандаве тілі", + "sah": "Ñкут тілі", + "saq": "Ñамбуру тілі", + "sat": "Ñантали тілі", + "sba": "нгамбай тілі", + "sbp": "Ñангу тілі", + "sc": "Ñардин тілі", + "scn": "ÑÐ¸Ñ†Ð¸Ð»Ð¸Ñ Ñ‚Ñ–Ð»Ñ–", + "sco": "шотланд тілі", + "sd": "Ñиндхи тілі", + "sdh": "оңтүÑтік күрд тілі", + "se": "ÑолтүÑтік Ñаам тілі", + "seh": "Ñена тілі", + "ses": "койраборо Ñенни тілі", + "sg": "Ñанго тілі", + "sh": "Ñерб-хорват тілі", + "shi": "ташелхит тілі", + "shn": "шан тілі", + "si": "Ñингал тілі", + "sk": "Ñловак тілі", + "sl": "Ñловен тілі", + "sm": "Ñамоа тілі", + "sma": "оңтүÑтік Ñаам тілі", + "smj": "луле Ñаам тілі", + "smn": "инари Ñаам тілі", + "sms": "колтта Ñаам тілі", + "sn": "шона тілі", + "snk": "Ñонинке тілі", + "so": "Ñомали тілі", + "sq": "албан тілі", + "sr": "Ñерб тілі", + "srn": "Ñранан тонго тілі", + "ss": "Ñвати тілі", + "ssy": "Ñахо тілі", + "st": "ÑеÑото тілі", + "su": "Ñундан тілі", + "suk": "Ñукума тілі", + "sv": "швед тілі", + "sw": "Ñуахили тілі", + "sw_CD": "конго Ñуахили тілі", + "swb": "комор тілі", + "syr": "ÑÐ¸Ñ€Ð¸Ñ Ñ‚Ñ–Ð»Ñ–", + "ta": "тамил тілі", + "te": "телугу тілі", + "tem": "темне тілі", + "teo": "теÑо тілі", + "tet": "тетум тілі", + "tg": "тәжік тілі", + "th": "тай тілі", + "ti": "Ñ‚Ð¸Ð³Ñ€Ð¸Ð½ÑŒÑ Ñ‚Ñ–Ð»Ñ–", + "tig": "тигре тілі", + "tk": "түрікмен тілі", + "tlh": "клингон тілі", + "tn": "Ñ‚Ñвана тілі", + "to": "тонган тілі", + "tpi": "ток-пиÑин тілі", + "tr": "түрік тілі", + "trv": "тароко тілі", + "ts": "Ñ‚Ñонга тілі", + "tt": "татар тілі", + "tum": "тумбука тілі", + "tvl": "тувалу тілі", + "tw": "тви тілі", + "twq": "таÑавак тілі", + "ty": "таити тілі", + "tyv": "тувин тілі", + "tzm": "орталық Ð°Ñ‚Ð»Ð°Ñ Ñ‚Ð°Ð¼Ð°Ð·Ð¸Ð³Ñ…Ñ‚ тілі", + "udm": "удмурт тілі", + "ug": "ұйғыр тілі", + "uk": "украин тілі", + "umb": "умбунду тілі", + "und": "белгіÑіз тіл", + "ur": "урду тілі", + "uz": "өзбек тілі", + "vai": "вай тілі", + "ve": "венда тілі", + "vi": "вьетнам тілі", + "vo": "волапюк тілі", + "vun": "вунджо тілі", + "wa": "валлон тілі", + "wae": "вальзер тілі", + "wal": "волайта тілі", + "war": "варай тілі", + "wbp": "вальбири тілі", + "wo": "волоф тілі", + "xal": "қалмақ тілі", + "xh": "кхоÑа тілі", + "xog": "Ñога тілі", + "yav": "Ñнгбен тілі", + "ybb": "йемба тілі", + "yi": "идиш тілі", + "yo": "йоруба тілі", + "yue": "кантон тілі", + "zgh": "марокколық Ñтандартты тамазигхт тілі", + "zh": "қытай тілі", + "zh_Hans": "жеңілдетілген қытай тілі", + "zh_Hant": "дәÑтүрлі қытай тілі", + "zu": "зулу тілі", + "zun": "зуни тілі", + "zxx": "тілдік мазмұны жоқ", + "zza": "заза тілі" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/kl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/kl.json new file mode 100644 index 0000000000000000000000000000000000000000..bfc65cc58708138837c3d902deb7906c37534503 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/kl.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "kl": "kalaallisut" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/km.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/km.json new file mode 100644 index 0000000000000000000000000000000000000000..6a111324f7fa50a444fdf5ab6bc132c7fd39f962 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/km.json @@ -0,0 +1,394 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "អាហ្វារ", + "ab": "អាប់ážáž¶áž áŸŠáŸ’សាន", + "ace": "អាកហ៊ីនឺស", + "ada": "អាដáŸáž„មី", + "ady": "អាឌីហ្គី", + "ae": "អាវáŸážŸáŸ’ážáž¶áž“", + "af": "អាហ្វ្រិកាន", + "agq": "អាហ្គីម", + "ain": "អាយនូ", + "ak": "អាកាន", + "ale": "អាលូáž", + "alt": "អាល់ážáŸƒážáž¶áž„ážáŸ’បូង", + "am": "អំហារិក", + "an": "អារ៉ាហ្គោន", + "anp": "អាហ្គីកា", + "ar": "អារ៉ាប់", + "ar_001": "អារ៉ាប់ផ្លូវការ", + "arn": "ម៉ាពូឈី", + "arp": "អារ៉ាប៉ាហូ", + "as": "អាសាមីស", + "asa": "អាស៊ូ", + "ast": "អាស្ទូរី", + "av": "អាវ៉ារីក", + "awa": "អាវ៉ាឌី", + "ay": "អីម៉ារ៉ា", + "az": "អាស៊ែបៃហ្សង់", + "ba": "បាស្គៀ", + "ban": "បាលី", + "bas": "បាសា", + "be": "áž”áŸáž¡áž¶ážšáž»ážŸáŸ’ស", + "bem": "áž”áŸáž˜áž”áž¶", + "bez": "áž”áŸážŽáž¶", + "bg": "ប៊ុលហ្គារី", + "bgn": "បាឡូជីážáž¶áž„លិច", + "bho": "បូចពូរី", + "bi": "ប៊ីស្លាម៉ា", + "bin": "ប៊ីនី", + "bla": "ស៊ីកស៊ីកា", + "bm": "បាម្បារា", + "bn": "បង់ក្លាដែស", + "bo": "ទីបáŸ", + "br": "ប្រីស្ážáž»áž“", + "brx": "បូដូ", + "bs": "បូស្នី", + "bug": "ប៊ុកហ្គី", + "byn": "ប្ល៊ីន", + "ca": "កាážáž¶áž¡áž¶áž“", + "ce": "ឈីឆáŸáž“", + "ceb": "ស៊ីប៊ូអាណូ", + "cgg": "ឈីហ្គា", + "ch": "ឈីម៉ូរ៉ូ", + "chk": "ឈូគី", + "chm": "ម៉ារី", + "cho": "ឆុកážáž¶ážœ", + "chr": "ឆáŸážšáž¼áž‚ី", + "chy": "ឈីយីនី", + "ckb": "ឃឺដកណ្ដាល", + "co": "កូស៊ីážáž¶áž“", + "crs": "សáŸážŸáŸáž›ážœáŸ‰áž¶áž‚្រីអូល (បារាំង)", + "cs": "ឆáŸáž€", + "cu": "ឈឺជស្លាវិក", + "cv": "ឈូវ៉ាស", + "cy": "ážœáŸáž›", + "da": "ដាណឺម៉ាក", + "dak": "ដាកូážáž¶", + "dar": "ដាចវ៉ា", + "dav": "ážáŸƒážáž¶", + "de": "អាល្លឺម៉ង់", + "dgr": "ដូគ្រីប", + "dje": "ហ្សាម៉ា", + "dsb": "សូប៊ីក្រោម", + "dua": "ឌួលឡា", + "dv": "ឌីវីហ៊ី", + "dyo": "ចូឡាហ៊្វុនយី", + "dz": "ដុងážáž¶", + "dzg": "ដាហ្សាហ្គា", + "ebu": "អáŸáž˜áž”៊ូ", + "ee": "អ៊ីវ", + "efi": "អ៊ីហ្វិក", + "eka": "អ៊ីកាជុក", + "el": "ក្រិក", + "en": "អង់គ្លáŸážŸ", + "eo": "អáŸážŸáŸ’áž–áŸážšáŸ‰áž¶áž“់ážáž¼", + "es": "អáŸážŸáŸ’ប៉ាញ", + "es_ES": "អáŸážŸáŸ’ប៉ាញ (អ៊ឺរ៉ុប)", + "et": "អáŸážŸáŸ’ážáž¼áž“ី", + "eu": "បាសážáŸ", + "ewo": "អ៊ីវ៉ុនដូ", + "fa": "ភឺសៀន", + "ff": "ហ្វ៊ូឡា", + "fi": "ហ្វាំងឡង់", + "fil": "ហ្វីលីពីន", + "fj": "ហ៊្វីជី", + "fo": "ហ្វារូស", + "fon": "ហ្វ៊ុន", + "fr": "បារាំង", + "fur": "ហ៊្វ្រូលាន", + "fy": "ហ្វ្រីស៊ានážáž¶áž„លិច", + "ga": "អៀរឡង់", + "gaa": "ហ្គា", + "gag": "កាគូស", + "gd": "ស្កុážáž áŸ’កែលិគ", + "gez": "ជីស", + "gil": "ហ្គីលបឺទ", + "gl": "ហ្គាលីស្យាន", + "gn": "ហ្គូរ៉ានី", + "gor": "ហ្គូរុនážáž¶áž¡áž¼", + "gsw": "អាល្លឺម៉ង (ស្វីស)", + "gu": "ហ្កុយ៉ារាទី", + "guz": "ហ្គូស៊ី", + "gv": "មáŸáž“", + "gwi": "ហ្គីចឈីន", + "ha": "ហូសា", + "haw": "ហាវៃ", + "he": "អ៊ីស្រាអែល", + "hi": "ហិណ្ឌី", + "hil": "ហ៊ីលីហ្គáŸážŽáž»áž“", + "hmn": "ម៉ុង", + "hr": "ក្រូអាáž", + "hsb": "សូប៊ីលើ", + "ht": "ហៃទី", + "hu": "ហុងគ្រី", + "hup": "ហ៊ូប៉ា", + "hy": "អាមáŸáž“ី", + "hz": "ហឺរីរ៉ូ", + "iba": "អ៊ីបាន", + "ibb": "អាយប៊ីប៊ីអូ", + "id": "ឥណ្ឌូណáŸážŸáŸŠáž¸", + "ig": "អ៊ីកបូ", + "ii": "ស៊ីឈាន់យី", + "ilo": "អ៊ីឡូកូ", + "inh": "អ៊ិនហ្គូស", + "io": "អ៊ីដូ", + "is": "អ៊ីស្លង់", + "it": "អ៊ីážáž¶áž›áž¸", + "iu": "អ៊ីនុកទីទុáž", + "ja": "ជប៉ុន", + "jbo": "លុចបាន", + "jgo": "ងុំបា", + "jmc": "ម៉ាឆាំ", + "jv": "ជ្វា", + "ka": "ហ្សក​ហ្ស៊ី", + "kab": "កាប៊ីឡáŸ", + "kac": "កាឈីន", + "kaj": "ជូ", + "kam": "កាំបា", + "kbd": "កាបាឌៀ", + "kcg": "យ៉ាប់", + "kde": "ម៉ាកូនដáŸ", + "kea": "កាប៊ូវឺឌៀនូ", + "kfo": "គូរូ", + "kha": "កាស៊ី", + "khq": "គុយរ៉ាឈីនី", + "ki": "គីគូយូ", + "kj": "គូនយ៉ាម៉ា", + "kk": "កាហ្សាក់", + "kkj": "កាកូ", + "kl": "កាឡាលលីស៊ុáž", + "kln": "កាលែនជីន", + "km": "ážáŸ’មែរ", + "kmb": "គីមប៊ុនឌូ", + "kn": "ážáž¶ážŽáž¶ážŠáž¶", + "ko": "កូរ៉áŸ", + "koi": "គូមីភឹមយ៉ាគ", + "kok": "គុនកានី", + "kpe": "គ្លីប", + "kr": "កានូរី", + "krc": "ការ៉ាឆាយបាល់កា", + "krl": "ការីលា", + "kru": "គូរូក", + "ks": "កាស្មៀរ", + "ksb": "សាមបាឡា", + "ksf": "បាហ្វៀ", + "ksh": "កូឡូញ", + "ku": "ឃឺដ", + "kum": "គូមីគ", + "kv": "កូមី", + "kw": "កូនីស", + "ky": "​កៀហ្ស៊ីស", + "la": "ឡាážáŸ†áž¶áž„", + "lad": "ឡាឌីណូ", + "lag": "ឡានហ្គី", + "lb": "លុចហ្សំបួរ", + "lez": "áž¡áŸážŸáž áŸ’គី", + "lg": "ហ្គាន់ដា", + "li": "លីមប៊ូស", + "lkt": "ឡាកូážáž¶", + "ln": "លីនកាឡា", + "lo": "ឡាវ", + "loz": "ឡូហ្ស៊ី", + "lrc": "លូរីážáž¶áž„ជើង", + "lt": "លីទុយអានី", + "lu": "លូបាកាážáž¶áž“ហ្គា", + "lua": "លូបាលូឡា", + "lun": "លុនដា", + "luo": "លូអូ", + "lus": "មីហ្សូ", + "luy": "លូយ៉ា", + "lv": "ឡាážážœáž¸", + "mad": "ម៉ាឌូរីស", + "mag": "ម៉ាហ្គាហ៊ី", + "mai": "ម៉ៃធីលី", + "mak": "ម៉ាកាសា", + "mas": "ម៉ាសៃ", + "mdf": "មុážážŸáž¶", + "men": "មáŸáž“ឌី", + "mer": "មáŸážšáž¼", + "mfe": "ម៉ូរីស៊ីន", + "mg": "ម៉ាឡាហ្គាស៊ី", + "mgh": "ម៉ាកគូវ៉ាមីážáž¼", + "mgo": "មáŸážáž¶", + "mh": "ម៉ាស់សល", + "mi": "ម៉ោរី", + "mic": "មិកមáŸáž€", + "min": "មីណាងកាប៊ូ", + "mk": "ម៉ាសáŸážŠáž¼áž“ី", + "ml": "ម៉ាឡាយ៉ាឡាម", + "mn": "ម៉ុងហ្គោលី", + "mni": "ម៉ានីពូរី", + "moh": "ម៊ូហាគ", + "mos": "មូស៊ី", + "mr": "ម៉ារ៉ាធី", + "ms": "ម៉ាឡáŸ", + "mt": "ម៉ាល់ážáž¶", + "mua": "មុនដាង", + "mul": "ពហុភាសា", + "mus": "គ្រីក", + "mwl": "មីរ៉ានដáŸážŸ", + "my": "ភូមា", + "myv": "អឺហ្ស៊ីយ៉ា", + "mzn": "ម៉ាហ្សានដឺរáŸáž“ី", + "na": "ណូរូ", + "nap": "នាប៉ូលីážáž¶áž“", + "naq": "ណាម៉ា", + "nb": "áž“áŸážšážœáŸ‚ស បុកម៉ាល់", + "nd": "áž“áŸáž”áŸáž›áŸážáž¶áž„ជើង", + "nds": "អាល្លឺម៉ង់ក្រោម", + "nds_NL": "ហ្សាក់ស្យុងក្រោម", + "ne": "áž“áŸáž”៉ាល់", + "new": "áž“áŸážœáŸ‰áž¶ážœáž¸", + "ng": "នុនហ្គា", + "nia": "នីអាស", + "niu": "នូអៀន", + "nl": "ហូឡង់", + "nl_BE": "ផ្លាមីស", + "nmg": "ក្វាស្យូ", + "nn": "áž“áŸážšážœáŸ‚ស នីនូស", + "nnh": "ងៀមប៊ូន", + "no": "áž“áŸážšážœáŸ‚ស", + "nog": "ណូហ្គៃ", + "nqo": "នគោ", + "nr": "áž“áŸáž”៊áŸáž›ážáž¶áž„ážáŸ’បូង", + "nso": "សូážáž¼ážáž¶áž„ជើង", + "nus": "នូអáŸážš", + "nv": "ណាវ៉ាចូ", + "ny": "ណានចា", + "nyn": "ណានកូលáŸ", + "oc": "អូសីážáž¶áž“់", + "om": "អូរ៉ូម៉ូ", + "or": "អូឌៀ", + "os": "អូស៊ីទិក", + "pa": "បឹនជាពិ", + "pag": "áž—áŸáž“ហ្គាស៊ីណាន", + "pam": "ផាមភáŸáž“ហ្គា", + "pap": "ប៉ាប៉ៃមáŸáž“ážáž¼", + "pau": "ប៉ាលូអាន", + "pcm": "ភាសាទំនាក់ទំនងនីហ្សáŸážšáž¸áž™áŸ‰áž¶", + "pl": "ប៉ូឡូញ", + "prg": "ព្រូស៊ាន", + "ps": "បាស្ážáž¼", + "pt": "áž–áŸážšáž‘ុយហ្គាល់", + "pt_PT": "áž–áŸážšáž‘ុយហ្គាល់ (អឺរ៉ុប)", + "qu": "ហ្គិកឈួ", + "quc": "គីចឈី", + "rap": "រ៉ាប៉ានូ", + "rar": "រ៉ារ៉ូážáž»áž„ហ្គាន", + "rm": "រ៉ូម៉ង់", + "rn": "រូន្ឌី", + "ro": "រូម៉ានី", + "ro_MD": "ម៉ុលដាវី", + "rof": "រុមបូ", + "root": "ážšáž¼áž", + "ru": "រុស្ស៊ី", + "rup": "អារ៉ូម៉ានី", + "rw": "គិនយ៉ាវ៉ាន់ដា", + "rwk": "រ៉្វា", + "sa": "សំស្ក្រឹáž", + "sad": "សានដាវី", + "sah": "សាážáž¶", + "saq": "សាមបូរូ", + "sat": "សានážáž¶áž›áž¸", + "sba": "ងាំបáŸáž™", + "sbp": "សានហ្គូ", + "sc": "សាឌីនា", + "scn": "ស៊ីស៊ីលាន", + "sco": "ស្កុáž", + "sd": "ស៊ីនឌី", + "sdh": "ឃឺដážáž¶áž„ážáŸ’បូង", + "se": "សាមីážáž¶áž„ជើង", + "seh": "ស៊ីណា", + "ses": "គុយរ៉ាបូរ៉ុស៊ីនី", + "sg": "សានហ្គោ", + "sh": "សឺបូក្រូអាáž", + "shi": "ážáž¶ážˆáž¸áž›áž áŸŠáž¸áž", + "shn": "សាន", + "si": "ស្រីលង្កា", + "sk": "ស្លូវ៉ាគី", + "sl": "ស្លូវ៉ានី", + "sm": "ភាសាសាមូអា", + "sma": "សាមីážáž¶áž„ážáŸ’បូង", + "smj": "លូលីសាមី", + "smn": "អ៊ីណារីសាម៉ី", + "sms": "ស្កុលសាមី", + "sn": "សូណា", + "snk": "សូនីនគáŸ", + "so": "សូម៉ាលី", + "sq": "អាល់បានី", + "sr": "ស៊ែប", + "srn": "ស្រាណានážáž»áž„ហ្គោ", + "ss": "ស្វាទី", + "ssy": "សាហូ", + "st": "សូážáž¼ážáž¶áž„ážáŸ’បូង", + "su": "ស៊ូដង់", + "suk": "ស៊ូគូម៉ា", + "sv": "ស៊ុយអែáž", + "sw": "ស្វាហ៊ីលី", + "sw_CD": "កុងហ្គោស្វាហ៊ីលី", + "swb": "កូម៉ូរី", + "syr": "ស៊ីរៀគ", + "ta": "ážáž¶áž˜áž¸áž›", + "te": "ážáŸáž›áž»áž‚áž»", + "tem": "ធីមនី", + "teo": "ážáŸážŸáž¼", + "tet": "ទីទុំ", + "tg": "ážáž¶áž áŸ’ស៊ីគ", + "th": "ážáŸƒ", + "ti": "ទីហ្គ្រីញ៉ា", + "tig": "ធីហ្គ្រា", + "tk": "ážáž½áž€áž˜áŸ‰áŸáž“", + "tlh": "ឃ្លីនហ្គុន", + "tn": "ស្វាណា", + "to": "ážáž»áž„ហ្គា", + "tpi": "ážáž»áž€áž–ីស៊ីន", + "tr": "ទួរគី", + "trv": "ážáž¶ážšáŸ‰áž¼áž€áž¼", + "ts": "សុងហ្គា", + "tt": "ážáž¶ážáž¶", + "tum": "ទុមប៊ូកា", + "tvl": "ទូវ៉ាលូ", + "tw": "ទ្វី", + "twq": "ážáž¶ážŸáž¶ážœáŸ‰áž¶áž€áŸ‹", + "ty": "ážáž¶áž áŸŠáž¸áž‘ី", + "tyv": "ទូវីនៀ", + "tzm": "ážáž¶áž˜áŸ‰áž¶ážŸáž¶áž™áž¢áž¶ážáŸ’លាសកណ្ážáž¶áž›", + "udm": "អាážáŸ‹áž˜áž¼ážŠ", + "ug": "អ៊ុយហ្គឺរ", + "uk": "អ៊ុយក្រែន", + "umb": "អាម់ប៊ុនឌូ", + "und": "ភាសាមិនស្គាល់", + "ur": "អ៊ូរឌូ", + "uz": "អ៊ូសបáŸáž‚", + "vai": "វៃ", + "ve": "ážœáŸáž“ដា", + "vi": "វៀážážŽáž¶áž˜", + "vo": "វូឡាពូក", + "vun": "វុនចូ", + "wa": "វ៉ាលូន", + "wae": "ážœáŸáž›ážŸážº", + "wal": "វ៉ូឡាយážáž¶", + "war": "វ៉ារáŸáž™", + "wbp": "វ៉ារីប៉ារី", + "wo": "វូឡុហ្វ", + "xal": "កាលមីគ", + "xh": "ឃសា", + "xog": "សូហ្គា", + "yav": "យ៉ាងបáŸáž“", + "ybb": "áž™áŸáž˜áž”áž¶", + "yi": "យីឌីហ្ស", + "yo": "យរូបា", + "yue": "កន្ážáž¶áŸ†áž„", + "za": "ហ្សួង", + "zgh": "ážáž¶áž˜áŸ‰áž¶áž áŸ’សៃម៉ារ៉ុកស្ážáž„់ដា", + "zh": "áž…áž·áž“", + "zh_Hans": "ចិន​អក្សរ​កាážáŸ‹", + "zh_Hant": "ចិន​អក្សរ​ពáŸáž‰", + "zu": "សូលូ", + "zun": "ហ្សូនី", + "zxx": "គ្មាន​ទិន្ននáŸáž™â€‹áž—ាសា", + "zza": "ហ្សាហ្សា" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/kn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/kn.json new file mode 100644 index 0000000000000000000000000000000000000000..6ef0288f70e4dfe7b1d4ea978bee812d8d77c79b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/kn.json @@ -0,0 +1,520 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "ಅಫಾರà³", + "ab": "ಅಬà³à²–ಾಜಿಯನà³", + "ace": "ಅಛಿನೀಸà³", + "ach": "ಅಕೋಲಿ", + "ada": "ಅಡಂಗà³à²®à³†", + "ady": "ಅಡೈಘೆ", + "ae": "ಅವೆಸà³à²Ÿà²¨à³", + "af": "ಆಫà³à²°à²¿à²•ಾನà³à²¸à³", + "afh": "ಆಫà³à²°à²¿à²¹à²¿à²²à²¿", + "agq": "ಅಘೆಮà³", + "ain": "à²à²¨à³", + "ak": "ಅಕಾನà³", + "akk": "ಅಕà³à²•ಾಡಿಯನà³", + "ale": "ಅಲೆಯà³à²Ÿà³", + "alt": "ದಕà³à²·à²¿à²£ ಅಲà³à²Ÿà²¾à²¯à³", + "am": "ಅಂಹರಿಕà³", + "an": "ಅರಗೊನೀಸà³", + "ang": "ಪà³à²°à²¾à²šà³€à²¨ ಇಂಗà³à²²à³€à²·à³", + "anp": "ಆಂಗಿಕಾ", + "ar": "ಅರೇಬಿಕà³", + "ar_001": "ಆಧà³à²¨à²¿à²• ಪà³à²°à²®à²¾à²£à²¿à²¤ ಅರೇಬಿಕà³", + "arc": "ಅರಾಮಿಕà³", + "arn": "ಮಪà³à²šà³†", + "arp": "ಅರಪಾಹೋ", + "arw": "ಅರಾವಾಕà³", + "as": "ಅಸà³à²¸à²¾à²®à³€à²¸à³", + "asa": "ಅಸà³", + "ast": "ಆಸà³à²Ÿà³à²°à²¿à²¯à²¨à³", + "av": "ಅವರಿಕà³", + "awa": "ಅವಧಿ", + "ay": "ಅಯà³à²®à²¾à²°à²¾", + "az": "ಅಜೆರà³à²¬à³ˆà²œà²¾à²¨à²¿", + "ba": "ಬಶà³à²•ಿರà³", + "bal": "ಬಲೂಚಿ", + "ban": "ಬಲಿನೀಸà³", + "bas": "ಬಸಾ", + "be": "ಬೆಲರೂಸಿಯನà³", + "bej": "ಬೇಜಾ", + "bem": "ಬೆಂಬಾ", + "bez": "ಬೆನ", + "bg": "ಬಲà³à²—ೇರಿಯನà³", + "bgn": "ಪಶà³à²šà²¿à²® ಬಲೊಚಿ", + "bho": "ಭೋಜಪà³à²°à²¿", + "bi": "ಬಿಸà³à²²à²¾à²®à²¾", + "bik": "ಬಿಕೊಲà³", + "bin": "ಬಿನಿ", + "bla": "ಸಿಕà³à²¸à²¿à²•ಾ", + "bm": "ಬಂಬಾರಾ", + "bn": "ಬಾಂಗà³à²²à²¾", + "bo": "ಟಿಬೇಟಿಯನà³", + "br": "ಬà³à²°à³†à²Ÿà²¨à³", + "bra": "ಬà³à²°à²œà³", + "brx": "ಬೋಡೊ", + "bs": "ಬೋಸà³à²¨à²¿à²¯à²¨à³", + "bua": "ಬà³à²°à²¿à²¯à²Ÿà³", + "bug": "ಬà³à²—ಿನೀಸà³", + "byn": "ಬà³à²²à²¿à²¨à³", + "ca": "ಕೆಟಲಾನà³", + "cad": "ಕà³à²¯à²¾à²¡à³à²¡à³‹", + "car": "ಕಾರಿಬà³", + "cch": "ಅಟà³à²¸à²®à³", + "ce": "ಚೆಚನà³", + "ceb": "ಸೆಬà³à²†à²¨à³‹", + "cgg": "ಚಿಗಾ", + "ch": "ಕಮೊರೊ", + "chb": "ಚಿಬà³à²šà²¾", + "chg": "ಚಗಟಾಯà³", + "chk": "ಚೂಕಿಸೆ", + "chm": "ಮಾರಿ", + "chn": "ಚಿನೂಕೠಜಾರà³à²—ೋನà³", + "cho": "ಚೋಕà³à²Ÿà²¾à²µà³", + "chp": "ಚಿಪೆವà³à²¯à²¾à²¨à³", + "chr": "ಚೆರೋಕೀ", + "chy": "ಚೀಯೆನà³à²¨à³‡", + "ckb": "ಸೊರಾನಿ ಕà³à²°à³à²¦à²¿à²·à³", + "co": "ಕೋರà³à²¸à²¿à²•ನà³", + "cop": "ಕೊಪà³à²Ÿà²¿à²•à³", + "cr": "ಕà³à²°à³€", + "crh": "ಕà³à²°à²¿à²®à³€à²¯à²¨à³ ಟರà³à²•ಿಷà³", + "crs": "ಸೆಸೆಲà³à²µà²¾ ಕà³à²°à²¯à³‹à²²à³ ಫà³à²°à³†à²‚ಚà³", + "cs": "ಜೆಕà³", + "csb": "ಕಶà³à²¬à²¿à²¯à²¨à³", + "cu": "ಚರà³à²šà³ ಸà³à²²à²¾à²µà²¿à²•à³", + "cv": "ಚà³à²µà²¾à²¶à³", + "cy": "ವೆಲà³à²¶à³", + "da": "ಡà³à²¯à²¾à²¨à²¿à²¶à³", + "dak": "ಡಕೋಟಾ", + "dar": "ದರà³à²—à³à²µà²¾", + "dav": "ಟೈಟ", + "de": "ಜರà³à²®à²¨à³", + "de_AT": "ಆಸà³à²Ÿà³à²°à²¿à²¯à²¨à³ ಜರà³à²®à²¨à³", + "de_CH": "ಸà³à²µà²¿à²¸à³ ಹೈ ಜರà³à²®à²¨à³", + "del": "ಡೆಲಾವೇರà³", + "den": "ಸà³à²²à³‡à²µà³", + "dgr": "ಡೋಗà³à²°à²¿à²¬à³", + "din": "ಡಿಂಕಾ", + "dje": "ಜರà³à²®à²¾", + "doi": "ಡೋಗà³à²°à²¿", + "dsb": "ಲೋವರೠಸೋರà³à²¬à²¿à²¯à²¨à³", + "dua": "ಡà³à²µà²¾à²²à²¾", + "dum": "ಮಧà³à²¯ ಡಚà³", + "dv": "ದಿವೆಹಿ", + "dyo": "ಜೊಲ-ಫೊನà³à²¯à²¿", + "dyu": "ಡà³à²¯à³‚ಲಾ", + "dz": "ಜೋಂಗà³â€Œà²–ಾ", + "dzg": "ಡಜಾಗ", + "ebu": "ಎಂಬà³", + "ee": "ಈವà³", + "efi": "ಎಫಿಕà³", + "egy": "ಪà³à²°à²¾à²šà³€à²¨ ಈಜಿಪà³à²Ÿà²¿à²¯à²¨à³", + "eka": "ಎಕಾಜà³à²•à³", + "el": "ಗà³à²°à³€à²•à³", + "elx": "ಎಲಾಮೈಟà³", + "en": "ಇಂಗà³à²²à³€à²·à³", + "en_AU": "ಆಸà³à²Ÿà³à²°à³‡à²²à²¿à²¯à²¨à³ ಇಂಗà³à²²à³€à²·à³", + "en_CA": "ಕೆನೆಡಿಯನೠಇಂಗà³à²²à³€à²·à³", + "en_GB": "ಬà³à²°à²¿à²Ÿà²¿à²·à³ ಇಂಗà³à²²à³€à²·à³", + "en_US": "ಅಮೆರಿಕನೠಇಂಗà³à²²à³€à²·à³", + "enm": "ಮಧà³à²¯ ಇಂಗà³à²²à³€à²·à³", + "eo": "ಎಸà³à²ªà³†à²°à²¾à²‚ಟೊ", + "es": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³", + "es_419": "ಲà³à²¯à²¾à²Ÿà²¿à²¨à³ ಅಮೇರಿಕನೠಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³", + "es_ES": "ಯà³à²°à³‹à²ªà²¿à²¯à²¨à³ ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³", + "es_MX": "ಮೆಕà³à²¸à²¿à²•ನೠಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³", + "et": "ಎಸà³à²Ÿà³Šà²¨à²¿à²¯à²¨à³", + "eu": "ಬಾಸà³à²•à³", + "ewo": "ಇವಾಂಡೋ", + "fa": "ಪರà³à²¶à²¿à²¯à²¨à³", + "fan": "ಫಾಂಗà³", + "fat": "ಫಾಂಟಿ", + "ff": "ಫà³à²²à²¾à²¹à³", + "fi": "ಫಿನà³à²¨à²¿à²¶à³", + "fil": "ಫಿಲಿಪಿನೊ", + "fj": "ಫಿಜಿಯನà³", + "fo": "ಫರೋಸಿ", + "fon": "ಫೋನà³", + "fr": "ಫà³à²°à³†à²‚ಚà³", + "fr_CA": "ಕೆನೆಡಿಯನೠಫà³à²°à³†à²‚ಚà³", + "fr_CH": "ಸà³à²µà²¿à²¸à³ ಫà³à²°à³†à²‚ಚà³", + "frm": "ಮಧà³à²¯ ಫà³à²°à³†à²‚ಚà³", + "fro": "ಪà³à²°à²¾à²šà³€à²¨ ಫà³à²°à³†à²‚ಚà³", + "frr": "ಉತà³à²¤à²° ಫà³à²°à²¿à²¸à²¿à²¯à²¨à³", + "frs": "ಪೂರà³à²µ ಫà³à²°à²¿à²¸à²¿à²¯à²¨à³", + "fur": "ಫà³à²°à²¿à²¯à³à²²à²¿à²¯à²¨à³", + "fy": "ಪಶà³à²šà²¿à²® ಫà³à²°à²¿à²¸à²¿à²¯à²¨à³", + "ga": "à²à²°à²¿à²·à³", + "gaa": "ಗ", + "gag": "ಗಗೌಜà³", + "gan": "ಗಾನೠಚೀನೀಸà³", + "gay": "ಗಾಯೋ", + "gba": "ಗà³à²¬à²¾à²¯à²¾", + "gd": "ಸà³à²•ಾಟಿಶೠಗà³à²¯à²¾à²²à²¿à²•à³", + "gez": "ಗೀà²à³", + "gil": "ಗಿಲà³à²¬à²°à³à²Ÿà³€à²¸à³", + "gl": "ಗà³à²¯à²¾à²²à²¿à²¶à²¿à²¯à²¨à³", + "gmh": "ಮಧà³à²¯ ಹೈ ಜರà³à²®à²¨à³", + "gn": "ಗೌರಾನಿ", + "goh": "ಪà³à²°à²¾à²šà³€à²¨ ಹೈ ಜರà³à²®à²¨à³", + "gon": "ಗೊಂಡಿ", + "gor": "ಗೊರೊಂಟಾಲೋ", + "got": "ಗೋಥಿಕà³", + "grb": "ಗà³à²°à³‡à²¬à³‹", + "grc": "ಪà³à²°à²¾à²šà³€à²¨ ಗà³à²°à³€à²•à³", + "gsw": "ಸà³à²µà²¿à²¸à³ ಜರà³à²®à²¨à³", + "gu": "ಗà³à²œà²°à²¾à²¤à²¿", + "guz": "ಗà³à²¸à²¿", + "gv": "ಮà³à²¯à²¾à²‚ಕà³à²¸à³", + "gwi": "ಗà³à²µà²¿à²šà³â€Œà²‡à²¨à³", + "ha": "ಹೌಸಾ", + "hai": "ಹೈಡಾ", + "hak": "ಹಕà³", + "haw": "ಹವಾಯಿಯನà³", + "he": "ಹೀಬà³à²°à³à²¯à³‚", + "hi": "ಹಿಂದಿ", + "hil": "ಹಿಲಿಗೇನನà³", + "hit": "ಹಿಟà³à²Ÿà²¿à²Ÿà³†", + "hmn": "ಮೋಂಗà³", + "ho": "ಹಿರಿ ಮೊಟà³", + "hr": "ಕà³à²°à³Šà²¯à³‡à²¶à²¿à²¯à²¨à³", + "hsb": "ಅಪà³à²ªà²°à³ ಸರà³à²¬à²¿à²¯à²¨à³", + "hsn": "ಶಯಾಂಗೠಚೀನೀಸೇ", + "ht": "ಹೈಷಿಯನೠಕà³à²°à²¿à²¯à³‹à²²à³", + "hu": "ಹಂಗೇರಿಯನà³", + "hup": "ಹೂಪಾ", + "hy": "ಅರà³à²®à³‡à²¨à²¿à²¯à²¨à³", + "hz": "ಹೆರೆರೊ", + "ia": "ಇಂಟರà³â€Œà²²à²¿à²‚ಗà³à²µà²¾", + "iba": "ಇಬಾನà³", + "ibb": "ಇಬಿಬಿಯೋ", + "id": "ಇಂಡೋನೇಶಿಯನà³", + "ie": "ಇಂಟರà³à²²à²¿à²‚ಗà³", + "ig": "ಇಗà³à²¬à³Š", + "ii": "ಸಿಚà³à²…ನೠಯಿ", + "ik": "ಇನà³à²ªà²¿à²¯à²¾à²•à³", + "ilo": "ಇಲà³à²²à²¿à²•ೋ", + "inh": "ಇಂಗà³à²·à³", + "io": "ಇಡೊ", + "is": "à²à²¸à³à²²à²¾à²‚ಡಿಕà³", + "it": "ಇಟಾಲಿಯನà³", + "iu": "ಇನà³à²•à³à²Ÿà²¿à²Ÿà³à²Ÿà³", + "ja": "ಜಾಪನೀಸà³", + "jbo": "ಲೊಜà³à²¬à²¾à²¨à³", + "jgo": "ನೊಂಬಾ", + "jmc": "ಮà³à²¯à²•ಮೆ", + "jpr": "ಜೂಡಿಯೋ-ಪರà³à²¶à²¿à²¯à²¨à³", + "jrb": "ಜೂಡಿಯೋ-ಅರೇಬಿಕà³", + "jv": "ಜಾವಾನೀಸà³", + "ka": "ಜಾರà³à²œà²¿à²¯à²¨à³", + "kaa": "ಕಾರಾ-ಕಲà³à²ªà²¾à²•à³", + "kab": "ಕಬೈಲà³", + "kac": "ಕಚಿನà³", + "kaj": "ಜà³à²œà³", + "kam": "ಕಂಬಾ", + "kaw": "ಕಾವಿ", + "kbd": "ಕಬರà³à²¡à²¿à²¯à²¨à³", + "kcg": "ಟà³à²¯à²¾à²ªà³", + "kde": "ಮà³à²¯à²¾à²•ೊಂಡà³", + "kea": "ಕಬà³à²µà³†à²°à³à²¡à²¿à²¯à²¨à³", + "kfo": "ಕೋರೋ", + "kg": "ಕಾಂಗೋ", + "kha": "ಖಾಸಿ", + "kho": "ಖೋಟಾನೀಸà³", + "khq": "ಕೊಯà³à²° ಚೀನಿ", + "ki": "ಕಿಕà³à²¯à³", + "kj": "ಕà³à²µà²¾à²¨à³â€Œà²¯à²¾à²®à²¾", + "kk": "ಕà²à²•à³", + "kkj": "ಕಾಕೊ", + "kl": "ಕಲಾಲà³à²²à²¿à²¸à³à²Ÿà³", + "kln": "ಕಲೆಂಜಿನà³", + "km": "ಖಮೇರà³", + "kmb": "ಕಿಂಬà³à²‚ಡà³", + "kn": "ಕನà³à²¨à²¡", + "ko": "ಕೊರಿಯನà³", + "koi": "ಕೋಮಿ-ಪರà³à²®à³à²¯à²•à³", + "kok": "ಕೊಂಕಣಿ", + "kos": "ಕೊಸರಿಯನà³", + "kpe": "ಕಪೆಲà³à²²à³†", + "kr": "ಕನà³à²°à²¿", + "krc": "ಕರಚಯà³-ಬಲà³à²•ಾರà³", + "krl": "ಕರೇಲಿಯನà³", + "kru": "ಕà³à²°à³à²–à³", + "ks": "ಕಾಶà³à²®à³€à²°à²¿", + "ksb": "ಶಂಬಲ", + "ksf": "ಬಫಿಯ", + "ksh": "ಕಲೊಗà³à²¨à²¿à²¯à²¨à³", + "ku": "ಕà³à²°à³à²¦à²¿à²·à³", + "kum": "ಕà³à²®à³ˆà²•à³", + "kut": "ಕà³à²Ÿà³‡à²¨à²¾à²¯à³", + "kv": "ಕೋಮಿ", + "kw": "ಕಾರà³à²¨à²¿à²·à³", + "ky": "ಕಿರà³à²—ಿಜà³", + "la": "ಲà³à²¯à²¾à²Ÿà²¿à²¨à³", + "lad": "ಲà³à²¯à²¾à²¡à²¿à²¨à³‹", + "lag": "ಲಾಂಗಿ", + "lah": "ಲಹಂಡಾ", + "lam": "ಲಂಬಾ", + "lb": "ಲಕà³à²¸à²‚ಬರà³à²—ಿಷà³", + "lez": "ಲೆಜà³à²˜à²¿à²¯à²¨à³", + "lg": "ಗಾಂಡಾ", + "li": "ಲಿಂಬರà³à²—ಿಶà³", + "lkt": "ಲಕೊಟ", + "ln": "ಲಿಂಗಾಲ", + "lo": "ಲಾವೋ", + "lol": "ಮೊಂಗೋ", + "loz": "ಲೋà²à²¿", + "lrc": "ಉತà³à²¤à²° ಲೂರಿ", + "lt": "ಲಿಥà³à²µà³‡à²¨à²¿à²¯à²¨à³", + "lu": "ಲೂಬಾ-ಕಟಾಂಗಾ", + "lua": "ಲà³à²¬-ಲà³à²²à²¾", + "lui": "ಲೂಯಿಸೆನೋ", + "lun": "ಲà³à²‚ಡಾ", + "luo": "ಲà³à²µà³‹", + "lus": "ಮಿà²à³‹", + "luy": "ಲà³à²¯à²¿à²¯", + "lv": "ಲಟà³à²µà²¿à²¯à²¨à³", + "mad": "ಮದà³à²°à³€à²¸à³", + "mag": "ಮಗಾಹಿ", + "mai": "ಮೈಥಿಲಿ", + "mak": "ಮಕಾಸರà³", + "man": "ಮಂಡಿಂಗೊ", + "mas": "ಮಸಾಯà³", + "mdf": "ಮೋಕà³à²·", + "mdr": "ಮಂದಾರà³", + "men": "ಮೆಂಡೆ", + "mer": "ಮೆರà³", + "mfe": "ಮೊರಿಸನà³", + "mg": "ಮಲಗಾಸಿ", + "mga": "ಮಧà³à²¯ à²à²°à²¿à²·à³", + "mgh": "ಮà³à²¯à²–à³à²µà²¾- ಮೀಟà³à²Ÿà³Š", + "mgo": "ಮೆಟಾ", + "mh": "ಮಾರà³à²¶à²²à³à²²à³€à²¸à³", + "mi": "ಮಾವೋರಿ", + "mic": "ಮಿಕà³â€Œà²®à³à²¯à²¾à²•à³", + "min": "ಮಿನಂಗà³â€Œà²•ಬಾವà³", + "mk": "ಮೆಸಿಡೋನಿಯನà³", + "ml": "ಮಲಯಾಳಂ", + "mn": "ಮಂಗೋಲಿಯನà³", + "mnc": "ಮಂಚà³", + "mni": "ಮಣಿಪà³à²°à²¿", + "moh": "ಮೊಹಾವà³à²•à³", + "mos": "ಮೊಸà³à²¸à²¿", + "mr": "ಮರಾಠಿ", + "ms": "ಮಲಯà³", + "mt": "ಮಾಲà³à²Ÿà³€à²¸à³", + "mua": "ಮà³à²‚ಡಂಗà³", + "mul": "ಬಹà³à²¸à²‚ಖà³à²¯à³†à²¯ ಭಾಷೆಗಳà³", + "mus": "ಕà³à²°à³€à²•à³", + "mwl": "ಮಿರಾಂಡೀಸà³", + "mwr": "ಮಾರà³à²µà²¾à²¡à²¿", + "my": "ಬರà³à²®à³€à²¸à³", + "myv": "ಎರà³à²à³à²¯à²¾", + "mzn": "ಮಜಂದೆರಾನಿ", + "na": "ನೌರà³", + "nan": "ನಾನà³", + "nap": "ನಿಯಾಪೊಲಿಟನà³", + "naq": "ನಮ", + "nb": "ನಾರà³à²µà³†à²œà²¿à²¯à²¨à³ ಬೊಕà³à²®à²²à³", + "nd": "ಉತà³à²¤à²° ದೆಬೆಲೆ", + "nds": "ಲೋ ಜರà³à²®à²¨à³", + "nds_NL": "ಲೋ ಸà³à²¯à²¾à²•à³à²¸à²¨à³", + "ne": "ನೇಪಾಳಿ", + "new": "ನೇವಾರೀ", + "ng": "ಡೋಂಗಾ", + "nia": "ನಿಯಾಸà³", + "niu": "ನಿಯà³à²µà²¨à³", + "nl": "ಡಚà³", + "nl_BE": "ಫà³à²²à³†à²®à²¿à²·à³", + "nmg": "ಖà³à²µà²¾à²¸à²¿à²¯à³Š", + "nn": "ನಾರà³à²µà³‡à²œà²¿à²¯à²¨à³ ನೈನಾರà³à²¸à³à²•à³", + "nnh": "ನಿಂಬೂನà³", + "no": "ನಾರà³à²µà³‡à²œà²¿à²¯à²¨à³", + "nog": "ನೊಗಾಯà³", + "non": "ಪà³à²°à²¾à²šà³€à²¨ ನೋರà³à²¸à³", + "nqo": "ಎನà³â€Œà²•ೋ", + "nr": "ದಕà³à²·à²¿à²£ ದೆಬೆಲೆ", + "nso": "ಉತà³à²¤à²° ಸೋಥೋ", + "nus": "ನೂಯರà³", + "nv": "ನವಾಜೊ", + "nwc": "ಶಾಸà³à²¤à³à²°à³€à²¯ ನೇವಾರಿ", + "ny": "ನà³à²¯à²¾à²‚ಜಾ", + "nym": "ನà³à²¯à²¾à²®à³â€Œà²µà³†à²‚ಜಿ", + "nyn": "ನà³à²¯à²¾à²¨à³â€Œà²•ೋಲೆ", + "nyo": "ನà³à²¯à³‹à²°à³‹", + "nzi": "ಜೀಮಾ", + "oc": "ಒಸಿಟನà³", + "oj": "ಒಜಿಬà³à²µà²¾", + "om": "ಓರೊಮೋ", + "or": "ಒರಿಯಾ", + "os": "ಒಸà³à²¸à³†à²Ÿà²¿à²•à³", + "osa": "ಓಸಾಜà³", + "ota": "ಒಟà³à²Ÿà³‹à²®à²¨à³ ತà³à²°à³à²•ಿಷà³", + "pa": "ಪಂಜಾಬಿ", + "pag": "ಪಂಗಾಸಿನನà³", + "pal": "ಪಹà³à²²à²µà²¿", + "pam": "ಪಂಪಾಂಗಾ", + "pap": "ಪಾಪಿಯಮೆಂಟೋ", + "pau": "ಪಲà³à²†à²¨à³", + "pcm": "ನೈಜೀರಿಯನೠಪಿಡà³à²—ಿನà³", + "peo": "ಪà³à²°à²¾à²šà³€à²¨ ಪರà³à²¶à²¿à²¯à²¨à³", + "phn": "ಫೀನಿಷಿಯನà³", + "pi": "ಪಾಲಿ", + "pl": "ಪಾಲಿಷà³", + "pon": "ಪೋನà³â€Œâ€Œà²ªà²¿à²¯à²¨à³", + "prg": "ಪà³à²°à²¶à²¿à²¯à²¨à³", + "pro": "ಪà³à²°à²¾à²šà³€à²¨ ಪà³à²°à³Šà²µà³†à²¨à³à²¶à²¿à²¯à²²à³", + "ps": "ಪಾಷà³à²Ÿà³‹", + "pt": "ಪೋರà³à²šà³à²—ೀಸà³", + "pt_BR": "ಬà³à²°à³†à²œà²¿à²²à²¿à²¯à²¨à³ ಪೋರà³à²šà³à²—ೀಸà³", + "pt_PT": "ಯೂರೋಪಿಯನೠಪೋರà³à²šà³à²—ೀಸà³", + "qu": "ಕà³à²µà³†à²šà³à²µà²¾", + "quc": "ಕಿಷೆ", + "raj": "ರಾಜಸà³à²¥à²¾à²¨à²¿", + "rap": "ರಾಪಾನà³à²¯à²¿", + "rar": "ರಾರೋಟೊಂಗನà³", + "rm": "ರೊಮಾನà³à²·à³", + "rn": "ರà³à²‚ಡಿ", + "ro": "ರೊಮೇನಿಯನà³", + "ro_MD": "ಮಾಲà³à²¡à³‡à²µà²¿à²¯à²¨à³", + "rof": "ರೊಂಬೊ", + "rom": "ರೋಮಾನಿ", + "root": "ರೂಟà³", + "ru": "ರಷà³à²¯à²¨à³", + "rup": "ಅರೋಮಾನಿಯನà³", + "rw": "ಕೀನà³à²¯à²¾à²°à³à²µà²¾à²‚ಡಾ", + "rwk": "ರà³à²µ", + "sa": "ಸಂಸà³à²•ೃತ", + "sad": "ಸಂಡಾವೇ", + "sah": "ಸಖಾ", + "sam": "ಸಮರಿಟನೠಅರಾಮಿಕà³", + "saq": "ಸಂಬà³à²°à³", + "sas": "ಸಸಾಕà³", + "sat": "ಸಂತಾಲಿ", + "sba": "ನಂಬೇ", + "sbp": "ಸಂಗà³", + "sc": "ಸರà³à²¡à³€à²¨à²¿à²¯à²¨à³", + "scn": "ಸಿಸಿಲಿಯನà³", + "sco": "ಸà³à²•ೋಟà³à²¸à³", + "sd": "ಸಿಂಧಿ", + "sdh": "ದಕà³à²·à²¿à²£ ಕà³à²°à³à²¦à²¿à²¶à³", + "se": "ಉತà³à²¤à²° ಸಾಮಿ", + "seh": "ಸೆನ", + "sel": "ಸೆಲà³à²•ಪà³", + "ses": "ಕೊಯà³à²°à²¬à³Šà²°à³Š ಸೆನà³à²¨à²¿", + "sg": "ಸಾಂಗೋ", + "sga": "ಪà³à²°à²¾à²šà³€à²¨ à²à²°à²¿à²·à³", + "sh": "ಸರà³à²¬à³‹-ಕà³à²°à³Šà²¯à³‡à²¶à²¿à²¯à²¨à³", + "shi": "ಟಷೆಲà³â€à²¹à²¿à²Ÿà³", + "shn": "ಶಾನà³", + "si": "ಸಿಂಹಳ", + "sid": "ಸಿಡಾಮೋ", + "sk": "ಸà³à²²à³‹à²µà²¾à²•à³", + "sl": "ಸà³à²²à³‹à²µà³‡à²¨à²¿à²¯à²¨à³", + "sm": "ಸಮೋವನà³", + "sma": "ದಕà³à²·à²¿à²£ ಸಾಮಿ", + "smj": "ಲೂಲೠಸಾಮಿ", + "smn": "ಇನರಿ ಸಾಮಿ", + "sms": "ಸà³à²•ೋಟೠಸಾಮಿ", + "sn": "ಶೋನಾ", + "snk": "ಸೋನಿಂಕೆ", + "so": "ಸೊಮಾಲಿ", + "sog": "ಸೋಗà³à²¡à²¿à²¯à²¨à³", + "sq": "ಅಲà³à²¬à³‡à²¨à²¿à²¯à²¨à³", + "sr": "ಸರà³à²¬à²¿à²¯à²¨à³", + "srn": "ಸà³à²°à²¾à²¨à²¨à³ ಟೋಂಗೋ", + "srr": "ಸೇರೇರà³", + "ss": "ಸà³à²µà²¾à²¤à²¿", + "ssy": "ಸಹೊ", + "st": "ದಕà³à²·à²¿à²£ ಸೋಥೋ", + "su": "ಸà³à²‚ಡಾನೀಸà³", + "suk": "ಸà³à²•à³à²®à²¾", + "sus": "ಸà³à²¸à³", + "sux": "ಸà³à²®à³‡à²°à²¿à²¯à²¨à³", + "sv": "ಸà³à²µà³€à²¡à²¿à²·à³", + "sw": "ಸà³à²µà²¹à²¿à²²à²¿", + "sw_CD": "ಕಾಂಗೊ ಸà³à²µà²¹à²¿à²²à²¿", + "swb": "ಕೊಮೊರಿಯನà³", + "syc": "ಶಾಸà³à²¤à³à²°à³€à²¯ ಸಿರಿಯಕà³", + "syr": "ಸಿರಿಯಕà³", + "ta": "ತಮಿಳà³", + "te": "ತೆಲà³à²—à³", + "tem": "ಟಿಮà³à²¨à³†", + "teo": "ಟೆಸೊ", + "ter": "ಟೆರೆನೋ", + "tet": "ಟೇಟಮà³", + "tg": "ತಾಜಿಕà³", + "th": "ಥಾಯà³", + "ti": "ಟಿಗà³à²°à²¿à²¨à³à²¯à²¾", + "tig": "ಟೈಗà³à²°à³†", + "tiv": "ಟಿವà³", + "tk": "ಟರà³à²•à³â€Œà²®à³†à²¨à³", + "tkl": "ಟೊಕೆಲಾವà³", + "tl": "ಟà³à²¯à²¾à²—ಲೋಗà³", + "tlh": "ಕà³à²²à²¿à²‚ಗನà³", + "tli": "ಟà³à²²à²¿à²‚ಗಿಟà³", + "tmh": "ಟಮಾಷೆಕà³", + "tn": "ಸà³à²µà²¾à²¨à²¾", + "to": "ಟೋಂಗನà³", + "tog": "ನà³à²¯à²¾à²¸à²¾ ಟೋಂಗಾ", + "tpi": "ಟೋಕೠಪಿಸಿನà³", + "tr": "ಟರà³à²•ಿಶà³", + "trv": "ಟರೊಕೊ", + "ts": "ಸೋಂಗಾ", + "tsi": "ಸಿಂಶಿಯನà³", + "tt": "ಟಾಟರà³", + "tum": "ತà³à²‚ಬà³à²•ಾ", + "tvl": "ಟà³à²µà²¾à²²à³", + "tw": "ಟà³à²µà²¿", + "twq": "ಟಸವಕà³", + "ty": "ಟಹೀಟಿಯನà³", + "tyv": "ಟà³à²µà²¿à²¨à²¿à²¯à²¨à³", + "tzm": "ಮಧà³à²¯ ಅಟà³à²²à²¾à²¸à³ ಟಮಜೈಟà³", + "udm": "ಉಡà³â€Œà²®à³à²°à³à²Ÿà³", + "ug": "ಉಯಿಘರà³", + "uga": "ಉಗಾರಿಟಿಕà³", + "uk": "ಉಕà³à²°à³ˆà²¨à²¿à²¯à²¨à³", + "umb": "ಉಂಬà³à²‚ಡà³", + "und": "ಅಪರಿಚಿತ ಭಾಷೆ", + "ur": "ಉರà³à²¦à³", + "uz": "ಉಜà³à²¬à³‡à²•à³", + "vai": "ವಾಯಿ", + "ve": "ವೆಂಡಾ", + "vi": "ವಿಯೇಟà³à²¨à²¾à²®à³€à²¸à³", + "vo": "ವೋಲಾಪà³à²•à³", + "vot": "ವೋಟಿಕà³", + "vun": "ವà³à²‚ಜೊ", + "wa": "ವಾಲೂನà³", + "wae": "ವಾಲà³à²¸à²°à³", + "wal": "ವಲಾಯà³à²¤à²¾", + "war": "ವರಾಯà³", + "was": "ವಾಷೋ", + "wbp": "ವಾರà³à²²à³â€Œà²ªà²¿à²°à²¿", + "wo": "ವೋಲೋಫà³", + "wuu": "ವà³", + "xal": "ಕಲà³à²®à³ˆà²•à³", + "xh": "ಕà³à²¸à³‹à²¸", + "xog": "ಸೊಗ", + "yao": "ಯಾವೊ", + "yap": "ಯಪೀಸೆ", + "yav": "ಯಾಂಗà³à²¬à³†à²¨à³", + "ybb": "ಯೆಂಬಾ", + "yi": "ಯಿಡà³à²¡à²¿à²¶à³", + "yo": "ಯೊರà³à²¬à²¾", + "yue": "ಕà³à²¯à²¾à²‚ಟನೀಸà³", + "za": "à²à³‚ವಾಂಗà³", + "zap": "à²à³‹à²ªà³Šà²Ÿà³†à²•à³", + "zbl": "ಬà³à²²à²¿à²¸à³à²¸à²¿à²‚ಬಲà³à²¸à³", + "zen": "à²à³†à²¨à²¾à²—ಾ", + "zgh": "ಸà³à²Ÿà³à²¯à²¾à²‚ಡರà³à²¡à³ ಮೊರೊಕà³à²•ನೠಟಮಜೈಟà³", + "zh": "ಚೈನೀಸà³", + "zh_Hans": "ಸರಳೀಕೃತ ಚೈನೀಸà³", + "zh_Hant": "ಸಾಂಪà³à²°à²¦à²¾à²¯à²¿à²• ಚೈನೀಸà³", + "zu": "ಜà³à²²à³", + "zun": "à²à³‚ನಿ", + "zxx": "ಯಾವà³à²¦à³‡ ಭಾಷಾಸಂಬಂಧಿ ವಿಷಯವಿಲà³à²²", + "zza": "ಜಾà²à²¾" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ko.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ko.json new file mode 100644 index 0000000000000000000000000000000000000000..1a884d7b2d1afe3e712ae9e2bc303bf48e29ef8a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ko.json @@ -0,0 +1,537 @@ +{ + "Version": "2.1.29.22", + "Names": { + "aa": "아파르어", + "ab": "압카즈어", + "ace": "ì•„ì²´ì–´", + "ach": "아콜리어", + "ada": "아당메어", + "ady": "아디게어", + "ae": "아베스타어", + "aeb": "튀니지 ì•„ëžì–´", + "af": "아프리칸스어", + "afh": "아프리ížë¦¬ì–´", + "agq": "아그햄어", + "ain": "ì•„ì´ëˆ„ì–´", + "ak": "아칸어", + "akk": "아카드어", + "ale": "알류트어", + "alt": "남부 알타ì´ì–´", + "am": "암하ë¼ì–´", + "an": "ì•„ë¼ê³¤ì–´", + "ang": "고대 ì˜ì–´", + "anp": "앙가어", + "ar": "ì•„ëžì–´", + "ar_001": "현대 표준 ì•„ëžì–´", + "arc": "아람어", + "arn": "ì•„ë¼ìš°ì¹¸ì–´", + "arp": "ì•„ë¼íŒŒí˜¸ì–´", + "arq": "알제리 ì•„ëžì–´", + "arw": "ì•„ë¼ì™€í¬ì–´", + "ary": "모로코 ì•„ëžì–´", + "arz": "ì´ì§‘트 ì•„ëžì–´", + "as": "아삼어", + "asa": "아수어", + "ast": "아스투리아어", + "av": "아바릭어", + "awa": "아와히어", + "ay": "ì•„ì´ë§ˆë¼ì–´", + "az": "아제르바ì´ìž”ì–´", + "ba": "바슈키르어", + "bal": "발루치어", + "ban": "발리어", + "bas": "바사어", + "bax": "바문어", + "bbj": "ê³ ë§ë¼ì–´", + "be": "벨ë¼ë£¨ìŠ¤ì–´", + "bej": "ë² ìžì–´", + "bem": "벰바어", + "bez": "베나어", + "bfd": "바푸트어", + "bg": "불가리아어", + "bgn": "서부 발로치어", + "bho": "호즈푸리어", + "bi": "비슬ë¼ë§ˆì–´", + "bik": "비콜어", + "bin": "비니어", + "bkm": "콤어", + "bla": "ì‹ì‹œì¹´ì–´", + "bm": "밤바ë¼ì–´", + "bn": "벵골어", + "bo": "티베트어", + "br": "브르타뉴어", + "bra": "브ë¼ì§€ì–´", + "brh": "브ë¼í›„ì´ì–´", + "brx": "ë³´ë„ì–´", + "bs": "보스니아어", + "bss": "아쿠즈어", + "bua": "부리아타", + "bug": "부기어", + "bum": "불루어", + "byn": "브린어", + "byv": "메둠바어", + "ca": "카탈로니아어", + "cad": "ì¹´ë„ì–´", + "car": "카리브어", + "cay": "카유가어", + "cch": "앗삼어", + "ce": "체첸어", + "ceb": "세부아노어", + "cgg": "치가어", + "ch": "차모로어", + "chb": "치브차어", + "chg": "차가타ì´ì–´", + "chk": "ì¶”í¬ì–´", + "chm": "마리어", + "chn": "ì¹˜ëˆ„í¬ ìžê³¤", + "cho": "촉토어", + "chp": "치페우얀", + "chr": "체로키어", + "chy": "샤ì´ì—”ì–´", + "ckb": "소ë¼ë‹ˆ 쿠르드어", + "co": "코르시카어", + "cop": "콥트어", + "cr": "í¬ë¦¬ì–´", + "crh": "í¬ë¦¬ë¯¼ 터키어; í¬ë¦¬ë¯¼ 타타르어", + "crs": "세ì´ì…¸ í¬ë¦¬ì˜¬ 프랑스어", + "cs": "체코어", + "csb": "카슈비아어", + "cu": "êµíšŒ 슬ë¼ë¸Œì–´", + "cv": "추바시어", + "cy": "웨ì¼ìŠ¤ì–´", + "da": "ë´ë§ˆí¬ì–´", + "dak": "다코타어", + "dar": "다르그와어", + "dav": "타ì´íƒ€ì–´", + "de": "ë…ì¼ì–´", + "de_CH": "ê³ ì§€ ë…ì¼ì–´(스위스)", + "del": "ë¸ë¼ì›¨ì–´ì–´", + "den": "슬ë¼ë¸Œì–´", + "dgr": "ë„그리브어", + "din": "딩카어", + "dje": "ìžë¥´ë§ˆì–´", + "doi": "ë„그리어", + "dsb": "저지 소르비아어", + "dua": "ë‘알ë¼ì–´", + "dum": "중세 네ëœëž€ë“œì–´", + "dv": "디베히어", + "dyo": "ì¡¸ë¼ í¬ë‹ˆì–´", + "dyu": "드율ë¼ì–´", + "dz": "종카어", + "dzg": "다장가어", + "ebu": "엠부어", + "ee": "ì—웨어", + "efi": "ì´í”½ì–´", + "egy": "고대 ì´ì§‘트어", + "eka": "ì´ì¹´ì£½ì–´", + "el": "그리스어", + "elx": "엘람어", + "en": "ì˜ì–´", + "en_AU": "ì˜ì–´(호주)", + "enm": "중세 ì˜ì–´", + "eo": "ì—스페란토어", + "es": "스페ì¸ì–´", + "et": "ì—스토니아어", + "eu": "바스í¬ì–´", + "ewo": "ì´ì›ë„ì–´", + "fa": "페르시아어", + "fan": "팡그어", + "fat": "íŒí‹°ì–´", + "ff": "í’€ë¼ì–´", + "fi": "핀란드어", + "fil": "필리핀어", + "fj": "피지어", + "fo": "페로어", + "fon": "í°ì–´", + "fr": "프랑스어", + "frm": "중세 프랑스어", + "fro": "고대 프랑스어", + "frr": "ë¶ë¶€ 프리지아어", + "frs": "ë™ë¶€ 프리슬란드어", + "fur": "프리울리어", + "fy": "서부 프리지아어", + "ga": "ì•„ì¼ëžœë“œì–´", + "gaa": "가어", + "gag": "가가우스어", + "gan": "ê°„ì–´", + "gay": "가요어", + "gba": "그바야어", + "gbz": "조로아스터 다리어", + "gd": "스코틀랜드 게ì¼ì–´", + "gez": "게ì´ì¦ˆì–´", + "gil": "키리바시어", + "gl": "갈리시아어", + "glk": "길ë¼í‚¤ì–´", + "gmh": "중세 ê³ ì§€ ë…ì¼ì–´", + "gn": "ê³¼ë¼ë‹ˆì–´", + "goh": "고대 ê³ ì§€ ë…ì¼ì–´", + "gom": "ê³ ì•„ 콘칸어", + "gon": "곤디어", + "gor": "고론탈로어", + "got": "고트어", + "grb": "게르보어", + "grc": "고대 그리스어", + "gsw": "ë…ì¼ì–´(스위스)", + "gu": "구ìžë¼íŠ¸ì–´", + "guz": "구시어", + "gv": "ë§¹í¬ìŠ¤ì–´", + "gwi": "그위친어", + "ha": "하우사어", + "hai": "하ì´ë‹¤ì–´", + "hak": "하카어", + "haw": "하와ì´ì–´", + "he": "히브리어", + "hi": "힌디어", + "hif": "피지 힌디어", + "hil": "헤리가뇬어", + "hit": "하타ì´íŠ¸ì–´", + "hmn": "히몸어", + "ho": "히리 모투어", + "hr": "í¬ë¡œì•„í‹°ì•„ì–´", + "hsb": "ê³ ì§€ 소르비아어", + "hsn": "샹어", + "ht": "ì•„ì´í‹°ì–´", + "hu": "í—가리어", + "hup": "후파어", + "hy": "아르메니아어", + "hz": "헤레로어", + "ia": "ì¸í„°ë§êµ¬ì•„", + "iba": "ì´ë°˜ì–´", + "ibb": "ì´ë¹„비오어", + "id": "ì¸ë„네시아어", + "ie": "ì¸í…Œë¥´ë§êµ¬ì—", + "ig": "ì´ê·¸ë³´ì–´", + "ii": "ì“°ì´¨ ì´ì–´", + "ik": "ì´ëˆ„피아í¬ì–´", + "ilo": "ì´ë¡œì½”ì–´", + "inh": "ì¸ê·€ì‹œì–´", + "io": "ì´ë„ì–´", + "is": "ì•„ì´ìŠ¬ëž€ë“œì–´", + "it": "ì´íƒˆë¦¬ì•„ì–´", + "iu": "ì´ëˆ…티투트어", + "ja": "ì¼ë³¸ì–´", + "jbo": "로반어", + "jgo": "ì‘곰바어", + "jmc": "마차메어", + "jpr": "유대-페르시아어", + "jrb": "유대-ì•„ë¼ë¹„ì•„ì–´", + "jv": "ìžë°”ì–´", + "ka": "조지아어", + "kaa": "ì¹´ë¼ì¹¼íŒŒí¬ì–´", + "kab": "커바ì¼ì–´", + "kac": "카친어", + "kaj": "까꼬토ë„ì–´", + "kam": "캄바어", + "kaw": "카위어", + "kbd": "카바르디어", + "kbl": "카넴부어", + "kcg": "í‹°ì–ì–´", + "kde": "마콘ë°ì–´", + "kea": "í¬ë¦¬ì˜¬ì–´", + "kfo": "코로어", + "kg": "콩고어", + "kha": "카시어", + "kho": "호탄어", + "khq": "ì½”ì´ë¼ 친니어", + "khw": "코와르어", + "ki": "키쿠유어", + "kj": "쿠안야마어", + "kk": "ì¹´ìžíì–´", + "kkj": "카코어", + "kl": "그린란드어", + "kln": "칼렌진어", + "km": "í¬ë©”르어", + "kmb": "í‚´ë¶„ë‘ì–´", + "kn": "칸나다어", + "ko": "한국어", + "koi": "코미페르먀í¬ì–´", + "kok": "코카니어", + "kos": "코스ë¼ì´ì—”ì–´", + "kpe": "í¬íŽ ë ˆì–´", + "kr": "칸누리어", + "krc": "ì¹´ë¼ì± ì´-발카르어", + "krl": "ì¹´ë ë¦¬ì•¼ì–´", + "kru": "쿠르í¬ì–´", + "ks": "카슈미르어", + "ksb": "샴발ë¼ì–´", + "ksf": "바피아어", + "ksh": "콜로그니안어", + "ku": "쿠르드어", + "kum": "쿠믹어", + "kut": "쿠테네어", + "kv": "코미어", + "kw": "콘월어", + "ky": "키르기스어", + "la": "ë¼í‹´ì–´", + "lad": "ë¼ë””노어", + "lag": "랑기어", + "lah": "ë¼í•œë‹¤ì–´", + "lam": "람바어", + "lb": "룩셈부르í¬ì–´", + "lez": "레즈기안어", + "lfn": "ë§êµ¬ì•„ 프랑카 노바", + "lg": "간다어", + "li": "림버거어", + "lkt": "ë¼ì½”타어", + "ln": "ë§ê°ˆë¼ì–´", + "lo": "ë¼ì˜¤ì–´", + "lol": "몽고어", + "loz": "로지어", + "lrc": "ë¶ë¶€ 루리어", + "lt": "리투아니아어", + "lu": "루바-카탄가어", + "lua": "루바-룰루아어", + "lui": "루ì´ì„¸ë…¸ì–´", + "lun": "룬다어", + "luo": "루오어", + "lus": "루샤ì´ì–´", + "luy": "루야어", + "lv": "ë¼íŠ¸ë¹„ì•„ì–´", + "mad": "마ë‘ë¼ì–´", + "maf": "마파어", + "mag": "마가히어", + "mai": "마ì´í‹¸ë¦¬ì–´", + "mak": "마카사어", + "man": "만딩고어", + "mas": "마사ì´ì–´", + "mde": "마바어", + "mdf": "모í¬ìƒ¤ì–´", + "mdr": "만다르어", + "men": "멘ë°ì–´", + "mer": "메루어", + "mfe": "모리스얀어", + "mg": "ë§ë¼ê°€ì‹œì–´", + "mga": "중세 ì•„ì¼ëžœë“œì–´", + "mgh": "마í¬í›„와-메토어", + "mgo": "메타어", + "mh": "마셜어", + "mi": "마오리어", + "mic": "미í¬ë§¥ì–´", + "min": "미낭카바우어", + "mk": "마케ë„니아어", + "ml": "ë§ë¼ì–„람어", + "mn": "몽골어", + "mnc": "만주어", + "mni": "마니푸리어", + "moh": "모호í¬ì–´", + "mos": "모시어", + "mr": "마ë¼í‹°ì–´", + "mrj": "서부 마리어", + "ms": "ë§ë ˆì´ì–´", + "mt": "몰타어", + "mua": "문당어", + "mul": "다중 언어", + "mus": "í¬ë¦¬í¬ì–´", + "mwl": "미란ë°ì–´", + "mwr": "마르와리어", + "my": "버마어", + "mye": "미예네어", + "myv": "엘즈야어", + "mzn": "마잔ë°ë¼ë‹ˆì–´", + "na": "나우루어", + "nan": "민난어", + "nap": "나í´ë¦¬ì–´", + "naq": "나마어", + "nb": "노르웨ì´ì–´(ë³´í¬ë§)", + "nd": "ë¶ë¶€ ì€ë°ë²¨ë ˆì–´", + "nds": "저지 ë…ì¼ì–´", + "nds_NL": "저지 색슨어", + "ne": "네팔어", + "new": "네와르어", + "ng": "ëŠë™ê°€ì–´", + "nia": "니아스어", + "niu": "니웨언어", + "nl": "네ëœëž€ë“œì–´", + "nl_BE": "플ë¼ë§ì–´", + "nmg": "í¬ì™€ì‹œì˜¤ì–´", + "nn": "노르웨ì´ì–´(니노르스í¬)", + "nnh": "ëŠê¸°ì— ë³¸ì–´", + "no": "노르웨ì´ì–´", + "nog": "노가ì´ì–´", + "non": "고대 노르웨ì´ì–´", + "nqo": "ì‘코어", + "nr": "남부 ì€ë°ë²¨ë ˆì–´", + "nso": "ë¶ë¶€ 소토어", + "nus": "누ì—르어", + "nv": "나바호어", + "nwc": "ê³ ì „ 네와르어", + "ny": "냔ìžì–´", + "nym": "니암웨지어", + "nyn": "니안콜어", + "nyo": "뉴로어", + "nzi": "ëŠì§€ë§ˆì–´", + "oc": "오í¬ì–´", + "oj": "오지브와어", + "om": "오로모어", + "or": "오리야어", + "os": "오세트어", + "osa": "오세ì´ì§€ì–´", + "ota": "오스만 터키어", + "pa": "펀잡어", + "pag": "íŒê°€ì‹œë‚œì–´", + "pal": "팔레비어", + "pam": "팜팡가어", + "pap": "파피아먼토어", + "pau": "팔ë¼ìš°ì–´", + "pcm": "나ì´ì§€ë¦¬ì•„ 피진어", + "peo": "고대 페르시아어", + "phn": "페니키아어", + "pi": "팔리어", + "pl": "í´ëž€ë“œì–´", + "pnt": "í°í‹±ì–´", + "pon": "í¼íŽ˜ì´ì–´", + "prg": "프러시아어", + "pro": "고대 프로방스어", + "ps": "파슈토어", + "pt": "í¬ë¥´íˆ¬ê°ˆì–´", + "qu": "케추아어", + "quc": "키체어", + "raj": "ë¼ìžìŠ¤íƒ„ì–´", + "rap": "ë¼íŒŒë‰´ì´", + "rar": "ë¼ë¡œí†µê°€ì–´", + "rm": "로만시어", + "rn": "룬디어", + "ro": "루마니아어", + "ro_MD": "몰ë„바어", + "rof": "롬보어", + "rom": "집시어", + "root": "ì–´ê·¼", + "ru": "러시아어", + "rue": "루신어", + "rup": "아로마니아어", + "rw": "르완다어", + "rwk": "르와어", + "sa": "산스í¬ë¦¬íŠ¸ì–´", + "sad": "산다웨어", + "sah": "야쿠트어", + "sam": "사마리아 ì•„ëžì–´", + "saq": "삼부루어", + "sas": "사사í¬ì–´", + "sat": "산탈리어", + "sba": "ëŠê°ë°”ì´ì–´", + "sbp": "ìƒêµ¬ì–´", + "sc": "사르디니아어", + "scn": "시칠리아어", + "sco": "스코틀랜드어", + "sd": "신디어", + "sdh": "남부 쿠르드어", + "se": "ë¶ë¶€ 사미어", + "see": "세네카어", + "seh": "세나어", + "sel": "셀쿠프어", + "ses": "ì½”ì´ì•¼ë³´ë¡œ 세니어", + "sg": "ì‚°ê³ ì–´", + "sga": "고대 ì•„ì¼ëžœë“œì–´", + "sh": "세르비아-í¬ë¡œì•„í‹°ì•„ì–´", + "shi": "타셸히트어", + "shn": "샨어", + "shu": "차디언 ì•„ë¼ë¹„ì•„ì–´", + "si": "스리랑카어", + "sid": "시다모어", + "sk": "슬로바키아어", + "sl": "슬로베니아어", + "sm": "사모아어", + "sma": "남부 사미어", + "smj": "룰레 사미어", + "smn": "ì´ë‚˜ë¦¬ 사미어", + "sms": "스콜트 사미어", + "sn": "쇼나어", + "snk": "소닌케어", + "so": "소ë§ë¦¬ì•„ì–´", + "sog": "소그디엔어", + "sq": "알바니아어", + "sr": "세르비아어", + "srn": "스ë¼ë‚œ 통가어", + "srr": "세레르어", + "ss": "시스와티어", + "ssy": "사호어", + "st": "남부 소토어", + "su": "순다어", + "suk": "수쿠마어", + "sus": "수수어", + "sux": "수메르어", + "sv": "스웨ë´ì–´", + "sw": "스와ížë¦¬ì–´", + "sw_CD": "콩고 스와ížë¦¬ì–´", + "swb": "코모로어", + "syc": "ê³ ì „ 시리아어", + "syr": "시리아어", + "ta": "타밀어", + "te": "텔루구어", + "tem": "팀니어", + "teo": "테조어", + "ter": "테레노어", + "tet": "테툼어", + "tg": "타지í¬ì–´", + "th": "태국어", + "ti": "티그리ëƒì–´", + "tig": "티그레어", + "tiv": "티브어", + "tk": "투르í¬ë©˜ì–´", + "tkl": "토켈ë¼ìš°ì œë„ì–´", + "tkr": "차후르어", + "tl": "타갈로그어", + "tlh": "í´ë§ì˜¨ì–´", + "tli": "í‹€ë§ê¹ƒì¡±ì–´", + "tly": "탈리쉬어", + "tmh": "타마섹어", + "tn": "츠와나어", + "to": "통가어", + "tog": "니아사 통가어", + "tpi": "í† í¬ í”¼ì‹ ì–´", + "tr": "터키어", + "trv": "타로코어", + "ts": "ì´ê°€ì–´", + "tsi": "트심시안어", + "tt": "타타르어", + "tum": "툼부카어", + "tvl": "투발루어", + "tw": "트위어", + "twq": "타사와í¬ì–´", + "ty": "타히티어", + "tyv": "투비니안어", + "tzm": "중앙 모로코 타마지트어", + "udm": "우드ë§íŠ¸ì–´", + "ug": "위구르어", + "uga": "유가리틱어", + "uk": "ìš°í¬ë¼ì´ë‚˜ì–´", + "umb": "움분ë‘ì–´", + "und": "알 수 없는 언어", + "ur": "우르ë‘ì–´", + "uz": "우즈베í¬ì–´", + "vai": "ë°”ì´ì–´", + "ve": "벤다어", + "vi": "베트남어", + "vo": "ë³¼ë¼í“Œí¬ì–´", + "vot": "보틱어", + "vun": "ë¶„ì¡°ì–´", + "wa": "왈론어", + "wae": "월저어", + "wal": "ì›”ë¼ì´íƒ€ì–´", + "war": "와ë¼ì´ì–´", + "was": "와쇼어", + "wbp": "왈피리어", + "wo": "월로프어", + "wuu": "ìš°ì–´", + "xal": "칼미í¬ì–´", + "xh": "코사어", + "xog": "소가어", + "yao": "야오족어", + "yap": "ì–페세어", + "yav": "양본어", + "ybb": "옘바어", + "yi": "ì´ë””시어", + "yo": "요루바어", + "yue": "광둥어", + "za": "주앙어", + "zap": "사í¬í…Œí¬ì–´", + "zbl": "블리스 심볼", + "zen": "제나가어", + "zgh": "표준 모로코 타마지트어", + "zh": "중국어", + "zu": "줄루어", + "zun": "주니어", + "zxx": "언어 관련 ë‚´ìš© ì—†ìŒ", + "zza": "ìžìžì–´" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ks.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ks.json new file mode 100644 index 0000000000000000000000000000000000000000..63a8efc8a0ab8ba4e41e0101421cfc27cd4090f2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ks.json @@ -0,0 +1,441 @@ +{ + "Version": "2.1.30.6", + "Names": { + "aa": "Ø§ÙŽÙØ§Ø±", + "ab": "اَبخازÙیان", + "ace": "اَچَےنیٖز", + "ach": "اَکولی", + "ada": "اَدَنٛگمیے", + "ady": "اَدَیٖگیے", + "ae": "اَویستَن", + "af": "Ø§ÙŽÙØ±ÛŒÙ–کانٛز", + "afh": "Ø§ÙŽÙØ±ÙÛÙÙ„ÛŒ", + "ain": "اینوٗ", + "ak": "اَکان", + "akk": "اَکادÙیَن", + "ale": "اَلویتی", + "alt": "جنوٗبی اَلتایی", + "am": "Ø§ÙŽÙ…ÛØ§Ø±ÛŒ", + "an": "اَراگونی", + "ang": "پرون اَنٛگریٖزی", + "anp": "اَنٛگÙکا", + "ar": "عربی", + "arc": "اَرَمیک", + "arn": "ایرو کونÙیَن", + "arp": "اَراپاÛÙˆ", + "arw": "اَراوَک", + "as": "اسٲمÛ", + "ast": "ایسٹوٗریَن", + "av": "اَوارÙÚ©", + "awa": "اَوَدی", + "ay": "ایمارا", + "az": "اَزَربیجانی", + "ba": "بَشکیٖر", + "bal": "بَلوٗچی", + "ban": "بالÙنیٖز", + "bas": "باسا", + "be": "بیلَروٗشیَن", + "bej": "بیجا", + "bem": "بیٚمبا", + "bg": "بینا", + "bho": "بوجپوٗری", + "bi": "Ø¨ÙØ³Ù„اما", + "bik": "بÙکول", + "bin": "بÙÙ†ÛŒ", + "bla": "سÙکسÙکا", + "bm": "بَمبارا", + "bn": "بَنٛگٲلÛ", + "bo": "ØªÙØ¨ØªÛŒ", + "br": "بریٹَن", + "bra": "برٛج", + "bs": "بوسنÙیَن", + "bua": "Ø¨ÙØ±Ùیَت", + "bug": "بَگنیٖز", + "byn": "بٕلÙÙ†", + "ca": "کَتلان", + "cad": "کاڈو", + "car": "Ú©Ø§Ø±ÙØ¨", + "cch": "اتسَم", + "ce": "چیچَن", + "ceb": "سیباونو", + "ch": "کَمورو", + "chb": "چیٖبچا", + "chg": "چھَگتاے", + "chk": "Ú†Ùکیٖز", + "chm": "ماری", + "chn": "Ú†Ùنوٗک جارگَن", + "cho": "چوکتَو", + "chp": "شیپویان", + "chr": "چیٚروکی", + "chy": "شییون", + "co": "کارسÙÚ©ÙŽÙ†", + "cop": "کاپٹÙÚ©", + "cr": "کری", + "crh": "کرٕمیٖن ØªÙØ±Ú©ÛŒ", + "cs": "چیٚک", + "csb": "کَشوٗبÙیَن", + "cu": "چٔرچ سلاوÙÚ©", + "cv": "Ú†Ùواش", + "cy": "ویٚلش", + "da": "ÚˆÛŒÙ†ÙØ´", + "dak": "ڈکوٹا", + "dar": "دَرگوا", + "de": "جٔرمَن", + "de_AT": "آسٹرÙیَن جٔرمَن", + "de_CH": "Ø³Ù•ÙˆÙØ³ ÛØ§Û’جٔرمَن", + "del": "ڈیٚلوییَر", + "den": "سلیو", + "dgr": "ÚˆØ§Ú¯Ø±ÙØ¨", + "din": "ÚˆÙنکا", + "doi": "ڈوگری", + "dsb": "بوٚنÙÙ… ساربÙیَن", + "dua": "دÙوالا", + "dum": "وَستی Ù¾ÙØ±ØªÙگالی", + "dv": "دÙÙˆÛŒÛÛŒ", + "dyu": "ÚˆÙیوٗلا", + "dz": "زونٛگکھا", + "ee": "ایٖو", + "efi": "ایٚÙÙÚ©", + "egy": "قدیٖمی Ù…ÙØµØ±ÛŒ", + "eka": "ایٚکاجÙÚ©", + "el": "یوٗنٲنی", + "elx": "ایٚلامایÙÙ¹", + "en": "اَنٛگیٖزÛ", + "en_AU": "آسٹریلیَن اَنٛگریٖزÛ", + "en_CA": "کینَڈÙیٲیی اَنٛگریٖزÛ", + "en_GB": "بَرطانوی اَنٛگریٖزÛ", + "en_US": "یوٗ ایٚس اَنٛگریٖزÛ", + "enm": "وَسطی اَنٛگریٖزÛ", + "eo": "ایٚسپَرینٹو", + "es": "Ø³Ù¾ÛŒÙ†ÙØ´", + "es_419": "لیٹٕن امریٖکی Ø³Ù¾ÛŒÙ†ÙØ´", + "es_ES": "Ù„ÙØ¨ÛŒØ±ÛŒÙŽÙ† Ø³Ù¾ÛŒÙ†ÙØ´", + "et": "ایٚسٹونیَن", + "eu": "باسک", + "ewo": "ایٚوونڈو", + "fa": "ÙØ§Ø±Ø³ÛŒ", + "fan": "Ùینٛگ", + "fat": "ÙØ§Ù†Ù¹ÛŒ", + "ff": "ÙÙلاÛ", + "fi": "ÙÙÙ†ÙØ´", + "fil": "ÙÙÙ„Ùپیٖنو", + "fj": "ÙÙØ¬ÛŒÙŽÙ†", + "fo": "Ùَروس", + "fon": "Ùون", + "fr": "ÙØ±ÛŒÙšÙ†Ú†", + "fr_CA": "کَنیڈیَن ÙØ±ÛŒÙšÙ†Ú†", + "fr_CH": "سٕوٕس ÙØ±ÛŒÙšÙ†Ú†", + "frm": "وسطی ÙØ±ÛŒÙšÙ†Ú†", + "fro": "پرون ÙØ±ÛŒÙšÙ†Ú†", + "frr": "Ø´Ùمٲلی ÙØ±Ùشیَن", + "frs": "مشرÙÙ‚ÛŒ ÙØ±Ùشیَن", + "fur": "ÙØ±ÙˆÙ—Ù„Ùیَن", + "fy": "مغربی ÙØ±Ùشیَن", + "ga": "Ø§ÙŽÛŒØ±ÙØ´", + "gaa": "گا", + "gay": "گیےیو", + "gba": "گبایا", + "gd": "Ø³Ú©ÙˆÙ¹ÙØ´ گیےلÙÚ©", + "gez": "گیٖز", + "gil": "Ú¯Ùلبٔرٹیٖز", + "gl": "Ú¯ÛŒÙ„ÙØ´Ùیَن", + "gmh": "وَسطی ÛØ§Û’ جٔرمَن", + "gn": "Ú¯Ùوارَنی", + "goh": "پرون ÛØ§Û’ جٔرمَن", + "gon": "گوندی", + "gor": "گورینٹیلو", + "got": "گوتھÙÚ©", + "grb": "Ú¯Ø±ÙØ¨Ùˆ", + "grc": "قدیٖم یوٗنٲنی", + "gsw": "Ø³Ù•ÙˆÙØ³ جٔرمَن", + "gu": "Ú¯ÙØ¬Ø±Ù²ØªÛŒ", + "gv": "مینٛکس", + "gwi": "Ú¯ÙÙˆÙÚ† اÙÙ†", + "ha": "ÛØ§ÙˆØ³Ø§", + "hai": "Ûَیدا", + "haw": "ÛوایÙیَن", + "he": "عبرٲنÛ", + "hi": "ÛÙندی", + "hil": "ÛÙلیٖگینَن", + "hit": "ÛÙØªØ§ÛŒÙت", + "hmn": "Ûمونٛگ", + "ho": "ÛÙØ±ÛŒ موتوٗ", + "hr": "کروشÙیَن", + "hsb": "ÛیٚرÙÙ… ساربÙیَن", + "ht": "ÛیتÙیاں", + "hu": "Ûَنٛگیریَن", + "hup": "ÛÙپا", + "hy": "اَرمینیَن", + "hz": "Ûیٚریٖرو", + "ia": "اÙنٹَرلÙنٛگوا", + "iba": "Ø§ÙØ¨Ø§Ù†", + "id": "اÙنڈونیشیا", + "ie": "اÙنٹَر Ù„Ùنٛنگویے", + "ig": "اÙگبو", + "ii": "سÙچوان یٖی", + "ik": "اÙÙ†ÙÙ¾Ùیاک", + "ilo": "اÙلوکو", + "inh": "اÙÙ†Ù›Ú¯ÙØ´", + "io": "اÙÚˆÙˆ", + "is": "Ø¢ÛŒÙØ³Ù„ینڈÙÚ©", + "it": "اÙٹیلیَن", + "iu": "اÙÙ†ÙÚ©ØªÙØªÙˆÙ—", + "ja": "جاپٲنÛ", + "jbo": "لوجبان", + "jpr": "جوڈیو ÙØ§Ø±Ø³ÛŒ", + "jrb": "جوڈیو عربی", + "jv": "جَوَنیٖز", + "ka": "جارجÙیَن", + "kaa": "کارا کَلپَک", + "kab": "کَبایÙÙ„", + "kac": "کاچÙÙ†", + "kaj": "جÙوٗ", + "kam": "کامبا", + "kaw": "Ú©ÙŽÙˆÛŒ", + "kbd": "کَبارڈÙیَن", + "kcg": "تَیَپ", + "kfo": "کورو", + "kg": "کونٛگو", + "kha": "کھاسی", + "kho": "کھوتَنیٖز", + "ki": "Ú©ÙÚ©Ùیوٗ", + "kj": "Ú©Ùوانیاما", + "kk": "کازَخ", + "kl": "Ú©ÙŽÙ„Ø§Ù„ÙØ³Ùت", + "km": "خَمیر", + "kmb": "Ú©ÙمبÙندوٗ", + "kn": "Ú©ÙŽÙ†ÙŽÚ‘", + "ko": "کوریَن", + "kok": "کونکَنی", + "kos": "کوسرییَن", + "kpe": "کَپیلی", + "kr": "کَنوٗری", + "krc": "کراچیے بَلکار", + "krl": "کَریلÙیَن", + "kru": "Ú©ÙØ±ÙÚ©Ú¾", + "ks": "Ú©Ù²Ø´ÙØ±", + "ku": "Ú©ÙØ±Ø¯ÙØ´", + "kum": "Ú©ÙÙ…ÙÚ©", + "kut": "Ú©ÙØªÛŒÙ†ÙŽÛ’", + "kv": "کومی", + "kw": "Ú©ÙˆØ±Ù†ÙØ´", + "ky": "Ú©ÙØ±Ú¯Ùز", + "la": "لاتیٖنی", + "lad": "لیڈÙنو", + "lah": "Ù„ÙŽÛَندا", + "lam": "لَمبا", + "lb": "Ù„ÙÚ©Ú¾Ø²ÛŒÙ…Ø¨ÙˆØ±Ú¯ÙØ´", + "lez": "لیزگÙیَن", + "lg": "گاندا", + "li": "Ù„ÙÙ…Ø¨Ù”Ø±Ú¯ÙØ´", + "ln": "Ù„Ùنگالا", + "lo": "لاو", + "lol": "مونٛگو", + "loz": "لوزی", + "lt": "Ù„ÙØªÚ¾ÙˆØ§Ù†Ùیَن", + "lu": "Ù„ÙˆÙØ¨Ø§ کَتَنٛگا", + "lua": "لوٗبا لوٗلÙوا", + "lui": "Ù„ÙˆÛŒÙØ³ÛŒÙ†Ùˆ", + "lun": "Ù„Ùندا", + "luo": "Ù„Ùوو", + "lus": "Ù„ÙØ³Ûاے", + "lv": "لَتوÙیَن", + "mad": "Ù…ÙŽØ¯ÙØ±ÛŒÙ–ز", + "mag": "مَگاے", + "mai": "میتَھلی", + "mak": "مَکَسار", + "man": "مَندÙÙ†Ù›Ú¯Ùˆ", + "mas": "مَساے", + "mdf": "موکشا", + "mdr": "مَندَر", + "men": "میندیے", + "mg": "مَلاگَسی", + "mga": "وَستی Ø§ÛŒØ±ÙØ´", + "mh": "مارشَلیٖز", + "mi": "ماوری", + "mic": "Ù…Ùکمیک", + "min": "Ù…Ùنَنٛگکَباو", + "mk": "میکَڈونیَن", + "ml": "مٔلیالَم", + "mn": "مَنٛگولی", + "mnc": "مانٛچوٗ", + "mni": "مَنیپوٗری", + "moh": "Ù…ÙˆÛØ§Ú©", + "mos": "موسی", + "mr": "مَرٲٹھÛ", + "ms": "Ù…ÙŽÙ„ÙŽÛ’", + "mt": "مَلتیٖس", + "mul": "ÙˆØ§Ø±ÛŒØ§Û Ø²Ø¨Ø§Ù†", + "mus": "کریٖک", + "mwl": "Ù…ÙØ±Ø§Ù†Ø¯ÛŒÙ–ز", + "mwr": "مارواڑی", + "my": "بٔمیٖز", + "myv": "ایٚرزÙیا", + "na": "ناورÙ", + "nap": "نیٖپالیٹَن", + "nb": "ناروییَن بوکمال", + "nd": "Ø´Ùمال ڈَبیل", + "nds": "بوٚنÙÙ… جٔرمَن", + "ne": "نیٚپٲلÛ", + "new": "نیٚواری", + "ng": "ڈونٛگا", + "nia": "Ù†Ùیاس", + "niu": "Ù†Ùیویَن", + "nl": "ÚˆÙŽÚ†", + "nl_BE": "ÙÙ„ÛŒÙšÙ…ÙØ´", + "nn": "ناروییَن Ù†ÙŽÛ’ نورسک", + "no": "ناروییَن", + "nog": "نوگاے", + "non": "پرون نارسی", + "nqo": "ایٚن Ú©Ùˆ", + "nr": "جنوب ڈیٚبیل", + "nso": "شمالی ستھو", + "nv": "نَواجو", + "nwc": "کلاسÙÚ©ÙŽÙ„ نیواری", + "ny": "Ù†Ùیَنجا", + "nym": "Ù†Ùیَمویٚزی", + "nyn": "Ù†Ùیَنکول", + "nyo": "Ù†Ùیورو", + "nzi": "نَظیٖما", + "oc": "اوکسیٖٹَن", + "oj": "Ø§ÙˆØ¬ÙØ¨ÙˆØ§", + "om": "اوٚرومو", + "or": "اوٚرÙیا", + "os": "اوٚسیٚٹÙÚ©", + "osa": "اوٚسیج", + "ota": "اوٹومَن ØªÙØ±Ú©ÙØ´", + "pa": "پَنجٲبÛ", + "pag": "پَنٛگاسÙÙ†ÙŽÙ†", + "pal": "Ù¾ÙŽÛÙ„ÙŽÙˆÛŒ", + "pam": "پَمپَنٛگا", + "pap": "Ù¾ÙŽÙ¾Ùیامیٚنٹو", + "pau": "پَلااÙواں", + "peo": "پرون ÙØ§Ø±Ø³ÛŒ", + "phn": "Ùونیٖشیَن", + "pi": "پالی", + "pl": "Ù¾Ø§Ù„ÙØ´", + "pon": "پانپیٚیَن", + "pro": "پرون پروویٚنچَل", + "ps": "پَشتوٗ", + "pt": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز", + "pt_BR": "برازیٖلی Ù¾ÙØªÙŽÚ¯ÛŒÙ–ز", + "pt_PT": "Ù„ÙØ¨ÛŒØ±ÛŒÙŽÙ† Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز", + "qu": "Ú©ÙویشÙوا", + "raj": "Ø±Ø§Ø¬ÙØ³ØªÚ¾Ù²Ù†Û", + "rap": "رَپانوی", + "rar": "رَروٹونٛگَن", + "rm": "رومانش", + "rn": "رÙندی", + "ro": "رومٲنی", + "ro_MD": "مولداوÙیَن", + "rom": "رومَنی", + "root": "روٗٹ", + "ru": "روٗسی", + "rup": "اَرومانی", + "rw": "Ú©ÙنیاوÙندا", + "sa": "سَنسکرٕت", + "sad": "سَندَویے", + "sah": "ÛŒØ§Ú©ÙØª", + "sam": "Ø³ÙŽÙ…Ø§Ø±ÙØªÙŽÙ† اَرامیک", + "sas": "سَسَک", + "sat": "سَنتالی", + "sc": "سراڈیٖنی", + "scn": "سÙÚ†ÙÙ„Ùیَن", + "sco": "سکاٹس", + "sd": "سÙندی", + "se": "Ø´Ùمٲلی سَمی", + "sel": "سیٚلکÙÙ¾", + "sg": "سَنگو", + "sga": "پرون Ø§ÛŒØ±ÙØ´", + "sh": "سیٚربو کروشÙیَن", + "shn": "شان", + "si": "سÙÙ†ÛØ§Ù„ا", + "sid": "Ø³ÙØ¯Ø§Ù…Ùˆ", + "sk": "سلووَک", + "sl": "سلووینیَن", + "sm": "سَمواَن", + "sma": "جنوٗبی سَمی", + "smj": "لولیے سَمی", + "smn": "اÙناری سَمی", + "sms": "سکولٹ سَمی", + "sn": "شونا", + "snk": "سونÙنکیے", + "so": "سومٲلی", + "sog": "سوگڈÙیَن", + "sq": "البانÙیَن", + "sr": "سٔربÙیَن", + "srn": "سرٛانَن ٹونٛگو", + "srr": "سیٚریر", + "ss": "سواتی", + "st": "جنوبی ستھو", + "su": "سَنڈَنیٖز", + "suk": "سÙÚ©Ùما", + "sus": "Ø³ÙØ³ÙˆÙ—", + "sux": "سÙمیریَن", + "sv": "Ø³ÙˆÛŒÙ–ÚˆÙØ´", + "sw": "سواÛÙÙ„ÛŒ", + "syr": "سیٖریٲیی", + "ta": "تَمÙÙ„", + "te": "تیلگوٗ", + "tem": "Ù¹Ùمنیے", + "ter": "ٹیٚریٚنو", + "tet": "ٹیٹَم", + "tg": "تاجÙÚ©", + "th": "تھاے", + "ti": "Ù¹ÙگرÙنیا", + "tig": "ٹاےگریے", + "tiv": "تیٖو", + "tk": "ØªÙØ±Ú©Ù…ین", + "tkl": "ٹوکیٖلاو", + "tl": "تَماشیک", + "tlh": "Ú©ÙÙ„Ùنگون", + "tli": "Ù¹ÙÙ„ÙÙ†Ú¯ÙØª", + "tmh": "تاماشیک", + "tn": "سوانا", + "to": "ٹونٛگا", + "tog": "نیاسا ٹونٛگا", + "tpi": "ٹاک Ù¾ÙØ³ÙÙ†", + "tr": "ØªÙØ±Ú©ÙØ´", + "ts": "ژونٛگا", + "tsi": "Ú˜Ú¾ÙمشÙیان", + "tt": "تَتار", + "tum": "تÙمبÙکا", + "tvl": "تÙوالوٗ", + "tw": "توی", + "ty": "تاÛیشÙیَن", + "tyv": "تÙویٖنیَن", + "udm": "Ø§ÙØ¯Ù…ÙØ±Øª", + "uga": "اÙگارتÙÚ©", + "uk": "یوٗکرینیٲیی", + "umb": "ÛŒÙمبÙندوٗ", + "und": "Ø§ÙŽÙ†Ø²Ù²Ù†Û ÛŒØ§ Ù†ÙŽÛ Ù„ÙŽÚ¯ÛÙ•ÛØ§Ø± زبان", + "ur": "Ø§ÙØ±Ø¯ÙˆÙ—", + "uz": "Ø§ÙØ²Ø¨ÛŒÚ©", + "vai": "واے", + "ve": "ویندا", + "vi": "ÙˆÙیَتنَمیٖز", + "vo": "وولَپÙÚ©", + "vot": "ووتÙÚ©", + "wa": "وَلوٗن", + "wal": "والامو", + "war": "وَریے", + "was": "واشو", + "wo": "وولوÙ", + "xal": "کالمÙÚ©", + "xh": "کھوسا", + "yao": "یاو", + "yap": "یَپیٖز", + "yi": "ÛŒÙØ¯ÙØ´", + "yo": "ÛŒÙˆØ±ÙØ¨Ø§", + "za": "زÙÛØ§Ù†Ù›Ú¯", + "zap": "زَپوتیٚک", + "zen": "زیناگا", + "zh": "چیٖنی", + "zh_Hans": "سیٚود چیٖنی", + "zh_Hant": "رÙوٲجی چیٖنی", + "zu": "زÙلوٗ", + "zun": "زوٗنی", + "zxx": "کانٛÛÛ ØªÛÙ Ù„ÙØ³Ø§Ù†ÛŒØ§ØªÛŒ مواد Ù†ÛÙ•", + "zza": "زازا" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/kw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/kw.json new file mode 100644 index 0000000000000000000000000000000000000000..8609e7b909fc6d1bc8f1a8a66a089957f5a01e7b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/kw.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "kw": "kernewek" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ky.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ky.json new file mode 100644 index 0000000000000000000000000000000000000000..088335056d8522aa2e806753b70c91e12fe88e5f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ky.json @@ -0,0 +1,399 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "афарча", + "ab": "абхазча", + "ace": "ачехче", + "ada": "адаңмече", + "ady": "адыгейче", + "af": "африкаанча", + "agq": "агемче", + "ain": "айнуча", + "ak": "аканча", + "ale": "алеутча", + "alt": "түштүк алтайча", + "am": "амхарча", + "an": "арагончо", + "anp": "ангикача", + "ar": "арабча", + "ar_001": "азыркы адабий араб тилинде", + "arn": "мапучече", + "arp": "арапахочо", + "as": "аÑÑамча", + "asa": "аÑуча", + "ast": "аÑтурийче", + "av": "аварикче", + "awa": "авадхиче", + "ay": "аймарача", + "az": "азербайжанча", + "ba": "башкырча", + "ban": "баличе", + "bas": "баÑаача", + "be": "беларуÑча", + "bem": "бембача", + "bez": "бенача", + "bg": "болгарча", + "bgn": "чыгыш балучиче", + "bho": "бхожпуриче", + "bi": "биÑламача", + "bin": "биниче", + "bla": "ÑикÑикача", + "bm": "бамбарача", + "bn": "бангладешче", + "bo": "тибетче", + "br": "бретончо", + "brx": "бодочо", + "bs": "боÑнийче", + "bug": "бугийче", + "byn": "блинче", + "ca": "каталанча", + "ce": "чеченче", + "ceb": "Ñебуанча", + "cgg": "чигача", + "ch": "чаморрочо", + "chk": "чуукиче", + "chm": "мариче", + "cho": "чокточо", + "chr": "черокиче", + "chy": "шайеннче", + "ckb": "борбордук курдча", + "co": "корÑиканча", + "crs": "ÑеÑелва креол французча", + "cs": "чехче", + "cu": "чиркөө ÑлавÑнча", + "cv": "чувашча", + "cy": "уелшче", + "da": "датча", + "dak": "дакотача", + "dar": "даргинче", + "dav": "таитача", + "de": "немиÑче", + "de_CH": "адабий немиÑче (ШвейцариÑ)", + "dgr": "догрибче", + "dje": "замрача", + "dsb": "төмөнкү Ñорбианча", + "dua": "дуалача", + "dv": "дивехиче", + "dyo": "жола-фониче", + "dz": "жонгуча", + "dzg": "дазагача", + "ebu": "Ñмбуча", + "ee": "Ñбече", + "efi": "Ñфикче", + "eka": "Ñкажукча", + "el": "грекче", + "en": "англиÑче", + "eo": "ÑÑперанто", + "es": "иÑпанча", + "es_ES": "иÑпанча (Европа)", + "et": "ÑÑтончо", + "eu": "баÑкча", + "ewo": "Ñвондочо", + "fa": "фарÑча", + "ff": "фулача", + "fi": "финче", + "fil": "филипинче", + "fj": "фижиче", + "fo": "фароÑче", + "fon": "фончо", + "fr": "французча", + "fur": "фриулча", + "fy": "батыш фризче", + "ga": "ирландча", + "gaa": "гача", + "gag": "гагаузча", + "gan": "Гань Кытайча", + "gd": "кельтче", + "gez": "гиизче", + "gil": "гилбертче", + "gl": "галиÑиÑча", + "gn": "гуараш", + "gor": "горонталочо", + "gsw": "немиÑче (ШвейцариÑ)", + "gu": "гужаратча", + "guz": "гуÑиче", + "gv": "манкÑыча", + "gwi": "гвичинче", + "ha": "хауÑача", + "hak": "Хакка кытайча", + "haw": "гавайча", + "he": "ивритте", + "hi": "хиндиче", + "hil": "хилигайнончо", + "hmn": "хмонгчо", + "hr": "хорватча", + "hsb": "жогорку Ñорбианча", + "hsn": "СÑнь Кытайча", + "ht": "гаитиче", + "hu": "венгерче", + "hup": "хупача", + "hy": "армÑнча", + "hz": "герерочо", + "ia": "интерлингва", + "iba": "ибанча", + "ibb": "ибибиочо", + "id": "индонезче", + "ig": "игбочо", + "ii": "Ñычуань йиче", + "ilo": "илокочо", + "inh": "ингушча", + "io": "идочо", + "is": "иÑландча", + "it": "италиÑнча", + "iu": "инуктитутча", + "ja": "жапончо", + "jbo": "ложбанча", + "jgo": "нгомбача", + "jmc": "мачамече", + "jv": "жаванизче", + "ka": "грузинче", + "kab": "кабылча", + "kac": "кахинче", + "kaj": "джуча", + "kam": "камбача", + "kbd": "кабардинче", + "kcg": "Ñ‚Ñпча", + "kde": "макондече", + "kea": "кабувердиче", + "kfo": "корочо", + "kha": "хаÑиче", + "khq": "койра чиниче", + "ki": "кикуйиче", + "kj": "куаньÑмача", + "kk": "казакча", + "kkj": "какочо", + "kl": "калаалиÑутча", + "kln": "каленжиче", + "km": "кмерче", + "kmb": "кимбундуча", + "kn": "каннадача", + "ko": "корейче", + "koi": "коми-пермÑкча", + "kok": "конканиче", + "kpe": "кпеллече", + "kr": "кануриче", + "krc": "карачай-балкарча", + "krl": "карелче", + "kru": "курухча", + "ks": "кашмирче", + "ksb": "шамабалача", + "ksf": "бафиÑча", + "ksh": "колоньÑча", + "ku": "курдча", + "kum": "кумыкча", + "kv": "комиче", + "kw": "корнишче", + "ky": "кыргызча", + "la": "латынча", + "lad": "ладиночо", + "lag": "лангиче", + "lb": "люкÑембургча", + "lez": "лезгинче", + "lg": "гандача", + "li": "лимбургиче", + "lkt": "лакотача", + "ln": "лингалача", + "lo": "лаочо", + "loz": "лозиче", + "lrc": "түндүк луриче", + "lt": "литовчо", + "lu": "луба-катангача", + "lua": "луба-лулуача", + "lun": "лундача", + "luo": "луочо", + "lus": "мизочо", + "luy": "лухиÑча", + "lv": "латышча", + "mad": "мадуриÑче", + "mag": "магахиче", + "mai": "маитиличе", + "mak": "макаÑарча", + "mas": "маÑайча", + "mdf": "мокшача", + "men": "мендече", + "mer": "меруча", + "mfe": "мориÑианча", + "mg": "малагаÑча", + "mgh": "макуача", + "mgo": "метача", + "mh": "маршаллча", + "mi": "маориче", + "mic": "микмакча", + "min": "минанкабауча", + "mk": "македончо", + "ml": "малайаламча", + "mn": "монголчо", + "mni": "манипуриче", + "moh": "мохаукча", + "mos": "моÑÑиче", + "mr": "маратиче", + "ms": "малайча", + "mt": "малтизче", + "mua": "мундангча", + "mul": "бир нече тилде", + "mus": "крикче", + "mwl": "мирандизче", + "my": "бурмача", + "myv": "ÑрзÑнча", + "mzn": "мазандераниче", + "na": "науруча", + "nan": "nan", + "nap": "неополитанча", + "naq": "намача", + "nb": "норвежче (Букмал)", + "nd": "түндүк ндыбелче", + "nds": "төмөнкү немиÑче", + "nds_NL": "төмөнкү ÑакÑончо", + "ne": "непалча", + "new": "невариче", + "ng": "ндонгача", + "nia": "ниаÑча", + "niu": "ньюанча", + "nl": "голландча", + "nl_BE": "фламандча", + "nmg": "кваÑиочо", + "nn": "норвежче (ÐинорÑк)", + "nnh": "нгимбунча", + "no": "норвежче", + "nog": "ногайча", + "nqo": "нкочо", + "nr": "түштүк ндебелече", + "nso": "түндүк Ñохочо", + "nus": "нуерче", + "nv": "наваджочо", + "ny": "ньÑнджача", + "nyn": "ныйанколчо", + "oc": "окÑитанча", + "om": "оромочо", + "or": "ориÑча", + "os": "оÑетинче", + "pa": "пунжабиче", + "pag": "пангаÑиче", + "pam": "пампангача", + "pap": "папиаменточо", + "pau": "палауанча", + "pcm": "аргындашкан тил (ÐигериÑ)", + "pl": "полÑкча", + "prg": "пруÑÑча", + "ps": "пуштуча", + "pt": "португалча", + "pt_PT": "португалча (Европа)", + "qu": "кечуача", + "quc": "кичече", + "rap": "рапаньюча", + "rar": "раротонгача", + "rm": "романшча", + "rn": "рундиче", + "ro": "румынча", + "ro_MD": "молдованча", + "rof": "ромбочо", + "root": "түпкү", + "ru": "оруÑча", + "rup": "аромунча", + "rw": "руандача", + "rwk": "руача", + "sa": "ÑанÑкритче", + "sad": "Ñандавече", + "sah": "Ñахача", + "saq": "Ñамбуруча", + "sat": "Ñанталиче", + "sba": "нгамбайча", + "sbp": "Ñангуча", + "sc": "Ñардинче", + "scn": "Ñицилийче", + "sco": "шотландча", + "sd": "Ñиндхиче", + "sdh": "түштүк курдча", + "se": "түндүк Ñамиче", + "seh": "Ñенача", + "ses": "койраборо Ñенниче", + "sg": "Ñангочо", + "sh": "Ñерб-хорват", + "shi": "ташелитче", + "shn": "шанча", + "si": "Ñингалача", + "sk": "Ñловакча", + "sl": "Ñловенче", + "sm": "Ñамоанча", + "sma": "түштүк Ñаамиче", + "smj": "луле-Ñамиче", + "smn": "инари Ñаамиче", + "sms": "Ñколт Ñаамиче", + "sn": "шонача", + "snk": "Ñонинкече", + "so": "Ñомаличе", + "sq": "албанча", + "sr": "Ñербче", + "srn": "Ñранан тонгочо", + "ss": "Ñватиче", + "ssy": "Ñахочо", + "st": "ÑеÑоточо", + "su": "Ñунданча", + "suk": "Ñукумача", + "sv": "шведче", + "sw": "Ñуахиличе", + "sw_CD": "конго Ñуахаличе", + "swb": "коморчо", + "syr": "ÑириÑча", + "ta": "тамилче", + "te": "телугуча", + "tem": "тимнече", + "teo": "теÑочо", + "tet": "тетумча", + "tg": "тажикче", + "th": "тайча", + "ti": "тигриниача", + "tig": "тигрече", + "tk": "түркмөнчө", + "tlh": "клингончо", + "tn": "Ñ‚Ñванача", + "to": "тонгача", + "tpi": "ток-пиÑинче", + "tr": "түркчө", + "trv": "тарокочо", + "ts": "Ñ‚Ñонгача", + "tt": "татарча", + "tum": "тумбукача", + "tvl": "тувалуча", + "tw": "тви", + "twq": "таÑабакча", + "ty": "таитиче", + "tyv": "тувинче", + "tzm": "Борбордук ÐÑ‚Ð»Ð°Ñ Ñ‚Ð°Ð¼Ð°Ð·Ð¸Ñ‚Ñ‡Ðµ", + "udm": "удмуртча", + "ug": "уйгурча", + "uk": "украинче", + "umb": "умбундуча", + "und": "белгиÑиз тилде", + "ur": "урдуча", + "uz": "өзбекче", + "vai": "вайиче", + "ve": "вендача", + "vi": "вьетнамча", + "vo": "волапюкча", + "vun": "вунжочо", + "wa": "валлончо", + "wae": "валцерче", + "wal": "вольÑттача", + "war": "варайча", + "wbp": "ворлпириче", + "wo": "уолофчо", + "wuu": "wuu", + "xal": "калмыкча", + "xh": "коÑача", + "xog": "Ñогача", + "yav": "Ñнгбенче", + "ybb": "йембача", + "yi": "идишче", + "yo": "йорубача", + "yue": "кантончо", + "zgh": "марокко тамазигт адабий тилинде", + "zh": "кытайча", + "zh_Hans": "кытайча (жөнөкөйлөштүрүлгөн)", + "zh_Hant": "кытайча (Ñалттуу)", + "zu": "зулуча", + "zun": "зуниче", + "zxx": "тилдик мазмун жок", + "zza": "зазача" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lb.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lb.json new file mode 100644 index 0000000000000000000000000000000000000000..c4d69e05f533e4764296136036a0e16786cab4a1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lb.json @@ -0,0 +1,612 @@ +{ + "Version": "2.1.28.76", + "Names": { + "aa": "Afar", + "ab": "Abchasesch", + "ace": "Aceh-Sprooch", + "ach": "Acholi-Sprooch", + "ada": "Adangme", + "ady": "Adygéiesch", + "ae": "Avestesch", + "aeb": "Tunesescht Arabesch", + "af": "Afrikaans", + "afh": "Afrihili", + "agq": "Aghem", + "ain": "Ainu-Sprooch", + "ak": "Akan", + "akk": "Akkadesch", + "akz": "Alabama", + "ale": "Aleutesch", + "aln": "Gegesch", + "alt": "Süd-Alaesch", + "am": "Amharesch", + "an": "Aragonesesch", + "ang": "Alenglesch", + "anp": "Angika", + "ar": "Arabesch", + "ar_001": "Modernt Héicharabesch", + "arc": "Aramäesch", + "arn": "Mapudungun", + "aro": "Araona", + "arp": "Arapaho-Sprooch", + "arq": "Algerescht Arabesch", + "arw": "Arawak-Sprooch", + "ary": "Marokkanescht Arabesch", + "arz": "Egyptescht Arabesch", + "as": "Assamesesch", + "asa": "Asu (Tanzania)", + "ase": "Amerikanesch Zeechesprooch", + "ast": "Asturianesch", + "av": "Awaresch", + "avk": "Kotava", + "awa": "Awadhi", + "ay": "Aymara", + "az": "Aserbaidschanesch", + "ba": "Baschkiresch", + "bal": "Belutschesch", + "ban": "Balinesesch", + "bar": "Bairesch", + "bas": "Basaa-Sprooch", + "bax": "Bamun", + "bbc": "Batak Toba", + "bbj": "Ghomálá’", + "be": "Wäissrussesch", + "bej": "Bedauye", + "bem": "Bemba-Sprooch", + "bew": "Betawi", + "bez": "Bena", + "bfd": "Bafut", + "bfq": "Badaga", + "bg": "Bulgaresch", + "bho": "Bhodschpuri", + "bi": "Bislama", + "bik": "Bikol-Sprooch", + "bin": "Bini-Sprooch", + "bjn": "Banjaresesch", + "bkm": "Kom", + "bla": "Blackfoot-Sprooch", + "bm": "Bambara-Sprooch", + "bn": "Bengalesch", + "bo": "Tibetesch", + "bpy": "Bishnupriya", + "bqi": "Bachtiaresch", + "br": "Bretonesch", + "bra": "Braj-Bhakha", + "brh": "Brahui", + "brx": "Bodo", + "bs": "Bosnesch", + "bss": "Akoose", + "bua": "Burjatesch", + "bug": "Buginesesch", + "bum": "Bulu", + "byn": "Blin", + "byv": "Medumba", + "ca": "Katalanesch", + "cad": "Caddo", + "car": "Karibesch", + "cay": "Cayuga", + "cch": "Atsam", + "ce": "Tschetschenesch", + "ceb": "Cebuano", + "cgg": "Kiga", + "ch": "Chamorro-Sprooch", + "chb": "Chibcha-Sprooch", + "chg": "Tschagataesch", + "chk": "Trukesesch", + "chm": "Mari", + "chn": "Chinook", + "cho": "Choctaw", + "chp": "Chipewyan", + "chr": "Cherokee", + "chy": "Cheyenne", + "ckb": "Sorani", + "co": "Korsesch", + "cop": "Koptesch", + "cps": "Capiznon", + "cr": "Cree", + "crh": "Krimtataresch", + "cs": "Tschechesch", + "csb": "Kaschubesch", + "cu": "Kiercheslawesch", + "cv": "Tschuwaschesch", + "cy": "Walisesch", + "da": "Dänesch", + "dak": "Dakota-Sprooch", + "dar": "Darginesch", + "dav": "Taita", + "de": "Däitsch", + "de_AT": "Éisträichescht Däitsch", + "de_CH": "Schwäizer Héichdäitsch", + "del": "Delaware-Sprooch", + "den": "Slave", + "dgr": "Dogrib", + "din": "Dinka-Sprooch", + "dje": "Zarma", + "doi": "Dogri", + "dsb": "Niddersorbesch", + "dtp": "Zentral-Dusun", + "dua": "Duala", + "dum": "Mëttelhollännesch", + "dv": "Maldivesch", + "dyo": "Jola-Fonyi", + "dyu": "Dyula-Sprooch", + "dz": "Bhutanesch", + "dzg": "Dazaga", + "ebu": "Kiembu", + "ee": "Ewe-Sprooch", + "efi": "Efik", + "egl": "Emilianesch", + "egy": "Egyptesch", + "eka": "Ekajuk", + "el": "Griichesch", + "elx": "Elamesch", + "en": "Englesch", + "en_AU": "Australescht Englesch", + "en_CA": "Kanadescht Englesch", + "en_GB": "Britescht Englesch", + "en_US": "Amerikanescht Englesch", + "enm": "Mëttelenglesch", + "eo": "Esperanto", + "es": "Spuenesch", + "es_419": "Latäinamerikanescht Spuenesch", + "es_ES": "Europäescht Spuenesch", + "es_MX": "Mexikanescht Spuenesch", + "esu": "Yup’ik", + "et": "Estnesch", + "eu": "Baskesch", + "ewo": "Ewondo", + "ext": "Extremaduresch", + "fa": "Persesch", + "fan": "Pangwe-Sprooch", + "fat": "Fanti-Sprooch", + "ff": "Ful", + "fi": "Finnesch", + "fil": "Filipino", + "fit": "Meänkieli", + "fj": "Fidschianesch", + "fo": "Färöesch", + "fon": "Fon-Sprooch", + "fr": "Franséisch", + "fr_CA": "Kanadescht Franséisch", + "fr_CH": "Schwäizer Franséisch", + "frc": "Cajun", + "frm": "Mëttelfranséisch", + "fro": "Alfranséisch", + "frp": "Frankoprovenzalesch", + "frr": "Nordfriesesch", + "frs": "Ostfriesesch", + "fur": "Friulesch", + "fy": "Westfriesesch", + "ga": "Iresch", + "gaa": "Ga-Sprooch", + "gag": "Gagausesch", + "gan": "Gan-Chinesesch", + "gay": "Gayo", + "gba": "Gbaya-Sprooch", + "gbz": "Zoroastrianescht Dari", + "gd": "Schottescht Gällesch", + "gez": "Geez", + "gil": "Gilbertesesch", + "gl": "Galizesch", + "glk": "Gilaki", + "gmh": "Mëttelhéichdäitsch", + "gn": "Guarani", + "goh": "Alhéichdäitsch", + "gom": "Goan-Konkani", + "gon": "Gondi-Sprooch", + "gor": "Mongondou", + "got": "Gotesch", + "grb": "Grebo-Sprooch", + "grc": "Algriichesch", + "gsw": "Schwäizerdäitsch", + "gu": "Gujarati", + "guc": "Wayuu", + "gur": "Farefare", + "guz": "Gusii-Sprooch", + "gv": "Manx", + "gwi": "Kutchin-Sprooch", + "ha": "Hausa", + "hai": "Haida-Sprooch", + "hak": "Hakka-Chinesesch", + "haw": "Hawaiesch", + "he": "Hebräesch", + "hi": "Hindi", + "hif": "Fidschi-Hindi", + "hil": "Hiligaynon-Sprooch", + "hit": "Hethitesch", + "hmn": "Miao-Sprooch", + "ho": "Hiri-Motu", + "hr": "Kroatesch", + "hsb": "Uewersorbesch", + "hsn": "Xiang-Chinesesch", + "ht": "Haitianesch", + "hu": "Ungaresch", + "hup": "Hupa", + "hy": "Armenesch", + "hz": "Herero-Sprooch", + "ia": "Interlingua", + "iba": "Iban", + "ibb": "Ibibio", + "id": "Indonesesch", + "ie": "Interlingue", + "ig": "Igbo-Sprooch", + "ii": "Sichuan Yi", + "ik": "Inupiak", + "ilo": "Ilokano-Sprooch", + "inh": "Inguschesch", + "io": "Ido-Sprooch", + "is": "Islännesch", + "it": "Italienesch", + "iu": "Inukitut", + "izh": "Ischoresch", + "ja": "Japanesch", + "jam": "Jamaikanesch-Kreolesch", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jpr": "Jiddesch-Persesch", + "jrb": "Jiddesch-Arabesch", + "jut": "Jütesch", + "jv": "Javanesch", + "ka": "Georgesch", + "kaa": "Karakalpakesch", + "kab": "Kabylesch", + "kac": "Kachin-Sprooch", + "kaj": "Jju", + "kam": "Kamba", + "kaw": "Kawi", + "kbd": "Kabardinesch", + "kbl": "Kanembu", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Kabuverdianu", + "ken": "Kenyang", + "kfo": "Koro", + "kg": "Kongolesesch", + "kgp": "Kaingang", + "kha": "Khasi-Sprooch", + "kho": "Sakesch", + "khq": "Koyra Chiini", + "khw": "Khowar", + "ki": "Kikuyu-Sprooch", + "kiu": "Kirmanjki", + "kj": "Kwanyama", + "kk": "Kasachesch", + "kkj": "Kako", + "kl": "Grönlännesch", + "kln": "Kalenjin", + "km": "Kambodschanesch", + "kmb": "Kimbundu-Sprooch", + "kn": "Kannada", + "ko": "Koreanesch", + "koi": "Komi-Permiak", + "kok": "Konkani", + "kos": "Kosraeanesch", + "kpe": "Kpelle-Sprooch", + "kr": "Kanuri-Sprooch", + "krc": "Karatschaiesch-Balkaresch", + "kri": "Krio", + "krj": "Kinaray-a", + "krl": "Karelesch", + "kru": "Oraon-Sprooch", + "ks": "Kaschmiresch", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Kölsch", + "ku": "Kurdesch", + "kum": "Kumükesch", + "kut": "Kutenai-Sprooch", + "kv": "Komi-Sprooch", + "kw": "Kornesch", + "ky": "Kirgisesch", + "la": "Latäin", + "lad": "Ladino", + "lag": "Langi", + "lah": "Lahnda", + "lam": "Lamba-Sprooch", + "lb": "Lëtzebuergesch", + "lez": "Lesgesch", + "lfn": "Lingua Franca Nova", + "lg": "Ganda-Sprooch", + "li": "Limburgesch", + "lij": "Liguresch", + "liv": "Livesch", + "lkt": "Lakota-Sprooch", + "lmo": "Lombardesch", + "ln": "Lingala", + "lo": "Laotesch", + "lol": "Mongo", + "loz": "Rotse-Sprooch", + "lt": "Litauesch", + "ltg": "Lettgallesch", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lui": "Luiseno-Sprooch", + "lun": "Lunda-Sprooch", + "luo": "Luo-Sprooch", + "lus": "Lushai-Sprooch", + "luy": "Olulujia", + "lv": "Lettesch", + "lzh": "Klassescht Chinesesch", + "lzz": "Lasesch Sprooch", + "mad": "Maduresesch", + "maf": "Mafa", + "mag": "Khotta", + "mai": "Maithili", + "mak": "Makassaresch", + "man": "Manding-Sprooch", + "mas": "Massai-Sprooch", + "mde": "Maba", + "mdf": "Moksha", + "mdr": "Mandaresesch", + "men": "Mende-Sprooch", + "mer": "Meru-Sprooch", + "mfe": "Morisyen", + "mg": "Malagassi-Sprooch", + "mga": "Mëtteliresch", + "mgh": "Makhuwa-Meetto", + "mgo": "Meta’", + "mh": "Marschallesesch", + "mi": "Maori", + "mic": "Micmac-Sprooch", + "min": "Minangkabau-Sprooch", + "mk": "Mazedonesch", + "ml": "Malayalam", + "mn": "Mongolesch", + "mnc": "Mandschuresch", + "mni": "Meithei-Sprooch", + "moh": "Mohawk-Sprooch", + "mos": "Mossi-Sprooch", + "mr": "Marathi", + "mrj": "West-Mari", + "ms": "Malaiesch", + "mt": "Maltesesch", + "mua": "Mundang", + "mul": "Méisproocheg", + "mus": "Muskogee-Sprooch", + "mwl": "Mirandesesch", + "mwr": "Marwari", + "mwv": "Mentawai", + "my": "Birmanesch", + "mye": "Myene", + "myv": "Ersja-Mordwinesch", + "mzn": "Mazandarani", + "na": "Nauruesch", + "nan": "Min-Nan-Chinesesch", + "nap": "Neapolitanesch", + "naq": "Nama", + "nb": "Norwegesch BokmÃ¥l", + "nd": "Nord-Ndebele-Sprooch", + "nds": "Nidderdäitsch", + "ne": "Nepalesesch", + "new": "Newari", + "ng": "Ndonga", + "nia": "Nias-Sprooch", + "niu": "Niue-Sprooch", + "njo": "Ao Naga", + "nl": "Hollännesch", + "nl_BE": "Flämesch", + "nmg": "Kwasio", + "nn": "Norwegesch Nynorsk", + "nnh": "Ngiemboon", + "no": "Norwegesch", + "nog": "Nogai", + "non": "Alnordesch", + "nov": "Novial", + "nqo": "N’Ko", + "nr": "Süd-Ndebele-Sprooch", + "nso": "Nord-Sotho-Sprooch", + "nus": "Nuer", + "nv": "Navajo", + "nwc": "Al-Newari", + "ny": "Nyanja-Sprooch", + "nym": "Nyamwezi-Sprooch", + "nyn": "Nyankole", + "nyo": "Nyoro", + "nzi": "Nzima", + "oc": "Okzitanesch", + "oj": "Ojibwa-Sprooch", + "om": "Oromo", + "or": "Orija", + "os": "Ossetesch", + "osa": "Osage-Sprooch", + "ota": "Osmanesch", + "pa": "Pandschabesch", + "pag": "Pangasinan-Sprooch", + "pal": "Mëttelpersesch", + "pam": "Pampanggan-Sprooch", + "pap": "Papiamento", + "pau": "Palau", + "pcd": "Picardesch", + "pdc": "Pennsylvaniadäitsch", + "pdt": "Plattdäitsch", + "peo": "Alpersesch", + "pfl": "Pfälzesch Däitsch", + "phn": "Phönikesch", + "pi": "Pali", + "pl": "Polnesch", + "pms": "Piemontesesch", + "pnt": "Pontesch", + "pon": "Ponapeanesch", + "prg": "Preisesch", + "pro": "Alprovenzalesch", + "ps": "Paschtu", + "pt": "Portugisesch", + "pt_BR": "Brasilianescht Portugisesch", + "pt_PT": "Europäescht Portugisesch", + "qu": "Quechua", + "quc": "Quiché-Sprooch", + "qug": "Kichwa (Chimborazo-Gebidder)", + "raj": "Rajasthani", + "rap": "Ouschterinsel-Sprooch", + "rar": "Rarotonganesch", + "rgn": "Romagnol", + "rif": "Tarifit", + "rm": "Rätoromanesch", + "rn": "Rundi-Sprooch", + "ro": "Rumänesch", + "ro_MD": "Moldawesch", + "rof": "Rombo", + "rom": "Romani", + "root": "Root", + "rtm": "Rotumanesch", + "ru": "Russesch", + "rue": "Russinesch", + "rug": "Roviana", + "rup": "Aromunesch", + "rw": "Ruandesch", + "rwk": "Rwa", + "sa": "Sanskrit", + "sad": "Sandawe-Sprooch", + "sah": "Jakutesch", + "sam": "Samaritanesch", + "saq": "Samburu", + "sas": "Sasak", + "sat": "Santali", + "saz": "Saurashtra", + "sba": "Ngambay", + "sbp": "Sangu", + "sc": "Sardesch", + "scn": "Sizilianesch", + "sco": "Schottesch", + "sd": "Sindhi", + "sdc": "Sassaresesch", + "se": "Nordsamesch", + "see": "Seneca", + "seh": "Sena", + "sei": "Seri", + "sel": "Selkupesch", + "ses": "Koyra Senni", + "sg": "Sango", + "sga": "Aliresch", + "sgs": "Samogitesch", + "sh": "Serbo-Kroatesch", + "shi": "Taschelhit", + "shn": "Schan-Sprooch", + "shu": "Tschadesch-Arabesch", + "si": "Singhalesesch", + "sid": "Sidamo", + "sk": "Slowakesch", + "sl": "Slowenesch", + "sli": "Nidderschlesesch", + "sly": "Selayar", + "sm": "Samoanesch", + "sma": "Südsamesch", + "smj": "Lule-Lappesch", + "smn": "Inari-Lappesch", + "sms": "Skolt-Lappesch", + "sn": "Shona", + "snk": "Soninke-Sprooch", + "so": "Somali", + "sog": "Sogdesch", + "sq": "Albanesch", + "sr": "Serbesch", + "srn": "Srananesch", + "srr": "Serer-Sprooch", + "ss": "Swazi", + "ssy": "Saho", + "st": "Süd-Sotho-Sprooch", + "stq": "Saterfriesesch", + "su": "Sundanesesch", + "suk": "Sukuma-Sprooch", + "sus": "Susu", + "sux": "Sumeresch", + "sv": "Schwedesch", + "sw": "Suaheli", + "sw_CD": "Kongo-Swahili", + "swb": "Komoresch", + "syc": "Alsyresch", + "syr": "Syresch", + "szl": "Schlesesch", + "ta": "Tamilesch", + "tcy": "Tulu", + "te": "Telugu", + "tem": "Temne", + "teo": "Teso", + "ter": "Tereno-Sprooch", + "tet": "Tetum-Sprooch", + "tg": "Tadschikesch", + "th": "Thailännesch", + "ti": "Tigrinja", + "tig": "Tigre", + "tiv": "Tiv-Sprooch", + "tk": "Turkmenesch", + "tkl": "Tokelauanesch", + "tkr": "Tsachuresch", + "tl": "Dagalog", + "tlh": "Klingonesch", + "tli": "Tlingit-Sprooch", + "tly": "Talesch", + "tmh": "Tamaseq", + "tn": "Tswana-Sprooch", + "to": "Tongaesch", + "tog": "Tsonga-Sprooch", + "tpi": "Neimelanesesch", + "tr": "Tierkesch", + "tru": "Turoyo", + "trv": "Seediq", + "ts": "Tsonga", + "tsd": "Tsakonesch", + "tsi": "Tsimshian-Sprooch", + "tt": "Tataresch", + "ttt": "Tatesch", + "tum": "Tumbuka-Sprooch", + "tvl": "Elliceanesch", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Tahitesch", + "tyv": "Tuwinesch", + "tzm": "Mëttlert-Atlas-Tamazight", + "udm": "Udmurtesch", + "ug": "Uiguresch", + "uga": "Ugaritesch", + "uk": "Ukrainesch", + "umb": "Mbundu-Sprooch", + "und": "Onbestëmmt Sprooch", + "ur": "Urdu", + "uz": "Usbekesch", + "vai": "Vai-Sprooch", + "ve": "Venda-Sprooch", + "vec": "Venezesch", + "vep": "Wepsesch", + "vi": "Vietnamesesch", + "vls": "Westflämesch", + "vmf": "Mainfränkesch", + "vo": "Volapük", + "vot": "Wotesch", + "vro": "Voro", + "vun": "Vunjo", + "wa": "Wallounesch", + "wae": "Walliserdäitsch", + "wal": "Walamo-Sprooch", + "war": "Waray", + "was": "Washo-Sprooch", + "wo": "Wolof", + "wuu": "Wu-Chinesesch", + "xal": "Kalmückesch", + "xh": "Xhosa", + "xmf": "Mingrelesch Sprooch", + "xog": "Soga", + "yao": "Yao-Sprooch", + "yap": "Yapesesch", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "Jiddesch", + "yo": "Yoruba", + "yrl": "Nheengatu", + "yue": "Kantonesesch", + "za": "Zhuang", + "zap": "Zapotekesch", + "zbl": "Bliss-Symboler", + "zea": "Seelännesch", + "zen": "Zenaga", + "zgh": "Marokkanescht Standard-Tamazight", + "zh": "Chinesesch", + "zh_Hans": "Chinesesch (vereinfacht)", + "zh_Hant": "Chinesesch (traditionell)", + "zu": "Zulu", + "zun": "Zuni-Sprooch", + "zxx": "Keng Sproochinhalter", + "zza": "Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lg.json new file mode 100644 index 0000000000000000000000000000000000000000..a2eaa292549a7626ed21f99567cb614a648b153b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lg.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ak": "Lu-akaani", + "am": "Lu-amhariki", + "ar": "Luwarabu", + "be": "Lubelarusi", + "bg": "Lubulugariya", + "bn": "Lubengali", + "cs": "Luceeke", + "de": "Ludaaki", + "el": "Lugereeki\/Luyonaani", + "en": "Lungereza", + "es": "Lusipanya", + "fa": "Luperusi", + "fr": "Lufalansa", + "ha": "Luhawuza", + "hi": "Luhindu", + "hu": "Luhangare", + "id": "Luyindonezya", + "ig": "Luyibo", + "it": "Luyitale", + "ja": "Lujapani", + "jv": "Lunnajjava", + "km": "Lukme", + "ko": "Lukoreya", + "lg": "Luganda", + "ms": "Lumalayi", + "my": "Lubbama", + "ne": "Lunepali", + "nl": "Luholandi", + "pa": "Lupunjabi", + "pl": "Lupolandi", + "pt": "Lupotugiizi", + "ro": "Lulomaniya", + "ru": "Lulasa", + "rw": "Lunarwanda", + "so": "Lusomaliya", + "sv": "Luswideni", + "ta": "Lutamiiru", + "th": "Luttaayi", + "tr": "Lutake", + "uk": "Luyukurayine", + "ur": "Lu-urudu", + "vi": "Luvyetinaamu", + "yo": "Luyoruba", + "zh": "Lucayina", + "zu": "Luzzulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ln.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ln.json new file mode 100644 index 0000000000000000000000000000000000000000..fa76aafb4dcd9f3066cee7cd970fdfd61ab22972 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ln.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.28.76", + "Names": { + "ak": "akan", + "am": "liamariki", + "ar": "lialabo", + "be": "libyelorisí", + "bg": "libiligali", + "bn": "libengali", + "cs": "litshekÉ›", + "de": "lialemá", + "el": "ligeleki", + "en": "lingÉ›lÉ›Ìsa", + "es": "lisipanye", + "fa": "lipelésanÉ›", + "fr": "lifalansÉ›Ì", + "ha": "hausa", + "hi": "lihindi", + "hu": "liongili", + "id": "lindonezi", + "ig": "igbo", + "it": "litaliano", + "ja": "lizapÉ”", + "jv": "lizava", + "km": "likambodza", + "ko": "likoreya", + "ln": "lingála", + "ms": "limalezi", + "my": "libilimá", + "ne": "linepalÉ›", + "nl": "lifalamá", + "pa": "lipendzabi", + "pl": "lipolonÉ›", + "pt": "lipulutugÉ›Ìsi", + "ro": "liromani", + "ru": "lirisí", + "rw": "kinyarwanda", + "so": "lisomali", + "sv": "lisuwedÉ›", + "ta": "litamuli", + "th": "litaye", + "tr": "litiliki", + "uk": "likrÉ›ni", + "ur": "liurdu", + "vi": "liviyetinámi", + "yo": "yoruba", + "zh": "lisinwa", + "zu": "zulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lo.json new file mode 100644 index 0000000000000000000000000000000000000000..2f04593244677eec283e51294b37664a26e1f9fc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lo.json @@ -0,0 +1,526 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "ອະຟາ", + "ab": "à»àº­àºšàº„າຊຽນ", + "ace": "à»àº­àº±àºàºŠàºµà»€àº™àº±àºª", + "ach": "ອາໂຄລີ", + "ada": "ອາà»àº”ງມີ", + "ady": "ເອດີຮິ", + "ae": "ອາເວັສà»àº•ນ", + "af": "ອາຟຣິàºàº²àº™", + "afh": "à»àº­àºŸàºµàº®àºµàº¥àºµ", + "agq": "ອາເຮັມ", + "ain": "ໄອນູ", + "ak": "ອາàºàº²àº™", + "akk": "ອັàºàºàº²àº”ຽມ", + "ale": "ອາເລີດ", + "alt": "ອານໄຕໃຕ້", + "am": "ອຳຮາຣິàº", + "an": "ອາຣາໂàºà»€àº™àº±àº”", + "ang": "ອັງàºàº´àº”ໂບຮານ", + "anp": "à»àº­àº™àºˆàºµàºàº²", + "ar": "ອາຣັບ", + "ar_001": "ອາຣາບິàºàº¡àº²àº”ຕະຖານສະໄà»à»ƒà»à»ˆ", + "arc": "ອາລາມິàº", + "arn": "ມາພຸດຊີ", + "arp": "ອາຣາປາໂຮ", + "arw": "ອາຣາà»àº§àº", + "as": "ອັສຊາມີສ", + "asa": "ອາຊູ", + "ast": "ອັສຕູຮຽນ", + "av": "ອາວາຣິàº", + "awa": "ອາວາຮິ", + "ay": "ອາàºàº¡àº²àº¥àº²", + "az": "ອາເຊີໄບຈານິ", + "ba": "ບາຣàºàºµ", + "bal": "ບາລູຊີ", + "ban": "ບາລີເນັດ", + "bas": "ບາຊາ", + "bax": "ບາມຸນ", + "bbj": "ໂຄມາລາ", + "be": "ເບລາຣັສຊຽນ", + "bej": "ບີເຈ", + "bem": "ເບັມບາ", + "bez": "ບີນາ", + "bfd": "ບາຟັດ", + "bg": "ບັງàºàº²àº£àº½àº™", + "bgn": "ບາໂລຈີ ພາàºàº•າເວັນຕົàº", + "bho": "ໂບພູຣິ", + "bi": "ບິສລະມາ", + "bik": "ບີຄອນ", + "bin": "ບີນີ", + "bkm": "àºàº»àº¡", + "bla": "ຊິàºàºŠàº´àºàº²", + "bm": "ບາມບາຣາ", + "bn": "ເບັງàºàº²àº¥àºµ", + "bo": "ທິເບທັນ", + "br": "ເບຣຕັນ", + "bra": "ບຣາ", + "brx": "ໂບດູ", + "bs": "ບອສນຽນ", + "bss": "ອາຄຸດ", + "bua": "ບູຣຽດ", + "bug": "ບູຈີເນັດ", + "bum": "ບູລູ", + "byn": "ບລິນ", + "byv": "ເມດູມບາ", + "ca": "ຄາຕາລານ", + "cad": "à»àº„ດໂດ", + "car": "ຄາຣິບ", + "cay": "ຄາຢູàºàº²", + "cch": "ອາດà»àºŠàº¡", + "ce": "ຊີເຄນ", + "ceb": "ຊີບູໂນ", + "cgg": "ຊີàºàº²", + "ch": "ຊາມà»à»‚ຣ", + "chb": "ຊິບຊາ", + "chg": "ຊາàºàº²à»„ຕ", + "chk": "ຊູເàºàº”", + "chm": "ມາຣິ", + "chn": "ຊີນຸàºàºˆàº²àºàº­àº™", + "cho": "ຊອàºàº•ິວ", + "chp": "ຊີພິວຢານ", + "chr": "ຊີໂຣàºàºµ", + "chy": "ຊີເຢນນີ", + "ckb": "ໂຊຣານິ ເຄີດິຊ", + "co": "ຄà»àºŠàº´àºàº²", + "cop": "ຄອບຕິàº", + "cr": "ຄີ", + "crh": "ຄຣີເມນເຕີຄິຊ", + "crs": "ເຊເຊວາ ໂຄຣດ àºàº£àº±à»ˆàº‡", + "cs": "ເຊàº", + "csb": "àºàº²àºŠàº¹àºšàº½àº™", + "cu": "ໂບດສລາວິàº", + "cv": "ຊູວາຊ", + "cy": "ເວວ", + "da": "à»àº”ນິຊ", + "dak": "ດາໂàºàº•າ", + "dar": "ດາàºàº§àº²", + "dav": "ໄຕຕາ", + "de": "ເຢàºàº¥àº°àº¡àº±àº™", + "de_AT": "ເຢàºàº¥àº°àº¡àº±àº™ (ໂອສຕຣິດ)", + "de_CH": "ສະວິສ ໄຮ ເຈີà»àº¡àº™", + "del": "ເດລາວາ", + "den": "ຊີເລັບ", + "dgr": "ໂດàºàº£àº´àºš", + "din": "ດິນàºàº²", + "dje": "ຊາມາ", + "doi": "ດອàºàº£àºµ", + "dsb": "ຊà»àºšàº½àº™àº•à»à»ˆàºàº§à»ˆàº²", + "dua": "ດົວລາ", + "dum": "ດັàºàºàº²àº‡", + "dv": "ດີວີຮີ", + "dyo": "ໂຈລາ-ຟອນຢີ", + "dyu": "ດູລາ", + "dz": "ດີຊອງຄາ", + "dzg": "ດາຊາàºàº²", + "ebu": "ເອັມບູ", + "ee": "ອິວາ", + "efi": "ອີຟິàº", + "egy": "ອີຢິບບູຮານ", + "eka": "ອີàºàº²àºˆàº±àº", + "el": "àºàº£àºµàº", + "elx": "ອີລາໄມ", + "en": "ອັງàºàº´àº”", + "en_AU": "ອັງàºàº´àº” (ໂອດສະຕາລີ)", + "en_GB": "ອັງàºàº´àº” (ບຣິດທິຊ)", + "en_US": "ອັງàºàº´àº” (ອາເມລິàºàº±àº™)", + "enm": "ອັງàºàº´àº”àºàº²àº‡", + "eo": "ເອສປາàº", + "es": "ສະà»àº›àº™àº™àº´àºŠ", + "es_419": "ລາຕິນ ອາເມຣິàºàº±àº™ ສະà»àº›àº™àº™àº´àºŠ", + "es_ES": "ສະເປັນ ຢຸໂຣບ", + "es_MX": "ເມັàºàºŠàº´àºàº±àº™ ສະà»àº›àº™àº™àº´àºŠ", + "et": "ເອສໂຕນຽນ", + "eu": "ບັສàºàºµ", + "ewo": "ອີວອນດູ", + "fa": "ເປີຊຽນ", + "fan": "à»àºŸàº‡", + "fat": "à»àºŸàº™àº•ີ", + "ff": "ຟູລາ", + "fi": "ຟິນນິຊ", + "fil": "ຟີລິປີໂນ", + "fj": "ຟິຈຽນ", + "fo": "ຟາໂຣສ", + "fon": "ຟອນ", + "fr": "àºàº£àº±à»ˆàº‡", + "fr_CA": "ຟລັງ(àºàº²àº™àº²àº”າ)", + "frm": "ຟຮັ່ງເສດàºàº²àº‡", + "fro": "ຟຮັ່ງເສດໂບຮານ", + "frr": "ຟຣີຊຽນເໜືອ", + "frs": "ຟຣີຊຽນຕາເວັນອອàº", + "fur": "ຟຣີລຽນ", + "fy": "ຟຣິຊຽນ ຕາເວັນຕົàº", + "ga": "ໄອຣິສ", + "gaa": "àºàº²", + "gag": "àºàº²àºàº²àº­àº¸àºŠ", + "gay": "àºàº²à»‚ຢ", + "gba": "ບາàºàº²", + "gd": "ສະàºàº±àº­àº”ເàºàº¥àº´àº", + "gez": "àºàºµ", + "gil": "àºàº´àº™à»€àºšàºµà»€àº—ັດ", + "gl": "àºàº²àº¥àº´àºŠàº½àº™", + "gmh": "ເຢàºàº¥àº°àº¡àº±àº™àºªàº¹àº‡àºàº²àº‡", + "gn": "àºàº»àº§àº£àº²àº™àºµ", + "goh": "ເຢàºàº¥àº°àº¡àº±àº™àºªàº¹àº‡à»‚ບຮານ", + "gon": "àºàº­àº™àº”ີ", + "gor": "ໂàºàº£àº­àº™àº•າໂຣ", + "got": "àºàº­àº”ຮິàº", + "grb": "àºàº£àºµà»‚ບ", + "grc": "à»àº­àº™àºŠàº½àº™àºàº£àºµàº", + "gsw": "ສະວິສ ເຈີà»àº¡àº™", + "gu": "àºàº¹àºˆàº²àº£àº²àº•ິ", + "guz": "àºàº¹àºŠàº´", + "gv": "à»àº¡àº‡àºŠà»Œ", + "gwi": "ວິດອິນ", + "ha": "ເຮົາຊາ", + "hai": "ໄຮດາ", + "haw": "ຮາໄວອຽນ", + "he": "ຮີບຣິວ", + "hi": "ຮິນດິ", + "hil": "ຮິຣິໄàºàº™àº­àº™", + "hit": "ຮິດໄຕ", + "hmn": "ມອງ", + "ho": "ຮິຣິໂມຕູ", + "hr": "ໂຄຣເອທຽນ", + "hsb": "ຊà»àºšàº½àº™ ທາງຕອນເໜືອ", + "ht": "ໄຮຕຽນ", + "hu": "ຮັງàºàº²àº£àº½àº™", + "hup": "ຮູປາ", + "hy": "ອາເມນຽນ", + "hz": "ເຮິຮິໂຣ", + "ia": "ອິນເຕີລິງລົວ", + "iba": "ໄອບານ", + "ibb": "ໄອໄບໄບໂອ", + "id": "ອິນໂດເນຊຽນ", + "ie": "ອິນເຕີລິງàºàº£àºµ", + "ig": "ອິàºà»‚ບ", + "ii": "ເຊສວàºàº¢àºµ", + "ik": "ອິນນູປຽàº", + "ilo": "ໄອໂລໂàº", + "inh": "ອິນàºàº±àºŠ", + "io": "ອີໂດ", + "is": "ໄອສà»àº¥àº™àº”ິàº", + "it": "ອິຕາລຽນ", + "iu": "ອິນນຸàºàº•ິຕັດ", + "ja": "àºàºµà»ˆàº›àº¸à»ˆàº™", + "jbo": "ໂລບບັນ", + "jgo": "ງອມບາ", + "jmc": "ມາà»àºŠàº¡", + "jpr": "ຈູà»àº”ວ-ເພີຊຽນ", + "jrb": "ຈູà»àº”ວ-ອາລາບິàº", + "jv": "ຈາà»àº§àº™àºµàºª", + "ka": "ຈà»àºˆàº½àº™", + "kaa": "àºàº²àº£àº²-àºàº²àº™àº›àº²àº", + "kab": "àºàº²à»„ບລ໌", + "kac": "àºàº²àºŠàº´àº™", + "kaj": "ຈຣູ", + "kam": "àºàº²àº¡àºšàº²", + "kaw": "àºàº°àº§àºµ", + "kbd": "àºàº²àºšàº²àº”ຽນ", + "kbl": "ຄາà»àº™àº¡àºšàº¹", + "kcg": "ຕີບ", + "kde": "ມາຄອນເດ", + "kea": "ຄາເວີເດàºàº™àº¹", + "kfo": "ໂຄໂລ", + "kg": "ຄອງໂàº", + "kha": "ຄາສິ", + "kho": "ໂຄຕັນ", + "khq": "ຄອàºàº£àº² ຊິນີ", + "ki": "ຄິຄູຢຸ", + "kj": "àºàº§àº™àºàº²àº¡àº²", + "kk": "ຄາຊັàº", + "kkj": "ຄາໂàº", + "kl": "àºàº£àºµàº™à»àº¥àº™àº¥àº´àº”", + "kln": "ຄາເລັນຈິນ", + "km": "ຂະເà»àº™", + "kmb": "ຄິມບັນດູ", + "kn": "ຄັນນາດາ", + "ko": "ເàºàº»àº²àº«àº¥àºµ", + "koi": "ໂຄມີ-ເພີມຢັàº", + "kok": "àºàº­àº™àºàº²àº™àºµ", + "kos": "ຄູສໄລ", + "kpe": "àºàº²à»àº›àº£", + "kr": "ຄານຸລິ", + "krc": "àºàº²àº£àº²à»„ຊ-ບານàºàº²", + "krl": "àºàº²à»€àº£àº¥àº½àº™", + "kru": "àºàº¹àº£àº¹àº", + "ks": "ຄາສເມàºàº£àº´", + "ksb": "ຊຳບາລ້າ", + "ksf": "ບາເຟàº", + "ksh": "ໂຄລອàºàº™àº½àº™", + "ku": "ເຄີດິສ", + "kum": "ຄູມີàº", + "kut": "ຄູເທໄນ", + "kv": "ໂຄມິ", + "kw": "ຄà»àº™àº´àºŠ", + "ky": "ເàºàºàºàºµàºª", + "la": "ລາຕິນ", + "lad": "ລາດີໂນ", + "lag": "à»àº¥àº™àºàº´", + "lah": "ລານດາ", + "lam": "à»àº¥àº¡àºšàº²", + "lb": "ລັàºà»€àºŠàº¡àºšàº§àºàºàº´àºŠ", + "lez": "ລີຊຽນ", + "lg": "à»àºàº™àº”າ", + "li": "ລິມເບີàºàºµàºŠ", + "lkt": "ລາໂàºàº•າ", + "ln": "ລິງàºàº²àº¥àº²", + "lo": "ລາວ", + "lol": "à»àº¡àº±àº‡à»‚àºà»‰", + "loz": "ໂລຊິ", + "lrc": "ລູຣິ ທາງຕອນເໜືອ", + "lt": "ລິທົວນຽນ", + "lu": "ລູບາ-ຄາຕັງàºàº²", + "lua": "ລູບາ-ລູລົວ", + "lui": "ລູເຊໂນ", + "lun": "ລຸນດາ", + "luo": "ລົວ", + "lus": "ລູໄຊ", + "luy": "ລູໄàº", + "lv": "ລັດວຽນ", + "mad": "ມາດູລາ", + "maf": "ມາຟາ", + "mag": "ມາàºàº²àº®àº´", + "mai": "ໄມທີລິ", + "mak": "ມາàºàº²àºŠàº²àº£", + "man": "ມັນດິງàºàº²", + "mas": "ມາໄຊ", + "mde": "ມາບາ", + "mdf": "ມອàºàºŠàº²", + "mdr": "ມານດາຣ", + "men": "ເມນເດ", + "mer": "ເມຣູ", + "mfe": "ມà»àº£àº´àºªà»€àº¢àº™", + "mg": "ມາລາàºàº²àºªàºŠàºµ", + "mga": "ໄອລິດàºàº²àº‡", + "mgh": "ມາຄູວາ-ມີດໂຕ", + "mgo": "ເມທາ", + "mh": "ມາຊານເລັດ", + "mi": "ມາວຣິ", + "mic": "ມິàºà»àº¡àº", + "min": "ທີà»àº™àº‡àºàº²àºšàº¹", + "mk": "à»àº¡àºŠàº´à»‚ດນຽນ", + "ml": "ມາເລອາລຳ", + "mn": "ມອງໂàºà»€àº¥àº", + "mnc": "à»àº¡àº™àºˆàº¹", + "mni": "ມານີພູຣິ", + "moh": "ໂມຫາ", + "mos": "ມອສຊີ", + "mr": "ມາຣາທີ", + "ms": "ມາເລ", + "mt": "ມອລທີສ", + "mua": "ມັນດັງ", + "mul": "ຫລາàºàºžàº²àºªàº²", + "mus": "ຄຣິàº", + "mwl": "ມີລັນດາ", + "mwr": "ມາວາຣິ", + "my": "ມຽນມາ", + "mye": "ມà»àº¢àº´àº™", + "myv": "ເອີàºàº²", + "mzn": "ມາà»àºŠàº™à»€àº”ີລັງ", + "na": "ນາຢູລູ", + "nap": "ນາໂປລີ", + "naq": "ນາມາ", + "nb": "ນà»à»€àº§àºˆàº½àº™ ບັອàºàº¡àº­àº¥", + "nd": "ເອັນເດເບເລເໜືອ", + "nds": "ເຢàºàº¥àº°àº¡àº±àº™ ຕອນໄຕ້", + "nds_NL": "ຊາຊອນ ຕອນໄຕ", + "ne": "ເນປາລີ", + "new": "ນີວາຣິ", + "ng": "ເອັນດອງàºàº²", + "nia": "ນີ່ອັດ", + "niu": "ນີ່ອູ", + "nl": "ດັຊ", + "nl_BE": "ຟລີມິຊ", + "nmg": "àºàº§àº²àºŠàºµà»‚ອ", + "nn": "ນà»à»€àº§àºˆàº½àº™ ນີນອàº", + "nnh": "ຈີ່ມບູນ", + "no": "ນà»à»€àº§àº", + "nog": "ນà»à»„àº", + "non": "ນà»à»‚ບຮານ", + "nqo": "ເອັນໂàº", + "nr": "ນີບີລີໃຕ້", + "nso": "ໂຊໂທເໜືອ", + "nus": "ເນີ", + "nv": "ນາວາໂຈ", + "nwc": "ເນວາດັ້ງເດີມ", + "ny": "ນານຈາ", + "nym": "ນາມວີຊິ", + "nyn": "ນານຄອນ", + "nyo": "ໂນໂຣ", + "nzi": "ນິມາ", + "oc": "ອັອàºàºŠàºµàº•ານ", + "oj": "ໂອຈິບວາ", + "om": "ໂອໂຣໂມ", + "or": "ໂອຣິຢາ", + "os": "ອອດເຊຕິàº", + "osa": "ໂອà»àºŠàº", + "ota": "ຕູàºàºµàº­àº­àº”ໂຕມັນ", + "pa": "ປັນຈາບີ", + "pag": "ປານàºàº²àºŠàºµàº¡àº²àº™", + "pal": "ພາລາວີ", + "pam": "ປາມປານàºàº²", + "pap": "ປາມເປàºà»€àº¡àº±àº™à»‚ທ", + "pau": "ປາລົວອານ", + "pcm": "ໄນຈີຣຽນພິດàºàº´àº™", + "peo": "ເປີເຊàºà»‚ບຮານ", + "phn": "ຟີນີເຊàº", + "pi": "ປາລີ", + "pl": "ໂປລິຊ", + "pon": "ພອນເພ", + "pro": "ໂປວອງຊານໂບຮານ", + "ps": "ປາສໂຕ", + "pt": "ປອàºàº•ຸàºàºàº´àºª", + "pt_BR": "ປອàºàº•ຸàºàºàº´àºª ບະເລຊີ່ນ", + "pt_PT": "ປອàºàº•ຸàºàºàº´àºª ຢຸໂຣບ", + "qu": "ຄີຊົວ", + "quc": "Kʼicheʼ", + "raj": "ຣາຈັສທານິ", + "rap": "ຣາປານຸàº", + "rar": "ຣາໂຣທອນàºàº²àº™", + "rm": "ໂຣà»àº¡àº™àºŠà»Œ", + "rn": "ຣຸນດິ", + "ro": "ໂຣà»àº¡àº™àº½àº™", + "ro_MD": "ໂມດາວຽນ", + "rof": "ຣົມໂບ", + "rom": "ໂຣເມນີ", + "root": "ລູດ", + "ru": "ລັດເຊàº", + "rup": "ອາໂຣມານຽນ", + "rw": "ຄິນຢາວານດາ", + "rwk": "ອາຣວາ", + "sa": "ສັນສະàºàº£àº´àº”", + "sad": "ຊັນດາວ", + "sah": "ຊາàºàº²", + "sam": "ສາມາຣິà»àº•ນ-", + "saq": "ຊຳບູຣູ", + "sas": "ຊາຊັàº", + "sat": "ຊານທາລິ", + "sba": "àºàº³à»€àºš", + "sbp": "ຊານàºàº¹", + "sc": "ສາດີນຽນ", + "scn": "ຊີຊິລີນ", + "sco": "ສàºàº­àº”", + "sd": "ສິນທິ", + "sdh": "ພາàºà»„ຕ້ ຂອງ àºàº¹àº”ິດ", + "se": "ຊາມິເໜືອ", + "see": "ຊີນີàºàº²", + "seh": "ຊີນາ", + "sel": "ເຊນຄັບ", + "ses": "ໂຄàºàº£àº²à»‚ບໂຣ ເຊນນິ", + "sg": "à»àºŠàº‡à»‚àº", + "sga": "ອີຣິຊເàºàº»à»ˆàº²", + "sh": "ເຊີໂບ-ໂàºà»€àºŠàº", + "shi": "ທາເຊວຫິດ", + "shn": "ຊານ", + "shu": "ອາລັບ-ຊາດ", + "si": "ສິນຫາລາ", + "sid": "ຊິດາໂມ", + "sk": "ສະໂລà»àº§àº±àº", + "sl": "ສະໂລເວນຽນ", + "sm": "ຊາມົວ", + "sma": "ຊາມິໃຕ້", + "smj": "ລຸນຊາມິ", + "smn": "ອີນາຣິຊາມິ", + "sms": "ສàºàº­àº”ຊາມິ", + "sn": "ໂຊນາ", + "snk": "ໂຊນິນàºàºµ", + "so": "ໂຊມາລີ", + "sog": "ຊອàºàº”ິນ", + "sq": "ອານບານຽນ", + "sr": "ເຊີບຽນ", + "srn": "ສຣານນານຕອນໂàº", + "srr": "ເຊເລີ", + "ss": "ຊຣາຕິ", + "ssy": "ຊາໂຮ", + "st": "ໂຊໂທໃຕ້", + "su": "ຊຸນà»àº”ນນີສ", + "suk": "ຊູຄູມ້າ", + "sus": "ຊູຊູ", + "sux": "ຊູເມີເລàº", + "sv": "ສະວີດິຊ", + "sw": "ຊວາຮີລິ", + "sw_CD": "ຄອງໂຠຊວາຮີລິ", + "swb": "ໂຄໂນຣຽນ", + "syc": "ຊີເລàºà»àºšàºšàº”ັ້ງເດີມ", + "syr": "ຊີເລàº", + "ta": "ທາມິລ", + "te": "ເຕລູàºàº¹", + "tem": "ທີມເນ", + "teo": "ເຕໂຊ", + "ter": "ເຕເລໂນ", + "tet": "ເຕຕູມ", + "tg": "ທາຈິàº", + "th": "ໄທ", + "ti": "ຕິàºàº£àº´àº™àº¢àº²", + "tig": "ໄທàºàº£àºµ", + "tiv": "ຕີວ", + "tk": "ເທີàºà»€àº¡àº±àº™", + "tkl": "ໂຕເàºà»€àº¥àº»àº²", + "tl": "ຕາàºàº²àº¥àº­àº", + "tlh": "ຄຣິງàºàº­àº™", + "tli": "ທລີງàºàº´àº”", + "tmh": "ທາມາàºà»€àºŠàº", + "tn": "ເຕສະວານາ", + "to": "ທອງàºàº²àº™", + "tog": "ນາàºàº­àº²àºŠàº²àº•ອງàºàº²", + "tpi": "ທອàºàºžàºµàºŠàº´àº™", + "tr": "ເທີຄິຊ", + "trv": "ຕາໂລໂàº", + "ts": "ເຕຊອງàºàº²", + "tsi": "ຊີມຊີà»àº­àº™", + "tt": "ທາທາ", + "tum": "ຕຳບູàºàº²", + "tvl": "ຕູວາລູ", + "tw": "ທວີ", + "twq": "ຕາຊາວັàº", + "ty": "ຕາຮີຕຽນ", + "tyv": "ຕູວີນຽນ", + "tzm": "ອັດລາສ ທາມາຊີຠàºàº²àº‡", + "udm": "ອຸດມັດ", + "ug": "ອຸàºà»€àº„ີ", + "uga": "ຢູàºàº²àº¥àº´àº", + "uk": "ຢູເຄຣນຽນ", + "umb": "ອຳບັນດູ", + "und": "ບà»à»ˆàºªàº²àº¡àº²àº”ລະບຸພາສາ", + "ur": "ອູຣດູ", + "uz": "ອຸສເບàº", + "vai": "ໄວ", + "ve": "ເວນດາ", + "vi": "ຫວຽດນາມ", + "vo": "ໂວລາພັàº", + "vot": "ໂວຕິàº", + "vun": "ວັນໂຈ", + "wa": "ວà»àº¥àº¹àº¡", + "wae": "ວາເຊີ", + "wal": "ວາລາໂມ", + "war": "ວາເລ", + "was": "ວາໂຊ", + "wbp": "ວາຣພິຣິ", + "wo": "ວà»àº¥àº­àºš", + "xal": "àºàº²àº™àº¡àº´àº", + "xh": "ໂຮຊາ", + "xog": "ໂຊàºàº²", + "yao": "ເຢົ້າ", + "yap": "ຢັບ", + "yav": "à»àºàº‡à»€àºšàº™", + "ybb": "à»àº¢àº¡àºšàº²", + "yi": "ຢິວ", + "yo": "ໂຢຣູບາ", + "yue": "àºàº§àº²àº‡àº•ຸ້ງ", + "za": "ຊວາງ", + "zap": "ຊາໂປà»àº•ບ", + "zbl": "ສັນàºàº²àº¥àº±àºàºšàº¥àºµàºŠàº´àº¡", + "zen": "ເຊນາàºàº²", + "zgh": "ໂມຣັອàºà»àº„ນ ທາມາຊີຠມາດຕະຖານ", + "zh": "ຈີນ", + "zh_Hans": "ຈີນà»àºšàºšàº®àº½àºšàº‡à»ˆàº²àº", + "zh_Hant": "ຈີນà»àºšàºšàº”ັ້ງເດີມ", + "zu": "ຊູລູ", + "zun": "ຊູນີ", + "zxx": "ບà»à»ˆàº¡àºµà»€àº™àº·à»‰àº­àº«àº²àºžàº²àºªàº²", + "zza": "ຊາຊາ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lt.json new file mode 100644 index 0000000000000000000000000000000000000000..0f65d5c533c77eada91df310514455271d2936c6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lt.json @@ -0,0 +1,619 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afarų", + "ab": "abchazų", + "ace": "aÄinezų", + "ach": "akolių", + "ada": "adangmų", + "ady": "adygÄ—jų", + "ae": "avestų", + "aeb": "Tuniso arabų", + "af": "afrikanų", + "afh": "afrihili", + "agq": "aghemų", + "ain": "ainų", + "ak": "akanų", + "akk": "akadianų", + "akz": "alabamieÄių", + "ale": "aleutų", + "aln": "albanų kalbos gegų tarmÄ—", + "alt": "pietų Altajaus", + "am": "amharų", + "an": "aragonesų", + "ang": "senoji anglų", + "anp": "angikų", + "ar": "arabų", + "ar_001": "Å¡iuolaikinÄ— standartinÄ— arabų", + "arc": "aramaikų", + "arn": "mapudungunų", + "aro": "araonų", + "arp": "arapahų", + "arq": "Alžyro arabų", + "arw": "aravakų", + "ary": "Maroko arabų", + "arz": "Egipto arabų", + "as": "asamų", + "asa": "asu", + "ase": "Amerikos ženklų kalba", + "ast": "asturianų", + "av": "avarikų", + "avk": "kotava", + "awa": "avadhi", + "ay": "aimarų", + "az": "azerbaidžanieÄių", + "ba": "baÅ¡kirų", + "bal": "baluÄi", + "ban": "balieÄių", + "bar": "bavarų", + "bas": "basų", + "bax": "bamunų", + "bbc": "batak toba", + "bbj": "ghomalų", + "be": "baltarusių", + "bej": "bÄ—jų", + "bem": "bembų", + "bew": "betavi", + "bez": "benų", + "bfd": "bafutų", + "bfq": "badaga", + "bg": "bulgarų", + "bgn": "vakarų beludžių", + "bho": "bauÄpuri", + "bi": "bislama", + "bik": "bikolų", + "bin": "bini", + "bjn": "bandžarų", + "bkm": "komų", + "bla": "siksikų", + "bm": "bambarų", + "bn": "bengalų", + "bo": "tibetieÄių", + "bpy": "biÅ¡nuprijos", + "bqi": "bakhtiari", + "br": "bretonų", + "bra": "brajų", + "brh": "brahujų", + "brx": "bodo", + "bs": "bosnių", + "bss": "akÅ«sų", + "bua": "buriatų", + "bug": "buginezų", + "bum": "bulu", + "byn": "blin", + "byv": "medumbų", + "ca": "katalonų", + "cad": "kado", + "car": "karibų", + "cay": "kaijÅ«gų", + "cch": "atsamų", + "ce": "ÄeÄÄ—nų", + "ceb": "sebuanų", + "cgg": "Äigų", + "ch": "Äamorų", + "chb": "ÄibÄų", + "chg": "Äagatų", + "chk": "Äukesų", + "chm": "marių", + "chn": "Äinuk žargonas", + "cho": "Äoktau", + "chp": "ÄipvÄ—jų", + "chr": "Äerokių", + "chy": "Äajenų", + "ckb": "soranių kurdų", + "co": "korsikieÄių", + "cop": "koptų", + "cps": "capiznon", + "cr": "kry", + "crh": "Krymo turkų", + "crs": "SeiÅ¡elių kreolų ir prancÅ«zų", + "cs": "Äekų", + "csb": "kaÅ¡ubų", + "cu": "bažnytinÄ— slavų", + "cv": "Äiuvašų", + "cy": "valų", + "da": "danų", + "dak": "dakotų", + "dar": "dargva", + "dav": "taitų", + "de": "vokieÄių", + "de_AT": "Austrijos vokieÄių", + "de_CH": "Å veicarijos aukÅ¡tutinÄ— vokieÄių", + "del": "delavero", + "den": "slave", + "dgr": "dogribų", + "din": "dinkų", + "dje": "zarmų", + "doi": "dogri", + "dsb": "žemutinių sorbų", + "dtp": "centrinio Dusuno", + "dua": "dualų", + "dum": "Vidurio Vokietijos", + "dv": "divehų", + "dyo": "džiola-foni", + "dyu": "dyulų", + "dz": "botijų", + "dzg": "dazagų", + "ebu": "embu", + "ee": "evių", + "efi": "efik", + "egl": "italų kalbos Emilijos tarmÄ—", + "egy": "senovÄ—s egiptieÄių", + "eka": "ekajuk", + "el": "graikų", + "elx": "elamitų", + "en": "anglų", + "en_AU": "Australijos anglų", + "en_CA": "Kanados anglų", + "en_GB": "Didžiosios Britanijos anglų", + "en_US": "Jungtinių Valstijų anglų", + "enm": "Vidurio Anglijos", + "eo": "esperanto", + "es": "ispanų", + "es_419": "Lotynų Amerikos ispanų", + "es_ES": "Europos ispanų", + "es_MX": "Meksikos ispanų", + "esu": "centrinÄ—s Aliaskos jupikų", + "et": "estų", + "eu": "baskų", + "ewo": "evondo", + "ext": "ispanų kalbos EkstremadÅ«ros tarmÄ—", + "fa": "persų", + "fan": "fangų", + "fat": "fanti", + "ff": "fulahų", + "fi": "suomių", + "fil": "filipinieÄių", + "fit": "suomių kalbos Tornedalio tarmÄ—", + "fj": "fidžių", + "fo": "farerų", + "fon": "fon", + "fr": "prancÅ«zų", + "fr_CA": "Kanados prancÅ«zų", + "fr_CH": "Å veicarijos prancÅ«zų", + "frc": "kadžunų prancÅ«zų", + "frm": "Vidurio PrancÅ«zijos", + "fro": "senoji prancÅ«zų", + "frp": "arpitano", + "frr": "Å¡iaurinių fryzų", + "frs": "rytų fryzų", + "fur": "friulių", + "fy": "vakarų fryzų", + "ga": "airių", + "gaa": "ga", + "gag": "gagaÅ«zų", + "gan": "kinų kalbos dziangsi tarmÄ—", + "gay": "gajo", + "gba": "gbaja", + "gbz": "zoroastrų dari", + "gd": "Å¡kotų (gÄ—lų)", + "gez": "gyz", + "gil": "kiribati", + "gl": "galisų", + "glk": "gilaki", + "gmh": "Vidurio AukÅ¡tosios Vokietijos", + "gn": "gvaranių", + "goh": "senoji AukÅ¡tosios Vokietijos", + "gom": "Goa konkanių", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotų", + "grb": "grebo", + "grc": "senovÄ—s graikų", + "gsw": "Å veicarijos vokieÄių", + "gu": "gudžaratų", + "guc": "vajų", + "gur": "frafra", + "guz": "gusi", + "gv": "menieÄių", + "gwi": "gviÄino", + "ha": "hausų", + "hai": "haido", + "hak": "kinų kalbos hakų tarmÄ—", + "haw": "havajieÄių", + "he": "hebrajų", + "hi": "hindi", + "hif": "Fidžio hindi", + "hil": "hiligainonų", + "hit": "hititų", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "kroatų", + "hsb": "aukÅ¡tutinių sorbų", + "hsn": "kinų kalbos hunano tarmÄ—", + "ht": "HaiÄio", + "hu": "vengrų", + "hup": "hupa", + "hy": "armÄ—nų", + "hz": "hererų", + "ia": "tarpinÄ—", + "iba": "iban", + "ibb": "ibibijų", + "id": "indonezieÄių", + "ie": "interkalba", + "ig": "igbų", + "ii": "siÄuan ji", + "ik": "inupiakų", + "ilo": "ilokų", + "inh": "ingušų", + "io": "ido", + "is": "islandų", + "it": "italų", + "iu": "inukitut", + "izh": "ingrų", + "ja": "japonų", + "jam": "Jamaikos kreolų anglų", + "jbo": "loiban", + "jgo": "ngombų", + "jmc": "maÄamų", + "jpr": "judÄ—jų persų", + "jrb": "judÄ—jų arabų", + "jut": "danų kalbos jutų tarmÄ—", + "jv": "javieÄių", + "ka": "gruzinų", + "kaa": "karakalpakų", + "kab": "kebailų", + "kac": "kaÄinų", + "kaj": "ju", + "kam": "kembų", + "kaw": "kavių", + "kbd": "kabardinų", + "kbl": "kanembų", + "kcg": "tyap", + "kde": "makondų", + "kea": "Žaliojo KyÅ¡ulio kreolų", + "ken": "kenyang", + "kfo": "koro", + "kg": "Kongo", + "kgp": "kaingang", + "kha": "kasi", + "kho": "kotanezų", + "khq": "kojra Äini", + "khw": "khovarų", + "ki": "kikujų", + "kiu": "kirmanjki", + "kj": "kuaniama", + "kk": "kazachų", + "kkj": "kako", + "kl": "kalalisut", + "kln": "kalenjinų", + "km": "khmerų", + "kmb": "kimbundu", + "kn": "kanadų", + "ko": "korÄ—jieÄių", + "koi": "komių-permių", + "kok": "konkanių", + "kos": "kosreanų", + "kpe": "kpelių", + "kr": "kanurių", + "krc": "karaÄiajų balkarijos", + "kri": "krio", + "krj": "kinaray-a", + "krl": "karelų", + "kru": "kuruk", + "ks": "kaÅ¡myrų", + "ksb": "Å¡ambalų", + "ksf": "bafų", + "ksh": "kolognų", + "ku": "kurdų", + "kum": "kumikų", + "kut": "kutenai", + "kv": "komi", + "kw": "kornų", + "ky": "kirgizų", + "la": "lotynų", + "lad": "ladino", + "lag": "langi", + "lah": "landa", + "lam": "lamba", + "lb": "liuksemburgieÄių", + "lez": "lezginų", + "lfn": "naujoji frankų kalba", + "lg": "ganda", + "li": "limburgieÄių", + "lij": "ligÅ«rų", + "liv": "lyvių", + "lkt": "lakotų", + "lmo": "lombardų", + "ln": "ngalų", + "lo": "laosieÄių", + "lol": "mongų", + "loz": "lozių", + "lrc": "Å¡iaurÄ—s luri", + "lt": "lietuvių", + "ltg": "latgalių", + "lu": "luba katanga", + "lua": "luba lulua", + "lui": "luiseno", + "lun": "Lundos", + "luo": "luo", + "lus": "mizo", + "luy": "luja", + "lv": "latvių", + "lzh": "klasikinÄ— kinų", + "lzz": "laz", + "mad": "madurezų", + "maf": "mafų", + "mag": "magahi", + "mai": "maithili", + "mak": "Makasaro", + "man": "mandingų", + "mas": "masajų", + "mde": "mabų", + "mdf": "mokÅ¡a", + "mdr": "mandarų", + "men": "mende", + "mer": "merų", + "mfe": "morisijų", + "mg": "malagasų", + "mga": "Vidurio Airijos", + "mgh": "makua-maeto", + "mgo": "meta", + "mh": "MarÅ¡alo Salų", + "mi": "maorių", + "mic": "mikmakų", + "min": "minangkabau", + "mk": "makedonų", + "ml": "malajalių", + "mn": "mongolų", + "mnc": "manÄu", + "mni": "manipurių", + "moh": "mohok", + "mos": "mosi", + "mr": "maratų", + "mrj": "vakarų mari", + "ms": "malajieÄių", + "mt": "maltieÄių", + "mua": "mundangų", + "mul": "kelios kalbos", + "mus": "krykų", + "mwl": "mirandezų", + "mwr": "marvari", + "mwv": "mentavai", + "my": "birmieÄių", + "mye": "mjenų", + "myv": "erzyjų", + "mzn": "mazenderanių", + "na": "naurų", + "nan": "kinų kalbos pietų minų tarmÄ—", + "nap": "neapolieÄių", + "naq": "nama", + "nb": "norvegų bukmolas", + "nd": "Å¡iaurÄ—s ndebelų", + "nds": "ŽemutinÄ—s Vokietijos", + "nds_NL": "ŽemutinÄ—s Saksonijos (Nyderlandai)", + "ne": "nepalieÄių", + "new": "nevari", + "ng": "ndongų", + "nia": "nias", + "niu": "niujieÄių", + "njo": "ao naga", + "nl": "olandų", + "nl_BE": "flamandų", + "nmg": "kvasių", + "nn": "naujoji norvegų", + "nnh": "ngiembÅ«nų", + "no": "norvegų", + "nog": "nogų", + "non": "senoji norsų", + "nov": "novial", + "nqo": "enko", + "nr": "pietų ndebele", + "nso": "Å¡iaurÄ—s Soto", + "nus": "nuerų", + "nv": "navajų", + "nwc": "klasikinÄ— nevari", + "ny": "nianjų", + "nym": "niamvezi", + "nyn": "niankolų", + "nyo": "niorų", + "nzi": "nzima", + "oc": "oÄitarų", + "oj": "ojibva", + "om": "oromų", + "or": "odijų", + "os": "osetinų", + "osa": "osage", + "ota": "osmanų turkų", + "pa": "pendžabų", + "pag": "pangasinanų", + "pal": "vidurinÄ— persų kalba", + "pam": "pampangų", + "pap": "papiamento", + "pau": "palaulieÄių", + "pcd": "pikardų", + "pcm": "Nigerijos pidžinų", + "pdc": "Pensilvanijos vokieÄių", + "pdt": "vokieÄių kalbos žemaiÄių tarmÄ—", + "peo": "senoji persų", + "pfl": "vokieÄių kalbos Pfalco tarmÄ—", + "phn": "finikieÄių", + "pi": "pali", + "pl": "lenkų", + "pms": "italų kalbos Pjemonto tarmÄ—", + "pnt": "Ponto", + "pon": "PonapÄ—s", + "prg": "prÅ«sų", + "pro": "senovÄ—s provansalų", + "ps": "puÅ¡tÅ«nų", + "pt": "portugalų", + "pt_BR": "Brazilijos portugalų", + "pt_PT": "Europos portugalų", + "qu": "keÄujų", + "quc": "kiÄių", + "qug": "ÄŒimboraso aukÅ¡tumų keÄujų", + "raj": "Radžastano", + "rap": "rapanui", + "rar": "rarotonganų", + "rgn": "italų kalbos Romanijos tarmÄ—", + "rif": "rifų", + "rm": "retoromanų", + "rn": "rundi", + "ro": "rumunų", + "ro_MD": "moldavų", + "rof": "rombo", + "rom": "romų", + "root": "rÅ«t", + "rtm": "rotumanų", + "ru": "rusų", + "rue": "rusinų", + "rug": "Rovianos", + "rup": "aromanių", + "rw": "kinjaruandų", + "rwk": "rua", + "sa": "sanskritas", + "sad": "sandavių", + "sah": "jakutų", + "sam": "samarÄ—jų aramių", + "saq": "sambÅ«rų", + "sas": "sasak", + "sat": "santalių", + "saz": "sauraÅ¡trų", + "sba": "ngambajų", + "sbp": "sangų", + "sc": "sardinieÄių", + "scn": "sicilieÄių", + "sco": "Å¡kotų", + "sd": "sindų", + "sdc": "sasaresų sardinų", + "sdh": "pietų kurdų", + "se": "Å¡iaurÄ—s samių", + "see": "senecų", + "seh": "senų", + "sei": "seri", + "sel": "selkup", + "ses": "kojraboro seni", + "sg": "sango", + "sga": "senoji airių", + "sgs": "žemaiÄių", + "sh": "serbų-kroatų", + "shi": "tachelhitų", + "shn": "Å¡an", + "shu": "chadian arabų", + "si": "sinhalų", + "sid": "sidamų", + "sk": "slovakų", + "sl": "slovÄ—nų", + "sli": "silezieÄių žemaiÄių", + "sly": "selajarų", + "sm": "Samoa", + "sma": "pietų samių", + "smj": "Liuleo samių", + "smn": "Inario samių", + "sms": "Skolto samių", + "sn": "Å¡onų", + "snk": "soninke", + "so": "somalieÄių", + "sog": "sogdien", + "sq": "albanų", + "sr": "serbų", + "srn": "sranan tongo", + "srr": "sererų", + "ss": "svatų", + "ssy": "saho", + "st": "pietų Soto", + "stq": "Saterlendo fryzų", + "su": "sundų", + "suk": "sukuma", + "sus": "susu", + "sux": "Å¡umerų", + "sv": "Å¡vedų", + "sw": "suahilių", + "sw_CD": "Kongo suahilių", + "swb": "komorų", + "syc": "klasikinÄ— sirų", + "syr": "sirų", + "szl": "silezieÄių", + "ta": "tamilų", + "tcy": "tulų", + "te": "telugų", + "tem": "timne", + "teo": "teso", + "ter": "Tereno", + "tet": "tetum", + "tg": "tadžikų", + "th": "tajų", + "ti": "tigrajų", + "tig": "tigre", + "tiv": "tiv", + "tk": "turkmÄ—nų", + "tkl": "Tokelau", + "tkr": "tsakurų", + "tl": "tagalogų", + "tlh": "klingonų", + "tli": "tlingitų", + "tly": "talyšų", + "tmh": "tamaÅ¡ek", + "tn": "tsvanų", + "to": "tonganų", + "tog": "niasa tongų", + "tpi": "Papua pidžinų", + "tr": "turkų", + "tru": "turoyo", + "trv": "Taroko", + "ts": "tsongų", + "tsd": "tsakonų", + "tsi": "tsimÅ¡ian", + "tt": "totorių", + "ttt": "musulmonų tatų", + "tum": "tumbukų", + "tvl": "Tuvalu", + "tw": "tvi", + "twq": "tasavakų", + "ty": "taitieÄių", + "tyv": "tuvių", + "tzm": "Centrinio Maroko tamazitų", + "udm": "udmurtų", + "ug": "uigÅ«rų", + "uga": "ugaritų", + "uk": "ukrainieÄių", + "umb": "umbundu", + "und": "nežinoma kalba", + "ur": "urdų", + "uz": "uzbekų", + "vai": "vai", + "ve": "vendų", + "vec": "venetų", + "vep": "vepsų", + "vi": "vietnamieÄių", + "vls": "vakarų flamandų", + "vmf": "pagrindinÄ— frankonų", + "vo": "volapiuko", + "vot": "Votik", + "vro": "veru", + "vun": "vunjo", + "wa": "valonų", + "wae": "valserų", + "wal": "valamo", + "war": "varai", + "was": "VaÅ¡o", + "wbp": "valrpiri", + "wo": "volofų", + "wuu": "kinų kalbos vu tarmÄ—", + "xal": "kalmukų", + "xh": "kosų", + "xmf": "megrelų", + "xog": "sogų", + "yao": "jao", + "yap": "japezų", + "yav": "jangbenų", + "ybb": "jembų", + "yi": "jidiÅ¡", + "yo": "jorubų", + "yrl": "njengatu", + "yue": "kinų kalbos Kantono tarmÄ—", + "za": "chuang", + "zap": "zapotekų", + "zbl": "BLISS simbolių", + "zea": "zelandų", + "zen": "zenaga", + "zgh": "standartinÄ— Maroko tamazigtų", + "zh": "kinų", + "zh_Hans": "supaprastintoji kinų", + "zh_Hant": "tradicinÄ— kinų", + "zu": "zulų", + "zun": "Zuni", + "zxx": "nÄ—ra kalbinio turinio", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lu.json new file mode 100644 index 0000000000000000000000000000000000000000..e79b5d76b132804e8b02e31d98dc7869fba93742 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lu.json @@ -0,0 +1,48 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ak": "Liakan", + "am": "Liamhariki", + "ar": "Arabi", + "be": "Belarusi", + "bg": "Bulegari", + "bn": "Bengali", + "cs": "Tsheki", + "de": "Lizelumani", + "el": "Giliki", + "en": "Lingelesa", + "es": "Lihispania", + "fa": "Mpepajemi", + "fr": "Mfwàlànsa", + "ha": "Hausa", + "hi": "Hindi", + "hu": "Hongili", + "id": "Lindonezia", + "ig": "Igbo", + "it": "Litali", + "ja": "Liyapani", + "jv": "Java", + "ko": "Likoreya", + "lu": "Tshiluba", + "ms": "Limalezia", + "ne": "nepali", + "nl": "olandi", + "pa": "Lipunjabi", + "pl": "Mpoloni", + "pt": "MputulugÉ›si", + "ro": "Liromani", + "ru": "Lirisi", + "rw": "kinyarwanda", + "so": "Lisomali", + "sv": "Lisuwidi", + "ta": "Mtamuili", + "th": "Ntailandi", + "tr": "Ntuluki", + "uk": "Nkrani", + "ur": "Urdu", + "vi": "Liviyetinamu", + "yo": "Nyoruba", + "zh": "shinÉ›", + "zu": "Nzulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lv.json new file mode 100644 index 0000000000000000000000000000000000000000..2b164efa5d34bad79feb1d5950fd9e01fee8d14b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/lv.json @@ -0,0 +1,530 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afÄru", + "ab": "abhÄzu", + "ace": "aÄinu", + "ach": "aÄolu", + "ada": "adangmu", + "ady": "adigu", + "ae": "avesta", + "af": "afrikandu", + "afh": "afrihili", + "agq": "aghemu", + "ain": "ainu", + "ak": "akanu", + "akk": "akadieÅ¡u", + "ale": "aleutu", + "alt": "dienvidaltajieÅ¡u", + "am": "amharu", + "an": "aragonieÅ¡u", + "ang": "senangļu", + "anp": "angika", + "ar": "arÄbu", + "ar_001": "mÅ«sdienu standarta arÄbu", + "arc": "aramieÅ¡u", + "arn": "araukÄņu", + "arp": "arapahu", + "arw": "aravaku", + "as": "asamieÅ¡u", + "asa": "asu", + "ast": "astÅ«rieÅ¡u", + "av": "avÄru", + "awa": "avadhu", + "ay": "aimaru", + "az": "azerbaidžÄņu", + "az_Arab": "dienvidazerbaidžÄņu", + "ba": "baÅ¡kÄ«ru", + "bal": "beludžu", + "ban": "balieÅ¡u", + "bas": "basu", + "bax": "bamumu", + "bbj": "gomalu", + "be": "baltkrievu", + "bej": "bedžu", + "bem": "bembu", + "bez": "bena", + "bfd": "bafutu", + "bg": "bulgÄru", + "bgn": "rietumbeludžu", + "bho": "bhodžpÅ«ru", + "bi": "biÅ¡lamÄ", + "bik": "bikolu", + "bin": "binu", + "bkm": "komu", + "bla": "siksiku", + "bm": "bambaru", + "bn": "bengÄļu", + "bo": "tibetieÅ¡u", + "br": "bretoņu", + "bra": "bradžieÅ¡u", + "brx": "bodo", + "bs": "bosnieÅ¡u", + "bss": "nkosi", + "bua": "burjatu", + "bug": "bugu", + "bum": "bulu", + "byn": "bilinu", + "byv": "medumbu", + "ca": "katalÄņu", + "cad": "kadu", + "car": "karÄ«bu", + "cay": "kajuga", + "cch": "atsamu", + "ce": "ÄeÄenu", + "ceb": "sebuÄņu", + "cgg": "kiga", + "ch": "Äamorru", + "chb": "ÄibÄu", + "chg": "džagatajs", + "chk": "ÄÅ«ku", + "chm": "marieÅ¡u", + "chn": "Äinuku žargons", + "cho": "Äoktavu", + "chp": "Äipevaianu", + "chr": "Äiroku", + "chy": "Å¡ejenu", + "ckb": "centrÄlkurdu", + "co": "korsikÄņu", + "cop": "koptu", + "cr": "krÄ«", + "crh": "Krimas tatÄru", + "crs": "kreolu franÄu", + "cs": "Äehu", + "csb": "kaÅ¡ubu", + "cu": "baznÄ«cslÄvu", + "cv": "ÄuvaÅ¡u", + "cy": "velsieÅ¡u", + "da": "dÄņu", + "dak": "dakotu", + "dar": "dargu", + "dav": "taitu", + "de": "vÄcu", + "de_AT": "Austrijas vÄcu", + "de_CH": "Å veices augÅ¡vÄcu", + "del": "delavÄ“ru", + "den": "sleivu", + "dgr": "dogribu", + "din": "dinku", + "dje": "zarmu", + "doi": "dogru", + "dsb": "lejassorbu", + "dua": "dualu", + "dum": "vidusholandieÅ¡u", + "dv": "maldÄ«vieÅ¡u", + "dyo": "diola-fonjÄ«", + "dyu": "diÅ«lu", + "dz": "dzongke", + "dzg": "dazu", + "ebu": "kjembu", + "ee": "evu", + "efi": "efiku", + "egy": "ēģiptieÅ¡u", + "eka": "ekadžuku", + "el": "grieÄ·u", + "elx": "elamieÅ¡u", + "en": "angļu", + "en_AU": "AustrÄlijas angļu", + "en_CA": "KanÄdas angļu", + "en_GB": "LielbritÄnijas angļu", + "en_US": "ASV angļu", + "enm": "vidusangļu", + "eo": "esperanto", + "es": "spÄņu", + "es_419": "Latīņamerikas spÄņu", + "es_ES": "Eiropas spÄņu", + "es_MX": "Meksikas spÄņu", + "et": "igauņu", + "eu": "basku", + "ewo": "evondu", + "fa": "persieÅ¡u", + "fan": "fangu", + "fat": "fantu", + "ff": "fulu", + "fi": "somu", + "fil": "filipÄ«nieÅ¡u", + "fj": "fidžieÅ¡u", + "fo": "fÄ“ru", + "fon": "fonu", + "fr": "franÄu", + "fr_CA": "KanÄdas franÄu", + "fr_CH": "Å veices franÄu", + "frm": "vidusfranÄu", + "fro": "senfranÄu", + "frr": "ziemeļfrÄ«zu", + "frs": "austrumfrÄ«zu", + "fur": "friÅ«lu", + "fy": "rietumfrÄ«zu", + "ga": "Ä«ru", + "gaa": "ga", + "gag": "gagauzu", + "gay": "gajo", + "gba": "gbaju", + "gd": "gÄ“lu", + "gez": "gÄ“zu", + "gil": "kiribatieÅ¡u", + "gl": "galisieÅ¡u", + "gmh": "vidusaugÅ¡vÄcu", + "gn": "gvaranu", + "goh": "senaugÅ¡vÄcu", + "gon": "gondu valodas", + "gor": "gorontalu", + "got": "gotu", + "grb": "grebo", + "grc": "sengrieÄ·u", + "gsw": "Å veices vÄcu", + "gu": "gudžaratu", + "guz": "gusii", + "gv": "menieÅ¡u", + "gwi": "kuÄinu", + "ha": "hausu", + "hai": "haidu", + "haw": "havajieÅ¡u", + "he": "ivrits", + "hi": "hindi", + "hil": "hiligainonu", + "hit": "hetu", + "hmn": "hmongu", + "ho": "hirimotu", + "hr": "horvÄtu", + "hsb": "augÅ¡sorbu", + "ht": "haitieÅ¡u", + "hu": "ungÄru", + "hup": "hupu", + "hy": "armēņu", + "hz": "hereru", + "ia": "interlingva", + "iba": "ibanu", + "ibb": "ibibio", + "id": "indonÄ“zieÅ¡u", + "ie": "interlingve", + "ig": "igbo", + "ii": "SiÄuaņas ji", + "ik": "inupiaku", + "ilo": "iloku", + "inh": "inguÅ¡u", + "io": "ido", + "is": "Ä«slandieÅ¡u", + "it": "itÄļu", + "iu": "inuÄ«tu", + "ja": "japÄņu", + "jbo": "ložbans", + "jgo": "jgo", + "jmc": "maÄamu", + "jpr": "jÅ«dpersieÅ¡u", + "jrb": "jÅ«darÄbu", + "jv": "javieÅ¡u", + "ka": "gruzÄ«nu", + "kaa": "karakalpaku", + "kab": "kabilu", + "kac": "kaÄinu", + "kaj": "kadži", + "kam": "kambu", + "kaw": "kÄvi", + "kbd": "kabardieÅ¡u", + "kbl": "kaņembu", + "kcg": "katabu", + "kde": "makonde", + "kea": "kaboverdieÅ¡u", + "kfo": "koru", + "kg": "kongu", + "kha": "khasu", + "kho": "hotanieÅ¡u", + "khq": "koiraÄiinÄ«", + "ki": "kikuju", + "kj": "kvaņamu", + "kk": "kazahu", + "kkj": "kako", + "kl": "grenlandieÅ¡u", + "kln": "kalendžīnu", + "km": "khmeru", + "kmb": "kimbundu", + "kn": "kannadu", + "ko": "korejieÅ¡u", + "koi": "komieÅ¡u-permieÅ¡u", + "kok": "konkanu", + "kos": "kosrÄjieÅ¡u", + "kpe": "kpellu", + "kr": "kanuru", + "krc": "karaÄaju un balkÄru", + "krl": "karēļu", + "kru": "kuruhu", + "ks": "kaÅ¡mirieÅ¡u", + "ksb": "Å¡ambalu", + "ksf": "bafiju", + "ksh": "Ķelnes vÄcu", + "ku": "kurdu", + "kum": "kumiku", + "kut": "kutenaju", + "kv": "komieÅ¡u", + "kw": "kornieÅ¡u", + "ky": "kirgÄ«zu", + "la": "latīņu", + "lad": "ladino", + "lag": "langi", + "lah": "landu", + "lam": "lambu", + "lb": "luksemburgieÅ¡u", + "lez": "lezgÄ«nu", + "lg": "gandu", + "li": "limburgieÅ¡u", + "lkt": "lakotu", + "ln": "lingala", + "lo": "laosieÅ¡u", + "lol": "mongu", + "loz": "lozu", + "lrc": "ziemeļluru", + "lt": "lietuvieÅ¡u", + "lu": "lubakatanga", + "lua": "lubalulva", + "lui": "luisenu", + "lun": "lundu", + "luo": "luo", + "lus": "luÅ¡eju", + "luy": "luhju", + "lv": "latvieÅ¡u", + "mad": "madurieÅ¡u", + "maf": "mafu", + "mag": "magahieÅ¡u", + "mai": "maithili", + "mak": "makasaru", + "man": "mandingu", + "mas": "masaju", + "mde": "mabu", + "mdf": "mokÅ¡u", + "mdr": "mandaru", + "men": "mendu", + "mer": "meru", + "mfe": "MaurÄ«cijas kreolu", + "mg": "malagasu", + "mga": "vidusÄ«ru", + "mgh": "makua-meetto", + "mgo": "mgo", + "mh": "mÄrÅ¡alieÅ¡u", + "mi": "maoru", + "mic": "mikmaku", + "min": "minangkabavu", + "mk": "maÄ·edonieÅ¡u", + "ml": "malajalu", + "mn": "mongoļu", + "mnc": "mandžūru", + "mni": "manipÅ«ru", + "moh": "mohauku", + "mos": "mosu", + "mr": "maratu", + "ms": "malajieÅ¡u", + "mt": "maltieÅ¡u", + "mua": "mundangu", + "mul": "vairÄkas valodas", + "mus": "krÄ«ku", + "mwl": "mirandieÅ¡u", + "mwr": "marvaru", + "my": "birmieÅ¡u", + "mye": "mjenu", + "myv": "erzju", + "mzn": "mazanderÄņu", + "na": "nauruieÅ¡u", + "nap": "neapolieÅ¡u", + "naq": "nama", + "nb": "norvēģu bukmols", + "nd": "ziemeļndebelu", + "nds": "lejasvÄcu", + "nds_NL": "lejassakÅ¡u", + "ne": "nepÄlieÅ¡u", + "new": "nevaru", + "ng": "ndongu", + "nia": "njasu", + "niu": "niuÄņu", + "nl": "holandieÅ¡u", + "nl_BE": "flÄmu", + "nmg": "kvasio", + "nn": "jaunnorvēģu", + "nnh": "ngjembÅ«nu", + "no": "norvēģu", + "nog": "nogaju", + "non": "sennorvēģu", + "nqo": "nko", + "nr": "dienvidndebelu", + "nso": "ziemeļsotu", + "nus": "nueru", + "nv": "navahu", + "nwc": "klasiskÄ nevaru", + "ny": "ÄiÄeva", + "nym": "ņamvezu", + "nyn": "ņankolu", + "nyo": "ņoru", + "nzi": "nzemu", + "oc": "oksitÄņu", + "oj": "odžibvu", + "om": "oromu", + "or": "oriju", + "os": "osetÄ«nu", + "osa": "važÄžu", + "ota": "turku osmaņu", + "pa": "pandžabu", + "pag": "pangasinanu", + "pal": "pehlevi", + "pam": "pampanganu", + "pap": "papjamento", + "pau": "palavieÅ¡u", + "pcm": "pidžins", + "peo": "senpersu", + "phn": "feniÄ·ieÅ¡u", + "pi": "pÄli", + "pl": "poļu", + "pon": "ponapieÅ¡u", + "prg": "prūšu", + "pro": "senprovansieÅ¡u", + "ps": "puÅ¡tu", + "pt": "portugÄļu", + "pt_BR": "BrazÄ«lijas portugÄļu", + "pt_PT": "Eiropas portugÄļu", + "qu": "keÄvu", + "quc": "kiÄe", + "raj": "radžastÄņu", + "rap": "rapanuju", + "rar": "rarotongieÅ¡u", + "rm": "retoromÄņu", + "rn": "rundu", + "ro": "rumÄņu", + "ro_MD": "moldÄvu", + "rof": "rombo", + "rom": "ÄigÄnu", + "root": "sakne", + "ru": "krievu", + "rup": "aromÅ«nu", + "rw": "kiņaruanda", + "rwk": "ruanda", + "sa": "sanskrits", + "sad": "sandavu", + "sah": "jakutu", + "sam": "SamÄrijas aramieÅ¡u", + "saq": "samburu", + "sas": "sasaku", + "sat": "santalu", + "sba": "ngambeju", + "sbp": "sangu", + "sc": "sardÄ«nieÅ¡u", + "scn": "sicÄ«lieÅ¡u", + "sco": "skotu", + "sd": "sindhu", + "sdh": "dienvidkurdu", + "se": "ziemeļsÄmu", + "see": "seneku", + "seh": "senu", + "sel": "selkupu", + "ses": "koiraboro senni", + "sg": "sango", + "sga": "senÄ«ru", + "sh": "serbu–horvÄtu", + "shi": "Å¡ilhu", + "shn": "Å¡anu", + "shu": "ÄŒadas arÄbu", + "si": "singÄļu", + "sid": "sidamu", + "sk": "slovÄku", + "sl": "slovēņu", + "sm": "samoÄņu", + "sma": "dienvidsÄmu", + "smj": "Luleo sÄmu", + "smn": "Inari sÄmu", + "sms": "skoltsÄmu", + "sn": "Å¡onu", + "snk": "soninku", + "so": "somÄļu", + "sog": "sogdieÅ¡u", + "sq": "albÄņu", + "sr": "serbu", + "srn": "sranantogo", + "srr": "serÄ“ru", + "ss": "svatu", + "ssy": "saho", + "st": "dienvidsotu", + "su": "zundu", + "suk": "sukumu", + "sus": "susu", + "sux": "Å¡umeru", + "sv": "zviedru", + "sw": "svahili", + "sw_CD": "Kongo svahili", + "swb": "komoru", + "syc": "klasiskÄ sÄ«rieÅ¡u", + "syr": "sÄ«rieÅ¡u", + "ta": "tamilu", + "te": "telugu", + "tem": "temnu", + "teo": "teso", + "ter": "tereno", + "tet": "tetumu", + "tg": "tadžiku", + "th": "taju", + "ti": "tigrinja", + "tig": "tigru", + "tiv": "tivu", + "tk": "turkmēņu", + "tkl": "tokelavieÅ¡u", + "tl": "tagalu", + "tlh": "klingoņu", + "tli": "tlinkitu", + "tmh": "tuaregu", + "tn": "cvanu", + "to": "tongieÅ¡u", + "tog": "Njasas tongu", + "tpi": "tokpisins", + "tr": "turku", + "trv": "taroko", + "ts": "congu", + "tsi": "cimÅ¡iÄņu", + "tt": "tatÄru", + "tum": "tumbuku", + "tvl": "tuvalieÅ¡u", + "tw": "tvÄ«", + "twq": "tasavaku", + "ty": "taitieÅ¡u", + "tyv": "tuvieÅ¡u", + "tzm": "CentrÄlmarokas tamazÄ«ts", + "udm": "udmurtu", + "ug": "uiguru", + "uga": "ugaritieÅ¡u", + "uk": "ukraiņu", + "umb": "umbundu", + "und": "nezinÄma valoda", + "ur": "urdu", + "uz": "uzbeku", + "vai": "vaju", + "ve": "vendu", + "vi": "vjetnamieÅ¡u", + "vo": "volapiks", + "vot": "votu", + "vun": "vundžo", + "wa": "valoņu", + "wae": "Vallisas vÄcu", + "wal": "valamu", + "war": "varaju", + "was": "vaÅ¡o", + "wbp": "varlpirÄ«", + "wo": "volofu", + "xal": "kalmiku", + "xh": "khosu", + "xog": "sogu", + "yao": "jao", + "yap": "japieÅ¡u", + "yav": "janbaņu", + "ybb": "jembu", + "yi": "jidiÅ¡s", + "yo": "jorubu", + "yue": "kantonieÅ¡u", + "za": "džuanu", + "zap": "sapoteku", + "zbl": "blissimbolika", + "zen": "zenagu", + "zgh": "standarta marokÄņu berberu", + "zh": "Ä·Ä«nieÅ¡u", + "zh_Hans": "Ä·Ä«nieÅ¡u vienkÄrÅ¡otÄ", + "zh_Hant": "Ä·Ä«nieÅ¡u tradicionÄlÄ", + "zu": "zulu", + "zun": "zunju", + "zxx": "bez lingvistiska satura", + "zza": "zazaki" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/meta.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..3cba1f2dbda60db3377fcf0ec56a9f398539ac1d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/meta.json @@ -0,0 +1,805 @@ +{ + "Version": "2.1.30.58", + "Languages": [ + "aa", + "ab", + "ace", + "ach", + "ada", + "ady", + "ae", + "aeb", + "af", + "afh", + "agq", + "ain", + "ak", + "akk", + "akz", + "ale", + "aln", + "alt", + "am", + "an", + "ang", + "anp", + "ar", + "ar_001", + "arc", + "arn", + "aro", + "arp", + "arq", + "ars", + "arw", + "ary", + "arz", + "as", + "asa", + "ase", + "ast", + "av", + "avk", + "awa", + "ay", + "az", + "az_Arab", + "ba", + "bal", + "ban", + "bar", + "bas", + "bax", + "bbc", + "bbj", + "be", + "bej", + "bem", + "bew", + "bez", + "bfd", + "bfq", + "bg", + "bgn", + "bho", + "bi", + "bik", + "bin", + "bjn", + "bkm", + "bla", + "bm", + "bn", + "bo", + "bpy", + "bqi", + "br", + "bra", + "brh", + "brx", + "bs", + "bss", + "bua", + "bug", + "bum", + "byn", + "byv", + "ca", + "cad", + "car", + "cay", + "cch", + "ce", + "ceb", + "cgg", + "ch", + "chb", + "chg", + "chk", + "chm", + "chn", + "cho", + "chp", + "chr", + "chy", + "ckb", + "co", + "cop", + "cps", + "cr", + "crh", + "crs", + "cs", + "csb", + "cu", + "cv", + "cy", + "da", + "dak", + "dar", + "dav", + "de", + "de_AT", + "de_CH", + "del", + "den", + "dgr", + "din", + "dje", + "doi", + "dsb", + "dtp", + "dua", + "dum", + "dv", + "dyo", + "dyu", + "dz", + "dzg", + "ebu", + "ee", + "efi", + "egl", + "egy", + "eka", + "el", + "elx", + "en", + "en_AU", + "en_CA", + "en_GB", + "en_US", + "enm", + "eo", + "es", + "es_419", + "es_ES", + "es_MX", + "esu", + "et", + "eu", + "ewo", + "ext", + "fa", + "fa_AF", + "fan", + "fat", + "ff", + "fi", + "fil", + "fit", + "fj", + "fo", + "fon", + "fr", + "fr_CA", + "fr_CH", + "frc", + "frm", + "fro", + "frp", + "frr", + "frs", + "fur", + "fy", + "ga", + "gaa", + "gag", + "gan", + "gay", + "gba", + "gbz", + "gd", + "gez", + "gil", + "gl", + "glk", + "gmh", + "gn", + "goh", + "gom", + "gon", + "gor", + "got", + "grb", + "grc", + "gsw", + "gu", + "guc", + "gur", + "guz", + "gv", + "gwi", + "ha", + "hai", + "hak", + "haw", + "he", + "hi", + "hif", + "hil", + "hit", + "hmn", + "ho", + "hr", + "hsb", + "hsn", + "ht", + "hu", + "hup", + "hy", + "hz", + "ia", + "iba", + "ibb", + "id", + "ie", + "ig", + "ii", + "ik", + "ilo", + "inh", + "io", + "is", + "it", + "iu", + "izh", + "ja", + "jam", + "jbo", + "jgo", + "jmc", + "jpr", + "jrb", + "jut", + "jv", + "ka", + "kaa", + "kab", + "kac", + "kaj", + "kam", + "kaw", + "kbd", + "kbl", + "kcg", + "kde", + "kea", + "ken", + "kfo", + "kg", + "kgp", + "kha", + "kho", + "khq", + "khw", + "ki", + "kiu", + "kj", + "kk", + "kkj", + "kl", + "kln", + "km", + "kmb", + "kn", + "ko", + "koi", + "kok", + "kos", + "kpe", + "kr", + "krc", + "kri", + "krj", + "krl", + "kru", + "ks", + "ksb", + "ksf", + "ksh", + "ku", + "kum", + "kut", + "kv", + "kw", + "ky", + "la", + "lad", + "lag", + "lah", + "lam", + "lb", + "lez", + "lfn", + "lg", + "li", + "lij", + "liv", + "lkt", + "lmo", + "ln", + "lo", + "lol", + "loz", + "lrc", + "lt", + "ltg", + "lu", + "lua", + "lui", + "lun", + "luo", + "lus", + "luy", + "lv", + "lzh", + "lzz", + "mad", + "maf", + "mag", + "mai", + "mak", + "man", + "mas", + "mde", + "mdf", + "mdr", + "men", + "mer", + "mfe", + "mg", + "mga", + "mgh", + "mgo", + "mh", + "mi", + "mic", + "min", + "mk", + "ml", + "mn", + "mnc", + "mni", + "moh", + "mos", + "mr", + "mrj", + "ms", + "mt", + "mua", + "mul", + "mus", + "mwl", + "mwr", + "mwv", + "my", + "mye", + "myv", + "mzn", + "na", + "nan", + "nap", + "naq", + "nb", + "nd", + "nds", + "nds_NL", + "ne", + "new", + "ng", + "nia", + "niu", + "njo", + "nl", + "nl_BE", + "nmg", + "nn", + "nnh", + "no", + "nog", + "non", + "nov", + "nqo", + "nr", + "nso", + "nus", + "nv", + "nwc", + "ny", + "nym", + "nyn", + "nyo", + "nzi", + "oc", + "oj", + "om", + "or", + "os", + "osa", + "ota", + "pa", + "pag", + "pal", + "pam", + "pap", + "pau", + "pcd", + "pcm", + "pdc", + "pdt", + "peo", + "pfl", + "phn", + "pi", + "pl", + "pms", + "pnt", + "pon", + "prg", + "pro", + "ps", + "pt", + "pt_BR", + "pt_PT", + "qu", + "quc", + "qug", + "raj", + "rap", + "rar", + "rgn", + "rif", + "rm", + "rn", + "ro", + "ro_MD", + "rof", + "rom", + "root", + "rtm", + "ru", + "rue", + "rug", + "rup", + "rw", + "rwk", + "sa", + "sad", + "sah", + "sam", + "saq", + "sas", + "sat", + "saz", + "sba", + "sbp", + "sc", + "scn", + "sco", + "sd", + "sdc", + "sdh", + "se", + "see", + "seh", + "sei", + "sel", + "ses", + "sg", + "sga", + "sgs", + "sh", + "shi", + "shn", + "shu", + "si", + "sid", + "sk", + "sl", + "sli", + "sly", + "sm", + "sma", + "smj", + "smn", + "sms", + "sn", + "snk", + "so", + "sog", + "sq", + "sr", + "srn", + "srr", + "ss", + "ssy", + "st", + "stq", + "su", + "suk", + "sus", + "sux", + "sv", + "sw", + "sw_CD", + "swb", + "syc", + "syr", + "szl", + "ta", + "tcy", + "te", + "tem", + "teo", + "ter", + "tet", + "tg", + "th", + "ti", + "tig", + "tiv", + "tk", + "tkl", + "tkr", + "tl", + "tlh", + "tli", + "tly", + "tmh", + "tn", + "to", + "tog", + "tpi", + "tr", + "tru", + "trv", + "ts", + "tsd", + "tsi", + "tt", + "ttt", + "tum", + "tvl", + "tw", + "twq", + "ty", + "tyv", + "tzm", + "udm", + "ug", + "uga", + "uk", + "umb", + "und", + "ur", + "uz", + "vai", + "ve", + "vec", + "vep", + "vi", + "vls", + "vmf", + "vo", + "vot", + "vro", + "vun", + "wa", + "wae", + "wal", + "war", + "was", + "wbp", + "wo", + "wuu", + "xal", + "xh", + "xmf", + "xog", + "yao", + "yap", + "yav", + "ybb", + "yi", + "yo", + "yrl", + "yue", + "za", + "zap", + "zbl", + "zea", + "zen", + "zgh", + "zh", + "zh_Hans", + "zh_Hant", + "zu", + "zun", + "zxx", + "zza" + ], + "Aliases": null, + "Alpha2ToAlpha3": { + "aa": "aar", + "ab": "abk", + "af": "afr", + "ak": "aka", + "sq": "sqi", + "am": "amh", + "ar": "ara", + "an": "arg", + "hy": "hye", + "as": "asm", + "av": "ava", + "ae": "ave", + "ay": "aym", + "az": "aze", + "ba": "bak", + "bm": "bam", + "eu": "eus", + "be": "bel", + "bn": "ben", + "bi": "bis", + "bo": "bod", + "bs": "bos", + "br": "bre", + "bg": "bul", + "my": "mya", + "ca": "cat", + "cs": "ces", + "ch": "cha", + "ce": "che", + "zh": "zho", + "cu": "chu", + "cv": "chv", + "kw": "cor", + "co": "cos", + "cr": "cre", + "cy": "cym", + "da": "dan", + "de": "deu", + "dv": "div", + "nl": "nld", + "dz": "dzo", + "et": "est", + "el": "ell", + "en": "eng", + "eo": "epo", + "ik": "ipk", + "ee": "ewe", + "fo": "fao", + "fa": "fas", + "fj": "fij", + "fi": "fin", + "fr": "fra", + "fy": "fry", + "ff": "ful", + "om": "orm", + "ka": "kat", + "gd": "gla", + "ga": "gle", + "gl": "glg", + "gv": "glv", + "gn": "grn", + "gu": "guj", + "ht": "hat", + "ha": "hau", + "he": "heb", + "hz": "her", + "hi": "hin", + "ho": "hmo", + "hr": "hrv", + "hu": "hun", + "ig": "ibo", + "is": "isl", + "io": "ido", + "ii": "iii", + "iu": "iku", + "ie": "ile", + "ia": "ina", + "id": "ind", + "it": "ita", + "jv": "jav", + "ja": "jpn", + "kl": "kal", + "kn": "kan", + "ks": "kas", + "kr": "kau", + "kk": "kaz", + "mn": "mon", + "km": "khm", + "ki": "kik", + "rw": "kin", + "ky": "kir", + "ku": "kur", + "kg": "kon", + "kv": "kom", + "ko": "kor", + "kj": "kua", + "lo": "lao", + "la": "lat", + "lv": "lav", + "li": "lim", + "ln": "lin", + "lt": "lit", + "lb": "ltz", + "lu": "lub", + "lg": "lug", + "mk": "mkd", + "mh": "mah", + "ml": "mal", + "mi": "mri", + "mr": "mar", + "ms": "msa", + "mg": "mlg", + "mt": "mlt", + "na": "nau", + "nv": "nav", + "nr": "nbl", + "nd": "nde", + "ng": "ndo", + "ne": "nep", + "nn": "nno", + "nb": "nob", + "ny": "nya", + "oc": "oci", + "oj": "oji", + "or": "ori", + "os": "oss", + "pa": "pan", + "ps": "pus", + "pi": "pli", + "pl": "pol", + "pt": "por", + "qu": "que", + "rm": "roh", + "ro": "ron", + "rn": "run", + "ru": "rus", + "sg": "sag", + "sa": "san", + "sr": "srp", + "si": "sin", + "sk": "slk", + "sl": "slv", + "se": "sme", + "sm": "smo", + "sn": "sna", + "sd": "snd", + "so": "som", + "st": "sot", + "es": "spa", + "sc": "srd", + "ss": "ssw", + "su": "sun", + "sw": "swa", + "sv": "swe", + "ty": "tah", + "ta": "tam", + "tt": "tat", + "te": "tel", + "tg": "tgk", + "th": "tha", + "ti": "tir", + "to": "ton", + "tn": "tsn", + "ts": "tso", + "tk": "tuk", + "tr": "tur", + "ug": "uig", + "uk": "ukr", + "ur": "urd", + "uz": "uzb", + "ve": "ven", + "vi": "vie", + "vo": "vol", + "wa": "wln", + "wo": "wol", + "xh": "xho", + "yi": "yid", + "yo": "yor", + "za": "zha", + "zu": "zul" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mg.json new file mode 100644 index 0000000000000000000000000000000000000000..0b7544c733a530d10d838f03bcf691ba261a8833 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mg.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ak": "Akan", + "am": "Amharika", + "ar": "Arabo", + "be": "Bielorosy", + "bg": "Biolgara", + "bn": "Bengali", + "cs": "Tseky", + "de": "Alemanina", + "el": "Grika", + "en": "Anglisy", + "es": "Espaniola", + "fa": "Persa", + "fr": "Frantsay", + "ha": "haoussa", + "hi": "hindi", + "hu": "hongroà", + "id": "Indonezianina", + "ig": "igbo", + "it": "Italianina", + "ja": "Japoney", + "jv": "Javaney", + "km": "khmer", + "ko": "Koreanina", + "mg": "Malagasy", + "ms": "Malay", + "my": "Birmana", + "ne": "Nepale", + "nl": "Holandey", + "pa": "Penjabi", + "pl": "Poloney", + "pt": "Portiogey", + "ro": "Romanianina", + "ru": "Rosianina", + "rw": "Roande", + "so": "Somalianina", + "sv": "Soisa", + "ta": "Tamoila", + "th": "Taioaney", + "tr": "Tiorka", + "uk": "Okrainianina", + "ur": "Ordò", + "vi": "Vietnamianina", + "yo": "Yôrobà", + "zh": "Sinoa, Mandarin", + "zu": "Zolò" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mk.json new file mode 100644 index 0000000000000000000000000000000000000000..09907f9fc8acef73b4303206100bbdb4c232b7d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mk.json @@ -0,0 +1,612 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "афарÑки", + "ab": "апхаÑки", + "ace": "ачешки", + "ach": "аколи", + "ada": "адангме", + "ady": "адигејÑки", + "ae": "авеÑтанÑки", + "aeb": "туниÑки арапÑки", + "af": "африканÑ", + "afh": "африхили", + "agq": "агемÑки", + "ain": "ајну", + "ak": "аканÑки", + "akk": "акадÑки", + "akz": "алабамÑки", + "ale": "алеутÑки", + "aln": "гешки албанÑки", + "alt": "јужноалтајÑки", + "am": "амхарÑки", + "an": "арагонÑки", + "ang": "ÑтароанглиÑки", + "anp": "ангика", + "ar": "арапÑки", + "ar_001": "литературен арапÑки", + "arc": "арамејÑки", + "arn": "мапучки", + "aro": "араона", + "arp": "арапахо", + "arq": "алжирÑки арапÑки", + "arw": "аравачки", + "ary": "мароканÑки арапÑки", + "arz": "египетÑки арапÑки", + "as": "аÑамÑки", + "asa": "аÑу", + "ase": "американÑки знаковен јазик", + "ast": "аÑтурÑки", + "av": "аварÑки", + "avk": "котава", + "awa": "авади", + "ay": "ајмарÑки", + "az": "азербејџанÑки", + "ba": "башкирÑки", + "bal": "белуџиÑки", + "ban": "балиÑки", + "bar": "баварÑки", + "bas": "баÑа", + "bax": "бамунÑки", + "bbc": "тоба", + "bbj": "гомала", + "be": "белоруÑки", + "bej": "беџа", + "bem": "бемба", + "bew": "бетавÑки", + "bez": "бена", + "bfd": "бафут", + "bfq": "бадага", + "bg": "бугарÑки", + "bgn": "западен балочи", + "bho": "боџпури", + "bi": "биÑлама", + "bik": "биколÑки", + "bin": "бини", + "bjn": "банџарÑки", + "bkm": "ком", + "bla": "ÑикÑика", + "bm": "бамбара", + "bn": "бенгалÑки", + "bo": "тибетÑки", + "bpy": "бишнуприја", + "bqi": "бахтијарÑки", + "br": "бретонÑки", + "bra": "брај", + "brh": "брахујÑки", + "brx": "бодо", + "bs": "боÑанÑки", + "bss": "акоÑе", + "bua": "бурјатÑки", + "bug": "бугиÑки", + "bum": "булу", + "byn": "биленÑки", + "byv": "медумба", + "ca": "каталонÑки", + "cad": "кадо", + "car": "карипÑки", + "cay": "кајуга", + "cch": "ацам", + "ce": "чеченÑки", + "ceb": "ÑебуанÑки", + "cgg": "чига", + "ch": "чаморÑки", + "chb": "чибча", + "chg": "чагатајÑки", + "chk": "чучки", + "chm": "мариÑки", + "chn": "чинучки жаргон", + "cho": "чоктавÑки", + "chp": "чипевјанÑки", + "chr": "черокиÑки", + "chy": "чејенÑки", + "ckb": "централнокурдÑки", + "co": "корзиканÑки", + "cop": "коптÑки", + "cps": "капизнон", + "cr": "кри", + "crh": "кримÑкотурÑки", + "crs": "француÑки (СеÑелва креоли)", + "cs": "чешки", + "csb": "кашупÑки", + "cu": "црковноÑловенÑки", + "cv": "чувашки", + "cy": "велшки", + "da": "данÑки", + "dak": "дакота", + "dar": "даргва", + "dav": "таита", + "de": "германÑки", + "del": "делавер", + "den": "Ñлејви", + "dgr": "догрипÑки", + "din": "динка", + "dje": "зарма", + "doi": "догри", + "dsb": "долнолужички", + "dtp": "дуÑунÑки", + "dua": "дуала", + "dum": "ÑреднохоландÑки", + "dv": "дивехи", + "dyo": "јола-фоњи", + "dyu": "џула", + "dz": "ѕонгка", + "dzg": "дазага", + "ebu": "ембу", + "ee": "еве", + "efi": "ефик", + "egl": "емилијанÑки", + "egy": "ÑтароегипетÑки", + "eka": "екаџук", + "el": "грчки", + "elx": "еламÑки", + "en": "англиÑки", + "en_AU": "авÑтралиÑки англиÑки", + "en_CA": "канадÑки англиÑки", + "en_GB": "британÑки англиÑки", + "en_US": "американÑки англиÑки", + "enm": "ÑредноанглиÑки", + "eo": "еÑперанто", + "es": "шпанÑки", + "es_ES": "шпанÑки (во Европа)", + "esu": "централнојупички", + "et": "еÑтонÑки", + "eu": "баÑкиÑки", + "ewo": "евондо", + "ext": "екÑтремадурÑки", + "fa": "перÑиÑки", + "fan": "фанг", + "fat": "фанти", + "ff": "фула", + "fi": "финÑки", + "fil": "филипинÑки", + "fit": "турнедаленÑки финÑки", + "fj": "фиџиÑки", + "fo": "фарÑки", + "fon": "фон", + "fr": "француÑки", + "fr_CA": "канадÑки француÑки", + "fr_CH": "швајцарÑки француÑки", + "frc": "каџунÑки француÑки", + "frm": "ÑреднофранцуÑки", + "fro": "ÑтарофранцуÑки", + "frp": "франкопрованÑалÑки", + "frr": "ÑевернофризиÑки", + "frs": "иÑточнофризиÑки", + "fur": "фурланÑки", + "fy": "западнофризиÑки", + "ga": "ирÑки", + "gaa": "га", + "gag": "гагауÑки", + "gan": "ган", + "gay": "гајо", + "gba": "гбаја", + "gbz": "зороаÑтриÑки дари", + "gd": "шкотÑки гелÑки", + "gez": "гиз", + "gil": "гилбертанÑки", + "gl": "галициÑки", + "glk": "гиланÑки", + "gmh": "ÑредногорногерманÑки", + "gn": "гваранÑки", + "goh": "ÑтарогорногерманÑки", + "gom": "гоанÑки конкани", + "gon": "гонди", + "gor": "горонтало", + "got": "готÑки", + "grb": "гребо", + "grc": "Ñтарогрчки", + "gsw": "швајцарÑки германÑки", + "gu": "гуџарати", + "guc": "гвахиро", + "gur": "фарефаре", + "guz": "гуÑи", + "gv": "манкÑ", + "gwi": "гвичинÑки", + "ha": "хауÑа", + "hai": "хајда", + "hak": "хака", + "haw": "хавајÑки", + "he": "хебрејÑки", + "hi": "хинди", + "hif": "фиџиÑки хинди", + "hil": "хилигајнонÑки", + "hit": "хетитÑки", + "hmn": "хмонг", + "ho": "хири моту", + "hr": "хрватÑки", + "hsb": "горнолужички", + "hsn": "Ñјанг", + "ht": "хаитÑки", + "hu": "унгарÑки", + "hup": "хупа", + "hy": "ерменÑки", + "hz": "хереро", + "ia": "интерлингва", + "iba": "ибан", + "ibb": "ибибио", + "id": "индонезиÑки", + "ie": "окцидентал", + "ig": "игбо", + "ii": "Ñичуан ји", + "ik": "инупијачки", + "ilo": "илоканÑки", + "inh": "ингушки", + "io": "идо", + "is": "иÑландÑки", + "it": "италијанÑки", + "iu": "инуктитут", + "izh": "ижорÑки", + "ja": "јапонÑки", + "jam": "јамајÑки креолÑки", + "jbo": "ложбан", + "jgo": "нгомба", + "jmc": "мачаме", + "jpr": "еврејÑкоперÑиÑки", + "jrb": "еврејÑкоарапÑки", + "jut": "јитÑки", + "jv": "јаванÑки", + "ka": "грузиÑки", + "kaa": "каракалпачки", + "kab": "кабилÑки", + "kac": "качинÑки", + "kaj": "каџе", + "kam": "камба", + "kaw": "кави", + "kbd": "кабардинÑки", + "kbl": "канембу", + "kcg": "тјап", + "kde": "маконде", + "kea": "кабувердиану", + "ken": "кењанг", + "kfo": "коро", + "kg": "конго", + "kgp": "каинганшки", + "kha": "каÑи", + "kho": "хотанÑки", + "khq": "којра чиини", + "khw": "коварÑки", + "ki": "кикују", + "kiu": "зазаки", + "kj": "квањама", + "kk": "казашки", + "kkj": "како", + "kl": "калалиÑут", + "kln": "каленџин", + "km": "кмерÑки", + "kmb": "кимбунду", + "kn": "каннада", + "ko": "корејÑки", + "koi": "коми-пермјачки", + "kok": "конкани", + "kos": "козрејÑки", + "kpe": "кпеле", + "kr": "канури", + "krc": "карачаевÑко-балкарÑки", + "kri": "крио", + "krj": "кинарајÑки", + "krl": "карелÑки", + "kru": "курух", + "ks": "кашмирÑки", + "ksb": "шамбала", + "ksf": "бафија", + "ksh": "колоњÑки", + "ku": "курдÑки", + "kum": "кумички", + "kut": "кутенајÑки", + "kv": "коми", + "kw": "корнÑки", + "ky": "киргиÑки", + "la": "латинÑки", + "lad": "ладино", + "lag": "ланги", + "lah": "ланда", + "lam": "ламба", + "lb": "лукÑембуршки", + "lez": "лезгинÑки", + "lfn": "лингва франка нова", + "lg": "ганда", + "li": "лимбуршки", + "lij": "лигурÑки", + "liv": "ливонÑки", + "lkt": "лакотÑки", + "lmo": "ломбардиÑки", + "ln": "лингала", + "lo": "лаошки", + "lol": "монго", + "loz": "лози", + "lrc": "ÑевернолуриÑки", + "lt": "литванÑки", + "ltg": "латгалÑки", + "lu": "луба-катанга", + "lua": "луба-лулуа", + "lui": "лујÑењÑки", + "lun": "лунда", + "luo": "луо", + "lus": "мизо", + "luy": "луја", + "lv": "латвиÑки", + "lzh": "книжевен кинеÑки", + "lzz": "лаÑки", + "mad": "мадурÑки", + "maf": "мафа", + "mag": "магахи", + "mai": "маитили", + "mak": "макаÑарÑки", + "man": "мандинго", + "mas": "маÑајÑки", + "mde": "маба", + "mdf": "мокшанÑки", + "mdr": "мандарÑки", + "men": "менде", + "mer": "меру", + "mfe": "мориÑјен", + "mg": "малгашки", + "mga": "ÑредноирÑки", + "mgh": "макува-мито", + "mgo": "мета", + "mh": "маршалÑки", + "mi": "маорÑки", + "mic": "микмак", + "min": "минангкабау", + "mk": "македонÑки", + "ml": "малајамÑки", + "mn": "монголÑки", + "mnc": "манџурÑки", + "mni": "манипурÑки", + "moh": "мохавÑки", + "mos": "моÑи", + "mr": "марати", + "mrj": "западномариÑки", + "ms": "малајÑки", + "mt": "малтешки", + "mua": "мунданг", + "mul": "повеќе јазици", + "mus": "крик", + "mwl": "мирандÑки", + "mwr": "марвари", + "my": "бурманÑки", + "mye": "мјене", + "myv": "ерзјанÑки", + "mzn": "мазендеранÑки", + "na": "науруанÑки", + "nan": "јужноминÑки", + "nap": "неаполÑки", + "naq": "нама", + "nb": "норвешки букмол", + "nd": "Ñеверен ндебеле", + "nds": "долногерманÑки", + "ne": "непалÑки", + "new": "неварÑки", + "ng": "ндонга", + "nia": "нијаÑ", + "niu": "ниујеÑки", + "njo": "ао нага", + "nl": "холандÑки", + "nl_BE": "фламанÑки", + "nmg": "квазио", + "nn": "норвешки нинорÑк", + "nnh": "нгиембун", + "no": "норвешки", + "nog": "ногајÑки", + "non": "ÑтаронордиÑки", + "nov": "новијал", + "nqo": "нко", + "nr": "јужен ндебеле", + "nso": "ÑеверноÑотÑки", + "nus": "нуер", + "nv": "навахо", + "nwc": "клаÑичен неварÑки", + "ny": "њанџа", + "nym": "њамвези", + "nyn": "њанколе", + "nyo": "њоро", + "nzi": "нзима", + "oc": "окÑитанÑки", + "oj": "оџибва", + "om": "оромо", + "or": "одија", + "os": "оÑетÑки", + "osa": "оÑашки", + "ota": "отоманÑки турÑки", + "pa": "пенџапÑки", + "pag": "пангаÑинанÑки", + "pal": "ÑредноперÑиÑки", + "pam": "пампанга", + "pap": "папијаменто", + "pau": "палауанÑки", + "pcd": "пикардÑки", + "pcm": "нигериÑки пиџин", + "pdc": "пенÑилваниÑки германÑки", + "pdt": "менонитÑки долногерманÑки", + "peo": "ÑтароперÑиÑки", + "pfl": "фалечкогерманÑки", + "phn": "феникиÑки", + "pi": "пали", + "pl": "полÑки", + "pms": "пиемонтÑки", + "pnt": "понтÑки", + "pon": "понпејÑки", + "prg": "пруÑки", + "pro": "ÑтаропрованÑалÑки", + "ps": "паштунÑки", + "pt": "португалÑки", + "pt_PT": "португалÑки (во Европа)", + "qu": "кечуанÑки", + "quc": "киче", + "qug": "кичванÑки", + "raj": "раџаÑтанÑки", + "rap": "рапанујÑки", + "rar": "раротонганÑки", + "rgn": "ромањолÑки", + "rif": "рифÑки", + "rm": "ретороманÑки", + "rn": "рунди", + "ro": "романÑки", + "ro_MD": "молдавÑки", + "rof": "ромбо", + "rom": "ромÑки", + "root": "корен", + "rtm": "ротуманÑки", + "ru": "руÑки", + "rue": "руÑинÑки", + "rug": "ровијанÑки", + "rup": "влашки", + "rw": "руандÑки", + "rwk": "руа", + "sa": "ÑанÑкрит", + "sad": "Ñандаве", + "sah": "јакутÑки", + "sam": "ÑамарјанÑки арамејÑки", + "saq": "Ñамбуру", + "sas": "ÑаÑачки", + "sat": "Ñантали", + "saz": "Ñаураштра", + "sba": "нгембеј", + "sbp": "Ñангу", + "sc": "ÑардинÑки", + "scn": "ÑицилијанÑки", + "sco": "шкотÑки германÑки", + "sd": "Ñинди", + "sdc": "ÑаÑарÑки ÑардинÑки", + "sdh": "јужнокурдÑки", + "se": "Ñеверен Ñами", + "see": "Ñенека", + "seh": "Ñена", + "sei": "Ñери", + "sel": "ÑелкупÑки", + "ses": "којраборо Ñени", + "sg": "Ñанго", + "sga": "ÑтароирÑки", + "sgs": "ÑамогитÑки", + "sh": "ÑрпÑкохрватÑки", + "shi": "тачелхит", + "shn": "шан", + "shu": "чадÑки арапÑки", + "si": "ÑинхалÑки", + "sid": "Ñидамо", + "sk": "Ñловачки", + "sl": "Ñловенечки", + "sli": "долношлезиÑки", + "sly": "ÑелајарÑки", + "sm": "ÑамоанÑки", + "sma": "јужен Ñами", + "smj": "луле Ñами", + "smn": "инари Ñами", + "sms": "Ñколт Ñами", + "sn": "шона", + "snk": "Ñонинке", + "so": "ÑомалиÑки", + "sog": "зогдијанÑки", + "sq": "албанÑки", + "sr": "ÑрпÑки", + "srn": "ÑранÑки тонго", + "srr": "Ñерер", + "ss": "Ñвати", + "ssy": "Ñахо", + "st": "ÑеÑото", + "stq": "затерландÑки фризиÑки", + "su": "ÑундÑки", + "suk": "Ñукума", + "sus": "ÑуÑу", + "sux": "ÑумерÑки", + "sv": "шведÑки", + "sw": "Ñвахили", + "sw_CD": "конгоанÑки Ñвахили", + "swb": "коморијанÑки", + "syc": "клаÑичен ÑириÑки", + "syr": "ÑириÑки", + "szl": "шлезиÑки", + "ta": "тамилÑки", + "tcy": "тулу", + "te": "телугу", + "tem": "тимне", + "teo": "теÑо", + "ter": "терено", + "tet": "тетум", + "tg": "таџикиÑтанÑки", + "th": "тајландÑки", + "ti": "тигриња", + "tig": "тигре", + "tiv": "тив", + "tk": "туркменÑки", + "tkl": "токелауанÑки", + "tkr": "цахурÑки", + "tl": "тагалог", + "tlh": "клингонÑки", + "tli": "тлингит", + "tly": "талишки", + "tmh": "тамашек", + "tn": "цвана", + "to": "тонгајÑки", + "tog": "њаÑа тонга", + "tpi": "ток пиÑин", + "tr": "турÑки", + "tru": "туројо", + "trv": "тароко", + "ts": "цонга", + "tsd": "цаконÑки", + "tsi": "цимшијанÑки", + "tt": "татарÑки", + "ttt": "татÑки", + "tum": "тумбука", + "tvl": "тувалуанÑки", + "tw": "тви", + "twq": "тазавак", + "ty": "тахитÑки", + "tyv": "туванÑки", + "tzm": "централноатланÑки тамазитÑки", + "udm": "удмуртÑки", + "ug": "ујгурÑки", + "uga": "угаритÑки", + "uk": "украинÑки", + "umb": "умбунду", + "und": "непознат јазик", + "ur": "урду", + "uz": "узбечки", + "vai": "вај", + "ve": "венда", + "vec": "венетÑки", + "vep": "вепшки", + "vi": "виетнамÑки", + "vls": "западнофламанÑки", + "vmf": "мајнÑкофранконÑки", + "vo": "волапик", + "vot": "вотÑки", + "vro": "виру", + "vun": "вунџо", + "wa": "валонÑки", + "wae": "валÑер", + "wal": "воламо", + "war": "варајÑки", + "was": "вашо", + "wbp": "варлпири", + "wo": "волофÑки", + "wuu": "ву", + "xal": "калмички", + "xh": "коÑа", + "xmf": "мегрелÑки", + "xog": "Ñога", + "yao": "јао", + "yap": "јапÑки", + "yav": "јенгбен", + "ybb": "јемба", + "yi": "јидиш", + "yo": "јорупÑки", + "yrl": "њенгату", + "yue": "кантонÑки", + "za": "џуаншки", + "zap": "запотечки", + "zbl": "блиÑÑимболи", + "zea": "зеландÑки", + "zen": "зенага", + "zgh": "Ñтандарден мароканÑки тамазитÑки", + "zh": "кинеÑки", + "zh_Hans": "поедноÑтавен кинеÑки", + "zh_Hant": "традиционален кинеÑки", + "zu": "зулу", + "zun": "зуни", + "zxx": "без лингвиÑтичка Ñодржина", + "zza": "заза" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ml.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ml.json new file mode 100644 index 0000000000000000000000000000000000000000..4ee9b6b7f4b3839024418ace22fd8ec8ba17c377 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ml.json @@ -0,0 +1,534 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "അഫാർ", + "ab": "à´…à´¬àµâ€Œà´–ാസിയൻ", + "ace": "അചിനീസàµ", + "ach": "അകോലി", + "ada": "അഡാങàµâ€Œà´®à´¿", + "ady": "അഡൈഗേ", + "ae": "അവസàµà´±àµà´±à´¾àµ»", + "af": "ആഫàµà´°à´¿à´•àµà´•ാൻസàµ", + "afh": "ആഫàµà´°à´¿à´¹à´¿à´²à´¿", + "agq": "ആഘേം", + "ain": "à´à´¨àµ", + "ak": "അകാൻ‌", + "akk": "à´…à´•àµà´•ാഡിയൻ", + "ale": "അലൂടàµà´Ÿàµ", + "alt": "തെകàµà´•ൻ അൾതàµà´¤à´¾à´¯à´¿", + "am": "അംഹാരികàµ", + "an": "അരഗോണീസàµ", + "ang": "പഴയ ഇംഗàµà´²àµ€à´·àµ", + "anp": "ആൻഗിക", + "ar": "അറബികàµ", + "ar_001": "ആധàµà´¨à´¿à´• à´¸àµà´±àµà´±à´¾àµ»à´¡àµ‡àµ¼à´¡àµ അറബികàµ", + "arc": "അരമായ", + "arn": "മാപàµà´šà´¿", + "arp": "അറാപഹോ", + "arw": "അറാവകàµ", + "as": "ആസàµà´¸à´¾à´®àµ€à´¸àµ", + "asa": "ആസàµ", + "ast": "à´“à´¸àµâ€Œà´Ÿàµà´°à´¿à´¯àµ»", + "av": "അവാരികàµ", + "awa": "അവാധി", + "ay": "à´…à´¯àµà´®à´¾à´±", + "az": "അസർബൈജാനി", + "ba": "ബഷàµà´–ിർ", + "bal": "ബലൂചി", + "ban": "ബാലിനീസàµ", + "bas": "ബസ", + "bax": "ബാമàµàµ»", + "bbj": "ഘോമാല", + "be": "ബെലാറàµà´·àµà´¯àµ»", + "bej": "ബേജ", + "bem": "ബേംബ", + "bez": "ബെനാ", + "bfd": "ബാഫടàµà´Ÿàµ", + "bg": "ബൾഗേറിയൻ", + "bgn": "പശàµà´šà´¿à´® ബലൂചി", + "bho": "ഭോജàµâ€Œà´ªàµà´°à´¿", + "bi": "ബിസàµâ€Œà´²à´¾à´®", + "bik": "ബികോൽ", + "bin": "ബിനി", + "bkm": "കോം", + "bla": "സികàµà´¸à´¿à´•", + "bm": "ബംബാറ", + "bn": "ബംഗാളി", + "bo": "ടിബറàµà´±àµ»", + "br": "à´¬àµà´°àµ†à´Ÿàµà´Ÿàµº", + "bra": "à´¬àµà´°à´œàµ", + "brx": "ബോഡോ", + "bs": "ബോസàµà´¨à´¿à´¯àµ»", + "bss": "à´…à´•àµà´•ൂസàµ", + "bua": "à´¬àµà´±à´¿à´¯à´¤àµà´¤àµ", + "bug": "à´¬àµà´—ിനീസàµ", + "bum": "à´¬àµà´³àµ", + "byn": "à´¬àµà´²à´¿àµ»", + "byv": "മെഡàµà´‚à´¬", + "ca": "à´•à´±àµà´±à´¾à´²à´¾àµ»", + "cad": "കാഡോ", + "car": "കാരിബàµ", + "cay": "കയൂഗ", + "cch": "à´…à´±àµà´±àµà´¸à´¾à´‚", + "ce": "ചെചൻ", + "ceb": "സെബàµà´µà´¾à´¨àµ‹", + "cgg": "à´šà´¿à´—", + "ch": "ചമോറോ", + "chb": "à´šà´¿à´¬àµà´š", + "chg": "ഷാഗതായàµ", + "chk": "ചൂകീസàµ", + "chm": "മാരി", + "chn": "ചിനൂഗൠജാർഗൺ", + "cho": "ചോകàµà´±àµà´±à´¾à´µàµ", + "chp": "ചിപേവàµà´¯àµ»", + "chr": "ഷെരോകàµà´•à´¿", + "chy": "ഷായാൻ", + "ckb": "സൊറാനി à´•àµàµ¼à´¦à´¿à´·àµ", + "co": "കോർസികàµà´•ൻ", + "cop": "കോപàµà´±àµà´±à´¿à´•àµ", + "cr": "à´•àµà´°àµ€", + "crh": "à´•àµà´°à´¿à´®à´¿à´¯àµ» ടർകàµà´•à´¿à´·àµ", + "crs": "സെഷൽവ à´•àµà´°à´¿à´¯àµ‹àµ¾ à´«àµà´°à´žàµà´šàµ", + "cs": "ചെകàµà´•àµ", + "csb": "കാഷàµà´¬à´¿à´¯à´¾àµ»", + "cu": "ചർചàµà´šàµ à´¸àµà´²à´¾à´µà´¿à´•àµ", + "cv": "à´šàµà´µà´¾à´·àµ", + "cy": "വെൽഷàµ", + "da": "ഡാനിഷàµ", + "dak": "ഡകോടàµà´Ÿ", + "dar": "ഡർഗàµà´µà´¾", + "dav": "തൈത", + "de": "ജർമàµà´®àµ»", + "de_AT": "à´“à´¸àµâ€Œà´Ÿàµà´°à´¿à´¯àµ» ജർമൻ", + "de_CH": "à´¸àµà´µà´¿à´¸àµ ഹൈ ജർമൻ", + "del": "ദെലവേർ", + "den": "à´¸àµà´²àµ‡à´µàµ", + "dgr": "ഡോഗàµà´°à´¿à´¬àµ", + "din": "ദിൻക", + "dje": "സാർമàµà´®", + "doi": "ഡോഗàµà´°à´¿", + "dsb": "ലോവർ സോർബിയൻ", + "dua": "à´¦àµà´µà´¾à´²", + "dum": "മദàµà´§àµà´¯ à´¡à´šàµà´šàµ", + "dv": "ദിവെഹി", + "dyo": "യോല-ഫോനàµà´¯à´¿", + "dyu": "à´¦àµà´µàµˆà´²", + "dz": "സോങàµà´•", + "dzg": "ഡാസാഗ", + "ebu": "à´Žà´‚à´¬àµ", + "ee": "യൂവàµ", + "efi": "à´Žà´«à´¿à´•àµ", + "egy": "à´ªàµà´°à´¾à´šàµ€à´¨ ഈജിപàµà´·àµà´¯àµ»", + "eka": "എകാജàµà´•àµ", + "el": "à´—àµà´°àµ€à´•àµà´•àµ", + "elx": "എലാമൈറàµà´±àµ", + "en": "ഇംഗàµà´²àµ€à´·àµ", + "en_AU": "à´“à´¸àµâ€Œà´Ÿàµà´°àµ‡à´²à´¿à´¯àµ» ഇംഗàµà´²àµ€à´·àµ", + "en_CA": "കനേഡിയൻ ഇംഗàµà´²àµ€à´·àµ", + "en_GB": "à´¬àµà´°à´¿à´Ÿàµà´Ÿàµ€à´·àµ ഇംഗàµà´²àµ€à´·àµ", + "en_US": "അമേരികàµà´•ൻ ഇംഗàµà´²àµ€à´·àµ", + "enm": "മദàµà´§àµà´¯ ഇംഗàµà´²àµ€à´·àµ", + "eo": "à´Žà´¸àµâ€Œà´ªà´°à´¾à´¨àµà´±àµ‹", + "es": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ", + "es_419": "ലാറàµà´±à´¿àµ» അമേരികàµà´•ൻ à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ", + "es_ES": "യൂറോപàµà´¯àµ» à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ", + "es_MX": "മെകàµà´¸à´¿à´•àµà´•ൻ à´¸àµà´ªà´¾à´¨à´¿à´·àµ", + "et": "à´Žà´¸àµà´±àµà´±àµ‹à´£à´¿à´¯àµ»", + "eu": "ബാസàµâ€Œà´•àµ", + "ewo": "എവോൻഡോ", + "fa": "പേർഷàµà´¯àµ»", + "fan": "à´«à´™àµ", + "fat": "ഫാനàµà´±à´¿", + "ff": "à´«àµà´²", + "fi": "à´«à´¿à´¨àµà´¨à´¿à´·àµ", + "fil": "ഫിലിപàµà´ªà´¿à´¨àµ‹", + "fj": "ഫിജിയൻ", + "fo": "ഫാറോസàµ", + "fon": "ഫോൻ", + "fr": "à´«àµà´°à´žàµà´šàµ", + "fr_CA": "കനേഡിയൻ à´«àµà´°à´žàµà´šàµ", + "fr_CH": "à´¸àµà´µà´¿à´¸àµ à´«àµà´°à´žàµà´šàµ", + "frm": "മദàµà´§àµà´¯ à´«àµà´°à´žàµà´šàµ", + "fro": "പഴയ à´«àµà´°à´žàµà´šàµ", + "frr": "നോർതàµà´¤àµ‡àµ» à´«àµà´°à´¿à´·àµà´¯àµ»", + "frs": "ഈസàµà´±àµà´±àµ‡àµº à´«àµà´°à´¿à´·àµà´¯àµ»", + "fur": "à´«àµà´°à´¿à´¯àµà´²à´¿à´¯à´¾àµ»", + "fy": "പശàµà´šà´¿à´® à´«àµà´°à´¿à´·à´¿à´¯àµ»", + "ga": "à´à´±à´¿à´·àµ", + "gaa": "à´—à´¾", + "gag": "ഗാഗൂസàµ", + "gan": "ഗാൻ ചൈനീസàµ", + "gay": "ഗയൊ", + "gba": "à´—à´¬àµà´¯", + "gd": "à´¸àµà´•ോടàµà´Ÿà´¿à´·àµ ഗൈലികàµ", + "gez": "ഗീസàµ", + "gil": "ഗിൽബർടàµà´Ÿàµ€à´¸àµ", + "gl": "ഗലീഷàµà´¯àµ»", + "gmh": "മദàµà´§àµà´¯ ഉചàµà´š ജർമൻ", + "gn": "à´—àµà´µà´°à´¨àµ€", + "goh": "ഓൾഡൠഹൈ ജർമൻ", + "gon": "ഗോണàµà´¡à´¿", + "gor": "ഗൊറോൻറാലോ", + "got": "ഗോഥികàµà´•àµ", + "grb": "à´—àµà´°à´¬àµŠ", + "grc": "à´ªàµà´°à´¾à´¤à´¨ à´—àµà´°àµ€à´•àµà´•àµ", + "gsw": "à´¸àµà´µà´¿à´¸àµ ജർമàµà´®àµ»", + "gu": "à´—àµà´œà´±à´¾à´¤àµà´¤à´¿", + "guz": "à´—àµà´¸àµ€", + "gv": "മാൻസàµ", + "gwi": "à´—àµà´µà´¿à´šàµà´šà´¿àµ»", + "ha": "ഹൗസ", + "hai": "ഹൈഡ", + "hak": "ഹാകàµà´• ചൈനീസàµ", + "haw": "ഹവായിയൻ", + "he": "ഹീബàµà´°àµ", + "hi": "ഹിനàµà´¦à´¿", + "hil": "ഹിലിഗയàµà´¨àµ‹àµº", + "hit": "ഹിറàµà´±àµˆà´±àµà´±àµ", + "hmn": "മോങàµ", + "ho": "ഹിരി മോതàµ", + "hr": "à´•àµà´°àµŠà´¯àµ‡à´·àµà´¯àµ»", + "hsb": "à´…à´ªàµà´ªàµ¼ സോർബിയൻ", + "hsn": "à´·àµà´¯à´¾à´™àµ ചൈനീസàµ", + "ht": "ഹെയàµâ€Œà´¤à´¿à´¯àµ» à´•àµà´°à´¿à´¯àµ‹àµ¾", + "hu": "ഹംഗേറിയൻ", + "hup": "ഹൂപ", + "hy": "അർമേനിയൻ", + "hz": "ഹെരേരൊ", + "ia": "ഇനàµà´±àµ¼à´²à´¿à´‚à´—àµà´µ", + "iba": "ഇബാൻ", + "ibb": "ഇബീബിയോ", + "id": "ഇൻഡോനേഷàµà´¯àµ»", + "ie": "ഇനàµà´±àµ¼à´²à´¿à´‚à´—àµà´µàµ‡", + "ig": "ഇഗàµà´¬àµ‹", + "ii": "à´·àµà´µà´¾àµ»à´¯à´¿", + "ik": "ഇനàµà´ªà´¿à´¯à´¾à´•àµ", + "ilo": "ഇലോകോ", + "inh": "ഇംഗàµà´µà´¿à´·àµ", + "io": "ഇഡോ", + "is": "à´à´¸àµâ€Œà´²à´¾àµ»à´¡à´¿à´•àµ", + "it": "ഇറàµà´±à´¾à´²à´¿à´¯àµ»", + "iu": "ഇനàµà´•àµà´±àµà´±à´¿à´±àµà´±à´Ÿàµà´Ÿàµ", + "ja": "ജാപàµà´ªà´¨àµ€à´¸àµ", + "jbo": "ലോജàµà´¬à´¾àµ»", + "jgo": "ഗോമàµà´ª", + "jmc": "മചേം", + "jpr": "ജൂഡിയോ-പേർഷàµà´¯àµ»", + "jrb": "ജൂഡിയോ-അറബികàµ", + "jv": "ജാവാനീസàµ", + "ka": "ജോർജിയൻ", + "kaa": "à´•à´°-കാൽപàµà´ªà´•àµ", + "kab": "കബൈൽ", + "kac": "കാചിൻ", + "kaj": "à´œàµà´œàµ", + "kam": "à´•à´‚à´¬", + "kaw": "കാവി", + "kbd": "കബർഡിയാൻ", + "kbl": "കനെംബàµ", + "kcg": "à´Ÿàµà´¯à´¾à´ªàµ", + "kde": "മകàµà´•ോണàµà´Ÿàµ†", + "kea": "à´•à´¬àµà´µàµ†àµ¼à´¦à´¿à´¯à´¾à´¨àµ", + "kfo": "കോറോ", + "kg": "കോംഗോ", + "kha": "ഘാസി", + "kho": "ഘോറàµà´±à´¾à´¨àµ‡à´¸àµ‡", + "khq": "കൊയàµà´± ചീനി", + "ki": "കികൂയàµ", + "kj": "à´•àµà´µà´¾à´¨àµà´¯à´®", + "kk": "കസാഖàµ", + "kkj": "കാകോ", + "kl": "കലാലàµà´²à´¿à´¸à´Ÿàµà´Ÿàµ", + "kln": "കലെഞàµà´žà´¿àµ»", + "km": "ഖമെർ", + "kmb": "à´•à´¿à´‚à´¬àµà´£àµà´Ÿàµ", + "kn": "à´•à´¨àµà´¨à´¡", + "ko": "കൊറിയൻ", + "koi": "കോമി-പെർമàµà´¯à´¾à´•àµà´•àµ", + "kok": "കൊങàµà´•ണി", + "kos": "കൊസറേയൻ", + "kpe": "കപെലàµà´²àµ‡", + "kr": "കനൂറി", + "krc": "കരചൈ-ബാൽകർ", + "krl": "കരീലിയൻ", + "kru": "à´•àµà´°àµà´–àµ", + "ks": "കാശàµâ€Œà´®àµ€à´°à´¿", + "ksb": "ഷംഭാള", + "ksf": "ബാഫിയ", + "ksh": "കൊളോണിയൻ", + "ku": "à´•àµàµ¼à´¦àµà´¦à´¿à´·àµ", + "kum": "à´•àµà´®àµˆà´•àµ", + "kut": "à´•àµà´¤àµ‡à´¨àµˆ", + "kv": "കോമി", + "kw": "കോർണിഷàµ", + "ky": "കിർഗിസàµ", + "la": "ലാറàµà´±à´¿àµ»", + "lad": "ലാഡിനോ", + "lag": "ലാംഗി", + "lah": "ലഹàµâ€Œàµ»à´¡", + "lam": "ലംബ", + "lb": "ലകàµâ€Œà´¸à´‚ബർഗിഷàµ", + "lez": "ലഹàµà´—ിയാൻ", + "lg": "ഗാണàµà´Ÿ", + "li": "ലിംബർഗിഷàµ", + "lkt": "ലഗോതàµà´¤", + "ln": "ലിംഗാല", + "lo": "ലാവോ", + "lol": "മോങàµà´•ോ", + "loz": "ലൊസി", + "lrc": "വടകàµà´•ൻ ലൂറി", + "lt": "ലിതàµà´µà´¾à´¨à´¿à´¯àµ»", + "lu": "à´²àµà´¬-à´•à´±àµà´±à´‚à´—", + "lua": "ലൂബ-à´²àµà´²àµà´µ", + "lui": "ലൂയിസെനോ", + "lun": "à´²àµàµ»à´¡", + "luo": "à´²àµà´µàµ‹", + "lus": "മിസോ", + "luy": "à´²àµà´¯à´¿à´¯", + "lv": "ലാറàµà´±àµà´µà´¿à´¯àµ»", + "mad": "മദàµà´°àµ‡à´¸àµ‡", + "maf": "മാഫ", + "mag": "മഗാഹി", + "mai": "മൈഥിലി", + "mak": "മകാസർ", + "man": "മണàµà´¡à´¿àµ»à´—ോ", + "mas": "മസായàµ", + "mde": "മാബ", + "mdf": "മോകàµà´·", + "mdr": "മണàµà´¡à´¾àµ¼", + "men": "മെൻഡെ", + "mer": "മേരàµ", + "mfe": "മൊറിസിൻ", + "mg": "മലഗാസി", + "mga": "മദàµà´§àµà´¯ à´à´±à´¿à´·àµ", + "mgh": "മാഖàµà´µà´¾-മീതàµà´¤àµ‹", + "mgo": "മേതàµà´¤à´¾", + "mh": "മാർഷലàµà´²àµ€à´¸àµ", + "mi": "മവോറി", + "mic": "മികàµà´®à´¾à´•àµ", + "min": "മിനാങàµà´•ബൗ", + "mk": "മാസിഡോണിയൻ", + "ml": "മലയാളം", + "mn": "മംഗോളിയൻ", + "mnc": "മാൻ‌ചàµ", + "mni": "മണിപàµà´ªàµ‚à´°à´¿", + "moh": "മോഹാകàµ", + "mos": "മൊസàµà´¸à´¿", + "mr": "മറാതàµà´¤à´¿", + "ms": "മലെയàµ", + "mt": "മാൾടàµà´Ÿàµ€à´¸àµ", + "mua": "à´®àµà´¨àµà´¦à´¾à´‚à´—àµ", + "mul": "പലഭാഷകൾ", + "mus": "à´•àµà´°àµ€à´•àµà´•àµ", + "mwl": "മിരാൻറസേ", + "mwr": "മർവാരി", + "my": "ബർമീസàµ", + "mye": "മയീൻ", + "myv": "à´à´´àµà´¸àµà´¯", + "mzn": "മസനàµà´±à´±à´¾à´¨à´¿", + "na": "നൗറàµ", + "nan": "മിൻ നാൻ ചൈനീസàµ", + "nap": "നെപàµà´ªàµ‹à´³à´¿à´±àµà´±à´¾àµ»", + "naq": "നാമ", + "nb": "നോർവീജിയൻ à´¬àµà´•àµâ€Œà´®àµ½", + "nd": "നോർതàµà´¤àµ ഡെബിൾ", + "nds": "ലോ ജർമൻ", + "nds_NL": "ലോ സാകàµà´¸àµº", + "ne": "നേപàµà´ªà´¾à´³à´¿", + "new": "നേവാരി", + "ng": "ഡോങàµà´•", + "nia": "നിയാസàµ", + "niu": "à´¨àµà´¯àµà´µà´¾àµ»", + "nl": "à´¡à´šàµà´šàµ", + "nl_BE": "à´«àµà´²à´®à´¿à´·àµ", + "nmg": "à´•àµà´µà´¾à´¸à´¿à´¯àµ‹", + "nn": "നോർവീജിയൻ നൈനോർകàµâ€Œà´¸àµ", + "nnh": "ഗീംബൂൺ", + "no": "നോർവീജിയൻ", + "nog": "നോഗൈ", + "non": "പഴയ നോഴàµâ€Œà´¸àµ", + "nqo": "ഇൻകോ", + "nr": "ദകàµà´·à´¿à´£ നെഡിബിൾ", + "nso": "നോർതàµà´¤àµ‡àµ» സോതോ", + "nus": "à´¨àµà´µàµ‡àµ¼", + "nv": "നവാജോ", + "nwc": "à´•àµà´²à´¾à´¸à´¿à´•àµà´•ൽ നേവാരി", + "ny": "à´¨àµà´¯àµ»à´œ", + "nym": "à´¨àµà´¯à´¾à´‚വേസി", + "nyn": "à´¨àµà´¯à´¾àµ»à´•ോൾ", + "nyo": "à´¨àµà´¯àµ‹à´±àµ‹", + "nzi": "സിമ", + "oc": "à´“à´•àµâ€Œà´¸à´¿à´±àµà´±àµ»", + "oj": "ഓജിബàµà´µà´¾", + "om": "ഒറോമോ", + "or": "à´’à´¡à´¿à´¯", + "os": "à´’à´¸àµà´¸àµ†à´±àµà´±à´¿à´•àµ", + "osa": "ഒസേജàµ", + "ota": "à´“à´Ÿàµà´Ÿàµ‹à´®àµ» à´¤àµàµ¼à´•àµà´•à´¿à´·àµ", + "pa": "പഞàµà´šà´¾à´¬à´¿", + "pag": "പങàµà´•ാസിനൻ", + "pal": "പാഹàµà´²à´µà´¿", + "pam": "പാംപൻഗ", + "pap": "പാപിയാമെനàµà´±àµŠ", + "pau": "പലാവàµàµ»", + "pcm": "നൈജീരിയൻ പിഡàµâ€Œà´—ിൻ", + "peo": "പഴയ പേർഷàµà´¯àµ»", + "phn": "ഫീനിഷàµà´¯àµ»", + "pi": "പാലി", + "pl": "പോളിഷàµ", + "pon": "പൊൻപിയൻ", + "prg": "à´ªàµà´°à´·àµà´¯àµ»", + "pro": "പഴയ à´ªàµà´°àµŠà´µàµ»à´·àµàµ½", + "ps": "പഷàµâ€Œà´¤àµ‹", + "pt": "പോർചàµà´šàµà´—ീസàµ", + "pt_BR": "à´¬àµà´°à´¸àµ€à´²à´¿à´¯àµ» പോർചàµà´šàµà´—ീസàµ", + "pt_PT": "യൂറോപàµà´¯àµ» പോർചàµà´šàµà´—ീസàµ", + "qu": "à´•àµà´µàµ†à´šàµà´šàµà´µ", + "quc": "à´•àµà´µà´¿à´šàµà´šàµ†", + "raj": "രാജസàµà´¥à´¾à´¨à´¿", + "rap": "രാപനൂയി", + "rar": "രാരോടോങàµà´•ൻ", + "rm": "റൊമാഞàµà´šàµ", + "rn": "à´±àµà´£àµà´Ÿà´¿", + "ro": "റൊമാനിയൻ", + "ro_MD": "മോൾഡാവിയൻ", + "rof": "റോംബോ", + "rom": "റൊമാനി", + "root": "മൂലഭാഷ", + "ru": "റഷàµà´¯àµ»", + "rup": "ആരോമാനിയൻ", + "rw": "à´•à´¿à´¨àµà´¯à´¾àµ¼à´µà´¾à´£àµà´Ÿ", + "rwk": "à´±àµà´µà´¾", + "sa": "സംസàµâ€Œà´•ൃതം", + "sad": "സാൻഡവേ", + "sah": "സാഖ", + "sam": "സമരിയാകàµà´•ാരàµà´Ÿàµ† അരമായ", + "saq": "സംബàµà´°àµ", + "sas": "സസാകàµ", + "sat": "സനàµà´¤à´¾à´²à´¿", + "sba": "ഗംബായàµ", + "sbp": "സംഗàµ", + "sc": "സർഡിനിയാൻ", + "scn": "സിസിലിയൻ", + "sco": "à´¸àµà´•ോടàµà´¸àµ", + "sd": "സിനàµà´§à´¿", + "sdh": "തെകàµà´•ൻ à´•àµàµ¼à´¦àµà´¦à´¿à´·àµ", + "se": "വടകàµà´•ൻ സമി", + "see": "സെനേക", + "seh": "സേന", + "sel": "സെൽകപàµ", + "ses": "കൊയàµà´±à´¾à´¬àµŠà´±àµ‹ സെനàµà´¨à´¿", + "sg": "സാംഗോ", + "sga": "പഴയ à´à´±à´¿à´·àµ", + "sh": "സെർബോ-à´•àµà´°àµŠà´¯àµ‡à´·àµà´¯àµ»", + "shi": "താചàµà´šà´²à´¿à´±àµà´±àµ", + "shn": "ഷാൻ", + "shu": "ചാഡിയൻ അറബി", + "si": "സിംഹള", + "sid": "സിഡാമോ", + "sk": "à´¸àµà´²àµ‹à´µà´¾à´•àµ", + "sl": "à´¸àµà´²àµ‹à´µàµ‡à´¨à´¿à´¯àµ»", + "sm": "സമോവൻ", + "sma": "തെകàµà´•ൻ സാമി", + "smj": "ലൂലീ സമി", + "smn": "ഇനാരി സാമി", + "sms": "à´¸àµà´•ോൾടàµà´Ÿàµ സമി", + "sn": "ഷോണ", + "snk": "സോണിൻകെ", + "so": "സോമാലി", + "sog": "സോജിഡിയൻ", + "sq": "അൽബേനിയൻ", + "sr": "സെർബിയൻ", + "srn": "à´¶àµà´°à´¾à´¨àµ» ഡോങàµà´•ോ", + "srr": "സെറർ", + "ss": "à´¸àµà´µà´¾à´±àµà´±à´¿", + "ssy": "സാഹോ", + "st": "തെകàµà´•ൻ സോതോ", + "su": "à´¸àµà´£àµà´Ÿà´¾à´¨àµ€à´¸àµ", + "suk": "à´¸àµà´•àµà´®", + "sus": "à´¸àµà´¸àµ", + "sux": "à´¸àµà´®àµ‡à´°à´¿à´¯àµ»", + "sv": "à´¸àµà´µàµ€à´¡à´¿à´·àµ", + "sw": "à´¸àµà´µà´¾à´¹à´¿à´²à´¿", + "sw_CD": "കോംഗോ à´¸àµà´µà´¾à´¹à´¿à´²à´¿", + "swb": "കൊമോറിയൻ", + "syc": "à´ªàµà´°à´¾à´¤à´¨ à´¸àµà´±à´¿à´¯à´¾à´¨à´¿à´­à´¾à´·", + "syr": "à´¸àµà´±à´¿à´¯à´¾à´¨à´¿", + "ta": "തമിഴàµ", + "te": "തെലàµà´™àµà´•àµ", + "tem": "ടിംനേ", + "teo": "ടെസോ", + "ter": "ടെറേനോ", + "tet": "ടെറàµà´±àµà´‚", + "tg": "താജികàµ", + "th": "തായàµ", + "ti": "ടൈഗàµà´°à´¿à´¨àµà´¯", + "tig": "ടൈഗàµà´°à´¿", + "tiv": "à´Ÿà´¿à´µàµ", + "tk": "à´¤àµàµ¼à´•àµâ€Œà´®àµ†àµ»", + "tkl": "ടൊകàµà´•േലൗ", + "tl": "തഗാലോഗàµ", + "tlh": "à´•àµà´²à´¿à´‚ഗോൺ", + "tli": "ലിംഗàµà´µà´¿à´±àµà´±àµ", + "tmh": "ടമഷേകàµ", + "tn": "à´¸àµà´µà´¾à´¨", + "to": "ടോംഗൻ", + "tog": "à´¨àµà´¯à´¾à´¸à´¾ ഡോങàµà´•", + "tpi": "ടോകൠപിസിൻ", + "tr": "ടർകàµà´•à´¿à´·àµ", + "trv": "തരോകàµà´•ോ", + "ts": "സോംഗ", + "tsi": "സിംഷàµà´¯àµ»", + "tt": "ടാടàµà´Ÿàµ¼", + "tum": "à´Ÿàµà´‚à´¬àµà´•", + "tvl": "à´Ÿàµà´µà´¾à´²àµ", + "tw": "à´Ÿàµà´µà´¿", + "twq": "ടസവാകàµà´•àµ", + "ty": "താഹിതിയൻ", + "tyv": "à´¤àµà´µà´¿à´¨à´¿à´¯àµ»", + "tzm": "മധàµà´¯ à´…à´±àµà´±àµâ€Œà´²à´¸àµ ടമാസൈറàµà´±àµ", + "udm": "ഉഡàµà´®àµàµ¼à´Ÿàµà´Ÿàµ", + "ug": "ഉയàµà´˜àµàµ¼", + "uga": "ഉഗറിടàµà´Ÿà´¿à´•àµ", + "uk": "ഉകàµà´°àµ‡à´¨à´¿à´¯àµ»", + "umb": "ഉംബàµà´¨àµà´¦àµ", + "und": "à´…à´œàµà´žà´¾à´¤ ഭാഷ", + "ur": "ഉറàµà´¦àµ", + "uz": "ഉസàµâ€Œà´¬àµ†à´•àµà´•àµ", + "vai": "വൈ", + "ve": "വെനàµà´¦", + "vi": "വിയറàµà´±àµà´¨à´¾à´®àµ€à´¸àµ", + "vo": "വോളാപàµà´•àµ", + "vot": "വോടàµà´Ÿà´¿à´•àµ", + "vun": "à´µàµàµ»à´œàµ‹", + "wa": "വലàµà´²àµ‚ൺ", + "wae": "വാൾസർ", + "wal": "വൊലൈറàµà´±", + "war": "വാരേയàµ", + "was": "വാഷൊ", + "wbp": "വൂൾപിരി", + "wo": "വൊളോഫàµ", + "wuu": "വൠചൈനീസàµ", + "xal": "കൽമൈകàµ", + "xh": "ഖോസ", + "xog": "സോഗോ", + "yao": "യാവോ", + "yap": "യെപàµà´ªàµ€à´¸àµ", + "yav": "യാംഗàµà´¬àµ†àµ»", + "ybb": "യംബ", + "yi": "യിദàµà´¦à´¿à´·àµ", + "yo": "യൊറൂബാ", + "yue": "കാനàµà´±à´£àµ€à´¸àµ", + "za": "à´¸àµà´µà´¾à´‚à´—àµ", + "zap": "സാപàµà´ªàµ‹à´Ÿàµ†à´•àµ", + "zbl": "à´¬àµà´²à´¿à´¸àµà´¸à´¿à´‚ബൽസàµ", + "zen": "സെനഗ", + "zgh": "à´¸àµà´±àµà´±à´¾àµ»à´¡àµ‡àµ¼à´¡àµ മൊറോകàµà´•ൻ à´±àµà´±à´¾à´®à´¸à´¿à´¯à´±àµà´±àµ", + "zh": "ചൈനീസàµ", + "zh_Hans": "ലളിതമാകàµà´•à´¿à´¯ ചൈനീസàµ", + "zh_Hant": "പരമàµà´ªà´°à´¾à´—à´¤ ചൈനീസàµ", + "zu": "à´¸àµà´²àµ", + "zun": "à´¸àµà´¨à´¿", + "zxx": "ഭാഷാപരമായ ഉളàµà´³à´Ÿà´•àµà´•മൊനàµà´¨àµà´®à´¿à´²àµà´²", + "zza": "സാസാ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mn.json new file mode 100644 index 0000000000000000000000000000000000000000..f7ce200ffe2afb4e1db5955b46656b3fd5873274 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mn.json @@ -0,0 +1,401 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "афар", + "ab": "абхаз", + "ace": "ачин Ñ…Ñл", + "ada": "адангмÑ", + "ady": "адигÑ", + "af": "африк", + "agq": "агем", + "ain": "айну", + "ak": "акан", + "ale": "алют", + "alt": "өмнөд алтай", + "am": "амхар", + "an": "арагон", + "anp": "ангик", + "ar": "араб", + "ar_001": "Ñтандарт араб", + "arn": "мапүчи", + "arp": "арапаго", + "as": "аÑÑам", + "asa": "аÑу", + "ast": "аÑтури Ñ…Ñл", + "av": "авар Ñ…Ñл", + "awa": "авадхи", + "ay": "аймара", + "az": "азербайжан", + "ba": "башкир", + "ban": "бали Ñ…Ñл", + "bas": "баÑаа Ñ…Ñл", + "be": "беларуÑÑŒ", + "bem": "бемба", + "bez": "бена", + "bg": "болгар", + "bho": "божпури", + "bi": "биÑлам", + "bin": "бини", + "bla": "ÑикÑика", + "bm": "бамбара", + "bn": "бенгал", + "bo": "төвд", + "br": "бретон", + "brx": "бодо", + "bs": "боÑни", + "bug": "буги Ñ…Ñл", + "byn": "блин Ñ…Ñл", + "ca": "каталан", + "ce": "чечень", + "ceb": "Ñебуано Ñ…Ñл", + "cgg": "чига", + "ch": "чаморро Ñ…Ñл", + "chk": "чуук Ñ…Ñл", + "chm": "мари Ñ…Ñл", + "cho": "чоктау Ñ…Ñл", + "chr": "чироки", + "chy": "чÑенн", + "ckb": "Ñорани күрд", + "co": "корÑик", + "crs": "ÑеÑелва креолын франц Ñ…Ñл", + "cs": "чех", + "cu": "Ñүмийн ÑлавÑн Ñ…Ñл", + "cv": "чуваш", + "cy": "уÑльÑ", + "da": "дани", + "dak": "дакота", + "dar": "даргва Ñ…Ñл", + "dav": "тайта", + "de": "герман", + "de_AT": "авÑтри герман", + "de_CH": "швейцари дÑÑÑ€ герман", + "dgr": "догриб Ñ…Ñл", + "dje": "зарма", + "dsb": "ловер-Ñорби", + "dua": "дуала", + "dv": "дивехи Ñ…Ñл", + "dyo": "жола-фони", + "dz": "жонха", + "dzg": "дазага Ñ…Ñл", + "ebu": "Ñмбу", + "ee": "ÑвÑ", + "efi": "Ñфик", + "eka": "Ñкажук", + "el": "грек", + "en": "англи", + "en_AU": "авÑтрали англи", + "en_CA": "канад англи", + "en_GB": "британийн англи", + "en_US": "америкийн англи", + "eo": "ÑÑперанто", + "es": "иÑпани", + "es_419": "латин америкийн иÑпани", + "es_ES": "европын иÑпани", + "es_MX": "мекÑикийн иÑпани", + "et": "ÑÑтони", + "eu": "баÑк", + "ewo": "Ñвондо", + "fa": "перÑ", + "ff": "фула", + "fi": "финлÑнд", + "fil": "филиппин", + "fj": "фижи", + "fo": "фарер", + "fon": "фон", + "fr": "франц", + "fr_CA": "канад франц", + "fr_CH": "швейцари франц", + "fur": "фриулийн", + "fy": "баруун фризын", + "ga": "ирланд", + "gaa": "га", + "gag": "гагуз", + "gd": "шотланд келт", + "gez": "гийз", + "gil": "гилбертийн", + "gl": "галик", + "gn": "гуарани", + "gor": "горонтало", + "gsw": "швейцари герман", + "gu": "гужарати", + "guz": "гузы", + "gv": "манкÑ", + "gwi": "гвичин", + "ha": "хауÑа", + "haw": "хавай", + "he": "еврей", + "hi": "хинди", + "hil": "хилигайны", + "hmn": "хмонг", + "hr": "хорват", + "hsb": "дÑÑд Ñорби", + "ht": "гаитийн креол", + "hu": "унгар", + "hup": "хупа", + "hy": "армен", + "hz": "хереро", + "ia": "интерлингво", + "iba": "ибан", + "ibb": "ибибио", + "id": "индонези", + "ie": "нÑгдмÑл Ñ…Ñл", + "ig": "игбо", + "ii": "Ñычуань и", + "ilo": "илоко", + "inh": "ингуш", + "io": "идо", + "is": "иÑланд", + "it": "итали", + "iu": "инуктитут", + "ja": "Ñпон", + "jbo": "ложбан Ñ…Ñл", + "jgo": "нгомба", + "jmc": "мачамÑ", + "jv": "Ñва", + "ka": "гүрж", + "kab": "кабиле", + "kac": "качин Ñ…Ñл", + "kaj": "жжу Ñ…Ñл", + "kam": "камба", + "kbd": "кабардин Ñ…Ñл", + "kcg": "Ñ‚Ñп", + "kde": "маконде", + "kea": "кабүвердиану", + "kfo": "коро", + "kha": "каÑи Ñ…Ñл", + "khq": "койра чини", + "ki": "кикуюү", + "kj": "куаньÑма", + "kk": "хаÑаг", + "kkj": "како Ñ…Ñл", + "kl": "калалиÑут", + "kln": "каленжин", + "km": "камбож", + "kmb": "кимбунду Ñ…Ñл", + "kn": "каннада", + "ko": "ÑолонгоÑ", + "koi": "коми-пермÑк", + "kok": "конкани", + "kpe": "кпелле", + "kr": "канури Ñ…Ñл", + "krc": "карачай-балкар", + "krl": "карель Ñ…Ñл", + "kru": "курук", + "ks": "кашмир", + "ksb": "шамбала", + "ksf": "бафиа", + "ksh": "кёльш Ñ…Ñл", + "ku": "күрд", + "kum": "кумук", + "kv": "коми Ñ…Ñл", + "kw": "корны", + "ky": "кыргыз", + "la": "латин", + "lad": "ладин", + "lag": "ланги", + "lb": "люкÑембург", + "lez": "лезги Ñ…Ñл", + "lg": "ганда", + "li": "лимбург Ñ…Ñл", + "lkt": "лакота", + "ln": "лингала", + "lo": "лаоÑ", + "loz": "лози", + "lrc": "хойд лури", + "lt": "литва", + "lu": "луба-катанга", + "lua": "луба-лулуа", + "lun": "лунда", + "luo": "луо", + "lus": "мизо", + "luy": "луÑа", + "lv": "латви", + "mad": "мадури Ñ…Ñл", + "mag": "магахи Ñ…Ñл", + "mai": "май", + "mak": "макаÑар", + "mas": "маÑай", + "mdf": "мокша", + "men": "Ð¼ÐµÐ½Ð´Ñ Ñ…Ñл", + "mer": "меру", + "mfe": "мориÑен", + "mg": "малагаÑи", + "mgh": "макува-мито", + "mgo": "мета", + "mh": "маршаллын Ñ…Ñл", + "mi": "маори", + "mic": "микмак Ñ…Ñл", + "min": "минангкабау", + "mk": "македон", + "ml": "малайлам", + "mn": "монгол", + "mni": "манипури", + "moh": "мохаук", + "mos": "моÑÑи Ñ…Ñл", + "mr": "марати", + "ms": "малай", + "mt": "малти", + "mua": "мунданг", + "mul": "олон Ñ…Ñл", + "mus": "крийк Ñ…Ñл", + "mwl": "меранди Ñ…Ñл", + "my": "бирм", + "myv": "ÑрзÑ", + "mzn": "мазандерани", + "na": "науру", + "nap": "неаполитан Ñ…Ñл", + "naq": "нама", + "nb": "норвегийн букмол", + "nd": "хойд ндебеле", + "nds_NL": "бага ÑакÑон", + "ne": "балба", + "new": "невари", + "ng": "ндонга", + "nia": "Ð½Ð¸Ð°Ñ Ñ…Ñл", + "niu": "ниуи Ñ…Ñл", + "nl": "голланд", + "nl_BE": "фламанд", + "nmg": "квазио", + "nn": "норвегийн нинорÑк", + "nnh": "нгиембүүн", + "no": "норвеги", + "nog": "ногаи Ñ…Ñл", + "nqo": "нко", + "nr": "өмнөд ндебеле", + "nso": "хойд Ñото", + "nus": "нуер", + "nv": "навахо", + "ny": "нÑнжа", + "nyn": "нÑнколе", + "oc": "францын окÑитан", + "om": "оромо", + "or": "ориÑ", + "os": "оÑÑетийн", + "pa": "панжаб", + "pag": "пангаÑин", + "pam": "пампанга", + "pap": "папьÑменто", + "pau": "палаугийн", + "pcm": "нигерийн пиджин Ñ…Ñл", + "pl": "польш", + "prg": "пруÑÑийн", + "ps": "пашто", + "pt": "португаль", + "pt_BR": "португаль (бразил)", + "pt_PT": "европын португаль", + "qu": "кечуа", + "quc": "киче", + "rap": "рапануи", + "rar": "раротонгийн", + "rm": "романш", + "rn": "рунди", + "ro": "румын", + "ro_MD": "молдав", + "rof": "ромбо", + "root": "рут", + "ru": "ороÑ", + "rup": "ароманы", + "rw": "кинÑрванда", + "rwk": "рва", + "sa": "ÑанÑкрит", + "sad": "ÑандавÑ", + "sah": "Ñаха", + "saq": "Ñамбүрү", + "sat": "Ñантали", + "sba": "нгамбай", + "sbp": "Ñангү", + "sc": "Ñардины", + "scn": "Ñицилийн", + "sco": "шотландууд", + "sd": "Ñиндхи", + "se": "хойд Ñами", + "seh": "Ñена", + "ses": "кёраборо Ñени", + "sg": "Ñанго", + "sh": "хорватын Ñерб", + "shi": "тачелхит", + "shn": "шань", + "si": "Ñинхала", + "sk": "Ñловак", + "sl": "Ñловени", + "sm": "Ñамоагийн", + "sma": "өмнөд Ñами", + "smj": "люле Ñами", + "smn": "инари Ñами", + "sms": "Ñколт Ñами", + "sn": "шона", + "snk": "Ñонинке", + "so": "Ñомали", + "sq": "албани", + "sr": "Ñерб", + "srn": "Ñранан тонго", + "ss": "Ñвати", + "ssy": "Ñахо", + "st": "ÑеÑото", + "su": "Ñундан", + "suk": "Ñукума", + "sv": "швед", + "sw": "Ñвахили", + "sw_CD": "конго Ñвахили", + "swb": "комори Ñ…Ñл", + "syr": "Ñирийн", + "ta": "тамил", + "te": "Ñ‚Ñлүгү", + "tem": "тимн", + "teo": "Ñ‚ÑÑо", + "tet": "тетум", + "tg": "тажик", + "th": "тай", + "ti": "тигрина", + "tig": "тигр", + "tk": "туркмен", + "tlh": "клингон Ñ…Ñл", + "tn": "цвана", + "to": "тонга", + "tpi": "ток пиÑин", + "tr": "турк", + "trv": "тароко", + "ts": "цонга", + "tt": "татар", + "tum": "тумбула", + "tvl": "тувалу", + "tw": "тви", + "twq": "таÑавак", + "ty": "таитын", + "tyv": "тува", + "tzm": "төв атлаÑын тамазайт", + "udm": "удмурт", + "ug": "уйгар", + "uk": "украин", + "umb": "умбунду", + "und": "тодорхойгүй Ñ…Ñл", + "ur": "урду", + "uz": "узбек", + "vai": "вай", + "ve": "венда", + "vi": "вьетнам", + "vo": "волапюк", + "vun": "вунжо", + "wa": "уоллун", + "wae": "уолÑÑÑ€", + "wal": "уоллайтта", + "war": "варай", + "wo": "волоф", + "xal": "халимаг Ñ…Ñл", + "xh": "хоÑа", + "xog": "Ñога", + "yav": "Ñнгбен", + "ybb": "емба", + "yi": "иддиш", + "yo": "ёруба", + "yue": "кантон Ñ…Ñл", + "zgh": "тамазит", + "zh": "Ñ…Ñтад", + "zh_Hans": "Ñ…ÑлбаршуулÑан Ñ…Ñтад", + "zh_Hant": "уламжлалт Ñ…Ñтад", + "zu": "зулу", + "zun": "зуни", + "zxx": "Ñ…Ñл зүйн агуулгагүй", + "zza": "заза" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mo.json new file mode 100644 index 0000000000000000000000000000000000000000..0d4636b584dc1f2ab1e3cbccad356f6d035925d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mo.json @@ -0,0 +1,7 @@ +{ + "Version": "2.1.27.99", + "Names": { + "sw_CD": "swahili (R. D. Congo)", + "wal": "wolaytta" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mr.json new file mode 100644 index 0000000000000000000000000000000000000000..56a003c30b779fd4610347cc8e34530913a4db13 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mr.json @@ -0,0 +1,520 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "अफार", + "ab": "अबखेजियन", + "ace": "अचीनी", + "ach": "अकोली", + "ada": "अडांगà¥à¤®à¥‡", + "ady": "अडिघे", + "ae": "अवेसà¥à¤¤à¤¨", + "af": "अफà¥à¤°à¤¿à¤•ानà¥à¤¸", + "afh": "अफà¥à¤°à¤¿à¤¹à¤¿à¤²à¥€", + "agq": "अघेम", + "ain": "à¤à¤¨à¥‚", + "ak": "अकान", + "akk": "अकà¥à¤•ेडियन", + "ale": "अलेउत", + "alt": "दकà¥à¤·à¤¿à¤£à¤¾à¤¤à¥à¤¯ अलà¥à¤¤à¤¾à¤ˆ", + "am": "अमà¥à¤¹à¤¾à¤°à¤¿à¤•", + "an": "अरà¥à¤—ोनीज", + "ang": "पà¥à¤°à¤¾à¤¤à¤¨ इंगà¥à¤°à¤œà¥€", + "anp": "अंगिका", + "ar": "अरबी", + "ar_001": "आधà¥à¤¨à¤¿à¤• पà¥à¤°à¤®à¤¾à¤£à¤¿à¤¤ अरबी", + "arc": "अâ€à¥…रेमाइक", + "arn": "मापà¥à¤šà¥€", + "arp": "आरापाहो", + "arw": "आरावाक", + "as": "आसामी", + "asa": "असà¥", + "ast": "असà¥à¤¤à¥à¤°à¤¿à¤¯à¤¨", + "av": "अâ€à¥…वà¥à¤¹à¥‡à¤°à¤¿à¤•", + "awa": "अवधी", + "ay": "à¤à¤®à¤°à¤¾", + "az": "अà¤à¤°à¤¬à¥ˆà¤œà¤¾à¤¨à¥€", + "ba": "बषà¥à¤•िर", + "bal": "बलà¥à¤šà¥€", + "ban": "बालिनीज", + "bas": "बसा", + "be": "बेलारà¥à¤¶à¤¿à¤¯à¤¨", + "bej": "बेजा", + "bem": "बेमà¥à¤¬à¤¾", + "bez": "बेना", + "bg": "बलà¥à¤—ेरियन", + "bgn": "पशà¥à¤šà¤¿à¤®à¥€ बालोची", + "bho": "भोजपà¥à¤°à¥€", + "bi": "बिसà¥à¤²à¤¾à¤®à¤¾", + "bik": "बिकोल", + "bin": "बिनी", + "bla": "सिकà¥à¤¸à¤¿à¤•ा", + "bm": "बामà¥à¤¬à¤¾à¤°à¤¾", + "bn": "बंगाली", + "bo": "तिबेटी", + "br": "बà¥à¤°à¥‡à¤¤à¥‰à¤¨", + "bra": "बà¥à¤°à¤œ", + "brx": "बोडो", + "bs": "बोसà¥à¤¨à¤¿à¤¯à¤¨", + "bua": "बà¥à¤°à¤¿à¤¯à¤¾à¤¤", + "bug": "बगिनीस", + "byn": "बà¥à¤²à¤¿à¤¨", + "ca": "कातालान", + "cad": "कॅडà¥à¤¡à¥‹", + "car": "कॅरिब", + "cch": "अतà¥à¤¸à¤®", + "ce": "चेचेन", + "ceb": "सिबà¥à¤†à¤¨à¥‹", + "cgg": "किगा", + "ch": "कॅमोरो", + "chb": "चिबà¥à¤šà¤¾", + "chg": "छागाताइ", + "chk": "चूकीसे", + "chm": "मारी", + "chn": "चिनूक जारगॉन", + "cho": "चोकà¥à¤¤à¥Œ", + "chp": "शिपेवà¥à¤¯à¤¾à¤¨", + "chr": "चेरोकी", + "chy": "शेयेनà¥à¤¨", + "ckb": "मधà¥à¤¯ कà¥à¤°à¥à¤¦à¤¿à¤¶", + "co": "कॉरà¥à¤¸à¤¿à¤•न", + "cop": "कॉपà¥à¤Ÿà¤¿à¤•", + "cr": "कà¥à¤°à¥€", + "crh": "कà¥à¤°à¤¾à¤‡à¤®à¥€à¤¨ तà¥à¤°à¥à¤•ी", + "crs": "सेसेलà¥à¤µà¤¾ कà¥à¤°à¤¿à¤“ल फà¥à¤°à¥‡à¤‚च", + "cs": "à¤à¥‡à¤•", + "csb": "काशà¥à¤¬à¤¿à¤¯à¤¨", + "cu": "चरà¥à¤š सà¥à¤²à¤¾à¤µà¥à¤¹à¤¿à¤•", + "cv": "चूवाश", + "cy": "वेलà¥à¤¶", + "da": "डॅनिश", + "dak": "डाकोटा", + "dar": "दारà¥à¤—वा", + "dav": "तायता", + "de": "जरà¥à¤®à¤¨", + "de_AT": "ऑसà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¨ जरà¥à¤®à¤¨", + "de_CH": "सà¥à¤µà¤¿à¤¸ हाय जरà¥à¤®à¤¨", + "del": "डेलावेयर", + "den": "सà¥à¤²à¤¾à¤µà¥à¤¹", + "dgr": "डोगà¥à¤°à¤¿à¤¬", + "din": "डिनà¥à¤•ा", + "dje": "à¤à¤¾à¤°à¥à¤®à¤¾", + "doi": "डोगरी", + "dsb": "लोअर सोरà¥à¤¬à¤¿à¤¯à¤¨", + "dua": "दà¥à¤†à¤²à¤¾", + "dum": "मिडल डच", + "dv": "दिवेही", + "dyo": "जोला-फोंयी", + "dyu": "डà¥à¤¯à¥à¤²à¤¾", + "dz": "à¤à¥‹à¤‚गखा", + "dzg": "दाà¤à¤¾à¤—ा", + "ebu": "à¤à¤®à¥à¤¬à¥‚", + "ee": "à¤à¤µà¥‡", + "efi": "à¤à¤«à¤¿à¤•", + "egy": "पà¥à¤°à¤¾à¤šà¥€à¤¨ इजिपà¥à¤¶à¤¿à¤¯à¤¨", + "eka": "à¤à¤•ाजà¥à¤•", + "el": "गà¥à¤°à¥€à¤•", + "elx": "à¤à¤²à¤¾à¤®à¤¾à¤‡à¤Ÿ", + "en": "इंगà¥à¤°à¤œà¥€", + "en_AU": "ऑसà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¨ इंगà¥à¤°à¤œà¥€", + "en_CA": "कॅनडियन इंगà¥à¤°à¤œà¥€", + "en_GB": "बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ इंगà¥à¤°à¤œà¥€", + "en_US": "अमेरिकन इंगà¥à¤°à¤œà¥€", + "enm": "मिडल इंगà¥à¤°à¤œà¥€", + "eo": "à¤à¤¸à¥à¤ªà¤°à¤¾à¤¨à¥à¤Ÿà¥‹", + "es": "सà¥à¤ªà¥…निश", + "es_419": "लॅटिन अमेरिकन सà¥à¤ªà¥…निश", + "es_ES": "यà¥à¤°à¥‹à¤ªà¤¿à¤¯à¤¨ सà¥à¤ªà¥…निश", + "es_MX": "मेकà¥à¤¸à¤¿à¤•न सà¥à¤ªà¥…निश", + "et": "इसà¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¨", + "eu": "बासà¥à¤•", + "ewo": "इवोनà¥à¤¡à¥‹", + "fa": "फारसी", + "fan": "फà¤à¤—", + "fat": "फनà¥à¤Ÿà¥€", + "ff": "फà¥à¤²à¤¾à¤¹", + "fi": "फिनà¥à¤¨à¤¿à¤¶", + "fil": "फिलिपिनो", + "fj": "फिजियन", + "fo": "फरोइज", + "fon": "फॉन", + "fr": "फà¥à¤°à¥‡à¤‚च", + "fr_CA": "कॅनडियन फà¥à¤°à¥‡à¤‚च", + "fr_CH": "सà¥à¤µà¤¿à¤¸ फà¥à¤°à¥‡à¤‚च", + "frm": "मिडल फà¥à¤°à¥‡à¤‚च", + "fro": "पà¥à¤°à¤¾à¤¤à¤¨ फà¥à¤°à¥‡à¤‚च", + "frr": "उतà¥à¤¤à¤°à¥€ फà¥à¤°à¤¿à¤¶à¤¿à¤¯à¤¨", + "frs": "पौरà¥à¤µà¤¾à¤¤à¥à¤¯ फà¥à¤°à¤¿à¤¶à¤¿à¤¯à¤¨", + "fur": "फà¥à¤°à¤¿à¤¯à¥à¤²à¤¿à¤¯à¤¾à¤¨", + "fy": "पशà¥à¤šà¤¿à¤®à¥€ फà¥à¤°à¤¿à¤¶à¤¿à¤¯à¤¨", + "ga": "आयरिश", + "gaa": "गा", + "gag": "गागाउà¤", + "gan": "गॅन चिनी", + "gay": "गायो", + "gba": "बाया", + "gd": "सà¥à¤•ॉटà¥à¤¸ गेलिक", + "gez": "गीà¤", + "gil": "जिलà¥à¤¬à¤°à¤Ÿà¥€à¤œ", + "gl": "गॅलिशियन", + "gmh": "मिडल हाय जरà¥à¤®à¤¨", + "gn": "गà¥à¤†à¤°à¤¨à¥€", + "goh": "पà¥à¤°à¤¾à¤¤à¤¨ हाइ जरà¥à¤®à¤¨", + "gon": "गाà¤à¤¡à¥€", + "gor": "गोरोनà¥à¤¤à¤¾à¤²à¥‹", + "got": "गॉथिक", + "grb": "गà¥à¤°à¥‡à¤¬à¥‹", + "grc": "पà¥à¤°à¤¾à¤šà¥€à¤¨ गà¥à¤°à¥€à¤•", + "gsw": "सà¥à¤µà¤¿à¤¸ जरà¥à¤®à¤¨", + "gu": "गà¥à¤œà¤°à¤¾à¤¤à¥€", + "guz": "गसी", + "gv": "मांकà¥à¤¸", + "gwi": "गà¥à¤µà¤¿à¤šâ€™à¤‡à¤¨", + "ha": "हौसा", + "hai": "हैडा", + "hak": "हाकà¥à¤•ा चिनी", + "haw": "हवाईयन", + "he": "हिबà¥à¤°à¥‚", + "hi": "हिंदी", + "hil": "हिलीगेनॉन", + "hit": "हिटà¥à¤Ÿà¤¿à¤¤à¥‡", + "hmn": "माà¤à¤—", + "ho": "हिरी मॉटू", + "hr": "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¨", + "hsb": "अपà¥à¤ªà¤° सॉरà¥à¤¬à¤¿à¤¯à¤¨", + "hsn": "शियांग चिनी", + "ht": "हैतीयन", + "hu": "हंगेरियन", + "hup": "हूपा", + "hy": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¨", + "hz": "हरेरो", + "ia": "इंटरलिंगà¥à¤µà¤¾", + "iba": "इबान", + "ibb": "इबिबिओ", + "id": "इंडोनेशियन", + "ie": "इनà¥à¤Ÿà¤°à¤²à¤¿à¤‚ग", + "ig": "ईगà¥à¤¬à¥‹", + "ii": "सिचà¥à¤†à¤¨ यी", + "ik": "इनूपियाक", + "ilo": "इलोको", + "inh": "इंगà¥à¤¶", + "io": "इडौ", + "is": "आईसलà¤à¤¡à¤¿à¤•", + "it": "इटालियन", + "iu": "इनà¥à¤•िटà¥à¤Ÿà¥", + "ja": "जपानी", + "jbo": "लोजà¥à¤¬à¤¾à¤¨", + "jgo": "गोमà¥à¤¬à¤¾", + "jmc": "मशामे", + "jpr": "जà¥à¤¦à¥‡à¤“-फारसी", + "jrb": "जà¥à¤¦à¥‡à¤“-अरबी", + "jv": "जावानीज", + "ka": "जॉरà¥à¤œà¤¿à¤¯à¤¨", + "kaa": "कारा-कलà¥à¤ªà¤•", + "kab": "कबाइल", + "kac": "काचिन", + "kaj": "जà¥à¤œà¥", + "kam": "कामà¥à¤¬à¤¾", + "kaw": "कावी", + "kbd": "कबारà¥à¤¡à¤¿à¤¯à¤¨", + "kcg": "तà¥à¤¯à¤¾à¤ª", + "kde": "माकोनà¥à¤¦à¥‡", + "kea": "काबवरà¥à¤¦à¤¿à¤¯à¤¾à¤¨à¥", + "kfo": "कोरो", + "kg": "काà¤à¤—ो", + "kha": "खासी", + "kho": "खोतानीस", + "khq": "कोयरा चीनी", + "ki": "किकà¥à¤¯à¥‚", + "kj": "कà¥à¤µà¤¾à¤¨à¥à¤¯à¤¾à¤®à¤¾", + "kk": "कà¤à¤¾à¤•", + "kkj": "काको", + "kl": "कलालà¥à¤²à¤¿à¤¸à¤¤", + "kln": "कालेंजीन", + "km": "खà¥à¤®à¥‡à¤°", + "kmb": "किमà¥à¤¬à¤¨à¥à¤¦à¥", + "kn": "कनà¥à¤¨à¤¡", + "ko": "कोरियन", + "koi": "कोमी-परमà¥à¤¯à¤¾à¤•", + "kok": "कोंकणी", + "kos": "कोसरियन", + "kpe": "कà¥à¤ªà¥‡à¤²à¥à¤²à¥‡", + "kr": "कनà¥à¤°à¥€", + "krc": "कराचय-बालà¥à¤•र", + "krl": "करेलियन", + "kru": "कà¥à¤°à¥‚ख", + "ks": "काशà¥à¤®à¥€à¤°à¥€", + "ksb": "शांबाला", + "ksf": "बाफिया", + "ksh": "कोलोगà¥à¤¨à¤¿à¤¯à¤¨", + "ku": "कà¥à¤°à¥à¤¦à¤¿à¤¶", + "kum": "कà¥à¤®à¥€à¤•", + "kut": "कà¥à¤¤à¥‡à¤¨à¤¾à¤ˆ", + "kv": "कोमी", + "kw": "कोरà¥à¤¨à¤¿à¤¶", + "ky": "किरगीà¤", + "la": "लॅटिन", + "lad": "लादीनो", + "lag": "लांगी", + "lah": "लाहà¥à¤¨à¥à¤¡à¤¾", + "lam": "लामà¥à¤¬à¤¾", + "lb": "लकà¥à¤à¥‡à¤‚बरà¥à¤—िश", + "lez": "लेà¤à¥à¤˜à¥€à¤¯à¤¨", + "lg": "गांडा", + "li": "लिंबूरà¥à¤—िश", + "lkt": "लाकोटा", + "ln": "लिंगाला", + "lo": "लाओ", + "lol": "मोंगो", + "loz": "लोà¤à¤¿", + "lrc": "उतà¥à¤¤à¤°à¥€ लà¥à¤¯à¥à¤°à¥€", + "lt": "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¨", + "lu": "लà¥à¤¯à¥‚बा-कटांगा", + "lua": "लà¥à¤¬à¤¾-लà¥à¤²à¥à¤†", + "lui": "लà¥à¤‡à¤¸à¥‡à¤¨à¥‹", + "lun": "लà¥à¤¨à¥à¤¡à¤¾", + "luo": "लà¥à¤¯à¥à¤“", + "lus": "मिà¤à¥‹", + "luy": "लà¥à¤¯à¥à¤‡à¤¯à¤¾", + "lv": "लातà¥à¤µà¥à¤¹à¤¿à¤¯à¤¨", + "mad": "मादà¥à¤°à¥€à¤¸", + "mag": "मगही", + "mai": "मैथिली", + "mak": "मकसà¥à¤¸à¤°", + "man": "मनà¥à¤¡à¤¿à¤¨à¥à¤—ो", + "mas": "मसाई", + "mdf": "मोकà¥à¤·", + "mdr": "मंडार", + "men": "मेनà¥à¤¡à¥‡", + "mer": "मेरू", + "mfe": "मोरिसà¥à¤¯à¥‡à¤¨", + "mg": "मलागसी", + "mga": "मिडल आयरिश", + "mgh": "माखà¥à¤µà¥à¤¹à¤¾-मीटà¥à¤Ÿà¥‹", + "mgo": "मीटा", + "mh": "मारà¥à¤¶à¤²à¥€à¤œ", + "mi": "माओरी", + "mic": "मिकमॅक", + "min": "मिनांगà¥à¤•ाबाउ", + "mk": "मॅसेडोनियन", + "ml": "मलà¥à¤¯à¤¾à¤³à¤®", + "mn": "मंगोलियन", + "mnc": "मानà¥à¤šà¥", + "mni": "मणिपà¥à¤°à¥€", + "moh": "मोहॉक", + "mos": "मोसà¥à¤¸à¥€", + "mr": "मराठी", + "ms": "मलय", + "mt": "मालà¥à¤Ÿà¤¿à¤œà¥", + "mua": "मà¥à¤‚डांग", + "mul": "à¤à¤•विध भाषा", + "mus": "कà¥à¤°à¥€à¤•", + "mwl": "मिरांडिजà¥", + "mwr": "मारवाडी", + "my": "बरà¥à¤®à¥€", + "myv": "à¤à¤°à¥à¤à¥à¤¯à¤¾", + "mzn": "माà¤à¤¾à¤¨à¤¦à¥‡à¤°à¤¾à¤¨à¥€", + "na": "नउरू", + "nan": "मिन नान चिनी", + "nap": "नेपोलिटान", + "naq": "नामा", + "nb": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¨ बोकमाल", + "nd": "उतà¥à¤¤à¤° देबेली", + "nds": "लो जरà¥à¤®à¤¨", + "nds_NL": "लो सॅकà¥à¤¸à¤¨", + "ne": "नेपाळी", + "new": "नेवारी", + "ng": "डोंगा", + "nia": "नियास", + "niu": "नियà¥à¤†à¤¨", + "nl": "डच", + "nl_BE": "फà¥à¤²à¥‡à¤®à¤¿à¤¶", + "nmg": "कà¥à¤µà¤¾à¤¸à¤¿à¤“", + "nn": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¨ नà¥à¤¯à¥‹à¤°à¥à¤¸à¥à¤•", + "nnh": "जिà¤à¤®à¥à¤¬à¥‚न", + "no": "नोरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¨", + "nog": "नोगाई", + "non": "पà¥à¤°à¤¾à¤¤à¤¨ नॉरà¥à¤¸", + "nqo": "à¤à¤¨à¥à¤•ो", + "nr": "दकà¥à¤·à¤¿à¤£à¤¾à¤¤à¥à¤¯ देबेली", + "nso": "उतà¥à¤¤à¤°à¥€ सोथो", + "nus": "नà¥à¤à¤°", + "nv": "नावाजो", + "nwc": "अभिजात नेवारी", + "ny": "नà¥à¤¯à¤¾à¤¨à¥à¤œà¤¾", + "nym": "नà¥à¤¯à¤¾à¤®à¤µà¥‡à¤à¥€", + "nyn": "नà¥à¤¯à¤¾à¤¨à¤•ोल", + "nyo": "नà¥à¤¯à¥‹à¤°à¥‹", + "nzi": "नà¥à¤à¤¿à¤®à¤¾", + "oc": "ऑकà¥à¤¸à¤¿à¤¤à¤¾à¤¨", + "oj": "ओजिबà¥à¤µà¤¾", + "om": "ओरोमो", + "or": "उडिया", + "os": "ओसà¥à¤¸à¥‡à¤Ÿà¤¿à¤•", + "osa": "ओसेज", + "ota": "ओटोमान तà¥à¤°à¥à¤•िश", + "pa": "पंजाबी", + "pag": "पंगासीनान", + "pal": "पहलवी", + "pam": "पामà¥à¤ªà¤¾à¤¨à¥à¤—ा", + "pap": "पापियामेनà¥à¤Ÿà¥‹", + "pau": "पालाउआन", + "pcm": "नायजिरिअन पिजिन", + "peo": "पà¥à¤°à¤¾à¤¤à¤¨ फारसी", + "phn": "फोनिशियन", + "pi": "पाली", + "pl": "पोलिश", + "pon": "पोहà¥à¤¨à¤ªà¤¿à¤¯à¤¨", + "prg": "पà¥à¤°à¥à¤¶à¤¿à¤¯à¤¨", + "pro": "पà¥à¤°à¤¾à¤¤à¤¨ पà¥à¤°à¥‹à¤µà¥à¤¹à¥‡à¤¨à¥à¤¸à¤²", + "ps": "पशà¥à¤¤à¥‹", + "pt": "पोरà¥à¤¤à¥à¤—ीज", + "pt_BR": "बà¥à¤°à¤¾à¤à¤¿à¤²à¤¿à¤¯à¤¨ पोरà¥à¤¤à¥à¤—ीज", + "pt_PT": "यà¥à¤°à¥‹à¤ªà¤¿à¤¯à¤¨ पोरà¥à¤¤à¥à¤—ीज", + "qu": "कà¥à¤µà¥‡à¤šà¥à¤†", + "quc": "कीशेइ", + "raj": "राजसà¥à¤¥à¤¾à¤¨à¥€", + "rap": "रापानà¥à¤ˆ", + "rar": "रारोटोंगन", + "rm": "रोमानà¥à¤¶", + "rn": "रà¥à¤¨à¥à¤¦à¥€", + "ro": "रोमानियन", + "ro_MD": "मोलà¥à¤¡à¤¾à¤µà¥à¤¹à¤¿à¤¯à¤¨", + "rof": "रोमà¥à¤¬à¥‹", + "rom": "रोमानी", + "root": "रूट", + "ru": "रशियन", + "rup": "अरोमानियन", + "rw": "किनà¥à¤¯à¤¾à¤°à¥à¤µà¤¾à¤¨à¥à¤¡à¤¾", + "rwk": "रवà¥à¤¹à¤¾", + "sa": "संसà¥à¤•ृत", + "sad": "सà¤à¤¡à¤µà¥‡", + "sah": "साखा", + "sam": "सामरिटान अरॅमिक", + "saq": "सांबà¥à¤°à¥‚", + "sas": "सासाक", + "sat": "संताली", + "sba": "गामà¥à¤¬à¥‡", + "sbp": "सांगà¥", + "sc": "सरà¥à¤¦à¤¿à¤¨à¤¿à¤¯à¤¨", + "scn": "सिसिलियन", + "sco": "सà¥à¤•ॉटà¥à¤¸", + "sd": "सिंधी", + "sdh": "दकà¥à¤·à¤¿à¤£à¥€ कà¥à¤°à¥à¤¦à¤¿à¤¶", + "se": "उतà¥à¤¤à¤°à¥€ सामी", + "seh": "सेना", + "sel": "सेलà¥à¤•प", + "ses": "कोयराबोरो सेनà¥à¤¨à¥€", + "sg": "सांगो", + "sga": "पà¥à¤°à¤¾à¤¤à¤¨ आयरिश", + "sh": "सरà¥à¤¬à¥‹-कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¨", + "shi": "ताशेलà¥à¤¹à¤¿à¤Ÿ", + "shn": "शॅन", + "si": "सिंहला", + "sid": "सिदामो", + "sk": "सà¥à¤²à¥‹à¤µà¥à¤¹à¤¾à¤•", + "sl": "सà¥à¤²à¥‹à¤µà¥à¤¹à¥‡à¤¨à¤¿à¤¯à¤¨", + "sm": "सामोअन", + "sma": "दकà¥à¤·à¤¿à¤£à¤¾à¤¤à¥à¤¯ सामी", + "smj": "लà¥à¤¯à¥à¤² सामी", + "smn": "इनारी सामी", + "sms": "सà¥à¤•ोलà¥à¤Ÿ सामी", + "sn": "शोना", + "snk": "सोनिनà¥à¤•े", + "so": "सोमाली", + "sog": "सोगà¥à¤¡à¤¿à¤à¤¨", + "sq": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¨", + "sr": "सरà¥à¤¬à¤¿à¤¯à¤¨", + "srn": "सà¥à¤°à¤¾à¤¨à¤¾à¤¨ टॉनà¥à¤—ो", + "srr": "सेरेर", + "ss": "सà¥à¤µà¤¾à¤¤à¥€", + "ssy": "साहो", + "st": "सेसोथो", + "su": "सà¥à¤‚दानीज", + "suk": "सà¥à¤•à¥à¤®à¤¾", + "sus": "सà¥à¤¸à¥", + "sux": "सà¥à¤®à¥‡à¤°à¤¿à¤¯à¤¨", + "sv": "सà¥à¤µà¥€à¤¡à¤¿à¤¶", + "sw": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€", + "sw_CD": "काà¤à¤—ो सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€", + "swb": "कोमोरियन", + "syc": "अभिजात सिरियाक", + "syr": "सिरियाक", + "ta": "तामिळ", + "te": "तेलगू", + "tem": "टिमà¥à¤¨à¥‡", + "teo": "तेसो", + "ter": "तेरेनो", + "tet": "तेतà¥à¤®", + "tg": "ताजिक", + "th": "थाई", + "ti": "तिगà¥à¤°à¤¿à¤¨à¥à¤¯à¤¾", + "tig": "टाइगà¥à¤°à¥‡", + "tiv": "तिव", + "tk": "तà¥à¤°à¥à¤•मेन", + "tkl": "टोकेलाऊ", + "tl": "टागालोग", + "tlh": "कà¥à¤²à¤¿à¤‚गोन", + "tli": "लिंगित", + "tmh": "तामाशेक", + "tn": "तà¥à¤¸à¥à¤µà¤¾à¤¨à¤¾", + "to": "टोंगन", + "tog": "नà¥à¤¯à¤¾à¤¸à¤¾ टोनà¥à¤—ा", + "tpi": "टोक पिसिन", + "tr": "तà¥à¤°à¥à¤•ी", + "trv": "तारोको", + "ts": "सोंगा", + "tsi": "सिमà¥à¤¶à¤¿à¤¯à¤¨", + "tt": "तातर", + "tum": "तà¥à¤®à¥à¤¬à¥à¤•ा", + "tvl": "टà¥à¤µà¤¾à¤²à¥", + "tw": "टà¥à¤µà¥€", + "twq": "तासावà¥à¤¹à¤¾à¤•", + "ty": "ताहितीयन", + "tyv": "टà¥à¤µà¥€à¤¨à¤¿à¤¯à¤¨", + "tzm": "मधà¥à¤¯ à¤à¤Ÿà¤²à¤¾à¤¸ तॅमॅà¤à¤¾à¤¯à¤Ÿ", + "udm": "उदमà¥à¤°à¥à¤¤", + "ug": "उइगà¥à¤°", + "uga": "यà¥à¤—ॅरिटिक", + "uk": "यà¥à¤•à¥à¤°à¥‡à¤¨à¤¿à¤¯à¤¨", + "umb": "उमà¥à¤¬à¥à¤¨à¥à¤¡à¥", + "und": "अजà¥à¤žà¤¾à¤¤ भाषा", + "ur": "उरà¥à¤¦à¥‚", + "uz": "उà¤à¥à¤¬à¥‡à¤•", + "vai": "वाई", + "ve": "वà¥à¤¹à¥‡à¤‚दा", + "vi": "वà¥à¤¹à¤¿à¤à¤¤à¤¨à¤¾à¤®à¥€", + "vo": "ओलापà¥à¤•", + "vot": "वॉटिक", + "vun": "वà¥à¤‚जो", + "wa": "वालून", + "wae": "वालसेर", + "wal": "वोलायता", + "war": "वारे", + "was": "वाशो", + "wbp": "वारà¥à¤²à¤ªà¤¿à¤°à¥€", + "wo": "वोलोफ", + "wuu": "वà¥à¤¹à¥‚ चिनी", + "xal": "कालà¥à¤®à¤¿à¤•", + "xh": "खोसा", + "xog": "सोगा", + "yao": "याओ", + "yap": "यापीस", + "yav": "यानगबेन", + "ybb": "येमबा", + "yi": "यिदà¥à¤¦à¤¿à¤¶", + "yo": "योरà¥à¤¬à¤¾", + "yue": "कà¤à¤Ÿà¥‹à¤¨à¥€à¤œ", + "za": "à¤à¥à¤†à¤‚ग", + "zap": "à¤à¥‡à¤ªà¥‹à¤Ÿà¥‡à¤•", + "zbl": "बà¥à¤²à¤¿à¤¸à¤¿à¤®à¥à¤¬à¥‰à¤²à¥à¤¸", + "zen": "à¤à¥‡à¤¨à¤¾à¤¨à¥à¤—ा", + "zgh": "पà¥à¤°à¤®à¤¾à¤£ मोरोकà¥à¤•न तॅमॅà¤à¤¾à¤¯à¤Ÿ", + "zh": "चीनी", + "zh_Hans": "सरलीकृत चीनी", + "zh_Hant": "पारंपारिक चीनी", + "zu": "à¤à¥à¤²à¥‚", + "zun": "à¤à¥à¤¨à¥€", + "zxx": "भाषावैजà¥à¤žà¤¾à¤¨à¤¿à¤• सामगà¥à¤°à¥€ नाही", + "zza": "à¤à¤¾à¤à¤¾" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ms.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ms.json new file mode 100644 index 0000000000000000000000000000000000000000..f0f98a73de80c8be2f2eccda54659ff0d512d4ac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ms.json @@ -0,0 +1,446 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "aa", + "ab": "Abkhazia", + "ace": "Aceh", + "ach": "Akoli", + "ada": "Adangme", + "ady": "Adyghe", + "ae": "Avestan", + "aeb": "Arab Tunisia", + "af": "Afrikaans", + "agq": "Aghem", + "ain": "Ainu", + "ak": "Akan", + "ale": "ale", + "alt": "Altai Selatan", + "am": "Amharic", + "an": "Aragon", + "anp": "anp", + "ar": "Arab", + "ar_001": "Arab Standard Moden", + "arn": "Mapuche", + "arp": "Arapaho", + "arq": "Arab Algeria", + "ary": "Arab Maghribi", + "arz": "Arab Mesir", + "as": "Assam", + "asa": "Asu", + "ast": "Asturia", + "av": "Avaric", + "awa": "Awadhi", + "ay": "Aymara", + "az": "Azerbaijan", + "ba": "Bashkir", + "bal": "Baluchi", + "ban": "Bali", + "bas": "Basaa", + "bax": "Bamun", + "bbj": "Ghomala", + "be": "Belarus", + "bej": "Beja", + "bem": "Bemba", + "bez": "Bena", + "bfd": "Bafut", + "bg": "Bulgaria", + "bgn": "Balochi Barat", + "bho": "Bhojpuri", + "bi": "Bislama", + "bin": "Bini", + "bkm": "Kom", + "bla": "Siksika", + "bm": "Bambara", + "bn": "Benggala", + "bo": "Tibet", + "bpy": "Bishnupriya", + "br": "Breton", + "brh": "Brahui", + "brx": "Bodo", + "bs": "Bosnia", + "bss": "Akoose", + "bua": "Buriat", + "bug": "Bugis", + "bum": "Bulu", + "byn": "Blin", + "byv": "Medumba", + "ca": "Catalonia", + "cay": "Cayuga", + "ce": "Chechen", + "ceb": "Cebuano", + "cgg": "Chiga", + "ch": "Chamorro", + "chk": "Chukese", + "chm": "Mari", + "cho": "Choctaw", + "chr": "Cherokee", + "chy": "Cheyenne", + "ckb": "Kurdi Sorani", + "co": "Corsica", + "cop": "Coptic", + "crh": "Turki Krimea", + "crs": "Perancis Seselwa Creole", + "cs": "Czech", + "cu": "Slavik Gereja", + "cv": "Chuvash", + "cy": "Wales", + "da": "Denmark", + "dak": "Dakota", + "dar": "Dargwa", + "dav": "Taita", + "de": "Jerman", + "de_AT": "Jerman Austria", + "de_CH": "Jerman Halus Switzerland", + "dgr": "Dogrib", + "dje": "Zarma", + "doi": "Dogri", + "dsb": "Sorbian Rendah", + "dua": "Duala", + "dv": "Divehi", + "dyo": "Jola-Fonyi", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embu", + "ee": "Ewe", + "efi": "Efik", + "eka": "Ekajuk", + "el": "Greek", + "en": "Inggeris", + "en_AU": "Inggeris Australia", + "en_CA": "Inggeris Kanada", + "en_GB": "Inggeris British", + "en_US": "Inggeris AS", + "eo": "Esperanto", + "es": "Sepanyol", + "es_419": "Sepanyol Amerika Latin", + "es_ES": "Sepanyol Eropah", + "es_MX": "Sepanyol Mexico", + "et": "Estonia", + "eu": "Basque", + "ewo": "Ewondo", + "fa": "Parsi", + "ff": "Fulah", + "fi": "Finland", + "fil": "Filipina", + "fj": "Fiji", + "fo": "Faroe", + "fon": "Fon", + "fr": "Perancis", + "fr_CA": "Perancis Kanada", + "fr_CH": "Perancis Switzerland", + "fur": "Friulian", + "fy": "Frisian Barat", + "ga": "Ireland", + "gaa": "Ga", + "gag": "Gagauz", + "gan": "Cina Gan", + "gba": "Gbaya", + "gbz": "Zoroastrian Dari", + "gd": "Scots Gaelic", + "gez": "Geez", + "gil": "Kiribati", + "gl": "Galicia", + "glk": "Gilaki", + "gn": "Guarani", + "gor": "Gorontalo", + "grc": "Greek Purba", + "gsw": "Jerman Switzerland", + "gu": "Gujerat", + "guz": "Gusii", + "gv": "Manx", + "gwi": "Gwichʼin", + "ha": "Hausa", + "hak": "Cina Hakka", + "haw": "Hawaii", + "he": "Ibrani", + "hi": "Hindi", + "hil": "Hiligaynon", + "hmn": "Hmong", + "hr": "Croatia", + "hsb": "Sorbian Atas", + "hsn": "Cina Xiang", + "ht": "Haiti", + "hu": "Hungary", + "hup": "Hupa", + "hy": "Armenia", + "hz": "Herero", + "ia": "Interlingua", + "iba": "Iban", + "ibb": "Ibibio", + "id": "Indonesia", + "ie": "Interlingue", + "ig": "Igbo", + "ii": "Sichuan Yi", + "ilo": "Iloko", + "inh": "Ingush", + "io": "Ido", + "is": "Iceland", + "it": "Itali", + "iu": "Inuktitut", + "ja": "Jepun", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jv": "Jawa", + "ka": "Georgia", + "kab": "Kabyle", + "kac": "Kachin", + "kaj": "Jju", + "kam": "Kamba", + "kbd": "Kabardian", + "kbl": "Kanembu", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Kabuverdianu", + "kfo": "Koro", + "kg": "Kongo", + "kha": "Khasi", + "khq": "Koyra Chiini", + "khw": "Khowar", + "ki": "Kikuya", + "kj": "Kuanyama", + "kk": "Kazakhstan", + "kkj": "Kako", + "kl": "Kalaallisut", + "kln": "Kalenjin", + "km": "Khmer", + "kmb": "Kimbundu", + "kn": "Kannada", + "ko": "Korea", + "koi": "Komi-Permyak", + "kok": "Konkani", + "kpe": "Kpelle", + "kr": "Kanuri", + "krc": "Karachay-Balkar", + "krl": "Karelian", + "kru": "Kurukh", + "ks": "Kashmir", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Colognian", + "ku": "Kurdish", + "kum": "Kumyk", + "kv": "Komi", + "kw": "Cornish", + "ky": "Kirghiz", + "la": "Latin", + "lad": "Ladino", + "lag": "Langi", + "lah": "Lahnda", + "lb": "Luxembourg", + "lez": "Lezghian", + "lg": "Ganda", + "li": "Limburgish", + "lkt": "Lakota", + "ln": "Lingala", + "lo": "Laos", + "loz": "Lozi", + "lrc": "Luri Utara", + "lt": "Lithuania", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lun": "Lunda", + "luo": "Luo", + "lus": "Mizo", + "luy": "Luyia", + "lv": "Latvia", + "mad": "Madura", + "maf": "Mafa", + "mag": "Magahi", + "mai": "Maithili", + "mak": "Makasar", + "mas": "Masai", + "mde": "Maba", + "mdf": "Moksha", + "men": "Mende", + "mer": "Meru", + "mfe": "Morisyen", + "mg": "Malagasy", + "mgh": "Makhuwa-Meetto", + "mgo": "Meta’", + "mh": "Marshall", + "mi": "Maori", + "mic": "Micmac", + "min": "Minangkabau", + "mk": "Macedonia", + "ml": "Malayalam", + "mn": "Mongolia", + "mni": "Manipuri", + "moh": "Mohawk", + "mos": "Mossi", + "mr": "Marathi", + "ms": "Bahasa Melayu", + "mt": "Malta", + "mua": "Mundang", + "mul": "Pelbagai Bahasa", + "mus": "Creek", + "mwl": "Mirandese", + "my": "Burma", + "mye": "Myene", + "myv": "Erzya", + "mzn": "Mazanderani", + "na": "Nauru", + "nan": "Cina Min Nan", + "nap": "Neapolitan", + "naq": "Nama", + "nb": "BokmÃ¥l Norway", + "nd": "Ndebele Utara", + "nds": "Jerman Rendah", + "nds_NL": "Saxon Rendah", + "ne": "Nepal", + "new": "Newari", + "ng": "Ndonga", + "nia": "Nias", + "niu": "Niu", + "nl": "Belanda", + "nl_BE": "Flemish", + "nmg": "Kwasio", + "nn": "Nynorsk Norway", + "nnh": "Ngiemboon", + "no": "Norway", + "nog": "Nogai", + "nqo": "N’ko", + "nr": "Ndebele Selatan", + "nso": "Sotho Utara", + "nus": "Nuer", + "nv": "Navajo", + "ny": "Nyanja", + "nyn": "Nyankole", + "oc": "Occitania", + "om": "Oromo", + "or": "Oriya", + "os": "Ossete", + "pa": "Punjabi", + "pag": "Pangasinan", + "pam": "Pampanga", + "pap": "Papiamento", + "pau": "Palauan", + "pcm": "Nigerian Pidgin", + "pl": "Poland", + "prg": "Prussian", + "ps": "Pashto", + "pt": "Portugis", + "pt_BR": "Portugis Brazil", + "pt_PT": "Portugis Eropah", + "qu": "Quechua", + "quc": "Kʼicheʼ", + "rap": "Rapanui", + "rar": "Rarotonga", + "rm": "Romansh", + "rn": "Rundi", + "ro": "Romania", + "ro_MD": "Moldavia", + "rof": "Rombo", + "root": "Root", + "ru": "Rusia", + "rup": "Aromanian", + "rw": "Kinyarwanda", + "rwk": "Rwa", + "sa": "Sanskrit", + "sad": "Sandawe", + "sah": "Sakha", + "saq": "Samburu", + "sat": "Santali", + "sba": "Ngambay", + "sbp": "Sangu", + "sc": "Sardinia", + "scn": "Sicili", + "sco": "Scots", + "sd": "Sindhi", + "sdh": "Kurdish Selatan", + "se": "Sami Utara", + "see": "Seneca", + "seh": "Sena", + "ses": "Koyraboro Senni", + "sg": "Sango", + "sh": "SerboCroatia", + "shi": "Tachelhit", + "shn": "Shan", + "shu": "Arab Chadian", + "si": "Sinhala", + "sk": "Slovak", + "sl": "Slovenia", + "sm": "Samoa", + "sma": "Sami Selatan", + "smj": "Lule Sami", + "smn": "Inari Sami", + "sms": "Skolt Sami", + "sn": "Shona", + "snk": "Soninke", + "so": "Somali", + "sq": "Albania", + "sr": "Serbia", + "srn": "Sranan Tongo", + "ss": "Swati", + "ssy": "Saho", + "st": "Sotho Selatan", + "su": "Sunda", + "suk": "Sukuma", + "sv": "Sweden", + "sw": "Swahili", + "sw_CD": "Congo Swahili", + "swb": "Comoria", + "syr": "Syriac", + "ta": "Tamil", + "te": "Telugu", + "tem": "Timne", + "teo": "Teso", + "tet": "Tetum", + "tg": "Tajik", + "th": "Thai", + "ti": "Tigrinya", + "tig": "Tigre", + "tk": "Turkmen", + "tlh": "Klingon", + "tly": "Talysh", + "tn": "Tswana", + "to": "Tonga", + "tpi": "Tok Pisin", + "tr": "Turki", + "trv": "Taroko", + "ts": "Tsonga", + "tt": "Tatar", + "tum": "Tumbuka", + "tvl": "Tuvalu", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Tahiti", + "tyv": "Tuvinian", + "tzm": "Tamazight Atlas Tengah", + "udm": "Udmurt", + "ug": "Uyghur", + "uk": "Ukraine", + "umb": "Umbundu", + "und": "Bahasa Tidak Diketahui", + "ur": "Urdu", + "uz": "Uzbekistan", + "vai": "Vai", + "ve": "Venda", + "vi": "Vietnam", + "vo": "Volapük", + "vun": "Vunjo", + "wa": "Walloon", + "wae": "Walser", + "wal": "Wolaytta", + "war": "Waray", + "wbp": "Warlpiri", + "wo": "Wolof", + "wuu": "Cina Wu", + "xal": "Kalmyk", + "xh": "Xhosa", + "xog": "Soga", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "Yiddish", + "yo": "Yoruba", + "yue": "Kantonis", + "zgh": "Tamazight Maghribi Standard", + "zh": "Cina", + "zh_Hans": "Cina Ringkas", + "zh_Hant": "Cina Tradisional", + "zu": "Zulu", + "zun": "Zuni", + "zxx": "Tiada kandungan linguistik", + "zza": "Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mt.json new file mode 100644 index 0000000000000000000000000000000000000000..6cc0838692832b6ada927baa4eeb8798cbb3e234 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/mt.json @@ -0,0 +1,506 @@ +{ + "Version": "2.1.28.76", + "Names": { + "aa": "Afar", + "ab": "Abkażjan", + "ace": "AÄ‹iniż", + "ach": "Akoli", + "ada": "Adangme", + "ady": "Adyghe", + "ae": "Avestan", + "af": "Afrikans", + "afh": "Afriħili", + "agq": "Aghem", + "ain": "Ajnu", + "ak": "Akan", + "akk": "Akkadjen", + "ale": "Aleut", + "alt": "Altai tan-Nofsinhar", + "am": "Amhariku", + "an": "Aragoniż", + "ang": "Ingliż Antik", + "anp": "Angika", + "ar": "Għarbi", + "ar_001": "Għarbi Standard Modern", + "arc": "Aramajk", + "arn": "Mapuche", + "arp": "Arapaho", + "arw": "Arawak", + "as": "Assamiż", + "asa": "Asu", + "ast": "Asturian", + "av": "Avarik", + "awa": "Awadhi", + "ay": "Aymara", + "az": "AżerbajÄ¡ani", + "ba": "Bashkir", + "bal": "BaluÄ‹i", + "ban": "Baliniż", + "bas": "Basa", + "be": "Belarussu", + "bej": "Beja", + "bem": "Bemba", + "bez": "Bena", + "bg": "Bulgaru", + "bho": "Bhojpuri", + "bi": "Bislama", + "bik": "Bikol", + "bin": "Bini", + "bla": "Siksika", + "bm": "Bambara", + "bn": "Bengali", + "bo": "Tibetjan", + "br": "Breton", + "bra": "Braj", + "brx": "Bodo", + "bs": "Bożnijaku", + "bua": "Burjat", + "bug": "Buginese", + "byn": "Blin", + "ca": "Katalan", + "cad": "Kaddo", + "car": "Karib", + "cch": "Atsam", + "ce": "Chechen", + "ceb": "Cebuano", + "cgg": "Chiga", + "ch": "Chamorro", + "chb": "Chibcha", + "chg": "Chagatai", + "chk": "ÄŠukiż", + "chm": "Mari", + "chn": "Chinook Jargon", + "cho": "Choctaw", + "chp": "ÄŠipewjan", + "chr": "Cherokee", + "chy": "Cheyenne", + "ckb": "Kurd ÄŠentrali", + "co": "Korsiku", + "cop": "Koptiku", + "cr": "Cree", + "crh": "Tork tal-Krimea", + "crs": "FranÄ‹iż tas-Seselwa Creole", + "cs": "ÄŠek", + "csb": "Kashubian", + "cu": "Slaviku tal-Knisja", + "cv": "Chuvash", + "cy": "Welsh", + "da": "Daniż", + "dak": "Dakota", + "dar": "Dargwa", + "dav": "Taita", + "de": "Ä ermaniż", + "de_AT": "Ä ermaniż Awstrijak", + "de_CH": "Ä ermaniż Å»vizzeru", + "del": "Delawerjan", + "den": "Slav", + "dgr": "Dogrib", + "din": "Dinka", + "dje": "Zarma", + "doi": "Dogri", + "dsb": "Sorbjan Komuni", + "dua": "Dwala", + "dum": "Olandiż Medjevali", + "dv": "Divehi", + "dyo": "Jola-Fonyi", + "dyu": "Dyula", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embu", + "ee": "Ewe", + "efi": "Efik", + "egy": "EÄ¡izzjan (Antik)", + "eka": "Ekajuk", + "el": "Grieg", + "elx": "Elamit", + "en": "Ingliż", + "en_AU": "Ingliż Awstraljan", + "en_CA": "Ingliż Kanadiż", + "en_GB": "Ingliż Brittaniku", + "en_US": "Ingliż Amerikan", + "enm": "Ingliż Medjevali", + "eo": "Esperanto", + "es": "Spanjol", + "es_419": "Spanjol Latin Amerikan", + "es_ES": "Spanjol Ewropew", + "es_MX": "Spanjol tal-Messiku", + "et": "Estonjan", + "eu": "Bask", + "ewo": "Ewondo", + "fa": "Persjan", + "fan": "Fang", + "fat": "Fanti", + "ff": "Fulah", + "fi": "Finlandiż", + "fil": "Filippin", + "fj": "FiÄ¡jan", + "fo": "Faroese", + "fon": "Fon", + "fr": "FranÄ‹iż", + "fr_CA": "FranÄ‹iż Kanadiż", + "fr_CH": "FranÄ‹iż Å»vizzeru", + "frm": "FranÄ‹iż Medjevali", + "fro": "FranÄ‹iż Antik", + "fur": "Frijuljan", + "fy": "Frisian tal-Punent", + "ga": "Irlandiż", + "gaa": "Ga", + "gay": "Gayo", + "gba": "Gbaya", + "gd": "Galliku Skoċċiż", + "gez": "Geez", + "gil": "Gilbertjan", + "gl": "GaliÄ‹jan", + "gmh": "Ä ermaniż Medjevali Pulit", + "gn": "Guarani", + "goh": "Ä ermaniż Antik, Pulit", + "gon": "Gondi", + "gor": "Gorontalo", + "got": "Gotiku", + "grb": "Grebo", + "grc": "Grieg, Antik", + "gsw": "Ä ermaniż tal-Iżvizzera", + "gu": "Gujarati", + "guz": "Gusii", + "gv": "Manx", + "gwi": "GwiÄ‹in", + "ha": "Hausa", + "hai": "Haida", + "haw": "Ħawajjan", + "he": "Ebrajk", + "hi": "Hindi", + "hil": "Hiligaynon", + "hit": "Hittite", + "hmn": "Hmong", + "ho": "Hiri Motu", + "hr": "Kroat", + "hsb": "Sorbjan ta’ Fuq", + "ht": "Creole ta’ Haiti", + "hu": "Ungeriż", + "hup": "Hupa", + "hy": "Armen", + "hz": "Herero", + "ia": "Interlingua", + "iba": "Iban", + "ibb": "Ibibio", + "id": "Indoneżjan", + "ie": "Interlingue", + "ig": "Igbo", + "ii": "Sichuan Yi", + "ik": "Inupjak", + "ilo": "Iloko", + "inh": "Ingush", + "io": "Ido", + "is": "Iżlandiż", + "it": "Taljan", + "iu": "Inuktitut", + "ja": "Ä appuniż", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jpr": "Lhudi-Persjan", + "jrb": "Lhudi-Għarbi", + "jv": "Ä avaniż", + "ka": "Ä orÄ¡jan", + "kaa": "Kara-Kalpak", + "kab": "Kabuljan", + "kac": "Kachin", + "kaj": "Jju", + "kam": "Kamba", + "kaw": "Kawi", + "kbd": "Kabardian", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Cape Verdjan", + "kfo": "Koro", + "kg": "Kongo", + "kha": "Khasi", + "kho": "Kotaniż", + "khq": "Koyra Chiini", + "ki": "Kikuju", + "kj": "Kuanyama", + "kk": "Każak", + "kkj": "Kako", + "kl": "Kalallisut", + "kln": "Kalenjin", + "km": "Khmer", + "kmb": "Kimbundu", + "kn": "Kannada", + "ko": "Korean", + "kok": "Konkani", + "kos": "Kosrejan", + "kpe": "Kpelle", + "kr": "Kanuri", + "krc": "Karachay-Balkar", + "krl": "Kareljan", + "kru": "Kurux", + "ks": "Kashmiri", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Kolonjan", + "ku": "Kurd", + "kum": "Kumyk", + "kut": "Kutenaj", + "kv": "Komi", + "kw": "Korniku", + "ky": "Kirgiż", + "la": "Latin", + "lad": "Ladino", + "lag": "Langi", + "lah": "Lahnda", + "lam": "Lamba", + "lb": "Lussemburgiż", + "lez": "Leżgjan", + "lg": "Ganda", + "li": "Limburgish", + "lkt": "Lakota", + "ln": "Lingaljan", + "lo": "Laosjan", + "lol": "Mongo", + "loz": "Lożi", + "lrc": "Luri tat-Tramuntana", + "lt": "Litwan", + "lu": "Luba-Katanga", + "lua": "Luba-Luluwa", + "lui": "Luiseno", + "lun": "Lunda", + "luo": "Luo", + "lus": "Mizo", + "luy": "Luyia", + "lv": "Latvjan", + "mad": "Maduriż", + "mag": "Magahi", + "mai": "Maithili", + "mak": "Makasar", + "man": "Mandingo", + "mas": "Masai", + "mdf": "Moksha", + "mdr": "Mandar", + "men": "Mende", + "mer": "Meru", + "mfe": "Morisyen", + "mg": "Malagasy", + "mga": "Irlandiż Medjevali", + "mgh": "Makhuwa-Meetto", + "mgo": "Metà", + "mh": "Marshalljaniż", + "mi": "Maori", + "mic": "Micmac", + "min": "Minangkabau", + "mk": "MaÄ‹edonjan", + "ml": "Malayalam", + "mn": "Mongoljan", + "mnc": "Manchu", + "mni": "Manipuri", + "moh": "Mohawk", + "mos": "Mossi", + "mr": "Marathi", + "ms": "Malay", + "mt": "Malti", + "mua": "Mundang", + "mul": "Lingwi Diversi", + "mus": "Kriek", + "mwl": "Mirandiż", + "mwr": "Marwari", + "my": "Burmiż", + "myv": "Erzya", + "mzn": "Mazanderani", + "na": "Naurujan", + "nap": "Naplitan", + "naq": "Nama", + "nb": "Bokmal NorveÄ¡iż", + "nd": "Ndebeli tat-Tramuntana", + "nds": "Ä ermaniż Komuni", + "nds_NL": "Sassonu Komuni", + "ne": "Nepaliż", + "new": "Newari", + "ng": "Ndonga", + "nia": "Nijas", + "niu": "Niuean", + "nl": "Olandiż", + "nl_BE": "Fjamming", + "nmg": "Kwasio", + "nn": "Ninorsk NorveÄ¡iż", + "nnh": "Ngiemboon", + "no": "NorveÄ¡iż", + "nog": "Nogai", + "non": "Nors Antik", + "nqo": "N’Ko", + "nr": "Ndebele tan-Nofsinhar", + "nso": "Soto tat-Tramuntana", + "nus": "Nuer", + "nv": "Navajo", + "nwc": "Newari Klassiku", + "ny": "Nyanja", + "nym": "Njamweżi", + "nyn": "Nyankole", + "nyo": "Nyoro", + "nzi": "Nzima", + "oc": "Oċċitan", + "oj": "OÄ¡ibwa", + "om": "Oromo", + "or": "Odia", + "os": "Ossettiku", + "osa": "OsaÄ¡jan", + "ota": "Tork Ottoman", + "pa": "Punjabi", + "pag": "Pangasinjan", + "pal": "Pahlavi", + "pam": "Pampanga", + "pap": "Papiamento", + "pau": "Palawjan", + "pcm": "Pidgin NiÄ¡erjan", + "peo": "Persjan Antik", + "phn": "FeniÄ‹ju", + "pi": "Pali", + "pl": "Pollakk", + "pon": "Ponpejan", + "prg": "Prussu", + "pro": "Provenzal Antik", + "ps": "Pashto", + "pt": "Portugiż", + "pt_BR": "Portugiż tal-Brażil", + "pt_PT": "Portugiż Ewropew", + "qu": "Quechua", + "quc": "K’iche’", + "raj": "RaÄ¡astani", + "rap": "Rapanwi", + "rar": "Rarotongani", + "rm": "Romanz", + "rn": "Rundi", + "ro": "Rumen", + "ro_MD": "Moldovan", + "rof": "Rombo", + "rom": "Romanesk", + "root": "Root", + "ru": "Russu", + "rup": "Aromanjan", + "rw": "Kinjarwanda", + "rwk": "Rwa", + "sa": "Sanskrit", + "sad": "Sandawe", + "sah": "Sakha", + "sam": "Samaritan Aramajk", + "saq": "Samburu", + "sas": "Sasak", + "sat": "Santali", + "sba": "Ngambay", + "sbp": "Sangu", + "sc": "Sardinjan", + "scn": "Sqalli", + "sco": "Skoċċiż", + "sd": "Sindhi", + "se": "Sami tat-Tramuntana", + "seh": "Sena", + "sel": "Selkup", + "ses": "Koyraboro Senni", + "sg": "Sango", + "sga": "Irlandiż Antik", + "sh": "Serbo-Kroat", + "shi": "Tachelhit", + "shn": "Shan", + "si": "Sinhala", + "sid": "Sidamo", + "sk": "Slovakk", + "sl": "Sloven", + "sm": "Samoan", + "sma": "Sami tan-Nofsinhar", + "smj": "Lule Sami", + "smn": "Inari Sami", + "sms": "Skolt Sami", + "sn": "Shona", + "snk": "Soninke", + "so": "Somali", + "sog": "Sogdien", + "sq": "Albaniż", + "sr": "Serb", + "srn": "Sranan Tongo", + "srr": "Serer", + "ss": "Swati", + "ssy": "Saho", + "st": "Soto tan-Nofsinhar", + "su": "Sundaniż", + "suk": "Sukuma", + "sus": "Susu", + "sux": "Sumerjan", + "sv": "Å»vezja", + "sw": "Swahili", + "sw_CD": "Swahili tar-Repubblika Demokratika tal-Kongo", + "swb": "Komorjan", + "syr": "Sirjan", + "ta": "Tamil", + "te": "Telugu", + "tem": "Timne", + "teo": "Teso", + "ter": "Tereno", + "tet": "Tetum", + "tg": "Tajik", + "th": "Tajlandiż", + "ti": "Tigrinya", + "tig": "Tigre", + "tiv": "Tiv", + "tk": "Turkmeni", + "tkl": "Tokelau", + "tl": "Tagalog", + "tlh": "Klingon", + "tli": "Tlingit", + "tmh": "Tamashek", + "tn": "Tswana", + "to": "Tongan", + "tog": "Nyasa Tonga", + "tpi": "Tok Pisin", + "tr": "Tork", + "trv": "Taroko", + "ts": "Tsonga", + "tsi": "Tsimshian", + "tt": "Tatar", + "tum": "Tumbuka", + "tvl": "Tuvalu", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Taħitjan", + "tyv": "Tuvinjan", + "tzm": "Tamazight tal-Atlas ÄŠentrali", + "udm": "Udmurt", + "ug": "Uyghur", + "uga": "Ugaritiku", + "uk": "Ukren", + "umb": "Umbundu", + "und": "Lingwa Mhix Magħrufa", + "ur": "ur", + "uz": "Uzbek", + "vai": "Vai", + "ve": "Venda", + "vi": "Vjetnamiż", + "vo": "Volapuk", + "vot": "Votik", + "vun": "Vunjo", + "wa": "Walloon", + "wae": "Walser", + "wal": "Walamo", + "war": "Waray", + "was": "Washo", + "wo": "Wolof", + "xal": "Kalmyk", + "xh": "Xhosa", + "xog": "Soga", + "yao": "Yao", + "yap": "Yapese", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "Yiddish", + "yo": "Yoruba", + "yue": "Kantoniż", + "za": "Zhuang", + "zap": "Zapotec", + "zen": "Zenaga", + "zgh": "Tamazight Standard tal-Marokk", + "zh": "ÄŠiniż", + "zh_Hans": "ÄŠiniż Simplifikat", + "zh_Hant": "ÄŠiniż Tradizzjonali", + "zu": "Zulu", + "zun": "Zuni", + "zxx": "Bla kontenut lingwistiku", + "zza": "Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/my.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/my.json new file mode 100644 index 0000000000000000000000000000000000000000..cfa1930542ce919bc598e26b59d64ca083c87e1d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/my.json @@ -0,0 +1,416 @@ +{ + "Version": "2.1.30.50", + "Names": { + "aa": "အာဖာ", + "ab": "အဘ်á€á€«á€‡á€®á€›á€¬", + "ace": "အာá€á€»á€±á€¸", + "ada": "ဒန်မဲ", + "ady": "အဒိုင်ဂီ", + "af": "á€á€±á€¬á€„်အာဖရိက", + "agq": "အာဂ်ဟိန်း", + "ain": "အိန်နု", + "ak": "အာကန်", + "ale": "အာလီယု", + "alt": "á€á€±á€¬á€„် အာလ်á€á€­á€¯á€„်း", + "am": "အမ်ဟာရစ်á€á€º", + "an": "အာရာဂွန်", + "ang": "အင်ဂလို ဆက္ကစွန်", + "anp": "အန်ဂီကာ", + "ar": "အာရဗီ", + "arn": "မာပုá€á€»á€®", + "arp": "အာရာပါဟို", + "as": "အာသံ", + "asa": "အာစု", + "ast": "အက်စá€á€°á€›á€®á€šá€”်း", + "av": "အာဗာရစ်á€á€º", + "awa": "အာá€á€«á€’ီ", + "ay": "အိုင်မာရ", + "az": "အဇာဘိုင်ဂျန်", + "ba": "ဘက်ရှ်ကာ", + "ban": "ဘာလီ", + "bas": "ဘာဆာ", + "be": "ဘီလာရုဇ်", + "bem": "ဘိန်ဘာ", + "bez": "ဘီနာ", + "bg": "ဘူလ်ဂေးရီးယား", + "bgn": "အနောက် ဘဲလိုá€á€»á€®", + "bho": "ဘို့ဂျ်ပူရီ", + "bi": "ဘစ်စ်လာမာ", + "bin": "ဘီနီ", + "bla": "စစ္စီကာ", + "bm": "ဘန်ဘာရာ", + "bn": "ဘင်္ဂါလီ", + "bo": "á€á€­á€˜á€€á€º", + "br": "ဘရီá€á€½á€”်", + "brx": "ဗိုဒို", + "bs": "ဘော့စ်နီးယား", + "bug": "ဘူဂစ်စ်", + "byn": "ဘလင်", + "ca": "ကá€á€ºá€á€œá€”်", + "ce": "á€á€»á€€á€ºá€á€»á€”်း", + "ceb": "စီဗူအာနို", + "cgg": "á€á€»á€®á€‚ါ", + "ch": "á€á€»á€™á€­á€¯á€›á€­á€¯", + "chk": "á€á€»á€°á€€á€®á€¸á€…်", + "chm": "မာရီ", + "cho": "á€á€»á€±á€¬á€·á€á€­á€¯", + "chr": "á€á€»á€¬á€›á€­á€¯á€€á€®", + "chy": "á€á€»á€±á€šá€”်း", + "ckb": "ဆိုရာနီ", + "co": "á€á€­á€¯á€…ီကန်", + "cr": "á€á€›á€®á€¸", + "crs": "á€á€›á€®á€¡á€­á€¯á€œá€®", + "cs": "á€á€»á€€á€º", + "cu": "á€á€»á€•်á€á€»á€º စလာဗစ်", + "cv": "á€á€»á€°á€—က်ရှ်", + "cy": "á€á€±á€œ", + "da": "ဒိန်းမá€á€º", + "dak": "ဒါကိုá€á€¬", + "dar": "ဒါဂ်á€á€«", + "dav": "á€á€­á€¯á€„်á€á€¬", + "de": "ဂျာမန်", + "de_AT": "ဩစá€á€¼á€®á€¸á€šá€¬á€¸ ဂျာမန်", + "de_CH": "အလီမဲန်နစ် ဂျာမန်", + "del": "ဒယ်လာá€á€²á€œá€º", + "dgr": "ဒေါ့ဂ်ရစ်ဘ်", + "dje": "ဇာမာ", + "dsb": "အနိမ့် ဆိုဘီယန်း", + "dua": "ဒူအလာ", + "dum": "အလယ်ပိုင်း ဒá€á€ºá€á€»á€º", + "dv": "ဒီဗာဟီ", + "dyo": "ဂျိုလာ-ဖွန်ရီ", + "dz": "ဒဇွန်ကာ", + "dzg": "ဒဇာဂါ", + "ebu": "အမ်ဘူ", + "ee": "အီá€á€®", + "efi": "အာဖိá€á€º", + "egy": "ရှေးဟောင်း အီဂျစ်", + "eka": "အီကာဂျုá€á€º", + "el": "ဂရိ", + "en": "အင်္ဂလိပ်", + "en_AU": "ဩစá€á€¼á€±á€¸á€œá€»á€¾ အင်္ဂလိပ်", + "en_CA": "ကနေဒါ အင်္ဂလိပ်", + "en_GB": "ဗြိá€á€­á€žá€»á€¾ အင်္ဂလိပ်", + "en_US": "အမေရိကန် အင်္ဂလိပ်", + "enm": "အလယ်ပိုင်း အင်္ဂလိပ်", + "eo": "အက်စ်ပရန်á€á€­á€¯", + "es": "စပိန်", + "es_ES": "စပိန် (ဥရောပ)", + "et": "အက်စ်á€á€­á€¯á€¸á€”ီးယား", + "eu": "ဘာစ်á€á€º", + "ewo": "အီá€á€”်ဒို", + "fa": "ပါရှန်", + "ff": "ဖူလာ", + "fi": "ဖင်လန်", + "fil": "ဖိလစ်ပိုင်", + "fj": "ဖီဂျီ", + "fo": "ဖာရို", + "fon": "ဖော်န်", + "fr": "ပြင်သစ်", + "fr_CA": "ကနေဒါ ပြင်သစ်", + "fr_CH": "ဆွစ် ပြင်သစ်", + "frm": "အလယ်ပိုင်း ပြင်သစ်", + "fro": "ဖရန်စီစ်", + "frr": "မြောက် ဖရီစီရန်", + "frs": "အရှေ့ ဖရီစီရန်", + "fur": "ဖရူလီယန်း", + "fy": "အနောက် ဖရီစီရန်", + "ga": "အိုင်းရစ်ရှ်", + "gaa": "ဂါ", + "gag": "ဂါဂုဇ်", + "gd": "စကော့á€á€…်ရှ် ဂေးလစ်á€á€º", + "gez": "ဂီးဇ်", + "gil": "ကာရီဗာá€á€®", + "gl": "ဂါလီစီယာ", + "gmh": "အလယ်ပိုင်း အမြင့် ဂျာမန်", + "gn": "ဂူအာရာနီ", + "gor": "ဂိုရိုá€á€¬á€œá€­á€¯", + "grc": "ရှေးဟောင်း ဂရိ", + "gsw": "ဆွစ် ဂျာမန်", + "gu": "ဂူဂျာရသီ", + "guz": "ဂူစီး", + "gv": "မန်းဇ်", + "gwi": "ဂွစ်á€á€»á€„်", + "ha": "ဟာဥစာ", + "haw": "ဟာá€á€­á€¯á€„်ယီ", + "he": "ဟီးဘရူး", + "hi": "ဟိန္ဒူ", + "hil": "ဟီလီဂေနွန်", + "hmn": "မုံ", + "hr": "á€á€›á€­á€¯á€¡á€±á€¸á€›á€¾á€¬á€¸", + "hsb": "ဆက္ကဆိုနီ", + "ht": "ဟေá€á€®", + "hu": "ဟန်ဂေရီ", + "hup": "ဟူပါ", + "hy": "အာမေးနီးယား", + "hz": "ဟီရဲရို", + "ia": "အင်á€á€¬á€œá€„်ဂွါ", + "iba": "အီဗန်", + "ibb": "အီဘီဘီယို", + "id": "အင်ဒိုနီးရှား", + "ig": "အစ္ဂဘို", + "ii": "စီá€á€»á€½á€™á€º ရီ", + "ilo": "အီလိုကို", + "inh": "အင်ဂုရှ်", + "io": "အီဒို", + "is": "အိုက်စ်လန်", + "it": "အီá€á€œá€®", + "iu": "အီနုá€á€ºá€á€®á€á€¯", + "ja": "ဂျပန်", + "jbo": "လိုဂျ်ဘန်", + "jgo": "ဂွမ်ဘာ", + "jmc": "မá€á€»á€¬á€™á€®", + "jpr": "ဂျူဒီယို-ပါရှန်", + "jrb": "ဂျူဒီယို-အာရဗီ", + "jv": "ဂျာဗား", + "ka": "ဂျော်ဂျီယာ", + "kab": "ကဘိုင်လ်", + "kac": "ကá€á€»á€„်", + "kaj": "ဂျူအူ", + "kam": "ကမ်ဘာ", + "kbd": "ကဘာဒင်", + "kcg": "á€á€­á€¯á€„်အပ်", + "kde": "မာá€á€½á€”်ဒီ", + "kea": "ကဘူဗာဒီအာနူ", + "kfo": "ကိုရို", + "kg": "ကွန်ဂို", + "kha": "á€á€«á€…ီ", + "khq": "ကိုရာ á€á€»á€®á€¡á€®á€”ီ", + "ki": "ကီကူယူ", + "kj": "ကွန်းယာမာ", + "kk": "ကာဇာá€á€º", + "kkj": "ကကို", + "kl": "ကလာအ်လီဆပ်", + "kln": "ကလန်ဂျင်", + "km": "á€á€™á€¬", + "kmb": "ကင်ဘွန်ဒူ", + "kn": "ကန္နာဒါ", + "ko": "ကိုရီးယား", + "koi": "ကိုမီ-ပါမြက်", + "kok": "ကွန်ကနီ", + "kpe": "ကပ်ပဲလ်", + "kr": "ကနူရီ", + "krc": "ကရာá€á€»á€±á€¸-ဘာကာ", + "krl": "ကာရီလီယန်", + "kru": "ကူရုပ်á€á€º", + "ks": "ကက်ရှ်မီးယား", + "ksb": "ရှန်ဘာလာ", + "ksf": "ဘာဖီအာ", + "ksh": "ကိုလိုနီယန်း", + "ku": "ကဒ်", + "kum": "ကွမ်မိုက်", + "kv": "ကိုမီ", + "kw": "á€á€­á€¯á€”ီရှ်", + "ky": "ကာဂျစ်", + "la": "လက်á€á€„်", + "lad": "လာဒီနို", + "lag": "လန်ဂီ", + "lb": "လူဇင်ဘá€á€º", + "lez": "လက်ဇ်ဂီးယား", + "lg": "ဂန်ဒါ", + "li": "လင်ဘာဂစ်ရှ်", + "lkt": "လာကိုá€á€¬", + "ln": "လင်ဂါလာ", + "lo": "လာအို", + "loz": "လိုဇီ", + "lrc": "မြောက်လူရီ", + "lt": "လစ်သူá€á€±á€¸á€”ီးယား", + "lu": "လူဘာ-ကá€á€”်ဂါ", + "lua": "လူဘာ-လူလူအာ", + "lun": "လွန်ဒါ", + "luo": "လူအို", + "lus": "မီဇို", + "luy": "လူရီအာ", + "lv": "လá€á€ºá€—ီးယား", + "mad": "မဒူရာ", + "mag": "မဂါဟီ", + "mai": "မိုင်သီလီ", + "mak": "မကာဆာ", + "mas": "မာဆိုင်", + "mdf": "မို့á€á€ºá€›á€¾á€¬", + "men": "မန်ဒဲ", + "mer": "မီရု", + "mfe": "မောရစ်ရှ", + "mg": "မာလဂက်စီ", + "mga": "အလယ်ပိုင်း အိုင်းရစ်ရှ်", + "mgh": "မာá€á€°á€á€«-မီအီá€á€­á€¯", + "mgo": "မီá€á€¬", + "mh": "မာရှယ်လိဇ်", + "mi": "မာအိုရီ", + "mic": "မစ်á€á€ºá€™á€€á€ºá€á€º", + "min": "စူကူမီနန်", + "mk": "မက်စီဒိုးနီးယား", + "ml": "မလေးရာလမ်", + "mn": "မွန်ဂိုလီးယား", + "mnc": "မန်á€á€»á€°á€¸", + "mni": "မနိပူရ", + "moh": "မိုဟော့á€á€º", + "mos": "မိုစီ", + "mr": "မာရသီ", + "ms": "မလေး", + "mt": "မော်လ်á€á€¬", + "mua": "မွန်ဒန်း", + "mul": "ဘာသာစကား အမျိုးမျိုး", + "mus": "á€á€›á€­á€á€º", + "mwl": "မီရန်ဒီးဇ်", + "my": "မြန်မာ", + "myv": "အီဇယာ", + "mzn": "မာဇန်ဒါရန်နီ", + "na": "နော်ရူး", + "nap": "နပိုလီá€á€”်", + "naq": "နာမာ", + "nb": "နော်á€á€±á€¸ ဘွá€á€ºá€á€ºá€™á€±á€¬á€ºá€œá€º", + "nd": "á€á€±á€¬á€„် အွန်န်ဒီဘီလီ", + "nds": "အနိမ့် ဂျာမန်", + "nds_NL": "ဂျာမန် (နယ်သာလန်)", + "ne": "နီပေါ", + "new": "နီá€á€«á€›á€®", + "ng": "အွန်ဒွန်ဂါ", + "nia": "နီးရပ်စ်", + "niu": "နူအဲယန်း", + "nl": "ဒá€á€ºá€á€»á€º", + "nl_BE": "ဖလီမစ်ရှ်", + "nmg": "ကွာစီအို", + "nn": "နော်á€á€±á€¸ နီးနောစ်", + "nnh": "အွန်ရဲဘွန်း", + "no": "နော်á€á€±á€¸", + "nog": "နိုဂိုင်", + "nqo": "အွန်ကို", + "nr": "á€á€±á€¬á€„် အွန်န်ဘီလီ", + "nso": "မြောက် ဆိုသို", + "nus": "နူအာ", + "nv": "နာဗာဟို", + "ny": "နရန်ဂျာ", + "nyn": "နရန်ကိုလီ", + "oc": "အိုစီá€á€”်", + "om": "အိုရိုမို", + "or": "အိုရီရာ", + "os": "အိုဆဲá€á€…်á€á€º", + "pa": "ပန်á€á€»á€¬á€•ီ", + "pag": "ပန်ဂါစီနန်", + "pam": "ပမ်ပန်ညာ", + "pap": "ပါပီမင်á€á€­á€¯", + "pau": "ပလာအို", + "pcm": "နိုင်ဂျီးရီးယား ပစ်ဂျင်", + "peo": "ပါရှန် အဟောင်း", + "pi": "ပါဠိ", + "pl": "ပိုလန်", + "prg": "ပရူရှန်", + "ps": "ပက်ရှ်á€á€½á€”်း", + "pt": "ပေါ်á€á€°á€‚ီ", + "pt_BR": "ဘရာဇီး ပေါ်á€á€°á€‚ီ", + "pt_PT": "ဥရောပ ပေါ်á€á€°á€‚ီ", + "qu": "á€á€®á€á€»á€°á€á€«á€¡á€­á€¯á€á€«", + "quc": "ကီá€á€ºá€¡á€®á€á€»á€®", + "rap": "ရပန်နူအီ", + "rar": "ရရိုá€á€½á€”်ဂန်", + "rm": "ရောမ", + "rn": "ရွန်ဒီ", + "ro": "ရိုမေနီယား", + "ro_MD": "မော်လဒိုဗာ", + "rof": "ရွမ်ဘို", + "root": "မူလရင်းမြစ်", + "ru": "ရုရှ", + "rup": "အာရိုမန်းနီးယန်း", + "rw": "ကင်ရာá€á€”်ဒါ", + "rwk": "ရူá€á€™á€º", + "sa": "သင်္သကရိုက်", + "sad": "ဆန်ဒါá€á€®", + "sah": "ဆá€á€«", + "saq": "ဆမ်ဘူရူ", + "sat": "ဆန်á€á€¬á€œá€®", + "sba": "အွန်ဂမ်းဘေး", + "sbp": "ဆန်ဂု", + "sc": "ဆာဒီနီးယား", + "scn": "စစ္စလီ", + "sco": "စကော့á€á€º", + "sd": "စင်ဒီ", + "se": "မြောက် ဆာမိ", + "seh": "စီနာ", + "ses": "ကိုရာဘိုရို ဆမ်နီ", + "sg": "ဆန်ဂို", + "sga": "အိုင်းရစ် ဟောင်း", + "shi": "á€á€¬á€á€»á€šá€ºá€œá€ºá€Ÿá€…်", + "shn": "ရှမ်း", + "si": "စင်ဟာလာ", + "sk": "စလိုဗက်", + "sl": "စလိုဗေးနီးယား", + "sm": "ဆမိုအာ", + "sma": "á€á€±á€¬á€„် ဆာမိ", + "smj": "လူလီ ဆာမိ", + "smn": "အီနာရီ ဆာမိ", + "sms": "စá€á€­á€¯á€¸á€œá€º ဆမ်မီ", + "sn": "ရှိုနာ", + "snk": "ဆိုနင်ကေး", + "so": "ဆိုမာလီ", + "sq": "အယ်လ်ဘေးနီးယား", + "sr": "ဆားဘီးယား", + "srn": "ဆရာနန် á€á€½á€”်ဂို", + "ss": "ဆွာဇီလန်", + "ssy": "ဆာဟို", + "st": "á€á€±á€¬á€„်ပိုင်း ဆိုသို", + "su": "ဆူဒန်", + "suk": "ဆူကူမာ", + "sv": "ဆွီဒင်", + "sw": "ဆွာဟီလီ", + "sw_CD": "ကွန်ဂို ဆွာဟီလီ", + "swb": "ကိုမိုရီးယန်း", + "syr": "ဆီးရီးယား", + "ta": "á€á€™á€®á€¸á€œá€º", + "te": "á€á€®á€œá€®á€‚ူ", + "tem": "á€á€„်မ်နဲ", + "teo": "á€á€®á€†á€­á€¯", + "tet": "á€á€®á€á€½á€™á€º", + "tg": "á€á€¬á€‚ျစ်", + "th": "ထိုင်း", + "ti": "á€á€®á€‚်ရင်ရာ", + "tig": "á€á€®á€‚ရီ", + "tk": "á€á€¬á€·á€á€ºá€™á€„်နစ္စá€á€”်", + "tlh": "ကလင်ဂွန်", + "tn": "á€á€®á€†á€á€«á€”ာ", + "to": "á€á€½á€”်ဂါ", + "tpi": "á€á€±á€¬á€·á€á€º ပိစင်", + "tr": "á€á€°á€›á€€á€®", + "trv": "á€á€›á€­á€¯á€€á€­á€¯", + "ts": "ဆွန်ဂါ", + "tt": "á€á€¬á€á€¬", + "tum": "á€á€™á€ºá€˜á€°á€€á€¬", + "tvl": "á€á€°á€—ာလူ", + "twq": "á€á€¬á€†á€¬á€á€«á€á€º", + "ty": "á€á€Ÿá€®á€á€®", + "tyv": "á€á€°á€—န်", + "tzm": "အလယ်အာ့á€á€œá€¬á€…် á€á€¬á€™á€¬á€‡á€­á€¯á€€á€º", + "udm": "အူမူရá€á€º", + "ug": "á€á€®á€‚ါ", + "uk": "ယူကရိန်း", + "umb": "အူဘန်ဒူ", + "und": "မသိသော ဘာသာ", + "ur": "အူရ်ဒူ", + "uz": "ဦးဇ်ဘက်", + "vai": "ဗိုင်", + "ve": "ဗင်န်ဒါ", + "vi": "ဗီယက်နမ်", + "vo": "ဗိုလာပိုက်", + "vun": "ဗွန်ဂျို", + "wa": "á€á€«á€œá€°á€¸á€”်", + "wae": "á€á€±á€«á€œá€ºá€†á€¬", + "wal": "á€á€­á€¯á€œá€€á€ºá€á€¬", + "war": "á€á€«á€›á€±á€¸", + "wbp": "á€á€±á€«á€œá€ºá€•ီရီ", + "wo": "á€á€°á€œá€­á€¯á€–်", + "xal": "ကာလ်မိုက်", + "xh": "ဇိုစာ", + "xog": "ဆိုဂါ", + "yav": "ရန်ဘဲန်", + "ybb": "ရမ်ဘာ", + "yi": "ဂျူး", + "yo": "ယိုရူဘာ", + "yue": "ကွမ်á€á€¯á€¶", + "zgh": "မိုရိုကို á€á€™á€‡á€­á€¯á€€á€º", + "zh": "á€á€›á€¯á€á€º", + "zu": "ဇူးလူး", + "zun": "ဇူနီ", + "zxx": "ဘာသာစကားနှင့် ပá€á€ºá€žá€€á€ºá€žá€±á€¬á€¡á€›á€¬ မရှိပါ", + "zza": "ဇာဇာ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/nb.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/nb.json new file mode 100644 index 0000000000000000000000000000000000000000..c634ee84e37d0b10a078318b1d7b57232cb3ce39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/nb.json @@ -0,0 +1,606 @@ +{ + "Version": "2.1.30.7", + "Names": { + "aa": "afar", + "ab": "abkhasisk", + "ace": "achinesisk", + "ach": "acoli", + "ada": "adangme", + "ady": "adygeisk", + "ae": "avestisk", + "aeb": "tunisisk-arabisk", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainu", + "ak": "akan", + "akk": "akkadisk", + "akz": "alabama", + "ale": "aleutisk", + "aln": "gegisk-albansk", + "alt": "søraltaisk", + "am": "amharisk", + "an": "aragonsk", + "ang": "gammelengelsk", + "anp": "angika", + "ar": "arabisk", + "ar_001": "moderne standardarabisk", + "arc": "arameisk", + "arn": "mapudungun", + "aro": "araona", + "arp": "arapaho", + "arq": "algerisk arabisk", + "arw": "arawak", + "ary": "marokkansk-arabisk", + "arz": "egyptisk arabisk", + "as": "assamesisk", + "asa": "asu", + "ase": "amerikansk tegnsprÃ¥k", + "ast": "asturisk", + "av": "avarisk", + "avk": "kotava", + "awa": "avadhi", + "ay": "aymara", + "az": "aserbajdsjansk", + "ba": "basjkirsk", + "bal": "baluchi", + "ban": "balinesisk", + "bar": "bairisk", + "bas": "basaa", + "bax": "bamun", + "bbc": "batak toba", + "bbj": "ghomala", + "be": "hviterussisk", + "bej": "beja", + "bem": "bemba", + "bew": "betawi", + "bez": "bena", + "bfd": "bafut", + "bfq": "badaga", + "bg": "bulgarsk", + "bgn": "vestbalutsji", + "bho": "bhojpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bjn": "banjar", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bengali", + "bo": "tibetansk", + "bpy": "bishnupriya", + "bqi": "bakhtiari", + "br": "bretonsk", + "bra": "braj", + "brh": "brahui", + "brx": "bodo", + "bs": "bosnisk", + "bss": "akose", + "bua": "burjatisk", + "bug": "buginesisk", + "bum": "bulu", + "byn": "blin", + "byv": "medumba", + "ca": "katalansk", + "cad": "caddo", + "car": "karibisk", + "cay": "cayuga", + "cch": "atsam", + "ce": "tsjetsjensk", + "ceb": "cebuansk", + "cgg": "kiga", + "ch": "chamorro", + "chb": "chibcha", + "chg": "tsjagatai", + "chk": "chuukesisk", + "chm": "mari", + "chn": "chinook", + "cho": "choctaw", + "chp": "chipewiansk", + "chr": "cherokesisk", + "chy": "cheyenne", + "ckb": "kurdisk (sorani)", + "co": "korsikansk", + "cop": "koptisk", + "cps": "kapiz", + "cr": "cree", + "crh": "krimtatarisk", + "crs": "seselwa", + "cs": "tsjekkisk", + "csb": "kasjubisk", + "cu": "kirkeslavisk", + "cv": "tsjuvasjisk", + "cy": "walisisk", + "da": "dansk", + "dak": "dakota", + "dar": "dargwa", + "dav": "taita", + "de": "tysk", + "del": "delaware", + "den": "slavey", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "lavsorbisk", + "dtp": "sentraldusun", + "dua": "duala", + "dum": "mellomnederlandsk", + "dv": "dhivehi", + "dyo": "jola-fonyi", + "dyu": "dyula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "kiembu", + "ee": "ewe", + "efi": "efik", + "egl": "emiliansk", + "egy": "gammelegyptisk", + "eka": "ekajuk", + "el": "gresk", + "elx": "elamittisk", + "en": "engelsk", + "enm": "mellomengelsk", + "eo": "esperanto", + "es": "spansk", + "esu": "sentralyupik", + "et": "estisk", + "eu": "baskisk", + "ewo": "ewondo", + "ext": "ekstremaduransk", + "fa": "persisk", + "fan": "fang", + "fat": "fanti", + "ff": "fulfulde", + "fi": "finsk", + "fil": "filipino", + "fit": "tornedalsfinsk", + "fj": "fijiansk", + "fo": "færøysk", + "fon": "fon", + "fr": "fransk", + "frc": "cajunfransk", + "frm": "mellomfransk", + "fro": "gammelfransk", + "frp": "arpitansk", + "frr": "nordfrisisk", + "frs": "østfrisisk", + "fur": "friuliansk", + "fy": "vestfrisisk", + "ga": "irsk", + "gaa": "ga", + "gag": "gagausisk", + "gan": "gan", + "gay": "gayo", + "gba": "gbaya", + "gbz": "zoroastrisk dari", + "gd": "skotsk-gælisk", + "gez": "geez", + "gil": "kiribatisk", + "gl": "galisisk", + "glk": "gileki", + "gmh": "mellomhøytysk", + "gn": "guarani", + "goh": "gammelhøytysk", + "gom": "goansk konkani", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotisk", + "grb": "grebo", + "grc": "gammelgresk", + "gsw": "sveitsertysk", + "gu": "gujarati", + "guc": "wayuu", + "gur": "frafra", + "guz": "gusii", + "gv": "mansk", + "gwi": "gwichin", + "ha": "hausa", + "hai": "haida", + "hak": "hakka", + "haw": "hawaiisk", + "he": "hebraisk", + "hi": "hindi", + "hif": "fijiansk hindi", + "hil": "hiligaynon", + "hit": "hettittisk", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "kroatisk", + "hsb": "høysorbisk", + "hsn": "xiang", + "ht": "haitisk", + "hu": "ungarsk", + "hup": "hupa", + "hy": "armensk", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonesisk", + "ie": "interlingue", + "ig": "ibo", + "ii": "sichuan-yi", + "ik": "inupiak", + "ilo": "iloko", + "inh": "ingusjisk", + "io": "ido", + "is": "islandsk", + "it": "italiensk", + "iu": "inuittisk", + "izh": "ingrisk", + "ja": "japansk", + "jam": "jamaicansk kreolengelsk", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jpr": "jødepersisk", + "jrb": "jødearabisk", + "jut": "jysk", + "jv": "javanesisk", + "ka": "georgisk", + "kaa": "karakalpakisk", + "kab": "kabylsk", + "kac": "kachin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardisk", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "kappverdisk", + "ken": "kenyang", + "kfo": "koro", + "kg": "kikongo", + "kgp": "kaingang", + "kha": "khasi", + "kho": "khotanesisk", + "khq": "koyra chiini", + "khw": "khowar", + "ki": "kikuyu", + "kiu": "kirmancki", + "kj": "kuanyama", + "kk": "kasakhisk", + "kkj": "kako", + "kl": "grønlandsk", + "kln": "kalenjin", + "km": "khmer", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "koreansk", + "koi": "komipermjakisk", + "kok": "konkani", + "kos": "kosraeansk", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karatsjajbalkarsk", + "kri": "krio", + "krj": "kinaray-a", + "krl": "karelsk", + "kru": "kurukh", + "ks": "kasjmiri", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "kølnsk", + "ku": "kurdisk", + "kum": "kumykisk", + "kut": "kutenai", + "kv": "komi", + "kw": "kornisk", + "ky": "kirgisisk", + "la": "latin", + "lad": "ladinsk", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "luxemburgsk", + "lez": "lesgisk", + "lfn": "lingua franca nova", + "lg": "ganda", + "li": "limburgsk", + "lij": "ligurisk", + "liv": "livisk", + "lkt": "lakota", + "lmo": "lombardisk", + "ln": "lingala", + "lo": "laotisk", + "lol": "mongo", + "loz": "lozi", + "lrc": "nord-luri", + "lt": "litauisk", + "ltg": "latgallisk", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "mizo", + "luy": "luhya", + "lv": "latvisk", + "lzh": "klassisk kinesisk", + "lzz": "lazisk", + "mad": "maduresisk", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makasar", + "man": "mandingo", + "mas": "masai", + "mde": "maba", + "mdf": "moksja", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "mauritisk-kreolsk", + "mg": "gassisk", + "mga": "mellomirsk", + "mgh": "makhuwa-meetto", + "mgo": "meta’", + "mh": "marshallesisk", + "mi": "maori", + "mic": "micmac", + "min": "minangkabau", + "mk": "makedonsk", + "ml": "malayalam", + "mn": "mongolsk", + "mnc": "mandsju", + "mni": "manipuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "marathi", + "mrj": "vestmarisk", + "ms": "malayisk", + "mt": "maltesisk", + "mua": "mundang", + "mul": "flere sprÃ¥k", + "mus": "creek", + "mwl": "mirandesisk", + "mwr": "marwari", + "mwv": "mentawai", + "my": "burmesisk", + "mye": "myene", + "myv": "erzia", + "mzn": "mazandarani", + "na": "nauru", + "nan": "minnan", + "nap": "napolitansk", + "naq": "nama", + "nb": "norsk bokmÃ¥l", + "nd": "nord-ndebele", + "nds": "nedertysk", + "nds_NL": "nedersaksisk", + "ne": "nepali", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niueansk", + "njo": "ao naga", + "nl": "nederlandsk", + "nl_BE": "flamsk", + "nmg": "kwasio", + "nn": "norsk nynorsk", + "nnh": "ngiemboon", + "no": "norsk", + "nog": "nogaisk", + "non": "gammelnorsk", + "nov": "novial", + "nqo": "nʼko", + "nr": "sør-ndebele", + "nso": "nord-sotho", + "nus": "nuer", + "nv": "navajo", + "nwc": "klassisk newari", + "ny": "nyanja", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzima", + "oc": "oksitansk", + "oj": "ojibwa", + "om": "oromo", + "or": "oriya", + "os": "ossetisk", + "osa": "osage", + "ota": "ottomansk tyrkisk", + "pa": "punjabi", + "pag": "pangasinan", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauisk", + "pcd": "pikardisk", + "pcm": "nigeriansk pidginsprÃ¥k", + "pdc": "pennsylvaniatysk", + "pdt": "plautdietsch", + "peo": "gammelpersisk", + "pfl": "palatintysk", + "phn": "fønikisk", + "pi": "pali", + "pl": "polsk", + "pms": "piemontesisk", + "pnt": "pontisk", + "pon": "ponapisk", + "prg": "prøyssisk", + "pro": "gammelprovençalsk", + "ps": "pashto", + "pt": "portugisisk", + "qu": "quechua", + "quc": "quiché", + "qug": "kichwa (Chimborazo-høylandet)", + "raj": "rajasthani", + "rap": "rapanui", + "rar": "rarotongansk", + "rgn": "romagnolsk", + "rif": "riff", + "rm": "retoromansk", + "rn": "rundi", + "ro": "rumensk", + "ro_MD": "moldovsk", + "rof": "rombo", + "rom": "romani", + "root": "rot", + "rtm": "rotumansk", + "ru": "russisk", + "rue": "rusinsk", + "rug": "roviana", + "rup": "aromansk", + "rw": "kinyarwanda", + "rwk": "rwa", + "sa": "sanskrit", + "sad": "sandawe", + "sah": "jakutisk", + "sam": "samaritansk arameisk", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "saz": "saurashtra", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardisk", + "scn": "siciliansk", + "sco": "skotsk", + "sd": "sindhi", + "sdc": "sassaresisk sardisk", + "sdh": "sørkurdisk", + "se": "nordsamisk", + "see": "seneca", + "seh": "sena", + "sei": "seri", + "sel": "selkupisk", + "ses": "koyraboro senni", + "sg": "sango", + "sga": "gammelirsk", + "sgs": "samogitisk", + "sh": "serbokroatisk", + "shi": "tachelhit", + "shn": "shan", + "shu": "tsjadisk arabisk", + "si": "singalesisk", + "sid": "sidamo", + "sk": "slovakisk", + "sl": "slovensk", + "sli": "lavschlesisk", + "sly": "selayar", + "sm": "samoansk", + "sma": "sørsamisk", + "smj": "lulesamisk", + "smn": "enaresamisk", + "sms": "skoltesamisk", + "sn": "shona", + "snk": "soninke", + "so": "somali", + "sog": "sogdisk", + "sq": "albansk", + "sr": "serbisk", + "srn": "sranan", + "srr": "serer", + "ss": "swati", + "ssy": "saho", + "st": "sør-sotho", + "stq": "saterfrisisk", + "su": "sundanesisk", + "suk": "sukuma", + "sus": "susu", + "sux": "sumerisk", + "sv": "svensk", + "sw": "swahili", + "sw_CD": "kongolesisk swahili", + "swb": "komorisk", + "syc": "klassisk syrisk", + "syr": "gammelsyrisk", + "szl": "schlesisk", + "ta": "tamil", + "tcy": "tulu", + "te": "telugu", + "tem": "temne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadsjikisk", + "th": "thai", + "ti": "tigrinja", + "tig": "tigré", + "tiv": "tiv", + "tk": "turkmensk", + "tkl": "tokelauisk", + "tkr": "tsakhursk", + "tl": "tagalog", + "tlh": "klingon", + "tli": "tlingit", + "tly": "talysj", + "tmh": "tamasjek", + "tn": "setswana", + "to": "tongansk", + "tog": "nyasa-tongansk", + "tpi": "tok pisin", + "tr": "tyrkisk", + "tru": "turoyo", + "trv": "taroko", + "ts": "tsonga", + "tsd": "tsakonisk", + "tsi": "tsimshian", + "tt": "tatarisk", + "ttt": "muslimsk tat", + "tum": "tumbuka", + "tvl": "tuvalsk", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitisk", + "tyv": "tuvinsk", + "tzm": "sentralmarokkansk tamazight", + "udm": "udmurtisk", + "ug": "uigurisk", + "uga": "ugaritisk", + "uk": "ukrainsk", + "umb": "umbundu", + "und": "ukjent sprÃ¥k", + "ur": "urdu", + "uz": "usbekisk", + "vai": "vai", + "ve": "venda", + "vec": "venetiansk", + "vep": "vepsisk", + "vi": "vietnamesisk", + "vls": "vestflamsk", + "vmf": "Main-frankisk", + "vo": "volapyk", + "vot": "votisk", + "vro": "sørestisk", + "vun": "vunjo", + "wa": "vallonsk", + "wae": "walsertysk", + "wal": "wolaytta", + "war": "waray-waray", + "was": "washo", + "wbp": "warlpiri", + "wo": "wolof", + "wuu": "wu", + "xal": "kalmukkisk", + "xh": "xhosa", + "xmf": "mingrelsk", + "xog": "soga", + "yao": "yao", + "yap": "yapesisk", + "yav": "yangben", + "ybb": "yemba", + "yi": "jiddisk", + "yo": "joruba", + "yrl": "nheengatu", + "yue": "kantonesisk", + "za": "zhuang", + "zap": "zapotekisk", + "zbl": "blissymboler", + "zea": "zeeuws", + "zen": "zenaga", + "zgh": "standard marrokansk tamazight", + "zh": "kinesisk", + "zh_Hans": "forenklet kinesisk", + "zh_Hant": "tradisjonell kinesisk", + "zu": "zulu", + "zun": "zuni", + "zxx": "uten sprÃ¥klig innhold", + "zza": "zazaisk" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/nd.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/nd.json new file mode 100644 index 0000000000000000000000000000000000000000..0231de649a3c919d754d9fb8efb226f0bc747e50 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/nd.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.27.65", + "Names": { + "ak": "isi-Akhani", + "am": "isi-Amaharikhi", + "ar": "isi-Alabhu", + "be": "isi-Bhelarashiyani", + "bg": "isi-Bulgaria", + "bn": "isi-Bhengali", + "cs": "isi-Czech", + "de": "isi-Jalimani", + "el": "isi-Giliki", + "en": "isi-Ngisi", + "es": "isi-Sipeyini", + "fa": "isi-Pheshiyani", + "fr": "isi-Fulentshi", + "ha": "isi-Hausa", + "hi": "isi-Hindi", + "hu": "isi-Hangari", + "id": "isi-Indonesia", + "ig": "isi-Igbo", + "it": "isi-Italiano", + "ja": "isi-Japhani", + "jv": "isi-Java", + "km": "isi-Khambodiya", + "ko": "isi-Koriya", + "ms": "isi-Malayi", + "my": "isi-Burma", + "nd": "isiNdebele", + "ne": "isi-Nepali", + "nl": "isi-Dutch", + "pa": "isi-Phunjabi", + "pl": "isi-Pholoshi", + "pt": "isi-Potukezi", + "ro": "isi-Romani", + "ru": "isi-Rashiya", + "rw": "isi-Ruwanda", + "so": "isi-Somali", + "sv": "isi-Swidishi", + "ta": "isi-Thamil", + "th": "isi-Thayi", + "tr": "isi-Thekishi", + "uk": "isi-Ukrain", + "ur": "isi-Udu", + "vi": "isi-Vietnamese", + "yo": "isi-Yorubha", + "zh": "isi-China", + "zu": "isi-Zulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ne.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ne.json new file mode 100644 index 0000000000000000000000000000000000000000..2ebb04a5f6d3b4827b6f3f778ee0901337a97e80 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ne.json @@ -0,0 +1,560 @@ +{ + "Version": "2.1.29.20", + "Names": { + "aa": "अफार", + "ab": "अबà¥à¤–ाजियाली", + "ace": "अचाइनिज", + "ach": "अकोली", + "ada": "अदाङमे", + "ady": "अदिघे", + "ae": "अवेसà¥à¤¤à¤¾à¤¨", + "af": "अफà¥à¤°à¤¿à¤•ानà¥à¤¸", + "afh": "अफà¥à¤°à¤¿à¤¹à¤¿à¤²à¥€", + "agq": "आघेम", + "ain": "अइनà¥", + "ak": "आकान", + "akk": "अकà¥à¤•ादियाली", + "akz": "अलाबामा", + "ale": "अलेउट", + "aln": "घेग अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "alt": "दकà¥à¤·à¤¿à¤£à¥€ आलà¥à¤Ÿà¤¾à¤‡", + "am": "अमà¥à¤¹à¤¾à¤°à¤¿à¤•", + "an": "अरागोनी", + "ang": "पà¥à¤°à¤¾à¤¤à¤¨ अङà¥à¤—à¥à¤°à¥‡à¤œà¥€", + "anp": "अङà¥à¤—िका", + "ar": "अरबी", + "ar_001": "आधà¥à¤¨à¤¿à¤• मानक अरबी", + "arc": "अरामाइक", + "arn": "मापà¥à¤šà¥‡", + "aro": "अराओना", + "arp": "अरापाहो", + "arq": "अलà¥à¤œà¥‡à¤°à¤¿à¤¯à¤¾à¤²à¥€ अरबी", + "arw": "अरावाक", + "ary": "मोरोकà¥à¤•ोली अरबी", + "arz": "इजिपà¥à¤Ÿ अरबी", + "as": "आसामी", + "asa": "आसà¥", + "ase": "अमेरिकी साङà¥à¤•ेतिक भाषा", + "ast": "असà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾à¤²à¥€", + "av": "अवारिक", + "avk": "कोटावा", + "awa": "अवधी", + "ay": "à¤à¤®à¤¾à¤°à¤¾", + "az": "अजरबैजानी", + "ba": "बासà¥à¤•िर", + "bal": "बालà¥à¤šà¥€", + "ban": "बाली", + "bar": "बाभारियाली", + "bas": "बासा", + "bax": "बामà¥à¤¨", + "bbc": "बाताक तोबा", + "bbj": "घोमाला", + "be": "बेलारà¥à¤¸à¥€", + "bej": "बेजा", + "bem": "बेमà¥à¤¬à¤¾", + "bew": "बेटावी", + "bez": "बेना", + "bfd": "बाफà¥à¤Ÿ", + "bfq": "बडागा", + "bg": "बà¥à¤²à¥à¤—ेरियाली", + "bgn": "पशà¥à¤šà¤¿à¤® बालोची", + "bho": "भोजपà¥à¤°à¥€", + "bi": "बिसà¥à¤²à¤¾à¤®", + "bik": "बिकोल", + "bin": "बिनी", + "bjn": "बनà¥à¤œà¤¾à¤°", + "bkm": "कोम", + "bla": "सिकà¥à¤¸à¤¿à¤•ा", + "bm": "बामà¥à¤¬à¤¾à¤°à¤¾", + "bn": "बंगाली", + "bo": "तिबà¥à¤¬à¤¤à¥€", + "bpy": "विषà¥à¤£à¥à¤ªà¥à¤°à¤¿à¤¯à¤¾", + "bqi": "बाखà¥à¤¤à¤¿à¤†à¤°à¥€", + "br": "बà¥à¤°à¥‡à¤Ÿà¤¨", + "bra": "बà¥à¤°à¤œ", + "brh": "बà¥à¤°à¤¾à¤¹à¥à¤‡", + "brx": "बोडो", + "bs": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "bss": "अकà¥à¤œ", + "bua": "बà¥à¤°à¤¿à¤†à¤¤", + "bug": "बà¥à¤—िनियाली", + "bum": "बà¥à¤²à¥", + "byn": "बà¥à¤²à¤¿à¤¨", + "byv": "मेडà¥à¤®à¥à¤¬à¤¾", + "ca": "कà¥à¤¯à¤¾à¤Ÿà¤¾à¤²à¤¨", + "cad": "काडà¥à¤¡à¥‹", + "car": "कà¥à¤¯à¤¾à¤°à¤¿à¤¬", + "cay": "कायà¥à¤—ा", + "cch": "अटà¥à¤¸à¤¾à¤®", + "ce": "चेचेन", + "ceb": "सेबà¥à¤†à¤¨à¥‹", + "cgg": "चिगा", + "ch": "चामोरà¥à¤°à¥‹", + "chb": "चिबà¥à¤šà¤¾", + "chg": "चागाटाई", + "chk": "चà¥à¤•ेसे", + "chm": "मारी", + "chn": "चिनà¥à¤• जारà¥à¤—न", + "cho": "चोकà¥à¤Ÿà¤¾à¤µ", + "chp": "चिपेवà¥à¤¯à¤¾à¤¨", + "chr": "चेरोकी", + "chy": "चेयेनà¥à¤¨à¥‡", + "ckb": "केनà¥à¤¦à¥à¤°à¥€à¤¯ कà¥à¤°à¥à¤¦à¥€", + "co": "कोरà¥à¤¸à¤¿à¤•न", + "cop": "कोपà¥à¤Ÿà¤¿à¤•", + "cps": "कापिजà¥à¤¨à¥‹à¤¨", + "cr": "कà¥à¤°à¥€", + "crh": "कà¥à¤°à¤¿à¤®à¤¿à¤¯à¤¾à¤²à¥€ तà¥à¤°à¥à¤•", + "crs": "सेसेलà¥à¤µà¤¾ कà¥à¤°à¤¿à¤“ल फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€", + "cs": "चेक", + "csb": "कासà¥à¤µà¤¿à¤¯à¤¨", + "cu": "चरà¥à¤š सà¥à¤²à¤¾à¤­à¤¿à¤•", + "cv": "चà¥à¤­à¤¾à¤¸", + "cy": "वेलà¥à¤¶", + "da": "डेनिस", + "dak": "डाकोटा", + "dar": "दारà¥à¤—à¥à¤µà¤¾", + "dav": "ताइता", + "de": "जरà¥à¤®à¤¨", + "de_AT": "असà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾à¤²à¥€ जरà¥à¤®à¤¨", + "de_CH": "सà¥à¤µà¥€à¤¸ हाई जरà¥à¤®à¤¨", + "del": "देलावर", + "dgr": "दोगà¥à¤°à¤¿à¤¬", + "din": "दिनà¥à¤•ा", + "dje": "जरà¥à¤®à¤¾", + "doi": "डोगरी", + "dsb": "तलà¥à¤²à¥‹ सोरà¥à¤¬à¤¿à¤¯à¤¨", + "dtp": "केनà¥à¤¦à¥à¤°à¥€à¤¯ दà¥à¤¸à¥à¤¨", + "dua": "दà¥à¤µà¤¾à¤²à¤¾", + "dum": "मधà¥à¤¯ डच", + "dv": "दिबेही", + "dyo": "जोला-फोनिल", + "dyu": "दà¥à¤¯à¥à¤²à¤¾", + "dz": "जोङà¥à¤–ा", + "dzg": "दाजागा", + "ebu": "à¤à¤®à¥à¤¬à¥", + "ee": "इवी", + "efi": "à¤à¤«à¤¿à¤•", + "egl": "à¤à¤®à¤¿à¤²à¤¿à¤¯à¤¾à¤²à¥€", + "egy": "पà¥à¤°à¤¾à¤¤à¤¨ इजिपà¥à¤Ÿà¥€", + "eka": "à¤à¤•ाजà¥à¤•", + "el": "गà¥à¤°à¥€à¤•", + "elx": "à¤à¤²à¤¾à¤®à¤¾à¤‡à¤Ÿ", + "en": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€", + "en_AU": "असà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾à¤²à¥€ अङà¥à¤—à¥à¤°à¥‡à¤œà¥€", + "en_CA": "कà¥à¤¯à¤¾à¤¨à¤¾à¤¡à¥‡à¤²à¥€ अङà¥à¤—à¥à¤°à¥‡à¤œà¥€", + "en_GB": "बेलायती अङà¥à¤—à¥à¤°à¥‡à¤œà¥€", + "en_US": "अमेरिकी अङà¥à¤—à¥à¤°à¥‡à¤œà¥€", + "enm": "मधà¥à¤¯ अङà¥à¤—à¥à¤°à¥‡à¤œà¥€", + "eo": "à¤à¤¸à¥à¤ªà¥‡à¤°à¤¾à¤¨à¥à¤¤à¥‹", + "es": "सà¥à¤ªà¥‡à¤¨à¥€", + "es_419": "लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨ अमेरिकी सà¥à¤ªà¥‡à¤¨à¥€", + "es_ES": "यà¥à¤°à¥‹à¤ªà¥‡à¤²à¥€ सà¥à¤ªà¥‡à¤¨à¥€", + "es_MX": "मेकà¥à¤¸à¤¿à¤•न सà¥à¤ªà¥‡à¤¨à¥€", + "esu": "केनà¥à¤¦à¥à¤°à¥€à¤¯ यà¥à¤ªà¤¿à¤•", + "et": "इसà¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "eu": "बासà¥à¤•", + "ewo": "इवोनà¥à¤¡à¥‹", + "ext": "à¤à¤•à¥à¤¸à¤Ÿà¥à¤°à¥‡à¤®à¤¾à¤¦à¥à¤°à¤¾à¤²à¥€", + "fa": "फारसी", + "fan": "फाङ", + "fat": "फानà¥à¤Ÿà¥€", + "ff": "फà¥à¤²à¤¾à¤¹", + "fi": "फिनिस", + "fil": "फिलिपिनी", + "fj": "फिजियाली", + "fo": "फारोज", + "fon": "फोन", + "fr": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€", + "fr_CA": "कà¥à¤¯à¤¾à¤¨à¥‡à¤¡à¤¾à¤²à¥€ फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€", + "frc": "काहà¥à¤¨ फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€", + "frm": "मधà¥à¤¯ फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€", + "fro": "पà¥à¤°à¤¾à¤¤à¤¨ फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€", + "frp": "अरà¥à¤ªà¤¿à¤¤à¤¾à¤¨", + "frr": "उतà¥à¤¤à¤°à¥€ फà¥à¤°à¤¿à¤œà¥€", + "frs": "पूरà¥à¤µà¥€ फà¥à¤°à¤¿à¤¸à¤¿à¤¯à¤¾à¤²à¥€", + "fur": "फà¥à¤°à¤¿à¤‰à¤²à¤¿à¤¯à¤¾à¤²à¥€", + "fy": "फà¥à¤°à¤¿à¤œà¤¿à¤¯à¤¨", + "ga": "आयरिस", + "gaa": "गा", + "gag": "गगाउज", + "gan": "गान चिनियाà¤", + "gay": "गायो", + "gba": "गà¥à¤¬à¤¾à¤¯à¤¾", + "gd": "सà¥à¤•टिस गाà¤à¤²à¤¿à¤•", + "gez": "गिज", + "gil": "गिलà¥à¤¬à¤°à¥à¤Ÿà¥€", + "gl": "गलिसियाली", + "glk": "गिलाकी", + "gmh": "मधà¥à¤¯ उचà¥à¤š जरà¥à¤®à¤¨", + "gn": "गà¥à¤µà¤¾à¤°à¤¾à¤¨à¥€", + "goh": "पà¥à¤°à¤¾à¤¤à¤¨ उचà¥à¤š जरà¥à¤®à¤¨", + "gom": "गोवा कोनà¥à¤•ानी", + "gon": "गोनà¥à¤¡à¥€", + "gor": "गोरोनà¥à¤Ÿà¤¾à¤²à¥‹", + "got": "गोथिक", + "grb": "गà¥à¤°à¥‡à¤¬à¥‹", + "grc": "पà¥à¤°à¤¾à¤¤à¤¨ गà¥à¤°à¤¿à¤•", + "gsw": "सà¥à¤µà¥€à¤¸ जरà¥à¤®à¤¨", + "gu": "गà¥à¤œà¤°à¤¾à¤¤à¥€", + "gur": "फà¥à¤°à¤¾à¤«à¥à¤°à¤¾", + "guz": "गà¥à¤¸à¥€", + "gv": "मानà¥à¤•à¥à¤¸", + "gwi": "गà¥à¤‡à¤šà¤¿à¤¨", + "ha": "हाउसा", + "hai": "हाइदा", + "hak": "हकà¥à¤•ा चिनियाà¤", + "haw": "हवाइयन", + "he": "हिबà¥à¤°à¥", + "hi": "हिनà¥à¤¦à¥€", + "hif": "फिजी हिनà¥à¤¦à¥€", + "hil": "हिलिगायनोन", + "hit": "हिटà¥à¤Ÿà¤¿à¤Ÿà¥‡", + "hmn": "हमोङ", + "ho": "हिरी मोटà¥", + "hr": "कà¥à¤°à¥‹à¤¯à¤¸à¤¿à¤¯à¤¾à¤²à¥€", + "hsb": "माथिलà¥à¤²à¥‹ सोरà¥à¤¬à¤¿à¤¯à¤¨", + "ht": "हैटियाली कà¥à¤°à¤¿à¤¯à¥‹à¤²", + "hu": "हङà¥à¤—ेरियाली", + "hup": "हà¥à¤ªà¤¾", + "hy": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "hz": "हेरेरो", + "ia": "इनà¥à¤Ÿà¤°à¥à¤²à¤¿à¤™à¥à¤—à¥à¤†", + "iba": "इबान", + "ibb": "इबिबियो", + "id": "इनà¥à¤¡à¥‹à¤¨à¥‡à¤¸à¤¿à¤¯à¤¾à¤²à¥€", + "ie": "इनà¥à¤Ÿà¤°à¤²à¤¿à¤™à¥à¤—à¥à¤µà¥‡", + "ig": "इगà¥à¤¬à¥‹", + "ii": "सिचà¥à¤†à¤¨ यि", + "ik": "इनà¥à¤ªà¤¿à¤†à¤•à¥", + "ilo": "इयोको", + "inh": "इनà¥à¤—स", + "io": "इडो", + "is": "आइसलà¥à¤¯à¤¾à¤¨à¥à¤¡à¤¿à¤¯à¤¾à¤²à¥€", + "it": "इटालेली", + "iu": "इनà¥à¤•à¥à¤Ÿà¤¿à¤Ÿà¥à¤Ÿ", + "izh": "इनà¥à¤—à¥à¤°à¤¿à¤¯à¤¾à¤²à¥€", + "ja": "जापानी", + "jam": "जमैकाली कà¥à¤°à¥‡à¤“ले अङà¥à¤—à¥à¤°à¥‡à¤œà¥€", + "jbo": "लोजà¥à¤¬à¤¾à¤¨", + "jgo": "नà¥à¤—ोमà¥à¤¬à¤¾", + "jmc": "माचामे", + "jpr": "जà¥à¤¡à¤¿à¤¯à¥‹-फारसी", + "jrb": "जà¥à¤¡à¤¿à¤¯à¥‹-अरबी", + "jut": "जà¥à¤Ÿà¤¿à¤¸", + "jv": "जाभानी", + "ka": "जरà¥à¤œà¤¿à¤¯à¤¾à¤²à¥€", + "kaa": "कारा-कालà¥à¤ªà¤¾à¤•", + "kab": "काबिल", + "kac": "काचिन", + "kaj": "जà¥à¤œà¥", + "kam": "कामà¥à¤¬à¤¾", + "kaw": "कावी", + "kbd": "काबारà¥à¤¦à¤¿à¤¯à¤¾à¤²à¥€", + "kbl": "कानेमà¥à¤¬à¥", + "kcg": "टà¥à¤†à¤ª", + "kde": "माकोनà¥à¤¡à¥‡", + "kea": "काबà¥à¤­à¥‡à¤°à¥à¤¡à¤¿à¤¯à¤¾à¤¨à¥", + "ken": "केनयाङ", + "kfo": "कोरो", + "kg": "कोङà¥à¤—ो", + "kgp": "काइनगाङ", + "kha": "खासी", + "kho": "खोटानी", + "khq": "कोयरा चिनी", + "khw": "खोवार", + "ki": "किकà¥à¤¯à¥", + "kiu": "किरà¥à¤®à¤¾à¤¨à¥à¤œà¤•ी", + "kj": "कà¥à¤†à¤¨à¥à¤¯à¤¾à¤®à¤¾", + "kk": "काजाख", + "kkj": "काको", + "kl": "कालालिसà¥à¤Ÿ", + "kln": "कालेनà¥à¤œà¤¿à¤¨", + "km": "खमेर", + "kmb": "किमà¥à¤¬à¥à¤¨à¥à¤¡à¥", + "kn": "कनà¥à¤¨à¤¾à¤¡à¤¾", + "ko": "कोरियाली", + "koi": "कोमी-परà¥à¤®à¥à¤¯à¤¾à¤•", + "kok": "कोनà¥à¤•ानी", + "kos": "कोसà¥à¤°à¤¾à¤²à¥€", + "kpe": "कà¥à¤ªà¥‡à¤²à¥à¤²à¥‡", + "kr": "कानà¥à¤°à¥€", + "krc": "काराचाय-बालà¥à¤•र", + "kri": "कà¥à¤°à¤¿à¤“", + "krj": "किनाराय-à¤", + "krl": "कारेलियाली", + "kru": "कà¥à¤°à¥à¤–", + "ks": "कासà¥à¤®à¤¿à¤°à¥€", + "ksb": "शामà¥à¤¬à¤¾à¤²à¤¾", + "ksf": "बाफिया", + "ksh": "कोलोगà¥à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "ku": "कà¥à¤°à¥à¤¦à¥€", + "kum": "कà¥à¤®à¤¿à¤•", + "kut": "कà¥à¤¤à¥‡à¤¨à¤¾à¤‡", + "kv": "कोमी", + "kw": "कोरà¥à¤¨à¤¿à¤¸", + "ky": "किरà¥à¤—िज", + "la": "लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨", + "lad": "लाडिनो", + "lag": "लाङà¥à¤—ी", + "lah": "लाहनà¥à¤¡à¤¾", + "lam": "लामà¥à¤¬à¤¾", + "lb": "लकà¥à¤œà¥‡à¤®à¥à¤¬à¤°à¥à¤—ी", + "lez": "लाजà¥à¤˜à¤¿à¤¯à¤¾à¤²à¥€", + "lfn": "लिङà¥à¤—à¥à¤µà¤¾ फà¥à¤°à¤¾à¤™à¥à¤•ा नोभा", + "lg": "गानà¥à¤¡à¤¾", + "li": "लिमà¥à¤¬à¥à¤°à¥à¤—ी", + "lij": "लिगà¥à¤°à¤¿à¤¯à¤¾à¤²à¥€", + "liv": "लिभोनियाली", + "lkt": "लाकोता", + "lmo": "लोमà¥à¤¬à¤¾à¤°à¥à¤¡", + "ln": "लिङà¥à¤—ाला", + "lo": "लाओ", + "lol": "मोङà¥à¤—ो", + "loz": "लोजी", + "lrc": "उतà¥à¤¤à¤°à¥€ लà¥à¤°à¥€", + "lt": "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "ltg": "लाटà¥à¤—ाली", + "lu": "लà¥à¤¬à¤¾-काताङà¥à¤—ा", + "lua": "लà¥à¤¬à¤¾-लà¥à¤²à¥à¤†", + "lui": "लà¥à¤‡à¤¸à¥‡à¤¨à¥‹", + "lun": "लà¥à¤¨à¥à¤¡à¤¾", + "luo": "लà¥à¤“", + "lus": "मिजो", + "luy": "लà¥à¤‡à¤¯à¤¾", + "lv": "लातà¥à¤­à¤¿à¤¯à¤¾à¤²à¥€", + "lzh": "साहितà¥à¤¯à¤¿à¤• चिनियाà¤", + "lzz": "लाज", + "mad": "मादà¥à¤°à¥‡à¤¸à¥‡", + "maf": "माफा", + "mag": "मगधी", + "mai": "मैथिली", + "mak": "माकासार", + "man": "मानà¥à¤¦à¤¿à¤™à¥‹", + "mas": "मसाई", + "mde": "माबा", + "mdf": "मोकà¥à¤·", + "mdr": "मनà¥à¤¦à¤°", + "men": "मेनà¥à¤¡à¥‡", + "mer": "मेरू", + "mfe": "मोरिसेन", + "mg": "मलागासी", + "mga": "मधà¥à¤¯ आयरिस", + "mgh": "माखà¥à¤µà¤¾-मिटà¥à¤Ÿà¥‹", + "mgo": "मेटा", + "mh": "मारà¥à¤¸à¤¾à¤²à¥€", + "mi": "माओरी", + "mic": "मिकमाक", + "min": "मिनाङकाबाउ", + "mk": "मà¥à¤¯à¤¾à¤¸à¥‡à¤¡à¥‹à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "ml": "मलयालम", + "mn": "मङà¥à¤—ोलियाली", + "mnc": "मानà¥à¤šà¥", + "mni": "मनिपà¥à¤°à¥€", + "moh": "मोहक", + "mos": "मोसà¥à¤¸à¥€", + "mr": "मराठी", + "ms": "मलाय", + "mt": "मालà¥à¤Ÿà¤¿à¤œ", + "mua": "मà¥à¤¨à¥à¤¡à¤¾à¤™", + "mul": "बहà¥à¤­à¤¾à¤·à¤¾", + "mus": "कà¥à¤°à¤¿à¤•", + "mwl": "मिरानà¥à¤¡à¥€", + "mwr": "माडवारी", + "mwv": "मेनà¥à¤Ÿà¤¾à¤µà¤¾à¤ˆ", + "my": "बरà¥à¤®à¥‡à¤²à¥€", + "mye": "मà¥à¤¯à¥‡à¤¨à¥‡", + "myv": "इरà¥à¤œà¥à¤¯à¤¾", + "mzn": "मजानडेरानी", + "na": "नाउरू", + "nan": "मिन नान चिनियाà¤", + "nap": "नेपोलिटान", + "naq": "नामा", + "nb": "नरà¥à¤µà¥‡à¤²à¥€ बोकमाल", + "nd": "उतà¥à¤¤à¤°à¥€ नà¥à¤¡à¥‡à¤¬à¥‡à¤²à¥‡", + "nds": "तलà¥à¤²à¥‹ जरà¥à¤®à¤¨", + "nds_NL": "तलà¥à¤²à¥‹ साकà¥à¤¸à¤¨", + "ne": "नेपाली", + "new": "नेवारी", + "ng": "नà¥à¤¦à¥‹à¤¨à¥à¤—ा", + "nia": "नियास", + "niu": "निउà¤à¤¨", + "njo": "अओ नागा", + "nl": "डच", + "nl_BE": "फà¥à¤²à¥‡à¤®à¤¿à¤¸", + "nmg": "कà¥à¤µà¤¾à¤¸à¤¿à¤¯à¥‹", + "nn": "नरà¥à¤µà¥‡à¤²à¥€ नाइनोरà¥à¤¸à¥à¤•", + "nnh": "नà¥à¤—िà¤à¤®à¥à¤¬à¥à¤¨", + "no": "नरà¥à¤µà¥‡à¤²à¥€", + "nog": "नोगाइ", + "non": "पà¥à¤°à¤¾à¤¨à¥‹ नोरà¥à¤¸à¥‡", + "nov": "नोभियल", + "nqo": "नको", + "nr": "दकà¥à¤·à¤¿à¤£ नà¥à¤¦à¥‡à¤¬à¥‡à¤²à¥‡", + "nso": "उतà¥à¤¤à¤°à¥€ सोथो", + "nus": "नà¥à¤à¤°", + "nv": "नाभाजो", + "nwc": "परमà¥à¤ªà¤°à¤¾à¤—त नेवारी", + "ny": "नà¥à¤¯à¤¾à¤¨à¥à¤œà¤¾", + "nym": "नà¥à¤¯à¤¾à¤®à¤µà¥‡à¤œà¥€", + "nyn": "नà¥à¤¯à¤¾à¤¨à¥à¤•ोल", + "nyo": "नà¥à¤¯à¥‹à¤°à¥‹", + "nzi": "नजिमा", + "oc": "अकà¥à¤¸à¤¿à¤Ÿà¤¨", + "oj": "ओजिबà¥à¤µà¤¾", + "om": "ओरोमो", + "or": "उडिया", + "os": "अोसà¥à¤¸à¥‡à¤Ÿà¤¿à¤•", + "osa": "ओसागे", + "ota": "अटोमन तà¥à¤°à¥à¤•ी", + "pa": "पंजाबी", + "pag": "पाङà¥à¤—ासिनान", + "pal": "पाहलावी", + "pam": "पामपाङà¥à¤—ा", + "pap": "पापियामेनà¥à¤¤à¥‹", + "pau": "पालाउवाली", + "pcd": "पिकारà¥à¤¡", + "pcm": "नाइजेरियाली पिडà¥à¤œà¤¿à¤¨", + "pdc": "पेनà¥à¤¸à¤¿à¤²à¤­à¤¾à¤¨à¤¿à¤¯à¤¾à¤²à¥€ जरà¥à¤®à¤¨", + "peo": "पà¥à¤°à¤¾à¤¤à¤¨ फारसी", + "pfl": "पालाटिन जरà¥à¤®à¤¨", + "phn": "फोनिसियाली", + "pi": "पाली", + "pl": "पोलिस", + "pms": "पिà¤à¤¡à¤®à¥‹à¤¨à¥à¤¤à¥‡à¤¸à¥‡", + "pnt": "पोनà¥à¤Ÿà¤¿à¤•", + "prg": "पà¥à¤°à¤¸à¤¿à¤¯à¤¾à¤²à¥€", + "pro": "पà¥à¤°à¤¾à¤¤à¤¨ पà¥à¤°à¥‹à¤­à¥‡à¤¨à¥à¤•ाल", + "ps": "पासà¥à¤¤à¥‹", + "pt": "पोरà¥à¤¤à¥à¤—ी", + "pt_BR": "बà¥à¤°à¤¾à¤œà¤¿à¤²à¥€ पोरà¥à¤¤à¥à¤—ी", + "pt_PT": "यà¥à¤°à¥‹à¤ªà¥‡à¤²à¥€ पोरà¥à¤¤à¥à¤—ी", + "qu": "कà¥à¤µà¥‡à¤šà¥à¤µà¤¾", + "quc": "किचे", + "qug": "चिमà¥à¤¬à¥‹à¤°à¤¾à¤œà¥‹ उचà¥à¤šà¤¸à¥à¤¥à¤¾à¤¨ किचà¥à¤†", + "raj": "राजसà¥à¤¥à¤¾à¤¨à¥€", + "rap": "रापानà¥à¤ˆ", + "rar": "रारोटोङà¥à¤—ान", + "rm": "रोमानिस", + "rn": "रà¥à¤¨à¥à¤¡à¥€", + "ro": "रोमानियाली", + "rof": "रोमà¥à¤¬à¥‹", + "root": "root", + "ru": "रसियाली", + "rup": "अरोमानीयाली", + "rw": "किनà¥à¤¯à¤¾à¤°à¤µà¤¾à¤¨à¥à¤¡à¤¾", + "rwk": "रà¥â€Œà¤µà¤¾", + "sa": "संसà¥à¤•ृत", + "sad": "सानà¥à¤¡à¥‡à¤…", + "sah": "साखा", + "saq": "सामà¥à¤¬à¥à¤°à¥‚", + "sat": "सानà¥à¤¤à¤¾à¤²à¥€", + "sba": "नà¥à¤—ामबाय", + "sbp": "साङà¥à¤—à¥", + "sc": "सारà¥à¤¡à¤¿à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "scn": "सिसिलियाली", + "sco": "सà¥à¤•टà¥à¤¸", + "sd": "सिनà¥à¤§à¥€", + "sdh": "दकà¥à¤·à¤¿à¤£à¥€ कà¥à¤°à¥à¤¦à¤¿à¤¶", + "se": "उतà¥à¤¤à¤°à¥€ सामी", + "seh": "सेना", + "ses": "कोयराबोरो सेनà¥à¤¨à¥€", + "sg": "साङà¥à¤—ो", + "sga": "पà¥à¤°à¤¾à¤¤à¤¨ आयरीस", + "shi": "टाचेलà¥à¤¹à¤¿à¤Ÿ", + "shn": "शान", + "shu": "चाड अरबी", + "si": "सिनà¥à¤¹à¤¾à¤²à¥€", + "sk": "सà¥à¤²à¥‹à¤­à¤¾à¤•ियाली", + "sl": "सà¥à¤²à¥‹à¤­à¥‡à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "sli": "तलà¥à¤²à¥‹ सिलेसियाली", + "sm": "सामोआ", + "sma": "दकà¥à¤·à¤¿à¤£à¥€ सामी", + "smj": "लà¥à¤²à¥‡ सामी", + "smn": "इनारी सामी", + "sms": "सà¥à¤•ोइट सामी", + "sn": "शोना", + "snk": "सोनिनà¥à¤•े", + "so": "सोमाली", + "sq": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "sr": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€", + "srn": "सà¥à¤°à¤¾à¤¨à¤¾à¤¨ टोङà¥à¤—ो", + "ss": "सà¥à¤µà¤¾à¤¤à¥€", + "ssy": "साहो", + "st": "दकà¥à¤·à¤¿à¤£à¥€ सोथो", + "su": "सà¥à¤¡à¤¾à¤¨à¥€", + "suk": "सà¥à¤•à¥à¤®à¤¾", + "sus": "सà¥à¤¸à¥‚", + "sux": "सà¥à¤®à¥‡à¤°à¤¿à¤¯à¤¾à¤²à¥€", + "sv": "सà¥à¤µà¤¿à¤¡à¤¿à¤¸", + "sw": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€", + "sw_CD": "कङà¥à¤—ो सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€", + "swb": "कोमोरी", + "syc": "परमà¥à¤ªà¤°à¤¾à¤—त सिरियाक", + "syr": "सिरियाक", + "ta": "तामिल", + "te": "तेलà¥à¤—à¥", + "tem": "टिमà¥à¤¨à¥‡", + "teo": "टेसो", + "tet": "टेटà¥à¤®", + "tg": "ताजिक", + "th": "थाई", + "ti": "टिगà¥à¤°à¤¿à¤¨à¥à¤¯à¤¾", + "tig": "टिगà¥à¤°à¥‡", + "tk": "टरà¥à¤•मेन", + "tlh": "कà¥à¤²à¤¿à¤™à¥à¤—न", + "tn": "टà¥à¤¸à¥à¤µà¤¾à¤¨à¤¾", + "to": "टोङà¥à¤—न", + "tog": "नà¥à¤¯à¤¾à¤¸ टोङà¥à¤—ा", + "tpi": "टोक पिसिन", + "tr": "टरà¥à¤•िश", + "trv": "टारोको", + "ts": "टà¥à¤¸à¥‹à¤™à¥à¤—ा", + "tt": "तातार", + "ttt": "मà¥à¤¸à¥à¤²à¤¿à¤® टाट", + "tum": "टà¥à¤®à¥à¤¬à¥à¤•ा", + "tvl": "टà¥à¤­à¤¾à¤²à¥", + "twq": "तासावाक", + "ty": "टाहिटियन", + "tyv": "टà¥à¤­à¤¿à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "tzm": "केनà¥à¤¦à¥à¤°à¥€à¤¯ à¤à¤Ÿà¥à¤²à¤¾à¤¸ टामाजिघट", + "udm": "उडà¥à¤®à¥à¤°à¥à¤Ÿ", + "ug": "उइघà¥à¤°", + "uk": "यà¥à¤•à¥à¤°à¥‡à¤¨à¥€", + "umb": "उमà¥à¤¬à¥à¤¨à¥à¤¡à¥€", + "und": "अजà¥à¤žà¤¾à¤¤ भाषा", + "ur": "उरà¥à¤¦à¥", + "uz": "उजà¥à¤¬à¥‡à¤•ी", + "vai": "भाइ", + "ve": "भेनà¥à¤¡à¤¾", + "vi": "भियतनामी", + "vmf": "मà¥à¤–à¥à¤¯-फà¥à¤°à¤¾à¤™à¥à¤•ोनियाली", + "vo": "भोलापिक", + "vun": "भà¥à¤¨à¥à¤œà¥‹", + "wa": "वालà¥à¤²à¥à¤¨", + "wae": "वालà¥à¤¸à¤°", + "wal": "वोलेटà¥à¤Ÿà¤¾", + "war": "वारे", + "wbp": "वारà¥à¤²à¥à¤ªà¤¿à¤°à¥€", + "wo": "वà¥à¤²à¥à¤«", + "xal": "कालà¥à¤®à¤¿à¤•", + "xh": "खोसा", + "xmf": "मिनगà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾à¤²à¥€", + "xog": "सोगा", + "yav": "याङà¥à¤¬à¥‡à¤¨", + "ybb": "येमà¥à¤¬à¤¾", + "yi": "यिदà¥à¤¦à¤¿à¤¸", + "yo": "योरूवा", + "yrl": "नà¥à¤¹à¤¿à¤¨à¤—ातà¥", + "yue": "कानà¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "zbl": "बà¥à¤²à¤¿à¤¸à¤¸à¤¿à¤®à¥à¤¬à¥‹à¤²à¥à¤¸", + "zgh": "मानक मोरोकà¥à¤•ोन तामाजिघट", + "zh": "चिनियाà¤", + "zh_Hans": "सरलिकृत चिनियाà¤", + "zh_Hant": "परमà¥à¤ªà¤°à¤¾à¤—त चिनियाà¤", + "zu": "जà¥à¤²à¥", + "zun": "जà¥à¤¨à¥€", + "zxx": "भाषिक सामगà¥à¤°à¥€ छैन", + "zza": "जाजा" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/nl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/nl.json new file mode 100644 index 0000000000000000000000000000000000000000..742830f83b0aab326ac87b21e8a3128afd3fb738 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/nl.json @@ -0,0 +1,599 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "Afar", + "ab": "Abchazisch", + "ace": "Atjehs", + "ach": "Akoli", + "ada": "Adangme", + "ady": "Adygees", + "ae": "Avestisch", + "aeb": "Tunesisch Arabisch", + "af": "Afrikaans", + "afh": "Afrihili", + "agq": "Aghem", + "ain": "Ainu", + "ak": "Akan", + "akk": "Akkadisch", + "akz": "Alabama", + "ale": "Aleoetisch", + "aln": "Gegisch", + "alt": "Zuid-Altaïsch", + "am": "Amhaars", + "an": "Aragonees", + "ang": "Oudengels", + "anp": "Angika", + "ar": "Arabisch", + "arc": "Aramees", + "arn": "Mapudungun", + "aro": "Araona", + "arp": "Arapaho", + "arq": "Algerijns Arabisch", + "arw": "Arawak", + "ary": "Marokkaans Arabisch", + "arz": "Egyptisch Arabisch", + "as": "Assamees", + "asa": "Asu", + "ase": "Amerikaanse Gebarentaal", + "ast": "Asturisch", + "av": "Avarisch", + "avk": "Kotava", + "awa": "Awadhi", + "ay": "Aymara", + "az": "Azerbeidzjaans", + "ba": "Basjkiers", + "bal": "Beloetsji", + "ban": "Balinees", + "bar": "Beiers", + "bas": "Basa", + "bax": "Bamoun", + "bbc": "Batak Toba", + "bbj": "Ghomala’", + "be": "Wit-Russisch", + "bej": "Beja", + "bem": "Bemba", + "bew": "Betawi", + "bez": "Bena", + "bfd": "Bafut", + "bfq": "Badaga", + "bg": "Bulgaars", + "bgn": "Westers Beloetsji", + "bho": "Bhojpuri", + "bi": "Bislama", + "bik": "Bikol", + "bin": "Bini", + "bjn": "Banjar", + "bkm": "Kom", + "bla": "Siksika", + "bm": "Bambara", + "bn": "Bengaals", + "bo": "Tibetaans", + "bpy": "Bishnupriya", + "bqi": "Bakhtiari", + "br": "Bretons", + "bra": "Braj", + "brh": "Brahui", + "brx": "Bodo", + "bs": "Bosnisch", + "bss": "Akoose", + "bua": "Boerjatisch", + "bug": "Buginees", + "bum": "Bulu", + "byn": "Blin", + "byv": "Medumba", + "ca": "Catalaans", + "cad": "Caddo", + "car": "Caribisch", + "cay": "Cayuga", + "cch": "Atsam", + "ce": "Tsjetsjeens", + "ceb": "Cebuano", + "cgg": "Chiga", + "ch": "Chamorro", + "chb": "Chibcha", + "chg": "Chagatai", + "chk": "Chuukees", + "chm": "Mari", + "chn": "Chinook Jargon", + "cho": "Choctaw", + "chp": "Chipewyan", + "chr": "Cherokee", + "chy": "Cheyenne", + "ckb": "Soranî", + "co": "Corsicaans", + "cop": "Koptisch", + "cps": "Capiznon", + "cr": "Cree", + "crh": "Krim-Tataars", + "crs": "Seychellencreools", + "cs": "Tsjechisch", + "csb": "Kasjoebisch", + "cu": "Kerkslavisch", + "cv": "Tsjoevasjisch", + "cy": "Welsh", + "da": "Deens", + "dak": "Dakota", + "dar": "Dargwa", + "dav": "Taita", + "de": "Duits", + "del": "Delaware", + "den": "Slavey", + "dgr": "Dogrib", + "din": "Dinka", + "dje": "Zarma", + "doi": "Dogri", + "dsb": "Nedersorbisch", + "dtp": "Dusun", + "dua": "Duala", + "dum": "Middelnederlands", + "dv": "Divehi", + "dyo": "Jola-Fonyi", + "dyu": "Dyula", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embu", + "ee": "Ewe", + "efi": "Efik", + "egl": "Emiliano", + "egy": "Oudegyptisch", + "eka": "Ekajuk", + "el": "Grieks", + "elx": "Elamitisch", + "en": "Engels", + "enm": "Middelengels", + "eo": "Esperanto", + "es": "Spaans", + "esu": "Yupik", + "et": "Estisch", + "eu": "Baskisch", + "ewo": "Ewondo", + "ext": "Extremeens", + "fa": "Perzisch", + "fan": "Fang", + "fat": "Fanti", + "ff": "Fulah", + "fi": "Fins", + "fil": "Filipijns", + "fit": "Tornedal-Fins", + "fj": "Fijisch", + "fo": "Faeröers", + "fon": "Fon", + "fr": "Frans", + "frc": "Cajun-Frans", + "frm": "Middelfrans", + "fro": "Oudfrans", + "frp": "Arpitaans", + "frr": "Noord-Fries", + "frs": "Oost-Fries", + "fur": "Friulisch", + "fy": "Fries", + "ga": "Iers", + "gaa": "Ga", + "gag": "Gagaoezisch", + "gan": "Ganyu", + "gay": "Gayo", + "gba": "Gbaya", + "gbz": "Zoroastrisch Dari", + "gd": "Schots-Gaelisch", + "gez": "Ge’ez", + "gil": "Gilbertees", + "gl": "Galicisch", + "glk": "Gilaki", + "gmh": "Middelhoogduits", + "gn": "Guaraní", + "goh": "Oudhoogduits", + "gom": "Goa Konkani", + "gon": "Gondi", + "gor": "Gorontalo", + "got": "Gothisch", + "grb": "Grebo", + "grc": "Oudgrieks", + "gsw": "Zwitserduits", + "gu": "Gujarati", + "guc": "Wayuu", + "gur": "Gurune", + "guz": "Gusii", + "gv": "Manx", + "gwi": "Gwichʼin", + "ha": "Hausa", + "hai": "Haida", + "hak": "Hakka", + "haw": "Hawaïaans", + "he": "Hebreeuws", + "hi": "Hindi", + "hif": "Fijisch Hindi", + "hil": "Hiligaynon", + "hit": "Hettitisch", + "hmn": "Hmong", + "ho": "Hiri Motu", + "hr": "Kroatisch", + "hsb": "Oppersorbisch", + "hsn": "Xiangyu", + "ht": "Haïtiaans Creools", + "hu": "Hongaars", + "hup": "Hupa", + "hy": "Armeens", + "hz": "Herero", + "ia": "Interlingua", + "iba": "Iban", + "ibb": "Ibibio", + "id": "Indonesisch", + "ie": "Interlingue", + "ig": "Igbo", + "ii": "Yi", + "ik": "Inupiaq", + "ilo": "Iloko", + "inh": "Ingoesjetisch", + "io": "Ido", + "is": "IJslands", + "it": "Italiaans", + "iu": "Inuktitut", + "izh": "Ingrisch", + "ja": "Japans", + "jam": "Jamaicaans Creools", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jpr": "Judeo-Perzisch", + "jrb": "Judeo-Arabisch", + "jut": "Jutlands", + "jv": "Javaans", + "ka": "Georgisch", + "kaa": "Karakalpaks", + "kab": "Kabylisch", + "kac": "Kachin", + "kaj": "Jju", + "kam": "Kamba", + "kaw": "Kawi", + "kbd": "Kabardisch", + "kbl": "Kanembu", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Kaapverdisch Creools", + "ken": "Kenyang", + "kfo": "Koro", + "kg": "Kongo", + "kgp": "Kaingang", + "kha": "Khasi", + "kho": "Khotanees", + "khq": "Koyra Chiini", + "khw": "Khowar", + "ki": "Gikuyu", + "kiu": "Kirmanckî", + "kj": "Kuanyama", + "kk": "Kazachs", + "kkj": "Kako", + "kl": "Groenlands", + "kln": "Kalenjin", + "km": "Khmer", + "kmb": "Kimbundu", + "kn": "Kannada", + "ko": "Koreaans", + "koi": "Komi-Permjaaks", + "kok": "Konkani", + "kos": "Kosraeaans", + "kpe": "Kpelle", + "kr": "Kanuri", + "krc": "Karatsjaj-Balkarisch", + "kri": "Krio", + "krj": "Kinaray-a", + "krl": "Karelisch", + "kru": "Kurukh", + "ks": "Kasjmiri", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Kölsch", + "ku": "Koerdisch", + "kum": "Koemuks", + "kut": "Kutenai", + "kv": "Komi", + "kw": "Cornish", + "ky": "Kirgizisch", + "la": "Latijn", + "lad": "Ladino", + "lag": "Langi", + "lah": "Lahnda", + "lam": "Lamba", + "lb": "Luxemburgs", + "lez": "Lezgisch", + "lfn": "Lingua Franca Nova", + "lg": "Luganda", + "li": "Limburgs", + "lij": "Ligurisch", + "liv": "Lijfs", + "lkt": "Lakota", + "lmo": "Lombardisch", + "ln": "Lingala", + "lo": "Laotiaans", + "lol": "Mongo", + "loz": "Lozi", + "lrc": "Noordelijk Luri", + "lt": "Litouws", + "ltg": "Letgaals", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lui": "Luiseno", + "lun": "Lunda", + "luo": "Luo", + "lus": "Mizo", + "luy": "Luyia", + "lv": "Lets", + "lzh": "Klassiek Chinees", + "lzz": "Lazisch", + "mad": "Madoerees", + "maf": "Mafa", + "mag": "Magahi", + "mai": "Maithili", + "mak": "Makassaars", + "man": "Mandingo", + "mas": "Maa", + "mde": "Maba", + "mdf": "Moksja", + "mdr": "Mandar", + "men": "Mende", + "mer": "Meru", + "mfe": "Morisyen", + "mg": "Malagassisch", + "mga": "Middeliers", + "mgh": "Makhuwa-Meetto", + "mgo": "Meta’", + "mh": "Marshallees", + "mi": "Maori", + "mic": "Mi’kmaq", + "min": "Minangkabau", + "mk": "Macedonisch", + "ml": "Malayalam", + "mn": "Mongools", + "mnc": "Mantsjoe", + "mni": "Meitei", + "moh": "Mohawk", + "mos": "Mossi", + "mr": "Marathi", + "mrj": "West-Mari", + "ms": "Maleis", + "mt": "Maltees", + "mua": "Mundang", + "mul": "Meerdere talen", + "mus": "Creek", + "mwl": "Mirandees", + "mwr": "Marwari", + "mwv": "Mentawai", + "my": "Birmaans", + "mye": "Myene", + "myv": "Erzja", + "mzn": "Mazanderani", + "na": "Nauruaans", + "nan": "Minnanyu", + "nap": "Napolitaans", + "naq": "Nama", + "nb": "Noors - BokmÃ¥l", + "nd": "Noord-Ndebele", + "nds": "Nedersaksisch", + "ne": "Nepalees", + "new": "Newari", + "ng": "Ndonga", + "nia": "Nias", + "niu": "Niueaans", + "njo": "Ao Naga", + "nl": "Nederlands", + "nmg": "Ngumba", + "nn": "Noors - Nynorsk", + "nnh": "Ngiemboon", + "no": "Noors", + "nog": "Nogai", + "non": "Oudnoors", + "nov": "Novial", + "nqo": "N’Ko", + "nr": "Zuid-Ndbele", + "nso": "Noord-Sotho", + "nus": "Nuer", + "nv": "Navajo", + "nwc": "Klassiek Nepalbhasa", + "ny": "Nyanja", + "nym": "Nyamwezi", + "nyn": "Nyankole", + "nyo": "Nyoro", + "nzi": "Nzima", + "oc": "Occitaans", + "oj": "Ojibwa", + "om": "Afaan Oromo", + "or": "Odia", + "os": "Ossetisch", + "osa": "Osage", + "ota": "Ottomaans-Turks", + "pa": "Punjabi", + "pag": "Pangasinan", + "pal": "Pahlavi", + "pam": "Pampanga", + "pap": "Papiaments", + "pau": "Palaus", + "pcd": "Picardisch", + "pcm": "Nigeriaans Pidgin", + "pdc": "Pennsylvania-Duits", + "pdt": "Plautdietsch", + "peo": "Oudperzisch", + "pfl": "Paltsisch", + "phn": "Foenicisch", + "pi": "Pali", + "pl": "Pools", + "pms": "Piëmontees", + "pnt": "Pontisch", + "pon": "Pohnpeiaans", + "prg": "Oudpruisisch", + "pro": "Oudprovençaals", + "ps": "Pasjtoe", + "pt": "Portugees", + "qu": "Quechua", + "quc": "K’iche’", + "qug": "Kichwa", + "raj": "Rajasthani", + "rap": "Rapanui", + "rar": "Rarotongan", + "rgn": "Romagnol", + "rif": "Riffijns", + "rm": "Reto-Romaans", + "rn": "Kirundi", + "ro": "Roemeens", + "rof": "Rombo", + "rom": "Romani", + "root": "Root", + "rtm": "Rotumaans", + "ru": "Russisch", + "rue": "Roetheens", + "rug": "Roviana", + "rup": "Aroemeens", + "rw": "Kinyarwanda", + "rwk": "Rwa", + "sa": "Sanskriet", + "sad": "Sandawe", + "sah": "Jakoets", + "sam": "Samaritaans-Aramees", + "saq": "Samburu", + "sas": "Sasak", + "sat": "Santali", + "saz": "Saurashtra", + "sba": "Ngambay", + "sbp": "Sangu", + "sc": "Sardijns", + "scn": "Siciliaans", + "sco": "Schots", + "sd": "Sindhi", + "sdc": "Sassarees", + "sdh": "Pahlavani", + "se": "Noord-Samisch", + "see": "Seneca", + "seh": "Sena", + "sei": "Seri", + "sel": "Selkoeps", + "ses": "Koyraboro Senni", + "sg": "Sango", + "sga": "Oudiers", + "sgs": "Samogitisch", + "sh": "Servo-Kroatisch", + "shi": "Tashelhiyt", + "shn": "Shan", + "shu": "Tsjadisch Arabisch", + "si": "Singalees", + "sid": "Sidamo", + "sk": "Slowaaks", + "sl": "Sloveens", + "sli": "Silezisch Duits", + "sly": "Selayar", + "sm": "Samoaans", + "sma": "Zuid-Samisch", + "smj": "Lule-Samisch", + "smn": "Inari-Samisch", + "sms": "Skolt-Samisch", + "sn": "Shona", + "snk": "Soninke", + "so": "Somalisch", + "sog": "Sogdisch", + "sq": "Albanees", + "sr": "Servisch", + "srn": "Sranantongo", + "srr": "Serer", + "ss": "Swazi", + "ssy": "Saho", + "st": "Zuid-Sotho", + "stq": "Saterfries", + "su": "Soendanees", + "suk": "Sukuma", + "sus": "Soesoe", + "sux": "Soemerisch", + "sv": "Zweeds", + "sw": "Swahili", + "swb": "Shimaore", + "syc": "Klassiek Syrisch", + "syr": "Syrisch", + "szl": "Silezisch", + "ta": "Tamil", + "tcy": "Tulu", + "te": "Telugu", + "tem": "Timne", + "teo": "Teso", + "ter": "Tereno", + "tet": "Tetun", + "tg": "Tadzjieks", + "th": "Thai", + "ti": "Tigrinya", + "tig": "Tigre", + "tiv": "Tiv", + "tk": "Turkmeens", + "tkl": "Tokelaus", + "tkr": "Tsakhur", + "tl": "Tagalog", + "tlh": "Klingon", + "tli": "Tlingit", + "tly": "Talysh", + "tmh": "Tamashek", + "tn": "Tswana", + "to": "Tongaans", + "tog": "Nyasa Tonga", + "tpi": "Tok Pisin", + "tr": "Turks", + "tru": "Turoyo", + "trv": "Taroko", + "ts": "Tsonga", + "tsd": "Tsakonisch", + "tsi": "Tsimshian", + "tt": "Tataars", + "ttt": "Moslim Tat", + "tum": "Toemboeka", + "tvl": "Tuvaluaans", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Tahitiaans", + "tyv": "Toevaans", + "tzm": "Tamazight (Centraal-Marokko)", + "udm": "Oedmoerts", + "ug": "Oeigoers", + "uga": "Oegaritisch", + "uk": "Oekraïens", + "umb": "Umbundu", + "und": "onbekende taal", + "ur": "Urdu", + "uz": "Oezbeeks", + "vai": "Vai", + "ve": "Venda", + "vec": "Venetiaans", + "vep": "Wepsisch", + "vi": "Vietnamees", + "vls": "West-Vlaams", + "vmf": "Opperfrankisch", + "vo": "Volapük", + "vot": "Votisch", + "vro": "Võro", + "vun": "Vunjo", + "wa": "Waals", + "wae": "Walser", + "wal": "Wolaytta", + "war": "Waray", + "was": "Washo", + "wbp": "Warlpiri", + "wo": "Wolof", + "wuu": "Wuyu", + "xal": "Kalmuks", + "xh": "Xhosa", + "xmf": "Mingreels", + "xog": "Soga", + "yao": "Yao", + "yap": "Yapees", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "Jiddisch", + "yo": "Yoruba", + "yrl": "Nheengatu", + "yue": "Kantonees", + "za": "Zhuang", + "zap": "Zapotec", + "zbl": "Blissymbolen", + "zea": "Zeeuws", + "zen": "Zenaga", + "zgh": "Standaard Marokkaanse Tamazight", + "zh": "Chinees", + "zu": "Zoeloe", + "zun": "Zuni", + "zxx": "geen linguïstische inhoud", + "zza": "Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/nn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/nn.json new file mode 100644 index 0000000000000000000000000000000000000000..d33c2de1d4f6dc250612d98d14bde258e2b96dea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/nn.json @@ -0,0 +1,499 @@ +{ + "Version": "2.1.28.76", + "Names": { + "aa": "afar", + "ab": "abkhasisk", + "ace": "achinesisk", + "ach": "acoli", + "ada": "adangme", + "ady": "adygeisk", + "ae": "avestisk", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainu", + "ak": "akan", + "akk": "akkadisk", + "ale": "aleutisk", + "alt": "sør-altaj", + "am": "amharisk", + "an": "aragonsk", + "ang": "gammalengelsk", + "anp": "angika", + "ar": "arabisk", + "ar_001": "moderne standardarabisk", + "arc": "arameisk", + "arn": "mapudungun", + "arp": "arapaho", + "arw": "arawak", + "as": "assamesisk", + "asa": "asu (Tanzania)", + "ast": "asturisk", + "av": "avarisk", + "awa": "avadhi", + "ay": "aymara", + "az": "aserbajdsjansk", + "ba": "basjkirsk", + "bal": "baluchi", + "ban": "balinesisk", + "bas": "basa", + "bax": "bamun", + "be": "kviterussisk", + "bej": "beja", + "bem": "bemba", + "bez": "bena (Tanzania)", + "bg": "bulgarsk", + "bho": "bhojpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bla": "siksika", + "bm": "bambara", + "bn": "bengali", + "bo": "tibetansk", + "br": "bretonsk", + "bra": "braj", + "brx": "bodo", + "bs": "bosnisk", + "bss": "bakossi", + "bua": "burjatisk", + "bug": "buginesisk", + "byn": "blin", + "ca": "katalansk", + "cad": "caddo", + "car": "carib", + "cch": "atsam", + "ce": "tsjetsjensk", + "ceb": "cebuano", + "cgg": "kiga", + "ch": "chamorro", + "chb": "chibcha", + "chg": "tsjagataisk", + "chk": "chuukesisk", + "chm": "mari", + "chn": "chinook", + "cho": "choctaw", + "chp": "chipewiansk", + "chr": "cherokee", + "chy": "cheyenne", + "ckb": "sorani", + "co": "korsikansk", + "cop": "koptisk", + "cr": "cree", + "crh": "krimtatarisk", + "crs": "seselwa (fransk-kreolsk)", + "cs": "tsjekkisk", + "csb": "kasjubisk", + "cu": "kyrkjeslavisk", + "cv": "tsjuvansk", + "cy": "walisisk", + "da": "dansk", + "dak": "dakota", + "dar": "dargwa", + "dav": "taita", + "de": "tysk", + "del": "delaware", + "den": "slavej", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "lÃ¥gsorbisk", + "dua": "duala", + "dum": "mellomnederlandsk", + "dv": "divehi", + "dyo": "jola-fonyi", + "dyu": "dyula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embu", + "ee": "ewe", + "efi": "efik", + "egy": "gammalegyptisk", + "eka": "ekajuk", + "el": "gresk", + "elx": "elamite", + "en": "engelsk", + "en_GB": "britisk engelsk", + "enm": "mellomengelsk", + "eo": "esperanto", + "es": "spansk", + "et": "estisk", + "eu": "baskisk", + "ewo": "ewondo", + "fa": "persisk", + "fan": "fang", + "fat": "fanti", + "ff": "fulfulde", + "fi": "finsk", + "fil": "filippinsk", + "fj": "fijiansk", + "fo": "færøysk", + "fon": "fon", + "fr": "fransk", + "frm": "mellomfransk", + "fro": "gammalfransk", + "frr": "nordfrisisk", + "frs": "austfrisisk", + "fur": "friulisk", + "fy": "vestfrisisk", + "ga": "irsk", + "gaa": "ga", + "gay": "gayo", + "gba": "gbaya", + "gd": "skotsk-gælisk", + "gez": "geez", + "gil": "gilbertese", + "gl": "galicisk", + "gmh": "mellomhøgtysk", + "gn": "guarani", + "goh": "gammalhøgtysk", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotisk", + "grb": "grebo", + "grc": "gammalgresk", + "gsw": "sveitsertysk", + "gu": "gujarati", + "guz": "gusii", + "gv": "manx", + "gwi": "gwichin", + "ha": "hausa", + "hai": "haida", + "haw": "hawaiisk", + "he": "hebraisk", + "hi": "hindi", + "hil": "hiligaynon", + "hit": "hettittisk", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "kroatisk", + "hsb": "høgsorbisk", + "ht": "haitisk", + "hu": "ungarsk", + "hup": "hupa", + "hy": "armensk", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonesisk", + "ie": "interlingue", + "ig": "ibo", + "ii": "sichuan-yi", + "ik": "inupiak", + "ilo": "iloko", + "inh": "ingusjisk", + "io": "ido", + "is": "islandsk", + "it": "italiensk", + "iu": "inuittisk", + "ja": "japansk", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jpr": "jødepersisk", + "jrb": "jødearabisk", + "jv": "javanesisk", + "ka": "georgisk", + "kaa": "karakalpakisk", + "kab": "kabyle", + "kac": "kachin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardisk", + "kcg": "tyap", + "kde": "makonde", + "kea": "kabuverdianu", + "kfo": "koro", + "kg": "kikongo", + "kha": "khasi", + "kho": "khotanesisk", + "khq": "koyra chiini", + "ki": "kikuyu", + "kj": "kuanyama", + "kk": "kasakhisk", + "kkj": "kako", + "kl": "grønlandsk (kalaallisut)", + "kln": "kalenjin", + "km": "khmer", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "koreansk", + "kok": "konkani", + "kos": "kosraeansk", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karachay-balkar", + "krl": "karelsk", + "kru": "kurukh", + "ks": "kasjmiri", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "kølnsk", + "ku": "kurdisk", + "kum": "kumyk", + "kut": "kutenai", + "kv": "komi", + "kw": "kornisk", + "ky": "kirgisisk", + "la": "latin", + "lad": "ladino", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "luxemburgsk", + "lez": "lezghian", + "lg": "ganda", + "li": "limburgisk", + "lkt": "lakota", + "ln": "lingala", + "lo": "laotisk", + "lol": "mongo", + "loz": "lozi", + "lrc": "nord-lurisk", + "lt": "litauisk", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "lushai", + "luy": "olulujia", + "lv": "latvisk", + "mad": "maduresisk", + "mag": "magahi", + "mai": "maithili", + "mak": "makasar", + "man": "mandingo", + "mas": "masai", + "mdf": "moksha", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "morisyen", + "mg": "madagassisk", + "mga": "mellomirsk", + "mgh": "Makhuwa-Meetto", + "mgo": "meta’", + "mh": "marshallesisk", + "mi": "maori", + "mic": "micmac", + "min": "minangkabau", + "mk": "makedonsk", + "ml": "malayalam", + "mn": "mongolsk", + "mnc": "mandsju", + "mni": "manipuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "marathi", + "ms": "malayisk", + "mt": "maltesisk", + "mua": "mundang", + "mul": "fleire sprÃ¥k", + "mus": "creek", + "mwl": "mirandesisk", + "mwr": "marwari", + "my": "burmesisk", + "myv": "erzia", + "mzn": "mazanderani", + "na": "nauru", + "nap": "napolitansk", + "naq": "nama", + "nb": "bokmÃ¥l", + "nd": "nord-ndebele", + "nds": "lÃ¥gtysk", + "nds_NL": "lÃ¥gsaksisk", + "ne": "nepalsk", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niuisk", + "nl": "nederlandsk", + "nl_BE": "flamsk", + "nmg": "kwasio", + "nn": "nynorsk", + "nnh": "ngiemboon", + "no": "norsk", + "nog": "nogai", + "non": "gammalnorsk", + "nqo": "n’ko", + "nr": "sør-ndebele", + "nso": "nordsotho", + "nus": "nuer", + "nv": "navajo", + "nwc": "klassisk newarisk", + "ny": "nyanja", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzima", + "oc": "oksitansk", + "oj": "ojibwa", + "om": "oromo", + "or": "odia", + "os": "ossetisk", + "osa": "osage", + "ota": "ottomansk tyrkisk", + "pa": "panjabi", + "pag": "pangasinan", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauisk", + "pcm": "nigeriansk pidgin", + "peo": "gammalpersisk", + "phn": "fønikisk", + "pi": "pali", + "pl": "polsk", + "pon": "ponapisk", + "prg": "prøyssisk", + "pro": "gammalprovençalsk", + "ps": "pashto", + "pt": "portugisisk", + "qu": "quechua", + "quc": "k’iche", + "raj": "rajasthani", + "rap": "rapanui", + "rar": "rarotongansk", + "rm": "retoromansk", + "rn": "rundi", + "ro": "rumensk", + "ro_MD": "moldavisk", + "rof": "rombo", + "rom": "romani", + "root": "rot", + "ru": "russisk", + "rup": "arumensk", + "rw": "kinjarwanda", + "rwk": "rwa", + "sa": "sanskrit", + "sad": "sandawe", + "sah": "sakha", + "sam": "samaritansk arameisk", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardinsk", + "scn": "siciliansk", + "sco": "skotsk", + "sd": "sindhi", + "se": "nordsamisk", + "seh": "sena", + "sel": "selkupisk", + "ses": "Koyraboro Senni", + "sg": "sango", + "sga": "gammalirsk", + "sh": "serbokroatisk", + "shi": "tachelhit", + "shn": "shan", + "si": "singalesisk", + "sid": "sidamo", + "sk": "slovakisk", + "sl": "slovensk", + "sm": "samoansk", + "sma": "sørsamisk", + "smj": "lulesamisk", + "smn": "enaresamisk", + "sms": "skoltesamisk", + "sn": "shona", + "snk": "soninke", + "so": "somali", + "sog": "sogdisk", + "sq": "albansk", + "sr": "serbisk", + "srn": "sranan tongo", + "srr": "serer", + "ss": "swati", + "ssy": "saho", + "st": "sørsotho", + "su": "sundanesisk", + "suk": "sukuma", + "sus": "susu", + "sux": "sumerisk", + "sv": "svensk", + "sw": "swahili", + "swb": "shimaore", + "syc": "klassisk syrisk", + "syr": "syrisk", + "ta": "tamil", + "te": "telugu", + "tem": "temne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadsjikisk", + "th": "thai", + "ti": "tigrinja", + "tig": "tigré", + "tiv": "tivi", + "tk": "turkmensk", + "tkl": "tokelau", + "tl": "tagalog", + "tlh": "klingon", + "tli": "tlingit", + "tmh": "tamasjek", + "tn": "tswana", + "to": "tongansk", + "tog": "tonga (Nyasa)", + "tpi": "tok pisin", + "tr": "tyrkisk", + "trv": "taroko", + "ts": "tsonga", + "tsi": "tsimshian", + "tt": "tatarisk", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitisk", + "tyv": "tuvinisk", + "tzm": "sentral-tamazight", + "udm": "udmurt", + "ug": "uigurisk", + "uga": "ugaritisk", + "uk": "ukrainsk", + "umb": "umbundu", + "und": "ukjent sprÃ¥k", + "ur": "urdu", + "uz": "usbekisk", + "vai": "vai", + "ve": "venda", + "vi": "vietnamesisk", + "vo": "volapyk", + "vot": "votisk", + "vun": "vunjo", + "wa": "vallonsk", + "wae": "walsertysk", + "wal": "wolaytta", + "war": "waray", + "was": "washo", + "wo": "wolof", + "xal": "kalmykisk", + "xh": "xhosa", + "xog": "soga", + "yao": "yao", + "yap": "yapesisk", + "yav": "yangben", + "ybb": "yemba", + "yi": "jiddisk", + "yo": "joruba", + "yue": "kantonesisk", + "za": "zhuang", + "zap": "zapotec", + "zbl": "blissymbol", + "zen": "zenaga", + "zgh": "standard marokkansk tamazight", + "zh": "kinesisk", + "zh_Hans": "forenkla kinesisk", + "zh_Hant": "tradisjonell kinesisk", + "zu": "zulu", + "zun": "zuni", + "zxx": "utan sprÃ¥kleg innhald", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/no.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/no.json new file mode 100644 index 0000000000000000000000000000000000000000..c634ee84e37d0b10a078318b1d7b57232cb3ce39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/no.json @@ -0,0 +1,606 @@ +{ + "Version": "2.1.30.7", + "Names": { + "aa": "afar", + "ab": "abkhasisk", + "ace": "achinesisk", + "ach": "acoli", + "ada": "adangme", + "ady": "adygeisk", + "ae": "avestisk", + "aeb": "tunisisk-arabisk", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainu", + "ak": "akan", + "akk": "akkadisk", + "akz": "alabama", + "ale": "aleutisk", + "aln": "gegisk-albansk", + "alt": "søraltaisk", + "am": "amharisk", + "an": "aragonsk", + "ang": "gammelengelsk", + "anp": "angika", + "ar": "arabisk", + "ar_001": "moderne standardarabisk", + "arc": "arameisk", + "arn": "mapudungun", + "aro": "araona", + "arp": "arapaho", + "arq": "algerisk arabisk", + "arw": "arawak", + "ary": "marokkansk-arabisk", + "arz": "egyptisk arabisk", + "as": "assamesisk", + "asa": "asu", + "ase": "amerikansk tegnsprÃ¥k", + "ast": "asturisk", + "av": "avarisk", + "avk": "kotava", + "awa": "avadhi", + "ay": "aymara", + "az": "aserbajdsjansk", + "ba": "basjkirsk", + "bal": "baluchi", + "ban": "balinesisk", + "bar": "bairisk", + "bas": "basaa", + "bax": "bamun", + "bbc": "batak toba", + "bbj": "ghomala", + "be": "hviterussisk", + "bej": "beja", + "bem": "bemba", + "bew": "betawi", + "bez": "bena", + "bfd": "bafut", + "bfq": "badaga", + "bg": "bulgarsk", + "bgn": "vestbalutsji", + "bho": "bhojpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bjn": "banjar", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bengali", + "bo": "tibetansk", + "bpy": "bishnupriya", + "bqi": "bakhtiari", + "br": "bretonsk", + "bra": "braj", + "brh": "brahui", + "brx": "bodo", + "bs": "bosnisk", + "bss": "akose", + "bua": "burjatisk", + "bug": "buginesisk", + "bum": "bulu", + "byn": "blin", + "byv": "medumba", + "ca": "katalansk", + "cad": "caddo", + "car": "karibisk", + "cay": "cayuga", + "cch": "atsam", + "ce": "tsjetsjensk", + "ceb": "cebuansk", + "cgg": "kiga", + "ch": "chamorro", + "chb": "chibcha", + "chg": "tsjagatai", + "chk": "chuukesisk", + "chm": "mari", + "chn": "chinook", + "cho": "choctaw", + "chp": "chipewiansk", + "chr": "cherokesisk", + "chy": "cheyenne", + "ckb": "kurdisk (sorani)", + "co": "korsikansk", + "cop": "koptisk", + "cps": "kapiz", + "cr": "cree", + "crh": "krimtatarisk", + "crs": "seselwa", + "cs": "tsjekkisk", + "csb": "kasjubisk", + "cu": "kirkeslavisk", + "cv": "tsjuvasjisk", + "cy": "walisisk", + "da": "dansk", + "dak": "dakota", + "dar": "dargwa", + "dav": "taita", + "de": "tysk", + "del": "delaware", + "den": "slavey", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "lavsorbisk", + "dtp": "sentraldusun", + "dua": "duala", + "dum": "mellomnederlandsk", + "dv": "dhivehi", + "dyo": "jola-fonyi", + "dyu": "dyula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "kiembu", + "ee": "ewe", + "efi": "efik", + "egl": "emiliansk", + "egy": "gammelegyptisk", + "eka": "ekajuk", + "el": "gresk", + "elx": "elamittisk", + "en": "engelsk", + "enm": "mellomengelsk", + "eo": "esperanto", + "es": "spansk", + "esu": "sentralyupik", + "et": "estisk", + "eu": "baskisk", + "ewo": "ewondo", + "ext": "ekstremaduransk", + "fa": "persisk", + "fan": "fang", + "fat": "fanti", + "ff": "fulfulde", + "fi": "finsk", + "fil": "filipino", + "fit": "tornedalsfinsk", + "fj": "fijiansk", + "fo": "færøysk", + "fon": "fon", + "fr": "fransk", + "frc": "cajunfransk", + "frm": "mellomfransk", + "fro": "gammelfransk", + "frp": "arpitansk", + "frr": "nordfrisisk", + "frs": "østfrisisk", + "fur": "friuliansk", + "fy": "vestfrisisk", + "ga": "irsk", + "gaa": "ga", + "gag": "gagausisk", + "gan": "gan", + "gay": "gayo", + "gba": "gbaya", + "gbz": "zoroastrisk dari", + "gd": "skotsk-gælisk", + "gez": "geez", + "gil": "kiribatisk", + "gl": "galisisk", + "glk": "gileki", + "gmh": "mellomhøytysk", + "gn": "guarani", + "goh": "gammelhøytysk", + "gom": "goansk konkani", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotisk", + "grb": "grebo", + "grc": "gammelgresk", + "gsw": "sveitsertysk", + "gu": "gujarati", + "guc": "wayuu", + "gur": "frafra", + "guz": "gusii", + "gv": "mansk", + "gwi": "gwichin", + "ha": "hausa", + "hai": "haida", + "hak": "hakka", + "haw": "hawaiisk", + "he": "hebraisk", + "hi": "hindi", + "hif": "fijiansk hindi", + "hil": "hiligaynon", + "hit": "hettittisk", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "kroatisk", + "hsb": "høysorbisk", + "hsn": "xiang", + "ht": "haitisk", + "hu": "ungarsk", + "hup": "hupa", + "hy": "armensk", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonesisk", + "ie": "interlingue", + "ig": "ibo", + "ii": "sichuan-yi", + "ik": "inupiak", + "ilo": "iloko", + "inh": "ingusjisk", + "io": "ido", + "is": "islandsk", + "it": "italiensk", + "iu": "inuittisk", + "izh": "ingrisk", + "ja": "japansk", + "jam": "jamaicansk kreolengelsk", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jpr": "jødepersisk", + "jrb": "jødearabisk", + "jut": "jysk", + "jv": "javanesisk", + "ka": "georgisk", + "kaa": "karakalpakisk", + "kab": "kabylsk", + "kac": "kachin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardisk", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "kappverdisk", + "ken": "kenyang", + "kfo": "koro", + "kg": "kikongo", + "kgp": "kaingang", + "kha": "khasi", + "kho": "khotanesisk", + "khq": "koyra chiini", + "khw": "khowar", + "ki": "kikuyu", + "kiu": "kirmancki", + "kj": "kuanyama", + "kk": "kasakhisk", + "kkj": "kako", + "kl": "grønlandsk", + "kln": "kalenjin", + "km": "khmer", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "koreansk", + "koi": "komipermjakisk", + "kok": "konkani", + "kos": "kosraeansk", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karatsjajbalkarsk", + "kri": "krio", + "krj": "kinaray-a", + "krl": "karelsk", + "kru": "kurukh", + "ks": "kasjmiri", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "kølnsk", + "ku": "kurdisk", + "kum": "kumykisk", + "kut": "kutenai", + "kv": "komi", + "kw": "kornisk", + "ky": "kirgisisk", + "la": "latin", + "lad": "ladinsk", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "luxemburgsk", + "lez": "lesgisk", + "lfn": "lingua franca nova", + "lg": "ganda", + "li": "limburgsk", + "lij": "ligurisk", + "liv": "livisk", + "lkt": "lakota", + "lmo": "lombardisk", + "ln": "lingala", + "lo": "laotisk", + "lol": "mongo", + "loz": "lozi", + "lrc": "nord-luri", + "lt": "litauisk", + "ltg": "latgallisk", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "mizo", + "luy": "luhya", + "lv": "latvisk", + "lzh": "klassisk kinesisk", + "lzz": "lazisk", + "mad": "maduresisk", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makasar", + "man": "mandingo", + "mas": "masai", + "mde": "maba", + "mdf": "moksja", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "mauritisk-kreolsk", + "mg": "gassisk", + "mga": "mellomirsk", + "mgh": "makhuwa-meetto", + "mgo": "meta’", + "mh": "marshallesisk", + "mi": "maori", + "mic": "micmac", + "min": "minangkabau", + "mk": "makedonsk", + "ml": "malayalam", + "mn": "mongolsk", + "mnc": "mandsju", + "mni": "manipuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "marathi", + "mrj": "vestmarisk", + "ms": "malayisk", + "mt": "maltesisk", + "mua": "mundang", + "mul": "flere sprÃ¥k", + "mus": "creek", + "mwl": "mirandesisk", + "mwr": "marwari", + "mwv": "mentawai", + "my": "burmesisk", + "mye": "myene", + "myv": "erzia", + "mzn": "mazandarani", + "na": "nauru", + "nan": "minnan", + "nap": "napolitansk", + "naq": "nama", + "nb": "norsk bokmÃ¥l", + "nd": "nord-ndebele", + "nds": "nedertysk", + "nds_NL": "nedersaksisk", + "ne": "nepali", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niueansk", + "njo": "ao naga", + "nl": "nederlandsk", + "nl_BE": "flamsk", + "nmg": "kwasio", + "nn": "norsk nynorsk", + "nnh": "ngiemboon", + "no": "norsk", + "nog": "nogaisk", + "non": "gammelnorsk", + "nov": "novial", + "nqo": "nʼko", + "nr": "sør-ndebele", + "nso": "nord-sotho", + "nus": "nuer", + "nv": "navajo", + "nwc": "klassisk newari", + "ny": "nyanja", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzima", + "oc": "oksitansk", + "oj": "ojibwa", + "om": "oromo", + "or": "oriya", + "os": "ossetisk", + "osa": "osage", + "ota": "ottomansk tyrkisk", + "pa": "punjabi", + "pag": "pangasinan", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauisk", + "pcd": "pikardisk", + "pcm": "nigeriansk pidginsprÃ¥k", + "pdc": "pennsylvaniatysk", + "pdt": "plautdietsch", + "peo": "gammelpersisk", + "pfl": "palatintysk", + "phn": "fønikisk", + "pi": "pali", + "pl": "polsk", + "pms": "piemontesisk", + "pnt": "pontisk", + "pon": "ponapisk", + "prg": "prøyssisk", + "pro": "gammelprovençalsk", + "ps": "pashto", + "pt": "portugisisk", + "qu": "quechua", + "quc": "quiché", + "qug": "kichwa (Chimborazo-høylandet)", + "raj": "rajasthani", + "rap": "rapanui", + "rar": "rarotongansk", + "rgn": "romagnolsk", + "rif": "riff", + "rm": "retoromansk", + "rn": "rundi", + "ro": "rumensk", + "ro_MD": "moldovsk", + "rof": "rombo", + "rom": "romani", + "root": "rot", + "rtm": "rotumansk", + "ru": "russisk", + "rue": "rusinsk", + "rug": "roviana", + "rup": "aromansk", + "rw": "kinyarwanda", + "rwk": "rwa", + "sa": "sanskrit", + "sad": "sandawe", + "sah": "jakutisk", + "sam": "samaritansk arameisk", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "saz": "saurashtra", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardisk", + "scn": "siciliansk", + "sco": "skotsk", + "sd": "sindhi", + "sdc": "sassaresisk sardisk", + "sdh": "sørkurdisk", + "se": "nordsamisk", + "see": "seneca", + "seh": "sena", + "sei": "seri", + "sel": "selkupisk", + "ses": "koyraboro senni", + "sg": "sango", + "sga": "gammelirsk", + "sgs": "samogitisk", + "sh": "serbokroatisk", + "shi": "tachelhit", + "shn": "shan", + "shu": "tsjadisk arabisk", + "si": "singalesisk", + "sid": "sidamo", + "sk": "slovakisk", + "sl": "slovensk", + "sli": "lavschlesisk", + "sly": "selayar", + "sm": "samoansk", + "sma": "sørsamisk", + "smj": "lulesamisk", + "smn": "enaresamisk", + "sms": "skoltesamisk", + "sn": "shona", + "snk": "soninke", + "so": "somali", + "sog": "sogdisk", + "sq": "albansk", + "sr": "serbisk", + "srn": "sranan", + "srr": "serer", + "ss": "swati", + "ssy": "saho", + "st": "sør-sotho", + "stq": "saterfrisisk", + "su": "sundanesisk", + "suk": "sukuma", + "sus": "susu", + "sux": "sumerisk", + "sv": "svensk", + "sw": "swahili", + "sw_CD": "kongolesisk swahili", + "swb": "komorisk", + "syc": "klassisk syrisk", + "syr": "gammelsyrisk", + "szl": "schlesisk", + "ta": "tamil", + "tcy": "tulu", + "te": "telugu", + "tem": "temne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadsjikisk", + "th": "thai", + "ti": "tigrinja", + "tig": "tigré", + "tiv": "tiv", + "tk": "turkmensk", + "tkl": "tokelauisk", + "tkr": "tsakhursk", + "tl": "tagalog", + "tlh": "klingon", + "tli": "tlingit", + "tly": "talysj", + "tmh": "tamasjek", + "tn": "setswana", + "to": "tongansk", + "tog": "nyasa-tongansk", + "tpi": "tok pisin", + "tr": "tyrkisk", + "tru": "turoyo", + "trv": "taroko", + "ts": "tsonga", + "tsd": "tsakonisk", + "tsi": "tsimshian", + "tt": "tatarisk", + "ttt": "muslimsk tat", + "tum": "tumbuka", + "tvl": "tuvalsk", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitisk", + "tyv": "tuvinsk", + "tzm": "sentralmarokkansk tamazight", + "udm": "udmurtisk", + "ug": "uigurisk", + "uga": "ugaritisk", + "uk": "ukrainsk", + "umb": "umbundu", + "und": "ukjent sprÃ¥k", + "ur": "urdu", + "uz": "usbekisk", + "vai": "vai", + "ve": "venda", + "vec": "venetiansk", + "vep": "vepsisk", + "vi": "vietnamesisk", + "vls": "vestflamsk", + "vmf": "Main-frankisk", + "vo": "volapyk", + "vot": "votisk", + "vro": "sørestisk", + "vun": "vunjo", + "wa": "vallonsk", + "wae": "walsertysk", + "wal": "wolaytta", + "war": "waray-waray", + "was": "washo", + "wbp": "warlpiri", + "wo": "wolof", + "wuu": "wu", + "xal": "kalmukkisk", + "xh": "xhosa", + "xmf": "mingrelsk", + "xog": "soga", + "yao": "yao", + "yap": "yapesisk", + "yav": "yangben", + "ybb": "yemba", + "yi": "jiddisk", + "yo": "joruba", + "yrl": "nheengatu", + "yue": "kantonesisk", + "za": "zhuang", + "zap": "zapotekisk", + "zbl": "blissymboler", + "zea": "zeeuws", + "zen": "zenaga", + "zgh": "standard marrokansk tamazight", + "zh": "kinesisk", + "zh_Hans": "forenklet kinesisk", + "zh_Hant": "tradisjonell kinesisk", + "zu": "zulu", + "zun": "zuni", + "zxx": "uten sprÃ¥klig innhold", + "zza": "zazaisk" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/om.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/om.json new file mode 100644 index 0000000000000000000000000000000000000000..a2e7bea5d4349bdc496d666fdeee971f68da94a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/om.json @@ -0,0 +1,91 @@ +{ + "Version": "2.1.27.98", + "Names": { + "af": "Afrikoota", + "am": "Afaan Sidaamaa", + "ar": "Arabiffaa", + "az": "Afaan Azerbaijani", + "be": "Afaan Belarusia", + "bg": "Afaan Bulgariya", + "bn": "Afaan Baangladeshi", + "bs": "Afaan Bosniyaa", + "ca": "Afaan Katalaa", + "cs": "Afaan Czech", + "cy": "Welishiffaa", + "da": "Afaan Deenmaark", + "de": "Afaan Jarmanii", + "el": "Afaan Giriiki", + "en": "Ingliffa", + "eo": "Afaan Esperantoo", + "es": "Afaan Ispeen", + "et": "Afaan Istooniya", + "eu": "Afaan Baskuu", + "fa": "Afaan Persia", + "fi": "Afaan Fiilaandi", + "fil": "Afaan Filippinii", + "fo": "Afaan Faroese", + "fr": "Afaan Faransaayii", + "fy": "Afaan Firisiyaani", + "ga": "Afaan Ayirishii", + "gd": "Scots Gaelic", + "gl": "Afaan Galishii", + "gn": "Afaan Guarani", + "gu": "Afaan Gujarati", + "he": "Afaan Hebrew", + "hi": "Afaan Hindii", + "hr": "Afaan Croatian", + "hu": "Afaan Hangaari", + "ia": "Interlingua", + "id": "Afaan Indoneziya", + "is": "Ayiislandiffaa", + "it": "Afaan Xaaliyaani", + "ja": "Afaan Japanii", + "jv": "Afaan Java", + "ka": "Afaan Georgian", + "kn": "Afaan Kannada", + "ko": "Afaan Korea", + "la": "Afaan Laatini", + "lt": "Afaan Liituniyaa", + "lv": "Afaan Lativiyaa", + "mk": "Afaan Macedooniyaa", + "ml": "Malayaalamiffaa", + "mr": "Afaan Maratii", + "ms": "Malaayiffaa", + "mt": "Afaan Maltesii", + "ne": "Afaan Nepalii", + "nl": "Afaan Dachii", + "nn": "Afaan Norwegian", + "no": "Afaan Norweyii", + "oc": "Afaan Occit", + "om": "Oromoo", + "pa": "Afaan Punjabii", + "pl": "Afaan Polandii", + "pt": "Afaan Porchugaal", + "pt_BR": "Afaan Portugali (Braazil)", + "pt_PT": "Afaan Protuguese", + "ro": "Afaan Romaniyaa", + "ru": "Afaan Rushiyaa", + "si": "Afaan Sinhalese", + "sk": "Afaan Slovak", + "sl": "Afaan Islovaniyaa", + "sq": "Afaan Albaniyaa", + "sr": "Afaan Serbiya", + "su": "Afaan Sudaanii", + "sv": "Afaan Suwidiin", + "sw": "Suwahilii", + "ta": "Afaan Tamilii", + "te": "Afaan Telugu", + "th": "Afaan Tayii", + "ti": "Afaan Tigiree", + "tk": "Lammii Turkii", + "tlh": "Afaan Kilingon", + "tr": "Afaan Turkii", + "uk": "Afaan Ukreenii", + "ur": "Afaan Urdu", + "uz": "Afaan Uzbek", + "vi": "Afaan Veetinam", + "xh": "Afaan Xhosa", + "zh": "Chinese", + "zu": "Afaan Zuulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/or.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/or.json new file mode 100644 index 0000000000000000000000000000000000000000..8ce434f750a2dcfdf47af5546fa3585fb8413c88 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/or.json @@ -0,0 +1,444 @@ +{ + "Version": "2.1.27.78", + "Names": { + "aa": "ଅଫାରà­", + "ab": "ଆବà­à¬–ାଜିଆନà­", + "ace": "ଆଚାଇନୀଜà­", + "ach": "ଆକୋଲି", + "ada": "ଆଦାଙà­à¬—େମà­", + "ady": "ଅଦà­à­Ÿà¬˜à­‡", + "ae": "ଅବେସà­à¬¤à¬¨", + "af": "ଆଫà­à¬°à¬¿à¬•ାନସà­", + "afh": "ଆଫà­à¬°à¬¿à¬¹à¬¿à¬²à¬¿", + "ain": "ଆଇନà­", + "ak": "ଅକନà­", + "akk": "ଆକାଡିଆନà­", + "ale": "ଆଲେଇଟà­", + "alt": "ଦକà­à¬·à¬¿à¬£ ଆଲà­à¬Ÿà¬¾à¬‡", + "am": "ଆମହାରକି", + "an": "ଆରà­à¬—ୋନୀ", + "ang": "ପà­à¬°à­à¬£à¬¾ ଇà¬à¬°à¬¾à¬œà­€", + "anp": "ଅà¬à¬—ୀକା", + "ar": "ଆରବିକà­", + "arc": "ଆରାମାଇକà­", + "arn": "ଆରାଉକାନିଆନà­", + "arp": "ଆରାପାହୋ", + "arw": "ଆରୱକ", + "as": "ଆସାମୀ", + "ast": "ଆଷà­à¬Ÿà­à¬°à¬¿à¬†à¬¨à­", + "av": "ଆଭାରିକà­", + "awa": "ଆୱାଧି", + "ay": "ଆୟମାରା", + "az": "ଆଜେରବାଇଜାନି", + "ba": "ବଶଖିରà­", + "bal": "ବାଲà­à¬šà¬¿", + "ban": "ବାଲିନୀଜà­", + "bas": "ବାସା", + "be": "ବେଲାରà­à¬·à¬¿à¬†à¬¨à­", + "bej": "ବେଜା", + "bem": "ବେମà­à¬¬à¬¾", + "bg": "ବà­à¬²à¬—େରିଆନà­", + "bho": "ଭୋଜପà­à¬°à­€", + "bi": "ବିସଲାମା", + "bik": "ବିକୋଲà­", + "bin": "ବିନି", + "bla": "ବିକà­à¬¸à¬¿à¬•ା", + "bm": "ବାମà­à¬¬à¬¾à¬°à¬¾", + "bn": "ବଙà­à¬—ାଳୀ", + "bo": "ତିବେତାନà­", + "br": "ବà­à¬°à­‡à¬Ÿà¬¨à­", + "bra": "ବà­à¬°à¬¾à¬œà­", + "bs": "କାଟଲାନà­", + "bua": "ବà­à¬°à¬¿à¬†à¬Ÿà­", + "bug": "ବà­à¬—ୀନୀଜà­", + "byn": "ବà­à¬²à¬¿à¬¨à­", + "ca": "କାଟାଲାନà­", + "cad": "କାଡୋ", + "car": "କାରିବà­", + "cch": "ଆତà­à¬¸à¬®à­", + "ce": "ଚେଚନà­", + "ceb": "ସୀବà­à¬†à¬¨à­‹", + "ch": "ଚାମୋରୋ", + "chb": "ଚିବà­à¬šà¬¾", + "chg": "ଛଗତାଇ", + "chk": "ଚà­à¬•ୀସେ", + "chm": "ମାରୀ", + "chn": "ଚିନà­à¬•ୠଜାରଗାà¬à¬¨à­", + "cho": "ଚୋଟୱା", + "chp": "ଚିପେୱାନà­", + "chr": "ଚେରୋକୀ", + "chy": "ଚେଚେନା", + "co": "କୋରà­à¬¸à¬¿à¬•ାନà­", + "cop": "କପà­à¬Ÿà¬¿à¬•à­", + "cr": "କà­à¬°à­€", + "crh": "କà­à¬°à­€à¬®à¬¿à¬¨à­ ତà­à¬°à­à¬•ୀସà­", + "cs": "ଚେକà­", + "csb": "କାଶà­à¬¬à¬¿à¬†à¬¨à­", + "cu": "ଚରà­à¬šà­à¬š ସà­à¬²à¬¾à¬­à¬¿à¬•à­", + "cv": "ଚà­à¬­à¬¾à¬¶à­", + "cy": "ୱେଲà­à¬¸", + "da": "ଡାନà­à¬¨à¬¿à¬¸à­", + "dak": "ଡାକୋଟା", + "dar": "ଡାରାଗà­à­±à¬¾", + "de": "ଜରà­à¬®à¬¾à¬¨à­", + "de_AT": "ଅଷà­à¬Ÿà­à¬°à¬¿à¬†à¬¨à­ ଜରà­à¬®à¬¾à¬¨", + "de_CH": "ସà­à¬¬à¬¿à¬¸à­ ହାଇ ଜରà­à¬®à¬¾à¬¨à­", + "del": "ଡେଲାୱେରà­", + "den": "ସà­à¬²à­‡à¬­à­", + "dgr": "ଡୋଗà­à¬°à¬¿à¬¬à­", + "din": "ଦିଙà­à¬•ା", + "doi": "ଡୋଗà­à¬°à­€", + "dsb": "ନିଚଳା ସରà­à¬¬à¬¿à¬†à¬¨à­", + "dua": "ଡà­à¬†à¬¨à¬¾", + "dum": "ମଧà­à­Ÿ ପରà­à¬¤à­à¬¤à­à¬—ାଲୀ", + "dv": "ଡିଭେହୀ", + "dyu": "ଡà­à¬†à¬²à¬¾", + "dz": "ଭୂଟାନୀ", + "ee": "ଇୱେ", + "efi": "à¬à¬«à¬¿à¬•à­", + "egy": "ପà­à¬°à¬¾à¬šà­€à¬¨à­ ମିଶିରି", + "eka": "à¬à¬•ାଜà­à¬•à­", + "el": "ଗà­à¬°à­€à¬•à­", + "elx": "à¬à¬²à¬¾à¬®à¬¾à¬‡à¬Ÿà­", + "en": "ଇଂରାଜୀ", + "en_AU": "ଅଷà­à¬Ÿà­à¬°à­‡à¬²à¬¿à¬†à¬¨à­ ଇà¬à¬°à¬¾à¬œà­€", + "en_CA": "କାନାଡିଆନୠଇà¬à¬°à¬¾à¬œà­€", + "en_GB": "ବà­à¬°à¬¿à¬Ÿà¬¿à¬¶à­ ଇà¬à¬°à¬¾à¬œà­€", + "en_US": "à­Ÿà­.à¬à¬¸à­. ଇà¬à¬°à¬¾à¬œà­€", + "enm": "ମଧà­à­Ÿ ଇà¬à¬°à¬¾à¬œà­€", + "eo": "à¬à¬¸à­à¬ªà¬¾à¬°à­‡à¬£à­à¬Ÿà­‹", + "es": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­", + "es_419": "ଲାଟିନୠଆମେରିକାନୠସà­à¬ªà¬¾à¬¨à¬¿à¬¶à­", + "es_ES": "ଲେବେରିଆନୠସà­à¬ªà¬¾à¬¨à¬¿à¬¶à­", + "et": "à¬à¬¸à­à¬¤à­‹à¬¨à¬¿à¬†à¬¨à­", + "eu": "ବାସà­à¬•à­à­±à¬¿", + "ewo": "ଇୱୋଣà­à¬¡à­‹", + "fa": "ପରà­à¬¸à¬¿à¬†à¬¨à­", + "fan": "ଫାଙà­à¬—", + "fat": "ଫାଣà­à¬Ÿà¬¿", + "ff": "ଫà­à¬²à¬¾à¬¹", + "fi": "ଫିନà­à¬¨à¬¿à¬¸à­", + "fil": "ଫିଲିପିନୋ", + "fj": "ଫିଜି", + "fo": "ଫାରୋà¬à¬¸à­‡", + "fon": "ଫନà­", + "fr": "ଫà­à¬°à­‡à¬žà­à¬š", + "fr_CA": "କାନାଡିଆନୠଫà­à¬°à­‡à¬žà­à¬š", + "fr_CH": "ସà­à¬¬à¬¿à¬¸à­ ଫà­à¬°à­‡à¬žà­à¬šà­", + "frm": "ମଧà­à­Ÿ ଫà­à¬°à­‡à¬žà­à¬š", + "fro": "ପà­à¬°à­à¬£à¬¾ ଫà­à¬°à­‡à¬žà­à¬š", + "frr": "ଉତà­à¬¤à¬° ଫà­à¬°à¬¿à¬¸à¬¿à­Ÿà¬¾à¬¨à­", + "frs": "ପୂରà­à¬¬ ଫà­à¬°à¬¿à¬¸à¬¿à­Ÿà¬¾à¬¨à­", + "fur": "ଫà­à¬°à¬¿à­Ÿà­à¬²à­€à­Ÿà¬¾à¬¨à­", + "fy": "ପଶà­à¬šà¬¿à¬® ଫà­à¬°à¬¿à¬¸à¬¿à­Ÿà¬¨à­", + "ga": "ଇରିସà­", + "gaa": "ଗା", + "gay": "ଗାୟୋ", + "gba": "ଗବାୟା", + "gd": "ସà­à¬•ଟିସୠଗାà¬à¬²à¬¿à¬•à­", + "gez": "ଗୀଜà­", + "gil": "ଜିବà­à¬°à¬¾à¬Ÿà­€à¬œà­", + "gl": "ଗାଲସିଆନà­", + "gmh": "ମିଡିଲୠହାଇ ଜରà­à¬®à¬¾à¬¨à­", + "gn": "ଗà­à¬†à¬°à¬¾à¬¨à­€", + "goh": "ପà­à¬°à­à¬£à¬¾ ହାଇ ଜରà­à¬®à¬¾à¬¨à­", + "gon": "ଗୋଣà­à¬¡à¬¿", + "gor": "ଗୋରୋଣà­à¬Ÿà¬¾à¬²à­‹", + "got": "ଗୋଥିକà­", + "grb": "ଗà­à¬°à­‡à¬¬à­‹", + "grc": "ପà­à¬°à¬¾à¬šà­€à¬¨à­ à­Ÿà­à¬¨à¬¾à¬¨à­€", + "gsw": "ସà­à¬¬à¬¿à¬¸à­ ଜରà­à¬®à¬¾à¬¨à­", + "gu": "ଗà­à¬œà­à¬°à¬¾à¬Ÿà­€", + "gv": "ମାà¬à¬•à­à¬¸", + "gwi": "ସà­à¬¬à¬¿à¬šà­ ଇନà­", + "ha": "ହୌସା", + "hai": "ହାଇଡା", + "haw": "ହାୱାଇନà­", + "he": "ହେବà­à¬°à­à­Ÿà­", + "hi": "ହିନà­à¬¦à­€", + "hil": "ହିଲିଗୈନନà­", + "hit": "ହିତୀତେ", + "hmn": "ହà¬à¬™à­à¬—", + "ho": "ହିରି ମୋଟà­", + "hr": "କà­à¬°à­‹à¬†à¬Ÿà¬¿à¬†à¬¨à­", + "hsb": "ଉପର ସରà­à¬¬à¬¿à¬†à¬¨à­", + "ht": "ହୈତାୟିନà­", + "hu": "ହଙà­à¬—େରିଆନà­", + "hup": "ହà­à¬ªà¬¾", + "hy": "ଆରà­à¬®à­‡à¬¨à¬¿à¬†à¬¨à­", + "hz": "ହେରେରୋ", + "ia": "ଇରà­à¬£à­à¬Ÿà¬²à¬¿à¬™à­à¬—à­à¬†", + "iba": "ଇବାନà­", + "id": "ଇଣà­à¬¡à­‹à¬¨à­‡à¬¸à¬¿à¬†à¬¨à­", + "ie": "ଇରà­à¬£à­à¬Ÿà¬°à¬²à¬¿à¬™à­à¬—à­à¬‡", + "ig": "ଇଗà­à¬¬à­‹", + "ii": "ସିଚà­à¬†à¬¨à­ à­Ÿà­€", + "ik": "ଇନà­à¬ªà¬¿à­Ÿà¬¾à¬•à­", + "ilo": "ଇଲୋକୋ", + "inh": "ଇà¬à¬™à­à¬—à­à¬¶à­", + "io": "ଇଡୋ", + "is": "ଆଇସଲାଣà­à¬¡à¬¿à¬•à­", + "it": "ଇଟାଲିଆନà­", + "iu": "ଇନକୀଟà­à¬¤à­", + "ja": "ଜାପାନୀଜà­", + "jbo": "ଲୋଜବାନà­", + "jpr": "ଜà­à¬¡à­‡à¬“-ପରà­à¬¸à¬¿à¬†à¬¨à­", + "jrb": "ଜà­à¬¡à­‡à¬“-ଆରବୀକà­", + "jv": "ଜାଭାନୀଜà­", + "ka": "ଜରà­à¬œà¬¿à¬†à¬¨à­", + "kaa": "କାରା-କଲà­à¬ªà¬•à­", + "kab": "କବାଇଲà­", + "kac": "କଚିନà­", + "kaj": "ଜà­à¬œà­", + "kam": "କମà­à¬¬à¬¾", + "kaw": "କାୱି", + "kbd": "କାବାରà­à¬¡à¬¿à¬†à¬¨à­", + "kcg": "ତà­à­Ÿà¬¾à¬ªà­", + "kfo": "କୋରୋ", + "kg": "କଙà­à¬—à­‹", + "kha": "ଖାସୀ", + "kho": "ଖୋତାନୀଜà­", + "ki": "କୀକà­à­Ÿà­", + "kj": "କà­à­±à¬¾à¬¨à­à­Ÿà¬¾à¬®à­", + "kk": "କାଜାକà­", + "kl": "ଗà­à¬°à­€à¬¨à¬²à¬¾à¬£à­à¬¡à¬¿à¬•à­", + "km": "ଖà­à¬®à­‡à¬°à­", + "kmb": "କିମà­à¬¬à­à¬£à­à¬¡à­", + "kn": "କନà­à¬¨à¬¡", + "ko": "କୋରିଆନà­", + "kok": "କୋନକାନୀ", + "kos": "କୋସରୈନà­", + "kpe": "କୈପେଲେ", + "kr": "କନà­à¬°à­€", + "krc": "କରାଚୟ-ବଲà­à¬•ାର", + "krl": "କାରେଲିୟାନà­", + "kru": "କà­à¬°à­à¬–", + "ks": "କାଶà­à¬®à¬¿à¬°à­€", + "ku": "କà­à¬°à­à¬¦à­à¬¦à¬¿à¬¶à­", + "kum": "କà­à¬®à­€à¬•à­", + "kut": "କà­à¬¤à­‡à¬¨à¬¾à¬‰", + "kv": "କୋମି", + "kw": "କୋରà­à¬¨à¬¿à¬¸à­", + "ky": "କିରଗିଜà­", + "la": "ଲାଟିନà­", + "lad": "ଲାଦିନୋ", + "lah": "ଲାହାଣà­à¬¡à¬¾", + "lam": "ଲାମà­à¬¬à¬¾", + "lb": "ଲକà­à¬¸à­‡à¬®à¬¬à¬°à­à¬—ିସà­", + "lez": "ଲେଜଗିୟାନà­", + "lg": "ଗନà­à¬¦à¬¾", + "li": "ଲିମà­à¬¬à­à¬°à­à¬—ିସà­", + "ln": "ଲିଙà­à¬—ାଲା", + "lo": "ଲାଓ", + "lol": "ମଙà­à¬—à­‹", + "loz": "ଲୋଜି", + "lt": "ଲିଥà­à¬†à¬¨à¬¿à¬†à¬¨à­", + "lu": "ଲà­à­Ÿà­à¬¬à¬¾-କାଟାଙà­à¬—ା", + "lua": "ଲà­à¬¬à¬¾-ଲà­à¬²à­à¬†", + "lui": "ଲà­à¬‡à¬¸à­‡à¬¨à­‹", + "lun": "ଲà­à¬£à­à¬¡à¬¾", + "luo": "ଲà­à¬“", + "lus": "ଲà­à¬¸à¬¾à¬‰", + "lv": "ଲାଟଭିଆନà­", + "mad": "ମାଦà­à¬°à­€à¬¸à­", + "mag": "ମାଗାହୀ", + "mai": "ମୈଥିଳୀ", + "mak": "ମକାସରà­", + "man": "ମାଣà­à¬¡à¬¿à¬™à­à¬—à­‹", + "mas": "ମାସାଇ", + "mdf": "ମୋକà­à¬·", + "mdr": "ମନà­à¬¦à¬¾à¬°", + "men": "ମେଣà­à¬¡à­‡", + "mg": "ମାଲାଗାସୀ", + "mga": "ମଧà­à­Ÿ ଇରିଶà­", + "mh": "ମାରà­à¬¶à¬¾à¬²à­€à¬œà­", + "mi": "ମାଓରୀ", + "mic": "ମିକମୌକà­", + "min": "ମିନାଙà­à¬—ାବାଉ", + "mk": "ମାକଡୋନିଆନà­", + "ml": "ମାଲାୟଲମà­", + "mn": "ମଙà­à¬—ୋଲିଆନà­", + "mnc": "ମାଞà­à¬šà­", + "mni": "ମଣିପà­à¬°à­€", + "moh": "ମୋହୌକ", + "mos": "ମୋସି", + "mr": "ମରାଠୀ", + "ms": "ମାଲୟ", + "mt": "ମାଲଟୀଜà­", + "mul": "ବିବିଧ ଭାଷାମାନ", + "mus": "କà­à¬°à­€à¬•à­", + "mwl": "ମିରାଣà­à¬¡à¬¿à¬œà­", + "mwr": "ମାରୱାରୀ", + "my": "ବରà­à¬®à­€à¬œà­", + "myv": "à¬à¬°à­à¬œà­Ÿà¬¾", + "na": "ନାଉରà­", + "nap": "ନୀପୋଲିଟାନà­", + "nb": "ନରୱେଜିଆନୠବୋକମଲà­", + "nd": "ଉତà­à¬¤à¬° ନେଡବେଲେ", + "nds": "ଲୋ ଜରà­à¬®à¬¾à¬¨à­", + "ne": "ନେପାଳୀ", + "new": "ନେୱାରୀ", + "ng": "ଡୋଙà­à¬—ା", + "nia": "ନୀୟାସà­", + "niu": "ନିୟà­à¬†à¬¨à­", + "nl": "ଡଚà­", + "nl_BE": "ଫà­à¬²à­‡à¬®à¬¿à¬¶à­", + "nn": "ନରୱେଜିଆନୠନିୟୋରà­à¬¸à­à¬•", + "no": "ନରୱେଜିଆନà­", + "nog": "ନୋଗାଇ", + "non": "ପà­à¬°à­à¬£à¬¾ ନରà­à¬¸", + "nqo": "à¬à¬¨à­à¬•à­‹", + "nr": "ଦକà­à¬·à¬¿à¬£ ନେଡବେଲେ", + "nso": "ଉତà­à¬¤à¬°à­€ ସୋଥୋ", + "nv": "ନାଭାଜୋ", + "nwc": "ପାରମà­à¬ªà¬°à¬¿à¬• ନେୱାରୀ", + "ny": "ନିୟାଞà­à¬œ", + "nym": "ନà­à­Ÿà¬¾à¬®à­±à­‡à¬œà­€", + "nyn": "ନà­à­Ÿà¬¾à¬¨à¬•ୋଲà­", + "nyo": "ନà­à­Ÿà¬¾à¬°à­‹", + "nzi": "ଞà­à¬œà¬¿à¬®à¬¾", + "oc": "ଓସିଟାନà­", + "oj": "ଓଜିୱା", + "om": "ଓରୋମୋ", + "or": "ଓଡ଼ିଆ", + "os": "ଓସେଟିକà­", + "osa": "ୱୌସେଜà­", + "ota": "ଓଟà­à¬Ÿà­‹à¬®à¬¨à­ ତà­à¬°à­à¬•ିସà­", + "pa": "ପଞà­à¬œà¬¾à¬¬à­€", + "pag": "ପାଙà­à¬—ାସିନିଆନà­", + "pal": "ପାହà­à¬²à¬¾à¬­à¬¿", + "pam": "ପାମà­à¬ªà¬¾à¬™à­à¬—ା", + "pap": "ପାପିୟାମିଣà­à¬Ÿà­‹", + "pau": "ପାଲାଉଆନà­", + "peo": "ପà­à¬°à­à¬£à¬¾ ପରà­à¬¸à¬¿à¬†à¬¨à­", + "phn": "ଫୋନେସିଆନà­", + "pi": "ପାଲି", + "pl": "ପୋଲିଶà­", + "pon": "ପୋହପିà¬à¬¨à­", + "pro": "ପà­à¬°à­à¬£à¬¾ ପà­à¬°à­‡à¬­à­‡à¬¨à­‡à¬¸à¬¿à¬†à¬²à­", + "ps": "ପାସà­à¬¤à­‹", + "pt": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­", + "pt_BR": "ବà­à¬°à¬¾à¬œà¬¿à¬²à¬¿à¬†à¬¨à­ ପରà­à¬¤à­à¬¤à­à¬—ୀଜà­", + "pt_PT": "ଲେବେରିଆନୠପରà­à¬¤à­à¬¤à­à¬—ୀଜà­", + "qu": "କà­à­±à­‡à¬šà­à¬†", + "raj": "ରାଜସà­à¬¥à¬¾à¬¨à­€", + "rap": "ରାପାନà­à¬‡", + "rar": "ରାରୋତୋଙà­à¬—ନà­", + "rm": "ରେହେଟୋ-ରୋମାନà­à¬¸", + "rn": "ରà­à¬£à­à¬¡à¬¿", + "ro": "ରୋମାନିଆନà­", + "ro_MD": "ମୋଲଡୋଭିଆନà­", + "rom": "ରୋମାନି", + "root": "ମୂଳ", + "ru": "ରଷିଆନà­", + "rup": "ଆରୋମାନିଆନà­", + "rw": "କିନà­à­Ÿà¬¾à¬°à­±à¬¾à¬£à­à¬¡à¬¾", + "sa": "ସଂସà­à¬•ୃତ", + "sad": "ସଣà­à¬¡à¬¾à­±à­‡", + "sah": "ୟାକà­à¬Ÿà­", + "sam": "ସାମୌରିଟନୠଆରମାଇକà­", + "sas": "ସାସାକà­", + "sat": "ସାନà­à¬¤à¬¾à¬³à¬¿", + "sc": "ସରà­à¬¦à¬¿à¬¨à¬¿à¬†à¬¨à­", + "scn": "ସିଶିଲିଆନà­", + "sco": "ସà­à¬•ଟସà­", + "sd": "ସିନà­à¬§à­€", + "se": "ଉତà­à¬¤à¬° ସାମି", + "sel": "ସେଲà­à¬•ପà­", + "sg": "ସାଙà­à¬—à­‹", + "sga": "ପà­à¬°à­à¬£à¬¾ ଇରିଶà­", + "sh": "ସରà­à¬¬à­‹-କà­à¬°à­‹à¬†à¬Ÿà¬¿à¬†à¬¨à­", + "shn": "ଶାନà­", + "si": "ସିଂହଳ", + "sid": "ସିଦାମୋ", + "sk": "ସà­à¬²à­‹à¬­à¬¾à¬•à­", + "sl": "ସà­à¬²à­‹à¬­à­‡à¬¨à¬¿à¬†à¬¨à­", + "sm": "ସାମୋଆନà­", + "sma": "ଦକà­à¬·à¬¿à¬£ ସାମି", + "smj": "ଲà­à¬²à­‡ ସାମି", + "smn": "ଇନାରୀ ସାମି", + "sms": "ସà­à¬•ୋଲà­à¬Ÿ ସାମୀ", + "sn": "ଶୋନା", + "snk": "ସୋନିଙà­à¬•à­‡", + "so": "ସୋମାଲିଆ", + "sog": "ସୋଗଡିà¬à¬¨à­", + "sq": "ଆଲବାନିଆନà­", + "sr": "ସରà­à¬¬à¬¿à¬†à¬¨à­", + "srn": "ଶାରାନା ଟୋଙà­à¬—à­‹", + "srr": "ଶେରେରà­", + "ss": "ସà­à¬¬à¬¾à¬¤à­€", + "st": "ସେସୋଥୋ", + "su": "ସà­à¬¦à¬¾à¬¨à­€à¬œà­", + "suk": "ସà­à¬•à­à¬®à¬¾", + "sus": "ଶà­à¬¶à­", + "sux": "ସà­à¬®à­‡à¬°à¬¿à¬†à¬¨à­", + "sv": "ସà­à­±à­‡à¬¡à¬¿à¬¸à­", + "sw": "ସà­à­±à¬¾à¬¹à¬¿à¬²à­", + "syc": "କà­à¬²à¬¾à¬¸à¬¿à¬•ାଲୠସିରିକà­", + "syr": "ସିରିକà­", + "ta": "ତାମିଲà­", + "te": "ତେଲà­à¬—à­", + "tem": "ତିମନେ", + "ter": "ତେରେନୋ", + "tet": "ତେତà­à¬®à­", + "tg": "ତାଜିକà­", + "th": "ଥାଇ", + "ti": "ଟà­à¬°à¬¿à¬—ିନିଆ", + "tig": "ଟାଇଗà­à¬°à­‡", + "tiv": "ତୀଭà­", + "tk": "ତà­à¬°à­à¬•ମେନà­", + "tkl": "ଟୋକେଲାଉ", + "tl": "ଟାଗାଲଗà­", + "tlh": "କà­à¬²à¬¿à¬™à­à¬—ନà­", + "tli": "ତà­à¬²à¬¿à¬™à­à¬—ିଟà­", + "tmh": "ତାମାଶେକà­", + "tn": "ସେସà­à¬¬à¬¾à¬¨à¬¾", + "to": "ଟୋଙà­à¬—ା", + "tog": "ନà­à­Ÿà¬¾à¬¸à¬¾ ଟୋଙà­à¬—à­‹", + "tpi": "ଟୋକୠପିସିନà­", + "tr": "ତà­à¬°à­à¬•ିସà­", + "ts": "ସୋଂଗା", + "tsi": "ତିସିମିସିଆନà­", + "tt": "ତାତାରà­", + "tum": "ଟà­à¬®à­à¬¬à­à¬•ା", + "tvl": "ତà­à¬­à¬¾à¬²à­", + "tw": "ତà­à­±à¬¿", + "ty": "ତାହିତିଆନà­", + "tyv": "ତà­à¬­à¬¿à¬¨à¬¿à¬†à¬¨à­", + "udm": "ଉଦମୂରà­à¬¤à­à¬¤", + "ug": "à­Ÿà­à¬˜à­à¬°à­", + "uga": "à­Ÿà­à¬—ୋରଟିକà­", + "uk": "à­Ÿà­à¬•à­à¬°à¬¾à¬¨à¬¿à¬†à¬¨à­", + "umb": "ଉମà­à¬¬à­à¬£à­à¬¡à­", + "und": "ଅଜଣା à¬à¬¬à¬‚ ଅବୈଧ ଭାଷା", + "ur": "ଉରà­à¬¦à­à¬¦à­", + "uz": "ଉଜବେକà­", + "vai": "ଭାଇ", + "ve": "ଭେଣà­à¬¡à¬¾", + "vi": "ଭିà¬à¬¤à¬¨à¬¾à¬®à¬¿à¬œà­", + "vo": "ବୋଲାପà­à¬•", + "vot": "ଭୋଟିକà­", + "wa": "ୱାଲà­à¬¨à­", + "wal": "ୱାଲମୋ", + "war": "ୱାରୈ", + "was": "ୱାସୋ", + "wo": "ୱୋଲଫà­", + "xal": "କାଲà­à¬®à­€à¬•à­", + "xh": "ଖୋସା", + "yao": "ୟାଓ", + "yap": "ୟାପୀସà­", + "yi": "ୟିଡିସà­", + "yo": "ୟୋରà­à¬¬à¬¾", + "za": "ଜà­à¬†à¬™à­à¬—", + "zap": "ଜାପୋଟେକà­", + "zbl": "ବà­à¬²à¬¿à¬¸à¬¿à¬®à­à¬¬à¬²à¬¸à­", + "zen": "ଜେନାଗା", + "zh": "ଚାଇନୀଜà­", + "zh_Hans": "ସରଳିକରଣ ଚାଇନୀଜà­", + "zh_Hant": "ପାରମà­à¬ªà¬°à¬¿à¬• ଚାଇନୀଜà­", + "zu": "ଜà­à¬²à­", + "zun": "ଜà­à¬¨à­€", + "zxx": "କୌଣସି ଲିଙà­à¬—à­à¬‡à¬·à­à¬Ÿ ସାମଗà­à¬°à­€ ନାହିà¬", + "zza": "ଜାଜା" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/os.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/os.json new file mode 100644 index 0000000000000000000000000000000000000000..a3332c1dcecc423213c21a836bcf01c1eb2c47df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/os.json @@ -0,0 +1,75 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ab": "абхазаг", + "ady": "адыгейаг", + "ae": "авеÑтӕ", + "af": "африкаанÑ", + "ang": "рагон англиÑаг", + "ar": "араббаг", + "av": "авайраг", + "az": "тӕтӕйраг", + "ba": "башкираг", + "bg": "болгайраг", + "bs": "боÑниаг", + "bua": "бурÑтаг", + "ca": "каталайнаг", + "ce": "цӕцӕйнаг", + "cop": "коптаг", + "cs": "чехаг", + "cv": "чувашаг", + "da": "даниаг", + "de": "немыцаг", + "de_AT": "авÑтралиаг немыцаг", + "de_CH": "швйецариаг немыцаг", + "egy": "рагон египтаг", + "el": "бердзейнаг", + "en": "англиÑаг", + "en_AU": "авÑтралиаг англиÑаг", + "en_CA": "канадӕйаг англиÑаг", + "en_GB": "бритайнаг англиÑаг", + "en_US": "америкаг англиÑаг", + "eo": "еÑперанто", + "es": "иÑпайнаг", + "es_419": "латинаг америкаг англиÑаг", + "es_ES": "европӕйаг англиÑаг", + "et": "еÑтойнаг", + "eu": "баÑкаг", + "fa": "перÑайнаг", + "fi": "финнаг", + "fil": "филиппинаг", + "fj": "фиджи", + "fo": "фарераг", + "fr": "францаг", + "fr_CA": "канадӕйаг францаг", + "fr_CH": "швейцариаг францаг", + "fro": "рагон францаг", + "ga": "ирландиаг", + "grc": "рагон бердзейнаг", + "he": "уираг", + "hr": "хорватаг", + "hu": "венгериаг", + "hy": "Ñомихаг", + "inh": "мӕхъӕлон", + "it": "италиаг", + "ja": "Ñпойнаг", + "ka": "гуырдзиаг", + "kbd": "кӕÑгон", + "krc": "бӕлхъӕрон", + "ku": "курдаг", + "kum": "хъуымыхъхъаг", + "la": "латинаг", + "lez": "лекъаг", + "mk": "мӕчъидон", + "os": "ирон", + "pt": "португалиаг", + "pt_BR": "бразилиаг португалиаг", + "pt_PT": "европӕйаг полтугалиаг", + "rom": "цигайнаг", + "ru": "уырыÑÑаг", + "und": "нӕзонгӕ ӕвзаг", + "zh": "китайаг", + "zh_Hans": "ӕнцонгонд китайаг", + "zh_Hant": "традицион китайаг" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pa.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pa.json new file mode 100644 index 0000000000000000000000000000000000000000..516095e57d500e5d3a6e3525d3b420fe999c47ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pa.json @@ -0,0 +1,407 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "ਅਫ਼ਾਰ", + "ab": "ਅਬਖਾਜ਼ੀਅਨ", + "ace": "ਅਚੀਨੀ", + "ach": "ਅਕੋਲੀ", + "ada": "ਅਡਾਂਗਮੇ", + "ady": "ਅਡਿਗੇ", + "af": "ਅਫ਼ਰੀਕੀ", + "agq": "ਅਗੇਮ", + "ain": "ਆਇਨੂ", + "ak": "ਅਕਾਨ", + "ale": "ਅਲੇਉਟ", + "alt": "ਦੱਖਣੀ ਅਲਤਾਈ", + "am": "ਅਮਹਾਰਿਕ", + "an": "ਅਰਾਗੋਨੀ", + "ang": "ਪà©à¨°à¨¾à¨£à©€ ਅੰਗਰੇਜ਼ੀ", + "anp": "ਅੰਗਿਕਾ", + "ar": "ਅਰਬੀ", + "ar_001": "ਆਧà©à¨¨à¨¿à¨• ਮਿਆਰੀ ਅਰਬੀ", + "arn": "ਮਾਪà©à¨šà©‡", + "arp": "ਅਰਾਫਾਓ", + "as": "ਅਸਾਮੀ", + "asa": "ਅਸੂ", + "ast": "ਅਸਤੂਰੀ", + "av": "ਅਵਾਰਿਕ", + "awa": "ਅਵਧੀ", + "ay": "ਅਈਮਾਰਾ", + "az": "ਅਜ਼ਰਬਾਈਜਾਨੀ", + "ba": "ਬਸ਼ਕੀਰ", + "ban": "ਬਾਲੀਨੀਜ਼", + "bas": "ਬਾਸਾ", + "be": "ਬੇਲਾਰੂਸੀ", + "bem": "ਬੇਮਬਾ", + "bez": "ਬੇਨਾ", + "bg": "ਬà©à¨²à¨—ਾਰੀਆਈ", + "bgn": "ਪੱਛਮੀ ਬਲੂਚੀ", + "bho": "ਭੋਜਪà©à¨°à©€", + "bi": "ਬਿਸਲਾਮਾ", + "bin": "ਬਿਨੀ", + "bla": "ਸਿਕਸਿਕਾ", + "bm": "ਬੰਬਾਰਾ", + "bn": "ਬੰਗਾਲੀ", + "bo": "ਤਿੱਬਤੀ", + "br": "ਬਰੇਟਨ", + "brx": "ਬੋਡੋ", + "bs": "ਬੋਸਨੀਆਈ", + "bug": "ਬਗਨੀਜ਼", + "byn": "ਬਲਿਨ", + "ca": "ਕੈਟਾਲਾਨ", + "ce": "ਚੇਚਨ", + "ceb": "ਸੀਬੂਆਨੋ", + "cgg": "ਚੀਗਾ", + "ch": "ਚਮੋਰੋ", + "chk": "ਚੂਕੀਸ", + "chm": "ਮਾਰੀ", + "cho": "ਚੌਕਟੋ", + "chr": "ਚੇਰੋਕੀ", + "chy": "ਛਾਇਆਨ", + "ckb": "ਕੇਂਦਰੀ ਕà©à¨°à¨¦à¨¿à¨¸à¨¼", + "co": "ਕੋਰਸੀਕਨ", + "crs": "ਸੇਸੇਲਵਾ ਕà©à¨°à¨¿à¨“ਲ ਫà©à¨°à©ˆà¨‚ਚ", + "cs": "ਚੈੱਕ", + "cu": "ਚਰਚ ਸਲਾਵੀ", + "cv": "ਚà©à¨µà¨¾à¨¸à¨¼", + "cy": "ਵੈਲਸ਼", + "da": "ਡੈਨਿਸ਼", + "dak": "ਡਕੋਟਾ", + "dar": "ਦਾਰਗਵਾ", + "dav": "ਟੇਟਾ", + "de": "ਜਰਮਨ", + "de_AT": "ਜਰਮਨ (ਆਸਟਰੀਆਈ)", + "dgr": "ਡੋਗਰਿੱਬ", + "dje": "ਜ਼ਾਰਮਾ", + "dsb": "ਲੋਅਰ ਸੋਰਬੀਅਨ", + "dua": "ਡੂਆਲਾ", + "dv": "ਦਿਵੇਹੀ", + "dyo": "ਜੋਲਾ-ਫੋਇਨੀ", + "dz": "ਜ਼ੋਂਗਖਾ", + "dzg": "ਡਜ਼ਾਗਾ", + "ebu": "ਇੰਬੂ", + "ee": "ਈਵਈ", + "efi": "à¨à¨«à¨¿à¨•", + "egy": "ਪà©à¨°à¨¾à¨¤à¨¨ ਮਿਸਰੀ", + "eka": "à¨à¨•ਾਜà©à¨•", + "el": "ਯੂਨਾਨੀ", + "en": "ਅੰਗਰੇਜ਼ੀ", + "en_GB": "ਅੰਗਰੇਜ਼ੀ (ਬਰਤਾਨਵੀ)", + "en_US": "ਅੰਗਰੇਜ਼ੀ (ਅਮਰੀਕੀ)", + "eo": "ਇਸਪੇਰਾਂਟੋ", + "es": "ਸਪੇਨੀ", + "es_ES": "ਸਪੇਨੀ (ਯੂਰਪੀ)", + "et": "ਇਸਟੋਨੀਆਈ", + "eu": "ਬਾਸਕ", + "ewo": "ਇਵੋਂਡੋ", + "fa": "ਫ਼ਾਰਸੀ", + "ff": "ਫà©à¨²à¨¾à¨¹", + "fi": "ਫਿਨਿਸ਼", + "fil": "ਫਿਲੀਪਿਨੋ", + "fj": "ਫ਼ਿਜ਼ੀ", + "fo": "ਫ਼ੇਰੋਸੇ", + "fon": "ਫੌਨ", + "fr": "ਫਰਾਂਸੀਸੀ", + "fr_CA": "ਫਰਾਂਸੀਸੀ (ਕੈਨੇਡੀਅਨ)", + "fur": "ਫਰੀਉਲੀਅਨ", + "fy": "ਪੱਛਮੀ ਫà©à¨°à¨¿à¨¸à©€à¨…ਨ", + "ga": "ਆਇਰਸ਼", + "gaa": "ਗਾ", + "gag": "ਗਾਗੌਜ਼", + "gan": "ਚੀਨੀ ਗਾਨ", + "gd": "ਸਕਾਟਿਸ਼ ਗੇਲਿਕ", + "gez": "ਜੀਜ਼", + "gil": "ਗਿਲਬਰਤੀਜ਼", + "gl": "ਗੈਲਿਸ਼ਿਅਨ", + "gn": "ਗà©à¨†à¨°à¨¾à¨¨à©€", + "gor": "ਗੋਰੋਂਤਾਲੋ", + "grc": "ਪà©à¨°à¨¾à¨¤à¨¨ ਯੂਨਾਨੀ", + "gsw": "ਜਰਮਨ (ਸਵਿਸ)", + "gu": "ਗà©à¨œà¨°à¨¾à¨¤à©€", + "guz": "ਗà©à¨¸à©€", + "gv": "ਮੈਂਕਸ", + "gwi": "ਗਵਿਚ’ਇਨ", + "ha": "ਹੌਸਾ", + "hak": "ਚੀਨੀ ਹਾਕਾ", + "haw": "ਹਵਾਈ", + "he": "ਹਿਬਰੂ", + "hi": "ਹਿੰਦੀ", + "hif": "ਫਿਜੀ ਹਿੰਦੀ", + "hil": "ਹਿਲੀਗੇਨਨ", + "hmn": "ਹਮੋਂਗ", + "hr": "ਕà©à¨°à©‹à¨à¨¸à¨¼à¨¿à¨†à¨ˆ", + "hsb": "ਅੱਪਰ ਸੋਰਬੀਅਨ", + "hsn": "ਚੀਨੀ ਜ਼ਿਆਂਗ", + "ht": "ਹੈਤੀਆਈ", + "hu": "ਹੰਗਰੀਆਈ", + "hup": "ਹੂਪਾ", + "hy": "ਅਰਮੀਨੀਆਈ", + "hz": "ਹਰੇਰੋ", + "ia": "ਇੰਟਰਲਿੰਗà©à¨†", + "iba": "ਇਬਾਨ", + "ibb": "ਇਬੀਬੀਓ", + "id": "ਇੰਡੋਨੇਸ਼ੀਆਈ", + "ig": "ਇਗਬੋ", + "ii": "ਸਿਚà©à¨†à¨¨ ਯੀ", + "ilo": "ਇਲੋਕੋ", + "inh": "ਇੰਗà©à¨¸à¨¼", + "io": "ਇਡੂ", + "is": "ਆਈਸਲੈਂਡਿਕ", + "it": "ਇਤਾਲਵੀ", + "iu": "ਇੰਕਟੀਟੂਤ", + "ja": "ਜਪਾਨੀ", + "jbo": "ਲੋਜਬਾਨ", + "jgo": "ਨਗੋਂਬਾ", + "jmc": "ਮਚਾਮੇ", + "jv": "ਜਾਵਾਨੀਜ਼", + "ka": "ਜਾਰਜੀਆਈ", + "kab": "ਕਬਾਇਲ", + "kac": "ਕਾਚਿਨ", + "kaj": "ਜਜੂ", + "kam": "ਕੰਬਾ", + "kbd": "ਕਬਾਰਦੀ", + "kcg": "ਟਾਇਪ", + "kde": "ਮਕੋਂਡ", + "kea": "ਕਾਬà©à¨µà©‡à¨°à¨¦à¨¿à¨†à¨¨à©‚", + "kfo": "ਕੋਰੋ", + "kha": "ਖਾਸੀ", + "khq": "ਕੋਯਰਾ ਚੀਨੀ", + "ki": "ਕਿਕੂਯੂ", + "kj": "ਕà©à¨†à¨¨à¨¯à¨¾à¨®à¨¾", + "kk": "ਕਜ਼ਾਖ਼", + "kkj": "ਕਾਕੋ", + "kl": "ਕਲਾਅੱਲੀਸà©à¨Ÿ", + "kln": "ਕਲੇਜਿਨ", + "km": "ਖਮੇਰ", + "kmb": "ਕਿਮਬà©à©°à¨¦à©‚", + "kn": "ਕੰਨੜ", + "ko": "ਕੋਰੀਆਈ", + "koi": "ਕੋਮੀ-ਪੇਰਮਿਆਕ", + "kok": "ਕੋਂਕਣੀ", + "kpe": "ਕਪੇਲ", + "kr": "ਕਨੂਰੀ", + "krc": "ਕਰਾਚੇ ਬਲਕਾਰ", + "krl": "ਕਰੀਲੀਅਨ", + "kru": "ਕà©à¨°à©à¨–", + "ks": "ਕਸ਼ਮੀਰੀ", + "ksb": "ਸ਼ੰਬਾਲਾ", + "ksf": "ਬਫ਼ੀਆ", + "ksh": "ਕਲੋਗਨੀਅਨ", + "ku": "ਕà©à¨°à¨¦", + "kum": "ਕà©à¨®à©€à¨•", + "kv": "ਕੋਮੀ", + "kw": "ਕੋਰਨਿਸ਼", + "ky": "ਕਿਰਗੀਜ਼", + "la": "ਲਾਤੀਨੀ", + "lad": "ਲੈਡੀਨੋ", + "lag": "ਲੰਗਾਈ", + "lb": "ਲਕਜ਼ਮਬਰਗਿਸ਼", + "lez": "ਲੈਜ਼ਗੀ", + "lg": "ਗਾਂਡਾ", + "li": "ਲਿਮਬà©à¨°à¨—à©€", + "lkt": "ਲਕੋਟਾ", + "ln": "ਲਿੰਗਾਲਾ", + "lo": "ਲਾਓ", + "loz": "ਲੋਜ਼ੀ", + "lrc": "ਉੱਤਰੀ ਲà©à¨°à©€", + "lt": "ਲਿਥà©à¨†à¨¨à©€à¨…ਨ", + "lu": "ਲੂਬਾ-ਕਾਟਾਂਗਾ", + "lun": "ਲà©à©°à¨¡à¨¾", + "luo": "ਲੂਓ", + "lus": "ਮਿਜ਼ੋ", + "luy": "ਲੂਈਆ", + "lv": "ਲਾਤੀਵੀ", + "mad": "ਮਾਡੂਰੀਸ", + "mag": "ਮਗਾਹੀ", + "mai": "ਮੈਥਲੀ", + "mak": "ਮਕਾਸਰ", + "mas": "ਮਸਾਈ", + "mdf": "ਮੋਕਸ਼ਾ", + "men": "ਮੇਂਡੇ", + "mer": "ਮੇਰੂ", + "mfe": "ਮੋਰੀਸਿਅਨ", + "mg": "ਮੇਲੇਗਸੀ", + "mgh": "ਮਖੋਵਾ-ਮਿੱਟੋ", + "mgo": "ਮੇਟਾ", + "mh": "ਮਾਰਸ਼ਲੀਜ਼", + "mi": "ਮਾਉਰੀ", + "mic": "ਮਾਇਮੈਕ", + "min": "ਮਿਨਾਂਗਕਾਬਾਓ", + "mk": "ਮੈਕਡੋਨੀਆਈ", + "ml": "ਮਲਿਆਲਮ", + "mn": "ਮੰਗੋਲੀ", + "mni": "ਮਨੀਪà©à¨°à©€", + "moh": "ਮੋਹਆਕ", + "mos": "ਮੋਸੀ", + "mr": "ਮਰਾਠੀ", + "ms": "ਮਲਯ", + "mt": "ਮਾਲਟੀਜ਼", + "mua": "ਮà©à©°à¨¡à©‡à¨‚ਗ", + "mul": "ਬਹà©à¨¤à©€à¨†à¨‚ ਬੋਲੀਆਂ", + "mus": "ਕà©à¨°à©€à¨•", + "mwl": "ਮਿਰਾਂਡੀ", + "my": "ਬਰਮੀ", + "myv": "ਇਰਜ਼ੀਆ", + "mzn": "ਮੇਜ਼ੈਂਡਰਾਨੀ", + "na": "ਨਾਉਰੂ", + "nan": "ਚੀਨੀ ਮਿਨ ਨਾਨ", + "nap": "ਨਿਆਪੋਲੀਟਨ", + "naq": "ਨਾਮਾ", + "nb": "ਨਾਰਵੇਜਿਆਈ ਬੋਕਮਲ", + "nd": "ਉੱਤਰੀ ਨਡੇਬੇਲੇ", + "nds": "ਲੋ ਜਰਮਨ", + "nds_NL": "ਲੋ ਸੈਕਸਨ", + "ne": "ਨੇਪਾਲੀ", + "new": "ਨੇਵਾਰੀ", + "ng": "à¨à¨‚ਡੋਂਗਾ", + "nia": "ਨਿਆਸ", + "niu": "ਨਿਊà¨à¨ˆ", + "nl": "ਡੱਚ", + "nl_BE": "ਫਲੈਮਿਸ਼", + "nmg": "ਕਵਾਸਿਓ", + "nn": "ਨਾਰਵੇਜਿਆਈ ਨਿਓਨੌਰਸਕ", + "nnh": "ਨਿਓਮਬੂਨ", + "no": "ਨਾਰਵੇਜਿਆਈ", + "nog": "ਨੋਗਾਈ", + "nqo": "à¨à¨‚ਕੋ", + "nr": "ਸਾਊਥ ਨਡੇਬੇਲੇ", + "nso": "ਉੱਤਰੀ ਸੋਥੋ", + "nus": "ਨà©à¨à¨°", + "nv": "ਨਵਾਜੋ", + "ny": "ਨਯਾਂਜਾ", + "nyn": "ਨਿਆਂਕੋਲੇ", + "oc": "ਓਕਸੀਟਾਨ", + "om": "ਓਰੋਮੋ", + "or": "ਉੜੀਆ", + "os": "ਓਸੈਟਿਕ", + "pa": "ਪੰਜਾਬੀ", + "pag": "ਪੰਗਾਸੀਨਾਨ", + "pam": "ਪੈਂਪਾਂਗਾ", + "pap": "ਪਾਪਿਆਮੈਂਟੋ", + "pau": "ਪਲਾਊਵੀ", + "pcm": "ਨਾਇਜੀਰੀਆਈ ਪਿਡਗਿਨ", + "pi": "ਪਾਲੀ", + "pl": "ਪੋਲੈਂਡੀ", + "prg": "ਪਰੂਸ਼ੀਆ", + "ps": "ਪਸ਼ਤੋ", + "pt": "ਪà©à¨°à¨¤à¨—ਾਲੀ", + "pt_BR": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਬà©à¨°à¨¾à¨œà¨¼à©€à¨²à©€)", + "pt_PT": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਯੂਰਪੀ)", + "qu": "ਕਕੇਸ਼à©à¨†", + "quc": "ਕੇਸ਼", + "raj": "ਰਾਜਸਥਾਨੀ", + "rap": "ਰਾਪਾਨà©à¨ˆ", + "rar": "ਰਾਰੋਤੋਂਗਨ", + "rm": "ਰੋਮਾਂਸ਼", + "rn": "ਰà©à©°à¨¡à©€", + "ro": "ਰੋਮਾਨੀਆਈ", + "ro_MD": "ਮੋਲਡਾਵੀਆਈ", + "rof": "ਰੋਮਬੋ", + "root": "ਰੂਟ", + "ru": "ਰੂਸੀ", + "rup": "ਅਰੋਮੀਨੀਆਈ", + "rw": "ਕਿਨਿਆਰਵਾਂਡਾ", + "rwk": "ਰਵਾ", + "sa": "ਸੰਸਕà©à¨°à¨¿à¨¤", + "sad": "ਸਾਂਡੋ", + "sah": "ਸਾਖਾ", + "saq": "ਸਮਬà©à¨°à©‚", + "sat": "ਸੰਥਾਲੀ", + "sba": "ਨਗਾਂਬੇ", + "sbp": "ਸੇਂਗੋ", + "sc": "ਸਾਰਡੀਨੀਆਈ", + "scn": "ਸਿਸੀਲੀਅਨ", + "sco": "ਸਕਾਟਸ", + "sd": "ਸਿੰਧੀ", + "sdh": "ਦੱਖਣੀ ਕà©à¨°à¨¦à¨¿à¨¸à¨¼", + "se": "ਉੱਤਰੀ ਸਾਮੀ", + "seh": "ਸੇਨਾ", + "ses": "ਕੋਇਰਾਬੋਰੋ ਸੇਂਨੀ", + "sg": "ਸਾਂਗੋ", + "shi": "ਟਚੇਲਹਿਟ", + "shn": "ਸ਼ਾਨ", + "si": "ਸਿੰਹਾਲਾ", + "sk": "ਸਲੋਵਾਕ", + "sl": "ਸਲੋਵੇਨੀਆਈ", + "sm": "ਸਾਮੋਨ", + "sma": "ਦੱਖਣੀ ਸਾਮੀ", + "smj": "ਲਿਊਲ ਸਾਮੀ", + "smn": "ਇਨਾਰੀ ਸਾਮੀ", + "sms": "ਸਕੌਲਟ ਸਾਮੀ", + "sn": "ਸ਼ੋਨਾ", + "snk": "ਸੋਨਿੰਕੇ", + "so": "ਸੋਮਾਲੀ", + "sq": "ਅਲਬਾਨੀਆਈ", + "sr": "ਸਰਬੀਆਈ", + "srn": "ਸà©à¨°à¨¾à¨¨à¨¾à¨¨ ਟੋਂਗੋ", + "ss": "ਸਵਾਤੀ", + "ssy": "ਸਾਹੋ", + "st": "ਦੱਖਣੀ ਸੋਥੋ", + "su": "ਸੂੰਡਾਨੀ", + "suk": "ਸà©à¨•à©à¨®à¨¾", + "sv": "ਸਵੀਡਿਸ਼", + "sw": "ਸਵਾਹਿਲੀ", + "swb": "ਕੋਮੋਰੀਅਨ", + "syr": "ਸੀਰੀਆਈ", + "ta": "ਤਮਿਲ", + "te": "ਤੇਲਗੂ", + "tem": "ਟਿਮਨੇ", + "teo": "ਟੇਸੋ", + "tet": "ਟੇਟਮ", + "tg": "ਤਾਜਿਕ", + "th": "ਥਾਈ", + "ti": "ਤਿਗà©à¨°à©€à¨¨à¨¿à¨†", + "tig": "ਟਿਗਰਾ", + "tk": "ਤà©à¨°à¨•ਮੇਨ", + "tlh": "ਕਲਿੰਗਨ", + "tn": "ਤਸਵਾਨਾ", + "to": "ਟੌਂਗਨ", + "tpi": "ਟੋਕ ਪਿਸਿਨ", + "tr": "ਤà©à¨°à¨•à©€", + "trv": "ਟਾਰੋਕੋ", + "ts": "ਸੋਂਗਾ", + "tt": "ਤਤਾਰ", + "tum": "ਤà©à©°à¨¬à©à¨•ਾ", + "tvl": "ਟਿਊਵਾਲੂ", + "tw": "ਤà©à¨µà¨¿", + "twq": "ਤਾਸਾਵਿਕ", + "ty": "ਤਾਹੀਟੀ", + "tyv": "ਤà©à¨µà©€à¨¨à©€à¨…ਨ", + "tzm": "ਮੱਧ à¨à¨Ÿà¨²à¨¸ ਤਮਾਜ਼ਿਤ", + "udm": "ਉਦਮà©à¨°à¨¤", + "ug": "ਉਇਗà©à¨°", + "uk": "ਯੂਕਰੇਨੀਆਈ", + "umb": "ਉਮਬà©à©°à¨¡à©‚", + "und": "ਅਣਪਛਾਤੀ ਬੋਲੀ", + "ur": "ਉੜਦੂ", + "uz": "ਉਜ਼ਬੇਕ", + "vai": "ਵਾਈ", + "ve": "ਵੇਂਡਾ", + "vi": "ਵੀਅਤਨਾਮੀ", + "vo": "ਵੋਲਾਪੂਕ", + "vun": "ਵੂੰਜੋ", + "wa": "ਵਲੂਨ", + "wae": "ਵਾਲਸਰ", + "wal": "ਵੋਲਾà¨à¨Ÿà¨¾", + "war": "ਵੈਰੇ", + "wbp": "ਵਾਲਪà©à¨°à©€", + "wo": "ਵੋਲੋਫ", + "wuu": "ਚੀਨੀ ਵੂ", + "xal": "ਕਾਲਮਿਕ", + "xh": "ਖੋਸਾ", + "xog": "ਸੋਗਾ", + "yav": "ਯਾਂਗਬੇਨ", + "ybb": "ਯੇਂਬਾ", + "yi": "ਯਿਦਿਸ਼", + "yo": "ਯੋਰੂਬਾ", + "yue": "ਕੈਂਟੋਨੀਜ਼", + "zgh": "ਮਿਆਰੀ ਮੋਰੋਕੇਨ ਟਾਮਾਜ਼ਿਕ", + "zh": "ਚੀਨੀ (ਮੈਂਡਰਿਨ)", + "zh_Hans": "ਚੀਨੀ (ਸਰਲ)", + "zh_Hant": "ਚੀਨੀ (ਰਵਾਇਤੀ)", + "zu": "ਜ਼à©à¨²à©‚", + "zun": "ਜ਼ੂਨੀ", + "zxx": "ਬੋਲੀ ਸੰਬੰਧੀ ਕੋਈ ਸਮੱਗਰੀ ਨਹੀਂ", + "zza": "ਜ਼ਾਜ਼ਾ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pa_Arab.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pa_Arab.json new file mode 100644 index 0000000000000000000000000000000000000000..1d8593b3c9df419aa5115e4e16326a80fce9d40b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pa_Arab.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "pa": "پنجابی" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pl.json new file mode 100644 index 0000000000000000000000000000000000000000..82fc08f1402fa8a3c59de9d64420bd9236718e02 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pl.json @@ -0,0 +1,619 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afar", + "ab": "abchaski", + "ace": "aceh", + "ach": "aczoli", + "ada": "adangme", + "ady": "adygejski", + "ae": "awestyjski", + "aeb": "tunezyjski arabski", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ajnu", + "ak": "akan", + "akk": "akadyjski", + "akz": "alabama", + "ale": "aleucki", + "aln": "albaÅ„ski gegijski", + "alt": "poÅ‚udniowoaÅ‚tajski", + "am": "amharski", + "an": "aragoÅ„ski", + "ang": "staroangielski", + "anp": "angika", + "ar": "arabski", + "ar_001": "współczesny arabski", + "arc": "aramejski", + "arn": "mapudungun", + "aro": "araona", + "arp": "arapaho", + "arq": "algierski arabski", + "arw": "arawak", + "ary": "marokaÅ„ski arabski", + "arz": "egipski arabski", + "as": "asamski", + "asa": "asu", + "ase": "amerykaÅ„ski jÄ™zyk migowy", + "ast": "asturyjski", + "av": "awarski", + "avk": "kotava", + "awa": "awadhi", + "ay": "ajmara", + "az": "azerbejdżaÅ„ski", + "ba": "baszkirski", + "bal": "beludżi", + "ban": "balijski", + "bar": "bawarski", + "bas": "basaa", + "bax": "bamum", + "bbc": "batak toba", + "bbj": "ghomala", + "be": "biaÅ‚oruski", + "bej": "bedża", + "bem": "bemba", + "bew": "betawi", + "bez": "bena", + "bfd": "bafut", + "bfq": "badaga", + "bg": "buÅ‚garski", + "bgn": "beludżi północny", + "bho": "bhodźpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bjn": "banjar", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bengalski", + "bo": "tybetaÅ„ski", + "bpy": "bisznuprija-manipuri", + "bqi": "bachtiarski", + "br": "bretoÅ„ski", + "bra": "bradź", + "brh": "brahui", + "brx": "bodo", + "bs": "boÅ›niacki", + "bss": "akoose", + "bua": "buriacki", + "bug": "bugijski", + "bum": "bulu", + "byn": "blin", + "byv": "medumba", + "ca": "kataloÅ„ski", + "cad": "kaddo", + "car": "karaibski", + "cay": "kajuga", + "cch": "atsam", + "ce": "czeczeÅ„ski", + "ceb": "cebuano", + "cgg": "chiga", + "ch": "czamorro", + "chb": "czibcza", + "chg": "czagatajski", + "chk": "chuuk", + "chm": "maryjski", + "chn": "żargon czinucki", + "cho": "czoktawski", + "chp": "czipewiaÅ„ski", + "chr": "czirokeski", + "chy": "czejeÅ„ski", + "ckb": "sorani", + "co": "korsykaÅ„ski", + "cop": "koptyjski", + "cps": "capiznon", + "cr": "kri", + "crh": "krymskotatarski", + "crs": "kreolski seszelski", + "cs": "czeski", + "csb": "kaszubski", + "cu": "cerkiewnosÅ‚owiaÅ„ski", + "cv": "czuwaski", + "cy": "walijski", + "da": "duÅ„ski", + "dak": "dakota", + "dar": "dargwijski", + "dav": "taita", + "de": "niemiecki", + "de_AT": "austriacki niemiecki", + "de_CH": "wysokoniemiecki (Szwajcaria)", + "del": "delaware", + "den": "slave", + "dgr": "dogrib", + "din": "dinka", + "dje": "dżerma", + "doi": "dogri", + "dsb": "dolnoÅ‚użycki", + "dtp": "dusun centralny", + "dua": "duala", + "dum": "Å›redniowieczny niderlandzki", + "dv": "malediwski", + "dyo": "diola", + "dyu": "diula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embu", + "ee": "ewe", + "efi": "efik", + "egl": "emilijski", + "egy": "staroegipski", + "eka": "ekajuk", + "el": "grecki", + "elx": "elamicki", + "en": "angielski", + "en_AU": "australijski angielski", + "en_CA": "kanadyjski angielski", + "en_GB": "brytyjski angielski", + "en_US": "amerykaÅ„ski angielski", + "enm": "Å›rednioangielski", + "eo": "esperanto", + "es": "hiszpaÅ„ski", + "es_419": "amerykaÅ„ski hiszpaÅ„ski", + "es_ES": "europejski hiszpaÅ„ski", + "es_MX": "meksykaÅ„ski hiszpaÅ„ski", + "esu": "yupik Å›rodkowosyberyjski", + "et": "estoÅ„ski", + "eu": "baskijski", + "ewo": "ewondo", + "ext": "estremadurski", + "fa": "perski", + "fan": "fang", + "fat": "fanti", + "ff": "fulani", + "fi": "fiÅ„ski", + "fil": "filipino", + "fit": "meänkieli", + "fj": "fidżijski", + "fo": "farerski", + "fon": "fon", + "fr": "francuski", + "fr_CA": "kanadyjski francuski", + "fr_CH": "szwajcarski francuski", + "frc": "cajuÅ„ski", + "frm": "Å›redniofrancuski", + "fro": "starofrancuski", + "frp": "franko-prowansalski", + "frr": "północnofryzyjski", + "frs": "wschodniofryzyjski", + "fur": "friulski", + "fy": "zachodniofryzyjski", + "ga": "irlandzki", + "gaa": "ga", + "gag": "gagauski", + "gan": "gan", + "gay": "gayo", + "gba": "gbaya", + "gbz": "zaratusztriaÅ„ski dari", + "gd": "szkocki gaelicki", + "gez": "gyyz", + "gil": "gilbertaÅ„ski", + "gl": "galicyjski", + "glk": "giliaÅ„ski", + "gmh": "Å›rednio-wysoko-niemiecki", + "gn": "guarani", + "goh": "staro-wysoko-niemiecki", + "gom": "konkani (Goa)", + "gon": "gondi", + "gor": "gorontalo", + "got": "gocki", + "grb": "grebo", + "grc": "starogrecki", + "gsw": "szwajcarski niemiecki", + "gu": "gudżarati", + "guc": "wayúu", + "gur": "frafra", + "guz": "gusii", + "gv": "manx", + "gwi": "gwichʼin", + "ha": "hausa", + "hai": "haida", + "hak": "hakka", + "haw": "hawajski", + "he": "hebrajski", + "hi": "hindi", + "hif": "hindi fidżyjskie", + "hil": "hiligaynon", + "hit": "hetycki", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "chorwacki", + "hsb": "górnoÅ‚użycki", + "hsn": "xiang", + "ht": "kreolski haitaÅ„ski", + "hu": "wÄ™gierski", + "hup": "hupa", + "hy": "ormiaÅ„ski", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonezyjski", + "ie": "interlingue", + "ig": "igbo", + "ii": "syczuaÅ„ski", + "ik": "inupiak", + "ilo": "ilokano", + "inh": "inguski", + "io": "ido", + "is": "islandzki", + "it": "wÅ‚oski", + "iu": "inuktitut", + "izh": "ingryjski", + "ja": "japoÅ„ski", + "jam": "jamajski", + "jbo": "lojban", + "jgo": "ngombe", + "jmc": "machame", + "jpr": "judeo-perski", + "jrb": "judeoarabski", + "jut": "jutlandzki", + "jv": "jawajski", + "ka": "gruziÅ„ski", + "kaa": "karakaÅ‚packi", + "kab": "kabylski", + "kac": "kaczin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardyjski", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "kreolski Wysp Zielonego PrzylÄ…dka", + "ken": "kenyang", + "kfo": "koro", + "kg": "kongo", + "kgp": "kaingang", + "kha": "khasi", + "kho": "chotaÅ„ski", + "khq": "koyra chiini", + "khw": "khowar", + "ki": "kikuju", + "kiu": "kirmandżki", + "kj": "kwanyama", + "kk": "kazachski", + "kkj": "kako", + "kl": "grenlandzki", + "kln": "kalenjin", + "km": "khmerski", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "koreaÅ„ski", + "koi": "komi-permiacki", + "kok": "konkani", + "kos": "kosrae", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karaczajsko-baÅ‚karski", + "kri": "krio", + "krj": "kinaraya", + "krl": "karelski", + "kru": "kurukh", + "ks": "kaszmirski", + "ksb": "sambala", + "ksf": "bafia", + "ksh": "gwara koloÅ„ska", + "ku": "kurdyjski", + "kum": "kumycki", + "kut": "kutenai", + "kv": "komi", + "kw": "kornijski", + "ky": "kirgiski", + "la": "Å‚aciÅ„ski", + "lad": "ladyÅ„ski", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "luksemburski", + "lez": "lezgijski", + "lfn": "Lingua Franca Nova", + "lg": "ganda", + "li": "limburski", + "lij": "liguryjski", + "liv": "liwski", + "lkt": "lakota", + "lmo": "lombardzki", + "ln": "lingala", + "lo": "laotaÅ„ski", + "lol": "mongo", + "loz": "lozi", + "lrc": "luryjski północny", + "lt": "litewski", + "ltg": "Å‚atgalski", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "mizo", + "luy": "luhya", + "lv": "Å‚otewski", + "lzh": "chiÅ„ski klasyczny", + "lzz": "lazyjski", + "mad": "madurajski", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makasar", + "man": "mandingo", + "mas": "masajski", + "mde": "maba", + "mdf": "moksza", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "kreolski Mauritiusa", + "mg": "malgaski", + "mga": "Å›rednioirlandzki", + "mgh": "makua", + "mgo": "meta", + "mh": "marszalski", + "mi": "maoryjski", + "mic": "mikmak", + "min": "minangkabu", + "mk": "macedoÅ„ski", + "ml": "malajalam", + "mn": "mongolski", + "mnc": "manchu", + "mni": "manipuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "marathi", + "mrj": "zachodniomaryjski", + "ms": "malajski", + "mt": "maltaÅ„ski", + "mua": "mundang", + "mul": "wiele jÄ™zyków", + "mus": "krik", + "mwl": "mirandyjski", + "mwr": "marwari", + "mwv": "mentawai", + "my": "birmaÅ„ski", + "mye": "myene", + "myv": "erzja", + "mzn": "mazanderaÅ„ski", + "na": "nauru", + "nan": "minnaÅ„ski", + "nap": "neapolitaÅ„ski", + "naq": "nama", + "nb": "norweski (bokmÃ¥l)", + "nd": "ndebele północny", + "nds": "dolnoniemiecki", + "nds_NL": "dolnosaksoÅ„ski", + "ne": "nepalski", + "new": "newarski", + "ng": "ndonga", + "nia": "nias", + "niu": "niue", + "njo": "ao", + "nl": "niderlandzki", + "nl_BE": "flamandzki", + "nmg": "ngumba", + "nn": "norweski (nynorsk)", + "nnh": "ngiemboon", + "no": "norweski", + "nog": "nogajski", + "non": "staronordyjski", + "nov": "novial", + "nqo": "n’ko", + "nr": "ndebele poÅ‚udniowy", + "nso": "sotho północny", + "nus": "nuer", + "nv": "nawaho", + "nwc": "newarski klasyczny", + "ny": "njandża", + "nym": "niamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzema", + "oc": "oksytaÅ„ski", + "oj": "odżibwa", + "om": "oromo", + "or": "orija", + "os": "osetyjski", + "osa": "osage", + "ota": "osmaÅ„sko-turecki", + "pa": "pendżabski", + "pag": "pangasino", + "pal": "pahlavi", + "pam": "pampango", + "pap": "papiamento", + "pau": "palau", + "pcd": "pikardyjski", + "pcm": "pidżyn nigeryjski", + "pdc": "pensylwaÅ„ski", + "pdt": "plautdietsch", + "peo": "staroperski", + "pfl": "palatynacki", + "phn": "fenicki", + "pi": "palijski", + "pl": "polski", + "pms": "piemoncki", + "pnt": "pontyjski", + "pon": "ponpejski", + "prg": "pruski", + "pro": "staroprowansalski", + "ps": "paszto", + "pt": "portugalski", + "pt_BR": "brazylijski portugalski", + "pt_PT": "europejski portugalski", + "qu": "keczua", + "quc": "kicze", + "qug": "keczua górski (Chimborazo)", + "raj": "radźasthani", + "rap": "rapanui", + "rar": "rarotonga", + "rgn": "romagnol", + "rif": "tarifit", + "rm": "retoromaÅ„ski", + "rn": "rundi", + "ro": "rumuÅ„ski", + "ro_MD": "moÅ‚dawski", + "rof": "rombo", + "rom": "cygaÅ„ski", + "root": "jÄ™zyk rdzenny", + "rtm": "rotumaÅ„ski", + "ru": "rosyjski", + "rue": "rusiÅ„ski", + "rug": "roviana", + "rup": "arumuÅ„ski", + "rw": "kinya-ruanda", + "rwk": "rwa", + "sa": "sanskryt", + "sad": "sandawe", + "sah": "jakucki", + "sam": "samarytaÅ„ski aramejski", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "saz": "saurasztryjski", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardyÅ„ski", + "scn": "sycylijski", + "sco": "scots", + "sd": "sindhi", + "sdc": "sassarski", + "sdh": "poÅ‚udniowokurdyjski", + "se": "północnolapoÅ„ski", + "see": "seneka", + "seh": "sena", + "sei": "seri", + "sel": "selkupski", + "ses": "koyraboro senni", + "sg": "sango", + "sga": "staroirlandzki", + "sgs": "żmudzki", + "sh": "serbsko-chorwacki", + "shi": "tashelhiyt", + "shn": "szan", + "shu": "arabski (Czad)", + "si": "syngaleski", + "sid": "sidamo", + "sk": "sÅ‚owacki", + "sl": "sÅ‚oweÅ„ski", + "sli": "dolnoÅ›lÄ…ski", + "sly": "selayar", + "sm": "samoaÅ„ski", + "sma": "poÅ‚udniowolapoÅ„ski", + "smj": "lule", + "smn": "inari", + "sms": "skolt", + "sn": "shona", + "snk": "soninke", + "so": "somalijski", + "sog": "sogdyjski", + "sq": "albaÅ„ski", + "sr": "serbski", + "srn": "sranan tongo", + "srr": "serer", + "ss": "suazi", + "ssy": "saho", + "st": "sotho poÅ‚udniowy", + "stq": "fryzyjski saterlandzki", + "su": "sundajski", + "suk": "sukuma", + "sus": "susu", + "sux": "sumeryjski", + "sv": "szwedzki", + "sw": "suahili", + "sw_CD": "kongijski suahili", + "swb": "komoryjski", + "syc": "syriacki", + "syr": "syryjski", + "szl": "Å›lÄ…ski", + "ta": "tamilski", + "tcy": "tulu", + "te": "telugu", + "tem": "temne", + "teo": "ateso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadżycki", + "th": "tajski", + "ti": "tigrinia", + "tig": "tigre", + "tiv": "tiw", + "tk": "turkmeÅ„ski", + "tkl": "tokelau", + "tkr": "cachurski", + "tl": "tagalski", + "tlh": "klingoÅ„ski", + "tli": "tlingit", + "tly": "taÅ‚yski", + "tmh": "tamaszek", + "tn": "setswana", + "to": "tonga", + "tog": "tonga (Niasa)", + "tpi": "tok pisin", + "tr": "turecki", + "tru": "turoyo", + "trv": "taroko", + "ts": "tsonga", + "tsd": "cakoÅ„ski", + "tsi": "tsimshian", + "tt": "tatarski", + "ttt": "tacki", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitaÅ„ski", + "tyv": "tuwiÅ„ski", + "tzm": "tamazight (Atlas Åšrodkowy)", + "udm": "udmurcki", + "ug": "ujgurski", + "uga": "ugarycki", + "uk": "ukraiÅ„ski", + "umb": "umbundu", + "und": "nieznany jÄ™zyk", + "ur": "urdu", + "uz": "uzbecki", + "vai": "wai", + "ve": "venda", + "vec": "wenecki", + "vep": "wepski", + "vi": "wietnamski", + "vls": "zachodnioflamandzki", + "vmf": "meÅ„ski frankoÅ„ski", + "vo": "wolapik", + "vot": "wotiacki", + "vro": "võro", + "vun": "vunjo", + "wa": "waloÅ„ski", + "wae": "walser", + "wal": "wolayta", + "war": "waraj", + "was": "washo", + "wbp": "warlpiri", + "wo": "wolof", + "wuu": "wu", + "xal": "kaÅ‚mucki", + "xh": "khosa", + "xmf": "megrelski", + "xog": "soga", + "yao": "yao", + "yap": "japski", + "yav": "yangben", + "ybb": "yemba", + "yi": "jidysz", + "yo": "joruba", + "yrl": "nheengatu", + "yue": "kantoÅ„ski", + "za": "czuang", + "zap": "zapotecki", + "zbl": "bliss", + "zea": "zelandzki", + "zen": "zenaga", + "zgh": "standardowy marokaÅ„ski tamazight", + "zh": "chiÅ„ski", + "zh_Hans": "chiÅ„ski uproszczony", + "zh_Hant": "chiÅ„ski tradycyjny", + "zu": "zulu", + "zun": "zuni", + "zxx": "brak treÅ›ci o charakterze jÄ™zykowym", + "zza": "zazaki" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ps.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ps.json new file mode 100644 index 0000000000000000000000000000000000000000..08197bb78a89b8482f84e03e357e3cb3297381e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ps.json @@ -0,0 +1,45 @@ +{ + "Version": "2.1.27.40", + "Names": { + "am": "امهاري", + "ar": "عربي", + "as": "آسامي", + "bal": "بلوڅي", + "be": "بÛلاروسي", + "bg": "بلغاري", + "bs": "بوسني", + "de": "الماني", + "el": "یوناني", + "en": "انګریزي", + "et": "حبشي", + "eu": "باسکي", + "fa": "ÙØ§Ø±Ø³ÙŠ", + "fi": "Ùینلنډي", + "fr": "ÙØ±Ø§Ù†Ø³ÙˆÙŠ", + "he": "عبري", + "hi": "هندي", + "hy": "ارمني", + "it": "ایټالوي", + "ja": "جاپانی", + "ku": "کردي", + "la": "لاتیني", + "mg": "ملغاسي", + "mk": "مقدوني", + "mn": "مغولي", + "ms": "ملایا", + "ne": "Ù†Ûپالي", + "nl": "هالÛÙ†Ú‰ÙŠ", + "pl": "پولنډي", + "ps": "پښتو", + "pt": "پورتګالي", + "ru": "روسي", + "sa": "سنسکریټ", + "sq": "الباني", + "sv": "سویډنی", + "tg": "تاجکي", + "tk": "ترکمني", + "tt": "تاتار", + "uz": "ازبکي", + "zh": "چیني" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pt.json new file mode 100644 index 0000000000000000000000000000000000000000..cb35e181ce76c169489cd31c26f705cf13cf9c6e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pt.json @@ -0,0 +1,523 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afar", + "ab": "abcázio", + "ace": "achém", + "ach": "acoli", + "ada": "adangme", + "ady": "adigue", + "ae": "avéstico", + "af": "africâner", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainu", + "ak": "akan", + "akk": "acadiano", + "ale": "aleúte", + "alt": "altai do sul", + "am": "amárico", + "an": "aragonês", + "ang": "inglês arcaico", + "anp": "angika", + "ar": "árabe", + "ar_001": "árabe moderno", + "arc": "aramaico", + "arn": "mapudungun", + "arp": "arapaho", + "arw": "arauaqui", + "as": "assamês", + "asa": "asu", + "ast": "asturiano", + "av": "avaric", + "awa": "awadhi", + "ay": "aimara", + "az": "azerbaijano", + "az_Arab": "azeri sul", + "ba": "bashkir", + "bal": "balúchi", + "ban": "balinês", + "bas": "basa", + "bax": "bamum", + "bbj": "ghomala’", + "be": "bielorrusso", + "bej": "beja", + "bem": "bemba", + "bez": "bena", + "bfd": "bafut", + "bg": "búlgaro", + "bgn": "balúchi ocidental", + "bho": "bhojpuri", + "bi": "bislamá", + "bik": "bikol", + "bin": "bini", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bengali", + "bo": "tibetano", + "br": "bretão", + "bra": "braj", + "brx": "bodo", + "bs": "bósnio", + "bss": "akoose", + "bua": "buriato", + "bug": "buginês", + "bum": "bulu", + "byn": "blin", + "byv": "medumba", + "ca": "catalão", + "cad": "caddo", + "car": "caribe", + "cay": "cayuga", + "cch": "atsam", + "ce": "checheno", + "ceb": "cebuano", + "cgg": "chiga", + "ch": "chamorro", + "chb": "chibcha", + "chg": "chagatai", + "chk": "chuukese", + "chm": "mari", + "chn": "jargão Chinook", + "cho": "choctaw", + "chp": "chipewyan", + "chr": "cherokee", + "chy": "cheiene", + "ckb": "sorâni curdo", + "co": "córsico", + "cop": "copta", + "cr": "cree", + "crh": "turco da Crimeia", + "crs": "crioulo francês seichelense", + "cs": "tcheco", + "csb": "kashubian", + "cu": "eslavo eclesiástico", + "cv": "tchuvache", + "cy": "galês", + "da": "dinamarquês", + "dak": "dacota", + "dar": "dargwa", + "dav": "taita", + "de": "alemão", + "de_CH": "alto alemão (Suíça)", + "del": "delaware", + "den": "slave", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "baixo sorábio", + "dua": "duala", + "dum": "holandês médio", + "dv": "divehi", + "dyo": "jola-fonyi", + "dyu": "diúla", + "dz": "dzonga", + "dzg": "dazaga", + "ebu": "embu", + "ee": "eve", + "efi": "efique", + "egy": "egípcio arcaico", + "eka": "ekajuk", + "el": "grego", + "elx": "elamite", + "en": "inglês", + "enm": "inglês médio", + "eo": "esperanto", + "es": "espanhol", + "et": "estoniano", + "eu": "basco", + "ewo": "ewondo", + "fa": "persa", + "fan": "fangue", + "fat": "fanti", + "ff": "fula", + "fi": "finlandês", + "fil": "filipino", + "fj": "fijiano", + "fo": "feroês", + "fon": "fom", + "fr": "francês", + "frm": "francês médio", + "fro": "francês arcaico", + "frr": "frísio setentrional", + "frs": "frisão oriental", + "fur": "friulano", + "fy": "frísio ocidental", + "ga": "irlandês", + "gaa": "ga", + "gag": "gagauz", + "gan": "gan", + "gay": "gayo", + "gba": "gbaia", + "gd": "gaélico escocês", + "gez": "geez", + "gil": "gilbertês", + "gl": "galego", + "gmh": "alto alemão médio", + "gn": "guarani", + "goh": "alemão arcaico alto", + "gon": "gondi", + "gor": "gorontalo", + "got": "gótico", + "grb": "grebo", + "grc": "grego arcaico", + "gsw": "alemão (Suíça)", + "gu": "guzerate", + "guz": "gusii", + "gv": "manx", + "gwi": "gwichʼin", + "ha": "hauçá", + "hai": "haida", + "hak": "hacá", + "haw": "havaiano", + "he": "hebraico", + "hi": "híndi", + "hil": "hiligaynon", + "hit": "hitita", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "croata", + "hsb": "alto sorábio", + "hsn": "xiang", + "ht": "haitiano", + "hu": "húngaro", + "hup": "hupa", + "hy": "armênio", + "hz": "herero", + "ia": "interlíngua", + "iba": "iban", + "ibb": "ibibio", + "id": "indonésio", + "ie": "interlingue", + "ig": "ibo", + "ii": "sichuan yi", + "ik": "inupiaque", + "ilo": "ilocano", + "inh": "inguche", + "io": "ido", + "is": "islandês", + "it": "italiano", + "iu": "inuktitut", + "ja": "japonês", + "jbo": "lojban", + "jgo": "nguemba", + "jmc": "machame", + "jpr": "judaico-persa", + "jrb": "judaico-arábico", + "jv": "javanês", + "ka": "georgiano", + "kaa": "kara-kalpak", + "kab": "kabyle", + "kac": "kachin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardiano", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "maconde", + "kea": "kabuverdianu", + "kfo": "koro", + "kg": "congolês", + "kha": "khasi", + "kho": "khotanês", + "khq": "koyra chiini", + "ki": "quicuio", + "kj": "kuanyama", + "kk": "cazaque", + "kkj": "kako", + "kl": "groenlandês", + "kln": "kalenjin", + "km": "khmer", + "kmb": "quimbundo", + "kn": "canarês", + "ko": "coreano", + "koi": "komi-permyak", + "kok": "concani", + "kos": "kosraean", + "kpe": "kpelle", + "kr": "canúri", + "krc": "karachay-balkar", + "krl": "carélio", + "kru": "kurukh", + "ks": "caxemira", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "kölsch", + "ku": "curdo", + "kum": "kumyk", + "kut": "kutenai", + "kv": "komi", + "kw": "córnico", + "ky": "quirguiz", + "la": "latim", + "lad": "ladino", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "luxemburguês", + "lez": "lezghian", + "lg": "luganda", + "li": "limburguês", + "lkt": "lacota", + "ln": "lingala", + "lo": "laosiano", + "lol": "mongo", + "loz": "lozi", + "lrc": "luri setentrional", + "lt": "lituano", + "lu": "luba-catanga", + "lua": "luba-lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "lushai", + "luy": "luyia", + "lv": "letão", + "mad": "madurês", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makasar", + "man": "mandinga", + "mas": "massai", + "mde": "maba", + "mdf": "mocsa", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "morisyen", + "mg": "malgaxe", + "mga": "irlandês médio", + "mgh": "macua", + "mgo": "meta’", + "mh": "marshalês", + "mi": "maori", + "mic": "miquemaque", + "min": "minangkabau", + "mk": "macedônio", + "ml": "malaiala", + "mn": "mongol", + "mnc": "manchu", + "mni": "manipuri", + "moh": "moicano", + "mos": "mossi", + "mr": "marata", + "ms": "malaio", + "mt": "maltês", + "mua": "mundang", + "mul": "múltiplos idiomas", + "mus": "creek", + "mwl": "mirandês", + "mwr": "marwari", + "my": "birmanês", + "mye": "myene", + "myv": "erzya", + "mzn": "mazandarani", + "na": "nauruano", + "nan": "min nan", + "nap": "napolitano", + "naq": "nama", + "nb": "bokmÃ¥l norueguês", + "nd": "ndebele do norte", + "nds": "baixo alemão", + "nds_NL": "baixo saxão", + "ne": "nepali", + "new": "newari", + "ng": "dongo", + "nia": "nias", + "niu": "niueano", + "nl": "holandês", + "nl_BE": "flamengo", + "nmg": "kwasio", + "nn": "nynorsk norueguês", + "nnh": "ngiemboon", + "no": "norueguês", + "nog": "nogai", + "non": "nórdico arcaico", + "nqo": "n’ko", + "nr": "ndebele do sul", + "nso": "soto setentrional", + "nus": "nuer", + "nv": "navajo", + "nwc": "newari clássico", + "ny": "nianja", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzima", + "oc": "occitânico", + "oj": "ojibwa", + "om": "oromo", + "or": "oriya", + "os": "osseto", + "osa": "osage", + "ota": "turco otomano", + "pa": "panjabi", + "pag": "pangasinã", + "pal": "pálavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauano", + "pcm": "pidgin nigeriano", + "peo": "persa arcaico", + "phn": "fenício", + "pi": "páli", + "pl": "polonês", + "pon": "pohnpeiano", + "prg": "prussiano", + "pro": "provençal arcaico", + "ps": "pashto", + "pt": "português", + "qu": "quíchua", + "quc": "quiché", + "raj": "rajastani", + "rap": "rapanui", + "rar": "rarotongano", + "rm": "romanche", + "rn": "rundi", + "ro": "romeno", + "ro_MD": "moldávio", + "rof": "rombo", + "rom": "romani", + "root": "raiz", + "ru": "russo", + "rup": "aromeno", + "rw": "quiniaruanda", + "rwk": "rwa", + "sa": "sânscrito", + "sad": "sandawe", + "sah": "iacuto", + "sam": "aramaico samaritano", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardo", + "scn": "siciliano", + "sco": "scots", + "sd": "sindi", + "sdh": "curdo meridional", + "se": "sami setentrional", + "see": "seneca", + "seh": "sena", + "sel": "selkup", + "ses": "koyraboro senni", + "sg": "sango", + "sga": "irlandês arcaico", + "sh": "servo-croata", + "shi": "tachelhit", + "shn": "shan", + "shu": "árabe chadiano", + "si": "cingalês", + "sid": "sidamo", + "sk": "eslovaco", + "sl": "esloveno", + "sm": "samoano", + "sma": "sami do sul", + "smj": "sami de Lule", + "smn": "sami de Inari", + "sms": "sami de Skolt", + "sn": "shona", + "snk": "soninquê", + "so": "somali", + "sog": "sogdiano", + "sq": "albanês", + "sr": "sérvio", + "srn": "surinamês", + "srr": "serere", + "ss": "suázi", + "ssy": "saho", + "st": "soto do sul", + "su": "sundanês", + "suk": "sukuma", + "sus": "susu", + "sux": "sumério", + "sv": "sueco", + "sw": "suaíli", + "sw_CD": "suaíli do Congo", + "swb": "comoriano", + "syc": "siríaco clássico", + "syr": "siríaco", + "ta": "tâmil", + "te": "telugu", + "tem": "timne", + "teo": "teso", + "ter": "tereno", + "tet": "tétum", + "tg": "tajique", + "th": "tailandês", + "ti": "tigrínio", + "tig": "tigré", + "tiv": "tiv", + "tk": "turcomeno", + "tkl": "toquelauano", + "tl": "tagalo", + "tlh": "klingon", + "tli": "tlinguite", + "tmh": "tamaxeque", + "tn": "tswana", + "to": "tonganês", + "tog": "tonganês de Nyasa", + "tpi": "tok pisin", + "tr": "turco", + "trv": "taroko", + "ts": "tsonga", + "tsi": "tsimshiano", + "tt": "tatar", + "tum": "tumbuka", + "tvl": "tuvaluano", + "tw": "twi", + "twq": "tasawaq", + "ty": "taitiano", + "tyv": "tuviniano", + "tzm": "tamazight do Atlas Central", + "udm": "udmurte", + "ug": "uigur", + "uga": "ugarítico", + "uk": "ucraniano", + "umb": "umbundu", + "und": "idioma desconhecido", + "ur": "urdu", + "uz": "usbeque", + "vai": "vai", + "ve": "venda", + "vi": "vietnamita", + "vo": "volapuque", + "vot": "vótico", + "vun": "vunjo", + "wa": "valão", + "wae": "walser", + "wal": "wolaytta", + "war": "waray", + "was": "washo", + "wbp": "warlpiri", + "wo": "uólofe", + "wuu": "wu", + "xal": "kalmyk", + "xh": "xosa", + "xog": "lusoga", + "yao": "yao", + "yap": "yapese", + "yav": "yangben", + "ybb": "yemba", + "yi": "iídiche", + "yo": "iorubá", + "yue": "cantonês", + "za": "zhuang", + "zap": "zapoteco", + "zbl": "símbolos blis", + "zen": "zenaga", + "zgh": "tamazight marroquino padrão", + "zh": "chinês", + "zh_Hans": "chinês simplificado", + "zh_Hant": "chinês tradicional", + "zu": "zulu", + "zun": "zunhi", + "zxx": "sem conteúdo linguístico", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pt_PT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pt_PT.json new file mode 100644 index 0000000000000000000000000000000000000000..352d0f52dcff5e68bc88b32d3a10f32dad6b565c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/pt_PT.json @@ -0,0 +1,78 @@ +{ + "Version": "2.1.29.54", + "Names": { + "af": "africanês", + "ang": "inglês antigo", + "ar_001": "árabe moderno padrão", + "arn": "mapuche", + "bax": "bamun", + "bbj": "ghomala", + "bua": "buriat", + "chn": "jargão chinook", + "ckb": "sorani curdo", + "crs": "francês crioulo seselwa", + "cs": "checo", + "cv": "chuvash", + "de_AT": "alemão austríaco", + "de_CH": "alto alemão suíço", + "ee": "ewe", + "egy": "egípcio clássico", + "en_AU": "inglês australiano", + "en_CA": "inglês canadiano", + "en_GB": "inglês britânico", + "en_US": "inglês americano", + "es_419": "espanhol latino-americano", + "es_ES": "espanhol europeu", + "et": "estónio", + "fr_CA": "francês canadiano", + "fr_CH": "francês suíço", + "fro": "francês antigo", + "frs": "frísio oriental", + "fy": "frísico ocidental", + "goh": "alemão alto antigo", + "grc": "grego clássico", + "gsw": "alemão suíço", + "ha": "haúça", + "hi": "hindi", + "hy": "arménio", + "ig": "igbo", + "kbd": "cabardiano", + "kea": "crioulo cabo-verdiano", + "kn": "canarim", + "lez": "lezghiano", + "lg": "ganda", + "lrc": "luri do norte", + "luo": "luo", + "mk": "macedónio", + "moh": "mohawk", + "nb": "norueguês bokmÃ¥l", + "nds": "baixo-alemão", + "nds_NL": "baixo-saxão", + "nn": "norueguês nynorsk", + "non": "nórdico antigo", + "oc": "occitano", + "os": "ossético", + "pag": "língua pangasinesa", + "peo": "persa antigo", + "pl": "polaco", + "pon": "língua pohnpeica", + "pro": "provençal antigo", + "ps": "pastó", + "pt_BR": "português do Brasil", + "pt_PT": "português europeu", + "raj": "rajastanês", + "root": "root", + "rw": "kinyarwanda", + "sah": "sakha", + "se": "sami do norte", + "sga": "irlandês antigo", + "shu": "árabe do Chade", + "smn": "inari sami", + "ti": "tigrínia", + "tk": "turcomano", + "to": "tonga", + "vai": "vai", + "xog": "soga", + "yo": "ioruba" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/qu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/qu.json new file mode 100644 index 0000000000000000000000000000000000000000..17b384463b8ae3410669917a61ac26d8dbc5088b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/qu.json @@ -0,0 +1,133 @@ +{ + "Version": "2.1.27.98", + "Names": { + "af": "Afrikaans Simi", + "am": "Amarico Simi", + "ar": "Arabe Simi", + "arn": "Mapuche Simi", + "as": "Asames Simi", + "az": "Azerbaiyano Simi", + "ba": "Baskir Simi", + "be": "Bielorruso Simi", + "bg": "Bulgaro Simi", + "bn": "Bangla Simi", + "bo": "Tibetano Simi", + "br": "Breton Simi", + "bs": "Bosnio Simi", + "ca": "Catalan Simi", + "chr": "Cheroqui Simi", + "ckb": "Chawpi Kurdo Simi", + "co": "Corso Simi", + "cs": "Checo Simi", + "cy": "Gales Simi", + "da": "Danes Simi", + "de": "Aleman Simi", + "dsb": "Bajo Sorbio Simi", + "dv": "Divehi Simi", + "el": "Griego Simi", + "en": "Ingles Simi", + "es": "Español Simi", + "et": "Estonio Simi", + "eu": "Euskera Simi", + "fa": "Persa Simi", + "ff": "Fulah Simi", + "fi": "Fines Simi", + "fil": "Filipino Simi", + "fo": "Feroes Simi", + "fr": "Frances Simi", + "fy": "Frison Simi", + "ga": "Irlandes Simi", + "gd": "Gaelico Escoces Simi", + "gl": "Gallego Simi", + "gsw": "Alsaciano Simi", + "gu": "Gujarati Simi", + "ha": "Hausa Simi", + "he": "Hebreo Simi", + "hi": "Hindi Simi", + "hmn": "Hmong Daw Simi", + "hr": "Croata Simi", + "hsb": "Alto Sorbio Simi", + "ht": "Haitiano Criollo Simi", + "hu": "Hungaro Simi", + "hy": "Armenio Simi", + "id": "Indonesio Simi", + "ig": "Igbo Simi", + "ii": "Yi Simi", + "is": "Islandes Simi", + "it": "Italiano Simi", + "iu": "Inuktitut Simi", + "ja": "Japones Simi", + "ka": "Georgiano Simi", + "kk": "Kazajo Simi", + "kl": "Groenlandes Simi", + "km": "Khmer Simi", + "kn": "Kannada Simi", + "ko": "Coreano Simi", + "kok": "Konkani Simi", + "ky": "Kirghiz Simi", + "lb": "Luxemburgues Simi", + "lo": "Lao Simi", + "lt": "Lituano Simi", + "lv": "Leton Simi", + "mi": "Maori Simi", + "mk": "Macedonio Simi", + "ml": "Malayalam Simi", + "mn": "Mongol Simi", + "moh": "Mohawk Simi", + "mr": "Marathi Simi", + "ms": "Malayo Simi", + "mt": "Maltes Simi", + "ne": "Nepali Simi", + "nl": "Neerlandes Simi", + "no": "Noruego Simi", + "nso": "Sesotho Sa Leboa Simi", + "oc": "Occitano Simi", + "or": "Odia Simi", + "pa": "Punyabi Simi", + "pap": "Papiamento Simi", + "pl": "Polaco Simi", + "ps": "Pashto Simi", + "pt": "Portugues Simi", + "qu": "Runasimi", + "quc": "Kʼicheʼ Simi", + "rm": "Romanche Simi", + "ro": "Rumano Simi", + "ru": "Ruso Simi", + "rw": "Kinyarwanda Simi", + "sa": "Sanscrito Simi", + "sah": "Sakha Simi", + "sd": "Sindhi Simi", + "se": "Chincha Sami Simi", + "si": "Cingales Simi", + "sk": "Eslovaco Simi", + "sl": "Esloveno Simi", + "sma": "Qulla Sami Simi", + "smj": "Sami Lule Simi", + "smn": "Sami Inari Simi", + "sms": "Sami Skolt Simi", + "sq": "Albanes Simi", + "sr": "Serbio Simi", + "sv": "Sueco Simi", + "sw": "Suajili Simi", + "syr": "Siriaco Simi", + "ta": "Tamil Simi", + "te": "Telugu Simi", + "tg": "Tayiko Simi", + "th": "Tailandes Simi", + "ti": "Tigriña Simi", + "tk": "Turcomano Simi", + "tn": "Setsuana Simi", + "tr": "Turco Simi", + "tt": "Tartaro Simi", + "ug": "Uigur Simi", + "uk": "Ucraniano Simi", + "ur": "Urdu Simi", + "uz": "Uzbeko Simi", + "vi": "Vietnamita Simi", + "wo": "Wolof Simi", + "xh": "Isixhosa Simi", + "yo": "Yoruba Simi", + "zh": "Chino Simi", + "zu": "Isizulu Simi" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/rm.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/rm.json new file mode 100644 index 0000000000000000000000000000000000000000..19e8366bab68f4a9f1942d332202473c67eaf9d4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/rm.json @@ -0,0 +1,442 @@ +{ + "Version": "2.1.28.76", + "Names": { + "aa": "afar", + "ab": "abchasian", + "ace": "aceh", + "ach": "acoli", + "ada": "andangme", + "ady": "adygai", + "ae": "avestic", + "af": "afrikaans", + "afh": "afrihili", + "ain": "ainu", + "ak": "akan", + "akk": "accadic", + "ale": "aleutic", + "alt": "altaic dal sid", + "am": "amaric", + "an": "aragonais", + "ang": "englais vegl", + "anp": "angika", + "ar": "arab", + "arc": "arameic", + "arn": "araucanic", + "arp": "arapaho", + "arw": "arawak", + "as": "assami", + "ast": "asturian", + "av": "avaric", + "awa": "awadhi", + "ay": "aymara", + "az": "aserbeidschanic", + "ba": "baschkir", + "bal": "belutschi", + "ban": "balinais", + "bas": "basaa", + "be": "bieloruss", + "bej": "bedscha", + "bem": "bemba", + "bg": "bulgar", + "bho": "bhojpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bla": "siksika", + "bm": "bambara", + "bn": "bengal", + "bo": "tibetan", + "br": "breton", + "bra": "braj", + "bs": "bosniac", + "bua": "buriat", + "bug": "bugi", + "byn": "blin", + "ca": "catalan", + "cad": "caddo", + "car": "caribic", + "cch": "atsam", + "ce": "tschetschen", + "ceb": "cebuano", + "ch": "chamorro", + "chb": "chibcha", + "chg": "tschagataic", + "chk": "chuukais", + "chm": "mari", + "chn": "patuà chinook", + "cho": "choctaw", + "chp": "chipewyan", + "chr": "cherokee", + "chy": "cheyenne", + "co": "cors", + "cop": "coptic", + "cr": "cree", + "crh": "tirc crimean", + "cs": "tschec", + "csb": "kaschubic", + "cu": "slav da baselgia", + "cv": "tschuvasch", + "cy": "kimric", + "da": "danais", + "dak": "dakota", + "dar": "dargwa", + "de": "tudestg", + "de_AT": "tudestg austriac", + "del": "delaware", + "den": "slavey", + "dgr": "dogrib", + "din": "dinka", + "doi": "dogri", + "dsb": "bass sorb", + "dua": "duala", + "dum": "ollandais mesaun", + "dv": "maledivic", + "dyu": "diula", + "dz": "dzongkha", + "ee": "ewe", + "efi": "efik", + "egy": "egipzian vegl", + "eka": "ekajuk", + "el": "grec", + "elx": "elamitic", + "en": "englais", + "en_AU": "englais australian", + "en_CA": "englais canadais", + "en_GB": "englais britannic", + "en_US": "englais american", + "enm": "englais mesaun", + "eo": "esperanto", + "es": "spagnol", + "es_419": "spagnol latinamerican", + "es_ES": "spagnol iberic", + "et": "eston", + "eu": "basc", + "ewo": "ewondo", + "fa": "persian", + "fan": "fang", + "fat": "fanti", + "ff": "fulah", + "fi": "finlandais", + "fil": "filippino", + "fj": "fidschian", + "fo": "ferrais", + "fon": "fon", + "fr": "franzos", + "fr_CA": "franzos canadais", + "fr_CH": "franzos svizzer", + "frm": "franzos mesaun", + "fro": "franzos vegl", + "frr": "fris dal nord", + "frs": "fris da l’ost", + "fur": "friulan", + "fy": "fris", + "ga": "irlandais", + "gaa": "ga", + "gay": "gayo", + "gba": "gbaya", + "gd": "gaelic scot", + "gez": "geez", + "gil": "gilbertais", + "gl": "galician", + "gmh": "tudestg mesaun", + "gn": "guarani", + "goh": "vegl tudestg da scrittira", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotic", + "grb": "grebo", + "grc": "grec vegl", + "gsw": "tudestg svizzer", + "gu": "gujarati", + "gv": "manx", + "gwi": "gwichʼin", + "ha": "haussa", + "hai": "haida", + "haw": "hawaian", + "he": "ebraic", + "hi": "hindi", + "hil": "hiligaynon", + "hit": "ettitic", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "croat", + "hsb": "aut sorb", + "ht": "haitian", + "hu": "ungarais", + "hup": "hupa", + "hy": "armen", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "id": "indonais", + "ie": "interlingue", + "ig": "igbo", + "ii": "sichuan yi", + "ik": "inupiak", + "ilo": "ilocano", + "inh": "ingush", + "io": "ido", + "is": "islandais", + "it": "talian", + "iu": "inuktitut", + "ja": "giapunais", + "jbo": "lojban", + "jpr": "giudaic-persian", + "jrb": "giudaic-arab", + "jv": "javanais", + "ka": "georgian", + "kaa": "karakalpak", + "kab": "kabyle", + "kac": "kachin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardic", + "kcg": "tyap", + "kfo": "koro", + "kg": "kongo", + "kha": "khasi", + "kho": "khotanais", + "ki": "kikuyu", + "kj": "kuanyama", + "kk": "casac", + "kl": "grönlandais", + "km": "cambodschan", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "corean", + "kok": "konkani", + "kos": "kosraean", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karachay-balkar", + "krl": "carelian", + "kru": "kurukh", + "ks": "kashmiri", + "ku": "curd", + "kum": "kumuk", + "kut": "kutenai", + "kv": "komi", + "kw": "cornic", + "ky": "kirghis", + "la": "latin", + "lad": "ladino", + "lah": "lahnda", + "lam": "lamba", + "lb": "luxemburgais", + "lez": "lezghian", + "lg": "ganda", + "li": "limburgais", + "ln": "lingala", + "lo": "laot", + "lol": "lomongo", + "loz": "lozi", + "lt": "lituan", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "lushai", + "lv": "letton", + "mad": "madurais", + "mag": "magahi", + "mai": "maithili", + "mak": "makassar", + "man": "mandingo", + "mas": "masai", + "mdf": "moksha", + "mdr": "mandar", + "men": "mende", + "mg": "malagassi", + "mga": "irlandais mesaun", + "mh": "marschallais", + "mi": "maori", + "mic": "micmac", + "min": "minangkabau", + "mk": "macedon", + "ml": "malayalam", + "mn": "mongolic", + "mnc": "manchu", + "mni": "manipuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "marathi", + "ms": "malaic", + "mt": "maltais", + "mul": "pluriling", + "mus": "creek", + "mwl": "mirandais", + "mwr": "marwari", + "my": "birman", + "myv": "erzya", + "na": "nauru", + "nap": "neapolitan", + "nb": "norvegais bokmÃ¥l", + "nd": "ndebele dal nord", + "nds": "bass tudestg", + "ne": "nepalais", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niue", + "nl": "ollandais", + "nl_BE": "flam", + "nn": "norvegiais nynorsk", + "no": "norvegiais", + "nog": "nogai", + "non": "nordic vegl", + "nqo": "n’ko", + "nr": "ndebele dal sid", + "nso": "sotho dal nord", + "nv": "navajo", + "nwc": "newari classic", + "ny": "nyanja", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzima", + "oc": "occitan", + "oj": "ojibwa", + "om": "oromo", + "or": "oriya", + "os": "ossetic", + "osa": "osage", + "ota": "tirc ottoman", + "pa": "punjabi", + "pag": "pangasinan", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palau", + "peo": "persian vegl", + "phn": "fenizian", + "pi": "pali", + "pl": "polac", + "pon": "ponapean", + "pro": "provenzal vegl", + "ps": "paschto", + "pt": "portugais", + "pt_BR": "portugais brasilian", + "pt_PT": "portugais iberian", + "qu": "quechua", + "raj": "rajasthani", + "rap": "rapanui", + "rar": "rarotonga", + "rm": "rumantsch", + "rn": "rundi", + "ro": "rumen", + "ro_MD": "moldav", + "rom": "romani", + "ru": "russ", + "rup": "aromunic", + "rw": "kinyarwanda", + "sa": "sanscrit", + "sad": "sandawe", + "sah": "jakut", + "sam": "arameic samaritan", + "sas": "sasak", + "sat": "santali", + "sc": "sard", + "scn": "sicilian", + "sco": "scot", + "sd": "sindhi", + "se": "sami dal nord", + "sel": "selkup", + "sg": "sango", + "sga": "irlandais vegl", + "sh": "serbo-croat", + "shn": "shan", + "si": "singalais", + "sid": "sidamo", + "sk": "slovac", + "sl": "sloven", + "sm": "samoan", + "sma": "sami dal sid", + "smj": "sami lule", + "smn": "sami inari", + "sms": "sami skolt", + "sn": "shona", + "snk": "soninke", + "so": "somali", + "sog": "sogdian", + "sq": "albanais", + "sr": "serb", + "srn": "sranan tongo", + "srr": "serer", + "ss": "swazi", + "st": "sotho dal sid", + "su": "sundanais", + "suk": "sukuma", + "sus": "susu", + "sux": "sumeric", + "sv": "svedais", + "sw": "suahili", + "syc": "siric classic", + "syr": "siric", + "ta": "tamil", + "te": "telugu", + "tem": "temne", + "ter": "tereno", + "tet": "tetum", + "tg": "tadjik", + "th": "tailandais", + "ti": "tigrinya", + "tig": "tigre", + "tiv": "tiv", + "tk": "turkmen", + "tkl": "tokelau", + "tl": "tagalog", + "tlh": "klingonic", + "tli": "tlingit", + "tmh": "tamasheq", + "tn": "tswana", + "to": "tonga", + "tog": "lingua tsonga", + "tpi": "tok pisin", + "tr": "tirc", + "ts": "tsonga", + "tsi": "tsimshian", + "tt": "tatar", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "twi", + "ty": "tahitian", + "tyv": "tuvinian", + "udm": "udmurt", + "ug": "uiguric", + "uga": "ugaritic", + "uk": "ucranais", + "umb": "mbundu", + "und": "linguas betg determinadas", + "ur": "urdu", + "uz": "usbec", + "vai": "vai", + "ve": "venda", + "vi": "vietnamais", + "vo": "volapuk", + "vot": "votic", + "wa": "vallon", + "wal": "walamo", + "war": "waray", + "was": "washo", + "wo": "wolof", + "xal": "kalmuk", + "xh": "xhosa", + "yao": "yao", + "yap": "yapais", + "yi": "jiddic", + "yo": "yoruba", + "za": "zhuang", + "zap": "zapotec", + "zbl": "simbols da Bliss", + "zen": "zenaga", + "zh": "chinais", + "zh_Hans": "chinais simplifitgà", + "zh_Hant": "chinais tradiziunal", + "zu": "zulu", + "zun": "zuni", + "zxx": "nagins cuntegns linguistics", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/rn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/rn.json new file mode 100644 index 0000000000000000000000000000000000000000..dbed02f9660a8e481c16432cf56542211cb68db4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/rn.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ak": "Igikani", + "am": "Ikimuhariki", + "ar": "Icarabu", + "be": "Ikibelarusiya", + "bg": "Ikinyabuligariya", + "bn": "Ikibengali", + "cs": "Igiceke", + "de": "Ikidage", + "el": "Ikigereki", + "en": "Icongereza", + "es": "Icesipanyolo", + "fa": "Igiperisi", + "fr": "Igifaransa", + "ha": "Igihawusa", + "hi": "Igihindi", + "hu": "Ikinyahongiriya", + "id": "Ikinyendoziya", + "ig": "Ikigubo", + "it": "Igitaliyani", + "ja": "Ikiyapani", + "jv": "Ikinyejava", + "km": "Igikambodiya", + "ko": "Ikinyakoreya", + "ms": "Ikinyamaleziya", + "my": "Ikinyabirimaniya", + "ne": "Ikinepali", + "nl": "Igiholandi", + "pa": "Igipunjabi", + "pl": "Ikinyapolonye", + "pt": "Igiporutugari", + "rn": "Ikirundi", + "ro": "Ikinyarumaniya", + "ru": "Ikirusiya", + "rw": "Ikinyarwanda", + "so": "Igisomali", + "sv": "Igisuweduwa", + "ta": "Igitamili", + "th": "Ikinyatayilandi", + "tr": "Igiturukiya", + "uk": "Ikinyayukereni", + "ur": "Inyeyurudu", + "vi": "Ikinyaviyetinamu", + "yo": "Ikiyoruba", + "zh": "Igishinwa", + "zu": "Ikizulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ro.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ro.json new file mode 100644 index 0000000000000000000000000000000000000000..2bd979f0aec1d17d74e7724720b745cd1f9cb97b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ro.json @@ -0,0 +1,521 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afar", + "ab": "abhază", + "ace": "aceh", + "ach": "acoli", + "ada": "adangme", + "ady": "adyghe", + "ae": "avestană", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainu", + "ak": "akan", + "akk": "akkadiană", + "ale": "aleută", + "alt": "altaică meridională", + "am": "amharică", + "an": "aragoneză", + "ang": "engleză veche", + "anp": "angika", + "ar": "arabă", + "ar_001": "arabă standard modernă", + "arc": "aramaică", + "arn": "araucaniană", + "arp": "arapaho", + "arw": "arawak", + "as": "asameză", + "asa": "asu", + "ast": "asturiană", + "av": "avară", + "awa": "awadhi", + "ay": "aymara", + "az": "azeră", + "ba": "baÈ™kiră", + "bal": "baluchi", + "ban": "balineză", + "bas": "basaa", + "bax": "bamun", + "bbj": "ghomala", + "be": "bielorusă", + "bej": "beja", + "bem": "bemba", + "bez": "bena", + "bfd": "bafut", + "bg": "bulgară", + "bgn": "baluchi occidentală", + "bho": "bhojpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bkm": "kom", + "bla": "siksika", + "bm": "bambara", + "bn": "bengaleză", + "bo": "tibetană", + "br": "bretonă", + "bra": "braj", + "brx": "bodo", + "bs": "bosniacă", + "bss": "akoose", + "bua": "buriat", + "bug": "bugineză", + "bum": "bulu", + "byn": "blin", + "byv": "medumba", + "ca": "catalană", + "cad": "caddo", + "car": "carib", + "cay": "cayuga", + "cch": "atsam", + "ce": "cecenă", + "ceb": "cebuană", + "cgg": "chiga", + "ch": "chamorro", + "chb": "chibcha", + "chg": "chagatai", + "chk": "chuukese", + "chm": "mari", + "chn": "jargon chinook", + "cho": "choctaw", + "chp": "chipewyan", + "chr": "cherokee", + "chy": "cheyenne", + "ckb": "kurdă centrală", + "co": "corsicană", + "cop": "coptă", + "cr": "cree", + "crh": "turcă crimeeană", + "crs": "creolă franceză seselwa", + "cs": "cehă", + "csb": "caÈ™ubiană", + "cu": "slavonă", + "cv": "ciuvașă", + "cy": "galeză", + "da": "daneză", + "dak": "dakota", + "dar": "dargwa", + "dav": "taita", + "de": "germană", + "de_CH": "germană standard (ElveÈ›ia)", + "del": "delaware", + "den": "slave", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "sorabă de jos", + "dua": "duala", + "dum": "neerlandeză medie", + "dv": "divehi", + "dyo": "jola-fonyi", + "dyu": "dyula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embu", + "ee": "ewe", + "efi": "efik", + "egy": "egipteană veche", + "eka": "ekajuk", + "el": "greacă", + "elx": "elamită", + "en": "engleză", + "enm": "engleză medie", + "eo": "esperanto", + "es": "spaniolă", + "et": "estonă", + "eu": "bască", + "ewo": "ewondo", + "fa": "persană", + "fan": "fang", + "fat": "fanti", + "ff": "fulah", + "fi": "finlandeză", + "fil": "filipineză", + "fj": "fijiană", + "fo": "faroeză", + "fon": "fon", + "fr": "franceză", + "frm": "franceză medie", + "fro": "franceză veche", + "frr": "frizonă nordică", + "frs": "frizonă orientală", + "fur": "friulană", + "fy": "frizonă occidentală", + "ga": "irlandeză", + "gaa": "ga", + "gag": "găgăuză", + "gan": "chineză gan", + "gay": "gayo", + "gba": "gbaya", + "gd": "gaelică scoÈ›iană", + "gez": "geez", + "gil": "gilbertină", + "gl": "galiciană", + "gmh": "germană înaltă medie", + "gn": "guarani", + "goh": "germană înaltă veche", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotică", + "grb": "grebo", + "grc": "greacă veche", + "gsw": "germană (ElveÈ›ia)", + "gu": "gujarati", + "guz": "gusii", + "gv": "manx", + "gwi": "gwichʼin", + "ha": "hausa", + "hai": "haida", + "hak": "chineză hakka", + "haw": "hawaiiană", + "he": "ebraică", + "hi": "hindi", + "hil": "hiligaynon", + "hit": "hitită", + "hmn": "hmong", + "ho": "hiri motu", + "hr": "croată", + "hsb": "sorabă de sus", + "hsn": "chineză xiang", + "ht": "haitiană", + "hu": "maghiară", + "hup": "hupa", + "hy": "armeană", + "hz": "herero", + "ia": "interlingua", + "iba": "iban", + "ibb": "ibibio", + "id": "indoneziană", + "ie": "interlingue", + "ig": "igbo", + "ii": "sichuan yi", + "ik": "inupiak", + "ilo": "iloko", + "inh": "ingușă", + "io": "ido", + "is": "islandeză", + "it": "italiană", + "iu": "inuktitut", + "ja": "japoneză", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jpr": "iudeo-persană", + "jrb": "iudeo-arabă", + "jv": "javaneză", + "ka": "georgiană", + "kaa": "karakalpak", + "kab": "kabyle", + "kac": "kachin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardian", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "kabuverdianu", + "kfo": "koro", + "kg": "congoleză", + "kha": "khasi", + "kho": "khotaneză", + "khq": "koyra chiini", + "ki": "kikuyu", + "kj": "kuanyama", + "kk": "kazahă", + "kkj": "kako", + "kl": "kalaallisut", + "kln": "kalenjin", + "km": "khmeră", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "coreeană", + "koi": "komi-permiak", + "kok": "konkani", + "kos": "kosrae", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karaceai-balkar", + "krl": "kareliană", + "kru": "kurukh", + "ks": "caÈ™miră", + "ksb": "shambala", + "ksf": "bafia", + "ksh": "kölsch", + "ku": "kurdă", + "kum": "kumyk", + "kut": "kutenai", + "kv": "komi", + "kw": "cornică", + "ky": "kârgâză", + "la": "latină", + "lad": "ladino", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "luxemburgheză", + "lez": "lezghian", + "lg": "ganda", + "li": "limburgheză", + "lkt": "lakota", + "ln": "lingala", + "lo": "laoÈ›iană", + "lol": "mongo", + "loz": "lozi", + "lrc": "luri de nord", + "lt": "lituaniană", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseno", + "lun": "lunda", + "luo": "luo", + "lus": "mizo", + "luy": "luyia", + "lv": "letonă", + "mad": "madureză", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makasar", + "man": "mandingo", + "mas": "masai", + "mde": "maba", + "mdf": "moksha", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "morisyen", + "mg": "malgașă", + "mga": "irlandeză medie", + "mgh": "makhuwa-meetto", + "mgo": "meta’", + "mh": "marshalleză", + "mi": "maori", + "mic": "micmac", + "min": "minangkabau", + "mk": "macedoneană", + "ml": "malayalam", + "mn": "mongolă", + "mnc": "manciuriană", + "mni": "manipuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "marathi", + "ms": "malaeză", + "mt": "malteză", + "mua": "mundang", + "mul": "mai multe limbi", + "mus": "creek", + "mwl": "mirandeză", + "mwr": "marwari", + "my": "birmană", + "mye": "myene", + "myv": "erzya", + "mzn": "mazanderani", + "na": "nauru", + "nan": "chineză min nan", + "nap": "napolitană", + "naq": "nama", + "nb": "norvegiană bokmÃ¥l", + "nd": "ndebele de nord", + "nds": "germana de jos", + "nds_NL": "saxona de jos", + "ne": "nepaleză", + "new": "newari", + "ng": "ndonga", + "nia": "nias", + "niu": "niueană", + "nl": "neerlandeză", + "nl_BE": "flamandă", + "nmg": "kwasio", + "nn": "norvegiană nynorsk", + "nnh": "ngiemboon", + "no": "norvegiană", + "nog": "nogai", + "non": "nordică veche", + "nqo": "n’ko", + "nr": "ndebele de sud", + "nso": "sotho de nord", + "nus": "nuer", + "nv": "navajo", + "nwc": "newari clasică", + "ny": "nyanja", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzima", + "oc": "occitană", + "oj": "ojibwa", + "om": "oromo", + "or": "oriya", + "os": "osetă", + "osa": "osage", + "ota": "turcă otomană", + "pa": "punjabi", + "pag": "pangasinan", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauană", + "pcm": "pidgin nigerian", + "peo": "persană veche", + "phn": "feniciană", + "pi": "pali", + "pl": "poloneză", + "pon": "pohnpeiană", + "prg": "prusacă", + "pro": "provensală veche", + "ps": "paÈ™tună", + "pt": "portugheză", + "qu": "quechua", + "quc": "quiché", + "raj": "rajasthani", + "rap": "rapanui", + "rar": "rarotongan", + "rm": "romanșă", + "rn": "kirundi", + "ro": "română", + "ro_MD": "moldovenească", + "rof": "rombo", + "rom": "romani", + "root": "root", + "ru": "rusă", + "rup": "aromână", + "rw": "kinyarwanda", + "rwk": "rwa", + "sa": "sanscrită", + "sad": "sandawe", + "sah": "sakha", + "sam": "aramaică samariteană", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardiniană", + "scn": "siciliană", + "sco": "scots", + "sd": "sindhi", + "sdh": "kurdă de sud", + "se": "sami de nord", + "see": "seneca", + "seh": "sena", + "sel": "selkup", + "ses": "koyraboro Senni", + "sg": "sango", + "sga": "irlandeză veche", + "sh": "sârbo-croată", + "shi": "tachelhit", + "shn": "shan", + "shu": "arabă ciadiană", + "si": "singaleză", + "sid": "sidamo", + "sk": "slovacă", + "sl": "slovenă", + "sm": "samoană", + "sma": "sami de sud", + "smj": "lule sami", + "smn": "inari sami", + "sms": "skolt sami", + "sn": "shona", + "snk": "soninke", + "so": "somaleză", + "sog": "sogdien", + "sq": "albaneză", + "sr": "sârbă", + "srn": "sranan tongo", + "srr": "serer", + "ss": "swati", + "ssy": "saho", + "st": "sesotho", + "su": "sundaneză", + "suk": "sukuma", + "sus": "susu", + "sux": "sumeriană", + "sv": "suedeză", + "sw": "swahili", + "sw_CD": "swahili (R.D. Congo)", + "swb": "comoreză", + "syc": "siriacă clasică", + "syr": "siriacă", + "ta": "tamilă", + "te": "telugu", + "tem": "timne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadjică", + "th": "thailandeză", + "ti": "tigrină", + "tig": "tigre", + "tiv": "tiv", + "tk": "turkmenă", + "tkl": "tokelau", + "tl": "tagalog", + "tlh": "klingoniană", + "tli": "tlingit", + "tmh": "tamashek", + "tn": "setswana", + "to": "tongană", + "tog": "nyasa tonga", + "tpi": "tok pisin", + "tr": "turcă", + "trv": "taroko", + "ts": "tsonga", + "tsi": "tsimshian", + "tt": "tătară", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitiană", + "tyv": "tuvană", + "tzm": "tamazight central marocană", + "udm": "udmurt", + "ug": "uigură", + "uga": "ugaritică", + "uk": "ucraineană", + "umb": "umbundu", + "und": "limbă necunoscută", + "ur": "urdu", + "uz": "uzbecă", + "vai": "vai", + "ve": "venda", + "vi": "vietnameză", + "vo": "volapuk", + "vot": "votică", + "vun": "vunjo", + "wa": "valonă", + "wae": "walser", + "wal": "wolaita", + "war": "waray", + "was": "washo", + "wbp": "warlpiri", + "wo": "wolof", + "wuu": "chineză wu", + "xal": "calmucă", + "xh": "xhosa", + "xog": "soga", + "yao": "yao", + "yap": "yapeză", + "yav": "yangben", + "ybb": "yemba", + "yi": "idiÈ™", + "yo": "yoruba", + "yue": "cantoneză", + "za": "zhuang", + "zap": "zapotecă", + "zbl": "simboluri Bilss", + "zen": "zenaga", + "zgh": "tamazight standard marocană", + "zh": "chineză", + "zh_Hant": "chineză tradiÈ›ională", + "zu": "zulu", + "zun": "zuni", + "zxx": "fară conÈ›inut lingvistic", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ro_MD.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ro_MD.json new file mode 100644 index 0000000000000000000000000000000000000000..0d4636b584dc1f2ab1e3cbccad356f6d035925d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ro_MD.json @@ -0,0 +1,7 @@ +{ + "Version": "2.1.27.99", + "Names": { + "sw_CD": "swahili (R. D. Congo)", + "wal": "wolaytta" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ru.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ru.json new file mode 100644 index 0000000000000000000000000000000000000000..d4d64076a0db2345898a7a14e5654bcd3b2822af --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ru.json @@ -0,0 +1,535 @@ +{ + "Version": "2.1.29.20", + "Names": { + "aa": "афарÑкий", + "ab": "абхазÑкий", + "ace": "ачехÑкий", + "ach": "ачоли", + "ada": "адангме", + "ady": "адыгейÑкий", + "ae": "авеÑтийÑкий", + "af": "африкаанÑ", + "afh": "африхили", + "agq": "агхем", + "ain": "айну", + "ak": "акан", + "akk": "аккадÑкий", + "ale": "алеутÑкий", + "alt": "южноалтайÑкий", + "am": "амхарÑкий", + "an": "арагонÑкий", + "ang": "ÑтароанглийÑкий", + "anp": "ангика", + "ar": "арабÑкий", + "ar_001": "арабÑкий литературный", + "arc": "арамейÑкий", + "arn": "мапуче", + "arp": "арапахо", + "arw": "аравакÑкий", + "as": "аÑÑамÑкий", + "asa": "аÑу", + "ast": "аÑтурийÑкий", + "av": "аварÑкий", + "awa": "авадхи", + "ay": "аймара", + "az": "азербайджанÑкий", + "ba": "башкирÑкий", + "bal": "белуджÑкий", + "ban": "балийÑкий", + "bas": "баÑа", + "bax": "бамум", + "bbj": "гомала", + "be": "белоруÑÑкий", + "bej": "беджа", + "bem": "бемба", + "bez": "бена", + "bfd": "бафут", + "bg": "болгарÑкий", + "bgn": "западный белуджÑкий", + "bho": "бходжпури", + "bi": "биÑлама", + "bik": "бикольÑкий", + "bin": "бини", + "bkm": "ком", + "bla": "ÑикÑика", + "bm": "бамбара", + "bn": "бенгальÑкий", + "bo": "тибетÑкий", + "br": "бретонÑкий", + "bra": "брауи", + "brx": "бодо", + "bs": "боÑнийÑкий", + "bss": "акооÑе", + "bua": "бурÑÑ‚Ñкий", + "bug": "бугийÑкий", + "bum": "булу", + "byn": "билин", + "byv": "медумба", + "ca": "каталанÑкий", + "cad": "каддо", + "car": "кариб", + "cay": "кайюга", + "cch": "атÑам", + "ce": "чеченÑкий", + "ceb": "Ñебуано", + "cgg": "кига", + "ch": "чаморро", + "chb": "чибча", + "chg": "чагатайÑкий", + "chk": "чукотÑкий", + "chm": "марийÑкий", + "chn": "чинук жаргон", + "cho": "чоктав", + "chp": "чипевьÑн", + "chr": "чероки", + "chy": "чейенн", + "ckb": "Ñорани", + "co": "корÑиканÑкий", + "cop": "коптÑкий", + "cr": "кри", + "crh": "крымÑко-татарÑкий", + "crs": "ÑейшельÑкий креольÑкий", + "cs": "чешÑкий", + "csb": "кашубÑкий", + "cu": "церковноÑлавÑнÑкий", + "cv": "чувашÑкий", + "cy": "валлийÑкий", + "da": "датÑкий", + "dak": "дакота", + "dar": "даргинÑкий", + "dav": "таита", + "de": "немецкий", + "de_AT": "авÑтрийÑкий немецкий", + "de_CH": "литературный швейцарÑкий немецкий", + "del": "делаварÑкий", + "den": "Ñлейви", + "dgr": "догриб", + "din": "динка", + "dje": "джерма", + "doi": "догри", + "dsb": "нижнелужицкий", + "dua": "дуала", + "dum": "ÑредненидерландÑкий", + "dv": "мальдивÑкий", + "dyo": "диола-фоньи", + "dyu": "диула", + "dz": "дзонг-кÑ", + "dzg": "даза", + "ebu": "Ñмбу", + "ee": "Ñве", + "efi": "Ñфик", + "egy": "древнеегипетÑкий", + "eka": "Ñкаджук", + "el": "гречеÑкий", + "elx": "ÑламÑкий", + "en": "английÑкий", + "en_AU": "авÑтралийÑкий английÑкий", + "en_CA": "канадÑкий английÑкий", + "en_GB": "британÑкий английÑкий", + "en_US": "американÑкий английÑкий", + "enm": "ÑреднеанглийÑкий", + "eo": "ÑÑперанто", + "es": "иÑпанÑкий", + "es_419": "латиноамериканÑкий иÑпанÑкий", + "es_ES": "европейÑкий иÑпанÑкий", + "es_MX": "мекÑиканÑкий иÑпанÑкий", + "et": "ÑÑтонÑкий", + "eu": "баÑкÑкий", + "ewo": "Ñвондо", + "fa": "перÑидÑкий", + "fan": "фанг", + "fat": "фанти", + "ff": "фулах", + "fi": "финÑкий", + "fil": "филиппинÑкий", + "fj": "фиджи", + "fo": "фарерÑкий", + "fon": "фон", + "fr": "французÑкий", + "fr_CA": "канадÑкий французÑкий", + "fr_CH": "швейцарÑкий французÑкий", + "frm": "ÑреднефранцузÑкий", + "fro": "ÑтарофранцузÑкий", + "frr": "Ñеверный фризÑкий", + "frs": "воÑточный фризÑкий", + "fur": "фриульÑкий", + "fy": "западный фризÑкий", + "ga": "ирландÑкий", + "gaa": "га", + "gag": "гагаузÑкий", + "gan": "гань", + "gay": "гайо", + "gba": "гбаÑ", + "gd": "гÑльÑкий", + "gez": "геÑз", + "gil": "гильбертÑкий", + "gl": "галиÑийÑкий", + "gmh": "Ñредневерхненемецкий", + "gn": "гуарани", + "goh": "древневерхненемецкий", + "gon": "гонди", + "gor": "горонтало", + "got": "готÑкий", + "grb": "гребо", + "grc": "древнегречеÑкий", + "gsw": "швейцарÑкий немецкий", + "gu": "гуджарати", + "guz": "гуÑии", + "gv": "мÑнÑкий", + "gwi": "гвичин", + "ha": "хауÑа", + "hai": "хайда", + "hak": "хакка", + "haw": "гавайÑкий", + "he": "иврит", + "hi": "хинди", + "hil": "хилигайнон", + "hit": "хеттÑкий", + "hmn": "хмонг", + "ho": "хиримоту", + "hr": "хорватÑкий", + "hsb": "верхнелужицкий", + "hsn": "ÑÑн", + "ht": "гаитÑнÑкий", + "hu": "венгерÑкий", + "hup": "хупа", + "hy": "армÑнÑкий", + "hz": "гереро", + "ia": "интерлингва", + "iba": "ибанÑкий", + "ibb": "ибибио", + "id": "индонезийÑкий", + "ie": "интерлингве", + "ig": "игбо", + "ii": "ноÑу", + "ik": "инупиак", + "ilo": "илоко", + "inh": "ингушÑкий", + "io": "идо", + "is": "иÑландÑкий", + "it": "итальÑнÑкий", + "iu": "инуктитут", + "ja": "ÑпонÑкий", + "jbo": "ложбан", + "jgo": "нгомба", + "jmc": "мачаме", + "jpr": "еврейÑко-перÑидÑкий", + "jrb": "еврейÑко-арабÑкий", + "jv": "ÑванÑкий", + "ka": "грузинÑкий", + "kaa": "каракалпакÑкий", + "kab": "кабильÑкий", + "kac": "качинÑкий", + "kaj": "каджи", + "kam": "камба", + "kaw": "кави", + "kbd": "кабардинÑкий", + "kbl": "канембу", + "kcg": "тьÑп", + "kde": "маконде", + "kea": "кабувердьÑну", + "kfo": "коро", + "kg": "конго", + "kha": "кхаÑи", + "kho": "хотанÑкий", + "khq": "койра чиини", + "ki": "кикуйю", + "kj": "кунама", + "kk": "казахÑкий", + "kkj": "како", + "kl": "гренландÑкий", + "kln": "календжин", + "km": "кхмерÑкий", + "kmb": "кимбунду", + "kn": "каннада", + "ko": "корейÑкий", + "koi": "коми-пермÑцкий", + "kok": "конкани", + "kos": "коÑраенÑкий", + "kpe": "кпелле", + "kr": "канури", + "krc": "карачаево-балкарÑкий", + "krl": "карельÑкий", + "kru": "курух", + "ks": "кашмири", + "ksb": "шамбала", + "ksf": "бафиÑ", + "ksh": "кёльнÑкий", + "ku": "курдÑкий", + "kum": "кумыкÑкий", + "kut": "кутенаи", + "kv": "коми", + "kw": "корнÑкий", + "ky": "киргизÑкий", + "la": "латинÑкий", + "lad": "ладино", + "lag": "ланго", + "lah": "лахнда", + "lam": "ламба", + "lb": "люкÑембургÑкий", + "lez": "лезгинÑкий", + "lg": "ганда", + "li": "лимбургÑкий", + "lkt": "лакота", + "ln": "лингала", + "lo": "лаоÑÑкий", + "lol": "монго", + "loz": "лози", + "lrc": "ÑевернолурÑкий", + "lt": "литовÑкий", + "lu": "луба-катанга", + "lua": "луба-лулуа", + "lui": "луиÑеньо", + "lun": "лунда", + "luo": "луо", + "lus": "лушей", + "luy": "лухьÑ", + "lv": "латышÑкий", + "mad": "мадурÑкий", + "maf": "мафа", + "mag": "магахи", + "mai": "майтхили", + "mak": "макаÑÑарÑкий", + "man": "мандинго", + "mas": "маÑаи", + "mde": "маба", + "mdf": "мокшанÑкий", + "mdr": "мандарÑкий", + "men": "менде", + "mer": "меру", + "mfe": "маврикийÑкий креольÑкий", + "mg": "малагаÑийÑкий", + "mga": "ÑреднеирландÑкий", + "mgh": "макуа-меетто", + "mgo": "мета", + "mh": "маршалльÑкий", + "mi": "маори", + "mic": "микмак", + "min": "минангкабау", + "mk": "македонÑкий", + "ml": "малаÑлам", + "mn": "монгольÑкий", + "mnc": "маньчжурÑкий", + "mni": "манипурÑкий", + "moh": "мохаук", + "mos": "моÑи", + "mr": "маратхи", + "ms": "малайÑкий", + "mt": "мальтийÑкий", + "mua": "мунданг", + "mul": "Ñзыки разных Ñемей", + "mus": "крик", + "mwl": "мирандÑкий", + "mwr": "марвари", + "my": "бирманÑкий", + "mye": "миене", + "myv": "ÑрзÑнÑкий", + "mzn": "мазендеранÑкий", + "na": "науру", + "nan": "миньнань", + "nap": "неаполитанÑкий", + "naq": "нама", + "nb": "норвежÑкий букмол", + "nd": "Ñеверный ндебеле", + "nds": "нижнегерманÑкий", + "nds_NL": "нижнеÑакÑонÑкий", + "ne": "непальÑкий", + "new": "неварÑкий", + "ng": "ндонга", + "nia": "ниаÑ", + "niu": "ниуÑ", + "nl": "нидерландÑкий", + "nl_BE": "фламандÑкий", + "nmg": "кваÑио", + "nn": "нюнорÑк", + "nnh": "нгиембунд", + "no": "норвежÑкий", + "nog": "ногайÑкий", + "non": "ÑтаронорвежÑкий", + "nqo": "нко", + "nr": "южный ндебеле", + "nso": "Ñеверный Ñото", + "nus": "нуÑÑ€", + "nv": "навахо", + "nwc": "клаÑÑичеÑкий невари", + "ny": "ньÑнджа", + "nym": "ньÑмвези", + "nyn": "ньÑнколе", + "nyo": "ньоро", + "nzi": "нзима", + "oc": "окÑитанÑкий", + "oj": "оджибва", + "om": "оромо", + "or": "ориÑ", + "os": "оÑетинÑкий", + "osa": "оÑеджи", + "ota": "Ñтаротурецкий", + "pa": "панджаби", + "pag": "пангаÑинан", + "pal": "пехлевийÑкий", + "pam": "пампанга", + "pap": "папьÑменто", + "pau": "палау", + "pcm": "нигерийÑко-креольÑкий", + "peo": "ÑтароперÑидÑкий", + "phn": "финикийÑкий", + "pi": "пали", + "pl": "польÑкий", + "pon": "понапе", + "prg": "пруÑÑкий", + "pro": "ÑтаропрованÑальÑкий", + "ps": "пушту", + "pt": "португальÑкий", + "pt_BR": "бразильÑкий португальÑкий", + "pt_PT": "европейÑкий португальÑкий", + "qu": "кечуа", + "quc": "киче", + "raj": "раджаÑтхани", + "rap": "рапануйÑкий", + "rar": "раротонга", + "rm": "романшÑкий", + "rn": "рунди", + "ro": "румынÑкий", + "ro_MD": "молдавÑкий", + "rof": "ромбо", + "rom": "цыганÑкий", + "root": "корневой Ñзык", + "ru": "руÑÑкий", + "rup": "арумынÑкий", + "rw": "киньÑруанда", + "rwk": "руанда", + "sa": "ÑанÑкрит", + "sad": "Ñандаве", + "sah": "ÑкутÑкий", + "sam": "ÑамаритÑнÑкий арамейÑкий", + "saq": "Ñамбуру", + "sas": "ÑаÑакÑкий", + "sat": "Ñантали", + "sba": "нгамбайÑкий", + "sbp": "Ñангу", + "sc": "ÑардинÑкий", + "scn": "ÑицилийÑкий", + "sco": "шотландÑкий", + "sd": "Ñиндхи", + "sdh": "южнокурдÑкий", + "se": "ÑеверноÑаамÑкий", + "see": "Ñенека", + "seh": "Ñена", + "sel": "ÑелькупÑкий", + "ses": "койраборо Ñенни", + "sg": "Ñанго", + "sga": "ÑтароирландÑкий", + "sh": "ÑербÑкохорватÑкий", + "shi": "ташельхит", + "shn": "шанÑкий", + "shu": "чадÑкий арабÑкий", + "si": "ÑингальÑкий", + "sid": "Ñидама", + "sk": "Ñловацкий", + "sl": "ÑловенÑкий", + "sm": "ÑамоанÑкий", + "sma": "южноÑаамÑкий", + "smj": "луле-ÑаамÑкий", + "smn": "инари-ÑаамÑкий", + "sms": "колтта-ÑаамÑкий", + "sn": "шона", + "snk": "Ñонинке", + "so": "Ñомали", + "sog": "ÑогдийÑкий", + "sq": "албанÑкий", + "sr": "ÑербÑкий", + "srn": "Ñранан-тонго", + "srr": "Ñерер", + "ss": "Ñвази", + "ssy": "Ñахо", + "st": "южный Ñото", + "su": "ÑунданÑкий", + "suk": "Ñукума", + "sus": "ÑуÑу", + "sux": "шумерÑкий", + "sv": "шведÑкий", + "sw": "Ñуахили", + "sw_CD": "конголезÑкий Ñуахили", + "swb": "коморÑкий", + "syc": "клаÑÑичеÑкий ÑирийÑкий", + "syr": "ÑирийÑкий", + "ta": "тамильÑкий", + "te": "телугу", + "tem": "темне", + "teo": "теÑо", + "ter": "терено", + "tet": "тетум", + "tg": "таджикÑкий", + "th": "тайÑкий", + "ti": "тигриньÑ", + "tig": "тигре", + "tiv": "тиви", + "tk": "туркменÑкий", + "tkl": "токелайÑкий", + "tl": "тагалог", + "tlh": "клингонÑкий", + "tli": "тлингит", + "tmh": "тамашек", + "tn": "Ñ‚Ñвана", + "to": "тонганÑкий", + "tog": "тонга", + "tpi": "ток-пиÑин", + "tr": "турецкий", + "tru": "туройо", + "trv": "ÑедекÑкий", + "ts": "Ñ‚Ñонга", + "tsi": "цимшиан", + "tt": "татарÑкий", + "tum": "тумбука", + "tvl": "тувалу", + "tw": "тви", + "twq": "таÑавак", + "ty": "таитÑнÑкий", + "tyv": "тувинÑкий", + "tzm": "ÑреднеатлаÑÑкий тамазигхтÑкий", + "udm": "удмуртÑкий", + "ug": "уйгурÑкий", + "uga": "угаритÑкий", + "uk": "украинÑкий", + "umb": "умбунду", + "und": "неизвеÑтный Ñзык", + "ur": "урду", + "uz": "узбекÑкий", + "vai": "ваи", + "ve": "венда", + "vi": "вьетнамÑкий", + "vo": "волапюк", + "vot": "водÑкий", + "vun": "вунджо", + "wa": "валлонÑкий", + "wae": "валлиÑÑкий", + "wal": "воламо", + "war": "варай", + "was": "вашо", + "wbp": "вальбири", + "wo": "волоф", + "wuu": "ву", + "xal": "калмыцкий", + "xh": "коÑа", + "xog": "Ñога", + "yao": "Ñо", + "yap": "Ñп", + "yav": "Ñнгбен", + "ybb": "йемба", + "yi": "идиш", + "yo": "йоруба", + "yue": "кантонÑкий", + "za": "чжуань", + "zap": "ÑапотекÑкий", + "zbl": "блиÑÑимволика", + "zen": "зенагÑкий", + "zgh": "тамазигхтÑкий", + "zh": "китайÑкий", + "zh_Hans": "китайÑкий, упрощенное пиÑьмо", + "zh_Hant": "китайÑкий, традиционное пиÑьмо", + "zu": "зулу", + "zun": "зуньи", + "zxx": "нет Ñзыкового материала", + "zza": "заза" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/rw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/rw.json new file mode 100644 index 0000000000000000000000000000000000000000..2c6d75d06d04625a401245a81301246517039b1b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/rw.json @@ -0,0 +1,110 @@ +{ + "Version": "2.1.27.98", + "Names": { + "af": "Ikinyafurikaneri", + "am": "Inyamuhariki", + "ar": "Icyarabu", + "as": "Icyasamizi", + "az": "Inyazeribayijani", + "be": "Ikibelarusiya", + "bg": "Urunyabuligariya", + "bn": "Ikibengali", + "br": "Inyebiritoni", + "bs": "Inyebosiniya", + "ca": "Igikatalani", + "cs": "Igiceke", + "cy": "Ikigaluwa", + "da": "Ikidaninwa", + "de": "Ikidage", + "el": "Ikigereki", + "en": "Icyongereza", + "eo": "Icyesiperanto", + "es": "Icyesipanyolo", + "et": "Icyesitoniya", + "eu": "Ikibasiki", + "fa": "Inyeperisi", + "fi": "Igifinilande", + "fil": "Ikinyafilipine", + "fo": "Inyefaroyizi", + "fr": "Igifaransa", + "fy": "Igifiriziyani", + "ga": "Ikirilandi", + "gd": "Ikigaluwa cy’Igisweduwa", + "gl": "Ikigalisiya", + "gn": "Inyaguwarani", + "gu": "Inyegujarati", + "he": "Igiheburayo", + "hi": "Igihindi", + "hr": "Igikorowasiya", + "hu": "Igihongiriya", + "hy": "Ikinyarumeniya", + "ia": "Ururimi Gahuzamiryango", + "id": "Ikinyendoziya", + "ie": "Uruhuzandimi", + "is": "Igisilande", + "it": "Igitaliyani", + "ja": "Ikiyapani", + "jv": "Inyejava", + "ka": "Inyejeworujiya", + "km": "Igikambodiya", + "kn": "Igikanada", + "ko": "Igikoreya", + "ku": "Inyekuridishi", + "ky": "Inkerigizi", + "la": "Ikilatini", + "ln": "Ilingala", + "lo": "Ikilawotiyani", + "lt": "Ikilituwaniya", + "lv": "Ikinyaletoviyani", + "mk": "Ikimasedoniyani", + "ml": "Ikimalayalami", + "mn": "Ikimongoli", + "mr": "Ikimarati", + "ms": "Ikimalayi", + "mt": "Ikimaliteze", + "ne": "Ikinepali", + "nl": "Ikinerilande", + "nn": "Inyenoruveji (Nyonorusiki)", + "no": "Ikinoruveji", + "oc": "Inyogusitani", + "or": "Inyoriya", + "pa": "Igipunjabi", + "pl": "Igipolone", + "ps": "Impashito", + "pt": "Igiporutugali", + "pt_BR": "Inyeporutigali (Brezili)", + "pt_PT": "Inyeporutigali (Igiporutigali)", + "ro": "Ikinyarumaniya", + "ru": "Ikirusiya", + "rw": "Kinyarwanda", + "sa": "Igisansikiri", + "sd": "Igisindi", + "sh": "Inyeseribiya na Korowasiya", + "si": "Inyesimpaleze", + "sk": "Igisilovaki", + "sl": "Ikinyasiloveniya", + "so": "Igisomali", + "sq": "Icyalubaniya", + "sr": "Igiseribe", + "st": "Inyesesoto", + "su": "Inyesudani", + "sv": "Igisuweduwa", + "sw": "Igiswahili", + "ta": "Igitamili", + "te": "Igitelugu", + "th": "Igitayi", + "ti": "Inyatigirinya", + "tk": "Inyeturukimeni", + "tlh": "Inyekilingoni", + "tr": "Igiturukiya", + "tw": "Inyetuwi", + "ug": "Ikiwiguri", + "uk": "Ikinyayukereni", + "ur": "Inyeyurudu", + "uz": "Inyeyuzubeki", + "vi": "Ikinyaviyetinamu", + "xh": "Inyehawusa", + "yi": "Inyeyidishi", + "zu": "Inyezulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/se.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/se.json new file mode 100644 index 0000000000000000000000000000000000000000..3b475b85413a8a34f37030d361a6d56c75a62f80 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/se.json @@ -0,0 +1,113 @@ +{ + "Version": "2.1.27.98", + "Names": { + "ace": "acehgiella", + "af": "afrikánsagiella", + "an": "aragoniagiella", + "ang": "boares eaÅ‹galasgiella", + "ar": "arábagiella", + "ast": "asturiagiella", + "be": "vilges-ruoššagiella", + "bg": "bulgáriagiella", + "bn": "bengalgiella", + "bo": "tibetagiella", + "br": "bretonagiella", + "bs": "bosniagiella", + "ca": "katalánagiella", + "chm": "marigiella", + "co": "corsicagiella", + "cs": "Äeahkagiella", + "cy": "kymragiella", + "da": "dánskkagiella", + "de": "duiskkagiella", + "dv": "divehigiella", + "dz": "dzongkhagiella", + "el": "greikkagiella", + "en": "eaÅ‹galsgiella", + "es": "spánskkagiella", + "et": "esttegiella", + "fa": "persijagiella", + "fi": "suomagiella", + "fil": "filippiinnagiella", + "fj": "fidjigiella", + "fo": "fearagiella", + "fr": "fránskkagiella", + "fy": "oarjifriisagiella", + "ga": "iirragiella", + "gu": "gujaratagiella", + "gv": "manksgiella", + "ha": "haussagiella", + "haw": "hawaiigiella", + "hi": "hindigiella", + "hr": "kroátiagiella", + "ht": "haitigiella", + "hu": "ungárgiella", + "hy": "armeenagiella", + "id": "indonesiagiella", + "is": "islánddagiella", + "it": "itáliagiella", + "ja": "japánagiella", + "jv": "javagiella", + "ka": "georgiagiella", + "kk": "kazakgiella", + "km": "kambodiagiella", + "ko": "koreagiella", + "krl": "gárjilgiella", + "ku": "kurdigiella", + "kv": "komigiella", + "kw": "kornagiella", + "la": "láhtengiella", + "lb": "luxemburggagiella", + "lo": "laogiella", + "lt": "liettuvagiella", + "lv": "látviagiella", + "mdf": "mokÅ¡agiella", + "mi": "maorigiella", + "mk": "makedoniagiella", + "mn": "mongoliagiella", + "mt": "maltagiella", + "my": "burmagiella", + "myv": "ersagiella", + "nb": "girjedárogiella", + "ne": "nepaligiella", + "nl": "hollánddagiella", + "nn": "ođđadárogiella", + "no": "dárogiella", + "oc": "oksitánagiella", + "pa": "panjabigiella", + "pl": "polskkagiella", + "pt": "portugálagiella", + "rm": "romanÅ¡giella", + "ro": "romániagiella", + "ru": "ruoššagiella", + "sc": "sardigiella", + "scn": "sisiliagiella", + "se": "davvisámegiella", + "sel": "selkupagiella", + "sh": "serbokroatiagiella", + "sk": "slovákiagiella", + "sl": "slovenagiella", + "sm": "samoagiella", + "sma": "lullisámegiella", + "smj": "julevsámegiella", + "smn": "anáraÅ¡giella", + "sms": "nuortalaÅ¡giella", + "sq": "albánagiella", + "sr": "serbiagiella", + "sv": "ruoŧagiella", + "swb": "shimaorigiella", + "th": "ŧaigiella", + "tr": "durkagiella", + "ty": "tahitigiella", + "udm": "udmurtagiella", + "uk": "ukrainagiella", + "und": "dovdameahttun giella", + "ur": "urdugiella", + "vi": "vietnamgiella", + "wa": "vallonagiella", + "yue": "kantongiella", + "zh": "kiinnágiella", + "zh_Hans": "álki kiinágiella", + "zh_Hant": "árbevirolaÅ¡ kiinnágiella" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/se_FI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/se_FI.json new file mode 100644 index 0000000000000000000000000000000000000000..6cd2a41f577f5dfe3d15e2d5954d223db0388a84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/se_FI.json @@ -0,0 +1,34 @@ +{ + "Version": "2.1.27.78", + "Names": { + "ace": "aÄehgiella", + "ar_001": "standárda arábagiella", + "be": "vilgesruoššagiella", + "bn": "bengalagiella", + "de_AT": "nuortariikkalaÅ¡ duiskkagiella", + "de_CH": "Å¡veicalaÅ¡ duiskkagiella", + "en_AU": "austrálialaÅ¡ eaÅ‹galsgiella", + "en_CA": "kanádalaÅ¡ eaÅ‹galsgiella", + "en_GB": "brihttalaÅ¡ eaÅ‹galsgiella", + "en_US": "amerihkálaÅ¡ eaÅ‹galsgiella", + "es_419": "latiinna-amerihkalaÅ¡ spánskkagiella", + "es_ES": "espánjalaÅ¡ spánskkagiella", + "es_MX": "meksikolaÅ¡ spánskkagiella", + "fj": "fižigiella", + "fr_CA": "kanádalaÅ¡ fránskkagiella", + "fr_CH": "Å¡veicalaÅ¡ fránskkagiella", + "hy": "armenagiella", + "kk": "kazakhgiella", + "km": "kambožagiella", + "ne": "nepalagiella", + "nl_BE": "belgialaÅ¡ hollánddagiella", + "pa": "panjabagiella", + "pt_BR": "brasilialaÅ¡ portugálagiella", + "pt_PT": "portugálalaÅ¡ portugálagiella", + "ro_MD": "moldávialaÅ¡ romániagiella", + "swb": "komoragiella", + "th": "thaigiella", + "vi": "vietnamagiella", + "zh_Hans": "álkes kiinnágiella" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sg.json new file mode 100644 index 0000000000000000000000000000000000000000..a003e9c89b28a6c7127906e346b44c93fe0244be --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sg.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.27.40", + "Names": { + "ak": "Akâan", + "am": "Amarîki", + "ar": "Arâbo", + "be": "Bielörûsi", + "bg": "Bulugäri", + "bn": "Bengäli", + "cs": "Tyêki", + "de": "Zâmani", + "el": "Gerêki", + "en": "Anglëe", + "es": "Espanyöl", + "fa": "Farsî", + "fr": "Farânzi", + "ha": "Haüsä", + "hi": "Hîndi", + "hu": "Hongruäa", + "id": "Enndonezïi", + "ig": "Ãgbö", + "it": "Ênnde", + "ja": "Zaponëe", + "jv": "Zavanëe", + "km": "Kmêre", + "ko": "Koreyëen", + "ms": "Malëe", + "my": "Miamära, Birimäni", + "ne": "Nepalëe", + "nl": "Holandëe", + "pa": "Penzäbï", + "pl": "Polonëe", + "pt": "Portugëe, Pûra", + "ro": "Rumëen", + "ru": "Rûsi", + "rw": "Ruandäa", + "sg": "Sängö", + "so": "Somalïi", + "sv": "Sueduäa", + "ta": "Tämûli", + "th": "Thâi", + "tr": "Tûrûku", + "uk": "Ukrêni", + "ur": "Ûrdu", + "vi": "Vietnäm", + "yo": "Yoruba", + "zh": "Shinuäa", + "zu": "Zûlu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sh.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sh.json new file mode 100644 index 0000000000000000000000000000000000000000..7ee03cd9195fdd6b69888b7bc3f61ec99a4065ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sh.json @@ -0,0 +1,507 @@ +{ + "Version": "2.1.29.33", + "Names": { + "aa": "afarski", + "ab": "abhaski", + "ace": "aceÅ¡ki", + "ach": "akoli", + "ada": "adangme", + "ady": "adigejski", + "ae": "avestanski", + "af": "afrikans", + "afh": "afrihili", + "agq": "agem", + "ain": "ainu", + "ak": "akanski", + "akk": "akadijski", + "ale": "aleutski", + "alt": "južnoaltajski", + "am": "amharski", + "an": "aragonski", + "ang": "staroengleski", + "anp": "angika", + "ar": "arapski", + "ar_001": "savremeni standardni arapski", + "arc": "aramejski", + "arn": "mapuÄe", + "arp": "arapaho", + "arw": "aravaÄki", + "as": "asamski", + "asa": "asu", + "ast": "asturijski", + "av": "avarski", + "awa": "avadi", + "ay": "ajmara", + "az": "azerbejdžanski", + "ba": "baÅ¡kirski", + "bal": "beluÄki", + "ban": "balijski", + "bas": "basa", + "be": "beloruski", + "bej": "bedža", + "bem": "bemba", + "bez": "bena", + "bg": "bugarski", + "bgn": "zapadni beluÄki", + "bho": "bodžpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bla": "sisika", + "bm": "bambara", + "bn": "bengalski", + "bo": "tibetanski", + "br": "bretonski", + "bra": "braj", + "brx": "bodo", + "bs": "bosanski", + "bua": "burjatski", + "bug": "bugijski", + "byn": "blinski", + "ca": "katalonski", + "cad": "kado", + "car": "karipski", + "cch": "atsam", + "ce": "ÄeÄenski", + "ceb": "sebuanski", + "cgg": "Äiga", + "ch": "Äamoro", + "chb": "ÄipÄa", + "chg": "Äagataj", + "chk": "ÄuÄki", + "chm": "mari", + "chn": "ÄinuÄki", + "cho": "Äoktavski", + "chp": "Äipevjanski", + "chr": "Äeroki", + "chy": "Äejenski", + "ckb": "centralni kurdski", + "co": "korzikanski", + "cop": "koptski", + "cr": "kri", + "crh": "krimskotatarski", + "crs": "sejÅ¡elski kreolski francuski", + "cs": "ÄeÅ¡ki", + "csb": "kaÅ¡upski", + "cu": "crkvenoslovenski", + "cv": "ÄuvaÅ¡ki", + "cy": "velÅ¡ki", + "da": "danski", + "dak": "dakota", + "dar": "darginski", + "dav": "taita", + "de": "nemaÄki", + "de_CH": "Å¡vajcarski visoki nemaÄki", + "del": "delaverski", + "den": "slejvi", + "dgr": "dogripski", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "donji lužiÄkosrpski", + "dua": "duala", + "dum": "srednjeholandski", + "dv": "maldivski", + "dyo": "džola fonji", + "dyu": "Ä‘ula", + "dz": "džonga", + "dzg": "dazaga", + "ebu": "embu", + "ee": "eve", + "efi": "efiÄki", + "egy": "staroegipatski", + "eka": "ekadžuk", + "el": "grÄki", + "elx": "elamitski", + "en": "engleski", + "en_GB": "engleski (Velika Britanija)", + "en_US": "engleski (Sjedinjene AmeriÄke Države)", + "enm": "srednjeengleski", + "eo": "esperanto", + "es": "Å¡panski", + "et": "estonski", + "eu": "baskijski", + "ewo": "evondo", + "fa": "persijski", + "fan": "fang", + "fat": "fanti", + "ff": "fula", + "fi": "finski", + "fil": "filipinski", + "fj": "fidžijski", + "fo": "farski", + "fon": "fon", + "fr": "francuski", + "frm": "srednjefrancuski", + "fro": "starofrancuski", + "frr": "severnofrizijski", + "frs": "istoÄnofrizijski", + "fur": "friulski", + "fy": "zapadni frizijski", + "ga": "irski", + "gaa": "ga", + "gag": "gagauz", + "gay": "gajo", + "gba": "gbaja", + "gd": "Å¡kotski gelski", + "gez": "geez", + "gil": "gilbertski", + "gl": "galicijski", + "gmh": "srednji visokonemaÄki", + "gn": "gvarani", + "goh": "staronemaÄki", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotski", + "grb": "grebo", + "grc": "starogrÄki", + "gsw": "Å vajcarski nemaÄki", + "gu": "gudžarati", + "guz": "gusi", + "gv": "manks", + "gwi": "gviÄinski", + "ha": "hausa", + "hai": "haida", + "haw": "havajski", + "he": "hebrejski", + "hi": "hindi", + "hil": "hiligajnonski", + "hit": "hetitski", + "hmn": "hmonÅ¡ki", + "ho": "hiri motu", + "hr": "hrvatski", + "hsb": "gornji lužiÄkosrpski", + "ht": "haićanski", + "hu": "maÄ‘arski", + "hup": "hupa", + "hy": "jermenski", + "hz": "herero", + "ia": "interlingva", + "iba": "ibanski", + "ibb": "ibibio", + "id": "indonežanski", + "ie": "interlingve", + "ig": "igbo", + "ii": "seÄuanski ji", + "ik": "inupik", + "ilo": "iloko", + "inh": "inguÅ¡ki", + "io": "ido", + "is": "islandski", + "it": "italijanski", + "iu": "inuitski", + "ja": "japanski", + "jbo": "ložban", + "jgo": "ngomba", + "jmc": "maÄame", + "jpr": "judeo-persijski", + "jrb": "judeo-arapski", + "jv": "javanski", + "ka": "gruzijski", + "kaa": "kara-kalpaÅ¡ki", + "kab": "kabile", + "kac": "kaÄinski", + "kaj": "džu", + "kam": "kamba", + "kaw": "kavi", + "kbd": "kabardijski", + "kcg": "tjap", + "kde": "makonde", + "kea": "zelenortski", + "kfo": "koro", + "kg": "kongo", + "kha": "kasi", + "kho": "kotaneÅ¡ki", + "khq": "kojra Äiini", + "ki": "kikuju", + "kj": "kvanjama", + "kk": "kazaÅ¡ki", + "kkj": "kako", + "kl": "grenlandski", + "kln": "kalendžinski", + "km": "kmerski", + "kmb": "kimbundu", + "kn": "kanada", + "ko": "korejski", + "koi": "komi-permski", + "kok": "konkani", + "kos": "kosrenski", + "kpe": "kpele", + "kr": "kanuri", + "krc": "karaÄajsko-balkarski", + "kri": "krio", + "krl": "karelski", + "kru": "kuruk", + "ks": "kaÅ¡mirski", + "ksb": "Å¡ambala", + "ksf": "bafija", + "ksh": "kelnski", + "ku": "kurdski", + "kum": "kumiÄki", + "kut": "kutenaj", + "kv": "komi", + "kw": "kornvolski", + "ky": "kirgiski", + "la": "latinski", + "lad": "ladino", + "lag": "langi", + "lah": "landa", + "lam": "lamba", + "lb": "luksemburÅ¡ki", + "lez": "lezginski", + "lg": "ganda", + "li": "limburÅ¡ki", + "lkt": "lakota", + "ln": "lingala", + "lo": "laoski", + "lol": "mongo", + "loz": "lozi", + "lrc": "severni luri", + "lt": "litvanski", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luisenjo", + "lun": "lunda", + "luo": "luo", + "lus": "mizo", + "luy": "lujia", + "lv": "letonski", + "mad": "madurski", + "mag": "magahi", + "mai": "maitili", + "mak": "makasarski", + "man": "mandingo", + "mas": "masajski", + "mdf": "mokÅ¡a", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "morisjen", + "mg": "malgaÅ¡ki", + "mga": "srednjeirski", + "mgh": "makuva-mito", + "mgo": "meta", + "mh": "marÅ¡alski", + "mi": "maorski", + "mic": "mikmak", + "min": "minangkabau", + "mk": "makedonski", + "ml": "malajalam", + "mn": "mongolski", + "mnc": "mandžurski", + "mni": "manipurski", + "moh": "mohoÄki", + "mos": "mosi", + "mr": "marati", + "ms": "malajski", + "mt": "malteÅ¡ki", + "mua": "mundang", + "mul": "ViÅ¡e jezika", + "mus": "kriÅ¡ki", + "mwl": "mirandski", + "mwr": "marvari", + "my": "burmanski", + "myv": "erzja", + "mzn": "mazanderanski", + "na": "nauruski", + "nap": "napuljski", + "naq": "nama", + "nb": "norveÅ¡ki bukmol", + "nd": "severni ndebele", + "nds": "niskonemaÄki", + "nds_NL": "niskosaksonski", + "ne": "nepalski", + "new": "nevari", + "ng": "ndonga", + "nia": "nias", + "niu": "niuejski", + "nl": "holandski", + "nl_BE": "flamanski", + "nmg": "kvasio", + "nn": "norveÅ¡ki ninorsk", + "nnh": "ngiembun", + "no": "norveÅ¡ki", + "nog": "nogajski", + "non": "staronordijski", + "nqo": "nko", + "nr": "južni ndebele", + "nso": "severni soto", + "nus": "nuer", + "nv": "navaho", + "nwc": "klasiÄni nevarski", + "ny": "njandža", + "nym": "njamvezi", + "nyn": "njankole", + "nyo": "njoro", + "nzi": "nzima", + "oc": "oksitanski", + "oj": "odžibve", + "om": "oromo", + "or": "odija", + "os": "osetinski", + "osa": "osage", + "ota": "osmanski turski", + "pa": "pendžapski", + "pag": "pangasinanski", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauski", + "pcm": "nigerijski pidžin", + "peo": "staropersijski", + "phn": "feniÄanski", + "pi": "pali", + "pl": "poljski", + "pon": "ponpejski", + "prg": "pruski", + "pro": "starooksitanski", + "ps": "paÅ¡tunski", + "pt": "portugalski", + "pt_PT": "portugalski (Portugal)", + "qu": "keÄua", + "quc": "kiÄe", + "raj": "radžastanski", + "rap": "rapanui", + "rar": "rarotonganski", + "rm": "romanÅ¡", + "rn": "kirundi", + "ro": "rumunski", + "ro_MD": "moldavski", + "rof": "rombo", + "rom": "romski", + "root": "Rut", + "ru": "ruski", + "rup": "cincarski", + "rw": "kinjaruanda", + "rwk": "rua", + "sa": "sanskrit", + "sad": "sandave", + "sah": "jakutski", + "sam": "samarijanski aramejski", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "sba": "ngambaj", + "sbp": "sangu", + "sc": "sardinski", + "scn": "sicilijanski", + "sco": "Å¡kotski", + "sd": "sindi", + "sdh": "južnokurdski", + "se": "severni sami", + "seh": "sena", + "sel": "selkupski", + "ses": "kojraboro seni", + "sg": "sango", + "sga": "staroirski", + "sh": "srpskohrvatski", + "shi": "taÅ¡elhit", + "shn": "Å¡anski", + "si": "sinhaleÅ¡ki", + "sid": "sidamo", + "sk": "slovaÄki", + "sl": "slovenaÄki", + "sm": "samoanski", + "sma": "južni sami", + "smj": "lule sami", + "smn": "inari sami", + "sms": "skoltski laponski", + "sn": "Å¡ona", + "snk": "soninke", + "so": "somalski", + "sog": "sogdijski", + "sq": "albanski", + "sr": "srpski", + "srn": "sranan tongo", + "srr": "sererski", + "ss": "svazi", + "ssy": "saho", + "st": "sesoto", + "su": "sundanski", + "suk": "sukuma", + "sus": "susu", + "sux": "sumerski", + "sv": "Å¡vedski", + "sw": "svahili", + "sw_CD": "kisvahili", + "swb": "komorski", + "syc": "sirijaÄki", + "syr": "sirijski", + "ta": "tamilski", + "te": "telugu", + "tem": "timne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadžiÄki", + "th": "tajski", + "ti": "tigrinja", + "tig": "tigre", + "tiv": "tiv", + "tk": "turkmenski", + "tkl": "tokelau", + "tl": "tagalog", + "tlh": "klingonski", + "tli": "tlingit", + "tmh": "tamaÅ¡ek", + "tn": "cvana", + "to": "tonganski", + "tog": "njasa tonga", + "tpi": "tok pisin", + "tr": "turski", + "trv": "taroko", + "ts": "conga", + "tsi": "cimÅ¡ian", + "tt": "tatarski", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "tvi", + "twq": "tasavak", + "ty": "tahićanski", + "tyv": "tuvinski", + "tzm": "centralnoatlaski tamazigt", + "udm": "udmurtski", + "ug": "ujgurski", + "uga": "ugaritski", + "uk": "ukrajinski", + "umb": "umbundu", + "und": "nepoznat jezik", + "ur": "urdu", + "uz": "uzbeÄki", + "vai": "vai", + "ve": "venda", + "vi": "vijetnamski", + "vo": "volapik", + "vot": "vodski", + "vun": "vundžo", + "wa": "valonski", + "wae": "valserski", + "wal": "volajta", + "war": "varajski", + "was": "vaÅ¡o", + "wbp": "varlpiri", + "wo": "volof", + "xal": "kalmiÄki", + "xh": "kosa", + "xog": "soga", + "yao": "jao", + "yap": "japski", + "yav": "jangben", + "ybb": "jemba", + "yi": "jidiÅ¡", + "yo": "joruba", + "yue": "kantonski", + "za": "džuanÅ¡ki", + "zap": "zapoteÄki", + "zbl": "blisimboli", + "zen": "zenaga", + "zgh": "standardni marokanski tamazigt", + "zh": "kineski", + "zh_Hans": "pojednostavljeni kineski", + "zh_Hant": "tradicionalni kineski", + "zu": "zulu", + "zun": "zuni", + "zxx": "bez lingvistiÄkog sadržaja", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sh_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sh_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..825f2b84340b477d2460d8aaf92d699b36c5fbb4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sh_BA.json @@ -0,0 +1,20 @@ +{ + "Version": "2.1.29.33", + "Names": { + "arn": "mapudungun", + "be": "bjeloruski", + "bm": "bamanankan", + "bn": "bangla", + "gsw": "Å¡vajcarski nemaÄki", + "ht": "haićanski kreolski", + "lo": "laoÅ¡ki", + "moh": "mohok", + "nqo": "n’ko", + "shi": "južni Å¡ilha", + "si": "sinhalski", + "tzm": "centralnoatlaski tamaÅ¡ek", + "xh": "isikosa", + "zgh": "standardni marokanski tamaÅ¡ek", + "zu": "isizulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/si.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/si.json new file mode 100644 index 0000000000000000000000000000000000000000..d533dbac3c5b6e5530ee62c2abae2b314dc4554e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/si.json @@ -0,0 +1,406 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "à¶…à·†à·à¶»à·Š", + "ab": "ඇබ්කà·à·ƒà·’යà·à¶±à·”", + "ace": "අචයිනිස්", + "ada": "අඩන්ග්මෙ", + "ady": "à¶…à¶©à·’à¶à·™", + "aeb": "ටියුනිසියනු à¶…à¶»à·à¶¶à·’", + "af": "à¶…à¶´à·Šâ€à¶»à·’à¶šà·à¶±à·”", + "agq": "ඇගම්", + "ain": "අයිනු", + "ak": "à¶…à¶šà·à¶±à·Š", + "ale": "ඇලුඑට්", + "alt": "සතර්න් අල්ටය්", + "am": "ඇම්හà·à¶»à·’à¶šà·Š", + "an": "ඇරගොනීස්", + "anp": "අන්ගික", + "ar": "à¶…à¶»à·à¶¶à·’", + "ar_001": "නවීන සම්මත à¶…à¶»à·à¶¶à·’", + "arn": "මපුචෙ", + "arp": "ඇරපහො", + "as": "ඇසමියà·à¶±à·”", + "asa": "අසු", + "ast": "ඇස්ටියුරියන්", + "av": "ඇවරික්", + "awa": "අවදි", + "ay": "අයිමරà·", + "az": "අසර්බයිජà·à¶±à·Š", + "ba": "à¶¶à·à·‚්කිර්", + "ban": "à¶¶à·à¶½à·’නීස්", + "bas": "à¶¶à·ƒà·", + "be": "බෙලරුසියà·à¶±à·”", + "bem": "බෙම්බà·", + "bez": "බෙනà·", + "bg": "බල්ගේරියà·à¶±à·”", + "bgn": "à¶¶à¶§à·„à·’à¶» බලොචි", + "bho": "බොජ්පුරි", + "bi": "බිස්ලමà·", + "bin": "බිනි", + "bla": "සික්සිකà·", + "bm": "බම්බරà·", + "bn": "බෙංගà·à¶½à·’", + "bo": "ටිබෙට්", + "br": "à¶¶à·Šâ€à¶»à·šà¶§à·œà¶±à·Š", + "brx": "බොඩො", + "bs": "බොස්නියà·à¶±à·”", + "bug": "බුගිනීස්", + "byn": "බ්ලින්", + "ca": "à¶šà·à¶§à¶½à¶±à·Š", + "ce": "චෙච්නියà·à¶±à·”", + "ceb": "සෙබුඅනො", + "cgg": "à¶ à·’à¶œà·", + "ch": "චමොරො", + "chk": "චූකීස්", + "chm": "මරි", + "cho": "චොක්ටොව්", + "chr": "චෙරොකී", + "chy": "චෙයෙන්නෙ", + "ckb": "සොරà·à¶±à·’ කුර්දිෂ්", + "co": "à¶šà·Šâ€à¶»à·œà¶‘à·à·’යà·à¶±à·”", + "crs": "සෙසෙල්ව à¶šà·Šâ€à¶»à·œà¶½à·Š ෆ්â€à¶»à·™à¶±à·Šà¶ à·Š", + "cs": "චෙත්", + "cu": "චර්ච් ස්ලà·à·€à·’à¶šà·Š", + "cv": "චවේෂ්", + "cy": "වේල්ස්", + "da": "à¶©à·à¶±à·’à·à·Š", + "dak": "ඩකොටà·", + "dar": "à¶©à·à¶»à·Šà¶œà·Šà·€à·", + "dav": "ටයිටà·", + "de": "ජර්මන්", + "de_AT": "ඔස්ට්â€à¶»à·’යà·à¶±à·” ජර්මන්", + "de_CH": "ස්විස් උසස් ජර්මන්", + "dgr": "ඩොග්â€à¶»à·’à¶¶à·Š", + "dje": "සර්මà·", + "dsb": "à¶´à·„à·… à·ƒà·à¶¶à·’යà·à¶±à·”", + "dua": "ඩුආලà·", + "dv": "දිවෙහි", + "dyo": "ජොල-à·†à·à¶±à·’යි", + "dz": "ඩිසොන්කà·", + "dzg": "à¶©à·ƒà·à¶œà·", + "ebu": "එම්බු", + "ee": "ඉව්", + "efi": "එෆික්", + "eka": "එකජුක්", + "el": "ග්â€à¶»à·“à¶š", + "en": "ඉංග්â€à¶»à·“සි", + "en_AU": "ඕස්ට්â€à¶»à·šà¶½à·’යà·à¶±à·” ඉංග්â€à¶»à·“සි", + "en_CA": "à¶šà·à¶±à·šà¶©à·’යà·à¶±à·” ඉංග්â€à¶»à·“සි", + "en_GB": "à¶¶à·Šâ€à¶»à·’à¶­à·à¶±à·Šâ€à¶º ඉංග්â€à¶»à·“සි", + "en_US": "ඇමෙරිකà·à¶±à·” ඉංග්â€à¶»à·“සි", + "eo": "එස්පà·à¶»à¶±à·Šà¶§à·", + "es": "ස්පà·à¶¤à·Šà¶¤", + "es_419": "ලතින් ඇමරිකà·à¶±à·” ස්පà·à¶¤à·Šà¶¤", + "es_ES": "යුරà·à¶´à·“ය ස්පà·à¶¤à·Šà¶¤", + "es_MX": "මෙක්සිකà·à¶±à·” ස්පà·à¶¤à·Šà¶¤", + "et": "එස්තà·à¶±à·’යà·à¶±à·”", + "eu": "බොස්කà·", + "ewo": "එවොන්ඩො", + "fa": "පර්සියà·à¶±à·”", + "ff": "ෆුලà·à·„à·Š", + "fi": "ෆින්ලන්ත", + "fil": "පිලිපීන", + "fj": "ෆීජි", + "fo": "à·†à·à¶»à·à·ƒà·Š", + "fon": "ෆොන්", + "fr": "à¶´à·Šâ€à¶»à¶‚à·", + "fr_CA": "à¶šà·à¶±à·šà¶©à·’යà·à¶±à·” à¶´à·Šâ€à¶»à¶‚à·", + "fr_CH": "ස්විස් à¶´à·Šâ€à¶»à¶‚à·", + "fur": "ෆ්â€à¶»à·’යුලියන්", + "fy": "à¶¶à¶§à·„à·’à¶» ෆ්â€à¶»à·’සියà·à¶±à·”", + "ga": "අයර්ලන්ත", + "gaa": "à¶œà·", + "gag": "ගගà·à·ƒà·Š", + "gan": "à¶œà·à¶±à·Š චයිනිස්", + "gd": "ස්කොට්ටිà·à·Š ගෙලික්", + "gez": "ගීස්", + "gil": "ගිල්බර්ටීස්", + "gl": "à¶œà·à¶½à·“සියà·à¶±à·”", + "gn": "ගුවà·à¶»à¶±à·’", + "gor": "ගොරොන්ටà·à¶½à·œ", + "gsw": "ස්විස් ජර්මà·à¶±à·”", + "gu": "ගුජරà·à¶§à·’", + "guz": "ගුසී", + "gv": "මà·à¶±à·Šà¶šà·Šà·ƒà·Š", + "gwi": "ග්විචින්", + "ha": "à·„à·à·ƒà·", + "hak": "හක෠චයිනිස්", + "haw": "à·„à·€à·à¶ºà·’", + "he": "à·„à·“à¶¶à·²", + "hi": "හින්දි", + "hil": "හිලිගෙනන්", + "hmn": "මොන්ග්", + "hr": "à¶šà·Šâ€à¶»à·à¶ºà·šà·à·’යà·à¶±à·”", + "hsb": "ඉහළ à·ƒà·à¶¶à·’යà·à¶±à·”", + "hsn": "සියà·à¶±à·Š à¶ à·“à¶±", + "ht": "හයිටි", + "hu": "හන්ගේරියà·à¶±à·”", + "hup": "හුපà·", + "hy": "ආර්මේනියà·à¶±à·”", + "hz": "හෙරෙරො", + "ia": "ඉන්ටලින්ගුආ", + "iba": "ඉබන්", + "ibb": "ඉබිබියො", + "id": "ඉන්දුනීසියà·à¶±à·”", + "ig": "ඉග්බà·", + "ii": "සිචුආන් යී", + "ilo": "ඉලොකො", + "inh": "ඉන්ගුෂ්", + "io": "ඉඩො", + "is": "අයිස්ලන්ත", + "it": "ඉතà·à¶½à·’", + "iu": "ඉනුක්ටිටුට්", + "ja": "ජපන්", + "jbo": "ලොජ්බන්", + "jgo": "නොම්බà·", + "jmc": "මà·à¶šà·à¶¸à·“", + "jv": "à¶¢à·à·€à·", + "ka": "à¶¢à·à¶»à·Šà¶¢à·’යà·à¶±à·”", + "kab": "à¶šà·à¶¶à¶½à·", + "kac": "කචින්", + "kaj": "ජ්ජු", + "kam": "à¶šà·à¶¸à·Šà¶¶à·", + "kbd": "à¶šà¶¶à·à¶»à·Šà¶©à·’යන්", + "kcg": "ට්යප්", + "kde": "මà·à¶šà·œà¶±à·Šà¶©à·Š", + "kea": "කබුවෙර්ඩියà·à¶±à·", + "kfo": "කොරො", + "kha": "ඛසි", + "khq": "කොයිර෠චිනි", + "ki": "කිකුයු", + "kj": "කුයන්යමà·", + "kk": "à¶šà·ƒà·à¶›à·Š", + "kkj": "à¶šà¶šà·œ", + "kl": "à¶šà¶½à·à¶½à·’සට්", + "kln": "කලෙන්ජන්", + "km": "කමර්", + "kmb": "කිම්බුන්ඩු", + "kn": "à¶šà¶«à·Šà¶«à¶©", + "ko": "කොරියà·à¶±à·”", + "koi": "කොමි-පර්මියà·à¶šà·Š", + "kok": "කොන්කනි", + "kpe": "ක්පෙලෙ", + "kr": "කනුරි", + "krc": "කරන්චි-à¶¶à·à¶šà¶»à·Š", + "krl": "à¶šà·à¶»à·™à¶½à·’යන්", + "kru": "කුරුඛ්", + "ks": "à¶šà·à·‚්මීර්", + "ksb": "à·à·à¶¸à·Šà¶¶à¶½à·", + "ksf": "à¶¶à·à·†à·’යà·", + "ksh": "කොලොග්නියන්", + "ku": "කුර්දි", + "kum": "කුමික්", + "kv": "කොමි", + "kw": "à¶šà·à¶±à·“සියà·à¶±à·”", + "ky": "කිර්ගිස්", + "la": "ලතින්", + "lad": "ලඩිනො", + "lag": "ලංගි", + "lb": "ලක්සà·à¶¸à·Šà¶¶à¶»à·Šà¶œà·Š", + "lez": "ලෙස්ගියන්", + "lg": "ගන්ඩà·", + "li": "ලිම්බර්ගිà·à·Š", + "lkt": "ලකොට", + "ln": "ලින්ගලà·", + "lo": "à¶½à·à¶•", + "loz": "ලොසි", + "lrc": "උතුරු ලුරි", + "lt": "ලිතුවේනියà·à¶±à·”", + "lu": "ලු", + "lua": "ලුබ-ලුලුඅ", + "lun": "ලුන්ඩ", + "luo": "ලුඔ", + "lus": "මිසො", + "luy": "ලුයියà·", + "lv": "à¶½à·à¶§à·Šà·€à·’යà·à¶±à·”", + "mad": "මදුරීස්", + "mag": "මà¶à·„à·’", + "mai": "මයිතිලි", + "mak": "මකà·à·ƒà·à¶»à·Š", + "mas": "මසà·à¶ºà·’", + "mdf": "මොක්à·à·", + "men": "මෙන්ඩෙ", + "mer": "මෙරු", + "mfe": "මොරිස්යෙම්", + "mg": "මලගà·à·ƒà·’", + "mgh": "මඛුවà·-මීටà·", + "mgo": "මෙටà·", + "mh": "මà·à·à¶½à·“ස්", + "mi": "මà·à·€à·œà¶»à·’", + "mic": "මික්මà·à¶šà·Š", + "min": "මිනන්ග්කබà·à·€à·”", + "mk": "මà·à·ƒà·’à¶©à·à¶±à·’යà·à¶±à·”", + "ml": "මලයà·à¶½à¶¸à·Š", + "mn": "මොංගà·à¶½à·’යà·à¶±à·”", + "mni": "මනිපුරි", + "moh": "මොහොව්ක්", + "mos": "මොස්සි", + "mr": "මරà·à¶­à·’", + "ms": "මà·à¶½à·š", + "mt": "මොල්ටිස්", + "mua": "මුන්ඩන්", + "mul": "à¶¶à·„à·” à¶·à·à·‚à·", + "mus": "à¶šà·Šâ€à¶»à·“à¶šà·Š", + "mwl": "මිරන්ඩීස්", + "my": "බුරුම", + "myv": "එර්ස්යà·", + "mzn": "මà·à·ƒà¶±à·Šà¶©à¶»à¶±à·’", + "na": "නෞරු", + "nan": "මින් නන් චයිනිස්", + "nap": "නියà·à¶´à·œà¶½à·’ටන්", + "naq": "à¶±à·à¶¸à·", + "nb": "à¶±à·à·€à·šà¶¢à·’යà·à¶±à·” බොක්මà·à¶½à·Š", + "nd": "උතුරු එන්ඩිබෙලෙ", + "nds": "à¶´à·„à·… ජර්මන්", + "nds_NL": "à¶´à·„à·… à·ƒà·à¶šà·Šà·ƒà¶±à·Š", + "ne": "නේපà·à¶½", + "new": "නෙවà·à¶»à·’", + "ng": "න්ඩොන්ගà·", + "nia": "නියà·à·ƒà·Š", + "niu": "නියුඑන්", + "nl": "ලන්දේසි", + "nl_BE": "ෆ්ලෙමිà·à·Š", + "nmg": "කුවà·à·ƒà·’à¶”", + "nn": "නොවේර්ජියà·à¶±à·” නයිනà·à¶»à·Šà·ƒà·Šà¶šà·Š", + "nnh": "න්ගියà·à¶¸à·Šà¶¶à·–න්", + "nog": "නොගà·à¶ºà·’", + "nqo": "එන්‘කà·", + "nr": "සෞත් ඩ්බේල්", + "nso": "නොදර්න් සොතො", + "nus": "නොයර්", + "nv": "නවà·à¶¢à·œ", + "ny": "න්යන්ජà·", + "nyn": "නයන්කොළේ", + "oc": "ඔසිටà·à¶±à·Š", + "om": "ඔරොමà·", + "or": "ඔරියà·", + "os": "ඔසිටෙක්", + "pa": "පන්ජà·à¶¶à·’", + "pag": "පන්ගසීනන්", + "pam": "පන්පන්ග", + "pap": "පපියමෙන්ටො", + "pau": "පලවුවන්", + "pcm": "නෛජීරියන් පෙන්ගින්", + "pl": "à¶´à·à¶½à¶±à·Šà¶­", + "prg": "à¶´à·˜à·à·’යන්", + "ps": "à¶´à·‚à·Šà¶§à·œ", + "pt": "පෘතුගීසි", + "pt_BR": "à¶¶à·Šâ€à¶»à·ƒà·“à¶½ පෘතුගීසි", + "pt_PT": "යුරà·à¶´à·“ය පෘතුගීසි", + "qu": "ක්වීචුවà·", + "quc": "කියිචේ", + "rap": "රපනුයි", + "rar": "රරොටොන්ගන්", + "rm": "රොමෑන්à·à·Š", + "rn": "රුන්ඩි", + "ro": "රොමේනියà·à¶±à·”", + "ro_MD": "මොල්ඩවිආනු", + "rof": "à¶»à·à¶¸à·Šà¶¶à·", + "root": "රූට්", + "ru": "රුසියà·à¶±à·”", + "rup": "ඇරොමෙන්යන්", + "rw": "කින්යර්වන්ඩà·", + "rwk": "ර්වà·", + "sa": "සංස්කෘත", + "sad": "සන්ඩවෙ", + "sah": "සඛà·", + "saq": "සම්බුරු", + "sat": "සෑන්ටලි", + "sba": "න්ගම්බෙ", + "sbp": "සංගු", + "sc": "à·ƒà·à¶»à·Šà¶©à·’නිඅන්", + "scn": "සිසිලියන්", + "sco": "ස්කොට්ස්", + "sd": "සින්ධි", + "sdh": "දකුණු කුර්දි", + "se": "උතුරු à·ƒà·à¶¸à·’", + "seh": "සෙනà·", + "ses": "à¶šà·à¶ºà·’à¶»à·à¶¶à·œà¶»à·œ සෙන්නි", + "sg": "සන්ග්â€à¶»à·", + "shi": "ටචේල්හිට්", + "shn": "à·à·à¶±à·Š", + "si": "සිංහල", + "sk": "ස්ලà·à·€à·à¶šà·Š", + "sl": "ස්ලà·à·€à·šà¶±à·’යà·à¶±à·”", + "sm": "සෑමොඅන්", + "sma": "දකුණු à·ƒà·à¶¸à·’", + "smj": "ලුලේ à·ƒà·à¶¸à·’", + "smn": "ඉනà·à¶»à·’ à·ƒà·à¶¸à·’", + "sms": "ස්කොල්ට් à·ƒà·à¶¸à·’", + "sn": "à·à·à¶±à·", + "snk": "සොනින්කෙ", + "so": "à·ƒà·à¶¸à·à¶½à·’", + "sq": "ඇල්බේනියà·à¶±à·”", + "sr": "සර්බියà·à¶±à·”", + "srn": "ස්â€à¶»à¶±à·Š ටොන්ගො", + "ss": "ස්වති", + "ssy": "සහො", + "st": "සතර්න් සොතො", + "su": "සන්ඩනීසියà·à¶±à·”", + "suk": "සුකුමà·", + "sv": "ස්වීඩන්", + "sw": "ස්වà·à·„ිලි", + "swb": "කොමොරියන්", + "syr": "ස්â€à¶»à¶ºà·‘à¶šà·Š", + "ta": "දෙමළ", + "te": "තෙළිඟු", + "tem": "ටිම්නෙ", + "teo": "ටෙසà·", + "tet": "ටේටම්", + "tg": "ටජික්", + "th": "à¶­à·à¶ºà·’", + "ti": "ටිග්â€à¶»à·’න්යà·", + "tig": "ටීග්â€à¶»à·™", + "tk": "ටර්ක්මෙන්", + "tlh": "ක්ලින්ගොන්", + "tn": "ස්වනà·", + "to": "ටොංගà·", + "tpi": "ටොක් පිසින්", + "tr": "තුර්කි", + "trv": "ටරොකො", + "ts": "සොන්ග", + "tt": "à¶§à·à¶§à¶»à·Š", + "tum": "ටුම්බුකà·", + "tvl": "ටුවà·à¶½à·”", + "twq": "ටසවà·à¶šà·Š", + "ty": "ටහිටියන්", + "tyv": "ටුවිනියන්", + "tzm": "මධ්â€à¶ºà¶¸ ඇට්ලස් ටමසිට්", + "udm": "අඩ්මර්ට්", + "ug": "උයිගර්", + "uk": "යුක්රේනියà·à¶±à·”", + "umb": "උබුන්ඩු", + "und": "නොදන්න෠භà·à·‚à·à·€", + "ur": "උර්දු", + "uz": "උස්බෙක්", + "vai": "වයි", + "ve": "වෙන්ඩà·", + "vi": "වියට්නà·à¶¸à·Š", + "vo": "වොලපූක්", + "vun": "වුන්ජà·", + "wa": "වෑලූන්", + "wae": "වොල්සර්", + "wal": "වොලෙට්ට", + "war": "වොරෙය්", + "wbp": "වොපිරි", + "wo": "වොලොෆ්", + "wuu": "වූ චයිනිස්", + "xal": "කල්මික්", + "xh": "à·à·à·ƒà·", + "xog": "සොගà·", + "yav": "යන්ග්බෙන්", + "ybb": "යෙම්බà·", + "yi": "යිඩිà·à·Š", + "yo": "යොරූබà·", + "yue": "à¶šà·à¶±à·Šà¶§à·œà¶±à·“ස්", + "zgh": "සම්මත මොරොක්ක෠ටමසිග්ත්", + "zh": "à¶ à·“à¶±", + "zh_Hans": "සුළුකළ à¶ à·“à¶±", + "zh_Hant": "à·ƒà·à¶¸à·Šà¶´à·Šâ€à¶»à¶¯à·à¶ºà·’à¶š à¶ à·“à¶±", + "zu": "සුලු", + "zun": "සුනි", + "zxx": "à·€à·à¶œà·Š විද්â€à¶ºà· අන්තර්ගතයක් à¶±à·à¶­", + "zza": "à·ƒà·à·ƒà·" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sk.json new file mode 100644 index 0000000000000000000000000000000000000000..928b241c0e3ffa18a10319897432ce6016be3638 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sk.json @@ -0,0 +1,529 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afarÄina", + "ab": "abcházÄina", + "ace": "acehÄina", + "ach": "aÄoli", + "ada": "adangme", + "ady": "adygejÄina", + "ae": "avestÄina", + "af": "afrikánÄina", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainÄina", + "ak": "akanÄina", + "akk": "akkadÄina", + "ale": "aleutÄina", + "alt": "južná altajÄina", + "am": "amharÄina", + "an": "aragónÄina", + "ang": "stará angliÄtina", + "anp": "angika", + "ar": "arabÄina", + "ar_001": "arabÄina (moderná Å¡tandardná)", + "arc": "aramejÄina", + "arn": "araukánÄina", + "arp": "arapažština", + "arw": "arawaÄtina", + "as": "ásamÄina", + "asa": "asu", + "ast": "astúrÄina", + "av": "avarÄina", + "awa": "awadhi", + "ay": "aymarÄina", + "az": "azerbajdžanÄina", + "ba": "baÅ¡kirÄina", + "bal": "balúÄtina", + "ban": "balijÄina", + "bas": "basa", + "bax": "bamun", + "bbj": "ghomala", + "be": "bieloruÅ¡tina", + "bej": "bedža", + "bem": "bemba", + "bez": "bena", + "bfd": "bafut", + "bg": "bulharÄina", + "bgn": "západná balúÄtina", + "bho": "bhódžpurÄina", + "bi": "bislama", + "bik": "bikolÄina", + "bin": "bini", + "bkm": "kom", + "bla": "siksika", + "bm": "bambarÄina", + "bn": "bengálÄina", + "bo": "tibetÄina", + "br": "bretónÄina", + "bra": "bradžÄina", + "brx": "bodo", + "bs": "bosniaÄtina", + "bss": "akoose", + "bua": "buriatÄina", + "bug": "bugiÅ¡tina", + "bum": "bulu", + "byn": "blin", + "byv": "medumba", + "ca": "katalánÄina", + "cad": "kaddo", + "car": "karibÄina", + "cay": "kajugÄina", + "cch": "atsam", + "ce": "ÄeÄenÄina", + "ceb": "cebuánÄina", + "cgg": "kiga", + "ch": "ÄamorÄina", + "chb": "ÄibÄa", + "chg": "ÄagatajÄina", + "chk": "chuuk", + "chm": "marijÄina", + "chn": "Äinucký žargón", + "cho": "ÄoktÄina", + "chp": "ÄipevajÄina", + "chr": "Äerokí", + "chy": "ÄejenÄina", + "ckb": "kurdÄina (sorání)", + "co": "korziÄtina", + "cop": "koptÄina", + "cr": "krí", + "crh": "krymská tatárÄina", + "crs": "seychelská kreolÄina", + "cs": "ÄeÅ¡tina", + "csb": "kaÅ¡ubÄina", + "cu": "cirkevná slovanÄina", + "cv": "ÄuvaÅ¡tina", + "cy": "waleÅ¡tina", + "da": "dánÄina", + "dak": "dakotÄina", + "dar": "darginÄina", + "dav": "taita", + "de": "nemÄina", + "de_AT": "nemÄina (rakúska)", + "de_CH": "nemÄina (Å¡vajÄiarska spisovná)", + "del": "delawarÄina", + "den": "slavé", + "dgr": "dogribÄina", + "din": "dinkÄina", + "dje": "zarma", + "doi": "dógrí", + "dsb": "dolnolužická srbÄina", + "dua": "duala", + "dum": "stredná holandÄina", + "dv": "maldivÄina", + "dyo": "jola-fonyi", + "dyu": "Äula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embu", + "ee": "eweÅ¡tina", + "efi": "efik", + "egy": "staroegyptÄina", + "eka": "ekadžuk", + "el": "gréÄtina", + "elx": "elamÄina", + "en": "angliÄtina", + "en_AU": "angliÄtina (austrálska)", + "en_CA": "angliÄtina (kanadská)", + "en_GB": "angliÄtina (britská)", + "en_US": "angliÄtina (americká)", + "enm": "stredná angliÄtina", + "eo": "esperanto", + "es": "Å¡panielÄina", + "es_419": "Å¡panielÄina (latinskoamerická)", + "es_ES": "Å¡panielÄina (európska)", + "es_MX": "Å¡panielÄina (mexická)", + "et": "estónÄina", + "eu": "baskiÄtina", + "ewo": "ewondo", + "fa": "perzÅ¡tina", + "fan": "fangÄina", + "fat": "fanti", + "ff": "fulbÄina", + "fi": "fínÄina", + "fil": "filipínÄina", + "fj": "fidžijÄina", + "fo": "faerÄina", + "fon": "fonÄina", + "fr": "francúzÅ¡tina", + "fr_CA": "francúzÅ¡tina (kanadská)", + "fr_CH": "francúzÅ¡tina (Å¡vajÄiarska)", + "frm": "stredná francúzÅ¡tina", + "fro": "stará francúzÅ¡tina", + "frr": "severná frízÅ¡tina", + "frs": "východofrízÅ¡tina", + "fur": "friulÄina", + "fy": "západná frízÅ¡tina", + "ga": "írÄina", + "gaa": "ga", + "gag": "gagauzÅ¡tina", + "gay": "gayo", + "gba": "gbaja", + "gd": "Å¡kótska gaelÄina", + "gez": "etiópÄina", + "gil": "kiribatÄina", + "gl": "galícijÄina", + "gmh": "stredná horná nemÄina", + "gn": "guaraníjÄina", + "goh": "stará horná nemÄina", + "gon": "góndÄina", + "gor": "gorontalo", + "got": "gótÄina", + "grb": "grebo", + "grc": "starogréÄtina", + "gsw": "nemÄina (Å¡vajÄiarska)", + "gu": "gudžarátÄina", + "guz": "gusii", + "gv": "manÄina", + "gwi": "kuÄinÄina", + "ha": "hauÅ¡tina", + "hai": "haida", + "haw": "havajÄina", + "he": "hebrejÄina", + "hi": "hindÄina", + "hil": "hiligajnonÄina", + "hit": "chetitÄina", + "hmn": "hmongÄina", + "ho": "hiri motu", + "hr": "chorvátÄina", + "hsb": "hornolužická srbÄina", + "ht": "haitská kreolÄina", + "hu": "maÄarÄina", + "hup": "hupÄina", + "hy": "arménÄina", + "hz": "herero", + "ia": "interlingua", + "iba": "ibanÄina", + "ibb": "ibibio", + "id": "indonézÅ¡tina", + "ie": "interlingue", + "ig": "igboÅ¡tina", + "ii": "s’Ächuanská iovÄina", + "ik": "inupik", + "ilo": "ilokánÄina", + "inh": "inguÅ¡tina", + "io": "ido", + "is": "islandÄina", + "it": "talianÄina", + "iu": "inuktitut", + "ja": "japonÄina", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "maÅ¡ame", + "jpr": "židovská perzÅ¡tina", + "jrb": "židovská arabÄina", + "jv": "jávÄina", + "ka": "gruzínÄina", + "kaa": "karakalpaÄtina", + "kab": "kabylÄina", + "kac": "kaÄjinÄina", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardÄina", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "kapverdÄina", + "kfo": "koro", + "kg": "kongÄina", + "kha": "khasijÄina", + "kho": "chotanÄina", + "khq": "západná songhajÄina", + "ki": "kikujÄina", + "kj": "kuaňama", + "kk": "kazaÅ¡tina", + "kkj": "kako", + "kl": "grónÄina", + "kln": "kalendžin", + "km": "khmérÄina", + "kmb": "kimbundu", + "kn": "kannadÄina", + "ko": "kórejÄina", + "koi": "komi-permiaÄtina", + "kok": "konkánÄina", + "kos": "kusaie", + "kpe": "kpelle", + "kr": "kanurijÄina", + "krc": "karaÄajevsko-balkarÄina", + "krl": "karelÄina", + "kru": "kuruchÄina", + "ks": "kaÅ¡mírÄina", + "ksb": "Å¡ambala", + "ksf": "bafia", + "ksh": "kolínÄina", + "ku": "kurdÄina", + "kum": "kumyÄtina", + "kut": "kutenajÄina", + "kv": "komijÄina", + "kw": "kornÄina", + "ky": "kirgizÅ¡tina", + "la": "latinÄina", + "lad": "židovská Å¡panielÄina", + "lag": "langi", + "lah": "lahandÄina", + "lam": "lamba", + "lb": "luxemburÄina", + "lez": "lezginÄina", + "lg": "gandÄina", + "li": "limburÄina", + "lkt": "lakotÄina", + "ln": "lingalÄina", + "lo": "laoÅ¡tina", + "lol": "mongo", + "loz": "lozi", + "lrc": "severné luri", + "lt": "litovÄina", + "lu": "lubÄina (katanžská)", + "lua": "lubÄina (luluánska)", + "lui": "luiseňo", + "lun": "lunda", + "luo": "luo", + "lus": "mizorámÄina", + "luy": "luhja", + "lv": "lotyÅ¡tina", + "mad": "madurÄina", + "maf": "mafa", + "mag": "magadhÄina", + "mai": "maithilÄina", + "mak": "makasarÄina", + "man": "mandingo", + "mas": "masajÄina", + "mde": "maba", + "mdf": "mokÅ¡ianÄina", + "mdr": "mandarÄina", + "men": "mendejÄina", + "mer": "meru", + "mfe": "maurícijská kreolÄina", + "mg": "malgaÅ¡tina", + "mga": "stredná írÄina", + "mgh": "makua-meetto", + "mgo": "meta’", + "mh": "marshallÄina", + "mi": "maorijÄina", + "mic": "mikmakÄina", + "min": "minangkabauÄina", + "mk": "macedónÄina", + "ml": "malajálamÄina", + "mn": "mongolÄina", + "mnc": "mandžuÅ¡tina", + "mni": "manípurÄina", + "moh": "mohawkÄina", + "mos": "mossi", + "mr": "maráthÄina", + "ms": "malajÄina", + "mt": "maltÄina", + "mua": "mundang", + "mul": "viaceré jazyky", + "mus": "kríkÄina", + "mwl": "mirandÄina", + "mwr": "marwari", + "my": "barmÄina", + "mye": "myene", + "myv": "erzjanÄina", + "mzn": "mázandaránÄina", + "na": "nauruÅ¡tina", + "nap": "neapolÄina", + "naq": "nama", + "nb": "nórÄina (bokmal)", + "nd": "severná ndebelÄina", + "nds": "dolná nemÄina", + "nds_NL": "dolná saÅ¡tina", + "ne": "nepálÄina", + "new": "nevárÄina", + "ng": "ndonga", + "nia": "niasánÄina", + "niu": "niueÅ¡tina", + "nl": "holandÄina", + "nl_BE": "flámÄina", + "nmg": "kwasio", + "nn": "nórÄina (nynorsk)", + "nnh": "ngiemboon", + "no": "nórÄina", + "nog": "nogajÄina", + "non": "stará nórÄina", + "nqo": "n’ko", + "nr": "južná ndebelÄina", + "nso": "severná sothÄina", + "nus": "nuer", + "nv": "navaho", + "nwc": "klasická nevárÄina", + "ny": "ňandža", + "nym": "ňamwezi", + "nyn": "ňankole", + "nyo": "ňoro", + "nzi": "nzima", + "oc": "okcitánÄina", + "oj": "odžibva", + "om": "oromÄina", + "or": "uríjÄina", + "os": "osetÄina", + "osa": "osedžština", + "ota": "osmanská tureÄtina", + "pa": "pandžábÄina", + "pag": "pangasinanÄina", + "pal": "pahlaví", + "pam": "kapampanganÄina", + "pap": "papiamento", + "pau": "palauÄina", + "pcm": "nigerijský pidžin", + "peo": "stará perzÅ¡tina", + "phn": "feniÄtina", + "pi": "pálí", + "pl": "poľština", + "pon": "pohnpeiÅ¡tina", + "prg": "pruÅ¡tina", + "pro": "stará okcitánÄina", + "ps": "paÅ¡tÄina", + "pt": "portugalÄina", + "pt_BR": "portugalÄina (brazílska)", + "pt_PT": "portugalÄina (európska)", + "qu": "keÄuánÄina", + "quc": "quiché", + "raj": "radžastanÄina", + "rap": "rapanujÄina", + "rar": "rarotongská maorijÄina", + "rm": "rétorománÄina", + "rn": "rundÄina", + "ro": "rumunÄina", + "ro_MD": "moldavÄina", + "rof": "rombo", + "rom": "rómÄina", + "root": "koreň", + "ru": "ruÅ¡tina", + "rup": "arumunÄina", + "rw": "rwandÄina", + "rwk": "rwa", + "sa": "sanskrit", + "sad": "sandaweÅ¡tina", + "sah": "jakutÄina", + "sam": "samaritánska aramejÄina", + "saq": "samburu", + "sas": "sasaÄtina", + "sat": "santalÄina", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardínÄina", + "scn": "sicílÄina", + "sco": "Å¡kótÄina", + "sd": "sindhÄina", + "sdh": "južná kurdÄina", + "se": "severná laponÄina", + "see": "senekÄina", + "seh": "sena", + "sel": "selkupÄina", + "ses": "koyraboro senni", + "sg": "sango", + "sga": "stará írÄina", + "sh": "srbochorvátÄina", + "shi": "tachelhit", + "shn": "Å¡anÄina", + "shu": "Äadská arabÄina", + "si": "sinhalÄina", + "sid": "sidamo", + "sk": "slovenÄina", + "sl": "slovinÄina", + "sm": "samojÄina", + "sma": "južná laponÄina", + "smj": "laponÄina (lulská)", + "smn": "laponÄina (inarijská)", + "sms": "laponÄina (skoltská)", + "sn": "Å¡onÄina", + "snk": "soninke", + "so": "somálÄina", + "sog": "sogdijÄina", + "sq": "albánÄina", + "sr": "srbÄina", + "srn": "surinamÄina", + "srr": "sererÄina", + "ss": "svazijÄina", + "ssy": "saho", + "st": "južná sothÄina", + "su": "sundÄina", + "suk": "sukuma", + "sus": "susu", + "sux": "sumerÄina", + "sv": "Å¡védÄina", + "sw": "swahilÄina", + "sw_CD": "svahilÄina (konžská)", + "swb": "komorÄina", + "syc": "sýrÄina (klasická)", + "syr": "sýrÄina", + "ta": "tamilÄina", + "te": "telugÄina", + "tem": "temne", + "teo": "teso", + "ter": "terêna", + "tet": "tetumÄina", + "tg": "tadžiÄtina", + "th": "thajÄina", + "ti": "tigriňa", + "tig": "tigrejÄina", + "tiv": "tiv", + "tk": "turkménÄina", + "tkl": "tokelauÅ¡tina", + "tl": "tagalÄina", + "tlh": "klingónÄina", + "tli": "tlingitÄina", + "tmh": "tuaregÄina", + "tn": "tswanÄina", + "to": "tongÄina", + "tog": "ňasa tonga", + "tpi": "novoguinejský pidžin", + "tr": "tureÄtina", + "trv": "taroko", + "ts": "tsongÄina", + "tsi": "cimÅ¡janÄina", + "tt": "tatárÄina", + "tum": "tumbuka", + "tvl": "tuvalÄina", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitÄina", + "tyv": "tuvianÄina", + "tzm": "stredomarocká tuaregÄina", + "udm": "udmurtÄina", + "ug": "ujgurÄina", + "uga": "ugaritÄina", + "uk": "ukrajinÄina", + "umb": "umbundu", + "und": "neznámy jazyk", + "ur": "urdÄina", + "uz": "uzbeÄtina", + "vai": "vai", + "ve": "vendÄina", + "vi": "vietnamÄina", + "vo": "volapük", + "vot": "vodÄina", + "vun": "vunjo", + "wa": "valónÄina", + "wae": "walserÄina", + "wal": "walamÄina", + "war": "waray", + "was": "washo", + "wbp": "warlpiri", + "wo": "wolofÄina", + "xal": "kalmyÄtina", + "xh": "xhoÅ¡tina", + "xog": "soga", + "yao": "jao", + "yap": "japÄina", + "yav": "jangben", + "ybb": "yemba", + "yi": "jidiÅ¡", + "yo": "jorubÄina", + "yue": "kantonÄina", + "za": "ÄuangÄina", + "zap": "zapotéÄtina", + "zbl": "systém Bliss", + "zen": "zenaga", + "zgh": "tuaregÄina (Å¡tandardná marocká)", + "zh": "ÄínÅ¡tina", + "zh_Hans": "ÄínÅ¡tina (zjednoduÅ¡ená)", + "zh_Hant": "ÄínÅ¡tina (tradiÄná)", + "zu": "zuluÅ¡tina", + "zun": "zuniÅ¡tina", + "zxx": "bez jazykového obsahu", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sl.json new file mode 100644 index 0000000000000000000000000000000000000000..e056e3154187ac08309747d3868a60b02e5085b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sl.json @@ -0,0 +1,509 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afarÅ¡Äina", + "ab": "abhaÅ¡Äina", + "ace": "aÄejÅ¡Äina", + "ach": "aÄolijÅ¡Äina", + "ada": "adangmejÅ¡Äina", + "ady": "adigejÅ¡Äina", + "ae": "avestijÅ¡Äina", + "af": "afrikanÅ¡Äina", + "afh": "afrihili", + "agq": "aghemÅ¡Äina", + "ain": "ainujÅ¡Äina", + "ak": "akanÅ¡Äina", + "akk": "akadÅ¡Äina", + "ale": "aleutÅ¡Äina", + "alt": "južna altajÅ¡Äina", + "am": "amharÅ¡Äina", + "an": "aragonÅ¡Äina", + "ang": "stara angleÅ¡Äina", + "anp": "angikaÅ¡Äina", + "ar": "arabÅ¡Äina", + "ar_001": "sodobna standardna arabÅ¡Äina", + "arc": "aramejÅ¡Äina", + "arn": "mapudungunÅ¡Äina", + "arp": "arapaÅ¡Äina", + "arw": "aravaÅ¡Äina", + "as": "asamÅ¡Äina", + "asa": "asujÅ¡Äina", + "ast": "asturijÅ¡Äina", + "av": "avarÅ¡Äina", + "awa": "avadÅ¡Äina", + "ay": "ajmarÅ¡Äina", + "az": "azerbajdžanÅ¡Äina", + "ba": "baÅ¡kirÅ¡Äina", + "bal": "beludžijÅ¡Äina", + "ban": "balijÅ¡Äina", + "bas": "basa", + "be": "beloruÅ¡Äina", + "bej": "bedža", + "bem": "bemba", + "bez": "benajÅ¡Äina", + "bg": "bolgarÅ¡Äina", + "bgn": "zahodnobaluÄijÅ¡Äina", + "bho": "bodžpuri", + "bi": "bislamÅ¡Äina", + "bik": "bikolski jezik", + "bin": "edo", + "bla": "siksika", + "bm": "bambarÅ¡Äina", + "bn": "bengalÅ¡Äina", + "bo": "tibetanÅ¡Äina", + "br": "bretonÅ¡Äina", + "bra": "bradžbakanÅ¡Äina", + "brx": "bodojÅ¡Äina", + "bs": "bosanÅ¡Äina", + "bua": "burjatÅ¡Äina", + "bug": "buginÅ¡Äina", + "byn": "blinÅ¡Äina", + "ca": "katalonÅ¡Äina", + "cad": "kadoÅ¡Äina", + "car": "karibski jezik", + "ce": "ÄeÄenÅ¡Äina", + "ceb": "sebuanÅ¡Äina", + "cgg": "ÄigajÅ¡Äina", + "ch": "ÄamorÅ¡Äina", + "chb": "ÄibÄevÅ¡Äina", + "chg": "ÄagatajÅ¡Äina", + "chk": "trukeÅ¡Äina", + "chm": "marijÅ¡Äina", + "chn": "ÄinuÅ¡ki žargon", + "cho": "ÄoktavÅ¡Äina", + "chp": "ÄipevÅ¡Äina", + "chr": "ÄerokeÅ¡Äina", + "chy": "ÄejenÅ¡Äina", + "ckb": "soranska kurdÅ¡Äina", + "co": "korziÅ¡Äina", + "cop": "koptÅ¡Äina", + "cr": "krijÅ¡Äina", + "crh": "krimska tatarÅ¡Äina", + "crs": "sejÅ¡elska francoska kreolÅ¡Äina", + "cs": "ÄeÅ¡Äina", + "csb": "kaÅ¡ubÅ¡Äina", + "cu": "stara cerkvena slovanÅ¡Äina", + "cv": "ÄuvaÅ¡Äina", + "cy": "valižanÅ¡Äina", + "da": "danÅ¡Äina", + "dak": "dakotÅ¡Äina", + "dar": "darginÅ¡Äina", + "dav": "taitajÅ¡Äina", + "de": "nemÅ¡Äina", + "de_AT": "avstrijska nemÅ¡Äina", + "de_CH": "visoka nemÅ¡Äina (Å vica)", + "del": "delavarÅ¡Äina", + "den": "slavejÅ¡Äina", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarmajÅ¡Äina", + "doi": "dogri", + "dsb": "dolnja lužiÅ¡ka srbÅ¡Äina", + "dua": "duala", + "dum": "srednja nizozemÅ¡Äina", + "dv": "diveÅ¡Äina", + "dyo": "jola-fonjiÅ¡Äina", + "dyu": "diula", + "dz": "dzonka", + "dzg": "dazaga", + "ebu": "embujÅ¡Äina", + "ee": "evenÅ¡Äina", + "efi": "efiÅ¡Äina", + "egy": "stara egipÄanÅ¡Äina", + "eka": "ekajuk", + "el": "grÅ¡Äina", + "elx": "elamÅ¡Äina", + "en": "angleÅ¡Äina", + "en_AU": "avstralska angleÅ¡Äina", + "en_CA": "kanadska angleÅ¡Äina", + "en_GB": "angleÅ¡Äina (VB)", + "en_US": "angleÅ¡Äina (ZDA)", + "enm": "srednja angleÅ¡Äina", + "eo": "esperanto", + "es": "Å¡panÅ¡Äina", + "es_419": "latinskoameriÅ¡ka Å¡panÅ¡Äina", + "es_ES": "iberska Å¡panÅ¡Äina", + "et": "estonÅ¡Äina", + "eu": "baskovÅ¡Äina", + "ewo": "evondovÅ¡Äina", + "fa": "perzijÅ¡Äina", + "fan": "fangijÅ¡Äina", + "fat": "fantijÅ¡Äina", + "ff": "fulÅ¡Äina", + "fi": "finÅ¡Äina", + "fil": "filipinÅ¡Äina", + "fj": "fidžijÅ¡Äina", + "fo": "ferÅ¡Äina", + "fon": "fonÅ¡Äina", + "fr": "francoÅ¡Äina", + "fr_CA": "kanadska francoÅ¡Äina", + "fr_CH": "Å¡vicarska francoÅ¡Äina", + "frm": "srednja francoÅ¡Äina", + "fro": "stara francoÅ¡Äina", + "frr": "severna frizijÅ¡Äina", + "frs": "vzhodna frizijÅ¡Äina", + "fur": "furlanÅ¡Äina", + "fy": "zahodna frizijÅ¡Äina", + "ga": "irÅ¡Äina", + "gaa": "ga", + "gag": "gagavÅ¡Äina", + "gay": "gajÅ¡Äina", + "gba": "gbajÅ¡Äina", + "gd": "Å¡kotska gelÅ¡Äina", + "gez": "etiopÅ¡Äina", + "gil": "kiribatÅ¡Äina", + "gl": "galicijÅ¡Äina", + "gmh": "srednja visoka nemÅ¡Äina", + "gn": "gvaranijÅ¡Äina", + "goh": "stara visoka nemÅ¡Äina", + "gon": "gondi", + "gor": "gorontalÅ¡Äina", + "got": "gotÅ¡Äina", + "grb": "grebÅ¡Äina", + "grc": "stara grÅ¡Äina", + "gsw": "nemÅ¡Äina (Å vica)", + "gu": "gudžaratÅ¡Äina", + "guz": "gusijÅ¡Äina", + "gv": "manÅ¡Äina", + "gwi": "gviÄin", + "ha": "havÅ¡Äina", + "hai": "haidÅ¡Äina", + "haw": "havajÅ¡Äina", + "he": "hebrejÅ¡Äina", + "hi": "hindujÅ¡Äina", + "hil": "hiligajnonÅ¡Äina", + "hit": "hetitÅ¡Äina", + "hmn": "hmonÅ¡Äina", + "ho": "hiri motu", + "hr": "hrvaÅ¡Äina", + "hsb": "gornja lužiÅ¡ka srbÅ¡Äina", + "ht": "haitijska kreolÅ¡Äina", + "hu": "madžarÅ¡Äina", + "hup": "hupa", + "hy": "armenÅ¡Äina", + "hz": "herero", + "ia": "interlingva", + "iba": "ibanÅ¡Äina", + "ibb": "ibibijÅ¡Äina", + "id": "indonezijÅ¡Äina", + "ie": "interlingve", + "ig": "igboÅ¡Äina", + "ii": "seÄuanska jiÅ¡Äina", + "ik": "inupiaÅ¡Äina", + "ilo": "ilokanÅ¡Äina", + "inh": "inguÅ¡Äina", + "io": "ido", + "is": "islandÅ¡Äina", + "it": "italijanÅ¡Äina", + "iu": "inuktitutÅ¡Äina", + "ja": "japonÅ¡Äina", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "maÄamejÅ¡Äina", + "jpr": "judovska perzijÅ¡Äina", + "jrb": "judovska arabÅ¡Äina", + "jv": "javanÅ¡Äina", + "ka": "gruzijÅ¡Äina", + "kaa": "karakalpaÅ¡Äina", + "kab": "kabilÅ¡Äina", + "kac": "kaÄinÅ¡Äina", + "kaj": "jju", + "kam": "kambaÅ¡Äina", + "kaw": "kavi", + "kbd": "kabardinÅ¡Äina", + "kcg": "tjapska nigerijÅ¡Äina", + "kde": "makondÅ¡Äina", + "kea": "zelenortskootoÅ¡ka kreolÅ¡Äina", + "kfo": "koro", + "kg": "kongovÅ¡Äina", + "kha": "kasi", + "kho": "kotanÅ¡Äina", + "khq": "koyra chiini", + "ki": "kikujÅ¡Äina", + "kj": "kvanjama", + "kk": "kazaÅ¡Äina", + "kkj": "kako", + "kl": "grenlandÅ¡Äina", + "kln": "kalenjinÅ¡Äina", + "km": "kmerÅ¡Äina", + "kmb": "kimbundu", + "kn": "kanada", + "ko": "korejÅ¡Äina", + "koi": "komi-permjaÅ¡Äina", + "kok": "konkanÅ¡Äina", + "kos": "kosrajÅ¡Äina", + "kpe": "kpelejÅ¡Äina", + "kr": "kanurÅ¡Äina", + "krc": "karaÄaj-balkarÅ¡Äina", + "krl": "karelÅ¡Äina", + "kru": "kuruk", + "ks": "kaÅ¡mirÅ¡Äina", + "ksb": "Å¡ambala", + "ksf": "bafia", + "ksh": "kölnsko nareÄje", + "ku": "kurdÅ¡Äina", + "kum": "kumiÅ¡Äina", + "kut": "kutenajÅ¡Äina", + "kv": "komijÅ¡Äina", + "kw": "kornijÅ¡Äina", + "ky": "kirgiÅ¡Äina", + "la": "latinÅ¡Äina", + "lad": "ladinÅ¡Äina", + "lag": "langijÅ¡Äina", + "lah": "landa", + "lam": "lamba", + "lb": "luksemburÅ¡Äina", + "lez": "lezginÅ¡Äina", + "lg": "ganda", + "li": "limburÅ¡Äina", + "lkt": "lakotÅ¡Äina", + "ln": "lingala", + "lo": "laoÅ¡Äina", + "lol": "mongo", + "loz": "lozi", + "lrc": "severnolurijÅ¡Äina", + "lt": "litovÅ¡Äina", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luisenÅ¡Äina", + "lun": "lunda", + "luo": "luo", + "lus": "lushai", + "luy": "luhijÅ¡Äina", + "lv": "latvijÅ¡Äina", + "mad": "madurÅ¡Äina", + "mag": "magadÅ¡Äina", + "mai": "maitili", + "mak": "makasarÅ¡Äina", + "man": "mandingo", + "mas": "masajÅ¡Äina", + "mdf": "mokÅ¡avÅ¡Äina", + "mdr": "mandarÅ¡Äina", + "men": "mende", + "mer": "meru", + "mfe": "morisjenÅ¡Äina", + "mg": "malagaÅ¡Äina", + "mga": "srednja irÅ¡Äina", + "mgh": "makuva-meto", + "mgo": "meta", + "mh": "marshallovÅ¡Äina", + "mi": "maorÅ¡Äina", + "mic": "mikmaÅ¡Äina", + "min": "minangkabau", + "mk": "makedonÅ¡Äina", + "ml": "malajalamÅ¡Äina", + "mn": "mongolÅ¡Äina", + "mnc": "mandžurÅ¡Äina", + "mni": "manipurÅ¡Äina", + "moh": "mohoÅ¡Äina", + "mos": "mosijÅ¡Äina", + "mr": "maratÅ¡Äina", + "ms": "malajÅ¡Äina", + "mt": "malteÅ¡Äina", + "mua": "mundang", + "mul": "veÄ jezikov", + "mus": "creekovÅ¡Äina", + "mwl": "mirandeÅ¡Äina", + "mwr": "marvarÅ¡Äina", + "my": "burmanÅ¡Äina", + "myv": "erzjanÅ¡Äina", + "mzn": "mazanderanÅ¡Äina", + "na": "naurujÅ¡Äina", + "nap": "napolitanÅ¡Äina", + "naq": "khoekhoe", + "nb": "knjižna norveÅ¡Äina", + "nd": "severna ndebelÅ¡Äina", + "nds": "nizka nemÅ¡Äina", + "nds_NL": "nizka saÅ¡Äina", + "ne": "nepalÅ¡Äina", + "new": "nevarÅ¡Äina", + "ng": "ndonga", + "nia": "niaÅ¡Äina", + "niu": "niuejÅ¡Äina", + "nl": "nizozemÅ¡Äina", + "nl_BE": "flamÅ¡Äina", + "nmg": "kwasio", + "nn": "novonorveÅ¡Äina", + "nnh": "ngiemboonÅ¡Äina", + "no": "norveÅ¡Äina", + "nog": "nogajÅ¡Äina", + "non": "stara nordijÅ¡Äina", + "nqo": "n’ko", + "nr": "južna ndebelÅ¡Äina", + "nso": "severna sotÅ¡Äina", + "nus": "nuerÅ¡Äina", + "nv": "navajÅ¡Äina", + "nwc": "klasiÄna nevarÅ¡Äina", + "ny": "njanÅ¡Äina", + "nym": "njamveÅ¡Äina", + "nyn": "njankole", + "nyo": "njoro", + "nzi": "nzima", + "oc": "okcitanÅ¡Äina", + "oj": "anaÅ¡inabÅ¡Äina", + "om": "oromo", + "or": "odijÅ¡Äina", + "os": "osetinÅ¡Äina", + "osa": "osage", + "ota": "otomanska turÅ¡Äina", + "pa": "pandžabÅ¡Äina", + "pag": "pangasinanÅ¡Äina", + "pam": "pampanÅ¡Äina", + "pap": "papiamentu", + "pau": "palavanÅ¡Äina", + "pcm": "nigerijski pidžin", + "peo": "stara perzijÅ¡Äina", + "phn": "feniÄanÅ¡Äina", + "pi": "palijÅ¡Äina", + "pl": "poljÅ¡Äina", + "pon": "ponpejÅ¡Äina", + "prg": "stara pruÅ¡Äina", + "pro": "stara provansalÅ¡Äina", + "ps": "paÅ¡tunÅ¡Äina", + "pt": "portugalÅ¡Äina", + "pt_BR": "brazilska portugalÅ¡Äina", + "pt_PT": "iberska portugalÅ¡Äina", + "qu": "keÄuanÅ¡Äina", + "quc": "quiche", + "raj": "radžastanÅ¡Äina", + "rap": "rapanujÅ¡Äina", + "rar": "rarotongÅ¡Äina", + "rm": "retoromanÅ¡Äina", + "rn": "rundÅ¡Äina", + "ro": "romunÅ¡Äina", + "ro_MD": "moldavÅ¡Äina", + "rof": "rombo", + "rom": "romÅ¡Äina", + "root": "rootÅ¡Äina", + "ru": "ruÅ¡Äina", + "rup": "aromunÅ¡Äina", + "rw": "ruandÅ¡Äina", + "rwk": "rwa", + "sa": "sanskrt", + "sad": "sandavÅ¡Äina", + "sah": "jakutÅ¡Äina", + "sam": "samaritanska aramejÅ¡Äina", + "saq": "samburÅ¡Äina", + "sas": "sasaÅ¡Äina", + "sat": "santalÅ¡Äina", + "sba": "ngambajÅ¡Äina", + "sbp": "sangujÅ¡Äina", + "sc": "sardinÅ¡Äina", + "scn": "sicilijanÅ¡Äina", + "sco": "Å¡kotÅ¡Äina", + "sd": "sindÅ¡Äina", + "sdh": "južna kurdÅ¡Äina", + "se": "severna samijÅ¡Äina", + "seh": "sena", + "sel": "selkupÅ¡Äina", + "ses": "koyraboro senni", + "sg": "sango", + "sga": "stara irÅ¡Äina", + "sh": "srbohrvaÅ¡Äina", + "shi": "tahelitska berberÅ¡Äina", + "shn": "Å¡anÅ¡Äina", + "si": "sinhalÅ¡Äina", + "sid": "sidamÅ¡Äina", + "sk": "slovaÅ¡Äina", + "sl": "slovenÅ¡Äina", + "sm": "samoanÅ¡Äina", + "sma": "južna samijÅ¡Äina", + "smj": "luleÅ¡ka samijÅ¡Äina", + "smn": "inarska samijÅ¡Äina", + "sms": "samijÅ¡Äina Skolt", + "sn": "Å¡onÅ¡Äina", + "snk": "soninke", + "so": "somalÅ¡Äina", + "sq": "albanÅ¡Äina", + "sr": "srbÅ¡Äina", + "srn": "surinamska kreolÅ¡Äina", + "srr": "sererÅ¡Äina", + "ss": "svazijÅ¡Äina", + "ssy": "saho", + "st": "sesoto", + "su": "sundanÅ¡Äina", + "suk": "sukuma", + "sus": "susujÅ¡Äina", + "sux": "sumerÅ¡Äina", + "sv": "Å¡vedÅ¡Äina", + "sw": "svahili", + "sw_CD": "kongoÅ¡ka svahilÅ¡Äina", + "swb": "Å¡ikomor", + "syc": "klasiÄna sirÅ¡Äina", + "syr": "sirÅ¡Äina", + "ta": "tamilÅ¡Äina", + "te": "telugijÅ¡Äina", + "tem": "temnejÅ¡Äina", + "teo": "teso", + "tet": "tetumÅ¡Äina", + "tg": "tadžiÅ¡Äina", + "th": "tajÅ¡Äina", + "ti": "tigrajÅ¡Äina", + "tig": "tigrejÅ¡Äina", + "tiv": "tivÅ¡Äina", + "tk": "turkmenÅ¡Äina", + "tkl": "tokelavÅ¡Äina", + "tl": "tagalogÅ¡Äina", + "tlh": "klingonÅ¡Äina", + "tli": "tlingitÅ¡Äina", + "tmh": "tamajaÅ¡Äina", + "tn": "cvanÅ¡Äina", + "to": "tongÅ¡Äina", + "tog": "malavijska tongÅ¡Äina", + "tpi": "tok pisin", + "tr": "turÅ¡Äina", + "trv": "taroko", + "ts": "tsonga", + "tsi": "tsimÅ¡Äina", + "tt": "tatarÅ¡Äina", + "tum": "tumbukÅ¡Äina", + "tvl": "tuvalujÅ¡Äina", + "tw": "tvi", + "twq": "tasawaq", + "ty": "tahitÅ¡Äina", + "tyv": "tuvinÅ¡Äina", + "tzm": "tamaÅ¡ek (srednji atlas)", + "udm": "udmurtÅ¡Äina", + "ug": "ujgurÅ¡Äina", + "uga": "ugaritski jezik", + "uk": "ukrajinÅ¡Äina", + "umb": "umbundÅ¡Äina", + "und": "neznan jezik", + "ur": "urdujÅ¡Äina", + "uz": "uzbeÅ¡Äina", + "vai": "vajÅ¡Äina", + "ve": "venda", + "vi": "vietnamÅ¡Äina", + "vo": "volapuk", + "vot": "votjaÅ¡Äina", + "vun": "vunjo", + "wa": "valonÅ¡Äina", + "wae": "walser", + "wal": "valamÅ¡Äina", + "war": "varajÅ¡Äina", + "was": "vaÅ¡ajÅ¡Äina", + "wbp": "varlpirÅ¡Äina", + "wo": "volofÅ¡Äina", + "xal": "kalmiÅ¡Äina", + "xh": "koÅ¡Äina", + "xog": "sogÅ¡Äina", + "yao": "jaojÅ¡Äina", + "yap": "japÅ¡Äina", + "yav": "jangben", + "ybb": "jembajÅ¡Äina", + "yi": "jidiÅ¡", + "yo": "jorubÅ¡Äina", + "yue": "kantonÅ¡Äina", + "zap": "zapoteÅ¡Äina", + "zbl": "znakovni jezik Bliss", + "zen": "zenaÅ¡Äina", + "zgh": "standardni maroÅ¡ki tamazig", + "zh": "kitajÅ¡Äina", + "zh_Hans": "poenostavljena kitajÅ¡Äina", + "zh_Hant": "tradicionalna kitajÅ¡Äina", + "zu": "zulujÅ¡Äina", + "zun": "zunijÅ¡Äina", + "zxx": "brez jezikoslovne vsebine", + "zza": "zazajÅ¡Äina" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sn.json new file mode 100644 index 0000000000000000000000000000000000000000..f22310e3b129f8615dade3a56705db7a492b734c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sn.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.27.98", + "Names": { + "ak": "chiAkani", + "am": "chiAmaric", + "ar": "chiArabu", + "be": "chiBelarusi", + "bg": "chiBulgarian", + "bn": "chiBengali", + "cs": "chiCzech", + "de": "chiJerimani", + "el": "chiGreek", + "en": "Chirungu", + "es": "chiSpanish", + "fa": "chiPeshiya", + "fr": "chiFurenchi", + "ha": "chiHausa", + "hi": "chiHindi", + "hu": "chiHungari", + "id": "chiIndonesia", + "ig": "chiIgbo", + "it": "chiTariana", + "ja": "chiJapani", + "jv": "chiJava", + "km": "chiKhema", + "ko": "chiKoria", + "ms": "chiMalay", + "my": "chiBurma", + "ne": "chiNepali", + "nl": "chiDutch", + "pa": "chiPunjabi", + "pl": "chiPolish", + "pt": "chiPutukezi", + "ro": "chiRomanian", + "ru": "chiRashiya", + "rw": "chiRwanda", + "sn": "chiShona", + "so": "chiSomali", + "sv": "chiSwedish", + "ta": "chiTamil", + "th": "chiThai", + "tr": "chiTurkish", + "uk": "chiUkrenia", + "ur": "chiUrdu", + "vi": "chiVietnam", + "yo": "chiYoruba", + "zh": "chiChinese", + "zu": "chiZulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/so.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/so.json new file mode 100644 index 0000000000000000000000000000000000000000..2649b046a0f03e979a026c3d338767674277106a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/so.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.27.78", + "Names": { + "ak": "Akan", + "am": "Axmaari", + "ar": "Carabi", + "be": "Beleruusiyaan", + "bg": "Bulgeeriyaan", + "bn": "Bangaali", + "cs": "Jeeg", + "de": "Jarmal", + "el": "Giriik", + "en": "Ingiriisi", + "es": "Isbaanish", + "fa": "Faarisi", + "fr": "Faransiis", + "fy": "Firiisiyan Galbeed", + "ha": "Hawsa", + "hi": "Hindi", + "hu": "Hangariyaan", + "id": "Indunuusiyaan", + "ig": "Igbo", + "it": "Talyaani", + "ja": "Jabbaaniis", + "jv": "Jafaaniis", + "km": "Kamboodhian", + "ko": "Kuuriyaan", + "ms": "Malaay", + "my": "Burmese", + "ne": "Nebaali", + "nl": "Holandays", + "pa": "Bunjaabi", + "pl": "Boolish", + "pt": "Boortaqiis", + "ro": "Romanka", + "ru": "Ruush", + "rw": "Rwanda", + "so": "Soomaali", + "sv": "Swiidhis", + "ta": "Tamiil", + "th": "Taaylandays", + "tr": "Turkish", + "uk": "Yukreeniyaan", + "ur": "Urduu", + "vi": "Fiitnaamays", + "yo": "Yoruuba", + "zh": "Jayniis", + "zu": "Zuulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sq.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sq.json new file mode 100644 index 0000000000000000000000000000000000000000..3f938b335d63e04784f1131024ccfa3066a760ba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sq.json @@ -0,0 +1,403 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "afarisht", + "ab": "abkazisht", + "ace": "akinezisht", + "ada": "andangmeisht", + "ady": "adigisht", + "af": "afrikanisht", + "agq": "agemisht", + "ain": "ajnuisht", + "ak": "akanisht", + "ale": "aleutisht", + "alt": "altaishte jugore", + "am": "amarisht", + "an": "aragonezisht", + "anp": "angikisht", + "ar": "arabisht", + "ar_001": "arabishte standarde moderne", + "arn": "mapuçisht", + "arp": "arapahoisht", + "as": "asamezisht", + "asa": "asuisht", + "ast": "asturisht", + "av": "avarikisht", + "awa": "auadhisht", + "ay": "ajmarisht", + "az": "azerbajxhanisht", + "ba": "bashkirisht", + "ban": "balinezisht", + "bas": "basaisht", + "be": "bjellorusisht", + "bem": "bembaisht", + "bez": "benaisht", + "bg": "bullgarisht", + "bgn": "balokishte perëndimore", + "bho": "boxhpurisht", + "bi": "bislamisht", + "bin": "binisht", + "bla": "siksikaisht", + "bm": "bambarisht", + "bn": "bengalisht", + "bo": "tibetisht", + "br": "bretonisht", + "brx": "bodoisht", + "bs": "boshnjakisht", + "bug": "buginezisht", + "byn": "blinisht", + "ca": "katalonisht", + "ce": "çeçenisht", + "ceb": "sebuanisht", + "cgg": "çigisht", + "ch": "kamoroisht", + "chk": "çukezisht", + "chm": "marisht", + "cho": "çoktauisht", + "chr": "çerokisht", + "chy": "çejenisht", + "ckb": "kurdishte qendrore", + "co": "korsikisht", + "crs": "frëngjishte kreole seselve", + "cs": "çekisht", + "cu": "sllavishte kishe", + "cv": "çuvashisht", + "cy": "uellsisht", + "da": "danisht", + "dak": "dakotisht", + "dar": "darguaisht", + "dav": "tajtaisht", + "de": "gjermanisht", + "de_AT": "gjermanishte austriake", + "de_CH": "gjermanishte zvicerane (dialekti i Alpeve)", + "dgr": "dogribisht", + "dje": "zarmaisht", + "dsb": "sorbishte e poshtme", + "dua": "dualaisht", + "dv": "divehisht", + "dyo": "xhulafonjisht", + "dz": "xhongaisht", + "dzg": "dazagauisht", + "ebu": "embuisht", + "ee": "eveisht", + "efi": "efikisht", + "eka": "ekajukisht", + "el": "greqisht", + "en": "anglisht", + "en_AU": "anglishte australiane", + "en_CA": "anglishte kanadeze", + "en_GB": "anglishte britanike", + "en_US": "anglishte amerikane", + "eo": "esperanto", + "es": "spanjisht", + "es_419": "spanjishte amerikano-latine", + "es_ES": "spanjishte evropiane", + "es_MX": "spanjishte meksikane", + "et": "estonisht", + "eu": "baskisht", + "ewo": "euondoisht", + "fa": "persisht", + "ff": "fulaisht", + "fi": "finlandisht", + "fil": "filipinisht", + "fj": "fixhianisht", + "fo": "faroisht", + "fon": "fonisht", + "fr": "frëngjisht", + "fr_CA": "frëngjishte kanadeze", + "fr_CH": "frëngjishte zvicerane", + "fur": "friulianisht", + "fy": "frizianishte perëndimore", + "ga": "irlandisht", + "gaa": "gaisht", + "gag": "gagauzisht", + "gd": "galishte skoceze", + "gez": "gizisht", + "gil": "gilbertazisht", + "gl": "galicisht", + "gn": "guaranisht", + "gor": "gorontaloisht", + "gsw": "gjermanishte zvicerane", + "gu": "guxharatisht", + "guz": "gusisht", + "gv": "manksisht", + "gwi": "guiçinisht", + "ha": "hausisht", + "haw": "havaisht", + "he": "hebraisht", + "hi": "indisht", + "hil": "hiligajnonisht", + "hmn": "hmongisht", + "hr": "kroatisht", + "hsb": "sorbishte e sipërme", + "ht": "haitisht", + "hu": "hungarisht", + "hup": "hupaisht", + "hy": "armenisht", + "hz": "hereroisht", + "ia": "interlingua", + "iba": "ibanisht", + "ibb": "ibibioisht", + "id": "indonezisht", + "ie": "gjuha oksidentale", + "ig": "igboisht", + "ii": "sishuanisht", + "ilo": "ilokoisht", + "inh": "ingushisht", + "io": "idoisht", + "is": "islandisht", + "it": "italisht", + "iu": "inuktitutisht", + "ja": "japonisht", + "jbo": "lojbanisht", + "jgo": "ngombisht", + "jmc": "maçamisht", + "jv": "javanisht", + "ka": "gjeorgjisht", + "kab": "kabilisht", + "kac": "kaçinisht", + "kaj": "kajeisht", + "kam": "kambaisht", + "kbd": "kabardianisht", + "kcg": "tjapisht", + "kde": "makondisht", + "kea": "kreolishte e Kepit të Gjelbër", + "kfo": "koroisht", + "kha": "kasisht", + "khq": "kojraçinisht", + "ki": "kikujuisht", + "kj": "kuanjamaisht", + "kk": "kazakisht", + "kkj": "kakoisht", + "kl": "kalalisutisht", + "kln": "kalenxhinisht", + "km": "kmerisht", + "kmb": "kimbunduisht", + "kn": "kanadisht", + "ko": "koreanisht", + "koi": "komi-parmjakisht", + "kok": "konkanisht", + "kpe": "kpeleisht", + "kr": "kanurisht", + "krc": "karaçaj-balkarisht", + "krl": "karelianisht", + "kru": "kurukisht", + "ks": "kashmirisht", + "ksb": "shambalisht", + "ksf": "bafianisht", + "ksh": "këlnisht", + "ku": "kurdisht", + "kum": "kumikisht", + "kv": "komisht", + "kw": "kornisht", + "ky": "kirgizisht", + "la": "latinisht", + "lad": "ladinoisht", + "lag": "langisht", + "lb": "luksemburgisht", + "lez": "lezgianisht", + "lg": "gandaisht", + "li": "limburgisht", + "lkt": "lakotisht", + "ln": "lingalisht", + "lo": "laosisht", + "loz": "lozisht", + "lrc": "lurishte veriore", + "lt": "lituanisht", + "lu": "luba-katangaisht", + "lua": "luba-luluaisht", + "lun": "lundaisht", + "luo": "luoisht", + "lus": "mizoisht", + "luy": "lujaisht", + "lv": "letonisht", + "mad": "madurezisht", + "mag": "magaisht", + "mai": "maitilisht", + "mak": "makasarisht", + "mas": "masaisht", + "mdf": "mokshaisht", + "men": "mendisht", + "mer": "meruisht", + "mfe": "morisjenisht", + "mg": "malagezisht", + "mgh": "makua-mitoisht", + "mgo": "metaisht", + "mh": "marshallisht", + "mi": "maorisht", + "mic": "mikmakisht", + "min": "minangkabauisht", + "mk": "maqedonisht", + "ml": "malajalamisht", + "mn": "mongolisht", + "mni": "manipurisht", + "moh": "mohokisht", + "mos": "mosisht", + "mr": "maratisht", + "ms": "malajisht", + "mt": "maltisht", + "mua": "mundangisht", + "mul": "gjuhë të shumëfishta", + "mus": "krikisht", + "mwl": "mirandisht", + "my": "birmanisht", + "myv": "erzjaisht", + "mzn": "mazanderanisht", + "na": "nauruisht", + "nap": "napoletanisht", + "naq": "namaisht", + "nb": "norvegjishte letrare", + "nd": "ndebelishte veriore", + "nds": "gjermanishte e vendeve të ulëta", + "nds_NL": "gjermanishte saksone e vendeve të ulëta", + "ne": "nepalisht", + "new": "neuarisht", + "ng": "ndongaisht", + "nia": "niasisht", + "niu": "niueanisht", + "nl": "holandisht", + "nl_BE": "flamandisht", + "nmg": "kuasisht", + "nn": "norvegjishte nynorsk", + "nnh": "ngiembunisht", + "no": "norvegjisht", + "nog": "nogajisht", + "nqo": "nkoisht", + "nr": "ndebelishte jugore", + "nso": "sotoishte veriore", + "nus": "nuerisht", + "nv": "navahoisht", + "ny": "nianjisht", + "nyn": "niankolisht", + "oc": "oksitanisht", + "om": "oromoisht", + "or": "odisht", + "os": "osetisht", + "pa": "panxhabisht", + "pag": "pangasinanisht", + "pam": "pampangaisht", + "pap": "papiamentisht", + "pau": "paluanisht", + "pcm": "pixhinishte nigeriane", + "pl": "polonisht", + "prg": "prusisht", + "ps": "pashtoisht", + "pt": "portugalisht", + "pt_BR": "portugalishte braziliane", + "pt_PT": "portugalishte evropiane", + "qu": "keçuaisht", + "quc": "kiçeisht", + "rap": "rapanuisht", + "rar": "rarontonganisht", + "rm": "retoromanisht", + "rn": "rundisht", + "ro": "rumanisht", + "ro_MD": "moldavisht", + "rof": "romboisht", + "root": "rutisht", + "ru": "rusisht", + "rup": "arumune", + "rw": "kiniaruandisht", + "rwk": "ruaisht", + "sa": "sanskritisht", + "sad": "sandauisht", + "sah": "sakaisht", + "saq": "samburisht", + "sat": "santalisht", + "sba": "ngambajisht", + "sbp": "sanguisht", + "sc": "sardenjisht", + "scn": "siçilianisht", + "sco": "skotisht", + "sd": "sindisht", + "sdh": "kurdishte jugore", + "se": "samishte veriore", + "seh": "senaisht", + "ses": "senishte kojrabore", + "sg": "sangoisht", + "sh": "serbo-kroatisht", + "shi": "taçelitisht", + "shn": "shanisht", + "si": "sinhalisht", + "sk": "sllovakisht", + "sl": "sllovenisht", + "sm": "samoanisht", + "sma": "samishte jugore", + "smj": "samishte lule", + "smn": "samishte inari", + "sms": "samishte skolti", + "sn": "shonisht", + "snk": "soninkisht", + "so": "somalisht", + "sq": "shqip", + "sr": "serbisht", + "srn": "srananisht (sranantongoisht)", + "ss": "suatisht", + "ssy": "sahoisht", + "st": "sotoishte jugore", + "su": "sundanisht", + "suk": "sukumaisht", + "sv": "suedisht", + "sw": "suahilisht", + "sw_CD": "suahilishte kongoje", + "swb": "kamorianisht", + "syr": "siriakisht", + "ta": "tamilisht", + "te": "teluguisht", + "tem": "timneisht", + "teo": "tesoisht", + "tet": "tetumisht", + "tg": "taxhikisht", + "th": "tajlandisht", + "ti": "tigrinjaisht", + "tig": "tigreisht", + "tk": "turkmenisht", + "tlh": "klingonisht", + "tn": "cuanaisht", + "to": "tonganisht", + "tpi": "pisinishte toku", + "tr": "turqisht", + "trv": "torokoisht", + "ts": "congaisht", + "tt": "tatarisht", + "tum": "tumbukaisht", + "tvl": "tuvaluisht", + "tw": "tuisht", + "twq": "tasavakisht", + "ty": "tahitisht", + "tyv": "tuvinianisht", + "tzm": "tamaziatishte atlase qendrore", + "udm": "udmurtisht", + "ug": "ujgurisht", + "uk": "ukrainisht", + "umb": "umbunduisht", + "und": "e panjohur", + "ur": "urduisht", + "uz": "uzbekisht", + "vai": "vaisht", + "ve": "vendaisht", + "vi": "vietnamisht", + "vo": "volapykisht", + "vun": "vunxhoisht", + "wa": "ualunisht", + "wae": "ualserisht", + "wal": "ulajtaisht", + "war": "uarajisht", + "wbp": "uarlpirisht", + "wo": "ulufisht", + "xal": "kalmikisht", + "xh": "kosaisht", + "xog": "sogisht", + "yav": "jangbenisht", + "ybb": "jembaisht", + "yi": "jidisht", + "yo": "jorubaisht", + "yue": "kantonezisht", + "zgh": "tamaziatishte standarde marokene", + "zh": "kinezisht", + "zu": "zuluisht", + "zun": "zunisht", + "zxx": "nuk ka përmbajtje gjuhësore", + "zza": "zazaisht" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr.json new file mode 100644 index 0000000000000000000000000000000000000000..764d853d5c82fd96aa6f3ddf62c03173ed3bf700 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr.json @@ -0,0 +1,507 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "афарÑки", + "ab": "абхаÑки", + "ace": "ацешки", + "ach": "аколи", + "ada": "адангме", + "ady": "адигејÑки", + "ae": "авеÑтанÑки", + "af": "африканÑ", + "afh": "африхили", + "agq": "агем", + "ain": "аину", + "ak": "аканÑки", + "akk": "акадијÑки", + "ale": "алеутÑки", + "alt": "јужноалтајÑки", + "am": "амхарÑки", + "an": "арагонÑки", + "ang": "ÑтароенглеÑки", + "anp": "ангика", + "ar": "арапÑки", + "ar_001": "Ñавремени Ñтандардни арапÑки", + "arc": "арамејÑки", + "arn": "мапуче", + "arp": "арапахо", + "arw": "аравачки", + "as": "аÑамÑки", + "asa": "аÑу", + "ast": "аÑтуријÑки", + "av": "аварÑки", + "awa": "авади", + "ay": "ајмара", + "az": "азербејџанÑки", + "ba": "башкирÑки", + "bal": "белучки", + "ban": "балијÑки", + "bas": "баÑа", + "be": "белоруÑки", + "bej": "беџа", + "bem": "бемба", + "bez": "бена", + "bg": "бугарÑки", + "bgn": "западни белучки", + "bho": "боџпури", + "bi": "биÑлама", + "bik": "бикол", + "bin": "бини", + "bla": "ÑиÑика", + "bm": "бамбара", + "bn": "бенгалÑки", + "bo": "тибетанÑки", + "br": "бретонÑки", + "bra": "брај", + "brx": "бодо", + "bs": "боÑанÑки", + "bua": "бурјатÑки", + "bug": "бугијÑки", + "byn": "блинÑки", + "ca": "каталонÑки", + "cad": "кадо", + "car": "карипÑки", + "cch": "атÑам", + "ce": "чеченÑки", + "ceb": "ÑебуанÑки", + "cgg": "чига", + "ch": "чаморо", + "chb": "чипча", + "chg": "чагатај", + "chk": "чучки", + "chm": "мари", + "chn": "чинучки", + "cho": "чоктавÑки", + "chp": "чипевјанÑки", + "chr": "чероки", + "chy": "чејенÑки", + "ckb": "централни курдÑки", + "co": "корзиканÑки", + "cop": "коптÑки", + "cr": "кри", + "crh": "кримÑкотатарÑки", + "crs": "ÑејшелÑки креолÑки француÑки", + "cs": "чешки", + "csb": "кашупÑки", + "cu": "црквеноÑловенÑки", + "cv": "чувашки", + "cy": "велшки", + "da": "данÑки", + "dak": "дакота", + "dar": "даргинÑки", + "dav": "таита", + "de": "немачки", + "de_CH": "швајцарÑки виÑоки немачки", + "del": "делаверÑки", + "den": "Ñлејви", + "dgr": "догрипÑки", + "din": "динка", + "dje": "зарма", + "doi": "догри", + "dsb": "доњи лужичкоÑрпÑки", + "dua": "дуала", + "dum": "ÑредњехоландÑки", + "dv": "малдивÑки", + "dyo": "џола фоњи", + "dyu": "ђула", + "dz": "џонга", + "dzg": "дазага", + "ebu": "ембу", + "ee": "еве", + "efi": "ефички", + "egy": "ÑтароегипатÑки", + "eka": "екаџук", + "el": "грчки", + "elx": "еламитÑки", + "en": "енглеÑки", + "en_GB": "енглеÑки (Велика Британија)", + "en_US": "енглеÑки (Сједињене Ðмеричке Државе)", + "enm": "ÑредњеенглеÑки", + "eo": "еÑперанто", + "es": "шпанÑки", + "et": "еÑтонÑки", + "eu": "баÑкијÑки", + "ewo": "евондо", + "fa": "перÑијÑки", + "fan": "фанг", + "fat": "фанти", + "ff": "фула", + "fi": "финÑки", + "fil": "филипинÑки", + "fj": "фиџијÑки", + "fo": "фарÑки", + "fon": "фон", + "fr": "француÑки", + "frm": "ÑредњефранцуÑки", + "fro": "ÑтарофранцуÑки", + "frr": "ÑевернофризијÑки", + "frs": "иÑточнофризијÑки", + "fur": "фриулÑки", + "fy": "западни фризијÑки", + "ga": "ирÑки", + "gaa": "га", + "gag": "гагауз", + "gay": "гајо", + "gba": "гбаја", + "gd": "шкотÑки гелÑки", + "gez": "геез", + "gil": "гилбертÑки", + "gl": "галицијÑки", + "gmh": "Ñредњи виÑоконемачки", + "gn": "гварани", + "goh": "Ñтаронемачки", + "gon": "гонди", + "gor": "горонтало", + "got": "готÑки", + "grb": "гребо", + "grc": "Ñтарогрчки", + "gsw": "ШвајцарÑки немачки", + "gu": "гуџарати", + "guz": "гуÑи", + "gv": "манкÑ", + "gwi": "гвичинÑки", + "ha": "хауÑа", + "hai": "хаида", + "haw": "хавајÑки", + "he": "хебрејÑки", + "hi": "хинди", + "hil": "хилигајнонÑки", + "hit": "хетитÑки", + "hmn": "хмоншки", + "ho": "хири моту", + "hr": "хрватÑки", + "hsb": "горњи лужичкоÑрпÑки", + "ht": "хаићанÑки", + "hu": "мађарÑки", + "hup": "хупа", + "hy": "јерменÑки", + "hz": "хереро", + "ia": "интерлингва", + "iba": "ибанÑки", + "ibb": "ибибио", + "id": "индонежанÑки", + "ie": "интерлингве", + "ig": "игбо", + "ii": "ÑечуанÑки ји", + "ik": "инупик", + "ilo": "илоко", + "inh": "ингушки", + "io": "идо", + "is": "иÑландÑки", + "it": "италијанÑки", + "iu": "инуитÑки", + "ja": "јапанÑки", + "jbo": "ложбан", + "jgo": "нгомба", + "jmc": "мачаме", + "jpr": "јудео-перÑијÑки", + "jrb": "јудео-арапÑки", + "jv": "јаванÑки", + "ka": "грузијÑки", + "kaa": "кара-калпашки", + "kab": "кабиле", + "kac": "качинÑки", + "kaj": "џу", + "kam": "камба", + "kaw": "кави", + "kbd": "кабардијÑки", + "kcg": "тјап", + "kde": "маконде", + "kea": "зеленортÑки", + "kfo": "коро", + "kg": "конго", + "kha": "каÑи", + "kho": "котанешки", + "khq": "којра чиини", + "ki": "кикују", + "kj": "квањама", + "kk": "казашки", + "kkj": "како", + "kl": "гренландÑки", + "kln": "каленџинÑки", + "km": "кмерÑки", + "kmb": "кимбунду", + "kn": "канада", + "ko": "корејÑки", + "koi": "коми-пермÑки", + "kok": "конкани", + "kos": "коÑренÑки", + "kpe": "кпеле", + "kr": "канури", + "krc": "карачајÑко-балкарÑки", + "kri": "крио", + "krl": "карелÑки", + "kru": "курук", + "ks": "кашмирÑки", + "ksb": "шамбала", + "ksf": "бафија", + "ksh": "келнÑки", + "ku": "курдÑки", + "kum": "кумички", + "kut": "кутенај", + "kv": "коми", + "kw": "корнволÑки", + "ky": "киргиÑки", + "la": "латинÑки", + "lad": "ладино", + "lag": "ланги", + "lah": "ланда", + "lam": "ламба", + "lb": "лукÑембуршки", + "lez": "лезгинÑки", + "lg": "ганда", + "li": "лимбуршки", + "lkt": "лакота", + "ln": "лингала", + "lo": "лаоÑки", + "lol": "монго", + "loz": "лози", + "lrc": "Ñеверни лури", + "lt": "литванÑки", + "lu": "луба-катанга", + "lua": "луба-лулуа", + "lui": "луиÑењо", + "lun": "лунда", + "luo": "луо", + "lus": "мизо", + "luy": "лујиа", + "lv": "летонÑки", + "mad": "мадурÑки", + "mag": "магахи", + "mai": "маитили", + "mak": "макаÑарÑки", + "man": "мандинго", + "mas": "маÑајÑки", + "mdf": "мокша", + "mdr": "мандар", + "men": "менде", + "mer": "меру", + "mfe": "мориÑјен", + "mg": "малгашки", + "mga": "ÑредњеирÑки", + "mgh": "макува-мито", + "mgo": "мета", + "mh": "маршалÑки", + "mi": "маорÑки", + "mic": "микмак", + "min": "минангкабау", + "mk": "македонÑки", + "ml": "малајалам", + "mn": "монголÑки", + "mnc": "манџурÑки", + "mni": "манипурÑки", + "moh": "мохочки", + "mos": "моÑи", + "mr": "марати", + "ms": "малајÑки", + "mt": "малтешки", + "mua": "мунданг", + "mul": "Више језика", + "mus": "кришки", + "mwl": "мирандÑки", + "mwr": "марвари", + "my": "бурманÑки", + "myv": "ерзја", + "mzn": "мазандеранÑки", + "na": "науруÑки", + "nap": "напуљÑки", + "naq": "нама", + "nb": "норвешки букмол", + "nd": "Ñеверни ндебеле", + "nds": "ниÑконемачки", + "nds_NL": "ниÑкоÑакÑонÑки", + "ne": "непалÑки", + "new": "невари", + "ng": "ндонга", + "nia": "ниаÑ", + "niu": "ниуејÑки", + "nl": "холандÑки", + "nl_BE": "фламанÑки", + "nmg": "кваÑио", + "nn": "норвешки нинорÑк", + "nnh": "нгиембун", + "no": "норвешки", + "nog": "ногајÑки", + "non": "ÑтаронордијÑки", + "nqo": "нко", + "nr": "јужни ндебеле", + "nso": "Ñеверни Ñото", + "nus": "нуер", + "nv": "навахо", + "nwc": "клаÑични неварÑки", + "ny": "њанџа", + "nym": "њамвези", + "nyn": "њанколе", + "nyo": "њоро", + "nzi": "нзима", + "oc": "окÑитанÑки", + "oj": "оџибве", + "om": "оромо", + "or": "одија", + "os": "оÑетинÑки", + "osa": "оÑаге", + "ota": "оÑманÑки турÑки", + "pa": "пенџапÑки", + "pag": "пангаÑинанÑки", + "pal": "пахлави", + "pam": "пампанга", + "pap": "папиаменто", + "pau": "палауÑки", + "pcm": "нигеријÑки пиџин", + "peo": "ÑтароперÑијÑки", + "phn": "феничанÑки", + "pi": "пали", + "pl": "пољÑки", + "pon": "понпејÑки", + "prg": "пруÑки", + "pro": "ÑтароокÑитанÑки", + "ps": "паштунÑки", + "pt": "португалÑки", + "pt_PT": "португалÑки (Португал)", + "qu": "кечуа", + "quc": "киче", + "raj": "раџаÑтанÑки", + "rap": "рапануи", + "rar": "раротонганÑки", + "rm": "романш", + "rn": "кирунди", + "ro": "румунÑки", + "ro_MD": "молдавÑки", + "rof": "ромбо", + "rom": "ромÑки", + "root": "Рут", + "ru": "руÑки", + "rup": "цинцарÑки", + "rw": "кињаруанда", + "rwk": "руа", + "sa": "ÑанÑкрит", + "sad": "Ñандаве", + "sah": "јакутÑки", + "sam": "ÑамаријанÑки арамејÑки", + "saq": "Ñамбуру", + "sas": "ÑаÑак", + "sat": "Ñантали", + "sba": "нгамбај", + "sbp": "Ñангу", + "sc": "ÑардинÑки", + "scn": "ÑицилијанÑки", + "sco": "шкотÑки", + "sd": "Ñинди", + "sdh": "јужнокурдÑки", + "se": "Ñеверни Ñами", + "seh": "Ñена", + "sel": "ÑелкупÑки", + "ses": "којраборо Ñени", + "sg": "Ñанго", + "sga": "ÑтароирÑки", + "sh": "ÑрпÑкохрватÑки", + "shi": "ташелхит", + "shn": "шанÑки", + "si": "Ñинхалешки", + "sid": "Ñидамо", + "sk": "Ñловачки", + "sl": "Ñловеначки", + "sm": "ÑамоанÑки", + "sma": "јужни Ñами", + "smj": "луле Ñами", + "smn": "инари Ñами", + "sms": "ÑколтÑки лапонÑки", + "sn": "шона", + "snk": "Ñонинке", + "so": "ÑомалÑки", + "sog": "ÑогдијÑки", + "sq": "албанÑки", + "sr": "ÑрпÑки", + "srn": "Ñранан тонго", + "srr": "ÑерерÑки", + "ss": "Ñвази", + "ssy": "Ñахо", + "st": "ÑеÑото", + "su": "ÑунданÑки", + "suk": "Ñукума", + "sus": "ÑуÑу", + "sux": "ÑумерÑки", + "sv": "шведÑки", + "sw": "Ñвахили", + "sw_CD": "киÑвахили", + "swb": "коморÑки", + "syc": "Ñиријачки", + "syr": "ÑиријÑки", + "ta": "тамилÑки", + "te": "телугу", + "tem": "тимне", + "teo": "теÑо", + "ter": "терено", + "tet": "тетум", + "tg": "таџички", + "th": "тајÑки", + "ti": "тигриња", + "tig": "тигре", + "tiv": "тив", + "tk": "туркменÑки", + "tkl": "токелау", + "tl": "тагалог", + "tlh": "клингонÑки", + "tli": "тлингит", + "tmh": "тамашек", + "tn": "цвана", + "to": "тонганÑки", + "tog": "њаÑа тонга", + "tpi": "ток пиÑин", + "tr": "турÑки", + "trv": "тароко", + "ts": "цонга", + "tsi": "цимшиан", + "tt": "татарÑки", + "tum": "тумбука", + "tvl": "тувалу", + "tw": "тви", + "twq": "таÑавак", + "ty": "тахићанÑки", + "tyv": "тувинÑки", + "tzm": "централноатлаÑки тамазигт", + "udm": "удмуртÑки", + "ug": "ујгурÑки", + "uga": "угаритÑки", + "uk": "украјинÑки", + "umb": "умбунду", + "und": "непознат језик", + "ur": "урду", + "uz": "узбечки", + "vai": "ваи", + "ve": "венда", + "vi": "вијетнамÑки", + "vo": "волапик", + "vot": "водÑки", + "vun": "вунџо", + "wa": "валонÑки", + "wae": "валÑерÑки", + "wal": "волајта", + "war": "варајÑки", + "was": "вашо", + "wbp": "варлпири", + "wo": "волоф", + "xal": "калмички", + "xh": "коÑа", + "xog": "Ñога", + "yao": "јао", + "yap": "јапÑки", + "yav": "јангбен", + "ybb": "јемба", + "yi": "јидиш", + "yo": "јоруба", + "yue": "кантонÑки", + "za": "џуаншки", + "zap": "запотечки", + "zbl": "блиÑимболи", + "zen": "зенага", + "zgh": "Ñтандардни мароканÑки тамазигт", + "zh": "кинеÑки", + "zh_Hans": "поједноÑтављени кинеÑки", + "zh_Hant": "традиционални кинеÑки", + "zu": "зулу", + "zun": "зуни", + "zxx": "без лингвиÑтичког Ñадржаја", + "zza": "заза" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..8949e45179a2138fa3cf1d205a7c3008a445df20 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_BA.json @@ -0,0 +1,20 @@ +{ + "Version": "2.1.27.99", + "Names": { + "arn": "мапудунгун", + "be": "бјелоруÑки", + "bm": "бамананкан", + "bn": "бангла", + "gsw": "швајцарÑки немачки", + "ht": "хаићанÑки креолÑки", + "lo": "лаошки", + "moh": "мохок", + "nqo": "н’ко", + "shi": "јужни шилха", + "si": "ÑинхалÑки", + "tzm": "централноатлаÑки тамашек", + "xh": "иÑикоÑа", + "zgh": "Ñтандардни мароканÑки тамашек", + "zu": "иÑизулу" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Cyrl_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Cyrl_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..8949e45179a2138fa3cf1d205a7c3008a445df20 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Cyrl_BA.json @@ -0,0 +1,20 @@ +{ + "Version": "2.1.27.99", + "Names": { + "arn": "мапудунгун", + "be": "бјелоруÑки", + "bm": "бамананкан", + "bn": "бангла", + "gsw": "швајцарÑки немачки", + "ht": "хаићанÑки креолÑки", + "lo": "лаошки", + "moh": "мохок", + "nqo": "н’ко", + "shi": "јужни шилха", + "si": "ÑинхалÑки", + "tzm": "централноатлаÑки тамашек", + "xh": "иÑикоÑа", + "zgh": "Ñтандардни мароканÑки тамашек", + "zu": "иÑизулу" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Cyrl_ME.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Cyrl_ME.json new file mode 100644 index 0000000000000000000000000000000000000000..5519983d021a05ef8395a6b2c3ce7d73d4577cb9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Cyrl_ME.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "arn": "мапудунгун", + "be": "бјелоруÑки", + "bm": "бамананкан", + "bn": "бангла", + "ff": "фулах", + "ht": "хаићанÑки креолÑки", + "lo": "лаошки", + "moh": "мохок", + "nqo": "н’ко", + "shi": "јужни шилха", + "tzm": "централноатлаÑки тамашек", + "xh": "иÑикоÑа", + "zgh": "Ñтандардни мароканÑки тамашек", + "zu": "иÑизулу" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Cyrl_XK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Cyrl_XK.json new file mode 100644 index 0000000000000000000000000000000000000000..62cc878970c770378c9e157d6f2e1b776bc6ef7f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Cyrl_XK.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "bm": "бамананкан", + "bn": "бангла", + "ff": "фулах", + "gsw": "швајцарÑки немачки", + "ht": "хаићанÑки креолÑки", + "lo": "лаошки", + "moh": "мохок", + "nqo": "н’ко", + "shi": "јужни шилха", + "si": "ÑинхалÑки", + "tzm": "централноатлаÑки тамашек", + "xh": "иÑикоÑа", + "zgh": "Ñтандардни мароканÑки тамашек", + "zu": "иÑизулу" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Latn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Latn.json new file mode 100644 index 0000000000000000000000000000000000000000..7ee03cd9195fdd6b69888b7bc3f61ec99a4065ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Latn.json @@ -0,0 +1,507 @@ +{ + "Version": "2.1.29.33", + "Names": { + "aa": "afarski", + "ab": "abhaski", + "ace": "aceÅ¡ki", + "ach": "akoli", + "ada": "adangme", + "ady": "adigejski", + "ae": "avestanski", + "af": "afrikans", + "afh": "afrihili", + "agq": "agem", + "ain": "ainu", + "ak": "akanski", + "akk": "akadijski", + "ale": "aleutski", + "alt": "južnoaltajski", + "am": "amharski", + "an": "aragonski", + "ang": "staroengleski", + "anp": "angika", + "ar": "arapski", + "ar_001": "savremeni standardni arapski", + "arc": "aramejski", + "arn": "mapuÄe", + "arp": "arapaho", + "arw": "aravaÄki", + "as": "asamski", + "asa": "asu", + "ast": "asturijski", + "av": "avarski", + "awa": "avadi", + "ay": "ajmara", + "az": "azerbejdžanski", + "ba": "baÅ¡kirski", + "bal": "beluÄki", + "ban": "balijski", + "bas": "basa", + "be": "beloruski", + "bej": "bedža", + "bem": "bemba", + "bez": "bena", + "bg": "bugarski", + "bgn": "zapadni beluÄki", + "bho": "bodžpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bla": "sisika", + "bm": "bambara", + "bn": "bengalski", + "bo": "tibetanski", + "br": "bretonski", + "bra": "braj", + "brx": "bodo", + "bs": "bosanski", + "bua": "burjatski", + "bug": "bugijski", + "byn": "blinski", + "ca": "katalonski", + "cad": "kado", + "car": "karipski", + "cch": "atsam", + "ce": "ÄeÄenski", + "ceb": "sebuanski", + "cgg": "Äiga", + "ch": "Äamoro", + "chb": "ÄipÄa", + "chg": "Äagataj", + "chk": "ÄuÄki", + "chm": "mari", + "chn": "ÄinuÄki", + "cho": "Äoktavski", + "chp": "Äipevjanski", + "chr": "Äeroki", + "chy": "Äejenski", + "ckb": "centralni kurdski", + "co": "korzikanski", + "cop": "koptski", + "cr": "kri", + "crh": "krimskotatarski", + "crs": "sejÅ¡elski kreolski francuski", + "cs": "ÄeÅ¡ki", + "csb": "kaÅ¡upski", + "cu": "crkvenoslovenski", + "cv": "ÄuvaÅ¡ki", + "cy": "velÅ¡ki", + "da": "danski", + "dak": "dakota", + "dar": "darginski", + "dav": "taita", + "de": "nemaÄki", + "de_CH": "Å¡vajcarski visoki nemaÄki", + "del": "delaverski", + "den": "slejvi", + "dgr": "dogripski", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "donji lužiÄkosrpski", + "dua": "duala", + "dum": "srednjeholandski", + "dv": "maldivski", + "dyo": "džola fonji", + "dyu": "Ä‘ula", + "dz": "džonga", + "dzg": "dazaga", + "ebu": "embu", + "ee": "eve", + "efi": "efiÄki", + "egy": "staroegipatski", + "eka": "ekadžuk", + "el": "grÄki", + "elx": "elamitski", + "en": "engleski", + "en_GB": "engleski (Velika Britanija)", + "en_US": "engleski (Sjedinjene AmeriÄke Države)", + "enm": "srednjeengleski", + "eo": "esperanto", + "es": "Å¡panski", + "et": "estonski", + "eu": "baskijski", + "ewo": "evondo", + "fa": "persijski", + "fan": "fang", + "fat": "fanti", + "ff": "fula", + "fi": "finski", + "fil": "filipinski", + "fj": "fidžijski", + "fo": "farski", + "fon": "fon", + "fr": "francuski", + "frm": "srednjefrancuski", + "fro": "starofrancuski", + "frr": "severnofrizijski", + "frs": "istoÄnofrizijski", + "fur": "friulski", + "fy": "zapadni frizijski", + "ga": "irski", + "gaa": "ga", + "gag": "gagauz", + "gay": "gajo", + "gba": "gbaja", + "gd": "Å¡kotski gelski", + "gez": "geez", + "gil": "gilbertski", + "gl": "galicijski", + "gmh": "srednji visokonemaÄki", + "gn": "gvarani", + "goh": "staronemaÄki", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotski", + "grb": "grebo", + "grc": "starogrÄki", + "gsw": "Å vajcarski nemaÄki", + "gu": "gudžarati", + "guz": "gusi", + "gv": "manks", + "gwi": "gviÄinski", + "ha": "hausa", + "hai": "haida", + "haw": "havajski", + "he": "hebrejski", + "hi": "hindi", + "hil": "hiligajnonski", + "hit": "hetitski", + "hmn": "hmonÅ¡ki", + "ho": "hiri motu", + "hr": "hrvatski", + "hsb": "gornji lužiÄkosrpski", + "ht": "haićanski", + "hu": "maÄ‘arski", + "hup": "hupa", + "hy": "jermenski", + "hz": "herero", + "ia": "interlingva", + "iba": "ibanski", + "ibb": "ibibio", + "id": "indonežanski", + "ie": "interlingve", + "ig": "igbo", + "ii": "seÄuanski ji", + "ik": "inupik", + "ilo": "iloko", + "inh": "inguÅ¡ki", + "io": "ido", + "is": "islandski", + "it": "italijanski", + "iu": "inuitski", + "ja": "japanski", + "jbo": "ložban", + "jgo": "ngomba", + "jmc": "maÄame", + "jpr": "judeo-persijski", + "jrb": "judeo-arapski", + "jv": "javanski", + "ka": "gruzijski", + "kaa": "kara-kalpaÅ¡ki", + "kab": "kabile", + "kac": "kaÄinski", + "kaj": "džu", + "kam": "kamba", + "kaw": "kavi", + "kbd": "kabardijski", + "kcg": "tjap", + "kde": "makonde", + "kea": "zelenortski", + "kfo": "koro", + "kg": "kongo", + "kha": "kasi", + "kho": "kotaneÅ¡ki", + "khq": "kojra Äiini", + "ki": "kikuju", + "kj": "kvanjama", + "kk": "kazaÅ¡ki", + "kkj": "kako", + "kl": "grenlandski", + "kln": "kalendžinski", + "km": "kmerski", + "kmb": "kimbundu", + "kn": "kanada", + "ko": "korejski", + "koi": "komi-permski", + "kok": "konkani", + "kos": "kosrenski", + "kpe": "kpele", + "kr": "kanuri", + "krc": "karaÄajsko-balkarski", + "kri": "krio", + "krl": "karelski", + "kru": "kuruk", + "ks": "kaÅ¡mirski", + "ksb": "Å¡ambala", + "ksf": "bafija", + "ksh": "kelnski", + "ku": "kurdski", + "kum": "kumiÄki", + "kut": "kutenaj", + "kv": "komi", + "kw": "kornvolski", + "ky": "kirgiski", + "la": "latinski", + "lad": "ladino", + "lag": "langi", + "lah": "landa", + "lam": "lamba", + "lb": "luksemburÅ¡ki", + "lez": "lezginski", + "lg": "ganda", + "li": "limburÅ¡ki", + "lkt": "lakota", + "ln": "lingala", + "lo": "laoski", + "lol": "mongo", + "loz": "lozi", + "lrc": "severni luri", + "lt": "litvanski", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luisenjo", + "lun": "lunda", + "luo": "luo", + "lus": "mizo", + "luy": "lujia", + "lv": "letonski", + "mad": "madurski", + "mag": "magahi", + "mai": "maitili", + "mak": "makasarski", + "man": "mandingo", + "mas": "masajski", + "mdf": "mokÅ¡a", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "morisjen", + "mg": "malgaÅ¡ki", + "mga": "srednjeirski", + "mgh": "makuva-mito", + "mgo": "meta", + "mh": "marÅ¡alski", + "mi": "maorski", + "mic": "mikmak", + "min": "minangkabau", + "mk": "makedonski", + "ml": "malajalam", + "mn": "mongolski", + "mnc": "mandžurski", + "mni": "manipurski", + "moh": "mohoÄki", + "mos": "mosi", + "mr": "marati", + "ms": "malajski", + "mt": "malteÅ¡ki", + "mua": "mundang", + "mul": "ViÅ¡e jezika", + "mus": "kriÅ¡ki", + "mwl": "mirandski", + "mwr": "marvari", + "my": "burmanski", + "myv": "erzja", + "mzn": "mazanderanski", + "na": "nauruski", + "nap": "napuljski", + "naq": "nama", + "nb": "norveÅ¡ki bukmol", + "nd": "severni ndebele", + "nds": "niskonemaÄki", + "nds_NL": "niskosaksonski", + "ne": "nepalski", + "new": "nevari", + "ng": "ndonga", + "nia": "nias", + "niu": "niuejski", + "nl": "holandski", + "nl_BE": "flamanski", + "nmg": "kvasio", + "nn": "norveÅ¡ki ninorsk", + "nnh": "ngiembun", + "no": "norveÅ¡ki", + "nog": "nogajski", + "non": "staronordijski", + "nqo": "nko", + "nr": "južni ndebele", + "nso": "severni soto", + "nus": "nuer", + "nv": "navaho", + "nwc": "klasiÄni nevarski", + "ny": "njandža", + "nym": "njamvezi", + "nyn": "njankole", + "nyo": "njoro", + "nzi": "nzima", + "oc": "oksitanski", + "oj": "odžibve", + "om": "oromo", + "or": "odija", + "os": "osetinski", + "osa": "osage", + "ota": "osmanski turski", + "pa": "pendžapski", + "pag": "pangasinanski", + "pal": "pahlavi", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palauski", + "pcm": "nigerijski pidžin", + "peo": "staropersijski", + "phn": "feniÄanski", + "pi": "pali", + "pl": "poljski", + "pon": "ponpejski", + "prg": "pruski", + "pro": "starooksitanski", + "ps": "paÅ¡tunski", + "pt": "portugalski", + "pt_PT": "portugalski (Portugal)", + "qu": "keÄua", + "quc": "kiÄe", + "raj": "radžastanski", + "rap": "rapanui", + "rar": "rarotonganski", + "rm": "romanÅ¡", + "rn": "kirundi", + "ro": "rumunski", + "ro_MD": "moldavski", + "rof": "rombo", + "rom": "romski", + "root": "Rut", + "ru": "ruski", + "rup": "cincarski", + "rw": "kinjaruanda", + "rwk": "rua", + "sa": "sanskrit", + "sad": "sandave", + "sah": "jakutski", + "sam": "samarijanski aramejski", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "sba": "ngambaj", + "sbp": "sangu", + "sc": "sardinski", + "scn": "sicilijanski", + "sco": "Å¡kotski", + "sd": "sindi", + "sdh": "južnokurdski", + "se": "severni sami", + "seh": "sena", + "sel": "selkupski", + "ses": "kojraboro seni", + "sg": "sango", + "sga": "staroirski", + "sh": "srpskohrvatski", + "shi": "taÅ¡elhit", + "shn": "Å¡anski", + "si": "sinhaleÅ¡ki", + "sid": "sidamo", + "sk": "slovaÄki", + "sl": "slovenaÄki", + "sm": "samoanski", + "sma": "južni sami", + "smj": "lule sami", + "smn": "inari sami", + "sms": "skoltski laponski", + "sn": "Å¡ona", + "snk": "soninke", + "so": "somalski", + "sog": "sogdijski", + "sq": "albanski", + "sr": "srpski", + "srn": "sranan tongo", + "srr": "sererski", + "ss": "svazi", + "ssy": "saho", + "st": "sesoto", + "su": "sundanski", + "suk": "sukuma", + "sus": "susu", + "sux": "sumerski", + "sv": "Å¡vedski", + "sw": "svahili", + "sw_CD": "kisvahili", + "swb": "komorski", + "syc": "sirijaÄki", + "syr": "sirijski", + "ta": "tamilski", + "te": "telugu", + "tem": "timne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadžiÄki", + "th": "tajski", + "ti": "tigrinja", + "tig": "tigre", + "tiv": "tiv", + "tk": "turkmenski", + "tkl": "tokelau", + "tl": "tagalog", + "tlh": "klingonski", + "tli": "tlingit", + "tmh": "tamaÅ¡ek", + "tn": "cvana", + "to": "tonganski", + "tog": "njasa tonga", + "tpi": "tok pisin", + "tr": "turski", + "trv": "taroko", + "ts": "conga", + "tsi": "cimÅ¡ian", + "tt": "tatarski", + "tum": "tumbuka", + "tvl": "tuvalu", + "tw": "tvi", + "twq": "tasavak", + "ty": "tahićanski", + "tyv": "tuvinski", + "tzm": "centralnoatlaski tamazigt", + "udm": "udmurtski", + "ug": "ujgurski", + "uga": "ugaritski", + "uk": "ukrajinski", + "umb": "umbundu", + "und": "nepoznat jezik", + "ur": "urdu", + "uz": "uzbeÄki", + "vai": "vai", + "ve": "venda", + "vi": "vijetnamski", + "vo": "volapik", + "vot": "vodski", + "vun": "vundžo", + "wa": "valonski", + "wae": "valserski", + "wal": "volajta", + "war": "varajski", + "was": "vaÅ¡o", + "wbp": "varlpiri", + "wo": "volof", + "xal": "kalmiÄki", + "xh": "kosa", + "xog": "soga", + "yao": "jao", + "yap": "japski", + "yav": "jangben", + "ybb": "jemba", + "yi": "jidiÅ¡", + "yo": "joruba", + "yue": "kantonski", + "za": "džuanÅ¡ki", + "zap": "zapoteÄki", + "zbl": "blisimboli", + "zen": "zenaga", + "zgh": "standardni marokanski tamazigt", + "zh": "kineski", + "zh_Hans": "pojednostavljeni kineski", + "zh_Hant": "tradicionalni kineski", + "zu": "zulu", + "zun": "zuni", + "zxx": "bez lingvistiÄkog sadržaja", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Latn_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Latn_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..825f2b84340b477d2460d8aaf92d699b36c5fbb4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Latn_BA.json @@ -0,0 +1,20 @@ +{ + "Version": "2.1.29.33", + "Names": { + "arn": "mapudungun", + "be": "bjeloruski", + "bm": "bamanankan", + "bn": "bangla", + "gsw": "Å¡vajcarski nemaÄki", + "ht": "haićanski kreolski", + "lo": "laoÅ¡ki", + "moh": "mohok", + "nqo": "n’ko", + "shi": "južni Å¡ilha", + "si": "sinhalski", + "tzm": "centralnoatlaski tamaÅ¡ek", + "xh": "isikosa", + "zgh": "standardni marokanski tamaÅ¡ek", + "zu": "isizulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Latn_ME.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Latn_ME.json new file mode 100644 index 0000000000000000000000000000000000000000..d31b2eed570543501eb03fcecccb592f24d99aa6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Latn_ME.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.29.33", + "Names": { + "arn": "mapudungun", + "be": "bjeloruski", + "bm": "bamanankan", + "bn": "bangla", + "ff": "fulah", + "ht": "haićanski kreolski", + "lo": "laoÅ¡ki", + "moh": "mohok", + "nqo": "n’ko", + "shi": "južni Å¡ilha", + "tzm": "centralnoatlaski tamaÅ¡ek", + "xh": "isikosa", + "zgh": "standardni marokanski tamaÅ¡ek", + "zu": "isizulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Latn_XK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Latn_XK.json new file mode 100644 index 0000000000000000000000000000000000000000..27a8d96517ae370b56aca79b66585df51d169faa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_Latn_XK.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.29.33", + "Names": { + "bm": "bamanankan", + "bn": "bangla", + "ff": "fulah", + "gsw": "Å¡vajcarski nemaÄki", + "ht": "haićanski kreolski", + "lo": "laoÅ¡ki", + "moh": "mohok", + "nqo": "n’ko", + "shi": "južni Å¡ilha", + "si": "sinhalski", + "tzm": "centralnoatlaski tamaÅ¡ek", + "xh": "isikosa", + "zgh": "standardni marokanski tamaÅ¡ek", + "zu": "isizulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_ME.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_ME.json new file mode 100644 index 0000000000000000000000000000000000000000..d31b2eed570543501eb03fcecccb592f24d99aa6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_ME.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.29.33", + "Names": { + "arn": "mapudungun", + "be": "bjeloruski", + "bm": "bamanankan", + "bn": "bangla", + "ff": "fulah", + "ht": "haićanski kreolski", + "lo": "laoÅ¡ki", + "moh": "mohok", + "nqo": "n’ko", + "shi": "južni Å¡ilha", + "tzm": "centralnoatlaski tamaÅ¡ek", + "xh": "isikosa", + "zgh": "standardni marokanski tamaÅ¡ek", + "zu": "isizulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_XK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_XK.json new file mode 100644 index 0000000000000000000000000000000000000000..62cc878970c770378c9e157d6f2e1b776bc6ef7f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sr_XK.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.99", + "Names": { + "bm": "бамананкан", + "bn": "бангла", + "ff": "фулах", + "gsw": "швајцарÑки немачки", + "ht": "хаићанÑки креолÑки", + "lo": "лаошки", + "moh": "мохок", + "nqo": "н’ко", + "shi": "јужни шилха", + "si": "ÑинхалÑки", + "tzm": "централноатлаÑки тамашек", + "xh": "иÑикоÑа", + "zgh": "Ñтандардни мароканÑки тамашек", + "zu": "иÑизулу" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sv.json new file mode 100644 index 0000000000000000000000000000000000000000..87961720fa663bc8c60e8626772aa6bdbe28128a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sv.json @@ -0,0 +1,619 @@ +{ + "Version": "2.1.30.7", + "Names": { + "aa": "afar", + "ab": "abchaziska", + "ace": "acehnesiska", + "ach": "acholi", + "ada": "adangme", + "ady": "adygeiska", + "ae": "avestiska", + "aeb": "tunisisk arabiska", + "af": "afrikaans", + "afh": "afrihili", + "agq": "aghem", + "ain": "ainu", + "ak": "akan", + "akk": "akkadiska", + "akz": "Alabama-muskogee", + "ale": "aleutiska", + "aln": "gegiska", + "alt": "sydaltaiska", + "am": "amhariska", + "an": "aragonesiska", + "ang": "fornengelska", + "anp": "angika", + "ar": "arabiska", + "ar_001": "modern standardarabiska", + "arc": "arameiska", + "arn": "mapudungun", + "aro": "araoniska", + "arp": "arapaho", + "arq": "algerisk arabiska", + "arw": "arawakiska", + "ary": "marockansk arabiska", + "arz": "egyptisk arabiska", + "as": "assamesiska", + "asa": "asu", + "ase": "amerikanskt teckensprÃ¥k", + "ast": "asturiska", + "av": "avariska", + "avk": "kotava", + "awa": "awadhi", + "ay": "aymara", + "az": "azerbajdzjanska", + "ba": "basjkiriska", + "bal": "baluchiska", + "ban": "balinesiska", + "bar": "bayerska", + "bas": "basa", + "bax": "bamunska", + "bbc": "batak-toba", + "bbj": "ghomala", + "be": "vitryska", + "bej": "beja", + "bem": "bemba", + "bew": "betawiska", + "bez": "bena", + "bfd": "bafut", + "bfq": "bagada", + "bg": "bulgariska", + "bgn": "västbaluchiska", + "bho": "bhojpuri", + "bi": "bislama", + "bik": "bikol", + "bin": "bini", + "bjn": "banjariska", + "bkm": "bamekon", + "bla": "siksika", + "bm": "bambara", + "bn": "bengali", + "bo": "tibetanska", + "bpy": "bishnupriya", + "bqi": "bakhtiari", + "br": "bretonska", + "bra": "braj", + "brh": "brahuiska", + "brx": "bodo", + "bs": "bosniska", + "bss": "bakossi", + "bua": "burjätiska", + "bug": "buginesiska", + "bum": "boulou", + "byn": "blin", + "byv": "bagangte", + "ca": "katalanska", + "cad": "caddo", + "car": "karibiska", + "cay": "cayuga", + "cch": "atsam", + "ce": "tjetjenska", + "ceb": "cebuano", + "cgg": "chiga", + "ch": "chamorro", + "chb": "chibcha", + "chg": "chagatai", + "chk": "chuukesiska", + "chm": "mariska", + "chn": "chinook", + "cho": "choctaw", + "chp": "chipewyan", + "chr": "cherokesiska", + "chy": "cheyenne", + "ckb": "soranisk kurdiska", + "co": "korsikanska", + "cop": "koptiska", + "cps": "kapisnon", + "cr": "cree", + "crh": "krimtatariska", + "crs": "seychellisk kreol", + "cs": "tjeckiska", + "csb": "kasjubiska", + "cu": "kyrkslaviska", + "cv": "tjuvasjiska", + "cy": "walesiska", + "da": "danska", + "dak": "dakota", + "dar": "darginska", + "dav": "taita", + "de": "tyska", + "de_AT": "österrikisk tyska", + "de_CH": "schweizisk högtyska", + "del": "delaware", + "den": "slavej", + "dgr": "dogrib", + "din": "dinka", + "dje": "zarma", + "doi": "dogri", + "dsb": "lÃ¥gsorbiska", + "dtp": "centraldusun", + "dua": "duala", + "dum": "medelnederländska", + "dv": "divehi", + "dyo": "jola-fonyi", + "dyu": "dyula", + "dz": "dzongkha", + "dzg": "dazaga", + "ebu": "embu", + "ee": "ewe", + "efi": "efik", + "egl": "emiliska", + "egy": "fornegyptiska", + "eka": "ekajuk", + "el": "grekiska", + "elx": "elamitiska", + "en": "engelska", + "en_AU": "australisk engelska", + "en_CA": "kanadensisk engelska", + "en_GB": "brittisk engelska", + "en_US": "amerikansk engelska", + "enm": "medelengelska", + "eo": "esperanto", + "es": "spanska", + "es_419": "latinamerikansk spanska", + "es_ES": "europeisk spanska", + "es_MX": "mexikansk spanska", + "esu": "centralalaskisk jupiska", + "et": "estniska", + "eu": "baskiska", + "ewo": "ewondo", + "ext": "extremaduriska", + "fa": "persiska", + "fan": "fang", + "fat": "fanti", + "ff": "fulani", + "fi": "finska", + "fil": "filippinska", + "fit": "meänkieli", + "fj": "fijianska", + "fo": "färöiska", + "fon": "fonsprÃ¥ket", + "fr": "franska", + "fr_CA": "kanadensisk franska", + "fr_CH": "schweizisk franska", + "frc": "cajun-franska", + "frm": "medelfranska", + "fro": "fornfranska", + "frp": "frankoprovensalska", + "frr": "nordfrisiska", + "frs": "östfrisiska", + "fur": "friulianska", + "fy": "västfrisiska", + "ga": "iriska", + "gaa": "gã", + "gag": "gagauziska", + "gan": "gan", + "gay": "gayo", + "gba": "gbaya", + "gbz": "zoroastrisk dari", + "gd": "skotsk gäliska", + "gez": "etiopiska", + "gil": "gilbertiska", + "gl": "galiciska", + "glk": "gilaki", + "gmh": "medelhögtyska", + "gn": "guaraní", + "goh": "fornhögtyska", + "gom": "Goa-konkani", + "gon": "gondi", + "gor": "gorontalo", + "got": "gotiska", + "grb": "grebo", + "grc": "forngrekiska", + "gsw": "schweizertyska", + "gu": "gujarati", + "guc": "wayuu", + "gur": "farefare", + "guz": "gusii", + "gv": "manx", + "gwi": "gwichin", + "ha": "hausa", + "hai": "haida", + "hak": "hakka", + "haw": "hawaiiska", + "he": "hebreiska", + "hi": "hindi", + "hif": "Fiji-hindi", + "hil": "hiligaynon", + "hit": "hettitiska", + "hmn": "hmongsprÃ¥k", + "ho": "hirimotu", + "hr": "kroatiska", + "hsb": "högsorbiska", + "hsn": "xiang", + "ht": "haitiska", + "hu": "ungerska", + "hup": "hupa", + "hy": "armeniska", + "hz": "herero", + "ia": "interlingua", + "iba": "ibanska", + "ibb": "ibibio", + "id": "indonesiska", + "ie": "interlingue", + "ig": "igbo", + "ii": "szezuan i", + "ik": "inupiak", + "ilo": "iloko", + "inh": "ingusjiska", + "io": "ido", + "is": "isländska", + "it": "italienska", + "iu": "inuktitut", + "izh": "ingriska", + "ja": "japanska", + "jam": "jamaikansk engelsk kreol", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "kimashami", + "jpr": "judisk persiska", + "jrb": "judisk arabiska", + "jut": "jylländska", + "jv": "javanesiska", + "ka": "georgiska", + "kaa": "karakalpakiska", + "kab": "kabyliska", + "kac": "kachin", + "kaj": "jju", + "kam": "kamba", + "kaw": "kawi", + "kbd": "kabardinska", + "kbl": "kanembu", + "kcg": "tyap", + "kde": "makonde", + "kea": "kapverdiska", + "ken": "kenjang", + "kfo": "koro", + "kg": "kikongo", + "kgp": "kaingang", + "kha": "khasi", + "kho": "khotanesiska", + "khq": "Timbuktu-songhoy", + "khw": "khowar", + "ki": "kikuyu", + "kiu": "kirmanjki", + "kj": "kuanyama", + "kk": "kazakiska", + "kkj": "mkako", + "kl": "grönländska", + "kln": "kalenjin", + "km": "kambodjanska", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "koreanska", + "koi": "komi-permjakiska", + "kok": "konkani", + "kos": "kosreanska", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "karachay-balkar", + "kri": "krio", + "krj": "kinaray-a", + "krl": "karelska", + "kru": "kurukh", + "ks": "kashmiriska", + "ksb": "kisambaa", + "ksf": "bafia", + "ksh": "kölniska", + "ku": "kurdiska", + "kum": "kumykiska", + "kut": "kutenaj", + "kv": "kome", + "kw": "korniska", + "ky": "kirgisiska", + "la": "latin", + "lad": "ladino", + "lag": "langi", + "lah": "lahnda", + "lam": "lamba", + "lb": "luxemburgiska", + "lez": "lezghien", + "lfn": "lingua franca nova", + "lg": "luganda", + "li": "limburgiska", + "lij": "liguriska", + "liv": "livoniska", + "lkt": "lakota", + "lmo": "lombardiska", + "ln": "lingala", + "lo": "laotiska", + "lol": "mongo", + "loz": "lozi", + "lrc": "nordluri", + "lt": "litauiska", + "ltg": "lettgalliska", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lui": "luiseño", + "lun": "lunda", + "luo": "luo", + "lus": "lushai", + "luy": "luhya", + "lv": "lettiska", + "lzh": "litterär kineiska", + "lzz": "laziska", + "mad": "maduresiska", + "maf": "mafa", + "mag": "magahi", + "mai": "maithili", + "mak": "makasar", + "man": "mande", + "mas": "massajiska", + "mde": "maba", + "mdf": "moksja", + "mdr": "mandar", + "men": "mende", + "mer": "meru", + "mfe": "mauritansk kreol", + "mg": "malagassiska", + "mga": "medeliriska", + "mgh": "makhuwa-meetto", + "mgo": "meta’", + "mh": "marshalliska", + "mi": "maori", + "mic": "mi’kmaq", + "min": "minangkabau", + "mk": "makedonska", + "ml": "malayalam", + "mn": "mongoliska", + "mnc": "manchuriska", + "mni": "manipuri", + "moh": "mohawk", + "mos": "mossi", + "mr": "marathi", + "mrj": "västmariska", + "ms": "malajiska", + "mt": "maltesiska", + "mua": "mundang", + "mul": "flera sprÃ¥k", + "mus": "muskogee", + "mwl": "mirandesiska", + "mwr": "marwari", + "mwv": "mentawai", + "my": "burmesiska", + "mye": "myene", + "myv": "erjya", + "mzn": "mazanderani", + "na": "nauru", + "nan": "min nan", + "nap": "napolitanska", + "naq": "nama", + "nb": "bokmÃ¥l", + "nd": "nordndebele", + "nds": "lÃ¥gtyska", + "nds_NL": "lÃ¥gsaxiska", + "ne": "nepalesiska", + "new": "newariska", + "ng": "ndonga", + "nia": "nias", + "niu": "niueanska", + "njo": "ao-naga", + "nl": "nederländska", + "nl_BE": "flamländska", + "nmg": "kwasio", + "nn": "nynorska", + "nnh": "bamileké-ngiemboon", + "no": "norska", + "nog": "nogai", + "non": "fornnordiska", + "nov": "novial", + "nqo": "n-kÃ¥", + "nr": "sydndebele", + "nso": "nordsotho", + "nus": "nuer", + "nv": "navaho", + "nwc": "klassisk newariska", + "ny": "nyanja", + "nym": "nyamwezi", + "nyn": "nyankole", + "nyo": "nyoro", + "nzi": "nzima", + "oc": "occitanska", + "oj": "odjibwa", + "om": "oromo", + "or": "oriya", + "os": "ossetiska", + "osa": "osage", + "ota": "ottomanska", + "pa": "punjabi", + "pag": "pangasinan", + "pal": "medelpersiska", + "pam": "pampanga", + "pap": "papiamento", + "pau": "palau", + "pcd": "pikardiska", + "pcm": "Nigeria-pidgin", + "pdc": "Pennsylvaniatyska", + "pdt": "mennonitisk lÃ¥gtyska", + "peo": "fornpersiska", + "pfl": "Pfalz-tyska", + "phn": "feniciska", + "pi": "pali", + "pl": "polska", + "pms": "piemontesiska", + "pnt": "pontiska", + "pon": "pohnpeiska", + "prg": "fornpreussiska", + "pro": "fornprovensalska", + "ps": "afghanska", + "pt": "portugisiska", + "pt_BR": "brasiliansk portugisiska", + "pt_PT": "europeisk portugisiska", + "qu": "quechua", + "quc": "quiché", + "qug": "Chimborazo-höglandskichwa", + "raj": "rajasthani", + "rap": "rapanui", + "rar": "rarotonganska", + "rgn": "romagnol", + "rif": "riffianska", + "rm": "rätoromanska", + "rn": "rundi", + "ro": "rumänska", + "ro_MD": "moldaviska", + "rof": "rombo", + "rom": "romani", + "root": "rot", + "rtm": "rotumänska", + "ru": "ryska", + "rue": "rusyn", + "rug": "rovianska", + "rup": "arumänska", + "rw": "kinjarwanda", + "rwk": "rwa", + "sa": "sanskrit", + "sad": "sandawe", + "sah": "jakutiska", + "sam": "samaritanska", + "saq": "samburu", + "sas": "sasak", + "sat": "santali", + "saz": "saurashtra", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardinska", + "scn": "sicilianska", + "sco": "skotska", + "sd": "sindhi", + "sdc": "sassaresisk sardiska", + "sdh": "sydkurdiska", + "se": "nordsamiska", + "see": "seneca", + "seh": "sena", + "sei": "seri", + "sel": "selkup", + "ses": "Gao-songhay", + "sg": "sango", + "sga": "forniriska", + "sgs": "samogitiska", + "sh": "serbokroatiska", + "shi": "tachelhit", + "shn": "shan", + "shu": "Tchad-arabiska", + "si": "singalesiska", + "sid": "sidamo", + "sk": "slovakiska", + "sl": "slovenska", + "sli": "lÃ¥gsilesiska", + "sly": "selayar", + "sm": "samoanska", + "sma": "sydsamiska", + "smj": "lulesamiska", + "smn": "enaresamiska", + "sms": "skoltsamiska", + "sn": "shona", + "snk": "soninke", + "so": "somaliska", + "sog": "sogdiska", + "sq": "albanska", + "sr": "serbiska", + "srn": "sranan tongo", + "srr": "serer", + "ss": "swati", + "ssy": "saho", + "st": "sydsotho", + "stq": "saterfrisiska", + "su": "sundanesiska", + "suk": "sukuma", + "sus": "susu", + "sux": "sumeriska", + "sv": "svenska", + "sw": "swahili", + "sw_CD": "Kongo-swahili", + "swb": "shimaoré", + "syc": "klassisk syriska", + "syr": "syriska", + "szl": "silesiska", + "ta": "tamil", + "tcy": "tulu", + "te": "telugu", + "tem": "temne", + "teo": "teso", + "ter": "tereno", + "tet": "tetum", + "tg": "tadzjikiska", + "th": "thailändska", + "ti": "tigrinja", + "tig": "tigré", + "tiv": "tivi", + "tk": "turkmeniska", + "tkl": "tokelauiska", + "tkr": "tsakhur", + "tl": "tagalog", + "tlh": "klingonska", + "tli": "tlingit", + "tly": "talysh", + "tmh": "tamashek", + "tn": "tswana", + "to": "tonganska", + "tog": "nyasatonganska", + "tpi": "tok pisin", + "tr": "turkiska", + "tru": "turoyo", + "trv": "taroko", + "ts": "tsonga", + "tsd": "tsakodiska", + "tsi": "tsimshian", + "tt": "tatariska", + "ttt": "muslimsk tatariska", + "tum": "tumbuka", + "tvl": "tuvaluanska", + "tw": "twi", + "twq": "tasawaq", + "ty": "tahitiska", + "tyv": "tuviniska", + "tzm": "centralmarockansk tamazight", + "udm": "udmurtiska", + "ug": "uiguriska", + "uga": "ugaritiska", + "uk": "ukrainska", + "umb": "umbundu", + "und": "obestämt sprÃ¥k", + "ur": "urdu", + "uz": "uzbekiska", + "vai": "vaj", + "ve": "venda", + "vec": "venetianska", + "vep": "veps", + "vi": "vietnamesiska", + "vls": "västflamländska", + "vmf": "Main-frankiska", + "vo": "volapük", + "vot": "votiska", + "vro": "võru", + "vun": "vunjo", + "wa": "vallonska", + "wae": "walsertyska", + "wal": "walamo", + "war": "waray", + "was": "washo", + "wbp": "warlpiri", + "wo": "wolof", + "wuu": "wu", + "xal": "kalmuckiska", + "xh": "xhosa", + "xmf": "mingrelianska", + "xog": "lusoga", + "yao": "kiyao", + "yap": "japetiska", + "yav": "yangben", + "ybb": "bamileké-jemba", + "yi": "jiddisch", + "yo": "yoruba", + "yrl": "nheengatu", + "yue": "kantonesiska", + "za": "zhuang", + "zap": "zapotek", + "zbl": "blissymboler", + "zea": "zeeländska", + "zen": "zenaga", + "zgh": "marockansk standard-tamazight", + "zh": "kinesiska", + "zh_Hans": "förenklad kinesiska", + "zh_Hant": "traditionell kinesiska", + "zu": "zulu", + "zun": "zuni", + "zxx": "inget sprÃ¥kligt innehÃ¥ll", + "zza": "zazaiska" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sv_FI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sv_FI.json new file mode 100644 index 0000000000000000000000000000000000000000..8eab93efde8dcadce38d4f6a98723de4c486d4dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sv_FI.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ky": "kirgiziska" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sw.json new file mode 100644 index 0000000000000000000000000000000000000000..1eed0dc1f65b609b970326f9bf9b788dd9c1217f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sw.json @@ -0,0 +1,421 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "Kiafar", + "ab": "Kiabkhazi", + "ace": "Kiacheni", + "ach": "Kiakoli", + "ada": "Kiadangme", + "ady": "Kiadyghe", + "af": "Kiafrikana", + "agq": "Kiaghem", + "ain": "Kiainu", + "ak": "Kiakani", + "ale": "Kialeut", + "alt": "Kialtai", + "am": "Kiamhari", + "an": "Kiaragoni", + "ang": "Kiingereza cha Kale", + "anp": "Kiangika", + "ar": "Kiarabu", + "ar_001": "Kiarabu Sanifu cha Kisasa", + "arc": "Kiaramu", + "arn": "Kimapuche", + "arp": "Kiarapaho", + "arq": "Kiarabu cha Algeria", + "arz": "Kiarabu cha Misri", + "as": "Kiassam", + "asa": "Kiasu", + "ast": "Kiasturia", + "av": "Kiavari", + "awa": "Kiawadhi", + "ay": "Kiaymara", + "az": "Kiazerbaijani", + "ba": "Kibashkir", + "ban": "Kibali", + "bas": "Kibasaa", + "bax": "Kibamun", + "bbj": "Kighomala", + "be": "Kibelarusi", + "bej": "Kibeja", + "bem": "Kibemba", + "bez": "Kibena", + "bfd": "Kibafut", + "bg": "Kibulgaria", + "bgn": "Kibalochi cha Magharibi", + "bho": "Kibhojpuri", + "bi": "Kibislama", + "bin": "Kibini", + "bkm": "Kikom", + "bla": "Kisiksika", + "bm": "Kibambara", + "bn": "Kibengali", + "bo": "Kitibeti", + "br": "Kibretoni", + "brx": "Kibodo", + "bs": "Kibosnia", + "bug": "Lugha ya Buginese", + "bum": "Kibulu", + "byn": "Kiblin", + "byv": "Kimedumba", + "ca": "Kikatalani", + "ce": "Kichechenia", + "ceb": "Kichebuano", + "cgg": "Kichiga", + "ch": "Kichamorro", + "chk": "Kichukisi", + "chm": "Kimari", + "cho": "Kichoktao", + "chr": "Kicherokee", + "chy": "Kicheyeni", + "ckb": "Kikurdi cha Sorani", + "co": "Kikosikani", + "cop": "Kikhufti", + "crs": "Krioli ya Shelisheli", + "cs": "Kicheki", + "cu": "Kislovakia cha Church", + "cv": "Kichuvash", + "cy": "Kiwelisi", + "da": "Kidenmaki", + "dak": "Kidakota", + "dar": "Kidaragwa", + "dav": "Kitaita", + "de": "Kijerumani", + "dgr": "Kidogrib", + "dje": "Kizarma", + "dsb": "Kidolnoserbski", + "dua": "Kiduala", + "dv": "Kidivehi", + "dyo": "Kijola-Fonyi", + "dyu": "Kijula", + "dz": "Kizongkha", + "dzg": "Kidazaga", + "ebu": "Kiembu", + "ee": "Kiewe", + "efi": "Kiefiki", + "egy": "Kimisri", + "eka": "Kiekajuk", + "el": "Kigiriki", + "en": "Kiingereza", + "eo": "Kiesperanto", + "es": "Kihispania", + "es_ES": "Kihispania (Uhispania)", + "es_MX": "Kihispania (Mexico)", + "et": "Kiestonia", + "eu": "Kibasque", + "ewo": "Kiewondo", + "fa": "Kiajemi", + "ff": "Kifula", + "fi": "Kifini", + "fil": "Kifilipino", + "fj": "Kifiji", + "fo": "Kifaroe", + "fon": "Kifon", + "fr": "Kifaransa", + "fr_CA": "Kifaransa (Canada)", + "fro": "Kifaransa cha Kale", + "frr": "Kifrisia cha Kaskazini", + "frs": "Kifrisia cha Mashariki", + "fur": "Kifriulian", + "fy": "Kifrisia cha Magharibi", + "ga": "Kiayalandi", + "gaa": "Kiga", + "gag": "Kigagauz", + "gba": "Kigbaya", + "gd": "Kigaeli cha Uskoti", + "gez": "Kige’ez", + "gil": "Kikiribati", + "gl": "Kigalisi", + "gn": "Kiguarani", + "gor": "Kigorontalo", + "grc": "Kiyunani", + "gsw": "Kijerumani cha Uswisi", + "gu": "Kigujarati", + "guz": "Kikisii", + "gv": "Kimanx", + "gwi": "Gwichʼin", + "ha": "Kihausa", + "haw": "Kihawai", + "he": "Kiebrania", + "hi": "Kihindi", + "hil": "Kihiligaynon", + "hit": "Kihiti", + "hmn": "Kihmong", + "hr": "Kikroeshia", + "hsb": "Kisobia cha Ukanda wa Juu", + "ht": "Kihaiti", + "hu": "Kihangari", + "hup": "Hupa", + "hy": "Kiarmenia", + "hz": "Kiherero", + "ia": "Kiintalingua", + "iba": "Kiiban", + "ibb": "Kiibibio", + "id": "Kiindonesia", + "ig": "Kiigbo", + "ii": "Sichuan Yi", + "ilo": "Kiilocano", + "io": "Kiido", + "is": "Kiaisilandi", + "it": "Kiitaliano", + "iu": "Kiinuktitut", + "ja": "Kijapani", + "jbo": "Lojban", + "jgo": "Kingomba", + "jmc": "Kimachame", + "jv": "Kijava", + "ka": "Kijojia", + "kab": "Kikabylia", + "kac": "Kachin", + "kaj": "Kijju", + "kam": "Kikamba", + "kbl": "Kikanembu", + "kcg": "Kityap", + "kde": "Kimakonde", + "kea": "Kikabuverdianu", + "kfo": "Kikoro", + "kg": "Kikongo", + "kha": "Kikhasi", + "khq": "Koyra Chiini", + "ki": "Kikikuyu", + "kj": "Kikwanyama", + "kk": "Kikazakh", + "kkj": "Lugha ya Kako", + "kl": "Kikalaallisut", + "kln": "Kikalenjin", + "km": "Kikambodia", + "kmb": "Kimbundu", + "kn": "Kikannada", + "ko": "Kikorea", + "koi": "Kikomi-Permyak", + "kok": "Kikonkani", + "kpe": "Kikpelle", + "kr": "Kikanuri", + "krc": "Kikarachay-Balkar", + "krl": "Karjala", + "kru": "Kurukh", + "ks": "Kikashmiri", + "ksb": "Kisambaa", + "ksf": "Kibafia", + "ksh": "Kicologne", + "ku": "Kikurdi", + "kum": "Kumyk", + "kv": "Kikomi", + "kw": "Kikorni", + "ky": "Kikyrgyz", + "la": "Kilatini", + "lad": "Kiladino", + "lag": "Kirangi", + "lam": "Lamba", + "lb": "Kilasembagi", + "lg": "Kiganda", + "li": "Limburgish", + "lkt": "Kilakota", + "ln": "Kilingala", + "lo": "Kilaosi", + "lol": "Kimongo", + "loz": "Kilozi", + "lrc": "Kiluri cha Kaskazini", + "lt": "Kilithuania", + "lu": "Kiluba-Katanga", + "lua": "Kiluba-Lulua", + "lun": "Kilunda", + "luo": "Kijaluo", + "lus": "Kimizo", + "luy": "Kiluhya", + "lv": "Kilatvia", + "mad": "Kimadura", + "maf": "Kimafa", + "mag": "Kimagahi", + "mai": "Kimaithili", + "mak": "Kimakasar", + "mas": "Kimaasai", + "mde": "Kimaba", + "mdf": "Lugha ya Moksha", + "men": "Kimende", + "mer": "Kimeru", + "mfe": "Kimoriseni", + "mg": "Kimalagasi", + "mgh": "Kimakhuwa-Meetto", + "mgo": "Kimeta", + "mi": "Kimaori", + "mic": "Mi’kmaq", + "min": "Kiminangkabau", + "mk": "Kimacedonia", + "ml": "Kimalayalam", + "mn": "Kimongolia", + "mni": "Kimanipuri", + "moh": "Lugha ya Mohawk", + "mos": "Kimoore", + "mr": "Kimarathi", + "ms": "Kimalei", + "mt": "Kimalta", + "mua": "Kimundang", + "mul": "Lugha Nyingi", + "mus": "Kikriki", + "my": "Kiburma", + "myv": "Kierzya", + "mzn": "Kimazanderani", + "na": "Kinauru", + "nap": "Kinapoli", + "naq": "Kinama", + "nb": "Kinorwe cha BokmÃ¥l", + "nd": "Kindebele cha Kaskazini", + "nds": "Kisaksoni", + "ne": "Kinepali", + "new": "Kinewari", + "ng": "Kindonga", + "niu": "Kiniuea", + "nl": "Kiholanzi", + "nl_BE": "Kiflemi", + "nmg": "Kikwasio", + "nn": "Kinorwe cha Nynorsk", + "nnh": "Lugha ya Ngiemboon", + "no": "Kinorwe", + "nog": "Kinogai", + "nqo": "N’Ko", + "nr": "Kindebele", + "nso": "Kisotho cha Kaskazini", + "nus": "Kinuer", + "nv": "Kinavajo", + "nwc": "Kinewari cha kale", + "ny": "Kinyanja", + "nym": "Kinyamwezi", + "nyn": "Kinyankole", + "nyo": "Kinyoro", + "nzi": "Kinzema", + "oc": "Kiokitani", + "om": "Kioromo", + "or": "Kioriya", + "os": "Kiosetia", + "pa": "Kipunjabi", + "pag": "Kipangasinan", + "pam": "Kipampanga", + "pap": "Kipapiamento", + "pau": "Kipalau", + "peo": "Kiajemi cha Kale", + "pl": "Kipolandi", + "prg": "Kiprussia", + "ps": "Kipashto", + "pt": "Kireno", + "pt_BR": "Kireno (Brazil)", + "qu": "Kiquechua", + "quc": "Kʼicheʼ", + "rap": "Kirapanui", + "rar": "Kirarotonga", + "rm": "Kiromanshi", + "rn": "Kirundi", + "ro": "Kiromania", + "rof": "Kirombo", + "root": "Root", + "ru": "Kirusi", + "rup": "Kiaromania", + "rw": "Kinyarwanda", + "rwk": "Kirwa", + "sa": "Kisanskriti", + "sad": "Kisandawe", + "sah": "Kisakha", + "sam": "Kiaramu cha Wasamaria", + "saq": "Kisamburu", + "sat": "Kisantali", + "sba": "Kingambay", + "sbp": "Kisangu", + "sc": "Kisardinia", + "scn": "Kisicilia", + "sco": "Kiskoti", + "sd": "Kisindhi", + "sdh": "Kikurdi cha Kusini", + "se": "Kisami cha Kaskazini", + "seh": "Kisena", + "ses": "Koyraboro Senni", + "sg": "Kisango", + "sh": "Kiserbia-kroeshia", + "shi": "Kitachelhit", + "shn": "Kishan", + "si": "Kisinhala", + "sk": "Kislovakia", + "sl": "Kislovenia", + "sm": "Kisamoa", + "sma": "Kisami cha Kusini", + "smj": "Kisami cha Lule", + "smn": "Kisami cha Inari", + "sms": "Kisami cha Skolt", + "sn": "Kishona", + "snk": "Kisoninke", + "so": "Kisomali", + "sq": "Kialbania", + "sr": "Kiserbia", + "srn": "Lugha ya Sranan Tongo", + "ss": "Kiswati", + "ssy": "Kisaho", + "st": "Kisotho", + "su": "Kisunda", + "suk": "Kisukuma", + "sus": "Kisusu", + "sv": "Kiswidi", + "sw": "Kiswahili", + "sw_CD": "Kingwana", + "swb": "Shikomor", + "syr": "Lugha ya Syriac", + "ta": "Kitamil", + "te": "Kitelugu", + "tem": "Kitemne", + "teo": "Kiteso", + "tet": "Kitetum", + "tg": "Kitajiki", + "th": "Kitailandi", + "ti": "Kitigrinya", + "tig": "Kitigre", + "tk": "Kiturukimeni", + "tlh": "Kiklingoni", + "tn": "Kitswana", + "to": "Kitonga", + "tpi": "Kitokpisin", + "tr": "Kituruki", + "trv": "Kitaroko", + "ts": "Kitsonga", + "tt": "Kitatari", + "tum": "Kitumbuka", + "tvl": "Kituvalu", + "tw": "Twi", + "twq": "Kitasawaq", + "ty": "Kitahiti", + "tyv": "Kituva", + "tzm": "Central Atlas Tamazight", + "udm": "Udmurt", + "ug": "Kiuyghur", + "uk": "Kiukraine", + "umb": "Umbundu", + "und": "Lugha Isiyojulikana", + "ur": "Kiurdu", + "uz": "Kiuzbeki", + "vai": "Kivai", + "ve": "Kivenda", + "vi": "Kivietinamu", + "vo": "Kivolapük", + "vun": "Kivunjo", + "wa": "Walloon", + "wae": "Walser", + "wal": "Kiwolaytta", + "war": "Kiwaray", + "wbp": "Kiwarlpiri", + "wo": "Lugha ya Wolof", + "xal": "Kikalmyk", + "xh": "Kixhosa", + "xog": "Kisoga", + "yao": "Kiyao", + "yav": "Kiyangben", + "ybb": "Kiyemba", + "yi": "Kiyiddi", + "yo": "Kiyoruba", + "yue": "Kikantoni", + "zgh": "Tamaziti Sanifu ya Kimoroko", + "zh": "Kichina", + "zh_Hans": "Kichina (Kilichorahisishwa)", + "zh_Hant": "Kichina cha Jadi", + "zu": "Kizulu", + "zun": "Kizuni", + "zxx": "Hakuna maudhui ya lugha", + "zza": "Kizaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sw_CD.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sw_CD.json new file mode 100644 index 0000000000000000000000000000000000000000..e11d34e5d10774f055e19d7e8e8b5ca2c8124566 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sw_CD.json @@ -0,0 +1,42 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ak": "Kiakan", + "ar_001": "Kiarabu cha Dunia Kilichosanifishwa", + "arq": "Kiarabu cha Aljeria", + "az": "Kiazabajani", + "bug": "Kibugini", + "gv": "Kimanksi", + "gwi": "Kigwichiin", + "hup": "Kihupa", + "inh": "Kiingush", + "jbo": "Kilojban", + "kac": "Kikachin", + "khq": "Kikoyra Chiini", + "kkj": "Kikako", + "koi": "Kikomipermyak", + "kru": "Kikurukh", + "kum": "Kikumyk", + "ky": "Kikirigizi", + "lam": "Kilamba", + "li": "Kilimburgi", + "mak": "mak", + "mdf": "Kimoksha", + "mic": "Kimikmaki", + "mk": "Kimasedonia", + "moh": "Kimohoki", + "mos": "Kimossi", + "nnh": "Kingiemboon", + "nqo": "Kiinko", + "pcm": "Pijini ya Nijeria", + "quc": "Kikiiche", + "root": "Kiroot", + "shu": "Kiarabu cha Chadi", + "srn": "Kitongo cha Sranan", + "swb": "Kikomoro", + "syr": "Kisiria", + "udm": "Kiudumurti", + "wae": "Kiwalser", + "yi": "Kiyidi" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sw_KE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sw_KE.json new file mode 100644 index 0000000000000000000000000000000000000000..3a4912794a5cfe68bc61a6480a461d40e561afd8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/sw_KE.json @@ -0,0 +1,44 @@ +{ + "Version": "2.1.27.99", + "Names": { + "ain": "ain", + "ar_001": "Kiarabu cha Sasa Kilichosanifishwa", + "arq": "Kiarabu cha Aljeria", + "az": "Kiazabajani", + "bug": "Kibugini", + "ckb": "Kikurdi cha Kati", + "dsb": "Kisorbian cha Chini", + "grc": "Kigiriki cha Kale", + "hsb": "Kisorbia cha Juu", + "inh": "Kingushi", + "jbo": "Kilojbani", + "kac": "Kikachin", + "khq": "Kikoyra Chiini", + "kkj": "Kikako", + "koi": "Kikomipermyak", + "kru": "Kikurukh", + "lam": "Kilamba", + "li": "Kilimbugish", + "mdf": "Kimoksha", + "mic": "Kimicmac", + "mk": "Kimasedonia", + "moh": "Kimohoki", + "nnh": "Kiingiemboon", + "nqo": "Kiin’ko", + "or": "Kiodia", + "pcm": "Pijini ya Nijeria", + "root": "Kiroot", + "sco": "sco", + "ses": "Kikoyraboro Senni", + "shu": "Kiarabu cha Chadi", + "srn": "Kiscran Tongo", + "swb": "Kicomoro", + "syr": "Kisyria", + "tw": "Kitwi", + "tzm": "Lugha ya Central Atlas Tamazight", + "udm": "Kiudumurti", + "wa": "Kiwaloon", + "wae": "Kiwalser", + "zgh": "Tamazight Sanifu ya Moroko" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ta.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ta.json new file mode 100644 index 0000000000000000000000000000000000000000..f2879d29f23d01db07c84bc82d427b4932bb8ef7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ta.json @@ -0,0 +1,526 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "அஃபாரà¯", + "ab": "அபà¯à®•ாஜியானà¯", + "ace": "ஆசà¯à®šà®¿à®©à¯€à®¸à¯", + "ach": "அகோலி", + "ada": "அதாஙà¯à®®à¯‡", + "ady": "அதகே", + "ae": "அவெஸà¯à®¤à®¾à®©à¯", + "aeb": "தà¯à®©à®¿à®šà®¿à®¯ அரபà¯", + "af": "ஆஃபà¯à®°à®¿à®•ானà¯à®¸à¯", + "afh": "அஃபà¯à®°à®¿à®¹à®¿à®²à®¿", + "agq": "அகெமà¯", + "ain": "à®à®©à¯", + "ak": "அகானà¯", + "akk": "அகà¯à®•ேதியனà¯", + "ale": "அலூடà¯", + "alt": "தெறà¯à®•௠அலà¯à®¤à¯ˆ", + "am": "à®…à®®à¯à®¹à®¾à®°à®¿à®•à¯", + "an": "ஆரà¯à®•ோனீஸà¯", + "ang": "பழைய ஆஙà¯à®•ிலமà¯", + "anp": "à®…à®™à¯à®•ிகா", + "ar": "அரபிகà¯", + "ar_001": "நவீன நிலையான அரபிகà¯", + "arc": "அராமைகà¯", + "arn": "மபà¯à®šà¯à®šà¯‡", + "arp": "அரபஹோ", + "arw": "அராவாகà¯", + "as": "அஸà¯à®¸à®¾à®®à¯€à®¸à¯", + "asa": "அசà¯", + "ast": "அஸà¯à®¤à¯à®°à®¿à®¯à®©à¯", + "av": "அவேரிகà¯", + "awa": "அவதி", + "ay": "அயà¯à®®à®°à®¾", + "az": "அஸரà¯à®ªà¯ˆà®œà®¾à®©à®¿", + "ba": "பஷà¯à®•ிரà¯", + "bal": "பலூசà¯à®šà®¿", + "ban": "பலினீஸà¯", + "bas": "பாஸா", + "be": "பெலாரà¯à®·à®¿à®¯à®©à¯", + "bej": "பேஜா", + "bem": "பெமà¯à®ªà®¾", + "bez": "பெனா", + "bfq": "படகா", + "bg": "பலà¯à®•ேரியனà¯", + "bgn": "மேறà¯à®•௠பலோசà¯à®šà®¿", + "bho": "போஜà¯à®ªà¯‚ரி", + "bi": "பிஸà¯à®²à®¾à®®à®¾", + "bik": "பிகோலà¯", + "bin": "பினி", + "bla": "சிகà¯à®šà®¿à®•ா", + "bm": "பமà¯à®ªà®¾à®°à®¾", + "bn": "வஙà¯à®•ாளமà¯", + "bo": "திபெதà¯à®¤à®¿à®¯à®©à¯", + "bpy": "பிஷà¯à®£à¯à®ªà¯à®ªà®¿à®°à®¿à®¯à®¾", + "br": "பிரெடà¯à®Ÿà®©à¯", + "bra": "பà¯à®°à®¾à®œà¯", + "brx": "போடோ", + "bs": "போஸà¯à®©à®¿à®¯à®©à¯", + "bua": "பà¯à®°à®¿à®¯à®¾à®¤à¯", + "bug": "பà¯à®•ினீஸà¯", + "byn": "பà¯à®²à®¿à®©à¯", + "ca": "கேடà¯à®Ÿà®²à®¾à®©à¯", + "cad": "கேடோ", + "car": "கரீபà¯", + "cch": "ஆடà¯à®šà®®à¯", + "ce": "செசà¯à®šà¯†à®©à¯", + "ceb": "செபà¯à®µà®¾à®©à¯‹", + "cgg": "சிகா", + "ch": "சாமோரோ", + "chb": "சிபà¯à®šà®¾", + "chg": "ஷகதை", + "chk": "சூகிசே", + "chm": "மாரி", + "chn": "சினூக௠ஜாரà¯à®•ானà¯", + "cho": "சோகà¯à®¤à¯Œ", + "chp": "சிபெவà¯à®¯à®¾à®©à¯", + "chr": "செரோகீ", + "chy": "செயேனி", + "ckb": "மதà¯à®¤à®¿à®¯ கà¯à®°à¯à®¤à®¿à®·à¯", + "co": "காரà¯à®šà®¿à®•னà¯", + "cop": "காபà¯à®Ÿà®¿à®•à¯", + "cr": "கà¯à®°à¯€", + "crh": "கிரிமியன௠தà¯à®°à¯à®•à¯à®•ி", + "crs": "செசெலà¯à®µà®¾ கà¯à®°à¯†à®¯à¯‹à®²à¯ பிரெஞà¯à®šà¯", + "cs": "செகà¯", + "csb": "கஷà¯à®ªà®¿à®¯à®©à¯", + "cu": "சரà¯à®šà¯ ஸà¯à®²à®¾à®µà®¿à®•à¯", + "cv": "சà¯à®µà®¾à®·à¯", + "cy": "வேலà¯à®·à¯", + "da": "டேனிஷà¯", + "dak": "டகோடா", + "dar": "தாரà¯à®•à¯à®µà®¾", + "dav": "டைடா", + "de": "ஜெரà¯à®®à®©à¯", + "de_AT": "ஆஸà¯à®¤à®¿à®°à®¿à®¯ ஜெரà¯à®®à®©à¯", + "de_CH": "ஸà¯à®µà®¿à®¸à¯ ஹை ஜெரà¯à®®à®©à¯", + "del": "டெலாவரà¯", + "den": "ஸà¯à®²à®¾à®µà¯", + "dgr": "டோகà¯à®°à®¿à®ªà¯", + "din": "டினà¯à®•ா", + "dje": "ஸாரà¯à®®à®¾", + "doi": "டோகà¯à®°à®¿", + "dsb": "லோயர௠சோரà¯à®ªà®¿à®¯à®©à¯", + "dua": "டà¯à®µà®¾à®²à®¾", + "dum": "மிடில௠டசà¯à®šà¯", + "dv": "திவேஹி", + "dyo": "ஜோலா-ஃபோனà¯à®¯à®¿", + "dyu": "டà¯à®¯à¯‚லா", + "dz": "பூடானி", + "dzg": "டசாகா", + "ebu": "எமà¯à®ªà¯", + "ee": "ஈவà¯", + "efi": "எஃபிகà¯", + "egy": "பணà¯à®Ÿà¯ˆà®¯ எகிபà¯à®¤à®¿à®¯à®©à¯", + "eka": "ஈகாஜà¯à®•à¯", + "el": "கிரேகà¯à®•à®®à¯", + "elx": "எலமைடà¯", + "en": "ஆஙà¯à®•ிலமà¯", + "en_AU": "ஆஸà¯à®¤à®¿à®°à¯‡à®²à®¿à®¯ ஆஙà¯à®•ிலமà¯", + "en_CA": "கனடிய ஆஙà¯à®•ிலமà¯", + "en_GB": "பிரிடà¯à®Ÿà®¿à®·à¯ ஆஙà¯à®•ிலமà¯", + "en_US": "அமெரிகà¯à®• ஆஙà¯à®•ிலமà¯", + "enm": "மிடில௠ஆஙà¯à®•ிலமà¯", + "eo": "எஸà¯à®ªà®°à¯‡à®©à¯à®Ÿà¯‹", + "es": "ஸà¯à®ªà®¾à®©à®¿à®·à¯", + "es_419": "லதà¯à®¤à®¿à®©à¯ அமெரிகà¯à®• ஸà¯à®ªà®¾à®©à®¿à®·à¯", + "es_ES": "à®à®°à¯‹à®ªà¯à®ªà®¿à®¯ ஸà¯à®ªà®¾à®©à®¿à®·à¯", + "es_MX": "மெகà¯à®¸à®¿à®•ன௠ஸà¯à®ªà®¾à®©à®¿à®·à¯", + "et": "எஸà¯à®Ÿà¯‹à®©à®¿à®¯à®©à¯", + "eu": "பாஸà¯à®•à¯", + "ewo": "எவோனà¯à®Ÿà¯‹", + "fa": "பெரà¯à®·à®¿à®¯à®©à¯", + "fan": "ஃபேஙà¯à®•à¯", + "fat": "ஃபானà¯à®Ÿà®¿", + "ff": "ஃபà¯à®²à®¾", + "fi": "ஃபினà¯à®©à®¿à®·à¯", + "fil": "ஃபிலிபினோ", + "fj": "ஃபிஜியனà¯", + "fo": "ஃபரோயிஸà¯", + "fon": "ஃபானà¯", + "fr": "பிரெஞà¯à®šà¯", + "fr_CA": "கனடிய பிரெஞà¯à®šà¯", + "fr_CH": "ஸà¯à®µà®¿à®¸à¯ பிரஞà¯à®šà¯", + "frm": "மிடில௠பிரெஞà¯à®šà¯", + "fro": "பழைய பிரெஞà¯à®šà¯", + "frr": "வடகà¯à®•௠ஃபà¯à®°à®¿à®¸à®¿à®¯à®¾à®©à¯", + "frs": "கிழகà¯à®•௠ஃபà¯à®°à®¿à®¸à®¿à®¯à®¾à®©à¯", + "fur": "ஃபà¯à®°à®¿à®¯à¯‚லியனà¯", + "fy": "மேறà¯à®•௠ஃபà¯à®°à®¿à®·à®¿à®¯à®©à¯", + "ga": "à®à®°à®¿à®·à¯", + "gaa": "கா", + "gag": "காகௌஸà¯", + "gan": "கன௠சீனமà¯", + "gay": "கயோ", + "gba": "பயா", + "gd": "ஸà¯à®•ாடà¯à®¸à¯ கேலிகà¯", + "gez": "கீஜà¯", + "gil": "கிலà¯à®ªà¯†à®°à¯à®Ÿà¯€à®¸à¯", + "gl": "காலிஸியனà¯", + "gmh": "மிடில௠ஹை ஜெரà¯à®®à®©à¯", + "gn": "கà¯à®µà®¾à®°à®©à®¿", + "goh": "பழைய ஹை ஜெரà¯à®®à®©à¯", + "gon": "கோனà¯à®Ÿà®¿", + "gor": "கோரோனà¯à®Ÿà®²à¯‹", + "got": "கோதிகà¯", + "grb": "கà¯à®°à¯‡à®ªà¯‹", + "grc": "பணà¯à®Ÿà¯ˆà®¯ கிரேகà¯à®•à®®à¯", + "gsw": "ஸà¯à®µà®¿à®¸à¯ ஜெரà¯à®®à®©à¯", + "gu": "கà¯à®œà®°à®¾à®¤à¯à®¤à®¿", + "guz": "கà¯à®¸à®¿", + "gv": "மேஙà¯à®•à¯à®¸à¯", + "gwi": "கà¯à®µà®¿à®šà®¿à®©à¯", + "ha": "ஹௌஸா", + "hai": "ஹைடா", + "hak": "ஹகà¯à®•ா சீனமà¯", + "haw": "ஹவாயியனà¯", + "he": "ஹீபà¯à®°à¯‚", + "hi": "இநà¯à®¤à®¿", + "hif": "ஃபிஜி இநà¯à®¤à®¿", + "hil": "ஹிலிகாயà¯à®©à®¾à®©à¯", + "hit": "ஹிடà¯à®Ÿà¯ˆà®Ÿà¯", + "hmn": "மாஙà¯à®•à¯", + "ho": "ஹிரி மோடà¯à®Ÿà¯", + "hr": "கà¯à®°à¯‹à®·à®¿à®¯à®©à¯", + "hsb": "அபà¯à®ªà®°à¯ சோரà¯à®ªà®¿à®¯à®¾à®©à¯", + "hsn": "சியாஙà¯à®•௠சீனமà¯", + "ht": "ஹைதà¯à®¤à®¿à®¯à®©à¯ கà¯à®°à®¿à®¯à¯‹à®²à®¿", + "hu": "ஹஙà¯à®•ேரியனà¯", + "hup": "ஹà¯à®ªà®¾", + "hy": "ஆரà¯à®®à¯‡à®©à®¿à®¯à®©à¯", + "hz": "ஹெரேரோ", + "ia": "இனà¯à®Ÿà®°à¯à®²à®¿à®™à¯à®µà®¾", + "iba": "இபானà¯", + "ibb": "இபிபியோ", + "id": "இநà¯à®¤à¯‹à®©à¯‡à®·à®¿à®¯à®©à¯", + "ie": "இனà¯à®Ÿà®°à¯à®²à®¿à®™à¯", + "ig": "இகà¯à®ªà¯‹", + "ii": "சிசà¯à®µà®¾à®©à¯ ஈ", + "ik": "இனà¯à®ªà®¿à®¯à®¾à®•à¯", + "ilo": "இலோகோ", + "inh": "இஙà¯à®•à¯à®·à¯", + "io": "இடோ", + "is": "à®à®¸à¯à®²à¯‡à®£à¯à®Ÿà®¿à®•à¯", + "it": "இதà¯à®¤à®¾à®²à®¿à®¯à®©à¯", + "iu": "இனà¯à®•ிடூடà¯", + "ja": "ஜபà¯à®ªà®¾à®©à®¿à®¯à®®à¯", + "jbo": "லோஜà¯à®ªà®©à¯", + "jgo": "நகொமà¯à®ªà®¾", + "jmc": "மாசெமà¯", + "jpr": "ஜூதேயோ-பெரà¯à®·à®¿à®¯à®©à¯", + "jrb": "ஜூதேயோ-அராபிகà¯", + "jv": "ஜாவனீஸà¯", + "ka": "ஜாரà¯à®œà®¿à®¯à®©à¯", + "kaa": "காரா-கலà¯à®ªà®¾à®•à¯", + "kab": "கபாயà¯à®²à¯", + "kac": "காசினà¯", + "kaj": "ஜà¯à®œà¯‚", + "kam": "கமà¯à®ªà®¾", + "kaw": "காவி", + "kbd": "கபாரà¯à®Ÿà®¿à®¯à®©à¯", + "kcg": "தையாபà¯", + "kde": "மகொணà¯à®Ÿà¯‡", + "kea": "கபà¯à®µà¯†à®°à¯à®¤à®¿à®¯à®¾à®©à¯", + "kfo": "கோரோ", + "kg": "காஙà¯à®•ோ", + "kha": "காஸி", + "kho": "கோதானீஸà¯", + "khq": "கொயà¯à®°à®¾ சீனீ", + "ki": "கிகà¯à®¯à¯‚", + "kj": "கà¯à®µà®¾à®©à¯à®¯à®¾à®®à®¾", + "kk": "கசாகà¯", + "kkj": "ககோ", + "kl": "கலாலிசூடà¯", + "kln": "கலினà¯à®œà®¿à®©à¯", + "km": "கெமெரà¯", + "kmb": "கிமà¯à®ªà¯à®©à¯à®¤à¯", + "kn": "கனà¯à®©à®Ÿà®®à¯", + "ko": "கொரியனà¯", + "koi": "கொமி-பெரà¯à®®à¯à®¯à®¾à®•à¯", + "kok": "கொஙà¯à®•ணி", + "kos": "கோஸà¯à®°à¯ˆà®©à¯", + "kpe": "கà¯à®ªà¯†à®²à¯à®²à¯‡", + "kr": "கனà¯à®°à®¿", + "krc": "கராசே-பலà¯à®•ாரà¯", + "krl": "கரேலியனà¯", + "kru": "கà¯à®°à¯à®•à¯", + "ks": "காஷà¯à®®à®¿à®°à®¿", + "ksb": "à®·à®®à¯à®ªà®¾à®²à®¾", + "ksf": "பாஃபியா", + "ksh": "கொலோகà¯à®©à®¿à®¯à®©à¯", + "ku": "கà¯à®°à¯à®¤à®¿à®·à¯", + "kum": "கà¯à®®à¯à®‡à®•à¯", + "kut": "கà¯à®Ÿà¯‡à®©à¯ˆ", + "kv": "கொமி", + "kw": "காரà¯à®©à®¿à®·à¯", + "ky": "கிரà¯à®•ிஸà¯", + "la": "லதà¯à®¤à®¿à®©à¯", + "lad": "லடினோ", + "lag": "லஙà¯à®•ி", + "lah": "லஹனà¯à®Ÿà®¾", + "lam": "லமà¯à®ªà®¾", + "lb": "லகà¯à®¸à®®à¯à®ªà¯‹à®°à¯à®•ிஷà¯", + "lez": "லெஜà¯à®œà®¿à®¯à®©à¯", + "lg": "கானà¯à®Ÿà®¾", + "li": "லிமà¯à®ªà®°à¯à®•ிஷà¯", + "lkt": "லகோடா", + "ln": "லிஙà¯à®•ாலா", + "lo": "லாவோ", + "lol": "மோஙà¯à®•ோ", + "loz": "லோசி", + "lrc": "வடகà¯à®•௠லà¯à®°à®¿", + "lt": "லிதà¯à®µà¯‡à®©à®¿à®¯à®©à¯", + "lu": "லà¯à®ªà®¾-கடாஙà¯à®•ா", + "lua": "லà¯à®ªà®¾-லà¯à®²à¯à®²à®¾", + "lui": "லà¯à®¯à¯à®šà¯‡à®©à¯‹", + "lun": "லூனà¯à®Ÿà®¾", + "luo": "லà¯à®¯à¯‹", + "lus": "மிஸோ", + "luy": "லà¯à®¯à®¿à®¯à®¾", + "lv": "லாடà¯à®µà®¿à®¯à®©à¯", + "mad": "மதà¯à®°à¯€à®¸à¯", + "mag": "மகாஹி", + "mai": "மைதிலி", + "mak": "மகாசாரà¯", + "man": "மானà¯à®Ÿà®¿à®™à¯à®•ோ", + "mas": "மாசாயà¯", + "mdf": "மோகà¯à®•à¯à®·à®¾", + "mdr": "மானà¯à®Ÿà®¾à®°à¯", + "men": "மெனà¯à®Ÿà¯€", + "mer": "மெரà¯", + "mfe": "மொரிசியனà¯", + "mg": "மலகாஸி", + "mga": "மிடில௠à®à®°à®¿à®·à¯", + "mgh": "மகà¯à®µà®¾-மீடà¯à®Ÿà¯‹", + "mgo": "மேடா", + "mh": "மாரà¯à®·à¯†à®²à¯€à®¸à¯", + "mi": "மௌரி", + "mic": "மிகà¯à®®à®¾à®•à¯", + "min": "மினà¯à®©à®¾à®™à¯à®•பௌ", + "mk": "மாஸிடோனியனà¯", + "ml": "மலையாளமà¯", + "mn": "மஙà¯à®•ோலியனà¯", + "mnc": "மனà¯à®šà¯‚", + "mni": "மணிபà¯à®ªà¯à®°à®¿", + "moh": "மொஹாகà¯", + "mos": "மோஸà¯à®¸à®¿", + "mr": "மராதà¯à®¤à®¿", + "ms": "மலாயà¯", + "mt": "மாலà¯à®Ÿà®¿à®¸à¯", + "mua": "à®®à¯à®©à¯à®Ÿà®¾à®™à¯", + "mul": "பல மொழிகளà¯", + "mus": "கà¯à®°à¯€à®•à¯", + "mwl": "மிரானà¯à®Ÿà¯€à®¸à¯", + "mwr": "மாரà¯à®µà®¾à®°à®¿", + "my": "பரà¯à®®à¯€à®¸à¯", + "myv": "à®à®°à¯à®œà®¿à®¯à®¾", + "mzn": "மசநà¯à®¤à¯‡à®°à®©à®¿", + "na": "நவà¯à®°à¯‚", + "nan": "மின௠நான௠சீனமà¯", + "nap": "நியோபோலிடனà¯", + "naq": "நாமா", + "nb": "நாரà¯à®µà¯‡à®œà®¿à®¯à®©à¯ பொகà¯à®®à®¾à®²à¯", + "nd": "வடகà¯à®•௠தெபெலே", + "nds": "லோ ஜெரà¯à®®à®©à¯", + "nds_NL": "லோ சாகà¯à®¸à®©à¯", + "ne": "நேபாளி", + "new": "நெவாரி", + "ng": "தோஙà¯à®•ா", + "nia": "நியாஸà¯", + "niu": "நியூவானà¯", + "nl": "டசà¯à®šà¯", + "nl_BE": "ஃபà¯à®²à¯†à®®à®¿à®·à¯", + "nmg": "கà¯à®µà®¾à®šà®¿à®¯à¯‹", + "nn": "நாரà¯à®µà¯‡à®œà®¿à®¯à®©à¯ நியூநாரà¯à®¸à¯à®•à¯", + "nnh": "நெகெயà¯à®®à¯à®ªà¯‚னà¯", + "no": "நாரà¯à®µà¯‡à®œà®¿à®¯à®©à¯", + "nog": "நோகை", + "non": "பழைய நோரà¯à®¸à¯", + "nqo": "எனà¯â€˜à®•ோ", + "nr": "தெறà¯à®•௠தெபெலே", + "nso": "வடகà¯à®•௠சோதோ", + "nus": "நியூரà¯", + "nv": "நவாஜோ", + "nwc": "பாரமà¯à®ªà®°à®¿à®¯ நேவாரி", + "ny": "நயனà¯à®œà®¾", + "nym": "நியாமà¯à®µà¯‡à®œà®¿", + "nyn": "நியானà¯à®•ோலே", + "nyo": "நியோரோ", + "nzi": "நிஜà¯à®®à®¾", + "oc": "ஒகà¯à®•ிடனà¯", + "oj": "ஒஜிபà¯à®µà®¾", + "om": "ஒரோமோ", + "or": "ஒடியா", + "os": "ஒசெடà¯à®Ÿà®¿à®•à¯", + "osa": "ஓசேஜà¯", + "ota": "ஓடà¯à®Ÿà¯‹à®®à®¾à®©à¯ தà¯à®°à¯à®•à¯à®•ிஷà¯", + "pa": "பஞà¯à®šà®¾à®ªà®¿", + "pag": "பனà¯à®•ாசினனà¯", + "pal": "பாஹà¯à®²à®µà®¿", + "pam": "பமà¯à®ªà®¾à®™à¯à®•ா", + "pap": "பபியாமெனà¯à®Ÿà¯‹", + "pau": "பலௌவனà¯", + "pcm": "நைஜீரியன௠பிடà¯à®•ினà¯", + "pdc": "பெனà¯à®šà®¿à®²à¯à®µà¯‡à®©à®¿à®¯ ஜெரà¯à®®à®©à¯", + "peo": "பழைய பெரà¯à®·à®¿à®¯à®©à¯", + "phn": "ஃபொனிஷியனà¯", + "pi": "பாலி", + "pl": "போலிஷà¯", + "pon": "ஃபோனà¯à®ªà¯†à®¯à¯†à®©à¯", + "prg": "பிரஷà¯à®¯à®©à¯", + "pro": "பழைய பà¯à®°à¯‹à®µà¯†à®©à¯à®šà®¾à®²à¯", + "ps": "பஷà¯à®¤à¯‹", + "pt": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸà¯", + "pt_BR": "பிரேசிலிய போரà¯à®šà¯à®šà¯à®•ீஸà¯", + "pt_PT": "à®à®°à¯‹à®ªà¯à®ªà®¿à®¯ போரà¯à®šà¯à®šà¯à®•ீஸà¯", + "qu": "கà¯à®µà¯†à®šà¯à®šà¯à®µà®¾", + "quc": "கீசீ", + "raj": "ராஜஸà¯à®¤à®¾à®©à®¿", + "rap": "ரபனà¯à®¯à¯", + "rar": "ரரோடோஙà¯à®•னà¯", + "rm": "ரோமானà¯à®·à¯", + "rn": "à®°à¯à®£à¯à®Ÿà®¿", + "ro": "ரோமேனியனà¯", + "ro_MD": "மோலà¯à®Ÿà®¾à®µà®¿à®¯à®©à¯", + "rof": "ரோமà¯à®ªà¯‹", + "rom": "ரோமானி", + "root": "ரூடà¯", + "ru": "ரஷியனà¯", + "rup": "அரோமானியனà¯", + "rw": "கினà¯à®¯à®¾à®°à¯à®µà®¾à®©à¯à®Ÿà®¾", + "rwk": "à®°à¯à®µà®¾", + "sa": "சமஸà¯à®•ிரà¯à®¤à®®à¯", + "sad": "சானà¯à®Ÿà®¾à®µà¯‡", + "sah": "சகா", + "sam": "சமாரிடன௠அராமைகà¯", + "saq": "சமà¯à®ªà¯à®°à¯", + "sas": "சாசாகà¯", + "sat": "சானà¯à®Ÿà®¾à®²à®¿", + "saz": "சௌராஷà¯à®Ÿà®¿à®°à®®à¯", + "sba": "நெகாமà¯à®ªà¯‡", + "sbp": "சஙà¯à®•à¯", + "sc": "சாரà¯à®¤à¯€à®©à®¿à®¯à®©à¯", + "scn": "சிசிலியனà¯", + "sco": "ஸà¯à®•ாடà¯à®¸à¯", + "sd": "சிநà¯à®¤à®¿", + "sdh": "தெறà¯à®•௠கà¯à®°à¯à®¤à®¿à®·à¯", + "se": "வடகà¯à®•௠சமி", + "seh": "செனா", + "sel": "செலà¯à®•à¯à®ªà¯", + "ses": "கொயà¯à®°à®¾à®ªà¯‹à®°à¯‹ செனà¯à®©à®¿", + "sg": "சாஙà¯à®•ோ", + "sga": "பழைய à®à®°à®¿à®·à¯", + "sh": "செரà¯à®ªà¯‹-கà¯à®°à¯‹à®·à®¿à®¯à®©à¯", + "shi": "தசேஹிதà¯", + "shn": "ஷானà¯", + "si": "சிஙà¯à®•ளமà¯", + "sid": "சிடாமோ", + "sk": "ஸà¯à®²à¯‹à®µà®¾à®•à¯", + "sl": "ஸà¯à®²à¯‹à®µà¯‡à®©à®¿à®¯à®©à¯", + "sm": "சமோவானà¯", + "sma": "தெறà¯à®•௠சமி", + "smj": "லà¯à®²à¯‡ சமி", + "smn": "இனாரி சமி", + "sms": "ஸà¯à®•ோலà¯à®Ÿà¯ சமி", + "sn": "ஷோனா", + "snk": "சோனினà¯à®•ே", + "so": "சோமாலி", + "sog": "சோகà¯à®¤à®¿à®¯à®©à¯", + "sq": "அலà¯à®ªà¯‡à®©à®¿à®¯à®©à¯", + "sr": "செரà¯à®ªà®¿à®¯à®©à¯", + "srn": "ஸà¯à®°à®¾à®©à®©à¯ டோஙà¯à®•ோ", + "srr": "செரெரà¯", + "ss": "ஸà¯à®µà®¾à®Ÿà¯€", + "ssy": "சஹோ", + "st": "தெறà¯à®•௠ஸோதோ", + "su": "சà¯à®£à¯à®Ÿà®¾à®©à¯€à®¸à¯", + "suk": "சà¯à®•à¯à®®à®¾", + "sus": "சà¯à®šà¯", + "sux": "சà¯à®®à¯‡à®°à®¿à®¯à®©à¯", + "sv": "ஸà¯à®µà¯€à®Ÿà®¿à®·à¯", + "sw": "ஸà¯à®µà®¾à®¹à®¿à®²à®¿", + "sw_CD": "காஙà¯à®•ோ ஸà¯à®µà®¾à®¹à®¿à®²à®¿", + "swb": "கொமோரியனà¯", + "syc": "பாரமà¯à®ªà®°à®¿à®¯ சிரியாகà¯", + "syr": "சிரியாகà¯", + "ta": "தமிழà¯", + "te": "தெலà¯à®™à¯à®•à¯", + "tem": "டிமà¯à®©à¯‡", + "teo": "டெசோ", + "ter": "டெரெனோ", + "tet": "டெடà¯à®®à¯", + "tg": "தஜிகà¯", + "th": "தாயà¯", + "ti": "டிகà¯à®°à®¿à®©à¯à®¯à®¾", + "tig": "டைகà¯à®°à¯‡", + "tiv": "டிவà¯", + "tk": "தà¯à®°à¯à®•à¯à®®à¯†à®©à¯", + "tkl": "டோகேலௌ", + "tl": "டாகாலோகà¯", + "tlh": "கà¯à®³à®¿à®™à¯à®•ோனà¯", + "tli": "லிஙà¯à®•ிடà¯", + "tmh": "தமஷேகà¯", + "tn": "ஸà¯à®µà®¾à®©à®¾", + "to": "டோஙà¯à®•ானà¯", + "tog": "நயாசா டோஙà¯à®•ா", + "tpi": "டோக௠பிஸினà¯", + "tr": "தà¯à®°à¯à®•à¯à®•ிஷà¯", + "trv": "தரோகோ", + "ts": "ஸோஙà¯à®•ா", + "tsi": "டà¯à®¸à®¿à®®à¯à®·à®¿à®¯à®©à¯", + "tt": "டாடரà¯", + "tum": "தà¯à®®à¯à®ªà¯à®•ா", + "tvl": "டà¯à®µà®¾à®²à¯", + "tw": "டà¯à®µà®¿", + "twq": "டசவாகà¯", + "ty": "தஹிதியனà¯", + "tyv": "டà¯à®µà®¿à®©à®¿à®¯à®©à¯", + "tzm": "மதà¯à®¤à®¿à®¯ அடà¯à®²à®¸à¯ டமசைடà¯", + "udm": "உடà¯à®®à¯à®°à¯à®Ÿà¯", + "ug": "உயà¯à®•à¯à®°à¯", + "uga": "உகாரிடிகà¯", + "uk": "உகà¯à®°à¯ˆà®©à®¿à®¯à®©à¯", + "umb": "à®…à®®à¯à®ªà¯Šà®£à¯à®Ÿà¯", + "und": "அறியபà¯à®ªà®Ÿà®¾à®¤ மொழி", + "ur": "உரà¯à®¤à¯", + "uz": "உஸà¯à®ªà¯†à®•à¯", + "vai": "வை", + "ve": "வெனà¯à®Ÿà®¾", + "vi": "வியடà¯à®¨à®¾à®®à¯€à®¸à¯", + "vo": "ஒலாபூகà¯", + "vot": "வோடà¯à®•à¯", + "vun": "வà¯à®©à¯à®œà¯‹", + "wa": "ஒவாலூனà¯", + "wae": "வாலà¯à®šà¯‡à®°à¯", + "wal": "வோலாயà¯à®Ÿà¯à®Ÿà®¾", + "war": "வாரே", + "was": "வாஷோ", + "wbp": "வலà¯à®ªà®¿à®°à®¿", + "wo": "ஓலோஃபà¯", + "wuu": "வூ சீனமà¯", + "xal": "கலà¯à®®à®¿à®•à¯", + "xh": "ஹோசா", + "xog": "சோகா", + "yao": "யாவà¯", + "yap": "யாபேசே", + "yav": "யாஙà¯à®ªà¯†à®©à¯", + "ybb": "யெமà¯à®ªà®¾", + "yi": "யெடà¯à®Ÿà®¿à®·à¯", + "yo": "யோரà¯à®ªà®¾", + "yue": "காணà¯à®Ÿà¯‹à®©à¯€à®¸à¯", + "za": "ஜà¯à®µà®¾à®™à¯", + "zap": "ஜாபோடெகà¯", + "zbl": "பà¯à®²à®¿à®¸à¯à®¸à®¿à®®à¯à®ªà®¾à®²à¯à®¸à¯", + "zen": "ஜெனகா", + "zgh": "ஸà¯à®Ÿà®¾à®£à¯à®Ÿà®°à¯à®Ÿà¯ மொராகà¯à®•ன௠தமாசைடà¯", + "zh": "சீனமà¯", + "zh_Hans": "எளிதாகà¯à®•பà¯à®ªà®Ÿà¯à®Ÿ சீனமà¯", + "zh_Hant": "பாரமà¯à®ªà®°à®¿à®¯ சீனமà¯", + "zu": "ஜà¯à®²à¯", + "zun": "ஜூனி", + "zxx": "மொழி உளà¯à®³à®Ÿà®•à¯à®•ம௠à®à®¤à¯à®®à®¿à®²à¯à®²à¯ˆ", + "zza": "ஜாஜா" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/te.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/te.json new file mode 100644 index 0000000000000000000000000000000000000000..2b6f7ff027bcf1a5176acee8b2c89485aaea126f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/te.json @@ -0,0 +1,524 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "అఫారà±", + "ab": "à°…à°¬à±à°–ాజియనà±", + "ace": "ఆఖినీసà±", + "ach": "అకోలి", + "ada": "అడాంగà±à°®à±‡", + "ady": "అడిగాబà±à°œà±‡", + "ae": "అవేసà±à°Ÿà°¾à°¨à±", + "aeb": "à°Ÿà±à°¨à±€à°·à°¿à°¯à°¾ అరబికà±", + "af": "ఆఫà±à°°à°¿à°•ానà±à°¸à±", + "afh": "à°…à°«à±à°°à°¿à°¹à°¿à°²à°¿", + "agq": "అగేమà±", + "ain": "à°à°¨à±", + "ak": "అకానà±", + "akk": "à°…à°•à±à°•ాడియానà±", + "ale": "అలియà±à°Ÿà±", + "alt": "దకà±à°·à°¿à°£ ఆలà±à°Ÿà±ˆ", + "am": "à°…à°®à±à°¹à°¾à°°à°¿à°•à±", + "an": "అరగోనిసà±", + "ang": "à°ªà±à°°à°¾à°šà±€à°¨ ఆంగà±à°²à°‚", + "anp": "ఆంగిక", + "ar": "అరబికà±", + "ar_001": "ఆధà±à°¨à°¿à°• à°ªà±à°°à°¾à°®à°¾à°£à°¿à°• అరబికà±", + "arc": "అరామేకà±", + "arn": "అరౌకేనియనà±", + "arp": "అరాపాహో", + "arw": "అరావాకà±", + "arz": "ఈజిపà±à°·à°¿à°¯à°¨à± అరబికà±", + "as": "à°…à°¸à±à°¸à°¾à°®à±€à°¸à±", + "asa": "à°…à°¸à±", + "ast": "à°…à°¸à±à°Ÿà±à°°à°¿à°¯à°¾à°¨à±", + "av": "అవారికà±", + "awa": "అవధి", + "ay": "à°à°®à°¾à°°à°¾", + "az": "అజరà±à°¬à±ˆà°œà°¾à°¨à°¿", + "ba": "బషà±à°•à°¿à°°à±", + "bal": "బాలà±à°šà°¿", + "ban": "బాలినీసà±", + "bas": "బసా", + "be": "బెలరà±à°·à°¿à°¯à°¨à±", + "bej": "బేజా", + "bem": "బెంబా", + "bez": "బీనా", + "bg": "బలà±à°—ేరియనà±", + "bgn": "పశà±à°šà°¿à°® బలూచీ", + "bho": "భోజౠపూరి", + "bi": "బిసà±à°²à°¾à°®à°¾", + "bik": "బికోలà±", + "bin": "బిని", + "bla": "సికౠసికా", + "bm": "బంబారా", + "bn": "బాంగà±à°²à°¾", + "bo": "టిబెటనà±", + "bpy": "బిషà±à°£à±à°ªà±à°°à°¿à°¯", + "br": "à°¬à±à°°à±†à°Ÿà°¨à±", + "bra": "à°¬à±à°°à°¾à°œà±", + "brx": "బోడో", + "bs": "బోసà±à°¨à°¿à°¯à°¨à±", + "bua": "à°¬à±à°°à°¿à°¯à°Ÿà±", + "bug": "à°¬à±à°¯à±à°—ినిసà±", + "byn": "à°¬à±à°²à°¿à°¨à±", + "ca": "కెటలానà±", + "cad": "కేడà±à°¡à±‹", + "car": "కేరిబà±", + "cch": "à°…à°Ÿà±à°¸à°¾à°®à±", + "ce": "చెచెనà±", + "ceb": "సెబà±à°¯à°¾à°¨à±‹", + "cgg": "ఛిగా", + "ch": "చమరà±à°°à±‹", + "chb": "à°šà°¿à°¬à±à°šà°¾", + "chg": "చాగటై", + "chk": "చూకిసà±", + "chm": "మారి", + "chn": "చినూకౠజారà±à°—à°¨à±", + "cho": "చొచà±à°•తావà±", + "chp": "చిపెవà±à°¯à°¾à°¨à±", + "chr": "చెరోకీ", + "chy": "చేయేనà±", + "ckb": "సెంటà±à°°à°²à± à°•à±à°°à±à°¦à°¿à°·à±", + "co": "కోరà±à°¸à°¿à°•à°¨à±", + "cop": "కోపà±à°Ÿà°¿à°•à±", + "cr": "à°•à±à°°à°¿", + "crh": "à°•à±à°°à°¿à°®à°¿à°¯à°¨à± à°Ÿà°°à±à°•à°¿à°·à±", + "crs": "సెసేలà±à°µà°¾ à°•à±à°°à°¿à°¯à±‹à°²à± à°«à±à°°à±†à°‚à°šà±", + "cs": "చెకà±", + "csb": "à°•à°·à±à°¬à°¿à°¯à°¨à±", + "cu": "à°šà°°à±à°š à°¸à±à°²à°¾à°µà°¿à°•à±", + "cv": "à°šà±à°µà°¾à°·à±", + "cy": "వెలà±à°·à±", + "da": "డానిషà±", + "dak": "డకోటా", + "dar": "డారà±à°—à±à°µà°¾", + "dav": "టైటా", + "de": "జరà±à°®à°¨à±", + "de_AT": "ఆసà±à°Ÿà±à°°à±‡à°²à°¿à°¯à°¨à± జరà±à°®à°¨à±", + "de_CH": "à°¸à±à°µà°¿à°¸à± హై జరà±à°®à°¨à±", + "del": "డెలావేరà±", + "den": "à°¸à±à°²à±‡à°µà±", + "dgr": "డోగà±à°°à°¿à°¬à±", + "din": "à°¡à°¿à°‚à°•à°¾", + "dje": "జారà±à°®à°¾", + "doi": "డోగà±à°°à°¿", + "dsb": "లోవరౠసోరà±à°¬à°¿à°¯à°¨à±", + "dua": "à°¦à±à°†à°²à°¾", + "dum": "మధà±à°¯à°® à°¡à°šà±", + "dv": "దివేహి", + "dyo": "జోలా-ఫోనయి", + "dyu": "à°¡à±à°¯à±à°²à°¾", + "dz": "జోంఖా", + "dzg": "డాజాగా", + "ebu": "ఇంబà±", + "ee": "ఈవీ", + "efi": "à°Žà°«à°¿à°•à±", + "egy": "à°ªà±à°°à°¾à°šà±€à°¨ ఈజిపà±à°·à°¿à°¯à°¨à±", + "eka": "à°à°•ాజకà±", + "el": "à°—à±à°°à±€à°•à±", + "elx": "ఎలామైటà±", + "en": "ఆంగà±à°²à°‚", + "en_AU": "ఆసà±à°Ÿà±à°°à±‡à°²à°¿à°¯à°¨à± ఇంగà±à°²à±€à°·à±", + "en_CA": "కెనడియనౠఇంగà±à°²à±€à°·à±", + "en_GB": "à°¬à±à°°à°¿à°Ÿà°¿à°·à± ఇంగà±à°²à±€à°·à±", + "en_US": "అమెరికనౠఇంగà±à°²à±€à°·à±", + "enm": "మధà±à°¯à°® ఆంగà±à°²à°‚", + "eo": "à°Žà°¸à±à°ªà±†à°°à°¾à°‚టో", + "es": "à°¸à±à°ªà°¾à°¨à°¿à°·à±", + "es_419": "లాటినౠఅమెరికనౠసà±à°ªà°¾à°¨à°¿à°·à±", + "es_ES": "యూరోపియనౠసà±à°ªà°¾à°¨à°¿à°·à±", + "es_MX": "మెకà±à°¸à°¿à°•నౠసà±à°ªà°¾à°¨à°¿à°·à±", + "et": "ఈసà±à°Ÿà±‹à°¨à°¿à°¯à°¨à±", + "eu": "బాసà±à°•à±à°¯à±‚", + "ewo": "ఎవోండొ", + "fa": "పరà±à°·à°¿à°¯à°¨à±", + "fan": "ఫాంగà±", + "fat": "ఫాంటి", + "ff": "à°«à±à°¯à±à°²", + "fi": "à°«à°¿à°¨à±à°¨à°¿à°·à±", + "fil": "ఫిలిపినో", + "fj": "ఫిజియనà±", + "fo": "ఫారోయీజà±", + "fon": "ఫానà±", + "fr": "à°«à±à°°à±†à°‚à°šà±", + "fr_CA": "కెనడియెనౠఫà±à°°à±†à°‚à°šà±", + "fr_CH": "à°¸à±à°µà°¿à°¸à± à°«à±à°°à±†à°‚à°šà±", + "frm": "మధà±à°¯à°® à°ªà±à°°à±†à°‚à°šà±", + "fro": "à°ªà±à°°à°¾à°šà±€à°¨ à°«à±à°°à±†à°‚à°šà±", + "frr": "ఉతà±à°¤à°° à°«à±à°°à°¿à°¸à°¿à°¯à°¨à±", + "frs": "తూరà±à°ªà± à°«à±à°°à°¿à°¸à°¿à°¯à°¨à±", + "fur": "à°«à±à°°à°¿à°¯à±à°²à°¿à°¯à°¨à±", + "fy": "పశà±à°šà°¿à°® à°«à±à°°à°¿à°¸à°¿à°¯à°¨à±", + "ga": "à°à°°à°¿à°·à±", + "gaa": "à°—à°¾", + "gag": "గాగౌజà±", + "gan": "గానౠచైనీసà±", + "gay": "గాయో", + "gba": "à°—à±à°¬à°¾à°¯à°¾", + "gd": "à°¸à±à°•ాటిషౠగేలికà±", + "gez": "జీజà±", + "gil": "à°—à°¿à°²à±à°¬à°°à±à°Ÿà±€à°¸à±", + "gl": "గాలిషియనà±", + "gmh": "మధà±à°¯à°® హై జరà±à°®à°¨à±", + "gn": "à°—à±à°°à°¾à°¨à°¿", + "goh": "à°ªà±à°°à°¾à°šà±€à°¨ హై జరà±à°®à°¨à±", + "gon": "గోండి", + "gor": "గోరోంటలా", + "got": "గోథికà±", + "grb": "à°—à±à°°à±‡à°¬à±‹", + "grc": "à°ªà±à°°à°¾à°šà±€à°¨ à°—à±à°°à±€à°•à±", + "gsw": "à°¸à±à°µà°¿à°¸à± జరà±à°®à°¨à±", + "gu": "à°—à±à°œà°°à°¾à°¤à°¿", + "guz": "à°—à±à°¸à±à°¸à±€", + "gv": "మంకసà±", + "gwi": "à°—à±à°µà°¿à°šà°¿à°¨à±", + "ha": "హౌసా", + "hai": "హైడా", + "hak": "హకà±à°•à°¾ చైనీసà±", + "haw": "హవాయియనà±", + "he": "హీబà±à°°à±‚", + "hi": "హిందీ", + "hil": "హిలిగేయినోనà±", + "hit": "హిటà±à°Ÿà°¿à°Ÿà±‡", + "hmn": "మోంగà±", + "ho": "హిరి మోటà±", + "hr": "à°•à±à°°à±‹à°¯à±‡à°·à°¿à°¯à°¨à±", + "hsb": "à°…à°ªà±à°ªà°°à± సోరà±à°¬à°¿à°¯à°¨à±", + "hsn": "జియాంగౠచైనీసà±", + "ht": "హైటియనౠకà±à°°à°¿à°¯à±‹à°²à±", + "hu": "హంగేరియనà±", + "hup": "à°¹à±à°ªà°¾", + "hy": "ఆరà±à°®à±‡à°¨à°¿à°¯à°¨à±", + "hz": "హిరేరో", + "ia": "ఇంటరà±à°²à°¿à°‚à°—à±à°µà°¾", + "iba": "à°à°¬à°¾à°¨à±", + "ibb": "ఇబిబియో", + "id": "ఇండోనేషియనà±", + "ie": "ఇంటరà±à°²à°¿à°‚à°—à±", + "ig": "ఇగà±à°¬à±‹", + "ii": "à°¶à°¿à°·à±à°µà°¨à± à°ˆ", + "ik": "ఇనà±à°ªà±ˆà°¯à°¾à°•à±", + "ilo": "à°à°¯à±‹à°•ో", + "inh": "ఇంగà±à°·à±", + "io": "ఈడౌ", + "is": "à°à°¸à±à°²à°¾à°‚à°¡à°¿à°•à±", + "it": "ఇటాలియనà±", + "iu": "ఇంకà±à°Ÿà°¿à°Ÿà±à°Ÿà±", + "ja": "జపనీసà±", + "jbo": "లోజà±à°¬à°¾à°¨à±", + "jgo": "గోంబా", + "jmc": "మకొమà±", + "jpr": "à°œà±à°¯à±à°¡à°¿à°¯à±‹-పరà±à°·à°¿à°¯à°¨à±", + "jrb": "à°œà±à°¯à±à°¡à°¿à°¯à±‹-అరబికà±", + "jv": "జావనీసà±", + "ka": "జారà±à°œà°¿à°¯à°¨à±", + "kaa": "కారా-à°•à°²à±à°ªà°¾à°•à±", + "kab": "కాబిలà±", + "kac": "కాచినà±", + "kaj": "à°œà±à°¯à±‚", + "kam": "కంబా", + "kaw": "కావి", + "kbd": "కబారà±à°¡à°¿à°¯à°¨à±", + "kcg": "à°Ÿà±à°¯à°¾à°ªà±", + "kde": "మకొండే", + "kea": "కాబà±à°µà±‡à°°à±à°¦à°¿à°¯à°¨à±", + "kfo": "కోరో", + "kg": "కోంగో", + "kha": "ఖాసి", + "kho": "ఖటోనీసà±", + "khq": "కొయరా చీనà±à°¨à±€", + "ki": "à°•à°¿à°•à±à°¯à±", + "kj": "à°•à±à°µà°¾à°¨à±à°¯à°¾à°®", + "kk": "కజఖà±", + "kkj": "కాకో", + "kl": "కలాలà±à°²à°¿à°¸à±‚à°Ÿà±", + "kln": "కలెంజినà±", + "km": "à°–à±à°®à±‡à°°à±", + "kmb": "à°•à°¿à°®à±à°¬à±à°‚à°¡à±", + "kn": "à°•à°¨à±à°¨à°¡", + "ko": "కొరియనà±", + "koi": "కోమి-పరà±à°®à°¾à°•à±", + "kok": "కొంకణి", + "kos": "కోసà±à°°à±‡à°¯à°¨à±", + "kpe": "పెలà±à°²à±‡", + "kr": "కానà±à°°à°¿", + "krc": "కరచే-బలà±à°•ారà±", + "krl": "కరేలియనà±", + "kru": "కూరà±à°–à±", + "ks": "కాశà±à°®à±€à°°à°¿", + "ksb": "శంబాలా", + "ksf": "బాఫియ", + "ksh": "కొలొజీయనà±", + "ku": "à°•à±à°°à±à°¦à°¿à°·à±", + "kum": "à°•à±à°®à±à°¯à°¿à°•à±", + "kut": "à°•à±à°Ÿà±‡à°¨à±ˆ", + "kv": "కోమి", + "kw": "కోరà±à°¨à°¿à°·à±", + "ky": "à°•à°¿à°°à±à°—à°¿à°œà±", + "la": "లాటినà±", + "lad": "లాడినో", + "lag": "లాంగీ", + "lah": "లాహండా", + "lam": "లాంబా", + "lb": "à°²à±à°•à±à°¸à°‚బరà±à°—à°¿à°·à±", + "lez": "లేజà±à°˜à°¿à°¯à°¨à±", + "lg": "గాండా", + "li": "లిమà±à°¬à°°à±à°—à°¿à°·à±", + "lkt": "లకొటా", + "ln": "లింగాల", + "lo": "లావో", + "lol": "మొంగో", + "loz": "లోజి", + "lrc": "ఉతà±à°¤à°° లూరీ", + "lt": "లిథà±à°¯à±‡à°¨à°¿à°¯à°¨à±", + "lu": "లూబ-కటాంగ", + "lua": "à°²à±à°¬à°¾-à°²à±à°²à±à°µ", + "lui": "à°²à±à°¯à°¿à°¸à±†à°¨à±‹", + "lun": "à°²à±à°‚à°¡à°¾", + "luo": "à°²à±à°µà±‹", + "lus": "మిజో", + "luy": "à°²à±à°¯à°¿à°¯", + "lv": "లాటà±à°µà°¿à°¯à°¨à±", + "mad": "మాదà±à°°à±€à°¸à±", + "mag": "మగాహి", + "mai": "మైథిలి", + "mak": "మకాసారà±", + "man": "మండింగో", + "mas": "మాసాయి", + "mdf": "మొకà±à°·à°¾", + "mdr": "మండారà±", + "men": "మెండే", + "mer": "మెరà±", + "mfe": "మొరిసà±à°¯à±‡à°¨à±", + "mg": "మాలాగసి", + "mga": "మధà±à°¯à°® à°à°°à°¿à°·à±", + "mgh": "మకà±à°µà°¾-మిటà±à°Ÿà±‹", + "mgo": "మెటా", + "mh": "మారà±à°·à°²à±€à°¸à±", + "mi": "మయోరి", + "mic": "మికమాకà±", + "min": "మినాంగà±à°•ాబో", + "mk": "మసడోనియనà±", + "ml": "మలయాళం", + "mn": "మంగోలియనà±", + "mnc": "మంచà±", + "mni": "మణిపూరి", + "moh": "మోహà±à°•à±", + "mos": "మోసà±à°¸à°¿", + "mr": "మరాఠీ", + "ms": "మలేయà±", + "mt": "మాలà±à°Ÿà±€à°¸à±", + "mua": "à°®à±à°¦à°¾à°‚à°—à±", + "mul": "బహà±à°³ భాషలà±", + "mus": "à°•à±à°°à±€à°•à±", + "mwl": "మిరాండిసà±", + "mwr": "మారà±à°µà°¾à°¡à°¿", + "my": "బరà±à°®à±€à°¸à±", + "myv": "à°Žà°°à±à°œà°¿à°¯à°¾", + "mzn": "మాసనà±â€Œà°¦à±†à°°à°¾à°¨à°¿", + "na": "నౌరà±", + "nan": "మినౠనానౠచైనీసà±", + "nap": "నియాపోలిటనà±", + "naq": "నమ", + "nb": "నారà±à°µà±‡à°œà°¿à°¯à°¨à± బొకà±à°®à°¾à°²à±", + "nd": "ఉతà±à°¤à°° దెబెలె", + "nds": "లో జరà±à°®à°¨à±", + "nds_NL": "లో సాకà±à°¸à°¨à±", + "ne": "నేపాలి", + "new": "నెవారి", + "ng": "దోంగా", + "nia": "నియాసà±", + "niu": "నియూఇయానà±", + "nl": "à°¡à°šà±", + "nl_BE": "à°«à±à°²à±†à°®à°¿à°·à±", + "nmg": "à°•à±à°µà°¾à°¸à°¿à°¯à±†", + "nn": "నారà±à°µà±‡à°œà°¿à°¯à°¾à°¨à± à°¨à±à°¯à±‹à°°à±à°¸à±à°•à±", + "nnh": "గింబోనà±", + "no": "నారà±à°µà±‡à°œà°¿à°¯à°¨à±", + "nog": "నోగై", + "non": "à°ªà±à°°à°¾à°šà°¿à°¨ నోరà±à°¸à±", + "nqo": "à°¨à±à°•ో", + "nr": "దకà±à°·à°¿à°£ దెబెలె", + "nso": "ఉతà±à°¤à°° సోతో", + "nus": "à°¨à±à°¯à±à°°à±", + "nv": "నవాజొ", + "nwc": "సాంపà±à°°à°¦à°¾à°¯ à°¨à±à°¯à±‚యారీ", + "ny": "à°¨à±à°¯à°¾à°¨à±à°œà°¾", + "nym": "à°¨à±à°¯à°‚వేజి", + "nyn": "à°¨à±à°¯à°¾à°¨à±à°•ోలె", + "nyo": "నేయోరో", + "nzi": "జీమా", + "oc": "ఆకà±à°¸à°¿à°Ÿà°¨à±", + "oj": "చేవా", + "om": "ఒరోమో", + "or": "ఒడియా", + "os": "ఒసేటికà±", + "osa": "ఒసాజà±", + "ota": "à°’à°Ÿà±à°Ÿà±‹à°®à°¨à± à°Ÿà°°à±à°•à°¿à°·à±", + "pa": "పంజాబీ", + "pag": "పంగా సినానà±", + "pal": "పహà±à°²à°¾à°µà°¿", + "pam": "పంపగà±à°¨", + "pap": "పపియమేంటో", + "pau": "పాలà±à°†à°¨à±", + "pcm": "నైజీరియా పిడà±à°—à°¿à°¨à±", + "peo": "à°ªà±à°°à°¾à°šà±€à°¨ పరà±à°·à°¿à°¯à°¨à±", + "phn": "ఫోనికనà±", + "pi": "పాలీ", + "pl": "పోలిషà±", + "pon": "పోహà±à°¨à±à°ªà±†à°¯à°¨à±", + "prg": "à°ªà±à°°à°·à±à°¯à°¨à±", + "pro": "à°ªà±à°°à°¾à°šà±€à°¨ à°ªà±à°°à±‹à°µà±†à°‚సాలà±", + "ps": "పాషà±à°Ÿà±‹", + "pt": "పోరà±à°šà±à°—ీసà±", + "pt_BR": "à°¬à±à°°à±†à°œà±€à°²à°¿à°¯à°¨à± పోరà±à°šà±à°—ీసà±", + "pt_PT": "యూరోపియనౠపోరà±à°šà±à°—ీసà±", + "qu": "కెషà±à°¯à°¾", + "quc": "కిచే", + "raj": "రాజసà±à°¤à°¾à°¨à±€", + "rap": "రాపనà±à°¯à±à°¯à°¿", + "rar": "రారోటొంగానà±", + "rm": "రోమనà±à°·à±", + "rn": "à°°à°‚à°¡à°¿", + "ro": "రోమానియనà±", + "ro_MD": "మొలà±à°¡à°¾à°µà°¿à°¯à°¨à±", + "rof": "రోంబో", + "rom": "రోమానీ", + "root": "రూటà±", + "ru": "à°°à°·à±à°¯à°¨à±", + "rup": "ఆరోమేనియనà±", + "rw": "à°•à°¿à°¨à±à°¯à°°à±à°µà°¾à°‚à°¡à°¾", + "rwk": "à°°à±à°µà°¾", + "sa": "సంసà±à°•ృతం", + "sad": "సండావి", + "sah": "సఖా", + "sam": "సమారిటనౠఅరమేకà±", + "saq": "సంబà±à°°à±", + "sas": "ససకà±", + "sat": "సంటాలి", + "sba": "గాంబే", + "sbp": "సాంగà±", + "sc": "సారà±à°¡à±€à°¨à°¿à°¯à°¨à±", + "scn": "సిసిలియనà±", + "sco": "à°¸à±à°•ాటà±à°¸à±", + "sd": "సింధీ", + "sdh": "దకà±à°·à°¿à°£ à°•à±à°°à±à°¦à°¿à°·à±", + "se": "ఉతà±à°¤à°° సామి", + "seh": "సెనా", + "sel": "సేలà±à°•à°ªà±", + "ses": "కోయోరాబోరో సెనà±à°¨à±€", + "sg": "సాంగో", + "sga": "à°ªà±à°°à°¾à°šà±€à°¨ à°à°°à°¿à°·à±", + "sh": "సేరà±à°¬à±‹-à°•à±à°°à±Šà°¯à±‡à°·à°¿à°¯à°¨à±", + "shi": "టాచెలà±â€Œà°¹à°¿à°Ÿà±", + "shn": "షానà±", + "si": "సింహళం", + "sid": "సిడామో", + "sk": "à°¸à±à°²à±‹à°µà°¾à°•à±", + "sl": "à°¸à±à°²à±‹à°µà±‡à°¨à°¿à°¯à°¾à°¨à±", + "sm": "సమోవనà±", + "sma": "దకà±à°·à°¿à°£ సామి", + "smj": "à°²à±à°²à±‡ సామి", + "smn": "ఇనారి సామి", + "sms": "à°¸à±à°•ోలà±à°Ÿà± సామి", + "sn": "షోన", + "snk": "సోనింకి", + "so": "సోమాలి", + "sog": "సోగà±à°¡à°¿à°¯à°¨à±", + "sq": "à°…à°²à±à°¬à±‡à°¨à°¿à°¯à°¨à±", + "sr": "సెరà±à°¬à°¿à°¯à°¨à±", + "srn": "à°¸à±à°°à°¾à°¨à°¨à± టోనగో", + "srr": "సెరేరà±", + "ss": "à°¸à±à°µà°¾à°¤à°¿", + "ssy": "సహో", + "st": "దకà±à°·à°¿à°£ సోతో", + "su": "à°¸à±à°¡à°¾à°¨à±€à°¸à±", + "suk": "à°¸à±à°•à±à°®à°¾", + "sus": "à°¸à±à°¸à±", + "sux": "à°¸à±à°®à±‡à°°à°¿à°¯à°¾à°¨à±", + "sv": "à°¸à±à°µà±€à°¡à°¿à°·à±", + "sw": "à°¸à±à°µà°¾à°¹à°¿à°²à°¿", + "sw_CD": "కాంగో à°¸à±à°µà°¾à°¹à°¿à°²à°¿", + "swb": "కొమొరియనà±", + "syc": "సాంపà±à°°à°¦à°¾à°¯ సిరియాకà±", + "syr": "సిరియాకà±", + "ta": "తమిళమà±", + "tcy": "à°¤à±à°³à±", + "te": "తెలà±à°—à±", + "tem": "టింనే", + "teo": "టెసో", + "ter": "టెరెనో", + "tet": "టేటం", + "tg": "తజికà±", + "th": "థాయà±", + "ti": "తిగà±à°°à°¿à°¨à±à°¯à°¾", + "tig": "టీగà±à°°à±†", + "tiv": "à°Ÿà°¿à°µà±", + "tk": "à°¤à±à°°à±à°•మెనà±", + "tkl": "టోకెలావà±", + "tl": "టగలాగà±", + "tlh": "à°•à±à°²à°¿à°‚గానà±", + "tli": "à°Ÿà±à°²à°¿à°‚à°—à°¿à°Ÿà±", + "tmh": "టామషేకà±", + "tn": "సెటసà±à°µà°¾à°¨à°¾", + "to": "టాంగానà±", + "tog": "à°¨à±à°¯à°¾à°¸à°¾ టోనà±à°—à°¾", + "tpi": "టోకౠపిసినà±", + "tr": "à°Ÿà°°à±à°•à°¿à°·à±", + "trv": "తరోకో", + "ts": "సోంగా", + "tsi": "శింషీయనà±", + "tt": "టాటరà±", + "tum": "à°Ÿà±à°‚à°¬à±à°•à°¾", + "tvl": "à°Ÿà±à°µà°¾à°²à±", + "tw": "à°Ÿà±à°µà°¿", + "twq": "టసావాఖà±", + "ty": "తహితియనà±", + "tyv": "à°Ÿà±à°µà°¿à°¨à°¿à°¯à°¨à±", + "tzm": "సెంటà±à°°à°²à± à°…à°Ÿà±à°²à°¾à°¸à± టామాజైటà±", + "udm": "ఉడà±à°®à±à°°à±à°Ÿà±", + "ug": "ఉయà±â€Œà°˜à°°à±", + "uga": "ఉగారిటికà±", + "uk": "ఉకà±à°°à±‡à°¨à°¿à°¯à°¨à±", + "umb": "ఉమà±à°¬à±à°‚à°¡à±", + "und": "తెలియని భాష", + "ur": "ఉరà±à°¦à±‚", + "uz": "ఉజà±à°¬à±†à°•à±", + "vai": "వాయి", + "ve": "వెండా", + "vi": "వియతà±à°¨à°¾à°®à±€à°¸à±", + "vo": "వోలాపà±à°•à±", + "vot": "వోటికà±", + "vun": "à°µà±à°‚జొ", + "wa": "వాలూనà±", + "wae": "వాలà±à°¸à°°à±", + "wal": "వాలేటà±à°Ÿà°¾", + "war": "వారే", + "was": "వాషో", + "wbp": "వారà±à°²à°ªà°¿à°°à°¿", + "wo": "వొలాఫà±", + "wuu": "వౠచైనీసà±", + "xal": "à°•à°²à±à°®à°¿à°•à±", + "xh": "షోసా", + "xog": "సొగా", + "yao": "యాయే", + "yap": "యాపిసà±", + "yav": "యాంగà±â€Œà°¬à±†à°¨à±", + "ybb": "యెంబా", + "yi": "ఇడà±à°¡à°¿à°·à±", + "yo": "యోరà±à°¬à°¾", + "yue": "కాంటనీసà±", + "za": "à°œà±à°µà°¾à°¨à±", + "zap": "జపోటెకà±", + "zbl": "à°¬à±à°²à°¿à°¸à°¿à°‚బలà±à°¸à±", + "zen": "జెనాగా", + "zgh": "à°ªà±à°°à°¾à°®à°¾à°£à°¿à°• మొరొకనౠతమజియటà±", + "zh": "చైనీసà±", + "zh_Hans": "సరళీకృత చైనీసà±", + "zh_Hant": "సాంపà±à°°à°¦à°¾à°¯à°• చైనీసà±", + "zu": "జూలూ", + "zun": "à°œà±à°¨à°¿", + "zxx": "లిపి లేదà±", + "zza": "జాజా" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/th.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/th.json new file mode 100644 index 0000000000000000000000000000000000000000..605f51115261492b47564405aaa60f9fd329be8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/th.json @@ -0,0 +1,619 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "อะฟาร์", + "ab": "อับคาซ", + "ace": "อาเจะห์", + "ach": "อาโคลิ", + "ada": "อาà¹à¸”งมี", + "ady": "อะดืยเà¸", + "ae": "อเวสตะ", + "aeb": "อาหรับตูนิเซีย", + "af": "à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¸™à¸ªà¹Œ", + "afh": "à¹à¸­à¸Ÿà¸£à¸´à¸®à¸µà¸¥à¸µ", + "agq": "อัà¸à¹€à¸®à¸¡", + "ain": "ไอนุ", + "ak": "อาคัน", + "akk": "อัà¸à¸à¸²à¸”", + "akz": "à¹à¸­à¸¥à¸°à¹à¸šà¸¡à¸²", + "ale": "อาลิวต์", + "aln": "เà¸à¸à¹à¸­à¸¥à¹€à¸šà¹€à¸™à¸µà¸¢", + "alt": "อัลไตใต้", + "am": "อัมฮารา", + "an": "อาราà¸à¸­à¸™", + "ang": "อังà¸à¸¤à¸©à¹‚บราณ", + "anp": "อังคิà¸à¸²", + "ar": "อาหรับ", + "ar_001": "อาหรับมาตรà¸à¸²à¸™à¸ªà¸¡à¸±à¸¢à¹ƒà¸«à¸¡à¹ˆ", + "arc": "อราเมอิà¸", + "arn": "อาเราคาเนียน", + "aro": "อาเรานา", + "arp": "อาราปาโฮ", + "arq": "อาหรับà¹à¸­à¸¥à¸ˆà¸µà¹€à¸£à¸µà¸¢", + "arw": "อาราวัà¸", + "ary": "อาหรับโมร็อà¸à¹‚à¸", + "arz": "อาหรับพื้นเมืองอียิปต์", + "as": "อัสสัม", + "asa": "อาซู", + "ase": "ภาษามืออเมริà¸à¸±à¸™", + "ast": "อัสตูเรียส", + "av": "อาวาร์", + "avk": "โคตาวา", + "awa": "อวธี", + "ay": "ไอย์มารา", + "az": "อาเซอร์ไบจาน", + "ba": "บัชคีร์", + "bal": "บาลูชิ", + "ban": "บาหลี", + "bar": "บาวาเรีย", + "bas": "บาสา", + "bax": "บามัน", + "bbc": "บาตัà¸à¹‚ทบา", + "bbj": "โคมาลา", + "be": "เบลารุส", + "bej": "เบจา", + "bem": "เบมบา", + "bew": "เบตาวี", + "bez": "เบนา", + "bfd": "บาฟัต", + "bfq": "พทคะ", + "bg": "บัลà¹à¸à¹€à¸£à¸µà¸¢", + "bgn": "บาลูจิตะวันตà¸", + "bho": "โภชปุรี", + "bi": "บิสลามา", + "bik": "บิà¸à¸­à¸¥", + "bin": "บินี", + "bjn": "บันจาร์", + "bkm": "à¸à¸¡", + "bla": "สิà¸à¸ªà¸´à¸à¸²", + "bm": "บัมบารา", + "bn": "เบงà¸à¸²à¸¥à¸µ", + "bo": "ทิเบต", + "bpy": "พิศนุปริยะ", + "bqi": "บัà¸à¸•ิยารี", + "br": "เบรตัน", + "bra": "พัรช", + "brh": "บราฮุย", + "brx": "โพโฑ", + "bs": "บอสเนีย", + "bss": "อาโคซี", + "bua": "บูเรียต", + "bug": "บูà¸à¸´à¸ª", + "bum": "บูลู", + "byn": "บลิน", + "byv": "เมดุมบา", + "ca": "à¸à¸²à¸•าลัง", + "cad": "คัดโด", + "car": "คาริบ", + "cay": "คายูà¸à¸²", + "cch": "à¹à¸­à¸•à¹à¸‹à¸¡", + "ce": "เชเชน", + "ceb": "เซบู", + "cgg": "คีà¸à¸²", + "ch": "ชามอร์โร", + "chb": "ชิบชา", + "chg": "ชะà¸à¸°à¹„ต", + "chk": "ชูà¸", + "chm": "มารี", + "chn": "ชินุà¸à¸ˆà¸²à¸£à¹Œà¸à¸­à¸™", + "cho": "ช็อà¸à¸—อว์", + "chp": "ชิพิวยัน", + "chr": "เชอโรà¸à¸µ", + "chy": "เชเยนเน", + "ckb": "เคิร์ดโซรานี", + "co": "คอร์ซิà¸à¸²", + "cop": "คอปติà¸", + "cps": "à¸à¸²à¸›à¸´à¸‹à¸™à¸­à¸™", + "cr": "ครี", + "crh": "ตุรà¸à¸µà¹„ครเมีย", + "crs": "ครีโอลเซเซลส์à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª", + "cs": "เช็à¸", + "csb": "คาซูเบียน", + "cu": "เชอร์ชสลาวิà¸", + "cv": "ชูวัช", + "cy": "เวลส์", + "da": "เดนมาร์à¸", + "dak": "ดาโà¸à¸—า", + "dar": "ดาร์à¸à¸´à¸™", + "dav": "ไททา", + "de": "เยอรมัน", + "de_AT": "เยอรมัน - ออสเตรีย", + "de_CH": "เยอรมันสูง (สวิส)", + "del": "เดลาà¹à¸§à¸£à¹Œ", + "den": "สเลวี", + "dgr": "โดà¸à¸£à¸´à¸š", + "din": "ดิงà¸à¸²", + "dje": "ซาร์มา", + "doi": "โฑครี", + "dsb": "ซอร์บส์ตอนล่าง", + "dtp": "ดูซุนà¸à¸¥à¸²à¸‡", + "dua": "ดัวลา", + "dum": "ดัตช์à¸à¸¥à¸²à¸‡", + "dv": "ธิเวหิ", + "dyo": "โจลา-ฟอนยี", + "dyu": "ดิวลา", + "dz": "ซองคา", + "dzg": "ดาซาà¸à¸²", + "ebu": "เอ็มบู", + "ee": "เอเว", + "efi": "อีฟิà¸", + "egl": "เอมีเลีย", + "egy": "อียิปต์โบราณ", + "eka": "อีà¸à¸²à¸ˆà¸¸à¸", + "el": "à¸à¸£à¸µà¸", + "elx": "อีลาไมต์", + "en": "อังà¸à¸¤à¸©", + "en_AU": "อังà¸à¸¤à¸© - ออสเตรเลีย", + "en_CA": "อังà¸à¸¤à¸© - à¹à¸„นาดา", + "en_GB": "อังà¸à¸¤à¸© - สหราชอาณาจัà¸à¸£", + "en_US": "อังà¸à¸¤à¸© - อเมริà¸à¸±à¸™", + "enm": "อังà¸à¸¤à¸©à¸à¸¥à¸²à¸‡", + "eo": "เอสเปอรันโต", + "es": "สเปน", + "es_419": "สเปน - ละตินอเมริà¸à¸²", + "es_ES": "สเปน - ยุโรป", + "es_MX": "สเปน - เม็à¸à¸‹à¸´à¹‚à¸", + "esu": "ยูพิà¸à¸à¸¥à¸²à¸‡", + "et": "เอสโตเนีย", + "eu": "บัสเà¸", + "ewo": "อีวันโด", + "ext": "เอà¸à¸‹à¹Œà¹€à¸•รมาดูรา", + "fa": "เปอร์เซีย", + "fan": "ฟอง", + "fat": "ฟันติ", + "ff": "ฟูลาฮ์", + "fi": "ฟินà¹à¸¥à¸™à¸”์", + "fil": "ฟิลิปปินส์", + "fit": "ฟินà¹à¸¥à¸™à¸”์ทอร์เนดาเล็น", + "fj": "ฟิจิ", + "fo": "à¹à¸Ÿà¹‚ร", + "fon": "ฟอน", + "fr": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª", + "fr_CA": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª - à¹à¸„นาดา", + "fr_CH": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (สวิส)", + "frc": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ªà¸à¸²à¸Œà¹‡à¸­à¸‡", + "frm": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ªà¸à¸¥à¸²à¸‡", + "fro": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ªà¹‚บราณ", + "frp": "อาร์พิตา", + "frr": "ฟริเซียนเหนือ", + "frs": "ฟริเซียนตะวันออà¸", + "fur": "ฟรูลี", + "fy": "ฟริเซียนตะวันตà¸", + "ga": "ไอริช", + "gaa": "à¸à¸²", + "gag": "à¸à¸²à¸à¸²à¸­à¸¸à¸‹", + "gan": "จีนà¸à¸±à¹‰à¸™", + "gay": "à¸à¸²à¹‚ย", + "gba": "à¸à¸šà¸²à¸¢à¸²", + "gbz": "ดารีโซโรอัสเตอร์", + "gd": "สà¸à¸­à¸•ส์à¸à¸²à¸¥à¸´à¸", + "gez": "à¸à¸µà¸‹", + "gil": "à¸à¸´à¸¥à¹€à¸šà¸­à¸£à¹Œà¸•", + "gl": "à¸à¸²à¸¥à¸´à¹€à¸‹à¸µà¸¢", + "glk": "à¸à¸´à¸¥à¸²à¸à¸µ", + "gmh": "เยอรมันสูงà¸à¸¥à¸²à¸‡", + "gn": "à¸à¸§à¸²à¸£à¸²à¸™à¸µ", + "goh": "เยอรมันสูงโบราณ", + "gom": "à¸à¸­à¸™à¸à¸²à¸™à¸µà¸‚องà¸à¸±à¸§", + "gon": "à¸à¸­à¸™à¸”ิ", + "gor": "à¸à¸­à¸£à¸­à¸™à¸—าโล", + "got": "โà¸à¸˜à¸´à¸", + "grb": "เà¸à¸£à¹‚บ", + "grc": "à¸à¸£à¸µà¸à¹‚บราณ", + "gsw": "เยอรมันสวิส", + "gu": "คุชราต", + "guc": "วายู", + "gur": "ฟราฟรา", + "guz": "à¸à¸¸à¸‹à¸‹à¸µ", + "gv": "มานซ์", + "gwi": "à¸à¸§à¸´à¸Šà¸­à¸´à¸™", + "ha": "เฮาชา", + "hai": "ไฮดา", + "hak": "จีนà¹à¸„ะ", + "haw": "ฮาวาย", + "he": "ฮิบรู", + "hi": "ฮินดี", + "hif": "ฮินดีฟิจิ", + "hil": "ฮีลีà¸à¸±à¸¢à¸™à¸™", + "hit": "ฮิตไตต์", + "hmn": "ม้ง", + "ho": "ฮีรีโมตู", + "hr": "โครเอเชีย", + "hsb": "ซอร์บส์ตอนบน", + "hsn": "จีนเซียง", + "ht": "เฮติ", + "hu": "ฮังà¸à¸²à¸£à¸µ", + "hup": "ฮูปา", + "hy": "อาร์เมเนีย", + "hz": "เฮเรโร", + "ia": "อินเตอร์ลิงà¸à¸±à¸§", + "iba": "อิบาน", + "ibb": "อิบิบิโอ", + "id": "อินโดนีเชีย", + "ie": "อินเตอร์ลิงà¸à¸´à¸§", + "ig": "อิà¸à¹‚บ", + "ii": "เสฉวนยิ", + "ik": "อีนูเปียà¸", + "ilo": "อีโลโà¸", + "inh": "อินà¸à¸¸à¸Š", + "io": "อีโด", + "is": "ไอซ์à¹à¸¥à¸™à¸”์", + "it": "อิตาลี", + "iu": "อินุà¸à¸•ิตุต", + "izh": "อินเà¸à¸£à¸µà¸¢à¸™", + "ja": "à¸à¸µà¹ˆà¸›à¸¸à¹ˆà¸™", + "jam": "อังà¸à¸¤à¸©à¸„ลีโอลจาเมà¸à¸²", + "jbo": "โลชบัน", + "jgo": "อึนà¸à¸­à¸¡à¸šà¸²", + "jmc": "มาชาเม", + "jpr": "ยิว-เปอร์เซีย", + "jrb": "ยิว-อาหรับ", + "jut": "จัท", + "jv": "ชวา", + "ka": "จอร์เจีย", + "kaa": "à¸à¸²à¸£à¸²-à¸à¸²à¸¥à¸žà¸²à¸", + "kab": "à¸à¸²à¹„บล", + "kac": "à¸à¸°à¸‰à¸´à¹ˆà¸™", + "kaj": "คจู", + "kam": "คัมบา", + "kaw": "à¸à¸§à¸µ", + "kbd": "คาร์บาเดีย", + "kbl": "คาเนมบู", + "kcg": "ทีà¹à¸¢à¸›", + "kde": "มาคอนเด", + "kea": "คาบูเวอร์เดียนู", + "ken": "เà¸à¸´à¸™à¸¢à¸²à¸‡", + "kfo": "โคโร", + "kg": "คองโà¸", + "kgp": "เคนà¸à¹ˆà¸²à¸‡", + "kha": "à¸à¸²à¸ªà¸µ", + "kho": "โคตัน", + "khq": "โคย์ราชีนี", + "khw": "โควาร์", + "ki": "à¸à¸µà¸à¸¹à¸¢à¸¹", + "kiu": "เคอร์มานิà¸à¸´", + "kj": "à¸à¸§à¸™à¸¢à¸²à¸¡à¸²", + "kk": "คาซัค", + "kkj": "คาโà¸", + "kl": "à¸à¸£à¸µà¸™à¹à¸¥à¸™à¸”์", + "kln": "คาเลนจิน", + "km": "เขมร", + "kmb": "คิมบุนดู", + "kn": "à¸à¸±à¸™à¸™à¸²à¸”า", + "ko": "เà¸à¸²à¸«à¸¥à¸µ", + "koi": "โคมิ-เปียร์เมียค", + "kok": "à¸à¸­à¸™à¸à¸²à¸™à¸µ", + "kos": "คูสไร", + "kpe": "à¸à¸²à¹à¸›à¸¥", + "kr": "คานูรี", + "krc": "คาราไช-บัลคาร์", + "kri": "คริโอ", + "krj": "à¸à¸´à¸™à¸²à¸£à¸²à¸¢à¸­à¸²", + "krl": "à¹à¸à¸£à¹€à¸¥à¸µà¸¢à¸™", + "kru": "à¸à¸¸à¸£à¸¸à¸‚", + "ks": "à¸à¸±à¸¨à¸¡à¸µà¸£à¹Œ", + "ksb": "ชัมบาลา", + "ksf": "บาเฟีย", + "ksh": "โคโลà¸", + "ku": "เคิร์ด", + "kum": "คูมืยค์", + "kut": "คูเทไน", + "kv": "โà¸à¸¡à¸´", + "kw": "คอร์นิช", + "ky": "คีร์à¸à¸µà¸‹", + "la": "ละติน", + "lad": "ลาดิโน", + "lag": "à¹à¸¥à¸™à¸ˆà¸µ", + "lah": "ลาฮ์นดา", + "lam": "à¹à¸¥à¸¡à¸šà¸²", + "lb": "ลัà¸à¹€à¸‹à¸¡à¹€à¸šà¸´à¸£à¹Œà¸", + "lez": "เลซเà¸à¸µà¸¢à¸™", + "lfn": "ลิงà¸à¸±à¸§à¸Ÿà¸£à¸±à¸‡à¸à¸²à¹‚นวา", + "lg": "ยูà¸à¸±à¸™à¸”า", + "li": "ลิมเบิร์à¸", + "lij": "ลิà¸à¸¹à¹€à¸£à¸µà¸¢", + "liv": "ลิโวเนีย", + "lkt": "ลาโà¸à¸•า", + "lmo": "ลอมบาร์ด", + "ln": "ลิงà¸à¸²à¸¥à¸²", + "lo": "ลาว", + "lol": "มองโà¸", + "loz": "โลซิ", + "lrc": "ลูรีเหนือ", + "lt": "ลิทัวเนีย", + "ltg": "ลัตเà¸à¸¥", + "lu": "ลูบา-à¸à¸²à¸•องà¸à¸²", + "lua": "ลูบา-ลูลัว", + "lui": "ลุยเซโน", + "lun": "ลันดา", + "luo": "ลัว", + "lus": "ลูไช", + "luy": "ลูเยีย", + "lv": "ลัตเวีย", + "lzh": "จีนคลาสสิà¸", + "lzz": "à¹à¸¥à¸‹", + "mad": "มาดูรา", + "maf": "มาฟา", + "mag": "มคหี", + "mai": "ไมถิลี", + "mak": "มาà¸à¸²à¸‹à¸²à¸£à¹Œ", + "man": "มันดิงà¸à¸²", + "mas": "มาไซ", + "mde": "มาบา", + "mdf": "มอคชา", + "mdr": "มานดาร์", + "men": "เมนเด", + "mer": "เมรู", + "mfe": "มอริสเยน", + "mg": "มาลาà¸à¸²à¸‹à¸µ", + "mga": "ไอริชà¸à¸¥à¸²à¸‡", + "mgh": "มาà¸à¸±à¸§à¸§à¸²-มีทโท", + "mgo": "เมตา", + "mh": "มาร์à¹à¸Šà¸¥à¸¥à¸´à¸ª", + "mi": "เมารี", + "mic": "มิà¸à¹à¸¡à¸", + "min": "มีนังà¸à¸²à¹€à¸šà¸²", + "mk": "มาซิโดเนีย", + "ml": "มาลายาลัม", + "mn": "มองโà¸à¹€à¸¥à¸µà¸¢", + "mnc": "à¹à¸¡à¸™à¸ˆà¸¹", + "mni": "มณีปุระ", + "moh": "โมฮอว์à¸", + "mos": "โมซี", + "mr": "มราà¸à¸µ", + "mrj": "มารีตะวันตà¸", + "ms": "มาเลย์", + "mt": "มอลตา", + "mua": "มันดัง", + "mul": "หลายภาษา", + "mus": "ครีà¸", + "mwl": "มีรันดา", + "mwr": "มารวาฑี", + "mwv": "เม็นตาไว", + "my": "พม่า", + "mye": "มยีน", + "myv": "เอียร์ซยา", + "mzn": "มาซันดารานี", + "na": "นาอูรู", + "nan": "จีนมินหนาน", + "nap": "นาโปลี", + "naq": "นามา", + "nb": "นอร์เวย์บุคมอล", + "nd": "เอ็นเดเบเลเหนือ", + "nds": "เยอรมันต่ำ - à¹à¸‹à¸à¸‹à¸­à¸™à¸•่ำ", + "nds_NL": "à¹à¸‹à¸à¸‹à¸­à¸™à¹ƒà¸•้", + "ne": "เนปาล", + "new": "เนวาร์", + "ng": "ดองà¸à¸²", + "nia": "นีอัส", + "niu": "นีอู", + "njo": "อ๋าวนาà¸à¸²", + "nl": "ดัตช์", + "nl_BE": "เฟลมิช", + "nmg": "à¸à¸§à¸²à¸‹à¸´à¹‚อ", + "nn": "นอร์เวย์นีนอสà¸à¹Œ", + "nnh": "จีมบูน", + "no": "นอร์เวย์", + "nog": "โนไà¸", + "non": "นอร์สโบราณ", + "nov": "โนเวียล", + "nqo": "เอ็นโà¸", + "nr": "เอ็นเดเบเลใต้", + "nso": "โซโทเหนือ", + "nus": "เนือร์", + "nv": "นาวาโฮ", + "nwc": "เนวาร์ดั้งเดิม", + "ny": "เนียนจา", + "nym": "เนียมเวซี", + "nyn": "เนียนโà¸à¹€à¸¥", + "nyo": "นิโอโร", + "nzi": "นซิมา", + "oc": "อ็อà¸à¸‹à¸´à¸•ัน", + "oj": "โอจิบวา", + "om": "โอโรโม", + "or": "โอริยา", + "os": "ออสเซเตีย", + "osa": "โอซาà¸à¸µ", + "ota": "ตุรà¸à¸µà¸­à¸­à¸•โตมัน", + "pa": "ปัà¸à¸ˆà¸²à¸š", + "pag": "ปางาซีนัน", + "pal": "ปะห์ลาวี", + "pam": "ปัมปางา", + "pap": "ปาเปียเมนโต", + "pau": "ปาเลา", + "pcd": "ปิà¸à¸²à¸£à¹Œ", + "pcm": "พิดจิน", + "pdc": "เยอรมันเพนซิลเวเนีย", + "pdt": "เพลาท์ดิช", + "peo": "เปอร์เซียโบราณ", + "pfl": "เยอรมันพาลาทิเนต", + "phn": "ฟินิเชีย", + "pi": "บาลี", + "pl": "โปà¹à¸¥à¸™à¸”์", + "pms": "พีดมอนต์", + "pnt": "พอนติà¸", + "pon": "พอห์นเพ", + "prg": "ปรัสเซีย", + "pro": "โปรวองซาลโบราณ", + "ps": "พาชตู", + "pt": "โปรตุเà¸à¸ª", + "pt_BR": "โปรตุเà¸à¸ª - บราซิล", + "pt_PT": "โปรตุเà¸à¸ª - ยุโรป", + "qu": "ควิชัว", + "quc": "à¸à¸µà¹€à¸Š", + "qug": "ควิชัวไฮà¹à¸¥à¸™à¸”์ชิมโบราโซ", + "raj": "ราชสถาน", + "rap": "ราปานู", + "rar": "ราโรทองà¸à¸²", + "rgn": "โรมัณโà¸", + "rif": "ริฟฟิอัน", + "rm": "โรà¹à¸¡à¸™à¸‹à¹Œ", + "rn": "บุรุนดี", + "ro": "โรมาเนีย", + "ro_MD": "มอลโดวา", + "rof": "รอมโบ", + "rom": "โรมานี", + "root": "รูท", + "rtm": "โรทูมัน", + "ru": "รัสเซีย", + "rue": "รูซิน", + "rug": "โรเวียนา", + "rup": "อาโรมาเนียน", + "rw": "รวันดา", + "rwk": "รวา", + "sa": "สันสà¸à¸¤à¸•", + "sad": "ซันดาเว", + "sah": "ซาฮา", + "sam": "อราเมอิà¸à¸‹à¸²à¸¡à¸²à¹€à¸£à¸µà¸¢", + "saq": "à¹à¸‹à¸¡à¸šà¸¹à¸£à¸¹", + "sas": "ซาซัà¸", + "sat": "สันตาลี", + "saz": "เสาราษà¸à¸£à¹Œ", + "sba": "à¸à¸±à¸¡à¹€à¸š", + "sbp": "à¹à¸‹à¸‡à¸à¸¹", + "sc": "ซาร์เดà¸à¸²", + "scn": "ซิซิลี", + "sco": "สà¸à¸­à¸•ส์", + "sd": "สินธุ", + "sdc": "ซาร์ดิเนียซาสซารี", + "sdh": "เคอร์ดิชใต้", + "se": "ซามิเหนือ", + "see": "เซนิà¸à¸²", + "seh": "เซนา", + "sei": "เซรี", + "sel": "เซลคุป", + "ses": "โคย์ราโบโรเซนนี", + "sg": "à¹à¸‹à¸‡à¹‚à¸", + "sga": "ไอริชโบราณ", + "sgs": "ซาโมจิเตียน", + "sh": "เซอร์โบ-โครเอเชีย", + "shi": "ทาเชลีห์ท", + "shn": "ไทใหà¸à¹ˆ", + "shu": "อาหรับ-ชาด", + "si": "สิงหล", + "sid": "ซิดาโม", + "sk": "สโลวัà¸", + "sl": "สโลวีเนีย", + "sli": "ไซลีเซียตอนล่าง", + "sly": "เซลายาร์", + "sm": "ซามัว", + "sma": "ซามิใต้", + "smj": "ซามิลูเล", + "smn": "ซามิอีนารี", + "sms": "ซามิสคอลต์", + "sn": "โชนา", + "snk": "โซนีนเà¸", + "so": "โซมาลี", + "sog": "ซอà¸à¸”ีน", + "sq": "à¹à¸­à¸¥à¹€à¸šà¹€à¸™à¸µà¸¢", + "sr": "เซอร์เบีย", + "srn": "ซูรินาเม", + "srr": "เซà¹à¸£à¸£à¹Œ", + "ss": "สวาติ", + "ssy": "ซาโฮ", + "st": "โซโทใต้", + "stq": "ฟรีเซียนซัทเธอร์à¹à¸¥à¸™à¸”์", + "su": "ซุนดา", + "suk": "ซูคูมา", + "sus": "ซูซู", + "sux": "ซูเมอ", + "sv": "สวีเดน", + "sw": "สวาฮีลี", + "sw_CD": "สวาฮีลี-คองโà¸", + "swb": "โคเมอเรียน", + "syc": "ซีเรียà¹à¸šà¸šà¸”ั้งเดิม", + "syr": "ซีเรีย", + "szl": "ไซลีเซีย", + "ta": "ทมิฬ", + "tcy": "ตูลู", + "te": "เตลูà¸à¸¹", + "tem": "ทิมเน", + "teo": "เตโซ", + "ter": "เทเรโน", + "tet": "เตตุม", + "tg": "ทาจิà¸", + "th": "ไทย", + "ti": "ติà¸à¸£à¸´à¸à¸à¸²", + "tig": "ตีเà¸à¸£", + "tiv": "ทิฟ", + "tk": "เติร์à¸à¹€à¸¡à¸™à¸´à¸ªà¸–าน", + "tkl": "โตเà¸à¹€à¸¥à¸²", + "tkr": "à¹à¸‹à¸„เซอร์", + "tl": "ตาà¸à¸²à¸¥à¹‡à¸­à¸", + "tlh": "คลิงà¸à¸­à¸™", + "tli": "ทลิงà¸à¸´à¸•", + "tly": "ทาลิช", + "tmh": "ทามาเชà¸", + "tn": "บอตสวานา", + "to": "ตองà¸à¸²", + "tog": "ไนอะซาตองà¸à¸²", + "tpi": "ท็อà¸à¸žà¸´à¸‹à¸´à¸™", + "tr": "ตุรà¸à¸µ", + "tru": "ตูโรโย", + "trv": "ทาโรโà¸", + "ts": "ซิตซองà¸à¸²", + "tsd": "ซาโคเนีย", + "tsi": "ซิมชีà¹à¸­à¸™", + "tt": "ตาตาร์", + "ttt": "ตัตมุสลิม", + "tum": "ทุมบูà¸à¸²", + "tvl": "ตูวาลู", + "tw": "ทวิ", + "twq": "ตัสซาวัค", + "ty": "ตาฮิตี", + "tyv": "ตูวา", + "tzm": "ทามาไซต์à¹à¸­à¸•ลาสà¸à¸¥à¸²à¸‡", + "udm": "อุดมูร์ต", + "ug": "อุยà¸à¸±à¸§", + "uga": "ยูà¸à¸²à¸£à¸´à¸•", + "uk": "ยูเครน", + "umb": "อุมบุนดู", + "und": "ภาษาที่ไม่รู้จัà¸", + "ur": "อูรดู", + "uz": "อุซเบà¸", + "vai": "ไว", + "ve": "เวนดา", + "vec": "เวเนโต้", + "vep": "เวปส์", + "vi": "เวียดนาม", + "vls": "เฟลมิชตะวันตà¸", + "vmf": "เมน-ฟรานโà¸à¹€à¸™à¸µà¸¢", + "vo": "โวลาพึค", + "vot": "โวทิà¸", + "vro": "โวโร", + "vun": "วุนจู", + "wa": "วาโลนี", + "wae": "วัลเซอร์", + "wal": "วาลาโม", + "war": "วาเรย์", + "was": "วาโช", + "wbp": "วอล์เพอร์รี", + "wo": "โวลอฟ", + "wuu": "จีนอู๋", + "xal": "คัลมืยค์", + "xh": "คะห์โอซา", + "xmf": "เมเà¸à¸£à¹€à¸¥à¸µà¸¢", + "xog": "โซà¸à¸²", + "yao": "เย้า", + "yap": "ยัป", + "yav": "à¹à¸¢à¸‡à¹€à¸šà¸™", + "ybb": "เยมบา", + "yi": "ยิว", + "yo": "โยรูบา", + "yrl": "เหงงà¸à¸²à¸•ุ", + "yue": "à¸à¸§à¸²à¸‡à¸•ุ้ง", + "za": "จ้วง", + "zap": "ซาโปเตà¸", + "zbl": "บลิสซิมโบลส์", + "zea": "เซà¹à¸¥à¸™à¸”์", + "zen": "เซนาà¸à¸²", + "zgh": "ทามาไซต์โมร็อà¸à¹‚à¸à¸¡à¸²à¸•รà¸à¸²à¸™", + "zh": "จีน", + "zh_Hans": "จีนตัวย่อ", + "zh_Hant": "จีนตัวเต็ม", + "zu": "ซูลู", + "zun": "ซูนิ", + "zxx": "ไม่มีข้อมูลภาษา", + "zza": "ซาซา" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ti.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ti.json new file mode 100644 index 0000000000000000000000000000000000000000..a731b83f19c04dc5f6007f17a9d7a3dfd2a6586a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ti.json @@ -0,0 +1,98 @@ +{ + "Version": "2.1.27.40", + "Names": { + "af": "አáሪቃንሰኛ", + "am": "አáˆáˆáˆ¨áŠ›", + "ar": "ዓረበኛ", + "az": "አዜርባይጃንኛ", + "be": "ቤላራሻኛ", + "bg": "ቡáˆáŒ‹áˆªáŠ›", + "bn": "በንጋሊኛ", + "br": "ብሬቶን", + "bs": "ቦስኒያን", + "ca": "ካታላን", + "cs": "ቼክኛ", + "cy": "ወáˆáˆ½", + "da": "ዴኒሽ", + "de": "ጀርመን", + "el": "áŒáˆªáŠ¨áŠ›", + "en": "እንáŒáˆŠá‹áŠ›", + "eo": "ኤስáራንቶ", + "es": "ስá“ኒሽ", + "et": "ኤስቶኒአን", + "eu": "ባስክኛ", + "fa": "áርሲያኛ", + "fi": "áŠáŠ’áˆ½", + "fil": "ታጋሎገኛ", + "fo": "á‹áˆ®áŠ›", + "fr": "áˆáˆ¨áŠ•áˆ³á‹­áŠ›", + "fy": "áሪሰኛ", + "ga": "አይሪሽ", + "gd": "እስኮትስ ጌáˆáŠ­áŠ›", + "gl": "ጋለቪኛ", + "gn": "ጓራኒ", + "gu": "ጉጃራቲኛ", + "he": "ዕብራስጥ", + "hi": "ሕንደኛ", + "hr": "ክሮሽያንኛ", + "hu": "ሀንጋሪኛ", + "ia": "ኢንቴር ቋንቋ", + "id": "እንዶኑሲኛ", + "is": "አይስላንደኛ", + "it": "ጣሊያንኛ", + "ja": "ጃá“ንኛ", + "jv": "ጃቫንኛ", + "ka": "ጊዮርጊያኛ", + "kn": "ካማደኛ", + "ko": "ኮሪያኛ", + "ku": "ኩርድሽ", + "ky": "ኪሩጋዚ", + "la": "ላቲንኛ", + "lt": "ሊቱአኒየን", + "lv": "ላቲቪያን", + "mk": "ማክዶኒኛ", + "ml": "ማላያላáˆáŠ›", + "mr": "ማራቲኛ", + "ms": "ማላይኛ", + "mt": "ማáˆá‰²áˆµáŠ›", + "ne": "ኔá–ሊኛ", + "nl": "ደች", + "nn": "ኖርዌይኛ (ናይ áŠáŠ–áˆ­áˆµáŠ­)", + "no": "ኖርዌጂያን", + "oc": "ኦኪታንኛ", + "or": "ኦሪያ", + "pa": "á‘ንጃቢኛ", + "pl": "á–ሊሽ", + "ps": "á“ሽቶ", + "pt": "á–ርቱጋሊኛ", + "pt_BR": "á–ርቱጋáˆáŠ› (ናይ ብራዚáˆ)", + "pt_PT": "á–ርቱጋáˆáŠ› (ናይ á–ርቱጋáˆ)", + "ro": "ሮማኒያን", + "ru": "ራሽኛ", + "sh": "ሰርቦ- ክሮዊታን", + "si": "ስንሃáˆáŠ›", + "sk": "ስሎቨክኛ", + "sl": "ስá‰á‰ªáŠ›", + "sq": "አáˆá‰¤áŠ’áŠ›", + "sr": "ሰርቢኛ", + "st": "ሰሴቶ", + "su": "ሱዳንኛ", + "sv": "ስዊድንኛ", + "sw": "ሰዋሂሊኛ", + "ta": "ታሚáˆáŠ›", + "te": "ተሉጉኛ", + "th": "ታይኛ", + "ti": "ትáŒáˆ­áŠ›", + "tk": "ናይ ቱርኪ ሰብዓይ (ቱርካዊ)", + "tlh": "ክሊንáŒáŠ¦áŠ•áŠ›", + "tr": "ቱርከኛ", + "tw": "ትዊ", + "uk": "ዩክረኒኛ", + "ur": "ኡርዱኛ", + "uz": "ኡá‹á‰ áŠ­áŠ›", + "vi": "ቪትናáˆáŠ›", + "xh": "ዞሳኛ", + "yi": "ዪዲሽ", + "zu": "ዙሉኛ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/tl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/tl.json new file mode 100644 index 0000000000000000000000000000000000000000..fb616654e5b2e0213673d9b767487fef1964299c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/tl.json @@ -0,0 +1,408 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "Afar", + "ab": "Abkhazian", + "ace": "Achinese", + "ach": "Acoli", + "ada": "Adangme", + "ady": "Adyghe", + "af": "Afrikaans", + "agq": "Aghem", + "ain": "Ainu", + "ak": "Akan", + "ale": "Aleut", + "alt": "Southern Altai", + "am": "Amharic", + "an": "Aragonese", + "anp": "Angika", + "ar": "Arabic", + "ar_001": "Modernong Karaniwang Arabic", + "arn": "Mapuche", + "arp": "Arapaho", + "as": "Assamese", + "asa": "Asu", + "ast": "Asturian", + "av": "Avaric", + "awa": "Awadhi", + "ay": "Aymara", + "az": "Azerbaijani", + "ba": "Bashkir", + "ban": "Balinese", + "bas": "Basaa", + "be": "Belarusian", + "bem": "Bemba", + "bez": "Bena", + "bg": "Bulgarian", + "bgn": "Kanlurang Balochi", + "bho": "Bhojpuri", + "bi": "Bislama", + "bin": "Bini", + "bla": "Siksika", + "bm": "Bambara", + "bn": "Bangla", + "bo": "Tibetan", + "br": "Breton", + "brx": "Bodo", + "bs": "Bosnian", + "bug": "Buginese", + "byn": "Blin", + "ca": "Catalan", + "ce": "Chechen", + "ceb": "Cebuano", + "cgg": "Chiga", + "ch": "Chamorro", + "chk": "Chuukese", + "chm": "Mari", + "cho": "Choctaw", + "chr": "Cherokee", + "chy": "Cheyenne", + "ckb": "Central Kurdish", + "co": "Corsican", + "crs": "Seselwa Creole French", + "cs": "Czech", + "cu": "Church Slavic", + "cv": "Chuvash", + "cy": "Welsh", + "da": "Danish", + "dak": "Dakota", + "dar": "Dargwa", + "dav": "Taita", + "de": "German", + "de_AT": "Austrian German", + "de_CH": "Swiss High German", + "dgr": "Dogrib", + "dje": "Zarma", + "dsb": "Lower Sorbian", + "dua": "Duala", + "dv": "Divehi", + "dyo": "Jola-Fonyi", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embu", + "ee": "Ewe", + "efi": "Efik", + "eka": "Ekajuk", + "el": "Greek", + "en": "Ingles", + "en_AU": "Ingles ng Australya", + "en_CA": "Ingles sa Canada", + "en_GB": "Ingles na British", + "en_US": "Ingles na American", + "eo": "Esperanto", + "es": "Spanish", + "es_419": "Latin American na Espanyol", + "es_ES": "European Spanish", + "es_MX": "Mexican na Espanyol", + "et": "Estonian", + "eu": "Basque", + "ewo": "Ewondo", + "fa": "Persian", + "ff": "Fulah", + "fi": "Finnish", + "fil": "Filipino", + "fj": "Fijian", + "fo": "Faroese", + "fon": "Fon", + "fr": "French", + "fr_CA": "French sa Canada", + "fr_CH": "Swiss na French", + "fur": "Friulian", + "fy": "Kanlurang Frisian", + "ga": "Irish", + "gaa": "Ga", + "gag": "Gagauz", + "gd": "Scots Gaelic", + "gez": "Geez", + "gil": "Gilbertese", + "gl": "Galician", + "gn": "Guarani", + "gor": "Gorontalo", + "gsw": "Swiss German", + "gu": "Gujarati", + "guz": "Gusii", + "gv": "Manx", + "gwi": "Gwichʼin", + "ha": "Hausa", + "haw": "Hawaiian", + "he": "Hebrew", + "hi": "Hindi", + "hil": "Hiligaynon", + "hmn": "Hmong", + "hr": "Croatian", + "hsb": "Upper Sorbian", + "ht": "Haitian", + "hu": "Hungarian", + "hup": "Hupa", + "hy": "Armenian", + "hz": "Herero", + "ia": "Interlingua", + "iba": "Iban", + "ibb": "Ibibio", + "id": "Indonesian", + "ie": "Interlingue", + "ig": "Igbo", + "ii": "Sichuan Yi", + "ilo": "Iloko", + "inh": "Ingush", + "io": "Ido", + "is": "Icelandic", + "it": "Italian", + "iu": "Inuktitut", + "ja": "Japanese", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jv": "Javanese", + "ka": "Georgian", + "kab": "Kabyle", + "kac": "Kachin", + "kaj": "Jju", + "kam": "Kamba", + "kbd": "Kabardian", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Kabuverdianu", + "kfo": "Koro", + "kg": "Kongo", + "kha": "Khasi", + "khq": "Koyra Chiini", + "ki": "Kikuyu", + "kj": "Kuanyama", + "kk": "Kazakh", + "kkj": "Kako", + "kl": "Kalaallisut", + "kln": "Kalenjin", + "km": "Khmer", + "kmb": "Kimbundu", + "kn": "Kannada", + "ko": "Korean", + "koi": "Komi-Permyak", + "kok": "Konkani", + "kpe": "Kpelle", + "kr": "Kanuri", + "krc": "Karachay-Balkar", + "krl": "Karelian", + "kru": "Kurukh", + "ks": "Kashmiri", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Colognian", + "ku": "Kurdish", + "kum": "Kumyk", + "kv": "Komi", + "kw": "Cornish", + "ky": "Kirghiz", + "la": "Latin", + "lad": "Ladino", + "lag": "Langi", + "lb": "Luxembourgish", + "lez": "Lezghian", + "lg": "Ganda", + "li": "Limburgish", + "lkt": "Lakota", + "ln": "Lingala", + "lo": "Lao", + "loz": "Lozi", + "lrc": "Hilagang Luri", + "lt": "Lithuanian", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lun": "Lunda", + "luo": "Luo", + "lus": "Mizo", + "luy": "Luyia", + "lv": "Latvian", + "mad": "Madurese", + "mag": "Magahi", + "mai": "Maithili", + "mak": "Makasar", + "mas": "Masai", + "mdf": "Moksha", + "men": "Mende", + "mer": "Meru", + "mfe": "Morisyen", + "mg": "Malagasy", + "mgh": "Makhuwa-Meetto", + "mgo": "Meta’", + "mh": "Marshallese", + "mi": "Maori", + "mic": "Micmac", + "min": "Minangkabau", + "mk": "Macedonian", + "ml": "Malayalam", + "mn": "Mongolian", + "mni": "Manipuri", + "moh": "Mohawk", + "mos": "Mossi", + "mr": "Marathi", + "ms": "Malay", + "mt": "Maltese", + "mua": "Mundang", + "mul": "Maramihang Wika", + "mus": "Creek", + "mwl": "Mirandese", + "my": "Burmese", + "myv": "Erzya", + "mzn": "Mazanderani", + "na": "Nauru", + "nap": "Neapolitan", + "naq": "Nama", + "nb": "Norwegian BokmÃ¥l", + "nd": "Hilagang Ndebele", + "nds": "Low German", + "nds_NL": "Low Saxon", + "ne": "Nepali", + "new": "Newari", + "ng": "Ndonga", + "nia": "Nias", + "niu": "Niuean", + "nl": "Dutch", + "nl_BE": "Flemish", + "nmg": "Kwasio", + "nn": "Norwegian Nynorsk", + "nnh": "Ngiemboon", + "no": "Norwegian", + "nog": "Nogai", + "nqo": "N’Ko", + "nr": "South Ndebele", + "nso": "Hilagang Sotho", + "nus": "Nuer", + "nv": "Navajo", + "ny": "Nyanja", + "nyn": "Nyankole", + "oc": "Occitan", + "om": "Oromo", + "or": "Odia", + "os": "Ossetic", + "pa": "Punjabi", + "pag": "Pangasinan", + "pam": "Pampanga", + "pap": "Papiamento", + "pau": "Palauan", + "pcm": "Nigerian Pidgin", + "pl": "Polish", + "prg": "Prussian", + "ps": "Pashto", + "pt": "Portuguese", + "pt_BR": "Portuges ng Brasil", + "pt_PT": "European Portuguese", + "qu": "Quechua", + "quc": "Kʼicheʼ", + "rap": "Rapanui", + "rar": "Rarotongan", + "rm": "Romansh", + "rn": "Rundi", + "ro": "Romanian", + "ro_MD": "Moldavian", + "rof": "Rombo", + "root": "Root", + "ru": "Russian", + "rup": "Aromanian", + "rw": "Kinyarwanda", + "rwk": "Rwa", + "sa": "Sanskrit", + "sad": "Sandawe", + "sah": "Sakha", + "saq": "Samburu", + "sat": "Santali", + "sba": "Ngambay", + "sbp": "Sangu", + "sc": "Sardinian", + "scn": "Sicilian", + "sco": "Scots", + "sd": "Sindhi", + "sdh": "Katimugang Kurdish", + "se": "Hilagang Sami", + "seh": "Sena", + "ses": "Koyraboro Senni", + "sg": "Sango", + "sh": "Serbo-Croatian", + "shi": "Tachelhit", + "shn": "Shan", + "si": "Sinhala", + "sk": "Slovak", + "sl": "Slovenian", + "sm": "Samoan", + "sma": "Katimugang Sami", + "smj": "Lule Sami", + "smn": "Inari Sami", + "sms": "Skolt Sami", + "sn": "Shona", + "snk": "Soninke", + "so": "Somali", + "sq": "Albanian", + "sr": "Serbian", + "srn": "Sranan Tongo", + "ss": "Swati", + "ssy": "Saho", + "st": "Katimugang Sotho", + "su": "Sundanese", + "suk": "Sukuma", + "sv": "Swedish", + "sw": "Swahili", + "sw_CD": "Congo Swahili", + "swb": "Comorian", + "syr": "Syriac", + "ta": "Tamil", + "te": "Telugu", + "tem": "Timne", + "teo": "Teso", + "tet": "Tetum", + "tg": "Tajik", + "th": "Thai", + "ti": "Tigrinya", + "tig": "Tigre", + "tk": "Turkmen", + "tl": "Tagalog", + "tlh": "Klingon", + "tn": "Tswana", + "to": "Tongan", + "tpi": "Tok Pisin", + "tr": "Turkish", + "trv": "Taroko", + "ts": "Tsonga", + "tt": "Tatar", + "tum": "Tumbuka", + "tvl": "Tuvalu", + "tw": "Twi", + "twq": "Tasawaq", + "ty": "Tahitian", + "tyv": "Tuvinian", + "tzm": "Central Atlas Tamazight", + "udm": "Udmurt", + "ug": "Uyghur", + "uk": "Ukranian", + "umb": "Umbundu", + "und": "Hindi Kilalang Wika", + "ur": "Urdu", + "uz": "Uzbek", + "vai": "Vai", + "ve": "Venda", + "vi": "Vietnamese", + "vo": "Volapük", + "vun": "Vunjo", + "wa": "Walloon", + "wae": "Walser", + "wal": "Wolaytta", + "war": "Waray", + "wbp": "Warlpiri", + "wo": "Wolof", + "xal": "Kalmyk", + "xh": "Xhosa", + "xog": "Soga", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "Yiddish", + "yo": "Yoruba", + "yue": "Cantonese", + "zgh": "Standard Moroccan Tamazight", + "zh": "Chinese", + "zh_Hans": "Pinasimpleng Chinese", + "zh_Hant": "Tradisyonal na Chinese", + "zu": "Zulu", + "zun": "Zuni", + "zxx": "Walang nilalaman na ukol sa wika", + "zza": "Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/to.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/to.json new file mode 100644 index 0000000000000000000000000000000000000000..6f25aee6833991d6fb18e184c638710cf39a622e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/to.json @@ -0,0 +1,619 @@ +{ + "Version": "2.1.27.98", + "Names": { + "aa": "lea fakaÊ»afÄla", + "ab": "lea fakaÊ»apakasia", + "ace": "lea fakaÊ»atisÄ“", + "ach": "lea fakaÊ»akoli", + "ada": "lea fakaÊ»atangimÄ“", + "ady": "lea fakaÊ»atikÄ“", + "ae": "lea fakaÊ»avesitani", + "aeb": "lea fakaÊ»alepea-tunÄ«sia", + "af": "lea fakaÊ»afilikana", + "afh": "lea fakaÊ»afilihili", + "agq": "lea fakaÊ»akihemi", + "ain": "lea fakaÊ»ainu", + "ak": "lea fakaÊ»akani", + "akk": "lea fakaÊ»akatia", + "akz": "lea fakaÊ»alapama", + "ale": "lea fakaÊ»aleuti", + "aln": "lea fakaÊ»alapÄ“nia-keki", + "alt": "lea fakaÊ»alitai-tonga", + "am": "lea fakaÊ»ameliki", + "an": "lea fakaÊ»alakoni", + "ang": "lea fakapÄlangi-motuÊ»a", + "anp": "lea fakaÊ»angika", + "ar": "lea fakaÊ»alepea", + "ar_001": "lea fakaÊ»alepea (mÄmani)", + "arc": "lea fakaÊ»alÄmiti", + "arn": "lea fakamapuse", + "aro": "lea fakaÊ»alaona", + "arp": "lea fakaÊ»alapaho", + "arq": "lea fakaÊ»alepea-Ê»aisilia", + "arw": "lea fakaÊ»alauaki", + "ary": "lea fakaÊ»alepea-moloko", + "arz": "lea fakaÊ»alepea-Ê»isipite", + "as": "lea fakaÊ»asamia", + "asa": "lea fakaÊ»asu", + "ase": "lea fakaÊ»ilonga-Ê»amelika", + "ast": "lea fakaÊ»asitÅ«lia", + "av": "lea fakaÊ»avaliki", + "avk": "lea fakakotava", + "awa": "lea fakaÊ»auati", + "ay": "lea fakaÊ»aimala", + "az": "lea fakaÊ»asapaisani", + "ba": "lea fakapasikili", + "bal": "lea fakapalusi", + "ban": "lea fakapali", + "bar": "lea fakapavÄlia", + "bas": "lea fakapasaÊ»a", + "bax": "lea fakapamuni", + "bbc": "lea fakatÅpe-pÄ“teki", + "bbj": "lea fakakomala", + "be": "lea fakapelalusi", + "bej": "lea fakapesa", + "bem": "lea fakapÄ“mipa", + "bew": "lea fakapetavi", + "bez": "lea fakapena", + "bfd": "lea fakapafuti", + "bfq": "lea fakapataka", + "bg": "lea fakapulukalia", + "bgn": "lea fakapalusi-hihifo", + "bho": "lea fakaposipuli", + "bi": "lea fakapisilama", + "bik": "lea fakapikoli", + "bin": "lea fakapini", + "bjn": "lea fakapanisali", + "bkm": "lea fakakome", + "bla": "lea fakasikesikÄ", + "bm": "lea fakapamipala", + "bn": "lea fakapengikali", + "bo": "lea fakatipeti", + "bpy": "lea fakapisinupilia", + "bqi": "lea fakapakitiÄli", + "br": "lea fakapeletoni", + "bra": "lea fakapalai", + "brh": "lea fakapalahui", + "brx": "lea fakapÅto", + "bs": "lea fakaposinia", + "bss": "lea fakaÊ»akÅse", + "bua": "lea fakapuliati", + "bug": "lea fakapukisi", + "bum": "lea fakapulu", + "byn": "lea fakapilini", + "byv": "lea fakametÅ«mipa", + "ca": "lea fakakatalani", + "cad": "lea fakakato", + "car": "lea fakakalipa", + "cay": "lea fakakaiuka", + "cch": "lea fakaÊ»atisami", + "ce": "lea fakasese", + "ceb": "lea fakasepuano", + "cgg": "lea fakakika", + "ch": "lea fakakamolo", + "chb": "lea fakasÄ«pisa", + "chg": "lea fakasakatÄi", + "chk": "lea fakatÅ«ke", + "chm": "lea fakamalÄ«", + "chn": "lea fakasinuki-takote", + "cho": "lea fakasokitau", + "chp": "lea fakasipeuiani", + "chr": "lea fakaselokÄ«", + "chy": "lea fakaseiene", + "ckb": "lea fakakÅ«tisi-loloto", + "co": "lea fakakÅsika", + "cop": "lea fakakopitika", + "cps": "lea fakakapiseno", + "cr": "lea fakakelÄ«", + "crh": "lea fakatoake-kilimea", + "crs": "lea fakaseselua-falanisÄ“", + "cs": "lea fakaseki", + "csb": "lea fakakasiupia", + "cu": "lea fakasilavia-fakasiasi", + "cv": "lea fakasuvasa", + "cy": "lea fakauÄ“lesi", + "da": "lea fakatenimaÊ»ake", + "dak": "lea fakatakota", + "dar": "lea fakatalakuÄ", + "dav": "lea fakataita", + "de": "lea fakasiamane", + "de_AT": "lea fakasiamane-Ê»aositulia", + "de_CH": "lea fakasiamane-hake-suisilani", + "del": "lea fakatelauale", + "den": "lea fakasilave", + "dgr": "lea fakatÅkelipi", + "din": "lea fakatingikÄ", + "dje": "lea fakatisÄma", + "doi": "lea fakatokili", + "dsb": "lea fakasÅpia-hifo", + "dtp": "lea fakatusuni-loloto", + "dua": "lea fakatuala", + "dum": "lea fakahÅlani-lotoloto", + "dv": "lea fakativehi", + "dyo": "lea fakaiola-fonÄ«", + "dyu": "lea fakatiula", + "dz": "lea fakatisÅngika", + "dzg": "lea fakatasaka", + "ebu": "lea fakaÊ»emipÅ«", + "ee": "lea fakaÊ»eue", + "efi": "lea fakaÊ»efiki", + "egl": "lea fakaÊ»emilia", + "egy": "lea fakaÊ»isipitemuÊ»a", + "eka": "lea fakaÊ»ekaiuki", + "el": "lea fakakalisi", + "elx": "lea fakaÊ»elamite", + "en": "lea fakapÄlangi", + "en_AU": "lea fakapÄlangi-Ê»aositelÄ“lia", + "en_CA": "lea fakapÄlangi-kÄnata", + "en_GB": "lea fakapilitÄnia", + "en_US": "lea fakapÄlangi-Ê»amelika", + "enm": "lea fakapÄlangi-lotoloto", + "eo": "lea fakaÊ»esipulanito", + "es": "lea fakasipÄ“nisi", + "es_419": "lea fakasipÄ“nisi lÄtini-Ê»amelika", + "es_ES": "lea fakasipÄ“nisi-‘iulope", + "es_MX": "lea fakasipÄ“nisi-mekisikou", + "esu": "lea fakaiÅ«piki-loloto", + "et": "lea fakaÊ»esitÅnia", + "eu": "lea fakapÄsiki", + "ewo": "lea fakaÊ»euÅnito", + "ext": "lea fakaÊ»ekisitematula", + "fa": "lea fakapÄ“sia", + "fan": "lea fakafangi", + "fat": "lea fakafanitÄ“", + "ff": "lea fakafulÄ", + "fi": "lea fakafinilani", + "fil": "lea fakafilipaini", + "fit": "lea fakafinilani-tÅnetale", + "fj": "lea fakafisi", + "fo": "lea fakafaloe", + "fon": "lea fakafÅngi", + "fr": "lea fakafalanisÄ“", + "fr_CA": "lea fakafalanisÄ“-kÄnata", + "fr_CH": "lea fakafalanisÄ“-suisilani", + "frc": "lea fakafalanisÄ“-kasuni", + "frm": "lea fakafalanisÄ“-lotoloto", + "fro": "lea fakafalanisÄ“-motuÊ»a", + "frp": "lea fakaÊ»Äpitano", + "frr": "lea fakafilisia-tokelau", + "frs": "lea fakafilisia-hahake", + "fur": "lea fakafulilÄni", + "fy": "lea fakafilisia-hihifo", + "ga": "lea fakaÊ»aelani", + "gaa": "lea fakakÄ", + "gag": "lea fakakakausi", + "gan": "lea fakasiaina-kani", + "gay": "lea fakakaio", + "gba": "lea fakakapaia", + "gbz": "lea fakateli-soloasitelia", + "gd": "lea fakakaeliki", + "gez": "lea fakasiÊ»isi", + "gil": "lea fakakilipasi", + "gl": "lea fakakalisia", + "glk": "lea fakakilaki", + "gmh": "lea fakasiamane-hake-lotoloto", + "gn": "lea fakakualani", + "goh": "lea fakasiamane-hake-motuÊ»a", + "gom": "lea fakakonikanÄ«-koani", + "gon": "lea fakakonitÄ«", + "gor": "lea fakakolonitalo", + "got": "lea fakakotika", + "grb": "lea fakakÄ“po", + "grc": "lea fakakalisimuÊ»a", + "gsw": "lea fakasiamane-suisilani", + "gu": "lea fakakutalati", + "guc": "lea fakaÊ»uaiÅ«", + "gur": "lea fakafalefale", + "guz": "lea fakakusÄ«", + "gv": "lea fakamangikÄ«", + "gwi": "lea fakaÊ»uÄ«sini", + "ha": "lea fakahausa", + "hai": "lea fakahaita", + "hak": "lea fakasiaina-haka", + "haw": "lea fakahauaiÊ»i", + "he": "lea fakahepelÅ«", + "hi": "lea fakahinitÄ«", + "hif": "lea fakahinitÄ«-fisi", + "hil": "lea fakahilikainoni", + "hit": "lea fakahitite", + "hmn": "lea fakamÅngi", + "ho": "lea fakahili-motu", + "hr": "lea fakakuloisia", + "hsb": "lea fakasÅpia-hake", + "hsn": "lea fakasiaina-siangi", + "ht": "lea fakahaiti", + "hu": "lea fakahungakalia", + "hup": "lea fakahupa", + "hy": "lea fakaÊ»Ämenia", + "hz": "lea fakahelelo", + "ia": "lea fakavahaÊ»alea", + "iba": "lea fakaÊ»ipani", + "ibb": "lea fakaÊ»ipipio", + "id": "lea fakaÊ»initÅnesia", + "ie": "lea fakavahaÊ»alingikÄ“", + "ig": "lea fakaÊ»ikipÅ", + "ii": "lea fakasisiuani-Ä«", + "ik": "lea fakaÊ»inupiaki", + "ilo": "lea fakaÊ»iloko", + "inh": "lea fakaÊ»ingusi", + "io": "lea fakaÊ»ito", + "is": "lea fakaÊ»aisilani", + "it": "lea fakaʻītali", + "iu": "lea fakaÊ»inuketituti", + "izh": "lea fakaÊ»ingiliani", + "ja": "lea fakasiapani", + "jam": "lea fakapÄlangi-samaika", + "jbo": "lea fakalosipani", + "jgo": "lea fakanikÅmipa", + "jmc": "lea fakamasame", + "jpr": "lea fakaÊ»iuteo-pÄ“sia", + "jrb": "lea fakaÊ»iuteo-Ê»alepea", + "jut": "lea fakaÊ»iutilani", + "jv": "lea fakasava", + "ka": "lea fakaseÅsia", + "kaa": "lea fakakala-kalipaki", + "kab": "lea fakakapile", + "kac": "lea fakakasini", + "kaj": "lea fakasisÅ«", + "kam": "lea fakakamipa", + "kaw": "lea fakakavi", + "kbd": "lea fakakapÄlitia", + "kbl": "lea fakakanÄ“mipu", + "kcg": "lea fakatiapi", + "kde": "lea fakamakÅnite", + "kea": "lea fakakapuvelitianu", + "ken": "lea fakakeniangi", + "kfo": "lea fakakolo", + "kg": "lea fakakongikÅ", + "kgp": "lea fakakaingangi", + "kha": "lea fakakÄsi", + "kho": "lea fakakÅtani", + "khq": "lea fakakoila-sÄ«ni", + "khw": "lea fakakouali", + "ki": "lea fakakikuiu", + "kiu": "lea fakakilimanisikÄ«", + "kj": "lea fakakuaniama", + "kk": "lea fakakasaki", + "kkj": "lea fakakako", + "kl": "lea fakakalaÊ»alisuti", + "kln": "lea fakakalenisini", + "km": "lea fakakamipÅtia", + "kmb": "lea fakakimipÅ«nitu", + "kn": "lea fakakanata", + "ko": "lea fakakÅlea", + "koi": "lea fakakomi-pelemiaki", + "kok": "lea fakakonikanÄ«", + "kos": "lea fakakosilae", + "kpe": "lea fakakepele", + "kr": "lea fakakanuli", + "krc": "lea fakakalate-palakili", + "kri": "lea fakakilio", + "krj": "lea fakakinaraiÄ", + "krl": "lea fakakalelia", + "kru": "lea fakakuluki", + "ks": "lea fakakÄsimila", + "ksb": "lea fakasiamipala", + "ksf": "lea fakapafia", + "ksh": "lea fakakolongia", + "ku": "lea fakakulitÄ«", + "kum": "lea fakakumiki", + "kut": "lea fakakutenai", + "kv": "lea fakakomi", + "kw": "lea fakakoniuali", + "ky": "lea fakakÄ«sisi", + "la": "lea fakalatina", + "lad": "lea fakalatino", + "lag": "lea fakalangi", + "lah": "lea fakalÄnita", + "lam": "lea fakalamipÄ", + "lb": "lea fakalakisimipeki", + "lez": "lea fakalesikia", + "lfn": "lea fakakavakava-foÊ»ou", + "lg": "lea fakakanita", + "li": "lea fakalimipÅ«liki", + "lij": "lea fakalikulia", + "liv": "lea fakalivonia", + "lkt": "lea fakalakota", + "lmo": "lea fakalomipÄti", + "ln": "lea lingikala", + "lo": "lea fakalau", + "lol": "lea fakamongikÅ", + "loz": "lea fakalosi", + "lrc": "lea fakaluli-tokelau", + "lt": "lea fakalituania", + "ltg": "lea fakalatakale", + "lu": "lea fakalupa-katanga", + "lua": "lea fakalupa-lulua", + "lui": "lea fakaluiseno", + "lun": "lea fakalunitÄ", + "luo": "lea fakaluo", + "lus": "lea fakamiso", + "luy": "lea fakaluÄ«a", + "lv": "lea fakalativia", + "lzh": "lea fakasiaina-faÊ»utohi", + "lzz": "lea fakalasu", + "mad": "lea fakamatula", + "maf": "lea fakamafa", + "mag": "lea fakamakahi", + "mai": "lea fakamaitili", + "mak": "lea fakamakasali", + "man": "lea fakamanitÄ«ngiko", + "mas": "lea fakamasai", + "mde": "lea fakamapa", + "mdf": "lea fakamokisiÄ", + "mdr": "lea fakamanetali", + "men": "lea fakamenetÄ«", + "mer": "lea fakamelu", + "mfe": "lea fakamolisieni", + "mg": "lea fakamalakasi", + "mga": "lea fakaÊ»aelani-lotoloto", + "mgh": "lea fakamakÅ«a-meÊ»eto", + "mgo": "lea fakametÄ", + "mh": "lea fakamÄsolo", + "mi": "lea fakamauli", + "mic": "lea fakamikemaki", + "min": "lea fakaminangikapau", + "mk": "lea fakamasitÅnia", + "ml": "lea fakaÊ»initia-malÄialami", + "mn": "lea fakamongokÅlia", + "mnc": "lea fakamanisÅ«", + "mni": "lea fakamanipuli", + "moh": "lea fakamohauki", + "mos": "lea fakamosi", + "mr": "lea fakamalati", + "mrj": "lea fakamali-hihifo", + "ms": "lea fakamalei", + "mt": "lea fakamalita", + "mua": "lea fakamunitangi", + "mul": "lea tuifio", + "mus": "lea fakakileki", + "mwl": "lea fakamilanitÄ“si", + "mwr": "lea fakamaliwali", + "mwv": "lea fakamenitauai", + "my": "lea fakapema", + "mye": "lea fakamiene", + "myv": "lea fakaÊ»elisia", + "mzn": "lea fakamasanitelani", + "na": "lea fakanaulu", + "nan": "lea fakasiaina-mininani", + "nap": "lea fakanapoletano", + "naq": "lea fakanama", + "nb": "lea fakanouaÄ“-pokimali", + "nd": "lea fakanetepele-tokelau", + "nds": "lea fakasiamane-hifo", + "nds_NL": "lea fakasakisoni-hifo", + "ne": "lea fakanepali", + "new": "lea fakaneuali", + "ng": "lea fakanetongikÄ", + "nia": "lea fakaniasi", + "niu": "lea fakaniuÄ“", + "njo": "lea fakaÊ»aonasa", + "nl": "lea fakahÅlani", + "nl_BE": "lea fakahÅlani-pelesiume", + "nmg": "lea fakakuasio", + "nn": "lea fakanoauÄ“-ninosiki", + "nnh": "lea fakangiemipÅni", + "no": "lea fakanouaÄ“", + "nog": "lea fakanokai", + "non": "lea fakanoauÄ“-motuÊ»a", + "nov": "lea fakanoviale", + "nqo": "lea fakanikÅ", + "nr": "lea fakanetepele-tonga", + "nso": "lea fakasoto-tokelau", + "nus": "lea fakanueli", + "nv": "lea fakanavaho", + "nwc": "lea fakaneuali-motuÊ»a", + "ny": "lea fakanianisa", + "nym": "lea fakaniamiuesi", + "nyn": "lea fakanianikole", + "nyo": "lea fakaniolo", + "nzi": "lea fakanesima", + "oc": "lea fakaÊ»okitane", + "oj": "lea fakaÊ»osipiuÄ", + "om": "lea fakaÊ»olomo", + "or": "lea faka-Ê»otia", + "os": "lea fakaÊ»osetiki", + "osa": "lea fakaÊ»osÄ“se", + "ota": "lea fakatoake-Ê»otomani", + "pa": "lea fakapÅ«nusapi", + "pag": "lea fakapangasinani", + "pal": "lea fakapÄlavi", + "pam": "lea fakapamipanga", + "pap": "lea fakapapiamÄ“nito", + "pau": "lea fakapalau", + "pcd": "lea fakapikÄti", + "pcm": "lea fakanaisilia", + "pdc": "lea fakasiamane-penisilivania", + "pdt": "lea fakasiamane-lafalafa", + "peo": "lea fakapÄ“sia-motuÊ»a", + "pfl": "lea fakasiamane-palatine", + "phn": "lea fakafoinikia", + "pi": "lea fakapÄli", + "pl": "lea fakapolani", + "pms": "lea fakapiemonite", + "pnt": "lea fakaponitiki", + "pon": "lea fakaponapÄ“", + "prg": "lea fakapulÅ«sia", + "pro": "lea fakapolovenisi-motuÊ»a", + "ps": "lea fakapasitÅ", + "pt": "lea fakapotukali", + "pt_BR": "lea fakapotukali-palÄsili", + "pt_PT": "lea fakapotukali-Ê»iulope", + "qu": "lea fakakuetisa", + "quc": "lea fakakÄ«sÄ“", + "qug": "lea fakakuitisa-simipolaso", + "raj": "lea fakalasasitani", + "rap": "lea fakalapanui", + "rar": "lea fakalalotonga", + "rgn": "lea fakalomaniolo", + "rif": "lea fakalifi", + "rm": "lea fakalaito-lomÄ“nia", + "rn": "lea fakaluaniti", + "ro": "lea fakalÅmenia", + "ro_MD": "lea fakamolitÄvia", + "rof": "lea fakalomipÅ", + "rom": "lea fakalomani", + "root": "lea fakaÊ»ilonga-tefito", + "rtm": "lea fakalotuma", + "ru": "lea fakalÅ«sia", + "rue": "lea fakalusini", + "rug": "lea fakaloviana", + "rup": "lea fakaÊ»alomania", + "rw": "lea fakakiniÄuanita", + "rwk": "lea fakaluÄ", + "sa": "lea fakasanisukuliti", + "sad": "lea fakasanitaue", + "sah": "lea fakasaka", + "sam": "lea fakasamalitani-Ê»alÄmiti", + "saq": "lea fakasamipulu", + "sas": "lea fakasasaki", + "sat": "lea fakasanitali", + "saz": "lea fakasaulasitilÄ", + "sba": "lea fakangÄmipai", + "sbp": "lea fakasangu", + "sc": "lea fakasaletÄ«nia", + "scn": "lea fakasisÄ«lia", + "sco": "lea fakasikotilani", + "sd": "lea fakasÄ«niti", + "sdc": "lea fakasaletÄ«nia-sasalesu", + "sdh": "lea faka-tonga ‘o Ketesi", + "se": "lea fakasami-tokelau", + "see": "lea fakaseneka", + "seh": "lea fakasena", + "sei": "lea fakaseli", + "sel": "lea fakaselikupi", + "ses": "lea fakakoilapolo-seni", + "sg": "lea fakasangikÅ", + "sga": "lea fakaÊ»aelani-motuÊ»a", + "sgs": "lea fakasamositia", + "sh": "lea fakakuloisia-sÄ“pia", + "shi": "lea fakataselihiti", + "shn": "lea fakasiani", + "shu": "lea fakaÊ»alepea-sÄti", + "si": "lea fakasingihala", + "sid": "lea fakasitamo", + "sk": "lea fakasolÄvaki", + "sl": "lea fakasolovenia", + "sli": "lea fakasilesia-hifo", + "sly": "lea fakaselaiÄ", + "sm": "lea fakahaÊ»amoa", + "sma": "lea fakasami-tonga", + "smj": "lea fakasami-lule", + "smn": "lea fakasami-Ê»inali", + "sms": "lea fakasami-sikolita", + "sn": "lea fakasiona", + "snk": "lea fakasoninekÄ“", + "so": "lea fakasomali", + "sog": "lea fakasokitiana", + "sq": "lea fakaÊ»alapÄ“nia", + "sr": "lea fakasÄ“pia", + "srn": "lea fakasulanane-tongikÅ", + "srr": "lea fakasÄ“lÄ“le", + "ss": "lea fakasuati", + "ssy": "lea fakasaho", + "st": "lea fakasoto-tonga", + "stq": "lea fakafilisia-satÄ“lani", + "su": "lea fakasunitÄ", + "suk": "lea fakasukuma", + "sus": "lea fakasusÅ«", + "sux": "lea fakasumelia", + "sv": "lea fakasuÄ“teni", + "sw": "lea fakasuahili", + "sw_CD": "lea fakasuahili-kongikÅ", + "swb": "lea fakakomolo", + "syc": "lea fakasuliÄiÄ-muÊ»a", + "syr": "lea fakasuliÄiÄ", + "szl": "lea fakasilesia", + "ta": "lea fakatamili", + "tcy": "lea fakatulu", + "te": "lea fakaÊ»initia-teluku", + "tem": "lea fakatimenÄ“", + "teo": "lea fakateso", + "ter": "lea fakateleno", + "tet": "lea fakatetumu", + "tg": "lea fakatÄsiki", + "th": "lea fakatailani", + "ti": "lea fakatikilinia", + "tig": "lea fakatikilÄ“", + "tiv": "lea fakativi", + "tk": "lea fakatÄ“kimeni", + "tkl": "lea fakatokelau", + "tkr": "lea fakasÄkuli", + "tl": "lea fakatakÄloka", + "tlh": "lea fakakilingoni", + "tli": "lea fakatilingikÄ«te", + "tly": "lea fakatalisi", + "tmh": "lea fakatamasieki", + "tn": "lea fakatisuana", + "to": "lea fakatonga", + "tog": "lea fakaniasa-tonga", + "tpi": "lea fakatoki-pisini", + "tr": "lea fakatoake", + "tru": "lea fakatuloio", + "trv": "lea fakataloko", + "ts": "lea fakatisonga", + "tsd": "lea fakasakÅnia", + "tsi": "lea fakatisÄ«misiani", + "tt": "lea fakatatale", + "ttt": "lea fakatati-moselemi", + "tum": "lea fakatumepuka", + "tvl": "lea fakatÅ«valu", + "tw": "lea fakatusuÄ«", + "twq": "lea fakatasauaki", + "ty": "lea fakatahiti", + "tyv": "lea fakatuvÄ«nia", + "tzm": "lea fakatamasaiti-Ê»atilasi-loloto", + "udm": "lea fakaÊ»utimuliti", + "ug": "lea fakaÊ»uikÅ«li", + "uga": "lea fakaʻūkaliti", + "uk": "lea fakaʻūkalaÊ»ine", + "umb": "lea fakaÊ»umipÅ«nitu", + "und": "lea taÊ»eÊ»iloa", + "ur": "lea fakaʻūtÅ«", + "uz": "lea fakaÊ»usipeki", + "vai": "lea fakavai", + "ve": "lea fakavenitÄ", + "vec": "lea fakavenÄ“sia", + "vep": "lea fakavepisi", + "vi": "lea fakavietinami", + "vls": "lea fakavelamingi-hihifo", + "vmf": "lea fakafalanikoni-loloto", + "vo": "lea fakavolapiki", + "vot": "lea fakavotiki", + "vro": "lea fakavÅlo", + "vun": "lea fakavÅ«niso", + "wa": "lea fakaÊ»ualonia", + "wae": "lea fakaÊ»ualiseli", + "wal": "lea fakaÊ»uolaita", + "war": "lea fakaÊ»ualai", + "was": "lea fakaÊ»uasiÅ", + "wbp": "lea fakaÊ»uÄlipili", + "wo": "lea fakaÊ»uolofo", + "wuu": "lea fakasiaina-uÅ«", + "xal": "lea fakakalimiki", + "xh": "lea fakatÅsa", + "xmf": "lea fakamingilelia", + "xog": "lea fakasoka", + "yao": "lea fakaÊ»iao", + "yap": "lea fakaÊ»iapi", + "yav": "lea fakaÊ»iangipeni", + "ybb": "lea fakaÊ»iÄ“mipa", + "yi": "lea fakaÄ«tisi", + "yo": "lea fakaÊ»iÅlupa", + "yrl": "lea fakaneʻēngatÅ«", + "yue": "lea fakakuangitongi", + "za": "lea fakasuangi", + "zap": "lea fakasapoteki", + "zbl": "lea fakaÊ»ilonga-pilisi", + "zea": "lea fakasÄ“lani", + "zen": "lea fakasenaka", + "zgh": "lea fakatamasaiti-moloko", + "zh": "lea fakasiaina", + "zh_Hans": "lea fakasiaina-fakafaingofua", + "zh_Hant": "lea fakasiaina-tukufakaholo", + "zu": "lea fakasulu", + "zun": "lea fakasuni", + "zxx": "Ê»ikai ha lea", + "zza": "lea fakasÄsÄ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/tr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/tr.json new file mode 100644 index 0000000000000000000000000000000000000000..27c4d3dfd863aa2f17553a7ed7f1e99d39773314 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/tr.json @@ -0,0 +1,620 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "Afar", + "ab": "Abhazca", + "ace": "Açece", + "ach": "Acoli", + "ada": "Adangme", + "ady": "Adigece", + "ae": "Avestçe", + "aeb": "Tunus Arapçası", + "af": "Afrikaanca", + "afh": "Afrihili", + "agq": "Aghem", + "ain": "Ayni Dili", + "ak": "Akan", + "akk": "Akad Dili", + "akz": "Alabamaca", + "ale": "Aleut dili", + "aln": "Gheg Arnavutçası", + "alt": "Güney Altayca", + "am": "Amharca", + "an": "Aragonca", + "ang": "Eski İngilizce", + "anp": "Angika", + "ar": "Arapça", + "ar_001": "Modern Standart Arapça", + "arc": "Aramice", + "arn": "Mapuçe dili", + "aro": "Araona", + "arp": "Arapaho Dili", + "arq": "Cezayir Arapçası", + "arw": "Arawak Dili", + "ary": "Fas Arapçası", + "arz": "Mısır Arapçası", + "as": "Assamca", + "asa": "Asu", + "ase": "Amerikan İşaret Dili", + "ast": "Asturyasca", + "av": "Avar Dili", + "avk": "Kotava", + "awa": "Awadhi", + "ay": "Aymara", + "az": "Azerice", + "az_Arab": "Güney Azerice", + "ba": "BaÅŸkırtça", + "bal": "Beluçça", + "ban": "Bali dili", + "bar": "Bavyera dili", + "bas": "Basa Dili", + "bax": "Bamun", + "bbc": "Batak Toba", + "bbj": "Ghomala", + "be": "Belarusça", + "bej": "Beja dili", + "bem": "Bemba", + "bew": "Betawi", + "bez": "Bena", + "bfd": "Bafut", + "bfq": "Badaga", + "bg": "Bulgarca", + "bgn": "Batı Balochi", + "bho": "Arayanice", + "bi": "Bislama", + "bik": "Bikol", + "bin": "Bini", + "bjn": "Banjar Dili", + "bkm": "Kom", + "bla": "Karaayak dili", + "bm": "Bambara", + "bn": "Bengalce", + "bo": "Tibetçe", + "bpy": "Bishnupriya", + "bqi": "Bahtiyari", + "br": "Bretonca", + "bra": "Braj", + "brh": "Brohice", + "brx": "Bodo", + "bs": "BoÅŸnakça", + "bss": "Akoose", + "bua": "Buryatça", + "bug": "Bugis", + "bum": "Bulu", + "byn": "Blin", + "byv": "Medumba", + "ca": "Katalanca", + "cad": "Kado dili", + "car": "Carib", + "cay": "Kayuga dili", + "cch": "Atsam", + "ce": "Çeçence", + "ceb": "Sebuano dili", + "cgg": "Kigaca", + "ch": "Çamorro dili", + "chb": "Çibça dili", + "chg": "ÇaÄŸatayca", + "chk": "Chuukese", + "chm": "Mari dili", + "chn": "Çinuk dili", + "cho": "Çoktav dili", + "chp": "Çipevya dili", + "chr": "Çerokice", + "chy": "Åžayence", + "ckb": "Orta Kürtçe", + "co": "Korsikaca", + "cop": "Kıptice", + "cps": "Capiznon", + "cr": "Krice", + "crh": "Kırım Türkçesi", + "crs": "Seselwa Kreole Fransızcası", + "cs": "Çekçe", + "csb": "Kashubian", + "cu": "Kilise Slavcası", + "cv": "Çuvaşça", + "cy": "Galce", + "da": "Danca", + "dak": "Dakotaca", + "dar": "Dargince", + "dav": "Taita", + "de": "Almanca", + "de_AT": "Avusturya Almancası", + "de_CH": "İsviçre Yüksek Almancası", + "del": "Delaware", + "den": "Slavey dili", + "dgr": "Dogrib", + "din": "Dinka dili", + "dje": "Zarma", + "doi": "Dogri", + "dsb": "AÅŸağı Sorbça", + "dtp": "Orta Kadazan", + "dua": "Duala", + "dum": "OrtaçaÄŸ Felemenkçesi", + "dv": "Divehi dili", + "dyo": "Jola-Fonyi", + "dyu": "Dyula", + "dz": "Dzongkha", + "dzg": "Dazaga", + "ebu": "Embu", + "ee": "Ewe", + "efi": "Efik", + "egl": "Emilia Dili", + "egy": "Eski Mısır Dili", + "eka": "Ekajuk", + "el": "Yunanca", + "elx": "Elam", + "en": "İngilizce", + "en_AU": "Avustralya İngilizcesi", + "en_CA": "Kanada İngilizcesi", + "en_GB": "İngiliz İngilizcesi", + "en_US": "Amerikan İngilizcesi", + "enm": "OrtaçaÄŸ İngilizcesi", + "eo": "Esperanto", + "es": "İspanyolca", + "es_419": "Latin Amerika İspanyolcası", + "es_ES": "Avrupa İspanyolcası", + "es_MX": "Meksika İspanyolcası", + "esu": "Merkezi Yupikçe", + "et": "Estonca", + "eu": "Baskça", + "ewo": "Ewondo", + "ext": "Ekstremadura Dili", + "fa": "Farsça", + "fan": "Fang", + "fat": "Fanti", + "ff": "Fula dili", + "fi": "Fince", + "fil": "Filipince", + "fit": "Tornedalin Fincesi", + "fj": "Fiji Dili", + "fo": "Faroe Dili", + "fon": "Fon", + "fr": "Fransızca", + "fr_CA": "Kanada Fransızcası", + "fr_CH": "İsviçre Fransızcası", + "frc": "Cajun Fransızcası", + "frm": "OrtaçaÄŸ Fransızcası", + "fro": "Eski Fransızca", + "frp": "Arpitanca", + "frr": "Kuzey Frizce", + "frs": "DoÄŸu Frizcesi", + "fur": "Friuli dili", + "fy": "Batı Frizcesi", + "ga": "İrlandaca", + "gaa": "Ga dili", + "gag": "Gagavuzca", + "gan": "Gan Çincesi", + "gay": "Gayo dili", + "gba": "Gbaya", + "gbz": "Zerdüşt Daricesi", + "gd": "İskoç Gaelcesi", + "gez": "Geez", + "gil": "Kiribatice", + "gl": "Galiçyaca", + "glk": "Gilanice", + "gmh": "OrtaçaÄŸ Yüksek Almancası", + "gn": "Guarani dili", + "goh": "Eski Yüksek Almanca", + "gom": "Goa Konkanicesi", + "gon": "Gondi dili", + "gor": "Gorontalo dili", + "got": "Gotça", + "grb": "Grebo dili", + "grc": "Antik Yunanca", + "gsw": "İsviçre Almancası", + "gu": "Güceratça", + "guc": "Wayuu dili", + "gur": "Frafra", + "guz": "Gusii", + "gv": "Manks", + "gwi": "Guçince", + "ha": "Hausa dili", + "hai": "Haydaca", + "hak": "Hakka Çincesi", + "haw": "Hawaii dili", + "he": "İbranice", + "hi": "Hintçe", + "hif": "Fiji Hintçesi", + "hil": "Hiligaynon dili", + "hit": "Hititçe", + "hmn": "Hmong", + "ho": "Hiri Motu", + "hr": "Hırvatça", + "hsb": "Yukarı Sorbça", + "hsn": "Xiang Çincesi", + "ht": "Haiti Kreyolu", + "hu": "Macarca", + "hup": "Hupaca", + "hy": "Ermenice", + "hz": "Herero dili", + "ia": "Interlingua", + "iba": "Iban", + "ibb": "İbibio dili", + "id": "Endonezce", + "ie": "Interlingue", + "ig": "İbo dili", + "ii": "Sichuan Yi", + "ik": "İnyupikçe", + "ilo": "Iloko", + "inh": "İnguşça", + "io": "Ido", + "is": "İzlandaca", + "it": "İtalyanca", + "iu": "İnuit dili", + "izh": "İngriya Dili", + "ja": "Japonca", + "jam": "Jamaika Patois Dili", + "jbo": "Lojban", + "jgo": "Ngomba", + "jmc": "Machame", + "jpr": "Yahudi Farsçası", + "jrb": "Yahudi Arapçası", + "jut": "Yutland Dili", + "jv": "Cava Dili", + "ka": "Gürcüce", + "kaa": "Karakalpakça", + "kab": "Kabiliyece", + "kac": "Kaçin dili", + "kaj": "Jju", + "kam": "Kamba", + "kaw": "Kawi", + "kbd": "Kabardeyce", + "kbl": "Kanembu", + "kcg": "Tyap", + "kde": "Makonde", + "kea": "Kabuverdianu", + "ken": "Kenyang", + "kfo": "Koro", + "kg": "Kongo dili", + "kgp": "Kaingang", + "kha": "Khasi dili", + "kho": "Hotanca", + "khq": "Koyra Chiini", + "khw": "Çitral Dili", + "ki": "Kikuyu", + "kiu": "Kırmançça", + "kj": "Kuanyama", + "kk": "Kazakça", + "kkj": "Kako", + "kl": "Grönland dili", + "kln": "Kalenjin", + "km": "Kmerce", + "kmb": "Kimbundu", + "kn": "Kannada dili", + "ko": "Korece", + "koi": "Komi-Permyak", + "kok": "Konkani dili", + "kos": "Kosraean", + "kpe": "Kpelle dili", + "kr": "Kanuri dili", + "krc": "Karaçay-Balkarca", + "kri": "Krio", + "krj": "Kinaray-a", + "krl": "Karelyaca", + "kru": "Kurukh", + "ks": "KeÅŸmir dili", + "ksb": "Shambala", + "ksf": "Bafia", + "ksh": "Köln lehçesi", + "ku": "Kürtçe", + "kum": "Kumukça", + "kut": "Kutenai dili", + "kv": "Komi", + "kw": "Kernevekçe", + "ky": "Kırgızca", + "la": "Latince", + "lad": "Ladino", + "lag": "Langi", + "lah": "Lahnda", + "lam": "Lamba dili", + "lb": "Lüksemburgca", + "lez": "Lezgice", + "lfn": "Lingua Franca Nova", + "lg": "Ganda", + "li": "Limburgca", + "lij": "Ligurca", + "liv": "Livonca", + "lkt": "Lakotaca", + "lmo": "Lombardça", + "ln": "Lingala", + "lo": "Lao dili", + "lol": "Mongo", + "loz": "Lozi", + "lrc": "Kuzey Luri", + "lt": "Litvanca", + "ltg": "Latgalian", + "lu": "Luba-Katanga", + "lua": "Luba-Lulua", + "lui": "Luiseno", + "lun": "Lunda", + "luo": "Luo", + "lus": "Lushai", + "luy": "Luyia", + "lv": "Letonca", + "lzh": "Edebi Çince", + "lzz": "Lazca", + "mad": "Madura Dili", + "maf": "Mafa", + "mag": "Magahi", + "mai": "Maithili", + "mak": "Makasar", + "man": "Mandingo", + "mas": "Masai", + "mde": "Maba", + "mdf": "MokÅŸa dili", + "mdr": "Mandar", + "men": "Mende dili", + "mer": "Meru", + "mfe": "Morisyen", + "mg": "Malgaşça", + "mga": "OrtaçaÄŸ İrlandacası", + "mgh": "Makhuwa-Meetto", + "mgo": "Meta’", + "mh": "Marshall Adaları dili", + "mi": "Maori dili", + "mic": "Micmac", + "min": "Minangkabau", + "mk": "Makedonca", + "ml": "Malayalam dili", + "mn": "MoÄŸolca", + "mnc": "Mançurya dili", + "mni": "Manipuri dili", + "moh": "Mohavk dili", + "mos": "Mossi", + "mr": "Marathi", + "mrj": "Ova Çirmişçesi", + "ms": "Malayca", + "mt": "Maltaca", + "mua": "Mundang", + "mul": "Birden Fazla Dil", + "mus": "Krikçe", + "mwl": "Miranda dili", + "mwr": "Marvari", + "mwv": "Mentawai", + "my": "Burmaca", + "mye": "Myene", + "myv": "Erzya", + "mzn": "Mazenderanca", + "na": "Nauru dili", + "nan": "Min Nan Çincesi", + "nap": "Napolice", + "naq": "Nama", + "nb": "Norveççe BokmÃ¥l", + "nd": "Kuzey Ndebele", + "nds": "AÅŸağı Almanca", + "nds_NL": "AÅŸağı Saksonca", + "ne": "Nepalce", + "new": "Nevari", + "ng": "Ndonga", + "nia": "Nias", + "niu": "Niue dili", + "njo": "Ao Naga", + "nl": "Felemenkçe", + "nl_BE": "Flamanca", + "nmg": "Kwasio", + "nn": "Norveççe Nynorsk", + "nnh": "Ngiemboon", + "no": "Norveççe", + "nog": "Nogayca", + "non": "Eski Nors dili", + "nov": "Novial", + "nqo": "N’Ko", + "nr": "Güney Ndebele", + "nso": "Kuzey Sotho dili", + "nus": "Nuer", + "nv": "Navaho dili", + "nwc": "Klasik Nevari", + "ny": "Nyanja", + "nym": "Nyamvezi", + "nyn": "Nyankole", + "nyo": "Nyoro", + "nzi": "Nzima dili", + "oc": "Oksitan dili", + "oj": "Ojibva dili", + "om": "Oromo dili", + "or": "Oriya Dili", + "os": "Osetçe", + "osa": "Osage", + "ota": "Osmanlı Türkçesi", + "pa": "Pencapça", + "pag": "Pangasinan dili", + "pal": "Pehlevi Dili", + "pam": "Pampanga", + "pap": "Papiamento", + "pau": "Palau dili", + "pcd": "Picard Dili", + "pcm": "Nijerya Pidgin dili", + "pdc": "Pensilvanya Almancası", + "pdt": "Plautdietsch", + "peo": "Eski Farsça", + "pfl": "Palatin Almancası", + "phn": "Fenike dili", + "pi": "Pali", + "pl": "Lehçe", + "pms": "Piyemontece", + "pnt": "Kuzeybatı Kafkasya", + "pon": "Pohnpeian", + "prg": "Prusyaca", + "pro": "Eski Provensal", + "ps": "PeÅŸtuca", + "pt": "Portekizce", + "pt_BR": "Brezilya Portekizcesi", + "pt_PT": "Avrupa Portekizcesi", + "qu": "Keçuva dili", + "quc": "Kiçece", + "qug": "Chimborazo Highland Quichua", + "raj": "Rajasthani", + "rap": "Rapanui dili", + "rar": "Rarotongan", + "rgn": "Romanyolca", + "rif": "Rif Berbericesi", + "rm": "Romanşça", + "rn": "Kirundi", + "ro": "Rumence", + "ro_MD": "Moldovaca", + "rof": "Rombo", + "rom": "Romanca", + "root": "Köken", + "rtm": "Rotuman", + "ru": "Rusça", + "rue": "Rusince", + "rug": "Roviana", + "rup": "Ulahça", + "rw": "Kinyarwanda", + "rwk": "Rwa", + "sa": "Sanskrit", + "sad": "Sandave", + "sah": "Yakutça", + "sam": "Samarit Aramcası", + "saq": "Samburu", + "sas": "Sasak", + "sat": "Santali", + "saz": "Saurashtra", + "sba": "Ngambay", + "sbp": "Sangu", + "sc": "Sardunya dili", + "scn": "Sicilyaca", + "sco": "İskoçça", + "sd": "Sindhi", + "sdc": "Sassari Sarduca", + "sdh": "Güney Kürtçesi", + "se": "Kuzey Laponcası", + "see": "Seneca dili", + "seh": "Sena", + "sei": "Seri", + "sel": "Selkup dili", + "ses": "Koyraboro Senni", + "sg": "Sango", + "sga": "Eski İrlandaca", + "sgs": "Samogitçe", + "sh": "Sırp-Hırvat Dili", + "shi": "TaÅŸelhit", + "shn": "Shan dili", + "shu": "Çad Arapçası", + "si": "Seylanca", + "sid": "Sidamo dili", + "sk": "Slovakça", + "sl": "Slovence", + "sli": "AÅŸağı Silezyaca", + "sly": "Selayar", + "sm": "Samoa dili", + "sma": "Güney Laponcası", + "smj": "Lule Laponcası", + "smn": "İnari Laponcası", + "sms": "Skolt Laponcası", + "sn": "Shona", + "snk": "Soninke", + "so": "Somalice", + "sog": "Sogdiana Dili", + "sq": "Arnavutça", + "sr": "Sırpça", + "srn": "Sranan Tongo", + "srr": "Serer dili", + "ss": "Sisvati", + "ssy": "Saho", + "st": "Güney Sotho dili", + "stq": "Saterland Frizcesi", + "su": "Sunda Dili", + "suk": "Sukuma dili", + "sus": "Susu", + "sux": "Sümerce", + "sv": "İsveççe", + "sw": "Svahili", + "sw_CD": "Kongo Svahili", + "swb": "Komorca", + "syc": "Klasik Süryanice", + "syr": "Süryanice", + "szl": "Silezyaca", + "ta": "Tamilce", + "tcy": "Tuluca", + "te": "Telugu dili", + "tem": "Timne", + "teo": "Teso", + "ter": "Tereno", + "tet": "Tetum", + "tg": "Tacikçe", + "th": "Tayca", + "ti": "Tigrinya", + "tig": "Tigre", + "tiv": "Tiv", + "tk": "Türkmence", + "tkl": "Tokelau dili", + "tkr": "Sahurca", + "tl": "Tagalogca", + "tlh": "Klingonca", + "tli": "Tlingit", + "tly": "Talışça", + "tmh": "TamaÅŸek", + "tn": "Setsvana", + "to": "Tonga dili", + "tog": "Nyasa Tonga", + "tpi": "Tok Pisin", + "tr": "Türkçe", + "tru": "Turoyo", + "trv": "Taroko", + "ts": "Tsonga", + "tsd": "Tsakonca", + "tsi": "Tsimshian", + "tt": "Tatarca", + "ttt": "Tatça", + "tum": "Tumbuka", + "tvl": "Tuvalyanca", + "tw": "Tvi", + "twq": "Tasawaq", + "ty": "Tahiti dili", + "tyv": "Tuvaca", + "tzm": "Orta Atlas Tamazigti", + "udm": "Udmurtça", + "ug": "Uygurca", + "uga": "Ugarit dili", + "uk": "Ukraynaca", + "umb": "Umbundu", + "und": "Bilinmeyen Dil", + "ur": "Urduca", + "uz": "Özbekçe", + "vai": "Vai", + "ve": "Venda dili", + "vec": "Venedikçe", + "vep": "Veps dili", + "vi": "Vietnamca", + "vls": "Batı Flamanca", + "vmf": "Main Frankonya Dili", + "vo": "Volapük", + "vot": "Votça", + "vro": "Võro", + "vun": "Vunjo", + "wa": "Valonca", + "wae": "Walser", + "wal": "Valamo", + "war": "Varay", + "was": "VaÅŸo", + "wbp": "Warlpiri", + "wo": "Volofça", + "wuu": "Wu Çincesi", + "xal": "Kalmıkça", + "xh": "Zosa dili", + "xmf": "Megrelce", + "xog": "Soga", + "yao": "Yao", + "yap": "Yapça", + "yav": "Yangben", + "ybb": "Yemba", + "yi": "YidiÅŸ", + "yo": "Yorubaca", + "yrl": "Nheengatu", + "yue": "Kantonca", + "za": "Zhuangca", + "zap": "Zapotek dili", + "zbl": "Blis Sembolleri", + "zea": "Zelandaca", + "zen": "Zenaga dili", + "zgh": "Standart Fas Tamazigti", + "zh": "Çince", + "zh_Hans": "BasitleÅŸtirilmiÅŸ Çince", + "zh_Hant": "Geleneksel Çince", + "zu": "Zuluca", + "zun": "Zunice", + "zxx": "Dilbilim içeriÄŸi yok", + "zza": "Zazaca" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ug.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ug.json new file mode 100644 index 0000000000000000000000000000000000000000..2fe131390129000b443f3ff76389b7d0b05cf5f4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ug.json @@ -0,0 +1,513 @@ +{ + "Version": "2.1.28.76", + "Names": { + "aa": "Ø¦Ø§ÙØ§Ø±Ú†Û•", + "ab": "ئابخازچە", + "ace": "ئاتجÛÚ†Û•", + "ach": "ئاچولىچە", + "ada": "ئاداڭمÛÚ†Û•", + "ady": "ئادىگÛÙŠÚ†Û•", + "ae": "Ø¦Ø§Û‹ÛØ³ØªØ§Ú†Û•", + "af": "Ø¦Ø§ÙØ±Ù‰ÙƒØ§Ù†Ú†Û•", + "afh": "Ø¦Ø§ÙØ±Ù‰Ø®Ù‰Ù„Ù‰Ú†Û•", + "agq": "ئاگەمچە", + "ain": "ئاينۇچە", + "ak": "ئاكانچە", + "akk": "ئاككادچە", + "ale": "ئالÛيۇتچە", + "alt": "جەنۇبى ئالتاي تىللىرى", + "am": "ئامھارچە", + "an": "ئاراگونچە", + "ang": "قەدىمكى ئىنگلىزچە", + "anp": "ئانگىكاچە", + "ar": "ئەرەبچە", + "ar_001": "ھازىرقى زامان ئۆلچەملىك ئەرەبچە", + "arc": "ئارامۇچە", + "arn": "ماپۇدۇنگۇنچە", + "arp": "ئاراپاخوچە", + "arw": "ئاراۋاكچە", + "as": "ئاسامچە", + "asa": "ئاسۇچە", + "ast": "ئاستۇرىيەچە", + "av": "ئاۋارچە", + "awa": "ئاۋادىچە", + "ay": "ئايماراچە", + "az": "ئەزەربەيجانچە", + "ba": "باشقىرتچە", + "bal": "بÛلۇجىچە", + "ban": "بالىچە", + "bas": "باساچە", + "bax": "بامۇنچە", + "bbj": "گومالاچە", + "be": "بÛلارۇسچە", + "bej": "Ø¨ÛØ¬Ø§Ú†Û•", + "bem": "بÛمباچە", + "bez": "بÛناچە", + "bfd": "باÙۇتچە", + "bg": "بۇلغارچە", + "bho": "بوجپۇرىچە", + "bi": "بىسلاماچە", + "bik": "بىكولچە", + "bin": "بىنىچە", + "bkm": "كومچە", + "bla": "سىكسىكاچە", + "bm": "بامباراچە", + "bn": "بÛنگالچە", + "bo": "تىبەتچە", + "br": "Ø¨Ù‰Ø±ÛØªÙˆÙ†Ú†Û•", + "bra": "بىراجچە", + "brx": "بودوچە", + "bs": "بوسىنچە", + "bss": "ئاكۇسچە", + "bua": "بۇرىياتچە", + "bug": "بۇگىچە", + "bum": "بۇلۇچە", + "byn": "بىلىنچە", + "byv": "Ù…ÛØ¯Û‡Ù…باچە", + "ca": "كاتالانچە", + "cad": "كاددوچە", + "car": "كارىبچە", + "cay": "كايۇگاچە", + "cch": "ئاتسامچە", + "ce": "Ú†Ûچىنچە", + "ceb": "Ø³ÛØ¨Û‡Ú†Û•", + "cgg": "چىگاچە", + "ch": "چامورروچە", + "chb": "چىبچاچە", + "chg": "چاغاتايچە", + "chk": "Ú†Û‡ÙƒÚ†Û•", + "chm": "مارىچە", + "chn": "چىنۇك-ژارگونچە", + "cho": "چوكتاۋچە", + "chp": "چىپÛۋيانچە", + "chr": "Ú†ÛØ±ÙˆÙƒÙ‰Ú†Û•", + "chy": "Ú†ÛÙŠÛÙ†Ú†Û•", + "ckb": "مەركىزىي كۇردچە", + "co": "كورسۇچە", + "cop": "كوپتىكچە", + "cr": "كرىچە", + "crh": "قىرىم تۈركچە", + "cs": "Ú†ÛØ®Ú†Û•", + "csb": "كاسزۇبىچە", + "cu": "قەدىمكى سلاۋيانچە", + "cv": "چۇۋاشچە", + "cy": "Û‹Ûلشچە", + "da": "دانىشچە", + "dak": "داكوتاچە", + "dar": "دارگىۋاچە", + "dav": "تايتاچە", + "de": "Ú¯ÛØ±Ù…انچە", + "de_AT": "ئاۋستىرىيە Ú¯ÛØ±Ù…انچە", + "de_CH": "شىۋىتسارىيە ئÛگىزلىك Ú¯ÛØ±Ù…انچە", + "del": "دÛلاۋارÛÚ†Û•", + "den": "سلاۋچە", + "dgr": "دوگرىبچە", + "din": "دىنكاچە", + "dje": "زارماچە", + "doi": "دوگرىچە", + "dsb": "تۆۋەن سوربچە", + "dua": "دۇئالاچە", + "dum": "ئوتتۇرا گوللاندىيەچە", + "dv": "Ø¯Ù‰Û‹ÛØ®Ú†Û•", + "dyo": "جولاچە", + "dyu": "دىيۇلاچە", + "dz": "زوڭخاچە", + "dzg": "دازاگاچە", + "ebu": "ئÛمبۇچە", + "ee": "ئÛÛ‹ÛÚ†Û•", + "efi": "ئÛÙىكچە", + "egy": "قەدىمكى مىسىرچە", + "eka": "ئÛكاجۇكچە", + "el": "گىرÛÙƒÚ†Û•", + "elx": "ئÛلامىتچە", + "en": "ئىنگلىزچە", + "en_AU": "ئاۋسترالىيە ئىنگلىزچە", + "en_CA": "كانادا ئىنگلىزچە", + "en_GB": "ئەنگلىيە ئىنگلىزچە", + "en_US": "Ø¦Ø§Ù…ÛØ±Ù‰ÙƒØ§ ئىنگلىزچە", + "enm": "ئوتتۇرا ئەسىر ئىنگلىزچە", + "eo": "Ø¦ÛØ³Ù¾Ø±Ø§Ù†ØªÙˆÚ†Û•", + "es": "ئىسپانچە", + "es_419": "لاتىن Ø¦Ø§Ù…ÛØ±Ù‰ÙƒØ§ ئىسپانچە", + "es_ES": "ياۋروپا ئىسپانچە", + "es_MX": "Ù…Ûكسىكا ئىسپانچە", + "et": "Ø¦ÛØ³ØªÙˆÙ†Ú†Û•", + "eu": "باسكىچە", + "ewo": "ئÛۋوندوچە", + "fa": "پارسچە", + "fan": "ÙØ§Ú­Ú†Û•", + "fat": "ÙØ§Ù†ØªÙ‰Ú†Û•", + "ff": "Ùۇلاھچە", + "fi": "Ùىنچە", + "fil": "Ùىلىپپىنچە", + "fj": "Ùىجىچە", + "fo": "ÙØ§Ø¦Ûروچە", + "fon": "Ùونچە", + "fr": "Ùىرانسۇزچە", + "fr_CA": "كانادا Ùىرانسۇزچە", + "fr_CH": "شىۋىتسارىيە Ùىرانسۇزچە", + "frm": "ئوتتۇرا ئەسىر Ùىرانسۇزچە", + "fro": "قەدىمكى Ùىرانسۇزچە", + "frr": "شىمالى Ùىرىزيەچە", + "frs": "شەرقى Ùىرىزيەچە", + "fur": "Ùىرىئۇلىچە", + "fy": "غەربىي Ùىرسچە", + "ga": "ئىرÛلاندچە", + "gaa": "گاچە", + "gay": "گايوچە", + "gba": "گىباياچە", + "gd": "شوتلاندىيە گايلچىسى", + "gez": "گىزچە", + "gil": "Ú¯Ù‰Ù„Ø¨ÛØ±ØªÚ†Û•", + "gl": "گالىچە", + "gmh": "ئوتتۇرا ئەسىر ئÛگىزلىك Ú¯ÛØ±Ù…انچە", + "gn": "گۇئارانىچە", + "goh": "قەدىمكى ئÛگىزلىك Ú¯ÛØ±Ù…انچە", + "gon": "گوندىچە", + "gor": "گورونتالوچە", + "got": "گوتچە", + "grb": "Ú¯Ø±ÛØ¨ÙˆÚ†Û•", + "grc": "قەدىمكى گىرÛÙƒÚ†Û•", + "gsw": "Ú¯ÛØ±Ù…انچە شىۋىتسارىيە", + "gu": "گۇجاراتچە", + "guz": "گۇسىچە", + "gv": "مانچە", + "gwi": "گىۋىچىنچە", + "ha": "خائۇساچە", + "hai": "ھەيدەچە", + "haw": "ھاۋايچە", + "he": "ئىبرانىيچە", + "hi": "ھىندىچە", + "hil": "خىلىگاينونچە", + "hit": "خىتتىتچە", + "hmn": "Ù…Û†Ú­Ú†Û•", + "ho": "ھىرى موتۇچە", + "hr": "كىرودىچە", + "hsb": "ئۈستۈن سوربچە", + "ht": "ھايتىچە", + "hu": "Û‹Ûنگىرچە", + "hup": "خۇپاچە", + "hy": "ئەرمÛÙ†Ú†Û•", + "hz": "Ø®ÛØ±Ûروچە", + "ia": "ئارىلىق تىل", + "iba": "ئىبانچە", + "ibb": "ئىبىبىئوچە", + "id": "Ú¾Ù‰Ù†Ø¯ÙˆÙ†ÛØ²Ú†Û•", + "ie": "ئىنتىرلىڭچە", + "ig": "ئىگبوچە", + "ii": "يىچە (سىچۈەن)", + "ik": "ئىنۇپىكچە", + "ilo": "ئىلوكانوچە", + "inh": "ئىنگۇشچە", + "io": "ئىدوچە", + "is": "ئىسلاندچە", + "it": "ئىتالىيانچە", + "iu": "ئىنۇكتىتۇتچە", + "ja": "ياپونچە", + "jbo": "لوجبانچە", + "jgo": "نگومباچە", + "jmc": "ماچامچە", + "jpr": "ئىبرانى پارسچە", + "jrb": "ئىبرانى ئەرەبچە", + "jv": "ياۋاچە", + "ka": "گىرۇزچە", + "kaa": "قارا-قالپاقچە", + "kab": "كابىلÛÚ†Û•", + "kac": "كاچىنچە", + "kaj": "جۇچە", + "kam": "كامباچە", + "kaw": "كاۋىچە", + "kbd": "كاباردەيچە", + "kbl": "كانÛمبۇچە", + "kcg": "تياپچە", + "kde": "ماكوندÛÚ†Û•", + "kea": "ÙƒØ§Ø¨Û‡Û‹ÛØ±Ø¯Ù‰ÙŠØ§Ù†Ú†Û•", + "kfo": "كوروچە", + "kg": "كونگوچە", + "kha": "كاسىچە", + "kho": "خوتەنچە", + "khq": "كويرا چىنىچە", + "ki": "كىكۇيۇچە", + "kj": "كىۋانياماچە", + "kk": "قازاقچە", + "kkj": "كاكوچە", + "kl": "گىرÛنلاندچە", + "kln": "كالÛنجىنچە", + "km": "ÙƒÙ‰Ù…ÛØ±Ú†Û•", + "kmb": "كىمبۇندۇچە", + "kn": "كانناداچە", + "ko": "كورÛÙŠÛ•Ú†Û•", + "kok": "كونكانچە", + "kos": "كوسرايÛÚ†Û•", + "kpe": "كىپەللÛÚ†Û•", + "kr": "كانۇرچە", + "krc": "قاراچاي-بالقارچە", + "krl": "كارەلچە", + "kru": "كۇرۇخچە", + "ks": "كەشمىرچە", + "ksb": "شامبالاچە", + "ksf": "باÙىياچە", + "ksh": "كولىشچە", + "ku": "كۇردچە", + "kum": "Ù‚Û‡Ù…Û‡Ù‚Ú†Û•", + "kut": "كۇتەنايچە", + "kv": "كومىچە", + "kw": "كورنىشچە", + "ky": "قىرغىزچە", + "la": "لاتىنچە", + "lad": "لادىنوچە", + "lag": "لانگىچە", + "lah": "لانداچە", + "lam": "لامباچە", + "lb": "لىيۇكسÛمبۇرگچە", + "lez": "Ù„ÛØ²Ú¯Ù‰Ù†Ú†Û•", + "lg": "گانداچە", + "li": "لىمبۇرگچە", + "ln": "لىنگالاچە", + "lo": "لائوسچە", + "lol": "مونگوچە", + "loz": "لوزىچە", + "lt": "لىتۋانىچە", + "lu": "لۇبا-كاتانگاچە", + "lua": "لۇبا-لۇئاچە", + "lui": "لۇيسÛÙ†Ú¯ÙˆÚ†Û•", + "lun": "لۇنداچە", + "luo": "لۇئوچە", + "lus": "مىزوچە", + "luy": "لۇياچە", + "lv": "لاتچە", + "mad": "Ù…Ø§Ø¯Û‡Ø±ÛØ³Ú†Û•", + "maf": "Ù…Ø§ÙØ§Ú†Û•", + "mag": "ماگاخىچە", + "mai": "مايتىلىچە", + "mak": "ماكاسارچە", + "man": "ماندىنگوچە", + "mas": "ماسايچە", + "mde": "ماباچە", + "mdf": "موكشاچە", + "mdr": "ماندارچە", + "men": "Ù…ÛندÛÚ†Û•", + "mer": "Ù…ÛØ±Û‡Ú†Û•", + "mfe": "مورىسيÛÙ†Ú†Û•", + "mg": "مالاگاسچە", + "mga": "ئوتتۇرا ئەسىر ئىرÛلاندچە", + "mgh": "ماكۇۋاچە", + "mgo": "Ù…ÛØªØ§Ú†Û•’", + "mh": "مارشالچە", + "mi": "ماۋرىچە", + "mic": "مىكماكچە", + "min": "مىناڭكابائۇچە", + "mk": "Ù…Ø§ÙƒÛØ¯ÙˆÙ†Ú†Û•", + "ml": "مالايالامچە", + "mn": "موڭغۇلچە", + "mnc": "مانجۇچە", + "mni": "مانىپۇرچە", + "moh": "موخاۋكچە", + "mos": "موسسىچە", + "mr": "ماراتىچە", + "ms": "مالايچە", + "mt": "مالتاچە", + "mua": "مۇنداڭچە", + "mul": "ÙƒÛ†Ù¾ تىللار", + "mus": "كىرىكچە", + "mwl": "Ù…Ù‰Ø±Ø§Ù†Ø¯ÛØ³Ú†Û•", + "mwr": "مارۋارىچە", + "my": "بىرماچە", + "mye": "ميÛÙ†ÛÚ†Û•", + "myv": "Ø¦ÛØ±Ø²Ø§Ú†Û•", + "na": "ناۋرۇچە", + "nap": "ناپولىچە", + "naq": "ناماچە", + "nb": "نورۋىگىيە بوكمالچە", + "nd": "شىمالى ندەبەلەچە", + "nds": "تۆۋەن Ú¯ÛØ±Ù…انچە", + "ne": "Ù†Ûپالچە", + "new": "Ù†Ûۋارىچە", + "ng": "ندونگاچە", + "nia": "نىئاسچە", + "niu": "نيۇئÛÚ†Û•", + "nl": "گوللاندچە", + "nmg": "كۋاسىيوچە", + "nn": "ÙŠÛÚ­Ù‰ نورۋÛÚ¯Ú†Û•", + "nnh": "Ù†Ú¯Ûمبۇنچە", + "no": "نورۋÛÚ¯Ú†Û•", + "nog": "نوغايچە", + "non": "قەدىمكى نورۋÛÚ¯Ú†Û•", + "nqo": "نىكوچە", + "nr": "جەنۇبى ندەبەلەچە", + "nso": "شىمالىي سوتوچە", + "nus": "Ù…Û‡Ø¦ÛØ±Ú†Û•", + "nv": "ناۋاخوچە", + "nwc": "Ù†Ûۋارچە", + "ny": "نىيانجاچە", + "nym": "Ù†ÙŠØ§Ù…Û‹ÛØ²Ù‰Ú†Û•", + "nyn": "نىيانكولÛÚ†Û•", + "nyo": "نىئوروچە", + "nzi": "نىزەماچە", + "oc": "ئوكسىتچە", + "oj": "ئوجىبۋاچە", + "om": "ئوروموچە", + "or": "ئودىياچە", + "os": "Ø¦ÙˆØ³Ø³ÛØªÚ†Û•Ú†Û•", + "osa": "ئوساگÛلارچە", + "ota": "ئوسمان تۈركچە", + "pa": "پەنجابچە", + "pag": "پانگاسىنانچە", + "pal": "Ù¾Û•Ú¾Ù„Û•Û‹Ù‰Ú†Û•", + "pam": "پامپانگاچە", + "pap": "پاپىيامÛنتوچە", + "pau": "پالاۋچە", + "peo": "قەدىمكى پارىسچە", + "phn": "Ùىنىكىيەچە", + "pi": "پالىچە", + "pl": "پولەكچە", + "pon": "Ù¾ÙˆÙ†Ø§Ù¾ÛØ¦Ø§Ù†Ú†Û•", + "pro": "قەدىمكى پروۋÛنچالچە", + "ps": "پۇشتۇچە", + "pt": "پورتۇگالچە", + "pt_BR": "بىرازىلىيە پورتۇگالچە", + "pt_PT": "ياۋروپا پورتۇگالچە", + "qu": "ÙƒÛچىۋاچە", + "raj": "راجاستانچە", + "rap": "راپانىيچە", + "rm": "رومانسچە", + "rn": "رۇندىچە", + "ro": "رومىنچە", + "rof": "رومبوچە", + "rom": "سىگانچە", + "root": "غول تىل", + "ru": "رۇسچە", + "rup": "ئارومانچە", + "rw": "ÙƒÛنىيەرىۋانداچە", + "rwk": "رىۋاچە", + "sa": "سانسكرىتچە", + "sad": "سانداۋÛÚ†Û•", + "sah": "ساخاچە", + "sam": "سامارىتانچە", + "saq": "سامبۇرۇچە", + "sas": "ساساكچە", + "sat": "سانتالچە", + "sba": "نگامبايچە", + "sbp": "سانگۇچە", + "sc": "ساردىنىيەچە", + "scn": "سىتسىلىيەچە", + "sco": "شوتلاندىيەچە", + "sd": "سىندىچە", + "se": "شىمالىي سامىچە", + "see": "سÛكنÛكاچە", + "seh": "سÛناچە", + "sel": "سÛلكاپچە", + "ses": "شەرقىي سوڭخايچە", + "sg": "سانگوچە", + "sga": "قەدىمكى ئىرÛلاندچە", + "sh": "Ø³ÛØ±Ø¨-كرودىيەچە", + "shi": "شىلخاچە", + "shn": "شانچە", + "shu": "چاد ئەرەبچە", + "si": "سىنگالچە", + "sid": "سىداموچە", + "sk": "سىلوۋاكچە", + "sl": "سىلوۋÛÙ†Ú†Û•", + "sm": "ساموئاچە", + "sma": "جەنۇبىي سامىچە", + "smj": "Ù„Û‡Ù„Û Ø³Ø§Ù…Ù‰Ú†Û•", + "smn": "ئىنارى سامىچە", + "sms": "سكولت سامىچە", + "sn": "شوناچە", + "snk": "سونىنكەچە", + "so": "سومالىچە", + "sog": "سوغدىچە", + "sq": "ئالبانچە", + "sr": "Ø³ÛØ±Ø¨Ú†Û•", + "srn": "سىرانان-توڭوچە", + "srr": "Ø³ÛØ±Ûرچە", + "ss": "سىۋاتىچە", + "ssy": "ساخوچە", + "st": "سوتوچە", + "su": "سۇنداچە", + "suk": "سۇكۇماچە", + "sus": "سۇسۇچە", + "sux": "سۈمەرچە", + "sv": "Ø´Ù‰Û‹ÛØ¯Ú†Û•", + "sw": "سىۋاھىلچە", + "sw_CD": "كونگو سىۋالىچە", + "swb": "كومورىچە", + "syc": "قەدىمىي سۇرىيەچە", + "syr": "سۇرىيەچە", + "ta": "تامىلچە", + "te": "تÛÙ„Û‡Ú¯Û‡Ú†Û•", + "tem": "تÛمنÛÚ†Û•", + "teo": "ØªÛØ³ÙˆÚ†Û•", + "ter": "ØªÛØ±Ûناچە", + "tet": "ØªÛØªÛ‡Ù…Ú†Û•", + "tg": "تاجىكچە", + "th": "تايلاندچە", + "ti": "تىگرىنياچە", + "tig": "تىگرÛÚ†Û•", + "tiv": "تىۋچە", + "tk": "تۈركمەنچە", + "tkl": "توكÛلاۋچە", + "tl": "تاگالوگچە", + "tlh": "كىلىنگونچە", + "tli": "تىلىنگىتچە", + "tmh": "تاماشÛÙƒÚ†Û•", + "tn": "سىۋاناچە", + "to": "تونگانچە", + "tog": "نياسا توڭانچە", + "tpi": "توك-پىسىنچە", + "tr": "تۈركچە", + "trv": "توروكوچە", + "ts": "سونگاچە", + "tsi": "سىمشيانچە", + "tt": "تاتارچە", + "tum": "تۇمبۇكاچە", + "tvl": "تۇۋالۇچە", + "tw": "تىۋىچە", + "twq": "شىمالىي سوڭخايچە", + "ty": "تاختىچە", + "tyv": "توۋاچە", + "tzm": "مەركىزىي ئاتلاس تامازايتچە", + "udm": "ئۇدمۇرتچە", + "ug": "ئۇيغۇرچە", + "uga": "ئۇگارىتىكچە", + "uk": "ئۇكرائىنچە", + "umb": "ئۇمبۇندۇچە", + "und": "يوچۇن تىل", + "ur": "ئوردۇچە", + "uz": "ئۆزبÛÙƒÚ†Û•", + "vai": "ۋايچە", + "ve": "Û‹Ûنداچە", + "vi": "Û‹Ù‰ÙŠÛØªÙ†Ø§Ù…Ú†Û•", + "vo": "ۋولاپۇكچە", + "vot": "ۋوتÛÚ†Û•", + "vun": "ۋۇنجوچە", + "wa": "ۋاللۇنچە", + "wae": "Û‹Ø§Ù„Ø³ÛØ±Ú†Û•", + "wal": "ۋولايتاچە", + "war": "ۋارايچە", + "was": "ۋاشوچە", + "wo": "ۋولوÙÚ†Û•", + "xal": "قالماقچە", + "xh": "خوساچە", + "xog": "سوگاچە", + "yao": "ياۋچە", + "yap": "ياپچە", + "yav": "ياڭبەنچە", + "ybb": "ÙŠÛمباچە", + "yi": "يىددىشچە", + "yo": "يورۇباچە", + "yue": "گۇاڭدوڭچە", + "za": "جۇاڭچە", + "zap": "زاپوتÛÙƒÚ†Û•", + "zbl": "بىلىس بەلگىلىرى", + "zen": "زÛناگاچە", + "zgh": "ئۆلچەملىك ماراكەش تامازىتچە", + "zh": "خەنزۇچە", + "zh_Hans": "ئاددىي خەنچە", + "zh_Hant": "مۇرەككەپ خەنچە", + "zu": "زۇلۇچە", + "zun": "زۇنىچە", + "zxx": "تىل مەزمۇنى يوق", + "zza": "زازاچە" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/uk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/uk.json new file mode 100644 index 0000000000000000000000000000000000000000..25f6fe6dc1d69fb225af85ff8d21d417fa5fae54 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/uk.json @@ -0,0 +1,534 @@ +{ + "Version": "2.1.29.38", + "Names": { + "aa": "афарÑька", + "ab": "абхазька", + "ace": "ачехÑька", + "ach": "ачолі", + "ada": "адангме", + "ady": "адигейÑька", + "ae": "авеÑтійÑька", + "af": "африкаанÑ", + "afh": "африхілі", + "agq": "агем", + "ain": "айнÑька", + "ak": "акан", + "akk": "аккадÑька", + "akz": "алабама", + "ale": "алеутÑька", + "alt": "південноалтайÑька", + "am": "амхарÑька", + "an": "арагонÑька", + "ang": "давньоанглійÑька", + "anp": "ангіка", + "ar": "арабÑька", + "ar_001": "ÑучаÑна Ñтандартна арабÑька", + "arc": "арамейÑька", + "arn": "арауканÑька", + "aro": "араона", + "arp": "арапахо", + "arq": "алжирÑька арабÑька", + "arw": "аравакÑька", + "as": "аÑÑамÑька", + "asa": "аÑу", + "ase": "американÑька мова рухів", + "ast": "аÑтурÑька", + "av": "аварÑька", + "awa": "авадхі", + "ay": "аймара", + "az": "азербайджанÑька", + "az_Arab": "південноазербайджанÑька", + "ba": "башкирÑька", + "bal": "балучі", + "ban": "балійÑька", + "bar": "баеріш", + "bas": "баÑа", + "bax": "бамум", + "bbc": "батак тоба", + "bbj": "гомала", + "be": "білоруÑька", + "bej": "беджа", + "bem": "бемба", + "bew": "бетаві", + "bez": "бена", + "bfd": "бафут", + "bfq": "бадага", + "bg": "болгарÑька", + "bgn": "ÑхіднобелуджійÑька", + "bho": "бходжпурі", + "bi": "біÑлама", + "bik": "бікольÑька", + "bin": "біні", + "bjn": "банджарÑька", + "bkm": "ком", + "bla": "ÑікÑіка", + "bm": "бамбара", + "bn": "бенгальÑька", + "bo": "тибетÑька", + "bqi": "бахтіарі", + "br": "бретонÑька", + "bra": "брадж", + "brx": "бодо", + "bs": "боÑнійÑька", + "bss": "акуÑ", + "bua": "бурÑÑ‚Ñька", + "bug": "бугійÑька", + "bum": "булу", + "byn": "блін", + "byv": "медумба", + "ca": "каталонÑька", + "cad": "каддо", + "car": "карібÑька", + "cay": "кайюга", + "cch": "атÑам", + "ce": "чеченÑька", + "ceb": "ÑебуанÑька", + "cgg": "кіга", + "ch": "чаморро", + "chb": "чібча", + "chg": "чагатайÑька", + "chk": "чуукÑька", + "chm": "марійÑька", + "chn": "чинук жаргон", + "cho": "чокто", + "chp": "чіпевʼÑн", + "chr": "черокі", + "chy": "чейєнн", + "ckb": "курдÑька (Ñорані)", + "co": "корÑиканÑька", + "cop": "коптÑька", + "cr": "крі", + "crh": "кримÑькотатарÑька", + "crs": "ÑейшельÑька креольÑька", + "cs": "чеÑька", + "csb": "кашубÑька", + "cu": "церковноÑловʼÑнÑька", + "cv": "чуваÑька", + "cy": "валлійÑька", + "da": "данÑька", + "dak": "дакота", + "dar": "даргінÑька", + "dav": "таіта", + "de": "німецька", + "de_CH": "верхньонімецька (ШвейцаріÑ)", + "del": "делаварÑька", + "den": "Ñлейв", + "dgr": "догрибÑька", + "din": "дінка", + "dje": "джерма", + "doi": "догрі", + "dsb": "нижньолужицька", + "dua": "дуала", + "dum": "ÑередньонідерландÑька", + "dv": "дівехі", + "dyo": "дьола-фоні", + "dyu": "діула", + "dz": "дзонг-ке", + "dzg": "дазага", + "ebu": "ембу", + "ee": "еве", + "efi": "ефік", + "egy": "давньоєгипетÑька", + "eka": "екаджук", + "el": "грецька", + "elx": "еламÑька", + "en": "англійÑька", + "en_GB": "британÑька англійÑька", + "en_US": "американÑька англійÑька", + "enm": "ÑередньоанглійÑька", + "eo": "еÑперанто", + "es": "Ñ–ÑпанÑька", + "es_ES": "Ñ–ÑпанÑька (Європа)", + "et": "еÑтонÑька", + "eu": "баÑкÑька", + "ewo": "евондо", + "fa": "перÑька", + "fan": "фанг", + "fat": "фанті", + "ff": "фула", + "fi": "фінÑька", + "fil": "філіппінÑька", + "fj": "фіджі", + "fo": "фарерÑька", + "fon": "фон", + "fr": "французька", + "frm": "Ñередньофранцузька", + "fro": "давньофранцузька", + "frp": "арпітанÑька", + "frr": "фризька північна", + "frs": "фризька Ñхідна", + "fur": "фріульÑька", + "fy": "західнофризька", + "ga": "ірландÑька", + "gaa": "га", + "gag": "гагаузька", + "gay": "гайо", + "gba": "гбайÑ", + "gd": "гаельÑька", + "gez": "гєез", + "gil": "гільбертÑька", + "gl": "галіÑійÑька", + "gmh": "Ñередньоверхньонімецька", + "gn": "гуарані", + "goh": "давньоверхньонімецька", + "gon": "гонді", + "gor": "горонтало", + "got": "готÑька", + "grb": "гребо", + "grc": "давньогрецька", + "gsw": "німецька (ШвейцаріÑ)", + "gu": "гуджараті", + "guz": "гуÑÑ–Ñ—", + "gv": "менкÑька", + "gwi": "кучін", + "ha": "хауÑа", + "hai": "хайда", + "haw": "гавайÑька", + "he": "іврит", + "hi": "гінді", + "hil": "хілігайнон", + "hit": "хітіті", + "hmn": "хмонг", + "ho": "хірі-моту", + "hr": "хорватÑька", + "hsb": "верхньолужицька", + "ht": "гаїтÑнÑька", + "hu": "угорÑька", + "hup": "хупа", + "hy": "вірменÑька", + "hz": "гереро", + "ia": "інтерлінгва", + "iba": "ібанÑька", + "ibb": "ібібіо", + "id": "індонезійÑька", + "ie": "інтерлінгве", + "ig": "ігбо", + "ii": "Ñичуань", + "ik": "інупіак", + "ilo": "ілоканÑька", + "inh": "інгуÑька", + "io": "ідо", + "is": "Ñ–ÑландÑька", + "it": "італійÑька", + "iu": "інуктітут", + "ja": "ÑпонÑька", + "jbo": "ложбан", + "jgo": "нгомба", + "jmc": "мачаме", + "jpr": "юдео-перÑька", + "jrb": "юдео-арабÑька", + "jv": "ÑванÑька", + "ka": "грузинÑька", + "kaa": "каракалпацька", + "kab": "кабільÑька", + "kac": "качін", + "kaj": "йю", + "kam": "камба", + "kaw": "каві", + "kbd": "кабардинÑька", + "kbl": "канембу", + "kcg": "тіап", + "kde": "маконде", + "kea": "кабувердіану", + "kfo": "коро", + "kg": "конґолезька", + "kha": "кхаÑÑ–", + "kho": "хотаноÑакÑька", + "khq": "койра чіїні", + "ki": "кікуйю", + "kj": "кунама", + "kk": "казахÑька", + "kkj": "како", + "kl": "калаалліÑут", + "kln": "календжин", + "km": "кхмерÑька", + "kmb": "кімбунду", + "kn": "каннада", + "ko": "корейÑька", + "koi": "комі-перм’Ñцька", + "kok": "конкані", + "kos": "коÑрае", + "kpe": "кпеллє", + "kr": "канурі", + "krc": "карачаєво-балкарÑька", + "krl": "карельÑька", + "kru": "курукх", + "ks": "кашмірÑька", + "ksb": "шамбала", + "ksf": "бафіа", + "ksh": "колоніан", + "ku": "курдÑька", + "kum": "кумицька", + "kut": "кутенаї", + "kv": "комі", + "kw": "корнійÑька", + "ky": "киргизька", + "la": "латинÑька", + "lad": "ладіно", + "lag": "лангі", + "lah": "ланда", + "lam": "ламба", + "lb": "люкÑембурзька", + "lez": "лезгінÑька", + "lg": "ганда", + "li": "лімбургійÑька", + "lkt": "лакота", + "ln": "лінгала", + "lo": "лаоÑька", + "lol": "монго", + "loz": "лозі", + "lrc": "північна лурÑька", + "lt": "литовÑька", + "lu": "луба-катанга", + "lua": "луба-лулуа", + "lui": "луїÑеньо", + "lun": "лунда", + "luo": "луо", + "lus": "мізо", + "luy": "луйÑ", + "lv": "латвійÑька", + "mad": "мадурÑька", + "maf": "мафа", + "mag": "магадхі", + "mai": "майтхілі", + "mak": "макаÑарÑька", + "man": "мандінго", + "mas": "маÑаї", + "mde": "маба", + "mdf": "мокша", + "mdr": "мандарÑька", + "men": "менде", + "mer": "меру", + "mfe": "маврикійÑька креольÑька", + "mg": "малагаÑійÑька", + "mga": "ÑередньоірландÑька", + "mgh": "макува-меето", + "mgo": "мета", + "mh": "маршалльÑька", + "mi": "маорі", + "mic": "мікмак", + "min": "мінангкабау", + "mk": "македонÑька", + "ml": "малаÑлам", + "mn": "монгольÑька", + "mnc": "манчжурÑька", + "mni": "маніпурі", + "moh": "магавк", + "mos": "моÑÑÑ–", + "mr": "маратхі", + "ms": "малайÑька", + "mt": "мальтійÑька", + "mua": "мунданг", + "mul": "кілька мов", + "mus": "крік", + "mwl": "мірандÑька", + "mwr": "марварі", + "my": "бірманÑька", + "mye": "миін", + "myv": "ерзÑ", + "mzn": "мазандеранÑька", + "na": "науру", + "nap": "неаполітанÑька", + "naq": "нама", + "nb": "букмол (ÐорвегіÑ)", + "nd": "ндебелє північна", + "nds": "нижньонімецька", + "nds_NL": "нижньоÑакÑонÑька", + "ne": "непальÑька", + "new": "неварі", + "ng": "ндонга", + "nia": "ніаÑька", + "niu": "ніуе", + "njo": "ао нага", + "nl": "голландÑька", + "nl_BE": "фламандÑька", + "nmg": "квазіо", + "nn": "нюношк (ÐорвегіÑ)", + "nnh": "нгємбун", + "no": "норвезька", + "nog": "ногайÑька", + "non": "давньонорвезька", + "nqo": "нко", + "nr": "ндебелє південна", + "nso": "Ñото північна", + "nus": "нуер", + "nv": "навахо", + "nwc": "неварі клаÑична", + "ny": "ньÑнджа", + "nym": "ньÑмвезі", + "nyn": "ньÑнколе", + "nyo": "ньоро", + "nzi": "нзіма", + "oc": "окитан", + "oj": "оджібва", + "om": "оромо", + "or": "оріÑ", + "os": "оÑетинÑька", + "osa": "оÑейдж", + "ota": "оÑманÑька", + "pa": "панджабі", + "pag": "пангаÑінанÑька", + "pal": "пехлеві", + "pam": "пампанга", + "pap": "папʼÑменто", + "pau": "палауанÑька", + "pcm": "нігерійÑько-креольÑька", + "peo": "давньоперÑька", + "phn": "фінікійÑько-пунічна", + "pi": "палі", + "pl": "польÑька", + "pon": "понапе", + "prg": "пруÑька", + "pro": "давньопрованÑальÑька", + "ps": "пушту", + "pt": "португальÑька", + "pt_PT": "португальÑька (Європа)", + "qu": "кечуа", + "quc": "кіче", + "raj": "раджаÑтхані", + "rap": "рапануї", + "rar": "раротонга", + "rm": "ретороманÑька", + "rn": "рунді", + "ro": "румунÑька", + "ro_MD": "молдавÑька", + "rof": "ромбо", + "rom": "циганÑька", + "root": "корінь", + "ru": "роÑійÑька", + "rup": "арумунÑька", + "rw": "кіньÑруанда", + "rwk": "рва", + "sa": "ÑанÑкрит", + "sad": "Ñандаве", + "sah": "ÑкутÑька", + "sam": "ÑамаритÑнÑька арамейÑька", + "saq": "Ñамбуру", + "sas": "ÑаÑакÑька", + "sat": "ÑантальÑька", + "sba": "нгамбай", + "sbp": "Ñангу", + "sc": "ÑардинÑька", + "scn": "ÑицилійÑька", + "sco": "шотландÑька", + "sd": "Ñіндхі", + "sdh": "південнокурдÑька", + "se": "ÑаамÑька північна", + "see": "Ñенека", + "seh": "Ñена", + "sel": "ÑелькупÑька", + "ses": "койраборо Ñені", + "sg": "Ñанго", + "sga": "давньоірландÑька", + "sh": "ÑербÑько-хорватÑька", + "shi": "тачеліт", + "shn": "шанÑька", + "shu": "чадійÑька арабÑька", + "si": "ÑингальÑька", + "sid": "Ñідамо", + "sk": "Ñловацька", + "sl": "ÑловенÑька", + "sm": "ÑамоанÑька", + "sma": "південноÑаамÑька", + "smj": "ÑаамÑька луле", + "smn": "ÑаамÑька інарі", + "sms": "ÑаамÑька Ñкольт", + "sn": "шона", + "snk": "Ñонінке", + "so": "Ñомалі", + "sog": "ÑогдійÑька", + "sq": "албанÑька", + "sr": "ÑербÑька", + "srn": "Ñранан тонго", + "srr": "Ñерер", + "ss": "ÑÑ–Ñваті", + "ssy": "Ñахо", + "st": "Ñото південна", + "su": "ÑунданÑька", + "suk": "Ñукума", + "sus": "ÑуÑу", + "sux": "шумерÑька", + "sv": "шведÑька", + "sw": "Ñуахілі", + "sw_CD": "конгійÑьке Ñуахілі", + "swb": "коморÑька", + "syc": "ÑирійÑька клаÑична", + "syr": "ÑирійÑька", + "ta": "тамільÑька", + "te": "телугу", + "tem": "темне", + "teo": "теÑо", + "ter": "терено", + "tet": "тетум", + "tg": "таджицька", + "th": "тайÑька", + "ti": "тигриньÑ", + "tig": "тигре", + "tiv": "тів", + "tk": "туркменÑька", + "tkl": "токелау", + "tl": "тагальÑька", + "tlh": "клінгон", + "tli": "тлінгіт", + "tmh": "тамашек", + "tn": "Ñ‚Ñвана", + "to": "тонганÑька", + "tog": "ньÑÑа тонга", + "tpi": "ток-піÑін", + "tr": "турецька", + "trv": "тароко", + "ts": "Ñ‚Ñонга", + "tsi": "цимшиан", + "tt": "татарÑька", + "tum": "тумбука", + "tvl": "тувалу", + "tw": "тві", + "twq": "таÑавак", + "ty": "таїтÑнÑька", + "tyv": "тувинÑька", + "tzm": "центральномароканÑька тамазіт", + "udm": "удмуртÑька", + "ug": "уйгурÑька", + "uga": "угаритÑька", + "uk": "українÑька", + "umb": "умбунду", + "und": "невідома мова", + "ur": "урду", + "uz": "узбецька", + "vai": "ваї", + "ve": "венда", + "vi": "вʼєтнамÑька", + "vo": "волапʼюк", + "vot": "водÑька", + "vun": "вуньо", + "wa": "валлонÑька", + "wae": "валзерÑька", + "wal": "валамо", + "war": "варай", + "was": "вашо", + "wbp": "валпірі", + "wo": "волоф", + "xal": "калмицька", + "xh": "кхоÑа", + "xog": "Ñога", + "yao": "Ñо", + "yap": "Ñп", + "yav": "Ñнгбен", + "ybb": "ємба", + "yi": "ідиш", + "yo": "йоруба", + "yue": "кантонÑька", + "za": "чжуан", + "zap": "ÑапотекÑька", + "zbl": "бліÑÑа мова", + "zen": "зенага", + "zgh": "Ñтандартна марокканÑька берберÑька", + "zh": "китайÑька", + "zh_Hans": "китайÑька Ñпрощена", + "zh_Hant": "китайÑька традиційна", + "zu": "зулуÑька", + "zun": "зуньї", + "zxx": "немає мовного вміÑту", + "zza": "зазакі" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ur.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ur.json new file mode 100644 index 0000000000000000000000000000000000000000..13c5a59f451de24a1a4c91c606d1de6805e6768b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ur.json @@ -0,0 +1,412 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "Ø§ÙØ§Ø±", + "ab": "ابقازیان", + "ace": "اچائینیز", + "ach": "اکولی", + "ada": "ادانگمے", + "ady": "ادیگھے", + "af": "Ø§ÛŒÙØ±ÛŒÚ©Ø§Ù†Ø²", + "agq": "اغم", + "ain": "اینو", + "ak": "اکان", + "ale": "الیوت", + "alt": "جنوبی الٹائی", + "am": "Ø§Ù…ÛØ§Ø±ÛŒ", + "an": "اراگونیز", + "anp": "انگیکا", + "ar": "عربی", + "ar_001": "ماڈرن اسٹینڈرڈ عربی", + "arn": "ماپوچے", + "arp": "اراپاÛÙˆ", + "as": "آسامی", + "asa": "آسو", + "ast": "اسٹوریائی", + "av": "اواری", + "awa": "اوادھی", + "ay": "ایمارا", + "az": "آذربائیجانی", + "az_Arab": "آزربائیجانی (عربی)", + "ba": "باشکیر", + "ban": "بالینیز", + "bas": "باسا", + "be": "بیلاروسی", + "bem": "بیمبا", + "bez": "بینا", + "bg": "بلغاری", + "bgn": "مغربی بلوچی", + "bho": "بھوجپوری", + "bi": "بسلاما", + "bin": "بینی", + "bla": "سکسیکا", + "bm": "بمبارا", + "bn": "بنگالی", + "bo": "تبتی", + "br": "بریٹن", + "brx": "بوڈو", + "bs": "بوسنی", + "bug": "بگینیز", + "byn": "بلین", + "ca": "کیٹالان", + "ce": "چیچن", + "ceb": "سیبوآنو", + "cgg": "چیگا", + "ch": "کمورو", + "chk": "چوکیز", + "chm": "ماری", + "cho": "چاکٹاؤ", + "chr": "چیروکی", + "chy": "چینّے", + "ckb": "سورانی کردش", + "co": "کوراسیکن", + "cs": "چیک", + "cu": "چرچ سلاؤ", + "cv": "چوواش", + "cy": "ویلش", + "da": "ڈینش", + "dak": "ڈاکوٹا", + "dar": "درگوا", + "dav": "تائتا", + "de": "جرمن", + "de_AT": "آسٹریائی جرمن", + "de_CH": "سوئس ÛØ§Ø¦ÛŒ جرمن", + "dgr": "دوگریب", + "dje": "زرما", + "dsb": "ذیلی سربیائی", + "dua": "دوالا", + "dv": "ڈیویÛÛŒ", + "dyo": "جولا Ùونيا", + "dz": "ژونگکھا", + "dzg": "دزاگا", + "ebu": "امبو", + "ee": "ایو", + "efi": "ایÙÙÚ©", + "eka": "ایکاجوی", + "el": "یونانی", + "en": "انگریزی", + "en_AU": "آسٹریلیائی انگریزی", + "en_CA": "کینیڈین انگریزی", + "en_GB": "برطانوی انگریزی", + "en_US": "امریکی انگریزی", + "eo": "ایسپرانٹو", + "es": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ", + "es_419": "لاطینی امریکی ÛØ³Ù¾Ø§Ù†ÙˆÛŒ", + "es_ES": "یورپی ÛØ³Ù¾Ø§Ù†ÙˆÛŒ", + "es_MX": "میکسیکن ÛØ³Ù¾Ø§Ù†ÙˆÛŒ", + "et": "اسٹونین", + "eu": "باسکی", + "ewo": "ایوانڈو", + "fa": "ÙØ§Ø±Ø³ÛŒ", + "ff": "ÙولÛ", + "fi": "Ùینیش", + "fil": "Ùلیپینو", + "fj": "ÙØ¬ÛŒ", + "fo": "Ùیروئیز", + "fon": "Ùون", + "fr": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ", + "fr_CA": "کینیڈین ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ", + "fr_CH": "سوئس ÙØ±ÛŒÙ†Ú†", + "fur": "ÙØ±ÛŒÙˆÙ„یائی", + "fy": "مغربی ÙØ±ÛŒØ³ÛŒØ¦Ù†", + "ga": "Ø¢Ø¦ÛŒØ±ÙØ´", + "gaa": "گا", + "gag": "غاغاوز", + "gan": "gan", + "gd": "سکاٹ گیلÙÚ©", + "gez": "گیز", + "gil": "گلبرتیز", + "gl": "گالیشیائی", + "gn": "Ú¯ÙØ§Ø±Ø§Ù†ÛŒ", + "gor": "گورانٹالو", + "gsw": "سوئس جرمن", + "gu": "گجراتی", + "guz": "گسی", + "gv": "مینکس", + "gwi": "گوئچ ان", + "ha": "ÛØ¤Ø³Ø§", + "hak": "hak", + "haw": "Ûوائی", + "he": "عبرانی", + "hi": "Ûندی", + "hil": "حلی گینن", + "hmn": "Ûمانگ", + "hr": "کراتی", + "hsb": "اپر سربیائی", + "hsn": "hsn", + "ht": "Ûیتی", + "hu": "Ûنگیرین", + "hup": "Ûیوپا", + "hy": "ارمینی", + "hz": "ÛØ±ÛŒØ±Ùˆ", + "ia": "بین لسانیات", + "iba": "ایبان", + "ibb": "ابی بیو", + "id": "انڈونیثیائی", + "ig": "اÙگبو", + "ii": "سچوان ای", + "ilo": "ایلوکو", + "inh": "انگوش", + "io": "ایڈو", + "is": "آئس لینڈک", + "it": "اطالوی", + "iu": "اینÙکٹیٹٹ", + "ja": "جاپانی", + "jbo": "لوجبان", + "jgo": "نگومبا", + "jmc": "ماشیم", + "jv": "جاوی", + "ka": "جارجی", + "kab": "قبائلی", + "kac": "کاچن", + "kaj": "جے جو", + "kam": "کامبا", + "kbd": "کبارڈین", + "kcg": "تیاپ", + "kde": "ماكونده", + "kea": "كابويرديانو", + "kfo": "کورو", + "kg": "کانگو", + "kha": "کھاسی", + "khq": "كويرا شيني", + "ki": "کیکویو", + "kj": "کونیاما", + "kk": "قزاخ", + "kkj": "کاکو", + "kl": "كالاليست", + "kln": "كالينجين", + "km": "خمیر", + "kmb": "کیمبونڈو", + "kn": "کنّاڈا", + "ko": "کوریائی", + "koi": "کومی پرمیاک", + "kok": "کونکنی", + "kpe": "کیپیلّے", + "kr": "کانوری", + "krc": "کراچے بالکر", + "krl": "کیرلین", + "kru": "کوروکھ", + "ks": "کشمیری", + "ksb": "شامبالا", + "ksf": "باÙيا", + "ksh": "کولوگنیائی", + "ku": "کردش", + "kum": "کومیک", + "kv": "کومی", + "kw": "کورنش", + "ky": "کرغیزی", + "la": "لاطینی", + "lad": "لیڈینو", + "lag": "لانگی", + "lb": "لکسمبرگیش", + "lez": "لیزگیان", + "lg": "گینڈا", + "li": "لیمبرگش", + "lkt": "لاکوٹا", + "ln": "Ù„Ùنگَلا", + "lo": "لاؤ", + "loz": "لوزی", + "lrc": "شمالی لری", + "lt": "لیتھوینین", + "lu": "لبا-كاتانجا", + "lua": "لیوبا لولوآ", + "lun": "لونڈا", + "luo": "لو", + "lus": "میزو", + "luy": "لویا", + "lv": "لیٹوین", + "mad": "مدورسی", + "mag": "مگاÛÛŒ", + "mai": "میتھیلی", + "mak": "مکاسر", + "mas": "ماسای", + "mdf": "موکشا", + "men": "میندے", + "mer": "میرو", + "mfe": "موریسیین", + "mg": "ملاگاسی", + "mgh": "ماخاوا-ميتو", + "mgo": "میٹا", + "mh": "مارشلیز", + "mi": "ماؤری", + "mic": "مکمیک", + "min": "منانگکباؤ", + "mk": "مقدونیائی", + "ml": "مالایالم", + "mn": "منگولین", + "mni": "منی پوری", + "moh": "Ù…ÙˆÛØ§Ú©", + "mos": "موسی", + "mr": "مراٹهی", + "ms": "مالے", + "mt": "مالٹی", + "mua": "منڈانگ", + "mul": "متعدد زبانیں", + "mus": "کریک", + "mwl": "میرانڈیز", + "my": "برمی", + "myv": "ارزیا", + "mzn": "مزندرانی", + "na": "ناؤرو", + "nan": "nan", + "nap": "نیاپولیٹن", + "naq": "ناما", + "nb": "نارویجین بوکمل", + "nd": "شمالی دبیل", + "nds": "ادنی جرمن", + "nds_NL": "ادنی سیکسن", + "ne": "نیپالی", + "new": "نیواری", + "ng": "نڈونگا", + "nia": "نیاس", + "niu": "نیویائی", + "nl": "ÚˆÚ†", + "nl_BE": "ÙÙ„ÛŒÙ…ÙØ´", + "nmg": "كوايسو", + "nn": "نورویجینی نینورسک", + "nnh": "نگیمبون", + "no": "نارویجین", + "nog": "نوگائی", + "nqo": "اینکو", + "nr": "جنوبی نڈیبیلی", + "nso": "شمالی سوتھو", + "nus": "نویر", + "nv": "نواجو", + "ny": "نیانجا", + "nyn": "نینکول", + "oc": "آكسیٹان", + "om": "اورومو", + "or": "اڑیÛ", + "os": "اوسیٹک", + "pa": "پنجابی", + "pag": "پنگاسنان", + "pam": "پامپنگا", + "pap": "پاپیامینٹو", + "pau": "پالاون", + "pcm": "نائجیریائی Ù¾ÚˆÚ¯Ù†", + "pl": "پولش", + "prg": "پارسی", + "ps": "پشتو", + "pt": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ", + "pt_BR": "برازیلی پرتگالی", + "pt_PT": "یورپی پرتگالی", + "qu": "کویچوآ", + "quc": "كيشی", + "rap": "رپانوی", + "rar": "راروتونگان", + "rm": "رومانش", + "rn": "رونڈی", + "ro": "رومینین", + "ro_MD": "مالدووا", + "rof": "رومبو", + "root": "روٹ", + "ru": "روسی", + "rup": "ارومانی", + "rw": "کینیاروانڈا", + "rwk": "روا", + "sa": "سنسکرت", + "sad": "سنڈاوے", + "sah": "ساکھا", + "saq": "سامبورو", + "sat": "سنتالی", + "sba": "نگامبے", + "sbp": "سانگو", + "sc": "سردینین", + "scn": "سیسیلین", + "sco": "سکاٹ", + "sd": "سندھی", + "sdh": "جنوبی کرد", + "se": "شمالی سامی", + "seh": "سینا", + "ses": "كويرابورو سينی", + "sg": "ساںغو", + "sh": "سربو-کروئیشین", + "shi": "تشلحيت", + "shn": "شان", + "si": "Ø³Ù†ÛØ§Ù„ا", + "sk": "سلوواک", + "sl": "سلووینیائی", + "sm": "ساموآن", + "sma": "جنوبی سامی", + "smj": "لول سامی", + "smn": "اناری سامی", + "sms": "سکولٹ سامی", + "sn": "شونا", + "snk": "سوننکے", + "so": "صومالی", + "sq": "البانی", + "sr": "سربین", + "srn": "سرانن ٹونگو", + "ss": "سواتی", + "ssy": "ساÛÙˆ", + "st": "جنوبی سوتھو", + "su": "سنڈانیز", + "suk": "سکوما", + "sv": "سویڈش", + "sw": "سواحلی", + "sw_CD": "کانگو سواحلی", + "swb": "کوموریائی", + "syr": "سریانی", + "ta": "تمل", + "te": "تیلگو", + "tem": "ٹمنے", + "teo": "تیسو", + "tet": "ٹیٹم", + "tg": "تاجک", + "th": "تھائی", + "ti": "ٹگرینیا", + "tig": "ٹگرے", + "tk": "ترکمان", + "tl": "ٹیگا لوگ", + "tlh": "کلنگن", + "tn": "سوانا", + "to": "ٹونگن", + "tpi": "ٹوک Ù¾ÙØ³ÙÙ†", + "tr": "ترکی", + "trv": "ٹوروکو", + "ts": "زونگا", + "tt": "تاتار", + "tum": "ٹمبوکا", + "tvl": "تووالو", + "tw": "توی", + "twq": "تاساواق", + "ty": "تاÛیتی", + "tyv": "تووینین", + "tzm": "سینٹرل ایٹلس ٹمازائٹ", + "udm": "ادمورت", + "ug": "ÛŒÙˆØ¦Ú¯ÛØ±", + "uk": "یوکرینیائی", + "umb": "اومبوندو", + "und": "نامعلوم زبان", + "ur": "اردو", + "uz": "ازبیک", + "vai": "وائی", + "ve": "وینڈا", + "vi": "ویتنامی", + "vo": "وولاپوک", + "vun": "ونجو", + "wa": "والون", + "wae": "والسر", + "wal": "وولایتا", + "war": "وارے", + "wbp": "وارلپیری", + "wo": "وولوÙ", + "wuu": "wuu", + "xal": "کالمیک", + "xh": "ژوسا", + "xog": "سوگا", + "yav": "یانگبین", + "ybb": "یمبا", + "yi": "یدش", + "yo": "یوروبا", + "yue": "کینٹونیز", + "zgh": "اسٹینڈرڈ مراقشی تمازیقی", + "zh": "چینی", + "zh_Hans": "چینی (آسان کردÛ)", + "zh_Hant": "روایتی چینی", + "zu": "زولو", + "zun": "زونی", + "zxx": "کوئی لسانی مواد Ù†Ûیں", + "zza": "زازا" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ur_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ur_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..4eca2e13cff88117b42616905457a7f129f7cc08 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/ur_IN.json @@ -0,0 +1,20 @@ +{ + "Version": "2.1.27.79", + "Names": { + "af": "Ø§ÙØ±ÛŒÙ‚ÛŒ", + "ar_001": "جدید معیاری عربی", + "awa": "اودھی", + "ckb": "سورانی کردی", + "dje": "زرمÛ", + "hr": "کروشین", + "jv": "جاوانیز", + "ka": "جارجيائى", + "kl": "کلالیسٹ", + "kn": "Ú©Ù†Ú‘", + "ku": "کرد", + "mag": "Ù…Ú¯ÛÛŒ", + "mas": "مسائی", + "zgh": "معیاری مراقشی تمازیقی", + "zh_Hans": "آسان چینی" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/uz.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/uz.json new file mode 100644 index 0000000000000000000000000000000000000000..ae94c1b105baa0cb814b1817a5eba86fbe401076 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/uz.json @@ -0,0 +1,381 @@ +{ + "Version": "2.1.29.44", + "Names": { + "ab": "abxaz", + "ace": "achin", + "ada": "adangme", + "ady": "adigey", + "af": "afrikaans", + "agq": "agem", + "ain": "aynu", + "ak": "akan", + "ale": "aleut", + "alt": "janubiy oltoy", + "am": "amxar", + "an": "aragon", + "anp": "angika", + "ar": "arab", + "ar_001": "standart arab", + "arn": "araukan", + "arp": "arapaxo", + "as": "assam", + "asa": "asu", + "ast": "asturiy", + "av": "avar", + "awa": "avadxi", + "ay": "aymara", + "az": "ozarbayjon", + "ba": "boshqird", + "be": "belarus", + "bem": "bemba", + "bez": "bena", + "bg": "bolgar", + "bgn": "g‘arbiy baluj", + "bho": "bxojpuri", + "bi": "bislama", + "bin": "bini", + "bla": "siksika", + "bm": "bambara", + "bn": "bengal", + "bo": "tibet", + "br": "breton", + "brx": "bodo", + "bs": "bosniy", + "bug": "bugi", + "ca": "katalan", + "ce": "chechen", + "cgg": "chiga", + "ch": "chamorro", + "chk": "chukot", + "cho": "choktav", + "chr": "cheroki", + "chy": "cheyenn", + "ckb": "sorani-kurd", + "co": "korsikan", + "crs": "kreol (Seyshel)", + "cs": "chex", + "cu": "slavyan (cherkov)", + "cv": "chuvash", + "cy": "valliy", + "da": "dat", + "dak": "dakota", + "dar": "dargva", + "dav": "taita", + "de": "nemischa", + "de_AT": "nemis (Avstriya)", + "de_CH": "yuqori nemis (Shveytsariya)", + "dgr": "dogrib", + "dje": "zarma", + "dsb": "quyi sorbcha", + "dua": "duala", + "dyo": "diola-fogni", + "dz": "dzongka", + "ebu": "embu", + "ee": "eve", + "efi": "efik", + "eka": "ekajuk", + "el": "grek", + "en": "inglizcha", + "en_AU": "ingliz (Avstraliya)", + "en_CA": "ingliz (Kanada)", + "en_GB": "ingliz (Britaniya)", + "en_US": "ingliz (Amerika)", + "eo": "esperanto", + "es": "ispancha", + "es_419": "ispan (Lotin Amerikasi)", + "es_ES": "ispan (Yevropa)", + "es_MX": "ispan (Meksika)", + "et": "estoncha", + "eu": "bask", + "fa": "fors", + "fi": "fincha", + "fil": "filipincha", + "fj": "fiji", + "fo": "farercha", + "fon": "fon", + "fr": "fransuzcha", + "fr_CA": "fransuz (Kanada)", + "fr_CH": "fransuz (Shveytsariya)", + "fy": "g‘arbiy friz", + "ga": "irland", + "gaa": "ga", + "gag": "gagauz", + "gan": "gan", + "gez": "geez", + "gil": "gilbert", + "gl": "galisiy", + "gn": "guarani", + "gor": "gorontalo", + "gsw": "nemis (Shveytsariya)", + "gu": "gujarot", + "guz": "gusii", + "gv": "men", + "gwi": "gvichin", + "ha": "xausa", + "hak": "hak", + "haw": "gavaycha", + "he": "ibroniy", + "hi": "hind", + "hmn": "xmong", + "hr": "xorvat", + "hsb": "yuqori sorb", + "hsn": "hsn", + "ht": "gaityan", + "hu": "venger", + "hup": "xupa", + "hy": "arman", + "hz": "gerero", + "ia": "interlingva", + "iba": "iban", + "ibb": "ibibio", + "id": "indonez", + "ig": "igbo", + "ii": "sichuan", + "ilo": "iloko", + "inh": "ingush", + "io": "ido", + "is": "island", + "it": "italyan", + "iu": "inuktitut", + "ja": "yapon", + "jbo": "lojban", + "jgo": "ngomba", + "jmc": "machame", + "jv": "yavan", + "ka": "gruzincha", + "kab": "kabil", + "kac": "kachin", + "kaj": "kaji", + "kam": "kamba", + "kbd": "kabardin", + "kcg": "tyap", + "kde": "makonde", + "kea": "kabuverdianu", + "kfo": "koro", + "kha": "kxasi", + "khq": "koyra-chiini", + "ki": "kikuyu", + "kj": "kvanyama", + "kk": "qozoqcha", + "kkj": "kako", + "kl": "grenland", + "kln": "kalenjin", + "km": "xmercha", + "kmb": "kimbundu", + "kn": "kannada", + "ko": "koreyscha", + "koi": "komi-permyak", + "kok": "konkan", + "kpe": "kpelle", + "kr": "kanuri", + "krc": "qorachoy-bolqor", + "krl": "karel", + "kru": "kurux", + "ks": "kashmircha", + "ksb": "shambala", + "ksf": "bafiya", + "ksh": "kyoln", + "ku": "kurdcha", + "kum": "qo‘miq", + "kv": "komi", + "kw": "korn", + "ky": "qirgÊ»izcha", + "la": "lotincha", + "lad": "ladino", + "lag": "langi", + "lb": "lyuksemburgcha", + "lez": "lezgin", + "lg": "ganda", + "li": "limburg", + "lkt": "lakota", + "ln": "lingala", + "lo": "laos", + "loz": "lozi", + "lrc": "shimoliy luri", + "lt": "litva", + "lu": "luba-katanga", + "lua": "luba-lulua", + "lun": "lunda", + "luo": "luo", + "lus": "lushay", + "luy": "luhya", + "lv": "latishcha", + "mad": "madur", + "mag": "magahi", + "mai": "maythili", + "mak": "makasar", + "mas": "masay", + "mdf": "moksha", + "men": "mende", + "mer": "meru", + "mfe": "morisyen", + "mg": "malagasiy", + "mgh": "maxuva-mitto", + "mgo": "meta", + "mh": "marshall", + "mi": "maori", + "mic": "mikmak", + "min": "minangkabau", + "mk": "makedon", + "ml": "malayalam", + "mn": "mo‘g‘ul", + "moh": "mohauk", + "mos": "mossi", + "mr": "maratxi", + "ms": "malay", + "mt": "maltiy", + "mua": "mundang", + "mul": "bir nechta til", + "mus": "krik", + "mwl": "miranda", + "my": "birman", + "myv": "erzya", + "mzn": "mozandaron", + "na": "nauru", + "nan": "nan", + "nap": "neapolitan", + "naq": "nama", + "nb": "norveg-bokmal", + "nd": "shimoliy ndebele", + "nds": "quyi nemis", + "nds_NL": "quyi sakson", + "ne": "nepal", + "new": "nevar", + "ng": "ndonga", + "nia": "nias", + "nl": "golland", + "nl_BE": "flamand", + "nmg": "kvasio", + "nn": "norveg-nyunorsk", + "nnh": "ngiyembun", + "nog": "no‘g‘ay", + "nqo": "nko", + "nso": "shimoliy soto", + "nus": "nuer", + "nv": "navaxo", + "nyn": "nyankole", + "om": "oromo", + "or": "oriya", + "os": "osetin", + "pa": "panjobcha", + "pag": "pangasinan", + "pam": "pampanga", + "pau": "palau", + "pcm": "kreol (Nigeriya)", + "pl": "polyakcha", + "prg": "pruss", + "ps": "pushtu", + "pt": "portugalcha", + "pt_BR": "portugal (Braziliya)", + "pt_PT": "portugal (Yevropa)", + "qu": "kechua", + "quc": "kiche", + "rap": "rapanui", + "rar": "rarotongan", + "rm": "romansh", + "rn": "rundi", + "ro": "rumincha", + "ro_MD": "moldovan", + "rof": "rombo", + "root": "tub aholi tili", + "ru": "ruscha", + "rup": "arumin", + "rw": "kinyaruanda", + "rwk": "ruanda", + "sa": "sanskrit", + "sad": "sandave", + "sah": "saxa", + "saq": "samburu", + "sba": "ngambay", + "sbp": "sangu", + "sc": "sardin", + "scn": "sitsiliya", + "sco": "shotland", + "sd": "sindxi", + "sdh": "janubiy kurd", + "se": "shimoliy saam", + "seh": "sena", + "ses": "koyraboro-senni", + "sg": "sango", + "shi": "tashelxit", + "shn": "shan", + "si": "singal", + "sk": "slovakcha", + "sl": "slovencha", + "sm": "samoa", + "sma": "janubiy saam", + "smj": "lule-saam", + "smn": "inari-saam", + "sms": "skolt-saam", + "sn": "shona", + "snk": "soninke", + "so": "somalicha", + "sq": "alban", + "sr": "serbcha", + "srn": "sranan-tongo", + "st": "janubiy soto", + "su": "sundan", + "suk": "sukuma", + "sv": "shved", + "sw": "suaxili", + "sw_CD": "suaxili (Kongo)", + "swb": "qamar", + "ta": "tamil", + "te": "telugu", + "tem": "timne", + "teo": "teso", + "tet": "tetum", + "tg": "tojik", + "th": "tay", + "ti": "tigrinya", + "tig": "tigre", + "tk": "turkman", + "tlh": "klingon", + "tn": "tsvana", + "to": "tongan", + "tpi": "tok-piksin", + "tr": "turk", + "trv": "taroko", + "ts": "tsonga", + "tt": "tatar", + "tum": "tumbuka", + "tvl": "tuvalu", + "twq": "tasavak", + "ty": "taiti", + "tyv": "tuva", + "tzm": "markaziy atlas tamazigxt", + "udm": "udmurt", + "ug": "uyg‘ur", + "uk": "ukrain", + "umb": "umbundu", + "und": "noma’lum til", + "ur": "urdu", + "uz": "o‘zbek", + "vai": "vai", + "ve": "venda", + "vi": "vyetnam", + "vo": "volapyuk", + "vun": "vunjo", + "wa": "vallon", + "war": "varay", + "wbp": "valbiri", + "wo": "volof", + "wuu": "wuu", + "xal": "qalmoq", + "xh": "kxosa", + "xog": "soga", + "yav": "yangben", + "ybb": "yemba", + "yi": "idish", + "yo": "yoruba", + "yue": "kanton", + "zgh": "tamazigxt", + "zh": "xitoy", + "zh_Hans": "xitoy (soddalashgan)", + "zh_Hant": "xitoy (an’anaviy)", + "zu": "zulu", + "zun": "zuni", + "zxx": "til tarkibi yo‘q", + "zza": "zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/uz_Arab.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/uz_Arab.json new file mode 100644 index 0000000000000000000000000000000000000000..5cdb32c2314cf12f5d5029dcb4c03b725882d343 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/uz_Arab.json @@ -0,0 +1,8 @@ +{ + "Version": "2.1.27.40", + "Names": { + "fa": "دری", + "ps": "پشتو", + "uz": "اوزبیک" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/uz_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/uz_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..d8e7999a5b351d691dfe2560fa921d43d04d72ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/uz_Cyrl.json @@ -0,0 +1,306 @@ +{ + "Version": "2.1.27.98", + "Names": { + "aa": "афарча", + "ab": "абхазча", + "ace": "ачин", + "ada": "адангмÑ", + "ady": "адигей", + "af": "африкаанÑ", + "agq": "агемча", + "ain": "айну", + "ak": "аканча", + "ale": "алеут", + "am": "амхарча", + "an": "арагон", + "anp": "ангика", + "ar": "арабча", + "ar_001": "Ñтандарт арабча", + "arn": "мапудунгун", + "arp": "арапахо", + "as": "аÑÑомча", + "asa": "аÑуча", + "ast": "аÑтурийча", + "av": "аварча", + "awa": "авадхи", + "ay": "аймара", + "az": "озарбайжонча", + "ba": "бошқирдча", + "ban": "балича", + "bas": "баÑаа", + "be": "беларуÑча", + "bem": "бемба", + "bez": "бенача", + "bg": "болгарча", + "bho": "бхожпури", + "bi": "биÑлама", + "bin": "бини", + "bm": "бамбарча", + "bn": "бенгалча", + "bo": "тибетча", + "br": "бретонча", + "brx": "бодоча", + "bs": "боÑнийча", + "bug": "бугийча", + "byn": "блинча", + "ca": "каталонча", + "ce": "чечен тили", + "ceb": "Ñебуанча", + "cgg": "чигача", + "ch": "чаморро", + "chk": "чуукча", + "chm": "мари", + "cho": "чоктавча", + "chr": "чероки", + "chy": "шайенн", + "ckb": "Ñорани-курдча", + "co": "корÑиканча", + "cs": "чехча", + "cu": "ÑлавÑнча (черков)", + "cv": "чуваш тили", + "cy": "уÑлÑча", + "da": "датча", + "dak": "дакотча", + "dar": "даргинча", + "dav": "таитача", + "de": "немиÑча", + "dgr": "догриб", + "dje": "зарма", + "dsb": "қуйи-Ñорбча", + "dua": "дуалача", + "dv": "дивехи", + "dyo": "диола-фогни", + "dz": "дзонгка", + "dzg": "дазага", + "ebu": "Ñмбуча", + "ee": "Ñвеча", + "efi": "Ñфик", + "eka": "Ñкажук", + "el": "грекча", + "en": "инглизча", + "en_GB": "инглизча (БританиÑ)", + "en_US": "инглизча (Ðмерика)", + "eo": "ÑÑперанто", + "es": "иÑпанча", + "et": "ÑÑтонча", + "eu": "баÑкча", + "ewo": "Ñвондонча", + "fa": "форÑий", + "ff": "фулаҳ", + "fi": "финча", + "fil": "филипинча", + "fj": "фижича", + "fo": "фарерча", + "fon": "фон", + "fr": "французча", + "fur": "фриулча", + "fy": "ғарбий фризча", + "ga": "ирландча", + "gaa": "га", + "gd": "шотландча гаелик", + "gez": "геÑз", + "gil": "гилбертча", + "gl": "галицийча", + "gn": "гуарани", + "gor": "горонтало", + "gsw": "немиÑча (ШвейцариÑ)", + "gu": "гужаротча", + "guz": "гуÑии", + "gv": "мÑнча", + "gwi": "гвичин", + "ha": "хауÑа", + "haw": "гавайча", + "he": "иброний", + "hi": "ҳинди", + "hil": "хилигайнон", + "hmn": "хмонгча", + "hr": "хорватча", + "hsb": "юқори Ñорбча", + "ht": "гаитÑнча", + "hu": "венгерча", + "hup": "хупа тили", + "hy": "арманча", + "hz": "гереро", + "ia": "интерлингва", + "iba": "ибан тили", + "ibb": "ибибо", + "id": "индонезча", + "ig": "игбо", + "ilo": "илоко", + "inh": "ингушча", + "io": "идо", + "is": "иÑландча", + "it": "италÑнча", + "iu": "инуктитут", + "ja": "Ñпонча", + "jgo": "нгомба", + "jmc": "мачаме тили", + "jv": "Ñванча", + "ka": "грузинча", + "kab": "кабилча", + "kaj": "кажи", + "kam": "камбача", + "kde": "макондеча", + "kea": "кабувердиану", + "khq": "койра-чиини", + "ki": "кикую", + "kk": "қозоқча", + "kkj": "како", + "kl": "гренландча", + "kln": "каленжинча", + "km": "хмерча", + "kn": "каннада", + "ko": "корейÑча", + "kok": "конканча", + "kr": "канури", + "ks": "кашмирча", + "ksb": "шамбала", + "ksf": "бафиÑча", + "ksh": "кёлнча", + "ku": "курдча", + "kw": "корнча", + "ky": "қирғизча", + "la": "лотинча", + "lag": "лангича", + "lb": "люкÑембургча", + "lg": "гандача", + "lkt": "лакотачалакотача", + "ln": "лингалча", + "lo": "лаоÑча", + "lrc": "шимолий лури", + "lt": "литвача", + "lu": "луба-катанга", + "lus": "лушай", + "luy": "луҳÑ", + "lv": "латишча", + "mas": "маÑайча", + "mdf": "мокша тили", + "men": "менде", + "mer": "меруча", + "mfe": "мориÑьен", + "mg": "малагаÑийча", + "mgh": "махува-митто", + "mgo": "мета", + "mh": "маршалл тили", + "mi": "маори", + "mic": "микмак", + "min": "минангкабау", + "mk": "македонча", + "ml": "малаÑлам", + "mn": "мўғулча", + "mni": "манипурча", + "moh": "могавк", + "mos": "моÑÑи", + "mr": "маратхи", + "ms": "малай тил", + "mt": "малтача", + "mua": "мунданг", + "mul": "бир нечта тил", + "mus": "крикча", + "mwl": "мирандеÑ", + "my": "бирманча", + "myv": "ÑрзÑнча", + "mzn": "мазандеран", + "naq": "нама", + "nb": "норвегча бокмал", + "nd": "шимолий ндебеле", + "ne": "непалча", + "niu": "ниуÑча", + "nl": "голландча", + "nl_BE": "фламандча", + "nmg": "кваÑио", + "nn": "норвегча нюнорÑк", + "nnh": "нгиембун", + "nqo": "нко", + "nr": "жанубий ндебелча", + "nus": "нуÑрча", + "ny": "чева", + "nyn": "нÑнколе", + "oc": "окÑитанча", + "om": "оромо", + "or": "одиÑ", + "pa": "панжобча", + "pap": "папиÑменто", + "pl": "полÑкча", + "ps": "пушту", + "pt": "португалча", + "qu": "кечуа", + "quc": "кичÑ", + "rm": "романшча", + "rn": "рунди", + "ro": "руминча", + "rof": "ромбоча", + "ru": "руÑча", + "rup": "арумин", + "rw": "кинÑруанда", + "rwk": "руанда тили", + "sa": "ÑанÑкрит", + "sah": "Ñаха", + "saq": "Ñамбуруча", + "sat": "Ñантали", + "sbp": "Ñангуча", + "sd": "Ñиндҳи", + "se": "шимолий Ñаамча", + "seh": "Ñена", + "ses": "койраборо-Ñенни", + "sg": "Ñанго", + "shi": "ташелхит", + "si": "Ñингалча", + "sk": "Ñловакча", + "sl": "Ñловенча", + "sma": "жанубий Ñаамча", + "smj": "луле-Ñаамча", + "smn": "инари-Ñаамча", + "sms": "Ñколт-Ñаамча", + "sn": "шона", + "so": "Ñомалича", + "sq": "албанча", + "sr": "Ñербча", + "ss": "Ñвати", + "ssy": "Ñаҳоча", + "su": "Ñунданча", + "sv": "шведча", + "sw": "Ñуахили", + "sw_CD": "конго-Ñуахили", + "swb": "коморча", + "syr": "ÑуриÑча", + "ta": "тамилча", + "te": "телугу", + "teo": "теÑо", + "tg": "тожикча", + "th": "тайча", + "ti": "тигринÑча", + "tig": "тигре", + "tk": "туркманча", + "to": "тонганча", + "tr": "туркча", + "tt": "татарча", + "twq": "таÑавак", + "tzm": "марказий Ð°Ñ‚Ð»Ð°Ñ Ñ‚Ð°Ð¼Ð°Ð·Ð¸Ð³Ñ…Ñ‚", + "ug": "уйғурча", + "uk": "украинча", + "und": "номаълум тил", + "ur": "урду", + "uz": "ўзбекча", + "vai": "ваи", + "ve": "венда", + "vi": "ветнамча", + "vo": "волапюк", + "vun": "вунжо", + "wae": "валÑерча", + "wal": "волÑтта", + "wo": "волофча", + "xh": "хоÑа", + "xog": "Ñога", + "yav": "Ñнгбен", + "yi": "иддиш", + "yo": "йоруба", + "yue": "кантонча", + "zgh": "тамазигхт", + "zh": "хитойча", + "zh_Hans": "Ñоддалаштирилган хитойча", + "zh_Hant": "анъанавий хитойча", + "zu": "зулу", + "zxx": "Тил таркиби йўқ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/vi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/vi.json new file mode 100644 index 0000000000000000000000000000000000000000..a00caa7d30aa456605cee01ecb27102a21c9e6d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/vi.json @@ -0,0 +1,555 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "Tiếng Afar", + "ab": "Tiếng Abkhazia", + "ace": "Tiếng Achinese", + "ach": "Tiếng Acoli", + "ada": "Tiếng Adangme", + "ady": "Tiếng Adyghe", + "ae": "Tiếng Avestan", + "af": "Tiếng Afrikaans", + "afh": "Tiếng Afrihili", + "agq": "Tiếng Aghem", + "ain": "Tiếng Ainu", + "ak": "Tiếng Akan", + "akk": "Tiếng Akkadia", + "akz": "Tiếng Alabama", + "ale": "Tiếng Aleut", + "aln": "Tiếng Gheg Albani", + "alt": "Tiếng Altai Miá»n Nam", + "am": "Tiếng Amharic", + "an": "Tiếng Aragon", + "ang": "Tiếng Anh cổ", + "anp": "Tiếng Angika", + "ar": "Tiếng Ả Rập", + "ar_001": "Tiếng Ả Rập Hiện đại", + "arc": "Tiếng Aramaic", + "arn": "Tiếng Mapuche", + "aro": "Tiếng Araona", + "arp": "Tiếng Arapaho", + "arq": "Tiếng Ả Rập Algeria", + "arw": "Tiếng Arawak", + "arz": "Tiếng Ả Rập Ai Cập", + "as": "Tiếng Assam", + "asa": "Tiếng Asu", + "ase": "Ngôn ngữ Ký hiệu Mỹ", + "ast": "Tiếng Asturias", + "av": "Tiếng Avaric", + "awa": "Tiếng Awadhi", + "ay": "Tiếng Aymara", + "az": "Tiếng Azerbaijan", + "ba": "Tiếng Bashkir", + "bal": "Tiếng Baluchi", + "ban": "Tiếng Bali", + "bar": "Tiếng Bavaria", + "bas": "Tiếng Basaa", + "bax": "Tiếng Bamun", + "bbc": "Tiếng Batak Toba", + "bbj": "Tiếng Ghomala", + "be": "Tiếng Belarus", + "bej": "Tiếng Beja", + "bem": "Tiếng Bemba", + "bew": "Tiếng Betawi", + "bez": "Tiếng Bena", + "bfd": "Tiếng Bafut", + "bfq": "Tiếng Badaga", + "bg": "Tiếng Bulgaria", + "bgn": "Tiếng Tây Balochi", + "bho": "Tiếng Bhojpuri", + "bi": "Tiếng Bislama", + "bik": "Tiếng Bikol", + "bin": "Tiếng Bini", + "bjn": "Tiếng Banjar", + "bkm": "Tiếng Kom", + "bla": "Tiếng Siksika", + "bm": "Tiếng Bambara", + "bn": "Tiếng Bangla", + "bo": "Tiếng Tây Tạng", + "bpy": "Tiếng Bishnupriya", + "bqi": "Tiếng Bakhtiari", + "br": "Tiếng Breton", + "bra": "Tiếng Braj", + "brh": "Tiếng Brahui", + "brx": "Tiếng Bodo", + "bs": "Tiếng Bosnia", + "bss": "Tiếng Akoose", + "bua": "Tiếng Buriat", + "bug": "Tiếng Bugin", + "bum": "Tiếng Bulu", + "byn": "Tiếng Blin", + "byv": "Tiếng Medumba", + "ca": "Tiếng Catalan", + "cad": "Tiếng Caddo", + "car": "Tiếng Carib", + "cay": "Tiếng Cayuga", + "cch": "Tiếng Atsam", + "ce": "Tiếng Chechen", + "ceb": "Tiếng Cebuano", + "cgg": "Tiếng Chiga", + "ch": "Tiếng Chamorro", + "chb": "Tiếng Chibcha", + "chg": "Tiếng Chagatai", + "chk": "Tiếng Chuuk", + "chm": "Tiếng Mari", + "chn": "Biệt ngữ Chinook", + "cho": "Tiếng Choctaw", + "chp": "Tiếng Chipewyan", + "chr": "Tiếng Cherokee", + "chy": "Tiếng Cheyenne", + "ckb": "Tiếng Kurd Miá»n Trung", + "co": "Tiếng Corsica", + "cop": "Tiếng Coptic", + "cps": "Tiếng Capiznon", + "cr": "Tiếng Cree", + "crh": "Tiếng Thổ NhÄ© Kỳ Crimean", + "crs": "Tiếng Pháp Seselwa Creole", + "cs": "Tiếng Séc", + "csb": "Tiếng Kashubia", + "cu": "Tiếng SlavÆ¡ Nhà thá»", + "cv": "Tiếng Chuvash", + "cy": "Tiếng Wales", + "da": "Tiếng Äan Mạch", + "dak": "Tiếng Dakota", + "dar": "Tiếng Dargwa", + "dav": "Tiếng Taita", + "de": "Tiếng Äức", + "de_CH": "Tiếng Thượng Giéc-man (Thụy SÄ©)", + "del": "Tiếng Delaware", + "den": "Tiếng Slave", + "dgr": "Tiếng Dogrib", + "din": "Tiếng Dinka", + "dje": "Tiếng Zarma", + "doi": "Tiếng Dogri", + "dsb": "Tiếng Hạ Sorbia", + "dtp": "Tiếng Dusun Miá»n Trung", + "dua": "Tiếng Duala", + "dum": "Tiếng Hà Lan Trung cổ", + "dv": "Tiếng Divehi", + "dyo": "Tiếng Jola-Fonyi", + "dyu": "Tiếng Dyula", + "dz": "Tiếng Dzongkha", + "dzg": "Tiếng Dazaga", + "ebu": "Tiếng Embu", + "ee": "Tiếng Ewe", + "efi": "Tiếng Efik", + "egl": "Tiếng Emilia", + "egy": "Tiếng Ai Cập cổ", + "eka": "Tiếng Ekajuk", + "el": "Tiếng Hy Lạp", + "elx": "Tiếng Elamite", + "en": "Tiếng Anh", + "en_GB": "Tiếng Anh (Anh)", + "en_US": "Tiếng Anh (Mỹ)", + "enm": "Tiếng Anh Trung cổ", + "eo": "Tiếng Quốc Tế Ngữ", + "es": "Tiếng Tây Ban Nha", + "es_419": "Tiếng Tây Ban Nha (Mỹ La tinh)", + "es_ES": "Tiếng Tây Ban Nha (Châu Âu)", + "esu": "Tiếng Yupik Miá»n Trung", + "et": "Tiếng Estonia", + "eu": "Tiếng Basque", + "ewo": "Tiếng Ewondo", + "ext": "Tiếng Extremadura", + "fa": "Tiếng Ba Tư", + "fan": "Tiếng Fang", + "fat": "Tiếng Fanti", + "ff": "Tiếng Fulah", + "fi": "Tiếng Phần Lan", + "fil": "Tiếng Philippines", + "fj": "Tiếng Fiji", + "fo": "Tiếng Faroe", + "fon": "Tiếng Fon", + "fr": "Tiếng Pháp", + "frc": "Tiếng Pháp Cajun", + "frm": "Tiếng Pháp Trung cổ", + "fro": "Tiếng Pháp cổ", + "frp": "Tiếng Arpitan", + "frr": "Tiếng Frisia Miá»n Bắc", + "frs": "Tiếng Frisian Miá»n Äông", + "fur": "Tiếng Friulian", + "fy": "Tiếng Frisia", + "ga": "Tiếng Ireland", + "gaa": "Tiếng Ga", + "gag": "Tiếng Gagauz", + "gan": "Tiếng Cám", + "gay": "Tiếng Gayo", + "gba": "Tiếng Gbaya", + "gd": "Tiếng Gael Scotland", + "gez": "Tiếng Geez", + "gil": "Tiếng Gilbert", + "gl": "Tiếng Galician", + "glk": "Tiếng Gilaki", + "gmh": "Tiếng Thượng Giéc-man Trung cổ", + "gn": "Tiếng Guarani", + "goh": "Tiếng Thượng Giéc-man cổ", + "gom": "Tiếng Goan Konkani", + "gon": "Tiếng Gondi", + "gor": "Tiếng Gorontalo", + "got": "Tiếng Gô-tích", + "grb": "Tiếng Grebo", + "grc": "Tiếng Hy Lạp cổ", + "gsw": "Tiếng Äức (Thụy SÄ©)", + "gu": "Tiếng Gujarati", + "gur": "Tiếng Frafra", + "guz": "Tiếng Gusii", + "gv": "Tiếng Manx", + "gwi": "Tiếng Gwichʼin", + "ha": "Tiếng Hausa", + "hai": "Tiếng Haida", + "hak": "Tiếng Khách Gia", + "haw": "Tiếng Hawaii", + "he": "Tiếng Do Thái", + "hi": "Tiếng Hindi", + "hif": "Tiếng Fiji Hindi", + "hil": "Tiếng Hiligaynon", + "hit": "Tiếng Hittite", + "hmn": "Tiếng Hmông", + "ho": "Tiếng Hiri Motu", + "hr": "Tiếng Croatia", + "hsb": "Tiếng Thượng Sorbia", + "hsn": "Tiếng Tương", + "ht": "Tiếng Haiti", + "hu": "Tiếng Hungary", + "hup": "Tiếng Hupa", + "hy": "Tiếng Armenia", + "hz": "Tiếng Herero", + "ia": "Tiếng Khoa Há»c Quốc Tế", + "iba": "Tiếng Iban", + "ibb": "Tiếng Ibibio", + "id": "Tiếng Indonesia", + "ie": "Tiếng Interlingue", + "ig": "Tiếng Igbo", + "ii": "Tiếng Di Tứ Xuyên", + "ik": "Tiếng Inupiaq", + "ilo": "Tiếng Iloko", + "inh": "Tiếng Ingush", + "io": "Tiếng Ido", + "is": "Tiếng Iceland", + "it": "Tiếng Ã", + "iu": "Tiếng Inuktitut", + "izh": "Tiếng Ingria", + "ja": "Tiếng Nhật", + "jam": "Tiếng Anh Jamaica Creole", + "jbo": "Tiếng Lojban", + "jgo": "Tiếng Ngomba", + "jmc": "Tiếng Machame", + "jpr": "Tiếng Judeo-Ba Tư", + "jrb": "Tiếng Judeo-Ả Rập", + "jut": "Tiếng Jutish", + "jv": "Tiếng Java", + "ka": "Tiếng Gruzia", + "kaa": "Tiếng Kara-Kalpak", + "kab": "Tiếng Kabyle", + "kac": "Tiếng Kachin", + "kaj": "Tiếng Jju", + "kam": "Tiếng Kamba", + "kaw": "Tiếng Kawi", + "kbd": "Tiếng Kabardian", + "kbl": "Tiếng Kanembu", + "kcg": "Tiếng Tyap", + "kde": "Tiếng Makonde", + "kea": "Tiếng Kabuverdianu", + "kfo": "Tiếng Koro", + "kg": "Tiếng Kongo", + "kha": "Tiếng Khasi", + "kho": "Tiếng Khotan", + "khq": "Tiếng Koyra Chiini", + "ki": "Tiếng Kikuyu", + "kj": "Tiếng Kuanyama", + "kk": "Tiếng Kazakh", + "kkj": "Tiếng Kako", + "kl": "Tiếng Kalaallisut", + "kln": "Tiếng Kalenjin", + "km": "Tiếng KhÆ¡-me", + "kmb": "Tiếng Kimbundu", + "kn": "Tiếng Kannada", + "ko": "Tiếng Hàn", + "koi": "Tiếng Komi-Permyak", + "kok": "Tiếng Konkani", + "kos": "Tiếng Kosrae", + "kpe": "Tiếng Kpelle", + "kr": "Tiếng Kanuri", + "krc": "Tiếng Karachay-Balkar", + "krl": "Tiếng Karelian", + "kru": "Tiếng Kurukh", + "ks": "Tiếng Kashmir", + "ksb": "Tiếng Shambala", + "ksf": "Tiếng Bafia", + "ksh": "Tiếng Cologne", + "ku": "Tiếng Kurd", + "kum": "Tiếng Kumyk", + "kut": "Tiếng Kutenai", + "kv": "Tiếng Komi", + "kw": "Tiếng Cornwall", + "ky": "Tiếng Kyrgyz", + "la": "Tiếng La-tinh", + "lad": "Tiếng Ladino", + "lag": "Tiếng Langi", + "lah": "Tiếng Lahnda", + "lam": "Tiếng Lamba", + "lb": "Tiếng Luxembourg", + "lez": "Tiếng Lezghian", + "lg": "Tiếng Ganda", + "li": "Tiếng Limburg", + "lkt": "Tiếng Lakota", + "ln": "Tiếng Lingala", + "lo": "Tiếng Lào", + "lol": "Tiếng Mongo", + "loz": "Tiếng Lozi", + "lrc": "Tiếng Bắc Luri", + "lt": "Tiếng Litva", + "lu": "Tiếng Luba-Katanga", + "lua": "Tiếng Luba-Lulua", + "lui": "Tiếng Luiseno", + "lun": "Tiếng Lunda", + "luo": "Tiếng Luo", + "lus": "Tiếng Lushai", + "luy": "Tiếng Luyia", + "lv": "Tiếng Latvia", + "mad": "Tiếng Madura", + "maf": "Tiếng Mafa", + "mag": "Tiếng Magahi", + "mai": "Tiếng Maithili", + "mak": "Tiếng Makasar", + "man": "Tiếng Mandingo", + "mas": "Tiếng Masai", + "mde": "Tiếng Maba", + "mdf": "Tiếng Moksha", + "mdr": "Tiếng Mandar", + "men": "Tiếng Mende", + "mer": "Tiếng Meru", + "mfe": "Tiếng Morisyen", + "mg": "Tiếng Malagasy", + "mga": "Tiếng Ai-len Trung cổ", + "mgh": "Tiếng Makhuwa-Meetto", + "mgo": "Tiếng Meta’", + "mh": "Tiếng Marshall", + "mi": "Tiếng Maori", + "mic": "Tiếng Micmac", + "min": "Tiếng Minangkabau", + "mk": "Tiếng Macedonia", + "ml": "Tiếng Malayalam", + "mn": "Tiếng Mông Cổ", + "mnc": "Tiếng Mãn Châu", + "mni": "Tiếng Manipuri", + "moh": "Tiếng Mohawk", + "mos": "Tiếng Mossi", + "mr": "Tiếng Marathi", + "ms": "Tiếng Mã Lai", + "mt": "Tiếng Malta", + "mua": "Tiếng Mundang", + "mul": "Nhiá»u Ngôn ngữ", + "mus": "Tiếng Creek", + "mwl": "Tiếng Miranda", + "mwr": "Tiếng Marwari", + "my": "Tiếng Miến Äiện", + "mye": "Tiếng Myene", + "myv": "Tiếng Erzya", + "mzn": "Tiếng Mazanderani", + "na": "Tiếng Nauru", + "nan": "Tiếng Mân Nam", + "nap": "Tiếng Napoli", + "naq": "Tiếng Nama", + "nb": "Tiếng Na Uy (BokmÃ¥l)", + "nd": "Tiếng Ndebele Miá»n Bắc", + "nds": "Tiếng Hạ Giéc-man", + "nds_NL": "Tiếng Hạ Saxon", + "ne": "Tiếng Nepal", + "new": "Tiếng Newari", + "ng": "Tiếng Ndonga", + "nia": "Tiếng Nias", + "niu": "Tiếng Niuean", + "njo": "Tiếng Ao Naga", + "nl": "Tiếng Hà Lan", + "nl_BE": "Tiếng Flemish", + "nmg": "Tiếng Kwasio", + "nn": "Tiếng Na Uy (Nynorsk)", + "nnh": "Tiếng Ngiemboon", + "no": "Tiếng Na Uy", + "nog": "Tiếng Nogai", + "non": "Tiếng Na Uy cổ", + "nqo": "Tiếng N’Ko", + "nr": "Tiếng Ndebele Miá»n Nam", + "nso": "Tiếng Sotho Miá»n Bắc", + "nus": "Tiếng Nuer", + "nv": "Tiếng Navajo", + "nwc": "Tiếng Newari cổ", + "ny": "Tiếng Nyanja", + "nym": "Tiếng Nyamwezi", + "nyn": "Tiếng Nyankole", + "nyo": "Tiếng Nyoro", + "nzi": "Tiếng Nzima", + "oc": "Tiếng Occitan", + "oj": "Tiếng Ojibwa", + "om": "Tiếng Oromo", + "or": "Tiếng Odia", + "os": "Tiếng Ossetic", + "osa": "Tiếng Osage", + "ota": "Tiếng Thổ NhÄ© Kỳ Ottoman", + "pa": "Tiếng Punjab", + "pag": "Tiếng Pangasinan", + "pal": "Tiếng Pahlavi", + "pam": "Tiếng Pampanga", + "pap": "Tiếng Papiamento", + "pau": "Tiếng Palauan", + "pcm": "Tiếng Nigeria Pidgin", + "peo": "Tiếng Ba Tư cổ", + "phn": "Tiếng Phoenicia", + "pi": "Tiếng Pali", + "pl": "Tiếng Ba Lan", + "pon": "Tiếng Pohnpeian", + "prg": "Tiếng Prussia", + "pro": "Tiếng Provençal cổ", + "ps": "Tiếng Pashto", + "pt": "Tiếng Bồ Äào Nha", + "pt_PT": "Tiếng Bồ Äào Nha (Châu Âu)", + "qu": "Tiếng Quechua", + "quc": "Tiếng Kʼicheʼ", + "qug": "Tiếng Quechua ở Cao nguyên Chimborazo", + "raj": "Tiếng Rajasthani", + "rap": "Tiếng Rapanui", + "rar": "Tiếng Rarotongan", + "rm": "Tiếng Romansh", + "rn": "Tiếng Rundi", + "ro": "Tiếng Romania", + "ro_MD": "Tiếng Moldova", + "rof": "Tiếng Rombo", + "rom": "Tiếng Romany", + "root": "Tiếng Root", + "ru": "Tiếng Nga", + "rup": "Tiếng Aromania", + "rw": "Tiếng Kinyarwanda", + "rwk": "Tiếng Rwa", + "sa": "Tiếng Phạn", + "sad": "Tiếng Sandawe", + "sah": "Tiếng Sakha", + "sam": "Tiếng Samaritan Aramaic", + "saq": "Tiếng Samburu", + "sas": "Tiếng Sasak", + "sat": "Tiếng Santali", + "sba": "Tiếng Ngambay", + "sbp": "Tiếng Sangu", + "sc": "Tiếng Sardinia", + "scn": "Tiếng Sicilia", + "sco": "Tiếng Scots", + "sd": "Tiếng Sindhi", + "sdh": "Tiếng Kurd Miá»n Nam", + "se": "Tiếng Sami Miá»n Bắc", + "see": "Tiếng Seneca", + "seh": "Tiếng Sena", + "sel": "Tiếng Selkup", + "ses": "Tiếng Koyraboro Senni", + "sg": "Tiếng Sango", + "sga": "Tiếng Ai-len cổ", + "sh": "Tiếng Serbo-Croatia", + "shi": "Tiếng Tachelhit", + "shn": "Tiếng Shan", + "shu": "Tiếng Ả-Rập Chad", + "si": "Tiếng Sinhala", + "sid": "Tiếng Sidamo", + "sk": "Tiếng Slovak", + "sl": "Tiếng Slovenia", + "sm": "Tiếng Samoa", + "sma": "Tiếng Sami Miá»n Nam", + "smj": "Tiếng Lule Sami", + "smn": "Tiếng Inari Sami", + "sms": "Tiếng Skolt Sami", + "sn": "Tiếng Shona", + "snk": "Tiếng Soninke", + "so": "Tiếng Somali", + "sog": "Tiếng Sogdien", + "sq": "Tiếng Albania", + "sr": "Tiếng Serbia", + "srn": "Tiếng Sranan Tongo", + "srr": "Tiếng Serer", + "ss": "Tiếng Swati", + "ssy": "Tiếng Saho", + "st": "Tiếng Sotho Miá»n Nam", + "su": "Tiếng Sunda", + "suk": "Tiếng Sukuma", + "sus": "Tiếng Susu", + "sux": "Tiếng Sumeria", + "sv": "Tiếng Thụy Äiển", + "sw": "Tiếng Swahili", + "sw_CD": "Tiếng Swahili Congo", + "swb": "Tiếng Cômo", + "syc": "Tiếng Syriac cổ", + "syr": "Tiếng Syriac", + "ta": "Tiếng Tamil", + "te": "Tiếng Telugu", + "tem": "Tiếng Timne", + "teo": "Tiếng Teso", + "ter": "Tiếng Tereno", + "tet": "Tiếng Tetum", + "tg": "Tiếng Tajik", + "th": "Tiếng Thái", + "ti": "Tiếng Tigrinya", + "tig": "Tiếng Tigre", + "tiv": "Tiếng Tiv", + "tk": "Tiếng Turkmen", + "tkl": "Tiếng Tokelau", + "tl": "Tiếng Tagalog", + "tlh": "Tiếng Klingon", + "tli": "Tiếng Tlingit", + "tmh": "Tiếng Tamashek", + "tn": "Tiếng Tswana", + "to": "Tiếng Tonga", + "tog": "Tiếng Nyasa Tonga", + "tpi": "Tiếng Tok Pisin", + "tr": "Tiếng Thổ NhÄ© Kỳ", + "trv": "Tiếng Taroko", + "ts": "Tiếng Tsonga", + "tsi": "Tiếng Tsimshian", + "tt": "Tiếng Tatar", + "tum": "Tiếng Tumbuka", + "tvl": "Tiếng Tuvalu", + "tw": "Tiếng Twi", + "twq": "Tiếng Tasawaq", + "ty": "Tiếng Tahiti", + "tyv": "Tiếng Tuvinian", + "tzm": "Tiếng Tamazight Miá»n Trung Ma-rốc", + "udm": "Tiếng Udmurt", + "ug": "Tiếng Duy Ngô NhÄ©", + "uga": "Tiếng Ugaritic", + "uk": "Tiếng Ucraina", + "umb": "Tiếng Umbundu", + "und": "Ngôn ngữ không xác định", + "ur": "Tiếng Urdu", + "uz": "Tiếng Uzbek", + "vai": "Tiếng Vai", + "ve": "Tiếng Venda", + "vi": "Tiếng Việt", + "vo": "Tiếng Volapük", + "vot": "Tiếng Votic", + "vun": "Tiếng Vunjo", + "wa": "Tiếng Walloon", + "wae": "Tiếng Walser", + "wal": "Tiếng Walamo", + "war": "Tiếng Waray", + "was": "Tiếng Washo", + "wbp": "Tiếng Warlpiri", + "wo": "Tiếng Wolof", + "wuu": "Tiếng Ngô", + "xal": "Tiếng Kalmyk", + "xh": "Tiếng Xhosa", + "xog": "Tiếng Soga", + "yao": "Tiếng Yao", + "yap": "Tiếng Yap", + "yav": "Tiếng Yangben", + "ybb": "Tiếng Yemba", + "yi": "Tiếng Yiddish", + "yo": "Tiếng Yoruba", + "yue": "Tiếng Quảng Äông", + "za": "Tiếng Choang", + "zap": "Tiếng Zapotec", + "zbl": "Ký hiệu Blissymbols", + "zen": "Tiếng Zenaga", + "zgh": "Tiếng Tamazight Chuẩn cá»§a Ma-rốc", + "zh": "Tiếng Trung", + "zu": "Tiếng Zulu", + "zun": "Tiếng Zuni", + "zxx": "Không có ná»™i dung ngôn ngữ", + "zza": "Tiếng Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/yi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/yi.json new file mode 100644 index 0000000000000000000000000000000000000000..5d6ceb561d89013f824d5168f1654bcce60621fd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/yi.json @@ -0,0 +1,153 @@ +{ + "Version": "2.1.27.97", + "Names": { + "aa": "×ַפֿ×ַר", + "af": "×ַפֿריק×ַנס", + "akk": "×Ö·×§×ַדיש", + "am": "×ַמה×ַריש", + "an": "×ַר×Ö·×’×ניש", + "ang": "×ַלט ענגליש", + "ar": "×ַר×ַביש", + "arc": "×ַר×ַמיש", + "as": "×ַס×ַמיש", + "az": "×ַזערביידזש×ַניש", + "ban": "ב×ַלינעזיש", + "bar": "בײַעריש", + "be": "בעל×ַרוסיש", + "bg": "בולג×ַריש", + "bn": "בענג×ַליש", + "bo": "טיבעטיש", + "br": "ברעט×ניש", + "bs": "ב×סניש", + "ca": "×§×ַט×ַל×ניש", + "ceb": "סעבו×ַניש", + "crh": "קרי×־טערקיש", + "cs": "טשעכיש", + "csb": "×§×ַשוביש", + "cu": "קלויסטער־סל×ַוויש", + "cy": "וועלשיש", + "da": "דעניש", + "de": "דײַטש", + "dsb": "×ונטער־ס×רביש", + "dyo": "זש×ל×־פֿ×× ×™", + "el": "גריכיש", + "en": "ענגליש", + "enm": "מיטל ענגליש", + "eo": "עספּער×ַנט×", + "es": "שפּ×ַניש", + "et": "עסטיש", + "eu": "ב×ַסקיש", + "fa": "פּערסיש", + "fi": "פֿיניש", + "fil": "פֿיליפּינ×", + "fj": "פֿידזשי", + "fo": "פֿ×ַר×יש", + "fr": "פֿר×ַנצויזיש", + "fro": "×ַלט־פֿר×ַנצויזיש", + "frr": "דרו×־פֿריזיש", + "frs": "מזרח־פֿריזיש", + "fy": "מערב־פֿריזיש", + "ga": "×יריש", + "gd": "סק×טיש געליש", + "gl": "×’×ַלישיש", + "gmh": "מיטל הויכדויטש", + "goh": "×ַלט־ הויכדויטש", + "got": "×’×טיש", + "grc": "×ור×ַלט־גריכיש", + "gv": "מ×ַנקס", + "ha": "×”×ַוס×Ö·", + "he": "העברע×יש", + "hi": "הינדי", + "hif": "פידזשי הינדי", + "hr": "קר××ַטיש", + "hsb": "×ייבער־ס×רביש", + "hu": "×ונגעריש", + "hy": "×ַרמעניש", + "id": "×ינד×נעזיש", + "io": "×יד×", + "is": "×יסל×ַנדיש", + "it": "×יט×ַליעניש", + "ja": "×™×ַפּ×ַניש", + "jbo": "ל×זשב×ָן", + "jpr": "יידיש־פערסיש", + "jv": "×™×ַוו×ַנעזיש", + "ka": "גרוזיניש", + "kk": "×§×Ö·×–×ַכיש", + "km": "כמער", + "kn": "×§×Ö·× ×ַד×Ö·", + "ko": "×§×רע×יש", + "ku": "קורדיש", + "kw": "×§×רניש", + "ky": "קירגיזיש", + "la": "ל×טייניש", + "lad": "ל×ַדינ×", + "lb": "לוקסעמבורגיש", + "liv": "ליוויש", + "lo": "ל×Ö·×", + "lt": "ליטוויש", + "lus": "מיז×", + "lv": "לעטיש", + "mi": "מ×Ö·×ריש", + "mk": "מ×ַקעד×ניש", + "ml": "מ×ַל×Ö·×™×ַל×Ö·×", + "mn": "מ×× ×’×ליש", + "mt": "מ×ַלטעזיש", + "my": "בירמ×ַניש", + "nap": "× ×ַפּ×ליטַניש", + "nds": "נידערדײַטש", + "ne": "נעפּ×ַליש", + "nl": "×”×לענדיש", + "nl_BE": "פֿלעמיש", + "nn": "נײַ־נ×רוועגיש", + "no": "× ×רוועגיש", + "oc": "×קסיט×ַניש", + "os": "×סעטיש", + "peo": "×ַלט פּערסיש", + "pl": "פּויליש", + "prg": "פּרייסיש", + "ps": "פּ×ַשט×Ö¸", + "pt": "פּ×רטוגעזיש", + "ro": "רומעניש", + "ru": "רוסיש", + "rue": "רוסיניש", + "sa": "ס×ַנסקריט", + "sc": "ס×ַרדיש", + "scn": "סיצילי×ַניש", + "sco": "סק×טס", + "sd": "סינדהי", + "se": "× ×רדס×ַמיש", + "sga": "×ַלט־×יריש", + "sh": "סערב×־קר××ַטיש", + "si": "סינה×ַליש", + "sk": "סל×וו×ַקיש", + "sl": "סל×וועניש", + "sli": "×ונטער שלעזיש", + "sly": "sly", + "sm": "ס×ַמ××ַניש", + "sn": "ש×× ×Ö·", + "so": "ס×מ×ַליש", + "sq": "×ַלב×ַניש", + "sr": "סערביש", + "sux": "סומעריש", + "sv": "שוועדיש", + "sw": "סוו×ַהיליש", + "sw_CD": "×§×× ×’×־סוו×ַהיליש", + "swb": "×§×מ×ריש", + "szl": "שלעזיש", + "ta": "ט×ַמיל", + "tig": "טיגרע", + "tk": "טורקמעניש", + "tl": "ט×Ö·×’×ַל××’", + "tt": "ט×ָטעריש", + "uk": "×וקר×Ö·×יניש", + "und": "×ומב×ַוו×וסטע שפּר×ַך", + "ur": "×ורדו", + "uz": "×וזבעקיש", + "vi": "וויעטנ×ַמעזיש", + "vls": "מערב פֿלעמיש", + "vo": "וו×ל×ַפּוק", + "yi": "ייִדיש", + "zh": "כינעזיש", + "zu": "זולו" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/yo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/yo.json new file mode 100644 index 0000000000000000000000000000000000000000..56764681b200ea24a7f57ca3a5200ffe844e2dd2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/yo.json @@ -0,0 +1,103 @@ +{ + "Version": "2.1.27.40", + "Names": { + "af": "Èdè Afrikani", + "ak": "Èdè Akani", + "am": "Èdè Amariki", + "ar": "Èdè Arabiki", + "as": "Ti Assam", + "az": "Èdè Azerbaijani", + "be": "Èdè Belarusi", + "bg": "Èdè Bugaria", + "bn": "Èdè Bengali", + "br": "Èdè Bretoni", + "bs": "Èdè Bosnia", + "ca": "Èdè Catala", + "cs": "Èdè seeki", + "cy": "Èdè Welshi", + "da": "Èdè Ilẹ̀ Denmark", + "de": "Èdè Ilẹ̀ Gemani", + "el": "Èdè Giriki", + "en": "Èdè Gẹ̀ẹÌsì", + "eo": "Èdè Esperanto", + "es": "Èdè Sipanisi", + "et": "Èdè Estonia", + "eu": "Èdè Baski", + "fa": "Èdè Pasia", + "fi": "Èdè Finisi", + "fil": "Èdè Tagalogi", + "fo": "Èdè Faroesi", + "fr": "Èdè Faransé", + "fy": "Èdè Frisia", + "ga": "Èdè Ireland", + "gd": "Èdè Gaelik ti Ilu Scotland", + "gl": "Èdè Galicia", + "gn": "Èdè Guarani", + "gu": "Èdè Gujarati", + "ha": "Èdè Hausa", + "he": "Èdè Heberu", + "hi": "Èdè Hindi", + "hr": "Èdè Kroatia", + "hu": "Èdè Hungaria", + "hy": "Èdè Ile Armenia", + "ia": "Èdè pipo", + "id": "Èdè Indonasia", + "ie": "Iru Èdè", + "ig": "Èdè Ibo", + "is": "Èdè Icelandic", + "it": "Èdè Italiani", + "ja": "Èdè Japanisi", + "jv": "Èdè Javanasi", + "ka": "Èdè Georgia", + "km": "Èdè kameri", + "kn": "Èdè Kannada", + "ko": "Èdè Koria", + "la": "Èdè Latini", + "lt": "Èdè Lithuania", + "lv": "Èdè Latvianu", + "mk": "Èdè Macedonia", + "mr": "Èdè marathi", + "ms": "Èdè Malaya", + "mt": "Èdè Malta", + "my": "Èdè Bumiisi", + "ne": "Èdè Nepali", + "nl": "Èdè Duki", + "no": "Èdè Norway", + "oc": "Èdè Occitani", + "pa": "Èdè Punjabi", + "pl": "Èdè Ilẹ̀ Polandi", + "pt": "Èdè Pá»tugi", + "ro": "Èdè Romania", + "ru": "Èdè Ì£Rá»á»sia", + "rw": "Èdè Ruwanda", + "sa": "Èdè awon ara Indo", + "sd": "Èdè Sindhi", + "sh": "Èdè Serbo-Croatiani", + "si": "Èdè Sinhalese", + "sk": "Èdè Slovaki", + "sl": "Èdè Slovenia", + "so": "Èdè ara Somalia", + "sq": "Èdè Albania", + "sr": "Èdè Serbia", + "st": "Èdè Sesoto", + "su": "Èdè Sudani", + "sv": "Èdè Suwidiisi", + "sw": "Èdè Swahili", + "ta": "Èdè Tamili", + "te": "Èdè Telugu", + "th": "Èdè Tai", + "ti": "Èdè Tigrinya", + "tk": "Èdè Turkmen", + "tlh": "Èdè Klingoni", + "tr": "Èdè Tá»á»kisi", + "uk": "Èdè Ukania", + "ur": "Èdè Udu", + "uz": "Èdè Uzbek", + "vi": "Èdè Jetinamu", + "xh": "Èdè Xhosa", + "yi": "Èdè Yiddishi", + "yo": "Èdè Yorùbá", + "zh": "Èdè Mandari", + "zu": "Èdè á¹¢ulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/yo_BJ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/yo_BJ.json new file mode 100644 index 0000000000000000000000000000000000000000..60eaa605654a2b40e00d0960519686054cab4c8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/yo_BJ.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.29.54", + "Names": { + "da": "Èdè Ilɛ̀ Denmark", + "de": "Èdè Ilɛ̀ Gemani", + "en": "Èdè Gɛ̀ɛÌsì", + "pl": "Èdè Ilɛ̀ Polandi", + "pt": "Èdè PÉ”tugi", + "ru": "Èdè Ì£Rɔɔsia", + "tr": "Èdè Tɔɔkisi", + "zu": "Èdè Shulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zh.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zh.json new file mode 100644 index 0000000000000000000000000000000000000000..5c3c12bbf8d67d628d4e2bd8f2c535b3048e7b74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zh.json @@ -0,0 +1,530 @@ +{ + "Version": "2.1.29.84", + "Names": { + "aa": "阿法尔文", + "ab": "阿布哈西亚语", + "ace": "äºšé½æ–‡", + "ach": "阿乔利文", + "ada": "阿当梅文", + "ady": "阿迪格文", + "ae": "阿维斯塔文", + "af": "å—éžè·å…°è¯­", + "afh": "阿弗里希利文", + "agq": "亚罕文", + "ain": "阿伊努文", + "ak": "阿肯文", + "akk": "阿å¡å¾·æ–‡", + "ale": "阿留申文", + "alt": "å—阿尔泰文", + "am": "阿姆哈拉文", + "an": "阿拉贡文", + "ang": "å¤è‹±æ–‡", + "anp": "昂加文", + "ar": "阿拉伯语", + "ar_001": "现代标准阿拉伯语", + "arc": "阿拉米文", + "arn": "马普切文", + "arp": "é˜¿æ‹‰å¸•éœæ–‡", + "arw": "阿拉瓦克文", + "as": "阿è¨å§†æ–‡", + "asa": "é˜¿è‹æ–‡", + "ast": "阿斯图里亚斯文", + "av": "阿瓦尔文", + "awa": "阿瓦乔文", + "ay": "艾马拉文", + "az": "阿塞拜疆语", + "az_Arab": "å—阿塞拜疆文", + "ba": "巴什基尔文", + "bal": "俾路支文", + "ban": "巴里文", + "bas": "å·´è¨æ–‡", + "bax": "巴姆穆文", + "bbj": "戈马拉文", + "be": "白俄罗斯语", + "bej": "è´æ²™æ–‡", + "bem": "别姆巴文", + "bez": "è´çº³æ–‡", + "bfd": "å·´éžç‰¹æ–‡", + "bg": "ä¿åŠ åˆ©äºšè¯­", + "bgn": "西俾路支文", + "bho": "åšæ°æ™®å°”æ–‡", + "bi": "比斯拉马文", + "bik": "比科尔文", + "bin": "比尼文", + "bkm": "科姆文", + "bla": "è¥¿å…‹è¥¿å¡æ–‡", + "bm": "ç­å·´æ‹‰æ–‡", + "bn": "孟加拉语", + "bo": "è—语", + "br": "布列塔尼文", + "bra": "å¸ƒæ‹‰æ°æ–‡", + "brx": "åšå¤šæ–‡", + "bs": "波斯尼亚语", + "bss": "阿库色文", + "bua": "布里亚特文", + "bug": "å¸ƒå‰æ–‡", + "bum": "å¸ƒé²æ–‡", + "byn": "布林文", + "byv": "梅敦巴文", + "ca": "加泰罗尼亚语", + "cad": "å¡å¤šæ–‡", + "car": "加勒比语", + "cay": "å¡å°¤åŠ æ–‡", + "cch": "é˜¿ç¿æ–‡", + "ce": "车臣文", + "ceb": "宿务文", + "cgg": "奇加文", + "ch": "查莫罗文", + "chb": "奇布查文", + "chg": "æŸ¥åŠ å°æ–‡", + "chk": "丘克文", + "chm": "马里文", + "chn": "å¥‡åŠªå…‹æ··åˆæ–‡", + "cho": "乔克托文", + "chp": "奇佩维安文", + "chr": "彻罗基文", + "chy": "å¤å»¶æ–‡", + "ckb": "中库尔德文", + "co": "科西嘉文", + "cop": "科普特文", + "cr": "å…‹é‡Œæ—æ–‡", + "crh": "克里米亚土耳其文", + "crs": "塞舌尔克里奥尔文", + "cs": "æ·å…‹è¯­", + "csb": "å¡èˆ’比文", + "cu": "教会斯拉夫文", + "cv": "楚瓦什文", + "cy": "å¨å°”士语", + "da": "丹麦语", + "dak": "达科他文", + "dar": "达尔格瓦文", + "dav": "å°å¡”æ–‡", + "de": "å¾·æ–‡", + "de_AT": "奥地利德文", + "de_CH": "瑞士高地德文", + "del": "ç‰¹æ‹‰åŽæ–‡", + "den": "岿‹‰ç»´æ–‡", + "dgr": "多格里布文", + "din": "ä¸å¡æ–‡", + "dje": "哲尔马文", + "doi": "多格拉文", + "dsb": "下索布文", + "dua": "都阿拉文", + "dum": "中å¤è·å…°æ–‡", + "dv": "迪维希文", + "dyo": "朱拉文", + "dyu": "迪尤拉文", + "dz": "宗塿–‡", + "dzg": "达扎葛文", + "ebu": "æ©å¸ƒæ–‡", + "ee": "埃维文", + "efi": "埃è²å…‹æ–‡", + "egy": "å¤åŸƒåŠè¯­", + "eka": "è‰¾å¡æœ±å…‹æ–‡", + "el": "希腊语", + "elx": "埃兰文", + "en": "英语", + "enm": "中å¤è‹±æ–‡", + "eo": "世界语", + "es": "西ç­ç‰™æ–‡", + "es_419": "拉ä¸ç¾Žæ´²è¥¿ç­ç‰™æ–‡", + "es_ES": "欧洲西ç­ç‰™æ–‡", + "es_MX": "墨西哥西ç­ç‰™æ–‡", + "et": "爱沙尼亚语", + "eu": "巴斯克文", + "ewo": "æ—ºæœæ–‡", + "fa": "波斯文", + "fan": "芳格文", + "fat": "芳蒂文", + "ff": "富拉文", + "fi": "芬兰语", + "fil": "è²å¾‹å®¾è¯­", + "fj": "æ–æµŽæ–‡", + "fo": "法罗文", + "fon": "丰文", + "fr": "法语", + "frm": "䏭夿³•æ–‡", + "fro": "夿³•æ–‡", + "frr": "北弗里西亚文", + "frs": "东弗里西亚文", + "fur": "弗留利文", + "fy": "西弗里西亚文", + "ga": "爱尔兰语", + "gaa": "åŠ æ—æ–‡", + "gag": "加告兹文", + "gan": "赣语", + "gay": "迦约文", + "gba": "格巴亚文", + "gd": "è‹æ ¼å…°ç›–尔文", + "gez": "å‰å…¹æ–‡", + "gil": "å‰å°”伯特斯文", + "gl": "加利西亚语", + "gmh": "中å¤é«˜åœ°å¾·æ–‡", + "gn": "瓜拉尼文", + "goh": "å¤é«˜åœ°å¾·æ–‡", + "gon": "冈德文", + "gor": "哥伦打洛文", + "got": "哥特文", + "grb": "æ ¼åˆ—åšæ–‡", + "grc": "å¤å¸Œè…Šè¯­", + "gsw": "德语(瑞士)", + "gu": "å¤å‰æ‹‰ç‰¹è¯­", + "guz": "å¤è¥¿æ–‡", + "gv": "马æ©å²›æ–‡", + "gwi": "å‰ç»´å…‹ç´æ–‡", + "ha": "è±ªè¨æ–‡", + "hai": "海达文", + "hak": "客家语", + "haw": "å¤å¨å¤·æ–‡", + "he": "希伯æ¥è¯­", + "hi": "å°åœ°è¯­", + "hil": "希利盖农文", + "hit": "赫梯文", + "hmn": "è‹—æ—æ–‡", + "ho": "希里莫图文", + "hr": "克罗地亚语", + "hsb": "上索布文", + "hsn": "湘语", + "ht": "海地克里奥尔文", + "hu": "匈牙利语", + "hup": "胡帕文", + "hy": "亚美尼亚语", + "hz": "赫雷罗文", + "ia": "国际语", + "iba": "ä¼Šç­æ–‡", + "ibb": "伊比比奥文", + "id": "å°åº¦å°¼è¥¿äºšè¯­", + "ie": "国际文字(E)", + "ig": "伊布文", + "ii": "å››å·å½æ–‡", + "ik": "伊努皮克文", + "ilo": "伊洛干诺文", + "inh": "å°å¤ä»€æ–‡", + "io": "伊多文", + "is": "冰岛语", + "it": "æ„大利语", + "iu": "因纽特语", + "ja": "日语", + "jbo": "逻辑文", + "jgo": "æ©è‰®å·´", + "jmc": "马切姆文", + "jpr": "犹太波斯语", + "jrb": "犹太阿拉伯语", + "jv": "爪哇语", + "ka": "æ ¼é²å‰äºšè¯­", + "kaa": "塿‹‰å¡å°”帕克文", + "kab": "塿¯”尔文", + "kac": "克钦文", + "kaj": "塿·æ–‡", + "kam": "å¡å§†å·´æ–‡", + "kaw": "å¡å¨æ–‡", + "kbd": "å¡å·´å°”å¾·æ–‡", + "kbl": "加涅姆布文", + "kcg": "å¡å¡”布文", + "kde": "马孔德文", + "kea": "å¡å¸ƒä½›å¾—鲿–‡", + "kfo": "ç§‘ç½—æ–‡", + "kg": "刚果语", + "kha": "å¡è¥¿æ–‡", + "kho": "和田文", + "khq": "西桑海文", + "ki": "å‰åº“尤文", + "kj": "宽亚玛文", + "kk": "哈è¨å…‹è¯­", + "kkj": "å¡åº“æ–‡", + "kl": "格陵兰文", + "kln": "å¡ä¼¦é‡‘æ–‡", + "km": "高棉文", + "kmb": "é‡‘é‚¦æœæ–‡", + "kn": "å¡çº³è¾¾æ–‡", + "ko": "韩文", + "koi": "ç§‘ç±³-彼尔米亚克文", + "kok": "刚å¡å°¼æ–‡", + "kos": "科斯拉伊文", + "kpe": "克佩列文", + "kr": "å¡åŠªé‡Œæ–‡", + "krc": "塿‹‰æ°ä¼Šå·´å°”å¡å°”æ–‡", + "krl": "å¡ç´¯åˆ©é˜¿æ–‡", + "kru": "库é²å…‹æ–‡", + "ks": "克什米尔文", + "ksb": "香巴拉文", + "ksf": "å·´è²äºšæ–‡", + "ksh": "科隆文", + "ku": "库尔德文", + "kum": "库米克文", + "kut": "库特奈文", + "kv": "科米文", + "kw": "凯尔特文", + "ky": "å‰å°”剿–¯æ–‡", + "la": "拉ä¸è¯­", + "lad": "拉地诺文", + "lag": "æœ—å‰æ–‡", + "lah": "å°åº¦-雅利安文", + "lam": "å…°å·´æ–‡", + "lb": "墿£®å ¡è¯­", + "lez": "列兹金文", + "lg": "å¢å¹²è¾¾æ–‡", + "li": "æž—å ¡æ–‡", + "lkt": "拉科塔文", + "ln": "林加拉文", + "lo": "è€æŒè¯­", + "lol": "蒙戈文", + "loz": "æ´›é½æ–‡", + "lrc": "北å¢å°”æ–‡", + "lt": "立陶宛语", + "lu": "é²å·´åŠ ä¸¹åŠ æ–‡", + "lua": "å¢å·´-墿‹‰æ–‡", + "lui": "å¢ä¼Šå¡žè¯ºæ–‡", + "lun": "隆达文", + "luo": "å¢å¥¥æ–‡", + "lus": "ç±³ä½æ–‡", + "luy": "å¢é›…æ–‡", + "lv": "拉脱维亚语", + "mad": "马都拉文", + "maf": "马法文", + "mag": "马加伊文", + "mai": "迈蒂利文", + "mak": "望加锡文", + "man": "曼ä¸å“¥æ–‡", + "mas": "è¨ä¼Šæ–‡", + "mde": "马忖‡", + "mdf": "莫克沙文", + "mdr": "曼达尔文", + "men": "门德文", + "mer": "æ¢…é²æ–‡", + "mfe": "毛里求斯克里奥尔文", + "mg": "马尔加什文", + "mga": "中å¤çˆ±å°”å…°æ–‡", + "mgh": "马库阿文", + "mgo": "梅塔文", + "mh": "马ç»å°”æ–‡", + "mi": "毛利文", + "mic": "密克马克文", + "min": "ç±³å—å¡ä¿æ–‡", + "mk": "马其顿文", + "ml": "马拉雅拉姆语", + "mn": "è’™å¤æ–‡", + "mnc": "满文", + "mni": "曼尼普尔文", + "moh": "æ‘©éœå…‹æ–‡", + "mos": "莫西文", + "mr": "马拉地文", + "ms": "马æ¥è¯­", + "mt": "马耳他文", + "mua": "蒙当文", + "mul": "多ç§è¯­ç³»", + "mus": "克里克文", + "mwl": "米兰德斯文", + "mwr": "马尔瓦里文", + "my": "缅甸语", + "mye": "姆耶内文", + "myv": "厄尔兹亚文", + "mzn": "马赞德兰文", + "na": "ç‘™é²æ–‡", + "nan": "é—½å—语", + "nap": "é‚£ä¸å‹’斯文", + "naq": "纳马文", + "nb": "挪å¨åšå…‹é©¬å°”语", + "nd": "北æ©å¾·è´å‹’æ–‡", + "nds": "低地德文", + "nds_NL": "低è¨å…‹æ£®æ–‡", + "ne": "尼泊尔语", + "new": "内瓦里文", + "ng": "æ©ä¸œåŠ æ–‡", + "nia": "尼亚斯文", + "niu": "纽埃文", + "nl": "è·å…°è¯­", + "nl_BE": "佛兰德文", + "nmg": "夸西奥文", + "nn": "挪å¨å°¼è¯ºæ–¯å…‹æ–‡", + "nnh": "æ©ç”˜æ¾Žæ–‡", + "no": "挪å¨è¯­", + "nog": "诺盖文", + "non": "å¤è¯ºå°”斯文", + "nqo": "西éžä¹¦é¢æ–‡å­—", + "nr": "å—æ©å¾·è´å‹’æ–‡", + "nso": "北索托文", + "nus": "努埃尔文", + "nv": "çº³ç“¦éœæ–‡", + "nwc": "å¤å…¸å°¼ç“¦å°”æ–‡", + "ny": "尼昂加文", + "nym": "å°¼æ‰¬éŸ¦é½æ–‡", + "nyn": "尼昂科勒文", + "nyo": "尼奥罗文", + "nzi": "æ©æµŽé©¬æ–‡", + "oc": "å¥¥å…‹è¥¿å”æ–‡", + "oj": "奥å‰å¸ƒç“¦æ–‡", + "om": "奥洛莫文", + "or": "奥里亚文", + "os": "奥塞梯文", + "osa": "奥塞治文", + "ota": "奥斯曼土耳其文", + "pa": "æ—鮿™®æ–‡", + "pag": "é‚¦é˜¿è¥¿å—æ–‡", + "pal": "巴拉维文", + "pam": "邦æ¿ç‰™æ–‡", + "pap": "帕皮阿门托文", + "pau": "帕劳文", + "pcm": "尼日利亚皮钦文", + "peo": "夿³¢æ–¯æ–‡", + "phn": "腓尼基文", + "pi": "巴利文", + "pl": "波兰文", + "pon": "波纳佩文", + "prg": "æ™®é²å£«æ–‡", + "pro": "夿™®ç½—文斯文", + "ps": "普什图文", + "pt": "è‘¡è„牙文", + "pt_BR": "巴西葡è„牙文", + "pt_PT": "欧洲葡è„牙文", + "qu": "盖丘亚文", + "quc": "基切文", + "raj": "æ‹‰è´¾æ–¯å¦æ–‡", + "rap": "拉帕努伊文", + "rar": "拉罗汤加文", + "rm": "罗曼什文", + "rn": "隆迪文", + "ro": "罗马尼亚文", + "ro_MD": "摩尔多瓦文", + "rof": "å…°åšæ–‡", + "rom": "剿™®èµ›æ–‡", + "root": "根语言", + "ru": "ä¿„æ–‡", + "rup": "阿罗蒙文", + "rw": "墿—ºè¾¾è¯­", + "rwk": "罗瓦文", + "sa": "梵文", + "sad": "桑达韦文", + "sah": "è¨å“ˆæ–‡", + "sam": "è¨é©¬åˆ©äºšé˜¿æ‹‰å§†æ–‡", + "saq": "æ¡‘å¸ƒé²æ–‡", + "sas": "è¨è¨å…‹æ–‡", + "sat": "桑塔利文", + "sba": "甘拜文", + "sbp": "æ¡‘å¤æ–‡", + "sc": "è¨ä¸æ–‡", + "scn": "西西里文", + "sco": "è‹æ ¼å…°æ–‡", + "sd": "ä¿¡å¾·æ–‡", + "sdh": "å—库尔德文", + "se": "北è¨ç±³æ–‡", + "see": "å¡žå†…å¡æ–‡", + "seh": "塞纳文", + "sel": "塞尔库普文", + "ses": "东桑海文", + "sg": "桑戈文", + "sga": "å¤çˆ±å°”å…°æ–‡", + "sh": "塞尔维亚-克罗地亚文", + "shi": "希尔哈文", + "shn": "掸文", + "shu": "ä¹å¾—阿拉伯文", + "si": "僧伽罗文", + "sid": "悉达摩文", + "sk": "斯洛ä¼å…‹æ–‡", + "sl": "斯洛文尼亚文", + "sm": "è¨æ‘©äºšæ–‡", + "sma": "å—è¨ç±³æ–‡", + "smj": "律勒è¨ç±³æ–‡", + "smn": "伊纳里è¨ç±³æ–‡", + "sms": "斯科特è¨ç±³æ–‡", + "sn": "ç»çº³æ–‡", + "snk": "ç´¢å®å…‹æ–‡", + "so": "索马里文", + "sog": "粟特文", + "sq": "阿尔巴尼亚文", + "sr": "塞尔维亚文", + "srn": "è‹é‡Œå—汤加文", + "srr": "塞雷尔文", + "ss": "斯瓦蒂文", + "ssy": "è¨éœæ–‡", + "st": "å—索托文", + "su": "巽他文", + "suk": "è‹åº“马文", + "sus": "è‹è‹æ–‡", + "sux": "è‹ç¾Žå°”æ–‡", + "sv": "瑞典语", + "sw": "斯瓦希里文", + "sw_CD": "刚果斯瓦希里文", + "swb": "ç§‘æ‘©ç½—æ–‡", + "syc": "å¤å…¸å™åˆ©äºšæ–‡", + "syr": "å¤å™åˆ©äºšæ–‡", + "ta": "泰米尔语", + "te": "æ³°å¢å›ºè¯­", + "tem": "泰姆奈文", + "teo": "特索文", + "ter": "特伦诺文", + "tet": "å¾·é¡¿æ–‡", + "tg": "å¡”å‰å…‹è¯­", + "th": "泰语", + "ti": "ææ ¼åˆ©å°¼äºšæ–‡", + "tig": "ææ ¼é›·æ–‡", + "tiv": "蒂夫文", + "tk": "土库曼文", + "tkl": "托克劳文", + "tl": "他加禄文", + "tlh": "å…‹æž—è´¡æ–‡", + "tli": "特林å‰ç‰¹æ–‡", + "tmh": "塔马奇克文", + "tn": "茨瓦纳文", + "to": "汤加文", + "tog": "å°¼äºšè¨æ±¤åŠ æ–‡", + "tpi": "托克皮辛文", + "tr": "土耳其文", + "trv": "太é²é˜æ–‡", + "ts": "èªåŠ æ–‡", + "tsi": "钦西安文", + "tt": "éž‘é¼æ–‡", + "tum": "é€šå¸ƒå¡æ–‡", + "tvl": "å›¾ç“¦å¢æ–‡", + "tw": "契维文", + "twq": "北桑海文", + "ty": "å¡”è¥¿ææ–‡", + "tyv": "图瓦文", + "tzm": "塔马齿 ¼ç‰¹æ–‡", + "udm": "乌德穆尔特文", + "ug": "ç»´å¾å°”语", + "uga": "乌加里特文", + "uk": "乌克兰语", + "umb": "ç¿æœ¬æœæ–‡", + "und": "未知语言", + "ur": "乌尔都语", + "uz": "乌兹别克语", + "vai": "瓦伊文", + "ve": "文达文", + "vep": "维普森文", + "vi": "è¶Šå—语", + "vo": "沃拉普克文", + "vot": "沃æå…‹æ–‡", + "vun": "温旧文", + "wa": "瓦隆文", + "wae": "瓦尔瑟文", + "wal": "瓦拉莫文", + "war": "瓦瑞文", + "was": "ç“¦ç»æ–‡", + "wbp": "瓦尔皮瑞文", + "wo": "沃洛夫文", + "wuu": "å´è¯­", + "xal": "å¡å°”梅克文", + "xh": "ç§‘è¨æ–‡", + "xog": "索加文", + "yao": "ç‘¶æ—语", + "yap": "雅浦文", + "yav": "æ´‹åžæ–‡", + "ybb": "耶姆巴文", + "yi": "æ„第绪文", + "yo": "约é²å·´æ–‡", + "yue": "粤语", + "za": "壮语", + "zap": "è¨æ³¢è’‚å…‹æ–‡", + "zbl": "布里斯符å·", + "zen": "泽纳加文", + "zgh": "标准摩洛哥塔马塞特文", + "zh": "中文", + "zh_Hans": "简体中文", + "zh_Hant": "ç¹ä½“中文", + "zu": "祖é²è¯­", + "zun": "祖尼文", + "zxx": "无语言内容", + "zza": "扎扎文" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zh_HK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zh_HK.json new file mode 100644 index 0000000000000000000000000000000000000000..d8074a1c5f82fe848c0b81ce95ce57e2a11a21c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zh_HK.json @@ -0,0 +1,66 @@ +{ + "Version": "2.1.27.99", + "Names": { + "aa": "阿法爾文", + "az": "阿塞拜疆文", + "az_Arab": "å—阿塞拜疆文", + "ba": "巴什基爾文", + "br": "布里多尼文", + "bs": "波斯尼亞文", + "ca": "加泰隆尼亞文", + "crh": "å…‹é‡Œç±³äºžéŸƒé¼æ–‡", + "crs": "塞舌爾克里奧爾法文", + "de_AT": "奧地利德文", + "de_CH": "瑞士德語", + "den": "斯拉夫文", + "en_AU": "澳洲英文", + "en_CA": "加拿大英文", + "en_GB": "英國英文", + "en_US": "美國英文", + "eo": "世界語", + "es_419": "拉ä¸ç¾Žæ´²è¥¿ç­ç‰™æ–‡", + "es_ES": "æ­æ´²è¥¿ç­ç‰™æ–‡", + "es_MX": "墨西哥西ç­ç‰™æ–‡", + "fr_CA": "加拿大法文", + "fr_CH": "瑞士法文", + "gil": "å‰çˆ¾ä¼¯ç‰¹æ–‡", + "gl": "加里西亞文", + "gsw": "瑞士德文", + "hi": "å°åº¦æ–‡", + "hmn": "苗語", + "hr": "克羅地亞文", + "it": "æ„大利文", + "jpr": "猶太波斯文", + "ka": "格魯å‰äºžæ–‡", + "kiu": "扎扎其文", + "kn": "åŽç´é”æ–‡", + "kri": "克裡奧爾文", + "lo": "è€æ’¾æ–‡", + "luo": "ç›§æ­æ–‡", + "mfe": "毛里裘斯克里奧爾文", + "mg": "馬拉加斯文", + "ml": "馬拉雅拉姆文", + "mt": "馬耳他文", + "nds_NL": "è·è˜­ä½Žåœ°å¾·æ–‡", + "nl_BE": "比利時è·è˜­æ–‡", + "nqo": "è¥¿éžæ›¸é¢èªžè¨€ï¼ˆN’ko)", + "or": "奧里雅文", + "pcm": "尼日利亞皮欽文", + "pt_BR": "巴西葡è„牙語", + "pt_PT": "æ­æ´²è‘¡è„牙文", + "ro_MD": "摩爾多瓦羅馬尼亞文", + "rup": "阿羅馬尼亞語", + "rw": "ç›§æ—ºé”æ–‡", + "sd": "信德語", + "sl": "斯洛文尼亞文", + "sn": "ä¿®ç´æ–‡", + "so": "索馬里文", + "sw_CD": "剛果å²ç“¦å¸Œé‡Œæ–‡", + "ta": "泰米爾文", + "to": "湯加文", + "ur": "çƒçˆ¾éƒ½æ–‡", + "wbp": "瓦爾皮里文", + "yue": "廣æ±è©±", + "zgh": "摩洛哥標準塔馬齊格特文" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zh_Hant.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zh_Hant.json new file mode 100644 index 0000000000000000000000000000000000000000..de0da4fe85a8e1e6aee61bf65eaef119e6de7be0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zh_Hant.json @@ -0,0 +1,607 @@ +{ + "Version": "2.1.28.79", + "Names": { + "aa": "阿法文", + "ab": "阿布哈茲文", + "ace": "亞齊文", + "ach": "阿僑利文", + "ada": "阿當莫文", + "ady": "é˜¿è¿ªå„æ–‡", + "ae": "阿維斯塔文", + "aeb": "çªå°¼æ–¯é˜¿æ‹‰ä¼¯æ–‡", + "af": "å—éžè·è˜­æ–‡", + "afh": "阿弗里希利文", + "agq": "亞罕文", + "ain": "阿伊努文", + "ak": "é˜¿åŽæ–‡", + "akk": "阿å¡å¾·æ–‡", + "akz": "阿拉巴馬文", + "ale": "阿留申文", + "aln": "蓋格阿爾巴尼亞文", + "alt": "å—阿爾泰文", + "am": "阿姆哈拉文", + "an": "阿拉貢文", + "ang": "å¤è‹±æ–‡", + "anp": "昂加文", + "ar": "阿拉伯文", + "ar_001": "ç¾ä»£æ¨™æº–阿拉伯文", + "arc": "阿拉米文", + "arn": "馬普切文", + "aro": "é˜¿æ‹‰å¥§ç´æ–‡", + "arp": "é˜¿æ‹‰å¸•éœæ–‡", + "arq": "阿爾åŠåˆ©äºžé˜¿æ‹‰ä¼¯æ–‡", + "arw": "阿拉瓦克文", + "ary": "摩洛哥阿拉伯文", + "arz": "埃åŠé˜¿æ‹‰ä¼¯æ–‡", + "as": "阿薩姆文", + "asa": "阿蘇文", + "ase": "美國手語", + "ast": "阿斯圖里亞文", + "av": "阿瓦爾文", + "avk": "科塔瓦文", + "awa": "阿瓦文", + "ay": "艾馬拉文", + "az": "亞塞拜然文", + "ba": "巴什喀爾文", + "bal": "俾路支文", + "ban": "峇里文", + "bar": "å·´ä¼åˆ©äºžæ–‡", + "bas": "å·´è–©æ–‡", + "bax": "巴姆穆文", + "bbc": "巴塔克托巴文", + "bbj": "戈馬拉文", + "be": "白俄羅斯文", + "bej": "è²æ‰Žæ–‡", + "bem": "別姆巴文", + "bew": "è²å¡”ç¶­æ–‡", + "bez": "è²ç´æ–‡", + "bfd": "富特文", + "bfq": "å·´é”加文", + "bg": "ä¿åŠ åˆ©äºžæ–‡", + "bgn": "西俾路支文", + "bho": "åšå‚‘普爾文", + "bi": "比斯拉馬文", + "bik": "比科爾文", + "bin": "比尼文", + "bjn": "ç­äºžçˆ¾æ–‡", + "bkm": "康姆文", + "bla": "éŒ«å…‹éŒ«å¡æ–‡", + "bm": "ç­å·´æ‹‰æ–‡", + "bn": "孟加拉文", + "bo": "è—æ–‡", + "bpy": "比什奴普èŠåˆ©äºžæ–‡", + "bqi": "巴赫蒂亞里文", + "br": "布列塔尼文", + "bra": "å¸ƒæ‹‰æ°æ–‡", + "brh": "布拉維文", + "brx": "åšå¤šæ–‡", + "bs": "波士尼亞文", + "bss": "阿庫色文", + "bua": "布里阿特文", + "bug": "å¸ƒå‰æ–¯æ–‡", + "bum": "布魯文", + "byn": "比林文", + "byv": "梅敦巴文", + "ca": "加泰蘭文", + "cad": "å¡å¤šæ–‡", + "car": "加勒比文", + "cay": "å¡å°¤åŠ æ–‡", + "cch": "阿燦文", + "ce": "車臣文", + "ceb": "宿霧文", + "cgg": "奇加文", + "ch": "查莫洛文", + "chb": "奇布查文", + "chg": "查加文", + "chk": "處奇斯文", + "chm": "馬里文", + "chn": "契奴克文", + "cho": "喬克托文", + "chp": "å¥‡ä½©ç“¦æšæ–‡", + "chr": "柴羅基文", + "chy": "沙伊安文", + "ckb": "中庫德文", + "co": "科西嘉文", + "cop": "科普特文", + "cps": "å¡çš®èŒ²æ–‡", + "cr": "克里文", + "crh": "土耳其文(克里米亞åŠå³¶ï¼‰", + "crs": "塞席爾克里奧爾法文", + "cs": "æ·å…‹æ–‡", + "csb": "å¡èˆ’布文", + "cu": "宗教斯拉夫文", + "cv": "楚瓦什文", + "cy": "å¨çˆ¾æ–¯æ–‡", + "da": "丹麥文", + "dak": "é”ç§‘ä»–æ–‡", + "dar": "é”爾格瓦文", + "dav": "å°å¡”æ–‡", + "de": "å¾·æ–‡", + "de_CH": "高地德文(瑞士)", + "del": "德拉瓦文", + "den": "斯拉夫", + "dgr": "多格里布文", + "din": "ä¸å¡æ–‡", + "dje": "扎爾馬文", + "doi": "多格來文", + "dsb": "下索布文", + "dtp": "中部æœé †æ–‡", + "dua": "æœäºžæ‹‰æ–‡", + "dum": "中å¤è·è˜­æ–‡", + "dv": "迪維西文", + "dyo": "朱拉文", + "dyu": "迪尤拉文", + "dz": "宗塿–‡", + "dzg": "é”è–©æ–‡", + "ebu": "æ©å¸ƒæ–‡", + "ee": "埃維文", + "efi": "埃è²å…‹æ–‡", + "egl": "埃米利安文", + "egy": "å¤åŸƒåŠæ–‡", + "eka": "è‰¾å¡æœ±å…‹æ–‡", + "el": "希臘文", + "elx": "埃蘭文", + "en": "英文", + "enm": "中å¤è‹±æ–‡", + "eo": "世界文", + "es": "西ç­ç‰™æ–‡", + "esu": "中尤皮克文", + "et": "愛沙尼亞文", + "eu": "巴斯克文", + "ewo": "便±ªéƒ½æ–‡", + "ext": "åŸƒæ–¯ç‰¹é›·é¦¬æœæ‹‰æ–‡", + "fa": "波斯文", + "fan": "èŠ³æ—æ–‡", + "fat": "芳蒂文", + "ff": "富拉文", + "fi": "芬蘭文", + "fil": "è²å¾‹è³“æ–‡", + "fit": "托爾訥芬蘭文", + "fj": "æ–æ¿Ÿæ–‡", + "fo": "法羅文", + "fon": "è±æ–‡", + "fr": "法文", + "frc": "å¡çœŸæ³•æ–‡", + "frm": "䏭夿³•æ–‡", + "fro": "夿³•æ–‡", + "frp": "法蘭克-普羅旺斯文", + "frr": "北弗里西亞文", + "frs": "æ±å¼—里西亞文", + "fur": "弗留利文", + "fy": "西弗里西亞文", + "ga": "愛爾蘭文", + "gaa": "åŠ æ—æ–‡", + "gag": "加告茲文", + "gan": "贛語", + "gay": "加約文", + "gba": "葛巴亞文", + "gbz": "索羅亞斯德教é”里文", + "gd": "蘇格蘭蓋爾文", + "gez": "å‰èŒ²æ–‡", + "gil": "å‰çˆ¾ä¼¯ç‰¹ç¾¤å³¶æ–‡", + "gl": "加利西亞文", + "glk": "剿‹‰åŸºæ–‡", + "gmh": "中å¤é«˜åœ°å¾·æ–‡", + "gn": "瓜拉尼文", + "goh": "å¤é«˜åœ°å¾·æ–‡", + "gom": "å­”å¡å°¼æ–‡", + "gon": "岡德文", + "gor": "科隆é”ç¾…æ–‡", + "got": "哥德文", + "grb": "æ ¼åˆ—åšæ–‡", + "grc": "å¤å¸Œè‡˜æ–‡", + "gsw": "德文(瑞士)", + "gu": "å¤å‰æ‹‰ç‰¹æ–‡", + "guc": "瓦尤文", + "gur": "弗拉弗拉文", + "guz": "å¤è¥¿æ–‡", + "gv": "曼島文", + "gwi": "圭契文", + "ha": "豪撒文", + "hai": "æµ·é”æ–‡", + "hak": "客家話", + "haw": "å¤å¨å¤·æ–‡", + "he": "希伯來文", + "hi": "å°åœ°æ–‡", + "hif": "æ–æ¿Ÿå°åœ°æ–‡", + "hil": "希利蓋農文", + "hit": "赫梯文", + "hmn": "å­Ÿæ–‡", + "ho": "西里莫圖土文", + "hr": "克羅埃西亞文", + "hsb": "上索布文", + "hsn": "湘語", + "ht": "海地文", + "hu": "匈牙利文", + "hup": "胡帕文", + "hy": "亞美尼亞文", + "hz": "赫雷羅文", + "ia": "國際文", + "iba": "ä¼Šç­æ–‡", + "ibb": "伊比比奧文", + "id": "å°å°¼æ–‡", + "ie": "國際文(E)", + "ig": "伊布文", + "ii": "å››å·å½æ–‡", + "ik": "ä¾å¥´çš®ç¶­å…‹æ–‡", + "ilo": "伊洛闊文", + "inh": "å°å¤ä»€æ–‡", + "io": "伊多文", + "is": "冰島文", + "it": "義大利文", + "iu": "å› ç´ç‰¹æ–‡", + "izh": "英格里亞文", + "ja": "日文", + "jam": "牙買加克里奧爾英文", + "jbo": "é‚輯文", + "jgo": "æ©æ ¼å§†å·´æ–‡", + "jmc": "馬æ°ç¾Žæ–‡", + "jpr": "猶太教-波斯文", + "jrb": "猶太阿拉伯文", + "jut": "日德蘭文", + "jv": "爪哇文", + "ka": "喬治亞文", + "kaa": "塿‹‰å¡çˆ¾å¸•å…‹æ–‡", + "kab": "塿¯”爾文", + "kac": "å¡ç´æ–‡", + "kaj": "塿·æ–‡", + "kam": "å¡å§†å·´æ–‡", + "kaw": "å¡å¨æ–‡", + "kbd": "å¡å·´çˆ¾é”æ–‡", + "kbl": "å¡å¿µå¸ƒæ–‡", + "kcg": "å¡å¡”布文", + "kde": "馬孔德文", + "kea": "å¡å¸ƒå¨çˆ¾ç¬¬æ–‡", + "ken": "è‚¯æšæ–‡", + "kfo": "ç§‘ç¾…æ–‡", + "kg": "剛果文", + "kgp": "åŽå‰›æ–‡", + "kha": "å¡è¥¿æ–‡", + "kho": "å’Œé—æ–‡", + "khq": "西桑海文", + "khw": "科瓦文", + "ki": "å‰åº«å°¤æ–‡", + "kiu": "北紮紮其文", + "kj": "廣亞馬文", + "kk": "哈薩克文", + "kkj": "å¡åº«æ–‡", + "kl": "格陵蘭文", + "kln": "å¡å€«é‡‘æ–‡", + "km": "高棉文", + "kmb": "é‡‘é‚¦æœæ–‡", + "kn": "åŽé‚£é”æ–‡", + "ko": "韓文", + "koi": "ç§‘ç±³-彼爾米亞克文", + "kok": "貢根文", + "kos": "ç§‘æ–¯é›·æ©æ–‡", + "kpe": "克佩列文", + "kr": "å¡åŠªé‡Œæ–‡", + "krc": "塿‹‰æŸ´-包爾å¡çˆ¾æ–‡", + "kri": "塞拉利昂克è£å¥§çˆ¾æ–‡", + "krj": "基那來阿文", + "krl": "å¡ç´¯åˆ©é˜¿æ–‡", + "kru": "庫魯科文", + "ks": "喀什米爾文", + "ksb": "尚巴拉文", + "ksf": "å·´è²äºžæ–‡", + "ksh": "科隆文", + "ku": "庫德文", + "kum": "庫密克文", + "kut": "庫特奈文", + "kv": "科米文", + "kw": "康瓦耳文", + "ky": "å‰çˆ¾å‰æ–¯æ–‡", + "la": "æ‹‰ä¸æ–‡", + "lad": "拉迪諾文", + "lag": "æœ—å‰æ–‡", + "lah": "æ‹‰äº¨é”æ–‡", + "lam": "蘭巴文", + "lb": "盧森堡文", + "lez": "列茲干文", + "lfn": "æ–°å…±åŒèªžè¨€", + "lg": "干锿–‡", + "li": "æž—å ¡æ–‡", + "lij": "利å¤é‡Œäºžæ–‡", + "liv": "利ä¼å°¼äºžæ–‡", + "lkt": "拉科塔文", + "lmo": "倫巴底文", + "ln": "林加拉文", + "lo": "寮文", + "lol": "芒戈文", + "loz": "洛齊文", + "lrc": "北盧爾文", + "lt": "立陶宛文", + "ltg": "æ‹‰ç‰¹åŠ èŠæ–‡", + "lu": "魯巴加丹加文", + "lua": "魯巴魯魯亞文", + "lui": "路易塞諾文", + "lun": "ç›§æ©é”æ–‡", + "luo": "盧奧文", + "lus": "ç±³ä½æ–‡", + "luy": "ç›§é›…æ–‡", + "lv": "拉脫維亞文", + "lzh": "文言文", + "lzz": "拉茲文", + "mad": "馬都拉文", + "maf": "馬法文", + "mag": "馬加伊文", + "mai": "é‚蒂利文", + "mak": "望加錫文", + "man": "曼ä¸å“¥æ–‡", + "mas": "馬賽文", + "mde": "馬巴文", + "mdf": "莫克沙文", + "mdr": "æ›¼é”æ–‡", + "men": "門德文", + "mer": "梅魯文", + "mfe": "克里奧文(模里西斯)", + "mg": "馬拉加什文", + "mga": "䏭夿„›çˆ¾è˜­æ–‡", + "mgh": "馬夸文", + "mgo": "美塔文", + "mh": "馬紹爾文", + "mi": "毛利文", + "mic": "米克馬克文", + "min": "ç±³å—å¡å ¡æ–‡", + "mk": "馬其頓文", + "ml": "馬來亞拉姆文", + "mn": "è’™å¤æ–‡", + "mnc": "æ»¿æ—æ–‡", + "mni": "曼尼普爾文", + "moh": "莫éœå…‹æ–‡", + "mos": "莫西文", + "mr": "馬拉地文", + "mrj": "西馬里文", + "ms": "馬來文", + "mt": "馬爾他文", + "mua": "蒙當文", + "mul": "多種語言", + "mus": "克里克文", + "mwl": "米蘭德斯文", + "mwr": "馬瓦里文", + "mwv": "æ˜Žæ‰“å¨æ–‡", + "my": "緬甸文", + "mye": "姆耶內文", + "myv": "厄爾茲亞文", + "mzn": "馬贊德蘭文", + "na": "諾魯文", + "nan": "é–©å—語", + "nap": "拿波里文", + "naq": "ç´é¦¬æ–‡", + "nb": "å·´å…‹æ‘©æŒªå¨æ–‡", + "nd": "北地畢列文", + "nds": "低地德文", + "nds_NL": "ä½Žåœ°è–©å…‹éœæ–‡", + "ne": "尼泊爾文", + "new": "尼瓦爾文", + "ng": "æ©æ±åŠ æ–‡", + "nia": "尼亞斯文", + "niu": "ç´åŸƒæ–‡", + "njo": "阿沃那加文", + "nl": "è·è˜­æ–‡", + "nl_BE": "佛蘭芒文", + "nmg": "夸西奧文", + "nn": "è€è«¾æ–¯å…‹æŒªå¨æ–‡", + "nnh": "æ©ç”˜æ¾Žæ–‡", + "no": "æŒªå¨æ–‡", + "nog": "諾蓋文", + "non": "å¤è«¾çˆ¾æ–¯æ–‡", + "nov": "諾維亞文", + "nqo": "曼德文字 (N’Ko)", + "nr": "å—地畢列文", + "nso": "北索托文", + "nus": "努埃爾文", + "nv": "ç´ç“¦éœæ–‡", + "nwc": "å¤å°¼ç“¦çˆ¾æ–‡", + "ny": "å°¼æšè³ˆæ–‡", + "nym": "å°¼æšéŸ‹é½Šæ–‡", + "nyn": "å°¼æšç§‘èŠæ–‡", + "nyo": "尼奧囉文", + "nzi": "尼茲馬文", + "oc": "å¥§å…‹è¥¿å¦æ–‡", + "oj": "奧æ°å¸ƒç“¦æ–‡", + "om": "奧羅莫文", + "or": "æ­è¿ªäºžæ–‡", + "os": "å¥§å¡žææ–‡", + "osa": "æ­å¡žå¥‡æ–‡", + "ota": "鄂圖曼土耳其文", + "pa": "æ—鮿™®æ–‡", + "pag": "潘加辛文", + "pal": "巴列維文", + "pam": "潘帕嘉文", + "pap": "帕皮阿門托文", + "pau": "å¸›ç‰æ–‡", + "pcd": "庇å¡åº•æ–‡", + "pcm": "奈åŠåˆ©äºžç𮿬½æ–‡", + "pdc": "賓夕法尼亞德文", + "pdt": "門諾低地德文", + "peo": "夿³¢æ–¯æ–‡", + "pfl": "普法爾茨德文", + "phn": "腓尼基文", + "pi": "巴利文", + "pl": "波蘭文", + "pms": "皮埃蒙特文", + "pnt": "æ—狄希臘文", + "pon": "æ³¢é‚£è²æ–‡", + "prg": "普魯士文", + "pro": "夿™®ç¾…旺斯文", + "ps": "普什圖文", + "pt": "è‘¡è„牙文", + "qu": "蓋楚瓦文", + "quc": "基切文", + "qug": "æ¬½åšæ‹‰ç´¢æµ·è˜­è“‹ä¸˜äºžæ–‡", + "raj": "拉賈斯å¦è«¸æ–‡", + "rap": "復活島文", + "rar": "拉羅通加文", + "rgn": "羅馬格諾里文", + "rif": "里è²äºžè«¾æ–‡", + "rm": "羅曼斯文", + "rn": "隆迪文", + "ro": "羅馬尼亞文", + "ro_MD": "摩爾多瓦文", + "rof": "è˜­åšæ–‡", + "rom": "剿™®è³½æ–‡", + "root": "根語言", + "rtm": "羅圖馬島文", + "ru": "ä¿„æ–‡", + "rue": "盧森尼亞文", + "rug": "ç¾…ç¶­é˜¿ç´æ–‡", + "rup": "羅馬尼亞語系", + "rw": "ç›§å®‰é”æ–‡", + "rwk": "羅瓦文", + "sa": "梵文", + "sad": "æ¡‘é”韋文", + "sah": "雅庫特文", + "sam": "薩瑪利亞阿拉姆文", + "saq": "薩布魯文", + "sas": "æ’’æ’’å…‹æ–‡", + "sat": "散塔利文", + "saz": "索拉什特拉文", + "sba": "甘拜文", + "sbp": "æ¡‘å¤æ–‡", + "sc": "æ’’ä¸æ–‡", + "scn": "西西里文", + "sco": "蘇格蘭文", + "sd": "ä¿¡å¾·æ–‡", + "sdc": "è–©ä¸å°¼äºž-薩薩里文", + "sdh": "å—庫德文", + "se": "北薩米文", + "see": "å¡žè¨¥å¡æ–‡", + "seh": "è³½ç´æ–‡", + "sei": "瑟里文", + "sel": "塞爾庫普文", + "ses": "æ±æ¡‘æµ·æ–‡", + "sg": "桑戈文", + "sga": "夿„›çˆ¾è˜­æ–‡", + "sgs": "薩莫å‰å¸Œäºžæ–‡", + "sh": "塞爾維亞克羅埃西亞文", + "shi": "希爾哈文", + "shn": "撣文", + "shu": "阿拉伯文(查德)", + "si": "僧伽羅文", + "sid": "å¸Œé”æ‘©æ–‡", + "sk": "斯洛ä¼å…‹æ–‡", + "sl": "斯洛維尼亞文", + "sli": "下西利西亞文", + "sly": "塞拉亞文", + "sm": "薩摩亞文", + "sma": "å—薩米文", + "smj": "魯勒薩米文", + "smn": "伊ç´é‡Œè–©ç±³æ–‡", + "sms": "斯科特薩米文", + "sn": "ç´¹ç´æ–‡", + "snk": "索尼基文", + "so": "索馬利文", + "sog": "ç´¢æ ¼åº•äºžç´æ–‡", + "sq": "阿爾巴尼亞文", + "sr": "塞爾維亞文", + "srn": "è˜‡æ‹‰å—æ±å¢Žæ–‡", + "srr": "塞雷爾文", + "ss": "斯瓦特文", + "ssy": "è–©éœæ–‡", + "st": "塞索托文", + "stq": "沙特è²å£«è˜­æ–‡", + "su": "巽他文", + "suk": "蘇庫馬文", + "sus": "蘇蘇文", + "sux": "蘇美文", + "sv": "瑞典文", + "sw": "å²ç“¦å¸Œé‡Œæ–‡", + "sw_CD": "å²ç“¦å¸Œé‡Œæ–‡ï¼ˆå‰›æžœï¼‰", + "swb": "葛摩文", + "syc": "夿•˜åˆ©äºžæ–‡", + "syr": "敘利亞文", + "szl": "西利西亞文", + "ta": "å¦ç±³çˆ¾æ–‡", + "tcy": "圖盧文", + "te": "泰盧固文", + "tem": "æå§†æ–‡", + "teo": "特索文", + "ter": "泰雷諾文", + "tet": "æ³°é “æ–‡", + "tg": "å¡”å‰å…‹æ–‡", + "th": "æ³°æ–‡", + "ti": "ææ ¼åˆ©å°¼äºžæ–‡", + "tig": "蒂格雷文", + "tiv": "æå¤«æ–‡", + "tk": "土庫曼文", + "tkl": "托克勞文", + "tkr": "查庫爾文", + "tl": "å¡”åŠ è·¯æ—æ–‡", + "tlh": "克林貢文", + "tli": "特林基特文", + "tly": "塔里什文", + "tmh": "塔馬奇克文", + "tn": "çªå°¼è¥¿äºžæ–‡", + "to": "æ±åŠ æ–‡", + "tog": "æ±åŠ æ–‡ï¼ˆå°¼äºžè–©ï¼‰", + "tpi": "托比辛文", + "tr": "土耳其文", + "tru": "圖羅尤文", + "trv": "太魯閣文", + "ts": "特æ¾åŠ æ–‡", + "tsd": "ç‰¹è–©å…‹å°¼æ©æ–‡", + "tsi": "欽西安文", + "tt": "éŸƒé¼æ–‡", + "ttt": "穆斯林塔特文", + "tum": "åœ–å§†å¸ƒå¡æ–‡", + "tvl": "å瓦魯文", + "tw": "ç‰¹å¨æ–‡", + "twq": "北桑海文", + "ty": "大溪地文", + "tyv": "圖瓦文", + "tzm": "中阿特拉斯塔馬塞特文", + "udm": "çƒå¾·ç©†çˆ¾ç‰¹æ–‡", + "ug": "ç¶­å¾çˆ¾æ–‡", + "uga": "çƒåŠ åˆ—æ–‡", + "uk": "çƒå…‹è˜­æ–‡", + "umb": "å§†æœ¬æœæ–‡", + "und": "未知語言", + "ur": "çƒéƒ½æ–‡", + "uz": "çƒèŒ²åˆ¥å…‹æ–‡", + "vai": "瓦伊文", + "ve": "æº«é”æ–‡", + "vec": "å¨å°¼æ–¯æ–‡", + "vep": "維普森文", + "vi": "è¶Šå—æ–‡", + "vls": "西佛蘭德文", + "vmf": "美茵-法蘭克尼亞文", + "vo": "沃拉普克文", + "vot": "沃æå…‹æ–‡", + "vro": "佛羅文", + "vun": "溫舊文", + "wa": "瓦隆文", + "wae": "瓦爾瑟文", + "wal": "瓦拉莫文", + "war": "瓦瑞文", + "was": "瓦紹文", + "wbp": "沃皮瑞文", + "wo": "沃洛夫文", + "wuu": "å³èªž", + "xal": "å¡çˆ¾æ¢…å…‹æ–‡", + "xh": "ç§‘è–©æ–‡", + "xmf": "明格列爾文", + "xog": "索加文", + "yao": "瑤文", + "yap": "雅浦文", + "yav": "æ´‹åžæ–‡", + "ybb": "耶姆巴文", + "yi": "æ„第緒文", + "yo": "約魯巴文", + "yrl": "奈æ©åŠ åœ–æ–‡", + "yue": "粵語", + "za": "壯文", + "zap": "薩波特克文", + "zbl": "布列斯符號", + "zea": "西蘭文", + "zen": "澤ç´åŠ æ–‡", + "zgh": "標準摩洛哥塔馬塞特文", + "zh": "中文", + "zh_Hans": "簡體中文", + "zh_Hant": "ç¹é«”中文", + "zu": "祖魯文", + "zun": "祖尼文", + "zxx": "無語言內容", + "zza": "扎扎文" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zh_Hant_HK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zh_Hant_HK.json new file mode 100644 index 0000000000000000000000000000000000000000..d8074a1c5f82fe848c0b81ce95ce57e2a11a21c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zh_Hant_HK.json @@ -0,0 +1,66 @@ +{ + "Version": "2.1.27.99", + "Names": { + "aa": "阿法爾文", + "az": "阿塞拜疆文", + "az_Arab": "å—阿塞拜疆文", + "ba": "巴什基爾文", + "br": "布里多尼文", + "bs": "波斯尼亞文", + "ca": "加泰隆尼亞文", + "crh": "å…‹é‡Œç±³äºžéŸƒé¼æ–‡", + "crs": "塞舌爾克里奧爾法文", + "de_AT": "奧地利德文", + "de_CH": "瑞士德語", + "den": "斯拉夫文", + "en_AU": "澳洲英文", + "en_CA": "加拿大英文", + "en_GB": "英國英文", + "en_US": "美國英文", + "eo": "世界語", + "es_419": "拉ä¸ç¾Žæ´²è¥¿ç­ç‰™æ–‡", + "es_ES": "æ­æ´²è¥¿ç­ç‰™æ–‡", + "es_MX": "墨西哥西ç­ç‰™æ–‡", + "fr_CA": "加拿大法文", + "fr_CH": "瑞士法文", + "gil": "å‰çˆ¾ä¼¯ç‰¹æ–‡", + "gl": "加里西亞文", + "gsw": "瑞士德文", + "hi": "å°åº¦æ–‡", + "hmn": "苗語", + "hr": "克羅地亞文", + "it": "æ„大利文", + "jpr": "猶太波斯文", + "ka": "格魯å‰äºžæ–‡", + "kiu": "扎扎其文", + "kn": "åŽç´é”æ–‡", + "kri": "克裡奧爾文", + "lo": "è€æ’¾æ–‡", + "luo": "ç›§æ­æ–‡", + "mfe": "毛里裘斯克里奧爾文", + "mg": "馬拉加斯文", + "ml": "馬拉雅拉姆文", + "mt": "馬耳他文", + "nds_NL": "è·è˜­ä½Žåœ°å¾·æ–‡", + "nl_BE": "比利時è·è˜­æ–‡", + "nqo": "è¥¿éžæ›¸é¢èªžè¨€ï¼ˆN’ko)", + "or": "奧里雅文", + "pcm": "尼日利亞皮欽文", + "pt_BR": "巴西葡è„牙語", + "pt_PT": "æ­æ´²è‘¡è„牙文", + "ro_MD": "摩爾多瓦羅馬尼亞文", + "rup": "阿羅馬尼亞語", + "rw": "ç›§æ—ºé”æ–‡", + "sd": "信德語", + "sl": "斯洛文尼亞文", + "sn": "ä¿®ç´æ–‡", + "so": "索馬里文", + "sw_CD": "剛果å²ç“¦å¸Œé‡Œæ–‡", + "ta": "泰米爾文", + "to": "湯加文", + "ur": "çƒçˆ¾éƒ½æ–‡", + "wbp": "瓦爾皮里文", + "yue": "廣æ±è©±", + "zgh": "摩洛哥標準塔馬齊格特文" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zu.json new file mode 100644 index 0000000000000000000000000000000000000000..3099d5f142d9313f7a579626c35033806066326c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/languages/zu.json @@ -0,0 +1,412 @@ +{ + "Version": "2.1.29.22", + "Names": { + "aa": "isi-Afar", + "ab": "isi-Abkhazian", + "ace": "isi-Achinese", + "ach": "isi-Acoli", + "ada": "isi-Adangme", + "ady": "isi-Adyghe", + "af": "i-Afrikaans", + "agq": "isi-Aghem", + "ain": "isi-Ainu", + "ak": "isi-Akan", + "ale": "isi-Aleut", + "alt": "i-Southern Altai", + "am": "isi-Amharic", + "an": "isi-Aragonese", + "anp": "isi-Angika", + "ar": "isi-Arabic", + "ar_001": "isi-Arabic esivamile sesimanje", + "arn": "isi-Mapuche", + "arp": "isi-Arapaho", + "as": "isi-Assamese", + "asa": "isi-Asu", + "ast": "isi-Asturian", + "av": "isi-Avaric", + "awa": "isi-Awadhi", + "ay": "isi-Aymara", + "az": "isi-Azerbaijani", + "ba": "isi-Bashkir", + "ban": "isi-Balinese", + "bas": "isi-Basaa", + "be": "isi-Belarusian", + "bem": "isi-Bemba", + "bez": "isi-Bena", + "bg": "isi-Bulgari", + "bgn": "isi-Western Balochi", + "bho": "isi-Bhojpuri", + "bi": "i-Bislama", + "bin": "i-Bini", + "bla": "i-Siksika", + "bm": "isi-Bambara", + "bn": "isi-Bengali", + "bo": "isi-Tibetan", + "br": "isi-Breton", + "brx": "isi-Bodo", + "bs": "isi-Bosnian", + "bug": "isi-Buginese", + "byn": "i-Blin", + "ca": "isi-Catalan", + "ce": "isi-Chechen", + "ceb": "isi-Cebuano", + "cgg": "isi-Chiga", + "ch": "isi-Chamorro", + "chk": "isi-Chuukese", + "chm": "isi-Mari", + "cho": "isi-Choctaw", + "chr": "isi-Cherokee", + "chy": "isi-Cheyenne", + "ckb": "isi-Central Kurdish", + "co": "isi-Corsican", + "crs": "i-Seselwa Creole French", + "cs": "isi-Czech", + "cu": "isi-Church Slavic", + "cv": "isi-Chuvash", + "cy": "isi-Welsh", + "da": "isi-Danish", + "dak": "isi-Dakota", + "dar": "isi-Dargwa", + "dav": "isi-Taita", + "de": "isi-German", + "de_AT": "isi-Austrian German", + "de_CH": "i-Swiss High German", + "dgr": "isi-Dogrib", + "dje": "isi-Zarma", + "dsb": "isi-Lower Sorbian", + "dua": "isi-Duala", + "dv": "isi-Divehi", + "dyo": "isi-Jola-Fonyi", + "dz": "isi-Dzongkha", + "dzg": "isi-Dazaga", + "ebu": "isi-Embu", + "ee": "isi-Ewe", + "efi": "isi-Efik", + "eka": "isi-Ekajuk", + "el": "isi-Greek", + "en": "i-English", + "en_AU": "isi-Austrillian English", + "en_CA": "i-Canadian English", + "en_GB": "i-British English", + "en_US": "i-American English", + "eo": "isi-Esperanto", + "es": "isi-Spanish", + "es_419": "isi-Latin American Spanish", + "es_ES": "i-European Spanish", + "es_MX": "i-Mexican Spanish", + "et": "isi-Estonia", + "eu": "isi-Basque", + "ewo": "isi-Ewondo", + "fa": "isi-Persian", + "ff": "isi-Fulah", + "fi": "isi-Finnish", + "fil": "isi-Filipino", + "fj": "isi-Fijian", + "fo": "isi-Faroese", + "fon": "isi-Fon", + "fr": "isi-French", + "fr_CA": "i-Canadian French", + "fr_CH": "i-Swiss French", + "fur": "isi-Friulian", + "fy": "isi-Western Frisian", + "ga": "isi-Irish", + "gaa": "isi-Ga", + "gag": "isi-Gagauz", + "gan": "isi-Gan Chinese", + "gd": "i-Scottish Gaelic", + "gez": "isi-Geez", + "gil": "isi-Gilbertese", + "gl": "isi-Galicia", + "gn": "isi-Guarani", + "gor": "isi-Gorontalo", + "gsw": "isi-Swiss German", + "gu": "isi-Gujarati", + "guz": "isi-Gusli", + "gv": "isi-Manx", + "gwi": "isi-Gwichʼin", + "ha": "isi-Hausa", + "hak": "isi-Hakka Chinese", + "haw": "isi-Hawaiian", + "he": "isi-Hebrew", + "hi": "isi-Hindi", + "hil": "isi-Hiligaynon", + "hmn": "isi-Hmong", + "hr": "isi-Croatian", + "hsb": "isi-Upper Sorbian", + "hsn": "isi-Xiang Chinese", + "ht": "isi-Haitian", + "hu": "isi-Hungarian", + "hup": "isi-Hupa", + "hy": "isi-Armenia", + "hz": "isi-Herero", + "ia": "izilimi ezihlangene", + "iba": "isi-Iban", + "ibb": "isi-Ibibio", + "id": "isi-Indonesian", + "ie": "izimili", + "ig": "isi-Igbo", + "ii": "isi-Sichuan Yi", + "ilo": "isi-Iloko", + "inh": "isi-Ingush", + "io": "isi-Ido", + "is": "isi-Icelandic", + "it": "isi-Italian", + "iu": "isi-Inuktitut", + "ja": "isi-Japanese", + "jbo": "isi-Lojban", + "jgo": "isi-Ngomba", + "jmc": "isi-Machame", + "jv": "isi-Javanese", + "ka": "isi-Georgian", + "kab": "isi-Kabyle", + "kac": "isi-Kachin", + "kaj": "isi-Jju", + "kam": "isi-Kamba", + "kbd": "isi-Kabardian", + "kcg": "isi-Tyap", + "kde": "isi-Makonde", + "kea": "isi-Kabuverdianu", + "kfo": "isi-Koro", + "kg": "isi-Kongo", + "kha": "isi-Khasi", + "khq": "isi-Koyra Chiini", + "ki": "isi-Kikuyu", + "kj": "isi-Kuanyama", + "kk": "isi-Kazakh", + "kkj": "isi-Kako", + "kl": "isi-Kalaallisut", + "kln": "isi-Kalenjin", + "km": "isi-Khmer", + "kmb": "isi-Kimbundu", + "kn": "isi-Kannada", + "ko": "isi-Korean", + "koi": "isi-Komi-Permyak", + "kok": "isi-Konkani", + "kpe": "isi-Kpelle", + "kr": "isi-Kanuri", + "krc": "isi-Karachay-Balkar", + "krl": "isi-Karelian", + "kru": "isi-Kurukh", + "ks": "isi-Kashmiri", + "ksb": "isiShambala", + "ksf": "isi-Bafia", + "ksh": "isi-Colognian", + "ku": "isi-Kurdish", + "kum": "isi-Kumyk", + "kv": "isi-Komi", + "kw": "isi-Cornish", + "ky": "isi-Kyrgyz", + "la": "isi-Latin", + "lad": "isi-Ladino", + "lag": "isi-Langi", + "lb": "isi-Luxembourgish", + "lez": "isi-Lezghian", + "lg": "isi-Ganda", + "li": "isi-Limburgish", + "lkt": "isi-Lakota", + "ln": "isi-Lingala", + "lo": "i-Lao", + "loz": "isi-Lozi", + "lrc": "isi-Northern Luri", + "lt": "isi-Lithuanian", + "lu": "isi-Luba-Katanga", + "lua": "isi-Luba-Lulua", + "lun": "isi-Lunda", + "luo": "isi-Luo", + "lus": "isi-Mizo", + "luy": "isi-Luyia", + "lv": "isi-Latvian", + "mad": "isi-Madurese", + "mag": "isi-Magahi", + "mai": "isi-Maithili", + "mak": "isi-Makasar", + "mas": "isi-Masai", + "mdf": "isi-Moksha", + "men": "isi-Mende", + "mer": "isi-Meru", + "mfe": "isi-Morisyen", + "mg": "isi-Malagasy", + "mgh": "isi-Makhuwa-Meetto", + "mgo": "isi-Meta’", + "mh": "isi-Marshallese", + "mi": "isi-Maori", + "mic": "isi-Micmac", + "min": "isi-Minangkabau", + "mk": "isi-Macedonian", + "ml": "isi-Malayalam", + "mn": "isi-Mongolian", + "mni": "isi-Manipuri", + "moh": "isi-Mohawk", + "mos": "isi-Mossi", + "mr": "isi-Marathi", + "ms": "isi-Malay", + "mt": "isi-Maltese", + "mua": "isi-Mundang", + "mul": "izilimi ezehlukene", + "mus": "isi-Creek", + "mwl": "isi-Mirandese", + "my": "isi-Burmese", + "myv": "isi-Erzya", + "mzn": "isi-Mazanderani", + "na": "isi-Nauru", + "nan": "isi-Min Nan Chinese", + "nap": "isi-Neapolitan", + "naq": "isi-Nama", + "nb": "isi-Norwegian BokmÃ¥l", + "nd": "isi-North Ndebele", + "nds": "isi-Low German", + "nds_NL": "isi-Low Saxon", + "ne": "isi-Nepali", + "new": "isi-Newari", + "ng": "isi-Ndonga", + "nia": "isi-Nias", + "niu": "isi-Niuean", + "nl": "isi-Dutch", + "nl_BE": "isi-Flemish", + "nmg": "isi-Kwasio", + "nn": "i-Norwegian Nynorsk", + "nnh": "isi-Ngiemboon", + "no": "isi-Norwegian", + "nog": "isi-Nogai", + "nqo": "isi-N’Ko", + "nr": "i-South Ndebele", + "nso": "isi-Northern Sotho", + "nus": "isi-Nuer", + "nv": "isi-Navajo", + "ny": "isi-Nyanja", + "nyn": "isi-Nyankole", + "oc": "isi-Occitan", + "om": "i-Oromo", + "or": "isi-Odia", + "os": "isi-Ossetic", + "pa": "isi-Punjabi", + "pag": "isi-Pangasinan", + "pam": "isi-Pampanga", + "pap": "isi-Papiamento", + "pau": "isi-Palauan", + "pcm": "isi-Nigerian Pidgin", + "pl": "isi-Polish", + "prg": "isi-Prussian", + "ps": "isi-Pashto", + "pt": "isi-Portuguese", + "pt_BR": "isi-Brazillian Portuguese", + "pt_PT": "isi-European Portuguese", + "qu": "isi-Quechua", + "quc": "isi-Kʼicheʼ", + "rap": "i-Rapanui", + "rar": "i-Rarotongan", + "rm": "isi-Romansh", + "rn": "isi-Rundi", + "ro": "isi-Romanian", + "ro_MD": "isi-Moldavian", + "rof": "isi-Rombo", + "root": "i-Root", + "ru": "isi-Russian", + "rup": "isi-Aromanian", + "rw": "isi-Kinyarwanda", + "rwk": "isi-Rwa", + "sa": "isi-Sanskrit", + "sad": "i-Sandawe", + "sah": "i-Sakha", + "saq": "isi-Samburu", + "sat": "i-Santali", + "sba": "isi-Ngambay", + "sbp": "isi-Sangu", + "sc": "i-Sardinian", + "scn": "i-Sicilian", + "sco": "i-Scots", + "sd": "isi-Sindhi", + "sdh": "i-Southern Kurdish", + "se": "isi-Northern Sami", + "seh": "isi-Sena", + "ses": "isi-Koyraboro Senni", + "sg": "isi-Sango", + "sh": "isi-Serbo-Croatian", + "shi": "isi-Tachelhit", + "shn": "i-Shan", + "si": "i-Sinhala", + "sk": "isi-Slovak", + "sl": "isi-Slovenian", + "sm": "isi-Samoan", + "sma": "i-Southern Sami", + "smj": "isi-Lule Sami", + "smn": "isi-Inari Sami", + "sms": "isi-Skolt Sami", + "sn": "isiShona", + "snk": "i-Soninke", + "so": "isi-Somali", + "sq": "isi-Albania", + "sr": "isi-Serbian", + "srn": "i-Sranan Tongo", + "ss": "isiSwati", + "ssy": "i-Saho", + "st": "isiSuthu", + "su": "isi-Sundanese", + "suk": "i-Sukuma", + "sv": "isi-Swedish", + "sw": "isiSwahili", + "sw_CD": "isi-Congo Swahili", + "swb": "isi-Comorian", + "syr": "i-Syriac", + "ta": "isi-Tamil", + "te": "isi-Telugu", + "tem": "isi-Timne", + "teo": "isi-Teso", + "tet": "isi-Tetum", + "tg": "isi-Tajik", + "th": "isi-Thai", + "ti": "isi-Tigrinya", + "tig": "isi-Tigre", + "tk": "isi-Turkmen", + "tlh": "isi-Klingon", + "tn": "isi-Tswana", + "to": "isi-Tongan", + "tpi": "isi-Tok Pisin", + "tr": "isi-Turkish", + "trv": "isi-Taroko", + "ts": "isi-Tsonga", + "tt": "isi-Tatar", + "tum": "isi-Tumbuka", + "tvl": "isi-Tuvalu", + "tw": "isi-Twi", + "twq": "isi-Tasawaq", + "ty": "isi-Tahitian", + "tyv": "isi-Tuvinian", + "tzm": "isi-Central Atlas Tamazight", + "udm": "isi-Udmurt", + "ug": "isi-Uighur", + "uk": "isi-Ukrainian", + "umb": "isi-Umbundu", + "und": "ulimi olungaziwa", + "ur": "isi-Urdu", + "uz": "isi-Uzbek", + "vai": "isi-Vai", + "ve": "isi-Venda", + "vi": "isi-Vietnamese", + "vo": "isi-Volapük", + "vun": "isiVunjo", + "wa": "isi-Walloon", + "wae": "isi-Walser", + "wal": "isi-Wolaytta", + "war": "isi-Waray", + "wbp": "isi-Warlpiri", + "wo": "isi-Wolof", + "wuu": "isi-Wu Chinese", + "xal": "isi-Kalmyk", + "xh": "isiXhosa", + "xog": "isi-Soga", + "yav": "isi-Yangben", + "ybb": "isi-Yemba", + "yi": "isi-Yiddish", + "yo": "isi-Yoruba", + "yue": "isi-Cantonese", + "zgh": "isi-Moroccan Tamazight esivamile", + "zh": "isi-Chinese", + "zh_Hans": "isi-Chinese (esenziwe-lula)", + "zh_Hant": "isi-Chinese (Okosiko)", + "zu": "isiZulu", + "zun": "isi-Zuni", + "zxx": "akukho okuqukethwe kolimi", + "zza": "isi-Zaza" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/af.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/af.json new file mode 100644 index 0000000000000000000000000000000000000000..770073ca4b41c008d080d9180adab5240dec86d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/af.json @@ -0,0 +1,566 @@ +{ + "Names": { + "af": "Afrikaans", + "af_NA": "Afrikaans (Namibië)", + "af_ZA": "Afrikaans (Suid-Afrika)", + "ak": "Akan", + "ak_GH": "Akan (Ghana)", + "am": "Amharies", + "am_ET": "Amharies (Ethiopië)", + "ar": "Arabies", + "ar_AE": "Arabies (Verenigde Arabiese Emirate)", + "ar_BH": "Arabies (Bahrein)", + "ar_DJ": "Arabies (Djiboeti)", + "ar_DZ": "Arabies (Algerië)", + "ar_EG": "Arabies (Egipte)", + "ar_EH": "Arabies (Wes-Sahara)", + "ar_ER": "Arabies (Eritrea)", + "ar_IL": "Arabies (Israel)", + "ar_IQ": "Arabies (Irak)", + "ar_JO": "Arabies (Jordanië)", + "ar_KM": "Arabies (Comore)", + "ar_KW": "Arabies (Koeweit)", + "ar_LB": "Arabies (Libanon)", + "ar_LY": "Arabies (Libië)", + "ar_MA": "Arabies (Marokko)", + "ar_MR": "Arabies (Mauritanië)", + "ar_OM": "Arabies (Oman)", + "ar_PS": "Arabies (Palestynse gebiede)", + "ar_QA": "Arabies (Katar)", + "ar_SA": "Arabies (Saoedi-Arabië)", + "ar_SD": "Arabies (Soedan)", + "ar_SO": "Arabies (Somalië)", + "ar_SS": "Arabies (Suid-Soedan)", + "ar_SY": "Arabies (Sirië)", + "ar_TD": "Arabies (Tsjad)", + "ar_TN": "Arabies (Tunisië)", + "ar_YE": "Arabies (Jemen)", + "as": "Assamees", + "as_IN": "Assamees (Indië)", + "az": "Azerbeidjans", + "az_AZ": "Azerbeidjans (Azerbeidjan)", + "az_Cyrl": "Azerbeidjans (Sirillies)", + "az_Cyrl_AZ": "Azerbeidjans (Sirillies, Azerbeidjan)", + "az_Latn": "Azerbeidjans (Latyn)", + "az_Latn_AZ": "Azerbeidjans (Latyn, Azerbeidjan)", + "be": "Belo-Russies", + "be_BY": "Belo-Russies (Belarus)", + "bg": "Bulgaars", + "bg_BG": "Bulgaars (Bulgarye)", + "bm": "Bambara", + "bm_ML": "Bambara (Mali)", + "bn": "Bengaals", + "bn_BD": "Bengaals (Bangladesj)", + "bn_IN": "Bengaals (Indië)", + "bo": "Tibettaans", + "bo_CN": "Tibettaans (Sjina)", + "bo_IN": "Tibettaans (Indië)", + "br": "Bretons", + "br_FR": "Bretons (Frankryk)", + "bs": "Bosnies", + "bs_BA": "Bosnies (Bosnië en Herzegowina)", + "bs_Cyrl": "Bosnies (Sirillies)", + "bs_Cyrl_BA": "Bosnies (Sirillies, Bosnië en Herzegowina)", + "bs_Latn": "Bosnies (Latyn)", + "bs_Latn_BA": "Bosnies (Latyn, Bosnië en Herzegowina)", + "ca": "Katalaans", + "ca_AD": "Katalaans (Andorra)", + "ca_ES": "Katalaans (Spanje)", + "ca_FR": "Katalaans (Frankryk)", + "ca_IT": "Katalaans (Italië)", + "ce": "Tsjetsjen", + "ce_RU": "Tsjetsjen (Rusland)", + "cs": "Tsjeggies", + "cs_CZ": "Tsjeggies (Tjeggiese Republiek)", + "cy": "Wallies", + "cy_GB": "Wallies (Verenigde Koninkryk)", + "da": "Deens", + "da_DK": "Deens (Denemarke)", + "da_GL": "Deens (Groenland)", + "de": "Duits", + "de_AT": "Duits (Oostenryk)", + "de_BE": "Duits (België)", + "de_CH": "Duits (Switserland)", + "de_DE": "Duits (Duitsland)", + "de_IT": "Duits (Italië)", + "de_LI": "Duits (Liechtenstein)", + "de_LU": "Duits (Luxemburg)", + "dz": "Dzongkha", + "dz_BT": "Dzongkha (Bhoetan)", + "ee": "Ewe", + "ee_GH": "Ewe (Ghana)", + "ee_TG": "Ewe (Togo)", + "el": "Grieks", + "el_CY": "Grieks (Siprus)", + "el_GR": "Grieks (Griekeland)", + "en": "Engels", + "en_AG": "Engels (Antigua en Barbuda)", + "en_AI": "Engels (Anguilla)", + "en_AS": "Engels (Amerikaans-Samoa)", + "en_AT": "Engels (Oostenryk)", + "en_AU": "Engels (Australië)", + "en_BB": "Engels (Barbados)", + "en_BE": "Engels (België)", + "en_BI": "Engels (Burundi)", + "en_BM": "Engels (Bermuda)", + "en_BS": "Engels (Bahamas)", + "en_BW": "Engels (Botswana)", + "en_BZ": "Engels (Belize)", + "en_CA": "Engels (Kanada)", + "en_CC": "Engels (Kokos-eilande)", + "en_CH": "Engels (Switserland)", + "en_CK": "Engels (Cookeilande)", + "en_CM": "Engels (Kameroen)", + "en_CX": "Engels (Kerseiland)", + "en_CY": "Engels (Siprus)", + "en_DE": "Engels (Duitsland)", + "en_DG": "Engels (Diego Garcia)", + "en_DK": "Engels (Denemarke)", + "en_DM": "Engels (Dominica)", + "en_ER": "Engels (Eritrea)", + "en_FI": "Engels (Finland)", + "en_FJ": "Engels (Fidji)", + "en_FK": "Engels (Falklandeilande)", + "en_FM": "Engels (Mikronesië)", + "en_GB": "Engels (Verenigde Koninkryk)", + "en_GD": "Engels (Grenada)", + "en_GG": "Engels (Guernsey)", + "en_GH": "Engels (Ghana)", + "en_GI": "Engels (Gibraltar)", + "en_GM": "Engels (Gambië)", + "en_GU": "Engels (Guam)", + "en_GY": "Engels (Guyana)", + "en_HK": "Engels (Hongkong SAS Sjina)", + "en_IE": "Engels (Ierland)", + "en_IL": "Engels (Israel)", + "en_IM": "Engels (Eiland Man)", + "en_IN": "Engels (Indië)", + "en_IO": "Engels (Brits-Indiese Oseaangebied)", + "en_JE": "Engels (Jersey)", + "en_JM": "Engels (Jamaika)", + "en_KE": "Engels (Kenia)", + "en_KI": "Engels (Kiribati)", + "en_KN": "Engels (St. Kitts en Nevis)", + "en_KY": "Engels (Kaaimanseilande)", + "en_LC": "Engels (St. Lucia)", + "en_LR": "Engels (Liberië)", + "en_LS": "Engels (Lesotho)", + "en_MG": "Engels (Madagaskar)", + "en_MH": "Engels (Marshalleilande)", + "en_MO": "Engels (Macau SAS Sjina)", + "en_MP": "Engels (Noord-Mariane-eilande)", + "en_MS": "Engels (Montserrat)", + "en_MT": "Engels (Malta)", + "en_MU": "Engels (Mauritius)", + "en_MW": "Engels (Malawi)", + "en_MY": "Engels (Maleisië)", + "en_NA": "Engels (Namibië)", + "en_NF": "Engels (Norfolkeiland)", + "en_NG": "Engels (Nigerië)", + "en_NL": "Engels (Nederland)", + "en_NR": "Engels (Nauru)", + "en_NU": "Engels (Niue)", + "en_NZ": "Engels (Nieu-Seeland)", + "en_PG": "Engels (Papoea-Nieu-Guinee)", + "en_PH": "Engels (Filippyne)", + "en_PK": "Engels (Pakistan)", + "en_PN": "Engels (Pitcairneilande)", + "en_PR": "Engels (Puerto Rico)", + "en_PW": "Engels (Palau)", + "en_RW": "Engels (Rwanda)", + "en_SB": "Engels (Salomonseilande)", + "en_SC": "Engels (Seychelle)", + "en_SD": "Engels (Soedan)", + "en_SE": "Engels (Swede)", + "en_SG": "Engels (Singapoer)", + "en_SH": "Engels (Sint Helena)", + "en_SI": "Engels (Slowenië)", + "en_SL": "Engels (Sierra Leone)", + "en_SS": "Engels (Suid-Soedan)", + "en_SX": "Engels (Sint Maarten)", + "en_SZ": "Engels (Swaziland)", + "en_TC": "Engels (Turks- en Caicoseilande)", + "en_TK": "Engels (Tokelau)", + "en_TO": "Engels (Tonga)", + "en_TT": "Engels (Trinidad en Tobago)", + "en_TV": "Engels (Tuvalu)", + "en_TZ": "Engels (Tanzanië)", + "en_UG": "Engels (Uganda)", + "en_UM": "Engels (VS klein omliggende eilande)", + "en_US": "Engels (Verenigde State van Amerika)", + "en_VC": "Engels (St. Vincent en die Grenadine)", + "en_VG": "Engels (Britse Maagde-eilande)", + "en_VI": "Engels (Amerikaanse Maagde-eilande)", + "en_VU": "Engels (Vanuatu)", + "en_WS": "Engels (Samoa)", + "en_ZA": "Engels (Suid-Afrika)", + "en_ZM": "Engels (Zambië)", + "en_ZW": "Engels (Zimbabwe)", + "eo": "Esperanto", + "es": "Spaans", + "es_AR": "Spaans (Argentinië)", + "es_BO": "Spaans (Bolivië)", + "es_BR": "Spaans (Brasilië)", + "es_CL": "Spaans (Chili)", + "es_CO": "Spaans (Colombië)", + "es_CR": "Spaans (Costa Rica)", + "es_CU": "Spaans (Kuba)", + "es_DO": "Spaans (Dominikaanse Republiek)", + "es_EA": "Spaans (Ceuta en Melilla)", + "es_EC": "Spaans (Ecuador)", + "es_ES": "Spaans (Spanje)", + "es_GQ": "Spaans (Ekwatoriaal-Guinee)", + "es_GT": "Spaans (Guatemala)", + "es_HN": "Spaans (Honduras)", + "es_IC": "Spaans (Kanariese Eilande)", + "es_MX": "Spaans (Meksiko)", + "es_NI": "Spaans (Nicaragua)", + "es_PA": "Spaans (Panama)", + "es_PE": "Spaans (Peru)", + "es_PH": "Spaans (Filippyne)", + "es_PR": "Spaans (Puerto Rico)", + "es_PY": "Spaans (Paraguay)", + "es_SV": "Spaans (El Salvador)", + "es_US": "Spaans (Verenigde State van Amerika)", + "es_UY": "Spaans (Uruguay)", + "es_VE": "Spaans (Venezuela)", + "et": "Estnies", + "et_EE": "Estnies (Estland)", + "eu": "Baskies", + "eu_ES": "Baskies (Spanje)", + "fa": "Persies", + "fa_AF": "Persies (Afganistan)", + "fa_IR": "Persies (Iran)", + "ff": "Fulah", + "ff_CM": "Fulah (Kameroen)", + "ff_GN": "Fulah (Guinee)", + "ff_MR": "Fulah (Mauritanië)", + "ff_SN": "Fulah (Senegal)", + "fi": "Fins", + "fi_FI": "Fins (Finland)", + "fo": "Faroees", + "fo_DK": "Faroees (Denemarke)", + "fo_FO": "Faroees (Faroëreilande)", + "fr": "Frans", + "fr_BE": "Frans (België)", + "fr_BF": "Frans (Burkina Faso)", + "fr_BI": "Frans (Burundi)", + "fr_BJ": "Frans (Benin)", + "fr_BL": "Frans (Sint Barthélemy)", + "fr_CA": "Frans (Kanada)", + "fr_CD": "Frans (Demokratiese Republiek van die Kongo)", + "fr_CF": "Frans (Sentraal-Afrikaanse Republiek)", + "fr_CG": "Frans (Kongo - Brazzaville)", + "fr_CH": "Frans (Switserland)", + "fr_CI": "Frans (Ivoorkus)", + "fr_CM": "Frans (Kameroen)", + "fr_DJ": "Frans (Djiboeti)", + "fr_DZ": "Frans (Algerië)", + "fr_FR": "Frans (Frankryk)", + "fr_GA": "Frans (Gaboen)", + "fr_GF": "Frans (Frans-Guyana)", + "fr_GN": "Frans (Guinee)", + "fr_GP": "Frans (Guadeloupe)", + "fr_GQ": "Frans (Ekwatoriaal-Guinee)", + "fr_HT": "Frans (Haïti)", + "fr_KM": "Frans (Comore)", + "fr_LU": "Frans (Luxemburg)", + "fr_MA": "Frans (Marokko)", + "fr_MC": "Frans (Monaco)", + "fr_MF": "Frans (St. Martin)", + "fr_MG": "Frans (Madagaskar)", + "fr_ML": "Frans (Mali)", + "fr_MQ": "Frans (Martinique)", + "fr_MR": "Frans (Mauritanië)", + "fr_MU": "Frans (Mauritius)", + "fr_NC": "Frans (Nieu-Kaledonië)", + "fr_NE": "Frans (Niger)", + "fr_PF": "Frans (Frans-Polinesië)", + "fr_PM": "Frans (St. Pierre en Miquelon)", + "fr_RE": "Frans (Réunion)", + "fr_RW": "Frans (Rwanda)", + "fr_SC": "Frans (Seychelle)", + "fr_SN": "Frans (Senegal)", + "fr_SY": "Frans (Sirië)", + "fr_TD": "Frans (Tsjad)", + "fr_TG": "Frans (Togo)", + "fr_TN": "Frans (Tunisië)", + "fr_VU": "Frans (Vanuatu)", + "fr_WF": "Frans (Wallis en Futuna)", + "fr_YT": "Frans (Mayotte)", + "fy": "Wes-Fries", + "fy_NL": "Wes-Fries (Nederland)", + "ga": "Iers", + "ga_IE": "Iers (Ierland)", + "gd": "Skotse Gallies", + "gd_GB": "Skotse Gallies (Verenigde Koninkryk)", + "gl": "Galisies", + "gl_ES": "Galisies (Spanje)", + "gu": "Goedjarati", + "gu_IN": "Goedjarati (Indië)", + "gv": "Manx", + "gv_IM": "Manx (Eiland Man)", + "ha": "Hausa", + "ha_GH": "Hausa (Ghana)", + "ha_NE": "Hausa (Niger)", + "ha_NG": "Hausa (Nigerië)", + "he": "Hebreeus", + "he_IL": "Hebreeus (Israel)", + "hi": "Hindi", + "hi_IN": "Hindi (Indië)", + "hr": "Kroaties", + "hr_BA": "Kroaties (Bosnië en Herzegowina)", + "hr_HR": "Kroaties (Kroasië)", + "hu": "Hongaars", + "hu_HU": "Hongaars (Hongarye)", + "hy": "Armeens", + "hy_AM": "Armeens (Armenië)", + "id": "Indonesies", + "id_ID": "Indonesies (Indonesië)", + "ig": "Igbo", + "ig_NG": "Igbo (Nigerië)", + "ii": "Sichuan Yi", + "ii_CN": "Sichuan Yi (Sjina)", + "is": "Yslands", + "is_IS": "Yslands (Ysland)", + "it": "Italiaans", + "it_CH": "Italiaans (Switserland)", + "it_IT": "Italiaans (Italië)", + "it_SM": "Italiaans (San Marino)", + "ja": "Japannees", + "ja_JP": "Japannees (Japan)", + "ka": "Georgies", + "ka_GE": "Georgies (Georgië)", + "ki": "Kikuyu", + "ki_KE": "Kikuyu (Kenia)", + "kk": "Kazaks", + "kk_KZ": "Kazaks (Kazakstan)", + "kl": "Kalaallisut", + "kl_GL": "Kalaallisut (Groenland)", + "km": "Khmer", + "km_KH": "Khmer (Kambodja)", + "kn": "Kannada", + "kn_IN": "Kannada (Indië)", + "ko": "Koreaans", + "ko_KP": "Koreaans (Noord-Korea)", + "ko_KR": "Koreaans (Suid-Korea)", + "ks": "Kasjmirs", + "ks_IN": "Kasjmirs (Indië)", + "kw": "Kornies", + "kw_GB": "Kornies (Verenigde Koninkryk)", + "ky": "Kirgisies", + "ky_KG": "Kirgisies (Kirgisië)", + "lb": "Luxemburgs", + "lb_LU": "Luxemburgs (Luxemburg)", + "lg": "Ganda", + "lg_UG": "Ganda (Uganda)", + "ln": "Lingaals", + "ln_AO": "Lingaals (Angola)", + "ln_CD": "Lingaals (Demokratiese Republiek van die Kongo)", + "ln_CF": "Lingaals (Sentraal-Afrikaanse Republiek)", + "ln_CG": "Lingaals (Kongo - Brazzaville)", + "lo": "Lao", + "lo_LA": "Lao (Laos)", + "lt": "Litaus", + "lt_LT": "Litaus (Litaue)", + "lu": "Luba-Katanga", + "lu_CD": "Luba-Katanga (Demokratiese Republiek van die Kongo)", + "lv": "Letties", + "lv_LV": "Letties (Letland)", + "mg": "Malgassies", + "mg_MG": "Malgassies (Madagaskar)", + "mk": "Masedonies", + "mk_MK": "Masedonies (Macedonië)", + "ml": "Malabaars", + "ml_IN": "Malabaars (Indië)", + "mn": "Mongools", + "mn_MN": "Mongools (Mongolië)", + "mr": "Marathi", + "mr_IN": "Marathi (Indië)", + "ms": "Maleis", + "ms_BN": "Maleis (Broenei)", + "ms_MY": "Maleis (Maleisië)", + "ms_SG": "Maleis (Singapoer)", + "mt": "Maltees", + "mt_MT": "Maltees (Malta)", + "my": "Birmaans", + "my_MM": "Birmaans (Mianmar (Birma))", + "nb": "Noorse BokmÃ¥l", + "nb_NO": "Noorse BokmÃ¥l (Noorweë)", + "nb_SJ": "Noorse BokmÃ¥l (Svalbard en Jan Mayen)", + "nd": "Noord-Ndebele", + "nd_ZW": "Noord-Ndebele (Zimbabwe)", + "ne": "Nepalees", + "ne_IN": "Nepalees (Indië)", + "ne_NP": "Nepalees (Nepal)", + "nl": "Nederlands", + "nl_AW": "Nederlands (Aruba)", + "nl_BE": "Nederlands (België)", + "nl_BQ": "Nederlands (Karibiese Nederland)", + "nl_CW": "Nederlands (Curaçao)", + "nl_NL": "Nederlands (Nederland)", + "nl_SR": "Nederlands (Suriname)", + "nl_SX": "Nederlands (Sint Maarten)", + "nn": "Noorweegse Nynorsk", + "nn_NO": "Noorweegse Nynorsk (Noorweë)", + "no": "Noors", + "no_NO": "Noors (Noorweë)", + "om": "Oromo", + "om_ET": "Oromo (Ethiopië)", + "om_KE": "Oromo (Kenia)", + "or": "Oriya", + "or_IN": "Oriya (Indië)", + "os": "Osseties", + "os_GE": "Osseties (Georgië)", + "os_RU": "Osseties (Rusland)", + "pa": "Pandjabi", + "pa_Arab": "Pandjabi (Arabies)", + "pa_Arab_PK": "Pandjabi (Arabies, Pakistan)", + "pa_Guru": "Pandjabi (Gurmukhi)", + "pa_Guru_IN": "Pandjabi (Gurmukhi, Indië)", + "pa_IN": "Pandjabi (Indië)", + "pa_PK": "Pandjabi (Pakistan)", + "pl": "Pools", + "pl_PL": "Pools (Pole)", + "ps": "Pasjto", + "ps_AF": "Pasjto (Afganistan)", + "pt": "Portugees", + "pt_AO": "Portugees (Angola)", + "pt_BR": "Portugees (Brasilië)", + "pt_CH": "Portugees (Switserland)", + "pt_CV": "Portugees (Kaap Verde)", + "pt_GQ": "Portugees (Ekwatoriaal-Guinee)", + "pt_GW": "Portugees (Guinee-Bissau)", + "pt_LU": "Portugees (Luxemburg)", + "pt_MO": "Portugees (Macau SAS Sjina)", + "pt_MZ": "Portugees (Mosambiek)", + "pt_PT": "Portugees (Portugal)", + "pt_ST": "Portugees (São Tomé en Príncipe)", + "pt_TL": "Portugees (Oos-Timor)", + "qu": "Quechua", + "qu_BO": "Quechua (Bolivië)", + "qu_EC": "Quechua (Ecuador)", + "qu_PE": "Quechua (Peru)", + "rm": "Reto-Romaans", + "rm_CH": "Reto-Romaans (Switserland)", + "rn": "Rundi", + "rn_BI": "Rundi (Burundi)", + "ro": "Roemeens", + "ro_MD": "Roemeens (Moldowa)", + "ro_RO": "Roemeens (Roemenië)", + "ru": "Russies", + "ru_BY": "Russies (Belarus)", + "ru_KG": "Russies (Kirgisië)", + "ru_KZ": "Russies (Kazakstan)", + "ru_MD": "Russies (Moldowa)", + "ru_RU": "Russies (Rusland)", + "ru_UA": "Russies (Oekraïne)", + "rw": "Rwandees", + "rw_RW": "Rwandees (Rwanda)", + "se": "Noord-Sami", + "se_FI": "Noord-Sami (Finland)", + "se_NO": "Noord-Sami (Noorweë)", + "se_SE": "Noord-Sami (Swede)", + "sg": "Sango", + "sg_CF": "Sango (Sentraal-Afrikaanse Republiek)", + "sh": "Serwo-Kroaties", + "sh_BA": "Serwo-Kroaties (Bosnië en Herzegowina)", + "si": "Sinhala", + "si_LK": "Sinhala (Sri Lanka)", + "sk": "Slowaaks", + "sk_SK": "Slowaaks (Slowakye)", + "sl": "Sloweens", + "sl_SI": "Sloweens (Slowenië)", + "sn": "Shona", + "sn_ZW": "Shona (Zimbabwe)", + "so": "Somalies", + "so_DJ": "Somalies (Djiboeti)", + "so_ET": "Somalies (Ethiopië)", + "so_KE": "Somalies (Kenia)", + "so_SO": "Somalies (Somalië)", + "sq": "Albanees", + "sq_AL": "Albanees (Albanië)", + "sq_MK": "Albanees (Macedonië)", + "sq_XK": "Albanees (Kosovo)", + "sr": "Serwies", + "sr_BA": "Serwies (Bosnië en Herzegowina)", + "sr_Cyrl": "Serwies (Sirillies)", + "sr_Cyrl_BA": "Serwies (Sirillies, Bosnië en Herzegowina)", + "sr_Cyrl_ME": "Serwies (Sirillies, Montenegro)", + "sr_Cyrl_RS": "Serwies (Sirillies, Serwië)", + "sr_Cyrl_XK": "Serwies (Sirillies, Kosovo)", + "sr_Latn": "Serwies (Latyn)", + "sr_Latn_BA": "Serwies (Latyn, Bosnië en Herzegowina)", + "sr_Latn_ME": "Serwies (Latyn, Montenegro)", + "sr_Latn_RS": "Serwies (Latyn, Serwië)", + "sr_Latn_XK": "Serwies (Latyn, Kosovo)", + "sr_ME": "Serwies (Montenegro)", + "sr_RS": "Serwies (Serwië)", + "sr_XK": "Serwies (Kosovo)", + "sv": "Sweeds", + "sv_AX": "Sweeds (Ã…landeilande)", + "sv_FI": "Sweeds (Finland)", + "sv_SE": "Sweeds (Swede)", + "sw": "Swahili", + "sw_CD": "Swahili (Demokratiese Republiek van die Kongo)", + "sw_KE": "Swahili (Kenia)", + "sw_TZ": "Swahili (Tanzanië)", + "sw_UG": "Swahili (Uganda)", + "ta": "Tamil", + "ta_IN": "Tamil (Indië)", + "ta_LK": "Tamil (Sri Lanka)", + "ta_MY": "Tamil (Maleisië)", + "ta_SG": "Tamil (Singapoer)", + "te": "Teloegoe", + "te_IN": "Teloegoe (Indië)", + "th": "Thai", + "th_TH": "Thai (Thailand)", + "ti": "Tigrinya", + "ti_ER": "Tigrinya (Eritrea)", + "ti_ET": "Tigrinya (Ethiopië)", + "to": "Tongaans", + "to_TO": "Tongaans (Tonga)", + "tr": "Turks", + "tr_CY": "Turks (Siprus)", + "tr_TR": "Turks (Turkye)", + "ug": "Uighur", + "ug_CN": "Uighur (Sjina)", + "uk": "Oekraïens", + "uk_UA": "Oekraïens (Oekraïne)", + "ur": "Oerdoe", + "ur_IN": "Oerdoe (Indië)", + "ur_PK": "Oerdoe (Pakistan)", + "uz": "Oezbeeks", + "uz_AF": "Oezbeeks (Afganistan)", + "uz_Arab": "Oezbeeks (Arabies)", + "uz_Arab_AF": "Oezbeeks (Arabies, Afganistan)", + "uz_Cyrl": "Oezbeeks (Sirillies)", + "uz_Cyrl_UZ": "Oezbeeks (Sirillies, Oesbekistan)", + "uz_Latn": "Oezbeeks (Latyn)", + "uz_Latn_UZ": "Oezbeeks (Latyn, Oesbekistan)", + "uz_UZ": "Oezbeeks (Oesbekistan)", + "vi": "Viëtnamees", + "vi_VN": "Viëtnamees (Viëtnam)", + "yi": "Jiddisj", + "yo": "Yoruba", + "yo_BJ": "Yoruba (Benin)", + "yo_NG": "Yoruba (Nigerië)", + "zh": "Sjinees", + "zh_CN": "Sjinees (Sjina)", + "zh_HK": "Sjinees (Hongkong SAS Sjina)", + "zh_Hans": "Sjinees (Vereenvoudig)", + "zh_Hans_CN": "Sjinees (Vereenvoudig, Sjina)", + "zh_Hans_HK": "Sjinees (Vereenvoudig, Hongkong SAS Sjina)", + "zh_Hans_MO": "Sjinees (Vereenvoudig, Macau SAS Sjina)", + "zh_Hans_SG": "Sjinees (Vereenvoudig, Singapoer)", + "zh_Hant": "Sjinees (Tradisioneel)", + "zh_Hant_HK": "Sjinees (Tradisioneel, Hongkong SAS Sjina)", + "zh_Hant_MO": "Sjinees (Tradisioneel, Macau SAS Sjina)", + "zh_Hant_TW": "Sjinees (Tradisioneel, Taiwan)", + "zh_MO": "Sjinees (Macau SAS Sjina)", + "zh_SG": "Sjinees (Singapoer)", + "zh_TW": "Sjinees (Taiwan)", + "zu": "Zoeloe", + "zu_ZA": "Zoeloe (Suid-Afrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ak.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ak.json new file mode 100644 index 0000000000000000000000000000000000000000..17b3e131f94babc072819d33c3820ff8e82f0cfc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ak.json @@ -0,0 +1,319 @@ +{ + "Names": { + "ak": "Akan", + "ak_GH": "Akan (Gaana)", + "am": "Amarik", + "am_ET": "Amarik (Ithiopia)", + "ar": "Arabik", + "ar_AE": "Arabik (United Arab Emirates)", + "ar_BH": "Arabik (Baren)", + "ar_DJ": "Arabik (Gyibuti)", + "ar_DZ": "Arabik (Ɔlgyeria)", + "ar_EG": "Arabik (Nisrim)", + "ar_ER": "Arabik (Æritrea)", + "ar_IL": "Arabik (Israel)", + "ar_IQ": "Arabik (Irak)", + "ar_JO": "Arabik (GyÉ”dan)", + "ar_KM": "Arabik (KÉ”mÉ”rÉ”s)", + "ar_KW": "Arabik (Kuwete)", + "ar_LB": "Arabik (LÉ›banÉ”n)", + "ar_LY": "Arabik (Libya)", + "ar_MA": "Arabik (Moroko)", + "ar_MR": "Arabik (MÉ”retenia)", + "ar_OM": "Arabik (Oman)", + "ar_PS": "Arabik (Palestaen West Bank ne Gaza)", + "ar_QA": "Arabik (Kata)", + "ar_SA": "Arabik (Saudi Arabia)", + "ar_SD": "Arabik (Sudan)", + "ar_SO": "Arabik (Somalia)", + "ar_SY": "Arabik (Siria)", + "ar_TD": "Arabik (Kyad)", + "ar_TN": "Arabik (Tunihyia)", + "ar_YE": "Arabik (YÉ›men)", + "be": "Belarus kasa", + "be_BY": "Belarus kasa (BÉ›larus)", + "bg": "BÉ”lgeria kasa", + "bg_BG": "BÉ”lgeria kasa (BÉ”lgeria)", + "bn": "Bengali kasa", + "bn_BD": "Bengali kasa (BangladÉ›hye)", + "bn_IN": "Bengali kasa (India)", + "cs": "KyÉ›k kasa", + "cs_CZ": "KyÉ›k kasa (KyÉ›k KurokÉ›se)", + "de": "Gyaaman", + "de_AT": "Gyaaman (Ɔstria)", + "de_BE": "Gyaaman (BÉ›lgyium)", + "de_CH": "Gyaaman (Swetzaland)", + "de_DE": "Gyaaman (Gyaaman)", + "de_IT": "Gyaaman (Itali)", + "de_LI": "Gyaaman (Lektenstaen)", + "de_LU": "Gyaaman (LaksembÉ›g)", + "el": "Greek kasa", + "el_CY": "Greek kasa (SaeprÉ”s)", + "el_GR": "Greek kasa (Greekman)", + "en": "BorÉ”fo", + "en_AG": "BorÉ”fo (Antigua ne Baabuda)", + "en_AI": "BorÉ”fo (Anguila)", + "en_AS": "BorÉ”fo (AmÉ›rika Samoa)", + "en_AT": "BorÉ”fo (Ɔstria)", + "en_AU": "BorÉ”fo (Ɔstrelia)", + "en_BB": "BorÉ”fo (Baabados)", + "en_BE": "BorÉ”fo (BÉ›lgyium)", + "en_BI": "BorÉ”fo (Burundi)", + "en_BM": "BorÉ”fo (BÉ›muda)", + "en_BS": "BorÉ”fo (Bahama)", + "en_BW": "BorÉ”fo (BÉ”tswana)", + "en_BZ": "BorÉ”fo (Beliz)", + "en_CA": "BorÉ”fo (Kanada)", + "en_CH": "BorÉ”fo (Swetzaland)", + "en_CK": "BorÉ”fo (Kook NsupÉ”w)", + "en_CM": "BorÉ”fo (KamÉ›run)", + "en_CY": "BorÉ”fo (SaeprÉ”s)", + "en_DE": "BorÉ”fo (Gyaaman)", + "en_DK": "BorÉ”fo (DÉ›nmak)", + "en_DM": "BorÉ”fo (DÉ”meneka)", + "en_ER": "BorÉ”fo (Æritrea)", + "en_FI": "BorÉ”fo (Finland)", + "en_FJ": "BorÉ”fo (Figyi)", + "en_FK": "BorÉ”fo (FÉ”lkman Aeland)", + "en_FM": "BorÉ”fo (Maekronehyia)", + "en_GB": "BorÉ”fo (Ahendiman Nkabom)", + "en_GD": "BorÉ”fo (Grenada)", + "en_GH": "BorÉ”fo (Gaana)", + "en_GI": "BorÉ”fo (Gyebralta)", + "en_GM": "BorÉ”fo (Gambia)", + "en_GU": "BorÉ”fo (Guam)", + "en_GY": "BorÉ”fo (Gayana)", + "en_IE": "BorÉ”fo (Aereland)", + "en_IL": "BorÉ”fo (Israel)", + "en_IN": "BorÉ”fo (India)", + "en_IO": "BorÉ”fo (Britenfo HÉ”n Man WÉ” India Po No Mu)", + "en_JM": "BorÉ”fo (Gyameka)", + "en_KE": "BorÉ”fo (KÉ›nya)", + "en_KI": "BorÉ”fo (Kiribati)", + "en_KN": "BorÉ”fo (Saint Kitts ne NÉ›ves)", + "en_KY": "BorÉ”fo (Kemanfo Islands)", + "en_LC": "BorÉ”fo (Saint Lucia)", + "en_LR": "BorÉ”fo (Laeberia)", + "en_LS": "BorÉ”fo (LÉ›sutu)", + "en_MG": "BorÉ”fo (Madagaska)", + "en_MH": "BorÉ”fo (Marshall Islands)", + "en_MP": "BorÉ”fo (Northern Mariana Islands)", + "en_MS": "BorÉ”fo (Mantserat)", + "en_MT": "BorÉ”fo (MÉ”lta)", + "en_MU": "BorÉ”fo (MÉ”rehyeÉ”s)", + "en_MW": "BorÉ”fo (Malawi)", + "en_MY": "BorÉ”fo (Malehyia)", + "en_NA": "BorÉ”fo (Namibia)", + "en_NF": "BorÉ”fo (NÉ”folk Aeland)", + "en_NG": "BorÉ”fo (Naegyeria)", + "en_NL": "BorÉ”fo (NÉ›dÉ›land)", + "en_NR": "BorÉ”fo (Naworu)", + "en_NU": "BorÉ”fo (Niyu)", + "en_NZ": "BorÉ”fo (Ziland Foforo)", + "en_PG": "BorÉ”fo (Papua Guinea Foforo)", + "en_PH": "BorÉ”fo (Philippines)", + "en_PK": "BorÉ”fo (Pakistan)", + "en_PN": "BorÉ”fo (Pitcairn)", + "en_PR": "BorÉ”fo (PuÉ›to Riko)", + "en_PW": "BorÉ”fo (Palau)", + "en_RW": "BorÉ”fo (Rwanda)", + "en_SB": "BorÉ”fo (Solomon Islands)", + "en_SC": "BorÉ”fo (SeyhyÉ›l)", + "en_SD": "BorÉ”fo (Sudan)", + "en_SE": "BorÉ”fo (Sweden)", + "en_SG": "BorÉ”fo (SingapÉ”)", + "en_SH": "BorÉ”fo (Saint Helena)", + "en_SI": "BorÉ”fo (Slovinia)", + "en_SL": "BorÉ”fo (Sierra Leone)", + "en_SZ": "BorÉ”fo (Swaziland)", + "en_TC": "BorÉ”fo (Turks ne Caicos Islands)", + "en_TK": "BorÉ”fo (Tokelau)", + "en_TO": "BorÉ”fo (Tonga)", + "en_TT": "BorÉ”fo (Trinidad ne Tobago)", + "en_TV": "BorÉ”fo (Tuvalu)", + "en_TZ": "BorÉ”fo (Tanzania)", + "en_UG": "BorÉ”fo (Uganda)", + "en_US": "BorÉ”fo (AmÉ›rika)", + "en_VC": "BorÉ”fo (Saint Vincent ne Grenadines)", + "en_VG": "BorÉ”fo (Britainfo Virgin Islands)", + "en_VI": "BorÉ”fo (AmÉ›rika Virgin Islands)", + "en_VU": "BorÉ”fo (Vanuatu)", + "en_WS": "BorÉ”fo (Samoa)", + "en_ZA": "BorÉ”fo (Afrika Anaafo)", + "en_ZM": "BorÉ”fo (Zambia)", + "en_ZW": "BorÉ”fo (Zembabwe)", + "es": "Spain kasa", + "es_AR": "Spain kasa (AgyÉ›ntina)", + "es_BO": "Spain kasa (Bolivia)", + "es_BR": "Spain kasa (Brazil)", + "es_CL": "Spain kasa (Kyili)", + "es_CO": "Spain kasa (Kolombia)", + "es_CR": "Spain kasa (KÉ”sta Rika)", + "es_CU": "Spain kasa (Kuba)", + "es_DO": "Spain kasa (DÉ”meneka KurokÉ›se)", + "es_EC": "Spain kasa (IkuwadÉ”)", + "es_ES": "Spain kasa (Spain)", + "es_GQ": "Spain kasa (Gini Ikuweta)", + "es_GT": "Spain kasa (Guwatemala)", + "es_HN": "Spain kasa (HÉ”nduras)", + "es_MX": "Spain kasa (MÉ›ksiko)", + "es_NI": "Spain kasa (Nekaraguwa)", + "es_PA": "Spain kasa (Panama)", + "es_PE": "Spain kasa (Peru)", + "es_PH": "Spain kasa (Philippines)", + "es_PR": "Spain kasa (PuÉ›to Riko)", + "es_PY": "Spain kasa (Paraguay)", + "es_SV": "Spain kasa (Æl SalvadÉ”)", + "es_US": "Spain kasa (AmÉ›rika)", + "es_UY": "Spain kasa (Yurugwae)", + "es_VE": "Spain kasa (Venezuela)", + "fa": "Pɛɛhyia kasa", + "fa_AF": "Pɛɛhyia kasa (Afganistan)", + "fa_IR": "Pɛɛhyia kasa (Iran)", + "fr": "FrÉ›nkye", + "fr_BE": "FrÉ›nkye (BÉ›lgyium)", + "fr_BF": "FrÉ›nkye (BÉ”kina Faso)", + "fr_BI": "FrÉ›nkye (Burundi)", + "fr_BJ": "FrÉ›nkye (BÉ›nin)", + "fr_CA": "FrÉ›nkye (Kanada)", + "fr_CD": "FrÉ›nkye (Kongo (Zair))", + "fr_CF": "FrÉ›nkye (Afrika Finimfin Man)", + "fr_CG": "FrÉ›nkye (Kongo)", + "fr_CH": "FrÉ›nkye (Swetzaland)", + "fr_CI": "FrÉ›nkye (La Côte d’Ivoire)", + "fr_CM": "FrÉ›nkye (KamÉ›run)", + "fr_DJ": "FrÉ›nkye (Gyibuti)", + "fr_DZ": "FrÉ›nkye (Ɔlgyeria)", + "fr_FR": "FrÉ›nkye (FrÉ›nkyeman)", + "fr_GA": "FrÉ›nkye (GabÉ”n)", + "fr_GF": "FrÉ›nkye (FrÉ›nkye Gayana)", + "fr_GN": "FrÉ›nkye (Gini)", + "fr_GP": "FrÉ›nkye (Guwadelup)", + "fr_GQ": "FrÉ›nkye (Gini Ikuweta)", + "fr_HT": "FrÉ›nkye (Heiti)", + "fr_KM": "FrÉ›nkye (KÉ”mÉ”rÉ”s)", + "fr_LU": "FrÉ›nkye (LaksembÉ›g)", + "fr_MA": "FrÉ›nkye (Moroko)", + "fr_MC": "FrÉ›nkye (MÉ”nako)", + "fr_MG": "FrÉ›nkye (Madagaska)", + "fr_ML": "FrÉ›nkye (Mali)", + "fr_MQ": "FrÉ›nkye (Matinik)", + "fr_MR": "FrÉ›nkye (MÉ”retenia)", + "fr_MU": "FrÉ›nkye (MÉ”rehyeÉ”s)", + "fr_NC": "FrÉ›nkye (Kaledonia Foforo)", + "fr_NE": "FrÉ›nkye (NigyÉ›)", + "fr_PF": "FrÉ›nkye (FrÉ›nkye PÉ”lenehyia)", + "fr_PM": "FrÉ›nkye (Saint Pierre ne Miquelon)", + "fr_RE": "FrÉ›nkye (ReyuniÉ”n)", + "fr_RW": "FrÉ›nkye (Rwanda)", + "fr_SC": "FrÉ›nkye (SeyhyÉ›l)", + "fr_SN": "FrÉ›nkye (Senegal)", + "fr_SY": "FrÉ›nkye (Siria)", + "fr_TD": "FrÉ›nkye (Kyad)", + "fr_TG": "FrÉ›nkye (Togo)", + "fr_TN": "FrÉ›nkye (Tunihyia)", + "fr_VU": "FrÉ›nkye (Vanuatu)", + "fr_WF": "FrÉ›nkye (Wallis ne Futuna)", + "fr_YT": "FrÉ›nkye (MayÉ”te)", + "ha": "Hausa", + "ha_GH": "Hausa (Gaana)", + "ha_NE": "Hausa (NigyÉ›)", + "ha_NG": "Hausa (Naegyeria)", + "hi": "Hindi", + "hi_IN": "Hindi (India)", + "hu": "Hangri kasa", + "hu_HU": "Hangri kasa (Hangari)", + "id": "Indonihyia kasa", + "id_ID": "Indonihyia kasa (IndÉ”nehyia)", + "ig": "Igbo", + "ig_NG": "Igbo (Naegyeria)", + "it": "Italy kasa", + "it_CH": "Italy kasa (Swetzaland)", + "it_IT": "Italy kasa (Itali)", + "it_SM": "Italy kasa (San Marino)", + "ja": "Gyapan kasa", + "ja_JP": "Gyapan kasa (Gyapan)", + "km": "Kambodia kasa", + "km_KH": "Kambodia kasa (Kambodia)", + "ko": "Korea kasa", + "ko_KP": "Korea kasa (Etifi Koria)", + "ko_KR": "Korea kasa (Anaafo Koria)", + "ms": "Malay kasa", + "ms_BN": "Malay kasa (Brunae)", + "ms_MY": "Malay kasa (Malehyia)", + "ms_SG": "Malay kasa (SingapÉ”)", + "my": "Bɛɛmis kasa", + "my_MM": "Bɛɛmis kasa (Miyanma)", + "ne": "NÉ›pal kasa", + "ne_IN": "NÉ›pal kasa (India)", + "ne_NP": "NÉ›pal kasa (NÉ›pÉ”l)", + "nl": "Dɛɛkye", + "nl_AW": "Dɛɛkye (Aruba)", + "nl_BE": "Dɛɛkye (BÉ›lgyium)", + "nl_NL": "Dɛɛkye (NÉ›dÉ›land)", + "nl_SR": "Dɛɛkye (Suriname)", + "pa": "Pungyabi kasa", + "pa_IN": "Pungyabi kasa (India)", + "pa_PK": "Pungyabi kasa (Pakistan)", + "pl": "PÉ”land kasa", + "pl_PL": "PÉ”land kasa (Poland)", + "pt": "Pɔɔtugal kasa", + "pt_AO": "Pɔɔtugal kasa (Angola)", + "pt_BR": "Pɔɔtugal kasa (Brazil)", + "pt_CH": "Pɔɔtugal kasa (Swetzaland)", + "pt_CV": "Pɔɔtugal kasa (KepvÉ›dfo Islands)", + "pt_GQ": "Pɔɔtugal kasa (Gini Ikuweta)", + "pt_GW": "Pɔɔtugal kasa (Gini Bisaw)", + "pt_LU": "Pɔɔtugal kasa (LaksembÉ›g)", + "pt_MZ": "Pɔɔtugal kasa (Mozambik)", + "pt_PT": "Pɔɔtugal kasa (PÉ”tugal)", + "pt_ST": "Pɔɔtugal kasa (São Tomé and Príncipe)", + "pt_TL": "Pɔɔtugal kasa (TimÉ” Boka)", + "ro": "Romenia kasa", + "ro_MD": "Romenia kasa (MÉ”ldova)", + "ro_RO": "Romenia kasa (Romenia)", + "ru": "Rahyia kasa", + "ru_BY": "Rahyia kasa (BÉ›larus)", + "ru_KG": "Rahyia kasa (Kɛɛgestan)", + "ru_KZ": "Rahyia kasa (Kazakstan)", + "ru_MD": "Rahyia kasa (MÉ”ldova)", + "ru_RU": "Rahyia kasa (RÉ”hyea)", + "ru_UA": "Rahyia kasa (Ukren)", + "rw": "Rewanda kasa", + "rw_RW": "Rewanda kasa (Rwanda)", + "so": "Somalia kasa", + "so_DJ": "Somalia kasa (Gyibuti)", + "so_ET": "Somalia kasa (Ithiopia)", + "so_KE": "Somalia kasa (KÉ›nya)", + "so_SO": "Somalia kasa (Somalia)", + "sv": "Sweden kasa", + "sv_FI": "Sweden kasa (Finland)", + "sv_SE": "Sweden kasa (Sweden)", + "ta": "Tamil kasa", + "ta_IN": "Tamil kasa (India)", + "ta_LK": "Tamil kasa (Sri Lanka)", + "ta_MY": "Tamil kasa (Malehyia)", + "ta_SG": "Tamil kasa (SingapÉ”)", + "th": "Taeland kasa", + "th_TH": "Taeland kasa (Taeland)", + "tr": "Tɛɛki kasa", + "tr_CY": "Tɛɛki kasa (SaeprÉ”s)", + "tr_TR": "Tɛɛki kasa (Tɛɛki)", + "uk": "Ukren kasa", + "uk_UA": "Ukren kasa (Ukren)", + "ur": "Urdu kasa", + "ur_IN": "Urdu kasa (India)", + "ur_PK": "Urdu kasa (Pakistan)", + "vi": "ViÉ›tnam kasa", + "vi_VN": "ViÉ›tnam kasa (ViÉ›tnam)", + "yo": "Yoruba", + "yo_BJ": "Yoruba (BÉ›nin)", + "yo_NG": "Yoruba (Naegyeria)", + "zh": "Kyaena kasa", + "zh_CN": "Kyaena kasa (Kyaena)", + "zh_SG": "Kyaena kasa (SingapÉ”)", + "zh_TW": "Kyaena kasa (Taiwan)", + "zu": "Zulu", + "zu_ZA": "Zulu (Afrika Anaafo)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/am.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/am.json new file mode 100644 index 0000000000000000000000000000000000000000..08f00de6f682830061777f8b338634531c4eedfd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/am.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "አáሪካንኛ", + "af_NA": "አáሪካንኛ (ናሚቢያ)", + "af_ZA": "አáሪካንኛ (ደቡብ አáሪካ)", + "ak": "አካንኛ", + "ak_GH": "አካንኛ (ጋና)", + "am": "አማርኛ", + "am_ET": "አማርኛ (ኢትዮጵያ)", + "ar": "ዓረብኛ", + "ar_AE": "ዓረብኛ (የተባበሩት ዓረብ ኤáˆáˆ¬á‰µáˆµ)", + "ar_BH": "ዓረብኛ (ባህሬን)", + "ar_DJ": "ዓረብኛ (ጂቡቲ)", + "ar_DZ": "ዓረብኛ (አáˆáŒ„ሪያ)", + "ar_EG": "ዓረብኛ (áŒá‰¥áŒ½)", + "ar_EH": "ዓረብኛ (áˆá‹•ራባዊ ሳህራ)", + "ar_ER": "ዓረብኛ (ኤርትራ)", + "ar_IL": "ዓረብኛ (እስራኤáˆ)", + "ar_IQ": "ዓረብኛ (ኢራቅ)", + "ar_JO": "ዓረብኛ (ጆርዳን)", + "ar_KM": "ዓረብኛ (ኮሞሮስ)", + "ar_KW": "ዓረብኛ (ክዌት)", + "ar_LB": "ዓረብኛ (ሊባኖስ)", + "ar_LY": "ዓረብኛ (ሊቢያ)", + "ar_MA": "ዓረብኛ (ሞሮኮ)", + "ar_MR": "ዓረብኛ (ሞሪቴኒያ)", + "ar_OM": "ዓረብኛ (ኦማን)", + "ar_PS": "ዓረብኛ (የááˆáˆµáŒ¤áˆ áŒá‹›á‰µ)", + "ar_QA": "ዓረብኛ (ኳታር)", + "ar_SA": "ዓረብኛ (ሳá‹á‹µáŠ áˆ¨á‰¢á‹«)", + "ar_SD": "ዓረብኛ (ሱዳን)", + "ar_SO": "ዓረብኛ (ሱማሌ)", + "ar_SS": "ዓረብኛ (ደቡብ ሱዳን)", + "ar_SY": "ዓረብኛ (ሲሪያ)", + "ar_TD": "ዓረብኛ (ቻድ)", + "ar_TN": "ዓረብኛ (ቱኒዚያ)", + "ar_YE": "ዓረብኛ (የመን)", + "as": "አሳሜዛዊ", + "as_IN": "አሳሜዛዊ (ህንድ)", + "az": "አዘርባጃንኛ", + "az_AZ": "አዘርባጃንኛ (አዘርባጃን)", + "az_Cyrl": "አዘርባጃንኛ (ሲይሪáˆáŠ­)", + "az_Cyrl_AZ": "አዘርባጃንኛ (ሲይሪáˆáŠ­, አዘርባጃን)", + "az_Latn": "አዘርባጃንኛ (ላቲን)", + "az_Latn_AZ": "አዘርባጃንኛ (ላቲን, አዘርባጃን)", + "be": "ቤላራሻኛ", + "be_BY": "ቤላራሻኛ (ቤላሩስ)", + "bg": "ቡáˆáŒ‹áˆªáŠ›", + "bg_BG": "ቡáˆáŒ‹áˆªáŠ› (ቡáˆáŒŒáˆªá‹«)", + "bm": "ባáˆá‰£áˆ­áŠ›", + "bm_ML": "ባáˆá‰£áˆ­áŠ› (ማሊ)", + "bn": "ቤንጋሊኛ", + "bn_BD": "ቤንጋሊኛ (ባንáŒáˆ‹á‹²áˆ½)", + "bn_IN": "ቤንጋሊኛ (ህንድ)", + "bo": "ቲቤታንኛ", + "bo_CN": "ቲቤታንኛ (ቻይና)", + "bo_IN": "ቲቤታንኛ (ህንድ)", + "br": "ብሬቶንኛ", + "br_FR": "ብሬቶንኛ (áˆáˆ¨áŠ•áˆ³á‹­)", + "bs": "ቦስኒያንኛ", + "bs_BA": "ቦስኒያንኛ (ቦስኒያ እና ሄርዞጎቪኒያ)", + "bs_Cyrl": "ቦስኒያንኛ (ሲይሪáˆáŠ­)", + "bs_Cyrl_BA": "ቦስኒያንኛ (ሲይሪáˆáŠ­, ቦስኒያ እና ሄርዞጎቪኒያ)", + "bs_Latn": "ቦስኒያንኛ (ላቲን)", + "bs_Latn_BA": "ቦስኒያንኛ (ላቲን, ቦስኒያ እና ሄርዞጎቪኒያ)", + "ca": "ካታላንኛ", + "ca_AD": "ካታላንኛ (አንዶራ)", + "ca_ES": "ካታላንኛ (ስá”ን)", + "ca_FR": "ካታላንኛ (áˆáˆ¨áŠ•áˆ³á‹­)", + "ca_IT": "ካታላንኛ (ጣሊያን)", + "ce": "ችችን", + "ce_RU": "ችችን (ራሽያ)", + "cs": "ቼክኛ", + "cs_CZ": "ቼክኛ (ቼክ ሪá‘ብሊክ)", + "cy": "ወáˆáˆ½", + "cy_GB": "ወáˆáˆ½ (እንáŒáˆŠá‹)", + "da": "ዴኒሽ", + "da_DK": "ዴኒሽ (ዴንማርክ)", + "da_GL": "ዴኒሽ (áŒáˆªáŠ•áˆ‹áŠ•á‹µ)", + "de": "ጀርመን", + "de_AT": "ጀርመን (ኦስትሪያ)", + "de_BE": "ጀርመን (ቤáˆáŒ„áˆ)", + "de_CH": "ጀርመን (ስዊዘርላንድ)", + "de_DE": "ጀርመን (ጀርመን)", + "de_IT": "ጀርመን (ጣሊያን)", + "de_LI": "ጀርመን (ሊችተንስታይን)", + "de_LU": "ጀርመን (ሉክሰáˆá‰ áˆ­áŒ)", + "dz": "ድዞንáŒáŠ»áŠ›", + "dz_BT": "ድዞንáŒáŠ»áŠ› (ቡህታን)", + "ee": "ኢዊ", + "ee_GH": "ኢዊ (ጋና)", + "ee_TG": "ኢዊ (ቶáŒ)", + "el": "áŒáˆªáŠ­áŠ›", + "el_CY": "áŒáˆªáŠ­áŠ› (ሳይá•ረስ)", + "el_GR": "áŒáˆªáŠ­áŠ› (áŒáˆªáŠ­)", + "en": "እንáŒáˆŠá‹áŠ›", + "en_AG": "እንáŒáˆŠá‹áŠ› (አንቲጓ እና ባሩዳ)", + "en_AI": "እንáŒáˆŠá‹áŠ› (አንጉኢላ)", + "en_AS": "እንáŒáˆŠá‹áŠ› (የአሜሪካ ሳሞአ)", + "en_AT": "እንáŒáˆŠá‹áŠ› (ኦስትሪያ)", + "en_AU": "እንáŒáˆŠá‹áŠ› (አá‹áˆµá‰µáˆ«áˆá‹«)", + "en_BB": "እንáŒáˆŠá‹áŠ› (ባርቤዶስ)", + "en_BE": "እንáŒáˆŠá‹áŠ› (ቤáˆáŒ„áˆ)", + "en_BI": "እንáŒáˆŠá‹áŠ› (ብሩንዲ)", + "en_BM": "እንáŒáˆŠá‹áŠ› (ቤርሙዳ)", + "en_BS": "እንáŒáˆŠá‹áŠ› (ባሃማስ)", + "en_BW": "እንáŒáˆŠá‹áŠ› (ቦትስዋና)", + "en_BZ": "እንáŒáˆŠá‹áŠ› (ቤሊዘ)", + "en_CA": "እንáŒáˆŠá‹áŠ› (ካናዳ)", + "en_CC": "እንáŒáˆŠá‹áŠ› (ኮኮስ(ኬሊንáŒ) ደሴቶች)", + "en_CH": "እንáŒáˆŠá‹áŠ› (ስዊዘርላንድ)", + "en_CK": "እንáŒáˆŠá‹áŠ› (ኩክ ደሴቶች)", + "en_CM": "እንáŒáˆŠá‹áŠ› (ካሜሩን)", + "en_CX": "እንáŒáˆŠá‹áŠ› (የገና ደሴት)", + "en_CY": "እንáŒáˆŠá‹áŠ› (ሳይá•ረስ)", + "en_DE": "እንáŒáˆŠá‹áŠ› (ጀርመን)", + "en_DG": "እንáŒáˆŠá‹áŠ› (ዲዬጎ ጋርሺያ)", + "en_DK": "እንáŒáˆŠá‹áŠ› (ዴንማርክ)", + "en_DM": "እንáŒáˆŠá‹áŠ› (ዶሚኒካ)", + "en_ER": "እንáŒáˆŠá‹áŠ› (ኤርትራ)", + "en_FI": "እንáŒáˆŠá‹áŠ› (áŠáŠ•áˆ‹áŠ•á‹µ)", + "en_FJ": "እንáŒáˆŠá‹áŠ› (áŠáŒ‚)", + "en_FK": "እንáŒáˆŠá‹áŠ› (የáŽáŠ­áˆ‹áŠ•á‹µ ደሴቶች)", + "en_FM": "እንáŒáˆŠá‹áŠ› (ሚክሮኔዢያ)", + "en_GB": "እንáŒáˆŠá‹áŠ› (እንáŒáˆŠá‹)", + "en_GD": "እንáŒáˆŠá‹áŠ› (áŒáˆ¬áŠ“á‹³)", + "en_GG": "እንáŒáˆŠá‹áŠ› (ጉርáŠáˆ²)", + "en_GH": "እንáŒáˆŠá‹áŠ› (ጋና)", + "en_GI": "እንáŒáˆŠá‹áŠ› (ጂብራáˆá‰°áˆ­)", + "en_GM": "እንáŒáˆŠá‹áŠ› (ጋáˆá‰¢á‹«)", + "en_GU": "እንáŒáˆŠá‹áŠ› (ጉዋáˆ)", + "en_GY": "እንáŒáˆŠá‹áŠ› (ጉያና)", + "en_HK": "እንáŒáˆŠá‹áŠ› (ሆንጠኮንጠáˆá‹© የአስተዳደር ክáˆáˆ ቻይና)", + "en_IE": "እንáŒáˆŠá‹áŠ› (አየርላንድ)", + "en_IL": "እንáŒáˆŠá‹áŠ› (እስራኤáˆ)", + "en_IM": "እንáŒáˆŠá‹áŠ› (አይሠኦá ማን)", + "en_IN": "እንáŒáˆŠá‹áŠ› (ህንድ)", + "en_IO": "እንáŒáˆŠá‹áŠ› (የብሪታኒያ ህንድ á‹á‰‚ያኖስ áŒá‹›á‰µ)", + "en_JE": "እንáŒáˆŠá‹áŠ› (ጀርሲ)", + "en_JM": "እንáŒáˆŠá‹áŠ› (ጃማይካ)", + "en_KE": "እንáŒáˆŠá‹áŠ› (ኬንያ)", + "en_KI": "እንáŒáˆŠá‹áŠ› (ኪሪባቲ)", + "en_KN": "እንáŒáˆŠá‹áŠ› (ቅዱስ ኪትስ እና ኔቪስ)", + "en_KY": "እንáŒáˆŠá‹áŠ› (ካይማን ደሴቶች)", + "en_LC": "እንáŒáˆŠá‹áŠ› (ሴንት ሉቺያ)", + "en_LR": "እንáŒáˆŠá‹áŠ› (ላይቤሪያ)", + "en_LS": "እንáŒáˆŠá‹áŠ› (ሌሶቶ)", + "en_MG": "እንáŒáˆŠá‹áŠ› (ማዳጋስካር)", + "en_MH": "እንáŒáˆŠá‹áŠ› (ማርሻሠአይላንድ)", + "en_MO": "እንáŒáˆŠá‹áŠ› (ማካኡ áˆá‹© የአስተዳደር ክáˆáˆ ቻይና)", + "en_MP": "እንáŒáˆŠá‹áŠ› (የሰሜናዊ ማሪያና ደሴቶች)", + "en_MS": "እንáŒáˆŠá‹áŠ› (ሞንትሴራት)", + "en_MT": "እንáŒáˆŠá‹áŠ› (ማáˆá‰³)", + "en_MU": "እንáŒáˆŠá‹áŠ› (ሞሪሸስ)", + "en_MW": "እንáŒáˆŠá‹áŠ› (ማላዊ)", + "en_MY": "እንáŒáˆŠá‹áŠ› (ማሌዢያ)", + "en_NA": "እንáŒáˆŠá‹áŠ› (ናሚቢያ)", + "en_NF": "እንáŒáˆŠá‹áŠ› (ኖርáŽáˆáŠ­ ደሴት)", + "en_NG": "እንáŒáˆŠá‹áŠ› (ናይጄሪያ)", + "en_NL": "እንáŒáˆŠá‹áŠ› (ኔዘርላንድ)", + "en_NR": "እንáŒáˆŠá‹áŠ› (ናኡሩ)", + "en_NU": "እንáŒáˆŠá‹áŠ› (ኒኡይ)", + "en_NZ": "እንáŒáˆŠá‹áŠ› (ኒዠዚላንድ)", + "en_PG": "እንáŒáˆŠá‹áŠ› (á“á‘á‹‹ ኒዠጊኒ)", + "en_PH": "እንáŒáˆŠá‹áŠ› (áŠáˆŠá’ንስ)", + "en_PK": "እንáŒáˆŠá‹áŠ› (á“ኪስታን)", + "en_PN": "እንáŒáˆŠá‹áŠ› (á’ትካኢርን አይስላንድ)", + "en_PR": "እንáŒáˆŠá‹áŠ› (á–ርታ ሪኮ)", + "en_PW": "እንáŒáˆŠá‹áŠ› (á“ላá‹)", + "en_RW": "እንáŒáˆŠá‹áŠ› (ሩዋንዳ)", + "en_SB": "እንáŒáˆŠá‹áŠ› (ሰሎሞን ደሴት)", + "en_SC": "እንáŒáˆŠá‹áŠ› (ሲሼáˆáˆµ)", + "en_SD": "እንáŒáˆŠá‹áŠ› (ሱዳን)", + "en_SE": "እንáŒáˆŠá‹áŠ› (ስዊድን)", + "en_SG": "እንáŒáˆŠá‹áŠ› (ሲንጋá–ር)", + "en_SH": "እንáŒáˆŠá‹áŠ› (ሴንት ሄለና)", + "en_SI": "እንáŒáˆŠá‹áŠ› (ስሎቬኒያ)", + "en_SL": "እንáŒáˆŠá‹áŠ› (ሴራሊዮን)", + "en_SS": "እንáŒáˆŠá‹áŠ› (ደቡብ ሱዳን)", + "en_SX": "እንáŒáˆŠá‹áŠ› (ሲንት ማርተን)", + "en_SZ": "እንáŒáˆŠá‹áŠ› (ሱዋዚላንድ)", + "en_TC": "እንáŒáˆŠá‹áŠ› (የቱርኮችና የካኢኮስ ደሴቶች)", + "en_TK": "እንáŒáˆŠá‹áŠ› (ቶክላá‹)", + "en_TO": "እንáŒáˆŠá‹áŠ› (ቶንጋ)", + "en_TT": "እንáŒáˆŠá‹áŠ› (ትሪናዳድ እና ቶቤጎ)", + "en_TV": "እንáŒáˆŠá‹áŠ› (ቱቫሉ)", + "en_TZ": "እንáŒáˆŠá‹áŠ› (ታንዛኒያ)", + "en_UG": "እንáŒáˆŠá‹áŠ› (ዩጋንዳ)", + "en_UM": "እንáŒáˆŠá‹áŠ› (የዩ ኤስ ጠረá ላይ ያሉ ደሴቶች)", + "en_US": "እንáŒáˆŠá‹áŠ› (ዩናይትድ ስቴትስ)", + "en_VC": "እንáŒáˆŠá‹áŠ› (ቅዱስ ቪንሴንት እና áŒáˆ¬áŠ“á‹²áŠ•áˆµ)", + "en_VG": "እንáŒáˆŠá‹áŠ› (የእንáŒáˆŠá‹ ቨርጂን ደሴቶች)", + "en_VI": "እንáŒáˆŠá‹áŠ› (የአሜሪካ ቨርጂን ደሴቶች)", + "en_VU": "እንáŒáˆŠá‹áŠ› (ቫኑአቱ)", + "en_WS": "እንáŒáˆŠá‹áŠ› (ሳሞአ)", + "en_ZA": "እንáŒáˆŠá‹áŠ› (ደቡብ አáሪካ)", + "en_ZM": "እንáŒáˆŠá‹áŠ› (á‹›áˆá‰¢á‹«)", + "en_ZW": "እንáŒáˆŠá‹áŠ› (ዚáˆá‰§á‰¤)", + "eo": "ኤስáራንቶ", + "es": "ስá“ንሽኛ", + "es_AR": "ስá“ንሽኛ (አርጀንቲና)", + "es_BO": "ስá“ንሽኛ (ቦሊቪያ)", + "es_BR": "ስá“ንሽኛ (ብራዚáˆ)", + "es_CL": "ስá“ንሽኛ (ቺሊ)", + "es_CO": "ስá“ንሽኛ (ኮሎáˆá‰¢á‹«)", + "es_CR": "ስá“ንሽኛ (ኮስታ ሪካ)", + "es_CU": "ስá“ንሽኛ (ኩባ)", + "es_DO": "ስá“ንሽኛ (ዶሚኒክ ሪá‘ብሊክ)", + "es_EA": "ስá“ንሽኛ (ሴኡታና ሜሊላ)", + "es_EC": "ስá“ንሽኛ (ኢኳዶር)", + "es_ES": "ስá“ንሽኛ (ስá”ን)", + "es_GQ": "ስá“ንሽኛ (ኢኳቶሪያሠጊኒ)", + "es_GT": "ስá“ንሽኛ (ጉዋቲማላ)", + "es_HN": "ስá“ንሽኛ (ሆንዱራስ)", + "es_IC": "ስá“ንሽኛ (የካናሪ ደሴቶች)", + "es_MX": "ስá“ንሽኛ (ሜክሲኮ)", + "es_NI": "ስá“ንሽኛ (ኒካራጓ)", + "es_PA": "ስá“ንሽኛ (á“ናማ)", + "es_PE": "ስá“ንሽኛ (á”ሩ)", + "es_PH": "ስá“ንሽኛ (áŠáˆŠá’ንስ)", + "es_PR": "ስá“ንሽኛ (á–ርታ ሪኮ)", + "es_PY": "ስá“ንሽኛ (á“ራጓይ)", + "es_SV": "ስá“ንሽኛ (ኤሠሳáˆá‰«á‹¶áˆ­)", + "es_US": "ስá“ንሽኛ (ዩናይትድ ስቴትስ)", + "es_UY": "ስá“ንሽኛ (ኡራጓይ)", + "es_VE": "ስá“ንሽኛ (ቬንዙዌላ)", + "et": "ኢስቶኒያንኛ", + "et_EE": "ኢስቶኒያንኛ (ኤስቶኒያ)", + "eu": "ባስክኛ", + "eu_ES": "ባስክኛ (ስá”ን)", + "fa": "áርሺያኛ", + "fa_AF": "áርሺያኛ (አáጋኒስታን)", + "fa_IR": "áርሺያኛ (ኢራን)", + "ff": "á‰áˆ‹áˆ…", + "ff_CM": "á‰áˆ‹áˆ… (ካሜሩን)", + "ff_GN": "á‰áˆ‹áˆ… (ጊኒ)", + "ff_MR": "á‰áˆ‹áˆ… (ሞሪቴኒያ)", + "ff_SN": "á‰áˆ‹áˆ… (ሴኔጋáˆ)", + "fi": "áŠáŠ’áˆ½", + "fi_FI": "áŠáŠ’áˆ½ (áŠáŠ•áˆ‹áŠ•á‹µ)", + "fo": "á‹áˆ®áŠ›", + "fo_DK": "á‹áˆ®áŠ› (ዴንማርክ)", + "fo_FO": "á‹áˆ®áŠ› (የá‹áˆ® ደሴቶች)", + "fr": "áˆáˆ¨áŠ•áˆ³á‹­áŠ›", + "fr_BE": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ቤáˆáŒ„áˆ)", + "fr_BF": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ቡርኪና á‹áˆ¶)", + "fr_BI": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ብሩንዲ)", + "fr_BJ": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ቤኒን)", + "fr_BL": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ቅዱስ በርቴሎሜ)", + "fr_CA": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ካናዳ)", + "fr_CD": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ኮንጎ-ኪንሻሳ)", + "fr_CF": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (የመካከለኛዠአáሪካ ሪáብሊክ)", + "fr_CG": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ኮንጎ ብራዛቪáˆ)", + "fr_CH": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ስዊዘርላንድ)", + "fr_CI": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ኮት ዲቯር)", + "fr_CM": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ካሜሩን)", + "fr_DJ": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ጂቡቲ)", + "fr_DZ": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (አáˆáŒ„ሪያ)", + "fr_FR": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (áˆáˆ¨áŠ•áˆ³á‹­)", + "fr_GA": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ጋቦን)", + "fr_GF": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (የáˆáˆ¨áŠ•áˆ³á‹­ ጉዊአና)", + "fr_GN": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ጊኒ)", + "fr_GP": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ጉዋደሉá•)", + "fr_GQ": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ኢኳቶሪያሠጊኒ)", + "fr_HT": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሀይቲ)", + "fr_KM": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ኮሞሮስ)", + "fr_LU": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሉክሰáˆá‰ áˆ­áŒ)", + "fr_MA": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሞሮኮ)", + "fr_MC": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሞናኮ)", + "fr_MF": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሴንት ማርቲን)", + "fr_MG": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ማዳጋስካር)", + "fr_ML": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ማሊ)", + "fr_MQ": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ማርቲኒክ)", + "fr_MR": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሞሪቴኒያ)", + "fr_MU": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሞሪሸስ)", + "fr_NC": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ኒዠካሌዶኒያ)", + "fr_NE": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ኒጀር)", + "fr_PF": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (የáˆáˆ¨áŠ•áˆ³á‹­ á–ሊኔዢያ)", + "fr_PM": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ቅዱስ á’ዬር እና ሚኩኤሎን)", + "fr_RE": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሪዩኒየን)", + "fr_RW": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሩዋንዳ)", + "fr_SC": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሲሼáˆáˆµ)", + "fr_SN": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሴኔጋáˆ)", + "fr_SY": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሲሪያ)", + "fr_TD": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ቻድ)", + "fr_TG": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ቶáŒ)", + "fr_TN": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ቱኒዚያ)", + "fr_VU": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ቫኑአቱ)", + "fr_WF": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ዋሊስ እና á‰á‰±áŠ“ ደሴቶች)", + "fr_YT": "áˆáˆ¨áŠ•áˆ³á‹­áŠ› (ሜይኦቴ)", + "fy": "የáˆá‹•ራብ áሪስኛ", + "fy_NL": "የáˆá‹•ራብ áሪስኛ (ኔዘርላንድ)", + "ga": "አይሪሽ", + "ga_IE": "አይሪሽ (አየርላንድ)", + "gd": "የስኮቲሽ ጌáˆáŠ­áŠ›", + "gd_GB": "የስኮቲሽ ጌáˆáŠ­áŠ› (እንáŒáˆŠá‹)", + "gl": "ጋሊሺያ", + "gl_ES": "ጋሊሺያ (ስá”ን)", + "gu": "ጉጃርቲኛ", + "gu_IN": "ጉጃርቲኛ (ህንድ)", + "gv": "ማንክስኛ", + "gv_IM": "ማንክስኛ (አይሠኦá ማን)", + "ha": "ሃá‹áˆ³áŠ›", + "ha_GH": "ሃá‹áˆ³áŠ› (ጋና)", + "ha_NE": "ሃá‹áˆ³áŠ› (ኒጀር)", + "ha_NG": "ሃá‹áˆ³áŠ› (ናይጄሪያ)", + "he": "ዕብራስጥ", + "he_IL": "ዕብራስጥ (እስራኤáˆ)", + "hi": "ሒንዱኛ", + "hi_IN": "ሒንዱኛ (ህንድ)", + "hr": "ክሮሽያንኛ", + "hr_BA": "ክሮሽያንኛ (ቦስኒያ እና ሄርዞጎቪኒያ)", + "hr_HR": "ክሮሽያንኛ (ክሮኤሽያ)", + "hu": "ሀንጋሪኛ", + "hu_HU": "ሀንጋሪኛ (ሀንጋሪ)", + "hy": "አርመናዊ", + "hy_AM": "አርመናዊ (አርሜኒያ)", + "id": "ኢንዶኔዥኛ", + "id_ID": "ኢንዶኔዥኛ (ኢንዶኔዢያ)", + "ig": "ኢáŒá‰¦áŠ›", + "ig_NG": "ኢáŒá‰¦áŠ› (ናይጄሪያ)", + "ii": "ሲቹንዪኛ", + "ii_CN": "ሲቹንዪኛ (ቻይና)", + "is": "አይስላንድኛ", + "is_IS": "አይስላንድኛ (አይስላንድ)", + "it": "ጣሊያንኛ", + "it_CH": "ጣሊያንኛ (ስዊዘርላንድ)", + "it_IT": "ጣሊያንኛ (ጣሊያን)", + "it_SM": "ጣሊያንኛ (ሳን ማሪኖ)", + "ja": "ጃá“ንኛ", + "ja_JP": "ጃá“ንኛ (ጃá“ን)", + "ka": "ጆርጂያን", + "ka_GE": "ጆርጂያን (ጆርጂያ)", + "ki": "ኪኩዩ", + "ki_KE": "ኪኩዩ (ኬንያ)", + "kk": "ካዛክኛ", + "kk_KZ": "ካዛክኛ (ካዛኪስታን)", + "kl": "ካላሊሱትኛ", + "kl_GL": "ካላሊሱትኛ (áŒáˆªáŠ•áˆ‹áŠ•á‹µ)", + "km": "ክህመርኛ", + "km_KH": "ክህመርኛ (ካáˆá‰¦á‹²á‹«)", + "kn": "ካናዳኛ", + "kn_IN": "ካናዳኛ (ህንድ)", + "ko": "ኮሪያኛ", + "ko_KP": "ኮሪያኛ (ሰሜን ኮሪያ)", + "ko_KR": "ኮሪያኛ (ደቡብ ኮሪያ)", + "ks": "ካሽሚርኛ", + "ks_IN": "ካሽሚርኛ (ህንድ)", + "kw": "ኮርኒሽ", + "kw_GB": "ኮርኒሽ (እንáŒáˆŠá‹)", + "ky": "ኪርጊá‹áŠ›", + "ky_KG": "ኪርጊá‹áŠ› (ኪርጊስታን)", + "lb": "ሉክዘáˆá‰ áˆ­áŒˆáˆ­áŠ›", + "lb_LU": "ሉክዘáˆá‰ áˆ­áŒˆáˆ­áŠ› (ሉክሰáˆá‰ áˆ­áŒ)", + "lg": "ጋንዳኛ", + "lg_UG": "ጋንዳኛ (ዩጋንዳ)", + "ln": "ሊንጋላኛ", + "ln_AO": "ሊንጋላኛ (አንáŒáˆ‹)", + "ln_CD": "ሊንጋላኛ (ኮንጎ-ኪንሻሳ)", + "ln_CF": "ሊንጋላኛ (የመካከለኛዠአáሪካ ሪáብሊክ)", + "ln_CG": "ሊንጋላኛ (ኮንጎ ብራዛቪáˆ)", + "lo": "ላኦስኛ", + "lo_LA": "ላኦስኛ (ላኦስ)", + "lt": "ሉቴንያንኛ", + "lt_LT": "ሉቴንያንኛ (ሊቱዌኒያ)", + "lu": "ሉባ ካታንጋ", + "lu_CD": "ሉባ ካታንጋ (ኮንጎ-ኪንሻሳ)", + "lv": "ላትቪያን", + "lv_LV": "ላትቪያን (ላትቪያ)", + "mg": "ማላጋስኛ", + "mg_MG": "ማላጋስኛ (ማዳጋስካር)", + "mk": "ማሴዶንኛ", + "mk_MK": "ማሴዶንኛ (መቄዶንያ)", + "ml": "ማላያላáˆáŠ›", + "ml_IN": "ማላያላáˆáŠ› (ህንድ)", + "mn": "ሞንጎላዊኛ", + "mn_MN": "ሞንጎላዊኛ (ሞንጎሊያ)", + "mr": "ማራቲኛ", + "mr_IN": "ማራቲኛ (ህንድ)", + "ms": "ማላይኛ", + "ms_BN": "ማላይኛ (ብሩኒ)", + "ms_MY": "ማላይኛ (ማሌዢያ)", + "ms_SG": "ማላይኛ (ሲንጋá–ር)", + "mt": "ማáˆá‰²áˆµáŠ›", + "mt_MT": "ማáˆá‰²áˆµáŠ› (ማáˆá‰³)", + "my": "ቡርማኛ", + "my_MM": "ቡርማኛ (ማይናማር(በርማ))", + "nb": "የኖርዌይ ቦክማáˆ", + "nb_NO": "የኖርዌይ ቦክማሠ(ኖርዌይ)", + "nb_SJ": "የኖርዌይ ቦክማሠ(ስቫáˆá‰£áˆ­á‹µ እና ጃን ማየን)", + "nd": "ሰሜን ንዴብሌ", + "nd_ZW": "ሰሜን ንዴብሌ (ዚáˆá‰§á‰¤)", + "ne": "ኔá“ሊኛ", + "ne_IN": "ኔá“ሊኛ (ህንድ)", + "ne_NP": "ኔá“ሊኛ (ኔá“áˆ)", + "nl": "ደች", + "nl_AW": "ደች (አሩባ)", + "nl_BE": "ደች (ቤáˆáŒ„áˆ)", + "nl_BQ": "ደች (የካሪቢያን ኔዘርላንድስ)", + "nl_CW": "ደች (ኩራሳዎ)", + "nl_NL": "ደች (ኔዘርላንድ)", + "nl_SR": "ደች (ሱሪናáˆ)", + "nl_SX": "ደች (ሲንት ማርተን)", + "nn": "የኖርዌይ ናይኖርስክ", + "nn_NO": "የኖርዌይ ናይኖርስክ (ኖርዌይ)", + "no": "ኖርዌጂያን", + "no_NO": "ኖርዌጂያን (ኖርዌይ)", + "om": "ኦሮሞኛ", + "om_ET": "ኦሮሞኛ (ኢትዮጵያ)", + "om_KE": "ኦሮሞኛ (ኬንያ)", + "or": "ኦዲያኛ", + "or_IN": "ኦዲያኛ (ህንድ)", + "os": "ኦሴቲክ", + "os_GE": "ኦሴቲክ (ጆርጂያ)", + "os_RU": "ኦሴቲክ (ራሽያ)", + "pa": "á‘ንጃብኛ", + "pa_Arab": "á‘ንጃብኛ (ዓረብኛ)", + "pa_Arab_PK": "á‘ንጃብኛ (ዓረብኛ, á“ኪስታን)", + "pa_Guru": "á‘ንጃብኛ (ጉርሙኪ)", + "pa_Guru_IN": "á‘ንጃብኛ (ጉርሙኪ, ህንድ)", + "pa_IN": "á‘ንጃብኛ (ህንድ)", + "pa_PK": "á‘ንጃብኛ (á“ኪስታን)", + "pl": "á–ሊሽኛ", + "pl_PL": "á–ሊሽኛ (á–ላንድ)", + "ps": "á“ሽቶኛ", + "ps_AF": "á“ሽቶኛ (አáጋኒስታን)", + "pt": "á–ርቹጋáˆáŠ›", + "pt_AO": "á–ርቹጋáˆáŠ› (አንáŒáˆ‹)", + "pt_BR": "á–ርቹጋáˆáŠ› (ብራዚáˆ)", + "pt_CH": "á–ርቹጋáˆáŠ› (ስዊዘርላንድ)", + "pt_CV": "á–ርቹጋáˆáŠ› (ኬᕠቬርዴ)", + "pt_GQ": "á–ርቹጋáˆáŠ› (ኢኳቶሪያሠጊኒ)", + "pt_GW": "á–ርቹጋáˆáŠ› (ጊኒ ቢሳኦ)", + "pt_LU": "á–ርቹጋáˆáŠ› (ሉክሰáˆá‰ áˆ­áŒ)", + "pt_MO": "á–ርቹጋáˆáŠ› (ማካኡ áˆá‹© የአስተዳደር ክáˆáˆ ቻይና)", + "pt_MZ": "á–ርቹጋáˆáŠ› (ሞዛáˆá‰¢áŠ­)", + "pt_PT": "á–ርቹጋáˆáŠ› (á–ርቱጋáˆ)", + "pt_ST": "á–ርቹጋáˆáŠ› (ሳኦ ቶሜ እና á•ሪንሲá”)", + "pt_TL": "á–ርቹጋáˆáŠ› (áˆáˆµáˆ«á‰… ሌስት)", + "qu": "ኵቿኛ", + "qu_BO": "ኵቿኛ (ቦሊቪያ)", + "qu_EC": "ኵቿኛ (ኢኳዶር)", + "qu_PE": "ኵቿኛ (á”ሩ)", + "rm": "ሮማንሽ", + "rm_CH": "ሮማንሽ (ስዊዘርላንድ)", + "rn": "ሩንዲኛ", + "rn_BI": "ሩንዲኛ (ብሩንዲ)", + "ro": "ሮማኒያን", + "ro_MD": "ሮማኒያን (ሞáˆá‹¶á‰«)", + "ro_RO": "ሮማኒያን (ሮሜኒያ)", + "ru": "ራሽያኛ", + "ru_BY": "ራሽያኛ (ቤላሩስ)", + "ru_KG": "ራሽያኛ (ኪርጊስታን)", + "ru_KZ": "ራሽያኛ (ካዛኪስታን)", + "ru_MD": "ራሽያኛ (ሞáˆá‹¶á‰«)", + "ru_RU": "ራሽያኛ (ራሽያ)", + "ru_UA": "ራሽያኛ (ዩክሬን)", + "rw": "ኪንያርዋንድኛ", + "rw_RW": "ኪንያርዋንድኛ (ሩዋንዳ)", + "se": "ሰሜናዊ ሳሚ", + "se_FI": "ሰሜናዊ ሳሚ (áŠáŠ•áˆ‹áŠ•á‹µ)", + "se_NO": "ሰሜናዊ ሳሚ (ኖርዌይ)", + "se_SE": "ሰሜናዊ ሳሚ (ስዊድን)", + "sg": "ሳንጎኛ", + "sg_CF": "ሳንጎኛ (የመካከለኛዠአáሪካ ሪáብሊክ)", + "sh": "ሰርቦ-ክሮኤሽያኛ", + "sh_BA": "ሰርቦ-ክሮኤሽያኛ (ቦስኒያ እና ሄርዞጎቪኒያ)", + "si": "ሲንሃáˆáŠ›", + "si_LK": "ሲንሃáˆáŠ› (ሲሪላንካ)", + "sk": "ስሎቫክኛ", + "sk_SK": "ስሎቫክኛ (ስሎቫኪያ)", + "sl": "ስሎቪኛ", + "sl_SI": "ስሎቪኛ (ስሎቬኒያ)", + "sn": "ሾናኛ", + "sn_ZW": "ሾናኛ (ዚáˆá‰§á‰¤)", + "so": "ሱማáˆáŠ›", + "so_DJ": "ሱማáˆáŠ› (ጂቡቲ)", + "so_ET": "ሱማáˆáŠ› (ኢትዮጵያ)", + "so_KE": "ሱማáˆáŠ› (ኬንያ)", + "so_SO": "ሱማáˆáŠ› (ሱማሌ)", + "sq": "አáˆá‰£áŠ•á‹«áŠ•áŠ›", + "sq_AL": "አáˆá‰£áŠ•á‹«áŠ•áŠ› (አáˆá‰£áŠ’á‹«)", + "sq_MK": "አáˆá‰£áŠ•á‹«áŠ•áŠ› (መቄዶንያ)", + "sq_XK": "አáˆá‰£áŠ•á‹«áŠ•áŠ› (ኮሶቮ)", + "sr": "ሰርቢኛ", + "sr_BA": "ሰርቢኛ (ቦስኒያ እና ሄርዞጎቪኒያ)", + "sr_Cyrl": "ሰርቢኛ (ሲይሪáˆáŠ­)", + "sr_Cyrl_BA": "ሰርቢኛ (ሲይሪáˆáŠ­, ቦስኒያ እና ሄርዞጎቪኒያ)", + "sr_Cyrl_ME": "ሰርቢኛ (ሲይሪáˆáŠ­, ሞንተኔáŒáˆ®)", + "sr_Cyrl_RS": "ሰርቢኛ (ሲይሪáˆáŠ­, ሰርብያ)", + "sr_Cyrl_XK": "ሰርቢኛ (ሲይሪáˆáŠ­, ኮሶቮ)", + "sr_Latn": "ሰርቢኛ (ላቲን)", + "sr_Latn_BA": "ሰርቢኛ (ላቲን, ቦስኒያ እና ሄርዞጎቪኒያ)", + "sr_Latn_ME": "ሰርቢኛ (ላቲን, ሞንተኔáŒáˆ®)", + "sr_Latn_RS": "ሰርቢኛ (ላቲን, ሰርብያ)", + "sr_Latn_XK": "ሰርቢኛ (ላቲን, ኮሶቮ)", + "sr_ME": "ሰርቢኛ (ሞንተኔáŒáˆ®)", + "sr_RS": "ሰርቢኛ (ሰርብያ)", + "sr_XK": "ሰርቢኛ (ኮሶቮ)", + "sv": "ስዊድንኛ", + "sv_AX": "ስዊድንኛ (የአላንድ ደሴቶች)", + "sv_FI": "ስዊድንኛ (áŠáŠ•áˆ‹áŠ•á‹µ)", + "sv_SE": "ስዊድንኛ (ስዊድን)", + "sw": "ስዋሂሊኛ", + "sw_CD": "ስዋሂሊኛ (ኮንጎ-ኪንሻሳ)", + "sw_KE": "ስዋሂሊኛ (ኬንያ)", + "sw_TZ": "ስዋሂሊኛ (ታንዛኒያ)", + "sw_UG": "ስዋሂሊኛ (ዩጋንዳ)", + "ta": "ታሚáˆáŠ›", + "ta_IN": "ታሚáˆáŠ› (ህንድ)", + "ta_LK": "ታሚáˆáŠ› (ሲሪላንካ)", + "ta_MY": "ታሚáˆáŠ› (ማሌዢያ)", + "ta_SG": "ታሚáˆáŠ› (ሲንጋá–ር)", + "te": "ተሉጉኛ", + "te_IN": "ተሉጉኛ (ህንድ)", + "th": "ታይኛ", + "th_TH": "ታይኛ (ታይላንድ)", + "ti": "ትáŒáˆ­áŠ›", + "ti_ER": "ትáŒáˆ­áŠ› (ኤርትራ)", + "ti_ET": "ትáŒáˆ­áŠ› (ኢትዮጵያ)", + "tl": "ታጋሎገኛ", + "tl_PH": "ታጋሎገኛ (áŠáˆŠá’ንስ)", + "to": "ቶንጋኛ", + "to_TO": "ቶንጋኛ (ቶንጋ)", + "tr": "ቱርክኛ", + "tr_CY": "ቱርክኛ (ሳይá•ረስ)", + "tr_TR": "ቱርክኛ (ቱርክ)", + "ug": "ኡዊáŒáˆáˆ­áŠ›", + "ug_CN": "ኡዊáŒáˆáˆ­áŠ› (ቻይና)", + "uk": "ዩክሬንኛ", + "uk_UA": "ዩክሬንኛ (ዩክሬን)", + "ur": "ኡርዱኛ", + "ur_IN": "ኡርዱኛ (ህንድ)", + "ur_PK": "ኡርዱኛ (á“ኪስታን)", + "uz": "ኡá‹á‰¤áŠ­áŠ›", + "uz_AF": "ኡá‹á‰¤áŠ­áŠ› (አáጋኒስታን)", + "uz_Arab": "ኡá‹á‰¤áŠ­áŠ› (ዓረብኛ)", + "uz_Arab_AF": "ኡá‹á‰¤áŠ­áŠ› (ዓረብኛ, አáጋኒስታን)", + "uz_Cyrl": "ኡá‹á‰¤áŠ­áŠ› (ሲይሪáˆáŠ­)", + "uz_Cyrl_UZ": "ኡá‹á‰¤áŠ­áŠ› (ሲይሪáˆáŠ­, ኡá‹á‰¤áŠªáˆµá‰³áŠ•)", + "uz_Latn": "ኡá‹á‰¤áŠ­áŠ› (ላቲን)", + "uz_Latn_UZ": "ኡá‹á‰¤áŠ­áŠ› (ላቲን, ኡá‹á‰¤áŠªáˆµá‰³áŠ•)", + "uz_UZ": "ኡá‹á‰¤áŠ­áŠ› (ኡá‹á‰¤áŠªáˆµá‰³áŠ•)", + "vi": "ቪየትናáˆáŠ›", + "vi_VN": "ቪየትናáˆáŠ› (ቬትናáˆ)", + "yi": "ይዲሽኛ", + "yo": "ዮሩባዊኛ", + "yo_BJ": "ዮሩባዊኛ (ቤኒን)", + "yo_NG": "ዮሩባዊኛ (ናይጄሪያ)", + "zh": "ቻይንኛ", + "zh_CN": "ቻይንኛ (ቻይና)", + "zh_HK": "ቻይንኛ (ሆንጠኮንጠáˆá‹© የአስተዳደር ክáˆáˆ ቻይና)", + "zh_Hans": "ቻይንኛ (ቀለሠያለ)", + "zh_Hans_CN": "ቻይንኛ (ቀለሠያለ, ቻይና)", + "zh_Hans_HK": "ቻይንኛ (ቀለሠያለ, ሆንጠኮንጠáˆá‹© የአስተዳደር ክáˆáˆ ቻይና)", + "zh_Hans_MO": "ቻይንኛ (ቀለሠያለ, ማካኡ áˆá‹© የአስተዳደር ክáˆáˆ ቻይና)", + "zh_Hans_SG": "ቻይንኛ (ቀለሠያለ, ሲንጋá–ር)", + "zh_Hant": "ቻይንኛ (ባህላዊ)", + "zh_Hant_HK": "ቻይንኛ (ባህላዊ, ሆንጠኮንጠáˆá‹© የአስተዳደር ክáˆáˆ ቻይና)", + "zh_Hant_MO": "ቻይንኛ (ባህላዊ, ማካኡ áˆá‹© የአስተዳደር ክáˆáˆ ቻይና)", + "zh_Hant_TW": "ቻይንኛ (ባህላዊ, ታይዋን)", + "zh_MO": "ቻይንኛ (ማካኡ áˆá‹© የአስተዳደር ክáˆáˆ ቻይና)", + "zh_SG": "ቻይንኛ (ሲንጋá–ር)", + "zh_TW": "ቻይንኛ (ታይዋን)", + "zu": "ዙሉኛ", + "zu_ZA": "ዙሉኛ (ደቡብ አáሪካ)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ar.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ar.json new file mode 100644 index 0000000000000000000000000000000000000000..7776b8c547f191adf7b006dfe063463ef17013f8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ar.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Ø§Ù„Ø£ÙØ±ÙŠÙ‚انية", + "af_NA": "Ø§Ù„Ø£ÙØ±ÙŠÙ‚انية (ناميبيا)", + "af_ZA": "Ø§Ù„Ø£ÙØ±ÙŠÙ‚انية (جنوب Ø£ÙØ±ÙŠÙ‚يا)", + "ak": "الأكانية", + "ak_GH": "الأكانية (غانا)", + "am": "الأمهرية", + "am_ET": "الأمهرية (إثيوبيا)", + "ar": "العربية", + "ar_AE": "العربية (الإمارات العربية المتحدة)", + "ar_BH": "العربية (البحرين)", + "ar_DJ": "العربية (جيبوتي)", + "ar_DZ": "العربية (الجزائر)", + "ar_EG": "العربية (مصر)", + "ar_EH": "العربية (الصحراء الغربية)", + "ar_ER": "العربية (إريتريا)", + "ar_IL": "العربية (إسرائيل)", + "ar_IQ": "العربية (العراق)", + "ar_JO": "العربية (الأردن)", + "ar_KM": "العربية (جزر القمر)", + "ar_KW": "العربية (الكويت)", + "ar_LB": "العربية (لبنان)", + "ar_LY": "العربية (ليبيا)", + "ar_MA": "العربية (المغرب)", + "ar_MR": "العربية (موريتانيا)", + "ar_OM": "العربية (عÙمان)", + "ar_PS": "العربية (الأراضي الÙلسطينية)", + "ar_QA": "العربية (قطر)", + "ar_SA": "العربية (المملكة العربية السعودية)", + "ar_SD": "العربية (السودان)", + "ar_SO": "العربية (الصومال)", + "ar_SS": "العربية (جنوب السودان)", + "ar_SY": "العربية (سوريا)", + "ar_TD": "العربية (تشاد)", + "ar_TN": "العربية (تونس)", + "ar_YE": "العربية (اليمن)", + "as": "الأسامية", + "as_IN": "الأسامية (الهند)", + "az": "الأذربيجانية", + "az_AZ": "الأذربيجانية (أذربيجان)", + "az_Cyrl": "الأذربيجانية (السيريلية)", + "az_Cyrl_AZ": "الأذربيجانية (السيريلية, أذربيجان)", + "az_Latn": "الأذربيجانية (اللاتينية)", + "az_Latn_AZ": "الأذربيجانية (اللاتينية, أذربيجان)", + "be": "البيلاروسية", + "be_BY": "البيلاروسية (بيلاروس)", + "bg": "البلغارية", + "bg_BG": "البلغارية (بلغاريا)", + "bm": "البامبارا", + "bm_ML": "البامبارا (مالي)", + "bn": "البنغالية", + "bn_BD": "البنغالية (بنغلاديش)", + "bn_IN": "البنغالية (الهند)", + "bo": "التبتية", + "bo_CN": "التبتية (الصين)", + "bo_IN": "التبتية (الهند)", + "br": "البريتونية", + "br_FR": "البريتونية (ÙØ±Ù†Ø³Ø§)", + "bs": "البوسنية", + "bs_BA": "البوسنية (البوسنة والهرسك)", + "bs_Cyrl": "البوسنية (السيريلية)", + "bs_Cyrl_BA": "البوسنية (السيريلية, البوسنة والهرسك)", + "bs_Latn": "البوسنية (اللاتينية)", + "bs_Latn_BA": "البوسنية (اللاتينية, البوسنة والهرسك)", + "ca": "الكتالانية", + "ca_AD": "الكتالانية (أندورا)", + "ca_ES": "الكتالانية (إسبانيا)", + "ca_FR": "الكتالانية (ÙØ±Ù†Ø³Ø§)", + "ca_IT": "الكتالانية (إيطاليا)", + "ce": "الشيشانية", + "ce_RU": "الشيشانية (روسيا)", + "cs": "التشيكية", + "cs_CZ": "التشيكية (جمهورية التشيك)", + "cy": "الويلزية", + "cy_GB": "الويلزية (المملكة المتحدة)", + "da": "الدانماركية", + "da_DK": "الدانماركية (الدانمرك)", + "da_GL": "الدانماركية (غرينلاند)", + "de": "الألمانية", + "de_AT": "الألمانية (النمسا)", + "de_BE": "الألمانية (بلجيكا)", + "de_CH": "الألمانية (سويسرا)", + "de_DE": "الألمانية (ألمانيا)", + "de_IT": "الألمانية (إيطاليا)", + "de_LI": "الألمانية (ليختنشتاين)", + "de_LU": "الألمانية (لوكسمبورغ)", + "dz": "الزونخاية", + "dz_BT": "الزونخاية (بوتان)", + "ee": "الإيوي", + "ee_GH": "الإيوي (غانا)", + "ee_TG": "الإيوي (توغو)", + "el": "اليونانية", + "el_CY": "اليونانية (قبرص)", + "el_GR": "اليونانية (اليونان)", + "en": "الإنجليزية", + "en_AG": "الإنجليزية (أنتيغوا وبربودا)", + "en_AI": "الإنجليزية (أنغويلا)", + "en_AS": "الإنجليزية (ساموا الأمريكية)", + "en_AT": "الإنجليزية (النمسا)", + "en_AU": "الإنجليزية (أستراليا)", + "en_BB": "الإنجليزية (بربادوس)", + "en_BE": "الإنجليزية (بلجيكا)", + "en_BI": "الإنجليزية (بوروندي)", + "en_BM": "الإنجليزية (برمودا)", + "en_BS": "الإنجليزية (البهاما)", + "en_BW": "الإنجليزية (بتسوانا)", + "en_BZ": "الإنجليزية (بليز)", + "en_CA": "الإنجليزية (كندا)", + "en_CC": "الإنجليزية (جزر كوكوس (كيلينغ))", + "en_CH": "الإنجليزية (سويسرا)", + "en_CK": "الإنجليزية (جزر كوك)", + "en_CM": "الإنجليزية (الكاميرون)", + "en_CX": "الإنجليزية (جزيرة الكريسماس)", + "en_CY": "الإنجليزية (قبرص)", + "en_DE": "الإنجليزية (ألمانيا)", + "en_DG": "الإنجليزية (دييغو غارسيا)", + "en_DK": "الإنجليزية (الدانمرك)", + "en_DM": "الإنجليزية (دومينيكا)", + "en_ER": "الإنجليزية (إريتريا)", + "en_FI": "الإنجليزية (Ùنلندا)", + "en_FJ": "الإنجليزية (Ùيجي)", + "en_FK": "الإنجليزية (جزر Ùوكلاند)", + "en_FM": "الإنجليزية (ميكرونيزيا)", + "en_GB": "الإنجليزية (المملكة المتحدة)", + "en_GD": "الإنجليزية (غرينادا)", + "en_GG": "الإنجليزية (غيرنزي)", + "en_GH": "الإنجليزية (غانا)", + "en_GI": "الإنجليزية (جبل طارق)", + "en_GM": "الإنجليزية (غامبيا)", + "en_GU": "الإنجليزية (غوام)", + "en_GY": "الإنجليزية (غيانا)", + "en_HK": "الإنجليزية (هونغ كونغ الصينية)", + "en_IE": "الإنجليزية (أيرلندا)", + "en_IL": "الإنجليزية (إسرائيل)", + "en_IM": "الإنجليزية (جزيرة مان)", + "en_IN": "الإنجليزية (الهند)", + "en_IO": "الإنجليزية (الإقليم البريطاني ÙÙŠ المحيط الهندي)", + "en_JE": "الإنجليزية (جيرسي)", + "en_JM": "الإنجليزية (جامايكا)", + "en_KE": "الإنجليزية (كينيا)", + "en_KI": "الإنجليزية (كيريباتي)", + "en_KN": "الإنجليزية (سانت كيتس ونيÙيس)", + "en_KY": "الإنجليزية (جزر كايمان)", + "en_LC": "الإنجليزية (سانت لوسيا)", + "en_LR": "الإنجليزية (ليبيريا)", + "en_LS": "الإنجليزية (ليسوتو)", + "en_MG": "الإنجليزية (مدغشقر)", + "en_MH": "الإنجليزية (جزر مارشال)", + "en_MO": "الإنجليزية (مكاو الصينية (منطقة إدارية خاصة))", + "en_MP": "الإنجليزية (جزر ماريانا الشمالية)", + "en_MS": "الإنجليزية (مونتسرات)", + "en_MT": "الإنجليزية (مالطا)", + "en_MU": "الإنجليزية (موريشيوس)", + "en_MW": "الإنجليزية (ملاوي)", + "en_MY": "الإنجليزية (ماليزيا)", + "en_NA": "الإنجليزية (ناميبيا)", + "en_NF": "الإنجليزية (جزيرة نورÙولك)", + "en_NG": "الإنجليزية (نيجيريا)", + "en_NL": "الإنجليزية (هولندا)", + "en_NR": "الإنجليزية (ناورو)", + "en_NU": "الإنجليزية (نيوي)", + "en_NZ": "الإنجليزية (نيوزيلندا)", + "en_PG": "الإنجليزية (بابوا غينيا الجديدة)", + "en_PH": "الإنجليزية (الÙلبين)", + "en_PK": "الإنجليزية (باكستان)", + "en_PN": "الإنجليزية (جزر بيتكيرن)", + "en_PR": "الإنجليزية (بورتوريكو)", + "en_PW": "الإنجليزية (بالاو)", + "en_RW": "الإنجليزية (رواندا)", + "en_SB": "الإنجليزية (جزر سليمان)", + "en_SC": "الإنجليزية (سيشل)", + "en_SD": "الإنجليزية (السودان)", + "en_SE": "الإنجليزية (السويد)", + "en_SG": "الإنجليزية (سنغاÙورة)", + "en_SH": "الإنجليزية (سانت هيلانة)", + "en_SI": "الإنجليزية (سلوÙينيا)", + "en_SL": "الإنجليزية (سيراليون)", + "en_SS": "الإنجليزية (جنوب السودان)", + "en_SX": "الإنجليزية (سينت مارتن)", + "en_SZ": "الإنجليزية (سوازيلاند)", + "en_TC": "الإنجليزية (جزر توركس وكايكوس)", + "en_TK": "الإنجليزية (توكيلو)", + "en_TO": "الإنجليزية (تونغا)", + "en_TT": "الإنجليزية (ترينيداد وتوباغو)", + "en_TV": "الإنجليزية (ØªÙˆÙØ§Ù„Ùˆ)", + "en_TZ": "الإنجليزية (تنزانيا)", + "en_UG": "الإنجليزية (أوغندا)", + "en_UM": "الإنجليزية (جزر الولايات المتحدة النائية)", + "en_US": "الإنجليزية (الولايات المتحدة)", + "en_VC": "الإنجليزية (سانت Ùنسنت وجزر غرينادين)", + "en_VG": "الإنجليزية (جزر Ùيرجن البريطانية)", + "en_VI": "الإنجليزية (جزر Ùيرجن التابعة للولايات المتحدة)", + "en_VU": "الإنجليزية (ÙØ§Ù†ÙˆØ§ØªÙˆ)", + "en_WS": "الإنجليزية (ساموا)", + "en_ZA": "الإنجليزية (جنوب Ø£ÙØ±ÙŠÙ‚يا)", + "en_ZM": "الإنجليزية (زامبيا)", + "en_ZW": "الإنجليزية (زيمبابوي)", + "eo": "الإسبرانتو", + "es": "الإسبانية", + "es_AR": "الإسبانية (الأرجنتين)", + "es_BO": "الإسبانية (بوليÙيا)", + "es_BR": "الإسبانية (البرازيل)", + "es_CL": "الإسبانية (تشيلي)", + "es_CO": "الإسبانية (كولومبيا)", + "es_CR": "الإسبانية (كوستاريكا)", + "es_CU": "الإسبانية (كوبا)", + "es_DO": "الإسبانية (جمهورية الدومينيكان)", + "es_EA": "الإسبانية (سيوتا وميليلا)", + "es_EC": "الإسبانية (الإكوادور)", + "es_ES": "الإسبانية (إسبانيا)", + "es_GQ": "الإسبانية (غينيا الاستوائية)", + "es_GT": "الإسبانية (غواتيمالا)", + "es_HN": "الإسبانية (هندوراس)", + "es_IC": "الإسبانية (جزر الكناري)", + "es_MX": "الإسبانية (المكسيك)", + "es_NI": "الإسبانية (نيكاراغوا)", + "es_PA": "الإسبانية (بنما)", + "es_PE": "الإسبانية (بيرو)", + "es_PH": "الإسبانية (الÙلبين)", + "es_PR": "الإسبانية (بورتوريكو)", + "es_PY": "الإسبانية (باراغواي)", + "es_SV": "الإسبانية (Ø§Ù„Ø³Ù„ÙØ§Ø¯ÙˆØ±)", + "es_US": "الإسبانية (الولايات المتحدة)", + "es_UY": "الإسبانية (أورغواي)", + "es_VE": "الإسبانية (Ùنزويلا)", + "et": "الإستونية", + "et_EE": "الإستونية (إستونيا)", + "eu": "لغة الباسك", + "eu_ES": "لغة الباسك (إسبانيا)", + "fa": "Ø§Ù„ÙØ§Ø±Ø³ÙŠØ©", + "fa_AF": "Ø§Ù„ÙØ§Ø±Ø³ÙŠØ© (Ø£ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "fa_IR": "Ø§Ù„ÙØ§Ø±Ø³ÙŠØ© (إيران)", + "ff": "الÙولانية", + "ff_CM": "الÙولانية (الكاميرون)", + "ff_GN": "الÙولانية (غينيا)", + "ff_MR": "الÙولانية (موريتانيا)", + "ff_SN": "الÙولانية (السنغال)", + "fi": "الÙنلندية", + "fi_FI": "الÙنلندية (Ùنلندا)", + "fo": "Ø§Ù„ÙØ§Ø±ÙˆÙŠØ©", + "fo_DK": "Ø§Ù„ÙØ§Ø±ÙˆÙŠØ© (الدانمرك)", + "fo_FO": "Ø§Ù„ÙØ§Ø±ÙˆÙŠØ© (جزر ÙØ§Ø±Ùˆ)", + "fr": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ©", + "fr_BE": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (بلجيكا)", + "fr_BF": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (بوركينا ÙØ§Ø³Ùˆ)", + "fr_BI": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (بوروندي)", + "fr_BJ": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (بنين)", + "fr_BL": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (سان بارتليمي)", + "fr_CA": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (كندا)", + "fr_CD": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (الكونغو - كينشاسا)", + "fr_CF": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (جمهورية Ø£ÙØ±ÙŠÙ‚يا الوسطى)", + "fr_CG": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (الكونغو - برازاÙيل)", + "fr_CH": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (سويسرا)", + "fr_CI": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (ساحل العاج)", + "fr_CM": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (الكاميرون)", + "fr_DJ": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (جيبوتي)", + "fr_DZ": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (الجزائر)", + "fr_FR": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (ÙØ±Ù†Ø³Ø§)", + "fr_GA": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (الغابون)", + "fr_GF": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (غويانا Ø§Ù„ÙØ±Ù†Ø³ÙŠØ©)", + "fr_GN": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (غينيا)", + "fr_GP": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (غوادلوب)", + "fr_GQ": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (غينيا الاستوائية)", + "fr_HT": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (هايتي)", + "fr_KM": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (جزر القمر)", + "fr_LU": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (لوكسمبورغ)", + "fr_MA": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (المغرب)", + "fr_MC": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (موناكو)", + "fr_MF": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (سانت مارتن)", + "fr_MG": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (مدغشقر)", + "fr_ML": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (مالي)", + "fr_MQ": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (جزر المارتينيك)", + "fr_MR": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (موريتانيا)", + "fr_MU": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (موريشيوس)", + "fr_NC": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (كاليدونيا الجديدة)", + "fr_NE": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (النيجر)", + "fr_PF": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (بولينيزيا Ø§Ù„ÙØ±Ù†Ø³ÙŠØ©)", + "fr_PM": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (سانت بيير وميكولون)", + "fr_RE": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (روينيون)", + "fr_RW": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (رواندا)", + "fr_SC": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (سيشل)", + "fr_SN": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (السنغال)", + "fr_SY": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (سوريا)", + "fr_TD": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (تشاد)", + "fr_TG": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (توغو)", + "fr_TN": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (تونس)", + "fr_VU": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (ÙØ§Ù†ÙˆØ§ØªÙˆ)", + "fr_WF": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (جزر والس ÙˆÙوتونا)", + "fr_YT": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (مايوت)", + "fy": "Ø§Ù„ÙØ±ÙŠØ²ÙŠØ§Ù†", + "fy_NL": "Ø§Ù„ÙØ±ÙŠØ²ÙŠØ§Ù† (هولندا)", + "ga": "الأيرلندية", + "ga_IE": "الأيرلندية (أيرلندا)", + "gd": "الغيلية الأسكتلندية", + "gd_GB": "الغيلية الأسكتلندية (المملكة المتحدة)", + "gl": "الجاليكية", + "gl_ES": "الجاليكية (إسبانيا)", + "gu": "الغوجاراتية", + "gu_IN": "الغوجاراتية (الهند)", + "gv": "المنكية", + "gv_IM": "المنكية (جزيرة مان)", + "ha": "الهوسا", + "ha_GH": "الهوسا (غانا)", + "ha_NE": "الهوسا (النيجر)", + "ha_NG": "الهوسا (نيجيريا)", + "he": "العبرية", + "he_IL": "العبرية (إسرائيل)", + "hi": "الهندية", + "hi_IN": "الهندية (الهند)", + "hr": "الكرواتية", + "hr_BA": "الكرواتية (البوسنة والهرسك)", + "hr_HR": "الكرواتية (كرواتيا)", + "hu": "الهنغارية", + "hu_HU": "الهنغارية (هنغاريا)", + "hy": "الأرمينية", + "hy_AM": "الأرمينية (أرمينيا)", + "id": "الإندونيسية", + "id_ID": "الإندونيسية (إندونيسيا)", + "ig": "الإيجبو", + "ig_NG": "الإيجبو (نيجيريا)", + "ii": "السيتشيون يي", + "ii_CN": "السيتشيون يي (الصين)", + "is": "الأيسلندية", + "is_IS": "الأيسلندية (أيسلندا)", + "it": "الإيطالية", + "it_CH": "الإيطالية (سويسرا)", + "it_IT": "الإيطالية (إيطاليا)", + "it_SM": "الإيطالية (سان مارينو)", + "ja": "اليابانية", + "ja_JP": "اليابانية (اليابان)", + "ka": "الجورجية", + "ka_GE": "الجورجية (جورجيا)", + "ki": "الكيكيو", + "ki_KE": "الكيكيو (كينيا)", + "kk": "الكازاخستانية", + "kk_KZ": "الكازاخستانية (كازاخستان)", + "kl": "الكالاليست", + "kl_GL": "الكالاليست (غرينلاند)", + "km": "الخميرية", + "km_KH": "الخميرية (كمبوديا)", + "kn": "الكانادا", + "kn_IN": "الكانادا (الهند)", + "ko": "الكورية", + "ko_KP": "الكورية (كوريا الشمالية)", + "ko_KR": "الكورية (كوريا الجنوبية)", + "ks": "الكشميرية", + "ks_IN": "الكشميرية (الهند)", + "kw": "الكورنية", + "kw_GB": "الكورنية (المملكة المتحدة)", + "ky": "القيرغيزية", + "ky_KG": "القيرغيزية (قيرغيزستان)", + "lb": "اللكسمبورغية", + "lb_LU": "اللكسمبورغية (لوكسمبورغ)", + "lg": "الجاندا", + "lg_UG": "الجاندا (أوغندا)", + "ln": "اللينجالا", + "ln_AO": "اللينجالا (أنغولا)", + "ln_CD": "اللينجالا (الكونغو - كينشاسا)", + "ln_CF": "اللينجالا (جمهورية Ø£ÙØ±ÙŠÙ‚يا الوسطى)", + "ln_CG": "اللينجالا (الكونغو - برازاÙيل)", + "lo": "اللاوية", + "lo_LA": "اللاوية (لاوس)", + "lt": "الليتوانية", + "lt_LT": "الليتوانية (ليتوانيا)", + "lu": "اللبا-كاتانجا", + "lu_CD": "اللبا-كاتانجا (الكونغو - كينشاسا)", + "lv": "اللاتÙية", + "lv_LV": "اللاتÙية (لاتÙيا)", + "mg": "المالاجاشية", + "mg_MG": "المالاجاشية (مدغشقر)", + "mk": "المقدونية", + "mk_MK": "المقدونية (مقدونيا)", + "ml": "المالايالامية", + "ml_IN": "المالايالامية (الهند)", + "mn": "المنغولية", + "mn_MN": "المنغولية (منغوليا)", + "mr": "الماراثية", + "mr_IN": "الماراثية (الهند)", + "ms": "الماليزية", + "ms_BN": "الماليزية (بروناي)", + "ms_MY": "الماليزية (ماليزيا)", + "ms_SG": "الماليزية (سنغاÙورة)", + "mt": "المالطية", + "mt_MT": "المالطية (مالطا)", + "my": "البورمية", + "my_MM": "البورمية (ميانمار (بورما))", + "nb": "النرويجية بوكمال", + "nb_NO": "النرويجية بوكمال (النرويج)", + "nb_SJ": "النرويجية بوكمال (Ø³ÙØ§Ù„بارد وجان مايان)", + "nd": "النديبيل الشمالية", + "nd_ZW": "النديبيل الشمالية (زيمبابوي)", + "ne": "النيبالية", + "ne_IN": "النيبالية (الهند)", + "ne_NP": "النيبالية (نيبال)", + "nl": "الهولندية", + "nl_AW": "الهولندية (أروبا)", + "nl_BE": "الهولندية (بلجيكا)", + "nl_BQ": "الهولندية (هولندا الكاريبية)", + "nl_CW": "الهولندية (كوراساو)", + "nl_NL": "الهولندية (هولندا)", + "nl_SR": "الهولندية (سورينام)", + "nl_SX": "الهولندية (سينت مارتن)", + "nn": "النرويجية نينورسك", + "nn_NO": "النرويجية نينورسك (النرويج)", + "no": "النرويجية", + "no_NO": "النرويجية (النرويج)", + "om": "الأورومية", + "om_ET": "الأورومية (إثيوبيا)", + "om_KE": "الأورومية (كينيا)", + "or": "اللغة الأورية", + "or_IN": "اللغة الأورية (الهند)", + "os": "الأوسيتيك", + "os_GE": "الأوسيتيك (جورجيا)", + "os_RU": "الأوسيتيك (روسيا)", + "pa": "البنجابية", + "pa_Arab": "البنجابية (العربية)", + "pa_Arab_PK": "البنجابية (العربية, باكستان)", + "pa_Guru": "البنجابية (الجرمخي)", + "pa_Guru_IN": "البنجابية (الجرمخي, الهند)", + "pa_IN": "البنجابية (الهند)", + "pa_PK": "البنجابية (باكستان)", + "pl": "البولندية", + "pl_PL": "البولندية (بولندا)", + "ps": "البشتونية", + "ps_AF": "البشتونية (Ø£ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "pt": "البرتغالية", + "pt_AO": "البرتغالية (أنغولا)", + "pt_BR": "البرتغالية (البرازيل)", + "pt_CH": "البرتغالية (سويسرا)", + "pt_CV": "البرتغالية (الرأس الأخضر)", + "pt_GQ": "البرتغالية (غينيا الاستوائية)", + "pt_GW": "البرتغالية (غينيا بيساو)", + "pt_LU": "البرتغالية (لوكسمبورغ)", + "pt_MO": "البرتغالية (مكاو الصينية (منطقة إدارية خاصة))", + "pt_MZ": "البرتغالية (موزمبيق)", + "pt_PT": "البرتغالية (البرتغال)", + "pt_ST": "البرتغالية (ساو تومي وبرينسيبي)", + "pt_TL": "البرتغالية (تيمور- ليشتي)", + "qu": "الكويتشوا", + "qu_BO": "الكويتشوا (بوليÙيا)", + "qu_EC": "الكويتشوا (الإكوادور)", + "qu_PE": "الكويتشوا (بيرو)", + "rm": "الرومانشية", + "rm_CH": "الرومانشية (سويسرا)", + "rn": "الرندي", + "rn_BI": "الرندي (بوروندي)", + "ro": "الرومانية", + "ro_MD": "الرومانية (Ù…ÙˆÙ„Ø¯ÙˆÙØ§)", + "ro_RO": "الرومانية (رومانيا)", + "ru": "الروسية", + "ru_BY": "الروسية (بيلاروس)", + "ru_KG": "الروسية (قيرغيزستان)", + "ru_KZ": "الروسية (كازاخستان)", + "ru_MD": "الروسية (Ù…ÙˆÙ„Ø¯ÙˆÙØ§)", + "ru_RU": "الروسية (روسيا)", + "ru_UA": "الروسية (أوكرانيا)", + "rw": "الكينيارواندا", + "rw_RW": "الكينيارواندا (رواندا)", + "se": "السامي الشمالية", + "se_FI": "السامي الشمالية (Ùنلندا)", + "se_NO": "السامي الشمالية (النرويج)", + "se_SE": "السامي الشمالية (السويد)", + "sg": "السانجو", + "sg_CF": "السانجو (جمهورية Ø£ÙØ±ÙŠÙ‚يا الوسطى)", + "sh": "صربية-كرواتية", + "sh_BA": "صربية-كرواتية (البوسنة والهرسك)", + "si": "السنهالية", + "si_LK": "السنهالية (سريلانكا)", + "sk": "Ø§Ù„Ø³Ù„ÙˆÙØ§ÙƒÙŠØ©", + "sk_SK": "Ø§Ù„Ø³Ù„ÙˆÙØ§ÙƒÙŠØ© (Ø³Ù„ÙˆÙØ§ÙƒÙŠØ§)", + "sl": "Ø§Ù„Ø³Ù„ÙˆÙØ§Ù†ÙŠØ©", + "sl_SI": "Ø§Ù„Ø³Ù„ÙˆÙØ§Ù†ÙŠØ© (سلوÙينيا)", + "sn": "الشونا", + "sn_ZW": "الشونا (زيمبابوي)", + "so": "الصومالية", + "so_DJ": "الصومالية (جيبوتي)", + "so_ET": "الصومالية (إثيوبيا)", + "so_KE": "الصومالية (كينيا)", + "so_SO": "الصومالية (الصومال)", + "sq": "الألبانية", + "sq_AL": "الألبانية (ألبانيا)", + "sq_MK": "الألبانية (مقدونيا)", + "sq_XK": "الألبانية (كوسوÙÙˆ)", + "sr": "الصربية", + "sr_BA": "الصربية (البوسنة والهرسك)", + "sr_Cyrl": "الصربية (السيريلية)", + "sr_Cyrl_BA": "الصربية (السيريلية, البوسنة والهرسك)", + "sr_Cyrl_ME": "الصربية (السيريلية, الجبل الأسود)", + "sr_Cyrl_RS": "الصربية (السيريلية, صربيا)", + "sr_Cyrl_XK": "الصربية (السيريلية, كوسوÙÙˆ)", + "sr_Latn": "الصربية (اللاتينية)", + "sr_Latn_BA": "الصربية (اللاتينية, البوسنة والهرسك)", + "sr_Latn_ME": "الصربية (اللاتينية, الجبل الأسود)", + "sr_Latn_RS": "الصربية (اللاتينية, صربيا)", + "sr_Latn_XK": "الصربية (اللاتينية, كوسوÙÙˆ)", + "sr_ME": "الصربية (الجبل الأسود)", + "sr_RS": "الصربية (صربيا)", + "sr_XK": "الصربية (كوسوÙÙˆ)", + "sv": "السويدية", + "sv_AX": "السويدية (جزر آلاند)", + "sv_FI": "السويدية (Ùنلندا)", + "sv_SE": "السويدية (السويد)", + "sw": "السواحلية", + "sw_CD": "السواحلية (الكونغو - كينشاسا)", + "sw_KE": "السواحلية (كينيا)", + "sw_TZ": "السواحلية (تنزانيا)", + "sw_UG": "السواحلية (أوغندا)", + "ta": "التاميلية", + "ta_IN": "التاميلية (الهند)", + "ta_LK": "التاميلية (سريلانكا)", + "ta_MY": "التاميلية (ماليزيا)", + "ta_SG": "التاميلية (سنغاÙورة)", + "te": "التيلوجو", + "te_IN": "التيلوجو (الهند)", + "th": "التايلاندية", + "th_TH": "التايلاندية (تايلاند)", + "ti": "التغرينية", + "ti_ER": "التغرينية (إريتريا)", + "ti_ET": "التغرينية (إثيوبيا)", + "tl": "التاغالوغية", + "tl_PH": "التاغالوغية (الÙلبين)", + "to": "التونغية", + "to_TO": "التونغية (تونغا)", + "tr": "التركية", + "tr_CY": "التركية (قبرص)", + "tr_TR": "التركية (تركيا)", + "ug": "الأويغورية", + "ug_CN": "الأويغورية (الصين)", + "uk": "الأوكرانية", + "uk_UA": "الأوكرانية (أوكرانيا)", + "ur": "الأوردية", + "ur_IN": "الأوردية (الهند)", + "ur_PK": "الأوردية (باكستان)", + "uz": "الأوزبكية", + "uz_AF": "الأوزبكية (Ø£ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "uz_Arab": "الأوزبكية (العربية)", + "uz_Arab_AF": "الأوزبكية (العربية, Ø£ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "uz_Cyrl": "الأوزبكية (السيريلية)", + "uz_Cyrl_UZ": "الأوزبكية (السيريلية, أوزبكستان)", + "uz_Latn": "الأوزبكية (اللاتينية)", + "uz_Latn_UZ": "الأوزبكية (اللاتينية, أوزبكستان)", + "uz_UZ": "الأوزبكية (أوزبكستان)", + "vi": "الÙيتنامية", + "vi_VN": "الÙيتنامية (Ùيتنام)", + "yi": "اليديشية", + "yo": "اليوروبية", + "yo_BJ": "اليوروبية (بنين)", + "yo_NG": "اليوروبية (نيجيريا)", + "zh": "الصينية", + "zh_CN": "الصينية (الصين)", + "zh_HK": "الصينية (هونغ كونغ الصينية)", + "zh_Hans": "الصينية (المبسطة)", + "zh_Hans_CN": "الصينية (المبسطة, الصين)", + "zh_Hans_HK": "الصينية (المبسطة, هونغ كونغ الصينية)", + "zh_Hans_MO": "الصينية (المبسطة, مكاو الصينية (منطقة إدارية خاصة))", + "zh_Hans_SG": "الصينية (المبسطة, سنغاÙورة)", + "zh_Hant": "الصينية (التقليدية)", + "zh_Hant_HK": "الصينية (التقليدية, هونغ كونغ الصينية)", + "zh_Hant_MO": "الصينية (التقليدية, مكاو الصينية (منطقة إدارية خاصة))", + "zh_Hant_TW": "الصينية (التقليدية, تايوان)", + "zh_MO": "الصينية (مكاو الصينية (منطقة إدارية خاصة))", + "zh_SG": "الصينية (سنغاÙورة)", + "zh_TW": "الصينية (تايوان)", + "zu": "الزولو", + "zu_ZA": "الزولو (جنوب Ø£ÙØ±ÙŠÙ‚يا)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ar_EG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ar_EG.json new file mode 100644 index 0000000000000000000000000000000000000000..e6220782c09008c398c7565e34a27971246b47c9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ar_EG.json @@ -0,0 +1,7 @@ +{ + "Names": { + "da": "الدنماركية", + "da_DK": "الدنماركية (الدانمرك)", + "da_GL": "الدنماركية (غرينلاند)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ar_LY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ar_LY.json new file mode 100644 index 0000000000000000000000000000000000000000..ee5e4cb3031afd5d5b1c880ea47f79f1cbe6d3a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ar_LY.json @@ -0,0 +1,19 @@ +{ + "Names": { + "en_MS": "الإنجليزية (مونتيسيرات)", + "es_EA": "الإسبانية (سبتة ومليلية)", + "es_UY": "الإسبانية (أوروغواي)", + "lo": "اللاوو", + "lo_LA": "اللاوو (لاوس)", + "sh": "الكرواتية الصربية", + "sh_BA": "الكرواتية الصربية (البوسنة والهرسك)", + "sw": "السواحيلية", + "sw_CD": "السواحيلية (الكونغو - كينشاسا)", + "sw_KE": "السواحيلية (كينيا)", + "sw_TZ": "السواحيلية (تنزانيا)", + "sw_UG": "السواحيلية (أوغندا)", + "ti": "التيغرينية", + "ti_ER": "التيغرينية (إريتريا)", + "ti_ET": "التيغرينية (إثيوبيا)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ar_SA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ar_SA.json new file mode 100644 index 0000000000000000000000000000000000000000..6494a6a4dbff572a979fda583dbbd96c051a1ddc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ar_SA.json @@ -0,0 +1,23 @@ +{ + "Names": { + "en_BS": "الإنجليزية (جزر البهاما)", + "en_MS": "الإنجليزية (مونتيسيرات)", + "es_EA": "الإسبانية (سبتة ومليلية)", + "es_UY": "الإسبانية (أوروغواي)", + "fr_PM": "Ø§Ù„ÙØ±Ù†Ø³ÙŠØ© (سان بيير وميكولون)", + "lo": "اللاوو", + "lo_LA": "اللاوو (لاوس)", + "or": "الأورية", + "or_IN": "الأورية (الهند)", + "sh": "الكرواتية الصربية", + "sh_BA": "الكرواتية الصربية (البوسنة والهرسك)", + "sw": "السواحيلية", + "sw_CD": "السواحيلية (الكونغو - كينشاسا)", + "sw_KE": "السواحيلية (كينيا)", + "sw_TZ": "السواحيلية (تنزانيا)", + "sw_UG": "السواحيلية (أوغندا)", + "ti": "التيغرينية", + "ti_ER": "التيغرينية (إريتريا)", + "ti_ET": "التيغرينية (إثيوبيا)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/as.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/as.json new file mode 100644 index 0000000000000000000000000000000000000000..9af97d28f91bb0afa49e8d961e36e5a9b62e8aeb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/as.json @@ -0,0 +1,6 @@ +{ + "Names": { + "as": "অসমীয়া", + "as_IN": "অসমীয়া (ভাৰত)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/az.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/az.json new file mode 100644 index 0000000000000000000000000000000000000000..7545e126790e037368a3b64f253ed0df3cfd88c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/az.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibiya)", + "af_ZA": "afrikaans (CÉ™nub Afrika)", + "ak": "akan", + "ak_GH": "akan (Qana)", + "am": "amhar", + "am_ET": "amhar (Efiopiya)", + "ar": "É™rÉ™b", + "ar_AE": "É™rÉ™b (BirləşmiÅŸ ÆrÉ™b ÆmirliklÉ™ri)", + "ar_BH": "É™rÉ™b (BÉ™hreyn)", + "ar_DJ": "É™rÉ™b (Cibuti)", + "ar_DZ": "É™rÉ™b (ÆlcÉ™zair)", + "ar_EG": "É™rÉ™b (Misir)", + "ar_EH": "É™rÉ™b (QÉ™rbi Saxara)", + "ar_ER": "É™rÉ™b (Eritreya)", + "ar_IL": "É™rÉ™b (İsrail)", + "ar_IQ": "É™rÉ™b (İraq)", + "ar_JO": "É™rÉ™b (İordaniya)", + "ar_KM": "É™rÉ™b (Komor adaları)", + "ar_KW": "É™rÉ™b (Küveyt)", + "ar_LB": "É™rÉ™b (Livan)", + "ar_LY": "É™rÉ™b (Liviya)", + "ar_MA": "É™rÉ™b (MÉ™rakeÅŸ)", + "ar_MR": "É™rÉ™b (Mavritaniya)", + "ar_OM": "É™rÉ™b (Oman)", + "ar_PS": "É™rÉ™b (FÉ™lÉ™stin ÆrazilÉ™ri)", + "ar_QA": "É™rÉ™b (QÉ™tÉ™r)", + "ar_SA": "É™rÉ™b (SÉ™udiyyÉ™ ÆrÉ™bistanı)", + "ar_SD": "É™rÉ™b (Sudan)", + "ar_SO": "É™rÉ™b (Somali)", + "ar_SS": "É™rÉ™b (CÉ™nubi Sudan)", + "ar_SY": "É™rÉ™b (Suriya)", + "ar_TD": "É™rÉ™b (Çad)", + "ar_TN": "É™rÉ™b (Tunis)", + "ar_YE": "É™rÉ™b (YÉ™mÉ™n)", + "as": "assam", + "as_IN": "assam (Hindistan)", + "az": "azÉ™rbaycan", + "az_AZ": "azÉ™rbaycan (AzÉ™rbaycan)", + "az_Cyrl": "azÉ™rbaycan (kiril)", + "az_Cyrl_AZ": "azÉ™rbaycan (kiril, AzÉ™rbaycan)", + "az_Latn": "azÉ™rbaycan (latın)", + "az_Latn_AZ": "azÉ™rbaycan (latın, AzÉ™rbaycan)", + "be": "belarus", + "be_BY": "belarus (Belarus)", + "bg": "bolqar", + "bg_BG": "bolqar (Bolqarıstan)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "benqal", + "bn_BD": "benqal (BanqladeÅŸ)", + "bn_IN": "benqal (Hindistan)", + "bo": "tibet", + "bo_CN": "tibet (Çin)", + "bo_IN": "tibet (Hindistan)", + "br": "breton", + "br_FR": "breton (Fransa)", + "bs": "bosniak", + "bs_BA": "bosniak (Bosniya vÉ™ Herseqovina)", + "bs_Cyrl": "bosniak (kiril)", + "bs_Cyrl_BA": "bosniak (kiril, Bosniya vÉ™ Herseqovina)", + "bs_Latn": "bosniak (latın)", + "bs_Latn_BA": "bosniak (latın, Bosniya vÉ™ Herseqovina)", + "ca": "katalan", + "ca_AD": "katalan (Andorra)", + "ca_ES": "katalan (İspaniya)", + "ca_FR": "katalan (Fransa)", + "ca_IT": "katalan (İtaliya)", + "ce": "çeçen", + "ce_RU": "çeçen (Rusiya)", + "cs": "çex", + "cs_CZ": "çex (Çex Respublikası)", + "cy": "uels", + "cy_GB": "uels (BirləşmiÅŸ Krallıq)", + "da": "danimarka", + "da_DK": "danimarka (Danimarka)", + "da_GL": "danimarka (Qrenlandiya)", + "de": "alman", + "de_AT": "alman (Avstriya)", + "de_BE": "alman (Belçika)", + "de_CH": "alman (İsveçrÉ™)", + "de_DE": "alman (Almaniya)", + "de_IT": "alman (İtaliya)", + "de_LI": "alman (LixtenÅŸteyn)", + "de_LU": "alman (Lüksemburq)", + "dz": "dzonqa", + "dz_BT": "dzonqa (Butan)", + "ee": "eve", + "ee_GH": "eve (Qana)", + "ee_TG": "eve (Toqo)", + "el": "yunan", + "el_CY": "yunan (Kipr)", + "el_GR": "yunan (Yunanıstan)", + "en": "ingilis", + "en_AG": "ingilis (Antiqua vÉ™ Barbuda)", + "en_AI": "ingilis (Angilya)", + "en_AS": "ingilis (Amerika Samoası)", + "en_AT": "ingilis (Avstriya)", + "en_AU": "ingilis (Avstraliya)", + "en_BB": "ingilis (Barbados)", + "en_BE": "ingilis (Belçika)", + "en_BI": "ingilis (Burundi)", + "en_BM": "ingilis (Bermud adaları)", + "en_BS": "ingilis (Baham adaları)", + "en_BW": "ingilis (Botsvana)", + "en_BZ": "ingilis (Beliz)", + "en_CA": "ingilis (Kanada)", + "en_CC": "ingilis (Kokos (Kilinq) adaları)", + "en_CH": "ingilis (İsveçrÉ™)", + "en_CK": "ingilis (Kuk adaları)", + "en_CM": "ingilis (Kamerun)", + "en_CX": "ingilis (Milad adası)", + "en_CY": "ingilis (Kipr)", + "en_DE": "ingilis (Almaniya)", + "en_DG": "ingilis (Dieqo Qarsiya)", + "en_DK": "ingilis (Danimarka)", + "en_DM": "ingilis (Dominika)", + "en_ER": "ingilis (Eritreya)", + "en_FI": "ingilis (Finlandiya)", + "en_FJ": "ingilis (Fici)", + "en_FK": "ingilis (Folklend adaları)", + "en_FM": "ingilis (Mikroneziya)", + "en_GB": "ingilis (BirləşmiÅŸ Krallıq)", + "en_GD": "ingilis (Qrenada)", + "en_GG": "ingilis (Gernsi)", + "en_GH": "ingilis (Qana)", + "en_GI": "ingilis (CÉ™bÉ™llütariq)", + "en_GM": "ingilis (Qambiya)", + "en_GU": "ingilis (Quam)", + "en_GY": "ingilis (Qayana)", + "en_HK": "ingilis (Honq Konq Xüsusi İnzibati Ærazi Çin)", + "en_IE": "ingilis (İrlandiya)", + "en_IL": "ingilis (İsrail)", + "en_IM": "ingilis (Men adası)", + "en_IN": "ingilis (Hindistan)", + "en_IO": "ingilis (Britaniyanın Hind Okeanı Ærazisi)", + "en_JE": "ingilis (Cersi)", + "en_JM": "ingilis (Yamayka)", + "en_KE": "ingilis (Keniya)", + "en_KI": "ingilis (Kiribati)", + "en_KN": "ingilis (Sent-Kits vÉ™ Nevis)", + "en_KY": "ingilis (Kayman adaları)", + "en_LC": "ingilis (Sent-Lusiya)", + "en_LR": "ingilis (Liberiya)", + "en_LS": "ingilis (Lesoto)", + "en_MG": "ingilis (Madaqaskar)", + "en_MH": "ingilis (MarÅŸal adaları)", + "en_MO": "ingilis (Makao Xüsusi İnzibati Ærazi Çin)", + "en_MP": "ingilis (Åžimali Marian adaları)", + "en_MS": "ingilis (Monserat)", + "en_MT": "ingilis (Malta)", + "en_MU": "ingilis (Mavriki)", + "en_MW": "ingilis (Malavi)", + "en_MY": "ingilis (Malayziya)", + "en_NA": "ingilis (Namibiya)", + "en_NF": "ingilis (Norfolk adası)", + "en_NG": "ingilis (Nigeriya)", + "en_NL": "ingilis (Niderland)", + "en_NR": "ingilis (Nauru)", + "en_NU": "ingilis (Niue)", + "en_NZ": "ingilis (Yeni Zelandiya)", + "en_PG": "ingilis (Papua-Yeni Qvineya)", + "en_PH": "ingilis (Filippin)", + "en_PK": "ingilis (Pakistan)", + "en_PN": "ingilis (Pitkern adaları)", + "en_PR": "ingilis (Puerto Riko)", + "en_PW": "ingilis (Palau)", + "en_RW": "ingilis (Ruanda)", + "en_SB": "ingilis (Solomon adaları)", + "en_SC": "ingilis (SeyÅŸel adaları)", + "en_SD": "ingilis (Sudan)", + "en_SE": "ingilis (İsveç)", + "en_SG": "ingilis (Sinqapur)", + "en_SH": "ingilis (MüqÉ™ddÉ™s Yelena)", + "en_SI": "ingilis (Sloveniya)", + "en_SL": "ingilis (Syerra-Leone)", + "en_SS": "ingilis (CÉ™nubi Sudan)", + "en_SX": "ingilis (Sint-Marten)", + "en_SZ": "ingilis (Svazilend)", + "en_TC": "ingilis (Törks vÉ™ Kaykos adaları)", + "en_TK": "ingilis (Tokelau)", + "en_TO": "ingilis (Tonqa)", + "en_TT": "ingilis (Trinidad vÉ™ Tobaqo)", + "en_TV": "ingilis (Tuvalu)", + "en_TZ": "ingilis (Tanzaniya)", + "en_UG": "ingilis (Uqanda)", + "en_UM": "ingilis (ABÅž-a baÄŸlı kiçik adacıqlar)", + "en_US": "ingilis (Amerika BirləşmiÅŸ Åžtatları)", + "en_VC": "ingilis (Sent-Vinsent vÉ™ QrenadinlÉ™r)", + "en_VG": "ingilis (Britaniyanın Virgin adaları)", + "en_VI": "ingilis (ABÅž Virgin adaları)", + "en_VU": "ingilis (Vanuatu)", + "en_WS": "ingilis (Samoa)", + "en_ZA": "ingilis (CÉ™nub Afrika)", + "en_ZM": "ingilis (Zambiya)", + "en_ZW": "ingilis (Zimbabve)", + "eo": "esperanto", + "es": "ispan", + "es_AR": "ispan (Argentina)", + "es_BO": "ispan (Boliviya)", + "es_BR": "ispan (Braziliya)", + "es_CL": "ispan (Çili)", + "es_CO": "ispan (Kolumbiya)", + "es_CR": "ispan (Kosta Rika)", + "es_CU": "ispan (Kuba)", + "es_DO": "ispan (Dominikan Respublikası)", + "es_EA": "ispan (Seuta vÉ™ Melilya)", + "es_EC": "ispan (Ekvador)", + "es_ES": "ispan (İspaniya)", + "es_GQ": "ispan (Ekvatorial Qvineya)", + "es_GT": "ispan (Qvatemala)", + "es_HN": "ispan (Honduras)", + "es_IC": "ispan (Kanar adaları)", + "es_MX": "ispan (Meksika)", + "es_NI": "ispan (Nikaraqua)", + "es_PA": "ispan (Panama)", + "es_PE": "ispan (Peru)", + "es_PH": "ispan (Filippin)", + "es_PR": "ispan (Puerto Riko)", + "es_PY": "ispan (Paraqvay)", + "es_SV": "ispan (Salvador)", + "es_US": "ispan (Amerika BirləşmiÅŸ Åžtatları)", + "es_UY": "ispan (Uruqvay)", + "es_VE": "ispan (Venesuela)", + "et": "eston", + "et_EE": "eston (Estoniya)", + "eu": "bask", + "eu_ES": "bask (İspaniya)", + "fa": "fars", + "fa_AF": "fars (Æfqanıstan)", + "fa_IR": "fars (İran)", + "ff": "fula", + "ff_CM": "fula (Kamerun)", + "ff_GN": "fula (Qvineya)", + "ff_MR": "fula (Mavritaniya)", + "ff_SN": "fula (Seneqal)", + "fi": "fin", + "fi_FI": "fin (Finlandiya)", + "fo": "farer", + "fo_DK": "farer (Danimarka)", + "fo_FO": "farer (Farer adaları)", + "fr": "fransız", + "fr_BE": "fransız (Belçika)", + "fr_BF": "fransız (Burkina Faso)", + "fr_BI": "fransız (Burundi)", + "fr_BJ": "fransız (Benin)", + "fr_BL": "fransız (Sent-Bartelemi)", + "fr_CA": "fransız (Kanada)", + "fr_CD": "fransız (Konqo - KinÅŸasa)", + "fr_CF": "fransız (MÉ™rkÉ™zi Afrika Respublikası)", + "fr_CG": "fransız (Konqo - Brazzavil)", + "fr_CH": "fransız (İsveçrÉ™)", + "fr_CI": "fransız (Kotd’ivuar)", + "fr_CM": "fransız (Kamerun)", + "fr_DJ": "fransız (Cibuti)", + "fr_DZ": "fransız (ÆlcÉ™zair)", + "fr_FR": "fransız (Fransa)", + "fr_GA": "fransız (Qabon)", + "fr_GF": "fransız (Fransa Qvianası)", + "fr_GN": "fransız (Qvineya)", + "fr_GP": "fransız (Qvadelupa)", + "fr_GQ": "fransız (Ekvatorial Qvineya)", + "fr_HT": "fransız (Haiti)", + "fr_KM": "fransız (Komor adaları)", + "fr_LU": "fransız (Lüksemburq)", + "fr_MA": "fransız (MÉ™rakeÅŸ)", + "fr_MC": "fransız (Monako)", + "fr_MF": "fransız (Sent Martin)", + "fr_MG": "fransız (Madaqaskar)", + "fr_ML": "fransız (Mali)", + "fr_MQ": "fransız (Martinik)", + "fr_MR": "fransız (Mavritaniya)", + "fr_MU": "fransız (Mavriki)", + "fr_NC": "fransız (Yeni Kaledoniya)", + "fr_NE": "fransız (Niger)", + "fr_PF": "fransız (Fransa Polineziyası)", + "fr_PM": "fransız (MüqÉ™ddÉ™s Pyer vÉ™ Mikelon)", + "fr_RE": "fransız (Reyunyon)", + "fr_RW": "fransız (Ruanda)", + "fr_SC": "fransız (SeyÅŸel adaları)", + "fr_SN": "fransız (Seneqal)", + "fr_SY": "fransız (Suriya)", + "fr_TD": "fransız (Çad)", + "fr_TG": "fransız (Toqo)", + "fr_TN": "fransız (Tunis)", + "fr_VU": "fransız (Vanuatu)", + "fr_WF": "fransız (Uollis vÉ™ Futuna)", + "fr_YT": "fransız (Mayot)", + "fy": "qÉ™rbi friz", + "fy_NL": "qÉ™rbi friz (Niderland)", + "ga": "irland", + "ga_IE": "irland (İrlandiya)", + "gd": "Åžotlandiya keltcÉ™si", + "gd_GB": "Åžotlandiya keltcÉ™si (BirləşmiÅŸ Krallıq)", + "gl": "qalisiya", + "gl_ES": "qalisiya (İspaniya)", + "gu": "qucarat", + "gu_IN": "qucarat (Hindistan)", + "gv": "manks", + "gv_IM": "manks (Men adası)", + "ha": "hausa", + "ha_GH": "hausa (Qana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigeriya)", + "he": "ivrit", + "he_IL": "ivrit (İsrail)", + "hi": "hind", + "hi_IN": "hind (Hindistan)", + "hr": "xorvat", + "hr_BA": "xorvat (Bosniya vÉ™ Herseqovina)", + "hr_HR": "xorvat (Xorvatiya)", + "hu": "macar", + "hu_HU": "macar (Macarıstan)", + "hy": "ermÉ™ni", + "hy_AM": "ermÉ™ni (ErmÉ™nistan)", + "id": "indoneziya", + "id_ID": "indoneziya (İndoneziya)", + "ig": "iqbo", + "ig_NG": "iqbo (Nigeriya)", + "ii": "siçuan yi", + "ii_CN": "siçuan yi (Çin)", + "is": "island", + "is_IS": "island (İslandiya)", + "it": "italyan", + "it_CH": "italyan (İsveçrÉ™)", + "it_IT": "italyan (İtaliya)", + "it_SM": "italyan (San-Marino)", + "ja": "yapon", + "ja_JP": "yapon (Yaponiya)", + "ka": "gürcü", + "ka_GE": "gürcü (Gürcüstan)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Keniya)", + "kk": "qazax", + "kk_KZ": "qazax (Qazaxıstan)", + "kl": "kalaallisut", + "kl_GL": "kalaallisut (Qrenlandiya)", + "km": "kxmer", + "km_KH": "kxmer (Kamboca)", + "kn": "kannada", + "kn_IN": "kannada (Hindistan)", + "ko": "koreya", + "ko_KP": "koreya (Åžimali Koreya)", + "ko_KR": "koreya (CÉ™nubi Koreya)", + "ks": "kəşmir", + "ks_IN": "kəşmir (Hindistan)", + "kw": "korn", + "kw_GB": "korn (BirləşmiÅŸ Krallıq)", + "ky": "qırğız", + "ky_KG": "qırğız (Qırğızıstan)", + "lb": "lüksemburq", + "lb_LU": "lüksemburq (Lüksemburq)", + "lg": "qanda", + "lg_UG": "qanda (Uqanda)", + "ln": "linqala", + "ln_AO": "linqala (Anqola)", + "ln_CD": "linqala (Konqo - KinÅŸasa)", + "ln_CF": "linqala (MÉ™rkÉ™zi Afrika Respublikası)", + "ln_CG": "linqala (Konqo - Brazzavil)", + "lo": "laos", + "lo_LA": "laos (Laos)", + "lt": "litva", + "lt_LT": "litva (Litva)", + "lu": "luba-katanqa", + "lu_CD": "luba-katanqa (Konqo - KinÅŸasa)", + "lv": "latış", + "lv_LV": "latış (Latviya)", + "mg": "malaqas", + "mg_MG": "malaqas (Madaqaskar)", + "mk": "makedon", + "mk_MK": "makedon (Makedoniya)", + "ml": "malayalam", + "ml_IN": "malayalam (Hindistan)", + "mn": "monqol", + "mn_MN": "monqol (Monqolustan)", + "mr": "marathi", + "mr_IN": "marathi (Hindistan)", + "ms": "malay", + "ms_BN": "malay (Bruney)", + "ms_MY": "malay (Malayziya)", + "ms_SG": "malay (Sinqapur)", + "mt": "malta", + "mt_MT": "malta (Malta)", + "my": "birman", + "my_MM": "birman (Myanma)", + "nb": "bokmal norveç", + "nb_NO": "bokmal norveç (Norveç)", + "nb_SJ": "bokmal norveç (Svalbard vÉ™ Yan-Mayen)", + "nd": "ÅŸimali ndebele", + "nd_ZW": "ÅŸimali ndebele (Zimbabve)", + "ne": "nepal", + "ne_IN": "nepal (Hindistan)", + "ne_NP": "nepal (Nepal)", + "nl": "holland", + "nl_AW": "holland (Aruba)", + "nl_BE": "holland (Belçika)", + "nl_BQ": "holland (Karib Niderlandı)", + "nl_CW": "holland (Kurasao)", + "nl_NL": "holland (Niderland)", + "nl_SR": "holland (Surinam)", + "nl_SX": "holland (Sint-Marten)", + "nn": "nünorsk norveç", + "nn_NO": "nünorsk norveç (Norveç)", + "no": "norveç", + "no_NO": "norveç (Norveç)", + "om": "oromo", + "om_ET": "oromo (Efiopiya)", + "om_KE": "oromo (Keniya)", + "or": "odiya", + "or_IN": "odiya (Hindistan)", + "os": "osetin", + "os_GE": "osetin (Gürcüstan)", + "os_RU": "osetin (Rusiya)", + "pa": "pÉ™ncab", + "pa_Arab": "pÉ™ncab (É™rÉ™b)", + "pa_Arab_PK": "pÉ™ncab (É™rÉ™b, Pakistan)", + "pa_Guru": "pÉ™ncab (qurmuxi)", + "pa_Guru_IN": "pÉ™ncab (qurmuxi, Hindistan)", + "pa_IN": "pÉ™ncab (Hindistan)", + "pa_PK": "pÉ™ncab (Pakistan)", + "pl": "polyak", + "pl_PL": "polyak (PolÅŸa)", + "ps": "puÅŸtu", + "ps_AF": "puÅŸtu (Æfqanıstan)", + "pt": "portuqal", + "pt_AO": "portuqal (Anqola)", + "pt_BR": "portuqal (Braziliya)", + "pt_CH": "portuqal (İsveçrÉ™)", + "pt_CV": "portuqal (Kabo-Verde)", + "pt_GQ": "portuqal (Ekvatorial Qvineya)", + "pt_GW": "portuqal (Qvineya-Bisau)", + "pt_LU": "portuqal (Lüksemburq)", + "pt_MO": "portuqal (Makao Xüsusi İnzibati Ærazi Çin)", + "pt_MZ": "portuqal (Mozambik)", + "pt_PT": "portuqal (Portuqaliya)", + "pt_ST": "portuqal (San-Tome vÉ™ Prinsipi)", + "pt_TL": "portuqal (Şərqi Timor)", + "qu": "keçua", + "qu_BO": "keçua (Boliviya)", + "qu_EC": "keçua (Ekvador)", + "qu_PE": "keçua (Peru)", + "rm": "romanÅŸ", + "rm_CH": "romanÅŸ (İsveçrÉ™)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumın", + "ro_MD": "rumın (Moldova)", + "ro_RO": "rumın (Rumıniya)", + "ru": "rus", + "ru_BY": "rus (Belarus)", + "ru_KG": "rus (Qırğızıstan)", + "ru_KZ": "rus (Qazaxıstan)", + "ru_MD": "rus (Moldova)", + "ru_RU": "rus (Rusiya)", + "ru_UA": "rus (Ukrayna)", + "rw": "kinyarvanda", + "rw_RW": "kinyarvanda (Ruanda)", + "se": "ÅŸimali sami", + "se_FI": "ÅŸimali sami (Finlandiya)", + "se_NO": "ÅŸimali sami (Norveç)", + "se_SE": "ÅŸimali sami (İsveç)", + "sg": "sanqo", + "sg_CF": "sanqo (MÉ™rkÉ™zi Afrika Respublikası)", + "sh": "serb-xorvat", + "sh_BA": "serb-xorvat (Bosniya vÉ™ Herseqovina)", + "si": "sinhala", + "si_LK": "sinhala (Åžri-Lanka)", + "sk": "slovak", + "sk_SK": "slovak (Slovakiya)", + "sl": "sloven", + "sl_SI": "sloven (Sloveniya)", + "sn": "ÅŸona", + "sn_ZW": "ÅŸona (Zimbabve)", + "so": "somali", + "so_DJ": "somali (Cibuti)", + "so_ET": "somali (Efiopiya)", + "so_KE": "somali (Keniya)", + "so_SO": "somali (Somali)", + "sq": "alban", + "sq_AL": "alban (Albaniya)", + "sq_MK": "alban (Makedoniya)", + "sq_XK": "alban (Kosovo)", + "sr": "serb", + "sr_BA": "serb (Bosniya vÉ™ Herseqovina)", + "sr_Cyrl": "serb (kiril)", + "sr_Cyrl_BA": "serb (kiril, Bosniya vÉ™ Herseqovina)", + "sr_Cyrl_ME": "serb (kiril, Monteneqro)", + "sr_Cyrl_RS": "serb (kiril, Serbiya)", + "sr_Cyrl_XK": "serb (kiril, Kosovo)", + "sr_Latn": "serb (latın)", + "sr_Latn_BA": "serb (latın, Bosniya vÉ™ Herseqovina)", + "sr_Latn_ME": "serb (latın, Monteneqro)", + "sr_Latn_RS": "serb (latın, Serbiya)", + "sr_Latn_XK": "serb (latın, Kosovo)", + "sr_ME": "serb (Monteneqro)", + "sr_RS": "serb (Serbiya)", + "sr_XK": "serb (Kosovo)", + "sv": "isveç", + "sv_AX": "isveç (Aland adaları)", + "sv_FI": "isveç (Finlandiya)", + "sv_SE": "isveç (İsveç)", + "sw": "suahili", + "sw_CD": "suahili (Konqo - KinÅŸasa)", + "sw_KE": "suahili (Keniya)", + "sw_TZ": "suahili (Tanzaniya)", + "sw_UG": "suahili (Uqanda)", + "ta": "tamil", + "ta_IN": "tamil (Hindistan)", + "ta_LK": "tamil (Åžri-Lanka)", + "ta_MY": "tamil (Malayziya)", + "ta_SG": "tamil (Sinqapur)", + "te": "teluqu", + "te_IN": "teluqu (Hindistan)", + "th": "tay", + "th_TH": "tay (Tailand)", + "ti": "tiqrin", + "ti_ER": "tiqrin (Eritreya)", + "ti_ET": "tiqrin (Efiopiya)", + "tl": "taqaloq", + "tl_PH": "taqaloq (Filippin)", + "to": "tonqa", + "to_TO": "tonqa (Tonqa)", + "tr": "türk", + "tr_CY": "türk (Kipr)", + "tr_TR": "türk (TürkiyÉ™)", + "ug": "uyÄŸur", + "ug_CN": "uyÄŸur (Çin)", + "uk": "ukrayna", + "uk_UA": "ukrayna (Ukrayna)", + "ur": "urdu", + "ur_IN": "urdu (Hindistan)", + "ur_PK": "urdu (Pakistan)", + "uz": "özbÉ™k", + "uz_AF": "özbÉ™k (Æfqanıstan)", + "uz_Arab": "özbÉ™k (É™rÉ™b)", + "uz_Arab_AF": "özbÉ™k (É™rÉ™b, Æfqanıstan)", + "uz_Cyrl": "özbÉ™k (kiril)", + "uz_Cyrl_UZ": "özbÉ™k (kiril, ÖzbÉ™kistan)", + "uz_Latn": "özbÉ™k (latın)", + "uz_Latn_UZ": "özbÉ™k (latın, ÖzbÉ™kistan)", + "uz_UZ": "özbÉ™k (ÖzbÉ™kistan)", + "vi": "vyetnam", + "vi_VN": "vyetnam (Vyetnam)", + "yi": "idiÅŸ", + "yo": "yoruba", + "yo_BJ": "yoruba (Benin)", + "yo_NG": "yoruba (Nigeriya)", + "zh": "çin", + "zh_CN": "çin (Çin)", + "zh_HK": "çin (Honq Konq Xüsusi İnzibati Ærazi Çin)", + "zh_Hans": "çin (sadÉ™ləşmiÅŸ)", + "zh_Hans_CN": "çin (sadÉ™ləşmiÅŸ, Çin)", + "zh_Hans_HK": "çin (sadÉ™ləşmiÅŸ, Honq Konq Xüsusi İnzibati Ærazi Çin)", + "zh_Hans_MO": "çin (sadÉ™ləşmiÅŸ, Makao Xüsusi İnzibati Ærazi Çin)", + "zh_Hans_SG": "çin (sadÉ™ləşmiÅŸ, Sinqapur)", + "zh_Hant": "çin (É™nÉ™nÉ™vi)", + "zh_Hant_HK": "çin (É™nÉ™nÉ™vi, Honq Konq Xüsusi İnzibati Ærazi Çin)", + "zh_Hant_MO": "çin (É™nÉ™nÉ™vi, Makao Xüsusi İnzibati Ærazi Çin)", + "zh_Hant_TW": "çin (É™nÉ™nÉ™vi, Tayvan)", + "zh_MO": "çin (Makao Xüsusi İnzibati Ærazi Çin)", + "zh_SG": "çin (Sinqapur)", + "zh_TW": "çin (Tayvan)", + "zu": "zulu", + "zu_ZA": "zulu (CÉ™nub Afrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/az_AZ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/az_AZ.json new file mode 100644 index 0000000000000000000000000000000000000000..e679f6cb3b1629c98b85b04d9d36e6d45d1d53db --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/az_AZ.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "az_Latn_AZ" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/az_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/az_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..f66cd23b3666670dd2c6c11a84df3cd365ca5a4e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/az_Cyrl.json @@ -0,0 +1,564 @@ +{ + "Names": { + "af": "африкаанÑ", + "af_NA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (Ðамибија)", + "af_ZA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (Ҹәнуб Ðфрика)", + "ak": "акан", + "ak_GH": "акан (Гана)", + "am": "амһар", + "am_ET": "амһар (Ефиопија)", + "ar": "әрәб", + "ar_AE": "әрәб (Бирләшмиш Әрәб Әмирликләри)", + "ar_BH": "әрәб (Бәһрејн)", + "ar_DJ": "әрәб (Ҹибути)", + "ar_DZ": "әрәб (Әлҹәзаир)", + "ar_EG": "әрәб (МиÑир)", + "ar_EH": "әрәб (QÉ™rbi Saxara)", + "ar_ER": "әрәб (Еритреја)", + "ar_IL": "әрәб (ИÑраил)", + "ar_IQ": "әрәб (Ираг)", + "ar_JO": "әрәб (Иорданија)", + "ar_KM": "әрәб (Комор адалары)", + "ar_KW": "әрәб (Күвејт)", + "ar_LB": "әрәб (Ливан)", + "ar_LY": "әрәб (Ливија)", + "ar_MA": "әрәб (Мәракеш)", + "ar_MR": "әрәб (Мавританија)", + "ar_OM": "әрәб (Оман)", + "ar_PS": "әрәб (FÉ™lÉ™stin ÆrazilÉ™ri)", + "ar_QA": "әрәб (Гәтәр)", + "ar_SA": "әрәб (Сәудијјә ӘрәбиÑтаны)", + "ar_SD": "әрәб (Судан)", + "ar_SO": "әрәб (Сомали)", + "ar_SS": "әрәб (Ҹәнуби Судан)", + "ar_SY": "әрәб (Сурија)", + "ar_TD": "әрәб (Чад)", + "ar_TN": "әрәб (ТуниÑ)", + "ar_YE": "әрәб (Јәмән)", + "as": "аÑÑам", + "as_IN": "аÑÑам (ҺиндиÑтан)", + "az": "азәрбајҹан", + "az_AZ": "азәрбајҹан (Ðзәрбајҹан)", + "az_Cyrl": "азәрбајҹан (Кирил)", + "az_Cyrl_AZ": "азәрбајҹан (Кирил, Ðзәрбајҹан)", + "az_Latn": "азәрбајҹан (latın)", + "az_Latn_AZ": "азәрбајҹан (latın, Ðзәрбајҹан)", + "be": "беларуÑ", + "be_BY": "Ð±ÐµÐ»Ð°Ñ€ÑƒÑ (БеларуÑ)", + "bg": "булгар", + "bg_BG": "булгар (БолгарыÑтан)", + "bm": "бамбара", + "bm_ML": "бамбара (Мали)", + "bn": "бенгал", + "bn_BD": "бенгал (Бангладеш)", + "bn_IN": "бенгал (ҺиндиÑтан)", + "bo": "тибет", + "bo_CN": "тибет (Чин)", + "bo_IN": "тибет (ҺиндиÑтан)", + "br": "бретон", + "br_FR": "бретон (ФранÑа)", + "bs": "боÑниак", + "bs_BA": "боÑниак (БоÑнија вә ҺерÑеговина)", + "bs_Cyrl": "боÑниак (Кирил)", + "bs_Cyrl_BA": "боÑниак (Кирил, БоÑнија вә ҺерÑеговина)", + "bs_Latn": "боÑниак (latın)", + "bs_Latn_BA": "боÑниак (latın, БоÑнија вә ҺерÑеговина)", + "ca": "каталан", + "ca_AD": "каталан (Ðндорра)", + "ca_ES": "каталан (ИÑпанија)", + "ca_FR": "каталан (ФранÑа)", + "ca_IT": "каталан (Италија)", + "ce": "чечен", + "ce_RU": "чечен (РуÑија)", + "cs": "чех", + "cs_CZ": "чех (Чех РеÑпубликаÑÑ‹)", + "cy": "уелÑ", + "cy_GB": "ÑƒÐµÐ»Ñ (Бирләшмиш Краллыг)", + "da": "данимарка", + "da_DK": "данимарка (Данимарка)", + "da_GL": "данимарка (Гренландија)", + "de": "алман", + "de_AT": "алман (ÐвÑтрија)", + "de_BE": "алман (Белчика)", + "de_CH": "алман (ИÑвечрә)", + "de_DE": "алман (Ðлманија)", + "de_IT": "алман (Италија)", + "de_LI": "алман (Лихтенштејн)", + "de_LU": "алман (ЛүкÑембург)", + "dz": "дзонга", + "dz_BT": "дзонга (Бутан)", + "ee": "еве", + "ee_GH": "еве (Гана)", + "ee_TG": "еве (Того)", + "el": "јунан", + "el_CY": "јунан (Кипр)", + "el_GR": "јунан (ЈунаныÑтан)", + "en": "инÒилиÑ", + "en_AG": "инÒÐ¸Ð»Ð¸Ñ (Ðнтигуа вә Барбуда)", + "en_AI": "инÒÐ¸Ð»Ð¸Ñ (ÐнÒилја)", + "en_AS": "инÒÐ¸Ð»Ð¸Ñ (Ðмерика СамоаÑÑ‹)", + "en_AT": "инÒÐ¸Ð»Ð¸Ñ (ÐвÑтрија)", + "en_AU": "инÒÐ¸Ð»Ð¸Ñ (ÐвÑтралија)", + "en_BB": "инÒÐ¸Ð»Ð¸Ñ (БарбадоÑ)", + "en_BE": "инÒÐ¸Ð»Ð¸Ñ (Белчика)", + "en_BI": "инÒÐ¸Ð»Ð¸Ñ (Бурунди)", + "en_BM": "инÒÐ¸Ð»Ð¸Ñ (Бермуд адалары)", + "en_BS": "инÒÐ¸Ð»Ð¸Ñ (Баһам адалары)", + "en_BW": "инÒÐ¸Ð»Ð¸Ñ (БотÑвана)", + "en_BZ": "инÒÐ¸Ð»Ð¸Ñ (Белиз)", + "en_CA": "инÒÐ¸Ð»Ð¸Ñ (Канада)", + "en_CC": "инÒÐ¸Ð»Ð¸Ñ (ÐšÐ¾ÐºÐ¾Ñ (Килинг) адалары)", + "en_CH": "инÒÐ¸Ð»Ð¸Ñ (ИÑвечрә)", + "en_CK": "инÒÐ¸Ð»Ð¸Ñ (Кук адалары)", + "en_CM": "инÒÐ¸Ð»Ð¸Ñ (Камерун)", + "en_CX": "инÒÐ¸Ð»Ð¸Ñ (Милад адаÑÑ‹)", + "en_CY": "инÒÐ¸Ð»Ð¸Ñ (Кипр)", + "en_DE": "инÒÐ¸Ð»Ð¸Ñ (Ðлманија)", + "en_DG": "инÒÐ¸Ð»Ð¸Ñ (Диего ГарÑија)", + "en_DK": "инÒÐ¸Ð»Ð¸Ñ (Данимарка)", + "en_DM": "инÒÐ¸Ð»Ð¸Ñ (Доминика)", + "en_ER": "инÒÐ¸Ð»Ð¸Ñ (Еритреја)", + "en_FI": "инÒÐ¸Ð»Ð¸Ñ (Финландија)", + "en_FJ": "инÒÐ¸Ð»Ð¸Ñ (Фиҹи)", + "en_FK": "инÒÐ¸Ð»Ð¸Ñ (Фолкленд адалары)", + "en_FM": "инÒÐ¸Ð»Ð¸Ñ (Микронезија)", + "en_GB": "инÒÐ¸Ð»Ð¸Ñ (Бирләшмиш Краллыг)", + "en_GD": "инÒÐ¸Ð»Ð¸Ñ (Гренада)", + "en_GG": "инÒÐ¸Ð»Ð¸Ñ (ҜернÑи)", + "en_GH": "инÒÐ¸Ð»Ð¸Ñ (Гана)", + "en_GI": "инÒÐ¸Ð»Ð¸Ñ (Ҹәбәллүтариг)", + "en_GM": "инÒÐ¸Ð»Ð¸Ñ (Гамбија)", + "en_GU": "инÒÐ¸Ð»Ð¸Ñ (Гуам)", + "en_GY": "инÒÐ¸Ð»Ð¸Ñ (Гајана)", + "en_HK": "инÒÐ¸Ð»Ð¸Ñ (Һонк Конг Ð¥Ò¯ÑуÑи Инзибати Әрази Чин)", + "en_IE": "инÒÐ¸Ð»Ð¸Ñ (Ирландија)", + "en_IL": "инÒÐ¸Ð»Ð¸Ñ (ИÑраил)", + "en_IM": "инÒÐ¸Ð»Ð¸Ñ (Мен адаÑÑ‹)", + "en_IN": "инÒÐ¸Ð»Ð¸Ñ (ҺиндиÑтан)", + "en_IO": "инÒÐ¸Ð»Ð¸Ñ (Британтјанын Һинд Океаны ӘразиÑи)", + "en_JE": "инÒÐ¸Ð»Ð¸Ñ (ҸерÑи)", + "en_JM": "инÒÐ¸Ð»Ð¸Ñ (Јамајка)", + "en_KE": "инÒÐ¸Ð»Ð¸Ñ (Кенија)", + "en_KI": "инÒÐ¸Ð»Ð¸Ñ (Кирибати)", + "en_KN": "инÒÐ¸Ð»Ð¸Ñ (Сент-ÐšÐ¸Ñ‚Ñ Ð²Ó™ ÐевиÑ)", + "en_KY": "инÒÐ¸Ð»Ð¸Ñ (Кајман адалары)", + "en_LC": "инÒÐ¸Ð»Ð¸Ñ (Сент-ЛуÑија)", + "en_LR": "инÒÐ¸Ð»Ð¸Ñ (Либерија)", + "en_LS": "инÒÐ¸Ð»Ð¸Ñ (ЛеÑото)", + "en_MG": "инÒÐ¸Ð»Ð¸Ñ (МадагаÑкар)", + "en_MH": "инÒÐ¸Ð»Ð¸Ñ (Маршал адалары)", + "en_MO": "инÒÐ¸Ð»Ð¸Ñ (Макао Ð¥Ò¯ÑуÑи Инзибати Әрази Чин)", + "en_MP": "инÒÐ¸Ð»Ð¸Ñ (Шимали Мариан адалары)", + "en_MS": "инÒÐ¸Ð»Ð¸Ñ (МонÑерат)", + "en_MT": "инÒÐ¸Ð»Ð¸Ñ (Малта)", + "en_MU": "инÒÐ¸Ð»Ð¸Ñ (Маврики)", + "en_MW": "инÒÐ¸Ð»Ð¸Ñ (Малави)", + "en_MY": "инÒÐ¸Ð»Ð¸Ñ (Малајзија)", + "en_NA": "инÒÐ¸Ð»Ð¸Ñ (Ðамибија)", + "en_NF": "инÒÐ¸Ð»Ð¸Ñ (Ðорфолк адаÑÑ‹)", + "en_NG": "инÒÐ¸Ð»Ð¸Ñ (ÐиÒерија)", + "en_NL": "инÒÐ¸Ð»Ð¸Ñ (Ðидерланд)", + "en_NR": "инÒÐ¸Ð»Ð¸Ñ (Ðауру)", + "en_NU": "инÒÐ¸Ð»Ð¸Ñ (Ðиуе)", + "en_NZ": "инÒÐ¸Ð»Ð¸Ñ (Јени Зеландија)", + "en_PG": "инÒÐ¸Ð»Ð¸Ñ (Папуа-Јени Гвинеја)", + "en_PH": "инÒÐ¸Ð»Ð¸Ñ (Филиппин)", + "en_PK": "инÒÐ¸Ð»Ð¸Ñ (ПакиÑтан)", + "en_PN": "инÒÐ¸Ð»Ð¸Ñ (Питкерн адалары)", + "en_PR": "инÒÐ¸Ð»Ð¸Ñ (Пуерто Рико)", + "en_PW": "инÒÐ¸Ð»Ð¸Ñ (Палау)", + "en_RW": "инÒÐ¸Ð»Ð¸Ñ (Руанда)", + "en_SB": "инÒÐ¸Ð»Ð¸Ñ (Соломон адалары)", + "en_SC": "инÒÐ¸Ð»Ð¸Ñ (Сејшел адалары)", + "en_SD": "инÒÐ¸Ð»Ð¸Ñ (Судан)", + "en_SE": "инÒÐ¸Ð»Ð¸Ñ (ИÑвеч)", + "en_SG": "инÒÐ¸Ð»Ð¸Ñ (Сингапур)", + "en_SH": "инÒÐ¸Ð»Ð¸Ñ (ÐœÒ¯Ð³Ó™Ð´Ð´Ó™Ñ ÐˆÐµÐ»ÐµÐ½Ð°)", + "en_SI": "инÒÐ¸Ð»Ð¸Ñ (Словенија)", + "en_SL": "инÒÐ¸Ð»Ð¸Ñ (Сјерра-Леоне)", + "en_SS": "инÒÐ¸Ð»Ð¸Ñ (Ҹәнуби Судан)", + "en_SX": "инÒÐ¸Ð»Ð¸Ñ (Синт-Мартен)", + "en_SZ": "инÒÐ¸Ð»Ð¸Ñ (Свазиленд)", + "en_TC": "инÒÐ¸Ð»Ð¸Ñ (Ð¢Ó©Ñ€ÐºÑ Ð²Ó™ ÐšÐ°Ñ˜ÐºÐ¾Ñ Ð°Ð´Ð°Ð»Ð°Ñ€Ñ‹)", + "en_TK": "инÒÐ¸Ð»Ð¸Ñ (Токелау)", + "en_TO": "инÒÐ¸Ð»Ð¸Ñ (Тонга)", + "en_TT": "инÒÐ¸Ð»Ð¸Ñ (Тринидад вә Тобаго)", + "en_TV": "инÒÐ¸Ð»Ð¸Ñ (Тувалу)", + "en_TZ": "инÒÐ¸Ð»Ð¸Ñ (Танзанија)", + "en_UG": "инÒÐ¸Ð»Ð¸Ñ (Уганда)", + "en_UM": "инÒÐ¸Ð»Ð¸Ñ (ÐБШ-а бағлы кичик адаҹыглар)", + "en_US": "инÒÐ¸Ð»Ð¸Ñ (Ðмерика Бирләшмиш Штатлары)", + "en_VC": "инÒÐ¸Ð»Ð¸Ñ (Сент-ВинÑент вә Гренадинләр)", + "en_VG": "инÒÐ¸Ð»Ð¸Ñ (Британијанын ВирÒин адалары)", + "en_VI": "инÒÐ¸Ð»Ð¸Ñ (ÐБШ ВирÒин адалары)", + "en_VU": "инÒÐ¸Ð»Ð¸Ñ (Вануату)", + "en_WS": "инÒÐ¸Ð»Ð¸Ñ (Самоа)", + "en_ZA": "инÒÐ¸Ð»Ð¸Ñ (Ҹәнуб Ðфрика)", + "en_ZM": "инÒÐ¸Ð»Ð¸Ñ (Замбија)", + "en_ZW": "инÒÐ¸Ð»Ð¸Ñ (Зимбабве)", + "eo": "еÑперанто", + "es": "иÑпан", + "es_AR": "иÑпан (ÐÑ€Òентина)", + "es_BO": "иÑпан (Боливија)", + "es_BR": "иÑпан (Бразилија)", + "es_CL": "иÑпан (Чили)", + "es_CO": "иÑпан (Колумбија)", + "es_CR": "иÑпан (КоÑта Рика)", + "es_CU": "иÑпан (Куба)", + "es_DO": "иÑпан (Доминикан РеÑпубликаÑÑ‹)", + "es_EA": "иÑпан (Сеута вә Мелилја)", + "es_EC": "иÑпан (Еквадор)", + "es_ES": "иÑпан (ИÑпанија)", + "es_GQ": "иÑпан (Екваториал Гвинеја)", + "es_GT": "иÑпан (Гватемала)", + "es_HN": "иÑпан (ҺондураÑ)", + "es_IC": "иÑпан (Канар адалары)", + "es_MX": "иÑпан (МекÑика)", + "es_NI": "иÑпан (Ðикарагуа)", + "es_PA": "иÑпан (Панама)", + "es_PE": "иÑпан (Перу)", + "es_PH": "иÑпан (Филиппин)", + "es_PR": "иÑпан (Пуерто Рико)", + "es_PY": "иÑпан (Парагвај)", + "es_SV": "иÑпан (Салвадор)", + "es_US": "иÑпан (Ðмерика Бирләшмиш Штатлары)", + "es_UY": "иÑпан (Уругвај)", + "es_VE": "иÑпан (ВенеÑуела)", + "et": "еÑтон", + "et_EE": "еÑтон (ЕÑтонија)", + "eu": "баÑк", + "eu_ES": "баÑк (ИÑпанија)", + "fa": "фарÑ", + "fa_AF": "Ñ„Ð°Ñ€Ñ (ӘфганыÑтан)", + "fa_IR": "Ñ„Ð°Ñ€Ñ (Иран)", + "ff": "фула", + "ff_CM": "фула (Камерун)", + "ff_GN": "фула (Гвинеја)", + "ff_MR": "фула (Мавританија)", + "ff_SN": "фула (Сенегал)", + "fi": "фин", + "fi_FI": "фин (Финландија)", + "fo": "фарер", + "fo_DK": "фарер (Данимарка)", + "fo_FO": "фарер (Фарер адалары)", + "fr": "франÑыз", + "fr_BE": "франÑыз (Белчика)", + "fr_BF": "франÑыз (Буркина ФаÑо)", + "fr_BI": "франÑыз (Бурунди)", + "fr_BJ": "франÑыз (Бенин)", + "fr_BL": "франÑыз (Сент-Бартелеми)", + "fr_CA": "франÑыз (Канада)", + "fr_CD": "франÑыз (Конго-КиншаÑа)", + "fr_CF": "франÑыз (Мәркәзи Ðфрика РеÑпубликаÑÑ‹)", + "fr_CG": "франÑыз (Конго-Браззавил)", + "fr_CH": "франÑыз (ИÑвечрә)", + "fr_CI": "франÑыз (Kотд’ивуар)", + "fr_CM": "франÑыз (Камерун)", + "fr_DJ": "франÑыз (Ҹибути)", + "fr_DZ": "франÑыз (Әлҹәзаир)", + "fr_FR": "франÑыз (ФранÑа)", + "fr_GA": "франÑыз (Габон)", + "fr_GF": "франÑыз (ФранÑа ГвианаÑÑ‹)", + "fr_GN": "франÑыз (Гвинеја)", + "fr_GP": "франÑыз (Гваделупа)", + "fr_GQ": "франÑыз (Екваториал Гвинеја)", + "fr_HT": "франÑыз (Һаити)", + "fr_KM": "франÑыз (Комор адалары)", + "fr_LU": "франÑыз (ЛүкÑембург)", + "fr_MA": "франÑыз (Мәракеш)", + "fr_MC": "франÑыз (Монако)", + "fr_MF": "франÑыз (Сент Мартин)", + "fr_MG": "франÑыз (МадагаÑкар)", + "fr_ML": "франÑыз (Мали)", + "fr_MQ": "франÑыз (Мартиник)", + "fr_MR": "франÑыз (Мавританија)", + "fr_MU": "франÑыз (Маврики)", + "fr_NC": "франÑыз (Јени Каледонија)", + "fr_NE": "франÑыз (ÐиÒер)", + "fr_PF": "франÑыз (ФранÑа ПолинезијаÑÑ‹)", + "fr_PM": "франÑыз (ÐœÒ¯Ð³Ó™Ð´Ð´Ó™Ñ ÐŸÑ˜ÐµÑ€ вә Микелон)", + "fr_RE": "франÑыз (Рејунјон)", + "fr_RW": "франÑыз (Руанда)", + "fr_SC": "франÑыз (Сејшел адалары)", + "fr_SN": "франÑыз (Сенегал)", + "fr_SY": "франÑыз (Сурија)", + "fr_TD": "франÑыз (Чад)", + "fr_TG": "франÑыз (Того)", + "fr_TN": "франÑыз (ТуниÑ)", + "fr_VU": "франÑыз (Вануату)", + "fr_WF": "франÑыз (Ð£Ð¾Ð»Ð»Ð¸Ñ Ð²Ó™ Футуна)", + "fr_YT": "франÑыз (Мајот)", + "fy": "гәрби фриз", + "fy_NL": "гәрби фриз (Ðидерланд)", + "ga": "ирланд", + "ga_IE": "ирланд (Ирландија)", + "gd": "шотланд келт", + "gd_GB": "шотланд келт (Бирләшмиш Краллыг)", + "gl": "галиÑија", + "gl_ES": "галиÑија (ИÑпанија)", + "gu": "гуҹарат", + "gu_IN": "гуҹарат (ҺиндиÑтан)", + "gv": "манкÑ", + "gv_IM": "Ð¼Ð°Ð½ÐºÑ (Мен адаÑÑ‹)", + "ha": "һауÑа", + "ha_GH": "һауÑа (Гана)", + "ha_NE": "һауÑа (ÐиÒер)", + "ha_NG": "һауÑа (ÐиÒерија)", + "he": "иврит", + "he_IL": "иврит (ИÑраил)", + "hi": "һинд", + "hi_IN": "һинд (ҺиндиÑтан)", + "hr": "хорват", + "hr_BA": "хорват (БоÑнија вә ҺерÑеговина)", + "hr_HR": "хорват (Хорватија)", + "hu": "маҹар", + "hu_HU": "маҹар (МаҹарыÑтан)", + "hy": "ермәни", + "hy_AM": "ермәни (ЕрмәниÑтан)", + "id": "индонезија", + "id_ID": "индонезија (Индонезија)", + "ig": "игбо", + "ig_NG": "игбо (ÐиÒерија)", + "ii_CN": "siçuan yi (Чин)", + "is": "иÑланд", + "is_IS": "иÑланд (ИÑландија)", + "it": "италјан", + "it_CH": "италјан (ИÑвечрә)", + "it_IT": "италјан (Италија)", + "it_SM": "италјан (Сан-Марино)", + "ja": "јапон", + "ja_JP": "јапон (Јапонија)", + "ka": "Òүрҹү", + "ka_GE": "Òүрҹү (ҜүрҹүÑтан)", + "ki": "кикују", + "ki_KE": "кикују (Кенија)", + "kk": "газах", + "kk_KZ": "газах (ГазахыÑтан)", + "kl": "калааллиÑут", + "kl_GL": "калааллиÑут (Гренландија)", + "km": "кхмер", + "km_KH": "кхмер (Камбоҹа)", + "kn": "каннада", + "kn_IN": "каннада (ҺиндиÑтан)", + "ko": "кореја", + "ko_KP": "кореја (Шимали Кореја)", + "ko_KR": "кореја (Ҹәнуби Кореја)", + "ks": "кәшмир", + "ks_IN": "кәшмир (ҺиндиÑтан)", + "kw": "корн", + "kw_GB": "корн (Бирләшмиш Краллыг)", + "ky": "гырғыз", + "ky_KG": "гырғыз (ГырғызыÑтан)", + "lb": "лүкÑембург", + "lb_LU": "лүкÑембург (ЛүкÑембург)", + "lg": "ганда", + "lg_UG": "ганда (Уганда)", + "ln": "лингала", + "ln_AO": "лингала (Ðнгола)", + "ln_CD": "лингала (Конго-КиншаÑа)", + "ln_CF": "лингала (Мәркәзи Ðфрика РеÑпубликаÑÑ‹)", + "ln_CG": "лингала (Конго-Браззавил)", + "lo": "лаоÑ", + "lo_LA": "Ð»Ð°Ð¾Ñ (ЛаоÑ)", + "lt": "литва", + "lt_LT": "литва (Литва)", + "lu": "луба-катанга", + "lu_CD": "луба-катанга (Конго-КиншаÑа)", + "lv": "латыш", + "lv_LV": "латыш (Латвија)", + "mg": "малагаÑ", + "mg_MG": "Ð¼Ð°Ð»Ð°Ð³Ð°Ñ (МадагаÑкар)", + "mk": "македон", + "mk_MK": "македон (Makedoniya)", + "ml": "малајалам", + "ml_IN": "малајалам (ҺиндиÑтан)", + "mn": "монгол", + "mn_MN": "монгол (МонголуÑтан)", + "mr": "маратһи", + "mr_IN": "маратһи (ҺиндиÑтан)", + "ms": "малај", + "ms_BN": "малај (Брунеј)", + "ms_MY": "малај (Малајзија)", + "ms_SG": "малај (Сингапур)", + "mt": "малта", + "mt_MT": "малта (Малта)", + "my": "бирман", + "my_MM": "бирман (Мјанма)", + "nb": "бокмал норвеч", + "nb_NO": "бокмал норвеч (Ðорвеч)", + "nb_SJ": "бокмал норвеч (Свалбард вә Јан-Мајен)", + "nd": "шимали ндебеле", + "nd_ZW": "шимали ндебеле (Зимбабве)", + "ne": "непал", + "ne_IN": "непал (ҺиндиÑтан)", + "ne_NP": "непал (Ðепал)", + "nl": "һолланд", + "nl_AW": "һолланд (Ðруба)", + "nl_BE": "һолланд (Белчика)", + "nl_BQ": "һолланд (Karib Niderlandı)", + "nl_CW": "һолланд (КураÑао)", + "nl_NL": "һолланд (Ðидерланд)", + "nl_SR": "һолланд (Суринам)", + "nl_SX": "һолланд (Синт-Мартен)", + "nn": "нүнорÑк норвеч", + "nn_NO": "нүнорÑк норвеч (Ðорвеч)", + "no_NO": "norveç (Ðорвеч)", + "om": "оромо", + "om_ET": "оромо (Ефиопија)", + "om_KE": "оромо (Кенија)", + "or": "одија", + "or_IN": "одија (ҺиндиÑтан)", + "os": "оÑетин", + "os_GE": "оÑетин (ҜүрҹүÑтан)", + "os_RU": "оÑетин (РуÑија)", + "pa": "пәнҹаб", + "pa_Arab": "пәнҹаб (É™rÉ™b)", + "pa_Arab_PK": "пәнҹаб (É™rÉ™b, ПакиÑтан)", + "pa_Guru": "пәнҹаб (qurmuxi)", + "pa_Guru_IN": "пәнҹаб (qurmuxi, ҺиндиÑтан)", + "pa_IN": "пәнҹаб (ҺиндиÑтан)", + "pa_PK": "пәнҹаб (ПакиÑтан)", + "pl": "полјак", + "pl_PL": "полјак (Полша)", + "ps": "пушту", + "ps_AF": "пушту (ӘфганыÑтан)", + "pt": "португал", + "pt_AO": "португал (Ðнгола)", + "pt_BR": "португал (Бразилија)", + "pt_CH": "португал (ИÑвечрә)", + "pt_CV": "португал (Кабо-Верде)", + "pt_GQ": "португал (Екваториал Гвинеја)", + "pt_GW": "португал (Гвинеја-БиÑау)", + "pt_LU": "португал (ЛүкÑембург)", + "pt_MO": "португал (Макао Ð¥Ò¯ÑуÑи Инзибати Әрази Чин)", + "pt_MZ": "португал (Мозамбик)", + "pt_PT": "португал (Португалија)", + "pt_ST": "португал (Сан-Томе вә ПринÑипи)", + "pt_TL": "португал (Шәрги Тимор)", + "qu": "кечуа", + "qu_BO": "кечуа (Боливија)", + "qu_EC": "кечуа (Еквадор)", + "qu_PE": "кечуа (Перу)", + "rm": "романш", + "rm_CH": "романш (ИÑвечрә)", + "rn": "рунди", + "rn_BI": "рунди (Бурунди)", + "ro": "румын", + "ro_MD": "румын (Молдова)", + "ro_RO": "румын (Румынија)", + "ru": "руÑ", + "ru_BY": "Ñ€ÑƒÑ (БеларуÑ)", + "ru_KG": "Ñ€ÑƒÑ (ГырғызыÑтан)", + "ru_KZ": "Ñ€ÑƒÑ (ГазахыÑтан)", + "ru_MD": "Ñ€ÑƒÑ (Молдова)", + "ru_RU": "Ñ€ÑƒÑ (РуÑија)", + "ru_UA": "Ñ€ÑƒÑ (Украјна)", + "rw": "кинјарванда", + "rw_RW": "кинјарванда (Руанда)", + "se": "шимали Ñами", + "se_FI": "шимали Ñами (Финландија)", + "se_NO": "шимали Ñами (Ðорвеч)", + "se_SE": "шимали Ñами (ИÑвеч)", + "sg": "Ñанго", + "sg_CF": "Ñанго (Мәркәзи Ðфрика РеÑпубликаÑÑ‹)", + "sh_BA": "serb-xorvat (БоÑнија вә ҺерÑеговина)", + "si": "Ñинһала", + "si_LK": "Ñинһала (Шри-Ланка)", + "sk": "Ñловак", + "sk_SK": "Ñловак (Словакија)", + "sl": "Ñловен", + "sl_SI": "Ñловен (Словенија)", + "sn": "шона", + "sn_ZW": "шона (Зимбабве)", + "so": "Ñомали", + "so_DJ": "Ñомали (Ҹибути)", + "so_ET": "Ñомали (Ефиопија)", + "so_KE": "Ñомали (Кенија)", + "so_SO": "Ñомали (Сомали)", + "sq": "албан", + "sq_AL": "албан (Ðлбанија)", + "sq_MK": "албан (Makedoniya)", + "sq_XK": "албан (КоÑово)", + "sr": "Ñерб", + "sr_BA": "Ñерб (БоÑнија вә ҺерÑеговина)", + "sr_Cyrl": "Ñерб (Кирил)", + "sr_Cyrl_BA": "Ñерб (Кирил, БоÑнија вә ҺерÑеговина)", + "sr_Cyrl_ME": "Ñерб (Кирил, Монтенегро)", + "sr_Cyrl_RS": "Ñерб (Кирил, Сербија)", + "sr_Cyrl_XK": "Ñерб (Кирил, КоÑово)", + "sr_Latn": "Ñерб (latın)", + "sr_Latn_BA": "Ñерб (latın, БоÑнија вә ҺерÑеговина)", + "sr_Latn_ME": "Ñерб (latın, Монтенегро)", + "sr_Latn_RS": "Ñерб (latın, Сербија)", + "sr_Latn_XK": "Ñерб (latın, КоÑово)", + "sr_ME": "Ñерб (Монтенегро)", + "sr_RS": "Ñерб (Сербија)", + "sr_XK": "Ñерб (КоÑово)", + "sv": "иÑвеч", + "sv_AX": "иÑвеч (Ðланд адалары)", + "sv_FI": "иÑвеч (Финландија)", + "sv_SE": "иÑвеч (ИÑвеч)", + "sw": "Ñуаһили", + "sw_CD": "Ñуаһили (Конго-КиншаÑа)", + "sw_KE": "Ñуаһили (Кенија)", + "sw_TZ": "Ñуаһили (Танзанија)", + "sw_UG": "Ñуаһили (Уганда)", + "ta": "тамил", + "ta_IN": "тамил (ҺиндиÑтан)", + "ta_LK": "тамил (Шри-Ланка)", + "ta_MY": "тамил (Малајзија)", + "ta_SG": "тамил (Сингапур)", + "te": "телугу", + "te_IN": "телугу (ҺиндиÑтан)", + "th": "тај", + "th_TH": "тај (Таиланд)", + "ti": "тигрин", + "ti_ER": "тигрин (Еритреја)", + "ti_ET": "тигрин (Ефиопија)", + "tl_PH": "taqaloq (Филиппин)", + "to": "тонган", + "to_TO": "тонган (Тонга)", + "tr": "түрк", + "tr_CY": "түрк (Кипр)", + "tr_TR": "түрк (Түркијә)", + "ug": "ујғур", + "ug_CN": "ујғур (Чин)", + "uk": "украјна", + "uk_UA": "украјна (Украјна)", + "ur": "урду", + "ur_IN": "урду (ҺиндиÑтан)", + "ur_PK": "урду (ПакиÑтан)", + "uz": "өзбәк", + "uz_AF": "өзбәк (ӘфганыÑтан)", + "uz_Arab": "өзбәк (É™rÉ™b)", + "uz_Arab_AF": "өзбәк (É™rÉ™b, ӘфганыÑтан)", + "uz_Cyrl": "өзбәк (Кирил)", + "uz_Cyrl_UZ": "өзбәк (Кирил, ӨзбәкиÑтан)", + "uz_Latn": "өзбәк (latın)", + "uz_Latn_UZ": "өзбәк (latın, ӨзбәкиÑтан)", + "uz_UZ": "өзбәк (ӨзбәкиÑтан)", + "vi": "вјетнам", + "vi_VN": "вјетнам (Вјетнам)", + "yi": "идиш", + "yo": "јоруба", + "yo_BJ": "јоруба (Бенин)", + "yo_NG": "јоруба (ÐиÒерија)", + "zh": "чин", + "zh_CN": "чин (Чин)", + "zh_HK": "чин (Һонк Конг Ð¥Ò¯ÑуÑи Инзибати Әрази Чин)", + "zh_Hans": "чин (sadÉ™ləşmiÅŸ)", + "zh_Hans_CN": "чин (sadÉ™ləşmiÅŸ, Чин)", + "zh_Hans_HK": "чин (sadÉ™ləşmiÅŸ, Һонк Конг Ð¥Ò¯ÑуÑи Инзибати Әрази Чин)", + "zh_Hans_MO": "чин (sadÉ™ləşmiÅŸ, Макао Ð¥Ò¯ÑуÑи Инзибати Әрази Чин)", + "zh_Hans_SG": "чин (sadÉ™ləşmiÅŸ, Сингапур)", + "zh_Hant": "чин (É™nÉ™nÉ™vi)", + "zh_Hant_HK": "чин (É™nÉ™nÉ™vi, Һонк Конг Ð¥Ò¯ÑуÑи Инзибати Әрази Чин)", + "zh_Hant_MO": "чин (É™nÉ™nÉ™vi, Макао Ð¥Ò¯ÑуÑи Инзибати Әрази Чин)", + "zh_Hant_TW": "чин (É™nÉ™nÉ™vi, Тајван)", + "zh_MO": "чин (Макао Ð¥Ò¯ÑуÑи Инзибати Әрази Чин)", + "zh_SG": "чин (Сингапур)", + "zh_TW": "чин (Тајван)", + "zu": "зулу", + "zu_ZA": "зулу (Ҹәнуб Ðфрика)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/be.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/be.json new file mode 100644 index 0000000000000000000000000000000000000000..547b830d535622efa37f60a5c15d16038faaf7ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/be.json @@ -0,0 +1,566 @@ +{ + "Names": { + "af": "афрыкаанÑ", + "af_NA": "Ð°Ñ„Ñ€Ñ‹ÐºÐ°Ð°Ð½Ñ (ÐамібіÑ)", + "af_ZA": "Ð°Ñ„Ñ€Ñ‹ÐºÐ°Ð°Ð½Ñ (ПаўднёваафрыканÑÐºÐ°Ñ Ð ÑÑпубліка)", + "ak": "акан", + "ak_GH": "акан (Гана)", + "am": "амхарÑкаÑ", + "am_ET": "амхарÑÐºÐ°Ñ (ЭфіопіÑ)", + "ar": "арабÑкаÑ", + "ar_AE": "арабÑÐºÐ°Ñ (Ðб’ÑÐ´Ð½Ð°Ð½Ñ‹Ñ ÐрабÑÐºÑ–Ñ Ð­Ð¼Ñ–Ñ€Ð°Ñ‚Ñ‹)", + "ar_BH": "арабÑÐºÐ°Ñ (БахрÑйн)", + "ar_DJ": "арабÑÐºÐ°Ñ (Джыбуці)", + "ar_DZ": "арабÑÐºÐ°Ñ (Ðлжыр)", + "ar_EG": "арабÑÐºÐ°Ñ (Егіпет)", + "ar_EH": "арабÑÐºÐ°Ñ (ЗаходнÑÑ Ð¡Ð°Ñ…Ð°Ñ€Ð°)", + "ar_ER": "арабÑÐºÐ°Ñ (ЭрытрÑÑ)", + "ar_IL": "арабÑÐºÐ°Ñ (Ізраіль)", + "ar_IQ": "арабÑÐºÐ°Ñ (Ірак)", + "ar_JO": "арабÑÐºÐ°Ñ (ІарданіÑ)", + "ar_KM": "арабÑÐºÐ°Ñ (КаморÑÐºÑ–Ñ ÐÑтравы)", + "ar_KW": "арабÑÐºÐ°Ñ (Кувейт)", + "ar_LB": "арабÑÐºÐ°Ñ (Ліван)", + "ar_LY": "арабÑÐºÐ°Ñ (ЛівіÑ)", + "ar_MA": "арабÑÐºÐ°Ñ (Марока)", + "ar_MR": "арабÑÐºÐ°Ñ (МаўрытаніÑ)", + "ar_OM": "арабÑÐºÐ°Ñ (Ðман)", + "ar_PS": "арабÑÐºÐ°Ñ (ПалеÑцінÑÐºÑ–Ñ Ð¢Ñрыторыі)", + "ar_QA": "арабÑÐºÐ°Ñ (Катар)", + "ar_SA": "арабÑÐºÐ°Ñ (СаудаўÑÐºÐ°Ñ ÐравіÑ)", + "ar_SD": "арабÑÐºÐ°Ñ (Судан)", + "ar_SO": "арабÑÐºÐ°Ñ (Самалі)", + "ar_SS": "арабÑÐºÐ°Ñ (Паўднёвы Судан)", + "ar_SY": "арабÑÐºÐ°Ñ (СірыÑ)", + "ar_TD": "арабÑÐºÐ°Ñ (Чад)", + "ar_TN": "арабÑÐºÐ°Ñ (ТуніÑ)", + "ar_YE": "арабÑÐºÐ°Ñ (Емен)", + "as": "аÑамÑкаÑ", + "as_IN": "аÑамÑÐºÐ°Ñ (ІндыÑ)", + "az": "азербайджанÑкаÑ", + "az_AZ": "азербайджанÑÐºÐ°Ñ (Ðзербайджан)", + "az_Cyrl": "азербайджанÑÐºÐ°Ñ (кірыліца)", + "az_Cyrl_AZ": "азербайджанÑÐºÐ°Ñ (кірыліца, Ðзербайджан)", + "az_Latn": "азербайджанÑÐºÐ°Ñ (лацініца)", + "az_Latn_AZ": "азербайджанÑÐºÐ°Ñ (лацініца, Ðзербайджан)", + "be": "беларуÑкаÑ", + "be_BY": "беларуÑÐºÐ°Ñ (БеларуÑÑŒ)", + "bg": "балгарÑкаÑ", + "bg_BG": "балгарÑÐºÐ°Ñ (БалгарыÑ)", + "bm": "бамбара", + "bm_ML": "бамбара (Малі)", + "bn": "бенгальÑкаÑ", + "bn_BD": "бенгальÑÐºÐ°Ñ (БангладÑш)", + "bn_IN": "бенгальÑÐºÐ°Ñ (ІндыÑ)", + "bo": "тыбецкаÑ", + "bo_CN": "Ñ‚Ñ‹Ð±ÐµÑ†ÐºÐ°Ñ (Кітай)", + "bo_IN": "Ñ‚Ñ‹Ð±ÐµÑ†ÐºÐ°Ñ (ІндыÑ)", + "br": "брÑтонÑкаÑ", + "br_FR": "брÑтонÑÐºÐ°Ñ (ФранцыÑ)", + "bs": "баÑнійÑкаÑ", + "bs_BA": "баÑнійÑÐºÐ°Ñ (БоÑÐ½Ñ–Ñ Ñ– Герцагавіна)", + "bs_Cyrl": "баÑнійÑÐºÐ°Ñ (кірыліца)", + "bs_Cyrl_BA": "баÑнійÑÐºÐ°Ñ (кірыліца, БоÑÐ½Ñ–Ñ Ñ– Герцагавіна)", + "bs_Latn": "баÑнійÑÐºÐ°Ñ (лацініца)", + "bs_Latn_BA": "баÑнійÑÐºÐ°Ñ (лацініца, БоÑÐ½Ñ–Ñ Ñ– Герцагавіна)", + "ca": "каталанÑкаÑ", + "ca_AD": "каталанÑÐºÐ°Ñ (Ðндора)", + "ca_ES": "каталанÑÐºÐ°Ñ (ІÑпаніÑ)", + "ca_FR": "каталанÑÐºÐ°Ñ (ФранцыÑ)", + "ca_IT": "каталанÑÐºÐ°Ñ (ІталіÑ)", + "ce": "чачÑнÑкаÑ", + "ce_RU": "чачÑнÑÐºÐ°Ñ (РаÑÑ–Ñ)", + "cs": "чÑшÑкаÑ", + "cs_CZ": "чÑшÑÐºÐ°Ñ (ЧÑÑ…Ñ–Ñ)", + "cy": "валійÑкаÑ", + "cy_GB": "валійÑÐºÐ°Ñ (Ð’ÑлікабрытаніÑ)", + "da": "дацкаÑ", + "da_DK": "Ð´Ð°Ñ†ÐºÐ°Ñ (ДаніÑ)", + "da_GL": "Ð´Ð°Ñ†ÐºÐ°Ñ (ГрÑнландыÑ)", + "de": "нÑмецкаÑ", + "de_AT": "нÑÐ¼ÐµÑ†ÐºÐ°Ñ (ÐÑžÑтрыÑ)", + "de_BE": "нÑÐ¼ÐµÑ†ÐºÐ°Ñ (БельгіÑ)", + "de_CH": "нÑÐ¼ÐµÑ†ÐºÐ°Ñ (ШвейцарыÑ)", + "de_DE": "нÑÐ¼ÐµÑ†ÐºÐ°Ñ (ГерманіÑ)", + "de_IT": "нÑÐ¼ÐµÑ†ÐºÐ°Ñ (ІталіÑ)", + "de_LI": "нÑÐ¼ÐµÑ†ÐºÐ°Ñ (ЛіхтÑнштÑйн)", + "de_LU": "нÑÐ¼ÐµÑ†ÐºÐ°Ñ (ЛюкÑембург)", + "dz": "дзонг-кÑ", + "dz_BT": "дзонг-ÐºÑ (Бутан)", + "ee": "Ñве", + "ee_GH": "Ñве (Гана)", + "ee_TG": "Ñве (Тога)", + "el": "грÑчаÑкаÑ", + "el_CY": "грÑчаÑÐºÐ°Ñ (Кіпр)", + "el_GR": "грÑчаÑÐºÐ°Ñ (ГрÑцыÑ)", + "en": "англійÑкаÑ", + "en_AG": "англійÑÐºÐ°Ñ (Ðнтыгуа Ñ– Барбуда)", + "en_AI": "англійÑÐºÐ°Ñ (ÐнгільÑ)", + "en_AS": "англійÑÐºÐ°Ñ (ÐмерыканÑкае Самоа)", + "en_AT": "англійÑÐºÐ°Ñ (ÐÑžÑтрыÑ)", + "en_AU": "англійÑÐºÐ°Ñ (ÐÑžÑтраліÑ)", + "en_BB": "англійÑÐºÐ°Ñ (БарбадаÑ)", + "en_BE": "англійÑÐºÐ°Ñ (БельгіÑ)", + "en_BI": "англійÑÐºÐ°Ñ (Бурундзі)", + "en_BM": "англійÑÐºÐ°Ñ (БермудÑÐºÑ–Ñ Ð°Ñтравы)", + "en_BS": "англійÑÐºÐ°Ñ (Багамы)", + "en_BW": "англійÑÐºÐ°Ñ (БатÑвана)", + "en_BZ": "англійÑÐºÐ°Ñ (Беліз)", + "en_CA": "англійÑÐºÐ°Ñ (Канада)", + "en_CC": "англійÑÐºÐ°Ñ (КакоÑÐ°Ð²Ñ‹Ñ (Кілінг) аÑтравы)", + "en_CH": "англійÑÐºÐ°Ñ (ШвейцарыÑ)", + "en_CK": "англійÑÐºÐ°Ñ (ÐÑтравы Кука)", + "en_CM": "англійÑÐºÐ°Ñ (Камерун)", + "en_CX": "англійÑÐºÐ°Ñ (ВоÑтраў КалÑд)", + "en_CY": "англійÑÐºÐ°Ñ (Кіпр)", + "en_DE": "англійÑÐºÐ°Ñ (ГерманіÑ)", + "en_DG": "англійÑÐºÐ°Ñ (ВоÑтраў Дыега-ГарÑÑ–Ñ)", + "en_DK": "англійÑÐºÐ°Ñ (ДаніÑ)", + "en_DM": "англійÑÐºÐ°Ñ (Дамініка)", + "en_ER": "англійÑÐºÐ°Ñ (ЭрытрÑÑ)", + "en_FI": "англійÑÐºÐ°Ñ (ФінлÑндыÑ)", + "en_FJ": "англійÑÐºÐ°Ñ (Фіджы)", + "en_FK": "англійÑÐºÐ°Ñ (ФалклендÑÐºÑ–Ñ Ð°Ñтравы)", + "en_FM": "англійÑÐºÐ°Ñ (МікранезіÑ)", + "en_GB": "англійÑÐºÐ°Ñ (Ð’ÑлікабрытаніÑ)", + "en_GD": "англійÑÐºÐ°Ñ (ГрÑнада)", + "en_GG": "англійÑÐºÐ°Ñ (ГернÑÑ–)", + "en_GH": "англійÑÐºÐ°Ñ (Гана)", + "en_GI": "англійÑÐºÐ°Ñ (Гібралтар)", + "en_GM": "англійÑÐºÐ°Ñ (ГамбіÑ)", + "en_GU": "англійÑÐºÐ°Ñ (Гуам)", + "en_GY": "англійÑÐºÐ°Ñ (ГаÑна)", + "en_HK": "англійÑÐºÐ°Ñ (Ганконг, СÐР (Кітай))", + "en_IE": "англійÑÐºÐ°Ñ (ІрландыÑ)", + "en_IL": "англійÑÐºÐ°Ñ (Ізраіль)", + "en_IM": "англійÑÐºÐ°Ñ (ВоÑтраў МÑн)", + "en_IN": "англійÑÐºÐ°Ñ (ІндыÑ)", + "en_IO": "англійÑÐºÐ°Ñ (БрытанÑÐºÐ°Ñ Ñ‚ÑÑ€Ñ‹Ñ‚Ð¾Ñ€Ñ‹Ñ Ñž ІндыйÑкім акіÑне)", + "en_JE": "англійÑÐºÐ°Ñ (ДжÑÑ€ÑÑ–)", + "en_JM": "англійÑÐºÐ°Ñ (Ямайка)", + "en_KE": "англійÑÐºÐ°Ñ (КеніÑ)", + "en_KI": "англійÑÐºÐ°Ñ (Кірыбаці)", + "en_KN": "англійÑÐºÐ°Ñ (Сент-ÐšÑ–Ñ‚Ñ Ñ– ÐевіÑ)", + "en_KY": "англійÑÐºÐ°Ñ (Кайманавы аÑтравы)", + "en_LC": "англійÑÐºÐ°Ñ (Сент-ЛюÑÑ–Ñ)", + "en_LR": "англійÑÐºÐ°Ñ (ЛіберыÑ)", + "en_LS": "англійÑÐºÐ°Ñ (ЛеÑота)", + "en_MG": "англійÑÐºÐ°Ñ (МадагаÑкар)", + "en_MH": "англійÑÐºÐ°Ñ (Маршалавы ÐÑтравы)", + "en_MO": "англійÑÐºÐ°Ñ (Макаа, СÐР (Кітай))", + "en_MP": "англійÑÐºÐ°Ñ (ÐŸÐ°ÑžÐ½Ð¾Ñ‡Ð½Ñ‹Ñ ÐœÐ°Ñ€Ñ‹ÑнÑÐºÑ–Ñ Ð°Ñтравы)", + "en_MS": "англійÑÐºÐ°Ñ (МантÑерат)", + "en_MT": "англійÑÐºÐ°Ñ (Мальта)", + "en_MU": "англійÑÐºÐ°Ñ (Маўрыкій)", + "en_MW": "англійÑÐºÐ°Ñ (Малаві)", + "en_MY": "англійÑÐºÐ°Ñ (МалайзіÑ)", + "en_NA": "англійÑÐºÐ°Ñ (ÐамібіÑ)", + "en_NF": "англійÑÐºÐ°Ñ (ВоÑтраў Ðорфалк)", + "en_NG": "англійÑÐºÐ°Ñ (ÐігерыÑ)", + "en_NL": "англійÑÐºÐ°Ñ (ÐідÑрланды)", + "en_NR": "англійÑÐºÐ°Ñ (Ðауру)", + "en_NU": "англійÑÐºÐ°Ñ (ÐіуÑ)", + "en_NZ": "англійÑÐºÐ°Ñ (ÐÐ¾Ð²Ð°Ñ Ð—ÐµÐ»Ð°Ð½Ð´Ñ‹Ñ)", + "en_PG": "англійÑÐºÐ°Ñ (Папуа-ÐÐ¾Ð²Ð°Ñ Ð“Ð²Ñ–Ð½ÐµÑ)", + "en_PH": "англійÑÐºÐ°Ñ (Філіпіны)", + "en_PK": "англійÑÐºÐ°Ñ (ПакіÑтан)", + "en_PN": "англійÑÐºÐ°Ñ (ÐÑтравы ПіткÑрн)", + "en_PR": "англійÑÐºÐ°Ñ (ПуÑрта-Рыка)", + "en_PW": "англійÑÐºÐ°Ñ (Палау)", + "en_RW": "англійÑÐºÐ°Ñ (Руанда)", + "en_SB": "англійÑÐºÐ°Ñ (Саламонавы ÐÑтравы)", + "en_SC": "англійÑÐºÐ°Ñ (СейшÑльÑÐºÑ–Ñ ÐÑтравы)", + "en_SD": "англійÑÐºÐ°Ñ (Судан)", + "en_SE": "англійÑÐºÐ°Ñ (ШвецыÑ)", + "en_SG": "англійÑÐºÐ°Ñ (Сінгапур)", + "en_SH": "англійÑÐºÐ°Ñ (ВоÑтраў СвÑтой Ðлены)", + "en_SI": "англійÑÐºÐ°Ñ (СлавеніÑ)", + "en_SL": "англійÑÐºÐ°Ñ (Сьера-ЛеонÑ)", + "en_SS": "англійÑÐºÐ°Ñ (Паўднёвы Судан)", + "en_SX": "англійÑÐºÐ°Ñ (Сінт-МартÑн)", + "en_SZ": "англійÑÐºÐ°Ñ (Свазіленд)", + "en_TC": "англійÑÐºÐ°Ñ (Ð¦Ñ‘Ñ€ÐºÑ Ñ– КайкаÑ)", + "en_TK": "англійÑÐºÐ°Ñ (Такелау)", + "en_TO": "англійÑÐºÐ°Ñ (Тонга)", + "en_TT": "англійÑÐºÐ°Ñ (Трынідад Ñ– Табага)", + "en_TV": "англійÑÐºÐ°Ñ (Тувалу)", + "en_TZ": "англійÑÐºÐ°Ñ (ТанзаніÑ)", + "en_UG": "англійÑÐºÐ°Ñ (Уганда)", + "en_UM": "англійÑÐºÐ°Ñ (ÐœÐ°Ð»Ñ‹Ñ ÐÐ´Ð´Ð°Ð»ÐµÐ½Ñ‹Ñ Ð°Ñтравы ЗШÐ)", + "en_US": "англійÑÐºÐ°Ñ (Ð—Ð»ÑƒÑ‡Ð°Ð½Ñ‹Ñ Ð¨Ñ‚Ð°Ñ‚Ñ‹ Ðмерыкі)", + "en_VC": "англійÑÐºÐ°Ñ (Сент-ВінÑент Ñ– ГрÑнадзіны)", + "en_VG": "англійÑÐºÐ°Ñ (БрытанÑÐºÑ–Ñ Ð’Ñ–Ñ€Ð³Ñ–Ð½ÑÐºÑ–Ñ Ð°Ñтравы)", + "en_VI": "англійÑÐºÐ°Ñ (ÐмерыканÑÐºÑ–Ñ Ð’Ñ–Ñ€Ð³Ñ–Ð½ÑÐºÑ–Ñ Ð°Ñтравы)", + "en_VU": "англійÑÐºÐ°Ñ (Вануату)", + "en_WS": "англійÑÐºÐ°Ñ (Самоа)", + "en_ZA": "англійÑÐºÐ°Ñ (ПаўднёваафрыканÑÐºÐ°Ñ Ð ÑÑпубліка)", + "en_ZM": "англійÑÐºÐ°Ñ (ЗамбіÑ)", + "en_ZW": "англійÑÐºÐ°Ñ (ЗімбабвÑ)", + "eo": "ÑÑперанта", + "es": "Ñ–ÑпанÑкаÑ", + "es_AR": "Ñ–ÑпанÑÐºÐ°Ñ (Ðргенціна)", + "es_BO": "Ñ–ÑпанÑÐºÐ°Ñ (БалівіÑ)", + "es_BR": "Ñ–ÑпанÑÐºÐ°Ñ (БразіліÑ)", + "es_CL": "Ñ–ÑпанÑÐºÐ°Ñ (Чылі)", + "es_CO": "Ñ–ÑпанÑÐºÐ°Ñ (КалумбіÑ)", + "es_CR": "Ñ–ÑпанÑÐºÐ°Ñ (КоÑта-Рыка)", + "es_CU": "Ñ–ÑпанÑÐºÐ°Ñ (Куба)", + "es_DO": "Ñ–ÑпанÑÐºÐ°Ñ (ДамініканÑÐºÐ°Ñ Ð ÑÑпубліка)", + "es_EA": "Ñ–ÑпанÑÐºÐ°Ñ (Сеўта Ñ– МелільÑ)", + "es_EC": "Ñ–ÑпанÑÐºÐ°Ñ (Эквадор)", + "es_ES": "Ñ–ÑпанÑÐºÐ°Ñ (ІÑпаніÑ)", + "es_GQ": "Ñ–ÑпанÑÐºÐ°Ñ (ЭкватарыÑÐ»ÑŒÐ½Ð°Ñ Ð“Ð²Ñ–Ð½ÐµÑ)", + "es_GT": "Ñ–ÑпанÑÐºÐ°Ñ (ГватÑмала)", + "es_HN": "Ñ–ÑпанÑÐºÐ°Ñ (ГандураÑ)", + "es_IC": "Ñ–ÑпанÑÐºÐ°Ñ (КанарÑÐºÑ–Ñ Ð°Ñтравы)", + "es_MX": "Ñ–ÑпанÑÐºÐ°Ñ (МекÑіка)", + "es_NI": "Ñ–ÑпанÑÐºÐ°Ñ (Ðікарагуа)", + "es_PA": "Ñ–ÑпанÑÐºÐ°Ñ (Панама)", + "es_PE": "Ñ–ÑпанÑÐºÐ°Ñ (Перу)", + "es_PH": "Ñ–ÑпанÑÐºÐ°Ñ (Філіпіны)", + "es_PR": "Ñ–ÑпанÑÐºÐ°Ñ (ПуÑрта-Рыка)", + "es_PY": "Ñ–ÑпанÑÐºÐ°Ñ (Парагвай)", + "es_SV": "Ñ–ÑпанÑÐºÐ°Ñ (Сальвадор)", + "es_US": "Ñ–ÑпанÑÐºÐ°Ñ (Ð—Ð»ÑƒÑ‡Ð°Ð½Ñ‹Ñ Ð¨Ñ‚Ð°Ñ‚Ñ‹ Ðмерыкі)", + "es_UY": "Ñ–ÑпанÑÐºÐ°Ñ (Уругвай)", + "es_VE": "Ñ–ÑпанÑÐºÐ°Ñ (ВенеÑуÑла)", + "et": "ÑÑтонÑкаÑ", + "et_EE": "ÑÑтонÑÐºÐ°Ñ (ЭÑтоніÑ)", + "eu": "баÑкÑкаÑ", + "eu_ES": "баÑкÑÐºÐ°Ñ (ІÑпаніÑ)", + "fa": "фарÑÑ–", + "fa_AF": "фарÑÑ– (ÐфганіÑтан)", + "fa_IR": "фарÑÑ– (Іран)", + "ff": "фула", + "ff_CM": "фула (Камерун)", + "ff_GN": "фула (ГвінеÑ)", + "ff_MR": "фула (МаўрытаніÑ)", + "ff_SN": "фула (Сенегал)", + "fi": "фінÑкаÑ", + "fi_FI": "фінÑÐºÐ°Ñ (ФінлÑндыÑ)", + "fo": "фарÑÑ€ÑкаÑ", + "fo_DK": "фарÑÑ€ÑÐºÐ°Ñ (ДаніÑ)", + "fo_FO": "фарÑÑ€ÑÐºÐ°Ñ (ФарÑÑ€ÑÐºÑ–Ñ Ð°Ñтравы)", + "fr": "французÑкаÑ", + "fr_BE": "французÑÐºÐ°Ñ (БельгіÑ)", + "fr_BF": "французÑÐºÐ°Ñ (Буркіна-ФаÑо)", + "fr_BI": "французÑÐºÐ°Ñ (Бурундзі)", + "fr_BJ": "французÑÐºÐ°Ñ (Бенін)", + "fr_BL": "французÑÐºÐ°Ñ (Сен-БартÑльмі)", + "fr_CA": "французÑÐºÐ°Ñ (Канада)", + "fr_CD": "французÑÐºÐ°Ñ (Конга (КіншаÑа))", + "fr_CF": "французÑÐºÐ°Ñ (ЦÑнтральнаафрыканÑÐºÐ°Ñ Ð ÑÑпубліка)", + "fr_CG": "французÑÐºÐ°Ñ (Конга - Бразавіль)", + "fr_CH": "французÑÐºÐ°Ñ (ШвейцарыÑ)", + "fr_CI": "французÑÐºÐ°Ñ (Кот-д’Івуар)", + "fr_CM": "французÑÐºÐ°Ñ (Камерун)", + "fr_DJ": "французÑÐºÐ°Ñ (Джыбуці)", + "fr_DZ": "французÑÐºÐ°Ñ (Ðлжыр)", + "fr_FR": "французÑÐºÐ°Ñ (ФранцыÑ)", + "fr_GA": "французÑÐºÐ°Ñ (Габон)", + "fr_GF": "французÑÐºÐ°Ñ (ФранцузÑÐºÐ°Ñ Ð“Ð²Ñ–Ñна)", + "fr_GN": "французÑÐºÐ°Ñ (ГвінеÑ)", + "fr_GP": "французÑÐºÐ°Ñ (ГвадÑлупа)", + "fr_GQ": "французÑÐºÐ°Ñ (ЭкватарыÑÐ»ÑŒÐ½Ð°Ñ Ð“Ð²Ñ–Ð½ÐµÑ)", + "fr_HT": "французÑÐºÐ°Ñ (Гаіці)", + "fr_KM": "французÑÐºÐ°Ñ (КаморÑÐºÑ–Ñ ÐÑтравы)", + "fr_LU": "французÑÐºÐ°Ñ (ЛюкÑембург)", + "fr_MA": "французÑÐºÐ°Ñ (Марока)", + "fr_MC": "французÑÐºÐ°Ñ (Манака)", + "fr_MF": "французÑÐºÐ°Ñ (Сен-МартÑн)", + "fr_MG": "французÑÐºÐ°Ñ (МадагаÑкар)", + "fr_ML": "французÑÐºÐ°Ñ (Малі)", + "fr_MQ": "французÑÐºÐ°Ñ (Марцініка)", + "fr_MR": "французÑÐºÐ°Ñ (МаўрытаніÑ)", + "fr_MU": "французÑÐºÐ°Ñ (Маўрыкій)", + "fr_NC": "французÑÐºÐ°Ñ (ÐÐ¾Ð²Ð°Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ñ–Ñ)", + "fr_NE": "французÑÐºÐ°Ñ (Ðігер)", + "fr_PF": "французÑÐºÐ°Ñ (ФранцузÑÐºÐ°Ñ ÐŸÐ°Ð»Ñ–Ð½ÐµÐ·Ñ–Ñ)", + "fr_PM": "французÑÐºÐ°Ñ (Сен-П’ер Ñ– Мікелон)", + "fr_RE": "французÑÐºÐ°Ñ (РÑюньён)", + "fr_RW": "французÑÐºÐ°Ñ (Руанда)", + "fr_SC": "французÑÐºÐ°Ñ (СейшÑльÑÐºÑ–Ñ ÐÑтравы)", + "fr_SN": "французÑÐºÐ°Ñ (Сенегал)", + "fr_SY": "французÑÐºÐ°Ñ (СірыÑ)", + "fr_TD": "французÑÐºÐ°Ñ (Чад)", + "fr_TG": "французÑÐºÐ°Ñ (Тога)", + "fr_TN": "французÑÐºÐ°Ñ (ТуніÑ)", + "fr_VU": "французÑÐºÐ°Ñ (Вануату)", + "fr_WF": "французÑÐºÐ°Ñ (Ð£Ð¾Ð»Ñ–Ñ Ñ– Футуна)", + "fr_YT": "французÑÐºÐ°Ñ (Маёта)", + "fy": "заходнÑÑ Ñ„Ñ€Ñ‹Ð·ÑкаÑ", + "fy_NL": "заходнÑÑ Ñ„Ñ€Ñ‹Ð·ÑÐºÐ°Ñ (ÐідÑрланды)", + "ga": "ірландÑкаÑ", + "ga_IE": "ірландÑÐºÐ°Ñ (ІрландыÑ)", + "gd": "шатландÑÐºÐ°Ñ Ð³ÑльÑкаÑ", + "gd_GB": "шатландÑÐºÐ°Ñ Ð³ÑльÑÐºÐ°Ñ (Ð’ÑлікабрытаніÑ)", + "gl": "галіÑійÑкаÑ", + "gl_ES": "галіÑійÑÐºÐ°Ñ (ІÑпаніÑ)", + "gu": "гуджараці", + "gu_IN": "гуджараці (ІндыÑ)", + "gv": "мÑнÑкаÑ", + "gv_IM": "мÑнÑÐºÐ°Ñ (ВоÑтраў МÑн)", + "ha": "хауÑа", + "ha_GH": "хауÑа (Гана)", + "ha_NE": "хауÑа (Ðігер)", + "ha_NG": "хауÑа (ÐігерыÑ)", + "he": "іўрыт", + "he_IL": "іўрыт (Ізраіль)", + "hi": "хіндзі", + "hi_IN": "хіндзі (ІндыÑ)", + "hr": "харвацкаÑ", + "hr_BA": "Ñ…Ð°Ñ€Ð²Ð°Ñ†ÐºÐ°Ñ (БоÑÐ½Ñ–Ñ Ñ– Герцагавіна)", + "hr_HR": "Ñ…Ð°Ñ€Ð²Ð°Ñ†ÐºÐ°Ñ (ХарватыÑ)", + "hu": "венгерÑкаÑ", + "hu_HU": "венгерÑÐºÐ°Ñ (ВенгрыÑ)", + "hy": "армÑнÑкаÑ", + "hy_AM": "армÑнÑÐºÐ°Ñ (ÐрменіÑ)", + "id": "інданезійÑкаÑ", + "id_ID": "інданезійÑÐºÐ°Ñ (ІнданезіÑ)", + "ig": "ігба", + "ig_NG": "ігба (ÐігерыÑ)", + "ii": "ÑычуаньÑÐºÐ°Ñ Ð¹Ñ–", + "ii_CN": "ÑычуаньÑÐºÐ°Ñ Ð¹Ñ– (Кітай)", + "is": "Ñ–ÑландÑкаÑ", + "is_IS": "Ñ–ÑландÑÐºÐ°Ñ (ІÑландыÑ)", + "it": "італьÑнÑкаÑ", + "it_CH": "італьÑнÑÐºÐ°Ñ (ШвейцарыÑ)", + "it_IT": "італьÑнÑÐºÐ°Ñ (ІталіÑ)", + "it_SM": "італьÑнÑÐºÐ°Ñ (Сан-Марына)", + "ja": "ÑпонÑкаÑ", + "ja_JP": "ÑпонÑÐºÐ°Ñ (ЯпоніÑ)", + "ka": "грузінÑкаÑ", + "ka_GE": "грузінÑÐºÐ°Ñ (ГрузіÑ)", + "ki": "кікуйю", + "ki_KE": "кікуйю (КеніÑ)", + "kk": "казахÑкаÑ", + "kk_KZ": "казахÑÐºÐ°Ñ (КазахÑтан)", + "kl": "грÑнландÑкаÑ", + "kl_GL": "грÑнландÑÐºÐ°Ñ (ГрÑнландыÑ)", + "km": "кхмерÑкаÑ", + "km_KH": "кхмерÑÐºÐ°Ñ (Камбоджа)", + "kn": "канада", + "kn_IN": "канада (ІндыÑ)", + "ko": "карÑйÑкаÑ", + "ko_KP": "карÑйÑÐºÐ°Ñ (ÐŸÐ°ÑžÐ½Ð¾Ñ‡Ð½Ð°Ñ ÐšÐ°Ñ€ÑÑ)", + "ko_KR": "карÑйÑÐºÐ°Ñ (ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ ÐšÐ°Ñ€ÑÑ)", + "ks": "кашмірÑкаÑ", + "ks_IN": "кашмірÑÐºÐ°Ñ (ІндыÑ)", + "kw": "корнÑкаÑ", + "kw_GB": "корнÑÐºÐ°Ñ (Ð’ÑлікабрытаніÑ)", + "ky": "кіргізÑкаÑ", + "ky_KG": "кіргізÑÐºÐ°Ñ (КыргызÑтан)", + "lb": "люкÑембургÑкаÑ", + "lb_LU": "люкÑембургÑÐºÐ°Ñ (ЛюкÑембург)", + "lg": "ганда", + "lg_UG": "ганда (Уганда)", + "ln": "лінгала", + "ln_AO": "лінгала (Ðнгола)", + "ln_CD": "лінгала (Конга (КіншаÑа))", + "ln_CF": "лінгала (ЦÑнтральнаафрыканÑÐºÐ°Ñ Ð ÑÑпубліка)", + "ln_CG": "лінгала (Конга - Бразавіль)", + "lo": "лаоÑкаÑ", + "lo_LA": "лаоÑÐºÐ°Ñ (ЛаоÑ)", + "lt": "літоўÑкаÑ", + "lt_LT": "літоўÑÐºÐ°Ñ (Літва)", + "lu": "луба-катанга", + "lu_CD": "луба-катанга (Конга (КіншаÑа))", + "lv": "латышÑкаÑ", + "lv_LV": "латышÑÐºÐ°Ñ (ЛатвіÑ)", + "mg": "малагаÑійÑкаÑ", + "mg_MG": "малагаÑійÑÐºÐ°Ñ (МадагаÑкар)", + "mk": "македонÑкаÑ", + "mk_MK": "македонÑÐºÐ°Ñ (МакедоніÑ)", + "ml": "малаÑлам", + "ml_IN": "малаÑлам (ІндыÑ)", + "mn": "мангольÑкаÑ", + "mn_MN": "мангольÑÐºÐ°Ñ (МанголіÑ)", + "mr": "маратхі", + "mr_IN": "маратхі (ІндыÑ)", + "ms": "малайÑкаÑ", + "ms_BN": "малайÑÐºÐ°Ñ (Бруней)", + "ms_MY": "малайÑÐºÐ°Ñ (МалайзіÑ)", + "ms_SG": "малайÑÐºÐ°Ñ (Сінгапур)", + "mt": "мальтыйÑкаÑ", + "mt_MT": "мальтыйÑÐºÐ°Ñ (Мальта)", + "my": "бірманÑкаÑ", + "my_MM": "бірманÑÐºÐ°Ñ (М’Ñнма (Бірма))", + "nb": "нарвежÑÐºÐ°Ñ (букмол)", + "nb_NO": "нарвежÑÐºÐ°Ñ (ÐарвегіÑ)", + "nb_SJ": "нарвежÑÐºÐ°Ñ (Шпіцберген Ñ– Ян-Маен)", + "nd": "Ð¿Ð°ÑžÐ½Ð¾Ñ‡Ð½Ð°Ñ Ð½Ð´Ñбеле", + "nd_ZW": "Ð¿Ð°ÑžÐ½Ð¾Ñ‡Ð½Ð°Ñ Ð½Ð´Ñбеле (ЗімбабвÑ)", + "ne": "непальÑкаÑ", + "ne_IN": "непальÑÐºÐ°Ñ (ІндыÑ)", + "ne_NP": "непальÑÐºÐ°Ñ (Ðепал)", + "nl": "нідÑрландÑкаÑ", + "nl_AW": "нідÑрландÑÐºÐ°Ñ (Ðруба)", + "nl_BE": "нідÑрландÑÐºÐ°Ñ (БельгіÑ)", + "nl_BQ": "нідÑрландÑÐºÐ°Ñ (КарыбÑÐºÑ–Ñ ÐідÑрланды)", + "nl_CW": "нідÑрландÑÐºÐ°Ñ (КюраÑаа)", + "nl_NL": "нідÑрландÑÐºÐ°Ñ (ÐідÑрланды)", + "nl_SR": "нідÑрландÑÐºÐ°Ñ (Сурынам)", + "nl_SX": "нідÑрландÑÐºÐ°Ñ (Сінт-МартÑн)", + "nn": "нарвежÑÐºÐ°Ñ (нюношк)", + "nn_NO": "нарвежÑÐºÐ°Ñ (ÐарвегіÑ)", + "no": "нарвежÑкаÑ", + "no_NO": "нарвежÑÐºÐ°Ñ (ÐарвегіÑ)", + "om": "арома", + "om_ET": "арома (ЭфіопіÑ)", + "om_KE": "арома (КеніÑ)", + "or": "орыÑ", + "or_IN": "Ð¾Ñ€Ñ‹Ñ (ІндыÑ)", + "os": "аÑецінÑкаÑ", + "os_GE": "аÑецінÑÐºÐ°Ñ (ГрузіÑ)", + "os_RU": "аÑецінÑÐºÐ°Ñ (РаÑÑ–Ñ)", + "pa": "панджабі", + "pa_Arab": "панджабі (арабÑкае)", + "pa_Arab_PK": "панджабі (арабÑкае, ПакіÑтан)", + "pa_Guru": "панджабі (гурмукхі)", + "pa_Guru_IN": "панджабі (гурмукхі, ІндыÑ)", + "pa_IN": "панджабі (ІндыÑ)", + "pa_PK": "панджабі (ПакіÑтан)", + "pl": "польÑкаÑ", + "pl_PL": "польÑÐºÐ°Ñ (Польшча)", + "ps": "пушту", + "ps_AF": "пушту (ÐфганіÑтан)", + "pt": "партугальÑкаÑ", + "pt_AO": "партугальÑÐºÐ°Ñ (Ðнгола)", + "pt_BR": "партугальÑÐºÐ°Ñ (БразіліÑ)", + "pt_CH": "партугальÑÐºÐ°Ñ (ШвейцарыÑ)", + "pt_CV": "партугальÑÐºÐ°Ñ (Каба-ВердÑ)", + "pt_GQ": "партугальÑÐºÐ°Ñ (ЭкватарыÑÐ»ÑŒÐ½Ð°Ñ Ð“Ð²Ñ–Ð½ÐµÑ)", + "pt_GW": "партугальÑÐºÐ°Ñ (ГвінеÑ-БіÑау)", + "pt_LU": "партугальÑÐºÐ°Ñ (ЛюкÑембург)", + "pt_MO": "партугальÑÐºÐ°Ñ (Макаа, СÐР (Кітай))", + "pt_MZ": "партугальÑÐºÐ°Ñ (Мазамбік)", + "pt_PT": "партугальÑÐºÐ°Ñ (ПартугаліÑ)", + "pt_ST": "партугальÑÐºÐ°Ñ (Сан-Ð¢Ð°Ð¼Ñ Ñ– ПрынÑіпі)", + "pt_TL": "партугальÑÐºÐ°Ñ (Тымор-Лешці)", + "qu": "кечуа", + "qu_BO": "кечуа (БалівіÑ)", + "qu_EC": "кечуа (Эквадор)", + "qu_PE": "кечуа (Перу)", + "rm": "Ñ€ÑтараманÑкаÑ", + "rm_CH": "Ñ€ÑтараманÑÐºÐ°Ñ (ШвейцарыÑ)", + "rn": "рундзі", + "rn_BI": "рундзі (Бурундзі)", + "ro": "румынÑкаÑ", + "ro_MD": "румынÑÐºÐ°Ñ (Малдова)", + "ro_RO": "румынÑÐºÐ°Ñ (РумыніÑ)", + "ru": "руÑкаÑ", + "ru_BY": "руÑÐºÐ°Ñ (БеларуÑÑŒ)", + "ru_KG": "руÑÐºÐ°Ñ (КыргызÑтан)", + "ru_KZ": "руÑÐºÐ°Ñ (КазахÑтан)", + "ru_MD": "руÑÐºÐ°Ñ (Малдова)", + "ru_RU": "руÑÐºÐ°Ñ (РаÑÑ–Ñ)", + "ru_UA": "руÑÐºÐ°Ñ (Украіна)", + "rw": "руанда", + "rw_RW": "руанда (Руанда)", + "se": "паўночнаÑаамÑкаÑ", + "se_FI": "паўночнаÑаамÑÐºÐ°Ñ (ФінлÑндыÑ)", + "se_NO": "паўночнаÑаамÑÐºÐ°Ñ (ÐарвегіÑ)", + "se_SE": "паўночнаÑаамÑÐºÐ°Ñ (ШвецыÑ)", + "sg": "Ñанга", + "sg_CF": "Ñанга (ЦÑнтральнаафрыканÑÐºÐ°Ñ Ð ÑÑпубліка)", + "sh": "ÑербÑкахарвацкаÑ", + "sh_BA": "ÑербÑÐºÐ°Ñ…Ð°Ñ€Ð²Ð°Ñ†ÐºÐ°Ñ (БоÑÐ½Ñ–Ñ Ñ– Герцагавіна)", + "si": "ÑінгальÑкаÑ", + "si_LK": "ÑінгальÑÐºÐ°Ñ (Шры-Ланка)", + "sk": "ÑлавацкаÑ", + "sk_SK": "ÑÐ»Ð°Ð²Ð°Ñ†ÐºÐ°Ñ (СлавакіÑ)", + "sl": "ÑлавенÑкаÑ", + "sl_SI": "ÑлавенÑÐºÐ°Ñ (СлавеніÑ)", + "sn": "шона", + "sn_ZW": "шона (ЗімбабвÑ)", + "so": "Ñамалі", + "so_DJ": "Ñамалі (Джыбуці)", + "so_ET": "Ñамалі (ЭфіопіÑ)", + "so_KE": "Ñамалі (КеніÑ)", + "so_SO": "Ñамалі (Самалі)", + "sq": "албанÑкаÑ", + "sq_AL": "албанÑÐºÐ°Ñ (ÐлбаніÑ)", + "sq_MK": "албанÑÐºÐ°Ñ (МакедоніÑ)", + "sq_XK": "албанÑÐºÐ°Ñ (КоÑава)", + "sr": "ÑербÑкаÑ", + "sr_BA": "ÑербÑÐºÐ°Ñ (БоÑÐ½Ñ–Ñ Ñ– Герцагавіна)", + "sr_Cyrl": "ÑербÑÐºÐ°Ñ (кірыліца)", + "sr_Cyrl_BA": "ÑербÑÐºÐ°Ñ (кірыліца, БоÑÐ½Ñ–Ñ Ñ– Герцагавіна)", + "sr_Cyrl_ME": "ÑербÑÐºÐ°Ñ (кірыліца, ЧарнагорыÑ)", + "sr_Cyrl_RS": "ÑербÑÐºÐ°Ñ (кірыліца, СербіÑ)", + "sr_Cyrl_XK": "ÑербÑÐºÐ°Ñ (кірыліца, КоÑава)", + "sr_Latn": "ÑербÑÐºÐ°Ñ (лацініца)", + "sr_Latn_BA": "ÑербÑÐºÐ°Ñ (лацініца, БоÑÐ½Ñ–Ñ Ñ– Герцагавіна)", + "sr_Latn_ME": "ÑербÑÐºÐ°Ñ (лацініца, ЧарнагорыÑ)", + "sr_Latn_RS": "ÑербÑÐºÐ°Ñ (лацініца, СербіÑ)", + "sr_Latn_XK": "ÑербÑÐºÐ°Ñ (лацініца, КоÑава)", + "sr_ME": "ÑербÑÐºÐ°Ñ (ЧарнагорыÑ)", + "sr_RS": "ÑербÑÐºÐ°Ñ (СербіÑ)", + "sr_XK": "ÑербÑÐºÐ°Ñ (КоÑава)", + "sv": "шведÑкаÑ", + "sv_AX": "шведÑÐºÐ°Ñ (ÐландÑÐºÑ–Ñ Ð°Ñтравы)", + "sv_FI": "шведÑÐºÐ°Ñ (ФінлÑндыÑ)", + "sv_SE": "шведÑÐºÐ°Ñ (ШвецыÑ)", + "sw": "Ñуахілі", + "sw_CD": "Ñуахілі (Конга (КіншаÑа))", + "sw_KE": "Ñуахілі (КеніÑ)", + "sw_TZ": "Ñуахілі (ТанзаніÑ)", + "sw_UG": "Ñуахілі (Уганда)", + "ta": "тамільÑкаÑ", + "ta_IN": "тамільÑÐºÐ°Ñ (ІндыÑ)", + "ta_LK": "тамільÑÐºÐ°Ñ (Шры-Ланка)", + "ta_MY": "тамільÑÐºÐ°Ñ (МалайзіÑ)", + "ta_SG": "тамільÑÐºÐ°Ñ (Сінгапур)", + "te": "Ñ‚Ñлугу", + "te_IN": "Ñ‚Ñлугу (ІндыÑ)", + "th": "тайÑкаÑ", + "th_TH": "тайÑÐºÐ°Ñ (Тайланд)", + "ti": "тыгрыньÑ", + "ti_ER": "Ñ‚Ñ‹Ð³Ñ€Ñ‹Ð½ÑŒÑ (ЭрытрÑÑ)", + "ti_ET": "Ñ‚Ñ‹Ð³Ñ€Ñ‹Ð½ÑŒÑ (ЭфіопіÑ)", + "to": "танганÑкаÑ", + "to_TO": "танганÑÐºÐ°Ñ (Тонга)", + "tr": "турÑцкаÑ", + "tr_CY": "турÑÑ†ÐºÐ°Ñ (Кіпр)", + "tr_TR": "турÑÑ†ÐºÐ°Ñ (ТурцыÑ)", + "ug": "уйгурÑкаÑ", + "ug_CN": "уйгурÑÐºÐ°Ñ (Кітай)", + "uk": "украінÑкаÑ", + "uk_UA": "украінÑÐºÐ°Ñ (Украіна)", + "ur": "урду", + "ur_IN": "урду (ІндыÑ)", + "ur_PK": "урду (ПакіÑтан)", + "uz": "узбекÑкаÑ", + "uz_AF": "узбекÑÐºÐ°Ñ (ÐфганіÑтан)", + "uz_Arab": "узбекÑÐºÐ°Ñ (арабÑкае)", + "uz_Arab_AF": "узбекÑÐºÐ°Ñ (арабÑкае, ÐфганіÑтан)", + "uz_Cyrl": "узбекÑÐºÐ°Ñ (кірыліца)", + "uz_Cyrl_UZ": "узбекÑÐºÐ°Ñ (кірыліца, УзбекіÑтан)", + "uz_Latn": "узбекÑÐºÐ°Ñ (лацініца)", + "uz_Latn_UZ": "узбекÑÐºÐ°Ñ (лацініца, УзбекіÑтан)", + "uz_UZ": "узбекÑÐºÐ°Ñ (УзбекіÑтан)", + "vi": "в’етнамÑкаÑ", + "vi_VN": "в’етнамÑÐºÐ°Ñ (В’етнам)", + "yi": "ідыш", + "yo": "ёруба", + "yo_BJ": "ёруба (Бенін)", + "yo_NG": "ёруба (ÐігерыÑ)", + "zh": "кітайÑкаÑ", + "zh_CN": "кітайÑÐºÐ°Ñ (Кітай)", + "zh_HK": "кітайÑÐºÐ°Ñ (Ганконг, СÐР (Кітай))", + "zh_Hans": "кітайÑÐºÐ°Ñ (Ñпрошчанае кітайÑкае)", + "zh_Hans_CN": "кітайÑÐºÐ°Ñ (Ñпрошчанае кітайÑкае, Кітай)", + "zh_Hans_HK": "кітайÑÐºÐ°Ñ (Ñпрошчанае кітайÑкае, Ганконг, СÐР (Кітай))", + "zh_Hans_MO": "кітайÑÐºÐ°Ñ (Ñпрошчанае кітайÑкае, Макаа, СÐР (Кітай))", + "zh_Hans_SG": "кітайÑÐºÐ°Ñ (Ñпрошчанае кітайÑкае, Сінгапур)", + "zh_Hant": "кітайÑÐºÐ°Ñ (традыцыйнае кітайÑкае)", + "zh_Hant_HK": "кітайÑÐºÐ°Ñ (традыцыйнае кітайÑкае, Ганконг, СÐР (Кітай))", + "zh_Hant_MO": "кітайÑÐºÐ°Ñ (традыцыйнае кітайÑкае, Макаа, СÐР (Кітай))", + "zh_Hant_TW": "кітайÑÐºÐ°Ñ (традыцыйнае кітайÑкае, Тайвань)", + "zh_MO": "кітайÑÐºÐ°Ñ (Макаа, СÐР (Кітай))", + "zh_SG": "кітайÑÐºÐ°Ñ (Сінгапур)", + "zh_TW": "кітайÑÐºÐ°Ñ (Тайвань)", + "zu": "зулу", + "zu_ZA": "зулу (ПаўднёваафрыканÑÐºÐ°Ñ Ð ÑÑпубліка)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bg.json new file mode 100644 index 0000000000000000000000000000000000000000..77d00aac3428e814f21847c74645df2b4a23ec56 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bg.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "африкаанÑ", + "af_NA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (ÐамибиÑ)", + "af_ZA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (Южна Ðфрика)", + "ak": "акан", + "ak_GH": "акан (Гана)", + "am": "амхарÑки", + "am_ET": "амхарÑки (ЕтиопиÑ)", + "ar": "арабÑки", + "ar_AE": "арабÑки (Обединени арабÑки емирÑтва)", + "ar_BH": "арабÑки (Бахрейн)", + "ar_DJ": "арабÑки (Джибути)", + "ar_DZ": "арабÑки (Ðлжир)", + "ar_EG": "арабÑки (Египет)", + "ar_EH": "арабÑки (Западна Сахара)", + "ar_ER": "арабÑки (ЕритреÑ)", + "ar_IL": "арабÑки (Израел)", + "ar_IQ": "арабÑки (Ирак)", + "ar_JO": "арабÑки (ЙорданиÑ)", + "ar_KM": "арабÑки (КоморÑки оÑтрови)", + "ar_KW": "арабÑки (Кувейт)", + "ar_LB": "арабÑки (Ливан)", + "ar_LY": "арабÑки (ЛибиÑ)", + "ar_MA": "арабÑки (Мароко)", + "ar_MR": "арабÑки (МавританиÑ)", + "ar_OM": "арабÑки (Оман)", + "ar_PS": "арабÑки (ПалеÑтинÑки територии)", + "ar_QA": "арабÑки (Катар)", + "ar_SA": "арабÑки (СаудитÑка ÐрабиÑ)", + "ar_SD": "арабÑки (Судан)", + "ar_SO": "арабÑки (СомалиÑ)", + "ar_SS": "арабÑки (Южен Судан)", + "ar_SY": "арабÑки (СириÑ)", + "ar_TD": "арабÑки (Чад)", + "ar_TN": "арабÑки (ТуниÑ)", + "ar_YE": "арабÑки (Йемен)", + "as": "аÑамÑки", + "as_IN": "аÑамÑки (ИндиÑ)", + "az": "азербайджанÑки", + "az_AZ": "азербайджанÑки (Ðзербайджан)", + "az_Cyrl": "азербайджанÑки (кирилица)", + "az_Cyrl_AZ": "азербайджанÑки (кирилица, Ðзербайджан)", + "az_Latn": "азербайджанÑки (латиница)", + "az_Latn_AZ": "азербайджанÑки (латиница, Ðзербайджан)", + "be": "беларуÑки", + "be_BY": "беларуÑки (БеларуÑ)", + "bg": "българÑки", + "bg_BG": "българÑки (БългариÑ)", + "bm": "бамбара", + "bm_ML": "бамбара (Мали)", + "bn": "бенгалÑки", + "bn_BD": "бенгалÑки (Бангладеш)", + "bn_IN": "бенгалÑки (ИндиÑ)", + "bo": "тибетÑки", + "bo_CN": "тибетÑки (Китай)", + "bo_IN": "тибетÑки (ИндиÑ)", + "br": "бретонÑки", + "br_FR": "бретонÑки (ФранциÑ)", + "bs": "боÑненÑки", + "bs_BA": "боÑненÑки (БоÑна и Херцеговина)", + "bs_Cyrl": "боÑненÑки (кирилица)", + "bs_Cyrl_BA": "боÑненÑки (кирилица, БоÑна и Херцеговина)", + "bs_Latn": "боÑненÑки (латиница)", + "bs_Latn_BA": "боÑненÑки (латиница, БоÑна и Херцеговина)", + "ca": "каталонÑки", + "ca_AD": "каталонÑки (Ðндора)", + "ca_ES": "каталонÑки (ИÑпаниÑ)", + "ca_FR": "каталонÑки (ФранциÑ)", + "ca_IT": "каталонÑки (ИталиÑ)", + "ce": "чеченÑки", + "ce_RU": "чеченÑки (РуÑиÑ)", + "cs": "чешки", + "cs_CZ": "чешки (Чешка република)", + "cy": "уелÑки", + "cy_GB": "уелÑки (Обединеното кралÑтво)", + "da": "датÑки", + "da_DK": "датÑки (ДаниÑ)", + "da_GL": "датÑки (ГренландиÑ)", + "de": "немÑки", + "de_AT": "немÑки (ÐвÑтриÑ)", + "de_BE": "немÑки (БелгиÑ)", + "de_CH": "немÑки (ШвейцариÑ)", + "de_DE": "немÑки (ГерманиÑ)", + "de_IT": "немÑки (ИталиÑ)", + "de_LI": "немÑки (Лихтенщайн)", + "de_LU": "немÑки (ЛюкÑембург)", + "dz": "дзонха", + "dz_BT": "дзонха (Бутан)", + "ee": "еве", + "ee_GH": "еве (Гана)", + "ee_TG": "еве (Того)", + "el": "гръцки", + "el_CY": "гръцки (Кипър)", + "el_GR": "гръцки (ГърциÑ)", + "en": "английÑки", + "en_AG": "английÑки (Ðнтигуа и Барбуда)", + "en_AI": "английÑки (Ðнгуила)", + "en_AS": "английÑки (ÐмериканÑка Самоа)", + "en_AT": "английÑки (ÐвÑтриÑ)", + "en_AU": "английÑки (ÐвÑтралиÑ)", + "en_BB": "английÑки (БарбадоÑ)", + "en_BE": "английÑки (БелгиÑ)", + "en_BI": "английÑки (Бурунди)", + "en_BM": "английÑки (Бермуда)", + "en_BS": "английÑки (Бахами)", + "en_BW": "английÑки (БотÑвана)", + "en_BZ": "английÑки (Белиз)", + "en_CA": "английÑки (Канада)", + "en_CC": "английÑки (КокоÑови оÑтрови (оÑтрови Кийлинг))", + "en_CH": "английÑки (ШвейцариÑ)", + "en_CK": "английÑки (оÑтрови Кук)", + "en_CM": "английÑки (Камерун)", + "en_CX": "английÑки (оÑтров РождеÑтво)", + "en_CY": "английÑки (Кипър)", + "en_DE": "английÑки (ГерманиÑ)", + "en_DG": "английÑки (Диего ГарÑиÑ)", + "en_DK": "английÑки (ДаниÑ)", + "en_DM": "английÑки (Доминика)", + "en_ER": "английÑки (ЕритреÑ)", + "en_FI": "английÑки (ФинландиÑ)", + "en_FJ": "английÑки (Фиджи)", + "en_FK": "английÑки (ФолклендÑки оÑтрови)", + "en_FM": "английÑки (МикронезиÑ)", + "en_GB": "английÑки (Обединеното кралÑтво)", + "en_GD": "английÑки (Гренада)", + "en_GG": "английÑки (Гърнзи)", + "en_GH": "английÑки (Гана)", + "en_GI": "английÑки (Гибралтар)", + "en_GM": "английÑки (ГамбиÑ)", + "en_GU": "английÑки (Гуам)", + "en_GY": "английÑки (ГаÑна)", + "en_HK": "английÑки (Хонконг, СÐР на Китай)", + "en_IE": "английÑки (ИрландиÑ)", + "en_IL": "английÑки (Израел)", + "en_IM": "английÑки (оÑтров Ман)", + "en_IN": "английÑки (ИндиÑ)", + "en_IO": "английÑки (БританÑка Ñ‚ÐµÑ€Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ Ð² ИндийÑÐºÐ¸Ñ Ð¾ÐºÐµÐ°Ð½)", + "en_JE": "английÑки (ДжърÑи)", + "en_JM": "английÑки (Ямайка)", + "en_KE": "английÑки (КениÑ)", + "en_KI": "английÑки (Кирибати)", + "en_KN": "английÑки (Сейнт ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ)", + "en_KY": "английÑки (Кайманови оÑтрови)", + "en_LC": "английÑки (Сейнт ЛуÑиÑ)", + "en_LR": "английÑки (ЛибериÑ)", + "en_LS": "английÑки (ЛеÑото)", + "en_MG": "английÑки (МадагаÑкар)", + "en_MH": "английÑки (Маршалови оÑтрови)", + "en_MO": "английÑки (Макао, СÐР на Китай)", + "en_MP": "английÑки (Северни МарианÑки оÑтрови)", + "en_MS": "английÑки (МонтÑерат)", + "en_MT": "английÑки (Малта)", + "en_MU": "английÑки (Мавриций)", + "en_MW": "английÑки (Малави)", + "en_MY": "английÑки (МалайзиÑ)", + "en_NA": "английÑки (ÐамибиÑ)", + "en_NF": "английÑки (оÑтров Ðорфолк)", + "en_NG": "английÑки (ÐигериÑ)", + "en_NL": "английÑки (ÐидерландиÑ)", + "en_NR": "английÑки (Ðауру)", + "en_NU": "английÑки (Ðиуе)", + "en_NZ": "английÑки (Ðова ЗеландиÑ)", + "en_PG": "английÑки (Папуа-Ðова ГвинеÑ)", + "en_PH": "английÑки (Филипини)", + "en_PK": "английÑки (ПакиÑтан)", + "en_PN": "английÑки (ОÑтрови Питкерн)", + "en_PR": "английÑки (Пуерто Рико)", + "en_PW": "английÑки (Палау)", + "en_RW": "английÑки (Руанда)", + "en_SB": "английÑки (Соломонови оÑтрови)", + "en_SC": "английÑки (Сейшели)", + "en_SD": "английÑки (Судан)", + "en_SE": "английÑки (ШвециÑ)", + "en_SG": "английÑки (Сингапур)", + "en_SH": "английÑки (Света Елена)", + "en_SI": "английÑки (СловениÑ)", + "en_SL": "английÑки (Сиера Леоне)", + "en_SS": "английÑки (Южен Судан)", + "en_SX": "английÑки (Синт Мартен)", + "en_SZ": "английÑки (Свазиленд)", + "en_TC": "английÑки (оÑтрови Ð¢ÑŠÑ€ÐºÑ Ð¸ КайкоÑ)", + "en_TK": "английÑки (Токелау)", + "en_TO": "английÑки (Тонга)", + "en_TT": "английÑки (Тринидад и Тобаго)", + "en_TV": "английÑки (Тувалу)", + "en_TZ": "английÑки (ТанзаниÑ)", + "en_UG": "английÑки (Уганда)", + "en_UM": "английÑки (Отдалечени оÑтрови на СÐЩ)", + "en_US": "английÑки (Съединени щати)", + "en_VC": "английÑки (Сейнт ВинÑънт и Гренадини)", + "en_VG": "английÑки (БританÑки ВирджинÑки оÑтрови)", + "en_VI": "английÑки (ÐмериканÑки ВирджинÑки оÑтрови)", + "en_VU": "английÑки (Вануату)", + "en_WS": "английÑки (Самоа)", + "en_ZA": "английÑки (Южна Ðфрика)", + "en_ZM": "английÑки (ЗамбиÑ)", + "en_ZW": "английÑки (Зимбабве)", + "eo": "еÑперанто", + "es": "иÑпанÑки", + "es_AR": "иÑпанÑки (Ðржентина)", + "es_BO": "иÑпанÑки (БоливиÑ)", + "es_BR": "иÑпанÑки (БразилиÑ)", + "es_CL": "иÑпанÑки (Чили)", + "es_CO": "иÑпанÑки (КолумбиÑ)", + "es_CR": "иÑпанÑки (КоÑта Рика)", + "es_CU": "иÑпанÑки (Куба)", + "es_DO": "иÑпанÑки (ДоминиканÑка република)", + "es_EA": "иÑпанÑки (Сеута и МелиÑ)", + "es_EC": "иÑпанÑки (Еквадор)", + "es_ES": "иÑпанÑки (ИÑпаниÑ)", + "es_GQ": "иÑпанÑки (Екваториална ГвинеÑ)", + "es_GT": "иÑпанÑки (Гватемала)", + "es_HN": "иÑпанÑки (ХондураÑ)", + "es_IC": "иÑпанÑки (КанарÑки оÑтрови)", + "es_MX": "иÑпанÑки (МекÑико)", + "es_NI": "иÑпанÑки (Ðикарагуа)", + "es_PA": "иÑпанÑки (Панама)", + "es_PE": "иÑпанÑки (Перу)", + "es_PH": "иÑпанÑки (Филипини)", + "es_PR": "иÑпанÑки (Пуерто Рико)", + "es_PY": "иÑпанÑки (Парагвай)", + "es_SV": "иÑпанÑки (Салвадор)", + "es_US": "иÑпанÑки (Съединени щати)", + "es_UY": "иÑпанÑки (Уругвай)", + "es_VE": "иÑпанÑки (Венецуела)", + "et": "еÑтонÑки", + "et_EE": "еÑтонÑки (ЕÑтониÑ)", + "eu": "баÑки", + "eu_ES": "баÑки (ИÑпаниÑ)", + "fa": "перÑийÑки", + "fa_AF": "перÑийÑки (ÐфганиÑтан)", + "fa_IR": "перÑийÑки (Иран)", + "ff": "фула", + "ff_CM": "фула (Камерун)", + "ff_GN": "фула (ГвинеÑ)", + "ff_MR": "фула (МавританиÑ)", + "ff_SN": "фула (Сенегал)", + "fi": "финÑки", + "fi_FI": "финÑки (ФинландиÑ)", + "fo": "фарьорÑки", + "fo_DK": "фарьорÑки (ДаниÑ)", + "fo_FO": "фарьорÑки (ФарьорÑки оÑтрови)", + "fr": "френÑки", + "fr_BE": "френÑки (БелгиÑ)", + "fr_BF": "френÑки (Буркина ФаÑо)", + "fr_BI": "френÑки (Бурунди)", + "fr_BJ": "френÑки (Бенин)", + "fr_BL": "френÑки (Сен Бартелеми)", + "fr_CA": "френÑки (Канада)", + "fr_CD": "френÑки (Конго (КиншаÑа))", + "fr_CF": "френÑки (ЦентралноафриканÑка република)", + "fr_CG": "френÑки (Конго (Бразавил))", + "fr_CH": "френÑки (ШвейцариÑ)", + "fr_CI": "френÑки (Кот д’Ивоар)", + "fr_CM": "френÑки (Камерун)", + "fr_DJ": "френÑки (Джибути)", + "fr_DZ": "френÑки (Ðлжир)", + "fr_FR": "френÑки (ФранциÑ)", + "fr_GA": "френÑки (Габон)", + "fr_GF": "френÑки (ФренÑка Гвиана)", + "fr_GN": "френÑки (ГвинеÑ)", + "fr_GP": "френÑки (Гваделупа)", + "fr_GQ": "френÑки (Екваториална ГвинеÑ)", + "fr_HT": "френÑки (Хаити)", + "fr_KM": "френÑки (КоморÑки оÑтрови)", + "fr_LU": "френÑки (ЛюкÑембург)", + "fr_MA": "френÑки (Мароко)", + "fr_MC": "френÑки (Монако)", + "fr_MF": "френÑки (Сен Мартен)", + "fr_MG": "френÑки (МадагаÑкар)", + "fr_ML": "френÑки (Мали)", + "fr_MQ": "френÑки (Мартиника)", + "fr_MR": "френÑки (МавританиÑ)", + "fr_MU": "френÑки (Мавриций)", + "fr_NC": "френÑки (Ðова КаледониÑ)", + "fr_NE": "френÑки (Ðигер)", + "fr_PF": "френÑки (ФренÑка ПолинезиÑ)", + "fr_PM": "френÑки (Сен Пиер и Микелон)", + "fr_RE": "френÑки (Реюнион)", + "fr_RW": "френÑки (Руанда)", + "fr_SC": "френÑки (Сейшели)", + "fr_SN": "френÑки (Сенегал)", + "fr_SY": "френÑки (СириÑ)", + "fr_TD": "френÑки (Чад)", + "fr_TG": "френÑки (Того)", + "fr_TN": "френÑки (ТуниÑ)", + "fr_VU": "френÑки (Вануату)", + "fr_WF": "френÑки (Ð£Ð¾Ð»Ð¸Ñ Ð¸ Футуна)", + "fr_YT": "френÑки (Майот)", + "fy": "фризийÑки", + "fy_NL": "фризийÑки (ÐидерландиÑ)", + "ga": "ирландÑки", + "ga_IE": "ирландÑки (ИрландиÑ)", + "gd": "шотландÑки галÑки", + "gd_GB": "шотландÑки галÑки (Обединеното кралÑтво)", + "gl": "галиÑийÑки", + "gl_ES": "галиÑийÑки (ИÑпаниÑ)", + "gu": "гуджарати", + "gu_IN": "гуджарати (ИндиÑ)", + "gv": "манкÑки", + "gv_IM": "манкÑки (оÑтров Ман)", + "ha": "хауза", + "ha_GH": "хауза (Гана)", + "ha_NE": "хауза (Ðигер)", + "ha_NG": "хауза (ÐигериÑ)", + "he": "иврит", + "he_IL": "иврит (Израел)", + "hi": "хинди", + "hi_IN": "хинди (ИндиÑ)", + "hr": "хърватÑки", + "hr_BA": "хърватÑки (БоÑна и Херцеговина)", + "hr_HR": "хърватÑки (ХърватиÑ)", + "hu": "унгарÑки", + "hu_HU": "унгарÑки (УнгариÑ)", + "hy": "арменÑки", + "hy_AM": "арменÑки (ÐрмениÑ)", + "id": "индонезийÑки", + "id_ID": "индонезийÑки (ИндонезиÑ)", + "ig": "игбо", + "ig_NG": "игбо (ÐигериÑ)", + "ii": "ÑъчуанÑки и", + "ii_CN": "ÑъчуанÑки и (Китай)", + "is": "иÑландÑки", + "is_IS": "иÑландÑки (ИÑландиÑ)", + "it": "италианÑки", + "it_CH": "италианÑки (ШвейцариÑ)", + "it_IT": "италианÑки (ИталиÑ)", + "it_SM": "италианÑки (Сан Марино)", + "ja": "ÑпонÑки", + "ja_JP": "ÑпонÑки (ЯпониÑ)", + "ka": "грузинÑки", + "ka_GE": "грузинÑки (ГрузиÑ)", + "ki": "кикую", + "ki_KE": "кикую (КениÑ)", + "kk": "казахÑки", + "kk_KZ": "казахÑки (КазахÑтан)", + "kl": "гренландÑки", + "kl_GL": "гренландÑки (ГренландиÑ)", + "km": "кхмерÑки", + "km_KH": "кхмерÑки (Камбоджа)", + "kn": "каннада", + "kn_IN": "каннада (ИндиÑ)", + "ko": "корейÑки", + "ko_KP": "корейÑки (Северна КореÑ)", + "ko_KR": "корейÑки (Южна КореÑ)", + "ks": "кашмирÑки", + "ks_IN": "кашмирÑки (ИндиÑ)", + "kw": "корнуолÑки", + "kw_GB": "корнуолÑки (Обединеното кралÑтво)", + "ky": "киргизки", + "ky_KG": "киргизки (КиргизÑтан)", + "lb": "люкÑембургÑки", + "lb_LU": "люкÑембургÑки (ЛюкÑембург)", + "lg": "ганда", + "lg_UG": "ганда (Уганда)", + "ln": "лингала", + "ln_AO": "лингала (Ðнгола)", + "ln_CD": "лингала (Конго (КиншаÑа))", + "ln_CF": "лингала (ЦентралноафриканÑка република)", + "ln_CG": "лингала (Конго (Бразавил))", + "lo": "лаоÑки", + "lo_LA": "лаоÑки (ЛаоÑ)", + "lt": "литовÑки", + "lt_LT": "литовÑки (Литва)", + "lu": "луба катанга", + "lu_CD": "луба катанга (Конго (КиншаÑа))", + "lv": "латвийÑки", + "lv_LV": "латвийÑки (ЛатвиÑ)", + "mg": "малгашки", + "mg_MG": "малгашки (МадагаÑкар)", + "mk": "македонÑки", + "mk_MK": "македонÑки (МакедониÑ)", + "ml": "малаÑлам", + "ml_IN": "малаÑлам (ИндиÑ)", + "mn": "монголÑки", + "mn_MN": "монголÑки (МонголиÑ)", + "mr": "марати", + "mr_IN": "марати (ИндиÑ)", + "ms": "малайÑки", + "ms_BN": "малайÑки (Бруней ДаруÑÑалам)", + "ms_MY": "малайÑки (МалайзиÑ)", + "ms_SG": "малайÑки (Сингапур)", + "mt": "малтийÑки", + "mt_MT": "малтийÑки (Малта)", + "my": "бирманÑки", + "my_MM": "бирманÑки (Мианмар (Бирма))", + "nb": "норвежки (букмол)", + "nb_NO": "норвежки (ÐорвегиÑ)", + "nb_SJ": "норвежки (Свалбард и Ян Майен)", + "nd": "Ñеверен ндебеле", + "nd_ZW": "Ñеверен ндебеле (Зимбабве)", + "ne": "непалÑки", + "ne_IN": "непалÑки (ИндиÑ)", + "ne_NP": "непалÑки (Ðепал)", + "nl": "нидерландÑки", + "nl_AW": "нидерландÑки (Ðруба)", + "nl_BE": "нидерландÑки (БелгиÑ)", + "nl_BQ": "нидерландÑки (КарибÑка ÐидерландиÑ)", + "nl_CW": "нидерландÑки (КюраÑао)", + "nl_NL": "нидерландÑки (ÐидерландиÑ)", + "nl_SR": "нидерландÑки (Суринам)", + "nl_SX": "нидерландÑки (Синт Мартен)", + "nn": "норвежки (нюношк)", + "nn_NO": "норвежки (ÐорвегиÑ)", + "no": "норвежки", + "no_NO": "норвежки (ÐорвегиÑ)", + "om": "оромо", + "om_ET": "оромо (ЕтиопиÑ)", + "om_KE": "оромо (КениÑ)", + "or": "ориÑ", + "or_IN": "Ð¾Ñ€Ð¸Ñ (ИндиÑ)", + "os": "оÑетÑки", + "os_GE": "оÑетÑки (ГрузиÑ)", + "os_RU": "оÑетÑки (РуÑиÑ)", + "pa": "пенджабÑки", + "pa_Arab": "пенджабÑки (арабÑка)", + "pa_Arab_PK": "пенджабÑки (арабÑка, ПакиÑтан)", + "pa_Guru": "пенджабÑки (гурмукхи)", + "pa_Guru_IN": "пенджабÑки (гурмукхи, ИндиÑ)", + "pa_IN": "пенджабÑки (ИндиÑ)", + "pa_PK": "пенджабÑки (ПакиÑтан)", + "pl": "полÑки", + "pl_PL": "полÑки (Полша)", + "ps": "пущу", + "ps_AF": "пущу (ÐфганиÑтан)", + "pt": "португалÑки", + "pt_AO": "португалÑки (Ðнгола)", + "pt_BR": "португалÑки (БразилиÑ)", + "pt_CH": "португалÑки (ШвейцариÑ)", + "pt_CV": "португалÑки (Кабо Верде)", + "pt_GQ": "португалÑки (Екваториална ГвинеÑ)", + "pt_GW": "португалÑки (ГвинеÑ-БиÑау)", + "pt_LU": "португалÑки (ЛюкÑембург)", + "pt_MO": "португалÑки (Макао, СÐР на Китай)", + "pt_MZ": "португалÑки (Мозамбик)", + "pt_PT": "португалÑки (ПортугалиÑ)", + "pt_ST": "португалÑки (Сао Томе и ПринÑипи)", + "pt_TL": "португалÑки (Източен Тимор)", + "qu": "кечуа", + "qu_BO": "кечуа (БоливиÑ)", + "qu_EC": "кечуа (Еквадор)", + "qu_PE": "кечуа (Перу)", + "rm": "ретороманÑки", + "rm_CH": "ретороманÑки (ШвейцариÑ)", + "rn": "рунди", + "rn_BI": "рунди (Бурунди)", + "ro": "румънÑки", + "ro_MD": "румънÑки (Молдова)", + "ro_RO": "румънÑки (РумъниÑ)", + "ru": "руÑки", + "ru_BY": "руÑки (БеларуÑ)", + "ru_KG": "руÑки (КиргизÑтан)", + "ru_KZ": "руÑки (КазахÑтан)", + "ru_MD": "руÑки (Молдова)", + "ru_RU": "руÑки (РуÑиÑ)", + "ru_UA": "руÑки (Украйна)", + "rw": "кинÑруанда", + "rw_RW": "кинÑруанда (Руанда)", + "se": "ÑеверноÑаамÑки", + "se_FI": "ÑеверноÑаамÑки (ФинландиÑ)", + "se_NO": "ÑеверноÑаамÑки (ÐорвегиÑ)", + "se_SE": "ÑеверноÑаамÑки (ШвециÑ)", + "sg": "Ñанго", + "sg_CF": "Ñанго (ЦентралноафриканÑка република)", + "sh": "ÑърбохърватÑки", + "sh_BA": "ÑърбохърватÑки (БоÑна и Херцеговина)", + "si": "ÑинхалÑки", + "si_LK": "ÑинхалÑки (Шри Ланка)", + "sk": "Ñловашки", + "sk_SK": "Ñловашки (СловакиÑ)", + "sl": "ÑловенÑки", + "sl_SI": "ÑловенÑки (СловениÑ)", + "sn": "шона", + "sn_ZW": "шона (Зимбабве)", + "so": "ÑомалийÑки", + "so_DJ": "ÑомалийÑки (Джибути)", + "so_ET": "ÑомалийÑки (ЕтиопиÑ)", + "so_KE": "ÑомалийÑки (КениÑ)", + "so_SO": "ÑомалийÑки (СомалиÑ)", + "sq": "албанÑки", + "sq_AL": "албанÑки (ÐлбаниÑ)", + "sq_MK": "албанÑки (МакедониÑ)", + "sq_XK": "албанÑки (КоÑово)", + "sr": "ÑръбÑки", + "sr_BA": "ÑръбÑки (БоÑна и Херцеговина)", + "sr_Cyrl": "ÑръбÑки (кирилица)", + "sr_Cyrl_BA": "ÑръбÑки (кирилица, БоÑна и Херцеговина)", + "sr_Cyrl_ME": "ÑръбÑки (кирилица, Черна гора)", + "sr_Cyrl_RS": "ÑръбÑки (кирилица, СърбиÑ)", + "sr_Cyrl_XK": "ÑръбÑки (кирилица, КоÑово)", + "sr_Latn": "ÑръбÑки (латиница)", + "sr_Latn_BA": "ÑръбÑки (латиница, БоÑна и Херцеговина)", + "sr_Latn_ME": "ÑръбÑки (латиница, Черна гора)", + "sr_Latn_RS": "ÑръбÑки (латиница, СърбиÑ)", + "sr_Latn_XK": "ÑръбÑки (латиница, КоÑово)", + "sr_ME": "ÑръбÑки (Черна гора)", + "sr_RS": "ÑръбÑки (СърбиÑ)", + "sr_XK": "ÑръбÑки (КоÑово)", + "sv": "шведÑки", + "sv_AX": "шведÑки (ОландÑки оÑтрови)", + "sv_FI": "шведÑки (ФинландиÑ)", + "sv_SE": "шведÑки (ШвециÑ)", + "sw": "Ñуахили", + "sw_CD": "Ñуахили (Конго (КиншаÑа))", + "sw_KE": "Ñуахили (КениÑ)", + "sw_TZ": "Ñуахили (ТанзаниÑ)", + "sw_UG": "Ñуахили (Уганда)", + "ta": "тамилÑки", + "ta_IN": "тамилÑки (ИндиÑ)", + "ta_LK": "тамилÑки (Шри Ланка)", + "ta_MY": "тамилÑки (МалайзиÑ)", + "ta_SG": "тамилÑки (Сингапур)", + "te": "телугу", + "te_IN": "телугу (ИндиÑ)", + "th": "тайÑки", + "th_TH": "тайÑки (Тайланд)", + "ti": "тигринÑ", + "ti_ER": "Ñ‚Ð¸Ð³Ñ€Ð¸Ð½Ñ (ЕритреÑ)", + "ti_ET": "Ñ‚Ð¸Ð³Ñ€Ð¸Ð½Ñ (ЕтиопиÑ)", + "tl": "тагалог", + "tl_PH": "тагалог (Филипини)", + "to": "тонга", + "to_TO": "тонга (Тонга)", + "tr": "турÑки", + "tr_CY": "турÑки (Кипър)", + "tr_TR": "турÑки (ТурциÑ)", + "ug": "уйгурÑки", + "ug_CN": "уйгурÑки (Китай)", + "uk": "украинÑки", + "uk_UA": "украинÑки (Украйна)", + "ur": "урду", + "ur_IN": "урду (ИндиÑ)", + "ur_PK": "урду (ПакиÑтан)", + "uz": "узбекÑки", + "uz_AF": "узбекÑки (ÐфганиÑтан)", + "uz_Arab": "узбекÑки (арабÑка)", + "uz_Arab_AF": "узбекÑки (арабÑка, ÐфганиÑтан)", + "uz_Cyrl": "узбекÑки (кирилица)", + "uz_Cyrl_UZ": "узбекÑки (кирилица, УзбекиÑтан)", + "uz_Latn": "узбекÑки (латиница)", + "uz_Latn_UZ": "узбекÑки (латиница, УзбекиÑтан)", + "uz_UZ": "узбекÑки (УзбекиÑтан)", + "vi": "виетнамÑки", + "vi_VN": "виетнамÑки (Виетнам)", + "yi": "идиш", + "yo": "йоруба", + "yo_BJ": "йоруба (Бенин)", + "yo_NG": "йоруба (ÐигериÑ)", + "zh": "китайÑки", + "zh_CN": "китайÑки (Китай)", + "zh_HK": "китайÑки (Хонконг, СÐР на Китай)", + "zh_Hans": "китайÑки (опроÑтена)", + "zh_Hans_CN": "китайÑки (опроÑтена, Китай)", + "zh_Hans_HK": "китайÑки (опроÑтена, Хонконг, СÐР на Китай)", + "zh_Hans_MO": "китайÑки (опроÑтена, Макао, СÐР на Китай)", + "zh_Hans_SG": "китайÑки (опроÑтена, Сингапур)", + "zh_Hant": "китайÑки (традиционен)", + "zh_Hant_HK": "китайÑки (традиционен, Хонконг, СÐР на Китай)", + "zh_Hant_MO": "китайÑки (традиционен, Макао, СÐР на Китай)", + "zh_Hant_TW": "китайÑки (традиционен, Тайван)", + "zh_MO": "китайÑки (Макао, СÐР на Китай)", + "zh_SG": "китайÑки (Сингапур)", + "zh_TW": "китайÑки (Тайван)", + "zu": "зулуÑки", + "zu_ZA": "зулуÑки (Южна Ðфрика)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bm.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bm.json new file mode 100644 index 0000000000000000000000000000000000000000..259198f81bdd91f50c8ebb2070451164dcdb6786 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bm.json @@ -0,0 +1,321 @@ +{ + "Names": { + "ak": "akankan", + "ak_GH": "akankan (Gana)", + "am": "amarikikan", + "am_ET": "amarikikan (Etiopi)", + "ar": "larabukan", + "ar_AE": "larabukan (Arabu mara kafoli)", + "ar_BH": "larabukan (Bareyini)", + "ar_DJ": "larabukan (Jibuti)", + "ar_DZ": "larabukan (Alizeri)", + "ar_EG": "larabukan (Eziputi)", + "ar_ER": "larabukan (Eritere)", + "ar_IL": "larabukan (Isirayeli)", + "ar_IQ": "larabukan (Iraki)", + "ar_JO": "larabukan (ZÉ”rdani)", + "ar_KM": "larabukan (KomÉ”ri)", + "ar_KW": "larabukan (KowÉ›ti)", + "ar_LB": "larabukan (LibaÅ‹)", + "ar_LY": "larabukan (Libi)", + "ar_MA": "larabukan (MarÉ”ku)", + "ar_MR": "larabukan (MÉ”ritani)", + "ar_OM": "larabukan (OmaÅ‹)", + "ar_PS": "larabukan (Palesitini)", + "ar_QA": "larabukan (Katari)", + "ar_SA": "larabukan (Arabiya Sawudiya)", + "ar_SD": "larabukan (SudaÅ‹)", + "ar_SO": "larabukan (Somali)", + "ar_SY": "larabukan (Siri)", + "ar_TD": "larabukan (Cadi)", + "ar_TN": "larabukan (Tunizi)", + "ar_YE": "larabukan (YemÉ›ni)", + "be": "biyelorisikan", + "be_BY": "biyelorisikan (Belarusi)", + "bg": "buligarikan", + "bg_BG": "buligarikan (Buligari)", + "bm": "bamanakan", + "bm_ML": "bamanakan (Mali)", + "bn": "bÉ›ngalikan", + "bn_BD": "bÉ›ngalikan (BÉ›ngiladÉ›si)", + "bn_IN": "bÉ›ngalikan (Ændujamana)", + "cs": "cÉ›kikan", + "cs_CZ": "cÉ›kikan (Ceki republiki)", + "de": "alimaɲikan", + "de_AT": "alimaɲikan (Otirisi)", + "de_BE": "alimaɲikan (BÉ›liziki)", + "de_CH": "alimaɲikan (Suwisi)", + "de_DE": "alimaɲikan (Alimaɲi)", + "de_IT": "alimaɲikan (Itali)", + "de_LI": "alimaɲikan (LisÉ›nsitayini)", + "de_LU": "alimaɲikan (Likisanburu)", + "el": "gÉ›rÉ›sikan", + "el_CY": "gÉ›rÉ›sikan (Cipri)", + "el_GR": "gÉ›rÉ›sikan (GÉ›rÉ›si)", + "en": "angilÉ›kan", + "en_AG": "angilÉ›kan (Antiga-ni-Barbuda)", + "en_AI": "angilÉ›kan (Angiya)", + "en_AS": "angilÉ›kan (Samowa amerikani)", + "en_AT": "angilÉ›kan (Otirisi)", + "en_AU": "angilÉ›kan (Ositirali)", + "en_BB": "angilÉ›kan (Barbadi)", + "en_BE": "angilÉ›kan (BÉ›liziki)", + "en_BI": "angilÉ›kan (Burundi)", + "en_BM": "angilÉ›kan (Bermudi)", + "en_BS": "angilÉ›kan (Bahamasi)", + "en_BW": "angilÉ›kan (BÉ”tisiwana)", + "en_BZ": "angilÉ›kan (Belizi)", + "en_CA": "angilÉ›kan (Kanada)", + "en_CH": "angilÉ›kan (Suwisi)", + "en_CK": "angilÉ›kan (Kuki Gun)", + "en_CM": "angilÉ›kan (Kameruni)", + "en_CY": "angilÉ›kan (Cipri)", + "en_DE": "angilÉ›kan (Alimaɲi)", + "en_DK": "angilÉ›kan (Danemarki)", + "en_DM": "angilÉ›kan (DÉ”miniki)", + "en_ER": "angilÉ›kan (Eritere)", + "en_FI": "angilÉ›kan (Finilandi)", + "en_FJ": "angilÉ›kan (Fiji)", + "en_FK": "angilÉ›kan (Maluwini Gun)", + "en_FM": "angilÉ›kan (Mikironesi)", + "en_GB": "angilÉ›kan (AngilÉ›tÉ›ri)", + "en_GD": "angilÉ›kan (Granadi)", + "en_GH": "angilÉ›kan (Gana)", + "en_GI": "angilÉ›kan (Zibralitari)", + "en_GM": "angilÉ›kan (Ganbi)", + "en_GU": "angilÉ›kan (Gwam)", + "en_GY": "angilÉ›kan (Gwiyana)", + "en_IE": "angilÉ›kan (Irilandi)", + "en_IL": "angilÉ›kan (Isirayeli)", + "en_IN": "angilÉ›kan (Ændujamana)", + "en_IO": "angilÉ›kan (AngilÉ› ka É›ndu dugukolo)", + "en_JM": "angilÉ›kan (Zamayiki)", + "en_KE": "angilÉ›kan (Keniya)", + "en_KI": "angilÉ›kan (Kiribati)", + "en_KN": "angilÉ›kan (KristÉ”fo-Senu-ni-ÆevÉ›s)", + "en_KY": "angilÉ›kan (Bama Gun)", + "en_LC": "angilÉ›kan (Lusi-Senu)", + "en_LR": "angilÉ›kan (Liberiya)", + "en_LS": "angilÉ›kan (Lesoto)", + "en_MG": "angilÉ›kan (Madagasikari)", + "en_MH": "angilÉ›kan (Marisali Gun)", + "en_MP": "angilÉ›kan (Kɛɲɛka Mariyani Gun)", + "en_MS": "angilÉ›kan (MoÅ‹sera)", + "en_MT": "angilÉ›kan (Malti)", + "en_MU": "angilÉ›kan (Morisi)", + "en_MW": "angilÉ›kan (Malawi)", + "en_MY": "angilÉ›kan (MalÉ›zi)", + "en_NA": "angilÉ›kan (Namibi)", + "en_NF": "angilÉ›kan (NÉ”rofoliki Gun)", + "en_NG": "angilÉ›kan (Nizeriya)", + "en_NL": "angilÉ›kan (Peyiba)", + "en_NR": "angilÉ›kan (Nawuru)", + "en_NU": "angilÉ›kan (Nyuwe)", + "en_NZ": "angilÉ›kan (Zelandi Koura)", + "en_PG": "angilÉ›kan (Papuwasi-Gine-Koura)", + "en_PH": "angilÉ›kan (Filipini)", + "en_PK": "angilÉ›kan (PakisitaÅ‹)", + "en_PN": "angilÉ›kan (Pitikarini)", + "en_PR": "angilÉ›kan (PÉ”rotoriko)", + "en_PW": "angilÉ›kan (Palawu)", + "en_RW": "angilÉ›kan (Ruwanda)", + "en_SB": "angilÉ›kan (Salomo Gun)", + "en_SC": "angilÉ›kan (SesÉ›li)", + "en_SD": "angilÉ›kan (SudaÅ‹)", + "en_SE": "angilÉ›kan (SuwÉ›di)", + "en_SG": "angilÉ›kan (SÉ›ngapuri)", + "en_SH": "angilÉ›kan (ÆlÉ›ni Senu)", + "en_SI": "angilÉ›kan (Sloveni)", + "en_SL": "angilÉ›kan (Siyera LewÉ”ni)", + "en_SZ": "angilÉ›kan (Swazilandi)", + "en_TC": "angilÉ›kan (Turiki Gun ni Kayiki)", + "en_TK": "angilÉ›kan (Tokelo)", + "en_TO": "angilÉ›kan (Tonga)", + "en_TT": "angilÉ›kan (Trinite-ni-Tobago)", + "en_TV": "angilÉ›kan (Tuvalu)", + "en_TZ": "angilÉ›kan (Tanzani)", + "en_UG": "angilÉ›kan (Uganda)", + "en_US": "angilÉ›kan (Ameriki)", + "en_VC": "angilÉ›kan (VinisÉ›n-Senu-ni-Grenadini)", + "en_VG": "angilÉ›kan (AngilÉ› ka Sungurunnin Gun)", + "en_VI": "angilÉ›kan (Ameriki ka Sungurunnin Gun)", + "en_VU": "angilÉ›kan (Vanuwatu)", + "en_WS": "angilÉ›kan (Samowa)", + "en_ZA": "angilÉ›kan (Worodugu Afriki)", + "en_ZM": "angilÉ›kan (Zanbi)", + "en_ZW": "angilÉ›kan (Zimbabuwe)", + "es": "esipaɲolkan", + "es_AR": "esipaɲolkan (Arizantin)", + "es_BO": "esipaɲolkan (Bolivi)", + "es_BR": "esipaɲolkan (Berezili)", + "es_CL": "esipaɲolkan (Sili)", + "es_CO": "esipaɲolkan (Kolombi)", + "es_CR": "esipaɲolkan (KÉ”sitarika)", + "es_CU": "esipaɲolkan (Kuba)", + "es_DO": "esipaɲolkan (DÉ”mimiki republiki)", + "es_EC": "esipaɲolkan (EkwatÉ”r)", + "es_ES": "esipaɲolkan (Esipaɲi)", + "es_GQ": "esipaɲolkan (Gine ekwatÉ”ri)", + "es_GT": "esipaɲolkan (Gwatemala)", + "es_HN": "esipaɲolkan (HÉ”ndirasi)", + "es_MX": "esipaɲolkan (Meksiki)", + "es_NI": "esipaɲolkan (Nikaragwa)", + "es_PA": "esipaɲolkan (Panama)", + "es_PE": "esipaɲolkan (Peru)", + "es_PH": "esipaɲolkan (Filipini)", + "es_PR": "esipaɲolkan (PÉ”rotoriko)", + "es_PY": "esipaɲolkan (Paraguwayi)", + "es_SV": "esipaɲolkan (SalivadÉ”r)", + "es_US": "esipaɲolkan (Ameriki)", + "es_UY": "esipaɲolkan (Urugwayi)", + "es_VE": "esipaɲolkan (Venezuwela)", + "fa": "perisanikan", + "fa_AF": "perisanikan (AfiganistaÅ‹)", + "fa_IR": "perisanikan (IraÅ‹)", + "fr": "tubabukan", + "fr_BE": "tubabukan (BÉ›liziki)", + "fr_BF": "tubabukan (Burukina Faso)", + "fr_BI": "tubabukan (Burundi)", + "fr_BJ": "tubabukan (BenÉ›n)", + "fr_CA": "tubabukan (Kanada)", + "fr_CD": "tubabukan (Kongo ka republiki demÉ”kratiki)", + "fr_CF": "tubabukan (Santarafiriki)", + "fr_CG": "tubabukan (Kongo)", + "fr_CH": "tubabukan (Suwisi)", + "fr_CI": "tubabukan (Kodiwari)", + "fr_CM": "tubabukan (Kameruni)", + "fr_DJ": "tubabukan (Jibuti)", + "fr_DZ": "tubabukan (Alizeri)", + "fr_FR": "tubabukan (Faransi)", + "fr_GA": "tubabukan (Gabɔŋ)", + "fr_GF": "tubabukan (Faransi ka gwiyani)", + "fr_GN": "tubabukan (Gine)", + "fr_GP": "tubabukan (Gwadelup)", + "fr_GQ": "tubabukan (Gine ekwatÉ”ri)", + "fr_HT": "tubabukan (Ayiti)", + "fr_KM": "tubabukan (KomÉ”ri)", + "fr_LU": "tubabukan (Likisanburu)", + "fr_MA": "tubabukan (MarÉ”ku)", + "fr_MC": "tubabukan (Monako)", + "fr_MG": "tubabukan (Madagasikari)", + "fr_ML": "tubabukan (Mali)", + "fr_MQ": "tubabukan (Maritiniki)", + "fr_MR": "tubabukan (MÉ”ritani)", + "fr_MU": "tubabukan (Morisi)", + "fr_NC": "tubabukan (Kaledoni Koura)", + "fr_NE": "tubabukan (NizÉ›ri)", + "fr_PF": "tubabukan (Faransi ka polinezi)", + "fr_PM": "tubabukan (PiyÉ›ri-Senu-ni-Mikelɔŋ)", + "fr_RE": "tubabukan (Reyuɲɔŋ)", + "fr_RW": "tubabukan (Ruwanda)", + "fr_SC": "tubabukan (SesÉ›li)", + "fr_SN": "tubabukan (Senegali)", + "fr_SY": "tubabukan (Siri)", + "fr_TD": "tubabukan (Cadi)", + "fr_TG": "tubabukan (Togo)", + "fr_TN": "tubabukan (Tunizi)", + "fr_VU": "tubabukan (Vanuwatu)", + "fr_WF": "tubabukan (Walisi-ni-Futuna)", + "fr_YT": "tubabukan (Mayoti)", + "ha": "awusakan", + "ha_GH": "awusakan (Gana)", + "ha_NE": "awusakan (NizÉ›ri)", + "ha_NG": "awusakan (Nizeriya)", + "hi": "inidikan", + "hi_IN": "inidikan (Ændujamana)", + "hu": "oÅ‹irikan", + "hu_HU": "oÅ‹irikan (HÉ”ngri)", + "id": "Ændonezikan", + "id_ID": "Ændonezikan (Ændonezi)", + "ig": "igibokan", + "ig_NG": "igibokan (Nizeriya)", + "it": "italikan", + "it_CH": "italikan (Suwisi)", + "it_IT": "italikan (Itali)", + "it_SM": "italikan (Marini-Senu)", + "ja": "zapÉ”nekan", + "ja_JP": "zapÉ”nekan (ZapÉ”n)", + "km": "kambojikan", + "km_KH": "kambojikan (Kamboji)", + "ko": "korekan", + "ko_KP": "korekan (Kɛɲɛka Kore)", + "ko_KR": "korekan (Worodugu Kore)", + "ms": "malÉ›zikan", + "ms_BN": "malÉ›zikan (BurinÉ›yi)", + "ms_MY": "malÉ›zikan (MalÉ›zi)", + "ms_SG": "malÉ›zikan (SÉ›ngapuri)", + "my": "birimanikan", + "my_MM": "birimanikan (Myanimari)", + "ne": "nepalekan", + "ne_IN": "nepalekan (Ændujamana)", + "ne_NP": "nepalekan (Nepali)", + "nl": "olandekan", + "nl_AW": "olandekan (Aruba)", + "nl_BE": "olandekan (BÉ›liziki)", + "nl_NL": "olandekan (Peyiba)", + "nl_SR": "olandekan (Surinami)", + "pa": "pÉ›nijabikan", + "pa_IN": "pÉ›nijabikan (Ændujamana)", + "pa_PK": "pÉ›nijabikan (PakisitaÅ‹)", + "pl": "polonekan", + "pl_PL": "polonekan (Poloɲi)", + "pt": "pÉ”ritigalikan", + "pt_AO": "pÉ”ritigalikan (Angola)", + "pt_BR": "pÉ”ritigalikan (Berezili)", + "pt_CH": "pÉ”ritigalikan (Suwisi)", + "pt_CV": "pÉ”ritigalikan (CapivÉ›rdi)", + "pt_GQ": "pÉ”ritigalikan (Gine ekwatÉ”ri)", + "pt_GW": "pÉ”ritigalikan (Gine Bisawo)", + "pt_LU": "pÉ”ritigalikan (Likisanburu)", + "pt_MZ": "pÉ”ritigalikan (Mozanbiki)", + "pt_PT": "pÉ”ritigalikan (PÉ”ritigali)", + "pt_ST": "pÉ”ritigalikan (Sawo Tome-ni-Prinicipe)", + "pt_TL": "pÉ”ritigalikan (KÉ”rÉ”n TimÉ”r)", + "ro": "rumanikan", + "ro_MD": "rumanikan (Molidavi)", + "ro_RO": "rumanikan (Rumani)", + "ru": "irisikan", + "ru_BY": "irisikan (Belarusi)", + "ru_KG": "irisikan (KirigizisitaÅ‹)", + "ru_KZ": "irisikan (KazakistaÅ‹)", + "ru_MD": "irisikan (Molidavi)", + "ru_RU": "irisikan (Irisi)", + "ru_UA": "irisikan (UkÉ›rÉ›ni)", + "rw": "ruwandakan", + "rw_RW": "ruwandakan (Ruwanda)", + "so": "somalikan", + "so_DJ": "somalikan (Jibuti)", + "so_ET": "somalikan (Etiopi)", + "so_KE": "somalikan (Keniya)", + "so_SO": "somalikan (Somali)", + "sv": "suwÉ›dikan", + "sv_FI": "suwÉ›dikan (Finilandi)", + "sv_SE": "suwÉ›dikan (SuwÉ›di)", + "ta": "tamulikan", + "ta_IN": "tamulikan (Ændujamana)", + "ta_LK": "tamulikan (Sirilanka)", + "ta_MY": "tamulikan (MalÉ›zi)", + "ta_SG": "tamulikan (SÉ›ngapuri)", + "th": "tayikan", + "th_TH": "tayikan (Tayilandi)", + "tr": "turikikan", + "tr_CY": "turikikan (Cipri)", + "tr_TR": "turikikan (Turiki)", + "uk": "ukÉ›rÉ›nikan", + "uk_UA": "ukÉ›rÉ›nikan (UkÉ›rÉ›ni)", + "ur": "urudukan", + "ur_IN": "urudukan (Ændujamana)", + "ur_PK": "urudukan (PakisitaÅ‹)", + "vi": "wiyÉ›tinamukan", + "vi_VN": "wiyÉ›tinamukan (WiyÉ›tinamu)", + "yo": "yorubakan", + "yo_BJ": "yorubakan (BenÉ›n)", + "yo_NG": "yorubakan (Nizeriya)", + "zh": "siniwakan", + "zh_CN": "siniwakan (Siniwajamana)", + "zh_SG": "siniwakan (SÉ›ngapuri)", + "zh_TW": "siniwakan (Tayiwani)", + "zu": "zulukan", + "zu_ZA": "zulukan (Worodugu Afriki)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bn.json new file mode 100644 index 0000000000000000000000000000000000000000..9f5fdd4e739a0d9e14faa7215dcaeac8f305d0a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bn.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "আফà§à¦°à¦¿à¦•ান", + "af_NA": "আফà§à¦°à¦¿à¦•ান (নামিবিয়া)", + "af_ZA": "আফà§à¦°à¦¿à¦•ান (দকà§à¦·à¦¿à¦£ আফà§à¦°à¦¿à¦•া)", + "ak": "আকান", + "ak_GH": "আকান (ঘানা)", + "am": "আমহারিক", + "am_ET": "আমহারিক (ইফিওপিয়া)", + "ar": "আরবী", + "ar_AE": "আরবী (সংযà§à¦•à§à¦¤ আরব আমিরাত)", + "ar_BH": "আরবী (বাহরাইন)", + "ar_DJ": "আরবী (জিবà§à¦¤à¦¿)", + "ar_DZ": "আরবী (আলজেরিয়া)", + "ar_EG": "আরবী (মিশর)", + "ar_EH": "আরবী (পশà§à¦šà¦¿à¦® সাহারা)", + "ar_ER": "আরবী (ইরিতà§à¦°à¦¿à¦¯à¦¼à¦¾)", + "ar_IL": "আরবী (ইজরায়েল)", + "ar_IQ": "আরবী (ইরাক)", + "ar_JO": "আরবী (জরà§à¦¡à¦¨)", + "ar_KM": "আরবী (কমোরোস)", + "ar_KW": "আরবী (কà§à¦¯à¦¼à§‡à¦¤)", + "ar_LB": "আরবী (লেবানন)", + "ar_LY": "আরবী (লিবিয়া)", + "ar_MA": "আরবী (মোরকà§à¦•à§‹)", + "ar_MR": "আরবী (মরিতানিয়া)", + "ar_OM": "আরবী (ওমান)", + "ar_PS": "আরবী (ফিলিসà§à¦¤à¦¿à¦¨ অঞà§à¦šà¦²à¦¸à¦®à§‚হ)", + "ar_QA": "আরবী (কাতার)", + "ar_SA": "আরবী (সৌদি আরব)", + "ar_SD": "আরবী (সà§à¦¦à¦¾à¦¨)", + "ar_SO": "আরবী (সোমালিয়া)", + "ar_SS": "আরবী (দকà§à¦·à¦¿à¦£ সà§à¦¦à¦¾à¦¨)", + "ar_SY": "আরবী (সিরিয়া)", + "ar_TD": "আরবী (চাদ)", + "ar_TN": "আরবী (তিউনিসিয়া)", + "ar_YE": "আরবী (ইয়েমেন)", + "as": "আসামি", + "as_IN": "আসামি (ভারত)", + "az": "আজারবাইজানী", + "az_AZ": "আজারবাইজানী (আজারবাইজান)", + "az_Cyrl": "আজারবাইজানী (সিরিলিক)", + "az_Cyrl_AZ": "আজারবাইজানী (সিরিলিক, আজারবাইজান)", + "az_Latn": "আজারবাইজানী (লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨)", + "az_Latn_AZ": "আজারবাইজানী (লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨, আজারবাইজান)", + "be": "বেলারà§à¦¶à¦¿à¦¯à¦¼", + "be_BY": "বেলারà§à¦¶à¦¿à¦¯à¦¼ (বেলারà§à¦¶)", + "bg": "বà§à¦²à¦—েরিয়", + "bg_BG": "বà§à¦²à¦—েরিয় (বà§à¦²à¦—েরিয়া)", + "bm": "বামবারা", + "bm_ML": "বামবারা (মালি)", + "bn": "বাংলা", + "bn_BD": "বাংলা (বাংলাদেশ)", + "bn_IN": "বাংলা (ভারত)", + "bo": "তিবà§à¦¬à¦¤à¦¿", + "bo_CN": "তিবà§à¦¬à¦¤à¦¿ (চীন)", + "bo_IN": "তিবà§à¦¬à¦¤à¦¿ (ভারত)", + "br": "বà§à¦°à§‡à¦Ÿà¦¨", + "br_FR": "বà§à¦°à§‡à¦Ÿà¦¨ (ফà§à¦°à¦¾à¦¨à§à¦¸)", + "bs": "বসনীয়ান", + "bs_BA": "বসনীয়ান (বসনিয়া ও হারà§à¦œà§‡à¦—োভিনা)", + "bs_Cyrl": "বসনীয়ান (সিরিলিক)", + "bs_Cyrl_BA": "বসনীয়ান (সিরিলিক, বসনিয়া ও হারà§à¦œà§‡à¦—োভিনা)", + "bs_Latn": "বসনীয়ান (লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨)", + "bs_Latn_BA": "বসনীয়ান (লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨, বসনিয়া ও হারà§à¦œà§‡à¦—োভিনা)", + "ca": "কাতালান", + "ca_AD": "কাতালান (আনà§à¦¡à§‹à¦°à¦¾)", + "ca_ES": "কাতালান (সà§à¦ªà§‡à¦¨)", + "ca_FR": "কাতালান (ফà§à¦°à¦¾à¦¨à§à¦¸)", + "ca_IT": "কাতালান (ইতালি)", + "ce": "চেচেন", + "ce_RU": "চেচেন (রাশিয়া)", + "cs": "চেক", + "cs_CZ": "চেক (চেক পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦°)", + "cy": "ওয়েলশ", + "cy_GB": "ওয়েলশ (যà§à¦•à§à¦¤à¦°à¦¾à¦œà§à¦¯)", + "da": "ডেনিশ", + "da_DK": "ডেনিশ (ডেনমারà§à¦•)", + "da_GL": "ডেনিশ (গà§à¦°à§€à¦¨à¦²à§à¦¯à¦¾à¦¨à§à¦¡)", + "de": "জারà§à¦®à¦¾à¦¨", + "de_AT": "জারà§à¦®à¦¾à¦¨ (অসà§à¦Ÿà§à¦°à¦¿à¦¯à¦¼à¦¾)", + "de_BE": "জারà§à¦®à¦¾à¦¨ (বেলজিয়াম)", + "de_CH": "জারà§à¦®à¦¾à¦¨ (সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦¨à§à¦¡)", + "de_DE": "জারà§à¦®à¦¾à¦¨ (জারà§à¦®à¦¾à¦¨à¦¿)", + "de_IT": "জারà§à¦®à¦¾à¦¨ (ইতালি)", + "de_LI": "জারà§à¦®à¦¾à¦¨ (লিচেনসà§à¦Ÿà§‡à¦‡à¦¨)", + "de_LU": "জারà§à¦®à¦¾à¦¨ (লাকà§à¦¸à§‡à¦®à¦¬à¦¾à¦°à§à¦—)", + "dz": "জোঙà§à¦—া", + "dz_BT": "জোঙà§à¦—া (ভà§à¦Ÿà¦¾à¦¨)", + "ee": "ইউয়ি", + "ee_GH": "ইউয়ি (ঘানা)", + "ee_TG": "ইউয়ি (টোগো)", + "el": "গà§à¦°à¦¿à¦•", + "el_CY": "গà§à¦°à¦¿à¦• (সাইপà§à¦°à¦¾à¦¸)", + "el_GR": "গà§à¦°à¦¿à¦• (গà§à¦°à§€à¦¸)", + "en": "ইংরেজি", + "en_AG": "ইংরেজি (à¦à¦¨à§à¦Ÿà¦¿à¦—à§à¦¯à¦¼à¦¾ ও বারবà§à¦¡à¦¾)", + "en_AI": "ইংরেজি (à¦à§à¦¯à¦¾à¦™à§à¦—à§à¦‡à¦²à¦¾)", + "en_AS": "ইংরেজি (আমেরিকান সামোয়া)", + "en_AT": "ইংরেজি (অসà§à¦Ÿà§à¦°à¦¿à¦¯à¦¼à¦¾)", + "en_AU": "ইংরেজি (অসà§à¦Ÿà§à¦°à§‡à¦²à¦¿à¦¯à¦¼à¦¾)", + "en_BB": "ইংরেজি (বারবাদোস)", + "en_BE": "ইংরেজি (বেলজিয়াম)", + "en_BI": "ইংরেজি (বà§à¦°à§à¦¨à§à¦¡à¦¿)", + "en_BM": "ইংরেজি (বারমà§à¦¡à¦¾)", + "en_BS": "ইংরেজি (বাহামা দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_BW": "ইংরেজি (বতসোয়ানা)", + "en_BZ": "ইংরেজি (বেলিজ)", + "en_CA": "ইংরেজি (কানাডা)", + "en_CC": "ইংরেজি (কোকোস (কিলিং) দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_CH": "ইংরেজি (সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦¨à§à¦¡)", + "en_CK": "ইংরেজি (কà§à¦• দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_CM": "ইংরেজি (কà§à¦¯à¦¾à¦®à§‡à¦°à§à¦¨)", + "en_CX": "ইংরেজি (কà§à¦°à¦¿à¦¸à¦®à¦¾à¦¸ দà§à¦¬à§€à¦ª)", + "en_CY": "ইংরেজি (সাইপà§à¦°à¦¾à¦¸)", + "en_DE": "ইংরেজি (জারà§à¦®à¦¾à¦¨à¦¿)", + "en_DG": "ইংরেজি (দিয়েগো গারà§à¦¸à¦¿à¦¯à¦¼à¦¾)", + "en_DK": "ইংরেজি (ডেনমারà§à¦•)", + "en_DM": "ইংরেজি (ডোমিনিকা)", + "en_ER": "ইংরেজি (ইরিতà§à¦°à¦¿à¦¯à¦¼à¦¾)", + "en_FI": "ইংরেজি (ফিনলà§à¦¯à¦¾à¦¨à§à¦¡)", + "en_FJ": "ইংরেজি (ফিজি)", + "en_FK": "ইংরেজি (ফকলà§à¦¯à¦¾à¦¨à§à¦¡ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_FM": "ইংরেজি (মাইকà§à¦°à§‹à¦¨à§‡à¦¶à¦¿à¦¯à¦¼à¦¾)", + "en_GB": "ইংরেজি (যà§à¦•à§à¦¤à¦°à¦¾à¦œà§à¦¯)", + "en_GD": "ইংরেজি (গà§à¦°à§‡à¦¨à¦¾à¦¡à¦¾)", + "en_GG": "ইংরেজি (গà§à¦°à¦¾à¦žà§à¦œà¦¿)", + "en_GH": "ইংরেজি (ঘানা)", + "en_GI": "ইংরেজি (জিবà§à¦°à¦¾à¦²à§à¦Ÿà¦¾à¦°)", + "en_GM": "ইংরেজি (গামà§à¦¬à¦¿à¦¯à¦¼à¦¾)", + "en_GU": "ইংরেজি (গà§à¦¯à¦¼à¦¾à¦®)", + "en_GY": "ইংরেজি (গিয়ানা)", + "en_HK": "ইংরেজি (হংকং à¦à¦¸à¦à¦†à¦° চীনা)", + "en_IE": "ইংরেজি (আয়ারলà§à¦¯à¦¾à¦¨à§à¦¡)", + "en_IL": "ইংরেজি (ইজরায়েল)", + "en_IM": "ইংরেজি (আইল অফ মà§à¦¯à¦¾à¦¨)", + "en_IN": "ইংরেজি (ভারত)", + "en_IO": "ইংরেজি (বà§à¦°à¦¿à¦Ÿà¦¿à¦¶ ভারত মহাসাগরীয় অঞà§à¦šà¦²)", + "en_JE": "ইংরেজি (জারà§à¦¸à¦¿)", + "en_JM": "ইংরেজি (জামাইকা)", + "en_KE": "ইংরেজি (কেনিয়া)", + "en_KI": "ইংরেজি (কিরিবাতি)", + "en_KN": "ইংরেজি (সেনà§à¦Ÿ কিটস ও নেভিস)", + "en_KY": "ইংরেজি (কেমà§à¦¯à¦¾à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_LC": "ইংরেজি (সেনà§à¦Ÿ লà§à¦¸à¦¿à¦¯à¦¼à¦¾)", + "en_LR": "ইংরেজি (লাইবেরিয়া)", + "en_LS": "ইংরেজি (লেসোথো)", + "en_MG": "ইংরেজি (মাদাগাসà§à¦•ার)", + "en_MH": "ইংরেজি (মারà§à¦¶à¦¾à¦² দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_MO": "ইংরেজি (মà§à¦¯à¦¾à¦•াও à¦à¦¸à¦à¦†à¦° চীনা)", + "en_MP": "ইংরেজি (উতà§à¦¤à¦°à¦¾à¦žà§à¦šà¦²à§€à¦¯à¦¼ মারিয়ানা দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_MS": "ইংরেজি (মনà§à¦Ÿà¦¸à§‡à¦°à¦¾à¦Ÿ)", + "en_MT": "ইংরেজি (মালà§à¦Ÿà¦¾)", + "en_MU": "ইংরেজি (মরিশাস)", + "en_MW": "ইংরেজি (মালাউই)", + "en_MY": "ইংরেজি (মালয়েশিয়া)", + "en_NA": "ইংরেজি (নামিবিয়া)", + "en_NF": "ইংরেজি (নিরফোক দà§à¦¬à§€à¦ª)", + "en_NG": "ইংরেজি (নাইজেরিয়া)", + "en_NL": "ইংরেজি (নেদারলà§à¦¯à¦¾à¦¨à§à¦¡à¦¸)", + "en_NR": "ইংরেজি (নাউরà§)", + "en_NU": "ইংরেজি (নিউয়ে)", + "en_NZ": "ইংরেজি (নিউজিলà§à¦¯à¦¾à¦¨à§à¦¡)", + "en_PG": "ইংরেজি (পাপà§à¦¯à¦¼à¦¾ নিউ গিনি)", + "en_PH": "ইংরেজি (ফিলিপাইন)", + "en_PK": "ইংরেজি (পাকিসà§à¦¤à¦¾à¦¨)", + "en_PN": "ইংরেজি (পিটকেয়ারà§à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_PR": "ইংরেজি (পà§à¦¯à¦¼à§‡à¦°à§à¦¤à§‹ রিকো)", + "en_PW": "ইংরেজি (পালাউ)", + "en_RW": "ইংরেজি (রà§à¦¯à¦¼à¦¾à¦¨à§à¦¡à¦¾)", + "en_SB": "ইংরেজি (সলোমন দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_SC": "ইংরেজি (সিসিলি)", + "en_SD": "ইংরেজি (সà§à¦¦à¦¾à¦¨)", + "en_SE": "ইংরেজি (সà§à¦‡à¦¡à§‡à¦¨)", + "en_SG": "ইংরেজি (সিঙà§à¦—াপà§à¦°)", + "en_SH": "ইংরেজি (সেনà§à¦Ÿ হেলেনা)", + "en_SI": "ইংরেজি (সà§à¦²à§‹à¦­à¦¾à¦¨à¦¿à¦¯à¦¼à¦¾)", + "en_SL": "ইংরেজি (সিয়েরালিওন)", + "en_SS": "ইংরেজি (দকà§à¦·à¦¿à¦£ সà§à¦¦à¦¾à¦¨)", + "en_SX": "ইংরেজি (সিনà§à¦Ÿ মারà§à¦Ÿà§‡à¦¨)", + "en_SZ": "ইংরেজি (সোয়াজিলà§à¦¯à¦¾à¦¨à§à¦¡)", + "en_TC": "ইংরেজি (তà§à¦°à§à¦•স ও কাইকোস দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_TK": "ইংরেজি (টোকেলাউ)", + "en_TO": "ইংরেজি (টোঙà§à¦—া)", + "en_TT": "ইংরেজি (তà§à¦°à¦¿à¦¨à¦¿à¦¨à¦¾à¦¦ ও টোবà§à¦¯à¦¾à¦—à§‹)", + "en_TV": "ইংরেজি (টà§à¦­à¦¾à¦²à§)", + "en_TZ": "ইংরেজি (তাঞà§à¦œà¦¾à¦¨à¦¿à¦¯à¦¼à¦¾)", + "en_UG": "ইংরেজি (উগানà§à¦¡à¦¾)", + "en_UM": "ইংরেজি (যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦°à§‡à¦° পারà§à¦¶à§à¦¬à¦¬à¦°à§à¦¤à§€ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_US": "ইংরেজি (মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦°)", + "en_VC": "ইংরেজি (সেনà§à¦Ÿ ভিনসেনà§à¦Ÿ ও দà§à¦¯à¦¾ গà§à¦°à§‡à¦¨à¦¾à¦¡à¦¿à¦¨à¦¸)", + "en_VG": "ইংরেজি (বà§à¦°à¦¿à¦Ÿà¦¿à¦¶ ভারà§à¦œà¦¿à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_VI": "ইংরেজি (মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦°à§‡à¦° ভারà§à¦œà¦¿à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "en_VU": "ইংরেজি (ভানà§à¦¯à¦¼à¦¾à¦Ÿà§)", + "en_WS": "ইংরেজি (সামোয়া)", + "en_ZA": "ইংরেজি (দকà§à¦·à¦¿à¦£ আফà§à¦°à¦¿à¦•া)", + "en_ZM": "ইংরেজি (জামà§à¦¬à¦¿à¦¯à¦¼à¦¾)", + "en_ZW": "ইংরেজি (জিমà§à¦¬à¦¾à¦¬à§‹à¦¯à¦¼à§‡)", + "eo": "à¦à¦¸à§à¦ªà§‡à¦°à¦¾à¦¨à§à¦¤à§‹", + "es": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶", + "es_AR": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (আরà§à¦œà§‡à¦¨à§à¦Ÿà¦¿à¦¨à¦¾)", + "es_BO": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (বলিভিয়া)", + "es_BR": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (বà§à¦°à¦¾à¦œà¦¿à¦²)", + "es_CL": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (চিলি)", + "es_CO": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (কলমà§à¦¬à¦¿à¦¯à¦¼à¦¾)", + "es_CR": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (কোসà§à¦Ÿà¦¾à¦°à¦¿à¦•া)", + "es_CU": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (কিউবা)", + "es_DO": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (ডোমেনিকান পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦°)", + "es_EA": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (কà§à¦‰à¦Ÿà¦¾ à¦à¦¬à¦‚ মেলিলা)", + "es_EC": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (ইকà§à¦¯à¦¼à§‡à¦¡à¦°)", + "es_ES": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (সà§à¦ªà§‡à¦¨)", + "es_GQ": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (নিরকà§à¦·à§€à¦¯à¦¼ গিনি)", + "es_GT": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (গà§à¦¯à¦¼à¦¾à¦¤à§‡à¦®à¦¾à¦²à¦¾)", + "es_HN": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (হণà§à¦¡à§à¦°à¦¾à¦¸)", + "es_IC": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (কà§à¦¯à¦¾à¦¨à¦¾à¦°à¦¿ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "es_MX": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (মেকà§à¦¸à¦¿à¦•à§‹)", + "es_NI": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (নিকারাগà§à¦¯à¦¼à¦¾)", + "es_PA": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (পানামা)", + "es_PE": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (পেরà§)", + "es_PH": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (ফিলিপাইন)", + "es_PR": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (পà§à¦¯à¦¼à§‡à¦°à§à¦¤à§‹ রিকো)", + "es_PY": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (পà§à¦¯à¦¾à¦°à¦¾à¦—à§à¦¯à¦¼à§‡)", + "es_SV": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (à¦à¦² সালভেদর)", + "es_US": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦°)", + "es_UY": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (উরà§à¦—à§à¦¯à¦¼à§‡)", + "es_VE": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (ভেনেজà§à¦¯à¦¼à§‡à¦²à¦¾)", + "et": "à¦à¦¸à§à¦¤à§‹à¦¨à§€à¦¯à¦¼", + "et_EE": "à¦à¦¸à§à¦¤à§‹à¦¨à§€à¦¯à¦¼ (à¦à¦¸à§à¦¤à§‹à¦¨à¦¿à¦¯à¦¼à¦¾)", + "eu": "বাসà§à¦•", + "eu_ES": "বাসà§à¦• (সà§à¦ªà§‡à¦¨)", + "fa": "ফারà§à¦¸à¦¿", + "fa_AF": "ফারà§à¦¸à¦¿ (আফগানিসà§à¦¤à¦¾à¦¨)", + "fa_IR": "ফারà§à¦¸à¦¿ (ইরান)", + "ff": "ফà§à¦²à¦¾à¦¹à§", + "ff_CM": "ফà§à¦²à¦¾à¦¹à§ (কà§à¦¯à¦¾à¦®à§‡à¦°à§à¦¨)", + "ff_GN": "ফà§à¦²à¦¾à¦¹à§ (গিনি)", + "ff_MR": "ফà§à¦²à¦¾à¦¹à§ (মরিতানিয়া)", + "ff_SN": "ফà§à¦²à¦¾à¦¹à§ (সেনেগাল)", + "fi": "ফিনিশ", + "fi_FI": "ফিনিশ (ফিনলà§à¦¯à¦¾à¦¨à§à¦¡)", + "fo": "ফারোস", + "fo_DK": "ফারোস (ডেনমারà§à¦•)", + "fo_FO": "ফারোস (ফà§à¦¯à¦¾à¦°à¦“ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "fr": "ফরাসি", + "fr_BE": "ফরাসি (বেলজিয়াম)", + "fr_BF": "ফরাসি (বà§à¦°à¦•িনা ফাসো)", + "fr_BI": "ফরাসি (বà§à¦°à§à¦¨à§à¦¡à¦¿)", + "fr_BJ": "ফরাসি (বেনিন)", + "fr_BL": "ফরাসি (সেনà§à¦Ÿ বারথেলিমি)", + "fr_CA": "ফরাসি (কানাডা)", + "fr_CD": "ফরাসি (কঙà§à¦—à§‹-কিনশাসা)", + "fr_CF": "ফরাসি (মধà§à¦¯ আফà§à¦°à¦¿à¦•ার পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦°)", + "fr_CG": "ফরাসি (কঙà§à¦—à§‹ - বà§à¦°à¦¾à¦œà¦¾à¦­à¦¿à¦²)", + "fr_CH": "ফরাসি (সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦¨à§à¦¡)", + "fr_CI": "ফরাসি (আইভরি কোসà§à¦Ÿ)", + "fr_CM": "ফরাসি (কà§à¦¯à¦¾à¦®à§‡à¦°à§à¦¨)", + "fr_DJ": "ফরাসি (জিবà§à¦¤à¦¿)", + "fr_DZ": "ফরাসি (আলজেরিয়া)", + "fr_FR": "ফরাসি (ফà§à¦°à¦¾à¦¨à§à¦¸)", + "fr_GA": "ফরাসি (গà§à¦¯à¦¾à¦¬à¦¨)", + "fr_GF": "ফরাসি (ফরাসী গায়ানা)", + "fr_GN": "ফরাসি (গিনি)", + "fr_GP": "ফরাসি (গà§à¦¯à¦¼à¦¾à¦¦à§‡à¦²à§Œà¦ª)", + "fr_GQ": "ফরাসি (নিরকà§à¦·à§€à¦¯à¦¼ গিনি)", + "fr_HT": "ফরাসি (হাইতি)", + "fr_KM": "ফরাসি (কমোরোস)", + "fr_LU": "ফরাসি (লাকà§à¦¸à§‡à¦®à¦¬à¦¾à¦°à§à¦—)", + "fr_MA": "ফরাসি (মোরকà§à¦•à§‹)", + "fr_MC": "ফরাসি (মোনাকো)", + "fr_MF": "ফরাসি (সেনà§à¦Ÿ মারà§à¦Ÿà¦¿à¦¨)", + "fr_MG": "ফরাসি (মাদাগাসà§à¦•ার)", + "fr_ML": "ফরাসি (মালি)", + "fr_MQ": "ফরাসি (মারà§à¦Ÿà¦¿à¦¨à¦¿à¦•)", + "fr_MR": "ফরাসি (মরিতানিয়া)", + "fr_MU": "ফরাসি (মরিশাস)", + "fr_NC": "ফরাসি (নিউ কà§à¦¯à¦¾à¦²à§‡à¦¡à§‹à¦¨à¦¿à¦¯à¦¼à¦¾)", + "fr_NE": "ফরাসি (নাইজার)", + "fr_PF": "ফরাসি (ফরাসী পলিনেশিয়া)", + "fr_PM": "ফরাসি (সেনà§à¦Ÿ পিয়ের ও মিকà§à¦¯à¦¼à§‡à¦²à¦¨)", + "fr_RE": "ফরাসি (রিইউনিয়ন)", + "fr_RW": "ফরাসি (রà§à¦¯à¦¼à¦¾à¦¨à§à¦¡à¦¾)", + "fr_SC": "ফরাসি (সিসিলি)", + "fr_SN": "ফরাসি (সেনেগাল)", + "fr_SY": "ফরাসি (সিরিয়া)", + "fr_TD": "ফরাসি (চাদ)", + "fr_TG": "ফরাসি (টোগো)", + "fr_TN": "ফরাসি (তিউনিসিয়া)", + "fr_VU": "ফরাসি (ভানà§à¦¯à¦¼à¦¾à¦Ÿà§)", + "fr_WF": "ফরাসি (ওয়ালিস ও ফà§à¦Ÿà§à¦¨à¦¾)", + "fr_YT": "ফরাসি (মায়োতà§à¦¤à§‡)", + "fy": "পশà§à¦šà¦¿à¦® ফà§à¦°à¦¿à¦¸à¦¿à¦¯à¦¼à¦¾à¦¨", + "fy_NL": "পশà§à¦šà¦¿à¦® ফà§à¦°à¦¿à¦¸à¦¿à¦¯à¦¼à¦¾à¦¨ (নেদারলà§à¦¯à¦¾à¦¨à§à¦¡à¦¸)", + "ga": "আইরিশ", + "ga_IE": "আইরিশ (আয়ারলà§à¦¯à¦¾à¦¨à§à¦¡)", + "gd": "সà§à¦•টস-গà§à¦¯à§‡à¦²à¦¿à¦•", + "gd_GB": "সà§à¦•টস-গà§à¦¯à§‡à¦²à¦¿à¦• (যà§à¦•à§à¦¤à¦°à¦¾à¦œà§à¦¯)", + "gl": "গà§à¦¯à¦¾à¦²à¦¿à¦¶à¦¿à¦¯à¦¼", + "gl_ES": "গà§à¦¯à¦¾à¦²à¦¿à¦¶à¦¿à¦¯à¦¼ (সà§à¦ªà§‡à¦¨)", + "gu": "গà§à¦œà¦°à¦¾à¦Ÿà¦¿", + "gu_IN": "গà§à¦œà¦°à¦¾à¦Ÿà¦¿ (ভারত)", + "gv": "মà§à¦¯à¦¾à¦™à§à¦•স", + "gv_IM": "মà§à¦¯à¦¾à¦™à§à¦•স (আইল অফ মà§à¦¯à¦¾à¦¨)", + "ha": "হাউসা", + "ha_GH": "হাউসা (ঘানা)", + "ha_NE": "হাউসা (নাইজার)", + "ha_NG": "হাউসা (নাইজেরিয়া)", + "he": "হিবà§à¦°à§", + "he_IL": "হিবà§à¦°à§ (ইজরায়েল)", + "hi": "হিনà§à¦¦à¦¿", + "hi_IN": "হিনà§à¦¦à¦¿ (ভারত)", + "hr": "কà§à¦°à§‹à¦¯à¦¼à§‡à¦¶à§€à¦¯à¦¼", + "hr_BA": "কà§à¦°à§‹à¦¯à¦¼à§‡à¦¶à§€à¦¯à¦¼ (বসনিয়া ও হারà§à¦œà§‡à¦—োভিনা)", + "hr_HR": "কà§à¦°à§‹à¦¯à¦¼à§‡à¦¶à§€à¦¯à¦¼ (কà§à¦°à§‹à¦¯à¦¼à§‡à¦¶à¦¿à¦¯à¦¼à¦¾)", + "hu": "হাঙà§à¦—েরীয়", + "hu_HU": "হাঙà§à¦—েরীয় (হাঙà§à¦—েরি)", + "hy": "আরà§à¦®à§‡à¦¨à¦¿à¦¯à¦¼", + "hy_AM": "আরà§à¦®à§‡à¦¨à¦¿à¦¯à¦¼ (আরà§à¦®à§‡à¦¨à¦¿à¦¯à¦¼à¦¾)", + "id": "ইনà§à¦¦à§‹à¦¨à§‡à¦¶à§€à¦¯à¦¼", + "id_ID": "ইনà§à¦¦à§‹à¦¨à§‡à¦¶à§€à¦¯à¦¼ (ইনà§à¦¦à§‹à¦¨à§‡à¦¶à¦¿à¦¯à¦¼à¦¾)", + "ig": "ইগà§â€Œà¦¬à§‹", + "ig_NG": "ইগà§â€Œà¦¬à§‹ (নাইজেরিয়া)", + "ii": "সিচà§à¦¯à¦¼à¦¾à¦¨ য়ি", + "ii_CN": "সিচà§à¦¯à¦¼à¦¾à¦¨ য়ি (চীন)", + "is": "আইসলà§à¦¯à¦¾à¦¨à§à¦¡à§€à¦¯à¦¼", + "is_IS": "আইসলà§à¦¯à¦¾à¦¨à§à¦¡à§€à¦¯à¦¼ (আইসলà§à¦¯à¦¾à¦¨à§à¦¡)", + "it": "ইতালিয়", + "it_CH": "ইতালিয় (সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦¨à§à¦¡)", + "it_IT": "ইতালিয় (ইতালি)", + "it_SM": "ইতালিয় (সান মারিনো)", + "ja": "জাপানি", + "ja_JP": "জাপানি (জাপান)", + "ka": "জরà§à¦œà¦¿à¦¯à¦¼à¦¾à¦¨", + "ka_GE": "জরà§à¦œà¦¿à¦¯à¦¼à¦¾à¦¨ (জরà§à¦œà¦¿à¦¯à¦¼à¦¾)", + "ki": "কিকà§à¦¯à¦¼à§", + "ki_KE": "কিকà§à¦¯à¦¼à§ (কেনিয়া)", + "kk": "কাজাখ", + "kk_KZ": "কাজাখ (কাজাখসà§à¦¤à¦¾à¦¨)", + "kl": "কà§à¦¯à¦¾à¦²à¦¾à¦²à§à¦²à¦¿à¦¸à§à¦Ÿ", + "kl_GL": "কà§à¦¯à¦¾à¦²à¦¾à¦²à§à¦²à¦¿à¦¸à§à¦Ÿ (গà§à¦°à§€à¦¨à¦²à§à¦¯à¦¾à¦¨à§à¦¡)", + "km": "খমের", + "km_KH": "খমের (কমà§à¦¬à§‹à¦¡à¦¿à¦¯à¦¼à¦¾)", + "kn": "কনà§à¦¨à¦¡à¦¼", + "kn_IN": "কনà§à¦¨à¦¡à¦¼ (ভারত)", + "ko": "কোরিয়ান", + "ko_KP": "কোরিয়ান (উতà§à¦¤à¦° কোরিয়া)", + "ko_KR": "কোরিয়ান (দকà§à¦·à¦¿à¦£ কোরিয়া)", + "ks": "কাশà§à¦®à§€à¦°à¦¿", + "ks_IN": "কাশà§à¦®à§€à¦°à¦¿ (ভারত)", + "kw": "করà§à¦£à¦¿à¦¶", + "kw_GB": "করà§à¦£à¦¿à¦¶ (যà§à¦•à§à¦¤à¦°à¦¾à¦œà§à¦¯)", + "ky": "কিরà§à¦—িজ", + "ky_KG": "কিরà§à¦—িজ (কিরগিজিসà§à¦¤à¦¾à¦¨)", + "lb": "লà§à¦•à§à¦¸à§‡à¦®à¦¬à¦¾à¦°à§à¦—ীয়", + "lb_LU": "লà§à¦•à§à¦¸à§‡à¦®à¦¬à¦¾à¦°à§à¦—ীয় (লাকà§à¦¸à§‡à¦®à¦¬à¦¾à¦°à§à¦—)", + "lg": "গানà§à¦¡à¦¾", + "lg_UG": "গানà§à¦¡à¦¾ (উগানà§à¦¡à¦¾)", + "ln": "লিঙà§à¦—ালা", + "ln_AO": "লিঙà§à¦—ালা (অà§à¦¯à¦¾à¦™à§à¦—োলা)", + "ln_CD": "লিঙà§à¦—ালা (কঙà§à¦—à§‹-কিনশাসা)", + "ln_CF": "লিঙà§à¦—ালা (মধà§à¦¯ আফà§à¦°à¦¿à¦•ার পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦°)", + "ln_CG": "লিঙà§à¦—ালা (কঙà§à¦—à§‹ - বà§à¦°à¦¾à¦œà¦¾à¦­à¦¿à¦²)", + "lo": "লাও", + "lo_LA": "লাও (লাওস)", + "lt": "লিথà§à¦¯à¦¼à§‡à¦¨à§€à¦¯à¦¼", + "lt_LT": "লিথà§à¦¯à¦¼à§‡à¦¨à§€à¦¯à¦¼ (লিথà§à¦¯à¦¼à¦¾à¦¨à¦¿à¦¯à¦¼à¦¾)", + "lu": "লà§à¦¬à¦¾-কাটাঙà§à¦—া", + "lu_CD": "লà§à¦¬à¦¾-কাটাঙà§à¦—া (কঙà§à¦—à§‹-কিনশাসা)", + "lv": "লাতà§â€Œà¦­à§€à¦¯à¦¼", + "lv_LV": "লাতà§â€Œà¦­à§€à¦¯à¦¼ (লাতà§à¦­à¦¿à¦¯à¦¼à¦¾)", + "mg": "মালাগাসি", + "mg_MG": "মালাগাসি (মাদাগাসà§à¦•ার)", + "mk": "মà§à¦¯à¦¾à¦¸à¦¿à¦¡à§‹à¦¨à§€à¦¯à¦¼", + "mk_MK": "মà§à¦¯à¦¾à¦¸à¦¿à¦¡à§‹à¦¨à§€à¦¯à¦¼ (মà§à¦¯à¦¾à¦¸à¦¾à¦¡à§‹à¦¨à¦¿à¦¯à¦¼à¦¾)", + "ml": "মালায়ালাম", + "ml_IN": "মালায়ালাম (ভারত)", + "mn": "মঙà§à¦—োলিয়", + "mn_MN": "মঙà§à¦—োলিয় (মঙà§à¦—োলিয়া)", + "mr": "মারাঠি", + "mr_IN": "মারাঠি (ভারত)", + "ms": "মালয়", + "ms_BN": "মালয় (বà§à¦°à§à¦¨à§‡à¦‡)", + "ms_MY": "মালয় (মালয়েশিয়া)", + "ms_SG": "মালয় (সিঙà§à¦—াপà§à¦°)", + "mt": "মলà§à¦Ÿà¦¿à¦¯à¦¼", + "mt_MT": "মলà§à¦Ÿà¦¿à¦¯à¦¼ (মালà§à¦Ÿà¦¾)", + "my": "বরà§à¦®à¦¿", + "my_MM": "বরà§à¦®à¦¿ (মায়ানমার (বারà§à¦®à¦¾))", + "nb": "নরওয়েজিয়ান বোকমাল", + "nb_NO": "নরওয়েজিয়ান বোকমাল (নরওয়ে)", + "nb_SJ": "নরওয়েজিয়ান বোকমাল (সà§à¦¬à¦¾à¦²à¦¬à¦¾à¦°à§à¦¡ ও জান মেয়েন)", + "nd": "উতà§à¦¤à¦° à¦à¦¨à§à¦¦à§‡à¦¬à¦¿à¦²à¦¿", + "nd_ZW": "উতà§à¦¤à¦° à¦à¦¨à§à¦¦à§‡à¦¬à¦¿à¦²à¦¿ (জিমà§à¦¬à¦¾à¦¬à§‹à¦¯à¦¼à§‡)", + "ne": "নেপালী", + "ne_IN": "নেপালী (ভারত)", + "ne_NP": "নেপালী (নেপাল)", + "nl": "ডাচ", + "nl_AW": "ডাচ (আরà§à¦¬à¦¾)", + "nl_BE": "ডাচ (বেলজিয়াম)", + "nl_BQ": "ডাচ (কà§à¦¯à¦¾à¦°à¦¿à¦¬à¦¿à¦¯à¦¼à¦¾à¦¨ নেদারলà§à¦¯à¦¾à¦¨à§à¦¡à¦¸)", + "nl_CW": "ডাচ (কিউরাসাও)", + "nl_NL": "ডাচ (নেদারলà§à¦¯à¦¾à¦¨à§à¦¡à¦¸)", + "nl_SR": "ডাচ (সà§à¦°à¦¿à¦¨à¦¾à¦®)", + "nl_SX": "ডাচ (সিনà§à¦Ÿ মারà§à¦Ÿà§‡à¦¨)", + "nn": "নরওয়েজীয়ান নিনরà§à¦¸à§à¦•", + "nn_NO": "নরওয়েজীয়ান নিনরà§à¦¸à§à¦• (নরওয়ে)", + "no": "নরওয়েজীয়", + "no_NO": "নরওয়েজীয় (নরওয়ে)", + "om": "অরোমো", + "om_ET": "অরোমো (ইফিওপিয়া)", + "om_KE": "অরোমো (কেনিয়া)", + "or": "ওড়িয়া", + "or_IN": "ওড়িয়া (ভারত)", + "os": "ওসেটিক", + "os_GE": "ওসেটিক (জরà§à¦œà¦¿à¦¯à¦¼à¦¾)", + "os_RU": "ওসেটিক (রাশিয়া)", + "pa": "পাঞà§à¦œà¦¾à¦¬à§€", + "pa_Arab": "পাঞà§à¦œà¦¾à¦¬à§€ (আরবি)", + "pa_Arab_PK": "পাঞà§à¦œà¦¾à¦¬à§€ (আরবি, পাকিসà§à¦¤à¦¾à¦¨)", + "pa_Guru": "পাঞà§à¦œà¦¾à¦¬à§€ (গà§à¦°à§à¦®à§à¦–ি)", + "pa_Guru_IN": "পাঞà§à¦œà¦¾à¦¬à§€ (গà§à¦°à§à¦®à§à¦–ি, ভারত)", + "pa_IN": "পাঞà§à¦œà¦¾à¦¬à§€ (ভারত)", + "pa_PK": "পাঞà§à¦œà¦¾à¦¬à§€ (পাকিসà§à¦¤à¦¾à¦¨)", + "pl": "পোলিশ", + "pl_PL": "পোলিশ (পোলà§à¦¯à¦¾à¦¨à§à¦¡)", + "ps": "পাশà§à¦¤à§", + "ps_AF": "পাশà§à¦¤à§ (আফগানিসà§à¦¤à¦¾à¦¨)", + "pt": "পরà§à¦¤à§à¦—ীজ", + "pt_AO": "পরà§à¦¤à§à¦—ীজ (অà§à¦¯à¦¾à¦™à§à¦—োলা)", + "pt_BR": "পরà§à¦¤à§à¦—ীজ (বà§à¦°à¦¾à¦œà¦¿à¦²)", + "pt_CH": "পরà§à¦¤à§à¦—ীজ (সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦¨à§à¦¡)", + "pt_CV": "পরà§à¦¤à§à¦—ীজ (কেপভারà§à¦¦à§‡)", + "pt_GQ": "পরà§à¦¤à§à¦—ীজ (নিরকà§à¦·à§€à¦¯à¦¼ গিনি)", + "pt_GW": "পরà§à¦¤à§à¦—ীজ (গিনি-বিসাউ)", + "pt_LU": "পরà§à¦¤à§à¦—ীজ (লাকà§à¦¸à§‡à¦®à¦¬à¦¾à¦°à§à¦—)", + "pt_MO": "পরà§à¦¤à§à¦—ীজ (মà§à¦¯à¦¾à¦•াও à¦à¦¸à¦à¦†à¦° চীনা)", + "pt_MZ": "পরà§à¦¤à§à¦—ীজ (মোজামà§à¦¬à¦¿à¦•)", + "pt_PT": "পরà§à¦¤à§à¦—ীজ (পরà§à¦¤à§à¦—াল)", + "pt_ST": "পরà§à¦¤à§à¦—ীজ (সাওটোমা ও পà§à¦°à¦¿à¦¨à§à¦¸à¦¿à¦ªà¦¿)", + "pt_TL": "পরà§à¦¤à§à¦—ীজ (তিমà§à¦°-লেসà§à¦¤à§‡)", + "qu": "কেচà§à¦¯à¦¼à¦¾", + "qu_BO": "কেচà§à¦¯à¦¼à¦¾ (বলিভিয়া)", + "qu_EC": "কেচà§à¦¯à¦¼à¦¾ (ইকà§à¦¯à¦¼à§‡à¦¡à¦°)", + "qu_PE": "কেচà§à¦¯à¦¼à¦¾ (পেরà§)", + "rm": "রোমানà§à¦¸", + "rm_CH": "রোমানà§à¦¸ (সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦¨à§à¦¡)", + "rn": "রà§à¦¨à§à¦¦à¦¿", + "rn_BI": "রà§à¦¨à§à¦¦à¦¿ (বà§à¦°à§à¦¨à§à¦¡à¦¿)", + "ro": "রোমানীয়", + "ro_MD": "রোমানীয় (মোলà§à¦¦à¦¾à¦­à¦¿à¦¯à¦¼à¦¾)", + "ro_RO": "রোমানীয় (রোমানিয়া)", + "ru": "রà§à¦¶", + "ru_BY": "রà§à¦¶ (বেলারà§à¦¶)", + "ru_KG": "রà§à¦¶ (কিরগিজিসà§à¦¤à¦¾à¦¨)", + "ru_KZ": "রà§à¦¶ (কাজাখসà§à¦¤à¦¾à¦¨)", + "ru_MD": "রà§à¦¶ (মোলà§à¦¦à¦¾à¦­à¦¿à¦¯à¦¼à¦¾)", + "ru_RU": "রà§à¦¶ (রাশিয়া)", + "ru_UA": "রà§à¦¶ (ইউকà§à¦°à§‡à¦¨)", + "rw": "কিনয়ারোয়ানà§à¦¡à¦¾", + "rw_RW": "কিনয়ারোয়ানà§à¦¡à¦¾ (রà§à¦¯à¦¼à¦¾à¦¨à§à¦¡à¦¾)", + "se": "উতà§à¦¤à¦°à¦¾à¦žà§à¦šà¦²à§€à¦¯à¦¼ সামি", + "se_FI": "উতà§à¦¤à¦°à¦¾à¦žà§à¦šà¦²à§€à¦¯à¦¼ সামি (ফিনলà§à¦¯à¦¾à¦¨à§à¦¡)", + "se_NO": "উতà§à¦¤à¦°à¦¾à¦žà§à¦šà¦²à§€à¦¯à¦¼ সামি (নরওয়ে)", + "se_SE": "উতà§à¦¤à¦°à¦¾à¦žà§à¦šà¦²à§€à¦¯à¦¼ সামি (সà§à¦‡à¦¡à§‡à¦¨)", + "sg": "সাঙà§à¦—à§‹", + "sg_CF": "সাঙà§à¦—à§‹ (মধà§à¦¯ আফà§à¦°à¦¿à¦•ার পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦°)", + "sh": "সারà§à¦¬à§‹-কà§à¦°à§‹à¦¯à¦¼à§‡à¦¶à¦¿à¦¯à¦¼", + "sh_BA": "সারà§à¦¬à§‹-কà§à¦°à§‹à¦¯à¦¼à§‡à¦¶à¦¿à¦¯à¦¼ (বসনিয়া ও হারà§à¦œà§‡à¦—োভিনা)", + "si": "সিংহলী", + "si_LK": "সিংহলী (শà§à¦°à§€à¦²à¦™à§à¦•া)", + "sk": "সà§à¦²à§‹à¦­à¦¾à¦•", + "sk_SK": "সà§à¦²à§‹à¦­à¦¾à¦• (সà§à¦²à§‹à¦­à¦¾à¦•িয়া)", + "sl": "সà§à¦²à§‹à¦­à§‡à¦¨à§€à¦¯à¦¼", + "sl_SI": "সà§à¦²à§‹à¦­à§‡à¦¨à§€à¦¯à¦¼ (সà§à¦²à§‹à¦­à¦¾à¦¨à¦¿à¦¯à¦¼à¦¾)", + "sn": "শোনা", + "sn_ZW": "শোনা (জিমà§à¦¬à¦¾à¦¬à§‹à¦¯à¦¼à§‡)", + "so": "সোমালি", + "so_DJ": "সোমালি (জিবà§à¦¤à¦¿)", + "so_ET": "সোমালি (ইফিওপিয়া)", + "so_KE": "সোমালি (কেনিয়া)", + "so_SO": "সোমালি (সোমালিয়া)", + "sq": "আলবেনীয়", + "sq_AL": "আলবেনীয় (আলবেনিয়া)", + "sq_MK": "আলবেনীয় (মà§à¦¯à¦¾à¦¸à¦¾à¦¡à§‹à¦¨à¦¿à¦¯à¦¼à¦¾)", + "sq_XK": "আলবেনীয় (কসোভো)", + "sr": "সারà§à¦¬à§€à¦¯à¦¼", + "sr_BA": "সারà§à¦¬à§€à¦¯à¦¼ (বসনিয়া ও হারà§à¦œà§‡à¦—োভিনা)", + "sr_Cyrl": "সারà§à¦¬à§€à¦¯à¦¼ (সিরিলিক)", + "sr_Cyrl_BA": "সারà§à¦¬à§€à¦¯à¦¼ (সিরিলিক, বসনিয়া ও হারà§à¦œà§‡à¦—োভিনা)", + "sr_Cyrl_ME": "সারà§à¦¬à§€à¦¯à¦¼ (সিরিলিক, মনà§à¦Ÿà¦¿à¦¨à¦¿à¦—à§à¦°à§‹)", + "sr_Cyrl_RS": "সারà§à¦¬à§€à¦¯à¦¼ (সিরিলিক, সারà§à¦¬à¦¿à¦¯à¦¼à¦¾)", + "sr_Cyrl_XK": "সারà§à¦¬à§€à¦¯à¦¼ (সিরিলিক, কসোভো)", + "sr_Latn": "সারà§à¦¬à§€à¦¯à¦¼ (লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨)", + "sr_Latn_BA": "সারà§à¦¬à§€à¦¯à¦¼ (লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨, বসনিয়া ও হারà§à¦œà§‡à¦—োভিনা)", + "sr_Latn_ME": "সারà§à¦¬à§€à¦¯à¦¼ (লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨, মনà§à¦Ÿà¦¿à¦¨à¦¿à¦—à§à¦°à§‹)", + "sr_Latn_RS": "সারà§à¦¬à§€à¦¯à¦¼ (লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨, সারà§à¦¬à¦¿à¦¯à¦¼à¦¾)", + "sr_Latn_XK": "সারà§à¦¬à§€à¦¯à¦¼ (লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨, কসোভো)", + "sr_ME": "সারà§à¦¬à§€à¦¯à¦¼ (মনà§à¦Ÿà¦¿à¦¨à¦¿à¦—à§à¦°à§‹)", + "sr_RS": "সারà§à¦¬à§€à¦¯à¦¼ (সারà§à¦¬à¦¿à¦¯à¦¼à¦¾)", + "sr_XK": "সারà§à¦¬à§€à¦¯à¦¼ (কসোভো)", + "sv": "সà§à¦‡à¦¡à¦¿à¦¶", + "sv_AX": "সà§à¦‡à¦¡à¦¿à¦¶ (আলানà§à¦¡ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "sv_FI": "সà§à¦‡à¦¡à¦¿à¦¶ (ফিনলà§à¦¯à¦¾à¦¨à§à¦¡)", + "sv_SE": "সà§à¦‡à¦¡à¦¿à¦¶ (সà§à¦‡à¦¡à§‡à¦¨)", + "sw": "সোয়াহিলি", + "sw_CD": "সোয়াহিলি (কঙà§à¦—à§‹-কিনশাসা)", + "sw_KE": "সোয়াহিলি (কেনিয়া)", + "sw_TZ": "সোয়াহিলি (তাঞà§à¦œà¦¾à¦¨à¦¿à¦¯à¦¼à¦¾)", + "sw_UG": "সোয়াহিলি (উগানà§à¦¡à¦¾)", + "ta": "তামিল", + "ta_IN": "তামিল (ভারত)", + "ta_LK": "তামিল (শà§à¦°à§€à¦²à¦™à§à¦•া)", + "ta_MY": "তামিল (মালয়েশিয়া)", + "ta_SG": "তামিল (সিঙà§à¦—াপà§à¦°)", + "te": "তেলেগà§", + "te_IN": "তেলেগৠ(ভারত)", + "th": "থাই", + "th_TH": "থাই (থাইলà§à¦¯à¦¾à¦¨à§à¦¡)", + "ti": "তিগরিনিয়া", + "ti_ER": "তিগরিনিয়া (ইরিতà§à¦°à¦¿à¦¯à¦¼à¦¾)", + "ti_ET": "তিগরিনিয়া (ইফিওপিয়া)", + "tl": "তাগালগ", + "tl_PH": "তাগালগ (ফিলিপাইন)", + "to": "টোঙà§à¦—ান", + "to_TO": "টোঙà§à¦—ান (টোঙà§à¦—া)", + "tr": "তà§à¦°à§à¦•à§€", + "tr_CY": "তà§à¦°à§à¦•à§€ (সাইপà§à¦°à¦¾à¦¸)", + "tr_TR": "তà§à¦°à§à¦•à§€ (তà§à¦°à¦¸à§à¦•)", + "ug": "উইঘà§à¦°", + "ug_CN": "উইঘà§à¦° (চীন)", + "uk": "ইউকà§à¦°à§‡à¦¨à§€à¦¯à¦¼", + "uk_UA": "ইউকà§à¦°à§‡à¦¨à§€à¦¯à¦¼ (ইউকà§à¦°à§‡à¦¨)", + "ur": "উরà§à¦¦à§", + "ur_IN": "উরà§à¦¦à§ (ভারত)", + "ur_PK": "উরà§à¦¦à§ (পাকিসà§à¦¤à¦¾à¦¨)", + "uz": "উজবেকীয়", + "uz_AF": "উজবেকীয় (আফগানিসà§à¦¤à¦¾à¦¨)", + "uz_Arab": "উজবেকীয় (আরবি)", + "uz_Arab_AF": "উজবেকীয় (আরবি, আফগানিসà§à¦¤à¦¾à¦¨)", + "uz_Cyrl": "উজবেকীয় (সিরিলিক)", + "uz_Cyrl_UZ": "উজবেকীয় (সিরিলিক, উজবেকিসà§à¦¤à¦¾à¦¨)", + "uz_Latn": "উজবেকীয় (লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨)", + "uz_Latn_UZ": "উজবেকীয় (লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨, উজবেকিসà§à¦¤à¦¾à¦¨)", + "uz_UZ": "উজবেকীয় (উজবেকিসà§à¦¤à¦¾à¦¨)", + "vi": "ভিয়েতনামী", + "vi_VN": "ভিয়েতনামী (ভিয়েতনাম)", + "yi": "য়িদà§à¦¦à¦¿à¦¶", + "yo": "ইওরà§à¦¬à¦¾", + "yo_BJ": "ইওরà§à¦¬à¦¾ (বেনিন)", + "yo_NG": "ইওরà§à¦¬à¦¾ (নাইজেরিয়া)", + "zh": "চীনা", + "zh_CN": "চীনা (চীন)", + "zh_HK": "চীনা (হংকং à¦à¦¸à¦à¦†à¦° চীনা)", + "zh_Hans": "চীনা (সরলীকৃত)", + "zh_Hans_CN": "চীনা (সরলীকৃত, চীন)", + "zh_Hans_HK": "চীনা (সরলীকৃত, হংকং à¦à¦¸à¦à¦†à¦° চীনা)", + "zh_Hans_MO": "চীনা (সরলীকৃত, মà§à¦¯à¦¾à¦•াও à¦à¦¸à¦à¦†à¦° চীনা)", + "zh_Hans_SG": "চীনা (সরলীকৃত, সিঙà§à¦—াপà§à¦°)", + "zh_Hant": "চীনা (à¦à¦¤à¦¿à¦¹à§à¦¯à¦¬à¦¾à¦¹à§€)", + "zh_Hant_HK": "চীনা (à¦à¦¤à¦¿à¦¹à§à¦¯à¦¬à¦¾à¦¹à§€, হংকং à¦à¦¸à¦à¦†à¦° চীনা)", + "zh_Hant_MO": "চীনা (à¦à¦¤à¦¿à¦¹à§à¦¯à¦¬à¦¾à¦¹à§€, মà§à¦¯à¦¾à¦•াও à¦à¦¸à¦à¦†à¦° চীনা)", + "zh_Hant_TW": "চীনা (à¦à¦¤à¦¿à¦¹à§à¦¯à¦¬à¦¾à¦¹à§€, তাইওয়ান)", + "zh_MO": "চীনা (মà§à¦¯à¦¾à¦•াও à¦à¦¸à¦à¦†à¦° চীনা)", + "zh_SG": "চীনা (সিঙà§à¦—াপà§à¦°)", + "zh_TW": "চীনা (তাইওয়ান)", + "zu": "জà§à¦²à§", + "zu_ZA": "জà§à¦²à§ (দকà§à¦·à¦¿à¦£ আফà§à¦°à¦¿à¦•া)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bn_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bn_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..e13aaec7d0141da75bdec965de1de1c64ce63f59 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bn_IN.json @@ -0,0 +1,8 @@ +{ + "Names": { + "en_UM": "ইংরেজি (মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦°à§‡à¦° পারà§à¦¶à§à¦¬à¦¬à¦°à§à¦¤à§€ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ)", + "es_HN": "সà§à¦ªà§à¦¯à¦¾à¦¨à¦¿à¦¶ (হনà§à¦¡à§à¦°à¦¾à¦¸)", + "ro_MD": "রোমানীয় (মলডোভা)", + "ru_MD": "রà§à¦¶ (মলডোভা)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bo.json new file mode 100644 index 0000000000000000000000000000000000000000..34dd3d08832d8c1dbc84262954d5c53d54699f60 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bo.json @@ -0,0 +1,27 @@ +{ + "Names": { + "bo": "བོད་སà¾à½‘་", + "bo_CN": "བོད་སà¾à½‘་ (རྒྱ་ནག)", + "bo_IN": "བོད་སà¾à½‘་ (རྒྱ་གར་)", + "dz": "རྫོང་à½", + "en": "དབྱིན་ཇིའི་སà¾à½‘à¼", + "en_DE": "དབྱིན་ཇིའི་སà¾à½‘༠(འཇར་མན་)", + "en_GB": "དབྱིན་ཇིའི་སà¾à½‘༠(དབྱིན་ཇི་)", + "en_IN": "དབྱིན་ཇིའི་སà¾à½‘༠(རྒྱ་གར་)", + "en_US": "དབྱིན་ཇིའི་སà¾à½‘༠(ཨ་མེ་རི་ཀà¼)", + "hi": "ཧིན་དི", + "hi_IN": "ཧིན་དི (རྒྱ་གར་)", + "ja": "ཉི་ཧོང་སà¾à½‘་", + "ja_JP": "ཉི་ཧོང་སà¾à½‘་ (ཉི་ཧོང་)", + "ne": "ནེ་པ་ལི", + "ne_IN": "ནེ་པ་ལི (རྒྱ་གར་)", + "ne_NP": "ནེ་པ་ལི (བལ་ཡུལ་)", + "ru": "ཨུ་རུ་སུ་སà¾à½‘་", + "ru_RU": "ཨུ་རུ་སུ་སà¾à½‘་ (ཨུ་རུ་སུ་)", + "zh": "རྒྱ་སà¾à½‘་", + "zh_CN": "རྒྱ་སà¾à½‘་ (རྒྱ་ནག)", + "zh_Hans": "རྒྱ་སà¾à½‘་ (རྒྱ་ཡིག་གསར་པà¼)", + "zh_Hans_CN": "རྒྱ་སà¾à½‘་ (རྒྱ་ཡིག་གསར་པà¼, རྒྱ་ནག)", + "zh_Hant": "རྒྱ་སà¾à½‘་ (རྒྱ་ཡིག་རྙིང་པà¼)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/br.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/br.json new file mode 100644 index 0000000000000000000000000000000000000000..a6acea20c266dafaa93fcd4fe49adde33c991e97 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/br.json @@ -0,0 +1,558 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibia)", + "af_ZA": "afrikaans (Suafrika)", + "ak": "akan", + "ak_GH": "akan (Ghana)", + "am": "amhareg", + "am_ET": "amhareg (Etiopia)", + "ar": "arabeg", + "ar_AE": "arabeg (Emirelezhioù Arab Unanet)", + "ar_BH": "arabeg (Bahrein)", + "ar_DJ": "arabeg (Djibouti)", + "ar_DZ": "arabeg (Aljeria)", + "ar_EG": "arabeg (Egipt)", + "ar_EH": "arabeg (Sahara ar Cʼhornôg)", + "ar_ER": "arabeg (Eritrea)", + "ar_IL": "arabeg (Israel)", + "ar_IQ": "arabeg (Iraq)", + "ar_JO": "arabeg (Jordania)", + "ar_KM": "arabeg (Komorez)", + "ar_KW": "arabeg (Koweit)", + "ar_LB": "arabeg (Liban)", + "ar_LY": "arabeg (Libia)", + "ar_MA": "arabeg (Maroko)", + "ar_MR": "arabeg (Maouritania)", + "ar_OM": "arabeg (Oman)", + "ar_PS": "arabeg (Tiriadoù Palestina)", + "ar_QA": "arabeg (Qatar)", + "ar_SA": "arabeg (Arabia Saoudat)", + "ar_SD": "arabeg (Soudan)", + "ar_SO": "arabeg (Somalia)", + "ar_SS": "arabeg (Susoudan)", + "ar_SY": "arabeg (Siria)", + "ar_TD": "arabeg (Tchad)", + "ar_TN": "arabeg (Tunizia)", + "ar_YE": "arabeg (Yemen)", + "as": "asameg", + "as_IN": "asameg (India)", + "az": "azerbaidjaneg", + "az_AZ": "azerbaidjaneg (Azerbaidjan)", + "az_Cyrl": "azerbaidjaneg (kirillek)", + "az_Cyrl_AZ": "azerbaidjaneg (kirillek, Azerbaidjan)", + "az_Latn": "azerbaidjaneg (latin)", + "az_Latn_AZ": "azerbaidjaneg (latin, Azerbaidjan)", + "be": "belaruseg", + "be_BY": "belaruseg (Belarus)", + "bg": "bulgareg", + "bg_BG": "bulgareg (Bulgaria)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengali", + "bn_BD": "bengali (Bangladesh)", + "bn_IN": "bengali (India)", + "bo": "tibetaneg", + "bo_CN": "tibetaneg (Sina)", + "bo_IN": "tibetaneg (India)", + "br": "brezhoneg", + "br_FR": "brezhoneg (Frañs)", + "bs": "bosneg", + "bs_BA": "bosneg (Bosnia ha Herzegovina)", + "bs_Cyrl": "bosneg (kirillek)", + "bs_Cyrl_BA": "bosneg (kirillek, Bosnia ha Herzegovina)", + "bs_Latn": "bosneg (latin)", + "bs_Latn_BA": "bosneg (latin, Bosnia ha Herzegovina)", + "ca": "katalaneg", + "ca_AD": "katalaneg (Andorra)", + "ca_ES": "katalaneg (Spagn)", + "ca_FR": "katalaneg (Frañs)", + "ca_IT": "katalaneg (Italia)", + "ce": "tchetcheneg", + "ce_RU": "tchetcheneg (Rusia)", + "cs": "tchekeg", + "cs_CZ": "tchekeg (Republik Tchek)", + "cy": "kembraeg", + "cy_GB": "kembraeg (Rouantelezh-Unanet)", + "da": "daneg", + "da_DK": "daneg (Danmark)", + "da_GL": "daneg (Greunland)", + "de": "alamaneg", + "de_AT": "alamaneg (Aostria)", + "de_BE": "alamaneg (Belgia)", + "de_CH": "alamaneg (Suis)", + "de_DE": "alamaneg (Alamagn)", + "de_IT": "alamaneg (Italia)", + "de_LI": "alamaneg (Liechtenstein)", + "de_LU": "alamaneg (Luksembourg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhoutan)", + "ee": "ewe", + "ee_GH": "ewe (Ghana)", + "ee_TG": "ewe (Togo)", + "el": "gresianeg", + "el_CY": "gresianeg (Kiprenez)", + "el_GR": "gresianeg (Gres)", + "en": "saozneg", + "en_AG": "saozneg (Antigua ha Barbuda)", + "en_AI": "saozneg (Anguilla)", + "en_AS": "saozneg (Samoa Amerikan)", + "en_AT": "saozneg (Aostria)", + "en_AU": "saozneg (Aostralia)", + "en_BB": "saozneg (Barbados)", + "en_BE": "saozneg (Belgia)", + "en_BI": "saozneg (Burundi)", + "en_BM": "saozneg (Bermuda)", + "en_BS": "saozneg (Bahamas)", + "en_BW": "saozneg (Botswana)", + "en_BZ": "saozneg (Belize)", + "en_CA": "saozneg (Kanada)", + "en_CC": "saozneg (Inizi Kokoz)", + "en_CH": "saozneg (Suis)", + "en_CK": "saozneg (Inizi Cook)", + "en_CM": "saozneg (Kameroun)", + "en_CX": "saozneg (Enez Christmas)", + "en_CY": "saozneg (Kiprenez)", + "en_DE": "saozneg (Alamagn)", + "en_DG": "saozneg (Diego Garcia)", + "en_DK": "saozneg (Danmark)", + "en_DM": "saozneg (Dominica)", + "en_ER": "saozneg (Eritrea)", + "en_FI": "saozneg (Finland)", + "en_FJ": "saozneg (Fidji)", + "en_FK": "saozneg (Inizi Falkland)", + "en_FM": "saozneg (Mikronezia)", + "en_GB": "saozneg (Rouantelezh-Unanet)", + "en_GD": "saozneg (Grenada)", + "en_GG": "saozneg (Gwernenez)", + "en_GH": "saozneg (Ghana)", + "en_GI": "saozneg (Jibraltar)", + "en_GM": "saozneg (Gambia)", + "en_GU": "saozneg (Guam)", + "en_GY": "saozneg (Guyana)", + "en_HK": "saozneg (Hong Kong RMD Sina)", + "en_IE": "saozneg (Iwerzhon)", + "en_IL": "saozneg (Israel)", + "en_IM": "saozneg (Enez Vanav)", + "en_IN": "saozneg (India)", + "en_IO": "saozneg (Tiriad breizhveurat Meurvor Indez)", + "en_JE": "saozneg (Jerzenez)", + "en_JM": "saozneg (Jamaika)", + "en_KE": "saozneg (Kenya)", + "en_KI": "saozneg (Kiribati)", + "en_KN": "saozneg (Saint Kitts ha Nevis)", + "en_KY": "saozneg (Inizi Cayman)", + "en_LC": "saozneg (Saint Lucia)", + "en_LR": "saozneg (Liberia)", + "en_LS": "saozneg (Lesotho)", + "en_MG": "saozneg (Madagaskar)", + "en_MH": "saozneg (Inizi Marshall)", + "en_MO": "saozneg (Macau RMD Sina)", + "en_MP": "saozneg (Inizi Mariana an Norzh)", + "en_MS": "saozneg (Montserrat)", + "en_MT": "saozneg (Malta)", + "en_MU": "saozneg (Moris)", + "en_MW": "saozneg (Malawi)", + "en_MY": "saozneg (Malaysia)", + "en_NA": "saozneg (Namibia)", + "en_NF": "saozneg (Enez Norfolk)", + "en_NG": "saozneg (Nigeria)", + "en_NL": "saozneg (Izelvroioù)", + "en_NR": "saozneg (Nauru)", + "en_NU": "saozneg (Niue)", + "en_NZ": "saozneg (Zeland-Nevez)", + "en_PG": "saozneg (Papoua Ginea-Nevez)", + "en_PH": "saozneg (Filipinez)", + "en_PK": "saozneg (Pakistan)", + "en_PN": "saozneg (Enez Pitcairn)", + "en_PR": "saozneg (Puerto Rico)", + "en_PW": "saozneg (Palau)", + "en_RW": "saozneg (Rwanda)", + "en_SB": "saozneg (Inizi Salomon)", + "en_SC": "saozneg (Sechelez)", + "en_SD": "saozneg (Soudan)", + "en_SE": "saozneg (Sveden)", + "en_SG": "saozneg (Singapour)", + "en_SH": "saozneg (Saint-Helena)", + "en_SI": "saozneg (Slovenia)", + "en_SL": "saozneg (Sierra Leone)", + "en_SS": "saozneg (Susoudan)", + "en_SX": "saozneg (Sint Maarten)", + "en_SZ": "saozneg (Swaziland)", + "en_TC": "saozneg (Inizi Turks ha Caicos)", + "en_TK": "saozneg (Tokelau)", + "en_TO": "saozneg (Tonga)", + "en_TT": "saozneg (Trinidad ha Tobago)", + "en_TV": "saozneg (Tuvalu)", + "en_TZ": "saozneg (Tanzania)", + "en_UG": "saozneg (Ouganda)", + "en_UM": "saozneg (Inizi diabell ar Stadoù-Unanet)", + "en_US": "saozneg (Stadoù-Unanet)", + "en_VC": "saozneg (Sant Visant hag ar Grenadinez)", + "en_VG": "saozneg (Inizi Gwercʼh Breizh-Veur)", + "en_VI": "saozneg (Inizi Gwercʼh ar Stadoù-Unanet)", + "en_VU": "saozneg (Vanuatu)", + "en_WS": "saozneg (Samoa)", + "en_ZA": "saozneg (Suafrika)", + "en_ZM": "saozneg (Zambia)", + "en_ZW": "saozneg (Zimbabwe)", + "eo": "esperanteg", + "es": "spagnoleg", + "es_AR": "spagnoleg (Arcʼhantina)", + "es_BO": "spagnoleg (Bolivia)", + "es_BR": "spagnoleg (Brazil)", + "es_CL": "spagnoleg (Chile)", + "es_CO": "spagnoleg (Kolombia)", + "es_CR": "spagnoleg (Costa Rica)", + "es_CU": "spagnoleg (Kuba)", + "es_DO": "spagnoleg (Republik Dominikan)", + "es_EA": "spagnoleg (Ceuta ha Melilla)", + "es_EC": "spagnoleg (Ecuador)", + "es_ES": "spagnoleg (Spagn)", + "es_GQ": "spagnoleg (Ginea ar Cʼheheder)", + "es_GT": "spagnoleg (Guatemala)", + "es_HN": "spagnoleg (Honduras)", + "es_IC": "spagnoleg (Inizi Kanariez)", + "es_MX": "spagnoleg (Mecʼhiko)", + "es_NI": "spagnoleg (Nicaragua)", + "es_PA": "spagnoleg (Panamá)", + "es_PE": "spagnoleg (Perou)", + "es_PH": "spagnoleg (Filipinez)", + "es_PR": "spagnoleg (Puerto Rico)", + "es_PY": "spagnoleg (Paraguay)", + "es_SV": "spagnoleg (Salvador)", + "es_US": "spagnoleg (Stadoù-Unanet)", + "es_UY": "spagnoleg (Uruguay)", + "es_VE": "spagnoleg (Venezuela)", + "et": "estoneg", + "et_EE": "estoneg (Estonia)", + "eu": "euskareg", + "eu_ES": "euskareg (Spagn)", + "fa": "perseg", + "fa_AF": "perseg (Afghanistan)", + "fa_IR": "perseg (Iran)", + "fi": "finneg", + "fi_FI": "finneg (Finland)", + "fo": "faeroeg", + "fo_DK": "faeroeg (Danmark)", + "fo_FO": "faeroeg (Inizi Faero)", + "fr": "galleg", + "fr_BE": "galleg (Belgia)", + "fr_BF": "galleg (Burkina Faso)", + "fr_BI": "galleg (Burundi)", + "fr_BJ": "galleg (Benin)", + "fr_BL": "galleg (Saint Barthélemy)", + "fr_CA": "galleg (Kanada)", + "fr_CD": "galleg (Kongo - Kinshasa)", + "fr_CF": "galleg (Republik Kreizafrikan)", + "fr_CG": "galleg (Kongo - Brazzaville)", + "fr_CH": "galleg (Suis)", + "fr_CI": "galleg (Aod an Olifant)", + "fr_CM": "galleg (Kameroun)", + "fr_DJ": "galleg (Djibouti)", + "fr_DZ": "galleg (Aljeria)", + "fr_FR": "galleg (Frañs)", + "fr_GA": "galleg (Gabon)", + "fr_GF": "galleg (Gwiana cʼhall)", + "fr_GN": "galleg (Ginea)", + "fr_GP": "galleg (Gwadeloup)", + "fr_GQ": "galleg (Ginea ar Cʼheheder)", + "fr_HT": "galleg (Haiti)", + "fr_KM": "galleg (Komorez)", + "fr_LU": "galleg (Luksembourg)", + "fr_MA": "galleg (Maroko)", + "fr_MC": "galleg (Monaco)", + "fr_MF": "galleg (Saint Martin)", + "fr_MG": "galleg (Madagaskar)", + "fr_ML": "galleg (Mali)", + "fr_MQ": "galleg (Martinik)", + "fr_MR": "galleg (Maouritania)", + "fr_MU": "galleg (Moris)", + "fr_NC": "galleg (Kaledonia Nevez)", + "fr_NE": "galleg (Niger)", + "fr_PF": "galleg (Polinezia Cʼhall)", + "fr_PM": "galleg (Sant-Pêr-ha-Mikelon)", + "fr_RE": "galleg (Ar Reünion)", + "fr_RW": "galleg (Rwanda)", + "fr_SC": "galleg (Sechelez)", + "fr_SN": "galleg (Senegal)", + "fr_SY": "galleg (Siria)", + "fr_TD": "galleg (Tchad)", + "fr_TG": "galleg (Togo)", + "fr_TN": "galleg (Tunizia)", + "fr_VU": "galleg (Vanuatu)", + "fr_WF": "galleg (Wallis ha Futuna)", + "fr_YT": "galleg (Mayotte)", + "fy": "frizeg ar Cʼhornôg", + "fy_NL": "frizeg ar Cʼhornôg (Izelvroioù)", + "ga": "iwerzhoneg", + "ga_IE": "iwerzhoneg (Iwerzhon)", + "gd": "skoseg", + "gd_GB": "skoseg (Rouantelezh-Unanet)", + "gl": "galizeg", + "gl_ES": "galizeg (Spagn)", + "gu": "gujarati", + "gu_IN": "gujarati (India)", + "gv": "manaveg", + "gv_IM": "manaveg (Enez Vanav)", + "ha": "haousa", + "ha_GH": "haousa (Ghana)", + "ha_NE": "haousa (Niger)", + "ha_NG": "haousa (Nigeria)", + "he": "hebraeg", + "he_IL": "hebraeg (Israel)", + "hi": "hindi", + "hi_IN": "hindi (India)", + "hr": "kroateg", + "hr_BA": "kroateg (Bosnia ha Herzegovina)", + "hr_HR": "kroateg (Kroatia)", + "hu": "hungareg", + "hu_HU": "hungareg (Hungaria)", + "hy": "armenianeg", + "hy_AM": "armenianeg (Armenia)", + "id": "indonezeg", + "id_ID": "indonezeg (Indonezia)", + "ig": "igbo", + "ig_NG": "igbo (Nigeria)", + "ii": "yieg Sichuan", + "ii_CN": "yieg Sichuan (Sina)", + "is": "islandeg", + "is_IS": "islandeg (Island)", + "it": "italianeg", + "it_CH": "italianeg (Suis)", + "it_IT": "italianeg (Italia)", + "it_SM": "italianeg (San Marino)", + "ja": "japaneg", + "ja_JP": "japaneg (Japan)", + "ka": "jorjianeg", + "ka_GE": "jorjianeg (Jorjia)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenya)", + "kk": "kazak", + "kk_KZ": "kazak (Kazakstan)", + "km": "khmer", + "km_KH": "khmer (Kambodja)", + "kn": "kanareg", + "kn_IN": "kanareg (India)", + "ko": "koreaneg", + "ko_KP": "koreaneg (Korea an Norzh)", + "ko_KR": "koreaneg (Korea ar Su)", + "ks": "kashmiri", + "ks_IN": "kashmiri (India)", + "kw": "kerneveureg", + "kw_GB": "kerneveureg (Rouantelezh-Unanet)", + "ky": "kirgiz", + "ky_KG": "kirgiz (Kyrgyzstan)", + "lb": "luksembourgeg", + "lb_LU": "luksembourgeg (Luksembourg)", + "lg": "ganda", + "lg_UG": "ganda (Ouganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongo - Kinshasa)", + "ln_CF": "lingala (Republik Kreizafrikan)", + "ln_CG": "lingala (Kongo - Brazzaville)", + "lo": "laoseg", + "lo_LA": "laoseg (Laos)", + "lt": "lituaneg", + "lt_LT": "lituaneg (Lituania)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Kongo - Kinshasa)", + "lv": "latvieg", + "lv_LV": "latvieg (Latvia)", + "mg": "malgacheg", + "mg_MG": "malgacheg (Madagaskar)", + "mk": "makedoneg", + "mk_MK": "makedoneg (Makedonia)", + "ml": "malayalam", + "ml_IN": "malayalam (India)", + "mn": "mongoleg", + "mn_MN": "mongoleg (Mongolia)", + "mr": "marathi", + "mr_IN": "marathi (India)", + "ms": "malayseg", + "ms_BN": "malayseg (Brunei)", + "ms_MY": "malayseg (Malaysia)", + "ms_SG": "malayseg (Singapour)", + "mt": "malteg", + "mt_MT": "malteg (Malta)", + "my": "birmaneg", + "my_MM": "birmaneg (Myanmar (Birmania))", + "nb": "norvegeg bokmÃ¥l", + "nb_NO": "norvegeg bokmÃ¥l (Norvegia)", + "nb_SJ": "norvegeg bokmÃ¥l (Svalbard)", + "nd": "ndebele an Norzh", + "nd_ZW": "ndebele an Norzh (Zimbabwe)", + "ne": "nepaleg", + "ne_IN": "nepaleg (India)", + "ne_NP": "nepaleg (Nepal)", + "nl": "nederlandeg", + "nl_AW": "nederlandeg (Aruba)", + "nl_BE": "nederlandeg (Belgia)", + "nl_BQ": "nederlandeg (Karib Nederlandat)", + "nl_CW": "nederlandeg (Curaçao)", + "nl_NL": "nederlandeg (Izelvroioù)", + "nl_SR": "nederlandeg (Surinam)", + "nl_SX": "nederlandeg (Sint Maarten)", + "nn": "norvegeg nynorsk", + "nn_NO": "norvegeg nynorsk (Norvegia)", + "no": "norvegeg", + "no_NO": "norvegeg (Norvegia)", + "or": "oriya", + "or_IN": "oriya (India)", + "os": "oseteg", + "os_GE": "oseteg (Jorjia)", + "os_RU": "oseteg (Rusia)", + "pa": "punjabi", + "pa_Arab": "punjabi (arabek)", + "pa_Arab_PK": "punjabi (arabek, Pakistan)", + "pa_Guru": "punjabi (gurmukhi)", + "pa_Guru_IN": "punjabi (gurmukhi, India)", + "pa_IN": "punjabi (India)", + "pa_PK": "punjabi (Pakistan)", + "pl": "poloneg", + "pl_PL": "poloneg (Polonia)", + "ps": "pachto", + "ps_AF": "pachto (Afghanistan)", + "pt": "portugaleg", + "pt_AO": "portugaleg (Angola)", + "pt_BR": "portugaleg (Brazil)", + "pt_CH": "portugaleg (Suis)", + "pt_CV": "portugaleg (Kab-Glas)", + "pt_GQ": "portugaleg (Ginea ar Cʼheheder)", + "pt_GW": "portugaleg (Ginea-Bissau)", + "pt_LU": "portugaleg (Luksembourg)", + "pt_MO": "portugaleg (Macau RMD Sina)", + "pt_MZ": "portugaleg (Mozambik)", + "pt_PT": "portugaleg (Portugal)", + "pt_ST": "portugaleg (São Tomé ha Príncipe)", + "pt_TL": "portugaleg (Timor-Leste)", + "qu": "kechuaeg", + "qu_BO": "kechuaeg (Bolivia)", + "qu_EC": "kechuaeg (Ecuador)", + "qu_PE": "kechuaeg (Perou)", + "rm": "romañcheg", + "rm_CH": "romañcheg (Suis)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "roumaneg", + "ro_MD": "roumaneg (Moldova)", + "ro_RO": "roumaneg (Roumania)", + "ru": "rusianeg", + "ru_BY": "rusianeg (Belarus)", + "ru_KG": "rusianeg (Kyrgyzstan)", + "ru_KZ": "rusianeg (Kazakstan)", + "ru_MD": "rusianeg (Moldova)", + "ru_RU": "rusianeg (Rusia)", + "ru_UA": "rusianeg (Ukraina)", + "rw": "kinyarwanda", + "rw_RW": "kinyarwanda (Rwanda)", + "se": "sámi an Norzh", + "se_FI": "sámi an Norzh (Finland)", + "se_NO": "sámi an Norzh (Norvegia)", + "se_SE": "sámi an Norzh (Sveden)", + "sg": "sango", + "sg_CF": "sango (Republik Kreizafrikan)", + "sh": "serb-kroateg", + "sh_BA": "serb-kroateg (Bosnia ha Herzegovina)", + "si": "singhaleg", + "si_LK": "singhaleg (Sri Lanka)", + "sk": "slovakeg", + "sk_SK": "slovakeg (Slovakia)", + "sl": "sloveneg", + "sl_SI": "sloveneg (Slovenia)", + "sn": "shona", + "sn_ZW": "shona (Zimbabwe)", + "so": "somali", + "so_DJ": "somali (Djibouti)", + "so_ET": "somali (Etiopia)", + "so_KE": "somali (Kenya)", + "so_SO": "somali (Somalia)", + "sq": "albaneg", + "sq_AL": "albaneg (Albania)", + "sq_MK": "albaneg (Makedonia)", + "sq_XK": "albaneg (Kosovo)", + "sr": "serbeg", + "sr_BA": "serbeg (Bosnia ha Herzegovina)", + "sr_Cyrl": "serbeg (kirillek)", + "sr_Cyrl_BA": "serbeg (kirillek, Bosnia ha Herzegovina)", + "sr_Cyrl_ME": "serbeg (kirillek, Montenegro)", + "sr_Cyrl_RS": "serbeg (kirillek, Serbia)", + "sr_Cyrl_XK": "serbeg (kirillek, Kosovo)", + "sr_Latn": "serbeg (latin)", + "sr_Latn_BA": "serbeg (latin, Bosnia ha Herzegovina)", + "sr_Latn_ME": "serbeg (latin, Montenegro)", + "sr_Latn_RS": "serbeg (latin, Serbia)", + "sr_Latn_XK": "serbeg (latin, Kosovo)", + "sr_ME": "serbeg (Montenegro)", + "sr_RS": "serbeg (Serbia)", + "sr_XK": "serbeg (Kosovo)", + "sv": "svedeg", + "sv_AX": "svedeg (Inizi Ã…land)", + "sv_FI": "svedeg (Finland)", + "sv_SE": "svedeg (Sveden)", + "sw": "swahili", + "sw_CD": "swahili (Kongo - Kinshasa)", + "sw_KE": "swahili (Kenya)", + "sw_TZ": "swahili (Tanzania)", + "sw_UG": "swahili (Ouganda)", + "ta": "tamileg", + "ta_IN": "tamileg (India)", + "ta_LK": "tamileg (Sri Lanka)", + "ta_MY": "tamileg (Malaysia)", + "ta_SG": "tamileg (Singapour)", + "te": "telougou", + "te_IN": "telougou (India)", + "th": "thai", + "th_TH": "thai (Thailand)", + "ti": "tigrigna", + "ti_ER": "tigrigna (Eritrea)", + "ti_ET": "tigrigna (Etiopia)", + "tl": "tagalog", + "tl_PH": "tagalog (Filipinez)", + "to": "tonga", + "to_TO": "tonga (Tonga)", + "tr": "turkeg", + "tr_CY": "turkeg (Kiprenez)", + "tr_TR": "turkeg (Turkia)", + "ug": "ouigoureg", + "ug_CN": "ouigoureg (Sina)", + "uk": "ukraineg", + "uk_UA": "ukraineg (Ukraina)", + "ur": "ourdou", + "ur_IN": "ourdou (India)", + "ur_PK": "ourdou (Pakistan)", + "uz": "ouzbekeg", + "uz_AF": "ouzbekeg (Afghanistan)", + "uz_Arab": "ouzbekeg (arabek)", + "uz_Arab_AF": "ouzbekeg (arabek, Afghanistan)", + "uz_Cyrl": "ouzbekeg (kirillek)", + "uz_Cyrl_UZ": "ouzbekeg (kirillek, Ouzbekistan)", + "uz_Latn": "ouzbekeg (latin)", + "uz_Latn_UZ": "ouzbekeg (latin, Ouzbekistan)", + "uz_UZ": "ouzbekeg (Ouzbekistan)", + "vi": "vietnameg", + "vi_VN": "vietnameg (Viêt Nam)", + "yi": "yiddish", + "yo": "yorouba", + "yo_BJ": "yorouba (Benin)", + "yo_NG": "yorouba (Nigeria)", + "zh": "sinaeg", + "zh_CN": "sinaeg (Sina)", + "zh_HK": "sinaeg (Hong Kong RMD Sina)", + "zh_Hans": "sinaeg (eeunaet)", + "zh_Hans_CN": "sinaeg (eeunaet, Sina)", + "zh_Hans_HK": "sinaeg (eeunaet, Hong Kong RMD Sina)", + "zh_Hans_MO": "sinaeg (eeunaet, Macau RMD Sina)", + "zh_Hans_SG": "sinaeg (eeunaet, Singapour)", + "zh_Hant": "sinaeg (hengounel)", + "zh_Hant_HK": "sinaeg (hengounel, Hong Kong RMD Sina)", + "zh_Hant_MO": "sinaeg (hengounel, Macau RMD Sina)", + "zh_Hant_TW": "sinaeg (hengounel, Taiwan)", + "zh_MO": "sinaeg (Macau RMD Sina)", + "zh_SG": "sinaeg (Singapour)", + "zh_TW": "sinaeg (Taiwan)", + "zu": "zouloueg", + "zu_ZA": "zouloueg (Suafrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bs.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bs.json new file mode 100644 index 0000000000000000000000000000000000000000..e51d94b7a608648138fa5e5aaf8fc5552c06f119 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bs.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikans", + "af_NA": "afrikans (Namibija)", + "af_ZA": "afrikans (JužnoafriÄka Republika)", + "ak": "akan", + "ak_GH": "akan (Gana)", + "am": "amharski", + "am_ET": "amharski (Etiopija)", + "ar": "arapski", + "ar_AE": "arapski (Ujedinjeni Arapski Emirati)", + "ar_BH": "arapski (Bahrein)", + "ar_DJ": "arapski (Džibuti)", + "ar_DZ": "arapski (Alžir)", + "ar_EG": "arapski (Egipat)", + "ar_EH": "arapski (Zapadna Sahara)", + "ar_ER": "arapski (Eritreja)", + "ar_IL": "arapski (Izrael)", + "ar_IQ": "arapski (Irak)", + "ar_JO": "arapski (Jordan)", + "ar_KM": "arapski (Komorska Ostrva)", + "ar_KW": "arapski (Kuvajt)", + "ar_LB": "arapski (Liban)", + "ar_LY": "arapski (Libija)", + "ar_MA": "arapski (Maroko)", + "ar_MR": "arapski (Mauritanija)", + "ar_OM": "arapski (Oman)", + "ar_PS": "arapski (Palestinska Teritorija)", + "ar_QA": "arapski (Katar)", + "ar_SA": "arapski (Saudijska Arabija)", + "ar_SD": "arapski (Sudan)", + "ar_SO": "arapski (Somalija)", + "ar_SS": "arapski (Južni Sudan)", + "ar_SY": "arapski (Sirija)", + "ar_TD": "arapski (ÄŒad)", + "ar_TN": "arapski (Tunis)", + "ar_YE": "arapski (Jemen)", + "as": "asamski", + "as_IN": "asamski (Indija)", + "az": "azerbejdžanski", + "az_AZ": "azerbejdžanski (Azerbejdžan)", + "az_Cyrl": "azerbejdžanski (ćirilica)", + "az_Cyrl_AZ": "azerbejdžanski (ćirilica, Azerbejdžan)", + "az_Latn": "azerbejdžanski (latinica)", + "az_Latn_AZ": "azerbejdžanski (latinica, Azerbejdžan)", + "be": "bjeloruski", + "be_BY": "bjeloruski (Bjelorusija)", + "bg": "bugarski", + "bg_BG": "bugarski (Bugarska)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengalski", + "bn_BD": "bengalski (BangladeÅ¡)", + "bn_IN": "bengalski (Indija)", + "bo": "tibetanski", + "bo_CN": "tibetanski (Kina)", + "bo_IN": "tibetanski (Indija)", + "br": "bretonski", + "br_FR": "bretonski (Francuska)", + "bs": "bosanski", + "bs_BA": "bosanski (Bosna i Hercegovina)", + "bs_Cyrl": "bosanski (ćirilica)", + "bs_Cyrl_BA": "bosanski (ćirilica, Bosna i Hercegovina)", + "bs_Latn": "bosanski (latinica)", + "bs_Latn_BA": "bosanski (latinica, Bosna i Hercegovina)", + "ca": "katalonski", + "ca_AD": "katalonski (Andora)", + "ca_ES": "katalonski (Å panija)", + "ca_FR": "katalonski (Francuska)", + "ca_IT": "katalonski (Italija)", + "ce": "ÄeÄenski", + "ce_RU": "ÄeÄenski (Rusija)", + "cs": "ÄeÅ¡ki", + "cs_CZ": "ÄeÅ¡ki (ÄŒeÅ¡ka Republika)", + "cy": "velÅ¡ki", + "cy_GB": "velÅ¡ki (Velika Britanija)", + "da": "danski", + "da_DK": "danski (Danska)", + "da_GL": "danski (Grenland)", + "de": "njemaÄki", + "de_AT": "njemaÄki (Austrija)", + "de_BE": "njemaÄki (Belgija)", + "de_CH": "njemaÄki (Å vicarska)", + "de_DE": "njemaÄki (NjemaÄka)", + "de_IT": "njemaÄki (Italija)", + "de_LI": "njemaÄki (LihtenÅ¡tajn)", + "de_LU": "njemaÄki (Luksemburg)", + "dz": "džonga", + "dz_BT": "džonga (Butan)", + "ee": "eve", + "ee_GH": "eve (Gana)", + "ee_TG": "eve (Togo)", + "el": "grÄki", + "el_CY": "grÄki (Kipar)", + "el_GR": "grÄki (GrÄka)", + "en": "engleski", + "en_AG": "engleski (Antigva i Barbuda)", + "en_AI": "engleski (Angvila)", + "en_AS": "engleski (AmeriÄka Samoa)", + "en_AT": "engleski (Austrija)", + "en_AU": "engleski (Australija)", + "en_BB": "engleski (Barbados)", + "en_BE": "engleski (Belgija)", + "en_BI": "engleski (Burundi)", + "en_BM": "engleski (Bermuda)", + "en_BS": "engleski (Bahami)", + "en_BW": "engleski (Bocvana)", + "en_BZ": "engleski (Belize)", + "en_CA": "engleski (Kanada)", + "en_CC": "engleski (Kokosova (Kilingova) Ostrva)", + "en_CH": "engleski (Å vicarska)", + "en_CK": "engleski (Kukova Ostrva)", + "en_CM": "engleski (Kamerun)", + "en_CX": "engleski (Božićna Ostrva)", + "en_CY": "engleski (Kipar)", + "en_DE": "engleski (NjemaÄka)", + "en_DG": "engleski (Dijego Garsija)", + "en_DK": "engleski (Danska)", + "en_DM": "engleski (Dominika)", + "en_ER": "engleski (Eritreja)", + "en_FI": "engleski (Finska)", + "en_FJ": "engleski (Fidži)", + "en_FK": "engleski (Folklandska Ostrva)", + "en_FM": "engleski (Mikronezija)", + "en_GB": "engleski (Velika Britanija)", + "en_GD": "engleski (Grenada)", + "en_GG": "engleski (Gernzi)", + "en_GH": "engleski (Gana)", + "en_GI": "engleski (Gibraltar)", + "en_GM": "engleski (Gambija)", + "en_GU": "engleski (Guam)", + "en_GY": "engleski (Gvajana)", + "en_HK": "engleski (Hong Kong (SAR Kina))", + "en_IE": "engleski (Irska)", + "en_IL": "engleski (Izrael)", + "en_IM": "engleski (Ostrvo Man)", + "en_IN": "engleski (Indija)", + "en_IO": "engleski (Britanska Teritorija u Indijskom Okeanu)", + "en_JE": "engleski (Džerzi)", + "en_JM": "engleski (Jamajka)", + "en_KE": "engleski (Kenija)", + "en_KI": "engleski (Kiribati)", + "en_KN": "engleski (Sveti Kits i Nevis)", + "en_KY": "engleski (Kajmanska Ostrva)", + "en_LC": "engleski (Sveta Lucija)", + "en_LR": "engleski (Liberija)", + "en_LS": "engleski (Lesoto)", + "en_MG": "engleski (Madagaskar)", + "en_MH": "engleski (MarÅ¡alova Ostrva)", + "en_MO": "engleski (Makao (SAR Kina))", + "en_MP": "engleski (Sjeverna Marijanska Ostrva)", + "en_MS": "engleski (Monserat)", + "en_MT": "engleski (Malta)", + "en_MU": "engleski (Mauricijus)", + "en_MW": "engleski (Malavi)", + "en_MY": "engleski (Malezija)", + "en_NA": "engleski (Namibija)", + "en_NF": "engleski (Ostrvo Norfolk)", + "en_NG": "engleski (Nigerija)", + "en_NL": "engleski (Holandija)", + "en_NR": "engleski (Nauru)", + "en_NU": "engleski (Niue)", + "en_NZ": "engleski (Novi Zeland)", + "en_PG": "engleski (Papua Nova Gvineja)", + "en_PH": "engleski (Filipini)", + "en_PK": "engleski (Pakistan)", + "en_PN": "engleski (Pitkernska Ostrva)", + "en_PR": "engleski (Porto Riko)", + "en_PW": "engleski (Palau)", + "en_RW": "engleski (Ruanda)", + "en_SB": "engleski (Solomonska Ostrva)", + "en_SC": "engleski (SejÅ¡eli)", + "en_SD": "engleski (Sudan)", + "en_SE": "engleski (Å vedska)", + "en_SG": "engleski (Singapur)", + "en_SH": "engleski (Sveta Helena)", + "en_SI": "engleski (Slovenija)", + "en_SL": "engleski (Sijera Leone)", + "en_SS": "engleski (Južni Sudan)", + "en_SX": "engleski (Sint Marten)", + "en_SZ": "engleski (Svazilend)", + "en_TC": "engleski (Ostrva Turks i Kaikos)", + "en_TK": "engleski (Tokelau)", + "en_TO": "engleski (Tonga)", + "en_TT": "engleski (Trinidad i Tobago)", + "en_TV": "engleski (Tuvalu)", + "en_TZ": "engleski (Tanzanija)", + "en_UG": "engleski (Uganda)", + "en_UM": "engleski (AmeriÄka Vanjska Ostrva)", + "en_US": "engleski (Sjedinjene AmeriÄke Države)", + "en_VC": "engleski (Sveti Vinsent i Grenadin)", + "en_VG": "engleski (Britanska DjeviÄanska Ostrva)", + "en_VI": "engleski (AmeriÄka DjeviÄanska Ostrva)", + "en_VU": "engleski (Vanuatu)", + "en_WS": "engleski (Samoa)", + "en_ZA": "engleski (JužnoafriÄka Republika)", + "en_ZM": "engleski (Zambija)", + "en_ZW": "engleski (Zimbabve)", + "eo": "esperanto", + "es": "Å¡panski", + "es_AR": "Å¡panski (Argentina)", + "es_BO": "Å¡panski (Bolivija)", + "es_BR": "Å¡panski (Brazil)", + "es_CL": "Å¡panski (ÄŒile)", + "es_CO": "Å¡panski (Kolumbija)", + "es_CR": "Å¡panski (Kostarika)", + "es_CU": "Å¡panski (Kuba)", + "es_DO": "Å¡panski (Dominikanska Republika)", + "es_EA": "Å¡panski (Seuta i Melilja)", + "es_EC": "Å¡panski (Ekvador)", + "es_ES": "Å¡panski (Å panija)", + "es_GQ": "Å¡panski (Ekvatorijalna Gvineja)", + "es_GT": "Å¡panski (Gvatemala)", + "es_HN": "Å¡panski (Honduras)", + "es_IC": "Å¡panski (Kanarska Ostrva)", + "es_MX": "Å¡panski (Meksiko)", + "es_NI": "Å¡panski (Nikaragva)", + "es_PA": "Å¡panski (Panama)", + "es_PE": "Å¡panski (Peru)", + "es_PH": "Å¡panski (Filipini)", + "es_PR": "Å¡panski (Porto Riko)", + "es_PY": "Å¡panski (Paragvaj)", + "es_SV": "Å¡panski (Salvador)", + "es_US": "Å¡panski (Sjedinjene AmeriÄke Države)", + "es_UY": "Å¡panski (Urugvaj)", + "es_VE": "Å¡panski (Venecuela)", + "et": "estonski", + "et_EE": "estonski (Estonija)", + "eu": "baskijski", + "eu_ES": "baskijski (Å panija)", + "fa": "perzijski", + "fa_AF": "perzijski (Afganistan)", + "fa_IR": "perzijski (Iran)", + "ff": "fulah", + "ff_CM": "fulah (Kamerun)", + "ff_GN": "fulah (Gvineja)", + "ff_MR": "fulah (Mauritanija)", + "ff_SN": "fulah (Senegal)", + "fi": "finski", + "fi_FI": "finski (Finska)", + "fo": "farski", + "fo_DK": "farski (Danska)", + "fo_FO": "farski (Farska Ostrva)", + "fr": "francuski", + "fr_BE": "francuski (Belgija)", + "fr_BF": "francuski (Burkina Faso)", + "fr_BI": "francuski (Burundi)", + "fr_BJ": "francuski (Benin)", + "fr_BL": "francuski (Sveti Bartolomej)", + "fr_CA": "francuski (Kanada)", + "fr_CD": "francuski (Demokratska Republika Kongo)", + "fr_CF": "francuski (CentralnoafriÄka Republika)", + "fr_CG": "francuski (Kongo)", + "fr_CH": "francuski (Å vicarska)", + "fr_CI": "francuski (Obala SlonovaÄe)", + "fr_CM": "francuski (Kamerun)", + "fr_DJ": "francuski (Džibuti)", + "fr_DZ": "francuski (Alžir)", + "fr_FR": "francuski (Francuska)", + "fr_GA": "francuski (Gabon)", + "fr_GF": "francuski (Francuska Gvajana)", + "fr_GN": "francuski (Gvineja)", + "fr_GP": "francuski (Gvadalupe)", + "fr_GQ": "francuski (Ekvatorijalna Gvineja)", + "fr_HT": "francuski (Haiti)", + "fr_KM": "francuski (Komorska Ostrva)", + "fr_LU": "francuski (Luksemburg)", + "fr_MA": "francuski (Maroko)", + "fr_MC": "francuski (Monako)", + "fr_MF": "francuski (Sv. Martin)", + "fr_MG": "francuski (Madagaskar)", + "fr_ML": "francuski (Mali)", + "fr_MQ": "francuski (Martinik)", + "fr_MR": "francuski (Mauritanija)", + "fr_MU": "francuski (Mauricijus)", + "fr_NC": "francuski (Nova Kaledonija)", + "fr_NE": "francuski (Niger)", + "fr_PF": "francuski (Francuska Polinezija)", + "fr_PM": "francuski (Sveti Petar i Mikelon)", + "fr_RE": "francuski (Reunion)", + "fr_RW": "francuski (Ruanda)", + "fr_SC": "francuski (SejÅ¡eli)", + "fr_SN": "francuski (Senegal)", + "fr_SY": "francuski (Sirija)", + "fr_TD": "francuski (ÄŒad)", + "fr_TG": "francuski (Togo)", + "fr_TN": "francuski (Tunis)", + "fr_VU": "francuski (Vanuatu)", + "fr_WF": "francuski (Ostrva Valis i Futuna)", + "fr_YT": "francuski (Majote)", + "fy": "zapadni frizijski", + "fy_NL": "zapadni frizijski (Holandija)", + "ga": "irski", + "ga_IE": "irski (Irska)", + "gd": "Å¡kotski galski", + "gd_GB": "Å¡kotski galski (Velika Britanija)", + "gl": "galicijski", + "gl_ES": "galicijski (Å panija)", + "gu": "gudžarati", + "gu_IN": "gudžarati (Indija)", + "gv": "manks", + "gv_IM": "manks (Ostrvo Man)", + "ha": "hausa", + "ha_GH": "hausa (Gana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigerija)", + "he": "hebrejski", + "he_IL": "hebrejski (Izrael)", + "hi": "hindu", + "hi_IN": "hindu (Indija)", + "hr": "hrvatski", + "hr_BA": "hrvatski (Bosna i Hercegovina)", + "hr_HR": "hrvatski (Hrvatska)", + "hu": "maÄ‘arski", + "hu_HU": "maÄ‘arski (MaÄ‘arska)", + "hy": "armenski", + "hy_AM": "armenski (Armenija)", + "id": "indonezijski", + "id_ID": "indonezijski (Indonezija)", + "ig": "igbo", + "ig_NG": "igbo (Nigerija)", + "ii": "siÄuan ji", + "ii_CN": "siÄuan ji (Kina)", + "is": "islandski", + "is_IS": "islandski (Island)", + "it": "talijanski", + "it_CH": "talijanski (Å vicarska)", + "it_IT": "talijanski (Italija)", + "it_SM": "talijanski (San Marino)", + "ja": "japanski", + "ja_JP": "japanski (Japan)", + "ka": "gruzijski", + "ka_GE": "gruzijski (Gruzija)", + "ki": "kikuju", + "ki_KE": "kikuju (Kenija)", + "kk": "kazaÄki", + "kk_KZ": "kazaÄki (Kazahstan)", + "kl": "kalalisutski", + "kl_GL": "kalalisutski (Grenland)", + "km": "kmerski", + "km_KH": "kmerski (Kambodža)", + "kn": "kanada", + "kn_IN": "kanada (Indija)", + "ko": "korejski", + "ko_KP": "korejski (Sjeverna Koreja)", + "ko_KR": "korejski (Južna Koreja)", + "ks": "kaÅ¡mirski", + "ks_IN": "kaÅ¡mirski (Indija)", + "kw": "kornski", + "kw_GB": "kornski (Velika Britanija)", + "ky": "kirgiÅ¡ki", + "ky_KG": "kirgiÅ¡ki (Kirgistan)", + "lb": "luksemburÅ¡ki", + "lb_LU": "luksemburÅ¡ki (Luksemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Demokratska Republika Kongo)", + "ln_CF": "lingala (CentralnoafriÄka Republika)", + "ln_CG": "lingala (Kongo)", + "lo": "laoÅ¡ki", + "lo_LA": "laoÅ¡ki (Laos)", + "lt": "litvanski", + "lt_LT": "litvanski (Litvanija)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Demokratska Republika Kongo)", + "lv": "latvijski", + "lv_LV": "latvijski (Latvija)", + "mg": "malagaÅ¡ki", + "mg_MG": "malagaÅ¡ki (Madagaskar)", + "mk": "makedonski", + "mk_MK": "makedonski (Makedonija)", + "ml": "malajalam", + "ml_IN": "malajalam (Indija)", + "mn": "mongolski", + "mn_MN": "mongolski (Mongolija)", + "mr": "marati", + "mr_IN": "marati (Indija)", + "ms": "malajski", + "ms_BN": "malajski (Brunej)", + "ms_MY": "malajski (Malezija)", + "ms_SG": "malajski (Singapur)", + "mt": "malteÅ¡ki", + "mt_MT": "malteÅ¡ki (Malta)", + "my": "burmanski", + "my_MM": "burmanski (Mijanmar)", + "nb": "norveÅ¡ki (Bokmal)", + "nb_NO": "norveÅ¡ki (NorveÅ¡ka)", + "nb_SJ": "norveÅ¡ki (Svalbard i Jan Majen)", + "nd": "sjeverni ndebele", + "nd_ZW": "sjeverni ndebele (Zimbabve)", + "ne": "nepalski", + "ne_IN": "nepalski (Indija)", + "ne_NP": "nepalski (Nepal)", + "nl": "holandski", + "nl_AW": "holandski (Aruba)", + "nl_BE": "holandski (Belgija)", + "nl_BQ": "holandski (Karipska Holandija)", + "nl_CW": "holandski (Kurasao)", + "nl_NL": "holandski (Holandija)", + "nl_SR": "holandski (Surinam)", + "nl_SX": "holandski (Sint Marten)", + "nn": "norveÅ¡ki (Nynorsk)", + "nn_NO": "norveÅ¡ki (NorveÅ¡ka)", + "no": "norveÅ¡ki", + "no_NO": "norveÅ¡ki (NorveÅ¡ka)", + "om": "oromo", + "om_ET": "oromo (Etiopija)", + "om_KE": "oromo (Kenija)", + "or": "orijski", + "or_IN": "orijski (Indija)", + "os": "osetski", + "os_GE": "osetski (Gruzija)", + "os_RU": "osetski (Rusija)", + "pa": "pandžapski", + "pa_Arab": "pandžapski (arapsko pismo)", + "pa_Arab_PK": "pandžapski (arapsko pismo, Pakistan)", + "pa_Guru": "pandžapski (gurmuki pismo)", + "pa_Guru_IN": "pandžapski (gurmuki pismo, Indija)", + "pa_IN": "pandžapski (Indija)", + "pa_PK": "pandžapski (Pakistan)", + "pl": "poljski", + "pl_PL": "poljski (Poljska)", + "ps": "paÅ¡tu", + "ps_AF": "paÅ¡tu (Afganistan)", + "pt": "portugalski", + "pt_AO": "portugalski (Angola)", + "pt_BR": "portugalski (Brazil)", + "pt_CH": "portugalski (Å vicarska)", + "pt_CV": "portugalski (Kape Verde)", + "pt_GQ": "portugalski (Ekvatorijalna Gvineja)", + "pt_GW": "portugalski (Gvineja-Bisao)", + "pt_LU": "portugalski (Luksemburg)", + "pt_MO": "portugalski (Makao (SAR Kina))", + "pt_MZ": "portugalski (Mozambik)", + "pt_PT": "portugalski (Portugal)", + "pt_ST": "portugalski (Sao Tome i Principe)", + "pt_TL": "portugalski (IstoÄni Timor)", + "qu": "keÄua", + "qu_BO": "keÄua (Bolivija)", + "qu_EC": "keÄua (Ekvador)", + "qu_PE": "keÄua (Peru)", + "rm": "reto-romanski", + "rm_CH": "reto-romanski (Å vicarska)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumunski", + "ro_MD": "rumunski (Moldavija)", + "ro_RO": "rumunski (Rumunija)", + "ru": "ruski", + "ru_BY": "ruski (Bjelorusija)", + "ru_KG": "ruski (Kirgistan)", + "ru_KZ": "ruski (Kazahstan)", + "ru_MD": "ruski (Moldavija)", + "ru_RU": "ruski (Rusija)", + "ru_UA": "ruski (Ukrajina)", + "rw": "kinjarvanda", + "rw_RW": "kinjarvanda (Ruanda)", + "se": "sjeverni sami", + "se_FI": "sjeverni sami (Finska)", + "se_NO": "sjeverni sami (NorveÅ¡ka)", + "se_SE": "sjeverni sami (Å vedska)", + "sg": "sango", + "sg_CF": "sango (CentralnoafriÄka Republika)", + "sh": "srpskohrvatski", + "sh_BA": "srpskohrvatski (Bosna i Hercegovina)", + "si": "sinhaleÅ¡ki", + "si_LK": "sinhaleÅ¡ki (Å ri Lanka)", + "sk": "slovaÄki", + "sk_SK": "slovaÄki (SlovaÄka)", + "sl": "slovenski", + "sl_SI": "slovenski (Slovenija)", + "sn": "Å¡ona", + "sn_ZW": "Å¡ona (Zimbabve)", + "so": "somalski", + "so_DJ": "somalski (Džibuti)", + "so_ET": "somalski (Etiopija)", + "so_KE": "somalski (Kenija)", + "so_SO": "somalski (Somalija)", + "sq": "albanski", + "sq_AL": "albanski (Albanija)", + "sq_MK": "albanski (Makedonija)", + "sq_XK": "albanski (Kosovo)", + "sr": "srpski", + "sr_BA": "srpski (Bosna i Hercegovina)", + "sr_Cyrl": "srpski (ćirilica)", + "sr_Cyrl_BA": "srpski (ćirilica, Bosna i Hercegovina)", + "sr_Cyrl_ME": "srpski (ćirilica, Crna Gora)", + "sr_Cyrl_RS": "srpski (ćirilica, Srbija)", + "sr_Cyrl_XK": "srpski (ćirilica, Kosovo)", + "sr_Latn": "srpski (latinica)", + "sr_Latn_BA": "srpski (latinica, Bosna i Hercegovina)", + "sr_Latn_ME": "srpski (latinica, Crna Gora)", + "sr_Latn_RS": "srpski (latinica, Srbija)", + "sr_Latn_XK": "srpski (latinica, Kosovo)", + "sr_ME": "srpski (Crna Gora)", + "sr_RS": "srpski (Srbija)", + "sr_XK": "srpski (Kosovo)", + "sv": "Å¡vedski", + "sv_AX": "Å¡vedski (Olandska Ostrva)", + "sv_FI": "Å¡vedski (Finska)", + "sv_SE": "Å¡vedski (Å vedska)", + "sw": "svahili", + "sw_CD": "svahili (Demokratska Republika Kongo)", + "sw_KE": "svahili (Kenija)", + "sw_TZ": "svahili (Tanzanija)", + "sw_UG": "svahili (Uganda)", + "ta": "tamilski", + "ta_IN": "tamilski (Indija)", + "ta_LK": "tamilski (Å ri Lanka)", + "ta_MY": "tamilski (Malezija)", + "ta_SG": "tamilski (Singapur)", + "te": "telugu", + "te_IN": "telugu (Indija)", + "th": "tajlandski", + "th_TH": "tajlandski (Tajland)", + "ti": "tigrinja", + "ti_ER": "tigrinja (Eritreja)", + "ti_ET": "tigrinja (Etiopija)", + "tl": "tagalog", + "tl_PH": "tagalog (Filipini)", + "to": "tonganski", + "to_TO": "tonganski (Tonga)", + "tr": "turski", + "tr_CY": "turski (Kipar)", + "tr_TR": "turski (Turska)", + "ug": "ujgurski", + "ug_CN": "ujgurski (Kina)", + "uk": "ukrajinski", + "uk_UA": "ukrajinski (Ukrajina)", + "ur": "urdu", + "ur_IN": "urdu (Indija)", + "ur_PK": "urdu (Pakistan)", + "uz": "uzbeÄki", + "uz_AF": "uzbeÄki (Afganistan)", + "uz_Arab": "uzbeÄki (arapsko pismo)", + "uz_Arab_AF": "uzbeÄki (arapsko pismo, Afganistan)", + "uz_Cyrl": "uzbeÄki (ćirilica)", + "uz_Cyrl_UZ": "uzbeÄki (ćirilica, Uzbekistan)", + "uz_Latn": "uzbeÄki (latinica)", + "uz_Latn_UZ": "uzbeÄki (latinica, Uzbekistan)", + "uz_UZ": "uzbeÄki (Uzbekistan)", + "vi": "vijetnamski", + "vi_VN": "vijetnamski (Vijetnam)", + "yi": "jidiÅ¡", + "yo": "jorubanski", + "yo_BJ": "jorubanski (Benin)", + "yo_NG": "jorubanski (Nigerija)", + "zh": "kineski", + "zh_CN": "kineski (Kina)", + "zh_HK": "kineski (Hong Kong (SAR Kina))", + "zh_Hans": "kineski (pojednostavljeno)", + "zh_Hans_CN": "kineski (pojednostavljeno, Kina)", + "zh_Hans_HK": "kineski (pojednostavljeno, Hong Kong (SAR Kina))", + "zh_Hans_MO": "kineski (pojednostavljeno, Makao (SAR Kina))", + "zh_Hans_SG": "kineski (pojednostavljeno, Singapur)", + "zh_Hant": "kineski (tradicionalno)", + "zh_Hant_HK": "kineski (tradicionalno, Hong Kong (SAR Kina))", + "zh_Hant_MO": "kineski (tradicionalno, Makao (SAR Kina))", + "zh_Hant_TW": "kineski (tradicionalno, Tajvan)", + "zh_MO": "kineski (Makao (SAR Kina))", + "zh_SG": "kineski (Singapur)", + "zh_TW": "kineski (Tajvan)", + "zu": "zulu", + "zu_ZA": "zulu (JužnoafriÄka Republika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bs_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bs_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..a4ac47a1b0f1083a136293735392a9c2ba4967ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bs_BA.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "bs_Latn_BA" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bs_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bs_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..1f6527bc197ad781a8c234eef7a3bd65c94ee087 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/bs_Cyrl.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "африканерÑки", + "af_NA": "африканерÑки (Ðамибија)", + "af_ZA": "африканерÑки (Јужноафричка Република)", + "ak": "акан", + "ak_GH": "акан (Гана)", + "am": "амхарÑки", + "am_ET": "амхарÑки (Етиопија)", + "ar": "арапÑки", + "ar_AE": "арапÑки (Уједињени ÐрапÑки Емирати)", + "ar_BH": "арапÑки (Бахреин)", + "ar_DJ": "арапÑки (Ðибути)", + "ar_DZ": "арапÑки (Ðлжир)", + "ar_EG": "арапÑки (Египат)", + "ar_EH": "арапÑки (Западна Сахара)", + "ar_ER": "арапÑки (Еритреја)", + "ar_IL": "арапÑки (Израел)", + "ar_IQ": "арапÑки (Ирак)", + "ar_JO": "арапÑки (Јордан)", + "ar_KM": "арапÑки (КоморÑка ОÑтрва)", + "ar_KW": "арапÑки (Кувајт)", + "ar_LB": "арапÑки (Либан)", + "ar_LY": "арапÑки (Либија)", + "ar_MA": "арапÑки (Мароко)", + "ar_MR": "арапÑки (Мауританија)", + "ar_OM": "арапÑки (Оман)", + "ar_PS": "арапÑки (ПалеÑтинÑке територије)", + "ar_QA": "арапÑки (Катар)", + "ar_SA": "арапÑки (СаудијÑка Ðрабија)", + "ar_SD": "арапÑки (Судан)", + "ar_SO": "арапÑки (Сомалија)", + "ar_SS": "арапÑки (Južni Sudan)", + "ar_SY": "арапÑки (Сирија)", + "ar_TD": "арапÑки (Чад)", + "ar_TN": "арапÑки (ТуниÑ)", + "ar_YE": "арапÑки (Јемен)", + "as": "аÑемијÑки", + "as_IN": "аÑемијÑки (Индија)", + "az": "азербејџанÑки", + "az_AZ": "азербејџанÑки (Ðзербејџан)", + "az_Cyrl": "азербејџанÑки (Ћирилица)", + "az_Cyrl_AZ": "азербејџанÑки (Ћирилица, Ðзербејџан)", + "az_Latn": "азербејџанÑки (Латиница)", + "az_Latn_AZ": "азербејџанÑки (Латиница, Ðзербејџан)", + "be": "белоруÑки", + "be_BY": "белоруÑки (БелоруÑија)", + "bg": "бугарÑки", + "bg_BG": "бугарÑки (БугарÑка)", + "bm": "бамбара", + "bm_ML": "бамбара (Мали)", + "bn": "бенглаÑки", + "bn_BD": "бенглаÑки (Бангладеш)", + "bn_IN": "бенглаÑки (Индија)", + "bo": "тибетанÑки", + "bo_CN": "тибетанÑки (Кина)", + "bo_IN": "тибетанÑки (Индија)", + "br": "бретонÑки", + "br_FR": "бретонÑки (ФранцуÑка)", + "bs": "боÑанÑки", + "bs_BA": "боÑанÑки (БоÑна и Херцеговина)", + "bs_Cyrl": "боÑанÑки (Ћирилица)", + "bs_Cyrl_BA": "боÑанÑки (Ћирилица, БоÑна и Херцеговина)", + "bs_Latn": "боÑанÑки (Латиница)", + "bs_Latn_BA": "боÑанÑки (Латиница, БоÑна и Херцеговина)", + "ca": "каталонÑки", + "ca_AD": "каталонÑки (Ðндора)", + "ca_ES": "каталонÑки (Шпанија)", + "ca_FR": "каталонÑки (ФранцуÑка)", + "ca_IT": "каталонÑки (Италија)", + "ce": "чеченÑки", + "ce_RU": "чеченÑки (РуÑија)", + "cs": "чешки", + "cs_CZ": "чешки (Чешка)", + "cy": "велшки", + "cy_GB": "велшки (Велика Британија)", + "da": "данÑки", + "da_DK": "данÑки (ДанÑка)", + "da_GL": "данÑки (Гренланд)", + "de": "немачки", + "de_AT": "немачки (ÐуÑтрија)", + "de_BE": "немачки (Белгија)", + "de_CH": "немачки (ШвајцарÑка)", + "de_DE": "немачки (Ðемачка)", + "de_IT": "немачки (Италија)", + "de_LI": "немачки (Лихтенштајн)", + "de_LU": "немачки (ЛукÑембург)", + "dz": "џонга", + "dz_BT": "џонга (Бутан)", + "ee": "еве", + "ee_GH": "еве (Гана)", + "ee_TG": "еве (Того)", + "el": "грчки", + "el_CY": "грчки (Кипар)", + "el_GR": "грчки (Грчка)", + "en": "енглеÑки", + "en_AG": "енглеÑки (Ðнтигва и Барбуда)", + "en_AI": "енглеÑки (Ðнгвила)", + "en_AS": "енглеÑки (Ðмеричка Самоа)", + "en_AT": "енглеÑки (ÐуÑтрија)", + "en_AU": "енглеÑки (ÐуÑтралија)", + "en_BB": "енглеÑки (БарбадоÑ)", + "en_BE": "енглеÑки (Белгија)", + "en_BI": "енглеÑки (Бурунди)", + "en_BM": "енглеÑки (Бермуда)", + "en_BS": "енглеÑки (Бахами)", + "en_BW": "енглеÑки (Боцвана)", + "en_BZ": "енглеÑки (Белизе)", + "en_CA": "енглеÑки (Канада)", + "en_CC": "енглеÑки (ÐšÐ¾ÐºÐ¾Ñ (Келинг) ОÑтрва)", + "en_CH": "енглеÑки (ШвајцарÑка)", + "en_CK": "енглеÑки (Кукова ОÑтрва)", + "en_CM": "енглеÑки (Камерун)", + "en_CX": "енглеÑки (Божићна оÑтрва)", + "en_CY": "енглеÑки (Кипар)", + "en_DE": "енглеÑки (Ðемачка)", + "en_DG": "енглеÑки (Дијего ГарÑија)", + "en_DK": "енглеÑки (ДанÑка)", + "en_DM": "енглеÑки (Доминика)", + "en_ER": "енглеÑки (Еритреја)", + "en_FI": "енглеÑки (ФинÑка)", + "en_FJ": "енглеÑки (Фиџи)", + "en_FK": "енглеÑки (ФокландÑка оÑтрва)", + "en_FM": "енглеÑки (Микронезија)", + "en_GB": "енглеÑки (Велика Британија)", + "en_GD": "енглеÑки (Гренада)", + "en_GG": "енглеÑки (ГурнÑи)", + "en_GH": "енглеÑки (Гана)", + "en_GI": "енглеÑки (Гибралтар)", + "en_GM": "енглеÑки (Гамбија)", + "en_GU": "енглеÑки (Гуам)", + "en_GY": "енглеÑки (Гвајана)", + "en_HK": "енглеÑки (Хонг Конг С. Ð. Р. Кина)", + "en_IE": "енглеÑки (ИрÑка)", + "en_IL": "енглеÑки (Израел)", + "en_IM": "енглеÑки (ОÑтрво Ман)", + "en_IN": "енглеÑки (Индија)", + "en_IO": "енглеÑки (БританÑка територија у ИндијÑком океану)", + "en_JE": "енглеÑки (ÐерÑи)", + "en_JM": "енглеÑки (Јамајка)", + "en_KE": "енглеÑки (Кенија)", + "en_KI": "енглеÑки (Кирибати)", + "en_KN": "енглеÑки (Сент ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ)", + "en_KY": "енглеÑки (КајманÑка ОÑтрва)", + "en_LC": "енглеÑки (Сент Луција)", + "en_LR": "енглеÑки (Либерија)", + "en_LS": "енглеÑки (ЛеÑото)", + "en_MG": "енглеÑки (МадагаÑкар)", + "en_MH": "енглеÑки (МаршалÑка ОÑтрва)", + "en_MO": "енглеÑки (Макао С. Ð. Р. Кина)", + "en_MP": "енглеÑки (Северна МаријанÑка ОÑтрва)", + "en_MS": "енглеÑки (МонÑерат)", + "en_MT": "енглеÑки (Малта)", + "en_MU": "енглеÑки (МаурицијуÑ)", + "en_MW": "енглеÑки (Малави)", + "en_MY": "енглеÑки (Малезија)", + "en_NA": "енглеÑки (Ðамибија)", + "en_NF": "енглеÑки (Ðорфолк ОÑтрво)", + "en_NG": "енглеÑки (Ðигерија)", + "en_NL": "енглеÑки (Холандија)", + "en_NR": "енглеÑки (Ðауру)", + "en_NU": "енглеÑки (Ðиуе)", + "en_NZ": "енглеÑки (Ðови Зеланд)", + "en_PG": "енглеÑки (Папуа Ðова Гвинеја)", + "en_PH": "енглеÑки (Филипини)", + "en_PK": "енглеÑки (ПакиÑтан)", + "en_PN": "енглеÑки (Питкерн)", + "en_PR": "енглеÑки (Порто Рико)", + "en_PW": "енглеÑки (Палау)", + "en_RW": "енглеÑки (Руанда)", + "en_SB": "енглеÑки (СоломонÑка ОÑтрва)", + "en_SC": "енглеÑки (Сејшели)", + "en_SD": "енглеÑки (Судан)", + "en_SE": "енглеÑки (ШведÑка)", + "en_SG": "енглеÑки (Сингапур)", + "en_SH": "енглеÑки (Света Јелена)", + "en_SI": "енглеÑки (Словенија)", + "en_SL": "енглеÑки (Сијера Леоне)", + "en_SS": "енглеÑки (Južni Sudan)", + "en_SX": "енглеÑки (Sint Marten)", + "en_SZ": "енглеÑки (Свазиленд)", + "en_TC": "енглеÑки (Ð¢ÑƒÑ€ÐºÑ Ð¸ ÐšÐ°Ñ˜ÐºÐ¾Ñ ÐžÑтрва)", + "en_TK": "енглеÑки (Токелау)", + "en_TO": "енглеÑки (Тонга)", + "en_TT": "енглеÑки (Тринидад и Тобаго)", + "en_TV": "енглеÑки (Тувалу)", + "en_TZ": "енглеÑки (Танзанија)", + "en_UG": "енглеÑки (Уганда)", + "en_UM": "енглеÑки (Мања удаљена оÑтрва СÐД)", + "en_US": "енглеÑки (Сједињене Ðмеричке Државе)", + "en_VC": "енглеÑки (Сент ВинÑент и Гренадини)", + "en_VG": "енглеÑки (БританÑка ДевичанÑка ОÑтрва)", + "en_VI": "енглеÑки (С.Ð.Д. ДевичанÑка ОÑтрва)", + "en_VU": "енглеÑки (Вануату)", + "en_WS": "енглеÑки (Самоа)", + "en_ZA": "енглеÑки (Јужноафричка Република)", + "en_ZM": "енглеÑки (Замбија)", + "en_ZW": "енглеÑки (Зимбабве)", + "eo": "еÑперанто", + "es": "шпанÑки", + "es_AR": "шпанÑки (Ðргентина)", + "es_BO": "шпанÑки (Боливија)", + "es_BR": "шпанÑки (Бразил)", + "es_CL": "шпанÑки (Чиле)", + "es_CO": "шпанÑки (Колумбија)", + "es_CR": "шпанÑки (КоÑтарика)", + "es_CU": "шпанÑки (Куба)", + "es_DO": "шпанÑки (ДоминиканÑка Република)", + "es_EA": "шпанÑки (Сеута и Мелиља)", + "es_EC": "шпанÑки (Еквадор)", + "es_ES": "шпанÑки (Шпанија)", + "es_GQ": "шпанÑки (Екваторијална Гвинеја)", + "es_GT": "шпанÑки (Гватемала)", + "es_HN": "шпанÑки (ХондураÑ)", + "es_IC": "шпанÑки (КанарÑка оÑтрва)", + "es_MX": "шпанÑки (МекÑико)", + "es_NI": "шпанÑки (Ðикарагва)", + "es_PA": "шпанÑки (Панама)", + "es_PE": "шпанÑки (Перу)", + "es_PH": "шпанÑки (Филипини)", + "es_PR": "шпанÑки (Порто Рико)", + "es_PY": "шпанÑки (Парагвај)", + "es_SV": "шпанÑки (Салвадор)", + "es_US": "шпанÑки (Сједињене Ðмеричке Државе)", + "es_UY": "шпанÑки (Уругвај)", + "es_VE": "шпанÑки (Венецуела)", + "et": "еÑтонÑки", + "et_EE": "еÑтонÑки (ЕÑтонија)", + "eu": "баÑкијÑки", + "eu_ES": "баÑкијÑки (Шпанија)", + "fa": "перÑијÑки", + "fa_AF": "перÑијÑки (ÐвганиÑтан)", + "fa_IR": "перÑијÑки (Иран)", + "ff": "фулах", + "ff_CM": "фулах (Камерун)", + "ff_GN": "фулах (Гвинеја)", + "ff_MR": "фулах (Мауританија)", + "ff_SN": "фулах (Сенегал)", + "fi": "финÑки", + "fi_FI": "финÑки (ФинÑка)", + "fo": "фарÑки", + "fo_DK": "фарÑки (ДанÑка)", + "fo_FO": "фарÑки (ФарÑка ОÑтрва)", + "fr": "француÑки", + "fr_BE": "француÑки (Белгија)", + "fr_BF": "француÑки (Буркина ФаÑо)", + "fr_BI": "француÑки (Бурунди)", + "fr_BJ": "француÑки (Бенин)", + "fr_BL": "француÑки (Свети Бартоломеј)", + "fr_CA": "француÑки (Канада)", + "fr_CD": "француÑки (Конго - КиншаÑа)", + "fr_CF": "француÑки (Централно Ðфричка Република)", + "fr_CG": "француÑки (Конго - Бразавил)", + "fr_CH": "француÑки (ШвајцарÑка)", + "fr_CI": "француÑки (Обала Слоноваче)", + "fr_CM": "француÑки (Камерун)", + "fr_DJ": "француÑки (Ðибути)", + "fr_DZ": "француÑки (Ðлжир)", + "fr_FR": "француÑки (ФранцуÑка)", + "fr_GA": "француÑки (Габон)", + "fr_GF": "француÑки (ФранцуÑка Гвајана)", + "fr_GN": "француÑки (Гвинеја)", + "fr_GP": "француÑки (Гваделупе)", + "fr_GQ": "француÑки (Екваторијална Гвинеја)", + "fr_HT": "француÑки (Хаити)", + "fr_KM": "француÑки (КоморÑка ОÑтрва)", + "fr_LU": "француÑки (ЛукÑембург)", + "fr_MA": "француÑки (Мароко)", + "fr_MC": "француÑки (Монако)", + "fr_MF": "француÑки (Сент Мартин)", + "fr_MG": "француÑки (МадагаÑкар)", + "fr_ML": "француÑки (Мали)", + "fr_MQ": "француÑки (Мартиник)", + "fr_MR": "француÑки (Мауританија)", + "fr_MU": "француÑки (МаурицијуÑ)", + "fr_NC": "француÑки (Ðова Каледонија)", + "fr_NE": "француÑки (Ðигер)", + "fr_PF": "француÑки (ФранцуÑка Полинезија)", + "fr_PM": "француÑки (Сен Пјер и Микелон)", + "fr_RE": "француÑки (Реинион)", + "fr_RW": "француÑки (Руанда)", + "fr_SC": "француÑки (Сејшели)", + "fr_SN": "француÑки (Сенегал)", + "fr_SY": "француÑки (Сирија)", + "fr_TD": "француÑки (Чад)", + "fr_TG": "француÑки (Того)", + "fr_TN": "француÑки (ТуниÑ)", + "fr_VU": "француÑки (Вануату)", + "fr_WF": "француÑки (Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна ОÑтрва)", + "fr_YT": "француÑки (Мајоте)", + "fy": "фризијÑки", + "fy_NL": "фризијÑки (Холандија)", + "ga": "ирÑки", + "ga_IE": "ирÑки (ИрÑка)", + "gd": "шкотÑки галÑки", + "gd_GB": "шкотÑки галÑки (Велика Британија)", + "gl": "галÑки", + "gl_ES": "галÑки (Шпанија)", + "gu": "гуџарати", + "gu_IN": "гуџарати (Индија)", + "gv": "манкÑ", + "gv_IM": "Ð¼Ð°Ð½ÐºÑ (ОÑтрво Ман)", + "ha": "хауÑа", + "ha_GH": "хауÑа (Гана)", + "ha_NE": "хауÑа (Ðигер)", + "ha_NG": "хауÑа (Ðигерија)", + "he": "хебрејÑки", + "he_IL": "хебрејÑки (Израел)", + "hi": "хинди", + "hi_IN": "хинди (Индија)", + "hr": "хрватÑки", + "hr_BA": "хрватÑки (БоÑна и Херцеговина)", + "hr_HR": "хрватÑки (ХрватÑка)", + "hu": "мађарÑки", + "hu_HU": "мађарÑки (МађарÑка)", + "hy": "јерменÑки", + "hy_AM": "јерменÑки (Ðрменија)", + "id": "индонежанÑки", + "id_ID": "индонежанÑки (Индонезија)", + "ig": "игбо", + "ig_NG": "игбо (Ðигерија)", + "ii": "Ñичуан ји", + "ii_CN": "Ñичуан ји (Кина)", + "is": "иÑландÑки", + "is_IS": "иÑландÑки (ИÑланд)", + "it": "италијанÑки", + "it_CH": "италијанÑки (ШвајцарÑка)", + "it_IT": "италијанÑки (Италија)", + "it_SM": "италијанÑки (Сан Марино)", + "ja": "јапанÑки", + "ja_JP": "јапанÑки (Јапан)", + "ka": "грузијÑки", + "ka_GE": "грузијÑки (Грузија)", + "ki": "кикују", + "ki_KE": "кикују (Кенија)", + "kk": "козачки", + "kk_KZ": "козачки (КазахÑтан)", + "kl": "калалиÑут", + "kl_GL": "калалиÑут (Гренланд)", + "km": "кмерÑки", + "km_KH": "кмерÑки (Камбоџа)", + "kn": "канада", + "kn_IN": "канада (Индија)", + "ko": "корејÑки", + "ko_KP": "корејÑки (Северна Кореја)", + "ko_KR": "корејÑки (Јужна Кореја)", + "ks": "кашмирÑки", + "ks_IN": "кашмирÑки (Индија)", + "kw": "корнишки", + "kw_GB": "корнишки (Велика Британија)", + "ky": "киргиÑки", + "ky_KG": "киргиÑки (КиргизÑтан)", + "lb": "лукÑембуршки", + "lb_LU": "лукÑембуршки (ЛукÑембург)", + "lg": "ганда", + "lg_UG": "ганда (Уганда)", + "ln": "лингала", + "ln_AO": "лингала (Ðнгола)", + "ln_CD": "лингала (Конго - КиншаÑа)", + "ln_CF": "лингала (Централно Ðфричка Република)", + "ln_CG": "лингала (Конго - Бразавил)", + "lo": "лаоÑки", + "lo_LA": "лаоÑки (ЛаоÑ)", + "lt": "литванÑки", + "lt_LT": "литванÑки (Литванија)", + "lu": "луба-катанга", + "lu_CD": "луба-катанга (Конго - КиншаÑа)", + "lv": "летонÑки", + "lv_LV": "летонÑки (Летонија)", + "mg": "малагаÑијÑки", + "mg_MG": "малагаÑијÑки (МадагаÑкар)", + "mk": "македонÑки", + "mk_MK": "македонÑки (Македонија)", + "ml": "малајалам", + "ml_IN": "малајалам (Индија)", + "mn": "монголÑки", + "mn_MN": "монголÑки (Монголија)", + "mr": "марати", + "mr_IN": "марати (Индија)", + "ms": "малајÑки", + "ms_BN": "малајÑки (Брунеј)", + "ms_MY": "малајÑки (Малезија)", + "ms_SG": "малајÑки (Сингапур)", + "mt": "мелтешки", + "mt_MT": "мелтешки (Малта)", + "my": "бурманÑки", + "my_MM": "бурманÑки (Мијанмар (Бурма))", + "nb": "норвешки бокмал", + "nb_NO": "норвешки бокмал (Ðорвешка)", + "nb_SJ": "норвешки бокмал (Свалбард и Јанмајен ОÑтрва)", + "nd": "Ñеверни ндебеле", + "nd_ZW": "Ñеверни ндебеле (Зимбабве)", + "ne": "непалÑки", + "ne_IN": "непалÑки (Индија)", + "ne_NP": "непалÑки (Ðепал)", + "nl": "холандÑки", + "nl_AW": "холандÑки (Ðруба)", + "nl_BE": "холандÑки (Белгија)", + "nl_BQ": "холандÑки (Karipska Holandija)", + "nl_CW": "холандÑки (Kurasao)", + "nl_NL": "холандÑки (Холандија)", + "nl_SR": "холандÑки (Суринам)", + "nl_SX": "холандÑки (Sint Marten)", + "nn": "норвешки њорÑк", + "nn_NO": "норвешки њорÑк (Ðорвешка)", + "no": "норвешки", + "no_NO": "норвешки (Ðорвешка)", + "om": "оромо", + "om_ET": "оромо (Етиопија)", + "om_KE": "оромо (Кенија)", + "or": "оријÑки", + "or_IN": "оријÑки (Индија)", + "os": "оÑетÑки", + "os_GE": "оÑетÑки (Грузија)", + "os_RU": "оÑетÑки (РуÑија)", + "pa": "панџабÑки", + "pa_Arab": "панџабÑки (арапÑко пиÑмо)", + "pa_Arab_PK": "панџабÑки (арапÑко пиÑмо, ПакиÑтан)", + "pa_Guru": "панџабÑки (гурмуки пиÑмо)", + "pa_Guru_IN": "панџабÑки (гурмуки пиÑмо, Индија)", + "pa_IN": "панџабÑки (Индија)", + "pa_PK": "панџабÑки (ПакиÑтан)", + "pl": "пољÑки", + "pl_PL": "пољÑки (ПољÑка)", + "ps": "паштунÑки", + "ps_AF": "паштунÑки (ÐвганиÑтан)", + "pt": "португалÑки", + "pt_AO": "португалÑки (Ðнгола)", + "pt_BR": "португалÑки (Бразил)", + "pt_CH": "португалÑки (ШвајцарÑка)", + "pt_CV": "португалÑки (Капе Верде)", + "pt_GQ": "португалÑки (Екваторијална Гвинеја)", + "pt_GW": "португалÑки (Гвинеја-БиÑао)", + "pt_LU": "португалÑки (ЛукÑембург)", + "pt_MO": "португалÑки (Макао С. Ð. Р. Кина)", + "pt_MZ": "португалÑки (Мозамбик)", + "pt_PT": "португалÑки (Португалија)", + "pt_ST": "португалÑки (Сао Томе и Принципе)", + "pt_TL": "португалÑки (ИÑточни Тимор)", + "qu": "квенча", + "qu_BO": "квенча (Боливија)", + "qu_EC": "квенча (Еквадор)", + "qu_PE": "квенча (Перу)", + "rm": "рето-романÑки", + "rm_CH": "рето-романÑки (ШвајцарÑка)", + "rn": "рунди", + "rn_BI": "рунди (Бурунди)", + "ro": "румунÑки", + "ro_MD": "румунÑки (Молдавија)", + "ro_RO": "румунÑки (Румунија)", + "ru": "руÑки", + "ru_BY": "руÑки (БелоруÑија)", + "ru_KG": "руÑки (КиргизÑтан)", + "ru_KZ": "руÑки (КазахÑтан)", + "ru_MD": "руÑки (Молдавија)", + "ru_RU": "руÑки (РуÑија)", + "ru_UA": "руÑки (Украјина)", + "rw": "кинјаруанда", + "rw_RW": "кинјаруанда (Руанда)", + "se": "Ñеверни Ñами", + "se_FI": "Ñеверни Ñами (ФинÑка)", + "se_NO": "Ñеверни Ñами (Ðорвешка)", + "se_SE": "Ñеверни Ñами (ШведÑка)", + "sg": "Ñанго", + "sg_CF": "Ñанго (Централно Ðфричка Република)", + "sh": "ÑрпÑкохрватÑки", + "sh_BA": "ÑрпÑкохрватÑки (БоÑна и Херцеговина)", + "si": "ÑингалеÑки", + "si_LK": "ÑингалеÑки (Шри Ланка)", + "sk": "Ñловачки", + "sk_SK": "Ñловачки (Словачка)", + "sl": "Ñловеначки", + "sl_SI": "Ñловеначки (Словенија)", + "sn": "шона", + "sn_ZW": "шона (Зимбабве)", + "so": "ÑомалÑки", + "so_DJ": "ÑомалÑки (Ðибути)", + "so_ET": "ÑомалÑки (Етиопија)", + "so_KE": "ÑомалÑки (Кенија)", + "so_SO": "ÑомалÑки (Сомалија)", + "sq": "албанÑки", + "sq_AL": "албанÑки (Ðлбанија)", + "sq_MK": "албанÑки (Македонија)", + "sq_XK": "албанÑки (Kosovo)", + "sr": "ÑрпÑки", + "sr_BA": "ÑрпÑки (БоÑна и Херцеговина)", + "sr_Cyrl": "ÑрпÑки (Ћирилица)", + "sr_Cyrl_BA": "ÑрпÑки (Ћирилица, БоÑна и Херцеговина)", + "sr_Cyrl_ME": "ÑрпÑки (Ћирилица, Црна Гора)", + "sr_Cyrl_RS": "ÑрпÑки (Ћирилица, Србија)", + "sr_Cyrl_XK": "ÑрпÑки (Ћирилица, Kosovo)", + "sr_Latn": "ÑрпÑки (Латиница)", + "sr_Latn_BA": "ÑрпÑки (Латиница, БоÑна и Херцеговина)", + "sr_Latn_ME": "ÑрпÑки (Латиница, Црна Гора)", + "sr_Latn_RS": "ÑрпÑки (Латиница, Србија)", + "sr_Latn_XK": "ÑрпÑки (Латиница, Kosovo)", + "sr_ME": "ÑрпÑки (Црна Гора)", + "sr_RS": "ÑрпÑки (Србија)", + "sr_XK": "ÑрпÑки (Kosovo)", + "sv": "шведÑки", + "sv_AX": "шведÑки (ÐландÑка оÑтрва)", + "sv_FI": "шведÑки (ФинÑка)", + "sv_SE": "шведÑки (ШведÑка)", + "sw": "Ñвахили", + "sw_CD": "Ñвахили (Конго - КиншаÑа)", + "sw_KE": "Ñвахили (Кенија)", + "sw_TZ": "Ñвахили (Танзанија)", + "sw_UG": "Ñвахили (Уганда)", + "ta": "тамилÑки", + "ta_IN": "тамилÑки (Индија)", + "ta_LK": "тамилÑки (Шри Ланка)", + "ta_MY": "тамилÑки (Малезија)", + "ta_SG": "тамилÑки (Сингапур)", + "te": "телугу", + "te_IN": "телугу (Индија)", + "th": "тајландÑки", + "th_TH": "тајландÑки (Тајланд)", + "ti": "тигриња", + "ti_ER": "тигриња (Еритреја)", + "ti_ET": "тигриња (Етиопија)", + "tl": "тагалÑки", + "tl_PH": "тагалÑки (Филипини)", + "to": "тонга", + "to_TO": "тонга (Тонга)", + "tr": "турÑки", + "tr_CY": "турÑки (Кипар)", + "tr_TR": "турÑки (ТурÑка)", + "ug": "ујгурÑки", + "ug_CN": "ујгурÑки (Кина)", + "uk": "украјинÑки", + "uk_UA": "украјинÑки (Украјина)", + "ur": "урду", + "ur_IN": "урду (Индија)", + "ur_PK": "урду (ПакиÑтан)", + "uz": "узбечки", + "uz_AF": "узбечки (ÐвганиÑтан)", + "uz_Arab": "узбечки (арапÑко пиÑмо)", + "uz_Arab_AF": "узбечки (арапÑко пиÑмо, ÐвганиÑтан)", + "uz_Cyrl": "узбечки (Ћирилица)", + "uz_Cyrl_UZ": "узбечки (Ћирилица, УзбекиÑтан)", + "uz_Latn": "узбечки (Латиница)", + "uz_Latn_UZ": "узбечки (Латиница, УзбекиÑтан)", + "uz_UZ": "узбечки (УзбекиÑтан)", + "vi": "вијетнамÑки", + "vi_VN": "вијетнамÑки (Вијетнам)", + "yi": "јидиш", + "yo": "јоруба", + "yo_BJ": "јоруба (Бенин)", + "yo_NG": "јоруба (Ðигерија)", + "zh": "кинеÑки", + "zh_CN": "кинеÑки (Кина)", + "zh_HK": "кинеÑки (Хонг Конг С. Ð. Р. Кина)", + "zh_Hans": "кинеÑки (поједноÑтављено кинеÑко пиÑмо)", + "zh_Hans_CN": "кинеÑки (поједноÑтављено кинеÑко пиÑмо, Кина)", + "zh_Hans_HK": "кинеÑки (поједноÑтављено кинеÑко пиÑмо, Хонг Конг С. Ð. Р. Кина)", + "zh_Hans_MO": "кинеÑки (поједноÑтављено кинеÑко пиÑмо, Макао С. Ð. Р. Кина)", + "zh_Hans_SG": "кинеÑки (поједноÑтављено кинеÑко пиÑмо, Сингапур)", + "zh_Hant": "кинеÑки (традиционално кинеÑко пиÑмо)", + "zh_Hant_HK": "кинеÑки (традиционално кинеÑко пиÑмо, Хонг Конг С. Ð. Р. Кина)", + "zh_Hant_MO": "кинеÑки (традиционално кинеÑко пиÑмо, Макао С. Ð. Р. Кина)", + "zh_Hant_TW": "кинеÑки (традиционално кинеÑко пиÑмо, Тајван)", + "zh_MO": "кинеÑки (Макао С. Ð. Р. Кина)", + "zh_SG": "кинеÑки (Сингапур)", + "zh_TW": "кинеÑки (Тајван)", + "zu": "зулу", + "zu_ZA": "зулу (Јужноафричка Република)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ca.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ca.json new file mode 100644 index 0000000000000000000000000000000000000000..48c89ac262b940ed873b3450cf42fa7101a541c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ca.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namíbia)", + "af_ZA": "afrikaans (República de Sud-àfrica)", + "ak": "àkan", + "ak_GH": "àkan (Ghana)", + "am": "amhàric", + "am_ET": "amhàric (Etiòpia)", + "ar": "àrab", + "ar_AE": "àrab (Emirats Àrabs Units)", + "ar_BH": "àrab (Bahrain)", + "ar_DJ": "àrab (Djibouti)", + "ar_DZ": "àrab (Algèria)", + "ar_EG": "àrab (Egipte)", + "ar_EH": "àrab (Sàhara Occidental)", + "ar_ER": "àrab (Eritrea)", + "ar_IL": "àrab (Israel)", + "ar_IQ": "àrab (Iraq)", + "ar_JO": "àrab (Jordània)", + "ar_KM": "àrab (Comores)", + "ar_KW": "àrab (Kuwait)", + "ar_LB": "àrab (Líban)", + "ar_LY": "àrab (Líbia)", + "ar_MA": "àrab (Marroc)", + "ar_MR": "àrab (Mauritània)", + "ar_OM": "àrab (Oman)", + "ar_PS": "àrab (territoris palestins)", + "ar_QA": "àrab (Qatar)", + "ar_SA": "àrab (Aràbia Saudita)", + "ar_SD": "àrab (Sudan)", + "ar_SO": "àrab (Somàlia)", + "ar_SS": "àrab (Sudan del Sud)", + "ar_SY": "àrab (Síria)", + "ar_TD": "àrab (Txad)", + "ar_TN": "àrab (Tunísia)", + "ar_YE": "àrab (Iemen)", + "as": "assamès", + "as_IN": "assamès (Ãndia)", + "az": "azerbaidjanès", + "az_AZ": "azerbaidjanès (Azerbaidjan)", + "az_Cyrl": "azerbaidjanès (ciríl·lic)", + "az_Cyrl_AZ": "azerbaidjanès (ciríl·lic, Azerbaidjan)", + "az_Latn": "azerbaidjanès (llatí)", + "az_Latn_AZ": "azerbaidjanès (llatí, Azerbaidjan)", + "be": "bielorús", + "be_BY": "bielorús (Belarús)", + "bg": "búlgar", + "bg_BG": "búlgar (Bulgària)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengalí", + "bn_BD": "bengalí (Bangla Desh)", + "bn_IN": "bengalí (Ãndia)", + "bo": "tibetà", + "bo_CN": "tibetà (Xina)", + "bo_IN": "tibetà (Ãndia)", + "br": "bretó", + "br_FR": "bretó (França)", + "bs": "bosnià", + "bs_BA": "bosnià (Bòsnia i Hercegovina)", + "bs_Cyrl": "bosnià (ciríl·lic)", + "bs_Cyrl_BA": "bosnià (ciríl·lic, Bòsnia i Hercegovina)", + "bs_Latn": "bosnià (llatí)", + "bs_Latn_BA": "bosnià (llatí, Bòsnia i Hercegovina)", + "ca": "català", + "ca_AD": "català (Andorra)", + "ca_ES": "català (Espanya)", + "ca_FR": "català (França)", + "ca_IT": "català (Itàlia)", + "ce": "txetxè", + "ce_RU": "txetxè (Rússia)", + "cs": "txec", + "cs_CZ": "txec (República Txeca)", + "cy": "gal·lès", + "cy_GB": "gal·lès (Regne Unit)", + "da": "danès", + "da_DK": "danès (Dinamarca)", + "da_GL": "danès (Grenlàndia)", + "de": "alemany", + "de_AT": "alemany (Àustria)", + "de_BE": "alemany (Bèlgica)", + "de_CH": "alemany (Suïssa)", + "de_DE": "alemany (Alemanya)", + "de_IT": "alemany (Itàlia)", + "de_LI": "alemany (Liechtenstein)", + "de_LU": "alemany (Luxemburg)", + "dz": "dzongka", + "dz_BT": "dzongka (Bhutan)", + "ee": "ewe", + "ee_GH": "ewe (Ghana)", + "ee_TG": "ewe (Togo)", + "el": "grec", + "el_CY": "grec (Xipre)", + "el_GR": "grec (Grècia)", + "en": "anglès", + "en_AG": "anglès (Antigua i Barbuda)", + "en_AI": "anglès (Anguilla)", + "en_AS": "anglès (Samoa Nord-americana)", + "en_AT": "anglès (Àustria)", + "en_AU": "anglès (Austràlia)", + "en_BB": "anglès (Barbados)", + "en_BE": "anglès (Bèlgica)", + "en_BI": "anglès (Burundi)", + "en_BM": "anglès (Bermudes)", + "en_BS": "anglès (Bahames)", + "en_BW": "anglès (Botswana)", + "en_BZ": "anglès (Belize)", + "en_CA": "anglès (Canadà)", + "en_CC": "anglès (Illes Cocos)", + "en_CH": "anglès (Suïssa)", + "en_CK": "anglès (Illes Cook)", + "en_CM": "anglès (Camerun)", + "en_CX": "anglès (Illa Christmas)", + "en_CY": "anglès (Xipre)", + "en_DE": "anglès (Alemanya)", + "en_DG": "anglès (Diego Garcia)", + "en_DK": "anglès (Dinamarca)", + "en_DM": "anglès (Dominica)", + "en_ER": "anglès (Eritrea)", + "en_FI": "anglès (Finlàndia)", + "en_FJ": "anglès (Fiji)", + "en_FK": "anglès (Illes Malvines)", + "en_FM": "anglès (Micronèsia)", + "en_GB": "anglès (Regne Unit)", + "en_GD": "anglès (Grenada)", + "en_GG": "anglès (Guernsey)", + "en_GH": "anglès (Ghana)", + "en_GI": "anglès (Gibraltar)", + "en_GM": "anglès (Gàmbia)", + "en_GU": "anglès (Guam)", + "en_GY": "anglès (Guyana)", + "en_HK": "anglès (Hong Kong (RAE Xina))", + "en_IE": "anglès (Irlanda)", + "en_IL": "anglès (Israel)", + "en_IM": "anglès (Illa de Man)", + "en_IN": "anglès (Ãndia)", + "en_IO": "anglès (Territori Britànic de l’Oceà Ãndic)", + "en_JE": "anglès (Jersey)", + "en_JM": "anglès (Jamaica)", + "en_KE": "anglès (Kenya)", + "en_KI": "anglès (Kiribati)", + "en_KN": "anglès (Saint Christopher i Nevis)", + "en_KY": "anglès (Illes Caiman)", + "en_LC": "anglès (Saint Lucia)", + "en_LR": "anglès (Libèria)", + "en_LS": "anglès (Lesotho)", + "en_MG": "anglès (Madagascar)", + "en_MH": "anglès (Illes Marshall)", + "en_MO": "anglès (Macau (RAE Xina))", + "en_MP": "anglès (Illes Mariannes del Nord)", + "en_MS": "anglès (Montserrat)", + "en_MT": "anglès (Malta)", + "en_MU": "anglès (Maurici)", + "en_MW": "anglès (Malawi)", + "en_MY": "anglès (Malàisia)", + "en_NA": "anglès (Namíbia)", + "en_NF": "anglès (Norfolk)", + "en_NG": "anglès (Nigèria)", + "en_NL": "anglès (Països Baixos)", + "en_NR": "anglès (Nauru)", + "en_NU": "anglès (Niue)", + "en_NZ": "anglès (Nova Zelanda)", + "en_PG": "anglès (Papua Nova Guinea)", + "en_PH": "anglès (Filipines)", + "en_PK": "anglès (Pakistan)", + "en_PN": "anglès (Illes Pitcairn)", + "en_PR": "anglès (Puerto Rico)", + "en_PW": "anglès (Palau)", + "en_RW": "anglès (Ruanda)", + "en_SB": "anglès (Illes Salomó)", + "en_SC": "anglès (Seychelles)", + "en_SD": "anglès (Sudan)", + "en_SE": "anglès (Suècia)", + "en_SG": "anglès (Singapur)", + "en_SH": "anglès (Saint Helena)", + "en_SI": "anglès (Eslovènia)", + "en_SL": "anglès (Sierra Leone)", + "en_SS": "anglès (Sudan del Sud)", + "en_SX": "anglès (Sint Maarten)", + "en_SZ": "anglès (Swazilàndia)", + "en_TC": "anglès (Illes Turks i Caicos)", + "en_TK": "anglès (Tokelau)", + "en_TO": "anglès (Tonga)", + "en_TT": "anglès (Trinitat i Tobago)", + "en_TV": "anglès (Tuvalu)", + "en_TZ": "anglès (Tanzània)", + "en_UG": "anglès (Uganda)", + "en_UM": "anglès (Illes Perifèriques Menors dels EUA)", + "en_US": "anglès (Estats Units)", + "en_VC": "anglès (Saint Vincent i les Grenadines)", + "en_VG": "anglès (Illes Verges Britàniques)", + "en_VI": "anglès (Illes Verges Nord-americanes)", + "en_VU": "anglès (Vanuatu)", + "en_WS": "anglès (Samoa)", + "en_ZA": "anglès (República de Sud-àfrica)", + "en_ZM": "anglès (Zàmbia)", + "en_ZW": "anglès (Zimbàbue)", + "eo": "esperanto", + "es": "espanyol", + "es_AR": "espanyol (Argentina)", + "es_BO": "espanyol (Bolívia)", + "es_BR": "espanyol (Brasil)", + "es_CL": "espanyol (Xile)", + "es_CO": "espanyol (Colòmbia)", + "es_CR": "espanyol (Costa Rica)", + "es_CU": "espanyol (Cuba)", + "es_DO": "espanyol (República Dominicana)", + "es_EA": "espanyol (Ceuta i Melilla)", + "es_EC": "espanyol (Equador)", + "es_ES": "espanyol (Espanya)", + "es_GQ": "espanyol (Guinea Equatorial)", + "es_GT": "espanyol (Guatemala)", + "es_HN": "espanyol (Hondures)", + "es_IC": "espanyol (Illes Canàries)", + "es_MX": "espanyol (Mèxic)", + "es_NI": "espanyol (Nicaragua)", + "es_PA": "espanyol (Panamà)", + "es_PE": "espanyol (Perú)", + "es_PH": "espanyol (Filipines)", + "es_PR": "espanyol (Puerto Rico)", + "es_PY": "espanyol (Paraguai)", + "es_SV": "espanyol (El Salvador)", + "es_US": "espanyol (Estats Units)", + "es_UY": "espanyol (Uruguai)", + "es_VE": "espanyol (Veneçuela)", + "et": "estonià", + "et_EE": "estonià (Estònia)", + "eu": "basc", + "eu_ES": "basc (Espanya)", + "fa": "persa", + "fa_AF": "persa (Afganistan)", + "fa_IR": "persa (Iran)", + "ff": "ful", + "ff_CM": "ful (Camerun)", + "ff_GN": "ful (Guinea)", + "ff_MR": "ful (Mauritània)", + "ff_SN": "ful (Senegal)", + "fi": "finès", + "fi_FI": "finès (Finlàndia)", + "fo": "feroès", + "fo_DK": "feroès (Dinamarca)", + "fo_FO": "feroès (Illes Fèroe)", + "fr": "francès", + "fr_BE": "francès (Bèlgica)", + "fr_BF": "francès (Burkina Faso)", + "fr_BI": "francès (Burundi)", + "fr_BJ": "francès (Benín)", + "fr_BL": "francès (Saint Barthélemy)", + "fr_CA": "francès (Canadà)", + "fr_CD": "francès (Congo - Kinshasa)", + "fr_CF": "francès (República Centreafricana)", + "fr_CG": "francès (Congo - Brazzaville)", + "fr_CH": "francès (Suïssa)", + "fr_CI": "francès (Costa d’Ivori)", + "fr_CM": "francès (Camerun)", + "fr_DJ": "francès (Djibouti)", + "fr_DZ": "francès (Algèria)", + "fr_FR": "francès (França)", + "fr_GA": "francès (Gabon)", + "fr_GF": "francès (Guaiana Francesa)", + "fr_GN": "francès (Guinea)", + "fr_GP": "francès (Guadeloupe)", + "fr_GQ": "francès (Guinea Equatorial)", + "fr_HT": "francès (Haití)", + "fr_KM": "francès (Comores)", + "fr_LU": "francès (Luxemburg)", + "fr_MA": "francès (Marroc)", + "fr_MC": "francès (Mònaco)", + "fr_MF": "francès (Saint Martin)", + "fr_MG": "francès (Madagascar)", + "fr_ML": "francès (Mali)", + "fr_MQ": "francès (Martinica)", + "fr_MR": "francès (Mauritània)", + "fr_MU": "francès (Maurici)", + "fr_NC": "francès (Nova Caledònia)", + "fr_NE": "francès (Níger)", + "fr_PF": "francès (Polinèsia Francesa)", + "fr_PM": "francès (Saint-Pierre-et-Miquelon)", + "fr_RE": "francès (Illa de la Reunió)", + "fr_RW": "francès (Ruanda)", + "fr_SC": "francès (Seychelles)", + "fr_SN": "francès (Senegal)", + "fr_SY": "francès (Síria)", + "fr_TD": "francès (Txad)", + "fr_TG": "francès (Togo)", + "fr_TN": "francès (Tunísia)", + "fr_VU": "francès (Vanuatu)", + "fr_WF": "francès (Wallis i Futuna)", + "fr_YT": "francès (Mayotte)", + "fy": "frisó occidental", + "fy_NL": "frisó occidental (Països Baixos)", + "ga": "irlandès", + "ga_IE": "irlandès (Irlanda)", + "gd": "gaèlic escocès", + "gd_GB": "gaèlic escocès (Regne Unit)", + "gl": "gallec", + "gl_ES": "gallec (Espanya)", + "gu": "gujarati", + "gu_IN": "gujarati (Ãndia)", + "gv": "manx", + "gv_IM": "manx (Illa de Man)", + "ha": "haussa", + "ha_GH": "haussa (Ghana)", + "ha_NE": "haussa (Níger)", + "ha_NG": "haussa (Nigèria)", + "he": "hebreu", + "he_IL": "hebreu (Israel)", + "hi": "hindi", + "hi_IN": "hindi (Ãndia)", + "hr": "croat", + "hr_BA": "croat (Bòsnia i Hercegovina)", + "hr_HR": "croat (Croàcia)", + "hu": "hongarès", + "hu_HU": "hongarès (Hongria)", + "hy": "armeni", + "hy_AM": "armeni (Armènia)", + "id": "indonesi", + "id_ID": "indonesi (Indonèsia)", + "ig": "igbo", + "ig_NG": "igbo (Nigèria)", + "ii": "yi sichuan", + "ii_CN": "yi sichuan (Xina)", + "is": "islandès", + "is_IS": "islandès (Islàndia)", + "it": "italià", + "it_CH": "italià (Suïssa)", + "it_IT": "italià (Itàlia)", + "it_SM": "italià (San Marino)", + "ja": "japonès", + "ja_JP": "japonès (Japó)", + "ka": "georgià", + "ka_GE": "georgià (Geòrgia)", + "ki": "kikuiu", + "ki_KE": "kikuiu (Kenya)", + "kk": "kazakh", + "kk_KZ": "kazakh (Kazakhstan)", + "kl": "grenlandès", + "kl_GL": "grenlandès (Grenlàndia)", + "km": "khmer", + "km_KH": "khmer (Cambodja)", + "kn": "kannada", + "kn_IN": "kannada (Ãndia)", + "ko": "coreà", + "ko_KP": "coreà (Corea del Nord)", + "ko_KR": "coreà (Corea del Sud)", + "ks": "caixmiri", + "ks_IN": "caixmiri (Ãndia)", + "kw": "còrnic", + "kw_GB": "còrnic (Regne Unit)", + "ky": "kirguís", + "ky_KG": "kirguís (Kirguizistan)", + "lb": "luxemburguès", + "lb_LU": "luxemburguès (Luxemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Congo - Kinshasa)", + "ln_CF": "lingala (República Centreafricana)", + "ln_CG": "lingala (Congo - Brazzaville)", + "lo": "laosià", + "lo_LA": "laosià (Laos)", + "lt": "lituà", + "lt_LT": "lituà (Lituània)", + "lu": "luba katanga", + "lu_CD": "luba katanga (Congo - Kinshasa)", + "lv": "letó", + "lv_LV": "letó (Letònia)", + "mg": "malgaix", + "mg_MG": "malgaix (Madagascar)", + "mk": "macedoni", + "mk_MK": "macedoni (Macedònia)", + "ml": "malaiàlam", + "ml_IN": "malaiàlam (Ãndia)", + "mn": "mongol", + "mn_MN": "mongol (Mongòlia)", + "mr": "marathi", + "mr_IN": "marathi (Ãndia)", + "ms": "malai", + "ms_BN": "malai (Brunei)", + "ms_MY": "malai (Malàisia)", + "ms_SG": "malai (Singapur)", + "mt": "maltès", + "mt_MT": "maltès (Malta)", + "my": "birmà", + "my_MM": "birmà (Myanmar (Birmània))", + "nb": "noruec bokmÃ¥l", + "nb_NO": "noruec bokmÃ¥l (Noruega)", + "nb_SJ": "noruec bokmÃ¥l (Svalbard i Jan Mayen)", + "nd": "ndebele septentrional", + "nd_ZW": "ndebele septentrional (Zimbàbue)", + "ne": "nepalès", + "ne_IN": "nepalès (Ãndia)", + "ne_NP": "nepalès (Nepal)", + "nl": "neerlandès", + "nl_AW": "neerlandès (Aruba)", + "nl_BE": "neerlandès (Bèlgica)", + "nl_BQ": "neerlandès (Carib Neerlandès)", + "nl_CW": "neerlandès (Curaçao)", + "nl_NL": "neerlandès (Països Baixos)", + "nl_SR": "neerlandès (Surinam)", + "nl_SX": "neerlandès (Sint Maarten)", + "nn": "noruec nynorsk", + "nn_NO": "noruec nynorsk (Noruega)", + "no": "noruec", + "no_NO": "noruec (Noruega)", + "om": "oromo", + "om_ET": "oromo (Etiòpia)", + "om_KE": "oromo (Kenya)", + "or": "oriya", + "or_IN": "oriya (Ãndia)", + "os": "osseta", + "os_GE": "osseta (Geòrgia)", + "os_RU": "osseta (Rússia)", + "pa": "panjabi", + "pa_Arab": "panjabi (àrab)", + "pa_Arab_PK": "panjabi (àrab, Pakistan)", + "pa_Guru": "panjabi (gurmukhi)", + "pa_Guru_IN": "panjabi (gurmukhi, Ãndia)", + "pa_IN": "panjabi (Ãndia)", + "pa_PK": "panjabi (Pakistan)", + "pl": "polonès", + "pl_PL": "polonès (Polònia)", + "ps": "paixtu", + "ps_AF": "paixtu (Afganistan)", + "pt": "portuguès", + "pt_AO": "portuguès (Angola)", + "pt_BR": "portuguès (Brasil)", + "pt_CH": "portuguès (Suïssa)", + "pt_CV": "portuguès (Cap Verd)", + "pt_GQ": "portuguès (Guinea Equatorial)", + "pt_GW": "portuguès (Guinea Bissau)", + "pt_LU": "portuguès (Luxemburg)", + "pt_MO": "portuguès (Macau (RAE Xina))", + "pt_MZ": "portuguès (Moçambic)", + "pt_PT": "portuguès (Portugal)", + "pt_ST": "portuguès (São Tomé i Príncipe)", + "pt_TL": "portuguès (Timor Oriental)", + "qu": "quítxua", + "qu_BO": "quítxua (Bolívia)", + "qu_EC": "quítxua (Equador)", + "qu_PE": "quítxua (Perú)", + "rm": "retoromànic", + "rm_CH": "retoromànic (Suïssa)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "romanès", + "ro_MD": "romanès (Moldàvia)", + "ro_RO": "romanès (Romania)", + "ru": "rus", + "ru_BY": "rus (Belarús)", + "ru_KG": "rus (Kirguizistan)", + "ru_KZ": "rus (Kazakhstan)", + "ru_MD": "rus (Moldàvia)", + "ru_RU": "rus (Rússia)", + "ru_UA": "rus (Ucraïna)", + "rw": "ruandès", + "rw_RW": "ruandès (Ruanda)", + "se": "sami septentrional", + "se_FI": "sami septentrional (Finlàndia)", + "se_NO": "sami septentrional (Noruega)", + "se_SE": "sami septentrional (Suècia)", + "sg": "sango", + "sg_CF": "sango (República Centreafricana)", + "sh": "serbocroat", + "sh_BA": "serbocroat (Bòsnia i Hercegovina)", + "si": "singalès", + "si_LK": "singalès (Sri Lanka)", + "sk": "eslovac", + "sk_SK": "eslovac (Eslovàquia)", + "sl": "eslovè", + "sl_SI": "eslovè (Eslovènia)", + "sn": "shona", + "sn_ZW": "shona (Zimbàbue)", + "so": "somali", + "so_DJ": "somali (Djibouti)", + "so_ET": "somali (Etiòpia)", + "so_KE": "somali (Kenya)", + "so_SO": "somali (Somàlia)", + "sq": "albanès", + "sq_AL": "albanès (Albània)", + "sq_MK": "albanès (Macedònia)", + "sq_XK": "albanès (Kosovo)", + "sr": "serbi", + "sr_BA": "serbi (Bòsnia i Hercegovina)", + "sr_Cyrl": "serbi (ciríl·lic)", + "sr_Cyrl_BA": "serbi (ciríl·lic, Bòsnia i Hercegovina)", + "sr_Cyrl_ME": "serbi (ciríl·lic, Montenegro)", + "sr_Cyrl_RS": "serbi (ciríl·lic, Sèrbia)", + "sr_Cyrl_XK": "serbi (ciríl·lic, Kosovo)", + "sr_Latn": "serbi (llatí)", + "sr_Latn_BA": "serbi (llatí, Bòsnia i Hercegovina)", + "sr_Latn_ME": "serbi (llatí, Montenegro)", + "sr_Latn_RS": "serbi (llatí, Sèrbia)", + "sr_Latn_XK": "serbi (llatí, Kosovo)", + "sr_ME": "serbi (Montenegro)", + "sr_RS": "serbi (Sèrbia)", + "sr_XK": "serbi (Kosovo)", + "sv": "suec", + "sv_AX": "suec (Illes Ã…land)", + "sv_FI": "suec (Finlàndia)", + "sv_SE": "suec (Suècia)", + "sw": "suahili", + "sw_CD": "suahili (Congo - Kinshasa)", + "sw_KE": "suahili (Kenya)", + "sw_TZ": "suahili (Tanzània)", + "sw_UG": "suahili (Uganda)", + "ta": "tàmil", + "ta_IN": "tàmil (Ãndia)", + "ta_LK": "tàmil (Sri Lanka)", + "ta_MY": "tàmil (Malàisia)", + "ta_SG": "tàmil (Singapur)", + "te": "telugu", + "te_IN": "telugu (Ãndia)", + "th": "tailandès", + "th_TH": "tailandès (Tailàndia)", + "ti": "tigrinya", + "ti_ER": "tigrinya (Eritrea)", + "ti_ET": "tigrinya (Etiòpia)", + "tl": "tagal", + "tl_PH": "tagal (Filipines)", + "to": "tongalès", + "to_TO": "tongalès (Tonga)", + "tr": "turc", + "tr_CY": "turc (Xipre)", + "tr_TR": "turc (Turquia)", + "ug": "uigur", + "ug_CN": "uigur (Xina)", + "uk": "ucraïnès", + "uk_UA": "ucraïnès (Ucraïna)", + "ur": "urdú", + "ur_IN": "urdú (Ãndia)", + "ur_PK": "urdú (Pakistan)", + "uz": "uzbek", + "uz_AF": "uzbek (Afganistan)", + "uz_Arab": "uzbek (àrab)", + "uz_Arab_AF": "uzbek (àrab, Afganistan)", + "uz_Cyrl": "uzbek (ciríl·lic)", + "uz_Cyrl_UZ": "uzbek (ciríl·lic, Uzbekistan)", + "uz_Latn": "uzbek (llatí)", + "uz_Latn_UZ": "uzbek (llatí, Uzbekistan)", + "uz_UZ": "uzbek (Uzbekistan)", + "vi": "vietnamita", + "vi_VN": "vietnamita (Vietnam)", + "yi": "jiddisch", + "yo": "ioruba", + "yo_BJ": "ioruba (Benín)", + "yo_NG": "ioruba (Nigèria)", + "zh": "xinès", + "zh_CN": "xinès (Xina)", + "zh_HK": "xinès (Hong Kong (RAE Xina))", + "zh_Hans": "xinès (simplificat)", + "zh_Hans_CN": "xinès (simplificat, Xina)", + "zh_Hans_HK": "xinès (simplificat, Hong Kong (RAE Xina))", + "zh_Hans_MO": "xinès (simplificat, Macau (RAE Xina))", + "zh_Hans_SG": "xinès (simplificat, Singapur)", + "zh_Hant": "xinès (tradicional)", + "zh_Hant_HK": "xinès (tradicional, Hong Kong (RAE Xina))", + "zh_Hant_MO": "xinès (tradicional, Macau (RAE Xina))", + "zh_Hant_TW": "xinès (tradicional, Taiwan)", + "zh_MO": "xinès (Macau (RAE Xina))", + "zh_SG": "xinès (Singapur)", + "zh_TW": "xinès (Taiwan)", + "zu": "zulu", + "zu_ZA": "zulu (República de Sud-àfrica)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ce.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ce.json new file mode 100644 index 0000000000000000000000000000000000000000..dcaf490a4f5212e8fd32378fcf035325d6a01c4e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ce.json @@ -0,0 +1,551 @@ +{ + "Names": { + "af": "африкаанÑ", + "af_NA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (Ðамиби)", + "af_ZA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (Къилба-Ðфрикин РеÑпублика)", + "ak": "акан", + "ak_GH": "акан (Гана)", + "am": "амхаройн", + "am_ET": "амхаройн (Эфиопи)", + "ar": "Ӏаьрбийн", + "ar_AE": "Ӏаьрбийн (Ӏарбийн Цхьанатоьхна Эмираташ)", + "ar_BH": "Ӏаьрбийн (Бахрейн)", + "ar_DJ": "Ӏаьрбийн (Джибути)", + "ar_DZ": "Ӏаьрбийн (Ðлжир)", + "ar_EG": "Ӏаьрбийн (МиÑар)", + "ar_EH": "Ӏаьрбийн (Малхбузен Саьхьара)", + "ar_ER": "Ӏаьрбийн (Эритрей)", + "ar_IL": "Ӏаьрбийн (Израиль)", + "ar_IQ": "Ӏаьрбийн (Ӏиракъ)", + "ar_JO": "Ӏаьрбийн (Урдан)", + "ar_KM": "Ӏаьрбийн (Комораш)", + "ar_KW": "Ӏаьрбийн (Кувейт)", + "ar_LB": "Ӏаьрбийн (Ливан)", + "ar_LY": "Ӏаьрбийн (Ливи)", + "ar_MA": "Ӏаьрбийн (Марокко)", + "ar_MR": "Ӏаьрбийн (Мавритани)", + "ar_OM": "Ӏаьрбийн (Оман)", + "ar_PS": "Ӏаьрбийн (ПалеÑтинан латтанаш)", + "ar_QA": "Ӏаьрбийн (Катар)", + "ar_SA": "Ӏаьрбийн (СаӀудийн Ðрави)", + "ar_SD": "Ӏаьрбийн (Судан)", + "ar_SO": "Ӏаьрбийн (Сомали)", + "ar_SS": "Ӏаьрбийн (Къилба Судан)", + "ar_SY": "Ӏаьрбийн (Шема)", + "ar_TD": "Ӏаьрбийн (Чад)", + "ar_TN": "Ӏаьрбийн (ТуниÑ)", + "ar_YE": "Ӏаьрбийн (Йемен)", + "as": "аÑÑамийн", + "as_IN": "аÑÑамийн (Инди)", + "az": "азербайджанийн", + "az_AZ": "азербайджанийн (Ðзербайджан)", + "az_Cyrl": "азербайджанийн (кириллица)", + "az_Cyrl_AZ": "азербайджанийн (кириллица, Ðзербайджан)", + "az_Latn": "азербайджанийн (латинан)", + "az_Latn_AZ": "азербайджанийн (латинан, Ðзербайджан)", + "be": "белоруÑийн", + "be_BY": "белоруÑийн (БелоруÑÑи)", + "bg": "болгарийн", + "bg_BG": "болгарийн (Болгари)", + "bm": "бамбара", + "bm_ML": "бамбара (Мали)", + "bn": "бенгалийн", + "bn_BD": "бенгалийн (Бангладеш)", + "bn_IN": "бенгалийн (Инди)", + "bo": "тибетхойн", + "bo_CN": "тибетхойн (Китай)", + "bo_IN": "тибетхойн (Инди)", + "br": "бретонийн", + "br_FR": "бретонийн (Франци)", + "bs": "боÑнийн", + "bs_BA": "боÑнийн (БоÑни а, Герцеговина а)", + "bs_Cyrl": "боÑнийн (кириллица)", + "bs_Cyrl_BA": "боÑнийн (кириллица, БоÑни а, Герцеговина а)", + "bs_Latn": "боÑнийн (латинан)", + "bs_Latn_BA": "боÑнийн (латинан, БоÑни а, Герцеговина а)", + "ca": "каталонийн", + "ca_AD": "каталонийн (Ðндорра)", + "ca_ES": "каталонийн (ИÑпани)", + "ca_FR": "каталонийн (Франци)", + "ca_IT": "каталонийн (Итали)", + "ce": "нохчийн", + "ce_RU": "нохчийн (РоÑÑи)", + "cs": "чехийн", + "cs_CZ": "чехийн (Чехи)", + "cy": "валлийн", + "cy_GB": "валлийн (Йоккха Британи)", + "da": "датхойн", + "da_DK": "датхойн (Дани)", + "da_GL": "датхойн (Гренланди)", + "de": "немцойн", + "de_AT": "немцойн (ÐвÑтри)", + "de_BE": "немцойн (Бельги)", + "de_CH": "немцойн (Швейцари)", + "de_DE": "немцойн (Германи)", + "de_IT": "немцойн (Итали)", + "de_LI": "немцойн (Лихтенштейн)", + "de_LU": "немцойн (ЛюкÑембург)", + "dz": "дзонг-кÑ", + "dz_BT": "дзонг-ÐºÑ (Бутан)", + "ee": "Ñве", + "ee_GH": "Ñве (Гана)", + "ee_TG": "Ñве (Того)", + "el": "грекийн", + "el_CY": "грекийн (Кипр)", + "el_GR": "грекийн (Греци)", + "en": "ингалÑан", + "en_AG": "ингалÑан (Ðнтигуа а, Барбуда а)", + "en_AI": "ингалÑан (ÐнгильÑ)", + "en_AS": "ингалÑан (Ðмерикан Самоа)", + "en_AT": "ингалÑан (ÐвÑтри)", + "en_AU": "ингалÑан (ÐвÑтрали)", + "en_BB": "ингалÑан (БарбадоÑ)", + "en_BE": "ингалÑан (Бельги)", + "en_BI": "ингалÑан (Бурунди)", + "en_BM": "ингалÑан (Бермудан гӀайренаш)", + "en_BS": "ингалÑан (Багаман гӀайренаш)", + "en_BW": "ингалÑан (БотÑвана)", + "en_BZ": "ингалÑан (Белиз)", + "en_CA": "ингалÑан (Канада)", + "en_CC": "ингалÑан (КокоÑийн гӀайренаш)", + "en_CH": "ингалÑан (Швейцари)", + "en_CK": "ингалÑан (Кукан гӀайренаш)", + "en_CM": "ингалÑан (Камерун)", + "en_CX": "ингалÑан (ГӀайре ÓиÑа пайхÓамар вина де)", + "en_CY": "ингалÑан (Кипр)", + "en_DE": "ингалÑан (Германи)", + "en_DG": "ингалÑан (Диего-ГарÑи)", + "en_DK": "ингалÑан (Дани)", + "en_DM": "ингалÑан (Доминика)", + "en_ER": "ингалÑан (Эритрей)", + "en_FI": "ингалÑан (ФинлÑнди)", + "en_FJ": "ингалÑан (Фиджи)", + "en_FK": "ингалÑан (Фолклендан гӀайренаш)", + "en_FM": "ингалÑан (Микронезин Федеративни штаташ)", + "en_GB": "ингалÑан (Йоккха Британи)", + "en_GD": "ингалÑан (Гренада)", + "en_GG": "ингалÑан (ГернÑи)", + "en_GH": "ингалÑан (Гана)", + "en_GI": "ингалÑан (Гибралтар)", + "en_GM": "ингалÑан (Гамби)", + "en_GU": "ингалÑан (Гуам)", + "en_GY": "ингалÑан (Гайана)", + "en_HK": "ингалÑан (Гонконг (ша-къаьÑтина кӀошт))", + "en_IE": "ингалÑан (Ирланди)", + "en_IL": "ингалÑан (Израиль)", + "en_IM": "ингалÑан (МÑн гӀайре)", + "en_IN": "ингалÑан (Инди)", + "en_IO": "ингалÑан (Британин латта Индин океанехь)", + "en_JE": "ингалÑан (ДжерÑи)", + "en_JM": "ингалÑан (Ямайка)", + "en_KE": "ингалÑан (Кени)", + "en_KI": "ингалÑан (Кирибати)", + "en_KN": "ингалÑан (Сент-ÐšÐ¸Ñ‚Ñ Ð°, ÐÐµÐ²Ð¸Ñ Ð°)", + "en_KY": "ингалÑан (Кайман гӀайренаш)", + "en_LC": "ингалÑан (Сент-ЛюÑи)", + "en_LR": "ингалÑан (Либери)", + "en_LS": "ингалÑан (ЛеÑото)", + "en_MG": "ингалÑан (МадагаÑкар)", + "en_MH": "ингалÑан (Маршаллан гӀайренаш)", + "en_MO": "ингалÑан (Макао (ша-къаьÑтина кӀошт))", + "en_MP": "ингалÑан (КъилбаÑеда Марианан гӀайренаш)", + "en_MS": "ингалÑан (МонтÑеррат)", + "en_MT": "ингалÑан (Мальта)", + "en_MU": "ингалÑан (Маврики)", + "en_MW": "ингалÑан (Малави)", + "en_MY": "ингалÑан (Малайзи)", + "en_NA": "ингалÑан (Ðамиби)", + "en_NF": "ингалÑан (Ðорфолк гӀайре)", + "en_NG": "ингалÑан (Ðигери)", + "en_NL": "ингалÑан (Ðидерландаш)", + "en_NR": "ингалÑан (Ðауру)", + "en_NU": "ингалÑан (ÐиуÑ)", + "en_NZ": "ингалÑан (Керла Зеланди)", + "en_PG": "ингалÑан (Папуа — Керла Гвиней)", + "en_PH": "ингалÑан (Филиппинаш)", + "en_PK": "ингалÑан (ПакиÑтан)", + "en_PN": "ингалÑан (ПиткÑрн гӀайренаш)", + "en_PR": "ингалÑан (ПуÑрто-Рико)", + "en_PW": "ингалÑан (Палау)", + "en_RW": "ингалÑан (Руанда)", + "en_SB": "ингалÑан (Соломонан гӀайренаш)", + "en_SC": "ингалÑан (Сейшелан гӀайренаш)", + "en_SD": "ингалÑан (Судан)", + "en_SE": "ингалÑан (Швеци)", + "en_SG": "ингалÑан (Сингапур)", + "en_SH": "ингалÑан (Сийлахьчу Еленин гӀайре)", + "en_SI": "ингалÑан (Словени)", + "en_SL": "ингалÑан (Сьерра- Леоне)", + "en_SS": "ингалÑан (Къилба Судан)", + "en_SX": "ингалÑан (Синт-Мартен)", + "en_SZ": "ингалÑан (Свазиленд)", + "en_TC": "ингалÑан (Ð¢Ñ‘Ñ€ÐºÑ Ð°, ÐšÐ°Ð¹ÐºÐ¾Ñ Ð° гӀайренаш)", + "en_TK": "ингалÑан (Токелау)", + "en_TO": "ингалÑан (Тонга)", + "en_TT": "ингалÑан (Тринидад а, Тобаго а)", + "en_TV": "ингалÑан (Тувалу)", + "en_TZ": "ингалÑан (Танзани)", + "en_UG": "ингалÑан (Уганда)", + "en_UM": "ингалÑан (ÐЦШн арахьара кегийн гӀайренаш)", + "en_US": "ингалÑан (Цхьанатоьхна Штаташ)", + "en_VC": "ингалÑан (Сент-ВинÑент а, Гренадинаш а)", + "en_VG": "ингалÑан (Виргинийн гӀайренаш (Британи))", + "en_VI": "ингалÑан (Виргинийн гӀайренаш (ÐЦШ))", + "en_VU": "ингалÑан (Вануату)", + "en_WS": "ингалÑан (Самоа)", + "en_ZA": "ингалÑан (Къилба-Ðфрикин РеÑпублика)", + "en_ZM": "ингалÑан (Замби)", + "en_ZW": "ингалÑан (Зимбабве)", + "eo": "ÑÑперанто", + "es": "иÑпанхойн", + "es_AR": "иÑпанхойн (Ðргентина)", + "es_BO": "иÑпанхойн (Боливи)", + "es_BR": "иÑпанхойн (Бразили)", + "es_CL": "иÑпанхойн (Чили)", + "es_CO": "иÑпанхойн (Колумби)", + "es_CR": "иÑпанхойн (КоÑта-Рика)", + "es_CU": "иÑпанхойн (Куба)", + "es_DO": "иÑпанхойн (Доминикан РеÑпублика)", + "es_EA": "иÑпанхойн (Сеута а, ÐœÐµÐ»Ð¸Ð»ÑŒÑ Ð°)", + "es_EC": "иÑпанхойн (Эквадор)", + "es_ES": "иÑпанхойн (ИÑпани)", + "es_GQ": "иÑпанхойн (Экваторан Гвиней)", + "es_GT": "иÑпанхойн (Гватемала)", + "es_HN": "иÑпанхойн (ГондураÑ)", + "es_IC": "иÑпанхойн (Канаран гӀайренаш)", + "es_MX": "иÑпанхойн (МекÑика)", + "es_NI": "иÑпанхойн (Ðикарагуа)", + "es_PA": "иÑпанхойн (Панама)", + "es_PE": "иÑпанхойн (Перу)", + "es_PH": "иÑпанхойн (Филиппинаш)", + "es_PR": "иÑпанхойн (ПуÑрто-Рико)", + "es_PY": "иÑпанхойн (Парагвай)", + "es_SV": "иÑпанхойн (Сальвадор)", + "es_US": "иÑпанхойн (Цхьанатоьхна Штаташ)", + "es_UY": "иÑпанхойн (Уругвай)", + "es_VE": "иÑпанхойн (ВенеÑуÑла)", + "et": "ÑÑтонийн", + "et_EE": "ÑÑтонийн (ЭÑтони)", + "eu": "баÑкийн", + "eu_ES": "баÑкийн (ИÑпани)", + "fa": "гӀажарийн", + "fa_AF": "гӀажарийн (ОвхӀан-пачхьалкх)", + "fa_IR": "гӀажарийн (ГӀажарийчоь)", + "fi": "финнийн", + "fi_FI": "финнийн (ФинлÑнди)", + "fo": "фарерийн", + "fo_DK": "фарерийн (Дани)", + "fo_FO": "фарерийн (Фарерийн гӀайренаш)", + "fr": "французийн", + "fr_BE": "французийн (Бельги)", + "fr_BF": "французийн (Буркина- ФаÑо)", + "fr_BI": "французийн (Бурунди)", + "fr_BJ": "французийн (Бенин)", + "fr_BL": "французийн (Сен-Бартельми)", + "fr_CA": "французийн (Канада)", + "fr_CD": "французийн (Демократин РеÑпублика Конго)", + "fr_CF": "французийн (Юккъерчу Ðфрикин РеÑпублика)", + "fr_CG": "французийн (РеÑпублика Конго)", + "fr_CH": "французийн (Швейцари)", + "fr_CI": "французийн (Кот-Д’ивуар)", + "fr_CM": "французийн (Камерун)", + "fr_DJ": "французийн (Джибути)", + "fr_DZ": "французийн (Ðлжир)", + "fr_FR": "французийн (Франци)", + "fr_GA": "французийн (Габон)", + "fr_GF": "французийн (Французийн Гвиана)", + "fr_GN": "французийн (Гвиней)", + "fr_GP": "французийн (Гваделупа)", + "fr_GQ": "французийн (Экваторан Гвиней)", + "fr_HT": "французийн (Гаити)", + "fr_KM": "французийн (Комораш)", + "fr_LU": "французийн (ЛюкÑембург)", + "fr_MA": "французийн (Марокко)", + "fr_MC": "французийн (Монако)", + "fr_MF": "французийн (Сен-Мартен)", + "fr_MG": "французийн (МадагаÑкар)", + "fr_ML": "французийн (Мали)", + "fr_MQ": "французийн (Мартиника)", + "fr_MR": "французийн (Мавритани)", + "fr_MU": "французийн (Маврики)", + "fr_NC": "французийн (Керла Каледони)", + "fr_NE": "французийн (Ðигер)", + "fr_PF": "французийн (Французийн Полинези)", + "fr_PM": "французийн (Сен-Пьер а, Микелон а)", + "fr_RE": "французийн (Реюньон)", + "fr_RW": "французийн (Руанда)", + "fr_SC": "французийн (Сейшелан гӀайренаш)", + "fr_SN": "французийн (Сенегал)", + "fr_SY": "французийн (Шема)", + "fr_TD": "французийн (Чад)", + "fr_TG": "французийн (Того)", + "fr_TN": "французийн (ТуниÑ)", + "fr_VU": "французийн (Вануату)", + "fr_WF": "французийн (Ð£Ð¾Ð»Ð»Ð¸Ñ Ð°, Футуна а)", + "fr_YT": "французийн (Майотта)", + "fy": "малхбузен-фризийн", + "fy_NL": "малхбузен-фризийн (Ðидерландаш)", + "ga": "ирландхойн", + "ga_IE": "ирландхойн (Ирланди)", + "gl": "галиÑийн", + "gl_ES": "галиÑийн (ИÑпани)", + "gu": "гуджарати", + "gu_IN": "гуджарати (Инди)", + "gv": "мÑнийн", + "gv_IM": "мÑнийн (МÑн гӀайре)", + "ha": "хауÑа", + "ha_GH": "хауÑа (Гана)", + "ha_NE": "хауÑа (Ðигер)", + "ha_NG": "хауÑа (Ðигери)", + "he": "жугтийн", + "he_IL": "жугтийн (Израиль)", + "hi": "хинди", + "hi_IN": "хинди (Инди)", + "hr": "хорватийн", + "hr_BA": "хорватийн (БоÑни а, Герцеговина а)", + "hr_HR": "хорватийн (Хорвати)", + "hu": "венгрийн", + "hu_HU": "венгрийн (Венгри)", + "hy": "Ñрмалойн", + "hy_AM": "Ñрмалойн (Эрмалойчоь)", + "id": "индонезихойн", + "id_ID": "индонезихойн (Индонези)", + "ig": "игбо", + "ig_NG": "игбо (Ðигери)", + "ii": "Ñычуань", + "ii_CN": "Ñычуань (Китай)", + "is": "иÑландхойн", + "is_IS": "иÑландхойн (ИÑланди)", + "it": "итальÑнийн", + "it_CH": "итальÑнийн (Швейцари)", + "it_IT": "итальÑнийн (Итали)", + "it_SM": "итальÑнийн (Сан-Марино)", + "ja": "Ñпонийн", + "ja_JP": "Ñпонийн (Япони)", + "ka": "гуьржийн", + "ka_GE": "гуьржийн (Гуьржийчоь)", + "ki": "кикуйю", + "ki_KE": "кикуйю (Кени)", + "kk": "казахийн", + "kk_KZ": "казахийн (КазахÑтан)", + "kl": "гренландхойн", + "kl_GL": "гренландхойн (Гренланди)", + "km": "кхмерийн", + "km_KH": "кхмерийн (Камбоджа)", + "kn": "каннада", + "kn_IN": "каннада (Инди)", + "ko": "корейн", + "ko_KP": "корейн (КъилбаÑеда Корей)", + "ko_KR": "корейн (Къилба Корей)", + "ks": "кашмири", + "ks_IN": "кашмири (Инди)", + "kw": "корнуоллийн", + "kw_GB": "корнуоллийн (Йоккха Британи)", + "ky": "гӀиргӀизойн", + "ky_KG": "гӀиргӀизойн (Киргизи)", + "lb": "люкÑембургхойн", + "lb_LU": "люкÑембургхойн (ЛюкÑембург)", + "lg": "ганда", + "lg_UG": "ганда (Уганда)", + "ln": "лингала", + "ln_AO": "лингала (Ðнгола)", + "ln_CD": "лингала (Демократин РеÑпублика Конго)", + "ln_CF": "лингала (Юккъерчу Ðфрикин РеÑпублика)", + "ln_CG": "лингала (РеÑпублика Конго)", + "lo": "лаоÑÑийн", + "lo_LA": "лаоÑÑийн (ЛаоÑ)", + "lt": "литвахойн", + "lt_LT": "литвахойн (Литва)", + "lu": "луба-катанга", + "lu_CD": "луба-катанга (Демократин РеÑпублика Конго)", + "lv": "латышийн", + "lv_LV": "латышийн (Латви)", + "mg": "малагаÑийн", + "mg_MG": "малагаÑийн (МадагаÑкар)", + "mk": "македонхойн", + "mk_MK": "македонхойн (Македони)", + "ml": "малаÑлам", + "ml_IN": "малаÑлам (Инди)", + "mn": "монголийн", + "mn_MN": "монголийн (Монголи)", + "mr": "маратхи", + "mr_IN": "маратхи (Инди)", + "ms": "малайн", + "ms_BN": "малайн (Бруней-ДаруÑÑалам)", + "ms_MY": "малайн (Малайзи)", + "ms_SG": "малайн (Сингапур)", + "mt": "мальтойн", + "mt_MT": "мальтойн (Мальта)", + "my": "бирманийн", + "my_MM": "бирманийн (МьÑнма (Бирма))", + "nb": "норвегийн букмол", + "nb_NO": "норвегийн букмол (Ðорвеги)", + "nb_SJ": "норвегийн букмол (Шпицберген а, Ян-Майен а)", + "nd": "къилбаÑеда ндебели", + "nd_ZW": "къилбаÑеда ндебели (Зимбабве)", + "ne": "непалхойн", + "ne_IN": "непалхойн (Инди)", + "ne_NP": "непалхойн (Ðепал)", + "nl": "голландхойн", + "nl_AW": "голландхойн (Ðруба)", + "nl_BE": "голландхойн (Бельги)", + "nl_BQ": "голландхойн (БонÑйр, Синт-ЭÑÑ‚Ð°Ñ‚Ð¸ÑƒÑ Ð°, Саба а)", + "nl_CW": "голландхойн (КюраÑао)", + "nl_NL": "голландхойн (Ðидерландаш)", + "nl_SR": "голландхойн (Суринам)", + "nl_SX": "голландхойн (Синт-Мартен)", + "nn": "норвегийн нюнорÑк", + "nn_NO": "норвегийн нюнорÑк (Ðорвеги)", + "om": "оромо", + "om_ET": "оромо (Эфиопи)", + "om_KE": "оромо (Кени)", + "or": "ори", + "or_IN": "ори (Инди)", + "pa": "панджаби", + "pa_Arab": "панджаби (Ӏаьрбийн)", + "pa_Arab_PK": "панджаби (Ӏаьрбийн, ПакиÑтан)", + "pa_Guru": "панджаби (гурмукхи)", + "pa_Guru_IN": "панджаби (гурмукхи, Инди)", + "pa_IN": "панджаби (Инди)", + "pa_PK": "панджаби (ПакиÑтан)", + "pl": "полÑкийн", + "pl_PL": "полÑкийн (Польша)", + "ps": "пушту", + "ps_AF": "пушту (ОвхӀан-пачхьалкх)", + "pt": "португалихойн", + "pt_AO": "португалихойн (Ðнгола)", + "pt_BR": "португалихойн (Бразили)", + "pt_CH": "португалихойн (Швейцари)", + "pt_CV": "португалихойн (Кабо-Верде)", + "pt_GQ": "португалихойн (Экваторан Гвиней)", + "pt_GW": "португалихойн (Гвиней-БиÑау)", + "pt_LU": "португалихойн (ЛюкÑембург)", + "pt_MO": "португалихойн (Макао (ша-къаьÑтина кӀошт))", + "pt_MZ": "португалихойн (Мозамбик)", + "pt_PT": "португалихойн (Португали)", + "pt_ST": "португалихойн (Сан-Томе а, ПринÑипи а)", + "pt_TL": "португалихойн (Малхбален Тимор)", + "qu": "кечуа", + "qu_BO": "кечуа (Боливи)", + "qu_EC": "кечуа (Эквадор)", + "qu_PE": "кечуа (Перу)", + "rm": "романшийн", + "rm_CH": "романшийн (Швейцари)", + "rn": "рунди", + "rn_BI": "рунди (Бурунди)", + "ro": "румынийн", + "ro_MD": "румынийн (Молдави)", + "ro_RO": "румынийн (Румыни)", + "ru": "оьрÑийн", + "ru_BY": "оьрÑийн (БелоруÑÑи)", + "ru_KG": "оьрÑийн (Киргизи)", + "ru_KZ": "оьрÑийн (КазахÑтан)", + "ru_MD": "оьрÑийн (Молдави)", + "ru_RU": "оьрÑийн (РоÑÑи)", + "ru_UA": "оьрÑийн (Украина)", + "rw": "киньÑруанда", + "rw_RW": "киньÑруанда (Руанда)", + "se": "къилбаÑеда Ñаамийн", + "se_FI": "къилбаÑеда Ñаамийн (ФинлÑнди)", + "se_NO": "къилбаÑеда Ñаамийн (Ðорвеги)", + "se_SE": "къилбаÑеда Ñаамийн (Швеци)", + "sg": "Ñанго", + "sg_CF": "Ñанго (Юккъерчу Ðфрикин РеÑпублика)", + "si": "Ñингалхойн", + "si_LK": "Ñингалхойн (Шри-Ланка)", + "sk": "Ñловакийн", + "sk_SK": "Ñловакийн (Словаки)", + "sl": "Ñловенийн", + "sl_SI": "Ñловенийн (Словени)", + "sn": "шона", + "sn_ZW": "шона (Зимбабве)", + "so": "Ñомали", + "so_DJ": "Ñомали (Джибути)", + "so_ET": "Ñомали (Эфиопи)", + "so_KE": "Ñомали (Кени)", + "so_SO": "Ñомали (Сомали)", + "sq": "албанойн", + "sq_AL": "албанойн (Ðлбани)", + "sq_MK": "албанойн (Македони)", + "sq_XK": "албанойн (КоÑово)", + "sr": "Ñербийн", + "sr_BA": "Ñербийн (БоÑни а, Герцеговина а)", + "sr_Cyrl": "Ñербийн (кириллица)", + "sr_Cyrl_BA": "Ñербийн (кириллица, БоÑни а, Герцеговина а)", + "sr_Cyrl_ME": "Ñербийн (кириллица, Ӏаьржаламанхойчоь)", + "sr_Cyrl_RS": "Ñербийн (кириллица, Серби)", + "sr_Cyrl_XK": "Ñербийн (кириллица, КоÑово)", + "sr_Latn": "Ñербийн (латинан)", + "sr_Latn_BA": "Ñербийн (латинан, БоÑни а, Герцеговина а)", + "sr_Latn_ME": "Ñербийн (латинан, Ӏаьржаламанхойчоь)", + "sr_Latn_RS": "Ñербийн (латинан, Серби)", + "sr_Latn_XK": "Ñербийн (латинан, КоÑово)", + "sr_ME": "Ñербийн (Ӏаьржаламанхойчоь)", + "sr_RS": "Ñербийн (Серби)", + "sr_XK": "Ñербийн (КоÑово)", + "sv": "шведийн", + "sv_AX": "шведийн (Ðландан гӀайренаш)", + "sv_FI": "шведийн (ФинлÑнди)", + "sv_SE": "шведийн (Швеци)", + "sw": "Ñуахили", + "sw_CD": "Ñуахили (Демократин РеÑпублика Конго)", + "sw_KE": "Ñуахили (Кени)", + "sw_TZ": "Ñуахили (Танзани)", + "sw_UG": "Ñуахили (Уганда)", + "ta": "тамилхойн", + "ta_IN": "тамилхойн (Инди)", + "ta_LK": "тамилхойн (Шри-Ланка)", + "ta_MY": "тамилхойн (Малайзи)", + "ta_SG": "тамилхойн (Сингапур)", + "te": "телугу", + "te_IN": "телугу (Инди)", + "th": "тайн", + "th_TH": "тайн (Таиланд)", + "ti": "тигриньÑ", + "ti_ER": "Ñ‚Ð¸Ð³Ñ€Ð¸Ð½ÑŒÑ (Эритрей)", + "ti_ET": "Ñ‚Ð¸Ð³Ñ€Ð¸Ð½ÑŒÑ (Эфиопи)", + "to": "тонганийн", + "to_TO": "тонганийн (Тонга)", + "tr": "туркойн", + "tr_CY": "туркойн (Кипр)", + "tr_TR": "туркойн (Туркойчоь)", + "ug": "уйгурийн", + "ug_CN": "уйгурийн (Китай)", + "uk": "украинийн", + "uk_UA": "украинийн (Украина)", + "ur": "урду", + "ur_IN": "урду (Инди)", + "ur_PK": "урду (ПакиÑтан)", + "uz": "узбекийн", + "uz_AF": "узбекийн (ОвхӀан-пачхьалкх)", + "uz_Arab": "узбекийн (Ӏаьрбийн)", + "uz_Arab_AF": "узбекийн (Ӏаьрбийн, ОвхӀан-пачхьалкх)", + "uz_Cyrl": "узбекийн (кириллица)", + "uz_Cyrl_UZ": "узбекийн (кириллица, УзбекиÑтан)", + "uz_Latn": "узбекийн (латинан)", + "uz_Latn_UZ": "узбекийн (латинан, УзбекиÑтан)", + "uz_UZ": "узбекийн (УзбекиÑтан)", + "vi": "вьетнамхойн", + "vi_VN": "вьетнамхойн (Вьетнам)", + "yo": "йоруба", + "yo_BJ": "йоруба (Бенин)", + "yo_NG": "йоруба (Ðигери)", + "zh": "китайн", + "zh_CN": "китайн (Китай)", + "zh_HK": "китайн (Гонконг (ша-къаьÑтина кӀошт))", + "zh_Hans": "китайн (атта китайн)", + "zh_Hans_CN": "китайн (атта китайн, Китай)", + "zh_Hans_HK": "китайн (атта китайн, Гонконг (ша-къаьÑтина кӀошт))", + "zh_Hans_MO": "китайн (атта китайн, Макао (ша-къаьÑтина кӀошт))", + "zh_Hans_SG": "китайн (атта китайн, Сингапур)", + "zh_Hant": "китайн (ламаÑтан китайн)", + "zh_Hant_HK": "китайн (ламаÑтан китайн, Гонконг (ша-къаьÑтина кӀошт))", + "zh_Hant_MO": "китайн (ламаÑтан китайн, Макао (ша-къаьÑтина кӀошт))", + "zh_Hant_TW": "китайн (ламаÑтан китайн, Тайвань)", + "zh_MO": "китайн (Макао (ша-къаьÑтина кӀошт))", + "zh_SG": "китайн (Сингапур)", + "zh_TW": "китайн (Тайвань)", + "zu": "зулу", + "zu_ZA": "зулу (Къилба-Ðфрикин РеÑпублика)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/cs.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/cs.json new file mode 100644 index 0000000000000000000000000000000000000000..e067c33130ee4fb1c5b4ee21bbe3617492eb5506 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/cs.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikánÅ¡tina", + "af_NA": "afrikánÅ¡tina (Namibie)", + "af_ZA": "afrikánÅ¡tina (Jihoafrická republika)", + "ak": "akanÅ¡tina", + "ak_GH": "akanÅ¡tina (Ghana)", + "am": "amharÅ¡tina", + "am_ET": "amharÅ¡tina (Etiopie)", + "ar": "arabÅ¡tina", + "ar_AE": "arabÅ¡tina (Spojené arabské emiráty)", + "ar_BH": "arabÅ¡tina (Bahrajn)", + "ar_DJ": "arabÅ¡tina (Džibutsko)", + "ar_DZ": "arabÅ¡tina (Alžírsko)", + "ar_EG": "arabÅ¡tina (Egypt)", + "ar_EH": "arabÅ¡tina (Západní Sahara)", + "ar_ER": "arabÅ¡tina (Eritrea)", + "ar_IL": "arabÅ¡tina (Izrael)", + "ar_IQ": "arabÅ¡tina (Irák)", + "ar_JO": "arabÅ¡tina (Jordánsko)", + "ar_KM": "arabÅ¡tina (Komory)", + "ar_KW": "arabÅ¡tina (Kuvajt)", + "ar_LB": "arabÅ¡tina (Libanon)", + "ar_LY": "arabÅ¡tina (Libye)", + "ar_MA": "arabÅ¡tina (Maroko)", + "ar_MR": "arabÅ¡tina (Mauritánie)", + "ar_OM": "arabÅ¡tina (Omán)", + "ar_PS": "arabÅ¡tina (Palestinská území)", + "ar_QA": "arabÅ¡tina (Katar)", + "ar_SA": "arabÅ¡tina (Saúdská Arábie)", + "ar_SD": "arabÅ¡tina (Súdán)", + "ar_SO": "arabÅ¡tina (Somálsko)", + "ar_SS": "arabÅ¡tina (Jižní Súdán)", + "ar_SY": "arabÅ¡tina (Sýrie)", + "ar_TD": "arabÅ¡tina (ÄŒad)", + "ar_TN": "arabÅ¡tina (Tunisko)", + "ar_YE": "arabÅ¡tina (Jemen)", + "as": "ásámÅ¡tina", + "as_IN": "ásámÅ¡tina (Indie)", + "az": "ázerbájdžánÅ¡tina", + "az_AZ": "ázerbájdžánÅ¡tina (Ãzerbájdžán)", + "az_Cyrl": "ázerbájdžánÅ¡tina (cyrilice)", + "az_Cyrl_AZ": "ázerbájdžánÅ¡tina (cyrilice, Ãzerbájdžán)", + "az_Latn": "ázerbájdžánÅ¡tina (latinka)", + "az_Latn_AZ": "ázerbájdžánÅ¡tina (latinka, Ãzerbájdžán)", + "be": "bÄ›loruÅ¡tina", + "be_BY": "bÄ›loruÅ¡tina (BÄ›lorusko)", + "bg": "bulharÅ¡tina", + "bg_BG": "bulharÅ¡tina (Bulharsko)", + "bm": "bambarÅ¡tina", + "bm_ML": "bambarÅ¡tina (Mali)", + "bn": "bengálÅ¡tina", + "bn_BD": "bengálÅ¡tina (Bangladéš)", + "bn_IN": "bengálÅ¡tina (Indie)", + "bo": "tibetÅ¡tina", + "bo_CN": "tibetÅ¡tina (Čína)", + "bo_IN": "tibetÅ¡tina (Indie)", + "br": "bretonÅ¡tina", + "br_FR": "bretonÅ¡tina (Francie)", + "bs": "bosenÅ¡tina", + "bs_BA": "bosenÅ¡tina (Bosna a Hercegovina)", + "bs_Cyrl": "bosenÅ¡tina (cyrilice)", + "bs_Cyrl_BA": "bosenÅ¡tina (cyrilice, Bosna a Hercegovina)", + "bs_Latn": "bosenÅ¡tina (latinka)", + "bs_Latn_BA": "bosenÅ¡tina (latinka, Bosna a Hercegovina)", + "ca": "katalánÅ¡tina", + "ca_AD": "katalánÅ¡tina (Andorra)", + "ca_ES": "katalánÅ¡tina (Å panÄ›lsko)", + "ca_FR": "katalánÅ¡tina (Francie)", + "ca_IT": "katalánÅ¡tina (Itálie)", + "ce": "ÄeÄenÅ¡tina", + "ce_RU": "ÄeÄenÅ¡tina (Rusko)", + "cs": "ÄeÅ¡tina", + "cs_CZ": "ÄeÅ¡tina (ÄŒeská republika)", + "cy": "velÅ¡tina", + "cy_GB": "velÅ¡tina (Spojené království)", + "da": "dánÅ¡tina", + "da_DK": "dánÅ¡tina (Dánsko)", + "da_GL": "dánÅ¡tina (Grónsko)", + "de": "nÄ›mÄina", + "de_AT": "nÄ›mÄina (Rakousko)", + "de_BE": "nÄ›mÄina (Belgie)", + "de_CH": "nÄ›mÄina (Å výcarsko)", + "de_DE": "nÄ›mÄina (NÄ›mecko)", + "de_IT": "nÄ›mÄina (Itálie)", + "de_LI": "nÄ›mÄina (LichtenÅ¡tejnsko)", + "de_LU": "nÄ›mÄina (Lucembursko)", + "dz": "dzongkä", + "dz_BT": "dzongkä (Bhútán)", + "ee": "eweÅ¡tina", + "ee_GH": "eweÅ¡tina (Ghana)", + "ee_TG": "eweÅ¡tina (Togo)", + "el": "Å™eÄtina", + "el_CY": "Å™eÄtina (Kypr)", + "el_GR": "Å™eÄtina (Řecko)", + "en": "angliÄtina", + "en_AG": "angliÄtina (Antigua a Barbuda)", + "en_AI": "angliÄtina (Anguilla)", + "en_AS": "angliÄtina (Americká Samoa)", + "en_AT": "angliÄtina (Rakousko)", + "en_AU": "angliÄtina (Austrálie)", + "en_BB": "angliÄtina (Barbados)", + "en_BE": "angliÄtina (Belgie)", + "en_BI": "angliÄtina (Burundi)", + "en_BM": "angliÄtina (Bermudy)", + "en_BS": "angliÄtina (Bahamy)", + "en_BW": "angliÄtina (Botswana)", + "en_BZ": "angliÄtina (Belize)", + "en_CA": "angliÄtina (Kanada)", + "en_CC": "angliÄtina (Kokosové ostrovy)", + "en_CH": "angliÄtina (Å výcarsko)", + "en_CK": "angliÄtina (Cookovy ostrovy)", + "en_CM": "angliÄtina (Kamerun)", + "en_CX": "angliÄtina (VánoÄní ostrov)", + "en_CY": "angliÄtina (Kypr)", + "en_DE": "angliÄtina (NÄ›mecko)", + "en_DG": "angliÄtina (Diego García)", + "en_DK": "angliÄtina (Dánsko)", + "en_DM": "angliÄtina (Dominika)", + "en_ER": "angliÄtina (Eritrea)", + "en_FI": "angliÄtina (Finsko)", + "en_FJ": "angliÄtina (Fidži)", + "en_FK": "angliÄtina (Falklandské ostrovy)", + "en_FM": "angliÄtina (Mikronésie)", + "en_GB": "angliÄtina (Spojené království)", + "en_GD": "angliÄtina (Grenada)", + "en_GG": "angliÄtina (Guernsey)", + "en_GH": "angliÄtina (Ghana)", + "en_GI": "angliÄtina (Gibraltar)", + "en_GM": "angliÄtina (Gambie)", + "en_GU": "angliÄtina (Guam)", + "en_GY": "angliÄtina (Guyana)", + "en_HK": "angliÄtina (Hongkong – ZAO Číny)", + "en_IE": "angliÄtina (Irsko)", + "en_IL": "angliÄtina (Izrael)", + "en_IM": "angliÄtina (Ostrov Man)", + "en_IN": "angliÄtina (Indie)", + "en_IO": "angliÄtina (Britské indickooceánské území)", + "en_JE": "angliÄtina (Jersey)", + "en_JM": "angliÄtina (Jamajka)", + "en_KE": "angliÄtina (Keňa)", + "en_KI": "angliÄtina (Kiribati)", + "en_KN": "angliÄtina (Svatý KryÅ¡tof a Nevis)", + "en_KY": "angliÄtina (Kajmanské ostrovy)", + "en_LC": "angliÄtina (Svatá Lucie)", + "en_LR": "angliÄtina (Libérie)", + "en_LS": "angliÄtina (Lesotho)", + "en_MG": "angliÄtina (Madagaskar)", + "en_MH": "angliÄtina (Marshallovy ostrovy)", + "en_MO": "angliÄtina (Macao – ZAO Číny)", + "en_MP": "angliÄtina (Severní Mariany)", + "en_MS": "angliÄtina (Montserrat)", + "en_MT": "angliÄtina (Malta)", + "en_MU": "angliÄtina (Mauricius)", + "en_MW": "angliÄtina (Malawi)", + "en_MY": "angliÄtina (Malajsie)", + "en_NA": "angliÄtina (Namibie)", + "en_NF": "angliÄtina (Norfolk)", + "en_NG": "angliÄtina (Nigérie)", + "en_NL": "angliÄtina (Nizozemsko)", + "en_NR": "angliÄtina (Nauru)", + "en_NU": "angliÄtina (Niue)", + "en_NZ": "angliÄtina (Nový Zéland)", + "en_PG": "angliÄtina (Papua-Nová Guinea)", + "en_PH": "angliÄtina (Filipíny)", + "en_PK": "angliÄtina (Pákistán)", + "en_PN": "angliÄtina (Pitcairnovy ostrovy)", + "en_PR": "angliÄtina (Portoriko)", + "en_PW": "angliÄtina (Palau)", + "en_RW": "angliÄtina (Rwanda)", + "en_SB": "angliÄtina (Å alamounovy ostrovy)", + "en_SC": "angliÄtina (Seychely)", + "en_SD": "angliÄtina (Súdán)", + "en_SE": "angliÄtina (Å védsko)", + "en_SG": "angliÄtina (Singapur)", + "en_SH": "angliÄtina (Svatá Helena)", + "en_SI": "angliÄtina (Slovinsko)", + "en_SL": "angliÄtina (Sierra Leone)", + "en_SS": "angliÄtina (Jižní Súdán)", + "en_SX": "angliÄtina (Svatý Martin (Nizozemsko))", + "en_SZ": "angliÄtina (Svazijsko)", + "en_TC": "angliÄtina (Turks a Caicos)", + "en_TK": "angliÄtina (Tokelau)", + "en_TO": "angliÄtina (Tonga)", + "en_TT": "angliÄtina (Trinidad a Tobago)", + "en_TV": "angliÄtina (Tuvalu)", + "en_TZ": "angliÄtina (Tanzanie)", + "en_UG": "angliÄtina (Uganda)", + "en_UM": "angliÄtina (Menší odlehlé ostrovy USA)", + "en_US": "angliÄtina (Spojené státy)", + "en_VC": "angliÄtina (Svatý Vincenc a Grenadiny)", + "en_VG": "angliÄtina (Britské Panenské ostrovy)", + "en_VI": "angliÄtina (Americké Panenské ostrovy)", + "en_VU": "angliÄtina (Vanuatu)", + "en_WS": "angliÄtina (Samoa)", + "en_ZA": "angliÄtina (Jihoafrická republika)", + "en_ZM": "angliÄtina (Zambie)", + "en_ZW": "angliÄtina (Zimbabwe)", + "eo": "esperanto", + "es": "Å¡panÄ›lÅ¡tina", + "es_AR": "Å¡panÄ›lÅ¡tina (Argentina)", + "es_BO": "Å¡panÄ›lÅ¡tina (Bolívie)", + "es_BR": "Å¡panÄ›lÅ¡tina (Brazílie)", + "es_CL": "Å¡panÄ›lÅ¡tina (Chile)", + "es_CO": "Å¡panÄ›lÅ¡tina (Kolumbie)", + "es_CR": "Å¡panÄ›lÅ¡tina (Kostarika)", + "es_CU": "Å¡panÄ›lÅ¡tina (Kuba)", + "es_DO": "Å¡panÄ›lÅ¡tina (Dominikánská republika)", + "es_EA": "Å¡panÄ›lÅ¡tina (Ceuta a Melilla)", + "es_EC": "Å¡panÄ›lÅ¡tina (Ekvádor)", + "es_ES": "Å¡panÄ›lÅ¡tina (Å panÄ›lsko)", + "es_GQ": "Å¡panÄ›lÅ¡tina (Rovníková Guinea)", + "es_GT": "Å¡panÄ›lÅ¡tina (Guatemala)", + "es_HN": "Å¡panÄ›lÅ¡tina (Honduras)", + "es_IC": "Å¡panÄ›lÅ¡tina (Kanárské ostrovy)", + "es_MX": "Å¡panÄ›lÅ¡tina (Mexiko)", + "es_NI": "Å¡panÄ›lÅ¡tina (Nikaragua)", + "es_PA": "Å¡panÄ›lÅ¡tina (Panama)", + "es_PE": "Å¡panÄ›lÅ¡tina (Peru)", + "es_PH": "Å¡panÄ›lÅ¡tina (Filipíny)", + "es_PR": "Å¡panÄ›lÅ¡tina (Portoriko)", + "es_PY": "Å¡panÄ›lÅ¡tina (Paraguay)", + "es_SV": "Å¡panÄ›lÅ¡tina (Salvador)", + "es_US": "Å¡panÄ›lÅ¡tina (Spojené státy)", + "es_UY": "Å¡panÄ›lÅ¡tina (Uruguay)", + "es_VE": "Å¡panÄ›lÅ¡tina (Venezuela)", + "et": "estonÅ¡tina", + "et_EE": "estonÅ¡tina (Estonsko)", + "eu": "baskiÄtina", + "eu_ES": "baskiÄtina (Å panÄ›lsko)", + "fa": "perÅ¡tina", + "fa_AF": "perÅ¡tina (Afghánistán)", + "fa_IR": "perÅ¡tina (Ãrán)", + "ff": "fulbÅ¡tina", + "ff_CM": "fulbÅ¡tina (Kamerun)", + "ff_GN": "fulbÅ¡tina (Guinea)", + "ff_MR": "fulbÅ¡tina (Mauritánie)", + "ff_SN": "fulbÅ¡tina (Senegal)", + "fi": "finÅ¡tina", + "fi_FI": "finÅ¡tina (Finsko)", + "fo": "faerÅ¡tina", + "fo_DK": "faerÅ¡tina (Dánsko)", + "fo_FO": "faerÅ¡tina (Faerské ostrovy)", + "fr": "francouzÅ¡tina", + "fr_BE": "francouzÅ¡tina (Belgie)", + "fr_BF": "francouzÅ¡tina (Burkina Faso)", + "fr_BI": "francouzÅ¡tina (Burundi)", + "fr_BJ": "francouzÅ¡tina (Benin)", + "fr_BL": "francouzÅ¡tina (Svatý BartolomÄ›j)", + "fr_CA": "francouzÅ¡tina (Kanada)", + "fr_CD": "francouzÅ¡tina (Kongo – Kinshasa)", + "fr_CF": "francouzÅ¡tina (StÅ™edoafrická republika)", + "fr_CG": "francouzÅ¡tina (Kongo – Brazzaville)", + "fr_CH": "francouzÅ¡tina (Å výcarsko)", + "fr_CI": "francouzÅ¡tina (PobÅ™eží slonoviny)", + "fr_CM": "francouzÅ¡tina (Kamerun)", + "fr_DJ": "francouzÅ¡tina (Džibutsko)", + "fr_DZ": "francouzÅ¡tina (Alžírsko)", + "fr_FR": "francouzÅ¡tina (Francie)", + "fr_GA": "francouzÅ¡tina (Gabon)", + "fr_GF": "francouzÅ¡tina (Francouzská Guyana)", + "fr_GN": "francouzÅ¡tina (Guinea)", + "fr_GP": "francouzÅ¡tina (Guadeloupe)", + "fr_GQ": "francouzÅ¡tina (Rovníková Guinea)", + "fr_HT": "francouzÅ¡tina (Haiti)", + "fr_KM": "francouzÅ¡tina (Komory)", + "fr_LU": "francouzÅ¡tina (Lucembursko)", + "fr_MA": "francouzÅ¡tina (Maroko)", + "fr_MC": "francouzÅ¡tina (Monako)", + "fr_MF": "francouzÅ¡tina (Svatý Martin (Francie))", + "fr_MG": "francouzÅ¡tina (Madagaskar)", + "fr_ML": "francouzÅ¡tina (Mali)", + "fr_MQ": "francouzÅ¡tina (Martinik)", + "fr_MR": "francouzÅ¡tina (Mauritánie)", + "fr_MU": "francouzÅ¡tina (Mauricius)", + "fr_NC": "francouzÅ¡tina (Nová Kaledonie)", + "fr_NE": "francouzÅ¡tina (Niger)", + "fr_PF": "francouzÅ¡tina (Francouzská Polynésie)", + "fr_PM": "francouzÅ¡tina (Saint-Pierre a Miquelon)", + "fr_RE": "francouzÅ¡tina (Réunion)", + "fr_RW": "francouzÅ¡tina (Rwanda)", + "fr_SC": "francouzÅ¡tina (Seychely)", + "fr_SN": "francouzÅ¡tina (Senegal)", + "fr_SY": "francouzÅ¡tina (Sýrie)", + "fr_TD": "francouzÅ¡tina (ÄŒad)", + "fr_TG": "francouzÅ¡tina (Togo)", + "fr_TN": "francouzÅ¡tina (Tunisko)", + "fr_VU": "francouzÅ¡tina (Vanuatu)", + "fr_WF": "francouzÅ¡tina (Wallis a Futuna)", + "fr_YT": "francouzÅ¡tina (Mayotte)", + "fy": "fríština (západní)", + "fy_NL": "fríština (Nizozemsko)", + "ga": "irÅ¡tina", + "ga_IE": "irÅ¡tina (Irsko)", + "gd": "skotská gaelÅ¡tina", + "gd_GB": "skotská gaelÅ¡tina (Spojené království)", + "gl": "galicijÅ¡tina", + "gl_ES": "galicijÅ¡tina (Å panÄ›lsko)", + "gu": "gudžarátÅ¡tina", + "gu_IN": "gudžarátÅ¡tina (Indie)", + "gv": "manÅ¡tina", + "gv_IM": "manÅ¡tina (Ostrov Man)", + "ha": "hauÅ¡tina", + "ha_GH": "hauÅ¡tina (Ghana)", + "ha_NE": "hauÅ¡tina (Niger)", + "ha_NG": "hauÅ¡tina (Nigérie)", + "he": "hebrejÅ¡tina", + "he_IL": "hebrejÅ¡tina (Izrael)", + "hi": "hindÅ¡tina", + "hi_IN": "hindÅ¡tina (Indie)", + "hr": "chorvatÅ¡tina", + "hr_BA": "chorvatÅ¡tina (Bosna a Hercegovina)", + "hr_HR": "chorvatÅ¡tina (Chorvatsko)", + "hu": "maÄarÅ¡tina", + "hu_HU": "maÄarÅ¡tina (MaÄarsko)", + "hy": "arménÅ¡tina", + "hy_AM": "arménÅ¡tina (Arménie)", + "id": "indonéština", + "id_ID": "indonéština (Indonésie)", + "ig": "igboÅ¡tina", + "ig_NG": "igboÅ¡tina (Nigérie)", + "ii": "iÅ¡tina (seÄuánská)", + "ii_CN": "iÅ¡tina (Čína)", + "is": "islandÅ¡tina", + "is_IS": "islandÅ¡tina (Island)", + "it": "italÅ¡tina", + "it_CH": "italÅ¡tina (Å výcarsko)", + "it_IT": "italÅ¡tina (Itálie)", + "it_SM": "italÅ¡tina (San Marino)", + "ja": "japonÅ¡tina", + "ja_JP": "japonÅ¡tina (Japonsko)", + "ka": "gruzínÅ¡tina", + "ka_GE": "gruzínÅ¡tina (Gruzie)", + "ki": "kikujÅ¡tina", + "ki_KE": "kikujÅ¡tina (Keňa)", + "kk": "kazaÅ¡tina", + "kk_KZ": "kazaÅ¡tina (Kazachstán)", + "kl": "grónÅ¡tina", + "kl_GL": "grónÅ¡tina (Grónsko)", + "km": "khmérÅ¡tina", + "km_KH": "khmérÅ¡tina (Kambodža)", + "kn": "kannadÅ¡tina", + "kn_IN": "kannadÅ¡tina (Indie)", + "ko": "korejÅ¡tina", + "ko_KP": "korejÅ¡tina (Severní Korea)", + "ko_KR": "korejÅ¡tina (Jižní Korea)", + "ks": "kaÅ¡mírÅ¡tina", + "ks_IN": "kaÅ¡mírÅ¡tina (Indie)", + "kw": "kornÅ¡tina", + "kw_GB": "kornÅ¡tina (Spojené království)", + "ky": "kyrgyzÅ¡tina", + "ky_KG": "kyrgyzÅ¡tina (Kyrgyzstán)", + "lb": "lucemburÅ¡tina", + "lb_LU": "lucemburÅ¡tina (Lucembursko)", + "lg": "gandÅ¡tina", + "lg_UG": "gandÅ¡tina (Uganda)", + "ln": "lingalÅ¡tina", + "ln_AO": "lingalÅ¡tina (Angola)", + "ln_CD": "lingalÅ¡tina (Kongo – Kinshasa)", + "ln_CF": "lingalÅ¡tina (StÅ™edoafrická republika)", + "ln_CG": "lingalÅ¡tina (Kongo – Brazzaville)", + "lo": "laoÅ¡tina", + "lo_LA": "laoÅ¡tina (Laos)", + "lt": "litevÅ¡tina", + "lt_LT": "litevÅ¡tina (Litva)", + "lu": "lubu-katanžština", + "lu_CD": "lubu-katanžština (Kongo – Kinshasa)", + "lv": "lotyÅ¡tina", + "lv_LV": "lotyÅ¡tina (LotyÅ¡sko)", + "mg": "malgaÅ¡tina", + "mg_MG": "malgaÅ¡tina (Madagaskar)", + "mk": "makedonÅ¡tina", + "mk_MK": "makedonÅ¡tina (Makedonie)", + "ml": "malajálamÅ¡tina", + "ml_IN": "malajálamÅ¡tina (Indie)", + "mn": "mongolÅ¡tina", + "mn_MN": "mongolÅ¡tina (Mongolsko)", + "mr": "maráthÅ¡tina", + "mr_IN": "maráthÅ¡tina (Indie)", + "ms": "malajÅ¡tina", + "ms_BN": "malajÅ¡tina (Brunej)", + "ms_MY": "malajÅ¡tina (Malajsie)", + "ms_SG": "malajÅ¡tina (Singapur)", + "mt": "maltÅ¡tina", + "mt_MT": "maltÅ¡tina (Malta)", + "my": "barmÅ¡tina", + "my_MM": "barmÅ¡tina (Myanmar (Barma))", + "nb": "norÅ¡tina (bokmÃ¥l)", + "nb_NO": "norÅ¡tina (Norsko)", + "nb_SJ": "norÅ¡tina (Å picberky a Jan Mayen)", + "nd": "ndebele (Zimbabwe)", + "nd_ZW": "ndebele (Zimbabwe)", + "ne": "nepálÅ¡tina", + "ne_IN": "nepálÅ¡tina (Indie)", + "ne_NP": "nepálÅ¡tina (Nepál)", + "nl": "nizozemÅ¡tina", + "nl_AW": "nizozemÅ¡tina (Aruba)", + "nl_BE": "nizozemÅ¡tina (Belgie)", + "nl_BQ": "nizozemÅ¡tina (Karibské Nizozemsko)", + "nl_CW": "nizozemÅ¡tina (Curaçao)", + "nl_NL": "nizozemÅ¡tina (Nizozemsko)", + "nl_SR": "nizozemÅ¡tina (Surinam)", + "nl_SX": "nizozemÅ¡tina (Svatý Martin (Nizozemsko))", + "nn": "norÅ¡tina (nynorsk)", + "nn_NO": "norÅ¡tina (Norsko)", + "no": "norÅ¡tina", + "no_NO": "norÅ¡tina (Norsko)", + "om": "oromÅ¡tina", + "om_ET": "oromÅ¡tina (Etiopie)", + "om_KE": "oromÅ¡tina (Keňa)", + "or": "urijÅ¡tina", + "or_IN": "urijÅ¡tina (Indie)", + "os": "osetÅ¡tina", + "os_GE": "osetÅ¡tina (Gruzie)", + "os_RU": "osetÅ¡tina (Rusko)", + "pa": "paňdžábÅ¡tina", + "pa_Arab": "paňdžábÅ¡tina (arabské)", + "pa_Arab_PK": "paňdžábÅ¡tina (arabské, Pákistán)", + "pa_Guru": "paňdžábÅ¡tina (gurmukhi)", + "pa_Guru_IN": "paňdžábÅ¡tina (gurmukhi, Indie)", + "pa_IN": "paňdžábÅ¡tina (Indie)", + "pa_PK": "paňdžábÅ¡tina (Pákistán)", + "pl": "polÅ¡tina", + "pl_PL": "polÅ¡tina (Polsko)", + "ps": "paÅ¡tÅ¡tina", + "ps_AF": "paÅ¡tÅ¡tina (Afghánistán)", + "pt": "portugalÅ¡tina", + "pt_AO": "portugalÅ¡tina (Angola)", + "pt_BR": "portugalÅ¡tina (Brazílie)", + "pt_CH": "portugalÅ¡tina (Å výcarsko)", + "pt_CV": "portugalÅ¡tina (Kapverdy)", + "pt_GQ": "portugalÅ¡tina (Rovníková Guinea)", + "pt_GW": "portugalÅ¡tina (Guinea-Bissau)", + "pt_LU": "portugalÅ¡tina (Lucembursko)", + "pt_MO": "portugalÅ¡tina (Macao – ZAO Číny)", + "pt_MZ": "portugalÅ¡tina (Mosambik)", + "pt_PT": "portugalÅ¡tina (Portugalsko)", + "pt_ST": "portugalÅ¡tina (Svatý Tomáš a Princův ostrov)", + "pt_TL": "portugalÅ¡tina (Východní Timor)", + "qu": "keÄuánÅ¡tina", + "qu_BO": "keÄuánÅ¡tina (Bolívie)", + "qu_EC": "keÄuánÅ¡tina (Ekvádor)", + "qu_PE": "keÄuánÅ¡tina (Peru)", + "rm": "rétorománÅ¡tina", + "rm_CH": "rétorománÅ¡tina (Å výcarsko)", + "rn": "kirundÅ¡tina", + "rn_BI": "kirundÅ¡tina (Burundi)", + "ro": "rumunÅ¡tina", + "ro_MD": "rumunÅ¡tina (Moldavsko)", + "ro_RO": "rumunÅ¡tina (Rumunsko)", + "ru": "ruÅ¡tina", + "ru_BY": "ruÅ¡tina (BÄ›lorusko)", + "ru_KG": "ruÅ¡tina (Kyrgyzstán)", + "ru_KZ": "ruÅ¡tina (Kazachstán)", + "ru_MD": "ruÅ¡tina (Moldavsko)", + "ru_RU": "ruÅ¡tina (Rusko)", + "ru_UA": "ruÅ¡tina (Ukrajina)", + "rw": "kiňarwandÅ¡tina", + "rw_RW": "kiňarwandÅ¡tina (Rwanda)", + "se": "sámÅ¡tina (severní)", + "se_FI": "sámÅ¡tina (Finsko)", + "se_NO": "sámÅ¡tina (Norsko)", + "se_SE": "sámÅ¡tina (Å védsko)", + "sg": "sangÅ¡tina", + "sg_CF": "sangÅ¡tina (StÅ™edoafrická republika)", + "sh": "srbochorvatÅ¡tina", + "sh_BA": "srbochorvatÅ¡tina (Bosna a Hercegovina)", + "si": "sinhálÅ¡tina", + "si_LK": "sinhálÅ¡tina (Srí Lanka)", + "sk": "slovenÅ¡tina", + "sk_SK": "slovenÅ¡tina (Slovensko)", + "sl": "slovinÅ¡tina", + "sl_SI": "slovinÅ¡tina (Slovinsko)", + "sn": "Å¡onÅ¡tina", + "sn_ZW": "Å¡onÅ¡tina (Zimbabwe)", + "so": "somálÅ¡tina", + "so_DJ": "somálÅ¡tina (Džibutsko)", + "so_ET": "somálÅ¡tina (Etiopie)", + "so_KE": "somálÅ¡tina (Keňa)", + "so_SO": "somálÅ¡tina (Somálsko)", + "sq": "albánÅ¡tina", + "sq_AL": "albánÅ¡tina (Albánie)", + "sq_MK": "albánÅ¡tina (Makedonie)", + "sq_XK": "albánÅ¡tina (Kosovo)", + "sr": "srbÅ¡tina", + "sr_BA": "srbÅ¡tina (Bosna a Hercegovina)", + "sr_Cyrl": "srbÅ¡tina (cyrilice)", + "sr_Cyrl_BA": "srbÅ¡tina (cyrilice, Bosna a Hercegovina)", + "sr_Cyrl_ME": "srbÅ¡tina (cyrilice, ÄŒerná Hora)", + "sr_Cyrl_RS": "srbÅ¡tina (cyrilice, Srbsko)", + "sr_Cyrl_XK": "srbÅ¡tina (cyrilice, Kosovo)", + "sr_Latn": "srbÅ¡tina (latinka)", + "sr_Latn_BA": "srbÅ¡tina (latinka, Bosna a Hercegovina)", + "sr_Latn_ME": "srbÅ¡tina (latinka, ÄŒerná Hora)", + "sr_Latn_RS": "srbÅ¡tina (latinka, Srbsko)", + "sr_Latn_XK": "srbÅ¡tina (latinka, Kosovo)", + "sr_ME": "srbÅ¡tina (ÄŒerná Hora)", + "sr_RS": "srbÅ¡tina (Srbsko)", + "sr_XK": "srbÅ¡tina (Kosovo)", + "sv": "Å¡védÅ¡tina", + "sv_AX": "Å¡védÅ¡tina (Ã…landy)", + "sv_FI": "Å¡védÅ¡tina (Finsko)", + "sv_SE": "Å¡védÅ¡tina (Å védsko)", + "sw": "svahilÅ¡tina", + "sw_CD": "svahilÅ¡tina (Kongo – Kinshasa)", + "sw_KE": "svahilÅ¡tina (Keňa)", + "sw_TZ": "svahilÅ¡tina (Tanzanie)", + "sw_UG": "svahilÅ¡tina (Uganda)", + "ta": "tamilÅ¡tina", + "ta_IN": "tamilÅ¡tina (Indie)", + "ta_LK": "tamilÅ¡tina (Srí Lanka)", + "ta_MY": "tamilÅ¡tina (Malajsie)", + "ta_SG": "tamilÅ¡tina (Singapur)", + "te": "telugÅ¡tina", + "te_IN": "telugÅ¡tina (Indie)", + "th": "thajÅ¡tina", + "th_TH": "thajÅ¡tina (Thajsko)", + "ti": "tigrinijÅ¡tina", + "ti_ER": "tigrinijÅ¡tina (Eritrea)", + "ti_ET": "tigrinijÅ¡tina (Etiopie)", + "tl": "tagalog", + "tl_PH": "tagalog (Filipíny)", + "to": "tongánÅ¡tina", + "to_TO": "tongánÅ¡tina (Tonga)", + "tr": "tureÄtina", + "tr_CY": "tureÄtina (Kypr)", + "tr_TR": "tureÄtina (Turecko)", + "ug": "ujgurÅ¡tina", + "ug_CN": "ujgurÅ¡tina (Čína)", + "uk": "ukrajinÅ¡tina", + "uk_UA": "ukrajinÅ¡tina (Ukrajina)", + "ur": "urdÅ¡tina", + "ur_IN": "urdÅ¡tina (Indie)", + "ur_PK": "urdÅ¡tina (Pákistán)", + "uz": "uzbeÄtina", + "uz_AF": "uzbeÄtina (Afghánistán)", + "uz_Arab": "uzbeÄtina (arabské)", + "uz_Arab_AF": "uzbeÄtina (arabské, Afghánistán)", + "uz_Cyrl": "uzbeÄtina (cyrilice)", + "uz_Cyrl_UZ": "uzbeÄtina (cyrilice, Uzbekistán)", + "uz_Latn": "uzbeÄtina (latinka)", + "uz_Latn_UZ": "uzbeÄtina (latinka, Uzbekistán)", + "uz_UZ": "uzbeÄtina (Uzbekistán)", + "vi": "vietnamÅ¡tina", + "vi_VN": "vietnamÅ¡tina (Vietnam)", + "yi": "jidiÅ¡", + "yo": "jorubÅ¡tina", + "yo_BJ": "jorubÅ¡tina (Benin)", + "yo_NG": "jorubÅ¡tina (Nigérie)", + "zh": "ÄínÅ¡tina", + "zh_CN": "ÄínÅ¡tina (Čína)", + "zh_HK": "ÄínÅ¡tina (Hongkong – ZAO Číny)", + "zh_Hans": "ÄínÅ¡tina (zjednoduÅ¡ené)", + "zh_Hans_CN": "ÄínÅ¡tina (zjednoduÅ¡ené, Čína)", + "zh_Hans_HK": "ÄínÅ¡tina (zjednoduÅ¡ené, Hongkong – ZAO Číny)", + "zh_Hans_MO": "ÄínÅ¡tina (zjednoduÅ¡ené, Macao – ZAO Číny)", + "zh_Hans_SG": "ÄínÅ¡tina (zjednoduÅ¡ené, Singapur)", + "zh_Hant": "ÄínÅ¡tina (tradiÄní)", + "zh_Hant_HK": "ÄínÅ¡tina (tradiÄní, Hongkong – ZAO Číny)", + "zh_Hant_MO": "ÄínÅ¡tina (tradiÄní, Macao – ZAO Číny)", + "zh_Hant_TW": "ÄínÅ¡tina (tradiÄní, Tchaj-wan)", + "zh_MO": "ÄínÅ¡tina (Macao – ZAO Číny)", + "zh_SG": "ÄínÅ¡tina (Singapur)", + "zh_TW": "ÄínÅ¡tina (Tchaj-wan)", + "zu": "zuluÅ¡tina", + "zu_ZA": "zuluÅ¡tina (Jihoafrická republika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/cy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/cy.json new file mode 100644 index 0000000000000000000000000000000000000000..aee2d0676e7052f6d84db1f4da38ae06369f2950 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/cy.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Affricâneg", + "af_NA": "Affricâneg (Namibia)", + "af_ZA": "Affricâneg (De Affrica)", + "ak": "Acaneg", + "ak_GH": "Acaneg (Ghana)", + "am": "Amhareg", + "am_ET": "Amhareg (Ethiopia)", + "ar": "Arabeg", + "ar_AE": "Arabeg (Emiradau Arabaidd Unedig)", + "ar_BH": "Arabeg (Bahrain)", + "ar_DJ": "Arabeg (Djibouti)", + "ar_DZ": "Arabeg (Algeria)", + "ar_EG": "Arabeg (Yr Aifft)", + "ar_EH": "Arabeg (Gorllewin Sahara)", + "ar_ER": "Arabeg (Eritrea)", + "ar_IL": "Arabeg (Israel)", + "ar_IQ": "Arabeg (Irac)", + "ar_JO": "Arabeg (Gwlad Iorddonen)", + "ar_KM": "Arabeg (Comoros)", + "ar_KW": "Arabeg (Kuwait)", + "ar_LB": "Arabeg (Libanus)", + "ar_LY": "Arabeg (Libya)", + "ar_MA": "Arabeg (Moroco)", + "ar_MR": "Arabeg (Mauritania)", + "ar_OM": "Arabeg (Oman)", + "ar_PS": "Arabeg (Tiriogaethau Palesteinaidd)", + "ar_QA": "Arabeg (Qatar)", + "ar_SA": "Arabeg (Saudi Arabia)", + "ar_SD": "Arabeg (Swdan)", + "ar_SO": "Arabeg (Somalia)", + "ar_SS": "Arabeg (De Swdan)", + "ar_SY": "Arabeg (Syria)", + "ar_TD": "Arabeg (Tchad)", + "ar_TN": "Arabeg (Tunisia)", + "ar_YE": "Arabeg (Yemen)", + "as": "Asameg", + "as_IN": "Asameg (India)", + "az": "Aserbaijaneg", + "az_AZ": "Aserbaijaneg (Azerbaijan)", + "az_Cyrl": "Aserbaijaneg (Cyrilig)", + "az_Cyrl_AZ": "Aserbaijaneg (Cyrilig, Azerbaijan)", + "az_Latn": "Aserbaijaneg (Lladin)", + "az_Latn_AZ": "Aserbaijaneg (Lladin, Azerbaijan)", + "be": "Belarwseg", + "be_BY": "Belarwseg (Belarws)", + "bg": "Bwlgareg", + "bg_BG": "Bwlgareg (Bwlgaria)", + "bm": "Bambareg", + "bm_ML": "Bambareg (Mali)", + "bn": "Bengaleg", + "bn_BD": "Bengaleg (Bangladesh)", + "bn_IN": "Bengaleg (India)", + "bo": "Tibeteg", + "bo_CN": "Tibeteg (Tsieina)", + "bo_IN": "Tibeteg (India)", + "br": "Llydaweg", + "br_FR": "Llydaweg (Ffrainc)", + "bs": "Bosnieg", + "bs_BA": "Bosnieg (Bosnia a Hercegovina)", + "bs_Cyrl": "Bosnieg (Cyrilig)", + "bs_Cyrl_BA": "Bosnieg (Cyrilig, Bosnia a Hercegovina)", + "bs_Latn": "Bosnieg (Lladin)", + "bs_Latn_BA": "Bosnieg (Lladin, Bosnia a Hercegovina)", + "ca": "Catalaneg", + "ca_AD": "Catalaneg (Andorra)", + "ca_ES": "Catalaneg (Sbaen)", + "ca_FR": "Catalaneg (Ffrainc)", + "ca_IT": "Catalaneg (Yr Eidal)", + "ce": "Tsietsieneg", + "ce_RU": "Tsietsieneg (Rwsia)", + "cs": "Tsieceg", + "cs_CZ": "Tsieceg (Gweriniaeth Tsiec)", + "cy": "Cymraeg", + "cy_GB": "Cymraeg (Y Deyrnas Unedig)", + "da": "Daneg", + "da_DK": "Daneg (Denmarc)", + "da_GL": "Daneg (Yr Ynys Las)", + "de": "Almaeneg", + "de_AT": "Almaeneg (Awstria)", + "de_BE": "Almaeneg (Gwlad Belg)", + "de_CH": "Almaeneg (Y Swistir)", + "de_DE": "Almaeneg (Yr Almaen)", + "de_IT": "Almaeneg (Yr Eidal)", + "de_LI": "Almaeneg (Liechtenstein)", + "de_LU": "Almaeneg (Lwcsembwrg)", + "dz": "Dzongkha", + "dz_BT": "Dzongkha (Bhutan)", + "ee": "Ewe", + "ee_GH": "Ewe (Ghana)", + "ee_TG": "Ewe (Togo)", + "el": "Groeg", + "el_CY": "Groeg (Cyprus)", + "el_GR": "Groeg (Gwlad Groeg)", + "en": "Saesneg", + "en_AG": "Saesneg (Antigua a Barbuda)", + "en_AI": "Saesneg (Anguilla)", + "en_AS": "Saesneg (Samoa America)", + "en_AT": "Saesneg (Awstria)", + "en_AU": "Saesneg (Awstralia)", + "en_BB": "Saesneg (Barbados)", + "en_BE": "Saesneg (Gwlad Belg)", + "en_BI": "Saesneg (Burundi)", + "en_BM": "Saesneg (Bermuda)", + "en_BS": "Saesneg (Y Bahamas)", + "en_BW": "Saesneg (Botswana)", + "en_BZ": "Saesneg (Belize)", + "en_CA": "Saesneg (Canada)", + "en_CC": "Saesneg (Ynysoedd Cocos (Keeling))", + "en_CH": "Saesneg (Y Swistir)", + "en_CK": "Saesneg (Ynysoedd Cook)", + "en_CM": "Saesneg (Camerŵn)", + "en_CX": "Saesneg (Ynys y Nadolig)", + "en_CY": "Saesneg (Cyprus)", + "en_DE": "Saesneg (Yr Almaen)", + "en_DG": "Saesneg (Diego Garcia)", + "en_DK": "Saesneg (Denmarc)", + "en_DM": "Saesneg (Dominica)", + "en_ER": "Saesneg (Eritrea)", + "en_FI": "Saesneg (Y Ffindir)", + "en_FJ": "Saesneg (Fiji)", + "en_FK": "Saesneg (Ynysoedd y Falkland\/Malvinas)", + "en_FM": "Saesneg (Micronesia)", + "en_GB": "Saesneg (Y Deyrnas Unedig)", + "en_GD": "Saesneg (Grenada)", + "en_GG": "Saesneg (Ynys y Garn)", + "en_GH": "Saesneg (Ghana)", + "en_GI": "Saesneg (Gibraltar)", + "en_GM": "Saesneg (Gambia)", + "en_GU": "Saesneg (Guam)", + "en_GY": "Saesneg (Guyana)", + "en_HK": "Saesneg (Hong Kong RhGA Tsieina)", + "en_IE": "Saesneg (Iwerddon)", + "en_IL": "Saesneg (Israel)", + "en_IM": "Saesneg (Ynys Manaw)", + "en_IN": "Saesneg (India)", + "en_IO": "Saesneg (Tiriogaeth Brydeinig Cefnfor India)", + "en_JE": "Saesneg (Jersey)", + "en_JM": "Saesneg (Jamaica)", + "en_KE": "Saesneg (Kenya)", + "en_KI": "Saesneg (Kiribati)", + "en_KN": "Saesneg (Saint Kitts a Nevis)", + "en_KY": "Saesneg (Ynysoedd Cayman)", + "en_LC": "Saesneg (Saint Lucia)", + "en_LR": "Saesneg (Liberia)", + "en_LS": "Saesneg (Lesotho)", + "en_MG": "Saesneg (Madagascar)", + "en_MH": "Saesneg (Ynysoedd Marshall)", + "en_MO": "Saesneg (Macau RhGA Tsieina)", + "en_MP": "Saesneg (Ynysoedd Gogledd Mariana)", + "en_MS": "Saesneg (Montserrat)", + "en_MT": "Saesneg (Malta)", + "en_MU": "Saesneg (Mauritius)", + "en_MW": "Saesneg (Malawi)", + "en_MY": "Saesneg (Malaysia)", + "en_NA": "Saesneg (Namibia)", + "en_NF": "Saesneg (Ynys Norfolk)", + "en_NG": "Saesneg (Nigeria)", + "en_NL": "Saesneg (Yr Iseldiroedd)", + "en_NR": "Saesneg (Nauru)", + "en_NU": "Saesneg (Niue)", + "en_NZ": "Saesneg (Seland Newydd)", + "en_PG": "Saesneg (Papua Guinea Newydd)", + "en_PH": "Saesneg (Y Philipinau)", + "en_PK": "Saesneg (Pakistan)", + "en_PN": "Saesneg (Ynysoedd Pitcairn)", + "en_PR": "Saesneg (Puerto Rico)", + "en_PW": "Saesneg (Palau)", + "en_RW": "Saesneg (Rwanda)", + "en_SB": "Saesneg (Ynysoedd Solomon)", + "en_SC": "Saesneg (Seychelles)", + "en_SD": "Saesneg (Swdan)", + "en_SE": "Saesneg (Sweden)", + "en_SG": "Saesneg (Singapore)", + "en_SH": "Saesneg (Saint Helena)", + "en_SI": "Saesneg (Slofenia)", + "en_SL": "Saesneg (Sierra Leone)", + "en_SS": "Saesneg (De Swdan)", + "en_SX": "Saesneg (Sint Maarten)", + "en_SZ": "Saesneg (Gwlad Swazi)", + "en_TC": "Saesneg (Ynysoedd Turks a Caicos)", + "en_TK": "Saesneg (Tokelau)", + "en_TO": "Saesneg (Tonga)", + "en_TT": "Saesneg (Trinidad a Tobago)", + "en_TV": "Saesneg (Tuvalu)", + "en_TZ": "Saesneg (Tanzania)", + "en_UG": "Saesneg (Uganda)", + "en_UM": "Saesneg (Ynysoedd Pellennig UDA)", + "en_US": "Saesneg (Yr Unol Daleithiau)", + "en_VC": "Saesneg (Saint Vincent a’r Grenadines)", + "en_VG": "Saesneg (Ynysoedd Gwyryf Prydain)", + "en_VI": "Saesneg (Ynysoedd Gwyryf yr Unol Daleithiau)", + "en_VU": "Saesneg (Vanuatu)", + "en_WS": "Saesneg (Samoa)", + "en_ZA": "Saesneg (De Affrica)", + "en_ZM": "Saesneg (Zambia)", + "en_ZW": "Saesneg (Zimbabwe)", + "eo": "Esperanto", + "es": "Sbaeneg", + "es_AR": "Sbaeneg (Yr Ariannin)", + "es_BO": "Sbaeneg (Bolifia)", + "es_BR": "Sbaeneg (Brasil)", + "es_CL": "Sbaeneg (Chile)", + "es_CO": "Sbaeneg (Colombia)", + "es_CR": "Sbaeneg (Costa Rica)", + "es_CU": "Sbaeneg (Ciwba)", + "es_DO": "Sbaeneg (Gweriniaeth Dominica)", + "es_EA": "Sbaeneg (Ceuta a Melilla)", + "es_EC": "Sbaeneg (Ecuador)", + "es_ES": "Sbaeneg (Sbaen)", + "es_GQ": "Sbaeneg (Guinea Gyhydeddol)", + "es_GT": "Sbaeneg (Guatemala)", + "es_HN": "Sbaeneg (Honduras)", + "es_IC": "Sbaeneg (Yr Ynysoedd Dedwydd)", + "es_MX": "Sbaeneg (Mecsico)", + "es_NI": "Sbaeneg (Nicaragua)", + "es_PA": "Sbaeneg (Panama)", + "es_PE": "Sbaeneg (Periw)", + "es_PH": "Sbaeneg (Y Philipinau)", + "es_PR": "Sbaeneg (Puerto Rico)", + "es_PY": "Sbaeneg (Paraguay)", + "es_SV": "Sbaeneg (El Salvador)", + "es_US": "Sbaeneg (Yr Unol Daleithiau)", + "es_UY": "Sbaeneg (Uruguay)", + "es_VE": "Sbaeneg (Venezuela)", + "et": "Estoneg", + "et_EE": "Estoneg (Estonia)", + "eu": "Basgeg", + "eu_ES": "Basgeg (Sbaen)", + "fa": "Perseg", + "fa_AF": "Perseg (Afghanistan)", + "fa_IR": "Perseg (Iran)", + "ff": "Ffwla", + "ff_CM": "Ffwla (Camerŵn)", + "ff_GN": "Ffwla (Guinée)", + "ff_MR": "Ffwla (Mauritania)", + "ff_SN": "Ffwla (Senegal)", + "fi": "Ffinneg", + "fi_FI": "Ffinneg (Y Ffindir)", + "fo": "Ffaröeg", + "fo_DK": "Ffaröeg (Denmarc)", + "fo_FO": "Ffaröeg (Ynysoedd Ffaro)", + "fr": "Ffrangeg", + "fr_BE": "Ffrangeg (Gwlad Belg)", + "fr_BF": "Ffrangeg (Burkina Faso)", + "fr_BI": "Ffrangeg (Burundi)", + "fr_BJ": "Ffrangeg (Benin)", + "fr_BL": "Ffrangeg (Saint Barthélemy)", + "fr_CA": "Ffrangeg (Canada)", + "fr_CD": "Ffrangeg (Y Congo - Kinshasa)", + "fr_CF": "Ffrangeg (Gweriniaeth Canolbarth Affrica)", + "fr_CG": "Ffrangeg (Y Congo - Brazzaville)", + "fr_CH": "Ffrangeg (Y Swistir)", + "fr_CI": "Ffrangeg (Côte d’Ivoire)", + "fr_CM": "Ffrangeg (Camerŵn)", + "fr_DJ": "Ffrangeg (Djibouti)", + "fr_DZ": "Ffrangeg (Algeria)", + "fr_FR": "Ffrangeg (Ffrainc)", + "fr_GA": "Ffrangeg (Gabon)", + "fr_GF": "Ffrangeg (Guyane Ffrengig)", + "fr_GN": "Ffrangeg (Guinée)", + "fr_GP": "Ffrangeg (Guadeloupe)", + "fr_GQ": "Ffrangeg (Guinea Gyhydeddol)", + "fr_HT": "Ffrangeg (Haiti)", + "fr_KM": "Ffrangeg (Comoros)", + "fr_LU": "Ffrangeg (Lwcsembwrg)", + "fr_MA": "Ffrangeg (Moroco)", + "fr_MC": "Ffrangeg (Monaco)", + "fr_MF": "Ffrangeg (Saint Martin)", + "fr_MG": "Ffrangeg (Madagascar)", + "fr_ML": "Ffrangeg (Mali)", + "fr_MQ": "Ffrangeg (Martinique)", + "fr_MR": "Ffrangeg (Mauritania)", + "fr_MU": "Ffrangeg (Mauritius)", + "fr_NC": "Ffrangeg (Caledonia Newydd)", + "fr_NE": "Ffrangeg (Niger)", + "fr_PF": "Ffrangeg (Polynesia Ffrengig)", + "fr_PM": "Ffrangeg (Saint-Pierre-et-Miquelon)", + "fr_RE": "Ffrangeg (Réunion)", + "fr_RW": "Ffrangeg (Rwanda)", + "fr_SC": "Ffrangeg (Seychelles)", + "fr_SN": "Ffrangeg (Senegal)", + "fr_SY": "Ffrangeg (Syria)", + "fr_TD": "Ffrangeg (Tchad)", + "fr_TG": "Ffrangeg (Togo)", + "fr_TN": "Ffrangeg (Tunisia)", + "fr_VU": "Ffrangeg (Vanuatu)", + "fr_WF": "Ffrangeg (Wallis a Futuna)", + "fr_YT": "Ffrangeg (Mayotte)", + "fy": "Ffriseg y Gorllewin", + "fy_NL": "Ffriseg y Gorllewin (Yr Iseldiroedd)", + "ga": "Gwyddeleg", + "ga_IE": "Gwyddeleg (Iwerddon)", + "gd": "Gaeleg yr Alban", + "gd_GB": "Gaeleg yr Alban (Y Deyrnas Unedig)", + "gl": "Galisieg", + "gl_ES": "Galisieg (Sbaen)", + "gu": "Gwjarati", + "gu_IN": "Gwjarati (India)", + "gv": "Manaweg", + "gv_IM": "Manaweg (Ynys Manaw)", + "ha": "Hawsa", + "ha_GH": "Hawsa (Ghana)", + "ha_NE": "Hawsa (Niger)", + "ha_NG": "Hawsa (Nigeria)", + "he": "Hebraeg", + "he_IL": "Hebraeg (Israel)", + "hi": "Hindi", + "hi_IN": "Hindi (India)", + "hr": "Croateg", + "hr_BA": "Croateg (Bosnia a Hercegovina)", + "hr_HR": "Croateg (Croatia)", + "hu": "Hwngareg", + "hu_HU": "Hwngareg (Hwngari)", + "hy": "Armeneg", + "hy_AM": "Armeneg (Armenia)", + "id": "Indoneseg", + "id_ID": "Indoneseg (Indonesia)", + "ig": "Igbo", + "ig_NG": "Igbo (Nigeria)", + "ii": "Nwosw", + "ii_CN": "Nwosw (Tsieina)", + "is": "Islandeg", + "is_IS": "Islandeg (Gwlad yr Iâ)", + "it": "Eidaleg", + "it_CH": "Eidaleg (Y Swistir)", + "it_IT": "Eidaleg (Yr Eidal)", + "it_SM": "Eidaleg (San Marino)", + "ja": "Japaneeg", + "ja_JP": "Japaneeg (Japan)", + "ka": "Georgeg", + "ka_GE": "Georgeg (Georgia)", + "ki": "Kikuyu", + "ki_KE": "Kikuyu (Kenya)", + "kk": "Casacheg", + "kk_KZ": "Casacheg (Kazakstan)", + "kl": "Kalaallisut", + "kl_GL": "Kalaallisut (Yr Ynys Las)", + "km": "Chmereg", + "km_KH": "Chmereg (Cambodia)", + "kn": "Kannada", + "kn_IN": "Kannada (India)", + "ko": "Coreeg", + "ko_KP": "Coreeg (Gogledd Korea)", + "ko_KR": "Coreeg (De Korea)", + "ks": "Cashmireg", + "ks_IN": "Cashmireg (India)", + "kw": "Cernyweg", + "kw_GB": "Cernyweg (Y Deyrnas Unedig)", + "ky": "Cirgiseg", + "ky_KG": "Cirgiseg (Kyrgyzstan)", + "lb": "Lwcsembwrgeg", + "lb_LU": "Lwcsembwrgeg (Lwcsembwrg)", + "lg": "Ganda", + "lg_UG": "Ganda (Uganda)", + "ln": "Lingala", + "ln_AO": "Lingala (Angola)", + "ln_CD": "Lingala (Y Congo - Kinshasa)", + "ln_CF": "Lingala (Gweriniaeth Canolbarth Affrica)", + "ln_CG": "Lingala (Y Congo - Brazzaville)", + "lo": "Laoeg", + "lo_LA": "Laoeg (Laos)", + "lt": "Lithwaneg", + "lt_LT": "Lithwaneg (Lithuania)", + "lu": "Luba-Katanga", + "lu_CD": "Luba-Katanga (Y Congo - Kinshasa)", + "lv": "Latfieg", + "lv_LV": "Latfieg (Latfia)", + "mg": "Malagaseg", + "mg_MG": "Malagaseg (Madagascar)", + "mk": "Macedoneg", + "mk_MK": "Macedoneg (Macedonia)", + "ml": "Malayalam", + "ml_IN": "Malayalam (India)", + "mn": "Mongoleg", + "mn_MN": "Mongoleg (Mongolia)", + "mr": "Marathi", + "mr_IN": "Marathi (India)", + "ms": "Maleieg", + "ms_BN": "Maleieg (Brunei)", + "ms_MY": "Maleieg (Malaysia)", + "ms_SG": "Maleieg (Singapore)", + "mt": "Malteg", + "mt_MT": "Malteg (Malta)", + "my": "Byrmaneg", + "my_MM": "Byrmaneg (Myanmar (Burma))", + "nb": "Norwyeg BokmÃ¥l", + "nb_NO": "Norwyeg BokmÃ¥l (Norwy)", + "nb_SJ": "Norwyeg BokmÃ¥l (Svalbard a Jan Mayen)", + "nd": "Ndebele Gogleddol", + "nd_ZW": "Ndebele Gogleddol (Zimbabwe)", + "ne": "Nepaleg", + "ne_IN": "Nepaleg (India)", + "ne_NP": "Nepaleg (Nepal)", + "nl": "Iseldireg", + "nl_AW": "Iseldireg (Aruba)", + "nl_BE": "Iseldireg (Gwlad Belg)", + "nl_BQ": "Iseldireg (Antilles yr Iseldiroedd)", + "nl_CW": "Iseldireg (Curaçao)", + "nl_NL": "Iseldireg (Yr Iseldiroedd)", + "nl_SR": "Iseldireg (Suriname)", + "nl_SX": "Iseldireg (Sint Maarten)", + "nn": "Norwyeg Nynorsk", + "nn_NO": "Norwyeg Nynorsk (Norwy)", + "no": "Norwyeg", + "no_NO": "Norwyeg (Norwy)", + "om": "Oromo", + "om_ET": "Oromo (Ethiopia)", + "om_KE": "Oromo (Kenya)", + "or": "Oriya", + "or_IN": "Oriya (India)", + "os": "Oseteg", + "os_GE": "Oseteg (Georgia)", + "os_RU": "Oseteg (Rwsia)", + "pa": "Pwnjabeg", + "pa_Arab": "Pwnjabeg (Arabaidd)", + "pa_Arab_PK": "Pwnjabeg (Arabaidd, Pakistan)", + "pa_Guru": "Pwnjabeg (Gwrmwci)", + "pa_Guru_IN": "Pwnjabeg (Gwrmwci, India)", + "pa_IN": "Pwnjabeg (India)", + "pa_PK": "Pwnjabeg (Pakistan)", + "pl": "Pwyleg", + "pl_PL": "Pwyleg (Gwlad Pwyl)", + "ps": "Pashto", + "ps_AF": "Pashto (Afghanistan)", + "pt": "Portiwgeeg", + "pt_AO": "Portiwgeeg (Angola)", + "pt_BR": "Portiwgeeg (Brasil)", + "pt_CH": "Portiwgeeg (Y Swistir)", + "pt_CV": "Portiwgeeg (Cabo Verde)", + "pt_GQ": "Portiwgeeg (Guinea Gyhydeddol)", + "pt_GW": "Portiwgeeg (Guiné-Bissau)", + "pt_LU": "Portiwgeeg (Lwcsembwrg)", + "pt_MO": "Portiwgeeg (Macau RhGA Tsieina)", + "pt_MZ": "Portiwgeeg (Mozambique)", + "pt_PT": "Portiwgeeg (Portiwgal)", + "pt_ST": "Portiwgeeg (São Tomé a Príncipe)", + "pt_TL": "Portiwgeeg (Timor-Leste)", + "qu": "Quechua", + "qu_BO": "Quechua (Bolifia)", + "qu_EC": "Quechua (Ecuador)", + "qu_PE": "Quechua (Periw)", + "rm": "Románsh", + "rm_CH": "Románsh (Y Swistir)", + "rn": "Rwndi", + "rn_BI": "Rwndi (Burundi)", + "ro": "Rwmaneg", + "ro_MD": "Rwmaneg (Moldofa)", + "ro_RO": "Rwmaneg (Rwmania)", + "ru": "Rwseg", + "ru_BY": "Rwseg (Belarws)", + "ru_KG": "Rwseg (Kyrgyzstan)", + "ru_KZ": "Rwseg (Kazakstan)", + "ru_MD": "Rwseg (Moldofa)", + "ru_RU": "Rwseg (Rwsia)", + "ru_UA": "Rwseg (Wcráin)", + "rw": "Ciniarŵandeg", + "rw_RW": "Ciniarŵandeg (Rwanda)", + "se": "Sami Gogleddol", + "se_FI": "Sami Gogleddol (Y Ffindir)", + "se_NO": "Sami Gogleddol (Norwy)", + "se_SE": "Sami Gogleddol (Sweden)", + "sg": "Sango", + "sg_CF": "Sango (Gweriniaeth Canolbarth Affrica)", + "sh": "Serbo-Croateg", + "sh_BA": "Serbo-Croateg (Bosnia a Hercegovina)", + "si": "Sinhaleg", + "si_LK": "Sinhaleg (Sri Lanka)", + "sk": "Slofaceg", + "sk_SK": "Slofaceg (Slofacia)", + "sl": "Slofeneg", + "sl_SI": "Slofeneg (Slofenia)", + "sn": "Shona", + "sn_ZW": "Shona (Zimbabwe)", + "so": "Somaleg", + "so_DJ": "Somaleg (Djibouti)", + "so_ET": "Somaleg (Ethiopia)", + "so_KE": "Somaleg (Kenya)", + "so_SO": "Somaleg (Somalia)", + "sq": "Albaneg", + "sq_AL": "Albaneg (Albania)", + "sq_MK": "Albaneg (Macedonia)", + "sq_XK": "Albaneg (Kosovo)", + "sr": "Serbeg", + "sr_BA": "Serbeg (Bosnia a Hercegovina)", + "sr_Cyrl": "Serbeg (Cyrilig)", + "sr_Cyrl_BA": "Serbeg (Cyrilig, Bosnia a Hercegovina)", + "sr_Cyrl_ME": "Serbeg (Cyrilig, Montenegro)", + "sr_Cyrl_RS": "Serbeg (Cyrilig, Serbia)", + "sr_Cyrl_XK": "Serbeg (Cyrilig, Kosovo)", + "sr_Latn": "Serbeg (Lladin)", + "sr_Latn_BA": "Serbeg (Lladin, Bosnia a Hercegovina)", + "sr_Latn_ME": "Serbeg (Lladin, Montenegro)", + "sr_Latn_RS": "Serbeg (Lladin, Serbia)", + "sr_Latn_XK": "Serbeg (Lladin, Kosovo)", + "sr_ME": "Serbeg (Montenegro)", + "sr_RS": "Serbeg (Serbia)", + "sr_XK": "Serbeg (Kosovo)", + "sv": "Swedeg", + "sv_AX": "Swedeg (Ynysoedd Ã…land)", + "sv_FI": "Swedeg (Y Ffindir)", + "sv_SE": "Swedeg (Sweden)", + "sw": "Swahili", + "sw_CD": "Swahili (Y Congo - Kinshasa)", + "sw_KE": "Swahili (Kenya)", + "sw_TZ": "Swahili (Tanzania)", + "sw_UG": "Swahili (Uganda)", + "ta": "Tamileg", + "ta_IN": "Tamileg (India)", + "ta_LK": "Tamileg (Sri Lanka)", + "ta_MY": "Tamileg (Malaysia)", + "ta_SG": "Tamileg (Singapore)", + "te": "Telugu", + "te_IN": "Telugu (India)", + "th": "Thai", + "th_TH": "Thai (Gwlad Thai)", + "ti": "Tigrinya", + "ti_ER": "Tigrinya (Eritrea)", + "ti_ET": "Tigrinya (Ethiopia)", + "tl": "Tagalog", + "tl_PH": "Tagalog (Y Philipinau)", + "to": "Tongeg", + "to_TO": "Tongeg (Tonga)", + "tr": "Tyrceg", + "tr_CY": "Tyrceg (Cyprus)", + "tr_TR": "Tyrceg (Twrci)", + "ug": "Uighur", + "ug_CN": "Uighur (Tsieina)", + "uk": "Wcreineg", + "uk_UA": "Wcreineg (Wcráin)", + "ur": "Wrdw", + "ur_IN": "Wrdw (India)", + "ur_PK": "Wrdw (Pakistan)", + "uz": "Wsbeceg", + "uz_AF": "Wsbeceg (Afghanistan)", + "uz_Arab": "Wsbeceg (Arabaidd)", + "uz_Arab_AF": "Wsbeceg (Arabaidd, Afghanistan)", + "uz_Cyrl": "Wsbeceg (Cyrilig)", + "uz_Cyrl_UZ": "Wsbeceg (Cyrilig, Uzbekistan)", + "uz_Latn": "Wsbeceg (Lladin)", + "uz_Latn_UZ": "Wsbeceg (Lladin, Uzbekistan)", + "uz_UZ": "Wsbeceg (Uzbekistan)", + "vi": "Fietnameg", + "vi_VN": "Fietnameg (Fietnam)", + "yi": "Iddew-Almaeneg", + "yo": "Iorwba", + "yo_BJ": "Iorwba (Benin)", + "yo_NG": "Iorwba (Nigeria)", + "zh": "Tsieineeg", + "zh_CN": "Tsieineeg (Tsieina)", + "zh_HK": "Tsieineeg (Hong Kong RhGA Tsieina)", + "zh_Hans": "Tsieineeg (Symledig)", + "zh_Hans_CN": "Tsieineeg (Symledig, Tsieina)", + "zh_Hans_HK": "Tsieineeg (Symledig, Hong Kong RhGA Tsieina)", + "zh_Hans_MO": "Tsieineeg (Symledig, Macau RhGA Tsieina)", + "zh_Hans_SG": "Tsieineeg (Symledig, Singapore)", + "zh_Hant": "Tsieineeg (Traddodiadol)", + "zh_Hant_HK": "Tsieineeg (Traddodiadol, Hong Kong RhGA Tsieina)", + "zh_Hant_MO": "Tsieineeg (Traddodiadol, Macau RhGA Tsieina)", + "zh_Hant_TW": "Tsieineeg (Traddodiadol, Taiwan)", + "zh_MO": "Tsieineeg (Macau RhGA Tsieina)", + "zh_SG": "Tsieineeg (Singapore)", + "zh_TW": "Tsieineeg (Taiwan)", + "zu": "Swlw", + "zu_ZA": "Swlw (De Affrica)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/da.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/da.json new file mode 100644 index 0000000000000000000000000000000000000000..67056cbbf0280c8de6737a95932239e1d04b18c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/da.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibia)", + "af_ZA": "afrikaans (Sydafrika)", + "ak": "akan", + "ak_GH": "akan (Ghana)", + "am": "amharisk", + "am_ET": "amharisk (Etiopien)", + "ar": "arabisk", + "ar_AE": "arabisk (De Forenede Arabiske Emirater)", + "ar_BH": "arabisk (Bahrain)", + "ar_DJ": "arabisk (Djibouti)", + "ar_DZ": "arabisk (Algeriet)", + "ar_EG": "arabisk (Egypten)", + "ar_EH": "arabisk (Vestsahara)", + "ar_ER": "arabisk (Eritrea)", + "ar_IL": "arabisk (Israel)", + "ar_IQ": "arabisk (Irak)", + "ar_JO": "arabisk (Jordan)", + "ar_KM": "arabisk (Comorerne)", + "ar_KW": "arabisk (Kuwait)", + "ar_LB": "arabisk (Libanon)", + "ar_LY": "arabisk (Libyen)", + "ar_MA": "arabisk (Marokko)", + "ar_MR": "arabisk (Mauretanien)", + "ar_OM": "arabisk (Oman)", + "ar_PS": "arabisk (De palæstinensiske omrÃ¥der)", + "ar_QA": "arabisk (Qatar)", + "ar_SA": "arabisk (Saudi-Arabien)", + "ar_SD": "arabisk (Sudan)", + "ar_SO": "arabisk (Somalia)", + "ar_SS": "arabisk (Sydsudan)", + "ar_SY": "arabisk (Syrien)", + "ar_TD": "arabisk (Tchad)", + "ar_TN": "arabisk (Tunesien)", + "ar_YE": "arabisk (Yemen)", + "as": "assamesisk", + "as_IN": "assamesisk (Indien)", + "az": "aserbajdsjansk", + "az_AZ": "aserbajdsjansk (Aserbajdsjan)", + "az_Cyrl": "aserbajdsjansk (kyrillisk)", + "az_Cyrl_AZ": "aserbajdsjansk (kyrillisk, Aserbajdsjan)", + "az_Latn": "aserbajdsjansk (latinsk)", + "az_Latn_AZ": "aserbajdsjansk (latinsk, Aserbajdsjan)", + "be": "hviderussisk", + "be_BY": "hviderussisk (Hviderusland)", + "bg": "bulgarsk", + "bg_BG": "bulgarsk (Bulgarien)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengali", + "bn_BD": "bengali (Bangladesh)", + "bn_IN": "bengali (Indien)", + "bo": "tibetansk", + "bo_CN": "tibetansk (Kina)", + "bo_IN": "tibetansk (Indien)", + "br": "bretonsk", + "br_FR": "bretonsk (Frankrig)", + "bs": "bosnisk", + "bs_BA": "bosnisk (Bosnien-Hercegovina)", + "bs_Cyrl": "bosnisk (kyrillisk)", + "bs_Cyrl_BA": "bosnisk (kyrillisk, Bosnien-Hercegovina)", + "bs_Latn": "bosnisk (latinsk)", + "bs_Latn_BA": "bosnisk (latinsk, Bosnien-Hercegovina)", + "ca": "catalansk", + "ca_AD": "catalansk (Andorra)", + "ca_ES": "catalansk (Spanien)", + "ca_FR": "catalansk (Frankrig)", + "ca_IT": "catalansk (Italien)", + "ce": "tjetjensk", + "ce_RU": "tjetjensk (Rusland)", + "cs": "tjekkisk", + "cs_CZ": "tjekkisk (Tjekkiet)", + "cy": "walisisk", + "cy_GB": "walisisk (Storbritannien)", + "da": "dansk", + "da_DK": "dansk (Danmark)", + "da_GL": "dansk (Grønland)", + "de": "tysk", + "de_AT": "tysk (Østrig)", + "de_BE": "tysk (Belgien)", + "de_CH": "tysk (Schweiz)", + "de_DE": "tysk (Tyskland)", + "de_IT": "tysk (Italien)", + "de_LI": "tysk (Liechtenstein)", + "de_LU": "tysk (Luxembourg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhutan)", + "ee": "ewe", + "ee_GH": "ewe (Ghana)", + "ee_TG": "ewe (Togo)", + "el": "græsk", + "el_CY": "græsk (Cypern)", + "el_GR": "græsk (Grækenland)", + "en": "engelsk", + "en_AG": "engelsk (Antigua og Barbuda)", + "en_AI": "engelsk (Anguilla)", + "en_AS": "engelsk (Amerikansk Samoa)", + "en_AT": "engelsk (Østrig)", + "en_AU": "engelsk (Australien)", + "en_BB": "engelsk (Barbados)", + "en_BE": "engelsk (Belgien)", + "en_BI": "engelsk (Burundi)", + "en_BM": "engelsk (Bermuda)", + "en_BS": "engelsk (Bahamas)", + "en_BW": "engelsk (Botswana)", + "en_BZ": "engelsk (Belize)", + "en_CA": "engelsk (Canada)", + "en_CC": "engelsk (Cocosøerne)", + "en_CH": "engelsk (Schweiz)", + "en_CK": "engelsk (Cookøerne)", + "en_CM": "engelsk (Cameroun)", + "en_CX": "engelsk (Juleøen)", + "en_CY": "engelsk (Cypern)", + "en_DE": "engelsk (Tyskland)", + "en_DG": "engelsk (Diego Garcia)", + "en_DK": "engelsk (Danmark)", + "en_DM": "engelsk (Dominica)", + "en_ER": "engelsk (Eritrea)", + "en_FI": "engelsk (Finland)", + "en_FJ": "engelsk (Fiji)", + "en_FK": "engelsk (Falklandsøerne)", + "en_FM": "engelsk (Mikronesiens Forenede Stater)", + "en_GB": "engelsk (Storbritannien)", + "en_GD": "engelsk (Grenada)", + "en_GG": "engelsk (Guernsey)", + "en_GH": "engelsk (Ghana)", + "en_GI": "engelsk (Gibraltar)", + "en_GM": "engelsk (Gambia)", + "en_GU": "engelsk (Guam)", + "en_GY": "engelsk (Guyana)", + "en_HK": "engelsk (SAR Hongkong)", + "en_IE": "engelsk (Irland)", + "en_IL": "engelsk (Israel)", + "en_IM": "engelsk (Isle of Man)", + "en_IN": "engelsk (Indien)", + "en_IO": "engelsk (Det britiske territorium i Det Indiske Ocean)", + "en_JE": "engelsk (Jersey)", + "en_JM": "engelsk (Jamaica)", + "en_KE": "engelsk (Kenya)", + "en_KI": "engelsk (Kiribati)", + "en_KN": "engelsk (Saint Kitts og Nevis)", + "en_KY": "engelsk (Caymanøerne)", + "en_LC": "engelsk (Saint Lucia)", + "en_LR": "engelsk (Liberia)", + "en_LS": "engelsk (Lesotho)", + "en_MG": "engelsk (Madagaskar)", + "en_MH": "engelsk (Marshalløerne)", + "en_MO": "engelsk (SAR Macao)", + "en_MP": "engelsk (Nordmarianerne)", + "en_MS": "engelsk (Montserrat)", + "en_MT": "engelsk (Malta)", + "en_MU": "engelsk (Mauritius)", + "en_MW": "engelsk (Malawi)", + "en_MY": "engelsk (Malaysia)", + "en_NA": "engelsk (Namibia)", + "en_NF": "engelsk (Norfolk Island)", + "en_NG": "engelsk (Nigeria)", + "en_NL": "engelsk (Holland)", + "en_NR": "engelsk (Nauru)", + "en_NU": "engelsk (Niue)", + "en_NZ": "engelsk (New Zealand)", + "en_PG": "engelsk (Papua Ny Guinea)", + "en_PH": "engelsk (Filippinerne)", + "en_PK": "engelsk (Pakistan)", + "en_PN": "engelsk (Pitcairn)", + "en_PR": "engelsk (Puerto Rico)", + "en_PW": "engelsk (Palau)", + "en_RW": "engelsk (Rwanda)", + "en_SB": "engelsk (Salomonøerne)", + "en_SC": "engelsk (Seychellerne)", + "en_SD": "engelsk (Sudan)", + "en_SE": "engelsk (Sverige)", + "en_SG": "engelsk (Singapore)", + "en_SH": "engelsk (St. Helena)", + "en_SI": "engelsk (Slovenien)", + "en_SL": "engelsk (Sierra Leone)", + "en_SS": "engelsk (Sydsudan)", + "en_SX": "engelsk (Sint Maarten)", + "en_SZ": "engelsk (Swaziland)", + "en_TC": "engelsk (Turks- og Caicosøerne)", + "en_TK": "engelsk (Tokelau)", + "en_TO": "engelsk (Tonga)", + "en_TT": "engelsk (Trinidad og Tobago)", + "en_TV": "engelsk (Tuvalu)", + "en_TZ": "engelsk (Tanzania)", + "en_UG": "engelsk (Uganda)", + "en_UM": "engelsk (Amerikanske oversøiske øer)", + "en_US": "engelsk (USA)", + "en_VC": "engelsk (Saint Vincent og Grenadinerne)", + "en_VG": "engelsk (De Britiske Jomfruøer)", + "en_VI": "engelsk (De Amerikanske Jomfruøer)", + "en_VU": "engelsk (Vanuatu)", + "en_WS": "engelsk (Samoa)", + "en_ZA": "engelsk (Sydafrika)", + "en_ZM": "engelsk (Zambia)", + "en_ZW": "engelsk (Zimbabwe)", + "eo": "esperanto", + "es": "spansk", + "es_AR": "spansk (Argentina)", + "es_BO": "spansk (Bolivia)", + "es_BR": "spansk (Brasilien)", + "es_CL": "spansk (Chile)", + "es_CO": "spansk (Colombia)", + "es_CR": "spansk (Costa Rica)", + "es_CU": "spansk (Cuba)", + "es_DO": "spansk (Den Dominikanske Republik)", + "es_EA": "spansk (Ceuta og Melilla)", + "es_EC": "spansk (Ecuador)", + "es_ES": "spansk (Spanien)", + "es_GQ": "spansk (Ækvatorialguinea)", + "es_GT": "spansk (Guatemala)", + "es_HN": "spansk (Honduras)", + "es_IC": "spansk (Kanariske øer)", + "es_MX": "spansk (Mexico)", + "es_NI": "spansk (Nicaragua)", + "es_PA": "spansk (Panama)", + "es_PE": "spansk (Peru)", + "es_PH": "spansk (Filippinerne)", + "es_PR": "spansk (Puerto Rico)", + "es_PY": "spansk (Paraguay)", + "es_SV": "spansk (El Salvador)", + "es_US": "spansk (USA)", + "es_UY": "spansk (Uruguay)", + "es_VE": "spansk (Venezuela)", + "et": "estisk", + "et_EE": "estisk (Estland)", + "eu": "baskisk", + "eu_ES": "baskisk (Spanien)", + "fa": "persisk", + "fa_AF": "persisk (Afghanistan)", + "fa_IR": "persisk (Iran)", + "ff": "fulah", + "ff_CM": "fulah (Cameroun)", + "ff_GN": "fulah (Guinea)", + "ff_MR": "fulah (Mauretanien)", + "ff_SN": "fulah (Senegal)", + "fi": "finsk", + "fi_FI": "finsk (Finland)", + "fo": "færøsk", + "fo_DK": "færøsk (Danmark)", + "fo_FO": "færøsk (Færøerne)", + "fr": "fransk", + "fr_BE": "fransk (Belgien)", + "fr_BF": "fransk (Burkina Faso)", + "fr_BI": "fransk (Burundi)", + "fr_BJ": "fransk (Benin)", + "fr_BL": "fransk (Saint Barthélemy)", + "fr_CA": "fransk (Canada)", + "fr_CD": "fransk (Congo-Kinshasa)", + "fr_CF": "fransk (Den Centralafrikanske Republik)", + "fr_CG": "fransk (Congo-Brazzaville)", + "fr_CH": "fransk (Schweiz)", + "fr_CI": "fransk (Elfenbenskysten)", + "fr_CM": "fransk (Cameroun)", + "fr_DJ": "fransk (Djibouti)", + "fr_DZ": "fransk (Algeriet)", + "fr_FR": "fransk (Frankrig)", + "fr_GA": "fransk (Gabon)", + "fr_GF": "fransk (Fransk Guyana)", + "fr_GN": "fransk (Guinea)", + "fr_GP": "fransk (Guadeloupe)", + "fr_GQ": "fransk (Ækvatorialguinea)", + "fr_HT": "fransk (Haiti)", + "fr_KM": "fransk (Comorerne)", + "fr_LU": "fransk (Luxembourg)", + "fr_MA": "fransk (Marokko)", + "fr_MC": "fransk (Monaco)", + "fr_MF": "fransk (Saint Martin)", + "fr_MG": "fransk (Madagaskar)", + "fr_ML": "fransk (Mali)", + "fr_MQ": "fransk (Martinique)", + "fr_MR": "fransk (Mauretanien)", + "fr_MU": "fransk (Mauritius)", + "fr_NC": "fransk (Ny Kaledonien)", + "fr_NE": "fransk (Niger)", + "fr_PF": "fransk (Fransk Polynesien)", + "fr_PM": "fransk (Saint Pierre og Miquelon)", + "fr_RE": "fransk (Réunion)", + "fr_RW": "fransk (Rwanda)", + "fr_SC": "fransk (Seychellerne)", + "fr_SN": "fransk (Senegal)", + "fr_SY": "fransk (Syrien)", + "fr_TD": "fransk (Tchad)", + "fr_TG": "fransk (Togo)", + "fr_TN": "fransk (Tunesien)", + "fr_VU": "fransk (Vanuatu)", + "fr_WF": "fransk (Wallis og Futuna)", + "fr_YT": "fransk (Mayotte)", + "fy": "frisisk", + "fy_NL": "frisisk (Holland)", + "ga": "irsk", + "ga_IE": "irsk (Irland)", + "gd": "skotsk gælisk", + "gd_GB": "skotsk gælisk (Storbritannien)", + "gl": "galicisk", + "gl_ES": "galicisk (Spanien)", + "gu": "gujarati", + "gu_IN": "gujarati (Indien)", + "gv": "manx", + "gv_IM": "manx (Isle of Man)", + "ha": "hausa", + "ha_GH": "hausa (Ghana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigeria)", + "he": "hebraisk", + "he_IL": "hebraisk (Israel)", + "hi": "hindi", + "hi_IN": "hindi (Indien)", + "hr": "kroatisk", + "hr_BA": "kroatisk (Bosnien-Hercegovina)", + "hr_HR": "kroatisk (Kroatien)", + "hu": "ungarsk", + "hu_HU": "ungarsk (Ungarn)", + "hy": "armensk", + "hy_AM": "armensk (Armenien)", + "id": "indonesisk", + "id_ID": "indonesisk (Indonesien)", + "ig": "igbo", + "ig_NG": "igbo (Nigeria)", + "ii": "sichuan yi", + "ii_CN": "sichuan yi (Kina)", + "is": "islandsk", + "is_IS": "islandsk (Island)", + "it": "italiensk", + "it_CH": "italiensk (Schweiz)", + "it_IT": "italiensk (Italien)", + "it_SM": "italiensk (San Marino)", + "ja": "japansk", + "ja_JP": "japansk (Japan)", + "ka": "georgisk", + "ka_GE": "georgisk (Georgien)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenya)", + "kk": "kasakhisk", + "kk_KZ": "kasakhisk (Kasakhstan)", + "kl": "grønlandsk", + "kl_GL": "grønlandsk (Grønland)", + "km": "khmer", + "km_KH": "khmer (Cambodja)", + "kn": "kannada", + "kn_IN": "kannada (Indien)", + "ko": "koreansk", + "ko_KP": "koreansk (Nordkorea)", + "ko_KR": "koreansk (Sydkorea)", + "ks": "kashmiri", + "ks_IN": "kashmiri (Indien)", + "kw": "cornisk", + "kw_GB": "cornisk (Storbritannien)", + "ky": "kirgisisk", + "ky_KG": "kirgisisk (Kirgisistan)", + "lb": "luxembourgsk", + "lb_LU": "luxembourgsk (Luxembourg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Congo-Kinshasa)", + "ln_CF": "lingala (Den Centralafrikanske Republik)", + "ln_CG": "lingala (Congo-Brazzaville)", + "lo": "lao", + "lo_LA": "lao (Laos)", + "lt": "litauisk", + "lt_LT": "litauisk (Litauen)", + "lu": "luba-Katanga", + "lu_CD": "luba-Katanga (Congo-Kinshasa)", + "lv": "lettisk", + "lv_LV": "lettisk (Letland)", + "mg": "malagassisk", + "mg_MG": "malagassisk (Madagaskar)", + "mk": "makedonsk", + "mk_MK": "makedonsk (Makedonien)", + "ml": "malayalam", + "ml_IN": "malayalam (Indien)", + "mn": "mongolsk", + "mn_MN": "mongolsk (Mongoliet)", + "mr": "marathisk", + "mr_IN": "marathisk (Indien)", + "ms": "malajisk", + "ms_BN": "malajisk (Brunei)", + "ms_MY": "malajisk (Malaysia)", + "ms_SG": "malajisk (Singapore)", + "mt": "maltesisk", + "mt_MT": "maltesisk (Malta)", + "my": "burmesisk", + "my_MM": "burmesisk (Myanmar (Burma))", + "nb": "norsk bokmÃ¥l", + "nb_NO": "norsk bokmÃ¥l (Norge)", + "nb_SJ": "norsk bokmÃ¥l (Svalbard og Jan Mayen)", + "nd": "nordndebele", + "nd_ZW": "nordndebele (Zimbabwe)", + "ne": "nepalesisk", + "ne_IN": "nepalesisk (Indien)", + "ne_NP": "nepalesisk (Nepal)", + "nl": "hollandsk", + "nl_AW": "hollandsk (Aruba)", + "nl_BE": "hollandsk (Belgien)", + "nl_BQ": "hollandsk (De tidligere Nederlandske Antiller)", + "nl_CW": "hollandsk (Curaçao)", + "nl_NL": "hollandsk (Holland)", + "nl_SR": "hollandsk (Surinam)", + "nl_SX": "hollandsk (Sint Maarten)", + "nn": "nynorsk", + "nn_NO": "nynorsk (Norge)", + "no": "norsk", + "no_NO": "norsk (Norge)", + "om": "oromo", + "om_ET": "oromo (Etiopien)", + "om_KE": "oromo (Kenya)", + "or": "oriya", + "or_IN": "oriya (Indien)", + "os": "ossetisk", + "os_GE": "ossetisk (Georgien)", + "os_RU": "ossetisk (Rusland)", + "pa": "punjabisk", + "pa_Arab": "punjabisk (arabisk)", + "pa_Arab_PK": "punjabisk (arabisk, Pakistan)", + "pa_Guru": "punjabisk (gurmukhi)", + "pa_Guru_IN": "punjabisk (gurmukhi, Indien)", + "pa_IN": "punjabisk (Indien)", + "pa_PK": "punjabisk (Pakistan)", + "pl": "polsk", + "pl_PL": "polsk (Polen)", + "ps": "pashto", + "ps_AF": "pashto (Afghanistan)", + "pt": "portugisisk", + "pt_AO": "portugisisk (Angola)", + "pt_BR": "portugisisk (Brasilien)", + "pt_CH": "portugisisk (Schweiz)", + "pt_CV": "portugisisk (Kap Verde)", + "pt_GQ": "portugisisk (Ækvatorialguinea)", + "pt_GW": "portugisisk (Guinea-Bissau)", + "pt_LU": "portugisisk (Luxembourg)", + "pt_MO": "portugisisk (SAR Macao)", + "pt_MZ": "portugisisk (Mozambique)", + "pt_PT": "portugisisk (Portugal)", + "pt_ST": "portugisisk (São Tomé og Príncipe)", + "pt_TL": "portugisisk (Timor-Leste)", + "qu": "quechua", + "qu_BO": "quechua (Bolivia)", + "qu_EC": "quechua (Ecuador)", + "qu_PE": "quechua (Peru)", + "rm": "rætoromansk", + "rm_CH": "rætoromansk (Schweiz)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumænsk", + "ro_MD": "rumænsk (Moldova)", + "ro_RO": "rumænsk (Rumænien)", + "ru": "russisk", + "ru_BY": "russisk (Hviderusland)", + "ru_KG": "russisk (Kirgisistan)", + "ru_KZ": "russisk (Kasakhstan)", + "ru_MD": "russisk (Moldova)", + "ru_RU": "russisk (Rusland)", + "ru_UA": "russisk (Ukraine)", + "rw": "kinyarwanda", + "rw_RW": "kinyarwanda (Rwanda)", + "se": "nordsamisk", + "se_FI": "nordsamisk (Finland)", + "se_NO": "nordsamisk (Norge)", + "se_SE": "nordsamisk (Sverige)", + "sg": "sango", + "sg_CF": "sango (Den Centralafrikanske Republik)", + "sh": "serbokroatisk", + "sh_BA": "serbokroatisk (Bosnien-Hercegovina)", + "si": "singalesisk", + "si_LK": "singalesisk (Sri Lanka)", + "sk": "slovakisk", + "sk_SK": "slovakisk (Slovakiet)", + "sl": "slovensk", + "sl_SI": "slovensk (Slovenien)", + "sn": "shona", + "sn_ZW": "shona (Zimbabwe)", + "so": "somalisk", + "so_DJ": "somalisk (Djibouti)", + "so_ET": "somalisk (Etiopien)", + "so_KE": "somalisk (Kenya)", + "so_SO": "somalisk (Somalia)", + "sq": "albansk", + "sq_AL": "albansk (Albanien)", + "sq_MK": "albansk (Makedonien)", + "sq_XK": "albansk (Kosovo)", + "sr": "serbisk", + "sr_BA": "serbisk (Bosnien-Hercegovina)", + "sr_Cyrl": "serbisk (kyrillisk)", + "sr_Cyrl_BA": "serbisk (kyrillisk, Bosnien-Hercegovina)", + "sr_Cyrl_ME": "serbisk (kyrillisk, Montenegro)", + "sr_Cyrl_RS": "serbisk (kyrillisk, Serbien)", + "sr_Cyrl_XK": "serbisk (kyrillisk, Kosovo)", + "sr_Latn": "serbisk (latinsk)", + "sr_Latn_BA": "serbisk (latinsk, Bosnien-Hercegovina)", + "sr_Latn_ME": "serbisk (latinsk, Montenegro)", + "sr_Latn_RS": "serbisk (latinsk, Serbien)", + "sr_Latn_XK": "serbisk (latinsk, Kosovo)", + "sr_ME": "serbisk (Montenegro)", + "sr_RS": "serbisk (Serbien)", + "sr_XK": "serbisk (Kosovo)", + "sv": "svensk", + "sv_AX": "svensk (Ã…land)", + "sv_FI": "svensk (Finland)", + "sv_SE": "svensk (Sverige)", + "sw": "swahili", + "sw_CD": "swahili (Congo-Kinshasa)", + "sw_KE": "swahili (Kenya)", + "sw_TZ": "swahili (Tanzania)", + "sw_UG": "swahili (Uganda)", + "ta": "tamilsk", + "ta_IN": "tamilsk (Indien)", + "ta_LK": "tamilsk (Sri Lanka)", + "ta_MY": "tamilsk (Malaysia)", + "ta_SG": "tamilsk (Singapore)", + "te": "telugu", + "te_IN": "telugu (Indien)", + "th": "thai", + "th_TH": "thai (Thailand)", + "ti": "tigrinya", + "ti_ER": "tigrinya (Eritrea)", + "ti_ET": "tigrinya (Etiopien)", + "tl": "tagalog", + "tl_PH": "tagalog (Filippinerne)", + "to": "tongansk", + "to_TO": "tongansk (Tonga)", + "tr": "tyrkisk", + "tr_CY": "tyrkisk (Cypern)", + "tr_TR": "tyrkisk (Tyrkiet)", + "ug": "uygurisk", + "ug_CN": "uygurisk (Kina)", + "uk": "ukrainsk", + "uk_UA": "ukrainsk (Ukraine)", + "ur": "urdu", + "ur_IN": "urdu (Indien)", + "ur_PK": "urdu (Pakistan)", + "uz": "usbekisk", + "uz_AF": "usbekisk (Afghanistan)", + "uz_Arab": "usbekisk (arabisk)", + "uz_Arab_AF": "usbekisk (arabisk, Afghanistan)", + "uz_Cyrl": "usbekisk (kyrillisk)", + "uz_Cyrl_UZ": "usbekisk (kyrillisk, Usbekistan)", + "uz_Latn": "usbekisk (latinsk)", + "uz_Latn_UZ": "usbekisk (latinsk, Usbekistan)", + "uz_UZ": "usbekisk (Usbekistan)", + "vi": "vietnamesisk", + "vi_VN": "vietnamesisk (Vietnam)", + "yi": "jiddisch", + "yo": "yoruba", + "yo_BJ": "yoruba (Benin)", + "yo_NG": "yoruba (Nigeria)", + "zh": "kinesisk", + "zh_CN": "kinesisk (Kina)", + "zh_HK": "kinesisk (SAR Hongkong)", + "zh_Hans": "kinesisk (forenklet)", + "zh_Hans_CN": "kinesisk (forenklet, Kina)", + "zh_Hans_HK": "kinesisk (forenklet, SAR Hongkong)", + "zh_Hans_MO": "kinesisk (forenklet, SAR Macao)", + "zh_Hans_SG": "kinesisk (forenklet, Singapore)", + "zh_Hant": "kinesisk (traditionelt)", + "zh_Hant_HK": "kinesisk (traditionelt, SAR Hongkong)", + "zh_Hant_MO": "kinesisk (traditionelt, SAR Macao)", + "zh_Hant_TW": "kinesisk (traditionelt, Taiwan)", + "zh_MO": "kinesisk (SAR Macao)", + "zh_SG": "kinesisk (Singapore)", + "zh_TW": "kinesisk (Taiwan)", + "zu": "zulu", + "zu_ZA": "zulu (Sydafrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/de.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/de.json new file mode 100644 index 0000000000000000000000000000000000000000..6c7f54faff7acd99c80e470f9510c6ca04b60fed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/de.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Afrikaans", + "af_NA": "Afrikaans (Namibia)", + "af_ZA": "Afrikaans (Südafrika)", + "ak": "Akan", + "ak_GH": "Akan (Ghana)", + "am": "Amharisch", + "am_ET": "Amharisch (Äthiopien)", + "ar": "Arabisch", + "ar_AE": "Arabisch (Vereinigte Arabische Emirate)", + "ar_BH": "Arabisch (Bahrain)", + "ar_DJ": "Arabisch (Dschibuti)", + "ar_DZ": "Arabisch (Algerien)", + "ar_EG": "Arabisch (Ägypten)", + "ar_EH": "Arabisch (Westsahara)", + "ar_ER": "Arabisch (Eritrea)", + "ar_IL": "Arabisch (Israel)", + "ar_IQ": "Arabisch (Irak)", + "ar_JO": "Arabisch (Jordanien)", + "ar_KM": "Arabisch (Komoren)", + "ar_KW": "Arabisch (Kuwait)", + "ar_LB": "Arabisch (Libanon)", + "ar_LY": "Arabisch (Libyen)", + "ar_MA": "Arabisch (Marokko)", + "ar_MR": "Arabisch (Mauretanien)", + "ar_OM": "Arabisch (Oman)", + "ar_PS": "Arabisch (Palästinensische Autonomiegebiete)", + "ar_QA": "Arabisch (Katar)", + "ar_SA": "Arabisch (Saudi-Arabien)", + "ar_SD": "Arabisch (Sudan)", + "ar_SO": "Arabisch (Somalia)", + "ar_SS": "Arabisch (Südsudan)", + "ar_SY": "Arabisch (Syrien)", + "ar_TD": "Arabisch (Tschad)", + "ar_TN": "Arabisch (Tunesien)", + "ar_YE": "Arabisch (Jemen)", + "as": "Assamesisch", + "as_IN": "Assamesisch (Indien)", + "az": "Aserbaidschanisch", + "az_AZ": "Aserbaidschanisch (Aserbaidschan)", + "az_Cyrl": "Aserbaidschanisch (Kyrillisch)", + "az_Cyrl_AZ": "Aserbaidschanisch (Kyrillisch, Aserbaidschan)", + "az_Latn": "Aserbaidschanisch (Lateinisch)", + "az_Latn_AZ": "Aserbaidschanisch (Lateinisch, Aserbaidschan)", + "be": "Weißrussisch", + "be_BY": "Weißrussisch (Belarus)", + "bg": "Bulgarisch", + "bg_BG": "Bulgarisch (Bulgarien)", + "bm": "Bambara", + "bm_ML": "Bambara (Mali)", + "bn": "Bengalisch", + "bn_BD": "Bengalisch (Bangladesch)", + "bn_IN": "Bengalisch (Indien)", + "bo": "Tibetisch", + "bo_CN": "Tibetisch (China)", + "bo_IN": "Tibetisch (Indien)", + "br": "Bretonisch", + "br_FR": "Bretonisch (Frankreich)", + "bs": "Bosnisch", + "bs_BA": "Bosnisch (Bosnien und Herzegowina)", + "bs_Cyrl": "Bosnisch (Kyrillisch)", + "bs_Cyrl_BA": "Bosnisch (Kyrillisch, Bosnien und Herzegowina)", + "bs_Latn": "Bosnisch (Lateinisch)", + "bs_Latn_BA": "Bosnisch (Lateinisch, Bosnien und Herzegowina)", + "ca": "Katalanisch", + "ca_AD": "Katalanisch (Andorra)", + "ca_ES": "Katalanisch (Spanien)", + "ca_FR": "Katalanisch (Frankreich)", + "ca_IT": "Katalanisch (Italien)", + "ce": "Tschetschenisch", + "ce_RU": "Tschetschenisch (Russland)", + "cs": "Tschechisch", + "cs_CZ": "Tschechisch (Tschechische Republik)", + "cy": "Walisisch", + "cy_GB": "Walisisch (Vereinigtes Königreich)", + "da": "Dänisch", + "da_DK": "Dänisch (Dänemark)", + "da_GL": "Dänisch (Grönland)", + "de": "Deutsch", + "de_AT": "Deutsch (Österreich)", + "de_BE": "Deutsch (Belgien)", + "de_CH": "Deutsch (Schweiz)", + "de_DE": "Deutsch (Deutschland)", + "de_IT": "Deutsch (Italien)", + "de_LI": "Deutsch (Liechtenstein)", + "de_LU": "Deutsch (Luxemburg)", + "dz": "Dzongkha", + "dz_BT": "Dzongkha (Bhutan)", + "ee": "Ewe", + "ee_GH": "Ewe (Ghana)", + "ee_TG": "Ewe (Togo)", + "el": "Griechisch", + "el_CY": "Griechisch (Zypern)", + "el_GR": "Griechisch (Griechenland)", + "en": "Englisch", + "en_AG": "Englisch (Antigua und Barbuda)", + "en_AI": "Englisch (Anguilla)", + "en_AS": "Englisch (Amerikanisch-Samoa)", + "en_AT": "Englisch (Österreich)", + "en_AU": "Englisch (Australien)", + "en_BB": "Englisch (Barbados)", + "en_BE": "Englisch (Belgien)", + "en_BI": "Englisch (Burundi)", + "en_BM": "Englisch (Bermuda)", + "en_BS": "Englisch (Bahamas)", + "en_BW": "Englisch (Botsuana)", + "en_BZ": "Englisch (Belize)", + "en_CA": "Englisch (Kanada)", + "en_CC": "Englisch (Kokosinseln)", + "en_CH": "Englisch (Schweiz)", + "en_CK": "Englisch (Cookinseln)", + "en_CM": "Englisch (Kamerun)", + "en_CX": "Englisch (Weihnachtsinsel)", + "en_CY": "Englisch (Zypern)", + "en_DE": "Englisch (Deutschland)", + "en_DG": "Englisch (Diego Garcia)", + "en_DK": "Englisch (Dänemark)", + "en_DM": "Englisch (Dominica)", + "en_ER": "Englisch (Eritrea)", + "en_FI": "Englisch (Finnland)", + "en_FJ": "Englisch (Fidschi)", + "en_FK": "Englisch (Falklandinseln)", + "en_FM": "Englisch (Mikronesien)", + "en_GB": "Englisch (Vereinigtes Königreich)", + "en_GD": "Englisch (Grenada)", + "en_GG": "Englisch (Guernsey)", + "en_GH": "Englisch (Ghana)", + "en_GI": "Englisch (Gibraltar)", + "en_GM": "Englisch (Gambia)", + "en_GU": "Englisch (Guam)", + "en_GY": "Englisch (Guyana)", + "en_HK": "Englisch (Sonderverwaltungszone Hongkong)", + "en_IE": "Englisch (Irland)", + "en_IL": "Englisch (Israel)", + "en_IM": "Englisch (Isle of Man)", + "en_IN": "Englisch (Indien)", + "en_IO": "Englisch (Britisches Territorium im Indischen Ozean)", + "en_JE": "Englisch (Jersey)", + "en_JM": "Englisch (Jamaika)", + "en_KE": "Englisch (Kenia)", + "en_KI": "Englisch (Kiribati)", + "en_KN": "Englisch (St. Kitts und Nevis)", + "en_KY": "Englisch (Kaimaninseln)", + "en_LC": "Englisch (St. Lucia)", + "en_LR": "Englisch (Liberia)", + "en_LS": "Englisch (Lesotho)", + "en_MG": "Englisch (Madagaskar)", + "en_MH": "Englisch (Marshallinseln)", + "en_MO": "Englisch (Sonderverwaltungsregion Macau)", + "en_MP": "Englisch (Nördliche Marianen)", + "en_MS": "Englisch (Montserrat)", + "en_MT": "Englisch (Malta)", + "en_MU": "Englisch (Mauritius)", + "en_MW": "Englisch (Malawi)", + "en_MY": "Englisch (Malaysia)", + "en_NA": "Englisch (Namibia)", + "en_NF": "Englisch (Norfolkinsel)", + "en_NG": "Englisch (Nigeria)", + "en_NL": "Englisch (Niederlande)", + "en_NR": "Englisch (Nauru)", + "en_NU": "Englisch (Niue)", + "en_NZ": "Englisch (Neuseeland)", + "en_PG": "Englisch (Papua-Neuguinea)", + "en_PH": "Englisch (Philippinen)", + "en_PK": "Englisch (Pakistan)", + "en_PN": "Englisch (Pitcairninseln)", + "en_PR": "Englisch (Puerto Rico)", + "en_PW": "Englisch (Palau)", + "en_RW": "Englisch (Ruanda)", + "en_SB": "Englisch (Salomonen)", + "en_SC": "Englisch (Seychellen)", + "en_SD": "Englisch (Sudan)", + "en_SE": "Englisch (Schweden)", + "en_SG": "Englisch (Singapur)", + "en_SH": "Englisch (St. Helena)", + "en_SI": "Englisch (Slowenien)", + "en_SL": "Englisch (Sierra Leone)", + "en_SS": "Englisch (Südsudan)", + "en_SX": "Englisch (Sint Maarten)", + "en_SZ": "Englisch (Swasiland)", + "en_TC": "Englisch (Turks- und Caicosinseln)", + "en_TK": "Englisch (Tokelau)", + "en_TO": "Englisch (Tonga)", + "en_TT": "Englisch (Trinidad und Tobago)", + "en_TV": "Englisch (Tuvalu)", + "en_TZ": "Englisch (Tansania)", + "en_UG": "Englisch (Uganda)", + "en_UM": "Englisch (Amerikanische Überseeinseln)", + "en_US": "Englisch (Vereinigte Staaten)", + "en_VC": "Englisch (St. Vincent und die Grenadinen)", + "en_VG": "Englisch (Britische Jungferninseln)", + "en_VI": "Englisch (Amerikanische Jungferninseln)", + "en_VU": "Englisch (Vanuatu)", + "en_WS": "Englisch (Samoa)", + "en_ZA": "Englisch (Südafrika)", + "en_ZM": "Englisch (Sambia)", + "en_ZW": "Englisch (Simbabwe)", + "eo": "Esperanto", + "es": "Spanisch", + "es_AR": "Spanisch (Argentinien)", + "es_BO": "Spanisch (Bolivien)", + "es_BR": "Spanisch (Brasilien)", + "es_CL": "Spanisch (Chile)", + "es_CO": "Spanisch (Kolumbien)", + "es_CR": "Spanisch (Costa Rica)", + "es_CU": "Spanisch (Kuba)", + "es_DO": "Spanisch (Dominikanische Republik)", + "es_EA": "Spanisch (Ceuta und Melilla)", + "es_EC": "Spanisch (Ecuador)", + "es_ES": "Spanisch (Spanien)", + "es_GQ": "Spanisch (Äquatorialguinea)", + "es_GT": "Spanisch (Guatemala)", + "es_HN": "Spanisch (Honduras)", + "es_IC": "Spanisch (Kanarische Inseln)", + "es_MX": "Spanisch (Mexiko)", + "es_NI": "Spanisch (Nicaragua)", + "es_PA": "Spanisch (Panama)", + "es_PE": "Spanisch (Peru)", + "es_PH": "Spanisch (Philippinen)", + "es_PR": "Spanisch (Puerto Rico)", + "es_PY": "Spanisch (Paraguay)", + "es_SV": "Spanisch (El Salvador)", + "es_US": "Spanisch (Vereinigte Staaten)", + "es_UY": "Spanisch (Uruguay)", + "es_VE": "Spanisch (Venezuela)", + "et": "Estnisch", + "et_EE": "Estnisch (Estland)", + "eu": "Baskisch", + "eu_ES": "Baskisch (Spanien)", + "fa": "Persisch", + "fa_AF": "Persisch (Afghanistan)", + "fa_IR": "Persisch (Iran)", + "ff": "Ful", + "ff_CM": "Ful (Kamerun)", + "ff_GN": "Ful (Guinea)", + "ff_MR": "Ful (Mauretanien)", + "ff_SN": "Ful (Senegal)", + "fi": "Finnisch", + "fi_FI": "Finnisch (Finnland)", + "fo": "Färöisch", + "fo_DK": "Färöisch (Dänemark)", + "fo_FO": "Färöisch (Färöer)", + "fr": "Französisch", + "fr_BE": "Französisch (Belgien)", + "fr_BF": "Französisch (Burkina Faso)", + "fr_BI": "Französisch (Burundi)", + "fr_BJ": "Französisch (Benin)", + "fr_BL": "Französisch (St. Barthélemy)", + "fr_CA": "Französisch (Kanada)", + "fr_CD": "Französisch (Kongo-Kinshasa)", + "fr_CF": "Französisch (Zentralafrikanische Republik)", + "fr_CG": "Französisch (Kongo-Brazzaville)", + "fr_CH": "Französisch (Schweiz)", + "fr_CI": "Französisch (Côte d’Ivoire)", + "fr_CM": "Französisch (Kamerun)", + "fr_DJ": "Französisch (Dschibuti)", + "fr_DZ": "Französisch (Algerien)", + "fr_FR": "Französisch (Frankreich)", + "fr_GA": "Französisch (Gabun)", + "fr_GF": "Französisch (Französisch-Guayana)", + "fr_GN": "Französisch (Guinea)", + "fr_GP": "Französisch (Guadeloupe)", + "fr_GQ": "Französisch (Äquatorialguinea)", + "fr_HT": "Französisch (Haiti)", + "fr_KM": "Französisch (Komoren)", + "fr_LU": "Französisch (Luxemburg)", + "fr_MA": "Französisch (Marokko)", + "fr_MC": "Französisch (Monaco)", + "fr_MF": "Französisch (St. Martin)", + "fr_MG": "Französisch (Madagaskar)", + "fr_ML": "Französisch (Mali)", + "fr_MQ": "Französisch (Martinique)", + "fr_MR": "Französisch (Mauretanien)", + "fr_MU": "Französisch (Mauritius)", + "fr_NC": "Französisch (Neukaledonien)", + "fr_NE": "Französisch (Niger)", + "fr_PF": "Französisch (Französisch-Polynesien)", + "fr_PM": "Französisch (St. Pierre und Miquelon)", + "fr_RE": "Französisch (Réunion)", + "fr_RW": "Französisch (Ruanda)", + "fr_SC": "Französisch (Seychellen)", + "fr_SN": "Französisch (Senegal)", + "fr_SY": "Französisch (Syrien)", + "fr_TD": "Französisch (Tschad)", + "fr_TG": "Französisch (Togo)", + "fr_TN": "Französisch (Tunesien)", + "fr_VU": "Französisch (Vanuatu)", + "fr_WF": "Französisch (Wallis und Futuna)", + "fr_YT": "Französisch (Mayotte)", + "fy": "Westfriesisch", + "fy_NL": "Westfriesisch (Niederlande)", + "ga": "Irisch", + "ga_IE": "Irisch (Irland)", + "gd": "Schottisches Gälisch", + "gd_GB": "Schottisches Gälisch (Vereinigtes Königreich)", + "gl": "Galicisch", + "gl_ES": "Galicisch (Spanien)", + "gu": "Gujarati", + "gu_IN": "Gujarati (Indien)", + "gv": "Manx", + "gv_IM": "Manx (Isle of Man)", + "ha": "Haussa", + "ha_GH": "Haussa (Ghana)", + "ha_NE": "Haussa (Niger)", + "ha_NG": "Haussa (Nigeria)", + "he": "Hebräisch", + "he_IL": "Hebräisch (Israel)", + "hi": "Hindi", + "hi_IN": "Hindi (Indien)", + "hr": "Kroatisch", + "hr_BA": "Kroatisch (Bosnien und Herzegowina)", + "hr_HR": "Kroatisch (Kroatien)", + "hu": "Ungarisch", + "hu_HU": "Ungarisch (Ungarn)", + "hy": "Armenisch", + "hy_AM": "Armenisch (Armenien)", + "id": "Indonesisch", + "id_ID": "Indonesisch (Indonesien)", + "ig": "Igbo", + "ig_NG": "Igbo (Nigeria)", + "ii": "Yi", + "ii_CN": "Yi (China)", + "is": "Isländisch", + "is_IS": "Isländisch (Island)", + "it": "Italienisch", + "it_CH": "Italienisch (Schweiz)", + "it_IT": "Italienisch (Italien)", + "it_SM": "Italienisch (San Marino)", + "ja": "Japanisch", + "ja_JP": "Japanisch (Japan)", + "ka": "Georgisch", + "ka_GE": "Georgisch (Georgien)", + "ki": "Kikuyu", + "ki_KE": "Kikuyu (Kenia)", + "kk": "Kasachisch", + "kk_KZ": "Kasachisch (Kasachstan)", + "kl": "Grönländisch", + "kl_GL": "Grönländisch (Grönland)", + "km": "Khmer", + "km_KH": "Khmer (Kambodscha)", + "kn": "Kannada", + "kn_IN": "Kannada (Indien)", + "ko": "Koreanisch", + "ko_KP": "Koreanisch (Nordkorea)", + "ko_KR": "Koreanisch (Südkorea)", + "ks": "Kaschmiri", + "ks_IN": "Kaschmiri (Indien)", + "kw": "Kornisch", + "kw_GB": "Kornisch (Vereinigtes Königreich)", + "ky": "Kirgisisch", + "ky_KG": "Kirgisisch (Kirgisistan)", + "lb": "Luxemburgisch", + "lb_LU": "Luxemburgisch (Luxemburg)", + "lg": "Ganda", + "lg_UG": "Ganda (Uganda)", + "ln": "Lingala", + "ln_AO": "Lingala (Angola)", + "ln_CD": "Lingala (Kongo-Kinshasa)", + "ln_CF": "Lingala (Zentralafrikanische Republik)", + "ln_CG": "Lingala (Kongo-Brazzaville)", + "lo": "Laotisch", + "lo_LA": "Laotisch (Laos)", + "lt": "Litauisch", + "lt_LT": "Litauisch (Litauen)", + "lu": "Luba-Katanga", + "lu_CD": "Luba-Katanga (Kongo-Kinshasa)", + "lv": "Lettisch", + "lv_LV": "Lettisch (Lettland)", + "mg": "Madagassisch", + "mg_MG": "Madagassisch (Madagaskar)", + "mk": "Mazedonisch", + "mk_MK": "Mazedonisch (Mazedonien)", + "ml": "Malayalam", + "ml_IN": "Malayalam (Indien)", + "mn": "Mongolisch", + "mn_MN": "Mongolisch (Mongolei)", + "mr": "Marathi", + "mr_IN": "Marathi (Indien)", + "ms": "Malaiisch", + "ms_BN": "Malaiisch (Brunei Darussalam)", + "ms_MY": "Malaiisch (Malaysia)", + "ms_SG": "Malaiisch (Singapur)", + "mt": "Maltesisch", + "mt_MT": "Maltesisch (Malta)", + "my": "Birmanisch", + "my_MM": "Birmanisch (Myanmar)", + "nb": "Norwegisch BokmÃ¥l", + "nb_NO": "Norwegisch BokmÃ¥l (Norwegen)", + "nb_SJ": "Norwegisch BokmÃ¥l (Spitzbergen)", + "nd": "Nord-Ndebele", + "nd_ZW": "Nord-Ndebele (Simbabwe)", + "ne": "Nepalesisch", + "ne_IN": "Nepalesisch (Indien)", + "ne_NP": "Nepalesisch (Nepal)", + "nl": "Niederländisch", + "nl_AW": "Niederländisch (Aruba)", + "nl_BE": "Niederländisch (Belgien)", + "nl_BQ": "Niederländisch (Bonaire, Sint Eustatius und Saba)", + "nl_CW": "Niederländisch (Curaçao)", + "nl_NL": "Niederländisch (Niederlande)", + "nl_SR": "Niederländisch (Suriname)", + "nl_SX": "Niederländisch (Sint Maarten)", + "nn": "Norwegisch Nynorsk", + "nn_NO": "Norwegisch Nynorsk (Norwegen)", + "no": "Norwegisch", + "no_NO": "Norwegisch (Norwegen)", + "om": "Oromo", + "om_ET": "Oromo (Äthiopien)", + "om_KE": "Oromo (Kenia)", + "or": "Oriya", + "or_IN": "Oriya (Indien)", + "os": "Ossetisch", + "os_GE": "Ossetisch (Georgien)", + "os_RU": "Ossetisch (Russland)", + "pa": "Punjabi", + "pa_Arab": "Punjabi (Arabisch)", + "pa_Arab_PK": "Punjabi (Arabisch, Pakistan)", + "pa_Guru": "Punjabi (Gurmukhi)", + "pa_Guru_IN": "Punjabi (Gurmukhi, Indien)", + "pa_IN": "Punjabi (Indien)", + "pa_PK": "Punjabi (Pakistan)", + "pl": "Polnisch", + "pl_PL": "Polnisch (Polen)", + "ps": "Paschtu", + "ps_AF": "Paschtu (Afghanistan)", + "pt": "Portugiesisch", + "pt_AO": "Portugiesisch (Angola)", + "pt_BR": "Portugiesisch (Brasilien)", + "pt_CH": "Portugiesisch (Schweiz)", + "pt_CV": "Portugiesisch (Cabo Verde)", + "pt_GQ": "Portugiesisch (Äquatorialguinea)", + "pt_GW": "Portugiesisch (Guinea-Bissau)", + "pt_LU": "Portugiesisch (Luxemburg)", + "pt_MO": "Portugiesisch (Sonderverwaltungsregion Macau)", + "pt_MZ": "Portugiesisch (Mosambik)", + "pt_PT": "Portugiesisch (Portugal)", + "pt_ST": "Portugiesisch (São Tomé und Príncipe)", + "pt_TL": "Portugiesisch (Osttimor)", + "qu": "Quechua", + "qu_BO": "Quechua (Bolivien)", + "qu_EC": "Quechua (Ecuador)", + "qu_PE": "Quechua (Peru)", + "rm": "Rätoromanisch", + "rm_CH": "Rätoromanisch (Schweiz)", + "rn": "Rundi", + "rn_BI": "Rundi (Burundi)", + "ro": "Rumänisch", + "ro_MD": "Rumänisch (Republik Moldau)", + "ro_RO": "Rumänisch (Rumänien)", + "ru": "Russisch", + "ru_BY": "Russisch (Belarus)", + "ru_KG": "Russisch (Kirgisistan)", + "ru_KZ": "Russisch (Kasachstan)", + "ru_MD": "Russisch (Republik Moldau)", + "ru_RU": "Russisch (Russland)", + "ru_UA": "Russisch (Ukraine)", + "rw": "Kinyarwanda", + "rw_RW": "Kinyarwanda (Ruanda)", + "se": "Nordsamisch", + "se_FI": "Nordsamisch (Finnland)", + "se_NO": "Nordsamisch (Norwegen)", + "se_SE": "Nordsamisch (Schweden)", + "sg": "Sango", + "sg_CF": "Sango (Zentralafrikanische Republik)", + "sh": "Serbo-Kroatisch", + "sh_BA": "Serbo-Kroatisch (Bosnien und Herzegowina)", + "si": "Singhalesisch", + "si_LK": "Singhalesisch (Sri Lanka)", + "sk": "Slowakisch", + "sk_SK": "Slowakisch (Slowakei)", + "sl": "Slowenisch", + "sl_SI": "Slowenisch (Slowenien)", + "sn": "Shona", + "sn_ZW": "Shona (Simbabwe)", + "so": "Somali", + "so_DJ": "Somali (Dschibuti)", + "so_ET": "Somali (Äthiopien)", + "so_KE": "Somali (Kenia)", + "so_SO": "Somali (Somalia)", + "sq": "Albanisch", + "sq_AL": "Albanisch (Albanien)", + "sq_MK": "Albanisch (Mazedonien)", + "sq_XK": "Albanisch (Kosovo)", + "sr": "Serbisch", + "sr_BA": "Serbisch (Bosnien und Herzegowina)", + "sr_Cyrl": "Serbisch (Kyrillisch)", + "sr_Cyrl_BA": "Serbisch (Kyrillisch, Bosnien und Herzegowina)", + "sr_Cyrl_ME": "Serbisch (Kyrillisch, Montenegro)", + "sr_Cyrl_RS": "Serbisch (Kyrillisch, Serbien)", + "sr_Cyrl_XK": "Serbisch (Kyrillisch, Kosovo)", + "sr_Latn": "Serbisch (Lateinisch)", + "sr_Latn_BA": "Serbisch (Lateinisch, Bosnien und Herzegowina)", + "sr_Latn_ME": "Serbisch (Lateinisch, Montenegro)", + "sr_Latn_RS": "Serbisch (Lateinisch, Serbien)", + "sr_Latn_XK": "Serbisch (Lateinisch, Kosovo)", + "sr_ME": "Serbisch (Montenegro)", + "sr_RS": "Serbisch (Serbien)", + "sr_XK": "Serbisch (Kosovo)", + "sv": "Schwedisch", + "sv_AX": "Schwedisch (Ã…landinseln)", + "sv_FI": "Schwedisch (Finnland)", + "sv_SE": "Schwedisch (Schweden)", + "sw": "Suaheli", + "sw_CD": "Suaheli (Kongo-Kinshasa)", + "sw_KE": "Suaheli (Kenia)", + "sw_TZ": "Suaheli (Tansania)", + "sw_UG": "Suaheli (Uganda)", + "ta": "Tamil", + "ta_IN": "Tamil (Indien)", + "ta_LK": "Tamil (Sri Lanka)", + "ta_MY": "Tamil (Malaysia)", + "ta_SG": "Tamil (Singapur)", + "te": "Telugu", + "te_IN": "Telugu (Indien)", + "th": "Thailändisch", + "th_TH": "Thailändisch (Thailand)", + "ti": "Tigrinya", + "ti_ER": "Tigrinya (Eritrea)", + "ti_ET": "Tigrinya (Äthiopien)", + "tl": "Tagalog", + "tl_PH": "Tagalog (Philippinen)", + "to": "Tongaisch", + "to_TO": "Tongaisch (Tonga)", + "tr": "Türkisch", + "tr_CY": "Türkisch (Zypern)", + "tr_TR": "Türkisch (Türkei)", + "ug": "Uigurisch", + "ug_CN": "Uigurisch (China)", + "uk": "Ukrainisch", + "uk_UA": "Ukrainisch (Ukraine)", + "ur": "Urdu", + "ur_IN": "Urdu (Indien)", + "ur_PK": "Urdu (Pakistan)", + "uz": "Usbekisch", + "uz_AF": "Usbekisch (Afghanistan)", + "uz_Arab": "Usbekisch (Arabisch)", + "uz_Arab_AF": "Usbekisch (Arabisch, Afghanistan)", + "uz_Cyrl": "Usbekisch (Kyrillisch)", + "uz_Cyrl_UZ": "Usbekisch (Kyrillisch, Usbekistan)", + "uz_Latn": "Usbekisch (Lateinisch)", + "uz_Latn_UZ": "Usbekisch (Lateinisch, Usbekistan)", + "uz_UZ": "Usbekisch (Usbekistan)", + "vi": "Vietnamesisch", + "vi_VN": "Vietnamesisch (Vietnam)", + "yi": "Jiddisch", + "yo": "Yoruba", + "yo_BJ": "Yoruba (Benin)", + "yo_NG": "Yoruba (Nigeria)", + "zh": "Chinesisch", + "zh_CN": "Chinesisch (China)", + "zh_HK": "Chinesisch (Sonderverwaltungszone Hongkong)", + "zh_Hans": "Chinesisch (Vereinfacht)", + "zh_Hans_CN": "Chinesisch (Vereinfacht, China)", + "zh_Hans_HK": "Chinesisch (Vereinfacht, Sonderverwaltungszone Hongkong)", + "zh_Hans_MO": "Chinesisch (Vereinfacht, Sonderverwaltungsregion Macau)", + "zh_Hans_SG": "Chinesisch (Vereinfacht, Singapur)", + "zh_Hant": "Chinesisch (Traditionell)", + "zh_Hant_HK": "Chinesisch (Traditionell, Sonderverwaltungszone Hongkong)", + "zh_Hant_MO": "Chinesisch (Traditionell, Sonderverwaltungsregion Macau)", + "zh_Hant_TW": "Chinesisch (Traditionell, Taiwan)", + "zh_MO": "Chinesisch (Sonderverwaltungsregion Macau)", + "zh_SG": "Chinesisch (Singapur)", + "zh_TW": "Chinesisch (Taiwan)", + "zu": "Zulu", + "zu_ZA": "Zulu (Südafrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/de_AT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/de_AT.json new file mode 100644 index 0000000000000000000000000000000000000000..1476a52d31726eea8cc44c1abb6f778e986b775e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/de_AT.json @@ -0,0 +1,11 @@ +{ + "Names": { + "ha": "Hausa", + "ha_GH": "Hausa (Ghana)", + "ha_NE": "Hausa (Niger)", + "ha_NG": "Hausa (Nigeria)", + "nb_SJ": "Norwegisch BokmÃ¥l (Svalbard und Jan Mayen)", + "sh": "Serbokroatisch", + "sh_BA": "Serbokroatisch (Bosnien und Herzegowina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/de_CH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/de_CH.json new file mode 100644 index 0000000000000000000000000000000000000000..00f291ec324ab1ba9e057f78cd26c7001d41769e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/de_CH.json @@ -0,0 +1,18 @@ +{ + "Names": { + "be": "Weissrussisch", + "be_BY": "Weissrussisch (Weissrussland)", + "cy_GB": "Walisisch (Grossbritannien)", + "en_BW": "Englisch (Botswana)", + "en_GB": "Englisch (Grossbritannien)", + "en_SB": "Englisch (Salomon-Inseln)", + "en_ZW": "Englisch (Zimbabwe)", + "gd_GB": "Schottisches Gälisch (Grossbritannien)", + "kw_GB": "Kornisch (Grossbritannien)", + "ms_BN": "Malaiisch (Brunei)", + "nd_ZW": "Nord-Ndebele (Zimbabwe)", + "pt_CV": "Portugiesisch (Kapverden)", + "ru_BY": "Russisch (Weissrussland)", + "sn_ZW": "Shona (Zimbabwe)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/de_LU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/de_LU.json new file mode 100644 index 0000000000000000000000000000000000000000..60a39ec2a3b35605ef09ed4b1991c14991aa199a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/de_LU.json @@ -0,0 +1,6 @@ +{ + "Names": { + "be": "Belarussisch", + "be_BY": "Belarussisch (Belarus)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/dz.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/dz.json new file mode 100644 index 0000000000000000000000000000000000000000..9c83d9f1616f406e44935b77d8a02eafc672e842 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/dz.json @@ -0,0 +1,500 @@ +{ + "Names": { + "af": "ཨཕ་རི་ཀཱནས་à½", + "af_NA": "ཨཕ་རི་ཀཱནས་འ(ན་མི་བི་ཡ)", + "af_ZA": "ཨཕ་རི་ཀཱནས་འ(སཱའུà½à¼‹ ཨཕ་རི་ཀ)", + "am": "ཨམ་ཧ་རིཀ་à½", + "am_ET": "ཨམ་ཧ་རིཀ་འ(ཨི་à½à½²à¼‹à½¡à½¼à¼‹à½”ི་ཡ)", + "ar": "ཨེ་ར་བིཀ་à½", + "ar_AE": "ཨེ་ར་བིཀ་འ(ཡུ་ནཱའི་ཊེཌ་ ཨ་རབ་ ཨེ་མེ་རེཊས)", + "ar_BH": "ཨེ་ར་བིཀ་འ(བྷ་རེན)", + "ar_DJ": "ཨེ་ར་བིཀ་འ(ཇི་བྷུ་ཊི)", + "ar_DZ": "ཨེ་ར་བིཀ་འ(ཨཱལ་ཇི་རི་ཡ)", + "ar_EG": "ཨེ་ར་བིཀ་འ(ཨི་ཇིབཊ)", + "ar_EH": "ཨེ་ར་བིཀ་འ(ནུབ་ཕྱོགས་ ས་ཧཱ་ར)", + "ar_ER": "ཨེ་ར་བིཀ་འ(ཨེ་རི་ཊྲེ་ཡ)", + "ar_IL": "ཨེ་ར་བིཀ་འ(ཨིས་ར་ཡེལ)", + "ar_IQ": "ཨེ་ར་བིཀ་འ(ཨི་རཱཀ)", + "ar_JO": "ཨེ་ར་བིཀ་འ(ཇོར་ཌན)", + "ar_KM": "ཨེ་ར་བིཀ་འ(ཀོ་མོ་རོས)", + "ar_KW": "ཨེ་ར་བིཀ་འ(ཀུ་à½à½ºà½Š)", + "ar_LB": "ཨེ་ར་བིཀ་འ(ལེ་བ་ནོན)", + "ar_LY": "ཨེ་ར་བིཀ་འ(ལི་བི་ཡ)", + "ar_MA": "ཨེ་ར་བིཀ་འ(མོ་རོ་ཀོ)", + "ar_MR": "ཨེ་ར་བིཀ་འ(མོ་རི་ཊེ་ནི་ཡ)", + "ar_OM": "ཨེ་ར་བིཀ་འ(ཨོ་མཱན)", + "ar_PS": "ཨེ་ར་བིཀ་འ(པེ་ལིསི་ཊི་ནི་ཡན་ཊེ་རི་à½à½¼à¼‹à½¢à½²)", + "ar_QA": "ཨེ་ར་བིཀ་འ(ཀ་ཊར)", + "ar_SA": "ཨེ་ར་བིཀ་འ(སཱà½à¼‹à½‘ི་ ཨ་རེ་བྷི་ཡ)", + "ar_SD": "ཨེ་ར་བིཀ་འ(སུ་ཌཱན)", + "ar_SO": "ཨེ་ར་བིཀ་འ(སོ་མ་ལི་ཡ)", + "ar_SS": "ཨེ་ར་བིཀ་འ(སཱའུà½à¼‹ སུ་ཌཱན)", + "ar_SY": "ཨེ་ར་བིཀ་འ(སི་རི་ཡ)", + "ar_TD": "ཨེ་ར་བིཀ་འ(ཅཱཌ)", + "ar_TN": "ཨེ་ར་བིཀ་འ(ཊུ་ནི་ཤི་ཡ)", + "ar_YE": "ཨེ་ར་བིཀ་འ(ཡེ་མེན)", + "as": "ཨ་ས་མིས་à½", + "as_IN": "ཨ་ས་མིས་འ(རྒྱ་གར)", + "az": "ཨ་ཛར་བྷའི་ཇཱན་à½", + "az_AZ": "ཨ་ཛར་བྷའི་ཇཱན་འ(ཨ་ཛར་བྷའི་ཇཱན)", + "az_Cyrl": "ཨ་ཛར་བྷའི་ཇཱན་འ(སིརིལ་ལིཀ་ཡིག་གུ)", + "az_Cyrl_AZ": "ཨ་ཛར་བྷའི་ཇཱན་འ(སིརིལ་ལིཀ་ཡིག་གུ, ཨ་ཛར་བྷའི་ཇཱན)", + "az_Latn": "ཨ་ཛར་བྷའི་ཇཱན་འ(ལེ་ཊིན་ཡིག་གུ)", + "az_Latn_AZ": "ཨ་ཛར་བྷའི་ཇཱན་འ(ལེ་ཊིན་ཡིག་གུ, ཨ་ཛར་བྷའི་ཇཱན)", + "be": "བེལ་ཨ་རུས་à½", + "be_BY": "བེལ་ཨ་རུས་འ(བེལ་ཨ་རུ་སུ)", + "bg": "བཱལ་གེ་རི་ཡཱན་à½", + "bg_BG": "བཱལ་གེ་རི་ཡཱན་འ(བུལ་ག་རི་ཡ)", + "bn": "བངྒ་ལ་à½", + "bn_BD": "བངྒ་ལ་འ(བངྒ་ལ་དེཤ)", + "bn_IN": "བངྒ་ལ་འ(རྒྱ་གར)", + "bo": "བོད་à½", + "bo_CN": "བོད་འ(རྒྱ་ནག)", + "bo_IN": "བོད་འ(རྒྱ་གར)", + "bs": "བྷོས་ནི་ཡཱན་à½", + "bs_BA": "བྷོས་ནི་ཡཱན་འ(བྷོས་ནི་ཡ་ ཨེནཌ་ ཧར་ཛི་གྷོ་བི་ན)", + "bs_Cyrl": "བྷོས་ནི་ཡཱན་འ(སིརིལ་ལིཀ་ཡིག་གུ)", + "bs_Cyrl_BA": "བྷོས་ནི་ཡཱན་འ(སིརིལ་ལིཀ་ཡིག་གུ, བྷོས་ནི་ཡ་ ཨེནཌ་ ཧར་ཛི་གྷོ་བི་ན)", + "bs_Latn": "བྷོས་ནི་ཡཱན་འ(ལེ་ཊིན་ཡིག་གུ)", + "bs_Latn_BA": "བྷོས་ནི་ཡཱན་འ(ལེ་ཊིན་ཡིག་གུ, བྷོས་ནི་ཡ་ ཨེནཌ་ ཧར་ཛི་གྷོ་བི་ན)", + "ca": "ཀེ་ཊ་ལཱན་à½", + "ca_AD": "ཀེ་ཊ་ལཱན་འ(ཨཱན་དོ་ར)", + "ca_ES": "ཀེ་ཊ་ལཱན་འ(ཨིས་པེན)", + "ca_FR": "ཀེ་ཊ་ལཱན་འ(ཕྲཱནས)", + "ca_IT": "ཀེ་ཊ་ལཱན་འ(ཨི་ཊ་ལི)", + "cs": "ཅེཀ་à½", + "cs_CZ": "ཅེཀ་འ(ཅེཀ་ རི་པབ་ལིཀ)", + "cy": "à½à½ºà½£à½¤à¼‹à½", + "cy_GB": "à½à½ºà½£à½¤à¼‹à½ (ཡུ་ནཱའི་ཊེཌ་ ཀིང་ཌམ)", + "da": "ཌེ་ནིཤ་à½", + "da_DK": "ཌེ་ནིཤ་འ(ཌེན་མཱཀ)", + "da_GL": "ཌེ་ནིཤ་འ(གིརཱིན་ལནཌ྄)", + "de": "ཇཱར་མཱན་à½", + "de_AT": "ཇཱར་མཱན་འ(ཨཱོས་ཊྲི་ཡ)", + "de_BE": "ཇཱར་མཱན་འ(བྷེལ་ཇམ)", + "de_CH": "ཇཱར་མཱན་འ(སུ་à½à½²à½Šà¼‹à½›à½¢à¼‹à½£à½ºà½“ཌ)", + "de_DE": "ཇཱར་མཱན་འ(ཇཱར་མ་ནི)", + "de_IT": "ཇཱར་མཱན་འ(ཨི་ཊ་ལི)", + "de_LI": "ཇཱར་མཱན་འ(ལིཀ་à½à½“ས་à½à¼‹à½¡à½²à½“)", + "de_LU": "ཇཱར་མཱན་འ(ལག་ཛམ་བོརྒ)", + "dz": "རྫོང་à½", + "dz_BT": "རྫོང་འ(འབྲུག)", + "el": "གྲིཀ་à½", + "el_CY": "གྲིཀ་འ(སཱའི་པྲས)", + "el_GR": "གྲིཀ་འ(གིརིས྄)", + "en": "ཨིང་ལིཤ་à½", + "en_AG": "ཨིང་ལིཤ་འ(ཨན་ཊི་གུ་à½à¼‹ ཨེནཌ་ བྷར་བྷུ་ཌ)", + "en_AI": "ཨིང་ལིཤ་འ(ཨང་གི་ལ)", + "en_AS": "ཨིང་ལིཤ་འ(ས་མོ་ཨ་ཡུ་ཨེས་ཨེ་མངའ་à½à½¼à½„ས)", + "en_AT": "ཨིང་ལིཤ་འ(ཨཱོས་ཊྲི་ཡ)", + "en_AU": "ཨིང་ལིཤ་འ(ཨཱོས་ཊྲེལ་ལི་ཡ)", + "en_BB": "ཨིང་ལིཤ་འ(བྷར་བེ་ཌོས)", + "en_BE": "ཨིང་ལིཤ་འ(བྷེལ་ཇམ)", + "en_BI": "ཨིང་ལིཤ་འ(བྷུ་རུན་ཌི)", + "en_BM": "ཨིང་ལིཤ་འ(བར་མུ་ཌ)", + "en_BS": "ཨིང་ལིཤ་འ(བྷ་ཧ་མས྄)", + "en_BW": "ཨིང་ལིཤ་འ(བྷོཙ་à½à¼‹à½“)", + "en_BZ": "ཨིང་ལིཤ་འ(བྷེ་ལིཛ)", + "en_CA": "ཨིང་ལིཤ་འ(ཀེ་ན་ཌ)", + "en_CC": "ཨིང་ལིཤ་འ(ཀོ་ཀོས་གླིང་ཚོམ)", + "en_CH": "ཨིང་ལིཤ་འ(སུ་à½à½²à½Šà¼‹à½›à½¢à¼‹à½£à½ºà½“ཌ)", + "en_CK": "ཨིང་ལིཤ་འ(ཀུག་གླིང་ཚོམ)", + "en_CM": "ཨིང་ལིཤ་འ(ཀེ་མ་རུན)", + "en_CX": "ཨིང་ལིཤ་འ(à½à½²à¼‹à½¢à½²à½¦à¾Ÿà¼‹à½˜à½ºà½¦à¼‹à½˜à½šà½¼à¼‹à½‚ླིང)", + "en_CY": "ཨིང་ལིཤ་འ(སཱའི་པྲས)", + "en_DE": "ཨིང་ལིཤ་འ(ཇཱར་མ་ནི)", + "en_DG": "ཨིང་ལིཤ་འ(ཌི་ཡེ་གོ་གར་སིའོ)", + "en_DK": "ཨིང་ལིཤ་འ(ཌེན་མཱཀ)", + "en_DM": "ཨིང་ལིཤ་འ(ཌོ་མི་ནི་ཀ)", + "en_ER": "ཨིང་ལིཤ་འ(ཨེ་རི་ཊྲེ་ཡ)", + "en_FI": "ཨིང་ལིཤ་འ(ཕིན་ལེནཌ)", + "en_FJ": "ཨིང་ལིཤ་འ(ཕི་ཇི)", + "en_FK": "ཨིང་ལིཤ་འ(ཕལà¾à¼‹à½£à½“ྜ་གླིང་ཚོམ)", + "en_FM": "ཨིང་ལིཤ་འ(མའི་ཀྲོ་ནི་ཤི་ཡ)", + "en_GB": "ཨིང་ལིཤ་འ(ཡུ་ནཱའི་ཊེཌ་ ཀིང་ཌམ)", + "en_GD": "ཨིང་ལིཤ་འ(གྲྀ་ན་ཌ)", + "en_GG": "ཨིང་ལིཤ་འ(གུ་ཨེརྣ་སི)", + "en_GH": "ཨིང་ལིཤ་འ(གྷ་ན)", + "en_GI": "ཨིང་ལིཤ་འ(ཇིབ་རཱལ་ཊར)", + "en_GM": "ཨིང་ལིཤ་འ(གྷེམ་བི་ཡ)", + "en_GU": "ཨིང་ལིཤ་འ(གུ་འམ་ མཚོ་གླིང)", + "en_GY": "ཨིང་ལིཤ་འ(གྷ་ཡ་ན)", + "en_HK": "ཨིང་ལིཤ་འ(ཧོང་ཀོང་ཅཱའི་ན)", + "en_IE": "ཨིང་ལིཤ་འ(ཨཱ་ཡ་ལེནཌ)", + "en_IL": "ཨིང་ལིཤ་འ(ཨིས་ར་ཡེལ)", + "en_IM": "ཨིང་ལིཤ་འ(ཨ་ཡུལ་ ཨོཕ་ མཱན)", + "en_IN": "ཨིང་ལིཤ་འ(རྒྱ་གར)", + "en_IO": "ཨིང་ལིཤ་འ(བྲི་ཊིཤ་རྒྱ་གར་གྱི་རྒྱ་མཚོ་ས་à½à½¼à½„ས)", + "en_JE": "ཨིང་ལིཤ་འ(ཇེར་སི)", + "en_JM": "ཨིང་ལིཤ་འ(ཇཱ་མཻ་ཀ)", + "en_KE": "ཨིང་ལིཤ་འ(ཀེན་ཡ)", + "en_KI": "ཨིང་ལིཤ་འ(ཀི་རི་བ་à½à½²à¼‹à½˜à½šà½¼à¼‹à½‚ླིང)", + "en_KN": "ཨིང་ལིཤ་འ(སེནཊ་ ཀིཊས་ དང་ ནེ་བིས)", + "en_KY": "ཨིང་ལིཤ་འ(à½à½ºà¼‹à½˜à½ºà½“་གླིང་ཚོམ)", + "en_LC": "ཨིང་ལིཤ་འ(སེནཊ་ ལུ་སི་ཡ)", + "en_LR": "ཨིང་ལིཤ་འ(ལཱའི་བེ་རི་ཡ)", + "en_LS": "ཨིང་ལིཤ་འ(ལཻ་སོ་à½à½¼)", + "en_MG": "ཨིང་ལིཤ་འ(མ་དཱ་གེས་ཀར)", + "en_MH": "ཨིང་ལིཤ་འ(མར་ཤེལ་གླིང་ཚོམ)", + "en_MO": "ཨིང་ལིཤ་འ(མཀ་ཨའུ་ཅཱའི་ན)", + "en_MP": "ཨིང་ལིཤ་འ(བྱང་ཕྱོགས་ཀྱི་མ་ར་ཡ་ན་གླིང་ཚོམ)", + "en_MS": "ཨིང་ལིཤ་འ(མོན་ས་རཊ)", + "en_MT": "ཨིང་ལིཤ་འ(མཱལ་ཊ)", + "en_MU": "ཨིང་ལིཤ་འ(མོ་རི་ཤཱས)", + "en_MW": "ཨིང་ལིཤ་འ(མ་ལ་à½à½²)", + "en_MY": "ཨིང་ལིཤ་འ(མ་ལེ་ཤི་ཡ)", + "en_NA": "ཨིང་ལིཤ་འ(ན་མི་བི་ཡ)", + "en_NF": "ཨིང་ལིཤ་འ(ནོར་ཕོལཀ་མཚོ་གླིང༌)", + "en_NG": "ཨིང་ལིཤ་འ(ནཱའི་ཇི་རི་ཡ)", + "en_NL": "ཨིང་ལིཤ་འ(ནེ་དར་ལནཌས྄)", + "en_NR": "ཨིང་ལིཤ་འ(ནའུ་རུ་)", + "en_NU": "ཨིང་ལིཤ་འ(ནི་ཨུ་ཨཻ)", + "en_NZ": "ཨིང་ལིཤ་འ(ནིའུ་ཛི་ལེནཌ)", + "en_PG": "ཨིང་ལིཤ་འ(པ་པུ་ ནིའུ་གི་ནི)", + "en_PH": "ཨིང་ལིཤ་འ(ཕི་ལི་པིནས)", + "en_PK": "ཨིང་ལིཤ་འ(པ་ཀི་སà½à½±à½“)", + "en_PN": "ཨིང་ལིཤ་འ(པིཊ་ཀེ་ཡེརན་གླིང་ཚོམ)", + "en_PR": "ཨིང་ལིཤ་འ(པུ་འེར་ཊོ་རི་à½à½¼)", + "en_PW": "ཨིང་ལིཤ་འ(པ་ལའུ)", + "en_RW": "ཨིང་ལིཤ་འ(རུ་à½à½“་ཌ)", + "en_SB": "ཨིང་ལིཤ་འ(སོ་ལོ་མོན་ གླིང་ཚོམ)", + "en_SC": "ཨིང་ལིཤ་འ(སེ་ཤཱལས)", + "en_SD": "ཨིང་ལིཤ་འ(སུ་ཌཱན)", + "en_SE": "ཨིང་ལིཤ་འ(སུའི་ཌེན)", + "en_SG": "ཨིང་ལིཤ་འ(སིང་ག་པོར)", + "en_SH": "ཨིང་ལིཤ་འ(སེནཊ་ ཧེ་ལི་ན)", + "en_SI": "ཨིང་ལིཤ་འ(སུ་ལོ་བི་ནི་ཡ)", + "en_SL": "ཨིང་ལིཤ་འ(སི་ར་ ལི་འོན)", + "en_SS": "ཨིང་ལིཤ་འ(སཱའུà½à¼‹ སུ་ཌཱན)", + "en_SX": "ཨིང་ལིཤ་འ(སིནཊ་ མཱར་ཊེན)", + "en_SZ": "ཨིང་ལིཤ་འ(སུ་à½à¼‹à½›à½²à¼‹à½£à½ºà½“ཌ)", + "en_TC": "ཨིང་ལིཤ་འ(à½à½´à½¢à¾à½¦à¾„་ ཨེནཌ་ ཀ་ཀོས་གླིང་ཚོམ)", + "en_TK": "ཨིང་ལིཤ་འ(à½à½¼à¼‹à½€à½ºà¼‹à½£à½ à½´à¼‹ མཚོ་གླིང)", + "en_TO": "ཨིང་ལིཤ་འ(ཊོང་གྷ)", + "en_TT": "ཨིང་ལིཤ་འ(ཊི་ནི་ཌཱཌ་ ཨེནཌ་ ཊོ་བྷེ་གྷོ)", + "en_TV": "ཨིང་ལིཤ་འ(à½à½´à¼‹à½à¼‹à½£à½´)", + "en_TZ": "ཨིང་ལིཤ་འ(ཊཱན་ཛཱ་ནི་ཡ)", + "en_UG": "ཨིང་ལིཤ་འ(ཡུ་གྷན་ཌ)", + "en_UM": "ཨིང་ལིཤ་འ(ཡུ་ཨེས་གྱི་མà½à½ à¼‹à½˜à½šà½˜à½¦à¼‹à½˜à½šà½¼à¼‹à½‚ླིང་)", + "en_US": "ཨིང་ལིཤ་འ(ཡུ་ཨེས་ཨེ)", + "en_VC": "ཨིང་ལིཤ་འ(སེནཊ་à½à½²à½“་སེནཌ྄ ཨེནཌ་ གི་རེ་ན་དིནས྄)", + "en_VG": "ཨིང་ལིཤ་འ(à½à½¢à½‡à½²à½“་གླིང་ཚོམ་ བྲཱི་ཊིཤ་མངའ་à½à½¼à½„ས)", + "en_VI": "ཨིང་ལིཤ་འ(à½à½¢à½‡à½²à½“་གླིང་ཚོམ་ ཡུ་ཨེས་ཨེ་མངའ་à½à½¼à½„ས)", + "en_VU": "ཨིང་ལིཤ་འ(à½à¼‹à½“ུ་ཨ་à½à½´)", + "en_WS": "ཨིང་ལིཤ་འ(ས་མོ་ཨ)", + "en_ZA": "ཨིང་ལིཤ་འ(སཱའུà½à¼‹ ཨཕ་རི་ཀ)", + "en_ZM": "ཨིང་ལིཤ་འ(ཛམ་བྷི་ཡ)", + "en_ZW": "ཨིང་ལིཤ་འ(ཛིམ་བྷབ་à½à½º)", + "eo": "ཨེས་པ་རཱན་à½à½¼à¼‹à½", + "es": "ཨིས་པེ་ནིཤ་à½", + "es_AR": "ཨིས་པེ་ནིཤ་འ(ཨར་ཇེན་ཊི་ན)", + "es_BO": "ཨིས་པེ་ནིཤ་འ(བྷེ་ལི་བི་ཡ)", + "es_BR": "ཨིས་པེ་ནིཤ་འ(བྲ་ཛིལ)", + "es_CL": "ཨིས་པེ་ནིཤ་འ(ཅི་ལི)", + "es_CO": "ཨིས་པེ་ནིཤ་འ(ཀོ་ལོམ་བྷི་ཡ)", + "es_CR": "ཨིས་པེ་ནིཤ་འ(ཀོས་ཊ་རི་ཀ)", + "es_CU": "ཨིས་པེ་ནིཤ་འ(ཀིའུ་བྷ)", + "es_DO": "ཨིས་པེ་ནིཤ་འ(ཌོ་མི་ནི་ཀཱན་ རི་པབ་ལིཀ)", + "es_EA": "ཨིས་པེ་ནིཤ་འ(སེ་ཨུ་à½à¼‹ ཨེནཌ་ མེལ་ལི་ལ)", + "es_EC": "ཨིས་པེ་ནིཤ་འ(ཨེ་à½à¾­à¼‹à½Œà½¼à½¢)", + "es_ES": "ཨིས་པེ་ནིཤ་འ(ཨིས་པེན)", + "es_GQ": "ཨིས་པེ་ནིཤ་འ(ཨེ་ཀུ་ཊོ་རེལ་ གི་ནི)", + "es_GT": "ཨིས་པེ་ནིཤ་འ(གྷོ་ཊ་མ་ལ)", + "es_HN": "ཨིས་པེ་ནིཤ་འ(ཧཱན་ཌུ་རཱས྄)", + "es_IC": "ཨིས་པེ་ནིཤ་འ(ཀ་ནེ་རི་གླིང་ཚོམ)", + "es_MX": "ཨིས་པེ་ནིཤ་འ(མེཀ་སི་ཀོ)", + "es_NI": "ཨིས་པེ་ནིཤ་འ(ནི་ཀྲ་à½à¼‹à½‚)", + "es_PA": "ཨིས་པེ་ནིཤ་འ(པ་ན་མ)", + "es_PE": "ཨིས་པེ་ནིཤ་འ(པེ་རུ)", + "es_PH": "ཨིས་པེ་ནིཤ་འ(ཕི་ལི་པིནས)", + "es_PR": "ཨིས་པེ་ནིཤ་འ(པུ་འེར་ཊོ་རི་à½à½¼)", + "es_PY": "ཨིས་པེ་ནིཤ་འ(པ་ར་གུ་à½à½ à½²)", + "es_SV": "ཨིས་པེ་ནིཤ་འ(ཨེལ་སལ་བ་ཌོར)", + "es_US": "ཨིས་པེ་ནིཤ་འ(ཡུ་ཨེས་ཨེ)", + "es_UY": "ཨིས་པེ་ནིཤ་འ(ཡུ་རུ་གུ་à½à½ à½²)", + "es_VE": "ཨིས་པེ་ནིཤ་འ(བེ་ནི་ཛུ་à½à½ºà¼‹à½£)", + "et": "ཨེས་ཊོ་ནི་ཡཱན་à½", + "et_EE": "ཨེས་ཊོ་ནི་ཡཱན་འ(ཨེས་ཊོ་ནི་ཡ)", + "eu": "བཱསཀ་à½", + "eu_ES": "བཱསཀ་འ(ཨིས་པེན)", + "fa": "པར་ཤི་ཡཱན་à½", + "fa_AF": "པར་ཤི་ཡཱན་འ(ཨཕ་གྷ་ནི་སà½à½±à½“)", + "fa_IR": "པར་ཤི་ཡཱན་འ(ཨི་རཱན)", + "fi": "ཕི་ནིཤ་à½", + "fi_FI": "ཕི་ནིཤ་འ(ཕིན་ལེནཌ)", + "fo": "ཕཱ་རོ་ཨིས་à½", + "fo_DK": "ཕཱ་རོ་ཨིས་འ(ཌེན་མཱཀ)", + "fo_FO": "ཕཱ་རོ་ཨིས་འ(ཕཱའེ་རོ་གླིང་ཚོམ)", + "fr": "ཕྲནཅ་à½", + "fr_BE": "ཕྲནཅ་འ(བྷེལ་ཇམ)", + "fr_BF": "ཕྲནཅ་འ(བྷར་ཀི་ན་ ཕེ་སོ)", + "fr_BI": "ཕྲནཅ་འ(བྷུ་རུན་ཌི)", + "fr_BJ": "ཕྲནཅ་འ(བྷེ་ནིན)", + "fr_BL": "ཕྲནཅ་འ(སེནཊ་ བར་à½à½¼à¼‹à½£à½¼à½˜à¼‹à½˜à½²à½ à½´)", + "fr_CA": "ཕྲནཅ་འ(ཀེ་ན་ཌ)", + "fr_CD": "ཕྲནཅ་འ(ཀོང་གྷོ ཀིན་ཤ་ས)", + "fr_CF": "ཕྲནཅ་འ(སེན་ཊལ་ ཨཕ་རི་ཀཱན་ རི་པབ་ལིཀ)", + "fr_CG": "ཕྲནཅ་འ(ཀོང་གྷོ བྷྲ་ཛ་བིལ)", + "fr_CH": "ཕྲནཅ་འ(སུ་à½à½²à½Šà¼‹à½›à½¢à¼‹à½£à½ºà½“ཌ)", + "fr_CI": "ཕྲནཅ་འ(ཀོ་ཊེ་ ཌི་ཨི་à½à½¼à¼‹à½¢à½º)", + "fr_CM": "ཕྲནཅ་འ(ཀེ་མ་རུན)", + "fr_DJ": "ཕྲནཅ་འ(ཇི་བྷུ་ཊི)", + "fr_DZ": "ཕྲནཅ་འ(ཨཱལ་ཇི་རི་ཡ)", + "fr_FR": "ཕྲནཅ་འ(ཕྲཱནས)", + "fr_GA": "ཕྲནཅ་འ(གྷ་བྷོན)", + "fr_GF": "ཕྲནཅ་འ(གུའི་ཡ་ན་ ཕྲནས྄་མངའ་à½à½¼à½„ས)", + "fr_GN": "ཕྲནཅ་འ(གྷི་ནི)", + "fr_GP": "ཕྲནཅ་འ(གོ་ཌེ་ལུ་པེ)", + "fr_GQ": "ཕྲནཅ་འ(ཨེ་ཀུ་ཊོ་རེལ་ གི་ནི)", + "fr_HT": "ཕྲནཅ་འ(ཧེ་ཊི)", + "fr_KM": "ཕྲནཅ་འ(ཀོ་མོ་རོས)", + "fr_LU": "ཕྲནཅ་འ(ལག་ཛམ་བོརྒ)", + "fr_MA": "ཕྲནཅ་འ(མོ་རོ་ཀོ)", + "fr_MC": "ཕྲནཅ་འ(མོ་ན་ཀོ)", + "fr_MF": "ཕྲནཅ་འ(སེནཊ་ མཱར་ཊིན)", + "fr_MG": "ཕྲནཅ་འ(མ་དཱ་གེས་ཀར)", + "fr_ML": "ཕྲནཅ་འ(མཱ་ལི)", + "fr_MQ": "ཕྲནཅ་འ(མཱར་ཊི་ནིཀ)", + "fr_MR": "ཕྲནཅ་འ(མོ་རི་ཊེ་ནི་ཡ)", + "fr_MU": "ཕྲནཅ་འ(མོ་རི་ཤཱས)", + "fr_NC": "ཕྲནཅ་འ(ནིའུ་ཀ་ལི་དོ་ནི་ཡ)", + "fr_NE": "ཕྲནཅ་འ(ནཱའི་ཇཱ)", + "fr_PF": "ཕྲནཅ་འ(ཕྲཱནས྄་ཀྱི་པོ་ལི་ནི་ཤི་ཡ)", + "fr_PM": "ཕྲནཅ་འ(སིནཊ་པི་ཡེར་ ཨེནཌ་ མིཀོ་ལེན)", + "fr_RE": "ཕྲནཅ་འ(རེ་ཡུ་ནི་ཡོན)", + "fr_RW": "ཕྲནཅ་འ(རུ་à½à½“་ཌ)", + "fr_SC": "ཕྲནཅ་འ(སེ་ཤཱལས)", + "fr_SN": "ཕྲནཅ་འ(སེ་ནི་གྷལ)", + "fr_SY": "ཕྲནཅ་འ(སི་རི་ཡ)", + "fr_TD": "ཕྲནཅ་འ(ཅཱཌ)", + "fr_TG": "ཕྲནཅ་འ(ཊོ་གྷོ)", + "fr_TN": "ཕྲནཅ་འ(ཊུ་ནི་ཤི་ཡ)", + "fr_VU": "ཕྲནཅ་འ(à½à¼‹à½“ུ་ཨ་à½à½´)", + "fr_WF": "ཕྲནཅ་འ(à½à½£à¼‹à½£à½²à½¦à¾„་ ཨེནཌ་ ཕུ་à½à½´à¼‹à½“་)", + "fr_YT": "ཕྲནཅ་འ(མེ་ཡོཊ)", + "fy": "ནུབ་ཕྼི་སི་ཡན་à½", + "fy_NL": "ནུབ་ཕྼི་སི་ཡན་འ(ནེ་དར་ལནཌས྄)", + "ga": "ཨཱའི་རིཤ་à½", + "ga_IE": "ཨཱའི་རིཤ་འ(ཨཱ་ཡ་ལེནཌ)", + "gl": "གལ་ཨིས་ཨི་ཡན་à½", + "gl_ES": "གལ་ཨིས་ཨི་ཡན་འ(ཨིས་པེན)", + "gu": "གུ་ཇ་ར་à½à½²à¼‹à½", + "gu_IN": "གུ་ཇ་ར་à½à½²à¼‹à½ (རྒྱ་གར)", + "ha": "ཧà½à¼‹à½¦à¼‹à½", + "ha_GH": "ཧà½à¼‹à½¦à¼‹à½ (གྷ་ན)", + "ha_NE": "ཧà½à¼‹à½¦à¼‹à½ (ནཱའི་ཇཱ)", + "ha_NG": "ཧà½à¼‹à½¦à¼‹à½ (ནཱའི་ཇི་རི་ཡ)", + "he": "ཧེ་བྲུ་à½", + "he_IL": "ཧེ་བྲུ་འ(ཨིས་ར་ཡེལ)", + "hi": "ཧིན་དི་à½", + "hi_IN": "ཧིན་དི་འ(རྒྱ་གར)", + "hr": "ཀྲོ་ཨེ་ཤི་ཡཱན་à½", + "hr_BA": "ཀྲོ་ཨེ་ཤི་ཡཱན་འ(བྷོས་ནི་ཡ་ ཨེནཌ་ ཧར་ཛི་གྷོ་བི་ན)", + "hr_HR": "ཀྲོ་ཨེ་ཤི་ཡཱན་འ(ཀྲོ་ཨེ་ཤ)", + "hu": "ཧཱང་གྷ་རི་ཡཱན་à½", + "hu_HU": "ཧཱང་གྷ་རི་ཡཱན་འ(ཧཱང་གྷ་རི)", + "hy": "ཨར་མི་ནི་ཡཱན་à½", + "hy_AM": "ཨར་མི་ནི་ཡཱན་འ(ཨར་མི་ནི་ཡ)", + "id": "ཨིན་ཌོ་ནེ་ཤི་ཡཱན་à½", + "id_ID": "ཨིན་ཌོ་ནེ་ཤི་ཡཱན་འ(ཨིན་ཌོ་ནེ་ཤི་ཡ)", + "ig": "ཨིག་བོ་à½", + "ig_NG": "ཨིག་བོ་འ(ནཱའི་ཇི་རི་ཡ)", + "is": "ཨ་ཡིས་ལེན་ཌིཀ་à½", + "is_IS": "ཨ་ཡིས་ལེན་ཌིཀ་འ(ཨཱའིས་ལེནཌ)", + "it": "ཨི་ཊ་ལི་ཡཱན་à½", + "it_CH": "ཨི་ཊ་ལི་ཡཱན་འ(སུ་à½à½²à½Šà¼‹à½›à½¢à¼‹à½£à½ºà½“ཌ)", + "it_IT": "ཨི་ཊ་ལི་ཡཱན་འ(ཨི་ཊ་ལི)", + "it_SM": "ཨི་ཊ་ལི་ཡཱན་འ(སཱན་མ་རི་ནོ)", + "ja": "ཇཱ་པཱ་ནིས་à½", + "ja_JP": "ཇཱ་པཱ་ནིས་འ(ཇ་པཱན)", + "ka": "ཇཽ་ཇི་ཡཱན་à½", + "ka_GE": "ཇཽ་ཇི་ཡཱན་འ(ཇཽར་ཇཱ)", + "kk": "ཀ་ཛགས་à½", + "kk_KZ": "ཀ་ཛགས་འ(ཀ་ཛགས་སà½à½±à½“)", + "km": "à½à½ºà¼‹à½˜à½ºà½¢à¼‹à½", + "km_KH": "à½à½ºà¼‹à½˜à½ºà½¢à¼‹à½ (ཀམ་བྷོ་ཌི་ཡ)", + "kn": "ཀ་ན་ཌ་à½", + "kn_IN": "ཀ་ན་ཌ་འ(རྒྱ་གར)", + "ko": "ཀོ་རི་ཡཱན་à½", + "ko_KP": "ཀོ་རི་ཡཱན་འ(བྱང་ ཀོ་རི་ཡ)", + "ko_KR": "ཀོ་རི་ཡཱན་འ(ལྷོ་ ཀོ་རི་ཡ)", + "ks": "ཀཱཤ་མི་རི་à½", + "ks_IN": "ཀཱཤ་མི་རི་འ(རྒྱ་གར)", + "ky": "ཀིར་གིས་à½", + "ky_KG": "ཀིར་གིས་འ(ཀིར་གིས་སà½à½±à½“)", + "lb": "ལག་ཛམ་བོརྒ་à½", + "lb_LU": "ལག་ཛམ་བོརྒ་འ(ལག་ཛམ་བོརྒ)", + "lo": "ལཱ་à½à½¼à½¦à¼‹à½", + "lo_LA": "ལཱ་à½à½¼à½¦à¼‹à½ (ལཱ་à½à½¼à½¦)", + "lt": "ལི་à½à½´à¼‹à½à½ºà¼‹à½“ི་ཡཱན་à½", + "lt_LT": "ལི་à½à½´à¼‹à½à½ºà¼‹à½“ི་ཡཱན་འ(ལི་à½à½´à¼‹à½à½ºà¼‹à½“ི་ཡ)", + "lv": "ལཊ་བི་ཡཱན་à½", + "lv_LV": "ལཊ་བི་ཡཱན་འ(ལཊ་བི་ཡ)", + "mg": "མ་ལ་ག་སི་à½", + "mg_MG": "མ་ལ་ག་སི་འ(མ་དཱ་གེས་ཀར)", + "mk": "མ་སེ་ཌོ་ནི་ཡཱན་à½", + "mk_MK": "མ་སེ་ཌོ་ནི་ཡཱན་འ(མ་སེ་ཌོ་ནི་ཡ)", + "ml": "མ་ལ་ཡ་ལམ་à½", + "ml_IN": "མ་ལ་ཡ་ལམ་འ(རྒྱ་གར)", + "mr": "མ་ར་à½à½²à¼‹à½", + "mr_IN": "མ་ར་à½à½²à¼‹à½ (རྒྱ་གར)", + "ms": "མ་ལེ་à½", + "ms_BN": "མ་ལེ་འ(བྷྲུ་ནའི)", + "ms_MY": "མ་ལེ་འ(མ་ལེ་ཤི་ཡ)", + "ms_SG": "མ་ལེ་འ(སིང་ག་པོར)", + "mt": "མཱལ་ཊ་à½", + "mt_MT": "མཱལ་ཊ་འ(མཱལ་ཊ)", + "my": "བར་མིས་à½", + "my_MM": "བར་མིས་འ(མི་ཡཱན་མར་ (བྷར་མ))", + "nb": "ནོར་à½à½ºà¼‹à½‡à½²à¼‹à½¡à½±à½“་བོཀ་མཱལ་à½", + "nb_NO": "ནོར་à½à½ºà¼‹à½‡à½²à¼‹à½¡à½±à½“་བོཀ་མཱལ་འ(ནོར་à½à½º)", + "nb_SJ": "ནོར་à½à½ºà¼‹à½‡à½²à¼‹à½¡à½±à½“་བོཀ་མཱལ་འ(སྭཱལ་བྷརྡ་ ཨེནཌ་ ཇཱན་མ་ཡེན)", + "ne": "ནེ་པཱལི་à½", + "ne_IN": "ནེ་པཱལི་འ(རྒྱ་གར)", + "ne_NP": "ནེ་པཱལི་འ(བལ་ཡུལ)", + "nl": "ཌཆ་à½", + "nl_AW": "ཌཆ་འ(ཨ་རུ་བཱ)", + "nl_BE": "ཌཆ་འ(བྷེལ་ཇམ)", + "nl_BQ": "ཌཆ་འ(ཀེ་རི་བི་ཡེན་ནེ་དར་ལནཌས྄)", + "nl_CW": "ཌཆ་འ(ཀྱཱུར་ར་ཀོ)", + "nl_NL": "ཌཆ་འ(ནེ་དར་ལནཌས྄)", + "nl_SR": "ཌཆ་འ(སུ་རི་ནཱམ)", + "nl_SX": "ཌཆ་འ(སིནཊ་ མཱར་ཊེན)", + "nn": "ནོར་à½à½ºà¼‹à½‡à½²à¼‹à½¡à½±à½“་ནོརསཀ་à½", + "nn_NO": "ནོར་à½à½ºà¼‹à½‡à½²à¼‹à½¡à½±à½“་ནོརསཀ་འ(ནོར་à½à½º)", + "no": "ནོར་à½à½²à¼‹à½‡à½²à¼‹à½¡à½“་à½", + "no_NO": "ནོར་à½à½²à¼‹à½‡à½²à¼‹à½¡à½“་འ(ནོར་à½à½º)", + "or": "ཨོ་རི་ཡ་à½", + "or_IN": "ཨོ་རི་ཡ་འ(རྒྱ་གར)", + "pa": "པཱན་ཇ་བི་à½", + "pa_Arab": "པཱན་ཇ་བི་འ(ཨེ་ར་བིཀ་ཡིག་གུ)", + "pa_Arab_PK": "པཱན་ཇ་བི་འ(ཨེ་ར་བིཀ་ཡིག་གུ, པ་ཀི་སà½à½±à½“)", + "pa_Guru": "པཱན་ཇ་བི་འ(གུ་རུ་མུ་à½à¼‹à½¡à½²à½‚་གུ)", + "pa_Guru_IN": "པཱན་ཇ་བི་འ(གུ་རུ་མུ་à½à¼‹à½¡à½²à½‚་གུ, རྒྱ་གར)", + "pa_IN": "པཱན་ཇ་བི་འ(རྒྱ་གར)", + "pa_PK": "པཱན་ཇ་བི་འ(པ་ཀི་སà½à½±à½“)", + "pl": "པོ་ལིཤ་à½", + "pl_PL": "པོ་ལིཤ་འ(པོ་ལེནཌ)", + "ps": "པཱཤ་à½à½¼à¼‹à½", + "ps_AF": "པཱཤ་à½à½¼à¼‹à½ (ཨཕ་གྷ་ནི་སà½à½±à½“)", + "pt": "པོར་ཅུ་གིས་à½", + "pt_AO": "པོར་ཅུ་གིས་འ(ཨང་གྷོ་ལ)", + "pt_BR": "པོར་ཅུ་གིས་འ(བྲ་ཛིལ)", + "pt_CH": "པོར་ཅུ་གིས་འ(སུ་à½à½²à½Šà¼‹à½›à½¢à¼‹à½£à½ºà½“ཌ)", + "pt_CV": "པོར་ཅུ་གིས་འ(ཀེཔ་བཱཌ)", + "pt_GQ": "པོར་ཅུ་གིས་འ(ཨེ་ཀུ་ཊོ་རེལ་ གི་ནི)", + "pt_GW": "པོར་ཅུ་གིས་འ(གྷི་ནི་ བྷི་སཱའུ)", + "pt_LU": "པོར་ཅུ་གིས་འ(ལག་ཛམ་བོརྒ)", + "pt_MO": "པོར་ཅུ་གིས་འ(མཀ་ཨའུ་ཅཱའི་ན)", + "pt_MZ": "པོར་ཅུ་གིས་འ(མོ་ཛམ་བྷིཀ)", + "pt_PT": "པོར་ཅུ་གིས་འ(པོར་ཅུ་གཱལ)", + "pt_ST": "པོར་ཅུ་གིས་འ(སà½à¼‹ ཊོ་མེ་ ཨེནཌ་ པྲྀན་སི་པེ)", + "pt_TL": "པོར་ཅུ་གིས་འ(à½à½²à¼‹à¼‹à½˜à½¼à½¢à¼‹à½£à½ºà¼‹à½¨à½ºà½¦à½Š)", + "qu": "ཀྭེ་ཆུ་ཨ་à½", + "qu_BO": "ཀྭེ་ཆུ་ཨ་འ(བྷེ་ལི་བི་ཡ)", + "qu_EC": "ཀྭེ་ཆུ་ཨ་འ(ཨེ་à½à¾­à¼‹à½Œà½¼à½¢)", + "qu_PE": "ཀྭེ་ཆུ་ཨ་འ(པེ་རུ)", + "rm": "རོ་མེ་ནིཤ་à½", + "rm_CH": "རོ་མེ་ནིཤ་འ(སུ་à½à½²à½Šà¼‹à½›à½¢à¼‹à½£à½ºà½“ཌ)", + "ro": "རོ་མེ་ནི་ཡཱན་à½", + "ro_MD": "རོ་མེ་ནི་ཡཱན་འ(མོལ་དོ་བཱ)", + "ro_RO": "རོ་མེ་ནི་ཡཱན་འ(རོ་མེ་ནི་ཡ)", + "ru": "ཨུ་རུ་སུའི་à½", + "ru_BY": "ཨུ་རུ་སུའི་འ(བེལ་ཨ་རུ་སུ)", + "ru_KG": "ཨུ་རུ་སུའི་འ(ཀིར་གིས་སà½à½±à½“)", + "ru_KZ": "ཨུ་རུ་སུའི་འ(ཀ་ཛགས་སà½à½±à½“)", + "ru_MD": "ཨུ་རུ་སུའི་འ(མོལ་དོ་བཱ)", + "ru_RU": "ཨུ་རུ་སུའི་འ(ཨུ་རུ་སུ)", + "ru_UA": "ཨུ་རུ་སུའི་འ(ཡུ་ཀརེན)", + "si": "སིང་ཧ་ལ་à½", + "si_LK": "སིང་ཧ་ལ་འ(ཤྲཱི་ལང་ཀ)", + "sk": "སུ་ལོ་བཱཀ་à½", + "sk_SK": "སུ་ལོ་བཱཀ་འ(སུ་ལོ་བཱ་ཀི་ཡ)", + "sl": "སུ་ལོ་བི་ནི་ཡཱན་à½", + "sl_SI": "སུ་ལོ་བི་ནི་ཡཱན་འ(སུ་ལོ་བི་ནི་ཡ)", + "so": "སོ་མ་ལི་à½", + "so_DJ": "སོ་མ་ལི་འ(ཇི་བྷུ་ཊི)", + "so_ET": "སོ་མ་ལི་འ(ཨི་à½à½²à¼‹à½¡à½¼à¼‹à½”ི་ཡ)", + "so_KE": "སོ་མ་ལི་འ(ཀེན་ཡ)", + "so_SO": "སོ་མ་ལི་འ(སོ་མ་ལི་ཡ)", + "sq": "ཨཱལ་བེ་ནི་ཡཱན་à½", + "sq_AL": "ཨཱལ་བེ་ནི་ཡཱན་འ(ཨཱལ་བེ་ནི་ཡ)", + "sq_MK": "ཨཱལ་བེ་ནི་ཡཱན་འ(མ་སེ་ཌོ་ནི་ཡ)", + "sr": "སཱར་བྷི་ཡཱན་à½", + "sr_BA": "སཱར་བྷི་ཡཱན་འ(བྷོས་ནི་ཡ་ ཨེནཌ་ ཧར་ཛི་གྷོ་བི་ན)", + "sr_Cyrl": "སཱར་བྷི་ཡཱན་འ(སིརིལ་ལིཀ་ཡིག་གུ)", + "sr_Cyrl_BA": "སཱར་བྷི་ཡཱན་འ(སིརིལ་ལིཀ་ཡིག་གུ, བྷོས་ནི་ཡ་ ཨེནཌ་ ཧར་ཛི་གྷོ་བི་ན)", + "sr_Cyrl_ME": "སཱར་བྷི་ཡཱན་འ(སིརིལ་ལིཀ་ཡིག་གུ, མོན་ཊི་ནེག་རོ)", + "sr_Cyrl_RS": "སཱར་བྷི་ཡཱན་འ(སིརིལ་ལིཀ་ཡིག་གུ, སཱར་བྷི་ཡ)", + "sr_Latn": "སཱར་བྷི་ཡཱན་འ(ལེ་ཊིན་ཡིག་གུ)", + "sr_Latn_BA": "སཱར་བྷི་ཡཱན་འ(ལེ་ཊིན་ཡིག་གུ, བྷོས་ནི་ཡ་ ཨེནཌ་ ཧར་ཛི་གྷོ་བི་ན)", + "sr_Latn_ME": "སཱར་བྷི་ཡཱན་འ(ལེ་ཊིན་ཡིག་གུ, མོན་ཊི་ནེག་རོ)", + "sr_Latn_RS": "སཱར་བྷི་ཡཱན་འ(ལེ་ཊིན་ཡིག་གུ, སཱར་བྷི་ཡ)", + "sr_ME": "སཱར་བྷི་ཡཱན་འ(མོན་ཊི་ནེག་རོ)", + "sr_RS": "སཱར་བྷི་ཡཱན་འ(སཱར་བྷི་ཡ)", + "sv": "སུའི་ཌིཤ་à½", + "sv_AX": "སུའི་ཌིཤ་འ(ཨ་ལནཌ་གླིང་ཚོམ)", + "sv_FI": "སུའི་ཌིཤ་འ(ཕིན་ལེནཌ)", + "sv_SE": "སུའི་ཌིཤ་འ(སུའི་ཌེན)", + "sw": "སྭཱ་ཧི་ལི་à½", + "sw_CD": "སྭཱ་ཧི་ལི་འ(ཀོང་གྷོ ཀིན་ཤ་ས)", + "sw_KE": "སྭཱ་ཧི་ལི་འ(ཀེན་ཡ)", + "sw_TZ": "སྭཱ་ཧི་ལི་འ(ཊཱན་ཛཱ་ནི་ཡ)", + "sw_UG": "སྭཱ་ཧི་ལི་འ(ཡུ་གྷན་ཌ)", + "ta": "à½à¼‹à½˜à½²à½£à¼‹à½", + "ta_IN": "à½à¼‹à½˜à½²à½£à¼‹à½ (རྒྱ་གར)", + "ta_LK": "à½à¼‹à½˜à½²à½£à¼‹à½ (ཤྲཱི་ལང་ཀ)", + "ta_MY": "à½à¼‹à½˜à½²à½£à¼‹à½ (མ་ལེ་ཤི་ཡ)", + "ta_SG": "à½à¼‹à½˜à½²à½£à¼‹à½ (སིང་ག་པོར)", + "te": "à½à½ºà¼‹à½£à½´à¼‹à½‚ུ་à½", + "te_IN": "à½à½ºà¼‹à½£à½´à¼‹à½‚ུ་འ(རྒྱ་གར)", + "th": "à½à½±à½ à½²à¼‹à½", + "th_TH": "à½à½±à½ à½²à¼‹à½ (à½à½±à½ à½²à¼‹à½£à½ºà½“ཌ)", + "ti": "à½à½²à½‚་རི་ཉ་à½", + "ti_ER": "à½à½²à½‚་རི་ཉ་འ(ཨེ་རི་ཊྲེ་ཡ)", + "ti_ET": "à½à½²à½‚་རི་ཉ་འ(ཨི་à½à½²à¼‹à½¡à½¼à¼‹à½”ི་ཡ)", + "to": "ཊོང་གྷན་à½", + "to_TO": "ཊོང་གྷན་འ(ཊོང་གྷ)", + "tr": "ཊཱར་ཀིཤ་à½", + "tr_CY": "ཊཱར་ཀིཤ་འ(སཱའི་པྲས)", + "tr_TR": "ཊཱར་ཀིཤ་འ(ཊཱར་ཀི)", + "ug": "à½à½²à¼‹à½‚ུར་à½", + "ug_CN": "à½à½²à¼‹à½‚ུར་འ(རྒྱ་ནག)", + "uk": "ཡུ་ཀེ་རེ་ནི་ཡཱན་à½", + "uk_UA": "ཡུ་ཀེ་རེ་ནི་ཡཱན་འ(ཡུ་ཀརེན)", + "ur": "ཨུར་དུ་à½", + "ur_IN": "ཨུར་དུ་འ(རྒྱ་གར)", + "ur_PK": "ཨུར་དུ་འ(པ་ཀི་སà½à½±à½“)", + "uz": "ཨུས་བེཀ་à½", + "uz_AF": "ཨུས་བེཀ་འ(ཨཕ་གྷ་ནི་སà½à½±à½“)", + "uz_Arab": "ཨུས་བེཀ་འ(ཨེ་ར་བིཀ་ཡིག་གུ)", + "uz_Arab_AF": "ཨུས་བེཀ་འ(ཨེ་ར་བིཀ་ཡིག་གུ, ཨཕ་གྷ་ནི་སà½à½±à½“)", + "uz_Cyrl": "ཨུས་བེཀ་འ(སིརིལ་ལིཀ་ཡིག་གུ)", + "uz_Cyrl_UZ": "ཨུས་བེཀ་འ(སིརིལ་ལིཀ་ཡིག་གུ, ཨུས་བེག་གི་སà½à½±à½“)", + "uz_Latn": "ཨུས་བེཀ་འ(ལེ་ཊིན་ཡིག་གུ)", + "uz_Latn_UZ": "ཨུས་བེཀ་འ(ལེ་ཊིན་ཡིག་གུ, ཨུས་བེག་གི་སà½à½±à½“)", + "uz_UZ": "ཨུས་བེཀ་འ(ཨུས་བེག་གི་སà½à½±à½“)", + "vi": "བེཊ་ནཱ་མིས་à½", + "vi_VN": "བེཊ་ནཱ་མིས་འ(བེཊ་ནཱམ)", + "yo": "ཡོ་རུ་བ་à½", + "yo_BJ": "ཡོ་རུ་བ་འ(བྷེ་ནིན)", + "yo_NG": "ཡོ་རུ་བ་འ(ནཱའི་ཇི་རི་ཡ)", + "zh": "རྒྱ་མི་à½", + "zh_CN": "རྒྱ་མི་འ(རྒྱ་ནག)", + "zh_HK": "རྒྱ་མི་འ(ཧོང་ཀོང་ཅཱའི་ན)", + "zh_Hans": "རྒྱ་མི་འ(རྒྱ་ཡིག་ ལུགས་གསར་)", + "zh_Hans_CN": "རྒྱ་མི་འ(རྒྱ་ཡིག་ ལུགས་གསར་, རྒྱ་ནག)", + "zh_Hans_HK": "རྒྱ་མི་འ(རྒྱ་ཡིག་ ལུགས་གསར་, ཧོང་ཀོང་ཅཱའི་ན)", + "zh_Hans_MO": "རྒྱ་མི་འ(རྒྱ་ཡིག་ ལུགས་གསར་, མཀ་ཨའུ་ཅཱའི་ན)", + "zh_Hans_SG": "རྒྱ་མི་འ(རྒྱ་ཡིག་ ལུགས་གསར་, སིང་ག་པོར)", + "zh_Hant": "རྒྱ་མི་འ(ལུགས་རྙིང་ རྒྱ་ཡིག)", + "zh_Hant_HK": "རྒྱ་མི་འ(ལུགས་རྙིང་ རྒྱ་ཡིག, ཧོང་ཀོང་ཅཱའི་ན)", + "zh_Hant_MO": "རྒྱ་མི་འ(ལུགས་རྙིང་ རྒྱ་ཡིག, མཀ་ཨའུ་ཅཱའི་ན)", + "zh_Hant_TW": "རྒྱ་མི་འ(ལུགས་རྙིང་ རྒྱ་ཡིག, ཊཱའི་à½à½±à½“)", + "zh_MO": "རྒྱ་མི་འ(མཀ་ཨའུ་ཅཱའི་ན)", + "zh_SG": "རྒྱ་མི་འ(སིང་ག་པོར)", + "zh_TW": "རྒྱ་མི་འ(ཊཱའི་à½à½±à½“)", + "zu": "ཟུ་ལུ་à½", + "zu_ZA": "ཟུ་ལུ་འ(སཱའུà½à¼‹ ཨཕ་རི་ཀ)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ee.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ee.json new file mode 100644 index 0000000000000000000000000000000000000000..4e9f337209033683624c27c66c2e54f3cd01140b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ee.json @@ -0,0 +1,523 @@ +{ + "Names": { + "af": "afrikaangbe", + "af_NA": "afrikaangbe (Namibia nutome)", + "af_ZA": "afrikaangbe (Anyiehe Africa nutome)", + "ak": "blugbe", + "ak_GH": "blugbe (Ghana nutome)", + "am": "amhariagbe", + "am_ET": "amhariagbe (Etiopia nutome)", + "ar": "Arabiagbe", + "ar_AE": "Arabiagbe (United Arab Emirates nutome)", + "ar_BH": "Arabiagbe (Bahrain nutome)", + "ar_DJ": "Arabiagbe (Dzibuti nutome)", + "ar_DZ": "Arabiagbe (Algeria nutome)", + "ar_EG": "Arabiagbe (Egypte nutome)", + "ar_EH": "Arabiagbe (Æ”etoÉ–oÆ’e Sahara nutome)", + "ar_ER": "Arabiagbe (Eritrea nutome)", + "ar_IL": "Arabiagbe (Israel nutome)", + "ar_IQ": "Arabiagbe (iraqdukÉ”)", + "ar_JO": "Arabiagbe (Yordan nutome)", + "ar_KM": "Arabiagbe (Komoros nutome)", + "ar_KW": "Arabiagbe (Kuwait nutome)", + "ar_LB": "Arabiagbe (LebanÉ”n nutome)", + "ar_LY": "Arabiagbe (Libya nutome)", + "ar_MA": "Arabiagbe (Moroko nutome)", + "ar_MR": "Arabiagbe (Mauritania nutome)", + "ar_OM": "Arabiagbe (Oman nutome)", + "ar_PS": "Arabiagbe (Palestinia nutome)", + "ar_QA": "Arabiagbe (Katar nutome)", + "ar_SA": "Arabiagbe (Saudi Arabia nutome)", + "ar_SD": "Arabiagbe (Sudan nutome)", + "ar_SO": "Arabiagbe (Somalia nutome)", + "ar_SY": "Arabiagbe (Siria nutome)", + "ar_TD": "Arabiagbe (Tsad nutome)", + "ar_TN": "Arabiagbe (Tunisia nutome)", + "ar_YE": "Arabiagbe (Yemen nutome)", + "as": "assamegbe", + "as_IN": "assamegbe (India nutome)", + "az": "azerbaijangbe", + "az_AZ": "azerbaijangbe (Azerbaijan nutome)", + "az_Cyrl": "azerbaijangbe (CyrillicgbeŋɔŋlÉ”)", + "az_Cyrl_AZ": "azerbaijangbe (CyrillicgbeŋɔŋlÉ”, Azerbaijan nutome)", + "az_Latn": "azerbaijangbe (LatingbeŋɔŋlÉ”)", + "az_Latn_AZ": "azerbaijangbe (LatingbeŋɔŋlÉ”, Azerbaijan nutome)", + "be": "belarusiagbe", + "be_BY": "belarusiagbe (Belarus nutome)", + "bg": "bulgariagbe", + "bg_BG": "bulgariagbe (Bulgaria nutome)", + "bm": "bambaragbe", + "bm_ML": "bambaragbe (Mali nutome)", + "bn": "Bengaligbe", + "bn_BD": "Bengaligbe (Bangladesh nutome)", + "bn_IN": "Bengaligbe (India nutome)", + "bo": "tibetagbe", + "bo_CN": "tibetagbe (Tsaina nutome)", + "bo_IN": "tibetagbe (India nutome)", + "br": "bretongbe", + "br_FR": "bretongbe (France nutome)", + "bs": "bosniagbe", + "bs_BA": "bosniagbe (Bosnia kple Herzergovina nutome)", + "bs_Cyrl": "bosniagbe (CyrillicgbeŋɔŋlÉ”)", + "bs_Cyrl_BA": "bosniagbe (CyrillicgbeŋɔŋlÉ”, Bosnia kple Herzergovina nutome)", + "bs_Latn": "bosniagbe (LatingbeŋɔŋlÉ”)", + "bs_Latn_BA": "bosniagbe (LatingbeŋɔŋlÉ”, Bosnia kple Herzergovina nutome)", + "ca": "katalagbe", + "ca_AD": "katalagbe (Andorra nutome)", + "ca_ES": "katalagbe (Spain nutome)", + "ca_FR": "katalagbe (France nutome)", + "ca_IT": "katalagbe (Italia nutome)", + "cs": "tsÉ›kgbe", + "cs_CZ": "tsÉ›kgbe (TsÉ›k repÉ”blik nutome)", + "cy": "walesgbe", + "cy_GB": "walesgbe (United Kingdom nutome)", + "da": "denmarkgbe", + "da_DK": "denmarkgbe (Denmark nutome)", + "da_GL": "denmarkgbe (Grinland nutome)", + "de": "Germaniagbe", + "de_AT": "Germaniagbe (Austria nutome)", + "de_BE": "Germaniagbe (Belgium nutome)", + "de_CH": "Germaniagbe (Switzerland nutome)", + "de_DE": "Germaniagbe (Germania nutome)", + "de_IT": "Germaniagbe (Italia nutome)", + "de_LI": "Germaniagbe (Litsenstein nutome)", + "de_LU": "Germaniagbe (LazembÉ”g nutome)", + "dz": "dzongkhagbe", + "dz_BT": "dzongkhagbe (Bhutan nutome)", + "ee": "EÊ‹egbe", + "ee_GH": "EÊ‹egbe (Ghana nutome)", + "ee_TG": "EÊ‹egbe (Togo nutome)", + "el": "grisigbe", + "el_CY": "grisigbe (Saiprus nutome)", + "el_GR": "grisigbe (Greece nutome)", + "en": "Yevugbe", + "en_AG": "Yevugbe (ÌAntigua kple Barbuda nutome)", + "en_AI": "Yevugbe (Anguilla nutome)", + "en_AS": "Yevugbe (Amerika Samoa nutome)", + "en_AT": "Yevugbe (Austria nutome)", + "en_AU": "Yevugbe (Australia nutome)", + "en_BB": "Yevugbe (Barbados nutome)", + "en_BE": "Yevugbe (Belgium nutome)", + "en_BI": "Yevugbe (Burundi nutome)", + "en_BM": "Yevugbe (Bermuda nutome)", + "en_BS": "Yevugbe (Bahamas nutome)", + "en_BW": "Yevugbe (Botswana nutome)", + "en_BZ": "Yevugbe (Belize nutome)", + "en_CA": "Yevugbe (Canada nutome)", + "en_CC": "Yevugbe (Kokos (Kiling) fudomekpo nutome)", + "en_CH": "Yevugbe (Switzerland nutome)", + "en_CK": "Yevugbe (Kook Æ’udomekpo nutome)", + "en_CM": "Yevugbe (Kamerun nutome)", + "en_CX": "Yevugbe (Kristmas Æ’udomekpo nutome)", + "en_CY": "Yevugbe (Saiprus nutome)", + "en_DE": "Yevugbe (Germania nutome)", + "en_DG": "Yevugbe (Diego Garsia nutome)", + "en_DK": "Yevugbe (Denmark nutome)", + "en_DM": "Yevugbe (Dominika nutome)", + "en_ER": "Yevugbe (Eritrea nutome)", + "en_FI": "Yevugbe (Finland nutome)", + "en_FJ": "Yevugbe (Fidzi nutome)", + "en_FK": "Yevugbe (Falkland Æ’udomekpowo nutome)", + "en_FM": "Yevugbe (Mikronesia nutome)", + "en_GB": "Yevugbe (United Kingdom nutome)", + "en_GD": "Yevugbe (Grenada nutome)", + "en_GG": "Yevugbe (Guernse nutome)", + "en_GH": "Yevugbe (Ghana nutome)", + "en_GI": "Yevugbe (Gibraltar nutome)", + "en_GM": "Yevugbe (Gambia nutome)", + "en_GU": "Yevugbe (Guam nutome)", + "en_GY": "Yevugbe (Guyanadu)", + "en_HK": "Yevugbe (HÉ”ng KÉ”ng SAR Tsaina nutome)", + "en_IE": "Yevugbe (Ireland nutome)", + "en_IL": "Yevugbe (Israel nutome)", + "en_IM": "Yevugbe (Aisle of Man nutome)", + "en_IN": "Yevugbe (India nutome)", + "en_IO": "Yevugbe (BritaintÉ”wo Æ’e india Æ’udome nutome)", + "en_JE": "Yevugbe (DzÉ›se nutome)", + "en_JM": "Yevugbe (Dzamaika nutome)", + "en_KE": "Yevugbe (Kenya nutome)", + "en_KI": "Yevugbe (Kiribati nutome)", + "en_KN": "Yevugbe (Saint Kitis kple Nevis nutome)", + "en_KY": "Yevugbe (Kayman Æ’udomekpowo nutome)", + "en_LC": "Yevugbe (Saint Lusia nutome)", + "en_LR": "Yevugbe (Liberia nutome)", + "en_LS": "Yevugbe (LÉ›soto nutome)", + "en_MG": "Yevugbe (Madagaska nutome)", + "en_MH": "Yevugbe (Marshal Æ’udomekpowo nutome)", + "en_MO": "Yevugbe (Macau SAR Tsaina nutome)", + "en_MP": "Yevugbe (Dziehe Marina Æ’udomekpowo nutome)", + "en_MS": "Yevugbe (Montserrat nutome)", + "en_MT": "Yevugbe (Malta nutome)", + "en_MU": "Yevugbe (mauritiusdukÉ”)", + "en_MW": "Yevugbe (Malawi nutome)", + "en_MY": "Yevugbe (Malaysia nutome)", + "en_NA": "Yevugbe (Namibia nutome)", + "en_NF": "Yevugbe (Norfolk Æ’udomekpo nutome)", + "en_NG": "Yevugbe (Nigeria nutome)", + "en_NL": "Yevugbe (Netherlands nutome)", + "en_NR": "Yevugbe (Nauru nutome)", + "en_NU": "Yevugbe (Niue nutome)", + "en_NZ": "Yevugbe (New Zealand nutome)", + "en_PG": "Yevugbe (Papua New Gini nutome)", + "en_PH": "Yevugbe (Filipini nutome)", + "en_PK": "Yevugbe (Pakistan nutome)", + "en_PN": "Yevugbe (Pitkairn Æ’udomekpo nutome)", + "en_PR": "Yevugbe (Puerto Riko nutome)", + "en_PW": "Yevugbe (Palau nutome)", + "en_RW": "Yevugbe (Rwanda nutome)", + "en_SB": "Yevugbe (Solomon Æ’udomekpowo nutome)", + "en_SC": "Yevugbe (SeshÉ›ls nutome)", + "en_SD": "Yevugbe (Sudan nutome)", + "en_SE": "Yevugbe (Sweden nutome)", + "en_SG": "Yevugbe (SingapÉ”r nutome)", + "en_SH": "Yevugbe (Saint Helena nutome)", + "en_SI": "Yevugbe (Slovenia nutome)", + "en_SL": "Yevugbe (Sierra Leone nutome)", + "en_SZ": "Yevugbe (Swaziland nutome)", + "en_TC": "Yevugbe (TÉ›ks kple Kaikos Æ’udomekpowo nutome)", + "en_TK": "Yevugbe (Tokelau nutome)", + "en_TO": "Yevugbe (Tonga nutome)", + "en_TT": "Yevugbe (Trinidad kple Tobago nutome)", + "en_TV": "Yevugbe (Tuvalu nutome)", + "en_TZ": "Yevugbe (Tanzania nutome)", + "en_UG": "Yevugbe (Uganda nutome)", + "en_UM": "Yevugbe (U.S. Minor Outlaying Æ’udomekpowo nutome)", + "en_US": "Yevugbe (USA nutome)", + "en_VC": "Yevugbe (Saint Vincent kple Grenadine nutome)", + "en_VG": "Yevugbe (BritaintÉ”wo Æ’e Virgin Æ’udomekpowo nutome)", + "en_VI": "Yevugbe (U.S. VÉ›rgin Æ’udomekpowo nutome)", + "en_VU": "Yevugbe (Vanuatu nutome)", + "en_WS": "Yevugbe (Samoa nutome)", + "en_ZA": "Yevugbe (Anyiehe Africa nutome)", + "en_ZM": "Yevugbe (Zambia nutome)", + "en_ZW": "Yevugbe (Zimbabwe nutome)", + "eo": "esperantogbe", + "es": "Spanishgbe", + "es_AR": "Spanishgbe (Argentina nutome)", + "es_BO": "Spanishgbe (Bolivia nutome)", + "es_BR": "Spanishgbe (Brazil nutome)", + "es_CL": "Spanishgbe (Tsile nutome)", + "es_CO": "Spanishgbe (Kolombia nutome)", + "es_CR": "Spanishgbe (Kosta Rika nutome)", + "es_CU": "Spanishgbe (Kuba nutome)", + "es_DO": "Spanishgbe (Dominika repÉ”blik nutome)", + "es_EA": "Spanishgbe (Keuta and Melilla nutome)", + "es_EC": "Spanishgbe (EkuadÉ” nutome)", + "es_ES": "Spanishgbe (Spain nutome)", + "es_GQ": "Spanishgbe (Ekuatorial Guini nutome)", + "es_GT": "Spanishgbe (Guatemala nutome)", + "es_HN": "Spanishgbe (Hondurasdu)", + "es_IC": "Spanishgbe (Kanari Æ’udomekpowo nutome)", + "es_MX": "Spanishgbe (Mexico nutome)", + "es_NI": "Spanishgbe (NicaraguadukÉ”)", + "es_PA": "Spanishgbe (Panama nutome)", + "es_PE": "Spanishgbe (Peru nutome)", + "es_PH": "Spanishgbe (Filipini nutome)", + "es_PR": "Spanishgbe (Puerto Riko nutome)", + "es_PY": "Spanishgbe (Paragua nutome)", + "es_SV": "Spanishgbe (El SalvadÉ” nutome)", + "es_US": "Spanishgbe (USA nutome)", + "es_UY": "Spanishgbe (uruguaydukÉ”)", + "es_VE": "Spanishgbe (Venezuela nutome)", + "et": "estoniagbe", + "et_EE": "estoniagbe (Estonia nutome)", + "eu": "basqugbe", + "eu_ES": "basqugbe (Spain nutome)", + "fa": "persiagbe", + "fa_AF": "persiagbe (Afghanistan nutome)", + "fa_IR": "persiagbe (Iran nutome)", + "fi": "finlanÉ–gbe", + "fi_FI": "finlanÉ–gbe (Finland nutome)", + "fr": "Fransegbe", + "fr_BE": "Fransegbe (Belgium nutome)", + "fr_BF": "Fransegbe (Burkina Faso nutome)", + "fr_BI": "Fransegbe (Burundi nutome)", + "fr_BJ": "Fransegbe (Benin nutome)", + "fr_BL": "Fransegbe (Saint Barthélemy nutome)", + "fr_CA": "Fransegbe (Canada nutome)", + "fr_CD": "Fransegbe (Kongo Kinshasa nutome)", + "fr_CF": "Fransegbe (Titina Afrika repÉ”blik nutome)", + "fr_CG": "Fransegbe (Kongo Brazzaville nutome)", + "fr_CH": "Fransegbe (Switzerland nutome)", + "fr_CI": "Fransegbe (Kote d’Ivoire nutome)", + "fr_CM": "Fransegbe (Kamerun nutome)", + "fr_DJ": "Fransegbe (Dzibuti nutome)", + "fr_DZ": "Fransegbe (Algeria nutome)", + "fr_FR": "Fransegbe (France nutome)", + "fr_GA": "Fransegbe (GabÉ”n nutome)", + "fr_GF": "Fransegbe (Frentsi Gayana nutome)", + "fr_GN": "Fransegbe (Guini nutome)", + "fr_GP": "Fransegbe (Guadelupe nutome)", + "fr_GQ": "Fransegbe (Ekuatorial Guini nutome)", + "fr_HT": "Fransegbe (Haiti nutome)", + "fr_KM": "Fransegbe (Komoros nutome)", + "fr_LU": "Fransegbe (LazembÉ”g nutome)", + "fr_MA": "Fransegbe (Moroko nutome)", + "fr_MC": "Fransegbe (Monako nutome)", + "fr_MF": "Fransegbe (Saint Martin nutome)", + "fr_MG": "Fransegbe (Madagaska nutome)", + "fr_ML": "Fransegbe (Mali nutome)", + "fr_MQ": "Fransegbe (Martiniki nutome)", + "fr_MR": "Fransegbe (Mauritania nutome)", + "fr_MU": "Fransegbe (mauritiusdukÉ”)", + "fr_NC": "Fransegbe (New Kaledonia nutome)", + "fr_NE": "Fransegbe (Niger nutome)", + "fr_PF": "Fransegbe (Frentsi PÉ”linesia nutome)", + "fr_PM": "Fransegbe (Saint Pierre kple MikelÉ”n nutome)", + "fr_RE": "Fransegbe (Réunion nutome)", + "fr_RW": "Fransegbe (Rwanda nutome)", + "fr_SC": "Fransegbe (SeshÉ›ls nutome)", + "fr_SN": "Fransegbe (Senegal nutome)", + "fr_SY": "Fransegbe (Siria nutome)", + "fr_TD": "Fransegbe (Tsad nutome)", + "fr_TG": "Fransegbe (Togo nutome)", + "fr_TN": "Fransegbe (Tunisia nutome)", + "fr_VU": "Fransegbe (Vanuatu nutome)", + "fr_WF": "Fransegbe (Wallis kple Futuna nutome)", + "fr_YT": "Fransegbe (Mayotte nutome)", + "ga": "irelanÉ–gbe", + "ga_IE": "irelanÉ–gbe (Ireland nutome)", + "gl": "galatagbe", + "gl_ES": "galatagbe (Spain nutome)", + "gu": "gujarati", + "gu_IN": "gujarati (India nutome)", + "ha": "hausagbe", + "ha_GH": "hausagbe (Ghana nutome)", + "ha_NE": "hausagbe (Niger nutome)", + "ha_NG": "hausagbe (Nigeria nutome)", + "he": "hebrigbe", + "he_IL": "hebrigbe (Israel nutome)", + "hi": "Hindigbe", + "hi_IN": "Hindigbe (India nutome)", + "hr": "kroatiagbe", + "hr_BA": "kroatiagbe (Bosnia kple Herzergovina nutome)", + "hr_HR": "kroatiagbe (Kroatsia nutome)", + "hu": "hungarigbe", + "hu_HU": "hungarigbe (Hungari nutome)", + "hy": "armeniagbe", + "hy_AM": "armeniagbe (Armenia nutome)", + "id": "Indonesiagbe", + "id_ID": "Indonesiagbe (Indonesia nutome)", + "ig": "igbogbe", + "ig_NG": "igbogbe (Nigeria nutome)", + "is": "icelanÉ–gbe", + "is_IS": "icelanÉ–gbe (Aiseland nutome)", + "it": "Italiagbe", + "it_CH": "Italiagbe (Switzerland nutome)", + "it_IT": "Italiagbe (Italia nutome)", + "it_SM": "Italiagbe (San Marino nutome)", + "ja": "Japangbe", + "ja_JP": "Japangbe (Dzapan nutome)", + "ka": "gÉ”giagbe", + "ka_GE": "gÉ”giagbe (Georgia nutome)", + "kk": "kazakhstangbe", + "kk_KZ": "kazakhstangbe (Kazakstan nutome)", + "km": "khmergbe", + "km_KH": "khmergbe (Kambodia nutome)", + "kn": "kannadagbe", + "kn_IN": "kannadagbe (India nutome)", + "ko": "Koreagbe", + "ko_KP": "Koreagbe (Dziehe Korea nutome)", + "ko_KR": "Koreagbe (Anyiehe Korea nutome)", + "ks": "kashmirgbe", + "ks_IN": "kashmirgbe (India nutome)", + "ky": "kirghistangbe", + "ky_KG": "kirghistangbe (Kirgizstan nutome)", + "lb": "laksembÉ”ggbe", + "lb_LU": "laksembÉ”ggbe (LazembÉ”g nutome)", + "ln": "lingala", + "ln_AO": "lingala (Angola nutome)", + "ln_CD": "lingala (Kongo Kinshasa nutome)", + "ln_CF": "lingala (Titina Afrika repÉ”blik nutome)", + "ln_CG": "lingala (Kongo Brazzaville nutome)", + "lo": "laogbe", + "lo_LA": "laogbe (Laos nutome)", + "lt": "lithuaniagbe", + "lt_LT": "lithuaniagbe (Lituania nutome)", + "lv": "latviagbe", + "lv_LV": "latviagbe (Latvia nutome)", + "mg": "malagasegbe", + "mg_MG": "malagasegbe (Madagaska nutome)", + "mk": "makedoniagbe", + "mk_MK": "makedoniagbe (Makedonia nutome)", + "ml": "malayagbe", + "ml_IN": "malayagbe (India nutome)", + "mn": "mongoliagbe", + "mn_MN": "mongoliagbe (Mongolia nutome)", + "mr": "marathiagbe", + "mr_IN": "marathiagbe (India nutome)", + "ms": "malaygbe", + "ms_BN": "malaygbe (Brunei nutome)", + "ms_MY": "malaygbe (Malaysia nutome)", + "ms_SG": "malaygbe (SingapÉ”r nutome)", + "mt": "maltagbe", + "mt_MT": "maltagbe (Malta nutome)", + "my": "burmagbe", + "my_MM": "burmagbe (Myanmar (Burma) nutome)", + "nb": "nÉ”weigbe bokmÃ¥l", + "nb_NO": "nÉ”weigbe bokmÃ¥l (Norway nutome)", + "nb_SJ": "nÉ”weigbe bokmÃ¥l (Svalbard kple Yan Mayen nutome)", + "nd": "dziehe ndebelegbe", + "nd_ZW": "dziehe ndebelegbe (Zimbabwe nutome)", + "ne": "nepalgbe", + "ne_IN": "nepalgbe (India nutome)", + "ne_NP": "nepalgbe (Nepal nutome)", + "nl": "Hollandgbe", + "nl_AW": "Hollandgbe (Aruba nutome)", + "nl_BE": "Hollandgbe (Belgium nutome)", + "nl_NL": "Hollandgbe (Netherlands nutome)", + "nl_SR": "Hollandgbe (Suriname nutome)", + "nn": "nÉ”weigbe ninÉ”sk", + "nn_NO": "nÉ”weigbe ninÉ”sk (Norway nutome)", + "no": "nÉ”weigbe", + "no_NO": "nÉ”weigbe (Norway nutome)", + "or": "oriyagbe", + "or_IN": "oriyagbe (India nutome)", + "os": "ossetiagbe", + "os_GE": "ossetiagbe (Georgia nutome)", + "os_RU": "ossetiagbe (Russia nutome)", + "pa": "pundzabgbe", + "pa_Arab": "pundzabgbe (ArabiagbeŋɔŋlÉ”)", + "pa_Arab_PK": "pundzabgbe (ArabiagbeŋɔŋlÉ”, Pakistan nutome)", + "pa_Guru": "pundzabgbe (gurmukhigbeŋɔŋlÉ”)", + "pa_Guru_IN": "pundzabgbe (gurmukhigbeŋɔŋlÉ”, India nutome)", + "pa_IN": "pundzabgbe (India nutome)", + "pa_PK": "pundzabgbe (Pakistan nutome)", + "pl": "Polishgbe", + "pl_PL": "Polishgbe (Poland nutome)", + "ps": "pashtogbe", + "ps_AF": "pashtogbe (Afghanistan nutome)", + "pt": "Portuguesegbe", + "pt_AO": "Portuguesegbe (Angola nutome)", + "pt_BR": "Portuguesegbe (Brazil nutome)", + "pt_CH": "Portuguesegbe (Switzerland nutome)", + "pt_CV": "Portuguesegbe (Kape Verde nutome)", + "pt_GQ": "Portuguesegbe (Ekuatorial Guini nutome)", + "pt_GW": "Portuguesegbe (Gini-Bisao nutome)", + "pt_LU": "Portuguesegbe (LazembÉ”g nutome)", + "pt_MO": "Portuguesegbe (Macau SAR Tsaina nutome)", + "pt_MZ": "Portuguesegbe (Mozambiki nutome)", + "pt_PT": "Portuguesegbe (Portugal nutome)", + "pt_ST": "Portuguesegbe (São Tomé kple Príncipe nutome)", + "pt_TL": "Portuguesegbe (Timor-Leste nutome)", + "qu": "kwetsuagbe", + "qu_BO": "kwetsuagbe (Bolivia nutome)", + "qu_EC": "kwetsuagbe (EkuadÉ” nutome)", + "qu_PE": "kwetsuagbe (Peru nutome)", + "rm": "romanshgbe", + "rm_CH": "romanshgbe (Switzerland nutome)", + "rn": "rundigbe", + "rn_BI": "rundigbe (Burundi nutome)", + "ro": "romaniagbe", + "ro_MD": "romaniagbe (Moldova nutome)", + "ro_RO": "romaniagbe (Romania nutome)", + "ru": "Russiagbe", + "ru_BY": "Russiagbe (Belarus nutome)", + "ru_KG": "Russiagbe (Kirgizstan nutome)", + "ru_KZ": "Russiagbe (Kazakstan nutome)", + "ru_MD": "Russiagbe (Moldova nutome)", + "ru_RU": "Russiagbe (Russia nutome)", + "ru_UA": "Russiagbe (Ukraine nutome)", + "rw": "ruwandagbe", + "rw_RW": "ruwandagbe (Rwanda nutome)", + "se": "dziehe samigbe", + "se_FI": "dziehe samigbe (Finland nutome)", + "se_NO": "dziehe samigbe (Norway nutome)", + "se_SE": "dziehe samigbe (Sweden nutome)", + "sg": "sangogbe", + "sg_CF": "sangogbe (Titina Afrika repÉ”blik nutome)", + "sh": "serbo-croatiagbe", + "sh_BA": "serbo-croatiagbe (Bosnia kple Herzergovina nutome)", + "si": "sinhalgbe", + "si_LK": "sinhalgbe (Sri Lanka nutome)", + "sk": "slovakiagbe", + "sk_SK": "slovakiagbe (Slovakia nutome)", + "sl": "sloveniagbe", + "sl_SI": "sloveniagbe (Slovenia nutome)", + "sn": "shonagbe", + "sn_ZW": "shonagbe (Zimbabwe nutome)", + "so": "somaliagbe", + "so_DJ": "somaliagbe (Dzibuti nutome)", + "so_ET": "somaliagbe (Etiopia nutome)", + "so_KE": "somaliagbe (Kenya nutome)", + "so_SO": "somaliagbe (Somalia nutome)", + "sq": "albaniagbe", + "sq_AL": "albaniagbe (Albania nutome)", + "sq_MK": "albaniagbe (Makedonia nutome)", + "sr": "serbiagbe", + "sr_BA": "serbiagbe (Bosnia kple Herzergovina nutome)", + "sr_Cyrl": "serbiagbe (CyrillicgbeŋɔŋlÉ”)", + "sr_Cyrl_BA": "serbiagbe (CyrillicgbeŋɔŋlÉ”, Bosnia kple Herzergovina nutome)", + "sr_Cyrl_ME": "serbiagbe (CyrillicgbeŋɔŋlÉ”, Montenegro nutome)", + "sr_Latn": "serbiagbe (LatingbeŋɔŋlÉ”)", + "sr_Latn_BA": "serbiagbe (LatingbeŋɔŋlÉ”, Bosnia kple Herzergovina nutome)", + "sr_Latn_ME": "serbiagbe (LatingbeŋɔŋlÉ”, Montenegro nutome)", + "sr_ME": "serbiagbe (Montenegro nutome)", + "sv": "swedengbe", + "sv_AX": "swedengbe (Ã…land Æ’udomekpo nutome)", + "sv_FI": "swedengbe (Finland nutome)", + "sv_SE": "swedengbe (Sweden nutome)", + "sw": "swahili", + "sw_CD": "swahili (Kongo Kinshasa nutome)", + "sw_KE": "swahili (Kenya nutome)", + "sw_TZ": "swahili (Tanzania nutome)", + "sw_UG": "swahili (Uganda nutome)", + "ta": "tamilgbe", + "ta_IN": "tamilgbe (India nutome)", + "ta_LK": "tamilgbe (Sri Lanka nutome)", + "ta_MY": "tamilgbe (Malaysia nutome)", + "ta_SG": "tamilgbe (SingapÉ”r nutome)", + "te": "telegugbe", + "te_IN": "telegugbe (India nutome)", + "th": "Thailandgbe", + "th_TH": "Thailandgbe (Thailand nutome)", + "ti": "tigrinyagbe", + "ti_ER": "tigrinyagbe (Eritrea nutome)", + "ti_ET": "tigrinyagbe (Etiopia nutome)", + "tl": "tagalogbe", + "tl_PH": "tagalogbe (Filipini nutome)", + "to": "tongagbe", + "to_TO": "tongagbe (Tonga nutome)", + "tr": "Turkishgbe", + "tr_CY": "Turkishgbe (Saiprus nutome)", + "tr_TR": "Turkishgbe (TÉ›ki nutome)", + "ug": "uighurgbe", + "ug_CN": "uighurgbe (Tsaina nutome)", + "uk": "ukraingbe", + "uk_UA": "ukraingbe (Ukraine nutome)", + "ur": "urdugbe", + "ur_IN": "urdugbe (India nutome)", + "ur_PK": "urdugbe (Pakistan nutome)", + "uz": "uzbekistangbe", + "uz_AF": "uzbekistangbe (Afghanistan nutome)", + "uz_Arab": "uzbekistangbe (ArabiagbeŋɔŋlÉ”)", + "uz_Arab_AF": "uzbekistangbe (ArabiagbeŋɔŋlÉ”, Afghanistan nutome)", + "uz_Cyrl": "uzbekistangbe (CyrillicgbeŋɔŋlÉ”)", + "uz_Cyrl_UZ": "uzbekistangbe (CyrillicgbeŋɔŋlÉ”, Uzbekistan nutome)", + "uz_Latn": "uzbekistangbe (LatingbeŋɔŋlÉ”)", + "uz_Latn_UZ": "uzbekistangbe (LatingbeŋɔŋlÉ”, Uzbekistan nutome)", + "uz_UZ": "uzbekistangbe (Uzbekistan nutome)", + "vi": "vietnamgbe", + "vi_VN": "vietnamgbe (Vietnam nutome)", + "yo": "yorubagbe", + "yo_BJ": "yorubagbe (Benin nutome)", + "yo_NG": "yorubagbe (Nigeria nutome)", + "zh": "Chinagbe", + "zh_CN": "Chinagbe (Tsaina nutome)", + "zh_HK": "Chinagbe (HÉ”ng KÉ”ng SAR Tsaina nutome)", + "zh_Hans": "Chinagbe (ChinesegbeŋɔŋlÉ”)", + "zh_Hans_CN": "Chinagbe (ChinesegbeŋɔŋlÉ”, Tsaina nutome)", + "zh_Hans_HK": "Chinagbe (ChinesegbeŋɔŋlÉ”, HÉ”ng KÉ”ng SAR Tsaina nutome)", + "zh_Hans_MO": "Chinagbe (ChinesegbeŋɔŋlÉ”, Macau SAR Tsaina nutome)", + "zh_Hans_SG": "Chinagbe (ChinesegbeŋɔŋlÉ”, SingapÉ”r nutome)", + "zh_Hant": "Chinagbe (Blema ChinesegbeŋɔŋlÉ”)", + "zh_Hant_HK": "Chinagbe (Blema ChinesegbeŋɔŋlÉ”, HÉ”ng KÉ”ng SAR Tsaina nutome)", + "zh_Hant_MO": "Chinagbe (Blema ChinesegbeŋɔŋlÉ”, Macau SAR Tsaina nutome)", + "zh_Hant_TW": "Chinagbe (Blema ChinesegbeŋɔŋlÉ”, Taiwan nutome)", + "zh_MO": "Chinagbe (Macau SAR Tsaina nutome)", + "zh_SG": "Chinagbe (SingapÉ”r nutome)", + "zh_TW": "Chinagbe (Taiwan nutome)", + "zu": "zulugbe", + "zu_ZA": "zulugbe (Anyiehe Africa nutome)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/el.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/el.json new file mode 100644 index 0000000000000000000000000000000000000000..7beb36ed99b2e1270ce26df76d84e428173ff2f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/el.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "ΑφÏικάανς", + "af_NA": "ΑφÏικάανς (Îαμίμπια)", + "af_ZA": "ΑφÏικάανς (Îότια ΑφÏική)", + "ak": "Ακάν", + "ak_GH": "Ακάν (Γκάνα)", + "am": "ΑμαÏικά", + "am_ET": "ΑμαÏικά (Αιθιοπία)", + "ar": "ΑÏαβικά", + "ar_AE": "ΑÏαβικά (Ηνωμένα ΑÏαβικά ΕμιÏάτα)", + "ar_BH": "ΑÏαβικά (ΜπαχÏέιν)", + "ar_DJ": "ΑÏαβικά (Τζιμπουτί)", + "ar_DZ": "ΑÏαβικά (ΑλγεÏία)", + "ar_EG": "ΑÏαβικά (Αίγυπτος)", + "ar_EH": "ΑÏαβικά (Δυτική ΣαχάÏα)", + "ar_ER": "ΑÏαβικά (ΕÏυθÏαία)", + "ar_IL": "ΑÏαβικά (ΙσÏαήλ)", + "ar_IQ": "ΑÏαβικά (ΙÏάκ)", + "ar_JO": "ΑÏαβικά (ΙοÏδανία)", + "ar_KM": "ΑÏαβικά (ΚομόÏες)", + "ar_KW": "ΑÏαβικά (Κουβέιτ)", + "ar_LB": "ΑÏαβικά (Λίβανος)", + "ar_LY": "ΑÏαβικά (ΛιβÏη)", + "ar_MA": "ΑÏαβικά (ΜαÏόκο)", + "ar_MR": "ΑÏαβικά (ΜαυÏιτανία)", + "ar_OM": "ΑÏαβικά (Ομάν)", + "ar_PS": "ΑÏαβικά (Παλαιστινιακά Εδάφη)", + "ar_QA": "ΑÏαβικά (ΚατάÏ)", + "ar_SA": "ΑÏαβικά (Σαουδική ΑÏαβία)", + "ar_SD": "ΑÏαβικά (Σουδάν)", + "ar_SO": "ΑÏαβικά (Σομαλία)", + "ar_SS": "ΑÏαβικά (Îότιο Σουδάν)", + "ar_SY": "ΑÏαβικά (ΣυÏία)", + "ar_TD": "ΑÏαβικά (Τσαντ)", + "ar_TN": "ΑÏαβικά (Τυνησία)", + "ar_YE": "ΑÏαβικά (Υεμένη)", + "as": "Ασαμεζικά", + "as_IN": "Ασαμεζικά (Ινδία)", + "az": "ΑζεÏμπαϊτζανικά", + "az_AZ": "ΑζεÏμπαϊτζανικά (ΑζεÏμπαϊτζάν)", + "az_Cyrl": "ΑζεÏμπαϊτζανικά (ΚυÏιλλικό)", + "az_Cyrl_AZ": "ΑζεÏμπαϊτζανικά (ΚυÏιλλικό, ΑζεÏμπαϊτζάν)", + "az_Latn": "ΑζεÏμπαϊτζανικά (Λατινικό)", + "az_Latn_AZ": "ΑζεÏμπαϊτζανικά (Λατινικό, ΑζεÏμπαϊτζάν)", + "be": "ΛευκοÏωσικά", + "be_BY": "ΛευκοÏωσικά (ΛευκοÏωσία)", + "bg": "ΒουλγαÏικά", + "bg_BG": "ΒουλγαÏικά (ΒουλγαÏία)", + "bm": "ΜπαμπάÏα", + "bm_ML": "ΜπαμπάÏα (Μάλι)", + "bn": "Μπενγκάλι", + "bn_BD": "Μπενγκάλι (Μπανγκλαντές)", + "bn_IN": "Μπενγκάλι (Ινδία)", + "bo": "Θιβετιανά", + "bo_CN": "Θιβετιανά (Κίνα)", + "bo_IN": "Θιβετιανά (Ινδία)", + "br": "Î’Ïετονικά", + "br_FR": "Î’Ïετονικά (Γαλλία)", + "bs": "Βοσνιακά", + "bs_BA": "Βοσνιακά (Βοσνία - ΕÏζεγοβίνη)", + "bs_Cyrl": "Βοσνιακά (ΚυÏιλλικό)", + "bs_Cyrl_BA": "Βοσνιακά (ΚυÏιλλικό, Βοσνία - ΕÏζεγοβίνη)", + "bs_Latn": "Βοσνιακά (Λατινικό)", + "bs_Latn_BA": "Βοσνιακά (Λατινικό, Βοσνία - ΕÏζεγοβίνη)", + "ca": "Καταλανικά", + "ca_AD": "Καταλανικά (ΑνδόÏα)", + "ca_ES": "Καταλανικά (Ισπανία)", + "ca_FR": "Καταλανικά (Γαλλία)", + "ca_IT": "Καταλανικά (Ιταλία)", + "ce": "Τσετσενικά", + "ce_RU": "Τσετσενικά (Ρωσία)", + "cs": "Τσεχικά", + "cs_CZ": "Τσεχικά (Τσεχική ΔημοκÏατία)", + "cy": "Ουαλικά", + "cy_GB": "Ουαλικά (Ηνωμένο Βασίλειο)", + "da": "Δανικά", + "da_DK": "Δανικά (Δανία)", + "da_GL": "Δανικά (ΓÏοιλανδία)", + "de": "ΓεÏμανικά", + "de_AT": "ΓεÏμανικά (ΑυστÏία)", + "de_BE": "ΓεÏμανικά (Βέλγιο)", + "de_CH": "ΓεÏμανικά (Ελβετία)", + "de_DE": "ΓεÏμανικά (ΓεÏμανία)", + "de_IT": "ΓεÏμανικά (Ιταλία)", + "de_LI": "ΓεÏμανικά (Λιχτενστάιν)", + "de_LU": "ΓεÏμανικά (ΛουξεμβοÏÏγο)", + "dz": "Îτζόνγκχα", + "dz_BT": "Îτζόνγκχα (Μπουτάν)", + "ee": "Γι", + "ee_GH": "Γι (Γκάνα)", + "ee_TG": "Γι (Τόγκο)", + "el": "Ελληνικά", + "el_CY": "Ελληνικά (ΚÏÏ€Ïος)", + "el_GR": "Ελληνικά (Ελλάδα)", + "en": "Αγγλικά", + "en_AG": "Αγγλικά (Αντίγκουα και ΜπαÏμποÏντα)", + "en_AI": "Αγγλικά (Ανγκουίλα)", + "en_AS": "Αγγλικά (ΑμεÏικανική Σαμόα)", + "en_AT": "Αγγλικά (ΑυστÏία)", + "en_AU": "Αγγλικά (ΑυστÏαλία)", + "en_BB": "Αγγλικά (ΜπαÏμπάντος)", + "en_BE": "Αγγλικά (Βέλγιο)", + "en_BI": "Αγγλικά (ΜπουÏοÏντι)", + "en_BM": "Αγγλικά (ΒεÏμοÏδες)", + "en_BS": "Αγγλικά (Μπαχάμες)", + "en_BW": "Αγγλικά (Μποτσουάνα)", + "en_BZ": "Αγγλικά (Μπελίζ)", + "en_CA": "Αγγλικά (Καναδάς)", + "en_CC": "Αγγλικά (Îήσοι Κόκος (Κίλινγκ))", + "en_CH": "Αγγλικά (Ελβετία)", + "en_CK": "Αγγλικά (Îήσοι Κουκ)", + "en_CM": "Αγγλικά (ΚαμεÏοÏν)", + "en_CX": "Αγγλικά (Îήσος των ΧÏιστουγέννων)", + "en_CY": "Αγγλικά (ΚÏÏ€Ïος)", + "en_DE": "Αγγλικά (ΓεÏμανία)", + "en_DG": "Αγγλικά (Îτιέγκο ΓκαÏσία)", + "en_DK": "Αγγλικά (Δανία)", + "en_DM": "Αγγλικά (Îτομίνικα)", + "en_ER": "Αγγλικά (ΕÏυθÏαία)", + "en_FI": "Αγγλικά (Φινλανδία)", + "en_FJ": "Αγγλικά (Φίτζι)", + "en_FK": "Αγγλικά (Îήσοι Φόκλαντ)", + "en_FM": "Αγγλικά (ΜικÏονησία)", + "en_GB": "Αγγλικά (Ηνωμένο Βασίλειο)", + "en_GD": "Αγγλικά (ΓÏενάδα)", + "en_GG": "Αγγλικά (ΓκέÏνζι)", + "en_GH": "Αγγλικά (Γκάνα)", + "en_GI": "Αγγλικά (ΓιβÏαλτάÏ)", + "en_GM": "Αγγλικά (Γκάμπια)", + "en_GU": "Αγγλικά (Γκουάμ)", + "en_GY": "Αγγλικά (Γουιάνα)", + "en_HK": "Αγγλικά (Χονγκ Κονγκ ΕΔΠ Κίνας)", + "en_IE": "Αγγλικά (ΙÏλανδία)", + "en_IL": "Αγγλικά (ΙσÏαήλ)", + "en_IM": "Αγγλικά (Îήσος Μαν)", + "en_IN": "Αγγλικά (Ινδία)", + "en_IO": "Αγγλικά (Î’Ïετανικά Εδάφη Î™Î½Î´Î¹ÎºÎ¿Ï Î©ÎºÎµÎ±Î½Î¿Ï)", + "en_JE": "Αγγλικά (ΤζέÏζι)", + "en_JM": "Αγγλικά (Τζαμάικα)", + "en_KE": "Αγγλικά (Κένυα)", + "en_KI": "Αγγλικά (ΚιÏιμπάτι)", + "en_KN": "Αγγλικά (Άγιος ΧÏιστόφοÏος και Îέβις)", + "en_KY": "Αγγλικά (Îήσοι Κάιμαν)", + "en_LC": "Αγγλικά (Αγία Λουκία)", + "en_LR": "Αγγλικά (ΛιβεÏία)", + "en_LS": "Αγγλικά (Λεσότο)", + "en_MG": "Αγγλικά (ΜαδαγασκάÏη)", + "en_MH": "Αγγλικά (Îήσοι ΜάÏσαλ)", + "en_MO": "Αγγλικά (Μακάο ΕΔΠ Κίνας)", + "en_MP": "Αγγλικά (Îήσοι Î’ÏŒÏειες ΜαÏιάνες)", + "en_MS": "Αγγλικά (ΜονσεÏάτ)", + "en_MT": "Αγγλικά (Μάλτα)", + "en_MU": "Αγγλικά (ΜαυÏίκιος)", + "en_MW": "Αγγλικά (Μαλάουι)", + "en_MY": "Αγγλικά (Μαλαισία)", + "en_NA": "Αγγλικά (Îαμίμπια)", + "en_NF": "Αγγλικά (Îήσος ÎÏŒÏφολκ)", + "en_NG": "Αγγλικά (ÎιγηÏία)", + "en_NL": "Αγγλικά (Ολλανδία)", + "en_NR": "Αγγλικά (ÎαουÏοÏ)", + "en_NU": "Αγγλικά (ÎιοÏε)", + "en_NZ": "Αγγλικά (Îέα Ζηλανδία)", + "en_PG": "Αγγλικά (ΠαποÏα Îέα Γουινέα)", + "en_PH": "Αγγλικά (Φιλιππίνες)", + "en_PK": "Αγγλικά (Πακιστάν)", + "en_PN": "Αγγλικά (Îήσοι ΠίτκεÏν)", + "en_PR": "Αγγλικά (ΠουέÏτο Ρίκο)", + "en_PW": "Αγγλικά (Παλάου)", + "en_RW": "Αγγλικά (Ρουάντα)", + "en_SB": "Αγγλικά (Îήσοι Σολομώντος)", + "en_SC": "Αγγλικά (Σεϋχέλλες)", + "en_SD": "Αγγλικά (Σουδάν)", + "en_SE": "Αγγλικά (Σουηδία)", + "en_SG": "Αγγλικά (ΣιγκαποÏÏη)", + "en_SH": "Αγγλικά (Αγία Ελένη)", + "en_SI": "Αγγλικά (Σλοβενία)", + "en_SL": "Αγγλικά (ΣιέÏα Λεόνε)", + "en_SS": "Αγγλικά (Îότιο Σουδάν)", + "en_SX": "Αγγλικά (Άγιος ΜαÏτίνος (Ολλανδικό τμήμα))", + "en_SZ": "Αγγλικά (Σουαζιλάνδη)", + "en_TC": "Αγγλικά (Îήσοι ΤεÏκ και Κάικος)", + "en_TK": "Αγγλικά (Τοκελάου)", + "en_TO": "Αγγλικά (Τόνγκα)", + "en_TT": "Αγγλικά (ΤÏινιντάντ και Τομπάγκο)", + "en_TV": "Αγγλικά (ΤουβαλοÏ)", + "en_TZ": "Αγγλικά (Τανζανία)", + "en_UG": "Αγγλικά (Ουγκάντα)", + "en_UM": "Αγγλικά (ΑπομακÏυσμένες Îησίδες ΗΠΑ)", + "en_US": "Αγγλικά (Ηνωμένες Πολιτείες)", + "en_VC": "Αγγλικά (Άγιος Βικέντιος και ΓÏεναδίνες)", + "en_VG": "Αγγλικά (Î’Ïετανικές ΠαÏθένοι Îήσοι)", + "en_VI": "Αγγλικά (ΑμεÏικανικές ΠαÏθένοι Îήσοι)", + "en_VU": "Αγγλικά (Βανουάτου)", + "en_WS": "Αγγλικά (Σαμόα)", + "en_ZA": "Αγγλικά (Îότια ΑφÏική)", + "en_ZM": "Αγγλικά (Ζάμπια)", + "en_ZW": "Αγγλικά (Ζιμπάμπουε)", + "eo": "ΕσπεÏάντο", + "es": "Ισπανικά", + "es_AR": "Ισπανικά (ΑÏγεντινή)", + "es_BO": "Ισπανικά (Βολιβία)", + "es_BR": "Ισπανικά (Î’Ïαζιλία)", + "es_CL": "Ισπανικά (Χιλή)", + "es_CO": "Ισπανικά (Κολομβία)", + "es_CR": "Ισπανικά (Κόστα Ρίκα)", + "es_CU": "Ισπανικά (ΚοÏβα)", + "es_DO": "Ισπανικά (Δομινικανή ΔημοκÏατία)", + "es_EA": "Ισπανικά (ΘεοÏτα και Μελίλα)", + "es_EC": "Ισπανικά (ΕκουαδόÏ)", + "es_ES": "Ισπανικά (Ισπανία)", + "es_GQ": "Ισπανικά (ΙσημεÏινή Γουινέα)", + "es_GT": "Ισπανικά (Γουατεμάλα)", + "es_HN": "Ισπανικά (ΟνδοÏÏα)", + "es_IC": "Ισπανικά (ΚανάÏιοι Îήσοι)", + "es_MX": "Ισπανικά (Μεξικό)", + "es_NI": "Ισπανικά (ÎικαÏάγουα)", + "es_PA": "Ισπανικά (Παναμάς)", + "es_PE": "Ισπανικά (ΠεÏοÏ)", + "es_PH": "Ισπανικά (Φιλιππίνες)", + "es_PR": "Ισπανικά (ΠουέÏτο Ρίκο)", + "es_PY": "Ισπανικά (ΠαÏαγουάη)", + "es_SV": "Ισπανικά (Ελ ΣαλβαδόÏ)", + "es_US": "Ισπανικά (Ηνωμένες Πολιτείες)", + "es_UY": "Ισπανικά (ΟυÏουγουάη)", + "es_VE": "Ισπανικά (Βενεζουέλα)", + "et": "Εσθονικά", + "et_EE": "Εσθονικά (Εσθονία)", + "eu": "Βασκικά", + "eu_ES": "Βασκικά (Ισπανία)", + "fa": "ΠεÏσικά", + "fa_AF": "ΠεÏσικά (Αφγανιστάν)", + "fa_IR": "ΠεÏσικά (ΙÏάν)", + "ff": "Φουλάχ", + "ff_CM": "Φουλάχ (ΚαμεÏοÏν)", + "ff_GN": "Φουλάχ (Γουινέα)", + "ff_MR": "Φουλάχ (ΜαυÏιτανία)", + "ff_SN": "Φουλάχ (Σενεγάλη)", + "fi": "Φινλανδικά", + "fi_FI": "Φινλανδικά (Φινλανδία)", + "fo": "ΦαÏόε", + "fo_DK": "ΦαÏόε (Δανία)", + "fo_FO": "ΦαÏόε (Îήσοι ΦεÏόες)", + "fr": "Γαλλικά", + "fr_BE": "Γαλλικά (Βέλγιο)", + "fr_BF": "Γαλλικά (ΜπουÏκίνα Φάσο)", + "fr_BI": "Γαλλικά (ΜπουÏοÏντι)", + "fr_BJ": "Γαλλικά (Μπενίν)", + "fr_BL": "Γαλλικά (Άγιος ΒαÏθολομαίος)", + "fr_CA": "Γαλλικά (Καναδάς)", + "fr_CD": "Γαλλικά (Κονγκό - Κινσάσα)", + "fr_CF": "Γαλλικά (ΚεντÏοαφÏικανική ΔημοκÏατία)", + "fr_CG": "Γαλλικά (Κονγκό - ΜπÏαζαβίλ)", + "fr_CH": "Γαλλικά (Ελβετία)", + "fr_CI": "Γαλλικά (Ακτή ΕλεφαντοστοÏ)", + "fr_CM": "Γαλλικά (ΚαμεÏοÏν)", + "fr_DJ": "Γαλλικά (Τζιμπουτί)", + "fr_DZ": "Γαλλικά (ΑλγεÏία)", + "fr_FR": "Γαλλικά (Γαλλία)", + "fr_GA": "Γαλλικά (Γκαμπόν)", + "fr_GF": "Γαλλικά (Γαλλική Γουιάνα)", + "fr_GN": "Γαλλικά (Γουινέα)", + "fr_GP": "Γαλλικά (ΓουαδελοÏπη)", + "fr_GQ": "Γαλλικά (ΙσημεÏινή Γουινέα)", + "fr_HT": "Γαλλικά (Αϊτή)", + "fr_KM": "Γαλλικά (ΚομόÏες)", + "fr_LU": "Γαλλικά (ΛουξεμβοÏÏγο)", + "fr_MA": "Γαλλικά (ΜαÏόκο)", + "fr_MC": "Γαλλικά (Μονακό)", + "fr_MF": "Γαλλικά (Άγιος ΜαÏτίνος (Γαλλικό τμήμα))", + "fr_MG": "Γαλλικά (ΜαδαγασκάÏη)", + "fr_ML": "Γαλλικά (Μάλι)", + "fr_MQ": "Γαλλικά (ΜαÏτινίκα)", + "fr_MR": "Γαλλικά (ΜαυÏιτανία)", + "fr_MU": "Γαλλικά (ΜαυÏίκιος)", + "fr_NC": "Γαλλικά (Îέα Καληδονία)", + "fr_NE": "Γαλλικά (ÎίγηÏας)", + "fr_PF": "Γαλλικά (Γαλλική Πολυνησία)", + "fr_PM": "Γαλλικά (Σεν Î Î¹ÎµÏ ÎºÎ±Î¹ Μικελόν)", + "fr_RE": "Γαλλικά (Ρεϊνιόν)", + "fr_RW": "Γαλλικά (Ρουάντα)", + "fr_SC": "Γαλλικά (Σεϋχέλλες)", + "fr_SN": "Γαλλικά (Σενεγάλη)", + "fr_SY": "Γαλλικά (ΣυÏία)", + "fr_TD": "Γαλλικά (Τσαντ)", + "fr_TG": "Γαλλικά (Τόγκο)", + "fr_TN": "Γαλλικά (Τυνησία)", + "fr_VU": "Γαλλικά (Βανουάτου)", + "fr_WF": "Γαλλικά (Ουάλις και ΦουτοÏνα)", + "fr_YT": "Γαλλικά (Μαγιότ)", + "fy": "Δυτικά ΦÏιζιανά", + "fy_NL": "Δυτικά ΦÏιζιανά (Ολλανδία)", + "ga": "ΙÏλανδικά", + "ga_IE": "ΙÏλανδικά (ΙÏλανδία)", + "gd": "Σκωτικά Κελτικά", + "gd_GB": "Σκωτικά Κελτικά (Ηνωμένο Βασίλειο)", + "gl": "Γαλικιανά", + "gl_ES": "Γαλικιανά (Ισπανία)", + "gu": "ΓκουγιαÏάτι", + "gu_IN": "ΓκουγιαÏάτι (Ινδία)", + "gv": "Μανξ", + "gv_IM": "Μανξ (Îήσος Μαν)", + "ha": "Χάουσα", + "ha_GH": "Χάουσα (Γκάνα)", + "ha_NE": "Χάουσα (ÎίγηÏας)", + "ha_NG": "Χάουσα (ÎιγηÏία)", + "he": "ΕβÏαϊκά", + "he_IL": "ΕβÏαϊκά (ΙσÏαήλ)", + "hi": "Χίντι", + "hi_IN": "Χίντι (Ινδία)", + "hr": "ΚÏοατικά", + "hr_BA": "ΚÏοατικά (Βοσνία - ΕÏζεγοβίνη)", + "hr_HR": "ΚÏοατικά (ΚÏοατία)", + "hu": "ΟυγγÏικά", + "hu_HU": "ΟυγγÏικά (ΟυγγαÏία)", + "hy": "ΑÏμενικά", + "hy_AM": "ΑÏμενικά (ΑÏμενία)", + "id": "Ινδονησιακά", + "id_ID": "Ινδονησιακά (Ινδονησία)", + "ig": "Ίγκμπο", + "ig_NG": "Ίγκμπο (ÎιγηÏία)", + "ii": "Σικουάν Γι", + "ii_CN": "Σικουάν Γι (Κίνα)", + "is": "Ισλανδικά", + "is_IS": "Ισλανδικά (Ισλανδία)", + "it": "Ιταλικά", + "it_CH": "Ιταλικά (Ελβετία)", + "it_IT": "Ιταλικά (Ιταλία)", + "it_SM": "Ιταλικά (Άγιος ΜαÏίνος)", + "ja": "Ιαπωνικά", + "ja_JP": "Ιαπωνικά (Ιαπωνία)", + "ka": "ΓεωÏγιανά", + "ka_GE": "ΓεωÏγιανά (ΓεωÏγία)", + "ki": "ΚικοÏγιου", + "ki_KE": "ΚικοÏγιου (Κένυα)", + "kk": "Καζακικά", + "kk_KZ": "Καζακικά (Καζακστάν)", + "kl": "Καλαάλισουτ", + "kl_GL": "Καλαάλισουτ (ΓÏοιλανδία)", + "km": "Καμποτζιανά", + "km_KH": "Καμποτζιανά (Καμπότζη)", + "kn": "Κανάντα", + "kn_IN": "Κανάντα (Ινδία)", + "ko": "ΚοÏεατικά", + "ko_KP": "ΚοÏεατικά (Î’ÏŒÏεια ΚοÏέα)", + "ko_KR": "ΚοÏεατικά (Îότια ΚοÏέα)", + "ks": "ΚασμίÏι", + "ks_IN": "ΚασμίÏι (Ινδία)", + "kw": "ΚόÏνις", + "kw_GB": "ΚόÏνις (Ηνωμένο Βασίλειο)", + "ky": "ΚυÏγιζικά", + "ky_KG": "ΚυÏγιζικά (ΚιÏγιστάν)", + "lb": "ΛουξεμβουÏγιανά", + "lb_LU": "ΛουξεμβουÏγιανά (ΛουξεμβοÏÏγο)", + "lg": "Γκάντα", + "lg_UG": "Γκάντα (Ουγκάντα)", + "ln": "Λινγκάλα", + "ln_AO": "Λινγκάλα (Ανγκόλα)", + "ln_CD": "Λινγκάλα (Κονγκό - Κινσάσα)", + "ln_CF": "Λινγκάλα (ΚεντÏοαφÏικανική ΔημοκÏατία)", + "ln_CG": "Λινγκάλα (Κονγκό - ΜπÏαζαβίλ)", + "lo": "Λαοθιανά", + "lo_LA": "Λαοθιανά (Λάος)", + "lt": "Λιθουανικά", + "lt_LT": "Λιθουανικά (Λιθουανία)", + "lu": "ΛοÏμπα-Κατάνγκα", + "lu_CD": "ΛοÏμπα-Κατάνγκα (Κονγκό - Κινσάσα)", + "lv": "Λετονικά", + "lv_LV": "Λετονικά (Λετονία)", + "mg": "Μαλαγάσι", + "mg_MG": "Μαλαγάσι (ΜαδαγασκάÏη)", + "mk": "Σλαβομακεδονικά", + "mk_MK": "Σλαβομακεδονικά (ΠÏώην Γιουγκοσλαβική ΔημοκÏατία της Μακεδονίας)", + "ml": "Μαλαγιαλάμ", + "ml_IN": "Μαλαγιαλάμ (Ινδία)", + "mn": "Μογγολικά", + "mn_MN": "Μογγολικά (Μογγολία)", + "mr": "ΜαÏάθι", + "mr_IN": "ΜαÏάθι (Ινδία)", + "ms": "Μαλάι", + "ms_BN": "Μαλάι (ΜπÏουνέι)", + "ms_MY": "Μαλάι (Μαλαισία)", + "ms_SG": "Μαλάι (ΣιγκαποÏÏη)", + "mt": "Μαλτεζικά", + "mt_MT": "Μαλτεζικά (Μάλτα)", + "my": "ΒιÏμανικά", + "my_MM": "ΒιÏμανικά (ΜιανμάÏ\/ΒιÏμανία)", + "nb": "ÎοÏβηγικά Μποκμάλ", + "nb_NO": "ÎοÏβηγικά Μποκμάλ (ÎοÏβηγία)", + "nb_SJ": "ÎοÏβηγικά Μποκμάλ (ΣβάλμπαÏντ και Γιαν Μαγιέν)", + "nd": "Î’ÏŒÏεια Îτεμπέλε", + "nd_ZW": "Î’ÏŒÏεια Îτεμπέλε (Ζιμπάμπουε)", + "ne": "Îεπάλι", + "ne_IN": "Îεπάλι (Ινδία)", + "ne_NP": "Îεπάλι (Îεπάλ)", + "nl": "Ολλανδικά", + "nl_AW": "Ολλανδικά (ΑÏοÏμπα)", + "nl_BE": "Ολλανδικά (Βέλγιο)", + "nl_BQ": "Ολλανδικά (Ολλανδία ΚαÏαϊβικής)", + "nl_CW": "Ολλανδικά (ΚουÏασάο)", + "nl_NL": "Ολλανδικά (Ολλανδία)", + "nl_SR": "Ολλανδικά (ΣουÏινάμ)", + "nl_SX": "Ολλανδικά (Άγιος ΜαÏτίνος (Ολλανδικό τμήμα))", + "nn": "ÎοÏβηγικά ÎινόÏσκ", + "nn_NO": "ÎοÏβηγικά ÎινόÏσκ (ÎοÏβηγία)", + "no": "ÎοÏβηγικά", + "no_NO": "ÎοÏβηγικά (ÎοÏβηγία)", + "om": "ΟÏόμο", + "om_ET": "ΟÏόμο (Αιθιοπία)", + "om_KE": "ΟÏόμο (Κένυα)", + "or": "ΟÏίγια", + "or_IN": "ΟÏίγια (Ινδία)", + "os": "Οσετικά", + "os_GE": "Οσετικά (ΓεωÏγία)", + "os_RU": "Οσετικά (Ρωσία)", + "pa": "Παντζαπικά", + "pa_Arab": "Παντζαπικά (ΑÏαβικό)", + "pa_Arab_PK": "Παντζαπικά (ΑÏαβικό, Πακιστάν)", + "pa_Guru": "Παντζαπικά (ΓκουÏμουκχί)", + "pa_Guru_IN": "Παντζαπικά (ΓκουÏμουκχί, Ινδία)", + "pa_IN": "Παντζαπικά (Ινδία)", + "pa_PK": "Παντζαπικά (Πακιστάν)", + "pl": "Πολωνικά", + "pl_PL": "Πολωνικά (Πολωνία)", + "ps": "Πάστο", + "ps_AF": "Πάστο (Αφγανιστάν)", + "pt": "ΠοÏτογαλικά", + "pt_AO": "ΠοÏτογαλικά (Ανγκόλα)", + "pt_BR": "ΠοÏτογαλικά (Î’Ïαζιλία)", + "pt_CH": "ΠοÏτογαλικά (Ελβετία)", + "pt_CV": "ΠοÏτογαλικά (ΠÏάσινο ΑκÏωτήÏιο)", + "pt_GQ": "ΠοÏτογαλικά (ΙσημεÏινή Γουινέα)", + "pt_GW": "ΠοÏτογαλικά (Γουινέα Μπισάου)", + "pt_LU": "ΠοÏτογαλικά (ΛουξεμβοÏÏγο)", + "pt_MO": "ΠοÏτογαλικά (Μακάο ΕΔΠ Κίνας)", + "pt_MZ": "ΠοÏτογαλικά (Μοζαμβίκη)", + "pt_PT": "ΠοÏτογαλικά (ΠοÏτογαλία)", + "pt_ST": "ΠοÏτογαλικά (Σάο Τομέ και ΠÏίνσιπε)", + "pt_TL": "ΠοÏτογαλικά (ΤιμόÏ-Λέστε)", + "qu": "ΚετσοÏα", + "qu_BO": "ΚετσοÏα (Βολιβία)", + "qu_EC": "ΚετσοÏα (ΕκουαδόÏ)", + "qu_PE": "ΚετσοÏα (ΠεÏοÏ)", + "rm": "Ρομανικά", + "rm_CH": "Ρομανικά (Ελβετία)", + "rn": "ΡοÏντι", + "rn_BI": "ΡοÏντι (ΜπουÏοÏντι)", + "ro": "Ρουμανικά", + "ro_MD": "Ρουμανικά (Μολδαβία)", + "ro_RO": "Ρουμανικά (Ρουμανία)", + "ru": "Ρωσικά", + "ru_BY": "Ρωσικά (ΛευκοÏωσία)", + "ru_KG": "Ρωσικά (ΚιÏγιστάν)", + "ru_KZ": "Ρωσικά (Καζακστάν)", + "ru_MD": "Ρωσικά (Μολδαβία)", + "ru_RU": "Ρωσικά (Ρωσία)", + "ru_UA": "Ρωσικά (ΟυκÏανία)", + "rw": "ΚινιαÏβάντα", + "rw_RW": "ΚινιαÏβάντα (Ρουάντα)", + "se": "Î’ÏŒÏεια Σάμι", + "se_FI": "Î’ÏŒÏεια Σάμι (Φινλανδία)", + "se_NO": "Î’ÏŒÏεια Σάμι (ÎοÏβηγία)", + "se_SE": "Î’ÏŒÏεια Σάμι (Σουηδία)", + "sg": "Σάνγκο", + "sg_CF": "Σάνγκο (ΚεντÏοαφÏικανική ΔημοκÏατία)", + "sh": "ΣεÏβοκÏοατικά", + "sh_BA": "ΣεÏβοκÏοατικά (Βοσνία - ΕÏζεγοβίνη)", + "si": "Σινχαλεζικά", + "si_LK": "Σινχαλεζικά (ΣÏι Λάνκα)", + "sk": "Σλοβακικά", + "sk_SK": "Σλοβακικά (Σλοβακία)", + "sl": "Σλοβενικά", + "sl_SI": "Σλοβενικά (Σλοβενία)", + "sn": "Σχόνα", + "sn_ZW": "Σχόνα (Ζιμπάμπουε)", + "so": "Σομάλι", + "so_DJ": "Σομάλι (Τζιμπουτί)", + "so_ET": "Σομάλι (Αιθιοπία)", + "so_KE": "Σομάλι (Κένυα)", + "so_SO": "Σομάλι (Σομαλία)", + "sq": "Αλβανικά", + "sq_AL": "Αλβανικά (Αλβανία)", + "sq_MK": "Αλβανικά (ΠÏώην Γιουγκοσλαβική ΔημοκÏατία της Μακεδονίας)", + "sq_XK": "Αλβανικά (Κόσοβο)", + "sr": "ΣεÏβικά", + "sr_BA": "ΣεÏβικά (Βοσνία - ΕÏζεγοβίνη)", + "sr_Cyrl": "ΣεÏβικά (ΚυÏιλλικό)", + "sr_Cyrl_BA": "ΣεÏβικά (ΚυÏιλλικό, Βοσνία - ΕÏζεγοβίνη)", + "sr_Cyrl_ME": "ΣεÏβικά (ΚυÏιλλικό, ΜαυÏοβοÏνιο)", + "sr_Cyrl_RS": "ΣεÏβικά (ΚυÏιλλικό, ΣεÏβία)", + "sr_Cyrl_XK": "ΣεÏβικά (ΚυÏιλλικό, Κόσοβο)", + "sr_Latn": "ΣεÏβικά (Λατινικό)", + "sr_Latn_BA": "ΣεÏβικά (Λατινικό, Βοσνία - ΕÏζεγοβίνη)", + "sr_Latn_ME": "ΣεÏβικά (Λατινικό, ΜαυÏοβοÏνιο)", + "sr_Latn_RS": "ΣεÏβικά (Λατινικό, ΣεÏβία)", + "sr_Latn_XK": "ΣεÏβικά (Λατινικό, Κόσοβο)", + "sr_ME": "ΣεÏβικά (ΜαυÏοβοÏνιο)", + "sr_RS": "ΣεÏβικά (ΣεÏβία)", + "sr_XK": "ΣεÏβικά (Κόσοβο)", + "sv": "Σουηδικά", + "sv_AX": "Σουηδικά (Îήσοι Όλαντ)", + "sv_FI": "Σουηδικά (Φινλανδία)", + "sv_SE": "Σουηδικά (Σουηδία)", + "sw": "Σουαχίλι", + "sw_CD": "Σουαχίλι (Κονγκό - Κινσάσα)", + "sw_KE": "Σουαχίλι (Κένυα)", + "sw_TZ": "Σουαχίλι (Τανζανία)", + "sw_UG": "Σουαχίλι (Ουγκάντα)", + "ta": "Ταμίλ", + "ta_IN": "Ταμίλ (Ινδία)", + "ta_LK": "Ταμίλ (ΣÏι Λάνκα)", + "ta_MY": "Ταμίλ (Μαλαισία)", + "ta_SG": "Ταμίλ (ΣιγκαποÏÏη)", + "te": "ΤελοÏγκου", + "te_IN": "ΤελοÏγκου (Ινδία)", + "th": "Ταϊλανδικά", + "th_TH": "Ταϊλανδικά (Ταϊλάνδη)", + "ti": "ΤιγκÏινικά", + "ti_ER": "ΤιγκÏινικά (ΕÏυθÏαία)", + "ti_ET": "ΤιγκÏινικά (Αιθιοπία)", + "tl": "Τάγκαλογκ", + "tl_PH": "Τάγκαλογκ (Φιλιππίνες)", + "to": "Τονγκανικά", + "to_TO": "Τονγκανικά (Τόνγκα)", + "tr": "ΤουÏκικά", + "tr_CY": "ΤουÏκικά (ΚÏÏ€Ïος)", + "tr_TR": "ΤουÏκικά (ΤουÏκία)", + "ug": "ΟυιγουÏικά", + "ug_CN": "ΟυιγουÏικά (Κίνα)", + "uk": "ΟυκÏανικά", + "uk_UA": "ΟυκÏανικά (ΟυκÏανία)", + "ur": "ΟυÏντοÏ", + "ur_IN": "ΟυÏÎ½Ï„Î¿Ï (Ινδία)", + "ur_PK": "ΟυÏÎ½Ï„Î¿Ï (Πακιστάν)", + "uz": "Ουζμπεκικά", + "uz_AF": "Ουζμπεκικά (Αφγανιστάν)", + "uz_Arab": "Ουζμπεκικά (ΑÏαβικό)", + "uz_Arab_AF": "Ουζμπεκικά (ΑÏαβικό, Αφγανιστάν)", + "uz_Cyrl": "Ουζμπεκικά (ΚυÏιλλικό)", + "uz_Cyrl_UZ": "Ουζμπεκικά (ΚυÏιλλικό, Ουζμπεκιστάν)", + "uz_Latn": "Ουζμπεκικά (Λατινικό)", + "uz_Latn_UZ": "Ουζμπεκικά (Λατινικό, Ουζμπεκιστάν)", + "uz_UZ": "Ουζμπεκικά (Ουζμπεκιστάν)", + "vi": "Βιετναμικά", + "vi_VN": "Βιετναμικά (Βιετνάμ)", + "yi": "Γίντις", + "yo": "ΓιοÏοÏμπα", + "yo_BJ": "ΓιοÏοÏμπα (Μπενίν)", + "yo_NG": "ΓιοÏοÏμπα (ÎιγηÏία)", + "zh": "Κινεζικά", + "zh_CN": "Κινεζικά (Κίνα)", + "zh_HK": "Κινεζικά (Χονγκ Κονγκ ΕΔΠ Κίνας)", + "zh_Hans": "Κινεζικά (Απλοποιημένο)", + "zh_Hans_CN": "Κινεζικά (Απλοποιημένο, Κίνα)", + "zh_Hans_HK": "Κινεζικά (Απλοποιημένο, Χονγκ Κονγκ ΕΔΠ Κίνας)", + "zh_Hans_MO": "Κινεζικά (Απλοποιημένο, Μακάο ΕΔΠ Κίνας)", + "zh_Hans_SG": "Κινεζικά (Απλοποιημένο, ΣιγκαποÏÏη)", + "zh_Hant": "Κινεζικά (ΠαÏαδοσιακό)", + "zh_Hant_HK": "Κινεζικά (ΠαÏαδοσιακό, Χονγκ Κονγκ ΕΔΠ Κίνας)", + "zh_Hant_MO": "Κινεζικά (ΠαÏαδοσιακό, Μακάο ΕΔΠ Κίνας)", + "zh_Hant_TW": "Κινεζικά (ΠαÏαδοσιακό, Ταϊβάν)", + "zh_MO": "Κινεζικά (Μακάο ΕΔΠ Κίνας)", + "zh_SG": "Κινεζικά (ΣιγκαποÏÏη)", + "zh_TW": "Κινεζικά (Ταϊβάν)", + "zu": "ΖουλοÏ", + "zu_ZA": "Î–Î¿Ï…Î»Î¿Ï (Îότια ΑφÏική)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/en.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/en.json new file mode 100644 index 0000000000000000000000000000000000000000..61e91a432108c0212ed5c361918798ee4ce0fd84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/en.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Afrikaans", + "af_NA": "Afrikaans (Namibia)", + "af_ZA": "Afrikaans (South Africa)", + "ak": "Akan", + "ak_GH": "Akan (Ghana)", + "am": "Amharic", + "am_ET": "Amharic (Ethiopia)", + "ar": "Arabic", + "ar_AE": "Arabic (United Arab Emirates)", + "ar_BH": "Arabic (Bahrain)", + "ar_DJ": "Arabic (Djibouti)", + "ar_DZ": "Arabic (Algeria)", + "ar_EG": "Arabic (Egypt)", + "ar_EH": "Arabic (Western Sahara)", + "ar_ER": "Arabic (Eritrea)", + "ar_IL": "Arabic (Israel)", + "ar_IQ": "Arabic (Iraq)", + "ar_JO": "Arabic (Jordan)", + "ar_KM": "Arabic (Comoros)", + "ar_KW": "Arabic (Kuwait)", + "ar_LB": "Arabic (Lebanon)", + "ar_LY": "Arabic (Libya)", + "ar_MA": "Arabic (Morocco)", + "ar_MR": "Arabic (Mauritania)", + "ar_OM": "Arabic (Oman)", + "ar_PS": "Arabic (Palestinian Territories)", + "ar_QA": "Arabic (Qatar)", + "ar_SA": "Arabic (Saudi Arabia)", + "ar_SD": "Arabic (Sudan)", + "ar_SO": "Arabic (Somalia)", + "ar_SS": "Arabic (South Sudan)", + "ar_SY": "Arabic (Syria)", + "ar_TD": "Arabic (Chad)", + "ar_TN": "Arabic (Tunisia)", + "ar_YE": "Arabic (Yemen)", + "as": "Assamese", + "as_IN": "Assamese (India)", + "az": "Azerbaijani", + "az_AZ": "Azerbaijani (Azerbaijan)", + "az_Cyrl": "Azerbaijani (Cyrillic)", + "az_Cyrl_AZ": "Azerbaijani (Cyrillic, Azerbaijan)", + "az_Latn": "Azerbaijani (Latin)", + "az_Latn_AZ": "Azerbaijani (Latin, Azerbaijan)", + "be": "Belarusian", + "be_BY": "Belarusian (Belarus)", + "bg": "Bulgarian", + "bg_BG": "Bulgarian (Bulgaria)", + "bm": "Bambara", + "bm_ML": "Bambara (Mali)", + "bn": "Bangla", + "bn_BD": "Bangla (Bangladesh)", + "bn_IN": "Bangla (India)", + "bo": "Tibetan", + "bo_CN": "Tibetan (China)", + "bo_IN": "Tibetan (India)", + "br": "Breton", + "br_FR": "Breton (France)", + "bs": "Bosnian", + "bs_BA": "Bosnian (Bosnia & Herzegovina)", + "bs_Cyrl": "Bosnian (Cyrillic)", + "bs_Cyrl_BA": "Bosnian (Cyrillic, Bosnia & Herzegovina)", + "bs_Latn": "Bosnian (Latin)", + "bs_Latn_BA": "Bosnian (Latin, Bosnia & Herzegovina)", + "ca": "Catalan", + "ca_AD": "Catalan (Andorra)", + "ca_ES": "Catalan (Spain)", + "ca_FR": "Catalan (France)", + "ca_IT": "Catalan (Italy)", + "ce": "Chechen", + "ce_RU": "Chechen (Russia)", + "cs": "Czech", + "cs_CZ": "Czech (Czech Republic)", + "cy": "Welsh", + "cy_GB": "Welsh (United Kingdom)", + "da": "Danish", + "da_DK": "Danish (Denmark)", + "da_GL": "Danish (Greenland)", + "de": "German", + "de_AT": "German (Austria)", + "de_BE": "German (Belgium)", + "de_CH": "German (Switzerland)", + "de_DE": "German (Germany)", + "de_IT": "German (Italy)", + "de_LI": "German (Liechtenstein)", + "de_LU": "German (Luxembourg)", + "dz": "Dzongkha", + "dz_BT": "Dzongkha (Bhutan)", + "ee": "Ewe", + "ee_GH": "Ewe (Ghana)", + "ee_TG": "Ewe (Togo)", + "el": "Greek", + "el_CY": "Greek (Cyprus)", + "el_GR": "Greek (Greece)", + "en": "English", + "en_AG": "English (Antigua & Barbuda)", + "en_AI": "English (Anguilla)", + "en_AS": "English (American Samoa)", + "en_AT": "English (Austria)", + "en_AU": "English (Australia)", + "en_BB": "English (Barbados)", + "en_BE": "English (Belgium)", + "en_BI": "English (Burundi)", + "en_BM": "English (Bermuda)", + "en_BS": "English (Bahamas)", + "en_BW": "English (Botswana)", + "en_BZ": "English (Belize)", + "en_CA": "English (Canada)", + "en_CC": "English (Cocos (Keeling) Islands)", + "en_CH": "English (Switzerland)", + "en_CK": "English (Cook Islands)", + "en_CM": "English (Cameroon)", + "en_CX": "English (Christmas Island)", + "en_CY": "English (Cyprus)", + "en_DE": "English (Germany)", + "en_DG": "English (Diego Garcia)", + "en_DK": "English (Denmark)", + "en_DM": "English (Dominica)", + "en_ER": "English (Eritrea)", + "en_FI": "English (Finland)", + "en_FJ": "English (Fiji)", + "en_FK": "English (Falkland Islands)", + "en_FM": "English (Micronesia)", + "en_GB": "English (United Kingdom)", + "en_GD": "English (Grenada)", + "en_GG": "English (Guernsey)", + "en_GH": "English (Ghana)", + "en_GI": "English (Gibraltar)", + "en_GM": "English (Gambia)", + "en_GU": "English (Guam)", + "en_GY": "English (Guyana)", + "en_HK": "English (Hong Kong SAR China)", + "en_IE": "English (Ireland)", + "en_IL": "English (Israel)", + "en_IM": "English (Isle of Man)", + "en_IN": "English (India)", + "en_IO": "English (British Indian Ocean Territory)", + "en_JE": "English (Jersey)", + "en_JM": "English (Jamaica)", + "en_KE": "English (Kenya)", + "en_KI": "English (Kiribati)", + "en_KN": "English (St. Kitts & Nevis)", + "en_KY": "English (Cayman Islands)", + "en_LC": "English (St. Lucia)", + "en_LR": "English (Liberia)", + "en_LS": "English (Lesotho)", + "en_MG": "English (Madagascar)", + "en_MH": "English (Marshall Islands)", + "en_MO": "English (Macau SAR China)", + "en_MP": "English (Northern Mariana Islands)", + "en_MS": "English (Montserrat)", + "en_MT": "English (Malta)", + "en_MU": "English (Mauritius)", + "en_MW": "English (Malawi)", + "en_MY": "English (Malaysia)", + "en_NA": "English (Namibia)", + "en_NF": "English (Norfolk Island)", + "en_NG": "English (Nigeria)", + "en_NL": "English (Netherlands)", + "en_NR": "English (Nauru)", + "en_NU": "English (Niue)", + "en_NZ": "English (New Zealand)", + "en_PG": "English (Papua New Guinea)", + "en_PH": "English (Philippines)", + "en_PK": "English (Pakistan)", + "en_PN": "English (Pitcairn Islands)", + "en_PR": "English (Puerto Rico)", + "en_PW": "English (Palau)", + "en_RW": "English (Rwanda)", + "en_SB": "English (Solomon Islands)", + "en_SC": "English (Seychelles)", + "en_SD": "English (Sudan)", + "en_SE": "English (Sweden)", + "en_SG": "English (Singapore)", + "en_SH": "English (St. Helena)", + "en_SI": "English (Slovenia)", + "en_SL": "English (Sierra Leone)", + "en_SS": "English (South Sudan)", + "en_SX": "English (Sint Maarten)", + "en_SZ": "English (Swaziland)", + "en_TC": "English (Turks & Caicos Islands)", + "en_TK": "English (Tokelau)", + "en_TO": "English (Tonga)", + "en_TT": "English (Trinidad & Tobago)", + "en_TV": "English (Tuvalu)", + "en_TZ": "English (Tanzania)", + "en_UG": "English (Uganda)", + "en_UM": "English (U.S. Outlying Islands)", + "en_US": "English (United States)", + "en_VC": "English (St. Vincent & Grenadines)", + "en_VG": "English (British Virgin Islands)", + "en_VI": "English (U.S. Virgin Islands)", + "en_VU": "English (Vanuatu)", + "en_WS": "English (Samoa)", + "en_ZA": "English (South Africa)", + "en_ZM": "English (Zambia)", + "en_ZW": "English (Zimbabwe)", + "eo": "Esperanto", + "es": "Spanish", + "es_AR": "Spanish (Argentina)", + "es_BO": "Spanish (Bolivia)", + "es_BR": "Spanish (Brazil)", + "es_CL": "Spanish (Chile)", + "es_CO": "Spanish (Colombia)", + "es_CR": "Spanish (Costa Rica)", + "es_CU": "Spanish (Cuba)", + "es_DO": "Spanish (Dominican Republic)", + "es_EA": "Spanish (Ceuta & Melilla)", + "es_EC": "Spanish (Ecuador)", + "es_ES": "Spanish (Spain)", + "es_GQ": "Spanish (Equatorial Guinea)", + "es_GT": "Spanish (Guatemala)", + "es_HN": "Spanish (Honduras)", + "es_IC": "Spanish (Canary Islands)", + "es_MX": "Spanish (Mexico)", + "es_NI": "Spanish (Nicaragua)", + "es_PA": "Spanish (Panama)", + "es_PE": "Spanish (Peru)", + "es_PH": "Spanish (Philippines)", + "es_PR": "Spanish (Puerto Rico)", + "es_PY": "Spanish (Paraguay)", + "es_SV": "Spanish (El Salvador)", + "es_US": "Spanish (United States)", + "es_UY": "Spanish (Uruguay)", + "es_VE": "Spanish (Venezuela)", + "et": "Estonian", + "et_EE": "Estonian (Estonia)", + "eu": "Basque", + "eu_ES": "Basque (Spain)", + "fa": "Persian", + "fa_AF": "Persian (Afghanistan)", + "fa_IR": "Persian (Iran)", + "ff": "Fulah", + "ff_CM": "Fulah (Cameroon)", + "ff_GN": "Fulah (Guinea)", + "ff_MR": "Fulah (Mauritania)", + "ff_SN": "Fulah (Senegal)", + "fi": "Finnish", + "fi_FI": "Finnish (Finland)", + "fo": "Faroese", + "fo_DK": "Faroese (Denmark)", + "fo_FO": "Faroese (Faroe Islands)", + "fr": "French", + "fr_BE": "French (Belgium)", + "fr_BF": "French (Burkina Faso)", + "fr_BI": "French (Burundi)", + "fr_BJ": "French (Benin)", + "fr_BL": "French (St. Barthélemy)", + "fr_CA": "French (Canada)", + "fr_CD": "French (Congo - Kinshasa)", + "fr_CF": "French (Central African Republic)", + "fr_CG": "French (Congo - Brazzaville)", + "fr_CH": "French (Switzerland)", + "fr_CI": "French (Côte d’Ivoire)", + "fr_CM": "French (Cameroon)", + "fr_DJ": "French (Djibouti)", + "fr_DZ": "French (Algeria)", + "fr_FR": "French (France)", + "fr_GA": "French (Gabon)", + "fr_GF": "French (French Guiana)", + "fr_GN": "French (Guinea)", + "fr_GP": "French (Guadeloupe)", + "fr_GQ": "French (Equatorial Guinea)", + "fr_HT": "French (Haiti)", + "fr_KM": "French (Comoros)", + "fr_LU": "French (Luxembourg)", + "fr_MA": "French (Morocco)", + "fr_MC": "French (Monaco)", + "fr_MF": "French (St. Martin)", + "fr_MG": "French (Madagascar)", + "fr_ML": "French (Mali)", + "fr_MQ": "French (Martinique)", + "fr_MR": "French (Mauritania)", + "fr_MU": "French (Mauritius)", + "fr_NC": "French (New Caledonia)", + "fr_NE": "French (Niger)", + "fr_PF": "French (French Polynesia)", + "fr_PM": "French (St. Pierre & Miquelon)", + "fr_RE": "French (Réunion)", + "fr_RW": "French (Rwanda)", + "fr_SC": "French (Seychelles)", + "fr_SN": "French (Senegal)", + "fr_SY": "French (Syria)", + "fr_TD": "French (Chad)", + "fr_TG": "French (Togo)", + "fr_TN": "French (Tunisia)", + "fr_VU": "French (Vanuatu)", + "fr_WF": "French (Wallis & Futuna)", + "fr_YT": "French (Mayotte)", + "fy": "Western Frisian", + "fy_NL": "Western Frisian (Netherlands)", + "ga": "Irish", + "ga_IE": "Irish (Ireland)", + "gd": "Scottish Gaelic", + "gd_GB": "Scottish Gaelic (United Kingdom)", + "gl": "Galician", + "gl_ES": "Galician (Spain)", + "gu": "Gujarati", + "gu_IN": "Gujarati (India)", + "gv": "Manx", + "gv_IM": "Manx (Isle of Man)", + "ha": "Hausa", + "ha_GH": "Hausa (Ghana)", + "ha_NE": "Hausa (Niger)", + "ha_NG": "Hausa (Nigeria)", + "he": "Hebrew", + "he_IL": "Hebrew (Israel)", + "hi": "Hindi", + "hi_IN": "Hindi (India)", + "hr": "Croatian", + "hr_BA": "Croatian (Bosnia & Herzegovina)", + "hr_HR": "Croatian (Croatia)", + "hu": "Hungarian", + "hu_HU": "Hungarian (Hungary)", + "hy": "Armenian", + "hy_AM": "Armenian (Armenia)", + "id": "Indonesian", + "id_ID": "Indonesian (Indonesia)", + "ig": "Igbo", + "ig_NG": "Igbo (Nigeria)", + "ii": "Sichuan Yi", + "ii_CN": "Sichuan Yi (China)", + "is": "Icelandic", + "is_IS": "Icelandic (Iceland)", + "it": "Italian", + "it_CH": "Italian (Switzerland)", + "it_IT": "Italian (Italy)", + "it_SM": "Italian (San Marino)", + "ja": "Japanese", + "ja_JP": "Japanese (Japan)", + "ka": "Georgian", + "ka_GE": "Georgian (Georgia)", + "ki": "Kikuyu", + "ki_KE": "Kikuyu (Kenya)", + "kk": "Kazakh", + "kk_KZ": "Kazakh (Kazakhstan)", + "kl": "Kalaallisut", + "kl_GL": "Kalaallisut (Greenland)", + "km": "Khmer", + "km_KH": "Khmer (Cambodia)", + "kn": "Kannada", + "kn_IN": "Kannada (India)", + "ko": "Korean", + "ko_KP": "Korean (North Korea)", + "ko_KR": "Korean (South Korea)", + "ks": "Kashmiri", + "ks_IN": "Kashmiri (India)", + "kw": "Cornish", + "kw_GB": "Cornish (United Kingdom)", + "ky": "Kyrgyz", + "ky_KG": "Kyrgyz (Kyrgyzstan)", + "lb": "Luxembourgish", + "lb_LU": "Luxembourgish (Luxembourg)", + "lg": "Ganda", + "lg_UG": "Ganda (Uganda)", + "ln": "Lingala", + "ln_AO": "Lingala (Angola)", + "ln_CD": "Lingala (Congo - Kinshasa)", + "ln_CF": "Lingala (Central African Republic)", + "ln_CG": "Lingala (Congo - Brazzaville)", + "lo": "Lao", + "lo_LA": "Lao (Laos)", + "lt": "Lithuanian", + "lt_LT": "Lithuanian (Lithuania)", + "lu": "Luba-Katanga", + "lu_CD": "Luba-Katanga (Congo - Kinshasa)", + "lv": "Latvian", + "lv_LV": "Latvian (Latvia)", + "mg": "Malagasy", + "mg_MG": "Malagasy (Madagascar)", + "mk": "Macedonian", + "mk_MK": "Macedonian (Macedonia)", + "ml": "Malayalam", + "ml_IN": "Malayalam (India)", + "mn": "Mongolian", + "mn_MN": "Mongolian (Mongolia)", + "mr": "Marathi", + "mr_IN": "Marathi (India)", + "ms": "Malay", + "ms_BN": "Malay (Brunei)", + "ms_MY": "Malay (Malaysia)", + "ms_SG": "Malay (Singapore)", + "mt": "Maltese", + "mt_MT": "Maltese (Malta)", + "my": "Burmese", + "my_MM": "Burmese (Myanmar (Burma))", + "nb": "Norwegian BokmÃ¥l", + "nb_NO": "Norwegian BokmÃ¥l (Norway)", + "nb_SJ": "Norwegian BokmÃ¥l (Svalbard & Jan Mayen)", + "nd": "North Ndebele", + "nd_ZW": "North Ndebele (Zimbabwe)", + "ne": "Nepali", + "ne_IN": "Nepali (India)", + "ne_NP": "Nepali (Nepal)", + "nl": "Dutch", + "nl_AW": "Dutch (Aruba)", + "nl_BE": "Dutch (Belgium)", + "nl_BQ": "Dutch (Caribbean Netherlands)", + "nl_CW": "Dutch (Curaçao)", + "nl_NL": "Dutch (Netherlands)", + "nl_SR": "Dutch (Suriname)", + "nl_SX": "Dutch (Sint Maarten)", + "nn": "Norwegian Nynorsk", + "nn_NO": "Norwegian Nynorsk (Norway)", + "no": "Norwegian", + "no_NO": "Norwegian (Norway)", + "om": "Oromo", + "om_ET": "Oromo (Ethiopia)", + "om_KE": "Oromo (Kenya)", + "or": "Odia", + "or_IN": "Odia (India)", + "os": "Ossetic", + "os_GE": "Ossetic (Georgia)", + "os_RU": "Ossetic (Russia)", + "pa": "Punjabi", + "pa_Arab": "Punjabi (Arabic)", + "pa_Arab_PK": "Punjabi (Arabic, Pakistan)", + "pa_Guru": "Punjabi (Gurmukhi)", + "pa_Guru_IN": "Punjabi (Gurmukhi, India)", + "pa_IN": "Punjabi (India)", + "pa_PK": "Punjabi (Pakistan)", + "pl": "Polish", + "pl_PL": "Polish (Poland)", + "ps": "Pashto", + "ps_AF": "Pashto (Afghanistan)", + "pt": "Portuguese", + "pt_AO": "Portuguese (Angola)", + "pt_BR": "Portuguese (Brazil)", + "pt_CH": "Portuguese (Switzerland)", + "pt_CV": "Portuguese (Cape Verde)", + "pt_GQ": "Portuguese (Equatorial Guinea)", + "pt_GW": "Portuguese (Guinea-Bissau)", + "pt_LU": "Portuguese (Luxembourg)", + "pt_MO": "Portuguese (Macau SAR China)", + "pt_MZ": "Portuguese (Mozambique)", + "pt_PT": "Portuguese (Portugal)", + "pt_ST": "Portuguese (São Tomé & Príncipe)", + "pt_TL": "Portuguese (Timor-Leste)", + "qu": "Quechua", + "qu_BO": "Quechua (Bolivia)", + "qu_EC": "Quechua (Ecuador)", + "qu_PE": "Quechua (Peru)", + "rm": "Romansh", + "rm_CH": "Romansh (Switzerland)", + "rn": "Rundi", + "rn_BI": "Rundi (Burundi)", + "ro": "Romanian", + "ro_MD": "Romanian (Moldova)", + "ro_RO": "Romanian (Romania)", + "ru": "Russian", + "ru_BY": "Russian (Belarus)", + "ru_KG": "Russian (Kyrgyzstan)", + "ru_KZ": "Russian (Kazakhstan)", + "ru_MD": "Russian (Moldova)", + "ru_RU": "Russian (Russia)", + "ru_UA": "Russian (Ukraine)", + "rw": "Kinyarwanda", + "rw_RW": "Kinyarwanda (Rwanda)", + "se": "Northern Sami", + "se_FI": "Northern Sami (Finland)", + "se_NO": "Northern Sami (Norway)", + "se_SE": "Northern Sami (Sweden)", + "sg": "Sango", + "sg_CF": "Sango (Central African Republic)", + "sh": "Serbo-Croatian", + "sh_BA": "Serbo-Croatian (Bosnia & Herzegovina)", + "si": "Sinhala", + "si_LK": "Sinhala (Sri Lanka)", + "sk": "Slovak", + "sk_SK": "Slovak (Slovakia)", + "sl": "Slovenian", + "sl_SI": "Slovenian (Slovenia)", + "sn": "Shona", + "sn_ZW": "Shona (Zimbabwe)", + "so": "Somali", + "so_DJ": "Somali (Djibouti)", + "so_ET": "Somali (Ethiopia)", + "so_KE": "Somali (Kenya)", + "so_SO": "Somali (Somalia)", + "sq": "Albanian", + "sq_AL": "Albanian (Albania)", + "sq_MK": "Albanian (Macedonia)", + "sq_XK": "Albanian (Kosovo)", + "sr": "Serbian", + "sr_BA": "Serbian (Bosnia & Herzegovina)", + "sr_Cyrl": "Serbian (Cyrillic)", + "sr_Cyrl_BA": "Serbian (Cyrillic, Bosnia & Herzegovina)", + "sr_Cyrl_ME": "Serbian (Cyrillic, Montenegro)", + "sr_Cyrl_RS": "Serbian (Cyrillic, Serbia)", + "sr_Cyrl_XK": "Serbian (Cyrillic, Kosovo)", + "sr_Latn": "Serbian (Latin)", + "sr_Latn_BA": "Serbian (Latin, Bosnia & Herzegovina)", + "sr_Latn_ME": "Serbian (Latin, Montenegro)", + "sr_Latn_RS": "Serbian (Latin, Serbia)", + "sr_Latn_XK": "Serbian (Latin, Kosovo)", + "sr_ME": "Serbian (Montenegro)", + "sr_RS": "Serbian (Serbia)", + "sr_XK": "Serbian (Kosovo)", + "sv": "Swedish", + "sv_AX": "Swedish (Ã…land Islands)", + "sv_FI": "Swedish (Finland)", + "sv_SE": "Swedish (Sweden)", + "sw": "Swahili", + "sw_CD": "Swahili (Congo - Kinshasa)", + "sw_KE": "Swahili (Kenya)", + "sw_TZ": "Swahili (Tanzania)", + "sw_UG": "Swahili (Uganda)", + "ta": "Tamil", + "ta_IN": "Tamil (India)", + "ta_LK": "Tamil (Sri Lanka)", + "ta_MY": "Tamil (Malaysia)", + "ta_SG": "Tamil (Singapore)", + "te": "Telugu", + "te_IN": "Telugu (India)", + "th": "Thai", + "th_TH": "Thai (Thailand)", + "ti": "Tigrinya", + "ti_ER": "Tigrinya (Eritrea)", + "ti_ET": "Tigrinya (Ethiopia)", + "tl": "Tagalog", + "tl_PH": "Tagalog (Philippines)", + "to": "Tongan", + "to_TO": "Tongan (Tonga)", + "tr": "Turkish", + "tr_CY": "Turkish (Cyprus)", + "tr_TR": "Turkish (Turkey)", + "ug": "Uyghur", + "ug_CN": "Uyghur (China)", + "uk": "Ukrainian", + "uk_UA": "Ukrainian (Ukraine)", + "ur": "Urdu", + "ur_IN": "Urdu (India)", + "ur_PK": "Urdu (Pakistan)", + "uz": "Uzbek", + "uz_AF": "Uzbek (Afghanistan)", + "uz_Arab": "Uzbek (Arabic)", + "uz_Arab_AF": "Uzbek (Arabic, Afghanistan)", + "uz_Cyrl": "Uzbek (Cyrillic)", + "uz_Cyrl_UZ": "Uzbek (Cyrillic, Uzbekistan)", + "uz_Latn": "Uzbek (Latin)", + "uz_Latn_UZ": "Uzbek (Latin, Uzbekistan)", + "uz_UZ": "Uzbek (Uzbekistan)", + "vi": "Vietnamese", + "vi_VN": "Vietnamese (Vietnam)", + "yi": "Yiddish", + "yo": "Yoruba", + "yo_BJ": "Yoruba (Benin)", + "yo_NG": "Yoruba (Nigeria)", + "zh": "Chinese", + "zh_CN": "Chinese (China)", + "zh_HK": "Chinese (Hong Kong SAR China)", + "zh_Hans": "Chinese (Simplified)", + "zh_Hans_CN": "Chinese (Simplified, China)", + "zh_Hans_HK": "Chinese (Simplified, Hong Kong SAR China)", + "zh_Hans_MO": "Chinese (Simplified, Macau SAR China)", + "zh_Hans_SG": "Chinese (Simplified, Singapore)", + "zh_Hant": "Chinese (Traditional)", + "zh_Hant_HK": "Chinese (Traditional, Hong Kong SAR China)", + "zh_Hant_MO": "Chinese (Traditional, Macau SAR China)", + "zh_Hant_TW": "Chinese (Traditional, Taiwan)", + "zh_MO": "Chinese (Macau SAR China)", + "zh_SG": "Chinese (Singapore)", + "zh_TW": "Chinese (Taiwan)", + "zu": "Zulu", + "zu_ZA": "Zulu (South Africa)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/en_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/en_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..c4f30ca257a401d4850a610cef6717bc26cb5f98 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/en_IN.json @@ -0,0 +1,9 @@ +{ + "Names": { + "bn": "Bengali", + "bn_BD": "Bengali (Bangladesh)", + "bn_IN": "Bengali (India)", + "or": "Oriya", + "or_IN": "Oriya (India)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/en_NH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/en_NH.json new file mode 100644 index 0000000000000000000000000000000000000000..c5f5cd4e7a1c1ffaa481644acba16e7561628c14 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/en_NH.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "en_VU" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/en_RH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/en_RH.json new file mode 100644 index 0000000000000000000000000000000000000000..b9952c41f1bb90d7d2b01de27015cb3a9857e448 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/en_RH.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "en_ZW" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/eo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/eo.json new file mode 100644 index 0000000000000000000000000000000000000000..5b5e1acc481a05d87982fb8666702e1b275b018a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/eo.json @@ -0,0 +1,458 @@ +{ + "Names": { + "af": "afrikansa", + "af_NA": "afrikansa (Namibio)", + "af_ZA": "afrikansa (Sud-Afriko)", + "am": "amhara", + "am_ET": "amhara (Etiopujo)", + "ar": "araba", + "ar_AE": "araba (UnuiÄintaj Arabaj Emirlandoj)", + "ar_BH": "araba (Barejno)", + "ar_DJ": "araba (Äœibutio)", + "ar_DZ": "araba (AlÄerio)", + "ar_EG": "araba (Egipto)", + "ar_EH": "araba (Okcidenta Saharo)", + "ar_ER": "araba (Eritreo)", + "ar_IL": "araba (Israelo)", + "ar_IQ": "araba (Irako)", + "ar_JO": "araba (Jordanio)", + "ar_KM": "araba (Komoroj)", + "ar_KW": "araba (Kuvajto)", + "ar_LB": "araba (Libano)", + "ar_LY": "araba (Libio)", + "ar_MA": "araba (Maroko)", + "ar_MR": "araba (MaÅ­ritanujo)", + "ar_OM": "araba (Omano)", + "ar_QA": "araba (Kataro)", + "ar_SA": "araba (SaÅ­da Arabujo)", + "ar_SD": "araba (Sudano)", + "ar_SO": "araba (Somalujo)", + "ar_SY": "araba (Sirio)", + "ar_TD": "araba (Ĉado)", + "ar_TN": "araba (Tunizio)", + "ar_YE": "araba (Jemeno)", + "as": "asama", + "as_IN": "asama (Hindujo)", + "az": "azerbajÄana", + "az_AZ": "azerbajÄana (AzerbajÄano)", + "be": "belorusa", + "be_BY": "belorusa (Belorusujo)", + "bg": "bulgara", + "bg_BG": "bulgara (Bulgarujo)", + "bn": "bengala", + "bn_BD": "bengala (BangladeÅo)", + "bn_IN": "bengala (Hindujo)", + "bo": "tibeta", + "bo_CN": "tibeta (Ĉinujo)", + "bo_IN": "tibeta (Hindujo)", + "br": "bretona", + "br_FR": "bretona (Francujo)", + "bs": "bosnia", + "bs_BA": "bosnia (Bosnio-Hercegovino)", + "ca": "kataluna", + "ca_AD": "kataluna (Andoro)", + "ca_ES": "kataluna (Hispanujo)", + "ca_FR": "kataluna (Francujo)", + "ca_IT": "kataluna (Italujo)", + "cs": "ĉeÄ¥a", + "cs_CZ": "ĉeÄ¥a (ĈeÄ¥ujo)", + "cy": "kimra", + "cy_GB": "kimra (UnuiÄinta ReÄlando)", + "da": "dana", + "da_DK": "dana (Danujo)", + "da_GL": "dana (Gronlando)", + "de": "germana", + "de_AT": "germana (AÅ­strujo)", + "de_BE": "germana (Belgujo)", + "de_CH": "germana (Svisujo)", + "de_DE": "germana (Germanujo)", + "de_IT": "germana (Italujo)", + "de_LI": "germana (LiÄ¥tenÅtejno)", + "de_LU": "germana (Luksemburgo)", + "dz": "dzonko", + "dz_BT": "dzonko (Butano)", + "el": "greka", + "el_CY": "greka (Kipro)", + "el_GR": "greka (Grekujo)", + "en": "angla", + "en_AG": "angla (Antigvo-Barbudo)", + "en_AI": "angla (Angvilo)", + "en_AT": "angla (AÅ­strujo)", + "en_AU": "angla (AÅ­stralio)", + "en_BB": "angla (Barbado)", + "en_BE": "angla (Belgujo)", + "en_BI": "angla (Burundo)", + "en_BM": "angla (Bermudoj)", + "en_BS": "angla (Bahamoj)", + "en_BW": "angla (Bocvano)", + "en_BZ": "angla (Belizo)", + "en_CA": "angla (Kanado)", + "en_CH": "angla (Svisujo)", + "en_CK": "angla (Kukinsuloj)", + "en_CM": "angla (Kameruno)", + "en_CY": "angla (Kipro)", + "en_DE": "angla (Germanujo)", + "en_DK": "angla (Danujo)", + "en_DM": "angla (Dominiko)", + "en_ER": "angla (Eritreo)", + "en_FI": "angla (Finnlando)", + "en_FJ": "angla (FiÄoj)", + "en_FM": "angla (Mikronezio)", + "en_GB": "angla (UnuiÄinta ReÄlando)", + "en_GD": "angla (Grenado)", + "en_GH": "angla (Ganao)", + "en_GI": "angla (Äœibraltaro)", + "en_GM": "angla (Gambio)", + "en_GU": "angla (Gvamo)", + "en_GY": "angla (Gujano)", + "en_IE": "angla (Irlando)", + "en_IL": "angla (Israelo)", + "en_IN": "angla (Hindujo)", + "en_IO": "angla (Brita Hindoceana Teritorio)", + "en_JM": "angla (Jamajko)", + "en_KE": "angla (Kenjo)", + "en_KI": "angla (Kiribato)", + "en_KN": "angla (Sent-Kristofo kaj Neviso)", + "en_KY": "angla (Kejmanoj)", + "en_LC": "angla (Sent-Lucio)", + "en_LR": "angla (Liberio)", + "en_LS": "angla (Lesoto)", + "en_MG": "angla (Madagaskaro)", + "en_MH": "angla (MarÅaloj)", + "en_MP": "angla (Nord-Marianoj)", + "en_MT": "angla (Malto)", + "en_MU": "angla (MaÅ­ricio)", + "en_MW": "angla (Malavio)", + "en_MY": "angla (Malajzio)", + "en_NA": "angla (Namibio)", + "en_NF": "angla (Norfolkinsulo)", + "en_NG": "angla (NiÄerio)", + "en_NL": "angla (Nederlando)", + "en_NR": "angla (Nauro)", + "en_NU": "angla (Niuo)", + "en_NZ": "angla (Nov-Zelando)", + "en_PG": "angla (Papuo-Nov-Gvineo)", + "en_PH": "angla (Filipinoj)", + "en_PK": "angla (Pakistano)", + "en_PN": "angla (Pitkarna Insulo)", + "en_PR": "angla (Puerto-Riko)", + "en_PW": "angla (BelaÅ­o)", + "en_RW": "angla (Ruando)", + "en_SB": "angla (Salomonoj)", + "en_SC": "angla (SejÅeloj)", + "en_SD": "angla (Sudano)", + "en_SE": "angla (Svedujo)", + "en_SG": "angla (Singapuro)", + "en_SH": "angla (Sent-Heleno)", + "en_SI": "angla (Slovenujo)", + "en_SL": "angla (Siera-Leono)", + "en_SZ": "angla (Svazilando)", + "en_TO": "angla (Tongo)", + "en_TT": "angla (Trinidado kaj Tobago)", + "en_TV": "angla (Tuvalo)", + "en_TZ": "angla (Tanzanio)", + "en_UG": "angla (Ugando)", + "en_UM": "angla (Usonaj malgrandaj insuloj)", + "en_US": "angla (Usono)", + "en_VC": "angla (Sent-Vincento kaj la Grenadinoj)", + "en_VG": "angla (Britaj Virgulininsuloj)", + "en_VI": "angla (Usonaj Virgulininsuloj)", + "en_VU": "angla (Vanuatuo)", + "en_WS": "angla (Samoo)", + "en_ZA": "angla (Sud-Afriko)", + "en_ZM": "angla (Zambio)", + "en_ZW": "angla (Zimbabvo)", + "eo": "esperanto", + "es": "hispana", + "es_AR": "hispana (Argentino)", + "es_BO": "hispana (Bolivio)", + "es_BR": "hispana (Brazilo)", + "es_CL": "hispana (Ĉilio)", + "es_CO": "hispana (Kolombio)", + "es_CR": "hispana (Kostariko)", + "es_CU": "hispana (Kubo)", + "es_DO": "hispana (Domingo)", + "es_EC": "hispana (Ekvadoro)", + "es_ES": "hispana (Hispanujo)", + "es_GQ": "hispana (Ekvatora Gvineo)", + "es_GT": "hispana (Gvatemalo)", + "es_HN": "hispana (Honduro)", + "es_MX": "hispana (Meksiko)", + "es_NI": "hispana (Nikaragvo)", + "es_PA": "hispana (Panamo)", + "es_PE": "hispana (Peruo)", + "es_PH": "hispana (Filipinoj)", + "es_PR": "hispana (Puerto-Riko)", + "es_PY": "hispana (Paragvajo)", + "es_SV": "hispana (Salvadoro)", + "es_US": "hispana (Usono)", + "es_UY": "hispana (Urugvajo)", + "es_VE": "hispana (Venezuelo)", + "et": "estona", + "et_EE": "estona (Estonujo)", + "eu": "eÅ­ska", + "eu_ES": "eÅ­ska (Hispanujo)", + "fa": "persa", + "fa_AF": "persa (Afganujo)", + "fa_IR": "persa (Irano)", + "fi": "finna", + "fi_FI": "finna (Finnlando)", + "fo": "feroa", + "fo_DK": "feroa (Danujo)", + "fo_FO": "feroa (Ferooj)", + "fr": "franca", + "fr_BE": "franca (Belgujo)", + "fr_BF": "franca (Burkino)", + "fr_BI": "franca (Burundo)", + "fr_BJ": "franca (Benino)", + "fr_CA": "franca (Kanado)", + "fr_CF": "franca (Centr-Afrika Respubliko)", + "fr_CG": "franca (Kongolo)", + "fr_CH": "franca (Svisujo)", + "fr_CI": "franca (Ebur-Bordo)", + "fr_CM": "franca (Kameruno)", + "fr_DJ": "franca (Äœibutio)", + "fr_DZ": "franca (AlÄerio)", + "fr_FR": "franca (Francujo)", + "fr_GA": "franca (Gabono)", + "fr_GF": "franca (Franca Gviano)", + "fr_GN": "franca (Gvineo)", + "fr_GP": "franca (Gvadelupo)", + "fr_GQ": "franca (Ekvatora Gvineo)", + "fr_HT": "franca (Haitio)", + "fr_KM": "franca (Komoroj)", + "fr_LU": "franca (Luksemburgo)", + "fr_MA": "franca (Maroko)", + "fr_MC": "franca (Monako)", + "fr_MG": "franca (Madagaskaro)", + "fr_ML": "franca (Malio)", + "fr_MQ": "franca (Martiniko)", + "fr_MR": "franca (MaÅ­ritanujo)", + "fr_MU": "franca (MaÅ­ricio)", + "fr_NC": "franca (Nov-Kaledonio)", + "fr_NE": "franca (NiÄero)", + "fr_PF": "franca (Franca Polinezio)", + "fr_PM": "franca (Sent-Piero kaj Mikelono)", + "fr_RE": "franca (Reunio)", + "fr_RW": "franca (Ruando)", + "fr_SC": "franca (SejÅeloj)", + "fr_SN": "franca (Senegalo)", + "fr_SY": "franca (Sirio)", + "fr_TD": "franca (Ĉado)", + "fr_TG": "franca (Togolo)", + "fr_TN": "franca (Tunizio)", + "fr_VU": "franca (Vanuatuo)", + "fr_WF": "franca (Valiso kaj Futuno)", + "fr_YT": "franca (Majoto)", + "fy": "frisa", + "fy_NL": "frisa (Nederlando)", + "ga": "irlanda", + "ga_IE": "irlanda (Irlando)", + "gd": "gaela", + "gd_GB": "gaela (UnuiÄinta ReÄlando)", + "gl": "galega", + "gl_ES": "galega (Hispanujo)", + "gu": "guÄarata", + "gu_IN": "guÄarata (Hindujo)", + "ha": "haÅ­sa", + "ha_GH": "haÅ­sa (Ganao)", + "ha_NE": "haÅ­sa (NiÄero)", + "ha_NG": "haÅ­sa (NiÄerio)", + "he": "hebrea", + "he_IL": "hebrea (Israelo)", + "hi": "hinda", + "hi_IN": "hinda (Hindujo)", + "hr": "kroata", + "hr_BA": "kroata (Bosnio-Hercegovino)", + "hr_HR": "kroata (Kroatujo)", + "hu": "hungara", + "hu_HU": "hungara (Hungarujo)", + "hy": "armena", + "hy_AM": "armena (Armenujo)", + "id": "indonezia", + "id_ID": "indonezia (Indonezio)", + "is": "islanda", + "is_IS": "islanda (Islando)", + "it": "itala", + "it_CH": "itala (Svisujo)", + "it_IT": "itala (Italujo)", + "it_SM": "itala (San-Marino)", + "ja": "japana", + "ja_JP": "japana (Japanujo)", + "ka": "kartvela", + "ka_GE": "kartvela (Kartvelujo)", + "kk": "kazaÄ¥a", + "kk_KZ": "kazaÄ¥a (KazaÄ¥stano)", + "kl": "gronlanda", + "kl_GL": "gronlanda (Gronlando)", + "km": "kmera", + "km_KH": "kmera (KamboÄo)", + "kn": "kanara", + "kn_IN": "kanara (Hindujo)", + "ko": "korea", + "ko_KP": "korea (Nord-Koreo)", + "ko_KR": "korea (Sud-Koreo)", + "ks": "kaÅmira", + "ks_IN": "kaÅmira (Hindujo)", + "ky": "kirgiza", + "ky_KG": "kirgiza (Kirgizistano)", + "lb": "luksemburga", + "lb_LU": "luksemburga (Luksemburgo)", + "ln": "lingala", + "ln_AO": "lingala (Angolo)", + "ln_CF": "lingala (Centr-Afrika Respubliko)", + "ln_CG": "lingala (Kongolo)", + "lo": "laÅ­a", + "lo_LA": "laÅ­a (Laoso)", + "lt": "litova", + "lt_LT": "litova (Litovujo)", + "lv": "latva", + "lv_LV": "latva (Latvujo)", + "mg": "malagasa", + "mg_MG": "malagasa (Madagaskaro)", + "mk": "makedona", + "mk_MK": "makedona (Makedonujo)", + "ml": "malajalama", + "ml_IN": "malajalama (Hindujo)", + "mn": "mongola", + "mn_MN": "mongola (Mongolujo)", + "mr": "marata", + "mr_IN": "marata (Hindujo)", + "ms": "malaja", + "ms_BN": "malaja (Brunejo)", + "ms_MY": "malaja (Malajzio)", + "ms_SG": "malaja (Singapuro)", + "mt": "malta", + "mt_MT": "malta (Malto)", + "my": "birma", + "my_MM": "birma (Mjanmao)", + "nb": "dannorvega", + "nb_NO": "dannorvega (Norvegujo)", + "nb_SJ": "dannorvega (Svalbardo kaj Jan-Majen-insulo)", + "ne": "nepala", + "ne_IN": "nepala (Hindujo)", + "ne_NP": "nepala (Nepalo)", + "nl": "nederlanda", + "nl_AW": "nederlanda (Arubo)", + "nl_BE": "nederlanda (Belgujo)", + "nl_NL": "nederlanda (Nederlando)", + "nl_SR": "nederlanda (Surinamo)", + "nn": "novnorvega", + "nn_NO": "novnorvega (Norvegujo)", + "no": "norvega", + "no_NO": "norvega (Norvegujo)", + "om": "oroma", + "om_ET": "oroma (Etiopujo)", + "om_KE": "oroma (Kenjo)", + "or": "orijo", + "or_IN": "orijo (Hindujo)", + "pa": "panÄaba", + "pa_IN": "panÄaba (Hindujo)", + "pa_PK": "panÄaba (Pakistano)", + "pl": "pola", + "pl_PL": "pola (Pollando)", + "ps": "paÅtoa", + "ps_AF": "paÅtoa (Afganujo)", + "pt": "portugala", + "pt_AO": "portugala (Angolo)", + "pt_BR": "portugala (Brazilo)", + "pt_CH": "portugala (Svisujo)", + "pt_CV": "portugala (Kabo-Verdo)", + "pt_GQ": "portugala (Ekvatora Gvineo)", + "pt_GW": "portugala (Gvineo-BisaÅ­o)", + "pt_LU": "portugala (Luksemburgo)", + "pt_MZ": "portugala (Mozambiko)", + "pt_PT": "portugala (Portugalujo)", + "pt_ST": "portugala (Sao-Tomeo kaj Principeo)", + "qu": "keĉua", + "qu_BO": "keĉua (Bolivio)", + "qu_EC": "keĉua (Ekvadoro)", + "qu_PE": "keĉua (Peruo)", + "rm": "romanĉa", + "rm_CH": "romanĉa (Svisujo)", + "rn": "burunda", + "rn_BI": "burunda (Burundo)", + "ro": "rumana", + "ro_MD": "rumana (Moldavujo)", + "ro_RO": "rumana (Rumanujo)", + "ru": "rusa", + "ru_BY": "rusa (Belorusujo)", + "ru_KG": "rusa (Kirgizistano)", + "ru_KZ": "rusa (KazaÄ¥stano)", + "ru_MD": "rusa (Moldavujo)", + "ru_RU": "rusa (Rusujo)", + "ru_UA": "rusa (Ukrajno)", + "rw": "ruanda", + "rw_RW": "ruanda (Ruando)", + "sg": "sangoa", + "sg_CF": "sangoa (Centr-Afrika Respubliko)", + "sh": "serbo-Kroata", + "sh_BA": "serbo-Kroata (Bosnio-Hercegovino)", + "si": "sinhala", + "si_LK": "sinhala (Sri-Lanko)", + "sk": "slovaka", + "sk_SK": "slovaka (Slovakujo)", + "sl": "slovena", + "sl_SI": "slovena (Slovenujo)", + "sn": "Åona", + "sn_ZW": "Åona (Zimbabvo)", + "so": "somala", + "so_DJ": "somala (Äœibutio)", + "so_ET": "somala (Etiopujo)", + "so_KE": "somala (Kenjo)", + "so_SO": "somala (Somalujo)", + "sq": "albana", + "sq_AL": "albana (Albanujo)", + "sq_MK": "albana (Makedonujo)", + "sr": "serba", + "sr_BA": "serba (Bosnio-Hercegovino)", + "sv": "sveda", + "sv_FI": "sveda (Finnlando)", + "sv_SE": "sveda (Svedujo)", + "sw": "svahila", + "sw_KE": "svahila (Kenjo)", + "sw_TZ": "svahila (Tanzanio)", + "sw_UG": "svahila (Ugando)", + "ta": "tamila", + "ta_IN": "tamila (Hindujo)", + "ta_LK": "tamila (Sri-Lanko)", + "ta_MY": "tamila (Malajzio)", + "ta_SG": "tamila (Singapuro)", + "te": "telugua", + "te_IN": "telugua (Hindujo)", + "th": "taja", + "th_TH": "taja (Tajlando)", + "ti": "tigraja", + "ti_ER": "tigraja (Eritreo)", + "ti_ET": "tigraja (Etiopujo)", + "tl": "tagaloga", + "tl_PH": "tagaloga (Filipinoj)", + "to": "tongaa", + "to_TO": "tongaa (Tongo)", + "tr": "turka", + "tr_CY": "turka (Kipro)", + "tr_TR": "turka (Turkujo)", + "ug": "ujgura", + "ug_CN": "ujgura (Ĉinujo)", + "uk": "ukraina", + "uk_UA": "ukraina (Ukrajno)", + "ur": "urduo", + "ur_IN": "urduo (Hindujo)", + "ur_PK": "urduo (Pakistano)", + "uz": "uzbeka", + "uz_AF": "uzbeka (Afganujo)", + "uz_UZ": "uzbeka (Uzbekujo)", + "vi": "vjetnama", + "vi_VN": "vjetnama (Vjetnamo)", + "yi": "jida", + "yo": "joruba", + "yo_BJ": "joruba (Benino)", + "yo_NG": "joruba (NiÄerio)", + "zh": "ĉina", + "zh_CN": "ĉina (Ĉinujo)", + "zh_SG": "ĉina (Singapuro)", + "zh_TW": "ĉina (Tajvano)", + "zu": "zulua", + "zu_ZA": "zulua (Sud-Afriko)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es.json new file mode 100644 index 0000000000000000000000000000000000000000..fd1adb88417d046911def4323ba51f42ebcfcea8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikáans", + "af_NA": "afrikáans (Namibia)", + "af_ZA": "afrikáans (Sudáfrica)", + "ak": "akan", + "ak_GH": "akan (Ghana)", + "am": "amárico", + "am_ET": "amárico (Etiopía)", + "ar": "árabe", + "ar_AE": "árabe (Emiratos Ãrabes Unidos)", + "ar_BH": "árabe (Baréin)", + "ar_DJ": "árabe (Yibuti)", + "ar_DZ": "árabe (Argelia)", + "ar_EG": "árabe (Egipto)", + "ar_EH": "árabe (Sáhara Occidental)", + "ar_ER": "árabe (Eritrea)", + "ar_IL": "árabe (Israel)", + "ar_IQ": "árabe (Irak)", + "ar_JO": "árabe (Jordania)", + "ar_KM": "árabe (Comoras)", + "ar_KW": "árabe (Kuwait)", + "ar_LB": "árabe (Líbano)", + "ar_LY": "árabe (Libia)", + "ar_MA": "árabe (Marruecos)", + "ar_MR": "árabe (Mauritania)", + "ar_OM": "árabe (Omán)", + "ar_PS": "árabe (Territorios Palestinos)", + "ar_QA": "árabe (Catar)", + "ar_SA": "árabe (Arabia Saudí)", + "ar_SD": "árabe (Sudán)", + "ar_SO": "árabe (Somalia)", + "ar_SS": "árabe (Sudán del Sur)", + "ar_SY": "árabe (Siria)", + "ar_TD": "árabe (Chad)", + "ar_TN": "árabe (Túnez)", + "ar_YE": "árabe (Yemen)", + "as": "asamés", + "as_IN": "asamés (India)", + "az": "azerbaiyano", + "az_AZ": "azerbaiyano (Azerbaiyán)", + "az_Cyrl": "azerbaiyano (cirílico)", + "az_Cyrl_AZ": "azerbaiyano (cirílico, Azerbaiyán)", + "az_Latn": "azerbaiyano (latino)", + "az_Latn_AZ": "azerbaiyano (latino, Azerbaiyán)", + "be": "bielorruso", + "be_BY": "bielorruso (Bielorrusia)", + "bg": "búlgaro", + "bg_BG": "búlgaro (Bulgaria)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengalí", + "bn_BD": "bengalí (Bangladés)", + "bn_IN": "bengalí (India)", + "bo": "tibetano", + "bo_CN": "tibetano (China)", + "bo_IN": "tibetano (India)", + "br": "bretón", + "br_FR": "bretón (Francia)", + "bs": "bosnio", + "bs_BA": "bosnio (Bosnia-Herzegovina)", + "bs_Cyrl": "bosnio (cirílico)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia-Herzegovina)", + "bs_Latn": "bosnio (latino)", + "bs_Latn_BA": "bosnio (latino, Bosnia-Herzegovina)", + "ca": "catalán", + "ca_AD": "catalán (Andorra)", + "ca_ES": "catalán (España)", + "ca_FR": "catalán (Francia)", + "ca_IT": "catalán (Italia)", + "ce": "checheno", + "ce_RU": "checheno (Rusia)", + "cs": "checo", + "cs_CZ": "checo (República Checa)", + "cy": "galés", + "cy_GB": "galés (Reino Unido)", + "da": "danés", + "da_DK": "danés (Dinamarca)", + "da_GL": "danés (Groenlandia)", + "de": "alemán", + "de_AT": "alemán (Austria)", + "de_BE": "alemán (Bélgica)", + "de_CH": "alemán (Suiza)", + "de_DE": "alemán (Alemania)", + "de_IT": "alemán (Italia)", + "de_LI": "alemán (Liechtenstein)", + "de_LU": "alemán (Luxemburgo)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bután)", + "ee": "ewé", + "ee_GH": "ewé (Ghana)", + "ee_TG": "ewé (Togo)", + "el": "griego", + "el_CY": "griego (Chipre)", + "el_GR": "griego (Grecia)", + "en": "inglés", + "en_AG": "inglés (Antigua y Barbuda)", + "en_AI": "inglés (Anguila)", + "en_AS": "inglés (Samoa Americana)", + "en_AT": "inglés (Austria)", + "en_AU": "inglés (Australia)", + "en_BB": "inglés (Barbados)", + "en_BE": "inglés (Bélgica)", + "en_BI": "inglés (Burundi)", + "en_BM": "inglés (Bermudas)", + "en_BS": "inglés (Bahamas)", + "en_BW": "inglés (Botsuana)", + "en_BZ": "inglés (Belice)", + "en_CA": "inglés (Canadá)", + "en_CC": "inglés (Islas Cocos)", + "en_CH": "inglés (Suiza)", + "en_CK": "inglés (Islas Cook)", + "en_CM": "inglés (Camerún)", + "en_CX": "inglés (Isla de Navidad)", + "en_CY": "inglés (Chipre)", + "en_DE": "inglés (Alemania)", + "en_DG": "inglés (Diego García)", + "en_DK": "inglés (Dinamarca)", + "en_DM": "inglés (Dominica)", + "en_ER": "inglés (Eritrea)", + "en_FI": "inglés (Finlandia)", + "en_FJ": "inglés (Fiyi)", + "en_FK": "inglés (Islas Malvinas)", + "en_FM": "inglés (Micronesia)", + "en_GB": "inglés (Reino Unido)", + "en_GD": "inglés (Granada)", + "en_GG": "inglés (Guernesey)", + "en_GH": "inglés (Ghana)", + "en_GI": "inglés (Gibraltar)", + "en_GM": "inglés (Gambia)", + "en_GU": "inglés (Guam)", + "en_GY": "inglés (Guyana)", + "en_HK": "inglés (RAE de Hong Kong (China))", + "en_IE": "inglés (Irlanda)", + "en_IL": "inglés (Israel)", + "en_IM": "inglés (Isla de Man)", + "en_IN": "inglés (India)", + "en_IO": "inglés (Territorio Británico del Océano Ãndico)", + "en_JE": "inglés (Jersey)", + "en_JM": "inglés (Jamaica)", + "en_KE": "inglés (Kenia)", + "en_KI": "inglés (Kiribati)", + "en_KN": "inglés (San Cristóbal y Nieves)", + "en_KY": "inglés (Islas Caimán)", + "en_LC": "inglés (Santa Lucía)", + "en_LR": "inglés (Liberia)", + "en_LS": "inglés (Lesoto)", + "en_MG": "inglés (Madagascar)", + "en_MH": "inglés (Islas Marshall)", + "en_MO": "inglés (RAE de Macao (China))", + "en_MP": "inglés (Islas Marianas del Norte)", + "en_MS": "inglés (Montserrat)", + "en_MT": "inglés (Malta)", + "en_MU": "inglés (Mauricio)", + "en_MW": "inglés (Malaui)", + "en_MY": "inglés (Malasia)", + "en_NA": "inglés (Namibia)", + "en_NF": "inglés (Isla Norfolk)", + "en_NG": "inglés (Nigeria)", + "en_NL": "inglés (Países Bajos)", + "en_NR": "inglés (Nauru)", + "en_NU": "inglés (Niue)", + "en_NZ": "inglés (Nueva Zelanda)", + "en_PG": "inglés (Papúa Nueva Guinea)", + "en_PH": "inglés (Filipinas)", + "en_PK": "inglés (Pakistán)", + "en_PN": "inglés (Islas Pitcairn)", + "en_PR": "inglés (Puerto Rico)", + "en_PW": "inglés (Palaos)", + "en_RW": "inglés (Ruanda)", + "en_SB": "inglés (Islas Salomón)", + "en_SC": "inglés (Seychelles)", + "en_SD": "inglés (Sudán)", + "en_SE": "inglés (Suecia)", + "en_SG": "inglés (Singapur)", + "en_SH": "inglés (Santa Elena)", + "en_SI": "inglés (Eslovenia)", + "en_SL": "inglés (Sierra Leona)", + "en_SS": "inglés (Sudán del Sur)", + "en_SX": "inglés (Sint Maarten)", + "en_SZ": "inglés (Suazilandia)", + "en_TC": "inglés (Islas Turcas y Caicos)", + "en_TK": "inglés (Tokelau)", + "en_TO": "inglés (Tonga)", + "en_TT": "inglés (Trinidad y Tobago)", + "en_TV": "inglés (Tuvalu)", + "en_TZ": "inglés (Tanzania)", + "en_UG": "inglés (Uganda)", + "en_UM": "inglés (Islas menores alejadas de EE. UU.)", + "en_US": "inglés (Estados Unidos)", + "en_VC": "inglés (San Vicente y las Granadinas)", + "en_VG": "inglés (Islas Vírgenes Británicas)", + "en_VI": "inglés (Islas Vírgenes de EE. UU.)", + "en_VU": "inglés (Vanuatu)", + "en_WS": "inglés (Samoa)", + "en_ZA": "inglés (Sudáfrica)", + "en_ZM": "inglés (Zambia)", + "en_ZW": "inglés (Zimbabue)", + "eo": "esperanto", + "es": "español", + "es_AR": "español (Argentina)", + "es_BO": "español (Bolivia)", + "es_BR": "español (Brasil)", + "es_CL": "español (Chile)", + "es_CO": "español (Colombia)", + "es_CR": "español (Costa Rica)", + "es_CU": "español (Cuba)", + "es_DO": "español (República Dominicana)", + "es_EA": "español (Ceuta y Melilla)", + "es_EC": "español (Ecuador)", + "es_ES": "español (España)", + "es_GQ": "español (Guinea Ecuatorial)", + "es_GT": "español (Guatemala)", + "es_HN": "español (Honduras)", + "es_IC": "español (Canarias)", + "es_MX": "español (México)", + "es_NI": "español (Nicaragua)", + "es_PA": "español (Panamá)", + "es_PE": "español (Perú)", + "es_PH": "español (Filipinas)", + "es_PR": "español (Puerto Rico)", + "es_PY": "español (Paraguay)", + "es_SV": "español (El Salvador)", + "es_US": "español (Estados Unidos)", + "es_UY": "español (Uruguay)", + "es_VE": "español (Venezuela)", + "et": "estonio", + "et_EE": "estonio (Estonia)", + "eu": "euskera", + "eu_ES": "euskera (España)", + "fa": "persa", + "fa_AF": "persa (Afganistán)", + "fa_IR": "persa (Irán)", + "ff": "fula", + "ff_CM": "fula (Camerún)", + "ff_GN": "fula (Guinea)", + "ff_MR": "fula (Mauritania)", + "ff_SN": "fula (Senegal)", + "fi": "finés", + "fi_FI": "finés (Finlandia)", + "fo": "feroés", + "fo_DK": "feroés (Dinamarca)", + "fo_FO": "feroés (Islas Feroe)", + "fr": "francés", + "fr_BE": "francés (Bélgica)", + "fr_BF": "francés (Burkina Faso)", + "fr_BI": "francés (Burundi)", + "fr_BJ": "francés (Benín)", + "fr_BL": "francés (San Bartolomé)", + "fr_CA": "francés (Canadá)", + "fr_CD": "francés (República Democrática del Congo)", + "fr_CF": "francés (República Centroafricana)", + "fr_CG": "francés (República del Congo)", + "fr_CH": "francés (Suiza)", + "fr_CI": "francés (Côte d’Ivoire)", + "fr_CM": "francés (Camerún)", + "fr_DJ": "francés (Yibuti)", + "fr_DZ": "francés (Argelia)", + "fr_FR": "francés (Francia)", + "fr_GA": "francés (Gabón)", + "fr_GF": "francés (Guayana Francesa)", + "fr_GN": "francés (Guinea)", + "fr_GP": "francés (Guadalupe)", + "fr_GQ": "francés (Guinea Ecuatorial)", + "fr_HT": "francés (Haití)", + "fr_KM": "francés (Comoras)", + "fr_LU": "francés (Luxemburgo)", + "fr_MA": "francés (Marruecos)", + "fr_MC": "francés (Mónaco)", + "fr_MF": "francés (San Martín)", + "fr_MG": "francés (Madagascar)", + "fr_ML": "francés (Mali)", + "fr_MQ": "francés (Martinica)", + "fr_MR": "francés (Mauritania)", + "fr_MU": "francés (Mauricio)", + "fr_NC": "francés (Nueva Caledonia)", + "fr_NE": "francés (Níger)", + "fr_PF": "francés (Polinesia Francesa)", + "fr_PM": "francés (San Pedro y Miquelón)", + "fr_RE": "francés (Reunión)", + "fr_RW": "francés (Ruanda)", + "fr_SC": "francés (Seychelles)", + "fr_SN": "francés (Senegal)", + "fr_SY": "francés (Siria)", + "fr_TD": "francés (Chad)", + "fr_TG": "francés (Togo)", + "fr_TN": "francés (Túnez)", + "fr_VU": "francés (Vanuatu)", + "fr_WF": "francés (Wallis y Futuna)", + "fr_YT": "francés (Mayotte)", + "fy": "frisón occidental", + "fy_NL": "frisón occidental (Países Bajos)", + "ga": "irlandés", + "ga_IE": "irlandés (Irlanda)", + "gd": "gaélico escocés", + "gd_GB": "gaélico escocés (Reino Unido)", + "gl": "gallego", + "gl_ES": "gallego (España)", + "gu": "guyaratí", + "gu_IN": "guyaratí (India)", + "gv": "manés", + "gv_IM": "manés (Isla de Man)", + "ha": "hausa", + "ha_GH": "hausa (Ghana)", + "ha_NE": "hausa (Níger)", + "ha_NG": "hausa (Nigeria)", + "he": "hebreo", + "he_IL": "hebreo (Israel)", + "hi": "hindi", + "hi_IN": "hindi (India)", + "hr": "croata", + "hr_BA": "croata (Bosnia-Herzegovina)", + "hr_HR": "croata (Croacia)", + "hu": "húngaro", + "hu_HU": "húngaro (Hungría)", + "hy": "armenio", + "hy_AM": "armenio (Armenia)", + "id": "indonesio", + "id_ID": "indonesio (Indonesia)", + "ig": "igbo", + "ig_NG": "igbo (Nigeria)", + "ii": "yi de Sichuán", + "ii_CN": "yi de Sichuán (China)", + "is": "islandés", + "is_IS": "islandés (Islandia)", + "it": "italiano", + "it_CH": "italiano (Suiza)", + "it_IT": "italiano (Italia)", + "it_SM": "italiano (San Marino)", + "ja": "japonés", + "ja_JP": "japonés (Japón)", + "ka": "georgiano", + "ka_GE": "georgiano (Georgia)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenia)", + "kk": "kazajo", + "kk_KZ": "kazajo (Kazajistán)", + "kl": "groenlandés", + "kl_GL": "groenlandés (Groenlandia)", + "km": "jemer", + "km_KH": "jemer (Camboya)", + "kn": "canarés", + "kn_IN": "canarés (India)", + "ko": "coreano", + "ko_KP": "coreano (Corea del Norte)", + "ko_KR": "coreano (Corea del Sur)", + "ks": "cachemiro", + "ks_IN": "cachemiro (India)", + "kw": "córnico", + "kw_GB": "córnico (Reino Unido)", + "ky": "kirguís", + "ky_KG": "kirguís (Kirguistán)", + "lb": "luxemburgués", + "lb_LU": "luxemburgués (Luxemburgo)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (República Democrática del Congo)", + "ln_CF": "lingala (República Centroafricana)", + "ln_CG": "lingala (República del Congo)", + "lo": "lao", + "lo_LA": "lao (Laos)", + "lt": "lituano", + "lt_LT": "lituano (Lituania)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (República Democrática del Congo)", + "lv": "letón", + "lv_LV": "letón (Letonia)", + "mg": "malgache", + "mg_MG": "malgache (Madagascar)", + "mk": "macedonio", + "mk_MK": "macedonio (Macedonia)", + "ml": "malayalam", + "ml_IN": "malayalam (India)", + "mn": "mongol", + "mn_MN": "mongol (Mongolia)", + "mr": "maratí", + "mr_IN": "maratí (India)", + "ms": "malayo", + "ms_BN": "malayo (Brunéi)", + "ms_MY": "malayo (Malasia)", + "ms_SG": "malayo (Singapur)", + "mt": "maltés", + "mt_MT": "maltés (Malta)", + "my": "birmano", + "my_MM": "birmano (Myanmar (Birmania))", + "nb": "noruego bokmal", + "nb_NO": "noruego bokmal (Noruega)", + "nb_SJ": "noruego bokmal (Svalbard y Jan Mayen)", + "nd": "ndebele septentrional", + "nd_ZW": "ndebele septentrional (Zimbabue)", + "ne": "nepalí", + "ne_IN": "nepalí (India)", + "ne_NP": "nepalí (Nepal)", + "nl": "neerlandés", + "nl_AW": "neerlandés (Aruba)", + "nl_BE": "neerlandés (Bélgica)", + "nl_BQ": "neerlandés (Caribe neerlandés)", + "nl_CW": "neerlandés (Curazao)", + "nl_NL": "neerlandés (Países Bajos)", + "nl_SR": "neerlandés (Surinam)", + "nl_SX": "neerlandés (Sint Maarten)", + "nn": "noruego nynorsk", + "nn_NO": "noruego nynorsk (Noruega)", + "no": "noruego", + "no_NO": "noruego (Noruega)", + "om": "oromo", + "om_ET": "oromo (Etiopía)", + "om_KE": "oromo (Kenia)", + "or": "oriya", + "or_IN": "oriya (India)", + "os": "osético", + "os_GE": "osético (Georgia)", + "os_RU": "osético (Rusia)", + "pa": "panyabí", + "pa_Arab": "panyabí (árabe)", + "pa_Arab_PK": "panyabí (árabe, Pakistán)", + "pa_Guru": "panyabí (gurmuji)", + "pa_Guru_IN": "panyabí (gurmuji, India)", + "pa_IN": "panyabí (India)", + "pa_PK": "panyabí (Pakistán)", + "pl": "polaco", + "pl_PL": "polaco (Polonia)", + "ps": "pastún", + "ps_AF": "pastún (Afganistán)", + "pt": "portugués", + "pt_AO": "portugués (Angola)", + "pt_BR": "portugués (Brasil)", + "pt_CH": "portugués (Suiza)", + "pt_CV": "portugués (Cabo Verde)", + "pt_GQ": "portugués (Guinea Ecuatorial)", + "pt_GW": "portugués (Guinea-Bisáu)", + "pt_LU": "portugués (Luxemburgo)", + "pt_MO": "portugués (RAE de Macao (China))", + "pt_MZ": "portugués (Mozambique)", + "pt_PT": "portugués (Portugal)", + "pt_ST": "portugués (Santo Tomé y Príncipe)", + "pt_TL": "portugués (Timor-Leste)", + "qu": "quechua", + "qu_BO": "quechua (Bolivia)", + "qu_EC": "quechua (Ecuador)", + "qu_PE": "quechua (Perú)", + "rm": "romanche", + "rm_CH": "romanche (Suiza)", + "rn": "kirundi", + "rn_BI": "kirundi (Burundi)", + "ro": "rumano", + "ro_MD": "rumano (Moldavia)", + "ro_RO": "rumano (Rumanía)", + "ru": "ruso", + "ru_BY": "ruso (Bielorrusia)", + "ru_KG": "ruso (Kirguistán)", + "ru_KZ": "ruso (Kazajistán)", + "ru_MD": "ruso (Moldavia)", + "ru_RU": "ruso (Rusia)", + "ru_UA": "ruso (Ucrania)", + "rw": "kinyarwanda", + "rw_RW": "kinyarwanda (Ruanda)", + "se": "sami septentrional", + "se_FI": "sami septentrional (Finlandia)", + "se_NO": "sami septentrional (Noruega)", + "se_SE": "sami septentrional (Suecia)", + "sg": "sango", + "sg_CF": "sango (República Centroafricana)", + "sh": "serbocroata", + "sh_BA": "serbocroata (Bosnia-Herzegovina)", + "si": "cingalés", + "si_LK": "cingalés (Sri Lanka)", + "sk": "eslovaco", + "sk_SK": "eslovaco (Eslovaquia)", + "sl": "esloveno", + "sl_SI": "esloveno (Eslovenia)", + "sn": "shona", + "sn_ZW": "shona (Zimbabue)", + "so": "somalí", + "so_DJ": "somalí (Yibuti)", + "so_ET": "somalí (Etiopía)", + "so_KE": "somalí (Kenia)", + "so_SO": "somalí (Somalia)", + "sq": "albanés", + "sq_AL": "albanés (Albania)", + "sq_MK": "albanés (Macedonia)", + "sq_XK": "albanés (Kosovo)", + "sr": "serbio", + "sr_BA": "serbio (Bosnia-Herzegovina)", + "sr_Cyrl": "serbio (cirílico)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia-Herzegovina)", + "sr_Cyrl_ME": "serbio (cirílico, Montenegro)", + "sr_Cyrl_RS": "serbio (cirílico, Serbia)", + "sr_Cyrl_XK": "serbio (cirílico, Kosovo)", + "sr_Latn": "serbio (latino)", + "sr_Latn_BA": "serbio (latino, Bosnia-Herzegovina)", + "sr_Latn_ME": "serbio (latino, Montenegro)", + "sr_Latn_RS": "serbio (latino, Serbia)", + "sr_Latn_XK": "serbio (latino, Kosovo)", + "sr_ME": "serbio (Montenegro)", + "sr_RS": "serbio (Serbia)", + "sr_XK": "serbio (Kosovo)", + "sv": "sueco", + "sv_AX": "sueco (Islas Ã…land)", + "sv_FI": "sueco (Finlandia)", + "sv_SE": "sueco (Suecia)", + "sw": "suajili", + "sw_CD": "suajili (República Democrática del Congo)", + "sw_KE": "suajili (Kenia)", + "sw_TZ": "suajili (Tanzania)", + "sw_UG": "suajili (Uganda)", + "ta": "tamil", + "ta_IN": "tamil (India)", + "ta_LK": "tamil (Sri Lanka)", + "ta_MY": "tamil (Malasia)", + "ta_SG": "tamil (Singapur)", + "te": "telugu", + "te_IN": "telugu (India)", + "th": "tailandés", + "th_TH": "tailandés (Tailandia)", + "ti": "tigriña", + "ti_ER": "tigriña (Eritrea)", + "ti_ET": "tigriña (Etiopía)", + "tl": "tagalo", + "tl_PH": "tagalo (Filipinas)", + "to": "tongano", + "to_TO": "tongano (Tonga)", + "tr": "turco", + "tr_CY": "turco (Chipre)", + "tr_TR": "turco (Turquía)", + "ug": "uigur", + "ug_CN": "uigur (China)", + "uk": "ucraniano", + "uk_UA": "ucraniano (Ucrania)", + "ur": "urdu", + "ur_IN": "urdu (India)", + "ur_PK": "urdu (Pakistán)", + "uz": "uzbeko", + "uz_AF": "uzbeko (Afganistán)", + "uz_Arab": "uzbeko (árabe)", + "uz_Arab_AF": "uzbeko (árabe, Afganistán)", + "uz_Cyrl": "uzbeko (cirílico)", + "uz_Cyrl_UZ": "uzbeko (cirílico, Uzbekistán)", + "uz_Latn": "uzbeko (latino)", + "uz_Latn_UZ": "uzbeko (latino, Uzbekistán)", + "uz_UZ": "uzbeko (Uzbekistán)", + "vi": "vietnamita", + "vi_VN": "vietnamita (Vietnam)", + "yi": "yidis", + "yo": "yoruba", + "yo_BJ": "yoruba (Benín)", + "yo_NG": "yoruba (Nigeria)", + "zh": "chino", + "zh_CN": "chino (China)", + "zh_HK": "chino (RAE de Hong Kong (China))", + "zh_Hans": "chino (simplificado)", + "zh_Hans_CN": "chino (simplificado, China)", + "zh_Hans_HK": "chino (simplificado, RAE de Hong Kong (China))", + "zh_Hans_MO": "chino (simplificado, RAE de Macao (China))", + "zh_Hans_SG": "chino (simplificado, Singapur)", + "zh_Hant": "chino (tradicional)", + "zh_Hant_HK": "chino (tradicional, RAE de Hong Kong (China))", + "zh_Hant_MO": "chino (tradicional, RAE de Macao (China))", + "zh_Hant_TW": "chino (tradicional, Taiwán)", + "zh_MO": "chino (RAE de Macao (China))", + "zh_SG": "chino (Singapur)", + "zh_TW": "chino (Taiwán)", + "zu": "zulú", + "zu_ZA": "zulú (Sudáfrica)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_419.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_419.json new file mode 100644 index 0000000000000000000000000000000000000000..ad5dd9e7cdad9426f6d26c9ff43e1400d7105459 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_419.json @@ -0,0 +1,33 @@ +{ + "Names": { + "az_Latn": "azerbaiyano (latín)", + "az_Latn_AZ": "azerbaiyano (latín, Azerbaiyán)", + "bs_Latn": "bosnio (latín)", + "bs_Latn_BA": "bosnio (latín, Bosnia-Herzegovina)", + "en_UM": "inglés (Islas Ultramarinas de EE.UU.)", + "es_IC": "español (Islas Canarias)", + "eu": "vasco", + "eu_ES": "vasco (España)", + "fr_CI": "francés (Costa de Marfil)", + "gu": "gujarati", + "gu_IN": "gujarati (India)", + "lo": "laosiano", + "lo_LA": "laosiano (Laos)", + "pt_TL": "portugués (Timor Oriental)", + "rm": "retorrománico", + "rm_CH": "retorrománico (Suiza)", + "sr_Latn": "serbio (latín)", + "sr_Latn_BA": "serbio (latín, Bosnia-Herzegovina)", + "sr_Latn_ME": "serbio (latín, Montenegro)", + "sr_Latn_RS": "serbio (latín, Serbia)", + "sr_Latn_XK": "serbio (latín, Kosovo)", + "sw": "swahili", + "sw_CD": "swahili (República Democrática del Congo)", + "sw_KE": "swahili (Kenia)", + "sw_TZ": "swahili (Tanzania)", + "sw_UG": "swahili (Uganda)", + "uz_Latn": "uzbeko (latín)", + "uz_Latn_UZ": "uzbeko (latín, Uzbekistán)", + "yi": "yídish" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_AR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_AR.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_AR.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_BO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_BO.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_BO.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_CL.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_CL.json new file mode 100644 index 0000000000000000000000000000000000000000..7f5dfb3126762b4807dcc5716513a58523856437 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_CL.json @@ -0,0 +1,20 @@ +{ + "Names": { + "ar_EH": "árabe (Sahara Occidental)", + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_CO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_CO.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_CO.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_CR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_CR.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_CR.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_DO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_DO.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_DO.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_EC.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_EC.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_EC.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_GT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_GT.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_GT.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_HN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_HN.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_HN.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_MX.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_MX.json new file mode 100644 index 0000000000000000000000000000000000000000..875cb7c79691f58f87c4daa38ffcf848adddfef3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_MX.json @@ -0,0 +1,22 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "en_UM": "inglés (Islas Ultramarinas Menores de Estados Unidos)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "rn": "kiroundi", + "rn_BI": "kiroundi (Burundi)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_NI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_NI.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_NI.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_PA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_PA.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_PA.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_PE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_PE.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_PE.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_PY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_PY.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_PY.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_US.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_US.json new file mode 100644 index 0000000000000000000000000000000000000000..7e71566b8a9e2ae61efc38e2e7cf95b53eeece71 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_US.json @@ -0,0 +1,6 @@ +{ + "Names": { + "rn": "kiroundi", + "rn_BI": "kiroundi (Burundi)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_VE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_VE.json new file mode 100644 index 0000000000000000000000000000000000000000..29ba1d5b6f067d36c54c9310ce5b2714e9925f5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/es_VE.json @@ -0,0 +1,19 @@ +{ + "Names": { + "bs_BA": "bosnio (Bosnia y Herzegovina)", + "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", + "bs_Latn_BA": "bosnio (latino, Bosnia y Herzegovina)", + "hr_BA": "croata (Bosnia y Herzegovina)", + "pa": "punyabí", + "pa_Arab": "punyabí (árabe)", + "pa_Arab_PK": "punyabí (árabe, Pakistán)", + "pa_Guru": "punyabí (gurmuji)", + "pa_Guru_IN": "punyabí (gurmuji, India)", + "pa_IN": "punyabí (India)", + "pa_PK": "punyabí (Pakistán)", + "sh_BA": "serbocroata (Bosnia y Herzegovina)", + "sr_BA": "serbio (Bosnia y Herzegovina)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia y Herzegovina)", + "sr_Latn_BA": "serbio (latino, Bosnia y Herzegovina)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/et.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/et.json new file mode 100644 index 0000000000000000000000000000000000000000..7d691b6fa00f118aa7862b62946573fec47cdcd7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/et.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaani", + "af_NA": "afrikaani (Namiibia)", + "af_ZA": "afrikaani (Lõuna-Aafrika Vabariik)", + "ak": "akani", + "ak_GH": "akani (Ghana)", + "am": "amhara", + "am_ET": "amhara (Etioopia)", + "ar": "araabia", + "ar_AE": "araabia (Araabia Ühendemiraadid)", + "ar_BH": "araabia (Bahrein)", + "ar_DJ": "araabia (Djibouti)", + "ar_DZ": "araabia (Alžeeria)", + "ar_EG": "araabia (Egiptus)", + "ar_EH": "araabia (Lääne-Sahara)", + "ar_ER": "araabia (Eritrea)", + "ar_IL": "araabia (Iisrael)", + "ar_IQ": "araabia (Iraak)", + "ar_JO": "araabia (Jordaania)", + "ar_KM": "araabia (Komoorid)", + "ar_KW": "araabia (Kuveit)", + "ar_LB": "araabia (Liibanon)", + "ar_LY": "araabia (Liibüa)", + "ar_MA": "araabia (Maroko)", + "ar_MR": "araabia (Mauritaania)", + "ar_OM": "araabia (Omaan)", + "ar_PS": "araabia (Palestiina alad)", + "ar_QA": "araabia (Katar)", + "ar_SA": "araabia (Saudi Araabia)", + "ar_SD": "araabia (Sudaan)", + "ar_SO": "araabia (Somaalia)", + "ar_SS": "araabia (Lõuna-Sudaan)", + "ar_SY": "araabia (Süüria)", + "ar_TD": "araabia (TÅ¡aad)", + "ar_TN": "araabia (Tuneesia)", + "ar_YE": "araabia (Jeemen)", + "as": "assami", + "as_IN": "assami (India)", + "az": "aserbaidžaani", + "az_AZ": "aserbaidžaani (Aserbaidžaan)", + "az_Cyrl": "aserbaidžaani (kirillitsa)", + "az_Cyrl_AZ": "aserbaidžaani (kirillitsa, Aserbaidžaan)", + "az_Latn": "aserbaidžaani (ladina)", + "az_Latn_AZ": "aserbaidžaani (ladina, Aserbaidžaan)", + "be": "valgevene", + "be_BY": "valgevene (Valgevene)", + "bg": "bulgaaria", + "bg_BG": "bulgaaria (Bulgaaria)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengali", + "bn_BD": "bengali (Bangladesh)", + "bn_IN": "bengali (India)", + "bo": "tiibeti", + "bo_CN": "tiibeti (Hiina)", + "bo_IN": "tiibeti (India)", + "br": "bretooni", + "br_FR": "bretooni (Prantsusmaa)", + "bs": "bosnia", + "bs_BA": "bosnia (Bosnia ja Hertsegoviina)", + "bs_Cyrl": "bosnia (kirillitsa)", + "bs_Cyrl_BA": "bosnia (kirillitsa, Bosnia ja Hertsegoviina)", + "bs_Latn": "bosnia (ladina)", + "bs_Latn_BA": "bosnia (ladina, Bosnia ja Hertsegoviina)", + "ca": "katalaani", + "ca_AD": "katalaani (Andorra)", + "ca_ES": "katalaani (Hispaania)", + "ca_FR": "katalaani (Prantsusmaa)", + "ca_IT": "katalaani (Itaalia)", + "ce": "tÅ¡etÅ¡eeni", + "ce_RU": "tÅ¡etÅ¡eeni (Venemaa)", + "cs": "tÅ¡ehhi", + "cs_CZ": "tÅ¡ehhi (TÅ¡ehhi)", + "cy": "kõmri", + "cy_GB": "kõmri (Suurbritannia)", + "da": "taani", + "da_DK": "taani (Taani)", + "da_GL": "taani (Gröönimaa)", + "de": "saksa", + "de_AT": "saksa (Austria)", + "de_BE": "saksa (Belgia)", + "de_CH": "saksa (Å veits)", + "de_DE": "saksa (Saksamaa)", + "de_IT": "saksa (Itaalia)", + "de_LI": "saksa (Liechtenstein)", + "de_LU": "saksa (Luksemburg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhutan)", + "ee": "eve", + "ee_GH": "eve (Ghana)", + "ee_TG": "eve (Togo)", + "el": "kreeka", + "el_CY": "kreeka (Küpros)", + "el_GR": "kreeka (Kreeka)", + "en": "inglise", + "en_AG": "inglise (Antigua ja Barbuda)", + "en_AI": "inglise (Anguilla)", + "en_AS": "inglise (Ameerika Samoa)", + "en_AT": "inglise (Austria)", + "en_AU": "inglise (Austraalia)", + "en_BB": "inglise (Barbados)", + "en_BE": "inglise (Belgia)", + "en_BI": "inglise (Burundi)", + "en_BM": "inglise (Bermuda)", + "en_BS": "inglise (Bahama)", + "en_BW": "inglise (Botswana)", + "en_BZ": "inglise (Belize)", + "en_CA": "inglise (Kanada)", + "en_CC": "inglise (Kookossaared)", + "en_CH": "inglise (Å veits)", + "en_CK": "inglise (Cooki saared)", + "en_CM": "inglise (Kamerun)", + "en_CX": "inglise (Jõulusaar)", + "en_CY": "inglise (Küpros)", + "en_DE": "inglise (Saksamaa)", + "en_DG": "inglise (Diego Garcia)", + "en_DK": "inglise (Taani)", + "en_DM": "inglise (Dominica)", + "en_ER": "inglise (Eritrea)", + "en_FI": "inglise (Soome)", + "en_FJ": "inglise (Fidži)", + "en_FK": "inglise (Falklandi saared)", + "en_FM": "inglise (Mikroneesia)", + "en_GB": "inglise (Suurbritannia)", + "en_GD": "inglise (Grenada)", + "en_GG": "inglise (Guernsey)", + "en_GH": "inglise (Ghana)", + "en_GI": "inglise (Gibraltar)", + "en_GM": "inglise (Gambia)", + "en_GU": "inglise (Guam)", + "en_GY": "inglise (Guyana)", + "en_HK": "inglise (Hongkongi erihalduspiirkond)", + "en_IE": "inglise (Iirimaa)", + "en_IL": "inglise (Iisrael)", + "en_IM": "inglise (Mani saar)", + "en_IN": "inglise (India)", + "en_IO": "inglise (Briti India ookeani ala)", + "en_JE": "inglise (Jersey)", + "en_JM": "inglise (Jamaica)", + "en_KE": "inglise (Keenia)", + "en_KI": "inglise (Kiribati)", + "en_KN": "inglise (Saint Kitts ja Nevis)", + "en_KY": "inglise (Kaimanisaared)", + "en_LC": "inglise (Saint Lucia)", + "en_LR": "inglise (Libeeria)", + "en_LS": "inglise (Lesotho)", + "en_MG": "inglise (Madagaskar)", + "en_MH": "inglise (Marshalli Saared)", + "en_MO": "inglise (Macau erihalduspiirkond)", + "en_MP": "inglise (Põhja-Mariaanid)", + "en_MS": "inglise (Montserrat)", + "en_MT": "inglise (Malta)", + "en_MU": "inglise (Mauritius)", + "en_MW": "inglise (Malawi)", + "en_MY": "inglise (Malaisia)", + "en_NA": "inglise (Namiibia)", + "en_NF": "inglise (Norfolk)", + "en_NG": "inglise (Nigeeria)", + "en_NL": "inglise (Holland)", + "en_NR": "inglise (Nauru)", + "en_NU": "inglise (Niue)", + "en_NZ": "inglise (Uus-Meremaa)", + "en_PG": "inglise (Paapua Uus-Guinea)", + "en_PH": "inglise (Filipiinid)", + "en_PK": "inglise (Pakistan)", + "en_PN": "inglise (Pitcairni saared)", + "en_PR": "inglise (Puerto Rico)", + "en_PW": "inglise (Belau)", + "en_RW": "inglise (Rwanda)", + "en_SB": "inglise (Saalomoni Saared)", + "en_SC": "inglise (SeiÅ¡ellid)", + "en_SD": "inglise (Sudaan)", + "en_SE": "inglise (Rootsi)", + "en_SG": "inglise (Singapur)", + "en_SH": "inglise (Saint Helena)", + "en_SI": "inglise (Sloveenia)", + "en_SL": "inglise (Sierra Leone)", + "en_SS": "inglise (Lõuna-Sudaan)", + "en_SX": "inglise (Sint Maarten)", + "en_SZ": "inglise (Svaasimaa)", + "en_TC": "inglise (Turks ja Caicos)", + "en_TK": "inglise (Tokelau)", + "en_TO": "inglise (Tonga)", + "en_TT": "inglise (Trinidad ja Tobago)", + "en_TV": "inglise (Tuvalu)", + "en_TZ": "inglise (Tansaania)", + "en_UG": "inglise (Uganda)", + "en_UM": "inglise (Ühendriikide hajasaared)", + "en_US": "inglise (Ameerika Ühendriigid)", + "en_VC": "inglise (Saint Vincent ja Grenadiinid)", + "en_VG": "inglise (Briti Neitsisaared)", + "en_VI": "inglise (USA Neitsisaared)", + "en_VU": "inglise (Vanuatu)", + "en_WS": "inglise (Samoa)", + "en_ZA": "inglise (Lõuna-Aafrika Vabariik)", + "en_ZM": "inglise (Sambia)", + "en_ZW": "inglise (Zimbabwe)", + "eo": "esperanto", + "es": "hispaania", + "es_AR": "hispaania (Argentina)", + "es_BO": "hispaania (Boliivia)", + "es_BR": "hispaania (Brasiilia)", + "es_CL": "hispaania (TÅ¡iili)", + "es_CO": "hispaania (Colombia)", + "es_CR": "hispaania (Costa Rica)", + "es_CU": "hispaania (Kuuba)", + "es_DO": "hispaania (Dominikaani Vabariik)", + "es_EA": "hispaania (Ceuta ja Melilla)", + "es_EC": "hispaania (Ecuador)", + "es_ES": "hispaania (Hispaania)", + "es_GQ": "hispaania (Ekvatoriaal-Guinea)", + "es_GT": "hispaania (Guatemala)", + "es_HN": "hispaania (Honduras)", + "es_IC": "hispaania (Kanaari saared)", + "es_MX": "hispaania (Mehhiko)", + "es_NI": "hispaania (Nicaragua)", + "es_PA": "hispaania (Panama)", + "es_PE": "hispaania (Peruu)", + "es_PH": "hispaania (Filipiinid)", + "es_PR": "hispaania (Puerto Rico)", + "es_PY": "hispaania (Paraguay)", + "es_SV": "hispaania (El Salvador)", + "es_US": "hispaania (Ameerika Ühendriigid)", + "es_UY": "hispaania (Uruguay)", + "es_VE": "hispaania (Venezuela)", + "et": "eesti", + "et_EE": "eesti (Eesti)", + "eu": "baski", + "eu_ES": "baski (Hispaania)", + "fa": "pärsia", + "fa_AF": "pärsia (Afganistan)", + "fa_IR": "pärsia (Iraan)", + "ff": "fula", + "ff_CM": "fula (Kamerun)", + "ff_GN": "fula (Guinea)", + "ff_MR": "fula (Mauritaania)", + "ff_SN": "fula (Senegal)", + "fi": "soome", + "fi_FI": "soome (Soome)", + "fo": "fääri", + "fo_DK": "fääri (Taani)", + "fo_FO": "fääri (Fääri saared)", + "fr": "prantsuse", + "fr_BE": "prantsuse (Belgia)", + "fr_BF": "prantsuse (Burkina Faso)", + "fr_BI": "prantsuse (Burundi)", + "fr_BJ": "prantsuse (Benin)", + "fr_BL": "prantsuse (Saint Barthélemy)", + "fr_CA": "prantsuse (Kanada)", + "fr_CD": "prantsuse (Kongo DV)", + "fr_CF": "prantsuse (Kesk-Aafrika Vabariik)", + "fr_CG": "prantsuse (Kongo Vabariik)", + "fr_CH": "prantsuse (Å veits)", + "fr_CI": "prantsuse (Côte d’Ivoire)", + "fr_CM": "prantsuse (Kamerun)", + "fr_DJ": "prantsuse (Djibouti)", + "fr_DZ": "prantsuse (Alžeeria)", + "fr_FR": "prantsuse (Prantsusmaa)", + "fr_GA": "prantsuse (Gabon)", + "fr_GF": "prantsuse (Prantsuse Guajaana)", + "fr_GN": "prantsuse (Guinea)", + "fr_GP": "prantsuse (Guadeloupe)", + "fr_GQ": "prantsuse (Ekvatoriaal-Guinea)", + "fr_HT": "prantsuse (Haiti)", + "fr_KM": "prantsuse (Komoorid)", + "fr_LU": "prantsuse (Luksemburg)", + "fr_MA": "prantsuse (Maroko)", + "fr_MC": "prantsuse (Monaco)", + "fr_MF": "prantsuse (Saint-Martin)", + "fr_MG": "prantsuse (Madagaskar)", + "fr_ML": "prantsuse (Mali)", + "fr_MQ": "prantsuse (Martinique)", + "fr_MR": "prantsuse (Mauritaania)", + "fr_MU": "prantsuse (Mauritius)", + "fr_NC": "prantsuse (Uus-Kaledoonia)", + "fr_NE": "prantsuse (Niger)", + "fr_PF": "prantsuse (Prantsuse Polüneesia)", + "fr_PM": "prantsuse (Saint Pierre ja Miquelon)", + "fr_RE": "prantsuse (Réunion)", + "fr_RW": "prantsuse (Rwanda)", + "fr_SC": "prantsuse (SeiÅ¡ellid)", + "fr_SN": "prantsuse (Senegal)", + "fr_SY": "prantsuse (Süüria)", + "fr_TD": "prantsuse (TÅ¡aad)", + "fr_TG": "prantsuse (Togo)", + "fr_TN": "prantsuse (Tuneesia)", + "fr_VU": "prantsuse (Vanuatu)", + "fr_WF": "prantsuse (Wallis ja Futuna)", + "fr_YT": "prantsuse (Mayotte)", + "fy": "läänefriisi", + "fy_NL": "läänefriisi (Holland)", + "ga": "iiri", + "ga_IE": "iiri (Iirimaa)", + "gd": "gaeli", + "gd_GB": "gaeli (Suurbritannia)", + "gl": "galeegi", + "gl_ES": "galeegi (Hispaania)", + "gu": "gudžarati", + "gu_IN": "gudžarati (India)", + "gv": "mänksi", + "gv_IM": "mänksi (Mani saar)", + "ha": "hausa", + "ha_GH": "hausa (Ghana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigeeria)", + "he": "heebrea", + "he_IL": "heebrea (Iisrael)", + "hi": "hindi", + "hi_IN": "hindi (India)", + "hr": "horvaadi", + "hr_BA": "horvaadi (Bosnia ja Hertsegoviina)", + "hr_HR": "horvaadi (Horvaatia)", + "hu": "ungari", + "hu_HU": "ungari (Ungari)", + "hy": "armeenia", + "hy_AM": "armeenia (Armeenia)", + "id": "indoneesia", + "id_ID": "indoneesia (Indoneesia)", + "ig": "ibo", + "ig_NG": "ibo (Nigeeria)", + "ii": "Sichuani jii", + "ii_CN": "Sichuani jii (Hiina)", + "is": "islandi", + "is_IS": "islandi (Island)", + "it": "itaalia", + "it_CH": "itaalia (Å veits)", + "it_IT": "itaalia (Itaalia)", + "it_SM": "itaalia (San Marino)", + "ja": "jaapani", + "ja_JP": "jaapani (Jaapan)", + "ka": "gruusia", + "ka_GE": "gruusia (Gruusia)", + "ki": "kikuju", + "ki_KE": "kikuju (Keenia)", + "kk": "kasahhi", + "kk_KZ": "kasahhi (Kasahstan)", + "kl": "grööni", + "kl_GL": "grööni (Gröönimaa)", + "km": "khmeeri", + "km_KH": "khmeeri (Kambodža)", + "kn": "kannada", + "kn_IN": "kannada (India)", + "ko": "korea", + "ko_KP": "korea (Põhja-Korea)", + "ko_KR": "korea (Lõuna-Korea)", + "ks": "kaÅ¡miiri", + "ks_IN": "kaÅ¡miiri (India)", + "kw": "korni", + "kw_GB": "korni (Suurbritannia)", + "ky": "kirgiisi", + "ky_KG": "kirgiisi (Kõrgõzstan)", + "lb": "letseburgi", + "lb_LU": "letseburgi (Luksemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongo DV)", + "ln_CF": "lingala (Kesk-Aafrika Vabariik)", + "ln_CG": "lingala (Kongo Vabariik)", + "lo": "lao", + "lo_LA": "lao (Laos)", + "lt": "leedu", + "lt_LT": "leedu (Leedu)", + "lu": "luba", + "lu_CD": "luba (Kongo DV)", + "lv": "läti", + "lv_LV": "läti (Läti)", + "mg": "malagassi", + "mg_MG": "malagassi (Madagaskar)", + "mk": "makedoonia", + "mk_MK": "makedoonia (Makedoonia)", + "ml": "malajalami", + "ml_IN": "malajalami (India)", + "mn": "mongoli", + "mn_MN": "mongoli (Mongoolia)", + "mr": "marathi", + "mr_IN": "marathi (India)", + "ms": "malai", + "ms_BN": "malai (Brunei)", + "ms_MY": "malai (Malaisia)", + "ms_SG": "malai (Singapur)", + "mt": "malta", + "mt_MT": "malta (Malta)", + "my": "birma", + "my_MM": "birma (Myanmar (Birma))", + "nb": "norra bokmÃ¥l", + "nb_NO": "norra bokmÃ¥l (Norra)", + "nb_SJ": "norra bokmÃ¥l (Svalbard ja Jan Mayen)", + "nd": "põhjandebele", + "nd_ZW": "põhjandebele (Zimbabwe)", + "ne": "nepali", + "ne_IN": "nepali (India)", + "ne_NP": "nepali (Nepal)", + "nl": "hollandi", + "nl_AW": "hollandi (Aruba)", + "nl_BE": "hollandi (Belgia)", + "nl_BQ": "hollandi (Hollandi Kariibi mere saared)", + "nl_CW": "hollandi (Curaçao)", + "nl_NL": "hollandi (Holland)", + "nl_SR": "hollandi (Suriname)", + "nl_SX": "hollandi (Sint Maarten)", + "nn": "uusnorra", + "nn_NO": "uusnorra (Norra)", + "no": "norra", + "no_NO": "norra (Norra)", + "om": "oromo", + "om_ET": "oromo (Etioopia)", + "om_KE": "oromo (Keenia)", + "or": "oria", + "or_IN": "oria (India)", + "os": "osseedi", + "os_GE": "osseedi (Gruusia)", + "os_RU": "osseedi (Venemaa)", + "pa": "pandžabi", + "pa_Arab": "pandžabi (araabia)", + "pa_Arab_PK": "pandžabi (araabia, Pakistan)", + "pa_Guru": "pandžabi (gurmukhi)", + "pa_Guru_IN": "pandžabi (gurmukhi, India)", + "pa_IN": "pandžabi (India)", + "pa_PK": "pandžabi (Pakistan)", + "pl": "poola", + "pl_PL": "poola (Poola)", + "ps": "puÅ¡tu", + "ps_AF": "puÅ¡tu (Afganistan)", + "pt": "portugali", + "pt_AO": "portugali (Angola)", + "pt_BR": "portugali (Brasiilia)", + "pt_CH": "portugali (Å veits)", + "pt_CV": "portugali (Roheneemesaared)", + "pt_GQ": "portugali (Ekvatoriaal-Guinea)", + "pt_GW": "portugali (Guinea-Bissau)", + "pt_LU": "portugali (Luksemburg)", + "pt_MO": "portugali (Macau erihalduspiirkond)", + "pt_MZ": "portugali (Mosambiik)", + "pt_PT": "portugali (Portugal)", + "pt_ST": "portugali (São Tomé ja Príncipe)", + "pt_TL": "portugali (Ida-Timor)", + "qu": "ketÅ¡ua", + "qu_BO": "ketÅ¡ua (Boliivia)", + "qu_EC": "ketÅ¡ua (Ecuador)", + "qu_PE": "ketÅ¡ua (Peruu)", + "rm": "romanÅ¡i", + "rm_CH": "romanÅ¡i (Å veits)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumeenia", + "ro_MD": "rumeenia (Moldova)", + "ro_RO": "rumeenia (Rumeenia)", + "ru": "vene", + "ru_BY": "vene (Valgevene)", + "ru_KG": "vene (Kõrgõzstan)", + "ru_KZ": "vene (Kasahstan)", + "ru_MD": "vene (Moldova)", + "ru_RU": "vene (Venemaa)", + "ru_UA": "vene (Ukraina)", + "rw": "ruanda", + "rw_RW": "ruanda (Rwanda)", + "se": "põhjasaami", + "se_FI": "põhjasaami (Soome)", + "se_NO": "põhjasaami (Norra)", + "se_SE": "põhjasaami (Rootsi)", + "sg": "sango", + "sg_CF": "sango (Kesk-Aafrika Vabariik)", + "sh": "serbia-horvaadi", + "sh_BA": "serbia-horvaadi (Bosnia ja Hertsegoviina)", + "si": "singali", + "si_LK": "singali (Sri Lanka)", + "sk": "slovaki", + "sk_SK": "slovaki (Slovakkia)", + "sl": "sloveeni", + "sl_SI": "sloveeni (Sloveenia)", + "sn": "Å¡ona", + "sn_ZW": "Å¡ona (Zimbabwe)", + "so": "somaali", + "so_DJ": "somaali (Djibouti)", + "so_ET": "somaali (Etioopia)", + "so_KE": "somaali (Keenia)", + "so_SO": "somaali (Somaalia)", + "sq": "albaania", + "sq_AL": "albaania (Albaania)", + "sq_MK": "albaania (Makedoonia)", + "sq_XK": "albaania (Kosovo)", + "sr": "serbia", + "sr_BA": "serbia (Bosnia ja Hertsegoviina)", + "sr_Cyrl": "serbia (kirillitsa)", + "sr_Cyrl_BA": "serbia (kirillitsa, Bosnia ja Hertsegoviina)", + "sr_Cyrl_ME": "serbia (kirillitsa, Montenegro)", + "sr_Cyrl_RS": "serbia (kirillitsa, Serbia)", + "sr_Cyrl_XK": "serbia (kirillitsa, Kosovo)", + "sr_Latn": "serbia (ladina)", + "sr_Latn_BA": "serbia (ladina, Bosnia ja Hertsegoviina)", + "sr_Latn_ME": "serbia (ladina, Montenegro)", + "sr_Latn_RS": "serbia (ladina, Serbia)", + "sr_Latn_XK": "serbia (ladina, Kosovo)", + "sr_ME": "serbia (Montenegro)", + "sr_RS": "serbia (Serbia)", + "sr_XK": "serbia (Kosovo)", + "sv": "rootsi", + "sv_AX": "rootsi (Ahvenamaa)", + "sv_FI": "rootsi (Soome)", + "sv_SE": "rootsi (Rootsi)", + "sw": "suahiili", + "sw_CD": "suahiili (Kongo DV)", + "sw_KE": "suahiili (Keenia)", + "sw_TZ": "suahiili (Tansaania)", + "sw_UG": "suahiili (Uganda)", + "ta": "tamili", + "ta_IN": "tamili (India)", + "ta_LK": "tamili (Sri Lanka)", + "ta_MY": "tamili (Malaisia)", + "ta_SG": "tamili (Singapur)", + "te": "telugu", + "te_IN": "telugu (India)", + "th": "tai", + "th_TH": "tai (Tai)", + "ti": "tigrinja", + "ti_ER": "tigrinja (Eritrea)", + "ti_ET": "tigrinja (Etioopia)", + "tl": "tagalogi", + "tl_PH": "tagalogi (Filipiinid)", + "to": "tonga", + "to_TO": "tonga (Tonga)", + "tr": "türgi", + "tr_CY": "türgi (Küpros)", + "tr_TR": "türgi (Türgi)", + "ug": "uiguuri", + "ug_CN": "uiguuri (Hiina)", + "uk": "ukraina", + "uk_UA": "ukraina (Ukraina)", + "ur": "urdu", + "ur_IN": "urdu (India)", + "ur_PK": "urdu (Pakistan)", + "uz": "usbeki", + "uz_AF": "usbeki (Afganistan)", + "uz_Arab": "usbeki (araabia)", + "uz_Arab_AF": "usbeki (araabia, Afganistan)", + "uz_Cyrl": "usbeki (kirillitsa)", + "uz_Cyrl_UZ": "usbeki (kirillitsa, Usbekistan)", + "uz_Latn": "usbeki (ladina)", + "uz_Latn_UZ": "usbeki (ladina, Usbekistan)", + "uz_UZ": "usbeki (Usbekistan)", + "vi": "vietnami", + "vi_VN": "vietnami (Vietnam)", + "yi": "jidiÅ¡i", + "yo": "joruba", + "yo_BJ": "joruba (Benin)", + "yo_NG": "joruba (Nigeeria)", + "zh": "hiina", + "zh_CN": "hiina (Hiina)", + "zh_HK": "hiina (Hongkongi erihalduspiirkond)", + "zh_Hans": "hiina (lihtsustatud)", + "zh_Hans_CN": "hiina (lihtsustatud, Hiina)", + "zh_Hans_HK": "hiina (lihtsustatud, Hongkongi erihalduspiirkond)", + "zh_Hans_MO": "hiina (lihtsustatud, Macau erihalduspiirkond)", + "zh_Hans_SG": "hiina (lihtsustatud, Singapur)", + "zh_Hant": "hiina (traditsiooniline)", + "zh_Hant_HK": "hiina (traditsiooniline, Hongkongi erihalduspiirkond)", + "zh_Hant_MO": "hiina (traditsiooniline, Macau erihalduspiirkond)", + "zh_Hant_TW": "hiina (traditsiooniline, Taiwan)", + "zh_MO": "hiina (Macau erihalduspiirkond)", + "zh_SG": "hiina (Singapur)", + "zh_TW": "hiina (Taiwan)", + "zu": "suulu", + "zu_ZA": "suulu (Lõuna-Aafrika Vabariik)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/eu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/eu.json new file mode 100644 index 0000000000000000000000000000000000000000..595e4795136753178137e7fcc3e672651120d5a1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/eu.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaansa", + "af_NA": "afrikaansa (Namibia)", + "af_ZA": "afrikaansa (Hegoafrika)", + "ak": "akanera", + "ak_GH": "akanera (Ghana)", + "am": "amharera", + "am_ET": "amharera (Etiopia)", + "ar": "arabiera", + "ar_AE": "arabiera (Arabiar Emirerri Batuak)", + "ar_BH": "arabiera (Bahrain)", + "ar_DJ": "arabiera (Djibuti)", + "ar_DZ": "arabiera (Aljeria)", + "ar_EG": "arabiera (Egipto)", + "ar_EH": "arabiera (Mendebaldeko Sahara)", + "ar_ER": "arabiera (Eritrea)", + "ar_IL": "arabiera (Israel)", + "ar_IQ": "arabiera (Irak)", + "ar_JO": "arabiera (Jordania)", + "ar_KM": "arabiera (Komoreak)", + "ar_KW": "arabiera (Kuwait)", + "ar_LB": "arabiera (Libano)", + "ar_LY": "arabiera (Libia)", + "ar_MA": "arabiera (Maroko)", + "ar_MR": "arabiera (Mauritania)", + "ar_OM": "arabiera (Oman)", + "ar_PS": "arabiera (Palestinako Lurraldeak)", + "ar_QA": "arabiera (Qatar)", + "ar_SA": "arabiera (Saudi Arabia)", + "ar_SD": "arabiera (Sudan)", + "ar_SO": "arabiera (Somalia)", + "ar_SS": "arabiera (Hego Sudan)", + "ar_SY": "arabiera (Siria)", + "ar_TD": "arabiera (Txad)", + "ar_TN": "arabiera (Tunisia)", + "ar_YE": "arabiera (Yemen)", + "as": "assamera", + "as_IN": "assamera (India)", + "az": "azerbaijanera", + "az_AZ": "azerbaijanera (Azerbaijan)", + "az_Cyrl": "azerbaijanera (zirilikoa)", + "az_Cyrl_AZ": "azerbaijanera (zirilikoa, Azerbaijan)", + "az_Latn": "azerbaijanera (latina)", + "az_Latn_AZ": "azerbaijanera (latina, Azerbaijan)", + "be": "bielorrusiera", + "be_BY": "bielorrusiera (Bielorrusia)", + "bg": "bulgariera", + "bg_BG": "bulgariera (Bulgaria)", + "bm": "bambarera", + "bm_ML": "bambarera (Mali)", + "bn": "bengalera", + "bn_BD": "bengalera (Bangladesh)", + "bn_IN": "bengalera (India)", + "bo": "tibetera", + "bo_CN": "tibetera (Txina)", + "bo_IN": "tibetera (India)", + "br": "bretoiera", + "br_FR": "bretoiera (Frantzia)", + "bs": "bosniera", + "bs_BA": "bosniera (Bosnia-Herzegovina)", + "bs_Cyrl": "bosniera (zirilikoa)", + "bs_Cyrl_BA": "bosniera (zirilikoa, Bosnia-Herzegovina)", + "bs_Latn": "bosniera (latina)", + "bs_Latn_BA": "bosniera (latina, Bosnia-Herzegovina)", + "ca": "katalana", + "ca_AD": "katalana (Andorra)", + "ca_ES": "katalana (Espainia)", + "ca_FR": "katalana (Frantzia)", + "ca_IT": "katalana (Italia)", + "ce": "txetxeniera", + "ce_RU": "txetxeniera (Errusia)", + "cs": "txekiera", + "cs_CZ": "txekiera (Txekiar Errepublika)", + "cy": "galesera", + "cy_GB": "galesera (Erresuma Batua)", + "da": "daniera", + "da_DK": "daniera (Danimarka)", + "da_GL": "daniera (Groenlandia)", + "de": "alemana", + "de_AT": "alemana (Austria)", + "de_BE": "alemana (Belgika)", + "de_CH": "alemana (Suitza)", + "de_DE": "alemana (Alemania)", + "de_IT": "alemana (Italia)", + "de_LI": "alemana (Liechtenstein)", + "de_LU": "alemana (Luxenburgo)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhutan)", + "ee": "eweera", + "ee_GH": "eweera (Ghana)", + "ee_TG": "eweera (Togo)", + "el": "greziera", + "el_CY": "greziera (Zipre)", + "el_GR": "greziera (Grezia)", + "en": "ingelesa", + "en_AG": "ingelesa (Antigua eta Barbuda)", + "en_AI": "ingelesa (Angila)", + "en_AS": "ingelesa (Amerikar Samoa)", + "en_AT": "ingelesa (Austria)", + "en_AU": "ingelesa (Australia)", + "en_BB": "ingelesa (Barbados)", + "en_BE": "ingelesa (Belgika)", + "en_BI": "ingelesa (Burundi)", + "en_BM": "ingelesa (Bermuda)", + "en_BS": "ingelesa (Bahamak)", + "en_BW": "ingelesa (Botswana)", + "en_BZ": "ingelesa (Belize)", + "en_CA": "ingelesa (Kanada)", + "en_CC": "ingelesa (Cocos uharteak)", + "en_CH": "ingelesa (Suitza)", + "en_CK": "ingelesa (Cook uharteak)", + "en_CM": "ingelesa (Kamerun)", + "en_CX": "ingelesa (Christmas uhartea)", + "en_CY": "ingelesa (Zipre)", + "en_DE": "ingelesa (Alemania)", + "en_DG": "ingelesa (Diego Garcia)", + "en_DK": "ingelesa (Danimarka)", + "en_DM": "ingelesa (Dominika)", + "en_ER": "ingelesa (Eritrea)", + "en_FI": "ingelesa (Finlandia)", + "en_FJ": "ingelesa (Fiji)", + "en_FK": "ingelesa (Malvinak)", + "en_FM": "ingelesa (Mikronesia)", + "en_GB": "ingelesa (Erresuma Batua)", + "en_GD": "ingelesa (Grenada)", + "en_GG": "ingelesa (Guernesey)", + "en_GH": "ingelesa (Ghana)", + "en_GI": "ingelesa (Gibraltar)", + "en_GM": "ingelesa (Gambia)", + "en_GU": "ingelesa (Guam)", + "en_GY": "ingelesa (Guyana)", + "en_HK": "ingelesa (Hong Kong AEB Txina)", + "en_IE": "ingelesa (Irlanda)", + "en_IL": "ingelesa (Israel)", + "en_IM": "ingelesa (Man uhartea)", + "en_IN": "ingelesa (India)", + "en_IO": "ingelesa (Indiako Ozeanoko lurralde britainiarra)", + "en_JE": "ingelesa (Jersey)", + "en_JM": "ingelesa (Jamaika)", + "en_KE": "ingelesa (Kenya)", + "en_KI": "ingelesa (Kiribati)", + "en_KN": "ingelesa (Saint Kitts eta Nevis)", + "en_KY": "ingelesa (Kaiman uharteak)", + "en_LC": "ingelesa (Santa Luzia)", + "en_LR": "ingelesa (Liberia)", + "en_LS": "ingelesa (Lesotho)", + "en_MG": "ingelesa (Madagaskar)", + "en_MH": "ingelesa (Marshall uharteak)", + "en_MO": "ingelesa (Macau AEB Txina)", + "en_MP": "ingelesa (Iparraldeko Mariana uharteak)", + "en_MS": "ingelesa (Montserrat)", + "en_MT": "ingelesa (Malta)", + "en_MU": "ingelesa (Maurizio)", + "en_MW": "ingelesa (Malawi)", + "en_MY": "ingelesa (Malaysia)", + "en_NA": "ingelesa (Namibia)", + "en_NF": "ingelesa (Norfolk uhartea)", + "en_NG": "ingelesa (Nigeria)", + "en_NL": "ingelesa (Herbehereak)", + "en_NR": "ingelesa (Nauru)", + "en_NU": "ingelesa (Niue)", + "en_NZ": "ingelesa (Zeelanda Berria)", + "en_PG": "ingelesa (Papua Ginea Berria)", + "en_PH": "ingelesa (Filipinak)", + "en_PK": "ingelesa (Pakistan)", + "en_PN": "ingelesa (Pitcairn uharteak)", + "en_PR": "ingelesa (Puerto Rico)", + "en_PW": "ingelesa (Palau)", + "en_RW": "ingelesa (Ruanda)", + "en_SB": "ingelesa (Salomon uharteak)", + "en_SC": "ingelesa (Seychelleak)", + "en_SD": "ingelesa (Sudan)", + "en_SE": "ingelesa (Suedia)", + "en_SG": "ingelesa (Singapur)", + "en_SH": "ingelesa (Santa Helena)", + "en_SI": "ingelesa (Eslovenia)", + "en_SL": "ingelesa (Sierra Leona)", + "en_SS": "ingelesa (Hego Sudan)", + "en_SX": "ingelesa (Sint Maarten)", + "en_SZ": "ingelesa (Swazilandia)", + "en_TC": "ingelesa (Turk eta Caico uharteak)", + "en_TK": "ingelesa (Tokelau)", + "en_TO": "ingelesa (Tonga)", + "en_TT": "ingelesa (Trinidad eta Tobago)", + "en_TV": "ingelesa (Tuvalu)", + "en_TZ": "ingelesa (Tanzania)", + "en_UG": "ingelesa (Uganda)", + "en_UM": "ingelesa (Ameriketako Estatu Batuetako Kanpoaldeko Uharte Txikiak)", + "en_US": "ingelesa (Ameriketako Estatu Batuak)", + "en_VC": "ingelesa (Saint Vincent eta Grenadinak)", + "en_VG": "ingelesa (Birjina uharte britainiarrak)", + "en_VI": "ingelesa (Birjina uharte amerikarrak)", + "en_VU": "ingelesa (Vanuatu)", + "en_WS": "ingelesa (Samoa)", + "en_ZA": "ingelesa (Hegoafrika)", + "en_ZM": "ingelesa (Zambia)", + "en_ZW": "ingelesa (Zimbabwe)", + "eo": "esperantoa", + "es": "espainiera", + "es_AR": "espainiera (Argentina)", + "es_BO": "espainiera (Bolivia)", + "es_BR": "espainiera (Brasil)", + "es_CL": "espainiera (Txile)", + "es_CO": "espainiera (Kolonbia)", + "es_CR": "espainiera (Costa Rica)", + "es_CU": "espainiera (Kuba)", + "es_DO": "espainiera (Dominikar Errepublika)", + "es_EA": "espainiera (Ceuta eta Melilla)", + "es_EC": "espainiera (Ekuador)", + "es_ES": "espainiera (Espainia)", + "es_GQ": "espainiera (Ekuatore Ginea)", + "es_GT": "espainiera (Guatemala)", + "es_HN": "espainiera (Honduras)", + "es_IC": "espainiera (Kanariak)", + "es_MX": "espainiera (Mexiko)", + "es_NI": "espainiera (Nikaragua)", + "es_PA": "espainiera (Panama)", + "es_PE": "espainiera (Peru)", + "es_PH": "espainiera (Filipinak)", + "es_PR": "espainiera (Puerto Rico)", + "es_PY": "espainiera (Paraguai)", + "es_SV": "espainiera (El Salvador)", + "es_US": "espainiera (Ameriketako Estatu Batuak)", + "es_UY": "espainiera (Uruguai)", + "es_VE": "espainiera (Venezuela)", + "et": "estoniera", + "et_EE": "estoniera (Estonia)", + "eu": "euskara", + "eu_ES": "euskara (Espainia)", + "fa": "persiera", + "fa_AF": "persiera (Afganistan)", + "fa_IR": "persiera (Iran)", + "ff": "fula", + "ff_CM": "fula (Kamerun)", + "ff_GN": "fula (Ginea)", + "ff_MR": "fula (Mauritania)", + "ff_SN": "fula (Senegal)", + "fi": "finlandiera", + "fi_FI": "finlandiera (Finlandia)", + "fo": "faroera", + "fo_DK": "faroera (Danimarka)", + "fo_FO": "faroera (Faroe uharteak)", + "fr": "frantsesa", + "fr_BE": "frantsesa (Belgika)", + "fr_BF": "frantsesa (Burkina Faso)", + "fr_BI": "frantsesa (Burundi)", + "fr_BJ": "frantsesa (Benin)", + "fr_BL": "frantsesa (Saint Barthélemy)", + "fr_CA": "frantsesa (Kanada)", + "fr_CD": "frantsesa (Kongoko Errepublika Demokratikoa)", + "fr_CF": "frantsesa (Afrika Erdiko Errepublika)", + "fr_CG": "frantsesa (Kongo (Brazzaville))", + "fr_CH": "frantsesa (Suitza)", + "fr_CI": "frantsesa (Boli Kosta)", + "fr_CM": "frantsesa (Kamerun)", + "fr_DJ": "frantsesa (Djibuti)", + "fr_DZ": "frantsesa (Aljeria)", + "fr_FR": "frantsesa (Frantzia)", + "fr_GA": "frantsesa (Gabon)", + "fr_GF": "frantsesa (Guyana Frantsesa)", + "fr_GN": "frantsesa (Ginea)", + "fr_GP": "frantsesa (Guadalupe)", + "fr_GQ": "frantsesa (Ekuatore Ginea)", + "fr_HT": "frantsesa (Haiti)", + "fr_KM": "frantsesa (Komoreak)", + "fr_LU": "frantsesa (Luxenburgo)", + "fr_MA": "frantsesa (Maroko)", + "fr_MC": "frantsesa (Monako)", + "fr_MF": "frantsesa (San Martin)", + "fr_MG": "frantsesa (Madagaskar)", + "fr_ML": "frantsesa (Mali)", + "fr_MQ": "frantsesa (Martinika)", + "fr_MR": "frantsesa (Mauritania)", + "fr_MU": "frantsesa (Maurizio)", + "fr_NC": "frantsesa (Kaledonia Berria)", + "fr_NE": "frantsesa (Niger)", + "fr_PF": "frantsesa (Polinesia Frantsesa)", + "fr_PM": "frantsesa (Saint-Pierre eta Mikelune)", + "fr_RE": "frantsesa (Reunion)", + "fr_RW": "frantsesa (Ruanda)", + "fr_SC": "frantsesa (Seychelleak)", + "fr_SN": "frantsesa (Senegal)", + "fr_SY": "frantsesa (Siria)", + "fr_TD": "frantsesa (Txad)", + "fr_TG": "frantsesa (Togo)", + "fr_TN": "frantsesa (Tunisia)", + "fr_VU": "frantsesa (Vanuatu)", + "fr_WF": "frantsesa (Wallis eta Futuna)", + "fr_YT": "frantsesa (Mayotte)", + "fy": "frisiera", + "fy_NL": "frisiera (Herbehereak)", + "ga": "gaelikoa", + "ga_IE": "gaelikoa (Irlanda)", + "gd": "eskoziako gaelikoa", + "gd_GB": "eskoziako gaelikoa (Erresuma Batua)", + "gl": "galiziera", + "gl_ES": "galiziera (Espainia)", + "gu": "gujaratera", + "gu_IN": "gujaratera (India)", + "gv": "manxera", + "gv_IM": "manxera (Man uhartea)", + "ha": "hausa", + "ha_GH": "hausa (Ghana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigeria)", + "he": "hebreera", + "he_IL": "hebreera (Israel)", + "hi": "hindia", + "hi_IN": "hindia (India)", + "hr": "kroaziera", + "hr_BA": "kroaziera (Bosnia-Herzegovina)", + "hr_HR": "kroaziera (Kroazia)", + "hu": "hungariera", + "hu_HU": "hungariera (Hungaria)", + "hy": "armeniera", + "hy_AM": "armeniera (Armenia)", + "id": "indonesiera", + "id_ID": "indonesiera (Indonesia)", + "ig": "igboera", + "ig_NG": "igboera (Nigeria)", + "ii": "sichuan yia", + "ii_CN": "sichuan yia (Txina)", + "is": "islandiera", + "is_IS": "islandiera (Islandia)", + "it": "italiera", + "it_CH": "italiera (Suitza)", + "it_IT": "italiera (Italia)", + "it_SM": "italiera (San Marino)", + "ja": "japoniera", + "ja_JP": "japoniera (Japonia)", + "ka": "georgiera", + "ka_GE": "georgiera (Georgia)", + "ki": "kikuyuera", + "ki_KE": "kikuyuera (Kenya)", + "kk": "kazakhera", + "kk_KZ": "kazakhera (Kazakhstan)", + "kl": "kalaallisutera", + "kl_GL": "kalaallisutera (Groenlandia)", + "km": "khemerera", + "km_KH": "khemerera (Kanbodia)", + "kn": "kannadera", + "kn_IN": "kannadera (India)", + "ko": "koreera", + "ko_KP": "koreera (Ipar Korea)", + "ko_KR": "koreera (Hego Korea)", + "ks": "kashmirera", + "ks_IN": "kashmirera (India)", + "kw": "kornubiera", + "kw_GB": "kornubiera (Erresuma Batua)", + "ky": "kirgizera", + "ky_KG": "kirgizera (Kirgizistan)", + "lb": "luxenburgera", + "lb_LU": "luxenburgera (Luxenburgo)", + "lg": "gandera", + "lg_UG": "gandera (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongoko Errepublika Demokratikoa)", + "ln_CF": "lingala (Afrika Erdiko Errepublika)", + "ln_CG": "lingala (Kongo (Brazzaville))", + "lo": "laosera", + "lo_LA": "laosera (Laos)", + "lt": "lituaniera", + "lt_LT": "lituaniera (Lituania)", + "lu": "luba-katangera", + "lu_CD": "luba-katangera (Kongoko Errepublika Demokratikoa)", + "lv": "letoniera", + "lv_LV": "letoniera (Letonia)", + "mg": "malagasyera", + "mg_MG": "malagasyera (Madagaskar)", + "mk": "mazedoniera", + "mk_MK": "mazedoniera (Mazedonia)", + "ml": "malayalamera", + "ml_IN": "malayalamera (India)", + "mn": "mongoliera", + "mn_MN": "mongoliera (Mongolia)", + "mr": "marathera", + "mr_IN": "marathera (India)", + "ms": "malaysiera", + "ms_BN": "malaysiera (Brunei)", + "ms_MY": "malaysiera (Malaysia)", + "ms_SG": "malaysiera (Singapur)", + "mt": "maltera", + "mt_MT": "maltera (Malta)", + "my": "burmatarra", + "my_MM": "burmatarra (Myanmar (Birmania))", + "nb": "bokmala (Norvegia)", + "nb_NO": "bokmala (Norvegia)", + "nb_SJ": "bokmala (Svalbard eta Jan Mayen uharteak)", + "nd": "iparraldeko ndebeleera", + "nd_ZW": "iparraldeko ndebeleera (Zimbabwe)", + "ne": "nepalera", + "ne_IN": "nepalera (India)", + "ne_NP": "nepalera (Nepal)", + "nl": "nederlandera", + "nl_AW": "nederlandera (Aruba)", + "nl_BE": "nederlandera (Belgika)", + "nl_BQ": "nederlandera (Karibeko Herbehereak)", + "nl_CW": "nederlandera (Curaçao)", + "nl_NL": "nederlandera (Herbehereak)", + "nl_SR": "nederlandera (Surinam)", + "nl_SX": "nederlandera (Sint Maarten)", + "nn": "nynorsk norvegiera", + "nn_NO": "nynorsk norvegiera (Norvegia)", + "no": "norvegiera", + "no_NO": "norvegiera (Norvegia)", + "om": "oromoera", + "om_ET": "oromoera (Etiopia)", + "om_KE": "oromoera (Kenya)", + "or": "oriya", + "or_IN": "oriya (India)", + "os": "osetiera", + "os_GE": "osetiera (Georgia)", + "os_RU": "osetiera (Errusia)", + "pa": "punjabera", + "pa_Arab": "punjabera (arabiarra)", + "pa_Arab_PK": "punjabera (arabiarra, Pakistan)", + "pa_Guru": "punjabera (gurmukhia)", + "pa_Guru_IN": "punjabera (gurmukhia, India)", + "pa_IN": "punjabera (India)", + "pa_PK": "punjabera (Pakistan)", + "pl": "poloniera", + "pl_PL": "poloniera (Polonia)", + "ps": "paxtuera", + "ps_AF": "paxtuera (Afganistan)", + "pt": "portugesa", + "pt_AO": "portugesa (Angola)", + "pt_BR": "portugesa (Brasil)", + "pt_CH": "portugesa (Suitza)", + "pt_CV": "portugesa (Cabo Verde)", + "pt_GQ": "portugesa (Ekuatore Ginea)", + "pt_GW": "portugesa (Ginea-Bissau)", + "pt_LU": "portugesa (Luxenburgo)", + "pt_MO": "portugesa (Macau AEB Txina)", + "pt_MZ": "portugesa (Mozambike)", + "pt_PT": "portugesa (Portugal)", + "pt_ST": "portugesa (Sao Tome eta Principe)", + "pt_TL": "portugesa (Ekialdeko Timor)", + "qu": "quechuera", + "qu_BO": "quechuera (Bolivia)", + "qu_EC": "quechuera (Ekuador)", + "qu_PE": "quechuera (Peru)", + "rm": "erromantxera", + "rm_CH": "erromantxera (Suitza)", + "rn": "rundiera", + "rn_BI": "rundiera (Burundi)", + "ro": "errumaniera", + "ro_MD": "errumaniera (Moldavia)", + "ro_RO": "errumaniera (Errumania)", + "ru": "errusiera", + "ru_BY": "errusiera (Bielorrusia)", + "ru_KG": "errusiera (Kirgizistan)", + "ru_KZ": "errusiera (Kazakhstan)", + "ru_MD": "errusiera (Moldavia)", + "ru_RU": "errusiera (Errusia)", + "ru_UA": "errusiera (Ukraina)", + "rw": "kinyaruanda", + "rw_RW": "kinyaruanda (Ruanda)", + "se": "iparraldeko samiera", + "se_FI": "iparraldeko samiera (Finlandia)", + "se_NO": "iparraldeko samiera (Norvegia)", + "se_SE": "iparraldeko samiera (Suedia)", + "sg": "sangoera", + "sg_CF": "sangoera (Afrika Erdiko Errepublika)", + "sh": "serbokroaziera", + "sh_BA": "serbokroaziera (Bosnia-Herzegovina)", + "si": "sinhala", + "si_LK": "sinhala (Sri Lanka)", + "sk": "eslovakiera", + "sk_SK": "eslovakiera (Eslovakia)", + "sl": "esloveniera", + "sl_SI": "esloveniera (Eslovenia)", + "sn": "shonera", + "sn_ZW": "shonera (Zimbabwe)", + "so": "somaliera", + "so_DJ": "somaliera (Djibuti)", + "so_ET": "somaliera (Etiopia)", + "so_KE": "somaliera (Kenya)", + "so_SO": "somaliera (Somalia)", + "sq": "albaniera", + "sq_AL": "albaniera (Albania)", + "sq_MK": "albaniera (Mazedonia)", + "sq_XK": "albaniera (Kosovo)", + "sr": "serbiera", + "sr_BA": "serbiera (Bosnia-Herzegovina)", + "sr_Cyrl": "serbiera (zirilikoa)", + "sr_Cyrl_BA": "serbiera (zirilikoa, Bosnia-Herzegovina)", + "sr_Cyrl_ME": "serbiera (zirilikoa, Montenegro)", + "sr_Cyrl_RS": "serbiera (zirilikoa, Serbia)", + "sr_Cyrl_XK": "serbiera (zirilikoa, Kosovo)", + "sr_Latn": "serbiera (latina)", + "sr_Latn_BA": "serbiera (latina, Bosnia-Herzegovina)", + "sr_Latn_ME": "serbiera (latina, Montenegro)", + "sr_Latn_RS": "serbiera (latina, Serbia)", + "sr_Latn_XK": "serbiera (latina, Kosovo)", + "sr_ME": "serbiera (Montenegro)", + "sr_RS": "serbiera (Serbia)", + "sr_XK": "serbiera (Kosovo)", + "sv": "suediera", + "sv_AX": "suediera (Aland uharteak)", + "sv_FI": "suediera (Finlandia)", + "sv_SE": "suediera (Suedia)", + "sw": "swahili", + "sw_CD": "swahili (Kongoko Errepublika Demokratikoa)", + "sw_KE": "swahili (Kenya)", + "sw_TZ": "swahili (Tanzania)", + "sw_UG": "swahili (Uganda)", + "ta": "tamilera", + "ta_IN": "tamilera (India)", + "ta_LK": "tamilera (Sri Lanka)", + "ta_MY": "tamilera (Malaysia)", + "ta_SG": "tamilera (Singapur)", + "te": "teluguera", + "te_IN": "teluguera (India)", + "th": "thailandiera", + "th_TH": "thailandiera (Thailandia)", + "ti": "tigriñera", + "ti_ER": "tigriñera (Eritrea)", + "ti_ET": "tigriñera (Etiopia)", + "tl": "tagalog", + "tl_PH": "tagalog (Filipinak)", + "to": "tongera", + "to_TO": "tongera (Tonga)", + "tr": "turkiera", + "tr_CY": "turkiera (Zipre)", + "tr_TR": "turkiera (Turkia)", + "ug": "uigurrera", + "ug_CN": "uigurrera (Txina)", + "uk": "ukrainera", + "uk_UA": "ukrainera (Ukraina)", + "ur": "urdua", + "ur_IN": "urdua (India)", + "ur_PK": "urdua (Pakistan)", + "uz": "uzbekera", + "uz_AF": "uzbekera (Afganistan)", + "uz_Arab": "uzbekera (arabiarra)", + "uz_Arab_AF": "uzbekera (arabiarra, Afganistan)", + "uz_Cyrl": "uzbekera (zirilikoa)", + "uz_Cyrl_UZ": "uzbekera (zirilikoa, Uzbekistan)", + "uz_Latn": "uzbekera (latina)", + "uz_Latn_UZ": "uzbekera (latina, Uzbekistan)", + "uz_UZ": "uzbekera (Uzbekistan)", + "vi": "vietnamera", + "vi_VN": "vietnamera (Vietnam)", + "yi": "yiddisha", + "yo": "yorubera", + "yo_BJ": "yorubera (Benin)", + "yo_NG": "yorubera (Nigeria)", + "zh": "txinera", + "zh_CN": "txinera (Txina)", + "zh_HK": "txinera (Hong Kong AEB Txina)", + "zh_Hans": "txinera (sinplifikatua)", + "zh_Hans_CN": "txinera (sinplifikatua, Txina)", + "zh_Hans_HK": "txinera (sinplifikatua, Hong Kong AEB Txina)", + "zh_Hans_MO": "txinera (sinplifikatua, Macau AEB Txina)", + "zh_Hans_SG": "txinera (sinplifikatua, Singapur)", + "zh_Hant": "txinera (tradizionala)", + "zh_Hant_HK": "txinera (tradizionala, Hong Kong AEB Txina)", + "zh_Hant_MO": "txinera (tradizionala, Macau AEB Txina)", + "zh_Hant_TW": "txinera (tradizionala, Taiwan)", + "zh_MO": "txinera (Macau AEB Txina)", + "zh_SG": "txinera (Singapur)", + "zh_TW": "txinera (Taiwan)", + "zu": "zuluera", + "zu_ZA": "zuluera (Hegoafrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fa.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fa.json new file mode 100644 index 0000000000000000000000000000000000000000..13cf37b569c9d2915216f54a835ab5c010392c0e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fa.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Ø¢ÙØ±ÛŒÚ©Ø§Ù†Ø³", + "af_NA": "Ø¢ÙØ±ÛŒÚ©Ø§Ù†Ø³ (نامیبیا)", + "af_ZA": "Ø¢ÙØ±ÛŒÚ©Ø§Ù†Ø³ (Ø§ÙØ±ÛŒÙ‚ای جنوبی)", + "ak": "آکان", + "ak_GH": "آکان (غنا)", + "am": "امهری", + "am_ET": "امهری (اتیوپی)", + "ar": "عربی", + "ar_AE": "عربی (امارات متحدهٔ عربی)", + "ar_BH": "عربی (بحرین)", + "ar_DJ": "عربی (جیبوتی)", + "ar_DZ": "عربی (الجزایر)", + "ar_EG": "عربی (مصر)", + "ar_EH": "عربی (صحرای غربی)", + "ar_ER": "عربی (اریتره)", + "ar_IL": "عربی (اسرائیل)", + "ar_IQ": "عربی (عراق)", + "ar_JO": "عربی (اردن)", + "ar_KM": "عربی (کومورو)", + "ar_KW": "عربی (کویت)", + "ar_LB": "عربی (لبنان)", + "ar_LY": "عربی (لیبی)", + "ar_MA": "عربی (مراکش)", + "ar_MR": "عربی (موریتانی)", + "ar_OM": "عربی (عمان)", + "ar_PS": "عربی (سرزمین‌های Ùلسطینی)", + "ar_QA": "عربی (قطر)", + "ar_SA": "عربی (عربستان سعودی)", + "ar_SD": "عربی (سودان)", + "ar_SO": "عربی (سومالی)", + "ar_SS": "عربی (سودان جنوبی)", + "ar_SY": "عربی (سوریه)", + "ar_TD": "عربی (چاد)", + "ar_TN": "عربی (تونس)", + "ar_YE": "عربی (یمن)", + "as": "آسامی", + "as_IN": "آسامی (هند)", + "az": "ترکی آذربایجانی", + "az_AZ": "ترکی آذربایجانی (جمهوری آذربایجان)", + "az_Cyrl": "ترکی آذربایجانی (سیریلی)", + "az_Cyrl_AZ": "ترکی آذربایجانی (سیریلی, جمهوری آذربایجان)", + "az_Latn": "ترکی آذربایجانی (لاتینی)", + "az_Latn_AZ": "ترکی آذربایجانی (لاتینی, جمهوری آذربایجان)", + "be": "بلاروسی", + "be_BY": "بلاروسی (بلاروس)", + "bg": "بلغاری", + "bg_BG": "بلغاری (بلغارستان)", + "bm": "بامبارایی", + "bm_ML": "بامبارایی (مالی)", + "bn": "بنگالی", + "bn_BD": "بنگالی (بنگلادش)", + "bn_IN": "بنگالی (هند)", + "bo": "تبتی", + "bo_CN": "تبتی (چین)", + "bo_IN": "تبتی (هند)", + "br": "برتون", + "br_FR": "برتون (ÙØ±Ø§Ù†Ø³Ù‡)", + "bs": "بوسنیایی", + "bs_BA": "بوسنیایی (بوسنی Ùˆ هرزگوین)", + "bs_Cyrl": "بوسنیایی (سیریلی)", + "bs_Cyrl_BA": "بوسنیایی (سیریلی, بوسنی Ùˆ هرزگوین)", + "bs_Latn": "بوسنیایی (لاتینی)", + "bs_Latn_BA": "بوسنیایی (لاتینی, بوسنی Ùˆ هرزگوین)", + "ca": "کاتالان", + "ca_AD": "کاتالان (آندورا)", + "ca_ES": "کاتالان (اسپانیا)", + "ca_FR": "کاتالان (ÙØ±Ø§Ù†Ø³Ù‡)", + "ca_IT": "کاتالان (ایتالیا)", + "ce": "Ú†Ú†Ù†ÛŒ", + "ce_RU": "Ú†Ú†Ù†ÛŒ (روسیه)", + "cs": "Ú†Ú©ÛŒ", + "cs_CZ": "Ú†Ú©ÛŒ (جمهوری Ú†Ú©)", + "cy": "ولزی", + "cy_GB": "ولزی (بریتانیا)", + "da": "دانمارکی", + "da_DK": "دانمارکی (دانمارک)", + "da_GL": "دانمارکی (گرینلند)", + "de": "آلمانی", + "de_AT": "آلمانی (اتریش)", + "de_BE": "آلمانی (بلژیک)", + "de_CH": "آلمانی (سوئیس)", + "de_DE": "آلمانی (آلمان)", + "de_IT": "آلمانی (ایتالیا)", + "de_LI": "آلمانی (لیختن‌اشتاین)", + "de_LU": "آلمانی (لوکزامبورگ)", + "dz": "جونخایی", + "dz_BT": "جونخایی (بوتان)", + "ee": "اوه‌ای", + "ee_GH": "اوه‌ای (غنا)", + "ee_TG": "اوه‌ای (توگو)", + "el": "یونانی", + "el_CY": "یونانی (قبرس)", + "el_GR": "یونانی (یونان)", + "en": "انگلیسی", + "en_AG": "انگلیسی (آنتیگوا Ùˆ باربودا)", + "en_AI": "انگلیسی (آنگویلا)", + "en_AS": "انگلیسی (ساموآی امریکا)", + "en_AT": "انگلیسی (اتریش)", + "en_AU": "انگلیسی (استرالیا)", + "en_BB": "انگلیسی (باربادوس)", + "en_BE": "انگلیسی (بلژیک)", + "en_BI": "انگلیسی (بوروندی)", + "en_BM": "انگلیسی (برمودا)", + "en_BS": "انگلیسی (باهاما)", + "en_BW": "انگلیسی (بوتسوانا)", + "en_BZ": "انگلیسی (بلیز)", + "en_CA": "انگلیسی (کانادا)", + "en_CC": "انگلیسی (جزایر کوکوس)", + "en_CH": "انگلیسی (سوئیس)", + "en_CK": "انگلیسی (جزایر Ú©ÙˆÚ©)", + "en_CM": "انگلیسی (کامرون)", + "en_CX": "انگلیسی (جزیرهٔ کریسمس)", + "en_CY": "انگلیسی (قبرس)", + "en_DE": "انگلیسی (آلمان)", + "en_DG": "انگلیسی (دیه‌گو گارسیا)", + "en_DK": "انگلیسی (دانمارک)", + "en_DM": "انگلیسی (دومینیکا)", + "en_ER": "انگلیسی (اریتره)", + "en_FI": "انگلیسی (Ùنلاند)", + "en_FJ": "انگلیسی (Ùیجی)", + "en_FK": "انگلیسی (جزایر ÙØ§Ù„کلند)", + "en_FM": "انگلیسی (میکرونزی)", + "en_GB": "انگلیسی (بریتانیا)", + "en_GD": "انگلیسی (گرنادا)", + "en_GG": "انگلیسی (گرنزی)", + "en_GH": "انگلیسی (غنا)", + "en_GI": "انگلیسی (جبل‌الطارق)", + "en_GM": "انگلیسی (گامبیا)", + "en_GU": "انگلیسی (گوام)", + "en_GY": "انگلیسی (گویان)", + "en_HK": "انگلیسی (هنگ‌کنگ، ناحیهٔ ویژهٔ حکومتی چین)", + "en_IE": "انگلیسی (ایرلند)", + "en_IL": "انگلیسی (اسرائیل)", + "en_IM": "انگلیسی (جزیرهٔ من)", + "en_IN": "انگلیسی (هند)", + "en_IO": "انگلیسی (قلمرو بریتانیا در اقیانوس هند)", + "en_JE": "انگلیسی (جرزی)", + "en_JM": "انگلیسی (جامائیکا)", + "en_KE": "انگلیسی (کنیا)", + "en_KI": "انگلیسی (کیریباتی)", + "en_KN": "انگلیسی (سنت کیتس Ùˆ نویس)", + "en_KY": "انگلیسی (جزایر Ú©Ùیمن)", + "en_LC": "انگلیسی (سنت لوسیا)", + "en_LR": "انگلیسی (لیبریا)", + "en_LS": "انگلیسی (لسوتو)", + "en_MG": "انگلیسی (ماداگاسکار)", + "en_MH": "انگلیسی (جزایر مارشال)", + "en_MO": "انگلیسی (ماکائو، ناحیهٔ ویژهٔ حکومتی چین)", + "en_MP": "انگلیسی (جزایر ماریانای شمالی)", + "en_MS": "انگلیسی (مونت‌سرات)", + "en_MT": "انگلیسی (مالت)", + "en_MU": "انگلیسی (موریس)", + "en_MW": "انگلیسی (مالاوی)", + "en_MY": "انگلیسی (مالزی)", + "en_NA": "انگلیسی (نامیبیا)", + "en_NF": "انگلیسی (جزیرهٔ نورÙولک)", + "en_NG": "انگلیسی (نیجریه)", + "en_NL": "انگلیسی (هلند)", + "en_NR": "انگلیسی (نائورو)", + "en_NU": "انگلیسی (نیوئه)", + "en_NZ": "انگلیسی (نیوزیلند)", + "en_PG": "انگلیسی (پاپوا گینهٔ نو)", + "en_PH": "انگلیسی (Ùیلیپین)", + "en_PK": "انگلیسی (پاکستان)", + "en_PN": "انگلیسی (جزایر پیت‌کرن)", + "en_PR": "انگلیسی (پورتوریکو)", + "en_PW": "انگلیسی (پالائو)", + "en_RW": "انگلیسی (رواندا)", + "en_SB": "انگلیسی (جزایر سلیمان)", + "en_SC": "انگلیسی (سیشل)", + "en_SD": "انگلیسی (سودان)", + "en_SE": "انگلیسی (سوئد)", + "en_SG": "انگلیسی (سنگاپور)", + "en_SH": "انگلیسی (سنت هلن)", + "en_SI": "انگلیسی (اسلوونی)", + "en_SL": "انگلیسی (سیرالئون)", + "en_SS": "انگلیسی (سودان جنوبی)", + "en_SX": "انگلیسی (سنت مارتن)", + "en_SZ": "انگلیسی (سوازیلند)", + "en_TC": "انگلیسی (جزایر تورکس Ùˆ کایکوس)", + "en_TK": "انگلیسی (توکلائو)", + "en_TO": "انگلیسی (تونگا)", + "en_TT": "انگلیسی (ترینیداد Ùˆ توباگو)", + "en_TV": "انگلیسی (تووالو)", + "en_TZ": "انگلیسی (تانزانیا)", + "en_UG": "انگلیسی (اوگاندا)", + "en_UM": "انگلیسی (جزایر Ø¯ÙˆØ±Ø§ÙØªØ§Ø¯Ù‡Ù” ایالات متحده)", + "en_US": "انگلیسی (ایالات متحده)", + "en_VC": "انگلیسی (سنت وینسنت Ùˆ گرنادین)", + "en_VG": "انگلیسی (جزایر ویرجین بریتانیا)", + "en_VI": "انگلیسی (جزایر ویرجین ایالات متحده)", + "en_VU": "انگلیسی (وانواتو)", + "en_WS": "انگلیسی (ساموآ)", + "en_ZA": "انگلیسی (Ø§ÙØ±ÛŒÙ‚ای جنوبی)", + "en_ZM": "انگلیسی (زامبیا)", + "en_ZW": "انگلیسی (زیمبابوه)", + "eo": "اسپرانتو", + "es": "اسپانیایی", + "es_AR": "اسپانیایی (آرژانتین)", + "es_BO": "اسپانیایی (بولیوی)", + "es_BR": "اسپانیایی (برزیل)", + "es_CL": "اسپانیایی (شیلی)", + "es_CO": "اسپانیایی (کلمبیا)", + "es_CR": "اسپانیایی (کاستاریکا)", + "es_CU": "اسپانیایی (کوبا)", + "es_DO": "اسپانیایی (جمهوری دومینیکن)", + "es_EA": "اسپانیایی (سبته Ùˆ ملیله)", + "es_EC": "اسپانیایی (اکوادور)", + "es_ES": "اسپانیایی (اسپانیا)", + "es_GQ": "اسپانیایی (گینهٔ استوایی)", + "es_GT": "اسپانیایی (گواتمالا)", + "es_HN": "اسپانیایی (هندوراس)", + "es_IC": "اسپانیایی (جزایر قناری)", + "es_MX": "اسپانیایی (مکزیک)", + "es_NI": "اسپانیایی (نیکاراگوئه)", + "es_PA": "اسپانیایی (پاناما)", + "es_PE": "اسپانیایی (پرو)", + "es_PH": "اسپانیایی (Ùیلیپین)", + "es_PR": "اسپانیایی (پورتوریکو)", + "es_PY": "اسپانیایی (پاراگوئه)", + "es_SV": "اسپانیایی (السالوادور)", + "es_US": "اسپانیایی (ایالات متحده)", + "es_UY": "اسپانیایی (اروگوئه)", + "es_VE": "اسپانیایی (ونزوئلا)", + "et": "استونیایی", + "et_EE": "استونیایی (استونی)", + "eu": "باسکی", + "eu_ES": "باسکی (اسپانیا)", + "fa": "ÙØ§Ø±Ø³ÛŒ", + "fa_AF": "ÙØ§Ø±Ø³ÛŒ (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "fa_IR": "ÙØ§Ø±Ø³ÛŒ (ایران)", + "ff": "Ùولایی", + "ff_CM": "Ùولایی (کامرون)", + "ff_GN": "Ùولایی (گینه)", + "ff_MR": "Ùولایی (موریتانی)", + "ff_SN": "Ùولایی (سنگال)", + "fi": "Ùنلاندی", + "fi_FI": "Ùنلاندی (Ùنلاند)", + "fo": "ÙØ§Ø±ÙˆÛŒÛŒ", + "fo_DK": "ÙØ§Ø±ÙˆÛŒÛŒ (دانمارک)", + "fo_FO": "ÙØ§Ø±ÙˆÛŒÛŒ (جزایر ÙØ§Ø±Ùˆ)", + "fr": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ", + "fr_BE": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (بلژیک)", + "fr_BF": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (Ø¨ÙˆØ±Ú©ÛŒÙ†Ø§ÙØ§Ø³Ùˆ)", + "fr_BI": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (بوروندی)", + "fr_BJ": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (بنین)", + "fr_BL": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (سن بارتلمی)", + "fr_CA": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (کانادا)", + "fr_CD": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (Ú©Ù†Ú¯Ùˆ - کینشاسا)", + "fr_CF": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (جمهوری Ø§ÙØ±ÛŒÙ‚ای مرکزی)", + "fr_CG": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (Ú©Ù†Ú¯Ùˆ - برازویل)", + "fr_CH": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (سوئیس)", + "fr_CI": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (ساحل عاج)", + "fr_CM": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (کامرون)", + "fr_DJ": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (جیبوتی)", + "fr_DZ": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (الجزایر)", + "fr_FR": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (ÙØ±Ø§Ù†Ø³Ù‡)", + "fr_GA": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (گابن)", + "fr_GF": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (گویان ÙØ±Ø§Ù†Ø³Ù‡)", + "fr_GN": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (گینه)", + "fr_GP": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (گوادلوپ)", + "fr_GQ": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (گینهٔ استوایی)", + "fr_HT": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (هائیتی)", + "fr_KM": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (کومورو)", + "fr_LU": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (لوکزامبورگ)", + "fr_MA": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (مراکش)", + "fr_MC": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (موناکو)", + "fr_MF": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (سنت مارتین)", + "fr_MG": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (ماداگاسکار)", + "fr_ML": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (مالی)", + "fr_MQ": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (مارتینیک)", + "fr_MR": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (موریتانی)", + "fr_MU": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (موریس)", + "fr_NC": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (کالدونیای جدید)", + "fr_NE": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (نیجر)", + "fr_PF": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (پلی‌نزی ÙØ±Ø§Ù†Ø³Ù‡)", + "fr_PM": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (سن پیر Ùˆ میکلن)", + "fr_RE": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (رئونیون)", + "fr_RW": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (رواندا)", + "fr_SC": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (سیشل)", + "fr_SN": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (سنگال)", + "fr_SY": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (سوریه)", + "fr_TD": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (چاد)", + "fr_TG": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (توگو)", + "fr_TN": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (تونس)", + "fr_VU": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (وانواتو)", + "fr_WF": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (والیس Ùˆ Ùوتونا)", + "fr_YT": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (مایوت)", + "fy": "ÙØ±ÛŒØ²ÛŒ غربی", + "fy_NL": "ÙØ±ÛŒØ²ÛŒ غربی (هلند)", + "ga": "ایرلندی", + "ga_IE": "ایرلندی (ایرلند)", + "gd": "گیلی اسکاتلندی", + "gd_GB": "گیلی اسکاتلندی (بریتانیا)", + "gl": "گالیسیایی", + "gl_ES": "گالیسیایی (اسپانیا)", + "gu": "گجراتی", + "gu_IN": "گجراتی (هند)", + "gv": "مانی", + "gv_IM": "مانی (جزیرهٔ من)", + "ha": "هوسیایی", + "ha_GH": "هوسیایی (غنا)", + "ha_NE": "هوسیایی (نیجر)", + "ha_NG": "هوسیایی (نیجریه)", + "he": "عبری", + "he_IL": "عبری (اسرائیل)", + "hi": "هندی", + "hi_IN": "هندی (هند)", + "hr": "کروات", + "hr_BA": "کروات (بوسنی Ùˆ هرزگوین)", + "hr_HR": "کروات (کرواسی)", + "hu": "مجاری", + "hu_HU": "مجاری (مجارستان)", + "hy": "ارمنی", + "hy_AM": "ارمنی (ارمنستان)", + "id": "اندونزیایی", + "id_ID": "اندونزیایی (اندونزی)", + "ig": "ایگبویی", + "ig_NG": "ایگبویی (نیجریه)", + "ii": "یی سیچوان", + "ii_CN": "یی سیچوان (چین)", + "is": "ایسلندی", + "is_IS": "ایسلندی (ایسلند)", + "it": "ایتالیایی", + "it_CH": "ایتالیایی (سوئیس)", + "it_IT": "ایتالیایی (ایتالیا)", + "it_SM": "ایتالیایی (سان‌مارینو)", + "ja": "ژاپنی", + "ja_JP": "ژاپنی (ژاپن)", + "ka": "گرجی", + "ka_GE": "گرجی (گرجستان)", + "ki": "کیکویویی", + "ki_KE": "کیکویویی (کنیا)", + "kk": "قزاقی", + "kk_KZ": "قزاقی (قزاقستان)", + "kl": "گرینلندی", + "kl_GL": "گرینلندی (گرینلند)", + "km": "خمری", + "km_KH": "خمری (کامبوج)", + "kn": "کانارا", + "kn_IN": "کانارا (هند)", + "ko": "کره‌ای", + "ko_KP": "کره‌ای (کرهٔ شمالی)", + "ko_KR": "کره‌ای (کرهٔ جنوبی)", + "ks": "کشمیری", + "ks_IN": "کشمیری (هند)", + "kw": "کرنوالی", + "kw_GB": "کرنوالی (بریتانیا)", + "ky": "قرقیزی", + "ky_KG": "قرقیزی (قرقیزستان)", + "lb": "لوگزامبورگی", + "lb_LU": "لوگزامبورگی (لوکزامبورگ)", + "lg": "گاندایی", + "lg_UG": "گاندایی (اوگاندا)", + "ln": "لینگالا", + "ln_AO": "لینگالا (آنگولا)", + "ln_CD": "لینگالا (Ú©Ù†Ú¯Ùˆ - کینشاسا)", + "ln_CF": "لینگالا (جمهوری Ø§ÙØ±ÛŒÙ‚ای مرکزی)", + "ln_CG": "لینگالا (Ú©Ù†Ú¯Ùˆ - برازویل)", + "lo": "لائوسی", + "lo_LA": "لائوسی (لائوس)", + "lt": "لیتوانیایی", + "lt_LT": "لیتوانیایی (لیتوانی)", + "lu": "لوباییâ€Ú©Ø§ØªØ§Ù†Ú¯Ø§", + "lu_CD": "لوباییâ€Ú©Ø§ØªØ§Ù†Ú¯Ø§ (Ú©Ù†Ú¯Ùˆ - کینشاسا)", + "lv": "لتونیایی", + "lv_LV": "لتونیایی (لتونی)", + "mg": "مالاگاسیایی", + "mg_MG": "مالاگاسیایی (ماداگاسکار)", + "mk": "مقدونی", + "mk_MK": "مقدونی (مقدونیه)", + "ml": "مالایالامی", + "ml_IN": "مالایالامی (هند)", + "mn": "مغولی", + "mn_MN": "مغولی (مغولستان)", + "mr": "مراتی", + "mr_IN": "مراتی (هند)", + "ms": "مالایی", + "ms_BN": "مالایی (برونئی)", + "ms_MY": "مالایی (مالزی)", + "ms_SG": "مالایی (سنگاپور)", + "mt": "مالتی", + "mt_MT": "مالتی (مالت)", + "my": "برمه‌ای", + "my_MM": "برمه‌ای (میانمار (برمه))", + "nb": "نروژی بوک‌مÙÙ„", + "nb_NO": "نروژی بوک‌مÙÙ„ (نروژ)", + "nb_SJ": "نروژی بوک‌مÙÙ„ (اسوالبارد Ùˆ جان‌ماین)", + "nd": "انده‌بله‌ای شمالی", + "nd_ZW": "انده‌بله‌ای شمالی (زیمبابوه)", + "ne": "نپالی", + "ne_IN": "نپالی (هند)", + "ne_NP": "نپالی (نپال)", + "nl": "هلندی", + "nl_AW": "هلندی (آروبا)", + "nl_BE": "هلندی (بلژیک)", + "nl_BQ": "هلندی (جزایر کارائیب هلند)", + "nl_CW": "هلندی (کوراسائو)", + "nl_NL": "هلندی (هلند)", + "nl_SR": "هلندی (سورینام)", + "nl_SX": "هلندی (سنت مارتن)", + "nn": "نروژی Ù†ÛŒâ€ŒÙ†ÙØ´Ú©", + "nn_NO": "نروژی Ù†ÛŒâ€ŒÙ†ÙØ´Ú© (نروژ)", + "no": "نروژی", + "no_NO": "نروژی (نروژ)", + "om": "اورومویی", + "om_ET": "اورومویی (اتیوپی)", + "om_KE": "اورومویی (کنیا)", + "or": "اوریه‌ای", + "or_IN": "اوریه‌ای (هند)", + "os": "آسی", + "os_GE": "آسی (گرجستان)", + "os_RU": "آسی (روسیه)", + "pa": "پنجابی", + "pa_Arab": "پنجابی (عربی)", + "pa_Arab_PK": "پنجابی (عربی, پاکستان)", + "pa_Guru": "پنجابی (گورومخی)", + "pa_Guru_IN": "پنجابی (گورومخی, هند)", + "pa_IN": "پنجابی (هند)", + "pa_PK": "پنجابی (پاکستان)", + "pl": "لهستانی", + "pl_PL": "لهستانی (لهستان)", + "ps": "پشتو", + "ps_AF": "پشتو (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "pt": "پرتغالی", + "pt_AO": "پرتغالی (آنگولا)", + "pt_BR": "پرتغالی (برزیل)", + "pt_CH": "پرتغالی (سوئیس)", + "pt_CV": "پرتغالی (کیپ‌ورد)", + "pt_GQ": "پرتغالی (گینهٔ استوایی)", + "pt_GW": "پرتغالی (گینهٔ بیسائو)", + "pt_LU": "پرتغالی (لوکزامبورگ)", + "pt_MO": "پرتغالی (ماکائو، ناحیهٔ ویژهٔ حکومتی چین)", + "pt_MZ": "پرتغالی (موزامبیک)", + "pt_PT": "پرتغالی (پرتغال)", + "pt_ST": "پرتغالی (سائوتومه Ùˆ پرینسیپ)", + "pt_TL": "پرتغالی (تیمور-لسته)", + "qu": "کچوایی", + "qu_BO": "کچوایی (بولیوی)", + "qu_EC": "کچوایی (اکوادور)", + "qu_PE": "کچوایی (پرو)", + "rm": "رومانش", + "rm_CH": "رومانش (سوئیس)", + "rn": "روندیایی", + "rn_BI": "روندیایی (بوروندی)", + "ro": "رومانیایی", + "ro_MD": "رومانیایی (مولداوی)", + "ro_RO": "رومانیایی (رومانی)", + "ru": "روسی", + "ru_BY": "روسی (بلاروس)", + "ru_KG": "روسی (قرقیزستان)", + "ru_KZ": "روسی (قزاقستان)", + "ru_MD": "روسی (مولداوی)", + "ru_RU": "روسی (روسیه)", + "ru_UA": "روسی (اوکراین)", + "rw": "کینیارواندایی", + "rw_RW": "کینیارواندایی (رواندا)", + "se": "سامی شمالی", + "se_FI": "سامی شمالی (Ùنلاند)", + "se_NO": "سامی شمالی (نروژ)", + "se_SE": "سامی شمالی (سوئد)", + "sg": "سانگو", + "sg_CF": "سانگو (جمهوری Ø§ÙØ±ÛŒÙ‚ای مرکزی)", + "sh": "صرب Ùˆ کرواتی", + "sh_BA": "صرب Ùˆ کرواتی (بوسنی Ùˆ هرزگوین)", + "si": "سینهالی", + "si_LK": "سینهالی (سری‌لانکا)", + "sk": "اسلواکی", + "sk_SK": "اسلواکی (اسلواکی)", + "sl": "اسلوونیایی", + "sl_SI": "اسلوونیایی (اسلوونی)", + "sn": "شونایی", + "sn_ZW": "شونایی (زیمبابوه)", + "so": "سومالیایی", + "so_DJ": "سومالیایی (جیبوتی)", + "so_ET": "سومالیایی (اتیوپی)", + "so_KE": "سومالیایی (کنیا)", + "so_SO": "سومالیایی (سومالی)", + "sq": "آلبانیایی", + "sq_AL": "آلبانیایی (آلبانی)", + "sq_MK": "آلبانیایی (مقدونیه)", + "sq_XK": "آلبانیایی (کوزوو)", + "sr": "صربی", + "sr_BA": "صربی (بوسنی Ùˆ هرزگوین)", + "sr_Cyrl": "صربی (سیریلی)", + "sr_Cyrl_BA": "صربی (سیریلی, بوسنی Ùˆ هرزگوین)", + "sr_Cyrl_ME": "صربی (سیریلی, مونته‌نگرو)", + "sr_Cyrl_RS": "صربی (سیریلی, صربستان)", + "sr_Cyrl_XK": "صربی (سیریلی, کوزوو)", + "sr_Latn": "صربی (لاتینی)", + "sr_Latn_BA": "صربی (لاتینی, بوسنی Ùˆ هرزگوین)", + "sr_Latn_ME": "صربی (لاتینی, مونته‌نگرو)", + "sr_Latn_RS": "صربی (لاتینی, صربستان)", + "sr_Latn_XK": "صربی (لاتینی, کوزوو)", + "sr_ME": "صربی (مونته‌نگرو)", + "sr_RS": "صربی (صربستان)", + "sr_XK": "صربی (کوزوو)", + "sv": "سوئدی", + "sv_AX": "سوئدی (جزایر آلاند)", + "sv_FI": "سوئدی (Ùنلاند)", + "sv_SE": "سوئدی (سوئد)", + "sw": "سواحیلی", + "sw_CD": "سواحیلی (Ú©Ù†Ú¯Ùˆ - کینشاسا)", + "sw_KE": "سواحیلی (کنیا)", + "sw_TZ": "سواحیلی (تانزانیا)", + "sw_UG": "سواحیلی (اوگاندا)", + "ta": "تامیلی", + "ta_IN": "تامیلی (هند)", + "ta_LK": "تامیلی (سری‌لانکا)", + "ta_MY": "تامیلی (مالزی)", + "ta_SG": "تامیلی (سنگاپور)", + "te": "تلوگویی", + "te_IN": "تلوگویی (هند)", + "th": "تایلندی", + "th_TH": "تایلندی (تایلند)", + "ti": "تیگرینیایی", + "ti_ER": "تیگرینیایی (اریتره)", + "ti_ET": "تیگرینیایی (اتیوپی)", + "tl": "تاگالوگی", + "tl_PH": "تاگالوگی (Ùیلیپین)", + "to": "تونگایی", + "to_TO": "تونگایی (تونگا)", + "tr": "ترکی استانبولی", + "tr_CY": "ترکی استانبولی (قبرس)", + "tr_TR": "ترکی استانبولی (ترکیه)", + "ug": "اویغوری", + "ug_CN": "اویغوری (چین)", + "uk": "اوکراینی", + "uk_UA": "اوکراینی (اوکراین)", + "ur": "اردو", + "ur_IN": "اردو (هند)", + "ur_PK": "اردو (پاکستان)", + "uz": "ازبکی", + "uz_AF": "ازبکی (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "uz_Arab": "ازبکی (عربی)", + "uz_Arab_AF": "ازبکی (عربی, Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "uz_Cyrl": "ازبکی (سیریلی)", + "uz_Cyrl_UZ": "ازبکی (سیریلی, ازبکستان)", + "uz_Latn": "ازبکی (لاتینی)", + "uz_Latn_UZ": "ازبکی (لاتینی, ازبکستان)", + "uz_UZ": "ازبکی (ازبکستان)", + "vi": "ویتنامی", + "vi_VN": "ویتنامی (ویتنام)", + "yi": "یدی", + "yo": "یوروبایی", + "yo_BJ": "یوروبایی (بنین)", + "yo_NG": "یوروبایی (نیجریه)", + "zh": "چینی", + "zh_CN": "چینی (چین)", + "zh_HK": "چینی (هنگ‌کنگ، ناحیهٔ ویژهٔ حکومتی چین)", + "zh_Hans": "چینی (ساده‌شده)", + "zh_Hans_CN": "چینی (ساده‌شده, چین)", + "zh_Hans_HK": "چینی (ساده‌شده, هنگ‌کنگ، ناحیهٔ ویژهٔ حکومتی چین)", + "zh_Hans_MO": "چینی (ساده‌شده, ماکائو، ناحیهٔ ویژهٔ حکومتی چین)", + "zh_Hans_SG": "چینی (ساده‌شده, سنگاپور)", + "zh_Hant": "چینی (سنتی)", + "zh_Hant_HK": "چینی (سنتی, هنگ‌کنگ، ناحیهٔ ویژهٔ حکومتی چین)", + "zh_Hant_MO": "چینی (سنتی, ماکائو، ناحیهٔ ویژهٔ حکومتی چین)", + "zh_Hant_TW": "چینی (سنتی, تایوان)", + "zh_MO": "چینی (ماکائو، ناحیهٔ ویژهٔ حکومتی چین)", + "zh_SG": "چینی (سنگاپور)", + "zh_TW": "چینی (تایوان)", + "zu": "زولویی", + "zu_ZA": "زولویی (Ø§ÙØ±ÛŒÙ‚ای جنوبی)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fa_AF.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fa_AF.json new file mode 100644 index 0000000000000000000000000000000000000000..3895deed89f8f42c6d0085f9129b8d557a7ef8bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fa_AF.json @@ -0,0 +1,229 @@ +{ + "Names": { + "ak_GH": "آکان (گانا)", + "am_ET": "امهری (ایتوپیا)", + "ar_ER": "عربی (اریتریا)", + "ar_LY": "عربی (لیبیا)", + "ar_MR": "عربی (موریتانیا)", + "ar_SO": "عربی (سومالیه)", + "as": "اسامی", + "as_IN": "اسامی (هند)", + "az": "آذربایجانی", + "az_AZ": "آذربایجانی (جمهوری آذربایجان)", + "az_Cyrl": "آذربایجانی (سیریلی)", + "az_Cyrl_AZ": "آذربایجانی (سیریلی, جمهوری آذربایجان)", + "az_Latn": "آذربایجانی (لاتینی)", + "az_Latn_AZ": "آذربایجانی (لاتینی, جمهوری آذربایجان)", + "be_BY": "بلاروسی (روسیهٔ سÙید)", + "bg_BG": "بلغاری (بلغاریا)", + "bn_BD": "بنگالی (بنگله‌دیش)", + "bs_BA": "بوسنیایی (بوسنیا Ùˆ هرزه‌گوینا)", + "bs_Cyrl_BA": "بوسنیایی (سیریلی, بوسنیا Ùˆ هرزه‌گوینا)", + "bs_Latn_BA": "بوسنیایی (لاتینی, بوسنیا Ùˆ هرزه‌گوینا)", + "ca_AD": "کاتالان (اندورا)", + "ca_ES": "کاتالان (هسپانیه)", + "da_DK": "دانمارکی (دنمارک)", + "de_BE": "آلمانی (بلجیم)", + "de_CH": "آلمانی (سویس)", + "ee_GH": "اوه‌ای (گانا)", + "en_AG": "انگلیسی (انتیگوا Ùˆ باربودا)", + "en_AU": "انگلیسی (آسترالیا)", + "en_BE": "انگلیسی (بلجیم)", + "en_BS": "انگلیسی (بهاماس)", + "en_CH": "انگلیسی (سویس)", + "en_DK": "انگلیسی (دنمارک)", + "en_ER": "انگلیسی (اریتریا)", + "en_FI": "انگلیسی (Ùنلند)", + "en_FM": "انگلیسی (میکرونزیا)", + "en_GD": "انگلیسی (گرینادا)", + "en_GH": "انگلیسی (گانا)", + "en_GY": "انگلیسی (گیانا)", + "en_IE": "انگلیسی (آیرلند)", + "en_KE": "انگلیسی (کینیا)", + "en_LS": "انگلیسی (لیسوتو)", + "en_MG": "انگلیسی (مادغاسکر)", + "en_MT": "انگلیسی (مالتا)", + "en_MY": "انگلیسی (مالیزیا)", + "en_NG": "انگلیسی (نیجریا)", + "en_NL": "انگلیسی (هالند)", + "en_NZ": "انگلیسی (زیلاند جدید)", + "en_PG": "انگلیسی (پاپوا نیو گینیا)", + "en_RW": "انگلیسی (روآندا)", + "en_SE": "انگلیسی (سویدن)", + "en_SG": "انگلیسی (سینگاپور)", + "en_SI": "انگلیسی (سلونیا)", + "en_SL": "انگلیسی (سیرالیون)", + "en_UG": "انگلیسی (یوگاندا)", + "en_VC": "انگلیسی (سنت وینسنت Ùˆ گرنادین‌ها)", + "en_ZW": "انگلیسی (زیمبابوی)", + "es": "هسپانوی", + "es_AR": "هسپانوی (ارجنتاین)", + "es_BO": "هسپانوی (بولیویا)", + "es_BR": "هسپانوی (برازیل)", + "es_CL": "هسپانوی (Ú†Ù„ÛŒ)", + "es_CO": "هسپانوی (کولمبیا)", + "es_CR": "هسپانوی (کاستریکا)", + "es_CU": "هسپانوی (کیوبا)", + "es_DO": "هسپانوی (جمهوری دومینیکن)", + "es_EA": "هسپانوی (سبته Ùˆ ملیله)", + "es_EC": "هسپانوی (اکوادور)", + "es_ES": "هسپانوی (هسپانیه)", + "es_GQ": "هسپانوی (گینیا استوایی)", + "es_GT": "هسپانوی (گواتیمالا)", + "es_HN": "هسپانوی (هاندوراس)", + "es_IC": "هسپانوی (جزایر قناری)", + "es_MX": "هسپانوی (مکسیکو)", + "es_NI": "هسپانوی (نیکاراگوا)", + "es_PA": "هسپانوی (پانامه)", + "es_PE": "هسپانوی (پیرو)", + "es_PH": "هسپانوی (Ùیلیپین)", + "es_PR": "هسپانوی (پورتوریکو)", + "es_PY": "هسپانوی (پاراگوای)", + "es_SV": "هسپانوی (السلوادور)", + "es_US": "هسپانوی (ایالات متحده)", + "es_UY": "هسپانوی (یوروگوای)", + "es_VE": "هسپانوی (ونزویلا)", + "et_EE": "استونیایی (استونیا)", + "eu_ES": "باسکی (هسپانیه)", + "ff_GN": "Ùولایی (گینیا)", + "ff_MR": "Ùولایی (موریتانیا)", + "ff_SN": "Ùولایی (سینیگال)", + "fi": "Ùنلندی", + "fi_FI": "Ùنلندی (Ùنلند)", + "fo_DK": "ÙØ§Ø±ÙˆÛŒÛŒ (دنمارک)", + "fr_BE": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (بلجیم)", + "fr_CD": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (کانگو - کینشاسا)", + "fr_CG": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (کانگو - برازویل)", + "fr_CH": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (سویس)", + "fr_GN": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (گینیا)", + "fr_GQ": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (گینیا استوایی)", + "fr_HT": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (هایتی)", + "fr_MG": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (مادغاسکر)", + "fr_MR": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (موریتانیا)", + "fr_NE": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (نایجر)", + "fr_RW": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (روآندا)", + "fr_SN": "ÙØ±Ø§Ù†Ø³ÙˆÛŒ (سینیگال)", + "fy_NL": "ÙØ±ÛŒØ²ÛŒ غربی (هالند)", + "ga": "آیرلندی", + "ga_IE": "آیرلندی (آیرلند)", + "gl_ES": "گالیسیایی (هسپانیه)", + "ha_GH": "هوسیایی (گانا)", + "ha_NE": "هوسیایی (نایجر)", + "ha_NG": "هوسیایی (نیجریا)", + "hr": "کروشیایی", + "hr_BA": "کروشیایی (بوسنیا Ùˆ هرزه‌گوینا)", + "hr_HR": "کروشیایی (کروشیا)", + "id": "اندونیزیایی", + "id_ID": "اندونیزیایی (اندونیزیا)", + "ig_NG": "ایگبویی (نیجریا)", + "is": "آیسلندی", + "is_IS": "آیسلندی (آیسلند)", + "it": "ایتالوی", + "it_CH": "ایتالوی (سویس)", + "it_IT": "ایتالوی (ایتالیا)", + "it_SM": "ایتالوی (سان‌مارینو)", + "ja": "جاپانی", + "ja_JP": "جاپانی (جاپان)", + "ki_KE": "کیکویویی (کینیا)", + "km_KH": "خمری (کمپوچیا)", + "ko": "کوریایی", + "ko_KP": "کوریایی (کوریای شمالی)", + "ko_KR": "کوریایی (کوریای جنوبی)", + "ky": "قرغزی", + "ky_KG": "قرغزی (قرغزستان)", + "lg_UG": "گاندایی (یوگاندا)", + "ln_AO": "لینگالا (انگولا)", + "ln_CD": "لینگالا (کانگو - کینشاسا)", + "ln_CG": "لینگالا (کانگو - برازویل)", + "lt_LT": "لیتوانیایی (لتوانیا)", + "lu_CD": "لوباییâ€Ú©Ø§ØªØ§Ù†Ú¯Ø§ (کانگو - کینشاسا)", + "lv_LV": "لتونیایی (لاتویا)", + "mg_MG": "مالاگاسیایی (مادغاسکر)", + "mn": "مغلی", + "mn_MN": "مغلی (منگولیا)", + "ms_BN": "مالایی (برونی)", + "ms_MY": "مالایی (مالیزیا)", + "ms_SG": "مالایی (سینگاپور)", + "mt_MT": "مالتی (مالتا)", + "nb_NO": "نروژی بوک‌مÙÙ„ (ناروی)", + "nd_ZW": "انده‌بله‌ای شمالی (زیمبابوی)", + "ne": "نیپالی", + "ne_IN": "نیپالی (هند)", + "ne_NP": "نیپالی (نیپال)", + "nl": "هالندی", + "nl_AW": "هالندی (آروبا)", + "nl_BE": "هالندی (بلجیم)", + "nl_BQ": "هالندی (جزایر کارائیب هلند)", + "nl_CW": "هالندی (کوراسائو)", + "nl_NL": "هالندی (هالند)", + "nl_SR": "هالندی (سورینام)", + "nl_SX": "هالندی (سنت مارتن)", + "nn_NO": "نروژی Ù†ÛŒâ€ŒÙ†ÙØ´Ú© (ناروی)", + "no": "نارویژی", + "no_NO": "نارویژی (ناروی)", + "om_ET": "اورومویی (ایتوپیا)", + "om_KE": "اورومویی (کینیا)", + "pl": "پولندی", + "pl_PL": "پولندی (پولند)", + "pt": "پرتگالی", + "pt_AO": "پرتگالی (انگولا)", + "pt_BR": "پرتگالی (برازیل)", + "pt_CH": "پرتگالی (سویس)", + "pt_CV": "پرتگالی (کیپ‌ورد)", + "pt_GQ": "پرتگالی (گینیا استوایی)", + "pt_GW": "پرتگالی (گینیا بیسائو)", + "pt_LU": "پرتگالی (لوکزامبورگ)", + "pt_MO": "پرتگالی (ماکائو، ناحیهٔ ویژهٔ حکومتی چین)", + "pt_MZ": "پرتگالی (موزمبیق)", + "pt_PT": "پرتگالی (پرتگال)", + "pt_ST": "پرتگالی (سائوتومه Ùˆ پرینسیپ)", + "pt_TL": "پرتگالی (تیمور-لسته)", + "qu_BO": "کچوایی (بولیویا)", + "qu_PE": "کچوایی (پیرو)", + "rm_CH": "رومانش (سویس)", + "ro_RO": "رومانیایی (رومانیا)", + "ru_BY": "روسی (روسیهٔ سÙید)", + "ru_KG": "روسی (قرغزستان)", + "ru_UA": "روسی (اکراین)", + "rw_RW": "کینیارواندایی (روآندا)", + "se_FI": "سامی شمالی (Ùنلند)", + "se_NO": "سامی شمالی (ناروی)", + "se_SE": "سامی شمالی (سویدن)", + "sh_BA": "صرب Ùˆ کرواتی (بوسنیا Ùˆ هرزه‌گوینا)", + "si_LK": "سینهالی (سریلانکا)", + "sk_SK": "اسلواکی (سلواکیا)", + "sl_SI": "اسلوونیایی (سلونیا)", + "sn_ZW": "شونایی (زیمبابوی)", + "so_ET": "سومالیایی (ایتوپیا)", + "so_KE": "سومالیایی (کینیا)", + "so_SO": "سومالیایی (سومالیه)", + "sq": "البانیایی", + "sq_AL": "البانیایی (البانیا)", + "sq_MK": "البانیایی (مقدونیه)", + "sq_XK": "البانیایی (کوسوا)", + "sr_BA": "صربی (بوسنیا Ùˆ هرزه‌گوینا)", + "sr_Cyrl_BA": "صربی (سیریلی, بوسنیا Ùˆ هرزه‌گوینا)", + "sr_Cyrl_XK": "صربی (سیریلی, کوسوا)", + "sr_Latn_BA": "صربی (لاتینی, بوسنیا Ùˆ هرزه‌گوینا)", + "sr_Latn_XK": "صربی (لاتینی, کوسوا)", + "sr_XK": "صربی (کوسوا)", + "sv": "سویدنی", + "sv_AX": "سویدنی (جزایر آلاند)", + "sv_FI": "سویدنی (Ùنلند)", + "sv_SE": "سویدنی (سویدن)", + "sw": "سواحلی", + "sw_CD": "سواحلی (کانگو - کینشاسا)", + "sw_KE": "سواحلی (کینیا)", + "sw_TZ": "سواحلی (تانزانیا)", + "sw_UG": "سواحلی (یوگاندا)", + "ta_LK": "تامیلی (سریلانکا)", + "ta_MY": "تامیلی (مالیزیا)", + "ta_SG": "تامیلی (سینگاپور)", + "ti_ER": "تیگرینیایی (اریتریا)", + "ti_ET": "تیگرینیایی (ایتوپیا)", + "uk_UA": "اوکراینی (اکراین)", + "yo_NG": "یوروبایی (نیجریا)", + "zh_Hans_SG": "چینی (ساده‌شده, سینگاپور)", + "zh_SG": "چینی (سینگاپور)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ff.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ff.json new file mode 100644 index 0000000000000000000000000000000000000000..f9a1507ce1281feb6350882658219ad395710f35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ff.json @@ -0,0 +1,324 @@ +{ + "Names": { + "ak": "Akaan", + "ak_GH": "Akaan (Ganaa)", + "am": "Amarik", + "am_ET": "Amarik (Ecoppi)", + "ar": "Aarabeere", + "ar_AE": "Aarabeere (Emiraat Araab DenntuÉ—e)", + "ar_BH": "Aarabeere (Bahreyn)", + "ar_DJ": "Aarabeere (Jibutii)", + "ar_DZ": "Aarabeere (Alaseri)", + "ar_EG": "Aarabeere (Ejipt)", + "ar_ER": "Aarabeere (Eriteree)", + "ar_IL": "Aarabeere (Israa’iila)", + "ar_IQ": "Aarabeere (Iraak)", + "ar_JO": "Aarabeere (Jordani)", + "ar_KM": "Aarabeere (Komoor)", + "ar_KW": "Aarabeere (Kuweyti)", + "ar_LB": "Aarabeere (Libaa)", + "ar_LY": "Aarabeere (Libi)", + "ar_MA": "Aarabeere (Maruk)", + "ar_MR": "Aarabeere (Muritani)", + "ar_OM": "Aarabeere (Omaan)", + "ar_PS": "Aarabeere (Palestiin Sisjordani e Gaasaa)", + "ar_QA": "Aarabeere (Kataar)", + "ar_SA": "Aarabeere (Arabii Sawdit)", + "ar_SD": "Aarabeere (Sudaan)", + "ar_SO": "Aarabeere (Somalii)", + "ar_SY": "Aarabeere (Sirii)", + "ar_TD": "Aarabeere (Caad)", + "ar_TN": "Aarabeere (Tunisii)", + "ar_YE": "Aarabeere (Yemen)", + "be": "Belaruuse", + "be_BY": "Belaruuse (Belaruus)", + "bg": "Bulgariire", + "bg_BG": "Bulgariire (Bulgarii)", + "bn": "Bengali", + "bn_BD": "Bengali (Banglaadees)", + "bn_IN": "Bengali (Enndo)", + "cs": "Cekkere", + "cs_CZ": "Cekkere (Ndenndaandi Cek)", + "de": "Docceere", + "de_AT": "Docceere (Otiriis)", + "de_BE": "Docceere (Beljik)", + "de_CH": "Docceere (Suwiis)", + "de_DE": "Docceere (Almaañ)", + "de_IT": "Docceere (Itali)", + "de_LI": "Docceere (Lincenstayn)", + "de_LU": "Docceere (Liksembuur)", + "el": "Gerke", + "el_CY": "Gerke (Siipar)", + "el_GR": "Gerke (Gerees)", + "en": "Engeleere", + "en_AG": "Engeleere (Antiguwaa e Barbudaa)", + "en_AI": "Engeleere (Anngiyaa)", + "en_AS": "Engeleere (Samowa Amerik)", + "en_AT": "Engeleere (Otiriis)", + "en_AU": "Engeleere (Ostaraalii)", + "en_BB": "Engeleere (Barbadoos)", + "en_BE": "Engeleere (Beljik)", + "en_BI": "Engeleere (Burunndi)", + "en_BM": "Engeleere (Bermudaa)", + "en_BS": "Engeleere (Bahamaas)", + "en_BW": "Engeleere (Botswaana)", + "en_BZ": "Engeleere (Beliise)", + "en_CA": "Engeleere (Kanadaa)", + "en_CH": "Engeleere (Suwiis)", + "en_CK": "Engeleere (DuuÉ—e Kuuk)", + "en_CM": "Engeleere (Kameruun)", + "en_CY": "Engeleere (Siipar)", + "en_DE": "Engeleere (Almaañ)", + "en_DK": "Engeleere (Danmark)", + "en_DM": "Engeleere (Dominika)", + "en_ER": "Engeleere (Eriteree)", + "en_FI": "Engeleere (Fenland)", + "en_FJ": "Engeleere (Fijji)", + "en_FK": "Engeleere (DuuÉ—e Falkland)", + "en_FM": "Engeleere (Mikoronesii)", + "en_GB": "Engeleere (Laamateeri Rentundi)", + "en_GD": "Engeleere (Garnaad)", + "en_GH": "Engeleere (Ganaa)", + "en_GI": "Engeleere (Jibraltaar)", + "en_GM": "Engeleere (Gammbi)", + "en_GU": "Engeleere (Guwam)", + "en_GY": "Engeleere (Giyaan)", + "en_IE": "Engeleere (Irlannda)", + "en_IL": "Engeleere (Israa’iila)", + "en_IN": "Engeleere (Enndo)", + "en_IO": "Engeleere (Keeriindi britaani to maayo enndo)", + "en_JM": "Engeleere (Jamayka)", + "en_KE": "Engeleere (Keñaa)", + "en_KI": "Engeleere (Kiribari)", + "en_KN": "Engeleere (Sent Kits e Newis)", + "en_KY": "Engeleere (DuuÉ—e Kaymaa)", + "en_LC": "Engeleere (Sent Lusiyaa)", + "en_LR": "Engeleere (Liberiyaa)", + "en_LS": "Engeleere (Lesoto)", + "en_MG": "Engeleere (Madagaskaar)", + "en_MH": "Engeleere (DuuÉ—e Marsaal)", + "en_MP": "Engeleere (DuuÉ—e Mariyaana Rewo)", + "en_MS": "Engeleere (Monseraat)", + "en_MT": "Engeleere (Malte)", + "en_MU": "Engeleere (Moriis)", + "en_MW": "Engeleere (Malaawi)", + "en_MY": "Engeleere (Malesii)", + "en_NA": "Engeleere (Namibii)", + "en_NF": "Engeleere (DuuÉ—e Norfolk)", + "en_NG": "Engeleere (Nijeriyaa)", + "en_NL": "Engeleere (Nederlannda)", + "en_NR": "Engeleere (Nawuru)", + "en_NU": "Engeleere (Niuwe)", + "en_NZ": "Engeleere (Nuwel Selannda)", + "en_PG": "Engeleere (Papuwaa Nuwel Gine)", + "en_PH": "Engeleere (Filipiin)", + "en_PK": "Engeleere (Pakistaan)", + "en_PN": "Engeleere (Pitkern)", + "en_PR": "Engeleere (Porto Rikoo)", + "en_PW": "Engeleere (Palawu)", + "en_RW": "Engeleere (Ruwanndaa)", + "en_SB": "Engeleere (DuuÉ—e Solomon)", + "en_SC": "Engeleere (Seysel)", + "en_SD": "Engeleere (Sudaan)", + "en_SE": "Engeleere (Suweed)", + "en_SG": "Engeleere (Sinngapuur)", + "en_SH": "Engeleere (Sent Helen)", + "en_SI": "Engeleere (Slowenii)", + "en_SL": "Engeleere (Seraa liyon)", + "en_SZ": "Engeleere (Swaasilannda)", + "en_TC": "Engeleere (DuuÉ—e Turke e Keikoos)", + "en_TK": "Engeleere (Tokelaaw)", + "en_TO": "Engeleere (Tonngaa)", + "en_TT": "Engeleere (Tirnidaad e Tobaago)", + "en_TV": "Engeleere (Tuwaluu)", + "en_TZ": "Engeleere (Tansanii)", + "en_UG": "Engeleere (Unganndaa)", + "en_US": "Engeleere (Dowlaaji DentuÉ—i Amerik)", + "en_VC": "Engeleere (See Weesaa e Garnadiin)", + "en_VG": "Engeleere (duuÉ—e kecce britanii)", + "en_VI": "Engeleere (DuuÉ—e Kecce Amerik)", + "en_VU": "Engeleere (Wanuwaatuu)", + "en_WS": "Engeleere (Samowaa)", + "en_ZA": "Engeleere (Afrik bÅ‹ Worgo)", + "en_ZM": "Engeleere (Sammbi)", + "en_ZW": "Engeleere (Simbaabuwe)", + "es": "Español", + "es_AR": "Español (Arjantiin)", + "es_BO": "Español (Boliwii)", + "es_BR": "Español (Beresiil)", + "es_CL": "Español (Cilii)", + "es_CO": "Español (Kolombiya)", + "es_CR": "Español (Kosta Rikaa)", + "es_CU": "Español (Kubaa)", + "es_DO": "Español (Ndenndanndi Dominika)", + "es_EC": "Español (Ekuwatoor)", + "es_ES": "Español (Espaañ)", + "es_GQ": "Español (Ginee Ekuwaatoriyaal)", + "es_GT": "Español (Gwaatemalaa)", + "es_HN": "Español (Onnduraas)", + "es_MX": "Español (Meksik)", + "es_NI": "Español (Nikaraguwaa)", + "es_PA": "Español (Panamaa)", + "es_PE": "Español (Peru)", + "es_PH": "Español (Filipiin)", + "es_PR": "Español (Porto Rikoo)", + "es_PY": "Español (Paraguwaay)", + "es_SV": "Español (El Salwador)", + "es_US": "Español (Dowlaaji DentuÉ—i Amerik)", + "es_UY": "Español (Uruguwaay)", + "es_VE": "Español (Wenesuwelaa)", + "fa": "Perseere", + "fa_AF": "Perseere (Afganistaan)", + "fa_IR": "Perseere (Iraan)", + "ff": "Pulaar", + "ff_CM": "Pulaar (Kameruun)", + "ff_GN": "Pulaar (Gine)", + "ff_MR": "Pulaar (Muritani)", + "ff_SN": "Pulaar (Senegaal)", + "fr": "Farayseere", + "fr_BE": "Farayseere (Beljik)", + "fr_BF": "Farayseere (Burkibaa Faaso)", + "fr_BI": "Farayseere (Burunndi)", + "fr_BJ": "Farayseere (Benee)", + "fr_CA": "Farayseere (Kanadaa)", + "fr_CD": "Farayseere (Ndenndaandi Demokaraasiire Konngo)", + "fr_CF": "Farayseere (Ndenndaandi Santarafrik)", + "fr_CG": "Farayseere (Konngo)", + "fr_CH": "Farayseere (Suwiis)", + "fr_CI": "Farayseere (Kodduwaar)", + "fr_CM": "Farayseere (Kameruun)", + "fr_DJ": "Farayseere (Jibutii)", + "fr_DZ": "Farayseere (Alaseri)", + "fr_FR": "Farayseere (Farayse)", + "fr_GA": "Farayseere (Gaboo)", + "fr_GF": "Farayseere (Giyaan Farayse)", + "fr_GN": "Farayseere (Gine)", + "fr_GP": "Farayseere (Gwaadalup)", + "fr_GQ": "Farayseere (Ginee Ekuwaatoriyaal)", + "fr_HT": "Farayseere (Haytii)", + "fr_KM": "Farayseere (Komoor)", + "fr_LU": "Farayseere (Liksembuur)", + "fr_MA": "Farayseere (Maruk)", + "fr_MC": "Farayseere (Monaakoo)", + "fr_MG": "Farayseere (Madagaskaar)", + "fr_ML": "Farayseere (Maali)", + "fr_MQ": "Farayseere (Martinik)", + "fr_MR": "Farayseere (Muritani)", + "fr_MU": "Farayseere (Moriis)", + "fr_NC": "Farayseere (Nuwel Kaledonii)", + "fr_NE": "Farayseere (Nijeer)", + "fr_PF": "Farayseere (Polinesii Farayse)", + "fr_PM": "Farayseere (See Piyeer e Mikeloo)", + "fr_RE": "Farayseere (Rewiñoo)", + "fr_RW": "Farayseere (Ruwanndaa)", + "fr_SC": "Farayseere (Seysel)", + "fr_SN": "Farayseere (Senegaal)", + "fr_SY": "Farayseere (Sirii)", + "fr_TD": "Farayseere (Caad)", + "fr_TG": "Farayseere (Togoo)", + "fr_TN": "Farayseere (Tunisii)", + "fr_VU": "Farayseere (Wanuwaatuu)", + "fr_WF": "Farayseere (Walis e Futuna)", + "fr_YT": "Farayseere (Mayoot)", + "ha": "HawsaÅ‹koore", + "ha_GH": "HawsaÅ‹koore (Ganaa)", + "ha_NE": "HawsaÅ‹koore (Nijeer)", + "ha_NG": "HawsaÅ‹koore (Nijeriyaa)", + "hi": "Hinndi", + "hi_IN": "Hinndi (Enndo)", + "hu": "Hongariire", + "hu_HU": "Hongariire (Onngiri)", + "id": "Endonesiire", + "id_ID": "Endonesiire (Enndonesii)", + "ig": "Igiboore", + "ig_NG": "Igiboore (Nijeriyaa)", + "it": "Italiyeere", + "it_CH": "Italiyeere (Suwiis)", + "it_IT": "Italiyeere (Itali)", + "it_SM": "Italiyeere (See Maree)", + "ja": "Saponeere", + "ja_JP": "Saponeere (Sapoo)", + "km": "Kemeere", + "km_KH": "Kemeere (Kambodso)", + "ko": "Koreere", + "ko_KP": "Koreere (Koree Rewo)", + "ko_KR": "Koreere (Koree Worgo)", + "ms": "Malayeere", + "ms_BN": "Malayeere (Burnaay)", + "ms_MY": "Malayeere (Malesii)", + "ms_SG": "Malayeere (Sinngapuur)", + "my": "Burmeese", + "my_MM": "Burmeese (Miyamaar)", + "ne": "Nepaaleere", + "ne_IN": "Nepaaleere (Enndo)", + "ne_NP": "Nepaaleere (Nepaal)", + "nl": "Dacceere", + "nl_AW": "Dacceere (Aruuba)", + "nl_BE": "Dacceere (Beljik)", + "nl_NL": "Dacceere (Nederlannda)", + "nl_SR": "Dacceere (Surinaam)", + "pa": "Punjabeere", + "pa_IN": "Punjabeere (Enndo)", + "pa_PK": "Punjabeere (Pakistaan)", + "pl": "Poloneere", + "pl_PL": "Poloneere (Poloñ)", + "pt": "Purtugeere", + "pt_AO": "Purtugeere (Anngolaa)", + "pt_BR": "Purtugeere (Beresiil)", + "pt_CH": "Purtugeere (Suwiis)", + "pt_CV": "Purtugeere (DuuÉ—e Kap Weer)", + "pt_GQ": "Purtugeere (Ginee Ekuwaatoriyaal)", + "pt_GW": "Purtugeere (Gine-Bisaawo)", + "pt_LU": "Purtugeere (Liksembuur)", + "pt_MZ": "Purtugeere (Mosammbik)", + "pt_PT": "Purtugeere (Purtugaal)", + "pt_ST": "Purtugeere (Sawo Tome e Perensipe)", + "pt_TL": "Purtugeere (Timoor FuÉ—naange)", + "ro": "Romaneere", + "ro_MD": "Romaneere (Moldawii)", + "ro_RO": "Romaneere (Rumanii)", + "ru": "Riis", + "ru_BY": "Riis (Belaruus)", + "ru_KG": "Riis (Kirgistaan)", + "ru_KZ": "Riis (Kasakstaan)", + "ru_MD": "Riis (Moldawii)", + "ru_RU": "Riis (Riisii)", + "ru_UA": "Riis (Ukereen)", + "rw": "Ruwaanndeere", + "rw_RW": "Ruwaanndeere (Ruwanndaa)", + "so": "Somalii", + "so_DJ": "Somalii (Jibutii)", + "so_ET": "Somalii (Ecoppi)", + "so_KE": "Somalii (Keñaa)", + "so_SO": "Somalii (Somalii)", + "sv": "Sweedeere", + "sv_FI": "Sweedeere (Fenland)", + "sv_SE": "Sweedeere (Suweed)", + "ta": "Tamil", + "ta_IN": "Tamil (Enndo)", + "ta_LK": "Tamil (Siri Lanka)", + "ta_MY": "Tamil (Malesii)", + "ta_SG": "Tamil (Sinngapuur)", + "th": "Taay", + "th_TH": "Taay (Taylannda)", + "tr": "Turkeere", + "tr_CY": "Turkeere (Siipar)", + "tr_TR": "Turkeere (Turkii)", + "uk": "Ukereneere", + "uk_UA": "Ukereneere (Ukereen)", + "ur": "Urdu", + "ur_IN": "Urdu (Enndo)", + "ur_PK": "Urdu (Pakistaan)", + "vi": "Wiyetnameere", + "vi_VN": "Wiyetnameere (Wiyetnaam)", + "yo": "Yorrubaa", + "yo_BJ": "Yorrubaa (Benee)", + "yo_NG": "Yorrubaa (Nijeriyaa)", + "zh": "Sinuwaare", + "zh_CN": "Sinuwaare (Siin)", + "zh_SG": "Sinuwaare (Sinngapuur)", + "zh_TW": "Sinuwaare (Taywaan)", + "zu": "SuluÅ‹koore", + "zu_ZA": "SuluÅ‹koore (Afrik bÅ‹ Worgo)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fi.json new file mode 100644 index 0000000000000000000000000000000000000000..4f78e3d7a90ad29600e7bbdccb12c3e1d6e65ea1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fi.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibia)", + "af_ZA": "afrikaans (Etelä-Afrikka)", + "ak": "akan", + "ak_GH": "akan (Ghana)", + "am": "amhara", + "am_ET": "amhara (Etiopia)", + "ar": "arabia", + "ar_AE": "arabia (Arabiemiirikunnat)", + "ar_BH": "arabia (Bahrain)", + "ar_DJ": "arabia (Djibouti)", + "ar_DZ": "arabia (Algeria)", + "ar_EG": "arabia (Egypti)", + "ar_EH": "arabia (Länsi-Sahara)", + "ar_ER": "arabia (Eritrea)", + "ar_IL": "arabia (Israel)", + "ar_IQ": "arabia (Irak)", + "ar_JO": "arabia (Jordania)", + "ar_KM": "arabia (Komorit)", + "ar_KW": "arabia (Kuwait)", + "ar_LB": "arabia (Libanon)", + "ar_LY": "arabia (Libya)", + "ar_MA": "arabia (Marokko)", + "ar_MR": "arabia (Mauritania)", + "ar_OM": "arabia (Oman)", + "ar_PS": "arabia (Palestiinalaisalueet)", + "ar_QA": "arabia (Qatar)", + "ar_SA": "arabia (Saudi-Arabia)", + "ar_SD": "arabia (Sudan)", + "ar_SO": "arabia (Somalia)", + "ar_SS": "arabia (Etelä-Sudan)", + "ar_SY": "arabia (Syyria)", + "ar_TD": "arabia (TÅ¡ad)", + "ar_TN": "arabia (Tunisia)", + "ar_YE": "arabia (Jemen)", + "as": "assami", + "as_IN": "assami (Intia)", + "az": "azeri", + "az_AZ": "azeri (Azerbaidžan)", + "az_Cyrl": "azeri (kyrillinen)", + "az_Cyrl_AZ": "azeri (kyrillinen, Azerbaidžan)", + "az_Latn": "azeri (latinalainen)", + "az_Latn_AZ": "azeri (latinalainen, Azerbaidžan)", + "be": "valkovenäjä", + "be_BY": "valkovenäjä (Valko-Venäjä)", + "bg": "bulgaria", + "bg_BG": "bulgaria (Bulgaria)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengali", + "bn_BD": "bengali (Bangladesh)", + "bn_IN": "bengali (Intia)", + "bo": "tiibet", + "bo_CN": "tiibet (Kiina)", + "bo_IN": "tiibet (Intia)", + "br": "bretoni", + "br_FR": "bretoni (Ranska)", + "bs": "bosnia", + "bs_BA": "bosnia (Bosnia ja Hertsegovina)", + "bs_Cyrl": "bosnia (kyrillinen)", + "bs_Cyrl_BA": "bosnia (kyrillinen, Bosnia ja Hertsegovina)", + "bs_Latn": "bosnia (latinalainen)", + "bs_Latn_BA": "bosnia (latinalainen, Bosnia ja Hertsegovina)", + "ca": "katalaani", + "ca_AD": "katalaani (Andorra)", + "ca_ES": "katalaani (Espanja)", + "ca_FR": "katalaani (Ranska)", + "ca_IT": "katalaani (Italia)", + "ce": "tÅ¡etÅ¡eeni", + "ce_RU": "tÅ¡etÅ¡eeni (Venäjä)", + "cs": "tÅ¡ekki", + "cs_CZ": "tÅ¡ekki (TÅ¡ekki)", + "cy": "kymri", + "cy_GB": "kymri (Iso-Britannia)", + "da": "tanska", + "da_DK": "tanska (Tanska)", + "da_GL": "tanska (Grönlanti)", + "de": "saksa", + "de_AT": "saksa (Itävalta)", + "de_BE": "saksa (Belgia)", + "de_CH": "saksa (Sveitsi)", + "de_DE": "saksa (Saksa)", + "de_IT": "saksa (Italia)", + "de_LI": "saksa (Liechtenstein)", + "de_LU": "saksa (Luxemburg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhutan)", + "ee": "ewe", + "ee_GH": "ewe (Ghana)", + "ee_TG": "ewe (Togo)", + "el": "kreikka", + "el_CY": "kreikka (Kypros)", + "el_GR": "kreikka (Kreikka)", + "en": "englanti", + "en_AG": "englanti (Antigua ja Barbuda)", + "en_AI": "englanti (Anguilla)", + "en_AS": "englanti (Amerikan Samoa)", + "en_AT": "englanti (Itävalta)", + "en_AU": "englanti (Australia)", + "en_BB": "englanti (Barbados)", + "en_BE": "englanti (Belgia)", + "en_BI": "englanti (Burundi)", + "en_BM": "englanti (Bermuda)", + "en_BS": "englanti (Bahama)", + "en_BW": "englanti (Botswana)", + "en_BZ": "englanti (Belize)", + "en_CA": "englanti (Kanada)", + "en_CC": "englanti (Kookossaaret (Keelingsaaret))", + "en_CH": "englanti (Sveitsi)", + "en_CK": "englanti (Cookinsaaret)", + "en_CM": "englanti (Kamerun)", + "en_CX": "englanti (Joulusaari)", + "en_CY": "englanti (Kypros)", + "en_DE": "englanti (Saksa)", + "en_DG": "englanti (Diego Garcia)", + "en_DK": "englanti (Tanska)", + "en_DM": "englanti (Dominica)", + "en_ER": "englanti (Eritrea)", + "en_FI": "englanti (Suomi)", + "en_FJ": "englanti (Fidži)", + "en_FK": "englanti (Falklandinsaaret)", + "en_FM": "englanti (Mikronesian liittovaltio)", + "en_GB": "englanti (Iso-Britannia)", + "en_GD": "englanti (Grenada)", + "en_GG": "englanti (Guernsey)", + "en_GH": "englanti (Ghana)", + "en_GI": "englanti (Gibraltar)", + "en_GM": "englanti (Gambia)", + "en_GU": "englanti (Guam)", + "en_GY": "englanti (Guyana)", + "en_HK": "englanti (Hongkong – Kiinan e.h.a.)", + "en_IE": "englanti (Irlanti)", + "en_IL": "englanti (Israel)", + "en_IM": "englanti (Mansaari)", + "en_IN": "englanti (Intia)", + "en_IO": "englanti (Brittiläinen Intian valtameren alue)", + "en_JE": "englanti (Jersey)", + "en_JM": "englanti (Jamaika)", + "en_KE": "englanti (Kenia)", + "en_KI": "englanti (Kiribati)", + "en_KN": "englanti (Saint Kitts ja Nevis)", + "en_KY": "englanti (Caymansaaret)", + "en_LC": "englanti (Saint Lucia)", + "en_LR": "englanti (Liberia)", + "en_LS": "englanti (Lesotho)", + "en_MG": "englanti (Madagaskar)", + "en_MH": "englanti (Marshallinsaaret)", + "en_MO": "englanti (Macao – Kiinan e.h.a.)", + "en_MP": "englanti (Pohjois-Mariaanit)", + "en_MS": "englanti (Montserrat)", + "en_MT": "englanti (Malta)", + "en_MU": "englanti (Mauritius)", + "en_MW": "englanti (Malawi)", + "en_MY": "englanti (Malesia)", + "en_NA": "englanti (Namibia)", + "en_NF": "englanti (Norfolkinsaari)", + "en_NG": "englanti (Nigeria)", + "en_NL": "englanti (Alankomaat)", + "en_NR": "englanti (Nauru)", + "en_NU": "englanti (Niue)", + "en_NZ": "englanti (Uusi-Seelanti)", + "en_PG": "englanti (Papua-Uusi-Guinea)", + "en_PH": "englanti (Filippiinit)", + "en_PK": "englanti (Pakistan)", + "en_PN": "englanti (Pitcairn)", + "en_PR": "englanti (Puerto Rico)", + "en_PW": "englanti (Palau)", + "en_RW": "englanti (Ruanda)", + "en_SB": "englanti (Salomonsaaret)", + "en_SC": "englanti (Seychellit)", + "en_SD": "englanti (Sudan)", + "en_SE": "englanti (Ruotsi)", + "en_SG": "englanti (Singapore)", + "en_SH": "englanti (Saint Helena)", + "en_SI": "englanti (Slovenia)", + "en_SL": "englanti (Sierra Leone)", + "en_SS": "englanti (Etelä-Sudan)", + "en_SX": "englanti (Sint Maarten)", + "en_SZ": "englanti (Swazimaa)", + "en_TC": "englanti (Turks- ja Caicossaaret)", + "en_TK": "englanti (Tokelau)", + "en_TO": "englanti (Tonga)", + "en_TT": "englanti (Trinidad ja Tobago)", + "en_TV": "englanti (Tuvalu)", + "en_TZ": "englanti (Tansania)", + "en_UG": "englanti (Uganda)", + "en_UM": "englanti (Yhdysvaltain erillissaaret)", + "en_US": "englanti (Yhdysvallat)", + "en_VC": "englanti (Saint Vincent ja Grenadiinit)", + "en_VG": "englanti (Brittiläiset Neitsytsaaret)", + "en_VI": "englanti (Yhdysvaltain Neitsytsaaret)", + "en_VU": "englanti (Vanuatu)", + "en_WS": "englanti (Samoa)", + "en_ZA": "englanti (Etelä-Afrikka)", + "en_ZM": "englanti (Sambia)", + "en_ZW": "englanti (Zimbabwe)", + "eo": "esperanto", + "es": "espanja", + "es_AR": "espanja (Argentiina)", + "es_BO": "espanja (Bolivia)", + "es_BR": "espanja (Brasilia)", + "es_CL": "espanja (Chile)", + "es_CO": "espanja (Kolumbia)", + "es_CR": "espanja (Costa Rica)", + "es_CU": "espanja (Kuuba)", + "es_DO": "espanja (Dominikaaninen tasavalta)", + "es_EA": "espanja (Ceuta ja Melilla)", + "es_EC": "espanja (Ecuador)", + "es_ES": "espanja (Espanja)", + "es_GQ": "espanja (Päiväntasaajan Guinea)", + "es_GT": "espanja (Guatemala)", + "es_HN": "espanja (Honduras)", + "es_IC": "espanja (Kanariansaaret)", + "es_MX": "espanja (Meksiko)", + "es_NI": "espanja (Nicaragua)", + "es_PA": "espanja (Panama)", + "es_PE": "espanja (Peru)", + "es_PH": "espanja (Filippiinit)", + "es_PR": "espanja (Puerto Rico)", + "es_PY": "espanja (Paraguay)", + "es_SV": "espanja (El Salvador)", + "es_US": "espanja (Yhdysvallat)", + "es_UY": "espanja (Uruguay)", + "es_VE": "espanja (Venezuela)", + "et": "viro", + "et_EE": "viro (Viro)", + "eu": "baski", + "eu_ES": "baski (Espanja)", + "fa": "farsi", + "fa_AF": "farsi (Afganistan)", + "fa_IR": "farsi (Iran)", + "ff": "fulani", + "ff_CM": "fulani (Kamerun)", + "ff_GN": "fulani (Guinea)", + "ff_MR": "fulani (Mauritania)", + "ff_SN": "fulani (Senegal)", + "fi": "suomi", + "fi_FI": "suomi (Suomi)", + "fo": "fääri", + "fo_DK": "fääri (Tanska)", + "fo_FO": "fääri (Färsaaret)", + "fr": "ranska", + "fr_BE": "ranska (Belgia)", + "fr_BF": "ranska (Burkina Faso)", + "fr_BI": "ranska (Burundi)", + "fr_BJ": "ranska (Benin)", + "fr_BL": "ranska (Saint-Barthélemy)", + "fr_CA": "ranska (Kanada)", + "fr_CD": "ranska (Kongon demokraattinen tasavalta)", + "fr_CF": "ranska (Keski-Afrikan tasavalta)", + "fr_CG": "ranska (Kongon tasavalta)", + "fr_CH": "ranska (Sveitsi)", + "fr_CI": "ranska (Norsunluurannikko)", + "fr_CM": "ranska (Kamerun)", + "fr_DJ": "ranska (Djibouti)", + "fr_DZ": "ranska (Algeria)", + "fr_FR": "ranska (Ranska)", + "fr_GA": "ranska (Gabon)", + "fr_GF": "ranska (Ranskan Guayana)", + "fr_GN": "ranska (Guinea)", + "fr_GP": "ranska (Guadeloupe)", + "fr_GQ": "ranska (Päiväntasaajan Guinea)", + "fr_HT": "ranska (Haiti)", + "fr_KM": "ranska (Komorit)", + "fr_LU": "ranska (Luxemburg)", + "fr_MA": "ranska (Marokko)", + "fr_MC": "ranska (Monaco)", + "fr_MF": "ranska (Saint-Martin)", + "fr_MG": "ranska (Madagaskar)", + "fr_ML": "ranska (Mali)", + "fr_MQ": "ranska (Martinique)", + "fr_MR": "ranska (Mauritania)", + "fr_MU": "ranska (Mauritius)", + "fr_NC": "ranska (Uusi-Kaledonia)", + "fr_NE": "ranska (Niger)", + "fr_PF": "ranska (Ranskan Polynesia)", + "fr_PM": "ranska (Saint-Pierre ja Miquelon)", + "fr_RE": "ranska (Réunion)", + "fr_RW": "ranska (Ruanda)", + "fr_SC": "ranska (Seychellit)", + "fr_SN": "ranska (Senegal)", + "fr_SY": "ranska (Syyria)", + "fr_TD": "ranska (TÅ¡ad)", + "fr_TG": "ranska (Togo)", + "fr_TN": "ranska (Tunisia)", + "fr_VU": "ranska (Vanuatu)", + "fr_WF": "ranska (Wallis ja Futuna)", + "fr_YT": "ranska (Mayotte)", + "fy": "länsifriisi", + "fy_NL": "länsifriisi (Alankomaat)", + "ga": "iiri", + "ga_IE": "iiri (Irlanti)", + "gd": "gaeli", + "gd_GB": "gaeli (Iso-Britannia)", + "gl": "galicia", + "gl_ES": "galicia (Espanja)", + "gu": "gudžarati", + "gu_IN": "gudžarati (Intia)", + "gv": "manksi", + "gv_IM": "manksi (Mansaari)", + "ha": "hausa", + "ha_GH": "hausa (Ghana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigeria)", + "he": "heprea", + "he_IL": "heprea (Israel)", + "hi": "hindi", + "hi_IN": "hindi (Intia)", + "hr": "kroatia", + "hr_BA": "kroatia (Bosnia ja Hertsegovina)", + "hr_HR": "kroatia (Kroatia)", + "hu": "unkari", + "hu_HU": "unkari (Unkari)", + "hy": "armenia", + "hy_AM": "armenia (Armenia)", + "id": "indonesia", + "id_ID": "indonesia (Indonesia)", + "ig": "igbo", + "ig_NG": "igbo (Nigeria)", + "ii": "sichuanin-yi", + "ii_CN": "sichuanin-yi (Kiina)", + "is": "islanti", + "is_IS": "islanti (Islanti)", + "it": "italia", + "it_CH": "italia (Sveitsi)", + "it_IT": "italia (Italia)", + "it_SM": "italia (San Marino)", + "ja": "japani", + "ja_JP": "japani (Japani)", + "ka": "georgia", + "ka_GE": "georgia (Georgia)", + "ki": "kikuju", + "ki_KE": "kikuju (Kenia)", + "kk": "kazakki", + "kk_KZ": "kazakki (Kazakstan)", + "kl": "kalaallisut", + "kl_GL": "kalaallisut (Grönlanti)", + "km": "khmer", + "km_KH": "khmer (Kambodža)", + "kn": "kannada", + "kn_IN": "kannada (Intia)", + "ko": "korea", + "ko_KP": "korea (Pohjois-Korea)", + "ko_KR": "korea (Etelä-Korea)", + "ks": "kaÅ¡miri", + "ks_IN": "kaÅ¡miri (Intia)", + "kw": "korni", + "kw_GB": "korni (Iso-Britannia)", + "ky": "kirgiisi", + "ky_KG": "kirgiisi (Kirgisia)", + "lb": "luxemburg", + "lb_LU": "luxemburg (Luxemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongon demokraattinen tasavalta)", + "ln_CF": "lingala (Keski-Afrikan tasavalta)", + "ln_CG": "lingala (Kongon tasavalta)", + "lo": "lao", + "lo_LA": "lao (Laos)", + "lt": "liettua", + "lt_LT": "liettua (Liettua)", + "lu": "katanganluba", + "lu_CD": "katanganluba (Kongon demokraattinen tasavalta)", + "lv": "latvia", + "lv_LV": "latvia (Latvia)", + "mg": "malagassi", + "mg_MG": "malagassi (Madagaskar)", + "mk": "makedonia", + "mk_MK": "makedonia (Makedonia)", + "ml": "malajalam", + "ml_IN": "malajalam (Intia)", + "mn": "mongoli", + "mn_MN": "mongoli (Mongolia)", + "mr": "marathi", + "mr_IN": "marathi (Intia)", + "ms": "malaiji", + "ms_BN": "malaiji (Brunei)", + "ms_MY": "malaiji (Malesia)", + "ms_SG": "malaiji (Singapore)", + "mt": "malta", + "mt_MT": "malta (Malta)", + "my": "burma", + "my_MM": "burma (Myanmar (Burma))", + "nb": "norjan bokmÃ¥l", + "nb_NO": "norjan bokmÃ¥l (Norja)", + "nb_SJ": "norjan bokmÃ¥l (Huippuvuoret ja Jan Mayen)", + "nd": "pohjois-ndebele", + "nd_ZW": "pohjois-ndebele (Zimbabwe)", + "ne": "nepali", + "ne_IN": "nepali (Intia)", + "ne_NP": "nepali (Nepal)", + "nl": "hollanti", + "nl_AW": "hollanti (Aruba)", + "nl_BE": "hollanti (Belgia)", + "nl_BQ": "hollanti (Karibian Alankomaat)", + "nl_CW": "hollanti (Curaçao)", + "nl_NL": "hollanti (Alankomaat)", + "nl_SR": "hollanti (Suriname)", + "nl_SX": "hollanti (Sint Maarten)", + "nn": "norjan nynorsk", + "nn_NO": "norjan nynorsk (Norja)", + "no": "norja", + "no_NO": "norja (Norja)", + "om": "oromo", + "om_ET": "oromo (Etiopia)", + "om_KE": "oromo (Kenia)", + "or": "orija", + "or_IN": "orija (Intia)", + "os": "osseetti", + "os_GE": "osseetti (Georgia)", + "os_RU": "osseetti (Venäjä)", + "pa": "pandžabi", + "pa_Arab": "pandžabi (arabialainen)", + "pa_Arab_PK": "pandžabi (arabialainen, Pakistan)", + "pa_Guru": "pandžabi (gurmukhi)", + "pa_Guru_IN": "pandžabi (gurmukhi, Intia)", + "pa_IN": "pandžabi (Intia)", + "pa_PK": "pandžabi (Pakistan)", + "pl": "puola", + "pl_PL": "puola (Puola)", + "ps": "paÅ¡tu", + "ps_AF": "paÅ¡tu (Afganistan)", + "pt": "portugali", + "pt_AO": "portugali (Angola)", + "pt_BR": "portugali (Brasilia)", + "pt_CH": "portugali (Sveitsi)", + "pt_CV": "portugali (Kap Verde)", + "pt_GQ": "portugali (Päiväntasaajan Guinea)", + "pt_GW": "portugali (Guinea-Bissau)", + "pt_LU": "portugali (Luxemburg)", + "pt_MO": "portugali (Macao – Kiinan e.h.a.)", + "pt_MZ": "portugali (Mosambik)", + "pt_PT": "portugali (Portugali)", + "pt_ST": "portugali (São Tomé ja Príncipe)", + "pt_TL": "portugali (Itä-Timor)", + "qu": "ketÅ¡ua", + "qu_BO": "ketÅ¡ua (Bolivia)", + "qu_EC": "ketÅ¡ua (Ecuador)", + "qu_PE": "ketÅ¡ua (Peru)", + "rm": "retoromaani", + "rm_CH": "retoromaani (Sveitsi)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "romania", + "ro_MD": "romania (Moldova)", + "ro_RO": "romania (Romania)", + "ru": "venäjä", + "ru_BY": "venäjä (Valko-Venäjä)", + "ru_KG": "venäjä (Kirgisia)", + "ru_KZ": "venäjä (Kazakstan)", + "ru_MD": "venäjä (Moldova)", + "ru_RU": "venäjä (Venäjä)", + "ru_UA": "venäjä (Ukraina)", + "rw": "ruanda", + "rw_RW": "ruanda (Ruanda)", + "se": "pohjoissaame", + "se_FI": "pohjoissaame (Suomi)", + "se_NO": "pohjoissaame (Norja)", + "se_SE": "pohjoissaame (Ruotsi)", + "sg": "sango", + "sg_CF": "sango (Keski-Afrikan tasavalta)", + "sh": "serbokroaatti", + "sh_BA": "serbokroaatti (Bosnia ja Hertsegovina)", + "si": "sinhala", + "si_LK": "sinhala (Sri Lanka)", + "sk": "slovakki", + "sk_SK": "slovakki (Slovakia)", + "sl": "sloveeni", + "sl_SI": "sloveeni (Slovenia)", + "sn": "Å¡ona", + "sn_ZW": "Å¡ona (Zimbabwe)", + "so": "somali", + "so_DJ": "somali (Djibouti)", + "so_ET": "somali (Etiopia)", + "so_KE": "somali (Kenia)", + "so_SO": "somali (Somalia)", + "sq": "albania", + "sq_AL": "albania (Albania)", + "sq_MK": "albania (Makedonia)", + "sq_XK": "albania (Kosovo)", + "sr": "serbia", + "sr_BA": "serbia (Bosnia ja Hertsegovina)", + "sr_Cyrl": "serbia (kyrillinen)", + "sr_Cyrl_BA": "serbia (kyrillinen, Bosnia ja Hertsegovina)", + "sr_Cyrl_ME": "serbia (kyrillinen, Montenegro)", + "sr_Cyrl_RS": "serbia (kyrillinen, Serbia)", + "sr_Cyrl_XK": "serbia (kyrillinen, Kosovo)", + "sr_Latn": "serbia (latinalainen)", + "sr_Latn_BA": "serbia (latinalainen, Bosnia ja Hertsegovina)", + "sr_Latn_ME": "serbia (latinalainen, Montenegro)", + "sr_Latn_RS": "serbia (latinalainen, Serbia)", + "sr_Latn_XK": "serbia (latinalainen, Kosovo)", + "sr_ME": "serbia (Montenegro)", + "sr_RS": "serbia (Serbia)", + "sr_XK": "serbia (Kosovo)", + "sv": "ruotsi", + "sv_AX": "ruotsi (Ahvenanmaa)", + "sv_FI": "ruotsi (Suomi)", + "sv_SE": "ruotsi (Ruotsi)", + "sw": "swahili", + "sw_CD": "swahili (Kongon demokraattinen tasavalta)", + "sw_KE": "swahili (Kenia)", + "sw_TZ": "swahili (Tansania)", + "sw_UG": "swahili (Uganda)", + "ta": "tamili", + "ta_IN": "tamili (Intia)", + "ta_LK": "tamili (Sri Lanka)", + "ta_MY": "tamili (Malesia)", + "ta_SG": "tamili (Singapore)", + "te": "telugu", + "te_IN": "telugu (Intia)", + "th": "thai", + "th_TH": "thai (Thaimaa)", + "ti": "tigrinja", + "ti_ER": "tigrinja (Eritrea)", + "ti_ET": "tigrinja (Etiopia)", + "tl": "tagalog", + "tl_PH": "tagalog (Filippiinit)", + "to": "tonga", + "to_TO": "tonga (Tonga)", + "tr": "turkki", + "tr_CY": "turkki (Kypros)", + "tr_TR": "turkki (Turkki)", + "ug": "uiguuri", + "ug_CN": "uiguuri (Kiina)", + "uk": "ukraina", + "uk_UA": "ukraina (Ukraina)", + "ur": "urdu", + "ur_IN": "urdu (Intia)", + "ur_PK": "urdu (Pakistan)", + "uz": "uzbekki", + "uz_AF": "uzbekki (Afganistan)", + "uz_Arab": "uzbekki (arabialainen)", + "uz_Arab_AF": "uzbekki (arabialainen, Afganistan)", + "uz_Cyrl": "uzbekki (kyrillinen)", + "uz_Cyrl_UZ": "uzbekki (kyrillinen, Uzbekistan)", + "uz_Latn": "uzbekki (latinalainen)", + "uz_Latn_UZ": "uzbekki (latinalainen, Uzbekistan)", + "uz_UZ": "uzbekki (Uzbekistan)", + "vi": "vietnam", + "vi_VN": "vietnam (Vietnam)", + "yi": "jiddiÅ¡", + "yo": "joruba", + "yo_BJ": "joruba (Benin)", + "yo_NG": "joruba (Nigeria)", + "zh": "kiina", + "zh_CN": "kiina (Kiina)", + "zh_HK": "kiina (Hongkong – Kiinan e.h.a.)", + "zh_Hans": "kiina (yksinkertaistettu han)", + "zh_Hans_CN": "kiina (yksinkertaistettu han, Kiina)", + "zh_Hans_HK": "kiina (yksinkertaistettu han, Hongkong – Kiinan e.h.a.)", + "zh_Hans_MO": "kiina (yksinkertaistettu han, Macao – Kiinan e.h.a.)", + "zh_Hans_SG": "kiina (yksinkertaistettu han, Singapore)", + "zh_Hant": "kiina (perinteinen han)", + "zh_Hant_HK": "kiina (perinteinen han, Hongkong – Kiinan e.h.a.)", + "zh_Hant_MO": "kiina (perinteinen han, Macao – Kiinan e.h.a.)", + "zh_Hant_TW": "kiina (perinteinen han, Taiwan)", + "zh_MO": "kiina (Macao – Kiinan e.h.a.)", + "zh_SG": "kiina (Singapore)", + "zh_TW": "kiina (Taiwan)", + "zu": "zulu", + "zu_ZA": "zulu (Etelä-Afrikka)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fo.json new file mode 100644 index 0000000000000000000000000000000000000000..bf30d9e83239fb109484f779c8855d4d274bc328 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fo.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibia)", + "af_ZA": "afrikaans (Suðurafrika)", + "ak": "akan", + "ak_GH": "akan (Gana)", + "am": "amhariskt", + "am_ET": "amhariskt (Etiopia)", + "ar": "arabiskt", + "ar_AE": "arabiskt (Sameindu Emirríkini)", + "ar_BH": "arabiskt (Barein)", + "ar_DJ": "arabiskt (Djibuti)", + "ar_DZ": "arabiskt (Algeria)", + "ar_EG": "arabiskt (Egyptaland)", + "ar_EH": "arabiskt (Vestursahara)", + "ar_ER": "arabiskt (Eritrea)", + "ar_IL": "arabiskt (Ãsrael)", + "ar_IQ": "arabiskt (Irak)", + "ar_JO": "arabiskt (Jordan)", + "ar_KM": "arabiskt (Komoroyggjar)", + "ar_KW": "arabiskt (Kuvait)", + "ar_LB": "arabiskt (Libanon)", + "ar_LY": "arabiskt (Libya)", + "ar_MA": "arabiskt (Marokko)", + "ar_MR": "arabiskt (Móritania)", + "ar_OM": "arabiskt (Oman)", + "ar_PS": "arabiskt (Palestinskt landøki)", + "ar_QA": "arabiskt (Katar)", + "ar_SA": "arabiskt (Saudiarabia)", + "ar_SD": "arabiskt (Sudan)", + "ar_SO": "arabiskt (Somalia)", + "ar_SS": "arabiskt (Suðursudan)", + "ar_SY": "arabiskt (Sýria)", + "ar_TD": "arabiskt (Kjad)", + "ar_TN": "arabiskt (Tunesia)", + "ar_YE": "arabiskt (Jemen)", + "as": "assamesiskt", + "as_IN": "assamesiskt (India)", + "az": "aserbajdsjanskt", + "az_AZ": "aserbajdsjanskt (Aserbadjan)", + "az_Cyrl": "aserbajdsjanskt (kyrilliskt)", + "az_Cyrl_AZ": "aserbajdsjanskt (kyrilliskt, Aserbadjan)", + "az_Latn": "aserbajdsjanskt (latínskt)", + "az_Latn_AZ": "aserbajdsjanskt (latínskt, Aserbadjan)", + "be": "hvitarussiskt", + "be_BY": "hvitarussiskt (Hvítarussland)", + "bg": "bulgarskt", + "bg_BG": "bulgarskt (Bulgaria)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengalskt", + "bn_BD": "bengalskt (Bangladesj)", + "bn_IN": "bengalskt (India)", + "bo": "tibetskt", + "bo_CN": "tibetskt (Kina)", + "bo_IN": "tibetskt (India)", + "br": "bretonskt", + "br_FR": "bretonskt (Frakland)", + "bs": "bosniskt", + "bs_BA": "bosniskt (Bosnia-Hersegovina)", + "bs_Cyrl": "bosniskt (kyrilliskt)", + "bs_Cyrl_BA": "bosniskt (kyrilliskt, Bosnia-Hersegovina)", + "bs_Latn": "bosniskt (latínskt)", + "bs_Latn_BA": "bosniskt (latínskt, Bosnia-Hersegovina)", + "ca": "katalani", + "ca_AD": "katalani (Andorra)", + "ca_ES": "katalani (Spania)", + "ca_FR": "katalani (Frakland)", + "ca_IT": "katalani (Italia)", + "ce": "tjetjenskt", + "ce_RU": "tjetjenskt (Russland)", + "cs": "kekkiskt", + "cs_CZ": "kekkiskt (Kekkia)", + "cy": "walisiskt", + "cy_GB": "walisiskt (Stórabretland)", + "da": "danskt", + "da_DK": "danskt (Danmark)", + "da_GL": "danskt (Grønland)", + "de": "týskt", + "de_AT": "týskt (Eysturríki)", + "de_BE": "týskt (Belgia)", + "de_CH": "týskt (Sveis)", + "de_DE": "týskt (Týskland)", + "de_IT": "týskt (Italia)", + "de_LI": "týskt (Liktinstein)", + "de_LU": "týskt (Luksemborg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Butan)", + "ee": "ewe", + "ee_GH": "ewe (Gana)", + "ee_TG": "ewe (Togo)", + "el": "grikskt", + "el_CY": "grikskt (Kýpros)", + "el_GR": "grikskt (Grikkaland)", + "en": "enskt", + "en_AG": "enskt (Antigua & Barbuda)", + "en_AI": "enskt (Anguilla)", + "en_AS": "enskt (Amerikanska Samoa)", + "en_AT": "enskt (Eysturríki)", + "en_AU": "enskt (Avstralia)", + "en_BB": "enskt (Barbados)", + "en_BE": "enskt (Belgia)", + "en_BI": "enskt (Burundi)", + "en_BM": "enskt (Bermuda)", + "en_BS": "enskt (Bahamaoyggjar)", + "en_BW": "enskt (Botsvana)", + "en_BZ": "enskt (Belis)", + "en_CA": "enskt (Kanada)", + "en_CC": "enskt (Kokosoyggjar)", + "en_CH": "enskt (Sveis)", + "en_CK": "enskt (Cooksoyggjar)", + "en_CM": "enskt (Kamerun)", + "en_CX": "enskt (Jólaoyggjin)", + "en_CY": "enskt (Kýpros)", + "en_DE": "enskt (Týskland)", + "en_DG": "enskt (Diego Garcia)", + "en_DK": "enskt (Danmark)", + "en_DM": "enskt (Dominika)", + "en_ER": "enskt (Eritrea)", + "en_FI": "enskt (Finnland)", + "en_FJ": "enskt (Fiji)", + "en_FK": "enskt (Falklandsoyggjar)", + "en_FM": "enskt (Mikronesiasamveldið)", + "en_GB": "enskt (Stórabretland)", + "en_GD": "enskt (Grenada)", + "en_GG": "enskt (Guernsey)", + "en_GH": "enskt (Gana)", + "en_GI": "enskt (Gibraltar)", + "en_GM": "enskt (Gambia)", + "en_GU": "enskt (Guam)", + "en_GY": "enskt (Gujana)", + "en_HK": "enskt (Hong Kong SAR Kina)", + "en_IE": "enskt (Ãrland)", + "en_IL": "enskt (Ãsrael)", + "en_IM": "enskt (Isle of Man)", + "en_IN": "enskt (India)", + "en_IO": "enskt (Stóra Bretlands Indiahavoyggjar)", + "en_JE": "enskt (Jersey)", + "en_JM": "enskt (Jamaika)", + "en_KE": "enskt (Kenja)", + "en_KI": "enskt (Kiribati)", + "en_KN": "enskt (St. Kitts & Nevis)", + "en_KY": "enskt (Caymanoyggjar)", + "en_LC": "enskt (St. Lusia)", + "en_LR": "enskt (Liberia)", + "en_LS": "enskt (Lesoto)", + "en_MG": "enskt (Madagaskar)", + "en_MH": "enskt (Marshalloyggjar)", + "en_MO": "enskt (Makao SAR Kina)", + "en_MP": "enskt (Norðaru Mariuoyggjar)", + "en_MS": "enskt (Montserrat)", + "en_MT": "enskt (Malta)", + "en_MU": "enskt (Móritius)", + "en_MW": "enskt (Malavi)", + "en_MY": "enskt (Malaisia)", + "en_NA": "enskt (Namibia)", + "en_NF": "enskt (Norfolksoyggj)", + "en_NG": "enskt (Nigeria)", + "en_NL": "enskt (Niðurlond)", + "en_NR": "enskt (Nauru)", + "en_NU": "enskt (Niue)", + "en_NZ": "enskt (Nýsæland)", + "en_PG": "enskt (Papua Nýguinea)", + "en_PH": "enskt (Filipsoyggjar)", + "en_PK": "enskt (Pakistan)", + "en_PN": "enskt (Pitcairnoyggjar)", + "en_PR": "enskt (Puerto Riko)", + "en_PW": "enskt (Palau)", + "en_RW": "enskt (Ruanda)", + "en_SB": "enskt (Salomonoyggjar)", + "en_SC": "enskt (Seyskelloyggjar)", + "en_SD": "enskt (Sudan)", + "en_SE": "enskt (Svøríki)", + "en_SG": "enskt (Singapor)", + "en_SH": "enskt (St. Helena)", + "en_SI": "enskt (Slovenia)", + "en_SL": "enskt (Sierra Leona)", + "en_SS": "enskt (Suðursudan)", + "en_SX": "enskt (Sint Maarten)", + "en_SZ": "enskt (Svasiland)", + "en_TC": "enskt (Turks- og Caicosoyggjar)", + "en_TK": "enskt (Tokelau)", + "en_TO": "enskt (Tonga)", + "en_TT": "enskt (Trinidad & Tobago)", + "en_TV": "enskt (Tuvalu)", + "en_TZ": "enskt (Tansania)", + "en_UG": "enskt (Uganda)", + "en_UM": "enskt (Sambandsríki Amerikas fjarskotnu oyggjar)", + "en_US": "enskt (Sambandsríki Amerika)", + "en_VC": "enskt (St. Vinsent & Grenadinoyggjar)", + "en_VG": "enskt (Stóra Bretlands Jomfrúoyggjar)", + "en_VI": "enskt (Sambandsríki Amerikas Jomfrúoyggjar)", + "en_VU": "enskt (Vanuatu)", + "en_WS": "enskt (Samoa)", + "en_ZA": "enskt (Suðurafrika)", + "en_ZM": "enskt (Sambia)", + "en_ZW": "enskt (Simbabvi)", + "eo": "esperanto", + "es": "spanskt", + "es_AR": "spanskt (Argentina)", + "es_BO": "spanskt (Bolivia)", + "es_BR": "spanskt (Brasil)", + "es_CL": "spanskt (Kili)", + "es_CO": "spanskt (Kolombia)", + "es_CR": "spanskt (Kosta Rika)", + "es_CU": "spanskt (Kuba)", + "es_DO": "spanskt (Dominikalýðveldið)", + "es_EA": "spanskt (Ceuta og Melilla)", + "es_EC": "spanskt (Ekvador)", + "es_ES": "spanskt (Spania)", + "es_GQ": "spanskt (Ekvatorguinea)", + "es_GT": "spanskt (Guatemala)", + "es_HN": "spanskt (Honduras)", + "es_IC": "spanskt (Kanariuoyggjar)", + "es_MX": "spanskt (Meksiko)", + "es_NI": "spanskt (Nikaragua)", + "es_PA": "spanskt (Panama)", + "es_PE": "spanskt (Peru)", + "es_PH": "spanskt (Filipsoyggjar)", + "es_PR": "spanskt (Puerto Riko)", + "es_PY": "spanskt (Paraguai)", + "es_SV": "spanskt (El Salvador)", + "es_US": "spanskt (Sambandsríki Amerika)", + "es_UY": "spanskt (Uruguai)", + "es_VE": "spanskt (Venesuela)", + "et": "estiskt", + "et_EE": "estiskt (Estland)", + "eu": "baskiskt", + "eu_ES": "baskiskt (Spania)", + "fa": "persiskt", + "fa_AF": "persiskt (Afganistan)", + "fa_IR": "persiskt (Iran)", + "ff": "fulah", + "ff_CM": "fulah (Kamerun)", + "ff_GN": "fulah (Guinea)", + "ff_MR": "fulah (Móritania)", + "ff_SN": "fulah (Senegal)", + "fi": "finskt", + "fi_FI": "finskt (Finnland)", + "fo": "føroyskt", + "fo_DK": "føroyskt (Danmark)", + "fo_FO": "føroyskt (Føroyar)", + "fr": "franskt", + "fr_BE": "franskt (Belgia)", + "fr_BF": "franskt (Burkina Faso)", + "fr_BI": "franskt (Burundi)", + "fr_BJ": "franskt (Benin)", + "fr_BL": "franskt (St-Barthélemy)", + "fr_CA": "franskt (Kanada)", + "fr_CD": "franskt (Kongo, Dem. Lýðveldið)", + "fr_CF": "franskt (Miðafrikalýðveldið)", + "fr_CG": "franskt (Kongo)", + "fr_CH": "franskt (Sveis)", + "fr_CI": "franskt (Fílabeinsstrondin)", + "fr_CM": "franskt (Kamerun)", + "fr_DJ": "franskt (Djibuti)", + "fr_DZ": "franskt (Algeria)", + "fr_FR": "franskt (Frakland)", + "fr_GA": "franskt (Gabon)", + "fr_GF": "franskt (Franska Gujana)", + "fr_GN": "franskt (Guinea)", + "fr_GP": "franskt (Guadeloupe)", + "fr_GQ": "franskt (Ekvatorguinea)", + "fr_HT": "franskt (Haiti)", + "fr_KM": "franskt (Komoroyggjar)", + "fr_LU": "franskt (Luksemborg)", + "fr_MA": "franskt (Marokko)", + "fr_MC": "franskt (Monako)", + "fr_MF": "franskt (St-Martin)", + "fr_MG": "franskt (Madagaskar)", + "fr_ML": "franskt (Mali)", + "fr_MQ": "franskt (Martinique)", + "fr_MR": "franskt (Móritania)", + "fr_MU": "franskt (Móritius)", + "fr_NC": "franskt (Nýkaledónia)", + "fr_NE": "franskt (Niger)", + "fr_PF": "franskt (Franska Polynesia)", + "fr_PM": "franskt (Saint Pierre og Miquelon)", + "fr_RE": "franskt (Réunion)", + "fr_RW": "franskt (Ruanda)", + "fr_SC": "franskt (Seyskelloyggjar)", + "fr_SN": "franskt (Senegal)", + "fr_SY": "franskt (Sýria)", + "fr_TD": "franskt (Kjad)", + "fr_TG": "franskt (Togo)", + "fr_TN": "franskt (Tunesia)", + "fr_VU": "franskt (Vanuatu)", + "fr_WF": "franskt (Wallis- og Futunaoyggjar)", + "fr_YT": "franskt (Mayotte)", + "fy": "vestur frísiskt", + "fy_NL": "vestur frísiskt (Niðurlond)", + "ga": "írskt", + "ga_IE": "írskt (Ãrland)", + "gd": "skotskt gæliskt", + "gd_GB": "skotskt gæliskt (Stórabretland)", + "gl": "galisiskt", + "gl_ES": "galisiskt (Spania)", + "gu": "gujarati", + "gu_IN": "gujarati (India)", + "gv": "manx", + "gv_IM": "manx (Isle of Man)", + "ha": "hausa", + "ha_GH": "hausa (Gana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigeria)", + "he": "hebraiskt", + "he_IL": "hebraiskt (Ãsrael)", + "hi": "hindi", + "hi_IN": "hindi (India)", + "hr": "kroatiskt", + "hr_BA": "kroatiskt (Bosnia-Hersegovina)", + "hr_HR": "kroatiskt (Kroatia)", + "hu": "ungarskt", + "hu_HU": "ungarskt (Ungarn)", + "hy": "armenskt", + "hy_AM": "armenskt (Armenia)", + "id": "indonesiskt", + "id_ID": "indonesiskt (Indonesia)", + "ig": "igbo", + "ig_NG": "igbo (Nigeria)", + "ii": "sichuan yi", + "ii_CN": "sichuan yi (Kina)", + "is": "íslendskt", + "is_IS": "íslendskt (Ãsland)", + "it": "italskt", + "it_CH": "italskt (Sveis)", + "it_IT": "italskt (Italia)", + "it_SM": "italskt (San Marino)", + "ja": "japanskt", + "ja_JP": "japanskt (Japan)", + "ka": "georgiskt", + "ka_GE": "georgiskt (Georgia)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenja)", + "kk": "kazakh", + "kk_KZ": "kazakh (Kasakstan)", + "kl": "kalaallisut", + "kl_GL": "kalaallisut (Grønland)", + "km": "khmer", + "km_KH": "khmer (Kambodja)", + "kn": "kannada", + "kn_IN": "kannada (India)", + "ko": "koreanskt", + "ko_KP": "koreanskt (Norðurkorea)", + "ko_KR": "koreanskt (Suðurkorea)", + "ks": "kashmiri", + "ks_IN": "kashmiri (India)", + "kw": "corniskt", + "kw_GB": "corniskt (Stórabretland)", + "ky": "kyrgyz", + "ky_KG": "kyrgyz (Kirgisia)", + "lb": "luksemborgskt", + "lb_LU": "luksemborgskt (Luksemborg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongo, Dem. Lýðveldið)", + "ln_CF": "lingala (Miðafrikalýðveldið)", + "ln_CG": "lingala (Kongo)", + "lo": "laoskt", + "lo_LA": "laoskt (Laos)", + "lt": "litaviskt", + "lt_LT": "litaviskt (Litava)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Kongo, Dem. Lýðveldið)", + "lv": "lettiskt", + "lv_LV": "lettiskt (Lettland)", + "mg": "malagassiskt", + "mg_MG": "malagassiskt (Madagaskar)", + "mk": "makedónskt", + "mk_MK": "makedónskt (Makedónia)", + "ml": "malayalam", + "ml_IN": "malayalam (India)", + "mn": "mongolskt", + "mn_MN": "mongolskt (Mongolia)", + "mr": "marathi", + "mr_IN": "marathi (India)", + "ms": "malaiiskt", + "ms_BN": "malaiiskt (Brunei)", + "ms_MY": "malaiiskt (Malaisia)", + "ms_SG": "malaiiskt (Singapor)", + "mt": "maltiskt", + "mt_MT": "maltiskt (Malta)", + "my": "burmesiskt", + "my_MM": "burmesiskt (Myanmar (Burma))", + "nb": "norskt bókmál", + "nb_NO": "norskt bókmál (Noreg)", + "nb_SJ": "norskt bókmál (Svalbard & Jan Mayen)", + "nd": "norður ndebele", + "nd_ZW": "norður ndebele (Simbabvi)", + "ne": "nepalskt", + "ne_IN": "nepalskt (India)", + "ne_NP": "nepalskt (Nepal)", + "nl": "hálendskt", + "nl_AW": "hálendskt (Aruba)", + "nl_BE": "hálendskt (Belgia)", + "nl_BQ": "hálendskt (Niðurlonds Karibia)", + "nl_CW": "hálendskt (Curaçao)", + "nl_NL": "hálendskt (Niðurlond)", + "nl_SR": "hálendskt (Surinam)", + "nl_SX": "hálendskt (Sint Maarten)", + "nn": "nýnorskt", + "nn_NO": "nýnorskt (Noreg)", + "no": "norskt", + "no_NO": "norskt (Noreg)", + "om": "oromo", + "om_ET": "oromo (Etiopia)", + "om_KE": "oromo (Kenja)", + "or": "oriya", + "or_IN": "oriya (India)", + "os": "ossetiskt", + "os_GE": "ossetiskt (Georgia)", + "os_RU": "ossetiskt (Russland)", + "pa": "punjabi", + "pa_Arab": "punjabi (arabisk)", + "pa_Arab_PK": "punjabi (arabisk, Pakistan)", + "pa_Guru": "punjabi (gurmukhi)", + "pa_Guru_IN": "punjabi (gurmukhi, India)", + "pa_IN": "punjabi (India)", + "pa_PK": "punjabi (Pakistan)", + "pl": "pólskt", + "pl_PL": "pólskt (Pólland)", + "ps": "pashto", + "ps_AF": "pashto (Afganistan)", + "pt": "portugiskiskt", + "pt_AO": "portugiskiskt (Angola)", + "pt_BR": "portugiskiskt (Brasil)", + "pt_CH": "portugiskiskt (Sveis)", + "pt_CV": "portugiskiskt (Grønhøvdaoyggjar)", + "pt_GQ": "portugiskiskt (Ekvatorguinea)", + "pt_GW": "portugiskiskt (Guinea-Bissau)", + "pt_LU": "portugiskiskt (Luksemborg)", + "pt_MO": "portugiskiskt (Makao SAR Kina)", + "pt_MZ": "portugiskiskt (Mosambik)", + "pt_PT": "portugiskiskt (Portugal)", + "pt_ST": "portugiskiskt (Sao Tome & Prinsipi)", + "pt_TL": "portugiskiskt (Eysturtimor)", + "qu": "quechua", + "qu_BO": "quechua (Bolivia)", + "qu_EC": "quechua (Ekvador)", + "qu_PE": "quechua (Peru)", + "rm": "retoromanskt", + "rm_CH": "retoromanskt (Sveis)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumenskt", + "ro_MD": "rumenskt (Moldova)", + "ro_RO": "rumenskt (Rumenia)", + "ru": "russiskt", + "ru_BY": "russiskt (Hvítarussland)", + "ru_KG": "russiskt (Kirgisia)", + "ru_KZ": "russiskt (Kasakstan)", + "ru_MD": "russiskt (Moldova)", + "ru_RU": "russiskt (Russland)", + "ru_UA": "russiskt (Ukraina)", + "rw": "kinyarwanda", + "rw_RW": "kinyarwanda (Ruanda)", + "se": "norður sámiskt", + "se_FI": "norður sámiskt (Finnland)", + "se_NO": "norður sámiskt (Noreg)", + "se_SE": "norður sámiskt (Svøríki)", + "sg": "sango", + "sg_CF": "sango (Miðafrikalýðveldið)", + "sh": "serbokroatiskt", + "sh_BA": "serbokroatiskt (Bosnia-Hersegovina)", + "si": "singalesiskt", + "si_LK": "singalesiskt (Sri Lanka)", + "sk": "slovakiskt", + "sk_SK": "slovakiskt (Slovakia)", + "sl": "slovenskt", + "sl_SI": "slovenskt (Slovenia)", + "sn": "shona", + "sn_ZW": "shona (Simbabvi)", + "so": "somaliskt", + "so_DJ": "somaliskt (Djibuti)", + "so_ET": "somaliskt (Etiopia)", + "so_KE": "somaliskt (Kenja)", + "so_SO": "somaliskt (Somalia)", + "sq": "albanskt", + "sq_AL": "albanskt (Albania)", + "sq_MK": "albanskt (Makedónia)", + "sq_XK": "albanskt (Kosovo)", + "sr": "serbiskt", + "sr_BA": "serbiskt (Bosnia-Hersegovina)", + "sr_Cyrl": "serbiskt (kyrilliskt)", + "sr_Cyrl_BA": "serbiskt (kyrilliskt, Bosnia-Hersegovina)", + "sr_Cyrl_ME": "serbiskt (kyrilliskt, Montenegro)", + "sr_Cyrl_RS": "serbiskt (kyrilliskt, Serbia)", + "sr_Cyrl_XK": "serbiskt (kyrilliskt, Kosovo)", + "sr_Latn": "serbiskt (latínskt)", + "sr_Latn_BA": "serbiskt (latínskt, Bosnia-Hersegovina)", + "sr_Latn_ME": "serbiskt (latínskt, Montenegro)", + "sr_Latn_RS": "serbiskt (latínskt, Serbia)", + "sr_Latn_XK": "serbiskt (latínskt, Kosovo)", + "sr_ME": "serbiskt (Montenegro)", + "sr_RS": "serbiskt (Serbia)", + "sr_XK": "serbiskt (Kosovo)", + "sv": "svenskt", + "sv_AX": "svenskt (Ãland)", + "sv_FI": "svenskt (Finnland)", + "sv_SE": "svenskt (Svøríki)", + "sw": "swahili", + "sw_CD": "swahili (Kongo, Dem. Lýðveldið)", + "sw_KE": "swahili (Kenja)", + "sw_TZ": "swahili (Tansania)", + "sw_UG": "swahili (Uganda)", + "ta": "tamilskt", + "ta_IN": "tamilskt (India)", + "ta_LK": "tamilskt (Sri Lanka)", + "ta_MY": "tamilskt (Malaisia)", + "ta_SG": "tamilskt (Singapor)", + "te": "telugu", + "te_IN": "telugu (India)", + "th": "tailendskt", + "th_TH": "tailendskt (Tailand)", + "ti": "tigrinya", + "ti_ER": "tigrinya (Eritrea)", + "ti_ET": "tigrinya (Etiopia)", + "tl": "tagalog", + "tl_PH": "tagalog (Filipsoyggjar)", + "to": "tonganskt", + "to_TO": "tonganskt (Tonga)", + "tr": "turkiskt", + "tr_CY": "turkiskt (Kýpros)", + "tr_TR": "turkiskt (Turkaland)", + "ug": "uyghur", + "ug_CN": "uyghur (Kina)", + "uk": "ukrainskt", + "uk_UA": "ukrainskt (Ukraina)", + "ur": "urdu", + "ur_IN": "urdu (India)", + "ur_PK": "urdu (Pakistan)", + "uz": "usbekiskt", + "uz_AF": "usbekiskt (Afganistan)", + "uz_Arab": "usbekiskt (arabisk)", + "uz_Arab_AF": "usbekiskt (arabisk, Afganistan)", + "uz_Cyrl": "usbekiskt (kyrilliskt)", + "uz_Cyrl_UZ": "usbekiskt (kyrilliskt, Usbekistan)", + "uz_Latn": "usbekiskt (latínskt)", + "uz_Latn_UZ": "usbekiskt (latínskt, Usbekistan)", + "uz_UZ": "usbekiskt (Usbekistan)", + "vi": "vjetnamesiskt", + "vi_VN": "vjetnamesiskt (Vjetnam)", + "yi": "jiddiskt", + "yo": "yoruba", + "yo_BJ": "yoruba (Benin)", + "yo_NG": "yoruba (Nigeria)", + "zh": "kinesiskt", + "zh_CN": "kinesiskt (Kina)", + "zh_HK": "kinesiskt (Hong Kong SAR Kina)", + "zh_Hans": "kinesiskt (einkult)", + "zh_Hans_CN": "kinesiskt (einkult, Kina)", + "zh_Hans_HK": "kinesiskt (einkult, Hong Kong SAR Kina)", + "zh_Hans_MO": "kinesiskt (einkult, Makao SAR Kina)", + "zh_Hans_SG": "kinesiskt (einkult, Singapor)", + "zh_Hant": "kinesiskt (vanligt)", + "zh_Hant_HK": "kinesiskt (vanligt, Hong Kong SAR Kina)", + "zh_Hant_MO": "kinesiskt (vanligt, Makao SAR Kina)", + "zh_Hant_TW": "kinesiskt (vanligt, Taivan)", + "zh_MO": "kinesiskt (Makao SAR Kina)", + "zh_SG": "kinesiskt (Singapor)", + "zh_TW": "kinesiskt (Taivan)", + "zu": "sulu", + "zu_ZA": "sulu (Suðurafrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fr.json new file mode 100644 index 0000000000000000000000000000000000000000..9dd7d0134998879a3eb3a055aeae5bc1c4d99e5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fr.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibie)", + "af_ZA": "afrikaans (Afrique du Sud)", + "ak": "akan", + "ak_GH": "akan (Ghana)", + "am": "amharique", + "am_ET": "amharique (Éthiopie)", + "ar": "arabe", + "ar_AE": "arabe (Émirats arabes unis)", + "ar_BH": "arabe (Bahreïn)", + "ar_DJ": "arabe (Djibouti)", + "ar_DZ": "arabe (Algérie)", + "ar_EG": "arabe (Égypte)", + "ar_EH": "arabe (Sahara occidental)", + "ar_ER": "arabe (Érythrée)", + "ar_IL": "arabe (Israël)", + "ar_IQ": "arabe (Irak)", + "ar_JO": "arabe (Jordanie)", + "ar_KM": "arabe (Comores)", + "ar_KW": "arabe (Koweït)", + "ar_LB": "arabe (Liban)", + "ar_LY": "arabe (Libye)", + "ar_MA": "arabe (Maroc)", + "ar_MR": "arabe (Mauritanie)", + "ar_OM": "arabe (Oman)", + "ar_PS": "arabe (Territoires palestiniens)", + "ar_QA": "arabe (Qatar)", + "ar_SA": "arabe (Arabie saoudite)", + "ar_SD": "arabe (Soudan)", + "ar_SO": "arabe (Somalie)", + "ar_SS": "arabe (Soudan du Sud)", + "ar_SY": "arabe (Syrie)", + "ar_TD": "arabe (Tchad)", + "ar_TN": "arabe (Tunisie)", + "ar_YE": "arabe (Yémen)", + "as": "assamais", + "as_IN": "assamais (Inde)", + "az": "azéri", + "az_AZ": "azéri (Azerbaïdjan)", + "az_Cyrl": "azéri (cyrillique)", + "az_Cyrl_AZ": "azéri (cyrillique, Azerbaïdjan)", + "az_Latn": "azéri (latin)", + "az_Latn_AZ": "azéri (latin, Azerbaïdjan)", + "be": "biélorusse", + "be_BY": "biélorusse (Biélorussie)", + "bg": "bulgare", + "bg_BG": "bulgare (Bulgarie)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengali", + "bn_BD": "bengali (Bangladesh)", + "bn_IN": "bengali (Inde)", + "bo": "tibétain", + "bo_CN": "tibétain (Chine)", + "bo_IN": "tibétain (Inde)", + "br": "breton", + "br_FR": "breton (France)", + "bs": "bosniaque", + "bs_BA": "bosniaque (Bosnie-Herzégovine)", + "bs_Cyrl": "bosniaque (cyrillique)", + "bs_Cyrl_BA": "bosniaque (cyrillique, Bosnie-Herzégovine)", + "bs_Latn": "bosniaque (latin)", + "bs_Latn_BA": "bosniaque (latin, Bosnie-Herzégovine)", + "ca": "catalan", + "ca_AD": "catalan (Andorre)", + "ca_ES": "catalan (Espagne)", + "ca_FR": "catalan (France)", + "ca_IT": "catalan (Italie)", + "ce": "tchétchène", + "ce_RU": "tchétchène (Russie)", + "cs": "tchèque", + "cs_CZ": "tchèque (République tchèque)", + "cy": "gallois", + "cy_GB": "gallois (Royaume-Uni)", + "da": "danois", + "da_DK": "danois (Danemark)", + "da_GL": "danois (Groenland)", + "de": "allemand", + "de_AT": "allemand (Autriche)", + "de_BE": "allemand (Belgique)", + "de_CH": "allemand (Suisse)", + "de_DE": "allemand (Allemagne)", + "de_IT": "allemand (Italie)", + "de_LI": "allemand (Liechtenstein)", + "de_LU": "allemand (Luxembourg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhoutan)", + "ee": "éwé", + "ee_GH": "éwé (Ghana)", + "ee_TG": "éwé (Togo)", + "el": "grec", + "el_CY": "grec (Chypre)", + "el_GR": "grec (Grèce)", + "en": "anglais", + "en_AG": "anglais (Antigua-et-Barbuda)", + "en_AI": "anglais (Anguilla)", + "en_AS": "anglais (Samoa américaines)", + "en_AT": "anglais (Autriche)", + "en_AU": "anglais (Australie)", + "en_BB": "anglais (Barbade)", + "en_BE": "anglais (Belgique)", + "en_BI": "anglais (Burundi)", + "en_BM": "anglais (Bermudes)", + "en_BS": "anglais (Bahamas)", + "en_BW": "anglais (Botswana)", + "en_BZ": "anglais (Belize)", + "en_CA": "anglais (Canada)", + "en_CC": "anglais (ÃŽles Cocos)", + "en_CH": "anglais (Suisse)", + "en_CK": "anglais (ÃŽles Cook)", + "en_CM": "anglais (Cameroun)", + "en_CX": "anglais (ÃŽle Christmas)", + "en_CY": "anglais (Chypre)", + "en_DE": "anglais (Allemagne)", + "en_DG": "anglais (Diego Garcia)", + "en_DK": "anglais (Danemark)", + "en_DM": "anglais (Dominique)", + "en_ER": "anglais (Érythrée)", + "en_FI": "anglais (Finlande)", + "en_FJ": "anglais (Fidji)", + "en_FK": "anglais (ÃŽles Malouines)", + "en_FM": "anglais (États fédérés de Micronésie)", + "en_GB": "anglais (Royaume-Uni)", + "en_GD": "anglais (Grenade)", + "en_GG": "anglais (Guernesey)", + "en_GH": "anglais (Ghana)", + "en_GI": "anglais (Gibraltar)", + "en_GM": "anglais (Gambie)", + "en_GU": "anglais (Guam)", + "en_GY": "anglais (Guyana)", + "en_HK": "anglais (R.A.S. chinoise de Hong Kong)", + "en_IE": "anglais (Irlande)", + "en_IL": "anglais (Israël)", + "en_IM": "anglais (ÃŽle de Man)", + "en_IN": "anglais (Inde)", + "en_IO": "anglais (Territoire britannique de l’océan Indien)", + "en_JE": "anglais (Jersey)", + "en_JM": "anglais (Jamaïque)", + "en_KE": "anglais (Kenya)", + "en_KI": "anglais (Kiribati)", + "en_KN": "anglais (Saint-Christophe-et-Niévès)", + "en_KY": "anglais (ÃŽles Caïmans)", + "en_LC": "anglais (Sainte-Lucie)", + "en_LR": "anglais (Libéria)", + "en_LS": "anglais (Lesotho)", + "en_MG": "anglais (Madagascar)", + "en_MH": "anglais (ÃŽles Marshall)", + "en_MO": "anglais (R.A.S. chinoise de Macao)", + "en_MP": "anglais (ÃŽles Mariannes du Nord)", + "en_MS": "anglais (Montserrat)", + "en_MT": "anglais (Malte)", + "en_MU": "anglais (Maurice)", + "en_MW": "anglais (Malawi)", + "en_MY": "anglais (Malaisie)", + "en_NA": "anglais (Namibie)", + "en_NF": "anglais (ÃŽle Norfolk)", + "en_NG": "anglais (Nigéria)", + "en_NL": "anglais (Pays-Bas)", + "en_NR": "anglais (Nauru)", + "en_NU": "anglais (Niue)", + "en_NZ": "anglais (Nouvelle-Zélande)", + "en_PG": "anglais (Papouasie-Nouvelle-Guinée)", + "en_PH": "anglais (Philippines)", + "en_PK": "anglais (Pakistan)", + "en_PN": "anglais (ÃŽles Pitcairn)", + "en_PR": "anglais (Porto Rico)", + "en_PW": "anglais (Palaos)", + "en_RW": "anglais (Rwanda)", + "en_SB": "anglais (ÃŽles Salomon)", + "en_SC": "anglais (Seychelles)", + "en_SD": "anglais (Soudan)", + "en_SE": "anglais (Suède)", + "en_SG": "anglais (Singapour)", + "en_SH": "anglais (Sainte-Hélène)", + "en_SI": "anglais (Slovénie)", + "en_SL": "anglais (Sierra Leone)", + "en_SS": "anglais (Soudan du Sud)", + "en_SX": "anglais (Saint-Martin (partie néerlandaise))", + "en_SZ": "anglais (Swaziland)", + "en_TC": "anglais (ÃŽles Turques-et-Caïques)", + "en_TK": "anglais (Tokélaou)", + "en_TO": "anglais (Tonga)", + "en_TT": "anglais (Trinité-et-Tobago)", + "en_TV": "anglais (Tuvalu)", + "en_TZ": "anglais (Tanzanie)", + "en_UG": "anglais (Ouganda)", + "en_UM": "anglais (ÃŽles mineures éloignées des États-Unis)", + "en_US": "anglais (États-Unis)", + "en_VC": "anglais (Saint-Vincent-et-les-Grenadines)", + "en_VG": "anglais (ÃŽles Vierges britanniques)", + "en_VI": "anglais (ÃŽles Vierges des États-Unis)", + "en_VU": "anglais (Vanuatu)", + "en_WS": "anglais (Samoa)", + "en_ZA": "anglais (Afrique du Sud)", + "en_ZM": "anglais (Zambie)", + "en_ZW": "anglais (Zimbabwe)", + "eo": "espéranto", + "es": "espagnol", + "es_AR": "espagnol (Argentine)", + "es_BO": "espagnol (Bolivie)", + "es_BR": "espagnol (Brésil)", + "es_CL": "espagnol (Chili)", + "es_CO": "espagnol (Colombie)", + "es_CR": "espagnol (Costa Rica)", + "es_CU": "espagnol (Cuba)", + "es_DO": "espagnol (République dominicaine)", + "es_EA": "espagnol (Ceuta et Melilla)", + "es_EC": "espagnol (Équateur)", + "es_ES": "espagnol (Espagne)", + "es_GQ": "espagnol (Guinée équatoriale)", + "es_GT": "espagnol (Guatemala)", + "es_HN": "espagnol (Honduras)", + "es_IC": "espagnol (ÃŽles Canaries)", + "es_MX": "espagnol (Mexique)", + "es_NI": "espagnol (Nicaragua)", + "es_PA": "espagnol (Panama)", + "es_PE": "espagnol (Pérou)", + "es_PH": "espagnol (Philippines)", + "es_PR": "espagnol (Porto Rico)", + "es_PY": "espagnol (Paraguay)", + "es_SV": "espagnol (El Salvador)", + "es_US": "espagnol (États-Unis)", + "es_UY": "espagnol (Uruguay)", + "es_VE": "espagnol (Venezuela)", + "et": "estonien", + "et_EE": "estonien (Estonie)", + "eu": "basque", + "eu_ES": "basque (Espagne)", + "fa": "persan", + "fa_AF": "persan (Afghanistan)", + "fa_IR": "persan (Iran)", + "ff": "peul", + "ff_CM": "peul (Cameroun)", + "ff_GN": "peul (Guinée)", + "ff_MR": "peul (Mauritanie)", + "ff_SN": "peul (Sénégal)", + "fi": "finnois", + "fi_FI": "finnois (Finlande)", + "fo": "féroïen", + "fo_DK": "féroïen (Danemark)", + "fo_FO": "féroïen (ÃŽles Féroé)", + "fr": "français", + "fr_BE": "français (Belgique)", + "fr_BF": "français (Burkina Faso)", + "fr_BI": "français (Burundi)", + "fr_BJ": "français (Bénin)", + "fr_BL": "français (Saint-Barthélemy)", + "fr_CA": "français (Canada)", + "fr_CD": "français (Congo-Kinshasa)", + "fr_CF": "français (République centrafricaine)", + "fr_CG": "français (Congo-Brazzaville)", + "fr_CH": "français (Suisse)", + "fr_CI": "français (Côte d’Ivoire)", + "fr_CM": "français (Cameroun)", + "fr_DJ": "français (Djibouti)", + "fr_DZ": "français (Algérie)", + "fr_FR": "français (France)", + "fr_GA": "français (Gabon)", + "fr_GF": "français (Guyane française)", + "fr_GN": "français (Guinée)", + "fr_GP": "français (Guadeloupe)", + "fr_GQ": "français (Guinée équatoriale)", + "fr_HT": "français (Haïti)", + "fr_KM": "français (Comores)", + "fr_LU": "français (Luxembourg)", + "fr_MA": "français (Maroc)", + "fr_MC": "français (Monaco)", + "fr_MF": "français (Saint-Martin)", + "fr_MG": "français (Madagascar)", + "fr_ML": "français (Mali)", + "fr_MQ": "français (Martinique)", + "fr_MR": "français (Mauritanie)", + "fr_MU": "français (Maurice)", + "fr_NC": "français (Nouvelle-Calédonie)", + "fr_NE": "français (Niger)", + "fr_PF": "français (Polynésie française)", + "fr_PM": "français (Saint-Pierre-et-Miquelon)", + "fr_RE": "français (La Réunion)", + "fr_RW": "français (Rwanda)", + "fr_SC": "français (Seychelles)", + "fr_SN": "français (Sénégal)", + "fr_SY": "français (Syrie)", + "fr_TD": "français (Tchad)", + "fr_TG": "français (Togo)", + "fr_TN": "français (Tunisie)", + "fr_VU": "français (Vanuatu)", + "fr_WF": "français (Wallis-et-Futuna)", + "fr_YT": "français (Mayotte)", + "fy": "frison occidental", + "fy_NL": "frison occidental (Pays-Bas)", + "ga": "irlandais", + "ga_IE": "irlandais (Irlande)", + "gd": "gaélique écossais", + "gd_GB": "gaélique écossais (Royaume-Uni)", + "gl": "galicien", + "gl_ES": "galicien (Espagne)", + "gu": "goudjerati", + "gu_IN": "goudjerati (Inde)", + "gv": "mannois", + "gv_IM": "mannois (ÃŽle de Man)", + "ha": "haoussa", + "ha_GH": "haoussa (Ghana)", + "ha_NE": "haoussa (Niger)", + "ha_NG": "haoussa (Nigéria)", + "he": "hébreu", + "he_IL": "hébreu (Israël)", + "hi": "hindi", + "hi_IN": "hindi (Inde)", + "hr": "croate", + "hr_BA": "croate (Bosnie-Herzégovine)", + "hr_HR": "croate (Croatie)", + "hu": "hongrois", + "hu_HU": "hongrois (Hongrie)", + "hy": "arménien", + "hy_AM": "arménien (Arménie)", + "id": "indonésien", + "id_ID": "indonésien (Indonésie)", + "ig": "igbo", + "ig_NG": "igbo (Nigéria)", + "ii": "yi du Sichuan", + "ii_CN": "yi du Sichuan (Chine)", + "is": "islandais", + "is_IS": "islandais (Islande)", + "it": "italien", + "it_CH": "italien (Suisse)", + "it_IT": "italien (Italie)", + "it_SM": "italien (Saint-Marin)", + "ja": "japonais", + "ja_JP": "japonais (Japon)", + "ka": "géorgien", + "ka_GE": "géorgien (Géorgie)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenya)", + "kk": "kazakh", + "kk_KZ": "kazakh (Kazakhstan)", + "kl": "groenlandais", + "kl_GL": "groenlandais (Groenland)", + "km": "khmer", + "km_KH": "khmer (Cambodge)", + "kn": "kannada", + "kn_IN": "kannada (Inde)", + "ko": "coréen", + "ko_KP": "coréen (Corée du Nord)", + "ko_KR": "coréen (Corée du Sud)", + "ks": "kashmiri", + "ks_IN": "kashmiri (Inde)", + "kw": "cornique", + "kw_GB": "cornique (Royaume-Uni)", + "ky": "kirghize", + "ky_KG": "kirghize (Kirghizistan)", + "lb": "luxembourgeois", + "lb_LU": "luxembourgeois (Luxembourg)", + "lg": "ganda", + "lg_UG": "ganda (Ouganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Congo-Kinshasa)", + "ln_CF": "lingala (République centrafricaine)", + "ln_CG": "lingala (Congo-Brazzaville)", + "lo": "lao", + "lo_LA": "lao (Laos)", + "lt": "lituanien", + "lt_LT": "lituanien (Lituanie)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Congo-Kinshasa)", + "lv": "letton", + "lv_LV": "letton (Lettonie)", + "mg": "malgache", + "mg_MG": "malgache (Madagascar)", + "mk": "macédonien", + "mk_MK": "macédonien (Macédoine)", + "ml": "malayalam", + "ml_IN": "malayalam (Inde)", + "mn": "mongol", + "mn_MN": "mongol (Mongolie)", + "mr": "marathe", + "mr_IN": "marathe (Inde)", + "ms": "malais", + "ms_BN": "malais (Brunéi Darussalam)", + "ms_MY": "malais (Malaisie)", + "ms_SG": "malais (Singapour)", + "mt": "maltais", + "mt_MT": "maltais (Malte)", + "my": "birman", + "my_MM": "birman (Myanmar (Birmanie))", + "nb": "norvégien bokmÃ¥l", + "nb_NO": "norvégien bokmÃ¥l (Norvège)", + "nb_SJ": "norvégien bokmÃ¥l (Svalbard et Jan Mayen)", + "nd": "ndébélé du Nord", + "nd_ZW": "ndébélé du Nord (Zimbabwe)", + "ne": "népalais", + "ne_IN": "népalais (Inde)", + "ne_NP": "népalais (Népal)", + "nl": "néerlandais", + "nl_AW": "néerlandais (Aruba)", + "nl_BE": "néerlandais (Belgique)", + "nl_BQ": "néerlandais (Pays-Bas caribéens)", + "nl_CW": "néerlandais (Curaçao)", + "nl_NL": "néerlandais (Pays-Bas)", + "nl_SR": "néerlandais (Suriname)", + "nl_SX": "néerlandais (Saint-Martin (partie néerlandaise))", + "nn": "norvégien nynorsk", + "nn_NO": "norvégien nynorsk (Norvège)", + "no": "norvégien", + "no_NO": "norvégien (Norvège)", + "om": "oromo", + "om_ET": "oromo (Éthiopie)", + "om_KE": "oromo (Kenya)", + "or": "oriya", + "or_IN": "oriya (Inde)", + "os": "ossète", + "os_GE": "ossète (Géorgie)", + "os_RU": "ossète (Russie)", + "pa": "pendjabi", + "pa_Arab": "pendjabi (arabe)", + "pa_Arab_PK": "pendjabi (arabe, Pakistan)", + "pa_Guru": "pendjabi (gourmoukhî)", + "pa_Guru_IN": "pendjabi (gourmoukhî, Inde)", + "pa_IN": "pendjabi (Inde)", + "pa_PK": "pendjabi (Pakistan)", + "pl": "polonais", + "pl_PL": "polonais (Pologne)", + "ps": "pachto", + "ps_AF": "pachto (Afghanistan)", + "pt": "portugais", + "pt_AO": "portugais (Angola)", + "pt_BR": "portugais (Brésil)", + "pt_CH": "portugais (Suisse)", + "pt_CV": "portugais (Cap-Vert)", + "pt_GQ": "portugais (Guinée équatoriale)", + "pt_GW": "portugais (Guinée-Bissau)", + "pt_LU": "portugais (Luxembourg)", + "pt_MO": "portugais (R.A.S. chinoise de Macao)", + "pt_MZ": "portugais (Mozambique)", + "pt_PT": "portugais (Portugal)", + "pt_ST": "portugais (Sao Tomé-et-Principe)", + "pt_TL": "portugais (Timor oriental)", + "qu": "quechua", + "qu_BO": "quechua (Bolivie)", + "qu_EC": "quechua (Équateur)", + "qu_PE": "quechua (Pérou)", + "rm": "romanche", + "rm_CH": "romanche (Suisse)", + "rn": "roundi", + "rn_BI": "roundi (Burundi)", + "ro": "roumain", + "ro_MD": "roumain (Moldavie)", + "ro_RO": "roumain (Roumanie)", + "ru": "russe", + "ru_BY": "russe (Biélorussie)", + "ru_KG": "russe (Kirghizistan)", + "ru_KZ": "russe (Kazakhstan)", + "ru_MD": "russe (Moldavie)", + "ru_RU": "russe (Russie)", + "ru_UA": "russe (Ukraine)", + "rw": "rwanda", + "rw_RW": "rwanda (Rwanda)", + "se": "sami du Nord", + "se_FI": "sami du Nord (Finlande)", + "se_NO": "sami du Nord (Norvège)", + "se_SE": "sami du Nord (Suède)", + "sg": "sangho", + "sg_CF": "sangho (République centrafricaine)", + "sh": "serbo-croate", + "sh_BA": "serbo-croate (Bosnie-Herzégovine)", + "si": "cinghalais", + "si_LK": "cinghalais (Sri Lanka)", + "sk": "slovaque", + "sk_SK": "slovaque (Slovaquie)", + "sl": "slovène", + "sl_SI": "slovène (Slovénie)", + "sn": "shona", + "sn_ZW": "shona (Zimbabwe)", + "so": "somali", + "so_DJ": "somali (Djibouti)", + "so_ET": "somali (Éthiopie)", + "so_KE": "somali (Kenya)", + "so_SO": "somali (Somalie)", + "sq": "albanais", + "sq_AL": "albanais (Albanie)", + "sq_MK": "albanais (Macédoine)", + "sq_XK": "albanais (Kosovo)", + "sr": "serbe", + "sr_BA": "serbe (Bosnie-Herzégovine)", + "sr_Cyrl": "serbe (cyrillique)", + "sr_Cyrl_BA": "serbe (cyrillique, Bosnie-Herzégovine)", + "sr_Cyrl_ME": "serbe (cyrillique, Monténégro)", + "sr_Cyrl_RS": "serbe (cyrillique, Serbie)", + "sr_Cyrl_XK": "serbe (cyrillique, Kosovo)", + "sr_Latn": "serbe (latin)", + "sr_Latn_BA": "serbe (latin, Bosnie-Herzégovine)", + "sr_Latn_ME": "serbe (latin, Monténégro)", + "sr_Latn_RS": "serbe (latin, Serbie)", + "sr_Latn_XK": "serbe (latin, Kosovo)", + "sr_ME": "serbe (Monténégro)", + "sr_RS": "serbe (Serbie)", + "sr_XK": "serbe (Kosovo)", + "sv": "suédois", + "sv_AX": "suédois (ÃŽles Ã…land)", + "sv_FI": "suédois (Finlande)", + "sv_SE": "suédois (Suède)", + "sw": "swahili", + "sw_CD": "swahili (Congo-Kinshasa)", + "sw_KE": "swahili (Kenya)", + "sw_TZ": "swahili (Tanzanie)", + "sw_UG": "swahili (Ouganda)", + "ta": "tamoul", + "ta_IN": "tamoul (Inde)", + "ta_LK": "tamoul (Sri Lanka)", + "ta_MY": "tamoul (Malaisie)", + "ta_SG": "tamoul (Singapour)", + "te": "télougou", + "te_IN": "télougou (Inde)", + "th": "thaï", + "th_TH": "thaï (Thaïlande)", + "ti": "tigrigna", + "ti_ER": "tigrigna (Érythrée)", + "ti_ET": "tigrigna (Éthiopie)", + "tl": "tagalog", + "tl_PH": "tagalog (Philippines)", + "to": "tonguien", + "to_TO": "tonguien (Tonga)", + "tr": "turc", + "tr_CY": "turc (Chypre)", + "tr_TR": "turc (Turquie)", + "ug": "ouïghour", + "ug_CN": "ouïghour (Chine)", + "uk": "ukrainien", + "uk_UA": "ukrainien (Ukraine)", + "ur": "ourdou", + "ur_IN": "ourdou (Inde)", + "ur_PK": "ourdou (Pakistan)", + "uz": "ouzbek", + "uz_AF": "ouzbek (Afghanistan)", + "uz_Arab": "ouzbek (arabe)", + "uz_Arab_AF": "ouzbek (arabe, Afghanistan)", + "uz_Cyrl": "ouzbek (cyrillique)", + "uz_Cyrl_UZ": "ouzbek (cyrillique, Ouzbékistan)", + "uz_Latn": "ouzbek (latin)", + "uz_Latn_UZ": "ouzbek (latin, Ouzbékistan)", + "uz_UZ": "ouzbek (Ouzbékistan)", + "vi": "vietnamien", + "vi_VN": "vietnamien (Vietnam)", + "yi": "yiddish", + "yo": "yoruba", + "yo_BJ": "yoruba (Bénin)", + "yo_NG": "yoruba (Nigéria)", + "zh": "chinois", + "zh_CN": "chinois (Chine)", + "zh_HK": "chinois (R.A.S. chinoise de Hong Kong)", + "zh_Hans": "chinois (simplifié)", + "zh_Hans_CN": "chinois (simplifié, Chine)", + "zh_Hans_HK": "chinois (simplifié, R.A.S. chinoise de Hong Kong)", + "zh_Hans_MO": "chinois (simplifié, R.A.S. chinoise de Macao)", + "zh_Hans_SG": "chinois (simplifié, Singapour)", + "zh_Hant": "chinois (traditionnel)", + "zh_Hant_HK": "chinois (traditionnel, R.A.S. chinoise de Hong Kong)", + "zh_Hant_MO": "chinois (traditionnel, R.A.S. chinoise de Macao)", + "zh_Hant_TW": "chinois (traditionnel, Taïwan)", + "zh_MO": "chinois (R.A.S. chinoise de Macao)", + "zh_SG": "chinois (Singapour)", + "zh_TW": "chinois (Taïwan)", + "zu": "zoulou", + "zu_ZA": "zoulou (Afrique du Sud)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fr_BE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fr_BE.json new file mode 100644 index 0000000000000000000000000000000000000000..7a5174ba7f5cd36c0f536b50fff07213fa4db637 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fr_BE.json @@ -0,0 +1,11 @@ +{ + "Names": { + "gu": "gujarati", + "gu_IN": "gujarati (Inde)", + "ms_BN": "malais (Brunei)", + "se": "same du Nord", + "se_FI": "same du Nord (Finlande)", + "se_NO": "same du Nord (Norvège)", + "se_SE": "same du Nord (Suède)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fr_CA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fr_CA.json new file mode 100644 index 0000000000000000000000000000000000000000..34d27e38979c45bc734705975f404d2e88fa8c14 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fr_CA.json @@ -0,0 +1,49 @@ +{ + "Names": { + "az": "azerbaïdjanais", + "az_AZ": "azerbaïdjanais (Azerbaïdjan)", + "az_Cyrl": "azerbaïdjanais (cyrillique)", + "az_Cyrl_AZ": "azerbaïdjanais (cyrillique, Azerbaïdjan)", + "az_Latn": "azerbaïdjanais (latin)", + "az_Latn_AZ": "azerbaïdjanais (latin, Azerbaïdjan)", + "be_BY": "biélorusse (Bélarus)", + "en_CC": "anglais (îles Cocos (Keeling))", + "en_CK": "anglais (îles Cook)", + "en_CX": "anglais (île Christmas)", + "en_FK": "anglais (îles Malouines)", + "en_FM": "anglais (Micronésie)", + "en_IM": "anglais (île de Man)", + "en_MP": "anglais (Mariannes du Nord)", + "en_NF": "anglais (île Norfolk)", + "en_PN": "anglais (îles Pitcairn)", + "en_SX": "anglais (Saint-Martin (Pays-Bas))", + "en_TK": "anglais (Tokelau)", + "en_UM": "anglais (îles mineures éloignées des États-Unis)", + "en_VC": "anglais (Saint-Vincent-et-les Grenadines)", + "en_VG": "anglais (îles Vierges britanniques)", + "en_VI": "anglais (îles Vierges américaines)", + "es_IC": "espagnol (îles Canaries)", + "fo_FO": "féroïen (îles Féroé)", + "fr_MF": "français (Saint-Martin (France))", + "fr_RE": "français (la Réunion)", + "gu": "gujarati", + "gu_IN": "gujarati (Inde)", + "gv_IM": "mannois (île de Man)", + "kl": "kalaallisut", + "kl_GL": "kalaallisut (Groenland)", + "ms_BN": "malais (Brunei)", + "my_MM": "birman (Myanmar)", + "nl_SX": "néerlandais (Saint-Martin (Pays-Bas))", + "or": "odia", + "or_IN": "odia (Inde)", + "pt_TL": "portugais (Timor-Leste)", + "ru_BY": "russe (Bélarus)", + "se": "same du Nord", + "se_FI": "same du Nord (Finlande)", + "se_NO": "same du Nord (Norvège)", + "se_SE": "same du Nord (Suède)", + "sg": "sango", + "sg_CF": "sango (République centrafricaine)", + "sv_AX": "suédois (îles d’Åland)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fr_CH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fr_CH.json new file mode 100644 index 0000000000000000000000000000000000000000..312a5f669ab2f6b334b048a66ff2001c19be2035 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fr_CH.json @@ -0,0 +1,6 @@ +{ + "Names": { + "gu": "goudjrati", + "gu_IN": "goudjrati (Inde)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fy.json new file mode 100644 index 0000000000000000000000000000000000000000..9bec67e25c39c5c82a1fb2a6b82f7e6799566c47 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/fy.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Afrikaansk", + "af_NA": "Afrikaansk (Namibië)", + "af_ZA": "Afrikaansk (Sûd-Afrika)", + "ak": "Akan", + "ak_GH": "Akan (Ghana)", + "am": "Amhaarsk", + "am_ET": "Amhaarsk (Ethiopië)", + "ar": "Arabysk", + "ar_AE": "Arabysk (Verenigde Arabyske Emiraten)", + "ar_BH": "Arabysk (Bahrein)", + "ar_DJ": "Arabysk (Djibouti)", + "ar_DZ": "Arabysk (Algerije)", + "ar_EG": "Arabysk (Egypte)", + "ar_EH": "Arabysk (Westelijke Sahara)", + "ar_ER": "Arabysk (Eritrea)", + "ar_IL": "Arabysk (Israël)", + "ar_IQ": "Arabysk (Irak)", + "ar_JO": "Arabysk (Jordanië)", + "ar_KM": "Arabysk (Comoren)", + "ar_KW": "Arabysk (Koeweit)", + "ar_LB": "Arabysk (Libanon)", + "ar_LY": "Arabysk (Libië)", + "ar_MA": "Arabysk (Marokko)", + "ar_MR": "Arabysk (Mauritanië)", + "ar_OM": "Arabysk (Oman)", + "ar_PS": "Arabysk (Palestynske gebieten)", + "ar_QA": "Arabysk (Qatar)", + "ar_SA": "Arabysk (Saoedi-Arabië)", + "ar_SD": "Arabysk (Soedan)", + "ar_SO": "Arabysk (Somalië)", + "ar_SS": "Arabysk (Sûd-Soedan)", + "ar_SY": "Arabysk (Syrië)", + "ar_TD": "Arabysk (Tsjaad)", + "ar_TN": "Arabysk (Tunesië)", + "ar_YE": "Arabysk (Jemen)", + "as": "Assameesk", + "as_IN": "Assameesk (India)", + "az": "Azerbeidzjaansk", + "az_AZ": "Azerbeidzjaansk (Azerbeidzjan)", + "az_Cyrl": "Azerbeidzjaansk (Syrillysk)", + "az_Cyrl_AZ": "Azerbeidzjaansk (Syrillysk, Azerbeidzjan)", + "az_Latn": "Azerbeidzjaansk (Latyn)", + "az_Latn_AZ": "Azerbeidzjaansk (Latyn, Azerbeidzjan)", + "be": "Wyt-Russysk", + "be_BY": "Wyt-Russysk (Wit-Ruslân)", + "bg": "Bulgaarsk", + "bg_BG": "Bulgaarsk (Bulgarije)", + "bm": "Bambara", + "bm_ML": "Bambara (Mali)", + "bn": "Bengaalsk", + "bn_BD": "Bengaalsk (Bangladesh)", + "bn_IN": "Bengaalsk (India)", + "bo": "Tibetaansk", + "bo_CN": "Tibetaansk (Sina)", + "bo_IN": "Tibetaansk (India)", + "br": "Bretonsk", + "br_FR": "Bretonsk (Frankrijk)", + "bs": "Bosnysk", + "bs_BA": "Bosnysk (Bosnië en Herzegovina)", + "bs_Cyrl": "Bosnysk (Syrillysk)", + "bs_Cyrl_BA": "Bosnysk (Syrillysk, Bosnië en Herzegovina)", + "bs_Latn": "Bosnysk (Latyn)", + "bs_Latn_BA": "Bosnysk (Latyn, Bosnië en Herzegovina)", + "ca": "Katalaansk", + "ca_AD": "Katalaansk (Andorra)", + "ca_ES": "Katalaansk (Spanje)", + "ca_FR": "Katalaansk (Frankrijk)", + "ca_IT": "Katalaansk (Italië)", + "ce": "Tsjetsjeensk", + "ce_RU": "Tsjetsjeensk (Ruslân)", + "cs": "Tsjechysk", + "cs_CZ": "Tsjechysk (Tsjechje)", + "cy": "Welsk", + "cy_GB": "Welsk (Verenigd Koninkrijk)", + "da": "Deensk", + "da_DK": "Deensk (Denemarken)", + "da_GL": "Deensk (Grienlân)", + "de": "Dútsk", + "de_AT": "Dútsk (Eastenryk)", + "de_BE": "Dútsk (België)", + "de_CH": "Dútsk (Switserlân)", + "de_DE": "Dútsk (Dútslân)", + "de_IT": "Dútsk (Italië)", + "de_LI": "Dútsk (Liechtenstein)", + "de_LU": "Dútsk (Luxemburg)", + "dz": "Dzongkha", + "dz_BT": "Dzongkha (Bhutan)", + "ee": "Ewe", + "ee_GH": "Ewe (Ghana)", + "ee_TG": "Ewe (Togo)", + "el": "Gryks", + "el_CY": "Gryks (Syprus)", + "el_GR": "Gryks (Grikelân)", + "en": "Ingelsk", + "en_AG": "Ingelsk (Antigua en Barbuda)", + "en_AI": "Ingelsk (Anguilla)", + "en_AS": "Ingelsk (Amerikaansk Samoa)", + "en_AT": "Ingelsk (Eastenryk)", + "en_AU": "Ingelsk (Australië)", + "en_BB": "Ingelsk (Barbados)", + "en_BE": "Ingelsk (België)", + "en_BI": "Ingelsk (Burundi)", + "en_BM": "Ingelsk (Bermuda)", + "en_BS": "Ingelsk (Bahama’s)", + "en_BW": "Ingelsk (Botswana)", + "en_BZ": "Ingelsk (Belize)", + "en_CA": "Ingelsk (Canada)", + "en_CC": "Ingelsk (Kokosilanen)", + "en_CH": "Ingelsk (Switserlân)", + "en_CK": "Ingelsk (Cookeilannen)", + "en_CM": "Ingelsk (Kameroen)", + "en_CX": "Ingelsk (Krysteilan)", + "en_CY": "Ingelsk (Syprus)", + "en_DE": "Ingelsk (Dútslân)", + "en_DG": "Ingelsk (Diego Garcia)", + "en_DK": "Ingelsk (Denemarken)", + "en_DM": "Ingelsk (Dominika)", + "en_ER": "Ingelsk (Eritrea)", + "en_FI": "Ingelsk (Finlân)", + "en_FJ": "Ingelsk (Fiji)", + "en_FK": "Ingelsk (Falklâneilannen)", + "en_FM": "Ingelsk (Micronesië)", + "en_GB": "Ingelsk (Verenigd Koninkrijk)", + "en_GD": "Ingelsk (Grenada)", + "en_GG": "Ingelsk (Guernsey)", + "en_GH": "Ingelsk (Ghana)", + "en_GI": "Ingelsk (Gibraltar)", + "en_GM": "Ingelsk (Gambia)", + "en_GU": "Ingelsk (Guam)", + "en_GY": "Ingelsk (Guyana)", + "en_HK": "Ingelsk (Hongkong SAR van Sina)", + "en_IE": "Ingelsk (Ierlân)", + "en_IL": "Ingelsk (Israël)", + "en_IM": "Ingelsk (Isle of Man)", + "en_IN": "Ingelsk (India)", + "en_IO": "Ingelsk (Britse Gebieden yn de Indyske Oseaan)", + "en_JE": "Ingelsk (Jersey)", + "en_JM": "Ingelsk (Jamaica)", + "en_KE": "Ingelsk (Kenia)", + "en_KI": "Ingelsk (Kiribati)", + "en_KN": "Ingelsk (Saint Kitts en Nevis)", + "en_KY": "Ingelsk (Caymaneilannen)", + "en_LC": "Ingelsk (Saint Lucia)", + "en_LR": "Ingelsk (Liberia)", + "en_LS": "Ingelsk (Lesotho)", + "en_MG": "Ingelsk (Madeiaskar)", + "en_MH": "Ingelsk (Marshalleilannen)", + "en_MO": "Ingelsk (Macao SAR van Sina)", + "en_MP": "Ingelsk (Noardlike Marianeneilannen)", + "en_MS": "Ingelsk (Montserrat)", + "en_MT": "Ingelsk (Malta)", + "en_MU": "Ingelsk (Mauritius)", + "en_MW": "Ingelsk (Malawi)", + "en_MY": "Ingelsk (Maleisië)", + "en_NA": "Ingelsk (Namibië)", + "en_NF": "Ingelsk (Norfolkeilân)", + "en_NG": "Ingelsk (Nigeria)", + "en_NL": "Ingelsk (Nederlân)", + "en_NR": "Ingelsk (Nauru)", + "en_NU": "Ingelsk (Niue)", + "en_NZ": "Ingelsk (Nij-Seelân)", + "en_PG": "Ingelsk (Papoea-Nij-Guinea)", + "en_PH": "Ingelsk (Filipijnen)", + "en_PK": "Ingelsk (Pakistan)", + "en_PN": "Ingelsk (Pitcairneilannen)", + "en_PR": "Ingelsk (Puerto Rico)", + "en_PW": "Ingelsk (Palau)", + "en_RW": "Ingelsk (Rwanda)", + "en_SB": "Ingelsk (Salomonseilannen)", + "en_SC": "Ingelsk (Seychellen)", + "en_SD": "Ingelsk (Soedan)", + "en_SE": "Ingelsk (Zweden)", + "en_SG": "Ingelsk (Singapore)", + "en_SH": "Ingelsk (Sint-Helena)", + "en_SI": "Ingelsk (Slovenië)", + "en_SL": "Ingelsk (Sierra Leone)", + "en_SS": "Ingelsk (Sûd-Soedan)", + "en_SX": "Ingelsk (Sint-Maarten)", + "en_SZ": "Ingelsk (Swazilân)", + "en_TC": "Ingelsk (Turks- en Caicoseilannen)", + "en_TK": "Ingelsk (Tokelau)", + "en_TO": "Ingelsk (Tonga)", + "en_TT": "Ingelsk (Trinidad en Tobago)", + "en_TV": "Ingelsk (Tuvalu)", + "en_TZ": "Ingelsk (Tanzania)", + "en_UG": "Ingelsk (Oeganda)", + "en_UM": "Ingelsk (Lyts ôflizzen eilannen fan de Ferienigde Staten)", + "en_US": "Ingelsk (Ferienigde Staten)", + "en_VC": "Ingelsk (Saint Vincent en de Grenadines)", + "en_VG": "Ingelsk (Britse Maagdeneilannen)", + "en_VI": "Ingelsk (Amerikaanske Maagdeneilannen)", + "en_VU": "Ingelsk (Vanuatu)", + "en_WS": "Ingelsk (Samoa)", + "en_ZA": "Ingelsk (Sûd-Afrika)", + "en_ZM": "Ingelsk (Zambia)", + "en_ZW": "Ingelsk (Zimbabwe)", + "eo": "Esperanto", + "es": "Spaansk", + "es_AR": "Spaansk (Argentinië)", + "es_BO": "Spaansk (Bolivia)", + "es_BR": "Spaansk (Brazilië)", + "es_CL": "Spaansk (Chili)", + "es_CO": "Spaansk (Kolombia)", + "es_CR": "Spaansk (Costa Rica)", + "es_CU": "Spaansk (Kuba)", + "es_DO": "Spaansk (Dominikaanske Republyk)", + "es_EA": "Spaansk (Ceuta en Melilla)", + "es_EC": "Spaansk (Ecuador)", + "es_ES": "Spaansk (Spanje)", + "es_GQ": "Spaansk (Equatoriaal-Guinea)", + "es_GT": "Spaansk (Guatemala)", + "es_HN": "Spaansk (Honduras)", + "es_IC": "Spaansk (Kanaryske Eilânnen)", + "es_MX": "Spaansk (Mexico)", + "es_NI": "Spaansk (Nicaragua)", + "es_PA": "Spaansk (Panama)", + "es_PE": "Spaansk (Peru)", + "es_PH": "Spaansk (Filipijnen)", + "es_PR": "Spaansk (Puerto Rico)", + "es_PY": "Spaansk (Paraguay)", + "es_SV": "Spaansk (El Salvador)", + "es_US": "Spaansk (Ferienigde Staten)", + "es_UY": "Spaansk (Uruguay)", + "es_VE": "Spaansk (Venezuela)", + "et": "Estlânsk", + "et_EE": "Estlânsk (Estlân)", + "eu": "Baskysk", + "eu_ES": "Baskysk (Spanje)", + "fa": "Perzysk", + "fa_AF": "Perzysk (Afghanistan)", + "fa_IR": "Perzysk (Iran)", + "ff": "Fulah", + "ff_CM": "Fulah (Kameroen)", + "ff_GN": "Fulah (Guinee)", + "ff_MR": "Fulah (Mauritanië)", + "ff_SN": "Fulah (Senegal)", + "fi": "Finsk", + "fi_FI": "Finsk (Finlân)", + "fo": "Faeröersk", + "fo_DK": "Faeröersk (Denemarken)", + "fo_FO": "Faeröersk (Faeröer)", + "fr": "Frânsk", + "fr_BE": "Frânsk (België)", + "fr_BF": "Frânsk (Burkina Faso)", + "fr_BI": "Frânsk (Burundi)", + "fr_BJ": "Frânsk (Benin)", + "fr_BL": "Frânsk (Saint Barthélemy)", + "fr_CA": "Frânsk (Canada)", + "fr_CD": "Frânsk (Congo-Kinshasa)", + "fr_CF": "Frânsk (Sintraal-Afrikaanske Republyk)", + "fr_CG": "Frânsk (Congo-Brazzaville)", + "fr_CH": "Frânsk (Switserlân)", + "fr_CI": "Frânsk (Ivoorkust)", + "fr_CM": "Frânsk (Kameroen)", + "fr_DJ": "Frânsk (Djibouti)", + "fr_DZ": "Frânsk (Algerije)", + "fr_FR": "Frânsk (Frankrijk)", + "fr_GA": "Frânsk (Gabon)", + "fr_GF": "Frânsk (Frans-Guyana)", + "fr_GN": "Frânsk (Guinee)", + "fr_GP": "Frânsk (Guadeloupe)", + "fr_GQ": "Frânsk (Equatoriaal-Guinea)", + "fr_HT": "Frânsk (Haïti)", + "fr_KM": "Frânsk (Comoren)", + "fr_LU": "Frânsk (Luxemburg)", + "fr_MA": "Frânsk (Marokko)", + "fr_MC": "Frânsk (Monaco)", + "fr_MF": "Frânsk (Saint-Martin)", + "fr_MG": "Frânsk (Madeiaskar)", + "fr_ML": "Frânsk (Mali)", + "fr_MQ": "Frânsk (Martinique)", + "fr_MR": "Frânsk (Mauritanië)", + "fr_MU": "Frânsk (Mauritius)", + "fr_NC": "Frânsk (Nij-Caledonië)", + "fr_NE": "Frânsk (Niger)", + "fr_PF": "Frânsk (Frans-Polynesië)", + "fr_PM": "Frânsk (Saint-Pierre en Miquelon)", + "fr_RE": "Frânsk (Réunion)", + "fr_RW": "Frânsk (Rwanda)", + "fr_SC": "Frânsk (Seychellen)", + "fr_SN": "Frânsk (Senegal)", + "fr_SY": "Frânsk (Syrië)", + "fr_TD": "Frânsk (Tsjaad)", + "fr_TG": "Frânsk (Togo)", + "fr_TN": "Frânsk (Tunesië)", + "fr_VU": "Frânsk (Vanuatu)", + "fr_WF": "Frânsk (Wallis en Futuna)", + "fr_YT": "Frânsk (Mayotte)", + "fy": "West-Frysk", + "fy_NL": "West-Frysk (Nederlân)", + "ga": "Iersk", + "ga_IE": "Iersk (Ierlân)", + "gd": "Schotsk Gaelic", + "gd_GB": "Schotsk Gaelic (Verenigd Koninkrijk)", + "gl": "Galisysk", + "gl_ES": "Galisysk (Spanje)", + "gu": "Gujarati", + "gu_IN": "Gujarati (India)", + "gv": "Manks", + "gv_IM": "Manks (Isle of Man)", + "ha": "Hausa", + "ha_GH": "Hausa (Ghana)", + "ha_NE": "Hausa (Niger)", + "ha_NG": "Hausa (Nigeria)", + "he": "Hebreeuwsk", + "he_IL": "Hebreeuwsk (Israël)", + "hi": "Hindi", + "hi_IN": "Hindi (India)", + "hr": "Kroatysk", + "hr_BA": "Kroatysk (Bosnië en Herzegovina)", + "hr_HR": "Kroatysk (Kroatië)", + "hu": "Hongaarsk", + "hu_HU": "Hongaarsk (Hongarije)", + "hy": "Armeensk", + "hy_AM": "Armeensk (Armenië)", + "id": "Yndonezysk", + "id_ID": "Yndonezysk (Yndonesië)", + "ig": "Igbo", + "ig_NG": "Igbo (Nigeria)", + "ii": "Sichuan Yi", + "ii_CN": "Sichuan Yi (Sina)", + "is": "Yslâns", + "is_IS": "Yslâns (Yslân)", + "it": "Italiaansk", + "it_CH": "Italiaansk (Switserlân)", + "it_IT": "Italiaansk (Italië)", + "it_SM": "Italiaansk (San Marino)", + "ja": "Japans", + "ja_JP": "Japans (Japan)", + "ka": "Georgysk", + "ka_GE": "Georgysk (Georgië)", + "ki": "Kikuyu", + "ki_KE": "Kikuyu (Kenia)", + "kk": "Kazachs", + "kk_KZ": "Kazachs (Kazachstan)", + "kl": "Grienlâns", + "kl_GL": "Grienlâns (Grienlân)", + "km": "Khmer", + "km_KH": "Khmer (Cambodja)", + "kn": "Kannada", + "kn_IN": "Kannada (India)", + "ko": "Koreaansk", + "ko_KP": "Koreaansk (Noard-Korea)", + "ko_KR": "Koreaansk (Sûd-Korea)", + "ks": "Kasjmiri", + "ks_IN": "Kasjmiri (India)", + "kw": "Cornish", + "kw_GB": "Cornish (Verenigd Koninkrijk)", + "ky": "Kirgizysk", + "ky_KG": "Kirgizysk (Kirgizië)", + "lb": "Luxemburgs", + "lb_LU": "Luxemburgs (Luxemburg)", + "lg": "Ganda", + "lg_UG": "Ganda (Oeganda)", + "ln": "Lingala", + "ln_AO": "Lingala (Angola)", + "ln_CD": "Lingala (Congo-Kinshasa)", + "ln_CF": "Lingala (Sintraal-Afrikaanske Republyk)", + "ln_CG": "Lingala (Congo-Brazzaville)", + "lo": "Laotiaansk", + "lo_LA": "Laotiaansk (Laos)", + "lt": "Litouws", + "lt_LT": "Litouws (Litouwen)", + "lu": "Luba-Katanga", + "lu_CD": "Luba-Katanga (Congo-Kinshasa)", + "lv": "Letlâns", + "lv_LV": "Letlâns (Letlân)", + "mg": "Malagasysk", + "mg_MG": "Malagasysk (Madeiaskar)", + "mk": "Macedonysk", + "mk_MK": "Macedonysk (Macedonië)", + "ml": "Malayalam", + "ml_IN": "Malayalam (India)", + "mn": "Mongools", + "mn_MN": "Mongools (Mongolië)", + "mr": "Marathi", + "mr_IN": "Marathi (India)", + "ms": "Maleis", + "ms_BN": "Maleis (Brunei)", + "ms_MY": "Maleis (Maleisië)", + "ms_SG": "Maleis (Singapore)", + "mt": "Maltees", + "mt_MT": "Maltees (Malta)", + "my": "Birmees", + "my_MM": "Birmees (Myanmar (Birma))", + "nb": "Noors - BokmÃ¥l", + "nb_NO": "Noors - BokmÃ¥l (Noarwegen)", + "nb_SJ": "Noors - BokmÃ¥l (Spitsbergen en Jan Mayen)", + "nd": "Noard-Ndbele", + "nd_ZW": "Noard-Ndbele (Zimbabwe)", + "ne": "Nepalees", + "ne_IN": "Nepalees (India)", + "ne_NP": "Nepalees (Nepal)", + "nl": "Nederlânsk", + "nl_AW": "Nederlânsk (Aruba)", + "nl_BE": "Nederlânsk (België)", + "nl_BQ": "Nederlânsk (Karibysk Nederlân)", + "nl_CW": "Nederlânsk (Curaçao)", + "nl_NL": "Nederlânsk (Nederlân)", + "nl_SR": "Nederlânsk (Suriname)", + "nl_SX": "Nederlânsk (Sint-Maarten)", + "nn": "Noors - Nynorsk", + "nn_NO": "Noors - Nynorsk (Noarwegen)", + "no": "Noors", + "no_NO": "Noors (Noarwegen)", + "om": "Oromo", + "om_ET": "Oromo (Ethiopië)", + "om_KE": "Oromo (Kenia)", + "or": "Odia", + "or_IN": "Odia (India)", + "os": "Ossetysk", + "os_GE": "Ossetysk (Georgië)", + "os_RU": "Ossetysk (Ruslân)", + "pa": "Punjabi", + "pa_Arab": "Punjabi (Arabysk)", + "pa_Arab_PK": "Punjabi (Arabysk, Pakistan)", + "pa_Guru": "Punjabi (Gurmukhi)", + "pa_Guru_IN": "Punjabi (Gurmukhi, India)", + "pa_IN": "Punjabi (India)", + "pa_PK": "Punjabi (Pakistan)", + "pl": "Poalsk", + "pl_PL": "Poalsk (Polen)", + "ps": "Pasjtoe", + "ps_AF": "Pasjtoe (Afghanistan)", + "pt": "Portugeesk", + "pt_AO": "Portugeesk (Angola)", + "pt_BR": "Portugeesk (Brazilië)", + "pt_CH": "Portugeesk (Switserlân)", + "pt_CV": "Portugeesk (Kaapverdië)", + "pt_GQ": "Portugeesk (Equatoriaal-Guinea)", + "pt_GW": "Portugeesk (Guinee-Bissau)", + "pt_LU": "Portugeesk (Luxemburg)", + "pt_MO": "Portugeesk (Macao SAR van Sina)", + "pt_MZ": "Portugeesk (Mozambique)", + "pt_PT": "Portugeesk (Portugal)", + "pt_ST": "Portugeesk (Sao Tomé en Principe)", + "pt_TL": "Portugeesk (East-Timor)", + "qu": "Quechua", + "qu_BO": "Quechua (Bolivia)", + "qu_EC": "Quechua (Ecuador)", + "qu_PE": "Quechua (Peru)", + "rm": "Reto-Romaansk", + "rm_CH": "Reto-Romaansk (Switserlân)", + "rn": "Kirundi", + "rn_BI": "Kirundi (Burundi)", + "ro": "Roemeensk", + "ro_MD": "Roemeensk (Moldavië)", + "ro_RO": "Roemeensk (Roemenië)", + "ru": "Russysk", + "ru_BY": "Russysk (Wit-Ruslân)", + "ru_KG": "Russysk (Kirgizië)", + "ru_KZ": "Russysk (Kazachstan)", + "ru_MD": "Russysk (Moldavië)", + "ru_RU": "Russysk (Ruslân)", + "ru_UA": "Russysk (Oekraïne)", + "rw": "Kinyarwanda", + "rw_RW": "Kinyarwanda (Rwanda)", + "se": "Noard-Samysk", + "se_FI": "Noard-Samysk (Finlân)", + "se_NO": "Noard-Samysk (Noarwegen)", + "se_SE": "Noard-Samysk (Zweden)", + "sg": "Sango", + "sg_CF": "Sango (Sintraal-Afrikaanske Republyk)", + "sh": "Servokroatysk", + "sh_BA": "Servokroatysk (Bosnië en Herzegovina)", + "si": "Singalees", + "si_LK": "Singalees (Sri Lanka)", + "sk": "Slowaaks", + "sk_SK": "Slowaaks (Slowakije)", + "sl": "Sloveensk", + "sl_SI": "Sloveensk (Slovenië)", + "sn": "Shona", + "sn_ZW": "Shona (Zimbabwe)", + "so": "Somalysk", + "so_DJ": "Somalysk (Djibouti)", + "so_ET": "Somalysk (Ethiopië)", + "so_KE": "Somalysk (Kenia)", + "so_SO": "Somalysk (Somalië)", + "sq": "Albaneesk", + "sq_AL": "Albaneesk (Albanië)", + "sq_MK": "Albaneesk (Macedonië)", + "sq_XK": "Albaneesk (Kosovo)", + "sr": "Servysk", + "sr_BA": "Servysk (Bosnië en Herzegovina)", + "sr_Cyrl": "Servysk (Syrillysk)", + "sr_Cyrl_BA": "Servysk (Syrillysk, Bosnië en Herzegovina)", + "sr_Cyrl_ME": "Servysk (Syrillysk, Montenegro)", + "sr_Cyrl_RS": "Servysk (Syrillysk, Servië)", + "sr_Cyrl_XK": "Servysk (Syrillysk, Kosovo)", + "sr_Latn": "Servysk (Latyn)", + "sr_Latn_BA": "Servysk (Latyn, Bosnië en Herzegovina)", + "sr_Latn_ME": "Servysk (Latyn, Montenegro)", + "sr_Latn_RS": "Servysk (Latyn, Servië)", + "sr_Latn_XK": "Servysk (Latyn, Kosovo)", + "sr_ME": "Servysk (Montenegro)", + "sr_RS": "Servysk (Servië)", + "sr_XK": "Servysk (Kosovo)", + "sv": "Zweeds", + "sv_AX": "Zweeds (Ã…lân)", + "sv_FI": "Zweeds (Finlân)", + "sv_SE": "Zweeds (Zweden)", + "sw": "Swahili", + "sw_CD": "Swahili (Congo-Kinshasa)", + "sw_KE": "Swahili (Kenia)", + "sw_TZ": "Swahili (Tanzania)", + "sw_UG": "Swahili (Oeganda)", + "ta": "Tamil", + "ta_IN": "Tamil (India)", + "ta_LK": "Tamil (Sri Lanka)", + "ta_MY": "Tamil (Maleisië)", + "ta_SG": "Tamil (Singapore)", + "te": "Telugu", + "te_IN": "Telugu (India)", + "th": "Thais", + "th_TH": "Thais (Thailân)", + "ti": "Tigrinya", + "ti_ER": "Tigrinya (Eritrea)", + "ti_ET": "Tigrinya (Ethiopië)", + "tl": "Tagalog", + "tl_PH": "Tagalog (Filipijnen)", + "to": "Tongaansk", + "to_TO": "Tongaansk (Tonga)", + "tr": "Turks", + "tr_CY": "Turks (Syprus)", + "tr_TR": "Turks (Turkije)", + "ug": "Oeigoers", + "ug_CN": "Oeigoers (Sina)", + "uk": "Oekraïens", + "uk_UA": "Oekraïens (Oekraïne)", + "ur": "Urdu", + "ur_IN": "Urdu (India)", + "ur_PK": "Urdu (Pakistan)", + "uz": "Oezbeeks", + "uz_AF": "Oezbeeks (Afghanistan)", + "uz_Arab": "Oezbeeks (Arabysk)", + "uz_Arab_AF": "Oezbeeks (Arabysk, Afghanistan)", + "uz_Cyrl": "Oezbeeks (Syrillysk)", + "uz_Cyrl_UZ": "Oezbeeks (Syrillysk, Oezbekistan)", + "uz_Latn": "Oezbeeks (Latyn)", + "uz_Latn_UZ": "Oezbeeks (Latyn, Oezbekistan)", + "uz_UZ": "Oezbeeks (Oezbekistan)", + "vi": "Vietnamees", + "vi_VN": "Vietnamees (Vietnam)", + "yi": "Jiddysk", + "yo": "Yoruba", + "yo_BJ": "Yoruba (Benin)", + "yo_NG": "Yoruba (Nigeria)", + "zh": "Sineesk", + "zh_CN": "Sineesk (Sina)", + "zh_HK": "Sineesk (Hongkong SAR van Sina)", + "zh_Hans": "Sineesk (Ferienfâldigd)", + "zh_Hans_CN": "Sineesk (Ferienfâldigd, Sina)", + "zh_Hans_HK": "Sineesk (Ferienfâldigd, Hongkong SAR van Sina)", + "zh_Hans_MO": "Sineesk (Ferienfâldigd, Macao SAR van Sina)", + "zh_Hans_SG": "Sineesk (Ferienfâldigd, Singapore)", + "zh_Hant": "Sineesk (Traditjoneel)", + "zh_Hant_HK": "Sineesk (Traditjoneel, Hongkong SAR van Sina)", + "zh_Hant_MO": "Sineesk (Traditjoneel, Macao SAR van Sina)", + "zh_Hant_TW": "Sineesk (Traditjoneel, Taiwan)", + "zh_MO": "Sineesk (Macao SAR van Sina)", + "zh_SG": "Sineesk (Singapore)", + "zh_TW": "Sineesk (Taiwan)", + "zu": "Zulu", + "zu_ZA": "Zulu (Sûd-Afrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ga.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ga.json new file mode 100644 index 0000000000000000000000000000000000000000..a550977b21d5ef4fd9463a87c33c556fe183acc3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ga.json @@ -0,0 +1,561 @@ +{ + "Names": { + "af": "Afracáinis", + "af_NA": "Afracáinis (An Namaib)", + "af_ZA": "Afracáinis (An Afraic Theas)", + "ak": "Acáinis", + "ak_GH": "Acáinis (Gána)", + "am": "Amáiris", + "am_ET": "Amáiris (An Aetóip)", + "ar": "Araibis", + "ar_AE": "Araibis (Aontas na nÉimíríochtaí Arabacha)", + "ar_BH": "Araibis (Bairéin)", + "ar_DJ": "Araibis (Djibouti)", + "ar_DZ": "Araibis (An Ailgéir)", + "ar_EG": "Araibis (An Éigipt)", + "ar_EH": "Araibis (An Sahára Thiar)", + "ar_ER": "Araibis (An Eiritré)", + "ar_IL": "Araibis (Iosrael)", + "ar_IQ": "Araibis (An Iaráic)", + "ar_JO": "Araibis (An Iordáin)", + "ar_KM": "Araibis (Oileáin Chomóra)", + "ar_KW": "Araibis (Cuáit)", + "ar_LB": "Araibis (An Liobáin)", + "ar_LY": "Araibis (An Libia)", + "ar_MA": "Araibis (Maracó)", + "ar_MR": "Araibis (An Mháratáin)", + "ar_OM": "Araibis (Óman)", + "ar_PS": "Araibis (Na Críocha Palaistíneacha)", + "ar_QA": "Araibis (Catar)", + "ar_SA": "Araibis (An Araib Shádach)", + "ar_SD": "Araibis (An tSúdáin)", + "ar_SO": "Araibis (An tSomáil)", + "ar_SS": "Araibis (An tSúdáin Theas)", + "ar_SY": "Araibis (An tSiria)", + "ar_TD": "Araibis (Sead)", + "ar_TN": "Araibis (An Túinéis)", + "ar_YE": "Araibis (Éimin)", + "as": "Asaimis", + "as_IN": "Asaimis (An India)", + "az": "Asarbaiseáinis", + "az_AZ": "Asarbaiseáinis (An Asarbaiseáin)", + "az_Cyrl": "Asarbaiseáinis (Coireallach)", + "az_Cyrl_AZ": "Asarbaiseáinis (Coireallach, An Asarbaiseáin)", + "az_Latn": "Asarbaiseáinis (Laidineach)", + "az_Latn_AZ": "Asarbaiseáinis (Laidineach, An Asarbaiseáin)", + "be": "Bealarúisis", + "be_BY": "Bealarúisis (An Bhealarúis)", + "bg": "Bulgáiris", + "bg_BG": "Bulgáiris (An Bhulgáir)", + "bn": "Beangáilis", + "bn_BD": "Beangáilis (An Bhanglaidéis)", + "bn_IN": "Beangáilis (An India)", + "bo": "Tibéidis", + "bo_CN": "Tibéidis (An tSín)", + "bo_IN": "Tibéidis (An India)", + "br": "Briotáinis", + "br_FR": "Briotáinis (An Fhrainc)", + "bs": "Boisnis", + "bs_BA": "Boisnis (An Bhoisnia agus An Heirseagaivéin)", + "bs_Cyrl": "Boisnis (Coireallach)", + "bs_Cyrl_BA": "Boisnis (Coireallach, An Bhoisnia agus An Heirseagaivéin)", + "bs_Latn": "Boisnis (Laidineach)", + "bs_Latn_BA": "Boisnis (Laidineach, An Bhoisnia agus An Heirseagaivéin)", + "ca": "Catalóinis", + "ca_AD": "Catalóinis (Andóra)", + "ca_ES": "Catalóinis (An Spáinn)", + "ca_FR": "Catalóinis (An Fhrainc)", + "ca_IT": "Catalóinis (An Iodáil)", + "ce": "Seisnis", + "ce_RU": "Seisnis (An Rúis)", + "cs": "Seicis", + "cs_CZ": "Seicis (Poblacht na Seice)", + "cy": "Breatnais", + "cy_GB": "Breatnais (An Ríocht Aontaithe)", + "da": "Danmhairgis", + "da_DK": "Danmhairgis (An Danmhairg)", + "da_GL": "Danmhairgis (An Ghraonlainn)", + "de": "Gearmáinis", + "de_AT": "Gearmáinis (An Ostair)", + "de_BE": "Gearmáinis (An Bheilg)", + "de_CH": "Gearmáinis (An Eilvéis)", + "de_DE": "Gearmáinis (An Ghearmáin)", + "de_IT": "Gearmáinis (An Iodáil)", + "de_LI": "Gearmáinis (Lichtinstéin)", + "de_LU": "Gearmáinis (Lucsamburg)", + "dz": "Seoinicis", + "dz_BT": "Seoinicis (An Bhútáin)", + "el": "Gréigis", + "el_CY": "Gréigis (An Chipir)", + "el_GR": "Gréigis (An Ghréig)", + "en": "Béarla", + "en_AG": "Béarla (Antigua agus Barbúda)", + "en_AI": "Béarla (Angaíle)", + "en_AS": "Béarla (Samó Meiriceánach)", + "en_AT": "Béarla (An Ostair)", + "en_AU": "Béarla (An Astráil)", + "en_BB": "Béarla (Barbadós)", + "en_BE": "Béarla (An Bheilg)", + "en_BI": "Béarla (An Bhurúin)", + "en_BM": "Béarla (Beirmiúda)", + "en_BS": "Béarla (Na Bahámaí)", + "en_BW": "Béarla (An Bhotsuáin)", + "en_BZ": "Béarla (An Bheilís)", + "en_CA": "Béarla (Ceanada)", + "en_CC": "Béarla (Oileáin Cocos (Keeling))", + "en_CH": "Béarla (An Eilvéis)", + "en_CK": "Béarla (Oileáin Cook)", + "en_CM": "Béarla (Camarún)", + "en_CX": "Béarla (Oileán na Nollag)", + "en_CY": "Béarla (An Chipir)", + "en_DE": "Béarla (An Ghearmáin)", + "en_DG": "Béarla (Diego Garcia)", + "en_DK": "Béarla (An Danmhairg)", + "en_DM": "Béarla (Doiminice)", + "en_ER": "Béarla (An Eiritré)", + "en_FI": "Béarla (An Fhionlainn)", + "en_FJ": "Béarla (Fidsí)", + "en_FK": "Béarla (Oileáin Fháclainne)", + "en_FM": "Béarla (An Mhicrinéis)", + "en_GB": "Béarla (An Ríocht Aontaithe)", + "en_GD": "Béarla (Greanáda)", + "en_GG": "Béarla (Geansaí)", + "en_GH": "Béarla (Gána)", + "en_GI": "Béarla (Giobráltar)", + "en_GM": "Béarla (An Ghaimbia)", + "en_GU": "Béarla (Guam)", + "en_GY": "Béarla (An Ghuáin)", + "en_HK": "Béarla (S.R.R. na Síne Hong Cong)", + "en_IE": "Béarla (Éire)", + "en_IL": "Béarla (Iosrael)", + "en_IM": "Béarla (Oileán Mhanann)", + "en_IN": "Béarla (An India)", + "en_IO": "Béarla (Críoch Aigéan Indiach na Breataine)", + "en_JE": "Béarla (Geirsí)", + "en_JM": "Béarla (Iamáice)", + "en_KE": "Béarla (An Chéinia)", + "en_KI": "Béarla (Cireabaití)", + "en_KN": "Béarla (San Críostóir-Nimheas)", + "en_KY": "Béarla (Oileáin Cayman)", + "en_LC": "Béarla (Saint Lucia)", + "en_LR": "Béarla (An Libéir)", + "en_LS": "Béarla (Leosóta)", + "en_MG": "Béarla (Madagascar)", + "en_MH": "Béarla (Oileáin Marshall)", + "en_MO": "Béarla (S.R.R. na Síne Macao)", + "en_MP": "Béarla (Na hOileáin Mháirianacha Thuaidh)", + "en_MS": "Béarla (Montsarat)", + "en_MT": "Béarla (Málta)", + "en_MU": "Béarla (Oileán Mhuirís)", + "en_MW": "Béarla (An Mhaláiv)", + "en_MY": "Béarla (An Mhalaeisia)", + "en_NA": "Béarla (An Namaib)", + "en_NF": "Béarla (Oileán Norfolk)", + "en_NG": "Béarla (An Nigéir)", + "en_NL": "Béarla (An Ãsiltír)", + "en_NR": "Béarla (Nárú)", + "en_NU": "Béarla (Niue)", + "en_NZ": "Béarla (An Nua-Shéalainn)", + "en_PG": "Béarla (Nua-Ghuine Phapua)", + "en_PH": "Béarla (Na hOileáin Fhilipíneacha)", + "en_PK": "Béarla (An Phacastáin)", + "en_PN": "Béarla (Oileáin Pitcairn)", + "en_PR": "Béarla (Portó Ríce)", + "en_PW": "Béarla (Palau)", + "en_RW": "Béarla (Ruanda)", + "en_SB": "Béarla (Oileáin Sholomón)", + "en_SC": "Béarla (Na Séiséil)", + "en_SD": "Béarla (An tSúdáin)", + "en_SE": "Béarla (An tSualainn)", + "en_SG": "Béarla (Singeapór)", + "en_SH": "Béarla (San Héilin)", + "en_SI": "Béarla (An tSlóivéin)", + "en_SL": "Béarla (Siarra Leon)", + "en_SS": "Béarla (An tSúdáin Theas)", + "en_SX": "Béarla (Sint Maarten)", + "en_SZ": "Béarla (An tSuasalainn)", + "en_TC": "Béarla (Oileáin na dTurcach agus Caicos)", + "en_TK": "Béarla (Tócalá)", + "en_TO": "Béarla (Tonga)", + "en_TT": "Béarla (Oileán na Tríonóide agus Tobága)", + "en_TV": "Béarla (Tuvalu)", + "en_TZ": "Béarla (An Tansáin)", + "en_UG": "Béarla (Uganda)", + "en_UM": "Béarla (Oileáin Imeallacha S.A.M.)", + "en_US": "Béarla (Stáit Aontaithe Mheiriceá)", + "en_VC": "Béarla (San Uinseann agus na Greanáidíní)", + "en_VG": "Béarla (Oileáin Bhriotanacha na Maighdean)", + "en_VI": "Béarla (Oileáin Mheiriceánacha na Maighdean)", + "en_VU": "Béarla (Vanuatú)", + "en_WS": "Béarla (Samó)", + "en_ZA": "Béarla (An Afraic Theas)", + "en_ZM": "Béarla (An tSaimbia)", + "en_ZW": "Béarla (An tSiombáib)", + "eo": "Esperanto", + "es": "Spáinnis", + "es_AR": "Spáinnis (An Airgintín)", + "es_BO": "Spáinnis (An Bholaiv)", + "es_BR": "Spáinnis (An Bhrasaíl)", + "es_CL": "Spáinnis (An tSile)", + "es_CO": "Spáinnis (An Cholóim)", + "es_CR": "Spáinnis (Cósta Ríce)", + "es_CU": "Spáinnis (Cúba)", + "es_DO": "Spáinnis (An Phoblacht Dhoiminiceach)", + "es_EA": "Spáinnis (Ceuta agus Melilla)", + "es_EC": "Spáinnis (Eacuadór)", + "es_ES": "Spáinnis (An Spáinn)", + "es_GQ": "Spáinnis (An Ghuine Mheánchriosach)", + "es_GT": "Spáinnis (Guatamala)", + "es_HN": "Spáinnis (Hondúras)", + "es_IC": "Spáinnis (Na hOileáin Chanáracha)", + "es_MX": "Spáinnis (Meicsiceo)", + "es_NI": "Spáinnis (Nicearagua)", + "es_PA": "Spáinnis (Panama)", + "es_PE": "Spáinnis (Peiriú)", + "es_PH": "Spáinnis (Na hOileáin Fhilipíneacha)", + "es_PR": "Spáinnis (Portó Ríce)", + "es_PY": "Spáinnis (Paragua)", + "es_SV": "Spáinnis (An tSalvadóir)", + "es_US": "Spáinnis (Stáit Aontaithe Mheiriceá)", + "es_UY": "Spáinnis (Urugua)", + "es_VE": "Spáinnis (Veiniséala)", + "et": "Eastóinis", + "et_EE": "Eastóinis (An Eastóin)", + "eu": "Bascais", + "eu_ES": "Bascais (An Spáinn)", + "fa": "Peirsis", + "fa_AF": "Peirsis (An Afganastáin)", + "fa_IR": "Peirsis (An Iaráin)", + "ff": "Fuláinis", + "ff_CM": "Fuláinis (Camarún)", + "ff_GN": "Fuláinis (An Ghuine)", + "ff_MR": "Fuláinis (An Mháratáin)", + "ff_SN": "Fuláinis (An tSeineagáil)", + "fi": "Fionlainnis", + "fi_FI": "Fionlainnis (An Fhionlainn)", + "fo": "Faróis", + "fo_DK": "Faróis (An Danmhairg)", + "fo_FO": "Faróis (Oileáin Fharó)", + "fr": "Fraincis", + "fr_BE": "Fraincis (An Bheilg)", + "fr_BF": "Fraincis (Buircíne Fasó)", + "fr_BI": "Fraincis (An Bhurúin)", + "fr_BJ": "Fraincis (Beinin)", + "fr_BL": "Fraincis (Saint Barthélemy)", + "fr_CA": "Fraincis (Ceanada)", + "fr_CD": "Fraincis (Poblacht Dhaonlathach an Chongó)", + "fr_CF": "Fraincis (Poblacht na hAfraice Láir)", + "fr_CG": "Fraincis (An Congó)", + "fr_CH": "Fraincis (An Eilvéis)", + "fr_CI": "Fraincis (An Cósta Eabhair)", + "fr_CM": "Fraincis (Camarún)", + "fr_DJ": "Fraincis (Djibouti)", + "fr_DZ": "Fraincis (An Ailgéir)", + "fr_FR": "Fraincis (An Fhrainc)", + "fr_GA": "Fraincis (An Ghabúin)", + "fr_GF": "Fraincis (Guáin na Fraince)", + "fr_GN": "Fraincis (An Ghuine)", + "fr_GP": "Fraincis (Guadalúip)", + "fr_GQ": "Fraincis (An Ghuine Mheánchriosach)", + "fr_HT": "Fraincis (Háítí)", + "fr_KM": "Fraincis (Oileáin Chomóra)", + "fr_LU": "Fraincis (Lucsamburg)", + "fr_MA": "Fraincis (Maracó)", + "fr_MC": "Fraincis (Monacó)", + "fr_MF": "Fraincis (Saint-Martin)", + "fr_MG": "Fraincis (Madagascar)", + "fr_ML": "Fraincis (Mailí)", + "fr_MQ": "Fraincis (Martinique)", + "fr_MR": "Fraincis (An Mháratáin)", + "fr_MU": "Fraincis (Oileán Mhuirís)", + "fr_NC": "Fraincis (An Nua-Chaladóin)", + "fr_NE": "Fraincis (An Nígir)", + "fr_PF": "Fraincis (Polainéis na Fraince)", + "fr_PM": "Fraincis (Saint-Pierre-et-Miquelon)", + "fr_RE": "Fraincis (Réunion)", + "fr_RW": "Fraincis (Ruanda)", + "fr_SC": "Fraincis (Na Séiséil)", + "fr_SN": "Fraincis (An tSeineagáil)", + "fr_SY": "Fraincis (An tSiria)", + "fr_TD": "Fraincis (Sead)", + "fr_TG": "Fraincis (Tóga)", + "fr_TN": "Fraincis (An Túinéis)", + "fr_VU": "Fraincis (Vanuatú)", + "fr_WF": "Fraincis (Vailís agus Futúna)", + "fr_YT": "Fraincis (Mayotte)", + "fy": "Freaslainnis Iartharach", + "fy_NL": "Freaslainnis Iartharach (An Ãsiltír)", + "ga": "Gaeilge", + "ga_IE": "Gaeilge (Éire)", + "gd": "Gaeilge na hAlban", + "gd_GB": "Gaeilge na hAlban (An Ríocht Aontaithe)", + "gl": "Gailísis", + "gl_ES": "Gailísis (An Spáinn)", + "gu": "Gúisearáitis", + "gu_IN": "Gúisearáitis (An India)", + "gv": "Manainnis", + "gv_IM": "Manainnis (Oileán Mhanann)", + "ha": "Hásais", + "ha_GH": "Hásais (Gána)", + "ha_NE": "Hásais (An Nígir)", + "ha_NG": "Hásais (An Nigéir)", + "he": "Eabhrais", + "he_IL": "Eabhrais (Iosrael)", + "hi": "Hiondúis", + "hi_IN": "Hiondúis (An India)", + "hr": "Cróitis", + "hr_BA": "Cróitis (An Bhoisnia agus An Heirseagaivéin)", + "hr_HR": "Cróitis (An Chróit)", + "hu": "Ungáiris", + "hu_HU": "Ungáiris (An Ungáir)", + "hy": "Airméinis", + "hy_AM": "Airméinis (An Airméin)", + "id": "Indinéisis", + "id_ID": "Indinéisis (An Indinéis)", + "ig": "Ãogbóis", + "ig_NG": "Ãogbóis (An Nigéir)", + "is": "Ãoslainnis", + "is_IS": "Ãoslainnis (An Ãoslainn)", + "it": "Iodáilis", + "it_CH": "Iodáilis (An Eilvéis)", + "it_IT": "Iodáilis (An Iodáil)", + "it_SM": "Iodáilis (San Mairíne)", + "ja": "Seapáinis", + "ja_JP": "Seapáinis (An tSeapáin)", + "ka": "Seoirsis", + "ka_GE": "Seoirsis (An tSeoirsia)", + "ki": "Ciocúis", + "ki_KE": "Ciocúis (An Chéinia)", + "kk": "Casaicis", + "kk_KZ": "Casaicis (An Chasacstáin)", + "kl": "Kalaallisut", + "kl_GL": "Kalaallisut (An Ghraonlainn)", + "km": "Ciméiris", + "km_KH": "Ciméiris (An Chambóid)", + "kn": "Cannadais", + "kn_IN": "Cannadais (An India)", + "ko": "Cóiréis", + "ko_KP": "Cóiréis (An Chóiré Thuaidh)", + "ko_KR": "Cóiréis (An Chóiré Theas)", + "ks": "Caismíris", + "ks_IN": "Caismíris (An India)", + "kw": "Coirnis", + "kw_GB": "Coirnis (An Ríocht Aontaithe)", + "ky": "Cirgisis", + "ky_KG": "Cirgisis (An Chirgeastáin)", + "lb": "Lucsambuirgis", + "lb_LU": "Lucsambuirgis (Lucsamburg)", + "lg": "Lugandais", + "lg_UG": "Lugandais (Uganda)", + "ln": "Liongáilis", + "ln_AO": "Liongáilis (Angóla)", + "ln_CD": "Liongáilis (Poblacht Dhaonlathach an Chongó)", + "ln_CF": "Liongáilis (Poblacht na hAfraice Láir)", + "ln_CG": "Liongáilis (An Congó)", + "lo": "Laoisis", + "lo_LA": "Laoisis (Laos)", + "lt": "Liotuáinis", + "lt_LT": "Liotuáinis (An Liotuáin)", + "lu": "Lúba-Cataingis", + "lu_CD": "Lúba-Cataingis (Poblacht Dhaonlathach an Chongó)", + "lv": "Laitvis", + "lv_LV": "Laitvis (An Laitvia)", + "mg": "Malagáisis", + "mg_MG": "Malagáisis (Madagascar)", + "mk": "Macadóinis", + "mk_MK": "Macadóinis (An Mhacadóin)", + "ml": "Mailéalaimis", + "ml_IN": "Mailéalaimis (An India)", + "mn": "Mongóilis", + "mn_MN": "Mongóilis (An Mhongóil)", + "mr": "Maraitis", + "mr_IN": "Maraitis (An India)", + "ms": "Malaeis", + "ms_BN": "Malaeis (Brúiné)", + "ms_MY": "Malaeis (An Mhalaeisia)", + "ms_SG": "Malaeis (Singeapór)", + "mt": "Máltais", + "mt_MT": "Máltais (Málta)", + "my": "Burmais", + "my_MM": "Burmais (Maenmar (Burma))", + "nb": "Ioruais BokmÃ¥l", + "nb_NO": "Ioruais BokmÃ¥l (An Iorua)", + "nb_SJ": "Ioruais BokmÃ¥l (Svalbard agus Jan Mayen)", + "nd": "Ndeibéilis an Tuaiscirt", + "nd_ZW": "Ndeibéilis an Tuaiscirt (An tSiombáib)", + "ne": "Neipeailis", + "ne_IN": "Neipeailis (An India)", + "ne_NP": "Neipeailis (Neipeal)", + "nl": "Ollainnis", + "nl_AW": "Ollainnis (Arúba)", + "nl_BE": "Ollainnis (An Bheilg)", + "nl_BQ": "Ollainnis (An Ãsiltír Chairibeach)", + "nl_CW": "Ollainnis (Curaçao)", + "nl_NL": "Ollainnis (An Ãsiltír)", + "nl_SR": "Ollainnis (Suranam)", + "nl_SX": "Ollainnis (Sint Maarten)", + "nn": "Nua-Ioruais", + "nn_NO": "Nua-Ioruais (An Iorua)", + "no": "Ioruais", + "no_NO": "Ioruais (An Iorua)", + "om": "Oraimis", + "om_ET": "Oraimis (An Aetóip)", + "om_KE": "Oraimis (An Chéinia)", + "or": "Oirísis", + "or_IN": "Oirísis (An India)", + "os": "Oiséitis", + "os_GE": "Oiséitis (An tSeoirsia)", + "os_RU": "Oiséitis (An Rúis)", + "pa": "Puinseáibis", + "pa_Arab": "Puinseáibis (Arabach)", + "pa_Arab_PK": "Puinseáibis (Arabach, An Phacastáin)", + "pa_Guru": "Puinseáibis (Gurmúcach)", + "pa_Guru_IN": "Puinseáibis (Gurmúcach, An India)", + "pa_IN": "Puinseáibis (An India)", + "pa_PK": "Puinseáibis (An Phacastáin)", + "pl": "Polainnis", + "pl_PL": "Polainnis (An Pholainn)", + "ps": "Paistis", + "ps_AF": "Paistis (An Afganastáin)", + "pt": "Portaingéilis", + "pt_AO": "Portaingéilis (Angóla)", + "pt_BR": "Portaingéilis (An Bhrasaíl)", + "pt_CH": "Portaingéilis (An Eilvéis)", + "pt_CV": "Portaingéilis (Rinn Verde)", + "pt_GQ": "Portaingéilis (An Ghuine Mheánchriosach)", + "pt_GW": "Portaingéilis (Guine Bissau)", + "pt_LU": "Portaingéilis (Lucsamburg)", + "pt_MO": "Portaingéilis (S.R.R. na Síne Macao)", + "pt_MZ": "Portaingéilis (Mósaimbíc)", + "pt_PT": "Portaingéilis (An Phortaingéil)", + "pt_ST": "Portaingéilis (São Tomé agus Príncipe)", + "pt_TL": "Portaingéilis (Tíomór Thoir)", + "qu": "Ceatsuais", + "qu_BO": "Ceatsuais (An Bholaiv)", + "qu_EC": "Ceatsuais (Eacuadór)", + "qu_PE": "Ceatsuais (Peiriú)", + "rm": "Rómainis", + "rm_CH": "Rómainis (An Eilvéis)", + "rn": "Rúindis", + "rn_BI": "Rúindis (An Bhurúin)", + "ro": "Rómáinis", + "ro_MD": "Rómáinis (An Mholdóiv)", + "ro_RO": "Rómáinis (An Rómáin)", + "ru": "Rúisis", + "ru_BY": "Rúisis (An Bhealarúis)", + "ru_KG": "Rúisis (An Chirgeastáin)", + "ru_KZ": "Rúisis (An Chasacstáin)", + "ru_MD": "Rúisis (An Mholdóiv)", + "ru_RU": "Rúisis (An Rúis)", + "ru_UA": "Rúisis (An Úcráin)", + "rw": "Ciniaruaindis", + "rw_RW": "Ciniaruaindis (Ruanda)", + "se": "Sáimis Thuaidh", + "se_FI": "Sáimis Thuaidh (An Fhionlainn)", + "se_NO": "Sáimis Thuaidh (An Iorua)", + "se_SE": "Sáimis Thuaidh (An tSualainn)", + "sg": "Sangóis", + "sg_CF": "Sangóis (Poblacht na hAfraice Láir)", + "sh": "Seirbea-Chróitis", + "sh_BA": "Seirbea-Chróitis (An Bhoisnia agus An Heirseagaivéin)", + "si": "Siolóinis", + "si_LK": "Siolóinis (Srí Lanca)", + "sk": "Slóvaicis", + "sk_SK": "Slóvaicis (An tSlóvaic)", + "sl": "Slóivéinis", + "sl_SI": "Slóivéinis (An tSlóivéin)", + "sn": "Seoinis", + "sn_ZW": "Seoinis (An tSiombáib)", + "so": "Somáilis", + "so_DJ": "Somáilis (Djibouti)", + "so_ET": "Somáilis (An Aetóip)", + "so_KE": "Somáilis (An Chéinia)", + "so_SO": "Somáilis (An tSomáil)", + "sq": "Albáinis", + "sq_AL": "Albáinis (An Albáin)", + "sq_MK": "Albáinis (An Mhacadóin)", + "sq_XK": "Albáinis (An Chosaiv)", + "sr": "Seirbis", + "sr_BA": "Seirbis (An Bhoisnia agus An Heirseagaivéin)", + "sr_Cyrl": "Seirbis (Coireallach)", + "sr_Cyrl_BA": "Seirbis (Coireallach, An Bhoisnia agus An Heirseagaivéin)", + "sr_Cyrl_ME": "Seirbis (Coireallach, Montainéagró)", + "sr_Cyrl_RS": "Seirbis (Coireallach, An tSeirbia)", + "sr_Cyrl_XK": "Seirbis (Coireallach, An Chosaiv)", + "sr_Latn": "Seirbis (Laidineach)", + "sr_Latn_BA": "Seirbis (Laidineach, An Bhoisnia agus An Heirseagaivéin)", + "sr_Latn_ME": "Seirbis (Laidineach, Montainéagró)", + "sr_Latn_RS": "Seirbis (Laidineach, An tSeirbia)", + "sr_Latn_XK": "Seirbis (Laidineach, An Chosaiv)", + "sr_ME": "Seirbis (Montainéagró)", + "sr_RS": "Seirbis (An tSeirbia)", + "sr_XK": "Seirbis (An Chosaiv)", + "sv": "Sualainnis", + "sv_AX": "Sualainnis (Oileáin Ã…land)", + "sv_FI": "Sualainnis (An Fhionlainn)", + "sv_SE": "Sualainnis (An tSualainn)", + "sw": "Svahaílis", + "sw_CD": "Svahaílis (Poblacht Dhaonlathach an Chongó)", + "sw_KE": "Svahaílis (An Chéinia)", + "sw_TZ": "Svahaílis (An Tansáin)", + "sw_UG": "Svahaílis (Uganda)", + "ta": "Tamailis", + "ta_IN": "Tamailis (An India)", + "ta_LK": "Tamailis (Srí Lanca)", + "ta_MY": "Tamailis (An Mhalaeisia)", + "ta_SG": "Tamailis (Singeapór)", + "te": "Teileagúis", + "te_IN": "Teileagúis (An India)", + "th": "Téalainnis", + "th_TH": "Téalainnis (An Téalainn)", + "ti": "Tigrinis", + "ti_ER": "Tigrinis (An Eiritré)", + "ti_ET": "Tigrinis (An Aetóip)", + "tl": "Tagálaigis", + "tl_PH": "Tagálaigis (Na hOileáin Fhilipíneacha)", + "to": "Tongais", + "to_TO": "Tongais (Tonga)", + "tr": "Tuircis", + "tr_CY": "Tuircis (An Chipir)", + "tr_TR": "Tuircis (An Tuirc)", + "ug": "Uigiúiris", + "ug_CN": "Uigiúiris (An tSín)", + "uk": "Úcráinis", + "uk_UA": "Úcráinis (An Úcráin)", + "ur": "Urdúis", + "ur_IN": "Urdúis (An India)", + "ur_PK": "Urdúis (An Phacastáin)", + "uz": "Úisbéiceastáinis", + "uz_AF": "Úisbéiceastáinis (An Afganastáin)", + "uz_Arab": "Úisbéiceastáinis (Arabach)", + "uz_Arab_AF": "Úisbéiceastáinis (Arabach, An Afganastáin)", + "uz_Cyrl": "Úisbéiceastáinis (Coireallach)", + "uz_Cyrl_UZ": "Úisbéiceastáinis (Coireallach, An Úisbéiceastáin)", + "uz_Latn": "Úisbéiceastáinis (Laidineach)", + "uz_Latn_UZ": "Úisbéiceastáinis (Laidineach, An Úisbéiceastáin)", + "uz_UZ": "Úisbéiceastáinis (An Úisbéiceastáin)", + "vi": "Vítneaimis", + "vi_VN": "Vítneaimis (Vítneam)", + "yi": "Giúdais", + "yo": "Iarúibis", + "yo_BJ": "Iarúibis (Beinin)", + "yo_NG": "Iarúibis (An Nigéir)", + "zh": "Sínis", + "zh_CN": "Sínis (An tSín)", + "zh_HK": "Sínis (S.R.R. na Síne Hong Cong)", + "zh_Hans": "Sínis (Simplithe)", + "zh_Hans_CN": "Sínis (Simplithe, An tSín)", + "zh_Hans_HK": "Sínis (Simplithe, S.R.R. na Síne Hong Cong)", + "zh_Hans_MO": "Sínis (Simplithe, S.R.R. na Síne Macao)", + "zh_Hans_SG": "Sínis (Simplithe, Singeapór)", + "zh_Hant": "Sínis (Traidisiúnta)", + "zh_Hant_HK": "Sínis (Traidisiúnta, S.R.R. na Síne Hong Cong)", + "zh_Hant_MO": "Sínis (Traidisiúnta, S.R.R. na Síne Macao)", + "zh_Hant_TW": "Sínis (Traidisiúnta, An Téaváin)", + "zh_MO": "Sínis (S.R.R. na Síne Macao)", + "zh_SG": "Sínis (Singeapór)", + "zh_TW": "Sínis (An Téaváin)", + "zu": "Súlúis", + "zu_ZA": "Súlúis (An Afraic Theas)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/gd.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/gd.json new file mode 100644 index 0000000000000000000000000000000000000000..4b77e05a2e01f14eed3f369526500de3d1a1ad98 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/gd.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Afraganais", + "af_NA": "Afraganais (An Namaib)", + "af_ZA": "Afraganais (Afraga a Deas)", + "ak": "Akan", + "ak_GH": "Akan (Gàna)", + "am": "Amtharais", + "am_ET": "Amtharais (An Itiop)", + "ar": "Arabais", + "ar_AE": "Arabais (Na h-Iomaratan Arabach Aonaichte)", + "ar_BH": "Arabais (Bachrain)", + "ar_DJ": "Arabais (Diobùtaidh)", + "ar_DZ": "Arabais (Aildiria)", + "ar_EG": "Arabais (An Èiphit)", + "ar_EH": "Arabais (Sathara an Iar)", + "ar_ER": "Arabais (Eartra)", + "ar_IL": "Arabais (Iosrael)", + "ar_IQ": "Arabais (Ioràc)", + "ar_JO": "Arabais (Iòrdan)", + "ar_KM": "Arabais (Comoros)", + "ar_KW": "Arabais (Cuibhèit)", + "ar_LB": "Arabais (Leabanon)", + "ar_LY": "Arabais (Libia)", + "ar_MA": "Arabais (Moroco)", + "ar_MR": "Arabais (Moratàinea)", + "ar_OM": "Arabais (Omàn)", + "ar_PS": "Arabais (Na Ranntairean Palastaineach)", + "ar_QA": "Arabais (Catar)", + "ar_SA": "Arabais (Aràibia nan Sabhd)", + "ar_SD": "Arabais (Sudàn)", + "ar_SO": "Arabais (Somàilia)", + "ar_SS": "Arabais (Sudàn a Deas)", + "ar_SY": "Arabais (Siridhea)", + "ar_TD": "Arabais (An t-Seàd)", + "ar_TN": "Arabais (Tuinisea)", + "ar_YE": "Arabais (An Eaman)", + "as": "Asamais", + "as_IN": "Asamais (Na h-Innseachan)", + "az": "Asarbaideànais", + "az_AZ": "Asarbaideànais (Asarbaideàn)", + "az_Cyrl": "Asarbaideànais (Cirilis)", + "az_Cyrl_AZ": "Asarbaideànais (Cirilis, Asarbaideàn)", + "az_Latn": "Asarbaideànais (Laideann)", + "az_Latn_AZ": "Asarbaideànais (Laideann, Asarbaideàn)", + "be": "Bealaruisis", + "be_BY": "Bealaruisis (A’ Bhealaruis)", + "bg": "Bulgarais", + "bg_BG": "Bulgarais (A’ Bhulgair)", + "bm": "Bambara", + "bm_ML": "Bambara (Màili)", + "bn": "Bangla", + "bn_BD": "Bangla (Bangladais)", + "bn_IN": "Bangla (Na h-Innseachan)", + "bo": "Tibeitis", + "bo_CN": "Tibeitis (An t-Sìn)", + "bo_IN": "Tibeitis (Na h-Innseachan)", + "br": "Breatnais", + "br_FR": "Breatnais (An Fhraing)", + "bs": "Bosnais", + "bs_BA": "Bosnais (Bosna agus Hearsagobhana)", + "bs_Cyrl": "Bosnais (Cirilis)", + "bs_Cyrl_BA": "Bosnais (Cirilis, Bosna agus Hearsagobhana)", + "bs_Latn": "Bosnais (Laideann)", + "bs_Latn_BA": "Bosnais (Laideann, Bosna agus Hearsagobhana)", + "ca": "Catalanais", + "ca_AD": "Catalanais (Andorra)", + "ca_ES": "Catalanais (An Spàinnt)", + "ca_FR": "Catalanais (An Fhraing)", + "ca_IT": "Catalanais (An Eadailt)", + "ce": "Deideanais", + "ce_RU": "Deideanais (An Ruis)", + "cs": "Seicis", + "cs_CZ": "Seicis (Poblachd na Seice)", + "cy": "Cuimris", + "cy_GB": "Cuimris (An Rìoghachd Aonaichte)", + "da": "Danmhairgis", + "da_DK": "Danmhairgis (An Danmhairg)", + "da_GL": "Danmhairgis (A’ Ghraonlann)", + "de": "Gearmailtis", + "de_AT": "Gearmailtis (An Ostair)", + "de_BE": "Gearmailtis (A’ Bheilg)", + "de_CH": "Gearmailtis (An Eilbheis)", + "de_DE": "Gearmailtis (A’ Ghearmailt)", + "de_IT": "Gearmailtis (An Eadailt)", + "de_LI": "Gearmailtis (Lichtenstein)", + "de_LU": "Gearmailtis (Lugsamburg)", + "dz": "Dzongkha", + "dz_BT": "Dzongkha (Butàn)", + "ee": "Ewe", + "ee_GH": "Ewe (Gàna)", + "ee_TG": "Ewe (Togo)", + "el": "Greugais", + "el_CY": "Greugais (Cìopras)", + "el_GR": "Greugais (A’ Ghreug)", + "en": "Beurla", + "en_AG": "Beurla (Aintìoga is Barbuda)", + "en_AI": "Beurla (Anguillia)", + "en_AS": "Beurla (Samotha na h-Aimeireaga)", + "en_AT": "Beurla (An Ostair)", + "en_AU": "Beurla (Astràilia)", + "en_BB": "Beurla (Barbados)", + "en_BE": "Beurla (A’ Bheilg)", + "en_BI": "Beurla (Burundaidh)", + "en_BM": "Beurla (Bearmùda)", + "en_BS": "Beurla (Na h-Eileanan Bhathama)", + "en_BW": "Beurla (Botsuana)", + "en_BZ": "Beurla (A’ Bheilìs)", + "en_CA": "Beurla (Canada)", + "en_CC": "Beurla (Na h-Eileanan Chocos (Keeling))", + "en_CH": "Beurla (An Eilbheis)", + "en_CK": "Beurla (Eileanan Cook)", + "en_CM": "Beurla (Camarun)", + "en_CX": "Beurla (Eilean na Nollaig)", + "en_CY": "Beurla (Cìopras)", + "en_DE": "Beurla (A’ Ghearmailt)", + "en_DG": "Beurla (Diego Garcia)", + "en_DK": "Beurla (An Danmhairg)", + "en_DM": "Beurla (Doiminicea)", + "en_ER": "Beurla (Eartra)", + "en_FI": "Beurla (An Fhionnlann)", + "en_FJ": "Beurla (Fìdi)", + "en_FK": "Beurla (Na h-Eileanan Fàclannach)", + "en_FM": "Beurla (Na Meanbh-eileanan)", + "en_GB": "Beurla (An Rìoghachd Aonaichte)", + "en_GD": "Beurla (Greanàda)", + "en_GG": "Beurla (Geàrnsaidh)", + "en_GH": "Beurla (Gàna)", + "en_GI": "Beurla (Diobraltar)", + "en_GM": "Beurla (A’ Ghaimbia)", + "en_GU": "Beurla (Guam)", + "en_GY": "Beurla (Guidheàna)", + "en_HK": "Beurla (Hong Kong SAR na Sìne)", + "en_IE": "Beurla (Èirinn)", + "en_IL": "Beurla (Iosrael)", + "en_IM": "Beurla (Eilean Mhanainn)", + "en_IN": "Beurla (Na h-Innseachan)", + "en_IO": "Beurla (Ranntair Breatannach Cuan nan Innseachan)", + "en_JE": "Beurla (Deàrsaidh)", + "en_JM": "Beurla (Diameuga)", + "en_KE": "Beurla (Ceinia)", + "en_KI": "Beurla (Ciribeas)", + "en_KN": "Beurla (Naomh Crìstean is Nibheis)", + "en_KY": "Beurla (Na h-Eileanan Caimean)", + "en_LC": "Beurla (Naomh Lùisea)", + "en_LR": "Beurla (Libèir)", + "en_LS": "Beurla (Leasoto)", + "en_MG": "Beurla (Madagasgar)", + "en_MH": "Beurla (Eileanan Mharshall)", + "en_MO": "Beurla (Macàthu SAR na Sìne)", + "en_MP": "Beurla (Na h-Eileanan Mairianach a Tuath)", + "en_MS": "Beurla (Montsarat)", + "en_MT": "Beurla (Malta)", + "en_MU": "Beurla (Na h-Eileanan Mhoiriseas)", + "en_MW": "Beurla (Malabhaidh)", + "en_MY": "Beurla (Malaidhsea)", + "en_NA": "Beurla (An Namaib)", + "en_NF": "Beurla (Eilean Norfolk)", + "en_NG": "Beurla (Nigèiria)", + "en_NL": "Beurla (Na Tìrean ÃŒsle)", + "en_NR": "Beurla (Nabhru)", + "en_NU": "Beurla (Niue)", + "en_NZ": "Beurla (Sealainn Nuadh)", + "en_PG": "Beurla (Gini Nuadh Phaputhach)", + "en_PH": "Beurla (Na h-Eileanan Filipineach)", + "en_PK": "Beurla (Pagastàn)", + "en_PN": "Beurla (Eileanan Peit a’ Chàirn)", + "en_PR": "Beurla (Porto Rìceo)", + "en_PW": "Beurla (Palabh)", + "en_RW": "Beurla (Rubhanda)", + "en_SB": "Beurla (Eileanan Sholaimh)", + "en_SC": "Beurla (Na h-Eileanan Sheiseall)", + "en_SD": "Beurla (Sudàn)", + "en_SE": "Beurla (An t-Suain)", + "en_SG": "Beurla (Singeapòr)", + "en_SH": "Beurla (Eilean Naomh Eilidh)", + "en_SI": "Beurla (An t-Slòbhain)", + "en_SL": "Beurla (Siarra Leòmhann)", + "en_SS": "Beurla (Sudàn a Deas)", + "en_SX": "Beurla (Sint Maarten)", + "en_SZ": "Beurla (Dùthaich nan Suasaidh)", + "en_TC": "Beurla (Na h-Eileanan Turcach is Caiceo)", + "en_TK": "Beurla (Tokelau)", + "en_TO": "Beurla (Tonga)", + "en_TT": "Beurla (Trianaid agus Tobago)", + "en_TV": "Beurla (Tubhalu)", + "en_TZ": "Beurla (An Tansan)", + "en_UG": "Beurla (Uganda)", + "en_UM": "Beurla (Meanbh-Eileanan Iomallach nan SA)", + "en_US": "Beurla (Na Stàitean Aonaichte)", + "en_VC": "Beurla (Naomh Bhionsant agus Eileanan Greanadach)", + "en_VG": "Beurla (Eileanan Breatannach na Maighdinn)", + "en_VI": "Beurla (Eileanan na Maighdinn aig na SA)", + "en_VU": "Beurla (Vanuatu)", + "en_WS": "Beurla (Samotha)", + "en_ZA": "Beurla (Afraga a Deas)", + "en_ZM": "Beurla (Sàimbia)", + "en_ZW": "Beurla (An t-Sìombab)", + "eo": "Esperanto", + "es": "Spàinntis", + "es_AR": "Spàinntis (An Argantain)", + "es_BO": "Spàinntis (Boilibhia)", + "es_BR": "Spàinntis (Braisil)", + "es_CL": "Spàinntis (An t-Sile)", + "es_CO": "Spàinntis (Coloimbia)", + "es_CR": "Spàinntis (Costa Rìcea)", + "es_CU": "Spàinntis (Cùba)", + "es_DO": "Spàinntis (A’ Phoblachd Dhoiminiceach)", + "es_EA": "Spàinntis (Ceuta agus Melilla)", + "es_EC": "Spàinntis (Eacuador)", + "es_ES": "Spàinntis (An Spàinnt)", + "es_GQ": "Spàinntis (Gini Mheadhan-Chriosach)", + "es_GT": "Spàinntis (Guatamala)", + "es_HN": "Spàinntis (Hondùras)", + "es_IC": "Spàinntis (Na h-Eileanan Canàrach)", + "es_MX": "Spàinntis (Meagsago)", + "es_NI": "Spàinntis (Niocaragua)", + "es_PA": "Spàinntis (Panama)", + "es_PE": "Spàinntis (Pearù)", + "es_PH": "Spàinntis (Na h-Eileanan Filipineach)", + "es_PR": "Spàinntis (Porto Rìceo)", + "es_PY": "Spàinntis (Paraguaidh)", + "es_SV": "Spàinntis (An Salbhador)", + "es_US": "Spàinntis (Na Stàitean Aonaichte)", + "es_UY": "Spàinntis (Uruguaidh)", + "es_VE": "Spàinntis (A’ Bheiniseala)", + "et": "Eastoinis", + "et_EE": "Eastoinis (An Eastoin)", + "eu": "Basgais", + "eu_ES": "Basgais (An Spàinnt)", + "fa": "Peirsis", + "fa_AF": "Peirsis (Afghanastàn)", + "fa_IR": "Peirsis (Ioràn)", + "ff": "Fulah", + "ff_CM": "Fulah (Camarun)", + "ff_GN": "Fulah (Gini)", + "ff_MR": "Fulah (Moratàinea)", + "ff_SN": "Fulah (Seanagal)", + "fi": "Fionnlannais", + "fi_FI": "Fionnlannais (An Fhionnlann)", + "fo": "Fàrothais", + "fo_DK": "Fàrothais (An Danmhairg)", + "fo_FO": "Fàrothais (Na h-Eileanan Fàro)", + "fr": "Fraingis", + "fr_BE": "Fraingis (A’ Bheilg)", + "fr_BF": "Fraingis (Buirciona Faso)", + "fr_BI": "Fraingis (Burundaidh)", + "fr_BJ": "Fraingis (Beinin)", + "fr_BL": "Fraingis (Saint Barthélemy)", + "fr_CA": "Fraingis (Canada)", + "fr_CD": "Fraingis (Congo - Kinshasa)", + "fr_CF": "Fraingis (Poblachd Meadhan Afraga)", + "fr_CG": "Fraingis (A’ Chongo - Brazzaville)", + "fr_CH": "Fraingis (An Eilbheis)", + "fr_CI": "Fraingis (Côte d’Ivoire)", + "fr_CM": "Fraingis (Camarun)", + "fr_DJ": "Fraingis (Diobùtaidh)", + "fr_DZ": "Fraingis (Aildiria)", + "fr_FR": "Fraingis (An Fhraing)", + "fr_GA": "Fraingis (Gabon)", + "fr_GF": "Fraingis (Guidheàna na Frainge)", + "fr_GN": "Fraingis (Gini)", + "fr_GP": "Fraingis (Guadalup)", + "fr_GQ": "Fraingis (Gini Mheadhan-Chriosach)", + "fr_HT": "Fraingis (Haidhti)", + "fr_KM": "Fraingis (Comoros)", + "fr_LU": "Fraingis (Lugsamburg)", + "fr_MA": "Fraingis (Moroco)", + "fr_MC": "Fraingis (Monaco)", + "fr_MF": "Fraingis (Naomh Màrtainn)", + "fr_MG": "Fraingis (Madagasgar)", + "fr_ML": "Fraingis (Màili)", + "fr_MQ": "Fraingis (Mairtinic)", + "fr_MR": "Fraingis (Moratàinea)", + "fr_MU": "Fraingis (Na h-Eileanan Mhoiriseas)", + "fr_NC": "Fraingis (Cailleann Nuadh)", + "fr_NE": "Fraingis (Nìgeir)", + "fr_PF": "Fraingis (Poilinèis na Frainge)", + "fr_PM": "Fraingis (Saint Pierre agus Miquelon)", + "fr_RE": "Fraingis (Réunion)", + "fr_RW": "Fraingis (Rubhanda)", + "fr_SC": "Fraingis (Na h-Eileanan Sheiseall)", + "fr_SN": "Fraingis (Seanagal)", + "fr_SY": "Fraingis (Siridhea)", + "fr_TD": "Fraingis (An t-Seàd)", + "fr_TG": "Fraingis (Togo)", + "fr_TN": "Fraingis (Tuinisea)", + "fr_VU": "Fraingis (Vanuatu)", + "fr_WF": "Fraingis (Uallas agus Futuna)", + "fr_YT": "Fraingis (Mayotte)", + "fy": "Frìoslannais Shiarach", + "fy_NL": "Frìoslannais Shiarach (Na Tìrean ÃŒsle)", + "ga": "Gaeilge", + "ga_IE": "Gaeilge (Èirinn)", + "gd": "Gàidhlig", + "gd_GB": "Gàidhlig (An Rìoghachd Aonaichte)", + "gl": "Gailìsis", + "gl_ES": "Gailìsis (An Spàinnt)", + "gu": "Gujarati", + "gu_IN": "Gujarati (Na h-Innseachan)", + "gv": "Gaelg", + "gv_IM": "Gaelg (Eilean Mhanainn)", + "ha": "Hausa", + "ha_GH": "Hausa (Gàna)", + "ha_NE": "Hausa (Nìgeir)", + "ha_NG": "Hausa (Nigèiria)", + "he": "Eabhra", + "he_IL": "Eabhra (Iosrael)", + "hi": "Hindis", + "hi_IN": "Hindis (Na h-Innseachan)", + "hr": "Cròthaisis", + "hr_BA": "Cròthaisis (Bosna agus Hearsagobhana)", + "hr_HR": "Cròthaisis (A’ Chròthais)", + "hu": "Ungairis", + "hu_HU": "Ungairis (An Ungair)", + "hy": "Airmeinis", + "hy_AM": "Airmeinis (Airmeinea)", + "id": "Innd-Innsis", + "id_ID": "Innd-Innsis (Na h-Innd-innse)", + "ig": "Igbo", + "ig_NG": "Igbo (Nigèiria)", + "ii": "Yi Sichuan", + "ii_CN": "Yi Sichuan (An t-Sìn)", + "is": "Innis Tìlis", + "is_IS": "Innis Tìlis (Innis Tìle)", + "it": "Eadailtis", + "it_CH": "Eadailtis (An Eilbheis)", + "it_IT": "Eadailtis (An Eadailt)", + "it_SM": "Eadailtis (San Marino)", + "ja": "Seapanais", + "ja_JP": "Seapanais (An t-Seapan)", + "ka": "Cairtbheilis", + "ka_GE": "Cairtbheilis (A’ Chairtbheil)", + "ki": "Kikuyu", + "ki_KE": "Kikuyu (Ceinia)", + "kk": "Casachais", + "kk_KZ": "Casachais (Casachstàn)", + "kl": "Kalaallisut", + "kl_GL": "Kalaallisut (A’ Ghraonlann)", + "km": "Cmèar", + "km_KH": "Cmèar (Cambuidea)", + "kn": "Kannada", + "kn_IN": "Kannada (Na h-Innseachan)", + "ko": "Coirèanais", + "ko_KP": "Coirèanais (Coirèa a Tuath)", + "ko_KR": "Coirèanais (Coirèa)", + "ks": "Caismiris", + "ks_IN": "Caismiris (Na h-Innseachan)", + "kw": "Còrnais", + "kw_GB": "Còrnais (An Rìoghachd Aonaichte)", + "ky": "Cìorgasais", + "ky_KG": "Cìorgasais (Cìorgastan)", + "lb": "Lugsamburgais", + "lb_LU": "Lugsamburgais (Lugsamburg)", + "lg": "Ganda", + "lg_UG": "Ganda (Uganda)", + "ln": "Lingala", + "ln_AO": "Lingala (Angòla)", + "ln_CD": "Lingala (Congo - Kinshasa)", + "ln_CF": "Lingala (Poblachd Meadhan Afraga)", + "ln_CG": "Lingala (A’ Chongo - Brazzaville)", + "lo": "Làtho", + "lo_LA": "Làtho (Làthos)", + "lt": "Liotuainis", + "lt_LT": "Liotuainis (An Liotuain)", + "lu": "Luba-Katanga", + "lu_CD": "Luba-Katanga (Congo - Kinshasa)", + "lv": "Laitbheis", + "lv_LV": "Laitbheis (An Laitbhe)", + "mg": "Malagasais", + "mg_MG": "Malagasais (Madagasgar)", + "mk": "Masadonais", + "mk_MK": "Masadonais (A’ Mhasadon)", + "ml": "Malayalam", + "ml_IN": "Malayalam (Na h-Innseachan)", + "mn": "Mongolais", + "mn_MN": "Mongolais (Dùthaich nam Mongol)", + "mr": "Marathi", + "mr_IN": "Marathi (Na h-Innseachan)", + "ms": "Malaidhis", + "ms_BN": "Malaidhis (Brùnaigh)", + "ms_MY": "Malaidhis (Malaidhsea)", + "ms_SG": "Malaidhis (Singeapòr)", + "mt": "Maltais", + "mt_MT": "Maltais (Malta)", + "my": "Burmais", + "my_MM": "Burmais (Miànmar)", + "nb": "BokmÃ¥l na Nirribhidh", + "nb_NO": "BokmÃ¥l na Nirribhidh (Nirribhidh)", + "nb_SJ": "BokmÃ¥l na Nirribhidh (Svalbard agus Jan Mayen)", + "nd": "Ndebele Thuathach", + "nd_ZW": "Ndebele Thuathach (An t-Sìombab)", + "ne": "Neapàlais", + "ne_IN": "Neapàlais (Na h-Innseachan)", + "ne_NP": "Neapàlais (Neapàl)", + "nl": "Duitsis", + "nl_AW": "Duitsis (Arùba)", + "nl_BE": "Duitsis (A’ Bheilg)", + "nl_BQ": "Duitsis (Na Tìrean ÃŒsle Caraibeach)", + "nl_CW": "Duitsis (Curaçao)", + "nl_NL": "Duitsis (Na Tìrean ÃŒsle)", + "nl_SR": "Duitsis (Suranam)", + "nl_SX": "Duitsis (Sint Maarten)", + "nn": "Nynorsk na Nirribhidh", + "nn_NO": "Nynorsk na Nirribhidh (Nirribhidh)", + "no": "Nirribhis", + "no_NO": "Nirribhis (Nirribhidh)", + "om": "Oromo", + "om_ET": "Oromo (An Itiop)", + "om_KE": "Oromo (Ceinia)", + "or": "Odia", + "or_IN": "Odia (Na h-Innseachan)", + "os": "Ossetic", + "os_GE": "Ossetic (A’ Chairtbheil)", + "os_RU": "Ossetic (An Ruis)", + "pa": "Panjabi", + "pa_Arab": "Panjabi (Arabais)", + "pa_Arab_PK": "Panjabi (Arabais, Pagastàn)", + "pa_Guru": "Panjabi (Gurmukhi)", + "pa_Guru_IN": "Panjabi (Gurmukhi, Na h-Innseachan)", + "pa_IN": "Panjabi (Na h-Innseachan)", + "pa_PK": "Panjabi (Pagastàn)", + "pl": "Pòlainnis", + "pl_PL": "Pòlainnis (A’ Phòlainn)", + "ps": "Pashto", + "ps_AF": "Pashto (Afghanastàn)", + "pt": "Portagailis", + "pt_AO": "Portagailis (Angòla)", + "pt_BR": "Portagailis (Braisil)", + "pt_CH": "Portagailis (An Eilbheis)", + "pt_CV": "Portagailis (An Ceap Uaine)", + "pt_GQ": "Portagailis (Gini Mheadhan-Chriosach)", + "pt_GW": "Portagailis (Gini-Bioso)", + "pt_LU": "Portagailis (Lugsamburg)", + "pt_MO": "Portagailis (Macàthu SAR na Sìne)", + "pt_MZ": "Portagailis (Mòsaimbic)", + "pt_PT": "Portagailis (A’ Phortagail)", + "pt_ST": "Portagailis (São Tomé agus Príncipe)", + "pt_TL": "Portagailis (Timor-Leste)", + "qu": "Quechua", + "qu_BO": "Quechua (Boilibhia)", + "qu_EC": "Quechua (Eacuador)", + "qu_PE": "Quechua (Pearù)", + "rm": "Rumains", + "rm_CH": "Rumains (An Eilbheis)", + "rn": "Kirundi", + "rn_BI": "Kirundi (Burundaidh)", + "ro": "Romàinis", + "ro_MD": "Romàinis (A’ Mholdobha)", + "ro_RO": "Romàinis (Romàinia)", + "ru": "Ruisis", + "ru_BY": "Ruisis (A’ Bhealaruis)", + "ru_KG": "Ruisis (Cìorgastan)", + "ru_KZ": "Ruisis (Casachstàn)", + "ru_MD": "Ruisis (A’ Mholdobha)", + "ru_RU": "Ruisis (An Ruis)", + "ru_UA": "Ruisis (An Ucràin)", + "rw": "Kinyarwanda", + "rw_RW": "Kinyarwanda (Rubhanda)", + "se": "Sàmais Thuathach", + "se_FI": "Sàmais Thuathach (An Fhionnlann)", + "se_NO": "Sàmais Thuathach (Nirribhidh)", + "se_SE": "Sàmais Thuathach (An t-Suain)", + "sg": "Sango", + "sg_CF": "Sango (Poblachd Meadhan Afraga)", + "sh": "Sèirb-Chròthaisis", + "sh_BA": "Sèirb-Chròthaisis (Bosna agus Hearsagobhana)", + "si": "Sinhala", + "si_LK": "Sinhala (Sri Lanca)", + "sk": "Slòbhacais", + "sk_SK": "Slòbhacais (An t-Slòbhac)", + "sl": "Slòbhainis", + "sl_SI": "Slòbhainis (An t-Slòbhain)", + "sn": "Shona", + "sn_ZW": "Shona (An t-Sìombab)", + "so": "Somàilis", + "so_DJ": "Somàilis (Diobùtaidh)", + "so_ET": "Somàilis (An Itiop)", + "so_KE": "Somàilis (Ceinia)", + "so_SO": "Somàilis (Somàilia)", + "sq": "Albàinis", + "sq_AL": "Albàinis (Albàinia)", + "sq_MK": "Albàinis (A’ Mhasadon)", + "sq_XK": "Albàinis (A’ Chosobho)", + "sr": "Sèirbis", + "sr_BA": "Sèirbis (Bosna agus Hearsagobhana)", + "sr_Cyrl": "Sèirbis (Cirilis)", + "sr_Cyrl_BA": "Sèirbis (Cirilis, Bosna agus Hearsagobhana)", + "sr_Cyrl_ME": "Sèirbis (Cirilis, Am Monadh Neagrach)", + "sr_Cyrl_RS": "Sèirbis (Cirilis, An t-Sèirb)", + "sr_Cyrl_XK": "Sèirbis (Cirilis, A’ Chosobho)", + "sr_Latn": "Sèirbis (Laideann)", + "sr_Latn_BA": "Sèirbis (Laideann, Bosna agus Hearsagobhana)", + "sr_Latn_ME": "Sèirbis (Laideann, Am Monadh Neagrach)", + "sr_Latn_RS": "Sèirbis (Laideann, An t-Sèirb)", + "sr_Latn_XK": "Sèirbis (Laideann, A’ Chosobho)", + "sr_ME": "Sèirbis (Am Monadh Neagrach)", + "sr_RS": "Sèirbis (An t-Sèirb)", + "sr_XK": "Sèirbis (A’ Chosobho)", + "sv": "Suainis", + "sv_AX": "Suainis (Na h-Eileanan Ã…land)", + "sv_FI": "Suainis (An Fhionnlann)", + "sv_SE": "Suainis (An t-Suain)", + "sw": "Kiswahili", + "sw_CD": "Kiswahili (Congo - Kinshasa)", + "sw_KE": "Kiswahili (Ceinia)", + "sw_TZ": "Kiswahili (An Tansan)", + "sw_UG": "Kiswahili (Uganda)", + "ta": "Taimilis", + "ta_IN": "Taimilis (Na h-Innseachan)", + "ta_LK": "Taimilis (Sri Lanca)", + "ta_MY": "Taimilis (Malaidhsea)", + "ta_SG": "Taimilis (Singeapòr)", + "te": "Telugu", + "te_IN": "Telugu (Na h-Innseachan)", + "th": "Cànan nan Tàidh", + "th_TH": "Cànan nan Tàidh (Dùthaich nan Tàidh)", + "ti": "Tigrinya", + "ti_ER": "Tigrinya (Eartra)", + "ti_ET": "Tigrinya (An Itiop)", + "tl": "Tagalog", + "tl_PH": "Tagalog (Na h-Eileanan Filipineach)", + "to": "Tonga", + "to_TO": "Tonga (Tonga)", + "tr": "Turcais", + "tr_CY": "Turcais (Cìopras)", + "tr_TR": "Turcais (An Tuirc)", + "ug": "Ùigiurais", + "ug_CN": "Ùigiurais (An t-Sìn)", + "uk": "Ucràinis", + "uk_UA": "Ucràinis (An Ucràin)", + "ur": "Ùrdu", + "ur_IN": "Ùrdu (Na h-Innseachan)", + "ur_PK": "Ùrdu (Pagastàn)", + "uz": "Usbagais", + "uz_AF": "Usbagais (Afghanastàn)", + "uz_Arab": "Usbagais (Arabais)", + "uz_Arab_AF": "Usbagais (Arabais, Afghanastàn)", + "uz_Cyrl": "Usbagais (Cirilis)", + "uz_Cyrl_UZ": "Usbagais (Cirilis, Usbagastàn)", + "uz_Latn": "Usbagais (Laideann)", + "uz_Latn_UZ": "Usbagais (Laideann, Usbagastàn)", + "uz_UZ": "Usbagais (Usbagastàn)", + "vi": "Bhiet-Namais", + "vi_VN": "Bhiet-Namais (Bhiet-Nam)", + "yi": "Iùdhais", + "yo": "Yoruba", + "yo_BJ": "Yoruba (Beinin)", + "yo_NG": "Yoruba (Nigèiria)", + "zh": "Sìnis", + "zh_CN": "Sìnis (An t-Sìn)", + "zh_HK": "Sìnis (Hong Kong SAR na Sìne)", + "zh_Hans": "Sìnis (Simplichte)", + "zh_Hans_CN": "Sìnis (Simplichte, An t-Sìn)", + "zh_Hans_HK": "Sìnis (Simplichte, Hong Kong SAR na Sìne)", + "zh_Hans_MO": "Sìnis (Simplichte, Macàthu SAR na Sìne)", + "zh_Hans_SG": "Sìnis (Simplichte, Singeapòr)", + "zh_Hant": "Sìnis (Tradaiseanta)", + "zh_Hant_HK": "Sìnis (Tradaiseanta, Hong Kong SAR na Sìne)", + "zh_Hant_MO": "Sìnis (Tradaiseanta, Macàthu SAR na Sìne)", + "zh_Hant_TW": "Sìnis (Tradaiseanta, Taidh-Bhàn)", + "zh_MO": "Sìnis (Macàthu SAR na Sìne)", + "zh_SG": "Sìnis (Singeapòr)", + "zh_TW": "Sìnis (Taidh-Bhàn)", + "zu": "Zulu", + "zu_ZA": "Zulu (Afraga a Deas)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/gl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/gl.json new file mode 100644 index 0000000000000000000000000000000000000000..5bc41ff9adeea1d5ec295a8ecaf321e716b404ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/gl.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "africáner", + "af_NA": "africáner (Namibia)", + "af_ZA": "africáner (Suráfrica)", + "ak": "akán", + "ak_GH": "akán (Ghana)", + "am": "amárico", + "am_ET": "amárico (Etiopía)", + "ar": "árabe", + "ar_AE": "árabe (Emiratos Ãrabes Unidos)", + "ar_BH": "árabe (Bahrain)", + "ar_DJ": "árabe (Djibuti)", + "ar_DZ": "árabe (Alxeria)", + "ar_EG": "árabe (Exipto)", + "ar_EH": "árabe (Sáhara Occidental)", + "ar_ER": "árabe (Eritrea)", + "ar_IL": "árabe (Israel)", + "ar_IQ": "árabe (Iraq)", + "ar_JO": "árabe (Xordania)", + "ar_KM": "árabe (Comores)", + "ar_KW": "árabe (Kuwait)", + "ar_LB": "árabe (Líbano)", + "ar_LY": "árabe (Libia)", + "ar_MA": "árabe (Marrocos)", + "ar_MR": "árabe (Mauritania)", + "ar_OM": "árabe (Omán)", + "ar_PS": "árabe (Territorios palestinos)", + "ar_QA": "árabe (Qatar)", + "ar_SA": "árabe (Arabia Saudita)", + "ar_SD": "árabe (Sudán)", + "ar_SO": "árabe (Somalia)", + "ar_SS": "árabe (Sudán do sur)", + "ar_SY": "árabe (Siria)", + "ar_TD": "árabe (Chad)", + "ar_TN": "árabe (Tunisia)", + "ar_YE": "árabe (Iemen)", + "as": "asamés", + "as_IN": "asamés (A India)", + "az": "acerbaixano", + "az_AZ": "acerbaixano (Acerbaixán)", + "az_Cyrl": "acerbaixano (cirílico)", + "az_Cyrl_AZ": "acerbaixano (cirílico, Acerbaixán)", + "az_Latn": "acerbaixano (latino)", + "az_Latn_AZ": "acerbaixano (latino, Acerbaixán)", + "be": "bielorruso", + "be_BY": "bielorruso (Bielorrusia)", + "bg": "búlgaro", + "bg_BG": "búlgaro (Bulgaria)", + "bm": "bambaro", + "bm_ML": "bambaro (Malí)", + "bn": "bengalí", + "bn_BD": "bengalí (Bangladés)", + "bn_IN": "bengalí (A India)", + "bo": "tibetano", + "bo_CN": "tibetano (A China)", + "bo_IN": "tibetano (A India)", + "br": "bretón", + "br_FR": "bretón (Francia)", + "bs": "bosníaco", + "bs_BA": "bosníaco (Bosnia-Hercegovina)", + "bs_Cyrl": "bosníaco (cirílico)", + "bs_Cyrl_BA": "bosníaco (cirílico, Bosnia-Hercegovina)", + "bs_Latn": "bosníaco (latino)", + "bs_Latn_BA": "bosníaco (latino, Bosnia-Hercegovina)", + "ca": "catalán", + "ca_AD": "catalán (Andorra)", + "ca_ES": "catalán (España)", + "ca_FR": "catalán (Francia)", + "ca_IT": "catalán (Italia)", + "ce": "checheno", + "ce_RU": "checheno (Rusia)", + "cs": "checo", + "cs_CZ": "checo (República Checa)", + "cy": "galés", + "cy_GB": "galés (Reino Unido)", + "da": "dinamarqués", + "da_DK": "dinamarqués (Dinamarca)", + "da_GL": "dinamarqués (Groenlandia)", + "de": "alemán", + "de_AT": "alemán (Austria)", + "de_BE": "alemán (Bélxica)", + "de_CH": "alemán (Suíza)", + "de_DE": "alemán (Alemaña)", + "de_IT": "alemán (Italia)", + "de_LI": "alemán (Liechtenstein)", + "de_LU": "alemán (Luxemburgo)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bután)", + "ee": "ewe", + "ee_GH": "ewe (Ghana)", + "ee_TG": "ewe (Togo)", + "el": "grego", + "el_CY": "grego (Chipre)", + "el_GR": "grego (Grecia)", + "en": "inglés", + "en_AG": "inglés (Antiga e Barbuda)", + "en_AI": "inglés (Anguila)", + "en_AS": "inglés (Samoa Americana)", + "en_AT": "inglés (Austria)", + "en_AU": "inglés (Australia)", + "en_BB": "inglés (Barbados)", + "en_BE": "inglés (Bélxica)", + "en_BI": "inglés (Burundi)", + "en_BM": "inglés (Bermudas)", + "en_BS": "inglés (Bahamas)", + "en_BW": "inglés (Botsuana)", + "en_BZ": "inglés (Belice)", + "en_CA": "inglés (Canadá)", + "en_CC": "inglés (Illas Cocos (Keeling))", + "en_CH": "inglés (Suíza)", + "en_CK": "inglés (Illas Cook)", + "en_CM": "inglés (Camerún)", + "en_CX": "inglés (Illa de Nadal)", + "en_CY": "inglés (Chipre)", + "en_DE": "inglés (Alemaña)", + "en_DG": "inglés (Diego García)", + "en_DK": "inglés (Dinamarca)", + "en_DM": "inglés (Dominica)", + "en_ER": "inglés (Eritrea)", + "en_FI": "inglés (Finlandia)", + "en_FJ": "inglés (Fidxi)", + "en_FK": "inglés (Illas Malvinas)", + "en_FM": "inglés (Micronesia)", + "en_GB": "inglés (Reino Unido)", + "en_GD": "inglés (Granada)", + "en_GG": "inglés (Guernsey)", + "en_GH": "inglés (Ghana)", + "en_GI": "inglés (Xibraltar)", + "en_GM": "inglés (Gambia)", + "en_GU": "inglés (Guam)", + "en_GY": "inglés (Güiana)", + "en_HK": "inglés (Hong Kong RAE de China)", + "en_IE": "inglés (Irlanda)", + "en_IL": "inglés (Israel)", + "en_IM": "inglés (Illa de Man)", + "en_IN": "inglés (A India)", + "en_IO": "inglés (Territorio Británico do Océano Ãndico)", + "en_JE": "inglés (Jersey)", + "en_JM": "inglés (Xamaica)", + "en_KE": "inglés (Kenya)", + "en_KI": "inglés (Kiribati)", + "en_KN": "inglés (Saint Kitts e Nevis)", + "en_KY": "inglés (Illas Caimán)", + "en_LC": "inglés (Santa Lucía)", + "en_LR": "inglés (Liberia)", + "en_LS": "inglés (Lesoto)", + "en_MG": "inglés (Madagascar)", + "en_MH": "inglés (Illas Marshall)", + "en_MO": "inglés (Macau RAE de China)", + "en_MP": "inglés (Illas Marianas do Norte)", + "en_MS": "inglés (Montserrat)", + "en_MT": "inglés (Malta)", + "en_MU": "inglés (Mauricio)", + "en_MW": "inglés (Malaui)", + "en_MY": "inglés (Malaisia)", + "en_NA": "inglés (Namibia)", + "en_NF": "inglés (Illa Norfolk)", + "en_NG": "inglés (Nixeria)", + "en_NL": "inglés (Países Baixos)", + "en_NR": "inglés (Nauru)", + "en_NU": "inglés (Niue)", + "en_NZ": "inglés (Nova Zelandia)", + "en_PG": "inglés (Papúa-Nova Guinea)", + "en_PH": "inglés (Filipinas)", + "en_PK": "inglés (Paquistán)", + "en_PN": "inglés (Illas Pitcairn)", + "en_PR": "inglés (Porto Rico)", + "en_PW": "inglés (Palau)", + "en_RW": "inglés (Ruanda)", + "en_SB": "inglés (Illas Salomón)", + "en_SC": "inglés (Seixeles)", + "en_SD": "inglés (Sudán)", + "en_SE": "inglés (Suecia)", + "en_SG": "inglés (Singapur)", + "en_SH": "inglés (Santa Helena)", + "en_SI": "inglés (Eslovenia)", + "en_SL": "inglés (Serra Leoa)", + "en_SS": "inglés (Sudán do sur)", + "en_SX": "inglés (Sint Maarten)", + "en_SZ": "inglés (Suacilandia)", + "en_TC": "inglés (Illas Turks e Caicos)", + "en_TK": "inglés (Toquelau)", + "en_TO": "inglés (Tonga)", + "en_TT": "inglés (Trinidad e Tobago)", + "en_TV": "inglés (Tuvalu)", + "en_TZ": "inglés (Tanzania)", + "en_UG": "inglés (Uganda)", + "en_UM": "inglés (Illas Ultramarinas dos EUA)", + "en_US": "inglés (Estados Unidos de América)", + "en_VC": "inglés (San Vicente e as Granadinas)", + "en_VG": "inglés (Illas Virxes Británicas)", + "en_VI": "inglés (Illas Virxes Estadounidenses)", + "en_VU": "inglés (Vanuatu)", + "en_WS": "inglés (Samoa)", + "en_ZA": "inglés (Suráfrica)", + "en_ZM": "inglés (Zambia)", + "en_ZW": "inglés (Cimbabue)", + "eo": "esperanto", + "es": "español", + "es_AR": "español (Arxentina)", + "es_BO": "español (Bolivia)", + "es_BR": "español (Brasil)", + "es_CL": "español (Chile)", + "es_CO": "español (Colombia)", + "es_CR": "español (Costa Rica)", + "es_CU": "español (Cuba)", + "es_DO": "español (República Dominicana)", + "es_EA": "español (Ceuta e Melilla)", + "es_EC": "español (Ecuador)", + "es_ES": "español (España)", + "es_GQ": "español (Guinea Ecuatorial)", + "es_GT": "español (Guatemala)", + "es_HN": "español (Honduras)", + "es_IC": "español (Illas Canarias)", + "es_MX": "español (México)", + "es_NI": "español (Nicaragua)", + "es_PA": "español (Panamá)", + "es_PE": "español (Perú)", + "es_PH": "español (Filipinas)", + "es_PR": "español (Porto Rico)", + "es_PY": "español (Paraguai)", + "es_SV": "español (O Salvador)", + "es_US": "español (Estados Unidos de América)", + "es_UY": "español (Uruguai)", + "es_VE": "español (Venezuela)", + "et": "estoniano", + "et_EE": "estoniano (Estonia)", + "eu": "éuscaro", + "eu_ES": "éuscaro (España)", + "fa": "persa", + "fa_AF": "persa (Afganistán)", + "fa_IR": "persa (Irán)", + "ff": "fula", + "ff_CM": "fula (Camerún)", + "ff_GN": "fula (Guinea)", + "ff_MR": "fula (Mauritania)", + "ff_SN": "fula (Senegal)", + "fi": "finés", + "fi_FI": "finés (Finlandia)", + "fo": "feroés", + "fo_DK": "feroés (Dinamarca)", + "fo_FO": "feroés (Illas Feroe)", + "fr": "francés", + "fr_BE": "francés (Bélxica)", + "fr_BF": "francés (Burkina Faso)", + "fr_BI": "francés (Burundi)", + "fr_BJ": "francés (Benin)", + "fr_BL": "francés (Saint-Barthélemy)", + "fr_CA": "francés (Canadá)", + "fr_CD": "francés (República Democrática do Congo)", + "fr_CF": "francés (República Centroafricana)", + "fr_CG": "francés (República do Congo)", + "fr_CH": "francés (Suíza)", + "fr_CI": "francés (Costa do Marfil)", + "fr_CM": "francés (Camerún)", + "fr_DJ": "francés (Djibuti)", + "fr_DZ": "francés (Alxeria)", + "fr_FR": "francés (Francia)", + "fr_GA": "francés (Gabón)", + "fr_GF": "francés (Güiana Francesa)", + "fr_GN": "francés (Guinea)", + "fr_GP": "francés (Guadalupe)", + "fr_GQ": "francés (Guinea Ecuatorial)", + "fr_HT": "francés (Haití)", + "fr_KM": "francés (Comores)", + "fr_LU": "francés (Luxemburgo)", + "fr_MA": "francés (Marrocos)", + "fr_MC": "francés (Mónaco)", + "fr_MF": "francés (Saint-Martin)", + "fr_MG": "francés (Madagascar)", + "fr_ML": "francés (Malí)", + "fr_MQ": "francés (Martinica)", + "fr_MR": "francés (Mauritania)", + "fr_MU": "francés (Mauricio)", + "fr_NC": "francés (Nova Caledonia)", + "fr_NE": "francés (Níxer)", + "fr_PF": "francés (Polinesia Francesa)", + "fr_PM": "francés (Saint Pierre e Miquelon)", + "fr_RE": "francés (Reunión)", + "fr_RW": "francés (Ruanda)", + "fr_SC": "francés (Seixeles)", + "fr_SN": "francés (Senegal)", + "fr_SY": "francés (Siria)", + "fr_TD": "francés (Chad)", + "fr_TG": "francés (Togo)", + "fr_TN": "francés (Tunisia)", + "fr_VU": "francés (Vanuatu)", + "fr_WF": "francés (Wallis e Futuna)", + "fr_YT": "francés (Mayotte)", + "fy": "frisón", + "fy_NL": "frisón (Países Baixos)", + "ga": "irlandés", + "ga_IE": "irlandés (Irlanda)", + "gd": "gaélico escocés", + "gd_GB": "gaélico escocés (Reino Unido)", + "gl": "galego", + "gl_ES": "galego (España)", + "gu": "guxaratí", + "gu_IN": "guxaratí (A India)", + "gv": "manx", + "gv_IM": "manx (Illa de Man)", + "ha": "hausa", + "ha_GH": "hausa (Ghana)", + "ha_NE": "hausa (Níxer)", + "ha_NG": "hausa (Nixeria)", + "he": "hebreo", + "he_IL": "hebreo (Israel)", + "hi": "hindi", + "hi_IN": "hindi (A India)", + "hr": "croata", + "hr_BA": "croata (Bosnia-Hercegovina)", + "hr_HR": "croata (Croacia)", + "hu": "húngaro", + "hu_HU": "húngaro (Hungría)", + "hy": "armenio", + "hy_AM": "armenio (Armenia)", + "id": "indonesio", + "id_ID": "indonesio (Indonesia)", + "ig": "ibo", + "ig_NG": "ibo (Nixeria)", + "ii": "yi sichuanés", + "ii_CN": "yi sichuanés (A China)", + "is": "islandés", + "is_IS": "islandés (Islandia)", + "it": "italiano", + "it_CH": "italiano (Suíza)", + "it_IT": "italiano (Italia)", + "it_SM": "italiano (San Marino)", + "ja": "xaponés", + "ja_JP": "xaponés (O Xapón)", + "ka": "xeorxiano", + "ka_GE": "xeorxiano (Xeorxia)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenya)", + "kk": "casaco", + "kk_KZ": "casaco (Casaquistán)", + "kl": "groenlandés occidental", + "kl_GL": "groenlandés occidental (Groenlandia)", + "km": "khmer", + "km_KH": "khmer (Camboxa)", + "kn": "canarés", + "kn_IN": "canarés (A India)", + "ko": "coreano", + "ko_KP": "coreano (Corea do Norte)", + "ko_KR": "coreano (Corea do Sur)", + "ks": "cachemir", + "ks_IN": "cachemir (A India)", + "kw": "córnico", + "kw_GB": "córnico (Reino Unido)", + "ky": "quirguiz", + "ky_KG": "quirguiz (Quirguicistán)", + "lb": "luxemburgués", + "lb_LU": "luxemburgués (Luxemburgo)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (República Democrática do Congo)", + "ln_CF": "lingala (República Centroafricana)", + "ln_CG": "lingala (República do Congo)", + "lo": "laosiano", + "lo_LA": "laosiano (Laos)", + "lt": "lituano", + "lt_LT": "lituano (Lituania)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (República Democrática do Congo)", + "lv": "letón", + "lv_LV": "letón (Letonia)", + "mg": "malgaxe", + "mg_MG": "malgaxe (Madagascar)", + "mk": "macedonio", + "mk_MK": "macedonio (Macedonia)", + "ml": "malabar", + "ml_IN": "malabar (A India)", + "mn": "mongol", + "mn_MN": "mongol (Mongolia)", + "mr": "marathi", + "mr_IN": "marathi (A India)", + "ms": "malaio", + "ms_BN": "malaio (Brunei)", + "ms_MY": "malaio (Malaisia)", + "ms_SG": "malaio (Singapur)", + "mt": "maltés", + "mt_MT": "maltés (Malta)", + "my": "birmano", + "my_MM": "birmano (Myanmar (Birmania))", + "nb": "noruegués bokmal", + "nb_NO": "noruegués bokmal (Noruega)", + "nb_SJ": "noruegués bokmal (Svalbard e Jan Mayen)", + "nd": "ndebele do norte", + "nd_ZW": "ndebele do norte (Cimbabue)", + "ne": "nepalí", + "ne_IN": "nepalí (A India)", + "ne_NP": "nepalí (Nepal)", + "nl": "holandés", + "nl_AW": "holandés (Aruba)", + "nl_BE": "holandés (Bélxica)", + "nl_BQ": "holandés (Caribe Neerlandés)", + "nl_CW": "holandés (Curaçao)", + "nl_NL": "holandés (Países Baixos)", + "nl_SR": "holandés (Suriname)", + "nl_SX": "holandés (Sint Maarten)", + "nn": "noruegués nynorsk", + "nn_NO": "noruegués nynorsk (Noruega)", + "no": "noruegués", + "no_NO": "noruegués (Noruega)", + "om": "oromo", + "om_ET": "oromo (Etiopía)", + "om_KE": "oromo (Kenya)", + "or": "oriya", + "or_IN": "oriya (A India)", + "os": "osetio", + "os_GE": "osetio (Xeorxia)", + "os_RU": "osetio (Rusia)", + "pa": "panxabiano", + "pa_Arab": "panxabiano (árabe)", + "pa_Arab_PK": "panxabiano (árabe, Paquistán)", + "pa_Guru": "panxabiano (gurmukhi)", + "pa_Guru_IN": "panxabiano (gurmukhi, A India)", + "pa_IN": "panxabiano (A India)", + "pa_PK": "panxabiano (Paquistán)", + "pl": "polaco", + "pl_PL": "polaco (Polonia)", + "ps": "pashtu", + "ps_AF": "pashtu (Afganistán)", + "pt": "portugués", + "pt_AO": "portugués (Angola)", + "pt_BR": "portugués (Brasil)", + "pt_CH": "portugués (Suíza)", + "pt_CV": "portugués (Cabo Verde)", + "pt_GQ": "portugués (Guinea Ecuatorial)", + "pt_GW": "portugués (Guinea-Bisau)", + "pt_LU": "portugués (Luxemburgo)", + "pt_MO": "portugués (Macau RAE de China)", + "pt_MZ": "portugués (Mozambique)", + "pt_PT": "portugués (Portugal)", + "pt_ST": "portugués (San Tomé e Príncipe)", + "pt_TL": "portugués (Timor Leste)", + "qu": "quechua", + "qu_BO": "quechua (Bolivia)", + "qu_EC": "quechua (Ecuador)", + "qu_PE": "quechua (Perú)", + "rm": "romanche", + "rm_CH": "romanche (Suíza)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "romanés", + "ro_MD": "romanés (Moldavia)", + "ro_RO": "romanés (Romanía)", + "ru": "ruso", + "ru_BY": "ruso (Bielorrusia)", + "ru_KG": "ruso (Quirguicistán)", + "ru_KZ": "ruso (Casaquistán)", + "ru_MD": "ruso (Moldavia)", + "ru_RU": "ruso (Rusia)", + "ru_UA": "ruso (Ucraína)", + "rw": "ruandés", + "rw_RW": "ruandés (Ruanda)", + "se": "saami do norte", + "se_FI": "saami do norte (Finlandia)", + "se_NO": "saami do norte (Noruega)", + "se_SE": "saami do norte (Suecia)", + "sg": "sango", + "sg_CF": "sango (República Centroafricana)", + "sh": "serbocroata", + "sh_BA": "serbocroata (Bosnia-Hercegovina)", + "si": "cingalés", + "si_LK": "cingalés (Sri Lanka)", + "sk": "eslovaco", + "sk_SK": "eslovaco (Eslovaquia)", + "sl": "esloveno", + "sl_SI": "esloveno (Eslovenia)", + "sn": "shona", + "sn_ZW": "shona (Cimbabue)", + "so": "somalí", + "so_DJ": "somalí (Djibuti)", + "so_ET": "somalí (Etiopía)", + "so_KE": "somalí (Kenya)", + "so_SO": "somalí (Somalia)", + "sq": "albanés", + "sq_AL": "albanés (Albania)", + "sq_MK": "albanés (Macedonia)", + "sq_XK": "albanés (Kosovo)", + "sr": "serbio", + "sr_BA": "serbio (Bosnia-Hercegovina)", + "sr_Cyrl": "serbio (cirílico)", + "sr_Cyrl_BA": "serbio (cirílico, Bosnia-Hercegovina)", + "sr_Cyrl_ME": "serbio (cirílico, Montenegro)", + "sr_Cyrl_RS": "serbio (cirílico, Serbia)", + "sr_Cyrl_XK": "serbio (cirílico, Kosovo)", + "sr_Latn": "serbio (latino)", + "sr_Latn_BA": "serbio (latino, Bosnia-Hercegovina)", + "sr_Latn_ME": "serbio (latino, Montenegro)", + "sr_Latn_RS": "serbio (latino, Serbia)", + "sr_Latn_XK": "serbio (latino, Kosovo)", + "sr_ME": "serbio (Montenegro)", + "sr_RS": "serbio (Serbia)", + "sr_XK": "serbio (Kosovo)", + "sv": "sueco", + "sv_AX": "sueco (Illas Aland)", + "sv_FI": "sueco (Finlandia)", + "sv_SE": "sueco (Suecia)", + "sw": "suahili", + "sw_CD": "suahili (República Democrática do Congo)", + "sw_KE": "suahili (Kenya)", + "sw_TZ": "suahili (Tanzania)", + "sw_UG": "suahili (Uganda)", + "ta": "támil", + "ta_IN": "támil (A India)", + "ta_LK": "támil (Sri Lanka)", + "ta_MY": "támil (Malaisia)", + "ta_SG": "támil (Singapur)", + "te": "telugú", + "te_IN": "telugú (A India)", + "th": "tailandés", + "th_TH": "tailandés (Tailandia)", + "ti": "tigriña", + "ti_ER": "tigriña (Eritrea)", + "ti_ET": "tigriña (Etiopía)", + "tl": "tagalo", + "tl_PH": "tagalo (Filipinas)", + "to": "tonganés", + "to_TO": "tonganés (Tonga)", + "tr": "turco", + "tr_CY": "turco (Chipre)", + "tr_TR": "turco (Turquía)", + "ug": "uigur", + "ug_CN": "uigur (A China)", + "uk": "ucraíno", + "uk_UA": "ucraíno (Ucraína)", + "ur": "urdú", + "ur_IN": "urdú (A India)", + "ur_PK": "urdú (Paquistán)", + "uz": "uzbeco", + "uz_AF": "uzbeco (Afganistán)", + "uz_Arab": "uzbeco (árabe)", + "uz_Arab_AF": "uzbeco (árabe, Afganistán)", + "uz_Cyrl": "uzbeco (cirílico)", + "uz_Cyrl_UZ": "uzbeco (cirílico, Uzbekistán)", + "uz_Latn": "uzbeco (latino)", + "uz_Latn_UZ": "uzbeco (latino, Uzbekistán)", + "uz_UZ": "uzbeco (Uzbekistán)", + "vi": "vietnamita", + "vi_VN": "vietnamita (Vietnam)", + "yi": "yiddish", + "yo": "yoruba", + "yo_BJ": "yoruba (Benin)", + "yo_NG": "yoruba (Nixeria)", + "zh": "chinés", + "zh_CN": "chinés (A China)", + "zh_HK": "chinés (Hong Kong RAE de China)", + "zh_Hans": "chinés (simplificado)", + "zh_Hans_CN": "chinés (simplificado, A China)", + "zh_Hans_HK": "chinés (simplificado, Hong Kong RAE de China)", + "zh_Hans_MO": "chinés (simplificado, Macau RAE de China)", + "zh_Hans_SG": "chinés (simplificado, Singapur)", + "zh_Hant": "chinés (tradicional)", + "zh_Hant_HK": "chinés (tradicional, Hong Kong RAE de China)", + "zh_Hant_MO": "chinés (tradicional, Macau RAE de China)", + "zh_Hant_TW": "chinés (tradicional, Taiwán)", + "zh_MO": "chinés (Macau RAE de China)", + "zh_SG": "chinés (Singapur)", + "zh_TW": "chinés (Taiwán)", + "zu": "zulú", + "zu_ZA": "zulú (Suráfrica)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/gu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/gu.json new file mode 100644 index 0000000000000000000000000000000000000000..bd4a500d031ae8da9fb3b01826add3451721badd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/gu.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "આફà«àª°àª¿àª•નà«àª¸", + "af_NA": "આફà«àª°àª¿àª•નà«àª¸ (નામિબિયા)", + "af_ZA": "આફà«àª°àª¿àª•નà«àª¸ (દકà«àª·àª¿àª£ આફà«àª°àª¿àª•ા)", + "ak": "અકાન", + "ak_GH": "અકાન (ઘાના)", + "am": "àªàª®à«àª¹àª¾àª°àª¿àª•", + "am_ET": "àªàª®à«àª¹àª¾àª°àª¿àª• (ઇથિઓપિયા)", + "ar": "અરબી", + "ar_AE": "અરબી (યà«àª¨àª¾àª‡àªŸà«‡àª¡ આરબ અમીરાત)", + "ar_BH": "અરબી (બેહરીન)", + "ar_DJ": "અરબી (જીબૌટી)", + "ar_DZ": "અરબી (અલà«àªœà«€àª°àª¿àª¯àª¾)", + "ar_EG": "અરબી (ઇજિપà«àª¤)", + "ar_EH": "અરબી (પશà«àªšàª¿àª®à«€ સહારા)", + "ar_ER": "અરબી (àªàª°àª¿àªŸà«àª°àª¿àª¯àª¾)", + "ar_IL": "અરબી (ઇàªàª°àª¾àª‡àª²)", + "ar_IQ": "અરબી (ઇરાક)", + "ar_JO": "અરબી (જોરà«àª¡àª¨)", + "ar_KM": "અરબી (કોમોરસ)", + "ar_KW": "અરબી (કà«àªµà«ˆàª¤)", + "ar_LB": "અરબી (લેબનોન)", + "ar_LY": "અરબી (લિબિયા)", + "ar_MA": "અરબી (મોરોકà«àª•à«‹)", + "ar_MR": "અરબી (મૌરિટાનિયા)", + "ar_OM": "અરબી (ઓમાન)", + "ar_PS": "અરબી (પેલેસà«àªŸàª¿àª¨àª¿àª¯àª¨ ટેરિટરી)", + "ar_QA": "અરબી (કતાર)", + "ar_SA": "અરબી (સાઉદી અરેબિયા)", + "ar_SD": "અરબી (સà«àª¦àª¾àª¨)", + "ar_SO": "અરબી (સોમાલિયા)", + "ar_SS": "અરબી (દકà«àª·àª¿àª£ સà«àª¦àª¾àª¨)", + "ar_SY": "અરબી (સીરિયા)", + "ar_TD": "અરબી (ચાડ)", + "ar_TN": "અરબી (ટà«àª¯à«àª¨àª¿àª¶àª¿àª¯àª¾)", + "ar_YE": "અરબી (યેમેન)", + "as": "આસામી", + "as_IN": "આસામી (ભારત)", + "az": "અàªàª°àª¬à«ˆàªœàª¾àª¨à«€", + "az_AZ": "અàªàª°àª¬à«ˆàªœàª¾àª¨à«€ (અàªàª°àª¬à«ˆàªœàª¾àª¨)", + "az_Cyrl": "અàªàª°àª¬à«ˆàªœàª¾àª¨à«€ (સિરિલિક)", + "az_Cyrl_AZ": "અàªàª°àª¬à«ˆàªœàª¾àª¨à«€ (સિરિલિક, અàªàª°àª¬à«ˆàªœàª¾àª¨)", + "az_Latn": "અàªàª°àª¬à«ˆàªœàª¾àª¨à«€ (લેટિન)", + "az_Latn_AZ": "અàªàª°àª¬à«ˆàªœàª¾àª¨à«€ (લેટિન, અàªàª°àª¬à«ˆàªœàª¾àª¨)", + "be": "બેલારà«àª¶àª¿àª¯àª¨", + "be_BY": "બેલારà«àª¶àª¿àª¯àª¨ (બેલારà«àª¸)", + "bg": "બલà«àª—ેરિયન", + "bg_BG": "બલà«àª—ેરિયન (બલà«àª—ેરિયા)", + "bm": "બામà«àª¬àª¾àª°àª¾", + "bm_ML": "બામà«àª¬àª¾àª°àª¾ (માલી)", + "bn": "બંગાળી", + "bn_BD": "બંગાળી (બાંગà«àª²àª¾àª¦à«‡àª¶)", + "bn_IN": "બંગાળી (ભારત)", + "bo": "તિબેટીયન", + "bo_CN": "તિબેટીયન (ચીન)", + "bo_IN": "તિબેટીયન (ભારત)", + "br": "બà«àª°à«‡àªŸà«‹àª¨", + "br_FR": "બà«àª°à«‡àªŸà«‹àª¨ (ફà«àª°àª¾àª‚સ)", + "bs": "બોસà«àª¨àª¿àª¯àª¨", + "bs_BA": "બોસà«àª¨àª¿àª¯àª¨ (બોસà«àª¨àª¿àª¯àª¾ અને હરà«àªà«‡àª—ોવિના)", + "bs_Cyrl": "બોસà«àª¨àª¿àª¯àª¨ (સિરિલિક)", + "bs_Cyrl_BA": "બોસà«àª¨àª¿àª¯àª¨ (સિરિલિક, બોસà«àª¨àª¿àª¯àª¾ અને હરà«àªà«‡àª—ોવિના)", + "bs_Latn": "બોસà«àª¨àª¿àª¯àª¨ (લેટિન)", + "bs_Latn_BA": "બોસà«àª¨àª¿àª¯àª¨ (લેટિન, બોસà«àª¨àª¿àª¯àª¾ અને હરà«àªà«‡àª—ોવિના)", + "ca": "કતલાન", + "ca_AD": "કતલાન (àªàª‚ડોરા)", + "ca_ES": "કતલાન (સà«àªªà«‡àª¨)", + "ca_FR": "કતલાન (ફà«àª°àª¾àª‚સ)", + "ca_IT": "કતલાન (ઇટાલી)", + "ce": "ચેચન", + "ce_RU": "ચેચન (રશિયા)", + "cs": "ચેક", + "cs_CZ": "ચેક (ચેક રીપબà«àª²àª¿àª•)", + "cy": "વેલà«àª¶", + "cy_GB": "વેલà«àª¶ (યà«àª¨àª¾àª‡àªŸà«‡àª¡ કિંગડમ)", + "da": "ડેનિશ", + "da_DK": "ડેનિશ (ડેનમારà«àª•)", + "da_GL": "ડેનિશ (ગà«àª°à«€àª¨àª²à«‡àª¨à«àª¡)", + "de": "જરà«àª®àª¨", + "de_AT": "જરà«àª®àª¨ (ઑસà«àªŸà«àª°àª¿àª¯àª¾)", + "de_BE": "જરà«àª®àª¨ (બેલà«àªœà«€àª¯àª®)", + "de_CH": "જરà«àª®àª¨ (સà«àªµàª¿àªŸà«àªàª°à«àª²à«…નà«àª¡)", + "de_DE": "જરà«àª®àª¨ (જરà«àª®àª¨à«€)", + "de_IT": "જરà«àª®àª¨ (ઇટાલી)", + "de_LI": "જરà«àª®àª¨ (લૈચટેંસà«àªŸà«‡àª‡àª¨)", + "de_LU": "જરà«àª®àª¨ (લકà«àªàª®àª¬àª°à«àª—)", + "dz": "ડà«àªà«‹àª‚ગà«àª–ા", + "dz_BT": "ડà«àªà«‹àª‚ગà«àª–ા (ભૂટાન)", + "ee": "ઈવ", + "ee_GH": "ઈવ (ઘાના)", + "ee_TG": "ઈવ (ટોગો)", + "el": "ગà«àª°à«€àª•", + "el_CY": "ગà«àª°à«€àª• (સાયપà«àª°àª¸)", + "el_GR": "ગà«àª°à«€àª• (ગà«àª°à«€àª¸)", + "en": "અંગà«àª°à«‡àªœà«€", + "en_AG": "અંગà«àª°à«‡àªœà«€ (àªàª¨à«àªŸà«€àª—à«àª† અને બરà«àª®à«àª¡àª¾)", + "en_AI": "અંગà«àª°à«‡àªœà«€ (àªàª‚ગà«àªµàª¿àª²àª¾)", + "en_AS": "અંગà«àª°à«‡àªœà«€ (અમેરીકન સમોઆ)", + "en_AT": "અંગà«àª°à«‡àªœà«€ (ઑસà«àªŸà«àª°àª¿àª¯àª¾)", + "en_AU": "અંગà«àª°à«‡àªœà«€ (ઑસà«àªŸà«àª°à«‡àª²àª¿àª¯àª¾)", + "en_BB": "અંગà«àª°à«‡àªœà«€ (બારà«àª¬àª¾àª¡à«‹àª¸)", + "en_BE": "અંગà«àª°à«‡àªœà«€ (બેલà«àªœà«€àª¯àª®)", + "en_BI": "અંગà«àª°à«‡àªœà«€ (બà«àª°à«àª‚ડી)", + "en_BM": "અંગà«àª°à«‡àªœà«€ (બરà«àª®à«àª¡àª¾)", + "en_BS": "અંગà«àª°à«‡àªœà«€ (બહામાસ)", + "en_BW": "અંગà«àª°à«‡àªœà«€ (બોતà«àª¸à«àªµàª¾àª¨àª¾)", + "en_BZ": "અંગà«àª°à«‡àªœà«€ (બેલીàª)", + "en_CA": "અંગà«àª°à«‡àªœà«€ (કેનેડા)", + "en_CC": "અંગà«àª°à«‡àªœà«€ (કોકોઠ(કીલીંગ) આઇલેનà«àª¡à«àª¸)", + "en_CH": "અંગà«àª°à«‡àªœà«€ (સà«àªµàª¿àªŸà«àªàª°à«àª²à«…નà«àª¡)", + "en_CK": "અંગà«àª°à«‡àªœà«€ (કà«àª• આઇલેનà«àª¡à«àª¸)", + "en_CM": "અંગà«àª°à«‡àªœà«€ (કૅમરૂન)", + "en_CX": "અંગà«àª°à«‡àªœà«€ (કà«àª°àª¿àª¸àª®àª¸ આઇલેનà«àª¡)", + "en_CY": "અંગà«àª°à«‡àªœà«€ (સાયપà«àª°àª¸)", + "en_DE": "અંગà«àª°à«‡àªœà«€ (જરà«àª®àª¨à«€)", + "en_DG": "અંગà«àª°à«‡àªœà«€ (ડિàªàª—à«‹ ગારસિઆ)", + "en_DK": "અંગà«àª°à«‡àªœà«€ (ડેનમારà«àª•)", + "en_DM": "અંગà«àª°à«‡àªœà«€ (ડોમિનિકા)", + "en_ER": "અંગà«àª°à«‡àªœà«€ (àªàª°àª¿àªŸà«àª°àª¿àª¯àª¾)", + "en_FI": "અંગà«àª°à«‡àªœà«€ (ફિનલેનà«àª¡)", + "en_FJ": "અંગà«àª°à«‡àªœà«€ (ફીજી)", + "en_FK": "અંગà«àª°à«‡àªœà«€ (ફૉકલેનà«àª¡ ટાપà«àª“)", + "en_FM": "અંગà«àª°à«‡àªœà«€ (માઇકà«àª°à«‹àª¨à«‡àª¶àª¿àª¯àª¾)", + "en_GB": "અંગà«àª°à«‡àªœà«€ (યà«àª¨àª¾àª‡àªŸà«‡àª¡ કિંગડમ)", + "en_GD": "અંગà«àª°à«‡àªœà«€ (ગà«àª°à«‡àª¨à«‡àª¡àª¾)", + "en_GG": "અંગà«àª°à«‡àªœà«€ (ગà«àªµà«‡àª°à«àª¨àª¸à«‡)", + "en_GH": "અંગà«àª°à«‡àªœà«€ (ઘાના)", + "en_GI": "અંગà«àª°à«‡àªœà«€ (જીબà«àª°àª¾àª²à«àªŸàª°)", + "en_GM": "અંગà«àª°à«‡àªœà«€ (ગેમà«àª¬àª¿àª¯àª¾)", + "en_GU": "અંગà«àª°à«‡àªœà«€ (ગà«àªµàª¾àª®)", + "en_GY": "અંગà«àª°à«‡àªœà«€ (ગયાના)", + "en_HK": "અંગà«àª°à«‡àªœà«€ (હોંગકોંગ SAR ચીન)", + "en_IE": "અંગà«àª°à«‡àªœà«€ (આયરà«àª²à«‡àª¨à«àª¡)", + "en_IL": "અંગà«àª°à«‡àªœà«€ (ઇàªàª°àª¾àª‡àª²)", + "en_IM": "અંગà«àª°à«‡àªœà«€ (આઈલ ઓફ મૅન)", + "en_IN": "અંગà«àª°à«‡àªœà«€ (ભારત)", + "en_IO": "અંગà«àª°à«‡àªœà«€ (બà«àª°àª¿àªŸàª¿àª¶ ઇનà«àª¡àª¿àª¯àª¨ ઓશન ટેરિટરી)", + "en_JE": "અંગà«àª°à«‡àªœà«€ (જરà«àª¸à«€)", + "en_JM": "અંગà«àª°à«‡àªœà«€ (જમૈકા)", + "en_KE": "અંગà«àª°à«‡àªœà«€ (કેનà«àª¯àª¾)", + "en_KI": "અંગà«àª°à«‡àªœà«€ (કિરિબાટી)", + "en_KN": "અંગà«àª°à«‡àªœà«€ (સેનà«àªŸ કિટà«àª¸ અને નેવિસ)", + "en_KY": "અંગà«àª°à«‡àªœà«€ (કેમેન ટાપà«àª“)", + "en_LC": "અંગà«àª°à«‡àªœà«€ (સેનà«àªŸ લà«àª¸àª¿àª¯àª¾)", + "en_LR": "અંગà«àª°à«‡àªœà«€ (લાઇબેરિયા)", + "en_LS": "અંગà«àª°à«‡àªœà«€ (લેસોથો)", + "en_MG": "અંગà«àª°à«‡àªœà«€ (મેડાગાસà«àª•ર)", + "en_MH": "અંગà«àª°à«‡àªœà«€ (મારà«àª¶àª² આઇલેનà«àª¡à«àª¸)", + "en_MO": "અંગà«àª°à«‡àªœà«€ (મકાઉ SAR ચીન)", + "en_MP": "અંગà«àª°à«‡àªœà«€ (ઉતà«àª¤àª°à«€àª¯ મારિયાના આઇલેનà«àª¡à«àª¸)", + "en_MS": "અંગà«àª°à«‡àªœà«€ (મોંટસેરાત)", + "en_MT": "અંગà«àª°à«‡àªœà«€ (માલà«àªŸàª¾)", + "en_MU": "અંગà«àª°à«‡àªœà«€ (મોરિશિયસ)", + "en_MW": "અંગà«àª°à«‡àªœà«€ (માલાવી)", + "en_MY": "અંગà«àª°à«‡àªœà«€ (મલેશિયા)", + "en_NA": "અંગà«àª°à«‡àªœà«€ (નામિબિયા)", + "en_NF": "અંગà«àª°à«‡àªœà«€ (નોરફૉક ટાપà«)", + "en_NG": "અંગà«àª°à«‡àªœà«€ (નાઇજીરીયા)", + "en_NL": "અંગà«àª°à«‡àªœà«€ (નેધરલેનà«àª¡)", + "en_NR": "અંગà«àª°à«‡àªœà«€ (નૌરà«)", + "en_NU": "અંગà«àª°à«‡àªœà«€ (નીયà«)", + "en_NZ": "અંગà«àª°à«‡àªœà«€ (નà«àª¯à«àªà«€àª²à«‡àª¨à«àª¡)", + "en_PG": "અંગà«àª°à«‡àªœà«€ (પાપà«àª† નà«àª¯à«‚ ગિની)", + "en_PH": "અંગà«àª°à«‡àªœà«€ (ફિલીપાઇનà«àª¸)", + "en_PK": "અંગà«àª°à«‡àªœà«€ (પાકિસà«àª¤àª¾àª¨)", + "en_PN": "અંગà«àª°à«‡àªœà«€ (પીટકૈરà«àª¨ આઇલેનà«àª¡à«àª¸)", + "en_PR": "અંગà«àª°à«‡àªœà«€ (પà«àª¯à«àª…રà«àªŸà«‹ રિકો)", + "en_PW": "અંગà«àª°à«‡àªœà«€ (પલાઉ)", + "en_RW": "અંગà«àª°à«‡àªœà«€ (રવાંડા)", + "en_SB": "અંગà«àª°à«‡àªœà«€ (સોલોમન આઇલેનà«àª¡à«àª¸)", + "en_SC": "અંગà«àª°à«‡àªœà«€ (સેશેલà«àª¸)", + "en_SD": "અંગà«àª°à«‡àªœà«€ (સà«àª¦àª¾àª¨)", + "en_SE": "અંગà«àª°à«‡àªœà«€ (સà«àªµà«€àª¡àª¨)", + "en_SG": "અંગà«àª°à«‡àªœà«€ (સિંગાપà«àª°)", + "en_SH": "અંગà«àª°à«‡àªœà«€ (સેનà«àªŸ હેલેના)", + "en_SI": "અંગà«àª°à«‡àªœà«€ (સà«àª²à«‹àªµà«‡àª¨àª¿àª¯àª¾)", + "en_SL": "અંગà«àª°à«‡àªœà«€ (સીàªàª°àª¾ લેઓન)", + "en_SS": "અંગà«àª°à«‡àªœà«€ (દકà«àª·àª¿àª£ સà«àª¦àª¾àª¨)", + "en_SX": "અંગà«àª°à«‡àªœà«€ (સિંટ મારà«àªŸà«‡àª¨)", + "en_SZ": "અંગà«àª°à«‡àªœà«€ (સà«àªµàª¾àªàª¿àª²à«‡àª¨à«àª¡)", + "en_TC": "અંગà«àª°à«‡àªœà«€ (તà«àª°à«àª•à«àª¸ અને કાઇકોસ ટાપà«àª“)", + "en_TK": "અંગà«àª°à«‡àªœà«€ (ટોકેલાઉ)", + "en_TO": "અંગà«àª°à«‡àªœà«€ (ટોંગા)", + "en_TT": "અંગà«àª°à«‡àªœà«€ (ટà«àª°àª¿àª¨à«€àª¦àª¾àª¦ અને ટોબેગો)", + "en_TV": "અંગà«àª°à«‡àªœà«€ (તà«àªµàª¾àª²à«)", + "en_TZ": "અંગà«àª°à«‡àªœà«€ (તાંàªàª¾àª¨àª¿àª¯àª¾)", + "en_UG": "અંગà«àª°à«‡àªœà«€ (યà«àª—ાંડા)", + "en_UM": "અંગà«àª°à«‡àªœà«€ (સંયà«àª•à«àª¤ રાજà«àª¯ આઉટલાઇંગ આયલેનà«àª¡à«àª¸)", + "en_US": "અંગà«àª°à«‡àªœà«€ (સંયà«àª•ત રાજà«àª¯ અમેરિકા)", + "en_VC": "અંગà«àª°à«‡àªœà«€ (સેનà«àªŸ વિનà«àª¸à«‡àªŸ અને ગà«àª°à«‡àª¨à«‡àª¡à«€àª¨à«àª¸)", + "en_VG": "અંગà«àª°à«‡àªœà«€ (બà«àª°àª¿àªŸàª¿àª¶ વરà«àªœàª¿àª¨ ટાપà«àª“)", + "en_VI": "અંગà«àª°à«‡àªœà«€ (યà«.àªàª¸. વરà«àªœàª¿àª¨ ટાપà«àª“)", + "en_VU": "અંગà«àª°à«‡àªœà«€ (વાનà«àª†àª¤à«)", + "en_WS": "અંગà«àª°à«‡àªœà«€ (સમોઆ)", + "en_ZA": "અંગà«àª°à«‡àªœà«€ (દકà«àª·àª¿àª£ આફà«àª°àª¿àª•ા)", + "en_ZM": "અંગà«àª°à«‡àªœà«€ (àªàª¾àª®à«àª¬àª¿àª¯àª¾)", + "en_ZW": "અંગà«àª°à«‡àªœà«€ (àªàª¿àª®à«àª¬àª¾àª¬à«àªµà«‡)", + "eo": "àªàª¸à«àªªà«‡àª°àª¾àª¨à«àªŸà«‹", + "es": "સà«àªªà«‡àª¨àª¿àª¶", + "es_AR": "સà«àªªà«‡àª¨àª¿àª¶ (આરà«àªœà«‡àª¨à«àªŸà«€àª¨àª¾)", + "es_BO": "સà«àªªà«‡àª¨àª¿àª¶ (બોલિવિયા)", + "es_BR": "સà«àªªà«‡àª¨àª¿àª¶ (બà«àª°àª¾àªàª¿àª²)", + "es_CL": "સà«àªªà«‡àª¨àª¿àª¶ (ચિલી)", + "es_CO": "સà«àªªà«‡àª¨àª¿àª¶ (કોલમà«àª¬àª¿àª¯àª¾)", + "es_CR": "સà«àªªà«‡àª¨àª¿àª¶ (કોસà«àªŸàª¾ રિકા)", + "es_CU": "સà«àªªà«‡àª¨àª¿àª¶ (કà«àª¯à«àª¬àª¾)", + "es_DO": "સà«àªªà«‡àª¨àª¿àª¶ (ડોમિનિકન રીપબà«àª²àª¿àª•)", + "es_EA": "સà«àªªà«‡àª¨àª¿àª¶ (સà«àª¯à«àªŸàª¾ અને મેલિલા)", + "es_EC": "સà«àªªà«‡àª¨àª¿àª¶ (àªàª•à«àªµàª¾àª¡à«‹àª°)", + "es_ES": "સà«àªªà«‡àª¨àª¿àª¶ (સà«àªªà«‡àª¨)", + "es_GQ": "સà«àªªà«‡àª¨àª¿àª¶ (ઇકà«àªµà«‡àªŸà«‹àª°àª¿àª¯àª² ગિની)", + "es_GT": "સà«àªªà«‡àª¨àª¿àª¶ (ગà«àªµàª¾àªŸà«‡àª®àª¾àª²àª¾)", + "es_HN": "સà«àªªà«‡àª¨àª¿àª¶ (હોનà«àª¡à«àª°àª¸)", + "es_IC": "સà«àªªà«‡àª¨àª¿àª¶ (કૅનેરી ટાપà«àª“)", + "es_MX": "સà«àªªà«‡àª¨àª¿àª¶ (મેકà«àª¸àª¿àª•à«‹)", + "es_NI": "સà«àªªà«‡àª¨àª¿àª¶ (નિકારાગà«àª†)", + "es_PA": "સà«àªªà«‡àª¨àª¿àª¶ (પનામા)", + "es_PE": "સà«àªªà«‡àª¨àª¿àª¶ (પેરà«)", + "es_PH": "સà«àªªà«‡àª¨àª¿àª¶ (ફિલીપાઇનà«àª¸)", + "es_PR": "સà«àªªà«‡àª¨àª¿àª¶ (પà«àª¯à«àª…રà«àªŸà«‹ રિકો)", + "es_PY": "સà«àªªà«‡àª¨àª¿àª¶ (પેરાગà«àªµà«‡)", + "es_SV": "સà«àªªà«‡àª¨àª¿àª¶ (àªàª² સેલà«àªµàª¾àª¡à«‹àª°)", + "es_US": "સà«àªªà«‡àª¨àª¿àª¶ (સંયà«àª•ત રાજà«àª¯ અમેરિકા)", + "es_UY": "સà«àªªà«‡àª¨àª¿àª¶ (ઉરà«àª—à«àªµà«‡)", + "es_VE": "સà«àªªà«‡àª¨àª¿àª¶ (વેનેàªà«àªàª²àª¾)", + "et": "àªàª¸à«àªŸà«‹àª¨àª¿àª¯àª¨", + "et_EE": "àªàª¸à«àªŸà«‹àª¨àª¿àª¯àª¨ (àªàª¸à«àªŸà«‹àª¨àª¿àª¯àª¾)", + "eu": "બાસà«àª•", + "eu_ES": "બાસà«àª• (સà«àªªà«‡àª¨)", + "fa": "ફારસી", + "fa_AF": "ફારસી (અફઘાનિસà«àª¤àª¾àª¨)", + "fa_IR": "ફારસી (ઈરાન)", + "ff": "ફà«àª²àª¾àª¹", + "ff_CM": "ફà«àª²àª¾àª¹ (કૅમરૂન)", + "ff_GN": "ફà«àª²àª¾àª¹ (ગિની)", + "ff_MR": "ફà«àª²àª¾àª¹ (મૌરિટાનિયા)", + "ff_SN": "ફà«àª²àª¾àª¹ (સેનેગલ)", + "fi": "ફિનિશ", + "fi_FI": "ફિનિશ (ફિનલેનà«àª¡)", + "fo": "ફોરિસà«àª¤", + "fo_DK": "ફોરિસà«àª¤ (ડેનમારà«àª•)", + "fo_FO": "ફોરિસà«àª¤ (ફૅરો ટાપà«àª“)", + "fr": "ફà«àª°à«‡àª¨à«àªš", + "fr_BE": "ફà«àª°à«‡àª¨à«àªš (બેલà«àªœà«€àª¯àª®)", + "fr_BF": "ફà«àª°à«‡àª¨à«àªš (બà«àª°à«àª•િના ફાસો)", + "fr_BI": "ફà«àª°à«‡àª¨à«àªš (બà«àª°à«àª‚ડી)", + "fr_BJ": "ફà«àª°à«‡àª¨à«àªš (બેનિન)", + "fr_BL": "ફà«àª°à«‡àª¨à«àªš (સેનà«àªŸ બારà«àª¥à«‡àª²à«‡àª®à«€)", + "fr_CA": "ફà«àª°à«‡àª¨à«àªš (કેનેડા)", + "fr_CD": "ફà«àª°à«‡àª¨à«àªš (કોંગો - કિંશાસા)", + "fr_CF": "ફà«àª°à«‡àª¨à«àªš (સેનà«àªŸà«àª°àª² આફà«àª°àª¿àª•ન રીપબà«àª²àª¿àª•)", + "fr_CG": "ફà«àª°à«‡àª¨à«àªš (કોંગો - બà«àª°àª¾àªàª¾àªµàª¿àª²à«‡)", + "fr_CH": "ફà«àª°à«‡àª¨à«àªš (સà«àªµàª¿àªŸà«àªàª°à«àª²à«…નà«àª¡)", + "fr_CI": "ફà«àª°à«‡àª¨à«àªš (કોટ ડી આઇવરી)", + "fr_CM": "ફà«àª°à«‡àª¨à«àªš (કૅમરૂન)", + "fr_DJ": "ફà«àª°à«‡àª¨à«àªš (જીબૌટી)", + "fr_DZ": "ફà«àª°à«‡àª¨à«àªš (અલà«àªœà«€àª°àª¿àª¯àª¾)", + "fr_FR": "ફà«àª°à«‡àª¨à«àªš (ફà«àª°àª¾àª‚સ)", + "fr_GA": "ફà«àª°à«‡àª¨à«àªš (ગેબન)", + "fr_GF": "ફà«àª°à«‡àª¨à«àªš (ફà«àª°à«‡àª‚ચ ગયાના)", + "fr_GN": "ફà«àª°à«‡àª¨à«àªš (ગિની)", + "fr_GP": "ફà«àª°à«‡àª¨à«àªš (ગà«àªµàª¾àª¡à«‡àª²à«‹àªª)", + "fr_GQ": "ફà«àª°à«‡àª¨à«àªš (ઇકà«àªµà«‡àªŸà«‹àª°àª¿àª¯àª² ગિની)", + "fr_HT": "ફà«àª°à«‡àª¨à«àªš (હૈતિ)", + "fr_KM": "ફà«àª°à«‡àª¨à«àªš (કોમોરસ)", + "fr_LU": "ફà«àª°à«‡àª¨à«àªš (લકà«àªàª®àª¬àª°à«àª—)", + "fr_MA": "ફà«àª°à«‡àª¨à«àªš (મોરોકà«àª•à«‹)", + "fr_MC": "ફà«àª°à«‡àª¨à«àªš (મોનાકો)", + "fr_MF": "ફà«àª°à«‡àª¨à«àªš (સેનà«àªŸ મારà«àªŸàª¿àª¨)", + "fr_MG": "ફà«àª°à«‡àª¨à«àªš (મેડાગાસà«àª•ર)", + "fr_ML": "ફà«àª°à«‡àª¨à«àªš (માલી)", + "fr_MQ": "ફà«àª°à«‡àª¨à«àªš (મારà«àªŸà«€àª¨à«€àª•)", + "fr_MR": "ફà«àª°à«‡àª¨à«àªš (મૌરિટાનિયા)", + "fr_MU": "ફà«àª°à«‡àª¨à«àªš (મોરિશિયસ)", + "fr_NC": "ફà«àª°à«‡àª¨à«àªš (નà«àª¯à« સેલેડોનિયા)", + "fr_NE": "ફà«àª°à«‡àª¨à«àªš (નાઇજર)", + "fr_PF": "ફà«àª°à«‡àª¨à«àªš (ફà«àª°à«‡àª‚ચ પોલિનેશિયા)", + "fr_PM": "ફà«àª°à«‡àª¨à«àªš (સેનà«àªŸ પિયર અને મીકà«àªµà«‡àª²àª¨)", + "fr_RE": "ફà«àª°à«‡àª¨à«àªš (રીયà«àª¨àª¿àª¯àª¨)", + "fr_RW": "ફà«àª°à«‡àª¨à«àªš (રવાંડા)", + "fr_SC": "ફà«àª°à«‡àª¨à«àªš (સેશેલà«àª¸)", + "fr_SN": "ફà«àª°à«‡àª¨à«àªš (સેનેગલ)", + "fr_SY": "ફà«àª°à«‡àª¨à«àªš (સીરિયા)", + "fr_TD": "ફà«àª°à«‡àª¨à«àªš (ચાડ)", + "fr_TG": "ફà«àª°à«‡àª¨à«àªš (ટોગો)", + "fr_TN": "ફà«àª°à«‡àª¨à«àªš (ટà«àª¯à«àª¨àª¿àª¶àª¿àª¯àª¾)", + "fr_VU": "ફà«àª°à«‡àª¨à«àªš (વાનà«àª†àª¤à«)", + "fr_WF": "ફà«àª°à«‡àª¨à«àªš (વેલીસ અને ફà«àª¯à«àªŸà«àª¨àª¾)", + "fr_YT": "ફà«àª°à«‡àª¨à«àªš (મેયોટ)", + "fy": "પશà«àªšàª¿àª®à«€ ફà«àª°àª¿àª¸àª¿àª¯àª¨", + "fy_NL": "પશà«àªšàª¿àª®à«€ ફà«àª°àª¿àª¸àª¿àª¯àª¨ (નેધરલેનà«àª¡)", + "ga": "આઇરિશ", + "ga_IE": "આઇરિશ (આયરà«àª²à«‡àª¨à«àª¡)", + "gd": "સà«àª•ોટીસ ગેલિક", + "gd_GB": "સà«àª•ોટીસ ગેલિક (યà«àª¨àª¾àª‡àªŸà«‡àª¡ કિંગડમ)", + "gl": "ગેલિશિયન", + "gl_ES": "ગેલિશિયન (સà«àªªà«‡àª¨)", + "gu": "ગà«àªœàª°àª¾àª¤à«€", + "gu_IN": "ગà«àªœàª°àª¾àª¤à«€ (ભારત)", + "gv": "માંકà«àª¸", + "gv_IM": "માંકà«àª¸ (આઈલ ઓફ મૅન)", + "ha": "હૌસા", + "ha_GH": "હૌસા (ઘાના)", + "ha_NE": "હૌસા (નાઇજર)", + "ha_NG": "હૌસા (નાઇજીરીયા)", + "he": "હીબà«àª°à«", + "he_IL": "હીબà«àª°à« (ઇàªàª°àª¾àª‡àª²)", + "hi": "હિનà«àª¦à«€", + "hi_IN": "હિનà«àª¦à«€ (ભારત)", + "hr": "કà«àª°à«‹àªàª¶àª¿àª¯àª¨", + "hr_BA": "કà«àª°à«‹àªàª¶àª¿àª¯àª¨ (બોસà«àª¨àª¿àª¯àª¾ અને હરà«àªà«‡àª—ોવિના)", + "hr_HR": "કà«àª°à«‹àªàª¶àª¿àª¯àª¨ (કà«àª°à«‹àªàª¶àª¿àª¯àª¾)", + "hu": "હંગેરિયન", + "hu_HU": "હંગેરિયન (હંગેરી)", + "hy": "આરà«àª®à«‡àª¨àª¿àª¯àª¨", + "hy_AM": "આરà«àª®à«‡àª¨àª¿àª¯àª¨ (આરà«àª®à«‡àª¨àª¿àª¯àª¾)", + "id": "ઇનà«àª¡à«‹àª¨à«‡àª¶àª¿àª¯àª¨", + "id_ID": "ઇનà«àª¡à«‹àª¨à«‡àª¶àª¿àª¯àª¨ (ઇનà«àª¡à«‹àª¨à«‡àª¶àª¿àª¯àª¾)", + "ig": "ઇગà«àª¬à«‹", + "ig_NG": "ઇગà«àª¬à«‹ (નાઇજીરીયા)", + "ii": "સિચà«àª†àª¨ યી", + "ii_CN": "સિચà«àª†àª¨ યી (ચીન)", + "is": "આઇસલેનà«àª¡àª¿àª•", + "is_IS": "આઇસલેનà«àª¡àª¿àª• (આઇસલેનà«àª¡)", + "it": "ઇટાલિયન", + "it_CH": "ઇટાલિયન (સà«àªµàª¿àªŸà«àªàª°à«àª²à«…નà«àª¡)", + "it_IT": "ઇટાલિયન (ઇટાલી)", + "it_SM": "ઇટાલિયન (સૅન મેરિનો)", + "ja": "જાપાનીàª", + "ja_JP": "જાપાનીઠ(જાપાન)", + "ka": "જà«àª¯à«‹àª°à«àªœàª¿àª…ન", + "ka_GE": "જà«àª¯à«‹àª°à«àªœàª¿àª…ન (જà«àª¯à«‹àª°à«àªœà«€àª¯àª¾)", + "ki": "કિકà«àª¯à«‚", + "ki_KE": "કિકà«àª¯à«‚ (કેનà«àª¯àª¾)", + "kk": "કàªàª¾àª–", + "kk_KZ": "કàªàª¾àª– (કàªàª¾àª•િસà«àª¤àª¾àª¨)", + "kl": "કલાલà«àª²àª¿àª¸à«àª¤", + "kl_GL": "કલાલà«àª²àª¿àª¸à«àª¤ (ગà«àª°à«€àª¨àª²à«‡àª¨à«àª¡)", + "km": "ખà«àª®à«‡àª°", + "km_KH": "ખà«àª®à«‡àª° (કંબોડિયા)", + "kn": "કનà«àª¨àª¡", + "kn_IN": "કનà«àª¨àª¡ (ભારત)", + "ko": "કોરિયન", + "ko_KP": "કોરિયન (ઉતà«àª¤àª° કોરિયા)", + "ko_KR": "કોરિયન (દકà«àª·àª¿àª£ કોરિયા)", + "ks": "કાશà«àª®à«€àª°à«€", + "ks_IN": "કાશà«àª®à«€àª°à«€ (ભારત)", + "kw": "કોરà«àª¨àª¿àª¶", + "kw_GB": "કોરà«àª¨àª¿àª¶ (યà«àª¨àª¾àª‡àªŸà«‡àª¡ કિંગડમ)", + "ky": "કિરà«àª—à«€àª", + "ky_KG": "કિરà«àª—ીઠ(કિરà«àª—િàªà«àª¸à«àª¤àª¾àª¨)", + "lb": "લકà«àªà«‡àª®àª¬àª°à«àª—િશ", + "lb_LU": "લકà«àªà«‡àª®àª¬àª°à«àª—િશ (લકà«àªàª®àª¬àª°à«àª—)", + "lg": "ગાંડા", + "lg_UG": "ગાંડા (યà«àª—ાંડા)", + "ln": "લિંગાલા", + "ln_AO": "લિંગાલા (અંગોલા)", + "ln_CD": "લિંગાલા (કોંગો - કિંશાસા)", + "ln_CF": "લિંગાલા (સેનà«àªŸà«àª°àª² આફà«àª°àª¿àª•ન રીપબà«àª²àª¿àª•)", + "ln_CG": "લિંગાલા (કોંગો - બà«àª°àª¾àªàª¾àªµàª¿àª²à«‡)", + "lo": "લાઓથિયન", + "lo_LA": "લાઓથિયન (લાઓસ)", + "lt": "લિથà«àª¨àª¿àª¯àª¨", + "lt_LT": "લિથà«àª¨àª¿àª¯àª¨ (લિથà«àª†àª¨àª¿àª¯àª¾)", + "lu": "લૂબા-કટાંગા", + "lu_CD": "લૂબા-કટાંગા (કોંગો - કિંશાસા)", + "lv": "લાતવિયન", + "lv_LV": "લાતવિયન (લાતà«àªµàª¿àª¯àª¾)", + "mg": "મલાગસી", + "mg_MG": "મલાગસી (મેડાગાસà«àª•ર)", + "mk": "મેસેડોનિયન", + "mk_MK": "મેસેડોનિયન (મેસેડોનિયા)", + "ml": "મલયાલમ", + "ml_IN": "મલયાલમ (ભારત)", + "mn": "મોંગોલિયન", + "mn_MN": "મોંગોલિયન (મંગોલિયા)", + "mr": "મરાઠી", + "mr_IN": "મરાઠી (ભારત)", + "ms": "મલય", + "ms_BN": "મલય (બà«àª°à«àª¨à«‡àª‡)", + "ms_MY": "મલય (મલેશિયા)", + "ms_SG": "મલય (સિંગાપà«àª°)", + "mt": "માલà«àªŸàª¿àª", + "mt_MT": "માલà«àªŸàª¿àª (માલà«àªŸàª¾)", + "my": "બરà«àª®à«€àª", + "my_MM": "બરà«àª®à«€àª (મà«àª¯àª¾àª‚માર (બરà«àª®àª¾))", + "nb": "નોરà«àªµà«‡àªœà«€àª¯àª¨ બોકમાલ", + "nb_NO": "નોરà«àªµà«‡àªœà«€àª¯àª¨ બોકમાલ (નૉરà«àªµà«‡)", + "nb_SJ": "નોરà«àªµà«‡àªœà«€àª¯àª¨ બોકમાલ (સà«àªµàª¾àª²àª¬àª°à«àª¡ અને જેન મેયન)", + "nd": "ઉતà«àª¤àª° દેબેલ", + "nd_ZW": "ઉતà«àª¤àª° દેબેલ (àªàª¿àª®à«àª¬àª¾àª¬à«àªµà«‡)", + "ne": "નેપાળી", + "ne_IN": "નેપાળી (ભારત)", + "ne_NP": "નેપાળી (નેપાળ)", + "nl": "ડચ", + "nl_AW": "ડચ (અરà«àª¬àª¾)", + "nl_BE": "ડચ (બેલà«àªœà«€àª¯àª®)", + "nl_BQ": "ડચ (કેરેબિયન નેધરલેનà«àª¡à«àª)", + "nl_CW": "ડચ (કà«àª¯à«àª°àª¾àª¸àª¾àª“)", + "nl_NL": "ડચ (નેધરલેનà«àª¡)", + "nl_SR": "ડચ (સà«àª°à«€àª¨àª¾àª®)", + "nl_SX": "ડચ (સિંટ મારà«àªŸà«‡àª¨)", + "nn": "નૉરà«àªµà«‡àªœà«€àª¯àª¨ નાયનૉરà«àª¸à«àª•", + "nn_NO": "નૉરà«àªµà«‡àªœà«€àª¯àª¨ નાયનૉરà«àª¸à«àª• (નૉરà«àªµà«‡)", + "no": "નૉરà«àªµà«‡àªœà«€àª¯àª¨", + "no_NO": "નૉરà«àªµà«‡àªœà«€àª¯àª¨ (નૉરà«àªµà«‡)", + "om": "ઓરોમો", + "om_ET": "ઓરોમો (ઇથિઓપિયા)", + "om_KE": "ઓરોમો (કેનà«àª¯àª¾)", + "or": "ઉડિયા", + "or_IN": "ઉડિયા (ભારત)", + "os": "ઓસà«àª¸à«‡àªŸàª¿àª•", + "os_GE": "ઓસà«àª¸à«‡àªŸàª¿àª• (જà«àª¯à«‹àª°à«àªœà«€àª¯àª¾)", + "os_RU": "ઓસà«àª¸à«‡àªŸàª¿àª• (રશિયા)", + "pa": "પંજાબી", + "pa_Arab": "પંજાબી (અરબી)", + "pa_Arab_PK": "પંજાબી (અરબી, પાકિસà«àª¤àª¾àª¨)", + "pa_Guru": "પંજાબી (ગà«àª°à«‚મà«àª–à«€)", + "pa_Guru_IN": "પંજાબી (ગà«àª°à«‚મà«àª–à«€, ભારત)", + "pa_IN": "પંજાબી (ભારત)", + "pa_PK": "પંજાબી (પાકિસà«àª¤àª¾àª¨)", + "pl": "પોલીશ", + "pl_PL": "પોલીશ (પોલેંડ)", + "ps": "પશà«àª¤à«‹", + "ps_AF": "પશà«àª¤à«‹ (અફઘાનિસà«àª¤àª¾àª¨)", + "pt": "પોરà«àªŸà«àª—à«€àª", + "pt_AO": "પોરà«àªŸà«àª—ીઠ(અંગોલા)", + "pt_BR": "પોરà«àªŸà«àª—ીઠ(બà«àª°àª¾àªàª¿àª²)", + "pt_CH": "પોરà«àªŸà«àª—ીઠ(સà«àªµàª¿àªŸà«àªàª°à«àª²à«…નà«àª¡)", + "pt_CV": "પોરà«àªŸà«àª—ીઠ(કૅપ વરà«àª¡à«‡)", + "pt_GQ": "પોરà«àªŸà«àª—ીઠ(ઇકà«àªµà«‡àªŸà«‹àª°àª¿àª¯àª² ગિની)", + "pt_GW": "પોરà«àªŸà«àª—ીઠ(ગિની-બિસાઉ)", + "pt_LU": "પોરà«àªŸà«àª—ીઠ(લકà«àªàª®àª¬àª°à«àª—)", + "pt_MO": "પોરà«àªŸà«àª—ીઠ(મકાઉ SAR ચીન)", + "pt_MZ": "પોરà«àªŸà«àª—ીઠ(મોàªàª¾àª®à«àª¬àª¿àª•)", + "pt_PT": "પોરà«àªŸà«àª—ીઠ(પોરà«àªŸà«àª—લ)", + "pt_ST": "પોરà«àªŸà«àª—ીઠ(સાઓ ટૉમ અને પà«àª°àª¿àª‚સિપે)", + "pt_TL": "પોરà«àªŸà«àª—ીઠ(તિમોર-લેસà«àª¤à«‡)", + "qu": "કà«àªµà«‡àªšà«àª†", + "qu_BO": "કà«àªµà«‡àªšà«àª† (બોલિવિયા)", + "qu_EC": "કà«àªµà«‡àªšà«àª† (àªàª•à«àªµàª¾àª¡à«‹àª°)", + "qu_PE": "કà«àªµà«‡àªšà«àª† (પેરà«)", + "rm": "રોમાનà«àª¶", + "rm_CH": "રોમાનà«àª¶ (સà«àªµàª¿àªŸà«àªàª°à«àª²à«…નà«àª¡)", + "rn": "રૂનà«àª¦à«€", + "rn_BI": "રૂનà«àª¦à«€ (બà«àª°à«àª‚ડી)", + "ro": "રોમાનિયન", + "ro_MD": "રોમાનિયન (મોલડોવા)", + "ro_RO": "રોમાનિયન (રોમાનિયા)", + "ru": "રશિયન", + "ru_BY": "રશિયન (બેલારà«àª¸)", + "ru_KG": "રશિયન (કિરà«àª—િàªà«àª¸à«àª¤àª¾àª¨)", + "ru_KZ": "રશિયન (કàªàª¾àª•િસà«àª¤àª¾àª¨)", + "ru_MD": "રશિયન (મોલડોવા)", + "ru_RU": "રશિયન (રશિયા)", + "ru_UA": "રશિયન (યà«àª•à«àª°à«‡àª¨)", + "rw": "કિનà«àª¯àª¾àª°àªµàª¾àª¨à«àª¡àª¾", + "rw_RW": "કિનà«àª¯àª¾àª°àªµàª¾àª¨à«àª¡àª¾ (રવાંડા)", + "se": "ઉતà«àª¤àª°à«€àª¯ સામી", + "se_FI": "ઉતà«àª¤àª°à«€àª¯ સામી (ફિનલેનà«àª¡)", + "se_NO": "ઉતà«àª¤àª°à«€àª¯ સામી (નૉરà«àªµà«‡)", + "se_SE": "ઉતà«àª¤àª°à«€àª¯ સામી (સà«àªµà«€àª¡àª¨)", + "sg": "સાંગો", + "sg_CF": "સાંગો (સેનà«àªŸà«àª°àª² આફà«àª°àª¿àª•ન રીપબà«àª²àª¿àª•)", + "sh": "સરà«àª¬à«‹-કà«àª°à«‹àªàª¶àª¿àª¯àª¨", + "sh_BA": "સરà«àª¬à«‹-કà«àª°à«‹àªàª¶àª¿àª¯àª¨ (બોસà«àª¨àª¿àª¯àª¾ અને હરà«àªà«‡àª—ોવિના)", + "si": "સિંહાલી", + "si_LK": "સિંહાલી (શà«àª°à«€àª²àª‚કા)", + "sk": "સà«àª²à«‹àªµà«…ક", + "sk_SK": "સà«àª²à«‹àªµà«…ક (સà«àª²à«‹àªµà«‡àª•િયા)", + "sl": "સà«àª²à«‹àªµà«‡àª¨àª¿àª¯àª¨", + "sl_SI": "સà«àª²à«‹àªµà«‡àª¨àª¿àª¯àª¨ (સà«àª²à«‹àªµà«‡àª¨àª¿àª¯àª¾)", + "sn": "શોના", + "sn_ZW": "શોના (àªàª¿àª®à«àª¬àª¾àª¬à«àªµà«‡)", + "so": "સોમાલી", + "so_DJ": "સોમાલી (જીબૌટી)", + "so_ET": "સોમાલી (ઇથિઓપિયા)", + "so_KE": "સોમાલી (કેનà«àª¯àª¾)", + "so_SO": "સોમાલી (સોમાલિયા)", + "sq": "અલà«àª¬à«‡àª¨àª¿àª¯àª¨", + "sq_AL": "અલà«àª¬à«‡àª¨àª¿àª¯àª¨ (અલà«àª¬à«‡àª¨àª¿àª¯àª¾)", + "sq_MK": "અલà«àª¬à«‡àª¨àª¿àª¯àª¨ (મેસેડોનિયા)", + "sq_XK": "અલà«àª¬à«‡àª¨àª¿àª¯àª¨ (કોસોવો)", + "sr": "સરà«àª¬àª¿àª¯àª¨", + "sr_BA": "સરà«àª¬àª¿àª¯àª¨ (બોસà«àª¨àª¿àª¯àª¾ અને હરà«àªà«‡àª—ોવિના)", + "sr_Cyrl": "સરà«àª¬àª¿àª¯àª¨ (સિરિલિક)", + "sr_Cyrl_BA": "સરà«àª¬àª¿àª¯àª¨ (સિરિલિક, બોસà«àª¨àª¿àª¯àª¾ અને હરà«àªà«‡àª—ોવિના)", + "sr_Cyrl_ME": "સરà«àª¬àª¿àª¯àª¨ (સિરિલિક, મૉનà«àªŸà«‡àª‚નેગà«àª°à«‹)", + "sr_Cyrl_RS": "સરà«àª¬àª¿àª¯àª¨ (સિરિલિક, સરà«àª¬àª¿àª¯àª¾)", + "sr_Cyrl_XK": "સરà«àª¬àª¿àª¯àª¨ (સિરિલિક, કોસોવો)", + "sr_Latn": "સરà«àª¬àª¿àª¯àª¨ (લેટિન)", + "sr_Latn_BA": "સરà«àª¬àª¿àª¯àª¨ (લેટિન, બોસà«àª¨àª¿àª¯àª¾ અને હરà«àªà«‡àª—ોવિના)", + "sr_Latn_ME": "સરà«àª¬àª¿àª¯àª¨ (લેટિન, મૉનà«àªŸà«‡àª‚નેગà«àª°à«‹)", + "sr_Latn_RS": "સરà«àª¬àª¿àª¯àª¨ (લેટિન, સરà«àª¬àª¿àª¯àª¾)", + "sr_Latn_XK": "સરà«àª¬àª¿àª¯àª¨ (લેટિન, કોસોવો)", + "sr_ME": "સરà«àª¬àª¿àª¯àª¨ (મૉનà«àªŸà«‡àª‚નેગà«àª°à«‹)", + "sr_RS": "સરà«àª¬àª¿àª¯àª¨ (સરà«àª¬àª¿àª¯àª¾)", + "sr_XK": "સરà«àª¬àª¿àª¯àª¨ (કોસોવો)", + "sv": "સà«àªµà«€àª¡àª¿àª¶", + "sv_AX": "સà«àªµà«€àª¡àª¿àª¶ (àªàª²à«‡àª‚ડ ટાપà«àª“)", + "sv_FI": "સà«àªµà«€àª¡àª¿àª¶ (ફિનલેનà«àª¡)", + "sv_SE": "સà«àªµà«€àª¡àª¿àª¶ (સà«àªµà«€àª¡àª¨)", + "sw": "સà«àªµàª¾àª¹àª¿àª²à«€", + "sw_CD": "સà«àªµàª¾àª¹àª¿àª²à«€ (કોંગો - કિંશાસા)", + "sw_KE": "સà«àªµàª¾àª¹àª¿àª²à«€ (કેનà«àª¯àª¾)", + "sw_TZ": "સà«àªµàª¾àª¹àª¿àª²à«€ (તાંàªàª¾àª¨àª¿àª¯àª¾)", + "sw_UG": "સà«àªµàª¾àª¹àª¿àª²à«€ (યà«àª—ાંડા)", + "ta": "તમિલ", + "ta_IN": "તમિલ (ભારત)", + "ta_LK": "તમિલ (શà«àª°à«€àª²àª‚કા)", + "ta_MY": "તમિલ (મલેશિયા)", + "ta_SG": "તમિલ (સિંગાપà«àª°)", + "te": "તેલà«àª—à«", + "te_IN": "તેલà«àª—à« (ભારત)", + "th": "થાઈ", + "th_TH": "થાઈ (થાઇલેંડ)", + "ti": "ટાઇગà«àª°àª¿àª¨àª¿àª¯àª¾", + "ti_ER": "ટાઇગà«àª°àª¿àª¨àª¿àª¯àª¾ (àªàª°àª¿àªŸà«àª°àª¿àª¯àª¾)", + "ti_ET": "ટાઇગà«àª°àª¿àª¨àª¿àª¯àª¾ (ઇથિઓપિયા)", + "tl": "ટાગાલોગ", + "tl_PH": "ટાગાલોગ (ફિલીપાઇનà«àª¸)", + "to": "ટોંગાન", + "to_TO": "ટોંગાન (ટોંગા)", + "tr": "ટરà«àª•ીશ", + "tr_CY": "ટરà«àª•ીશ (સાયપà«àª°àª¸)", + "tr_TR": "ટરà«àª•ીશ (તà«àª°à«àª•à«€)", + "ug": "ઉઇગà«àª°", + "ug_CN": "ઉઇગà«àª° (ચીન)", + "uk": "યà«àª•à«àª°à«‡àª¨àª¿àª¯àª¨", + "uk_UA": "યà«àª•à«àª°à«‡àª¨àª¿àª¯àª¨ (યà«àª•à«àª°à«‡àª¨)", + "ur": "ઉરà«àª¦à«‚", + "ur_IN": "ઉરà«àª¦à«‚ (ભારત)", + "ur_PK": "ઉરà«àª¦à«‚ (પાકિસà«àª¤àª¾àª¨)", + "uz": "ઉàªà«àª¬à«‡àª•", + "uz_AF": "ઉàªà«àª¬à«‡àª• (અફઘાનિસà«àª¤àª¾àª¨)", + "uz_Arab": "ઉàªà«àª¬à«‡àª• (અરબી)", + "uz_Arab_AF": "ઉàªà«àª¬à«‡àª• (અરબી, અફઘાનિસà«àª¤àª¾àª¨)", + "uz_Cyrl": "ઉàªà«àª¬à«‡àª• (સિરિલિક)", + "uz_Cyrl_UZ": "ઉàªà«àª¬à«‡àª• (સિરિલિક, ઉàªà«àª¬à«‡àª•િસà«àª¤àª¾àª¨)", + "uz_Latn": "ઉàªà«àª¬à«‡àª• (લેટિન)", + "uz_Latn_UZ": "ઉàªà«àª¬à«‡àª• (લેટિન, ઉàªà«àª¬à«‡àª•િસà«àª¤àª¾àª¨)", + "uz_UZ": "ઉàªà«àª¬à«‡àª• (ઉàªà«àª¬à«‡àª•િસà«àª¤àª¾àª¨)", + "vi": "વિયેતનામીસ", + "vi_VN": "વિયેતનામીસ (વિયેતનામ)", + "yi": "યિદà«àª¦àª¿àª¶", + "yo": "યોરૂબા", + "yo_BJ": "યોરૂબા (બેનિન)", + "yo_NG": "યોરૂબા (નાઇજીરીયા)", + "zh": "ચાઇનીàª", + "zh_CN": "ચાઇનીઠ(ચીન)", + "zh_HK": "ચાઇનીઠ(હોંગકોંગ SAR ચીન)", + "zh_Hans": "ચાઇનીઠ(સરળીકૃત)", + "zh_Hans_CN": "ચાઇનીઠ(સરળીકૃત, ચીન)", + "zh_Hans_HK": "ચાઇનીઠ(સરળીકૃત, હોંગકોંગ SAR ચીન)", + "zh_Hans_MO": "ચાઇનીઠ(સરળીકૃત, મકાઉ SAR ચીન)", + "zh_Hans_SG": "ચાઇનીઠ(સરળીકૃત, સિંગાપà«àª°)", + "zh_Hant": "ચાઇનીઠ(પરંપરાગત)", + "zh_Hant_HK": "ચાઇનીઠ(પરંપરાગત, હોંગકોંગ SAR ચીન)", + "zh_Hant_MO": "ચાઇનીઠ(પરંપરાગત, મકાઉ SAR ચીન)", + "zh_Hant_TW": "ચાઇનીઠ(પરંપરાગત, તાઇવાન)", + "zh_MO": "ચાઇનીઠ(મકાઉ SAR ચીન)", + "zh_SG": "ચાઇનીઠ(સિંગાપà«àª°)", + "zh_TW": "ચાઇનીઠ(તાઇવાન)", + "zu": "àªà«àª²à«", + "zu_ZA": "àªà«àª²à« (દકà«àª·àª¿àª£ આફà«àª°àª¿àª•ા)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/gv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/gv.json new file mode 100644 index 0000000000000000000000000000000000000000..97facaeff7912296579600099db65cd4494b9c50 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/gv.json @@ -0,0 +1,6 @@ +{ + "Names": { + "gv": "Gaelg", + "gv_IM": "Gaelg (Ellan Vannin)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ha.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ha.json new file mode 100644 index 0000000000000000000000000000000000000000..4b3378057e7413dce7d05c16c77bcf6c44302477 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ha.json @@ -0,0 +1,319 @@ +{ + "Names": { + "ak": "Akan", + "ak_GH": "Akan (Gana)", + "am": "Amharik", + "am_ET": "Amharik (Habasha)", + "ar": "Larabci", + "ar_AE": "Larabci (HaÉ—aÉ—É—iyar Daular Larabawa)", + "ar_BH": "Larabci (Baharan)", + "ar_DJ": "Larabci (Jibuti)", + "ar_DZ": "Larabci (Aljeriya)", + "ar_EG": "Larabci (Masar, Misira)", + "ar_ER": "Larabci (Eritireya)", + "ar_IL": "Larabci (Iziraʼila)", + "ar_IQ": "Larabci (IraÆ™i)", + "ar_JO": "Larabci (Jordan)", + "ar_KM": "Larabci (Kwamoras)", + "ar_KW": "Larabci (Kwiyat)", + "ar_LB": "Larabci (Labanan)", + "ar_LY": "Larabci (Libiya)", + "ar_MA": "Larabci (Maroko)", + "ar_MR": "Larabci (Moritaniya)", + "ar_OM": "Larabci (Oman)", + "ar_PS": "Larabci (PalasÉ—inu)", + "ar_QA": "Larabci (Kwatar)", + "ar_SA": "Larabci (Ƙasar Makka)", + "ar_SD": "Larabci (Sudan)", + "ar_SO": "Larabci (Somaliya)", + "ar_SY": "Larabci (Sham, Siriya)", + "ar_TD": "Larabci (Cadi)", + "ar_TN": "Larabci (Tunisiya)", + "ar_YE": "Larabci (Yamal)", + "be": "Belarusanci", + "be_BY": "Belarusanci (Belarus)", + "bg": "Bulgaranci", + "bg_BG": "Bulgaranci (Bulgariya)", + "bn": "Bengali", + "bn_BD": "Bengali (Bangiladas)", + "bn_IN": "Bengali (Indiya)", + "cs": "Harshen Cak", + "cs_CZ": "Harshen Cak (Jamhuriyar Cak)", + "de": "Jamusanci", + "de_AT": "Jamusanci (Ostiriya)", + "de_BE": "Jamusanci (Belgiyom)", + "de_CH": "Jamusanci (Suwizalan)", + "de_DE": "Jamusanci (Jamus)", + "de_IT": "Jamusanci (Italiya)", + "de_LI": "Jamusanci (Licansitan)", + "de_LU": "Jamusanci (Lukusambur)", + "el": "Girkanci", + "el_CY": "Girkanci (Sifurus)", + "el_GR": "Girkanci (Girka)", + "en": "Turanci", + "en_AG": "Turanci (Antigwa da Barbuba)", + "en_AI": "Turanci (Angila)", + "en_AS": "Turanci (Samowa Ta Amurka)", + "en_AT": "Turanci (Ostiriya)", + "en_AU": "Turanci (Ostareliya)", + "en_BB": "Turanci (Barbadas)", + "en_BE": "Turanci (Belgiyom)", + "en_BI": "Turanci (Burundi)", + "en_BM": "Turanci (Barmuda)", + "en_BS": "Turanci (Bahamas)", + "en_BW": "Turanci (Baswana)", + "en_BZ": "Turanci (Beliz)", + "en_CA": "Turanci (Kanada)", + "en_CH": "Turanci (Suwizalan)", + "en_CK": "Turanci (Tsibiran Kuku)", + "en_CM": "Turanci (Kamaru)", + "en_CY": "Turanci (Sifurus)", + "en_DE": "Turanci (Jamus)", + "en_DK": "Turanci (Danmark)", + "en_DM": "Turanci (Dominika)", + "en_ER": "Turanci (Eritireya)", + "en_FI": "Turanci (Finlan)", + "en_FJ": "Turanci (Fiji)", + "en_FK": "Turanci (Tsibiran Falkilan)", + "en_FM": "Turanci (Mikuronesiya)", + "en_GB": "Turanci (Birtaniya)", + "en_GD": "Turanci (Girnada)", + "en_GH": "Turanci (Gana)", + "en_GI": "Turanci (Jibaraltar)", + "en_GM": "Turanci (Gambiya)", + "en_GU": "Turanci (Gwam)", + "en_GY": "Turanci (Guyana)", + "en_IE": "Turanci (Ayalan)", + "en_IL": "Turanci (Iziraʼila)", + "en_IN": "Turanci (Indiya)", + "en_IO": "Turanci (Yankin Birtaniya Na Tekun Indiya)", + "en_JM": "Turanci (Jamaika)", + "en_KE": "Turanci (Kenya)", + "en_KI": "Turanci (Kiribati)", + "en_KN": "Turanci (San Kiti Da Nebis)", + "en_KY": "Turanci (Tsibiran Kaiman)", + "en_LC": "Turanci (San Lusiya)", + "en_LR": "Turanci (Laberiya)", + "en_LS": "Turanci (Lesoto)", + "en_MG": "Turanci (Madagaskar)", + "en_MH": "Turanci (Tsibiran Marshal)", + "en_MP": "Turanci (Tsibiran Mariyana Na Arewa)", + "en_MS": "Turanci (Manserati)", + "en_MT": "Turanci (Malta)", + "en_MU": "Turanci (Moritus)", + "en_MW": "Turanci (Malawi)", + "en_MY": "Turanci (Malaisiya)", + "en_NA": "Turanci (Namibiya)", + "en_NF": "Turanci (Tsibirin Narfalk)", + "en_NG": "Turanci (Najeriya)", + "en_NL": "Turanci (Holan)", + "en_NR": "Turanci (Nauru)", + "en_NU": "Turanci (Niyu)", + "en_NZ": "Turanci (Nuzilan)", + "en_PG": "Turanci (Papuwa Nugini)", + "en_PH": "Turanci (Filipin)", + "en_PK": "Turanci (Pakistan)", + "en_PN": "Turanci (Pitakarin)", + "en_PR": "Turanci (Porto Riko)", + "en_PW": "Turanci (Palau)", + "en_RW": "Turanci (Ruwanda)", + "en_SB": "Turanci (Tsibiran Salaman)", + "en_SC": "Turanci (Saishal)", + "en_SD": "Turanci (Sudan)", + "en_SE": "Turanci (Suwedan)", + "en_SG": "Turanci (Singapur)", + "en_SH": "Turanci (San Helena)", + "en_SI": "Turanci (Sulobeniya)", + "en_SL": "Turanci (Salewo)", + "en_SZ": "Turanci (Suwazilan)", + "en_TC": "Turanci (Turkis Da Tsibiran Kaikwas)", + "en_TK": "Turanci (Takelau)", + "en_TO": "Turanci (Tanga)", + "en_TT": "Turanci (Tirinidad Da Tobago)", + "en_TV": "Turanci (Tubalu)", + "en_TZ": "Turanci (Tanzaniya)", + "en_UG": "Turanci (Yuganda)", + "en_US": "Turanci (Amurka)", + "en_VC": "Turanci (San Binsan Da Girnadin)", + "en_VG": "Turanci (Tsibirin Birjin Na Birtaniya)", + "en_VI": "Turanci (Tsibiran Birjin Ta Amurka)", + "en_VU": "Turanci (Banuwatu)", + "en_WS": "Turanci (Samowa)", + "en_ZA": "Turanci (Afirka Ta Kudu)", + "en_ZM": "Turanci (Zambiya)", + "en_ZW": "Turanci (Zimbabuwe)", + "es": "Ispaniyanci", + "es_AR": "Ispaniyanci (Arjantiniya)", + "es_BO": "Ispaniyanci (Bolibiya)", + "es_BR": "Ispaniyanci (Birazil)", + "es_CL": "Ispaniyanci (Cayile)", + "es_CO": "Ispaniyanci (Kolambiya)", + "es_CR": "Ispaniyanci (Kwasta Rika)", + "es_CU": "Ispaniyanci (Kyuba)", + "es_DO": "Ispaniyanci (Jamhuriyar Dominika)", + "es_EC": "Ispaniyanci (Ekwador)", + "es_ES": "Ispaniyanci (Sipen)", + "es_GQ": "Ispaniyanci (Gini Ta Ikwaita)", + "es_GT": "Ispaniyanci (Gwatamala)", + "es_HN": "Ispaniyanci (Honduras)", + "es_MX": "Ispaniyanci (Makasiko)", + "es_NI": "Ispaniyanci (Nikaraguwa)", + "es_PA": "Ispaniyanci (Panama)", + "es_PE": "Ispaniyanci (Peru)", + "es_PH": "Ispaniyanci (Filipin)", + "es_PR": "Ispaniyanci (Porto Riko)", + "es_PY": "Ispaniyanci (Paragai)", + "es_SV": "Ispaniyanci (El Salbador)", + "es_US": "Ispaniyanci (Amurka)", + "es_UY": "Ispaniyanci (Yurugai)", + "es_VE": "Ispaniyanci (Benezuwela)", + "fa": "Parisanci", + "fa_AF": "Parisanci (Afaganistan)", + "fa_IR": "Parisanci (Iran)", + "fr": "Faransanci", + "fr_BE": "Faransanci (Belgiyom)", + "fr_BF": "Faransanci (Burkina Faso)", + "fr_BI": "Faransanci (Burundi)", + "fr_BJ": "Faransanci (Binin)", + "fr_CA": "Faransanci (Kanada)", + "fr_CD": "Faransanci (Jamhuriyar DimokuraÉ—iyyar Kongo)", + "fr_CF": "Faransanci (Jamhuriyar Afirka Ta Tsakiya)", + "fr_CG": "Faransanci (Kongo)", + "fr_CH": "Faransanci (Suwizalan)", + "fr_CI": "Faransanci (Aibari Kwas)", + "fr_CM": "Faransanci (Kamaru)", + "fr_DJ": "Faransanci (Jibuti)", + "fr_DZ": "Faransanci (Aljeriya)", + "fr_FR": "Faransanci (Faransa)", + "fr_GA": "Faransanci (Gabon)", + "fr_GF": "Faransanci (Gini Ta Faransa)", + "fr_GN": "Faransanci (Gini)", + "fr_GP": "Faransanci (Gwadaluf)", + "fr_GQ": "Faransanci (Gini Ta Ikwaita)", + "fr_HT": "Faransanci (Haiti)", + "fr_KM": "Faransanci (Kwamoras)", + "fr_LU": "Faransanci (Lukusambur)", + "fr_MA": "Faransanci (Maroko)", + "fr_MC": "Faransanci (Monako)", + "fr_MG": "Faransanci (Madagaskar)", + "fr_ML": "Faransanci (Mali)", + "fr_MQ": "Faransanci (Martinik)", + "fr_MR": "Faransanci (Moritaniya)", + "fr_MU": "Faransanci (Moritus)", + "fr_NC": "Faransanci (Kaledoniya Sabuwa)", + "fr_NE": "Faransanci (Nijar)", + "fr_PF": "Faransanci (Folinesiya Ta Faransa)", + "fr_PM": "Faransanci (San Piyar Da Mikelan)", + "fr_RE": "Faransanci (Rawuniyan)", + "fr_RW": "Faransanci (Ruwanda)", + "fr_SC": "Faransanci (Saishal)", + "fr_SN": "Faransanci (Sinigal)", + "fr_SY": "Faransanci (Sham, Siriya)", + "fr_TD": "Faransanci (Cadi)", + "fr_TG": "Faransanci (Togo)", + "fr_TN": "Faransanci (Tunisiya)", + "fr_VU": "Faransanci (Banuwatu)", + "fr_WF": "Faransanci (Walis Da Futuna)", + "fr_YT": "Faransanci (Mayoti)", + "ha": "Hausa", + "ha_GH": "Hausa (Gana)", + "ha_NE": "Hausa (Nijar)", + "ha_NG": "Hausa (Najeriya)", + "hi": "Harshen Hindi", + "hi_IN": "Harshen Hindi (Indiya)", + "hu": "Harshen Hungari", + "hu_HU": "Harshen Hungari (Hungari)", + "id": "Harshen Indunusiya", + "id_ID": "Harshen Indunusiya (Indunusiya)", + "ig": "Inyamuranci", + "ig_NG": "Inyamuranci (Najeriya)", + "it": "Italiyanci", + "it_CH": "Italiyanci (Suwizalan)", + "it_IT": "Italiyanci (Italiya)", + "it_SM": "Italiyanci (San Marino)", + "ja": "Japananci", + "ja_JP": "Japananci (Japan)", + "km": "Harshen Kimar", + "km_KH": "Harshen Kimar (Kambodiya)", + "ko": "Harshen Koreya", + "ko_KP": "Harshen Koreya (Koreya Ta Arewa)", + "ko_KR": "Harshen Koreya (Koreya Ta Kudu)", + "ms": "Harshen Malai", + "ms_BN": "Harshen Malai (Burune)", + "ms_MY": "Harshen Malai (Malaisiya)", + "ms_SG": "Harshen Malai (Singapur)", + "my": "Burmanci", + "my_MM": "Burmanci (Burma, Miyamar)", + "ne": "Nepali", + "ne_IN": "Nepali (Indiya)", + "ne_NP": "Nepali (Nefal)", + "nl": "Holanci", + "nl_AW": "Holanci (Aruba)", + "nl_BE": "Holanci (Belgiyom)", + "nl_NL": "Holanci (Holan)", + "nl_SR": "Holanci (Suriname)", + "pa": "Punjabi", + "pa_IN": "Punjabi (Indiya)", + "pa_PK": "Punjabi (Pakistan)", + "pl": "Harshen Polan", + "pl_PL": "Harshen Polan (Polan)", + "pt": "Harshen Portugal", + "pt_AO": "Harshen Portugal (Angola)", + "pt_BR": "Harshen Portugal (Birazil)", + "pt_CH": "Harshen Portugal (Suwizalan)", + "pt_CV": "Harshen Portugal (Tsibiran Kap Barde)", + "pt_GQ": "Harshen Portugal (Gini Ta Ikwaita)", + "pt_GW": "Harshen Portugal (Gini Bisau)", + "pt_LU": "Harshen Portugal (Lukusambur)", + "pt_MZ": "Harshen Portugal (Mozambik)", + "pt_PT": "Harshen Portugal (Portugal)", + "pt_ST": "Harshen Portugal (Sawo Tome Da Paransip)", + "pt_TL": "Harshen Portugal (Timor Ta Gabas)", + "ro": "Romaniyanci", + "ro_MD": "Romaniyanci (Maldoba)", + "ro_RO": "Romaniyanci (Romaniya)", + "ru": "Rashanci", + "ru_BY": "Rashanci (Belarus)", + "ru_KG": "Rashanci (Kirgizistan)", + "ru_KZ": "Rashanci (Kazakistan)", + "ru_MD": "Rashanci (Maldoba)", + "ru_RU": "Rashanci (Rasha)", + "ru_UA": "Rashanci (Yukaran)", + "rw": "Kiniyaruwanda", + "rw_RW": "Kiniyaruwanda (Ruwanda)", + "so": "Somali", + "so_DJ": "Somali (Jibuti)", + "so_ET": "Somali (Habasha)", + "so_KE": "Somali (Kenya)", + "so_SO": "Somali (Somaliya)", + "sv": "Harshen Suwedan", + "sv_FI": "Harshen Suwedan (Finlan)", + "sv_SE": "Harshen Suwedan (Suwedan)", + "ta": "Tamil", + "ta_IN": "Tamil (Indiya)", + "ta_LK": "Tamil (Siri Lanka)", + "ta_MY": "Tamil (Malaisiya)", + "ta_SG": "Tamil (Singapur)", + "th": "Thai", + "th_TH": "Thai (Tailan)", + "tr": "Harshen Turkiyya", + "tr_CY": "Harshen Turkiyya (Sifurus)", + "tr_TR": "Harshen Turkiyya (Turkiyya)", + "uk": "Harshen Yukuren", + "uk_UA": "Harshen Yukuren (Yukaran)", + "ur": "Harshen Urdu", + "ur_IN": "Harshen Urdu (Indiya)", + "ur_PK": "Harshen Urdu (Pakistan)", + "vi": "Harshen Biyetinam", + "vi_VN": "Harshen Biyetinam (Biyetinam)", + "yo": "Yarbanci", + "yo_BJ": "Yarbanci (Binin)", + "yo_NG": "Yarbanci (Najeriya)", + "zh": "Harshen Sin", + "zh_CN": "Harshen Sin (Caina, Sin)", + "zh_SG": "Harshen Sin (Singapur)", + "zh_TW": "Harshen Sin (Taiwan)", + "zu": "Harshen Zulu", + "zu_ZA": "Harshen Zulu (Afirka Ta Kudu)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/he.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/he.json new file mode 100644 index 0000000000000000000000000000000000000000..e867e3a4a727f59d44f240bc46641469e71b5809 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/he.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "×פריק×נס", + "af_NA": "×פריק×נס (נמיביה)", + "af_ZA": "×פריק×נס (×“×¨×•× ×פריקה)", + "ak": "××§×ן", + "ak_GH": "××§×ן (×’×× ×”)", + "am": "×מהרית", + "am_ET": "×מהרית (×תיופיה)", + "ar": "ערבית", + "ar_AE": "ערבית (×יחוד ×”×מירויות הערביות)", + "ar_BH": "ערבית (בחריין)", + "ar_DJ": "ערבית (ג׳יבוטי)", + "ar_DZ": "ערבית (×לג׳יריה)", + "ar_EG": "ערבית (מצרי×)", + "ar_EH": "ערבית (סהרה המערבית)", + "ar_ER": "ערבית (×ריתרי××”)", + "ar_IL": "ערבית (ישר×ל)", + "ar_IQ": "ערבית (עיר××§)", + "ar_JO": "ערבית (ירדן)", + "ar_KM": "ערבית (קומורו)", + "ar_KW": "ערבית (כווית)", + "ar_LB": "ערבית (לבנון)", + "ar_LY": "ערבית (לוב)", + "ar_MA": "ערבית (מרוקו)", + "ar_MR": "ערבית (מ×וריטניה)", + "ar_OM": "ערבית (עומ×ן)", + "ar_PS": "ערבית (×”×©×˜×—×™× ×”×¤×œ×¡×˜×™× ×™×™×)", + "ar_QA": "ערבית (קט×ר)", + "ar_SA": "ערבית (ערב הסעודית)", + "ar_SD": "ערבית (סודן)", + "ar_SO": "ערבית (סומליה)", + "ar_SS": "ערבית (×“×¨×•× ×¡×•×“×Ÿ)", + "ar_SY": "ערבית (סוריה)", + "ar_TD": "ערבית (צ׳×ד)", + "ar_TN": "ערבית (טוניסיה)", + "ar_YE": "ערבית (תימן)", + "as": "×ס×מית", + "as_IN": "×ס×מית (הודו)", + "az": "×זרית", + "az_AZ": "×זרית (×זרבייג׳ן)", + "az_Cyrl": "×זרית (קירילי)", + "az_Cyrl_AZ": "×זרית (קירילי, ×זרבייג׳ן)", + "az_Latn": "×זרית (לטיני)", + "az_Latn_AZ": "×זרית (לטיני, ×זרבייג׳ן)", + "be": "בל×רוסית", + "be_BY": "בל×רוסית (בל×רוס)", + "bg": "בולגרית", + "bg_BG": "בולגרית (בולגריה)", + "bm": "במב×רה", + "bm_ML": "במב×רה (מ×לי)", + "bn": "בנגלית", + "bn_BD": "בנגלית (בנגלדש)", + "bn_IN": "בנגלית (הודו)", + "bo": "טיבטית", + "bo_CN": "טיבטית (סין)", + "bo_IN": "טיבטית (הודו)", + "br": "ברטונית", + "br_FR": "ברטונית (צרפת)", + "bs": "בוסנית", + "bs_BA": "בוסנית (בוסניה והרצגובינה)", + "bs_Cyrl": "בוסנית (קירילי)", + "bs_Cyrl_BA": "בוסנית (קירילי, בוסניה והרצגובינה)", + "bs_Latn": "בוסנית (לטיני)", + "bs_Latn_BA": "בוסנית (לטיני, בוסניה והרצגובינה)", + "ca": "קטל×נית", + "ca_AD": "קטל×נית (×נדורה)", + "ca_ES": "קטל×נית (ספרד)", + "ca_FR": "קטל×נית (צרפת)", + "ca_IT": "קטל×נית (×יטליה)", + "ce": "צ׳צ׳נית", + "ce_RU": "צ׳צ׳נית (רוסיה)", + "cs": "צ׳כית", + "cs_CZ": "צ׳כית (הרפובליקה הצ׳כית)", + "cy": "וולשית", + "cy_GB": "וולשית (הממלכה המ×וחדת)", + "da": "דנית", + "da_DK": "דנית (דנמרק)", + "da_GL": "דנית (גרינלנד)", + "de": "גרמנית", + "de_AT": "גרמנית (×וסטריה)", + "de_BE": "גרמנית (בלגיה)", + "de_CH": "גרמנית (שווייץ)", + "de_DE": "גרמנית (גרמניה)", + "de_IT": "גרמנית (×יטליה)", + "de_LI": "גרמנית (ליכטנשטיין)", + "de_LU": "גרמנית (לוקסמבורג)", + "dz": "דזונקה", + "dz_BT": "דזונקה (בהוטן)", + "ee": "×ווה", + "ee_GH": "×ווה (×’×× ×”)", + "ee_TG": "×ווה (טוגו)", + "el": "יוונית", + "el_CY": "יוונית (קפריסין)", + "el_GR": "יוונית (יוון)", + "en": "×נגלית", + "en_AG": "×נגלית (×נטיגו××” וברבודה)", + "en_AI": "×נגלית (×נגילה)", + "en_AS": "×נגלית (סמו××” ×”×מריקנית)", + "en_AT": "×נגלית (×וסטריה)", + "en_AU": "×נגלית (×וסטרליה)", + "en_BB": "×נגלית (ברבדוס)", + "en_BE": "×נגלית (בלגיה)", + "en_BI": "×נגלית (בורונדי)", + "en_BM": "×נגלית (ברמודה)", + "en_BS": "×נגלית (××™×™ בה×מה)", + "en_BW": "×נגלית (בוצוו×× ×”)", + "en_BZ": "×נגלית (בליז)", + "en_CA": "×נגלית (קנדה)", + "en_CC": "×נגלית (××™×™ קוקוס (קילינג))", + "en_CH": "×נגלית (שווייץ)", + "en_CK": "×נגלית (××™×™ קוק)", + "en_CM": "×נגלית (קמרון)", + "en_CX": "×נגלית (×”××™ כריסטמס)", + "en_CY": "×נגלית (קפריסין)", + "en_DE": "×נגלית (גרמניה)", + "en_DG": "×נגלית (דייגו גרסיה)", + "en_DK": "×נגלית (דנמרק)", + "en_DM": "×נגלית (דומיניקה)", + "en_ER": "×נגלית (×ריתרי××”)", + "en_FI": "×נגלית (פינלנד)", + "en_FJ": "×נגלית (פיג׳י)", + "en_FK": "×נגלית (××™×™ פוקלנד)", + "en_FM": "×נגלית (מיקרונזיה)", + "en_GB": "×נגלית (הממלכה המ×וחדת)", + "en_GD": "×נגלית (גרנדה)", + "en_GG": "×נגלית (גרנסי)", + "en_GH": "×נגלית (×’×× ×”)", + "en_GI": "×נגלית (גיברלטר)", + "en_GM": "×נגלית (גמביה)", + "en_GU": "×נגלית (גו××)", + "en_GY": "×נגלית (×’×™×× ×”)", + "en_HK": "×נגלית (הונג קונג (מחוז מנהלי מיוחד של סין))", + "en_IE": "×נגלית (×ירלנד)", + "en_IL": "×נגלית (ישר×ל)", + "en_IM": "×נגלית (×”××™ מ×ן)", + "en_IN": "×נגלית (הודו)", + "en_IO": "×נגלית (הטריטוריה הבריטית ב×וקיינוס ההודי)", + "en_JE": "×נגלית (ג׳רסי)", + "en_JM": "×נגלית (ג׳מייקה)", + "en_KE": "×נגלית (×§× ×™×”)", + "en_KI": "×נגלית (קיריב×טי)", + "en_KN": "×נגלית (סנט קיטס ונוויס)", + "en_KY": "×נגלית (××™×™ קיימן)", + "en_LC": "×נגלית (סנט לוסיה)", + "en_LR": "×נגלית (ליבריה)", + "en_LS": "×נגלית (לסוטו)", + "en_MG": "×נגלית (מדגסקר)", + "en_MH": "×נגלית (××™×™ מרשל)", + "en_MO": "×נגלית (מק×ו (מחוז מנהלי מיוחד של סין))", + "en_MP": "×נגלית (××™×™ מרי×× ×” הצפוניי×)", + "en_MS": "×נגלית (מונסר×ט)", + "en_MT": "×נגלית (מלטה)", + "en_MU": "×נגלית (מ×וריציוס)", + "en_MW": "×נגלית (מל×ווי)", + "en_MY": "×נגלית (מלזיה)", + "en_NA": "×נגלית (נמיביה)", + "en_NF": "×נגלית (××™×™ נורפוק)", + "en_NG": "×נגלית (ניגריה)", + "en_NL": "×נגלית (הולנד)", + "en_NR": "×נגלית (× ×ורו)", + "en_NU": "×נגלית (ניווה)", + "en_NZ": "×נגלית (ניו זילנד)", + "en_PG": "×נגלית (פפו××” ×’×™× ××” החדשה)", + "en_PH": "×נגלית (הפיליפיני×)", + "en_PK": "×נגלית (פקיסטן)", + "en_PN": "×נגלית (××™×™ פיטקרן)", + "en_PR": "×נגלית (פו×רטו ריקו)", + "en_PW": "×נגלית (פל×ו)", + "en_RW": "×נגלית (רו×נדה)", + "en_SB": "×נגלית (××™×™ שלמה)", + "en_SC": "×נגלית (××™×™ סיישל)", + "en_SD": "×נגלית (סודן)", + "en_SE": "×נגלית (שוודיה)", + "en_SG": "×נגלית (סינגפור)", + "en_SH": "×נגלית (סנט הלנה)", + "en_SI": "×נגלית (סלובניה)", + "en_SL": "×נגלית (סיירה ל×ונה)", + "en_SS": "×נגלית (×“×¨×•× ×¡×•×“×Ÿ)", + "en_SX": "×נגלית (סנט מ×רטן)", + "en_SZ": "×נגלית (סווזילנד)", + "en_TC": "×נגלית (××™×™ טורקס וק×יקוס)", + "en_TK": "×נגלית (טוקל×ו)", + "en_TO": "×נגלית (טונגה)", + "en_TT": "×נגלית (טרינידד וטובגו)", + "en_TV": "×נגלית (טוב×לו)", + "en_TZ": "×נגלית (טנזניה)", + "en_UG": "×נגלית (×וגנדה)", + "en_UM": "×נגלית (×”××™×™× ×”×ž×¨×•×—×§×™× ×”×§×˜× ×™× ×©×œ ×רה״ב)", + "en_US": "×נגלית (×רצות הברית)", + "en_VC": "×נגלית (סנט וינסנט והגרנדיני×)", + "en_VG": "×נגלית (××™×™ הבתולה הבריטיי×)", + "en_VI": "×נגלית (××™×™ הבתולה של ×רצות הברית)", + "en_VU": "×נגלית (ונו×טו)", + "en_WS": "×נגלית (סמו××”)", + "en_ZA": "×נגלית (×“×¨×•× ×פריקה)", + "en_ZM": "×נגלית (זמביה)", + "en_ZW": "×נגלית (זימבבו××”)", + "eo": "×ספרנטו", + "es": "ספרדית", + "es_AR": "ספרדית (×רגנטינה)", + "es_BO": "ספרדית (בוליביה)", + "es_BR": "ספרדית (ברזיל)", + "es_CL": "ספרדית (צ׳ילה)", + "es_CO": "ספרדית (קולומביה)", + "es_CR": "ספרדית (קוסטה ריקה)", + "es_CU": "ספרדית (קובה)", + "es_DO": "ספרדית (הרפובליקה הדומיניקנית)", + "es_EA": "ספרדית (ס×וטה ומלייה)", + "es_EC": "ספרדית (×קוודור)", + "es_ES": "ספרדית (ספרד)", + "es_GQ": "ספרדית (×’×™× ××” המשוונית)", + "es_GT": "ספרדית (גו×טמלה)", + "es_HN": "ספרדית (הונדורס)", + "es_IC": "ספרדית (×”××™×™× ×”×§× ×¨×™×™×)", + "es_MX": "ספרדית (מקסיקו)", + "es_NI": "ספרדית (ניקרגו××”)", + "es_PA": "ספרדית (פנמה)", + "es_PE": "ספרדית (פרו)", + "es_PH": "ספרדית (הפיליפיני×)", + "es_PR": "ספרדית (פו×רטו ריקו)", + "es_PY": "ספרדית (פרגוו××™)", + "es_SV": "ספרדית (×ל סלבדור)", + "es_US": "ספרדית (×רצות הברית)", + "es_UY": "ספרדית (×ורוגוו××™)", + "es_VE": "ספרדית (ונצו×לה)", + "et": "×סטונית", + "et_EE": "×סטונית (×סטוניה)", + "eu": "בסקית", + "eu_ES": "בסקית (ספרד)", + "fa": "פרסית", + "fa_AF": "פרסית (×פגניסטן)", + "fa_IR": "פרסית (×יר×ן)", + "ff": "פולה", + "ff_CM": "פולה (קמרון)", + "ff_GN": "פולה (×’×™× ××”)", + "ff_MR": "פולה (מ×וריטניה)", + "ff_SN": "פולה (סנגל)", + "fi": "פינית", + "fi_FI": "פינית (פינלנד)", + "fo": "פ×רו×זית", + "fo_DK": "פ×רו×זית (דנמרק)", + "fo_FO": "פ×רו×זית (××™×™ פ×רו)", + "fr": "צרפתית", + "fr_BE": "צרפתית (בלגיה)", + "fr_BF": "צרפתית (בורקינה פ×סו)", + "fr_BI": "צרפתית (בורונדי)", + "fr_BJ": "צרפתית (בנין)", + "fr_BL": "צרפתית (סנט ברתולומי×ו)", + "fr_CA": "צרפתית (קנדה)", + "fr_CD": "צרפתית (קונגו - קינש×סה)", + "fr_CF": "צרפתית (הרפובליקה של מרכז ×פריקה)", + "fr_CG": "צרפתית (קונגו - ברז×ויל)", + "fr_CH": "צרפתית (שווייץ)", + "fr_CI": "צרפתית (חוף השנהב)", + "fr_CM": "צרפתית (קמרון)", + "fr_DJ": "צרפתית (ג׳יבוטי)", + "fr_DZ": "צרפתית (×לג׳יריה)", + "fr_FR": "צרפתית (צרפת)", + "fr_GA": "צרפתית (גבון)", + "fr_GF": "צרפתית (×’×™×× ×” הצרפתית)", + "fr_GN": "צרפתית (×’×™× ××”)", + "fr_GP": "צרפתית (גוו×דלופ)", + "fr_GQ": "צרפתית (×’×™× ××” המשוונית)", + "fr_HT": "צרפתית (×”×יטי)", + "fr_KM": "צרפתית (קומורו)", + "fr_LU": "צרפתית (לוקסמבורג)", + "fr_MA": "צרפתית (מרוקו)", + "fr_MC": "צרפתית (מונקו)", + "fr_MF": "צרפתית (סן מרטן)", + "fr_MG": "צרפתית (מדגסקר)", + "fr_ML": "צרפתית (מ×לי)", + "fr_MQ": "צרפתית (מרטיניק)", + "fr_MR": "צרפתית (מ×וריטניה)", + "fr_MU": "צרפתית (מ×וריציוס)", + "fr_NC": "צרפתית (קלדוניה החדשה)", + "fr_NE": "צרפתית (ניז׳ר)", + "fr_PF": "צרפתית (פולינזיה הצרפתית)", + "fr_PM": "צרפתית (סנט פייר ומיקלון)", + "fr_RE": "צרפתית (ר×וניון)", + "fr_RW": "צרפתית (רו×נדה)", + "fr_SC": "צרפתית (××™×™ סיישל)", + "fr_SN": "צרפתית (סנגל)", + "fr_SY": "צרפתית (סוריה)", + "fr_TD": "צרפתית (צ׳×ד)", + "fr_TG": "צרפתית (טוגו)", + "fr_TN": "צרפתית (טוניסיה)", + "fr_VU": "צרפתית (ונו×טו)", + "fr_WF": "צרפתית (××™×™ ווליס ופוטונה)", + "fr_YT": "צרפתית (מ×יוט)", + "fy": "פריזית מערבית", + "fy_NL": "פריזית מערבית (הולנד)", + "ga": "×ירית", + "ga_IE": "×ירית (×ירלנד)", + "gd": "×’×לית סקוטית", + "gd_GB": "×’×לית סקוטית (הממלכה המ×וחדת)", + "gl": "גליצי×נית", + "gl_ES": "גליצי×נית (ספרד)", + "gu": "גוג׳×רטי", + "gu_IN": "גוג׳×רטי (הודו)", + "gv": "מ×נית", + "gv_IM": "מ×נית (×”××™ מ×ן)", + "ha": "×”×וסה", + "ha_GH": "×”×וסה (×’×× ×”)", + "ha_NE": "×”×וסה (ניז׳ר)", + "ha_NG": "×”×וסה (ניגריה)", + "he": "עברית", + "he_IL": "עברית (ישר×ל)", + "hi": "הינדי", + "hi_IN": "הינדי (הודו)", + "hr": "קרו×טית", + "hr_BA": "קרו×טית (בוסניה והרצגובינה)", + "hr_HR": "קרו×טית (קרו×טיה)", + "hu": "הונגרית", + "hu_HU": "הונגרית (הונגריה)", + "hy": "×רמנית", + "hy_AM": "×רמנית (×רמניה)", + "id": "×ינדונזית", + "id_ID": "×ינדונזית (×ינדונזיה)", + "ig": "×יגבו", + "ig_NG": "×יגבו (ניגריה)", + "ii": "סצ׳ו×ן ×™×™", + "ii_CN": "סצ׳ו×ן ×™×™ (סין)", + "is": "×יסלנדית", + "is_IS": "×יסלנדית (×יסלנד)", + "it": "×יטלקית", + "it_CH": "×יטלקית (שווייץ)", + "it_IT": "×יטלקית (×יטליה)", + "it_SM": "×יטלקית (סן מרינו)", + "ja": "יפנית", + "ja_JP": "יפנית (יפן)", + "ka": "×’×ורגית", + "ka_GE": "×’×ורגית (×’×ורגיה)", + "ki": "קיקויו", + "ki_KE": "קיקויו (×§× ×™×”)", + "kk": "קזחית", + "kk_KZ": "קזחית (קזחסטן)", + "kl": "גרינלנדית", + "kl_GL": "גרינלנדית (גרינלנד)", + "km": "חמרית", + "km_KH": "חמרית (קמבודיה)", + "kn": "×§× ×דה", + "kn_IN": "×§× ×דה (הודו)", + "ko": "קורי×נית", + "ko_KP": "קורי×נית (קורי××” הצפונית)", + "ko_KR": "קורי×נית (קורי××” הדרומית)", + "ks": "קשמירית", + "ks_IN": "קשמירית (הודו)", + "kw": "קורנית", + "kw_GB": "קורנית (הממלכה המ×וחדת)", + "ky": "קירגיזית", + "ky_KG": "קירגיזית (קירגיזסטן)", + "lb": "לוקסמבורגית", + "lb_LU": "לוקסמבורגית (לוקסמבורג)", + "lg": "×’×נדה", + "lg_UG": "×’×נדה (×וגנדה)", + "ln": "לינגלה", + "ln_AO": "לינגלה (×נגולה)", + "ln_CD": "לינגלה (קונגו - קינש×סה)", + "ln_CF": "לינגלה (הרפובליקה של מרכז ×פריקה)", + "ln_CG": "לינגלה (קונגו - ברז×ויל)", + "lo": "ל×ו", + "lo_LA": "ל×ו (ל×וס)", + "lt": "ליט×ית", + "lt_LT": "ליט×ית (ליט×)", + "lu": "לובה-קטנגה", + "lu_CD": "לובה-קטנגה (קונגו - קינש×סה)", + "lv": "לטבית", + "lv_LV": "לטבית (לטביה)", + "mg": "מלגשית", + "mg_MG": "מלגשית (מדגסקר)", + "mk": "מקדונית", + "mk_MK": "מקדונית (מקדוניה)", + "ml": "מלי×ל××", + "ml_IN": "מלי×ל×× (הודו)", + "mn": "מונגולית", + "mn_MN": "מונגולית (מונגוליה)", + "mr": "מר×טהי", + "mr_IN": "מר×טהי (הודו)", + "ms": "מל×ית", + "ms_BN": "מל×ית (ברוניי)", + "ms_MY": "מל×ית (מלזיה)", + "ms_SG": "מל×ית (סינגפור)", + "mt": "מלטית", + "mt_MT": "מלטית (מלטה)", + "my": "בורמזית", + "my_MM": "בורמזית (מי×נמר (בורמה))", + "nb": "נורווגית ספרותית", + "nb_NO": "נורווגית ספרותית (נורווגיה)", + "nb_SJ": "נורווגית ספרותית (סוולב×רד וי×ן מ×יין)", + "nd": "נדבלה צפונית", + "nd_ZW": "נדבלה צפונית (זימבבו××”)", + "ne": "נפ×לית", + "ne_IN": "נפ×לית (הודו)", + "ne_NP": "נפ×לית (נפ×ל)", + "nl": "הולנדית", + "nl_AW": "הולנדית (×רובה)", + "nl_BE": "הולנדית (בלגיה)", + "nl_BQ": "הולנדית (×”××™×™× ×”×§×¨×™×‘×™×™× ×”×”×•×œ× ×“×™×™×)", + "nl_CW": "הולנדית (קור×ס×ו)", + "nl_NL": "הולנדית (הולנד)", + "nl_SR": "הולנדית (סורינ×)", + "nl_SX": "הולנדית (סנט מ×רטן)", + "nn": "נורווגית חדשה", + "nn_NO": "נורווגית חדשה (נורווגיה)", + "no": "נורווגית", + "no_NO": "נורווגית (נורווגיה)", + "om": "×ורומו", + "om_ET": "×ורומו (×תיופיה)", + "om_KE": "×ורומו (×§× ×™×”)", + "or": "×וריה", + "or_IN": "×וריה (הודו)", + "os": "×וסטית", + "os_GE": "×וסטית (×’×ורגיה)", + "os_RU": "×וסטית (רוסיה)", + "pa": "פנג׳×בי", + "pa_Arab": "פנג׳×בי (ערבי)", + "pa_Arab_PK": "פנג׳×בי (ערבי, פקיסטן)", + "pa_Guru": "פנג׳×בי (גורמוקי)", + "pa_Guru_IN": "פנג׳×בי (גורמוקי, הודו)", + "pa_IN": "פנג׳×בי (הודו)", + "pa_PK": "פנג׳×בי (פקיסטן)", + "pl": "פולנית", + "pl_PL": "פולנית (פולין)", + "ps": "פ×שטו", + "ps_AF": "פ×שטו (×פגניסטן)", + "pt": "פורטוגזית", + "pt_AO": "פורטוגזית (×נגולה)", + "pt_BR": "פורטוגזית (ברזיל)", + "pt_CH": "פורטוגזית (שווייץ)", + "pt_CV": "פורטוגזית (×›×£ ורדה)", + "pt_GQ": "פורטוגזית (×’×™× ××” המשוונית)", + "pt_GW": "פורטוגזית (×’×™× ××” ביס×ו)", + "pt_LU": "פורטוגזית (לוקסמבורג)", + "pt_MO": "פורטוגזית (מק×ו (מחוז מנהלי מיוחד של סין))", + "pt_MZ": "פורטוגזית (מוזמביק)", + "pt_PT": "פורטוגזית (פורטוגל)", + "pt_ST": "פורטוגזית (ס×ו טומה ופרינסיפה)", + "pt_TL": "פורטוגזית (טימור לסטה)", + "qu": "קצ׳ו××”", + "qu_BO": "קצ׳ו××” (בוליביה)", + "qu_EC": "קצ׳ו××” (×קוודור)", + "qu_PE": "קצ׳ו××” (פרו)", + "rm": "רומ×נש", + "rm_CH": "רומ×נש (שווייץ)", + "rn": "קירונדי", + "rn_BI": "קירונדי (בורונדי)", + "ro": "רומנית", + "ro_MD": "רומנית (מולדובה)", + "ro_RO": "רומנית (רומניה)", + "ru": "רוסית", + "ru_BY": "רוסית (בל×רוס)", + "ru_KG": "רוסית (קירגיזסטן)", + "ru_KZ": "רוסית (קזחסטן)", + "ru_MD": "רוסית (מולדובה)", + "ru_RU": "רוסית (רוסיה)", + "ru_UA": "רוסית (×וקר××™× ×”)", + "rw": "קנירו×נדית", + "rw_RW": "קנירו×נדית (רו×נדה)", + "se": "סמי צפונית", + "se_FI": "סמי צפונית (פינלנד)", + "se_NO": "סמי צפונית (נורווגיה)", + "se_SE": "סמי צפונית (שוודיה)", + "sg": "סנגו", + "sg_CF": "סנגו (הרפובליקה של מרכז ×פריקה)", + "sh": "סרבו-קרו×טית", + "sh_BA": "סרבו-קרו×טית (בוסניה והרצגובינה)", + "si": "סינהלה", + "si_LK": "סינהלה (סרי לנקה)", + "sk": "סלובקית", + "sk_SK": "סלובקית (סלובקיה)", + "sl": "סלובנית", + "sl_SI": "סלובנית (סלובניה)", + "sn": "שונה", + "sn_ZW": "שונה (זימבבו××”)", + "so": "סומלית", + "so_DJ": "סומלית (ג׳יבוטי)", + "so_ET": "סומלית (×תיופיה)", + "so_KE": "סומלית (×§× ×™×”)", + "so_SO": "סומלית (סומליה)", + "sq": "×לבנית", + "sq_AL": "×לבנית (×לבניה)", + "sq_MK": "×לבנית (מקדוניה)", + "sq_XK": "×לבנית (קוסובו)", + "sr": "סרבית", + "sr_BA": "סרבית (בוסניה והרצגובינה)", + "sr_Cyrl": "סרבית (קירילי)", + "sr_Cyrl_BA": "סרבית (קירילי, בוסניה והרצגובינה)", + "sr_Cyrl_ME": "סרבית (קירילי, מונטנגרו)", + "sr_Cyrl_RS": "סרבית (קירילי, סרביה)", + "sr_Cyrl_XK": "סרבית (קירילי, קוסובו)", + "sr_Latn": "סרבית (לטיני)", + "sr_Latn_BA": "סרבית (לטיני, בוסניה והרצגובינה)", + "sr_Latn_ME": "סרבית (לטיני, מונטנגרו)", + "sr_Latn_RS": "סרבית (לטיני, סרביה)", + "sr_Latn_XK": "סרבית (לטיני, קוסובו)", + "sr_ME": "סרבית (מונטנגרו)", + "sr_RS": "סרבית (סרביה)", + "sr_XK": "סרבית (קוסובו)", + "sv": "שוודית", + "sv_AX": "שוודית (××™×™ ×ולנד)", + "sv_FI": "שוודית (פינלנד)", + "sv_SE": "שוודית (שוודיה)", + "sw": "סווהילי", + "sw_CD": "סווהילי (קונגו - קינש×סה)", + "sw_KE": "סווהילי (×§× ×™×”)", + "sw_TZ": "סווהילי (טנזניה)", + "sw_UG": "סווהילי (×וגנדה)", + "ta": "טמילית", + "ta_IN": "טמילית (הודו)", + "ta_LK": "טמילית (סרי לנקה)", + "ta_MY": "טמילית (מלזיה)", + "ta_SG": "טמילית (סינגפור)", + "te": "טלוגו", + "te_IN": "טלוגו (הודו)", + "th": "ת×ית", + "th_TH": "ת×ית (ת×ילנד)", + "ti": "תיגרינית", + "ti_ER": "תיגרינית (×ריתרי××”)", + "ti_ET": "תיגרינית (×תיופיה)", + "tl": "ט××’×לוג", + "tl_PH": "ט××’×לוג (הפיליפיני×)", + "to": "טונג×ית", + "to_TO": "טונג×ית (טונגה)", + "tr": "טורקית", + "tr_CY": "טורקית (קפריסין)", + "tr_TR": "טורקית (טורקיה)", + "ug": "×ויגור", + "ug_CN": "×ויגור (סין)", + "uk": "×וקר×ינית", + "uk_UA": "×וקר×ינית (×וקר××™× ×”)", + "ur": "×ורדו", + "ur_IN": "×ורדו (הודו)", + "ur_PK": "×ורדו (פקיסטן)", + "uz": "×וזבקית", + "uz_AF": "×וזבקית (×פגניסטן)", + "uz_Arab": "×וזבקית (ערבי)", + "uz_Arab_AF": "×וזבקית (ערבי, ×פגניסטן)", + "uz_Cyrl": "×וזבקית (קירילי)", + "uz_Cyrl_UZ": "×וזבקית (קירילי, ×וזבקיסטן)", + "uz_Latn": "×וזבקית (לטיני)", + "uz_Latn_UZ": "×וזבקית (לטיני, ×וזבקיסטן)", + "uz_UZ": "×וזבקית (×וזבקיסטן)", + "vi": "וי×טנמית", + "vi_VN": "וי×טנמית (וייטנ××)", + "yi": "יידיש", + "yo": "יורובה", + "yo_BJ": "יורובה (בנין)", + "yo_NG": "יורובה (ניגריה)", + "zh": "סינית", + "zh_CN": "סינית (סין)", + "zh_HK": "סינית (הונג קונג (מחוז מנהלי מיוחד של סין))", + "zh_Hans": "סינית (פשוט)", + "zh_Hans_CN": "סינית (פשוט, סין)", + "zh_Hans_HK": "סינית (פשוט, הונג קונג (מחוז מנהלי מיוחד של סין))", + "zh_Hans_MO": "סינית (פשוט, מק×ו (מחוז מנהלי מיוחד של סין))", + "zh_Hans_SG": "סינית (פשוט, סינגפור)", + "zh_Hant": "סינית (מסורתי)", + "zh_Hant_HK": "סינית (מסורתי, הונג קונג (מחוז מנהלי מיוחד של סין))", + "zh_Hant_MO": "סינית (מסורתי, מק×ו (מחוז מנהלי מיוחד של סין))", + "zh_Hant_TW": "סינית (מסורתי, טייוו×ן)", + "zh_MO": "סינית (מק×ו (מחוז מנהלי מיוחד של סין))", + "zh_SG": "סינית (סינגפור)", + "zh_TW": "סינית (טייוו×ן)", + "zu": "זולו", + "zu_ZA": "זולו (×“×¨×•× ×פריקה)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/hi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/hi.json new file mode 100644 index 0000000000000000000000000000000000000000..c6bd20be0925f42bae8a9ce87cbfc66e83581dec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/hi.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "अफ़à¥à¤°à¥€à¤•ी", + "af_NA": "अफ़à¥à¤°à¥€à¤•ी (नामीबिया)", + "af_ZA": "अफ़à¥à¤°à¥€à¤•ी (दकà¥à¤·à¤¿à¤£ अफ़à¥à¤°à¥€à¤•ा)", + "ak": "अकन", + "ak_GH": "अकन (घाना)", + "am": "अमà¥à¤¹à¥‡à¤°à¥€", + "am_ET": "अमà¥à¤¹à¥‡à¤°à¥€ (इथियोपिया)", + "ar": "अरबी", + "ar_AE": "अरबी (संयà¥à¤•à¥à¤¤ अरब अमीरात)", + "ar_BH": "अरबी (बहरीन)", + "ar_DJ": "अरबी (जिबूती)", + "ar_DZ": "अरबी (अलà¥à¤œà¥€à¤°à¤¿à¤¯à¤¾)", + "ar_EG": "अरबी (मिसà¥à¤°)", + "ar_EH": "अरबी (पशà¥à¤šà¤¿à¤®à¥€ सहारा)", + "ar_ER": "अरबी (इरिटà¥à¤°à¤¿à¤¯à¤¾)", + "ar_IL": "अरबी (इज़राइल)", + "ar_IQ": "अरबी (इराक)", + "ar_JO": "अरबी (जॉरà¥à¤¡à¤¨)", + "ar_KM": "अरबी (कोमोरोस)", + "ar_KW": "अरबी (कà¥à¤µà¥ˆà¤¤)", + "ar_LB": "अरबी (लेबनान)", + "ar_LY": "अरबी (लीबिया)", + "ar_MA": "अरबी (मोरकà¥à¤•ो)", + "ar_MR": "अरबी (मॉरिटानिया)", + "ar_OM": "अरबी (ओमान)", + "ar_PS": "अरबी (फ़िलिसà¥à¤¤à¥€à¤¨à¥€ कà¥à¤·à¥‡à¤¤à¥à¤°)", + "ar_QA": "अरबी (क़तर)", + "ar_SA": "अरबी (सऊदी अरब)", + "ar_SD": "अरबी (सूडान)", + "ar_SO": "अरबी (सोमालिया)", + "ar_SS": "अरबी (दकà¥à¤·à¤¿à¤£ सूडान)", + "ar_SY": "अरबी (सीरिया)", + "ar_TD": "अरबी (चाड)", + "ar_TN": "अरबी (टà¥à¤¯à¥‚नीशिया)", + "ar_YE": "अरबी (यमन)", + "as": "असमिया", + "as_IN": "असमिया (भारत)", + "az": "अज़रबैजानी", + "az_AZ": "अज़रबैजानी (अज़रबैजान)", + "az_Cyrl": "अज़रबैजानी (सिरिलिक)", + "az_Cyrl_AZ": "अज़रबैजानी (सिरिलिक, अज़रबैजान)", + "az_Latn": "अज़रबैजानी (लैटिन)", + "az_Latn_AZ": "अज़रबैजानी (लैटिन, अज़रबैजान)", + "be": "बेलारूसी", + "be_BY": "बेलारूसी (बेलारूस)", + "bg": "बà¥à¤²à¥à¤—ारियाई", + "bg_BG": "बà¥à¤²à¥à¤—ारियाई (बà¥à¤²à¥à¤—ारिया)", + "bm": "बामà¥à¤¬à¤¾à¤°à¤¾", + "bm_ML": "बामà¥à¤¬à¤¾à¤°à¤¾ (माली)", + "bn": "बंगाली", + "bn_BD": "बंगाली (बांगà¥à¤²à¤¾à¤¦à¥‡à¤¶)", + "bn_IN": "बंगाली (भारत)", + "bo": "तिबà¥à¤¬à¤¤à¥€", + "bo_CN": "तिबà¥à¤¬à¤¤à¥€ (चीन)", + "bo_IN": "तिबà¥à¤¬à¤¤à¥€ (भारत)", + "br": "बà¥à¤°à¥‡à¤Ÿà¤¨", + "br_FR": "बà¥à¤°à¥‡à¤Ÿà¤¨ (फ़à¥à¤°à¤¾à¤‚स)", + "bs": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "bs_BA": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤ˆ (बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¤¼à¥‡à¤—ोविना)", + "bs_Cyrl": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤ˆ (सिरिलिक)", + "bs_Cyrl_BA": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤ˆ (सिरिलिक, बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¤¼à¥‡à¤—ोविना)", + "bs_Latn": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤ˆ (लैटिन)", + "bs_Latn_BA": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤ˆ (लैटिन, बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¤¼à¥‡à¤—ोविना)", + "ca": "कातालान", + "ca_AD": "कातालान (à¤à¤‚डोरा)", + "ca_ES": "कातालान (सà¥à¤ªà¥‡à¤¨)", + "ca_FR": "कातालान (फ़à¥à¤°à¤¾à¤‚स)", + "ca_IT": "कातालान (इटली)", + "ce": "चेचन", + "ce_RU": "चेचन (रूस)", + "cs": "चेक", + "cs_CZ": "चेक (चेक गणराजà¥à¤¯)", + "cy": "वेलà¥à¤¶", + "cy_GB": "वेलà¥à¤¶ (यूनाइटेड किंगडम)", + "da": "डेनिश", + "da_DK": "डेनिश (डेनमारà¥à¤•)", + "da_GL": "डेनिश (गà¥à¤°à¥€à¤¨à¤²à¥ˆà¤‚ड)", + "de": "जरà¥à¤®à¤¨", + "de_AT": "जरà¥à¤®à¤¨ (ऑसà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾)", + "de_BE": "जरà¥à¤®à¤¨ (बेलà¥à¤œà¤¿à¤¯à¤®)", + "de_CH": "जरà¥à¤®à¤¨ (सà¥à¤µà¤¿à¤Ÿà¥à¤œà¤¼à¤°à¤²à¥ˆà¤‚ड)", + "de_DE": "जरà¥à¤®à¤¨ (जरà¥à¤®à¤¨à¥€)", + "de_IT": "जरà¥à¤®à¤¨ (इटली)", + "de_LI": "जरà¥à¤®à¤¨ (लिचेंसà¥à¤Ÿà¥€à¤¨)", + "de_LU": "जरà¥à¤®à¤¨ (लगà¥à¤œà¤¼à¤®à¤¬à¤°à¥à¤—)", + "dz": "ज़ोनà¥à¤—खा", + "dz_BT": "ज़ोनà¥à¤—खा (भूटान)", + "ee": "ईवे", + "ee_GH": "ईवे (घाना)", + "ee_TG": "ईवे (टोगो)", + "el": "यूनानी", + "el_CY": "यूनानी (साइपà¥à¤°à¤¸)", + "el_GR": "यूनानी (यूनान)", + "en": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€", + "en_AG": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (à¤à¤‚टिगà¥à¤† और बरबà¥à¤¡à¤¾)", + "en_AI": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (à¤à¤‚गà¥à¤µà¤¿à¤²à¤¾)", + "en_AS": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (अमेरिकी समोआ)", + "en_AT": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (ऑसà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾)", + "en_AU": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (ऑसà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾)", + "en_BB": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (बारबाडोस)", + "en_BE": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (बेलà¥à¤œà¤¿à¤¯à¤®)", + "en_BI": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (बà¥à¤°à¥à¤‚डी)", + "en_BM": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (बरमूडा)", + "en_BS": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (बहामास)", + "en_BW": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (बोतà¥à¤¸à¥à¤µà¤¾à¤¨à¤¾)", + "en_BZ": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (बेलीज़)", + "en_CA": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (कनाडा)", + "en_CC": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (कोकोस (कीलिंग) दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "en_CH": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सà¥à¤µà¤¿à¤Ÿà¥à¤œà¤¼à¤°à¤²à¥ˆà¤‚ड)", + "en_CK": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (कà¥à¤• दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "en_CM": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (कैमरून)", + "en_CX": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (कà¥à¤°à¤¿à¤¸à¤®à¤¸ दà¥à¤µà¥€à¤ª)", + "en_CY": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (साइपà¥à¤°à¤¸)", + "en_DE": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (जरà¥à¤®à¤¨à¥€)", + "en_DG": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (डिà¤à¤—ो गारà¥à¤¸à¤¿à¤¯à¤¾)", + "en_DK": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (डेनमारà¥à¤•)", + "en_DM": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (डोमिनिका)", + "en_ER": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (इरिटà¥à¤°à¤¿à¤¯à¤¾)", + "en_FI": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (फ़िनलैंड)", + "en_FJ": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (फ़िजी)", + "en_FK": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (फ़ॉकलैंड दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "en_FM": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (माइकà¥à¤°à¥‹à¤¨à¥‡à¤¶à¤¿à¤¯à¤¾)", + "en_GB": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (यूनाइटेड किंगडम)", + "en_GD": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (गà¥à¤°à¥‡à¤¨à¤¾à¤¡à¤¾)", + "en_GG": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (गरà¥à¤¨à¤¸à¥€)", + "en_GH": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (घाना)", + "en_GI": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤°)", + "en_GM": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (गामà¥à¤¬à¤¿à¤¯à¤¾)", + "en_GU": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (गà¥à¤†à¤®)", + "en_GY": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (गयाना)", + "en_HK": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (हाà¤à¤— काà¤à¤— (चीन विशेष पà¥à¤°à¤¶à¤¾à¤¸à¤¨à¤¿à¤• कà¥à¤·à¥‡à¤¤à¥à¤°))", + "en_IE": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (आयरलैंड)", + "en_IL": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (इज़राइल)", + "en_IM": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (आइल ऑफ़ मैन)", + "en_IN": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (भारत)", + "en_IO": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ हिंद महासागरीय कà¥à¤·à¥‡à¤¤à¥à¤°)", + "en_JE": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (जरà¥à¤¸à¥€)", + "en_JM": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (जमैका)", + "en_KE": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (केनà¥à¤¯à¤¾)", + "en_KI": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (किरिबाती)", + "en_KN": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सेंट किटà¥à¤¸ और नेविस)", + "en_KY": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (केमैन दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "en_LC": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सेंट लूसिया)", + "en_LR": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (लाइबेरिया)", + "en_LS": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (लेसोथो)", + "en_MG": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (मेडागासà¥à¤•र)", + "en_MH": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (मारà¥à¤¶à¤² दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "en_MO": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (मकाऊ (विशेष पà¥à¤°à¤¶à¤¾à¤¸à¤¨à¤¿à¤• कà¥à¤·à¥‡à¤¤à¥à¤° चीन))", + "en_MP": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (उतà¥à¤¤à¤°à¥€ मारियाना दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "en_MS": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (मोंटसेरात)", + "en_MT": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (मालà¥à¤Ÿà¤¾)", + "en_MU": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (मॉरिशस)", + "en_MW": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (मलावी)", + "en_MY": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (मलेशिया)", + "en_NA": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (नामीबिया)", + "en_NF": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (नॉरफ़ॉक दà¥à¤µà¥€à¤ª)", + "en_NG": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (नाइजीरिया)", + "en_NL": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (नीदरलैंड)", + "en_NR": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (नाउरà¥)", + "en_NU": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (नीयू)", + "en_NZ": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (नà¥à¤¯à¥‚ज़ीलैंड)", + "en_PG": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (पापà¥à¤† नà¥à¤¯à¥‚ गिनी)", + "en_PH": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (फ़िलिपींस)", + "en_PK": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (पाकिसà¥à¤¤à¤¾à¤¨)", + "en_PN": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (पिटकैरà¥à¤¨ दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "en_PR": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (पोरà¥à¤Ÿà¥‹ रिको)", + "en_PW": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (पलाऊ)", + "en_RW": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (रवांडा)", + "en_SB": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सोलोमन दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "en_SC": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सेशेलà¥à¤¸)", + "en_SD": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सूडान)", + "en_SE": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सà¥à¤µà¥€à¤¡à¤¨)", + "en_SG": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सिंगापà¥à¤°)", + "en_SH": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सेंट हेलेना)", + "en_SI": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सà¥à¤²à¥‹à¤µà¥‡à¤¨à¤¿à¤¯à¤¾)", + "en_SL": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सिà¤à¤°à¤¾ लियोन)", + "en_SS": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (दकà¥à¤·à¤¿à¤£ सूडान)", + "en_SX": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सिंट मारà¥à¤Ÿà¤¿à¤¨)", + "en_SZ": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सà¥à¤µà¤¾à¤œà¤¼à¥€à¤²à¥ˆà¤‚ड)", + "en_TC": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (तà¥à¤°à¥à¤• और कैकोज़ दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "en_TK": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (तोकेलाउ)", + "en_TO": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (टोंगा)", + "en_TT": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (तà¥à¤°à¤¿à¤¨à¤¿à¤¦à¤¾à¤¦ और टोबैगो)", + "en_TV": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (तà¥à¤µà¤¾à¤²à¥‚)", + "en_TZ": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (तंज़ानिया)", + "en_UG": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (यà¥à¤—ांडा)", + "en_UM": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (यू.à¤à¤¸. आउटलाइंग दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "en_US": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (संयà¥à¤•à¥à¤¤ राजà¥à¤¯)", + "en_VC": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (सेंट विंसेंट और गà¥à¤°à¥‡à¤¨à¤¾à¤¡à¤¾à¤‡à¤‚स)", + "en_VG": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ वरà¥à¤œà¤¿à¤¨ दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "en_VI": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (यू.à¤à¤¸. वरà¥à¤œà¤¿à¤¨ दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "en_VU": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (वनà¥à¤†à¤¤à¥‚)", + "en_WS": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (समोआ)", + "en_ZA": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (दकà¥à¤·à¤¿à¤£ अफ़à¥à¤°à¥€à¤•ा)", + "en_ZM": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (ज़ामà¥à¤¬à¤¿à¤¯à¤¾)", + "en_ZW": "अंगà¥à¤°à¥‡à¤œà¤¼à¥€ (ज़िमà¥à¤¬à¤¾à¤¬à¥à¤µà¥‡)", + "eo": "à¤à¤¸à¥à¤ªà¥‡à¤°à¥‡à¤‚तो", + "es": "सà¥à¤ªà¥‡à¤¨à¥€", + "es_AR": "सà¥à¤ªà¥‡à¤¨à¥€ (अरà¥à¤œà¥‡à¤‚टीना)", + "es_BO": "सà¥à¤ªà¥‡à¤¨à¥€ (बोलीविया)", + "es_BR": "सà¥à¤ªà¥‡à¤¨à¥€ (बà¥à¤°à¤¾à¤œà¤¼à¥€à¤²)", + "es_CL": "सà¥à¤ªà¥‡à¤¨à¥€ (चिली)", + "es_CO": "सà¥à¤ªà¥‡à¤¨à¥€ (कोलंबिया)", + "es_CR": "सà¥à¤ªà¥‡à¤¨à¥€ (कोसà¥à¤Ÿà¤¾à¤°à¤¿à¤•ा)", + "es_CU": "सà¥à¤ªà¥‡à¤¨à¥€ (कà¥à¤¯à¥‚बा)", + "es_DO": "सà¥à¤ªà¥‡à¤¨à¥€ (डोमिनिकन गणराजà¥à¤¯)", + "es_EA": "सà¥à¤ªà¥‡à¤¨à¥€ (सेउटा और मेलिला)", + "es_EC": "सà¥à¤ªà¥‡à¤¨à¥€ (इकà¥à¤µà¤¾à¤¡à¥‹à¤°)", + "es_ES": "सà¥à¤ªà¥‡à¤¨à¥€ (सà¥à¤ªà¥‡à¤¨)", + "es_GQ": "सà¥à¤ªà¥‡à¤¨à¥€ (इकà¥à¤µà¥‡à¤Ÿà¥‹à¤°à¤¿à¤¯à¤² गिनी)", + "es_GT": "सà¥à¤ªà¥‡à¤¨à¥€ (गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾)", + "es_HN": "सà¥à¤ªà¥‡à¤¨à¥€ (होंडूरास)", + "es_IC": "सà¥à¤ªà¥‡à¤¨à¥€ (कैनेरी दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "es_MX": "सà¥à¤ªà¥‡à¤¨à¥€ (मैकà¥à¤¸à¤¿à¤•ो)", + "es_NI": "सà¥à¤ªà¥‡à¤¨à¥€ (निकारागà¥à¤†)", + "es_PA": "सà¥à¤ªà¥‡à¤¨à¥€ (पनामा)", + "es_PE": "सà¥à¤ªà¥‡à¤¨à¥€ (पेरू)", + "es_PH": "सà¥à¤ªà¥‡à¤¨à¥€ (फ़िलिपींस)", + "es_PR": "सà¥à¤ªà¥‡à¤¨à¥€ (पोरà¥à¤Ÿà¥‹ रिको)", + "es_PY": "सà¥à¤ªà¥‡à¤¨à¥€ (पेरागà¥à¤µà¥‡)", + "es_SV": "सà¥à¤ªà¥‡à¤¨à¥€ (अल सलà¥à¤µà¤¾à¤¡à¥‹à¤°)", + "es_US": "सà¥à¤ªà¥‡à¤¨à¥€ (संयà¥à¤•à¥à¤¤ राजà¥à¤¯)", + "es_UY": "सà¥à¤ªà¥‡à¤¨à¥€ (उरूगà¥à¤µà¥‡)", + "es_VE": "सà¥à¤ªà¥‡à¤¨à¥€ (वेनेज़à¥à¤à¤²à¤¾)", + "et": "à¤à¤¸à¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "et_EE": "à¤à¤¸à¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾à¤ˆ (à¤à¤¸à¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾)", + "eu": "बासà¥à¤•", + "eu_ES": "बासà¥à¤• (सà¥à¤ªà¥‡à¤¨)", + "fa": "फ़ारसी", + "fa_AF": "फ़ारसी (अफ़गानिसà¥à¤¤à¤¾à¤¨)", + "fa_IR": "फ़ारसी (ईरान)", + "ff": "फà¥à¤²à¤¾à¤¹", + "ff_CM": "फà¥à¤²à¤¾à¤¹ (कैमरून)", + "ff_GN": "फà¥à¤²à¤¾à¤¹ (गिनी)", + "ff_MR": "फà¥à¤²à¤¾à¤¹ (मॉरिटानिया)", + "ff_SN": "फà¥à¤²à¤¾à¤¹ (सेनेगल)", + "fi": "फ़िनिश", + "fi_FI": "फ़िनिश (फ़िनलैंड)", + "fo": "फ़ैरोइज़", + "fo_DK": "फ़ैरोइज़ (डेनमारà¥à¤•)", + "fo_FO": "फ़ैरोइज़ (फ़ेरो दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "fr": "फ़à¥à¤°à¥‡à¤‚च", + "fr_BE": "फ़à¥à¤°à¥‡à¤‚च (बेलà¥à¤œà¤¿à¤¯à¤®)", + "fr_BF": "फ़à¥à¤°à¥‡à¤‚च (बà¥à¤°à¥à¤•िना फ़ासो)", + "fr_BI": "फ़à¥à¤°à¥‡à¤‚च (बà¥à¤°à¥à¤‚डी)", + "fr_BJ": "फ़à¥à¤°à¥‡à¤‚च (बेनिन)", + "fr_BL": "फ़à¥à¤°à¥‡à¤‚च (सेंट बारà¥à¤¥à¥‡à¤²à¥‡à¤®à¥€)", + "fr_CA": "फ़à¥à¤°à¥‡à¤‚च (कनाडा)", + "fr_CD": "फ़à¥à¤°à¥‡à¤‚च (कांगो - किंशासा)", + "fr_CF": "फ़à¥à¤°à¥‡à¤‚च (मधà¥à¤¯ अफ़à¥à¤°à¥€à¤•ी गणराजà¥à¤¯)", + "fr_CG": "फ़à¥à¤°à¥‡à¤‚च (कांगो – बà¥à¤°à¤¾à¤œà¤¼à¤¾à¤µà¤¿à¤²)", + "fr_CH": "फ़à¥à¤°à¥‡à¤‚च (सà¥à¤µà¤¿à¤Ÿà¥à¤œà¤¼à¤°à¤²à¥ˆà¤‚ड)", + "fr_CI": "फ़à¥à¤°à¥‡à¤‚च (कोट डी आइवर)", + "fr_CM": "फ़à¥à¤°à¥‡à¤‚च (कैमरून)", + "fr_DJ": "फ़à¥à¤°à¥‡à¤‚च (जिबूती)", + "fr_DZ": "फ़à¥à¤°à¥‡à¤‚च (अलà¥à¤œà¥€à¤°à¤¿à¤¯à¤¾)", + "fr_FR": "फ़à¥à¤°à¥‡à¤‚च (फ़à¥à¤°à¤¾à¤‚स)", + "fr_GA": "फ़à¥à¤°à¥‡à¤‚च (गैबॉन)", + "fr_GF": "फ़à¥à¤°à¥‡à¤‚च (फ़à¥à¤°à¥‡à¤‚च गयाना)", + "fr_GN": "फ़à¥à¤°à¥‡à¤‚च (गिनी)", + "fr_GP": "फ़à¥à¤°à¥‡à¤‚च (गà¥à¤µà¤¾à¤¡à¥‡à¤²à¥‚प)", + "fr_GQ": "फ़à¥à¤°à¥‡à¤‚च (इकà¥à¤µà¥‡à¤Ÿà¥‹à¤°à¤¿à¤¯à¤² गिनी)", + "fr_HT": "फ़à¥à¤°à¥‡à¤‚च (हैती)", + "fr_KM": "फ़à¥à¤°à¥‡à¤‚च (कोमोरोस)", + "fr_LU": "फ़à¥à¤°à¥‡à¤‚च (लगà¥à¤œà¤¼à¤®à¤¬à¤°à¥à¤—)", + "fr_MA": "फ़à¥à¤°à¥‡à¤‚च (मोरकà¥à¤•ो)", + "fr_MC": "फ़à¥à¤°à¥‡à¤‚च (मोनाको)", + "fr_MF": "फ़à¥à¤°à¥‡à¤‚च (सेंट मारà¥à¤Ÿà¤¿à¤¨)", + "fr_MG": "फ़à¥à¤°à¥‡à¤‚च (मेडागासà¥à¤•र)", + "fr_ML": "फ़à¥à¤°à¥‡à¤‚च (माली)", + "fr_MQ": "फ़à¥à¤°à¥‡à¤‚च (मारà¥à¤Ÿà¥€à¤¨à¤¿à¤•)", + "fr_MR": "फ़à¥à¤°à¥‡à¤‚च (मॉरिटानिया)", + "fr_MU": "फ़à¥à¤°à¥‡à¤‚च (मॉरिशस)", + "fr_NC": "फ़à¥à¤°à¥‡à¤‚च (नà¥à¤¯à¥‚ कैलेडोनिया)", + "fr_NE": "फ़à¥à¤°à¥‡à¤‚च (नाइजर)", + "fr_PF": "फ़à¥à¤°à¥‡à¤‚च (फ़à¥à¤°à¥‡à¤‚च पोलिनेशिया)", + "fr_PM": "फ़à¥à¤°à¥‡à¤‚च (सेंट पिà¤à¤°à¥‡ और मिकà¥à¤µà¥‡à¤²à¤¾à¤¨)", + "fr_RE": "फ़à¥à¤°à¥‡à¤‚च (रियूनियन)", + "fr_RW": "फ़à¥à¤°à¥‡à¤‚च (रवांडा)", + "fr_SC": "फ़à¥à¤°à¥‡à¤‚च (सेशेलà¥à¤¸)", + "fr_SN": "फ़à¥à¤°à¥‡à¤‚च (सेनेगल)", + "fr_SY": "फ़à¥à¤°à¥‡à¤‚च (सीरिया)", + "fr_TD": "फ़à¥à¤°à¥‡à¤‚च (चाड)", + "fr_TG": "फ़à¥à¤°à¥‡à¤‚च (टोगो)", + "fr_TN": "फ़à¥à¤°à¥‡à¤‚च (टà¥à¤¯à¥‚नीशिया)", + "fr_VU": "फ़à¥à¤°à¥‡à¤‚च (वनà¥à¤†à¤¤à¥‚)", + "fr_WF": "फ़à¥à¤°à¥‡à¤‚च (वालिस और फ़à¥à¤¯à¥‚चूना)", + "fr_YT": "फ़à¥à¤°à¥‡à¤‚च (मायोते)", + "fy": "पशà¥à¤šà¤¿à¤®à¥€ फ़à¥à¤°à¤¿à¤¸à¤¿à¤¯à¤¾à¤ˆ", + "fy_NL": "पशà¥à¤šà¤¿à¤®à¥€ फ़à¥à¤°à¤¿à¤¸à¤¿à¤¯à¤¾à¤ˆ (नीदरलैंड)", + "ga": "आइरिश", + "ga_IE": "आइरिश (आयरलैंड)", + "gd": "सà¥à¤•ॉटिश गाà¤à¤²à¤¿à¤•", + "gd_GB": "सà¥à¤•ॉटिश गाà¤à¤²à¤¿à¤• (यूनाइटेड किंगडम)", + "gl": "गैलिशियन", + "gl_ES": "गैलिशियन (सà¥à¤ªà¥‡à¤¨)", + "gu": "गà¥à¤œà¤°à¤¾à¤¤à¥€", + "gu_IN": "गà¥à¤œà¤°à¤¾à¤¤à¥€ (भारत)", + "gv": "मैंकà¥à¤¸", + "gv_IM": "मैंकà¥à¤¸ (आइल ऑफ़ मैन)", + "ha": "हौसा", + "ha_GH": "हौसा (घाना)", + "ha_NE": "हौसा (नाइजर)", + "ha_NG": "हौसा (नाइजीरिया)", + "he": "हिबà¥à¤°à¥‚", + "he_IL": "हिबà¥à¤°à¥‚ (इज़राइल)", + "hi": "हिनà¥à¤¦à¥€", + "hi_IN": "हिनà¥à¤¦à¥€ (भारत)", + "hr": "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾à¤ˆ", + "hr_BA": "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾à¤ˆ (बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¤¼à¥‡à¤—ोविना)", + "hr_HR": "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾à¤ˆ (कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾)", + "hu": "हंगेरियाई", + "hu_HU": "हंगेरियाई (हंगरी)", + "hy": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "hy_AM": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾à¤ˆ (आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾)", + "id": "इंडोनेशियाई", + "id_ID": "इंडोनेशियाई (इंडोनेशिया)", + "ig": "ईगà¥à¤¬à¥‹", + "ig_NG": "ईगà¥à¤¬à¥‹ (नाइजीरिया)", + "ii": "सिचà¥à¤†à¤¨ यी", + "ii_CN": "सिचà¥à¤†à¤¨ यी (चीन)", + "is": "आइसलैंडिक", + "is_IS": "आइसलैंडिक (आइसलैंड)", + "it": "इतालवी", + "it_CH": "इतालवी (सà¥à¤µà¤¿à¤Ÿà¥à¤œà¤¼à¤°à¤²à¥ˆà¤‚ड)", + "it_IT": "इतालवी (इटली)", + "it_SM": "इतालवी (सैन मेरीनो)", + "ja": "जापानी", + "ja_JP": "जापानी (जापान)", + "ka": "जॉरà¥à¤œà¤¿à¤¯à¤¾à¤ˆ", + "ka_GE": "जॉरà¥à¤œà¤¿à¤¯à¤¾à¤ˆ (जॉरà¥à¤œà¤¿à¤¯à¤¾)", + "ki": "किकà¥à¤¯à¥‚", + "ki_KE": "किकà¥à¤¯à¥‚ (केनà¥à¤¯à¤¾)", + "kk": "कज़ाख़", + "kk_KZ": "कज़ाख़ (कज़ाखसà¥à¤¤à¤¾à¤¨)", + "kl": "कलालीसà¥à¤¤", + "kl_GL": "कलालीसà¥à¤¤ (गà¥à¤°à¥€à¤¨à¤²à¥ˆà¤‚ड)", + "km": "खमेर", + "km_KH": "खमेर (कंबोडिया)", + "kn": "कनà¥à¤¨à¤¡à¤¼", + "kn_IN": "कनà¥à¤¨à¤¡à¤¼ (भारत)", + "ko": "कोरियाई", + "ko_KP": "कोरियाई (उतà¥à¤¤à¤° कोरिया)", + "ko_KR": "कोरियाई (दकà¥à¤·à¤¿à¤£ कोरिया)", + "ks": "कशà¥à¤®à¥€à¤°à¥€", + "ks_IN": "कशà¥à¤®à¥€à¤°à¥€ (भारत)", + "kw": "कोरà¥à¤¨à¤¿à¤¶", + "kw_GB": "कोरà¥à¤¨à¤¿à¤¶ (यूनाइटेड किंगडम)", + "ky": "किरà¥à¤—ीज़", + "ky_KG": "किरà¥à¤—ीज़ (किरà¥à¤—िज़सà¥à¤¤à¤¾à¤¨)", + "lb": "लगà¥à¤œà¤¼à¤®à¤¬à¤°à¥à¤—ी", + "lb_LU": "लगà¥à¤œà¤¼à¤®à¤¬à¤°à¥à¤—ी (लगà¥à¤œà¤¼à¤®à¤¬à¤°à¥à¤—)", + "lg": "गांडा", + "lg_UG": "गांडा (यà¥à¤—ांडा)", + "ln": "लिंगाला", + "ln_AO": "लिंगाला (अंगोला)", + "ln_CD": "लिंगाला (कांगो - किंशासा)", + "ln_CF": "लिंगाला (मधà¥à¤¯ अफ़à¥à¤°à¥€à¤•ी गणराजà¥à¤¯)", + "ln_CG": "लिंगाला (कांगो – बà¥à¤°à¤¾à¤œà¤¼à¤¾à¤µà¤¿à¤²)", + "lo": "लाओ", + "lo_LA": "लाओ (लाओस)", + "lt": "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "lt_LT": "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾à¤ˆ (लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾)", + "lu": "लà¥à¤¯à¥‚बा-कटांगा", + "lu_CD": "लà¥à¤¯à¥‚बा-कटांगा (कांगो - किंशासा)", + "lv": "लातवियाई", + "lv_LV": "लातवियाई (लातविया)", + "mg": "मालागासी", + "mg_MG": "मालागासी (मेडागासà¥à¤•र)", + "mk": "मैसिडोनियाई", + "mk_MK": "मैसिडोनियाई (मैसिडोनिया)", + "ml": "मलयालम", + "ml_IN": "मलयालम (भारत)", + "mn": "मंगोलियाई", + "mn_MN": "मंगोलियाई (मंगोलिया)", + "mr": "मराठी", + "mr_IN": "मराठी (भारत)", + "ms": "मलय", + "ms_BN": "मलय (बà¥à¤°à¥‚नेई)", + "ms_MY": "मलय (मलेशिया)", + "ms_SG": "मलय (सिंगापà¥à¤°)", + "mt": "मालà¥à¤Ÿà¥€à¤œà¤¼", + "mt_MT": "मालà¥à¤Ÿà¥€à¤œà¤¼ (मालà¥à¤Ÿà¤¾)", + "my": "बरà¥à¤®à¥€à¤œà¤¼", + "my_MM": "बरà¥à¤®à¥€à¤œà¤¼ (मà¥à¤¯à¤¾à¤‚मार (बरà¥à¤®à¤¾))", + "nb": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¾à¤ˆ बोकमाल", + "nb_NO": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¾à¤ˆ बोकमाल (नॉरà¥à¤µà¥‡)", + "nb_SJ": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¾à¤ˆ बोकमाल (सà¥à¤µà¤¾à¤²à¤¬à¤¾à¤°à¥à¤¡ और जान मायेन)", + "nd": "उतà¥à¤¤à¤°à¥€ देबेल", + "nd_ZW": "उतà¥à¤¤à¤°à¥€ देबेल (ज़िमà¥à¤¬à¤¾à¤¬à¥à¤µà¥‡)", + "ne": "नेपाली", + "ne_IN": "नेपाली (भारत)", + "ne_NP": "नेपाली (नेपाल)", + "nl": "डच", + "nl_AW": "डच (अरूबा)", + "nl_BE": "डच (बेलà¥à¤œà¤¿à¤¯à¤®)", + "nl_BQ": "डच (कैरिबियन नीदरलैंड)", + "nl_CW": "डच (कà¥à¤¯à¥‚रासाओ)", + "nl_NL": "डच (नीदरलैंड)", + "nl_SR": "डच (सूरीनाम)", + "nl_SX": "डच (सिंट मारà¥à¤Ÿà¤¿à¤¨)", + "nn": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¾à¤ˆ नॉयनॉरà¥à¤¸à¥à¤•", + "nn_NO": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¾à¤ˆ नॉयनॉरà¥à¤¸à¥à¤• (नॉरà¥à¤µà¥‡)", + "no": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¾à¤ˆ", + "no_NO": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¾à¤ˆ (नॉरà¥à¤µà¥‡)", + "om": "ओरोमो", + "om_ET": "ओरोमो (इथियोपिया)", + "om_KE": "ओरोमो (केनà¥à¤¯à¤¾)", + "or": "उड़िया", + "or_IN": "उड़िया (भारत)", + "os": "ओसà¥à¤¸à¥‡à¤Ÿà¤¿à¤•", + "os_GE": "ओसà¥à¤¸à¥‡à¤Ÿà¤¿à¤• (जॉरà¥à¤œà¤¿à¤¯à¤¾)", + "os_RU": "ओसà¥à¤¸à¥‡à¤Ÿà¤¿à¤• (रूस)", + "pa": "पंजाबी", + "pa_Arab": "पंजाबी (अरबी)", + "pa_Arab_PK": "पंजाबी (अरबी, पाकिसà¥à¤¤à¤¾à¤¨)", + "pa_Guru": "पंजाबी (गà¥à¤°à¤®à¥à¤–ी)", + "pa_Guru_IN": "पंजाबी (गà¥à¤°à¤®à¥à¤–ी, भारत)", + "pa_IN": "पंजाबी (भारत)", + "pa_PK": "पंजाबी (पाकिसà¥à¤¤à¤¾à¤¨)", + "pl": "पोलिश", + "pl_PL": "पोलिश (पोलैंड)", + "ps": "पशà¥à¤¤à¥‹", + "ps_AF": "पशà¥à¤¤à¥‹ (अफ़गानिसà¥à¤¤à¤¾à¤¨)", + "pt": "पà¥à¤°à¥à¤¤à¤—ाली", + "pt_AO": "पà¥à¤°à¥à¤¤à¤—ाली (अंगोला)", + "pt_BR": "पà¥à¤°à¥à¤¤à¤—ाली (बà¥à¤°à¤¾à¤œà¤¼à¥€à¤²)", + "pt_CH": "पà¥à¤°à¥à¤¤à¤—ाली (सà¥à¤µà¤¿à¤Ÿà¥à¤œà¤¼à¤°à¤²à¥ˆà¤‚ड)", + "pt_CV": "पà¥à¤°à¥à¤¤à¤—ाली (केप वरà¥à¤¡)", + "pt_GQ": "पà¥à¤°à¥à¤¤à¤—ाली (इकà¥à¤µà¥‡à¤Ÿà¥‹à¤°à¤¿à¤¯à¤² गिनी)", + "pt_GW": "पà¥à¤°à¥à¤¤à¤—ाली (गिनी-बिसाउ)", + "pt_LU": "पà¥à¤°à¥à¤¤à¤—ाली (लगà¥à¤œà¤¼à¤®à¤¬à¤°à¥à¤—)", + "pt_MO": "पà¥à¤°à¥à¤¤à¤—ाली (मकाऊ (विशेष पà¥à¤°à¤¶à¤¾à¤¸à¤¨à¤¿à¤• कà¥à¤·à¥‡à¤¤à¥à¤° चीन))", + "pt_MZ": "पà¥à¤°à¥à¤¤à¤—ाली (मोज़ांबिक)", + "pt_PT": "पà¥à¤°à¥à¤¤à¤—ाली (पà¥à¤°à¥à¤¤à¤—ाल)", + "pt_ST": "पà¥à¤°à¥à¤¤à¤—ाली (साओ टोम और पà¥à¤°à¤¿à¤‚सिपे)", + "pt_TL": "पà¥à¤°à¥à¤¤à¤—ाली (तिमोर-लेसà¥à¤¤)", + "qu": "कà¥à¤µà¥‡à¤šà¥à¤†", + "qu_BO": "कà¥à¤µà¥‡à¤šà¥à¤† (बोलीविया)", + "qu_EC": "कà¥à¤µà¥‡à¤šà¥à¤† (इकà¥à¤µà¤¾à¤¡à¥‹à¤°)", + "qu_PE": "कà¥à¤µà¥‡à¤šà¥à¤† (पेरू)", + "rm": "रोमानà¥à¤¶", + "rm_CH": "रोमानà¥à¤¶ (सà¥à¤µà¤¿à¤Ÿà¥à¤œà¤¼à¤°à¤²à¥ˆà¤‚ड)", + "rn": "रà¥à¤¨à¥à¤¦à¥€", + "rn_BI": "रà¥à¤¨à¥à¤¦à¥€ (बà¥à¤°à¥à¤‚डी)", + "ro": "रोमानियाई", + "ro_MD": "रोमानियाई (मॉलà¥à¤¡à¥‹à¤µà¤¾)", + "ro_RO": "रोमानियाई (रोमानिया)", + "ru": "रूसी", + "ru_BY": "रूसी (बेलारूस)", + "ru_KG": "रूसी (किरà¥à¤—िज़सà¥à¤¤à¤¾à¤¨)", + "ru_KZ": "रूसी (कज़ाखसà¥à¤¤à¤¾à¤¨)", + "ru_MD": "रूसी (मॉलà¥à¤¡à¥‹à¤µà¤¾)", + "ru_RU": "रूसी (रूस)", + "ru_UA": "रूसी (यूकà¥à¤°à¥‡à¤¨)", + "rw": "किनà¥à¤¯à¤¾à¤°à¤µà¤¾à¤‚डा", + "rw_RW": "किनà¥à¤¯à¤¾à¤°à¤µà¤¾à¤‚डा (रवांडा)", + "se": "नॉरà¥à¤¦à¤¨ सामी", + "se_FI": "नॉरà¥à¤¦à¤¨ सामी (फ़िनलैंड)", + "se_NO": "नॉरà¥à¤¦à¤¨ सामी (नॉरà¥à¤µà¥‡)", + "se_SE": "नॉरà¥à¤¦à¤¨ सामी (सà¥à¤µà¥€à¤¡à¤¨)", + "sg": "सांगो", + "sg_CF": "सांगो (मधà¥à¤¯ अफ़à¥à¤°à¥€à¤•ी गणराजà¥à¤¯)", + "sh": "सेरà¥à¤¬à¥‹-कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾à¤ˆ", + "sh_BA": "सेरà¥à¤¬à¥‹-कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾à¤ˆ (बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¤¼à¥‡à¤—ोविना)", + "si": "सिंहली", + "si_LK": "सिंहली (शà¥à¤°à¥€à¤²à¤‚का)", + "sk": "सà¥à¤²à¥‹à¤µà¤¾à¤•", + "sk_SK": "सà¥à¤²à¥‹à¤µà¤¾à¤• (सà¥à¤²à¥‹à¤µà¤¾à¤•िया)", + "sl": "सà¥à¤²à¥‹à¤µà¥‡à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "sl_SI": "सà¥à¤²à¥‹à¤µà¥‡à¤¨à¤¿à¤¯à¤¾à¤ˆ (सà¥à¤²à¥‹à¤µà¥‡à¤¨à¤¿à¤¯à¤¾)", + "sn": "शोणा", + "sn_ZW": "शोणा (ज़िमà¥à¤¬à¤¾à¤¬à¥à¤µà¥‡)", + "so": "सोमाली", + "so_DJ": "सोमाली (जिबूती)", + "so_ET": "सोमाली (इथियोपिया)", + "so_KE": "सोमाली (केनà¥à¤¯à¤¾)", + "so_SO": "सोमाली (सोमालिया)", + "sq": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "sq_AL": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾à¤ˆ (अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾)", + "sq_MK": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾à¤ˆ (मैसिडोनिया)", + "sq_XK": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾à¤ˆ (कोसोवो)", + "sr": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ", + "sr_BA": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¤¼à¥‡à¤—ोविना)", + "sr_Cyrl": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (सिरिलिक)", + "sr_Cyrl_BA": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (सिरिलिक, बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¤¼à¥‡à¤—ोविना)", + "sr_Cyrl_ME": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (सिरिलिक, मोंटेनेगà¥à¤°à¥‹)", + "sr_Cyrl_RS": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (सिरिलिक, सरà¥à¤¬à¤¿à¤¯à¤¾)", + "sr_Cyrl_XK": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (सिरिलिक, कोसोवो)", + "sr_Latn": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (लैटिन)", + "sr_Latn_BA": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (लैटिन, बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¤¼à¥‡à¤—ोविना)", + "sr_Latn_ME": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (लैटिन, मोंटेनेगà¥à¤°à¥‹)", + "sr_Latn_RS": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (लैटिन, सरà¥à¤¬à¤¿à¤¯à¤¾)", + "sr_Latn_XK": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (लैटिन, कोसोवो)", + "sr_ME": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (मोंटेनेगà¥à¤°à¥‹)", + "sr_RS": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (सरà¥à¤¬à¤¿à¤¯à¤¾)", + "sr_XK": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤ˆ (कोसोवो)", + "sv": "सà¥à¤µà¥€à¤¡à¤¿à¤¶", + "sv_AX": "सà¥à¤µà¥€à¤¡à¤¿à¤¶ (à¤à¤²à¥ˆà¤‚ड दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह)", + "sv_FI": "सà¥à¤µà¥€à¤¡à¤¿à¤¶ (फ़िनलैंड)", + "sv_SE": "सà¥à¤µà¥€à¤¡à¤¿à¤¶ (सà¥à¤µà¥€à¤¡à¤¨)", + "sw": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€", + "sw_CD": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€ (कांगो - किंशासा)", + "sw_KE": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€ (केनà¥à¤¯à¤¾)", + "sw_TZ": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€ (तंज़ानिया)", + "sw_UG": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€ (यà¥à¤—ांडा)", + "ta": "तमिल", + "ta_IN": "तमिल (भारत)", + "ta_LK": "तमिल (शà¥à¤°à¥€à¤²à¤‚का)", + "ta_MY": "तमिल (मलेशिया)", + "ta_SG": "तमिल (सिंगापà¥à¤°)", + "te": "तेलà¥à¤—ू", + "te_IN": "तेलà¥à¤—ू (भारत)", + "th": "थाई", + "th_TH": "थाई (थाईलैंड)", + "ti": "तिगà¥à¤°à¥€à¤¨à¥à¤¯à¤¾", + "ti_ER": "तिगà¥à¤°à¥€à¤¨à¥à¤¯à¤¾ (इरिटà¥à¤°à¤¿à¤¯à¤¾)", + "ti_ET": "तिगà¥à¤°à¥€à¤¨à¥à¤¯à¤¾ (इथियोपिया)", + "tl": "टैगलॉग", + "tl_PH": "टैगलॉग (फ़िलिपींस)", + "to": "टोंगन", + "to_TO": "टोंगन (टोंगा)", + "tr": "तà¥à¤°à¥à¤•ी", + "tr_CY": "तà¥à¤°à¥à¤•ी (साइपà¥à¤°à¤¸)", + "tr_TR": "तà¥à¤°à¥à¤•ी (तà¥à¤°à¥à¤•ी)", + "ug": "विघà¥à¤°", + "ug_CN": "विघà¥à¤° (चीन)", + "uk": "यूकà¥à¤°à¥‡à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "uk_UA": "यूकà¥à¤°à¥‡à¤¨à¤¿à¤¯à¤¾à¤ˆ (यूकà¥à¤°à¥‡à¤¨)", + "ur": "उरà¥à¤¦à¥‚", + "ur_IN": "उरà¥à¤¦à¥‚ (भारत)", + "ur_PK": "उरà¥à¤¦à¥‚ (पाकिसà¥à¤¤à¤¾à¤¨)", + "uz": "उज़à¥à¤¬à¥‡à¤•", + "uz_AF": "उज़à¥à¤¬à¥‡à¤• (अफ़गानिसà¥à¤¤à¤¾à¤¨)", + "uz_Arab": "उज़à¥à¤¬à¥‡à¤• (अरबी)", + "uz_Arab_AF": "उज़à¥à¤¬à¥‡à¤• (अरबी, अफ़गानिसà¥à¤¤à¤¾à¤¨)", + "uz_Cyrl": "उज़à¥à¤¬à¥‡à¤• (सिरिलिक)", + "uz_Cyrl_UZ": "उज़à¥à¤¬à¥‡à¤• (सिरिलिक, उज़à¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨)", + "uz_Latn": "उज़à¥à¤¬à¥‡à¤• (लैटिन)", + "uz_Latn_UZ": "उज़à¥à¤¬à¥‡à¤• (लैटिन, उज़à¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨)", + "uz_UZ": "उज़à¥à¤¬à¥‡à¤• (उज़à¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨)", + "vi": "वियतनामी", + "vi_VN": "वियतनामी (वियतनाम)", + "yi": "यहूदी", + "yo": "योरूबा", + "yo_BJ": "योरूबा (बेनिन)", + "yo_NG": "योरूबा (नाइजीरिया)", + "zh": "चीनी", + "zh_CN": "चीनी (चीन)", + "zh_HK": "चीनी (हाà¤à¤— काà¤à¤— (चीन विशेष पà¥à¤°à¤¶à¤¾à¤¸à¤¨à¤¿à¤• कà¥à¤·à¥‡à¤¤à¥à¤°))", + "zh_Hans": "चीनी (सरलीकृत)", + "zh_Hans_CN": "चीनी (सरलीकृत, चीन)", + "zh_Hans_HK": "चीनी (सरलीकृत, हाà¤à¤— काà¤à¤— (चीन विशेष पà¥à¤°à¤¶à¤¾à¤¸à¤¨à¤¿à¤• कà¥à¤·à¥‡à¤¤à¥à¤°))", + "zh_Hans_MO": "चीनी (सरलीकृत, मकाऊ (विशेष पà¥à¤°à¤¶à¤¾à¤¸à¤¨à¤¿à¤• कà¥à¤·à¥‡à¤¤à¥à¤° चीन))", + "zh_Hans_SG": "चीनी (सरलीकृत, सिंगापà¥à¤°)", + "zh_Hant": "चीनी (पारंपरिक)", + "zh_Hant_HK": "चीनी (पारंपरिक, हाà¤à¤— काà¤à¤— (चीन विशेष पà¥à¤°à¤¶à¤¾à¤¸à¤¨à¤¿à¤• कà¥à¤·à¥‡à¤¤à¥à¤°))", + "zh_Hant_MO": "चीनी (पारंपरिक, मकाऊ (विशेष पà¥à¤°à¤¶à¤¾à¤¸à¤¨à¤¿à¤• कà¥à¤·à¥‡à¤¤à¥à¤° चीन))", + "zh_Hant_TW": "चीनी (पारंपरिक, ताइवान)", + "zh_MO": "चीनी (मकाऊ (विशेष पà¥à¤°à¤¶à¤¾à¤¸à¤¨à¤¿à¤• कà¥à¤·à¥‡à¤¤à¥à¤° चीन))", + "zh_SG": "चीनी (सिंगापà¥à¤°)", + "zh_TW": "चीनी (ताइवान)", + "zu": "ज़à¥à¤²à¥‚", + "zu_ZA": "ज़à¥à¤²à¥‚ (दकà¥à¤·à¤¿à¤£ अफ़à¥à¤°à¥€à¤•ा)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/hr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/hr.json new file mode 100644 index 0000000000000000000000000000000000000000..9c4ea9d734666e3cb5e2723362e856b7007fb0a9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/hr.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibija)", + "af_ZA": "afrikaans (JužnoafriÄka Republika)", + "ak": "akanski", + "ak_GH": "akanski (Gana)", + "am": "amharski", + "am_ET": "amharski (Etiopija)", + "ar": "arapski", + "ar_AE": "arapski (Ujedinjeni Arapski Emirati)", + "ar_BH": "arapski (Bahrein)", + "ar_DJ": "arapski (Džibuti)", + "ar_DZ": "arapski (Alžir)", + "ar_EG": "arapski (Egipat)", + "ar_EH": "arapski (Zapadna Sahara)", + "ar_ER": "arapski (Eritreja)", + "ar_IL": "arapski (Izrael)", + "ar_IQ": "arapski (Irak)", + "ar_JO": "arapski (Jordan)", + "ar_KM": "arapski (Komori)", + "ar_KW": "arapski (Kuvajt)", + "ar_LB": "arapski (Libanon)", + "ar_LY": "arapski (Libija)", + "ar_MA": "arapski (Maroko)", + "ar_MR": "arapski (Mauretanija)", + "ar_OM": "arapski (Oman)", + "ar_PS": "arapski (Palestinsko PodruÄje)", + "ar_QA": "arapski (Katar)", + "ar_SA": "arapski (Saudijska Arabija)", + "ar_SD": "arapski (Sudan)", + "ar_SO": "arapski (Somalija)", + "ar_SS": "arapski (Južni Sudan)", + "ar_SY": "arapski (Sirija)", + "ar_TD": "arapski (ÄŒad)", + "ar_TN": "arapski (Tunis)", + "ar_YE": "arapski (Jemen)", + "as": "asamski", + "as_IN": "asamski (Indija)", + "az": "azerbajdžanski", + "az_AZ": "azerbajdžanski (Azerbajdžan)", + "az_Cyrl": "azerbajdžanski (ćirilica)", + "az_Cyrl_AZ": "azerbajdžanski (ćirilica, Azerbajdžan)", + "az_Latn": "azerbajdžanski (latinica)", + "az_Latn_AZ": "azerbajdžanski (latinica, Azerbajdžan)", + "be": "bjeloruski", + "be_BY": "bjeloruski (Bjelorusija)", + "bg": "bugarski", + "bg_BG": "bugarski (Bugarska)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bangla", + "bn_BD": "bangla (BangladeÅ¡)", + "bn_IN": "bangla (Indija)", + "bo": "tibetski", + "bo_CN": "tibetski (Kina)", + "bo_IN": "tibetski (Indija)", + "br": "bretonski", + "br_FR": "bretonski (Francuska)", + "bs": "bosanski", + "bs_BA": "bosanski (Bosna i Hercegovina)", + "bs_Cyrl": "bosanski (ćirilica)", + "bs_Cyrl_BA": "bosanski (ćirilica, Bosna i Hercegovina)", + "bs_Latn": "bosanski (latinica)", + "bs_Latn_BA": "bosanski (latinica, Bosna i Hercegovina)", + "ca": "katalonski", + "ca_AD": "katalonski (Andora)", + "ca_ES": "katalonski (Å panjolska)", + "ca_FR": "katalonski (Francuska)", + "ca_IT": "katalonski (Italija)", + "ce": "ÄeÄenski", + "ce_RU": "ÄeÄenski (Rusija)", + "cs": "ÄeÅ¡ki", + "cs_CZ": "ÄeÅ¡ki (ÄŒeÅ¡ka Republika)", + "cy": "velÅ¡ki", + "cy_GB": "velÅ¡ki (Ujedinjeno Kraljevstvo)", + "da": "danski", + "da_DK": "danski (Danska)", + "da_GL": "danski (Grenland)", + "de": "njemaÄki", + "de_AT": "njemaÄki (Austrija)", + "de_BE": "njemaÄki (Belgija)", + "de_CH": "njemaÄki (Å vicarska)", + "de_DE": "njemaÄki (NjemaÄka)", + "de_IT": "njemaÄki (Italija)", + "de_LI": "njemaÄki (LihtenÅ¡tajn)", + "de_LU": "njemaÄki (Luksemburg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Butan)", + "ee": "ewe", + "ee_GH": "ewe (Gana)", + "ee_TG": "ewe (Togo)", + "el": "grÄki", + "el_CY": "grÄki (Cipar)", + "el_GR": "grÄki (GrÄka)", + "en": "engleski", + "en_AG": "engleski (Antigva i Barbuda)", + "en_AI": "engleski (Angvila)", + "en_AS": "engleski (AmeriÄka Samoa)", + "en_AT": "engleski (Austrija)", + "en_AU": "engleski (Australija)", + "en_BB": "engleski (Barbados)", + "en_BE": "engleski (Belgija)", + "en_BI": "engleski (Burundi)", + "en_BM": "engleski (Bermudi)", + "en_BS": "engleski (Bahami)", + "en_BW": "engleski (Bocvana)", + "en_BZ": "engleski (Belize)", + "en_CA": "engleski (Kanada)", + "en_CC": "engleski (Kokosovi (Keelingovi) otoci)", + "en_CH": "engleski (Å vicarska)", + "en_CK": "engleski (Cookovi Otoci)", + "en_CM": "engleski (Kamerun)", + "en_CX": "engleski (Božićni otok)", + "en_CY": "engleski (Cipar)", + "en_DE": "engleski (NjemaÄka)", + "en_DG": "engleski (Diego Garcia)", + "en_DK": "engleski (Danska)", + "en_DM": "engleski (Dominika)", + "en_ER": "engleski (Eritreja)", + "en_FI": "engleski (Finska)", + "en_FJ": "engleski (Fidži)", + "en_FK": "engleski (Falklandski otoci)", + "en_FM": "engleski (Mikronezija)", + "en_GB": "engleski (Ujedinjeno Kraljevstvo)", + "en_GD": "engleski (Grenada)", + "en_GG": "engleski (Guernsey)", + "en_GH": "engleski (Gana)", + "en_GI": "engleski (Gibraltar)", + "en_GM": "engleski (Gambija)", + "en_GU": "engleski (Guam)", + "en_GY": "engleski (Gvajana)", + "en_HK": "engleski (PUP Hong Kong Kina)", + "en_IE": "engleski (Irska)", + "en_IL": "engleski (Izrael)", + "en_IM": "engleski (Otok Man)", + "en_IN": "engleski (Indija)", + "en_IO": "engleski (Britanski Indijskooceanski teritorij)", + "en_JE": "engleski (Jersey)", + "en_JM": "engleski (Jamajka)", + "en_KE": "engleski (Kenija)", + "en_KI": "engleski (Kiribati)", + "en_KN": "engleski (Sveti Kristofor i Nevis)", + "en_KY": "engleski (Kajmanski otoci)", + "en_LC": "engleski (Sveta Lucija)", + "en_LR": "engleski (Liberija)", + "en_LS": "engleski (Lesoto)", + "en_MG": "engleski (Madagaskar)", + "en_MH": "engleski (MarÅ¡alovi Otoci)", + "en_MO": "engleski (PUP Makao Kina)", + "en_MP": "engleski (Sjevernomarijanski otoci)", + "en_MS": "engleski (Montserrat)", + "en_MT": "engleski (Malta)", + "en_MU": "engleski (Mauricijus)", + "en_MW": "engleski (Malavi)", + "en_MY": "engleski (Malezija)", + "en_NA": "engleski (Namibija)", + "en_NF": "engleski (Otok Norfolk)", + "en_NG": "engleski (Nigerija)", + "en_NL": "engleski (Nizozemska)", + "en_NR": "engleski (Nauru)", + "en_NU": "engleski (Niue)", + "en_NZ": "engleski (Novi Zeland)", + "en_PG": "engleski (Papua Nova Gvineja)", + "en_PH": "engleski (Filipini)", + "en_PK": "engleski (Pakistan)", + "en_PN": "engleski (Otoci Pitcairn)", + "en_PR": "engleski (Portoriko)", + "en_PW": "engleski (Palau)", + "en_RW": "engleski (Ruanda)", + "en_SB": "engleski (Salomonski Otoci)", + "en_SC": "engleski (SejÅ¡eli)", + "en_SD": "engleski (Sudan)", + "en_SE": "engleski (Å vedska)", + "en_SG": "engleski (Singapur)", + "en_SH": "engleski (Sveta Helena)", + "en_SI": "engleski (Slovenija)", + "en_SL": "engleski (Sijera Leone)", + "en_SS": "engleski (Južni Sudan)", + "en_SX": "engleski (Sint Maarten)", + "en_SZ": "engleski (Svazi)", + "en_TC": "engleski (Otoci Turks i Caicos)", + "en_TK": "engleski (Tokelau)", + "en_TO": "engleski (Tonga)", + "en_TT": "engleski (Trinidad i Tobago)", + "en_TV": "engleski (Tuvalu)", + "en_TZ": "engleski (Tanzanija)", + "en_UG": "engleski (Uganda)", + "en_UM": "engleski (Mali udaljeni otoci SAD-a)", + "en_US": "engleski (Sjedinjene AmeriÄke Države)", + "en_VC": "engleski (Sveti Vincent i Grenadini)", + "en_VG": "engleski (Britanski DjeviÄanski otoci)", + "en_VI": "engleski (AmeriÄki DjeviÄanski otoci)", + "en_VU": "engleski (Vanuatu)", + "en_WS": "engleski (Samoa)", + "en_ZA": "engleski (JužnoafriÄka Republika)", + "en_ZM": "engleski (Zambija)", + "en_ZW": "engleski (Zimbabve)", + "eo": "esperanto", + "es": "Å¡panjolski", + "es_AR": "Å¡panjolski (Argentina)", + "es_BO": "Å¡panjolski (Bolivija)", + "es_BR": "Å¡panjolski (Brazil)", + "es_CL": "Å¡panjolski (ÄŒile)", + "es_CO": "Å¡panjolski (Kolumbija)", + "es_CR": "Å¡panjolski (Kostarika)", + "es_CU": "Å¡panjolski (Kuba)", + "es_DO": "Å¡panjolski (Dominikanska Republika)", + "es_EA": "Å¡panjolski (Ceuta i Melilla)", + "es_EC": "Å¡panjolski (Ekvador)", + "es_ES": "Å¡panjolski (Å panjolska)", + "es_GQ": "Å¡panjolski (Ekvatorska Gvineja)", + "es_GT": "Å¡panjolski (Gvatemala)", + "es_HN": "Å¡panjolski (Honduras)", + "es_IC": "Å¡panjolski (Kanarski otoci)", + "es_MX": "Å¡panjolski (Meksiko)", + "es_NI": "Å¡panjolski (Nikaragva)", + "es_PA": "Å¡panjolski (Panama)", + "es_PE": "Å¡panjolski (Peru)", + "es_PH": "Å¡panjolski (Filipini)", + "es_PR": "Å¡panjolski (Portoriko)", + "es_PY": "Å¡panjolski (Paragvaj)", + "es_SV": "Å¡panjolski (Salvador)", + "es_US": "Å¡panjolski (Sjedinjene AmeriÄke Države)", + "es_UY": "Å¡panjolski (Urugvaj)", + "es_VE": "Å¡panjolski (Venezuela)", + "et": "estonski", + "et_EE": "estonski (Estonija)", + "eu": "baskijski", + "eu_ES": "baskijski (Å panjolska)", + "fa": "perzijski", + "fa_AF": "perzijski (Afganistan)", + "fa_IR": "perzijski (Iran)", + "ff": "fula", + "ff_CM": "fula (Kamerun)", + "ff_GN": "fula (Gvineja)", + "ff_MR": "fula (Mauretanija)", + "ff_SN": "fula (Senegal)", + "fi": "finski", + "fi_FI": "finski (Finska)", + "fo": "ferojski", + "fo_DK": "ferojski (Danska)", + "fo_FO": "ferojski (Farski otoci)", + "fr": "francuski", + "fr_BE": "francuski (Belgija)", + "fr_BF": "francuski (Burkina Faso)", + "fr_BI": "francuski (Burundi)", + "fr_BJ": "francuski (Benin)", + "fr_BL": "francuski (Saint Barthélemy)", + "fr_CA": "francuski (Kanada)", + "fr_CD": "francuski (Kongo - Kinshasa)", + "fr_CF": "francuski (SrednjoafriÄka Republika)", + "fr_CG": "francuski (Kongo - Brazzaville)", + "fr_CH": "francuski (Å vicarska)", + "fr_CI": "francuski (Obala Bjelokosti)", + "fr_CM": "francuski (Kamerun)", + "fr_DJ": "francuski (Džibuti)", + "fr_DZ": "francuski (Alžir)", + "fr_FR": "francuski (Francuska)", + "fr_GA": "francuski (Gabon)", + "fr_GF": "francuski (Francuska Gijana)", + "fr_GN": "francuski (Gvineja)", + "fr_GP": "francuski (Guadalupe)", + "fr_GQ": "francuski (Ekvatorska Gvineja)", + "fr_HT": "francuski (Haiti)", + "fr_KM": "francuski (Komori)", + "fr_LU": "francuski (Luksemburg)", + "fr_MA": "francuski (Maroko)", + "fr_MC": "francuski (Monako)", + "fr_MF": "francuski (Saint Martin)", + "fr_MG": "francuski (Madagaskar)", + "fr_ML": "francuski (Mali)", + "fr_MQ": "francuski (Martinique)", + "fr_MR": "francuski (Mauretanija)", + "fr_MU": "francuski (Mauricijus)", + "fr_NC": "francuski (Nova Kaledonija)", + "fr_NE": "francuski (Niger)", + "fr_PF": "francuski (Francuska Polinezija)", + "fr_PM": "francuski (Saint-Pierre-et-Miquelon)", + "fr_RE": "francuski (Réunion)", + "fr_RW": "francuski (Ruanda)", + "fr_SC": "francuski (SejÅ¡eli)", + "fr_SN": "francuski (Senegal)", + "fr_SY": "francuski (Sirija)", + "fr_TD": "francuski (ÄŒad)", + "fr_TG": "francuski (Togo)", + "fr_TN": "francuski (Tunis)", + "fr_VU": "francuski (Vanuatu)", + "fr_WF": "francuski (Wallis i Futuna)", + "fr_YT": "francuski (Mayotte)", + "fy": "zapadnofrizijski", + "fy_NL": "zapadnofrizijski (Nizozemska)", + "ga": "irski", + "ga_IE": "irski (Irska)", + "gd": "Å¡kotski gaelski", + "gd_GB": "Å¡kotski gaelski (Ujedinjeno Kraljevstvo)", + "gl": "galicijski", + "gl_ES": "galicijski (Å panjolska)", + "gu": "gudžaratski", + "gu_IN": "gudžaratski (Indija)", + "gv": "manski", + "gv_IM": "manski (Otok Man)", + "ha": "hausa", + "ha_GH": "hausa (Gana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigerija)", + "he": "hebrejski", + "he_IL": "hebrejski (Izrael)", + "hi": "hindski", + "hi_IN": "hindski (Indija)", + "hr": "hrvatski", + "hr_BA": "hrvatski (Bosna i Hercegovina)", + "hr_HR": "hrvatski (Hrvatska)", + "hu": "maÄ‘arski", + "hu_HU": "maÄ‘arski (MaÄ‘arska)", + "hy": "armenski", + "hy_AM": "armenski (Armenija)", + "id": "indonezijski", + "id_ID": "indonezijski (Indonezija)", + "ig": "igbo", + "ig_NG": "igbo (Nigerija)", + "ii": "sichuan yi", + "ii_CN": "sichuan yi (Kina)", + "is": "islandski", + "is_IS": "islandski (Island)", + "it": "talijanski", + "it_CH": "talijanski (Å vicarska)", + "it_IT": "talijanski (Italija)", + "it_SM": "talijanski (San Marino)", + "ja": "japanski", + "ja_JP": "japanski (Japan)", + "ka": "gruzijski", + "ka_GE": "gruzijski (Gruzija)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenija)", + "kk": "kazaÅ¡ki", + "kk_KZ": "kazaÅ¡ki (Kazahstan)", + "kl": "kalaallisut", + "kl_GL": "kalaallisut (Grenland)", + "km": "kmerski", + "km_KH": "kmerski (Kambodža)", + "kn": "karnataÄki", + "kn_IN": "karnataÄki (Indija)", + "ko": "korejski", + "ko_KP": "korejski (Sjeverna Koreja)", + "ko_KR": "korejski (Južna Koreja)", + "ks": "kaÅ¡mirski", + "ks_IN": "kaÅ¡mirski (Indija)", + "kw": "kornski", + "kw_GB": "kornski (Ujedinjeno Kraljevstvo)", + "ky": "kirgiski", + "ky_KG": "kirgiski (Kirgistan)", + "lb": "luksemburÅ¡ki", + "lb_LU": "luksemburÅ¡ki (Luksemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongo - Kinshasa)", + "ln_CF": "lingala (SrednjoafriÄka Republika)", + "ln_CG": "lingala (Kongo - Brazzaville)", + "lo": "laoski", + "lo_LA": "laoski (Laos)", + "lt": "litavski", + "lt_LT": "litavski (Litva)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Kongo - Kinshasa)", + "lv": "latvijski", + "lv_LV": "latvijski (Latvija)", + "mg": "malgaÅ¡ki", + "mg_MG": "malgaÅ¡ki (Madagaskar)", + "mk": "makedonski", + "mk_MK": "makedonski (Makedonija)", + "ml": "malajalamski", + "ml_IN": "malajalamski (Indija)", + "mn": "mongolski", + "mn_MN": "mongolski (Mongolija)", + "mr": "marathski", + "mr_IN": "marathski (Indija)", + "ms": "malajski", + "ms_BN": "malajski (Brunej)", + "ms_MY": "malajski (Malezija)", + "ms_SG": "malajski (Singapur)", + "mt": "malteÅ¡ki", + "mt_MT": "malteÅ¡ki (Malta)", + "my": "burmanski", + "my_MM": "burmanski (Mjanmar (Burma))", + "nb": "norveÅ¡ki bokmÃ¥l", + "nb_NO": "norveÅ¡ki bokmÃ¥l (NorveÅ¡ka)", + "nb_SJ": "norveÅ¡ki bokmÃ¥l (Svalbard i Jan Mayen)", + "nd": "sjeverni ndebele", + "nd_ZW": "sjeverni ndebele (Zimbabve)", + "ne": "nepalski", + "ne_IN": "nepalski (Indija)", + "ne_NP": "nepalski (Nepal)", + "nl": "nizozemski", + "nl_AW": "nizozemski (Aruba)", + "nl_BE": "nizozemski (Belgija)", + "nl_BQ": "nizozemski (Karipski otoci Nizozemske)", + "nl_CW": "nizozemski (Curaçao)", + "nl_NL": "nizozemski (Nizozemska)", + "nl_SR": "nizozemski (Surinam)", + "nl_SX": "nizozemski (Sint Maarten)", + "nn": "norveÅ¡ki nynorsk", + "nn_NO": "norveÅ¡ki nynorsk (NorveÅ¡ka)", + "no": "norveÅ¡ki", + "no_NO": "norveÅ¡ki (NorveÅ¡ka)", + "om": "oromski", + "om_ET": "oromski (Etiopija)", + "om_KE": "oromski (Kenija)", + "or": "orijski", + "or_IN": "orijski (Indija)", + "os": "osetski", + "os_GE": "osetski (Gruzija)", + "os_RU": "osetski (Rusija)", + "pa": "pandžapski", + "pa_Arab": "pandžapski (arapsko pismo)", + "pa_Arab_PK": "pandžapski (arapsko pismo, Pakistan)", + "pa_Guru": "pandžapski (gurmukhi pismo)", + "pa_Guru_IN": "pandžapski (gurmukhi pismo, Indija)", + "pa_IN": "pandžapski (Indija)", + "pa_PK": "pandžapski (Pakistan)", + "pl": "poljski", + "pl_PL": "poljski (Poljska)", + "ps": "paÅ¡tunski", + "ps_AF": "paÅ¡tunski (Afganistan)", + "pt": "portugalski", + "pt_AO": "portugalski (Angola)", + "pt_BR": "portugalski (Brazil)", + "pt_CH": "portugalski (Å vicarska)", + "pt_CV": "portugalski (Zelenortska Republika)", + "pt_GQ": "portugalski (Ekvatorska Gvineja)", + "pt_GW": "portugalski (Gvineja Bisau)", + "pt_LU": "portugalski (Luksemburg)", + "pt_MO": "portugalski (PUP Makao Kina)", + "pt_MZ": "portugalski (Mozambik)", + "pt_PT": "portugalski (Portugal)", + "pt_ST": "portugalski (Sveti Toma i Princip)", + "pt_TL": "portugalski (Timor-Leste)", + "qu": "keÄuanski", + "qu_BO": "keÄuanski (Bolivija)", + "qu_EC": "keÄuanski (Ekvador)", + "qu_PE": "keÄuanski (Peru)", + "rm": "retoromanski", + "rm_CH": "retoromanski (Å vicarska)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumunjski", + "ro_MD": "rumunjski (Moldavija)", + "ro_RO": "rumunjski (Rumunjska)", + "ru": "ruski", + "ru_BY": "ruski (Bjelorusija)", + "ru_KG": "ruski (Kirgistan)", + "ru_KZ": "ruski (Kazahstan)", + "ru_MD": "ruski (Moldavija)", + "ru_RU": "ruski (Rusija)", + "ru_UA": "ruski (Ukrajina)", + "rw": "kinyarwanda", + "rw_RW": "kinyarwanda (Ruanda)", + "se": "sjeverni sami", + "se_FI": "sjeverni sami (Finska)", + "se_NO": "sjeverni sami (NorveÅ¡ka)", + "se_SE": "sjeverni sami (Å vedska)", + "sg": "sango", + "sg_CF": "sango (SrednjoafriÄka Republika)", + "sh": "srpsko-hrvatski", + "sh_BA": "srpsko-hrvatski (Bosna i Hercegovina)", + "si": "sinhaleÅ¡ki", + "si_LK": "sinhaleÅ¡ki (Å ri Lanka)", + "sk": "slovaÄki", + "sk_SK": "slovaÄki (SlovaÄka)", + "sl": "slovenski", + "sl_SI": "slovenski (Slovenija)", + "sn": "shona", + "sn_ZW": "shona (Zimbabve)", + "so": "somalski", + "so_DJ": "somalski (Džibuti)", + "so_ET": "somalski (Etiopija)", + "so_KE": "somalski (Kenija)", + "so_SO": "somalski (Somalija)", + "sq": "albanski", + "sq_AL": "albanski (Albanija)", + "sq_MK": "albanski (Makedonija)", + "sq_XK": "albanski (Kosovo)", + "sr": "srpski", + "sr_BA": "srpski (Bosna i Hercegovina)", + "sr_Cyrl": "srpski (ćirilica)", + "sr_Cyrl_BA": "srpski (ćirilica, Bosna i Hercegovina)", + "sr_Cyrl_ME": "srpski (ćirilica, Crna Gora)", + "sr_Cyrl_RS": "srpski (ćirilica, Srbija)", + "sr_Cyrl_XK": "srpski (ćirilica, Kosovo)", + "sr_Latn": "srpski (latinica)", + "sr_Latn_BA": "srpski (latinica, Bosna i Hercegovina)", + "sr_Latn_ME": "srpski (latinica, Crna Gora)", + "sr_Latn_RS": "srpski (latinica, Srbija)", + "sr_Latn_XK": "srpski (latinica, Kosovo)", + "sr_ME": "srpski (Crna Gora)", + "sr_RS": "srpski (Srbija)", + "sr_XK": "srpski (Kosovo)", + "sv": "Å¡vedski", + "sv_AX": "Å¡vedski (Ã…landski otoci)", + "sv_FI": "Å¡vedski (Finska)", + "sv_SE": "Å¡vedski (Å vedska)", + "sw": "svahili", + "sw_CD": "svahili (Kongo - Kinshasa)", + "sw_KE": "svahili (Kenija)", + "sw_TZ": "svahili (Tanzanija)", + "sw_UG": "svahili (Uganda)", + "ta": "tamilski", + "ta_IN": "tamilski (Indija)", + "ta_LK": "tamilski (Å ri Lanka)", + "ta_MY": "tamilski (Malezija)", + "ta_SG": "tamilski (Singapur)", + "te": "teluÅ¡ki", + "te_IN": "teluÅ¡ki (Indija)", + "th": "tajlandski", + "th_TH": "tajlandski (Tajland)", + "ti": "tigrinja", + "ti_ER": "tigrinja (Eritreja)", + "ti_ET": "tigrinja (Etiopija)", + "tl": "tagalog", + "tl_PH": "tagalog (Filipini)", + "to": "tonganski", + "to_TO": "tonganski (Tonga)", + "tr": "turski", + "tr_CY": "turski (Cipar)", + "tr_TR": "turski (Turska)", + "ug": "ujgurski", + "ug_CN": "ujgurski (Kina)", + "uk": "ukrajinski", + "uk_UA": "ukrajinski (Ukrajina)", + "ur": "urdski", + "ur_IN": "urdski (Indija)", + "ur_PK": "urdski (Pakistan)", + "uz": "uzbeÄki", + "uz_AF": "uzbeÄki (Afganistan)", + "uz_Arab": "uzbeÄki (arapsko pismo)", + "uz_Arab_AF": "uzbeÄki (arapsko pismo, Afganistan)", + "uz_Cyrl": "uzbeÄki (ćirilica)", + "uz_Cyrl_UZ": "uzbeÄki (ćirilica, Uzbekistan)", + "uz_Latn": "uzbeÄki (latinica)", + "uz_Latn_UZ": "uzbeÄki (latinica, Uzbekistan)", + "uz_UZ": "uzbeÄki (Uzbekistan)", + "vi": "vijetnamski", + "vi_VN": "vijetnamski (Vijetnam)", + "yi": "jidiÅ¡", + "yo": "jorupski", + "yo_BJ": "jorupski (Benin)", + "yo_NG": "jorupski (Nigerija)", + "zh": "kineski", + "zh_CN": "kineski (Kina)", + "zh_HK": "kineski (PUP Hong Kong Kina)", + "zh_Hans": "kineski (pojednostavljeno pismo)", + "zh_Hans_CN": "kineski (pojednostavljeno pismo, Kina)", + "zh_Hans_HK": "kineski (pojednostavljeno pismo, PUP Hong Kong Kina)", + "zh_Hans_MO": "kineski (pojednostavljeno pismo, PUP Makao Kina)", + "zh_Hans_SG": "kineski (pojednostavljeno pismo, Singapur)", + "zh_Hant": "kineski (tradicionalno pismo)", + "zh_Hant_HK": "kineski (tradicionalno pismo, PUP Hong Kong Kina)", + "zh_Hant_MO": "kineski (tradicionalno pismo, PUP Makao Kina)", + "zh_Hant_TW": "kineski (tradicionalno pismo, Tajvan)", + "zh_MO": "kineski (PUP Makao Kina)", + "zh_SG": "kineski (Singapur)", + "zh_TW": "kineski (Tajvan)", + "zu": "zulu", + "zu_ZA": "zulu (JužnoafriÄka Republika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/hu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/hu.json new file mode 100644 index 0000000000000000000000000000000000000000..b6eb047cf9c39709ea16f29647fc1ae8fe6efea3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/hu.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namíbia)", + "af_ZA": "afrikaans (Dél-afrikai Köztársaság)", + "ak": "akan", + "ak_GH": "akan (Ghána)", + "am": "amhara", + "am_ET": "amhara (Etiópia)", + "ar": "arab", + "ar_AE": "arab (Egyesült Arab Emírségek)", + "ar_BH": "arab (Bahrein)", + "ar_DJ": "arab (Dzsibuti)", + "ar_DZ": "arab (Algéria)", + "ar_EG": "arab (Egyiptom)", + "ar_EH": "arab (Nyugat-Szahara)", + "ar_ER": "arab (Eritrea)", + "ar_IL": "arab (Izrael)", + "ar_IQ": "arab (Irak)", + "ar_JO": "arab (Jordánia)", + "ar_KM": "arab (Comore-szigetek)", + "ar_KW": "arab (Kuvait)", + "ar_LB": "arab (Libanon)", + "ar_LY": "arab (Líbia)", + "ar_MA": "arab (Marokkó)", + "ar_MR": "arab (Mauritánia)", + "ar_OM": "arab (Omán)", + "ar_PS": "arab (Palesztin Terület)", + "ar_QA": "arab (Katar)", + "ar_SA": "arab (Szaúd-Arábia)", + "ar_SD": "arab (Szudán)", + "ar_SO": "arab (Szomália)", + "ar_SS": "arab (Dél-Szudán)", + "ar_SY": "arab (Szíria)", + "ar_TD": "arab (Csád)", + "ar_TN": "arab (Tunézia)", + "ar_YE": "arab (Jemen)", + "as": "asszámi", + "as_IN": "asszámi (India)", + "az": "azerbajdzsáni", + "az_AZ": "azerbajdzsáni (Azerbajdzsán)", + "az_Cyrl": "azerbajdzsáni (Cirill)", + "az_Cyrl_AZ": "azerbajdzsáni (Cirill, Azerbajdzsán)", + "az_Latn": "azerbajdzsáni (Latin)", + "az_Latn_AZ": "azerbajdzsáni (Latin, Azerbajdzsán)", + "be": "belarusz", + "be_BY": "belarusz (Belarusz)", + "bg": "bolgár", + "bg_BG": "bolgár (Bulgária)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bangla", + "bn_BD": "bangla (Banglades)", + "bn_IN": "bangla (India)", + "bo": "tibeti", + "bo_CN": "tibeti (Kína)", + "bo_IN": "tibeti (India)", + "br": "breton", + "br_FR": "breton (Franciaország)", + "bs": "bosnyák", + "bs_BA": "bosnyák (Bosznia-Hercegovina)", + "bs_Cyrl": "bosnyák (Cirill)", + "bs_Cyrl_BA": "bosnyák (Cirill, Bosznia-Hercegovina)", + "bs_Latn": "bosnyák (Latin)", + "bs_Latn_BA": "bosnyák (Latin, Bosznia-Hercegovina)", + "ca": "katalán", + "ca_AD": "katalán (Andorra)", + "ca_ES": "katalán (Spanyolország)", + "ca_FR": "katalán (Franciaország)", + "ca_IT": "katalán (Olaszország)", + "ce": "csecsen", + "ce_RU": "csecsen (Oroszország)", + "cs": "cseh", + "cs_CZ": "cseh (Csehország)", + "cy": "walesi", + "cy_GB": "walesi (Egyesült Királyság)", + "da": "dán", + "da_DK": "dán (Dánia)", + "da_GL": "dán (Grönland)", + "de": "német", + "de_AT": "német (Ausztria)", + "de_BE": "német (Belgium)", + "de_CH": "német (Svájc)", + "de_DE": "német (Németország)", + "de_IT": "német (Olaszország)", + "de_LI": "német (Liechtenstein)", + "de_LU": "német (Luxemburg)", + "dz": "dzsonga", + "dz_BT": "dzsonga (Bhután)", + "ee": "eve", + "ee_GH": "eve (Ghána)", + "ee_TG": "eve (Togo)", + "el": "görög", + "el_CY": "görög (Ciprus)", + "el_GR": "görög (Görögország)", + "en": "angol", + "en_AG": "angol (Antigua és Barbuda)", + "en_AI": "angol (Anguilla)", + "en_AS": "angol (Amerikai Szamoa)", + "en_AT": "angol (Ausztria)", + "en_AU": "angol (Ausztrália)", + "en_BB": "angol (Barbados)", + "en_BE": "angol (Belgium)", + "en_BI": "angol (Burundi)", + "en_BM": "angol (Bermuda)", + "en_BS": "angol (Bahama-szigetek)", + "en_BW": "angol (Botswana)", + "en_BZ": "angol (Belize)", + "en_CA": "angol (Kanada)", + "en_CC": "angol (Kókusz (Keeling)-szigetek)", + "en_CH": "angol (Svájc)", + "en_CK": "angol (Cook-szigetek)", + "en_CM": "angol (Kamerun)", + "en_CX": "angol (Karácsony-sziget)", + "en_CY": "angol (Ciprus)", + "en_DE": "angol (Németország)", + "en_DG": "angol (Diego Garcia)", + "en_DK": "angol (Dánia)", + "en_DM": "angol (Dominika)", + "en_ER": "angol (Eritrea)", + "en_FI": "angol (Finnország)", + "en_FJ": "angol (Fidzsi)", + "en_FK": "angol (Falkland-szigetek)", + "en_FM": "angol (Mikronézia)", + "en_GB": "angol (Egyesült Királyság)", + "en_GD": "angol (Grenada)", + "en_GG": "angol (Guernsey)", + "en_GH": "angol (Ghána)", + "en_GI": "angol (Gibraltár)", + "en_GM": "angol (Gambia)", + "en_GU": "angol (Guam)", + "en_GY": "angol (Guyana)", + "en_HK": "angol (Hongkong KKT)", + "en_IE": "angol (Ãrország)", + "en_IL": "angol (Izrael)", + "en_IM": "angol (Man-sziget)", + "en_IN": "angol (India)", + "en_IO": "angol (Brit Indiai-óceáni Terület)", + "en_JE": "angol (Jersey)", + "en_JM": "angol (Jamaica)", + "en_KE": "angol (Kenya)", + "en_KI": "angol (Kiribati)", + "en_KN": "angol (Saint Kitts és Nevis)", + "en_KY": "angol (Kajmán-szigetek)", + "en_LC": "angol (Saint Lucia)", + "en_LR": "angol (Libéria)", + "en_LS": "angol (Lesotho)", + "en_MG": "angol (Madagaszkár)", + "en_MH": "angol (Marshall-szigetek)", + "en_MO": "angol (Makaó KKT)", + "en_MP": "angol (Északi Mariana-szigetek)", + "en_MS": "angol (Montserrat)", + "en_MT": "angol (Málta)", + "en_MU": "angol (Mauritius)", + "en_MW": "angol (Malawi)", + "en_MY": "angol (Malajzia)", + "en_NA": "angol (Namíbia)", + "en_NF": "angol (Norfolk-sziget)", + "en_NG": "angol (Nigéria)", + "en_NL": "angol (Hollandia)", + "en_NR": "angol (Nauru)", + "en_NU": "angol (Niue)", + "en_NZ": "angol (Új-Zéland)", + "en_PG": "angol (Pápua Új-Guinea)", + "en_PH": "angol (Fülöp-szigetek)", + "en_PK": "angol (Pakisztán)", + "en_PN": "angol (Pitcairn-szigetek)", + "en_PR": "angol (Puerto Rico)", + "en_PW": "angol (Palau)", + "en_RW": "angol (Ruanda)", + "en_SB": "angol (Salamon-szigetek)", + "en_SC": "angol (Seychelle-szigetek)", + "en_SD": "angol (Szudán)", + "en_SE": "angol (Svédország)", + "en_SG": "angol (Szingapúr)", + "en_SH": "angol (Szent Ilona)", + "en_SI": "angol (Szlovénia)", + "en_SL": "angol (Sierra Leone)", + "en_SS": "angol (Dél-Szudán)", + "en_SX": "angol (Sint Maarten)", + "en_SZ": "angol (Szváziföld)", + "en_TC": "angol (Turks- és Caicos-szigetek)", + "en_TK": "angol (Tokelau)", + "en_TO": "angol (Tonga)", + "en_TT": "angol (Trinidad és Tobago)", + "en_TV": "angol (Tuvalu)", + "en_TZ": "angol (Tanzánia)", + "en_UG": "angol (Uganda)", + "en_UM": "angol (Az Amerikai Egyesült Ãllamok lakatlan külbirtokai)", + "en_US": "angol (Egyesült Ãllamok)", + "en_VC": "angol (Saint Vincent és a Grenadine-szigetek)", + "en_VG": "angol (Brit Virgin-szigetek)", + "en_VI": "angol (Amerikai Virgin-szigetek)", + "en_VU": "angol (Vanuatu)", + "en_WS": "angol (Szamoa)", + "en_ZA": "angol (Dél-afrikai Köztársaság)", + "en_ZM": "angol (Zambia)", + "en_ZW": "angol (Zimbabwe)", + "eo": "eszperantó", + "es": "spanyol", + "es_AR": "spanyol (Argentína)", + "es_BO": "spanyol (Bolívia)", + "es_BR": "spanyol (Brazília)", + "es_CL": "spanyol (Chile)", + "es_CO": "spanyol (Kolumbia)", + "es_CR": "spanyol (Costa Rica)", + "es_CU": "spanyol (Kuba)", + "es_DO": "spanyol (Dominikai Köztársaság)", + "es_EA": "spanyol (Ceuta és Melilla)", + "es_EC": "spanyol (Ecuador)", + "es_ES": "spanyol (Spanyolország)", + "es_GQ": "spanyol (EgyenlítÅ‘i-Guinea)", + "es_GT": "spanyol (Guatemala)", + "es_HN": "spanyol (Honduras)", + "es_IC": "spanyol (Kanári-szigetek)", + "es_MX": "spanyol (Mexikó)", + "es_NI": "spanyol (Nicaragua)", + "es_PA": "spanyol (Panama)", + "es_PE": "spanyol (Peru)", + "es_PH": "spanyol (Fülöp-szigetek)", + "es_PR": "spanyol (Puerto Rico)", + "es_PY": "spanyol (Paraguay)", + "es_SV": "spanyol (Salvador)", + "es_US": "spanyol (Egyesült Ãllamok)", + "es_UY": "spanyol (Uruguay)", + "es_VE": "spanyol (Venezuela)", + "et": "észt", + "et_EE": "észt (Észtország)", + "eu": "baszk", + "eu_ES": "baszk (Spanyolország)", + "fa": "perzsa", + "fa_AF": "perzsa (Afganisztán)", + "fa_IR": "perzsa (Irán)", + "ff": "fulani", + "ff_CM": "fulani (Kamerun)", + "ff_GN": "fulani (Guinea)", + "ff_MR": "fulani (Mauritánia)", + "ff_SN": "fulani (Szenegál)", + "fi": "finn", + "fi_FI": "finn (Finnország)", + "fo": "feröeri", + "fo_DK": "feröeri (Dánia)", + "fo_FO": "feröeri (Feröer-szigetek)", + "fr": "francia", + "fr_BE": "francia (Belgium)", + "fr_BF": "francia (Burkina Faso)", + "fr_BI": "francia (Burundi)", + "fr_BJ": "francia (Benin)", + "fr_BL": "francia (Saint-Barthélemy)", + "fr_CA": "francia (Kanada)", + "fr_CD": "francia (Kongó - Kinshasa)", + "fr_CF": "francia (Közép-afrikai Köztársaság)", + "fr_CG": "francia (Kongó - Brazzaville)", + "fr_CH": "francia (Svájc)", + "fr_CI": "francia (Elefántcsontpart)", + "fr_CM": "francia (Kamerun)", + "fr_DJ": "francia (Dzsibuti)", + "fr_DZ": "francia (Algéria)", + "fr_FR": "francia (Franciaország)", + "fr_GA": "francia (Gabon)", + "fr_GF": "francia (Francia Guyana)", + "fr_GN": "francia (Guinea)", + "fr_GP": "francia (Guadeloupe)", + "fr_GQ": "francia (EgyenlítÅ‘i-Guinea)", + "fr_HT": "francia (Haiti)", + "fr_KM": "francia (Comore-szigetek)", + "fr_LU": "francia (Luxemburg)", + "fr_MA": "francia (Marokkó)", + "fr_MC": "francia (Monaco)", + "fr_MF": "francia (Saint Martin)", + "fr_MG": "francia (Madagaszkár)", + "fr_ML": "francia (Mali)", + "fr_MQ": "francia (Martinique)", + "fr_MR": "francia (Mauritánia)", + "fr_MU": "francia (Mauritius)", + "fr_NC": "francia (Új-Kaledónia)", + "fr_NE": "francia (Niger)", + "fr_PF": "francia (Francia Polinézia)", + "fr_PM": "francia (Saint-Pierre és Miquelon)", + "fr_RE": "francia (Réunion)", + "fr_RW": "francia (Ruanda)", + "fr_SC": "francia (Seychelle-szigetek)", + "fr_SN": "francia (Szenegál)", + "fr_SY": "francia (Szíria)", + "fr_TD": "francia (Csád)", + "fr_TG": "francia (Togo)", + "fr_TN": "francia (Tunézia)", + "fr_VU": "francia (Vanuatu)", + "fr_WF": "francia (Wallis és Futuna)", + "fr_YT": "francia (Mayotte)", + "fy": "nyugati fríz", + "fy_NL": "nyugati fríz (Hollandia)", + "ga": "ír", + "ga_IE": "ír (Ãrország)", + "gd": "skóciai kelta", + "gd_GB": "skóciai kelta (Egyesült Királyság)", + "gl": "gallego", + "gl_ES": "gallego (Spanyolország)", + "gu": "gudzsaráti", + "gu_IN": "gudzsaráti (India)", + "gv": "man-szigeti", + "gv_IM": "man-szigeti (Man-sziget)", + "ha": "hausza", + "ha_GH": "hausza (Ghána)", + "ha_NE": "hausza (Niger)", + "ha_NG": "hausza (Nigéria)", + "he": "héber", + "he_IL": "héber (Izrael)", + "hi": "hindi", + "hi_IN": "hindi (India)", + "hr": "horvát", + "hr_BA": "horvát (Bosznia-Hercegovina)", + "hr_HR": "horvát (Horvátország)", + "hu": "magyar", + "hu_HU": "magyar (Magyarország)", + "hy": "örmény", + "hy_AM": "örmény (Örményország)", + "id": "indonéz", + "id_ID": "indonéz (Indonézia)", + "ig": "igbó", + "ig_NG": "igbó (Nigéria)", + "ii": "szecsuán ji", + "ii_CN": "szecsuán ji (Kína)", + "is": "izlandi", + "is_IS": "izlandi (Izland)", + "it": "olasz", + "it_CH": "olasz (Svájc)", + "it_IT": "olasz (Olaszország)", + "it_SM": "olasz (San Marino)", + "ja": "japán", + "ja_JP": "japán (Japán)", + "ka": "grúz", + "ka_GE": "grúz (Grúzia)", + "ki": "kikuju", + "ki_KE": "kikuju (Kenya)", + "kk": "kazah", + "kk_KZ": "kazah (Kazahsztán)", + "kl": "grönlandi", + "kl_GL": "grönlandi (Grönland)", + "km": "khmer", + "km_KH": "khmer (Kambodzsa)", + "kn": "kannada", + "kn_IN": "kannada (India)", + "ko": "koreai", + "ko_KP": "koreai (Észak-Korea)", + "ko_KR": "koreai (Dél-Korea)", + "ks": "kasmíri", + "ks_IN": "kasmíri (India)", + "kw": "korni", + "kw_GB": "korni (Egyesült Királyság)", + "ky": "kirgiz", + "ky_KG": "kirgiz (Kirgizisztán)", + "lb": "luxemburgi", + "lb_LU": "luxemburgi (Luxemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongó - Kinshasa)", + "ln_CF": "lingala (Közép-afrikai Köztársaság)", + "ln_CG": "lingala (Kongó - Brazzaville)", + "lo": "lao", + "lo_LA": "lao (Laosz)", + "lt": "litván", + "lt_LT": "litván (Litvánia)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Kongó - Kinshasa)", + "lv": "lett", + "lv_LV": "lett (Lettország)", + "mg": "malgas", + "mg_MG": "malgas (Madagaszkár)", + "mk": "macedón", + "mk_MK": "macedón (Macedónia)", + "ml": "malajálam", + "ml_IN": "malajálam (India)", + "mn": "mongol", + "mn_MN": "mongol (Mongólia)", + "mr": "maráthi", + "mr_IN": "maráthi (India)", + "ms": "maláj", + "ms_BN": "maláj (Brunei)", + "ms_MY": "maláj (Malajzia)", + "ms_SG": "maláj (Szingapúr)", + "mt": "máltai", + "mt_MT": "máltai (Málta)", + "my": "burmai", + "my_MM": "burmai (Mianmar (Burma))", + "nb": "norvég (bokmál)", + "nb_NO": "norvég (Norvégia)", + "nb_SJ": "norvég (Svalbard és Jan Mayen)", + "nd": "északi ndebele", + "nd_ZW": "északi ndebele (Zimbabwe)", + "ne": "nepáli", + "ne_IN": "nepáli (India)", + "ne_NP": "nepáli (Nepál)", + "nl": "holland", + "nl_AW": "holland (Aruba)", + "nl_BE": "holland (Belgium)", + "nl_BQ": "holland (Holland Karib-térség)", + "nl_CW": "holland (Curaçao)", + "nl_NL": "holland (Hollandia)", + "nl_SR": "holland (Suriname)", + "nl_SX": "holland (Sint Maarten)", + "nn": "norvég (nynrosk)", + "nn_NO": "norvég (Norvégia)", + "no": "norvég", + "no_NO": "norvég (Norvégia)", + "om": "oromo", + "om_ET": "oromo (Etiópia)", + "om_KE": "oromo (Kenya)", + "or": "odia", + "or_IN": "odia (India)", + "os": "oszét", + "os_GE": "oszét (Grúzia)", + "os_RU": "oszét (Oroszország)", + "pa": "pandzsábi", + "pa_Arab": "pandzsábi (Arab)", + "pa_Arab_PK": "pandzsábi (Arab, Pakisztán)", + "pa_Guru": "pandzsábi (Gurmuki)", + "pa_Guru_IN": "pandzsábi (Gurmuki, India)", + "pa_IN": "pandzsábi (India)", + "pa_PK": "pandzsábi (Pakisztán)", + "pl": "lengyel", + "pl_PL": "lengyel (Lengyelország)", + "ps": "pastu", + "ps_AF": "pastu (Afganisztán)", + "pt": "portugál", + "pt_AO": "portugál (Angola)", + "pt_BR": "portugál (Brazília)", + "pt_CH": "portugál (Svájc)", + "pt_CV": "portugál (Zöld-foki Köztársaság)", + "pt_GQ": "portugál (EgyenlítÅ‘i-Guinea)", + "pt_GW": "portugál (Bissau-Guinea)", + "pt_LU": "portugál (Luxemburg)", + "pt_MO": "portugál (Makaó KKT)", + "pt_MZ": "portugál (Mozambik)", + "pt_PT": "portugál (Portugália)", + "pt_ST": "portugál (Sao Tomé és Príncipe)", + "pt_TL": "portugál (Kelet-Timor)", + "qu": "kecsua", + "qu_BO": "kecsua (Bolívia)", + "qu_EC": "kecsua (Ecuador)", + "qu_PE": "kecsua (Peru)", + "rm": "rétoromán", + "rm_CH": "rétoromán (Svájc)", + "rn": "kirundi", + "rn_BI": "kirundi (Burundi)", + "ro": "román", + "ro_MD": "román (Moldova)", + "ro_RO": "román (Románia)", + "ru": "orosz", + "ru_BY": "orosz (Belarusz)", + "ru_KG": "orosz (Kirgizisztán)", + "ru_KZ": "orosz (Kazahsztán)", + "ru_MD": "orosz (Moldova)", + "ru_RU": "orosz (Oroszország)", + "ru_UA": "orosz (Ukrajna)", + "rw": "kinyarvanda", + "rw_RW": "kinyarvanda (Ruanda)", + "se": "északi számi", + "se_FI": "északi számi (Finnország)", + "se_NO": "északi számi (Norvégia)", + "se_SE": "északi számi (Svédország)", + "sg": "szangó", + "sg_CF": "szangó (Közép-afrikai Köztársaság)", + "sh": "szerbhorvát", + "sh_BA": "szerbhorvát (Bosznia-Hercegovina)", + "si": "szingaléz", + "si_LK": "szingaléz (Srí Lanka)", + "sk": "szlovák", + "sk_SK": "szlovák (Szlovákia)", + "sl": "szlovén", + "sl_SI": "szlovén (Szlovénia)", + "sn": "sona", + "sn_ZW": "sona (Zimbabwe)", + "so": "szomáli", + "so_DJ": "szomáli (Dzsibuti)", + "so_ET": "szomáli (Etiópia)", + "so_KE": "szomáli (Kenya)", + "so_SO": "szomáli (Szomália)", + "sq": "albán", + "sq_AL": "albán (Albánia)", + "sq_MK": "albán (Macedónia)", + "sq_XK": "albán (Koszovó)", + "sr": "szerb", + "sr_BA": "szerb (Bosznia-Hercegovina)", + "sr_Cyrl": "szerb (Cirill)", + "sr_Cyrl_BA": "szerb (Cirill, Bosznia-Hercegovina)", + "sr_Cyrl_ME": "szerb (Cirill, Montenegró)", + "sr_Cyrl_RS": "szerb (Cirill, Szerbia)", + "sr_Cyrl_XK": "szerb (Cirill, Koszovó)", + "sr_Latn": "szerb (Latin)", + "sr_Latn_BA": "szerb (Latin, Bosznia-Hercegovina)", + "sr_Latn_ME": "szerb (Latin, Montenegró)", + "sr_Latn_RS": "szerb (Latin, Szerbia)", + "sr_Latn_XK": "szerb (Latin, Koszovó)", + "sr_ME": "szerb (Montenegró)", + "sr_RS": "szerb (Szerbia)", + "sr_XK": "szerb (Koszovó)", + "sv": "svéd", + "sv_AX": "svéd (Ã…land-szigetek)", + "sv_FI": "svéd (Finnország)", + "sv_SE": "svéd (Svédország)", + "sw": "szuahéli", + "sw_CD": "szuahéli (Kongó - Kinshasa)", + "sw_KE": "szuahéli (Kenya)", + "sw_TZ": "szuahéli (Tanzánia)", + "sw_UG": "szuahéli (Uganda)", + "ta": "tamil", + "ta_IN": "tamil (India)", + "ta_LK": "tamil (Srí Lanka)", + "ta_MY": "tamil (Malajzia)", + "ta_SG": "tamil (Szingapúr)", + "te": "telugu", + "te_IN": "telugu (India)", + "th": "thai", + "th_TH": "thai (Thaiföld)", + "ti": "tigrinya", + "ti_ER": "tigrinya (Eritrea)", + "ti_ET": "tigrinya (Etiópia)", + "tl": "tagalog", + "tl_PH": "tagalog (Fülöp-szigetek)", + "to": "tongai", + "to_TO": "tongai (Tonga)", + "tr": "török", + "tr_CY": "török (Ciprus)", + "tr_TR": "török (Törökország)", + "ug": "ujgur", + "ug_CN": "ujgur (Kína)", + "uk": "ukrán", + "uk_UA": "ukrán (Ukrajna)", + "ur": "urdu", + "ur_IN": "urdu (India)", + "ur_PK": "urdu (Pakisztán)", + "uz": "üzbég", + "uz_AF": "üzbég (Afganisztán)", + "uz_Arab": "üzbég (Arab)", + "uz_Arab_AF": "üzbég (Arab, Afganisztán)", + "uz_Cyrl": "üzbég (Cirill)", + "uz_Cyrl_UZ": "üzbég (Cirill, Üzbegisztán)", + "uz_Latn": "üzbég (Latin)", + "uz_Latn_UZ": "üzbég (Latin, Üzbegisztán)", + "uz_UZ": "üzbég (Üzbegisztán)", + "vi": "vietnami", + "vi_VN": "vietnami (Vietnam)", + "yi": "jiddis", + "yo": "joruba", + "yo_BJ": "joruba (Benin)", + "yo_NG": "joruba (Nigéria)", + "zh": "kínai", + "zh_CN": "kínai (Kína)", + "zh_HK": "kínai (Hongkong KKT)", + "zh_Hans": "kínai (Egyszerűsített)", + "zh_Hans_CN": "kínai (Egyszerűsített, Kína)", + "zh_Hans_HK": "kínai (Egyszerűsített, Hongkong KKT)", + "zh_Hans_MO": "kínai (Egyszerűsített, Makaó KKT)", + "zh_Hans_SG": "kínai (Egyszerűsített, Szingapúr)", + "zh_Hant": "kínai (Hagyományos)", + "zh_Hant_HK": "kínai (Hagyományos, Hongkong KKT)", + "zh_Hant_MO": "kínai (Hagyományos, Makaó KKT)", + "zh_Hant_TW": "kínai (Hagyományos, Tajvan)", + "zh_MO": "kínai (Makaó KKT)", + "zh_SG": "kínai (Szingapúr)", + "zh_TW": "kínai (Tajvan)", + "zu": "zulu", + "zu_ZA": "zulu (Dél-afrikai Köztársaság)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/hy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/hy.json new file mode 100644 index 0000000000000000000000000000000000000000..8466eae792d20e49a9909414340aa756672259a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/hy.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Õ¡Ö†Ö€Õ«Õ¯Õ¡Õ¡Õ¶Õ½", + "af_NA": "Õ¡Ö†Ö€Õ«Õ¯Õ¡Õ¡Õ¶Õ½ (Õ†Õ¡Õ´Õ«Õ¢Õ«Õ¡)", + "af_ZA": "Õ¡Ö†Ö€Õ«Õ¯Õ¡Õ¡Õ¶Õ½ (Õ€Õ¡Ö€Õ¡Õ¾Õ¡Ö†Ö€Õ«Õ¯ÕµÕ¡Õ¶ Õ€Õ¡Õ¶Ö€Õ¡ÕºÕ¥Õ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶)", + "ak": "Õ¡Ö„Õ¡Õ¶", + "ak_GH": "Õ¡Ö„Õ¡Õ¶ (Ô³Õ¡Õ¶Õ¡)", + "am": "Õ¡Õ´Õ°Õ¡Ö€Õ¥Ö€Õ¥Õ¶", + "am_ET": "Õ¡Õ´Õ°Õ¡Ö€Õ¥Ö€Õ¥Õ¶ (ÔµÕ©Õ¸Õ¾ÕºÕ«Õ¡)", + "ar": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶", + "ar_AE": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Ô±Ö€Õ¡Õ¢Õ¡Õ¯Õ¡Õ¶ Õ„Õ«Õ¡ÖÕµÕ¡Õ¬ Ô·Õ´Õ«Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€)", + "ar_BH": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Ô²Õ¡Õ°Ö€Õ¥ÕµÕ¶)", + "ar_DJ": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ‹Õ«Õ¢Õ¸Ö‚Õ©Õ«)", + "ar_DZ": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Ô±Õ¬ÕªÕ«Ö€)", + "ar_EG": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (ÔµÕ£Õ«ÕºÕ¿Õ¸Õ½)", + "ar_EH": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Ô±Ö€Ö‡Õ´Õ¿ÕµÕ¡Õ¶ ÕÕ¡Õ°Õ¡Ö€Õ¡)", + "ar_ER": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Ô·Ö€Õ«Õ©Ö€Õ¥Õ¡)", + "ar_IL": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Ô»Õ½Ö€Õ¡ÕµÕ¥Õ¬)", + "ar_IQ": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Ô»Ö€Õ¡Ö„)", + "ar_JO": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ€Õ¸Ö€Õ¤Õ¡Õ¶Õ¡Õ¶)", + "ar_KM": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¸Õ´Õ¸Ö€ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "ar_KW": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ”Õ¸Ö‚Õ¾Õ¥ÕµÕ©)", + "ar_LB": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Ô¼Õ«Õ¢Õ¡Õ¶Õ¡Õ¶)", + "ar_LY": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Ô¼Õ«Õ¢Õ«Õ¡)", + "ar_MA": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Ö€Õ¸Õ¯Õ¯Õ¸)", + "ar_MR": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¾Ö€Õ«Õ¿Õ¡Õ¶Õ«Õ¡)", + "ar_OM": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ•Õ´Õ¡Õ¶)", + "ar_PS": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (ÕŠÕ¡Õ²Õ¥Õ½Õ¿Õ«Õ¶ÕµÕ¡Õ¶ Õ¿Õ¡Ö€Õ¡Õ®Ö„Õ¶Õ¥Ö€)", + "ar_QA": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¡Õ¿Õ¡Ö€)", + "ar_SA": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (ÕÕ¡Õ¸Ö‚Õ¤ÕµÕ¡Õ¶ Ô±Ö€Õ¡Õ¢Õ«Õ¡)", + "ar_SD": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Ö‚Õ¤Õ¡Õ¶)", + "ar_SO": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Õ´Õ¡Õ¬Õ«)", + "ar_SS": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ€Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ ÕÕ¸Ö‚Õ¤Õ¡Õ¶)", + "ar_SY": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (ÕÕ«Ö€Õ«Õ¡)", + "ar_TD": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ‰Õ¡Õ¤)", + "ar_TN": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Ô¹Õ¸Ö‚Õ¶Õ«Õ½)", + "ar_YE": "Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (ÔµÕ´Õ¥Õ¶)", + "as": "Õ¡Õ½Õ¡Õ´Õ¥Ö€Õ¥Õ¶", + "as_IN": "Õ¡Õ½Õ¡Õ´Õ¥Ö€Õ¥Õ¶ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "az": "Õ¡Õ¤Ö€Õ¢Õ¥Õ»Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "az_AZ": "Õ¡Õ¤Ö€Õ¢Õ¥Õ»Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô±Õ¤Ö€Õ¢Õ¥Õ»Õ¡Õ¶)", + "az_Cyrl": "Õ¡Õ¤Ö€Õ¢Õ¥Õ»Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ¯ÕµÕ¸Ö‚Ö€Õ¥Õ²Õ¡Õ£Õ«Ö€)", + "az_Cyrl_AZ": "Õ¡Õ¤Ö€Õ¢Õ¥Õ»Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ¯ÕµÕ¸Ö‚Ö€Õ¥Õ²Õ¡Õ£Õ«Ö€, Ô±Õ¤Ö€Õ¢Õ¥Õ»Õ¡Õ¶)", + "az_Latn": "Õ¡Õ¤Ö€Õ¢Õ¥Õ»Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶)", + "az_Latn_AZ": "Õ¡Õ¤Ö€Õ¢Õ¥Õ»Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, Ô±Õ¤Ö€Õ¢Õ¥Õ»Õ¡Õ¶)", + "be": "Õ¢Õ¥Õ¬Õ¡Õ¼Õ¸Ö‚Õ½Õ¥Ö€Õ¥Õ¶", + "be_BY": "Õ¢Õ¥Õ¬Õ¡Õ¼Õ¸Ö‚Õ½Õ¥Ö€Õ¥Õ¶ (Ô²Õ¥Õ¬Õ¡Õ¼Õ¸Ö‚Õ½)", + "bg": "Õ¢Õ¸Ö‚Õ¬Õ²Õ¡Ö€Õ¥Ö€Õ¥Õ¶", + "bg_BG": "Õ¢Õ¸Ö‚Õ¬Õ²Õ¡Ö€Õ¥Ö€Õ¥Õ¶ (Ô²Õ¸Ö‚Õ¬Õ²Õ¡Ö€Õ«Õ¡)", + "bm": "Õ¢Õ¡Õ´Õ¢Õ¡Ö€Õ¡", + "bm_ML": "Õ¢Õ¡Õ´Õ¢Õ¡Ö€Õ¡ (Õ„Õ¡Õ¬Õ«)", + "bn": "Õ¢Õ¥Õ¶Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "bn_BD": "Õ¢Õ¥Õ¶Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Ô²Õ¡Õ¶Õ£Õ¬Õ¡Õ¤Õ¥Õ·)", + "bn_IN": "Õ¢Õ¥Õ¶Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "bo": "Õ¿Õ«Õ¢Õ¥Õ©Õ¥Ö€Õ¥Õ¶", + "bo_CN": "Õ¿Õ«Õ¢Õ¥Õ©Õ¥Ö€Õ¥Õ¶ (Õ‰Õ«Õ¶Õ¡Õ½Õ¿Õ¡Õ¶)", + "bo_IN": "Õ¿Õ«Õ¢Õ¥Õ©Õ¥Ö€Õ¥Õ¶ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "br": "Õ¢Ö€Õ¥Õ¿Õ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "br_FR": "Õ¢Ö€Õ¥Õ¿Õ¸Õ¶Õ¥Ö€Õ¥Õ¶ (Õ–Ö€Õ¡Õ¶Õ½Õ«Õ¡)", + "bs": "Õ¢Õ¸Õ½Õ¶Õ«Õ¥Ö€Õ¥Õ¶", + "bs_BA": "Õ¢Õ¸Õ½Õ¶Õ«Õ¥Ö€Õ¥Õ¶ (Ô²Õ¸Õ½Õ¶Õ«Õ¡ Ö‡ Õ€Õ¥Ö€ÖÕ¥Õ£Õ¸Õ¾Õ«Õ¶Õ¡)", + "bs_Cyrl": "Õ¢Õ¸Õ½Õ¶Õ«Õ¥Ö€Õ¥Õ¶ (Õ¯ÕµÕ¸Ö‚Ö€Õ¥Õ²Õ¡Õ£Õ«Ö€)", + "bs_Cyrl_BA": "Õ¢Õ¸Õ½Õ¶Õ«Õ¥Ö€Õ¥Õ¶ (Õ¯ÕµÕ¸Ö‚Ö€Õ¥Õ²Õ¡Õ£Õ«Ö€, Ô²Õ¸Õ½Õ¶Õ«Õ¡ Ö‡ Õ€Õ¥Ö€ÖÕ¥Õ£Õ¸Õ¾Õ«Õ¶Õ¡)", + "bs_Latn": "Õ¢Õ¸Õ½Õ¶Õ«Õ¥Ö€Õ¥Õ¶ (Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶)", + "bs_Latn_BA": "Õ¢Õ¸Õ½Õ¶Õ«Õ¥Ö€Õ¥Õ¶ (Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, Ô²Õ¸Õ½Õ¶Õ«Õ¡ Ö‡ Õ€Õ¥Ö€ÖÕ¥Õ£Õ¸Õ¾Õ«Õ¶Õ¡)", + "ca": "Õ¯Õ¡Õ¿Õ¡Õ¬Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "ca_AD": "Õ¯Õ¡Õ¿Õ¡Õ¬Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô±Õ¶Õ¤Õ¸Ö€Ö€Õ¡)", + "ca_ES": "Õ¯Õ¡Õ¿Õ¡Õ¬Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô»Õ½ÕºÕ¡Õ¶Õ«Õ¡)", + "ca_FR": "Õ¯Õ¡Õ¿Õ¡Õ¬Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ–Ö€Õ¡Õ¶Õ½Õ«Õ¡)", + "ca_IT": "Õ¯Õ¡Õ¿Õ¡Õ¬Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô»Õ¿Õ¡Õ¬Õ«Õ¡)", + "ce": "Õ¹Õ¥Õ¹Õ¥Õ¶Õ¥Ö€Õ¥Õ¶", + "ce_RU": "Õ¹Õ¥Õ¹Õ¥Õ¶Õ¥Ö€Õ¥Õ¶ (Ռուսաստան)", + "cs": "Õ¹Õ¥Õ­Õ¥Ö€Õ¥Õ¶", + "cs_CZ": "Õ¹Õ¥Õ­Õ¥Ö€Õ¥Õ¶ (Õ‰Õ¥Õ­Õ«Õ¡)", + "cy": "Õ¸Ö‚Õ¥Õ¬Õ½Õ¥Ö€Õ¥Õ¶", + "cy_GB": "Õ¸Ö‚Õ¥Õ¬Õ½Õ¥Ö€Õ¥Õ¶ (Õ„Õ«Õ¡ÖÕµÕ¡Õ¬ Ô¹Õ¡Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶)", + "da": "Õ¤Õ¡Õ¶Õ«Õ¥Ö€Õ¥Õ¶", + "da_DK": "Õ¤Õ¡Õ¶Õ«Õ¥Ö€Õ¥Õ¶ (Ô´Õ¡Õ¶Õ«Õ¡)", + "da_GL": "Õ¤Õ¡Õ¶Õ«Õ¥Ö€Õ¥Õ¶ (Ô³Ö€Õ¥Õ¶Õ¬Õ¡Õ¶Õ¤Õ«Õ¡)", + "de": "Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "de_AT": "Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô±Õ¾Õ½Õ¿Ö€Õ«Õ¡)", + "de_BE": "Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô²Õ¥Õ¬Õ£Õ«Õ¡)", + "de_CH": "Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ‡Õ¾Õ¥ÕµÖÕ¡Ö€Õ«Õ¡)", + "de_DE": "Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô³Õ¥Ö€Õ´Õ¡Õ¶Õ«Õ¡)", + "de_IT": "Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô»Õ¿Õ¡Õ¬Õ«Õ¡)", + "de_LI": "Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô¼Õ«Õ­Õ¿Õ¥Õ¶Õ·Õ¿Õ¥ÕµÕ¶)", + "de_LU": "Õ£Õ¥Ö€Õ´Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô¼ÕµÕ¸Ö‚Ö„Õ½Õ¥Õ´Õ¢Õ¸Ö‚Ö€Õ£)", + "dz": "Õ»Õ¸Õ¶Õ£Ö„Õ°Õ¡", + "dz_BT": "Õ»Õ¸Õ¶Õ£Ö„Õ°Õ¡ (Ô²Õ¸Ö‚Õ©Õ¡Õ¶)", + "ee": "Õ§Õ¾Õ¥", + "ee_GH": "Õ§Õ¾Õ¥ (Ô³Õ¡Õ¶Õ¡)", + "ee_TG": "Õ§Õ¾Õ¥ (ÕÕ¸Õ£Õ¸)", + "el": "Õ°Õ¸Ö‚Õ¶Õ¡Ö€Õ¥Õ¶", + "el_CY": "Õ°Õ¸Ö‚Õ¶Õ¡Ö€Õ¥Õ¶ (Ô¿Õ«ÕºÖ€Õ¸Õ½)", + "el_GR": "Õ°Õ¸Ö‚Õ¶Õ¡Ö€Õ¥Õ¶ (Õ€Õ¸Ö‚Õ¶Õ¡Õ½Õ¿Õ¡Õ¶)", + "en": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶", + "en_AG": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô±Õ¶Õ¿Õ«Õ£Õ¸Ö‚Õ¡ Ö‡ Ô²Õ¡Ö€Õ¢Õ¸Ö‚Õ¤Õ¡)", + "en_AI": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô±Õ¶Õ£Õ¸Ö‚Õ«Õ¬Õ¡)", + "en_AS": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô±Õ´Õ¥Ö€Õ«Õ¯ÕµÕ¡Õ¶ ÕÕ¡Õ´Õ¸Õ¡)", + "en_AT": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô±Õ¾Õ½Õ¿Ö€Õ«Õ¡)", + "en_AU": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô±Õ¾Õ½Õ¿Ö€Õ¡Õ¬Õ«Õ¡)", + "en_BB": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô²Õ¡Ö€Õ¢Õ¡Õ¤Õ¸Õ½)", + "en_BE": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô²Õ¥Õ¬Õ£Õ«Õ¡)", + "en_BI": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô²Õ¸Ö‚Ö€Õ¸Ö‚Õ¶Õ¤Õ«)", + "en_BM": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô²Õ¥Ö€Õ´Õ¸Ö‚Õ¤Õ¶Õ¥Ö€)", + "en_BS": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô²Õ¡Õ°Õ¡Õ´Õ¡Õ¶Õ¥Ö€)", + "en_BW": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô²Õ¸Õ©Õ½Õ¾Õ¡Õ¶Õ¡)", + "en_BZ": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô²Õ¥Õ¬Õ«Õ¦)", + "en_CA": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¡Õ¶Õ¡Õ¤Õ¡)", + "en_CC": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¸Õ¯Õ¸Õ½ÕµÕ¡Õ¶ (Õ”Õ«Õ¬Õ«Õ¶Õ£) Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "en_CH": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ‡Õ¾Õ¥ÕµÖÕ¡Ö€Õ«Õ¡)", + "en_CK": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¸Ö‚Õ¯Õ« Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "en_CM": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¡Õ´Õ¥Ö€Õ¸Ö‚Õ¶)", + "en_CX": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Ö‚Ö€Õ¢ Ô¾Õ¶Õ¶Õ¤ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«)", + "en_CY": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¿Õ«ÕºÖ€Õ¸Õ½)", + "en_DE": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô³Õ¥Ö€Õ´Õ¡Õ¶Õ«Õ¡)", + "en_DG": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô´Õ«Õ¥Õ£Õ¸ Ô³Õ¡Ö€Õ½Õ«Õ¡)", + "en_DK": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô´Õ¡Õ¶Õ«Õ¡)", + "en_DM": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô´Õ¸Õ´Õ«Õ¶Õ«Õ¯Õ¡)", + "en_ER": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô·Ö€Õ«Õ©Ö€Õ¥Õ¡)", + "en_FI": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ–Õ«Õ¶Õ¬Õ¡Õ¶Õ¤Õ«Õ¡)", + "en_FJ": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ–Õ«Õ»Õ«)", + "en_FK": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ–Õ¸Õ¬Ö„Õ¬Õ¥Õ¶Õ¤ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "en_FM": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ«Õ¯Ö€Õ¸Õ¶Õ¥Õ¦Õ«Õ¡)", + "en_GB": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ«Õ¡ÖÕµÕ¡Õ¬ Ô¹Õ¡Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶)", + "en_GD": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô³Ö€Õ¥Õ¶Õ¡Õ¤Õ¡)", + "en_GG": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô³Õ¥Ö€Õ¶Õ½Õ«)", + "en_GH": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô³Õ¡Õ¶Õ¡)", + "en_GI": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ‹Õ«Õ¢Ö€Õ¡Õ¬Õ©Õ¡Ö€)", + "en_GM": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô³Õ¡Õ´Õ¢Õ«Õ¡)", + "en_GU": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô³Õ¸Ö‚Õ¡Õ´)", + "en_GY": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô³Õ¡ÕµÕ¡Õ¶Õ¡)", + "en_HK": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ€Õ¸Õ¶Õ¯Õ¸Õ¶Õ£Õ« Õ€ÕŽÕ‡)", + "en_IE": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô»Õ¼Õ¬Õ¡Õ¶Õ¤Õ«Õ¡)", + "en_IL": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô»Õ½Ö€Õ¡ÕµÕ¥Õ¬)", + "en_IM": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ¥Õ¶ Õ¯Õ²Õ¦Õ«)", + "en_IN": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "en_IO": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô²Ö€Õ«Õ¿Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ ÕÕ¡Ö€Õ¡Õ®Ö„ Õ€Õ¶Õ¤Õ¯Õ¡Õ¯Õ¡Õ¶ Õ•Õ¾Õ¯Õ«Õ¡Õ¶Õ¸Õ½Õ¸Ö‚Õ´)", + "en_JE": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ‹Õ¥Ö€Õ½Õ«)", + "en_JM": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕƒÕ¡Õ´Õ¡ÕµÕ¯Õ¡)", + "en_KE": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ”Õ¥Õ¶Õ«Õ¡)", + "en_KI": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¿Õ«Ö€Õ«Õ¢Õ¡Õ¿Õ«)", + "en_KN": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¥Õ¶Õ¿ Õ”Õ«Õ¿Õ½ Ö‡ Õ†Ö‡Õ«Õ½)", + "en_KY": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¡ÕµÕ´Õ¡Õ¶ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "en_LC": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¥Õ¶Õ© Ô¼ÕµÕ¸Ö‚Õ½Õ«Õ¡)", + "en_LR": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¼Õ«Õ¢Õ¥Ö€Õ«Õ¡)", + "en_LS": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¼Õ¥Õ½Õ¸Õ¿Õ¸)", + "en_MG": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¤Õ¡Õ£Õ¡Õ½Õ¯Õ¡Ö€)", + "en_MH": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Ö€Õ·Õ¡Õ¬ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "en_MO": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ‰Õ«Õ¶Õ¡Õ½Õ¿Õ¡Õ¶Õ« Õ„Õ¡Õ¯Õ¡Õ¸ Õ€ÕŽÕ‡)", + "en_MP": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ€ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Õ„Õ¡Ö€Õ«Õ¡Õ¶ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "en_MS": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ¸Õ¶Õ½Õ¥Õ¼Õ¡Õ¿)", + "en_MT": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¬Õ©Õ¡)", + "en_MU": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¾Ö€Õ«Õ¯Õ«Õ¸Õ½)", + "en_MW": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¬Õ¡Õ¾Õ«)", + "en_MY": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¬Õ¡ÕµÕ¦Õ«Õ¡)", + "en_NA": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ†Õ¡Õ´Õ«Õ¢Õ«Õ¡)", + "en_NF": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ†Õ¸Ö€Ö†Õ¸Õ¬Õ¯ Õ¯Õ²Õ¦Õ«)", + "en_NG": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ†Õ«Õ£Õ¥Ö€Õ«Õ¡)", + "en_NL": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ†Õ«Õ¤Õ¥Õ¼Õ¬Õ¡Õ¶Õ¤Õ¶Õ¥Ö€)", + "en_NR": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ†Õ¡Õ¸Ö‚Ö€Õ¸Ö‚)", + "en_NU": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ†Õ«Õ¸Ö‚Õ¥)", + "en_NZ": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ†Õ¸Ö€ Ô¶Õ¥Õ¬Õ¡Õ¶Õ¤Õ«Õ¡)", + "en_PG": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕŠÕ¡ÕºÕ¸Ö‚Õ¡ Õ†Õ¸Ö€ Ô³Õ¾Õ«Õ¶Õ¥Õ¡)", + "en_PH": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ–Õ«Õ¬Õ«ÕºÕ«Õ¶Õ¶Õ¥Ö€)", + "en_PK": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕŠÕ¡Õ¯Õ«Õ½Õ¿Õ¡Õ¶)", + "en_PN": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕŠÕ«Õ¿Õ¯Õ¥Õ¼Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "en_PR": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕŠÕ¸Ö‚Õ¥Ö€Õ¿Õ¸ Ռիկո)", + "en_PW": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕŠÕ¡Õ¬Õ¡Õ¸Ö‚)", + "en_RW": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ռուանդա)", + "en_SB": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Õ²Õ¸Õ´Õ¸Õ¶ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "en_SC": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¥ÕµÕ·Õ¥Õ¬Õ¶Õ¥Ö€)", + "en_SD": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Ö‚Õ¤Õ¡Õ¶)", + "en_SE": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ‡Õ¾Õ¥Õ¤Õ«Õ¡)", + "en_SG": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ«Õ¶Õ£Õ¡ÕºÕ¸Ö‚Ö€)", + "en_SH": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Ö‚Ö€Õ¢ Õ€Õ¥Õ²Õ«Õ¶Õ¥Õ« Õ¯Õ²Õ¦Õ«)", + "en_SI": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¬Õ¸Õ¾Õ¥Õ¶Õ«Õ¡)", + "en_SL": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ«Õ¥Õ¼Õ¡ Ô¼Õ¥Õ¸Õ¶Õ¥)", + "en_SS": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ€Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ ÕÕ¸Ö‚Õ¤Õ¡Õ¶)", + "en_SX": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ«Õ¶Õ¿ Õ„Õ¡Ö€Õ¿Õ¥Õ¶)", + "en_SZ": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¾Õ¡Õ¦Õ«Õ¬Õ¥Õ¶Õ¤)", + "en_TC": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¹Õ¨Ö€Ö„Õ½ Ö‡ Ô¿Õ¡ÕµÕ¯Õ¸Õ½ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "en_TK": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Õ¯Õ¥Õ¬Õ¡Õ¸Ö‚)", + "en_TO": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Õ¶Õ£Õ¡)", + "en_TT": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÖ€Õ«Õ¶Õ«Õ¤Õ¡Õ¤ Ö‡ ÕÕ¸Õ¢Õ¡Õ£Õ¸)", + "en_TV": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Ö‚Õ¾Õ¡Õ¬Õ¸Ö‚)", + "en_TZ": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¡Õ¶Õ¦Õ¡Õ¶Õ«Õ¡)", + "en_UG": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕˆÖ‚Õ£Õ¡Õ¶Õ¤Õ¡)", + "en_UM": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô±Ö€Õ¿Õ¡Ö„Õ«Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€ (Ô±Õ„Õ†))", + "en_US": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ«Õ¡ÖÕµÕ¡Õ¬ Õ†Õ¡Õ°Õ¡Õ¶Õ£Õ¶Õ¥Ö€)", + "en_VC": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¥Õ¶Õ© ÕŽÕ«Õ¶Õ½Õ¥Õ¶Õ© Ö‡ Ô³Ö€Õ¥Õ¶Õ¡Õ¤Õ«Õ¶Õ¶Õ¥Ö€)", + "en_VG": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô²Ö€Õ«Õ¿Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ ÕŽÕ«Ö€Õ»Õ«Õ¶ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "en_VI": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô±Õ„Õ† ÕŽÕ«Ö€Õ»Õ«Õ¶ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "en_VU": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕŽÕ¡Õ¶Õ¸Ö‚Õ¡Õ¿Õ¸Ö‚)", + "en_WS": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¡Õ´Õ¸Õ¡)", + "en_ZA": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Õ€Õ¡Ö€Õ¡Õ¾Õ¡Ö†Ö€Õ«Õ¯ÕµÕ¡Õ¶ Õ€Õ¡Õ¶Ö€Õ¡ÕºÕ¥Õ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶)", + "en_ZM": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¶Õ¡Õ´Õ¢Õ«Õ¡)", + "en_ZW": "Õ¡Õ¶Õ£Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¶Õ«Õ´Õ¢Õ¡Õ¢Õ¾Õ¥)", + "eo": "Õ§Õ½ÕºÕ¥Ö€Õ¡Õ¶Õ¿Õ¸", + "es": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "es_AR": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô±Ö€Õ£Õ¥Õ¶Õ¿Õ«Õ¶Õ¡)", + "es_BO": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô²Õ¸Õ¬Õ«Õ¾Õ«Õ¡)", + "es_BR": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô²Ö€Õ¡Õ¦Õ«Õ¬Õ«Õ¡)", + "es_CL": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ‰Õ«Õ¬Õ«)", + "es_CO": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¸Õ¬Õ¸Ö‚Õ´Õ¢Õ«Õ¡)", + "es_CR": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¸Õ½Õ¿Õ¡ Ռիկա)", + "es_CU": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¸Ö‚Õ¢Õ¡)", + "es_DO": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô´Õ¸Õ´Õ«Õ¶Õ«Õ¯ÕµÕ¡Õ¶ Õ€Õ¡Õ¶Ö€Õ¡ÕºÕ¥Õ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶)", + "es_EA": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (ÕÕ¥Õ¸Ö‚Õ¿Õ¡ Ö‡ Õ„Õ¥Õ¬Õ«Õ¬ÕµÕ¡)", + "es_EC": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô·Õ¯Õ¾Õ¡Õ¤Õ¸Ö€)", + "es_ES": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô»Õ½ÕºÕ¡Õ¶Õ«Õ¡)", + "es_GQ": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ€Õ¡Õ½Õ¡Ö€Õ¡Õ¯Õ¡Õ®Õ¡ÕµÕ«Õ¶ Ô³Õ¾Õ«Õ¶Õ¥Õ¡)", + "es_GT": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô³Õ¾Õ¡Õ¿Õ¥Õ´Õ¡Õ¬Õ¡)", + "es_HN": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ€Õ¸Õ¶Õ¤Õ¸Ö‚Ö€Õ¡Õ½)", + "es_IC": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¡Õ¶Õ¡Ö€ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "es_MX": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ„Õ¥Ö„Õ½Õ«Õ¯Õ¡)", + "es_NI": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ†Õ«Õ¯Õ¡Ö€Õ¡Õ£Õ¸Ö‚Õ¡)", + "es_PA": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (ÕŠÕ¡Õ¶Õ¡Õ´Õ¡)", + "es_PE": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (ÕŠÕ¥Ö€Õ¸Ö‚)", + "es_PH": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ–Õ«Õ¬Õ«ÕºÕ«Õ¶Õ¶Õ¥Ö€)", + "es_PR": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (ÕŠÕ¸Ö‚Õ¥Ö€Õ¿Õ¸ Ռիկո)", + "es_PY": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (ÕŠÕ¡Ö€Õ¡Õ£Õ¾Õ¡Õµ)", + "es_SV": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (ÕÕ¡Õ¬Õ¾Õ¡Õ¤Õ¸Ö€)", + "es_US": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ„Õ«Õ¡ÖÕµÕ¡Õ¬ Õ†Õ¡Õ°Õ¡Õ¶Õ£Õ¶Õ¥Ö€)", + "es_UY": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (ÕˆÖ‚Ö€Õ¸Ö‚Õ£Õ¾Õ¡Õµ)", + "es_VE": "Õ«Õ½ÕºÕ¡Õ¶Õ¥Ö€Õ¥Õ¶ (ÕŽÕ¥Õ¶Õ¥Õ½Õ¸Ö‚Õ¥Õ¬Õ¡)", + "et": "Õ§Õ½Õ¿Õ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "et_EE": "Õ§Õ½Õ¿Õ¸Õ¶Õ¥Ö€Õ¥Õ¶ (Ô·Õ½Õ¿Õ¸Õ¶Õ«Õ¡)", + "eu": "Õ¢Õ¡Õ½Õ¯Õ¥Ö€Õ¥Õ¶", + "eu_ES": "Õ¢Õ¡Õ½Õ¯Õ¥Ö€Õ¥Õ¶ (Ô»Õ½ÕºÕ¡Õ¶Õ«Õ¡)", + "fa": "ÕºÕ¡Ö€Õ½Õ¯Õ¥Ö€Õ¥Õ¶", + "fa_AF": "ÕºÕ¡Ö€Õ½Õ¯Õ¥Ö€Õ¥Õ¶ (Ô±Ö†Õ²Õ¡Õ¶Õ½Õ¿Õ¡Õ¶)", + "fa_IR": "ÕºÕ¡Ö€Õ½Õ¯Õ¥Ö€Õ¥Õ¶ (Ô»Ö€Õ¡Õ¶)", + "ff": "Ö†Õ¸Ö‚Õ¬Õ¡Õ°", + "ff_CM": "Ö†Õ¸Ö‚Õ¬Õ¡Õ° (Ô¿Õ¡Õ´Õ¥Ö€Õ¸Ö‚Õ¶)", + "ff_GN": "Ö†Õ¸Ö‚Õ¬Õ¡Õ° (Ô³Õ¾Õ«Õ¶Õ¥Õ¡)", + "ff_MR": "Ö†Õ¸Ö‚Õ¬Õ¡Õ° (Õ„Õ¡Õ¾Ö€Õ«Õ¿Õ¡Õ¶Õ«Õ¡)", + "ff_SN": "Ö†Õ¸Ö‚Õ¬Õ¡Õ° (ÕÕ¥Õ¶Õ¥Õ£Õ¡Õ¬)", + "fi": "Ö†Õ«Õ¶Õ¶Õ¥Ö€Õ¥Õ¶", + "fi_FI": "Ö†Õ«Õ¶Õ¶Õ¥Ö€Õ¥Õ¶ (Õ–Õ«Õ¶Õ¬Õ¡Õ¶Õ¤Õ«Õ¡)", + "fo": "Ö†Õ¡Ö€ÕµÕ¸Ö€Õ¥Ö€Õ¥Õ¶", + "fo_DK": "Ö†Õ¡Ö€ÕµÕ¸Ö€Õ¥Ö€Õ¥Õ¶ (Ô´Õ¡Õ¶Õ«Õ¡)", + "fo_FO": "Ö†Õ¡Ö€ÕµÕ¸Ö€Õ¥Ö€Õ¥Õ¶ (Õ–Õ¡Ö€Õ¥Ö€ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "fr": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶", + "fr_BE": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô²Õ¥Õ¬Õ£Õ«Õ¡)", + "fr_BF": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô²Õ¸Ö‚Ö€Õ¯Õ«Õ¶Õ¡ Õ–Õ¡Õ½Õ¸)", + "fr_BI": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô²Õ¸Ö‚Ö€Õ¸Ö‚Õ¶Õ¤Õ«)", + "fr_BJ": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô²Õ¥Õ¶Õ«Õ¶)", + "fr_BL": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (ÕÕ¥Õ¶ Ô²Õ¡Ö€Õ¿Õ¥Õ¬Õ´Õ«)", + "fr_CA": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¡Õ¶Õ¡Õ¤Õ¡)", + "fr_CD": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¸Õ¶Õ£Õ¸ - Ô¿Õ«Õ¶Õ·Õ¡Õ½Õ¡)", + "fr_CF": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¥Õ¶Õ¿Ö€Õ¸Õ¶Õ¡Õ¯Õ¡Õ¶ Ô±Ö†Ö€Õ«Õ¯ÕµÕ¡Õ¶ Õ€Õ¡Õ¶Ö€Õ¡ÕºÕ¥Õ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶)", + "fr_CG": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¸Õ¶Õ£Õ¸ - Ô²Ö€Õ¡Õ¦Õ¡Õ¾Õ«Õ¬)", + "fr_CH": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ‡Õ¾Õ¥ÕµÖÕ¡Ö€Õ«Õ¡)", + "fr_CI": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¸Õ¿ դ’Իվուար)", + "fr_CM": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¡Õ´Õ¥Ö€Õ¸Ö‚Õ¶)", + "fr_DJ": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ‹Õ«Õ¢Õ¸Ö‚Õ©Õ«)", + "fr_DZ": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô±Õ¬ÕªÕ«Ö€)", + "fr_FR": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ–Ö€Õ¡Õ¶Õ½Õ«Õ¡)", + "fr_GA": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô³Õ¡Õ¢Õ¸Õ¶)", + "fr_GF": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ–Ö€Õ¡Õ¶Õ½Õ«Õ¡Õ¯Õ¡Õ¶ Ô³Õ¾Õ«Õ¡Õ¶Õ¡)", + "fr_GN": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô³Õ¾Õ«Õ¶Õ¥Õ¡)", + "fr_GP": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô³Õ¾Õ¡Õ¤Õ¥Õ¬Õ¸Ö‚ÕºÕ¡)", + "fr_GQ": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ€Õ¡Õ½Õ¡Ö€Õ¡Õ¯Õ¡Õ®Õ¡ÕµÕ«Õ¶ Ô³Õ¾Õ«Õ¶Õ¥Õ¡)", + "fr_HT": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ€Õ¡ÕµÕ«Õ©Õ«)", + "fr_KM": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¸Õ´Õ¸Ö€ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "fr_LU": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô¼ÕµÕ¸Ö‚Ö„Õ½Õ¥Õ´Õ¢Õ¸Ö‚Ö€Õ£)", + "fr_MA": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Ö€Õ¸Õ¯Õ¯Õ¸)", + "fr_MC": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ„Õ¸Õ¶Õ¡Õ¯Õ¸)", + "fr_MF": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (ÕÕ¥Õ¶ Õ„Õ¡Ö€Õ¿Õ¥Õ¶)", + "fr_MG": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¤Õ¡Õ£Õ¡Õ½Õ¯Õ¡Ö€)", + "fr_ML": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¬Õ«)", + "fr_MQ": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Ö€Õ¿Õ«Õ¶Õ«Õ¯Õ¡)", + "fr_MR": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¾Ö€Õ«Õ¿Õ¡Õ¶Õ«Õ¡)", + "fr_MU": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¾Ö€Õ«Õ¯Õ«Õ¸Õ½)", + "fr_NC": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ†Õ¸Ö€ Ô¿Õ¡Õ¬Õ¥Õ¤Õ¸Õ¶Õ«Õ¡)", + "fr_NE": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ†Õ«Õ£Õ¥Ö€)", + "fr_PF": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ–Ö€Õ¡Õ¶Õ½Õ«Õ¡Õ¯Õ¡Õ¶ ÕŠÕ¸Õ¬Õ«Õ¶Õ¥Õ¦Õ«Õ¡)", + "fr_PM": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (ÕÕ¥Õ¶ ÕŠÕ«Õ¥Õ¼ Ö‡ Õ„Õ«Ö„Õ¥Õ¬Õ¸Õ¶)", + "fr_RE": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ռեյունիոն)", + "fr_RW": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ռուանդա)", + "fr_SC": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (ÕÕ¥ÕµÕ·Õ¥Õ¬Õ¶Õ¥Ö€)", + "fr_SN": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (ÕÕ¥Õ¶Õ¥Õ£Õ¡Õ¬)", + "fr_SY": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (ÕÕ«Ö€Õ«Õ¡)", + "fr_TD": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ‰Õ¡Õ¤)", + "fr_TG": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Õ£Õ¸)", + "fr_TN": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Ô¹Õ¸Ö‚Õ¶Õ«Õ½)", + "fr_VU": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (ÕŽÕ¡Õ¶Õ¸Ö‚Õ¡Õ¿Õ¸Ö‚)", + "fr_WF": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (ÕˆÖ‚Õ¸Õ¬Õ«Õ½ Ö‡ Õ–Õ¸Ö‚Õ¿Õ¸Ö‚Õ¶Õ¡)", + "fr_YT": "Ö†Ö€Õ¡Õ¶Õ½Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡ÕµÕ¸Õ¿)", + "fy": "Õ¡Ö€Ö‡Õ´Õ¿Õ¡Ö†Ö€Õ«Õ¦Õ¥Ö€Õ¥Õ¶", + "fy_NL": "Õ¡Ö€Ö‡Õ´Õ¿Õ¡Ö†Ö€Õ«Õ¦Õ¥Ö€Õ¥Õ¶ (Õ†Õ«Õ¤Õ¥Õ¼Õ¬Õ¡Õ¶Õ¤Õ¶Õ¥Ö€)", + "ga": "Õ«Õ¼Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶", + "ga_IE": "Õ«Õ¼Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶ (Ô»Õ¼Õ¬Õ¡Õ¶Õ¤Õ«Õ¡)", + "gd": "Õ£Õ¡Õ¥Õ¬Õ¥Ö€Õ¥Õ¶", + "gd_GB": "Õ£Õ¡Õ¥Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ«Õ¡ÖÕµÕ¡Õ¬ Ô¹Õ¡Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶)", + "gl": "Õ£Õ¡Õ¬Õ«Õ½Õ¥Ö€Õ¥Õ¶", + "gl_ES": "Õ£Õ¡Õ¬Õ«Õ½Õ¥Ö€Õ¥Õ¶ (Ô»Õ½ÕºÕ¡Õ¶Õ«Õ¡)", + "gu": "Õ£Õ¸Ö‚Õ»Õ¡Ö€Õ¡Õ©Õ«", + "gu_IN": "Õ£Õ¸Ö‚Õ»Õ¡Ö€Õ¡Õ©Õ« (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "gv": "Õ´Õ¥Õ¶Õ¥Ö€Õ¥Õ¶", + "gv_IM": "Õ´Õ¥Õ¶Õ¥Ö€Õ¥Õ¶ (Õ„Õ¥Õ¶ Õ¯Õ²Õ¦Õ«)", + "ha": "Õ°Õ¡Õ¸Ö‚Õ½Õ¡", + "ha_GH": "Õ°Õ¡Õ¸Ö‚Õ½Õ¡ (Ô³Õ¡Õ¶Õ¡)", + "ha_NE": "Õ°Õ¡Õ¸Ö‚Õ½Õ¡ (Õ†Õ«Õ£Õ¥Ö€)", + "ha_NG": "Õ°Õ¡Õ¸Ö‚Õ½Õ¡ (Õ†Õ«Õ£Õ¥Ö€Õ«Õ¡)", + "he": "Õ¥Õ¢Ö€Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "he_IL": "Õ¥Õ¢Ö€Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (Ô»Õ½Ö€Õ¡ÕµÕ¥Õ¬)", + "hi": "Õ°Õ«Õ¶Õ¤Õ«", + "hi_IN": "Õ°Õ«Õ¶Õ¤Õ« (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "hr": "Õ­Õ¸Ö€Õ¾Õ¡Õ©Õ¥Ö€Õ¥Õ¶", + "hr_BA": "Õ­Õ¸Ö€Õ¾Õ¡Õ©Õ¥Ö€Õ¥Õ¶ (Ô²Õ¸Õ½Õ¶Õ«Õ¡ Ö‡ Õ€Õ¥Ö€ÖÕ¥Õ£Õ¸Õ¾Õ«Õ¶Õ¡)", + "hr_HR": "Õ­Õ¸Ö€Õ¾Õ¡Õ©Õ¥Ö€Õ¥Õ¶ (Ô½Õ¸Ö€Õ¾Õ¡Õ©Õ«Õ¡)", + "hu": "Õ°Õ¸Ö‚Õ¶Õ£Õ¡Ö€Õ¥Ö€Õ¥Õ¶", + "hu_HU": "Õ°Õ¸Ö‚Õ¶Õ£Õ¡Ö€Õ¥Ö€Õ¥Õ¶ (Õ€Õ¸Ö‚Õ¶Õ£Õ¡Ö€Õ«Õ¡)", + "hy": "Õ°Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "hy_AM": "Õ°Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (Õ€Õ¡ÕµÕ¡Õ½Õ¿Õ¡Õ¶)", + "id": "Õ«Õ¶Õ¤Õ¸Õ¶Õ¥Õ¦Õ¥Ö€Õ¥Õ¶", + "id_ID": "Õ«Õ¶Õ¤Õ¸Õ¶Õ¥Õ¦Õ¥Ö€Õ¥Õ¶ (Ô»Õ¶Õ¤Õ¸Õ¶Õ¥Õ¦Õ«Õ¡)", + "ig": "Õ«Õ£Õ¢Õ¸", + "ig_NG": "Õ«Õ£Õ¢Õ¸ (Õ†Õ«Õ£Õ¥Ö€Õ«Õ¡)", + "ii": "Õ½Õ«Õ¹Õ¸Ö‚Õ¡Õ¶", + "ii_CN": "Õ½Õ«Õ¹Õ¸Ö‚Õ¡Õ¶ (Õ‰Õ«Õ¶Õ¡Õ½Õ¿Õ¡Õ¶)", + "is": "Õ«Õ½Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶", + "is_IS": "Õ«Õ½Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶ (Ô»Õ½Õ¬Õ¡Õ¶Õ¤Õ«Õ¡)", + "it": "Õ«Õ¿Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "it_CH": "Õ«Õ¿Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Õ‡Õ¾Õ¥ÕµÖÕ¡Ö€Õ«Õ¡)", + "it_IT": "Õ«Õ¿Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Ô»Õ¿Õ¡Õ¬Õ«Õ¡)", + "it_SM": "Õ«Õ¿Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¡Õ¶ Õ„Õ¡Ö€Õ«Õ¶Õ¸)", + "ja": "Õ³Õ¡ÕºÕ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "ja_JP": "Õ³Õ¡ÕºÕ¸Õ¶Õ¥Ö€Õ¥Õ¶ (ÕƒÕ¡ÕºÕ¸Õ¶Õ«Õ¡)", + "ka": "Õ¾Ö€Õ¡ÖÕ¥Ö€Õ¥Õ¶", + "ka_GE": "Õ¾Ö€Õ¡ÖÕ¥Ö€Õ¥Õ¶ (ÕŽÖ€Õ¡Õ½Õ¿Õ¡Õ¶)", + "ki": "Õ¯Õ«Õ¯Õ¸Ö‚ÕµÕ¸Ö‚", + "ki_KE": "Õ¯Õ«Õ¯Õ¸Ö‚ÕµÕ¸Ö‚ (Õ”Õ¥Õ¶Õ«Õ¡)", + "kk": "Õ²Õ¡Õ¦Õ¡Õ­Õ¥Ö€Õ¥Õ¶", + "kk_KZ": "Õ²Õ¡Õ¦Õ¡Õ­Õ¥Ö€Õ¥Õ¶ (Õ‚Õ¡Õ¦Õ¡Õ­Õ½Õ¿Õ¡Õ¶)", + "kl": "Õ¯Õ¡Õ¬Õ¡Õ¡Õ¬Õ«Õ½Õ¸Ö‚Õ¿", + "kl_GL": "Õ¯Õ¡Õ¬Õ¡Õ¡Õ¬Õ«Õ½Õ¸Ö‚Õ¿ (Ô³Ö€Õ¥Õ¶Õ¬Õ¡Õ¶Õ¤Õ«Õ¡)", + "km": "Ö„Õ´Õ¥Ö€Õ¥Ö€Õ¥Õ¶", + "km_KH": "Ö„Õ´Õ¥Ö€Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¡Õ´Õ¢Õ¸Õ»Õ¡)", + "kn": "Õ¯Õ¡Õ¶Õ¶Õ¡Õ¤Õ¡", + "kn_IN": "Õ¯Õ¡Õ¶Õ¶Õ¡Õ¤Õ¡ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "ko": "Õ¯Õ¸Ö€Õ¥Õ¥Ö€Õ¥Õ¶", + "ko_KP": "Õ¯Õ¸Ö€Õ¥Õ¥Ö€Õ¥Õ¶ (Õ€ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Ô¿Õ¸Ö€Õ¥Õ¡)", + "ko_KR": "Õ¯Õ¸Ö€Õ¥Õ¥Ö€Õ¥Õ¶ (Õ€Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ Ô¿Õ¸Ö€Õ¥Õ¡)", + "ks": "Ö„Õ¡Õ·Õ´Õ«Ö€Õ¥Ö€Õ¥Õ¶", + "ks_IN": "Ö„Õ¡Õ·Õ´Õ«Ö€Õ¥Ö€Õ¥Õ¶ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "kw": "Õ¯Õ¸Õ¼Õ¶Õ¥Ö€Õ¥Õ¶", + "kw_GB": "Õ¯Õ¸Õ¼Õ¶Õ¥Ö€Õ¥Õ¶ (Õ„Õ«Õ¡ÖÕµÕ¡Õ¬ Ô¹Õ¡Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶)", + "ky": "Õ²Ö€Õ²Õ¦Õ¥Ö€Õ¥Õ¶", + "ky_KG": "Õ²Ö€Õ²Õ¦Õ¥Ö€Õ¥Õ¶ (Õ‚Ö€Õ²Õ¦Õ½Õ¿Õ¡Õ¶)", + "lb": "Õ¬ÕµÕ¸Ö‚Ö„Õ½Õ¥Õ´Õ¢Õ¸Ö‚Ö€Õ£Õ¥Ö€Õ¥Õ¶", + "lb_LU": "Õ¬ÕµÕ¸Ö‚Ö„Õ½Õ¥Õ´Õ¢Õ¸Ö‚Ö€Õ£Õ¥Ö€Õ¥Õ¶ (Ô¼ÕµÕ¸Ö‚Ö„Õ½Õ¥Õ´Õ¢Õ¸Ö‚Ö€Õ£)", + "lg": "Õ£Õ¡Õ¶Õ¤Õ¡", + "lg_UG": "Õ£Õ¡Õ¶Õ¤Õ¡ (ÕˆÖ‚Õ£Õ¡Õ¶Õ¤Õ¡)", + "ln": "Õ¬Õ«Õ¶Õ£Õ¡Õ¬Õ¡", + "ln_AO": "Õ¬Õ«Õ¶Õ£Õ¡Õ¬Õ¡ (Ô±Õ¶Õ£Õ¸Õ¬Õ¡)", + "ln_CD": "Õ¬Õ«Õ¶Õ£Õ¡Õ¬Õ¡ (Ô¿Õ¸Õ¶Õ£Õ¸ - Ô¿Õ«Õ¶Õ·Õ¡Õ½Õ¡)", + "ln_CF": "Õ¬Õ«Õ¶Õ£Õ¡Õ¬Õ¡ (Ô¿Õ¥Õ¶Õ¿Ö€Õ¸Õ¶Õ¡Õ¯Õ¡Õ¶ Ô±Ö†Ö€Õ«Õ¯ÕµÕ¡Õ¶ Õ€Õ¡Õ¶Ö€Õ¡ÕºÕ¥Õ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶)", + "ln_CG": "Õ¬Õ«Õ¶Õ£Õ¡Õ¬Õ¡ (Ô¿Õ¸Õ¶Õ£Õ¸ - Ô²Ö€Õ¡Õ¦Õ¡Õ¾Õ«Õ¬)", + "lo": "Õ¬Õ¡Õ¸Õ½Õ¥Ö€Õ¥Õ¶", + "lo_LA": "Õ¬Õ¡Õ¸Õ½Õ¥Ö€Õ¥Õ¶ (Ô¼Õ¡Õ¸Õ½)", + "lt": "Õ¬Õ«Õ¿Õ¾Õ¥Ö€Õ¥Õ¶", + "lt_LT": "Õ¬Õ«Õ¿Õ¾Õ¥Ö€Õ¥Õ¶ (Ô¼Õ«Õ¿Õ¾Õ¡)", + "lu": "Õ¬Õ¸Ö‚Õ¢Õ¡-Õ¯Õ¡Õ¿Õ¡Õ¶Õ£Õ¡", + "lu_CD": "Õ¬Õ¸Ö‚Õ¢Õ¡-Õ¯Õ¡Õ¿Õ¡Õ¶Õ£Õ¡ (Ô¿Õ¸Õ¶Õ£Õ¸ - Ô¿Õ«Õ¶Õ·Õ¡Õ½Õ¡)", + "lv": "Õ¬Õ¡Õ¿Õ¾Õ«Õ¥Ö€Õ¥Õ¶", + "lv_LV": "Õ¬Õ¡Õ¿Õ¾Õ«Õ¥Ö€Õ¥Õ¶ (Ô¼Õ¡Õ¿Õ¾Õ«Õ¡)", + "mg": "Õ´Õ¡Õ¬Õ£Õ¡Õ·Õ¥Ö€Õ¥Õ¶", + "mg_MG": "Õ´Õ¡Õ¬Õ£Õ¡Õ·Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¤Õ¡Õ£Õ¡Õ½Õ¯Õ¡Ö€)", + "mk": "Õ´Õ¡Õ¯Õ¥Õ¤Õ¸Õ¶Õ¥Ö€Õ¥Õ¶", + "mk_MK": "Õ´Õ¡Õ¯Õ¥Õ¤Õ¸Õ¶Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¯Õ¥Õ¤Õ¸Õ¶Õ«Õ¡)", + "ml": "Õ´Õ¡Õ¬Õ¡ÕµÕ¡Õ¬Õ¡Õ´", + "ml_IN": "Õ´Õ¡Õ¬Õ¡ÕµÕ¡Õ¬Õ¡Õ´ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "mn": "Õ´Õ¸Õ¶Õ²Õ¸Õ¬Õ¥Ö€Õ¥Õ¶", + "mn_MN": "Õ´Õ¸Õ¶Õ²Õ¸Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ¸Õ¶Õ²Õ¸Õ¬Õ«Õ¡)", + "mr": "Õ´Õ¡Ö€Õ¡Õ©Õ«", + "mr_IN": "Õ´Õ¡Ö€Õ¡Õ©Õ« (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "ms": "Õ´Õ¡Õ¬Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "ms_BN": "Õ´Õ¡Õ¬Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (Ô²Ö€Õ¸Ö‚Õ¶Õ¥Õµ)", + "ms_MY": "Õ´Õ¡Õ¬Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¬Õ¡ÕµÕ¦Õ«Õ¡)", + "ms_SG": "Õ´Õ¡Õ¬Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (ÕÕ«Õ¶Õ£Õ¡ÕºÕ¸Ö‚Ö€)", + "mt": "Õ´Õ¡Õ¬Õ©Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "mt_MT": "Õ´Õ¡Õ¬Õ©Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¬Õ©Õ¡)", + "my": "Õ¢Õ«Ö€Õ´Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "my_MM": "Õ¢Õ«Ö€Õ´Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (Õ„ÕµÕ¡Õ¶Õ´Õ¡ (Ô²Õ«Ö€Õ´Õ¡))", + "nb": "Õ¶Õ¸Ö€Õ¾Õ¥Õ£Õ¥Ö€Õ¥Õ¶ Õ¢Õ¸Ö‚Õ¯Õ´Õ¸Õ¬", + "nb_NO": "Õ¶Õ¸Ö€Õ¾Õ¥Õ£Õ¥Ö€Õ¥Õ¶ Õ¢Õ¸Ö‚Õ¯Õ´Õ¸Õ¬ (Õ†Õ¸Ö€Õ¾Õ¥Õ£Õ«Õ¡)", + "nb_SJ": "Õ¶Õ¸Ö€Õ¾Õ¥Õ£Õ¥Ö€Õ¥Õ¶ Õ¢Õ¸Ö‚Õ¯Õ´Õ¸Õ¬ (ÕÕ¾Õ¡Õ¬Õ¢Õ¡Ö€Õ¤ Ö‡ Õ…Õ¡Õ¶ Õ„Õ¡ÕµÕ¥Õ¶)", + "nd": "Õ°ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Õ¶Õ¤Õ¥Õ¢Õ¥Õ¬Õ¥", + "nd_ZW": "Õ°ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Õ¶Õ¤Õ¥Õ¢Õ¥Õ¬Õ¥ (Ô¶Õ«Õ´Õ¢Õ¡Õ¢Õ¾Õ¥)", + "ne": "Õ¶Õ¥ÕºÕ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "ne_IN": "Õ¶Õ¥ÕºÕ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "ne_NP": "Õ¶Õ¥ÕºÕ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Õ†Õ¥ÕºÕ¡Õ¬)", + "nl": "Õ°Õ¸Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶", + "nl_AW": "Õ°Õ¸Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶ (Ô±Ö€Õ¸Ö‚Õ¢Õ¡)", + "nl_BE": "Õ°Õ¸Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶ (Ô²Õ¥Õ¬Õ£Õ«Õ¡)", + "nl_BQ": "Õ°Õ¸Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¡Ö€Õ«Õ¢ÕµÕ¡Õ¶ Õ†Õ«Õ¤Õ¥Õ¼Õ¬Õ¡Õ¶Õ¤Õ¶Õ¥Ö€)", + "nl_CW": "Õ°Õ¸Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶ (Ô¿ÕµÕ¸Ö‚Ö€Õ¡Õ½Õ¡Õ¸)", + "nl_NL": "Õ°Õ¸Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶ (Õ†Õ«Õ¤Õ¥Õ¼Õ¬Õ¡Õ¶Õ¤Õ¶Õ¥Ö€)", + "nl_SR": "Õ°Õ¸Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Ö‚Ö€Õ«Õ¶Õ¡Õ´)", + "nl_SX": "Õ°Õ¸Õ¬Õ¡Õ¶Õ¤Õ¥Ö€Õ¥Õ¶ (ÕÕ«Õ¶Õ¿ Õ„Õ¡Ö€Õ¿Õ¥Õ¶)", + "nn": "Õ¶Õ¸Ö€Õ¾Õ¥Õ£Õ¥Ö€Õ¥Õ¶ Õ¶ÕµÕ¸Ö‚Õ¶Õ¸Ö€Õ½Õ¯", + "nn_NO": "Õ¶Õ¸Ö€Õ¾Õ¥Õ£Õ¥Ö€Õ¥Õ¶ Õ¶ÕµÕ¸Ö‚Õ¶Õ¸Ö€Õ½Õ¯ (Õ†Õ¸Ö€Õ¾Õ¥Õ£Õ«Õ¡)", + "no": "Õ¶Õ¸Ö€Õ¾Õ¥Õ£Õ¥Ö€Õ¥Õ¶", + "no_NO": "Õ¶Õ¸Ö€Õ¾Õ¥Õ£Õ¥Ö€Õ¥Õ¶ (Õ†Õ¸Ö€Õ¾Õ¥Õ£Õ«Õ¡)", + "om": "Ö…Ö€Õ¸Õ´Õ¸", + "om_ET": "Ö…Ö€Õ¸Õ´Õ¸ (ÔµÕ©Õ¸Õ¾ÕºÕ«Õ¡)", + "om_KE": "Ö…Ö€Õ¸Õ´Õ¸ (Õ”Õ¥Õ¶Õ«Õ¡)", + "or": "Ö…Ö€Õ«ÕµÕ¡", + "or_IN": "Ö…Ö€Õ«ÕµÕ¡ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "os": "Ö…Õ½Õ¥Ö€Õ¥Õ¶", + "os_GE": "Ö…Õ½Õ¥Ö€Õ¥Õ¶ (ÕŽÖ€Õ¡Õ½Õ¿Õ¡Õ¶)", + "os_RU": "Ö…Õ½Õ¥Ö€Õ¥Õ¶ (Ռուսաստան)", + "pa": "ÖƒÕ¥Õ¶Õ»Õ¡Õ¢Õ¥Ö€Õ¥Õ¶", + "pa_Arab": "ÖƒÕ¥Õ¶Õ»Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ¡Ö€Õ¡Õ¢Õ¡Õ¯Õ¡Õ¶)", + "pa_Arab_PK": "ÖƒÕ¥Õ¶Õ»Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ¡Ö€Õ¡Õ¢Õ¡Õ¯Õ¡Õ¶, ÕŠÕ¡Õ¯Õ«Õ½Õ¿Õ¡Õ¶)", + "pa_Guru": "ÖƒÕ¥Õ¶Õ»Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ£Õ¸Ö‚Ö€Õ´Õ¸Ö‚Õ­Õ«)", + "pa_Guru_IN": "ÖƒÕ¥Õ¶Õ»Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ£Õ¸Ö‚Ö€Õ´Õ¸Ö‚Õ­Õ«, Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "pa_IN": "ÖƒÕ¥Õ¶Õ»Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "pa_PK": "ÖƒÕ¥Õ¶Õ»Õ¡Õ¢Õ¥Ö€Õ¥Õ¶ (ÕŠÕ¡Õ¯Õ«Õ½Õ¿Õ¡Õ¶)", + "pl": "Õ¬Õ¥Õ°Õ¥Ö€Õ¥Õ¶", + "pl_PL": "Õ¬Õ¥Õ°Õ¥Ö€Õ¥Õ¶ (Ô¼Õ¥Õ°Õ¡Õ½Õ¿Õ¡Õ¶)", + "ps": "ÖƒÕ¸Ö‚Õ·Õ©Õ¸Ö‚", + "ps_AF": "ÖƒÕ¸Ö‚Õ·Õ©Õ¸Ö‚ (Ô±Ö†Õ²Õ¡Õ¶Õ½Õ¿Õ¡Õ¶)", + "pt": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "pt_AO": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Ô±Õ¶Õ£Õ¸Õ¬Õ¡)", + "pt_BR": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Ô²Ö€Õ¡Õ¦Õ«Õ¬Õ«Õ¡)", + "pt_CH": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Õ‡Õ¾Õ¥ÕµÖÕ¡Ö€Õ«Õ¡)", + "pt_CV": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¡Õ¢Õ¸ ÕŽÕ¥Ö€Õ¤Õ¥)", + "pt_GQ": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Õ€Õ¡Õ½Õ¡Ö€Õ¡Õ¯Õ¡Õ®Õ¡ÕµÕ«Õ¶ Ô³Õ¾Õ«Õ¶Õ¥Õ¡)", + "pt_GW": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Ô³Õ¾Õ«Õ¶Õ¥Õ¡-Ô²Õ«Õ½Õ½Õ¡Õ¸Ö‚)", + "pt_LU": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¼ÕµÕ¸Ö‚Ö„Õ½Õ¥Õ´Õ¢Õ¸Ö‚Ö€Õ£)", + "pt_MO": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Õ‰Õ«Õ¶Õ¡Õ½Õ¿Õ¡Õ¶Õ« Õ„Õ¡Õ¯Õ¡Õ¸ Õ€ÕŽÕ‡)", + "pt_MZ": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ¸Õ¦Õ¡Õ´Õ¢Õ«Õ¯)", + "pt_PT": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (ÕŠÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ«Õ¡)", + "pt_ST": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ¡Õ¶ ÕÕ¸Õ´Õ¥ Ö‡ Õ“Ö€Õ«Õ¶Õ½Õ«ÕºÕ«)", + "pt_TL": "ÕºÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Ô¹Õ«Õ´Õ¸Ö€ Ô¼Õ¥Õ·Õ¿Õ«)", + "qu": "Õ¯Õ¥Õ¹Õ¸Ö‚Õ¡", + "qu_BO": "Õ¯Õ¥Õ¹Õ¸Ö‚Õ¡ (Ô²Õ¸Õ¬Õ«Õ¾Õ«Õ¡)", + "qu_EC": "Õ¯Õ¥Õ¹Õ¸Ö‚Õ¡ (Ô·Õ¯Õ¾Õ¡Õ¤Õ¸Ö€)", + "qu_PE": "Õ¯Õ¥Õ¹Õ¸Ö‚Õ¡ (ÕŠÕ¥Ö€Õ¸Ö‚)", + "rm": "Õ¼Õ¸Õ´Õ¡Õ¶Õ·Õ¥Ö€Õ¥Õ¶", + "rm_CH": "Õ¼Õ¸Õ´Õ¡Õ¶Õ·Õ¥Ö€Õ¥Õ¶ (Õ‡Õ¾Õ¥ÕµÖÕ¡Ö€Õ«Õ¡)", + "rn": "Õ¼Õ¸Ö‚Õ¶Õ¤Õ«", + "rn_BI": "Õ¼Õ¸Ö‚Õ¶Õ¤Õ« (Ô²Õ¸Ö‚Ö€Õ¸Ö‚Õ¶Õ¤Õ«)", + "ro": "Õ¼Õ¸Ö‚Õ´Õ«Õ¶Õ¥Ö€Õ¥Õ¶", + "ro_MD": "Õ¼Õ¸Ö‚Õ´Õ«Õ¶Õ¥Ö€Õ¥Õ¶ (Õ„Õ¸Õ¬Õ¤Õ¸Õ¾Õ¡)", + "ro_RO": "Õ¼Õ¸Ö‚Õ´Õ«Õ¶Õ¥Ö€Õ¥Õ¶ (Ռումինիա)", + "ru": "Õ¼Õ¸Ö‚Õ½Õ¥Ö€Õ¥Õ¶", + "ru_BY": "Õ¼Õ¸Ö‚Õ½Õ¥Ö€Õ¥Õ¶ (Ô²Õ¥Õ¬Õ¡Õ¼Õ¸Ö‚Õ½)", + "ru_KG": "Õ¼Õ¸Ö‚Õ½Õ¥Ö€Õ¥Õ¶ (Õ‚Ö€Õ²Õ¦Õ½Õ¿Õ¡Õ¶)", + "ru_KZ": "Õ¼Õ¸Ö‚Õ½Õ¥Ö€Õ¥Õ¶ (Õ‚Õ¡Õ¦Õ¡Õ­Õ½Õ¿Õ¡Õ¶)", + "ru_MD": "Õ¼Õ¸Ö‚Õ½Õ¥Ö€Õ¥Õ¶ (Õ„Õ¸Õ¬Õ¤Õ¸Õ¾Õ¡)", + "ru_RU": "Õ¼Õ¸Ö‚Õ½Õ¥Ö€Õ¥Õ¶ (Ռուսաստան)", + "ru_UA": "Õ¼Õ¸Ö‚Õ½Õ¥Ö€Õ¥Õ¶ (ÕˆÖ‚Õ¯Ö€Õ¡Õ«Õ¶Õ¡)", + "rw": "Õ¯Õ«Õ¶ÕµÕ¡Õ¼Õ¸Ö‚Õ¡Õ¶Õ¤Õ¡", + "rw_RW": "Õ¯Õ«Õ¶ÕµÕ¡Õ¼Õ¸Ö‚Õ¡Õ¶Õ¤Õ¡ (Ռուանդա)", + "se": "Õ°ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Õ½Õ¡Õ¡Õ´Õ«", + "se_FI": "Õ°ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Õ½Õ¡Õ¡Õ´Õ« (Õ–Õ«Õ¶Õ¬Õ¡Õ¶Õ¤Õ«Õ¡)", + "se_NO": "Õ°ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Õ½Õ¡Õ¡Õ´Õ« (Õ†Õ¸Ö€Õ¾Õ¥Õ£Õ«Õ¡)", + "se_SE": "Õ°ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Õ½Õ¡Õ¡Õ´Õ« (Õ‡Õ¾Õ¥Õ¤Õ«Õ¡)", + "sg": "Õ½Õ¡Õ¶Õ£Õ¸", + "sg_CF": "Õ½Õ¡Õ¶Õ£Õ¸ (Ô¿Õ¥Õ¶Õ¿Ö€Õ¸Õ¶Õ¡Õ¯Õ¡Õ¶ Ô±Ö†Ö€Õ«Õ¯ÕµÕ¡Õ¶ Õ€Õ¡Õ¶Ö€Õ¡ÕºÕ¥Õ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶)", + "sh": "Õ½Õ¥Ö€Õ¢Õ¡-Õ­Õ¸Ö€Õ¾Õ¡Õ©Õ¥Ö€Õ¥Õ¶", + "sh_BA": "Õ½Õ¥Ö€Õ¢Õ¡-Õ­Õ¸Ö€Õ¾Õ¡Õ©Õ¥Ö€Õ¥Õ¶ (Ô²Õ¸Õ½Õ¶Õ«Õ¡ Ö‡ Õ€Õ¥Ö€ÖÕ¥Õ£Õ¸Õ¾Õ«Õ¶Õ¡)", + "si": "Õ½Õ«Õ¶Õ°Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "si_LK": "Õ½Õ«Õ¶Õ°Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Õ‡Ö€Õ« Ô¼Õ¡Õ¶Õ¯Õ¡)", + "sk": "Õ½Õ¬Õ¸Õ¾Õ¡Õ¯Õ¥Ö€Õ¥Õ¶", + "sk_SK": "Õ½Õ¬Õ¸Õ¾Õ¡Õ¯Õ¥Ö€Õ¥Õ¶ (ÕÕ¬Õ¸Õ¾Õ¡Õ¯Õ«Õ¡)", + "sl": "Õ½Õ¬Õ¸Õ¾Õ¥Õ¶Õ¥Ö€Õ¥Õ¶", + "sl_SI": "Õ½Õ¬Õ¸Õ¾Õ¥Õ¶Õ¥Ö€Õ¥Õ¶ (ÕÕ¬Õ¸Õ¾Õ¥Õ¶Õ«Õ¡)", + "sn": "Õ·Õ¸Õ¶Õ¡", + "sn_ZW": "Õ·Õ¸Õ¶Õ¡ (Ô¶Õ«Õ´Õ¢Õ¡Õ¢Õ¾Õ¥)", + "so": "Õ½Õ¸Õ´Õ¡Õ¬Õ«Õ¥Ö€Õ¥Õ¶", + "so_DJ": "Õ½Õ¸Õ´Õ¡Õ¬Õ«Õ¥Ö€Õ¥Õ¶ (Õ‹Õ«Õ¢Õ¸Ö‚Õ©Õ«)", + "so_ET": "Õ½Õ¸Õ´Õ¡Õ¬Õ«Õ¥Ö€Õ¥Õ¶ (ÔµÕ©Õ¸Õ¾ÕºÕ«Õ¡)", + "so_KE": "Õ½Õ¸Õ´Õ¡Õ¬Õ«Õ¥Ö€Õ¥Õ¶ (Õ”Õ¥Õ¶Õ«Õ¡)", + "so_SO": "Õ½Õ¸Õ´Õ¡Õ¬Õ«Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Õ´Õ¡Õ¬Õ«)", + "sq": "Õ¡Õ¬Õ¢Õ¡Õ¶Õ¥Ö€Õ¥Õ¶", + "sq_AL": "Õ¡Õ¬Õ¢Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô±Õ¬Õ¢Õ¡Õ¶Õ«Õ¡)", + "sq_MK": "Õ¡Õ¬Õ¢Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¯Õ¥Õ¤Õ¸Õ¶Õ«Õ¡)", + "sq_XK": "Õ¡Õ¬Õ¢Õ¡Õ¶Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¸Õ½Õ¸Õ¾Õ¸)", + "sr": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶", + "sr_BA": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Ô²Õ¸Õ½Õ¶Õ«Õ¡ Ö‡ Õ€Õ¥Ö€ÖÕ¥Õ£Õ¸Õ¾Õ«Õ¶Õ¡)", + "sr_Cyrl": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Õ¯ÕµÕ¸Ö‚Ö€Õ¥Õ²Õ¡Õ£Õ«Ö€)", + "sr_Cyrl_BA": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Õ¯ÕµÕ¸Ö‚Ö€Õ¥Õ²Õ¡Õ£Õ«Ö€, Ô²Õ¸Õ½Õ¶Õ«Õ¡ Ö‡ Õ€Õ¥Ö€ÖÕ¥Õ£Õ¸Õ¾Õ«Õ¶Õ¡)", + "sr_Cyrl_ME": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Õ¯ÕµÕ¸Ö‚Ö€Õ¥Õ²Õ¡Õ£Õ«Ö€, Õ‰Õ¥Õ¼Õ¶Õ¸Õ£Õ¸Ö€Õ«Õ¡)", + "sr_Cyrl_RS": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Õ¯ÕµÕ¸Ö‚Ö€Õ¥Õ²Õ¡Õ£Õ«Ö€, ÕÕ¥Ö€Õ¢Õ«Õ¡)", + "sr_Cyrl_XK": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Õ¯ÕµÕ¸Ö‚Ö€Õ¥Õ²Õ¡Õ£Õ«Ö€, Ô¿Õ¸Õ½Õ¸Õ¾Õ¸)", + "sr_Latn": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶)", + "sr_Latn_BA": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, Ô²Õ¸Õ½Õ¶Õ«Õ¡ Ö‡ Õ€Õ¥Ö€ÖÕ¥Õ£Õ¸Õ¾Õ«Õ¶Õ¡)", + "sr_Latn_ME": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, Õ‰Õ¥Õ¼Õ¶Õ¸Õ£Õ¸Ö€Õ«Õ¡)", + "sr_Latn_RS": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, ÕÕ¥Ö€Õ¢Õ«Õ¡)", + "sr_Latn_XK": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, Ô¿Õ¸Õ½Õ¸Õ¾Õ¸)", + "sr_ME": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Õ‰Õ¥Õ¼Õ¶Õ¸Õ£Õ¸Ö€Õ«Õ¡)", + "sr_RS": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (ÕÕ¥Ö€Õ¢Õ«Õ¡)", + "sr_XK": "Õ½Õ¥Ö€Õ¢Õ¥Ö€Õ¥Õ¶ (Ô¿Õ¸Õ½Õ¸Õ¾Õ¸)", + "sv": "Õ·Õ¾Õ¥Õ¤Õ¥Ö€Õ¥Õ¶", + "sv_AX": "Õ·Õ¾Õ¥Õ¤Õ¥Ö€Õ¥Õ¶ (Ô±Õ¬Õ¡Õ¶Õ¤ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€)", + "sv_FI": "Õ·Õ¾Õ¥Õ¤Õ¥Ö€Õ¥Õ¶ (Õ–Õ«Õ¶Õ¬Õ¡Õ¶Õ¤Õ«Õ¡)", + "sv_SE": "Õ·Õ¾Õ¥Õ¤Õ¥Ö€Õ¥Õ¶ (Õ‡Õ¾Õ¥Õ¤Õ«Õ¡)", + "sw": "Õ½Õ¸Ö‚Õ¡Õ°Õ«Õ¬Õ«", + "sw_CD": "Õ½Õ¸Ö‚Õ¡Õ°Õ«Õ¬Õ« (Ô¿Õ¸Õ¶Õ£Õ¸ - Ô¿Õ«Õ¶Õ·Õ¡Õ½Õ¡)", + "sw_KE": "Õ½Õ¸Ö‚Õ¡Õ°Õ«Õ¬Õ« (Õ”Õ¥Õ¶Õ«Õ¡)", + "sw_TZ": "Õ½Õ¸Ö‚Õ¡Õ°Õ«Õ¬Õ« (ÕÕ¡Õ¶Õ¦Õ¡Õ¶Õ«Õ¡)", + "sw_UG": "Õ½Õ¸Ö‚Õ¡Õ°Õ«Õ¬Õ« (ÕˆÖ‚Õ£Õ¡Õ¶Õ¤Õ¡)", + "ta": "Õ©Õ¡Õ´Õ«Õ¬Õ¥Ö€Õ¥Õ¶", + "ta_IN": "Õ©Õ¡Õ´Õ«Õ¬Õ¥Ö€Õ¥Õ¶ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "ta_LK": "Õ©Õ¡Õ´Õ«Õ¬Õ¥Ö€Õ¥Õ¶ (Õ‡Ö€Õ« Ô¼Õ¡Õ¶Õ¯Õ¡)", + "ta_MY": "Õ©Õ¡Õ´Õ«Õ¬Õ¥Ö€Õ¥Õ¶ (Õ„Õ¡Õ¬Õ¡ÕµÕ¦Õ«Õ¡)", + "ta_SG": "Õ©Õ¡Õ´Õ«Õ¬Õ¥Ö€Õ¥Õ¶ (ÕÕ«Õ¶Õ£Õ¡ÕºÕ¸Ö‚Ö€)", + "te": "Õ©Õ¥Õ¬Õ¸Ö‚Õ£Õ¸Ö‚", + "te_IN": "Õ©Õ¥Õ¬Õ¸Ö‚Õ£Õ¸Ö‚ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "th": "Õ©Õ¡ÕµÕ¥Ö€Õ¥Õ¶", + "th_TH": "Õ©Õ¡ÕµÕ¥Ö€Õ¥Õ¶ (Ô¹Õ¡ÕµÕ¬Õ¡Õ¶Õ¤)", + "ti": "Õ¿Õ«Õ£Ö€Õ«Õ¶ÕµÕ¡", + "ti_ER": "Õ¿Õ«Õ£Ö€Õ«Õ¶ÕµÕ¡ (Ô·Ö€Õ«Õ©Ö€Õ¥Õ¡)", + "ti_ET": "Õ¿Õ«Õ£Ö€Õ«Õ¶ÕµÕ¡ (ÔµÕ©Õ¸Õ¾ÕºÕ«Õ¡)", + "tl": "Õ¿Õ¡Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶", + "tl_PH": "Õ¿Õ¡Õ£Õ¡Õ¬Õ¥Ö€Õ¥Õ¶ (Õ–Õ«Õ¬Õ«ÕºÕ«Õ¶Õ¶Õ¥Ö€)", + "to": "Õ¿Õ¸Õ¶Õ£Õ¥Ö€Õ¥Õ¶", + "to_TO": "Õ¿Õ¸Õ¶Õ£Õ¥Ö€Õ¥Õ¶ (ÕÕ¸Õ¶Õ£Õ¡)", + "tr": "Õ©Õ¸Ö‚Ö€Ö„Õ¥Ö€Õ¥Õ¶", + "tr_CY": "Õ©Õ¸Ö‚Ö€Ö„Õ¥Ö€Õ¥Õ¶ (Ô¿Õ«ÕºÖ€Õ¸Õ½)", + "tr_TR": "Õ©Õ¸Ö‚Ö€Ö„Õ¥Ö€Õ¥Õ¶ (Ô¹Õ¸Ö‚Ö€Ö„Õ«Õ¡)", + "ug": "Õ¸Ö‚ÕµÕ²Õ¸Ö‚Ö€Õ¥Ö€Õ¥Õ¶", + "ug_CN": "Õ¸Ö‚ÕµÕ²Õ¸Ö‚Ö€Õ¥Ö€Õ¥Õ¶ (Õ‰Õ«Õ¶Õ¡Õ½Õ¿Õ¡Õ¶)", + "uk": "Õ¸Ö‚Õ¯Ö€Õ¡Õ«Õ¶Õ¥Ö€Õ¥Õ¶", + "uk_UA": "Õ¸Ö‚Õ¯Ö€Õ¡Õ«Õ¶Õ¥Ö€Õ¥Õ¶ (ÕˆÖ‚Õ¯Ö€Õ¡Õ«Õ¶Õ¡)", + "ur": "Õ¸Ö‚Ö€Õ¤Õ¸Ö‚", + "ur_IN": "Õ¸Ö‚Ö€Õ¤Õ¸Ö‚ (Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶)", + "ur_PK": "Õ¸Ö‚Ö€Õ¤Õ¸Ö‚ (ÕŠÕ¡Õ¯Õ«Õ½Õ¿Õ¡Õ¶)", + "uz": "Õ¸Ö‚Õ¦Õ¢Õ¥Õ¯Õ¥Ö€Õ¥Õ¶", + "uz_AF": "Õ¸Ö‚Õ¦Õ¢Õ¥Õ¯Õ¥Ö€Õ¥Õ¶ (Ô±Ö†Õ²Õ¡Õ¶Õ½Õ¿Õ¡Õ¶)", + "uz_Arab": "Õ¸Ö‚Õ¦Õ¢Õ¥Õ¯Õ¥Ö€Õ¥Õ¶ (Õ¡Ö€Õ¡Õ¢Õ¡Õ¯Õ¡Õ¶)", + "uz_Arab_AF": "Õ¸Ö‚Õ¦Õ¢Õ¥Õ¯Õ¥Ö€Õ¥Õ¶ (Õ¡Ö€Õ¡Õ¢Õ¡Õ¯Õ¡Õ¶, Ô±Ö†Õ²Õ¡Õ¶Õ½Õ¿Õ¡Õ¶)", + "uz_Cyrl": "Õ¸Ö‚Õ¦Õ¢Õ¥Õ¯Õ¥Ö€Õ¥Õ¶ (Õ¯ÕµÕ¸Ö‚Ö€Õ¥Õ²Õ¡Õ£Õ«Ö€)", + "uz_Cyrl_UZ": "Õ¸Ö‚Õ¦Õ¢Õ¥Õ¯Õ¥Ö€Õ¥Õ¶ (Õ¯ÕµÕ¸Ö‚Ö€Õ¥Õ²Õ¡Õ£Õ«Ö€, ÕˆÖ‚Õ¦Õ¢Õ¥Õ¯Õ½Õ¿Õ¡Õ¶)", + "uz_Latn": "Õ¸Ö‚Õ¦Õ¢Õ¥Õ¯Õ¥Ö€Õ¥Õ¶ (Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶)", + "uz_Latn_UZ": "Õ¸Ö‚Õ¦Õ¢Õ¥Õ¯Õ¥Ö€Õ¥Õ¶ (Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, ÕˆÖ‚Õ¦Õ¢Õ¥Õ¯Õ½Õ¿Õ¡Õ¶)", + "uz_UZ": "Õ¸Ö‚Õ¦Õ¢Õ¥Õ¯Õ¥Ö€Õ¥Õ¶ (ÕˆÖ‚Õ¦Õ¢Õ¥Õ¯Õ½Õ¿Õ¡Õ¶)", + "vi": "Õ¾Õ«Õ¥Õ¿Õ¶Õ¡Õ´Õ¥Ö€Õ¥Õ¶", + "vi_VN": "Õ¾Õ«Õ¥Õ¿Õ¶Õ¡Õ´Õ¥Ö€Õ¥Õ¶ (ÕŽÕ«Õ¥Õ¿Õ¶Õ¡Õ´)", + "yi": "Õ«Õ¤Õ«Õ·", + "yo": "ÕµÕ¸Ö€Õ¸Ö‚Õ¢Õ¡", + "yo_BJ": "ÕµÕ¸Ö€Õ¸Ö‚Õ¢Õ¡ (Ô²Õ¥Õ¶Õ«Õ¶)", + "yo_NG": "ÕµÕ¸Ö€Õ¸Ö‚Õ¢Õ¡ (Õ†Õ«Õ£Õ¥Ö€Õ«Õ¡)", + "zh": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶", + "zh_CN": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (Õ‰Õ«Õ¶Õ¡Õ½Õ¿Õ¡Õ¶)", + "zh_HK": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (Õ€Õ¸Õ¶Õ¯Õ¸Õ¶Õ£Õ« Õ€ÕŽÕ‡)", + "zh_Hans": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (ÕºÕ¡Ö€Õ¦Õ¥ÖÕ¾Õ¡Õ® Õ¹Õ«Õ¶Õ¡Õ¯Õ¡Õ¶)", + "zh_Hans_CN": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (ÕºÕ¡Ö€Õ¦Õ¥ÖÕ¾Õ¡Õ® Õ¹Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, Õ‰Õ«Õ¶Õ¡Õ½Õ¿Õ¡Õ¶)", + "zh_Hans_HK": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (ÕºÕ¡Ö€Õ¦Õ¥ÖÕ¾Õ¡Õ® Õ¹Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, Õ€Õ¸Õ¶Õ¯Õ¸Õ¶Õ£Õ« Õ€ÕŽÕ‡)", + "zh_Hans_MO": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (ÕºÕ¡Ö€Õ¦Õ¥ÖÕ¾Õ¡Õ® Õ¹Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, Õ‰Õ«Õ¶Õ¡Õ½Õ¿Õ¡Õ¶Õ« Õ„Õ¡Õ¯Õ¡Õ¸ Õ€ÕŽÕ‡)", + "zh_Hans_SG": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (ÕºÕ¡Ö€Õ¦Õ¥ÖÕ¾Õ¡Õ® Õ¹Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, ÕÕ«Õ¶Õ£Õ¡ÕºÕ¸Ö‚Ö€)", + "zh_Hant": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (Õ¡Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¹Õ«Õ¶Õ¡Õ¯Õ¡Õ¶)", + "zh_Hant_HK": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (Õ¡Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¹Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, Õ€Õ¸Õ¶Õ¯Õ¸Õ¶Õ£Õ« Õ€ÕŽÕ‡)", + "zh_Hant_MO": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (Õ¡Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¹Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, Õ‰Õ«Õ¶Õ¡Õ½Õ¿Õ¡Õ¶Õ« Õ„Õ¡Õ¯Õ¡Õ¸ Õ€ÕŽÕ‡)", + "zh_Hant_TW": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (Õ¡Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¹Õ«Õ¶Õ¡Õ¯Õ¡Õ¶, Ô¹Õ¡ÕµÕ¾Õ¡Õ¶)", + "zh_MO": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (Õ‰Õ«Õ¶Õ¡Õ½Õ¿Õ¡Õ¶Õ« Õ„Õ¡Õ¯Õ¡Õ¸ Õ€ÕŽÕ‡)", + "zh_SG": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (ÕÕ«Õ¶Õ£Õ¡ÕºÕ¸Ö‚Ö€)", + "zh_TW": "Õ¹Õ«Õ¶Õ¡Ö€Õ¥Õ¶ (Ô¹Õ¡ÕµÕ¾Õ¡Õ¶)", + "zu": "Õ¦Õ¸Ö‚Õ¬Õ¸Ö‚Õ¥Ö€Õ¥Õ¶", + "zu_ZA": "Õ¦Õ¸Ö‚Õ¬Õ¸Ö‚Õ¥Ö€Õ¥Õ¶ (Õ€Õ¡Ö€Õ¡Õ¾Õ¡Ö†Ö€Õ«Õ¯ÕµÕ¡Õ¶ Õ€Õ¡Õ¶Ö€Õ¡ÕºÕ¥Õ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/id.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/id.json new file mode 100644 index 0000000000000000000000000000000000000000..363a022b42ce657fc34d698c79c5b052d7251e4d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/id.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Afrikaans", + "af_NA": "Afrikaans (Namibia)", + "af_ZA": "Afrikaans (Afrika Selatan)", + "ak": "Akan", + "ak_GH": "Akan (Ghana)", + "am": "Amharik", + "am_ET": "Amharik (Etiopia)", + "ar": "Arab", + "ar_AE": "Arab (Uni Emirat Arab)", + "ar_BH": "Arab (Bahrain)", + "ar_DJ": "Arab (Jibuti)", + "ar_DZ": "Arab (Aljazair)", + "ar_EG": "Arab (Mesir)", + "ar_EH": "Arab (Sahara Barat)", + "ar_ER": "Arab (Eritrea)", + "ar_IL": "Arab (Israel)", + "ar_IQ": "Arab (Irak)", + "ar_JO": "Arab (Yordania)", + "ar_KM": "Arab (Komoro)", + "ar_KW": "Arab (Kuwait)", + "ar_LB": "Arab (Lebanon)", + "ar_LY": "Arab (Libia)", + "ar_MA": "Arab (Maroko)", + "ar_MR": "Arab (Mauritania)", + "ar_OM": "Arab (Oman)", + "ar_PS": "Arab (Wilayah Palestina)", + "ar_QA": "Arab (Qatar)", + "ar_SA": "Arab (Arab Saudi)", + "ar_SD": "Arab (Sudan)", + "ar_SO": "Arab (Somalia)", + "ar_SS": "Arab (Sudan Selatan)", + "ar_SY": "Arab (Suriah)", + "ar_TD": "Arab (Cad)", + "ar_TN": "Arab (Tunisia)", + "ar_YE": "Arab (Yaman)", + "as": "Assam", + "as_IN": "Assam (India)", + "az": "Azerbaijani", + "az_AZ": "Azerbaijani (Azerbaijan)", + "az_Cyrl": "Azerbaijani (Sirilik)", + "az_Cyrl_AZ": "Azerbaijani (Sirilik, Azerbaijan)", + "az_Latn": "Azerbaijani (Latin)", + "az_Latn_AZ": "Azerbaijani (Latin, Azerbaijan)", + "be": "Belarusia", + "be_BY": "Belarusia (Belarus)", + "bg": "Bulgaria", + "bg_BG": "Bulgaria (Bulgaria)", + "bm": "Bambara", + "bm_ML": "Bambara (Mali)", + "bn": "Bengali", + "bn_BD": "Bengali (Bangladesh)", + "bn_IN": "Bengali (India)", + "bo": "Tibet", + "bo_CN": "Tibet (Tiongkok)", + "bo_IN": "Tibet (India)", + "br": "Breton", + "br_FR": "Breton (Prancis)", + "bs": "Bosnia", + "bs_BA": "Bosnia (Bosnia dan Herzegovina)", + "bs_Cyrl": "Bosnia (Sirilik)", + "bs_Cyrl_BA": "Bosnia (Sirilik, Bosnia dan Herzegovina)", + "bs_Latn": "Bosnia (Latin)", + "bs_Latn_BA": "Bosnia (Latin, Bosnia dan Herzegovina)", + "ca": "Katalan", + "ca_AD": "Katalan (Andorra)", + "ca_ES": "Katalan (Spanyol)", + "ca_FR": "Katalan (Prancis)", + "ca_IT": "Katalan (Italia)", + "ce": "Chechen", + "ce_RU": "Chechen (Rusia)", + "cs": "Cheska", + "cs_CZ": "Cheska (Republik Cheska)", + "cy": "Welsh", + "cy_GB": "Welsh (Inggris Raya)", + "da": "Dansk", + "da_DK": "Dansk (Denmark)", + "da_GL": "Dansk (Grinlandia)", + "de": "Jerman", + "de_AT": "Jerman (Austria)", + "de_BE": "Jerman (Belgia)", + "de_CH": "Jerman (Swiss)", + "de_DE": "Jerman (Jerman)", + "de_IT": "Jerman (Italia)", + "de_LI": "Jerman (Liechtenstein)", + "de_LU": "Jerman (Luksemburg)", + "dz": "Dzongkha", + "dz_BT": "Dzongkha (Bhutan)", + "ee": "Ewe", + "ee_GH": "Ewe (Ghana)", + "ee_TG": "Ewe (Togo)", + "el": "Yunani", + "el_CY": "Yunani (Siprus)", + "el_GR": "Yunani (Yunani)", + "en": "Inggris", + "en_AG": "Inggris (Antigua dan Barbuda)", + "en_AI": "Inggris (Anguilla)", + "en_AS": "Inggris (Samoa Amerika)", + "en_AT": "Inggris (Austria)", + "en_AU": "Inggris (Australia)", + "en_BB": "Inggris (Barbados)", + "en_BE": "Inggris (Belgia)", + "en_BI": "Inggris (Burundi)", + "en_BM": "Inggris (Bermuda)", + "en_BS": "Inggris (Bahama)", + "en_BW": "Inggris (Botswana)", + "en_BZ": "Inggris (Belize)", + "en_CA": "Inggris (Kanada)", + "en_CC": "Inggris (Kepulauan Cocos (Keeling))", + "en_CH": "Inggris (Swiss)", + "en_CK": "Inggris (Kepulauan Cook)", + "en_CM": "Inggris (Kamerun)", + "en_CX": "Inggris (Pulau Christmas)", + "en_CY": "Inggris (Siprus)", + "en_DE": "Inggris (Jerman)", + "en_DG": "Inggris (Diego Garcia)", + "en_DK": "Inggris (Denmark)", + "en_DM": "Inggris (Dominika)", + "en_ER": "Inggris (Eritrea)", + "en_FI": "Inggris (Finlandia)", + "en_FJ": "Inggris (Fiji)", + "en_FK": "Inggris (Kepulauan Malvinas)", + "en_FM": "Inggris (Mikronesia)", + "en_GB": "Inggris (Inggris Raya)", + "en_GD": "Inggris (Grenada)", + "en_GG": "Inggris (Guernsey)", + "en_GH": "Inggris (Ghana)", + "en_GI": "Inggris (Gibraltar)", + "en_GM": "Inggris (Gambia)", + "en_GU": "Inggris (Guam)", + "en_GY": "Inggris (Guyana)", + "en_HK": "Inggris (Hong Kong SAR Tiongkok)", + "en_IE": "Inggris (Irlandia)", + "en_IL": "Inggris (Israel)", + "en_IM": "Inggris (Pulau Man)", + "en_IN": "Inggris (India)", + "en_IO": "Inggris (Wilayah Inggris di Samudra Hindia)", + "en_JE": "Inggris (Jersey)", + "en_JM": "Inggris (Jamaika)", + "en_KE": "Inggris (Kenya)", + "en_KI": "Inggris (Kiribati)", + "en_KN": "Inggris (Saint Kitts dan Nevis)", + "en_KY": "Inggris (Kepulauan Cayman)", + "en_LC": "Inggris (Saint Lucia)", + "en_LR": "Inggris (Liberia)", + "en_LS": "Inggris (Lesotho)", + "en_MG": "Inggris (Madagaskar)", + "en_MH": "Inggris (Kepulauan Marshall)", + "en_MO": "Inggris (Makau SAR Tiongkok)", + "en_MP": "Inggris (Kepulauan Mariana Utara)", + "en_MS": "Inggris (Montserrat)", + "en_MT": "Inggris (Malta)", + "en_MU": "Inggris (Mauritius)", + "en_MW": "Inggris (Malawi)", + "en_MY": "Inggris (Malaysia)", + "en_NA": "Inggris (Namibia)", + "en_NF": "Inggris (Kepulauan Norfolk)", + "en_NG": "Inggris (Nigeria)", + "en_NL": "Inggris (Belanda)", + "en_NR": "Inggris (Nauru)", + "en_NU": "Inggris (Niue)", + "en_NZ": "Inggris (Selandia Baru)", + "en_PG": "Inggris (Papua Nugini)", + "en_PH": "Inggris (Filipina)", + "en_PK": "Inggris (Pakistan)", + "en_PN": "Inggris (Kepulauan Pitcairn)", + "en_PR": "Inggris (Puerto Riko)", + "en_PW": "Inggris (Palau)", + "en_RW": "Inggris (Rwanda)", + "en_SB": "Inggris (Kepulauan Solomon)", + "en_SC": "Inggris (Seychelles)", + "en_SD": "Inggris (Sudan)", + "en_SE": "Inggris (Swedia)", + "en_SG": "Inggris (Singapura)", + "en_SH": "Inggris (Saint Helena)", + "en_SI": "Inggris (Slovenia)", + "en_SL": "Inggris (Sierra Leone)", + "en_SS": "Inggris (Sudan Selatan)", + "en_SX": "Inggris (Sint Maarten)", + "en_SZ": "Inggris (Swaziland)", + "en_TC": "Inggris (Kepulauan Turks dan Caicos)", + "en_TK": "Inggris (Tokelau)", + "en_TO": "Inggris (Tonga)", + "en_TT": "Inggris (Trinidad dan Tobago)", + "en_TV": "Inggris (Tuvalu)", + "en_TZ": "Inggris (Tanzania)", + "en_UG": "Inggris (Uganda)", + "en_UM": "Inggris (Kepulauan Terluar A.S.)", + "en_US": "Inggris (Amerika Serikat)", + "en_VC": "Inggris (Saint Vincent dan Grenadines)", + "en_VG": "Inggris (Kepulauan Virgin Inggris)", + "en_VI": "Inggris (Kepulauan Virgin A.S.)", + "en_VU": "Inggris (Vanuatu)", + "en_WS": "Inggris (Samoa)", + "en_ZA": "Inggris (Afrika Selatan)", + "en_ZM": "Inggris (Zambia)", + "en_ZW": "Inggris (Zimbabwe)", + "eo": "Esperanto", + "es": "Spanyol", + "es_AR": "Spanyol (Argentina)", + "es_BO": "Spanyol (Bolivia)", + "es_BR": "Spanyol (Brasil)", + "es_CL": "Spanyol (Cile)", + "es_CO": "Spanyol (Kolombia)", + "es_CR": "Spanyol (Kosta Rika)", + "es_CU": "Spanyol (Kuba)", + "es_DO": "Spanyol (Republik Dominika)", + "es_EA": "Spanyol (Ceuta dan Melilla)", + "es_EC": "Spanyol (Ekuador)", + "es_ES": "Spanyol (Spanyol)", + "es_GQ": "Spanyol (Guinea Ekuatorial)", + "es_GT": "Spanyol (Guatemala)", + "es_HN": "Spanyol (Honduras)", + "es_IC": "Spanyol (Kepulauan Canary)", + "es_MX": "Spanyol (Meksiko)", + "es_NI": "Spanyol (Nikaragua)", + "es_PA": "Spanyol (Panama)", + "es_PE": "Spanyol (Peru)", + "es_PH": "Spanyol (Filipina)", + "es_PR": "Spanyol (Puerto Riko)", + "es_PY": "Spanyol (Paraguay)", + "es_SV": "Spanyol (El Salvador)", + "es_US": "Spanyol (Amerika Serikat)", + "es_UY": "Spanyol (Uruguay)", + "es_VE": "Spanyol (Venezuela)", + "et": "Esti", + "et_EE": "Esti (Estonia)", + "eu": "Basque", + "eu_ES": "Basque (Spanyol)", + "fa": "Persia", + "fa_AF": "Persia (Afganistan)", + "fa_IR": "Persia (Iran)", + "ff": "Fula", + "ff_CM": "Fula (Kamerun)", + "ff_GN": "Fula (Guinea)", + "ff_MR": "Fula (Mauritania)", + "ff_SN": "Fula (Senegal)", + "fi": "Suomi", + "fi_FI": "Suomi (Finlandia)", + "fo": "Faroe", + "fo_DK": "Faroe (Denmark)", + "fo_FO": "Faroe (Kepulauan Faroe)", + "fr": "Prancis", + "fr_BE": "Prancis (Belgia)", + "fr_BF": "Prancis (Burkina Faso)", + "fr_BI": "Prancis (Burundi)", + "fr_BJ": "Prancis (Benin)", + "fr_BL": "Prancis (Saint Barthélemy)", + "fr_CA": "Prancis (Kanada)", + "fr_CD": "Prancis (Kongo - Kinshasa)", + "fr_CF": "Prancis (Republik Afrika Tengah)", + "fr_CG": "Prancis (Kongo - Brazzaville)", + "fr_CH": "Prancis (Swiss)", + "fr_CI": "Prancis (Cote d’Ivoire)", + "fr_CM": "Prancis (Kamerun)", + "fr_DJ": "Prancis (Jibuti)", + "fr_DZ": "Prancis (Aljazair)", + "fr_FR": "Prancis (Prancis)", + "fr_GA": "Prancis (Gabon)", + "fr_GF": "Prancis (Guyana Prancis)", + "fr_GN": "Prancis (Guinea)", + "fr_GP": "Prancis (Guadeloupe)", + "fr_GQ": "Prancis (Guinea Ekuatorial)", + "fr_HT": "Prancis (Haiti)", + "fr_KM": "Prancis (Komoro)", + "fr_LU": "Prancis (Luksemburg)", + "fr_MA": "Prancis (Maroko)", + "fr_MC": "Prancis (Monako)", + "fr_MF": "Prancis (Saint Martin)", + "fr_MG": "Prancis (Madagaskar)", + "fr_ML": "Prancis (Mali)", + "fr_MQ": "Prancis (Martinik)", + "fr_MR": "Prancis (Mauritania)", + "fr_MU": "Prancis (Mauritius)", + "fr_NC": "Prancis (Kaledonia Baru)", + "fr_NE": "Prancis (Niger)", + "fr_PF": "Prancis (Polinesia Prancis)", + "fr_PM": "Prancis (Saint Pierre dan Miquelon)", + "fr_RE": "Prancis (Réunion)", + "fr_RW": "Prancis (Rwanda)", + "fr_SC": "Prancis (Seychelles)", + "fr_SN": "Prancis (Senegal)", + "fr_SY": "Prancis (Suriah)", + "fr_TD": "Prancis (Cad)", + "fr_TG": "Prancis (Togo)", + "fr_TN": "Prancis (Tunisia)", + "fr_VU": "Prancis (Vanuatu)", + "fr_WF": "Prancis (Kepulauan Wallis dan Futuna)", + "fr_YT": "Prancis (Mayotte)", + "fy": "Frisia Barat", + "fy_NL": "Frisia Barat (Belanda)", + "ga": "Irlandia", + "ga_IE": "Irlandia (Irlandia)", + "gd": "Gaelik Skotlandia", + "gd_GB": "Gaelik Skotlandia (Inggris Raya)", + "gl": "Galisia", + "gl_ES": "Galisia (Spanyol)", + "gu": "Gujarat", + "gu_IN": "Gujarat (India)", + "gv": "Manx", + "gv_IM": "Manx (Pulau Man)", + "ha": "Hausa", + "ha_GH": "Hausa (Ghana)", + "ha_NE": "Hausa (Niger)", + "ha_NG": "Hausa (Nigeria)", + "he": "Ibrani", + "he_IL": "Ibrani (Israel)", + "hi": "Hindi", + "hi_IN": "Hindi (India)", + "hr": "Kroasia", + "hr_BA": "Kroasia (Bosnia dan Herzegovina)", + "hr_HR": "Kroasia (Kroasia)", + "hu": "Hungaria", + "hu_HU": "Hungaria (Hungaria)", + "hy": "Armenia", + "hy_AM": "Armenia (Armenia)", + "id": "Indonesia", + "id_ID": "Indonesia (Indonesia)", + "ig": "Igbo", + "ig_NG": "Igbo (Nigeria)", + "ii": "Sichuan Yi", + "ii_CN": "Sichuan Yi (Tiongkok)", + "is": "Islandia", + "is_IS": "Islandia (Islandia)", + "it": "Italia", + "it_CH": "Italia (Swiss)", + "it_IT": "Italia (Italia)", + "it_SM": "Italia (San Marino)", + "ja": "Jepang", + "ja_JP": "Jepang (Jepang)", + "ka": "Georgia", + "ka_GE": "Georgia (Georgia)", + "ki": "Kikuyu", + "ki_KE": "Kikuyu (Kenya)", + "kk": "Kazakh", + "kk_KZ": "Kazakh (Kazakstan)", + "kl": "Kalaallisut", + "kl_GL": "Kalaallisut (Grinlandia)", + "km": "Khmer", + "km_KH": "Khmer (Kamboja)", + "kn": "Kannada", + "kn_IN": "Kannada (India)", + "ko": "Korea", + "ko_KP": "Korea (Korea Utara)", + "ko_KR": "Korea (Korea Selatan)", + "ks": "Kashmir", + "ks_IN": "Kashmir (India)", + "kw": "Kornish", + "kw_GB": "Kornish (Inggris Raya)", + "ky": "Kirgiz", + "ky_KG": "Kirgiz (Kirgistan)", + "lb": "Luksemburg", + "lb_LU": "Luksemburg (Luksemburg)", + "lg": "Ganda", + "lg_UG": "Ganda (Uganda)", + "ln": "Lingala", + "ln_AO": "Lingala (Angola)", + "ln_CD": "Lingala (Kongo - Kinshasa)", + "ln_CF": "Lingala (Republik Afrika Tengah)", + "ln_CG": "Lingala (Kongo - Brazzaville)", + "lo": "Lao", + "lo_LA": "Lao (Laos)", + "lt": "Lituavi", + "lt_LT": "Lituavi (Lituania)", + "lu": "Luba-Katanga", + "lu_CD": "Luba-Katanga (Kongo - Kinshasa)", + "lv": "Latvi", + "lv_LV": "Latvi (Latvia)", + "mg": "Malagasi", + "mg_MG": "Malagasi (Madagaskar)", + "mk": "Makedonia", + "mk_MK": "Makedonia (Makedonia)", + "ml": "Malayalam", + "ml_IN": "Malayalam (India)", + "mn": "Mongolia", + "mn_MN": "Mongolia (Mongolia)", + "mr": "Marathi", + "mr_IN": "Marathi (India)", + "ms": "Melayu", + "ms_BN": "Melayu (Brunei)", + "ms_MY": "Melayu (Malaysia)", + "ms_SG": "Melayu (Singapura)", + "mt": "Malta", + "mt_MT": "Malta (Malta)", + "my": "Burma", + "my_MM": "Burma (Myanmar (Burma))", + "nb": "BokmÃ¥l Norwegia", + "nb_NO": "BokmÃ¥l Norwegia (Norwegia)", + "nb_SJ": "BokmÃ¥l Norwegia (Kepulauan Svalbard dan Jan Mayen)", + "nd": "Ndebele Utara", + "nd_ZW": "Ndebele Utara (Zimbabwe)", + "ne": "Nepali", + "ne_IN": "Nepali (India)", + "ne_NP": "Nepali (Nepal)", + "nl": "Belanda", + "nl_AW": "Belanda (Aruba)", + "nl_BE": "Belanda (Belgia)", + "nl_BQ": "Belanda (Karibia Belanda)", + "nl_CW": "Belanda (Curaçao)", + "nl_NL": "Belanda (Belanda)", + "nl_SR": "Belanda (Suriname)", + "nl_SX": "Belanda (Sint Maarten)", + "nn": "Nynorsk Norwegia", + "nn_NO": "Nynorsk Norwegia (Norwegia)", + "no": "Norwegia", + "no_NO": "Norwegia (Norwegia)", + "om": "Oromo", + "om_ET": "Oromo (Etiopia)", + "om_KE": "Oromo (Kenya)", + "or": "Oriya", + "or_IN": "Oriya (India)", + "os": "Ossetia", + "os_GE": "Ossetia (Georgia)", + "os_RU": "Ossetia (Rusia)", + "pa": "Punjabi", + "pa_Arab": "Punjabi (Arab)", + "pa_Arab_PK": "Punjabi (Arab, Pakistan)", + "pa_Guru": "Punjabi (Gurmukhi)", + "pa_Guru_IN": "Punjabi (Gurmukhi, India)", + "pa_IN": "Punjabi (India)", + "pa_PK": "Punjabi (Pakistan)", + "pl": "Polski", + "pl_PL": "Polski (Polandia)", + "ps": "Pashto", + "ps_AF": "Pashto (Afganistan)", + "pt": "Portugis", + "pt_AO": "Portugis (Angola)", + "pt_BR": "Portugis (Brasil)", + "pt_CH": "Portugis (Swiss)", + "pt_CV": "Portugis (Tanjung Verde)", + "pt_GQ": "Portugis (Guinea Ekuatorial)", + "pt_GW": "Portugis (Guinea-Bissau)", + "pt_LU": "Portugis (Luksemburg)", + "pt_MO": "Portugis (Makau SAR Tiongkok)", + "pt_MZ": "Portugis (Mozambik)", + "pt_PT": "Portugis (Portugal)", + "pt_ST": "Portugis (Sao Tome dan Principe)", + "pt_TL": "Portugis (Timor Leste)", + "qu": "Quechua", + "qu_BO": "Quechua (Bolivia)", + "qu_EC": "Quechua (Ekuador)", + "qu_PE": "Quechua (Peru)", + "rm": "Reto-Roman", + "rm_CH": "Reto-Roman (Swiss)", + "rn": "Rundi", + "rn_BI": "Rundi (Burundi)", + "ro": "Rumania", + "ro_MD": "Rumania (Moldova)", + "ro_RO": "Rumania (Rumania)", + "ru": "Rusia", + "ru_BY": "Rusia (Belarus)", + "ru_KG": "Rusia (Kirgistan)", + "ru_KZ": "Rusia (Kazakstan)", + "ru_MD": "Rusia (Moldova)", + "ru_RU": "Rusia (Rusia)", + "ru_UA": "Rusia (Ukraina)", + "rw": "Kinyarwanda", + "rw_RW": "Kinyarwanda (Rwanda)", + "se": "Sami Utara", + "se_FI": "Sami Utara (Finlandia)", + "se_NO": "Sami Utara (Norwegia)", + "se_SE": "Sami Utara (Swedia)", + "sg": "Sango", + "sg_CF": "Sango (Republik Afrika Tengah)", + "sh": "Serbo-Kroasia", + "sh_BA": "Serbo-Kroasia (Bosnia dan Herzegovina)", + "si": "Sinhala", + "si_LK": "Sinhala (Sri Lanka)", + "sk": "Slovak", + "sk_SK": "Slovak (Slovakia)", + "sl": "Sloven", + "sl_SI": "Sloven (Slovenia)", + "sn": "Shona", + "sn_ZW": "Shona (Zimbabwe)", + "so": "Somali", + "so_DJ": "Somali (Jibuti)", + "so_ET": "Somali (Etiopia)", + "so_KE": "Somali (Kenya)", + "so_SO": "Somali (Somalia)", + "sq": "Albania", + "sq_AL": "Albania (Albania)", + "sq_MK": "Albania (Makedonia)", + "sq_XK": "Albania (Kosovo)", + "sr": "Serb", + "sr_BA": "Serb (Bosnia dan Herzegovina)", + "sr_Cyrl": "Serb (Sirilik)", + "sr_Cyrl_BA": "Serb (Sirilik, Bosnia dan Herzegovina)", + "sr_Cyrl_ME": "Serb (Sirilik, Montenegro)", + "sr_Cyrl_RS": "Serb (Sirilik, Serbia)", + "sr_Cyrl_XK": "Serb (Sirilik, Kosovo)", + "sr_Latn": "Serb (Latin)", + "sr_Latn_BA": "Serb (Latin, Bosnia dan Herzegovina)", + "sr_Latn_ME": "Serb (Latin, Montenegro)", + "sr_Latn_RS": "Serb (Latin, Serbia)", + "sr_Latn_XK": "Serb (Latin, Kosovo)", + "sr_ME": "Serb (Montenegro)", + "sr_RS": "Serb (Serbia)", + "sr_XK": "Serb (Kosovo)", + "sv": "Swedia", + "sv_AX": "Swedia (Kepulauan Aland)", + "sv_FI": "Swedia (Finlandia)", + "sv_SE": "Swedia (Swedia)", + "sw": "Swahili", + "sw_CD": "Swahili (Kongo - Kinshasa)", + "sw_KE": "Swahili (Kenya)", + "sw_TZ": "Swahili (Tanzania)", + "sw_UG": "Swahili (Uganda)", + "ta": "Tamil", + "ta_IN": "Tamil (India)", + "ta_LK": "Tamil (Sri Lanka)", + "ta_MY": "Tamil (Malaysia)", + "ta_SG": "Tamil (Singapura)", + "te": "Telugu", + "te_IN": "Telugu (India)", + "th": "Thai", + "th_TH": "Thai (Thailand)", + "ti": "Tigrinya", + "ti_ER": "Tigrinya (Eritrea)", + "ti_ET": "Tigrinya (Etiopia)", + "tl": "Tagalog", + "tl_PH": "Tagalog (Filipina)", + "to": "Tonga", + "to_TO": "Tonga (Tonga)", + "tr": "Turki", + "tr_CY": "Turki (Siprus)", + "tr_TR": "Turki (Turki)", + "ug": "Uyghur", + "ug_CN": "Uyghur (Tiongkok)", + "uk": "Ukraina", + "uk_UA": "Ukraina (Ukraina)", + "ur": "Urdu", + "ur_IN": "Urdu (India)", + "ur_PK": "Urdu (Pakistan)", + "uz": "Uzbek", + "uz_AF": "Uzbek (Afganistan)", + "uz_Arab": "Uzbek (Arab)", + "uz_Arab_AF": "Uzbek (Arab, Afganistan)", + "uz_Cyrl": "Uzbek (Sirilik)", + "uz_Cyrl_UZ": "Uzbek (Sirilik, Uzbekistan)", + "uz_Latn": "Uzbek (Latin)", + "uz_Latn_UZ": "Uzbek (Latin, Uzbekistan)", + "uz_UZ": "Uzbek (Uzbekistan)", + "vi": "Vietnam", + "vi_VN": "Vietnam (Vietnam)", + "yi": "Yiddish", + "yo": "Yoruba", + "yo_BJ": "Yoruba (Benin)", + "yo_NG": "Yoruba (Nigeria)", + "zh": "Tionghoa", + "zh_CN": "Tionghoa (Tiongkok)", + "zh_HK": "Tionghoa (Hong Kong SAR Tiongkok)", + "zh_Hans": "Tionghoa (Sederhana)", + "zh_Hans_CN": "Tionghoa (Sederhana, Tiongkok)", + "zh_Hans_HK": "Tionghoa (Sederhana, Hong Kong SAR Tiongkok)", + "zh_Hans_MO": "Tionghoa (Sederhana, Makau SAR Tiongkok)", + "zh_Hans_SG": "Tionghoa (Sederhana, Singapura)", + "zh_Hant": "Tionghoa (Tradisional)", + "zh_Hant_HK": "Tionghoa (Tradisional, Hong Kong SAR Tiongkok)", + "zh_Hant_MO": "Tionghoa (Tradisional, Makau SAR Tiongkok)", + "zh_Hant_TW": "Tionghoa (Tradisional, Taiwan)", + "zh_MO": "Tionghoa (Makau SAR Tiongkok)", + "zh_SG": "Tionghoa (Singapura)", + "zh_TW": "Tionghoa (Taiwan)", + "zu": "Zulu", + "zu_ZA": "Zulu (Afrika Selatan)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ig.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ig.json new file mode 100644 index 0000000000000000000000000000000000000000..407475c1594f36e99ceb6973c3488ec40240355e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ig.json @@ -0,0 +1,59 @@ +{ + "Names": { + "ak": "Akan", + "am": "Amariikị", + "ar": "Arabiikị", + "ar_KM": "Arabiikị (Comorosu)", + "ar_LY": "Arabiikị (Libyia)", + "be": "Belaruusu", + "bg": "Bá»lụgarịa", + "bn": "Bengali", + "cs": "Cheekị", + "de": "Jamaan", + "el": "Giriikị", + "en": "Oyibo", + "en_BM": "Oyibo (Bemuda)", + "en_NG": "Oyibo (Nigeria)", + "es": "Panya", + "fa": "Peshan", + "fr": "Fụrench", + "fr_BJ": "Fụrench (Binin)", + "fr_HT": "Fụrench (Hati)", + "fr_KM": "Fụrench (Comorosu)", + "ha": "Awụsa", + "ha_NG": "Awụsa (Nigeria)", + "hi": "Hindi", + "hu": "Magịya", + "id": "Indonisia", + "ig": "Igbo", + "ig_NG": "Igbo (Nigeria)", + "it": "Italo", + "ja": "Japanese", + "km": "Keme, Etiti", + "ko": "Koria", + "ms": "Maleyi", + "my": "Mịanma", + "ne": "Nepali", + "nl": "Dá»á»ch", + "pa": "Punjabi", + "pl": "Poliishi", + "pt": "Potoki", + "ro": "Rumenia", + "ru": "Rá»shan", + "rw": "Rụwanda", + "so": "Somali", + "sv": "Sụwidiishi", + "ta": "Tamụlụ", + "th": "Taị", + "tr": "Tá»kiishi", + "uk": "Ukureenị", + "ur": "Urudu", + "vi": "Viyetịnaamụ", + "yo": "Yoruba", + "yo_BJ": "Yoruba (Binin)", + "yo_NG": "Yoruba (Nigeria)", + "zh": "Mandarịịnị", + "zh_CN": "Mandarịịnị (Chaina)", + "zu": "Zulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ii.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ii.json new file mode 100644 index 0000000000000000000000000000000000000000..83528b0bb82ec9cf4dfffa7e8d6b8891d9050876 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ii.json @@ -0,0 +1,32 @@ +{ + "Names": { + "de": "ꄓꇩꉙ", + "de_DE": "ꄓꇩꉙ (ꄓꇩ)", + "de_IT": "ꄓꇩꉙ (ꑴꄊꆺ)", + "en": "ꑱꇩꉙ", + "en_DE": "ꑱꇩꉙ (ꄓꇩ)", + "en_GB": "ꑱꇩꉙ (ꑱꇩ)", + "en_IN": "ꑱꇩꉙ (ê‘´ê„—)", + "en_US": "ꑱꇩꉙ (ꂰꇩ)", + "es": "ꑭꀠꑸꉙ", + "es_BR": "ꑭꀠꑸꉙ (ꀠꑭ)", + "es_US": "ꑭꀠꑸꉙ (ꂰꇩ)", + "fr": "ꃔꇩꉙ", + "fr_FR": "ꃔꇩꉙ (ꃔꇩ)", + "ii": "ꆈꌠꉙ", + "ii_CN": "ꆈꌠꉙ (êꇩ)", + "it": "ꑴꄊꆺꉙ", + "it_IT": "ꑴꄊꆺꉙ (ꑴꄊꆺ)", + "ja": "êꀪꉙ", + "ja_JP": "êꀪꉙ (êꀪ)", + "pt": "êꄨꑸꉙ", + "pt_BR": "êꄨꑸꉙ (ꀠꑭ)", + "ru": "ꊉꇩꉙ", + "ru_RU": "ꊉꇩꉙ (ꊉꇆꌦ)", + "zh": "êꇩꉙ", + "zh_CN": "êꇩꉙ (êꇩ)", + "zh_Hans": "êꇩꉙ (êˆê¯ê‰Œêˆ²ê±ê‚·)", + "zh_Hans_CN": "êꇩꉙ (êˆê¯ê‰Œêˆ²ê±ê‚·, êꇩ)", + "zh_Hant": "êꇩꉙ (ꀎê‹ê‰Œêˆ²ê±ê‚·)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/in.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/in.json new file mode 100644 index 0000000000000000000000000000000000000000..822ec3eefe45add3bee48982d52877c7e8c80fc5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/in.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "id" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/in_ID.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/in_ID.json new file mode 100644 index 0000000000000000000000000000000000000000..959ca25bf195a14068954a53dc18852af4573568 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/in_ID.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "id_ID" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/is.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/is.json new file mode 100644 index 0000000000000000000000000000000000000000..222290aeec12a6feb750a5323ab88fff6eea54f4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/is.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afríkanska", + "af_NA": "afríkanska (Namibía)", + "af_ZA": "afríkanska (Suður-Afríka)", + "ak": "akan", + "ak_GH": "akan (Gana)", + "am": "amharíska", + "am_ET": "amharíska (Eþíópía)", + "ar": "arabíska", + "ar_AE": "arabíska (Sameinuðu arabísku furstadæmin)", + "ar_BH": "arabíska (Barein)", + "ar_DJ": "arabíska (Djíbútí)", + "ar_DZ": "arabíska (Alsír)", + "ar_EG": "arabíska (Egyptaland)", + "ar_EH": "arabíska (Vestur-Sahara)", + "ar_ER": "arabíska (Erítrea)", + "ar_IL": "arabíska (Ãsrael)", + "ar_IQ": "arabíska (Ãrak)", + "ar_JO": "arabíska (Jórdanía)", + "ar_KM": "arabíska (Kómoreyjar)", + "ar_KW": "arabíska (Kúveit)", + "ar_LB": "arabíska (Líbanon)", + "ar_LY": "arabíska (Líbía)", + "ar_MA": "arabíska (Marokkó)", + "ar_MR": "arabíska (Máritanía)", + "ar_OM": "arabíska (Óman)", + "ar_PS": "arabíska (Heimastjórnarsvæði Palestínumanna)", + "ar_QA": "arabíska (Katar)", + "ar_SA": "arabíska (Sádi-Arabía)", + "ar_SD": "arabíska (Súdan)", + "ar_SO": "arabíska (Sómalía)", + "ar_SS": "arabíska (Suður-Súdan)", + "ar_SY": "arabíska (Sýrland)", + "ar_TD": "arabíska (Tsjad)", + "ar_TN": "arabíska (Túnis)", + "ar_YE": "arabíska (Jemen)", + "as": "assamska", + "as_IN": "assamska (Indland)", + "az": "aserska", + "az_AZ": "aserska (Aserbaídsjan)", + "az_Cyrl": "aserska (kyrillískt)", + "az_Cyrl_AZ": "aserska (kyrillískt, Aserbaídsjan)", + "az_Latn": "aserska (latneskt)", + "az_Latn_AZ": "aserska (latneskt, Aserbaídsjan)", + "be": "hvítrússneska", + "be_BY": "hvítrússneska (Hvíta-Rússland)", + "bg": "búlgarska", + "bg_BG": "búlgarska (Búlgaría)", + "bm": "bambara", + "bm_ML": "bambara (Malí)", + "bn": "bengalska", + "bn_BD": "bengalska (Bangladess)", + "bn_IN": "bengalska (Indland)", + "bo": "tíbeska", + "bo_CN": "tíbeska (Kína)", + "bo_IN": "tíbeska (Indland)", + "br": "bretónska", + "br_FR": "bretónska (Frakkland)", + "bs": "bosníska", + "bs_BA": "bosníska (Bosnía og Hersegóvína)", + "bs_Cyrl": "bosníska (kyrillískt)", + "bs_Cyrl_BA": "bosníska (kyrillískt, Bosnía og Hersegóvína)", + "bs_Latn": "bosníska (latneskt)", + "bs_Latn_BA": "bosníska (latneskt, Bosnía og Hersegóvína)", + "ca": "katalónska", + "ca_AD": "katalónska (Andorra)", + "ca_ES": "katalónska (Spánn)", + "ca_FR": "katalónska (Frakkland)", + "ca_IT": "katalónska (Ãtalía)", + "ce": "tsjetsjenska", + "ce_RU": "tsjetsjenska (Rússland)", + "cs": "tékkneska", + "cs_CZ": "tékkneska (Tékkland)", + "cy": "velska", + "cy_GB": "velska (Bretland)", + "da": "danska", + "da_DK": "danska (Danmörk)", + "da_GL": "danska (Grænland)", + "de": "þýska", + "de_AT": "þýska (Austurríki)", + "de_BE": "þýska (Belgía)", + "de_CH": "þýska (Sviss)", + "de_DE": "þýska (Þýskaland)", + "de_IT": "þýska (Ãtalía)", + "de_LI": "þýska (Liechtenstein)", + "de_LU": "þýska (Lúxemborg)", + "dz": "dsongka", + "dz_BT": "dsongka (Bútan)", + "ee": "ewe", + "ee_GH": "ewe (Gana)", + "ee_TG": "ewe (Tógó)", + "el": "gríska", + "el_CY": "gríska (Kýpur)", + "el_GR": "gríska (Grikkland)", + "en": "enska", + "en_AG": "enska (Antígva og Barbúda)", + "en_AI": "enska (Angvilla)", + "en_AS": "enska (Bandaríska Samóa)", + "en_AT": "enska (Austurríki)", + "en_AU": "enska (Ãstralía)", + "en_BB": "enska (Barbados)", + "en_BE": "enska (Belgía)", + "en_BI": "enska (Búrúndí)", + "en_BM": "enska (Bermúdaeyjar)", + "en_BS": "enska (Bahamaeyjar)", + "en_BW": "enska (Botsvana)", + "en_BZ": "enska (Belís)", + "en_CA": "enska (Kanada)", + "en_CC": "enska (Kókoseyjar (Keeling))", + "en_CH": "enska (Sviss)", + "en_CK": "enska (Cooks-eyjar)", + "en_CM": "enska (Kamerún)", + "en_CX": "enska (Jólaey)", + "en_CY": "enska (Kýpur)", + "en_DE": "enska (Þýskaland)", + "en_DG": "enska (Diego Garcia)", + "en_DK": "enska (Danmörk)", + "en_DM": "enska (Dóminíka)", + "en_ER": "enska (Erítrea)", + "en_FI": "enska (Finnland)", + "en_FJ": "enska (Fídjíeyjar)", + "en_FK": "enska (Falklandseyjar)", + "en_FM": "enska (Míkrónesía)", + "en_GB": "enska (Bretland)", + "en_GD": "enska (Grenada)", + "en_GG": "enska (Guernsey)", + "en_GH": "enska (Gana)", + "en_GI": "enska (Gíbraltar)", + "en_GM": "enska (Gambía)", + "en_GU": "enska (Gvam)", + "en_GY": "enska (Gvæjana)", + "en_HK": "enska (Sjálfstjórnarsvæðið Hong Kong)", + "en_IE": "enska (Ãrland)", + "en_IL": "enska (Ãsrael)", + "en_IM": "enska (Mön)", + "en_IN": "enska (Indland)", + "en_IO": "enska (Bresku Indlandshafseyjar)", + "en_JE": "enska (Jersey)", + "en_JM": "enska (Jamaíka)", + "en_KE": "enska (Kenía)", + "en_KI": "enska (Kíribatí)", + "en_KN": "enska (Sankti Kitts og Nevis)", + "en_KY": "enska (Caymaneyjar)", + "en_LC": "enska (Sankti Lúsía)", + "en_LR": "enska (Líbería)", + "en_LS": "enska (Lesótó)", + "en_MG": "enska (Madagaskar)", + "en_MH": "enska (Marshalleyjar)", + "en_MO": "enska (Sjálfstjórnarsvæðið Makaó)", + "en_MP": "enska (Norður-Maríanaeyjar)", + "en_MS": "enska (Montserrat)", + "en_MT": "enska (Malta)", + "en_MU": "enska (Máritíus)", + "en_MW": "enska (Malaví)", + "en_MY": "enska (Malasía)", + "en_NA": "enska (Namibía)", + "en_NF": "enska (Norfolkeyja)", + "en_NG": "enska (Nígería)", + "en_NL": "enska (Holland)", + "en_NR": "enska (Nárú)", + "en_NU": "enska (Niue)", + "en_NZ": "enska (Nýja-Sjáland)", + "en_PG": "enska (Papúa Nýja-Gínea)", + "en_PH": "enska (Filippseyjar)", + "en_PK": "enska (Pakistan)", + "en_PN": "enska (Pitcairn-eyjar)", + "en_PR": "enska (Púertó Ríkó)", + "en_PW": "enska (Palá)", + "en_RW": "enska (Rúanda)", + "en_SB": "enska (Salómonseyjar)", + "en_SC": "enska (Seychelles-eyjar)", + "en_SD": "enska (Súdan)", + "en_SE": "enska (Svíþjóð)", + "en_SG": "enska (Singapúr)", + "en_SH": "enska (Sankti Helena)", + "en_SI": "enska (Slóvenía)", + "en_SL": "enska (Síerra Leóne)", + "en_SS": "enska (Suður-Súdan)", + "en_SX": "enska (Sankti Martin)", + "en_SZ": "enska (Svasíland)", + "en_TC": "enska (Turks- og Caicoseyjar)", + "en_TK": "enska (Tókelá)", + "en_TO": "enska (Tonga)", + "en_TT": "enska (Trínidad og Tóbagó)", + "en_TV": "enska (Túvalú)", + "en_TZ": "enska (Tansanía)", + "en_UG": "enska (Úganda)", + "en_UM": "enska (Smáeyjar Bandaríkjanna)", + "en_US": "enska (Bandaríkin)", + "en_VC": "enska (Sankti Vinsent og Grenadíneyjar)", + "en_VG": "enska (Bresku Jómfrúaeyjar)", + "en_VI": "enska (Bandarísku Jómfrúaeyjar)", + "en_VU": "enska (Vanúatú)", + "en_WS": "enska (Samóa)", + "en_ZA": "enska (Suður-Afríka)", + "en_ZM": "enska (Sambía)", + "en_ZW": "enska (Simbabve)", + "eo": "esperantó", + "es": "spænska", + "es_AR": "spænska (Argentína)", + "es_BO": "spænska (Bólivía)", + "es_BR": "spænska (Brasilía)", + "es_CL": "spænska (Síle)", + "es_CO": "spænska (Kólumbía)", + "es_CR": "spænska (Kostaríka)", + "es_CU": "spænska (Kúba)", + "es_DO": "spænska (Dóminíska lýðveldið)", + "es_EA": "spænska (Ceuta og Melilla)", + "es_EC": "spænska (Ekvador)", + "es_ES": "spænska (Spánn)", + "es_GQ": "spænska (Miðbaugs-Gínea)", + "es_GT": "spænska (Gvatemala)", + "es_HN": "spænska (Hondúras)", + "es_IC": "spænska (Kanaríeyjar)", + "es_MX": "spænska (Mexíkó)", + "es_NI": "spænska (Níkaragva)", + "es_PA": "spænska (Panama)", + "es_PE": "spænska (Perú)", + "es_PH": "spænska (Filippseyjar)", + "es_PR": "spænska (Púertó Ríkó)", + "es_PY": "spænska (Paragvæ)", + "es_SV": "spænska (El Salvador)", + "es_US": "spænska (Bandaríkin)", + "es_UY": "spænska (Úrúgvæ)", + "es_VE": "spænska (Venesúela)", + "et": "eistneska", + "et_EE": "eistneska (Eistland)", + "eu": "baskneska", + "eu_ES": "baskneska (Spánn)", + "fa": "persneska", + "fa_AF": "persneska (Afganistan)", + "fa_IR": "persneska (Ãran)", + "ff": "fúla", + "ff_CM": "fúla (Kamerún)", + "ff_GN": "fúla (Gínea)", + "ff_MR": "fúla (Máritanía)", + "ff_SN": "fúla (Senegal)", + "fi": "finnska", + "fi_FI": "finnska (Finnland)", + "fo": "færeyska", + "fo_DK": "færeyska (Danmörk)", + "fo_FO": "færeyska (Færeyjar)", + "fr": "franska", + "fr_BE": "franska (Belgía)", + "fr_BF": "franska (Búrkína Fasó)", + "fr_BI": "franska (Búrúndí)", + "fr_BJ": "franska (Benín)", + "fr_BL": "franska (Sankti Bartólómeusareyjar)", + "fr_CA": "franska (Kanada)", + "fr_CD": "franska (Kongó-Kinshasa)", + "fr_CF": "franska (Mið-Afríkulýðveldið)", + "fr_CG": "franska (Kongó-Brazzaville)", + "fr_CH": "franska (Sviss)", + "fr_CI": "franska (Fílabeinsströndin)", + "fr_CM": "franska (Kamerún)", + "fr_DJ": "franska (Djíbútí)", + "fr_DZ": "franska (Alsír)", + "fr_FR": "franska (Frakkland)", + "fr_GA": "franska (Gabon)", + "fr_GF": "franska (Franska Gvæjana)", + "fr_GN": "franska (Gínea)", + "fr_GP": "franska (Gvadelúpeyjar)", + "fr_GQ": "franska (Miðbaugs-Gínea)", + "fr_HT": "franska (Haítí)", + "fr_KM": "franska (Kómoreyjar)", + "fr_LU": "franska (Lúxemborg)", + "fr_MA": "franska (Marokkó)", + "fr_MC": "franska (Mónakó)", + "fr_MF": "franska (St. Martin)", + "fr_MG": "franska (Madagaskar)", + "fr_ML": "franska (Malí)", + "fr_MQ": "franska (Martiník)", + "fr_MR": "franska (Máritanía)", + "fr_MU": "franska (Máritíus)", + "fr_NC": "franska (Nýja-Kaledónía)", + "fr_NE": "franska (Níger)", + "fr_PF": "franska (Franska Pólýnesía)", + "fr_PM": "franska (Sankti Pierre og Miquelon)", + "fr_RE": "franska (Réunion)", + "fr_RW": "franska (Rúanda)", + "fr_SC": "franska (Seychelles-eyjar)", + "fr_SN": "franska (Senegal)", + "fr_SY": "franska (Sýrland)", + "fr_TD": "franska (Tsjad)", + "fr_TG": "franska (Tógó)", + "fr_TN": "franska (Túnis)", + "fr_VU": "franska (Vanúatú)", + "fr_WF": "franska (Wallis- og Fútúnaeyjar)", + "fr_YT": "franska (Mayotte)", + "fy": "vesturfrísneska", + "fy_NL": "vesturfrísneska (Holland)", + "ga": "írska", + "ga_IE": "írska (Ãrland)", + "gd": "skosk gelíska", + "gd_GB": "skosk gelíska (Bretland)", + "gl": "galíanska", + "gl_ES": "galíanska (Spánn)", + "gu": "gújaratí", + "gu_IN": "gújaratí (Indland)", + "gv": "manska", + "gv_IM": "manska (Mön)", + "ha": "hása", + "ha_GH": "hása (Gana)", + "ha_NE": "hása (Níger)", + "ha_NG": "hása (Nígería)", + "he": "hebreska", + "he_IL": "hebreska (Ãsrael)", + "hi": "hindí", + "hi_IN": "hindí (Indland)", + "hr": "króatíska", + "hr_BA": "króatíska (Bosnía og Hersegóvína)", + "hr_HR": "króatíska (Króatía)", + "hu": "ungverska", + "hu_HU": "ungverska (Ungverjaland)", + "hy": "armenska", + "hy_AM": "armenska (Armenía)", + "id": "indónesíska", + "id_ID": "indónesíska (Indónesía)", + "ig": "ígbó", + "ig_NG": "ígbó (Nígería)", + "ii": "sísúanjí", + "ii_CN": "sísúanjí (Kína)", + "is": "íslenska", + "is_IS": "íslenska (Ãsland)", + "it": "ítalska", + "it_CH": "ítalska (Sviss)", + "it_IT": "ítalska (Ãtalía)", + "it_SM": "ítalska (San Marínó)", + "ja": "japanska", + "ja_JP": "japanska (Japan)", + "ka": "georgíska", + "ka_GE": "georgíska (Georgía)", + "ki": "kíkújú", + "ki_KE": "kíkújú (Kenía)", + "kk": "kasakska", + "kk_KZ": "kasakska (Kasakstan)", + "kl": "grænlenska", + "kl_GL": "grænlenska (Grænland)", + "km": "kmer", + "km_KH": "kmer (Kambódía)", + "kn": "kannada", + "kn_IN": "kannada (Indland)", + "ko": "kóreska", + "ko_KP": "kóreska (Norður-Kórea)", + "ko_KR": "kóreska (Suður-Kórea)", + "ks": "kasmírska", + "ks_IN": "kasmírska (Indland)", + "kw": "kornbreska", + "kw_GB": "kornbreska (Bretland)", + "ky": "kirgiska", + "ky_KG": "kirgiska (Kirgistan)", + "lb": "lúxemborgíska", + "lb_LU": "lúxemborgíska (Lúxemborg)", + "lg": "ganda", + "lg_UG": "ganda (Úganda)", + "ln": "lingala", + "ln_AO": "lingala (Angóla)", + "ln_CD": "lingala (Kongó-Kinshasa)", + "ln_CF": "lingala (Mið-Afríkulýðveldið)", + "ln_CG": "lingala (Kongó-Brazzaville)", + "lo": "laó", + "lo_LA": "laó (Laos)", + "lt": "litháíska", + "lt_LT": "litháíska (Litháen)", + "lu": "lúbakatanga", + "lu_CD": "lúbakatanga (Kongó-Kinshasa)", + "lv": "lettneska", + "lv_LV": "lettneska (Lettland)", + "mg": "malagasíska", + "mg_MG": "malagasíska (Madagaskar)", + "mk": "makedónska", + "mk_MK": "makedónska (Makedónía)", + "ml": "malajalam", + "ml_IN": "malajalam (Indland)", + "mn": "mongólska", + "mn_MN": "mongólska (Mongólía)", + "mr": "maratí", + "mr_IN": "maratí (Indland)", + "ms": "malaíska", + "ms_BN": "malaíska (Brúnei)", + "ms_MY": "malaíska (Malasía)", + "ms_SG": "malaíska (Singapúr)", + "mt": "maltneska", + "mt_MT": "maltneska (Malta)", + "my": "burmneska", + "my_MM": "burmneska (Mjanmar (Búrma))", + "nb": "norskt bókmál", + "nb_NO": "norskt bókmál (Noregur)", + "nb_SJ": "norskt bókmál (Svalbarði og Jan Mayen)", + "nd": "norður-ndebele", + "nd_ZW": "norður-ndebele (Simbabve)", + "ne": "nepalska", + "ne_IN": "nepalska (Indland)", + "ne_NP": "nepalska (Nepal)", + "nl": "hollenska", + "nl_AW": "hollenska (Arúba)", + "nl_BE": "hollenska (Belgía)", + "nl_BQ": "hollenska (Karíbahafshluti Hollands)", + "nl_CW": "hollenska (Curacao)", + "nl_NL": "hollenska (Holland)", + "nl_SR": "hollenska (Súrínam)", + "nl_SX": "hollenska (Sankti Martin)", + "nn": "nýnorska", + "nn_NO": "nýnorska (Noregur)", + "no": "norska", + "no_NO": "norska (Noregur)", + "om": "oromo", + "om_ET": "oromo (Eþíópía)", + "om_KE": "oromo (Kenía)", + "or": "óría", + "or_IN": "óría (Indland)", + "os": "ossetíska", + "os_GE": "ossetíska (Georgía)", + "os_RU": "ossetíska (Rússland)", + "pa": "púnjabí", + "pa_Arab": "púnjabí (arabískt)", + "pa_Arab_PK": "púnjabí (arabískt, Pakistan)", + "pa_Guru": "púnjabí (gurmukhi)", + "pa_Guru_IN": "púnjabí (gurmukhi, Indland)", + "pa_IN": "púnjabí (Indland)", + "pa_PK": "púnjabí (Pakistan)", + "pl": "pólska", + "pl_PL": "pólska (Pólland)", + "ps": "pastú", + "ps_AF": "pastú (Afganistan)", + "pt": "portúgalska", + "pt_AO": "portúgalska (Angóla)", + "pt_BR": "portúgalska (Brasilía)", + "pt_CH": "portúgalska (Sviss)", + "pt_CV": "portúgalska (Grænhöfðaeyjar)", + "pt_GQ": "portúgalska (Miðbaugs-Gínea)", + "pt_GW": "portúgalska (Gínea-Bissá)", + "pt_LU": "portúgalska (Lúxemborg)", + "pt_MO": "portúgalska (Sjálfstjórnarsvæðið Makaó)", + "pt_MZ": "portúgalska (Mósambík)", + "pt_PT": "portúgalska (Portúgal)", + "pt_ST": "portúgalska (Saó Tóme og Prinsípe)", + "pt_TL": "portúgalska (Tímor-Leste)", + "qu": "kvesjúa", + "qu_BO": "kvesjúa (Bólivía)", + "qu_EC": "kvesjúa (Ekvador)", + "qu_PE": "kvesjúa (Perú)", + "rm": "rómanska", + "rm_CH": "rómanska (Sviss)", + "rn": "rúndí", + "rn_BI": "rúndí (Búrúndí)", + "ro": "rúmenska", + "ro_MD": "rúmenska (Moldóva)", + "ro_RO": "rúmenska (Rúmenía)", + "ru": "rússneska", + "ru_BY": "rússneska (Hvíta-Rússland)", + "ru_KG": "rússneska (Kirgistan)", + "ru_KZ": "rússneska (Kasakstan)", + "ru_MD": "rússneska (Moldóva)", + "ru_RU": "rússneska (Rússland)", + "ru_UA": "rússneska (Úkraína)", + "rw": "kínjarvanda", + "rw_RW": "kínjarvanda (Rúanda)", + "se": "norðursamíska", + "se_FI": "norðursamíska (Finnland)", + "se_NO": "norðursamíska (Noregur)", + "se_SE": "norðursamíska (Svíþjóð)", + "sg": "sangó", + "sg_CF": "sangó (Mið-Afríkulýðveldið)", + "sh": "serbókróatíska", + "sh_BA": "serbókróatíska (Bosnía og Hersegóvína)", + "si": "singalíska", + "si_LK": "singalíska (Srí Lanka)", + "sk": "slóvakíska", + "sk_SK": "slóvakíska (Slóvakía)", + "sl": "slóvenska", + "sl_SI": "slóvenska (Slóvenía)", + "sn": "shona", + "sn_ZW": "shona (Simbabve)", + "so": "sómalska", + "so_DJ": "sómalska (Djíbútí)", + "so_ET": "sómalska (Eþíópía)", + "so_KE": "sómalska (Kenía)", + "so_SO": "sómalska (Sómalía)", + "sq": "albanska", + "sq_AL": "albanska (Albanía)", + "sq_MK": "albanska (Makedónía)", + "sq_XK": "albanska (Kósóvó)", + "sr": "serbneska", + "sr_BA": "serbneska (Bosnía og Hersegóvína)", + "sr_Cyrl": "serbneska (kyrillískt)", + "sr_Cyrl_BA": "serbneska (kyrillískt, Bosnía og Hersegóvína)", + "sr_Cyrl_ME": "serbneska (kyrillískt, Svartfjallaland)", + "sr_Cyrl_RS": "serbneska (kyrillískt, Serbía)", + "sr_Cyrl_XK": "serbneska (kyrillískt, Kósóvó)", + "sr_Latn": "serbneska (latneskt)", + "sr_Latn_BA": "serbneska (latneskt, Bosnía og Hersegóvína)", + "sr_Latn_ME": "serbneska (latneskt, Svartfjallaland)", + "sr_Latn_RS": "serbneska (latneskt, Serbía)", + "sr_Latn_XK": "serbneska (latneskt, Kósóvó)", + "sr_ME": "serbneska (Svartfjallaland)", + "sr_RS": "serbneska (Serbía)", + "sr_XK": "serbneska (Kósóvó)", + "sv": "sænska", + "sv_AX": "sænska (Ãlandseyjar)", + "sv_FI": "sænska (Finnland)", + "sv_SE": "sænska (Svíþjóð)", + "sw": "svahílí", + "sw_CD": "svahílí (Kongó-Kinshasa)", + "sw_KE": "svahílí (Kenía)", + "sw_TZ": "svahílí (Tansanía)", + "sw_UG": "svahílí (Úganda)", + "ta": "tamílska", + "ta_IN": "tamílska (Indland)", + "ta_LK": "tamílska (Srí Lanka)", + "ta_MY": "tamílska (Malasía)", + "ta_SG": "tamílska (Singapúr)", + "te": "telúgú", + "te_IN": "telúgú (Indland)", + "th": "taílenska", + "th_TH": "taílenska (Taíland)", + "ti": "tígrinja", + "ti_ER": "tígrinja (Erítrea)", + "ti_ET": "tígrinja (Eþíópía)", + "tl": "tagalog", + "tl_PH": "tagalog (Filippseyjar)", + "to": "tongverska", + "to_TO": "tongverska (Tonga)", + "tr": "tyrkneska", + "tr_CY": "tyrkneska (Kýpur)", + "tr_TR": "tyrkneska (Tyrkland)", + "ug": "úígúr", + "ug_CN": "úígúr (Kína)", + "uk": "úkraínska", + "uk_UA": "úkraínska (Úkraína)", + "ur": "úrdú", + "ur_IN": "úrdú (Indland)", + "ur_PK": "úrdú (Pakistan)", + "uz": "úsbekska", + "uz_AF": "úsbekska (Afganistan)", + "uz_Arab": "úsbekska (arabískt)", + "uz_Arab_AF": "úsbekska (arabískt, Afganistan)", + "uz_Cyrl": "úsbekska (kyrillískt)", + "uz_Cyrl_UZ": "úsbekska (kyrillískt, Úsbekistan)", + "uz_Latn": "úsbekska (latneskt)", + "uz_Latn_UZ": "úsbekska (latneskt, Úsbekistan)", + "uz_UZ": "úsbekska (Úsbekistan)", + "vi": "víetnamska", + "vi_VN": "víetnamska (Víetnam)", + "yi": "jiddíska", + "yo": "jórúba", + "yo_BJ": "jórúba (Benín)", + "yo_NG": "jórúba (Nígería)", + "zh": "kínverska", + "zh_CN": "kínverska (Kína)", + "zh_HK": "kínverska (Sjálfstjórnarsvæðið Hong Kong)", + "zh_Hans": "kínverska (einfaldað)", + "zh_Hans_CN": "kínverska (einfaldað, Kína)", + "zh_Hans_HK": "kínverska (einfaldað, Sjálfstjórnarsvæðið Hong Kong)", + "zh_Hans_MO": "kínverska (einfaldað, Sjálfstjórnarsvæðið Makaó)", + "zh_Hans_SG": "kínverska (einfaldað, Singapúr)", + "zh_Hant": "kínverska (hefðbundið)", + "zh_Hant_HK": "kínverska (hefðbundið, Sjálfstjórnarsvæðið Hong Kong)", + "zh_Hant_MO": "kínverska (hefðbundið, Sjálfstjórnarsvæðið Makaó)", + "zh_Hant_TW": "kínverska (hefðbundið, Taívan)", + "zh_MO": "kínverska (Sjálfstjórnarsvæðið Makaó)", + "zh_SG": "kínverska (Singapúr)", + "zh_TW": "kínverska (Taívan)", + "zu": "súlú", + "zu_ZA": "súlú (Suður-Afríka)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/it.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/it.json new file mode 100644 index 0000000000000000000000000000000000000000..983f189d65b8d6e1c5ff82e0721b6077fefff436 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/it.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibia)", + "af_ZA": "afrikaans (Sudafrica)", + "ak": "akan", + "ak_GH": "akan (Ghana)", + "am": "amarico", + "am_ET": "amarico (Etiopia)", + "ar": "arabo", + "ar_AE": "arabo (Emirati Arabi Uniti)", + "ar_BH": "arabo (Bahrein)", + "ar_DJ": "arabo (Gibuti)", + "ar_DZ": "arabo (Algeria)", + "ar_EG": "arabo (Egitto)", + "ar_EH": "arabo (Sahara occidentale)", + "ar_ER": "arabo (Eritrea)", + "ar_IL": "arabo (Israele)", + "ar_IQ": "arabo (Iraq)", + "ar_JO": "arabo (Giordania)", + "ar_KM": "arabo (Comore)", + "ar_KW": "arabo (Kuwait)", + "ar_LB": "arabo (Libano)", + "ar_LY": "arabo (Libia)", + "ar_MA": "arabo (Marocco)", + "ar_MR": "arabo (Mauritania)", + "ar_OM": "arabo (Oman)", + "ar_PS": "arabo (Territori palestinesi)", + "ar_QA": "arabo (Qatar)", + "ar_SA": "arabo (Arabia Saudita)", + "ar_SD": "arabo (Sudan)", + "ar_SO": "arabo (Somalia)", + "ar_SS": "arabo (Sud Sudan)", + "ar_SY": "arabo (Siria)", + "ar_TD": "arabo (Ciad)", + "ar_TN": "arabo (Tunisia)", + "ar_YE": "arabo (Yemen)", + "as": "assamese", + "as_IN": "assamese (India)", + "az": "azerbaigiano", + "az_AZ": "azerbaigiano (Azerbaigian)", + "az_Cyrl": "azerbaigiano (cirillico)", + "az_Cyrl_AZ": "azerbaigiano (cirillico, Azerbaigian)", + "az_Latn": "azerbaigiano (latino)", + "az_Latn_AZ": "azerbaigiano (latino, Azerbaigian)", + "be": "bielorusso", + "be_BY": "bielorusso (Bielorussia)", + "bg": "bulgaro", + "bg_BG": "bulgaro (Bulgaria)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengalese", + "bn_BD": "bengalese (Bangladesh)", + "bn_IN": "bengalese (India)", + "bo": "tibetano", + "bo_CN": "tibetano (Cina)", + "bo_IN": "tibetano (India)", + "br": "bretone", + "br_FR": "bretone (Francia)", + "bs": "bosniaco", + "bs_BA": "bosniaco (Bosnia ed Erzegovina)", + "bs_Cyrl": "bosniaco (cirillico)", + "bs_Cyrl_BA": "bosniaco (cirillico, Bosnia ed Erzegovina)", + "bs_Latn": "bosniaco (latino)", + "bs_Latn_BA": "bosniaco (latino, Bosnia ed Erzegovina)", + "ca": "catalano", + "ca_AD": "catalano (Andorra)", + "ca_ES": "catalano (Spagna)", + "ca_FR": "catalano (Francia)", + "ca_IT": "catalano (Italia)", + "ce": "ceceno", + "ce_RU": "ceceno (Russia)", + "cs": "ceco", + "cs_CZ": "ceco (Repubblica Ceca)", + "cy": "gallese", + "cy_GB": "gallese (Regno Unito)", + "da": "danese", + "da_DK": "danese (Danimarca)", + "da_GL": "danese (Groenlandia)", + "de": "tedesco", + "de_AT": "tedesco (Austria)", + "de_BE": "tedesco (Belgio)", + "de_CH": "tedesco (Svizzera)", + "de_DE": "tedesco (Germania)", + "de_IT": "tedesco (Italia)", + "de_LI": "tedesco (Liechtenstein)", + "de_LU": "tedesco (Lussemburgo)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhutan)", + "ee": "ewe", + "ee_GH": "ewe (Ghana)", + "ee_TG": "ewe (Togo)", + "el": "greco", + "el_CY": "greco (Cipro)", + "el_GR": "greco (Grecia)", + "en": "inglese", + "en_AG": "inglese (Antigua e Barbuda)", + "en_AI": "inglese (Anguilla)", + "en_AS": "inglese (Samoa americane)", + "en_AT": "inglese (Austria)", + "en_AU": "inglese (Australia)", + "en_BB": "inglese (Barbados)", + "en_BE": "inglese (Belgio)", + "en_BI": "inglese (Burundi)", + "en_BM": "inglese (Bermuda)", + "en_BS": "inglese (Bahamas)", + "en_BW": "inglese (Botswana)", + "en_BZ": "inglese (Belize)", + "en_CA": "inglese (Canada)", + "en_CC": "inglese (Isole Cocos (Keeling))", + "en_CH": "inglese (Svizzera)", + "en_CK": "inglese (Isole Cook)", + "en_CM": "inglese (Camerun)", + "en_CX": "inglese (Isola Christmas)", + "en_CY": "inglese (Cipro)", + "en_DE": "inglese (Germania)", + "en_DG": "inglese (Diego Garcia)", + "en_DK": "inglese (Danimarca)", + "en_DM": "inglese (Dominica)", + "en_ER": "inglese (Eritrea)", + "en_FI": "inglese (Finlandia)", + "en_FJ": "inglese (Figi)", + "en_FK": "inglese (Isole Falkland)", + "en_FM": "inglese (Micronesia)", + "en_GB": "inglese (Regno Unito)", + "en_GD": "inglese (Grenada)", + "en_GG": "inglese (Guernsey)", + "en_GH": "inglese (Ghana)", + "en_GI": "inglese (Gibilterra)", + "en_GM": "inglese (Gambia)", + "en_GU": "inglese (Guam)", + "en_GY": "inglese (Guyana)", + "en_HK": "inglese (RAS di Hong Kong)", + "en_IE": "inglese (Irlanda)", + "en_IL": "inglese (Israele)", + "en_IM": "inglese (Isola di Man)", + "en_IN": "inglese (India)", + "en_IO": "inglese (Territorio britannico dell’Oceano Indiano)", + "en_JE": "inglese (Jersey)", + "en_JM": "inglese (Giamaica)", + "en_KE": "inglese (Kenya)", + "en_KI": "inglese (Kiribati)", + "en_KN": "inglese (Saint Kitts e Nevis)", + "en_KY": "inglese (Isole Cayman)", + "en_LC": "inglese (Saint Lucia)", + "en_LR": "inglese (Liberia)", + "en_LS": "inglese (Lesotho)", + "en_MG": "inglese (Madagascar)", + "en_MH": "inglese (Isole Marshall)", + "en_MO": "inglese (RAS di Macao)", + "en_MP": "inglese (Isole Marianne settentrionali)", + "en_MS": "inglese (Montserrat)", + "en_MT": "inglese (Malta)", + "en_MU": "inglese (Mauritius)", + "en_MW": "inglese (Malawi)", + "en_MY": "inglese (Malaysia)", + "en_NA": "inglese (Namibia)", + "en_NF": "inglese (Isola Norfolk)", + "en_NG": "inglese (Nigeria)", + "en_NL": "inglese (Paesi Bassi)", + "en_NR": "inglese (Nauru)", + "en_NU": "inglese (Niue)", + "en_NZ": "inglese (Nuova Zelanda)", + "en_PG": "inglese (Papua Nuova Guinea)", + "en_PH": "inglese (Filippine)", + "en_PK": "inglese (Pakistan)", + "en_PN": "inglese (Isole Pitcairn)", + "en_PR": "inglese (Portorico)", + "en_PW": "inglese (Palau)", + "en_RW": "inglese (Ruanda)", + "en_SB": "inglese (Isole Salomone)", + "en_SC": "inglese (Seychelles)", + "en_SD": "inglese (Sudan)", + "en_SE": "inglese (Svezia)", + "en_SG": "inglese (Singapore)", + "en_SH": "inglese (Sant’Elena)", + "en_SI": "inglese (Slovenia)", + "en_SL": "inglese (Sierra Leone)", + "en_SS": "inglese (Sud Sudan)", + "en_SX": "inglese (Sint Maarten)", + "en_SZ": "inglese (Swaziland)", + "en_TC": "inglese (Isole Turks e Caicos)", + "en_TK": "inglese (Tokelau)", + "en_TO": "inglese (Tonga)", + "en_TT": "inglese (Trinidad e Tobago)", + "en_TV": "inglese (Tuvalu)", + "en_TZ": "inglese (Tanzania)", + "en_UG": "inglese (Uganda)", + "en_UM": "inglese (Altre isole americane del Pacifico)", + "en_US": "inglese (Stati Uniti)", + "en_VC": "inglese (Saint Vincent e Grenadines)", + "en_VG": "inglese (Isole Vergini Britanniche)", + "en_VI": "inglese (Isole Vergini Americane)", + "en_VU": "inglese (Vanuatu)", + "en_WS": "inglese (Samoa)", + "en_ZA": "inglese (Sudafrica)", + "en_ZM": "inglese (Zambia)", + "en_ZW": "inglese (Zimbabwe)", + "eo": "esperanto", + "es": "spagnolo", + "es_AR": "spagnolo (Argentina)", + "es_BO": "spagnolo (Bolivia)", + "es_BR": "spagnolo (Brasile)", + "es_CL": "spagnolo (Cile)", + "es_CO": "spagnolo (Colombia)", + "es_CR": "spagnolo (Costa Rica)", + "es_CU": "spagnolo (Cuba)", + "es_DO": "spagnolo (Repubblica Dominicana)", + "es_EA": "spagnolo (Ceuta e Melilla)", + "es_EC": "spagnolo (Ecuador)", + "es_ES": "spagnolo (Spagna)", + "es_GQ": "spagnolo (Guinea Equatoriale)", + "es_GT": "spagnolo (Guatemala)", + "es_HN": "spagnolo (Honduras)", + "es_IC": "spagnolo (Isole Canarie)", + "es_MX": "spagnolo (Messico)", + "es_NI": "spagnolo (Nicaragua)", + "es_PA": "spagnolo (Panamá)", + "es_PE": "spagnolo (Perù)", + "es_PH": "spagnolo (Filippine)", + "es_PR": "spagnolo (Portorico)", + "es_PY": "spagnolo (Paraguay)", + "es_SV": "spagnolo (El Salvador)", + "es_US": "spagnolo (Stati Uniti)", + "es_UY": "spagnolo (Uruguay)", + "es_VE": "spagnolo (Venezuela)", + "et": "estone", + "et_EE": "estone (Estonia)", + "eu": "basco", + "eu_ES": "basco (Spagna)", + "fa": "persiano", + "fa_AF": "persiano (Afghanistan)", + "fa_IR": "persiano (Iran)", + "ff": "fulah", + "ff_CM": "fulah (Camerun)", + "ff_GN": "fulah (Guinea)", + "ff_MR": "fulah (Mauritania)", + "ff_SN": "fulah (Senegal)", + "fi": "finlandese", + "fi_FI": "finlandese (Finlandia)", + "fo": "faroese", + "fo_DK": "faroese (Danimarca)", + "fo_FO": "faroese (Isole Fær Øer)", + "fr": "francese", + "fr_BE": "francese (Belgio)", + "fr_BF": "francese (Burkina Faso)", + "fr_BI": "francese (Burundi)", + "fr_BJ": "francese (Benin)", + "fr_BL": "francese (Saint-Barthélemy)", + "fr_CA": "francese (Canada)", + "fr_CD": "francese (Congo - Kinshasa)", + "fr_CF": "francese (Repubblica Centrafricana)", + "fr_CG": "francese (Congo-Brazzaville)", + "fr_CH": "francese (Svizzera)", + "fr_CI": "francese (Costa d’Avorio)", + "fr_CM": "francese (Camerun)", + "fr_DJ": "francese (Gibuti)", + "fr_DZ": "francese (Algeria)", + "fr_FR": "francese (Francia)", + "fr_GA": "francese (Gabon)", + "fr_GF": "francese (Guyana francese)", + "fr_GN": "francese (Guinea)", + "fr_GP": "francese (Guadalupa)", + "fr_GQ": "francese (Guinea Equatoriale)", + "fr_HT": "francese (Haiti)", + "fr_KM": "francese (Comore)", + "fr_LU": "francese (Lussemburgo)", + "fr_MA": "francese (Marocco)", + "fr_MC": "francese (Monaco)", + "fr_MF": "francese (Saint Martin)", + "fr_MG": "francese (Madagascar)", + "fr_ML": "francese (Mali)", + "fr_MQ": "francese (Martinica)", + "fr_MR": "francese (Mauritania)", + "fr_MU": "francese (Mauritius)", + "fr_NC": "francese (Nuova Caledonia)", + "fr_NE": "francese (Niger)", + "fr_PF": "francese (Polinesia francese)", + "fr_PM": "francese (Saint Pierre e Miquelon)", + "fr_RE": "francese (Riunione)", + "fr_RW": "francese (Ruanda)", + "fr_SC": "francese (Seychelles)", + "fr_SN": "francese (Senegal)", + "fr_SY": "francese (Siria)", + "fr_TD": "francese (Ciad)", + "fr_TG": "francese (Togo)", + "fr_TN": "francese (Tunisia)", + "fr_VU": "francese (Vanuatu)", + "fr_WF": "francese (Wallis e Futuna)", + "fr_YT": "francese (Mayotte)", + "fy": "frisone occidentale", + "fy_NL": "frisone occidentale (Paesi Bassi)", + "ga": "irlandese", + "ga_IE": "irlandese (Irlanda)", + "gd": "gaelico scozzese", + "gd_GB": "gaelico scozzese (Regno Unito)", + "gl": "galiziano", + "gl_ES": "galiziano (Spagna)", + "gu": "gujarati", + "gu_IN": "gujarati (India)", + "gv": "mannese", + "gv_IM": "mannese (Isola di Man)", + "ha": "hausa", + "ha_GH": "hausa (Ghana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigeria)", + "he": "ebraico", + "he_IL": "ebraico (Israele)", + "hi": "hindi", + "hi_IN": "hindi (India)", + "hr": "croato", + "hr_BA": "croato (Bosnia ed Erzegovina)", + "hr_HR": "croato (Croazia)", + "hu": "ungherese", + "hu_HU": "ungherese (Ungheria)", + "hy": "armeno", + "hy_AM": "armeno (Armenia)", + "id": "indonesiano", + "id_ID": "indonesiano (Indonesia)", + "ig": "igbo", + "ig_NG": "igbo (Nigeria)", + "ii": "sichuan yi", + "ii_CN": "sichuan yi (Cina)", + "is": "islandese", + "is_IS": "islandese (Islanda)", + "it": "italiano", + "it_CH": "italiano (Svizzera)", + "it_IT": "italiano (Italia)", + "it_SM": "italiano (San Marino)", + "ja": "giapponese", + "ja_JP": "giapponese (Giappone)", + "ka": "georgiano", + "ka_GE": "georgiano (Georgia)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenya)", + "kk": "kazako", + "kk_KZ": "kazako (Kazakistan)", + "kl": "groenlandese", + "kl_GL": "groenlandese (Groenlandia)", + "km": "khmer", + "km_KH": "khmer (Cambogia)", + "kn": "kannada", + "kn_IN": "kannada (India)", + "ko": "coreano", + "ko_KP": "coreano (Corea del Nord)", + "ko_KR": "coreano (Corea del Sud)", + "ks": "kashmiri", + "ks_IN": "kashmiri (India)", + "kw": "cornico", + "kw_GB": "cornico (Regno Unito)", + "ky": "chirghiso", + "ky_KG": "chirghiso (Kirghizistan)", + "lb": "lussemburghese", + "lb_LU": "lussemburghese (Lussemburgo)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Congo - Kinshasa)", + "ln_CF": "lingala (Repubblica Centrafricana)", + "ln_CG": "lingala (Congo-Brazzaville)", + "lo": "lao", + "lo_LA": "lao (Laos)", + "lt": "lituano", + "lt_LT": "lituano (Lituania)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Congo - Kinshasa)", + "lv": "lettone", + "lv_LV": "lettone (Lettonia)", + "mg": "malgascio", + "mg_MG": "malgascio (Madagascar)", + "mk": "macedone", + "mk_MK": "macedone (Repubblica di Macedonia)", + "ml": "malayalam", + "ml_IN": "malayalam (India)", + "mn": "mongolo", + "mn_MN": "mongolo (Mongolia)", + "mr": "marathi", + "mr_IN": "marathi (India)", + "ms": "malese", + "ms_BN": "malese (Brunei)", + "ms_MY": "malese (Malaysia)", + "ms_SG": "malese (Singapore)", + "mt": "maltese", + "mt_MT": "maltese (Malta)", + "my": "birmano", + "my_MM": "birmano (Myanmar (Birmania))", + "nb": "norvegese bokmÃ¥l", + "nb_NO": "norvegese bokmÃ¥l (Norvegia)", + "nb_SJ": "norvegese bokmÃ¥l (Svalbard e Jan Mayen)", + "nd": "ndebele del nord", + "nd_ZW": "ndebele del nord (Zimbabwe)", + "ne": "nepalese", + "ne_IN": "nepalese (India)", + "ne_NP": "nepalese (Nepal)", + "nl": "olandese", + "nl_AW": "olandese (Aruba)", + "nl_BE": "olandese (Belgio)", + "nl_BQ": "olandese (Caraibi olandesi)", + "nl_CW": "olandese (Curaçao)", + "nl_NL": "olandese (Paesi Bassi)", + "nl_SR": "olandese (Suriname)", + "nl_SX": "olandese (Sint Maarten)", + "nn": "norvegese nynorsk", + "nn_NO": "norvegese nynorsk (Norvegia)", + "no": "norvegese", + "no_NO": "norvegese (Norvegia)", + "om": "oromo", + "om_ET": "oromo (Etiopia)", + "om_KE": "oromo (Kenya)", + "or": "oriya", + "or_IN": "oriya (India)", + "os": "ossetico", + "os_GE": "ossetico (Georgia)", + "os_RU": "ossetico (Russia)", + "pa": "punjabi", + "pa_Arab": "punjabi (arabo)", + "pa_Arab_PK": "punjabi (arabo, Pakistan)", + "pa_Guru": "punjabi (gurmukhi)", + "pa_Guru_IN": "punjabi (gurmukhi, India)", + "pa_IN": "punjabi (India)", + "pa_PK": "punjabi (Pakistan)", + "pl": "polacco", + "pl_PL": "polacco (Polonia)", + "ps": "pashto", + "ps_AF": "pashto (Afghanistan)", + "pt": "portoghese", + "pt_AO": "portoghese (Angola)", + "pt_BR": "portoghese (Brasile)", + "pt_CH": "portoghese (Svizzera)", + "pt_CV": "portoghese (Capo Verde)", + "pt_GQ": "portoghese (Guinea Equatoriale)", + "pt_GW": "portoghese (Guinea-Bissau)", + "pt_LU": "portoghese (Lussemburgo)", + "pt_MO": "portoghese (RAS di Macao)", + "pt_MZ": "portoghese (Mozambico)", + "pt_PT": "portoghese (Portogallo)", + "pt_ST": "portoghese (São Tomé e Príncipe)", + "pt_TL": "portoghese (Timor Leste)", + "qu": "quechua", + "qu_BO": "quechua (Bolivia)", + "qu_EC": "quechua (Ecuador)", + "qu_PE": "quechua (Perù)", + "rm": "romancio", + "rm_CH": "romancio (Svizzera)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumeno", + "ro_MD": "rumeno (Moldavia)", + "ro_RO": "rumeno (Romania)", + "ru": "russo", + "ru_BY": "russo (Bielorussia)", + "ru_KG": "russo (Kirghizistan)", + "ru_KZ": "russo (Kazakistan)", + "ru_MD": "russo (Moldavia)", + "ru_RU": "russo (Russia)", + "ru_UA": "russo (Ucraina)", + "rw": "kinyarwanda", + "rw_RW": "kinyarwanda (Ruanda)", + "se": "sami del nord", + "se_FI": "sami del nord (Finlandia)", + "se_NO": "sami del nord (Norvegia)", + "se_SE": "sami del nord (Svezia)", + "sg": "sango", + "sg_CF": "sango (Repubblica Centrafricana)", + "sh": "serbo-croato", + "sh_BA": "serbo-croato (Bosnia ed Erzegovina)", + "si": "singalese", + "si_LK": "singalese (Sri Lanka)", + "sk": "slovacco", + "sk_SK": "slovacco (Slovacchia)", + "sl": "sloveno", + "sl_SI": "sloveno (Slovenia)", + "sn": "shona", + "sn_ZW": "shona (Zimbabwe)", + "so": "somalo", + "so_DJ": "somalo (Gibuti)", + "so_ET": "somalo (Etiopia)", + "so_KE": "somalo (Kenya)", + "so_SO": "somalo (Somalia)", + "sq": "albanese", + "sq_AL": "albanese (Albania)", + "sq_MK": "albanese (Repubblica di Macedonia)", + "sq_XK": "albanese (Kosovo)", + "sr": "serbo", + "sr_BA": "serbo (Bosnia ed Erzegovina)", + "sr_Cyrl": "serbo (cirillico)", + "sr_Cyrl_BA": "serbo (cirillico, Bosnia ed Erzegovina)", + "sr_Cyrl_ME": "serbo (cirillico, Montenegro)", + "sr_Cyrl_RS": "serbo (cirillico, Serbia)", + "sr_Cyrl_XK": "serbo (cirillico, Kosovo)", + "sr_Latn": "serbo (latino)", + "sr_Latn_BA": "serbo (latino, Bosnia ed Erzegovina)", + "sr_Latn_ME": "serbo (latino, Montenegro)", + "sr_Latn_RS": "serbo (latino, Serbia)", + "sr_Latn_XK": "serbo (latino, Kosovo)", + "sr_ME": "serbo (Montenegro)", + "sr_RS": "serbo (Serbia)", + "sr_XK": "serbo (Kosovo)", + "sv": "svedese", + "sv_AX": "svedese (Isole Ã…land)", + "sv_FI": "svedese (Finlandia)", + "sv_SE": "svedese (Svezia)", + "sw": "swahili", + "sw_CD": "swahili (Congo - Kinshasa)", + "sw_KE": "swahili (Kenya)", + "sw_TZ": "swahili (Tanzania)", + "sw_UG": "swahili (Uganda)", + "ta": "tamil", + "ta_IN": "tamil (India)", + "ta_LK": "tamil (Sri Lanka)", + "ta_MY": "tamil (Malaysia)", + "ta_SG": "tamil (Singapore)", + "te": "telugu", + "te_IN": "telugu (India)", + "th": "thai", + "th_TH": "thai (Thailandia)", + "ti": "tigrino", + "ti_ER": "tigrino (Eritrea)", + "ti_ET": "tigrino (Etiopia)", + "tl": "tagalog", + "tl_PH": "tagalog (Filippine)", + "to": "tongano", + "to_TO": "tongano (Tonga)", + "tr": "turco", + "tr_CY": "turco (Cipro)", + "tr_TR": "turco (Turchia)", + "ug": "uiguro", + "ug_CN": "uiguro (Cina)", + "uk": "ucraino", + "uk_UA": "ucraino (Ucraina)", + "ur": "urdu", + "ur_IN": "urdu (India)", + "ur_PK": "urdu (Pakistan)", + "uz": "usbeco", + "uz_AF": "usbeco (Afghanistan)", + "uz_Arab": "usbeco (arabo)", + "uz_Arab_AF": "usbeco (arabo, Afghanistan)", + "uz_Cyrl": "usbeco (cirillico)", + "uz_Cyrl_UZ": "usbeco (cirillico, Uzbekistan)", + "uz_Latn": "usbeco (latino)", + "uz_Latn_UZ": "usbeco (latino, Uzbekistan)", + "uz_UZ": "usbeco (Uzbekistan)", + "vi": "vietnamita", + "vi_VN": "vietnamita (Vietnam)", + "yi": "yiddish", + "yo": "yoruba", + "yo_BJ": "yoruba (Benin)", + "yo_NG": "yoruba (Nigeria)", + "zh": "cinese", + "zh_CN": "cinese (Cina)", + "zh_HK": "cinese (RAS di Hong Kong)", + "zh_Hans": "cinese (semplificato)", + "zh_Hans_CN": "cinese (semplificato, Cina)", + "zh_Hans_HK": "cinese (semplificato, RAS di Hong Kong)", + "zh_Hans_MO": "cinese (semplificato, RAS di Macao)", + "zh_Hans_SG": "cinese (semplificato, Singapore)", + "zh_Hant": "cinese (tradizionale)", + "zh_Hant_HK": "cinese (tradizionale, RAS di Hong Kong)", + "zh_Hant_MO": "cinese (tradizionale, RAS di Macao)", + "zh_Hant_TW": "cinese (tradizionale, Taiwan)", + "zh_MO": "cinese (RAS di Macao)", + "zh_SG": "cinese (Singapore)", + "zh_TW": "cinese (Taiwan)", + "zu": "zulu", + "zu_ZA": "zulu (Sudafrica)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/iw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/iw.json new file mode 100644 index 0000000000000000000000000000000000000000..b2b0fbde8ae77de7c5e864f34a3eb632053acb67 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/iw.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "he" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/iw_IL.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/iw_IL.json new file mode 100644 index 0000000000000000000000000000000000000000..57b954709768ddfa8610227d547b3954884cc421 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/iw_IL.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "he_IL" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ja.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ja.json new file mode 100644 index 0000000000000000000000000000000000000000..ba15c614186f2672286b315a9e8627ff913f543a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ja.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "アフリカーンス語", + "af_NA": "アフリカーンス語 (ナミビア)", + "af_ZA": "アフリカーンス語 (å—アフリカ)", + "ak": "アカン語", + "ak_GH": "アカン語 (ガーナ)", + "am": "アムãƒãƒ©èªž", + "am_ET": "アムãƒãƒ©èªž (エãƒã‚ªãƒ”ã‚¢)", + "ar": "アラビア語", + "ar_AE": "アラビア語 (アラブ首長国連邦)", + "ar_BH": "アラビア語 (ãƒãƒ¼ãƒ¬ãƒ¼ãƒ³)", + "ar_DJ": "アラビア語 (ジブãƒ)", + "ar_DZ": "アラビア語 (アルジェリア)", + "ar_EG": "アラビア語 (エジプト)", + "ar_EH": "アラビア語 (西サãƒãƒ©)", + "ar_ER": "アラビア語 (エリトリア)", + "ar_IL": "アラビア語 (イスラエル)", + "ar_IQ": "アラビア語 (イラク)", + "ar_JO": "アラビア語 (ヨルダン)", + "ar_KM": "アラビア語 (コモロ)", + "ar_KW": "アラビア語 (クウェート)", + "ar_LB": "アラビア語 (レãƒãƒŽãƒ³)", + "ar_LY": "アラビア語 (リビア)", + "ar_MA": "アラビア語 (モロッコ)", + "ar_MR": "アラビア語 (モーリタニア)", + "ar_OM": "アラビア語 (オマーン)", + "ar_PS": "アラビア語 (パレスãƒãƒŠè‡ªæ²»åŒº)", + "ar_QA": "アラビア語 (カタール)", + "ar_SA": "アラビア語 (サウジアラビア)", + "ar_SD": "アラビア語 (スーダン)", + "ar_SO": "アラビア語 (ソマリア)", + "ar_SS": "アラビア語 (å—スーダン)", + "ar_SY": "アラビア語 (シリア)", + "ar_TD": "アラビア語 (ãƒãƒ£ãƒ‰)", + "ar_TN": "アラビア語 (ãƒãƒ¥ãƒ‹ã‚¸ã‚¢)", + "ar_YE": "アラビア語 (イエメン)", + "as": "アッサム語", + "as_IN": "アッサム語 (インド)", + "az": "アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³èªž", + "az_AZ": "アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³èªž (アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³)", + "az_Cyrl": "アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³èªž (キリル文字)", + "az_Cyrl_AZ": "アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³èªž (キリル文字, アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³)", + "az_Latn": "アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³èªž (ラテン文字)", + "az_Latn_AZ": "アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³èªž (ラテン文字, アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³)", + "be": "ベラルーシ語", + "be_BY": "ベラルーシ語 (ベラルーシ)", + "bg": "ブルガリア語", + "bg_BG": "ブルガリア語 (ブルガリア)", + "bm": "ãƒãƒ³ãƒãƒ©èªž", + "bm_ML": "ãƒãƒ³ãƒãƒ©èªž (マリ)", + "bn": "ベンガル語", + "bn_BD": "ベンガル語 (ãƒãƒ³ã‚°ãƒ©ãƒ‡ã‚·ãƒ¥)", + "bn_IN": "ベンガル語 (インド)", + "bo": "ãƒãƒ™ãƒƒãƒˆèªž", + "bo_CN": "ãƒãƒ™ãƒƒãƒˆèªž (中国)", + "bo_IN": "ãƒãƒ™ãƒƒãƒˆèªž (インド)", + "br": "ブルトン語", + "br_FR": "ブルトン語 (フランス)", + "bs": "ボスニア語", + "bs_BA": "ボスニア語 (ボスニア・ヘルツェゴビナ)", + "bs_Cyrl": "ボスニア語 (キリル文字)", + "bs_Cyrl_BA": "ボスニア語 (キリル文字, ボスニア・ヘルツェゴビナ)", + "bs_Latn": "ボスニア語 (ラテン文字)", + "bs_Latn_BA": "ボスニア語 (ラテン文字, ボスニア・ヘルツェゴビナ)", + "ca": "カタロニア語", + "ca_AD": "カタロニア語 (アンドラ)", + "ca_ES": "カタロニア語 (スペイン)", + "ca_FR": "カタロニア語 (フランス)", + "ca_IT": "カタロニア語 (イタリア)", + "ce": "ãƒã‚§ãƒã‚§ãƒ³èªž", + "ce_RU": "ãƒã‚§ãƒã‚§ãƒ³èªž (ロシア)", + "cs": "ãƒã‚§ã‚³èªž", + "cs_CZ": "ãƒã‚§ã‚³èªž (ãƒã‚§ã‚³å…±å’Œå›½)", + "cy": "ウェールズ語", + "cy_GB": "ウェールズ語 (イギリス)", + "da": "デンマーク語", + "da_DK": "デンマーク語 (デンマーク)", + "da_GL": "デンマーク語 (グリーンランド)", + "de": "ドイツ語", + "de_AT": "ドイツ語 (オーストリア)", + "de_BE": "ドイツ語 (ベルギー)", + "de_CH": "ドイツ語 (スイス)", + "de_DE": "ドイツ語 (ドイツ)", + "de_IT": "ドイツ語 (イタリア)", + "de_LI": "ドイツ語 (リヒテンシュタイン)", + "de_LU": "ドイツ語 (ルクセンブルク)", + "dz": "ゾンカ語", + "dz_BT": "ゾンカ語 (ブータン)", + "ee": "エウェ語", + "ee_GH": "エウェ語 (ガーナ)", + "ee_TG": "エウェ語 (トーゴ)", + "el": "ギリシャ語", + "el_CY": "ギリシャ語 (キプロス)", + "el_GR": "ギリシャ語 (ギリシャ)", + "en": "英語", + "en_AG": "英語 (アンティグア・ãƒãƒ¼ãƒ–ーダ)", + "en_AI": "英語 (アンギラ)", + "en_AS": "英語 (米領サモア)", + "en_AT": "英語 (オーストリア)", + "en_AU": "英語 (オーストラリア)", + "en_BB": "英語 (ãƒãƒ«ãƒãƒ‰ã‚¹)", + "en_BE": "英語 (ベルギー)", + "en_BI": "英語 (ブルンジ)", + "en_BM": "英語 (ãƒãƒŸãƒ¥ãƒ¼ãƒ€)", + "en_BS": "英語 (ãƒãƒãƒž)", + "en_BW": "英語 (ボツワナ)", + "en_BZ": "英語 (ベリーズ)", + "en_CA": "英語 (カナダ)", + "en_CC": "英語 (ココス(キーリング)諸島)", + "en_CH": "英語 (スイス)", + "en_CK": "英語 (クック諸島)", + "en_CM": "英語 (カメルーン)", + "en_CX": "英語 (クリスマス島)", + "en_CY": "英語 (キプロス)", + "en_DE": "英語 (ドイツ)", + "en_DG": "英語 (ディエゴガルシア島)", + "en_DK": "英語 (デンマーク)", + "en_DM": "英語 (ドミニカ国)", + "en_ER": "英語 (エリトリア)", + "en_FI": "英語 (フィンランド)", + "en_FJ": "英語 (フィジー)", + "en_FK": "英語 (フォークランド諸島)", + "en_FM": "英語 (ミクロãƒã‚·ã‚¢é€£é‚¦)", + "en_GB": "英語 (イギリス)", + "en_GD": "英語 (グレナダ)", + "en_GG": "英語 (ガーンジー)", + "en_GH": "英語 (ガーナ)", + "en_GI": "英語 (ジブラルタル)", + "en_GM": "英語 (ガンビア)", + "en_GU": "英語 (グアム)", + "en_GY": "英語 (ガイアナ)", + "en_HK": "英語 (中è¯äººæ°‘共和国香港特別行政区)", + "en_IE": "英語 (アイルランド)", + "en_IL": "英語 (イスラエル)", + "en_IM": "英語 (マン島)", + "en_IN": "英語 (インド)", + "en_IO": "英語 (英領インド洋地域)", + "en_JE": "英語 (ジャージー)", + "en_JM": "英語 (ジャマイカ)", + "en_KE": "英語 (ケニア)", + "en_KI": "英語 (キリãƒã‚¹)", + "en_KN": "英語 (セントクリストファー・ãƒãƒ¼ãƒ´ã‚£ã‚¹)", + "en_KY": "英語 (ケイマン諸島)", + "en_LC": "英語 (セントルシア)", + "en_LR": "英語 (リベリア)", + "en_LS": "英語 (レソト)", + "en_MG": "英語 (マダガスカル)", + "en_MH": "英語 (マーシャル諸島)", + "en_MO": "英語 (中è¯äººæ°‘共和国マカオ特別行政区)", + "en_MP": "英語 (北マリアナ諸島)", + "en_MS": "英語 (モントセラト)", + "en_MT": "英語 (マルタ)", + "en_MU": "英語 (モーリシャス)", + "en_MW": "英語 (マラウイ)", + "en_MY": "英語 (マレーシア)", + "en_NA": "英語 (ナミビア)", + "en_NF": "英語 (ノーフォーク島)", + "en_NG": "英語 (ナイジェリア)", + "en_NL": "英語 (オランダ)", + "en_NR": "英語 (ナウル)", + "en_NU": "英語 (ニウエ)", + "en_NZ": "英語 (ニュージーランド)", + "en_PG": "英語 (パプアニューギニア)", + "en_PH": "英語 (フィリピン)", + "en_PK": "英語 (パキスタン)", + "en_PN": "英語 (ピトケアン諸島)", + "en_PR": "英語 (プエルトリコ)", + "en_PW": "英語 (パラオ)", + "en_RW": "英語 (ルワンダ)", + "en_SB": "英語 (ソロモン諸島)", + "en_SC": "英語 (セーシェル)", + "en_SD": "英語 (スーダン)", + "en_SE": "英語 (スウェーデン)", + "en_SG": "英語 (シンガãƒãƒ¼ãƒ«)", + "en_SH": "英語 (セントヘレナ)", + "en_SI": "英語 (スロベニア)", + "en_SL": "英語 (シエラレオãƒ)", + "en_SS": "英語 (å—スーダン)", + "en_SX": "英語 (シント・マールテン)", + "en_SZ": "英語 (スワジランド)", + "en_TC": "英語 (タークス・カイコス諸島)", + "en_TK": "英語 (トケラウ)", + "en_TO": "英語 (トンガ)", + "en_TT": "英語 (トリニダード・トãƒã‚´)", + "en_TV": "英語 (ツãƒãƒ«)", + "en_TZ": "英語 (タンザニア)", + "en_UG": "英語 (ウガンダ)", + "en_UM": "英語 (åˆè¡†å›½é ˜æœ‰å°é›¢å³¶)", + "en_US": "英語 (アメリカåˆè¡†å›½)", + "en_VC": "英語 (セントビンセントåŠã³ã‚°ãƒ¬ãƒŠãƒ‡ã‚£ãƒ¼ãƒ³è«¸å³¶)", + "en_VG": "英語 (英領ヴァージン諸島)", + "en_VI": "英語 (米領ヴァージン諸島)", + "en_VU": "英語 (ãƒãƒŒã‚¢ãƒ„)", + "en_WS": "英語 (サモア)", + "en_ZA": "英語 (å—アフリカ)", + "en_ZM": "英語 (ザンビア)", + "en_ZW": "英語 (ジンãƒãƒ–エ)", + "eo": "エスペラント語", + "es": "スペイン語", + "es_AR": "スペイン語 (アルゼンãƒãƒ³)", + "es_BO": "スペイン語 (ボリビア)", + "es_BR": "スペイン語 (ブラジル)", + "es_CL": "スペイン語 (ãƒãƒª)", + "es_CO": "スペイン語 (コロンビア)", + "es_CR": "スペイン語 (コスタリカ)", + "es_CU": "スペイン語 (キューãƒ)", + "es_DO": "スペイン語 (ドミニカ共和国)", + "es_EA": "スペイン語 (セウタ・メリリャ)", + "es_EC": "スペイン語 (エクアドル)", + "es_ES": "スペイン語 (スペイン)", + "es_GQ": "スペイン語 (赤é“ギニア)", + "es_GT": "スペイン語 (グアテマラ)", + "es_HN": "スペイン語 (ホンジュラス)", + "es_IC": "スペイン語 (カナリア諸島)", + "es_MX": "スペイン語 (メキシコ)", + "es_NI": "スペイン語 (ニカラグア)", + "es_PA": "スペイン語 (パナマ)", + "es_PE": "スペイン語 (ペルー)", + "es_PH": "スペイン語 (フィリピン)", + "es_PR": "スペイン語 (プエルトリコ)", + "es_PY": "スペイン語 (パラグアイ)", + "es_SV": "スペイン語 (エルサルãƒãƒ‰ãƒ«)", + "es_US": "スペイン語 (アメリカåˆè¡†å›½)", + "es_UY": "スペイン語 (ウルグアイ)", + "es_VE": "スペイン語 (ベãƒã‚ºã‚¨ãƒ©)", + "et": "エストニア語", + "et_EE": "エストニア語 (エストニア)", + "eu": "ãƒã‚¹ã‚¯èªž", + "eu_ES": "ãƒã‚¹ã‚¯èªž (スペイン)", + "fa": "ペルシア語", + "fa_AF": "ペルシア語 (アフガニスタン)", + "fa_IR": "ペルシア語 (イラン)", + "ff": "フラ語", + "ff_CM": "フラ語 (カメルーン)", + "ff_GN": "フラ語 (ギニア)", + "ff_MR": "フラ語 (モーリタニア)", + "ff_SN": "フラ語 (ã‚»ãƒã‚¬ãƒ«)", + "fi": "フィンランド語", + "fi_FI": "フィンランド語 (フィンランド)", + "fo": "フェロー語", + "fo_DK": "フェロー語 (デンマーク)", + "fo_FO": "フェロー語 (フェロー諸島)", + "fr": "フランス語", + "fr_BE": "フランス語 (ベルギー)", + "fr_BF": "フランス語 (ブルキナファソ)", + "fr_BI": "フランス語 (ブルンジ)", + "fr_BJ": "フランス語 (ベナン)", + "fr_BL": "フランス語 (サン・ãƒãƒ«ãƒ†ãƒ«ãƒŸãƒ¼å³¶)", + "fr_CA": "フランス語 (カナダ)", + "fr_CD": "フランス語 (コンゴ民主共和国(キンシャサ))", + "fr_CF": "フランス語 (中央アフリカ共和国)", + "fr_CG": "フランス語 (コンゴ共和国(ブラザビル))", + "fr_CH": "フランス語 (スイス)", + "fr_CI": "フランス語 (コートジボワール)", + "fr_CM": "フランス語 (カメルーン)", + "fr_DJ": "フランス語 (ジブãƒ)", + "fr_DZ": "フランス語 (アルジェリア)", + "fr_FR": "フランス語 (フランス)", + "fr_GA": "フランス語 (ガボン)", + "fr_GF": "フランス語 (ä»é ˜ã‚®ã‚¢ãƒŠ)", + "fr_GN": "フランス語 (ギニア)", + "fr_GP": "フランス語 (グアドループ)", + "fr_GQ": "フランス語 (赤é“ギニア)", + "fr_HT": "フランス語 (ãƒã‚¤ãƒ)", + "fr_KM": "フランス語 (コモロ)", + "fr_LU": "フランス語 (ルクセンブルク)", + "fr_MA": "フランス語 (モロッコ)", + "fr_MC": "フランス語 (モナコ)", + "fr_MF": "フランス語 (サン・マルタン)", + "fr_MG": "フランス語 (マダガスカル)", + "fr_ML": "フランス語 (マリ)", + "fr_MQ": "フランス語 (マルティニーク)", + "fr_MR": "フランス語 (モーリタニア)", + "fr_MU": "フランス語 (モーリシャス)", + "fr_NC": "フランス語 (ニューカレドニア)", + "fr_NE": "フランス語 (ニジェール)", + "fr_PF": "フランス語 (ä»é ˜ãƒãƒªãƒã‚·ã‚¢)", + "fr_PM": "フランス語 (サンピエール島・ミクロン島)", + "fr_RE": "フランス語 (レユニオン島)", + "fr_RW": "フランス語 (ルワンダ)", + "fr_SC": "フランス語 (セーシェル)", + "fr_SN": "フランス語 (ã‚»ãƒã‚¬ãƒ«)", + "fr_SY": "フランス語 (シリア)", + "fr_TD": "フランス語 (ãƒãƒ£ãƒ‰)", + "fr_TG": "フランス語 (トーゴ)", + "fr_TN": "フランス語 (ãƒãƒ¥ãƒ‹ã‚¸ã‚¢)", + "fr_VU": "フランス語 (ãƒãƒŒã‚¢ãƒ„)", + "fr_WF": "フランス語 (ウォリス・フツナ)", + "fr_YT": "フランス語 (マヨット島)", + "fy": "西フリジア語", + "fy_NL": "西フリジア語 (オランダ)", + "ga": "アイルランド語", + "ga_IE": "アイルランド語 (アイルランド)", + "gd": "スコットランド・ゲール語", + "gd_GB": "スコットランド・ゲール語 (イギリス)", + "gl": "ガリシア語", + "gl_ES": "ガリシア語 (スペイン)", + "gu": "グジャラート語", + "gu_IN": "グジャラート語 (インド)", + "gv": "マン島語", + "gv_IM": "マン島語 (マン島)", + "ha": "ãƒã‚¦ã‚µèªž", + "ha_GH": "ãƒã‚¦ã‚µèªž (ガーナ)", + "ha_NE": "ãƒã‚¦ã‚µèªž (ニジェール)", + "ha_NG": "ãƒã‚¦ã‚µèªž (ナイジェリア)", + "he": "ヘブライ語", + "he_IL": "ヘブライ語 (イスラエル)", + "hi": "ヒンディー語", + "hi_IN": "ヒンディー語 (インド)", + "hr": "クロアãƒã‚¢èªž", + "hr_BA": "クロアãƒã‚¢èªž (ボスニア・ヘルツェゴビナ)", + "hr_HR": "クロアãƒã‚¢èªž (クロアãƒã‚¢)", + "hu": "ãƒãƒ³ã‚¬ãƒªãƒ¼èªž", + "hu_HU": "ãƒãƒ³ã‚¬ãƒªãƒ¼èªž (ãƒãƒ³ã‚¬ãƒªãƒ¼)", + "hy": "アルメニア語", + "hy_AM": "アルメニア語 (アルメニア)", + "id": "インドãƒã‚·ã‚¢èªž", + "id_ID": "インドãƒã‚·ã‚¢èªž (インドãƒã‚·ã‚¢)", + "ig": "イボ語", + "ig_NG": "イボ語 (ナイジェリア)", + "ii": "å››å·ã‚¤èªž", + "ii_CN": "å››å·ã‚¤èªž (中国)", + "is": "アイスランド語", + "is_IS": "アイスランド語 (アイスランド)", + "it": "イタリア語", + "it_CH": "イタリア語 (スイス)", + "it_IT": "イタリア語 (イタリア)", + "it_SM": "イタリア語 (サンマリノ)", + "ja": "日本語", + "ja_JP": "日本語 (日本)", + "ka": "ジョージア語", + "ka_GE": "ジョージア語 (ジョージア)", + "ki": "キクユ語", + "ki_KE": "キクユ語 (ケニア)", + "kk": "カザフ語", + "kk_KZ": "カザフ語 (カザフスタン)", + "kl": "グリーンランド語", + "kl_GL": "グリーンランド語 (グリーンランド)", + "km": "クメール語", + "km_KH": "クメール語 (カンボジア)", + "kn": "カンナダ語", + "kn_IN": "カンナダ語 (インド)", + "ko": "韓国語", + "ko_KP": "韓国語 (æœé®®æ°‘主主義人民共和国)", + "ko_KR": "韓国語 (大韓民国)", + "ks": "カシミール語", + "ks_IN": "カシミール語 (インド)", + "kw": "コーンウォール語", + "kw_GB": "コーンウォール語 (イギリス)", + "ky": "キルギス語", + "ky_KG": "キルギス語 (キルギス)", + "lb": "ルクセンブルク語", + "lb_LU": "ルクセンブルク語 (ルクセンブルク)", + "lg": "ガンダ語", + "lg_UG": "ガンダ語 (ウガンダ)", + "ln": "リンガラ語", + "ln_AO": "リンガラ語 (アンゴラ)", + "ln_CD": "リンガラ語 (コンゴ民主共和国(キンシャサ))", + "ln_CF": "リンガラ語 (中央アフリカ共和国)", + "ln_CG": "リンガラ語 (コンゴ共和国(ブラザビル))", + "lo": "ラオ語", + "lo_LA": "ラオ語 (ラオス)", + "lt": "リトアニア語", + "lt_LT": "リトアニア語 (リトアニア)", + "lu": "ルãƒãƒ»ã‚«ã‚¿ãƒ³ã‚¬èªž", + "lu_CD": "ルãƒãƒ»ã‚«ã‚¿ãƒ³ã‚¬èªž (コンゴ民主共和国(キンシャサ))", + "lv": "ラトビア語", + "lv_LV": "ラトビア語 (ラトビア)", + "mg": "マダガスカル語", + "mg_MG": "マダガスカル語 (マダガスカル)", + "mk": "マケドニア語", + "mk_MK": "マケドニア語 (マケドニア)", + "ml": "マラヤーラム語", + "ml_IN": "マラヤーラム語 (インド)", + "mn": "モンゴル語", + "mn_MN": "モンゴル語 (モンゴル)", + "mr": "マラーティー語", + "mr_IN": "マラーティー語 (インド)", + "ms": "マレー語", + "ms_BN": "マレー語 (ブルãƒã‚¤)", + "ms_MY": "マレー語 (マレーシア)", + "ms_SG": "マレー語 (シンガãƒãƒ¼ãƒ«)", + "mt": "マルタ語", + "mt_MT": "マルタ語 (マルタ)", + "my": "ミャンマー語", + "my_MM": "ミャンマー語 (ミャンマー)", + "nb": "ノルウェー語(ブークモール)", + "nb_NO": "ノルウェー語(ブークモール) (ノルウェー)", + "nb_SJ": "ノルウェー語(ブークモール) (スãƒãƒ¼ãƒ«ãƒãƒ«è«¸å³¶ãƒ»ãƒ¤ãƒ³ãƒžã‚¤ã‚¨ãƒ³å³¶)", + "nd": "北ンデベレ語", + "nd_ZW": "北ンデベレ語 (ジンãƒãƒ–エ)", + "ne": "ãƒãƒ‘ール語", + "ne_IN": "ãƒãƒ‘ール語 (インド)", + "ne_NP": "ãƒãƒ‘ール語 (ãƒãƒ‘ール)", + "nl": "オランダ語", + "nl_AW": "オランダ語 (アルãƒ)", + "nl_BE": "オランダ語 (ベルギー)", + "nl_BQ": "オランダ語 (オランダ領カリブ)", + "nl_CW": "オランダ語 (キュラソー)", + "nl_NL": "オランダ語 (オランダ)", + "nl_SR": "オランダ語 (スリナム)", + "nl_SX": "オランダ語 (シント・マールテン)", + "nn": "ノルウェー語(ニーノシュク)", + "nn_NO": "ノルウェー語(ニーノシュク) (ノルウェー)", + "no": "ノルウェー語", + "no_NO": "ノルウェー語 (ノルウェー)", + "om": "オロモ語", + "om_ET": "オロモ語 (エãƒã‚ªãƒ”ã‚¢)", + "om_KE": "オロモ語 (ケニア)", + "or": "オリヤー語", + "or_IN": "オリヤー語 (インド)", + "os": "オセット語", + "os_GE": "オセット語 (ジョージア)", + "os_RU": "オセット語 (ロシア)", + "pa": "パンジャブ語", + "pa_Arab": "パンジャブ語 (アラビア文字)", + "pa_Arab_PK": "パンジャブ語 (アラビア文字, パキスタン)", + "pa_Guru": "パンジャブ語 (グルムキー文字)", + "pa_Guru_IN": "パンジャブ語 (グルムキー文字, インド)", + "pa_IN": "パンジャブ語 (インド)", + "pa_PK": "パンジャブ語 (パキスタン)", + "pl": "ãƒãƒ¼ãƒ©ãƒ³ãƒ‰èªž", + "pl_PL": "ãƒãƒ¼ãƒ©ãƒ³ãƒ‰èªž (ãƒãƒ¼ãƒ©ãƒ³ãƒ‰)", + "ps": "パシュトゥー語", + "ps_AF": "パシュトゥー語 (アフガニスタン)", + "pt": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž", + "pt_AO": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (アンゴラ)", + "pt_BR": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (ブラジル)", + "pt_CH": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (スイス)", + "pt_CV": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (カーボベルデ)", + "pt_GQ": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (赤é“ギニア)", + "pt_GW": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (ギニアビサウ)", + "pt_LU": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (ルクセンブルク)", + "pt_MO": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (中è¯äººæ°‘共和国マカオ特別行政区)", + "pt_MZ": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (モザンビーク)", + "pt_PT": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (ãƒãƒ«ãƒˆã‚¬ãƒ«)", + "pt_ST": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (サントメ・プリンシペ)", + "pt_TL": "ãƒãƒ«ãƒˆã‚¬ãƒ«èªž (æ±ãƒ†ã‚£ãƒ¢ãƒ¼ãƒ«)", + "qu": "ケãƒãƒ¥ã‚¢èªž", + "qu_BO": "ケãƒãƒ¥ã‚¢èªž (ボリビア)", + "qu_EC": "ケãƒãƒ¥ã‚¢èªž (エクアドル)", + "qu_PE": "ケãƒãƒ¥ã‚¢èªž (ペルー)", + "rm": "ロマンシュ語", + "rm_CH": "ロマンシュ語 (スイス)", + "rn": "ルンディ語", + "rn_BI": "ルンディ語 (ブルンジ)", + "ro": "ルーマニア語", + "ro_MD": "ルーマニア語 (モルドãƒ)", + "ro_RO": "ルーマニア語 (ルーマニア)", + "ru": "ロシア語", + "ru_BY": "ロシア語 (ベラルーシ)", + "ru_KG": "ロシア語 (キルギス)", + "ru_KZ": "ロシア語 (カザフスタン)", + "ru_MD": "ロシア語 (モルドãƒ)", + "ru_RU": "ロシア語 (ロシア)", + "ru_UA": "ロシア語 (ウクライナ)", + "rw": "キニアルワンダ語", + "rw_RW": "キニアルワンダ語 (ルワンダ)", + "se": "北サーミ語", + "se_FI": "北サーミ語 (フィンランド)", + "se_NO": "北サーミ語 (ノルウェー)", + "se_SE": "北サーミ語 (スウェーデン)", + "sg": "サンゴ語", + "sg_CF": "サンゴ語 (中央アフリカ共和国)", + "sh": "セルボ・クロアãƒã‚¢èªž", + "sh_BA": "セルボ・クロアãƒã‚¢èªž (ボスニア・ヘルツェゴビナ)", + "si": "シンãƒãƒ©èªž", + "si_LK": "シンãƒãƒ©èªž (スリランカ)", + "sk": "スロãƒã‚­ã‚¢èªž", + "sk_SK": "スロãƒã‚­ã‚¢èªž (スロãƒã‚­ã‚¢)", + "sl": "スロベニア語", + "sl_SI": "スロベニア語 (スロベニア)", + "sn": "ショナ語", + "sn_ZW": "ショナ語 (ジンãƒãƒ–エ)", + "so": "ソマリ語", + "so_DJ": "ソマリ語 (ジブãƒ)", + "so_ET": "ソマリ語 (エãƒã‚ªãƒ”ã‚¢)", + "so_KE": "ソマリ語 (ケニア)", + "so_SO": "ソマリ語 (ソマリア)", + "sq": "アルãƒãƒ‹ã‚¢èªž", + "sq_AL": "アルãƒãƒ‹ã‚¢èªž (アルãƒãƒ‹ã‚¢)", + "sq_MK": "アルãƒãƒ‹ã‚¢èªž (マケドニア)", + "sq_XK": "アルãƒãƒ‹ã‚¢èªž (コソボ)", + "sr": "セルビア語", + "sr_BA": "セルビア語 (ボスニア・ヘルツェゴビナ)", + "sr_Cyrl": "セルビア語 (キリル文字)", + "sr_Cyrl_BA": "セルビア語 (キリル文字, ボスニア・ヘルツェゴビナ)", + "sr_Cyrl_ME": "セルビア語 (キリル文字, モンテãƒã‚°ãƒ­)", + "sr_Cyrl_RS": "セルビア語 (キリル文字, セルビア)", + "sr_Cyrl_XK": "セルビア語 (キリル文字, コソボ)", + "sr_Latn": "セルビア語 (ラテン文字)", + "sr_Latn_BA": "セルビア語 (ラテン文字, ボスニア・ヘルツェゴビナ)", + "sr_Latn_ME": "セルビア語 (ラテン文字, モンテãƒã‚°ãƒ­)", + "sr_Latn_RS": "セルビア語 (ラテン文字, セルビア)", + "sr_Latn_XK": "セルビア語 (ラテン文字, コソボ)", + "sr_ME": "セルビア語 (モンテãƒã‚°ãƒ­)", + "sr_RS": "セルビア語 (セルビア)", + "sr_XK": "セルビア語 (コソボ)", + "sv": "スウェーデン語", + "sv_AX": "スウェーデン語 (オーランド諸島)", + "sv_FI": "スウェーデン語 (フィンランド)", + "sv_SE": "スウェーデン語 (スウェーデン)", + "sw": "スワヒリ語", + "sw_CD": "スワヒリ語 (コンゴ民主共和国(キンシャサ))", + "sw_KE": "スワヒリ語 (ケニア)", + "sw_TZ": "スワヒリ語 (タンザニア)", + "sw_UG": "スワヒリ語 (ウガンダ)", + "ta": "タミル語", + "ta_IN": "タミル語 (インド)", + "ta_LK": "タミル語 (スリランカ)", + "ta_MY": "タミル語 (マレーシア)", + "ta_SG": "タミル語 (シンガãƒãƒ¼ãƒ«)", + "te": "テルグ語", + "te_IN": "テルグ語 (インド)", + "th": "タイ語", + "th_TH": "タイ語 (タイ)", + "ti": "ティグリニア語", + "ti_ER": "ティグリニア語 (エリトリア)", + "ti_ET": "ティグリニア語 (エãƒã‚ªãƒ”ã‚¢)", + "tl": "タガログ語", + "tl_PH": "タガログ語 (フィリピン)", + "to": "トンガ語", + "to_TO": "トンガ語 (トンガ)", + "tr": "トルコ語", + "tr_CY": "トルコ語 (キプロス)", + "tr_TR": "トルコ語 (トルコ)", + "ug": "ウイグル語", + "ug_CN": "ウイグル語 (中国)", + "uk": "ウクライナ語", + "uk_UA": "ウクライナ語 (ウクライナ)", + "ur": "ウルドゥー語", + "ur_IN": "ウルドゥー語 (インド)", + "ur_PK": "ウルドゥー語 (パキスタン)", + "uz": "ウズベク語", + "uz_AF": "ウズベク語 (アフガニスタン)", + "uz_Arab": "ウズベク語 (アラビア文字)", + "uz_Arab_AF": "ウズベク語 (アラビア文字, アフガニスタン)", + "uz_Cyrl": "ウズベク語 (キリル文字)", + "uz_Cyrl_UZ": "ウズベク語 (キリル文字, ウズベキスタン)", + "uz_Latn": "ウズベク語 (ラテン文字)", + "uz_Latn_UZ": "ウズベク語 (ラテン文字, ウズベキスタン)", + "uz_UZ": "ウズベク語 (ウズベキスタン)", + "vi": "ベトナム語", + "vi_VN": "ベトナム語 (ベトナム)", + "yi": "イディッシュ語", + "yo": "ヨルãƒèªž", + "yo_BJ": "ヨルãƒèªž (ベナン)", + "yo_NG": "ヨルãƒèªž (ナイジェリア)", + "zh": "中国語", + "zh_CN": "中国語 (中国)", + "zh_HK": "中国語 (中è¯äººæ°‘共和国香港特別行政区)", + "zh_Hans": "中国語 (簡体字)", + "zh_Hans_CN": "中国語 (簡体字, 中国)", + "zh_Hans_HK": "中国語 (簡体字, 中è¯äººæ°‘共和国香港特別行政区)", + "zh_Hans_MO": "中国語 (簡体字, 中è¯äººæ°‘共和国マカオ特別行政区)", + "zh_Hans_SG": "中国語 (簡体字, シンガãƒãƒ¼ãƒ«)", + "zh_Hant": "中国語 (ç¹ä½“å­—)", + "zh_Hant_HK": "中国語 (ç¹ä½“å­—, 中è¯äººæ°‘共和国香港特別行政区)", + "zh_Hant_MO": "中国語 (ç¹ä½“å­—, 中è¯äººæ°‘共和国マカオ特別行政区)", + "zh_Hant_TW": "中国語 (ç¹ä½“å­—, å°æ¹¾)", + "zh_MO": "中国語 (中è¯äººæ°‘共和国マカオ特別行政区)", + "zh_SG": "中国語 (シンガãƒãƒ¼ãƒ«)", + "zh_TW": "中国語 (å°æ¹¾)", + "zu": "ズールー語", + "zu_ZA": "ズールー語 (å—アフリカ)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ka.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ka.json new file mode 100644 index 0000000000000000000000000000000000000000..782db63adb4dc33bf9dfdba72c9807f8f6316020 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ka.json @@ -0,0 +1,566 @@ +{ + "Names": { + "af": "áƒáƒ¤áƒ áƒ˜áƒ™áƒáƒáƒœáƒ¡áƒ˜", + "af_NA": "áƒáƒ¤áƒ áƒ˜áƒ™áƒáƒáƒœáƒ¡áƒ˜ (ნáƒáƒ›áƒ˜áƒ‘იáƒ)", + "af_ZA": "áƒáƒ¤áƒ áƒ˜áƒ™áƒáƒáƒœáƒ¡áƒ˜ (სáƒáƒ›áƒ®áƒ áƒ”თ áƒáƒ¤áƒ áƒ˜áƒ™áƒ˜áƒ¡ რესპუბლიკáƒ)", + "ak": "áƒáƒ™áƒáƒœáƒ˜", + "ak_GH": "áƒáƒ™áƒáƒœáƒ˜ (გáƒáƒœáƒ)", + "am": "áƒáƒ›áƒ°áƒáƒ áƒ£áƒšáƒ˜", + "am_ET": "áƒáƒ›áƒ°áƒáƒ áƒ£áƒšáƒ˜ (ეთიáƒáƒžáƒ˜áƒ)", + "ar": "áƒáƒ áƒáƒ‘ული", + "ar_AE": "áƒáƒ áƒáƒ‘ული (áƒáƒ áƒáƒ‘თრგáƒáƒ”რთიáƒáƒœáƒ”ბული სáƒáƒáƒ›áƒ˜áƒ áƒáƒ”ბი)", + "ar_BH": "áƒáƒ áƒáƒ‘ული (ბáƒáƒ°áƒ áƒ”ინი)", + "ar_DJ": "áƒáƒ áƒáƒ‘ული (ჯიბუტი)", + "ar_DZ": "áƒáƒ áƒáƒ‘ული (áƒáƒšáƒŸáƒ˜áƒ áƒ˜)", + "ar_EG": "áƒáƒ áƒáƒ‘ული (ეგვიპტე)", + "ar_EH": "áƒáƒ áƒáƒ‘ული (დáƒáƒ¡áƒáƒ•ლეთ სáƒáƒ°áƒáƒ áƒ)", + "ar_ER": "áƒáƒ áƒáƒ‘ული (ერიტრეáƒ)", + "ar_IL": "áƒáƒ áƒáƒ‘ული (ისრáƒáƒ”ლი)", + "ar_IQ": "áƒáƒ áƒáƒ‘ული (ერáƒáƒ§áƒ˜)", + "ar_JO": "áƒáƒ áƒáƒ‘ული (იáƒáƒ áƒ“áƒáƒœáƒ˜áƒ)", + "ar_KM": "áƒáƒ áƒáƒ‘ული (კáƒáƒ›áƒáƒ áƒ˜áƒ¡ კუნძულები)", + "ar_KW": "áƒáƒ áƒáƒ‘ული (ქუვეითი)", + "ar_LB": "áƒáƒ áƒáƒ‘ული (ლიბáƒáƒœáƒ˜)", + "ar_LY": "áƒáƒ áƒáƒ‘ული (ლიბიáƒ)", + "ar_MA": "áƒáƒ áƒáƒ‘ული (მáƒáƒ áƒáƒ™áƒ)", + "ar_MR": "áƒáƒ áƒáƒ‘ული (მáƒáƒ•რიტáƒáƒœáƒ˜áƒ)", + "ar_OM": "áƒáƒ áƒáƒ‘ული (áƒáƒ›áƒáƒœáƒ˜)", + "ar_PS": "áƒáƒ áƒáƒ‘ული (პáƒáƒšáƒ”სტინის ტერიტáƒáƒ áƒ˜áƒ”ბი)", + "ar_QA": "áƒáƒ áƒáƒ‘ული (კáƒáƒ¢áƒáƒ áƒ˜)", + "ar_SA": "áƒáƒ áƒáƒ‘ული (სáƒáƒ£áƒ“ის áƒáƒ áƒáƒ‘ეთი)", + "ar_SD": "áƒáƒ áƒáƒ‘ული (სუდáƒáƒœáƒ˜)", + "ar_SO": "áƒáƒ áƒáƒ‘ული (სáƒáƒ›áƒáƒšáƒ˜)", + "ar_SS": "áƒáƒ áƒáƒ‘ული (სáƒáƒ›áƒ®áƒ áƒ”თ სუდáƒáƒœáƒ˜)", + "ar_SY": "áƒáƒ áƒáƒ‘ული (სირიáƒ)", + "ar_TD": "áƒáƒ áƒáƒ‘ული (ჩáƒáƒ“ი)", + "ar_TN": "áƒáƒ áƒáƒ‘ული (ტუნისი)", + "ar_YE": "áƒáƒ áƒáƒ‘ული (იემენი)", + "as": "áƒáƒ¡áƒáƒ›áƒ£áƒ áƒ˜", + "as_IN": "áƒáƒ¡áƒáƒ›áƒ£áƒ áƒ˜ (ინდáƒáƒ”თი)", + "az": "áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ£áƒšáƒ˜", + "az_AZ": "áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ£áƒšáƒ˜ (áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ˜)", + "az_Cyrl": "áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ£áƒšáƒ˜ (კირილიცáƒ)", + "az_Cyrl_AZ": "áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ£áƒšáƒ˜ (კირილიცáƒ, áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ˜)", + "az_Latn": "áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ£áƒšáƒ˜ (ლáƒáƒ—ინური)", + "az_Latn_AZ": "áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ£áƒšáƒ˜ (ლáƒáƒ—ინური, áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ˜)", + "be": "ბელáƒáƒ áƒ£áƒ¡áƒ£áƒšáƒ˜", + "be_BY": "ბელáƒáƒ áƒ£áƒ¡áƒ£áƒšáƒ˜ (ბელáƒáƒ áƒ£áƒ¡áƒ˜)", + "bg": "ბულგáƒáƒ áƒ£áƒšáƒ˜", + "bg_BG": "ბულგáƒáƒ áƒ£áƒšáƒ˜ (ბულგáƒáƒ áƒ”თი)", + "bm": "ბáƒáƒ›áƒ‘áƒáƒ áƒ", + "bm_ML": "ბáƒáƒ›áƒ‘áƒáƒ áƒ (მáƒáƒšáƒ˜)", + "bn": "ბენგáƒáƒšáƒ£áƒ áƒ˜", + "bn_BD": "ბენგáƒáƒšáƒ£áƒ áƒ˜ (ბáƒáƒœáƒ’ლáƒáƒ“ეში)", + "bn_IN": "ბენგáƒáƒšáƒ£áƒ áƒ˜ (ინდáƒáƒ”თი)", + "bo": "ტიბეტური", + "bo_CN": "ტიბეტური (ჩინეთი)", + "bo_IN": "ტიბეტური (ინდáƒáƒ”თი)", + "br": "ბრეტáƒáƒœáƒ£áƒšáƒ˜", + "br_FR": "ბრეტáƒáƒœáƒ£áƒšáƒ˜ (სáƒáƒ¤áƒ áƒáƒœáƒ’ეთი)", + "bs": "ბáƒáƒ¡áƒœáƒ˜áƒ£áƒ áƒ˜", + "bs_BA": "ბáƒáƒ¡áƒœáƒ˜áƒ£áƒ áƒ˜ (ბáƒáƒ¡áƒœáƒ˜áƒ დრჰერცეგáƒáƒ•ინáƒ)", + "bs_Cyrl": "ბáƒáƒ¡áƒœáƒ˜áƒ£áƒ áƒ˜ (კირილიცáƒ)", + "bs_Cyrl_BA": "ბáƒáƒ¡áƒœáƒ˜áƒ£áƒ áƒ˜ (კირილიცáƒ, ბáƒáƒ¡áƒœáƒ˜áƒ დრჰერცეგáƒáƒ•ინáƒ)", + "bs_Latn": "ბáƒáƒ¡áƒœáƒ˜áƒ£áƒ áƒ˜ (ლáƒáƒ—ინური)", + "bs_Latn_BA": "ბáƒáƒ¡áƒœáƒ˜áƒ£áƒ áƒ˜ (ლáƒáƒ—ინური, ბáƒáƒ¡áƒœáƒ˜áƒ დრჰერცეგáƒáƒ•ინáƒ)", + "ca": "კáƒáƒ¢áƒáƒšáƒáƒœáƒ£áƒ áƒ˜", + "ca_AD": "კáƒáƒ¢áƒáƒšáƒáƒœáƒ£áƒ áƒ˜ (áƒáƒœáƒ“áƒáƒ áƒ)", + "ca_ES": "კáƒáƒ¢áƒáƒšáƒáƒœáƒ£áƒ áƒ˜ (ესპáƒáƒœáƒ”თი)", + "ca_FR": "კáƒáƒ¢áƒáƒšáƒáƒœáƒ£áƒ áƒ˜ (სáƒáƒ¤áƒ áƒáƒœáƒ’ეთი)", + "ca_IT": "კáƒáƒ¢áƒáƒšáƒáƒœáƒ£áƒ áƒ˜ (იტáƒáƒšáƒ˜áƒ)", + "ce": "ჩეჩნური", + "ce_RU": "ჩეჩნური (რუსეთი)", + "cs": "ჩეხური", + "cs_CZ": "ჩეხური (ჩეხეთის რესპუბლიკáƒ)", + "cy": "უელსური", + "cy_GB": "უელსური (გáƒáƒ”რთიáƒáƒœáƒ”ბული სáƒáƒ›áƒ”ფáƒ)", + "da": "დáƒáƒœáƒ˜áƒ£áƒ áƒ˜", + "da_DK": "დáƒáƒœáƒ˜áƒ£áƒ áƒ˜ (დáƒáƒœáƒ˜áƒ)", + "da_GL": "დáƒáƒœáƒ˜áƒ£áƒ áƒ˜ (გრენლáƒáƒœáƒ“იáƒ)", + "de": "გერმáƒáƒœáƒ£áƒšáƒ˜", + "de_AT": "გერმáƒáƒœáƒ£áƒšáƒ˜ (áƒáƒ•სტრიáƒ)", + "de_BE": "გერმáƒáƒœáƒ£áƒšáƒ˜ (ბელგიáƒ)", + "de_CH": "გერმáƒáƒœáƒ£áƒšáƒ˜ (შვეიცáƒáƒ áƒ˜áƒ)", + "de_DE": "გერმáƒáƒœáƒ£áƒšáƒ˜ (გერმáƒáƒœáƒ˜áƒ)", + "de_IT": "გერმáƒáƒœáƒ£áƒšáƒ˜ (იტáƒáƒšáƒ˜áƒ)", + "de_LI": "გერმáƒáƒœáƒ£áƒšáƒ˜ (ლიხტენშტáƒáƒ˜áƒœáƒ˜)", + "de_LU": "გერმáƒáƒœáƒ£áƒšáƒ˜ (ლუქსემბურგი)", + "dz": "ძáƒáƒœáƒ’კხáƒ", + "dz_BT": "ძáƒáƒœáƒ’კხრ(ბუტáƒáƒœáƒ˜)", + "ee": "ევე", + "ee_GH": "ევე (გáƒáƒœáƒ)", + "ee_TG": "ევე (ტáƒáƒ’áƒ)", + "el": "ბერძნული", + "el_CY": "ბერძნული (კვიპრáƒáƒ¡áƒ˜)", + "el_GR": "ბერძნული (სáƒáƒ‘ერძნეთი)", + "en": "ინგლისური", + "en_AG": "ინგლისური (áƒáƒœáƒ¢áƒ˜áƒ’ურდრბáƒáƒ áƒ‘უდáƒ)", + "en_AI": "ინგლისური (áƒáƒœáƒ’ვილáƒ)", + "en_AS": "ინგლისური (áƒáƒ›áƒ”რიკის სáƒáƒ›áƒáƒ)", + "en_AT": "ინგლისური (áƒáƒ•სტრიáƒ)", + "en_AU": "ინგლისური (áƒáƒ•სტრáƒáƒšáƒ˜áƒ)", + "en_BB": "ინგლისური (ბáƒáƒ áƒ‘áƒáƒ“áƒáƒ¡áƒ˜)", + "en_BE": "ინგლისური (ბელგიáƒ)", + "en_BI": "ინგლისური (ბურუნდი)", + "en_BM": "ინგლისური (ბერმუდáƒ)", + "en_BS": "ინგლისური (ბáƒáƒ°áƒáƒ›áƒ˜áƒ¡ კუნძულები)", + "en_BW": "ინგლისური (ბáƒáƒ¢áƒ¡áƒ•áƒáƒœáƒ)", + "en_BZ": "ინგლისური (ბელიზი)", + "en_CA": "ინგლისური (კáƒáƒœáƒáƒ“áƒ)", + "en_CC": "ინგლისური (ქáƒáƒ¥áƒáƒ¡áƒ˜áƒ¡ (კილინგის) კუნძულები)", + "en_CH": "ინგლისური (შვეიცáƒáƒ áƒ˜áƒ)", + "en_CK": "ინგლისური (კუკის კუნძულები)", + "en_CM": "ინგლისური (კáƒáƒ›áƒ”რუნი)", + "en_CX": "ინგლისური (შáƒáƒ‘ის კუნძული)", + "en_CY": "ინგლისური (კვიპრáƒáƒ¡áƒ˜)", + "en_DE": "ინგლისური (გერმáƒáƒœáƒ˜áƒ)", + "en_DG": "ინგლისური (დიეგáƒ-გáƒáƒ áƒ¡áƒ˜áƒ)", + "en_DK": "ინგლისური (დáƒáƒœáƒ˜áƒ)", + "en_DM": "ინგლისური (დáƒáƒ›áƒ˜áƒœáƒ˜áƒ™áƒ)", + "en_ER": "ინგლისური (ერიტრეáƒ)", + "en_FI": "ინგლისური (ფინეთი)", + "en_FJ": "ინგლისური (ფიჯი)", + "en_FK": "ინგლისური (ფáƒáƒšáƒ™áƒšáƒ”ნდის კუნძულები)", + "en_FM": "ინგლისური (მიკრáƒáƒœáƒ”ზიáƒ)", + "en_GB": "ინგლისური (გáƒáƒ”რთიáƒáƒœáƒ”ბული სáƒáƒ›áƒ”ფáƒ)", + "en_GD": "ინგლისური (გრენáƒáƒ“áƒ)", + "en_GG": "ინგლისური (გერნსი)", + "en_GH": "ინგლისური (გáƒáƒœáƒ)", + "en_GI": "ინგლისური (გიბრáƒáƒšáƒ¢áƒáƒ áƒ˜)", + "en_GM": "ინგლისური (გáƒáƒ›áƒ‘იáƒ)", + "en_GU": "ინგლისური (გუáƒáƒ›áƒ˜)", + "en_GY": "ინგლისური (გáƒáƒ˜áƒáƒœáƒ)", + "en_HK": "ინგლისური (ჰáƒáƒœáƒ™áƒáƒœáƒ’ის სპეციáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ“მინისტრáƒáƒªáƒ˜áƒ£áƒšáƒ˜ რეგიáƒáƒœáƒ˜ ჩინეთი)", + "en_IE": "ინგლისური (ირლáƒáƒœáƒ“იáƒ)", + "en_IL": "ინგლისური (ისრáƒáƒ”ლი)", + "en_IM": "ინგლისური (მენის კუნძული)", + "en_IN": "ინგლისური (ინდáƒáƒ”თი)", + "en_IO": "ინგლისური (ბრიტáƒáƒœáƒ”თის ტერიტáƒáƒ áƒ˜áƒ ინდáƒáƒ”თის áƒáƒ™áƒ”áƒáƒœáƒ”ში)", + "en_JE": "ინგლისური (ჯერსი)", + "en_JM": "ინგლისური (იáƒáƒ›áƒáƒ˜áƒ™áƒ)", + "en_KE": "ინგლისური (კენიáƒ)", + "en_KI": "ინგლისური (კირიბáƒáƒ¢áƒ˜)", + "en_KN": "ინგლისური (სენტ-კიტსი დრნევისი)", + "en_KY": "ინგლისური (კáƒáƒ˜áƒ›áƒáƒœáƒ˜áƒ¡ კუნძულები)", + "en_LC": "ინგლისური (სენტ-ლუსიáƒ)", + "en_LR": "ინგლისური (ლიბერიáƒ)", + "en_LS": "ინგლისური (ლესáƒáƒ—áƒ)", + "en_MG": "ინგლისური (მáƒáƒ“áƒáƒ’áƒáƒ¡áƒ™áƒáƒ áƒ˜)", + "en_MH": "ინგლისური (მáƒáƒ áƒ¨áƒáƒšáƒ˜áƒ¡ კუნძულები)", + "en_MO": "ინგლისური (მáƒáƒ™áƒáƒáƒ¡ სპეციáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ“მინისტრáƒáƒªáƒ˜áƒ£áƒšáƒ˜ რეგიáƒáƒœáƒ˜ ჩინეთი)", + "en_MP": "ინგლისური (ჩრდილáƒáƒ”თ მáƒáƒ áƒ˜áƒáƒœáƒáƒ¡ კუნძულები)", + "en_MS": "ინგლისური (მáƒáƒœáƒ¡áƒ”რáƒáƒ¢áƒ˜)", + "en_MT": "ინგლისური (მáƒáƒšáƒ¢áƒ)", + "en_MU": "ინგლისური (მáƒáƒ•რიკი)", + "en_MW": "ინგლისური (მáƒáƒšáƒáƒ•ი)", + "en_MY": "ინგლისური (მáƒáƒšáƒáƒ˜áƒ–იáƒ)", + "en_NA": "ინგლისური (ნáƒáƒ›áƒ˜áƒ‘იáƒ)", + "en_NF": "ინგლისური (ნáƒáƒ áƒ¤áƒáƒšáƒ™áƒ˜áƒ¡ კუნძული)", + "en_NG": "ინგლისური (ნიგერიáƒ)", + "en_NL": "ინგლისური (ნიდერლáƒáƒœáƒ“ები)", + "en_NR": "ინგლისური (ნáƒáƒ£áƒ áƒ£)", + "en_NU": "ინგლისური (ნიუე)", + "en_NZ": "ინგლისური (áƒáƒ®áƒáƒšáƒ˜ ზელáƒáƒœáƒ“იáƒ)", + "en_PG": "ინგლისური (პáƒáƒžáƒ£áƒ-áƒáƒ®áƒáƒšáƒ˜ გვინეáƒ)", + "en_PH": "ინგლისური (ფილიპინები)", + "en_PK": "ინგლისური (პáƒáƒ™áƒ˜áƒ¡áƒ¢áƒáƒœáƒ˜)", + "en_PN": "ინგლისური (პიტკერნის კუნძულები)", + "en_PR": "ინგლისური (პუერტáƒ-რიკáƒ)", + "en_PW": "ინგლისური (პáƒáƒšáƒáƒ£)", + "en_RW": "ინგლისური (რუáƒáƒœáƒ“áƒ)", + "en_SB": "ინგლისური (სáƒáƒšáƒáƒ›áƒáƒœáƒ˜áƒ¡ კუნძულები)", + "en_SC": "ინგლისური (სეიშელის კუნძულები)", + "en_SD": "ინგლისური (სუდáƒáƒœáƒ˜)", + "en_SE": "ინგლისური (შვედეთი)", + "en_SG": "ინგლისური (სინგáƒáƒžáƒ£áƒ áƒ˜)", + "en_SH": "ინგლისური (წმინდრელენეს კუნძული)", + "en_SI": "ინგლისური (სლáƒáƒ•ენიáƒ)", + "en_SL": "ინგლისური (სიერáƒ-ლეáƒáƒœáƒ”)", + "en_SS": "ინგლისური (სáƒáƒ›áƒ®áƒ áƒ”თ სუდáƒáƒœáƒ˜)", + "en_SX": "ინგლისური (სინტ-მáƒáƒ áƒ¢áƒ”ნი)", + "en_SZ": "ინგლისური (სვáƒáƒ–ილენდი)", + "en_TC": "ინგლისური (თერქს-ქáƒáƒ˜áƒ¥áƒáƒ¡áƒ˜áƒ¡ კუნძულები)", + "en_TK": "ინგლისური (ტáƒáƒ™áƒ”ლáƒáƒ£)", + "en_TO": "ინგლისური (ტáƒáƒœáƒ’áƒ)", + "en_TT": "ინგლისური (ტრინიდáƒáƒ“ი დრტáƒáƒ‘áƒáƒ’áƒ)", + "en_TV": "ინგლისური (ტუვáƒáƒšáƒ£)", + "en_TZ": "ინგლისური (ტáƒáƒœáƒ–áƒáƒœáƒ˜áƒ)", + "en_UG": "ინგლისური (უგáƒáƒœáƒ“áƒ)", + "en_UM": "ინგლისური (áƒáƒ¨áƒ¨-ის შáƒáƒ áƒ”ული კუნძულები)", + "en_US": "ინგლისური (áƒáƒ›áƒ”რიკის შეერთებული შტáƒáƒ¢áƒ”ბი)", + "en_VC": "ინგლისური (სენტ-ვინსენტი დრგრენáƒáƒ“ინები)", + "en_VG": "ინგლისური (ბრიტáƒáƒœáƒ”თის ვირჯინის კუნძულები)", + "en_VI": "ინგლისური (áƒáƒ¨áƒ¨-ის ვირჯინის კუნძულები)", + "en_VU": "ინგლისური (ვáƒáƒœáƒ£áƒáƒ¢áƒ£)", + "en_WS": "ინგლისური (სáƒáƒ›áƒáƒ)", + "en_ZA": "ინგლისური (სáƒáƒ›áƒ®áƒ áƒ”თ áƒáƒ¤áƒ áƒ˜áƒ™áƒ˜áƒ¡ რესპუბლიკáƒ)", + "en_ZM": "ინგლისური (ზáƒáƒ›áƒ‘იáƒ)", + "en_ZW": "ინგლისური (ზიმბáƒáƒ‘ვე)", + "eo": "ესპერáƒáƒœáƒ¢áƒ", + "es": "ესპáƒáƒœáƒ£áƒ áƒ˜", + "es_AR": "ესპáƒáƒœáƒ£áƒ áƒ˜ (áƒáƒ áƒ’ენტინáƒ)", + "es_BO": "ესპáƒáƒœáƒ£áƒ áƒ˜ (ბáƒáƒšáƒ˜áƒ•იáƒ)", + "es_BR": "ესპáƒáƒœáƒ£áƒ áƒ˜ (ბრáƒáƒ–ილიáƒ)", + "es_CL": "ესპáƒáƒœáƒ£áƒ áƒ˜ (ჩილე)", + "es_CO": "ესპáƒáƒœáƒ£áƒ áƒ˜ (კáƒáƒšáƒ£áƒ›áƒ‘იáƒ)", + "es_CR": "ესპáƒáƒœáƒ£áƒ áƒ˜ (კáƒáƒ¡áƒ¢áƒ-რიკáƒ)", + "es_CU": "ესპáƒáƒœáƒ£áƒ áƒ˜ (კუბáƒ)", + "es_DO": "ესპáƒáƒœáƒ£áƒ áƒ˜ (დáƒáƒ›áƒ˜áƒœáƒ˜áƒ™áƒ”ლთრრესპუბლიკáƒ)", + "es_EA": "ესპáƒáƒœáƒ£áƒ áƒ˜ (სეუტრდრმელილáƒ)", + "es_EC": "ესპáƒáƒœáƒ£áƒ áƒ˜ (ეკვáƒáƒ“áƒáƒ áƒ˜)", + "es_ES": "ესპáƒáƒœáƒ£áƒ áƒ˜ (ესპáƒáƒœáƒ”თი)", + "es_GQ": "ესპáƒáƒœáƒ£áƒ áƒ˜ (ეკვáƒáƒ¢áƒáƒ áƒ£áƒšáƒ˜ გვინეáƒ)", + "es_GT": "ესპáƒáƒœáƒ£áƒ áƒ˜ (გვáƒáƒ¢áƒ”მáƒáƒšáƒ)", + "es_HN": "ესპáƒáƒœáƒ£áƒ áƒ˜ (ჰáƒáƒœáƒ“ურáƒáƒ¡áƒ˜)", + "es_IC": "ესპáƒáƒœáƒ£áƒ áƒ˜ (კáƒáƒœáƒáƒ áƒ˜áƒ¡ კუნძულები)", + "es_MX": "ესპáƒáƒœáƒ£áƒ áƒ˜ (მექსიკáƒ)", + "es_NI": "ესპáƒáƒœáƒ£áƒ áƒ˜ (ნიკáƒáƒ áƒáƒ’უáƒ)", + "es_PA": "ესპáƒáƒœáƒ£áƒ áƒ˜ (პáƒáƒœáƒáƒ›áƒ)", + "es_PE": "ესპáƒáƒœáƒ£áƒ áƒ˜ (პერუ)", + "es_PH": "ესპáƒáƒœáƒ£áƒ áƒ˜ (ფილიპინები)", + "es_PR": "ესპáƒáƒœáƒ£áƒ áƒ˜ (პუერტáƒ-რიკáƒ)", + "es_PY": "ესპáƒáƒœáƒ£áƒ áƒ˜ (პáƒáƒ áƒáƒ’ვáƒáƒ˜)", + "es_SV": "ესპáƒáƒœáƒ£áƒ áƒ˜ (სáƒáƒšáƒ•áƒáƒ“áƒáƒ áƒ˜)", + "es_US": "ესპáƒáƒœáƒ£áƒ áƒ˜ (áƒáƒ›áƒ”რიკის შეერთებული შტáƒáƒ¢áƒ”ბი)", + "es_UY": "ესპáƒáƒœáƒ£áƒ áƒ˜ (ურუგვáƒáƒ˜)", + "es_VE": "ესპáƒáƒœáƒ£áƒ áƒ˜ (ვენესუელáƒ)", + "et": "ესტáƒáƒœáƒ£áƒ áƒ˜", + "et_EE": "ესტáƒáƒœáƒ£áƒ áƒ˜ (ესტáƒáƒœáƒ”თი)", + "eu": "ბáƒáƒ¡áƒ™áƒ£áƒ áƒ˜", + "eu_ES": "ბáƒáƒ¡áƒ™áƒ£áƒ áƒ˜ (ესპáƒáƒœáƒ”თი)", + "fa": "სპáƒáƒ áƒ¡áƒ£áƒšáƒ˜", + "fa_AF": "სპáƒáƒ áƒ¡áƒ£áƒšáƒ˜ (áƒáƒ•ღáƒáƒœáƒ”თი)", + "fa_IR": "სპáƒáƒ áƒ¡áƒ£áƒšáƒ˜ (ირáƒáƒœáƒ˜)", + "ff": "ფულáƒ", + "ff_CM": "ფულრ(კáƒáƒ›áƒ”რუნი)", + "ff_GN": "ფულრ(გვინეáƒ)", + "ff_MR": "ფულრ(მáƒáƒ•რიტáƒáƒœáƒ˜áƒ)", + "ff_SN": "ფულრ(სენეგáƒáƒšáƒ˜)", + "fi": "ფინური", + "fi_FI": "ფინური (ფინეთი)", + "fo": "ფáƒáƒ áƒ”რული", + "fo_DK": "ფáƒáƒ áƒ”რული (დáƒáƒœáƒ˜áƒ)", + "fo_FO": "ფáƒáƒ áƒ”რული (ფáƒáƒ áƒ”რის კუნძულები)", + "fr": "ფრáƒáƒœáƒ’ული", + "fr_BE": "ფრáƒáƒœáƒ’ული (ბელგიáƒ)", + "fr_BF": "ფრáƒáƒœáƒ’ული (ბურკინáƒ-ფáƒáƒ¡áƒ)", + "fr_BI": "ფრáƒáƒœáƒ’ული (ბურუნდი)", + "fr_BJ": "ფრáƒáƒœáƒ’ული (ბენინი)", + "fr_BL": "ფრáƒáƒœáƒ’ული (სენ-ბáƒáƒ áƒ—ელმი)", + "fr_CA": "ფრáƒáƒœáƒ’ული (კáƒáƒœáƒáƒ“áƒ)", + "fr_CD": "ფრáƒáƒœáƒ’ული (კáƒáƒœáƒ’რ- კინშáƒáƒ¡áƒ)", + "fr_CF": "ფრáƒáƒœáƒ’ული (ცენტრáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ¤áƒ áƒ˜áƒ™áƒ˜áƒ¡ რესპუბლიკáƒ)", + "fr_CG": "ფრáƒáƒœáƒ’ული (კáƒáƒœáƒ’რ- ბრáƒáƒ–áƒáƒ•ილი)", + "fr_CH": "ფრáƒáƒœáƒ’ული (შვეიცáƒáƒ áƒ˜áƒ)", + "fr_CI": "ფრáƒáƒœáƒ’ული (კáƒáƒ¢-დივუáƒáƒ áƒ˜)", + "fr_CM": "ფრáƒáƒœáƒ’ული (კáƒáƒ›áƒ”რუნი)", + "fr_DJ": "ფრáƒáƒœáƒ’ული (ჯიბუტი)", + "fr_DZ": "ფრáƒáƒœáƒ’ული (áƒáƒšáƒŸáƒ˜áƒ áƒ˜)", + "fr_FR": "ფრáƒáƒœáƒ’ული (სáƒáƒ¤áƒ áƒáƒœáƒ’ეთი)", + "fr_GA": "ფრáƒáƒœáƒ’ული (გáƒáƒ‘áƒáƒœáƒ˜)", + "fr_GF": "ფრáƒáƒœáƒ’ული (სáƒáƒ¤áƒ áƒáƒœáƒ’ეთის გვიáƒáƒœáƒ)", + "fr_GN": "ფრáƒáƒœáƒ’ული (გვინეáƒ)", + "fr_GP": "ფრáƒáƒœáƒ’ული (გვáƒáƒ“ელუპáƒ)", + "fr_GQ": "ფრáƒáƒœáƒ’ული (ეკვáƒáƒ¢áƒáƒ áƒ£áƒšáƒ˜ გვინეáƒ)", + "fr_HT": "ფრáƒáƒœáƒ’ული (ჰáƒáƒ˜áƒ¢áƒ˜)", + "fr_KM": "ფრáƒáƒœáƒ’ული (კáƒáƒ›áƒáƒ áƒ˜áƒ¡ კუნძულები)", + "fr_LU": "ფრáƒáƒœáƒ’ული (ლუქსემბურგი)", + "fr_MA": "ფრáƒáƒœáƒ’ული (მáƒáƒ áƒáƒ™áƒ)", + "fr_MC": "ფრáƒáƒœáƒ’ული (მáƒáƒœáƒáƒ™áƒ)", + "fr_MF": "ფრáƒáƒœáƒ’ული (სენ-მáƒáƒ áƒ¢áƒ”ნი)", + "fr_MG": "ფრáƒáƒœáƒ’ული (მáƒáƒ“áƒáƒ’áƒáƒ¡áƒ™áƒáƒ áƒ˜)", + "fr_ML": "ფრáƒáƒœáƒ’ული (მáƒáƒšáƒ˜)", + "fr_MQ": "ფრáƒáƒœáƒ’ული (მáƒáƒ áƒ¢áƒ˜áƒœáƒ˜áƒ™áƒ)", + "fr_MR": "ფრáƒáƒœáƒ’ული (მáƒáƒ•რიტáƒáƒœáƒ˜áƒ)", + "fr_MU": "ფრáƒáƒœáƒ’ული (მáƒáƒ•რიკი)", + "fr_NC": "ფრáƒáƒœáƒ’ული (áƒáƒ®áƒáƒšáƒ˜ კáƒáƒšáƒ”დáƒáƒœáƒ˜áƒ)", + "fr_NE": "ფრáƒáƒœáƒ’ული (ნიგერი)", + "fr_PF": "ფრáƒáƒœáƒ’ული (სáƒáƒ¤áƒ áƒáƒœáƒ’ეთის პáƒáƒšáƒ˜áƒœáƒ”ზიáƒ)", + "fr_PM": "ფრáƒáƒœáƒ’ული (სენ-პიერი დრმიკელáƒáƒœáƒ˜)", + "fr_RE": "ფრáƒáƒœáƒ’ული (რეუნიáƒáƒœáƒ˜)", + "fr_RW": "ფრáƒáƒœáƒ’ული (რუáƒáƒœáƒ“áƒ)", + "fr_SC": "ფრáƒáƒœáƒ’ული (სეიშელის კუნძულები)", + "fr_SN": "ფრáƒáƒœáƒ’ული (სენეგáƒáƒšáƒ˜)", + "fr_SY": "ფრáƒáƒœáƒ’ული (სირიáƒ)", + "fr_TD": "ფრáƒáƒœáƒ’ული (ჩáƒáƒ“ი)", + "fr_TG": "ფრáƒáƒœáƒ’ული (ტáƒáƒ’áƒ)", + "fr_TN": "ფრáƒáƒœáƒ’ული (ტუნისი)", + "fr_VU": "ფრáƒáƒœáƒ’ული (ვáƒáƒœáƒ£áƒáƒ¢áƒ£)", + "fr_WF": "ფრáƒáƒœáƒ’ული (უáƒáƒšáƒ˜áƒ¡áƒ˜ დრფუტუნáƒ)", + "fr_YT": "ფრáƒáƒœáƒ’ული (მáƒáƒ˜áƒáƒ¢áƒ)", + "fy": "დáƒáƒ¡áƒáƒ•ლეთფრიზიული", + "fy_NL": "დáƒáƒ¡áƒáƒ•ლეთფრიზიული (ნიდერლáƒáƒœáƒ“ები)", + "ga": "ირლáƒáƒœáƒ“იური", + "ga_IE": "ირლáƒáƒœáƒ“იური (ირლáƒáƒœáƒ“იáƒ)", + "gd": "შáƒáƒ¢áƒšáƒáƒœáƒ“იური გელური", + "gd_GB": "შáƒáƒ¢áƒšáƒáƒœáƒ“იური გელური (გáƒáƒ”რთიáƒáƒœáƒ”ბული სáƒáƒ›áƒ”ფáƒ)", + "gl": "გáƒáƒšáƒ˜áƒ¡áƒ˜áƒ£áƒ áƒ˜", + "gl_ES": "გáƒáƒšáƒ˜áƒ¡áƒ˜áƒ£áƒ áƒ˜ (ესპáƒáƒœáƒ”თი)", + "gu": "გუჯáƒáƒ áƒáƒ—ი", + "gu_IN": "გუჯáƒáƒ áƒáƒ—ი (ინდáƒáƒ”თი)", + "gv": "მენური", + "gv_IM": "მენური (მენის კუნძული)", + "ha": "ჰáƒáƒ£áƒ¡áƒ", + "ha_GH": "ჰáƒáƒ£áƒ¡áƒ (გáƒáƒœáƒ)", + "ha_NE": "ჰáƒáƒ£áƒ¡áƒ (ნიგერი)", + "ha_NG": "ჰáƒáƒ£áƒ¡áƒ (ნიგერიáƒ)", + "he": "ებრáƒáƒ£áƒšáƒ˜", + "he_IL": "ებრáƒáƒ£áƒšáƒ˜ (ისრáƒáƒ”ლი)", + "hi": "ჰინდი", + "hi_IN": "ჰინდი (ინდáƒáƒ”თი)", + "hr": "ხáƒáƒ áƒ•áƒáƒ¢áƒ£áƒšáƒ˜", + "hr_BA": "ხáƒáƒ áƒ•áƒáƒ¢áƒ£áƒšáƒ˜ (ბáƒáƒ¡áƒœáƒ˜áƒ დრჰერცეგáƒáƒ•ინáƒ)", + "hr_HR": "ხáƒáƒ áƒ•áƒáƒ¢áƒ£áƒšáƒ˜ (ხáƒáƒ áƒ•áƒáƒ¢áƒ˜áƒ)", + "hu": "უნგრული", + "hu_HU": "უნგრული (უნგრეთი)", + "hy": "სáƒáƒ›áƒ®áƒ£áƒ áƒ˜", + "hy_AM": "სáƒáƒ›áƒ®áƒ£áƒ áƒ˜ (სáƒáƒ›áƒ®áƒ”თი)", + "id": "ინდáƒáƒœáƒ”ზიური", + "id_ID": "ინდáƒáƒœáƒ”ზიური (ინდáƒáƒœáƒ”ზიáƒ)", + "ig": "იგბáƒ", + "ig_NG": "იგბრ(ნიგერიáƒ)", + "ii": "სიჩუáƒáƒœáƒ˜áƒ¡ ი", + "ii_CN": "სიჩუáƒáƒœáƒ˜áƒ¡ ი (ჩინეთი)", + "is": "ისლáƒáƒœáƒ“იური", + "is_IS": "ისლáƒáƒœáƒ“იური (ისლáƒáƒœáƒ“იáƒ)", + "it": "იტáƒáƒšáƒ˜áƒ£áƒ áƒ˜", + "it_CH": "იტáƒáƒšáƒ˜áƒ£áƒ áƒ˜ (შვეიცáƒáƒ áƒ˜áƒ)", + "it_IT": "იტáƒáƒšáƒ˜áƒ£áƒ áƒ˜ (იტáƒáƒšáƒ˜áƒ)", + "it_SM": "იტáƒáƒšáƒ˜áƒ£áƒ áƒ˜ (სáƒáƒœ-მáƒáƒ áƒ˜áƒœáƒ)", + "ja": "იáƒáƒžáƒáƒœáƒ£áƒ áƒ˜", + "ja_JP": "იáƒáƒžáƒáƒœáƒ£áƒ áƒ˜ (იáƒáƒžáƒáƒœáƒ˜áƒ)", + "ka": "ქáƒáƒ áƒ—ული", + "ka_GE": "ქáƒáƒ áƒ—ული (სáƒáƒ¥áƒáƒ áƒ—ველáƒ)", + "ki": "კიკუიუ", + "ki_KE": "კიკუიუ (კენიáƒ)", + "kk": "ყáƒáƒ–áƒáƒ®áƒ£áƒ áƒ˜", + "kk_KZ": "ყáƒáƒ–áƒáƒ®áƒ£áƒ áƒ˜ (ყáƒáƒ–áƒáƒ®áƒ”თი)", + "kl": "დáƒáƒ¡áƒáƒ•ლეთ გრენლáƒáƒœáƒ“იური", + "kl_GL": "დáƒáƒ¡áƒáƒ•ლეთ გრენლáƒáƒœáƒ“იური (გრენლáƒáƒœáƒ“იáƒ)", + "km": "ქმერული", + "km_KH": "ქმერული (კáƒáƒ›áƒ‘áƒáƒ¯áƒ)", + "kn": "კáƒáƒœáƒáƒ“áƒ", + "kn_IN": "კáƒáƒœáƒáƒ“რ(ინდáƒáƒ”თი)", + "ko": "კáƒáƒ áƒ”ული", + "ko_KP": "კáƒáƒ áƒ”ული (ჩრდილáƒáƒ”თ კáƒáƒ áƒ”áƒ)", + "ko_KR": "კáƒáƒ áƒ”ული (სáƒáƒ›áƒ®áƒ áƒ”თ კáƒáƒ áƒ”áƒ)", + "ks": "ქáƒáƒ¨áƒ›áƒ˜áƒ áƒ£áƒšáƒ˜", + "ks_IN": "ქáƒáƒ¨áƒ›áƒ˜áƒ áƒ£áƒšáƒ˜ (ინდáƒáƒ”თი)", + "kw": "კáƒáƒ áƒœáƒ£áƒšáƒ˜", + "kw_GB": "კáƒáƒ áƒœáƒ£áƒšáƒ˜ (გáƒáƒ”რთიáƒáƒœáƒ”ბული სáƒáƒ›áƒ”ფáƒ)", + "ky": "ყირგიზული", + "ky_KG": "ყირგიზული (ყირგიზეთი)", + "lb": "ლუქსემბურგული", + "lb_LU": "ლუქსემბურგული (ლუქსემბურგი)", + "lg": "გáƒáƒœáƒ“áƒ", + "lg_UG": "გáƒáƒœáƒ“რ(უგáƒáƒœáƒ“áƒ)", + "ln": "ლინგáƒáƒšáƒ", + "ln_AO": "ლინგáƒáƒšáƒ (áƒáƒœáƒ’áƒáƒšáƒ)", + "ln_CD": "ლინგáƒáƒšáƒ (კáƒáƒœáƒ’რ- კინშáƒáƒ¡áƒ)", + "ln_CF": "ლინგáƒáƒšáƒ (ცენტრáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ¤áƒ áƒ˜áƒ™áƒ˜áƒ¡ რესპუბლიკáƒ)", + "ln_CG": "ლინგáƒáƒšáƒ (კáƒáƒœáƒ’რ- ბრáƒáƒ–áƒáƒ•ილი)", + "lo": "ლáƒáƒáƒ¡áƒ£áƒ áƒ˜", + "lo_LA": "ლáƒáƒáƒ¡áƒ£áƒ áƒ˜ (ლáƒáƒáƒ¡áƒ˜)", + "lt": "ლიტვური", + "lt_LT": "ლიტვური (ლიტვáƒ)", + "lu": "ლუბáƒ-კáƒáƒ¢áƒáƒœáƒ’áƒ", + "lu_CD": "ლუბáƒ-კáƒáƒ¢áƒáƒœáƒ’რ(კáƒáƒœáƒ’რ- კინშáƒáƒ¡áƒ)", + "lv": "ლáƒáƒ¢áƒ•იური", + "lv_LV": "ლáƒáƒ¢áƒ•იური (ლáƒáƒ¢áƒ•იáƒ)", + "mg": "მáƒáƒšáƒáƒ’áƒáƒ¡áƒ˜áƒ£áƒ áƒ˜", + "mg_MG": "მáƒáƒšáƒáƒ’áƒáƒ¡áƒ˜áƒ£áƒ áƒ˜ (მáƒáƒ“áƒáƒ’áƒáƒ¡áƒ™áƒáƒ áƒ˜)", + "mk": "მáƒáƒ™áƒ”დáƒáƒœáƒ£áƒ áƒ˜", + "mk_MK": "მáƒáƒ™áƒ”დáƒáƒœáƒ£áƒ áƒ˜ (მáƒáƒ™áƒ”დáƒáƒœáƒ˜áƒ)", + "ml": "მáƒáƒšáƒáƒ˜áƒáƒšáƒáƒ›áƒ£áƒ áƒ˜", + "ml_IN": "მáƒáƒšáƒáƒ˜áƒáƒšáƒáƒ›áƒ£áƒ áƒ˜ (ინდáƒáƒ”თი)", + "mn": "მáƒáƒœáƒ¦áƒáƒšáƒ£áƒ áƒ˜", + "mn_MN": "მáƒáƒœáƒ¦áƒáƒšáƒ£áƒ áƒ˜ (მáƒáƒœáƒ¦áƒáƒšáƒ”თი)", + "mr": "მáƒáƒ áƒáƒ—ჰი", + "mr_IN": "მáƒáƒ áƒáƒ—ჰი (ინდáƒáƒ”თი)", + "ms": "მáƒáƒšáƒáƒ˜áƒ£áƒ áƒ˜", + "ms_BN": "მáƒáƒšáƒáƒ˜áƒ£áƒ áƒ˜ (ბრუნეი)", + "ms_MY": "მáƒáƒšáƒáƒ˜áƒ£áƒ áƒ˜ (მáƒáƒšáƒáƒ˜áƒ–იáƒ)", + "ms_SG": "მáƒáƒšáƒáƒ˜áƒ£áƒ áƒ˜ (სინგáƒáƒžáƒ£áƒ áƒ˜)", + "mt": "მáƒáƒšáƒ¢áƒ£áƒ áƒ˜", + "mt_MT": "მáƒáƒšáƒ¢áƒ£áƒ áƒ˜ (მáƒáƒšáƒ¢áƒ)", + "my": "ბირმული", + "my_MM": "ბირმული (მიáƒáƒœáƒ›áƒáƒ áƒ˜ (ბირმáƒ))", + "nb": "ნáƒáƒ áƒ•ეგიული ბუკმáƒáƒšáƒ˜", + "nb_NO": "ნáƒáƒ áƒ•ეგიული ბუკმáƒáƒšáƒ˜ (ნáƒáƒ áƒ•ეგიáƒ)", + "nb_SJ": "ნáƒáƒ áƒ•ეგიული ბუკმáƒáƒšáƒ˜ (შპიცბერგენი დრიáƒáƒœ-მáƒáƒ˜áƒ”ნი)", + "nd": "ჩრდილáƒáƒ”თ ნდებელე", + "nd_ZW": "ჩრდილáƒáƒ”თ ნდებელე (ზიმბáƒáƒ‘ვე)", + "ne": "ნეპáƒáƒšáƒ£áƒ áƒ˜", + "ne_IN": "ნეპáƒáƒšáƒ£áƒ áƒ˜ (ინდáƒáƒ”თი)", + "ne_NP": "ნეპáƒáƒšáƒ£áƒ áƒ˜ (ნეპáƒáƒšáƒ˜)", + "nl": "ნიდერლáƒáƒœáƒ“ური", + "nl_AW": "ნიდერლáƒáƒœáƒ“ური (áƒáƒ áƒ£áƒ‘áƒ)", + "nl_BE": "ნიდერლáƒáƒœáƒ“ური (ბელგიáƒ)", + "nl_BQ": "ნიდერლáƒáƒœáƒ“ური (კáƒáƒ áƒ˜áƒ‘ის ნიდერლáƒáƒœáƒ“ები)", + "nl_CW": "ნიდერლáƒáƒœáƒ“ური (კიურáƒáƒ¡áƒáƒ)", + "nl_NL": "ნიდერლáƒáƒœáƒ“ური (ნიდერლáƒáƒœáƒ“ები)", + "nl_SR": "ნიდერლáƒáƒœáƒ“ური (სურინáƒáƒ›áƒ˜)", + "nl_SX": "ნიდერლáƒáƒœáƒ“ური (სინტ-მáƒáƒ áƒ¢áƒ”ნი)", + "nn": "ნáƒáƒ áƒ•ეგიული ნიუნáƒáƒ áƒ¡áƒ™áƒ˜", + "nn_NO": "ნáƒáƒ áƒ•ეგიული ნიუნáƒáƒ áƒ¡áƒ™áƒ˜ (ნáƒáƒ áƒ•ეგიáƒ)", + "no": "ნáƒáƒ áƒ•ეგიული", + "no_NO": "ნáƒáƒ áƒ•ეგიული (ნáƒáƒ áƒ•ეგიáƒ)", + "om": "áƒáƒ áƒáƒ›áƒ", + "om_ET": "áƒáƒ áƒáƒ›áƒ (ეთიáƒáƒžáƒ˜áƒ)", + "om_KE": "áƒáƒ áƒáƒ›áƒ (კენიáƒ)", + "or": "áƒáƒ áƒ˜áƒ", + "or_IN": "áƒáƒ áƒ˜áƒ (ინდáƒáƒ”თი)", + "os": "áƒáƒ¡áƒ£áƒ áƒ˜", + "os_GE": "áƒáƒ¡áƒ£áƒ áƒ˜ (სáƒáƒ¥áƒáƒ áƒ—ველáƒ)", + "os_RU": "áƒáƒ¡áƒ£áƒ áƒ˜ (რუსეთი)", + "pa": "პენჯáƒáƒ‘ური", + "pa_Arab": "პენჯáƒáƒ‘ური (áƒáƒ áƒáƒ‘ული)", + "pa_Arab_PK": "პენჯáƒáƒ‘ური (áƒáƒ áƒáƒ‘ული, პáƒáƒ™áƒ˜áƒ¡áƒ¢áƒáƒœáƒ˜)", + "pa_Guru": "პენჯáƒáƒ‘ური (გურმუხი)", + "pa_Guru_IN": "პენჯáƒáƒ‘ური (გურმუხი, ინდáƒáƒ”თი)", + "pa_IN": "პენჯáƒáƒ‘ური (ინდáƒáƒ”თი)", + "pa_PK": "პენჯáƒáƒ‘ური (პáƒáƒ™áƒ˜áƒ¡áƒ¢áƒáƒœáƒ˜)", + "pl": "პáƒáƒšáƒáƒœáƒ£áƒ áƒ˜", + "pl_PL": "პáƒáƒšáƒáƒœáƒ£áƒ áƒ˜ (პáƒáƒšáƒáƒœáƒ”თი)", + "ps": "პუშტუ", + "ps_AF": "პუშტუ (áƒáƒ•ღáƒáƒœáƒ”თი)", + "pt": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜", + "pt_AO": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (áƒáƒœáƒ’áƒáƒšáƒ)", + "pt_BR": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (ბრáƒáƒ–ილიáƒ)", + "pt_CH": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (შვეიცáƒáƒ áƒ˜áƒ)", + "pt_CV": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (კáƒáƒ‘áƒ-ვერდე)", + "pt_GQ": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (ეკვáƒáƒ¢áƒáƒ áƒ£áƒšáƒ˜ გვინეáƒ)", + "pt_GW": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (გვინეáƒ-ბისáƒáƒ£)", + "pt_LU": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (ლუქსემბურგი)", + "pt_MO": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (მáƒáƒ™áƒáƒáƒ¡ სპეციáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ“მინისტრáƒáƒªáƒ˜áƒ£áƒšáƒ˜ რეგიáƒáƒœáƒ˜ ჩინეთი)", + "pt_MZ": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (მáƒáƒ–áƒáƒ›áƒ‘იკი)", + "pt_PT": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ)", + "pt_ST": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (სáƒáƒœ-ტáƒáƒ›áƒ” დრპრინსიპი)", + "pt_TL": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (ტიმáƒáƒ -ლესტე)", + "qu": "კეჩუáƒ", + "qu_BO": "კეჩურ(ბáƒáƒšáƒ˜áƒ•იáƒ)", + "qu_EC": "კეჩურ(ეკვáƒáƒ“áƒáƒ áƒ˜)", + "qu_PE": "კეჩურ(პერუ)", + "rm": "რეტáƒáƒ áƒáƒ›áƒáƒœáƒ£áƒšáƒ˜", + "rm_CH": "რეტáƒáƒ áƒáƒ›áƒáƒœáƒ£áƒšáƒ˜ (შვეიცáƒáƒ áƒ˜áƒ)", + "rn": "რუნდი", + "rn_BI": "რუნდი (ბურუნდი)", + "ro": "რუმინული", + "ro_MD": "რუმინული (მáƒáƒšáƒ“áƒáƒ•áƒ)", + "ro_RO": "რუმინული (რუმინეთი)", + "ru": "რუსული", + "ru_BY": "რუსული (ბელáƒáƒ áƒ£áƒ¡áƒ˜)", + "ru_KG": "რუსული (ყირგიზეთი)", + "ru_KZ": "რუსული (ყáƒáƒ–áƒáƒ®áƒ”თი)", + "ru_MD": "რუსული (მáƒáƒšáƒ“áƒáƒ•áƒ)", + "ru_RU": "რუსული (რუსეთი)", + "ru_UA": "რუსული (უკრáƒáƒ˜áƒœáƒ)", + "rw": "კინიáƒáƒ áƒ£áƒáƒœáƒ“áƒ", + "rw_RW": "კინიáƒáƒ áƒ£áƒáƒœáƒ“რ(რუáƒáƒœáƒ“áƒ)", + "se": "ჩრდილáƒáƒ”თ სáƒáƒáƒ›áƒ£áƒ áƒ˜", + "se_FI": "ჩრდილáƒáƒ”თ სáƒáƒáƒ›áƒ£áƒ áƒ˜ (ფინეთი)", + "se_NO": "ჩრდილáƒáƒ”თ სáƒáƒáƒ›áƒ£áƒ áƒ˜ (ნáƒáƒ áƒ•ეგიáƒ)", + "se_SE": "ჩრდილáƒáƒ”თ სáƒáƒáƒ›áƒ£áƒ áƒ˜ (შვედეთი)", + "sg": "სáƒáƒœáƒ’áƒ", + "sg_CF": "სáƒáƒœáƒ’რ(ცენტრáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ¤áƒ áƒ˜áƒ™áƒ˜áƒ¡ რესპუბლიკáƒ)", + "sh": "სერბულ-ხáƒáƒ áƒ•áƒáƒ¢áƒ£áƒšáƒ˜", + "sh_BA": "სერბულ-ხáƒáƒ áƒ•áƒáƒ¢áƒ£áƒšáƒ˜ (ბáƒáƒ¡áƒœáƒ˜áƒ დრჰერცეგáƒáƒ•ინáƒ)", + "si": "სინჰáƒáƒšáƒ£áƒ áƒ˜", + "si_LK": "სინჰáƒáƒšáƒ£áƒ áƒ˜ (შრი-ლáƒáƒœáƒ™áƒ)", + "sk": "სლáƒáƒ•áƒáƒ™áƒ£áƒ áƒ˜", + "sk_SK": "სლáƒáƒ•áƒáƒ™áƒ£áƒ áƒ˜ (სლáƒáƒ•áƒáƒ™áƒ”თი)", + "sl": "სლáƒáƒ•ენური", + "sl_SI": "სლáƒáƒ•ენური (სლáƒáƒ•ენიáƒ)", + "sn": "შáƒáƒœáƒ", + "sn_ZW": "შáƒáƒœáƒ (ზიმბáƒáƒ‘ვე)", + "so": "სáƒáƒ›áƒáƒšáƒ˜áƒ£áƒ áƒ˜", + "so_DJ": "სáƒáƒ›áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (ჯიბუტი)", + "so_ET": "სáƒáƒ›áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (ეთიáƒáƒžáƒ˜áƒ)", + "so_KE": "სáƒáƒ›áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (კენიáƒ)", + "so_SO": "სáƒáƒ›áƒáƒšáƒ˜áƒ£áƒ áƒ˜ (სáƒáƒ›áƒáƒšáƒ˜)", + "sq": "áƒáƒšáƒ‘áƒáƒœáƒ£áƒ áƒ˜", + "sq_AL": "áƒáƒšáƒ‘áƒáƒœáƒ£áƒ áƒ˜ (áƒáƒšáƒ‘áƒáƒœáƒ”თი)", + "sq_MK": "áƒáƒšáƒ‘áƒáƒœáƒ£áƒ áƒ˜ (მáƒáƒ™áƒ”დáƒáƒœáƒ˜áƒ)", + "sq_XK": "áƒáƒšáƒ‘áƒáƒœáƒ£áƒ áƒ˜ (კáƒáƒ¡áƒáƒ•áƒ)", + "sr": "სერბული", + "sr_BA": "სერბული (ბáƒáƒ¡áƒœáƒ˜áƒ დრჰერცეგáƒáƒ•ინáƒ)", + "sr_Cyrl": "სერბული (კირილიცáƒ)", + "sr_Cyrl_BA": "სერბული (კირილიცáƒ, ბáƒáƒ¡áƒœáƒ˜áƒ დრჰერცეგáƒáƒ•ინáƒ)", + "sr_Cyrl_ME": "სერბული (კირილიცáƒ, მáƒáƒœáƒ¢áƒ”ნეგრáƒ)", + "sr_Cyrl_RS": "სერბული (კირილიცáƒ, სერბეთი)", + "sr_Cyrl_XK": "სერბული (კირილიცáƒ, კáƒáƒ¡áƒáƒ•áƒ)", + "sr_Latn": "სერბული (ლáƒáƒ—ინური)", + "sr_Latn_BA": "სერბული (ლáƒáƒ—ინური, ბáƒáƒ¡áƒœáƒ˜áƒ დრჰერცეგáƒáƒ•ინáƒ)", + "sr_Latn_ME": "სერბული (ლáƒáƒ—ინური, მáƒáƒœáƒ¢áƒ”ნეგრáƒ)", + "sr_Latn_RS": "სერბული (ლáƒáƒ—ინური, სერბეთი)", + "sr_Latn_XK": "სერბული (ლáƒáƒ—ინური, კáƒáƒ¡áƒáƒ•áƒ)", + "sr_ME": "სერბული (მáƒáƒœáƒ¢áƒ”ნეგრáƒ)", + "sr_RS": "სერბული (სერბეთი)", + "sr_XK": "სერბული (კáƒáƒ¡áƒáƒ•áƒ)", + "sv": "შვედური", + "sv_AX": "შვედური (áƒáƒšáƒáƒœáƒ“ის კუნძულები)", + "sv_FI": "შვედური (ფინეთი)", + "sv_SE": "შვედური (შვედეთი)", + "sw": "სუáƒáƒ°áƒ˜áƒšáƒ˜", + "sw_CD": "სუáƒáƒ°áƒ˜áƒšáƒ˜ (კáƒáƒœáƒ’რ- კინშáƒáƒ¡áƒ)", + "sw_KE": "სუáƒáƒ°áƒ˜áƒšáƒ˜ (კენიáƒ)", + "sw_TZ": "სუáƒáƒ°áƒ˜áƒšáƒ˜ (ტáƒáƒœáƒ–áƒáƒœáƒ˜áƒ)", + "sw_UG": "სუáƒáƒ°áƒ˜áƒšáƒ˜ (უგáƒáƒœáƒ“áƒ)", + "ta": "ტáƒáƒ›áƒ˜áƒšáƒ£áƒ áƒ˜", + "ta_IN": "ტáƒáƒ›áƒ˜áƒšáƒ£áƒ áƒ˜ (ინდáƒáƒ”თი)", + "ta_LK": "ტáƒáƒ›áƒ˜áƒšáƒ£áƒ áƒ˜ (შრი-ლáƒáƒœáƒ™áƒ)", + "ta_MY": "ტáƒáƒ›áƒ˜áƒšáƒ£áƒ áƒ˜ (მáƒáƒšáƒáƒ˜áƒ–იáƒ)", + "ta_SG": "ტáƒáƒ›áƒ˜áƒšáƒ£áƒ áƒ˜ (სინგáƒáƒžáƒ£áƒ áƒ˜)", + "te": "ტელუგუ", + "te_IN": "ტელუგუ (ინდáƒáƒ”თი)", + "th": "ტáƒáƒ˜", + "th_TH": "ტáƒáƒ˜ (ტáƒáƒ˜áƒšáƒáƒœáƒ“ი)", + "ti": "ტიგრინიáƒ", + "ti_ER": "ტიგრინირ(ერიტრეáƒ)", + "ti_ET": "ტიგრინირ(ეთიáƒáƒžáƒ˜áƒ)", + "to": "ტáƒáƒœáƒ’áƒáƒœáƒ£áƒ áƒ˜", + "to_TO": "ტáƒáƒœáƒ’áƒáƒœáƒ£áƒ áƒ˜ (ტáƒáƒœáƒ’áƒ)", + "tr": "თურქული", + "tr_CY": "თურქული (კვიპრáƒáƒ¡áƒ˜)", + "tr_TR": "თურქული (თურქეთი)", + "ug": "უიღურული", + "ug_CN": "უიღურული (ჩინეთი)", + "uk": "უკრáƒáƒ˜áƒœáƒ£áƒšáƒ˜", + "uk_UA": "უკრáƒáƒ˜áƒœáƒ£áƒšáƒ˜ (უკრáƒáƒ˜áƒœáƒ)", + "ur": "ურდუ", + "ur_IN": "ურდუ (ინდáƒáƒ”თი)", + "ur_PK": "ურდუ (პáƒáƒ™áƒ˜áƒ¡áƒ¢áƒáƒœáƒ˜)", + "uz": "უზბეკური", + "uz_AF": "უზბეკური (áƒáƒ•ღáƒáƒœáƒ”თი)", + "uz_Arab": "უზბეკური (áƒáƒ áƒáƒ‘ული)", + "uz_Arab_AF": "უზბეკური (áƒáƒ áƒáƒ‘ული, áƒáƒ•ღáƒáƒœáƒ”თი)", + "uz_Cyrl": "უზბეკური (კირილიცáƒ)", + "uz_Cyrl_UZ": "უზბეკური (კირილიცáƒ, უზბეკეთი)", + "uz_Latn": "უზბეკური (ლáƒáƒ—ინური)", + "uz_Latn_UZ": "უზბეკური (ლáƒáƒ—ინური, უზბეკეთი)", + "uz_UZ": "უზბეკური (უზბეკეთი)", + "vi": "ვიეტნáƒáƒ›áƒ£áƒ áƒ˜", + "vi_VN": "ვიეტნáƒáƒ›áƒ£áƒ áƒ˜ (ვიეტნáƒáƒ›áƒ˜)", + "yi": "იდიში", + "yo": "იáƒáƒ áƒ£áƒ‘áƒ", + "yo_BJ": "იáƒáƒ áƒ£áƒ‘რ(ბენინი)", + "yo_NG": "იáƒáƒ áƒ£áƒ‘რ(ნიგერიáƒ)", + "zh": "ჩინური", + "zh_CN": "ჩინური (ჩინეთი)", + "zh_HK": "ჩინური (ჰáƒáƒœáƒ™áƒáƒœáƒ’ის სპეციáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ“მინისტრáƒáƒªáƒ˜áƒ£áƒšáƒ˜ რეგიáƒáƒœáƒ˜ ჩინეთი)", + "zh_Hans": "ჩინური (გáƒáƒ›áƒáƒ áƒ¢áƒ˜áƒ•ებული)", + "zh_Hans_CN": "ჩინური (გáƒáƒ›áƒáƒ áƒ¢áƒ˜áƒ•ებული, ჩინეთი)", + "zh_Hans_HK": "ჩინური (გáƒáƒ›áƒáƒ áƒ¢áƒ˜áƒ•ებული, ჰáƒáƒœáƒ™áƒáƒœáƒ’ის სპეციáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ“მინისტრáƒáƒªáƒ˜áƒ£áƒšáƒ˜ რეგიáƒáƒœáƒ˜ ჩინეთი)", + "zh_Hans_MO": "ჩინური (გáƒáƒ›áƒáƒ áƒ¢áƒ˜áƒ•ებული, მáƒáƒ™áƒáƒáƒ¡ სპეციáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ“მინისტრáƒáƒªáƒ˜áƒ£áƒšáƒ˜ რეგიáƒáƒœáƒ˜ ჩინეთი)", + "zh_Hans_SG": "ჩინური (გáƒáƒ›áƒáƒ áƒ¢áƒ˜áƒ•ებული, სინგáƒáƒžáƒ£áƒ áƒ˜)", + "zh_Hant": "ჩინური (ტრáƒáƒ“იციული)", + "zh_Hant_HK": "ჩინური (ტრáƒáƒ“იციული, ჰáƒáƒœáƒ™áƒáƒœáƒ’ის სპეციáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ“მინისტრáƒáƒªáƒ˜áƒ£áƒšáƒ˜ რეგიáƒáƒœáƒ˜ ჩინეთი)", + "zh_Hant_MO": "ჩინური (ტრáƒáƒ“იციული, მáƒáƒ™áƒáƒáƒ¡ სპეციáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ“მინისტრáƒáƒªáƒ˜áƒ£áƒšáƒ˜ რეგიáƒáƒœáƒ˜ ჩინეთი)", + "zh_Hant_TW": "ჩინური (ტრáƒáƒ“იციული, ტáƒáƒ˜áƒ•áƒáƒœáƒ˜)", + "zh_MO": "ჩინური (მáƒáƒ™áƒáƒáƒ¡ სპეციáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ“მინისტრáƒáƒªáƒ˜áƒ£áƒšáƒ˜ რეგიáƒáƒœáƒ˜ ჩინეთი)", + "zh_SG": "ჩინური (სინგáƒáƒžáƒ£áƒ áƒ˜)", + "zh_TW": "ჩინური (ტáƒáƒ˜áƒ•áƒáƒœáƒ˜)", + "zu": "ზულუ", + "zu_ZA": "ზულუ (სáƒáƒ›áƒ®áƒ áƒ”თ áƒáƒ¤áƒ áƒ˜áƒ™áƒ˜áƒ¡ რესპუბლიკáƒ)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ki.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ki.json new file mode 100644 index 0000000000000000000000000000000000000000..2fee439dd1dd04a9ae6e6cc4c10a06b3fdaa4a5d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ki.json @@ -0,0 +1,321 @@ +{ + "Names": { + "ak": "Kiakan", + "ak_GH": "Kiakan (Ngana)", + "am": "Kiamhari", + "am_ET": "Kiamhari (Uhabeshi)", + "ar": "KÄ©arabu", + "ar_AE": "KÄ©arabu (Falme za Kiarabu)", + "ar_BH": "KÄ©arabu (Bahareni)", + "ar_DJ": "KÄ©arabu (Jibuti)", + "ar_DZ": "KÄ©arabu (Aljeria)", + "ar_EG": "KÄ©arabu (Misri)", + "ar_ER": "KÄ©arabu (Eritrea)", + "ar_IL": "KÄ©arabu (Israeli)", + "ar_IQ": "KÄ©arabu (Iraki)", + "ar_JO": "KÄ©arabu (Njorondani)", + "ar_KM": "KÄ©arabu (Komoro)", + "ar_KW": "KÄ©arabu (Kuwaiti)", + "ar_LB": "KÄ©arabu (Lebanoni)", + "ar_LY": "KÄ©arabu (Libya)", + "ar_MA": "KÄ©arabu (Moroko)", + "ar_MR": "KÄ©arabu (Moritania)", + "ar_OM": "KÄ©arabu (Omani)", + "ar_PS": "KÄ©arabu (Ukingo wa Magharibi na Ukanda wa Gaza wa Palestina)", + "ar_QA": "KÄ©arabu (Katari)", + "ar_SA": "KÄ©arabu (Saudi)", + "ar_SD": "KÄ©arabu (Sudani)", + "ar_SO": "KÄ©arabu (Somaria)", + "ar_SY": "KÄ©arabu (Siria)", + "ar_TD": "KÄ©arabu (Chadi)", + "ar_TN": "KÄ©arabu (Tunisia)", + "ar_YE": "KÄ©arabu (Yemeni)", + "be": "Kibelarusi", + "be_BY": "Kibelarusi (Belarusi)", + "bg": "Kibulgaria", + "bg_BG": "Kibulgaria (Bulgaria)", + "bn": "Kibangla", + "bn_BD": "Kibangla (Bangladeshi)", + "bn_IN": "Kibangla (India)", + "cs": "Kichecki", + "cs_CZ": "Kichecki (Jamhuri ya Cheki)", + "de": "KÄ©njeremani", + "de_AT": "KÄ©njeremani (Austria)", + "de_BE": "KÄ©njeremani (Ubelgiji)", + "de_CH": "KÄ©njeremani (Uswisi)", + "de_DE": "KÄ©njeremani (Njeremani)", + "de_IT": "KÄ©njeremani (Italia)", + "de_LI": "KÄ©njeremani (Lishenteni)", + "de_LU": "KÄ©njeremani (Lasembagi)", + "el": "Kigiriki", + "el_CY": "Kigiriki (Kuprosi)", + "el_GR": "Kigiriki (Ugiriki)", + "en": "GÄ©thungÅ©", + "en_AG": "GÄ©thungÅ© (Antigua na Barbuda)", + "en_AI": "GÄ©thungÅ© (Anguilla)", + "en_AS": "GÄ©thungÅ© (Samoa ya Marekani)", + "en_AT": "GÄ©thungÅ© (Austria)", + "en_AU": "GÄ©thungÅ© (Australia)", + "en_BB": "GÄ©thungÅ© (Babadosi)", + "en_BE": "GÄ©thungÅ© (Ubelgiji)", + "en_BI": "GÄ©thungÅ© (Mburundi)", + "en_BM": "GÄ©thungÅ© (Bermuda)", + "en_BS": "GÄ©thungÅ© (Bahama)", + "en_BW": "GÄ©thungÅ© (Botswana)", + "en_BZ": "GÄ©thungÅ© (Belize)", + "en_CA": "GÄ©thungÅ© (Kanada)", + "en_CH": "GÄ©thungÅ© (Uswisi)", + "en_CK": "GÄ©thungÅ© (Visiwa vya Cook)", + "en_CM": "GÄ©thungÅ© (Kameruni)", + "en_CY": "GÄ©thungÅ© (Kuprosi)", + "en_DE": "GÄ©thungÅ© (Njeremani)", + "en_DK": "GÄ©thungÅ© (Denmaki)", + "en_DM": "GÄ©thungÅ© (Dominika)", + "en_ER": "GÄ©thungÅ© (Eritrea)", + "en_FI": "GÄ©thungÅ© (Ufini)", + "en_FJ": "GÄ©thungÅ© (Fiji)", + "en_FK": "GÄ©thungÅ© (Visiwa vya Falkland)", + "en_FM": "GÄ©thungÅ© (Mikronesia)", + "en_GB": "GÄ©thungÅ© (Ngeretha)", + "en_GD": "GÄ©thungÅ© (Grenada)", + "en_GH": "GÄ©thungÅ© (Ngana)", + "en_GI": "GÄ©thungÅ© (Jibralta)", + "en_GM": "GÄ©thungÅ© (Gambia)", + "en_GU": "GÄ©thungÅ© (Gwam)", + "en_GY": "GÄ©thungÅ© (Guyana)", + "en_IE": "GÄ©thungÅ© (Ayalandi)", + "en_IL": "GÄ©thungÅ© (Israeli)", + "en_IN": "GÄ©thungÅ© (India)", + "en_IO": "GÄ©thungÅ© (Eneo la Uingereza katika Bahari Hindi)", + "en_JM": "GÄ©thungÅ© (Jamaika)", + "en_KE": "GÄ©thungÅ© (Kenya)", + "en_KI": "GÄ©thungÅ© (Kiribati)", + "en_KN": "GÄ©thungÅ© (Santakitzi na Nevis)", + "en_KY": "GÄ©thungÅ© (Visiwa vya Kayman)", + "en_LC": "GÄ©thungÅ© (Santalusia)", + "en_LR": "GÄ©thungÅ© (Liberia)", + "en_LS": "GÄ©thungÅ© (Lesoto)", + "en_MG": "GÄ©thungÅ© (Bukini)", + "en_MH": "GÄ©thungÅ© (Visiwa vya Marshal)", + "en_MP": "GÄ©thungÅ© (Visiwa vya Mariana vya Kaskazini)", + "en_MS": "GÄ©thungÅ© (Montserrati)", + "en_MT": "GÄ©thungÅ© (Malta)", + "en_MU": "GÄ©thungÅ© (Morisi)", + "en_MW": "GÄ©thungÅ© (Malawi)", + "en_MY": "GÄ©thungÅ© (Malesia)", + "en_NA": "GÄ©thungÅ© (Namimbia)", + "en_NF": "GÄ©thungÅ© (Kisiwa cha Norfok)", + "en_NG": "GÄ©thungÅ© (Nainjeria)", + "en_NL": "GÄ©thungÅ© (Uholanzi)", + "en_NR": "GÄ©thungÅ© (Nauru)", + "en_NU": "GÄ©thungÅ© (Niue)", + "en_NZ": "GÄ©thungÅ© (Nyuzilandi)", + "en_PG": "GÄ©thungÅ© (Papua)", + "en_PH": "GÄ©thungÅ© (Filipino)", + "en_PK": "GÄ©thungÅ© (Pakistani)", + "en_PN": "GÄ©thungÅ© (Pitkairni)", + "en_PR": "GÄ©thungÅ© (Pwetoriko)", + "en_PW": "GÄ©thungÅ© (Palau)", + "en_RW": "GÄ©thungÅ© (Rwanda)", + "en_SB": "GÄ©thungÅ© (Visiwa vya Solomon)", + "en_SC": "GÄ©thungÅ© (Shelisheli)", + "en_SD": "GÄ©thungÅ© (Sudani)", + "en_SE": "GÄ©thungÅ© (Uswidi)", + "en_SG": "GÄ©thungÅ© (Singapoo)", + "en_SH": "GÄ©thungÅ© (Santahelena)", + "en_SI": "GÄ©thungÅ© (Slovenia)", + "en_SL": "GÄ©thungÅ© (Siera Leoni)", + "en_SZ": "GÄ©thungÅ© (Uswazi)", + "en_TC": "GÄ©thungÅ© (Visiwa vya Turki na Kaiko)", + "en_TK": "GÄ©thungÅ© (Tokelau)", + "en_TO": "GÄ©thungÅ© (Tonga)", + "en_TT": "GÄ©thungÅ© (Trinidad na Tobago)", + "en_TV": "GÄ©thungÅ© (Tuvalu)", + "en_TZ": "GÄ©thungÅ© (Tanzania)", + "en_UG": "GÄ©thungÅ© (Uganda)", + "en_US": "GÄ©thungÅ© (Amerika)", + "en_VC": "GÄ©thungÅ© (Santavisenti na Grenadini)", + "en_VG": "GÄ©thungÅ© (Visiwa vya Virgin vya Uingereza)", + "en_VI": "GÄ©thungÅ© (Visiwa vya Virgin vya Marekani)", + "en_VU": "GÄ©thungÅ© (Vanuatu)", + "en_WS": "GÄ©thungÅ© (Samoa)", + "en_ZA": "GÄ©thungÅ© (Afrika Kusini)", + "en_ZM": "GÄ©thungÅ© (Zambia)", + "en_ZW": "GÄ©thungÅ© (Zimbabwe)", + "es": "Kihispania", + "es_AR": "Kihispania (Ajentina)", + "es_BO": "Kihispania (Bolivia)", + "es_BR": "Kihispania (Brazili)", + "es_CL": "Kihispania (Chile)", + "es_CO": "Kihispania (Kolombia)", + "es_CR": "Kihispania (Kostarika)", + "es_CU": "Kihispania (Kiumba)", + "es_DO": "Kihispania (Jamhuri ya Dominika)", + "es_EC": "Kihispania (Ekwado)", + "es_ES": "Kihispania (Hispania)", + "es_GQ": "Kihispania (Ginekweta)", + "es_GT": "Kihispania (Gwatemala)", + "es_HN": "Kihispania (Hondurasi)", + "es_MX": "Kihispania (Meksiko)", + "es_NI": "Kihispania (Nikaragwa)", + "es_PA": "Kihispania (Panama)", + "es_PE": "Kihispania (Peru)", + "es_PH": "Kihispania (Filipino)", + "es_PR": "Kihispania (Pwetoriko)", + "es_PY": "Kihispania (Paragwai)", + "es_SV": "Kihispania (Elsavado)", + "es_US": "Kihispania (Amerika)", + "es_UY": "Kihispania (Urugwai)", + "es_VE": "Kihispania (Venezuela)", + "fa": "Kiajemi", + "fa_AF": "Kiajemi (Afuganistani)", + "fa_IR": "Kiajemi (Uajemi)", + "fr": "KÄ©baranja", + "fr_BE": "KÄ©baranja (Ubelgiji)", + "fr_BF": "KÄ©baranja (Bukinafaso)", + "fr_BI": "KÄ©baranja (Mburundi)", + "fr_BJ": "KÄ©baranja (Benini)", + "fr_CA": "KÄ©baranja (Kanada)", + "fr_CD": "KÄ©baranja (Jamhuri ya Kidemokrasia ya Kongo)", + "fr_CF": "KÄ©baranja (Jamhuri ya Afrika ya Kati)", + "fr_CG": "KÄ©baranja (Kongo)", + "fr_CH": "KÄ©baranja (Uswisi)", + "fr_CI": "KÄ©baranja (Kodivaa)", + "fr_CM": "KÄ©baranja (Kameruni)", + "fr_DJ": "KÄ©baranja (Jibuti)", + "fr_DZ": "KÄ©baranja (Aljeria)", + "fr_FR": "KÄ©baranja (Ubaranja)", + "fr_GA": "KÄ©baranja (Gaboni)", + "fr_GF": "KÄ©baranja (Gwiyana ya Ufaransa)", + "fr_GN": "KÄ©baranja (Gine)", + "fr_GP": "KÄ©baranja (Gwadelupe)", + "fr_GQ": "KÄ©baranja (Ginekweta)", + "fr_HT": "KÄ©baranja (Haiti)", + "fr_KM": "KÄ©baranja (Komoro)", + "fr_LU": "KÄ©baranja (Lasembagi)", + "fr_MA": "KÄ©baranja (Moroko)", + "fr_MC": "KÄ©baranja (Monako)", + "fr_MG": "KÄ©baranja (Bukini)", + "fr_ML": "KÄ©baranja (Mali)", + "fr_MQ": "KÄ©baranja (Martiniki)", + "fr_MR": "KÄ©baranja (Moritania)", + "fr_MU": "KÄ©baranja (Morisi)", + "fr_NC": "KÄ©baranja (Nyukaledonia)", + "fr_NE": "KÄ©baranja (Nijeri)", + "fr_PF": "KÄ©baranja (Polinesia ya Ufaransa)", + "fr_PM": "KÄ©baranja (Santapieri na Mikeloni)", + "fr_RE": "KÄ©baranja (Riyunioni)", + "fr_RW": "KÄ©baranja (Rwanda)", + "fr_SC": "KÄ©baranja (Shelisheli)", + "fr_SN": "KÄ©baranja (Senegali)", + "fr_SY": "KÄ©baranja (Siria)", + "fr_TD": "KÄ©baranja (Chadi)", + "fr_TG": "KÄ©baranja (Togo)", + "fr_TN": "KÄ©baranja (Tunisia)", + "fr_VU": "KÄ©baranja (Vanuatu)", + "fr_WF": "KÄ©baranja (Walis na Futuna)", + "fr_YT": "KÄ©baranja (Mayotte)", + "ha": "Kihausa", + "ha_GH": "Kihausa (Ngana)", + "ha_NE": "Kihausa (Nijeri)", + "ha_NG": "Kihausa (Nainjeria)", + "hi": "KÄ©hÄ©ndÄ©", + "hi_IN": "KÄ©hÄ©ndÄ© (India)", + "hu": "Kihungari", + "hu_HU": "Kihungari (Hungaria)", + "id": "Kiindonesia", + "id_ID": "Kiindonesia (Indonesia)", + "ig": "Kiigbo", + "ig_NG": "Kiigbo (Nainjeria)", + "it": "KÄ©taliano", + "it_CH": "KÄ©taliano (Uswisi)", + "it_IT": "KÄ©taliano (Italia)", + "it_SM": "KÄ©taliano (Samarino)", + "ja": "KÄ©njabani", + "ja_JP": "KÄ©njabani (Njabani)", + "ki": "Gikuyu", + "ki_KE": "Gikuyu (Kenya)", + "km": "Kikambodia", + "km_KH": "Kikambodia (Kambodia)", + "ko": "Kikorea", + "ko_KP": "Kikorea (Korea Kaskazini)", + "ko_KR": "Kikorea (Korea Kusini)", + "ms": "Kimalesia", + "ms_BN": "Kimalesia (Brunei)", + "ms_MY": "Kimalesia (Malesia)", + "ms_SG": "Kimalesia (Singapoo)", + "my": "Kiburma", + "my_MM": "Kiburma (Myama)", + "ne": "Kinepali", + "ne_IN": "Kinepali (India)", + "ne_NP": "Kinepali (Nepali)", + "nl": "Kiholanzi", + "nl_AW": "Kiholanzi (Aruba)", + "nl_BE": "Kiholanzi (Ubelgiji)", + "nl_NL": "Kiholanzi (Uholanzi)", + "nl_SR": "Kiholanzi (Surinamu)", + "pa": "Kipunjabi", + "pa_IN": "Kipunjabi (India)", + "pa_PK": "Kipunjabi (Pakistani)", + "pl": "Kipolandi", + "pl_PL": "Kipolandi (Polandi)", + "pt": "Kireno", + "pt_AO": "Kireno (Angola)", + "pt_BR": "Kireno (Brazili)", + "pt_CH": "Kireno (Uswisi)", + "pt_CV": "Kireno (Kepuvede)", + "pt_GQ": "Kireno (Ginekweta)", + "pt_GW": "Kireno (Ginebisau)", + "pt_LU": "Kireno (Lasembagi)", + "pt_MZ": "Kireno (Msumbiji)", + "pt_PT": "Kireno (Ureno)", + "pt_ST": "Kireno (Sao Tome na Principe)", + "pt_TL": "Kireno (Timori ya Mashariki)", + "ro": "Kiromania", + "ro_MD": "Kiromania (Moldova)", + "ro_RO": "Kiromania (Romania)", + "ru": "KÄ©racia", + "ru_BY": "KÄ©racia (Belarusi)", + "ru_KG": "KÄ©racia (Kirigizistani)", + "ru_KZ": "KÄ©racia (Kazakistani)", + "ru_MD": "KÄ©racia (Moldova)", + "ru_RU": "KÄ©racia (Urusi)", + "ru_UA": "KÄ©racia (Ukraini)", + "rw": "Kinyarwanda", + "rw_RW": "Kinyarwanda (Rwanda)", + "so": "KÄ©cumarÄ©", + "so_DJ": "KÄ©cumarÄ© (Jibuti)", + "so_ET": "KÄ©cumarÄ© (Uhabeshi)", + "so_KE": "KÄ©cumarÄ© (Kenya)", + "so_SO": "KÄ©cumarÄ© (Somaria)", + "sv": "Kiswidi", + "sv_FI": "Kiswidi (Ufini)", + "sv_SE": "Kiswidi (Uswidi)", + "ta": "Kitamil", + "ta_IN": "Kitamil (India)", + "ta_LK": "Kitamil (Sirilanka)", + "ta_MY": "Kitamil (Malesia)", + "ta_SG": "Kitamil (Singapoo)", + "th": "Kitailandi", + "th_TH": "Kitailandi (Tailandi)", + "tr": "Kituruki", + "tr_CY": "Kituruki (Kuprosi)", + "tr_TR": "Kituruki (Uturuki)", + "uk": "Kiukrania", + "uk_UA": "Kiukrania (Ukraini)", + "ur": "Kiurdu", + "ur_IN": "Kiurdu (India)", + "ur_PK": "Kiurdu (Pakistani)", + "vi": "Kivietinamu", + "vi_VN": "Kivietinamu (Vietinamu)", + "yo": "Kiyoruba", + "yo_BJ": "Kiyoruba (Benini)", + "yo_NG": "Kiyoruba (Nainjeria)", + "zh": "KÄ©caina", + "zh_CN": "KÄ©caina (Caina)", + "zh_SG": "KÄ©caina (Singapoo)", + "zh_TW": "KÄ©caina (Taiwani)", + "zu": "Kizulu", + "zu_ZA": "Kizulu (Afrika Kusini)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/kk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/kk.json new file mode 100644 index 0000000000000000000000000000000000000000..5f4ccec6b84134fb8be50b6df18faf2116bb4e7a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/kk.json @@ -0,0 +1,566 @@ +{ + "Names": { + "af": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ Ñ‚Ñ–Ð»Ñ–", + "af_NA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ Ñ‚Ñ–Ð»Ñ– (ÐамибиÑ)", + "af_ZA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ Ñ‚Ñ–Ð»Ñ– (ОңтүÑтік Ðфрика РеÑпубликаÑÑ‹)", + "ak": "акан тілі", + "ak_GH": "акан тілі (Гана)", + "am": "амхар тілі", + "am_ET": "амхар тілі (ЭфиопиÑ)", + "ar": "араб тілі", + "ar_AE": "араб тілі (Біріккен Ðраб Әмірліктері)", + "ar_BH": "араб тілі (Бахрейн)", + "ar_DJ": "араб тілі (Джибути)", + "ar_DZ": "араб тілі (Ðлжир)", + "ar_EG": "араб тілі (МыÑыр)", + "ar_EH": "араб тілі (Ð‘Ð°Ñ‚Ñ‹Ñ Ð¡Ð°Ñ…Ð°Ñ€Ð°)", + "ar_ER": "араб тілі (ЭритреÑ)", + "ar_IL": "араб тілі (Израиль)", + "ar_IQ": "араб тілі (Ирак)", + "ar_JO": "араб тілі (ИорданиÑ)", + "ar_KM": "араб тілі (Комор аралдары)", + "ar_KW": "араб тілі (Кувейт)", + "ar_LB": "араб тілі (Ливан)", + "ar_LY": "араб тілі (ЛивиÑ)", + "ar_MA": "араб тілі (Марокко)", + "ar_MR": "араб тілі (МавританиÑ)", + "ar_OM": "араб тілі (Оман)", + "ar_PS": "араб тілі (ПалеÑтина аймақтары)", + "ar_QA": "араб тілі (Катар)", + "ar_SA": "араб тілі (Сауд ÐрабиÑÑÑ‹)", + "ar_SD": "араб тілі (Судан)", + "ar_SO": "араб тілі (Сомали)", + "ar_SS": "араб тілі (ОңтүÑтік Судан)", + "ar_SY": "араб тілі (СириÑ)", + "ar_TD": "араб тілі (Чад)", + "ar_TN": "араб тілі (ТуниÑ)", + "ar_YE": "араб тілі (Йемен)", + "as": "аÑÑам тілі", + "as_IN": "аÑÑам тілі (ҮндіÑтан)", + "az": "әзірбайжан тілі", + "az_AZ": "әзірбайжан тілі (Әзірбайжан)", + "az_Cyrl": "әзірбайжан тілі (кирилл жазуы)", + "az_Cyrl_AZ": "әзірбайжан тілі (кирилл жазуы, Әзірбайжан)", + "az_Latn": "әзірбайжан тілі (латын жазуы)", + "az_Latn_AZ": "әзірбайжан тілі (латын жазуы, Әзірбайжан)", + "be": "беларуÑÑŒ тілі", + "be_BY": "беларуÑÑŒ тілі (БеларуÑÑŒ)", + "bg": "болгар тілі", + "bg_BG": "болгар тілі (БолгариÑ)", + "bm": "бамбара тілі", + "bm_ML": "бамбара тілі (Мали)", + "bn": "бенгал тілі", + "bn_BD": "бенгал тілі (Бангладеш)", + "bn_IN": "бенгал тілі (ҮндіÑтан)", + "bo": "тибет тілі", + "bo_CN": "тибет тілі (Қытай)", + "bo_IN": "тибет тілі (ҮндіÑтан)", + "br": "бретон тілі", + "br_FR": "бретон тілі (ФранциÑ)", + "bs": "боÑÐ½Ð¸Ñ Ñ‚Ñ–Ð»Ñ–", + "bs_BA": "боÑÐ½Ð¸Ñ Ñ‚Ñ–Ð»Ñ– (БоÑÐ½Ð¸Ñ Ð¶Ó™Ð½Ðµ Герцеговина)", + "bs_Cyrl": "боÑÐ½Ð¸Ñ Ñ‚Ñ–Ð»Ñ– (кирилл жазуы)", + "bs_Cyrl_BA": "боÑÐ½Ð¸Ñ Ñ‚Ñ–Ð»Ñ– (кирилл жазуы, БоÑÐ½Ð¸Ñ Ð¶Ó™Ð½Ðµ Герцеговина)", + "bs_Latn": "боÑÐ½Ð¸Ñ Ñ‚Ñ–Ð»Ñ– (латын жазуы)", + "bs_Latn_BA": "боÑÐ½Ð¸Ñ Ñ‚Ñ–Ð»Ñ– (латын жазуы, БоÑÐ½Ð¸Ñ Ð¶Ó™Ð½Ðµ Герцеговина)", + "ca": "каталан тілі", + "ca_AD": "каталан тілі (Ðндорра)", + "ca_ES": "каталан тілі (ИÑпаниÑ)", + "ca_FR": "каталан тілі (ФранциÑ)", + "ca_IT": "каталан тілі (ИталиÑ)", + "ce": "шешен тілі", + "ce_RU": "шешен тілі (РеÑей)", + "cs": "чех тілі", + "cs_CZ": "чех тілі (Чех РеÑпубликаÑÑ‹)", + "cy": "валлий тілі", + "cy_GB": "валлий тілі (ҰлыбританиÑ)", + "da": "дат тілі", + "da_DK": "дат тілі (ДаниÑ)", + "da_GL": "дат тілі (ГренландиÑ)", + "de": "Ð½ÐµÐ¼Ñ–Ñ Ñ‚Ñ–Ð»Ñ–", + "de_AT": "Ð½ÐµÐ¼Ñ–Ñ Ñ‚Ñ–Ð»Ñ– (ÐвÑтриÑ)", + "de_BE": "Ð½ÐµÐ¼Ñ–Ñ Ñ‚Ñ–Ð»Ñ– (БельгиÑ)", + "de_CH": "Ð½ÐµÐ¼Ñ–Ñ Ñ‚Ñ–Ð»Ñ– (ШвейцариÑ)", + "de_DE": "Ð½ÐµÐ¼Ñ–Ñ Ñ‚Ñ–Ð»Ñ– (ГерманиÑ)", + "de_IT": "Ð½ÐµÐ¼Ñ–Ñ Ñ‚Ñ–Ð»Ñ– (ИталиÑ)", + "de_LI": "Ð½ÐµÐ¼Ñ–Ñ Ñ‚Ñ–Ð»Ñ– (Лихтенштейн)", + "de_LU": "Ð½ÐµÐ¼Ñ–Ñ Ñ‚Ñ–Ð»Ñ– (ЛюкÑембург)", + "dz": "дзонг-ÐºÑ Ñ‚Ñ–Ð»Ñ–", + "dz_BT": "дзонг-ÐºÑ Ñ‚Ñ–Ð»Ñ– (Бутан)", + "ee": "Ñве тілі", + "ee_GH": "Ñве тілі (Гана)", + "ee_TG": "Ñве тілі (Того)", + "el": "грек тілі", + "el_CY": "грек тілі (Кипр)", + "el_GR": "грек тілі (ГрекиÑ)", + "en": "ағылшын тілі", + "en_AG": "ағылшын тілі (Ðнтигуа және Барбуда)", + "en_AI": "ағылшын тілі (ÐнгильÑ)", + "en_AS": "ағылшын тілі (Ðмерикалық Самоа)", + "en_AT": "ағылшын тілі (ÐвÑтриÑ)", + "en_AU": "ағылшын тілі (ÐвÑтралиÑ)", + "en_BB": "ағылшын тілі (БарбадоÑ)", + "en_BE": "ағылшын тілі (БельгиÑ)", + "en_BI": "ағылшын тілі (Бурунди)", + "en_BM": "ағылшын тілі (Бермуд аралдары)", + "en_BS": "ағылшын тілі (Багам аралдары)", + "en_BW": "ағылшын тілі (БотÑвана)", + "en_BZ": "ағылшын тілі (Белиз)", + "en_CA": "ағылшын тілі (Канада)", + "en_CC": "ағылшын тілі (ÐšÐ¾ÐºÐ¾Ñ (Килинг) аралдары)", + "en_CH": "ағылшын тілі (ШвейцариÑ)", + "en_CK": "ағылшын тілі (Кук аралдары)", + "en_CM": "ағылшын тілі (Камерун)", + "en_CX": "ағылшын тілі (РождеÑтво аралы)", + "en_CY": "ағылшын тілі (Кипр)", + "en_DE": "ағылшын тілі (ГерманиÑ)", + "en_DG": "ағылшын тілі (Диего-ГарÑиÑ)", + "en_DK": "ағылшын тілі (ДаниÑ)", + "en_DM": "ағылшын тілі (Доминика)", + "en_ER": "ағылшын тілі (ЭритреÑ)", + "en_FI": "ағылшын тілі (ФинлÑндиÑ)", + "en_FJ": "ағылшын тілі (Фиджи)", + "en_FK": "ағылшын тілі (Фолкленд аралдары)", + "en_FM": "ағылшын тілі (МикронезиÑ)", + "en_GB": "ағылшын тілі (ҰлыбританиÑ)", + "en_GD": "ағылшын тілі (Гренада)", + "en_GG": "ағылшын тілі (ГернÑи)", + "en_GH": "ағылшын тілі (Гана)", + "en_GI": "ағылшын тілі (Гибралтар)", + "en_GM": "ағылшын тілі (ГамбиÑ)", + "en_GU": "ағылшын тілі (Гуам)", + "en_GY": "ағылшын тілі (Гайана)", + "en_HK": "ағылшын тілі (Қытай Халық РеÑпубликаÑының Гонконг арнайы әкімшілік ауданы)", + "en_IE": "ағылшын тілі (ИрландиÑ)", + "en_IL": "ағылшын тілі (Израиль)", + "en_IM": "ағылшын тілі (МÑн аралы)", + "en_IN": "ағылшын тілі (ҮндіÑтан)", + "en_IO": "ағылшын тілі (Үнді мұхитындағы Британ аймағы)", + "en_JE": "ағылшын тілі (ДжерÑи)", + "en_JM": "ағылшын тілі (Ямайка)", + "en_KE": "ағылшын тілі (КениÑ)", + "en_KI": "ағылшын тілі (Кирибати)", + "en_KN": "ағылшын тілі (Сент-ÐšÐ¸Ñ‚Ñ Ð¶Ó™Ð½Ðµ ÐевиÑ)", + "en_KY": "ағылшын тілі (Кайман аралдары)", + "en_LC": "ағылшын тілі (Сент-ЛюÑиÑ)", + "en_LR": "ағылшын тілі (ЛибериÑ)", + "en_LS": "ағылшын тілі (ЛеÑото)", + "en_MG": "ағылшын тілі (МадагаÑкар)", + "en_MH": "ағылшын тілі (Маршалл аралдары)", + "en_MO": "ағылшын тілі (Қытай Халық РеÑпубликаÑының Макао арнайы әкімшілік ауданы)", + "en_MP": "ағылшын тілі (СолтүÑтік Мариана аралдары)", + "en_MS": "ағылшын тілі (МонтÑеррат)", + "en_MT": "ағылшын тілі (Мальта)", + "en_MU": "ағылшын тілі (Маврикий)", + "en_MW": "ағылшын тілі (Малави)", + "en_MY": "ағылшын тілі (МалайзиÑ)", + "en_NA": "ағылшын тілі (ÐамибиÑ)", + "en_NF": "ағылшын тілі (Ðорфолк аралы)", + "en_NG": "ағылшын тілі (ÐигериÑ)", + "en_NL": "ағылшын тілі (Ðидерланд)", + "en_NR": "ағылшын тілі (Ðауру)", + "en_NU": "ағылшын тілі (ÐиуÑ)", + "en_NZ": "ағылшын тілі (Жаңа ЗеландиÑ)", + "en_PG": "ағылшын тілі (Папуа — Жаңа ГвинеÑ)", + "en_PH": "ағылшын тілі (Филиппин)", + "en_PK": "ағылшын тілі (ПәкіÑтан)", + "en_PN": "ағылшын тілі (ПиткÑрн аралдары)", + "en_PR": "ағылшын тілі (ПуÑрто-Рико)", + "en_PW": "ағылшын тілі (Палау)", + "en_RW": "ағылшын тілі (Руанда)", + "en_SB": "ағылшын тілі (Соломон аралдары)", + "en_SC": "ағылшын тілі (Сейшель аралдары)", + "en_SD": "ағылшын тілі (Судан)", + "en_SE": "ағылшын тілі (ШвециÑ)", + "en_SG": "ағылшын тілі (Сингапур)", + "en_SH": "ағылшын тілі (Әулие Елена аралы)", + "en_SI": "ағылшын тілі (СловениÑ)", + "en_SL": "ағылшын тілі (Сьерра-Леоне)", + "en_SS": "ағылшын тілі (ОңтүÑтік Судан)", + "en_SX": "ағылшын тілі (Синт-Мартен)", + "en_SZ": "ағылшын тілі (Свазиленд)", + "en_TC": "ағылшын тілі (Ð¢ÐµÑ€ÐºÑ Ð¶Ó™Ð½Ðµ ÐšÐ°Ð¹ÐºÐ¾Ñ Ð°Ñ€Ð°Ð»Ð´Ð°Ñ€Ñ‹)", + "en_TK": "ағылшын тілі (Токелау)", + "en_TO": "ағылшын тілі (Тонга)", + "en_TT": "ағылшын тілі (Тринидад және Тобаго)", + "en_TV": "ағылшын тілі (Тувалу)", + "en_TZ": "ағылшын тілі (ТанзаниÑ)", + "en_UG": "ағылшын тілі (Уганда)", + "en_UM": "ағылшын тілі (ÐҚШ-тың Ñыртқы кіші аралдары)", + "en_US": "ағылшын тілі (Ðмерика Құрама Штаттары)", + "en_VC": "ағылшын тілі (Сент-ВинÑент және Гренадин аралдары)", + "en_VG": "ағылшын тілі (Британдық Виргин аралдары)", + "en_VI": "ағылшын тілі (ÐҚШ-тың Виргин аралдары)", + "en_VU": "ағылшын тілі (Вануату)", + "en_WS": "ағылшын тілі (Самоа)", + "en_ZA": "ағылшын тілі (ОңтүÑтік Ðфрика РеÑпубликаÑÑ‹)", + "en_ZM": "ағылшын тілі (ЗамбиÑ)", + "en_ZW": "ағылшын тілі (Зимбабве)", + "eo": "ÑÑперанто тілі", + "es": "иÑпан тілі", + "es_AR": "иÑпан тілі (Ðргентина)", + "es_BO": "иÑпан тілі (БоливиÑ)", + "es_BR": "иÑпан тілі (БразилиÑ)", + "es_CL": "иÑпан тілі (Чили)", + "es_CO": "иÑпан тілі (КолумбиÑ)", + "es_CR": "иÑпан тілі (КоÑта-Рика)", + "es_CU": "иÑпан тілі (Куба)", + "es_DO": "иÑпан тілі (Доминикан РеÑпубликаÑÑ‹)", + "es_EA": "иÑпан тілі (Сеута және МелильÑ)", + "es_EC": "иÑпан тілі (Эквадор)", + "es_ES": "иÑпан тілі (ИÑпаниÑ)", + "es_GQ": "иÑпан тілі (Экваторлық ГвинеÑ)", + "es_GT": "иÑпан тілі (Гватемала)", + "es_HN": "иÑпан тілі (ГондураÑ)", + "es_IC": "иÑпан тілі (Канар аралдары)", + "es_MX": "иÑпан тілі (МекÑика)", + "es_NI": "иÑпан тілі (Ðикарагуа)", + "es_PA": "иÑпан тілі (Панама)", + "es_PE": "иÑпан тілі (Перу)", + "es_PH": "иÑпан тілі (Филиппин)", + "es_PR": "иÑпан тілі (ПуÑрто-Рико)", + "es_PY": "иÑпан тілі (Парагвай)", + "es_SV": "иÑпан тілі (Сальвадор)", + "es_US": "иÑпан тілі (Ðмерика Құрама Штаттары)", + "es_UY": "иÑпан тілі (Уругвай)", + "es_VE": "иÑпан тілі (ВенеÑуÑла)", + "et": "ÑÑтон тілі", + "et_EE": "ÑÑтон тілі (ЭÑтониÑ)", + "eu": "баÑк тілі", + "eu_ES": "баÑк тілі (ИÑпаниÑ)", + "fa": "парÑÑ‹ тілі", + "fa_AF": "парÑÑ‹ тілі (ÐуғанÑтан)", + "fa_IR": "парÑÑ‹ тілі (Иран)", + "ff": "фула тілі", + "ff_CM": "фула тілі (Камерун)", + "ff_GN": "фула тілі (ГвинеÑ)", + "ff_MR": "фула тілі (МавританиÑ)", + "ff_SN": "фула тілі (Сенегал)", + "fi": "фин тілі", + "fi_FI": "фин тілі (ФинлÑндиÑ)", + "fo": "фарер тілі", + "fo_DK": "фарер тілі (ДаниÑ)", + "fo_FO": "фарер тілі (Фарер аралдары)", + "fr": "француз тілі", + "fr_BE": "француз тілі (БельгиÑ)", + "fr_BF": "француз тілі (Буркина-ФаÑо)", + "fr_BI": "француз тілі (Бурунди)", + "fr_BJ": "француз тілі (Бенин)", + "fr_BL": "француз тілі (Сен-Бартелеми)", + "fr_CA": "француз тілі (Канада)", + "fr_CD": "француз тілі (Конго)", + "fr_CF": "француз тілі (Орталық Ðфрика РеÑпубликаÑÑ‹)", + "fr_CG": "француз тілі (Конго-Браззавиль РеÑпубликаÑÑ‹)", + "fr_CH": "француз тілі (ШвейцариÑ)", + "fr_CI": "француз тілі (Кот-д’Ивуар)", + "fr_CM": "француз тілі (Камерун)", + "fr_DJ": "француз тілі (Джибути)", + "fr_DZ": "француз тілі (Ðлжир)", + "fr_FR": "француз тілі (ФранциÑ)", + "fr_GA": "француз тілі (Габон)", + "fr_GF": "француз тілі (Француз ГвианаÑÑ‹)", + "fr_GN": "француз тілі (ГвинеÑ)", + "fr_GP": "француз тілі (Гваделупа)", + "fr_GQ": "француз тілі (Экваторлық ГвинеÑ)", + "fr_HT": "француз тілі (Гаити)", + "fr_KM": "француз тілі (Комор аралдары)", + "fr_LU": "француз тілі (ЛюкÑембург)", + "fr_MA": "француз тілі (Марокко)", + "fr_MC": "француз тілі (Монако)", + "fr_MF": "француз тілі (Сен-Мартен)", + "fr_MG": "француз тілі (МадагаÑкар)", + "fr_ML": "француз тілі (Мали)", + "fr_MQ": "француз тілі (Мартиника)", + "fr_MR": "француз тілі (МавританиÑ)", + "fr_MU": "француз тілі (Маврикий)", + "fr_NC": "француз тілі (Жаңа КаледониÑ)", + "fr_NE": "француз тілі (Ðигер)", + "fr_PF": "француз тілі (Француз ПолинезиÑÑÑ‹)", + "fr_PM": "француз тілі (Сен-Пьер және Микелон)", + "fr_RE": "француз тілі (Реюньон)", + "fr_RW": "француз тілі (Руанда)", + "fr_SC": "француз тілі (Сейшель аралдары)", + "fr_SN": "француз тілі (Сенегал)", + "fr_SY": "француз тілі (СириÑ)", + "fr_TD": "француз тілі (Чад)", + "fr_TG": "француз тілі (Того)", + "fr_TN": "француз тілі (ТуниÑ)", + "fr_VU": "француз тілі (Вануату)", + "fr_WF": "француз тілі (Ð£Ð¾Ð»Ð»Ð¸Ñ Ð¶Ó™Ð½Ðµ Футуна)", + "fr_YT": "француз тілі (Майотта)", + "fy": "Ð±Ð°Ñ‚Ñ‹Ñ Ñ„Ñ€Ð¸Ð· тілі", + "fy_NL": "Ð±Ð°Ñ‚Ñ‹Ñ Ñ„Ñ€Ð¸Ð· тілі (Ðидерланд)", + "ga": "ирланд тілі", + "ga_IE": "ирланд тілі (ИрландиÑ)", + "gd": "гÑль тілі", + "gd_GB": "гÑль тілі (ҰлыбританиÑ)", + "gl": "галиÑÐ¸Ñ Ñ‚Ñ–Ð»Ñ–", + "gl_ES": "галиÑÐ¸Ñ Ñ‚Ñ–Ð»Ñ– (ИÑпаниÑ)", + "gu": "гуджарати тілі", + "gu_IN": "гуджарати тілі (ҮндіÑтан)", + "gv": "мÑн тілі", + "gv_IM": "мÑн тілі (МÑн аралы)", + "ha": "хауÑа тілі", + "ha_GH": "хауÑа тілі (Гана)", + "ha_NE": "хауÑа тілі (Ðигер)", + "ha_NG": "хауÑа тілі (ÐигериÑ)", + "he": "иврит тілі", + "he_IL": "иврит тілі (Израиль)", + "hi": "хинди тілі", + "hi_IN": "хинди тілі (ҮндіÑтан)", + "hr": "хорват тілі", + "hr_BA": "хорват тілі (БоÑÐ½Ð¸Ñ Ð¶Ó™Ð½Ðµ Герцеговина)", + "hr_HR": "хорват тілі (ХорватиÑ)", + "hu": "венгр тілі", + "hu_HU": "венгр тілі (ВенгриÑ)", + "hy": "армÑн тілі", + "hy_AM": "армÑн тілі (ÐрмениÑ)", + "id": "Ð¸Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ Ñ‚Ñ–Ð»Ñ–", + "id_ID": "Ð¸Ð½Ð´Ð¾Ð½ÐµÐ·Ð¸Ñ Ñ‚Ñ–Ð»Ñ– (ИндонезиÑ)", + "ig": "игбо тілі", + "ig_NG": "игбо тілі (ÐигериÑ)", + "ii": "Ñычуан и тілі", + "ii_CN": "Ñычуан и тілі (Қытай)", + "is": "иÑланд тілі", + "is_IS": "иÑланд тілі (ИÑландиÑ)", + "it": "итальÑн тілі", + "it_CH": "итальÑн тілі (ШвейцариÑ)", + "it_IT": "итальÑн тілі (ИталиÑ)", + "it_SM": "итальÑн тілі (Сан-Марино)", + "ja": "жапон тілі", + "ja_JP": "жапон тілі (ЖапониÑ)", + "ka": "грузин тілі", + "ka_GE": "грузин тілі (ГрузиÑ)", + "ki": "кикуйю тілі", + "ki_KE": "кикуйю тілі (КениÑ)", + "kk": "қазақ тілі", + "kk_KZ": "қазақ тілі (ҚазақÑтан)", + "kl": "калаалиÑут тілі", + "kl_GL": "калаалиÑут тілі (ГренландиÑ)", + "km": "кхмер тілі", + "km_KH": "кхмер тілі (Камбоджа)", + "kn": "каннада тілі", + "kn_IN": "каннада тілі (ҮндіÑтан)", + "ko": "корей тілі", + "ko_KP": "корей тілі (СолтүÑтік КореÑ)", + "ko_KR": "корей тілі (ОңтүÑтік КореÑ)", + "ks": "кашмир тілі", + "ks_IN": "кашмир тілі (ҮндіÑтан)", + "kw": "корн тілі", + "kw_GB": "корн тілі (ҰлыбританиÑ)", + "ky": "қырғыз тілі", + "ky_KG": "қырғыз тілі (ҚырғызÑтан)", + "lb": "люкÑембург тілі", + "lb_LU": "люкÑембург тілі (ЛюкÑембург)", + "lg": "ганда тілі", + "lg_UG": "ганда тілі (Уганда)", + "ln": "лингала тілі", + "ln_AO": "лингала тілі (Ðнгола)", + "ln_CD": "лингала тілі (Конго)", + "ln_CF": "лингала тілі (Орталық Ðфрика РеÑпубликаÑÑ‹)", + "ln_CG": "лингала тілі (Конго-Браззавиль РеÑпубликаÑÑ‹)", + "lo": "Ð»Ð°Ð¾Ñ Ñ‚Ñ–Ð»Ñ–", + "lo_LA": "Ð»Ð°Ð¾Ñ Ñ‚Ñ–Ð»Ñ– (ЛаоÑ)", + "lt": "литва тілі", + "lt_LT": "литва тілі (Литва)", + "lu": "луба-катанга тілі", + "lu_CD": "луба-катанга тілі (Конго)", + "lv": "латыш тілі", + "lv_LV": "латыш тілі (ЛатвиÑ)", + "mg": "малагаÑи тілі", + "mg_MG": "малагаÑи тілі (МадагаÑкар)", + "mk": "македон тілі", + "mk_MK": "македон тілі (МакедониÑ)", + "ml": "малаÑлам тілі", + "ml_IN": "малаÑлам тілі (ҮндіÑтан)", + "mn": "моңғол тілі", + "mn_MN": "моңғол тілі (МоңғолиÑ)", + "mr": "маратхи тілі", + "mr_IN": "маратхи тілі (ҮндіÑтан)", + "ms": "малай тілі", + "ms_BN": "малай тілі (Бруней)", + "ms_MY": "малай тілі (МалайзиÑ)", + "ms_SG": "малай тілі (Сингапур)", + "mt": "мальта тілі", + "mt_MT": "мальта тілі (Мальта)", + "my": "бирма тілі", + "my_MM": "бирма тілі (МьÑнма (Бирма))", + "nb": "норвегиÑлық букмол тілі", + "nb_NO": "норвегиÑлық букмол тілі (ÐорвегиÑ)", + "nb_SJ": "норвегиÑлық букмол тілі (Шпицберген және Ян-Майен)", + "nd": "ÑолтүÑтік ндебеле тілі", + "nd_ZW": "ÑолтүÑтік ндебеле тілі (Зимбабве)", + "ne": "непал тілі", + "ne_IN": "непал тілі (ҮндіÑтан)", + "ne_NP": "непал тілі (Ðепал)", + "nl": "нидерланд тілі", + "nl_AW": "нидерланд тілі (Ðруба)", + "nl_BE": "нидерланд тілі (БельгиÑ)", + "nl_BQ": "нидерланд тілі (Кариб ÐидерландыÑÑ‹)", + "nl_CW": "нидерланд тілі (КюраÑао)", + "nl_NL": "нидерланд тілі (Ðидерланд)", + "nl_SR": "нидерланд тілі (Суринам)", + "nl_SX": "нидерланд тілі (Синт-Мартен)", + "nn": "норвегиÑлық нюнорÑк тілі", + "nn_NO": "норвегиÑлық нюнорÑк тілі (ÐорвегиÑ)", + "no": "норвег тілі", + "no_NO": "норвег тілі (ÐорвегиÑ)", + "om": "оромо тілі", + "om_ET": "оромо тілі (ЭфиопиÑ)", + "om_KE": "оромо тілі (КениÑ)", + "or": "Ð¾Ñ€Ð¸Ñ Ñ‚Ñ–Ð»Ñ–", + "or_IN": "Ð¾Ñ€Ð¸Ñ Ñ‚Ñ–Ð»Ñ– (ҮндіÑтан)", + "os": "оÑетин тілі", + "os_GE": "оÑетин тілі (ГрузиÑ)", + "os_RU": "оÑетин тілі (РеÑей)", + "pa": "пенджаб тілі", + "pa_Arab": "пенджаб тілі (араб жазуы)", + "pa_Arab_PK": "пенджаб тілі (араб жазуы, ПәкіÑтан)", + "pa_Guru": "пенджаб тілі (гурмукхи жазуы)", + "pa_Guru_IN": "пенджаб тілі (гурмукхи жазуы, ҮндіÑтан)", + "pa_IN": "пенджаб тілі (ҮндіÑтан)", + "pa_PK": "пенджаб тілі (ПәкіÑтан)", + "pl": "полÑк тілі", + "pl_PL": "полÑк тілі (Польша)", + "ps": "пушту тілі", + "ps_AF": "пушту тілі (ÐуғанÑтан)", + "pt": "португал тілі", + "pt_AO": "португал тілі (Ðнгола)", + "pt_BR": "португал тілі (БразилиÑ)", + "pt_CH": "португал тілі (ШвейцариÑ)", + "pt_CV": "португал тілі (Кабо-Верде)", + "pt_GQ": "португал тілі (Экваторлық ГвинеÑ)", + "pt_GW": "португал тілі (ГвинеÑ-БиÑау)", + "pt_LU": "португал тілі (ЛюкÑембург)", + "pt_MO": "португал тілі (Қытай Халық РеÑпубликаÑының Макао арнайы әкімшілік ауданы)", + "pt_MZ": "португал тілі (Мозамбик)", + "pt_PT": "португал тілі (ПортугалиÑ)", + "pt_ST": "португал тілі (Сан-Томе және ПринÑипи)", + "pt_TL": "португал тілі (Тимор-ЛеÑте)", + "qu": "кечуа тілі", + "qu_BO": "кечуа тілі (БоливиÑ)", + "qu_EC": "кечуа тілі (Эквадор)", + "qu_PE": "кечуа тілі (Перу)", + "rm": "романш тілі", + "rm_CH": "романш тілі (ШвейцариÑ)", + "rn": "рунди тілі", + "rn_BI": "рунди тілі (Бурунди)", + "ro": "румын тілі", + "ro_MD": "румын тілі (Молдова)", + "ro_RO": "румын тілі (РумыниÑ)", + "ru": "Ð¾Ñ€Ñ‹Ñ Ñ‚Ñ–Ð»Ñ–", + "ru_BY": "Ð¾Ñ€Ñ‹Ñ Ñ‚Ñ–Ð»Ñ– (БеларуÑÑŒ)", + "ru_KG": "Ð¾Ñ€Ñ‹Ñ Ñ‚Ñ–Ð»Ñ– (ҚырғызÑтан)", + "ru_KZ": "Ð¾Ñ€Ñ‹Ñ Ñ‚Ñ–Ð»Ñ– (ҚазақÑтан)", + "ru_MD": "Ð¾Ñ€Ñ‹Ñ Ñ‚Ñ–Ð»Ñ– (Молдова)", + "ru_RU": "Ð¾Ñ€Ñ‹Ñ Ñ‚Ñ–Ð»Ñ– (РеÑей)", + "ru_UA": "Ð¾Ñ€Ñ‹Ñ Ñ‚Ñ–Ð»Ñ– (Украина)", + "rw": "киньÑруанда тілі", + "rw_RW": "киньÑруанда тілі (Руанда)", + "se": "ÑолтүÑтік Ñаам тілі", + "se_FI": "ÑолтүÑтік Ñаам тілі (ФинлÑндиÑ)", + "se_NO": "ÑолтүÑтік Ñаам тілі (ÐорвегиÑ)", + "se_SE": "ÑолтүÑтік Ñаам тілі (ШвециÑ)", + "sg": "Ñанго тілі", + "sg_CF": "Ñанго тілі (Орталық Ðфрика РеÑпубликаÑÑ‹)", + "sh": "Ñерб-хорват тілі", + "sh_BA": "Ñерб-хорват тілі (БоÑÐ½Ð¸Ñ Ð¶Ó™Ð½Ðµ Герцеговина)", + "si": "Ñингал тілі", + "si_LK": "Ñингал тілі (Шри-Ланка)", + "sk": "Ñловак тілі", + "sk_SK": "Ñловак тілі (СловакиÑ)", + "sl": "Ñловен тілі", + "sl_SI": "Ñловен тілі (СловениÑ)", + "sn": "шона тілі", + "sn_ZW": "шона тілі (Зимбабве)", + "so": "Ñомали тілі", + "so_DJ": "Ñомали тілі (Джибути)", + "so_ET": "Ñомали тілі (ЭфиопиÑ)", + "so_KE": "Ñомали тілі (КениÑ)", + "so_SO": "Ñомали тілі (Сомали)", + "sq": "албан тілі", + "sq_AL": "албан тілі (ÐлбаниÑ)", + "sq_MK": "албан тілі (МакедониÑ)", + "sq_XK": "албан тілі (КоÑово)", + "sr": "Ñерб тілі", + "sr_BA": "Ñерб тілі (БоÑÐ½Ð¸Ñ Ð¶Ó™Ð½Ðµ Герцеговина)", + "sr_Cyrl": "Ñерб тілі (кирилл жазуы)", + "sr_Cyrl_BA": "Ñерб тілі (кирилл жазуы, БоÑÐ½Ð¸Ñ Ð¶Ó™Ð½Ðµ Герцеговина)", + "sr_Cyrl_ME": "Ñерб тілі (кирилл жазуы, ЧерногориÑ)", + "sr_Cyrl_RS": "Ñерб тілі (кирилл жазуы, СербиÑ)", + "sr_Cyrl_XK": "Ñерб тілі (кирилл жазуы, КоÑово)", + "sr_Latn": "Ñерб тілі (латын жазуы)", + "sr_Latn_BA": "Ñерб тілі (латын жазуы, БоÑÐ½Ð¸Ñ Ð¶Ó™Ð½Ðµ Герцеговина)", + "sr_Latn_ME": "Ñерб тілі (латын жазуы, ЧерногориÑ)", + "sr_Latn_RS": "Ñерб тілі (латын жазуы, СербиÑ)", + "sr_Latn_XK": "Ñерб тілі (латын жазуы, КоÑово)", + "sr_ME": "Ñерб тілі (ЧерногориÑ)", + "sr_RS": "Ñерб тілі (СербиÑ)", + "sr_XK": "Ñерб тілі (КоÑово)", + "sv": "швед тілі", + "sv_AX": "швед тілі (Ðланд аралдары)", + "sv_FI": "швед тілі (ФинлÑндиÑ)", + "sv_SE": "швед тілі (ШвециÑ)", + "sw": "Ñуахили тілі", + "sw_CD": "Ñуахили тілі (Конго)", + "sw_KE": "Ñуахили тілі (КениÑ)", + "sw_TZ": "Ñуахили тілі (ТанзаниÑ)", + "sw_UG": "Ñуахили тілі (Уганда)", + "ta": "тамил тілі", + "ta_IN": "тамил тілі (ҮндіÑтан)", + "ta_LK": "тамил тілі (Шри-Ланка)", + "ta_MY": "тамил тілі (МалайзиÑ)", + "ta_SG": "тамил тілі (Сингапур)", + "te": "телугу тілі", + "te_IN": "телугу тілі (ҮндіÑтан)", + "th": "тай тілі", + "th_TH": "тай тілі (Тайланд)", + "ti": "Ñ‚Ð¸Ð³Ñ€Ð¸Ð½ÑŒÑ Ñ‚Ñ–Ð»Ñ–", + "ti_ER": "Ñ‚Ð¸Ð³Ñ€Ð¸Ð½ÑŒÑ Ñ‚Ñ–Ð»Ñ– (ЭритреÑ)", + "ti_ET": "Ñ‚Ð¸Ð³Ñ€Ð¸Ð½ÑŒÑ Ñ‚Ñ–Ð»Ñ– (ЭфиопиÑ)", + "to": "тонган тілі", + "to_TO": "тонган тілі (Тонга)", + "tr": "түрік тілі", + "tr_CY": "түрік тілі (Кипр)", + "tr_TR": "түрік тілі (ТүркиÑ)", + "ug": "ұйғыр тілі", + "ug_CN": "ұйғыр тілі (Қытай)", + "uk": "украин тілі", + "uk_UA": "украин тілі (Украина)", + "ur": "урду тілі", + "ur_IN": "урду тілі (ҮндіÑтан)", + "ur_PK": "урду тілі (ПәкіÑтан)", + "uz": "өзбек тілі", + "uz_AF": "өзбек тілі (ÐуғанÑтан)", + "uz_Arab": "өзбек тілі (араб жазуы)", + "uz_Arab_AF": "өзбек тілі (араб жазуы, ÐуғанÑтан)", + "uz_Cyrl": "өзбек тілі (кирилл жазуы)", + "uz_Cyrl_UZ": "өзбек тілі (кирилл жазуы, ӨзбекÑтан)", + "uz_Latn": "өзбек тілі (латын жазуы)", + "uz_Latn_UZ": "өзбек тілі (латын жазуы, ӨзбекÑтан)", + "uz_UZ": "өзбек тілі (ӨзбекÑтан)", + "vi": "вьетнам тілі", + "vi_VN": "вьетнам тілі (Вьетнам)", + "yi": "идиш тілі", + "yo": "йоруба тілі", + "yo_BJ": "йоруба тілі (Бенин)", + "yo_NG": "йоруба тілі (ÐигериÑ)", + "zh": "қытай тілі", + "zh_CN": "қытай тілі (Қытай)", + "zh_HK": "қытай тілі (Қытай Халық РеÑпубликаÑының Гонконг арнайы әкімшілік ауданы)", + "zh_Hans": "қытай тілі (жеңілдетілген қытай иероглифы)", + "zh_Hans_CN": "қытай тілі (жеңілдетілген қытай иероглифы, Қытай)", + "zh_Hans_HK": "қытай тілі (жеңілдетілген қытай иероглифы, Қытай Халық РеÑпубликаÑының Гонконг арнайы әкімшілік ауданы)", + "zh_Hans_MO": "қытай тілі (жеңілдетілген қытай иероглифы, Қытай Халық РеÑпубликаÑының Макао арнайы әкімшілік ауданы)", + "zh_Hans_SG": "қытай тілі (жеңілдетілген қытай иероглифы, Сингапур)", + "zh_Hant": "қытай тілі (дәÑтүрлі қытай иероглифы)", + "zh_Hant_HK": "қытай тілі (дәÑтүрлі қытай иероглифы, Қытай Халық РеÑпубликаÑының Гонконг арнайы әкімшілік ауданы)", + "zh_Hant_MO": "қытай тілі (дәÑтүрлі қытай иероглифы, Қытай Халық РеÑпубликаÑының Макао арнайы әкімшілік ауданы)", + "zh_Hant_TW": "қытай тілі (дәÑтүрлі қытай иероглифы, Тайвань)", + "zh_MO": "қытай тілі (Қытай Халық РеÑпубликаÑының Макао арнайы әкімшілік ауданы)", + "zh_SG": "қытай тілі (Сингапур)", + "zh_TW": "қытай тілі (Тайвань)", + "zu": "зулу тілі", + "zu_ZA": "зулу тілі (ОңтүÑтік Ðфрика РеÑпубликаÑÑ‹)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/kl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/kl.json new file mode 100644 index 0000000000000000000000000000000000000000..65a271dfdd83b4a956c7eaa87d6fc3aa6e70f5ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/kl.json @@ -0,0 +1,6 @@ +{ + "Names": { + "kl": "kalaallisut", + "kl_GL": "kalaallisut (Kalaallit Nunaat)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/km.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/km.json new file mode 100644 index 0000000000000000000000000000000000000000..31a1572898762a2f47b6601e6d9c664b2e8b7f22 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/km.json @@ -0,0 +1,566 @@ +{ + "Names": { + "af": "អាហ្វ្រិកាន", + "af_NA": "អាហ្វ្រិកាន (ណាមីប៊ី)", + "af_ZA": "អាហ្វ្រិកាន (អាហ្វ្រិកážáž¶áž„ážáŸ’បូង)", + "ak": "អាកាន", + "ak_GH": "អាកាន (ហ្គាណា)", + "am": "អំហារិក", + "am_ET": "អំហារិក (អáŸážáŸ’យូពី)", + "ar": "អារ៉ាប់", + "ar_AE": "អារ៉ាប់ (អារ៉ាប់រួម)", + "ar_BH": "អារ៉ាប់ (បារ៉ែន)", + "ar_DJ": "អារ៉ាប់ (ជីប៊ូទី)", + "ar_DZ": "អារ៉ាប់ (អាល់ហ្សáŸážšáž¸)", + "ar_EG": "អារ៉ាប់ (អáŸáž áŸ’ស៊ីប)", + "ar_EH": "អារ៉ាប់ (សាហារ៉ាážáž¶áž„លិច)", + "ar_ER": "អារ៉ាប់ (អáŸážšáž¸áž‘្រា)", + "ar_IL": "អារ៉ាប់ (អ៊ីស្រាអែល)", + "ar_IQ": "អារ៉ាប់ (អ៊ីរ៉ាក់)", + "ar_JO": "អារ៉ាប់ (ហ៊្សកដានី)", + "ar_KM": "អារ៉ាប់ (កូមáŸážš)", + "ar_KW": "អារ៉ាប់ (គុយវ៉ែáž)", + "ar_LB": "អារ៉ាប់ (លីបង់)", + "ar_LY": "អារ៉ាប់ (លីប៊ី)", + "ar_MA": "អារ៉ាប់ (ម៉ារ៉ុក)", + "ar_MR": "អារ៉ាប់ (ម៉ូរីážáž¶áž“ី)", + "ar_OM": "អារ៉ាប់ (អូម៉ង់)", + "ar_PS": "អារ៉ាប់ (ដែន​ប៉ាលáŸážŸáŸ’ទីន)", + "ar_QA": "អារ៉ាប់ (កាážáž¶)", + "ar_SA": "អារ៉ាប់ (អារ៉ាប៊ីសាអូឌីáž)", + "ar_SD": "អារ៉ាប់ (ស៊ូដង់)", + "ar_SO": "អារ៉ាប់ (សូម៉ាលី)", + "ar_SS": "អារ៉ាប់ (ស៊ូដង់​ážáž¶áž„​ážáŸ’បូង)", + "ar_SY": "អារ៉ាប់ (ស៊ីរី)", + "ar_TD": "អារ៉ាប់ (ឆាដ)", + "ar_TN": "អារ៉ាប់ (ទុយនáŸážŸáŸŠáž¸)", + "ar_YE": "អារ៉ាប់ (áž™áŸáž˜áŸ‚áž“)", + "as": "អាសាមីស", + "as_IN": "អាសាមីស (ឥណ្ឌា)", + "az": "អាស៊ែបៃហ្សង់", + "az_AZ": "អាស៊ែបៃហ្សង់ (អាស៊ែបៃហ្សង់)", + "az_Cyrl": "អាស៊ែបៃហ្សង់ (ស៊ីរីលីក)", + "az_Cyrl_AZ": "អាស៊ែបៃហ្សង់ (ស៊ីរីលីក, អាស៊ែបៃហ្សង់)", + "az_Latn": "អាស៊ែបៃហ្សង់ (ឡាážáž¶áŸ†áž„)", + "az_Latn_AZ": "អាស៊ែបៃហ្សង់ (ឡាážáž¶áŸ†áž„, អាស៊ែបៃហ្សង់)", + "be": "áž”áŸáž¡áž¶ážšáž»ážŸáŸ’ស", + "be_BY": "áž”áŸáž¡áž¶ážšáž»ážŸáŸ’ស (áž”áŸáž¡áž¶ážšáž»ážŸáŸ’ស)", + "bg": "ប៊ុលហ្គារី", + "bg_BG": "ប៊ុលហ្គារី (ប៊ុលហ្គារី)", + "bm": "បាម្បារា", + "bm_ML": "បាម្បារា (ម៉ាលី)", + "bn": "បង់ក្លាដែស", + "bn_BD": "បង់ក្លាដែស (បង់ក្លាដែស)", + "bn_IN": "បង់ក្លាដែស (ឥណ្ឌា)", + "bo": "ទីបáŸ", + "bo_CN": "ទីប០(áž…áž·áž“)", + "bo_IN": "ទីប០(ឥណ្ឌា)", + "br": "ប្រីស្ážáž»áž“", + "br_FR": "ប្រីស្ážáž»áž“ (បារាំង)", + "bs": "បូស្នី", + "bs_BA": "បូស្នី (បូស្នី និងហឺហ្សីហ្គូវីណា)", + "bs_Cyrl": "បូស្នី (ស៊ីរីលីក)", + "bs_Cyrl_BA": "បូស្នី (ស៊ីរីលីក, បូស្នី និងហឺហ្សីហ្គូវីណា)", + "bs_Latn": "បូស្នី (ឡាážáž¶áŸ†áž„)", + "bs_Latn_BA": "បូស្នី (ឡាážáž¶áŸ†áž„, បូស្នី និងហឺហ្សីហ្គូវីណា)", + "ca": "កាážáž¶áž¡áž¶áž“", + "ca_AD": "កាážáž¶áž¡áž¶áž“ (អង់ដូរ៉ា)", + "ca_ES": "កាážáž¶áž¡áž¶áž“ (អáŸážŸáŸ’ប៉ាញ)", + "ca_FR": "កាážáž¶áž¡áž¶áž“ (បារាំង)", + "ca_IT": "កាážáž¶áž¡áž¶áž“ (អ៊ីážáž¶áž›áž¸)", + "ce": "ឈីឆáŸáž“", + "ce_RU": "ឈីឆáŸáž“ (រុស្ស៊ី)", + "cs": "ឆáŸáž€", + "cs_CZ": "ឆáŸáž€ (សាធារណរដ្ឋឆáŸáž€)", + "cy": "ážœáŸáž›", + "cy_GB": "ážœáŸáž› (ចក្រភព​អង់គ្លáŸážŸ)", + "da": "ដាណឺម៉ាក", + "da_DK": "ដាណឺម៉ាក (ដាណឺម៉ាក)", + "da_GL": "ដាណឺម៉ាក (ហ្គ្រោអង់ឡង់)", + "de": "អាល្លឺម៉ង់", + "de_AT": "អាល្លឺម៉ង់ (អូទ្រីស)", + "de_BE": "អាល្លឺម៉ង់ (បែលហ្ស៊ិក)", + "de_CH": "អាល្លឺម៉ង់ (ស្វីស)", + "de_DE": "អាល្លឺម៉ង់ (អាល្លឺម៉ង់)", + "de_IT": "អាល្លឺម៉ង់ (អ៊ីážáž¶áž›áž¸)", + "de_LI": "អាល្លឺម៉ង់ (លិចទáŸáž“ស្ážáŸ‚áž“)", + "de_LU": "អាល្លឺម៉ង់ (លុចហ្សំបួរ)", + "dz": "ដុងážáž¶", + "dz_BT": "ដុងážáž¶ (ប៊ូážáž¶áž“)", + "ee": "អ៊ីវ", + "ee_GH": "អ៊ីវ (ហ្គាណា)", + "ee_TG": "អ៊ីវ (ážáž¼áž áŸ’គោ)", + "el": "ក្រិក", + "el_CY": "ក្រិក (ស៊ីប)", + "el_GR": "ក្រិក (ក្រិក)", + "en": "អង់គ្លáŸážŸ", + "en_AG": "អង់គ្លáŸážŸ (អង់ទីហ្គា និង បាប៊ុយដា)", + "en_AI": "អង់គ្លáŸážŸ (អង់ហ្គីឡា)", + "en_AS": "អង់គ្លáŸážŸ (សាមáŸážš អាមáŸážšáž·áž€áž¶áŸ†áž„)", + "en_AT": "អង់គ្លáŸážŸ (អូទ្រីស)", + "en_AU": "អង់គ្លáŸážŸ (អូស្ážáŸ’រាលី)", + "en_BB": "អង់គ្លáŸážŸ (បាបាដុស)", + "en_BE": "អង់គ្លáŸážŸ (បែលហ្ស៊ិក)", + "en_BI": "អង់គ្លáŸážŸ (ប៊ូរុនឌី)", + "en_BM": "អង់គ្លáŸážŸ (ប៊ឺមុយដា)", + "en_BS": "អង់គ្លáŸážŸ (បាហាម៉ា)", + "en_BW": "អង់គ្លáŸážŸ (បុážážŸáŸ’វាណា)", + "en_BZ": "អង់គ្លáŸážŸ (áž”áŸáž›áž¸áž áŸ’ស)", + "en_CA": "អង់គ្លáŸážŸ (កាណាដា)", + "en_CC": "អង់គ្លáŸážŸ (កោះ​កូកូស (គីលីង))", + "en_CH": "អង់គ្លáŸážŸ (ស្វីស)", + "en_CK": "អង់គ្លáŸážŸ (កោះ​ážáž¼áž€)", + "en_CM": "អង់គ្លáŸážŸ (កាមáŸážšáž¼áž“)", + "en_CX": "អង់គ្លáŸážŸ (កោះ​គ្រីស្មាស)", + "en_CY": "អង់គ្លáŸážŸ (ស៊ីប)", + "en_DE": "អង់គ្លáŸážŸ (អាល្លឺម៉ង់)", + "en_DG": "អង់គ្លáŸážŸ (ឌៀហ្គោហ្គាស៊ី)", + "en_DK": "អង់គ្លáŸážŸ (ដាណឺម៉ាក)", + "en_DM": "អង់គ្លáŸážŸ (ដូមីនីក)", + "en_ER": "អង់គ្លáŸážŸ (អáŸážšáž¸áž‘្រា)", + "en_FI": "អង់គ្លáŸážŸ (ហ្វាំងឡង់)", + "en_FJ": "អង់គ្លáŸážŸ (ហ្វីជី)", + "en_FK": "អង់គ្លáŸážŸ (កោះ​ហ្វក់ឡែន)", + "en_FM": "អង់គ្លáŸážŸ (មីក្រូណáŸážŸáŸŠáž¸)", + "en_GB": "អង់គ្លáŸážŸ (ចក្រភព​អង់គ្លáŸážŸ)", + "en_GD": "អង់គ្លáŸážŸ (ហ្គ្រីណាដា)", + "en_GG": "អង់គ្លáŸážŸ (ហ្គáŸáž“ស៊ី)", + "en_GH": "អង់គ្លáŸážŸ (ហ្គាណា)", + "en_GI": "អង់គ្លáŸážŸ (ហ្គីប្រាលážáž¶)", + "en_GM": "អង់គ្លáŸážŸ (ហ្គាំប៊ី)", + "en_GU": "អង់គ្លáŸážŸ (ហ្គាំ)", + "en_GY": "អង់គ្លáŸážŸ (ហ្គីយ៉ាណា)", + "en_HK": "អង់គ្លáŸážŸ (ហុងកុង)", + "en_IE": "អង់គ្លáŸážŸ (អៀរឡង់)", + "en_IL": "អង់គ្លáŸážŸ (អ៊ីស្រាអែល)", + "en_IM": "អង់គ្លáŸážŸ (អែលអុហ្វមែន)", + "en_IN": "អង់គ្លáŸážŸ (ឥណ្ឌា)", + "en_IO": "អង់គ្លáŸážŸ (ដែនដី​អង់គ្លáŸážŸâ€‹áž“ៅ​មហា​សមុទ្រ​ឥណ្ឌា)", + "en_JE": "អង់គ្លáŸážŸ (ជឺស៊ី)", + "en_JM": "អង់គ្លáŸážŸ (ចាម៉ៃកា)", + "en_KE": "អង់គ្លáŸážŸ (កáŸáž“យ៉ា)", + "en_KI": "អង់គ្លáŸážŸ (គិរិបាទី)", + "en_KN": "អង់គ្លáŸážŸ (សង់ឃីហនិង​ណáŸážœáž¸ážŸ)", + "en_KY": "អង់គ្លáŸážŸ (កោះ​កៃម៉ង់)", + "en_LC": "អង់គ្លáŸážŸ (សង់​លូសៀ)", + "en_LR": "អង់គ្លáŸážŸ (លីបáŸážšáž¸áž™áŸ‰áž¶)", + "en_LS": "អង់គ្លáŸážŸ (áž¡áŸážŸáž¼ážáž¼)", + "en_MG": "អង់គ្លáŸážŸ (ម៉ាដាហ្គាស្កា)", + "en_MH": "អង់គ្លáŸážŸ (កោះ​ម៉ាស់សល)", + "en_MO": "អង់គ្លáŸážŸ (ម៉ាកាវ)", + "en_MP": "អង់គ្លáŸážŸ (កោះ​ម៉ារីណា​ážáž¶áž„​ជើង)", + "en_MS": "អង់គ្លáŸážŸ (ម៉ុង​សáŸážšáŸ‰áž„់)", + "en_MT": "អង់គ្លáŸážŸ (ម៉ាល់ážáž¶)", + "en_MU": "អង់គ្លáŸážŸ (ម៉ូរីស)", + "en_MW": "អង់គ្លáŸážŸ (ម៉ាឡាវី)", + "en_MY": "អង់គ្លáŸážŸ (ម៉ាឡáŸážŸáŸŠáž¸)", + "en_NA": "អង់គ្លáŸážŸ (ណាមីប៊ី)", + "en_NF": "អង់គ្លáŸážŸ (កោះ​ណáŸážšáž áŸ’វក់)", + "en_NG": "អង់គ្លáŸážŸ (នីហ្សáŸážšáž¸áž™áŸ‰áž¶)", + "en_NL": "អង់គ្លáŸážŸ (ហូឡង់)", + "en_NR": "អង់គ្លáŸážŸ (ណូរូ)", + "en_NU": "អង់គ្លáŸážŸ (ណៀ)", + "en_NZ": "អង់គ្លáŸážŸ (នូវែលហ្សáŸáž¡áž„់)", + "en_PG": "អង់គ្លáŸážŸ (ប៉ាពួញ៉ូហ្គីណáŸ)", + "en_PH": "អង់គ្លáŸážŸ (ហ្វីលីពីន)", + "en_PK": "អង់គ្លáŸážŸ (ប៉ាគីស្ážáž¶áž“)", + "en_PN": "អង់គ្លáŸážŸ (កោះ​ភីážáž€áž¶áž“)", + "en_PR": "អង់គ្លáŸážŸ (áž–áŸážšážáž¼ážšáž¸áž€áž¼)", + "en_PW": "អង់គ្លáŸážŸ (ផៅឡូ)", + "en_RW": "អង់គ្លáŸážŸ (រវ៉ាន់ដា)", + "en_SB": "អង់គ្លáŸážŸ (កោះ​សូឡូម៉ុង)", + "en_SC": "អង់គ្លáŸážŸ (សីសែល)", + "en_SD": "អង់គ្លáŸážŸ (ស៊ូដង់)", + "en_SE": "អង់គ្លáŸážŸ (ស៊ុយអែáž)", + "en_SG": "អង់គ្លáŸážŸ (សិង្ហបុរី)", + "en_SH": "អង់គ្លáŸážŸ (សង់​ហáŸáž¡áŸážŽáž¶)", + "en_SI": "អង់គ្លáŸážŸ (ស្លូវáŸáž“ី)", + "en_SL": "អង់គ្លáŸážŸ (សáŸážšáŸ‰áž¶áž¡áŸáž¢áž¼áž“)", + "en_SS": "អង់គ្លáŸážŸ (ស៊ូដង់​ážáž¶áž„​ážáŸ’បូង)", + "en_SX": "អង់គ្លáŸážŸ (សីង​ម៉ាធីន)", + "en_SZ": "អង់គ្លáŸážŸ (ស្វាហ្ស៊ីឡង់)", + "en_TC": "អង់គ្លáŸážŸ (កោះ​ទួគ និង កៃកូស)", + "en_TK": "អង់គ្លáŸážŸ (ážáž¼ážáŸáž¡áŸ…)", + "en_TO": "អង់គ្លáŸážŸ (ážáž»áž„ហ្គា)", + "en_TT": "អង់គ្លáŸážŸ (ទ្រីនីដាហនិង​ážáž¼áž”ាហ្គោ)", + "en_TV": "អង់គ្លáŸážŸ (ទូវ៉ាលូ)", + "en_TZ": "អង់គ្លáŸážŸ (ážáž„់ហ្សានី)", + "en_UG": "អង់គ្លáŸážŸ (អ៊ូហ្គង់ដា)", + "en_UM": "អង់គ្លáŸážŸ (កោះ​អៅឡាយីង​អាមáŸážšáž·áž€)", + "en_US": "អង់គ្លáŸážŸ (សហរដ្ឋអាមáŸážšáž·áž€)", + "en_VC": "អង់គ្លáŸážŸ (សាំង​វីនសáŸáž“ និង​ឌឹ​ហ្គ្រីណាឌីនីស)", + "en_VG": "អង់គ្លáŸážŸ (កោះ​វឺជិន​ចក្រភព​អង់គ្លáŸážŸ)", + "en_VI": "អង់គ្លáŸážŸ (កោះ​វឺជីន​អាមáŸážšáž·áž€)", + "en_VU": "អង់គ្លáŸážŸ (វ៉ានូអាទូ)", + "en_WS": "អង់គ្លáŸážŸ (សាមáŸážš)", + "en_ZA": "អង់គ្លáŸážŸ (អាហ្វ្រិកážáž¶áž„ážáŸ’បូង)", + "en_ZM": "អង់គ្លáŸážŸ (ហ្សាំប៊ី)", + "en_ZW": "អង់គ្លáŸážŸ (ហ្ស៊ីមបាវ៉áŸ)", + "eo": "អáŸážŸáŸ’áž–áŸážšáŸ‰áž¶áž“់ážáž¼", + "es": "អáŸážŸáŸ’ប៉ាញ", + "es_AR": "អáŸážŸáŸ’ប៉ាញ (អាហ្សង់ទីន)", + "es_BO": "អáŸážŸáŸ’ប៉ាញ (បូលីវី)", + "es_BR": "អáŸážŸáŸ’ប៉ាញ (ប្រáŸážŸáŸŠáž¸áž›)", + "es_CL": "អáŸážŸáŸ’ប៉ាញ (ស៊ីលី)", + "es_CO": "អáŸážŸáŸ’ប៉ាញ (កូឡុំប៊ី)", + "es_CR": "អáŸážŸáŸ’ប៉ាញ (កូស្ážáž¶ážšáž¸áž€áž¶)", + "es_CU": "អáŸážŸáŸ’ប៉ាញ (គុយបា)", + "es_DO": "អáŸážŸáŸ’ប៉ាញ (សាធារណរដ្ឋ​ដូមីនីក)", + "es_EA": "អáŸážŸáŸ’ប៉ាញ (ជឺážáž¶ និង​ម៉áŸáž›áž¸áž¡áž¶)", + "es_EC": "អáŸážŸáŸ’ប៉ាញ (អáŸáž€áŸ’វាឌáŸážš)", + "es_ES": "អáŸážŸáŸ’ប៉ាញ (អáŸážŸáŸ’ប៉ាញ)", + "es_GQ": "អáŸážŸáŸ’ប៉ាញ (ហ្គីណáŸáž¢áŸáž€áŸ’វាទáŸážš)", + "es_GT": "អáŸážŸáŸ’ប៉ាញ (ហ្គាážáŸáž˜áŸ‰áž¶áž¡áž¶)", + "es_HN": "អáŸážŸáŸ’ប៉ាញ (ហុងឌូរ៉ាស)", + "es_IC": "អáŸážŸáŸ’ប៉ាញ (កោះ​កាណារី)", + "es_MX": "អáŸážŸáŸ’ប៉ាញ (ម៉ិកស៊ិក)", + "es_NI": "អáŸážŸáŸ’ប៉ាញ (នីការ៉ាហ្គáŸážš)", + "es_PA": "អáŸážŸáŸ’ប៉ាញ (ប៉ាណាម៉ា)", + "es_PE": "អáŸážŸáŸ’ប៉ាញ (ប៉áŸážšáž¼)", + "es_PH": "អáŸážŸáŸ’ប៉ាញ (ហ្វីលីពីន)", + "es_PR": "អáŸážŸáŸ’ប៉ាញ (áž–áŸážšážáž¼ážšáž¸áž€áž¼)", + "es_PY": "អáŸážŸáŸ’ប៉ាញ (ប៉ារ៉ាហ្គាយ)", + "es_SV": "អáŸážŸáŸ’ប៉ាញ (អែលសាល់វ៉ាឌáŸážš)", + "es_US": "អáŸážŸáŸ’ប៉ាញ (សហរដ្ឋអាមáŸážšáž·áž€)", + "es_UY": "អáŸážŸáŸ’ប៉ាញ (អ៊ុយរ៉ាហ្គាយ)", + "es_VE": "អáŸážŸáŸ’ប៉ាញ (ážœáŸáž“áŸáž áŸ’ស៊ុយឡា)", + "et": "អáŸážŸáŸ’ážáž¼áž“ី", + "et_EE": "អáŸážŸáŸ’ážáž¼áž“ី (អáŸážŸáŸ’ážáž¼áž“ី)", + "eu": "បាសážáŸ", + "eu_ES": "បាសážáŸ (អáŸážŸáŸ’ប៉ាញ)", + "fa": "ភឺសៀន", + "fa_AF": "ភឺសៀន (អាហ្វហ្គានីស្ážáž¶áž“)", + "fa_IR": "ភឺសៀន (អ៊ីរ៉ង់)", + "ff": "ហ្វ៊ូឡា", + "ff_CM": "ហ្វ៊ូឡា (កាមáŸážšáž¼áž“)", + "ff_GN": "ហ្វ៊ូឡា (ហ្គីណáŸ)", + "ff_MR": "ហ្វ៊ូឡា (ម៉ូរីážáž¶áž“ី)", + "ff_SN": "ហ្វ៊ូឡា (សáŸážŽáŸáž áŸ’គាល់)", + "fi": "ហ្វាំងឡង់", + "fi_FI": "ហ្វាំងឡង់ (ហ្វាំងឡង់)", + "fo": "ហ្វារូស", + "fo_DK": "ហ្វារូស (ដាណឺម៉ាក)", + "fo_FO": "ហ្វារូស (កោះ​ហ្វារ៉ូ)", + "fr": "បារាំង", + "fr_BE": "បារាំង (បែលហ្ស៊ិក)", + "fr_BF": "បារាំង (បួគីណាហ្វាសូ)", + "fr_BI": "បារាំង (ប៊ូរុនឌី)", + "fr_BJ": "បារាំង (áž”áŸážŽáž¶áŸ†áž„)", + "fr_BL": "បារាំង (សង់ បាážáŸáž¡áŸáž˜áŸ‰áž¸)", + "fr_CA": "បារាំង (កាណាដា)", + "fr_CD": "បារាំង (កុងហ្គោ- គីនស្ហាសា)", + "fr_CF": "បារាំង (សាធារណរដ្ឋអាហ្វ្រិកកណ្ដាល)", + "fr_CG": "បារាំង (កុងហ្គោ - ប្រាហ្សាវីល)", + "fr_CH": "បារាំង (ស្វីស)", + "fr_CI": "បារាំង (កូដឌីវáŸážš)", + "fr_CM": "បារាំង (កាមáŸážšáž¼áž“)", + "fr_DJ": "បារាំង (ជីប៊ូទី)", + "fr_DZ": "បារាំង (អាល់ហ្សáŸážšáž¸)", + "fr_FR": "បារាំង (បារាំង)", + "fr_GA": "បារាំង (ហ្គាបុង)", + "fr_GF": "បារាំង (ហ្គៀណាបារាំង)", + "fr_GN": "បារាំង (ហ្គីណáŸ)", + "fr_GP": "បារាំង (ហ្គោដឺឡុប)", + "fr_GQ": "បារាំង (ហ្គីណáŸáž¢áŸáž€áŸ’វាទáŸážš)", + "fr_HT": "បារាំង (ហៃទី)", + "fr_KM": "បារាំង (កូមáŸážš)", + "fr_LU": "បារាំង (លុចហ្សំបួរ)", + "fr_MA": "បារាំង (ម៉ារ៉ុក)", + "fr_MC": "បារាំង (ម៉ូណាកូ)", + "fr_MF": "បារាំង (សង់​ម៉ាទីន)", + "fr_MG": "បារាំង (ម៉ាដាហ្គាស្កា)", + "fr_ML": "បារាំង (ម៉ាលី)", + "fr_MQ": "បារាំង (ម៉ាទីនីក)", + "fr_MR": "បារាំង (ម៉ូរីážáž¶áž“ី)", + "fr_MU": "បារាំង (ម៉ូរីស)", + "fr_NC": "បារាំង (ញូកាឡáŸážŠáž¼áž“ៀ)", + "fr_NE": "បារាំង (នីហ្សáŸážš)", + "fr_PF": "បារាំង (ប៉ូលី​ណáŸážŸáŸŠáž¸â€‹áž”ារាំង)", + "fr_PM": "បារាំង (សង់ព្យែរ និង​មីគីឡុង)", + "fr_RE": "បារាំង (ážšáŸáž¢áž»áž™áž‰áŸ‰áž»áž„)", + "fr_RW": "បារាំង (រវ៉ាន់ដា)", + "fr_SC": "បារាំង (សីសែល)", + "fr_SN": "បារាំង (សáŸážŽáŸáž áŸ’គាល់)", + "fr_SY": "បារាំង (ស៊ីរី)", + "fr_TD": "បារាំង (ឆាដ)", + "fr_TG": "បារាំង (ážáž¼áž áŸ’គោ)", + "fr_TN": "បារាំង (ទុយនáŸážŸáŸŠáž¸)", + "fr_VU": "បារាំង (វ៉ានូអាទូ)", + "fr_WF": "បារាំង (វ៉ាលីស និង​ហ្វូទូណា)", + "fr_YT": "បារាំង (ម៉ាយុáž)", + "fy": "ហ្វ្រីស៊ានážáž¶áž„លិច", + "fy_NL": "ហ្វ្រីស៊ានážáž¶áž„លិច (ហូឡង់)", + "ga": "អៀរឡង់", + "ga_IE": "អៀរឡង់ (អៀរឡង់)", + "gd": "ស្កុážáž áŸ’កែលិគ", + "gd_GB": "ស្កុážáž áŸ’កែលិគ (ចក្រភព​អង់គ្លáŸážŸ)", + "gl": "ហ្គាលីស្យាន", + "gl_ES": "ហ្គាលីស្យាន (អáŸážŸáŸ’ប៉ាញ)", + "gu": "ហ្កុយ៉ារាទី", + "gu_IN": "ហ្កុយ៉ារាទី (ឥណ្ឌា)", + "gv": "មáŸáž“", + "gv_IM": "មáŸáž“ (អែលអុហ្វមែន)", + "ha": "ហូសា", + "ha_GH": "ហូសា (ហ្គាណា)", + "ha_NE": "ហូសា (នីហ្សáŸážš)", + "ha_NG": "ហូសា (នីហ្សáŸážšáž¸áž™áŸ‰áž¶)", + "he": "អ៊ីស្រាអែល", + "he_IL": "អ៊ីស្រាអែល (អ៊ីស្រាអែល)", + "hi": "ហិណ្ឌី", + "hi_IN": "ហិណ្ឌី (ឥណ្ឌា)", + "hr": "ក្រូអាáž", + "hr_BA": "ក្រូអាហ(បូស្នី និងហឺហ្សីហ្គូវីណា)", + "hr_HR": "ក្រូអាហ(ក្រូអាáž)", + "hu": "ហុងគ្រី", + "hu_HU": "ហុងគ្រី (ហុងគ្រី)", + "hy": "អាមáŸáž“ី", + "hy_AM": "អាមáŸáž“ី (អាមáŸáž“ី)", + "id": "ឥណ្ឌូណáŸážŸáŸŠáž¸", + "id_ID": "ឥណ្ឌូណáŸážŸáŸŠáž¸ (ឥណ្ឌូណáŸážŸáŸŠáž¸)", + "ig": "អ៊ីកបូ", + "ig_NG": "អ៊ីកបូ (នីហ្សáŸážšáž¸áž™áŸ‰áž¶)", + "ii": "ស៊ីឈាន់យី", + "ii_CN": "ស៊ីឈាន់យី (áž…áž·áž“)", + "is": "អ៊ីស្លង់", + "is_IS": "អ៊ីស្លង់ (អ៊ីស្លង់)", + "it": "អ៊ីážáž¶áž›áž¸", + "it_CH": "អ៊ីážáž¶áž›áž¸ (ស្វីស)", + "it_IT": "អ៊ីážáž¶áž›áž¸ (អ៊ីážáž¶áž›áž¸)", + "it_SM": "អ៊ីážáž¶áž›áž¸ (សាន​ម៉ារីណូ)", + "ja": "ជប៉ុន", + "ja_JP": "ជប៉ុន (ជប៉ុន)", + "ka": "ហ្សក​ហ្ស៊ី", + "ka_GE": "ហ្សក​ហ្ស៊ី (ហ្សកហ្ស៊ី)", + "ki": "គីគូយូ", + "ki_KE": "គីគូយូ (កáŸáž“យ៉ា)", + "kk": "កាហ្សាក់", + "kk_KZ": "កាហ្សាក់ (កាហ្សាក់ស្ážáž¶áž“)", + "kl": "កាឡាលលីស៊ុáž", + "kl_GL": "កាឡាលលីស៊ុហ(ហ្គ្រោអង់ឡង់)", + "km": "ážáŸ’មែរ", + "km_KH": "ážáŸ’មែរ (កម្ពុជា)", + "kn": "ážáž¶ážŽáž¶ážŠáž¶", + "kn_IN": "ážáž¶ážŽáž¶ážŠáž¶ (ឥណ្ឌា)", + "ko": "កូរ៉áŸ", + "ko_KP": "កូរ៉០(កូរ៉áŸâ€‹ážáž¶áž„​ជើង)", + "ko_KR": "កូរ៉០(កូរ៉áŸâ€‹ážáž¶áž„​ážáŸ’បូង)", + "ks": "កាស្មៀរ", + "ks_IN": "កាស្មៀរ (ឥណ្ឌា)", + "kw": "កូនីស", + "kw_GB": "កូនីស (ចក្រភព​អង់គ្លáŸážŸ)", + "ky": "​កៀហ្ស៊ីស", + "ky_KG": "​កៀហ្ស៊ីស (កៀហ្ស៊ីស៊ីស្ážáž¶áž“)", + "lb": "លុចហ្សំបួរ", + "lb_LU": "លុចហ្សំបួរ (លុចហ្សំបួរ)", + "lg": "ហ្គាន់ដា", + "lg_UG": "ហ្គាន់ដា (អ៊ូហ្គង់ដា)", + "ln": "លីនកាឡា", + "ln_AO": "លីនកាឡា (អង់ហ្គោឡា)", + "ln_CD": "លីនកាឡា (កុងហ្គោ- គីនស្ហាសា)", + "ln_CF": "លីនកាឡា (សាធារណរដ្ឋអាហ្វ្រិកកណ្ដាល)", + "ln_CG": "លីនកាឡា (កុងហ្គោ - ប្រាហ្សាវីល)", + "lo": "ឡាវ", + "lo_LA": "ឡាវ (ឡាវ)", + "lt": "លីទុយអានី", + "lt_LT": "លីទុយអានី (លីទុយអានី)", + "lu": "លូបាកាážáž¶áž“ហ្គា", + "lu_CD": "លូបាកាážáž¶áž“ហ្គា (កុងហ្គោ- គីនស្ហាសា)", + "lv": "ឡាážážœáž¸", + "lv_LV": "ឡាážážœáž¸ (ឡាážážœáž¸áž™áŸ‰áž¶)", + "mg": "ម៉ាឡាហ្គាស៊ី", + "mg_MG": "ម៉ាឡាហ្គាស៊ី (ម៉ាដាហ្គាស្កា)", + "mk": "ម៉ាសáŸážŠáž¼áž“ី", + "mk_MK": "ម៉ាសáŸážŠáž¼áž“ី (ម៉ាសáŸážŠáž¼áž“áž¶)", + "ml": "ម៉ាឡាយ៉ាឡាម", + "ml_IN": "ម៉ាឡាយ៉ាឡាម (ឥណ្ឌា)", + "mn": "ម៉ុងហ្គោលី", + "mn_MN": "ម៉ុងហ្គោលី (ម៉ុងហ្គោលី)", + "mr": "ម៉ារ៉ាធី", + "mr_IN": "ម៉ារ៉ាធី (ឥណ្ឌា)", + "ms": "ម៉ាឡáŸ", + "ms_BN": "ម៉ាឡ០(ប្រ៊ុយណáŸ)", + "ms_MY": "ម៉ាឡ០(ម៉ាឡáŸážŸáŸŠáž¸)", + "ms_SG": "ម៉ាឡ០(សិង្ហបុរី)", + "mt": "ម៉ាល់ážáž¶", + "mt_MT": "ម៉ាល់ážáž¶ (ម៉ាល់ážáž¶)", + "my": "ភូមា", + "my_MM": "ភូមា (មីយ៉ាន់ម៉ា (ភូមា))", + "nb": "áž“áŸážšážœáŸ‚ស បុកម៉ាល់", + "nb_NO": "áž“áŸážšážœáŸ‚ស បុកម៉ាល់ (áž“áŸážšážœáŸ‚ស)", + "nb_SJ": "áž“áŸážšážœáŸ‚ស បុកម៉ាល់ (ស្វាលបាដ និង ហ្សង់ម៉ាយáŸáž“)", + "nd": "áž“áŸáž”áŸáž›áŸážáž¶áž„ជើង", + "nd_ZW": "áž“áŸáž”áŸáž›áŸážáž¶áž„ជើង (ហ្ស៊ីមបាវ៉áŸ)", + "ne": "áž“áŸáž”៉ាល់", + "ne_IN": "áž“áŸáž”៉ាល់ (ឥណ្ឌា)", + "ne_NP": "áž“áŸáž”៉ាល់ (áž“áŸáž”៉ាល់)", + "nl": "ហូឡង់", + "nl_AW": "ហូឡង់ (អារូបា)", + "nl_BE": "ហូឡង់ (បែលហ្ស៊ិក)", + "nl_BQ": "ហូឡង់ (ហុល្លង់ ការ៉ាប៊ីន)", + "nl_CW": "ហូឡង់ (កូរ៉ាកៅ)", + "nl_NL": "ហូឡង់ (ហូឡង់)", + "nl_SR": "ហូឡង់ (សូរីណាម)", + "nl_SX": "ហូឡង់ (សីង​ម៉ាធីន)", + "nn": "áž“áŸážšážœáŸ‚ស នីនូស", + "nn_NO": "áž“áŸážšážœáŸ‚ស នីនូស (áž“áŸážšážœáŸ‚ស)", + "no": "áž“áŸážšážœáŸ‚ស", + "no_NO": "áž“áŸážšážœáŸ‚ស (áž“áŸážšážœáŸ‚ស)", + "om": "អូរ៉ូម៉ូ", + "om_ET": "អូរ៉ូម៉ូ (អáŸážáŸ’យូពី)", + "om_KE": "អូរ៉ូម៉ូ (កáŸáž“យ៉ា)", + "or": "អូឌៀ", + "or_IN": "អូឌៀ (ឥណ្ឌា)", + "os": "អូស៊ីទិក", + "os_GE": "អូស៊ីទិក (ហ្សកហ្ស៊ី)", + "os_RU": "អូស៊ីទិក (រុស្ស៊ី)", + "pa": "បឹនជាពិ", + "pa_Arab": "បឹនជាពិ (អារ៉ាប់)", + "pa_Arab_PK": "បឹនជាពិ (អារ៉ាប់, ប៉ាគីស្ážáž¶áž“)", + "pa_Guru": "បឹនជាពិ (កុមុយឃី)", + "pa_Guru_IN": "បឹនជាពិ (កុមុយឃី, ឥណ្ឌា)", + "pa_IN": "បឹនជាពិ (ឥណ្ឌា)", + "pa_PK": "បឹនជាពិ (ប៉ាគីស្ážáž¶áž“)", + "pl": "ប៉ូឡូញ", + "pl_PL": "ប៉ូឡូញ (ប៉ូឡូញ)", + "ps": "បាស្ážáž¼", + "ps_AF": "បាស្ážáž¼ (អាហ្វហ្គានីស្ážáž¶áž“)", + "pt": "áž–áŸážšáž‘ុយហ្គាល់", + "pt_AO": "áž–áŸážšáž‘ុយហ្គាល់ (អង់ហ្គោឡា)", + "pt_BR": "áž–áŸážšáž‘ុយហ្គាល់ (ប្រáŸážŸáŸŠáž¸áž›)", + "pt_CH": "áž–áŸážšáž‘ុយហ្គាល់ (ស្វីស)", + "pt_CV": "áž–áŸážšáž‘ុយហ្គាល់ (កាបវែរ)", + "pt_GQ": "áž–áŸážšáž‘ុយហ្គាល់ (ហ្គីណáŸáž¢áŸáž€áŸ’វាទáŸážš)", + "pt_GW": "áž–áŸážšáž‘ុយហ្គាល់ (ហ្គីណáŸáž”៊ីសូ)", + "pt_LU": "áž–áŸážšáž‘ុយហ្គាល់ (លុចហ្សំបួរ)", + "pt_MO": "áž–áŸážšáž‘ុយហ្គាល់ (ម៉ាកាវ)", + "pt_MZ": "áž–áŸážšáž‘ុយហ្គាល់ (ម៉ូហ្សាំប៊ិក)", + "pt_PT": "áž–áŸážšáž‘ុយហ្គាល់ (áž–áŸážšáž‘ុយហ្គាល់)", + "pt_ST": "áž–áŸážšáž‘ុយហ្គាល់ (សៅážáž¼áž˜áŸ‰áŸ និង ប្រាំងស៊ីប)", + "pt_TL": "áž–áŸážšáž‘ុយហ្គាល់ (ទីមáŸážš)", + "qu": "ហ្គិកឈួ", + "qu_BO": "ហ្គិកឈួ (បូលីវី)", + "qu_EC": "ហ្គិកឈួ (អáŸáž€áŸ’វាឌáŸážš)", + "qu_PE": "ហ្គិកឈួ (ប៉áŸážšáž¼)", + "rm": "រ៉ូម៉ង់", + "rm_CH": "រ៉ូម៉ង់ (ស្វីស)", + "rn": "រូន្ឌី", + "rn_BI": "រូន្ឌី (ប៊ូរុនឌី)", + "ro": "រូម៉ានី", + "ro_MD": "រូម៉ានី (ម៉ុលដាវី)", + "ro_RO": "រូម៉ានី (រូម៉ានី)", + "ru": "រុស្ស៊ី", + "ru_BY": "រុស្ស៊ី (áž”áŸáž¡áž¶ážšáž»ážŸáŸ’ស)", + "ru_KG": "រុស្ស៊ី (កៀហ្ស៊ីស៊ីស្ážáž¶áž“)", + "ru_KZ": "រុស្ស៊ី (កាហ្សាក់ស្ážáž¶áž“)", + "ru_MD": "រុស្ស៊ី (ម៉ុលដាវី)", + "ru_RU": "រុស្ស៊ី (រុស្ស៊ី)", + "ru_UA": "រុស្ស៊ី (អ៊ុយក្រែន)", + "rw": "គិនយ៉ាវ៉ាន់ដា", + "rw_RW": "គិនយ៉ាវ៉ាន់ដា (រវ៉ាន់ដា)", + "se": "សាមីážáž¶áž„ជើង", + "se_FI": "សាមីážáž¶áž„ជើង (ហ្វាំងឡង់)", + "se_NO": "សាមីážáž¶áž„ជើង (áž“áŸážšážœáŸ‚ស)", + "se_SE": "សាមីážáž¶áž„ជើង (ស៊ុយអែáž)", + "sg": "សានហ្គោ", + "sg_CF": "សានហ្គោ (សាធារណរដ្ឋអាហ្វ្រិកកណ្ដាល)", + "sh": "សឺបូក្រូអាáž", + "sh_BA": "សឺបូក្រូអាហ(បូស្នី និងហឺហ្សីហ្គូវីណា)", + "si": "ស្រីលង្កា", + "si_LK": "ស្រីលង្កា (ស្រីលង្កា)", + "sk": "ស្លូវ៉ាគី", + "sk_SK": "ស្លូវ៉ាគី (ស្លូវ៉ាគី)", + "sl": "ស្លូវ៉ានី", + "sl_SI": "ស្លូវ៉ានី (ស្លូវáŸáž“ី)", + "sn": "សូណា", + "sn_ZW": "សូណា (ហ្ស៊ីមបាវ៉áŸ)", + "so": "សូម៉ាលី", + "so_DJ": "សូម៉ាលី (ជីប៊ូទី)", + "so_ET": "សូម៉ាលី (អáŸážáŸ’យូពី)", + "so_KE": "សូម៉ាលី (កáŸáž“យ៉ា)", + "so_SO": "សូម៉ាលី (សូម៉ាលី)", + "sq": "អាល់បានី", + "sq_AL": "អាល់បានី (អាល់បានី)", + "sq_MK": "អាល់បានី (ម៉ាសáŸážŠáž¼áž“áž¶)", + "sq_XK": "អាល់បានី (កូសូវ៉ូ)", + "sr": "ស៊ែប", + "sr_BA": "ស៊ែប (បូស្នី និងហឺហ្សីហ្គូវីណា)", + "sr_Cyrl": "ស៊ែប (ស៊ីរីលីក)", + "sr_Cyrl_BA": "ស៊ែប (ស៊ីរីលីក, បូស្នី និងហឺហ្សីហ្គូវីណា)", + "sr_Cyrl_ME": "ស៊ែប (ស៊ីរីលីក, ម៉ុងážáŸážŽáŸáž áŸ’គ្រោ)", + "sr_Cyrl_RS": "ស៊ែប (ស៊ីរីលីក, ស៊ែប)", + "sr_Cyrl_XK": "ស៊ែប (ស៊ីរីលីក, កូសូវ៉ូ)", + "sr_Latn": "ស៊ែប (ឡាážáž¶áŸ†áž„)", + "sr_Latn_BA": "ស៊ែប (ឡាážáž¶áŸ†áž„, បូស្នី និងហឺហ្សីហ្គូវីណា)", + "sr_Latn_ME": "ស៊ែប (ឡាážáž¶áŸ†áž„, ម៉ុងážáŸážŽáŸáž áŸ’គ្រោ)", + "sr_Latn_RS": "ស៊ែប (ឡាážáž¶áŸ†áž„, ស៊ែប)", + "sr_Latn_XK": "ស៊ែប (ឡាážáž¶áŸ†áž„, កូសូវ៉ូ)", + "sr_ME": "ស៊ែប (ម៉ុងážáŸážŽáŸáž áŸ’គ្រោ)", + "sr_RS": "ស៊ែប (ស៊ែប)", + "sr_XK": "ស៊ែប (កូសូវ៉ូ)", + "sv": "ស៊ុយអែáž", + "sv_AX": "ស៊ុយអែហ(កោះ​អាឡាំង)", + "sv_FI": "ស៊ុយអែហ(ហ្វាំងឡង់)", + "sv_SE": "ស៊ុយអែហ(ស៊ុយអែáž)", + "sw": "ស្វាហ៊ីលី", + "sw_CD": "ស្វាហ៊ីលី (កុងហ្គោ- គីនស្ហាសា)", + "sw_KE": "ស្វាហ៊ីលី (កáŸáž“យ៉ា)", + "sw_TZ": "ស្វាហ៊ីលី (ážáž„់ហ្សានី)", + "sw_UG": "ស្វាហ៊ីលី (អ៊ូហ្គង់ដា)", + "ta": "ážáž¶áž˜áž¸áž›", + "ta_IN": "ážáž¶áž˜áž¸áž› (ឥណ្ឌា)", + "ta_LK": "ážáž¶áž˜áž¸áž› (ស្រីលង្កា)", + "ta_MY": "ážáž¶áž˜áž¸áž› (ម៉ាឡáŸážŸáŸŠáž¸)", + "ta_SG": "ážáž¶áž˜áž¸áž› (សិង្ហបុរី)", + "te": "ážáŸáž›áž»áž‚áž»", + "te_IN": "ážáŸáž›áž»áž‚áž» (ឥណ្ឌា)", + "th": "ážáŸƒ", + "th_TH": "ážáŸƒ (ážáŸƒ)", + "ti": "ទីហ្គ្រីញ៉ា", + "ti_ER": "ទីហ្គ្រីញ៉ា (អáŸážšáž¸áž‘្រា)", + "ti_ET": "ទីហ្គ្រីញ៉ា (អáŸážáŸ’យូពី)", + "to": "ážáž»áž„ហ្គា", + "to_TO": "ážáž»áž„ហ្គា (ážáž»áž„ហ្គា)", + "tr": "ទួរគី", + "tr_CY": "ទួរគី (ស៊ីប)", + "tr_TR": "ទួរគី (ទួរគី)", + "ug": "អ៊ុយហ្គឺរ", + "ug_CN": "អ៊ុយហ្គឺរ (áž…áž·áž“)", + "uk": "អ៊ុយក្រែន", + "uk_UA": "អ៊ុយក្រែន (អ៊ុយក្រែន)", + "ur": "អ៊ូរឌូ", + "ur_IN": "អ៊ូរឌូ (ឥណ្ឌា)", + "ur_PK": "អ៊ូរឌូ (ប៉ាគីស្ážáž¶áž“)", + "uz": "អ៊ូសបáŸáž‚", + "uz_AF": "អ៊ូសបáŸáž‚ (អាហ្វហ្គានីស្ážáž¶áž“)", + "uz_Arab": "អ៊ូសបáŸáž‚ (អារ៉ាប់)", + "uz_Arab_AF": "អ៊ូសបáŸáž‚ (អារ៉ាប់, អាហ្វហ្គានីស្ážáž¶áž“)", + "uz_Cyrl": "អ៊ូសបáŸáž‚ (ស៊ីរីលីក)", + "uz_Cyrl_UZ": "អ៊ូសបáŸáž‚ (ស៊ីរីលីក, អ៊ូសបáŸáž‚ីស្ážáž¶áž“)", + "uz_Latn": "អ៊ូសបáŸáž‚ (ឡាážáž¶áŸ†áž„)", + "uz_Latn_UZ": "អ៊ូសបáŸáž‚ (ឡាážáž¶áŸ†áž„, អ៊ូសបáŸáž‚ីស្ážáž¶áž“)", + "uz_UZ": "អ៊ូសបáŸáž‚ (អ៊ូសបáŸáž‚ីស្ážáž¶áž“)", + "vi": "វៀážážŽáž¶áž˜", + "vi_VN": "វៀážážŽáž¶áž˜ (វៀážážŽáž¶áž˜)", + "yi": "យីឌីហ្ស", + "yo": "យរូបា", + "yo_BJ": "យរូបា (áž”áŸážŽáž¶áŸ†áž„)", + "yo_NG": "យរូបា (នីហ្សáŸážšáž¸áž™áŸ‰áž¶)", + "zh": "áž…áž·áž“", + "zh_CN": "áž…áž·áž“ (áž…áž·áž“)", + "zh_HK": "áž…áž·áž“ (ហុងកុង)", + "zh_Hans": "áž…áž·áž“ (អក្សរ​ចិន​កាážáŸ‹)", + "zh_Hans_CN": "áž…áž·áž“ (អក្សរ​ចិន​កាážáŸ‹, áž…áž·áž“)", + "zh_Hans_HK": "áž…áž·áž“ (អក្សរ​ចិន​កាážáŸ‹, ហុងកុង)", + "zh_Hans_MO": "áž…áž·áž“ (អក្សរ​ចិន​កាážáŸ‹, ម៉ាកាវ)", + "zh_Hans_SG": "áž…áž·áž“ (អក្សរ​ចិន​កាážáŸ‹, សិង្ហបុរី)", + "zh_Hant": "áž…áž·áž“ (អក្សរ​ចិន​ពáŸáž‰)", + "zh_Hant_HK": "áž…áž·áž“ (អក្សរ​ចិន​ពáŸáž‰, ហុងកុង)", + "zh_Hant_MO": "áž…áž·áž“ (អក្សរ​ចិន​ពáŸáž‰, ម៉ាកាវ)", + "zh_Hant_TW": "áž…áž·áž“ (អក្សរ​ចិន​ពáŸáž‰, ážáŸƒážœáŸ‰áž¶áž“់)", + "zh_MO": "áž…áž·áž“ (ម៉ាកាវ)", + "zh_SG": "áž…áž·áž“ (សិង្ហបុរី)", + "zh_TW": "áž…áž·áž“ (ážáŸƒážœáŸ‰áž¶áž“់)", + "zu": "សូលូ", + "zu_ZA": "សូលូ (អាហ្វ្រិកážáž¶áž„ážáŸ’បូង)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/kn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/kn.json new file mode 100644 index 0000000000000000000000000000000000000000..4bd1a6281c88e3f1bb9820c5226542d05847fac5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/kn.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "ಆಫà³à²°à²¿à²•ಾನà³à²¸à³", + "af_NA": "ಆಫà³à²°à²¿à²•ಾನà³à²¸à³ (ನಮೀಬಿಯಾ)", + "af_ZA": "ಆಫà³à²°à²¿à²•ಾನà³à²¸à³ (ದಕà³à²·à²¿à²£ ಆಫà³à²°à²¿à²•ಾ)", + "ak": "ಅಕಾನà³", + "ak_GH": "ಅಕಾನೠ(ಘಾನಾ)", + "am": "ಅಂಹರಿಕà³", + "am_ET": "ಅಂಹರಿಕೠ(ಇಥಿಯೋಪಿಯಾ)", + "ar": "ಅರೇಬಿಕà³", + "ar_AE": "ಅರೇಬಿಕೠ(ಸಂಯà³à²•à³à²¤ ಅರಬೠಎಮಿರೇಟಸà³)", + "ar_BH": "ಅರೇಬಿಕೠ(ಬಹà³à²°à³‡à²¨à³)", + "ar_DJ": "ಅರೇಬಿಕೠ(ಜಿಬೋಟಿ)", + "ar_DZ": "ಅರೇಬಿಕೠ(ಅಲà³à²—ೇರಿಯಾ)", + "ar_EG": "ಅರೇಬಿಕೠ(ಈಜಿಪà³à²Ÿà³)", + "ar_EH": "ಅರೇಬಿಕೠ(ಪಶà³à²šà²¿à²® ಸಹಾರಾ)", + "ar_ER": "ಅರೇಬಿಕೠ(à²à²°à²¿à²Ÿà³à²°à²¿à²¯à²¾)", + "ar_IL": "ಅರೇಬಿಕೠ(ಇಸà³à²°à³‡à²²à³)", + "ar_IQ": "ಅರೇಬಿಕೠ(ಇರಾಕà³)", + "ar_JO": "ಅರೇಬಿಕೠ(ಜೋರà³à²¡à²¾à²¨à³)", + "ar_KM": "ಅರೇಬಿಕೠ(ಕೊಮೊರೊಸà³)", + "ar_KW": "ಅರೇಬಿಕೠ(ಕà³à²µà³ˆà²¤à³)", + "ar_LB": "ಅರೇಬಿಕೠ(ಲೆಬನಾನà³)", + "ar_LY": "ಅರೇಬಿಕೠ(ಲಿಬಿಯಾ)", + "ar_MA": "ಅರೇಬಿಕೠ(ಮೊರಾಕà³à²•ೊ)", + "ar_MR": "ಅರೇಬಿಕೠ(ಮಾರಿಟೇನಿಯಾ)", + "ar_OM": "ಅರೇಬಿಕೠ(ಓಮನà³)", + "ar_PS": "ಅರೇಬಿಕೠ(ಪà³à²¯à²¾à²²à³‡à²¸à³à²Ÿà³‡à²¨à²¿à²¯à²¨à³ ಪà³à²°à²¦à³‡à²¶à²—ಳà³)", + "ar_QA": "ಅರೇಬಿಕೠ(ಖತಾರà³)", + "ar_SA": "ಅರೇಬಿಕೠ(ಸೌದಿ ಅರೇಬಿಯಾ)", + "ar_SD": "ಅರೇಬಿಕೠ(ಸೂಡಾನà³)", + "ar_SO": "ಅರೇಬಿಕೠ(ಸೊಮಾಲಿಯಾ)", + "ar_SS": "ಅರೇಬಿಕೠ(ದಕà³à²·à²¿à²£ ಸೂಡಾನà³)", + "ar_SY": "ಅರೇಬಿಕೠ(ಸಿರಿಯಾ)", + "ar_TD": "ಅರೇಬಿಕೠ(ಚಾದà³)", + "ar_TN": "ಅರೇಬಿಕೠ(ಟà³à²¨à²¿à²¶à²¿à²¯à²¾)", + "ar_YE": "ಅರೇಬಿಕೠ(ಯೆಮನà³)", + "as": "ಅಸà³à²¸à²¾à²®à³€à²¸à³", + "as_IN": "ಅಸà³à²¸à²¾à²®à³€à²¸à³ (ಭಾರತ)", + "az": "ಅಜೆರà³à²¬à³ˆà²œà²¾à²¨à²¿", + "az_AZ": "ಅಜೆರà³à²¬à³ˆà²œà²¾à²¨à²¿ (ಅಜರà³à²¬à³ˆà²œà²¾à²¨à³)", + "az_Cyrl": "ಅಜೆರà³à²¬à³ˆà²œà²¾à²¨à²¿ (ಸಿರಿಲಿಕà³)", + "az_Cyrl_AZ": "ಅಜೆರà³à²¬à³ˆà²œà²¾à²¨à²¿ (ಸಿರಿಲಿಕà³, ಅಜರà³à²¬à³ˆà²œà²¾à²¨à³)", + "az_Latn": "ಅಜೆರà³à²¬à³ˆà²œà²¾à²¨à²¿ (ಲà³à²¯à²¾à²Ÿà²¿à²¨à³)", + "az_Latn_AZ": "ಅಜೆರà³à²¬à³ˆà²œà²¾à²¨à²¿ (ಲà³à²¯à²¾à²Ÿà²¿à²¨à³, ಅಜರà³à²¬à³ˆà²œà²¾à²¨à³)", + "be": "ಬೆಲರೂಸಿಯನà³", + "be_BY": "ಬೆಲರೂಸಿಯನೠ(ಬೆಲಾರಸà³)", + "bg": "ಬಲà³à²—ೇರಿಯನà³", + "bg_BG": "ಬಲà³à²—ೇರಿಯನೠ(ಬಲà³à²—ೇರಿಯಾ)", + "bm": "ಬಂಬಾರಾ", + "bm_ML": "ಬಂಬಾರಾ (ಮಾಲಿ)", + "bn": "ಬಾಂಗà³à²²à²¾", + "bn_BD": "ಬಾಂಗà³à²²à²¾ (ಬಾಂಗà³à²²à²¾à²¦à³‡à²¶à³)", + "bn_IN": "ಬಾಂಗà³à²²à²¾ (ಭಾರತ)", + "bo": "ಟಿಬೇಟಿಯನà³", + "bo_CN": "ಟಿಬೇಟಿಯನೠ(ಚೀನಾ)", + "bo_IN": "ಟಿಬೇಟಿಯನೠ(ಭಾರತ)", + "br": "ಬà³à²°à³†à²Ÿà²¨à³", + "br_FR": "ಬà³à²°à³†à²Ÿà²¨à³ (ಫà³à²°à²¾à²¨à³à²¸à³)", + "bs": "ಬೋಸà³à²¨à²¿à²¯à²¨à³", + "bs_BA": "ಬೋಸà³à²¨à²¿à²¯à²¨à³ (ಬೋಸà³à²¨à²¿à²¯à²¾ ಮತà³à²¤à³ ಹರà³à²œà³†à²—ೋವಿನಾ)", + "bs_Cyrl": "ಬೋಸà³à²¨à²¿à²¯à²¨à³ (ಸಿರಿಲಿಕà³)", + "bs_Cyrl_BA": "ಬೋಸà³à²¨à²¿à²¯à²¨à³ (ಸಿರಿಲಿಕà³, ಬೋಸà³à²¨à²¿à²¯à²¾ ಮತà³à²¤à³ ಹರà³à²œà³†à²—ೋವಿನಾ)", + "bs_Latn": "ಬೋಸà³à²¨à²¿à²¯à²¨à³ (ಲà³à²¯à²¾à²Ÿà²¿à²¨à³)", + "bs_Latn_BA": "ಬೋಸà³à²¨à²¿à²¯à²¨à³ (ಲà³à²¯à²¾à²Ÿà²¿à²¨à³, ಬೋಸà³à²¨à²¿à²¯à²¾ ಮತà³à²¤à³ ಹರà³à²œà³†à²—ೋವಿನಾ)", + "ca": "ಕೆಟಲಾನà³", + "ca_AD": "ಕೆಟಲಾನೠ(ಅಂಡೋರಾ)", + "ca_ES": "ಕೆಟಲಾನೠ(ಸà³à²ªà³‡à²¨à³)", + "ca_FR": "ಕೆಟಲಾನೠ(ಫà³à²°à²¾à²¨à³à²¸à³)", + "ca_IT": "ಕೆಟಲಾನೠ(ಇಟಲಿ)", + "ce": "ಚೆಚನà³", + "ce_RU": "ಚೆಚನೠ(ರಷà³à²¯à²¾)", + "cs": "ಜೆಕà³", + "cs_CZ": "ಜೆಕೠ(à²à³†à²•ೠರಿಪಬà³à²²à²¿à²•à³)", + "cy": "ವೆಲà³à²¶à³", + "cy_GB": "ವೆಲà³à²¶à³ (ಬà³à²°à²¿à²Ÿà²¨à³\/ಇಂಗà³à²²à³†à²‚ಡà³)", + "da": "ಡà³à²¯à²¾à²¨à²¿à²¶à³", + "da_DK": "ಡà³à²¯à²¾à²¨à²¿à²¶à³ (ಡೆನà³à²®à²¾à²°à³à²•à³)", + "da_GL": "ಡà³à²¯à²¾à²¨à²¿à²¶à³ (ಗà³à²°à³€à²¨à³â€Œà²²à³à²¯à²¾à²‚ಡà³)", + "de": "ಜರà³à²®à²¨à³", + "de_AT": "ಜರà³à²®à²¨à³ (ಆಸà³à²Ÿà³à²°à²¿à²¯à²¾)", + "de_BE": "ಜರà³à²®à²¨à³ (ಬೆಲà³à²œà²¿à²¯à²®à³)", + "de_CH": "ಜರà³à²®à²¨à³ (ಸà³à²µà²¿à²Ÿà³à²œà²°à³à²²à³à²¯à²¾à²‚ಡà³)", + "de_DE": "ಜರà³à²®à²¨à³ (ಜರà³à²®à²¨à²¿)", + "de_IT": "ಜರà³à²®à²¨à³ (ಇಟಲಿ)", + "de_LI": "ಜರà³à²®à²¨à³ (ಲಿಚೆನà³â€Œà²¸à³à²Ÿà³ˆà²¨à³)", + "de_LU": "ಜರà³à²®à²¨à³ (ಲಕà³à²¸à²‚ಬರà³à²—à³)", + "dz": "ಜೋಂಗà³â€Œà²–ಾ", + "dz_BT": "ಜೋಂಗà³â€Œà²–ಾ (ಭೂತಾನà³)", + "ee": "ಈವà³", + "ee_GH": "ಈವೠ(ಘಾನಾ)", + "ee_TG": "ಈವೠ(ಟೋಗೋ)", + "el": "ಗà³à²°à³€à²•à³", + "el_CY": "ಗà³à²°à³€à²•à³ (ಸೈಪà³à²°à²¸à³)", + "el_GR": "ಗà³à²°à³€à²•à³ (ಗà³à²°à³€à²¸à³)", + "en": "ಇಂಗà³à²²à³€à²·à³", + "en_AG": "ಇಂಗà³à²²à³€à²·à³ (ಆಂಟಿಗà³à²µà²¾ ಮತà³à²¤à³ ಬರà³à²¬à³à²¡à²¾)", + "en_AI": "ಇಂಗà³à²²à³€à²·à³ (ಆಂಗà³à²µà²¿à²²à³à²²à²¾)", + "en_AS": "ಇಂಗà³à²²à³€à²·à³ (ಅಮೇರಿಕನೠಸಮೋವಾ)", + "en_AT": "ಇಂಗà³à²²à³€à²·à³ (ಆಸà³à²Ÿà³à²°à²¿à²¯à²¾)", + "en_AU": "ಇಂಗà³à²²à³€à²·à³ (ಆಸà³à²Ÿà³à²°à³‡à²²à²¿à²¯)", + "en_BB": "ಇಂಗà³à²²à³€à²·à³ (ಬಾರà³à²¬à²¡à³‹à²¸à³)", + "en_BE": "ಇಂಗà³à²²à³€à²·à³ (ಬೆಲà³à²œà²¿à²¯à²®à³)", + "en_BI": "ಇಂಗà³à²²à³€à²·à³ (ಬà³à²°à³à²‚ಡಿ)", + "en_BM": "ಇಂಗà³à²²à³€à²·à³ (ಬರà³à²®à³à²¡à²¾)", + "en_BS": "ಇಂಗà³à²²à³€à²·à³ (ಬಹಾಮಾಸà³)", + "en_BW": "ಇಂಗà³à²²à³€à²·à³ (ಬೋಟà³à²¸à³â€Œà²µà²¾à²¨à²¾)", + "en_BZ": "ಇಂಗà³à²²à³€à²·à³ (ಬೆಲಿಜà³)", + "en_CA": "ಇಂಗà³à²²à³€à²·à³ (ಕೆನಡಾ)", + "en_CC": "ಇಂಗà³à²²à³€à²·à³ (ಕೊಕೊಸೠ(ಕೀಲಿಂಗà³) ದà³à²µà³€à²ªà²—ಳà³)", + "en_CH": "ಇಂಗà³à²²à³€à²·à³ (ಸà³à²µà²¿à²Ÿà³à²œà²°à³à²²à³à²¯à²¾à²‚ಡà³)", + "en_CK": "ಇಂಗà³à²²à³€à²·à³ (ಕà³à²•ೠದà³à²µà³€à²ªà²—ಳà³)", + "en_CM": "ಇಂಗà³à²²à³€à²·à³ (ಕà³à²¯à²¾à²®à²°à³‹à²¨à³)", + "en_CX": "ಇಂಗà³à²²à³€à²·à³ (ಕà³à²°à²¿à²¸à³à²®à²¸à³ ದà³à²µà³€à²ª)", + "en_CY": "ಇಂಗà³à²²à³€à²·à³ (ಸೈಪà³à²°à²¸à³)", + "en_DE": "ಇಂಗà³à²²à³€à²·à³ (ಜರà³à²®à²¨à²¿)", + "en_DG": "ಇಂಗà³à²²à³€à²·à³ (ಡೈಗೋ ಗಾರà³à²¸à²¿à²¯)", + "en_DK": "ಇಂಗà³à²²à³€à²·à³ (ಡೆನà³à²®à²¾à²°à³à²•à³)", + "en_DM": "ಇಂಗà³à²²à³€à²·à³ (ಡೊಮಿನಿಕಾ)", + "en_ER": "ಇಂಗà³à²²à³€à²·à³ (à²à²°à²¿à²Ÿà³à²°à²¿à²¯à²¾)", + "en_FI": "ಇಂಗà³à²²à³€à²·à³ (ಫಿನà³â€Œà²²à³à²¯à²¾à²‚ಡà³)", + "en_FJ": "ಇಂಗà³à²²à³€à²·à³ (ಫಿಜಿ)", + "en_FK": "ಇಂಗà³à²²à³€à²·à³ (ಫಾಲà³à²•à³â€Œà²²à³à²¯à²¾à²‚ಡೠದà³à²µà³€à²ªà²—ಳà³)", + "en_FM": "ಇಂಗà³à²²à³€à²·à³ (ಮೈಕà³à²°à³‹à²¨à³‡à²¶à²¿à²¯à²¾)", + "en_GB": "ಇಂಗà³à²²à³€à²·à³ (ಬà³à²°à²¿à²Ÿà²¨à³\/ಇಂಗà³à²²à³†à²‚ಡà³)", + "en_GD": "ಇಂಗà³à²²à³€à²·à³ (ಗà³à²°à³†à²¨à³†à²¡à²¾)", + "en_GG": "ಇಂಗà³à²²à³€à²·à³ (ಗà³à²°à³à²¨à³â€Œà²¸à³†)", + "en_GH": "ಇಂಗà³à²²à³€à²·à³ (ಘಾನಾ)", + "en_GI": "ಇಂಗà³à²²à³€à²·à³ (ಗಿಬà³à²°à²¾à²²à³à²Ÿà²°à³)", + "en_GM": "ಇಂಗà³à²²à³€à²·à³ (ಗà³à²¯à²¾à²‚ಬಿಯಾ)", + "en_GU": "ಇಂಗà³à²²à³€à²·à³ (ಗà³à²¯à²¾à²®à³)", + "en_GY": "ಇಂಗà³à²²à³€à²·à³ (ಗಯಾನಾ)", + "en_HK": "ಇಂಗà³à²²à³€à²·à³ (ಹಾಂಗೠಕಾಂಗೠSAR ಚೈನಾ)", + "en_IE": "ಇಂಗà³à²²à³€à²·à³ (à²à²°à³à²²à³†à²‚ಡà³)", + "en_IL": "ಇಂಗà³à²²à³€à²·à³ (ಇಸà³à²°à³‡à²²à³)", + "en_IM": "ಇಂಗà³à²²à³€à²·à³ (à²à²²à³ ಆಫೠಮà³à²¯à²¾à²¨à³)", + "en_IN": "ಇಂಗà³à²²à³€à²·à³ (ಭಾರತ)", + "en_IO": "ಇಂಗà³à²²à³€à²·à³ (ಬà³à²°à²¿à²Ÿà³€à²·à³ ಹಿಂದೂ ಮಹಾಸಾಗರದ ಪà³à²°à²¦à³‡à²¶)", + "en_JE": "ಇಂಗà³à²²à³€à²·à³ (ಜೆರà³à²¸à²¿)", + "en_JM": "ಇಂಗà³à²²à³€à²·à³ (ಜಮೈಕಾ)", + "en_KE": "ಇಂಗà³à²²à³€à²·à³ (ಕೀನà³à²¯à²¾)", + "en_KI": "ಇಂಗà³à²²à³€à²·à³ (ಕಿರಿಬಾತಿ)", + "en_KN": "ಇಂಗà³à²²à³€à²·à³ (ಸೇಂಟೠಕಿಟà³à²¸à³ ಮತà³à²¤à³ ನೆವಿಸà³)", + "en_KY": "ಇಂಗà³à²²à³€à²·à³ (ಕೇಮನೠದà³à²µà³€à²ªà²—ಳà³)", + "en_LC": "ಇಂಗà³à²²à³€à²·à³ (ಸೇಂಟೠಲೂಸಿಯಾ)", + "en_LR": "ಇಂಗà³à²²à³€à²·à³ (ಲಿಬೇರಿಯಾ)", + "en_LS": "ಇಂಗà³à²²à³€à²·à³ (ಲೆಸೊಥೋ)", + "en_MG": "ಇಂಗà³à²²à³€à²·à³ (ಮಡಗಾಸà³à²•ರà³)", + "en_MH": "ಇಂಗà³à²²à³€à²·à³ (ಮಾರà³à²·à²²à³ ದà³à²µà³€à²ªà²—ಳà³)", + "en_MO": "ಇಂಗà³à²²à³€à²·à³ (ಮಖಾವೠ(SAR) ಚೈನಾ)", + "en_MP": "ಇಂಗà³à²²à³€à²·à³ (ಉತà³à²¤à²° ಮರಿಯಾನಾ ದà³à²µà³€à²ªà²—ಳà³)", + "en_MS": "ಇಂಗà³à²²à³€à²·à³ (ಮಾಂಟà³â€Œà²¸à³†à²°à³‡à²Ÿà³)", + "en_MT": "ಇಂಗà³à²²à³€à²·à³ (ಮಾಲà³à²Ÿà²¾)", + "en_MU": "ಇಂಗà³à²²à³€à²·à³ (ಮಾರಿಷಸà³)", + "en_MW": "ಇಂಗà³à²²à³€à²·à³ (ಮಲಾವಿ)", + "en_MY": "ಇಂಗà³à²²à³€à²·à³ (ಮಲೇಶಿಯಾ)", + "en_NA": "ಇಂಗà³à²²à³€à²·à³ (ನಮೀಬಿಯಾ)", + "en_NF": "ಇಂಗà³à²²à³€à²·à³ (ನಾರà³à²«à³‹à²•ೠದà³à²µà³€à²ª)", + "en_NG": "ಇಂಗà³à²²à³€à²·à³ (ನೈಜೀರಿಯಾ)", + "en_NL": "ಇಂಗà³à²²à³€à²·à³ (ನೆದರà³â€Œà²²à³à²¯à²¾à²‚ಡà³à²¸à³)", + "en_NR": "ಇಂಗà³à²²à³€à²·à³ (ನೌರà³)", + "en_NU": "ಇಂಗà³à²²à³€à²·à³ (ನಿಯà³)", + "en_NZ": "ಇಂಗà³à²²à³€à²·à³ (ನà³à²¯à³‚ಜಿಲೆಂಡà³)", + "en_PG": "ಇಂಗà³à²²à³€à²·à³ (ಪಪà³à²µà²¾ ನà³à²¯à³‚ಗಿನಿಯಾ)", + "en_PH": "ಇಂಗà³à²²à³€à²·à³ (ಫಿಲಿಫೈನà³à²¸à³)", + "en_PK": "ಇಂಗà³à²²à³€à²·à³ (ಪಾಕಿಸà³à²¤à²¾à²¨)", + "en_PN": "ಇಂಗà³à²²à³€à²·à³ (ಪಿಟà³â€Œà²•ೈರà³à²¨à³ ದà³à²µà³€à²ªà²—ಳà³)", + "en_PR": "ಇಂಗà³à²²à³€à²·à³ (ಪà³à²¯à³‚ರà³à²Ÿà³‹ ರಿಕೊ)", + "en_PW": "ಇಂಗà³à²²à³€à²·à³ (ಪಲಾವà³)", + "en_RW": "ಇಂಗà³à²²à³€à²·à³ (ರà³à²µà²¾à²‚ಡಾ)", + "en_SB": "ಇಂಗà³à²²à³€à²·à³ (ಸೊಲೊಮನೠದà³à²µà³€à²ªà²—ಳà³)", + "en_SC": "ಇಂಗà³à²²à³€à²·à³ (ಸೀಶೆಲà³à²²à³†à²¸à³)", + "en_SD": "ಇಂಗà³à²²à³€à²·à³ (ಸೂಡಾನà³)", + "en_SE": "ಇಂಗà³à²²à³€à²·à³ (ಸà³à²µà³€à²¡à²¨à³)", + "en_SG": "ಇಂಗà³à²²à³€à²·à³ (ಸಿಂಗಾಪà³à²°à³)", + "en_SH": "ಇಂಗà³à²²à³€à²·à³ (ಸೇಂಟೠಹೆಲೆನಾ)", + "en_SI": "ಇಂಗà³à²²à³€à²·à³ (ಸà³à²²à³‹à²µà³‡à²¨à²¿à²¯à²¾)", + "en_SL": "ಇಂಗà³à²²à³€à²·à³ (ಸಿಯೆರà³à²°à²¾ ಲಿಯೋನà³)", + "en_SS": "ಇಂಗà³à²²à³€à²·à³ (ದಕà³à²·à²¿à²£ ಸೂಡಾನà³)", + "en_SX": "ಇಂಗà³à²²à³€à²·à³ (ಸಿಂಟೠಮಾರà³à²Ÿà³†à²¨à³)", + "en_SZ": "ಇಂಗà³à²²à³€à²·à³ (ಸà³à²µà²¾à²œà²¿à²²à³à²¯à²¾à²‚ಡà³)", + "en_TC": "ಇಂಗà³à²²à³€à²·à³ (ಟರà³à²•à³à²¸à³ ಮತà³à²¤à³ ಕೈಕೋಸೠದà³à²µà³€à²ªà²—ಳà³)", + "en_TK": "ಇಂಗà³à²²à³€à²·à³ (ಟೊಕೆಲಾವà³)", + "en_TO": "ಇಂಗà³à²²à³€à²·à³ (ಟೊಂಗ)", + "en_TT": "ಇಂಗà³à²²à³€à²·à³ (ಟà³à²°à²¿à²¨à²¿à²¡à²¾à²¡à³ ಮತà³à²¤à³ ಟೊಬಾಗೊ)", + "en_TV": "ಇಂಗà³à²²à³€à²·à³ (ಟà³à²µà²¾à²²à³)", + "en_TZ": "ಇಂಗà³à²²à³€à²·à³ (ತಾಂಜೇನಿಯಾ)", + "en_UG": "ಇಂಗà³à²²à³€à²·à³ (ಉಗಾಂಡಾ)", + "en_UM": "ಇಂಗà³à²²à³€à²·à³ (ಯà³à²Žà²¸à³â€Œ. ಔಟà³â€Œà²²à³‡à²¯à²¿à²‚ಗೠದà³à²µà³€à²ªà²—ಳà³)", + "en_US": "ಇಂಗà³à²²à³€à²·à³ (ಅಮೇರಿಕಾ ಸಂಯà³à²•à³à²¤ ಸಂಸà³à²¥à²¾à²¨)", + "en_VC": "ಇಂಗà³à²²à³€à²·à³ (ಸೇಂಟà³. ವಿನà³à²¸à³†à²‚ಟೠಮತà³à²¤à³ ಗà³à²°à³†à²¨à³†à²¡à³ˆà²¨à³à²¸à³)", + "en_VG": "ಇಂಗà³à²²à³€à²·à³ (ಬà³à²°à²¿à²Ÿà²¿à²·à³ ವರà³à²œà²¿à²¨à³ ದà³à²µà³€à²ªà²—ಳà³)", + "en_VI": "ಇಂಗà³à²²à³€à²·à³ (ಯà³.ಎಸà³. ವರà³à²œà²¿à²¨à³ ದà³à²µà³€à²ªà²—ಳà³)", + "en_VU": "ಇಂಗà³à²²à³€à²·à³ (ವನೌಟà³)", + "en_WS": "ಇಂಗà³à²²à³€à²·à³ (ಸಮೋವಾ)", + "en_ZA": "ಇಂಗà³à²²à³€à²·à³ (ದಕà³à²·à²¿à²£ ಆಫà³à²°à²¿à²•ಾ)", + "en_ZM": "ಇಂಗà³à²²à³€à²·à³ (à²à²¾à²‚ಬಿಯಾ)", + "en_ZW": "ಇಂಗà³à²²à³€à²·à³ (ಜಿಂಬಾಬà³à²µà³†)", + "eo": "ಎಸà³à²ªà³†à²°à²¾à²‚ಟೊ", + "es": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³", + "es_AR": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಅರà³à²œà³†à²‚ಟಿನಾ)", + "es_BO": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಬೊಲಿವಿಯಾ)", + "es_BR": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಬà³à²°à³†à²œà²¿à²²à³)", + "es_CL": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಚಿಲಿ)", + "es_CO": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಕೊಲಂಬಿಯಾ)", + "es_CR": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಕೊಸà³à²Ÿà²¾ ರಿಕಾ)", + "es_CU": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಕà³à²¯à³‚ಬಾ)", + "es_DO": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಡೊಮೆನಿಕನೠರಿಪಬà³à²²à²¿à²•à³)", + "es_EA": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಸೆಯà³à²Ÿà²¾ ಹಾಗೂ ಮೆಲಿಲà³à²²à²¾)", + "es_EC": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಈಕà³à²µà³†à²¡à²¾à²°à³)", + "es_ES": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಸà³à²ªà³‡à²¨à³)", + "es_GQ": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಈಕà³à²µà³†à²Ÿà³‹à²°à²¿à²¯à²²à³ ಗಿನಿ)", + "es_GT": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಗà³à²µà²¾à²Ÿà³†à²®à²¾à²²à²¾)", + "es_HN": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಹೊಂಡà³à²°à²¾à²¸à³)", + "es_IC": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಕà³à²¯à²¾à²¨à²°à²¿ ದà³à²µà³€à²ªà²—ಳà³)", + "es_MX": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಮೆಕà³à²¸à²¿à²•ೊ)", + "es_NI": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ನಿಕಾರಾಗà³à²µà²¾)", + "es_PA": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಪನಾಮಾ)", + "es_PE": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಪೆರà³)", + "es_PH": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಫಿಲಿಫೈನà³à²¸à³)", + "es_PR": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಪà³à²¯à³‚ರà³à²Ÿà³‹ ರಿಕೊ)", + "es_PY": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಪರಾಗà³à²µà³‡)", + "es_SV": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಎಲೠಸಾಲà³à²µà³‡à²¡à²¾à²°à³)", + "es_US": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಅಮೇರಿಕಾ ಸಂಯà³à²•à³à²¤ ಸಂಸà³à²¥à²¾à²¨)", + "es_UY": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ಉರà³à²—à³à²µà³‡)", + "es_VE": "ಸà³à²ªà³à²¯à²¾à²¨à²¿à²·à³ (ವೆನೆಜà³à²µà³†à²²à²¾)", + "et": "ಎಸà³à²Ÿà³Šà²¨à²¿à²¯à²¨à³", + "et_EE": "ಎಸà³à²Ÿà³Šà²¨à²¿à²¯à²¨à³ (ಎಸà³à²Ÿà³‹à²¨à²¿à²¯à²¾)", + "eu": "ಬಾಸà³à²•à³", + "eu_ES": "ಬಾಸà³à²•à³ (ಸà³à²ªà³‡à²¨à³)", + "fa": "ಪರà³à²¶à²¿à²¯à²¨à³", + "fa_AF": "ಪರà³à²¶à²¿à²¯à²¨à³ (ಅಫಘಾನಿಸà³à²¥à²¾à²¨à³)", + "fa_IR": "ಪರà³à²¶à²¿à²¯à²¨à³ (ಇರಾನà³)", + "ff": "ಫà³à²²à²¾à²¹à³", + "ff_CM": "ಫà³à²²à²¾à²¹à³ (ಕà³à²¯à²¾à²®à²°à³‹à²¨à³)", + "ff_GN": "ಫà³à²²à²¾à²¹à³ (ಗಿನಿ)", + "ff_MR": "ಫà³à²²à²¾à²¹à³ (ಮಾರಿಟೇನಿಯಾ)", + "ff_SN": "ಫà³à²²à²¾à²¹à³ (ಸೆನೆಗಲà³)", + "fi": "ಫಿನà³à²¨à²¿à²¶à³", + "fi_FI": "ಫಿನà³à²¨à²¿à²¶à³ (ಫಿನà³â€Œà²²à³à²¯à²¾à²‚ಡà³)", + "fo": "ಫರೋಸಿ", + "fo_DK": "ಫರೋಸಿ (ಡೆನà³à²®à²¾à²°à³à²•à³)", + "fo_FO": "ಫರೋಸಿ (ಫರೋ ದà³à²µà³€à²ªà²—ಳà³)", + "fr": "ಫà³à²°à³†à²‚ಚà³", + "fr_BE": "ಫà³à²°à³†à²‚ಚೠ(ಬೆಲà³à²œà²¿à²¯à²®à³)", + "fr_BF": "ಫà³à²°à³†à²‚ಚೠ(ಬà³à²°à³à²•ಿನಾ ಫಾಸೋ)", + "fr_BI": "ಫà³à²°à³†à²‚ಚೠ(ಬà³à²°à³à²‚ಡಿ)", + "fr_BJ": "ಫà³à²°à³†à²‚ಚೠ(ಬೆನಿನà³)", + "fr_BL": "ಫà³à²°à³†à²‚ಚೠ(ಸೇಂಟೠಬಾರà³à²¥à³†à²²à³†à²®à²¿)", + "fr_CA": "ಫà³à²°à³†à²‚ಚೠ(ಕೆನಡಾ)", + "fr_CD": "ಫà³à²°à³†à²‚ಚೠ(ಕಾಂಗೋ - ಕಿನà³à²¶à²¾à²¸à²¾)", + "fr_CF": "ಫà³à²°à³†à²‚ಚೠ(ಮಧà³à²¯ ಆಫà³à²°à²¿à²•ಾ ಗಣರಾಜà³à²¯)", + "fr_CG": "ಫà³à²°à³†à²‚ಚೠ(ಕಾಂಗೋ - ಬà³à²°à²¾à²œà²¾à²µà²¿à²²à³à²²à³‡)", + "fr_CH": "ಫà³à²°à³†à²‚ಚೠ(ಸà³à²µà²¿à²Ÿà³à²œà²°à³à²²à³à²¯à²¾à²‚ಡà³)", + "fr_CI": "ಫà³à²°à³†à²‚ಚೠ(ಕೋತà³â€Œ ದಿವಾರà³â€)", + "fr_CM": "ಫà³à²°à³†à²‚ಚೠ(ಕà³à²¯à²¾à²®à²°à³‹à²¨à³)", + "fr_DJ": "ಫà³à²°à³†à²‚ಚೠ(ಜಿಬೋಟಿ)", + "fr_DZ": "ಫà³à²°à³†à²‚ಚೠ(ಅಲà³à²—ೇರಿಯಾ)", + "fr_FR": "ಫà³à²°à³†à²‚ಚೠ(ಫà³à²°à²¾à²¨à³à²¸à³)", + "fr_GA": "ಫà³à²°à³†à²‚ಚೠ(ಗೆಬೊನà³)", + "fr_GF": "ಫà³à²°à³†à²‚ಚೠ(ಫà³à²°à³†à²‚ಚೠಗಯಾನಾ)", + "fr_GN": "ಫà³à²°à³†à²‚ಚೠ(ಗಿನಿ)", + "fr_GP": "ಫà³à²°à³†à²‚ಚೠ(ಗà³à²¡à³†à²²à³‹à²ªà³)", + "fr_GQ": "ಫà³à²°à³†à²‚ಚೠ(ಈಕà³à²µà³†à²Ÿà³‹à²°à²¿à²¯à²²à³ ಗಿನಿ)", + "fr_HT": "ಫà³à²°à³†à²‚ಚೠ(ಹೈಟಿ)", + "fr_KM": "ಫà³à²°à³†à²‚ಚೠ(ಕೊಮೊರೊಸà³)", + "fr_LU": "ಫà³à²°à³†à²‚ಚೠ(ಲಕà³à²¸à²‚ಬರà³à²—à³)", + "fr_MA": "ಫà³à²°à³†à²‚ಚೠ(ಮೊರಾಕà³à²•ೊ)", + "fr_MC": "ಫà³à²°à³†à²‚ಚೠ(ಮೊನಾಕೊ)", + "fr_MF": "ಫà³à²°à³†à²‚ಚೠ(ಸೇಂಟೠಮಾರà³à²Ÿà²¿à²¨à³)", + "fr_MG": "ಫà³à²°à³†à²‚ಚೠ(ಮಡಗಾಸà³à²•ರà³)", + "fr_ML": "ಫà³à²°à³†à²‚ಚೠ(ಮಾಲಿ)", + "fr_MQ": "ಫà³à²°à³†à²‚ಚೠ(ಮಾರà³à²Ÿà²¿à²¨à²¿à²•à³)", + "fr_MR": "ಫà³à²°à³†à²‚ಚೠ(ಮಾರಿಟೇನಿಯಾ)", + "fr_MU": "ಫà³à²°à³†à²‚ಚೠ(ಮಾರಿಷಸà³)", + "fr_NC": "ಫà³à²°à³†à²‚ಚೠ(ನà³à²¯à³‚ ಕà³à²¯à²¾à²²à²¿à²¡à³‹à²¨à²¿à²¯à²¾)", + "fr_NE": "ಫà³à²°à³†à²‚ಚೠ(ನೈಜರà³)", + "fr_PF": "ಫà³à²°à³†à²‚ಚೠ(ಫà³à²°à³†à²‚ಚೠಪಾಲಿನೇಷà³à²¯à²¾)", + "fr_PM": "ಫà³à²°à³†à²‚ಚೠ(ಸೇಂಟೠಪಿಯರೆ ಮತà³à²¤à³ ಮಿಕೆಲನà³)", + "fr_RE": "ಫà³à²°à³†à²‚ಚೠ(ರೀಯೂನಿಯನà³)", + "fr_RW": "ಫà³à²°à³†à²‚ಚೠ(ರà³à²µà²¾à²‚ಡಾ)", + "fr_SC": "ಫà³à²°à³†à²‚ಚೠ(ಸೀಶೆಲà³à²²à³†à²¸à³)", + "fr_SN": "ಫà³à²°à³†à²‚ಚೠ(ಸೆನೆಗಲà³)", + "fr_SY": "ಫà³à²°à³†à²‚ಚೠ(ಸಿರಿಯಾ)", + "fr_TD": "ಫà³à²°à³†à²‚ಚೠ(ಚಾದà³)", + "fr_TG": "ಫà³à²°à³†à²‚ಚೠ(ಟೋಗೋ)", + "fr_TN": "ಫà³à²°à³†à²‚ಚೠ(ಟà³à²¨à²¿à²¶à²¿à²¯à²¾)", + "fr_VU": "ಫà³à²°à³†à²‚ಚೠ(ವನೌಟà³)", + "fr_WF": "ಫà³à²°à³†à²‚ಚೠ(ವಾಲಿಸೠಮತà³à²¤à³ ಫà³à²Ÿà³à²¨à²¾)", + "fr_YT": "ಫà³à²°à³†à²‚ಚೠ(ಮಯೊಟà³à²Ÿà³†)", + "fy": "ಪಶà³à²šà²¿à²® ಫà³à²°à²¿à²¸à²¿à²¯à²¨à³", + "fy_NL": "ಪಶà³à²šà²¿à²® ಫà³à²°à²¿à²¸à²¿à²¯à²¨à³ (ನೆದರà³â€Œà²²à³à²¯à²¾à²‚ಡà³à²¸à³)", + "ga": "à²à²°à²¿à²·à³", + "ga_IE": "à²à²°à²¿à²·à³ (à²à²°à³à²²à³†à²‚ಡà³)", + "gd": "ಸà³à²•ಾಟಿಶೠಗà³à²¯à²¾à²²à²¿à²•à³", + "gd_GB": "ಸà³à²•ಾಟಿಶೠಗà³à²¯à²¾à²²à²¿à²•à³ (ಬà³à²°à²¿à²Ÿà²¨à³\/ಇಂಗà³à²²à³†à²‚ಡà³)", + "gl": "ಗà³à²¯à²¾à²²à²¿à²¶à²¿à²¯à²¨à³", + "gl_ES": "ಗà³à²¯à²¾à²²à²¿à²¶à²¿à²¯à²¨à³ (ಸà³à²ªà³‡à²¨à³)", + "gu": "ಗà³à²œà²°à²¾à²¤à²¿", + "gu_IN": "ಗà³à²œà²°à²¾à²¤à²¿ (ಭಾರತ)", + "gv": "ಮà³à²¯à²¾à²‚ಕà³à²¸à³", + "gv_IM": "ಮà³à²¯à²¾à²‚ಕà³à²¸à³ (à²à²²à³ ಆಫೠಮà³à²¯à²¾à²¨à³)", + "ha": "ಹೌಸಾ", + "ha_GH": "ಹೌಸಾ (ಘಾನಾ)", + "ha_NE": "ಹೌಸಾ (ನೈಜರà³)", + "ha_NG": "ಹೌಸಾ (ನೈಜೀರಿಯಾ)", + "he": "ಹೀಬà³à²°à³à²¯à³‚", + "he_IL": "ಹೀಬà³à²°à³à²¯à³‚ (ಇಸà³à²°à³‡à²²à³)", + "hi": "ಹಿಂದಿ", + "hi_IN": "ಹಿಂದಿ (ಭಾರತ)", + "hr": "ಕà³à²°à³Šà²¯à³‡à²¶à²¿à²¯à²¨à³", + "hr_BA": "ಕà³à²°à³Šà²¯à³‡à²¶à²¿à²¯à²¨à³ (ಬೋಸà³à²¨à²¿à²¯à²¾ ಮತà³à²¤à³ ಹರà³à²œà³†à²—ೋವಿನಾ)", + "hr_HR": "ಕà³à²°à³Šà²¯à³‡à²¶à²¿à²¯à²¨à³ (ಕà³à²°à³Šà²¯à³‡à²¶à²¿à²¯à²¾)", + "hu": "ಹಂಗೇರಿಯನà³", + "hu_HU": "ಹಂಗೇರಿಯನೠ(ಹಂಗೇರಿ)", + "hy": "ಅರà³à²®à³‡à²¨à²¿à²¯à²¨à³", + "hy_AM": "ಅರà³à²®à³‡à²¨à²¿à²¯à²¨à³ (ಅರà³à²®à³‡à²¨à²¿à²¯à²¾)", + "id": "ಇಂಡೋನೇಶಿಯನà³", + "id_ID": "ಇಂಡೋನೇಶಿಯನೠ(ಇಂಡೋನೇಶಿಯಾ)", + "ig": "ಇಗà³à²¬à³Š", + "ig_NG": "ಇಗà³à²¬à³Š (ನೈಜೀರಿಯಾ)", + "ii": "ಸಿಚà³à²…ನೠಯಿ", + "ii_CN": "ಸಿಚà³à²…ನೠಯಿ (ಚೀನಾ)", + "is": "à²à²¸à³à²²à²¾à²‚ಡಿಕà³", + "is_IS": "à²à²¸à³à²²à²¾à²‚ಡಿಕೠ(à²à²¸à³â€Œà²²à³à²¯à²¾à²‚ಡà³)", + "it": "ಇಟಾಲಿಯನà³", + "it_CH": "ಇಟಾಲಿಯನೠ(ಸà³à²µà²¿à²Ÿà³à²œà²°à³à²²à³à²¯à²¾à²‚ಡà³)", + "it_IT": "ಇಟಾಲಿಯನೠ(ಇಟಲಿ)", + "it_SM": "ಇಟಾಲಿಯನೠ(ಸà³à²¯à²¾à²¨à³ ಮೆರಿನೋ)", + "ja": "ಜಾಪನೀಸà³", + "ja_JP": "ಜಾಪನೀಸೠ(ಜಪಾನà³)", + "ka": "ಜಾರà³à²œà²¿à²¯à²¨à³", + "ka_GE": "ಜಾರà³à²œà²¿à²¯à²¨à³ (ಜಾರà³à²œà²¿à²¯à²¾)", + "ki": "ಕಿಕà³à²¯à³", + "ki_KE": "ಕಿಕà³à²¯à³ (ಕೀನà³à²¯à²¾)", + "kk": "ಕà²à²•à³", + "kk_KZ": "ಕà²à²•à³ (ಕà²à²¾à²•ಿಸà³à²¥à²¾à²¨à³)", + "kl": "ಕಲಾಲà³à²²à²¿à²¸à³à²Ÿà³", + "kl_GL": "ಕಲಾಲà³à²²à²¿à²¸à³à²Ÿà³ (ಗà³à²°à³€à²¨à³â€Œà²²à³à²¯à²¾à²‚ಡà³)", + "km": "ಖಮೇರà³", + "km_KH": "ಖಮೇರೠ(ಕಾಂಬೋಡಿಯಾ)", + "kn": "ಕನà³à²¨à²¡", + "kn_IN": "ಕನà³à²¨à²¡ (ಭಾರತ)", + "ko": "ಕೊರಿಯನà³", + "ko_KP": "ಕೊರಿಯನೠ(ಉತà³à²¤à²° ಕೋರಿಯಾ)", + "ko_KR": "ಕೊರಿಯನೠ(ದಕà³à²·à²¿à²£ ಕೋರಿಯಾ)", + "ks": "ಕಾಶà³à²®à³€à²°à²¿", + "ks_IN": "ಕಾಶà³à²®à³€à²°à²¿ (ಭಾರತ)", + "kw": "ಕಾರà³à²¨à²¿à²·à³", + "kw_GB": "ಕಾರà³à²¨à²¿à²·à³ (ಬà³à²°à²¿à²Ÿà²¨à³\/ಇಂಗà³à²²à³†à²‚ಡà³)", + "ky": "ಕಿರà³à²—ಿಜà³", + "ky_KG": "ಕಿರà³à²—ಿಜೠ(ಕಿರà³à²—ಿಸà³à²¥à²¾à²¨à³)", + "lb": "ಲಕà³à²¸à²‚ಬರà³à²—ಿಷà³", + "lb_LU": "ಲಕà³à²¸à²‚ಬರà³à²—ಿಷೠ(ಲಕà³à²¸à²‚ಬರà³à²—à³)", + "lg": "ಗಾಂಡಾ", + "lg_UG": "ಗಾಂಡಾ (ಉಗಾಂಡಾ)", + "ln": "ಲಿಂಗಾಲ", + "ln_AO": "ಲಿಂಗಾಲ (ಅಂಗೋಲಾ)", + "ln_CD": "ಲಿಂಗಾಲ (ಕಾಂಗೋ - ಕಿನà³à²¶à²¾à²¸à²¾)", + "ln_CF": "ಲಿಂಗಾಲ (ಮಧà³à²¯ ಆಫà³à²°à²¿à²•ಾ ಗಣರಾಜà³à²¯)", + "ln_CG": "ಲಿಂಗಾಲ (ಕಾಂಗೋ - ಬà³à²°à²¾à²œà²¾à²µà²¿à²²à³à²²à³‡)", + "lo": "ಲಾವೋ", + "lo_LA": "ಲಾವೋ (ಲಾವೋಸà³)", + "lt": "ಲಿಥà³à²µà³‡à²¨à²¿à²¯à²¨à³", + "lt_LT": "ಲಿಥà³à²µà³‡à²¨à²¿à²¯à²¨à³ (ಲಿಥà³à²µà³‡à²¨à²¿à²¯à²¾)", + "lu": "ಲೂಬಾ-ಕಟಾಂಗಾ", + "lu_CD": "ಲೂಬಾ-ಕಟಾಂಗಾ (ಕಾಂಗೋ - ಕಿನà³à²¶à²¾à²¸à²¾)", + "lv": "ಲಟà³à²µà²¿à²¯à²¨à³", + "lv_LV": "ಲಟà³à²µà²¿à²¯à²¨à³ (ಲಾಟà³à²µà²¿à²¯à²¾)", + "mg": "ಮಲಗಾಸಿ", + "mg_MG": "ಮಲಗಾಸಿ (ಮಡಗಾಸà³à²•ರà³)", + "mk": "ಮೆಸಿಡೋನಿಯನà³", + "mk_MK": "ಮೆಸಿಡೋನಿಯನೠ(ಮà³à²¯à²¾à²¸à²¿à²¡à³‹à²¨à²¿à²¯à²¾)", + "ml": "ಮಲಯಾಳಂ", + "ml_IN": "ಮಲಯಾಳಂ (ಭಾರತ)", + "mn": "ಮಂಗೋಲಿಯನà³", + "mn_MN": "ಮಂಗೋಲಿಯನೠ(ಮೊಂಗೋಲಿಯಾ)", + "mr": "ಮರಾಠಿ", + "mr_IN": "ಮರಾಠಿ (ಭಾರತ)", + "ms": "ಮಲಯà³", + "ms_BN": "ಮಲಯೠ(ಬà³à²°à³‚ನಿ)", + "ms_MY": "ಮಲಯೠ(ಮಲೇಶಿಯಾ)", + "ms_SG": "ಮಲಯೠ(ಸಿಂಗಾಪà³à²°à³)", + "mt": "ಮಾಲà³à²Ÿà³€à²¸à³", + "mt_MT": "ಮಾಲà³à²Ÿà³€à²¸à³ (ಮಾಲà³à²Ÿà²¾)", + "my": "ಬರà³à²®à³€à²¸à³", + "my_MM": "ಬರà³à²®à³€à²¸à³ (ಮಯನà³à²®à²¾à²°à³ (ಬರà³à²®à²¾))", + "nb": "ನಾರà³à²µà³†à²œà²¿à²¯à²¨à³ ಬೊಕà³à²®à²²à³", + "nb_NO": "ನಾರà³à²µà³†à²œà²¿à²¯à²¨à³ ಬೊಕà³à²®à²²à³ (ನಾರà³à²µà³‡)", + "nb_SJ": "ನಾರà³à²µà³†à²œà²¿à²¯à²¨à³ ಬೊಕà³à²®à²²à³ (ಸà³à²µà²¾à²²à³à²¬à²¾à²°à³à²¡à³ ಮತà³à²¤à³ ಜಾನೠಮೆಯನà³)", + "nd": "ಉತà³à²¤à²° ದೆಬೆಲೆ", + "nd_ZW": "ಉತà³à²¤à²° ದೆಬೆಲೆ (ಜಿಂಬಾಬà³à²µà³†)", + "ne": "ನೇಪಾಳಿ", + "ne_IN": "ನೇಪಾಳಿ (ಭಾರತ)", + "ne_NP": "ನೇಪಾಳಿ (ನೇಪಾಳ)", + "nl": "ಡಚà³", + "nl_AW": "ಡಚೠ(ಅರà³à²¬à²¾)", + "nl_BE": "ಡಚೠ(ಬೆಲà³à²œà²¿à²¯à²®à³)", + "nl_BQ": "ಡಚೠ(ಕೆರೀಬಿಯನೠನೆದರà³â€Œà²²à³à²¯à²¾à²‚ಡà³à²¸à³)", + "nl_CW": "ಡಚೠ(ಕà³à²°à²¾à²•ಾವà³)", + "nl_NL": "ಡಚೠ(ನೆದರà³â€Œà²²à³à²¯à²¾à²‚ಡà³à²¸à³)", + "nl_SR": "ಡಚೠ(ಸà³à²°à²¿à²¨à²¾à²®)", + "nl_SX": "ಡಚೠ(ಸಿಂಟೠಮಾರà³à²Ÿà³†à²¨à³)", + "nn": "ನಾರà³à²µà³‡à²œà²¿à²¯à²¨à³ ನೈನಾರà³à²¸à³à²•à³", + "nn_NO": "ನಾರà³à²µà³‡à²œà²¿à²¯à²¨à³ ನೈನಾರà³à²¸à³à²•à³ (ನಾರà³à²µà³‡)", + "no": "ನಾರà³à²µà³‡à²œà²¿à²¯à²¨à³", + "no_NO": "ನಾರà³à²µà³‡à²œà²¿à²¯à²¨à³ (ನಾರà³à²µà³‡)", + "om": "ಓರೊಮೋ", + "om_ET": "ಓರೊಮೋ (ಇಥಿಯೋಪಿಯಾ)", + "om_KE": "ಓರೊಮೋ (ಕೀನà³à²¯à²¾)", + "or": "ಒರಿಯಾ", + "or_IN": "ಒರಿಯಾ (ಭಾರತ)", + "os": "ಒಸà³à²¸à³†à²Ÿà²¿à²•à³", + "os_GE": "ಒಸà³à²¸à³†à²Ÿà²¿à²•à³ (ಜಾರà³à²œà²¿à²¯à²¾)", + "os_RU": "ಒಸà³à²¸à³†à²Ÿà²¿à²•à³ (ರಷà³à²¯à²¾)", + "pa": "ಪಂಜಾಬಿ", + "pa_Arab": "ಪಂಜಾಬಿ (ಅರೇಬಿಕà³)", + "pa_Arab_PK": "ಪಂಜಾಬಿ (ಅರೇಬಿಕà³, ಪಾಕಿಸà³à²¤à²¾à²¨)", + "pa_Guru": "ಪಂಜಾಬಿ (ಗà³à²°à³à²®à³à²–ಿ)", + "pa_Guru_IN": "ಪಂಜಾಬಿ (ಗà³à²°à³à²®à³à²–ಿ, ಭಾರತ)", + "pa_IN": "ಪಂಜಾಬಿ (ಭಾರತ)", + "pa_PK": "ಪಂಜಾಬಿ (ಪಾಕಿಸà³à²¤à²¾à²¨)", + "pl": "ಪಾಲಿಷà³", + "pl_PL": "ಪಾಲಿಷೠ(ಪೋಲà³à²¯à²¾à²‚ಡà³)", + "ps": "ಪಾಷà³à²Ÿà³‹", + "ps_AF": "ಪಾಷà³à²Ÿà³‹ (ಅಫಘಾನಿಸà³à²¥à²¾à²¨à³)", + "pt": "ಪೋರà³à²šà³à²—ೀಸà³", + "pt_AO": "ಪೋರà³à²šà³à²—ೀಸೠ(ಅಂಗೋಲಾ)", + "pt_BR": "ಪೋರà³à²šà³à²—ೀಸೠ(ಬà³à²°à³†à²œà²¿à²²à³)", + "pt_CH": "ಪೋರà³à²šà³à²—ೀಸೠ(ಸà³à²µà²¿à²Ÿà³à²œà²°à³à²²à³à²¯à²¾à²‚ಡà³)", + "pt_CV": "ಪೋರà³à²šà³à²—ೀಸೠ(ಕೇಪೠವರà³à²¡à³†)", + "pt_GQ": "ಪೋರà³à²šà³à²—ೀಸೠ(ಈಕà³à²µà³†à²Ÿà³‹à²°à²¿à²¯à²²à³ ಗಿನಿ)", + "pt_GW": "ಪೋರà³à²šà³à²—ೀಸೠ(ಗಿನಿ-ಬಿಸà³à²¸à²¾à²µà³)", + "pt_LU": "ಪೋರà³à²šà³à²—ೀಸೠ(ಲಕà³à²¸à²‚ಬರà³à²—à³)", + "pt_MO": "ಪೋರà³à²šà³à²—ೀಸೠ(ಮಖಾವೠ(SAR) ಚೈನಾ)", + "pt_MZ": "ಪೋರà³à²šà³à²—ೀಸೠ(ಮೊಜಾಂಬಿಕà³)", + "pt_PT": "ಪೋರà³à²šà³à²—ೀಸೠ(ಪೋರà³à²šà³à²—ಲà³)", + "pt_ST": "ಪೋರà³à²šà³à²—ೀಸೠ(ಸಾವೋ ಟೋಮೠಮತà³à²¤à³ ಪà³à²°à²¿à²¨à³à²¸à²¿à²ªà²¿)", + "pt_TL": "ಪೋರà³à²šà³à²—ೀಸೠ(ಪೂರà³à²µ ತಿಮೋರà³)", + "qu": "ಕà³à²µà³†à²šà³à²µà²¾", + "qu_BO": "ಕà³à²µà³†à²šà³à²µà²¾ (ಬೊಲಿವಿಯಾ)", + "qu_EC": "ಕà³à²µà³†à²šà³à²µà²¾ (ಈಕà³à²µà³†à²¡à²¾à²°à³)", + "qu_PE": "ಕà³à²µà³†à²šà³à²µà²¾ (ಪೆರà³)", + "rm": "ರೊಮಾನà³à²·à³", + "rm_CH": "ರೊಮಾನà³à²·à³ (ಸà³à²µà²¿à²Ÿà³à²œà²°à³à²²à³à²¯à²¾à²‚ಡà³)", + "rn": "ರà³à²‚ಡಿ", + "rn_BI": "ರà³à²‚ಡಿ (ಬà³à²°à³à²‚ಡಿ)", + "ro": "ರೊಮೇನಿಯನà³", + "ro_MD": "ರೊಮೇನಿಯನೠ(ಮೊಲà³à²¡à³‹à²µà²¾)", + "ro_RO": "ರೊಮೇನಿಯನೠ(ರೊಮೇನಿಯಾ)", + "ru": "ರಷà³à²¯à²¨à³", + "ru_BY": "ರಷà³à²¯à²¨à³ (ಬೆಲಾರಸà³)", + "ru_KG": "ರಷà³à²¯à²¨à³ (ಕಿರà³à²—ಿಸà³à²¥à²¾à²¨à³)", + "ru_KZ": "ರಷà³à²¯à²¨à³ (ಕà²à²¾à²•ಿಸà³à²¥à²¾à²¨à³)", + "ru_MD": "ರಷà³à²¯à²¨à³ (ಮೊಲà³à²¡à³‹à²µà²¾)", + "ru_RU": "ರಷà³à²¯à²¨à³ (ರಷà³à²¯à²¾)", + "ru_UA": "ರಷà³à²¯à²¨à³ (ಉಕà³à²°à³ˆà²¨à³)", + "rw": "ಕೀನà³à²¯à²¾à²°à³à²µà²¾à²‚ಡಾ", + "rw_RW": "ಕೀನà³à²¯à²¾à²°à³à²µà²¾à²‚ಡಾ (ರà³à²µà²¾à²‚ಡಾ)", + "se": "ಉತà³à²¤à²° ಸಾಮಿ", + "se_FI": "ಉತà³à²¤à²° ಸಾಮಿ (ಫಿನà³â€Œà²²à³à²¯à²¾à²‚ಡà³)", + "se_NO": "ಉತà³à²¤à²° ಸಾಮಿ (ನಾರà³à²µà³‡)", + "se_SE": "ಉತà³à²¤à²° ಸಾಮಿ (ಸà³à²µà³€à²¡à²¨à³)", + "sg": "ಸಾಂಗೋ", + "sg_CF": "ಸಾಂಗೋ (ಮಧà³à²¯ ಆಫà³à²°à²¿à²•ಾ ಗಣರಾಜà³à²¯)", + "sh": "ಸರà³à²¬à³‹-ಕà³à²°à³Šà²¯à³‡à²¶à²¿à²¯à²¨à³", + "sh_BA": "ಸರà³à²¬à³‹-ಕà³à²°à³Šà²¯à³‡à²¶à²¿à²¯à²¨à³ (ಬೋಸà³à²¨à²¿à²¯à²¾ ಮತà³à²¤à³ ಹರà³à²œà³†à²—ೋವಿನಾ)", + "si": "ಸಿಂಹಳ", + "si_LK": "ಸಿಂಹಳ (ಶà³à²°à³€à²²à²‚ಕಾ)", + "sk": "ಸà³à²²à³‹à²µà²¾à²•à³", + "sk_SK": "ಸà³à²²à³‹à²µà²¾à²•à³ (ಸà³à²²à³‹à²µà²¾à²•ಿಯಾ)", + "sl": "ಸà³à²²à³‹à²µà³‡à²¨à²¿à²¯à²¨à³", + "sl_SI": "ಸà³à²²à³‹à²µà³‡à²¨à²¿à²¯à²¨à³ (ಸà³à²²à³‹à²µà³‡à²¨à²¿à²¯à²¾)", + "sn": "ಶೋನಾ", + "sn_ZW": "ಶೋನಾ (ಜಿಂಬಾಬà³à²µà³†)", + "so": "ಸೊಮಾಲಿ", + "so_DJ": "ಸೊಮಾಲಿ (ಜಿಬೋಟಿ)", + "so_ET": "ಸೊಮಾಲಿ (ಇಥಿಯೋಪಿಯಾ)", + "so_KE": "ಸೊಮಾಲಿ (ಕೀನà³à²¯à²¾)", + "so_SO": "ಸೊಮಾಲಿ (ಸೊಮಾಲಿಯಾ)", + "sq": "ಅಲà³à²¬à³‡à²¨à²¿à²¯à²¨à³", + "sq_AL": "ಅಲà³à²¬à³‡à²¨à²¿à²¯à²¨à³ (ಅಲà³à²¬à³‡à²¨à²¿à²¯à²¾)", + "sq_MK": "ಅಲà³à²¬à³‡à²¨à²¿à²¯à²¨à³ (ಮà³à²¯à²¾à²¸à²¿à²¡à³‹à²¨à²¿à²¯à²¾)", + "sq_XK": "ಅಲà³à²¬à³‡à²¨à²¿à²¯à²¨à³ (ಕೊಸೊವೊ)", + "sr": "ಸರà³à²¬à²¿à²¯à²¨à³", + "sr_BA": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಬೋಸà³à²¨à²¿à²¯à²¾ ಮತà³à²¤à³ ಹರà³à²œà³†à²—ೋವಿನಾ)", + "sr_Cyrl": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಸಿರಿಲಿಕà³)", + "sr_Cyrl_BA": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಸಿರಿಲಿಕà³, ಬೋಸà³à²¨à²¿à²¯à²¾ ಮತà³à²¤à³ ಹರà³à²œà³†à²—ೋವಿನಾ)", + "sr_Cyrl_ME": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಸಿರಿಲಿಕà³, ಮೊಂಟೆನೆಗà³à²°à³‹)", + "sr_Cyrl_RS": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಸಿರಿಲಿಕà³, ಸೆರà³à²¬à²¿à²¯à²¾)", + "sr_Cyrl_XK": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಸಿರಿಲಿಕà³, ಕೊಸೊವೊ)", + "sr_Latn": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಲà³à²¯à²¾à²Ÿà²¿à²¨à³)", + "sr_Latn_BA": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಲà³à²¯à²¾à²Ÿà²¿à²¨à³, ಬೋಸà³à²¨à²¿à²¯à²¾ ಮತà³à²¤à³ ಹರà³à²œà³†à²—ೋವಿನಾ)", + "sr_Latn_ME": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಲà³à²¯à²¾à²Ÿà²¿à²¨à³, ಮೊಂಟೆನೆಗà³à²°à³‹)", + "sr_Latn_RS": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಲà³à²¯à²¾à²Ÿà²¿à²¨à³, ಸೆರà³à²¬à²¿à²¯à²¾)", + "sr_Latn_XK": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಲà³à²¯à²¾à²Ÿà²¿à²¨à³, ಕೊಸೊವೊ)", + "sr_ME": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಮೊಂಟೆನೆಗà³à²°à³‹)", + "sr_RS": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಸೆರà³à²¬à²¿à²¯à²¾)", + "sr_XK": "ಸರà³à²¬à²¿à²¯à²¨à³ (ಕೊಸೊವೊ)", + "sv": "ಸà³à²µà³€à²¡à²¿à²·à³", + "sv_AX": "ಸà³à²µà³€à²¡à²¿à²·à³ (ಆಲà³à²¯à²¾à²‚ಡೠದà³à²µà³€à²ªà²—ಳà³)", + "sv_FI": "ಸà³à²µà³€à²¡à²¿à²·à³ (ಫಿನà³â€Œà²²à³à²¯à²¾à²‚ಡà³)", + "sv_SE": "ಸà³à²µà³€à²¡à²¿à²·à³ (ಸà³à²µà³€à²¡à²¨à³)", + "sw": "ಸà³à²µà²¹à²¿à²²à²¿", + "sw_CD": "ಸà³à²µà²¹à²¿à²²à²¿ (ಕಾಂಗೋ - ಕಿನà³à²¶à²¾à²¸à²¾)", + "sw_KE": "ಸà³à²µà²¹à²¿à²²à²¿ (ಕೀನà³à²¯à²¾)", + "sw_TZ": "ಸà³à²µà²¹à²¿à²²à²¿ (ತಾಂಜೇನಿಯಾ)", + "sw_UG": "ಸà³à²µà²¹à²¿à²²à²¿ (ಉಗಾಂಡಾ)", + "ta": "ತಮಿಳà³", + "ta_IN": "ತಮಿಳೠ(ಭಾರತ)", + "ta_LK": "ತಮಿಳೠ(ಶà³à²°à³€à²²à²‚ಕಾ)", + "ta_MY": "ತಮಿಳೠ(ಮಲೇಶಿಯಾ)", + "ta_SG": "ತಮಿಳೠ(ಸಿಂಗಾಪà³à²°à³)", + "te": "ತೆಲà³à²—à³", + "te_IN": "ತೆಲà³à²—à³ (ಭಾರತ)", + "th": "ಥಾಯà³", + "th_TH": "ಥಾಯೠ(ಥೈಲà³à²¯à²¾à²‚ಡà³)", + "ti": "ಟಿಗà³à²°à²¿à²¨à³à²¯à²¾", + "ti_ER": "ಟಿಗà³à²°à²¿à²¨à³à²¯à²¾ (à²à²°à²¿à²Ÿà³à²°à²¿à²¯à²¾)", + "ti_ET": "ಟಿಗà³à²°à²¿à²¨à³à²¯à²¾ (ಇಥಿಯೋಪಿಯಾ)", + "tl": "ಟà³à²¯à²¾à²—ಲೋಗà³", + "tl_PH": "ಟà³à²¯à²¾à²—ಲೋಗೠ(ಫಿಲಿಫೈನà³à²¸à³)", + "to": "ಟೋಂಗನà³", + "to_TO": "ಟೋಂಗನೠ(ಟೊಂಗ)", + "tr": "ಟರà³à²•ಿಶà³", + "tr_CY": "ಟರà³à²•ಿಶೠ(ಸೈಪà³à²°à²¸à³)", + "tr_TR": "ಟರà³à²•ಿಶೠ(ಟರà³à²•ಿ)", + "ug": "ಉಯಿಘರà³", + "ug_CN": "ಉಯಿಘರೠ(ಚೀನಾ)", + "uk": "ಉಕà³à²°à³ˆà²¨à²¿à²¯à²¨à³", + "uk_UA": "ಉಕà³à²°à³ˆà²¨à²¿à²¯à²¨à³ (ಉಕà³à²°à³ˆà²¨à³)", + "ur": "ಉರà³à²¦à³", + "ur_IN": "ಉರà³à²¦à³ (ಭಾರತ)", + "ur_PK": "ಉರà³à²¦à³ (ಪಾಕಿಸà³à²¤à²¾à²¨)", + "uz": "ಉಜà³à²¬à³‡à²•à³", + "uz_AF": "ಉಜà³à²¬à³‡à²•à³ (ಅಫಘಾನಿಸà³à²¥à²¾à²¨à³)", + "uz_Arab": "ಉಜà³à²¬à³‡à²•à³ (ಅರೇಬಿಕà³)", + "uz_Arab_AF": "ಉಜà³à²¬à³‡à²•à³ (ಅರೇಬಿಕà³, ಅಫಘಾನಿಸà³à²¥à²¾à²¨à³)", + "uz_Cyrl": "ಉಜà³à²¬à³‡à²•à³ (ಸಿರಿಲಿಕà³)", + "uz_Cyrl_UZ": "ಉಜà³à²¬à³‡à²•à³ (ಸಿರಿಲಿಕà³, ಉಜà³à²¬à³‡à²•ಿಸà³à²¥à²¾à²¨à³)", + "uz_Latn": "ಉಜà³à²¬à³‡à²•à³ (ಲà³à²¯à²¾à²Ÿà²¿à²¨à³)", + "uz_Latn_UZ": "ಉಜà³à²¬à³‡à²•à³ (ಲà³à²¯à²¾à²Ÿà²¿à²¨à³, ಉಜà³à²¬à³‡à²•ಿಸà³à²¥à²¾à²¨à³)", + "uz_UZ": "ಉಜà³à²¬à³‡à²•à³ (ಉಜà³à²¬à³‡à²•ಿಸà³à²¥à²¾à²¨à³)", + "vi": "ವಿಯೇಟà³à²¨à²¾à²®à³€à²¸à³", + "vi_VN": "ವಿಯೇಟà³à²¨à²¾à²®à³€à²¸à³ (ವಿಯೇಟà³à²¨à²¾à²®à³)", + "yi": "ಯಿಡà³à²¡à²¿à²¶à³", + "yo": "ಯೊರà³à²¬à²¾", + "yo_BJ": "ಯೊರà³à²¬à²¾ (ಬೆನಿನà³)", + "yo_NG": "ಯೊರà³à²¬à²¾ (ನೈಜೀರಿಯಾ)", + "zh": "ಚೈನೀಸà³", + "zh_CN": "ಚೈನೀಸೠ(ಚೀನಾ)", + "zh_HK": "ಚೈನೀಸೠ(ಹಾಂಗೠಕಾಂಗೠSAR ಚೈನಾ)", + "zh_Hans": "ಚೈನೀಸೠ(ಸರಳೀಕೃತ)", + "zh_Hans_CN": "ಚೈನೀಸೠ(ಸರಳೀಕೃತ, ಚೀನಾ)", + "zh_Hans_HK": "ಚೈನೀಸೠ(ಸರಳೀಕೃತ, ಹಾಂಗೠಕಾಂಗೠSAR ಚೈನಾ)", + "zh_Hans_MO": "ಚೈನೀಸೠ(ಸರಳೀಕೃತ, ಮಖಾವೠ(SAR) ಚೈನಾ)", + "zh_Hans_SG": "ಚೈನೀಸೠ(ಸರಳೀಕೃತ, ಸಿಂಗಾಪà³à²°à³)", + "zh_Hant": "ಚೈನೀಸೠ(ಸಾಂಪà³à²°à²¦à²¾à²¯à²¿à²•)", + "zh_Hant_HK": "ಚೈನೀಸೠ(ಸಾಂಪà³à²°à²¦à²¾à²¯à²¿à²•, ಹಾಂಗೠಕಾಂಗೠSAR ಚೈನಾ)", + "zh_Hant_MO": "ಚೈನೀಸೠ(ಸಾಂಪà³à²°à²¦à²¾à²¯à²¿à²•, ಮಖಾವೠ(SAR) ಚೈನಾ)", + "zh_Hant_TW": "ಚೈನೀಸೠ(ಸಾಂಪà³à²°à²¦à²¾à²¯à²¿à²•, ಥೈವಾನà³)", + "zh_MO": "ಚೈನೀಸೠ(ಮಖಾವೠ(SAR) ಚೈನಾ)", + "zh_SG": "ಚೈನೀಸೠ(ಸಿಂಗಾಪà³à²°à³)", + "zh_TW": "ಚೈನೀಸೠ(ಥೈವಾನà³)", + "zu": "ಜà³à²²à³", + "zu_ZA": "ಜà³à²²à³ (ದಕà³à²·à²¿à²£ ಆಫà³à²°à²¿à²•ಾ)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ko.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ko.json new file mode 100644 index 0000000000000000000000000000000000000000..ea526c0488a6109f44210b9e8a733395640d0934 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ko.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "아프리칸스어", + "af_NA": "아프리칸스어 (나미비아)", + "af_ZA": "아프리칸스어 (남아프리카)", + "ak": "아칸어", + "ak_GH": "아칸어 (가나)", + "am": "암하ë¼ì–´", + "am_ET": "암하ë¼ì–´ (ì—티오피아)", + "ar": "ì•„ëžì–´", + "ar_AE": "ì•„ëžì–´ (ì•„ëžì—미리트)", + "ar_BH": "ì•„ëžì–´ (바레ì¸)", + "ar_DJ": "ì•„ëžì–´ (지부티)", + "ar_DZ": "ì•„ëžì–´ (알제리)", + "ar_EG": "ì•„ëžì–´ (ì´ì§‘트)", + "ar_EH": "ì•„ëžì–´ (서사하ë¼)", + "ar_ER": "ì•„ëžì–´ (ì—리트리아)", + "ar_IL": "ì•„ëžì–´ (ì´ìФë¼ì—˜)", + "ar_IQ": "ì•„ëžì–´ (ì´ë¼í¬)", + "ar_JO": "ì•„ëžì–´ (요르단)", + "ar_KM": "ì•„ëžì–´ (코모로)", + "ar_KW": "ì•„ëžì–´ (쿠웨ì´íЏ)", + "ar_LB": "ì•„ëžì–´ (레바논)", + "ar_LY": "ì•„ëžì–´ (리비아)", + "ar_MA": "ì•„ëžì–´ (모로코)", + "ar_MR": "ì•„ëžì–´ (모리타니)", + "ar_OM": "ì•„ëžì–´ (오만)", + "ar_PS": "ì•„ëžì–´ (íŒ”ë ˆìŠ¤íƒ€ì¸ ì§€êµ¬)", + "ar_QA": "ì•„ëžì–´ (카타르)", + "ar_SA": "ì•„ëžì–´ (사우디아ë¼ë¹„ì•„)", + "ar_SD": "ì•„ëžì–´ (수단)", + "ar_SO": "ì•„ëžì–´ (소ë§ë¦¬ì•„)", + "ar_SS": "ì•„ëžì–´ (남수단)", + "ar_SY": "ì•„ëžì–´ (시리아)", + "ar_TD": "ì•„ëžì–´ (차드)", + "ar_TN": "ì•„ëžì–´ (튀니지)", + "ar_YE": "ì•„ëžì–´ (예멘)", + "as": "아삼어", + "as_IN": "아삼어 (ì¸ë„)", + "az": "아제르바ì´ìž”ì–´", + "az_AZ": "아제르바ì´ìž”ì–´ (아제르바ì´ìž”)", + "az_Cyrl": "아제르바ì´ìž”ì–´ (키릴 문ìž)", + "az_Cyrl_AZ": "아제르바ì´ìž”ì–´ (키릴 문ìž, 아제르바ì´ìž”)", + "az_Latn": "아제르바ì´ìž”ì–´ (로마ìž)", + "az_Latn_AZ": "아제르바ì´ìž”ì–´ (로마ìž, 아제르바ì´ìž”)", + "be": "벨ë¼ë£¨ìŠ¤ì–´", + "be_BY": "벨ë¼ë£¨ìŠ¤ì–´ (벨ë¼ë£¨ìФ)", + "bg": "불가리아어", + "bg_BG": "불가리아어 (불가리아)", + "bm": "밤바ë¼ì–´", + "bm_ML": "밤바ë¼ì–´ (ë§ë¦¬)", + "bn": "벵골어", + "bn_BD": "벵골어 (방글ë¼ë°ì‹œ)", + "bn_IN": "벵골어 (ì¸ë„)", + "bo": "티베트어", + "bo_CN": "티베트어 (중국)", + "bo_IN": "티베트어 (ì¸ë„)", + "br": "브르타뉴어", + "br_FR": "브르타뉴어 (프랑스)", + "bs": "보스니아어", + "bs_BA": "보스니아어 (보스니아 헤르체고비나)", + "bs_Cyrl": "보스니아어 (키릴 문ìž)", + "bs_Cyrl_BA": "보스니아어 (키릴 문ìž, 보스니아 헤르체고비나)", + "bs_Latn": "보스니아어 (로마ìž)", + "bs_Latn_BA": "보스니아어 (로마ìž, 보스니아 헤르체고비나)", + "ca": "카탈로니아어", + "ca_AD": "카탈로니아어 (안ë„ë¼)", + "ca_ES": "카탈로니아어 (스페ì¸)", + "ca_FR": "카탈로니아어 (프랑스)", + "ca_IT": "카탈로니아어 (ì´íƒˆë¦¬ì•„)", + "ce": "체첸어", + "ce_RU": "체첸어 (러시아)", + "cs": "체코어", + "cs_CZ": "체코어 (ì²´ì½”)", + "cy": "웨ì¼ìŠ¤ì–´", + "cy_GB": "웨ì¼ìŠ¤ì–´ (ì˜êµ­)", + "da": "ë´ë§ˆí¬ì–´", + "da_DK": "ë´ë§ˆí¬ì–´ (ë´ë§ˆí¬)", + "da_GL": "ë´ë§ˆí¬ì–´ (그린란드)", + "de": "ë…ì¼ì–´", + "de_AT": "ë…ì¼ì–´ (오스트리아)", + "de_BE": "ë…ì¼ì–´ (벨기ì—)", + "de_CH": "ë…ì¼ì–´ (스위스)", + "de_DE": "ë…ì¼ì–´ (ë…ì¼)", + "de_IT": "ë…ì¼ì–´ (ì´íƒˆë¦¬ì•„)", + "de_LI": "ë…ì¼ì–´ (리히í…슈타ì¸)", + "de_LU": "ë…ì¼ì–´ (룩셈부르í¬)", + "dz": "종카어", + "dz_BT": "종카어 (부탄)", + "ee": "ì—웨어", + "ee_GH": "ì—웨어 (가나)", + "ee_TG": "ì—웨어 (토고)", + "el": "그리스어", + "el_CY": "그리스어 (키프로스)", + "el_GR": "그리스어 (그리스)", + "en": "ì˜ì–´", + "en_AG": "ì˜ì–´ (앤티가 바부다)", + "en_AI": "ì˜ì–´ (앵귈ë¼)", + "en_AS": "ì˜ì–´ (아메리칸 사모아)", + "en_AT": "ì˜ì–´ (오스트리아)", + "en_AU": "ì˜ì–´ (오스트레ì¼ë¦¬ì•„)", + "en_BB": "ì˜ì–´ (바베ì´ë„스)", + "en_BE": "ì˜ì–´ (벨기ì—)", + "en_BI": "ì˜ì–´ (부룬디)", + "en_BM": "ì˜ì–´ (버뮤다)", + "en_BS": "ì˜ì–´ (바하마)", + "en_BW": "ì˜ì–´ (보츠와나)", + "en_BZ": "ì˜ì–´ (벨리즈)", + "en_CA": "ì˜ì–´ (ìºë‚˜ë‹¤)", + "en_CC": "ì˜ì–´ (코코스 ì œë„)", + "en_CH": "ì˜ì–´ (스위스)", + "en_CK": "ì˜ì–´ (ì¿¡ ì œë„)", + "en_CM": "ì˜ì–´ (카메룬)", + "en_CX": "ì˜ì–´ (í¬ë¦¬ìŠ¤ë§ˆìŠ¤ì„¬)", + "en_CY": "ì˜ì–´ (키프로스)", + "en_DE": "ì˜ì–´ (ë…ì¼)", + "en_DG": "ì˜ì–´ (ë””ì—ê³  가르시아)", + "en_DK": "ì˜ì–´ (ë´ë§ˆí¬)", + "en_DM": "ì˜ì–´ (ë„미니카)", + "en_ER": "ì˜ì–´ (ì—리트리아)", + "en_FI": "ì˜ì–´ (핀란드)", + "en_FJ": "ì˜ì–´ (피지)", + "en_FK": "ì˜ì–´ (í¬í´ëžœë“œ ì œë„)", + "en_FM": "ì˜ì–´ (미í¬ë¡œë„¤ì‹œì•„)", + "en_GB": "ì˜ì–´ (ì˜êµ­)", + "en_GD": "ì˜ì–´ (그레나다)", + "en_GG": "ì˜ì–´ (ê±´ì§€)", + "en_GH": "ì˜ì–´ (가나)", + "en_GI": "ì˜ì–´ (지브롤터)", + "en_GM": "ì˜ì–´ (ê°ë¹„ì•„)", + "en_GU": "ì˜ì–´ (ê´Œ)", + "en_GY": "ì˜ì–´ (ê°€ì´ì•„나)", + "en_HK": "ì˜ì–´ (í™ì½©(중국 특별행정구))", + "en_IE": "ì˜ì–´ (ì•„ì¼ëžœë“œ)", + "en_IL": "ì˜ì–´ (ì´ìФë¼ì—˜)", + "en_IM": "ì˜ì–´ (맨 섬)", + "en_IN": "ì˜ì–´ (ì¸ë„)", + "en_IO": "ì˜ì–´ (ì˜êµ­ë ¹ ì¸ë„ì–‘ ì‹ë¯¼ì§€)", + "en_JE": "ì˜ì–´ (저지)", + "en_JM": "ì˜ì–´ (ìžë©”ì´ì¹´)", + "en_KE": "ì˜ì–´ (ì¼€ëƒ)", + "en_KI": "ì˜ì–´ (키리바시)", + "en_KN": "ì˜ì–´ (세ì¸íŠ¸í‚¤ì¸  네비스)", + "en_KY": "ì˜ì–´ (ì¼€ì´ë§¨ ì œë„)", + "en_LC": "ì˜ì–´ (세ì¸íŠ¸ë£¨ì‹œì•„)", + "en_LR": "ì˜ì–´ (ë¼ì´ë² ë¦¬ì•„)", + "en_LS": "ì˜ì–´ (레소토)", + "en_MG": "ì˜ì–´ (마다가스카르)", + "en_MH": "ì˜ì–´ (마셜 ì œë„)", + "en_MO": "ì˜ì–´ (마카오(중국 특별행정구))", + "en_MP": "ì˜ì–´ (ë¶ë§ˆë¦¬ì•„나제ë„)", + "en_MS": "ì˜ì–´ (몬트세ë¼íЏ)", + "en_MT": "ì˜ì–´ (몰타)", + "en_MU": "ì˜ì–´ (모리셔스)", + "en_MW": "ì˜ì–´ (ë§ë¼ìœ„)", + "en_MY": "ì˜ì–´ (ë§ë ˆì´ì‹œì•„)", + "en_NA": "ì˜ì–´ (나미비아)", + "en_NF": "ì˜ì–´ (ë…¸í½ì„¬)", + "en_NG": "ì˜ì–´ (나ì´ì§€ë¦¬ì•„)", + "en_NL": "ì˜ì–´ (네ëœëž€ë“œ)", + "en_NR": "ì˜ì–´ (나우루)", + "en_NU": "ì˜ì–´ (니우ì—)", + "en_NZ": "ì˜ì–´ (뉴질랜드)", + "en_PG": "ì˜ì–´ (파푸아뉴기니)", + "en_PH": "ì˜ì–´ (필리핀)", + "en_PK": "ì˜ì–´ (파키스탄)", + "en_PN": "ì˜ì–´ (í•케언 섬)", + "en_PR": "ì˜ì–´ (푸ì—르토리코)", + "en_PW": "ì˜ì–´ (팔ë¼ìš°)", + "en_RW": "ì˜ì–´ (르완다)", + "en_SB": "ì˜ì–´ (솔로몬 ì œë„)", + "en_SC": "ì˜ì–´ (세ì´ì…¸)", + "en_SD": "ì˜ì–´ (수단)", + "en_SE": "ì˜ì–´ (스웨ë´)", + "en_SG": "ì˜ì–´ (싱가í¬ë¥´)", + "en_SH": "ì˜ì–´ (세ì¸íŠ¸í—¬ë ˆë‚˜)", + "en_SI": "ì˜ì–´ (슬로베니아)", + "en_SL": "ì˜ì–´ (시ì—ë¼ë¦¬ì˜¨)", + "en_SS": "ì˜ì–´ (남수단)", + "en_SX": "ì˜ì–´ (신트마르턴)", + "en_SZ": "ì˜ì–´ (스와질란드)", + "en_TC": "ì˜ì–´ (í„°í¬ìФ ì¼€ì´ì»¤ìФ ì œë„)", + "en_TK": "ì˜ì–´ (토켈ë¼ìš°)", + "en_TO": "ì˜ì–´ (통가)", + "en_TT": "ì˜ì–´ (트리니다드 토바고)", + "en_TV": "ì˜ì–´ (투발루)", + "en_TZ": "ì˜ì–´ (탄ìžë‹ˆì•„)", + "en_UG": "ì˜ì–´ (우간다)", + "en_UM": "ì˜ì–´ (미국령 해외 ì œë„)", + "en_US": "ì˜ì–´ (미국)", + "en_VC": "ì˜ì–´ (세ì¸íŠ¸ë¹ˆì„¼íŠ¸ê·¸ë ˆë‚˜ë”˜)", + "en_VG": "ì˜ì–´ (ì˜êµ­ë ¹ 버진아ì¼ëžœë“œ)", + "en_VI": "ì˜ì–´ (미국령 버진아ì¼ëžœë“œ)", + "en_VU": "ì˜ì–´ (바누아투)", + "en_WS": "ì˜ì–´ (사모아)", + "en_ZA": "ì˜ì–´ (남아프리카)", + "en_ZM": "ì˜ì–´ (잠비아)", + "en_ZW": "ì˜ì–´ (ì§ë°”브웨)", + "eo": "ì—스페란토어", + "es": "스페ì¸ì–´", + "es_AR": "스페ì¸ì–´ (아르헨티나)", + "es_BO": "스페ì¸ì–´ (볼리비아)", + "es_BR": "스페ì¸ì–´ (브ë¼ì§ˆ)", + "es_CL": "스페ì¸ì–´ (ì¹ ë ˆ)", + "es_CO": "스페ì¸ì–´ (콜롬비아)", + "es_CR": "스페ì¸ì–´ (코스타리카)", + "es_CU": "스페ì¸ì–´ (ì¿ ë°”)", + "es_DO": "스페ì¸ì–´ (ë„미니카 공화국)", + "es_EA": "스페ì¸ì–´ (세우타 ë° ë©œë¦¬ì•¼)", + "es_EC": "스페ì¸ì–´ (ì—ì½°ë„르)", + "es_ES": "스페ì¸ì–´ (스페ì¸)", + "es_GQ": "스페ì¸ì–´ (ì ë„ 기니)", + "es_GT": "스페ì¸ì–´ (과테ë§ë¼)", + "es_HN": "스페ì¸ì–´ (온ë‘ë¼ìФ)", + "es_IC": "스페ì¸ì–´ (카나리아 ì œë„)", + "es_MX": "스페ì¸ì–´ (멕시코)", + "es_NI": "스페ì¸ì–´ (니카ë¼ê³¼)", + "es_PA": "스페ì¸ì–´ (파나마)", + "es_PE": "스페ì¸ì–´ (페루)", + "es_PH": "스페ì¸ì–´ (필리핀)", + "es_PR": "스페ì¸ì–´ (푸ì—르토리코)", + "es_PY": "스페ì¸ì–´ (파ë¼ê³¼ì´)", + "es_SV": "스페ì¸ì–´ (엘살바ë„르)", + "es_US": "스페ì¸ì–´ (미국)", + "es_UY": "스페ì¸ì–´ (우루과ì´)", + "es_VE": "스페ì¸ì–´ (베네수엘ë¼)", + "et": "ì—스토니아어", + "et_EE": "ì—스토니아어 (ì—스토니아)", + "eu": "바스í¬ì–´", + "eu_ES": "바스í¬ì–´ (스페ì¸)", + "fa": "페르시아어", + "fa_AF": "페르시아어 (아프가니스탄)", + "fa_IR": "페르시아어 (ì´ëž€)", + "ff": "í’€ë¼ì–´", + "ff_CM": "í’€ë¼ì–´ (카메룬)", + "ff_GN": "í’€ë¼ì–´ (기니)", + "ff_MR": "í’€ë¼ì–´ (모리타니)", + "ff_SN": "í’€ë¼ì–´ (세네갈)", + "fi": "핀란드어", + "fi_FI": "핀란드어 (핀란드)", + "fo": "페로어", + "fo_DK": "페로어 (ë´ë§ˆí¬)", + "fo_FO": "페로어 (페로 ì œë„)", + "fr": "프랑스어", + "fr_BE": "프랑스어 (벨기ì—)", + "fr_BF": "프랑스어 (부르키나파소)", + "fr_BI": "프랑스어 (부룬디)", + "fr_BJ": "프랑스어 (베냉)", + "fr_BL": "프랑스어 (ìƒë°”르텔레미)", + "fr_CA": "프랑스어 (ìºë‚˜ë‹¤)", + "fr_CD": "프랑스어 (콩고-킨샤사)", + "fr_CF": "프랑스어 (중앙 아프리카 공화국)", + "fr_CG": "프랑스어 (콩고-브ë¼ìžë¹Œ)", + "fr_CH": "프랑스어 (스위스)", + "fr_CI": "프랑스어 (코트디부아르)", + "fr_CM": "프랑스어 (카메룬)", + "fr_DJ": "프랑스어 (지부티)", + "fr_DZ": "프랑스어 (알제리)", + "fr_FR": "프랑스어 (프랑스)", + "fr_GA": "프랑스어 (가봉)", + "fr_GF": "프랑스어 (프랑스령 기아나)", + "fr_GN": "프랑스어 (기니)", + "fr_GP": "프랑스어 (과들루프)", + "fr_GQ": "프랑스어 (ì ë„ 기니)", + "fr_HT": "프랑스어 (ì•„ì´í‹°)", + "fr_KM": "프랑스어 (코모로)", + "fr_LU": "프랑스어 (룩셈부르í¬)", + "fr_MA": "프랑스어 (모로코)", + "fr_MC": "프랑스어 (모나코)", + "fr_MF": "프랑스어 (ìƒë§ˆë¥´íƒ±)", + "fr_MG": "프랑스어 (마다가스카르)", + "fr_ML": "프랑스어 (ë§ë¦¬)", + "fr_MQ": "프랑스어 (마르티니í¬)", + "fr_MR": "프랑스어 (모리타니)", + "fr_MU": "프랑스어 (모리셔스)", + "fr_NC": "프랑스어 (뉴칼레ë„니아)", + "fr_NE": "프랑스어 (니제르)", + "fr_PF": "프랑스어 (프랑스령 í´ë¦¬ë„¤ì‹œì•„)", + "fr_PM": "프랑스어 (ìƒí”¼ì—르 미í´ë¡±)", + "fr_RE": "프랑스어 (리유니온)", + "fr_RW": "프랑스어 (르완다)", + "fr_SC": "프랑스어 (세ì´ì…¸)", + "fr_SN": "프랑스어 (세네갈)", + "fr_SY": "프랑스어 (시리아)", + "fr_TD": "프랑스어 (차드)", + "fr_TG": "프랑스어 (토고)", + "fr_TN": "프랑스어 (튀니지)", + "fr_VU": "프랑스어 (바누아투)", + "fr_WF": "프랑스어 (왈리스-푸투나 ì œë„)", + "fr_YT": "프랑스어 (마요트)", + "fy": "서부 프리지아어", + "fy_NL": "서부 프리지아어 (네ëœëž€ë“œ)", + "ga": "ì•„ì¼ëžœë“œì–´", + "ga_IE": "ì•„ì¼ëžœë“œì–´ (ì•„ì¼ëžœë“œ)", + "gd": "스코틀랜드 게ì¼ì–´", + "gd_GB": "스코틀랜드 게ì¼ì–´ (ì˜êµ­)", + "gl": "갈리시아어", + "gl_ES": "갈리시아어 (스페ì¸)", + "gu": "구ìžë¼íŠ¸ì–´", + "gu_IN": "구ìžë¼íŠ¸ì–´ (ì¸ë„)", + "gv": "ë§¹í¬ìŠ¤ì–´", + "gv_IM": "ë§¹í¬ìŠ¤ì–´ (맨 섬)", + "ha": "하우사어", + "ha_GH": "하우사어 (가나)", + "ha_NE": "하우사어 (니제르)", + "ha_NG": "하우사어 (나ì´ì§€ë¦¬ì•„)", + "he": "히브리어", + "he_IL": "히브리어 (ì´ìФë¼ì—˜)", + "hi": "힌디어", + "hi_IN": "힌디어 (ì¸ë„)", + "hr": "í¬ë¡œì•„í‹°ì•„ì–´", + "hr_BA": "í¬ë¡œì•„í‹°ì•„ì–´ (보스니아 헤르체고비나)", + "hr_HR": "í¬ë¡œì•„í‹°ì•„ì–´ (í¬ë¡œì•„í‹°ì•„)", + "hu": "í—가리어", + "hu_HU": "í—가리어 (í—가리)", + "hy": "아르메니아어", + "hy_AM": "아르메니아어 (아르메니아)", + "id": "ì¸ë„네시아어", + "id_ID": "ì¸ë„네시아어 (ì¸ë„네시아)", + "ig": "ì´ê·¸ë³´ì–´", + "ig_NG": "ì´ê·¸ë³´ì–´ (나ì´ì§€ë¦¬ì•„)", + "ii": "ì“°ì´¨ ì´ì–´", + "ii_CN": "ì“°ì´¨ ì´ì–´ (중국)", + "is": "ì•„ì´ìŠ¬ëž€ë“œì–´", + "is_IS": "ì•„ì´ìŠ¬ëž€ë“œì–´ (ì•„ì´ìŠ¬ëž€ë“œ)", + "it": "ì´íƒˆë¦¬ì•„ì–´", + "it_CH": "ì´íƒˆë¦¬ì•„ì–´ (스위스)", + "it_IT": "ì´íƒˆë¦¬ì•„ì–´ (ì´íƒˆë¦¬ì•„)", + "it_SM": "ì´íƒˆë¦¬ì•„ì–´ (산마리노)", + "ja": "ì¼ë³¸ì–´", + "ja_JP": "ì¼ë³¸ì–´ (ì¼ë³¸)", + "ka": "조지아어", + "ka_GE": "조지아어 (조지아)", + "ki": "키쿠유어", + "ki_KE": "키쿠유어 (ì¼€ëƒ)", + "kk": "ì¹´ìžíì–´", + "kk_KZ": "ì¹´ìžíì–´ (ì¹´ìží스탄)", + "kl": "그린란드어", + "kl_GL": "그린란드어 (그린란드)", + "km": "í¬ë©”르어", + "km_KH": "í¬ë©”르어 (캄보디아)", + "kn": "칸나다어", + "kn_IN": "칸나다어 (ì¸ë„)", + "ko": "한국어", + "ko_KP": "한국어 (ë¶í•œ)", + "ko_KR": "한국어 (대한민국)", + "ks": "카슈미르어", + "ks_IN": "카슈미르어 (ì¸ë„)", + "kw": "콘월어", + "kw_GB": "콘월어 (ì˜êµ­)", + "ky": "키르기스어", + "ky_KG": "키르기스어 (키르기스스탄)", + "lb": "룩셈부르í¬ì–´", + "lb_LU": "룩셈부르í¬ì–´ (룩셈부르í¬)", + "lg": "간다어", + "lg_UG": "간다어 (우간다)", + "ln": "ë§ê°ˆë¼ì–´", + "ln_AO": "ë§ê°ˆë¼ì–´ (앙골ë¼)", + "ln_CD": "ë§ê°ˆë¼ì–´ (콩고-킨샤사)", + "ln_CF": "ë§ê°ˆë¼ì–´ (중앙 아프리카 공화국)", + "ln_CG": "ë§ê°ˆë¼ì–´ (콩고-브ë¼ìžë¹Œ)", + "lo": "ë¼ì˜¤ì–´", + "lo_LA": "ë¼ì˜¤ì–´ (ë¼ì˜¤ìФ)", + "lt": "리투아니아어", + "lt_LT": "리투아니아어 (리투아니아)", + "lu": "루바-카탄가어", + "lu_CD": "루바-카탄가어 (콩고-킨샤사)", + "lv": "ë¼íŠ¸ë¹„ì•„ì–´", + "lv_LV": "ë¼íŠ¸ë¹„ì•„ì–´ (ë¼íŠ¸ë¹„ì•„)", + "mg": "ë§ë¼ê°€ì‹œì–´", + "mg_MG": "ë§ë¼ê°€ì‹œì–´ (마다가스카르)", + "mk": "마케ë„니아어", + "mk_MK": "마케ë„니아어 (마케ë„니아)", + "ml": "ë§ë¼ì–„람어", + "ml_IN": "ë§ë¼ì–„람어 (ì¸ë„)", + "mn": "몽골어", + "mn_MN": "몽골어 (몽골)", + "mr": "마ë¼í‹°ì–´", + "mr_IN": "마ë¼í‹°ì–´ (ì¸ë„)", + "ms": "ë§ë ˆì´ì–´", + "ms_BN": "ë§ë ˆì´ì–´ (브루나ì´)", + "ms_MY": "ë§ë ˆì´ì–´ (ë§ë ˆì´ì‹œì•„)", + "ms_SG": "ë§ë ˆì´ì–´ (싱가í¬ë¥´)", + "mt": "몰타어", + "mt_MT": "몰타어 (몰타)", + "my": "버마어", + "my_MM": "버마어 (미얀마)", + "nb": "노르웨ì´ì–´(ë³´í¬ë§)", + "nb_NO": "노르웨ì´ì–´(ë³´í¬ë§) (노르웨ì´)", + "nb_SJ": "노르웨ì´ì–´(ë³´í¬ë§) (스발바르제ë„-얀마웬섬)", + "nd": "ë¶ë¶€ ì€ë°ë²¨ë ˆì–´", + "nd_ZW": "ë¶ë¶€ ì€ë°ë²¨ë ˆì–´ (ì§ë°”브웨)", + "ne": "네팔어", + "ne_IN": "네팔어 (ì¸ë„)", + "ne_NP": "네팔어 (네팔)", + "nl": "네ëœëž€ë“œì–´", + "nl_AW": "네ëœëž€ë“œì–´ (아루바)", + "nl_BE": "네ëœëž€ë“œì–´ (벨기ì—)", + "nl_BQ": "네ëœëž€ë“œì–´ (네ëœëž€ë“œë ¹ 카리브)", + "nl_CW": "네ëœëž€ë“œì–´ (퀴ë¼ì†Œ)", + "nl_NL": "네ëœëž€ë“œì–´ (네ëœëž€ë“œ)", + "nl_SR": "네ëœëž€ë“œì–´ (수리남)", + "nl_SX": "네ëœëž€ë“œì–´ (신트마르턴)", + "nn": "노르웨ì´ì–´(니노르스í¬)", + "nn_NO": "노르웨ì´ì–´(니노르스í¬) (노르웨ì´)", + "no": "노르웨ì´ì–´", + "no_NO": "노르웨ì´ì–´ (노르웨ì´)", + "om": "오로모어", + "om_ET": "오로모어 (ì—티오피아)", + "om_KE": "오로모어 (ì¼€ëƒ)", + "or": "오리야어", + "or_IN": "오리야어 (ì¸ë„)", + "os": "오세트어", + "os_GE": "오세트어 (조지아)", + "os_RU": "오세트어 (러시아)", + "pa": "펀잡어", + "pa_Arab": "펀잡어 (ì•„ëž ë¬¸ìž)", + "pa_Arab_PK": "펀잡어 (ì•„ëž ë¬¸ìž, 파키스탄)", + "pa_Guru": "펀잡어 (구르무키 문ìž)", + "pa_Guru_IN": "펀잡어 (구르무키 문ìž, ì¸ë„)", + "pa_IN": "펀잡어 (ì¸ë„)", + "pa_PK": "펀잡어 (파키스탄)", + "pl": "í´ëž€ë“œì–´", + "pl_PL": "í´ëž€ë“œì–´ (í´ëž€ë“œ)", + "ps": "파슈토어", + "ps_AF": "파슈토어 (아프가니스탄)", + "pt": "í¬ë¥´íˆ¬ê°ˆì–´", + "pt_AO": "í¬ë¥´íˆ¬ê°ˆì–´ (앙골ë¼)", + "pt_BR": "í¬ë¥´íˆ¬ê°ˆì–´ (브ë¼ì§ˆ)", + "pt_CH": "í¬ë¥´íˆ¬ê°ˆì–´ (스위스)", + "pt_CV": "í¬ë¥´íˆ¬ê°ˆì–´ (카보베르ë°)", + "pt_GQ": "í¬ë¥´íˆ¬ê°ˆì–´ (ì ë„ 기니)", + "pt_GW": "í¬ë¥´íˆ¬ê°ˆì–´ (기니비사우)", + "pt_LU": "í¬ë¥´íˆ¬ê°ˆì–´ (룩셈부르í¬)", + "pt_MO": "í¬ë¥´íˆ¬ê°ˆì–´ (마카오(중국 특별행정구))", + "pt_MZ": "í¬ë¥´íˆ¬ê°ˆì–´ (모잠비í¬)", + "pt_PT": "í¬ë¥´íˆ¬ê°ˆì–´ (í¬ë¥´íˆ¬ê°ˆ)", + "pt_ST": "í¬ë¥´íˆ¬ê°ˆì–´ (ìƒíˆ¬ë©” 프린시페)", + "pt_TL": "í¬ë¥´íˆ¬ê°ˆì–´ (ë™í‹°ëª¨ë¥´)", + "qu": "케추아어", + "qu_BO": "케추아어 (볼리비아)", + "qu_EC": "케추아어 (ì—ì½°ë„르)", + "qu_PE": "케추아어 (페루)", + "rm": "로만시어", + "rm_CH": "로만시어 (스위스)", + "rn": "룬디어", + "rn_BI": "룬디어 (부룬디)", + "ro": "루마니아어", + "ro_MD": "루마니아어 (몰ë„ë°”)", + "ro_RO": "루마니아어 (루마니아)", + "ru": "러시아어", + "ru_BY": "러시아어 (벨ë¼ë£¨ìФ)", + "ru_KG": "러시아어 (키르기스스탄)", + "ru_KZ": "러시아어 (ì¹´ìží스탄)", + "ru_MD": "러시아어 (몰ë„ë°”)", + "ru_RU": "러시아어 (러시아)", + "ru_UA": "러시아어 (ìš°í¬ë¼ì´ë‚˜)", + "rw": "르완다어", + "rw_RW": "르완다어 (르완다)", + "se": "ë¶ë¶€ 사미어", + "se_FI": "ë¶ë¶€ 사미어 (핀란드)", + "se_NO": "ë¶ë¶€ 사미어 (노르웨ì´)", + "se_SE": "ë¶ë¶€ 사미어 (스웨ë´)", + "sg": "ì‚°ê³ ì–´", + "sg_CF": "ì‚°ê³ ì–´ (중앙 아프리카 공화국)", + "sh": "세르비아-í¬ë¡œì•„í‹°ì•„ì–´", + "sh_BA": "세르비아-í¬ë¡œì•„í‹°ì•„ì–´ (보스니아 헤르체고비나)", + "si": "스리랑카어", + "si_LK": "스리랑카어 (스리랑카)", + "sk": "슬로바키아어", + "sk_SK": "슬로바키아어 (슬로바키아)", + "sl": "슬로베니아어", + "sl_SI": "슬로베니아어 (슬로베니아)", + "sn": "쇼나어", + "sn_ZW": "쇼나어 (ì§ë°”브웨)", + "so": "소ë§ë¦¬ì•„ì–´", + "so_DJ": "소ë§ë¦¬ì•„ì–´ (지부티)", + "so_ET": "소ë§ë¦¬ì•„ì–´ (ì—티오피아)", + "so_KE": "소ë§ë¦¬ì•„ì–´ (ì¼€ëƒ)", + "so_SO": "소ë§ë¦¬ì•„ì–´ (소ë§ë¦¬ì•„)", + "sq": "알바니아어", + "sq_AL": "알바니아어 (알바니아)", + "sq_MK": "알바니아어 (마케ë„니아)", + "sq_XK": "알바니아어 (코소보)", + "sr": "세르비아어", + "sr_BA": "세르비아어 (보스니아 헤르체고비나)", + "sr_Cyrl": "세르비아어 (키릴 문ìž)", + "sr_Cyrl_BA": "세르비아어 (키릴 문ìž, 보스니아 헤르체고비나)", + "sr_Cyrl_ME": "세르비아어 (키릴 문ìž, 몬테네그로)", + "sr_Cyrl_RS": "세르비아어 (키릴 문ìž, 세르비아)", + "sr_Cyrl_XK": "세르비아어 (키릴 문ìž, 코소보)", + "sr_Latn": "세르비아어 (로마ìž)", + "sr_Latn_BA": "세르비아어 (로마ìž, 보스니아 헤르체고비나)", + "sr_Latn_ME": "세르비아어 (로마ìž, 몬테네그로)", + "sr_Latn_RS": "세르비아어 (로마ìž, 세르비아)", + "sr_Latn_XK": "세르비아어 (로마ìž, 코소보)", + "sr_ME": "세르비아어 (몬테네그로)", + "sr_RS": "세르비아어 (세르비아)", + "sr_XK": "세르비아어 (코소보)", + "sv": "스웨ë´ì–´", + "sv_AX": "스웨ë´ì–´ (올란드 ì œë„)", + "sv_FI": "스웨ë´ì–´ (핀란드)", + "sv_SE": "스웨ë´ì–´ (스웨ë´)", + "sw": "스와ížë¦¬ì–´", + "sw_CD": "스와ížë¦¬ì–´ (콩고-킨샤사)", + "sw_KE": "스와ížë¦¬ì–´ (ì¼€ëƒ)", + "sw_TZ": "스와ížë¦¬ì–´ (탄ìžë‹ˆì•„)", + "sw_UG": "스와ížë¦¬ì–´ (우간다)", + "ta": "타밀어", + "ta_IN": "타밀어 (ì¸ë„)", + "ta_LK": "타밀어 (스리랑카)", + "ta_MY": "타밀어 (ë§ë ˆì´ì‹œì•„)", + "ta_SG": "타밀어 (싱가í¬ë¥´)", + "te": "텔루구어", + "te_IN": "텔루구어 (ì¸ë„)", + "th": "태국어", + "th_TH": "태국어 (태국)", + "ti": "티그리ëƒì–´", + "ti_ER": "티그리ëƒì–´ (ì—리트리아)", + "ti_ET": "티그리ëƒì–´ (ì—티오피아)", + "tl": "타갈로그어", + "tl_PH": "타갈로그어 (필리핀)", + "to": "통가어", + "to_TO": "통가어 (통가)", + "tr": "터키어", + "tr_CY": "터키어 (키프로스)", + "tr_TR": "터키어 (터키)", + "ug": "위구르어", + "ug_CN": "위구르어 (중국)", + "uk": "ìš°í¬ë¼ì´ë‚˜ì–´", + "uk_UA": "ìš°í¬ë¼ì´ë‚˜ì–´ (ìš°í¬ë¼ì´ë‚˜)", + "ur": "우르ë‘ì–´", + "ur_IN": "우르ë‘ì–´ (ì¸ë„)", + "ur_PK": "우르ë‘ì–´ (파키스탄)", + "uz": "우즈베í¬ì–´", + "uz_AF": "우즈베í¬ì–´ (아프가니스탄)", + "uz_Arab": "우즈베í¬ì–´ (ì•„ëž ë¬¸ìž)", + "uz_Arab_AF": "우즈베í¬ì–´ (ì•„ëž ë¬¸ìž, 아프가니스탄)", + "uz_Cyrl": "우즈베í¬ì–´ (키릴 문ìž)", + "uz_Cyrl_UZ": "우즈베í¬ì–´ (키릴 문ìž, 우즈베키스탄)", + "uz_Latn": "우즈베í¬ì–´ (로마ìž)", + "uz_Latn_UZ": "우즈베í¬ì–´ (로마ìž, 우즈베키스탄)", + "uz_UZ": "우즈베í¬ì–´ (우즈베키스탄)", + "vi": "베트남어", + "vi_VN": "베트남어 (베트남)", + "yi": "ì´ë””시어", + "yo": "요루바어", + "yo_BJ": "요루바어 (베냉)", + "yo_NG": "요루바어 (나ì´ì§€ë¦¬ì•„)", + "zh": "중국어", + "zh_CN": "중국어 (중국)", + "zh_HK": "중국어 (í™ì½©(중국 특별행정구))", + "zh_Hans": "중국어 (ê°„ì²´)", + "zh_Hans_CN": "중국어 (ê°„ì²´, 중국)", + "zh_Hans_HK": "중국어 (ê°„ì²´, í™ì½©(중국 특별행정구))", + "zh_Hans_MO": "중국어 (ê°„ì²´, 마카오(중국 특별행정구))", + "zh_Hans_SG": "중국어 (ê°„ì²´, 싱가í¬ë¥´)", + "zh_Hant": "중국어 (번체)", + "zh_Hant_HK": "중국어 (번체, í™ì½©(중국 특별행정구))", + "zh_Hant_MO": "중국어 (번체, 마카오(중국 특별행정구))", + "zh_Hant_TW": "중국어 (번체, 대만)", + "zh_MO": "중국어 (마카오(중국 특별행정구))", + "zh_SG": "중국어 (싱가í¬ë¥´)", + "zh_TW": "중국어 (대만)", + "zu": "줄루어", + "zu_ZA": "줄루어 (남아프리카)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ko_KP.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ko_KP.json new file mode 100644 index 0000000000000000000000000000000000000000..1099ec877260617097ebddbbe3d328bf56c248ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ko_KP.json @@ -0,0 +1,5 @@ +{ + "Names": { + "ko_KP": "한국어 (조선민주주ì˜ì¸ë¯¼ê³µí™”êµ­)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ks.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ks.json new file mode 100644 index 0000000000000000000000000000000000000000..cd1f45a69f26ef03cd5e8927a7a25956b7cb3d85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ks.json @@ -0,0 +1,551 @@ +{ + "Names": { + "af": "Ø§ÙŽÙØ±ÛŒÙ–کانٛز", + "af_NA": "Ø§ÙŽÙØ±ÛŒÙ–کانٛز (Ù†Ø§Ù…ÙØ¨Ùیا)", + "af_ZA": "Ø§ÙŽÙØ±ÛŒÙ–کانٛز (جَنوٗبی Ø§ÙŽÙØ±ÛŒÙ–کا)", + "ak": "اَکان", + "ak_GH": "اَکان (گانا)", + "am": "Ø§ÙŽÙ…ÛØ§Ø±ÛŒ", + "am_ET": "Ø§ÙŽÙ…ÛØ§Ø±ÛŒ (Ø§ÙØªÚ¾ÙˆÙ¾Ùیا)", + "ar": "عربی", + "ar_AE": "عربی (Ù…ÙØªØ­Ø¯Û عرَب امارات)", + "ar_BH": "عربی (بحریٖن)", + "ar_DJ": "عربی (Ø¬ÙØ¨ÙˆÙ—تی)", + "ar_DZ": "عربی (اٮ۪لجیرÙیا)", + "ar_EG": "عربی (Ù…ÙØ³Ù”ر)", + "ar_EH": "عربی (مشرÙÙ‚ÛŒ Ø³ÙŽÛØ§Ø±Ø§)", + "ar_ER": "عربی (Ø§ÙØ±Ù•Ù¹Ùیا)", + "ar_IL": "عربی (Ø§ÙØ³Ø±Ø§ÛŒÙ–Ù„)", + "ar_IQ": "عربی (ایٖراق)", + "ar_KM": "عربی (کَمورَس)", + "ar_KW": "عربی (Ú©Ùویت)", + "ar_LB": "عربی (لٮ۪بنان)", + "ar_LY": "عربی (Ù„ÙØ¨ÛŒØ§)", + "ar_MA": "عربی (موروکو)", + "ar_MR": "عربی (مارٕٹانÙیا)", + "ar_OM": "عربی (اومان)", + "ar_PS": "عربی (Ùَلَستیٖن)", + "ar_QA": "عربی (Ù‚ÙŽØ·ÙØ±)", + "ar_SA": "عربی (سوٗدی عربÙÛŒÛ)", + "ar_SD": "عربی (سوٗڈان)", + "ar_SO": "عربی (سومالÙیا)", + "ar_SY": "عربی (شام)", + "ar_TD": "عربی (چاڑ)", + "ar_TN": "عربی (ٹونیشÙیا)", + "ar_YE": "عربی (یَمَن)", + "as": "اسٲمÛ", + "as_IN": "Ø§Ø³Ù²Ù…Û (ÛÙنٛدوستان)", + "az": "اَزَربیجانی", + "az_AZ": "اَزَربیجانی (آزَرباجان)", + "az_Cyrl": "اَزَربیجانی (سَیرÙÙ„ÙÚ©)", + "az_Cyrl_AZ": "اَزَربیجانی (سَیرÙÙ„ÙÚ©, آزَرباجان)", + "az_Latn": "اَزَربیجانی (لیٹÙÙ†)", + "az_Latn_AZ": "اَزَربیجانی (لیٹÙÙ†, آزَرباجان)", + "be": "بیلَروٗشیَن", + "be_BY": "بیلَروٗشیَن (بیلاروٗس)", + "bg": "بینا", + "bg_BG": "بینا (بَلجیرÙیا)", + "bm": "بَمبارا", + "bm_ML": "بَمبارا (مالی)", + "bn": "بَنٛگٲلÛ", + "bn_BD": "Ø¨ÙŽÙ†Ù›Ú¯Ù²Ù„Û (بَنٛگلادیش)", + "bn_IN": "Ø¨ÙŽÙ†Ù›Ú¯Ù²Ù„Û (ÛÙنٛدوستان)", + "bo": "ØªÙØ¨ØªÛŒ", + "bo_CN": "ØªÙØ¨ØªÛŒ (چیٖن)", + "bo_IN": "ØªÙØ¨ØªÛŒ (ÛÙنٛدوستان)", + "br": "بریٹَن", + "br_FR": "بریٹَن (ÙØ±Ù›Ø§Ù†Ø³)", + "bs": "بوسنÙیَن", + "bs_BA": "بوسنÙیَن (بوسنÙیا تÛÙ• ÛَرزÙگووÙنا)", + "bs_Cyrl": "بوسنÙیَن (سَیرÙÙ„ÙÚ©)", + "bs_Cyrl_BA": "بوسنÙیَن (سَیرÙÙ„ÙÚ©, بوسنÙیا تÛÙ• ÛَرزÙگووÙنا)", + "bs_Latn": "بوسنÙیَن (لیٹÙÙ†)", + "bs_Latn_BA": "بوسنÙیَن (لیٹÙÙ†, بوسنÙیا تÛÙ• ÛَرزÙگووÙنا)", + "ca": "کَتلان", + "ca_AD": "کَتلان (اٮ۪نڑورا)", + "ca_ES": "کَتلان (سٕپین)", + "ca_FR": "کَتلان (ÙØ±Ù›Ø§Ù†Ø³)", + "ca_IT": "کَتلان (اÙٹلی)", + "ce": "چیچَن", + "ce_RU": "چیچَن (روٗس)", + "cs": "چیٚک", + "cs_CZ": "چیٚک (چیک جَموٗرÙیَت)", + "cy": "ویٚلش", + "cy_GB": "ویٚلش (ÛŒÙنایٹÙÚ‘ Ú©ÙÙ†Ù›Ú¯ÚˆÙŽÙ…)", + "da": "ÚˆÛŒÙ†ÙØ´", + "da_DK": "ÚˆÛŒÙ†ÙØ´ (ڈینٛمارٕک)", + "da_GL": "ÚˆÛŒÙ†ÙØ´ (گریٖنلینٛڑ)", + "de": "جٔرمَن", + "de_AT": "جٔرمَن (آسٹÙیا)", + "de_BE": "جٔرمَن (بیٛلجÙیَم)", + "de_CH": "جٔرمَن (سÙÙˆÙØ²ÙŽØ±Ù„ینٛڑ)", + "de_DE": "جٔرمَن (جرمٔنی)", + "de_IT": "جٔرمَن (اÙٹلی)", + "de_LI": "جٔرمَن (Ù„Ùکٹیٛسٹیٖن)", + "de_LU": "جٔرمَن (لَکسَمبٔرٕگ)", + "dz": "زونٛگکھا", + "dz_BT": "زونٛگکھا (بوٗٹان)", + "ee": "ایٖو", + "ee_GH": "ایٖو (گانا)", + "ee_TG": "ایٖو (ٹوگو)", + "el": "یوٗنٲنی", + "el_CY": "یوٗنٲنی (Ø³Ø§ÛŒÙØ±Ù›Ø³)", + "el_GR": "یوٗنٲنی (گریٖس)", + "en": "اَنٛگیٖزÛ", + "en_AG": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (اٮ۪نٹÙÚ¯Ùوا تÛÙ• باربوڑا)", + "en_AI": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (انگوئیلا)", + "en_AS": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (اَمریٖکَن سَموا)", + "en_AT": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (آسٹÙیا)", + "en_AU": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (آسٹریلÙیا)", + "en_BB": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (باربیڈاس)", + "en_BE": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (بیٛلجÙیَم)", + "en_BI": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (بورَنڈÙ)", + "en_BM": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (بٔرمیوڈا)", + "en_BS": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ø¨ÙŽÛØ§Ù…َس)", + "en_BW": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (بوتَسوانا)", + "en_BZ": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ø¨ÛŒÙ„ÙØ¬)", + "en_CA": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (کینَڑا)", + "en_CC": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (کوکَس کیٖلÙÙ†Ù›Ú¯ جٔزیٖرٕ)", + "en_CH": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (سÙÙˆÙØ²ÙŽØ±Ù„ینٛڑ)", + "en_CK": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ú©ÙÚ© جٔزیٖرٕ)", + "en_CM": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ú©ÛŒÙšÙ…ÙØ±ÙˆÙ—Ù†)", + "en_CX": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ú©Ø±ÙØ³Ù…َس جٔزیٖرٕ)", + "en_CY": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ø³Ø§ÛŒÙØ±Ù›Ø³)", + "en_DE": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (جرمٔنی)", + "en_DK": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ڈینٛمارٕک)", + "en_DM": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ڈومÙÙ†Ùکا)", + "en_ER": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ø§ÙØ±Ù•Ù¹Ùیا)", + "en_FI": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ÙÙنلینٛڑ)", + "en_FJ": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ÙÙØ¬ÛŒ)", + "en_FK": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ùٕلاکلینٛڑ جٔزیٖرٕ)", + "en_GB": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ÛŒÙنایٹÙÚ‘ Ú©ÙÙ†Ù›Ú¯ÚˆÙŽÙ…)", + "en_GD": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (گرٛنیڑا)", + "en_GG": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (گیوَنَرسے)", + "en_GH": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (گانا)", + "en_GI": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ø¬ÙØ¨Ø±Ø§Ù„ٹَر)", + "en_GM": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (گَمبÙیا)", + "en_GU": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ú¯Ùوام)", + "en_GY": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ú¯Ùیانا)", + "en_HK": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ÛØ§Ù†Ù›Ú¯ کانٛگ ایس اے آر چیٖن)", + "en_IE": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (اَیَرلینٛڑ)", + "en_IL": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ø§ÙØ³Ø±Ø§ÛŒÙ–Ù„)", + "en_IM": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ø¢ÛŒÙÙ„ آ٠میٛن)", + "en_IN": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ÛÙنٛدوستان)", + "en_IO": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (برطانوی بحر٠ÛÙÙ†Ù›Ø¯Û Ø¹Ù„Ø§Ù‚ÛÙ•)", + "en_JE": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (جٔرسی)", + "en_JM": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (جَمایکا)", + "en_KE": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ú©Ùنٛیا)", + "en_KI": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ú©ÙØ±Ù•باتی)", + "en_KN": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (سینٛٹ Ú©Ùٹَس تÛÙ• Ù†ÛŒÙˆÙØ³)", + "en_KY": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (کیمَن جٔزیٖرٕ)", + "en_LC": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (سینٛٹ لوٗسÙیا)", + "en_LR": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (لایبیرÙیا)", + "en_LS": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (لیسوتھو)", + "en_MG": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (میڑاگاسکار)", + "en_MH": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (مارشَل جٔزیٖرٕ)", + "en_MO": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (مَکاوو ایس اے آر چیٖن)", + "en_MP": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ø´Ùمٲلی مارÙیانا جٔزیٖرٕ)", + "en_MS": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (مانٛٹسیراٹ)", + "en_MT": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (مالٹا)", + "en_MU": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ù…ÙˆØ±ÙØ´ÙŽØ³)", + "en_MW": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ملاوی)", + "en_MY": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (مَلیشÙیا)", + "en_NA": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ù†Ø§Ù…ÙØ¨Ùیا)", + "en_NF": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ù†Ø§Ø±ÙØ§Ú© جٔزیٖرٕ)", + "en_NG": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (نایجیرÙیا)", + "en_NL": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (نیٖدَرلینٛڑ)", + "en_NR": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (نارووٗ)", + "en_NU": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (نیوٗ)", + "en_NZ": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (نیوٗزÙلینٛڑ)", + "en_PG": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (پاپÙوا نیوٗ گیٖنی)", + "en_PH": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ÙÙÙ„ÙÙ¾Ùینس)", + "en_PK": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ù¾Ø§Ú©ÙØ³ØªØ§Ù†)", + "en_PN": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ù¾ÙÙ¹Ú©ÛŒØ±Ù•Ù†Û Ø¬Ù”Ø²ÛŒÙ–Ø±Ù•)", + "en_PR": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (پٔرٹو رÙÚ©Ùˆ)", + "en_PW": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (پَلاو)", + "en_RW": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (روٗوانٛڈا)", + "en_SB": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (سولامان جٔزیٖرٕ)", + "en_SC": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (Ø³ÛŒØ´ÙŽÙ„ÙØ³)", + "en_SD": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (سوٗڈان)", + "en_SE": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (سÙÙˆÙÚˆÙŽÙ†)", + "en_SG": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ٛسÙنٛگاپوٗر)", + "en_SH": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (سینٛٹ ÛÙ®ÛªÙ„Ùنا)", + "en_SI": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (سَلووینÙیا)", + "en_SL": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (سیٖرالیوون)", + "en_SZ": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (سÙوزÙلینٛڑ)", + "en_TC": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ØªÙØ±ÙÚ© تÛÙ• کیکوس جٔزیٖرٕ)", + "en_TK": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (توکیلاو)", + "en_TO": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ٹونٛگا)", + "en_TT": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (ٹرٛنÙنداد تÛÙ• ٹوبیگو)", + "en_TV": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (توٗوالوٗ)", + "en_TZ": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (تَنجانÙیا)", + "en_UG": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (یوٗگانٛڑا)", + "en_UM": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (یوٗنایٹÙÚ‘ سÙÙ¹ÛŒÙ¹ÙØ³ ماینَر آوÙٹلییÙÙ†Ù›Ú¯ جٔزیٖرٕ)", + "en_US": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (یوٗنایٹÙÚ‘ سÙÙ¹ÛŒÙ¹ÙØ³)", + "en_VC": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (سینٛٹ وینسٮ۪ٹ تÛÙ• گرٛیناڑاینٕز)", + "en_VG": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (بَرطانوی ؤرجÙÙ† جٔزیٖرٕ)", + "en_VI": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (یوٗ ایس ؤرجÙÙ† جٔزیٖرٕ)", + "en_VU": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (وانوٗتوٗ)", + "en_WS": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (سیمووا)", + "en_ZA": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (جَنوٗبی Ø§ÙŽÙØ±ÛŒÙ–کا)", + "en_ZM": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (جامبÙیا)", + "en_ZW": "Ø§ÙŽÙ†Ù›Ú¯ÛŒÙ–Ø²Û (زÙمبابے)", + "eo": "ایٚسپَرینٹو", + "es": "Ø³Ù¾ÛŒÙ†ÙØ´", + "es_AR": "Ø³Ù¾ÛŒÙ†ÙØ´ (أرجَنٹینا)", + "es_BO": "Ø³Ù¾ÛŒÙ†ÙØ´ (بولÙÙˆÙیا)", + "es_BR": "Ø³Ù¾ÛŒÙ†ÙØ´ (برٛازÙÙ„)", + "es_CL": "Ø³Ù¾ÛŒÙ†ÙØ´ (Ú†ÙÙ„ÛŒ)", + "es_CO": "Ø³Ù¾ÛŒÙ†ÙØ´ (کولَمبÙیا)", + "es_CR": "Ø³Ù¾ÛŒÙ†ÙØ´ (کوسٹا رÙکا)", + "es_CU": "Ø³Ù¾ÛŒÙ†ÙØ´ (کیوٗبا)", + "es_DO": "Ø³Ù¾ÛŒÙ†ÙØ´ (ڈومÙÙ†ÙÚ©ÙŽÙ† جموٗرÙیَت)", + "es_EC": "Ø³Ù¾ÛŒÙ†ÙØ´ (اÙکواڑور)", + "es_ES": "Ø³Ù¾ÛŒÙ†ÙØ´ (سٕپین)", + "es_GQ": "Ø³Ù¾ÛŒÙ†ÙØ´ (اÙÚ©ÙˆÙٹورÙیَل Ú¯ÙÙ†ÛŒ)", + "es_GT": "Ø³Ù¾ÛŒÙ†ÙØ´ (گوتیدالا)", + "es_HN": "Ø³Ù¾ÛŒÙ†ÙØ´ (ÛØ§Ù†Ù›ÚˆÙˆÙ—Ø±ÙØ³)", + "es_MX": "Ø³Ù¾ÛŒÙ†ÙØ´ (مٮ۪کسÙÚ©Ùˆ)", + "es_NI": "Ø³Ù¾ÛŒÙ†ÙØ´ (ناکاراگÙوا)", + "es_PA": "Ø³Ù¾ÛŒÙ†ÙØ´ (پَناما)", + "es_PE": "Ø³Ù¾ÛŒÙ†ÙØ´ (پیٖروٗ)", + "es_PH": "Ø³Ù¾ÛŒÙ†ÙØ´ (ÙÙÙ„ÙÙ¾Ùینس)", + "es_PR": "Ø³Ù¾ÛŒÙ†ÙØ´ (پٔرٹو رÙÚ©Ùˆ)", + "es_PY": "Ø³Ù¾ÛŒÙ†ÙØ´ (پَراگÙÛ’)", + "es_SV": "Ø³Ù¾ÛŒÙ†ÙØ´ (اٮ۪ل سَلواڑور)", + "es_US": "Ø³Ù¾ÛŒÙ†ÙØ´ (یوٗنایٹÙÚ‘ سÙÙ¹ÛŒÙ¹ÙØ³)", + "es_UY": "Ø³Ù¾ÛŒÙ†ÙØ´ (یوٗروگے)", + "es_VE": "Ø³Ù¾ÛŒÙ†ÙØ´ (وینازوٗلا)", + "et": "ایٚسٹونیَن", + "et_EE": "ایٚسٹونیَن (ایسٹونÙیا)", + "eu": "باسک", + "eu_ES": "باسک (سٕپین)", + "fa": "ÙØ§Ø±Ø³ÛŒ", + "fa_AF": "ÙØ§Ø±Ø³ÛŒ (Ø§ÙŽÙØºØ§Ù†ÙŽØ³ØªØ§Ù†)", + "fa_IR": "ÙØ§Ø±Ø³ÛŒ (ایٖران)", + "ff": "ÙÙلاÛ", + "ff_CM": "ÙÙÙ„Ø§Û (Ú©ÛŒÙšÙ…ÙØ±ÙˆÙ—Ù†)", + "ff_GN": "ÙÙÙ„Ø§Û (Ú¯ÙÙ†ÛŒ)", + "ff_MR": "ÙÙÙ„Ø§Û (مارٕٹانÙیا)", + "ff_SN": "ÙÙÙ„Ø§Û (سینیگَل)", + "fi": "ÙÙÙ†ÙØ´", + "fi_FI": "ÙÙÙ†ÙØ´ (ÙÙنلینٛڑ)", + "fo": "Ùَروس", + "fo_DK": "Ùَروس (ڈینٛمارٕک)", + "fr": "ÙØ±ÛŒÙšÙ†Ú†", + "fr_BE": "ÙØ±ÛŒÙšÙ†Ú† (بیٛلجÙیَم)", + "fr_BF": "ÙØ±ÛŒÙšÙ†Ú† (Ø¨ÙØ±Ú©Ùنا Ùیسو)", + "fr_BI": "ÙØ±ÛŒÙšÙ†Ú† (بورَنڈÙ)", + "fr_BJ": "ÙØ±ÛŒÙšÙ†Ú† (بÙÙ†ÙÙ†)", + "fr_BL": "ÙØ±ÛŒÙšÙ†Ú† (سینٛٹ بارتَھیلمی)", + "fr_CA": "ÙØ±ÛŒÙšÙ†Ú† (کینَڑا)", + "fr_CD": "ÙØ±ÛŒÙšÙ†Ú† (کونٛگو Ú©Ùنشاسا)", + "fr_CF": "ÙØ±ÛŒÙšÙ†Ú† (مرکٔزی Ø§ÙŽÙØ±ÛŒÙ–Ú©ÛŒ جموٗریَت)", + "fr_CG": "ÙØ±ÛŒÙšÙ†Ú† (کونٛگو بٔرٛزاوÙÙ„ÛŒ)", + "fr_CH": "ÙØ±ÛŒÙšÙ†Ú† (سÙÙˆÙØ²ÙŽØ±Ù„ینٛڑ)", + "fr_CI": "ÙØ±ÛŒÙšÙ†Ú† (اَیوٕری کوسٹ)", + "fr_CM": "ÙØ±ÛŒÙšÙ†Ú† (Ú©ÛŒÙšÙ…ÙØ±ÙˆÙ—Ù†)", + "fr_DJ": "ÙØ±ÛŒÙšÙ†Ú† (Ø¬ÙØ¨ÙˆÙ—تی)", + "fr_DZ": "ÙØ±ÛŒÙšÙ†Ú† (اٮ۪لجیرÙیا)", + "fr_FR": "ÙØ±ÛŒÙšÙ†Ú† (ÙØ±Ù›Ø§Ù†Ø³)", + "fr_GA": "ÙØ±ÛŒÙšÙ†Ú† (گیبان)", + "fr_GF": "ÙØ±ÛŒÙšÙ†Ú† (ÙØ±Ù›Ø§Ù†Ø³Ùسی Ú¯ÙØ§Ù†Ø§)", + "fr_GN": "ÙØ±ÛŒÙšÙ†Ú† (Ú¯ÙÙ†ÛŒ)", + "fr_GP": "ÙØ±ÛŒÙšÙ†Ú† (گَواڑیلوپ)", + "fr_GQ": "ÙØ±ÛŒÙšÙ†Ú† (اÙÚ©ÙˆÙٹورÙیَل Ú¯ÙÙ†ÛŒ)", + "fr_HT": "ÙØ±ÛŒÙšÙ†Ú† (ÛØ§ÛŒØªÛŒ)", + "fr_KM": "ÙØ±ÛŒÙšÙ†Ú† (کَمورَس)", + "fr_LU": "ÙØ±ÛŒÙšÙ†Ú† (لَکسَمبٔرٕگ)", + "fr_MA": "ÙØ±ÛŒÙšÙ†Ú† (موروکو)", + "fr_MC": "ÙØ±ÛŒÙšÙ†Ú† (مونیٚکو)", + "fr_MF": "ÙØ±ÛŒÙšÙ†Ú† (سینٛٹ مارٹÙÙ†)", + "fr_MG": "ÙØ±ÛŒÙšÙ†Ú† (میڑاگاسکار)", + "fr_ML": "ÙØ±ÛŒÙšÙ†Ú† (مالی)", + "fr_MQ": "ÙØ±ÛŒÙšÙ†Ú† (مارٹÙÙ†ÙÚ©)", + "fr_MR": "ÙØ±ÛŒÙšÙ†Ú† (مارٕٹانÙیا)", + "fr_MU": "ÙØ±ÛŒÙšÙ†Ú† (Ù…ÙˆØ±ÙØ´ÙŽØ³)", + "fr_NC": "ÙØ±ÛŒÙšÙ†Ú† (Ù†ÙÙˆ کیلÙڑونÙیا)", + "fr_NE": "ÙØ±ÛŒÙšÙ†Ú† (نایجَر)", + "fr_PF": "ÙØ±ÛŒÙšÙ†Ú† (ÙØ±Ù›Ø§Ù†Ø³ÛŒ پولÙنیشÙیا)", + "fr_PM": "ÙØ±ÛŒÙšÙ†Ú† (سینٛٹ پیٖری تÛÙ• موکیلÙیَن)", + "fr_RE": "ÙØ±ÛŒÙšÙ†Ú† (رÙیوٗنÙیَن)", + "fr_RW": "ÙØ±ÛŒÙšÙ†Ú† (روٗوانٛڈا)", + "fr_SC": "ÙØ±ÛŒÙšÙ†Ú† (Ø³ÛŒØ´ÙŽÙ„ÙØ³)", + "fr_SN": "ÙØ±ÛŒÙšÙ†Ú† (سینیگَل)", + "fr_SY": "ÙØ±ÛŒÙšÙ†Ú† (شام)", + "fr_TD": "ÙØ±ÛŒÙšÙ†Ú† (چاڑ)", + "fr_TG": "ÙØ±ÛŒÙšÙ†Ú† (ٹوگو)", + "fr_TN": "ÙØ±ÛŒÙšÙ†Ú† (ٹونیشÙیا)", + "fr_VU": "ÙØ±ÛŒÙšÙ†Ú† (وانوٗتوٗ)", + "fr_WF": "ÙØ±ÛŒÙšÙ†Ú† (ÙˆØ§Ù„ÙØ³ تÛÙ• Ùیوٗچوٗنا)", + "fr_YT": "ÙØ±ÛŒÙšÙ†Ú† (مَییٹ)", + "fy": "مغربی ÙØ±Ùشیَن", + "fy_NL": "مغربی ÙØ±Ùشیَن (نیٖدَرلینٛڑ)", + "ga": "Ø§ÙŽÛŒØ±ÙØ´", + "ga_IE": "Ø§ÙŽÛŒØ±ÙØ´ (اَیَرلینٛڑ)", + "gd": "Ø³Ú©ÙˆÙ¹ÙØ´ گیےلÙÚ©", + "gd_GB": "Ø³Ú©ÙˆÙ¹ÙØ´ گیےلÙÚ© (ÛŒÙنایٹÙÚ‘ Ú©ÙÙ†Ù›Ú¯ÚˆÙŽÙ…)", + "gl": "Ú¯ÛŒÙ„ÙØ´Ùیَن", + "gl_ES": "Ú¯ÛŒÙ„ÙØ´Ùیَن (سٕپین)", + "gu": "Ú¯ÙØ¬Ø±Ù²ØªÛŒ", + "gu_IN": "Ú¯ÙØ¬Ø±Ù²ØªÛŒ (ÛÙنٛدوستان)", + "gv": "مینٛکس", + "gv_IM": "مینٛکس (Ø¢ÛŒÙÙ„ آ٠میٛن)", + "ha": "ÛØ§ÙˆØ³Ø§", + "ha_GH": "ÛØ§ÙˆØ³Ø§ (گانا)", + "ha_NE": "ÛØ§ÙˆØ³Ø§ (نایجَر)", + "ha_NG": "ÛØ§ÙˆØ³Ø§ (نایجیرÙیا)", + "he": "عبرٲنÛ", + "he_IL": "Ø¹Ø¨Ø±Ù²Ù†Û (Ø§ÙØ³Ø±Ø§ÛŒÙ–Ù„)", + "hi": "ÛÙندی", + "hi_IN": "ÛÙندی (ÛÙنٛدوستان)", + "hr": "کروشÙیَن", + "hr_BA": "کروشÙیَن (بوسنÙیا تÛÙ• ÛَرزÙگووÙنا)", + "hr_HR": "کروشÙیَن (کرٛوشÙیا)", + "hu": "Ûَنٛگیریَن", + "hu_HU": "Ûَنٛگیریَن (Ûَنٛگری)", + "hy": "اَرمینیَن", + "hy_AM": "اَرمینیَن (اَرمانÙیا)", + "id": "اÙنڈونیشیا", + "id_ID": "اÙنڈونیشیا (اÙنڑونیشÙیا)", + "ig": "اÙگبو", + "ig_NG": "اÙگبو (نایجیرÙیا)", + "ii": "سÙچوان یٖی", + "ii_CN": "سÙچوان یٖی (چیٖن)", + "is": "Ø¢ÛŒÙØ³Ù„ینڈÙÚ©", + "is_IS": "Ø¢ÛŒÙØ³Ù„ینڈÙÚ© (Ø§ÙŽÛŒÙØ³Ù„ینٛڑ)", + "it": "اÙٹیلیَن", + "it_CH": "اÙٹیلیَن (سÙÙˆÙØ²ÙŽØ±Ù„ینٛڑ)", + "it_IT": "اÙٹیلیَن (اÙٹلی)", + "it_SM": "اÙٹیلیَن (سین میرÙنو)", + "ja": "جاپٲنÛ", + "ja_JP": "Ø¬Ø§Ù¾Ù²Ù†Û (جاپان)", + "ka": "جارجÙیَن", + "ka_GE": "جارجÙیَن (جارجÙیا)", + "ki": "Ú©ÙÚ©Ùیوٗ", + "ki_KE": "Ú©ÙÚ©Ùیوٗ (Ú©Ùنٛیا)", + "kk": "کازَخ", + "kk_KZ": "کازَخ (Ú©ÙŽØ²Ø§Ú©ÙØ³ØªØ§Ù†)", + "kl": "Ú©ÙŽÙ„Ø§Ù„ÙØ³Ùت", + "kl_GL": "Ú©ÙŽÙ„Ø§Ù„ÙØ³Ùت (گریٖنلینٛڑ)", + "km": "خَمیر", + "km_KH": "خَمیر (کَمبوڑÙیا)", + "kn": "Ú©ÙŽÙ†ÙŽÚ‘", + "kn_IN": "Ú©ÙŽÙ†ÙŽÚ‘ (ÛÙنٛدوستان)", + "ko": "کوریَن", + "ko_KP": "کوریَن (Ø´Ùمٲلی کورÙیا)", + "ko_KR": "کوریَن (جنوٗبی کورÙیا)", + "ks": "Ú©Ù²Ø´ÙØ±", + "ks_IN": "Ú©Ù²Ø´ÙØ± (ÛÙنٛدوستان)", + "kw": "Ú©ÙˆØ±Ù†ÙØ´", + "kw_GB": "Ú©ÙˆØ±Ù†ÙØ´ (ÛŒÙنایٹÙÚ‘ Ú©ÙÙ†Ù›Ú¯ÚˆÙŽÙ…)", + "ky": "Ú©ÙØ±Ú¯Ùز", + "ky_KG": "Ú©ÙØ±Ú¯Ùز (Ú©ÙØ±Ú¯Ùستان)", + "lb": "Ù„ÙÚ©Ú¾Ø²ÛŒÙ…Ø¨ÙˆØ±Ú¯ÙØ´", + "lb_LU": "Ù„ÙÚ©Ú¾Ø²ÛŒÙ…Ø¨ÙˆØ±Ú¯ÙØ´ (لَکسَمبٔرٕگ)", + "lg": "گاندا", + "lg_UG": "گاندا (یوٗگانٛڑا)", + "ln": "Ù„Ùنگالا", + "ln_AO": "Ù„Ùنگالا (انگولا)", + "ln_CD": "Ù„Ùنگالا (کونٛگو Ú©Ùنشاسا)", + "ln_CF": "Ù„Ùنگالا (مرکٔزی Ø§ÙŽÙØ±ÛŒÙ–Ú©ÛŒ جموٗریَت)", + "ln_CG": "Ù„Ùنگالا (کونٛگو بٔرٛزاوÙÙ„ÛŒ)", + "lo": "لاو", + "lo_LA": "لاو (لاس)", + "lt": "Ù„ÙØªÚ¾ÙˆØ§Ù†Ùیَن", + "lt_LT": "Ù„ÙØªÚ¾ÙˆØ§Ù†Ùیَن (Ù„ÙØªÚ¾ÙوانÙیا)", + "lu": "Ù„ÙˆÙØ¨Ø§ کَتَنٛگا", + "lu_CD": "Ù„ÙˆÙØ¨Ø§ کَتَنٛگا (کونٛگو Ú©Ùنشاسا)", + "lv": "لَتوÙیَن", + "lv_LV": "لَتوÙیَن (لیٛٹوÙیا)", + "mg": "مَلاگَسی", + "mg_MG": "مَلاگَسی (میڑاگاسکار)", + "mk": "میکَڈونیَن", + "mk_MK": "میکَڈونیَن (مٮ۪سوڑونÙیا)", + "ml": "مٔلیالَم", + "ml_IN": "مٔلیالَم (ÛÙنٛدوستان)", + "mn": "مَنٛگولی", + "mn_MN": "مَنٛگولی (مَنٛگولÙیا)", + "mr": "مَرٲٹھÛ", + "mr_IN": "Ù…ÙŽØ±Ù²Ù¹Ú¾Û (ÛÙنٛدوستان)", + "ms": "Ù…ÙŽÙ„ÙŽÛ’", + "ms_BN": "Ù…ÙŽÙ„ÙŽÛ’ (Ø¨ÙØ±Ù†Ù”Û’)", + "ms_MY": "Ù…ÙŽÙ„ÙŽÛ’ (مَلیشÙیا)", + "ms_SG": "Ù…ÙŽÙ„ÙŽÛ’ (ٛسÙنٛگاپوٗر)", + "mt": "مَلتیٖس", + "mt_MT": "مَلتیٖس (مالٹا)", + "my": "بٔمیٖز", + "my_MM": "بٔمیٖز (مَیَنما بٔرما)", + "nb": "ناروییَن بوکمال", + "nb_NO": "ناروییَن بوکمال (ناروے)", + "nb_SJ": "ناروییَن بوکمال (سَوالبریڑ تÛÙ• جان ماییڑ)", + "nd": "Ø´Ùمال ڈَبیل", + "nd_ZW": "Ø´Ùمال ڈَبیل (زÙمبابے)", + "ne": "نیٚپٲلÛ", + "ne_IN": "Ù†ÛŒÙšÙ¾Ù²Ù„Û (ÛÙنٛدوستان)", + "ne_NP": "Ù†ÛŒÙšÙ¾Ù²Ù„Û (نیپال)", + "nl": "ÚˆÙŽÚ†", + "nl_AW": "ÚˆÙŽÚ† (اَروٗبا)", + "nl_BE": "ÚˆÙŽÚ† (بیٛلجÙیَم)", + "nl_BQ": "ÚˆÙŽÚ† (برطانوی Ù‚ÙØ·Ø¨Û٠جَنوٗبی علاقÛÙ•)", + "nl_NL": "ÚˆÙŽÚ† (نیٖدَرلینٛڑ)", + "nl_SR": "ÚˆÙŽÚ† (Ø³ÙØ±Ùنام)", + "nn": "ناروییَن Ù†ÙŽÛ’ نورسک", + "nn_NO": "ناروییَن Ù†ÙŽÛ’ نورسک (ناروے)", + "no": "ناروییَن", + "no_NO": "ناروییَن (ناروے)", + "om": "اوٚرومو", + "om_ET": "اوٚرومو (Ø§ÙØªÚ¾ÙˆÙ¾Ùیا)", + "om_KE": "اوٚرومو (Ú©Ùنٛیا)", + "or": "اوٚرÙیا", + "or_IN": "اوٚرÙیا (ÛÙنٛدوستان)", + "os": "اوٚسیٚٹÙÚ©", + "os_GE": "اوٚسیٚٹÙÚ© (جارجÙیا)", + "os_RU": "اوٚسیٚٹÙÚ© (روٗس)", + "pa": "پَنجٲبÛ", + "pa_Arab": "Ù¾ÙŽÙ†Ø¬Ù²Ø¨Û (اَربی)", + "pa_Arab_PK": "Ù¾ÙŽÙ†Ø¬Ù²Ø¨Û (اَربی, Ù¾Ø§Ú©ÙØ³ØªØ§Ù†)", + "pa_Guru": "Ù¾ÙŽÙ†Ø¬Ù²Ø¨Û (Ú¯ÙØ¬Ø±Ù²ØªÛ)", + "pa_Guru_IN": "Ù¾ÙŽÙ†Ø¬Ù²Ø¨Û (Ú¯ÙØ¬Ø±Ù²ØªÛ, ÛÙنٛدوستان)", + "pa_IN": "Ù¾ÙŽÙ†Ø¬Ù²Ø¨Û (ÛÙنٛدوستان)", + "pa_PK": "Ù¾ÙŽÙ†Ø¬Ù²Ø¨Û (Ù¾Ø§Ú©ÙØ³ØªØ§Ù†)", + "pl": "Ù¾Ø§Ù„ÙØ´", + "pl_PL": "Ù¾Ø§Ù„ÙØ´ (پولینٛڑ)", + "ps": "پَشتوٗ", + "ps_AF": "پَشتوٗ (Ø§ÙŽÙØºØ§Ù†ÙŽØ³ØªØ§Ù†)", + "pt": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز", + "pt_AO": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز (انگولا)", + "pt_BR": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز (برٛازÙÙ„)", + "pt_CH": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز (سÙÙˆÙØ²ÙŽØ±Ù„ینٛڑ)", + "pt_CV": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز (کیپ ؤرڑی)", + "pt_GQ": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز (اÙÚ©ÙˆÙٹورÙیَل Ú¯ÙÙ†ÛŒ)", + "pt_GW": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز (گیٖنی Ø¨ÙØ³Ø§Ùˆ)", + "pt_LU": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز (لَکسَمبٔرٕگ)", + "pt_MO": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز (مَکاوو ایس اے آر چیٖن)", + "pt_MZ": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز (موزَمبÙÚ©)", + "pt_PT": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز (Ù¾ÙØ±ØªÙگال)", + "pt_ST": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز (ساو توم تÛÙ• پرٛنسÙÙ¾ÛŒ)", + "pt_TL": "Ù¾ÙØ±ØªÙŽÚ¯ÛŒÙ–ز (مَشرÙÙ‚ÛŒ تایمور)", + "qu": "Ú©ÙویشÙوا", + "qu_BO": "Ú©ÙویشÙوا (بولÙÙˆÙیا)", + "qu_EC": "Ú©ÙویشÙوا (اÙکواڑور)", + "qu_PE": "Ú©ÙویشÙوا (پیٖروٗ)", + "rm": "رومانش", + "rm_CH": "رومانش (سÙÙˆÙØ²ÙŽØ±Ù„ینٛڑ)", + "rn": "رÙندی", + "rn_BI": "رÙندی (بورَنڈÙ)", + "ro": "رومٲنی", + "ro_MD": "رومٲنی (مولڑاوÙیا)", + "ro_RO": "رومٲنی (رومانÙیا)", + "ru": "روٗسی", + "ru_BY": "روٗسی (بیلاروٗس)", + "ru_KG": "روٗسی (Ú©ÙØ±Ú¯Ùستان)", + "ru_KZ": "روٗسی (Ú©ÙŽØ²Ø§Ú©ÙØ³ØªØ§Ù†)", + "ru_MD": "روٗسی (مولڑاوÙیا)", + "ru_RU": "روٗسی (روٗس)", + "ru_UA": "روٗسی (یوٗرÙکین)", + "rw": "Ú©ÙنیاوÙندا", + "rw_RW": "Ú©ÙنیاوÙندا (روٗوانٛڈا)", + "se": "Ø´Ùمٲلی سَمی", + "se_FI": "Ø´Ùمٲلی سَمی (ÙÙنلینٛڑ)", + "se_NO": "Ø´Ùمٲلی سَمی (ناروے)", + "se_SE": "Ø´Ùمٲلی سَمی (سÙÙˆÙÚˆÙŽÙ†)", + "sg": "سَنگو", + "sg_CF": "سَنگو (مرکٔزی Ø§ÙŽÙØ±ÛŒÙ–Ú©ÛŒ جموٗریَت)", + "sh": "سیٚربو کروشÙیَن", + "sh_BA": "سیٚربو کروشÙیَن (بوسنÙیا تÛÙ• ÛَرزÙگووÙنا)", + "si": "سÙÙ†ÛØ§Ù„ا", + "si_LK": "سÙÙ†ÛØ§Ù„ا (Ø³ÙØ±ÛŒÙ–لَنٛکا)", + "sk": "سلووَک", + "sk_SK": "سلووَک (سَلوواکÙیا)", + "sl": "سلووینیَن", + "sl_SI": "سلووینیَن (سَلووینÙیا)", + "sn": "شونا", + "sn_ZW": "شونا (زÙمبابے)", + "so": "سومٲلی", + "so_DJ": "سومٲلی (Ø¬ÙØ¨ÙˆÙ—تی)", + "so_ET": "سومٲلی (Ø§ÙØªÚ¾ÙˆÙ¾Ùیا)", + "so_KE": "سومٲلی (Ú©Ùنٛیا)", + "so_SO": "سومٲلی (سومالÙیا)", + "sq": "البانÙیَن", + "sq_AL": "البانÙیَن (اٮ۪لبانÙیا)", + "sq_MK": "البانÙیَن (مٮ۪سوڑونÙیا)", + "sr": "سٔربÙیَن", + "sr_BA": "سٔربÙیَن (بوسنÙیا تÛÙ• ÛَرزÙگووÙنا)", + "sr_Cyrl": "سٔربÙیَن (سَیرÙÙ„ÙÚ©)", + "sr_Cyrl_BA": "سٔربÙیَن (سَیرÙÙ„ÙÚ©, بوسنÙیا تÛÙ• ÛَرزÙگووÙنا)", + "sr_Cyrl_ME": "سٔربÙیَن (سَیرÙÙ„ÙÚ©, Ù…ÙˆÙ¹ÙˆÙ†ÛŒÙ›Ú¯ÙØ±ÛŒÙˆ)", + "sr_Cyrl_RS": "سٔربÙیَن (سَیرÙÙ„ÙÚ©, سَربÙیا)", + "sr_Latn": "سٔربÙیَن (لیٹÙÙ†)", + "sr_Latn_BA": "سٔربÙیَن (لیٹÙÙ†, بوسنÙیا تÛÙ• ÛَرزÙگووÙنا)", + "sr_Latn_ME": "سٔربÙیَن (لیٹÙÙ†, Ù…ÙˆÙ¹ÙˆÙ†ÛŒÙ›Ú¯ÙØ±ÛŒÙˆ)", + "sr_Latn_RS": "سٔربÙیَن (لیٹÙÙ†, سَربÙیا)", + "sr_ME": "سٔربÙیَن (Ù…ÙˆÙ¹ÙˆÙ†ÛŒÙ›Ú¯ÙØ±ÛŒÙˆ)", + "sr_RS": "سٔربÙیَن (سَربÙیا)", + "sv": "Ø³ÙˆÛŒÙ–ÚˆÙØ´", + "sv_AX": "Ø³ÙˆÛŒÙ–ÚˆÙØ´ (ایلینٛڑ جٔزیٖرٕ)", + "sv_FI": "Ø³ÙˆÛŒÙ–ÚˆÙØ´ (ÙÙنلینٛڑ)", + "sv_SE": "Ø³ÙˆÛŒÙ–ÚˆÙØ´ (سÙÙˆÙÚˆÙŽÙ†)", + "sw": "سواÛÙÙ„ÛŒ", + "sw_CD": "سواÛÙÙ„ÛŒ (کونٛگو Ú©Ùنشاسا)", + "sw_KE": "سواÛÙÙ„ÛŒ (Ú©Ùنٛیا)", + "sw_TZ": "سواÛÙÙ„ÛŒ (تَنجانÙیا)", + "sw_UG": "سواÛÙÙ„ÛŒ (یوٗگانٛڑا)", + "ta": "تَمÙÙ„", + "ta_IN": "تَمÙÙ„ (ÛÙنٛدوستان)", + "ta_LK": "تَمÙÙ„ (Ø³ÙØ±ÛŒÙ–لَنٛکا)", + "ta_MY": "تَمÙÙ„ (مَلیشÙیا)", + "ta_SG": "تَمÙÙ„ (ٛسÙنٛگاپوٗر)", + "te": "تیلگوٗ", + "te_IN": "تیلگوٗ (ÛÙنٛدوستان)", + "th": "تھاے", + "th_TH": "تھاے (تھایلینٛڑ)", + "ti": "Ù¹ÙگرÙنیا", + "ti_ER": "Ù¹ÙگرÙنیا (Ø§ÙØ±Ù•Ù¹Ùیا)", + "ti_ET": "Ù¹ÙگرÙنیا (Ø§ÙØªÚ¾ÙˆÙ¾Ùیا)", + "tl": "تَماشیک", + "tl_PH": "تَماشیک (ÙÙÙ„ÙÙ¾Ùینس)", + "to": "ٹونٛگا", + "to_TO": "ٹونٛگا (ٹونٛگا)", + "tr": "ØªÙØ±Ú©ÙØ´", + "tr_CY": "ØªÙØ±Ú©ÙØ´ (Ø³Ø§ÛŒÙØ±Ù›Ø³)", + "tr_TR": "ØªÙØ±Ú©ÙØ´ (ØªÙØ±Ú©ÛŒ)", + "uk": "یوٗکرینیٲیی", + "uk_UA": "یوٗکرینیٲیی (یوٗرÙکین)", + "ur": "Ø§ÙØ±Ø¯ÙˆÙ—", + "ur_IN": "Ø§ÙØ±Ø¯ÙˆÙ— (ÛÙنٛدوستان)", + "ur_PK": "Ø§ÙØ±Ø¯ÙˆÙ— (Ù¾Ø§Ú©ÙØ³ØªØ§Ù†)", + "uz": "Ø§ÙØ²Ø¨ÛŒÚ©", + "uz_AF": "Ø§ÙØ²Ø¨ÛŒÚ© (Ø§ÙŽÙØºØ§Ù†ÙŽØ³ØªØ§Ù†)", + "uz_Arab": "Ø§ÙØ²Ø¨ÛŒÚ© (اَربی)", + "uz_Arab_AF": "Ø§ÙØ²Ø¨ÛŒÚ© (اَربی, Ø§ÙŽÙØºØ§Ù†ÙŽØ³ØªØ§Ù†)", + "uz_Cyrl": "Ø§ÙØ²Ø¨ÛŒÚ© (سَیرÙÙ„ÙÚ©)", + "uz_Cyrl_UZ": "Ø§ÙØ²Ø¨ÛŒÚ© (سَیرÙÙ„ÙÚ©, Ø§ÙØ²Ø¨ÙÚ©ÙØ³ØªØ§Ù†)", + "uz_Latn": "Ø§ÙØ²Ø¨ÛŒÚ© (لیٹÙÙ†)", + "uz_Latn_UZ": "Ø§ÙØ²Ø¨ÛŒÚ© (لیٹÙÙ†, Ø§ÙØ²Ø¨ÙÚ©ÙØ³ØªØ§Ù†)", + "uz_UZ": "Ø§ÙØ²Ø¨ÛŒÚ© (Ø§ÙØ²Ø¨ÙÚ©ÙØ³ØªØ§Ù†)", + "vi": "ÙˆÙیَتنَمیٖز", + "vi_VN": "ÙˆÙیَتنَمیٖز (ویٹÙنام)", + "yi": "ÛŒÙØ¯ÙØ´", + "yo": "ÛŒÙˆØ±ÙØ¨Ø§", + "yo_BJ": "ÛŒÙˆØ±ÙØ¨Ø§ (بÙÙ†ÙÙ†)", + "yo_NG": "ÛŒÙˆØ±ÙØ¨Ø§ (نایجیرÙیا)", + "zh": "چیٖنی", + "zh_CN": "چیٖنی (چیٖن)", + "zh_HK": "چیٖنی (ÛØ§Ù†Ù›Ú¯ کانٛگ ایس اے آر چیٖن)", + "zh_Hans": "چیٖنی (سÙمپلÙÙØ§ÛŒÙÚ‘ ÛØ§Ù†)", + "zh_Hans_CN": "چیٖنی (سÙمپلÙÙØ§ÛŒÙÚ‘ ÛØ§Ù†, چیٖن)", + "zh_Hans_HK": "چیٖنی (سÙمپلÙÙØ§ÛŒÙÚ‘ ÛØ§Ù†, ÛØ§Ù†Ù›Ú¯ کانٛگ ایس اے آر چیٖن)", + "zh_Hans_MO": "چیٖنی (سÙمپلÙÙØ§ÛŒÙÚ‘ ÛØ§Ù†, مَکاوو ایس اے آر چیٖن)", + "zh_Hans_SG": "چیٖنی (سÙمپلÙÙØ§ÛŒÙÚ‘ ÛØ§Ù†, ٛسÙنٛگاپوٗر)", + "zh_Hant": "چیٖنی (Ù¹Ø±ÛŒÚ‘ÙØ´ÙŽÙ†ÙŽÙ„)", + "zh_Hant_HK": "چیٖنی (Ù¹Ø±ÛŒÚ‘ÙØ´ÙŽÙ†ÙŽÙ„, ÛØ§Ù†Ù›Ú¯ کانٛگ ایس اے آر چیٖن)", + "zh_Hant_MO": "چیٖنی (Ù¹Ø±ÛŒÚ‘ÙØ´ÙŽÙ†ÙŽÙ„, مَکاوو ایس اے آر چیٖن)", + "zh_Hant_TW": "چیٖنی (Ù¹Ø±ÛŒÚ‘ÙØ´ÙŽÙ†ÙŽÙ„, تایوان)", + "zh_MO": "چیٖنی (مَکاوو ایس اے آر چیٖن)", + "zh_SG": "چیٖنی (ٛسÙنٛگاپوٗر)", + "zh_TW": "چیٖنی (تایوان)", + "zu": "زÙلوٗ", + "zu_ZA": "زÙلوٗ (جَنوٗبی Ø§ÙŽÙØ±ÛŒÙ–کا)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/kw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/kw.json new file mode 100644 index 0000000000000000000000000000000000000000..c542151f0a548816cbead456b5a3a9834232f15d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/kw.json @@ -0,0 +1,6 @@ +{ + "Names": { + "kw": "kernewek", + "kw_GB": "kernewek (Rywvaneth Unys)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ky.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ky.json new file mode 100644 index 0000000000000000000000000000000000000000..a2ae156d8c744fa75ac71c862cab97645b53090c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ky.json @@ -0,0 +1,566 @@ +{ + "Names": { + "af": "африкаанча", + "af_NA": "африкаанча (ÐамибиÑ)", + "af_ZA": "африкаанча (Түштүк Ðфрика РеÑпубликаÑÑ‹)", + "ak": "аканча", + "ak_GH": "аканча (Гана)", + "am": "амхарча", + "am_ET": "амхарча (ЭфиопиÑ)", + "ar": "арабча", + "ar_AE": "арабча (Бириккен Ðраб Эмираттары)", + "ar_BH": "арабча (Бахрейн)", + "ar_DJ": "арабча (Джибути)", + "ar_DZ": "арабча (Ðлжир)", + "ar_EG": "арабча (Египет)", + "ar_EH": "арабча (Батыш Сахара)", + "ar_ER": "арабча (ЭритреÑ)", + "ar_IL": "арабча (Израиль)", + "ar_IQ": "арабча (Ирак)", + "ar_JO": "арабча (ИорданиÑ)", + "ar_KM": "арабча (КомороÑ)", + "ar_KW": "арабча (Кувейт)", + "ar_LB": "арабча (Ливан)", + "ar_LY": "арабча (ЛивиÑ)", + "ar_MA": "арабча (Марокко)", + "ar_MR": "арабча (МавританиÑ)", + "ar_OM": "арабча (Оман)", + "ar_PS": "арабча (ПалеÑтина аймактары)", + "ar_QA": "арабча (Катар)", + "ar_SA": "арабча (Сауд ÐрабиÑÑÑ‹)", + "ar_SD": "арабча (Судан)", + "ar_SO": "арабча (Сомали)", + "ar_SS": "арабча (Түштүк Судан)", + "ar_SY": "арабча (СириÑ)", + "ar_TD": "арабча (Чад)", + "ar_TN": "арабча (ТуниÑ)", + "ar_YE": "арабча (Йемен)", + "as": "аÑÑамча", + "as_IN": "аÑÑамча (ИндиÑ)", + "az": "азербайжанча", + "az_AZ": "азербайжанча (Ðзербайжан)", + "az_Cyrl": "азербайжанча (Кирилл)", + "az_Cyrl_AZ": "азербайжанча (Кирилл, Ðзербайжан)", + "az_Latn": "азербайжанча (Латын)", + "az_Latn_AZ": "азербайжанча (Латын, Ðзербайжан)", + "be": "беларуÑча", + "be_BY": "беларуÑча (БеларуÑÑŒ)", + "bg": "болгарча", + "bg_BG": "болгарча (БолгариÑ)", + "bm": "бамбарача", + "bm_ML": "бамбарача (Мали)", + "bn": "бангладешче", + "bn_BD": "бангладешче (Бангладеш)", + "bn_IN": "бангладешче (ИндиÑ)", + "bo": "тибетче", + "bo_CN": "тибетче (Кытай)", + "bo_IN": "тибетче (ИндиÑ)", + "br": "бретончо", + "br_FR": "бретончо (ФранциÑ)", + "bs": "боÑнийче", + "bs_BA": "боÑнийче (БоÑÐ½Ð¸Ñ Ð¶Ð°Ð½Ð° Герцеговина)", + "bs_Cyrl": "боÑнийче (Кирилл)", + "bs_Cyrl_BA": "боÑнийче (Кирилл, БоÑÐ½Ð¸Ñ Ð¶Ð°Ð½Ð° Герцеговина)", + "bs_Latn": "боÑнийче (Латын)", + "bs_Latn_BA": "боÑнийче (Латын, БоÑÐ½Ð¸Ñ Ð¶Ð°Ð½Ð° Герцеговина)", + "ca": "каталанча", + "ca_AD": "каталанча (Ðндорра)", + "ca_ES": "каталанча (ИÑпаниÑ)", + "ca_FR": "каталанча (ФранциÑ)", + "ca_IT": "каталанча (ИталиÑ)", + "ce": "чеченче", + "ce_RU": "чеченче (РоÑÑиÑ)", + "cs": "чехче", + "cs_CZ": "чехче (Чех РеÑпубликаÑÑ‹)", + "cy": "уелшче", + "cy_GB": "уелшче (Улуу БританиÑ)", + "da": "датча", + "da_DK": "датча (ДаниÑ)", + "da_GL": "датча (ГренландиÑ)", + "de": "немиÑче", + "de_AT": "немиÑче (ÐвÑтриÑ)", + "de_BE": "немиÑче (БельгиÑ)", + "de_CH": "немиÑче (ШвейцариÑ)", + "de_DE": "немиÑче (ГерманиÑ)", + "de_IT": "немиÑче (ИталиÑ)", + "de_LI": "немиÑче (Лихтенштейн)", + "de_LU": "немиÑче (ЛюкÑембург)", + "dz": "жонгуча", + "dz_BT": "жонгуча (Бутан)", + "ee": "Ñбече", + "ee_GH": "Ñбече (Гана)", + "ee_TG": "Ñбече (Того)", + "el": "грекче", + "el_CY": "грекче (Кипр)", + "el_GR": "грекче (ГрециÑ)", + "en": "англиÑче", + "en_AG": "англиÑче (Ðнтигуа жана Барбуда)", + "en_AI": "англиÑче (Ðнгуила)", + "en_AS": "англиÑче (Ðмерика СамоаÑÑ‹)", + "en_AT": "англиÑче (ÐвÑтриÑ)", + "en_AU": "англиÑче (ÐвÑтралиÑ)", + "en_BB": "англиÑче (БарбадоÑ)", + "en_BE": "англиÑче (БельгиÑ)", + "en_BI": "англиÑче (Бурунди)", + "en_BM": "англиÑче (Бермуд аралдары)", + "en_BS": "англиÑче (Багам аралдары)", + "en_BW": "англиÑче (БотÑвана)", + "en_BZ": "англиÑче (Белиз)", + "en_CA": "англиÑче (Канада)", + "en_CC": "англиÑче (ÐšÐ¾ÐºÐ¾Ñ (Килиӊ) аралдары)", + "en_CH": "англиÑче (ШвейцариÑ)", + "en_CK": "англиÑче (Кук аралдары)", + "en_CM": "англиÑче (Камерун)", + "en_CX": "англиÑче (КриÑÐ¼Ð°Ñ Ð°Ñ€Ð°Ð»Ñ‹)", + "en_CY": "англиÑче (Кипр)", + "en_DE": "англиÑче (ГерманиÑ)", + "en_DG": "англиÑче (Диего ГарÑиÑ)", + "en_DK": "англиÑче (ДаниÑ)", + "en_DM": "англиÑче (Доминика)", + "en_ER": "англиÑче (ЭритреÑ)", + "en_FI": "англиÑче (ФинлÑндиÑ)", + "en_FJ": "англиÑче (Фиджи)", + "en_FK": "англиÑче (ФолклÑнд аралдары)", + "en_FM": "англиÑче (МикронезиÑ)", + "en_GB": "англиÑче (Улуу БританиÑ)", + "en_GD": "англиÑче (Гренада)", + "en_GG": "англиÑче (ГернÑи)", + "en_GH": "англиÑче (Гана)", + "en_GI": "англиÑче (Гибралтар)", + "en_GM": "англиÑче (ГамбиÑ)", + "en_GU": "англиÑче (Гуам)", + "en_GY": "англиÑче (Гайана)", + "en_HK": "англиÑче (Гонконг Кытай ÐÐÐ)", + "en_IE": "англиÑче (ИрландиÑ)", + "en_IL": "англиÑче (Израиль)", + "en_IM": "англиÑче (МÑн аралы)", + "en_IN": "англиÑче (ИндиÑ)", + "en_IO": "англиÑче (БританиÑнын Ð˜Ð½Ð´Ð¸Ñ Ð¾ÐºÐµÐ°Ð½Ñ‹Ð½Ð´Ð°Ð³Ñ‹ аймагы)", + "en_JE": "англиÑче (ЖерÑи)", + "en_JM": "англиÑче (Ямайка)", + "en_KE": "англиÑче (КениÑ)", + "en_KI": "англиÑче (Кирибати)", + "en_KN": "англиÑче (Сент-ÐšÐ¸Ñ‚Ñ Ð¶Ð°Ð½Ð° ÐевиÑ)", + "en_KY": "англиÑче (Кайман Ðралдары)", + "en_LC": "англиÑче (Сент-ЛюÑиÑ)", + "en_LR": "англиÑче (ЛибериÑ)", + "en_LS": "англиÑче (ЛеÑото)", + "en_MG": "англиÑче (МадагаÑкар)", + "en_MH": "англиÑче (Маршалл аралдары)", + "en_MO": "англиÑче (Макау Кытай ÐÐÐ)", + "en_MP": "англиÑче (Түндүк Мариана аралдары)", + "en_MS": "англиÑче (МонÑеррат)", + "en_MT": "англиÑче (Мальта)", + "en_MU": "англиÑче (Маврикий)", + "en_MW": "англиÑче (Малави)", + "en_MY": "англиÑче (МалайзиÑ)", + "en_NA": "англиÑче (ÐамибиÑ)", + "en_NF": "англиÑче (Ðорфолк аралы)", + "en_NG": "англиÑче (ÐигериÑ)", + "en_NL": "англиÑче (Ðидерланддар)", + "en_NR": "англиÑче (Ðауру)", + "en_NU": "англиÑче (ÐиуÑ)", + "en_NZ": "англиÑче (Жаӊы ЗеландиÑ)", + "en_PG": "англиÑче (Папуа Жаңы-ГвинеÑ)", + "en_PH": "англиÑче (Филлипин)", + "en_PK": "англиÑче (ПакиÑтан)", + "en_PN": "англиÑче (ПиткÑрн аралдары)", + "en_PR": "англиÑче (ПуÑрто-Рико)", + "en_PW": "англиÑче (Палау)", + "en_RW": "англиÑче (Руанда)", + "en_SB": "англиÑче (Соломон аралдары)", + "en_SC": "англиÑче (Сейшелдер)", + "en_SD": "англиÑче (Судан)", + "en_SE": "англиÑче (ШвециÑ)", + "en_SG": "англиÑче (Сингапур)", + "en_SH": "англиÑче (Ыйык Елена)", + "en_SI": "англиÑче (СловениÑ)", + "en_SL": "англиÑче (Сьерра-Леоне)", + "en_SS": "англиÑче (Түштүк Судан)", + "en_SX": "англиÑче (Синт Маартен)", + "en_SZ": "англиÑче (Свазиленд)", + "en_TC": "англиÑче (Ð¢Ò¯Ñ€ÐºÑ Ð¶Ð°Ð½Ð° ÐšÐ°Ð¹ÐºÐ¾Ñ Ð°Ñ€Ð°Ð»Ð´Ð°Ñ€Ñ‹)", + "en_TK": "англиÑче (Токелау)", + "en_TO": "англиÑче (Тонга)", + "en_TT": "англиÑче (Тринидад жана Тобаго)", + "en_TV": "англиÑче (Тувалу)", + "en_TZ": "англиÑче (ТанзаниÑ)", + "en_UG": "англиÑче (Уганда)", + "en_UM": "англиÑче (ÐКШнын Ñырткы аралдары)", + "en_US": "англиÑче (Ðмерика Кошмо Штаттары)", + "en_VC": "англиÑче (Сент-ВинÑент жана Гренадиналар)", + "en_VG": "англиÑче (Виргин аралдары (БританиÑ))", + "en_VI": "англиÑче (Виргин аралдары (ÐКШ))", + "en_VU": "англиÑче (Вануату)", + "en_WS": "англиÑче (Самоа)", + "en_ZA": "англиÑче (Түштүк Ðфрика РеÑпубликаÑÑ‹)", + "en_ZM": "англиÑче (ЗамбиÑ)", + "en_ZW": "англиÑче (Зимбабве)", + "eo": "ÑÑперанто", + "es": "иÑпанча", + "es_AR": "иÑпанча (Ðргентина)", + "es_BO": "иÑпанча (БоливиÑ)", + "es_BR": "иÑпанча (БразилиÑ)", + "es_CL": "иÑпанча (Чили)", + "es_CO": "иÑпанча (КолумбиÑ)", + "es_CR": "иÑпанча (КоÑта-Рика)", + "es_CU": "иÑпанча (Куба)", + "es_DO": "иÑпанча (Доминика РеÑпубликаÑÑ‹)", + "es_EA": "иÑпанча (Сеута жана Мелилла)", + "es_EC": "иÑпанча (Эквадор)", + "es_ES": "иÑпанча (ИÑпаниÑ)", + "es_GQ": "иÑпанча (Экваториалдык ГвинеÑ)", + "es_GT": "иÑпанча (Гватемала)", + "es_HN": "иÑпанча (ГондураÑ)", + "es_IC": "иÑпанча (Канар аралдары)", + "es_MX": "иÑпанча (МекÑика)", + "es_NI": "иÑпанча (Ðикарагуа)", + "es_PA": "иÑпанча (Панама)", + "es_PE": "иÑпанча (Перу)", + "es_PH": "иÑпанча (Филлипин)", + "es_PR": "иÑпанча (ПуÑрто-Рико)", + "es_PY": "иÑпанча (Парагвай)", + "es_SV": "иÑпанча (Эл Салвадор)", + "es_US": "иÑпанча (Ðмерика Кошмо Штаттары)", + "es_UY": "иÑпанча (Уругвай)", + "es_VE": "иÑпанча (ВенеÑуÑла)", + "et": "ÑÑтончо", + "et_EE": "ÑÑтончо (ЭÑтониÑ)", + "eu": "баÑкча", + "eu_ES": "баÑкча (ИÑпаниÑ)", + "fa": "фарÑча", + "fa_AF": "фарÑча (ÐфганиÑтан)", + "fa_IR": "фарÑча (Иран)", + "ff": "фулача", + "ff_CM": "фулача (Камерун)", + "ff_GN": "фулача (ГвинеÑ)", + "ff_MR": "фулача (МавританиÑ)", + "ff_SN": "фулача (Сенегал)", + "fi": "финче", + "fi_FI": "финче (ФинлÑндиÑ)", + "fo": "фароÑче", + "fo_DK": "фароÑче (ДаниÑ)", + "fo_FO": "фароÑче (Фарер аралдары)", + "fr": "французча", + "fr_BE": "французча (БельгиÑ)", + "fr_BF": "французча (Буркина-ФаÑо)", + "fr_BI": "французча (Бурунди)", + "fr_BJ": "французча (Бенин)", + "fr_BL": "французча (Сент Бартелеми)", + "fr_CA": "французча (Канада)", + "fr_CD": "французча (Конго-КиншаÑа)", + "fr_CF": "французча (Борбордук Ðфрика РеÑпубликаÑÑ‹)", + "fr_CG": "французча (Конго-Браззавил)", + "fr_CH": "французча (ШвейцариÑ)", + "fr_CI": "французча (Кот-д’Ивуар)", + "fr_CM": "французча (Камерун)", + "fr_DJ": "французча (Джибути)", + "fr_DZ": "французча (Ðлжир)", + "fr_FR": "французча (ФранциÑ)", + "fr_GA": "французча (Габон)", + "fr_GF": "французча (Гвиана (ФранциÑ))", + "fr_GN": "французча (ГвинеÑ)", + "fr_GP": "французча (Гваделупа)", + "fr_GQ": "французча (Экваториалдык ГвинеÑ)", + "fr_HT": "французча (Гаити)", + "fr_KM": "французча (КомороÑ)", + "fr_LU": "французча (ЛюкÑембург)", + "fr_MA": "французча (Марокко)", + "fr_MC": "французча (Монако)", + "fr_MF": "французча (Сент-Мартин)", + "fr_MG": "французча (МадагаÑкар)", + "fr_ML": "французча (Мали)", + "fr_MQ": "французча (Мартиника)", + "fr_MR": "французча (МавританиÑ)", + "fr_MU": "французча (Маврикий)", + "fr_NC": "французча (Жаӊы КаледониÑ)", + "fr_NE": "французча (Ðигер)", + "fr_PF": "французча (Француз ПолинезиÑÑÑ‹)", + "fr_PM": "французча (Сен-Пьер жана Микелон)", + "fr_RE": "французча (Реюнион)", + "fr_RW": "французча (Руанда)", + "fr_SC": "французча (Сейшелдер)", + "fr_SN": "французча (Сенегал)", + "fr_SY": "французча (СириÑ)", + "fr_TD": "французча (Чад)", + "fr_TG": "французча (Того)", + "fr_TN": "французча (ТуниÑ)", + "fr_VU": "французча (Вануату)", + "fr_WF": "французча (Ð£Ð¾Ð»Ð»Ð¸Ñ Ð¶Ð°Ð½Ð° Футуна)", + "fr_YT": "французча (Майотта)", + "fy": "батыш фризче", + "fy_NL": "батыш фризче (Ðидерланддар)", + "ga": "ирландча", + "ga_IE": "ирландча (ИрландиÑ)", + "gd": "кельтче", + "gd_GB": "кельтче (Улуу БританиÑ)", + "gl": "галиÑиÑча", + "gl_ES": "галиÑиÑча (ИÑпаниÑ)", + "gu": "гужаратча", + "gu_IN": "гужаратча (ИндиÑ)", + "gv": "манкÑыча", + "gv_IM": "манкÑыча (МÑн аралы)", + "ha": "хауÑача", + "ha_GH": "хауÑача (Гана)", + "ha_NE": "хауÑача (Ðигер)", + "ha_NG": "хауÑача (ÐигериÑ)", + "he": "ивритте", + "he_IL": "ивритте (Израиль)", + "hi": "хиндиче", + "hi_IN": "хиндиче (ИндиÑ)", + "hr": "хорватча", + "hr_BA": "хорватча (БоÑÐ½Ð¸Ñ Ð¶Ð°Ð½Ð° Герцеговина)", + "hr_HR": "хорватча (ХорватиÑ)", + "hu": "венгерче", + "hu_HU": "венгерче (ВенгриÑ)", + "hy": "армÑнча", + "hy_AM": "армÑнча (ÐрмениÑ)", + "id": "индонезче", + "id_ID": "индонезче (ИндонезиÑ)", + "ig": "игбочо", + "ig_NG": "игбочо (ÐигериÑ)", + "ii": "Ñычуань йиче", + "ii_CN": "Ñычуань йиче (Кытай)", + "is": "иÑландча", + "is_IS": "иÑландча (ИÑландиÑ)", + "it": "италиÑнча", + "it_CH": "италиÑнча (ШвейцариÑ)", + "it_IT": "италиÑнча (ИталиÑ)", + "it_SM": "италиÑнча (Сан Марино)", + "ja": "жапончо", + "ja_JP": "жапончо (ЯпониÑ)", + "ka": "грузинче", + "ka_GE": "грузинче (ГрузиÑ)", + "ki": "кикуйиче", + "ki_KE": "кикуйиче (КениÑ)", + "kk": "казакча", + "kk_KZ": "казакча (КазакÑтан)", + "kl": "калаалиÑутча", + "kl_GL": "калаалиÑутча (ГренландиÑ)", + "km": "кмерче", + "km_KH": "кмерче (Камбоджа)", + "kn": "каннадача", + "kn_IN": "каннадача (ИндиÑ)", + "ko": "корейче", + "ko_KP": "корейче (Түндүк КореÑ)", + "ko_KR": "корейче (Түштүк КореÑ)", + "ks": "кашмирче", + "ks_IN": "кашмирче (ИндиÑ)", + "kw": "корнишче", + "kw_GB": "корнишче (Улуу БританиÑ)", + "ky": "кыргызча", + "ky_KG": "кыргызча (КыргызÑтан)", + "lb": "люкÑембургча", + "lb_LU": "люкÑембургча (ЛюкÑембург)", + "lg": "гандача", + "lg_UG": "гандача (Уганда)", + "ln": "лингалача", + "ln_AO": "лингалача (Ðнгола)", + "ln_CD": "лингалача (Конго-КиншаÑа)", + "ln_CF": "лингалача (Борбордук Ðфрика РеÑпубликаÑÑ‹)", + "ln_CG": "лингалача (Конго-Браззавил)", + "lo": "лаочо", + "lo_LA": "лаочо (ЛаоÑ)", + "lt": "литовчо", + "lt_LT": "литовчо (Литва)", + "lu": "луба-катангача", + "lu_CD": "луба-катангача (Конго-КиншаÑа)", + "lv": "латышча", + "lv_LV": "латышча (ЛатвиÑ)", + "mg": "малагаÑча", + "mg_MG": "малагаÑча (МадагаÑкар)", + "mk": "македончо", + "mk_MK": "македончо (МакедониÑ)", + "ml": "малайаламча", + "ml_IN": "малайаламча (ИндиÑ)", + "mn": "монголчо", + "mn_MN": "монголчо (МонголиÑ)", + "mr": "маратиче", + "mr_IN": "маратиче (ИндиÑ)", + "ms": "малайча", + "ms_BN": "малайча (Бруней)", + "ms_MY": "малайча (МалайзиÑ)", + "ms_SG": "малайча (Сингапур)", + "mt": "малтизче", + "mt_MT": "малтизче (Мальта)", + "my": "бурмача", + "my_MM": "бурмача (МьÑнма (Бирма))", + "nb": "норвежче (Букмал)", + "nb_NO": "норвежче (ÐорвегиÑ)", + "nb_SJ": "норвежче (Свалбард жана Жан Майен)", + "nd": "түндүк ндыбелче", + "nd_ZW": "түндүк ндыбелче (Зимбабве)", + "ne": "непалча", + "ne_IN": "непалча (ИндиÑ)", + "ne_NP": "непалча (Ðепал)", + "nl": "голландча", + "nl_AW": "голландча (Ðруба)", + "nl_BE": "голландча (БельгиÑ)", + "nl_BQ": "голландча (Кариб Ðидерланддары)", + "nl_CW": "голландча (КюраÑао)", + "nl_NL": "голландча (Ðидерланддар)", + "nl_SR": "голландча (Суринаме)", + "nl_SX": "голландча (Синт Маартен)", + "nn": "норвежче (ÐинорÑк)", + "nn_NO": "норвежче (ÐорвегиÑ)", + "no": "норвежче", + "no_NO": "норвежче (ÐорвегиÑ)", + "om": "оромочо", + "om_ET": "оромочо (ЭфиопиÑ)", + "om_KE": "оромочо (КениÑ)", + "or": "ориÑча", + "or_IN": "ориÑча (ИндиÑ)", + "os": "оÑетинче", + "os_GE": "оÑетинче (ГрузиÑ)", + "os_RU": "оÑетинче (РоÑÑиÑ)", + "pa": "пунжабиче", + "pa_Arab": "пунжабиче (Ðраб)", + "pa_Arab_PK": "пунжабиче (Ðраб, ПакиÑтан)", + "pa_Guru": "пунжабиче (Гурмухи)", + "pa_Guru_IN": "пунжабиче (Гурмухи, ИндиÑ)", + "pa_IN": "пунжабиче (ИндиÑ)", + "pa_PK": "пунжабиче (ПакиÑтан)", + "pl": "полÑкча", + "pl_PL": "полÑкча (Польша)", + "ps": "пуштуча", + "ps_AF": "пуштуча (ÐфганиÑтан)", + "pt": "португалча", + "pt_AO": "португалча (Ðнгола)", + "pt_BR": "португалча (БразилиÑ)", + "pt_CH": "португалча (ШвейцариÑ)", + "pt_CV": "португалча (Капе Верде)", + "pt_GQ": "португалча (Экваториалдык ГвинеÑ)", + "pt_GW": "португалча (ГвинеÑ-БиÑау)", + "pt_LU": "португалча (ЛюкÑембург)", + "pt_MO": "португалча (Макау Кытай ÐÐÐ)", + "pt_MZ": "португалча (Мозамбик)", + "pt_PT": "португалча (ПортугалиÑ)", + "pt_ST": "португалча (Сан-Томе жана ПринÑипи)", + "pt_TL": "португалча (Тимор-ЛеÑте)", + "qu": "кечуача", + "qu_BO": "кечуача (БоливиÑ)", + "qu_EC": "кечуача (Эквадор)", + "qu_PE": "кечуача (Перу)", + "rm": "романшча", + "rm_CH": "романшча (ШвейцариÑ)", + "rn": "рундиче", + "rn_BI": "рундиче (Бурунди)", + "ro": "румынча", + "ro_MD": "румынча (Молдова)", + "ro_RO": "румынча (РумыниÑ)", + "ru": "оруÑча", + "ru_BY": "оруÑча (БеларуÑÑŒ)", + "ru_KG": "оруÑча (КыргызÑтан)", + "ru_KZ": "оруÑча (КазакÑтан)", + "ru_MD": "оруÑча (Молдова)", + "ru_RU": "оруÑча (РоÑÑиÑ)", + "ru_UA": "оруÑча (Украина)", + "rw": "руандача", + "rw_RW": "руандача (Руанда)", + "se": "түндүк Ñамиче", + "se_FI": "түндүк Ñамиче (ФинлÑндиÑ)", + "se_NO": "түндүк Ñамиче (ÐорвегиÑ)", + "se_SE": "түндүк Ñамиче (ШвециÑ)", + "sg": "Ñангочо", + "sg_CF": "Ñангочо (Борбордук Ðфрика РеÑпубликаÑÑ‹)", + "sh": "Ñерб-хорват", + "sh_BA": "Ñерб-хорват (БоÑÐ½Ð¸Ñ Ð¶Ð°Ð½Ð° Герцеговина)", + "si": "Ñингалача", + "si_LK": "Ñингалача (Шри-Ланка)", + "sk": "Ñловакча", + "sk_SK": "Ñловакча (СловакиÑ)", + "sl": "Ñловенче", + "sl_SI": "Ñловенче (СловениÑ)", + "sn": "шонача", + "sn_ZW": "шонача (Зимбабве)", + "so": "Ñомаличе", + "so_DJ": "Ñомаличе (Джибути)", + "so_ET": "Ñомаличе (ЭфиопиÑ)", + "so_KE": "Ñомаличе (КениÑ)", + "so_SO": "Ñомаличе (Сомали)", + "sq": "албанча", + "sq_AL": "албанча (ÐлбаниÑ)", + "sq_MK": "албанча (МакедониÑ)", + "sq_XK": "албанча (КоÑово)", + "sr": "Ñербче", + "sr_BA": "Ñербче (БоÑÐ½Ð¸Ñ Ð¶Ð°Ð½Ð° Герцеговина)", + "sr_Cyrl": "Ñербче (Кирилл)", + "sr_Cyrl_BA": "Ñербче (Кирилл, БоÑÐ½Ð¸Ñ Ð¶Ð°Ð½Ð° Герцеговина)", + "sr_Cyrl_ME": "Ñербче (Кирилл, ЧерногориÑ)", + "sr_Cyrl_RS": "Ñербче (Кирилл, СербиÑ)", + "sr_Cyrl_XK": "Ñербче (Кирилл, КоÑово)", + "sr_Latn": "Ñербче (Латын)", + "sr_Latn_BA": "Ñербче (Латын, БоÑÐ½Ð¸Ñ Ð¶Ð°Ð½Ð° Герцеговина)", + "sr_Latn_ME": "Ñербче (Латын, ЧерногориÑ)", + "sr_Latn_RS": "Ñербче (Латын, СербиÑ)", + "sr_Latn_XK": "Ñербче (Латын, КоÑово)", + "sr_ME": "Ñербче (ЧерногориÑ)", + "sr_RS": "Ñербче (СербиÑ)", + "sr_XK": "Ñербче (КоÑово)", + "sv": "шведче", + "sv_AX": "шведче (Ðланд аралдары)", + "sv_FI": "шведче (ФинлÑндиÑ)", + "sv_SE": "шведче (ШвециÑ)", + "sw": "Ñуахиличе", + "sw_CD": "Ñуахиличе (Конго-КиншаÑа)", + "sw_KE": "Ñуахиличе (КениÑ)", + "sw_TZ": "Ñуахиличе (ТанзаниÑ)", + "sw_UG": "Ñуахиличе (Уганда)", + "ta": "тамилче", + "ta_IN": "тамилче (ИндиÑ)", + "ta_LK": "тамилче (Шри-Ланка)", + "ta_MY": "тамилче (МалайзиÑ)", + "ta_SG": "тамилче (Сингапур)", + "te": "телугуча", + "te_IN": "телугуча (ИндиÑ)", + "th": "тайча", + "th_TH": "тайча (Таиланд)", + "ti": "тигриниача", + "ti_ER": "тигриниача (ЭритреÑ)", + "ti_ET": "тигриниача (ЭфиопиÑ)", + "to": "тонгача", + "to_TO": "тонгача (Тонга)", + "tr": "түркчө", + "tr_CY": "түркчө (Кипр)", + "tr_TR": "түркчө (ТүркиÑ)", + "ug": "уйгурча", + "ug_CN": "уйгурча (Кытай)", + "uk": "украинче", + "uk_UA": "украинче (Украина)", + "ur": "урдуча", + "ur_IN": "урдуча (ИндиÑ)", + "ur_PK": "урдуча (ПакиÑтан)", + "uz": "өзбекче", + "uz_AF": "өзбекче (ÐфганиÑтан)", + "uz_Arab": "өзбекче (Ðраб)", + "uz_Arab_AF": "өзбекче (Ðраб, ÐфганиÑтан)", + "uz_Cyrl": "өзбекче (Кирилл)", + "uz_Cyrl_UZ": "өзбекче (Кирилл, ӨзбекÑтан)", + "uz_Latn": "өзбекче (Латын)", + "uz_Latn_UZ": "өзбекче (Латын, ӨзбекÑтан)", + "uz_UZ": "өзбекче (ӨзбекÑтан)", + "vi": "вьетнамча", + "vi_VN": "вьетнамча (Вьетнам)", + "yi": "идишче", + "yo": "йорубача", + "yo_BJ": "йорубача (Бенин)", + "yo_NG": "йорубача (ÐигериÑ)", + "zh": "кытайча", + "zh_CN": "кытайча (Кытай)", + "zh_HK": "кытайча (Гонконг Кытай ÐÐÐ)", + "zh_Hans": "кытайча (Жөнөкөйлөштүрүлгөн)", + "zh_Hans_CN": "кытайча (Жөнөкөйлөштүрүлгөн, Кытай)", + "zh_Hans_HK": "кытайча (Жөнөкөйлөштүрүлгөн, Гонконг Кытай ÐÐÐ)", + "zh_Hans_MO": "кытайча (Жөнөкөйлөштүрүлгөн, Макау Кытай ÐÐÐ)", + "zh_Hans_SG": "кытайча (Жөнөкөйлөштүрүлгөн, Сингапур)", + "zh_Hant": "кытайча (Салттуу)", + "zh_Hant_HK": "кытайча (Салттуу, Гонконг Кытай ÐÐÐ)", + "zh_Hant_MO": "кытайча (Салттуу, Макау Кытай ÐÐÐ)", + "zh_Hant_TW": "кытайча (Салттуу, Тайвань)", + "zh_MO": "кытайча (Макау Кытай ÐÐÐ)", + "zh_SG": "кытайча (Сингапур)", + "zh_TW": "кытайча (Тайвань)", + "zu": "зулуча", + "zu_ZA": "зулуча (Түштүк Ðфрика РеÑпубликаÑÑ‹)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lb.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lb.json new file mode 100644 index 0000000000000000000000000000000000000000..3a949952a8e8820de2bd57d4fb9085281d957bdc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lb.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Afrikaans", + "af_NA": "Afrikaans (Namibia)", + "af_ZA": "Afrikaans (Südafrika)", + "ak": "Akan", + "ak_GH": "Akan (Ghana)", + "am": "Amharesch", + "am_ET": "Amharesch (Ethiopien)", + "ar": "Arabesch", + "ar_AE": "Arabesch (Vereenegt Arabesch Emirater)", + "ar_BH": "Arabesch (Bahrain)", + "ar_DJ": "Arabesch (Dschibuti)", + "ar_DZ": "Arabesch (Algerien)", + "ar_EG": "Arabesch (Egypten)", + "ar_EH": "Arabesch (Westsahara)", + "ar_ER": "Arabesch (Eritrea)", + "ar_IL": "Arabesch (Israel)", + "ar_IQ": "Arabesch (Irak)", + "ar_JO": "Arabesch (Jordanien)", + "ar_KM": "Arabesch (Komoren)", + "ar_KW": "Arabesch (Kuwait)", + "ar_LB": "Arabesch (Libanon)", + "ar_LY": "Arabesch (Libyen)", + "ar_MA": "Arabesch (Marokko)", + "ar_MR": "Arabesch (Mauretanien)", + "ar_OM": "Arabesch (Oman)", + "ar_PS": "Arabesch (Palestinensesch Autonomiegebidder)", + "ar_QA": "Arabesch (Katar)", + "ar_SA": "Arabesch (Saudi-Arabien)", + "ar_SD": "Arabesch (Sudan)", + "ar_SO": "Arabesch (Somalia)", + "ar_SS": "Arabesch (Südsudan)", + "ar_SY": "Arabesch (Syrien)", + "ar_TD": "Arabesch (Tschad)", + "ar_TN": "Arabesch (Tunesien)", + "ar_YE": "Arabesch (Jemen)", + "as": "Assamesesch", + "as_IN": "Assamesesch (Indien)", + "az": "Aserbaidschanesch", + "az_AZ": "Aserbaidschanesch (Aserbaidschan)", + "az_Cyrl": "Aserbaidschanesch (Kyrillesch)", + "az_Cyrl_AZ": "Aserbaidschanesch (Kyrillesch, Aserbaidschan)", + "az_Latn": "Aserbaidschanesch (Laténgesch)", + "az_Latn_AZ": "Aserbaidschanesch (Laténgesch, Aserbaidschan)", + "be": "Wäissrussesch", + "be_BY": "Wäissrussesch (Wäissrussland)", + "bg": "Bulgaresch", + "bg_BG": "Bulgaresch (Bulgarien)", + "bm": "Bambara-Sprooch", + "bm_ML": "Bambara-Sprooch (Mali)", + "bn": "Bengalesch", + "bn_BD": "Bengalesch (Bangladesch)", + "bn_IN": "Bengalesch (Indien)", + "bo": "Tibetesch", + "bo_CN": "Tibetesch (China)", + "bo_IN": "Tibetesch (Indien)", + "br": "Bretonesch", + "br_FR": "Bretonesch (Frankräich)", + "bs": "Bosnesch", + "bs_BA": "Bosnesch (Bosnien an Herzegowina)", + "bs_Cyrl": "Bosnesch (Kyrillesch)", + "bs_Cyrl_BA": "Bosnesch (Kyrillesch, Bosnien an Herzegowina)", + "bs_Latn": "Bosnesch (Laténgesch)", + "bs_Latn_BA": "Bosnesch (Laténgesch, Bosnien an Herzegowina)", + "ca": "Katalanesch", + "ca_AD": "Katalanesch (Andorra)", + "ca_ES": "Katalanesch (Spanien)", + "ca_FR": "Katalanesch (Frankräich)", + "ca_IT": "Katalanesch (Italien)", + "ce": "Tschetschenesch", + "ce_RU": "Tschetschenesch (Russland)", + "cs": "Tschechesch", + "cs_CZ": "Tschechesch (Tschechien)", + "cy": "Walisesch", + "cy_GB": "Walisesch (Groussbritannien)", + "da": "Dänesch", + "da_DK": "Dänesch (Dänemark)", + "da_GL": "Dänesch (Grönland)", + "de": "Däitsch", + "de_AT": "Däitsch (Éisträich)", + "de_BE": "Däitsch (Belsch)", + "de_CH": "Däitsch (Schwäiz)", + "de_DE": "Däitsch (Däitschland)", + "de_IT": "Däitsch (Italien)", + "de_LI": "Däitsch (Liechtenstein)", + "de_LU": "Däitsch (Lëtzebuerg)", + "dz": "Bhutanesch", + "dz_BT": "Bhutanesch (Bhutan)", + "ee": "Ewe-Sprooch", + "ee_GH": "Ewe-Sprooch (Ghana)", + "ee_TG": "Ewe-Sprooch (Togo)", + "el": "Griichesch", + "el_CY": "Griichesch (Zypern)", + "el_GR": "Griichesch (Griicheland)", + "en": "Englesch", + "en_AG": "Englesch (Antigua a Barbuda)", + "en_AI": "Englesch (Anguilla)", + "en_AS": "Englesch (Amerikanesch-Samoa)", + "en_AT": "Englesch (Éisträich)", + "en_AU": "Englesch (Australien)", + "en_BB": "Englesch (Barbados)", + "en_BE": "Englesch (Belsch)", + "en_BI": "Englesch (Burundi)", + "en_BM": "Englesch (Bermuda)", + "en_BS": "Englesch (Bahamas)", + "en_BW": "Englesch (Botsuana)", + "en_BZ": "Englesch (Belize)", + "en_CA": "Englesch (Kanada)", + "en_CC": "Englesch (Kokosinselen)", + "en_CH": "Englesch (Schwäiz)", + "en_CK": "Englesch (Cookinselen)", + "en_CM": "Englesch (Kamerun)", + "en_CX": "Englesch (Chrëschtdagsinsel)", + "en_CY": "Englesch (Zypern)", + "en_DE": "Englesch (Däitschland)", + "en_DG": "Englesch (Diego Garcia)", + "en_DK": "Englesch (Dänemark)", + "en_DM": "Englesch (Dominica)", + "en_ER": "Englesch (Eritrea)", + "en_FI": "Englesch (Finnland)", + "en_FJ": "Englesch (Fidschi)", + "en_FK": "Englesch (Falklandinselen)", + "en_FM": "Englesch (Mikronesien)", + "en_GB": "Englesch (Groussbritannien)", + "en_GD": "Englesch (Grenada)", + "en_GG": "Englesch (Guernsey)", + "en_GH": "Englesch (Ghana)", + "en_GI": "Englesch (Gibraltar)", + "en_GM": "Englesch (Gambia)", + "en_GU": "Englesch (Guam)", + "en_GY": "Englesch (Guyana)", + "en_HK": "Englesch (Spezialverwaltungszon Hong Kong)", + "en_IE": "Englesch (Irland)", + "en_IL": "Englesch (Israel)", + "en_IM": "Englesch (Isle of Man)", + "en_IN": "Englesch (Indien)", + "en_IO": "Englesch (Britescht Territorium am Indeschen Ozean)", + "en_JE": "Englesch (Jersey)", + "en_JM": "Englesch (Jamaika)", + "en_KE": "Englesch (Kenia)", + "en_KI": "Englesch (Kiribati)", + "en_KN": "Englesch (St. Kitts an Nevis)", + "en_KY": "Englesch (Kaimaninselen)", + "en_LC": "Englesch (St. Lucia)", + "en_LR": "Englesch (Liberia)", + "en_LS": "Englesch (Lesotho)", + "en_MG": "Englesch (Madagaskar)", + "en_MH": "Englesch (Marshallinselen)", + "en_MO": "Englesch (Spezialverwaltungszon Macau)", + "en_MP": "Englesch (Nërdlech Marianen)", + "en_MS": "Englesch (Montserrat)", + "en_MT": "Englesch (Malta)", + "en_MU": "Englesch (Mauritius)", + "en_MW": "Englesch (Malawi)", + "en_MY": "Englesch (Malaysia)", + "en_NA": "Englesch (Namibia)", + "en_NF": "Englesch (Norfolkinsel)", + "en_NG": "Englesch (Nigeria)", + "en_NL": "Englesch (Holland)", + "en_NR": "Englesch (Nauru)", + "en_NU": "Englesch (Niue)", + "en_NZ": "Englesch (Neiséiland)", + "en_PG": "Englesch (Papua-Neiguinea)", + "en_PH": "Englesch (Philippinnen)", + "en_PK": "Englesch (Pakistan)", + "en_PN": "Englesch (Pitcairninselen)", + "en_PR": "Englesch (Puerto Rico)", + "en_PW": "Englesch (Palau)", + "en_RW": "Englesch (Ruanda)", + "en_SB": "Englesch (Salomonen)", + "en_SC": "Englesch (Seychellen)", + "en_SD": "Englesch (Sudan)", + "en_SE": "Englesch (Schweden)", + "en_SG": "Englesch (Singapur)", + "en_SH": "Englesch (St. Helena)", + "en_SI": "Englesch (Slowenien)", + "en_SL": "Englesch (Sierra Leone)", + "en_SS": "Englesch (Südsudan)", + "en_SX": "Englesch (Sint Maarten)", + "en_SZ": "Englesch (Swasiland)", + "en_TC": "Englesch (Turks- a Caicosinselen)", + "en_TK": "Englesch (Tokelau)", + "en_TO": "Englesch (Tonga)", + "en_TT": "Englesch (Trinidad an Tobago)", + "en_TV": "Englesch (Tuvalu)", + "en_TZ": "Englesch (Tansania)", + "en_UG": "Englesch (Uganda)", + "en_UM": "Englesch (Amerikanesch-Ozeanien)", + "en_US": "Englesch (Vereenegt Staate vun Amerika)", + "en_VC": "Englesch (St. Vincent an d’Grenadinnen)", + "en_VG": "Englesch (Britesch Joffereninselen)", + "en_VI": "Englesch (Amerikanesch Joffereninselen)", + "en_VU": "Englesch (Vanuatu)", + "en_WS": "Englesch (Samoa)", + "en_ZA": "Englesch (Südafrika)", + "en_ZM": "Englesch (Sambia)", + "en_ZW": "Englesch (Simbabwe)", + "eo": "Esperanto", + "es": "Spuenesch", + "es_AR": "Spuenesch (Argentinien)", + "es_BO": "Spuenesch (Bolivien)", + "es_BR": "Spuenesch (Brasilien)", + "es_CL": "Spuenesch (Chile)", + "es_CO": "Spuenesch (Kolumbien)", + "es_CR": "Spuenesch (Costa Rica)", + "es_CU": "Spuenesch (Kuba)", + "es_DO": "Spuenesch (Dominikanesch Republik)", + "es_EA": "Spuenesch (Ceuta a Melilla)", + "es_EC": "Spuenesch (Ecuador)", + "es_ES": "Spuenesch (Spanien)", + "es_GQ": "Spuenesch (Equatorialguinea)", + "es_GT": "Spuenesch (Guatemala)", + "es_HN": "Spuenesch (Honduras)", + "es_IC": "Spuenesch (Kanaresch Inselen)", + "es_MX": "Spuenesch (Mexiko)", + "es_NI": "Spuenesch (Nicaragua)", + "es_PA": "Spuenesch (Panama)", + "es_PE": "Spuenesch (Peru)", + "es_PH": "Spuenesch (Philippinnen)", + "es_PR": "Spuenesch (Puerto Rico)", + "es_PY": "Spuenesch (Paraguay)", + "es_SV": "Spuenesch (El Salvador)", + "es_US": "Spuenesch (Vereenegt Staate vun Amerika)", + "es_UY": "Spuenesch (Uruguay)", + "es_VE": "Spuenesch (Venezuela)", + "et": "Estnesch", + "et_EE": "Estnesch (Estland)", + "eu": "Baskesch", + "eu_ES": "Baskesch (Spanien)", + "fa": "Persesch", + "fa_AF": "Persesch (Afghanistan)", + "fa_IR": "Persesch (Iran)", + "ff": "Ful", + "ff_CM": "Ful (Kamerun)", + "ff_GN": "Ful (Guinea)", + "ff_MR": "Ful (Mauretanien)", + "ff_SN": "Ful (Senegal)", + "fi": "Finnesch", + "fi_FI": "Finnesch (Finnland)", + "fo": "Färöesch", + "fo_DK": "Färöesch (Dänemark)", + "fo_FO": "Färöesch (Färöer)", + "fr": "Franséisch", + "fr_BE": "Franséisch (Belsch)", + "fr_BF": "Franséisch (Burkina Faso)", + "fr_BI": "Franséisch (Burundi)", + "fr_BJ": "Franséisch (Benin)", + "fr_BL": "Franséisch (Saint-Barthélemy)", + "fr_CA": "Franséisch (Kanada)", + "fr_CD": "Franséisch (Kongo-Kinshasa)", + "fr_CF": "Franséisch (Zentralafrikanesch Republik)", + "fr_CG": "Franséisch (Kongo-Brazzaville)", + "fr_CH": "Franséisch (Schwäiz)", + "fr_CI": "Franséisch (Côte d’Ivoire)", + "fr_CM": "Franséisch (Kamerun)", + "fr_DJ": "Franséisch (Dschibuti)", + "fr_DZ": "Franséisch (Algerien)", + "fr_FR": "Franséisch (Frankräich)", + "fr_GA": "Franséisch (Gabun)", + "fr_GF": "Franséisch (Guayane)", + "fr_GN": "Franséisch (Guinea)", + "fr_GP": "Franséisch (Guadeloupe)", + "fr_GQ": "Franséisch (Equatorialguinea)", + "fr_HT": "Franséisch (Haiti)", + "fr_KM": "Franséisch (Komoren)", + "fr_LU": "Franséisch (Lëtzebuerg)", + "fr_MA": "Franséisch (Marokko)", + "fr_MC": "Franséisch (Monaco)", + "fr_MF": "Franséisch (St. Martin)", + "fr_MG": "Franséisch (Madagaskar)", + "fr_ML": "Franséisch (Mali)", + "fr_MQ": "Franséisch (Martinique)", + "fr_MR": "Franséisch (Mauretanien)", + "fr_MU": "Franséisch (Mauritius)", + "fr_NC": "Franséisch (Neikaledonien)", + "fr_NE": "Franséisch (Niger)", + "fr_PF": "Franséisch (Franséisch-Polynesien)", + "fr_PM": "Franséisch (St. Pierre a Miquelon)", + "fr_RE": "Franséisch (Réunion)", + "fr_RW": "Franséisch (Ruanda)", + "fr_SC": "Franséisch (Seychellen)", + "fr_SN": "Franséisch (Senegal)", + "fr_SY": "Franséisch (Syrien)", + "fr_TD": "Franséisch (Tschad)", + "fr_TG": "Franséisch (Togo)", + "fr_TN": "Franséisch (Tunesien)", + "fr_VU": "Franséisch (Vanuatu)", + "fr_WF": "Franséisch (Wallis a Futuna)", + "fr_YT": "Franséisch (Mayotte)", + "fy": "Westfriesesch", + "fy_NL": "Westfriesesch (Holland)", + "ga": "Iresch", + "ga_IE": "Iresch (Irland)", + "gd": "Schottescht Gällesch", + "gd_GB": "Schottescht Gällesch (Groussbritannien)", + "gl": "Galizesch", + "gl_ES": "Galizesch (Spanien)", + "gu": "Gujarati", + "gu_IN": "Gujarati (Indien)", + "gv": "Manx", + "gv_IM": "Manx (Isle of Man)", + "ha": "Hausa", + "ha_GH": "Hausa (Ghana)", + "ha_NE": "Hausa (Niger)", + "ha_NG": "Hausa (Nigeria)", + "he": "Hebräesch", + "he_IL": "Hebräesch (Israel)", + "hi": "Hindi", + "hi_IN": "Hindi (Indien)", + "hr": "Kroatesch", + "hr_BA": "Kroatesch (Bosnien an Herzegowina)", + "hr_HR": "Kroatesch (Kroatien)", + "hu": "Ungaresch", + "hu_HU": "Ungaresch (Ungarn)", + "hy": "Armenesch", + "hy_AM": "Armenesch (Armenien)", + "id": "Indonesesch", + "id_ID": "Indonesesch (Indonesien)", + "ig": "Igbo-Sprooch", + "ig_NG": "Igbo-Sprooch (Nigeria)", + "ii": "Sichuan Yi", + "ii_CN": "Sichuan Yi (China)", + "is": "Islännesch", + "is_IS": "Islännesch (Island)", + "it": "Italienesch", + "it_CH": "Italienesch (Schwäiz)", + "it_IT": "Italienesch (Italien)", + "it_SM": "Italienesch (San Marino)", + "ja": "Japanesch", + "ja_JP": "Japanesch (Japan)", + "ka": "Georgesch", + "ka_GE": "Georgesch (Georgien)", + "ki": "Kikuyu-Sprooch", + "ki_KE": "Kikuyu-Sprooch (Kenia)", + "kk": "Kasachesch", + "kk_KZ": "Kasachesch (Kasachstan)", + "kl": "Grönlännesch", + "kl_GL": "Grönlännesch (Grönland)", + "km": "Kambodschanesch", + "km_KH": "Kambodschanesch (Kambodscha)", + "kn": "Kannada", + "kn_IN": "Kannada (Indien)", + "ko": "Koreanesch", + "ko_KP": "Koreanesch (Nordkorea)", + "ko_KR": "Koreanesch (Südkorea)", + "ks": "Kaschmiresch", + "ks_IN": "Kaschmiresch (Indien)", + "kw": "Kornesch", + "kw_GB": "Kornesch (Groussbritannien)", + "ky": "Kirgisesch", + "ky_KG": "Kirgisesch (Kirgisistan)", + "lb": "Lëtzebuergesch", + "lb_LU": "Lëtzebuergesch (Lëtzebuerg)", + "lg": "Ganda-Sprooch", + "lg_UG": "Ganda-Sprooch (Uganda)", + "ln": "Lingala", + "ln_AO": "Lingala (Angola)", + "ln_CD": "Lingala (Kongo-Kinshasa)", + "ln_CF": "Lingala (Zentralafrikanesch Republik)", + "ln_CG": "Lingala (Kongo-Brazzaville)", + "lo": "Laotesch", + "lo_LA": "Laotesch (Laos)", + "lt": "Litauesch", + "lt_LT": "Litauesch (Litauen)", + "lu": "Luba-Katanga", + "lu_CD": "Luba-Katanga (Kongo-Kinshasa)", + "lv": "Lettesch", + "lv_LV": "Lettesch (Lettland)", + "mg": "Malagassi-Sprooch", + "mg_MG": "Malagassi-Sprooch (Madagaskar)", + "mk": "Mazedonesch", + "mk_MK": "Mazedonesch (Mazedonien)", + "ml": "Malayalam", + "ml_IN": "Malayalam (Indien)", + "mn": "Mongolesch", + "mn_MN": "Mongolesch (Mongolei)", + "mr": "Marathi", + "mr_IN": "Marathi (Indien)", + "ms": "Malaiesch", + "ms_BN": "Malaiesch (Brunei)", + "ms_MY": "Malaiesch (Malaysia)", + "ms_SG": "Malaiesch (Singapur)", + "mt": "Maltesesch", + "mt_MT": "Maltesesch (Malta)", + "my": "Birmanesch", + "my_MM": "Birmanesch (Myanmar)", + "nb": "Norwegesch BokmÃ¥l", + "nb_NO": "Norwegesch BokmÃ¥l (Norwegen)", + "nb_SJ": "Norwegesch BokmÃ¥l (Svalbard a Jan Mayen)", + "nd": "Nord-Ndebele-Sprooch", + "nd_ZW": "Nord-Ndebele-Sprooch (Simbabwe)", + "ne": "Nepalesesch", + "ne_IN": "Nepalesesch (Indien)", + "ne_NP": "Nepalesesch (Nepal)", + "nl": "Hollännesch", + "nl_AW": "Hollännesch (Aruba)", + "nl_BE": "Hollännesch (Belsch)", + "nl_BQ": "Hollännesch (Karibescht Holland)", + "nl_CW": "Hollännesch (Curaçao)", + "nl_NL": "Hollännesch (Holland)", + "nl_SR": "Hollännesch (Suriname)", + "nl_SX": "Hollännesch (Sint Maarten)", + "nn": "Norwegesch Nynorsk", + "nn_NO": "Norwegesch Nynorsk (Norwegen)", + "no": "Norwegesch", + "no_NO": "Norwegesch (Norwegen)", + "om": "Oromo", + "om_ET": "Oromo (Ethiopien)", + "om_KE": "Oromo (Kenia)", + "or": "Orija", + "or_IN": "Orija (Indien)", + "os": "Ossetesch", + "os_GE": "Ossetesch (Georgien)", + "os_RU": "Ossetesch (Russland)", + "pa": "Pandschabesch", + "pa_Arab": "Pandschabesch (Arabesch)", + "pa_Arab_PK": "Pandschabesch (Arabesch, Pakistan)", + "pa_Guru": "Pandschabesch (Gurmukhi)", + "pa_Guru_IN": "Pandschabesch (Gurmukhi, Indien)", + "pa_IN": "Pandschabesch (Indien)", + "pa_PK": "Pandschabesch (Pakistan)", + "pl": "Polnesch", + "pl_PL": "Polnesch (Polen)", + "ps": "Paschtu", + "ps_AF": "Paschtu (Afghanistan)", + "pt": "Portugisesch", + "pt_AO": "Portugisesch (Angola)", + "pt_BR": "Portugisesch (Brasilien)", + "pt_CH": "Portugisesch (Schwäiz)", + "pt_CV": "Portugisesch (Kap Verde)", + "pt_GQ": "Portugisesch (Equatorialguinea)", + "pt_GW": "Portugisesch (Guinea-Bissau)", + "pt_LU": "Portugisesch (Lëtzebuerg)", + "pt_MO": "Portugisesch (Spezialverwaltungszon Macau)", + "pt_MZ": "Portugisesch (Mosambik)", + "pt_PT": "Portugisesch (Portugal)", + "pt_ST": "Portugisesch (São Tomé a Príncipe)", + "pt_TL": "Portugisesch (Osttimor)", + "qu": "Quechua", + "qu_BO": "Quechua (Bolivien)", + "qu_EC": "Quechua (Ecuador)", + "qu_PE": "Quechua (Peru)", + "rm": "Rätoromanesch", + "rm_CH": "Rätoromanesch (Schwäiz)", + "rn": "Rundi-Sprooch", + "rn_BI": "Rundi-Sprooch (Burundi)", + "ro": "Rumänesch", + "ro_MD": "Rumänesch (Moldawien)", + "ro_RO": "Rumänesch (Rumänien)", + "ru": "Russesch", + "ru_BY": "Russesch (Wäissrussland)", + "ru_KG": "Russesch (Kirgisistan)", + "ru_KZ": "Russesch (Kasachstan)", + "ru_MD": "Russesch (Moldawien)", + "ru_RU": "Russesch (Russland)", + "ru_UA": "Russesch (Ukrain)", + "rw": "Ruandesch", + "rw_RW": "Ruandesch (Ruanda)", + "se": "Nordsamesch", + "se_FI": "Nordsamesch (Finnland)", + "se_NO": "Nordsamesch (Norwegen)", + "se_SE": "Nordsamesch (Schweden)", + "sg": "Sango", + "sg_CF": "Sango (Zentralafrikanesch Republik)", + "sh": "Serbo-Kroatesch", + "sh_BA": "Serbo-Kroatesch (Bosnien an Herzegowina)", + "si": "Singhalesesch", + "si_LK": "Singhalesesch (Sri Lanka)", + "sk": "Slowakesch", + "sk_SK": "Slowakesch (Slowakei)", + "sl": "Slowenesch", + "sl_SI": "Slowenesch (Slowenien)", + "sn": "Shona", + "sn_ZW": "Shona (Simbabwe)", + "so": "Somali", + "so_DJ": "Somali (Dschibuti)", + "so_ET": "Somali (Ethiopien)", + "so_KE": "Somali (Kenia)", + "so_SO": "Somali (Somalia)", + "sq": "Albanesch", + "sq_AL": "Albanesch (Albanien)", + "sq_MK": "Albanesch (Mazedonien)", + "sq_XK": "Albanesch (Kosovo)", + "sr": "Serbesch", + "sr_BA": "Serbesch (Bosnien an Herzegowina)", + "sr_Cyrl": "Serbesch (Kyrillesch)", + "sr_Cyrl_BA": "Serbesch (Kyrillesch, Bosnien an Herzegowina)", + "sr_Cyrl_ME": "Serbesch (Kyrillesch, Montenegro)", + "sr_Cyrl_RS": "Serbesch (Kyrillesch, Serbien)", + "sr_Cyrl_XK": "Serbesch (Kyrillesch, Kosovo)", + "sr_Latn": "Serbesch (Laténgesch)", + "sr_Latn_BA": "Serbesch (Laténgesch, Bosnien an Herzegowina)", + "sr_Latn_ME": "Serbesch (Laténgesch, Montenegro)", + "sr_Latn_RS": "Serbesch (Laténgesch, Serbien)", + "sr_Latn_XK": "Serbesch (Laténgesch, Kosovo)", + "sr_ME": "Serbesch (Montenegro)", + "sr_RS": "Serbesch (Serbien)", + "sr_XK": "Serbesch (Kosovo)", + "sv": "Schwedesch", + "sv_AX": "Schwedesch (Ã…landinselen)", + "sv_FI": "Schwedesch (Finnland)", + "sv_SE": "Schwedesch (Schweden)", + "sw": "Suaheli", + "sw_CD": "Suaheli (Kongo-Kinshasa)", + "sw_KE": "Suaheli (Kenia)", + "sw_TZ": "Suaheli (Tansania)", + "sw_UG": "Suaheli (Uganda)", + "ta": "Tamilesch", + "ta_IN": "Tamilesch (Indien)", + "ta_LK": "Tamilesch (Sri Lanka)", + "ta_MY": "Tamilesch (Malaysia)", + "ta_SG": "Tamilesch (Singapur)", + "te": "Telugu", + "te_IN": "Telugu (Indien)", + "th": "Thailännesch", + "th_TH": "Thailännesch (Thailand)", + "ti": "Tigrinja", + "ti_ER": "Tigrinja (Eritrea)", + "ti_ET": "Tigrinja (Ethiopien)", + "tl": "Dagalog", + "tl_PH": "Dagalog (Philippinnen)", + "to": "Tongaesch", + "to_TO": "Tongaesch (Tonga)", + "tr": "Tierkesch", + "tr_CY": "Tierkesch (Zypern)", + "tr_TR": "Tierkesch (Tierkei)", + "ug": "Uiguresch", + "ug_CN": "Uiguresch (China)", + "uk": "Ukrainesch", + "uk_UA": "Ukrainesch (Ukrain)", + "ur": "Urdu", + "ur_IN": "Urdu (Indien)", + "ur_PK": "Urdu (Pakistan)", + "uz": "Usbekesch", + "uz_AF": "Usbekesch (Afghanistan)", + "uz_Arab": "Usbekesch (Arabesch)", + "uz_Arab_AF": "Usbekesch (Arabesch, Afghanistan)", + "uz_Cyrl": "Usbekesch (Kyrillesch)", + "uz_Cyrl_UZ": "Usbekesch (Kyrillesch, Usbekistan)", + "uz_Latn": "Usbekesch (Laténgesch)", + "uz_Latn_UZ": "Usbekesch (Laténgesch, Usbekistan)", + "uz_UZ": "Usbekesch (Usbekistan)", + "vi": "Vietnamesesch", + "vi_VN": "Vietnamesesch (Vietnam)", + "yi": "Jiddesch", + "yo": "Yoruba", + "yo_BJ": "Yoruba (Benin)", + "yo_NG": "Yoruba (Nigeria)", + "zh": "Chinesesch", + "zh_CN": "Chinesesch (China)", + "zh_HK": "Chinesesch (Spezialverwaltungszon Hong Kong)", + "zh_Hans": "Chinesesch (Vereinfacht)", + "zh_Hans_CN": "Chinesesch (Vereinfacht, China)", + "zh_Hans_HK": "Chinesesch (Vereinfacht, Spezialverwaltungszon Hong Kong)", + "zh_Hans_MO": "Chinesesch (Vereinfacht, Spezialverwaltungszon Macau)", + "zh_Hans_SG": "Chinesesch (Vereinfacht, Singapur)", + "zh_Hant": "Chinesesch (Traditionell)", + "zh_Hant_HK": "Chinesesch (Traditionell, Spezialverwaltungszon Hong Kong)", + "zh_Hant_MO": "Chinesesch (Traditionell, Spezialverwaltungszon Macau)", + "zh_Hant_TW": "Chinesesch (Traditionell, Taiwan)", + "zh_MO": "Chinesesch (Spezialverwaltungszon Macau)", + "zh_SG": "Chinesesch (Singapur)", + "zh_TW": "Chinesesch (Taiwan)", + "zu": "Zulu", + "zu_ZA": "Zulu (Südafrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lg.json new file mode 100644 index 0000000000000000000000000000000000000000..87ecc9da436f649165a2829c9d01c4713128fac1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lg.json @@ -0,0 +1,321 @@ +{ + "Names": { + "ak": "Lu-akaani", + "ak_GH": "Lu-akaani (Gana)", + "am": "Lu-amhariki", + "am_ET": "Lu-amhariki (Esyopya)", + "ar": "Luwarabu", + "ar_AE": "Luwarabu (Emireeti)", + "ar_BH": "Luwarabu (Baareeni)", + "ar_DJ": "Luwarabu (Jjibuti)", + "ar_DZ": "Luwarabu (Aligerya)", + "ar_EG": "Luwarabu (Misiri)", + "ar_ER": "Luwarabu (Eritureya)", + "ar_IL": "Luwarabu (Yisirayeri)", + "ar_IQ": "Luwarabu (Yiraaka)", + "ar_JO": "Luwarabu (Yorodani)", + "ar_KM": "Luwarabu (Bizinga by’eKomoro)", + "ar_KW": "Luwarabu (Kuweti)", + "ar_LB": "Luwarabu (Lebanoni)", + "ar_LY": "Luwarabu (Libya)", + "ar_MA": "Luwarabu (Moroko)", + "ar_MR": "Luwarabu (Mawulitenya)", + "ar_OM": "Luwarabu (Omaani)", + "ar_PS": "Luwarabu (Palesitayini)", + "ar_QA": "Luwarabu (Kataa)", + "ar_SA": "Luwarabu (Sawudarebya - Buwarabu)", + "ar_SD": "Luwarabu (Sudaani)", + "ar_SO": "Luwarabu (Somaliya)", + "ar_SY": "Luwarabu (Siriya)", + "ar_TD": "Luwarabu (Caadi)", + "ar_TN": "Luwarabu (Tunisya)", + "ar_YE": "Luwarabu (Yemeni)", + "be": "Lubelarusi", + "be_BY": "Lubelarusi (Belarusi)", + "bg": "Lubulugariya", + "bg_BG": "Lubulugariya (Bulugariya)", + "bn": "Lubengali", + "bn_BD": "Lubengali (Bangaladesi)", + "bn_IN": "Lubengali (Buyindi)", + "cs": "Luceeke", + "cs_CZ": "Luceeke (Lipubulika ya Ceeka)", + "de": "Ludaaki", + "de_AT": "Ludaaki (Awusituriya)", + "de_BE": "Ludaaki (Bubirigi)", + "de_CH": "Ludaaki (Switizirandi)", + "de_DE": "Ludaaki (Budaaki)", + "de_IT": "Ludaaki (Yitale)", + "de_LI": "Ludaaki (Licitensitayini)", + "de_LU": "Ludaaki (Lukisembaaga)", + "el": "Lugereeki\/Luyonaani", + "el_CY": "Lugereeki\/Luyonaani (Sipuriya)", + "el_GR": "Lugereeki\/Luyonaani (Bugereeki\/Buyonaani)", + "en": "Lungereza", + "en_AG": "Lungereza (Antigwa ne Barabuda)", + "en_AI": "Lungereza (Angwila)", + "en_AS": "Lungereza (Samowa omumerika)", + "en_AT": "Lungereza (Awusituriya)", + "en_AU": "Lungereza (Awusitureliya)", + "en_BB": "Lungereza (Barabadosi)", + "en_BE": "Lungereza (Bubirigi)", + "en_BI": "Lungereza (Burundi)", + "en_BM": "Lungereza (Beremuda)", + "en_BS": "Lungereza (Bahamasi)", + "en_BW": "Lungereza (Botiswana)", + "en_BZ": "Lungereza (Belize)", + "en_CA": "Lungereza (Kanada)", + "en_CH": "Lungereza (Switizirandi)", + "en_CK": "Lungereza (Bizinga bya Kkuki)", + "en_CM": "Lungereza (Kameruuni)", + "en_CY": "Lungereza (Sipuriya)", + "en_DE": "Lungereza (Budaaki)", + "en_DK": "Lungereza (Denimaaka)", + "en_DM": "Lungereza (Dominika)", + "en_ER": "Lungereza (Eritureya)", + "en_FI": "Lungereza (Finilandi)", + "en_FJ": "Lungereza (Fiji)", + "en_FK": "Lungereza (Bizinga by’eFalikalandi)", + "en_FM": "Lungereza (Mikuronezya)", + "en_GB": "Lungereza (Bungereza)", + "en_GD": "Lungereza (Gurenada)", + "en_GH": "Lungereza (Gana)", + "en_GI": "Lungereza (Giburalita)", + "en_GM": "Lungereza (Gambya)", + "en_GU": "Lungereza (Gwamu)", + "en_GY": "Lungereza (Gayana)", + "en_IE": "Lungereza (Ayalandi)", + "en_IL": "Lungereza (Yisirayeri)", + "en_IN": "Lungereza (Buyindi)", + "en_IO": "Lungereza (Bizinga by’eCago)", + "en_JM": "Lungereza (Jamayika)", + "en_KE": "Lungereza (Kenya)", + "en_KI": "Lungereza (Kiribati)", + "en_KN": "Lungereza (Senti Kitisi ne Nevisi)", + "en_KY": "Lungereza (Bizinga ebya Kayimaani)", + "en_LC": "Lungereza (Senti Luciya)", + "en_LR": "Lungereza (Liberya)", + "en_LS": "Lungereza (Lesoso)", + "en_MG": "Lungereza (Madagasika)", + "en_MH": "Lungereza (Bizinga bya Mariso)", + "en_MP": "Lungereza (Bizinga bya Mariyana eby’omumambuka)", + "en_MS": "Lungereza (Monteseraati)", + "en_MT": "Lungereza (Malita)", + "en_MU": "Lungereza (Mawulisyasi)", + "en_MW": "Lungereza (Malawi)", + "en_MY": "Lungereza (Malezya)", + "en_NA": "Lungereza (Namibiya)", + "en_NF": "Lungereza (Kizinga ky’eNorofoko)", + "en_NG": "Lungereza (Nayijerya)", + "en_NL": "Lungereza (Holandi)", + "en_NR": "Lungereza (Nawuru)", + "en_NU": "Lungereza (Niyuwe)", + "en_NZ": "Lungereza (Niyuziirandi)", + "en_PG": "Lungereza (Papwa Nyugini)", + "en_PH": "Lungereza (Bizinga bya Firipino)", + "en_PK": "Lungereza (Pakisitaani)", + "en_PN": "Lungereza (Pitikeeni)", + "en_PR": "Lungereza (Potoriko)", + "en_PW": "Lungereza (Palawu)", + "en_RW": "Lungereza (Rwanda)", + "en_SB": "Lungereza (Bizanga by’eSolomooni)", + "en_SC": "Lungereza (Sesere)", + "en_SD": "Lungereza (Sudaani)", + "en_SE": "Lungereza (Swideni)", + "en_SG": "Lungereza (Singapowa)", + "en_SH": "Lungereza (Senti Herena)", + "en_SI": "Lungereza (Sirovenya)", + "en_SL": "Lungereza (Siyeralewone)", + "en_SZ": "Lungereza (Swazirandi)", + "en_TC": "Lungereza (Bizinga by’eTaaka ne Kayikosi)", + "en_TK": "Lungereza (Tokelawu)", + "en_TO": "Lungereza (Tonga)", + "en_TT": "Lungereza (Turindaadi ne Tobago)", + "en_TV": "Lungereza (Tuvalu)", + "en_TZ": "Lungereza (Tanzaniya)", + "en_UG": "Lungereza (Yuganda)", + "en_US": "Lungereza (Amerika)", + "en_VC": "Lungereza (Senti Vinsenti ne Gurendadiini)", + "en_VG": "Lungereza (Bizinga ebya Virigini ebitwalibwa Bungereza)", + "en_VI": "Lungereza (Bizinga bya Virigini eby’Amerika)", + "en_VU": "Lungereza (Vanawuwatu)", + "en_WS": "Lungereza (Samowa)", + "en_ZA": "Lungereza (Sawusafirika)", + "en_ZM": "Lungereza (Zambya)", + "en_ZW": "Lungereza (Zimbabwe)", + "es": "Lusipanya", + "es_AR": "Lusipanya (Arigentina)", + "es_BO": "Lusipanya (Boliviya)", + "es_BR": "Lusipanya (Buraziiri)", + "es_CL": "Lusipanya (Cile)", + "es_CO": "Lusipanya (Kolombya)", + "es_CR": "Lusipanya (Kosita Rika)", + "es_CU": "Lusipanya (Cuba)", + "es_DO": "Lusipanya (Lipubulika ya Dominika)", + "es_EC": "Lusipanya (Ekwado)", + "es_ES": "Lusipanya (Sipeyini)", + "es_GQ": "Lusipanya (Gayana ey’oku ekweta)", + "es_GT": "Lusipanya (Gwatemala)", + "es_HN": "Lusipanya (Hundurasi)", + "es_MX": "Lusipanya (Mekisiko)", + "es_NI": "Lusipanya (Nikaraguwa)", + "es_PA": "Lusipanya (Panama)", + "es_PE": "Lusipanya (Peru)", + "es_PH": "Lusipanya (Bizinga bya Firipino)", + "es_PR": "Lusipanya (Potoriko)", + "es_PY": "Lusipanya (Paragwayi)", + "es_SV": "Lusipanya (El salivado)", + "es_US": "Lusipanya (Amerika)", + "es_UY": "Lusipanya (Wurugwayi)", + "es_VE": "Lusipanya (Venzwera)", + "fa": "Luperusi", + "fa_AF": "Luperusi (Afaganisitani)", + "fa_IR": "Luperusi (Yiraani)", + "fr": "Lufalansa", + "fr_BE": "Lufalansa (Bubirigi)", + "fr_BF": "Lufalansa (Burukina Faso)", + "fr_BI": "Lufalansa (Burundi)", + "fr_BJ": "Lufalansa (Benini)", + "fr_CA": "Lufalansa (Kanada)", + "fr_CD": "Lufalansa (Kongo - Zayire)", + "fr_CF": "Lufalansa (Lipubulika eya Senturafiriki)", + "fr_CG": "Lufalansa (Kongo)", + "fr_CH": "Lufalansa (Switizirandi)", + "fr_CI": "Lufalansa (Kote Divwa)", + "fr_CM": "Lufalansa (Kameruuni)", + "fr_DJ": "Lufalansa (Jjibuti)", + "fr_DZ": "Lufalansa (Aligerya)", + "fr_FR": "Lufalansa (Bufalansa)", + "fr_GA": "Lufalansa (Gaboni)", + "fr_GF": "Lufalansa (Guyana enfalansa)", + "fr_GN": "Lufalansa (Gini)", + "fr_GP": "Lufalansa (Gwadalupe)", + "fr_GQ": "Lufalansa (Gayana ey’oku ekweta)", + "fr_HT": "Lufalansa (Hayiti)", + "fr_KM": "Lufalansa (Bizinga by’eKomoro)", + "fr_LU": "Lufalansa (Lukisembaaga)", + "fr_MA": "Lufalansa (Moroko)", + "fr_MC": "Lufalansa (Monako)", + "fr_MG": "Lufalansa (Madagasika)", + "fr_ML": "Lufalansa (Mali)", + "fr_MQ": "Lufalansa (Maritiniiki)", + "fr_MR": "Lufalansa (Mawulitenya)", + "fr_MU": "Lufalansa (Mawulisyasi)", + "fr_NC": "Lufalansa (Kaledonya mupya)", + "fr_NE": "Lufalansa (Nije)", + "fr_PF": "Lufalansa (Polinesiya enfalansa)", + "fr_PM": "Lufalansa (Senti Piyere ne Mikeloni)", + "fr_RE": "Lufalansa (Leyunyoni)", + "fr_RW": "Lufalansa (Rwanda)", + "fr_SC": "Lufalansa (Sesere)", + "fr_SN": "Lufalansa (Senegaalo)", + "fr_SY": "Lufalansa (Siriya)", + "fr_TD": "Lufalansa (Caadi)", + "fr_TG": "Lufalansa (Togo)", + "fr_TN": "Lufalansa (Tunisya)", + "fr_VU": "Lufalansa (Vanawuwatu)", + "fr_WF": "Lufalansa (Walisi ne Futuna)", + "fr_YT": "Lufalansa (Mayotte)", + "ha": "Luhawuza", + "ha_GH": "Luhawuza (Gana)", + "ha_NE": "Luhawuza (Nije)", + "ha_NG": "Luhawuza (Nayijerya)", + "hi": "Luhindu", + "hi_IN": "Luhindu (Buyindi)", + "hu": "Luhangare", + "hu_HU": "Luhangare (Hangare)", + "id": "Luyindonezya", + "id_ID": "Luyindonezya (Yindonezya)", + "ig": "Luyibo", + "ig_NG": "Luyibo (Nayijerya)", + "it": "Luyitale", + "it_CH": "Luyitale (Switizirandi)", + "it_IT": "Luyitale (Yitale)", + "it_SM": "Luyitale (Sanimarino)", + "ja": "Lujapani", + "ja_JP": "Lujapani (Japani)", + "km": "Lukme", + "km_KH": "Lukme (Kambodya)", + "ko": "Lukoreya", + "ko_KP": "Lukoreya (Koreya ey’omumambuka)", + "ko_KR": "Lukoreya (Koreya ey’omumaserengeta)", + "lg": "Luganda", + "lg_UG": "Luganda (Yuganda)", + "ms": "Lumalayi", + "ms_BN": "Lumalayi (Burunayi)", + "ms_MY": "Lumalayi (Malezya)", + "ms_SG": "Lumalayi (Singapowa)", + "my": "Lubbama", + "my_MM": "Lubbama (Myanima)", + "ne": "Lunepali", + "ne_IN": "Lunepali (Buyindi)", + "ne_NP": "Lunepali (Nepalo)", + "nl": "Luholandi", + "nl_AW": "Luholandi (Aruba)", + "nl_BE": "Luholandi (Bubirigi)", + "nl_NL": "Luholandi (Holandi)", + "nl_SR": "Luholandi (Surinaamu)", + "pa": "Lupunjabi", + "pa_IN": "Lupunjabi (Buyindi)", + "pa_PK": "Lupunjabi (Pakisitaani)", + "pl": "Lupolandi", + "pl_PL": "Lupolandi (Polandi)", + "pt": "Lupotugiizi", + "pt_AO": "Lupotugiizi (Angola)", + "pt_BR": "Lupotugiizi (Buraziiri)", + "pt_CH": "Lupotugiizi (Switizirandi)", + "pt_CV": "Lupotugiizi (Bizinga by’e Kepu Veredi)", + "pt_GQ": "Lupotugiizi (Gayana ey’oku ekweta)", + "pt_GW": "Lupotugiizi (Gini-Bisawu)", + "pt_LU": "Lupotugiizi (Lukisembaaga)", + "pt_MZ": "Lupotugiizi (Mozambiiki)", + "pt_PT": "Lupotugiizi (Potugaali)", + "pt_ST": "Lupotugiizi (Sanitome ne Purincipe)", + "pt_TL": "Lupotugiizi (Timowa)", + "ro": "Lulomaniya", + "ro_MD": "Lulomaniya (Molodova)", + "ro_RO": "Lulomaniya (Lomaniya)", + "ru": "Lulasa", + "ru_BY": "Lulasa (Belarusi)", + "ru_KG": "Lulasa (Kirigizisitaani)", + "ru_KZ": "Lulasa (Kazakisitaani)", + "ru_MD": "Lulasa (Molodova)", + "ru_RU": "Lulasa (Lasa)", + "ru_UA": "Lulasa (Yukurayine)", + "rw": "Lunarwanda", + "rw_RW": "Lunarwanda (Rwanda)", + "so": "Lusomaliya", + "so_DJ": "Lusomaliya (Jjibuti)", + "so_ET": "Lusomaliya (Esyopya)", + "so_KE": "Lusomaliya (Kenya)", + "so_SO": "Lusomaliya (Somaliya)", + "sv": "Luswideni", + "sv_FI": "Luswideni (Finilandi)", + "sv_SE": "Luswideni (Swideni)", + "ta": "Lutamiiru", + "ta_IN": "Lutamiiru (Buyindi)", + "ta_LK": "Lutamiiru (Sirilanka)", + "ta_MY": "Lutamiiru (Malezya)", + "ta_SG": "Lutamiiru (Singapowa)", + "th": "Luttaayi", + "th_TH": "Luttaayi (Tayirandi)", + "tr": "Lutake", + "tr_CY": "Lutake (Sipuriya)", + "tr_TR": "Lutake (Ttake)", + "uk": "Luyukurayine", + "uk_UA": "Luyukurayine (Yukurayine)", + "ur": "Lu-urudu", + "ur_IN": "Lu-urudu (Buyindi)", + "ur_PK": "Lu-urudu (Pakisitaani)", + "vi": "Luvyetinaamu", + "vi_VN": "Luvyetinaamu (Vyetinaamu)", + "yo": "Luyoruba", + "yo_BJ": "Luyoruba (Benini)", + "yo_NG": "Luyoruba (Nayijerya)", + "zh": "Lucayina", + "zh_CN": "Lucayina (Cayina)", + "zh_SG": "Lucayina (Singapowa)", + "zh_TW": "Lucayina (Tayiwani)", + "zu": "Luzzulu", + "zu_ZA": "Luzzulu (Sawusafirika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ln.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ln.json new file mode 100644 index 0000000000000000000000000000000000000000..0270b6b88f6e0de6e0138ffb984ff2df0de6e0f2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ln.json @@ -0,0 +1,325 @@ +{ + "Names": { + "ak": "akan", + "ak_GH": "akan (Gana)", + "am": "liamariki", + "am_ET": "liamariki (Etsíopi)", + "ar": "lialabo", + "ar_AE": "lialabo (LÉ›mila alabo)", + "ar_BH": "lialabo (BahrÉ›nÉ›)", + "ar_DJ": "lialabo (Dzibuti)", + "ar_DZ": "lialabo (AlizÉ›ri)", + "ar_EG": "lialabo (Ezípite)", + "ar_ER": "lialabo (ElitelÉ›)", + "ar_IL": "lialabo (IsirayelÉ›)", + "ar_IQ": "lialabo (Iraki)", + "ar_JO": "lialabo (ZÉ”dani)", + "ar_KM": "lialabo (KomorÉ›)", + "ar_KW": "lialabo (Koweti)", + "ar_LB": "lialabo (Libá)", + "ar_LY": "lialabo (Libí)", + "ar_MA": "lialabo (MarokÉ›)", + "ar_MR": "lialabo (Moritani)", + "ar_OM": "lialabo (OmánÉ›)", + "ar_PS": "lialabo (PalÉ›sine)", + "ar_QA": "lialabo (Katari)", + "ar_SA": "lialabo (Alabi SawuditÉ›)", + "ar_SD": "lialabo (Sudá)", + "ar_SO": "lialabo (Somali)", + "ar_SY": "lialabo (Sirí)", + "ar_TD": "lialabo (Tsádi)", + "ar_TN": "lialabo (Tinizi)", + "ar_YE": "lialabo (YemÉ›nÉ›)", + "be": "libyelorisí", + "be_BY": "libyelorisí (Byelorisi)", + "bg": "libiligali", + "bg_BG": "libiligali (Biligari)", + "bn": "libengali", + "bn_BD": "libengali (BengalidÉ›si)", + "bn_IN": "libengali (ÃndÉ›)", + "cs": "litshekÉ›", + "cs_CZ": "litshekÉ› (Repibiki TsekÉ›)", + "de": "lialemá", + "de_AT": "lialemá (Otilisi)", + "de_BE": "lialemá (Beleziki)", + "de_CH": "lialemá (SwisÉ›)", + "de_DE": "lialemá (Alemani)", + "de_IT": "lialemá (Itali)", + "de_LI": "lialemá (LishÉ›teni)", + "de_LU": "lialemá (Likisambulu)", + "el": "ligeleki", + "el_CY": "ligeleki (SípÉ›lÉ›)", + "el_GR": "ligeleki (Geleki)", + "en": "lingÉ›lÉ›Ìsa", + "en_AG": "lingÉ›lÉ›Ìsa (Antiga mpé Barbuda)", + "en_AI": "lingÉ›lÉ›Ìsa (AngiyÉ›)", + "en_AS": "lingÉ›lÉ›Ìsa (Samoa ya Ameriki)", + "en_AT": "lingÉ›lÉ›Ìsa (Otilisi)", + "en_AU": "lingÉ›lÉ›Ìsa (Ositáli)", + "en_BB": "lingÉ›lÉ›Ìsa (BarÉ›badÉ›)", + "en_BE": "lingÉ›lÉ›Ìsa (Beleziki)", + "en_BI": "lingÉ›lÉ›Ìsa (Burundi)", + "en_BM": "lingÉ›lÉ›Ìsa (Bermuda)", + "en_BS": "lingÉ›lÉ›Ìsa (BahamasÉ›)", + "en_BW": "lingÉ›lÉ›Ìsa (Botswana)", + "en_BZ": "lingÉ›lÉ›Ìsa (BelizÉ›)", + "en_CA": "lingÉ›lÉ›Ìsa (Kanada)", + "en_CH": "lingÉ›lÉ›Ìsa (SwisÉ›)", + "en_CK": "lingÉ›lÉ›Ìsa (Bisanga bya KookÉ›)", + "en_CM": "lingÉ›lÉ›Ìsa (KamÉ›rune)", + "en_CY": "lingÉ›lÉ›Ìsa (SípÉ›lÉ›)", + "en_DE": "lingÉ›lÉ›Ìsa (Alemani)", + "en_DK": "lingÉ›lÉ›Ìsa (DanÉ›marike)", + "en_DM": "lingÉ›lÉ›Ìsa (Domínike)", + "en_ER": "lingÉ›lÉ›Ìsa (ElitelÉ›)", + "en_FI": "lingÉ›lÉ›Ìsa (FilandÉ›)", + "en_FJ": "lingÉ›lÉ›Ìsa (Fidzi)", + "en_FK": "lingÉ›lÉ›Ìsa (Bisanga bya Maluni)", + "en_FM": "lingÉ›lÉ›Ìsa (Mikronezi)", + "en_GB": "lingÉ›lÉ›Ìsa (AngÉ›lÉ›tÉ›ÌlÉ›)", + "en_GD": "lingÉ›lÉ›Ìsa (GelenadÉ›)", + "en_GG": "lingÉ›lÉ›Ìsa (Guernesey)", + "en_GH": "lingÉ›lÉ›Ìsa (Gana)", + "en_GI": "lingÉ›lÉ›Ìsa (ZibatalÉ›)", + "en_GM": "lingÉ›lÉ›Ìsa (Gambi)", + "en_GU": "lingÉ›lÉ›Ìsa (GwamÉ›)", + "en_GY": "lingÉ›lÉ›Ìsa (Giyane)", + "en_IE": "lingÉ›lÉ›Ìsa (IrelandÉ›)", + "en_IL": "lingÉ›lÉ›Ìsa (IsirayelÉ›)", + "en_IN": "lingÉ›lÉ›Ìsa (ÃndÉ›)", + "en_IO": "lingÉ›lÉ›Ìsa (Mabelé ya AngÉ›lÉ›tÉ›ÌlÉ› na mbú ya Indiya)", + "en_JM": "lingÉ›lÉ›Ìsa (Zamaiki)", + "en_KE": "lingÉ›lÉ›Ìsa (Kenya)", + "en_KI": "lingÉ›lÉ›Ìsa (Kiribati)", + "en_KN": "lingÉ›lÉ›Ìsa (Sántu krístofe mpé Nevɛ̀s)", + "en_KY": "lingÉ›lÉ›Ìsa (Bisanga bya Kayíma)", + "en_LC": "lingÉ›lÉ›Ìsa (Sántu lisi)", + "en_LR": "lingÉ›lÉ›Ìsa (Libériya)", + "en_LS": "lingÉ›lÉ›Ìsa (Lesoto)", + "en_MG": "lingÉ›lÉ›Ìsa (Madagasikari)", + "en_MH": "lingÉ›lÉ›Ìsa (Bisanga bya MarishalÉ›)", + "en_MP": "lingÉ›lÉ›Ìsa (Bisanga bya MarianÉ› ya nÉ”Ìrdi)", + "en_MS": "lingÉ›lÉ›Ìsa (MÉ”sera)", + "en_MT": "lingÉ›lÉ›Ìsa (MalitÉ›)", + "en_MU": "lingÉ›lÉ›Ìsa (MorisÉ›)", + "en_MW": "lingÉ›lÉ›Ìsa (Malawi)", + "en_MY": "lingÉ›lÉ›Ìsa (Malezi)", + "en_NA": "lingÉ›lÉ›Ìsa (Namibi)", + "en_NF": "lingÉ›lÉ›Ìsa (Esanga NorfokÉ›)", + "en_NG": "lingÉ›lÉ›Ìsa (Nizerya)", + "en_NL": "lingÉ›lÉ›Ìsa (OlandÉ›)", + "en_NR": "lingÉ›lÉ›Ìsa (Nauru)", + "en_NU": "lingÉ›lÉ›Ìsa (Nyué)", + "en_NZ": "lingÉ›lÉ›Ìsa (ZelandÉ› ya sika)", + "en_PG": "lingÉ›lÉ›Ìsa (Papwazi GinÉ› ya sika)", + "en_PH": "lingÉ›lÉ›Ìsa (FilipinÉ›)", + "en_PK": "lingÉ›lÉ›Ìsa (Pakisitá)", + "en_PN": "lingÉ›lÉ›Ìsa (Pikairni)", + "en_PR": "lingÉ›lÉ›Ìsa (PÉ”toriko)", + "en_PW": "lingÉ›lÉ›Ìsa (Palau)", + "en_RW": "lingÉ›lÉ›Ìsa (Rwanda)", + "en_SB": "lingÉ›lÉ›Ìsa (Bisanga SolomÉ”)", + "en_SC": "lingÉ›lÉ›Ìsa (SÉ›shÉ›lÉ›)", + "en_SD": "lingÉ›lÉ›Ìsa (Sudá)", + "en_SE": "lingÉ›lÉ›Ìsa (SwédÉ›)", + "en_SG": "lingÉ›lÉ›Ìsa (SingapurÉ›)", + "en_SH": "lingÉ›lÉ›Ìsa (Sántu eleni)", + "en_SI": "lingÉ›lÉ›Ìsa (Siloveni)", + "en_SL": "lingÉ›lÉ›Ìsa (Siera LeonÉ›)", + "en_SZ": "lingÉ›lÉ›Ìsa (Swazilandi)", + "en_TC": "lingÉ›lÉ›Ìsa (Bisanga bya Turki mpé Kaiko)", + "en_TK": "lingÉ›lÉ›Ìsa (Tokelau)", + "en_TO": "lingÉ›lÉ›Ìsa (Tonga)", + "en_TT": "lingÉ›lÉ›Ìsa (TinidadÉ› mpé Tobago)", + "en_TV": "lingÉ›lÉ›Ìsa (Tuvalu)", + "en_TZ": "lingÉ›lÉ›Ìsa (Tanzani)", + "en_UG": "lingÉ›lÉ›Ìsa (Uganda)", + "en_US": "lingÉ›lÉ›Ìsa (Ameriki)", + "en_VC": "lingÉ›lÉ›Ìsa (Sántu vesá mpé GelenadinÉ›)", + "en_VG": "lingÉ›lÉ›Ìsa (Bisanga bya Vierzi ya AngÉ›lÉ›tÉ›ÌlÉ›)", + "en_VI": "lingÉ›lÉ›Ìsa (Bisanga bya Vierzi ya Ameriki)", + "en_VU": "lingÉ›lÉ›Ìsa (Vanuatu)", + "en_WS": "lingÉ›lÉ›Ìsa (Samoa)", + "en_ZA": "lingÉ›lÉ›Ìsa (Afríka ya Súdi)", + "en_ZM": "lingÉ›lÉ›Ìsa (Zambi)", + "en_ZW": "lingÉ›lÉ›Ìsa (Zimbabwe)", + "es": "lisipanye", + "es_AR": "lisipanye (ArizantinÉ›)", + "es_BO": "lisipanye (Bolivi)", + "es_BR": "lisipanye (BrezílÉ›)", + "es_CL": "lisipanye (Síli)", + "es_CO": "lisipanye (Kolombi)", + "es_CR": "lisipanye (Kositarika)", + "es_CU": "lisipanye (Kiba)", + "es_DO": "lisipanye (Repibiki ya DomínikÉ›)", + "es_EC": "lisipanye (EkwatÉ›ÌlÉ›)", + "es_ES": "lisipanye (Esipanye)", + "es_GQ": "lisipanye (GinÉ›ÌkwatÉ›ÌlÉ›)", + "es_GT": "lisipanye (Gwatémala)", + "es_HN": "lisipanye (OndurasÉ›)", + "es_MX": "lisipanye (Meksike)", + "es_NI": "lisipanye (Nikaragwa)", + "es_PA": "lisipanye (Panama)", + "es_PE": "lisipanye (Péru)", + "es_PH": "lisipanye (FilipinÉ›)", + "es_PR": "lisipanye (PÉ”toriko)", + "es_PY": "lisipanye (Palagwei)", + "es_SV": "lisipanye (SavadÉ”rÉ›)", + "es_US": "lisipanye (Ameriki)", + "es_UY": "lisipanye (Irigwei)", + "es_VE": "lisipanye (Venézuela)", + "fa": "lipelésanÉ›", + "fa_AF": "lipelésanÉ› (Afiganisitá)", + "fa_IR": "lipelésanÉ› (Irâ)", + "fr": "lifalansÉ›Ì", + "fr_BE": "lifalansÉ›Ì (Beleziki)", + "fr_BF": "lifalansÉ›Ì (Bukina Faso)", + "fr_BI": "lifalansÉ›Ì (Burundi)", + "fr_BJ": "lifalansÉ›Ì (BenÉ›)", + "fr_CA": "lifalansÉ›Ì (Kanada)", + "fr_CD": "lifalansÉ›Ì (Republíki ya Kongó Demokratíki)", + "fr_CF": "lifalansÉ›Ì (Repibiki ya Afríka ya Káti)", + "fr_CG": "lifalansÉ›Ì (Kongo)", + "fr_CH": "lifalansÉ›Ì (SwisÉ›)", + "fr_CI": "lifalansÉ›Ì (KotídivualÉ›)", + "fr_CM": "lifalansÉ›Ì (KamÉ›rune)", + "fr_DJ": "lifalansÉ›Ì (Dzibuti)", + "fr_DZ": "lifalansÉ›Ì (AlizÉ›ri)", + "fr_FR": "lifalansÉ›Ì (FalánsÉ›)", + "fr_GA": "lifalansÉ›Ì (GabÉ”)", + "fr_GF": "lifalansÉ›Ì (GiyanÉ› ya FalánsÉ›)", + "fr_GN": "lifalansÉ›Ì (GinÉ›)", + "fr_GP": "lifalansÉ›Ì (GwadÉ›lupÉ›)", + "fr_GQ": "lifalansÉ›Ì (GinÉ›ÌkwatÉ›ÌlÉ›)", + "fr_HT": "lifalansÉ›Ì (Ayiti)", + "fr_KM": "lifalansÉ›Ì (KomorÉ›)", + "fr_LU": "lifalansÉ›Ì (Likisambulu)", + "fr_MA": "lifalansÉ›Ì (MarokÉ›)", + "fr_MC": "lifalansÉ›Ì (Monako)", + "fr_MG": "lifalansÉ›Ì (Madagasikari)", + "fr_ML": "lifalansÉ›Ì (Malí)", + "fr_MQ": "lifalansÉ›Ì (Martiniki)", + "fr_MR": "lifalansÉ›Ì (Moritani)", + "fr_MU": "lifalansÉ›Ì (MorisÉ›)", + "fr_NC": "lifalansÉ›Ì (Kaledoni ya sika)", + "fr_NE": "lifalansÉ›Ì (NizÉ›rÉ›)", + "fr_PF": "lifalansÉ›Ì (Polinezi ya FalánsÉ›)", + "fr_PM": "lifalansÉ›Ì (Sántu pététo mpé MikelÉ”)", + "fr_RE": "lifalansÉ›Ì (Lenyo)", + "fr_RW": "lifalansÉ›Ì (Rwanda)", + "fr_SC": "lifalansÉ›Ì (SÉ›shÉ›lÉ›)", + "fr_SN": "lifalansÉ›Ì (SenegalÉ›)", + "fr_SY": "lifalansÉ›Ì (Sirí)", + "fr_TD": "lifalansÉ›Ì (Tsádi)", + "fr_TG": "lifalansÉ›Ì (Togo)", + "fr_TN": "lifalansÉ›Ì (Tinizi)", + "fr_VU": "lifalansÉ›Ì (Vanuatu)", + "fr_WF": "lifalansÉ›Ì (WalisÉ› mpé Futuna)", + "fr_YT": "lifalansÉ›Ì (MayotÉ›)", + "ha": "hausa", + "ha_GH": "hausa (Gana)", + "ha_NE": "hausa (NizÉ›rÉ›)", + "ha_NG": "hausa (Nizerya)", + "hi": "lihindi", + "hi_IN": "lihindi (ÃndÉ›)", + "hu": "liongili", + "hu_HU": "liongili (Ongili)", + "id": "lindonezi", + "id_ID": "lindonezi (Indonezi)", + "ig": "igbo", + "ig_NG": "igbo (Nizerya)", + "it": "litaliano", + "it_CH": "litaliano (SwisÉ›)", + "it_IT": "litaliano (Itali)", + "it_SM": "litaliano (Sántu MarinÉ›)", + "ja": "lizapÉ”", + "ja_JP": "lizapÉ” (ZapÉ”)", + "km": "likambodza", + "km_KH": "likambodza (Kambodza)", + "ko": "likoreya", + "ko_KP": "likoreya (KorÉ› ya nÉ”Ìrdi)", + "ko_KR": "likoreya (KorÉ› ya súdi)", + "ln": "lingála", + "ln_AO": "lingála (Angóla)", + "ln_CD": "lingála (Republíki ya Kongó Demokratíki)", + "ln_CF": "lingála (Repibiki ya Afríka ya Káti)", + "ln_CG": "lingála (Kongo)", + "ms": "limalezi", + "ms_BN": "limalezi (Brineyi)", + "ms_MY": "limalezi (Malezi)", + "ms_SG": "limalezi (SingapurÉ›)", + "my": "libilimá", + "my_MM": "libilimá (Birmanie)", + "ne": "linepalÉ›", + "ne_IN": "linepalÉ› (ÃndÉ›)", + "ne_NP": "linepalÉ› (NepálÉ›)", + "nl": "lifalamá", + "nl_AW": "lifalamá (Aruba)", + "nl_BE": "lifalamá (Beleziki)", + "nl_NL": "lifalamá (OlandÉ›)", + "nl_SR": "lifalamá (SurinamÉ›)", + "pa": "lipendzabi", + "pa_IN": "lipendzabi (ÃndÉ›)", + "pa_PK": "lipendzabi (Pakisitá)", + "pl": "lipolonÉ›", + "pl_PL": "lipolonÉ› (Poloni)", + "pt": "lipulutugÉ›Ìsi", + "pt_AO": "lipulutugÉ›Ìsi (Angóla)", + "pt_BR": "lipulutugÉ›Ìsi (BrezílÉ›)", + "pt_CH": "lipulutugÉ›Ìsi (SwisÉ›)", + "pt_CV": "lipulutugÉ›Ìsi (Bisanga bya KapevÉ›rÉ›)", + "pt_GQ": "lipulutugÉ›Ìsi (GinÉ›ÌkwatÉ›ÌlÉ›)", + "pt_GW": "lipulutugÉ›Ìsi (GinÉ›bisau)", + "pt_LU": "lipulutugÉ›Ìsi (Likisambulu)", + "pt_MZ": "lipulutugÉ›Ìsi (Mozambíki)", + "pt_PT": "lipulutugÉ›Ìsi (PutúlugÉ›si)", + "pt_ST": "lipulutugÉ›Ìsi (Sao Tomé mpé PresipÉ›)", + "pt_TL": "lipulutugÉ›Ìsi (TimorÉ› ya MoniÉ›lÉ›)", + "ro": "liromani", + "ro_MD": "liromani (Molidavi)", + "ro_RO": "liromani (Romani)", + "ru": "lirisí", + "ru_BY": "lirisí (Byelorisi)", + "ru_KG": "lirisí (Kigizisitá)", + "ru_KZ": "lirisí (Kazakisitá)", + "ru_MD": "lirisí (Molidavi)", + "ru_RU": "lirisí (Risí)", + "ru_UA": "lirisí (IkrÉ›ni)", + "rw": "kinyarwanda", + "rw_RW": "kinyarwanda (Rwanda)", + "so": "lisomali", + "so_DJ": "lisomali (Dzibuti)", + "so_ET": "lisomali (Etsíopi)", + "so_KE": "lisomali (Kenya)", + "so_SO": "lisomali (Somali)", + "sv": "lisuwedÉ›", + "sv_FI": "lisuwedÉ› (FilandÉ›)", + "sv_SE": "lisuwedÉ› (SwédÉ›)", + "ta": "litamuli", + "ta_IN": "litamuli (ÃndÉ›)", + "ta_LK": "litamuli (Sirilanka)", + "ta_MY": "litamuli (Malezi)", + "ta_SG": "litamuli (SingapurÉ›)", + "th": "litaye", + "th_TH": "litaye (TailandÉ›)", + "tr": "litiliki", + "tr_CY": "litiliki (SípÉ›lÉ›)", + "tr_TR": "litiliki (Tiliki)", + "uk": "likrÉ›ni", + "uk_UA": "likrÉ›ni (IkrÉ›ni)", + "ur": "liurdu", + "ur_IN": "liurdu (ÃndÉ›)", + "ur_PK": "liurdu (Pakisitá)", + "vi": "liviyetinámi", + "vi_VN": "liviyetinámi (ViyetinamÉ›)", + "yo": "yoruba", + "yo_BJ": "yoruba (BenÉ›)", + "yo_NG": "yoruba (Nizerya)", + "zh": "lisinwa", + "zh_CN": "lisinwa (SinÉ›)", + "zh_SG": "lisinwa (SingapurÉ›)", + "zh_TW": "lisinwa (Taiwanin)", + "zu": "zulu", + "zu_ZA": "zulu (Afríka ya Súdi)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lo.json new file mode 100644 index 0000000000000000000000000000000000000000..50131c413f65fbb3caff3bb0a0d4d2560794ac99 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lo.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "ອາຟຣິàºàº²àº™", + "af_NA": "ອາຟຣິàºàº²àº™ (ນາມີເບàº)", + "af_ZA": "ອາຟຣິàºàº²àº™ (ອາຟຣິàºàº²à»ƒàº•້)", + "ak": "ອາàºàº²àº™", + "ak_GH": "ອາàºàº²àº™ (àºàº²àº™àº²)", + "am": "ອຳຮາຣິàº", + "am_ET": "ອຳຮາຣິຠ(ອີທິໂອເປàº)", + "ar": "ອາຣັບ", + "ar_AE": "ອາຣັບ (ສະຫະລັດອາຣັບເອມິເຣດ)", + "ar_BH": "ອາຣັບ (ບາເຣນ)", + "ar_DJ": "ອາຣັບ (ຈິບູຕິ)", + "ar_DZ": "ອາຣັບ (ອັລຈິເຣàº)", + "ar_EG": "ອາຣັບ (ອີຢິບ)", + "ar_EH": "ອາຣັບ (ຊາຮາຣາຕາເວັນຕົàº)", + "ar_ER": "ອາຣັບ (ເອຣິເທຣàº)", + "ar_IL": "ອາຣັບ (ອິສຣາເອວ)", + "ar_IQ": "ອາຣັບ (ອີຣັàº)", + "ar_JO": "ອາຣັບ (ຈà»à»àº”ນ)", + "ar_KM": "ອາຣັບ (ໂຄໂມໂຣສ)", + "ar_KW": "ອາຣັບ (àºàº¹à»€àº§àº”)", + "ar_LB": "ອາຣັບ (ເລບານອນ)", + "ar_LY": "ອາຣັບ (ລິເບàº)", + "ar_MA": "ອາຣັບ (ໂມຣັອàºà»‚ຄ)", + "ar_MR": "ອາຣັບ (ມົວຣິເທເນàº)", + "ar_OM": "ອາຣັບ (ໂອມານ)", + "ar_PS": "ອາຣັບ (ດິນà»àº”ນ ປາເລສຕິນຽນ)", + "ar_QA": "ອາຣັບ (àºàº²àº•າ)", + "ar_SA": "ອາຣັບ (ຊາອຸດິ ອາຣາເບàº)", + "ar_SD": "ອາຣັບ (ຊູດານ)", + "ar_SO": "ອາຣັບ (ໂຊມາລີ)", + "ar_SS": "ອາຣັບ (ຊູດານໃຕ້)", + "ar_SY": "ອາຣັບ (ຊີເຣàº)", + "ar_TD": "ອາຣັບ (ຊາດ)", + "ar_TN": "ອາຣັບ (ຕູນິເຊàº)", + "ar_YE": "ອາຣັບ (ເຢເມນ)", + "as": "ອັສຊາມີສ", + "as_IN": "ອັສຊາມີສ (ອິນເດàº)", + "az": "ອາເຊີໄບຈານິ", + "az_AZ": "ອາເຊີໄບຈານິ (ອາເຊີໄບຈານ)", + "az_Cyrl": "ອາເຊີໄບຈານິ (ຊີຣິວລິàº)", + "az_Cyrl_AZ": "ອາເຊີໄບຈານິ (ຊີຣິວລິàº, ອາເຊີໄບຈານ)", + "az_Latn": "ອາເຊີໄບຈານິ (ລາຕິນ)", + "az_Latn_AZ": "ອາເຊີໄບຈານິ (ລາຕິນ, ອາເຊີໄບຈານ)", + "be": "ເບລາຣັສຊຽນ", + "be_BY": "ເບລາຣັສຊຽນ (ເບວບາຣຸສ)", + "bg": "ບັງàºàº²àº£àº½àº™", + "bg_BG": "ບັງàºàº²àº£àº½àº™ (ບັງàºàº²à»€àº£àº)", + "bm": "ບາມບາຣາ", + "bm_ML": "ບາມບາຣາ (ມາລີ)", + "bn": "ເບັງàºàº²àº¥àºµ", + "bn_BD": "ເບັງàºàº²àº¥àºµ (ບັງàºàº°àº¥àº²à»€àº—ດ)", + "bn_IN": "ເບັງàºàº²àº¥àºµ (ອິນເດàº)", + "bo": "ທິເບທັນ", + "bo_CN": "ທິເບທັນ (ຈີນ)", + "bo_IN": "ທິເບທັນ (ອິນເດàº)", + "br": "ເບຣຕັນ", + "br_FR": "ເບຣຕັນ (àºàº£àº±à»ˆàº‡)", + "bs": "ບອສນຽນ", + "bs_BA": "ບອສນຽນ (ບອດສະເນຠà»àº¥àº° à»àº®àºªà»‚àºàº§àºµàº™àº²)", + "bs_Cyrl": "ບອສນຽນ (ຊີຣິວລິàº)", + "bs_Cyrl_BA": "ບອສນຽນ (ຊີຣິວລິàº, ບອດສະເນຠà»àº¥àº° à»àº®àºªà»‚àºàº§àºµàº™àº²)", + "bs_Latn": "ບອສນຽນ (ລາຕິນ)", + "bs_Latn_BA": "ບອສນຽນ (ລາຕິນ, ບອດສະເນຠà»àº¥àº° à»àº®àºªà»‚àºàº§àºµàº™àº²)", + "ca": "ຄາຕາລານ", + "ca_AD": "ຄາຕາລານ (ອັນດà»àº£àº²)", + "ca_ES": "ຄາຕາລານ (ສະເປນ)", + "ca_FR": "ຄາຕາລານ (àºàº£àº±à»ˆàº‡)", + "ca_IT": "ຄາຕາລານ (ອິຕາລີ)", + "ce": "ຊີເຄນ", + "ce_RU": "ຊີເຄນ (ຣັດເຊàº)", + "cs": "ເຊàº", + "cs_CZ": "ເຊຠ(ສາທາລະນະລັດເຊັàº)", + "cy": "ເວວ", + "cy_GB": "ເວວ (ສະຫະລາດຊະອະນາຈັàº)", + "da": "à»àº”ນິຊ", + "da_DK": "à»àº”ນິຊ (ເດນມາàº)", + "da_GL": "à»àº”ນິຊ (àºàº£àºµàº™à»àº¥àº™)", + "de": "ເຢàºàº¥àº°àº¡àº±àº™", + "de_AT": "ເຢàºàº¥àº°àº¡àº±àº™ (ອອສເທຣàº)", + "de_BE": "ເຢàºàº¥àº°àº¡àº±àº™ (ເບວຢຽມ)", + "de_CH": "ເຢàºàº¥àº°àº¡àº±àº™ (ສະວິດເຊີà»àº¥àº™)", + "de_DE": "ເຢàºàº¥àº°àº¡àº±àº™ (ເຢàºàº¥àº°àº¡àº±àº™)", + "de_IT": "ເຢàºàº¥àº°àº¡àº±àº™ (ອິຕາລີ)", + "de_LI": "ເຢàºàº¥àº°àº¡àº±àº™ (ລິດເທນສະຕາàº)", + "de_LU": "ເຢàºàº¥àº°àº¡àº±àº™ (ລຸàºàºŠàº³àºšàº»àº§)", + "dz": "ດີຊອງຄາ", + "dz_BT": "ດີຊອງຄາ (ພູຖານ)", + "ee": "ອິວາ", + "ee_GH": "ອິວາ (àºàº²àº™àº²)", + "ee_TG": "ອິວາ (ໂຕໂàº)", + "el": "àºàº£àºµàº", + "el_CY": "àºàº£àºµàº (ໄຊປຣັສ)", + "el_GR": "àºàº£àºµàº (àºàº£àºµàºŠ)", + "en": "ອັງàºàº´àº”", + "en_AG": "ອັງàºàº´àº” (à»àº­àº™àº—ິàºàº»àº§ à»àº¥àº° ບາບູດາ)", + "en_AI": "ອັງàºàº´àº” (à»àº­àº™àºàº¸àºàº¥àº²)", + "en_AS": "ອັງàºàº´àº” (ອາເມຣິàºàº² ຊາມົວ)", + "en_AT": "ອັງàºàº´àº” (ອອສເທຣàº)", + "en_AU": "ອັງàºàº´àº” (ອອສເຕຣເລàº)", + "en_BB": "ອັງàºàº´àº” (ບາບາໂດສ)", + "en_BE": "ອັງàºàº´àº” (ເບວຢຽມ)", + "en_BI": "ອັງàºàº´àº” (ບູຣຸນດິ)", + "en_BM": "ອັງàºàº´àº” (ເບີມິວດາ)", + "en_BS": "ອັງàºàº´àº” (ບາຮາມາສ)", + "en_BW": "ອັງàºàº´àº” (ບອດສະວານາ)", + "en_BZ": "ອັງàºàº´àº” (ເບລີຊ)", + "en_CA": "ອັງàºàº´àº” (à»àº„ນາດາ)", + "en_CC": "ອັງàºàº´àº” (ຫມູ່ເàºàº²àº°à»‚àºà»‚àºàºª)", + "en_CH": "ອັງàºàº´àº” (ສະວິດເຊີà»àº¥àº™)", + "en_CK": "ອັງàºàº´àº” (à»àº¹à»ˆà»€àºàº²àº°àº„ຸàº)", + "en_CM": "ອັງàºàº´àº” (ຄາເມຣູນ)", + "en_CX": "ອັງàºàº´àº” (ເàºàº²àº°àº„ຣິສມາດ)", + "en_CY": "ອັງàºàº´àº” (ໄຊປຣັສ)", + "en_DE": "ອັງàºàº´àº” (ເຢàºàº¥àº°àº¡àº±àº™)", + "en_DG": "ອັງàºàº´àº” (ດິເອໂຠàºàº²à»€àºŠàº)", + "en_DK": "ອັງàºàº´àº” (ເດນມາàº)", + "en_DM": "ອັງàºàº´àº” (ໂດມີນິຄາ)", + "en_ER": "ອັງàºàº´àº” (ເອຣິເທຣàº)", + "en_FI": "ອັງàºàº´àº” (ຟິນà»àº¥àº™)", + "en_FJ": "ອັງàºàº´àº” (ຟິຈິ)", + "en_FK": "ອັງàºàº´àº” (ຫມູ່ເàºàº²àº°àºŸàº­àºà»àº¥àº™)", + "en_FM": "ອັງàºàº´àº” (ໄມໂຄຣນີເຊàº)", + "en_GB": "ອັງàºàº´àº” (ສະຫະລາດຊະອະນາຈັàº)", + "en_GD": "ອັງàºàº´àº” (ເàºàº£à»€àº™àº”າ)", + "en_GG": "ອັງàºàº´àº” (ເàºàºµàº™àºŠàºµ)", + "en_GH": "ອັງàºàº´àº” (àºàº²àº™àº²)", + "en_GI": "ອັງàºàº´àº” (ຈິບບຣອນທາ)", + "en_GM": "ອັງàºàº´àº” (ສາທາລະນະລັດà»àºàº¡à»€àºšàº)", + "en_GU": "ອັງàºàº´àº” (àºàº§àº²àº¡)", + "en_GY": "ອັງàºàº´àº” (àºàº²àºàº¢àº²àº™àº²)", + "en_HK": "ອັງàºàº´àº” (ຮອງàºàº»àº‡ ເຂດປົàºàº„ອງພິເສດ ຈີນ)", + "en_IE": "ອັງàºàº´àº” (ໄອຣ໌à»àº¥àº™)", + "en_IL": "ອັງàºàº´àº” (ອິສຣາເອວ)", + "en_IM": "ອັງàºàº´àº” (ເອວ ອອບ à»àº¡àº™)", + "en_IN": "ອັງàºàº´àº” (ອິນເດàº)", + "en_IO": "ອັງàºàº´àº” (ເຂດà»àº”ນອັງàºàº´àº”ໃນມະຫາສະມຸດອິນເດàº)", + "en_JE": "ອັງàºàº´àº” (ເຈີຊີ)", + "en_JM": "ອັງàºàº´àº” (ຈາໄມຄາ)", + "en_KE": "ອັງàºàº´àº” (ເຄນຢາ)", + "en_KI": "ອັງàºàº´àº” (ຄິຣິບາທິ)", + "en_KN": "ອັງàºàº´àº” (ເຊນ ຄິດ à»àº¥àº° ເນວິສ)", + "en_KY": "ອັງàºàº´àº” (à»àº¹à»ˆà»€àºàº²àº° ເຄà»àº¡àº™)", + "en_LC": "ອັງàºàº´àº” (ເຊນ ລູເຊàº)", + "en_LR": "ອັງàºàº´àº” (ລິເບີເຣàº)", + "en_LS": "ອັງàºàº´àº” (ເລໂຊໂທ)", + "en_MG": "ອັງàºàº´àº” (ມາດາàºàº²àºªàºàº²)", + "en_MH": "ອັງàºàº´àº” (ຫມູ່ເàºàº²àº°àº¡àº²à»àºŠàº§)", + "en_MO": "ອັງàºàº´àº” (ມາເàºàº»à»‰àº² ເຂດປົàºàº„ອງພິເສດ ຈີນ)", + "en_MP": "ອັງàºàº´àº” (ຫມູ່ເàºàº²àº°àº¡àº²à»àºŠàº§àº•ອນເຫນືອ)", + "en_MS": "ອັງàºàº´àº” (ມອນເຊີຣາດ)", + "en_MT": "ອັງàºàº´àº” (ມອນທາ)", + "en_MU": "ອັງàºàº´àº” (ມົວຣິຊຽສ)", + "en_MW": "ອັງàºàº´àº” (ມາລາວີ)", + "en_MY": "ອັງàºàº´àº” (ມາເລເຊàº)", + "en_NA": "ອັງàºàº´àº” (ນາມີເບàº)", + "en_NF": "ອັງàºàº´àº” (ເàºàº²àº°àº™à»à»‚ຟàº)", + "en_NG": "ອັງàºàº´àº” (ໄນຈີເຣàº)", + "en_NL": "ອັງàºàº´àº” (ເນເທີà»àº¥àº™)", + "en_NR": "ອັງàºàº´àº” (ນາອູຣູ)", + "en_NU": "ອັງàºàº´àº” (ນີອູເອ)", + "en_NZ": "ອັງàºàº´àº” (ນິວຊີà»àº¥àº™)", + "en_PG": "ອັງàºàº´àº” (ປາປົວນິວàºàºµàº™àºµ)", + "en_PH": "ອັງàºàº´àº” (ຟິລິບປິນ)", + "en_PK": "ອັງàºàº´àº” (ປາàºàº´àº”ສະຖານ)", + "en_PN": "ອັງàºàº´àº” (à»àº¹à»ˆà»€àºàº²àº°àºžàº´àº”à»àº„ນ)", + "en_PR": "ອັງàºàº´àº” (ເພືອໂຕ ຣິໂàº)", + "en_PW": "ອັງàºàº´àº” (ປາລາວ)", + "en_RW": "ອັງàºàº´àº” (ຣວັນດາ)", + "en_SB": "ອັງàºàº´àº” (ຫມູ່ເàºàº²àº°à»‚ຊໂລມອນ)", + "en_SC": "ອັງàºàº´àº” (ເຊເຊວເລສ)", + "en_SD": "ອັງàºàº´àº” (ຊູດານ)", + "en_SE": "ອັງàºàº´àº” (ສະວີເດັນ)", + "en_SG": "ອັງàºàº´àº” (ສິງàºàº°à»‚ປ)", + "en_SH": "ອັງàºàº´àº” (ເຊນ ເຮເລນາ)", + "en_SI": "ອັງàºàº´àº” (ສະໂລເວເນàº)", + "en_SL": "ອັງàºàº´àº” (ເຊàºàº£àº² ລີໂອນ)", + "en_SS": "ອັງàºàº´àº” (ຊູດານໃຕ້)", + "en_SX": "ອັງàºàº´àº” (ຊິນ ມາເທັນ)", + "en_SZ": "ອັງàºàº´àº” (ສະວາຊິà»àº¥àº™)", + "en_TC": "ອັງàºàº´àº” (à»àº¹à»ˆà»€àºàº²àº° ເທີຠà»àº¥àº° ໄຄໂຄສ)", + "en_TK": "ອັງàºàº´àº” (ໂຕເàºà»€àº¥àº»àº²)", + "en_TO": "ອັງàºàº´àº” (ທອງàºàº²)", + "en_TT": "ອັງàºàº´àº” (ທຣິນິà»àº”ດ à»àº¥àº° ໂທà»àºšà»‚àº)", + "en_TV": "ອັງàºàº´àº” (ຕູວາລູ)", + "en_TZ": "ອັງàºàº´àº” (ທານຊາເນàº)", + "en_UG": "ອັງàºàº´àº” (ອູàºàº²àº™àº”າ)", + "en_UM": "ອັງàºàº´àº” (à»àº¹à»ˆà»€àºàº²àº°àº®àº­àºšàº™àº­àºàº‚ອງສະຫະລັດຯ)", + "en_US": "ອັງàºàº´àº” (ສະຫະລັດ)", + "en_VC": "ອັງàºàº´àº” (ເຊນ ວິນເຊນ à»àº¥àº° ເàºàº£à»€àº™àº”ິນ)", + "en_VG": "ອັງàºàº´àº” (à»àº¹à»ˆà»€àºàº²àº° ບຣິທິຊ ເວີຈິນ)", + "en_VI": "ອັງàºàº´àº” (à»àº¹à»ˆà»€àºàº²àº° ຢູເອສ ເວີຈິນ)", + "en_VU": "ອັງàºàº´àº” (ວານົວຕູ)", + "en_WS": "ອັງàºàº´àº” (ຊາມົວ)", + "en_ZA": "ອັງàºàº´àº” (ອາຟຣິàºàº²à»ƒàº•້)", + "en_ZM": "ອັງàºàº´àº” (à»àºŠàº¡à»€àºšàº)", + "en_ZW": "ອັງàºàº´àº” (ຊິມບັບເວ)", + "eo": "ເອສປາàº", + "es": "ສະà»àº›àº™àº™àº´àºŠ", + "es_AR": "ສະà»àº›àº™àº™àº´àºŠ (ອາເຈນທິນາ)", + "es_BO": "ສະà»àº›àº™àº™àº´àºŠ (ໂບລິເວàº)", + "es_BR": "ສະà»àº›àº™àº™àº´àºŠ (ບະເລຊີນ)", + "es_CL": "ສະà»àº›àº™àº™àº´àºŠ (ຈີເລ)", + "es_CO": "ສະà»àº›àº™àº™àº´àºŠ (ໂຄລົມເບàº)", + "es_CR": "ສະà»àº›àº™àº™àº´àºŠ (ໂຄສຕາ ຣິàºàº²)", + "es_CU": "ສະà»àº›àº™àº™àº´àºŠ (ຄິວບາ)", + "es_DO": "ສະà»àº›àº™àº™àº´àºŠ (ສາທາລະນະລັດ ໂດມິນິàºàº±àº™)", + "es_EA": "ສະà»àº›àº™àº™àº´àºŠ (ເຊວຕາ à»àº¥àº°à»€àº¡àº¥àº´àº™àº¥àº²)", + "es_EC": "ສະà»àº›àº™àº™àº´àºŠ (ເອàºàº§àº²àº”à»)", + "es_ES": "ສະà»àº›àº™àº™àº´àºŠ (ສະເປນ)", + "es_GQ": "ສະà»àº›àº™àº™àº´àºŠ (ເອຄົວໂທຣຽວ àºàºµàº™àºµ)", + "es_GT": "ສະà»àº›àº™àº™àº´àºŠ (àºàº»àº§à»€àº—ມາລາ)", + "es_HN": "ສະà»àº›àº™àº™àº´àºŠ (ຮອນດູຣັສ)", + "es_IC": "ສະà»àº›àº™àº™àº´àºŠ (à»àº¹à»ˆà»€àºàº²àº°àº„ານາຣີ)", + "es_MX": "ສະà»àº›àº™àº™àº´àºŠ (ເມັàºàºŠàº´à»‚àº)", + "es_NI": "ສະà»àº›àº™àº™àº´àºŠ (ນິàºàº„າຣາàºàº»àº§)", + "es_PA": "ສະà»àº›àº™àº™àº´àºŠ (ພານາມາ)", + "es_PE": "ສະà»àº›àº™àº™àº´àºŠ (ເປຣູ)", + "es_PH": "ສະà»àº›àº™àº™àº´àºŠ (ຟິລິບປິນ)", + "es_PR": "ສະà»àº›àº™àº™àº´àºŠ (ເພືອໂຕ ຣິໂàº)", + "es_PY": "ສະà»àº›àº™àº™àº´àºŠ (ພາຣາàºàº§àº)", + "es_SV": "ສະà»àº›àº™àº™àº´àºŠ (ເອວ ຊà»àº§àº²àº”à»)", + "es_US": "ສະà»àº›àº™àº™àº´àºŠ (ສະຫະລັດ)", + "es_UY": "ສະà»àº›àº™àº™àº´àºŠ (ອູຣຸàºàº§àº)", + "es_VE": "ສະà»àº›àº™àº™àº´àºŠ (ເວເນຊູເອລາ)", + "et": "ເອສໂຕນຽນ", + "et_EE": "ເອສໂຕນຽນ (ເອສໂຕເນàº)", + "eu": "ບັສàºàºµ", + "eu_ES": "ບັສàºàºµ (ສະເປນ)", + "fa": "ເປີຊຽນ", + "fa_AF": "ເປີຊຽນ (ອາຟàºàº²àº™àº´àº”ສະຖານ)", + "fa_IR": "ເປີຊຽນ (ອີຣານ)", + "ff": "ຟູລາ", + "ff_CM": "ຟູລາ (ຄາເມຣູນ)", + "ff_GN": "ຟູລາ (àºàº´àº™àºµ)", + "ff_MR": "ຟູລາ (ມົວຣິເທເນàº)", + "ff_SN": "ຟູລາ (ເຊນີໂàºàº¥)", + "fi": "ຟິນນິຊ", + "fi_FI": "ຟິນນິຊ (ຟິນà»àº¥àº™)", + "fo": "ຟາໂຣສ", + "fo_DK": "ຟາໂຣສ (ເດນມາàº)", + "fo_FO": "ຟາໂຣສ (ຫມູ່ເàºàº²àº°à»àºŸà»‚ຣ)", + "fr": "àºàº£àº±à»ˆàº‡", + "fr_BE": "àºàº£àº±à»ˆàº‡ (ເບວຢຽມ)", + "fr_BF": "àºàº£àº±à»ˆàº‡ (ເບີàºàº´àº™àº² ຟາໂຊ)", + "fr_BI": "àºàº£àº±à»ˆàº‡ (ບູຣຸນດິ)", + "fr_BJ": "àºàº£àº±à»ˆàº‡ (ເບນິນ)", + "fr_BL": "àºàº£àº±à»ˆàº‡ (ເຊນ ບາເທເລມີ)", + "fr_CA": "àºàº£àº±à»ˆàº‡ (à»àº„ນາດາ)", + "fr_CD": "àºàº£àº±à»ˆàº‡ (ຄອງໂຠ- ຄິນຊາຊາ)", + "fr_CF": "àºàº£àº±à»ˆàº‡ (ສາທາລະນະລັດອາຟຣິàºàº²àºàº²àº‡)", + "fr_CG": "àºàº£àº±à»ˆàº‡ (ຄອງໂຠ- ບຣາຊາວິວ)", + "fr_CH": "àºàº£àº±à»ˆàº‡ (ສະວິດເຊີà»àº¥àº™)", + "fr_CI": "àºàº£àº±à»ˆàº‡ (ໂຄຕີ ວົວ)", + "fr_CM": "àºàº£àº±à»ˆàº‡ (ຄາເມຣູນ)", + "fr_DJ": "àºàº£àº±à»ˆàº‡ (ຈິບູຕິ)", + "fr_DZ": "àºàº£àº±à»ˆàº‡ (ອັລຈິເຣàº)", + "fr_FR": "àºàº£àº±à»ˆàº‡ (àºàº£àº±à»ˆàº‡)", + "fr_GA": "àºàº£àº±à»ˆàº‡ (àºàº²àºšàº­àº™)", + "fr_GF": "àºàº£àº±à»ˆàº‡ (ເຟຣນຊ໌ àºàº¸àºàº­àº²àº™àº²)", + "fr_GN": "àºàº£àº±à»ˆàº‡ (àºàº´àº™àºµ)", + "fr_GP": "àºàº£àº±à»ˆàº‡ (àºàº»àº§àº”າລູບ)", + "fr_GQ": "àºàº£àº±à»ˆàº‡ (ເອຄົວໂທຣຽວ àºàºµàº™àºµ)", + "fr_HT": "àºàº£àº±à»ˆàº‡ (ໄຮຕິ)", + "fr_KM": "àºàº£àº±à»ˆàº‡ (ໂຄໂມໂຣສ)", + "fr_LU": "àºàº£àº±à»ˆàº‡ (ລຸàºàºŠàº³àºšàº»àº§)", + "fr_MA": "àºàº£àº±à»ˆàº‡ (ໂມຣັອàºà»‚ຄ)", + "fr_MC": "àºàº£àº±à»ˆàº‡ (ໂມນາໂຄ)", + "fr_MF": "àºàº£àº±à»ˆàº‡ (ເຊນ ມາທິນ)", + "fr_MG": "àºàº£àº±à»ˆàº‡ (ມາດາàºàº²àºªàºàº²)", + "fr_ML": "àºàº£àº±à»ˆàº‡ (ມາລີ)", + "fr_MQ": "àºàº£àº±à»ˆàº‡ (ມາຕິນີàº)", + "fr_MR": "àºàº£àº±à»ˆàº‡ (ມົວຣິເທເນàº)", + "fr_MU": "àºàº£àº±à»ˆàº‡ (ມົວຣິຊຽສ)", + "fr_NC": "àºàº£àº±à»ˆàº‡ (ນິວ ຄາເລໂດເນàº)", + "fr_NE": "àºàº£àº±à»ˆàº‡ (ນິເຈີ)", + "fr_PF": "àºàº£àº±à»ˆàº‡ (ເຟຣນຊ໌ ໂພລິນີເຊàº)", + "fr_PM": "àºàº£àº±à»ˆàº‡ (ເຊນ ປີà»àº­ ມິເàºàº§àº¥àº­àº™)", + "fr_RE": "àºàº£àº±à»ˆàº‡ (ເຣອູນິàºàº»àº‡)", + "fr_RW": "àºàº£àº±à»ˆàº‡ (ຣວັນດາ)", + "fr_SC": "àºàº£àº±à»ˆàº‡ (ເຊເຊວເລສ)", + "fr_SN": "àºàº£àº±à»ˆàº‡ (ເຊນີໂàºàº¥)", + "fr_SY": "àºàº£àº±à»ˆàº‡ (ຊີເຣàº)", + "fr_TD": "àºàº£àº±à»ˆàº‡ (ຊາດ)", + "fr_TG": "àºàº£àº±à»ˆàº‡ (ໂຕໂàº)", + "fr_TN": "àºàº£àº±à»ˆàº‡ (ຕູນິເຊàº)", + "fr_VU": "àºàº£àº±à»ˆàº‡ (ວານົວຕູ)", + "fr_WF": "àºàº£àº±à»ˆàº‡ (ວາລລິສ à»àº¥àº° ຟູຕູນາ)", + "fr_YT": "àºàº£àº±à»ˆàº‡ (ມາຢັອດ)", + "fy": "ຟຣິຊຽນ ຕາເວັນຕົàº", + "fy_NL": "ຟຣິຊຽນ ຕາເວັນຕົຠ(ເນເທີà»àº¥àº™)", + "ga": "ໄອຣິສ", + "ga_IE": "ໄອຣິສ (ໄອຣ໌à»àº¥àº™)", + "gd": "ສະàºàº±àº­àº”ເàºàº¥àº´àº", + "gd_GB": "ສະàºàº±àº­àº”ເàºàº¥àº´àº (ສະຫະລາດຊະອະນາຈັàº)", + "gl": "àºàº²àº¥àº´àºŠàº½àº™", + "gl_ES": "àºàº²àº¥àº´àºŠàº½àº™ (ສະເປນ)", + "gu": "àºàº¹àºˆàº²àº£àº²àº•ິ", + "gu_IN": "àºàº¹àºˆàº²àº£àº²àº•ິ (ອິນເດàº)", + "gv": "à»àº¡àº‡àºŠà»Œ", + "gv_IM": "à»àº¡àº‡àºŠà»Œ (ເອວ ອອບ à»àº¡àº™)", + "ha": "ເຮົາຊາ", + "ha_GH": "ເຮົາຊາ (àºàº²àº™àº²)", + "ha_NE": "ເຮົາຊາ (ນິເຈີ)", + "ha_NG": "ເຮົາຊາ (ໄນຈີເຣàº)", + "he": "ຮີບຣິວ", + "he_IL": "ຮີບຣິວ (ອິສຣາເອວ)", + "hi": "ຮິນດິ", + "hi_IN": "ຮິນດິ (ອິນເດàº)", + "hr": "ໂຄຣເອທຽນ", + "hr_BA": "ໂຄຣເອທຽນ (ບອດສະເນຠà»àº¥àº° à»àº®àºªà»‚àºàº§àºµàº™àº²)", + "hr_HR": "ໂຄຣເອທຽນ (ໂຄຣເອເທàº)", + "hu": "ຮັງàºàº²àº£àº½àº™", + "hu_HU": "ຮັງàºàº²àº£àº½àº™ (ຮັງàºàº²àº£àºµ)", + "hy": "ອາເມນຽນ", + "hy_AM": "ອາເມນຽນ (ອາເມເນàº)", + "id": "ອິນໂດເນຊຽນ", + "id_ID": "ອິນໂດເນຊຽນ (ອິນໂດເນເຊàº)", + "ig": "ອິàºà»‚ບ", + "ig_NG": "ອິàºà»‚ບ (ໄນຈີເຣàº)", + "ii": "ເຊສວàºàº¢àºµ", + "ii_CN": "ເຊສວàºàº¢àºµ (ຈີນ)", + "is": "ໄອສà»àº¥àº™àº”ິàº", + "is_IS": "ໄອສà»àº¥àº™àº”ິຠ(ໄອສà»àº¥àº™)", + "it": "ອິຕາລຽນ", + "it_CH": "ອິຕາລຽນ (ສະວິດເຊີà»àº¥àº™)", + "it_IT": "ອິຕາລຽນ (ອິຕາລີ)", + "it_SM": "ອິຕາລຽນ (à»àºŠàº™ ມາຣິໂນ)", + "ja": "àºàºµà»ˆàº›àº¸à»ˆàº™", + "ja_JP": "àºàºµà»ˆàº›àº¸à»ˆàº™ (àºàºµà»ˆàº›àº¸à»ˆàº™)", + "ka": "ຈà»àºˆàº½àº™", + "ka_GE": "ຈà»àºˆàº½àº™ (ຈà»à»€àºˆàº)", + "ki": "ຄິຄູຢຸ", + "ki_KE": "ຄິຄູຢຸ (ເຄນຢາ)", + "kk": "ຄາຊັàº", + "kk_KZ": "ຄາຊັຠ(ຄາຊັàºàºªàº°àº–ານ)", + "kl": "àºàº£àºµàº™à»àº¥àº™àº¥àº´àº”", + "kl_GL": "àºàº£àºµàº™à»àº¥àº™àº¥àº´àº” (àºàº£àºµàº™à»àº¥àº™)", + "km": "ຂະເà»àº™", + "km_KH": "ຂະເà»àº™ (àºàº³àº›àº¹à»€àºˆàº)", + "kn": "ຄັນນາດາ", + "kn_IN": "ຄັນນາດາ (ອິນເດàº)", + "ko": "ເàºàº»àº²àº«àº¥àºµ", + "ko_KP": "ເàºàº»àº²àº«àº¥àºµ (ເàºàº»àº²àº«àº¥àºµà»€à»œàº·àº­)", + "ko_KR": "ເàºàº»àº²àº«àº¥àºµ (ເàºàº»àº²àº«àº¥àºµà»ƒàº•້)", + "ks": "ຄາສເມàºàº£àº´", + "ks_IN": "ຄາສເມàºàº£àº´ (ອິນເດàº)", + "kw": "ຄà»àº™àº´àºŠ", + "kw_GB": "ຄà»àº™àº´àºŠ (ສະຫະລາດຊະອະນາຈັàº)", + "ky": "ເàºàºàºàºµàºª", + "ky_KG": "ເàºàºàºàºµàºª (ຄີàºàº´àºªàº–ານ)", + "lb": "ລັàºà»€àºŠàº¡àºšàº§àºàºàº´àºŠ", + "lb_LU": "ລັàºà»€àºŠàº¡àºšàº§àºàºàº´àºŠ (ລຸàºàºŠàº³àºšàº»àº§)", + "lg": "à»àºàº™àº”າ", + "lg_UG": "à»àºàº™àº”າ (ອູàºàº²àº™àº”າ)", + "ln": "ລິງàºàº²àº¥àº²", + "ln_AO": "ລິງàºàº²àº¥àº² (à»àº­àº‡à»‚àºàº¥àº²)", + "ln_CD": "ລິງàºàº²àº¥àº² (ຄອງໂຠ- ຄິນຊາຊາ)", + "ln_CF": "ລິງàºàº²àº¥àº² (ສາທາລະນະລັດອາຟຣິàºàº²àºàº²àº‡)", + "ln_CG": "ລິງàºàº²àº¥àº² (ຄອງໂຠ- ບຣາຊາວິວ)", + "lo": "ລາວ", + "lo_LA": "ລາວ (ລາວ)", + "lt": "ລິທົວນຽນ", + "lt_LT": "ລິທົວນຽນ (ລິທົວເນàº)", + "lu": "ລູບາ-ຄາຕັງàºàº²", + "lu_CD": "ລູບາ-ຄາຕັງàºàº² (ຄອງໂຠ- ຄິນຊາຊາ)", + "lv": "ລັດວຽນ", + "lv_LV": "ລັດວຽນ (ລັດເວàº)", + "mg": "ມາລາàºàº²àºªàºŠàºµ", + "mg_MG": "ມາລາàºàº²àºªàºŠàºµ (ມາດາàºàº²àºªàºàº²)", + "mk": "à»àº¡àºŠàº´à»‚ດນຽນ", + "mk_MK": "à»àº¡àºŠàº´à»‚ດນຽນ (à»àº¡àºŠàº´à»‚ດເນàº)", + "ml": "ມາເລອາລຳ", + "ml_IN": "ມາເລອາລຳ (ອິນເດàº)", + "mn": "ມອງໂàºà»€àº¥àº", + "mn_MN": "ມອງໂàºà»€àº¥àº (ມອງໂàºà»€àº¥àº)", + "mr": "ມາຣາທີ", + "mr_IN": "ມາຣາທີ (ອິນເດàº)", + "ms": "ມາເລ", + "ms_BN": "ມາເລ (ບຣູໄນ)", + "ms_MY": "ມາເລ (ມາເລເຊàº)", + "ms_SG": "ມາເລ (ສິງàºàº°à»‚ປ)", + "mt": "ມອລທີສ", + "mt_MT": "ມອລທີສ (ມອນທາ)", + "my": "ມຽນມາ", + "my_MM": "ມຽນມາ (ມຽນມາ (ເບີມາ))", + "nb": "ນà»à»€àº§àºˆàº½àº™ ບັອàºàº¡àº­àº¥", + "nb_NO": "ນà»à»€àº§àºˆàº½àº™ ບັອàºàº¡àº­àº¥ (ນà»à»€àº§)", + "nb_SJ": "ນà»à»€àº§àºˆàº½àº™ ບັອàºàº¡àº­àº¥ (ສະວາບາ à»àº¥àº° à»àº¢àº™ ມາເຢນ)", + "nd": "ເອັນເດເບເລເໜືອ", + "nd_ZW": "ເອັນເດເບເລເໜືອ (ຊິມບັບເວ)", + "ne": "ເນປາລີ", + "ne_IN": "ເນປາລີ (ອິນເດàº)", + "ne_NP": "ເນປາລີ (ເນປານ)", + "nl": "ດັຊ", + "nl_AW": "ດັຊ (ອາຣູບາ)", + "nl_BE": "ດັຊ (ເບວຢຽມ)", + "nl_BQ": "ດັຊ (ຄາຣິບບຽນ ເນເທີà»àº¥àº™)", + "nl_CW": "ດັຊ (ຄູຣາຊາວ)", + "nl_NL": "ດັຊ (ເນເທີà»àº¥àº™)", + "nl_SR": "ດັຊ (ຊູຣິນາມ)", + "nl_SX": "ດັຊ (ຊິນ ມາເທັນ)", + "nn": "ນà»à»€àº§àºˆàº½àº™ ນີນອàº", + "nn_NO": "ນà»à»€àº§àºˆàº½àº™ ນີນອຠ(ນà»à»€àº§)", + "no": "ນà»à»€àº§àº", + "no_NO": "ນà»à»€àº§àº (ນà»à»€àº§)", + "om": "ໂອໂຣໂມ", + "om_ET": "ໂອໂຣໂມ (ອີທິໂອເປàº)", + "om_KE": "ໂອໂຣໂມ (ເຄນຢາ)", + "or": "ໂອຣິຢາ", + "or_IN": "ໂອຣິຢາ (ອິນເດàº)", + "os": "ອອດເຊຕິàº", + "os_GE": "ອອດເຊຕິຠ(ຈà»à»€àºˆàº)", + "os_RU": "ອອດເຊຕິຠ(ຣັດເຊàº)", + "pa": "ປັນຈາບີ", + "pa_Arab": "ປັນຈາບີ (ອາຣາບິàº)", + "pa_Arab_PK": "ປັນຈາບີ (ອາຣາບິàº, ປາàºàº´àº”ສະຖານ)", + "pa_Guru": "ປັນຈາບີ (àºàº»àº§àº¡àº¹àº„ີ)", + "pa_Guru_IN": "ປັນຈາບີ (àºàº»àº§àº¡àº¹àº„ີ, ອິນເດàº)", + "pa_IN": "ປັນຈາບີ (ອິນເດàº)", + "pa_PK": "ປັນຈາບີ (ປາàºàº´àº”ສະຖານ)", + "pl": "ໂປລິຊ", + "pl_PL": "ໂປລິຊ (ໂປà»àº¥àº™)", + "ps": "ປາສໂຕ", + "ps_AF": "ປາສໂຕ (ອາຟàºàº²àº™àº´àº”ສະຖານ)", + "pt": "ປອàºàº•ຸàºàºàº´àºª", + "pt_AO": "ປອàºàº•ຸàºàºàº´àºª (à»àº­àº‡à»‚àºàº¥àº²)", + "pt_BR": "ປອàºàº•ຸàºàºàº´àºª (ບະເລຊີນ)", + "pt_CH": "ປອàºàº•ຸàºàºàº´àºª (ສະວິດເຊີà»àº¥àº™)", + "pt_CV": "ປອàºàº•ຸàºàºàº´àºª (ເຄບ ເວີດ)", + "pt_GQ": "ປອàºàº•ຸàºàºàº´àºª (ເອຄົວໂທຣຽວ àºàºµàº™àºµ)", + "pt_GW": "ປອàºàº•ຸàºàºàº´àºª (àºàº´àº™àºµ-ບິສເຊົາ)", + "pt_LU": "ປອàºàº•ຸàºàºàº´àºª (ລຸàºàºŠàº³àºšàº»àº§)", + "pt_MO": "ປອàºàº•ຸàºàºàº´àºª (ມາເàºàº»à»‰àº² ເຂດປົàºàº„ອງພິເສດ ຈີນ)", + "pt_MZ": "ປອàºàº•ຸàºàºàº´àºª (ໂມà»àºŠàº¡àºšàº´àº)", + "pt_PT": "ປອàºàº•ຸàºàºàº´àºª (ພອລທູໂàº)", + "pt_ST": "ປອàºàº•ຸàºàºàº´àºª (ເຊົາທູເມ à»àº¥àº° ພຣິນຊິບ)", + "pt_TL": "ປອàºàº•ຸàºàºàº´àºª (ທິມà»-ເລສເຕ)", + "qu": "ຄີຊົວ", + "qu_BO": "ຄີຊົວ (ໂບລິເວàº)", + "qu_EC": "ຄີຊົວ (ເອàºàº§àº²àº”à»)", + "qu_PE": "ຄີຊົວ (ເປຣູ)", + "rm": "ໂຣà»àº¡àº™àºŠà»Œ", + "rm_CH": "ໂຣà»àº¡àº™àºŠà»Œ (ສະວິດເຊີà»àº¥àº™)", + "rn": "ຣຸນດິ", + "rn_BI": "ຣຸນດິ (ບູຣຸນດິ)", + "ro": "ໂຣà»àº¡àº™àº½àº™", + "ro_MD": "ໂຣà»àº¡àº™àº½àº™ (ໂມນໂດວາ)", + "ro_RO": "ໂຣà»àº¡àº™àº½àº™ (ໂຣà»àº¡à»€àº™àº)", + "ru": "ລັດເຊàº", + "ru_BY": "ລັດເຊຠ(ເບວບາຣຸສ)", + "ru_KG": "ລັດເຊຠ(ຄີàºàº´àºªàº–ານ)", + "ru_KZ": "ລັດເຊຠ(ຄາຊັàºàºªàº°àº–ານ)", + "ru_MD": "ລັດເຊຠ(ໂມນໂດວາ)", + "ru_RU": "ລັດເຊຠ(ຣັດເຊàº)", + "ru_UA": "ລັດເຊຠ(ຢູເຄຣນ)", + "rw": "ຄິນຢາວານດາ", + "rw_RW": "ຄິນຢາວານດາ (ຣວັນດາ)", + "se": "ຊາມິເໜືອ", + "se_FI": "ຊາມິເໜືອ (ຟິນà»àº¥àº™)", + "se_NO": "ຊາມິເໜືອ (ນà»à»€àº§)", + "se_SE": "ຊາມິເໜືອ (ສະວີເດັນ)", + "sg": "à»àºŠàº‡à»‚àº", + "sg_CF": "à»àºŠàº‡à»‚ຠ(ສາທາລະນະລັດອາຟຣິàºàº²àºàº²àº‡)", + "sh": "ເຊີໂບ-ໂàºà»€àºŠàº", + "sh_BA": "ເຊີໂບ-ໂàºà»€àºŠàº (ບອດສະເນຠà»àº¥àº° à»àº®àºªà»‚àºàº§àºµàº™àº²)", + "si": "ສິນຫາລາ", + "si_LK": "ສິນຫາລາ (ສີລັງàºàº²)", + "sk": "ສະໂລà»àº§àº±àº", + "sk_SK": "ສະໂລà»àº§àº±àº (ສະໂລວາເàºàº)", + "sl": "ສະໂລເວນຽນ", + "sl_SI": "ສະໂລເວນຽນ (ສະໂລເວເນàº)", + "sn": "ໂຊນາ", + "sn_ZW": "ໂຊນາ (ຊິມບັບເວ)", + "so": "ໂຊມາລີ", + "so_DJ": "ໂຊມາລີ (ຈິບູຕິ)", + "so_ET": "ໂຊມາລີ (ອີທິໂອເປàº)", + "so_KE": "ໂຊມາລີ (ເຄນຢາ)", + "so_SO": "ໂຊມາລີ (ໂຊມາລີ)", + "sq": "ອານບານຽນ", + "sq_AL": "ອານບານຽນ (à»àº­àº§à»€àºšà»€àº™àº)", + "sq_MK": "ອານບານຽນ (à»àº¡àºŠàº´à»‚ດເນàº)", + "sq_XK": "ອານບານຽນ (ໂຄໂຊໂວ)", + "sr": "ເຊີບຽນ", + "sr_BA": "ເຊີບຽນ (ບອດສະເນຠà»àº¥àº° à»àº®àºªà»‚àºàº§àºµàº™àº²)", + "sr_Cyrl": "ເຊີບຽນ (ຊີຣິວລິàº)", + "sr_Cyrl_BA": "ເຊີບຽນ (ຊີຣິວລິàº, ບອດສະເນຠà»àº¥àº° à»àº®àºªà»‚àºàº§àºµàº™àº²)", + "sr_Cyrl_ME": "ເຊີບຽນ (ຊີຣິວລິàº, ມອນເຕເນໂàºàº£)", + "sr_Cyrl_RS": "ເຊີບຽນ (ຊີຣິວລິàº, ເຊີເບàº)", + "sr_Cyrl_XK": "ເຊີບຽນ (ຊີຣິວລິàº, ໂຄໂຊໂວ)", + "sr_Latn": "ເຊີບຽນ (ລາຕິນ)", + "sr_Latn_BA": "ເຊີບຽນ (ລາຕິນ, ບອດສະເນຠà»àº¥àº° à»àº®àºªà»‚àºàº§àºµàº™àº²)", + "sr_Latn_ME": "ເຊີບຽນ (ລາຕິນ, ມອນເຕເນໂàºàº£)", + "sr_Latn_RS": "ເຊີບຽນ (ລາຕິນ, ເຊີເບàº)", + "sr_Latn_XK": "ເຊີບຽນ (ລາຕິນ, ໂຄໂຊໂວ)", + "sr_ME": "ເຊີບຽນ (ມອນເຕເນໂàºàº£)", + "sr_RS": "ເຊີບຽນ (ເຊີເບàº)", + "sr_XK": "ເຊີບຽນ (ໂຄໂຊໂວ)", + "sv": "ສະວີດິຊ", + "sv_AX": "ສະວີດິຊ (ຫມູ່ເàºàº²àº°à»‚ອລັນ)", + "sv_FI": "ສະວີດິຊ (ຟິນà»àº¥àº™)", + "sv_SE": "ສະວີດິຊ (ສະວີເດັນ)", + "sw": "ຊວາຮີລິ", + "sw_CD": "ຊວາຮີລິ (ຄອງໂຠ- ຄິນຊາຊາ)", + "sw_KE": "ຊວາຮີລິ (ເຄນຢາ)", + "sw_TZ": "ຊວາຮີລິ (ທານຊາເນàº)", + "sw_UG": "ຊວາຮີລິ (ອູàºàº²àº™àº”າ)", + "ta": "ທາມິລ", + "ta_IN": "ທາມິລ (ອິນເດàº)", + "ta_LK": "ທາມິລ (ສີລັງàºàº²)", + "ta_MY": "ທາມິລ (ມາເລເຊàº)", + "ta_SG": "ທາມິລ (ສິງàºàº°à»‚ປ)", + "te": "ເຕລູàºàº¹", + "te_IN": "ເຕລູàºàº¹ (ອິນເດàº)", + "th": "ໄທ", + "th_TH": "ໄທ (ໄທ)", + "ti": "ຕິàºàº£àº´àº™àº¢àº²", + "ti_ER": "ຕິàºàº£àº´àº™àº¢àº² (ເອຣິເທຣàº)", + "ti_ET": "ຕິàºàº£àº´àº™àº¢àº² (ອີທິໂອເປàº)", + "tl": "ຕາàºàº²àº¥àº­àº", + "tl_PH": "ຕາàºàº²àº¥àº­àº (ຟິລິບປິນ)", + "to": "ທອງàºàº²àº™", + "to_TO": "ທອງàºàº²àº™ (ທອງàºàº²)", + "tr": "ເທີຄິຊ", + "tr_CY": "ເທີຄິຊ (ໄຊປຣັສ)", + "tr_TR": "ເທີຄິຊ (ເທີຄີ)", + "ug": "ອຸàºà»€àº„ີ", + "ug_CN": "ອຸàºà»€àº„ີ (ຈີນ)", + "uk": "ຢູເຄຣນຽນ", + "uk_UA": "ຢູເຄຣນຽນ (ຢູເຄຣນ)", + "ur": "ອູຣດູ", + "ur_IN": "ອູຣດູ (ອິນເດàº)", + "ur_PK": "ອູຣດູ (ປາàºàº´àº”ສະຖານ)", + "uz": "ອຸສເບàº", + "uz_AF": "ອຸສເບຠ(ອາຟàºàº²àº™àº´àº”ສະຖານ)", + "uz_Arab": "ອຸສເບຠ(ອາຣາບິàº)", + "uz_Arab_AF": "ອຸສເບຠ(ອາຣາບິàº, ອາຟàºàº²àº™àº´àº”ສະຖານ)", + "uz_Cyrl": "ອຸສເບຠ(ຊີຣິວລິàº)", + "uz_Cyrl_UZ": "ອຸສເບຠ(ຊີຣິວລິàº, ອຸສເບàºàº´àºªàº°àº–ານ)", + "uz_Latn": "ອຸສເບຠ(ລາຕິນ)", + "uz_Latn_UZ": "ອຸສເບຠ(ລາຕິນ, ອຸສເບàºàº´àºªàº°àº–ານ)", + "uz_UZ": "ອຸສເບຠ(ອຸສເບàºàº´àºªàº°àº–ານ)", + "vi": "ຫວຽດນາມ", + "vi_VN": "ຫວຽດນາມ (ຫວຽດນາມ)", + "yi": "ຢິວ", + "yo": "ໂຢຣູບາ", + "yo_BJ": "ໂຢຣູບາ (ເບນິນ)", + "yo_NG": "ໂຢຣູບາ (ໄນຈີເຣàº)", + "zh": "ຈີນ", + "zh_CN": "ຈີນ (ຈີນ)", + "zh_HK": "ຈີນ (ຮອງàºàº»àº‡ ເຂດປົàºàº„ອງພິເສດ ຈີນ)", + "zh_Hans": "ຈີນ (à»àºšàºšàº®àº½àºšàº‡à»ˆàº²àº)", + "zh_Hans_CN": "ຈີນ (à»àºšàºšàº®àº½àºšàº‡à»ˆàº²àº, ຈີນ)", + "zh_Hans_HK": "ຈີນ (à»àºšàºšàº®àº½àºšàº‡à»ˆàº²àº, ຮອງàºàº»àº‡ ເຂດປົàºàº„ອງພິເສດ ຈີນ)", + "zh_Hans_MO": "ຈີນ (à»àºšàºšàº®àº½àºšàº‡à»ˆàº²àº, ມາເàºàº»à»‰àº² ເຂດປົàºàº„ອງພິເສດ ຈີນ)", + "zh_Hans_SG": "ຈີນ (à»àºšàºšàº®àº½àºšàº‡à»ˆàº²àº, ສິງàºàº°à»‚ປ)", + "zh_Hant": "ຈີນ (à»àºšàºšàº”ັ້ງເດີມ)", + "zh_Hant_HK": "ຈີນ (à»àºšàºšàº”ັ້ງເດີມ, ຮອງàºàº»àº‡ ເຂດປົàºàº„ອງພິເສດ ຈີນ)", + "zh_Hant_MO": "ຈີນ (à»àºšàºšàº”ັ້ງເດີມ, ມາເàºàº»à»‰àº² ເຂດປົàºàº„ອງພິເສດ ຈີນ)", + "zh_Hant_TW": "ຈີນ (à»àºšàºšàº”ັ້ງເດີມ, ໄຕ້ຫວັນ)", + "zh_MO": "ຈີນ (ມາເàºàº»à»‰àº² ເຂດປົàºàº„ອງພິເສດ ຈີນ)", + "zh_SG": "ຈີນ (ສິງàºàº°à»‚ປ)", + "zh_TW": "ຈີນ (ໄຕ້ຫວັນ)", + "zu": "ຊູລູ", + "zu_ZA": "ຊູລູ (ອາຟຣິàºàº²à»ƒàº•້)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lt.json new file mode 100644 index 0000000000000000000000000000000000000000..d254752429d1d89f180b05534f9b5ee527f8205c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lt.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikanų", + "af_NA": "afrikanų (Namibija)", + "af_ZA": "afrikanų (Pietų Afrika)", + "ak": "akanų", + "ak_GH": "akanų (Gana)", + "am": "amharų", + "am_ET": "amharų (Etiopija)", + "ar": "arabų", + "ar_AE": "arabų (Jungtiniai Arabų Emyratai)", + "ar_BH": "arabų (Bahreinas)", + "ar_DJ": "arabų (Džibutis)", + "ar_DZ": "arabų (Alžyras)", + "ar_EG": "arabų (Egiptas)", + "ar_EH": "arabų (Vakarų Sachara)", + "ar_ER": "arabų (EritrÄ—ja)", + "ar_IL": "arabų (Izraelis)", + "ar_IQ": "arabų (Irakas)", + "ar_JO": "arabų (Jordanija)", + "ar_KM": "arabų (Komorai)", + "ar_KW": "arabų (Kuveitas)", + "ar_LB": "arabų (Libanas)", + "ar_LY": "arabų (Libija)", + "ar_MA": "arabų (Marokas)", + "ar_MR": "arabų (Mauritanija)", + "ar_OM": "arabų (Omanas)", + "ar_PS": "arabų (Palestinos teritorija)", + "ar_QA": "arabų (Kataras)", + "ar_SA": "arabų (Saudo Arabija)", + "ar_SD": "arabų (Sudanas)", + "ar_SO": "arabų (Somalis)", + "ar_SS": "arabų (Pietų Sudanas)", + "ar_SY": "arabų (Sirija)", + "ar_TD": "arabų (ÄŒadas)", + "ar_TN": "arabų (Tunisas)", + "ar_YE": "arabų (Jemenas)", + "as": "asamų", + "as_IN": "asamų (Indija)", + "az": "azerbaidžanieÄių", + "az_AZ": "azerbaidžanieÄių (Azerbaidžanas)", + "az_Cyrl": "azerbaidžanieÄių (kirilica)", + "az_Cyrl_AZ": "azerbaidžanieÄių (kirilica, Azerbaidžanas)", + "az_Latn": "azerbaidžanieÄių (lotynų)", + "az_Latn_AZ": "azerbaidžanieÄių (lotynų, Azerbaidžanas)", + "be": "baltarusių", + "be_BY": "baltarusių (Baltarusija)", + "bg": "bulgarų", + "bg_BG": "bulgarų (Bulgarija)", + "bm": "bambarų", + "bm_ML": "bambarų (Malis)", + "bn": "bengalų", + "bn_BD": "bengalų (BangladeÅ¡as)", + "bn_IN": "bengalų (Indija)", + "bo": "tibetieÄių", + "bo_CN": "tibetieÄių (Kinija)", + "bo_IN": "tibetieÄių (Indija)", + "br": "bretonų", + "br_FR": "bretonų (PrancÅ«zija)", + "bs": "bosnių", + "bs_BA": "bosnių (Bosnija ir Hercegovina)", + "bs_Cyrl": "bosnių (kirilica)", + "bs_Cyrl_BA": "bosnių (kirilica, Bosnija ir Hercegovina)", + "bs_Latn": "bosnių (lotynų)", + "bs_Latn_BA": "bosnių (lotynų, Bosnija ir Hercegovina)", + "ca": "katalonų", + "ca_AD": "katalonų (Andora)", + "ca_ES": "katalonų (Ispanija)", + "ca_FR": "katalonų (PrancÅ«zija)", + "ca_IT": "katalonų (Italija)", + "ce": "ÄeÄÄ—nų", + "ce_RU": "ÄeÄÄ—nų (Rusija)", + "cs": "Äekų", + "cs_CZ": "Äekų (ÄŒekija)", + "cy": "valų", + "cy_GB": "valų (JungtinÄ— KaralystÄ—)", + "da": "danų", + "da_DK": "danų (Danija)", + "da_GL": "danų (Grenlandija)", + "de": "vokieÄių", + "de_AT": "vokieÄių (Austrija)", + "de_BE": "vokieÄių (Belgija)", + "de_CH": "vokieÄių (Å veicarija)", + "de_DE": "vokieÄių (Vokietija)", + "de_IT": "vokieÄių (Italija)", + "de_LI": "vokieÄių (LichtenÅ¡teinas)", + "de_LU": "vokieÄių (Liuksemburgas)", + "dz": "botijų", + "dz_BT": "botijų (Butanas)", + "ee": "evių", + "ee_GH": "evių (Gana)", + "ee_TG": "evių (Togas)", + "el": "graikų", + "el_CY": "graikų (Kipras)", + "el_GR": "graikų (Graikija)", + "en": "anglų", + "en_AG": "anglų (Antigva ir Barbuda)", + "en_AI": "anglų (Angilija)", + "en_AS": "anglų (Amerikos Samoa)", + "en_AT": "anglų (Austrija)", + "en_AU": "anglų (Australija)", + "en_BB": "anglų (Barbadosas)", + "en_BE": "anglų (Belgija)", + "en_BI": "anglų (Burundis)", + "en_BM": "anglų (Bermuda)", + "en_BS": "anglų (Bahamos)", + "en_BW": "anglų (Botsvana)", + "en_BZ": "anglų (Belizas)", + "en_CA": "anglų (Kanada)", + "en_CC": "anglų (Kokosų (Kilingo) Salos)", + "en_CH": "anglų (Å veicarija)", + "en_CK": "anglų (Kuko Salos)", + "en_CM": "anglų (KamerÅ«nas)", + "en_CX": "anglų (KalÄ—dų Sala)", + "en_CY": "anglų (Kipras)", + "en_DE": "anglų (Vokietija)", + "en_DG": "anglų (Diego Garsija)", + "en_DK": "anglų (Danija)", + "en_DM": "anglų (Dominika)", + "en_ER": "anglų (EritrÄ—ja)", + "en_FI": "anglų (Suomija)", + "en_FJ": "anglų (Fidžis)", + "en_FK": "anglų (Folklando Salos)", + "en_FM": "anglų (Mikronezija)", + "en_GB": "anglų (JungtinÄ— KaralystÄ—)", + "en_GD": "anglų (Grenada)", + "en_GG": "anglų (Gernsis)", + "en_GH": "anglų (Gana)", + "en_GI": "anglų (Gibraltaras)", + "en_GM": "anglų (Gambija)", + "en_GU": "anglų (Guamas)", + "en_GY": "anglų (Gajana)", + "en_HK": "anglų (Ypatingasis Administracinis Kinijos Regionas Honkongas)", + "en_IE": "anglų (Airija)", + "en_IL": "anglų (Izraelis)", + "en_IM": "anglų (Meno Sala)", + "en_IN": "anglų (Indija)", + "en_IO": "anglų (Indijos Vandenyno Britų Sritis)", + "en_JE": "anglų (Džersis)", + "en_JM": "anglų (Jamaika)", + "en_KE": "anglų (Kenija)", + "en_KI": "anglų (Kiribatis)", + "en_KN": "anglų (Sent Kitsas ir Nevis)", + "en_KY": "anglų (Kaimanų Salos)", + "en_LC": "anglų (Sent Lusija)", + "en_LR": "anglų (Liberija)", + "en_LS": "anglų (Lesotas)", + "en_MG": "anglų (Madagaskaras)", + "en_MH": "anglų (MarÅ¡alo Salos)", + "en_MO": "anglų (Ypatingasis Administracinis Kinijos Regionas Makao)", + "en_MP": "anglų (Marianos Å iaurinÄ—s Salos)", + "en_MS": "anglų (Montseratas)", + "en_MT": "anglų (Malta)", + "en_MU": "anglų (Mauricijus)", + "en_MW": "anglų (Malavis)", + "en_MY": "anglų (Malaizija)", + "en_NA": "anglų (Namibija)", + "en_NF": "anglų (Norfolko sala)", + "en_NG": "anglų (Nigerija)", + "en_NL": "anglų (Nyderlandai)", + "en_NR": "anglų (Nauru)", + "en_NU": "anglų (NiujÄ—)", + "en_NZ": "anglų (Naujoji Zelandija)", + "en_PG": "anglų (Papua Naujoji GvinÄ—ja)", + "en_PH": "anglų (Filipinai)", + "en_PK": "anglų (Pakistanas)", + "en_PN": "anglų (Pitkerno salos)", + "en_PR": "anglų (Puerto Rikas)", + "en_PW": "anglų (Palau)", + "en_RW": "anglų (Ruanda)", + "en_SB": "anglų (Saliamono Salos)", + "en_SC": "anglų (SeiÅ¡eliai)", + "en_SD": "anglų (Sudanas)", + "en_SE": "anglų (Å vedija)", + "en_SG": "anglų (SingapÅ«ras)", + "en_SH": "anglų (Å v. Elenos Sala)", + "en_SI": "anglų (SlovÄ—nija)", + "en_SL": "anglų (Siera LeonÄ—)", + "en_SS": "anglų (Pietų Sudanas)", + "en_SX": "anglų (Sint Martenas)", + "en_SZ": "anglų (Svazilandas)", + "en_TC": "anglų (Terkso ir Kaikoso Salos)", + "en_TK": "anglų (Tokelau)", + "en_TO": "anglų (Tonga)", + "en_TT": "anglų (Trinidadas ir Tobagas)", + "en_TV": "anglų (Tuvalu)", + "en_TZ": "anglų (Tanzanija)", + "en_UG": "anglų (Uganda)", + "en_UM": "anglų (Jungtinių Valstijų Mažosios Tolimosios Salos)", + "en_US": "anglų (JungtinÄ—s Valstijos)", + "en_VC": "anglų (Å ventasis Vincentas ir Grenadinai)", + "en_VG": "anglų (Didžiosios Britanijos Mergelių Salos)", + "en_VI": "anglų (Jungtinių Valstijų Mergelių Salos)", + "en_VU": "anglų (Vanuatu)", + "en_WS": "anglų (Samoa)", + "en_ZA": "anglų (Pietų Afrika)", + "en_ZM": "anglų (Zambija)", + "en_ZW": "anglų (ZimbabvÄ—)", + "eo": "esperanto", + "es": "ispanų", + "es_AR": "ispanų (Argentina)", + "es_BO": "ispanų (Bolivija)", + "es_BR": "ispanų (Brazilija)", + "es_CL": "ispanų (ÄŒilÄ—)", + "es_CO": "ispanų (Kolumbija)", + "es_CR": "ispanų (Kosta Rika)", + "es_CU": "ispanų (Kuba)", + "es_DO": "ispanų (Dominikos Respublika)", + "es_EA": "ispanų (Seuta ir Melila)", + "es_EC": "ispanų (Ekvadoras)", + "es_ES": "ispanų (Ispanija)", + "es_GQ": "ispanų (Pusiaujo GvinÄ—ja)", + "es_GT": "ispanų (Gvatemala)", + "es_HN": "ispanų (HondÅ«ras)", + "es_IC": "ispanų (Kanarų salos)", + "es_MX": "ispanų (Meksika)", + "es_NI": "ispanų (Nikaragva)", + "es_PA": "ispanų (Panama)", + "es_PE": "ispanų (Peru)", + "es_PH": "ispanų (Filipinai)", + "es_PR": "ispanų (Puerto Rikas)", + "es_PY": "ispanų (Paragvajus)", + "es_SV": "ispanų (Salvadoras)", + "es_US": "ispanų (JungtinÄ—s Valstijos)", + "es_UY": "ispanų (Urugvajus)", + "es_VE": "ispanų (Venesuela)", + "et": "estų", + "et_EE": "estų (Estija)", + "eu": "baskų", + "eu_ES": "baskų (Ispanija)", + "fa": "persų", + "fa_AF": "persų (Afganistanas)", + "fa_IR": "persų (Iranas)", + "ff": "fulahų", + "ff_CM": "fulahų (KamerÅ«nas)", + "ff_GN": "fulahų (GvinÄ—ja)", + "ff_MR": "fulahų (Mauritanija)", + "ff_SN": "fulahų (Senegalas)", + "fi": "suomių", + "fi_FI": "suomių (Suomija)", + "fo": "farerų", + "fo_DK": "farerų (Danija)", + "fo_FO": "farerų (Farerų Salos)", + "fr": "prancÅ«zų", + "fr_BE": "prancÅ«zų (Belgija)", + "fr_BF": "prancÅ«zų (Burkina Fasas)", + "fr_BI": "prancÅ«zų (Burundis)", + "fr_BJ": "prancÅ«zų (Beninas)", + "fr_BL": "prancÅ«zų (Sen Bartelemi)", + "fr_CA": "prancÅ«zų (Kanada)", + "fr_CD": "prancÅ«zų (Kongas-KinÅ¡asa)", + "fr_CF": "prancÅ«zų (CentrinÄ—s Afrikos Respublika)", + "fr_CG": "prancÅ«zų (Kongas-Brazavilis)", + "fr_CH": "prancÅ«zų (Å veicarija)", + "fr_CI": "prancÅ«zų (Dramblio Kaulo Krantas)", + "fr_CM": "prancÅ«zų (KamerÅ«nas)", + "fr_DJ": "prancÅ«zų (Džibutis)", + "fr_DZ": "prancÅ«zų (Alžyras)", + "fr_FR": "prancÅ«zų (PrancÅ«zija)", + "fr_GA": "prancÅ«zų (Gabonas)", + "fr_GF": "prancÅ«zų (PrancÅ«zijos Gviana)", + "fr_GN": "prancÅ«zų (GvinÄ—ja)", + "fr_GP": "prancÅ«zų (Gvadelupa)", + "fr_GQ": "prancÅ«zų (Pusiaujo GvinÄ—ja)", + "fr_HT": "prancÅ«zų (Haitis)", + "fr_KM": "prancÅ«zų (Komorai)", + "fr_LU": "prancÅ«zų (Liuksemburgas)", + "fr_MA": "prancÅ«zų (Marokas)", + "fr_MC": "prancÅ«zų (Monakas)", + "fr_MF": "prancÅ«zų (Sen Martenas)", + "fr_MG": "prancÅ«zų (Madagaskaras)", + "fr_ML": "prancÅ«zų (Malis)", + "fr_MQ": "prancÅ«zų (Martinika)", + "fr_MR": "prancÅ«zų (Mauritanija)", + "fr_MU": "prancÅ«zų (Mauricijus)", + "fr_NC": "prancÅ«zų (Naujoji Kaledonija)", + "fr_NE": "prancÅ«zų (Nigeris)", + "fr_PF": "prancÅ«zų (PrancÅ«zijos Polinezija)", + "fr_PM": "prancÅ«zų (Sen Pjeras ir Mikelonas)", + "fr_RE": "prancÅ«zų (Reunjonas)", + "fr_RW": "prancÅ«zų (Ruanda)", + "fr_SC": "prancÅ«zų (SeiÅ¡eliai)", + "fr_SN": "prancÅ«zų (Senegalas)", + "fr_SY": "prancÅ«zų (Sirija)", + "fr_TD": "prancÅ«zų (ÄŒadas)", + "fr_TG": "prancÅ«zų (Togas)", + "fr_TN": "prancÅ«zų (Tunisas)", + "fr_VU": "prancÅ«zų (Vanuatu)", + "fr_WF": "prancÅ«zų (Volisas ir FutÅ«na)", + "fr_YT": "prancÅ«zų (Majotas)", + "fy": "vakarų fryzų", + "fy_NL": "vakarų fryzų (Nyderlandai)", + "ga": "airių", + "ga_IE": "airių (Airija)", + "gd": "Å¡kotų (gÄ—lų)", + "gd_GB": "Å¡kotų (JungtinÄ— KaralystÄ—)", + "gl": "galisų", + "gl_ES": "galisų (Ispanija)", + "gu": "gudžaratų", + "gu_IN": "gudžaratų (Indija)", + "gv": "menieÄių", + "gv_IM": "menieÄių (Meno Sala)", + "ha": "hausų", + "ha_GH": "hausų (Gana)", + "ha_NE": "hausų (Nigeris)", + "ha_NG": "hausų (Nigerija)", + "he": "hebrajų", + "he_IL": "hebrajų (Izraelis)", + "hi": "hindi", + "hi_IN": "hindi (Indija)", + "hr": "kroatų", + "hr_BA": "kroatų (Bosnija ir Hercegovina)", + "hr_HR": "kroatų (Kroatija)", + "hu": "vengrų", + "hu_HU": "vengrų (Vengrija)", + "hy": "armÄ—nų", + "hy_AM": "armÄ—nų (ArmÄ—nija)", + "id": "indonezieÄių", + "id_ID": "indonezieÄių (Indonezija)", + "ig": "igbų", + "ig_NG": "igbų (Nigerija)", + "ii": "siÄuan ji", + "ii_CN": "siÄuan ji (Kinija)", + "is": "islandų", + "is_IS": "islandų (Islandija)", + "it": "italų", + "it_CH": "italų (Å veicarija)", + "it_IT": "italų (Italija)", + "it_SM": "italų (San Marinas)", + "ja": "japonų", + "ja_JP": "japonų (Japonija)", + "ka": "gruzinų", + "ka_GE": "gruzinų (Gruzija)", + "ki": "kikujų", + "ki_KE": "kikujų (Kenija)", + "kk": "kazachų", + "kk_KZ": "kazachų (Kazachstanas)", + "kl": "kalalisut", + "kl_GL": "kalalisut (Grenlandija)", + "km": "khmerų", + "km_KH": "khmerų (Kambodža)", + "kn": "kanadų", + "kn_IN": "kanadų (Indija)", + "ko": "korÄ—jieÄių", + "ko_KP": "korÄ—jieÄių (Å iaurÄ—s KorÄ—ja)", + "ko_KR": "korÄ—jieÄių (Pietų KorÄ—ja)", + "ks": "kaÅ¡myrų", + "ks_IN": "kaÅ¡myrų (Indija)", + "kw": "kornų", + "kw_GB": "kornų (JungtinÄ— KaralystÄ—)", + "ky": "kirgizų", + "ky_KG": "kirgizų (Kirgizija)", + "lb": "liuksemburgieÄių", + "lb_LU": "liuksemburgieÄių (Liuksemburgas)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "ngalų", + "ln_AO": "ngalų (Angola)", + "ln_CD": "ngalų (Kongas-KinÅ¡asa)", + "ln_CF": "ngalų (CentrinÄ—s Afrikos Respublika)", + "ln_CG": "ngalų (Kongas-Brazavilis)", + "lo": "laosieÄių", + "lo_LA": "laosieÄių (Laosas)", + "lt": "lietuvių", + "lt_LT": "lietuvių (Lietuva)", + "lu": "luba katanga", + "lu_CD": "luba katanga (Kongas-KinÅ¡asa)", + "lv": "latvių", + "lv_LV": "latvių (Latvija)", + "mg": "malagasų", + "mg_MG": "malagasų (Madagaskaras)", + "mk": "makedonų", + "mk_MK": "makedonų (Makedonija)", + "ml": "malajalių", + "ml_IN": "malajalių (Indija)", + "mn": "mongolų", + "mn_MN": "mongolų (Mongolija)", + "mr": "maratų", + "mr_IN": "maratų (Indija)", + "ms": "malajieÄių", + "ms_BN": "malajieÄių (BrunÄ—jus)", + "ms_MY": "malajieÄių (Malaizija)", + "ms_SG": "malajieÄių (SingapÅ«ras)", + "mt": "maltieÄių", + "mt_MT": "maltieÄių (Malta)", + "my": "birmieÄių", + "my_MM": "birmieÄių (Mianmaras (Birma))", + "nb": "norvegų bukmolas", + "nb_NO": "norvegų bukmolas (Norvegija)", + "nb_SJ": "norvegų bukmolas (Svalbardas ir Janas Majenas)", + "nd": "Å¡iaurÄ—s ndebelų", + "nd_ZW": "Å¡iaurÄ—s ndebelų (ZimbabvÄ—)", + "ne": "nepalieÄių", + "ne_IN": "nepalieÄių (Indija)", + "ne_NP": "nepalieÄių (Nepalas)", + "nl": "olandų", + "nl_AW": "olandų (Aruba)", + "nl_BE": "olandų (Belgija)", + "nl_BQ": "olandų (Karibų Nyderlandai)", + "nl_CW": "olandų (Kiurasao)", + "nl_NL": "olandų (Nyderlandai)", + "nl_SR": "olandų (Surinamas)", + "nl_SX": "olandų (Sint Martenas)", + "nn": "naujoji norvegų", + "nn_NO": "naujoji norvegų (Norvegija)", + "no": "norvegų", + "no_NO": "norvegų (Norvegija)", + "om": "oromų", + "om_ET": "oromų (Etiopija)", + "om_KE": "oromų (Kenija)", + "or": "odijų", + "or_IN": "odijų (Indija)", + "os": "osetinų", + "os_GE": "osetinų (Gruzija)", + "os_RU": "osetinų (Rusija)", + "pa": "pendžabų", + "pa_Arab": "pendžabų (arabų)", + "pa_Arab_PK": "pendžabų (arabų, Pakistanas)", + "pa_Guru": "pendžabų (gurmuki)", + "pa_Guru_IN": "pendžabų (gurmuki, Indija)", + "pa_IN": "pendžabų (Indija)", + "pa_PK": "pendžabų (Pakistanas)", + "pl": "lenkų", + "pl_PL": "lenkų (Lenkija)", + "ps": "puÅ¡tÅ«nų", + "ps_AF": "puÅ¡tÅ«nų (Afganistanas)", + "pt": "portugalų", + "pt_AO": "portugalų (Angola)", + "pt_BR": "portugalų (Brazilija)", + "pt_CH": "portugalų (Å veicarija)", + "pt_CV": "portugalų (Žaliasis KyÅ¡ulys)", + "pt_GQ": "portugalų (Pusiaujo GvinÄ—ja)", + "pt_GW": "portugalų (Bisau GvinÄ—ja)", + "pt_LU": "portugalų (Liuksemburgas)", + "pt_MO": "portugalų (Ypatingasis Administracinis Kinijos Regionas Makao)", + "pt_MZ": "portugalų (Mozambikas)", + "pt_PT": "portugalų (Portugalija)", + "pt_ST": "portugalų (San TomÄ— ir PrinsipÄ—)", + "pt_TL": "portugalų (Rytų Timoras)", + "qu": "keÄujų", + "qu_BO": "keÄujų (Bolivija)", + "qu_EC": "keÄujų (Ekvadoras)", + "qu_PE": "keÄujų (Peru)", + "rm": "retoromanų", + "rm_CH": "retoromanų (Å veicarija)", + "rn": "rundi", + "rn_BI": "rundi (Burundis)", + "ro": "rumunų", + "ro_MD": "rumunų (Moldova)", + "ro_RO": "rumunų (Rumunija)", + "ru": "rusų", + "ru_BY": "rusų (Baltarusija)", + "ru_KG": "rusų (Kirgizija)", + "ru_KZ": "rusų (Kazachstanas)", + "ru_MD": "rusų (Moldova)", + "ru_RU": "rusų (Rusija)", + "ru_UA": "rusų (Ukraina)", + "rw": "kinjaruandų", + "rw_RW": "kinjaruandų (Ruanda)", + "se": "Å¡iaurÄ—s samių", + "se_FI": "Å¡iaurÄ—s samių (Suomija)", + "se_NO": "Å¡iaurÄ—s samių (Norvegija)", + "se_SE": "Å¡iaurÄ—s samių (Å vedija)", + "sg": "sango", + "sg_CF": "sango (CentrinÄ—s Afrikos Respublika)", + "sh": "serbų-kroatų", + "sh_BA": "serbų-kroatų (Bosnija ir Hercegovina)", + "si": "sinhalų", + "si_LK": "sinhalų (Å ri Lanka)", + "sk": "slovakų", + "sk_SK": "slovakų (Slovakija)", + "sl": "slovÄ—nų", + "sl_SI": "slovÄ—nų (SlovÄ—nija)", + "sn": "Å¡onų", + "sn_ZW": "Å¡onų (ZimbabvÄ—)", + "so": "somalieÄių", + "so_DJ": "somalieÄių (Džibutis)", + "so_ET": "somalieÄių (Etiopija)", + "so_KE": "somalieÄių (Kenija)", + "so_SO": "somalieÄių (Somalis)", + "sq": "albanų", + "sq_AL": "albanų (Albanija)", + "sq_MK": "albanų (Makedonija)", + "sq_XK": "albanų (Kosovas)", + "sr": "serbų", + "sr_BA": "serbų (Bosnija ir Hercegovina)", + "sr_Cyrl": "serbų (kirilica)", + "sr_Cyrl_BA": "serbų (kirilica, Bosnija ir Hercegovina)", + "sr_Cyrl_ME": "serbų (kirilica, Juodkalnija)", + "sr_Cyrl_RS": "serbų (kirilica, Serbija)", + "sr_Cyrl_XK": "serbų (kirilica, Kosovas)", + "sr_Latn": "serbų (lotynų)", + "sr_Latn_BA": "serbų (lotynų, Bosnija ir Hercegovina)", + "sr_Latn_ME": "serbų (lotynų, Juodkalnija)", + "sr_Latn_RS": "serbų (lotynų, Serbija)", + "sr_Latn_XK": "serbų (lotynų, Kosovas)", + "sr_ME": "serbų (Juodkalnija)", + "sr_RS": "serbų (Serbija)", + "sr_XK": "serbų (Kosovas)", + "sv": "Å¡vedų", + "sv_AX": "Å¡vedų (Alandų Salos)", + "sv_FI": "Å¡vedų (Suomija)", + "sv_SE": "Å¡vedų (Å vedija)", + "sw": "suahilių", + "sw_CD": "suahilių (Kongas-KinÅ¡asa)", + "sw_KE": "suahilių (Kenija)", + "sw_TZ": "suahilių (Tanzanija)", + "sw_UG": "suahilių (Uganda)", + "ta": "tamilų", + "ta_IN": "tamilų (Indija)", + "ta_LK": "tamilų (Å ri Lanka)", + "ta_MY": "tamilų (Malaizija)", + "ta_SG": "tamilų (SingapÅ«ras)", + "te": "telugų", + "te_IN": "telugų (Indija)", + "th": "tajų", + "th_TH": "tajų (Tailandas)", + "ti": "tigrajų", + "ti_ER": "tigrajų (EritrÄ—ja)", + "ti_ET": "tigrajų (Etiopija)", + "tl": "tagalogų", + "tl_PH": "tagalogų (Filipinai)", + "to": "tonganų", + "to_TO": "tonganų (Tonga)", + "tr": "turkų", + "tr_CY": "turkų (Kipras)", + "tr_TR": "turkų (Turkija)", + "ug": "uigÅ«rų", + "ug_CN": "uigÅ«rų (Kinija)", + "uk": "ukrainieÄių", + "uk_UA": "ukrainieÄių (Ukraina)", + "ur": "urdų", + "ur_IN": "urdų (Indija)", + "ur_PK": "urdų (Pakistanas)", + "uz": "uzbekų", + "uz_AF": "uzbekų (Afganistanas)", + "uz_Arab": "uzbekų (arabų)", + "uz_Arab_AF": "uzbekų (arabų, Afganistanas)", + "uz_Cyrl": "uzbekų (kirilica)", + "uz_Cyrl_UZ": "uzbekų (kirilica, Uzbekistanas)", + "uz_Latn": "uzbekų (lotynų)", + "uz_Latn_UZ": "uzbekų (lotynų, Uzbekistanas)", + "uz_UZ": "uzbekų (Uzbekistanas)", + "vi": "vietnamieÄių", + "vi_VN": "vietnamieÄių (Vietnamas)", + "yi": "jidiÅ¡", + "yo": "jorubų", + "yo_BJ": "jorubų (Beninas)", + "yo_NG": "jorubų (Nigerija)", + "zh": "kinų", + "zh_CN": "kinų (Kinija)", + "zh_HK": "kinų (Ypatingasis Administracinis Kinijos Regionas Honkongas)", + "zh_Hans": "kinų (supaprastinti)", + "zh_Hans_CN": "kinų (supaprastinti, Kinija)", + "zh_Hans_HK": "kinų (supaprastinti, Ypatingasis Administracinis Kinijos Regionas Honkongas)", + "zh_Hans_MO": "kinų (supaprastinti, Ypatingasis Administracinis Kinijos Regionas Makao)", + "zh_Hans_SG": "kinų (supaprastinti, SingapÅ«ras)", + "zh_Hant": "kinų (tradiciniai)", + "zh_Hant_HK": "kinų (tradiciniai, Ypatingasis Administracinis Kinijos Regionas Honkongas)", + "zh_Hant_MO": "kinų (tradiciniai, Ypatingasis Administracinis Kinijos Regionas Makao)", + "zh_Hant_TW": "kinų (tradiciniai, Taivanas)", + "zh_MO": "kinų (Ypatingasis Administracinis Kinijos Regionas Makao)", + "zh_SG": "kinų (SingapÅ«ras)", + "zh_TW": "kinų (Taivanas)", + "zu": "zulų", + "zu_ZA": "zulų (Pietų Afrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lu.json new file mode 100644 index 0000000000000000000000000000000000000000..2551c1d61a331a1b11731f7b4460bd86fa6367de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lu.json @@ -0,0 +1,317 @@ +{ + "Names": { + "ak": "Liakan", + "ak_GH": "Liakan (Ngana)", + "am": "Liamhariki", + "am_ET": "Liamhariki (Etshiopi)", + "ar": "Arabi", + "ar_AE": "Arabi (Lemila alabu)", + "ar_BH": "Arabi (Bahrene)", + "ar_DJ": "Arabi (Djibuti)", + "ar_DZ": "Arabi (Alijeri)", + "ar_EG": "Arabi (Mushidi)", + "ar_ER": "Arabi (Elitele)", + "ar_IL": "Arabi (Isirayele)", + "ar_IQ": "Arabi (Iraki)", + "ar_JO": "Arabi (Jodani)", + "ar_KM": "Arabi (Komoru)", + "ar_KW": "Arabi (Koweti)", + "ar_LB": "Arabi (Liba)", + "ar_LY": "Arabi (Libi)", + "ar_MA": "Arabi (Maroke)", + "ar_MR": "Arabi (Moritani)", + "ar_OM": "Arabi (Omane)", + "ar_PS": "Arabi (Palesine)", + "ar_QA": "Arabi (Katari)", + "ar_SA": "Arabi (Alabu Nsawudi)", + "ar_SD": "Arabi (Suda)", + "ar_SO": "Arabi (Somali)", + "ar_SY": "Arabi (Siri)", + "ar_TD": "Arabi (Tshadi)", + "ar_TN": "Arabi (Tinizi)", + "ar_YE": "Arabi (Yemenu)", + "be": "Belarusi", + "be_BY": "Belarusi (Byelorisi)", + "bg": "Bulegari", + "bg_BG": "Bulegari (Biligari)", + "bn": "Bengali", + "bn_BD": "Bengali (Benguladeshi)", + "bn_IN": "Bengali (Inde)", + "cs": "Tsheki", + "cs_CZ": "Tsheki (Ditunga dya Tsheka)", + "de": "Lizelumani", + "de_AT": "Lizelumani (Otilisi)", + "de_BE": "Lizelumani (Belejiki)", + "de_CH": "Lizelumani (Swise)", + "de_DE": "Lizelumani (Alemanu)", + "de_IT": "Lizelumani (Itali)", + "de_LI": "Lizelumani (Lishuteni)", + "de_LU": "Lizelumani (Likisambulu)", + "el": "Giliki", + "el_CY": "Giliki (Shipele)", + "el_GR": "Giliki (Ngeleka)", + "en": "Lingelesa", + "en_AG": "Lingelesa (Antiga ne Barbuda)", + "en_AI": "Lingelesa (Angiye)", + "en_AS": "Lingelesa (Samoa wa Ameriki)", + "en_AT": "Lingelesa (Otilisi)", + "en_AU": "Lingelesa (Ositali)", + "en_BB": "Lingelesa (Barebade)", + "en_BE": "Lingelesa (Belejiki)", + "en_BI": "Lingelesa (Burundi)", + "en_BM": "Lingelesa (Bermuda)", + "en_BS": "Lingelesa (Bahamase)", + "en_BW": "Lingelesa (Mbotswana)", + "en_BZ": "Lingelesa (Belize)", + "en_CA": "Lingelesa (Kanada)", + "en_CH": "Lingelesa (Swise)", + "en_CK": "Lingelesa (Lutanda lua KookÉ›)", + "en_CM": "Lingelesa (Kamerune)", + "en_CY": "Lingelesa (Shipele)", + "en_DE": "Lingelesa (Alemanu)", + "en_DK": "Lingelesa (Danemalaku)", + "en_DM": "Lingelesa (Duminiku)", + "en_ER": "Lingelesa (Elitele)", + "en_FI": "Lingelesa (Filande)", + "en_FJ": "Lingelesa (Fuji)", + "en_FK": "Lingelesa (Lutanda lua Maluni)", + "en_FM": "Lingelesa (Mikronezi)", + "en_GB": "Lingelesa (Angeletele)", + "en_GD": "Lingelesa (Ngelenade)", + "en_GH": "Lingelesa (Ngana)", + "en_GI": "Lingelesa (Jibeletale)", + "en_GM": "Lingelesa (Gambi)", + "en_GU": "Lingelesa (Ngwame)", + "en_GY": "Lingelesa (Ngiyane)", + "en_IE": "Lingelesa (Irelande)", + "en_IL": "Lingelesa (Isirayele)", + "en_IN": "Lingelesa (Inde)", + "en_IO": "Lingelesa (Lutanda lwa Angeletele ku mbu wa Indiya)", + "en_JM": "Lingelesa (Jamaiki)", + "en_KE": "Lingelesa (Kenya)", + "en_KI": "Lingelesa (Kiribati)", + "en_KN": "Lingelesa (Santu krístofe ne Neves)", + "en_KY": "Lingelesa (Lutanda lua Kayima)", + "en_LC": "Lingelesa (Santu lisi)", + "en_LR": "Lingelesa (Liberiya)", + "en_LS": "Lingelesa (Lesoto)", + "en_MG": "Lingelesa (Madagasikari)", + "en_MH": "Lingelesa (Lutanda lua Marishale)", + "en_MP": "Lingelesa (Lutanda lua Mariane wa muulu)", + "en_MS": "Lingelesa (Musera)", + "en_MT": "Lingelesa (Malite)", + "en_MU": "Lingelesa (Morise)", + "en_MW": "Lingelesa (Malawi)", + "en_MY": "Lingelesa (Malezi)", + "en_NA": "Lingelesa (Namibi)", + "en_NF": "Lingelesa (Lutanda lua Norfok)", + "en_NG": "Lingelesa (Nijerya)", + "en_NL": "Lingelesa (OlandÉ›)", + "en_NR": "Lingelesa (Nauru)", + "en_NU": "Lingelesa (Nyue)", + "en_NZ": "Lingelesa (Zelanda wa mumu)", + "en_PG": "Lingelesa (Papwazi wa NginÉ› wa mumu)", + "en_PH": "Lingelesa (Nfilipi)", + "en_PK": "Lingelesa (Pakisita)", + "en_PN": "Lingelesa (Pikairni)", + "en_PR": "Lingelesa (Mpotoriku)", + "en_PW": "Lingelesa (Palau)", + "en_RW": "Lingelesa (Rwanda)", + "en_SB": "Lingelesa (Lutanda lua Solomu)", + "en_SC": "Lingelesa (Seshele)", + "en_SD": "Lingelesa (Suda)", + "en_SE": "Lingelesa (Suwedi)", + "en_SG": "Lingelesa (Singapure)", + "en_SH": "Lingelesa (Santu eleni)", + "en_SI": "Lingelesa (Siloveni)", + "en_SL": "Lingelesa (Siera Leone)", + "en_SZ": "Lingelesa (Swazilandi)", + "en_TC": "Lingelesa (Lutanda lua Tuluki ne Kaiko)", + "en_TK": "Lingelesa (Tokelau)", + "en_TO": "Lingelesa (Tonga)", + "en_TT": "Lingelesa (Tinidade ne Tobago)", + "en_TV": "Lingelesa (Tuvalu)", + "en_TZ": "Lingelesa (Tanzani)", + "en_UG": "Lingelesa (Uganda)", + "en_US": "Lingelesa (Ameriki)", + "en_VC": "Lingelesa (Santu vesa ne Ngelenadine)", + "en_VG": "Lingelesa (Lutanda lua Vierzi wa Angeletele)", + "en_VI": "Lingelesa (Lutanda lua Vierzi wa Ameriki)", + "en_VU": "Lingelesa (Vanuatu)", + "en_WS": "Lingelesa (Samoa)", + "en_ZA": "Lingelesa (Afrika ya Súdi)", + "en_ZM": "Lingelesa (Zambi)", + "en_ZW": "Lingelesa (Zimbabwe)", + "es": "Lihispania", + "es_AR": "Lihispania (Alijantine)", + "es_BO": "Lihispania (Mbolivi)", + "es_BR": "Lihispania (Mnulezile)", + "es_CL": "Lihispania (Shili)", + "es_CO": "Lihispania (Kolombi)", + "es_CR": "Lihispania (Kositarika)", + "es_CU": "Lihispania (Kuba)", + "es_DO": "Lihispania (Ditunga wa Duminiku)", + "es_EC": "Lihispania (Ekwatele)", + "es_ES": "Lihispania (Nsipani)", + "es_GQ": "Lihispania (Gine Ekwatele)", + "es_GT": "Lihispania (Ngwatemala)", + "es_HN": "Lihispania (Ondurase)", + "es_MX": "Lihispania (Meksike)", + "es_NI": "Lihispania (Nikaragwa)", + "es_PA": "Lihispania (Panama)", + "es_PE": "Lihispania (Peru)", + "es_PH": "Lihispania (Nfilipi)", + "es_PR": "Lihispania (Mpotoriku)", + "es_PY": "Lihispania (Palagwei)", + "es_SV": "Lihispania (Savadore)", + "es_US": "Lihispania (Ameriki)", + "es_UY": "Lihispania (Irigwei)", + "es_VE": "Lihispania (Venezuela)", + "fa": "Mpepajemi", + "fa_AF": "Mpepajemi (Afuganisita)", + "fa_IR": "Mpepajemi (Ira)", + "fr": "Mfwàlànsa", + "fr_BE": "Mfwàlànsa (Belejiki)", + "fr_BF": "Mfwàlànsa (Bukinafaso)", + "fr_BI": "Mfwàlànsa (Burundi)", + "fr_BJ": "Mfwàlànsa (Bene)", + "fr_CA": "Mfwàlànsa (Kanada)", + "fr_CD": "Mfwàlànsa (Ditunga wa Kongu)", + "fr_CF": "Mfwàlànsa (Ditunga dya Afrika wa munkatshi)", + "fr_CG": "Mfwàlànsa (Kongu)", + "fr_CH": "Mfwàlànsa (Swise)", + "fr_CI": "Mfwàlànsa (Kotedivuale)", + "fr_CM": "Mfwàlànsa (Kamerune)", + "fr_DJ": "Mfwàlànsa (Djibuti)", + "fr_DZ": "Mfwàlànsa (Alijeri)", + "fr_FR": "Mfwàlànsa (Nfalanse)", + "fr_GA": "Mfwàlànsa (Ngabu)", + "fr_GF": "Mfwàlànsa (Giyane wa Nfalanse)", + "fr_GN": "Mfwàlànsa (Ngine)", + "fr_GP": "Mfwàlànsa (Ngwadelupe)", + "fr_GQ": "Mfwàlànsa (Gine Ekwatele)", + "fr_HT": "Mfwàlànsa (Ayiti)", + "fr_KM": "Mfwàlànsa (Komoru)", + "fr_LU": "Mfwàlànsa (Likisambulu)", + "fr_MA": "Mfwàlànsa (Maroke)", + "fr_MC": "Mfwàlànsa (Monaku)", + "fr_MG": "Mfwàlànsa (Madagasikari)", + "fr_ML": "Mfwàlànsa (Mali)", + "fr_MQ": "Mfwàlànsa (Martiniki)", + "fr_MR": "Mfwàlànsa (Moritani)", + "fr_MU": "Mfwàlànsa (Morise)", + "fr_NC": "Mfwàlànsa (Kaledoni wa mumu)", + "fr_NE": "Mfwàlànsa (Nijere)", + "fr_PF": "Mfwàlànsa (Polinezi wa Nfalanse)", + "fr_PM": "Mfwàlànsa (Santu pététo ne Mikelu)", + "fr_RE": "Mfwàlànsa (Lenyo)", + "fr_RW": "Mfwàlànsa (Rwanda)", + "fr_SC": "Mfwàlànsa (Seshele)", + "fr_SN": "Mfwàlànsa (Senegale)", + "fr_SY": "Mfwàlànsa (Siri)", + "fr_TD": "Mfwàlànsa (Tshadi)", + "fr_TG": "Mfwàlànsa (Togu)", + "fr_TN": "Mfwàlànsa (Tinizi)", + "fr_VU": "Mfwàlànsa (Vanuatu)", + "fr_WF": "Mfwàlànsa (Walise ne Futuna)", + "fr_YT": "Mfwàlànsa (Mayote)", + "ha": "Hausa", + "ha_GH": "Hausa (Ngana)", + "ha_NE": "Hausa (Nijere)", + "ha_NG": "Hausa (Nijerya)", + "hi": "Hindi", + "hi_IN": "Hindi (Inde)", + "hu": "Hongili", + "hu_HU": "Hongili (Ongili)", + "id": "Lindonezia", + "id_ID": "Lindonezia (Indonezi)", + "ig": "Igbo", + "ig_NG": "Igbo (Nijerya)", + "it": "Litali", + "it_CH": "Litali (Swise)", + "it_IT": "Litali (Itali)", + "it_SM": "Litali (Santu Marine)", + "ja": "Liyapani", + "ja_JP": "Liyapani (Japu)", + "ko": "Likoreya", + "ko_KP": "Likoreya (Kore wa muulu)", + "ko_KR": "Likoreya (Kore wa mwinshi)", + "lu": "Tshiluba", + "lu_CD": "Tshiluba (Ditunga wa Kongu)", + "ms": "Limalezia", + "ms_BN": "Limalezia (Brineyi)", + "ms_MY": "Limalezia (Malezi)", + "ms_SG": "Limalezia (Singapure)", + "ne": "nepali", + "ne_IN": "nepali (Inde)", + "ne_NP": "nepali (NepálÉ›)", + "nl": "olandi", + "nl_AW": "olandi (Aruba)", + "nl_BE": "olandi (Belejiki)", + "nl_NL": "olandi (OlandÉ›)", + "nl_SR": "olandi (Suriname)", + "pa": "Lipunjabi", + "pa_IN": "Lipunjabi (Inde)", + "pa_PK": "Lipunjabi (Pakisita)", + "pl": "Mpoloni", + "pl_PL": "Mpoloni (Mpoloni)", + "pt": "MputulugÉ›si", + "pt_AO": "MputulugÉ›si (Angola)", + "pt_BR": "MputulugÉ›si (Mnulezile)", + "pt_CH": "MputulugÉ›si (Swise)", + "pt_CV": "MputulugÉ›si (Lutanda lua Kapevele)", + "pt_GQ": "MputulugÉ›si (Gine Ekwatele)", + "pt_GW": "MputulugÉ›si (Nginebisau)", + "pt_LU": "MputulugÉ›si (Likisambulu)", + "pt_MZ": "MputulugÉ›si (Mozambiki)", + "pt_PT": "MputulugÉ›si (Mputulugeshi)", + "pt_ST": "MputulugÉ›si (Sao Tome ne PresipÉ›)", + "pt_TL": "MputulugÉ›si (Timoru wa diboku)", + "ro": "Liromani", + "ro_MD": "Liromani (Molidavi)", + "ro_RO": "Liromani (Romani)", + "ru": "Lirisi", + "ru_BY": "Lirisi (Byelorisi)", + "ru_KG": "Lirisi (Kigizisita)", + "ru_KZ": "Lirisi (Kazakusita)", + "ru_MD": "Lirisi (Molidavi)", + "ru_RU": "Lirisi (Risi)", + "ru_UA": "Lirisi (Ukreni)", + "rw": "kinyarwanda", + "rw_RW": "kinyarwanda (Rwanda)", + "so": "Lisomali", + "so_DJ": "Lisomali (Djibuti)", + "so_ET": "Lisomali (Etshiopi)", + "so_KE": "Lisomali (Kenya)", + "so_SO": "Lisomali (Somali)", + "sv": "Lisuwidi", + "sv_FI": "Lisuwidi (Filande)", + "sv_SE": "Lisuwidi (Suwedi)", + "ta": "Mtamuili", + "ta_IN": "Mtamuili (Inde)", + "ta_LK": "Mtamuili (Sirilanka)", + "ta_MY": "Mtamuili (Malezi)", + "ta_SG": "Mtamuili (Singapure)", + "th": "Ntailandi", + "th_TH": "Ntailandi (Tayilanda)", + "tr": "Ntuluki", + "tr_CY": "Ntuluki (Shipele)", + "tr_TR": "Ntuluki (Tuluki)", + "uk": "Nkrani", + "uk_UA": "Nkrani (Ukreni)", + "ur": "Urdu", + "ur_IN": "Urdu (Inde)", + "ur_PK": "Urdu (Pakisita)", + "vi": "Liviyetinamu", + "vi_VN": "Liviyetinamu (Viyetiname)", + "yo": "Nyoruba", + "yo_BJ": "Nyoruba (Bene)", + "yo_NG": "Nyoruba (Nijerya)", + "zh": "shinÉ›", + "zh_CN": "shinÉ› (Shine)", + "zh_SG": "shinÉ› (Singapure)", + "zh_TW": "shinÉ› (Taiwani)", + "zu": "Nzulu", + "zu_ZA": "Nzulu (Afrika ya Súdi)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lv.json new file mode 100644 index 0000000000000000000000000000000000000000..35d1907a26e66b534a05eb6049cc6c037b40acb4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/lv.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikandu", + "af_NA": "afrikandu (NamÄ«bija)", + "af_ZA": "afrikandu (DienvidÄfrikas Republika)", + "ak": "akanu", + "ak_GH": "akanu (Gana)", + "am": "amharu", + "am_ET": "amharu (Etiopija)", + "ar": "arÄbu", + "ar_AE": "arÄbu (Apvienotie ArÄbu EmirÄti)", + "ar_BH": "arÄbu (Bahreina)", + "ar_DJ": "arÄbu (Džibutija)", + "ar_DZ": "arÄbu (Alžīrija)", + "ar_EG": "arÄbu (Ä’Ä£ipte)", + "ar_EH": "arÄbu (RietumsahÄra)", + "ar_ER": "arÄbu (Eritreja)", + "ar_IL": "arÄbu (IzraÄ“la)", + "ar_IQ": "arÄbu (IrÄka)", + "ar_JO": "arÄbu (JordÄnija)", + "ar_KM": "arÄbu (Komoru salas)", + "ar_KW": "arÄbu (Kuveita)", + "ar_LB": "arÄbu (LibÄna)", + "ar_LY": "arÄbu (LÄ«bija)", + "ar_MA": "arÄbu (Maroka)", + "ar_MR": "arÄbu (MauritÄnija)", + "ar_OM": "arÄbu (OmÄna)", + "ar_PS": "arÄbu (PalestÄ«na)", + "ar_QA": "arÄbu (Katara)", + "ar_SA": "arÄbu (SaÅ«da ArÄbija)", + "ar_SD": "arÄbu (SudÄna)", + "ar_SO": "arÄbu (SomÄlija)", + "ar_SS": "arÄbu (DienvidsudÄna)", + "ar_SY": "arÄbu (SÄ«rija)", + "ar_TD": "arÄbu (ÄŒada)", + "ar_TN": "arÄbu (Tunisija)", + "ar_YE": "arÄbu (Jemena)", + "as": "asamieÅ¡u", + "as_IN": "asamieÅ¡u (Indija)", + "az": "azerbaidžÄņu", + "az_AZ": "azerbaidžÄņu (AzerbaidžÄna)", + "az_Cyrl": "azerbaidžÄņu (kirilica)", + "az_Cyrl_AZ": "azerbaidžÄņu (kirilica, AzerbaidžÄna)", + "az_Latn": "azerbaidžÄņu (latīņu)", + "az_Latn_AZ": "azerbaidžÄņu (latīņu, AzerbaidžÄna)", + "be": "baltkrievu", + "be_BY": "baltkrievu (Baltkrievija)", + "bg": "bulgÄru", + "bg_BG": "bulgÄru (BulgÄrija)", + "bm": "bambaru", + "bm_ML": "bambaru (Mali)", + "bn": "bengÄļu", + "bn_BD": "bengÄļu (BangladeÅ¡a)", + "bn_IN": "bengÄļu (Indija)", + "bo": "tibetieÅ¡u", + "bo_CN": "tibetieÅ¡u (Ķīna)", + "bo_IN": "tibetieÅ¡u (Indija)", + "br": "bretoņu", + "br_FR": "bretoņu (Francija)", + "bs": "bosnieÅ¡u", + "bs_BA": "bosnieÅ¡u (Bosnija un Hercegovina)", + "bs_Cyrl": "bosnieÅ¡u (kirilica)", + "bs_Cyrl_BA": "bosnieÅ¡u (kirilica, Bosnija un Hercegovina)", + "bs_Latn": "bosnieÅ¡u (latīņu)", + "bs_Latn_BA": "bosnieÅ¡u (latīņu, Bosnija un Hercegovina)", + "ca": "katalÄņu", + "ca_AD": "katalÄņu (Andora)", + "ca_ES": "katalÄņu (SpÄnija)", + "ca_FR": "katalÄņu (Francija)", + "ca_IT": "katalÄņu (ItÄlija)", + "ce": "ÄeÄenu", + "ce_RU": "ÄeÄenu (Krievija)", + "cs": "Äehu", + "cs_CZ": "Äehu (ÄŒehijas Republika)", + "cy": "velsieÅ¡u", + "cy_GB": "velsieÅ¡u (LielbritÄnija)", + "da": "dÄņu", + "da_DK": "dÄņu (DÄnija)", + "da_GL": "dÄņu (Grenlande)", + "de": "vÄcu", + "de_AT": "vÄcu (Austrija)", + "de_BE": "vÄcu (Beļģija)", + "de_CH": "vÄcu (Å veice)", + "de_DE": "vÄcu (VÄcija)", + "de_IT": "vÄcu (ItÄlija)", + "de_LI": "vÄcu (LihtenÅ¡teina)", + "de_LU": "vÄcu (Luksemburga)", + "dz": "dzongke", + "dz_BT": "dzongke (ButÄna)", + "ee": "evu", + "ee_GH": "evu (Gana)", + "ee_TG": "evu (Togo)", + "el": "grieÄ·u", + "el_CY": "grieÄ·u (Kipra)", + "el_GR": "grieÄ·u (GrieÄ·ija)", + "en": "angļu", + "en_AG": "angļu (Antigva un Barbuda)", + "en_AI": "angļu (Angilja)", + "en_AS": "angļu (ASV Samoa)", + "en_AT": "angļu (Austrija)", + "en_AU": "angļu (AustrÄlija)", + "en_BB": "angļu (Barbadosa)", + "en_BE": "angļu (Beļģija)", + "en_BI": "angļu (Burundija)", + "en_BM": "angļu (Bermudu salas)", + "en_BS": "angļu (Bahamu salas)", + "en_BW": "angļu (BotsvÄna)", + "en_BZ": "angļu (Beliza)", + "en_CA": "angļu (KanÄda)", + "en_CC": "angļu (Kokosu (KÄ«linga) salas)", + "en_CH": "angļu (Å veice)", + "en_CK": "angļu (Kuka salas)", + "en_CM": "angļu (KamerÅ«na)", + "en_CX": "angļu (ZiemsvÄ“tku sala)", + "en_CY": "angļu (Kipra)", + "en_DE": "angļu (VÄcija)", + "en_DG": "angļu (Djego Garsijas atols)", + "en_DK": "angļu (DÄnija)", + "en_DM": "angļu (Dominika)", + "en_ER": "angļu (Eritreja)", + "en_FI": "angļu (Somija)", + "en_FJ": "angļu (Fidži)", + "en_FK": "angļu (Folklenda salas)", + "en_FM": "angļu (MikronÄ“zija)", + "en_GB": "angļu (LielbritÄnija)", + "en_GD": "angļu (GrenÄda)", + "en_GG": "angļu (GÄ“rnsija)", + "en_GH": "angļu (Gana)", + "en_GI": "angļu (GibraltÄrs)", + "en_GM": "angļu (Gambija)", + "en_GU": "angļu (Guama)", + "en_GY": "angļu (GajÄna)", + "en_HK": "angļu (Ķīnas Ä«paÅ¡Äs pÄrvaldes apgabals Honkonga)", + "en_IE": "angļu (Īrija)", + "en_IL": "angļu (IzraÄ“la)", + "en_IM": "angļu (Mena)", + "en_IN": "angļu (Indija)", + "en_IO": "angļu (Indijas okeÄna Britu teritorija)", + "en_JE": "angļu (Džērsija)", + "en_JM": "angļu (Jamaika)", + "en_KE": "angļu (Kenija)", + "en_KI": "angļu (Kiribati)", + "en_KN": "angļu (Sentkitsa un Nevisa)", + "en_KY": "angļu (Kaimanu salas)", + "en_LC": "angļu (SentlÅ«sija)", + "en_LR": "angļu (LibÄ“rija)", + "en_LS": "angļu (Lesoto)", + "en_MG": "angļu (Madagaskara)", + "en_MH": "angļu (MÄrÅ¡ala salas)", + "en_MO": "angļu (Ķīnas Ä«paÅ¡Äs pÄrvaldes apgabals Makao)", + "en_MP": "angļu (Ziemeļu Marianas salas)", + "en_MS": "angļu (Montserrata)", + "en_MT": "angļu (Malta)", + "en_MU": "angļu (MaurÄ«cija)", + "en_MW": "angļu (MalÄvija)", + "en_MY": "angļu (Malaizija)", + "en_NA": "angļu (NamÄ«bija)", + "en_NF": "angļu (Norfolkas sala)", + "en_NG": "angļu (NigÄ“rija)", + "en_NL": "angļu (NÄ«derlande)", + "en_NR": "angļu (Nauru)", + "en_NU": "angļu (Niue)", + "en_NZ": "angļu (JaunzÄ“lande)", + "en_PG": "angļu (Papua-Jaungvineja)", + "en_PH": "angļu (FilipÄ«nas)", + "en_PK": "angļu (PakistÄna)", + "en_PN": "angļu (PitkÄ“rnas salas)", + "en_PR": "angļu (Puertoriko)", + "en_PW": "angļu (Palau)", + "en_RW": "angļu (Ruanda)", + "en_SB": "angļu (ZÄlamana salas)", + "en_SC": "angļu (SeiÅ¡elu salas)", + "en_SD": "angļu (SudÄna)", + "en_SE": "angļu (Zviedrija)", + "en_SG": "angļu (SingapÅ«ra)", + "en_SH": "angļu (Sv.HelÄ“nas sala)", + "en_SI": "angļu (SlovÄ“nija)", + "en_SL": "angļu (Sjerraleone)", + "en_SS": "angļu (DienvidsudÄna)", + "en_SX": "angļu (SintmÄrtena)", + "en_SZ": "angļu (Svazilenda)", + "en_TC": "angļu (TÄ“rksas un Kaikosas salas)", + "en_TK": "angļu (Tokelau)", + "en_TO": "angļu (Tonga)", + "en_TT": "angļu (TrinidÄda un TobÄgo)", + "en_TV": "angļu (Tuvalu)", + "en_TZ": "angļu (TanzÄnija)", + "en_UG": "angļu (Uganda)", + "en_UM": "angļu (ASV MazÄs AizjÅ«ras salas)", + "en_US": "angļu (Amerikas SavienotÄs Valstis)", + "en_VC": "angļu (Sentvinsenta un GrenadÄ«nas)", + "en_VG": "angļu (Britu Virdžīnas)", + "en_VI": "angļu (ASV Virdžīnas)", + "en_VU": "angļu (Vanuatu)", + "en_WS": "angļu (Samoa)", + "en_ZA": "angļu (DienvidÄfrikas Republika)", + "en_ZM": "angļu (Zambija)", + "en_ZW": "angļu (Zimbabve)", + "eo": "esperanto", + "es": "spÄņu", + "es_AR": "spÄņu (ArgentÄ«na)", + "es_BO": "spÄņu (BolÄ«vija)", + "es_BR": "spÄņu (BrazÄ«lija)", + "es_CL": "spÄņu (Čīle)", + "es_CO": "spÄņu (Kolumbija)", + "es_CR": "spÄņu (Kostarika)", + "es_CU": "spÄņu (Kuba)", + "es_DO": "spÄņu (DominikÄna)", + "es_EA": "spÄņu (SeÅ«ta un Melilja)", + "es_EC": "spÄņu (Ekvadora)", + "es_ES": "spÄņu (SpÄnija)", + "es_GQ": "spÄņu (EkvatoriÄlÄ Gvineja)", + "es_GT": "spÄņu (Gvatemala)", + "es_HN": "spÄņu (Hondurasa)", + "es_IC": "spÄņu (KanÄriju salas)", + "es_MX": "spÄņu (Meksika)", + "es_NI": "spÄņu (Nikaragva)", + "es_PA": "spÄņu (Panama)", + "es_PE": "spÄņu (Peru)", + "es_PH": "spÄņu (FilipÄ«nas)", + "es_PR": "spÄņu (Puertoriko)", + "es_PY": "spÄņu (Paragvaja)", + "es_SV": "spÄņu (Salvadora)", + "es_US": "spÄņu (Amerikas SavienotÄs Valstis)", + "es_UY": "spÄņu (Urugvaja)", + "es_VE": "spÄņu (VenecuÄ“la)", + "et": "igauņu", + "et_EE": "igauņu (Igaunija)", + "eu": "basku", + "eu_ES": "basku (SpÄnija)", + "fa": "persieÅ¡u", + "fa_AF": "persieÅ¡u (AfganistÄna)", + "fa_IR": "persieÅ¡u (IrÄna)", + "ff": "fulu", + "ff_CM": "fulu (KamerÅ«na)", + "ff_GN": "fulu (Gvineja)", + "ff_MR": "fulu (MauritÄnija)", + "ff_SN": "fulu (SenegÄla)", + "fi": "somu", + "fi_FI": "somu (Somija)", + "fo": "fÄ“ru", + "fo_DK": "fÄ“ru (DÄnija)", + "fo_FO": "fÄ“ru (FÄ“ru salas)", + "fr": "franÄu", + "fr_BE": "franÄu (Beļģija)", + "fr_BF": "franÄu (Burkinafaso)", + "fr_BI": "franÄu (Burundija)", + "fr_BJ": "franÄu (Benina)", + "fr_BL": "franÄu (SenbartelmÄ«)", + "fr_CA": "franÄu (KanÄda)", + "fr_CD": "franÄu (Kongo (KinÅ¡asa))", + "fr_CF": "franÄu (CentrÄlÄfrikas Republika)", + "fr_CG": "franÄu (Kongo (Brazavila))", + "fr_CH": "franÄu (Å veice)", + "fr_CI": "franÄu (KotdivuÄra)", + "fr_CM": "franÄu (KamerÅ«na)", + "fr_DJ": "franÄu (Džibutija)", + "fr_DZ": "franÄu (Alžīrija)", + "fr_FR": "franÄu (Francija)", + "fr_GA": "franÄu (Gabona)", + "fr_GF": "franÄu (Francijas GviÄna)", + "fr_GN": "franÄu (Gvineja)", + "fr_GP": "franÄu (Gvadelupa)", + "fr_GQ": "franÄu (EkvatoriÄlÄ Gvineja)", + "fr_HT": "franÄu (Haiti)", + "fr_KM": "franÄu (Komoru salas)", + "fr_LU": "franÄu (Luksemburga)", + "fr_MA": "franÄu (Maroka)", + "fr_MC": "franÄu (Monako)", + "fr_MF": "franÄu (SenmartÄ“na)", + "fr_MG": "franÄu (Madagaskara)", + "fr_ML": "franÄu (Mali)", + "fr_MQ": "franÄu (Martinika)", + "fr_MR": "franÄu (MauritÄnija)", + "fr_MU": "franÄu (MaurÄ«cija)", + "fr_NC": "franÄu (Jaunkaledonija)", + "fr_NE": "franÄu (NigÄ“ra)", + "fr_PF": "franÄu (Francijas PolinÄ“zija)", + "fr_PM": "franÄu (SenpjÄ“ra un Mikelona)", + "fr_RE": "franÄu (Reinjona)", + "fr_RW": "franÄu (Ruanda)", + "fr_SC": "franÄu (SeiÅ¡elu salas)", + "fr_SN": "franÄu (SenegÄla)", + "fr_SY": "franÄu (SÄ«rija)", + "fr_TD": "franÄu (ÄŒada)", + "fr_TG": "franÄu (Togo)", + "fr_TN": "franÄu (Tunisija)", + "fr_VU": "franÄu (Vanuatu)", + "fr_WF": "franÄu (Volisa un Futunas salas)", + "fr_YT": "franÄu (Majota)", + "fy": "rietumfrÄ«zu", + "fy_NL": "rietumfrÄ«zu (NÄ«derlande)", + "ga": "Ä«ru", + "ga_IE": "Ä«ru (Īrija)", + "gd": "gÄ“lu", + "gd_GB": "gÄ“lu (LielbritÄnija)", + "gl": "galisieÅ¡u", + "gl_ES": "galisieÅ¡u (SpÄnija)", + "gu": "gudžaratu", + "gu_IN": "gudžaratu (Indija)", + "gv": "menieÅ¡u", + "gv_IM": "menieÅ¡u (Mena)", + "ha": "hausu", + "ha_GH": "hausu (Gana)", + "ha_NE": "hausu (NigÄ“ra)", + "ha_NG": "hausu (NigÄ“rija)", + "he": "ivrits", + "he_IL": "ivrits (IzraÄ“la)", + "hi": "hindi", + "hi_IN": "hindi (Indija)", + "hr": "horvÄtu", + "hr_BA": "horvÄtu (Bosnija un Hercegovina)", + "hr_HR": "horvÄtu (HorvÄtija)", + "hu": "ungÄru", + "hu_HU": "ungÄru (UngÄrija)", + "hy": "armēņu", + "hy_AM": "armēņu (ArmÄ“nija)", + "id": "indonÄ“zieÅ¡u", + "id_ID": "indonÄ“zieÅ¡u (IndonÄ“zija)", + "ig": "igbo", + "ig_NG": "igbo (NigÄ“rija)", + "ii": "SiÄuaņas ji", + "ii_CN": "SiÄuaņas ji (Ķīna)", + "is": "Ä«slandieÅ¡u", + "is_IS": "Ä«slandieÅ¡u (Īslande)", + "it": "itÄļu", + "it_CH": "itÄļu (Å veice)", + "it_IT": "itÄļu (ItÄlija)", + "it_SM": "itÄļu (SanmarÄ«no)", + "ja": "japÄņu", + "ja_JP": "japÄņu (JapÄna)", + "ka": "gruzÄ«nu", + "ka_GE": "gruzÄ«nu (Gruzija)", + "ki": "kikuju", + "ki_KE": "kikuju (Kenija)", + "kk": "kazahu", + "kk_KZ": "kazahu (KazahstÄna)", + "kl": "grenlandieÅ¡u", + "kl_GL": "grenlandieÅ¡u (Grenlande)", + "km": "khmeru", + "km_KH": "khmeru (Kambodža)", + "kn": "kannadu", + "kn_IN": "kannadu (Indija)", + "ko": "korejieÅ¡u", + "ko_KP": "korejieÅ¡u (Ziemeļkoreja)", + "ko_KR": "korejieÅ¡u (Dienvidkoreja)", + "ks": "kaÅ¡mirieÅ¡u", + "ks_IN": "kaÅ¡mirieÅ¡u (Indija)", + "kw": "kornieÅ¡u", + "kw_GB": "kornieÅ¡u (LielbritÄnija)", + "ky": "kirgÄ«zu", + "ky_KG": "kirgÄ«zu (KirgizstÄna)", + "lb": "luksemburgieÅ¡u", + "lb_LU": "luksemburgieÅ¡u (Luksemburga)", + "lg": "gandu", + "lg_UG": "gandu (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongo (KinÅ¡asa))", + "ln_CF": "lingala (CentrÄlÄfrikas Republika)", + "ln_CG": "lingala (Kongo (Brazavila))", + "lo": "laosieÅ¡u", + "lo_LA": "laosieÅ¡u (Laosa)", + "lt": "lietuvieÅ¡u", + "lt_LT": "lietuvieÅ¡u (Lietuva)", + "lu": "lubakatanga", + "lu_CD": "lubakatanga (Kongo (KinÅ¡asa))", + "lv": "latvieÅ¡u", + "lv_LV": "latvieÅ¡u (Latvija)", + "mg": "malagasu", + "mg_MG": "malagasu (Madagaskara)", + "mk": "maÄ·edonieÅ¡u", + "mk_MK": "maÄ·edonieÅ¡u (MaÄ·edonija)", + "ml": "malajalu", + "ml_IN": "malajalu (Indija)", + "mn": "mongoļu", + "mn_MN": "mongoļu (Mongolija)", + "mr": "maratu", + "mr_IN": "maratu (Indija)", + "ms": "malajieÅ¡u", + "ms_BN": "malajieÅ¡u (Bruneja)", + "ms_MY": "malajieÅ¡u (Malaizija)", + "ms_SG": "malajieÅ¡u (SingapÅ«ra)", + "mt": "maltieÅ¡u", + "mt_MT": "maltieÅ¡u (Malta)", + "my": "birmieÅ¡u", + "my_MM": "birmieÅ¡u (Mjanma (Birma))", + "nb": "norvēģu bukmols", + "nb_NO": "norvēģu bukmols (Norvēģija)", + "nb_SJ": "norvēģu bukmols (SvalbÄra un Jana Majena sala)", + "nd": "ziemeļndebelu", + "nd_ZW": "ziemeļndebelu (Zimbabve)", + "ne": "nepÄlieÅ¡u", + "ne_IN": "nepÄlieÅ¡u (Indija)", + "ne_NP": "nepÄlieÅ¡u (NepÄla)", + "nl": "holandieÅ¡u", + "nl_AW": "holandieÅ¡u (Aruba)", + "nl_BE": "holandieÅ¡u (Beļģija)", + "nl_BQ": "holandieÅ¡u (NÄ«derlandes KarÄ«bu salas)", + "nl_CW": "holandieÅ¡u (Kirasao)", + "nl_NL": "holandieÅ¡u (NÄ«derlande)", + "nl_SR": "holandieÅ¡u (Surinama)", + "nl_SX": "holandieÅ¡u (SintmÄrtena)", + "nn": "jaunnorvēģu", + "nn_NO": "jaunnorvēģu (Norvēģija)", + "no": "norvēģu", + "no_NO": "norvēģu (Norvēģija)", + "om": "oromu", + "om_ET": "oromu (Etiopija)", + "om_KE": "oromu (Kenija)", + "or": "oriju", + "or_IN": "oriju (Indija)", + "os": "osetÄ«nu", + "os_GE": "osetÄ«nu (Gruzija)", + "os_RU": "osetÄ«nu (Krievija)", + "pa": "pandžabu", + "pa_Arab": "pandžabu (arÄbu)", + "pa_Arab_PK": "pandžabu (arÄbu, PakistÄna)", + "pa_Guru": "pandžabu (pandžabu)", + "pa_Guru_IN": "pandžabu (pandžabu, Indija)", + "pa_IN": "pandžabu (Indija)", + "pa_PK": "pandžabu (PakistÄna)", + "pl": "poļu", + "pl_PL": "poļu (Polija)", + "ps": "puÅ¡tu", + "ps_AF": "puÅ¡tu (AfganistÄna)", + "pt": "portugÄļu", + "pt_AO": "portugÄļu (Angola)", + "pt_BR": "portugÄļu (BrazÄ«lija)", + "pt_CH": "portugÄļu (Å veice)", + "pt_CV": "portugÄļu (Kaboverde)", + "pt_GQ": "portugÄļu (EkvatoriÄlÄ Gvineja)", + "pt_GW": "portugÄļu (Gvineja-Bisava)", + "pt_LU": "portugÄļu (Luksemburga)", + "pt_MO": "portugÄļu (Ķīnas Ä«paÅ¡Äs pÄrvaldes apgabals Makao)", + "pt_MZ": "portugÄļu (Mozambika)", + "pt_PT": "portugÄļu (PortugÄle)", + "pt_ST": "portugÄļu (Santome un Prinsipi)", + "pt_TL": "portugÄļu (Austrumtimora)", + "qu": "keÄvu", + "qu_BO": "keÄvu (BolÄ«vija)", + "qu_EC": "keÄvu (Ekvadora)", + "qu_PE": "keÄvu (Peru)", + "rm": "retoromÄņu", + "rm_CH": "retoromÄņu (Å veice)", + "rn": "rundu", + "rn_BI": "rundu (Burundija)", + "ro": "rumÄņu", + "ro_MD": "rumÄņu (Moldova)", + "ro_RO": "rumÄņu (RumÄnija)", + "ru": "krievu", + "ru_BY": "krievu (Baltkrievija)", + "ru_KG": "krievu (KirgizstÄna)", + "ru_KZ": "krievu (KazahstÄna)", + "ru_MD": "krievu (Moldova)", + "ru_RU": "krievu (Krievija)", + "ru_UA": "krievu (Ukraina)", + "rw": "kiņaruanda", + "rw_RW": "kiņaruanda (Ruanda)", + "se": "ziemeļsÄmu", + "se_FI": "ziemeļsÄmu (Somija)", + "se_NO": "ziemeļsÄmu (Norvēģija)", + "se_SE": "ziemeļsÄmu (Zviedrija)", + "sg": "sango", + "sg_CF": "sango (CentrÄlÄfrikas Republika)", + "sh": "serbu–horvÄtu", + "sh_BA": "serbu–horvÄtu (Bosnija un Hercegovina)", + "si": "singÄļu", + "si_LK": "singÄļu (Å rilanka)", + "sk": "slovÄku", + "sk_SK": "slovÄku (SlovÄkija)", + "sl": "slovēņu", + "sl_SI": "slovēņu (SlovÄ“nija)", + "sn": "Å¡onu", + "sn_ZW": "Å¡onu (Zimbabve)", + "so": "somÄļu", + "so_DJ": "somÄļu (Džibutija)", + "so_ET": "somÄļu (Etiopija)", + "so_KE": "somÄļu (Kenija)", + "so_SO": "somÄļu (SomÄlija)", + "sq": "albÄņu", + "sq_AL": "albÄņu (AlbÄnija)", + "sq_MK": "albÄņu (MaÄ·edonija)", + "sq_XK": "albÄņu (Kosova)", + "sr": "serbu", + "sr_BA": "serbu (Bosnija un Hercegovina)", + "sr_Cyrl": "serbu (kirilica)", + "sr_Cyrl_BA": "serbu (kirilica, Bosnija un Hercegovina)", + "sr_Cyrl_ME": "serbu (kirilica, Melnkalne)", + "sr_Cyrl_RS": "serbu (kirilica, Serbija)", + "sr_Cyrl_XK": "serbu (kirilica, Kosova)", + "sr_Latn": "serbu (latīņu)", + "sr_Latn_BA": "serbu (latīņu, Bosnija un Hercegovina)", + "sr_Latn_ME": "serbu (latīņu, Melnkalne)", + "sr_Latn_RS": "serbu (latīņu, Serbija)", + "sr_Latn_XK": "serbu (latīņu, Kosova)", + "sr_ME": "serbu (Melnkalne)", + "sr_RS": "serbu (Serbija)", + "sr_XK": "serbu (Kosova)", + "sv": "zviedru", + "sv_AX": "zviedru (Olandes salas)", + "sv_FI": "zviedru (Somija)", + "sv_SE": "zviedru (Zviedrija)", + "sw": "svahili", + "sw_CD": "svahili (Kongo (KinÅ¡asa))", + "sw_KE": "svahili (Kenija)", + "sw_TZ": "svahili (TanzÄnija)", + "sw_UG": "svahili (Uganda)", + "ta": "tamilu", + "ta_IN": "tamilu (Indija)", + "ta_LK": "tamilu (Å rilanka)", + "ta_MY": "tamilu (Malaizija)", + "ta_SG": "tamilu (SingapÅ«ra)", + "te": "telugu", + "te_IN": "telugu (Indija)", + "th": "taju", + "th_TH": "taju (Taizeme)", + "ti": "tigrinja", + "ti_ER": "tigrinja (Eritreja)", + "ti_ET": "tigrinja (Etiopija)", + "tl": "tagalu", + "tl_PH": "tagalu (FilipÄ«nas)", + "to": "tongieÅ¡u", + "to_TO": "tongieÅ¡u (Tonga)", + "tr": "turku", + "tr_CY": "turku (Kipra)", + "tr_TR": "turku (Turcija)", + "ug": "uiguru", + "ug_CN": "uiguru (Ķīna)", + "uk": "ukraiņu", + "uk_UA": "ukraiņu (Ukraina)", + "ur": "urdu", + "ur_IN": "urdu (Indija)", + "ur_PK": "urdu (PakistÄna)", + "uz": "uzbeku", + "uz_AF": "uzbeku (AfganistÄna)", + "uz_Arab": "uzbeku (arÄbu)", + "uz_Arab_AF": "uzbeku (arÄbu, AfganistÄna)", + "uz_Cyrl": "uzbeku (kirilica)", + "uz_Cyrl_UZ": "uzbeku (kirilica, UzbekistÄna)", + "uz_Latn": "uzbeku (latīņu)", + "uz_Latn_UZ": "uzbeku (latīņu, UzbekistÄna)", + "uz_UZ": "uzbeku (UzbekistÄna)", + "vi": "vjetnamieÅ¡u", + "vi_VN": "vjetnamieÅ¡u (Vjetnama)", + "yi": "jidiÅ¡s", + "yo": "jorubu", + "yo_BJ": "jorubu (Benina)", + "yo_NG": "jorubu (NigÄ“rija)", + "zh": "Ä·Ä«nieÅ¡u", + "zh_CN": "Ä·Ä«nieÅ¡u (Ķīna)", + "zh_HK": "Ä·Ä«nieÅ¡u (Ķīnas Ä«paÅ¡Äs pÄrvaldes apgabals Honkonga)", + "zh_Hans": "Ä·Ä«nieÅ¡u (vienkÄrÅ¡otÄ)", + "zh_Hans_CN": "Ä·Ä«nieÅ¡u (vienkÄrÅ¡otÄ, Ķīna)", + "zh_Hans_HK": "Ä·Ä«nieÅ¡u (vienkÄrÅ¡otÄ, Ķīnas Ä«paÅ¡Äs pÄrvaldes apgabals Honkonga)", + "zh_Hans_MO": "Ä·Ä«nieÅ¡u (vienkÄrÅ¡otÄ, Ķīnas Ä«paÅ¡Äs pÄrvaldes apgabals Makao)", + "zh_Hans_SG": "Ä·Ä«nieÅ¡u (vienkÄrÅ¡otÄ, SingapÅ«ra)", + "zh_Hant": "Ä·Ä«nieÅ¡u (tradicionÄlÄ)", + "zh_Hant_HK": "Ä·Ä«nieÅ¡u (tradicionÄlÄ, Ķīnas Ä«paÅ¡Äs pÄrvaldes apgabals Honkonga)", + "zh_Hant_MO": "Ä·Ä«nieÅ¡u (tradicionÄlÄ, Ķīnas Ä«paÅ¡Äs pÄrvaldes apgabals Makao)", + "zh_Hant_TW": "Ä·Ä«nieÅ¡u (tradicionÄlÄ, TaivÄna)", + "zh_MO": "Ä·Ä«nieÅ¡u (Ķīnas Ä«paÅ¡Äs pÄrvaldes apgabals Makao)", + "zh_SG": "Ä·Ä«nieÅ¡u (SingapÅ«ra)", + "zh_TW": "Ä·Ä«nieÅ¡u (TaivÄna)", + "zu": "zulu", + "zu_ZA": "zulu (DienvidÄfrikas Republika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/meta.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..ee24b32fc8f2164009ab84ddb372bf7ec097de04 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/meta.json @@ -0,0 +1,631 @@ +{ + "Locales": [ + "af", + "af_NA", + "af_ZA", + "ak", + "ak_GH", + "am", + "am_ET", + "ar", + "ar_001", + "ar_AE", + "ar_BH", + "ar_DJ", + "ar_DZ", + "ar_EG", + "ar_EH", + "ar_ER", + "ar_IL", + "ar_IQ", + "ar_JO", + "ar_KM", + "ar_KW", + "ar_LB", + "ar_LY", + "ar_MA", + "ar_MR", + "ar_OM", + "ar_PS", + "ar_QA", + "ar_SA", + "ar_SD", + "ar_SO", + "ar_SS", + "ar_SY", + "ar_TD", + "ar_TN", + "ar_YE", + "as", + "as_IN", + "az", + "az_AZ", + "az_Cyrl", + "az_Cyrl_AZ", + "az_Latn", + "az_Latn_AZ", + "be", + "be_BY", + "bg", + "bg_BG", + "bm", + "bm_ML", + "bn", + "bn_BD", + "bn_IN", + "bo", + "bo_CN", + "bo_IN", + "br", + "br_FR", + "bs", + "bs_BA", + "bs_Cyrl", + "bs_Cyrl_BA", + "bs_Latn", + "bs_Latn_BA", + "ca", + "ca_AD", + "ca_ES", + "ca_FR", + "ca_IT", + "ce", + "ce_RU", + "cs", + "cs_CZ", + "cy", + "cy_GB", + "da", + "da_DK", + "da_GL", + "de", + "de_AT", + "de_BE", + "de_CH", + "de_DE", + "de_IT", + "de_LI", + "de_LU", + "dz", + "dz_BT", + "ee", + "ee_GH", + "ee_TG", + "el", + "el_CY", + "el_GR", + "en", + "en_001", + "en_150", + "en_AG", + "en_AI", + "en_AS", + "en_AT", + "en_AU", + "en_BB", + "en_BE", + "en_BI", + "en_BM", + "en_BS", + "en_BW", + "en_BZ", + "en_CA", + "en_CC", + "en_CH", + "en_CK", + "en_CM", + "en_CX", + "en_CY", + "en_DE", + "en_DG", + "en_DK", + "en_DM", + "en_ER", + "en_FI", + "en_FJ", + "en_FK", + "en_FM", + "en_GB", + "en_GD", + "en_GG", + "en_GH", + "en_GI", + "en_GM", + "en_GU", + "en_GY", + "en_HK", + "en_IE", + "en_IL", + "en_IM", + "en_IN", + "en_IO", + "en_JE", + "en_JM", + "en_KE", + "en_KI", + "en_KN", + "en_KY", + "en_LC", + "en_LR", + "en_LS", + "en_MG", + "en_MH", + "en_MO", + "en_MP", + "en_MS", + "en_MT", + "en_MU", + "en_MW", + "en_MY", + "en_NA", + "en_NF", + "en_NG", + "en_NH", + "en_NL", + "en_NR", + "en_NU", + "en_NZ", + "en_PG", + "en_PH", + "en_PK", + "en_PN", + "en_PR", + "en_PW", + "en_RH", + "en_RW", + "en_SB", + "en_SC", + "en_SD", + "en_SE", + "en_SG", + "en_SH", + "en_SI", + "en_SL", + "en_SS", + "en_SX", + "en_SZ", + "en_TC", + "en_TK", + "en_TO", + "en_TT", + "en_TV", + "en_TZ", + "en_UG", + "en_UM", + "en_US", + "en_US_POSIX", + "en_VC", + "en_VG", + "en_VI", + "en_VU", + "en_WS", + "en_ZA", + "en_ZM", + "en_ZW", + "eo", + "es", + "es_419", + "es_AR", + "es_BO", + "es_BR", + "es_CL", + "es_CO", + "es_CR", + "es_CU", + "es_DO", + "es_EA", + "es_EC", + "es_ES", + "es_GQ", + "es_GT", + "es_HN", + "es_IC", + "es_MX", + "es_NI", + "es_PA", + "es_PE", + "es_PH", + "es_PR", + "es_PY", + "es_SV", + "es_US", + "es_UY", + "es_VE", + "et", + "et_EE", + "eu", + "eu_ES", + "fa", + "fa_AF", + "fa_IR", + "ff", + "ff_CM", + "ff_GN", + "ff_MR", + "ff_SN", + "fi", + "fi_FI", + "fo", + "fo_DK", + "fo_FO", + "fr", + "fr_BE", + "fr_BF", + "fr_BI", + "fr_BJ", + "fr_BL", + "fr_CA", + "fr_CD", + "fr_CF", + "fr_CG", + "fr_CH", + "fr_CI", + "fr_CM", + "fr_DJ", + "fr_DZ", + "fr_FR", + "fr_GA", + "fr_GF", + "fr_GN", + "fr_GP", + "fr_GQ", + "fr_HT", + "fr_KM", + "fr_LU", + "fr_MA", + "fr_MC", + "fr_MF", + "fr_MG", + "fr_ML", + "fr_MQ", + "fr_MR", + "fr_MU", + "fr_NC", + "fr_NE", + "fr_PF", + "fr_PM", + "fr_RE", + "fr_RW", + "fr_SC", + "fr_SN", + "fr_SY", + "fr_TD", + "fr_TG", + "fr_TN", + "fr_VU", + "fr_WF", + "fr_YT", + "fy", + "fy_NL", + "ga", + "ga_IE", + "gd", + "gd_GB", + "gl", + "gl_ES", + "gu", + "gu_IN", + "gv", + "gv_IM", + "ha", + "ha_GH", + "ha_NE", + "ha_NG", + "he", + "he_IL", + "hi", + "hi_IN", + "hr", + "hr_BA", + "hr_HR", + "hu", + "hu_HU", + "hy", + "hy_AM", + "id", + "id_ID", + "ig", + "ig_NG", + "ii", + "ii_CN", + "in", + "in_ID", + "is", + "is_IS", + "it", + "it_CH", + "it_IT", + "it_SM", + "iw", + "iw_IL", + "ja", + "ja_JP", + "ja_JP_TRADITIONAL", + "ka", + "ka_GE", + "ki", + "ki_KE", + "kk", + "kk_KZ", + "kl", + "kl_GL", + "km", + "km_KH", + "kn", + "kn_IN", + "ko", + "ko_KP", + "ko_KR", + "ks", + "ks_IN", + "kw", + "kw_GB", + "ky", + "ky_KG", + "lb", + "lb_LU", + "lg", + "lg_UG", + "ln", + "ln_AO", + "ln_CD", + "ln_CF", + "ln_CG", + "lo", + "lo_LA", + "lt", + "lt_LT", + "lu", + "lu_CD", + "lv", + "lv_LV", + "mg", + "mg_MG", + "mk", + "mk_MK", + "ml", + "ml_IN", + "mn", + "mn_MN", + "mo", + "mr", + "mr_IN", + "ms", + "ms_BN", + "ms_MY", + "ms_SG", + "mt", + "mt_MT", + "my", + "my_MM", + "nb", + "nb_NO", + "nb_SJ", + "nd", + "nd_ZW", + "ne", + "ne_IN", + "ne_NP", + "nl", + "nl_AW", + "nl_BE", + "nl_BQ", + "nl_CW", + "nl_NL", + "nl_SR", + "nl_SX", + "nn", + "nn_NO", + "no", + "no_NO", + "no_NO_NY", + "om", + "om_ET", + "om_KE", + "or", + "or_IN", + "os", + "os_GE", + "os_RU", + "pa", + "pa_Arab", + "pa_Arab_PK", + "pa_Guru", + "pa_Guru_IN", + "pa_IN", + "pa_PK", + "pl", + "pl_PL", + "ps", + "ps_AF", + "pt", + "pt_AO", + "pt_BR", + "pt_CH", + "pt_CV", + "pt_GQ", + "pt_GW", + "pt_LU", + "pt_MO", + "pt_MZ", + "pt_PT", + "pt_ST", + "pt_TL", + "qu", + "qu_BO", + "qu_EC", + "qu_PE", + "rm", + "rm_CH", + "rn", + "rn_BI", + "ro", + "ro_MD", + "ro_RO", + "ru", + "ru_BY", + "ru_KG", + "ru_KZ", + "ru_MD", + "ru_RU", + "ru_UA", + "rw", + "rw_RW", + "se", + "se_FI", + "se_NO", + "se_SE", + "sg", + "sg_CF", + "sh", + "sh_BA", + "sh_CS", + "sh_YU", + "si", + "si_LK", + "sk", + "sk_SK", + "sl", + "sl_SI", + "sn", + "sn_ZW", + "so", + "so_DJ", + "so_ET", + "so_KE", + "so_SO", + "sq", + "sq_AL", + "sq_MK", + "sq_XK", + "sr", + "sr_BA", + "sr_CS", + "sr_Cyrl", + "sr_Cyrl_BA", + "sr_Cyrl_CS", + "sr_Cyrl_ME", + "sr_Cyrl_RS", + "sr_Cyrl_XK", + "sr_Cyrl_YU", + "sr_Latn", + "sr_Latn_BA", + "sr_Latn_CS", + "sr_Latn_ME", + "sr_Latn_RS", + "sr_Latn_XK", + "sr_Latn_YU", + "sr_ME", + "sr_RS", + "sr_XK", + "sr_YU", + "sv", + "sv_AX", + "sv_FI", + "sv_SE", + "sw", + "sw_CD", + "sw_KE", + "sw_TZ", + "sw_UG", + "ta", + "ta_IN", + "ta_LK", + "ta_MY", + "ta_SG", + "te", + "te_IN", + "th", + "th_TH", + "th_TH_TRADITIONAL", + "ti", + "ti_ER", + "ti_ET", + "tl", + "tl_PH", + "to", + "to_TO", + "tr", + "tr_CY", + "tr_TR", + "ug", + "ug_CN", + "uk", + "uk_UA", + "ur", + "ur_IN", + "ur_PK", + "uz", + "uz_AF", + "uz_Arab", + "uz_Arab_AF", + "uz_Cyrl", + "uz_Cyrl_UZ", + "uz_Latn", + "uz_Latn_UZ", + "uz_UZ", + "vi", + "vi_VN", + "yi", + "yi_001", + "yo", + "yo_BJ", + "yo_NG", + "zh", + "zh_CN", + "zh_HK", + "zh_Hans", + "zh_Hans_CN", + "zh_Hans_HK", + "zh_Hans_MO", + "zh_Hans_SG", + "zh_Hant", + "zh_Hant_HK", + "zh_Hant_MO", + "zh_Hant_TW", + "zh_MO", + "zh_SG", + "zh_TW", + "zu", + "zu_ZA" + ], + "Aliases": { + "az_AZ": "az_Latn_AZ", + "bs_BA": "bs_Latn_BA", + "en_NH": "en_VU", + "en_RH": "en_ZW", + "in": "id", + "in_ID": "id_ID", + "iw": "he", + "iw_IL": "he_IL", + "mo": "ro_MD", + "no": "nb", + "no_NO": "nb_NO", + "no_NO_NY": "nn_NO", + "pa_IN": "pa_Guru_IN", + "pa_PK": "pa_Arab_PK", + "sh": "sr_Latn", + "sh_BA": "sr_Latn_BA", + "sh_CS": "sr_Latn_RS", + "sh_YU": "sr_Latn_RS", + "sr_BA": "sr_Cyrl_BA", + "sr_CS": "sr_Cyrl_RS", + "sr_Cyrl_CS": "sr_Cyrl_RS", + "sr_Cyrl_YU": "sr_Cyrl_RS", + "sr_Latn_CS": "sr_Latn_RS", + "sr_Latn_YU": "sr_Latn_RS", + "sr_ME": "sr_Latn_ME", + "sr_RS": "sr_Cyrl_RS", + "sr_XK": "sr_Cyrl_XK", + "sr_YU": "sr_Cyrl_RS", + "tl": "fil", + "tl_PH": "fil_PH", + "uz_AF": "uz_Arab_AF", + "uz_UZ": "uz_Latn_UZ", + "zh_CN": "zh_Hans_CN", + "zh_HK": "zh_Hant_HK", + "zh_MO": "zh_Hant_MO", + "zh_SG": "zh_Hans_SG", + "zh_TW": "zh_Hant_TW" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mg.json new file mode 100644 index 0000000000000000000000000000000000000000..a6e5d64512017b9ade5f4104100e0f2278567039 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mg.json @@ -0,0 +1,321 @@ +{ + "Names": { + "ak": "Akan", + "ak_GH": "Akan (Ghana)", + "am": "Amharika", + "am_ET": "Amharika (Ethiopia)", + "ar": "Arabo", + "ar_AE": "Arabo (Emirà Arabo mitambatra)", + "ar_BH": "Arabo (Bahrain)", + "ar_DJ": "Arabo (Djiboti)", + "ar_DZ": "Arabo (Alzeria)", + "ar_EG": "Arabo (Ejypta)", + "ar_ER": "Arabo (Eritrea)", + "ar_IL": "Arabo (Israely)", + "ar_IQ": "Arabo (Irak)", + "ar_JO": "Arabo (Jordania)", + "ar_KM": "Arabo (Kômaoro)", + "ar_KW": "Arabo (Kôeity)", + "ar_LB": "Arabo (Libana)", + "ar_LY": "Arabo (Libya)", + "ar_MA": "Arabo (Marôka)", + "ar_MR": "Arabo (Maoritania)", + "ar_OM": "Arabo (Oman)", + "ar_PS": "Arabo (Palestina)", + "ar_QA": "Arabo (Katar)", + "ar_SA": "Arabo (Arabia saodita)", + "ar_SD": "Arabo (Sodan)", + "ar_SO": "Arabo (Somalia)", + "ar_SY": "Arabo (Syria)", + "ar_TD": "Arabo (Tsady)", + "ar_TN": "Arabo (Tonizia)", + "ar_YE": "Arabo (Yemen)", + "be": "Bielorosy", + "be_BY": "Bielorosy (Belarosy)", + "bg": "Biolgara", + "bg_BG": "Biolgara (Biolgaria)", + "bn": "Bengali", + "bn_BD": "Bengali (Bangladesy)", + "bn_IN": "Bengali (Indy)", + "cs": "Tseky", + "cs_CZ": "Tseky (Repoblikan’i Tseky)", + "de": "Alemanina", + "de_AT": "Alemanina (Aotrisy)", + "de_BE": "Alemanina (Belzika)", + "de_CH": "Alemanina (Soisa)", + "de_DE": "Alemanina (Alemaina)", + "de_IT": "Alemanina (Italia)", + "de_LI": "Alemanina (Listenstein)", + "de_LU": "Alemanina (Lioksamboro)", + "el": "Grika", + "el_CY": "Grika (Sypra)", + "el_GR": "Grika (Gresy)", + "en": "Anglisy", + "en_AG": "Anglisy (Antiga sy Barboda)", + "en_AI": "Anglisy (Anguilla)", + "en_AS": "Anglisy (Samoa amerikanina)", + "en_AT": "Anglisy (Aotrisy)", + "en_AU": "Anglisy (Aostralia)", + "en_BB": "Anglisy (Barbady)", + "en_BE": "Anglisy (Belzika)", + "en_BI": "Anglisy (Borondi)", + "en_BM": "Anglisy (Bermioda)", + "en_BS": "Anglisy (Bahamas)", + "en_BW": "Anglisy (Botsoana)", + "en_BZ": "Anglisy (Belize)", + "en_CA": "Anglisy (Kanada)", + "en_CH": "Anglisy (Soisa)", + "en_CK": "Anglisy (Nosy Kook)", + "en_CM": "Anglisy (Kamerona)", + "en_CY": "Anglisy (Sypra)", + "en_DE": "Anglisy (Alemaina)", + "en_DK": "Anglisy (Danmarka)", + "en_DM": "Anglisy (Dominika)", + "en_ER": "Anglisy (Eritrea)", + "en_FI": "Anglisy (Finlandy)", + "en_FJ": "Anglisy (Fidji)", + "en_FK": "Anglisy (Nosy Falkand)", + "en_FM": "Anglisy (Mikrônezia)", + "en_GB": "Anglisy (Angletera)", + "en_GD": "Anglisy (Grenady)", + "en_GH": "Anglisy (Ghana)", + "en_GI": "Anglisy (Zibraltara)", + "en_GM": "Anglisy (Gambia)", + "en_GU": "Anglisy (Guam)", + "en_GY": "Anglisy (Guyana)", + "en_IE": "Anglisy (Irlandy)", + "en_IL": "Anglisy (Israely)", + "en_IN": "Anglisy (Indy)", + "en_IO": "Anglisy (Faridranomasina indiana britanika)", + "en_JM": "Anglisy (Jamaïka)", + "en_KE": "Anglisy (Kenya)", + "en_KI": "Anglisy (Kiribati)", + "en_KN": "Anglisy (Saint-Christophe-et-Niévès)", + "en_KY": "Anglisy (Nosy Kayman)", + "en_LC": "Anglisy (Sainte-Lucie)", + "en_LR": "Anglisy (Liberia)", + "en_LS": "Anglisy (Lesotho)", + "en_MG": "Anglisy (Madagasikara)", + "en_MH": "Anglisy (Nosy Marshall)", + "en_MP": "Anglisy (Nosy Mariana Atsinanana)", + "en_MS": "Anglisy (Montserrat)", + "en_MT": "Anglisy (Malta)", + "en_MU": "Anglisy (Maorisy)", + "en_MW": "Anglisy (Malaoì)", + "en_MY": "Anglisy (Malaizia)", + "en_NA": "Anglisy (Namibia)", + "en_NF": "Anglisy (Nosy Norfolk)", + "en_NG": "Anglisy (Nizeria)", + "en_NL": "Anglisy (Holanda)", + "en_NR": "Anglisy (Naorò)", + "en_NU": "Anglisy (Nioé)", + "en_NZ": "Anglisy (Nouvelle-Zélande)", + "en_PG": "Anglisy (Papouasie-Nouvelle-Guinée)", + "en_PH": "Anglisy (Filipina)", + "en_PK": "Anglisy (Pakistan)", + "en_PN": "Anglisy (Pitkairn)", + "en_PR": "Anglisy (Pôrtô Rikô)", + "en_PW": "Anglisy (Palao)", + "en_RW": "Anglisy (Roanda)", + "en_SB": "Anglisy (Nosy Salomona)", + "en_SC": "Anglisy (Seyshela)", + "en_SD": "Anglisy (Sodan)", + "en_SE": "Anglisy (Soedy)", + "en_SG": "Anglisy (Singaporo)", + "en_SH": "Anglisy (Sainte-Hélène)", + "en_SI": "Anglisy (Slovenia)", + "en_SL": "Anglisy (Sierra Leone)", + "en_SZ": "Anglisy (Soazilandy)", + "en_TC": "Anglisy (Nosy Turks sy Caïques)", + "en_TK": "Anglisy (Tokelao)", + "en_TO": "Anglisy (Tongà)", + "en_TT": "Anglisy (Trinidad sy Tobagô)", + "en_TV": "Anglisy (Tovalò)", + "en_TZ": "Anglisy (Tanzania)", + "en_UG": "Anglisy (Oganda)", + "en_US": "Anglisy (Etazonia)", + "en_VC": "Anglisy (Saint-Vincent-et-les Grenadines)", + "en_VG": "Anglisy (Nosy britanika virijiny)", + "en_VI": "Anglisy (Nosy Virijiny Etazonia)", + "en_VU": "Anglisy (Vanoatò)", + "en_WS": "Anglisy (Samoa)", + "en_ZA": "Anglisy (Afrika Atsimo)", + "en_ZM": "Anglisy (Zambia)", + "en_ZW": "Anglisy (Zimbaboe)", + "es": "Espaniola", + "es_AR": "Espaniola (Arzantina)", + "es_BO": "Espaniola (Bolivia)", + "es_BR": "Espaniola (Brezila)", + "es_CL": "Espaniola (Shili)", + "es_CO": "Espaniola (Kôlômbia)", + "es_CR": "Espaniola (Kosta Rikà)", + "es_CU": "Espaniola (Kiobà)", + "es_DO": "Espaniola (Repoblika Dominikanina)", + "es_EC": "Espaniola (Ekoatera)", + "es_ES": "Espaniola (Espaina)", + "es_GQ": "Espaniola (Guinea Ekoatera)", + "es_GT": "Espaniola (Goatemalà)", + "es_HN": "Espaniola (Hondiorasy)", + "es_MX": "Espaniola (Meksika)", + "es_NI": "Espaniola (Nikaragoà)", + "es_PA": "Espaniola (Panama)", + "es_PE": "Espaniola (Peroa)", + "es_PH": "Espaniola (Filipina)", + "es_PR": "Espaniola (Pôrtô Rikô)", + "es_PY": "Espaniola (Paragoay)", + "es_SV": "Espaniola (El Salvador)", + "es_US": "Espaniola (Etazonia)", + "es_UY": "Espaniola (Orogoay)", + "es_VE": "Espaniola (Venezoelà)", + "fa": "Persa", + "fa_AF": "Persa (Afghanistan)", + "fa_IR": "Persa (Iran)", + "fr": "Frantsay", + "fr_BE": "Frantsay (Belzika)", + "fr_BF": "Frantsay (Borkina Faso)", + "fr_BI": "Frantsay (Borondi)", + "fr_BJ": "Frantsay (Benin)", + "fr_CA": "Frantsay (Kanada)", + "fr_CD": "Frantsay (Repoblikan’i Kongo)", + "fr_CF": "Frantsay (Repoblika Ivon’Afrika)", + "fr_CG": "Frantsay (Kôngô)", + "fr_CH": "Frantsay (Soisa)", + "fr_CI": "Frantsay (Côte d’Ivoire)", + "fr_CM": "Frantsay (Kamerona)", + "fr_DJ": "Frantsay (Djiboti)", + "fr_DZ": "Frantsay (Alzeria)", + "fr_FR": "Frantsay (Frantsa)", + "fr_GA": "Frantsay (Gabon)", + "fr_GF": "Frantsay (Guyana frantsay)", + "fr_GN": "Frantsay (Ginea)", + "fr_GP": "Frantsay (Goadelopy)", + "fr_GQ": "Frantsay (Guinea Ekoatera)", + "fr_HT": "Frantsay (Haiti)", + "fr_KM": "Frantsay (Kômaoro)", + "fr_LU": "Frantsay (Lioksamboro)", + "fr_MA": "Frantsay (Marôka)", + "fr_MC": "Frantsay (Mônakô)", + "fr_MG": "Frantsay (Madagasikara)", + "fr_ML": "Frantsay (Mali)", + "fr_MQ": "Frantsay (Martinika)", + "fr_MR": "Frantsay (Maoritania)", + "fr_MU": "Frantsay (Maorisy)", + "fr_NC": "Frantsay (Nouvelle-Calédonie)", + "fr_NE": "Frantsay (Niger)", + "fr_PF": "Frantsay (Polynezia frantsay)", + "fr_PM": "Frantsay (Saint-Pierre-et-Miquelon)", + "fr_RE": "Frantsay (Larenion)", + "fr_RW": "Frantsay (Roanda)", + "fr_SC": "Frantsay (Seyshela)", + "fr_SN": "Frantsay (Senegal)", + "fr_SY": "Frantsay (Syria)", + "fr_TD": "Frantsay (Tsady)", + "fr_TG": "Frantsay (Togo)", + "fr_TN": "Frantsay (Tonizia)", + "fr_VU": "Frantsay (Vanoatò)", + "fr_WF": "Frantsay (Wallis sy Futuna)", + "fr_YT": "Frantsay (Mayôty)", + "ha": "haoussa", + "ha_GH": "haoussa (Ghana)", + "ha_NE": "haoussa (Niger)", + "ha_NG": "haoussa (Nizeria)", + "hi": "hindi", + "hi_IN": "hindi (Indy)", + "hu": "hongroà", + "hu_HU": "hongroà (Hongria)", + "id": "Indonezianina", + "id_ID": "Indonezianina (Indonezia)", + "ig": "igbo", + "ig_NG": "igbo (Nizeria)", + "it": "Italianina", + "it_CH": "Italianina (Soisa)", + "it_IT": "Italianina (Italia)", + "it_SM": "Italianina (Saint-Marin)", + "ja": "Japoney", + "ja_JP": "Japoney (Japana)", + "km": "khmer", + "km_KH": "khmer (Kambôdja)", + "ko": "Koreanina", + "ko_KP": "Koreanina (Korea Avaratra)", + "ko_KR": "Koreanina (Korea Atsimo)", + "mg": "Malagasy", + "mg_MG": "Malagasy (Madagasikara)", + "ms": "Malay", + "ms_BN": "Malay (Brunei)", + "ms_MY": "Malay (Malaizia)", + "ms_SG": "Malay (Singaporo)", + "my": "Birmana", + "my_MM": "Birmana (Myanmar)", + "ne": "Nepale", + "ne_IN": "Nepale (Indy)", + "ne_NP": "Nepale (Nepala)", + "nl": "Holandey", + "nl_AW": "Holandey (Arobà)", + "nl_BE": "Holandey (Belzika)", + "nl_NL": "Holandey (Holanda)", + "nl_SR": "Holandey (Sorinam)", + "pa": "Penjabi", + "pa_IN": "Penjabi (Indy)", + "pa_PK": "Penjabi (Pakistan)", + "pl": "Poloney", + "pl_PL": "Poloney (Pôlôna)", + "pt": "Portiogey", + "pt_AO": "Portiogey (Angola)", + "pt_BR": "Portiogey (Brezila)", + "pt_CH": "Portiogey (Soisa)", + "pt_CV": "Portiogey (Nosy Cap-Vert)", + "pt_GQ": "Portiogey (Guinea Ekoatera)", + "pt_GW": "Portiogey (Giné-Bisao)", + "pt_LU": "Portiogey (Lioksamboro)", + "pt_MZ": "Portiogey (Mozambika)", + "pt_PT": "Portiogey (Pôrtiogala)", + "pt_ST": "Portiogey (São Tomé-et-Príncipe)", + "pt_TL": "Portiogey (Timor Atsinanana)", + "ro": "Romanianina", + "ro_MD": "Romanianina (Môldavia)", + "ro_RO": "Romanianina (Romania)", + "ru": "Rosianina", + "ru_BY": "Rosianina (Belarosy)", + "ru_KG": "Rosianina (Kiordistan)", + "ru_KZ": "Rosianina (Kazakhstan)", + "ru_MD": "Rosianina (Môldavia)", + "ru_RU": "Rosianina (Rosia)", + "ru_UA": "Rosianina (Okraina)", + "rw": "Roande", + "rw_RW": "Roande (Roanda)", + "so": "Somalianina", + "so_DJ": "Somalianina (Djiboti)", + "so_ET": "Somalianina (Ethiopia)", + "so_KE": "Somalianina (Kenya)", + "so_SO": "Somalianina (Somalia)", + "sv": "Soisa", + "sv_FI": "Soisa (Finlandy)", + "sv_SE": "Soisa (Soedy)", + "ta": "Tamoila", + "ta_IN": "Tamoila (Indy)", + "ta_LK": "Tamoila (Sri Lanka)", + "ta_MY": "Tamoila (Malaizia)", + "ta_SG": "Tamoila (Singaporo)", + "th": "Taioaney", + "th_TH": "Taioaney (Thailandy)", + "tr": "Tiorka", + "tr_CY": "Tiorka (Sypra)", + "tr_TR": "Tiorka (Torkia)", + "uk": "Okrainianina", + "uk_UA": "Okrainianina (Okraina)", + "ur": "Ordò", + "ur_IN": "Ordò (Indy)", + "ur_PK": "Ordò (Pakistan)", + "vi": "Vietnamianina", + "vi_VN": "Vietnamianina (Vietnam)", + "yo": "Yôrobà", + "yo_BJ": "Yôrobà (Benin)", + "yo_NG": "Yôrobà (Nizeria)", + "zh": "Sinoa, Mandarin", + "zh_CN": "Sinoa, Mandarin (Sina)", + "zh_SG": "Sinoa, Mandarin (Singaporo)", + "zh_TW": "Sinoa, Mandarin (Taioana)", + "zu": "Zolò", + "zu_ZA": "Zolò (Afrika Atsimo)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mk.json new file mode 100644 index 0000000000000000000000000000000000000000..1fb0e03b5b524d4c39a072dba4fda0d63acbed15 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mk.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "африканÑ", + "af_NA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð½Ñ (Ðамибија)", + "af_ZA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð½Ñ (ЈужноафриканÑка Република)", + "ak": "аканÑки", + "ak_GH": "аканÑки (Гана)", + "am": "амхарÑки", + "am_ET": "амхарÑки (Етиопија)", + "ar": "арапÑки", + "ar_AE": "арапÑки (Обединети ÐрапÑки Емирати)", + "ar_BH": "арапÑки (Бахреин)", + "ar_DJ": "арапÑки (Ðибути)", + "ar_DZ": "арапÑки (Ðлжир)", + "ar_EG": "арапÑки (Египет)", + "ar_EH": "арапÑки (Западна Сахара)", + "ar_ER": "арапÑки (Еритреја)", + "ar_IL": "арапÑки (Израел)", + "ar_IQ": "арапÑки (Ирак)", + "ar_JO": "арапÑки (Јордан)", + "ar_KM": "арапÑки (КоморÑки ОÑтрови)", + "ar_KW": "арапÑки (Кувајт)", + "ar_LB": "арапÑки (Либан)", + "ar_LY": "арапÑки (Либија)", + "ar_MA": "арапÑки (Мароко)", + "ar_MR": "арапÑки (Мавританија)", + "ar_OM": "арапÑки (Оман)", + "ar_PS": "арапÑки (ПалеÑтинÑки територии)", + "ar_QA": "арапÑки (Катар)", + "ar_SA": "арапÑки (СаудиÑка Ðрабија)", + "ar_SD": "арапÑки (Судан)", + "ar_SO": "арапÑки (Сомалија)", + "ar_SS": "арапÑки (Јужен Судан)", + "ar_SY": "арапÑки (Сирија)", + "ar_TD": "арапÑки (Чад)", + "ar_TN": "арапÑки (ТуниÑ)", + "ar_YE": "арапÑки (Јемен)", + "as": "аÑамÑки", + "as_IN": "аÑамÑки (Индија)", + "az": "азербејџанÑки", + "az_AZ": "азербејџанÑки (Ðзербејџан)", + "az_Cyrl": "азербејџанÑки (кирилÑко пиÑмо)", + "az_Cyrl_AZ": "азербејџанÑки (кирилÑко пиÑмо, Ðзербејџан)", + "az_Latn": "азербејџанÑки (латинично пиÑмо)", + "az_Latn_AZ": "азербејџанÑки (латинично пиÑмо, Ðзербејџан)", + "be": "белоруÑки", + "be_BY": "белоруÑки (БелоруÑија)", + "bg": "бугарÑки", + "bg_BG": "бугарÑки (Бугарија)", + "bm": "бамбара", + "bm_ML": "бамбара (Мали)", + "bn": "бенгалÑки", + "bn_BD": "бенгалÑки (Бангладеш)", + "bn_IN": "бенгалÑки (Индија)", + "bo": "тибетÑки", + "bo_CN": "тибетÑки (Кина)", + "bo_IN": "тибетÑки (Индија)", + "br": "бретонÑки", + "br_FR": "бретонÑки (Франција)", + "bs": "боÑанÑки", + "bs_BA": "боÑанÑки (БоÑна и Херцеговина)", + "bs_Cyrl": "боÑанÑки (кирилÑко пиÑмо)", + "bs_Cyrl_BA": "боÑанÑки (кирилÑко пиÑмо, БоÑна и Херцеговина)", + "bs_Latn": "боÑанÑки (латинично пиÑмо)", + "bs_Latn_BA": "боÑанÑки (латинично пиÑмо, БоÑна и Херцеговина)", + "ca": "каталонÑки", + "ca_AD": "каталонÑки (Ðндора)", + "ca_ES": "каталонÑки (Шпанија)", + "ca_FR": "каталонÑки (Франција)", + "ca_IT": "каталонÑки (Италија)", + "ce": "чеченÑки", + "ce_RU": "чеченÑки (РуÑија)", + "cs": "чешки", + "cs_CZ": "чешки (Република Чешка)", + "cy": "велшки", + "cy_GB": "велшки (Обединето КралÑтво)", + "da": "данÑки", + "da_DK": "данÑки (ДанÑка)", + "da_GL": "данÑки (Гренланд)", + "de": "германÑки", + "de_AT": "германÑки (ÐвÑтрија)", + "de_BE": "германÑки (Белгија)", + "de_CH": "германÑки (Швајцарија)", + "de_DE": "германÑки (Германија)", + "de_IT": "германÑки (Италија)", + "de_LI": "германÑки (Лихтенштајн)", + "de_LU": "германÑки (ЛукÑембург)", + "dz": "ѕонгка", + "dz_BT": "ѕонгка (Бутан)", + "ee": "еве", + "ee_GH": "еве (Гана)", + "ee_TG": "еве (Того)", + "el": "грчки", + "el_CY": "грчки (Кипар)", + "el_GR": "грчки (Грција)", + "en": "англиÑки", + "en_AG": "англиÑки (Ðнтигва и Барбуда)", + "en_AI": "англиÑки (Ðнгвила)", + "en_AS": "англиÑки (ÐмериканÑка Самоа)", + "en_AT": "англиÑки (ÐвÑтрија)", + "en_AU": "англиÑки (ÐвÑтралија)", + "en_BB": "англиÑки (БарбадоÑ)", + "en_BE": "англиÑки (Белгија)", + "en_BI": "англиÑки (Бурунди)", + "en_BM": "англиÑки (Бермуди)", + "en_BS": "англиÑки (Бахами)", + "en_BW": "англиÑки (Боцвана)", + "en_BZ": "англиÑки (Белизе)", + "en_CA": "англиÑки (Канада)", + "en_CC": "англиÑки (КокоÑови (Килиншки) ОÑтрови)", + "en_CH": "англиÑки (Швајцарија)", + "en_CK": "англиÑки (Кукови ОÑтрови)", + "en_CM": "англиÑки (Камерун)", + "en_CX": "англиÑки (Божиќен ОÑтров)", + "en_CY": "англиÑки (Кипар)", + "en_DE": "англиÑки (Германија)", + "en_DG": "англиÑки (Диего ГарÑија)", + "en_DK": "англиÑки (ДанÑка)", + "en_DM": "англиÑки (Доминика)", + "en_ER": "англиÑки (Еритреја)", + "en_FI": "англиÑки (ФинÑка)", + "en_FJ": "англиÑки (Фиџи)", + "en_FK": "англиÑки (ФолкландÑки ОÑтрови)", + "en_FM": "англиÑки (Микронезија)", + "en_GB": "англиÑки (Обединето КралÑтво)", + "en_GD": "англиÑки (Гренада)", + "en_GG": "англиÑки (Гернзи)", + "en_GH": "англиÑки (Гана)", + "en_GI": "англиÑки (Гибралтар)", + "en_GM": "англиÑки (Гамбија)", + "en_GU": "англиÑки (Гуам)", + "en_GY": "англиÑки (Гвајана)", + "en_HK": "англиÑки (Хонг Конг С.Ð.Р Кина)", + "en_IE": "англиÑки (ИрÑка)", + "en_IL": "англиÑки (Израел)", + "en_IM": "англиÑки (ОÑтров Ман)", + "en_IN": "англиÑки (Индија)", + "en_IO": "англиÑки (БританÑка ИндоокеанÑка Територија)", + "en_JE": "англиÑки (ÐерÑи)", + "en_JM": "англиÑки (Јамајка)", + "en_KE": "англиÑки (Кенија)", + "en_KI": "англиÑки (Кирибати)", + "en_KN": "англиÑки (Свети КриÑтофер и ÐевиÑ)", + "en_KY": "англиÑки (КајманÑки ОÑтрови)", + "en_LC": "англиÑки (Света Луција)", + "en_LR": "англиÑки (Либерија)", + "en_LS": "англиÑки (ЛеÑото)", + "en_MG": "англиÑки (МадагаÑкар)", + "en_MH": "англиÑки (МаршалÑки ОÑтрови)", + "en_MO": "англиÑки (Макао СÐР)", + "en_MP": "англиÑки (Северни МаријанÑки ОÑтрови)", + "en_MS": "англиÑки (МонÑерат)", + "en_MT": "англиÑки (Малта)", + "en_MU": "англиÑки (МаврициуÑ)", + "en_MW": "англиÑки (Малави)", + "en_MY": "англиÑки (Малезија)", + "en_NA": "англиÑки (Ðамибија)", + "en_NF": "англиÑки (Ðорфолшки ОÑтров)", + "en_NG": "англиÑки (Ðигерија)", + "en_NL": "англиÑки (Холандија)", + "en_NR": "англиÑки (Ðауру)", + "en_NU": "англиÑки (Ðиује)", + "en_NZ": "англиÑки (Ðов Зеланд)", + "en_PG": "англиÑки (Папуа Ðова Гвинеја)", + "en_PH": "англиÑки (Филипини)", + "en_PK": "англиÑки (ПакиÑтан)", + "en_PN": "англиÑки (ПиткернÑки ОÑтрови)", + "en_PR": "англиÑки (Порторико)", + "en_PW": "англиÑки (Палау)", + "en_RW": "англиÑки (Руанда)", + "en_SB": "англиÑки (СоломонÑки ОÑтрови)", + "en_SC": "англиÑки (Сејшели)", + "en_SD": "англиÑки (Судан)", + "en_SE": "англиÑки (ШведÑка)", + "en_SG": "англиÑки (Сингапур)", + "en_SH": "англиÑки (Света Елена)", + "en_SI": "англиÑки (Словенија)", + "en_SL": "англиÑки (Сиера Леоне)", + "en_SS": "англиÑки (Јужен Судан)", + "en_SX": "англиÑки (Свети Мартин)", + "en_SZ": "англиÑки (Свазиленд)", + "en_TC": "англиÑки (ОÑтрови Ð¢ÑƒÑ€ÐºÑ Ð¸ КаикоÑ)", + "en_TK": "англиÑки (Токелау)", + "en_TO": "англиÑки (Тонга)", + "en_TT": "англиÑки (Тринидад и Тобаго)", + "en_TV": "англиÑки (Тувалу)", + "en_TZ": "англиÑки (Танзанија)", + "en_UG": "англиÑки (Уганда)", + "en_UM": "англиÑки (ÐмериканÑки територии во Пацификот)", + "en_US": "англиÑки (Соединети ÐмериканÑки Држави)", + "en_VC": "англиÑки (Свети ВинÑент и Гренадините)", + "en_VG": "англиÑки (БританÑки ДевÑтвени ОÑтрови)", + "en_VI": "англиÑки (ÐмериканÑки ДевÑтвени ОÑтрови)", + "en_VU": "англиÑки (Вануату)", + "en_WS": "англиÑки (Самоа)", + "en_ZA": "англиÑки (ЈужноафриканÑка Република)", + "en_ZM": "англиÑки (Замбија)", + "en_ZW": "англиÑки (Зимбабве)", + "eo": "еÑперанто", + "es": "шпанÑки", + "es_AR": "шпанÑки (Ðргентина)", + "es_BO": "шпанÑки (Боливија)", + "es_BR": "шпанÑки (Бразил)", + "es_CL": "шпанÑки (Чиле)", + "es_CO": "шпанÑки (Колумбија)", + "es_CR": "шпанÑки (КоÑтарика)", + "es_CU": "шпанÑки (Куба)", + "es_DO": "шпанÑки (ДоминиканÑка Република)", + "es_EA": "шпанÑки (Сеута и Мелиља)", + "es_EC": "шпанÑки (Еквадор)", + "es_ES": "шпанÑки (Шпанија)", + "es_GQ": "шпанÑки (ЕкваторÑка Гвинеја)", + "es_GT": "шпанÑки (Гватемала)", + "es_HN": "шпанÑки (ХондураÑ)", + "es_IC": "шпанÑки (КанарÑки ОÑтрови)", + "es_MX": "шпанÑки (МекÑико)", + "es_NI": "шпанÑки (Ðикарагва)", + "es_PA": "шпанÑки (Панама)", + "es_PE": "шпанÑки (Перу)", + "es_PH": "шпанÑки (Филипини)", + "es_PR": "шпанÑки (Порторико)", + "es_PY": "шпанÑки (Парагвај)", + "es_SV": "шпанÑки (Ел Салвадор)", + "es_US": "шпанÑки (Соединети ÐмериканÑки Држави)", + "es_UY": "шпанÑки (Уругвај)", + "es_VE": "шпанÑки (Венецуела)", + "et": "еÑтонÑки", + "et_EE": "еÑтонÑки (ЕÑтонија)", + "eu": "баÑкиÑки", + "eu_ES": "баÑкиÑки (Шпанија)", + "fa": "перÑиÑки", + "fa_AF": "перÑиÑки (ÐвганиÑтан)", + "fa_IR": "перÑиÑки (Иран)", + "ff": "фула", + "ff_CM": "фула (Камерун)", + "ff_GN": "фула (Гвинеја)", + "ff_MR": "фула (Мавританија)", + "ff_SN": "фула (Сенегал)", + "fi": "финÑки", + "fi_FI": "финÑки (ФинÑка)", + "fo": "фарÑки", + "fo_DK": "фарÑки (ДанÑка)", + "fo_FO": "фарÑки (ФарÑки ОÑтрови)", + "fr": "француÑки", + "fr_BE": "француÑки (Белгија)", + "fr_BF": "француÑки (Буркина ФаÑо)", + "fr_BI": "француÑки (Бурунди)", + "fr_BJ": "француÑки (Бенин)", + "fr_BL": "француÑки (Свети Вартоломеј)", + "fr_CA": "француÑки (Канада)", + "fr_CD": "француÑки (Конго - КиншаÑа)", + "fr_CF": "француÑки (ЦентралноафриканÑка Република)", + "fr_CG": "француÑки (Конго - Бразавил)", + "fr_CH": "француÑки (Швајцарија)", + "fr_CI": "француÑки (Брегот на Слоновата КоÑка)", + "fr_CM": "француÑки (Камерун)", + "fr_DJ": "француÑки (Ðибути)", + "fr_DZ": "француÑки (Ðлжир)", + "fr_FR": "француÑки (Франција)", + "fr_GA": "француÑки (Габон)", + "fr_GF": "француÑки (ФранцуÑка Гвајана)", + "fr_GN": "француÑки (Гвинеја)", + "fr_GP": "француÑки (Гвадалупе)", + "fr_GQ": "француÑки (ЕкваторÑка Гвинеја)", + "fr_HT": "француÑки (Хаити)", + "fr_KM": "француÑки (КоморÑки ОÑтрови)", + "fr_LU": "француÑки (ЛукÑембург)", + "fr_MA": "француÑки (Мароко)", + "fr_MC": "француÑки (Монако)", + "fr_MF": "француÑки (Сент Мартин)", + "fr_MG": "француÑки (МадагаÑкар)", + "fr_ML": "француÑки (Мали)", + "fr_MQ": "француÑки (Мартиник)", + "fr_MR": "француÑки (Мавританија)", + "fr_MU": "француÑки (МаврициуÑ)", + "fr_NC": "француÑки (Ðова Каледонија)", + "fr_NE": "француÑки (Ðигер)", + "fr_PF": "француÑки (ФранцуÑка Полинезија)", + "fr_PM": "француÑки (Сент Пјер и Микелан)", + "fr_RE": "француÑки (Реунион)", + "fr_RW": "француÑки (Руанда)", + "fr_SC": "француÑки (Сејшели)", + "fr_SN": "француÑки (Сенегал)", + "fr_SY": "француÑки (Сирија)", + "fr_TD": "француÑки (Чад)", + "fr_TG": "француÑки (Того)", + "fr_TN": "француÑки (ТуниÑ)", + "fr_VU": "француÑки (Вануату)", + "fr_WF": "француÑки (Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна)", + "fr_YT": "француÑки (Мајот)", + "fy": "западнофризиÑки", + "fy_NL": "западнофризиÑки (Холандија)", + "ga": "ирÑки", + "ga_IE": "ирÑки (ИрÑка)", + "gd": "шкотÑки гелÑки", + "gd_GB": "шкотÑки гелÑки (Обединето КралÑтво)", + "gl": "галициÑки", + "gl_ES": "галициÑки (Шпанија)", + "gu": "гуџарати", + "gu_IN": "гуџарати (Индија)", + "gv": "манкÑ", + "gv_IM": "Ð¼Ð°Ð½ÐºÑ (ОÑтров Ман)", + "ha": "хауÑа", + "ha_GH": "хауÑа (Гана)", + "ha_NE": "хауÑа (Ðигер)", + "ha_NG": "хауÑа (Ðигерија)", + "he": "хебрејÑки", + "he_IL": "хебрејÑки (Израел)", + "hi": "хинди", + "hi_IN": "хинди (Индија)", + "hr": "хрватÑки", + "hr_BA": "хрватÑки (БоÑна и Херцеговина)", + "hr_HR": "хрватÑки (ХрватÑка)", + "hu": "унгарÑки", + "hu_HU": "унгарÑки (Унгарија)", + "hy": "ерменÑки", + "hy_AM": "ерменÑки (Ерменија)", + "id": "индонезиÑки", + "id_ID": "индонезиÑки (Индонезија)", + "ig": "игбо", + "ig_NG": "игбо (Ðигерија)", + "ii": "Ñичуан ји", + "ii_CN": "Ñичуан ји (Кина)", + "is": "иÑландÑки", + "is_IS": "иÑландÑки (ИÑланд)", + "it": "италијанÑки", + "it_CH": "италијанÑки (Швајцарија)", + "it_IT": "италијанÑки (Италија)", + "it_SM": "италијанÑки (Сан Марино)", + "ja": "јапонÑки", + "ja_JP": "јапонÑки (Јапонија)", + "ka": "грузиÑки", + "ka_GE": "грузиÑки (Грузија)", + "ki": "кикују", + "ki_KE": "кикују (Кенија)", + "kk": "казашки", + "kk_KZ": "казашки (КазахÑтан)", + "kl": "калалиÑут", + "kl_GL": "калалиÑут (Гренланд)", + "km": "кмерÑки", + "km_KH": "кмерÑки (Камбоџа)", + "kn": "каннада", + "kn_IN": "каннада (Индија)", + "ko": "корејÑки", + "ko_KP": "корејÑки (Северна Кореја)", + "ko_KR": "корејÑки (Јужна Кореја)", + "ks": "кашмирÑки", + "ks_IN": "кашмирÑки (Индија)", + "kw": "корнÑки", + "kw_GB": "корнÑки (Обединето КралÑтво)", + "ky": "киргиÑки", + "ky_KG": "киргиÑки (КиргиÑтан)", + "lb": "лукÑембуршки", + "lb_LU": "лукÑембуршки (ЛукÑембург)", + "lg": "ганда", + "lg_UG": "ганда (Уганда)", + "ln": "лингала", + "ln_AO": "лингала (Ðнгола)", + "ln_CD": "лингала (Конго - КиншаÑа)", + "ln_CF": "лингала (ЦентралноафриканÑка Република)", + "ln_CG": "лингала (Конго - Бразавил)", + "lo": "лаошки", + "lo_LA": "лаошки (ЛаоÑ)", + "lt": "литванÑки", + "lt_LT": "литванÑки (Литванија)", + "lu": "луба-катанга", + "lu_CD": "луба-катанга (Конго - КиншаÑа)", + "lv": "латвиÑки", + "lv_LV": "латвиÑки (Латвија)", + "mg": "малгашки", + "mg_MG": "малгашки (МадагаÑкар)", + "mk": "македонÑки", + "mk_MK": "македонÑки (Македонија)", + "ml": "малајамÑки", + "ml_IN": "малајамÑки (Индија)", + "mn": "монголÑки", + "mn_MN": "монголÑки (Монголија)", + "mr": "марати", + "mr_IN": "марати (Индија)", + "ms": "малајÑки", + "ms_BN": "малајÑки (Брунеј)", + "ms_MY": "малајÑки (Малезија)", + "ms_SG": "малајÑки (Сингапур)", + "mt": "малтешки", + "mt_MT": "малтешки (Малта)", + "my": "бурманÑки", + "my_MM": "бурманÑки (Мјанмар (Бурма))", + "nb": "норвешки букмол", + "nb_NO": "норвешки букмол (Ðорвешка)", + "nb_SJ": "норвешки букмол (Свалбард и Жан Мејен)", + "nd": "Ñеверен ндебеле", + "nd_ZW": "Ñеверен ндебеле (Зимбабве)", + "ne": "непалÑки", + "ne_IN": "непалÑки (Индија)", + "ne_NP": "непалÑки (Ðепал)", + "nl": "холандÑки", + "nl_AW": "холандÑки (Ðруба)", + "nl_BE": "холандÑки (Белгија)", + "nl_BQ": "холандÑки (КарипÑка Холандија)", + "nl_CW": "холандÑки (КураÑао)", + "nl_NL": "холандÑки (Холандија)", + "nl_SR": "холандÑки (Суринам)", + "nl_SX": "холандÑки (Свети Мартин)", + "nn": "норвешки нинорÑк", + "nn_NO": "норвешки нинорÑк (Ðорвешка)", + "no": "норвешки", + "no_NO": "норвешки (Ðорвешка)", + "om": "оромо", + "om_ET": "оромо (Етиопија)", + "om_KE": "оромо (Кенија)", + "or": "одија", + "or_IN": "одија (Индија)", + "os": "оÑетÑки", + "os_GE": "оÑетÑки (Грузија)", + "os_RU": "оÑетÑки (РуÑија)", + "pa": "пенџапÑки", + "pa_Arab": "пенџапÑки (арапÑко пиÑмо)", + "pa_Arab_PK": "пенџапÑки (арапÑко пиÑмо, ПакиÑтан)", + "pa_Guru": "пенџапÑки (гурмуки)", + "pa_Guru_IN": "пенџапÑки (гурмуки, Индија)", + "pa_IN": "пенџапÑки (Индија)", + "pa_PK": "пенџапÑки (ПакиÑтан)", + "pl": "полÑки", + "pl_PL": "полÑки (ПолÑка)", + "ps": "паштунÑки", + "ps_AF": "паштунÑки (ÐвганиÑтан)", + "pt": "португалÑки", + "pt_AO": "португалÑки (Ðнгола)", + "pt_BR": "португалÑки (Бразил)", + "pt_CH": "португалÑки (Швајцарија)", + "pt_CV": "португалÑки (Зелен ’Рт)", + "pt_GQ": "португалÑки (ЕкваторÑка Гвинеја)", + "pt_GW": "португалÑки (Гвинеја-БиÑау)", + "pt_LU": "португалÑки (ЛукÑембург)", + "pt_MO": "португалÑки (Макао СÐР)", + "pt_MZ": "португалÑки (Мозамбик)", + "pt_PT": "португалÑки (Португалија)", + "pt_ST": "португалÑки (Сао Томе и ПринÑипе)", + "pt_TL": "португалÑки (ИÑточен Тимор (Тимор ЛеÑте))", + "qu": "кечуанÑки", + "qu_BO": "кечуанÑки (Боливија)", + "qu_EC": "кечуанÑки (Еквадор)", + "qu_PE": "кечуанÑки (Перу)", + "rm": "ретороманÑки", + "rm_CH": "ретороманÑки (Швајцарија)", + "rn": "рунди", + "rn_BI": "рунди (Бурунди)", + "ro": "романÑки", + "ro_MD": "романÑки (Молдавија)", + "ro_RO": "романÑки (Романија)", + "ru": "руÑки", + "ru_BY": "руÑки (БелоруÑија)", + "ru_KG": "руÑки (КиргиÑтан)", + "ru_KZ": "руÑки (КазахÑтан)", + "ru_MD": "руÑки (Молдавија)", + "ru_RU": "руÑки (РуÑија)", + "ru_UA": "руÑки (Украина)", + "rw": "руандÑки", + "rw_RW": "руандÑки (Руанда)", + "se": "Ñеверен Ñами", + "se_FI": "Ñеверен Ñами (ФинÑка)", + "se_NO": "Ñеверен Ñами (Ðорвешка)", + "se_SE": "Ñеверен Ñами (ШведÑка)", + "sg": "Ñанго", + "sg_CF": "Ñанго (ЦентралноафриканÑка Република)", + "sh": "ÑрпÑкохрватÑки", + "sh_BA": "ÑрпÑкохрватÑки (БоÑна и Херцеговина)", + "si": "ÑинхалÑки", + "si_LK": "ÑинхалÑки (Шри Ланка)", + "sk": "Ñловачки", + "sk_SK": "Ñловачки (Словачка)", + "sl": "Ñловенечки", + "sl_SI": "Ñловенечки (Словенија)", + "sn": "шона", + "sn_ZW": "шона (Зимбабве)", + "so": "ÑомалиÑки", + "so_DJ": "ÑомалиÑки (Ðибути)", + "so_ET": "ÑомалиÑки (Етиопија)", + "so_KE": "ÑомалиÑки (Кенија)", + "so_SO": "ÑомалиÑки (Сомалија)", + "sq": "албанÑки", + "sq_AL": "албанÑки (Ðлбанија)", + "sq_MK": "албанÑки (Македонија)", + "sq_XK": "албанÑки (КоÑово)", + "sr": "ÑрпÑки", + "sr_BA": "ÑрпÑки (БоÑна и Херцеговина)", + "sr_Cyrl": "ÑрпÑки (кирилÑко пиÑмо)", + "sr_Cyrl_BA": "ÑрпÑки (кирилÑко пиÑмо, БоÑна и Херцеговина)", + "sr_Cyrl_ME": "ÑрпÑки (кирилÑко пиÑмо, Црна Гора)", + "sr_Cyrl_RS": "ÑрпÑки (кирилÑко пиÑмо, Србија)", + "sr_Cyrl_XK": "ÑрпÑки (кирилÑко пиÑмо, КоÑово)", + "sr_Latn": "ÑрпÑки (латинично пиÑмо)", + "sr_Latn_BA": "ÑрпÑки (латинично пиÑмо, БоÑна и Херцеговина)", + "sr_Latn_ME": "ÑрпÑки (латинично пиÑмо, Црна Гора)", + "sr_Latn_RS": "ÑрпÑки (латинично пиÑмо, Србија)", + "sr_Latn_XK": "ÑрпÑки (латинично пиÑмо, КоÑово)", + "sr_ME": "ÑрпÑки (Црна Гора)", + "sr_RS": "ÑрпÑки (Србија)", + "sr_XK": "ÑрпÑки (КоÑово)", + "sv": "шведÑки", + "sv_AX": "шведÑки (ОландÑки ОÑтрови)", + "sv_FI": "шведÑки (ФинÑка)", + "sv_SE": "шведÑки (ШведÑка)", + "sw": "Ñвахили", + "sw_CD": "Ñвахили (Конго - КиншаÑа)", + "sw_KE": "Ñвахили (Кенија)", + "sw_TZ": "Ñвахили (Танзанија)", + "sw_UG": "Ñвахили (Уганда)", + "ta": "тамилÑки", + "ta_IN": "тамилÑки (Индија)", + "ta_LK": "тамилÑки (Шри Ланка)", + "ta_MY": "тамилÑки (Малезија)", + "ta_SG": "тамилÑки (Сингапур)", + "te": "телугу", + "te_IN": "телугу (Индија)", + "th": "тајландÑки", + "th_TH": "тајландÑки (Тајланд)", + "ti": "тигриња", + "ti_ER": "тигриња (Еритреја)", + "ti_ET": "тигриња (Етиопија)", + "tl": "тагалог", + "tl_PH": "тагалог (Филипини)", + "to": "тонгајÑки", + "to_TO": "тонгајÑки (Тонга)", + "tr": "турÑки", + "tr_CY": "турÑки (Кипар)", + "tr_TR": "турÑки (Турција)", + "ug": "ујгурÑки", + "ug_CN": "ујгурÑки (Кина)", + "uk": "украинÑки", + "uk_UA": "украинÑки (Украина)", + "ur": "урду", + "ur_IN": "урду (Индија)", + "ur_PK": "урду (ПакиÑтан)", + "uz": "узбечки", + "uz_AF": "узбечки (ÐвганиÑтан)", + "uz_Arab": "узбечки (арапÑко пиÑмо)", + "uz_Arab_AF": "узбечки (арапÑко пиÑмо, ÐвганиÑтан)", + "uz_Cyrl": "узбечки (кирилÑко пиÑмо)", + "uz_Cyrl_UZ": "узбечки (кирилÑко пиÑмо, УзбекиÑтан)", + "uz_Latn": "узбечки (латинично пиÑмо)", + "uz_Latn_UZ": "узбечки (латинично пиÑмо, УзбекиÑтан)", + "uz_UZ": "узбечки (УзбекиÑтан)", + "vi": "виетнамÑки", + "vi_VN": "виетнамÑки (Виетнам)", + "yi": "јидиш", + "yo": "јорупÑки", + "yo_BJ": "јорупÑки (Бенин)", + "yo_NG": "јорупÑки (Ðигерија)", + "zh": "кинеÑки", + "zh_CN": "кинеÑки (Кина)", + "zh_HK": "кинеÑки (Хонг Конг С.Ð.Р Кина)", + "zh_Hans": "кинеÑки (поедноÑтавено)", + "zh_Hans_CN": "кинеÑки (поедноÑтавено, Кина)", + "zh_Hans_HK": "кинеÑки (поедноÑтавено, Хонг Конг С.Ð.Р Кина)", + "zh_Hans_MO": "кинеÑки (поедноÑтавено, Макао СÐР)", + "zh_Hans_SG": "кинеÑки (поедноÑтавено, Сингапур)", + "zh_Hant": "кинеÑки (традиционално)", + "zh_Hant_HK": "кинеÑки (традиционално, Хонг Конг С.Ð.Р Кина)", + "zh_Hant_MO": "кинеÑки (традиционално, Макао СÐР)", + "zh_Hant_TW": "кинеÑки (традиционално, Тајван)", + "zh_MO": "кинеÑки (Макао СÐР)", + "zh_SG": "кинеÑки (Сингапур)", + "zh_TW": "кинеÑки (Тајван)", + "zu": "зулу", + "zu_ZA": "зулу (ЈужноафриканÑка Република)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ml.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ml.json new file mode 100644 index 0000000000000000000000000000000000000000..6e4b6520eaff6c6db2ace966711d521ee3400540 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ml.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "ആഫàµà´°à´¿à´•àµà´•ാൻസàµ", + "af_NA": "ആഫàµà´°à´¿à´•àµà´•ാൻസൠ(നമീബിയ)", + "af_ZA": "ആഫàµà´°à´¿à´•àµà´•ാൻസൠ(ദകàµà´·à´¿à´£à´¾à´«àµà´°à´¿à´•àµà´•)", + "ak": "അകാൻ‌", + "ak_GH": "അകാൻ‌ (ഘാന)", + "am": "അംഹാരികàµ", + "am_ET": "അംഹാരികൠ(à´Žà´¤àµà´¯àµ‹à´ªàµà´¯)", + "ar": "അറബികàµ", + "ar_AE": "അറബികൠ(à´¯àµà´£àµˆà´±àµà´±à´¡àµ അറബൠഎമിറൈറàµà´±àµâ€Œà´¸àµ)", + "ar_BH": "അറബികൠ(ബഹàµà´±à´¿àµ»)", + "ar_DJ": "അറബികൠ(ദിജിബൗടàµà´Ÿà´¿)", + "ar_DZ": "അറബികൠ(അൾജീരിയ)", + "ar_EG": "അറബികൠ(ഈജിപàµà´¤àµ)", + "ar_EH": "അറബികൠ(പശàµà´šà´¿à´® സഹാറ)", + "ar_ER": "അറബികൠ(എറിതàµà´°à´¿à´¯)", + "ar_IL": "അറബികൠ(ഇസàµà´°à´¾à´¯àµ‡àµ½)", + "ar_IQ": "അറബികൠ(ഇറാഖàµ)", + "ar_JO": "അറബികൠ(ജോർദàµà´¦à´¾àµ»)", + "ar_KM": "അറബികൠ(കോമൊറോസàµ)", + "ar_KW": "അറബികൠ(à´•àµà´µàµˆà´±àµà´±àµ)", + "ar_LB": "അറബികൠ(ലെബനൻ)", + "ar_LY": "അറബികൠ(ലിബിയ)", + "ar_MA": "അറബികൠ(മൊറോകàµà´•ൊ)", + "ar_MR": "അറബികൠ(മൗറിറàµà´±à´¾à´¨à´¿à´¯)", + "ar_OM": "അറബികൠ(ഒമാൻ)", + "ar_PS": "അറബികൠ(പാലസàµâ€Œà´¤àµ€àµ» à´ªàµà´°à´¦àµ‡à´¶à´™àµà´™àµ¾)", + "ar_QA": "അറബികൠ(à´–à´¤àµà´¤àµ¼)", + "ar_SA": "അറബികൠ(സൗദി അറേബàµà´¯)", + "ar_SD": "അറബികൠ(à´¸àµà´¡à´¾àµ»)", + "ar_SO": "അറബികൠ(സോമാലിയ)", + "ar_SS": "അറബികൠ(ദകàµà´·à´¿à´£ à´¸àµà´¡à´¾àµ»)", + "ar_SY": "അറബികൠ(സിറിയ)", + "ar_TD": "അറബികൠ(ഛാഡàµ)", + "ar_TN": "അറബികൠ(à´Ÿàµà´£àµ€à´·àµà´¯)", + "ar_YE": "അറബികൠ(യെമൻ)", + "as": "ആസàµà´¸à´¾à´®àµ€à´¸àµ", + "as_IN": "ആസàµà´¸à´¾à´®àµ€à´¸àµ (ഇനàµà´¤àµà´¯)", + "az": "അസർബൈജാനി", + "az_AZ": "അസർബൈജാനി (അസർബൈജാൻ)", + "az_Cyrl": "അസർബൈജാനി (സിറിലികàµ)", + "az_Cyrl_AZ": "അസർബൈജാനി (സിറിലികàµ, അസർബൈജാൻ)", + "az_Latn": "അസർബൈജാനി (ലാറàµà´±à´¿àµ»)", + "az_Latn_AZ": "അസർബൈജാനി (ലാറàµà´±à´¿àµ», അസർബൈജാൻ)", + "be": "ബെലാറàµà´·àµà´¯àµ»", + "be_BY": "ബെലാറàµà´·àµà´¯àµ» (ബെലറൂസàµ)", + "bg": "ബൾഗേറിയൻ", + "bg_BG": "ബൾഗേറിയൻ (ബൾഗേറിയ)", + "bm": "ബംബാറ", + "bm_ML": "ബംബാറ (മാലി)", + "bn": "ബംഗാളി", + "bn_BD": "ബംഗാളി (ബംഗàµà´²à´¾à´¦àµ‡à´¶àµ)", + "bn_IN": "ബംഗാളി (ഇനàµà´¤àµà´¯)", + "bo": "ടിബറàµà´±àµ»", + "bo_CN": "ടിബറàµà´±àµ» (ചൈന)", + "bo_IN": "ടിബറàµà´±àµ» (ഇനàµà´¤àµà´¯)", + "br": "à´¬àµà´°àµ†à´Ÿàµà´Ÿàµº", + "br_FR": "à´¬àµà´°àµ†à´Ÿàµà´Ÿàµº (à´«àµà´°à´¾àµ»à´¸àµ)", + "bs": "ബോസàµà´¨à´¿à´¯àµ»", + "bs_BA": "ബോസàµà´¨à´¿à´¯àµ» (ബോസàµà´¨à´¿à´¯à´¯àµà´‚ ഹെർസഗോവിനയàµà´‚)", + "bs_Cyrl": "ബോസàµà´¨à´¿à´¯àµ» (സിറിലികàµ)", + "bs_Cyrl_BA": "ബോസàµà´¨à´¿à´¯àµ» (സിറിലികàµ, ബോസàµà´¨à´¿à´¯à´¯àµà´‚ ഹെർസഗോവിനയàµà´‚)", + "bs_Latn": "ബോസàµà´¨à´¿à´¯àµ» (ലാറàµà´±à´¿àµ»)", + "bs_Latn_BA": "ബോസàµà´¨à´¿à´¯àµ» (ലാറàµà´±à´¿àµ», ബോസàµà´¨à´¿à´¯à´¯àµà´‚ ഹെർസഗോവിനയàµà´‚)", + "ca": "à´•à´±àµà´±à´¾à´²à´¾àµ»", + "ca_AD": "à´•à´±àµà´±à´¾à´²à´¾àµ» (à´…à´¨àµà´±àµ‹à´±)", + "ca_ES": "à´•à´±àµà´±à´¾à´²à´¾àµ» (à´¸àµâ€Œà´ªàµ†à´¯à´¿àµ»)", + "ca_FR": "à´•à´±àµà´±à´¾à´²à´¾àµ» (à´«àµà´°à´¾àµ»à´¸àµ)", + "ca_IT": "à´•à´±àµà´±à´¾à´²à´¾àµ» (ഇറàµà´±à´²à´¿)", + "ce": "ചെചൻ", + "ce_RU": "ചെചൻ (റഷàµà´¯)", + "cs": "ചെകàµà´•àµ", + "cs_CZ": "ചെകàµà´•ൠ(ചെകàµà´•ൠറിപàµà´ªà´¬àµà´²à´¿à´•àµ)", + "cy": "വെൽഷàµ", + "cy_GB": "വെൽഷൠ(à´¯àµà´£àµˆà´±àµà´±à´¡àµ à´•à´¿à´‚à´—àµà´¡à´‚)", + "da": "ഡാനിഷàµ", + "da_DK": "ഡാനിഷൠ(ഡെൻമാർകàµà´•àµ)", + "da_GL": "ഡാനിഷൠ(à´—àµà´°àµ€àµ»à´²à´¾àµ»à´±àµ)", + "de": "ജർമàµà´®àµ»", + "de_AT": "ജർമàµà´®àµ» (à´“à´¸àµà´Ÿàµà´°à´¿à´¯)", + "de_BE": "ജർമàµà´®àµ» (ബെൽജിയം)", + "de_CH": "ജർമàµà´®àµ» (à´¸àµà´µà´¿à´±àµà´±àµà´¸àµ¼à´²à´¾àµ»à´¡àµ)", + "de_DE": "ജർമàµà´®àµ» (ജർമനി)", + "de_IT": "ജർമàµà´®àµ» (ഇറàµà´±à´²à´¿)", + "de_LI": "ജർമàµà´®àµ» (ലിചàµà´šàµºà´¸àµà´±àµà´±àµˆàµ»)", + "de_LU": "ജർമàµà´®àµ» (ലകàµà´¸à´‚ബർഗàµ)", + "dz": "സോങàµà´•", + "dz_BT": "സോങàµà´• (ഭൂടàµà´Ÿà´¾àµ»)", + "ee": "യൂവàµ", + "ee_GH": "യൂവൠ(ഘാന)", + "ee_TG": "യൂവൠ(ടോഗോ)", + "el": "à´—àµà´°àµ€à´•àµà´•àµ", + "el_CY": "à´—àµà´°àµ€à´•àµà´•ൠ(സൈപàµà´°à´¸àµ)", + "el_GR": "à´—àµà´°àµ€à´•àµà´•ൠ(à´—àµà´°àµ€à´¸àµ)", + "en": "ഇംഗàµà´²àµ€à´·àµ", + "en_AG": "ഇംഗàµà´²àµ€à´·àµ (ആൻറിഗàµà´µà´¯àµà´‚ ബർബàµà´¡à´¯àµà´‚)", + "en_AI": "ഇംഗàµà´²àµ€à´·àµ (ആൻഗàµà´µà´¿à´²àµà´²)", + "en_AS": "ഇംഗàµà´²àµ€à´·àµ (അമേരികàµà´•ൻ സമോവ)", + "en_AT": "ഇംഗàµà´²àµ€à´·àµ (à´“à´¸àµà´Ÿàµà´°à´¿à´¯)", + "en_AU": "ഇംഗàµà´²àµ€à´·àµ (à´“à´¸àµâ€Œà´Ÿàµà´°àµ‡à´²à´¿à´¯)", + "en_BB": "ഇംഗàµà´²àµ€à´·àµ (ബാർബഡോസàµ)", + "en_BE": "ഇംഗàµà´²àµ€à´·àµ (ബെൽജിയം)", + "en_BI": "ഇംഗàµà´²àµ€à´·àµ (ബറàµà´£àµà´Ÿà´¿)", + "en_BM": "ഇംഗàµà´²àµ€à´·àµ (ബർമàµà´¡)", + "en_BS": "ഇംഗàµà´²àµ€à´·àµ (ബഹാമാസàµ)", + "en_BW": "ഇംഗàµà´²àµ€à´·àµ (ബോടàµà´¸àµà´µà´¾à´¨)", + "en_BZ": "ഇംഗàµà´²àµ€à´·àµ (ബെലീസàµ)", + "en_CA": "ഇംഗàµà´²àµ€à´·àµ (കാനഡ)", + "en_CC": "ഇംഗàµà´²àµ€à´·àµ (കോകàµà´•സൠ(കീലിംഗàµ) à´¦àµà´µàµ€à´ªàµà´•ൾ)", + "en_CH": "ഇംഗàµà´²àµ€à´·àµ (à´¸àµà´µà´¿à´±àµà´±àµà´¸àµ¼à´²à´¾àµ»à´¡àµ)", + "en_CK": "ഇംഗàµà´²àµ€à´·àµ (à´•àµà´•àµà´•ൠദàµà´µàµ€à´ªàµà´•ൾ)", + "en_CM": "ഇംഗàµà´²àµ€à´·àµ (കാമറൂൺ)", + "en_CX": "ഇംഗàµà´²àµ€à´·àµ (à´•àµà´°à´¿à´¸àµà´®à´¸àµ à´¦àµà´µàµ€à´ªàµ)", + "en_CY": "ഇംഗàµà´²àµ€à´·àµ (സൈപàµà´°à´¸àµ)", + "en_DE": "ഇംഗàµà´²àµ€à´·àµ (ജർമനി)", + "en_DG": "ഇംഗàµà´²àµ€à´·àµ (ഡീഗോ à´—àµà´°à´¾à´·àµà´¯)", + "en_DK": "ഇംഗàµà´²àµ€à´·àµ (ഡെൻമാർകàµà´•àµ)", + "en_DM": "ഇംഗàµà´²àµ€à´·àµ (ഡൊമിനികàµà´•)", + "en_ER": "ഇംഗàµà´²àµ€à´·àµ (എറിതàµà´°à´¿à´¯)", + "en_FI": "ഇംഗàµà´²àµ€à´·àµ (ഫിൻലാൻഡàµ)", + "en_FJ": "ഇംഗàµà´²àµ€à´·àµ (ഫിജി)", + "en_FK": "ഇംഗàµà´²àµ€à´·àµ (ഫാകàµà´•àµâ€Œà´²à´¾à´¨àµà´±àµ à´¦àµà´µàµ€à´ªàµà´•ൾ)", + "en_FM": "ഇംഗàµà´²àµ€à´·àµ (മൈകàµà´°àµ‹à´¨àµ‡à´·àµà´¯)", + "en_GB": "ഇംഗàµà´²àµ€à´·àµ (à´¯àµà´£àµˆà´±àµà´±à´¡àµ à´•à´¿à´‚à´—àµà´¡à´‚)", + "en_GD": "ഇംഗàµà´²àµ€à´·àµ (à´—àµà´°à´¨àµ‡à´¡)", + "en_GG": "ഇംഗàµà´²àµ€à´·àµ (ഗേൺസി)", + "en_GH": "ഇംഗàµà´²àµ€à´·àµ (ഘാന)", + "en_GI": "ഇംഗàµà´²àµ€à´·àµ (ജിബàµà´°à´¾àµ¾à´Ÿàµà´Ÿàµ¼)", + "en_GM": "ഇംഗàµà´²àµ€à´·àµ (ഗാംബിയ)", + "en_GU": "ഇംഗàµà´²àµ€à´·àµ (à´—àµà´µà´¾à´‚)", + "en_GY": "ഇംഗàµà´²àµ€à´·àµ (ഗയാന)", + "en_HK": "ഇംഗàµà´²àµ€à´·àµ (ഹോങàµà´•ോങàµà´™àµ (SAR) ചൈന)", + "en_IE": "ഇംഗàµà´²àµ€à´·àµ (അയർലൻഡàµ)", + "en_IL": "ഇംഗàµà´²àµ€à´·àµ (ഇസàµà´°à´¾à´¯àµ‡àµ½)", + "en_IM": "ഇംഗàµà´²àµ€à´·àµ (à´àµ½ ഓഫൠമാൻ)", + "en_IN": "ഇംഗàµà´²àµ€à´·àµ (ഇനàµà´¤àµà´¯)", + "en_IO": "ഇംഗàµà´²àµ€à´·àµ (à´¬àµà´°à´¿à´Ÿàµà´Ÿàµ€à´·àµ ഇനàµà´¤àµà´¯àµ» മഹാസമàµà´¦àµà´° à´ªàµà´°à´¦àµ‡à´¶à´‚)", + "en_JE": "ഇംഗàµà´²àµ€à´·àµ (ജേഴàµà´¸à´¿)", + "en_JM": "ഇംഗàµà´²àµ€à´·àµ (ജമൈകàµà´•)", + "en_KE": "ഇംഗàµà´²àµ€à´·àµ (കെനിയ)", + "en_KI": "ഇംഗàµà´²àµ€à´·àµ (കിരിബാടàµà´Ÿà´¿)", + "en_KN": "ഇംഗàµà´²àµ€à´·àµ (സെനàµà´±àµ à´•à´¿à´±àµà´±àµâ€Œà´¸àµà´‚ നെവിസàµà´‚)", + "en_KY": "ഇംഗàµà´²àµ€à´·àµ (കേമാൻ à´¦àµà´µàµ€à´ªàµà´•ൾ)", + "en_LC": "ഇംഗàµà´²àµ€à´·àµ (സെൻറൠലൂസിയ)", + "en_LR": "ഇംഗàµà´²àµ€à´·àµ (ലൈബീരിയ)", + "en_LS": "ഇംഗàµà´²àµ€à´·àµ (ലെസോതോ)", + "en_MG": "ഇംഗàµà´²àµ€à´·àµ (മഡഗാസàµà´•ർ)", + "en_MH": "ഇംഗàµà´²àµ€à´·àµ (മാർഷൽâ€â€ à´¦àµà´µàµ€à´ªàµà´•ൾ)", + "en_MO": "ഇംഗàµà´²àµ€à´·àµ (മകàµà´•ാവൠ(SAR) ചൈന)", + "en_MP": "ഇംഗàµà´²àµ€à´·àµ (ഉതàµà´¤à´° മറിയാനാ à´¦àµà´µàµ€à´ªàµà´•ൾ)", + "en_MS": "ഇംഗàµà´²àµ€à´·àµ (മൊണàµà´Ÿàµ†à´¸à´°à´¤àµà´¤àµ)", + "en_MT": "ഇംഗàµà´²àµ€à´·àµ (മാൾടàµà´Ÿ)", + "en_MU": "ഇംഗàµà´²àµ€à´·àµ (മൗറീഷàµà´¯à´¸àµ)", + "en_MW": "ഇംഗàµà´²àµ€à´·àµ (മലാവി)", + "en_MY": "ഇംഗàµà´²àµ€à´·àµ (മലേഷàµà´¯)", + "en_NA": "ഇംഗàµà´²àµ€à´·àµ (നമീബിയ)", + "en_NF": "ഇംഗàµà´²àµ€à´·àµ (നോർഫോകൠദàµà´µàµ€à´ªàµ)", + "en_NG": "ഇംഗàµà´²àµ€à´·àµ (നൈജീരിയ)", + "en_NL": "ഇംഗàµà´²àµ€à´·àµ (നെതർലാൻഡàµâ€Œà´¸àµ)", + "en_NR": "ഇംഗàµà´²àµ€à´·àµ (നൗറàµ)", + "en_NU": "ഇംഗàµà´²àµ€à´·àµ (à´¨àµà´¯àµ‚യി)", + "en_NZ": "ഇംഗàµà´²àµ€à´·àµ (à´¨àµà´¯àµ‚സിലാൻറàµ)", + "en_PG": "ഇംഗàµà´²àµ€à´·àµ (പാപàµà´ªàµà´µ à´¨àµà´¯àµ‚ ഗിനിയ)", + "en_PH": "ഇംഗàµà´²àµ€à´·àµ (ഫിലിപàµà´ªàµ€àµ»à´¸àµ)", + "en_PK": "ഇംഗàµà´²àµ€à´·àµ (പാകàµà´•à´¿à´¸àµà´¥à´¾àµ»)", + "en_PN": "ഇംഗàµà´²àµ€à´·àµ (പിറàµà´±àµâ€Œà´•െയàµâ€Œàµ» à´¦àµà´µàµ€à´ªàµà´•ൾ)", + "en_PR": "ഇംഗàµà´²àµ€à´·àµ (à´ªàµà´¯àµ‚ർടàµà´Ÿàµ‹ റികàµà´•ോ)", + "en_PW": "ഇംഗàµà´²àµ€à´·àµ (പലാവàµ)", + "en_RW": "ഇംഗàµà´²àµ€à´·àµ (à´±àµà´µà´¾à´£àµà´Ÿ)", + "en_SB": "ഇംഗàµà´²àµ€à´·àµ (സോളമൻ†ദàµà´µàµ€à´ªàµà´•ൾ)", + "en_SC": "ഇംഗàµà´²àµ€à´·àµ (സീഷെൽസàµ)", + "en_SD": "ഇംഗàµà´²àµ€à´·àµ (à´¸àµà´¡à´¾àµ»)", + "en_SE": "ഇംഗàµà´²àµ€à´·àµ (à´¸àµà´µàµ€à´¡àµ»)", + "en_SG": "ഇംഗàµà´²àµ€à´·àµ (സിംഗപàµà´ªàµàµ¼)", + "en_SH": "ഇംഗàµà´²àµ€à´·àµ (സെൻറൠഹെലീന)", + "en_SI": "ഇംഗàµà´²àµ€à´·àµ (à´¸àµà´²àµ‹à´µàµ‡à´¨à´¿à´¯)", + "en_SL": "ഇംഗàµà´²àµ€à´·àµ (സിയെറ ലിയോൺ)", + "en_SS": "ഇംഗàµà´²àµ€à´·àµ (ദകàµà´·à´¿à´£ à´¸àµà´¡à´¾àµ»)", + "en_SX": "ഇംഗàµà´²àµ€à´·àµ (സിനàµà´±àµ മാർടàµà´Ÿàµ†àµ»)", + "en_SZ": "ഇംഗàµà´²àµ€à´·àµ (à´¸àµà´µà´¾à´¸à´¿à´²à´¾àµ»à´±àµ)", + "en_TC": "ഇംഗàµà´²àµ€à´·àµ (ടർകàµà´•àµâ€Œà´¸àµà´‚ കെയàµâ€Œà´•àµà´•ോ à´¦àµà´µàµ€à´ªàµà´•à´³àµà´‚)", + "en_TK": "ഇംഗàµà´²àµ€à´·àµ (ടോകàµà´•െലൂ)", + "en_TO": "ഇംഗàµà´²àµ€à´·àµ (ടോംഗ)", + "en_TT": "ഇംഗàµà´²àµ€à´·àµ (à´Ÿàµà´°à´¿à´¨à´¿à´¡à´¾à´¡àµà´‚ à´Ÿàµà´¬à´¾à´—ോയàµà´‚)", + "en_TV": "ഇംഗàµà´²àµ€à´·àµ (à´Ÿàµà´µà´¾à´²àµ)", + "en_TZ": "ഇംഗàµà´²àµ€à´·àµ (ടാൻസാനിയ)", + "en_UG": "ഇംഗàµà´²àµ€à´·àµ (ഉഗാണàµà´Ÿ)", + "en_UM": "ഇംഗàµà´²àµ€à´·àµ (à´¯àµ.à´Žà´¸àµ. à´¦àµà´µàµ€à´ªà´¸à´®àµ‚ഹങàµà´™àµ¾)", + "en_US": "ഇംഗàµà´²àµ€à´·àµ (അമേരികàµà´•ൻ à´à´•àµà´¯à´¨à´¾à´Ÿàµà´•ൾ)", + "en_VC": "ഇംഗàµà´²àµ€à´·àµ (സെനàµà´±àµ വിൻസെനàµà´±àµà´‚ à´—àµà´°à´¨àµ†à´¡àµˆàµ»à´¸àµà´‚)", + "en_VG": "ഇംഗàµà´²àµ€à´·àµ (à´¬àµà´°à´¿à´Ÿàµà´Ÿàµ€à´·àµ വെർജിൻ à´¦àµà´µàµ€à´ªàµà´•ൾ)", + "en_VI": "ഇംഗàµà´²àµ€à´·àµ (à´¯àµ.à´Žà´¸àµ. വെർജിൻ à´¦àµà´µàµ€à´ªàµà´•ൾ)", + "en_VU": "ഇംഗàµà´²àµ€à´·àµ (വനàµà´µà´¾à´¤àµ)", + "en_WS": "ഇംഗàµà´²àµ€à´·àµ (സമോവ)", + "en_ZA": "ഇംഗàµà´²àµ€à´·àµ (ദകàµà´·à´¿à´£à´¾à´«àµà´°à´¿à´•àµà´•)", + "en_ZM": "ഇംഗàµà´²àµ€à´·àµ (സാംബിയ)", + "en_ZW": "ഇംഗàµà´²àµ€à´·àµ (സിംബാബàµâ€Œà´µàµ‡)", + "eo": "à´Žà´¸àµâ€Œà´ªà´°à´¾à´¨àµà´±àµ‹", + "es": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ", + "es_AR": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (അർജൻറീന)", + "es_BO": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (ബൊളീവിയ)", + "es_BR": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (à´¬àµà´°à´¸àµ€àµ½)", + "es_CL": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (ചിലി)", + "es_CO": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (കൊളംബിയ)", + "es_CR": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (കോസàµà´±àµà´±à´±à´¿à´•àµà´•)", + "es_CU": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (à´•àµà´¯àµ‚à´¬)", + "es_DO": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (ഡൊമിനികàµà´•ൻ റിപàµà´ªà´¬àµà´²à´¿à´•àµ)", + "es_EA": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (സെയൂതàµà´¤ ആൻഡൠമെലിയ)", + "es_EC": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (ഇകàµà´µà´¡àµ‹àµ¼)", + "es_ES": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (à´¸àµâ€Œà´ªàµ†à´¯à´¿àµ»)", + "es_GQ": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (ഇകàµà´µà´±àµà´±àµ‹à´±à´¿à´¯àµ½ ഗിനിയ)", + "es_GT": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (à´—àµà´µà´¾à´Ÿàµà´Ÿà´¿à´®à´¾à´²)", + "es_HN": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (ഹോണàµà´Ÿàµà´±à´¾à´¸àµ)", + "es_IC": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (കാനറി à´¦àµà´µàµ€à´ªàµà´•ൾ)", + "es_MX": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (മെകàµà´¸à´¿à´•àµà´•ോ)", + "es_NI": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (നികàµà´•രാഗàµà´µ)", + "es_PA": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (പനാമ)", + "es_PE": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (പെറàµ)", + "es_PH": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (ഫിലിപàµà´ªàµ€àµ»à´¸àµ)", + "es_PR": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (à´ªàµà´¯àµ‚ർടàµà´Ÿàµ‹ റികàµà´•ോ)", + "es_PY": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (പരാഗàµà´µàµ‡)", + "es_SV": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (എൽ സാൽവദോർ)", + "es_US": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (അമേരികàµà´•ൻ à´à´•àµà´¯à´¨à´¾à´Ÿàµà´•ൾ)", + "es_UY": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (ഉറàµà´—àµà´µàµ‡)", + "es_VE": "à´¸àµâ€Œà´ªà´¾à´¨à´¿à´·àµ (വെനിസàµà´µàµ‡à´²)", + "et": "à´Žà´¸àµà´±àµà´±àµ‹à´£à´¿à´¯àµ»", + "et_EE": "à´Žà´¸àµà´±àµà´±àµ‹à´£à´¿à´¯àµ» (à´Žà´¸àµà´±àµà´±àµ‹à´£à´¿à´¯â€)", + "eu": "ബാസàµâ€Œà´•àµ", + "eu_ES": "ബാസàµâ€Œà´•ൠ(à´¸àµâ€Œà´ªàµ†à´¯à´¿àµ»)", + "fa": "പേർഷàµà´¯àµ»", + "fa_AF": "പേർഷàµà´¯àµ» (à´…à´«àµâ€Œà´—ാനിസàµà´¥à´¾àµ»)", + "fa_IR": "പേർഷàµà´¯àµ» (ഇറാൻ)", + "ff": "à´«àµà´²", + "ff_CM": "à´«àµà´² (കാമറൂൺ)", + "ff_GN": "à´«àµà´² (ഗിനിയ)", + "ff_MR": "à´«àµà´² (മൗറിറàµà´±à´¾à´¨à´¿à´¯)", + "ff_SN": "à´«àµà´² (സെനഗൽ)", + "fi": "à´«à´¿à´¨àµà´¨à´¿à´·àµ", + "fi_FI": "à´«à´¿à´¨àµà´¨à´¿à´·àµ (ഫിൻലാൻഡàµ)", + "fo": "ഫാറോസàµ", + "fo_DK": "ഫാറോസൠ(ഡെൻമാർകàµà´•àµ)", + "fo_FO": "ഫാറോസൠ(ഫറോ à´¦àµà´µàµ€à´ªàµà´•ൾ)", + "fr": "à´«àµà´°à´žàµà´šàµ", + "fr_BE": "à´«àµà´°à´žàµà´šàµ (ബെൽജിയം)", + "fr_BF": "à´«àµà´°à´žàµà´šàµ (à´¬àµàµ¼à´•àµà´•ിനാ ഫാസോ)", + "fr_BI": "à´«àµà´°à´žàµà´šàµ (ബറàµà´£àµà´Ÿà´¿)", + "fr_BJ": "à´«àµà´°à´žàµà´šàµ (ബെനിൻ)", + "fr_BL": "à´«àµà´°à´žàµà´šàµ (സെനàµà´±àµ ബാർതàµà´¤à´²à´®à´¿)", + "fr_CA": "à´«àµà´°à´žàµà´šàµ (കാനഡ)", + "fr_CD": "à´«àµà´°à´žàµà´šàµ (കോംഗോ - കിൻഷാസ)", + "fr_CF": "à´«àµà´°à´žàµà´šàµ (സെൻടàµà´°àµ½ ആഫàµà´°à´¿à´•àµà´•ൻ റിപàµà´ªà´¬àµà´²à´¿à´•àµ)", + "fr_CG": "à´«àµà´°à´žàµà´šàµ (കോംഗോ - à´¬àµà´°à´¾à´¸à´µà´¿à´²àµà´²à´¿)", + "fr_CH": "à´«àµà´°à´žàµà´šàµ (à´¸àµà´µà´¿à´±àµà´±àµà´¸àµ¼à´²à´¾àµ»à´¡àµ)", + "fr_CI": "à´«àµà´°à´žàµà´šàµ (കോടàµà´Ÿàµ à´¡à´¿ വാർ)", + "fr_CM": "à´«àµà´°à´žàµà´šàµ (കാമറൂൺ)", + "fr_DJ": "à´«àµà´°à´žàµà´šàµ (ദിജിബൗടàµà´Ÿà´¿)", + "fr_DZ": "à´«àµà´°à´žàµà´šàµ (അൾജീരിയ)", + "fr_FR": "à´«àµà´°à´žàµà´šàµ (à´«àµà´°à´¾àµ»à´¸àµ)", + "fr_GA": "à´«àµà´°à´žàµà´šàµ (ഗാബൺ)", + "fr_GF": "à´«àµà´°à´žàµà´šàµ (à´«àµà´°à´žàµà´šàµ ഗയാന)", + "fr_GN": "à´«àµà´°à´žàµà´šàµ (ഗിനിയ)", + "fr_GP": "à´«àµà´°à´žàµà´šàµ (à´—àµà´µà´¾à´¡à´²àµ‚à´ªàµà´ªàµ)", + "fr_GQ": "à´«àµà´°à´žàµà´šàµ (ഇകàµà´µà´±àµà´±àµ‹à´±à´¿à´¯àµ½ ഗിനിയ)", + "fr_HT": "à´«àµà´°à´žàµà´šàµ (ഹെയàµà´¤à´¿)", + "fr_KM": "à´«àµà´°à´žàµà´šàµ (കോമൊറോസàµ)", + "fr_LU": "à´«àµà´°à´žàµà´šàµ (ലകàµà´¸à´‚ബർഗàµ)", + "fr_MA": "à´«àµà´°à´žàµà´šàµ (മൊറോകàµà´•ൊ)", + "fr_MC": "à´«àµà´°à´žàµà´šàµ (മൊണാകàµà´•ോ)", + "fr_MF": "à´«àµà´°à´žàµà´šàµ (സെൻറൠമാർടàµà´Ÿà´¿àµ»)", + "fr_MG": "à´«àµà´°à´žàµà´šàµ (മഡഗാസàµà´•ർ)", + "fr_ML": "à´«àµà´°à´žàµà´šàµ (മാലി)", + "fr_MQ": "à´«àµà´°à´žàµà´šàµ (മാർടàµà´Ÿà´¿à´¨à´¿à´•àµà´•àµ)", + "fr_MR": "à´«àµà´°à´žàµà´šàµ (മൗറിറàµà´±à´¾à´¨à´¿à´¯)", + "fr_MU": "à´«àµà´°à´žàµà´šàµ (മൗറീഷàµà´¯à´¸àµ)", + "fr_NC": "à´«àµà´°à´žàµà´šàµ (à´¨àµà´¯àµ‚ കാലിഡോണിയ)", + "fr_NE": "à´«àµà´°à´žàµà´šàµ (നൈജർ)", + "fr_PF": "à´«àµà´°à´žàµà´šàµ (à´«àµà´°à´žàµà´šàµ പോളിനേഷàµà´¯)", + "fr_PM": "à´«àµà´°à´žàµà´šàµ (സെനàµà´±àµ പിയറിയàµà´‚ മികàµà´•ലണàµà´‚)", + "fr_RE": "à´«àµà´°à´žàµà´šàµ (റീയൂണിയൻ)", + "fr_RW": "à´«àµà´°à´žàµà´šàµ (à´±àµà´µà´¾à´£àµà´Ÿ)", + "fr_SC": "à´«àµà´°à´žàµà´šàµ (സീഷെൽസàµ)", + "fr_SN": "à´«àµà´°à´žàµà´šàµ (സെനഗൽ)", + "fr_SY": "à´«àµà´°à´žàµà´šàµ (സിറിയ)", + "fr_TD": "à´«àµà´°à´žàµà´šàµ (ഛാഡàµ)", + "fr_TG": "à´«àµà´°à´žàµà´šàµ (ടോഗോ)", + "fr_TN": "à´«àµà´°à´žàµà´šàµ (à´Ÿàµà´£àµ€à´·àµà´¯)", + "fr_VU": "à´«àµà´°à´žàµà´šàµ (വനàµà´µà´¾à´¤àµ)", + "fr_WF": "à´«àµà´°à´žàµà´šàµ (വാലിസൠആനàµà´±àµ à´«àµà´¯àµ‚à´šàµà´¯àµà´¨)", + "fr_YT": "à´«àµà´°à´žàµà´šàµ (മയോടàµà´Ÿà´¿)", + "fy": "പശàµà´šà´¿à´® à´«àµà´°à´¿à´·à´¿à´¯àµ»", + "fy_NL": "പശàµà´šà´¿à´® à´«àµà´°à´¿à´·à´¿à´¯àµ» (നെതർലാൻഡàµâ€Œà´¸àµ)", + "ga": "à´à´±à´¿à´·àµ", + "ga_IE": "à´à´±à´¿à´·àµ (അയർലൻഡàµ)", + "gd": "à´¸àµà´•ോടàµà´Ÿà´¿à´·àµ ഗൈലികàµ", + "gd_GB": "à´¸àµà´•ോടàµà´Ÿà´¿à´·àµ ഗൈലികൠ(à´¯àµà´£àµˆà´±àµà´±à´¡àµ à´•à´¿à´‚à´—àµà´¡à´‚)", + "gl": "ഗലീഷàµà´¯àµ»", + "gl_ES": "ഗലീഷàµà´¯àµ» (à´¸àµâ€Œà´ªàµ†à´¯à´¿àµ»)", + "gu": "à´—àµà´œà´±à´¾à´¤àµà´¤à´¿", + "gu_IN": "à´—àµà´œà´±à´¾à´¤àµà´¤à´¿ (ഇനàµà´¤àµà´¯)", + "gv": "മാൻസàµ", + "gv_IM": "മാൻസൠ(à´àµ½ ഓഫൠമാൻ)", + "ha": "ഹൗസ", + "ha_GH": "ഹൗസ (ഘാന)", + "ha_NE": "ഹൗസ (നൈജർ)", + "ha_NG": "ഹൗസ (നൈജീരിയ)", + "he": "ഹീബàµà´°àµ", + "he_IL": "ഹീബàµà´°àµ (ഇസàµà´°à´¾à´¯àµ‡àµ½)", + "hi": "ഹിനàµà´¦à´¿", + "hi_IN": "ഹിനàµà´¦à´¿ (ഇനàµà´¤àµà´¯)", + "hr": "à´•àµà´°àµŠà´¯àµ‡à´·àµà´¯àµ»", + "hr_BA": "à´•àµà´°àµŠà´¯àµ‡à´·àµà´¯àµ» (ബോസàµà´¨à´¿à´¯à´¯àµà´‚ ഹെർസഗോവിനയàµà´‚)", + "hr_HR": "à´•àµà´°àµŠà´¯àµ‡à´·àµà´¯àµ» (à´•àµà´°àµŠà´¯àµ‡à´·àµà´¯)", + "hu": "ഹംഗേറിയൻ", + "hu_HU": "ഹംഗേറിയൻ (ഹംഗറി)", + "hy": "അർമേനിയൻ", + "hy_AM": "അർമേനിയൻ (അർമേനിയ)", + "id": "ഇൻഡോനേഷàµà´¯àµ»", + "id_ID": "ഇൻഡോനേഷàµà´¯àµ» (ഇനàµà´¤àµ‹à´¨àµ‡à´·àµà´¯)", + "ig": "ഇഗàµà´¬àµ‹", + "ig_NG": "ഇഗàµà´¬àµ‹ (നൈജീരിയ)", + "ii": "à´·àµà´µà´¾àµ»à´¯à´¿", + "ii_CN": "à´·àµà´µà´¾àµ»à´¯à´¿ (ചൈന)", + "is": "à´à´¸àµâ€Œà´²à´¾àµ»à´¡à´¿à´•àµ", + "is_IS": "à´à´¸àµâ€Œà´²à´¾àµ»à´¡à´¿à´•ൠ(à´à´¸àµâ€Œà´²à´¾à´¨àµà´±àµ)", + "it": "ഇറàµà´±à´¾à´²à´¿à´¯àµ»", + "it_CH": "ഇറàµà´±à´¾à´²à´¿à´¯àµ» (à´¸àµà´µà´¿à´±àµà´±àµà´¸àµ¼à´²à´¾àµ»à´¡àµ)", + "it_IT": "ഇറàµà´±à´¾à´²à´¿à´¯àµ» (ഇറàµà´±à´²à´¿)", + "it_SM": "ഇറàµà´±à´¾à´²à´¿à´¯àµ» (സാൻ മറിനോ)", + "ja": "ജാപàµà´ªà´¨àµ€à´¸àµ", + "ja_JP": "ജാപàµà´ªà´¨àµ€à´¸àµ (ജപàµà´ªà´¾àµ»)", + "ka": "ജോർജിയൻ", + "ka_GE": "ജോർജിയൻ (ജോർജàµà´œà´¿à´¯)", + "ki": "കികൂയàµ", + "ki_KE": "കികൂയൠ(കെനിയ)", + "kk": "കസാഖàµ", + "kk_KZ": "കസാഖൠ(കസാഖിസàµà´¥à´¾àµ»)", + "kl": "കലാലàµà´²à´¿à´¸à´Ÿàµà´Ÿàµ", + "kl_GL": "കലാലàµà´²à´¿à´¸à´Ÿàµà´Ÿàµ (à´—àµà´°àµ€àµ»à´²à´¾àµ»à´±àµ)", + "km": "ഖമെർ", + "km_KH": "ഖമെർ (കംബോഡിയ)", + "kn": "à´•à´¨àµà´¨à´¡", + "kn_IN": "à´•à´¨àµà´¨à´¡ (ഇനàµà´¤àµà´¯)", + "ko": "കൊറിയൻ", + "ko_KP": "കൊറിയൻ (ഉതàµà´¤à´°à´•ൊറിയ)", + "ko_KR": "കൊറിയൻ (ദകàµà´·à´¿à´£à´•ൊറിയ)", + "ks": "കാശàµâ€Œà´®àµ€à´°à´¿", + "ks_IN": "കാശàµâ€Œà´®àµ€à´°à´¿ (ഇനàµà´¤àµà´¯)", + "kw": "കോർണിഷàµ", + "kw_GB": "കോർണിഷൠ(à´¯àµà´£àµˆà´±àµà´±à´¡àµ à´•à´¿à´‚à´—àµà´¡à´‚)", + "ky": "കിർഗിസàµ", + "ky_KG": "കിർഗിസൠ(കിർഗിസàµà´¥à´¾àµ»)", + "lb": "ലകàµâ€Œà´¸à´‚ബർഗിഷàµ", + "lb_LU": "ലകàµâ€Œà´¸à´‚ബർഗിഷൠ(ലകàµà´¸à´‚ബർഗàµ)", + "lg": "ഗാണàµà´Ÿ", + "lg_UG": "ഗാണàµà´Ÿ (ഉഗാണàµà´Ÿ)", + "ln": "ലിംഗാല", + "ln_AO": "ലിംഗാല (അംഗോള)", + "ln_CD": "ലിംഗാല (കോംഗോ - കിൻഷാസ)", + "ln_CF": "ലിംഗാല (സെൻടàµà´°àµ½ ആഫàµà´°à´¿à´•àµà´•ൻ റിപàµà´ªà´¬àµà´²à´¿à´•àµ)", + "ln_CG": "ലിംഗാല (കോംഗോ - à´¬àµà´°à´¾à´¸à´µà´¿à´²àµà´²à´¿)", + "lo": "ലാവോ", + "lo_LA": "ലാവോ (ലാവോസàµ)", + "lt": "ലിതàµà´µà´¾à´¨à´¿à´¯àµ»", + "lt_LT": "ലിതàµà´µà´¾à´¨à´¿à´¯àµ» (ലിതàµà´µà´¾à´¨à´¿à´¯)", + "lu": "à´²àµà´¬-à´•à´±àµà´±à´‚à´—", + "lu_CD": "à´²àµà´¬-à´•à´±àµà´±à´‚à´— (കോംഗോ - കിൻഷാസ)", + "lv": "ലാറàµà´±àµà´µà´¿à´¯àµ»", + "lv_LV": "ലാറàµà´±àµà´µà´¿à´¯àµ» (ലാറàµà´±àµà´µà´¿à´¯)", + "mg": "മലഗാസി", + "mg_MG": "മലഗാസി (മഡഗാസàµà´•ർ)", + "mk": "മാസിഡോണിയൻ", + "mk_MK": "മാസിഡോണിയൻ (മാസിഡോണിയ)", + "ml": "മലയാളം", + "ml_IN": "മലയാളം (ഇനàµà´¤àµà´¯)", + "mn": "മംഗോളിയൻ", + "mn_MN": "മംഗോളിയൻ (മംഗോളിയ)", + "mr": "മറാതàµà´¤à´¿", + "mr_IN": "മറാതàµà´¤à´¿ (ഇനàµà´¤àµà´¯)", + "ms": "മലെയàµ", + "ms_BN": "മലെയൠ(à´¬àµà´°àµ‚ണൈ)", + "ms_MY": "മലെയൠ(മലേഷàµà´¯)", + "ms_SG": "മലെയൠ(സിംഗപàµà´ªàµàµ¼)", + "mt": "മാൾടàµà´Ÿàµ€à´¸àµ", + "mt_MT": "മാൾടàµà´Ÿàµ€à´¸àµ (മാൾടàµà´Ÿ)", + "my": "ബർമീസàµ", + "my_MM": "ബർമീസൠ(à´®àµà´¯à´¾àµ»à´®à´¾àµ¼ (ബർമàµà´®))", + "nb": "നോർവീജിയൻ à´¬àµà´•àµâ€Œà´®àµ½", + "nb_NO": "നോർവീജിയൻ à´¬àµà´•àµâ€Œà´®àµ½ (നോർവെ)", + "nb_SJ": "നോർവീജിയൻ à´¬àµà´•àµâ€Œà´®àµ½ (à´¸àµà´µà´¾àµ½à´¬à´¾à´¡àµà´‚ ജാൻ മായേനàµà´‚)", + "nd": "നോർതàµà´¤àµ ഡെബിൾ", + "nd_ZW": "നോർതàµà´¤àµ ഡെബിൾ (സിംബാബàµâ€Œà´µàµ‡)", + "ne": "നേപàµà´ªà´¾à´³à´¿", + "ne_IN": "നേപàµà´ªà´¾à´³à´¿ (ഇനàµà´¤àµà´¯)", + "ne_NP": "നേപàµà´ªà´¾à´³à´¿ (നേപàµà´ªà´¾àµ¾)", + "nl": "à´¡à´šàµà´šàµ", + "nl_AW": "à´¡à´šàµà´šàµ (അറൂബ)", + "nl_BE": "à´¡à´šàµà´šàµ (ബെൽജിയം)", + "nl_BQ": "à´¡à´šàµà´šàµ (കരീബിയൻ നെതർലാൻഡàµà´¸àµ)", + "nl_CW": "à´¡à´šàµà´šàµ (à´•àµà´±à´¾à´•ാവോ)", + "nl_NL": "à´¡à´šàµà´šàµ (നെതർലാൻഡàµâ€Œà´¸àµ)", + "nl_SR": "à´¡à´šàµà´šàµ (à´¸àµà´°à´¿à´¨à´¾à´‚)", + "nl_SX": "à´¡à´šàµà´šàµ (സിനàµà´±àµ മാർടàµà´Ÿàµ†àµ»)", + "nn": "നോർവീജിയൻ നൈനോർകàµâ€Œà´¸àµ", + "nn_NO": "നോർവീജിയൻ നൈനോർകàµâ€Œà´¸àµ (നോർവെ)", + "no": "നോർവീജിയൻ", + "no_NO": "നോർവീജിയൻ (നോർവെ)", + "om": "ഒറോമോ", + "om_ET": "ഒറോമോ (à´Žà´¤àµà´¯àµ‹à´ªàµà´¯)", + "om_KE": "ഒറോമോ (കെനിയ)", + "or": "à´’à´¡à´¿à´¯", + "or_IN": "à´’à´¡à´¿à´¯ (ഇനàµà´¤àµà´¯)", + "os": "à´’à´¸àµà´¸àµ†à´±àµà´±à´¿à´•àµ", + "os_GE": "à´’à´¸àµà´¸àµ†à´±àµà´±à´¿à´•ൠ(ജോർജàµà´œà´¿à´¯)", + "os_RU": "à´’à´¸àµà´¸àµ†à´±àµà´±à´¿à´•ൠ(റഷàµà´¯)", + "pa": "പഞàµà´šà´¾à´¬à´¿", + "pa_Arab": "പഞàµà´šà´¾à´¬à´¿ (അറബികàµ)", + "pa_Arab_PK": "പഞàµà´šà´¾à´¬à´¿ (അറബികàµ, പാകàµà´•à´¿à´¸àµà´¥à´¾àµ»)", + "pa_Guru": "പഞàµà´šà´¾à´¬à´¿ (à´—àµà´°àµà´®àµà´–à´¿)", + "pa_Guru_IN": "പഞàµà´šà´¾à´¬à´¿ (à´—àµà´°àµà´®àµà´–à´¿, ഇനàµà´¤àµà´¯)", + "pa_IN": "പഞàµà´šà´¾à´¬à´¿ (ഇനàµà´¤àµà´¯)", + "pa_PK": "പഞàµà´šà´¾à´¬à´¿ (പാകàµà´•à´¿à´¸àµà´¥à´¾àµ»)", + "pl": "പോളിഷàµ", + "pl_PL": "പോളിഷൠ(പോളണàµà´Ÿàµ)", + "ps": "പഷàµâ€Œà´¤àµ‹", + "ps_AF": "പഷàµâ€Œà´¤àµ‹ (à´…à´«àµâ€Œà´—ാനിസàµà´¥à´¾àµ»)", + "pt": "പോർചàµà´šàµà´—ീസàµ", + "pt_AO": "പോർചàµà´šàµà´—ീസൠ(അംഗോള)", + "pt_BR": "പോർചàµà´šàµà´—ീസൠ(à´¬àµà´°à´¸àµ€àµ½)", + "pt_CH": "പോർചàµà´šàµà´—ീസൠ(à´¸àµà´µà´¿à´±àµà´±àµà´¸àµ¼à´²à´¾àµ»à´¡àµ)", + "pt_CV": "പോർചàµà´šàµà´—ീസൠ(കേപàµà´ªàµ വെർദെ)", + "pt_GQ": "പോർചàµà´šàµà´—ീസൠ(ഇകàµà´µà´±àµà´±àµ‹à´±à´¿à´¯àµ½ ഗിനിയ)", + "pt_GW": "പോർചàµà´šàµà´—ീസൠ(ഗിനിയ-ബിസൗ)", + "pt_LU": "പോർചàµà´šàµà´—ീസൠ(ലകàµà´¸à´‚ബർഗàµ)", + "pt_MO": "പോർചàµà´šàµà´—ീസൠ(മകàµà´•ാവൠ(SAR) ചൈന)", + "pt_MZ": "പോർചàµà´šàµà´—ീസൠ(മൊസാംബികàµà´•àµ)", + "pt_PT": "പോർചàµà´šàµà´—ീസൠ(പോർചàµà´šàµà´—ൽ)", + "pt_ST": "പോർചàµà´šàµà´—ീസൠ(സാവോ ടോമàµà´‚ à´ªàµà´°à´¿àµ»à´¸à´¿à´ªàµ†à´¯àµà´‚)", + "pt_TL": "പോർചàµà´šàµà´—ീസൠ(തിമോർ-ലെസàµà´±àµà´±àµ†)", + "qu": "à´•àµà´µàµ†à´šàµà´šàµà´µ", + "qu_BO": "à´•àµà´µàµ†à´šàµà´šàµà´µ (ബൊളീവിയ)", + "qu_EC": "à´•àµà´µàµ†à´šàµà´šàµà´µ (ഇകàµà´µà´¡àµ‹àµ¼)", + "qu_PE": "à´•àµà´µàµ†à´šàµà´šàµà´µ (പെറàµ)", + "rm": "റൊമാഞàµà´šàµ", + "rm_CH": "റൊമാഞàµà´šàµ (à´¸àµà´µà´¿à´±àµà´±àµà´¸àµ¼à´²à´¾àµ»à´¡àµ)", + "rn": "à´±àµà´£àµà´Ÿà´¿", + "rn_BI": "à´±àµà´£àµà´Ÿà´¿ (ബറàµà´£àµà´Ÿà´¿)", + "ro": "റൊമാനിയൻ", + "ro_MD": "റൊമാനിയൻ (മൾഡോവ)", + "ro_RO": "റൊമാനിയൻ (റൊമാനിയ)", + "ru": "റഷàµà´¯àµ»", + "ru_BY": "റഷàµà´¯àµ» (ബെലറൂസàµ)", + "ru_KG": "റഷàµà´¯àµ» (കിർഗിസàµà´¥à´¾àµ»)", + "ru_KZ": "റഷàµà´¯àµ» (കസാഖിസàµà´¥à´¾àµ»)", + "ru_MD": "റഷàµà´¯àµ» (മൾഡോവ)", + "ru_RU": "റഷàµà´¯àµ» (റഷàµà´¯)", + "ru_UA": "റഷàµà´¯àµ» (ഉകàµà´°àµ†à´¯àµâ€Œàµ»)", + "rw": "à´•à´¿à´¨àµà´¯à´¾àµ¼à´µà´¾à´£àµà´Ÿ", + "rw_RW": "à´•à´¿à´¨àµà´¯à´¾àµ¼à´µà´¾à´£àµà´Ÿ (à´±àµà´µà´¾à´£àµà´Ÿ)", + "se": "വടകàµà´•ൻ സമി", + "se_FI": "വടകàµà´•ൻ സമി (ഫിൻലാൻഡàµ)", + "se_NO": "വടകàµà´•ൻ സമി (നോർവെ)", + "se_SE": "വടകàµà´•ൻ സമി (à´¸àµà´µàµ€à´¡àµ»)", + "sg": "സാംഗോ", + "sg_CF": "സാംഗോ (സെൻടàµà´°àµ½ ആഫàµà´°à´¿à´•àµà´•ൻ റിപàµà´ªà´¬àµà´²à´¿à´•àµ)", + "sh": "സെർബോ-à´•àµà´°àµŠà´¯àµ‡à´·àµà´¯àµ»", + "sh_BA": "സെർബോ-à´•àµà´°àµŠà´¯àµ‡à´·àµà´¯àµ» (ബോസàµà´¨à´¿à´¯à´¯àµà´‚ ഹെർസഗോവിനയàµà´‚)", + "si": "സിംഹള", + "si_LK": "സിംഹള (à´¶àµà´°àµ€à´²à´™àµà´•)", + "sk": "à´¸àµà´²àµ‹à´µà´¾à´•àµ", + "sk_SK": "à´¸àµà´²àµ‹à´µà´¾à´•ൠ(à´¸àµà´²àµ‹à´µà´¾à´•àµà´¯)", + "sl": "à´¸àµà´²àµ‹à´µàµ‡à´¨à´¿à´¯àµ»", + "sl_SI": "à´¸àµà´²àµ‹à´µàµ‡à´¨à´¿à´¯àµ» (à´¸àµà´²àµ‹à´µàµ‡à´¨à´¿à´¯)", + "sn": "ഷോണ", + "sn_ZW": "ഷോണ (സിംബാബàµâ€Œà´µàµ‡)", + "so": "സോമാലി", + "so_DJ": "സോമാലി (ദിജിബൗടàµà´Ÿà´¿)", + "so_ET": "സോമാലി (à´Žà´¤àµà´¯àµ‹à´ªàµà´¯)", + "so_KE": "സോമാലി (കെനിയ)", + "so_SO": "സോമാലി (സോമാലിയ)", + "sq": "അൽബേനിയൻ", + "sq_AL": "അൽബേനിയൻ (അൽബേനിയ)", + "sq_MK": "അൽബേനിയൻ (മാസിഡോണിയ)", + "sq_XK": "അൽബേനിയൻ (കൊസോവൊ)", + "sr": "സെർബിയൻ", + "sr_BA": "സെർബിയൻ (ബോസàµà´¨à´¿à´¯à´¯àµà´‚ ഹെർസഗോവിനയàµà´‚)", + "sr_Cyrl": "സെർബിയൻ (സിറിലികàµ)", + "sr_Cyrl_BA": "സെർബിയൻ (സിറിലികàµ, ബോസàµà´¨à´¿à´¯à´¯àµà´‚ ഹെർസഗോവിനയàµà´‚)", + "sr_Cyrl_ME": "സെർബിയൻ (സിറിലികàµ, മോണàµà´Ÿàµ†à´¨àµ†à´—àµà´°àµ‹)", + "sr_Cyrl_RS": "സെർബിയൻ (സിറിലികàµ, സെർബിയ)", + "sr_Cyrl_XK": "സെർബിയൻ (സിറിലികàµ, കൊസോവൊ)", + "sr_Latn": "സെർബിയൻ (ലാറàµà´±à´¿àµ»)", + "sr_Latn_BA": "സെർബിയൻ (ലാറàµà´±à´¿àµ», ബോസàµà´¨à´¿à´¯à´¯àµà´‚ ഹെർസഗോവിനയàµà´‚)", + "sr_Latn_ME": "സെർബിയൻ (ലാറàµà´±à´¿àµ», മോണàµà´Ÿàµ†à´¨àµ†à´—àµà´°àµ‹)", + "sr_Latn_RS": "സെർബിയൻ (ലാറàµà´±à´¿àµ», സെർബിയ)", + "sr_Latn_XK": "സെർബിയൻ (ലാറàµà´±à´¿àµ», കൊസോവൊ)", + "sr_ME": "സെർബിയൻ (മോണàµà´Ÿàµ†à´¨àµ†à´—àµà´°àµ‹)", + "sr_RS": "സെർബിയൻ (സെർബിയ)", + "sr_XK": "സെർബിയൻ (കൊസോവൊ)", + "sv": "à´¸àµà´µàµ€à´¡à´¿à´·àµ", + "sv_AX": "à´¸àµà´µàµ€à´¡à´¿à´·àµ (അലൻഡൠദàµà´µàµ€à´ªàµà´•ൾ)", + "sv_FI": "à´¸àµà´µàµ€à´¡à´¿à´·àµ (ഫിൻലാൻഡàµ)", + "sv_SE": "à´¸àµà´µàµ€à´¡à´¿à´·àµ (à´¸àµà´µàµ€à´¡àµ»)", + "sw": "à´¸àµà´µà´¾à´¹à´¿à´²à´¿", + "sw_CD": "à´¸àµà´µà´¾à´¹à´¿à´²à´¿ (കോംഗോ - കിൻഷാസ)", + "sw_KE": "à´¸àµà´µà´¾à´¹à´¿à´²à´¿ (കെനിയ)", + "sw_TZ": "à´¸àµà´µà´¾à´¹à´¿à´²à´¿ (ടാൻസാനിയ)", + "sw_UG": "à´¸àµà´µà´¾à´¹à´¿à´²à´¿ (ഉഗാണàµà´Ÿ)", + "ta": "തമിഴàµ", + "ta_IN": "തമിഴൠ(ഇനàµà´¤àµà´¯)", + "ta_LK": "തമിഴൠ(à´¶àµà´°àµ€à´²à´™àµà´•)", + "ta_MY": "തമിഴൠ(മലേഷàµà´¯)", + "ta_SG": "തമിഴൠ(സിംഗപàµà´ªàµàµ¼)", + "te": "തെലàµà´™àµà´•àµ", + "te_IN": "തെലàµà´™àµà´•ൠ(ഇനàµà´¤àµà´¯)", + "th": "തായàµ", + "th_TH": "തായൠ(തായàµâ€Œà´²à´¾àµ»à´¡àµ)", + "ti": "ടൈഗàµà´°à´¿à´¨àµà´¯", + "ti_ER": "ടൈഗàµà´°à´¿à´¨àµà´¯ (എറിതàµà´°à´¿à´¯)", + "ti_ET": "ടൈഗàµà´°à´¿à´¨àµà´¯ (à´Žà´¤àµà´¯àµ‹à´ªàµà´¯)", + "tl": "തഗാലോഗàµ", + "tl_PH": "തഗാലോഗൠ(ഫിലിപàµà´ªàµ€àµ»à´¸àµ)", + "to": "ടോംഗൻ", + "to_TO": "ടോംഗൻ (ടോംഗ)", + "tr": "ടർകàµà´•à´¿à´·àµ", + "tr_CY": "ടർകàµà´•ിഷൠ(സൈപàµà´°à´¸àµ)", + "tr_TR": "ടർകàµà´•ിഷൠ(à´¤àµàµ¼à´•àµà´•à´¿)", + "ug": "ഉയàµà´˜àµàµ¼", + "ug_CN": "ഉയàµà´˜àµàµ¼ (ചൈന)", + "uk": "ഉകàµà´°àµ‡à´¨à´¿à´¯àµ»", + "uk_UA": "ഉകàµà´°àµ‡à´¨à´¿à´¯àµ» (ഉകàµà´°àµ†à´¯àµâ€Œàµ»)", + "ur": "ഉറàµà´¦àµ", + "ur_IN": "ഉറàµà´¦àµ (ഇനàµà´¤àµà´¯)", + "ur_PK": "ഉറàµà´¦àµ (പാകàµà´•à´¿à´¸àµà´¥à´¾àµ»)", + "uz": "ഉസàµâ€Œà´¬àµ†à´•àµà´•àµ", + "uz_AF": "ഉസàµâ€Œà´¬àµ†à´•àµà´•ൠ(à´…à´«àµâ€Œà´—ാനിസàµà´¥à´¾àµ»)", + "uz_Arab": "ഉസàµâ€Œà´¬àµ†à´•àµà´•ൠ(അറബികàµ)", + "uz_Arab_AF": "ഉസàµâ€Œà´¬àµ†à´•àµà´•ൠ(അറബികàµ, à´…à´«àµâ€Œà´—ാനിസàµà´¥à´¾àµ»)", + "uz_Cyrl": "ഉസàµâ€Œà´¬àµ†à´•àµà´•ൠ(സിറിലികàµ)", + "uz_Cyrl_UZ": "ഉസàµâ€Œà´¬àµ†à´•àµà´•ൠ(സിറിലികàµ, ഉസàµâ€Œà´¬àµ†à´•àµà´•à´¿à´¸àµà´¥à´¾àµ»)", + "uz_Latn": "ഉസàµâ€Œà´¬àµ†à´•àµà´•ൠ(ലാറàµà´±à´¿àµ»)", + "uz_Latn_UZ": "ഉസàµâ€Œà´¬àµ†à´•àµà´•ൠ(ലാറàµà´±à´¿àµ», ഉസàµâ€Œà´¬àµ†à´•àµà´•à´¿à´¸àµà´¥à´¾àµ»)", + "uz_UZ": "ഉസàµâ€Œà´¬àµ†à´•àµà´•ൠ(ഉസàµâ€Œà´¬àµ†à´•àµà´•à´¿à´¸àµà´¥à´¾àµ»)", + "vi": "വിയറàµà´±àµà´¨à´¾à´®àµ€à´¸àµ", + "vi_VN": "വിയറàµà´±àµà´¨à´¾à´®àµ€à´¸àµ (വിയറàµà´±àµà´¨à´¾à´‚)", + "yi": "യിദàµà´¦à´¿à´·àµ", + "yo": "യൊറൂബാ", + "yo_BJ": "യൊറൂബാ (ബെനിൻ)", + "yo_NG": "യൊറൂബാ (നൈജീരിയ)", + "zh": "ചൈനീസàµ", + "zh_CN": "ചൈനീസൠ(ചൈന)", + "zh_HK": "ചൈനീസൠ(ഹോങàµà´•ോങàµà´™àµ (SAR) ചൈന)", + "zh_Hans": "ചൈനീസൠ(ലളിതവൽകàµà´•à´°à´¿à´šàµà´šà´¤àµ)", + "zh_Hans_CN": "ചൈനീസൠ(ലളിതവൽകàµà´•à´°à´¿à´šàµà´šà´¤àµ, ചൈന)", + "zh_Hans_HK": "ചൈനീസൠ(ലളിതവൽകàµà´•à´°à´¿à´šàµà´šà´¤àµ, ഹോങàµà´•ോങàµà´™àµ (SAR) ചൈന)", + "zh_Hans_MO": "ചൈനീസൠ(ലളിതവൽകàµà´•à´°à´¿à´šàµà´šà´¤àµ, മകàµà´•ാവൠ(SAR) ചൈന)", + "zh_Hans_SG": "ചൈനീസൠ(ലളിതവൽകàµà´•à´°à´¿à´šàµà´šà´¤àµ, സിംഗപàµà´ªàµàµ¼)", + "zh_Hant": "ചൈനീസൠ(പരമàµà´ªà´°à´¾à´—തം)", + "zh_Hant_HK": "ചൈനീസൠ(പരമàµà´ªà´°à´¾à´—തം, ഹോങàµà´•ോങàµà´™àµ (SAR) ചൈന)", + "zh_Hant_MO": "ചൈനീസൠ(പരമàµà´ªà´°à´¾à´—തം, മകàµà´•ാവൠ(SAR) ചൈന)", + "zh_Hant_TW": "ചൈനീസൠ(പരമàµà´ªà´°à´¾à´—തം, തായàµâ€Œà´µà´¾àµ»)", + "zh_MO": "ചൈനീസൠ(മകàµà´•ാവൠ(SAR) ചൈന)", + "zh_SG": "ചൈനീസൠ(സിംഗപàµà´ªàµàµ¼)", + "zh_TW": "ചൈനീസൠ(തായàµâ€Œà´µà´¾àµ»)", + "zu": "à´¸àµà´²àµ", + "zu_ZA": "à´¸àµà´²àµ (ദകàµà´·à´¿à´£à´¾à´«àµà´°à´¿à´•àµà´•)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mn.json new file mode 100644 index 0000000000000000000000000000000000000000..16347aca4472406a337a7a6b691a281101a69a54 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mn.json @@ -0,0 +1,566 @@ +{ + "Names": { + "af": "африк", + "af_NA": "африк (Ðамиби)", + "af_ZA": "африк (Өмнөд Ðфрик тив)", + "ak": "акан", + "ak_GH": "акан (Гана)", + "am": "амхар", + "am_ET": "амхар (Этиоп)", + "ar": "араб", + "ar_AE": "араб (Ðрабын ÐÑгдÑÑн Эмират)", + "ar_BH": "араб (Бахрейн)", + "ar_DJ": "араб (Джибути)", + "ar_DZ": "араб (Ðлжир)", + "ar_EG": "араб (Египет)", + "ar_EH": "араб (Баруун Сахар)", + "ar_ER": "араб (Эритри)", + "ar_IL": "араб (Израиль)", + "ar_IQ": "араб (Ирак)", + "ar_JO": "араб (Йордан)", + "ar_KM": "араб (КомороÑ)", + "ar_KW": "араб (Кувейт)", + "ar_LB": "араб (Ливан)", + "ar_LY": "араб (Ливи)", + "ar_MA": "араб (Марокко)", + "ar_MR": "араб (Мавритани)", + "ar_OM": "араб (Оман)", + "ar_PS": "араб (ПалеÑтины нутаг дÑвÑгÑрүүд)", + "ar_QA": "араб (Катар)", + "ar_SA": "араб (Саудын Ðраб)", + "ar_SD": "араб (Судан)", + "ar_SO": "араб (Сомали)", + "ar_SS": "араб (Өмнөд Судан)", + "ar_SY": "араб (Сири)", + "ar_TD": "араб (Чад)", + "ar_TN": "араб (ТуниÑ)", + "ar_YE": "араб (Йемен)", + "as": "аÑÑам", + "as_IN": "аÑÑам (ЭнÑтхÑг)", + "az": "азербайжан", + "az_AZ": "азербайжан (Ðзербайжан)", + "az_Cyrl": "азербайжан (кирилл)", + "az_Cyrl_AZ": "азербайжан (кирилл, Ðзербайжан)", + "az_Latn": "азербайжан (латин)", + "az_Latn_AZ": "азербайжан (латин, Ðзербайжан)", + "be": "беларуÑÑŒ", + "be_BY": "беларуÑÑŒ (БеларуÑÑŒ)", + "bg": "болгар", + "bg_BG": "болгар (Болгар)", + "bm": "бамбара", + "bm_ML": "бамбара (Мали)", + "bn": "бенгал", + "bn_BD": "бенгал (Бангладеш)", + "bn_IN": "бенгал (ЭнÑтхÑг)", + "bo": "төвд", + "bo_CN": "төвд (Ð¥Ñтад)", + "bo_IN": "төвд (ЭнÑтхÑг)", + "br": "бретон", + "br_FR": "бретон (Франц)", + "bs": "боÑни", + "bs_BA": "боÑни (БоÑни Герцеговин)", + "bs_Cyrl": "боÑни (кирилл)", + "bs_Cyrl_BA": "боÑни (кирилл, БоÑни Герцеговин)", + "bs_Latn": "боÑни (латин)", + "bs_Latn_BA": "боÑни (латин, БоÑни Герцеговин)", + "ca": "каталан", + "ca_AD": "каталан (Ðндорра)", + "ca_ES": "каталан (ИÑпани)", + "ca_FR": "каталан (Франц)", + "ca_IT": "каталан (Итали)", + "ce": "чечень", + "ce_RU": "чечень (ОроÑ)", + "cs": "чех", + "cs_CZ": "чех (Бүгд Ðайрамдах Чех УлÑ)", + "cy": "уÑльÑ", + "cy_GB": "уÑÐ»ÑŒÑ (Их Британи)", + "da": "дани", + "da_DK": "дани (Дани)", + "da_GL": "дани (Гренланд)", + "de": "герман", + "de_AT": "герман (ÐвÑтри)", + "de_BE": "герман (Белги)", + "de_CH": "герман (Швейцари)", + "de_DE": "герман (Герман)", + "de_IT": "герман (Итали)", + "de_LI": "герман (Лихтенштейн)", + "de_LU": "герман (ЛюкÑембург)", + "dz": "жонха", + "dz_BT": "жонха (Бутан)", + "ee": "ÑвÑ", + "ee_GH": "ÑÐ²Ñ (Гана)", + "ee_TG": "ÑÐ²Ñ (Того)", + "el": "грек", + "el_CY": "грек (Кипр)", + "el_GR": "грек (Грек)", + "en": "англи", + "en_AG": "англи (Ðнтигуа ба Барбуда)", + "en_AI": "англи (Ðнгила)", + "en_AS": "англи (Ðмерикийн Самоа)", + "en_AT": "англи (ÐвÑтри)", + "en_AU": "англи (ÐвÑтрали)", + "en_BB": "англи (БарбадоÑ)", + "en_BE": "англи (Белги)", + "en_BI": "англи (Бурунди)", + "en_BM": "англи (Бермуд)", + "en_BS": "англи (Багам)", + "en_BW": "англи (БотÑвана)", + "en_BZ": "англи (Белиз)", + "en_CA": "англи (Канад)", + "en_CC": "англи (ÐšÐ¾ÐºÐ¾Ñ (Кийлинг) арлууд)", + "en_CH": "англи (Швейцари)", + "en_CK": "англи (Күүкийн арлууд)", + "en_CM": "англи (Камерун)", + "en_CX": "англи (Зул Ñарын арал)", + "en_CY": "англи (Кипр)", + "en_DE": "англи (Герман)", + "en_DG": "англи (Диего ГарÑиа)", + "en_DK": "англи (Дани)", + "en_DM": "англи (Доминик)", + "en_ER": "англи (Эритри)", + "en_FI": "англи (Финланд)", + "en_FJ": "англи (Фижи)", + "en_FK": "англи (Фолькландын Ðрлууд)", + "en_FM": "англи (Микронези)", + "en_GB": "англи (Их Британи)", + "en_GD": "англи (Гренада)", + "en_GG": "англи (ГернÑи)", + "en_GH": "англи (Гана)", + "en_GI": "англи (Гибралтар)", + "en_GM": "англи (Гамби)", + "en_GU": "англи (Гуам)", + "en_GY": "англи (Гайана)", + "en_HK": "англи (БÐÐ¥ÐУ-ын ТуÑгай захиргааны Ð±Ò¯Ñ Ð¥Ð¾Ð½Ð³ Конг)", + "en_IE": "англи (Ирланд)", + "en_IL": "англи (Израиль)", + "en_IM": "англи (МÑн Ðрал)", + "en_IN": "англи (ЭнÑтхÑг)", + "en_IO": "англи (Британийн харьÑа ЭнÑтхÑгийн далай дахь нутаг дÑвÑгÑрүүд)", + "en_JE": "англи (ЖерÑи)", + "en_JM": "англи (Ямайк)", + "en_KE": "англи (Кени)", + "en_KI": "англи (Кирибати)", + "en_KN": "англи (Сент-ÐšÐ¸Ñ‚Ñ‚Ñ Ð±Ð° ÐевиÑ)", + "en_KY": "англи (Кайманы Ðрлууд)", + "en_LC": "англи (Сент ЛюÑиа)", + "en_LR": "англи (Либери)", + "en_LS": "англи (ЛеÑото)", + "en_MG": "англи (МадагаÑкар)", + "en_MH": "англи (Маршаллын арлууд)", + "en_MO": "англи (БÐÐ¥ÐУ-ын ТуÑгай захиргааны Ð±Ò¯Ñ ÐœÐ°ÐºÐ°Ð¾)", + "en_MP": "англи (Хойд Марианы арлууд)", + "en_MS": "англи (МонтÑеррат)", + "en_MT": "англи (Мальта)", + "en_MU": "англи (МавритуÑ)", + "en_MW": "англи (Малави)", + "en_MY": "англи (Малайз)", + "en_NA": "англи (Ðамиби)", + "en_NF": "англи (Ðорфолк арлууд)", + "en_NG": "англи (Ðигери)", + "en_NL": "англи (Ðидерланд)", + "en_NR": "англи (Ðауру)", + "en_NU": "англи (ÐиуÑ)", + "en_NZ": "англи (Ð¨Ð¸Ð½Ñ Ð—ÐµÐ»Ð°Ð½Ð´)", + "en_PG": "англи (Папуа Ð¨Ð¸Ð½Ñ Ð“Ð²Ð¸Ð½ÐµÐ¹)", + "en_PH": "англи (Филиппин)", + "en_PK": "англи (ПакиÑтан)", + "en_PN": "англи (ПиткÑрн арлууд)", + "en_PR": "англи (ПуÑрто Рико)", + "en_PW": "англи (Палау)", + "en_RW": "англи (Руанда)", + "en_SB": "англи (Соломоны Ðрлууд)", + "en_SC": "англи (Сейшел)", + "en_SD": "англи (Судан)", + "en_SE": "англи (Швед)", + "en_SG": "англи (Сингапур)", + "en_SH": "англи (Сент Хелена)", + "en_SI": "англи (Словени)", + "en_SL": "англи (Сьерра-Леоне)", + "en_SS": "англи (Өмнөд Судан)", + "en_SX": "англи (Синт Мартен)", + "en_SZ": "англи (Свазиланд)", + "en_TC": "англи (Турк ба КайкоÑын Ðрлууд)", + "en_TK": "англи (Токелау)", + "en_TO": "англи (Тонга)", + "en_TT": "англи (Тринидад Тобаго)", + "en_TV": "англи (Тувалу)", + "en_TZ": "англи (Танзани)", + "en_UG": "англи (Уганда)", + "en_UM": "англи (ÐÐУ-ын тойрÑон арлууд)", + "en_US": "англи (Ðмерикийн ÐÑгдÑÑн УлÑ)", + "en_VC": "англи (СÑнт ВинÑÑнт ба Гренадин)", + "en_VG": "англи (Британийн Виржиний Ðрлууд)", + "en_VI": "англи (ÐÐУ-ын Виржиний Ðрлууд)", + "en_VU": "англи (Вануату)", + "en_WS": "англи (Самоа)", + "en_ZA": "англи (Өмнөд Ðфрик тив)", + "en_ZM": "англи (Замби)", + "en_ZW": "англи (Зимбабве)", + "eo": "ÑÑперанто", + "es": "иÑпани", + "es_AR": "иÑпани (Ðргентин)", + "es_BO": "иÑпани (Боливи)", + "es_BR": "иÑпани (Бразил)", + "es_CL": "иÑпани (Чили)", + "es_CO": "иÑпани (Колумб)", + "es_CR": "иÑпани (КоÑта Рика)", + "es_CU": "иÑпани (Куба)", + "es_DO": "иÑпани (Бүгд Ðайрамдах Доминикан УлÑ)", + "es_EA": "иÑпани (Сеута ба МелильÑ)", + "es_EC": "иÑпани (Эквадор)", + "es_ES": "иÑпани (ИÑпани)", + "es_GQ": "иÑпани (Экваторын Гвиней)", + "es_GT": "иÑпани (Гватемал)", + "es_HN": "иÑпани (ГондураÑ)", + "es_IC": "иÑпани (Канарын арлууд)", + "es_MX": "иÑпани (МекÑик)", + "es_NI": "иÑпани (Ðикарагуа)", + "es_PA": "иÑпани (Панам)", + "es_PE": "иÑпани (Перу)", + "es_PH": "иÑпани (Филиппин)", + "es_PR": "иÑпани (ПуÑрто Рико)", + "es_PY": "иÑпани (Парагвай)", + "es_SV": "иÑпани (Эль Сальвадор)", + "es_US": "иÑпани (Ðмерикийн ÐÑгдÑÑн УлÑ)", + "es_UY": "иÑпани (Уругвай)", + "es_VE": "иÑпани (ВенеÑуÑл)", + "et": "ÑÑтони", + "et_EE": "ÑÑтони (ЭÑтони)", + "eu": "баÑк", + "eu_ES": "баÑк (ИÑпани)", + "fa": "перÑ", + "fa_AF": "Ð¿ÐµÑ€Ñ (ÐфганиÑтан)", + "fa_IR": "Ð¿ÐµÑ€Ñ (Иран)", + "ff": "фула", + "ff_CM": "фула (Камерун)", + "ff_GN": "фула (Гвиней)", + "ff_MR": "фула (Мавритани)", + "ff_SN": "фула (Сенегал)", + "fi": "финлÑнд", + "fi_FI": "финлÑнд (Финланд)", + "fo": "фарер", + "fo_DK": "фарер (Дани)", + "fo_FO": "фарер (Ð¤Ð°Ñ€Ð¾Ñ Ðрлууд)", + "fr": "франц", + "fr_BE": "франц (Белги)", + "fr_BF": "франц (Буркина фаÑо)", + "fr_BI": "франц (Бурунди)", + "fr_BJ": "франц (Бенин)", + "fr_BL": "франц (Сент Бартельми)", + "fr_CA": "франц (Канад)", + "fr_CD": "франц (Конго-КиншаÑа)", + "fr_CF": "франц (Төв Ðфрикийн Бүгд Ðайрамдах УлÑ)", + "fr_CG": "франц (Конго Браззавиль)", + "fr_CH": "франц (Швейцари)", + "fr_CI": "франц (Кот д’Ивуар)", + "fr_CM": "франц (Камерун)", + "fr_DJ": "франц (Джибути)", + "fr_DZ": "франц (Ðлжир)", + "fr_FR": "франц (Франц)", + "fr_GA": "франц (Габон)", + "fr_GF": "франц (Францын Гайана)", + "fr_GN": "франц (Гвиней)", + "fr_GP": "франц (Гваделуп)", + "fr_GQ": "франц (Экваторын Гвиней)", + "fr_HT": "франц (Гаити)", + "fr_KM": "франц (КомороÑ)", + "fr_LU": "франц (ЛюкÑембург)", + "fr_MA": "франц (Марокко)", + "fr_MC": "франц (Монако)", + "fr_MF": "франц (Сент-Мартин)", + "fr_MG": "франц (МадагаÑкар)", + "fr_ML": "франц (Мали)", + "fr_MQ": "франц (Мартиник)", + "fr_MR": "франц (Мавритани)", + "fr_MU": "франц (МавритуÑ)", + "fr_NC": "франц (Ð¨Ð¸Ð½Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸)", + "fr_NE": "франц (Ðигер)", + "fr_PF": "франц (Францын Полинез)", + "fr_PM": "франц (СÑнт Пьер ба Микелон)", + "fr_RE": "франц (Реюньон)", + "fr_RW": "франц (Руанда)", + "fr_SC": "франц (Сейшел)", + "fr_SN": "франц (Сенегал)", + "fr_SY": "франц (Сири)", + "fr_TD": "франц (Чад)", + "fr_TG": "франц (Того)", + "fr_TN": "франц (ТуниÑ)", + "fr_VU": "франц (Вануату)", + "fr_WF": "франц (Ð£Ð¾Ð»Ð»Ð¸Ñ Ð±Ð° Футуна)", + "fr_YT": "франц (Майотте)", + "fy": "баруун фризын", + "fy_NL": "баруун фризын (Ðидерланд)", + "ga": "ирланд", + "ga_IE": "ирланд (Ирланд)", + "gd": "шотланд келт", + "gd_GB": "шотланд келт (Их Британи)", + "gl": "галик", + "gl_ES": "галик (ИÑпани)", + "gu": "гужарати", + "gu_IN": "гужарати (ЭнÑтхÑг)", + "gv": "манкÑ", + "gv_IM": "Ð¼Ð°Ð½ÐºÑ (МÑн Ðрал)", + "ha": "хауÑа", + "ha_GH": "хауÑа (Гана)", + "ha_NE": "хауÑа (Ðигер)", + "ha_NG": "хауÑа (Ðигери)", + "he": "еврей", + "he_IL": "еврей (Израиль)", + "hi": "хинди", + "hi_IN": "хинди (ЭнÑтхÑг)", + "hr": "хорват", + "hr_BA": "хорват (БоÑни Герцеговин)", + "hr_HR": "хорват (Хорват)", + "hu": "унгар", + "hu_HU": "унгар (Унгар)", + "hy": "армен", + "hy_AM": "армен (Ðрмени)", + "id": "индонези", + "id_ID": "индонези (Индонези)", + "ig": "игбо", + "ig_NG": "игбо (Ðигери)", + "ii": "Ñычуань и", + "ii_CN": "Ñычуань и (Ð¥Ñтад)", + "is": "иÑланд", + "is_IS": "иÑланд (ИÑланд)", + "it": "итали", + "it_CH": "итали (Швейцари)", + "it_IT": "итали (Итали)", + "it_SM": "итали (Сан-Марино)", + "ja": "Ñпон", + "ja_JP": "Ñпон (Япон)", + "ka": "гүрж", + "ka_GE": "гүрж (Гүрж)", + "ki": "кикуюү", + "ki_KE": "кикуюү (Кени)", + "kk": "хаÑаг", + "kk_KZ": "хаÑаг (КазахÑтан)", + "kl": "калалиÑут", + "kl_GL": "калалиÑут (Гренланд)", + "km": "камбож", + "km_KH": "камбож (Камбож)", + "kn": "каннада", + "kn_IN": "каннада (ЭнÑтхÑг)", + "ko": "ÑолонгоÑ", + "ko_KP": "ÑÐ¾Ð»Ð¾Ð½Ð³Ð¾Ñ (Хойд СолонгоÑ)", + "ko_KR": "ÑÐ¾Ð»Ð¾Ð½Ð³Ð¾Ñ (Өмнөд СолонгоÑ)", + "ks": "кашмир", + "ks_IN": "кашмир (ЭнÑтхÑг)", + "kw": "корны", + "kw_GB": "корны (Их Британи)", + "ky": "кыргыз", + "ky_KG": "кыргыз (КыргызÑтан)", + "lb": "люкÑембург", + "lb_LU": "люкÑембург (ЛюкÑембург)", + "lg": "ганда", + "lg_UG": "ганда (Уганда)", + "ln": "лингала", + "ln_AO": "лингала (Ðнгол)", + "ln_CD": "лингала (Конго-КиншаÑа)", + "ln_CF": "лингала (Төв Ðфрикийн Бүгд Ðайрамдах УлÑ)", + "ln_CG": "лингала (Конго Браззавиль)", + "lo": "лаоÑ", + "lo_LA": "Ð»Ð°Ð¾Ñ (ЛаоÑ)", + "lt": "литва", + "lt_LT": "литва (Литва)", + "lu": "луба-катанга", + "lu_CD": "луба-катанга (Конго-КиншаÑа)", + "lv": "латви", + "lv_LV": "латви (Латви)", + "mg": "малагаÑи", + "mg_MG": "малагаÑи (МадагаÑкар)", + "mk": "македон", + "mk_MK": "македон (Македон)", + "ml": "малайлам", + "ml_IN": "малайлам (ЭнÑтхÑг)", + "mn": "монгол", + "mn_MN": "монгол (Монгол)", + "mr": "марати", + "mr_IN": "марати (ЭнÑтхÑг)", + "ms": "малай", + "ms_BN": "малай (Бруней)", + "ms_MY": "малай (Малайз)", + "ms_SG": "малай (Сингапур)", + "mt": "малти", + "mt_MT": "малти (Мальта)", + "my": "бирм", + "my_MM": "бирм (МьÑнмар (Бурма))", + "nb": "норвегийн букмол", + "nb_NO": "норвегийн букмол (Ðорвеги)", + "nb_SJ": "норвегийн букмол (Свалбард ба Ян Майен)", + "nd": "хойд ндебеле", + "nd_ZW": "хойд ндебеле (Зимбабве)", + "ne": "балба", + "ne_IN": "балба (ЭнÑтхÑг)", + "ne_NP": "балба (Балба)", + "nl": "голланд", + "nl_AW": "голланд (Ðруба)", + "nl_BE": "голланд (Белги)", + "nl_BQ": "голланд (Карибын Ðидерланд)", + "nl_CW": "голланд (Куракао)", + "nl_NL": "голланд (Ðидерланд)", + "nl_SR": "голланд (Суринам)", + "nl_SX": "голланд (Синт Мартен)", + "nn": "норвегийн нинорÑк", + "nn_NO": "норвегийн нинорÑк (Ðорвеги)", + "no": "норвеги", + "no_NO": "норвеги (Ðорвеги)", + "om": "оромо", + "om_ET": "оромо (Этиоп)", + "om_KE": "оромо (Кени)", + "or": "ориÑ", + "or_IN": "Ð¾Ñ€Ð¸Ñ (ЭнÑтхÑг)", + "os": "оÑÑетийн", + "os_GE": "оÑÑетийн (Гүрж)", + "os_RU": "оÑÑетийн (ОроÑ)", + "pa": "панжаб", + "pa_Arab": "панжаб (араб)", + "pa_Arab_PK": "панжаб (араб, ПакиÑтан)", + "pa_Guru": "панжаб (гурмукхи)", + "pa_Guru_IN": "панжаб (гурмукхи, ЭнÑтхÑг)", + "pa_IN": "панжаб (ЭнÑтхÑг)", + "pa_PK": "панжаб (ПакиÑтан)", + "pl": "польш", + "pl_PL": "польш (Польш)", + "ps": "пашто", + "ps_AF": "пашто (ÐфганиÑтан)", + "pt": "португаль", + "pt_AO": "португаль (Ðнгол)", + "pt_BR": "португаль (Бразил)", + "pt_CH": "португаль (Швейцари)", + "pt_CV": "португаль (Капе Верде)", + "pt_GQ": "португаль (Экваторын Гвиней)", + "pt_GW": "португаль (Гвиней-БиÑау)", + "pt_LU": "португаль (ЛюкÑембург)", + "pt_MO": "португаль (БÐÐ¥ÐУ-ын ТуÑгай захиргааны Ð±Ò¯Ñ ÐœÐ°ÐºÐ°Ð¾)", + "pt_MZ": "португаль (Мозамбик)", + "pt_PT": "португаль (Португаль)", + "pt_ST": "португаль (Сан-Томе ба ПринÑипи)", + "pt_TL": "португаль (Тимор-ЛеÑте)", + "qu": "кечуа", + "qu_BO": "кечуа (Боливи)", + "qu_EC": "кечуа (Эквадор)", + "qu_PE": "кечуа (Перу)", + "rm": "романш", + "rm_CH": "романш (Швейцари)", + "rn": "рунди", + "rn_BI": "рунди (Бурунди)", + "ro": "румын", + "ro_MD": "румын (Молдав)", + "ro_RO": "румын (Румын)", + "ru": "ороÑ", + "ru_BY": "Ð¾Ñ€Ð¾Ñ (БеларуÑÑŒ)", + "ru_KG": "Ð¾Ñ€Ð¾Ñ (КыргызÑтан)", + "ru_KZ": "Ð¾Ñ€Ð¾Ñ (КазахÑтан)", + "ru_MD": "Ð¾Ñ€Ð¾Ñ (Молдав)", + "ru_RU": "Ð¾Ñ€Ð¾Ñ (ОроÑ)", + "ru_UA": "Ð¾Ñ€Ð¾Ñ (Украин)", + "rw": "кинÑрванда", + "rw_RW": "кинÑрванда (Руанда)", + "se": "хойд Ñами", + "se_FI": "хойд Ñами (Финланд)", + "se_NO": "хойд Ñами (Ðорвеги)", + "se_SE": "хойд Ñами (Швед)", + "sg": "Ñанго", + "sg_CF": "Ñанго (Төв Ðфрикийн Бүгд Ðайрамдах УлÑ)", + "sh": "хорватын Ñерб", + "sh_BA": "хорватын Ñерб (БоÑни Герцеговин)", + "si": "Ñинхала", + "si_LK": "Ñинхала (Шри Ланка)", + "sk": "Ñловак", + "sk_SK": "Ñловак (Словак)", + "sl": "Ñловени", + "sl_SI": "Ñловени (Словени)", + "sn": "шона", + "sn_ZW": "шона (Зимбабве)", + "so": "Ñомали", + "so_DJ": "Ñомали (Джибути)", + "so_ET": "Ñомали (Этиоп)", + "so_KE": "Ñомали (Кени)", + "so_SO": "Ñомали (Сомали)", + "sq": "албани", + "sq_AL": "албани (Ðлбани)", + "sq_MK": "албани (Македон)", + "sq_XK": "албани (КоÑово)", + "sr": "Ñерб", + "sr_BA": "Ñерб (БоÑни Герцеговин)", + "sr_Cyrl": "Ñерб (кирилл)", + "sr_Cyrl_BA": "Ñерб (кирилл, БоÑни Герцеговин)", + "sr_Cyrl_ME": "Ñерб (кирилл, Монтенегро)", + "sr_Cyrl_RS": "Ñерб (кирилл, Серби)", + "sr_Cyrl_XK": "Ñерб (кирилл, КоÑово)", + "sr_Latn": "Ñерб (латин)", + "sr_Latn_BA": "Ñерб (латин, БоÑни Герцеговин)", + "sr_Latn_ME": "Ñерб (латин, Монтенегро)", + "sr_Latn_RS": "Ñерб (латин, Серби)", + "sr_Latn_XK": "Ñерб (латин, КоÑово)", + "sr_ME": "Ñерб (Монтенегро)", + "sr_RS": "Ñерб (Серби)", + "sr_XK": "Ñерб (КоÑово)", + "sv": "швед", + "sv_AX": "швед (Ðландын Ðрлууд)", + "sv_FI": "швед (Финланд)", + "sv_SE": "швед (Швед)", + "sw": "Ñвахили", + "sw_CD": "Ñвахили (Конго-КиншаÑа)", + "sw_KE": "Ñвахили (Кени)", + "sw_TZ": "Ñвахили (Танзани)", + "sw_UG": "Ñвахили (Уганда)", + "ta": "тамил", + "ta_IN": "тамил (ЭнÑтхÑг)", + "ta_LK": "тамил (Шри Ланка)", + "ta_MY": "тамил (Малайз)", + "ta_SG": "тамил (Сингапур)", + "te": "Ñ‚Ñлүгү", + "te_IN": "Ñ‚Ñлүгү (ЭнÑтхÑг)", + "th": "тай", + "th_TH": "тай (Тайланд)", + "ti": "тигрина", + "ti_ER": "тигрина (Эритри)", + "ti_ET": "тигрина (Этиоп)", + "to": "тонга", + "to_TO": "тонга (Тонга)", + "tr": "турк", + "tr_CY": "турк (Кипр)", + "tr_TR": "турк (Турк)", + "ug": "уйгар", + "ug_CN": "уйгар (Ð¥Ñтад)", + "uk": "украин", + "uk_UA": "украин (Украин)", + "ur": "урду", + "ur_IN": "урду (ЭнÑтхÑг)", + "ur_PK": "урду (ПакиÑтан)", + "uz": "узбек", + "uz_AF": "узбек (ÐфганиÑтан)", + "uz_Arab": "узбек (араб)", + "uz_Arab_AF": "узбек (араб, ÐфганиÑтан)", + "uz_Cyrl": "узбек (кирилл)", + "uz_Cyrl_UZ": "узбек (кирилл, УзбекиÑтан)", + "uz_Latn": "узбек (латин)", + "uz_Latn_UZ": "узбек (латин, УзбекиÑтан)", + "uz_UZ": "узбек (УзбекиÑтан)", + "vi": "вьетнам", + "vi_VN": "вьетнам (Вьетнам)", + "yi": "иддиш", + "yo": "ёруба", + "yo_BJ": "ёруба (Бенин)", + "yo_NG": "ёруба (Ðигери)", + "zh": "Ñ…Ñтад", + "zh_CN": "Ñ…Ñтад (Ð¥Ñтад)", + "zh_HK": "Ñ…Ñтад (БÐÐ¥ÐУ-ын ТуÑгай захиргааны Ð±Ò¯Ñ Ð¥Ð¾Ð½Ð³ Конг)", + "zh_Hans": "Ñ…Ñтад (Ñ…ÑлбаршуулÑан)", + "zh_Hans_CN": "Ñ…Ñтад (Ñ…ÑлбаршуулÑан, Ð¥Ñтад)", + "zh_Hans_HK": "Ñ…Ñтад (Ñ…ÑлбаршуулÑан, БÐÐ¥ÐУ-ын ТуÑгай захиргааны Ð±Ò¯Ñ Ð¥Ð¾Ð½Ð³ Конг)", + "zh_Hans_MO": "Ñ…Ñтад (Ñ…ÑлбаршуулÑан, БÐÐ¥ÐУ-ын ТуÑгай захиргааны Ð±Ò¯Ñ ÐœÐ°ÐºÐ°Ð¾)", + "zh_Hans_SG": "Ñ…Ñтад (Ñ…ÑлбаршуулÑан, Сингапур)", + "zh_Hant": "Ñ…Ñтад (уламжлалт)", + "zh_Hant_HK": "Ñ…Ñтад (уламжлалт, БÐÐ¥ÐУ-ын ТуÑгай захиргааны Ð±Ò¯Ñ Ð¥Ð¾Ð½Ð³ Конг)", + "zh_Hant_MO": "Ñ…Ñтад (уламжлалт, БÐÐ¥ÐУ-ын ТуÑгай захиргааны Ð±Ò¯Ñ ÐœÐ°ÐºÐ°Ð¾)", + "zh_Hant_TW": "Ñ…Ñтад (уламжлалт, Тайвань)", + "zh_MO": "Ñ…Ñтад (БÐÐ¥ÐУ-ын ТуÑгай захиргааны Ð±Ò¯Ñ ÐœÐ°ÐºÐ°Ð¾)", + "zh_SG": "Ñ…Ñтад (Сингапур)", + "zh_TW": "Ñ…Ñтад (Тайвань)", + "zu": "зулу", + "zu_ZA": "зулу (Өмнөд Ðфрик тив)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mo.json new file mode 100644 index 0000000000000000000000000000000000000000..98a042d4781450bbe552f8af382078cab38e1708 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mo.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "ro_MD" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mr.json new file mode 100644 index 0000000000000000000000000000000000000000..96f54794c525a0e26c62b4d182aefd3d4f202101 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mr.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "अफà¥à¤°à¤¿à¤•ानà¥à¤¸", + "af_NA": "अफà¥à¤°à¤¿à¤•ानà¥à¤¸ (नामिबिया)", + "af_ZA": "अफà¥à¤°à¤¿à¤•ानà¥à¤¸ (दकà¥à¤·à¤¿à¤£ आफà¥à¤°à¤¿à¤•ा)", + "ak": "अकान", + "ak_GH": "अकान (घाना)", + "am": "अमà¥à¤¹à¤¾à¤°à¤¿à¤•", + "am_ET": "अमà¥à¤¹à¤¾à¤°à¤¿à¤• (इथिओपिया)", + "ar": "अरबी", + "ar_AE": "अरबी (संयà¥à¤•à¥à¤¤ अरब अमीरात)", + "ar_BH": "अरबी (बहारीन)", + "ar_DJ": "अरबी (जिबौटी)", + "ar_DZ": "अरबी (अलà¥à¤œà¥€à¤°à¤¿à¤¯à¤¾)", + "ar_EG": "अरबी (इजिपà¥à¤¤)", + "ar_EH": "अरबी (पशà¥à¤šà¤¿à¤® सहारा)", + "ar_ER": "अरबी (à¤à¤°à¤¿à¤Ÿà¥à¤°à¤¿à¤¯à¤¾)", + "ar_IL": "अरबी (इसà¥à¤¤à¥à¤°à¤¾à¤‡à¤²)", + "ar_IQ": "अरबी (इराक)", + "ar_JO": "अरबी (जॉरà¥à¤¡à¤¨)", + "ar_KM": "अरबी (कोमोरोज)", + "ar_KW": "अरबी (कà¥à¤µà¥‡à¤¤)", + "ar_LB": "अरबी (लेबनॉन)", + "ar_LY": "अरबी (लिबिया)", + "ar_MA": "अरबी (मोरोकà¥à¤•ो)", + "ar_MR": "अरबी (मॉरिटानिया)", + "ar_OM": "अरबी (ओमान)", + "ar_PS": "अरबी (पॅलेसà¥à¤Ÿà¤¿à¤¨à¤¿à¤¯à¤¨ पà¥à¤°à¤¦à¥‡à¤¶)", + "ar_QA": "अरबी (कतार)", + "ar_SA": "अरबी (सौदी अरब)", + "ar_SD": "अरबी (सà¥à¤¦à¤¾à¤¨)", + "ar_SO": "अरबी (सोमालिया)", + "ar_SS": "अरबी (दकà¥à¤·à¤¿à¤£ सà¥à¤¦à¤¾à¤¨)", + "ar_SY": "अरबी (सीरिया)", + "ar_TD": "अरबी (चाड)", + "ar_TN": "अरबी (टà¥à¤¯à¥‚निशिया)", + "ar_YE": "अरबी (येमेन)", + "as": "आसामी", + "as_IN": "आसामी (भारत)", + "az": "अà¤à¤°à¤¬à¥ˆà¤œà¤¾à¤¨à¥€", + "az_AZ": "अà¤à¤°à¤¬à¥ˆà¤œà¤¾à¤¨à¥€ (अà¤à¤°à¤¬à¥ˆà¤œà¤¾à¤¨)", + "az_Cyrl": "अà¤à¤°à¤¬à¥ˆà¤œà¤¾à¤¨à¥€ (सीरिलिक)", + "az_Cyrl_AZ": "अà¤à¤°à¤¬à¥ˆà¤œà¤¾à¤¨à¥€ (सीरिलिक, अà¤à¤°à¤¬à¥ˆà¤œà¤¾à¤¨)", + "az_Latn": "अà¤à¤°à¤¬à¥ˆà¤œà¤¾à¤¨à¥€ (लॅटिन)", + "az_Latn_AZ": "अà¤à¤°à¤¬à¥ˆà¤œà¤¾à¤¨à¥€ (लॅटिन, अà¤à¤°à¤¬à¥ˆà¤œà¤¾à¤¨)", + "be": "बेलारà¥à¤¶à¤¿à¤¯à¤¨", + "be_BY": "बेलारà¥à¤¶à¤¿à¤¯à¤¨ (बेलारूस)", + "bg": "बलà¥à¤—ेरियन", + "bg_BG": "बलà¥à¤—ेरियन (बलà¥à¤—ेरिया)", + "bm": "बामà¥à¤¬à¤¾à¤°à¤¾", + "bm_ML": "बामà¥à¤¬à¤¾à¤°à¤¾ (माली)", + "bn": "बंगाली", + "bn_BD": "बंगाली (बांगलादेश)", + "bn_IN": "बंगाली (भारत)", + "bo": "तिबेटी", + "bo_CN": "तिबेटी (चीन)", + "bo_IN": "तिबेटी (भारत)", + "br": "बà¥à¤°à¥‡à¤¤à¥‰à¤¨", + "br_FR": "बà¥à¤°à¥‡à¤¤à¥‰à¤¨ (फà¥à¤°à¤¾à¤¨à¥à¤¸)", + "bs": "बोसà¥à¤¨à¤¿à¤¯à¤¨", + "bs_BA": "बोसà¥à¤¨à¤¿à¤¯à¤¨ (बोसà¥à¤¨à¤¿à¤¯à¤¾ अणि हरà¥à¤œà¥‡à¤—ोविना)", + "bs_Cyrl": "बोसà¥à¤¨à¤¿à¤¯à¤¨ (सीरिलिक)", + "bs_Cyrl_BA": "बोसà¥à¤¨à¤¿à¤¯à¤¨ (सीरिलिक, बोसà¥à¤¨à¤¿à¤¯à¤¾ अणि हरà¥à¤œà¥‡à¤—ोविना)", + "bs_Latn": "बोसà¥à¤¨à¤¿à¤¯à¤¨ (लॅटिन)", + "bs_Latn_BA": "बोसà¥à¤¨à¤¿à¤¯à¤¨ (लॅटिन, बोसà¥à¤¨à¤¿à¤¯à¤¾ अणि हरà¥à¤œà¥‡à¤—ोविना)", + "ca": "कातालान", + "ca_AD": "कातालान (अà¤à¤¡à¥‹à¤°à¤¾)", + "ca_ES": "कातालान (सà¥à¤ªà¥‡à¤¨)", + "ca_FR": "कातालान (फà¥à¤°à¤¾à¤¨à¥à¤¸)", + "ca_IT": "कातालान (इटली)", + "ce": "चेचेन", + "ce_RU": "चेचेन (रशिया)", + "cs": "à¤à¥‡à¤•", + "cs_CZ": "à¤à¥‡à¤• (à¤à¥‡à¤• पà¥à¤°à¤œà¤¾à¤¸à¤¤à¥à¤¤à¤¾à¤•)", + "cy": "वेलà¥à¤¶", + "cy_GB": "वेलà¥à¤¶ (यà¥à¤¨à¤¾à¤¯à¤Ÿà¥‡à¤¡ किंगडम)", + "da": "डॅनिश", + "da_DK": "डॅनिश (डेनà¥à¤®à¤¾à¤°à¥à¤•)", + "da_GL": "डॅनिश (गà¥à¤°à¥€à¤¨à¤²à¤‚ड)", + "de": "जरà¥à¤®à¤¨", + "de_AT": "जरà¥à¤®à¤¨ (ऑसà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾)", + "de_BE": "जरà¥à¤®à¤¨ (बेलà¥à¤œà¤¿à¤¯à¤®)", + "de_CH": "जरà¥à¤®à¤¨ (सà¥à¤µà¤¿à¤¤à¥à¤à¤°à¥à¤²à¤‚ड)", + "de_DE": "जरà¥à¤®à¤¨ (जरà¥à¤®à¤¨à¥€)", + "de_IT": "जरà¥à¤®à¤¨ (इटली)", + "de_LI": "जरà¥à¤®à¤¨ (लिकà¥à¤Ÿà¥‡à¤¨à¤¸à¥à¤Ÿà¤¾à¤‡à¤¨)", + "de_LU": "जरà¥à¤®à¤¨ (लकà¥à¤à¥‡à¤‚बरà¥à¤—)", + "dz": "à¤à¥‹à¤‚गखा", + "dz_BT": "à¤à¥‹à¤‚गखा (भूतान)", + "ee": "à¤à¤µà¥‡", + "ee_GH": "à¤à¤µà¥‡ (घाना)", + "ee_TG": "à¤à¤µà¥‡ (टोगो)", + "el": "गà¥à¤°à¥€à¤•", + "el_CY": "गà¥à¤°à¥€à¤• (सायपà¥à¤°à¤¸)", + "el_GR": "गà¥à¤°à¥€à¤• (गà¥à¤°à¥€à¤¸)", + "en": "इंगà¥à¤°à¤œà¥€", + "en_AG": "इंगà¥à¤°à¤œà¥€ (अà¤à¤Ÿà¤¿à¤—à¥à¤µà¤¾ आणि बरà¥à¤¬à¥à¤¡à¤¾)", + "en_AI": "इंगà¥à¤°à¤œà¥€ (अà¤à¤—à¥à¤µà¤¿à¤²à¤¾)", + "en_AS": "इंगà¥à¤°à¤œà¥€ (अमेरिकन सामोआ)", + "en_AT": "इंगà¥à¤°à¤œà¥€ (ऑसà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾)", + "en_AU": "इंगà¥à¤°à¤œà¥€ (ऑसà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾)", + "en_BB": "इंगà¥à¤°à¤œà¥€ (बारà¥à¤¬à¤¾à¤¡à¥‹à¤¸)", + "en_BE": "इंगà¥à¤°à¤œà¥€ (बेलà¥à¤œà¤¿à¤¯à¤®)", + "en_BI": "इंगà¥à¤°à¤œà¥€ (बà¥à¤°à¥à¤‚डी)", + "en_BM": "इंगà¥à¤°à¤œà¥€ (बरà¥à¤®à¥à¤¡à¤¾)", + "en_BS": "इंगà¥à¤°à¤œà¥€ (बहामाज)", + "en_BW": "इंगà¥à¤°à¤œà¥€ (बोटà¥à¤¸à¤µà¤¾à¤¨à¤¾)", + "en_BZ": "इंगà¥à¤°à¤œà¥€ (बलिà¤)", + "en_CA": "इंगà¥à¤°à¤œà¥€ (कॅनडा)", + "en_CC": "इंगà¥à¤°à¤œà¥€ (कोकोस (कीलिंग) बेटे)", + "en_CH": "इंगà¥à¤°à¤œà¥€ (सà¥à¤µà¤¿à¤¤à¥à¤à¤°à¥à¤²à¤‚ड)", + "en_CK": "इंगà¥à¤°à¤œà¥€ (कà¥à¤• बेटे)", + "en_CM": "इंगà¥à¤°à¤œà¥€ (कॅमेरून)", + "en_CX": "इंगà¥à¤°à¤œà¥€ (खà¥à¤°à¤¿à¤¸à¤®à¤¸ बेट)", + "en_CY": "इंगà¥à¤°à¤œà¥€ (सायपà¥à¤°à¤¸)", + "en_DE": "इंगà¥à¤°à¤œà¥€ (जरà¥à¤®à¤¨à¥€)", + "en_DG": "इंगà¥à¤°à¤œà¥€ (दिà¤à¤—ो गारà¥à¤¸à¤¿à¤¯à¤¾)", + "en_DK": "इंगà¥à¤°à¤œà¥€ (डेनà¥à¤®à¤¾à¤°à¥à¤•)", + "en_DM": "इंगà¥à¤°à¤œà¥€ (डोमिनिका)", + "en_ER": "इंगà¥à¤°à¤œà¥€ (à¤à¤°à¤¿à¤Ÿà¥à¤°à¤¿à¤¯à¤¾)", + "en_FI": "इंगà¥à¤°à¤œà¥€ (फिनलंड)", + "en_FJ": "इंगà¥à¤°à¤œà¥€ (फिजी)", + "en_FK": "इंगà¥à¤°à¤œà¥€ (फॉकलंड बेटे)", + "en_FM": "इंगà¥à¤°à¤œà¥€ (मायकà¥à¤°à¥‹à¤¨à¥‡à¤¶à¤¿à¤¯à¤¾)", + "en_GB": "इंगà¥à¤°à¤œà¥€ (यà¥à¤¨à¤¾à¤¯à¤Ÿà¥‡à¤¡ किंगडम)", + "en_GD": "इंगà¥à¤°à¤œà¥€ (गà¥à¤°à¥‡à¤¨à¥‡à¤¡à¤¾)", + "en_GG": "इंगà¥à¤°à¤œà¥€ (गà¥à¤µà¥‡à¤°à¥à¤¨à¤¸à¥‡)", + "en_GH": "इंगà¥à¤°à¤œà¥€ (घाना)", + "en_GI": "इंगà¥à¤°à¤œà¥€ (जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤°)", + "en_GM": "इंगà¥à¤°à¤œà¥€ (गामà¥à¤¬à¤¿à¤¯à¤¾)", + "en_GU": "इंगà¥à¤°à¤œà¥€ (गà¥à¤†à¤®)", + "en_GY": "इंगà¥à¤°à¤œà¥€ (गयाना)", + "en_HK": "इंगà¥à¤°à¤œà¥€ (हाà¤à¤—काà¤à¤— à¤à¤¸à¤à¤†à¤° चीन)", + "en_IE": "इंगà¥à¤°à¤œà¥€ (आयरà¥à¤²à¤‚ड)", + "en_IL": "इंगà¥à¤°à¤œà¥€ (इसà¥à¤¤à¥à¤°à¤¾à¤‡à¤²)", + "en_IM": "इंगà¥à¤°à¤œà¥€ (आयल ऑफ मॅन)", + "en_IN": "इंगà¥à¤°à¤œà¥€ (भारत)", + "en_IO": "इंगà¥à¤°à¤œà¥€ (बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ हिंदी महासागर कà¥à¤·à¥‡à¤¤à¥à¤°)", + "en_JE": "इंगà¥à¤°à¤œà¥€ (जरà¥à¤¸à¥€)", + "en_JM": "इंगà¥à¤°à¤œà¥€ (जमैका)", + "en_KE": "इंगà¥à¤°à¤œà¥€ (केनिया)", + "en_KI": "इंगà¥à¤°à¤œà¥€ (किरीबाटी)", + "en_KN": "इंगà¥à¤°à¤œà¥€ (सेंट किटà¥à¤¸ आणि नेवà¥à¤¹à¤¿à¤¸)", + "en_KY": "इंगà¥à¤°à¤œà¥€ (केमन बेटे)", + "en_LC": "इंगà¥à¤°à¤œà¥€ (सेंट लà¥à¤¯à¥‚सिया)", + "en_LR": "इंगà¥à¤°à¤œà¥€ (लायबेरिया)", + "en_LS": "इंगà¥à¤°à¤œà¥€ (लेसोथो)", + "en_MG": "इंगà¥à¤°à¤œà¥€ (मादागासà¥à¤•र)", + "en_MH": "इंगà¥à¤°à¤œà¥€ (मारà¥à¤¶à¤² बेटे)", + "en_MO": "इंगà¥à¤°à¤œà¥€ (मकाओ à¤à¤¸à¤à¤†à¤° चीन)", + "en_MP": "इंगà¥à¤°à¤œà¥€ (उतà¥à¤¤à¤°à¥€ मारियाना बेटे)", + "en_MS": "इंगà¥à¤°à¤œà¥€ (मॉनà¥à¤Ÿà¥à¤¸à¥‡à¤°à¤¾à¤Ÿ)", + "en_MT": "इंगà¥à¤°à¤œà¥€ (मालà¥à¤Ÿà¤¾)", + "en_MU": "इंगà¥à¤°à¤œà¥€ (मॉरिशस)", + "en_MW": "इंगà¥à¤°à¤œà¥€ (मलावी)", + "en_MY": "इंगà¥à¤°à¤œà¥€ (मलेशिया)", + "en_NA": "इंगà¥à¤°à¤œà¥€ (नामिबिया)", + "en_NF": "इंगà¥à¤°à¤œà¥€ (नॉरफॉक बेट)", + "en_NG": "इंगà¥à¤°à¤œà¥€ (नायजेरिया)", + "en_NL": "इंगà¥à¤°à¤œà¥€ (नेदरलà¤à¤¡)", + "en_NR": "इंगà¥à¤°à¤œà¥€ (नाउरू)", + "en_NU": "इंगà¥à¤°à¤œà¥€ (नीयू)", + "en_NZ": "इंगà¥à¤°à¤œà¥€ (नà¥à¤¯à¥‚à¤à¥€à¤²à¤‚ड)", + "en_PG": "इंगà¥à¤°à¤œà¥€ (पापà¥à¤† नà¥à¤¯à¥‚ गिनी)", + "en_PH": "इंगà¥à¤°à¤œà¥€ (फिलिपिनà¥à¤¸)", + "en_PK": "इंगà¥à¤°à¤œà¥€ (पाकिसà¥à¤¤à¤¾à¤¨)", + "en_PN": "इंगà¥à¤°à¤œà¥€ (पिटकैरà¥à¤¨ बेटे)", + "en_PR": "इंगà¥à¤°à¤œà¥€ (पà¥à¤¯à¥à¤à¤°à¥à¤¤à¥‹ रिको)", + "en_PW": "इंगà¥à¤°à¤œà¥€ (पलाऊ)", + "en_RW": "इंगà¥à¤°à¤œà¥€ (रवांडा)", + "en_SB": "इंगà¥à¤°à¤œà¥€ (सोलोमन बेटे)", + "en_SC": "इंगà¥à¤°à¤œà¥€ (सेशेलà¥à¤¸)", + "en_SD": "इंगà¥à¤°à¤œà¥€ (सà¥à¤¦à¤¾à¤¨)", + "en_SE": "इंगà¥à¤°à¤œà¥€ (सà¥à¤µà¥€à¤¡à¤¨)", + "en_SG": "इंगà¥à¤°à¤œà¥€ (सिंगापूर)", + "en_SH": "इंगà¥à¤°à¤œà¥€ (सेंट हेलेना)", + "en_SI": "इंगà¥à¤°à¤œà¥€ (सà¥à¤²à¥‹à¤µà¥à¤¹à¥‡à¤¨à¤¿à¤¯à¤¾)", + "en_SL": "इंगà¥à¤°à¤œà¥€ (सिà¤à¤°à¤¾ लिओन)", + "en_SS": "इंगà¥à¤°à¤œà¥€ (दकà¥à¤·à¤¿à¤£ सà¥à¤¦à¤¾à¤¨)", + "en_SX": "इंगà¥à¤°à¤œà¥€ (सिंट मारà¥à¤Ÿà¥‡à¤¨)", + "en_SZ": "इंगà¥à¤°à¤œà¥€ (सà¥à¤µà¤¾à¤à¤¿à¤²à¤à¤¡)", + "en_TC": "इंगà¥à¤°à¤œà¥€ (टरà¥à¤•à¥à¤¸ आणि कैकोस बेटे)", + "en_TK": "इंगà¥à¤°à¤œà¥€ (तोकेलाउ)", + "en_TO": "इंगà¥à¤°à¤œà¥€ (टोंगा)", + "en_TT": "इंगà¥à¤°à¤œà¥€ (तà¥à¤°à¤¿à¤¨à¤¿à¤¦à¤¾à¤¦ आणि टोबॅगो)", + "en_TV": "इंगà¥à¤°à¤œà¥€ (टà¥à¤µà¤¾à¤²à¥)", + "en_TZ": "इंगà¥à¤°à¤œà¥€ (टांà¤à¤¾à¤¨à¤¿à¤¯à¤¾)", + "en_UG": "इंगà¥à¤°à¤œà¥€ (यà¥à¤—ांडा)", + "en_UM": "इंगà¥à¤°à¤œà¥€ (यू.à¤à¤¸. आउटलाइंग बेटे)", + "en_US": "इंगà¥à¤°à¤œà¥€ (यà¥à¤¨à¤¾à¤¯à¤Ÿà¥‡à¤¡ सà¥à¤Ÿà¥‡à¤Ÿà¥à¤¸)", + "en_VC": "इंगà¥à¤°à¤œà¥€ (सेंट वà¥à¤¹à¤¿à¤¨à¥à¤¸à¥‡à¤‚ट आणि गà¥à¤°à¥‡à¤¨à¤¡à¤¾à¤‡à¤¨à¥à¤¸)", + "en_VG": "इंगà¥à¤°à¤œà¥€ (बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ वà¥à¤¹à¤°à¥à¤œà¤¿à¤¨ बेटे)", + "en_VI": "इंगà¥à¤°à¤œà¥€ (यू.à¤à¤¸. वà¥à¤¹à¤°à¥à¤œà¤¿à¤¨ बेटे)", + "en_VU": "इंगà¥à¤°à¤œà¥€ (वानà¥à¤†à¤¤à¥)", + "en_WS": "इंगà¥à¤°à¤œà¥€ (सामोआ)", + "en_ZA": "इंगà¥à¤°à¤œà¥€ (दकà¥à¤·à¤¿à¤£ आफà¥à¤°à¤¿à¤•ा)", + "en_ZM": "इंगà¥à¤°à¤œà¥€ (à¤à¤¾à¤®à¥à¤¬à¤¿à¤¯à¤¾)", + "en_ZW": "इंगà¥à¤°à¤œà¥€ (à¤à¤¿à¤®à¥à¤¬à¤¾à¤¬à¥à¤µà¥‡)", + "eo": "à¤à¤¸à¥à¤ªà¤°à¤¾à¤¨à¥à¤Ÿà¥‹", + "es": "सà¥à¤ªà¥…निश", + "es_AR": "सà¥à¤ªà¥…निश (अरà¥à¤œà¥‡à¤‚टिना)", + "es_BO": "सà¥à¤ªà¥…निश (बोलिवà¥à¤¹à¤¿à¤¯à¤¾)", + "es_BR": "सà¥à¤ªà¥…निश (बà¥à¤°à¤¾à¤à¤¿à¤²)", + "es_CL": "सà¥à¤ªà¥…निश (चिली)", + "es_CO": "सà¥à¤ªà¥…निश (कोलमà¥à¤¬à¤¿à¤¯à¤¾)", + "es_CR": "सà¥à¤ªà¥…निश (कोसà¥à¤Ÿà¤¾ रिका)", + "es_CU": "सà¥à¤ªà¥…निश (कà¥à¤¯à¥‚बा)", + "es_DO": "सà¥à¤ªà¥…निश (डोमिनिकन पà¥à¤°à¤œà¤¾à¤¸à¤¤à¥à¤¤à¤¾à¤•)", + "es_EA": "सà¥à¤ªà¥…निश (सà¥à¤¯à¥‚टा आणि मेलिला)", + "es_EC": "सà¥à¤ªà¥…निश (इकà¥à¤µà¤¾à¤¡à¥‹à¤°)", + "es_ES": "सà¥à¤ªà¥…निश (सà¥à¤ªà¥‡à¤¨)", + "es_GQ": "सà¥à¤ªà¥…निश (इकà¥à¤µà¥‡à¤Ÿà¥‹à¤°à¤¿à¤¯à¤² गिनी)", + "es_GT": "सà¥à¤ªà¥…निश (गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾)", + "es_HN": "सà¥à¤ªà¥…निश (होंडà¥à¤°à¤¾à¤¸)", + "es_IC": "सà¥à¤ªà¥…निश (कॅनरी बेटे)", + "es_MX": "सà¥à¤ªà¥…निश (मेकà¥à¤¸à¤¿à¤•ो)", + "es_NI": "सà¥à¤ªà¥…निश (निकारागà¥à¤µà¤¾)", + "es_PA": "सà¥à¤ªà¥…निश (पनामा)", + "es_PE": "सà¥à¤ªà¥…निश (पेरू)", + "es_PH": "सà¥à¤ªà¥…निश (फिलिपिनà¥à¤¸)", + "es_PR": "सà¥à¤ªà¥…निश (पà¥à¤¯à¥à¤à¤°à¥à¤¤à¥‹ रिको)", + "es_PY": "सà¥à¤ªà¥…निश (परागà¥à¤µà¥‡)", + "es_SV": "सà¥à¤ªà¥…निश (अल सालà¥à¤µà¤¾à¤¡à¥‹à¤°)", + "es_US": "सà¥à¤ªà¥…निश (यà¥à¤¨à¤¾à¤¯à¤Ÿà¥‡à¤¡ सà¥à¤Ÿà¥‡à¤Ÿà¥à¤¸)", + "es_UY": "सà¥à¤ªà¥…निश (उरà¥à¤—à¥à¤µà¥‡)", + "es_VE": "सà¥à¤ªà¥…निश (वà¥à¤¹à¥‡à¤¨à¥‡à¤à¥à¤à¤²à¤¾)", + "et": "इसà¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¨", + "et_EE": "इसà¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¨ (à¤à¤¸à¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾)", + "eu": "बासà¥à¤•", + "eu_ES": "बासà¥à¤• (सà¥à¤ªà¥‡à¤¨)", + "fa": "फारसी", + "fa_AF": "फारसी (अफगाणिसà¥à¤¤à¤¾à¤¨)", + "fa_IR": "फारसी (इराण)", + "ff": "फà¥à¤²à¤¾à¤¹", + "ff_CM": "फà¥à¤²à¤¾à¤¹ (कॅमेरून)", + "ff_GN": "फà¥à¤²à¤¾à¤¹ (गिनी)", + "ff_MR": "फà¥à¤²à¤¾à¤¹ (मॉरिटानिया)", + "ff_SN": "फà¥à¤²à¤¾à¤¹ (सेनेगल)", + "fi": "फिनà¥à¤¨à¤¿à¤¶", + "fi_FI": "फिनà¥à¤¨à¤¿à¤¶ (फिनलंड)", + "fo": "फरोइज", + "fo_DK": "फरोइज (डेनà¥à¤®à¤¾à¤°à¥à¤•)", + "fo_FO": "फरोइज (फेरो बेटे)", + "fr": "फà¥à¤°à¥‡à¤‚च", + "fr_BE": "फà¥à¤°à¥‡à¤‚च (बेलà¥à¤œà¤¿à¤¯à¤®)", + "fr_BF": "फà¥à¤°à¥‡à¤‚च (बà¥à¤°à¥à¤•िना फासो)", + "fr_BI": "फà¥à¤°à¥‡à¤‚च (बà¥à¤°à¥à¤‚डी)", + "fr_BJ": "फà¥à¤°à¥‡à¤‚च (बेनिन)", + "fr_BL": "फà¥à¤°à¥‡à¤‚च (सेंट बारà¥à¤¥à¥‡à¤²à¥‡à¤®à¥€)", + "fr_CA": "फà¥à¤°à¥‡à¤‚च (कॅनडा)", + "fr_CD": "फà¥à¤°à¥‡à¤‚च (काà¤à¤—ो - किंशासा)", + "fr_CF": "फà¥à¤°à¥‡à¤‚च (केंदà¥à¤°à¥€à¤¯ अफà¥à¤°à¤¿à¤•ी पà¥à¤°à¤œà¤¾à¤¸à¤¤à¥à¤¤à¤¾à¤•)", + "fr_CG": "फà¥à¤°à¥‡à¤‚च (काà¤à¤—ो - बà¥à¤°à¤¾à¤à¤¾à¤µà¤¿à¤²à¥‡)", + "fr_CH": "फà¥à¤°à¥‡à¤‚च (सà¥à¤µà¤¿à¤¤à¥à¤à¤°à¥à¤²à¤‚ड)", + "fr_CI": "फà¥à¤°à¥‡à¤‚च (आयवà¥à¤¹à¤°à¥€ कोसà¥à¤Ÿ)", + "fr_CM": "फà¥à¤°à¥‡à¤‚च (कॅमेरून)", + "fr_DJ": "फà¥à¤°à¥‡à¤‚च (जिबौटी)", + "fr_DZ": "फà¥à¤°à¥‡à¤‚च (अलà¥à¤œà¥€à¤°à¤¿à¤¯à¤¾)", + "fr_FR": "फà¥à¤°à¥‡à¤‚च (फà¥à¤°à¤¾à¤¨à¥à¤¸)", + "fr_GA": "फà¥à¤°à¥‡à¤‚च (गॅबॉन)", + "fr_GF": "फà¥à¤°à¥‡à¤‚च (फà¥à¤°à¥‡à¤‚च गयाना)", + "fr_GN": "फà¥à¤°à¥‡à¤‚च (गिनी)", + "fr_GP": "फà¥à¤°à¥‡à¤‚च (गà¥à¤µà¤¾à¤¡à¥‡à¤²à¥‹à¤‰à¤ªà¥‡)", + "fr_GQ": "फà¥à¤°à¥‡à¤‚च (इकà¥à¤µà¥‡à¤Ÿà¥‹à¤°à¤¿à¤¯à¤² गिनी)", + "fr_HT": "फà¥à¤°à¥‡à¤‚च (हैती)", + "fr_KM": "फà¥à¤°à¥‡à¤‚च (कोमोरोज)", + "fr_LU": "फà¥à¤°à¥‡à¤‚च (लकà¥à¤à¥‡à¤‚बरà¥à¤—)", + "fr_MA": "फà¥à¤°à¥‡à¤‚च (मोरोकà¥à¤•ो)", + "fr_MC": "फà¥à¤°à¥‡à¤‚च (मोनॅको)", + "fr_MF": "फà¥à¤°à¥‡à¤‚च (सेंट मारà¥à¤Ÿà¤¿à¤¨)", + "fr_MG": "फà¥à¤°à¥‡à¤‚च (मादागासà¥à¤•र)", + "fr_ML": "फà¥à¤°à¥‡à¤‚च (माली)", + "fr_MQ": "फà¥à¤°à¥‡à¤‚च (मारà¥à¤Ÿà¤¿à¤¨à¤¿à¤•)", + "fr_MR": "फà¥à¤°à¥‡à¤‚च (मॉरिटानिया)", + "fr_MU": "फà¥à¤°à¥‡à¤‚च (मॉरिशस)", + "fr_NC": "फà¥à¤°à¥‡à¤‚च (नà¥à¤¯à¥‚ कॅलेडोनिया)", + "fr_NE": "फà¥à¤°à¥‡à¤‚च (नाइजर)", + "fr_PF": "फà¥à¤°à¥‡à¤‚च (फà¥à¤°à¥‡à¤‚च पॉलिनेशिया)", + "fr_PM": "फà¥à¤°à¥‡à¤‚च (सेंट पियरे आणि मिकà¥à¤µà¥‡à¤²à¥‹à¤¨)", + "fr_RE": "फà¥à¤°à¥‡à¤‚च (रियà¥à¤¨à¤¿à¤¯à¤¨)", + "fr_RW": "फà¥à¤°à¥‡à¤‚च (रवांडा)", + "fr_SC": "फà¥à¤°à¥‡à¤‚च (सेशेलà¥à¤¸)", + "fr_SN": "फà¥à¤°à¥‡à¤‚च (सेनेगल)", + "fr_SY": "फà¥à¤°à¥‡à¤‚च (सीरिया)", + "fr_TD": "फà¥à¤°à¥‡à¤‚च (चाड)", + "fr_TG": "फà¥à¤°à¥‡à¤‚च (टोगो)", + "fr_TN": "फà¥à¤°à¥‡à¤‚च (टà¥à¤¯à¥‚निशिया)", + "fr_VU": "फà¥à¤°à¥‡à¤‚च (वानà¥à¤†à¤¤à¥)", + "fr_WF": "फà¥à¤°à¥‡à¤‚च (वालिस आणि फà¥à¤¯à¥‚चूना)", + "fr_YT": "फà¥à¤°à¥‡à¤‚च (मायोटà¥à¤Ÿà¥‡)", + "fy": "पशà¥à¤šà¤¿à¤®à¥€ फà¥à¤°à¤¿à¤¶à¤¿à¤¯à¤¨", + "fy_NL": "पशà¥à¤šà¤¿à¤®à¥€ फà¥à¤°à¤¿à¤¶à¤¿à¤¯à¤¨ (नेदरलà¤à¤¡)", + "ga": "आयरिश", + "ga_IE": "आयरिश (आयरà¥à¤²à¤‚ड)", + "gd": "सà¥à¤•ॉटà¥à¤¸ गेलिक", + "gd_GB": "सà¥à¤•ॉटà¥à¤¸ गेलिक (यà¥à¤¨à¤¾à¤¯à¤Ÿà¥‡à¤¡ किंगडम)", + "gl": "गॅलिशियन", + "gl_ES": "गॅलिशियन (सà¥à¤ªà¥‡à¤¨)", + "gu": "गà¥à¤œà¤°à¤¾à¤¤à¥€", + "gu_IN": "गà¥à¤œà¤°à¤¾à¤¤à¥€ (भारत)", + "gv": "मांकà¥à¤¸", + "gv_IM": "मांकà¥à¤¸ (आयल ऑफ मॅन)", + "ha": "हौसा", + "ha_GH": "हौसा (घाना)", + "ha_NE": "हौसा (नाइजर)", + "ha_NG": "हौसा (नायजेरिया)", + "he": "हिबà¥à¤°à¥‚", + "he_IL": "हिबà¥à¤°à¥‚ (इसà¥à¤¤à¥à¤°à¤¾à¤‡à¤²)", + "hi": "हिंदी", + "hi_IN": "हिंदी (भारत)", + "hr": "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¨", + "hr_BA": "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¨ (बोसà¥à¤¨à¤¿à¤¯à¤¾ अणि हरà¥à¤œà¥‡à¤—ोविना)", + "hr_HR": "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¨ (कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾)", + "hu": "हंगेरियन", + "hu_HU": "हंगेरियन (हंगेरी)", + "hy": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¨", + "hy_AM": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¨ (अरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾)", + "id": "इंडोनेशियन", + "id_ID": "इंडोनेशियन (इंडोनेशिया)", + "ig": "ईगà¥à¤¬à¥‹", + "ig_NG": "ईगà¥à¤¬à¥‹ (नायजेरिया)", + "ii": "सिचà¥à¤†à¤¨ यी", + "ii_CN": "सिचà¥à¤†à¤¨ यी (चीन)", + "is": "आईसलà¤à¤¡à¤¿à¤•", + "is_IS": "आईसलà¤à¤¡à¤¿à¤• (आइसलà¤à¤¡)", + "it": "इटालियन", + "it_CH": "इटालियन (सà¥à¤µà¤¿à¤¤à¥à¤à¤°à¥à¤²à¤‚ड)", + "it_IT": "इटालियन (इटली)", + "it_SM": "इटालियन (सॅन मरीनो)", + "ja": "जपानी", + "ja_JP": "जपानी (जपान)", + "ka": "जॉरà¥à¤œà¤¿à¤¯à¤¨", + "ka_GE": "जॉरà¥à¤œà¤¿à¤¯à¤¨ (जॉरà¥à¤œà¤¿à¤¯à¤¾)", + "ki": "किकà¥à¤¯à¥‚", + "ki_KE": "किकà¥à¤¯à¥‚ (केनिया)", + "kk": "कà¤à¤¾à¤•", + "kk_KZ": "कà¤à¤¾à¤• (कà¤à¤¾à¤•सà¥à¤¤à¤¾à¤¨)", + "kl": "कलालà¥à¤²à¤¿à¤¸à¤¤", + "kl_GL": "कलालà¥à¤²à¤¿à¤¸à¤¤ (गà¥à¤°à¥€à¤¨à¤²à¤‚ड)", + "km": "खà¥à¤®à¥‡à¤°", + "km_KH": "खà¥à¤®à¥‡à¤° (कंबोडिया)", + "kn": "कनà¥à¤¨à¤¡", + "kn_IN": "कनà¥à¤¨à¤¡ (भारत)", + "ko": "कोरियन", + "ko_KP": "कोरियन (उतà¥à¤¤à¤° कोरिया)", + "ko_KR": "कोरियन (दकà¥à¤·à¤¿à¤£ कोरिया)", + "ks": "काशà¥à¤®à¥€à¤°à¥€", + "ks_IN": "काशà¥à¤®à¥€à¤°à¥€ (भारत)", + "kw": "कोरà¥à¤¨à¤¿à¤¶", + "kw_GB": "कोरà¥à¤¨à¤¿à¤¶ (यà¥à¤¨à¤¾à¤¯à¤Ÿà¥‡à¤¡ किंगडम)", + "ky": "किरगीà¤", + "ky_KG": "किरगीठ(किरगिà¤à¤¸à¥à¤¤à¤¾à¤¨)", + "lb": "लकà¥à¤à¥‡à¤‚बरà¥à¤—िश", + "lb_LU": "लकà¥à¤à¥‡à¤‚बरà¥à¤—िश (लकà¥à¤à¥‡à¤‚बरà¥à¤—)", + "lg": "गांडा", + "lg_UG": "गांडा (यà¥à¤—ांडा)", + "ln": "लिंगाला", + "ln_AO": "लिंगाला (अंगोला)", + "ln_CD": "लिंगाला (काà¤à¤—ो - किंशासा)", + "ln_CF": "लिंगाला (केंदà¥à¤°à¥€à¤¯ अफà¥à¤°à¤¿à¤•ी पà¥à¤°à¤œà¤¾à¤¸à¤¤à¥à¤¤à¤¾à¤•)", + "ln_CG": "लिंगाला (काà¤à¤—ो - बà¥à¤°à¤¾à¤à¤¾à¤µà¤¿à¤²à¥‡)", + "lo": "लाओ", + "lo_LA": "लाओ (लाओस)", + "lt": "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¨", + "lt_LT": "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¨ (लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾)", + "lu": "लà¥à¤¯à¥‚बा-कटांगा", + "lu_CD": "लà¥à¤¯à¥‚बा-कटांगा (काà¤à¤—ो - किंशासा)", + "lv": "लातà¥à¤µà¥à¤¹à¤¿à¤¯à¤¨", + "lv_LV": "लातà¥à¤µà¥à¤¹à¤¿à¤¯à¤¨ (लातà¥à¤µà¤¿à¤¯à¤¾)", + "mg": "मलागसी", + "mg_MG": "मलागसी (मादागासà¥à¤•र)", + "mk": "मॅसेडोनियन", + "mk_MK": "मॅसेडोनियन (मॅसेडोनिया)", + "ml": "मलà¥à¤¯à¤¾à¤³à¤®", + "ml_IN": "मलà¥à¤¯à¤¾à¤³à¤® (भारत)", + "mn": "मंगोलियन", + "mn_MN": "मंगोलियन (मंगोलिया)", + "mr": "मराठी", + "mr_IN": "मराठी (भारत)", + "ms": "मलय", + "ms_BN": "मलय (बà¥à¤°à¥à¤¨à¥‡à¤ˆ)", + "ms_MY": "मलय (मलेशिया)", + "ms_SG": "मलय (सिंगापूर)", + "mt": "मालà¥à¤Ÿà¤¿à¤œà¥", + "mt_MT": "मालà¥à¤Ÿà¤¿à¤œà¥ (मालà¥à¤Ÿà¤¾)", + "my": "बरà¥à¤®à¥€", + "my_MM": "बरà¥à¤®à¥€ (मà¥à¤¯à¤¾à¤¨à¤®à¤¾à¤° (बरà¥à¤®à¤¾))", + "nb": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¨ बोकमाल", + "nb_NO": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¨ बोकमाल (नॉरà¥à¤µà¥‡)", + "nb_SJ": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¨ बोकमाल (सà¥à¤µà¤¾à¤²à¤¬à¤°à¥à¤¡ आणि जान मायेन)", + "nd": "उतà¥à¤¤à¤° देबेली", + "nd_ZW": "उतà¥à¤¤à¤° देबेली (à¤à¤¿à¤®à¥à¤¬à¤¾à¤¬à¥à¤µà¥‡)", + "ne": "नेपाळी", + "ne_IN": "नेपाळी (भारत)", + "ne_NP": "नेपाळी (नेपाळ)", + "nl": "डच", + "nl_AW": "डच (अरà¥à¤¬à¤¾)", + "nl_BE": "डच (बेलà¥à¤œà¤¿à¤¯à¤®)", + "nl_BQ": "डच (कॅरिबियन नेदरलà¤à¤¡à¥à¤¸)", + "nl_CW": "डच (कà¥à¤¯à¥à¤°à¤¾à¤¸à¤¾à¤“)", + "nl_NL": "डच (नेदरलà¤à¤¡)", + "nl_SR": "डच (सà¥à¤°à¤¿à¤¨à¤¾à¤®)", + "nl_SX": "डच (सिंट मारà¥à¤Ÿà¥‡à¤¨)", + "nn": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¨ नà¥à¤¯à¥‹à¤°à¥à¤¸à¥à¤•", + "nn_NO": "नॉरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¨ नà¥à¤¯à¥‹à¤°à¥à¤¸à¥à¤• (नॉरà¥à¤µà¥‡)", + "no": "नोरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¨", + "no_NO": "नोरà¥à¤µà¥‡à¤œà¤¿à¤¯à¤¨ (नॉरà¥à¤µà¥‡)", + "om": "ओरोमो", + "om_ET": "ओरोमो (इथिओपिया)", + "om_KE": "ओरोमो (केनिया)", + "or": "उडिया", + "or_IN": "उडिया (भारत)", + "os": "ओसà¥à¤¸à¥‡à¤Ÿà¤¿à¤•", + "os_GE": "ओसà¥à¤¸à¥‡à¤Ÿà¤¿à¤• (जॉरà¥à¤œà¤¿à¤¯à¤¾)", + "os_RU": "ओसà¥à¤¸à¥‡à¤Ÿà¤¿à¤• (रशिया)", + "pa": "पंजाबी", + "pa_Arab": "पंजाबी (अरबी)", + "pa_Arab_PK": "पंजाबी (अरबी, पाकिसà¥à¤¤à¤¾à¤¨)", + "pa_Guru": "पंजाबी (गà¥à¤°à¥à¤®à¥à¤–ी)", + "pa_Guru_IN": "पंजाबी (गà¥à¤°à¥à¤®à¥à¤–ी, भारत)", + "pa_IN": "पंजाबी (भारत)", + "pa_PK": "पंजाबी (पाकिसà¥à¤¤à¤¾à¤¨)", + "pl": "पोलिश", + "pl_PL": "पोलिश (पोलंड)", + "ps": "पशà¥à¤¤à¥‹", + "ps_AF": "पशà¥à¤¤à¥‹ (अफगाणिसà¥à¤¤à¤¾à¤¨)", + "pt": "पोरà¥à¤¤à¥à¤—ीज", + "pt_AO": "पोरà¥à¤¤à¥à¤—ीज (अंगोला)", + "pt_BR": "पोरà¥à¤¤à¥à¤—ीज (बà¥à¤°à¤¾à¤à¤¿à¤²)", + "pt_CH": "पोरà¥à¤¤à¥à¤—ीज (सà¥à¤µà¤¿à¤¤à¥à¤à¤°à¥à¤²à¤‚ड)", + "pt_CV": "पोरà¥à¤¤à¥à¤—ीज (केप वà¥à¤¹à¤°à¥à¤¡à¥‡)", + "pt_GQ": "पोरà¥à¤¤à¥à¤—ीज (इकà¥à¤µà¥‡à¤Ÿà¥‹à¤°à¤¿à¤¯à¤² गिनी)", + "pt_GW": "पोरà¥à¤¤à¥à¤—ीज (गिनी-बिसाउ)", + "pt_LU": "पोरà¥à¤¤à¥à¤—ीज (लकà¥à¤à¥‡à¤‚बरà¥à¤—)", + "pt_MO": "पोरà¥à¤¤à¥à¤—ीज (मकाओ à¤à¤¸à¤à¤†à¤° चीन)", + "pt_MZ": "पोरà¥à¤¤à¥à¤—ीज (मोà¤à¤¾à¤®à¥à¤¬à¤¿à¤•)", + "pt_PT": "पोरà¥à¤¤à¥à¤—ीज (पोरà¥à¤¤à¥à¤—ाल)", + "pt_ST": "पोरà¥à¤¤à¥à¤—ीज (साओ टोम आणि पà¥à¤°à¤¿à¤‚सिपे)", + "pt_TL": "पोरà¥à¤¤à¥à¤—ीज (तिमोर-लेसà¥à¤¤à¥‡)", + "qu": "कà¥à¤µà¥‡à¤šà¥à¤†", + "qu_BO": "कà¥à¤µà¥‡à¤šà¥à¤† (बोलिवà¥à¤¹à¤¿à¤¯à¤¾)", + "qu_EC": "कà¥à¤µà¥‡à¤šà¥à¤† (इकà¥à¤µà¤¾à¤¡à¥‹à¤°)", + "qu_PE": "कà¥à¤µà¥‡à¤šà¥à¤† (पेरू)", + "rm": "रोमानà¥à¤¶", + "rm_CH": "रोमानà¥à¤¶ (सà¥à¤µà¤¿à¤¤à¥à¤à¤°à¥à¤²à¤‚ड)", + "rn": "रà¥à¤¨à¥à¤¦à¥€", + "rn_BI": "रà¥à¤¨à¥à¤¦à¥€ (बà¥à¤°à¥à¤‚डी)", + "ro": "रोमानियन", + "ro_MD": "रोमानियन (मोलà¥à¤¡à¥‹à¤µà¥à¤¹à¤¾)", + "ro_RO": "रोमानियन (रोमानिया)", + "ru": "रशियन", + "ru_BY": "रशियन (बेलारूस)", + "ru_KG": "रशियन (किरगिà¤à¤¸à¥à¤¤à¤¾à¤¨)", + "ru_KZ": "रशियन (कà¤à¤¾à¤•सà¥à¤¤à¤¾à¤¨)", + "ru_MD": "रशियन (मोलà¥à¤¡à¥‹à¤µà¥à¤¹à¤¾)", + "ru_RU": "रशियन (रशिया)", + "ru_UA": "रशियन (यà¥à¤•à¥à¤°à¥‡à¤¨)", + "rw": "किनà¥à¤¯à¤¾à¤°à¥à¤µà¤¾à¤¨à¥à¤¡à¤¾", + "rw_RW": "किनà¥à¤¯à¤¾à¤°à¥à¤µà¤¾à¤¨à¥à¤¡à¤¾ (रवांडा)", + "se": "उतà¥à¤¤à¤°à¥€ सामी", + "se_FI": "उतà¥à¤¤à¤°à¥€ सामी (फिनलंड)", + "se_NO": "उतà¥à¤¤à¤°à¥€ सामी (नॉरà¥à¤µà¥‡)", + "se_SE": "उतà¥à¤¤à¤°à¥€ सामी (सà¥à¤µà¥€à¤¡à¤¨)", + "sg": "सांगो", + "sg_CF": "सांगो (केंदà¥à¤°à¥€à¤¯ अफà¥à¤°à¤¿à¤•ी पà¥à¤°à¤œà¤¾à¤¸à¤¤à¥à¤¤à¤¾à¤•)", + "sh": "सरà¥à¤¬à¥‹-कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¨", + "sh_BA": "सरà¥à¤¬à¥‹-कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¨ (बोसà¥à¤¨à¤¿à¤¯à¤¾ अणि हरà¥à¤œà¥‡à¤—ोविना)", + "si": "सिंहला", + "si_LK": "सिंहला (शà¥à¤°à¥€à¤²à¤‚का)", + "sk": "सà¥à¤²à¥‹à¤µà¥à¤¹à¤¾à¤•", + "sk_SK": "सà¥à¤²à¥‹à¤µà¥à¤¹à¤¾à¤• (सà¥à¤²à¥‹à¤µà¥à¤¹à¤¾à¤•िया)", + "sl": "सà¥à¤²à¥‹à¤µà¥à¤¹à¥‡à¤¨à¤¿à¤¯à¤¨", + "sl_SI": "सà¥à¤²à¥‹à¤µà¥à¤¹à¥‡à¤¨à¤¿à¤¯à¤¨ (सà¥à¤²à¥‹à¤µà¥à¤¹à¥‡à¤¨à¤¿à¤¯à¤¾)", + "sn": "शोना", + "sn_ZW": "शोना (à¤à¤¿à¤®à¥à¤¬à¤¾à¤¬à¥à¤µà¥‡)", + "so": "सोमाली", + "so_DJ": "सोमाली (जिबौटी)", + "so_ET": "सोमाली (इथिओपिया)", + "so_KE": "सोमाली (केनिया)", + "so_SO": "सोमाली (सोमालिया)", + "sq": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¨", + "sq_AL": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¨ (अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾)", + "sq_MK": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¨ (मॅसेडोनिया)", + "sq_XK": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¨ (कोसोवà¥à¤¹à¥‹)", + "sr": "सरà¥à¤¬à¤¿à¤¯à¤¨", + "sr_BA": "सरà¥à¤¬à¤¿à¤¯à¤¨ (बोसà¥à¤¨à¤¿à¤¯à¤¾ अणि हरà¥à¤œà¥‡à¤—ोविना)", + "sr_Cyrl": "सरà¥à¤¬à¤¿à¤¯à¤¨ (सीरिलिक)", + "sr_Cyrl_BA": "सरà¥à¤¬à¤¿à¤¯à¤¨ (सीरिलिक, बोसà¥à¤¨à¤¿à¤¯à¤¾ अणि हरà¥à¤œà¥‡à¤—ोविना)", + "sr_Cyrl_ME": "सरà¥à¤¬à¤¿à¤¯à¤¨ (सीरिलिक, मोंटेनेगà¥à¤°à¥‹)", + "sr_Cyrl_RS": "सरà¥à¤¬à¤¿à¤¯à¤¨ (सीरिलिक, सरà¥à¤¬à¤¿à¤¯à¤¾)", + "sr_Cyrl_XK": "सरà¥à¤¬à¤¿à¤¯à¤¨ (सीरिलिक, कोसोवà¥à¤¹à¥‹)", + "sr_Latn": "सरà¥à¤¬à¤¿à¤¯à¤¨ (लॅटिन)", + "sr_Latn_BA": "सरà¥à¤¬à¤¿à¤¯à¤¨ (लॅटिन, बोसà¥à¤¨à¤¿à¤¯à¤¾ अणि हरà¥à¤œà¥‡à¤—ोविना)", + "sr_Latn_ME": "सरà¥à¤¬à¤¿à¤¯à¤¨ (लॅटिन, मोंटेनेगà¥à¤°à¥‹)", + "sr_Latn_RS": "सरà¥à¤¬à¤¿à¤¯à¤¨ (लॅटिन, सरà¥à¤¬à¤¿à¤¯à¤¾)", + "sr_Latn_XK": "सरà¥à¤¬à¤¿à¤¯à¤¨ (लॅटिन, कोसोवà¥à¤¹à¥‹)", + "sr_ME": "सरà¥à¤¬à¤¿à¤¯à¤¨ (मोंटेनेगà¥à¤°à¥‹)", + "sr_RS": "सरà¥à¤¬à¤¿à¤¯à¤¨ (सरà¥à¤¬à¤¿à¤¯à¤¾)", + "sr_XK": "सरà¥à¤¬à¤¿à¤¯à¤¨ (कोसोवà¥à¤¹à¥‹)", + "sv": "सà¥à¤µà¥€à¤¡à¤¿à¤¶", + "sv_AX": "सà¥à¤µà¥€à¤¡à¤¿à¤¶ (अâ€à¥…लà¤à¤¡ बेटे)", + "sv_FI": "सà¥à¤µà¥€à¤¡à¤¿à¤¶ (फिनलंड)", + "sv_SE": "सà¥à¤µà¥€à¤¡à¤¿à¤¶ (सà¥à¤µà¥€à¤¡à¤¨)", + "sw": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€", + "sw_CD": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€ (काà¤à¤—ो - किंशासा)", + "sw_KE": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€ (केनिया)", + "sw_TZ": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€ (टांà¤à¤¾à¤¨à¤¿à¤¯à¤¾)", + "sw_UG": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€ (यà¥à¤—ांडा)", + "ta": "तामिळ", + "ta_IN": "तामिळ (भारत)", + "ta_LK": "तामिळ (शà¥à¤°à¥€à¤²à¤‚का)", + "ta_MY": "तामिळ (मलेशिया)", + "ta_SG": "तामिळ (सिंगापूर)", + "te": "तेलगू", + "te_IN": "तेलगू (भारत)", + "th": "थाई", + "th_TH": "थाई (थायलंड)", + "ti": "तिगà¥à¤°à¤¿à¤¨à¥à¤¯à¤¾", + "ti_ER": "तिगà¥à¤°à¤¿à¤¨à¥à¤¯à¤¾ (à¤à¤°à¤¿à¤Ÿà¥à¤°à¤¿à¤¯à¤¾)", + "ti_ET": "तिगà¥à¤°à¤¿à¤¨à¥à¤¯à¤¾ (इथिओपिया)", + "tl": "टागालोग", + "tl_PH": "टागालोग (फिलिपिनà¥à¤¸)", + "to": "टोंगन", + "to_TO": "टोंगन (टोंगा)", + "tr": "तà¥à¤°à¥à¤•ी", + "tr_CY": "तà¥à¤°à¥à¤•ी (सायपà¥à¤°à¤¸)", + "tr_TR": "तà¥à¤°à¥à¤•ी (तà¥à¤°à¥à¤•ी)", + "ug": "उइगà¥à¤°", + "ug_CN": "उइगà¥à¤° (चीन)", + "uk": "यà¥à¤•à¥à¤°à¥‡à¤¨à¤¿à¤¯à¤¨", + "uk_UA": "यà¥à¤•à¥à¤°à¥‡à¤¨à¤¿à¤¯à¤¨ (यà¥à¤•à¥à¤°à¥‡à¤¨)", + "ur": "उरà¥à¤¦à¥‚", + "ur_IN": "उरà¥à¤¦à¥‚ (भारत)", + "ur_PK": "उरà¥à¤¦à¥‚ (पाकिसà¥à¤¤à¤¾à¤¨)", + "uz": "उà¤à¥à¤¬à¥‡à¤•", + "uz_AF": "उà¤à¥à¤¬à¥‡à¤• (अफगाणिसà¥à¤¤à¤¾à¤¨)", + "uz_Arab": "उà¤à¥à¤¬à¥‡à¤• (अरबी)", + "uz_Arab_AF": "उà¤à¥à¤¬à¥‡à¤• (अरबी, अफगाणिसà¥à¤¤à¤¾à¤¨)", + "uz_Cyrl": "उà¤à¥à¤¬à¥‡à¤• (सीरिलिक)", + "uz_Cyrl_UZ": "उà¤à¥à¤¬à¥‡à¤• (सीरिलिक, उà¤à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨)", + "uz_Latn": "उà¤à¥à¤¬à¥‡à¤• (लॅटिन)", + "uz_Latn_UZ": "उà¤à¥à¤¬à¥‡à¤• (लॅटिन, उà¤à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨)", + "uz_UZ": "उà¤à¥à¤¬à¥‡à¤• (उà¤à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨)", + "vi": "वà¥à¤¹à¤¿à¤à¤¤à¤¨à¤¾à¤®à¥€", + "vi_VN": "वà¥à¤¹à¤¿à¤à¤¤à¤¨à¤¾à¤®à¥€ (वà¥à¤¹à¤¿à¤à¤¤à¤¨à¤¾à¤®)", + "yi": "यिदà¥à¤¦à¤¿à¤¶", + "yo": "योरà¥à¤¬à¤¾", + "yo_BJ": "योरà¥à¤¬à¤¾ (बेनिन)", + "yo_NG": "योरà¥à¤¬à¤¾ (नायजेरिया)", + "zh": "चीनी", + "zh_CN": "चीनी (चीन)", + "zh_HK": "चीनी (हाà¤à¤—काà¤à¤— à¤à¤¸à¤à¤†à¤° चीन)", + "zh_Hans": "चीनी (सरलीकृत)", + "zh_Hans_CN": "चीनी (सरलीकृत, चीन)", + "zh_Hans_HK": "चीनी (सरलीकृत, हाà¤à¤—काà¤à¤— à¤à¤¸à¤à¤†à¤° चीन)", + "zh_Hans_MO": "चीनी (सरलीकृत, मकाओ à¤à¤¸à¤à¤†à¤° चीन)", + "zh_Hans_SG": "चीनी (सरलीकृत, सिंगापूर)", + "zh_Hant": "चीनी (पारंपारिक)", + "zh_Hant_HK": "चीनी (पारंपारिक, हाà¤à¤—काà¤à¤— à¤à¤¸à¤à¤†à¤° चीन)", + "zh_Hant_MO": "चीनी (पारंपारिक, मकाओ à¤à¤¸à¤à¤†à¤° चीन)", + "zh_Hant_TW": "चीनी (पारंपारिक, तैवान)", + "zh_MO": "चीनी (मकाओ à¤à¤¸à¤à¤†à¤° चीन)", + "zh_SG": "चीनी (सिंगापूर)", + "zh_TW": "चीनी (तैवान)", + "zu": "à¤à¥à¤²à¥‚", + "zu_ZA": "à¤à¥à¤²à¥‚ (दकà¥à¤·à¤¿à¤£ आफà¥à¤°à¤¿à¤•ा)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ms.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ms.json new file mode 100644 index 0000000000000000000000000000000000000000..7f44d89d94b09c3b0ab5d81eb6a693f34df1c436 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ms.json @@ -0,0 +1,566 @@ +{ + "Names": { + "af": "Afrikaans", + "af_NA": "Afrikaans (Namibia)", + "af_ZA": "Afrikaans (Afrika Selatan)", + "ak": "Akan", + "ak_GH": "Akan (Ghana)", + "am": "Amharic", + "am_ET": "Amharic (Ethiopia)", + "ar": "Arab", + "ar_AE": "Arab (Emiriah Arab Bersatu)", + "ar_BH": "Arab (Bahrain)", + "ar_DJ": "Arab (Djibouti)", + "ar_DZ": "Arab (Algeria)", + "ar_EG": "Arab (Mesir)", + "ar_EH": "Arab (Sahara Barat)", + "ar_ER": "Arab (Eritrea)", + "ar_IL": "Arab (Israel)", + "ar_IQ": "Arab (Iraq)", + "ar_JO": "Arab (Jordan)", + "ar_KM": "Arab (Comoros)", + "ar_KW": "Arab (Kuwait)", + "ar_LB": "Arab (Lubnan)", + "ar_LY": "Arab (Libya)", + "ar_MA": "Arab (Maghribi)", + "ar_MR": "Arab (Mauritania)", + "ar_OM": "Arab (Oman)", + "ar_PS": "Arab (Wilayah Palestin)", + "ar_QA": "Arab (Qatar)", + "ar_SA": "Arab (Arab Saudi)", + "ar_SD": "Arab (Sudan)", + "ar_SO": "Arab (Somalia)", + "ar_SS": "Arab (Sudan Selatan)", + "ar_SY": "Arab (Syria)", + "ar_TD": "Arab (Chad)", + "ar_TN": "Arab (Tunisia)", + "ar_YE": "Arab (Yaman)", + "as": "Assam", + "as_IN": "Assam (India)", + "az": "Azerbaijan", + "az_AZ": "Azerbaijan (Azerbaijan)", + "az_Cyrl": "Azerbaijan (Cyril)", + "az_Cyrl_AZ": "Azerbaijan (Cyril, Azerbaijan)", + "az_Latn": "Azerbaijan (Latin)", + "az_Latn_AZ": "Azerbaijan (Latin, Azerbaijan)", + "be": "Belarus", + "be_BY": "Belarus (Belarus)", + "bg": "Bulgaria", + "bg_BG": "Bulgaria (Bulgaria)", + "bm": "Bambara", + "bm_ML": "Bambara (Mali)", + "bn": "Benggala", + "bn_BD": "Benggala (Bangladesh)", + "bn_IN": "Benggala (India)", + "bo": "Tibet", + "bo_CN": "Tibet (China)", + "bo_IN": "Tibet (India)", + "br": "Breton", + "br_FR": "Breton (Perancis)", + "bs": "Bosnia", + "bs_BA": "Bosnia (Bosnia dan Herzegovina)", + "bs_Cyrl": "Bosnia (Cyril)", + "bs_Cyrl_BA": "Bosnia (Cyril, Bosnia dan Herzegovina)", + "bs_Latn": "Bosnia (Latin)", + "bs_Latn_BA": "Bosnia (Latin, Bosnia dan Herzegovina)", + "ca": "Catalonia", + "ca_AD": "Catalonia (Andorra)", + "ca_ES": "Catalonia (Sepanyol)", + "ca_FR": "Catalonia (Perancis)", + "ca_IT": "Catalonia (Itali)", + "ce": "Chechen", + "ce_RU": "Chechen (Rusia)", + "cs": "Czech", + "cs_CZ": "Czech (Republik Czech)", + "cy": "Wales", + "cy_GB": "Wales (United Kingdom)", + "da": "Denmark", + "da_DK": "Denmark (Denmark)", + "da_GL": "Denmark (Greenland)", + "de": "Jerman", + "de_AT": "Jerman (Austria)", + "de_BE": "Jerman (Belgium)", + "de_CH": "Jerman (Switzerland)", + "de_DE": "Jerman (Jerman)", + "de_IT": "Jerman (Itali)", + "de_LI": "Jerman (Liechtenstein)", + "de_LU": "Jerman (Luxembourg)", + "dz": "Dzongkha", + "dz_BT": "Dzongkha (Bhutan)", + "ee": "Ewe", + "ee_GH": "Ewe (Ghana)", + "ee_TG": "Ewe (Togo)", + "el": "Greek", + "el_CY": "Greek (Cyprus)", + "el_GR": "Greek (Greece)", + "en": "Inggeris", + "en_AG": "Inggeris (Antigua dan Barbuda)", + "en_AI": "Inggeris (Anguilla)", + "en_AS": "Inggeris (Samoa Amerika)", + "en_AT": "Inggeris (Austria)", + "en_AU": "Inggeris (Australia)", + "en_BB": "Inggeris (Barbados)", + "en_BE": "Inggeris (Belgium)", + "en_BI": "Inggeris (Burundi)", + "en_BM": "Inggeris (Bermuda)", + "en_BS": "Inggeris (Bahamas)", + "en_BW": "Inggeris (Botswana)", + "en_BZ": "Inggeris (Belize)", + "en_CA": "Inggeris (Kanada)", + "en_CC": "Inggeris (Kepulauan Cocos (Keeling))", + "en_CH": "Inggeris (Switzerland)", + "en_CK": "Inggeris (Kepulauan Cook)", + "en_CM": "Inggeris (Cameroon)", + "en_CX": "Inggeris (Pulau Krismas)", + "en_CY": "Inggeris (Cyprus)", + "en_DE": "Inggeris (Jerman)", + "en_DG": "Inggeris (Diego Garcia)", + "en_DK": "Inggeris (Denmark)", + "en_DM": "Inggeris (Dominica)", + "en_ER": "Inggeris (Eritrea)", + "en_FI": "Inggeris (Finland)", + "en_FJ": "Inggeris (Fiji)", + "en_FK": "Inggeris (Kepulauan Falkland)", + "en_FM": "Inggeris (Micronesia)", + "en_GB": "Inggeris (United Kingdom)", + "en_GD": "Inggeris (Grenada)", + "en_GG": "Inggeris (Guernsey)", + "en_GH": "Inggeris (Ghana)", + "en_GI": "Inggeris (Gibraltar)", + "en_GM": "Inggeris (Gambia)", + "en_GU": "Inggeris (Guam)", + "en_GY": "Inggeris (Guyana)", + "en_HK": "Inggeris (Hong Kong SAR China)", + "en_IE": "Inggeris (Ireland)", + "en_IL": "Inggeris (Israel)", + "en_IM": "Inggeris (Isle of Man)", + "en_IN": "Inggeris (India)", + "en_IO": "Inggeris (Wilayah Lautan Hindi British)", + "en_JE": "Inggeris (Jersey)", + "en_JM": "Inggeris (Jamaica)", + "en_KE": "Inggeris (Kenya)", + "en_KI": "Inggeris (Kiribati)", + "en_KN": "Inggeris (Saint Kitts dan Nevis)", + "en_KY": "Inggeris (Kepulauan Cayman)", + "en_LC": "Inggeris (Saint Lucia)", + "en_LR": "Inggeris (Liberia)", + "en_LS": "Inggeris (Lesotho)", + "en_MG": "Inggeris (Madagaskar)", + "en_MH": "Inggeris (Kepulauan Marshall)", + "en_MO": "Inggeris (Macau SAR China)", + "en_MP": "Inggeris (Kepulauan Mariana Utara)", + "en_MS": "Inggeris (Montserrat)", + "en_MT": "Inggeris (Malta)", + "en_MU": "Inggeris (Mauritius)", + "en_MW": "Inggeris (Malawi)", + "en_MY": "Inggeris (Malaysia)", + "en_NA": "Inggeris (Namibia)", + "en_NF": "Inggeris (Pulau Norfolk)", + "en_NG": "Inggeris (Nigeria)", + "en_NL": "Inggeris (Belanda)", + "en_NR": "Inggeris (Nauru)", + "en_NU": "Inggeris (Niue)", + "en_NZ": "Inggeris (New Zealand)", + "en_PG": "Inggeris (Papua New Guinea)", + "en_PH": "Inggeris (Filipina)", + "en_PK": "Inggeris (Pakistan)", + "en_PN": "Inggeris (Kepulauan Pitcairn)", + "en_PR": "Inggeris (Puerto Rico)", + "en_PW": "Inggeris (Palau)", + "en_RW": "Inggeris (Rwanda)", + "en_SB": "Inggeris (Kepulauan Solomon)", + "en_SC": "Inggeris (Seychelles)", + "en_SD": "Inggeris (Sudan)", + "en_SE": "Inggeris (Sweden)", + "en_SG": "Inggeris (Singapura)", + "en_SH": "Inggeris (Saint Helena)", + "en_SI": "Inggeris (Slovenia)", + "en_SL": "Inggeris (Sierra Leone)", + "en_SS": "Inggeris (Sudan Selatan)", + "en_SX": "Inggeris (Sint Maarten)", + "en_SZ": "Inggeris (Swaziland)", + "en_TC": "Inggeris (Kepulauan Turks dan Caicos)", + "en_TK": "Inggeris (Tokelau)", + "en_TO": "Inggeris (Tonga)", + "en_TT": "Inggeris (Trinidad dan Tobago)", + "en_TV": "Inggeris (Tuvalu)", + "en_TZ": "Inggeris (Tanzania)", + "en_UG": "Inggeris (Uganda)", + "en_UM": "Inggeris (Kepulauan Terpencil A.S.)", + "en_US": "Inggeris (Amerika Syarikat)", + "en_VC": "Inggeris (Saint Vincent dan Grenadines)", + "en_VG": "Inggeris (Kepulauan Virgin British)", + "en_VI": "Inggeris (Kepulauan Virgin A.S.)", + "en_VU": "Inggeris (Vanuatu)", + "en_WS": "Inggeris (Samoa)", + "en_ZA": "Inggeris (Afrika Selatan)", + "en_ZM": "Inggeris (Zambia)", + "en_ZW": "Inggeris (Zimbabwe)", + "eo": "Esperanto", + "es": "Sepanyol", + "es_AR": "Sepanyol (Argentina)", + "es_BO": "Sepanyol (Bolivia)", + "es_BR": "Sepanyol (Brazil)", + "es_CL": "Sepanyol (Chile)", + "es_CO": "Sepanyol (Colombia)", + "es_CR": "Sepanyol (Costa Rica)", + "es_CU": "Sepanyol (Cuba)", + "es_DO": "Sepanyol (Republik Dominica)", + "es_EA": "Sepanyol (Ceuta dan Melilla)", + "es_EC": "Sepanyol (Ecuador)", + "es_ES": "Sepanyol (Sepanyol)", + "es_GQ": "Sepanyol (Guinea Khatulistiwa)", + "es_GT": "Sepanyol (Guatemala)", + "es_HN": "Sepanyol (Honduras)", + "es_IC": "Sepanyol (Kepulauan Canary)", + "es_MX": "Sepanyol (Mexico)", + "es_NI": "Sepanyol (Nicaragua)", + "es_PA": "Sepanyol (Panama)", + "es_PE": "Sepanyol (Peru)", + "es_PH": "Sepanyol (Filipina)", + "es_PR": "Sepanyol (Puerto Rico)", + "es_PY": "Sepanyol (Paraguay)", + "es_SV": "Sepanyol (El Salvador)", + "es_US": "Sepanyol (Amerika Syarikat)", + "es_UY": "Sepanyol (Uruguay)", + "es_VE": "Sepanyol (Venezuela)", + "et": "Estonia", + "et_EE": "Estonia (Estonia)", + "eu": "Basque", + "eu_ES": "Basque (Sepanyol)", + "fa": "Parsi", + "fa_AF": "Parsi (Afghanistan)", + "fa_IR": "Parsi (Iran)", + "ff": "Fulah", + "ff_CM": "Fulah (Cameroon)", + "ff_GN": "Fulah (Guinea)", + "ff_MR": "Fulah (Mauritania)", + "ff_SN": "Fulah (Senegal)", + "fi": "Finland", + "fi_FI": "Finland (Finland)", + "fo": "Faroe", + "fo_DK": "Faroe (Denmark)", + "fo_FO": "Faroe (Kepulauan Faroe)", + "fr": "Perancis", + "fr_BE": "Perancis (Belgium)", + "fr_BF": "Perancis (Burkina Faso)", + "fr_BI": "Perancis (Burundi)", + "fr_BJ": "Perancis (Benin)", + "fr_BL": "Perancis (Saint Barthélemy)", + "fr_CA": "Perancis (Kanada)", + "fr_CD": "Perancis (Congo - Kinshasa)", + "fr_CF": "Perancis (Republik Afrika Tengah)", + "fr_CG": "Perancis (Congo - Brazzaville)", + "fr_CH": "Perancis (Switzerland)", + "fr_CI": "Perancis (Cote d’Ivoire)", + "fr_CM": "Perancis (Cameroon)", + "fr_DJ": "Perancis (Djibouti)", + "fr_DZ": "Perancis (Algeria)", + "fr_FR": "Perancis (Perancis)", + "fr_GA": "Perancis (Gabon)", + "fr_GF": "Perancis (Guiana Perancis)", + "fr_GN": "Perancis (Guinea)", + "fr_GP": "Perancis (Guadeloupe)", + "fr_GQ": "Perancis (Guinea Khatulistiwa)", + "fr_HT": "Perancis (Haiti)", + "fr_KM": "Perancis (Comoros)", + "fr_LU": "Perancis (Luxembourg)", + "fr_MA": "Perancis (Maghribi)", + "fr_MC": "Perancis (Monaco)", + "fr_MF": "Perancis (Saint Martin)", + "fr_MG": "Perancis (Madagaskar)", + "fr_ML": "Perancis (Mali)", + "fr_MQ": "Perancis (Martinique)", + "fr_MR": "Perancis (Mauritania)", + "fr_MU": "Perancis (Mauritius)", + "fr_NC": "Perancis (New Caledonia)", + "fr_NE": "Perancis (Niger)", + "fr_PF": "Perancis (Polinesia Perancis)", + "fr_PM": "Perancis (Saint Pierre dan Miquelon)", + "fr_RE": "Perancis (Reunion)", + "fr_RW": "Perancis (Rwanda)", + "fr_SC": "Perancis (Seychelles)", + "fr_SN": "Perancis (Senegal)", + "fr_SY": "Perancis (Syria)", + "fr_TD": "Perancis (Chad)", + "fr_TG": "Perancis (Togo)", + "fr_TN": "Perancis (Tunisia)", + "fr_VU": "Perancis (Vanuatu)", + "fr_WF": "Perancis (Wallis dan Futuna)", + "fr_YT": "Perancis (Mayotte)", + "fy": "Frisian Barat", + "fy_NL": "Frisian Barat (Belanda)", + "ga": "Ireland", + "ga_IE": "Ireland (Ireland)", + "gd": "Scots Gaelic", + "gd_GB": "Scots Gaelic (United Kingdom)", + "gl": "Galicia", + "gl_ES": "Galicia (Sepanyol)", + "gu": "Gujerat", + "gu_IN": "Gujerat (India)", + "gv": "Manx", + "gv_IM": "Manx (Isle of Man)", + "ha": "Hausa", + "ha_GH": "Hausa (Ghana)", + "ha_NE": "Hausa (Niger)", + "ha_NG": "Hausa (Nigeria)", + "he": "Ibrani", + "he_IL": "Ibrani (Israel)", + "hi": "Hindi", + "hi_IN": "Hindi (India)", + "hr": "Croatia", + "hr_BA": "Croatia (Bosnia dan Herzegovina)", + "hr_HR": "Croatia (Croatia)", + "hu": "Hungary", + "hu_HU": "Hungary (Hungary)", + "hy": "Armenia", + "hy_AM": "Armenia (Armenia)", + "id": "Indonesia", + "id_ID": "Indonesia (Indonesia)", + "ig": "Igbo", + "ig_NG": "Igbo (Nigeria)", + "ii": "Sichuan Yi", + "ii_CN": "Sichuan Yi (China)", + "is": "Iceland", + "is_IS": "Iceland (Iceland)", + "it": "Itali", + "it_CH": "Itali (Switzerland)", + "it_IT": "Itali (Itali)", + "it_SM": "Itali (San Marino)", + "ja": "Jepun", + "ja_JP": "Jepun (Jepun)", + "ka": "Georgia", + "ka_GE": "Georgia (Georgia)", + "ki": "Kikuya", + "ki_KE": "Kikuya (Kenya)", + "kk": "Kazakhstan", + "kk_KZ": "Kazakhstan (Kazakhstan)", + "kl": "Kalaallisut", + "kl_GL": "Kalaallisut (Greenland)", + "km": "Khmer", + "km_KH": "Khmer (Kemboja)", + "kn": "Kannada", + "kn_IN": "Kannada (India)", + "ko": "Korea", + "ko_KP": "Korea (Korea Utara)", + "ko_KR": "Korea (Korea Selatan)", + "ks": "Kashmir", + "ks_IN": "Kashmir (India)", + "kw": "Cornish", + "kw_GB": "Cornish (United Kingdom)", + "ky": "Kirghiz", + "ky_KG": "Kirghiz (Kyrgyzstan)", + "lb": "Luxembourg", + "lb_LU": "Luxembourg (Luxembourg)", + "lg": "Ganda", + "lg_UG": "Ganda (Uganda)", + "ln": "Lingala", + "ln_AO": "Lingala (Angola)", + "ln_CD": "Lingala (Congo - Kinshasa)", + "ln_CF": "Lingala (Republik Afrika Tengah)", + "ln_CG": "Lingala (Congo - Brazzaville)", + "lo": "Laos", + "lo_LA": "Laos (Laos)", + "lt": "Lithuania", + "lt_LT": "Lithuania (Lithuania)", + "lu": "Luba-Katanga", + "lu_CD": "Luba-Katanga (Congo - Kinshasa)", + "lv": "Latvia", + "lv_LV": "Latvia (Latvia)", + "mg": "Malagasy", + "mg_MG": "Malagasy (Madagaskar)", + "mk": "Macedonia", + "mk_MK": "Macedonia (Macedonia)", + "ml": "Malayalam", + "ml_IN": "Malayalam (India)", + "mn": "Mongolia", + "mn_MN": "Mongolia (Mongolia)", + "mr": "Marathi", + "mr_IN": "Marathi (India)", + "ms": "Bahasa Melayu", + "ms_BN": "Bahasa Melayu (Brunei)", + "ms_MY": "Bahasa Melayu (Malaysia)", + "ms_SG": "Bahasa Melayu (Singapura)", + "mt": "Malta", + "mt_MT": "Malta (Malta)", + "my": "Burma", + "my_MM": "Burma (Myanmar (Burma))", + "nb": "BokmÃ¥l Norway", + "nb_NO": "BokmÃ¥l Norway (Norway)", + "nb_SJ": "BokmÃ¥l Norway (Svalbard dan Jan Mayen)", + "nd": "Ndebele Utara", + "nd_ZW": "Ndebele Utara (Zimbabwe)", + "ne": "Nepal", + "ne_IN": "Nepal (India)", + "ne_NP": "Nepal (Nepal)", + "nl": "Belanda", + "nl_AW": "Belanda (Aruba)", + "nl_BE": "Belanda (Belgium)", + "nl_BQ": "Belanda (Belanda Caribbean)", + "nl_CW": "Belanda (Curacao)", + "nl_NL": "Belanda (Belanda)", + "nl_SR": "Belanda (Surinam)", + "nl_SX": "Belanda (Sint Maarten)", + "nn": "Nynorsk Norway", + "nn_NO": "Nynorsk Norway (Norway)", + "no": "Norway", + "no_NO": "Norway (Norway)", + "om": "Oromo", + "om_ET": "Oromo (Ethiopia)", + "om_KE": "Oromo (Kenya)", + "or": "Oriya", + "or_IN": "Oriya (India)", + "os": "Ossete", + "os_GE": "Ossete (Georgia)", + "os_RU": "Ossete (Rusia)", + "pa": "Punjabi", + "pa_Arab": "Punjabi (Arab)", + "pa_Arab_PK": "Punjabi (Arab, Pakistan)", + "pa_Guru": "Punjabi (Gurmukhi)", + "pa_Guru_IN": "Punjabi (Gurmukhi, India)", + "pa_IN": "Punjabi (India)", + "pa_PK": "Punjabi (Pakistan)", + "pl": "Poland", + "pl_PL": "Poland (Poland)", + "ps": "Pashto", + "ps_AF": "Pashto (Afghanistan)", + "pt": "Portugis", + "pt_AO": "Portugis (Angola)", + "pt_BR": "Portugis (Brazil)", + "pt_CH": "Portugis (Switzerland)", + "pt_CV": "Portugis (Cape Verde)", + "pt_GQ": "Portugis (Guinea Khatulistiwa)", + "pt_GW": "Portugis (Guinea Bissau)", + "pt_LU": "Portugis (Luxembourg)", + "pt_MO": "Portugis (Macau SAR China)", + "pt_MZ": "Portugis (Mozambique)", + "pt_PT": "Portugis (Portugal)", + "pt_ST": "Portugis (Sao Tome dan Principe)", + "pt_TL": "Portugis (Timor-Leste)", + "qu": "Quechua", + "qu_BO": "Quechua (Bolivia)", + "qu_EC": "Quechua (Ecuador)", + "qu_PE": "Quechua (Peru)", + "rm": "Romansh", + "rm_CH": "Romansh (Switzerland)", + "rn": "Rundi", + "rn_BI": "Rundi (Burundi)", + "ro": "Romania", + "ro_MD": "Romania (Moldova)", + "ro_RO": "Romania (Romania)", + "ru": "Rusia", + "ru_BY": "Rusia (Belarus)", + "ru_KG": "Rusia (Kyrgyzstan)", + "ru_KZ": "Rusia (Kazakhstan)", + "ru_MD": "Rusia (Moldova)", + "ru_RU": "Rusia (Rusia)", + "ru_UA": "Rusia (Ukraine)", + "rw": "Kinyarwanda", + "rw_RW": "Kinyarwanda (Rwanda)", + "se": "Sami Utara", + "se_FI": "Sami Utara (Finland)", + "se_NO": "Sami Utara (Norway)", + "se_SE": "Sami Utara (Sweden)", + "sg": "Sango", + "sg_CF": "Sango (Republik Afrika Tengah)", + "sh": "SerboCroatia", + "sh_BA": "SerboCroatia (Bosnia dan Herzegovina)", + "si": "Sinhala", + "si_LK": "Sinhala (Sri Lanka)", + "sk": "Slovak", + "sk_SK": "Slovak (Slovakia)", + "sl": "Slovenia", + "sl_SI": "Slovenia (Slovenia)", + "sn": "Shona", + "sn_ZW": "Shona (Zimbabwe)", + "so": "Somali", + "so_DJ": "Somali (Djibouti)", + "so_ET": "Somali (Ethiopia)", + "so_KE": "Somali (Kenya)", + "so_SO": "Somali (Somalia)", + "sq": "Albania", + "sq_AL": "Albania (Albania)", + "sq_MK": "Albania (Macedonia)", + "sq_XK": "Albania (Kosovo)", + "sr": "Serbia", + "sr_BA": "Serbia (Bosnia dan Herzegovina)", + "sr_Cyrl": "Serbia (Cyril)", + "sr_Cyrl_BA": "Serbia (Cyril, Bosnia dan Herzegovina)", + "sr_Cyrl_ME": "Serbia (Cyril, Montenegro)", + "sr_Cyrl_RS": "Serbia (Cyril, Serbia)", + "sr_Cyrl_XK": "Serbia (Cyril, Kosovo)", + "sr_Latn": "Serbia (Latin)", + "sr_Latn_BA": "Serbia (Latin, Bosnia dan Herzegovina)", + "sr_Latn_ME": "Serbia (Latin, Montenegro)", + "sr_Latn_RS": "Serbia (Latin, Serbia)", + "sr_Latn_XK": "Serbia (Latin, Kosovo)", + "sr_ME": "Serbia (Montenegro)", + "sr_RS": "Serbia (Serbia)", + "sr_XK": "Serbia (Kosovo)", + "sv": "Sweden", + "sv_AX": "Sweden (Kepulauan Aland)", + "sv_FI": "Sweden (Finland)", + "sv_SE": "Sweden (Sweden)", + "sw": "Swahili", + "sw_CD": "Swahili (Congo - Kinshasa)", + "sw_KE": "Swahili (Kenya)", + "sw_TZ": "Swahili (Tanzania)", + "sw_UG": "Swahili (Uganda)", + "ta": "Tamil", + "ta_IN": "Tamil (India)", + "ta_LK": "Tamil (Sri Lanka)", + "ta_MY": "Tamil (Malaysia)", + "ta_SG": "Tamil (Singapura)", + "te": "Telugu", + "te_IN": "Telugu (India)", + "th": "Thai", + "th_TH": "Thai (Thailand)", + "ti": "Tigrinya", + "ti_ER": "Tigrinya (Eritrea)", + "ti_ET": "Tigrinya (Ethiopia)", + "to": "Tonga", + "to_TO": "Tonga (Tonga)", + "tr": "Turki", + "tr_CY": "Turki (Cyprus)", + "tr_TR": "Turki (Turki)", + "ug": "Uyghur", + "ug_CN": "Uyghur (China)", + "uk": "Ukraine", + "uk_UA": "Ukraine (Ukraine)", + "ur": "Urdu", + "ur_IN": "Urdu (India)", + "ur_PK": "Urdu (Pakistan)", + "uz": "Uzbekistan", + "uz_AF": "Uzbekistan (Afghanistan)", + "uz_Arab": "Uzbekistan (Arab)", + "uz_Arab_AF": "Uzbekistan (Arab, Afghanistan)", + "uz_Cyrl": "Uzbekistan (Cyril)", + "uz_Cyrl_UZ": "Uzbekistan (Cyril, Uzbekistan)", + "uz_Latn": "Uzbekistan (Latin)", + "uz_Latn_UZ": "Uzbekistan (Latin, Uzbekistan)", + "uz_UZ": "Uzbekistan (Uzbekistan)", + "vi": "Vietnam", + "vi_VN": "Vietnam (Vietnam)", + "yi": "Yiddish", + "yo": "Yoruba", + "yo_BJ": "Yoruba (Benin)", + "yo_NG": "Yoruba (Nigeria)", + "zh": "Cina", + "zh_CN": "Cina (China)", + "zh_HK": "Cina (Hong Kong SAR China)", + "zh_Hans": "Cina (Ringkas)", + "zh_Hans_CN": "Cina (Ringkas, China)", + "zh_Hans_HK": "Cina (Ringkas, Hong Kong SAR China)", + "zh_Hans_MO": "Cina (Ringkas, Macau SAR China)", + "zh_Hans_SG": "Cina (Ringkas, Singapura)", + "zh_Hant": "Cina (Tradisional)", + "zh_Hant_HK": "Cina (Tradisional, Hong Kong SAR China)", + "zh_Hant_MO": "Cina (Tradisional, Macau SAR China)", + "zh_Hant_TW": "Cina (Tradisional, Taiwan)", + "zh_MO": "Cina (Macau SAR China)", + "zh_SG": "Cina (Singapura)", + "zh_TW": "Cina (Taiwan)", + "zu": "Zulu", + "zu_ZA": "Zulu (Afrika Selatan)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mt.json new file mode 100644 index 0000000000000000000000000000000000000000..77cff282f7f30ce320f18dbe905998d3614ada19 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/mt.json @@ -0,0 +1,566 @@ +{ + "Names": { + "af": "Afrikans", + "af_NA": "Afrikans (in-Namibja)", + "af_ZA": "Afrikans (l-Afrika t’Isfel)", + "ak": "Akan", + "ak_GH": "Akan (il-Ghana)", + "am": "Amhariku", + "am_ET": "Amhariku (l-Etjopja)", + "ar": "Għarbi", + "ar_AE": "Għarbi (l-Emirati Għarab Magħquda)", + "ar_BH": "Għarbi (il-Bahrain)", + "ar_DJ": "Għarbi (il-Djibouti)", + "ar_DZ": "Għarbi (l-AlÄ¡erija)", + "ar_EG": "Għarbi (l-EÄ¡ittu)", + "ar_EH": "Għarbi (is-Saħara tal-Punent)", + "ar_ER": "Għarbi (l-Eritrea)", + "ar_IL": "Għarbi (Iżrael)", + "ar_IQ": "Għarbi (l-Iraq)", + "ar_JO": "Għarbi (il-Ä ordan)", + "ar_KM": "Għarbi (Comoros)", + "ar_KW": "Għarbi (il-Kuwajt)", + "ar_LB": "Għarbi (il-Libanu)", + "ar_LY": "Għarbi (il-Libja)", + "ar_MA": "Għarbi (il-Marokk)", + "ar_MR": "Għarbi (il-Mauritania)", + "ar_OM": "Għarbi (l-Oman)", + "ar_PS": "Għarbi (it-Territorji Palestinjani)", + "ar_QA": "Għarbi (il-Qatar)", + "ar_SA": "Għarbi (l-Arabia Sawdija)", + "ar_SD": "Għarbi (is-Sudan)", + "ar_SO": "Għarbi (is-Somalja)", + "ar_SS": "Għarbi (is-Sudan t’Isfel)", + "ar_SY": "Għarbi (is-Sirja)", + "ar_TD": "Għarbi (iÄ‹-Chad)", + "ar_TN": "Għarbi (it-Tuneżija)", + "ar_YE": "Għarbi (il-Jemen)", + "as": "Assamiż", + "as_IN": "Assamiż (l-Indja)", + "az": "AżerbajÄ¡ani", + "az_AZ": "AżerbajÄ¡ani (l-AżerbajÄ¡an)", + "az_Cyrl": "AżerbajÄ¡ani (ÄŠirilliku)", + "az_Cyrl_AZ": "AżerbajÄ¡ani (ÄŠirilliku, l-AżerbajÄ¡an)", + "az_Latn": "AżerbajÄ¡ani (Latin)", + "az_Latn_AZ": "AżerbajÄ¡ani (Latin, l-AżerbajÄ¡an)", + "be": "Belarussu", + "be_BY": "Belarussu (il-Belarussja)", + "bg": "Bulgaru", + "bg_BG": "Bulgaru (il-Bulgarija)", + "bm": "Bambara", + "bm_ML": "Bambara (il-Mali)", + "bn": "Bengali", + "bn_BD": "Bengali (il-Bangladesh)", + "bn_IN": "Bengali (l-Indja)", + "bo": "Tibetjan", + "bo_CN": "Tibetjan (CN)", + "bo_IN": "Tibetjan (l-Indja)", + "br": "Breton", + "br_FR": "Breton (Franza)", + "bs": "Bożnijaku", + "bs_BA": "Bożnijaku (il-Bożnija-Ħerzegovina)", + "bs_Cyrl": "Bożnijaku (ÄŠirilliku)", + "bs_Cyrl_BA": "Bożnijaku (ÄŠirilliku, il-Bożnija-Ħerzegovina)", + "bs_Latn": "Bożnijaku (Latin)", + "bs_Latn_BA": "Bożnijaku (Latin, il-Bożnija-Ħerzegovina)", + "ca": "Katalan", + "ca_AD": "Katalan (Andorra)", + "ca_ES": "Katalan (Spanja)", + "ca_FR": "Katalan (Franza)", + "ca_IT": "Katalan (l-Italja)", + "ce": "Chechen", + "ce_RU": "Chechen (ir-Russja)", + "cs": "ÄŠek", + "cs_CZ": "ÄŠek (ir-Repubblika ÄŠeka)", + "cy": "Welsh", + "cy_GB": "Welsh (ir-Renju Unit)", + "da": "Daniż", + "da_DK": "Daniż (id-Danimarka)", + "da_GL": "Daniż (Greenland)", + "de": "Ä ermaniż", + "de_AT": "Ä ermaniż (l-Awstrija)", + "de_BE": "Ä ermaniż (il-BelÄ¡ju)", + "de_CH": "Ä ermaniż (Å»vizzera)", + "de_DE": "Ä ermaniż (il-Ä ermanja)", + "de_IT": "Ä ermaniż (l-Italja)", + "de_LI": "Ä ermaniż (il-Liechtenstein)", + "de_LU": "Ä ermaniż (il-Lussemburgu)", + "dz": "Dzongkha", + "dz_BT": "Dzongkha (il-Bhutan)", + "ee": "Ewe", + "ee_GH": "Ewe (il-Ghana)", + "ee_TG": "Ewe (it-Togo)", + "el": "Grieg", + "el_CY": "Grieg (ÄŠipru)", + "el_GR": "Grieg (il-GreÄ‹ja)", + "en": "Ingliż", + "en_AG": "Ingliż (Antigua u Barbuda)", + "en_AI": "Ingliż (Anguilla)", + "en_AS": "Ingliż (is-Samoa Amerikana)", + "en_AT": "Ingliż (l-Awstrija)", + "en_AU": "Ingliż (l-Awstralja)", + "en_BB": "Ingliż (Barbados)", + "en_BE": "Ingliż (il-BelÄ¡ju)", + "en_BI": "Ingliż (il-Burundi)", + "en_BM": "Ingliż (Bermuda)", + "en_BS": "Ingliż (il-Bahamas)", + "en_BW": "Ingliż (il-Botswana)", + "en_BZ": "Ingliż (il-Belize)", + "en_CA": "Ingliż (il-Kanada)", + "en_CC": "Ingliż (Gżejjer Cocos (Keeling))", + "en_CH": "Ingliż (Å»vizzera)", + "en_CK": "Ingliż (Gżejjer Cook)", + "en_CM": "Ingliż (il-Kamerun)", + "en_CX": "Ingliż (il-Gżira Christmas)", + "en_CY": "Ingliż (ÄŠipru)", + "en_DE": "Ingliż (il-Ä ermanja)", + "en_DG": "Ingliż (Diego Garcia)", + "en_DK": "Ingliż (id-Danimarka)", + "en_DM": "Ingliż (Dominica)", + "en_ER": "Ingliż (l-Eritrea)", + "en_FI": "Ingliż (il-Finlandja)", + "en_FJ": "Ingliż (FiÄ¡i)", + "en_FK": "Ingliż (il-Gżejjer Falkland)", + "en_FM": "Ingliż (Mikroneżja)", + "en_GB": "Ingliż (ir-Renju Unit)", + "en_GD": "Ingliż (Grenada)", + "en_GG": "Ingliż (Guernsey)", + "en_GH": "Ingliż (il-Ghana)", + "en_GI": "Ingliż (Ä ibiltà)", + "en_GM": "Ingliż (il-Gambja)", + "en_GU": "Ingliż (Guam)", + "en_GY": "Ingliż (il-Guyana)", + "en_HK": "Ingliż (ir-ReÄ¡jun Amministrattiv SpeÄ‹jali ta’ Hong Kong tar-Repubblika tal-Poplu taÄ‹-ÄŠina)", + "en_IE": "Ingliż (l-Irlanda)", + "en_IL": "Ingliż (Iżrael)", + "en_IM": "Ingliż (Isle of Man)", + "en_IN": "Ingliż (l-Indja)", + "en_IO": "Ingliż (Territorju Brittaniku tal-OÄ‹ean Indjan)", + "en_JE": "Ingliż (Jersey)", + "en_JM": "Ingliż (il-Ä amajka)", + "en_KE": "Ingliż (il-Kenja)", + "en_KI": "Ingliż (Kiribati)", + "en_KN": "Ingliż (Saint Kitts u Nevis)", + "en_KY": "Ingliż (il-Gżejjer Cayman)", + "en_LC": "Ingliż (Saint Lucia)", + "en_LR": "Ingliż (il-Liberja)", + "en_LS": "Ingliż (il-Lesoto)", + "en_MG": "Ingliż (Madagascar)", + "en_MH": "Ingliż (Gżejjer Marshall)", + "en_MO": "Ingliż (ir-ReÄ¡jun Amministrattiv SpeÄ‹jali tal-Macao tar-Repubblika tal-Poplu taÄ‹-ÄŠina)", + "en_MP": "Ingliż (Ġżejjer Mariana tat-Tramuntana)", + "en_MS": "Ingliż (Montserrat)", + "en_MT": "Ingliż (Malta)", + "en_MU": "Ingliż (Mauritius)", + "en_MW": "Ingliż (il-Malawi)", + "en_MY": "Ingliż (il-Malasja)", + "en_NA": "Ingliż (in-Namibja)", + "en_NF": "Ingliż (Gżira Norfolk)", + "en_NG": "Ingliż (in-NiÄ¡erja)", + "en_NL": "Ingliż (in-Netherlands)", + "en_NR": "Ingliż (Nauru)", + "en_NU": "Ingliż (Niue)", + "en_NZ": "Ingliż (New Zealand)", + "en_PG": "Ingliż (Papua New Guinea)", + "en_PH": "Ingliż (il-Filippini)", + "en_PK": "Ingliż (il-Pakistan)", + "en_PN": "Ingliż (Gżejjer Pitcairn)", + "en_PR": "Ingliż (Puerto Rico)", + "en_PW": "Ingliż (Palau)", + "en_RW": "Ingliż (ir-Rwanda)", + "en_SB": "Ingliż (il-Gżejjer Solomon)", + "en_SC": "Ingliż (is-Seychelles)", + "en_SD": "Ingliż (is-Sudan)", + "en_SE": "Ingliż (l-Iżvezja)", + "en_SG": "Ingliż (Singapore)", + "en_SH": "Ingliż (Saint Helena)", + "en_SI": "Ingliż (is-Slovenja)", + "en_SL": "Ingliż (Sierra Leone)", + "en_SS": "Ingliż (is-Sudan t’Isfel)", + "en_SX": "Ingliż (Sint Maarten)", + "en_SZ": "Ingliż (is-Swaziland)", + "en_TC": "Ingliż (il-Gżejjer Turks u Caicos)", + "en_TK": "Ingliż (it-Tokelau)", + "en_TO": "Ingliż (Tonga)", + "en_TT": "Ingliż (Trinidad u Tobago)", + "en_TV": "Ingliż (Tuvalu)", + "en_TZ": "Ingliż (it-Tanzanija)", + "en_UG": "Ingliż (l-Uganda)", + "en_UM": "Ingliż (Il-Gżejjer Minuri Mbiegħda tal-Istati Uniti)", + "en_US": "Ingliż (l-Istati Uniti)", + "en_VC": "Ingliż (Saint Vincent u l-Grenadini)", + "en_VG": "Ingliż (il-Gżejjer VerÄ¡ni BrittaniÄ‹i)", + "en_VI": "Ingliż (il-Gżejjer VerÄ¡ni tal-Istati Uniti)", + "en_VU": "Ingliż (Vanuatu)", + "en_WS": "Ingliż (Samoa)", + "en_ZA": "Ingliż (l-Afrika t’Isfel)", + "en_ZM": "Ingliż (iż-Å»ambja)", + "en_ZW": "Ingliż (iż-Å»imbabwe)", + "eo": "Esperanto", + "es": "Spanjol", + "es_AR": "Spanjol (l-ArÄ¡entina)", + "es_BO": "Spanjol (il-Bolivja)", + "es_BR": "Spanjol (Il-Brażil)", + "es_CL": "Spanjol (iÄ‹-ÄŠili)", + "es_CO": "Spanjol (il-Kolombja)", + "es_CR": "Spanjol (il-Costa Rica)", + "es_CU": "Spanjol (Kuba)", + "es_DO": "Spanjol (ir-Repubblika Dominicana)", + "es_EA": "Spanjol (Ceuta u Melilla)", + "es_EC": "Spanjol (l-Ekwador)", + "es_ES": "Spanjol (Spanja)", + "es_GQ": "Spanjol (il-Guinea Ekwatorjali)", + "es_GT": "Spanjol (il-Gwatemala)", + "es_HN": "Spanjol (il-Honduras)", + "es_IC": "Spanjol (il-Gżejjer Canary)", + "es_MX": "Spanjol (il-Messiku)", + "es_NI": "Spanjol (in-Nikaragwa)", + "es_PA": "Spanjol (il-Panama)", + "es_PE": "Spanjol (il-Perù)", + "es_PH": "Spanjol (il-Filippini)", + "es_PR": "Spanjol (Puerto Rico)", + "es_PY": "Spanjol (il-Paragwaj)", + "es_SV": "Spanjol (El Salvador)", + "es_US": "Spanjol (l-Istati Uniti)", + "es_UY": "Spanjol (l-Urugwaj)", + "es_VE": "Spanjol (il-Venezwela)", + "et": "Estonjan", + "et_EE": "Estonjan (l-Estonja)", + "eu": "Bask", + "eu_ES": "Bask (Spanja)", + "fa": "Persjan", + "fa_AF": "Persjan (l-Afganistan)", + "fa_IR": "Persjan (l-Iran)", + "ff": "Fulah", + "ff_CM": "Fulah (il-Kamerun)", + "ff_GN": "Fulah (il-Guinea)", + "ff_MR": "Fulah (il-Mauritania)", + "ff_SN": "Fulah (is-Senegal)", + "fi": "Finlandiż", + "fi_FI": "Finlandiż (il-Finlandja)", + "fo": "Faroese", + "fo_DK": "Faroese (id-Danimarka)", + "fo_FO": "Faroese (il-Gżejjer Faeroe)", + "fr": "FranÄ‹iż", + "fr_BE": "FranÄ‹iż (il-BelÄ¡ju)", + "fr_BF": "FranÄ‹iż (il-Burkina Faso)", + "fr_BI": "FranÄ‹iż (il-Burundi)", + "fr_BJ": "FranÄ‹iż (il-Benin)", + "fr_BL": "FranÄ‹iż (Saint Barthélemy)", + "fr_CA": "FranÄ‹iż (il-Kanada)", + "fr_CD": "FranÄ‹iż (ir-Repubblika Demokratika tal-Kongo)", + "fr_CF": "FranÄ‹iż (ir-Repubblika ÄŠentru-Afrikana)", + "fr_CG": "FranÄ‹iż (il-Kongo - Brazzaville)", + "fr_CH": "FranÄ‹iż (Å»vizzera)", + "fr_CI": "FranÄ‹iż (il-Kosta tal-Avorju)", + "fr_CM": "FranÄ‹iż (il-Kamerun)", + "fr_DJ": "FranÄ‹iż (il-Djibouti)", + "fr_DZ": "FranÄ‹iż (l-AlÄ¡erija)", + "fr_FR": "FranÄ‹iż (Franza)", + "fr_GA": "FranÄ‹iż (il-Gabon)", + "fr_GF": "FranÄ‹iż (il-Guyana FranÄ‹iża)", + "fr_GN": "FranÄ‹iż (il-Guinea)", + "fr_GP": "FranÄ‹iż (Guadeloupe)", + "fr_GQ": "FranÄ‹iż (il-Guinea Ekwatorjali)", + "fr_HT": "FranÄ‹iż (il-Haiti)", + "fr_KM": "FranÄ‹iż (Comoros)", + "fr_LU": "FranÄ‹iż (il-Lussemburgu)", + "fr_MA": "FranÄ‹iż (il-Marokk)", + "fr_MC": "FranÄ‹iż (Monaco)", + "fr_MF": "FranÄ‹iż (Saint Martin)", + "fr_MG": "FranÄ‹iż (Madagascar)", + "fr_ML": "FranÄ‹iż (il-Mali)", + "fr_MQ": "FranÄ‹iż (Martinique)", + "fr_MR": "FranÄ‹iż (il-Mauritania)", + "fr_MU": "FranÄ‹iż (Mauritius)", + "fr_NC": "FranÄ‹iż (New Caledonia)", + "fr_NE": "FranÄ‹iż (in-NiÄ¡er)", + "fr_PF": "FranÄ‹iż (Polineżja FranÄ‹iża)", + "fr_PM": "FranÄ‹iż (Saint Pierre u Miquelon)", + "fr_RE": "FranÄ‹iż (Réunion)", + "fr_RW": "FranÄ‹iż (ir-Rwanda)", + "fr_SC": "FranÄ‹iż (is-Seychelles)", + "fr_SN": "FranÄ‹iż (is-Senegal)", + "fr_SY": "FranÄ‹iż (is-Sirja)", + "fr_TD": "FranÄ‹iż (iÄ‹-Chad)", + "fr_TG": "FranÄ‹iż (it-Togo)", + "fr_TN": "FranÄ‹iż (it-Tuneżija)", + "fr_VU": "FranÄ‹iż (Vanuatu)", + "fr_WF": "FranÄ‹iż (Wallis u Futuna)", + "fr_YT": "FranÄ‹iż (Mayotte)", + "fy": "Frisian tal-Punent", + "fy_NL": "Frisian tal-Punent (in-Netherlands)", + "ga": "Irlandiż", + "ga_IE": "Irlandiż (l-Irlanda)", + "gd": "Galliku Skoċċiż", + "gd_GB": "Galliku Skoċċiż (ir-Renju Unit)", + "gl": "GaliÄ‹jan", + "gl_ES": "GaliÄ‹jan (Spanja)", + "gu": "Gujarati", + "gu_IN": "Gujarati (l-Indja)", + "gv": "Manx", + "gv_IM": "Manx (Isle of Man)", + "ha": "Hausa", + "ha_GH": "Hausa (il-Ghana)", + "ha_NE": "Hausa (in-NiÄ¡er)", + "ha_NG": "Hausa (in-NiÄ¡erja)", + "he": "Ebrajk", + "he_IL": "Ebrajk (Iżrael)", + "hi": "Hindi", + "hi_IN": "Hindi (l-Indja)", + "hr": "Kroat", + "hr_BA": "Kroat (il-Bożnija-Ħerzegovina)", + "hr_HR": "Kroat (il-Kroazja)", + "hu": "Ungeriż", + "hu_HU": "Ungeriż (l-Ungerija)", + "hy": "Armen", + "hy_AM": "Armen (l-Armenja)", + "id": "Indoneżjan", + "id_ID": "Indoneżjan (l-Indoneżja)", + "ig": "Igbo", + "ig_NG": "Igbo (in-NiÄ¡erja)", + "ii": "Sichuan Yi", + "ii_CN": "Sichuan Yi (CN)", + "is": "Iżlandiż", + "is_IS": "Iżlandiż (l-iżlanda)", + "it": "Taljan", + "it_CH": "Taljan (Å»vizzera)", + "it_IT": "Taljan (l-Italja)", + "it_SM": "Taljan (San Marino)", + "ja": "Ä appuniż", + "ja_JP": "Ä appuniż (il-Ä appun)", + "ka": "Ä orÄ¡jan", + "ka_GE": "Ä orÄ¡jan (il-Georgia)", + "ki": "Kikuju", + "ki_KE": "Kikuju (il-Kenja)", + "kk": "Każak", + "kk_KZ": "Każak (il-Każakistan)", + "kl": "Kalallisut", + "kl_GL": "Kalallisut (Greenland)", + "km": "Khmer", + "km_KH": "Khmer (il-Kambodja)", + "kn": "Kannada", + "kn_IN": "Kannada (l-Indja)", + "ko": "Korean", + "ko_KP": "Korean (il-Korea ta’ Fuq)", + "ko_KR": "Korean (il-Korea t’Isfel)", + "ks": "Kashmiri", + "ks_IN": "Kashmiri (l-Indja)", + "kw": "Korniku", + "kw_GB": "Korniku (ir-Renju Unit)", + "ky": "Kirgiż", + "ky_KG": "Kirgiż (il-Kirgiżistan)", + "lb": "Lussemburgiż", + "lb_LU": "Lussemburgiż (il-Lussemburgu)", + "lg": "Ganda", + "lg_UG": "Ganda (l-Uganda)", + "ln": "Lingaljan", + "ln_AO": "Lingaljan (l-Angola)", + "ln_CD": "Lingaljan (ir-Repubblika Demokratika tal-Kongo)", + "ln_CF": "Lingaljan (ir-Repubblika ÄŠentru-Afrikana)", + "ln_CG": "Lingaljan (il-Kongo - Brazzaville)", + "lo": "Laosjan", + "lo_LA": "Laosjan (il-Laos)", + "lt": "Litwan", + "lt_LT": "Litwan (il-Litwanja)", + "lu": "Luba-Katanga", + "lu_CD": "Luba-Katanga (ir-Repubblika Demokratika tal-Kongo)", + "lv": "Latvjan", + "lv_LV": "Latvjan (il-Latvja)", + "mg": "Malagasy", + "mg_MG": "Malagasy (Madagascar)", + "mk": "MaÄ‹edonjan", + "mk_MK": "MaÄ‹edonjan (l-Eks-Repubblika Jugoslava tal-MaÄ‹edonia)", + "ml": "Malayalam", + "ml_IN": "Malayalam (l-Indja)", + "mn": "Mongoljan", + "mn_MN": "Mongoljan (il-Mongolja)", + "mr": "Marathi", + "mr_IN": "Marathi (l-Indja)", + "ms": "Malay", + "ms_BN": "Malay (il-Brunei)", + "ms_MY": "Malay (il-Malasja)", + "ms_SG": "Malay (Singapore)", + "mt": "Malti", + "mt_MT": "Malti (Malta)", + "my": "Burmiż", + "my_MM": "Burmiż (il-Myanmar\/Burma)", + "nb": "Bokmal NorveÄ¡iż", + "nb_NO": "Bokmal NorveÄ¡iż (in-NorveÄ¡ja)", + "nb_SJ": "Bokmal NorveÄ¡iż (Svalbard u Jan Mayen)", + "nd": "Ndebeli tat-Tramuntana", + "nd_ZW": "Ndebeli tat-Tramuntana (iż-Å»imbabwe)", + "ne": "Nepaliż", + "ne_IN": "Nepaliż (l-Indja)", + "ne_NP": "Nepaliż (in-Nepal)", + "nl": "Olandiż", + "nl_AW": "Olandiż (Aruba)", + "nl_BE": "Olandiż (il-BelÄ¡ju)", + "nl_BQ": "Olandiż (in-Netherlands tal-Karibew)", + "nl_CW": "Olandiż (Curaçao)", + "nl_NL": "Olandiż (in-Netherlands)", + "nl_SR": "Olandiż (is-Suriname)", + "nl_SX": "Olandiż (Sint Maarten)", + "nn": "Ninorsk NorveÄ¡iż", + "nn_NO": "Ninorsk NorveÄ¡iż (in-NorveÄ¡ja)", + "no": "NorveÄ¡iż", + "no_NO": "NorveÄ¡iż (in-NorveÄ¡ja)", + "om": "Oromo", + "om_ET": "Oromo (l-Etjopja)", + "om_KE": "Oromo (il-Kenja)", + "or": "Odia", + "or_IN": "Odia (l-Indja)", + "os": "Ossettiku", + "os_GE": "Ossettiku (il-Georgia)", + "os_RU": "Ossettiku (ir-Russja)", + "pa": "Punjabi", + "pa_Arab": "Punjabi (Għarbi)", + "pa_Arab_PK": "Punjabi (Għarbi, il-Pakistan)", + "pa_IN": "Punjabi (l-Indja)", + "pa_PK": "Punjabi (il-Pakistan)", + "pl": "Pollakk", + "pl_PL": "Pollakk (il-Polonja)", + "ps": "Pashto", + "ps_AF": "Pashto (l-Afganistan)", + "pt": "Portugiż", + "pt_AO": "Portugiż (l-Angola)", + "pt_BR": "Portugiż (Il-Brażil)", + "pt_CH": "Portugiż (Å»vizzera)", + "pt_CV": "Portugiż (Cape Verde)", + "pt_GQ": "Portugiż (il-Guinea Ekwatorjali)", + "pt_GW": "Portugiż (il-Guinea-Bissau)", + "pt_LU": "Portugiż (il-Lussemburgu)", + "pt_MO": "Portugiż (ir-ReÄ¡jun Amministrattiv SpeÄ‹jali tal-Macao tar-Repubblika tal-Poplu taÄ‹-ÄŠina)", + "pt_MZ": "Portugiż (il-Mozambique)", + "pt_PT": "Portugiż (il-Portugall)", + "pt_ST": "Portugiż (São Tomé u Príncipe)", + "pt_TL": "Portugiż (Timor Leste)", + "qu": "Quechua", + "qu_BO": "Quechua (il-Bolivja)", + "qu_EC": "Quechua (l-Ekwador)", + "qu_PE": "Quechua (il-Perù)", + "rm": "Romanz", + "rm_CH": "Romanz (Å»vizzera)", + "rn": "Rundi", + "rn_BI": "Rundi (il-Burundi)", + "ro": "Rumen", + "ro_MD": "Rumen (il-Moldova)", + "ro_RO": "Rumen (ir-Rumanija)", + "ru": "Russu", + "ru_BY": "Russu (il-Belarussja)", + "ru_KG": "Russu (il-Kirgiżistan)", + "ru_KZ": "Russu (il-Każakistan)", + "ru_MD": "Russu (il-Moldova)", + "ru_RU": "Russu (ir-Russja)", + "ru_UA": "Russu (l-Ukrajna)", + "rw": "Kinjarwanda", + "rw_RW": "Kinjarwanda (ir-Rwanda)", + "se": "Sami tat-Tramuntana", + "se_FI": "Sami tat-Tramuntana (il-Finlandja)", + "se_NO": "Sami tat-Tramuntana (in-NorveÄ¡ja)", + "se_SE": "Sami tat-Tramuntana (l-Iżvezja)", + "sg": "Sango", + "sg_CF": "Sango (ir-Repubblika ÄŠentru-Afrikana)", + "sh": "Serbo-Kroat", + "sh_BA": "Serbo-Kroat (il-Bożnija-Ħerzegovina)", + "si": "Sinhala", + "si_LK": "Sinhala (is-Sri Lanka)", + "sk": "Slovakk", + "sk_SK": "Slovakk (is-Slovakkja)", + "sl": "Sloven", + "sl_SI": "Sloven (is-Slovenja)", + "sn": "Shona", + "sn_ZW": "Shona (iż-Å»imbabwe)", + "so": "Somali", + "so_DJ": "Somali (il-Djibouti)", + "so_ET": "Somali (l-Etjopja)", + "so_KE": "Somali (il-Kenja)", + "so_SO": "Somali (is-Somalja)", + "sq": "Albaniż", + "sq_AL": "Albaniż (l-Albanija)", + "sq_MK": "Albaniż (l-Eks-Repubblika Jugoslava tal-MaÄ‹edonia)", + "sq_XK": "Albaniż (Kosovo)", + "sr": "Serb", + "sr_BA": "Serb (il-Bożnija-Ħerzegovina)", + "sr_Cyrl": "Serb (ÄŠirilliku)", + "sr_Cyrl_BA": "Serb (ÄŠirilliku, il-Bożnija-Ħerzegovina)", + "sr_Cyrl_ME": "Serb (ÄŠirilliku, il-Montenegro)", + "sr_Cyrl_RS": "Serb (ÄŠirilliku, is-Serbja)", + "sr_Cyrl_XK": "Serb (ÄŠirilliku, Kosovo)", + "sr_Latn": "Serb (Latin)", + "sr_Latn_BA": "Serb (Latin, il-Bożnija-Ħerzegovina)", + "sr_Latn_ME": "Serb (Latin, il-Montenegro)", + "sr_Latn_RS": "Serb (Latin, is-Serbja)", + "sr_Latn_XK": "Serb (Latin, Kosovo)", + "sr_ME": "Serb (il-Montenegro)", + "sr_RS": "Serb (is-Serbja)", + "sr_XK": "Serb (Kosovo)", + "sv": "Å»vezja", + "sv_AX": "Å»vezja (il-Gżejjer Aland)", + "sv_FI": "Å»vezja (il-Finlandja)", + "sv_SE": "Å»vezja (l-Iżvezja)", + "sw": "Swahili", + "sw_CD": "Swahili (ir-Repubblika Demokratika tal-Kongo)", + "sw_KE": "Swahili (il-Kenja)", + "sw_TZ": "Swahili (it-Tanzanija)", + "sw_UG": "Swahili (l-Uganda)", + "ta": "Tamil", + "ta_IN": "Tamil (l-Indja)", + "ta_LK": "Tamil (is-Sri Lanka)", + "ta_MY": "Tamil (il-Malasja)", + "ta_SG": "Tamil (Singapore)", + "te": "Telugu", + "te_IN": "Telugu (l-Indja)", + "th": "Tajlandiż", + "th_TH": "Tajlandiż (it-Tajlandja)", + "ti": "Tigrinya", + "ti_ER": "Tigrinya (l-Eritrea)", + "ti_ET": "Tigrinya (l-Etjopja)", + "tl": "Tagalog", + "tl_PH": "Tagalog (il-Filippini)", + "to": "Tongan", + "to_TO": "Tongan (Tonga)", + "tr": "Tork", + "tr_CY": "Tork (ÄŠipru)", + "tr_TR": "Tork (it-Turkija)", + "ug": "Uyghur", + "ug_CN": "Uyghur (CN)", + "uk": "Ukren", + "uk_UA": "Ukren (l-Ukrajna)", + "ur": "ur", + "ur_IN": "ur (l-Indja)", + "ur_PK": "ur (il-Pakistan)", + "uz": "Uzbek", + "uz_AF": "Uzbek (l-Afganistan)", + "uz_Arab": "Uzbek (Għarbi)", + "uz_Arab_AF": "Uzbek (Għarbi, l-Afganistan)", + "uz_Cyrl": "Uzbek (ÄŠirilliku)", + "uz_Cyrl_UZ": "Uzbek (ÄŠirilliku, l-Użbekistan)", + "uz_Latn": "Uzbek (Latin)", + "uz_Latn_UZ": "Uzbek (Latin, l-Użbekistan)", + "uz_UZ": "Uzbek (l-Użbekistan)", + "vi": "Vjetnamiż", + "vi_VN": "Vjetnamiż (il-Vjetnam)", + "yi": "Yiddish", + "yo": "Yoruba", + "yo_BJ": "Yoruba (il-Benin)", + "yo_NG": "Yoruba (in-NiÄ¡erja)", + "zh": "ÄŠiniż", + "zh_CN": "ÄŠiniż (CN)", + "zh_HK": "ÄŠiniż (ir-ReÄ¡jun Amministrattiv SpeÄ‹jali ta’ Hong Kong tar-Repubblika tal-Poplu taÄ‹-ÄŠina)", + "zh_Hans": "ÄŠiniż (Simplifikat)", + "zh_Hans_CN": "ÄŠiniż (Simplifikat, CN)", + "zh_Hans_HK": "ÄŠiniż (Simplifikat, ir-ReÄ¡jun Amministrattiv SpeÄ‹jali ta’ Hong Kong tar-Repubblika tal-Poplu taÄ‹-ÄŠina)", + "zh_Hans_MO": "ÄŠiniż (Simplifikat, ir-ReÄ¡jun Amministrattiv SpeÄ‹jali tal-Macao tar-Repubblika tal-Poplu taÄ‹-ÄŠina)", + "zh_Hans_SG": "ÄŠiniż (Simplifikat, Singapore)", + "zh_Hant": "ÄŠiniż (Tradizzjonali)", + "zh_Hant_HK": "ÄŠiniż (Tradizzjonali, ir-ReÄ¡jun Amministrattiv SpeÄ‹jali ta’ Hong Kong tar-Repubblika tal-Poplu taÄ‹-ÄŠina)", + "zh_Hant_MO": "ÄŠiniż (Tradizzjonali, ir-ReÄ¡jun Amministrattiv SpeÄ‹jali tal-Macao tar-Repubblika tal-Poplu taÄ‹-ÄŠina)", + "zh_Hant_TW": "ÄŠiniż (Tradizzjonali, it-Tajwan)", + "zh_MO": "ÄŠiniż (ir-ReÄ¡jun Amministrattiv SpeÄ‹jali tal-Macao tar-Repubblika tal-Poplu taÄ‹-ÄŠina)", + "zh_SG": "ÄŠiniż (Singapore)", + "zh_TW": "ÄŠiniż (it-Tajwan)", + "zu": "Zulu", + "zu_ZA": "Zulu (l-Afrika t’Isfel)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/my.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/my.json new file mode 100644 index 0000000000000000000000000000000000000000..27ffcc923676d0b6920ff27cc910ecb2d790f590 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/my.json @@ -0,0 +1,564 @@ +{ + "Names": { + "af": "á€á€±á€¬á€„်အာဖရိက", + "af_NA": "á€á€±á€¬á€„်အာဖရိက (နမီးဘီးယား)", + "af_ZA": "á€á€±á€¬á€„်အာဖရိက (á€á€±á€¬á€„်အာဖရိက)", + "ak": "အာကန်", + "ak_GH": "အာကန် (ဂါနာ)", + "am": "အမ်ဟာရစ်á€á€º", + "am_ET": "အမ်ဟာရစ်á€á€º (အီသီယိုးပီးယား)", + "ar": "အာရဗီ", + "ar_AE": "အာရဗီ (ယူအေအီး)", + "ar_BH": "အာရဗီ (ဘာရိန်း)", + "ar_DJ": "အာရဗီ (ဂျီဘူá€á€®)", + "ar_DZ": "အာရဗီ (အယ်လ်ဂျီးရီးယား)", + "ar_EG": "အာရဗီ (အီဂျစ်)", + "ar_EH": "အာရဗီ (အနောက် ဆာဟာရ)", + "ar_ER": "အာရဗီ (အီရီထရီးယား)", + "ar_IL": "အာရဗီ (အစ္စရေး)", + "ar_IQ": "အာရဗီ (အီရá€á€º)", + "ar_JO": "အာရဗီ (ဂျော်ဒန်)", + "ar_KM": "အာရဗီ (ကိုမိုရိုစ်)", + "ar_KW": "အာရဗီ (ကူá€á€­á€á€º)", + "ar_LB": "အာရဗီ (လက်ဘနွန်)", + "ar_LY": "အာရဗီ (လစ်ဗျား)", + "ar_MA": "အာရဗီ (မော်ရိုကို)", + "ar_MR": "အာရဗီ (မော်ရီá€á€±á€¸á€”ီးယား)", + "ar_OM": "အာရဗီ (အိုမန်)", + "ar_PS": "အာရဗီ (ပါလက်စá€á€­á€¯á€„်း ပိုင်နက်)", + "ar_QA": "အာရဗီ (ကာá€á€¬)", + "ar_SA": "အာရဗီ (ဆော်ဒီအာရေးဘီးယား)", + "ar_SD": "အာရဗီ (ဆူဒန်)", + "ar_SO": "အာရဗီ (ဆိုမာလီယာ)", + "ar_SS": "အာရဗီ (á€á€±á€¬á€„် ဆူဒန်)", + "ar_SY": "အာရဗီ (ဆီးရီးယား)", + "ar_TD": "အာရဗီ (á€á€»á€’်)", + "ar_TN": "အာရဗီ (á€á€°á€”ီးရှား)", + "ar_YE": "အာရဗီ (ယီမင်)", + "as": "အာသံ", + "as_IN": "အာသံ (အိန္ဒိယ)", + "az": "အဇာဘိုင်ဂျန်", + "az_AZ": "အဇာဘိုင်ဂျန် (အဇာဘိုင်ဂျန်)", + "az_Cyrl": "အဇာဘိုင်ဂျန် (စစ်ရိလစ်)", + "az_Cyrl_AZ": "အဇာဘိုင်ဂျန် (စစ်ရိလစ်, အဇာဘိုင်ဂျန်)", + "az_Latn": "အဇာဘိုင်ဂျန် (လက်á€á€„်)", + "az_Latn_AZ": "အဇာဘိုင်ဂျန် (လက်á€á€„်, အဇာဘိုင်ဂျန်)", + "be": "ဘီလာရုဇ်", + "be_BY": "ဘီလာရုဇ် (ဘီလာရုဇ်)", + "bg": "ဘူလ်ဂေးရီးယား", + "bg_BG": "ဘူလ်ဂေးရီးယား (ဘူလ်ဂေးရီးယား)", + "bm": "ဘန်ဘာရာ", + "bm_ML": "ဘန်ဘာရာ (မာလီ)", + "bn": "ဘင်္ဂါလီ", + "bn_BD": "ဘင်္ဂါလီ (ဘင်္ဂလားဒေ့ရှ်)", + "bn_IN": "ဘင်္ဂါလီ (အိန္ဒိယ)", + "bo": "á€á€­á€˜á€€á€º", + "bo_CN": "á€á€­á€˜á€€á€º (á€á€›á€¯á€á€º)", + "bo_IN": "á€á€­á€˜á€€á€º (အိန္ဒိယ)", + "br": "ဘရီá€á€½á€”်", + "br_FR": "ဘရီá€á€½á€”် (ပြင်သစ်)", + "bs": "ဘော့စ်နီးယား", + "bs_BA": "ဘော့စ်နီးယား (ဘော့စနီးယားနှင့် ဟာဇီဂိုဗီနား)", + "bs_Cyrl": "ဘော့စ်နီးယား (စစ်ရိလစ်)", + "bs_Cyrl_BA": "ဘော့စ်နီးယား (စစ်ရိလစ်, ဘော့စနီးယားနှင့် ဟာဇီဂိုဗီနား)", + "bs_Latn": "ဘော့စ်နီးယား (လက်á€á€„်)", + "bs_Latn_BA": "ဘော့စ်နီးယား (လက်á€á€„်, ဘော့စနီးယားနှင့် ဟာဇီဂိုဗီနား)", + "ca": "ကá€á€ºá€á€œá€”်", + "ca_AD": "ကá€á€ºá€á€œá€”် (အင်ဒိုရာ)", + "ca_ES": "ကá€á€ºá€á€œá€”် (စပိန်)", + "ca_FR": "ကá€á€ºá€á€œá€”် (ပြင်သစ်)", + "ca_IT": "ကá€á€ºá€á€œá€”် (အီá€á€œá€®)", + "ce": "á€á€»á€€á€ºá€á€»á€”်း", + "ce_RU": "á€á€»á€€á€ºá€á€»á€”်း (ရုရှ)", + "cs": "á€á€»á€€á€º", + "cs_CZ": "á€á€»á€€á€º (á€á€»á€€á€º ပြည်ထောင်စု)", + "cy": "á€á€±á€œ", + "cy_GB": "á€á€±á€œ (ယူနိုက်á€á€€á€ºá€€á€„်းဒမ်း)", + "da": "ဒိန်းမá€á€º", + "da_DK": "ဒိန်းမá€á€º (ဒိန်းမá€á€º)", + "da_GL": "ဒိန်းမá€á€º (ဂရင်းလန်း)", + "de": "ဂျာမန်", + "de_AT": "ဂျာမန် (ဩစá€á€¼á€®á€¸á€šá€¬á€¸)", + "de_BE": "ဂျာမန် (ဘယ်လ်ဂျီယမ်)", + "de_CH": "ဂျာမန် (ဆွစ်ဇာလန်)", + "de_DE": "ဂျာမန် (ဂျာမá€á€®)", + "de_IT": "ဂျာမန် (အီá€á€œá€®)", + "de_LI": "ဂျာမန် (လစ်á€á€”်စá€á€­á€”်း)", + "de_LU": "ဂျာမန် (လူဇင်ဘá€á€º)", + "dz": "ဒဇွန်ကာ", + "dz_BT": "ဒဇွန်ကာ (ဘူá€á€”်)", + "ee": "အီá€á€®", + "ee_GH": "အီá€á€® (ဂါနာ)", + "ee_TG": "အီá€á€® (á€á€­á€¯á€‚ို)", + "el": "ဂရိ", + "el_CY": "ဂရိ (ဆိုက်ပရပ်စ်)", + "el_GR": "ဂရိ (ဂရိ)", + "en": "အင်္ဂလိပ်", + "en_AG": "အင်္ဂလိပ် (အင်á€á€®á€‚ွါနှင့် ဘာဘူဒါ)", + "en_AI": "အင်္ဂလိပ် (အန်ဂီလာ)", + "en_AS": "အင်္ဂလိပ် (အမေရိကန် ဆမိုးအား)", + "en_AT": "အင်္ဂလိပ် (ဩစá€á€¼á€®á€¸á€šá€¬á€¸)", + "en_AU": "အင်္ဂလိပ် (ဩစá€á€¼á€±á€¸á€œá€»)", + "en_BB": "အင်္ဂလိပ် (ဘာဘေးဒိုးစ်)", + "en_BE": "အင်္ဂလိပ် (ဘယ်လ်ဂျီယမ်)", + "en_BI": "အင်္ဂလိပ် (ဘူရွန်ဒီ)", + "en_BM": "အင်္ဂလိပ် (ဘာမြူဒါ)", + "en_BS": "အင်္ဂလိပ် (ဘဟားမား)", + "en_BW": "အင်္ဂလိပ် (ဘော့ဆွာနာ)", + "en_BZ": "အင်္ဂလိပ် (ဘလိဇ်)", + "en_CA": "အင်္ဂလိပ် (ကနေဒါ)", + "en_CC": "အင်္ဂလိပ် (ကိုကိုးကျွန်း)", + "en_CH": "အင်္ဂလိပ် (ဆွစ်ဇာလန်)", + "en_CK": "အင်္ဂလိပ် (ကွá€á€º ကျွန်းစု)", + "en_CM": "အင်္ဂလိပ် (ကင်မရွန်း)", + "en_CX": "အင်္ဂလိပ် (á€á€›á€…်စမá€á€º ကျွန်း)", + "en_CY": "အင်္ဂလိပ် (ဆိုက်ပရပ်စ်)", + "en_DE": "အင်္ဂလိပ် (ဂျာမá€á€®)", + "en_DG": "အင်္ဂလိပ် (ဒီအဲဂိုဂါစီရာ)", + "en_DK": "အင်္ဂလိပ် (ဒိန်းမá€á€º)", + "en_DM": "အင်္ဂလိပ် (ဒိုမီနီကာ)", + "en_ER": "အင်္ဂလိပ် (အီရီထရီးယား)", + "en_FI": "အင်္ဂလိပ် (ဖင်လန်)", + "en_FJ": "အင်္ဂလိပ် (ဖီဂျီ)", + "en_FK": "အင်္ဂလိပ် (ဖော့ကလန် ကျွန်းစု)", + "en_FM": "အင်္ဂလိပ် (မိုင်á€á€›á€­á€¯á€”ီရှား)", + "en_GB": "အင်္ဂလိပ် (ယူနိုက်á€á€€á€ºá€€á€„်းဒမ်း)", + "en_GD": "အင်္ဂလိပ် (ဂရီနေဒါ)", + "en_GG": "အင်္ဂလိပ် (ဂွန်းဇီ)", + "en_GH": "အင်္ဂလိပ် (ဂါနာ)", + "en_GI": "အင်္ဂလိပ် (ဂျီဘရော်လ်á€á€¬)", + "en_GM": "အင်္ဂလိပ် (ဂမ်ဘီရာ)", + "en_GU": "အင်္ဂလိပ် (ဂူအမ်)", + "en_GY": "အင်္ဂလိပ် (ဂိုင်ယာနာ)", + "en_HK": "အင်္ဂလိပ် (ဟောင်ကောင် (á€á€›á€¯á€á€ºá€•ြည်))", + "en_IE": "အင်္ဂလိပ် (အိုင်ယာလန်)", + "en_IL": "အင်္ဂလိပ် (အစ္စရေး)", + "en_IM": "အင်္ဂလိပ် (မန်ကျွန်း)", + "en_IN": "အင်္ဂလိပ် (အိန္ဒိယ)", + "en_IO": "အင်္ဂလိပ် (ဗြိá€á€­á€žá€»á€¾á€•ိုင် အိန္ဒိယသမုဒ္ဒရာကျွန်းများ)", + "en_JE": "အင်္ဂလိပ် (ဂျာစီ)", + "en_JM": "အင်္ဂလိပ် (ဂျမေကာ)", + "en_KE": "အင်္ဂလိပ် (ကင်ညာ)", + "en_KI": "အင်္ဂလိပ် (á€á€®á€›á€®á€˜á€¬á€á€®)", + "en_KN": "အင်္ဂလိပ် (စိန့်ကစ်နှင့်နီဗီစ်)", + "en_KY": "အင်္ဂလိပ် (ကေမန် ကျွန်းစု)", + "en_LC": "အင်္ဂလိပ် (စိန့်လူစီယာ)", + "en_LR": "အင်္ဂလိပ် (လိုက်ဘေးရီးယား)", + "en_LS": "အင်္ဂလိပ် (လီဆိုသို)", + "en_MG": "အင်္ဂလိပ် (မဒါဂá€á€ºá€…ကား)", + "en_MH": "အင်္ဂလိပ် (မာရှယ် ကျွန်းစု)", + "en_MO": "အင်္ဂလိပ် (မကာအို (á€á€›á€¯á€á€ºá€•ြည်))", + "en_MP": "အင်္ဂလိပ် (á€á€±á€¬á€„်ပိုင်းမာရီအာနာကျွန်းစု)", + "en_MS": "အင်္ဂလိပ် (မောင့်စဲရက်)", + "en_MT": "အင်္ဂလိပ် (မောလ်á€á€¬)", + "en_MU": "အင်္ဂလိပ် (မောရစ်ရှ)", + "en_MW": "အင်္ဂလိပ် (မာလာá€á€®)", + "en_MY": "အင်္ဂလိပ် (မလေးရှား)", + "en_NA": "အင်္ဂလိပ် (နမီးဘီးယား)", + "en_NF": "အင်္ဂလိပ် (နောဖုá€á€ºá€€á€»á€½á€”်း)", + "en_NG": "အင်္ဂလိပ် (နိုင်ဂျီးရီးယား)", + "en_NL": "အင်္ဂလိပ် (နယ်သာလန်)", + "en_NR": "အင်္ဂလိပ် (နော်ရူး)", + "en_NU": "အင်္ဂလိပ် (နီဥူအေ)", + "en_NZ": "အင်္ဂလိပ် (နယူးဇီလန်)", + "en_PG": "အင်္ဂလိပ် (ပါပူအာ နယူးဂီနီ)", + "en_PH": "အင်္ဂလိပ် (ဖိလစ်ပိုင်)", + "en_PK": "အင်္ဂလိပ် (ပါကစ္စá€á€”်)", + "en_PN": "အင်္ဂလိပ် (ပစ်á€á€ºá€€á€­á€”်းကျွန်းစု)", + "en_PR": "အင်္ဂလိပ် (ပေါ်á€á€­á€¯á€›á€®á€€á€­á€¯)", + "en_PW": "အင်္ဂလိပ် (ပလာအို)", + "en_RW": "အင်္ဂလိပ် (ရá€á€”်ဒါ)", + "en_SB": "အင်္ဂလိပ် (ဆော်လမွန်ကျွန်းစု)", + "en_SC": "အင်္ဂလိပ် (ဆေးရှဲ)", + "en_SD": "အင်္ဂလိပ် (ဆူဒန်)", + "en_SE": "အင်္ဂလိပ် (ဆွီဒင်)", + "en_SG": "အင်္ဂလိပ် (စင်္ကာပူ)", + "en_SH": "အင်္ဂလိပ် (စိန့်ဟယ်လယ်နာ)", + "en_SI": "အင်္ဂလိပ် (စလိုဗေးနီးယား)", + "en_SL": "အင်္ဂလိပ် (ဆီယာရာ လီယွန်း)", + "en_SS": "အင်္ဂလိပ် (á€á€±á€¬á€„် ဆူဒန်)", + "en_SX": "အင်္ဂလိပ် (စင့်မာá€á€„်)", + "en_SZ": "အင်္ဂလိပ် (ဆွာဇီလန်)", + "en_TC": "အင်္ဂလိပ် (á€á€á€ºá€…်နှင့်ကာအီကိုစ်ကျွန်းစု)", + "en_TK": "အင်္ဂလိပ် (á€á€­á€¯á€€á€œá€±á€¬á€„်)", + "en_TO": "အင်္ဂလိပ် (á€á€½á€”်ဂါ)", + "en_TT": "အင်္ဂလိပ် (ထရီနီဒá€á€ºá€”ှင့် á€á€­á€¯á€˜á€€á€ºá€‚ို)", + "en_TV": "အင်္ဂလိပ် (á€á€°á€—ားလူ)", + "en_TZ": "အင်္ဂလိပ် (á€á€”်ဇန်းနီးယား)", + "en_UG": "အင်္ဂလိပ် (ယူဂန်းဒါး)", + "en_UM": "အင်္ဂလိပ် (ယူနိုက်á€á€€á€ºá€…á€á€­á€á€º ကျွန်းနိုင်ငံများ)", + "en_US": "အင်္ဂလိပ် (ယူနိုက်á€á€€á€ºá€…á€á€­á€á€º)", + "en_VC": "အင်္ဂလိပ် (စိန့်ဗင်းဆင့်နှင့် ဂရိနေဒိုင်)", + "en_VG": "အင်္ဂလိပ် (ဗြိá€á€­á€žá€»á€¾ ဗာဂျင်း ကျွန်းစု)", + "en_VI": "အင်္ဂလိပ် (ယူအက်စ် ဗာဂျင်း ကျွန်းစု)", + "en_VU": "အင်္ဂလိပ် (ဗနွားá€á€°)", + "en_WS": "အင်္ဂလိပ် (ဆမိုးအား)", + "en_ZA": "အင်္ဂလိပ် (á€á€±á€¬á€„်အာဖရိက)", + "en_ZM": "အင်္ဂလိပ် (ဇမ်ဘီယာ)", + "en_ZW": "အင်္ဂလိပ် (ဇင်ဘာဘွေ)", + "eo": "အက်စ်ပရန်á€á€­á€¯", + "es": "စပိန်", + "es_AR": "စပိန် (အာဂျင်á€á€®á€¸á€”ား)", + "es_BO": "စပိန် (ဘိုလီးဗီးယား)", + "es_BR": "စပိန် (ဘရာဇီး)", + "es_CL": "စပိန် (á€á€»á€®á€œá€®)", + "es_CO": "စပိန် (ကိုလံဘီယာ)", + "es_CR": "စပိန် (ကို့စ်á€á€¬á€›á€®á€€á€¬)", + "es_CU": "စပိန် (ကျူးဘား)", + "es_DO": "စပိန် (ဒိုမီနီကန်)", + "es_EA": "စပိန် (ဆယ်ဥá€á€¬á€”ှင့်မယ်လီလ်လာ)", + "es_EC": "စပိန် (အီကွေဒေါ)", + "es_ES": "စပိန် (စပိန်)", + "es_GQ": "စပိန် (အီကွေá€á€¬ ဂီနီ)", + "es_GT": "စပိန် (ဂွါá€á€®á€™á€¬á€œá€¬)", + "es_HN": "စပိန် (ဟွန်ဒူးရပ်စ်)", + "es_IC": "စပိန် (ကနေရီ ကျွန်းစု)", + "es_MX": "စပိန် (မက္ကဆီကို)", + "es_NI": "စပိန် (နီကာရာဂွါ)", + "es_PA": "စပိန် (ပနားမား)", + "es_PE": "စပိန် (ပီရူး)", + "es_PH": "စပိန် (ဖိလစ်ပိုင်)", + "es_PR": "စပိန် (ပေါ်á€á€­á€¯á€›á€®á€€á€­á€¯)", + "es_PY": "စပိန် (ပါရာဂွေး)", + "es_SV": "စပိန် (အယ်လ်ဆာဗေးဒိုး)", + "es_US": "စပိန် (ယူနိုက်á€á€€á€ºá€…á€á€­á€á€º)", + "es_UY": "စပိန် (ဥရုဂွေး)", + "es_VE": "စပိန် (ဗင်နီဇွဲလား)", + "et": "အက်စ်á€á€­á€¯á€¸á€”ီးယား", + "et_EE": "အက်စ်á€á€­á€¯á€¸á€”ီးယား (အက်စá€á€­á€¯á€¸á€”ီးယား)", + "eu": "ဘာစ်á€á€º", + "eu_ES": "ဘာစ်á€á€º (စပိန်)", + "fa": "ပါရှန်", + "fa_AF": "ပါရှန် (အာဖဂန်နစ္စá€á€”်)", + "fa_IR": "ပါရှန် (အီရန်)", + "ff": "ဖူလာ", + "ff_CM": "ဖူလာ (ကင်မရွန်း)", + "ff_GN": "ဖူလာ (ဂီနီ)", + "ff_MR": "ဖူလာ (မော်ရီá€á€±á€¸á€”ီးယား)", + "ff_SN": "ဖူလာ (ဆီနီဂေါ)", + "fi": "ဖင်လန်", + "fi_FI": "ဖင်လန် (ဖင်လန်)", + "fo": "ဖာရို", + "fo_DK": "ဖာရို (ဒိန်းမá€á€º)", + "fo_FO": "ဖာရို (ဖာရိုး ကျွန်းစုများ)", + "fr": "ပြင်သစ်", + "fr_BE": "ပြင်သစ် (ဘယ်လ်ဂျီယမ်)", + "fr_BF": "ပြင်သစ် (ဘာကီးနား ဖားဆို)", + "fr_BI": "ပြင်သစ် (ဘူရွန်ဒီ)", + "fr_BJ": "ပြင်သစ် (ဘီနင်)", + "fr_BL": "ပြင်သစ် (စိန့်ဘာသယ်လ်မီ)", + "fr_CA": "ပြင်သစ် (ကနေဒါ)", + "fr_CD": "ပြင်သစ် (ကွန်ဂို)", + "fr_CF": "ပြင်သစ် (ဗဟို အာဖရိက ပြည်ထောင်စု)", + "fr_CG": "ပြင်သစ် (ကွန်ဂို-ဘရာဇာဗီးလ်)", + "fr_CH": "ပြင်သစ် (ဆွစ်ဇာလန်)", + "fr_CI": "ပြင်သစ် (ကို့á€á€º ဒီဗွာ)", + "fr_CM": "ပြင်သစ် (ကင်မရွန်း)", + "fr_DJ": "ပြင်သစ် (ဂျီဘူá€á€®)", + "fr_DZ": "ပြင်သစ် (အယ်လ်ဂျီးရီးယား)", + "fr_FR": "ပြင်သစ် (ပြင်သစ်)", + "fr_GA": "ပြင်သစ် (ဂါဘွန်)", + "fr_GF": "ပြင်သစ် (ပြင်á€žá€…် ဂိုင်ယာနာ)", + "fr_GN": "ပြင်သစ် (ဂီနီ)", + "fr_GP": "ပြင်သစ် (ဂွါဒီလု)", + "fr_GQ": "ပြင်သစ် (အီကွေá€á€¬ ဂီနီ)", + "fr_HT": "ပြင်သစ် (ဟေá€á€®)", + "fr_KM": "ပြင်သစ် (ကိုမိုရိုစ်)", + "fr_LU": "ပြင်သစ် (လူဇင်ဘá€á€º)", + "fr_MA": "ပြင်သစ် (မော်ရိုကို)", + "fr_MC": "ပြင်သစ် (မိုနာကို)", + "fr_MF": "ပြင်သစ် (စိန့်မာá€á€„်)", + "fr_MG": "ပြင်သစ် (မဒါဂá€á€ºá€…ကား)", + "fr_ML": "ပြင်သစ် (မာလီ)", + "fr_MQ": "ပြင်သစ် (မာá€á€®á€”ိá€á€º)", + "fr_MR": "ပြင်သစ် (မော်ရီá€á€±á€¸á€”ီးယား)", + "fr_MU": "ပြင်သစ် (မောရစ်ရှ)", + "fr_NC": "ပြင်သစ် (နယူး ကယ်လီဒိုနီးယား)", + "fr_NE": "ပြင်သစ် (နိုင်ဂျာ)", + "fr_PF": "ပြင်သစ် (ပြင်သစ် ပေါ်လီနီးရှား)", + "fr_PM": "ပြင်သစ် (စိန့်ပီအဲရ်နှင့် မီကွီလွန်)", + "fr_RE": "ပြင်သစ် (ဟေညွန်)", + "fr_RW": "ပြင်သစ် (ရá€á€”်ဒါ)", + "fr_SC": "ပြင်သစ် (ဆေးရှဲ)", + "fr_SN": "ပြင်သစ် (ဆီနီဂေါ)", + "fr_SY": "ပြင်သစ် (ဆီးရီးယား)", + "fr_TD": "ပြင်သစ် (á€á€»á€’်)", + "fr_TG": "ပြင်သစ် (á€á€­á€¯á€‚ို)", + "fr_TN": "ပြင်သစ် (á€á€°á€”ီးရှား)", + "fr_VU": "ပြင်သစ် (ဗနွားá€á€°)", + "fr_WF": "ပြင်သစ် (á€á€±á€«á€œá€…်နှင့် ဖူကျူးနား)", + "fr_YT": "ပြင်သစ် (မာယိုá€á€±á€¸)", + "fy": "အနောက် ဖရီစီရန်", + "fy_NL": "အနောက် ဖရီစီရန် (နယ်သာလန်)", + "ga": "အိုင်းရစ်ရှ်", + "ga_IE": "အိုင်းရစ်ရှ် (အိုင်ယာလန်)", + "gd": "စကော့á€á€…်ရှ် ဂေးလစ်á€á€º", + "gd_GB": "စကော့á€á€…်ရှ် ဂေးလစ်á€á€º (ယူနိုက်á€á€€á€ºá€€á€„်းဒမ်း)", + "gl": "ဂါလီစီယာ", + "gl_ES": "ဂါလီစီယာ (စပိန်)", + "gu": "ဂူဂျာရသီ", + "gu_IN": "ဂူဂျာရသီ (အိန္ဒိယ)", + "gv": "မန်းဇ်", + "gv_IM": "မန်းဇ် (မန်ကျွန်း)", + "ha": "ဟာဥစာ", + "ha_GH": "ဟာဥစာ (ဂါနာ)", + "ha_NE": "ဟာဥစာ (နိုင်ဂျာ)", + "ha_NG": "ဟာဥစာ (နိုင်ဂျီးရီးယား)", + "he": "ဟီးဘရူး", + "he_IL": "ဟီးဘရူး (အစ္စရေး)", + "hi": "ဟိန္ဒူ", + "hi_IN": "ဟိန္ဒူ (အိန္ဒိယ)", + "hr": "á€á€›á€­á€¯á€¡á€±á€¸á€›á€¾á€¬á€¸", + "hr_BA": "á€á€›á€­á€¯á€¡á€±á€¸á€›á€¾á€¬á€¸ (ဘော့စနီးယားနှင့် ဟာဇီဂိုဗီနား)", + "hr_HR": "á€á€›á€­á€¯á€¡á€±á€¸á€›á€¾á€¬á€¸ (á€á€›á€­á€¯á€¡á€±á€¸á€›á€¾á€¬á€¸)", + "hu": "ဟန်ဂေရီ", + "hu_HU": "ဟန်ဂေရီ (ဟန်ဂေရီ)", + "hy": "အာမေးနီးယား", + "hy_AM": "အာမေးနီးယား (အာမေးနီးယား)", + "id": "အင်ဒိုနီးရှား", + "id_ID": "အင်ဒိုနီးရှား (အင်ဒိုနီးရှား)", + "ig": "အစ္ဂဘို", + "ig_NG": "အစ္ဂဘို (နိုင်ဂျီးရီးယား)", + "ii": "စီá€á€»á€½á€™á€º ရီ", + "ii_CN": "စီá€á€»á€½á€™á€º ရီ (á€á€›á€¯á€á€º)", + "is": "အိုက်စ်လန်", + "is_IS": "အိုက်စ်လန် (အိုက်စလန်)", + "it": "အီá€á€œá€®", + "it_CH": "အီá€á€œá€® (ဆွစ်ဇာလန်)", + "it_IT": "အီá€á€œá€® (အီá€á€œá€®)", + "it_SM": "အီá€á€œá€® (ဆန်မာရီနို)", + "ja": "ဂျပန်", + "ja_JP": "ဂျပန် (ဂျပန်)", + "ka": "ဂျော်ဂျီယာ", + "ka_GE": "ဂျော်ဂျီယာ (ဂျော်ဂျီယာ)", + "ki": "ကီကူယူ", + "ki_KE": "ကီကူယူ (ကင်ညာ)", + "kk": "ကာဇာá€á€º", + "kk_KZ": "ကာဇာá€á€º (ကာဇက်စá€á€”်)", + "kl": "ကလာအ်လီဆပ်", + "kl_GL": "ကလာအ်လီဆပ် (ဂရင်းလန်း)", + "km": "á€á€™á€¬", + "km_KH": "á€á€™á€¬ (ကမ္ဘောဒီးယား)", + "kn": "ကန္နာဒါ", + "kn_IN": "ကန္နာဒါ (အိန္ဒိယ)", + "ko": "ကိုရီးယား", + "ko_KP": "ကိုရီးယား (မြောက်ကိုရီးယား)", + "ko_KR": "ကိုရီးယား (á€á€±á€¬á€„်ကိုရီးယား)", + "ks": "ကက်ရှ်မီးယား", + "ks_IN": "ကက်ရှ်မီးယား (အိန္ဒိယ)", + "kw": "á€á€­á€¯á€”ီရှ်", + "kw_GB": "á€á€­á€¯á€”ီရှ် (ယူနိုက်á€á€€á€ºá€€á€„်းဒမ်း)", + "ky": "ကာဂျစ်", + "ky_KG": "ကာဂျစ် (ကာဂျစ္စá€á€”်)", + "lb": "လူဇင်ဘá€á€º", + "lb_LU": "လူဇင်ဘá€á€º (လူဇင်ဘá€á€º)", + "lg": "ဂန်ဒါ", + "lg_UG": "ဂန်ဒါ (ယူဂန်းဒါး)", + "ln": "လင်ဂါလာ", + "ln_AO": "လင်ဂါလာ (အင်ဂိုလာ)", + "ln_CD": "လင်ဂါလာ (ကွန်ဂို)", + "ln_CF": "လင်ဂါလာ (ဗဟို အာဖရိက ပြည်ထောင်စု)", + "ln_CG": "လင်ဂါလာ (ကွန်ဂို-ဘရာဇာဗီးလ်)", + "lo": "လာအို", + "lo_LA": "လာအို (လာအို)", + "lt": "လစ်သူá€á€±á€¸á€”ီးယား", + "lt_LT": "လစ်သူá€á€±á€¸á€”ီးယား (လစ်သူယေးနီးယား)", + "lu": "လူဘာ-ကá€á€”်ဂါ", + "lu_CD": "လူဘာ-ကá€á€”်ဂါ (ကွန်ဂို)", + "lv": "လá€á€ºá€—ီးယား", + "lv_LV": "လá€á€ºá€—ီးယား (လá€á€ºá€—ီးယား)", + "mg": "မာလဂက်စီ", + "mg_MG": "မာလဂက်စီ (မဒါဂá€á€ºá€…ကား)", + "mk": "မက်စီဒိုးနီးယား", + "mk_MK": "မက်စီဒိုးနီးယား (မက်စီဒိုးနီးယား)", + "ml": "မလေးရာလမ်", + "ml_IN": "မလေးရာလမ် (အိန္ဒိယ)", + "mn": "မွန်ဂိုလီးယား", + "mn_MN": "မွန်ဂိုလီးယား (မွန်ဂိုးလီးယား)", + "mr": "မာရသီ", + "mr_IN": "မာရသီ (အိန္ဒိယ)", + "ms": "မလေး", + "ms_BN": "မလေး (ဘရူနိုင်း)", + "ms_MY": "မလေး (မလေးရှား)", + "ms_SG": "မလေး (စင်္ကာပူ)", + "mt": "မော်လ်á€á€¬", + "mt_MT": "မော်လ်á€á€¬ (မောလ်á€á€¬)", + "my": "မြန်မာ", + "my_MM": "မြန်မာ (မြန်မာ)", + "nb": "နော်á€á€±á€¸ ဘွá€á€ºá€á€ºá€™á€±á€¬á€ºá€œá€º", + "nb_NO": "နော်á€á€±á€¸ ဘွá€á€ºá€á€ºá€™á€±á€¬á€ºá€œá€º (နော်á€á€±)", + "nb_SJ": "နော်á€á€±á€¸ ဘွá€á€ºá€á€ºá€™á€±á€¬á€ºá€œá€º (စဗိုလ်ဘá€á€ºá€”ှင့်ဂျန်မေရန်)", + "nd": "á€á€±á€¬á€„် အွန်န်ဒီဘီလီ", + "nd_ZW": "á€á€±á€¬á€„် အွန်န်ဒီဘီလီ (ဇင်ဘာဘွေ)", + "ne": "နီပေါ", + "ne_IN": "နီပေါ (အိန္ဒိယ)", + "ne_NP": "နီပေါ (နီပေါ)", + "nl": "ဒá€á€ºá€á€»á€º", + "nl_AW": "ဒá€á€ºá€á€»á€º (အာရူးဗား)", + "nl_BE": "ဒá€á€ºá€á€»á€º (ဘယ်လ်ဂျီယမ်)", + "nl_BQ": "ဒá€á€ºá€á€»á€º (ကာရစ်ဘီယံ နယ်သာလန်)", + "nl_CW": "ဒá€á€ºá€á€»á€º (ကျူရေးကိုးစ်)", + "nl_NL": "ဒá€á€ºá€á€»á€º (နယ်သာလန်)", + "nl_SR": "ဒá€á€ºá€á€»á€º (ဆူရာနမ်)", + "nl_SX": "ဒá€á€ºá€á€»á€º (စင့်မာá€á€„်)", + "nn": "နော်á€á€±á€¸ နီးနောစ်", + "nn_NO": "နော်á€á€±á€¸ နီးနောစ် (နော်á€á€±)", + "no": "နော်á€á€±á€¸", + "no_NO": "နော်á€á€±á€¸ (နော်á€á€±)", + "om": "အိုရိုမို", + "om_ET": "အိုရိုမို (အီသီယိုးပီးယား)", + "om_KE": "အိုရိုမို (ကင်ညာ)", + "or": "အိုရီရာ", + "or_IN": "အိုရီရာ (အိန္ဒိယ)", + "os": "အိုဆဲá€á€…်á€á€º", + "os_GE": "အိုဆဲá€á€…်á€á€º (ဂျော်ဂျီယာ)", + "os_RU": "အိုဆဲá€á€…်á€á€º (ရုရှ)", + "pa": "ပန်á€á€»á€¬á€•ီ", + "pa_Arab": "ပန်á€á€»á€¬á€•ီ (အာရေဗျ)", + "pa_Arab_PK": "ပန်á€á€»á€¬á€•ီ (အာရေဗျ, ပါကစ္စá€á€”်)", + "pa_Guru": "ပန်á€á€»á€¬á€•ီ (ဂူရူ)", + "pa_Guru_IN": "ပန်á€á€»á€¬á€•ီ (ဂူရူ, အိန္ဒိယ)", + "pa_IN": "ပန်á€á€»á€¬á€•ီ (အိန္ဒိယ)", + "pa_PK": "ပန်á€á€»á€¬á€•ီ (ပါကစ္စá€á€”်)", + "pl": "ပိုလန်", + "pl_PL": "ပိုလန် (ပိုလန်)", + "ps": "ပက်ရှ်á€á€½á€”်း", + "ps_AF": "ပက်ရှ်á€á€½á€”်း (အာဖဂန်နစ္စá€á€”်)", + "pt": "ပေါ်á€á€°á€‚ီ", + "pt_AO": "ပေါ်á€á€°á€‚ီ (အင်ဂိုလာ)", + "pt_BR": "ပေါ်á€á€°á€‚ီ (ဘရာဇီး)", + "pt_CH": "ပေါ်á€á€°á€‚ီ (ဆွစ်ဇာလန်)", + "pt_CV": "ပေါ်á€á€°á€‚ီ (ကိá€á€ºá€—ာဒီ)", + "pt_GQ": "ပေါ်á€á€°á€‚ီ (အီကွေá€á€¬ ဂီနီ)", + "pt_GW": "ပေါ်á€á€°á€‚ီ (ဂီနီ-ဘီစော)", + "pt_LU": "ပေါ်á€á€°á€‚ီ (လူဇင်ဘá€á€º)", + "pt_MO": "ပေါ်á€á€°á€‚ီ (မကာအို (á€á€›á€¯á€á€ºá€•ြည်))", + "pt_MZ": "ပေါ်á€á€°á€‚ီ (မိုဇမ်ဘစ်)", + "pt_PT": "ပေါ်á€á€°á€‚ီ (ပေါ်á€á€°á€‚ီ)", + "pt_ST": "ပေါ်á€á€°á€‚ီ (ဆောင်á€á€°á€™á€±á€¸á€”ှင့် ပရင်စီပီ)", + "pt_TL": "ပေါ်á€á€°á€‚ီ (အရှေ့á€á€®á€™á€±á€¬)", + "qu": "á€á€®á€á€»á€°á€á€«á€¡á€­á€¯á€á€«", + "qu_BO": "á€á€®á€á€»á€°á€á€«á€¡á€­á€¯á€á€« (ဘိုလီးဗီးယား)", + "qu_EC": "á€á€®á€á€»á€°á€á€«á€¡á€­á€¯á€á€« (အီကွေဒေါ)", + "qu_PE": "á€á€®á€á€»á€°á€á€«á€¡á€­á€¯á€á€« (ပီရူး)", + "rm": "ရောမ", + "rm_CH": "ရောမ (ဆွစ်ဇာလန်)", + "rn": "ရွန်ဒီ", + "rn_BI": "ရွန်ဒီ (ဘူရွန်ဒီ)", + "ro": "ရိုမေနီယား", + "ro_MD": "ရိုမေနီယား (မောလ်ဒိုဗာ)", + "ro_RO": "ရိုမေနီယား (ရိုမေးနီးယား)", + "ru": "ရုရှ", + "ru_BY": "ရုရှ (ဘီလာရုဇ်)", + "ru_KG": "ရုရှ (ကာဂျစ္စá€á€”်)", + "ru_KZ": "ရုရှ (ကာဇက်စá€á€”်)", + "ru_MD": "ရုရှ (မောလ်ဒိုဗာ)", + "ru_RU": "ရုရှ (ရုရှ)", + "ru_UA": "ရုရှ (ယူကရိန်း)", + "rw": "ကင်ရာá€á€”်ဒါ", + "rw_RW": "ကင်ရာá€á€”်ဒါ (ရá€á€”်ဒါ)", + "se": "မြောက် ဆာမိ", + "se_FI": "မြောက် ဆာမိ (ဖင်လန်)", + "se_NO": "မြောက် ဆာမိ (နော်á€á€±)", + "se_SE": "မြောက် ဆာမိ (ဆွီဒင်)", + "sg": "ဆန်ဂို", + "sg_CF": "ဆန်ဂို (ဗဟို အာဖရိက ပြည်ထောင်စု)", + "si": "စင်ဟာလာ", + "si_LK": "စင်ဟာလာ (သီရိလင်္ကာ)", + "sk": "စလိုဗက်", + "sk_SK": "စလိုဗက် (ဆလိုဗက်ကီးယား)", + "sl": "စလိုဗေးနီးယား", + "sl_SI": "စလိုဗေးနီးယား (စလိုဗေးနီးယား)", + "sn": "ရှိုနာ", + "sn_ZW": "ရှိုနာ (ဇင်ဘာဘွေ)", + "so": "ဆိုမာလီ", + "so_DJ": "ဆိုမာလီ (ဂျီဘူá€á€®)", + "so_ET": "ဆိုမာလီ (အီသီယိုးပီးယား)", + "so_KE": "ဆိုမာလီ (ကင်ညာ)", + "so_SO": "ဆိုမာလီ (ဆိုမာလီယာ)", + "sq": "အယ်လ်ဘေးနီးယား", + "sq_AL": "အယ်လ်ဘေးနီးယား (အယ်လ်ဘေးနီးယား)", + "sq_MK": "အယ်လ်ဘေးနီးယား (မက်စီဒိုးနီးယား)", + "sq_XK": "အယ်လ်ဘေးနီးယား (ကိုဆိုဗို)", + "sr": "ဆားဘီးယား", + "sr_BA": "ဆားဘီးယား (ဘော့စနီးယားနှင့် ဟာဇီဂိုဗီနား)", + "sr_Cyrl": "ဆားဘီးယား (စစ်ရိလစ်)", + "sr_Cyrl_BA": "ဆားဘီးယား (စစ်ရိလစ်, ဘော့စနီးယားနှင့် ဟာဇီဂိုဗီနား)", + "sr_Cyrl_ME": "ဆားဘီးယား (စစ်ရိလစ်, မွန်á€á€®á€”ိဂရိုး)", + "sr_Cyrl_RS": "ဆားဘီးယား (စစ်ရိလစ်, ဆားဘီးယား)", + "sr_Cyrl_XK": "ဆားဘီးယား (စစ်ရိလစ်, ကိုဆိုဗို)", + "sr_Latn": "ဆားဘီးယား (လက်á€á€„်)", + "sr_Latn_BA": "ဆားဘီးယား (လက်á€á€„်, ဘော့စနီးယားနှင့် ဟာဇီဂိုဗီနား)", + "sr_Latn_ME": "ဆားဘီးယား (လက်á€á€„်, မွန်á€á€®á€”ိဂရိုး)", + "sr_Latn_RS": "ဆားဘီးယား (လက်á€á€„်, ဆားဘီးယား)", + "sr_Latn_XK": "ဆားဘီးယား (လက်á€á€„်, ကိုဆိုဗို)", + "sr_ME": "ဆားဘီးယား (မွန်á€á€®á€”ိဂရိုး)", + "sr_RS": "ဆားဘီးယား (ဆားဘီးယား)", + "sr_XK": "ဆားဘီးယား (ကိုဆိုဗို)", + "sv": "ဆွီဒင်", + "sv_AX": "ဆွီဒင် (အာလန်ကျွန်း)", + "sv_FI": "ဆွီဒင် (ဖင်လန်)", + "sv_SE": "ဆွီဒင် (ဆွီဒင်)", + "sw": "ဆွာဟီလီ", + "sw_CD": "ဆွာဟီလီ (ကွန်ဂို)", + "sw_KE": "ဆွာဟီလီ (ကင်ညာ)", + "sw_TZ": "ဆွာဟီလီ (á€á€”်ဇန်းနီးယား)", + "sw_UG": "ဆွာဟီလီ (ယူဂန်းဒါး)", + "ta": "á€á€™á€®á€¸á€œá€º", + "ta_IN": "á€á€™á€®á€¸á€œá€º (အိန္ဒိယ)", + "ta_LK": "á€á€™á€®á€¸á€œá€º (သီရိလင်္ကာ)", + "ta_MY": "á€á€™á€®á€¸á€œá€º (မလေးရှား)", + "ta_SG": "á€á€™á€®á€¸á€œá€º (စင်္ကာပူ)", + "te": "á€á€®á€œá€®á€‚ူ", + "te_IN": "á€á€®á€œá€®á€‚ူ (အိန္ဒိယ)", + "th": "ထိုင်း", + "th_TH": "ထိုင်း (ထိုင်း)", + "ti": "á€á€®á€‚်ရင်ရာ", + "ti_ER": "á€á€®á€‚်ရင်ရာ (အီရီထရီးယား)", + "ti_ET": "á€á€®á€‚်ရင်ရာ (အီသီယိုးပီးယား)", + "to": "á€á€½á€”်ဂါ", + "to_TO": "á€á€½á€”်ဂါ (á€á€½á€”်ဂါ)", + "tr": "á€á€°á€›á€€á€®", + "tr_CY": "á€á€°á€›á€€á€® (ဆိုက်ပရပ်စ်)", + "tr_TR": "á€á€°á€›á€€á€® (á€á€°á€›á€€á€®)", + "ug": "á€á€®á€‚ါ", + "ug_CN": "á€á€®á€‚ါ (á€á€›á€¯á€á€º)", + "uk": "ယူကရိန်း", + "uk_UA": "ယူကရိန်း (ယူကရိန်း)", + "ur": "အူရ်ဒူ", + "ur_IN": "အူရ်ဒူ (အိန္ဒိယ)", + "ur_PK": "အူရ်ဒူ (ပါကစ္စá€á€”်)", + "uz": "ဦးဇ်ဘက်", + "uz_AF": "ဦးဇ်ဘက် (အာဖဂန်နစ္စá€á€”်)", + "uz_Arab": "ဦးဇ်ဘက် (အာရေဗျ)", + "uz_Arab_AF": "ဦးဇ်ဘက် (အာရေဗျ, အာဖဂန်နစ္စá€á€”်)", + "uz_Cyrl": "ဦးဇ်ဘက် (စစ်ရိလစ်)", + "uz_Cyrl_UZ": "ဦးဇ်ဘက် (စစ်ရိလစ်, ဉဇဘက်ကစ္စá€á€”်)", + "uz_Latn": "ဦးဇ်ဘက် (လက်á€á€„်)", + "uz_Latn_UZ": "ဦးဇ်ဘက် (လက်á€á€„်, ဉဇဘက်ကစ္စá€á€”်)", + "uz_UZ": "ဦးဇ်ဘက် (ဉဇဘက်ကစ္စá€á€”်)", + "vi": "ဗီယက်နမ်", + "vi_VN": "ဗီယက်နမ် (ဗီယက်နမ်)", + "yi": "ဂျူး", + "yo": "ယိုရူဘာ", + "yo_BJ": "ယိုရူဘာ (ဘီနင်)", + "yo_NG": "ယိုရူဘာ (နိုင်ဂျီးရီးယား)", + "zh": "á€á€›á€¯á€á€º", + "zh_CN": "á€á€›á€¯á€á€º (á€á€›á€¯á€á€º)", + "zh_HK": "á€á€›á€¯á€á€º (ဟောင်ကောင် (á€á€›á€¯á€á€ºá€•ြည်))", + "zh_Hans": "á€á€›á€¯á€á€º (ရိုးရှင်း)", + "zh_Hans_CN": "á€á€›á€¯á€á€º (ရိုးရှင်း, á€á€›á€¯á€á€º)", + "zh_Hans_HK": "á€á€›á€¯á€á€º (ရိုးရှင်း, ဟောင်ကောင် (á€á€›á€¯á€á€ºá€•ြည်))", + "zh_Hans_MO": "á€á€›á€¯á€á€º (ရိုးရှင်း, မကာအို (á€á€›á€¯á€á€ºá€•ြည်))", + "zh_Hans_SG": "á€á€›á€¯á€á€º (ရိုးရှင်း, စင်္ကာပူ)", + "zh_Hant": "á€á€›á€¯á€á€º (ရိုးရာ)", + "zh_Hant_HK": "á€á€›á€¯á€á€º (ရိုးရာ, ဟောင်ကောင် (á€á€›á€¯á€á€ºá€•ြည်))", + "zh_Hant_MO": "á€á€›á€¯á€á€º (ရိုးရာ, မကာအို (á€á€›á€¯á€á€ºá€•ြည်))", + "zh_Hant_TW": "á€á€›á€¯á€á€º (ရိုးရာ, ထိုင်á€á€™á€º)", + "zh_MO": "á€á€›á€¯á€á€º (မကာအို (á€á€›á€¯á€á€ºá€•ြည်))", + "zh_SG": "á€á€›á€¯á€á€º (စင်္ကာပူ)", + "zh_TW": "á€á€›á€¯á€á€º (ထိုင်á€á€™á€º)", + "zu": "ဇူးလူး", + "zu_ZA": "ဇူးလူး (á€á€±á€¬á€„်အာဖရိက)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/nb.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/nb.json new file mode 100644 index 0000000000000000000000000000000000000000..7ecf289d73fc5f4eed8ac4a15bae110a3a5678c0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/nb.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibia)", + "af_ZA": "afrikaans (Sør-Afrika)", + "ak": "akan", + "ak_GH": "akan (Ghana)", + "am": "amharisk", + "am_ET": "amharisk (Etiopia)", + "ar": "arabisk", + "ar_AE": "arabisk (De forente arabiske emirater)", + "ar_BH": "arabisk (Bahrain)", + "ar_DJ": "arabisk (Djibouti)", + "ar_DZ": "arabisk (Algerie)", + "ar_EG": "arabisk (Egypt)", + "ar_EH": "arabisk (Vest-Sahara)", + "ar_ER": "arabisk (Eritrea)", + "ar_IL": "arabisk (Israel)", + "ar_IQ": "arabisk (Irak)", + "ar_JO": "arabisk (Jordan)", + "ar_KM": "arabisk (Komorene)", + "ar_KW": "arabisk (Kuwait)", + "ar_LB": "arabisk (Libanon)", + "ar_LY": "arabisk (Libya)", + "ar_MA": "arabisk (Marokko)", + "ar_MR": "arabisk (Mauritania)", + "ar_OM": "arabisk (Oman)", + "ar_PS": "arabisk (Det palestinske omrÃ¥det)", + "ar_QA": "arabisk (Qatar)", + "ar_SA": "arabisk (Saudi-Arabia)", + "ar_SD": "arabisk (Sudan)", + "ar_SO": "arabisk (Somalia)", + "ar_SS": "arabisk (Sør-Sudan)", + "ar_SY": "arabisk (Syria)", + "ar_TD": "arabisk (Tsjad)", + "ar_TN": "arabisk (Tunisia)", + "ar_YE": "arabisk (Jemen)", + "as": "assamesisk", + "as_IN": "assamesisk (India)", + "az": "aserbajdsjansk", + "az_AZ": "aserbajdsjansk (Aserbajdsjan)", + "az_Cyrl": "aserbajdsjansk (kyrillisk)", + "az_Cyrl_AZ": "aserbajdsjansk (kyrillisk, Aserbajdsjan)", + "az_Latn": "aserbajdsjansk (latinsk)", + "az_Latn_AZ": "aserbajdsjansk (latinsk, Aserbajdsjan)", + "be": "hviterussisk", + "be_BY": "hviterussisk (Hviterussland)", + "bg": "bulgarsk", + "bg_BG": "bulgarsk (Bulgaria)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengali", + "bn_BD": "bengali (Bangladesh)", + "bn_IN": "bengali (India)", + "bo": "tibetansk", + "bo_CN": "tibetansk (Kina)", + "bo_IN": "tibetansk (India)", + "br": "bretonsk", + "br_FR": "bretonsk (Frankrike)", + "bs": "bosnisk", + "bs_BA": "bosnisk (Bosnia-Hercegovina)", + "bs_Cyrl": "bosnisk (kyrillisk)", + "bs_Cyrl_BA": "bosnisk (kyrillisk, Bosnia-Hercegovina)", + "bs_Latn": "bosnisk (latinsk)", + "bs_Latn_BA": "bosnisk (latinsk, Bosnia-Hercegovina)", + "ca": "katalansk", + "ca_AD": "katalansk (Andorra)", + "ca_ES": "katalansk (Spania)", + "ca_FR": "katalansk (Frankrike)", + "ca_IT": "katalansk (Italia)", + "ce": "tsjetsjensk", + "ce_RU": "tsjetsjensk (Russland)", + "cs": "tsjekkisk", + "cs_CZ": "tsjekkisk (Den tsjekkiske republikk)", + "cy": "walisisk", + "cy_GB": "walisisk (Storbritannia)", + "da": "dansk", + "da_DK": "dansk (Danmark)", + "da_GL": "dansk (Grønland)", + "de": "tysk", + "de_AT": "tysk (Østerrike)", + "de_BE": "tysk (Belgia)", + "de_CH": "tysk (Sveits)", + "de_DE": "tysk (Tyskland)", + "de_IT": "tysk (Italia)", + "de_LI": "tysk (Liechtenstein)", + "de_LU": "tysk (Luxemburg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhutan)", + "ee": "ewe", + "ee_GH": "ewe (Ghana)", + "ee_TG": "ewe (Togo)", + "el": "gresk", + "el_CY": "gresk (Kypros)", + "el_GR": "gresk (Hellas)", + "en": "engelsk", + "en_AG": "engelsk (Antigua og Barbuda)", + "en_AI": "engelsk (Anguilla)", + "en_AS": "engelsk (Amerikansk Samoa)", + "en_AT": "engelsk (Østerrike)", + "en_AU": "engelsk (Australia)", + "en_BB": "engelsk (Barbados)", + "en_BE": "engelsk (Belgia)", + "en_BI": "engelsk (Burundi)", + "en_BM": "engelsk (Bermuda)", + "en_BS": "engelsk (Bahamas)", + "en_BW": "engelsk (Botswana)", + "en_BZ": "engelsk (Belize)", + "en_CA": "engelsk (Canada)", + "en_CC": "engelsk (Kokosøyene)", + "en_CH": "engelsk (Sveits)", + "en_CK": "engelsk (Cookøyene)", + "en_CM": "engelsk (Kamerun)", + "en_CX": "engelsk (Christmasøya)", + "en_CY": "engelsk (Kypros)", + "en_DE": "engelsk (Tyskland)", + "en_DG": "engelsk (Diego Garcia)", + "en_DK": "engelsk (Danmark)", + "en_DM": "engelsk (Dominica)", + "en_ER": "engelsk (Eritrea)", + "en_FI": "engelsk (Finland)", + "en_FJ": "engelsk (Fiji)", + "en_FK": "engelsk (Falklandsøyene)", + "en_FM": "engelsk (Mikronesiaføderasjonen)", + "en_GB": "engelsk (Storbritannia)", + "en_GD": "engelsk (Grenada)", + "en_GG": "engelsk (Guernsey)", + "en_GH": "engelsk (Ghana)", + "en_GI": "engelsk (Gibraltar)", + "en_GM": "engelsk (Gambia)", + "en_GU": "engelsk (Guam)", + "en_GY": "engelsk (Guyana)", + "en_HK": "engelsk (Hongkong S.A.R. Kina)", + "en_IE": "engelsk (Irland)", + "en_IL": "engelsk (Israel)", + "en_IM": "engelsk (Man)", + "en_IN": "engelsk (India)", + "en_IO": "engelsk (Det britiske territoriet i Indiahavet)", + "en_JE": "engelsk (Jersey)", + "en_JM": "engelsk (Jamaica)", + "en_KE": "engelsk (Kenya)", + "en_KI": "engelsk (Kiribati)", + "en_KN": "engelsk (Saint Kitts og Nevis)", + "en_KY": "engelsk (Caymanøyene)", + "en_LC": "engelsk (St. Lucia)", + "en_LR": "engelsk (Liberia)", + "en_LS": "engelsk (Lesotho)", + "en_MG": "engelsk (Madagaskar)", + "en_MH": "engelsk (Marshalløyene)", + "en_MO": "engelsk (Macao S.A.R. Kina)", + "en_MP": "engelsk (Nord-Marianene)", + "en_MS": "engelsk (Montserrat)", + "en_MT": "engelsk (Malta)", + "en_MU": "engelsk (Mauritius)", + "en_MW": "engelsk (Malawi)", + "en_MY": "engelsk (Malaysia)", + "en_NA": "engelsk (Namibia)", + "en_NF": "engelsk (Norfolkøya)", + "en_NG": "engelsk (Nigeria)", + "en_NL": "engelsk (Nederland)", + "en_NR": "engelsk (Nauru)", + "en_NU": "engelsk (Niue)", + "en_NZ": "engelsk (New Zealand)", + "en_PG": "engelsk (Papua Ny-Guinea)", + "en_PH": "engelsk (Filippinene)", + "en_PK": "engelsk (Pakistan)", + "en_PN": "engelsk (Pitcairn)", + "en_PR": "engelsk (Puerto Rico)", + "en_PW": "engelsk (Palau)", + "en_RW": "engelsk (Rwanda)", + "en_SB": "engelsk (Salomonøyene)", + "en_SC": "engelsk (Seychellene)", + "en_SD": "engelsk (Sudan)", + "en_SE": "engelsk (Sverige)", + "en_SG": "engelsk (Singapore)", + "en_SH": "engelsk (St. Helena)", + "en_SI": "engelsk (Slovenia)", + "en_SL": "engelsk (Sierra Leone)", + "en_SS": "engelsk (Sør-Sudan)", + "en_SX": "engelsk (Sint Maarten)", + "en_SZ": "engelsk (Swaziland)", + "en_TC": "engelsk (Turks- og Caicosøyene)", + "en_TK": "engelsk (Tokelau)", + "en_TO": "engelsk (Tonga)", + "en_TT": "engelsk (Trinidad og Tobago)", + "en_TV": "engelsk (Tuvalu)", + "en_TZ": "engelsk (Tanzania)", + "en_UG": "engelsk (Uganda)", + "en_UM": "engelsk (USAs ytre øyer)", + "en_US": "engelsk (USA)", + "en_VC": "engelsk (St. Vincent og Grenadinene)", + "en_VG": "engelsk (De britiske jomfruøyene)", + "en_VI": "engelsk (De amerikanske jomfruøyene)", + "en_VU": "engelsk (Vanuatu)", + "en_WS": "engelsk (Samoa)", + "en_ZA": "engelsk (Sør-Afrika)", + "en_ZM": "engelsk (Zambia)", + "en_ZW": "engelsk (Zimbabwe)", + "eo": "esperanto", + "es": "spansk", + "es_AR": "spansk (Argentina)", + "es_BO": "spansk (Bolivia)", + "es_BR": "spansk (Brasil)", + "es_CL": "spansk (Chile)", + "es_CO": "spansk (Colombia)", + "es_CR": "spansk (Costa Rica)", + "es_CU": "spansk (Cuba)", + "es_DO": "spansk (Den dominikanske republikk)", + "es_EA": "spansk (Ceuta og Melilla)", + "es_EC": "spansk (Ecuador)", + "es_ES": "spansk (Spania)", + "es_GQ": "spansk (Ekvatorial-Guinea)", + "es_GT": "spansk (Guatemala)", + "es_HN": "spansk (Honduras)", + "es_IC": "spansk (Kanariøyene)", + "es_MX": "spansk (Mexico)", + "es_NI": "spansk (Nicaragua)", + "es_PA": "spansk (Panama)", + "es_PE": "spansk (Peru)", + "es_PH": "spansk (Filippinene)", + "es_PR": "spansk (Puerto Rico)", + "es_PY": "spansk (Paraguay)", + "es_SV": "spansk (El Salvador)", + "es_US": "spansk (USA)", + "es_UY": "spansk (Uruguay)", + "es_VE": "spansk (Venezuela)", + "et": "estisk", + "et_EE": "estisk (Estland)", + "eu": "baskisk", + "eu_ES": "baskisk (Spania)", + "fa": "persisk", + "fa_AF": "persisk (Afghanistan)", + "fa_IR": "persisk (Iran)", + "ff": "fulfulde", + "ff_CM": "fulfulde (Kamerun)", + "ff_GN": "fulfulde (Guinea)", + "ff_MR": "fulfulde (Mauritania)", + "ff_SN": "fulfulde (Senegal)", + "fi": "finsk", + "fi_FI": "finsk (Finland)", + "fo": "færøysk", + "fo_DK": "færøysk (Danmark)", + "fo_FO": "færøysk (Færøyene)", + "fr": "fransk", + "fr_BE": "fransk (Belgia)", + "fr_BF": "fransk (Burkina Faso)", + "fr_BI": "fransk (Burundi)", + "fr_BJ": "fransk (Benin)", + "fr_BL": "fransk (Saint-Barthélemy)", + "fr_CA": "fransk (Canada)", + "fr_CD": "fransk (Kongo-Kinshasa)", + "fr_CF": "fransk (Den sentralafrikanske republikk)", + "fr_CG": "fransk (Kongo-Brazzaville)", + "fr_CH": "fransk (Sveits)", + "fr_CI": "fransk (Elfenbenskysten)", + "fr_CM": "fransk (Kamerun)", + "fr_DJ": "fransk (Djibouti)", + "fr_DZ": "fransk (Algerie)", + "fr_FR": "fransk (Frankrike)", + "fr_GA": "fransk (Gabon)", + "fr_GF": "fransk (Fransk Guyana)", + "fr_GN": "fransk (Guinea)", + "fr_GP": "fransk (Guadeloupe)", + "fr_GQ": "fransk (Ekvatorial-Guinea)", + "fr_HT": "fransk (Haiti)", + "fr_KM": "fransk (Komorene)", + "fr_LU": "fransk (Luxemburg)", + "fr_MA": "fransk (Marokko)", + "fr_MC": "fransk (Monaco)", + "fr_MF": "fransk (Saint-Martin)", + "fr_MG": "fransk (Madagaskar)", + "fr_ML": "fransk (Mali)", + "fr_MQ": "fransk (Martinique)", + "fr_MR": "fransk (Mauritania)", + "fr_MU": "fransk (Mauritius)", + "fr_NC": "fransk (Ny-Caledonia)", + "fr_NE": "fransk (Niger)", + "fr_PF": "fransk (Fransk Polynesia)", + "fr_PM": "fransk (St. Pierre og Miquelon)", + "fr_RE": "fransk (Réunion)", + "fr_RW": "fransk (Rwanda)", + "fr_SC": "fransk (Seychellene)", + "fr_SN": "fransk (Senegal)", + "fr_SY": "fransk (Syria)", + "fr_TD": "fransk (Tsjad)", + "fr_TG": "fransk (Togo)", + "fr_TN": "fransk (Tunisia)", + "fr_VU": "fransk (Vanuatu)", + "fr_WF": "fransk (Wallis og Futuna)", + "fr_YT": "fransk (Mayotte)", + "fy": "vestfrisisk", + "fy_NL": "vestfrisisk (Nederland)", + "ga": "irsk", + "ga_IE": "irsk (Irland)", + "gd": "skotsk-gælisk", + "gd_GB": "skotsk-gælisk (Storbritannia)", + "gl": "galisisk", + "gl_ES": "galisisk (Spania)", + "gu": "gujarati", + "gu_IN": "gujarati (India)", + "gv": "mansk", + "gv_IM": "mansk (Man)", + "ha": "hausa", + "ha_GH": "hausa (Ghana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigeria)", + "he": "hebraisk", + "he_IL": "hebraisk (Israel)", + "hi": "hindi", + "hi_IN": "hindi (India)", + "hr": "kroatisk", + "hr_BA": "kroatisk (Bosnia-Hercegovina)", + "hr_HR": "kroatisk (Kroatia)", + "hu": "ungarsk", + "hu_HU": "ungarsk (Ungarn)", + "hy": "armensk", + "hy_AM": "armensk (Armenia)", + "id": "indonesisk", + "id_ID": "indonesisk (Indonesia)", + "ig": "ibo", + "ig_NG": "ibo (Nigeria)", + "ii": "sichuan-yi", + "ii_CN": "sichuan-yi (Kina)", + "is": "islandsk", + "is_IS": "islandsk (Island)", + "it": "italiensk", + "it_CH": "italiensk (Sveits)", + "it_IT": "italiensk (Italia)", + "it_SM": "italiensk (San Marino)", + "ja": "japansk", + "ja_JP": "japansk (Japan)", + "ka": "georgisk", + "ka_GE": "georgisk (Georgia)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenya)", + "kk": "kasakhisk", + "kk_KZ": "kasakhisk (Kasakhstan)", + "kl": "grønlandsk", + "kl_GL": "grønlandsk (Grønland)", + "km": "khmer", + "km_KH": "khmer (Kambodsja)", + "kn": "kannada", + "kn_IN": "kannada (India)", + "ko": "koreansk", + "ko_KP": "koreansk (Nord-Korea)", + "ko_KR": "koreansk (Sør-Korea)", + "ks": "kasjmiri", + "ks_IN": "kasjmiri (India)", + "kw": "kornisk", + "kw_GB": "kornisk (Storbritannia)", + "ky": "kirgisisk", + "ky_KG": "kirgisisk (Kirgisistan)", + "lb": "luxemburgsk", + "lb_LU": "luxemburgsk (Luxemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongo-Kinshasa)", + "ln_CF": "lingala (Den sentralafrikanske republikk)", + "ln_CG": "lingala (Kongo-Brazzaville)", + "lo": "laotisk", + "lo_LA": "laotisk (Laos)", + "lt": "litauisk", + "lt_LT": "litauisk (Litauen)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Kongo-Kinshasa)", + "lv": "latvisk", + "lv_LV": "latvisk (Latvia)", + "mg": "gassisk", + "mg_MG": "gassisk (Madagaskar)", + "mk": "makedonsk", + "mk_MK": "makedonsk (Makedonia)", + "ml": "malayalam", + "ml_IN": "malayalam (India)", + "mn": "mongolsk", + "mn_MN": "mongolsk (Mongolia)", + "mr": "marathi", + "mr_IN": "marathi (India)", + "ms": "malayisk", + "ms_BN": "malayisk (Brunei)", + "ms_MY": "malayisk (Malaysia)", + "ms_SG": "malayisk (Singapore)", + "mt": "maltesisk", + "mt_MT": "maltesisk (Malta)", + "my": "burmesisk", + "my_MM": "burmesisk (Myanmar (Burma))", + "nb": "norsk bokmÃ¥l", + "nb_NO": "norsk bokmÃ¥l (Norge)", + "nb_SJ": "norsk bokmÃ¥l (Svalbard og Jan Mayen)", + "nd": "nord-ndebele", + "nd_ZW": "nord-ndebele (Zimbabwe)", + "ne": "nepali", + "ne_IN": "nepali (India)", + "ne_NP": "nepali (Nepal)", + "nl": "nederlandsk", + "nl_AW": "nederlandsk (Aruba)", + "nl_BE": "nederlandsk (Belgia)", + "nl_BQ": "nederlandsk (Karibisk Nederland)", + "nl_CW": "nederlandsk (Curaçao)", + "nl_NL": "nederlandsk (Nederland)", + "nl_SR": "nederlandsk (Surinam)", + "nl_SX": "nederlandsk (Sint Maarten)", + "nn": "norsk nynorsk", + "nn_NO": "norsk nynorsk (Norge)", + "no": "norsk", + "no_NO": "norsk (Norge)", + "om": "oromo", + "om_ET": "oromo (Etiopia)", + "om_KE": "oromo (Kenya)", + "or": "oriya", + "or_IN": "oriya (India)", + "os": "ossetisk", + "os_GE": "ossetisk (Georgia)", + "os_RU": "ossetisk (Russland)", + "pa": "punjabi", + "pa_Arab": "punjabi (arabisk)", + "pa_Arab_PK": "punjabi (arabisk, Pakistan)", + "pa_Guru": "punjabi (gurmukhi)", + "pa_Guru_IN": "punjabi (gurmukhi, India)", + "pa_IN": "punjabi (India)", + "pa_PK": "punjabi (Pakistan)", + "pl": "polsk", + "pl_PL": "polsk (Polen)", + "ps": "pashto", + "ps_AF": "pashto (Afghanistan)", + "pt": "portugisisk", + "pt_AO": "portugisisk (Angola)", + "pt_BR": "portugisisk (Brasil)", + "pt_CH": "portugisisk (Sveits)", + "pt_CV": "portugisisk (Kapp Verde)", + "pt_GQ": "portugisisk (Ekvatorial-Guinea)", + "pt_GW": "portugisisk (Guinea-Bissau)", + "pt_LU": "portugisisk (Luxemburg)", + "pt_MO": "portugisisk (Macao S.A.R. Kina)", + "pt_MZ": "portugisisk (Mosambik)", + "pt_PT": "portugisisk (Portugal)", + "pt_ST": "portugisisk (São Tomé og Príncipe)", + "pt_TL": "portugisisk (Øst-Timor)", + "qu": "quechua", + "qu_BO": "quechua (Bolivia)", + "qu_EC": "quechua (Ecuador)", + "qu_PE": "quechua (Peru)", + "rm": "retoromansk", + "rm_CH": "retoromansk (Sveits)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumensk", + "ro_MD": "rumensk (Moldova)", + "ro_RO": "rumensk (Romania)", + "ru": "russisk", + "ru_BY": "russisk (Hviterussland)", + "ru_KG": "russisk (Kirgisistan)", + "ru_KZ": "russisk (Kasakhstan)", + "ru_MD": "russisk (Moldova)", + "ru_RU": "russisk (Russland)", + "ru_UA": "russisk (Ukraina)", + "rw": "kinyarwanda", + "rw_RW": "kinyarwanda (Rwanda)", + "se": "nordsamisk", + "se_FI": "nordsamisk (Finland)", + "se_NO": "nordsamisk (Norge)", + "se_SE": "nordsamisk (Sverige)", + "sg": "sango", + "sg_CF": "sango (Den sentralafrikanske republikk)", + "sh": "serbokroatisk", + "sh_BA": "serbokroatisk (Bosnia-Hercegovina)", + "si": "singalesisk", + "si_LK": "singalesisk (Sri Lanka)", + "sk": "slovakisk", + "sk_SK": "slovakisk (Slovakia)", + "sl": "slovensk", + "sl_SI": "slovensk (Slovenia)", + "sn": "shona", + "sn_ZW": "shona (Zimbabwe)", + "so": "somali", + "so_DJ": "somali (Djibouti)", + "so_ET": "somali (Etiopia)", + "so_KE": "somali (Kenya)", + "so_SO": "somali (Somalia)", + "sq": "albansk", + "sq_AL": "albansk (Albania)", + "sq_MK": "albansk (Makedonia)", + "sq_XK": "albansk (Kosovo)", + "sr": "serbisk", + "sr_BA": "serbisk (Bosnia-Hercegovina)", + "sr_Cyrl": "serbisk (kyrillisk)", + "sr_Cyrl_BA": "serbisk (kyrillisk, Bosnia-Hercegovina)", + "sr_Cyrl_ME": "serbisk (kyrillisk, Montenegro)", + "sr_Cyrl_RS": "serbisk (kyrillisk, Serbia)", + "sr_Cyrl_XK": "serbisk (kyrillisk, Kosovo)", + "sr_Latn": "serbisk (latinsk)", + "sr_Latn_BA": "serbisk (latinsk, Bosnia-Hercegovina)", + "sr_Latn_ME": "serbisk (latinsk, Montenegro)", + "sr_Latn_RS": "serbisk (latinsk, Serbia)", + "sr_Latn_XK": "serbisk (latinsk, Kosovo)", + "sr_ME": "serbisk (Montenegro)", + "sr_RS": "serbisk (Serbia)", + "sr_XK": "serbisk (Kosovo)", + "sv": "svensk", + "sv_AX": "svensk (Ã…land)", + "sv_FI": "svensk (Finland)", + "sv_SE": "svensk (Sverige)", + "sw": "swahili", + "sw_CD": "swahili (Kongo-Kinshasa)", + "sw_KE": "swahili (Kenya)", + "sw_TZ": "swahili (Tanzania)", + "sw_UG": "swahili (Uganda)", + "ta": "tamil", + "ta_IN": "tamil (India)", + "ta_LK": "tamil (Sri Lanka)", + "ta_MY": "tamil (Malaysia)", + "ta_SG": "tamil (Singapore)", + "te": "telugu", + "te_IN": "telugu (India)", + "th": "thai", + "th_TH": "thai (Thailand)", + "ti": "tigrinja", + "ti_ER": "tigrinja (Eritrea)", + "ti_ET": "tigrinja (Etiopia)", + "tl": "tagalog", + "tl_PH": "tagalog (Filippinene)", + "to": "tongansk", + "to_TO": "tongansk (Tonga)", + "tr": "tyrkisk", + "tr_CY": "tyrkisk (Kypros)", + "tr_TR": "tyrkisk (Tyrkia)", + "ug": "uigurisk", + "ug_CN": "uigurisk (Kina)", + "uk": "ukrainsk", + "uk_UA": "ukrainsk (Ukraina)", + "ur": "urdu", + "ur_IN": "urdu (India)", + "ur_PK": "urdu (Pakistan)", + "uz": "usbekisk", + "uz_AF": "usbekisk (Afghanistan)", + "uz_Arab": "usbekisk (arabisk)", + "uz_Arab_AF": "usbekisk (arabisk, Afghanistan)", + "uz_Cyrl": "usbekisk (kyrillisk)", + "uz_Cyrl_UZ": "usbekisk (kyrillisk, Usbekistan)", + "uz_Latn": "usbekisk (latinsk)", + "uz_Latn_UZ": "usbekisk (latinsk, Usbekistan)", + "uz_UZ": "usbekisk (Usbekistan)", + "vi": "vietnamesisk", + "vi_VN": "vietnamesisk (Vietnam)", + "yi": "jiddisk", + "yo": "joruba", + "yo_BJ": "joruba (Benin)", + "yo_NG": "joruba (Nigeria)", + "zh": "kinesisk", + "zh_CN": "kinesisk (Kina)", + "zh_HK": "kinesisk (Hongkong S.A.R. Kina)", + "zh_Hans": "kinesisk (forenklet)", + "zh_Hans_CN": "kinesisk (forenklet, Kina)", + "zh_Hans_HK": "kinesisk (forenklet, Hongkong S.A.R. Kina)", + "zh_Hans_MO": "kinesisk (forenklet, Macao S.A.R. Kina)", + "zh_Hans_SG": "kinesisk (forenklet, Singapore)", + "zh_Hant": "kinesisk (tradisjonell)", + "zh_Hant_HK": "kinesisk (tradisjonell, Hongkong S.A.R. Kina)", + "zh_Hant_MO": "kinesisk (tradisjonell, Macao S.A.R. Kina)", + "zh_Hant_TW": "kinesisk (tradisjonell, Taiwan)", + "zh_MO": "kinesisk (Macao S.A.R. Kina)", + "zh_SG": "kinesisk (Singapore)", + "zh_TW": "kinesisk (Taiwan)", + "zu": "zulu", + "zu_ZA": "zulu (Sør-Afrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/nd.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/nd.json new file mode 100644 index 0000000000000000000000000000000000000000..e0860f0c2ce44a453341ce6e5a8770d6638ec035 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/nd.json @@ -0,0 +1,321 @@ +{ + "Names": { + "ak": "isi-Akhani", + "ak_GH": "isi-Akhani (Ghana)", + "am": "isi-Amaharikhi", + "am_ET": "isi-Amaharikhi (Ethiopia)", + "ar": "isi-Alabhu", + "ar_AE": "isi-Alabhu (United Arab Emirates)", + "ar_BH": "isi-Alabhu (Bhahareni)", + "ar_DJ": "isi-Alabhu (Djibouti)", + "ar_DZ": "isi-Alabhu (Aljeriya)", + "ar_EG": "isi-Alabhu (Egypt)", + "ar_ER": "isi-Alabhu (Eritrea)", + "ar_IL": "isi-Alabhu (Isuraeli)", + "ar_IQ": "isi-Alabhu (Iraki)", + "ar_JO": "isi-Alabhu (Jodani)", + "ar_KM": "isi-Alabhu (Khomoro)", + "ar_KW": "isi-Alabhu (Khuweiti)", + "ar_LB": "isi-Alabhu (Lebhanoni)", + "ar_LY": "isi-Alabhu (Libhiya)", + "ar_MA": "isi-Alabhu (Morokho)", + "ar_MR": "isi-Alabhu (Mauritania)", + "ar_OM": "isi-Alabhu (Omani)", + "ar_PS": "isi-Alabhu (Palestinian West Bank and Gaza)", + "ar_QA": "isi-Alabhu (Kathari)", + "ar_SA": "isi-Alabhu (Saudi Arabia)", + "ar_SD": "isi-Alabhu (Sudani)", + "ar_SO": "isi-Alabhu (Somaliya)", + "ar_SY": "isi-Alabhu (Syria)", + "ar_TD": "isi-Alabhu (Chadi)", + "ar_TN": "isi-Alabhu (Tunisiya)", + "ar_YE": "isi-Alabhu (Yemeni)", + "be": "isi-Bhelarashiyani", + "be_BY": "isi-Bhelarashiyani (Bhelarusi)", + "bg": "isi-Bulgaria", + "bg_BG": "isi-Bulgaria (Bhulgariya)", + "bn": "isi-Bhengali", + "bn_BD": "isi-Bhengali (Bhangiladeshi)", + "bn_IN": "isi-Bhengali (Indiya)", + "cs": "isi-Czech", + "cs_CZ": "isi-Czech (Czech Republic)", + "de": "isi-Jalimani", + "de_AT": "isi-Jalimani (Austria)", + "de_BE": "isi-Jalimani (Bhelgium)", + "de_CH": "isi-Jalimani (Switzerland)", + "de_DE": "isi-Jalimani (Germany)", + "de_IT": "isi-Jalimani (Itali)", + "de_LI": "isi-Jalimani (Liechtenstein)", + "de_LU": "isi-Jalimani (Luxembourg)", + "el": "isi-Giliki", + "el_CY": "isi-Giliki (Cyprus)", + "el_GR": "isi-Giliki (Greece)", + "en": "isi-Ngisi", + "en_AG": "isi-Ngisi (Antigua le Barbuda)", + "en_AI": "isi-Ngisi (Anguilla)", + "en_AS": "isi-Ngisi (Samoa ye Amelika)", + "en_AT": "isi-Ngisi (Austria)", + "en_AU": "isi-Ngisi (Australia)", + "en_BB": "isi-Ngisi (Bhabhadosi)", + "en_BE": "isi-Ngisi (Bhelgium)", + "en_BI": "isi-Ngisi (Bhurundi)", + "en_BM": "isi-Ngisi (Bhemuda)", + "en_BS": "isi-Ngisi (Bhahamas)", + "en_BW": "isi-Ngisi (Botswana)", + "en_BZ": "isi-Ngisi (Bhelize)", + "en_CA": "isi-Ngisi (Khanada)", + "en_CH": "isi-Ngisi (Switzerland)", + "en_CK": "isi-Ngisi (Cook Islands)", + "en_CM": "isi-Ngisi (Khameruni)", + "en_CY": "isi-Ngisi (Cyprus)", + "en_DE": "isi-Ngisi (Germany)", + "en_DK": "isi-Ngisi (Denmakhi)", + "en_DM": "isi-Ngisi (Dominikha)", + "en_ER": "isi-Ngisi (Eritrea)", + "en_FI": "isi-Ngisi (Finland)", + "en_FJ": "isi-Ngisi (Fiji)", + "en_FK": "isi-Ngisi (Falkland Islands)", + "en_FM": "isi-Ngisi (Micronesia)", + "en_GB": "isi-Ngisi (United Kingdom)", + "en_GD": "isi-Ngisi (Grenada)", + "en_GH": "isi-Ngisi (Ghana)", + "en_GI": "isi-Ngisi (Gibraltar)", + "en_GM": "isi-Ngisi (Gambiya)", + "en_GU": "isi-Ngisi (Guam)", + "en_GY": "isi-Ngisi (Guyana)", + "en_IE": "isi-Ngisi (Ireland)", + "en_IL": "isi-Ngisi (Isuraeli)", + "en_IN": "isi-Ngisi (Indiya)", + "en_IO": "isi-Ngisi (British Indian Ocean Territory)", + "en_JM": "isi-Ngisi (Jamaica)", + "en_KE": "isi-Ngisi (Khenya)", + "en_KI": "isi-Ngisi (Khiribati)", + "en_KN": "isi-Ngisi (Saint Kitts and Nevis)", + "en_KY": "isi-Ngisi (Cayman Islands)", + "en_LC": "isi-Ngisi (Saint Lucia)", + "en_LR": "isi-Ngisi (Libheriya)", + "en_LS": "isi-Ngisi (Lesotho)", + "en_MG": "isi-Ngisi (Madagaska)", + "en_MH": "isi-Ngisi (Marshall Islands)", + "en_MP": "isi-Ngisi (Northern Mariana Islands)", + "en_MS": "isi-Ngisi (Montserrat)", + "en_MT": "isi-Ngisi (Malta)", + "en_MU": "isi-Ngisi (Mauritius)", + "en_MW": "isi-Ngisi (Malawi)", + "en_MY": "isi-Ngisi (Malezhiya)", + "en_NA": "isi-Ngisi (Namibhiya)", + "en_NF": "isi-Ngisi (Norfolk Island)", + "en_NG": "isi-Ngisi (Nigeriya)", + "en_NL": "isi-Ngisi (Netherlands)", + "en_NR": "isi-Ngisi (Nauru)", + "en_NU": "isi-Ngisi (Niue)", + "en_NZ": "isi-Ngisi (New Zealand)", + "en_PG": "isi-Ngisi (Papua New Guinea)", + "en_PH": "isi-Ngisi (Philippines)", + "en_PK": "isi-Ngisi (Phakistani)", + "en_PN": "isi-Ngisi (Pitcairn)", + "en_PR": "isi-Ngisi (Puerto Rico)", + "en_PW": "isi-Ngisi (Palau)", + "en_RW": "isi-Ngisi (Ruwanda)", + "en_SB": "isi-Ngisi (Solomon Islands)", + "en_SC": "isi-Ngisi (Seychelles)", + "en_SD": "isi-Ngisi (Sudani)", + "en_SE": "isi-Ngisi (Sweden)", + "en_SG": "isi-Ngisi (Singapore)", + "en_SH": "isi-Ngisi (Saint Helena)", + "en_SI": "isi-Ngisi (Slovenia)", + "en_SL": "isi-Ngisi (Sierra Leone)", + "en_SZ": "isi-Ngisi (Swaziland)", + "en_TC": "isi-Ngisi (Turks and Caicos Islands)", + "en_TK": "isi-Ngisi (Thokelawu)", + "en_TO": "isi-Ngisi (Thonga)", + "en_TT": "isi-Ngisi (Trinidad le Tobago)", + "en_TV": "isi-Ngisi (Thuvalu)", + "en_TZ": "isi-Ngisi (Tanzaniya)", + "en_UG": "isi-Ngisi (Uganda)", + "en_US": "isi-Ngisi (Amelika)", + "en_VC": "isi-Ngisi (Saint Vincent and the Grenadines)", + "en_VG": "isi-Ngisi (British Virgin Islands)", + "en_VI": "isi-Ngisi (U.S. Virgin Islands)", + "en_VU": "isi-Ngisi (Vhanuatu)", + "en_WS": "isi-Ngisi (Samowa)", + "en_ZA": "isi-Ngisi (Mzansi ye Afrika)", + "en_ZM": "isi-Ngisi (Zambiya)", + "en_ZW": "isi-Ngisi (Zimbabwe)", + "es": "isi-Sipeyini", + "es_AR": "isi-Sipeyini (Ajentina)", + "es_BO": "isi-Sipeyini (Bholiviya)", + "es_BR": "isi-Sipeyini (Brazili)", + "es_CL": "isi-Sipeyini (Chile)", + "es_CO": "isi-Sipeyini (Kholombiya)", + "es_CR": "isi-Sipeyini (Khosta Rikha)", + "es_CU": "isi-Sipeyini (Cuba)", + "es_DO": "isi-Sipeyini (Dominican Republic)", + "es_EC": "isi-Sipeyini (Ecuador)", + "es_ES": "isi-Sipeyini (Spain)", + "es_GQ": "isi-Sipeyini (Equatorial Guinea)", + "es_GT": "isi-Sipeyini (Guatemala)", + "es_HN": "isi-Sipeyini (Honduras)", + "es_MX": "isi-Sipeyini (Meksikho)", + "es_NI": "isi-Sipeyini (Nicaragua)", + "es_PA": "isi-Sipeyini (Panama)", + "es_PE": "isi-Sipeyini (Pheru)", + "es_PH": "isi-Sipeyini (Philippines)", + "es_PR": "isi-Sipeyini (Puerto Rico)", + "es_PY": "isi-Sipeyini (Paraguay)", + "es_SV": "isi-Sipeyini (El Salvador)", + "es_US": "isi-Sipeyini (Amelika)", + "es_UY": "isi-Sipeyini (Yurugwai)", + "es_VE": "isi-Sipeyini (Venezuela)", + "fa": "isi-Pheshiyani", + "fa_AF": "isi-Pheshiyani (Afghanistan)", + "fa_IR": "isi-Pheshiyani (Iran)", + "fr": "isi-Fulentshi", + "fr_BE": "isi-Fulentshi (Bhelgium)", + "fr_BF": "isi-Fulentshi (Bhukina Faso)", + "fr_BI": "isi-Fulentshi (Bhurundi)", + "fr_BJ": "isi-Fulentshi (Bhenini)", + "fr_CA": "isi-Fulentshi (Khanada)", + "fr_CD": "isi-Fulentshi (Democratic Republic of the Congo)", + "fr_CF": "isi-Fulentshi (Central African Republic)", + "fr_CG": "isi-Fulentshi (Khongo)", + "fr_CH": "isi-Fulentshi (Switzerland)", + "fr_CI": "isi-Fulentshi (Ivory Coast)", + "fr_CM": "isi-Fulentshi (Khameruni)", + "fr_DJ": "isi-Fulentshi (Djibouti)", + "fr_DZ": "isi-Fulentshi (Aljeriya)", + "fr_FR": "isi-Fulentshi (Furansi)", + "fr_GA": "isi-Fulentshi (Gabhoni)", + "fr_GF": "isi-Fulentshi (Gwiyana ye Furansi)", + "fr_GN": "isi-Fulentshi (Guinea)", + "fr_GP": "isi-Fulentshi (Guadeloupe)", + "fr_GQ": "isi-Fulentshi (Equatorial Guinea)", + "fr_HT": "isi-Fulentshi (Hayiti)", + "fr_KM": "isi-Fulentshi (Khomoro)", + "fr_LU": "isi-Fulentshi (Luxembourg)", + "fr_MA": "isi-Fulentshi (Morokho)", + "fr_MC": "isi-Fulentshi (Monakho)", + "fr_MG": "isi-Fulentshi (Madagaska)", + "fr_ML": "isi-Fulentshi (Mali)", + "fr_MQ": "isi-Fulentshi (Martinique)", + "fr_MR": "isi-Fulentshi (Mauritania)", + "fr_MU": "isi-Fulentshi (Mauritius)", + "fr_NC": "isi-Fulentshi (New Caledonia)", + "fr_NE": "isi-Fulentshi (Niger)", + "fr_PF": "isi-Fulentshi (Pholinesiya ye Fulansi)", + "fr_PM": "isi-Fulentshi (Saint Pierre and Miquelon)", + "fr_RE": "isi-Fulentshi (Réunion)", + "fr_RW": "isi-Fulentshi (Ruwanda)", + "fr_SC": "isi-Fulentshi (Seychelles)", + "fr_SN": "isi-Fulentshi (Senegali)", + "fr_SY": "isi-Fulentshi (Syria)", + "fr_TD": "isi-Fulentshi (Chadi)", + "fr_TG": "isi-Fulentshi (Thogo)", + "fr_TN": "isi-Fulentshi (Tunisiya)", + "fr_VU": "isi-Fulentshi (Vhanuatu)", + "fr_WF": "isi-Fulentshi (Wallis and Futuna)", + "fr_YT": "isi-Fulentshi (Mayotte)", + "ha": "isi-Hausa", + "ha_GH": "isi-Hausa (Ghana)", + "ha_NE": "isi-Hausa (Niger)", + "ha_NG": "isi-Hausa (Nigeriya)", + "hi": "isi-Hindi", + "hi_IN": "isi-Hindi (Indiya)", + "hu": "isi-Hangari", + "hu_HU": "isi-Hangari (Hungary)", + "id": "isi-Indonesia", + "id_ID": "isi-Indonesia (Indonesiya)", + "ig": "isi-Igbo", + "ig_NG": "isi-Igbo (Nigeriya)", + "it": "isi-Italiano", + "it_CH": "isi-Italiano (Switzerland)", + "it_IT": "isi-Italiano (Itali)", + "it_SM": "isi-Italiano (San Marino)", + "ja": "isi-Japhani", + "ja_JP": "isi-Japhani (Japan)", + "km": "isi-Khambodiya", + "km_KH": "isi-Khambodiya (Cambodia)", + "ko": "isi-Koriya", + "ko_KP": "isi-Koriya (North Korea)", + "ko_KR": "isi-Koriya (South Korea)", + "ms": "isi-Malayi", + "ms_BN": "isi-Malayi (Brunei)", + "ms_MY": "isi-Malayi (Malezhiya)", + "ms_SG": "isi-Malayi (Singapore)", + "my": "isi-Burma", + "my_MM": "isi-Burma (Myanmar)", + "nd": "isiNdebele", + "nd_ZW": "isiNdebele (Zimbabwe)", + "ne": "isi-Nepali", + "ne_IN": "isi-Nepali (Indiya)", + "ne_NP": "isi-Nepali (Nephali)", + "nl": "isi-Dutch", + "nl_AW": "isi-Dutch (Arubha)", + "nl_BE": "isi-Dutch (Bhelgium)", + "nl_NL": "isi-Dutch (Netherlands)", + "nl_SR": "isi-Dutch (Suriname)", + "pa": "isi-Phunjabi", + "pa_IN": "isi-Phunjabi (Indiya)", + "pa_PK": "isi-Phunjabi (Phakistani)", + "pl": "isi-Pholoshi", + "pl_PL": "isi-Pholoshi (Pholandi)", + "pt": "isi-Potukezi", + "pt_AO": "isi-Potukezi (Angola)", + "pt_BR": "isi-Potukezi (Brazili)", + "pt_CH": "isi-Potukezi (Switzerland)", + "pt_CV": "isi-Potukezi (Cape Verde Islands)", + "pt_GQ": "isi-Potukezi (Equatorial Guinea)", + "pt_GW": "isi-Potukezi (Guinea-Bissau)", + "pt_LU": "isi-Potukezi (Luxembourg)", + "pt_MZ": "isi-Potukezi (Mozambique)", + "pt_PT": "isi-Potukezi (Portugal)", + "pt_ST": "isi-Potukezi (São Tomé and Príncipe)", + "pt_TL": "isi-Potukezi (East Timor)", + "ro": "isi-Romani", + "ro_MD": "isi-Romani (Moldova)", + "ro_RO": "isi-Romani (Romania)", + "ru": "isi-Rashiya", + "ru_BY": "isi-Rashiya (Bhelarusi)", + "ru_KG": "isi-Rashiya (Kyrgyzstan)", + "ru_KZ": "isi-Rashiya (Kazakhstan)", + "ru_MD": "isi-Rashiya (Moldova)", + "ru_RU": "isi-Rashiya (Rashiya)", + "ru_UA": "isi-Rashiya (Yukreini)", + "rw": "isi-Ruwanda", + "rw_RW": "isi-Ruwanda (Ruwanda)", + "so": "isi-Somali", + "so_DJ": "isi-Somali (Djibouti)", + "so_ET": "isi-Somali (Ethiopia)", + "so_KE": "isi-Somali (Khenya)", + "so_SO": "isi-Somali (Somaliya)", + "sv": "isi-Swidishi", + "sv_FI": "isi-Swidishi (Finland)", + "sv_SE": "isi-Swidishi (Sweden)", + "ta": "isi-Thamil", + "ta_IN": "isi-Thamil (Indiya)", + "ta_LK": "isi-Thamil (Sri Lanka)", + "ta_MY": "isi-Thamil (Malezhiya)", + "ta_SG": "isi-Thamil (Singapore)", + "th": "isi-Thayi", + "th_TH": "isi-Thayi (Thayilandi)", + "tr": "isi-Thekishi", + "tr_CY": "isi-Thekishi (Cyprus)", + "tr_TR": "isi-Thekishi (Thekhi)", + "uk": "isi-Ukrain", + "uk_UA": "isi-Ukrain (Yukreini)", + "ur": "isi-Udu", + "ur_IN": "isi-Udu (Indiya)", + "ur_PK": "isi-Udu (Phakistani)", + "vi": "isi-Vietnamese", + "vi_VN": "isi-Vietnamese (Vietnam)", + "yo": "isi-Yorubha", + "yo_BJ": "isi-Yorubha (Bhenini)", + "yo_NG": "isi-Yorubha (Nigeriya)", + "zh": "isi-China", + "zh_CN": "isi-China (China)", + "zh_SG": "isi-China (Singapore)", + "zh_TW": "isi-China (Thayiwani)", + "zu": "isi-Zulu", + "zu_ZA": "isi-Zulu (Mzansi ye Afrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ne.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ne.json new file mode 100644 index 0000000000000000000000000000000000000000..84a66be45c82bb77037f59a230f3649b61676027 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ne.json @@ -0,0 +1,564 @@ +{ + "Names": { + "af": "अफà¥à¤°à¤¿à¤•ानà¥à¤¸", + "af_NA": "अफà¥à¤°à¤¿à¤•ानà¥à¤¸ (नामिबिया)", + "af_ZA": "अफà¥à¤°à¤¿à¤•ानà¥à¤¸ (दकà¥à¤·à¤¿à¤£ अफà¥à¤°à¤¿à¤•ा)", + "ak": "आकान", + "ak_GH": "आकान (घाना)", + "am": "अमà¥à¤¹à¤¾à¤°à¤¿à¤•", + "am_ET": "अमà¥à¤¹à¤¾à¤°à¤¿à¤• (इथियोपिया)", + "ar": "अरबी", + "ar_AE": "अरबी (संयà¥à¤•à¥à¤¤ अरब इमिराटà¥à¤¸)", + "ar_BH": "अरबी (बहराइन)", + "ar_DJ": "अरबी (डिजिबà¥à¤Ÿà¥€)", + "ar_DZ": "अरबी (अलà¥à¤œà¥‡à¤°à¤¿à¤¯à¤¾)", + "ar_EG": "अरबी (इजिपà¥à¤Ÿ)", + "ar_EH": "अरबी (पशà¥à¤šà¤¿à¤®à¥€ साहारा)", + "ar_ER": "अरबी (à¤à¤°à¤¿à¤¤à¥à¤°à¤¿à¤¯à¤¾)", + "ar_IL": "अरबी (इजरायल)", + "ar_IQ": "अरबी (इराक)", + "ar_JO": "अरबी (जोरà¥à¤¡à¤¨)", + "ar_KM": "अरबी (कोमोरोस)", + "ar_KW": "अरबी (कà¥à¤µà¥‡à¤¤)", + "ar_LB": "अरबी (लेबनन)", + "ar_LY": "अरबी (लिबिया)", + "ar_MA": "अरबी (मोरोकà¥à¤•ो)", + "ar_MR": "अरबी (माउरिटानिया)", + "ar_OM": "अरबी (ओमन)", + "ar_PS": "अरबी (पà¥à¤¯à¤¾à¤²à¥‡à¤¸à¥à¤Ÿà¤¨à¥€ भू-भागहरà¥)", + "ar_QA": "अरबी (कतार)", + "ar_SA": "अरबी (साउदी अरब)", + "ar_SD": "अरबी (सà¥à¤¡à¤¾à¤¨)", + "ar_SO": "अरबी (सोमालिया)", + "ar_SS": "अरबी (दकà¥à¤·à¤¿à¤£à¥€ सà¥à¤¡à¤¾à¤¨)", + "ar_SY": "अरबी (सिरिया)", + "ar_TD": "अरबी (चाड)", + "ar_TN": "अरबी (टà¥à¤¯à¥à¤¨à¤¿à¤¸à¤¿à¤¯à¤¾)", + "ar_YE": "अरबी (येमेन)", + "as": "आसामी", + "as_IN": "आसामी (भारत)", + "az": "अजरबैजानी", + "az_AZ": "अजरबैजानी (अजरबैजान)", + "az_Cyrl": "अजरबैजानी (सिरिलिक)", + "az_Cyrl_AZ": "अजरबैजानी (सिरिलिक, अजरबैजान)", + "az_Latn": "अजरबैजानी (लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨)", + "az_Latn_AZ": "अजरबैजानी (लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨, अजरबैजान)", + "be": "बेलारà¥à¤¸à¥€", + "be_BY": "बेलारà¥à¤¸à¥€ (बेलारूस)", + "bg": "बà¥à¤²à¥à¤—ेरियाली", + "bg_BG": "बà¥à¤²à¥à¤—ेरियाली (बà¥à¤²à¥à¤—ेरिया)", + "bm": "बामà¥à¤¬à¤¾à¤°à¤¾", + "bm_ML": "बामà¥à¤¬à¤¾à¤°à¤¾ (माली)", + "bn": "बंगाली", + "bn_BD": "बंगाली (बङà¥à¤—लादेश)", + "bn_IN": "बंगाली (भारत)", + "bo": "तिबà¥à¤¬à¤¤à¥€", + "bo_CN": "तिबà¥à¤¬à¤¤à¥€ (चीन)", + "bo_IN": "तिबà¥à¤¬à¤¤à¥€ (भारत)", + "br": "बà¥à¤°à¥‡à¤Ÿà¤¨", + "br_FR": "बà¥à¤°à¥‡à¤Ÿà¤¨ (फà¥à¤°à¤¾à¤¨à¥à¤¸)", + "bs": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "bs_BA": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (बोसà¥à¤¨à¤¿à¤¯à¤¾ à¤à¤£à¥à¤¡ हरà¥à¤œà¤—ोभिनिया)", + "bs_Cyrl": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (सिरिलिक)", + "bs_Cyrl_BA": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (सिरिलिक, बोसà¥à¤¨à¤¿à¤¯à¤¾ à¤à¤£à¥à¤¡ हरà¥à¤œà¤—ोभिनिया)", + "bs_Latn": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨)", + "bs_Latn_BA": "बोसà¥à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨, बोसà¥à¤¨à¤¿à¤¯à¤¾ à¤à¤£à¥à¤¡ हरà¥à¤œà¤—ोभिनिया)", + "ca": "कà¥à¤¯à¤¾à¤Ÿà¤¾à¤²à¤¨", + "ca_AD": "कà¥à¤¯à¤¾à¤Ÿà¤¾à¤²à¤¨ (अनà¥à¤¡à¥‹à¤°à¥à¤°à¤¾)", + "ca_ES": "कà¥à¤¯à¤¾à¤Ÿà¤¾à¤²à¤¨ (सà¥à¤ªà¥‡à¤¨)", + "ca_FR": "कà¥à¤¯à¤¾à¤Ÿà¤¾à¤²à¤¨ (फà¥à¤°à¤¾à¤¨à¥à¤¸)", + "ca_IT": "कà¥à¤¯à¤¾à¤Ÿà¤¾à¤²à¤¨ (इटाली)", + "ce": "चेचेन", + "ce_RU": "चेचेन (रूस)", + "cs": "चेक", + "cs_CZ": "चेक (चेक गणतनà¥à¤¤à¥à¤°)", + "cy": "वेलà¥à¤¶", + "cy_GB": "वेलà¥à¤¶ (बेलायत)", + "da": "डेनिस", + "da_DK": "डेनिस (डेनमारà¥à¤•)", + "da_GL": "डेनिस (गà¥à¤°à¤¿à¤¨à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "de": "जरà¥à¤®à¤¨", + "de_AT": "जरà¥à¤®à¤¨ (अषà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾)", + "de_BE": "जरà¥à¤®à¤¨ (बेलà¥à¤œà¤¿à¤¯à¤®)", + "de_CH": "जरà¥à¤®à¤¨ (सà¥à¤µà¤¿à¤œà¤°à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "de_DE": "जरà¥à¤®à¤¨ (जरà¥à¤®à¤¨à¥€)", + "de_IT": "जरà¥à¤®à¤¨ (इटाली)", + "de_LI": "जरà¥à¤®à¤¨ (लिà¤à¤–टेनà¥à¤¸à¥à¤Ÿà¤¾à¤‡à¤¨)", + "de_LU": "जरà¥à¤®à¤¨ (लकà¥à¤œà¥‡à¤®à¤¬à¤°à¥à¤—)", + "dz": "जोङà¥à¤–ा", + "dz_BT": "जोङà¥à¤–ा (भà¥à¤Ÿà¤¾à¤¨)", + "ee": "इवी", + "ee_GH": "इवी (घाना)", + "ee_TG": "इवी (टोगो)", + "el": "गà¥à¤°à¥€à¤•", + "el_CY": "गà¥à¤°à¥€à¤• (साइपà¥à¤°à¤¸)", + "el_GR": "गà¥à¤°à¥€à¤• (गà¥à¤°à¤¿à¤¸)", + "en": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€", + "en_AG": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (à¤à¤¨à¥à¤Ÿà¤¿à¤—à¥à¤† र बारबà¥à¤¡à¤¾)", + "en_AI": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (आङà¥à¤—à¥à¤‡à¤²à¤¾)", + "en_AS": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (अमेरिकी समोआ)", + "en_AT": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (अषà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾)", + "en_AU": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (अषà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾)", + "en_BB": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (बारà¥à¤¬à¤¾à¤¡à¥‹à¤¸)", + "en_BE": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (बेलà¥à¤œà¤¿à¤¯à¤®)", + "en_BI": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (बà¥à¤°à¥‚णà¥à¤¡à¥€)", + "en_BM": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (बरà¥à¤®à¥à¤¡à¤¾)", + "en_BS": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (बहामास)", + "en_BW": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (बोटà¥à¤¸à¥à¤µà¤¾à¤¨à¤¾)", + "en_BZ": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (बेलिज)", + "en_CA": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (कà¥à¤¯à¤¾à¤¨à¤¾à¤¡à¤¾)", + "en_CC": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (कोकोस (किलिंग) टापà¥à¤¹à¤°à¥)", + "en_CH": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सà¥à¤µà¤¿à¤œà¤°à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "en_CK": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (कà¥à¤• टापà¥à¤¹à¤°à¥)", + "en_CM": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (कà¥à¤¯à¤¾à¤®à¤°à¥‚न)", + "en_CX": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (कà¥à¤°à¤¿à¤·à¥à¤Ÿà¤®à¤¸ टापà¥)", + "en_CY": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (साइपà¥à¤°à¤¸)", + "en_DE": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (जरà¥à¤®à¤¨à¥€)", + "en_DG": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (डियगो गारà¥à¤¸à¤¿à¤¯à¤¾)", + "en_DK": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (डेनमारà¥à¤•)", + "en_DM": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (डोमिनिका)", + "en_ER": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (à¤à¤°à¤¿à¤¤à¥à¤°à¤¿à¤¯à¤¾)", + "en_FI": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (फिनà¥à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "en_FJ": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (फिजी)", + "en_FK": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (फकलà¥à¤¯à¤¾à¤£à¥à¤¡ टापà¥à¤¹à¤°à¥)", + "en_FM": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (माइकà¥à¤°à¥‹à¤¨à¥‡à¤¸à¤¿à¤¯à¤¾)", + "en_GB": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (बेलायत)", + "en_GD": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (गà¥à¤°à¥‡à¤¨à¤¾à¤¡à¤¾)", + "en_GG": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (गà¥à¤à¤°à¥à¤¨à¤¸à¥‡)", + "en_GH": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (घाना)", + "en_GI": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤¾à¤°)", + "en_GM": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (गामà¥à¤µà¤¿à¤¯à¤¾)", + "en_GU": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (गà¥à¤µà¤¾à¤®)", + "en_GY": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (गà¥à¤¯à¤¾à¤¨à¤¾)", + "en_HK": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (हङकङ चिनिया समाजवादी सà¥à¤µà¤¾à¤¯à¤¤à¥à¤¤ कà¥à¤·à¥‡à¤¤à¥à¤°)", + "en_IE": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (आयरलà¥à¤¯à¤¾à¤£à¥à¤¡)", + "en_IL": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (इजरायल)", + "en_IM": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (आइजà¥à¤²à¥‡ अफॠमà¥à¤¯à¤¾à¤¨)", + "en_IN": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (भारत)", + "en_IO": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (बेलायती हिनà¥à¤¦ महासागर कà¥à¤·à¥‡à¤¤à¥à¤°)", + "en_JE": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (जरà¥à¤¸à¥€)", + "en_JM": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (जमाइका)", + "en_KE": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (केनà¥à¤¯à¤¾)", + "en_KI": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (किरिबाटी)", + "en_KN": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सेनà¥à¤Ÿ किटà¥à¤¸ र नेभिस)", + "en_KY": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (केयमान टापà¥)", + "en_LC": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सेनà¥à¤Ÿ लà¥à¤¸à¤¿à¤¯à¤¾)", + "en_LR": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (लाइबेरिया)", + "en_LS": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (लेसोथो)", + "en_MG": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (मडागासà¥à¤•र)", + "en_MH": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (मारà¥à¤¶à¤² टापà¥à¤¹à¤°à¥)", + "en_MO": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (मकावो चिनिà¤à¤¯à¤¾ सà¥à¤µà¤¶à¤¾à¤¸à¤¿à¤¤ कà¥à¤·à¥‡à¤¤à¥à¤°)", + "en_MP": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (उतà¥à¤¤à¤°à¥€ मारिआना टापà¥)", + "en_MS": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (मोनà¥à¤Ÿà¤¸à¥‡à¤°à¥à¤°à¤¾à¤Ÿ)", + "en_MT": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (मालà¥à¤Ÿà¤¾)", + "en_MU": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (माउरिटस)", + "en_MW": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (मालावी)", + "en_MY": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (मलेसिया)", + "en_NA": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (नामिबिया)", + "en_NF": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (नोरफोलà¥à¤• टापà¥)", + "en_NG": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (नाइजेरिया)", + "en_NL": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (नेदरलà¥à¤¯à¤¾à¤£à¥à¤¡à¥à¤¸)", + "en_NR": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (नाउरू)", + "en_NU": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (नियà¥à¤‡)", + "en_NZ": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (नà¥à¤¯à¥à¤œà¤¿à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "en_PG": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (पपà¥à¤† नà¥à¤¯à¥‚ गाइनिया)", + "en_PH": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (फिलिपिनà¥à¤¸)", + "en_PK": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (पाकिसà¥à¤¤à¤¾à¤¨)", + "en_PN": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (पिटकाइरà¥à¤¨ टापà¥à¤¹à¤°à¥)", + "en_PR": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (पà¥à¤à¤°à¥à¤Ÿà¥‹ रिको)", + "en_PW": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (पलाउ)", + "en_RW": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (रवाणà¥à¤¡à¤¾)", + "en_SB": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सोलोमोन टापà¥à¤¹à¤°à¥)", + "en_SC": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सेचेलेस)", + "en_SD": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सà¥à¤¡à¤¾à¤¨)", + "en_SE": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सà¥à¤µà¤¿à¤¡à¥‡à¤¨)", + "en_SG": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सिङà¥à¤—ापà¥à¤°)", + "en_SH": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सेनà¥à¤Ÿ हेलेना)", + "en_SI": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सà¥à¤²à¥‹à¤­à¥‡à¤¨à¤¿à¤¯à¤¾)", + "en_SL": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सिà¤à¤°à¥à¤°à¤¾ लिओन)", + "en_SS": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (दकà¥à¤·à¤¿à¤£à¥€ सà¥à¤¡à¤¾à¤¨)", + "en_SX": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सिनà¥à¤Ÿ मारà¥à¤Ÿà¥‡à¤¨)", + "en_SZ": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सà¥à¤µà¤¾à¤œà¤¿à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "en_TC": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (तà¥à¤°à¥à¤• र काइकोस टापà¥)", + "en_TK": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (तोकेलाउ)", + "en_TO": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (टोंगा)", + "en_TT": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (तà¥à¤°à¤¿à¤¨à¤¿à¤¡à¤¾à¤¡ à¤à¤£à¥à¤¡ टोबागो)", + "en_TV": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (तà¥à¤­à¤¾à¤²à¥)", + "en_TZ": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (तानà¥à¤œà¤¾à¤¨à¤¿à¤¯à¤¾)", + "en_UG": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (यà¥à¤—ाणà¥à¤¡à¤¾)", + "en_UM": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (संयà¥à¤•à¥à¤¤ राजà¥à¤¯à¤•ा बाहà¥à¤¯ टापà¥à¤¹à¤°à¥)", + "en_US": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (संयà¥à¤•à¥à¤¤ राजà¥à¤¯)", + "en_VC": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सेनà¥à¤Ÿ भिनà¥à¤¸à¥‡à¤¨à¥à¤Ÿ र गà¥à¤°à¥‡à¤¨à¤¾à¤¡à¤¿à¤¨à¥à¤¸)", + "en_VG": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (बेलायती भरà¥à¤œà¤¿à¤¨ टापà¥à¤¹à¤°à¥)", + "en_VI": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (संयà¥à¤•à¥à¤¤ राजà¥à¤¯ भरà¥à¤œà¤¿à¤¨ टापà¥à¤¹à¤°à¥)", + "en_VU": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (भानà¥à¤†à¤¤à¥)", + "en_WS": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (सामोआ)", + "en_ZA": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (दकà¥à¤·à¤¿à¤£ अफà¥à¤°à¤¿à¤•ा)", + "en_ZM": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (जामà¥à¤¬à¤¿à¤¯à¤¾)", + "en_ZW": "अङà¥à¤—à¥à¤°à¥‡à¤œà¥€ (जिमà¥à¤¬à¤¾à¤¬à¥‡)", + "eo": "à¤à¤¸à¥à¤ªà¥‡à¤°à¤¾à¤¨à¥à¤¤à¥‹", + "es": "सà¥à¤ªà¥‡à¤¨à¥€", + "es_AR": "सà¥à¤ªà¥‡à¤¨à¥€ (अरà¥à¤œà¥‡à¤¨à¥à¤Ÿà¤¿à¤¨à¤¾)", + "es_BO": "सà¥à¤ªà¥‡à¤¨à¥€ (बोलिभिया)", + "es_BR": "सà¥à¤ªà¥‡à¤¨à¥€ (बà¥à¤°à¤¾à¤œà¤¿à¤²)", + "es_CL": "सà¥à¤ªà¥‡à¤¨à¥€ (चिली)", + "es_CO": "सà¥à¤ªà¥‡à¤¨à¥€ (कोलोमà¥à¤¬à¤¿à¤¯à¤¾)", + "es_CR": "सà¥à¤ªà¥‡à¤¨à¥€ (कोषà¥à¤Ÿà¤¾à¤°à¤¿à¤•ा)", + "es_CU": "सà¥à¤ªà¥‡à¤¨à¥€ (कà¥à¤¯à¥à¤¬à¤¾)", + "es_DO": "सà¥à¤ªà¥‡à¤¨à¥€ (डोमिनिकन गणतनà¥à¤¤à¥à¤°)", + "es_EA": "सà¥à¤ªà¥‡à¤¨à¥€ (सिउटा र मेलिला)", + "es_EC": "सà¥à¤ªà¥‡à¤¨à¥€ (इकà¥à¤µà¤¡à¥‡à¤°)", + "es_ES": "सà¥à¤ªà¥‡à¤¨à¥€ (सà¥à¤ªà¥‡à¤¨)", + "es_GQ": "सà¥à¤ªà¥‡à¤¨à¥€ (भू-मधà¥à¤¯à¥€à¤¯ गिनी)", + "es_GT": "सà¥à¤ªà¥‡à¤¨à¥€ (गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾)", + "es_HN": "सà¥à¤ªà¥‡à¤¨à¥€ (हनà¥à¤¡à¥à¤°à¤¾à¤¸)", + "es_IC": "सà¥à¤ªà¥‡à¤¨à¥€ (कà¥à¤¯à¤¾à¤¨à¤¾à¤°à¥€ टापà¥à¤¹à¤°à¥‚)", + "es_MX": "सà¥à¤ªà¥‡à¤¨à¥€ (मेकà¥à¤¸à¤¿à¤•ो)", + "es_NI": "सà¥à¤ªà¥‡à¤¨à¥€ (निकारागà¥à¤µà¤¾)", + "es_PA": "सà¥à¤ªà¥‡à¤¨à¥€ (पनामा)", + "es_PE": "सà¥à¤ªà¥‡à¤¨à¥€ (पेरू)", + "es_PH": "सà¥à¤ªà¥‡à¤¨à¥€ (फिलिपिनà¥à¤¸)", + "es_PR": "सà¥à¤ªà¥‡à¤¨à¥€ (पà¥à¤à¤°à¥à¤Ÿà¥‹ रिको)", + "es_PY": "सà¥à¤ªà¥‡à¤¨à¥€ (पà¥à¤¯à¤¾à¤°à¤¾à¤—à¥à¤µà¥‡)", + "es_SV": "सà¥à¤ªà¥‡à¤¨à¥€ (à¤à¤²à¥ सालà¥à¤­à¤¾à¤¡à¥‹à¤°)", + "es_US": "सà¥à¤ªà¥‡à¤¨à¥€ (संयà¥à¤•à¥à¤¤ राजà¥à¤¯)", + "es_UY": "सà¥à¤ªà¥‡à¤¨à¥€ (उरूगà¥à¤µà¥‡)", + "es_VE": "सà¥à¤ªà¥‡à¤¨à¥€ (भेनेजà¥à¤à¤²à¤¾)", + "et": "इसà¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "et_EE": "इसà¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (इसà¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾)", + "eu": "बासà¥à¤•", + "eu_ES": "बासà¥à¤• (सà¥à¤ªà¥‡à¤¨)", + "fa": "फारसी", + "fa_AF": "फारसी (अफगानिसà¥à¤¤à¤¾à¤¨)", + "fa_IR": "फारसी (इरान)", + "ff": "फà¥à¤²à¤¾à¤¹", + "ff_CM": "फà¥à¤²à¤¾à¤¹ (कà¥à¤¯à¤¾à¤®à¤°à¥‚न)", + "ff_GN": "फà¥à¤²à¤¾à¤¹ (गिनी)", + "ff_MR": "फà¥à¤²à¤¾à¤¹ (माउरिटानिया)", + "ff_SN": "फà¥à¤²à¤¾à¤¹ (सेनेगाल)", + "fi": "फिनिस", + "fi_FI": "फिनिस (फिनà¥à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "fo": "फारोज", + "fo_DK": "फारोज (डेनमारà¥à¤•)", + "fo_FO": "फारोज (फारो टापà¥à¤¹à¤°à¥‚)", + "fr": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€", + "fr_BE": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (बेलà¥à¤œà¤¿à¤¯à¤®)", + "fr_BF": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (बरà¥à¤•िना फासो)", + "fr_BI": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (बà¥à¤°à¥‚णà¥à¤¡à¥€)", + "fr_BJ": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (बेनिन)", + "fr_BL": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (सेनà¥à¤Ÿ बारà¥à¤¥à¤¾à¤²à¥‡à¤®à¥€)", + "fr_CA": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (कà¥à¤¯à¤¾à¤¨à¤¾à¤¡à¤¾)", + "fr_CD": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (कोङà¥à¤—ो-किनà¥à¤¶à¤¾à¤¸à¤¾)", + "fr_CF": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (केनà¥à¤¦à¥à¤°à¥€à¤¯ अफà¥à¤°à¤¿à¤•ी गणतनà¥à¤¤à¥à¤°)", + "fr_CG": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (कोङà¥à¤—ो - बà¥à¤°à¤¾à¤œà¥à¤œà¤¾à¤­à¤¿à¤²à¥à¤²à¥‡)", + "fr_CH": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (सà¥à¤µà¤¿à¤œà¤°à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "fr_CI": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (आइभोरी कोसà¥à¤Ÿ)", + "fr_CM": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (कà¥à¤¯à¤¾à¤®à¤°à¥‚न)", + "fr_DJ": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (डिजिबà¥à¤Ÿà¥€)", + "fr_DZ": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (अलà¥à¤œà¥‡à¤°à¤¿à¤¯à¤¾)", + "fr_FR": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (फà¥à¤°à¤¾à¤¨à¥à¤¸)", + "fr_GA": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (गावोन)", + "fr_GF": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ गायना)", + "fr_GN": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (गिनी)", + "fr_GP": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (गà¥à¤µà¤¾à¤¡à¥‡à¤²à¥à¤ª)", + "fr_GQ": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (भू-मधà¥à¤¯à¥€à¤¯ गिनी)", + "fr_HT": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (हैटी)", + "fr_KM": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (कोमोरोस)", + "fr_LU": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (लकà¥à¤œà¥‡à¤®à¤¬à¤°à¥à¤—)", + "fr_MA": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (मोरोकà¥à¤•ो)", + "fr_MC": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (मोनाको)", + "fr_MF": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (सेनà¥à¤Ÿ मारà¥à¤Ÿà¤¿à¤¨)", + "fr_MG": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (मडागासà¥à¤•र)", + "fr_ML": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (माली)", + "fr_MQ": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (मारà¥à¤Ÿà¤¿à¤¨à¤¿à¤•)", + "fr_MR": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (माउरिटानिया)", + "fr_MU": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (माउरिटस)", + "fr_NC": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (नयाठकालेडोनिया)", + "fr_NE": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (नाइजर)", + "fr_PF": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ पोलिनेसिया)", + "fr_PM": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (सेनà¥à¤Ÿ पिरà¥à¤°à¥‡ र मिकà¥à¤•ेलोन)", + "fr_RE": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (रियà¥à¤¨à¤¿à¤¯à¤¨)", + "fr_RW": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (रवाणà¥à¤¡à¤¾)", + "fr_SC": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (सेचेलेस)", + "fr_SN": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (सेनेगाल)", + "fr_SY": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (सिरिया)", + "fr_TD": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (चाड)", + "fr_TG": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (टोगो)", + "fr_TN": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (टà¥à¤¯à¥à¤¨à¤¿à¤¸à¤¿à¤¯à¤¾)", + "fr_VU": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (भानà¥à¤†à¤¤à¥)", + "fr_WF": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (वालिस र फà¥à¤Ÿà¥à¤¨à¤¾)", + "fr_YT": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ (मायोटà¥à¤Ÿ)", + "fy": "फà¥à¤°à¤¿à¤œà¤¿à¤¯à¤¨", + "fy_NL": "फà¥à¤°à¤¿à¤œà¤¿à¤¯à¤¨ (नेदरलà¥à¤¯à¤¾à¤£à¥à¤¡à¥à¤¸)", + "ga": "आयरिस", + "ga_IE": "आयरिस (आयरलà¥à¤¯à¤¾à¤£à¥à¤¡)", + "gd": "सà¥à¤•टिस गाà¤à¤²à¤¿à¤•", + "gd_GB": "सà¥à¤•टिस गाà¤à¤²à¤¿à¤• (बेलायत)", + "gl": "गलिसियाली", + "gl_ES": "गलिसियाली (सà¥à¤ªà¥‡à¤¨)", + "gu": "गà¥à¤œà¤°à¤¾à¤¤à¥€", + "gu_IN": "गà¥à¤œà¤°à¤¾à¤¤à¥€ (भारत)", + "gv": "मानà¥à¤•à¥à¤¸", + "gv_IM": "मानà¥à¤•à¥à¤¸ (आइजà¥à¤²à¥‡ अफॠमà¥à¤¯à¤¾à¤¨)", + "ha": "हाउसा", + "ha_GH": "हाउसा (घाना)", + "ha_NE": "हाउसा (नाइजर)", + "ha_NG": "हाउसा (नाइजेरिया)", + "he": "हिबà¥à¤°à¥", + "he_IL": "हिबà¥à¤°à¥ (इजरायल)", + "hi": "हिनà¥à¤¦à¥€", + "hi_IN": "हिनà¥à¤¦à¥€ (भारत)", + "hr": "कà¥à¤°à¥‹à¤¯à¤¸à¤¿à¤¯à¤¾à¤²à¥€", + "hr_BA": "कà¥à¤°à¥‹à¤¯à¤¸à¤¿à¤¯à¤¾à¤²à¥€ (बोसà¥à¤¨à¤¿à¤¯à¤¾ à¤à¤£à¥à¤¡ हरà¥à¤œà¤—ोभिनिया)", + "hr_HR": "कà¥à¤°à¥‹à¤¯à¤¸à¤¿à¤¯à¤¾à¤²à¥€ (कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾)", + "hu": "हङà¥à¤—ेरियाली", + "hu_HU": "हङà¥à¤—ेरियाली (हङà¥à¤—ेरी)", + "hy": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "hy_AM": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾)", + "id": "इनà¥à¤¡à¥‹à¤¨à¥‡à¤¸à¤¿à¤¯à¤¾à¤²à¥€", + "id_ID": "इनà¥à¤¡à¥‹à¤¨à¥‡à¤¸à¤¿à¤¯à¤¾à¤²à¥€ (इनà¥à¤¡à¥‹à¤¨à¥‡à¤¶à¤¿à¤¯à¤¾)", + "ig": "इगà¥à¤¬à¥‹", + "ig_NG": "इगà¥à¤¬à¥‹ (नाइजेरिया)", + "ii": "सिचà¥à¤†à¤¨ यि", + "ii_CN": "सिचà¥à¤†à¤¨ यि (चीन)", + "is": "आइसलà¥à¤¯à¤¾à¤¨à¥à¤¡à¤¿à¤¯à¤¾à¤²à¥€", + "is_IS": "आइसलà¥à¤¯à¤¾à¤¨à¥à¤¡à¤¿à¤¯à¤¾à¤²à¥€ (आइसà¥à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "it": "इटालेली", + "it_CH": "इटालेली (सà¥à¤µà¤¿à¤œà¤°à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "it_IT": "इटालेली (इटाली)", + "it_SM": "इटालेली (सानॠमारिनो)", + "ja": "जापानी", + "ja_JP": "जापानी (जापान)", + "ka": "जरà¥à¤œà¤¿à¤¯à¤¾à¤²à¥€", + "ka_GE": "जरà¥à¤œà¤¿à¤¯à¤¾à¤²à¥€ (जरà¥à¤œà¤¿à¤¯à¤¾)", + "ki": "किकà¥à¤¯à¥", + "ki_KE": "किकà¥à¤¯à¥ (केनà¥à¤¯à¤¾)", + "kk": "काजाख", + "kk_KZ": "काजाख (काजाकसà¥à¤¤à¤¾à¤¨)", + "kl": "कालालिसà¥à¤Ÿ", + "kl_GL": "कालालिसà¥à¤Ÿ (गà¥à¤°à¤¿à¤¨à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "km": "खमेर", + "km_KH": "खमेर (कमà¥à¤¬à¥‹à¤¡à¤¿à¤¯à¤¾)", + "kn": "कनà¥à¤¨à¤¾à¤¡à¤¾", + "kn_IN": "कनà¥à¤¨à¤¾à¤¡à¤¾ (भारत)", + "ko": "कोरियाली", + "ko_KP": "कोरियाली (उतà¥à¤¤à¤° कोरिया)", + "ko_KR": "कोरियाली (दकà¥à¤·à¤¿à¤£ कोरिया)", + "ks": "कासà¥à¤®à¤¿à¤°à¥€", + "ks_IN": "कासà¥à¤®à¤¿à¤°à¥€ (भारत)", + "kw": "कोरà¥à¤¨à¤¿à¤¸", + "kw_GB": "कोरà¥à¤¨à¤¿à¤¸ (बेलायत)", + "ky": "किरà¥à¤—िज", + "ky_KG": "किरà¥à¤—िज (किरà¥à¤—िसà¥à¤¥à¤¾à¤¨)", + "lb": "लकà¥à¤œà¥‡à¤®à¥à¤¬à¤°à¥à¤—ी", + "lb_LU": "लकà¥à¤œà¥‡à¤®à¥à¤¬à¤°à¥à¤—ी (लकà¥à¤œà¥‡à¤®à¤¬à¤°à¥à¤—)", + "lg": "गानà¥à¤¡à¤¾", + "lg_UG": "गानà¥à¤¡à¤¾ (यà¥à¤—ाणà¥à¤¡à¤¾)", + "ln": "लिङà¥à¤—ाला", + "ln_AO": "लिङà¥à¤—ाला (अङà¥à¤—ोला)", + "ln_CD": "लिङà¥à¤—ाला (कोङà¥à¤—ो-किनà¥à¤¶à¤¾à¤¸à¤¾)", + "ln_CF": "लिङà¥à¤—ाला (केनà¥à¤¦à¥à¤°à¥€à¤¯ अफà¥à¤°à¤¿à¤•ी गणतनà¥à¤¤à¥à¤°)", + "ln_CG": "लिङà¥à¤—ाला (कोङà¥à¤—ो - बà¥à¤°à¤¾à¤œà¥à¤œà¤¾à¤­à¤¿à¤²à¥à¤²à¥‡)", + "lo": "लाओ", + "lo_LA": "लाओ (लाओस)", + "lt": "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "lt_LT": "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (लिथà¥à¤…निया)", + "lu": "लà¥à¤¬à¤¾-काताङà¥à¤—ा", + "lu_CD": "लà¥à¤¬à¤¾-काताङà¥à¤—ा (कोङà¥à¤—ो-किनà¥à¤¶à¤¾à¤¸à¤¾)", + "lv": "लातà¥à¤­à¤¿à¤¯à¤¾à¤²à¥€", + "lv_LV": "लातà¥à¤­à¤¿à¤¯à¤¾à¤²à¥€ (लाटà¥à¤­à¤¿à¤¯à¤¾)", + "mg": "मलागासी", + "mg_MG": "मलागासी (मडागासà¥à¤•र)", + "mk": "मà¥à¤¯à¤¾à¤¸à¥‡à¤¡à¥‹à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "mk_MK": "मà¥à¤¯à¤¾à¤¸à¥‡à¤¡à¥‹à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (मà¥à¤¯à¤¾à¤•ेडोनिया)", + "ml": "मलयालम", + "ml_IN": "मलयालम (भारत)", + "mn": "मङà¥à¤—ोलियाली", + "mn_MN": "मङà¥à¤—ोलियाली (मङà¥à¤—ोलिया)", + "mr": "मराठी", + "mr_IN": "मराठी (भारत)", + "ms": "मलाय", + "ms_BN": "मलाय (बà¥à¤°à¥à¤¨à¤¾à¤‡)", + "ms_MY": "मलाय (मलेसिया)", + "ms_SG": "मलाय (सिङà¥à¤—ापà¥à¤°)", + "mt": "मालà¥à¤Ÿà¤¿à¤œ", + "mt_MT": "मालà¥à¤Ÿà¤¿à¤œ (मालà¥à¤Ÿà¤¾)", + "my": "बरà¥à¤®à¥‡à¤²à¥€", + "my_MM": "बरà¥à¤®à¥‡à¤²à¥€ (मà¥à¤¯à¤¾à¤¨à¥à¤®à¤¾à¤° (बरà¥à¤®à¤¾))", + "nb": "नरà¥à¤µà¥‡à¤²à¥€ बोकमाल", + "nb_NO": "नरà¥à¤µà¥‡à¤²à¥€ बोकमाल (नरà¥à¤µà¥‡)", + "nb_SJ": "नरà¥à¤µà¥‡à¤²à¥€ बोकमाल (सभालà¥à¤¬à¤¾à¤°à¥à¤¡ र जान मायेन)", + "nd": "उतà¥à¤¤à¤°à¥€ नà¥à¤¡à¥‡à¤¬à¥‡à¤²à¥‡", + "nd_ZW": "उतà¥à¤¤à¤°à¥€ नà¥à¤¡à¥‡à¤¬à¥‡à¤²à¥‡ (जिमà¥à¤¬à¤¾à¤¬à¥‡)", + "ne": "नेपाली", + "ne_IN": "नेपाली (भारत)", + "ne_NP": "नेपाली (नेपाल)", + "nl": "डच", + "nl_AW": "डच (आरूबा)", + "nl_BE": "डच (बेलà¥à¤œà¤¿à¤¯à¤®)", + "nl_BQ": "डच (कà¥à¤¯à¤¾à¤°à¤¿à¤µà¤¿à¤¯à¤¨ नेदरलà¥à¤¯à¤¾à¤£à¥à¤¡à¥à¤¸)", + "nl_CW": "डच (कà¥à¤°à¤¾à¤•ाओ)", + "nl_NL": "डच (नेदरलà¥à¤¯à¤¾à¤£à¥à¤¡à¥à¤¸)", + "nl_SR": "डच (सà¥à¤°à¤¿à¤¨à¥‡à¤®)", + "nl_SX": "डच (सिनà¥à¤Ÿ मारà¥à¤Ÿà¥‡à¤¨)", + "nn": "नरà¥à¤µà¥‡à¤²à¥€ नाइनोरà¥à¤¸à¥à¤•", + "nn_NO": "नरà¥à¤µà¥‡à¤²à¥€ नाइनोरà¥à¤¸à¥à¤• (नरà¥à¤µà¥‡)", + "no": "नरà¥à¤µà¥‡à¤²à¥€", + "no_NO": "नरà¥à¤µà¥‡à¤²à¥€ (नरà¥à¤µà¥‡)", + "om": "ओरोमो", + "om_ET": "ओरोमो (इथियोपिया)", + "om_KE": "ओरोमो (केनà¥à¤¯à¤¾)", + "or": "उडिया", + "or_IN": "उडिया (भारत)", + "os": "अोसà¥à¤¸à¥‡à¤Ÿà¤¿à¤•", + "os_GE": "अोसà¥à¤¸à¥‡à¤Ÿà¤¿à¤• (जरà¥à¤œà¤¿à¤¯à¤¾)", + "os_RU": "अोसà¥à¤¸à¥‡à¤Ÿà¤¿à¤• (रूस)", + "pa": "पंजाबी", + "pa_Arab": "पंजाबी (अरबी)", + "pa_Arab_PK": "पंजाबी (अरबी, पाकिसà¥à¤¤à¤¾à¤¨)", + "pa_Guru": "पंजाबी (गà¥à¤°à¥‚मà¥à¤–ी)", + "pa_Guru_IN": "पंजाबी (गà¥à¤°à¥‚मà¥à¤–ी, भारत)", + "pa_IN": "पंजाबी (भारत)", + "pa_PK": "पंजाबी (पाकिसà¥à¤¤à¤¾à¤¨)", + "pl": "पोलिस", + "pl_PL": "पोलिस (पोलà¥à¤¯à¤¾à¤£à¥à¤¡)", + "ps": "पासà¥à¤¤à¥‹", + "ps_AF": "पासà¥à¤¤à¥‹ (अफगानिसà¥à¤¤à¤¾à¤¨)", + "pt": "पोरà¥à¤¤à¥à¤—ी", + "pt_AO": "पोरà¥à¤¤à¥à¤—ी (अङà¥à¤—ोला)", + "pt_BR": "पोरà¥à¤¤à¥à¤—ी (बà¥à¤°à¤¾à¤œà¤¿à¤²)", + "pt_CH": "पोरà¥à¤¤à¥à¤—ी (सà¥à¤µà¤¿à¤œà¤°à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "pt_CV": "पोरà¥à¤¤à¥à¤—ी (केप भरà¥à¤¡à¥‡)", + "pt_GQ": "पोरà¥à¤¤à¥à¤—ी (भू-मधà¥à¤¯à¥€à¤¯ गिनी)", + "pt_GW": "पोरà¥à¤¤à¥à¤—ी (गिनी-बिसाउ)", + "pt_LU": "पोरà¥à¤¤à¥à¤—ी (लकà¥à¤œà¥‡à¤®à¤¬à¤°à¥à¤—)", + "pt_MO": "पोरà¥à¤¤à¥à¤—ी (मकावो चिनिà¤à¤¯à¤¾ सà¥à¤µà¤¶à¤¾à¤¸à¤¿à¤¤ कà¥à¤·à¥‡à¤¤à¥à¤°)", + "pt_MZ": "पोरà¥à¤¤à¥à¤—ी (मोजामà¥à¤¬à¤¿à¤•)", + "pt_PT": "पोरà¥à¤¤à¥à¤—ी (पोरà¥à¤šà¥à¤—ल)", + "pt_ST": "पोरà¥à¤¤à¥à¤—ी (साओ टोमे र पà¥à¤°à¤¿à¤¨à¥à¤¸à¤¿à¤ª)", + "pt_TL": "पोरà¥à¤¤à¥à¤—ी (टिमोर-लेसà¥à¤Ÿà¥‡)", + "qu": "कà¥à¤µà¥‡à¤šà¥à¤µà¤¾", + "qu_BO": "कà¥à¤µà¥‡à¤šà¥à¤µà¤¾ (बोलिभिया)", + "qu_EC": "कà¥à¤µà¥‡à¤šà¥à¤µà¤¾ (इकà¥à¤µà¤¡à¥‡à¤°)", + "qu_PE": "कà¥à¤µà¥‡à¤šà¥à¤µà¤¾ (पेरू)", + "rm": "रोमानिस", + "rm_CH": "रोमानिस (सà¥à¤µà¤¿à¤œà¤°à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "rn": "रà¥à¤¨à¥à¤¡à¥€", + "rn_BI": "रà¥à¤¨à¥à¤¡à¥€ (बà¥à¤°à¥‚णà¥à¤¡à¥€)", + "ro": "रोमानियाली", + "ro_MD": "रोमानियाली (मालà¥à¤¡à¥‹à¤­à¤¾)", + "ro_RO": "रोमानियाली (रोमानिया)", + "ru": "रसियाली", + "ru_BY": "रसियाली (बेलारूस)", + "ru_KG": "रसियाली (किरà¥à¤—िसà¥à¤¥à¤¾à¤¨)", + "ru_KZ": "रसियाली (काजाकसà¥à¤¤à¤¾à¤¨)", + "ru_MD": "रसियाली (मालà¥à¤¡à¥‹à¤­à¤¾)", + "ru_RU": "रसियाली (रूस)", + "ru_UA": "रसियाली (यà¥à¤•à¥à¤°à¥‡à¤¨)", + "rw": "किनà¥à¤¯à¤¾à¤°à¤µà¤¾à¤¨à¥à¤¡à¤¾", + "rw_RW": "किनà¥à¤¯à¤¾à¤°à¤µà¤¾à¤¨à¥à¤¡à¤¾ (रवाणà¥à¤¡à¤¾)", + "se": "उतà¥à¤¤à¤°à¥€ सामी", + "se_FI": "उतà¥à¤¤à¤°à¥€ सामी (फिनà¥à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "se_NO": "उतà¥à¤¤à¤°à¥€ सामी (नरà¥à¤µà¥‡)", + "se_SE": "उतà¥à¤¤à¤°à¥€ सामी (सà¥à¤µà¤¿à¤¡à¥‡à¤¨)", + "sg": "साङà¥à¤—ो", + "sg_CF": "साङà¥à¤—ो (केनà¥à¤¦à¥à¤°à¥€à¤¯ अफà¥à¤°à¤¿à¤•ी गणतनà¥à¤¤à¥à¤°)", + "si": "सिनà¥à¤¹à¤¾à¤²à¥€", + "si_LK": "सिनà¥à¤¹à¤¾à¤²à¥€ (शà¥à¤°à¥€à¤²à¤™à¥à¤•ा)", + "sk": "सà¥à¤²à¥‹à¤­à¤¾à¤•ियाली", + "sk_SK": "सà¥à¤²à¥‹à¤­à¤¾à¤•ियाली (सà¥à¤²à¥‹à¤­à¤¾à¤•िया)", + "sl": "सà¥à¤²à¥‹à¤­à¥‡à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "sl_SI": "सà¥à¤²à¥‹à¤­à¥‡à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (सà¥à¤²à¥‹à¤­à¥‡à¤¨à¤¿à¤¯à¤¾)", + "sn": "शोना", + "sn_ZW": "शोना (जिमà¥à¤¬à¤¾à¤¬à¥‡)", + "so": "सोमाली", + "so_DJ": "सोमाली (डिजिबà¥à¤Ÿà¥€)", + "so_ET": "सोमाली (इथियोपिया)", + "so_KE": "सोमाली (केनà¥à¤¯à¤¾)", + "so_SO": "सोमाली (सोमालिया)", + "sq": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "sq_AL": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾)", + "sq_MK": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (मà¥à¤¯à¤¾à¤•ेडोनिया)", + "sq_XK": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾à¤²à¥€ (कोसोवो)", + "sr": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€", + "sr_BA": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (बोसà¥à¤¨à¤¿à¤¯à¤¾ à¤à¤£à¥à¤¡ हरà¥à¤œà¤—ोभिनिया)", + "sr_Cyrl": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (सिरिलिक)", + "sr_Cyrl_BA": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (सिरिलिक, बोसà¥à¤¨à¤¿à¤¯à¤¾ à¤à¤£à¥à¤¡ हरà¥à¤œà¤—ोभिनिया)", + "sr_Cyrl_ME": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (सिरिलिक, मोनà¥à¤Ÿà¥‡à¤¨à¥‡à¤—à¥à¤°à¥‹)", + "sr_Cyrl_RS": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (सिरिलिक, सरà¥à¤¬à¤¿à¤¯à¤¾)", + "sr_Cyrl_XK": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (सिरिलिक, कोसोवो)", + "sr_Latn": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨)", + "sr_Latn_BA": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨, बोसà¥à¤¨à¤¿à¤¯à¤¾ à¤à¤£à¥à¤¡ हरà¥à¤œà¤—ोभिनिया)", + "sr_Latn_ME": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨, मोनà¥à¤Ÿà¥‡à¤¨à¥‡à¤—à¥à¤°à¥‹)", + "sr_Latn_RS": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨, सरà¥à¤¬à¤¿à¤¯à¤¾)", + "sr_Latn_XK": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨, कोसोवो)", + "sr_ME": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (मोनà¥à¤Ÿà¥‡à¤¨à¥‡à¤—à¥à¤°à¥‹)", + "sr_RS": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (सरà¥à¤¬à¤¿à¤¯à¤¾)", + "sr_XK": "सरà¥à¤¬à¤¿à¤¯à¤¾à¤²à¥€ (कोसोवो)", + "sv": "सà¥à¤µà¤¿à¤¡à¤¿à¤¸", + "sv_AX": "सà¥à¤µà¤¿à¤¡à¤¿à¤¸ (अलानà¥à¤¡ टापà¥à¤¹à¤°à¥)", + "sv_FI": "सà¥à¤µà¤¿à¤¡à¤¿à¤¸ (फिनà¥à¤²à¥à¤¯à¤¾à¤£à¥à¤¡)", + "sv_SE": "सà¥à¤µà¤¿à¤¡à¤¿à¤¸ (सà¥à¤µà¤¿à¤¡à¥‡à¤¨)", + "sw": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€", + "sw_CD": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€ (कोङà¥à¤—ो-किनà¥à¤¶à¤¾à¤¸à¤¾)", + "sw_KE": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€ (केनà¥à¤¯à¤¾)", + "sw_TZ": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€ (तानà¥à¤œà¤¾à¤¨à¤¿à¤¯à¤¾)", + "sw_UG": "सà¥à¤µà¤¾à¤¹à¤¿à¤²à¥€ (यà¥à¤—ाणà¥à¤¡à¤¾)", + "ta": "तामिल", + "ta_IN": "तामिल (भारत)", + "ta_LK": "तामिल (शà¥à¤°à¥€à¤²à¤™à¥à¤•ा)", + "ta_MY": "तामिल (मलेसिया)", + "ta_SG": "तामिल (सिङà¥à¤—ापà¥à¤°)", + "te": "तेलà¥à¤—à¥", + "te_IN": "तेलà¥à¤—ॠ(भारत)", + "th": "थाई", + "th_TH": "थाई (थाइलà¥à¤¯à¤¾à¤£à¥à¤¡)", + "ti": "टिगà¥à¤°à¤¿à¤¨à¥à¤¯à¤¾", + "ti_ER": "टिगà¥à¤°à¤¿à¤¨à¥à¤¯à¤¾ (à¤à¤°à¤¿à¤¤à¥à¤°à¤¿à¤¯à¤¾)", + "ti_ET": "टिगà¥à¤°à¤¿à¤¨à¥à¤¯à¤¾ (इथियोपिया)", + "to": "टोङà¥à¤—न", + "to_TO": "टोङà¥à¤—न (टोंगा)", + "tr": "टरà¥à¤•िश", + "tr_CY": "टरà¥à¤•िश (साइपà¥à¤°à¤¸)", + "tr_TR": "टरà¥à¤•िश (टरà¥à¤•ी)", + "ug": "उइघà¥à¤°", + "ug_CN": "उइघà¥à¤° (चीन)", + "uk": "यà¥à¤•à¥à¤°à¥‡à¤¨à¥€", + "uk_UA": "यà¥à¤•à¥à¤°à¥‡à¤¨à¥€ (यà¥à¤•à¥à¤°à¥‡à¤¨)", + "ur": "उरà¥à¤¦à¥", + "ur_IN": "उरà¥à¤¦à¥ (भारत)", + "ur_PK": "उरà¥à¤¦à¥ (पाकिसà¥à¤¤à¤¾à¤¨)", + "uz": "उजà¥à¤¬à¥‡à¤•ी", + "uz_AF": "उजà¥à¤¬à¥‡à¤•ी (अफगानिसà¥à¤¤à¤¾à¤¨)", + "uz_Arab": "उजà¥à¤¬à¥‡à¤•ी (अरबी)", + "uz_Arab_AF": "उजà¥à¤¬à¥‡à¤•ी (अरबी, अफगानिसà¥à¤¤à¤¾à¤¨)", + "uz_Cyrl": "उजà¥à¤¬à¥‡à¤•ी (सिरिलिक)", + "uz_Cyrl_UZ": "उजà¥à¤¬à¥‡à¤•ी (सिरिलिक, उजà¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨)", + "uz_Latn": "उजà¥à¤¬à¥‡à¤•ी (लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨)", + "uz_Latn_UZ": "उजà¥à¤¬à¥‡à¤•ी (लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨, उजà¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨)", + "uz_UZ": "उजà¥à¤¬à¥‡à¤•ी (उजà¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨)", + "vi": "भियतनामी", + "vi_VN": "भियतनामी (भिà¤à¤¤à¤¨à¤¾à¤®)", + "yi": "यिदà¥à¤¦à¤¿à¤¸", + "yo": "योरूवा", + "yo_BJ": "योरूवा (बेनिन)", + "yo_NG": "योरूवा (नाइजेरिया)", + "zh": "चिनियाà¤", + "zh_CN": "चिनियाठ(चीन)", + "zh_HK": "चिनियाठ(हङकङ चिनिया समाजवादी सà¥à¤µà¤¾à¤¯à¤¤à¥à¤¤ कà¥à¤·à¥‡à¤¤à¥à¤°)", + "zh_Hans": "चिनियाठ(सरलिकृत चिनी)", + "zh_Hans_CN": "चिनियाठ(सरलिकृत चिनी, चीन)", + "zh_Hans_HK": "चिनियाठ(सरलिकृत चिनी, हङकङ चिनिया समाजवादी सà¥à¤µà¤¾à¤¯à¤¤à¥à¤¤ कà¥à¤·à¥‡à¤¤à¥à¤°)", + "zh_Hans_MO": "चिनियाठ(सरलिकृत चिनी, मकावो चिनिà¤à¤¯à¤¾ सà¥à¤µà¤¶à¤¾à¤¸à¤¿à¤¤ कà¥à¤·à¥‡à¤¤à¥à¤°)", + "zh_Hans_SG": "चिनियाठ(सरलिकृत चिनी, सिङà¥à¤—ापà¥à¤°)", + "zh_Hant": "चिनियाठ(परमà¥à¤ªà¤°à¤¾à¤—त चिनी)", + "zh_Hant_HK": "चिनियाठ(परमà¥à¤ªà¤°à¤¾à¤—त चिनी, हङकङ चिनिया समाजवादी सà¥à¤µà¤¾à¤¯à¤¤à¥à¤¤ कà¥à¤·à¥‡à¤¤à¥à¤°)", + "zh_Hant_MO": "चिनियाठ(परमà¥à¤ªà¤°à¤¾à¤—त चिनी, मकावो चिनिà¤à¤¯à¤¾ सà¥à¤µà¤¶à¤¾à¤¸à¤¿à¤¤ कà¥à¤·à¥‡à¤¤à¥à¤°)", + "zh_Hant_TW": "चिनियाठ(परमà¥à¤ªà¤°à¤¾à¤—त चिनी, ताइवान)", + "zh_MO": "चिनियाठ(मकावो चिनिà¤à¤¯à¤¾ सà¥à¤µà¤¶à¤¾à¤¸à¤¿à¤¤ कà¥à¤·à¥‡à¤¤à¥à¤°)", + "zh_SG": "चिनियाठ(सिङà¥à¤—ापà¥à¤°)", + "zh_TW": "चिनियाठ(ताइवान)", + "zu": "जà¥à¤²à¥", + "zu_ZA": "जà¥à¤²à¥ (दकà¥à¤·à¤¿à¤£ अफà¥à¤°à¤¿à¤•ा)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/nl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/nl.json new file mode 100644 index 0000000000000000000000000000000000000000..17d9dee7c959e7fa8a39ad64dbc35f78eb4ac41a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/nl.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Afrikaans", + "af_NA": "Afrikaans (Namibië)", + "af_ZA": "Afrikaans (Zuid-Afrika)", + "ak": "Akan", + "ak_GH": "Akan (Ghana)", + "am": "Amhaars", + "am_ET": "Amhaars (Ethiopië)", + "ar": "Arabisch", + "ar_AE": "Arabisch (Verenigde Arabische Emiraten)", + "ar_BH": "Arabisch (Bahrein)", + "ar_DJ": "Arabisch (Djibouti)", + "ar_DZ": "Arabisch (Algerije)", + "ar_EG": "Arabisch (Egypte)", + "ar_EH": "Arabisch (Westelijke Sahara)", + "ar_ER": "Arabisch (Eritrea)", + "ar_IL": "Arabisch (Israël)", + "ar_IQ": "Arabisch (Irak)", + "ar_JO": "Arabisch (Jordanië)", + "ar_KM": "Arabisch (Comoren)", + "ar_KW": "Arabisch (Koeweit)", + "ar_LB": "Arabisch (Libanon)", + "ar_LY": "Arabisch (Libië)", + "ar_MA": "Arabisch (Marokko)", + "ar_MR": "Arabisch (Mauritanië)", + "ar_OM": "Arabisch (Oman)", + "ar_PS": "Arabisch (Palestijnse gebieden)", + "ar_QA": "Arabisch (Qatar)", + "ar_SA": "Arabisch (Saoedi-Arabië)", + "ar_SD": "Arabisch (Soedan)", + "ar_SO": "Arabisch (Somalië)", + "ar_SS": "Arabisch (Zuid-Soedan)", + "ar_SY": "Arabisch (Syrië)", + "ar_TD": "Arabisch (Tsjaad)", + "ar_TN": "Arabisch (Tunesië)", + "ar_YE": "Arabisch (Jemen)", + "as": "Assamees", + "as_IN": "Assamees (India)", + "az": "Azerbeidzjaans", + "az_AZ": "Azerbeidzjaans (Azerbeidzjan)", + "az_Cyrl": "Azerbeidzjaans (Cyrillisch)", + "az_Cyrl_AZ": "Azerbeidzjaans (Cyrillisch, Azerbeidzjan)", + "az_Latn": "Azerbeidzjaans (Latijns)", + "az_Latn_AZ": "Azerbeidzjaans (Latijns, Azerbeidzjan)", + "be": "Wit-Russisch", + "be_BY": "Wit-Russisch (Belarus)", + "bg": "Bulgaars", + "bg_BG": "Bulgaars (Bulgarije)", + "bm": "Bambara", + "bm_ML": "Bambara (Mali)", + "bn": "Bengaals", + "bn_BD": "Bengaals (Bangladesh)", + "bn_IN": "Bengaals (India)", + "bo": "Tibetaans", + "bo_CN": "Tibetaans (China)", + "bo_IN": "Tibetaans (India)", + "br": "Bretons", + "br_FR": "Bretons (Frankrijk)", + "bs": "Bosnisch", + "bs_BA": "Bosnisch (Bosnië en Herzegovina)", + "bs_Cyrl": "Bosnisch (Cyrillisch)", + "bs_Cyrl_BA": "Bosnisch (Cyrillisch, Bosnië en Herzegovina)", + "bs_Latn": "Bosnisch (Latijns)", + "bs_Latn_BA": "Bosnisch (Latijns, Bosnië en Herzegovina)", + "ca": "Catalaans", + "ca_AD": "Catalaans (Andorra)", + "ca_ES": "Catalaans (Spanje)", + "ca_FR": "Catalaans (Frankrijk)", + "ca_IT": "Catalaans (Italië)", + "ce": "Tsjetsjeens", + "ce_RU": "Tsjetsjeens (Rusland)", + "cs": "Tsjechisch", + "cs_CZ": "Tsjechisch (Tsjechië)", + "cy": "Welsh", + "cy_GB": "Welsh (Verenigd Koninkrijk)", + "da": "Deens", + "da_DK": "Deens (Denemarken)", + "da_GL": "Deens (Groenland)", + "de": "Duits", + "de_AT": "Duits (Oostenrijk)", + "de_BE": "Duits (België)", + "de_CH": "Duits (Zwitserland)", + "de_DE": "Duits (Duitsland)", + "de_IT": "Duits (Italië)", + "de_LI": "Duits (Liechtenstein)", + "de_LU": "Duits (Luxemburg)", + "dz": "Dzongkha", + "dz_BT": "Dzongkha (Bhutan)", + "ee": "Ewe", + "ee_GH": "Ewe (Ghana)", + "ee_TG": "Ewe (Togo)", + "el": "Grieks", + "el_CY": "Grieks (Cyprus)", + "el_GR": "Grieks (Griekenland)", + "en": "Engels", + "en_AG": "Engels (Antigua en Barbuda)", + "en_AI": "Engels (Anguilla)", + "en_AS": "Engels (Amerikaans-Samoa)", + "en_AT": "Engels (Oostenrijk)", + "en_AU": "Engels (Australië)", + "en_BB": "Engels (Barbados)", + "en_BE": "Engels (België)", + "en_BI": "Engels (Burundi)", + "en_BM": "Engels (Bermuda)", + "en_BS": "Engels (Bahama’s)", + "en_BW": "Engels (Botswana)", + "en_BZ": "Engels (Belize)", + "en_CA": "Engels (Canada)", + "en_CC": "Engels (Cocoseilanden)", + "en_CH": "Engels (Zwitserland)", + "en_CK": "Engels (Cookeilanden)", + "en_CM": "Engels (Kameroen)", + "en_CX": "Engels (Christmaseiland)", + "en_CY": "Engels (Cyprus)", + "en_DE": "Engels (Duitsland)", + "en_DG": "Engels (Diego Garcia)", + "en_DK": "Engels (Denemarken)", + "en_DM": "Engels (Dominica)", + "en_ER": "Engels (Eritrea)", + "en_FI": "Engels (Finland)", + "en_FJ": "Engels (Fiji)", + "en_FK": "Engels (Falklandeilanden)", + "en_FM": "Engels (Micronesia)", + "en_GB": "Engels (Verenigd Koninkrijk)", + "en_GD": "Engels (Grenada)", + "en_GG": "Engels (Guernsey)", + "en_GH": "Engels (Ghana)", + "en_GI": "Engels (Gibraltar)", + "en_GM": "Engels (Gambia)", + "en_GU": "Engels (Guam)", + "en_GY": "Engels (Guyana)", + "en_HK": "Engels (Hongkong SAR van China)", + "en_IE": "Engels (Ierland)", + "en_IL": "Engels (Israël)", + "en_IM": "Engels (Isle of Man)", + "en_IN": "Engels (India)", + "en_IO": "Engels (Britse Gebieden in de Indische Oceaan)", + "en_JE": "Engels (Jersey)", + "en_JM": "Engels (Jamaica)", + "en_KE": "Engels (Kenia)", + "en_KI": "Engels (Kiribati)", + "en_KN": "Engels (Saint Kitts en Nevis)", + "en_KY": "Engels (Kaaimaneilanden)", + "en_LC": "Engels (Saint Lucia)", + "en_LR": "Engels (Liberia)", + "en_LS": "Engels (Lesotho)", + "en_MG": "Engels (Madagaskar)", + "en_MH": "Engels (Marshalleilanden)", + "en_MO": "Engels (Macau SAR van China)", + "en_MP": "Engels (Noordelijke Marianen)", + "en_MS": "Engels (Montserrat)", + "en_MT": "Engels (Malta)", + "en_MU": "Engels (Mauritius)", + "en_MW": "Engels (Malawi)", + "en_MY": "Engels (Maleisië)", + "en_NA": "Engels (Namibië)", + "en_NF": "Engels (Norfolk)", + "en_NG": "Engels (Nigeria)", + "en_NL": "Engels (Nederland)", + "en_NR": "Engels (Nauru)", + "en_NU": "Engels (Niue)", + "en_NZ": "Engels (Nieuw-Zeeland)", + "en_PG": "Engels (Papoea-Nieuw-Guinea)", + "en_PH": "Engels (Filipijnen)", + "en_PK": "Engels (Pakistan)", + "en_PN": "Engels (Pitcairneilanden)", + "en_PR": "Engels (Puerto Rico)", + "en_PW": "Engels (Palau)", + "en_RW": "Engels (Rwanda)", + "en_SB": "Engels (Salomonseilanden)", + "en_SC": "Engels (Seychellen)", + "en_SD": "Engels (Soedan)", + "en_SE": "Engels (Zweden)", + "en_SG": "Engels (Singapore)", + "en_SH": "Engels (Sint-Helena)", + "en_SI": "Engels (Slovenië)", + "en_SL": "Engels (Sierra Leone)", + "en_SS": "Engels (Zuid-Soedan)", + "en_SX": "Engels (Sint-Maarten)", + "en_SZ": "Engels (Swaziland)", + "en_TC": "Engels (Turks- en Caicoseilanden)", + "en_TK": "Engels (Tokelau)", + "en_TO": "Engels (Tonga)", + "en_TT": "Engels (Trinidad en Tobago)", + "en_TV": "Engels (Tuvalu)", + "en_TZ": "Engels (Tanzania)", + "en_UG": "Engels (Oeganda)", + "en_UM": "Engels (Kleine afgelegen eilanden van de Verenigde Staten)", + "en_US": "Engels (Verenigde Staten)", + "en_VC": "Engels (Saint Vincent en de Grenadines)", + "en_VG": "Engels (Britse Maagdeneilanden)", + "en_VI": "Engels (Amerikaanse Maagdeneilanden)", + "en_VU": "Engels (Vanuatu)", + "en_WS": "Engels (Samoa)", + "en_ZA": "Engels (Zuid-Afrika)", + "en_ZM": "Engels (Zambia)", + "en_ZW": "Engels (Zimbabwe)", + "eo": "Esperanto", + "es": "Spaans", + "es_AR": "Spaans (Argentinië)", + "es_BO": "Spaans (Bolivia)", + "es_BR": "Spaans (Brazilië)", + "es_CL": "Spaans (Chili)", + "es_CO": "Spaans (Colombia)", + "es_CR": "Spaans (Costa Rica)", + "es_CU": "Spaans (Cuba)", + "es_DO": "Spaans (Dominicaanse Republiek)", + "es_EA": "Spaans (Ceuta en Melilla)", + "es_EC": "Spaans (Ecuador)", + "es_ES": "Spaans (Spanje)", + "es_GQ": "Spaans (Equatoriaal-Guinea)", + "es_GT": "Spaans (Guatemala)", + "es_HN": "Spaans (Honduras)", + "es_IC": "Spaans (Canarische Eilanden)", + "es_MX": "Spaans (Mexico)", + "es_NI": "Spaans (Nicaragua)", + "es_PA": "Spaans (Panama)", + "es_PE": "Spaans (Peru)", + "es_PH": "Spaans (Filipijnen)", + "es_PR": "Spaans (Puerto Rico)", + "es_PY": "Spaans (Paraguay)", + "es_SV": "Spaans (El Salvador)", + "es_US": "Spaans (Verenigde Staten)", + "es_UY": "Spaans (Uruguay)", + "es_VE": "Spaans (Venezuela)", + "et": "Estisch", + "et_EE": "Estisch (Estland)", + "eu": "Baskisch", + "eu_ES": "Baskisch (Spanje)", + "fa": "Perzisch", + "fa_AF": "Perzisch (Afghanistan)", + "fa_IR": "Perzisch (Iran)", + "ff": "Fulah", + "ff_CM": "Fulah (Kameroen)", + "ff_GN": "Fulah (Guinee)", + "ff_MR": "Fulah (Mauritanië)", + "ff_SN": "Fulah (Senegal)", + "fi": "Fins", + "fi_FI": "Fins (Finland)", + "fo": "Faeröers", + "fo_DK": "Faeröers (Denemarken)", + "fo_FO": "Faeröers (Faeröer)", + "fr": "Frans", + "fr_BE": "Frans (België)", + "fr_BF": "Frans (Burkina Faso)", + "fr_BI": "Frans (Burundi)", + "fr_BJ": "Frans (Benin)", + "fr_BL": "Frans (Saint-Barthélemy)", + "fr_CA": "Frans (Canada)", + "fr_CD": "Frans (Congo-Kinshasa)", + "fr_CF": "Frans (Centraal-Afrikaanse Republiek)", + "fr_CG": "Frans (Congo-Brazzaville)", + "fr_CH": "Frans (Zwitserland)", + "fr_CI": "Frans (Ivoorkust)", + "fr_CM": "Frans (Kameroen)", + "fr_DJ": "Frans (Djibouti)", + "fr_DZ": "Frans (Algerije)", + "fr_FR": "Frans (Frankrijk)", + "fr_GA": "Frans (Gabon)", + "fr_GF": "Frans (Frans-Guyana)", + "fr_GN": "Frans (Guinee)", + "fr_GP": "Frans (Guadeloupe)", + "fr_GQ": "Frans (Equatoriaal-Guinea)", + "fr_HT": "Frans (Haïti)", + "fr_KM": "Frans (Comoren)", + "fr_LU": "Frans (Luxemburg)", + "fr_MA": "Frans (Marokko)", + "fr_MC": "Frans (Monaco)", + "fr_MF": "Frans (Saint-Martin)", + "fr_MG": "Frans (Madagaskar)", + "fr_ML": "Frans (Mali)", + "fr_MQ": "Frans (Martinique)", + "fr_MR": "Frans (Mauritanië)", + "fr_MU": "Frans (Mauritius)", + "fr_NC": "Frans (Nieuw-Caledonië)", + "fr_NE": "Frans (Niger)", + "fr_PF": "Frans (Frans-Polynesië)", + "fr_PM": "Frans (Saint-Pierre en Miquelon)", + "fr_RE": "Frans (Réunion)", + "fr_RW": "Frans (Rwanda)", + "fr_SC": "Frans (Seychellen)", + "fr_SN": "Frans (Senegal)", + "fr_SY": "Frans (Syrië)", + "fr_TD": "Frans (Tsjaad)", + "fr_TG": "Frans (Togo)", + "fr_TN": "Frans (Tunesië)", + "fr_VU": "Frans (Vanuatu)", + "fr_WF": "Frans (Wallis en Futuna)", + "fr_YT": "Frans (Mayotte)", + "fy": "Fries", + "fy_NL": "Fries (Nederland)", + "ga": "Iers", + "ga_IE": "Iers (Ierland)", + "gd": "Schots-Gaelisch", + "gd_GB": "Schots-Gaelisch (Verenigd Koninkrijk)", + "gl": "Galicisch", + "gl_ES": "Galicisch (Spanje)", + "gu": "Gujarati", + "gu_IN": "Gujarati (India)", + "gv": "Manx", + "gv_IM": "Manx (Isle of Man)", + "ha": "Hausa", + "ha_GH": "Hausa (Ghana)", + "ha_NE": "Hausa (Niger)", + "ha_NG": "Hausa (Nigeria)", + "he": "Hebreeuws", + "he_IL": "Hebreeuws (Israël)", + "hi": "Hindi", + "hi_IN": "Hindi (India)", + "hr": "Kroatisch", + "hr_BA": "Kroatisch (Bosnië en Herzegovina)", + "hr_HR": "Kroatisch (Kroatië)", + "hu": "Hongaars", + "hu_HU": "Hongaars (Hongarije)", + "hy": "Armeens", + "hy_AM": "Armeens (Armenië)", + "id": "Indonesisch", + "id_ID": "Indonesisch (Indonesië)", + "ig": "Igbo", + "ig_NG": "Igbo (Nigeria)", + "ii": "Yi", + "ii_CN": "Yi (China)", + "is": "IJslands", + "is_IS": "IJslands (IJsland)", + "it": "Italiaans", + "it_CH": "Italiaans (Zwitserland)", + "it_IT": "Italiaans (Italië)", + "it_SM": "Italiaans (San Marino)", + "ja": "Japans", + "ja_JP": "Japans (Japan)", + "ka": "Georgisch", + "ka_GE": "Georgisch (Georgië)", + "ki": "Gikuyu", + "ki_KE": "Gikuyu (Kenia)", + "kk": "Kazachs", + "kk_KZ": "Kazachs (Kazachstan)", + "kl": "Groenlands", + "kl_GL": "Groenlands (Groenland)", + "km": "Khmer", + "km_KH": "Khmer (Cambodja)", + "kn": "Kannada", + "kn_IN": "Kannada (India)", + "ko": "Koreaans", + "ko_KP": "Koreaans (Noord-Korea)", + "ko_KR": "Koreaans (Zuid-Korea)", + "ks": "Kasjmiri", + "ks_IN": "Kasjmiri (India)", + "kw": "Cornish", + "kw_GB": "Cornish (Verenigd Koninkrijk)", + "ky": "Kirgizisch", + "ky_KG": "Kirgizisch (Kirgizië)", + "lb": "Luxemburgs", + "lb_LU": "Luxemburgs (Luxemburg)", + "lg": "Luganda", + "lg_UG": "Luganda (Oeganda)", + "ln": "Lingala", + "ln_AO": "Lingala (Angola)", + "ln_CD": "Lingala (Congo-Kinshasa)", + "ln_CF": "Lingala (Centraal-Afrikaanse Republiek)", + "ln_CG": "Lingala (Congo-Brazzaville)", + "lo": "Laotiaans", + "lo_LA": "Laotiaans (Laos)", + "lt": "Litouws", + "lt_LT": "Litouws (Litouwen)", + "lu": "Luba-Katanga", + "lu_CD": "Luba-Katanga (Congo-Kinshasa)", + "lv": "Lets", + "lv_LV": "Lets (Letland)", + "mg": "Malagassisch", + "mg_MG": "Malagassisch (Madagaskar)", + "mk": "Macedonisch", + "mk_MK": "Macedonisch (Macedonië)", + "ml": "Malayalam", + "ml_IN": "Malayalam (India)", + "mn": "Mongools", + "mn_MN": "Mongools (Mongolië)", + "mr": "Marathi", + "mr_IN": "Marathi (India)", + "ms": "Maleis", + "ms_BN": "Maleis (Brunei)", + "ms_MY": "Maleis (Maleisië)", + "ms_SG": "Maleis (Singapore)", + "mt": "Maltees", + "mt_MT": "Maltees (Malta)", + "my": "Birmaans", + "my_MM": "Birmaans (Myanmar (Birma))", + "nb": "Noors - BokmÃ¥l", + "nb_NO": "Noors - BokmÃ¥l (Noorwegen)", + "nb_SJ": "Noors - BokmÃ¥l (Spitsbergen en Jan Mayen)", + "nd": "Noord-Ndebele", + "nd_ZW": "Noord-Ndebele (Zimbabwe)", + "ne": "Nepalees", + "ne_IN": "Nepalees (India)", + "ne_NP": "Nepalees (Nepal)", + "nl": "Nederlands", + "nl_AW": "Nederlands (Aruba)", + "nl_BE": "Nederlands (België)", + "nl_BQ": "Nederlands (Caribisch Nederland)", + "nl_CW": "Nederlands (Curaçao)", + "nl_NL": "Nederlands (Nederland)", + "nl_SR": "Nederlands (Suriname)", + "nl_SX": "Nederlands (Sint-Maarten)", + "nn": "Noors - Nynorsk", + "nn_NO": "Noors - Nynorsk (Noorwegen)", + "no": "Noors", + "no_NO": "Noors (Noorwegen)", + "om": "Afaan Oromo", + "om_ET": "Afaan Oromo (Ethiopië)", + "om_KE": "Afaan Oromo (Kenia)", + "or": "Odia", + "or_IN": "Odia (India)", + "os": "Ossetisch", + "os_GE": "Ossetisch (Georgië)", + "os_RU": "Ossetisch (Rusland)", + "pa": "Punjabi", + "pa_Arab": "Punjabi (Arabisch)", + "pa_Arab_PK": "Punjabi (Arabisch, Pakistan)", + "pa_Guru": "Punjabi (Gurmukhi)", + "pa_Guru_IN": "Punjabi (Gurmukhi, India)", + "pa_IN": "Punjabi (India)", + "pa_PK": "Punjabi (Pakistan)", + "pl": "Pools", + "pl_PL": "Pools (Polen)", + "ps": "Pasjtoe", + "ps_AF": "Pasjtoe (Afghanistan)", + "pt": "Portugees", + "pt_AO": "Portugees (Angola)", + "pt_BR": "Portugees (Brazilië)", + "pt_CH": "Portugees (Zwitserland)", + "pt_CV": "Portugees (Kaapverdië)", + "pt_GQ": "Portugees (Equatoriaal-Guinea)", + "pt_GW": "Portugees (Guinee-Bissau)", + "pt_LU": "Portugees (Luxemburg)", + "pt_MO": "Portugees (Macau SAR van China)", + "pt_MZ": "Portugees (Mozambique)", + "pt_PT": "Portugees (Portugal)", + "pt_ST": "Portugees (Sao Tomé en Principe)", + "pt_TL": "Portugees (Oost-Timor)", + "qu": "Quechua", + "qu_BO": "Quechua (Bolivia)", + "qu_EC": "Quechua (Ecuador)", + "qu_PE": "Quechua (Peru)", + "rm": "Reto-Romaans", + "rm_CH": "Reto-Romaans (Zwitserland)", + "rn": "Kirundi", + "rn_BI": "Kirundi (Burundi)", + "ro": "Roemeens", + "ro_MD": "Roemeens (Moldavië)", + "ro_RO": "Roemeens (Roemenië)", + "ru": "Russisch", + "ru_BY": "Russisch (Belarus)", + "ru_KG": "Russisch (Kirgizië)", + "ru_KZ": "Russisch (Kazachstan)", + "ru_MD": "Russisch (Moldavië)", + "ru_RU": "Russisch (Rusland)", + "ru_UA": "Russisch (Oekraïne)", + "rw": "Kinyarwanda", + "rw_RW": "Kinyarwanda (Rwanda)", + "se": "Noord-Samisch", + "se_FI": "Noord-Samisch (Finland)", + "se_NO": "Noord-Samisch (Noorwegen)", + "se_SE": "Noord-Samisch (Zweden)", + "sg": "Sango", + "sg_CF": "Sango (Centraal-Afrikaanse Republiek)", + "sh": "Servo-Kroatisch", + "sh_BA": "Servo-Kroatisch (Bosnië en Herzegovina)", + "si": "Singalees", + "si_LK": "Singalees (Sri Lanka)", + "sk": "Slowaaks", + "sk_SK": "Slowaaks (Slowakije)", + "sl": "Sloveens", + "sl_SI": "Sloveens (Slovenië)", + "sn": "Shona", + "sn_ZW": "Shona (Zimbabwe)", + "so": "Somalisch", + "so_DJ": "Somalisch (Djibouti)", + "so_ET": "Somalisch (Ethiopië)", + "so_KE": "Somalisch (Kenia)", + "so_SO": "Somalisch (Somalië)", + "sq": "Albanees", + "sq_AL": "Albanees (Albanië)", + "sq_MK": "Albanees (Macedonië)", + "sq_XK": "Albanees (Kosovo)", + "sr": "Servisch", + "sr_BA": "Servisch (Bosnië en Herzegovina)", + "sr_Cyrl": "Servisch (Cyrillisch)", + "sr_Cyrl_BA": "Servisch (Cyrillisch, Bosnië en Herzegovina)", + "sr_Cyrl_ME": "Servisch (Cyrillisch, Montenegro)", + "sr_Cyrl_RS": "Servisch (Cyrillisch, Servië)", + "sr_Cyrl_XK": "Servisch (Cyrillisch, Kosovo)", + "sr_Latn": "Servisch (Latijns)", + "sr_Latn_BA": "Servisch (Latijns, Bosnië en Herzegovina)", + "sr_Latn_ME": "Servisch (Latijns, Montenegro)", + "sr_Latn_RS": "Servisch (Latijns, Servië)", + "sr_Latn_XK": "Servisch (Latijns, Kosovo)", + "sr_ME": "Servisch (Montenegro)", + "sr_RS": "Servisch (Servië)", + "sr_XK": "Servisch (Kosovo)", + "sv": "Zweeds", + "sv_AX": "Zweeds (Ã…land)", + "sv_FI": "Zweeds (Finland)", + "sv_SE": "Zweeds (Zweden)", + "sw": "Swahili", + "sw_CD": "Swahili (Congo-Kinshasa)", + "sw_KE": "Swahili (Kenia)", + "sw_TZ": "Swahili (Tanzania)", + "sw_UG": "Swahili (Oeganda)", + "ta": "Tamil", + "ta_IN": "Tamil (India)", + "ta_LK": "Tamil (Sri Lanka)", + "ta_MY": "Tamil (Maleisië)", + "ta_SG": "Tamil (Singapore)", + "te": "Telugu", + "te_IN": "Telugu (India)", + "th": "Thai", + "th_TH": "Thai (Thailand)", + "ti": "Tigrinya", + "ti_ER": "Tigrinya (Eritrea)", + "ti_ET": "Tigrinya (Ethiopië)", + "tl": "Tagalog", + "tl_PH": "Tagalog (Filipijnen)", + "to": "Tongaans", + "to_TO": "Tongaans (Tonga)", + "tr": "Turks", + "tr_CY": "Turks (Cyprus)", + "tr_TR": "Turks (Turkije)", + "ug": "Oeigoers", + "ug_CN": "Oeigoers (China)", + "uk": "Oekraïens", + "uk_UA": "Oekraïens (Oekraïne)", + "ur": "Urdu", + "ur_IN": "Urdu (India)", + "ur_PK": "Urdu (Pakistan)", + "uz": "Oezbeeks", + "uz_AF": "Oezbeeks (Afghanistan)", + "uz_Arab": "Oezbeeks (Arabisch)", + "uz_Arab_AF": "Oezbeeks (Arabisch, Afghanistan)", + "uz_Cyrl": "Oezbeeks (Cyrillisch)", + "uz_Cyrl_UZ": "Oezbeeks (Cyrillisch, Oezbekistan)", + "uz_Latn": "Oezbeeks (Latijns)", + "uz_Latn_UZ": "Oezbeeks (Latijns, Oezbekistan)", + "uz_UZ": "Oezbeeks (Oezbekistan)", + "vi": "Vietnamees", + "vi_VN": "Vietnamees (Vietnam)", + "yi": "Jiddisch", + "yo": "Yoruba", + "yo_BJ": "Yoruba (Benin)", + "yo_NG": "Yoruba (Nigeria)", + "zh": "Chinees", + "zh_CN": "Chinees (China)", + "zh_HK": "Chinees (Hongkong SAR van China)", + "zh_Hans": "Chinees (vereenvoudigd)", + "zh_Hans_CN": "Chinees (vereenvoudigd, China)", + "zh_Hans_HK": "Chinees (vereenvoudigd, Hongkong SAR van China)", + "zh_Hans_MO": "Chinees (vereenvoudigd, Macau SAR van China)", + "zh_Hans_SG": "Chinees (vereenvoudigd, Singapore)", + "zh_Hant": "Chinees (traditioneel)", + "zh_Hant_HK": "Chinees (traditioneel, Hongkong SAR van China)", + "zh_Hant_MO": "Chinees (traditioneel, Macau SAR van China)", + "zh_Hant_TW": "Chinees (traditioneel, Taiwan)", + "zh_MO": "Chinees (Macau SAR van China)", + "zh_SG": "Chinees (Singapore)", + "zh_TW": "Chinees (Taiwan)", + "zu": "Zoeloe", + "zu_ZA": "Zoeloe (Zuid-Afrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/nn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/nn.json new file mode 100644 index 0000000000000000000000000000000000000000..db33ea2729638c7bb9a792b30e908e67342ece76 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/nn.json @@ -0,0 +1,567 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibia)", + "af_ZA": "afrikaans (Sør-Afrika)", + "ak": "akan", + "ak_GH": "akan (Ghana)", + "am": "amharisk", + "am_ET": "amharisk (Etiopia)", + "ar": "arabisk", + "ar_AE": "arabisk (Dei sameinte arabiske emirata)", + "ar_BH": "arabisk (Bahrain)", + "ar_DJ": "arabisk (Djibouti)", + "ar_DZ": "arabisk (Algerie)", + "ar_EG": "arabisk (Egypt)", + "ar_EH": "arabisk (Vest-Sahara)", + "ar_ER": "arabisk (Eritrea)", + "ar_IL": "arabisk (Israel)", + "ar_IQ": "arabisk (Irak)", + "ar_JO": "arabisk (Jordan)", + "ar_KM": "arabisk (Komorane)", + "ar_KW": "arabisk (Kuwait)", + "ar_LB": "arabisk (Libanon)", + "ar_LY": "arabisk (Libya)", + "ar_MA": "arabisk (Marokko)", + "ar_MR": "arabisk (Mauritania)", + "ar_OM": "arabisk (Oman)", + "ar_PS": "arabisk (Palestinsk territorium)", + "ar_QA": "arabisk (Qatar)", + "ar_SA": "arabisk (Saudi-Arabia)", + "ar_SD": "arabisk (Sudan)", + "ar_SO": "arabisk (Somalia)", + "ar_SS": "arabisk (Sør-Sudan)", + "ar_SY": "arabisk (Syria)", + "ar_TD": "arabisk (Tsjad)", + "ar_TN": "arabisk (Tunisia)", + "ar_YE": "arabisk (Jemen)", + "as": "assamesisk", + "as_IN": "assamesisk (India)", + "az": "aserbajdsjansk", + "az_AZ": "aserbajdsjansk (Aserbajdsjan)", + "az_Cyrl": "aserbajdsjansk (kyrillisk)", + "az_Cyrl_AZ": "aserbajdsjansk (kyrillisk, Aserbajdsjan)", + "az_Latn": "aserbajdsjansk (latinsk)", + "az_Latn_AZ": "aserbajdsjansk (latinsk, Aserbajdsjan)", + "be": "kviterussisk", + "be_BY": "kviterussisk (Kviterussland)", + "bg": "bulgarsk", + "bg_BG": "bulgarsk (Bulgaria)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengali", + "bn_BD": "bengali (Bangladesh)", + "bn_IN": "bengali (India)", + "bo": "tibetansk", + "bo_CN": "tibetansk (Kina)", + "bo_IN": "tibetansk (India)", + "br": "bretonsk", + "br_FR": "bretonsk (Frankrike)", + "bs": "bosnisk", + "bs_BA": "bosnisk (Bosnia og Hercegovina)", + "bs_Cyrl": "bosnisk (kyrillisk)", + "bs_Cyrl_BA": "bosnisk (kyrillisk, Bosnia og Hercegovina)", + "bs_Latn": "bosnisk (latinsk)", + "bs_Latn_BA": "bosnisk (latinsk, Bosnia og Hercegovina)", + "ca": "katalansk", + "ca_AD": "katalansk (Andorra)", + "ca_ES": "katalansk (Spania)", + "ca_FR": "katalansk (Frankrike)", + "ca_IT": "katalansk (Italia)", + "ce": "tsjetsjensk", + "ce_RU": "tsjetsjensk (Russland)", + "cs": "tsjekkisk", + "cs_CZ": "tsjekkisk (Tsjekkia)", + "cy": "walisisk", + "cy_GB": "walisisk (Storbritannia)", + "da": "dansk", + "da_DK": "dansk (Danmark)", + "da_GL": "dansk (Grønland)", + "de": "tysk", + "de_AT": "tysk (Austerrike)", + "de_BE": "tysk (Belgia)", + "de_CH": "tysk (Sveits)", + "de_DE": "tysk (Tyskland)", + "de_IT": "tysk (Italia)", + "de_LI": "tysk (Liechtenstein)", + "de_LU": "tysk (Luxembourg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhutan)", + "ee": "ewe", + "ee_GH": "ewe (Ghana)", + "ee_TG": "ewe (Togo)", + "el": "gresk", + "el_CY": "gresk (Kypros)", + "el_GR": "gresk (Hellas)", + "en": "engelsk", + "en_AG": "engelsk (Antigua og Barbuda)", + "en_AI": "engelsk (Anguilla)", + "en_AS": "engelsk (Amerikansk Samoa)", + "en_AT": "engelsk (Austerrike)", + "en_AU": "engelsk (Australia)", + "en_BB": "engelsk (Barbados)", + "en_BE": "engelsk (Belgia)", + "en_BI": "engelsk (Burundi)", + "en_BM": "engelsk (Bermuda)", + "en_BS": "engelsk (Bahamas)", + "en_BW": "engelsk (Botswana)", + "en_BZ": "engelsk (Belize)", + "en_CA": "engelsk (Canada)", + "en_CC": "engelsk (Kokosøyane)", + "en_CH": "engelsk (Sveits)", + "en_CK": "engelsk (Cookøyane)", + "en_CM": "engelsk (Kamerun)", + "en_CX": "engelsk (Christmasøya)", + "en_CY": "engelsk (Kypros)", + "en_DE": "engelsk (Tyskland)", + "en_DG": "engelsk (Diego Garcia)", + "en_DK": "engelsk (Danmark)", + "en_DM": "engelsk (Dominica)", + "en_ER": "engelsk (Eritrea)", + "en_FI": "engelsk (Finland)", + "en_FJ": "engelsk (Fiji)", + "en_FK": "engelsk (Falklandsøyane)", + "en_FM": "engelsk (Mikronesiaføderasjonen)", + "en_GB": "engelsk (Storbritannia)", + "en_GD": "engelsk (Grenada)", + "en_GG": "engelsk (Guernsey)", + "en_GH": "engelsk (Ghana)", + "en_GI": "engelsk (Gibraltar)", + "en_GM": "engelsk (Gambia)", + "en_GU": "engelsk (Guam)", + "en_GY": "engelsk (Guyana)", + "en_HK": "engelsk (Hongkong S.A.R. Kina)", + "en_IE": "engelsk (Irland)", + "en_IL": "engelsk (Israel)", + "en_IM": "engelsk (Man)", + "en_IN": "engelsk (India)", + "en_IO": "engelsk (Britiske omrÃ¥de i Det indiske hav)", + "en_JE": "engelsk (Jersey)", + "en_JM": "engelsk (Jamaica)", + "en_KE": "engelsk (Kenya)", + "en_KI": "engelsk (Kiribati)", + "en_KN": "engelsk (St. Christopher og Nevis)", + "en_KY": "engelsk (Caymanøyane)", + "en_LC": "engelsk (St. Lucia)", + "en_LR": "engelsk (Liberia)", + "en_LS": "engelsk (Lesotho)", + "en_MG": "engelsk (Madagaskar)", + "en_MH": "engelsk (Marshalløyane)", + "en_MO": "engelsk (Macao S.A.R. Kina)", + "en_MP": "engelsk (Nord-Marianane)", + "en_MS": "engelsk (Montserrat)", + "en_MT": "engelsk (Malta)", + "en_MU": "engelsk (Mauritius)", + "en_MW": "engelsk (Malawi)", + "en_MY": "engelsk (Malaysia)", + "en_NA": "engelsk (Namibia)", + "en_NF": "engelsk (Norfolkøyane)", + "en_NG": "engelsk (Nigeria)", + "en_NL": "engelsk (Nederland)", + "en_NR": "engelsk (Nauru)", + "en_NU": "engelsk (Niue)", + "en_NZ": "engelsk (New Zealand)", + "en_PG": "engelsk (Papua Ny-Guinea)", + "en_PH": "engelsk (Filippinane)", + "en_PK": "engelsk (Pakistan)", + "en_PN": "engelsk (Pitcairn)", + "en_PR": "engelsk (Puerto Rico)", + "en_PW": "engelsk (Palau)", + "en_RW": "engelsk (Rwanda)", + "en_SB": "engelsk (Salomonøyane)", + "en_SC": "engelsk (Seychellane)", + "en_SD": "engelsk (Sudan)", + "en_SE": "engelsk (Sverige)", + "en_SG": "engelsk (Singapore)", + "en_SH": "engelsk (Saint Helena)", + "en_SI": "engelsk (Slovenia)", + "en_SL": "engelsk (Sierra Leone)", + "en_SS": "engelsk (Sør-Sudan)", + "en_SX": "engelsk (Sint Maarten)", + "en_SZ": "engelsk (Swaziland)", + "en_TC": "engelsk (Turks- og Caicosøyane)", + "en_TK": "engelsk (Tokelau)", + "en_TO": "engelsk (Tonga)", + "en_TT": "engelsk (Trinidad og Tobago)", + "en_TV": "engelsk (Tuvalu)", + "en_TZ": "engelsk (Tanzania)", + "en_UG": "engelsk (Uganda)", + "en_UM": "engelsk (USAs ytre småøyar)", + "en_US": "engelsk (USA)", + "en_VC": "engelsk (St. Vincent og Grenadinane)", + "en_VG": "engelsk (Dei britiske jomfruøyane)", + "en_VI": "engelsk (Dei amerikanske jomfruøyane)", + "en_VU": "engelsk (Vanuatu)", + "en_WS": "engelsk (Samoa)", + "en_ZA": "engelsk (Sør-Afrika)", + "en_ZM": "engelsk (Zambia)", + "en_ZW": "engelsk (Zimbabwe)", + "eo": "esperanto", + "es": "spansk", + "es_AR": "spansk (Argentina)", + "es_BO": "spansk (Bolivia)", + "es_BR": "spansk (Brasil)", + "es_CL": "spansk (Chile)", + "es_CO": "spansk (Colombia)", + "es_CR": "spansk (Costa Rica)", + "es_CU": "spansk (Cuba)", + "es_DO": "spansk (Den dominikanske republikken)", + "es_EA": "spansk (Ceuta og Melilla)", + "es_EC": "spansk (Ecuador)", + "es_ES": "spansk (Spania)", + "es_GQ": "spansk (Ekvatorial-Guinea)", + "es_GT": "spansk (Guatemala)", + "es_HN": "spansk (Honduras)", + "es_IC": "spansk (Kanariøyane)", + "es_MX": "spansk (Mexico)", + "es_NI": "spansk (Nicaragua)", + "es_PA": "spansk (Panama)", + "es_PE": "spansk (Peru)", + "es_PH": "spansk (Filippinane)", + "es_PR": "spansk (Puerto Rico)", + "es_PY": "spansk (Paraguay)", + "es_SV": "spansk (El Salvador)", + "es_US": "spansk (USA)", + "es_UY": "spansk (Uruguay)", + "es_VE": "spansk (Venezuela)", + "et": "estisk", + "et_EE": "estisk (Estland)", + "eu": "baskisk", + "eu_ES": "baskisk (Spania)", + "fa": "persisk", + "fa_AF": "persisk (Afghanistan)", + "fa_IR": "persisk (Iran)", + "ff": "fulfulde", + "ff_CM": "fulfulde (Kamerun)", + "ff_GN": "fulfulde (Guinea)", + "ff_MR": "fulfulde (Mauritania)", + "ff_SN": "fulfulde (Senegal)", + "fi": "finsk", + "fi_FI": "finsk (Finland)", + "fo": "færøysk", + "fo_DK": "færøysk (Danmark)", + "fo_FO": "færøysk (Færøyane)", + "fr": "fransk", + "fr_BE": "fransk (Belgia)", + "fr_BF": "fransk (Burkina Faso)", + "fr_BI": "fransk (Burundi)", + "fr_BJ": "fransk (Benin)", + "fr_BL": "fransk (Saint Barthélemy)", + "fr_CA": "fransk (Canada)", + "fr_CD": "fransk (Kongo-Kinshasa)", + "fr_CF": "fransk (Den sentralafrikanske republikken)", + "fr_CG": "fransk (Kongo-Brazzaville)", + "fr_CH": "fransk (Sveits)", + "fr_CI": "fransk (Elfenbeinskysten)", + "fr_CM": "fransk (Kamerun)", + "fr_DJ": "fransk (Djibouti)", + "fr_DZ": "fransk (Algerie)", + "fr_FR": "fransk (Frankrike)", + "fr_GA": "fransk (Gabon)", + "fr_GF": "fransk (Fransk Guyana)", + "fr_GN": "fransk (Guinea)", + "fr_GP": "fransk (Guadeloupe)", + "fr_GQ": "fransk (Ekvatorial-Guinea)", + "fr_HT": "fransk (Haiti)", + "fr_KM": "fransk (Komorane)", + "fr_LU": "fransk (Luxembourg)", + "fr_MA": "fransk (Marokko)", + "fr_MC": "fransk (Monaco)", + "fr_MF": "fransk (Saint Martin)", + "fr_MG": "fransk (Madagaskar)", + "fr_ML": "fransk (Mali)", + "fr_MQ": "fransk (Martinique)", + "fr_MR": "fransk (Mauritania)", + "fr_MU": "fransk (Mauritius)", + "fr_NC": "fransk (Ny-Caledonia)", + "fr_NE": "fransk (Niger)", + "fr_PF": "fransk (Fransk Polynesia)", + "fr_PM": "fransk (St. Pierre og Miquelon)", + "fr_RE": "fransk (Réunion)", + "fr_RW": "fransk (Rwanda)", + "fr_SC": "fransk (Seychellane)", + "fr_SN": "fransk (Senegal)", + "fr_SY": "fransk (Syria)", + "fr_TD": "fransk (Tsjad)", + "fr_TG": "fransk (Togo)", + "fr_TN": "fransk (Tunisia)", + "fr_VU": "fransk (Vanuatu)", + "fr_WF": "fransk (Wallis og Futuna)", + "fr_YT": "fransk (Mayotte)", + "fy": "vestfrisisk", + "fy_NL": "vestfrisisk (Nederland)", + "ga": "irsk", + "ga_IE": "irsk (Irland)", + "gd": "skotsk-gælisk", + "gd_GB": "skotsk-gælisk (Storbritannia)", + "gl": "galicisk", + "gl_ES": "galicisk (Spania)", + "gu": "gujarati", + "gu_IN": "gujarati (India)", + "gv": "manx", + "gv_IM": "manx (Man)", + "ha": "hausa", + "ha_GH": "hausa (Ghana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigeria)", + "he": "hebraisk", + "he_IL": "hebraisk (Israel)", + "hi": "hindi", + "hi_IN": "hindi (India)", + "hr": "kroatisk", + "hr_BA": "kroatisk (Bosnia og Hercegovina)", + "hr_HR": "kroatisk (Kroatia)", + "hu": "ungarsk", + "hu_HU": "ungarsk (Ungarn)", + "hy": "armensk", + "hy_AM": "armensk (Armenia)", + "id": "indonesisk", + "id_ID": "indonesisk (Indonesia)", + "ig": "ibo", + "ig_NG": "ibo (Nigeria)", + "ii": "sichuan-yi", + "ii_CN": "sichuan-yi (Kina)", + "is": "islandsk", + "is_IS": "islandsk (Island)", + "it": "italiensk", + "it_CH": "italiensk (Sveits)", + "it_IT": "italiensk (Italia)", + "it_SM": "italiensk (San Marino)", + "ja": "japansk", + "ja_JP": "japansk (Japan)", + "ka": "georgisk", + "ka_GE": "georgisk (Georgia)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenya)", + "kk": "kasakhisk", + "kk_KZ": "kasakhisk (Kasakhstan)", + "kl": "grønlandsk (kalaallisut)", + "kl_GL": "grønlandsk (Grønland)", + "km": "khmer", + "km_KH": "khmer (Kambodsja)", + "kn": "kannada", + "kn_IN": "kannada (India)", + "ko": "koreansk", + "ko_KP": "koreansk (Nord-Korea)", + "ko_KR": "koreansk (Sør-Korea)", + "ks": "kasjmiri", + "ks_IN": "kasjmiri (India)", + "kw": "kornisk", + "kw_GB": "kornisk (Storbritannia)", + "ky": "kirgisisk", + "ky_KG": "kirgisisk (Kirgisistan)", + "lb": "luxemburgsk", + "lb_LU": "luxemburgsk (Luxembourg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongo-Kinshasa)", + "ln_CF": "lingala (Den sentralafrikanske republikken)", + "ln_CG": "lingala (Kongo-Brazzaville)", + "lo": "laotisk", + "lo_LA": "laotisk (Laos)", + "lt": "litauisk", + "lt_LT": "litauisk (Litauen)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Kongo-Kinshasa)", + "lv": "latvisk", + "lv_LV": "latvisk (Latvia)", + "mg": "madagassisk", + "mg_MG": "madagassisk (Madagaskar)", + "mk": "makedonsk", + "mk_MK": "makedonsk (Makedonia)", + "ml": "malayalam", + "ml_IN": "malayalam (India)", + "mn": "mongolsk", + "mn_MN": "mongolsk (Mongolia)", + "mr": "marathi", + "mr_IN": "marathi (India)", + "ms": "malayisk", + "ms_BN": "malayisk (Brunei)", + "ms_MY": "malayisk (Malaysia)", + "ms_SG": "malayisk (Singapore)", + "mt": "maltesisk", + "mt_MT": "maltesisk (Malta)", + "my": "burmesisk", + "my_MM": "burmesisk (Myanmar (Burma))", + "nb": "bokmÃ¥l", + "nb_NO": "bokmÃ¥l (Noreg)", + "nb_SJ": "bokmÃ¥l (Svalbard og Jan Mayen)", + "nd": "nord-ndebele", + "nd_ZW": "nord-ndebele (Zimbabwe)", + "ne": "nepalsk", + "ne_IN": "nepalsk (India)", + "ne_NP": "nepalsk (Nepal)", + "nl": "nederlandsk", + "nl_AW": "nederlandsk (Aruba)", + "nl_BE": "nederlandsk (Belgia)", + "nl_CW": "nederlandsk (Curaçao)", + "nl_NL": "nederlandsk (Nederland)", + "nl_SR": "nederlandsk (Surinam)", + "nl_SX": "nederlandsk (Sint Maarten)", + "nn": "nynorsk", + "nn_NO": "nynorsk (Noreg)", + "no": "norsk", + "no_NO": "norsk (Noreg)", + "om": "oromo", + "om_ET": "oromo (Etiopia)", + "om_KE": "oromo (Kenya)", + "or": "odia", + "or_IN": "odia (India)", + "os": "ossetisk", + "os_GE": "ossetisk (Georgia)", + "os_RU": "ossetisk (Russland)", + "pa": "panjabi", + "pa_Arab": "panjabi (arabisk)", + "pa_Arab_PK": "panjabi (arabisk, Pakistan)", + "pa_Guru": "panjabi (gurmukhi)", + "pa_Guru_IN": "panjabi (gurmukhi, India)", + "pa_IN": "panjabi (India)", + "pa_PK": "panjabi (Pakistan)", + "pl": "polsk", + "pl_PL": "polsk (Polen)", + "ps": "pashto", + "ps_AF": "pashto (Afghanistan)", + "pt": "portugisisk", + "pt_AO": "portugisisk (Angola)", + "pt_BR": "portugisisk (Brasil)", + "pt_CH": "portugisisk (Sveits)", + "pt_CV": "portugisisk (Kapp Verde)", + "pt_GQ": "portugisisk (Ekvatorial-Guinea)", + "pt_GW": "portugisisk (Guinea-Bissau)", + "pt_LU": "portugisisk (Luxembourg)", + "pt_MO": "portugisisk (Macao S.A.R. Kina)", + "pt_MZ": "portugisisk (Mosambik)", + "pt_PT": "portugisisk (Portugal)", + "pt_ST": "portugisisk (São Tomé og Príncipe)", + "pt_TL": "portugisisk (Timor-Leste (Aust-Timor))", + "qu": "quechua", + "qu_BO": "quechua (Bolivia)", + "qu_EC": "quechua (Ecuador)", + "qu_PE": "quechua (Peru)", + "rm": "retoromansk", + "rm_CH": "retoromansk (Sveits)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumensk", + "ro_MD": "rumensk (Moldova)", + "ro_RO": "rumensk (Romania)", + "ru": "russisk", + "ru_BY": "russisk (Kviterussland)", + "ru_KG": "russisk (Kirgisistan)", + "ru_KZ": "russisk (Kasakhstan)", + "ru_MD": "russisk (Moldova)", + "ru_RU": "russisk (Russland)", + "ru_UA": "russisk (Ukraina)", + "rw": "kinjarwanda", + "rw_RW": "kinjarwanda (Rwanda)", + "se": "nordsamisk", + "se_FI": "nordsamisk (Finland)", + "se_NO": "nordsamisk (Noreg)", + "se_SE": "nordsamisk (Sverige)", + "sg": "sango", + "sg_CF": "sango (Den sentralafrikanske republikken)", + "sh": "serbokroatisk", + "sh_BA": "serbokroatisk (Bosnia og Hercegovina)", + "si": "singalesisk", + "si_LK": "singalesisk (Sri Lanka)", + "sk": "slovakisk", + "sk_SK": "slovakisk (Slovakia)", + "sl": "slovensk", + "sl_SI": "slovensk (Slovenia)", + "sn": "shona", + "sn_ZW": "shona (Zimbabwe)", + "so": "somali", + "so_DJ": "somali (Djibouti)", + "so_ET": "somali (Etiopia)", + "so_KE": "somali (Kenya)", + "so_SO": "somali (Somalia)", + "sq": "albansk", + "sq_AL": "albansk (Albania)", + "sq_MK": "albansk (Makedonia)", + "sq_XK": "albansk (Kosovo)", + "sr": "serbisk", + "sr_BA": "serbisk (Bosnia og Hercegovina)", + "sr_Cyrl": "serbisk (kyrillisk)", + "sr_Cyrl_BA": "serbisk (kyrillisk, Bosnia og Hercegovina)", + "sr_Cyrl_ME": "serbisk (kyrillisk, Montenegro)", + "sr_Cyrl_RS": "serbisk (kyrillisk, Serbia)", + "sr_Cyrl_XK": "serbisk (kyrillisk, Kosovo)", + "sr_Latn": "serbisk (latinsk)", + "sr_Latn_BA": "serbisk (latinsk, Bosnia og Hercegovina)", + "sr_Latn_ME": "serbisk (latinsk, Montenegro)", + "sr_Latn_RS": "serbisk (latinsk, Serbia)", + "sr_Latn_XK": "serbisk (latinsk, Kosovo)", + "sr_ME": "serbisk (Montenegro)", + "sr_RS": "serbisk (Serbia)", + "sr_XK": "serbisk (Kosovo)", + "sv": "svensk", + "sv_AX": "svensk (Ã…land)", + "sv_FI": "svensk (Finland)", + "sv_SE": "svensk (Sverige)", + "sw": "swahili", + "sw_CD": "swahili (Kongo-Kinshasa)", + "sw_KE": "swahili (Kenya)", + "sw_TZ": "swahili (Tanzania)", + "sw_UG": "swahili (Uganda)", + "ta": "tamil", + "ta_IN": "tamil (India)", + "ta_LK": "tamil (Sri Lanka)", + "ta_MY": "tamil (Malaysia)", + "ta_SG": "tamil (Singapore)", + "te": "telugu", + "te_IN": "telugu (India)", + "th": "thai", + "th_TH": "thai (Thailand)", + "ti": "tigrinja", + "ti_ER": "tigrinja (Eritrea)", + "ti_ET": "tigrinja (Etiopia)", + "tl": "tagalog", + "tl_PH": "tagalog (Filippinane)", + "to": "tongansk", + "to_TO": "tongansk (Tonga)", + "tr": "tyrkisk", + "tr_CY": "tyrkisk (Kypros)", + "tr_TR": "tyrkisk (Tyrkia)", + "ug": "uigurisk", + "ug_CN": "uigurisk (Kina)", + "uk": "ukrainsk", + "uk_UA": "ukrainsk (Ukraina)", + "ur": "urdu", + "ur_IN": "urdu (India)", + "ur_PK": "urdu (Pakistan)", + "uz": "usbekisk", + "uz_AF": "usbekisk (Afghanistan)", + "uz_Arab": "usbekisk (arabisk)", + "uz_Arab_AF": "usbekisk (arabisk, Afghanistan)", + "uz_Cyrl": "usbekisk (kyrillisk)", + "uz_Cyrl_UZ": "usbekisk (kyrillisk, Usbekistan)", + "uz_Latn": "usbekisk (latinsk)", + "uz_Latn_UZ": "usbekisk (latinsk, Usbekistan)", + "uz_UZ": "usbekisk (Usbekistan)", + "vi": "vietnamesisk", + "vi_VN": "vietnamesisk (Vietnam)", + "yi": "jiddisk", + "yo": "joruba", + "yo_BJ": "joruba (Benin)", + "yo_NG": "joruba (Nigeria)", + "zh": "kinesisk", + "zh_CN": "kinesisk (Kina)", + "zh_HK": "kinesisk (Hongkong S.A.R. Kina)", + "zh_Hans": "kinesisk (forenkla kinesisk)", + "zh_Hans_CN": "kinesisk (forenkla kinesisk, Kina)", + "zh_Hans_HK": "kinesisk (forenkla kinesisk, Hongkong S.A.R. Kina)", + "zh_Hans_MO": "kinesisk (forenkla kinesisk, Macao S.A.R. Kina)", + "zh_Hans_SG": "kinesisk (forenkla kinesisk, Singapore)", + "zh_Hant": "kinesisk (tradisjonell kinesisk)", + "zh_Hant_HK": "kinesisk (tradisjonell kinesisk, Hongkong S.A.R. Kina)", + "zh_Hant_MO": "kinesisk (tradisjonell kinesisk, Macao S.A.R. Kina)", + "zh_Hant_TW": "kinesisk (tradisjonell kinesisk, Taiwan)", + "zh_MO": "kinesisk (Macao S.A.R. Kina)", + "zh_SG": "kinesisk (Singapore)", + "zh_TW": "kinesisk (Taiwan)", + "zu": "zulu", + "zu_ZA": "zulu (Sør-Afrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/no.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/no.json new file mode 100644 index 0000000000000000000000000000000000000000..2483677e4d4c10738373e34946ced8638a764d7a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/no.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "nb" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/no_NO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/no_NO.json new file mode 100644 index 0000000000000000000000000000000000000000..93d3f8186c47799f1c10ff826a47292e464ad188 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/no_NO.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "nb_NO" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/no_NO_NY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/no_NO_NY.json new file mode 100644 index 0000000000000000000000000000000000000000..2f03a04b4726a0c807afc8035d954134545825f3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/no_NO_NY.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "nn_NO" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/om.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/om.json new file mode 100644 index 0000000000000000000000000000000000000000..ed310de04b6630a4ec60597afa415263b26c0756 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/om.json @@ -0,0 +1,117 @@ +{ + "Names": { + "af": "Afrikoota", + "am": "Afaan Sidaamaa", + "am_ET": "Afaan Sidaamaa (Itoophiyaa)", + "ar": "Arabiffaa", + "az": "Afaan Azerbaijani", + "az_Latn": "Afaan Azerbaijani (Latin)", + "be": "Afaan Belarusia", + "bg": "Afaan Bulgariya", + "bn": "Afaan Baangladeshi", + "bn_IN": "Afaan Baangladeshi (India)", + "bs": "Afaan Bosniyaa", + "bs_Latn": "Afaan Bosniyaa (Latin)", + "ca": "Afaan Katalaa", + "ca_FR": "Afaan Katalaa (France)", + "ca_IT": "Afaan Katalaa (Italy)", + "cs": "Afaan Czech", + "cy": "Welishiffaa", + "cy_GB": "Welishiffaa (United Kingdom)", + "da": "Afaan Deenmaark", + "de": "Afaan Jarmanii", + "de_DE": "Afaan Jarmanii (Germany)", + "de_IT": "Afaan Jarmanii (Italy)", + "el": "Afaan Giriiki", + "en": "Ingliffa", + "en_DE": "Ingliffa (Germany)", + "en_GB": "Ingliffa (United Kingdom)", + "en_IN": "Ingliffa (India)", + "en_KE": "Ingliffa (Keeniyaa)", + "en_US": "Ingliffa (United States)", + "eo": "Afaan Esperantoo", + "es": "Afaan Ispeen", + "es_BR": "Afaan Ispeen (Brazil)", + "es_US": "Afaan Ispeen (United States)", + "et": "Afaan Istooniya", + "eu": "Afaan Baskuu", + "fa": "Afaan Persia", + "fi": "Afaan Fiilaandi", + "fo": "Afaan Faroese", + "fr": "Afaan Faransaayii", + "fr_FR": "Afaan Faransaayii (France)", + "fy": "Afaan Firisiyaani", + "ga": "Afaan Ayirishii", + "gd": "Scots Gaelic", + "gd_GB": "Scots Gaelic (United Kingdom)", + "gl": "Afaan Galishii", + "gu": "Afaan Gujarati", + "gu_IN": "Afaan Gujarati (India)", + "he": "Afaan Hebrew", + "hi": "Afaan Hindii", + "hi_IN": "Afaan Hindii (India)", + "hr": "Afaan Croatian", + "hu": "Afaan Hangaari", + "id": "Afaan Indoneziya", + "is": "Ayiislandiffaa", + "it": "Afaan Xaaliyaani", + "it_IT": "Afaan Xaaliyaani (Italy)", + "ja": "Afaan Japanii", + "ja_JP": "Afaan Japanii (Japan)", + "ka": "Afaan Georgian", + "kn": "Afaan Kannada", + "kn_IN": "Afaan Kannada (India)", + "ko": "Afaan Korea", + "lt": "Afaan Liituniyaa", + "lv": "Afaan Lativiyaa", + "mk": "Afaan Macedooniyaa", + "ml": "Malayaalamiffaa", + "ml_IN": "Malayaalamiffaa (India)", + "mr": "Afaan Maratii", + "mr_IN": "Afaan Maratii (India)", + "ms": "Malaayiffaa", + "mt": "Afaan Maltesii", + "ne": "Afaan Nepalii", + "ne_IN": "Afaan Nepalii (India)", + "nl": "Afaan Dachii", + "nn": "Afaan Norwegian", + "no": "Afaan Norweyii", + "om": "Oromoo", + "om_ET": "Oromoo (Itoophiyaa)", + "om_KE": "Oromoo (Keeniyaa)", + "pa": "Afaan Punjabii", + "pa_IN": "Afaan Punjabii (India)", + "pl": "Afaan Polandii", + "pt": "Afaan Porchugaal", + "pt_BR": "Afaan Porchugaal (Brazil)", + "ro": "Afaan Romaniyaa", + "ru": "Afaan Rushiyaa", + "ru_RU": "Afaan Rushiyaa (Russia)", + "si": "Afaan Sinhalese", + "sk": "Afaan Slovak", + "sl": "Afaan Islovaniyaa", + "sq": "Afaan Albaniyaa", + "sr": "Afaan Serbiya", + "sr_Latn": "Afaan Serbiya (Latin)", + "sv": "Afaan Suwidiin", + "sw": "Suwahilii", + "sw_KE": "Suwahilii (Keeniyaa)", + "ta": "Afaan Tamilii", + "ta_IN": "Afaan Tamilii (India)", + "te": "Afaan Telugu", + "te_IN": "Afaan Telugu (India)", + "th": "Afaan Tayii", + "ti": "Afaan Tigiree", + "ti_ET": "Afaan Tigiree (Itoophiyaa)", + "tr": "Afaan Turkii", + "uk": "Afaan Ukreenii", + "ur": "Afaan Urdu", + "ur_IN": "Afaan Urdu (India)", + "uz": "Afaan Uzbek", + "uz_Latn": "Afaan Uzbek (Latin)", + "vi": "Afaan Veetinam", + "zh": "Chinese", + "zh_CN": "Chinese (China)", + "zu": "Afaan Zuulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/or.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/or.json new file mode 100644 index 0000000000000000000000000000000000000000..dac32932b2b46159b10cd99adbfcd85607be7395 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/or.json @@ -0,0 +1,555 @@ +{ + "Names": { + "af": "ଆଫà­à¬°à¬¿à¬•ାନସà­", + "af_NA": "ଆଫà­à¬°à¬¿à¬•ାନସୠ(ନାମà­à¬¬à¬¿à¬†)", + "af_ZA": "ଆଫà­à¬°à¬¿à¬•ାନସୠ(ଦକà­à¬·à¬¿à¬£ ଆଫà­à¬°à¬¿à¬•ା)", + "ak": "ଅକନà­", + "ak_GH": "ଅକନୠ(ଘାନା)", + "am": "ଆମହାରକି", + "am_ET": "ଆମହାରକି (ଇଥିଓପିଆ)", + "ar": "ଆରବିକà­", + "ar_AE": "ଆରବିକୠ(ସଂଯà­à¬•à­à¬¤ ଆରବ à¬à¬®à¬¿à¬°à­‡à¬Ÿà¬¸à­)", + "ar_BH": "ଆରବିକୠ(ବାହାରିନà­)", + "ar_DJ": "ଆରବିକୠ(ଡିବୌଟି)", + "ar_DZ": "ଆରବିକୠ(ଆଲଜେରିଆ)", + "ar_EG": "ଆରବିକୠ(ଇଜିପà­à¬Ÿ)", + "ar_EH": "ଆରବିକୠ(ପଶà­à¬šà¬¿à¬® ସାହାରା)", + "ar_ER": "ଆରବିକୠ(ଇରିଟà­à¬°à¬¿à­Ÿà¬¾)", + "ar_IL": "ଆରବିକୠ(ଇସà­à¬°à¬¾à¬à¬²à­)", + "ar_IQ": "ଆରବିକୠ(ଇରାକà­)", + "ar_JO": "ଆରବିକୠ(ଜୋରà­à¬¡à¬¾à¬¨à­)", + "ar_KM": "ଆରବିକୠ(କାମୋରସà­)", + "ar_KW": "ଆରବିକୠ(କà­à¬à¬¤à­)", + "ar_LB": "ଆରବିକୠ(ଲେବାନନà­)", + "ar_LY": "ଆରବିକୠ(ଲିବିଆ)", + "ar_MA": "ଆରବିକୠ(ମୋରୋକà­à¬•à­‹)", + "ar_MR": "ଆରବିକୠ(ମାଉରିଟାନିଆ)", + "ar_OM": "ଆରବିକୠ(ଓମାନà­)", + "ar_PS": "ଆରବିକୠ(ପାଲେସà­à¬¤à­‡à¬¨à¬¿à¬†)", + "ar_QA": "ଆରବିକୠ(କତାରà­)", + "ar_SA": "ଆରବିକୠ(ସାଉଦି ଆରବିଆ)", + "ar_SD": "ଆରବିକୠ(ସà­à¬¦à¬¾à¬¨à­)", + "ar_SO": "ଆରବିକୠ(ସୋମାଲିଆ)", + "ar_SY": "ଆରବିକୠ(ସିରିଆ)", + "ar_TD": "ଆରବିକୠ(ଚାଦà­)", + "ar_TN": "ଆରବିକୠ(ତà­à¬¨à¬¿à¬¸à¬¿à¬†)", + "ar_YE": "ଆରବିକୠ(ୟେମେନà­)", + "as": "ଆସାମୀ", + "as_IN": "ଆସାମୀ (ଭାରତ)", + "az": "ଆଜେରବାଇଜାନି", + "az_AZ": "ଆଜେରବାଇଜାନି (ଆଜେରବାଇଜାନà­)", + "az_Cyrl": "ଆଜେରବାଇଜାନି (ସିରିଲିକà­)", + "az_Cyrl_AZ": "ଆଜେରବାଇଜାନି (ସିରିଲିକà­, ଆଜେରବାଇଜାନà­)", + "az_Latn": "ଆଜେରବାଇଜାନି (ଲାଟିନà­)", + "az_Latn_AZ": "ଆଜେରବାଇଜାନି (ଲାଟିନà­, ଆଜେରବାଇଜାନà­)", + "be": "ବେଲାରà­à¬·à¬¿à¬†à¬¨à­", + "be_BY": "ବେଲାରà­à¬·à¬¿à¬†à¬¨à­ (ବେଲାରà­à¬·à­)", + "bg": "ବà­à¬²à¬—େରିଆନà­", + "bg_BG": "ବà­à¬²à¬—େରିଆନୠ(ବà­à¬²à¬—େରିଆ)", + "bm": "ବାମà­à¬¬à¬¾à¬°à¬¾", + "bm_ML": "ବାମà­à¬¬à¬¾à¬°à¬¾ (ମାଳୀ)", + "bn": "ବଙà­à¬—ାଳୀ", + "bn_BD": "ବଙà­à¬—ାଳୀ (ବାଙà­à¬—ଲାଦେଶà­)", + "bn_IN": "ବଙà­à¬—ାଳୀ (ଭାରତ)", + "bo": "ତିବେତାନà­", + "bo_CN": "ତିବେତାନୠ(ଚିନà­)", + "bo_IN": "ତିବେତାନୠ(ଭାରତ)", + "br": "ବà­à¬°à­‡à¬Ÿà¬¨à­", + "br_FR": "ବà­à¬°à­‡à¬Ÿà¬¨à­ (ଫà­à¬°à¬¾à¬¨à­à¬¸)", + "bs": "କାଟଲାନà­", + "bs_BA": "କାଟଲାନୠ(ବୋସନିଆ à¬à¬¬à¬‚ ହରà­à¬œà¬—ୋଭିନା)", + "bs_Cyrl": "କାଟଲାନୠ(ସିରିଲିକà­)", + "bs_Cyrl_BA": "କାଟଲାନୠ(ସିରିଲିକà­, ବୋସନିଆ à¬à¬¬à¬‚ ହରà­à¬œà¬—ୋଭିନା)", + "bs_Latn": "କାଟଲାନୠ(ଲାଟିନà­)", + "bs_Latn_BA": "କାଟଲାନୠ(ଲାଟିନà­, ବୋସନିଆ à¬à¬¬à¬‚ ହରà­à¬œà¬—ୋଭିନା)", + "ca": "କାଟାଲାନà­", + "ca_AD": "କାଟାଲାନୠ(ଆଣà­à¬¡à­‹à¬°à¬¾)", + "ca_ES": "କାଟାଲାନୠ(ସà­à¬ªà­‡à¬¨à­)", + "ca_FR": "କାଟାଲାନୠ(ଫà­à¬°à¬¾à¬¨à­à¬¸)", + "ca_IT": "କାଟାଲାନୠ(ଇଟାଲୀ)", + "ce": "ଚେଚନà­", + "ce_RU": "ଚେଚନୠ(ରà­à¬·à¬¿à¬†)", + "cs": "ଚେକà­", + "cs_CZ": "ଚେକୠ(ଚେକୠସାଧାରଣତନà­à¬¤à­à¬°)", + "cy": "ୱେଲà­à¬¸", + "cy_GB": "ୱେଲà­à¬¸ (ବà­à¬°à¬¿à¬Ÿà­‡à¬¨à­)", + "da": "ଡାନà­à¬¨à¬¿à¬¸à­", + "da_DK": "ଡାନà­à¬¨à¬¿à¬¸à­ (ଡେନମାରà­à¬•)", + "da_GL": "ଡାନà­à¬¨à¬¿à¬¸à­ (ଗà­à¬°à­€à¬¨à¬²à­à­Ÿà¬¾à¬£à­à¬¡)", + "de": "ଜରà­à¬®à¬¾à¬¨à­", + "de_AT": "ଜରà­à¬®à¬¾à¬¨à­ (ଅଷà­à¬Ÿà­à¬°à¬¿à¬†)", + "de_BE": "ଜରà­à¬®à¬¾à¬¨à­ (ବେଲଜିୟମà­)", + "de_CH": "ଜରà­à¬®à¬¾à¬¨à­ (ସà­à¬¬à¬¿à¬œà¬°à¬²à­à­Ÿà¬¾à¬£à­à¬¡)", + "de_DE": "ଜରà­à¬®à¬¾à¬¨à­ (ଜରà­à¬®à¬¾à¬¨à­€)", + "de_IT": "ଜରà­à¬®à¬¾à¬¨à­ (ଇଟାଲୀ)", + "de_LI": "ଜରà­à¬®à¬¾à¬¨à­ (ଲିଚେସà­à¬¤à¬¿à¬†à¬¨à¬¾à¬¨à­)", + "de_LU": "ଜରà­à¬®à¬¾à¬¨à­ (ଲକà­à¬¸à­‡à¬®à¬¬à¬°à­à¬—)", + "dz": "ଭୂଟାନୀ", + "dz_BT": "ଭୂଟାନୀ (ଭà­à¬Ÿà¬¾à¬¨à­)", + "ee": "ଇୱେ", + "ee_GH": "ଇୱେ (ଘାନା)", + "ee_TG": "ଇୱେ (ଟୋଗୋ)", + "el": "ଗà­à¬°à­€à¬•à­", + "el_CY": "ଗà­à¬°à­€à¬•à­ (ସାଇପà­à¬°à¬¸à­)", + "el_GR": "ଗà­à¬°à­€à¬•à­ (ଗà­à¬°à­€à¬¸à­)", + "en": "ଇଂରାଜୀ", + "en_AG": "ଇଂରାଜୀ (ଆଣà­à¬Ÿà¬¿à¬—à­à¬† à¬à¬¬à¬‚ ବାରବà­à¬¦à¬¾)", + "en_AI": "ଇଂରାଜୀ (ଆଙà­à¬—à­à¬‡à¬²à­à¬²à¬¾)", + "en_AS": "ଇଂରାଜୀ (ଆମେରିକାନୠସାମୋଆ)", + "en_AT": "ଇଂରାଜୀ (ଅଷà­à¬Ÿà­à¬°à¬¿à¬†)", + "en_AU": "ଇଂରାଜୀ (ଅଷà­à¬Ÿà­à¬°à­‡à¬²à¬¿à¬†)", + "en_BB": "ଇଂରାଜୀ (ବାରବାଡୋସà­)", + "en_BE": "ଇଂରାଜୀ (ବେଲଜିୟମà­)", + "en_BI": "ଇଂରାଜୀ (ବà­à¬°à­à¬¨à­à¬¦à¬¿)", + "en_BM": "ଇଂରାଜୀ (ବରମà­à¬¡à¬¾)", + "en_BS": "ଇଂରାଜୀ (ବାହାମାସà­)", + "en_BW": "ଇଂରାଜୀ (ବୋଟସà­à¬¬à¬¾à¬¨à­)", + "en_BZ": "ଇଂରାଜୀ (ବେଲିଜà­)", + "en_CA": "ଇଂରାଜୀ (କାନାଡା)", + "en_CC": "ଇଂରାଜୀ (କୋକୋସୠଆଇସଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "en_CH": "ଇଂରାଜୀ (ସà­à¬¬à¬¿à¬œà¬°à¬²à­à­Ÿà¬¾à¬£à­à¬¡)", + "en_CK": "ଇଂରାଜୀ (କà­à¬•ୠଆଇସଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "en_CM": "ଇଂରାଜୀ (କାମେରà­à¬¨à­)", + "en_CX": "ଇଂରାଜୀ (ଖà­à¬°à­€à¬·à­à¬Ÿà¬®à¬¾à¬¸ ଆଇଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "en_CY": "ଇଂରାଜୀ (ସାଇପà­à¬°à¬¸à­)", + "en_DE": "ଇଂରାଜୀ (ଜରà­à¬®à¬¾à¬¨à­€)", + "en_DK": "ଇଂରାଜୀ (ଡେନମାରà­à¬•)", + "en_DM": "ଇଂରାଜୀ (ଡୋମିନାକା)", + "en_ER": "ଇଂରାଜୀ (ଇରିଟà­à¬°à¬¿à­Ÿà¬¾)", + "en_FI": "ଇଂରାଜୀ (ଫିନଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "en_FJ": "ଇଂରାଜୀ (ଫିଜି)", + "en_FK": "ଇଂରାଜୀ (ଫଲà­à¬•ଲà­à­Ÿà¬¾à¬£à­à¬¡ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ)", + "en_FM": "ଇଂରାଜୀ (ମାଇକà­à¬°à­‹à¬¨à­‡à¬¸à¬¿à¬†)", + "en_GB": "ଇଂରାଜୀ (ବà­à¬°à¬¿à¬Ÿà­‡à¬¨à­)", + "en_GD": "ଇଂରାଜୀ (ଗà­à¬°à­‡à¬¨à¬¾à¬¡à¬¾)", + "en_GG": "ଇଂରାଜୀ (ଗà­à¬à¬°à¬¨à­‡à¬¸à¬¿)", + "en_GH": "ଇଂରାଜୀ (ଘାନା)", + "en_GI": "ଇଂରାଜୀ (ଜିବà­à¬°à¬¾à¬²à­à¬Ÿà¬°à­)", + "en_GM": "ଇଂରାଜୀ (ଗାମà­à¬¬à¬¿à¬†)", + "en_GU": "ଇଂରାଜୀ (ଗà­à¬†à¬®à­)", + "en_GY": "ଇଂରାଜୀ (ଗà­à¬‡à¬¨à¬¾)", + "en_HK": "ଇଂରାଜୀ (ହଂକଂ ବିଶେଷ ପà­à¬°à¬¶à¬¾à¬¸à¬¨à¬¿à¬• କà­à¬·à­‡à¬¤à­à¬° ଚୀନà­)", + "en_IE": "ଇଂରାଜୀ (ଆୟରଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "en_IL": "ଇଂରାଜୀ (ଇସà­à¬°à¬¾à¬à¬²à­)", + "en_IM": "ଇଂରାଜୀ (ଆଇଲୠଅଫୠମୈନà­)", + "en_IN": "ଇଂରାଜୀ (ଭାରତ)", + "en_IO": "ଇଂରାଜୀ (ବà­à¬°à¬¿à¬Ÿà¬¿à¬¶à­ ଭାରତୀୟ ସାମà­à¬¦à­à¬°à¬¿à¬• କà­à¬·à­‡à¬¤à­à¬°)", + "en_JE": "ଇଂରାଜୀ (ଜରà­à¬¸à¬¿)", + "en_JM": "ଇଂରାଜୀ (ଜାମାଇକା)", + "en_KE": "ଇଂରାଜୀ (କେନିୟା)", + "en_KI": "ଇଂରାଜୀ (କିରିବାଟୀ)", + "en_KN": "ଇଂରାଜୀ (ସେଣà­à¬Ÿ କିଟସୠà¬à¬£à­à¬¡ ନେଭିସà­)", + "en_KY": "ଇଂରାଜୀ (କେମà­à­Ÿà¬¾à¬¨à­ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ)", + "en_LC": "ଇଂରାଜୀ (ସେଣà­à¬Ÿ ଲà­à¬¸à¬¿à¬†)", + "en_LR": "ଇଂରାଜୀ (ଲିବେରିଆ)", + "en_LS": "ଇଂରାଜୀ (ଲେସୋଥୋ)", + "en_MG": "ଇଂରାଜୀ (ମାଡାଗାସà­à¬•ରà­)", + "en_MH": "ଇଂରାଜୀ (ମାରà­à¬¶à¬²à­ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ)", + "en_MO": "ଇଂରାଜୀ (ମାକାଉ SAR ଚିନà­)", + "en_MP": "ଇଂରାଜୀ (ଉତà­à¬¤à¬° ମାରିଆନା ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ)", + "en_MS": "ଇଂରାଜୀ (ମଣà­à¬Ÿà­‡à¬¸à­‡à¬°à¬¾à¬Ÿà­)", + "en_MT": "ଇଂରାଜୀ (ମାଲà­à¬Ÿà¬¾)", + "en_MU": "ଇଂରାଜୀ (ମୌରିସସà­)", + "en_MW": "ଇଂରାଜୀ (ମାଲୱି)", + "en_MY": "ଇଂରାଜୀ (ମାଲେସିଆ)", + "en_NA": "ଇଂରାଜୀ (ନାମà­à¬¬à¬¿à¬†)", + "en_NF": "ଇଂରାଜୀ (ନରଫà­à¬²à¬•ୠଦà­à¬¬à­€à¬ª)", + "en_NG": "ଇଂରାଜୀ (ନାଇଜେରିଆ)", + "en_NL": "ଇଂରାଜୀ (ନେଦରଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "en_NR": "ଇଂରାଜୀ (ନାଉରà­)", + "en_NU": "ଇଂରାଜୀ (ନିଉ)", + "en_NZ": "ଇଂରାଜୀ (ନà­à­Ÿà­à¬œà¬¿à¬²à¬¾à¬£à­à¬¡)", + "en_PG": "ଇଂରାଜୀ (ପପà­à¬† ନà­à­Ÿà­ ଗà­à¬à¬¨à¬¿à¬†)", + "en_PH": "ଇଂରାଜୀ (ଫିଲିପାଇନସà­)", + "en_PK": "ଇଂରାଜୀ (ପାକିସà­à¬¤à¬¾à¬¨)", + "en_PN": "ଇଂରାଜୀ (ପିଟକାଇରିନà­)", + "en_PR": "ଇଂରାଜୀ (ପà­à¬à¬°à­à¬¤à­à¬¤à­‹ ରିକୋ)", + "en_PW": "ଇଂରାଜୀ (ପାଲାଉ)", + "en_RW": "ଇଂରାଜୀ (ରାୱାଣà­à¬¡à¬¾)", + "en_SB": "ଇଂରାଜୀ (ସୋଲୋମନୠଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ)", + "en_SC": "ଇଂରାଜୀ (ସେଚେଲସà­)", + "en_SD": "ଇଂରାଜୀ (ସà­à¬¦à¬¾à¬¨à­)", + "en_SE": "ଇଂରାଜୀ (ସà­à­±à­‡à¬¡à­‡à¬¨à­)", + "en_SG": "ଇଂରାଜୀ (ସିଙà­à¬—ାପà­à¬°à­)", + "en_SH": "ଇଂରାଜୀ (ସେଣà­à¬Ÿ ହେଲେନା)", + "en_SI": "ଇଂରାଜୀ (ସà­à¬²à­‹à¬­à­‡à¬¨à¬¿à¬†)", + "en_SL": "ଇଂରାଜୀ (ସିଓରା ଲିଓନà­)", + "en_SZ": "ଇଂରାଜୀ (ସà­à¬¬à¬¾à¬œà¬¿à¬²à¬¾à¬£à­à¬¡)", + "en_TC": "ଇଂରାଜୀ (ତà­à¬°à­à¬•ସୠà¬à¬¬à¬‚ ସାଇକସୠଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ)", + "en_TK": "ଇଂରାଜୀ (ଟୋକେଲାଉ)", + "en_TO": "ଇଂରାଜୀ (ଟୋଙà­à¬—ା)", + "en_TT": "ଇଂରାଜୀ (ତà­à¬°à¬¿à¬¨à¬¿à¬¦à¬¾à¬¦à­ à¬à¬¬à¬‚ ଟୋବାଗୋ)", + "en_TV": "ଇଂରାଜୀ (ଟà­à¬­à¬¾à¬²à­)", + "en_TZ": "ଇଂରାଜୀ (ତାଞà­à¬œà¬¾à¬¨à¬¿à¬†)", + "en_UG": "ଇଂରାଜୀ (ଉଗାଣà­à¬¡à¬¾)", + "en_UM": "ଇଂରାଜୀ (à­Ÿà­à¬¨à¬¾à¬‡à¬Ÿà­‡à¬¡à­ ଷà­à¬Ÿà­‡à¬Ÿà¬¸à­ ମାଇନରୠଆଉଟଲେଇଂ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ)", + "en_US": "ଇଂରାଜୀ (ଯà­à¬•à­à¬¤ ରାଷà­à¬Ÿà­à¬° ଆମେରିକା)", + "en_VC": "ଇଂରାଜୀ (ସେଣà­à¬Ÿ ଭିନସେଣà­à¬Ÿ à¬à¬¬à¬‚ ଦି ଗà­à¬°à­‡à¬¨à¬¾à¬¡à¬¿à¬¸à­)", + "en_VG": "ଇଂରାଜୀ (ବà­à¬°à¬¿à¬Ÿà¬¿à¬¶à­ ଭରà­à¬œà¬¿à¬¨à­ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ)", + "en_VI": "ଇଂରାଜୀ (à­Ÿà­à¬à¬¸à­ ଭରà­à¬œà¬¿à¬¨à­ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ)", + "en_VU": "ଇଂରାଜୀ (ଭାନà­à¬†à¬¤à­)", + "en_WS": "ଇଂରାଜୀ (ସାମୋଆ)", + "en_ZA": "ଇଂରାଜୀ (ଦକà­à¬·à¬¿à¬£ ଆଫà­à¬°à¬¿à¬•ା)", + "en_ZM": "ଇଂରାଜୀ (ଜାମà­à¬¬à¬¿à¬†)", + "en_ZW": "ଇଂରାଜୀ (ଜିମà­à¬¬à¬¾à­±à­‡)", + "eo": "à¬à¬¸à­à¬ªà¬¾à¬°à­‡à¬£à­à¬Ÿà­‹", + "es": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­", + "es_AR": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ଆରà­à¬œà­‡à¬£à­à¬Ÿà¬¿à¬¨à¬¾)", + "es_BO": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ବୋଲଭିଆ)", + "es_BR": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ବà­à¬°à¬¾à¬œà¬¿à¬²à­)", + "es_CL": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ଚିଲà­à¬²à­€)", + "es_CO": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (କୋଲମà­à¬¬à¬¿à¬†)", + "es_CR": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (କୋଷà­à¬Ÿà¬¾ ରିକା)", + "es_CU": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (କà­à­±à¬¿à¬¬à¬¾)", + "es_DO": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ଡୋମିନକାନୠପà­à¬°à¬œà¬¾à¬¤à¬¨à­à¬¤à­à¬°)", + "es_EC": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ଇକà­à­±à¬¾à¬¡à­‹à¬°à­)", + "es_ES": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ସà­à¬ªà­‡à¬¨à­)", + "es_GQ": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ଇକà­à¬¬à¬¾à¬Ÿà­‡à¬°à¬¿à¬†à¬²à­ ଗà­à¬‡à¬¨à¬¿à¬†)", + "es_GT": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ଗà­à¬à¬¤à¬®à¬¾à¬²à¬¾)", + "es_HN": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ହୋଣà­à¬¡à¬¾à¬°à­à¬¸à­)", + "es_MX": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ମେକà­à¬¸à¬¿à¬•à­‹)", + "es_NI": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ନିକାରାଗà­à¬†)", + "es_PA": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ପାନାମା)", + "es_PE": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ପେରà­)", + "es_PH": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ଫିଲିପାଇନସà­)", + "es_PR": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ପà­à¬à¬°à­à¬¤à­à¬¤à­‹ ରିକୋ)", + "es_PY": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ପାରାଗà­à¬)", + "es_SV": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (à¬à¬²à­ ସାଲଭାଡୋରà­)", + "es_US": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ଯà­à¬•à­à¬¤ ରାଷà­à¬Ÿà­à¬° ଆମେରିକା)", + "es_UY": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ଉରà­à¬—à­à¬)", + "es_VE": "ସà­à¬ªà¬¾à¬¨à¬¿à¬¸à­ (ଭେନଜà­à¬à¬²à¬¾)", + "et": "à¬à¬¸à­à¬¤à­‹à¬¨à¬¿à¬†à¬¨à­", + "et_EE": "à¬à¬¸à­à¬¤à­‹à¬¨à¬¿à¬†à¬¨à­ (à¬à¬¸à­à¬¤à­‹à¬¨à¬¿à¬†)", + "eu": "ବାସà­à¬•à­à­±à¬¿", + "eu_ES": "ବାସà­à¬•à­à­±à¬¿ (ସà­à¬ªà­‡à¬¨à­)", + "fa": "ପରà­à¬¸à¬¿à¬†à¬¨à­", + "fa_AF": "ପରà­à¬¸à¬¿à¬†à¬¨à­ (ଆଫାଗାନିସà­à¬¤à¬¾à¬¨à­)", + "fa_IR": "ପରà­à¬¸à¬¿à¬†à¬¨à­ (ଇରାନà­)", + "ff": "ଫà­à¬²à¬¾à¬¹", + "ff_CM": "ଫà­à¬²à¬¾à¬¹ (କାମେରà­à¬¨à­)", + "ff_GN": "ଫà­à¬²à¬¾à¬¹ (ଗà­à¬à¬¨à­‡à¬†)", + "ff_MR": "ଫà­à¬²à¬¾à¬¹ (ମାଉରିଟାନିଆ)", + "ff_SN": "ଫà­à¬²à¬¾à¬¹ (ସେନେଗାଲà­)", + "fi": "ଫିନà­à¬¨à¬¿à¬¸à­", + "fi_FI": "ଫିନà­à¬¨à¬¿à¬¸à­ (ଫିନଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "fo": "ଫାରୋà¬à¬¸à­‡", + "fo_DK": "ଫାରୋà¬à¬¸à­‡ (ଡେନମାରà­à¬•)", + "fo_FO": "ଫାରୋà¬à¬¸à­‡ (ଫାରୋଇ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ)", + "fr": "ଫà­à¬°à­‡à¬žà­à¬š", + "fr_BE": "ଫà­à¬°à­‡à¬žà­à¬š (ବେଲଜିୟମà­)", + "fr_BF": "ଫà­à¬°à­‡à¬žà­à¬š (ବà­à¬°à­à¬•ିନୋ ଫାସୋ)", + "fr_BI": "ଫà­à¬°à­‡à¬žà­à¬š (ବà­à¬°à­à¬¨à­à¬¦à¬¿)", + "fr_BJ": "ଫà­à¬°à­‡à¬žà­à¬š (ବେନିନà­)", + "fr_BL": "ଫà­à¬°à­‡à¬žà­à¬š (ସେଣà­à¬Ÿ ବାରà­à¬¥à­‡à¬²à­‡à¬®à¬¿)", + "fr_CA": "ଫà­à¬°à­‡à¬žà­à¬š (କାନାଡା)", + "fr_CD": "ଫà­à¬°à­‡à¬žà­à¬š (କଙà­à¬—à­‹-କିନସାସା)", + "fr_CF": "ଫà­à¬°à­‡à¬žà­à¬š (ମଧà­à­Ÿ ଆଫà­à¬°à¬¿à¬•ୀୟ ଗଣତନà­à¬¤à­à¬°)", + "fr_CG": "ଫà­à¬°à­‡à¬žà­à¬š (କଙà­à¬—à­‹-ବà­à¬°à¬¾à¬œà¬¿à¬­à¬¿à¬²à­à¬²à­‡)", + "fr_CH": "ଫà­à¬°à­‡à¬žà­à¬š (ସà­à¬¬à¬¿à¬œà¬°à¬²à­à­Ÿà¬¾à¬£à­à¬¡)", + "fr_CI": "ଫà­à¬°à­‡à¬žà­à¬š (ଆଇବରୀ କୋଷà­à¬Ÿ)", + "fr_CM": "ଫà­à¬°à­‡à¬žà­à¬š (କାମେରà­à¬¨à­)", + "fr_DJ": "ଫà­à¬°à­‡à¬žà­à¬š (ଡିବୌଟି)", + "fr_DZ": "ଫà­à¬°à­‡à¬žà­à¬š (ଆଲଜେରିଆ)", + "fr_FR": "ଫà­à¬°à­‡à¬žà­à¬š (ଫà­à¬°à¬¾à¬¨à­à¬¸)", + "fr_GA": "ଫà­à¬°à­‡à¬žà­à¬š (ଗାବୋନà­)", + "fr_GF": "ଫà­à¬°à­‡à¬žà­à¬š (ଫà­à¬°à­‡à¬žà­à¬š ଗà­à¬‡à¬¨à¬¾)", + "fr_GN": "ଫà­à¬°à­‡à¬žà­à¬š (ଗà­à¬à¬¨à­‡à¬†)", + "fr_GP": "ଫà­à¬°à­‡à¬žà­à¬š (ଗୌଡେଲୌପେ)", + "fr_GQ": "ଫà­à¬°à­‡à¬žà­à¬š (ଇକà­à¬¬à¬¾à¬Ÿà­‡à¬°à¬¿à¬†à¬²à­ ଗà­à¬‡à¬¨à¬¿à¬†)", + "fr_HT": "ଫà­à¬°à­‡à¬žà­à¬š (ହାଇତି)", + "fr_KM": "ଫà­à¬°à­‡à¬žà­à¬š (କାମୋରସà­)", + "fr_LU": "ଫà­à¬°à­‡à¬žà­à¬š (ଲକà­à¬¸à­‡à¬®à¬¬à¬°à­à¬—)", + "fr_MA": "ଫà­à¬°à­‡à¬žà­à¬š (ମୋରୋକà­à¬•à­‹)", + "fr_MC": "ଫà­à¬°à­‡à¬žà­à¬š (ମୋନାକୋ)", + "fr_MF": "ଫà­à¬°à­‡à¬žà­à¬š (ସେଣà­à¬Ÿ ମାରà­à¬Ÿà¬¿à¬¨à­)", + "fr_MG": "ଫà­à¬°à­‡à¬žà­à¬š (ମାଡାଗାସà­à¬•ରà­)", + "fr_ML": "ଫà­à¬°à­‡à¬žà­à¬š (ମାଳୀ)", + "fr_MQ": "ଫà­à¬°à­‡à¬žà­à¬š (ମାରà­à¬Ÿà¬¿à¬¨à¬¿à¬•à­à­Ÿà­)", + "fr_MR": "ଫà­à¬°à­‡à¬žà­à¬š (ମାଉରିଟାନିଆ)", + "fr_MU": "ଫà­à¬°à­‡à¬žà­à¬š (ମୌରିସସà­)", + "fr_NC": "ଫà­à¬°à­‡à¬žà­à¬š (ନୂତନ କାଲେଡୋନିଆ)", + "fr_NE": "ଫà­à¬°à­‡à¬žà­à¬š (ନାଇଜରà­)", + "fr_PF": "ଫà­à¬°à­‡à¬žà­à¬š (ଫà­à¬°à­‡à¬žà­à¬š ପଲିନେସିଆ)", + "fr_PM": "ଫà­à¬°à­‡à¬žà­à¬š (ସେଣà­à¬Ÿ ପିà¬à¬°à­‡ à¬à¬¬à¬‚ ମିକà­à¬¬à¬¾à¬²à­‹à¬¨à­)", + "fr_RE": "ଫà­à¬°à­‡à¬žà­à¬š (ରିୟà­à¬¨à¬¿à¬…ନà­)", + "fr_RW": "ଫà­à¬°à­‡à¬žà­à¬š (ରାୱାଣà­à¬¡à¬¾)", + "fr_SC": "ଫà­à¬°à­‡à¬žà­à¬š (ସେଚେଲସà­)", + "fr_SN": "ଫà­à¬°à­‡à¬žà­à¬š (ସେନେଗାଲà­)", + "fr_SY": "ଫà­à¬°à­‡à¬žà­à¬š (ସିରିଆ)", + "fr_TD": "ଫà­à¬°à­‡à¬žà­à¬š (ଚାଦà­)", + "fr_TG": "ଫà­à¬°à­‡à¬žà­à¬š (ଟୋଗୋ)", + "fr_TN": "ଫà­à¬°à­‡à¬žà­à¬š (ତà­à¬¨à¬¿à¬¸à¬¿à¬†)", + "fr_VU": "ଫà­à¬°à­‡à¬žà­à¬š (ଭାନà­à¬†à¬¤à­)", + "fr_WF": "ଫà­à¬°à­‡à¬žà­à¬š (ୱାଲିସୠà¬à¬¬à¬‚ ଫà­à¬¤à­à¬¨à¬¾)", + "fr_YT": "ଫà­à¬°à­‡à¬žà­à¬š (ମାୟୋଟେ)", + "fy": "ପଶà­à¬šà¬¿à¬® ଫà­à¬°à¬¿à¬¸à¬¿à­Ÿà¬¨à­", + "fy_NL": "ପଶà­à¬šà¬¿à¬® ଫà­à¬°à¬¿à¬¸à¬¿à­Ÿà¬¨à­ (ନେଦରଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "ga": "ଇରିସà­", + "ga_IE": "ଇରିସୠ(ଆୟରଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "gd": "ସà­à¬•ଟିସୠଗାà¬à¬²à¬¿à¬•à­", + "gd_GB": "ସà­à¬•ଟିସୠଗାà¬à¬²à¬¿à¬•à­ (ବà­à¬°à¬¿à¬Ÿà­‡à¬¨à­)", + "gl": "ଗାଲସିଆନà­", + "gl_ES": "ଗାଲସିଆନୠ(ସà­à¬ªà­‡à¬¨à­)", + "gu": "ଗà­à¬œà­à¬°à¬¾à¬Ÿà­€", + "gu_IN": "ଗà­à¬œà­à¬°à¬¾à¬Ÿà­€ (ଭାରତ)", + "gv": "ମାà¬à¬•à­à¬¸", + "gv_IM": "ମାà¬à¬•à­à¬¸ (ଆଇଲୠଅଫୠମୈନà­)", + "ha": "ହୌସା", + "ha_GH": "ହୌସା (ଘାନା)", + "ha_NE": "ହୌସା (ନାଇଜରà­)", + "ha_NG": "ହୌସା (ନାଇଜେରିଆ)", + "he": "ହେବà­à¬°à­à­Ÿà­", + "he_IL": "ହେବà­à¬°à­à­Ÿà­ (ଇସà­à¬°à¬¾à¬à¬²à­)", + "hi": "ହିନà­à¬¦à­€", + "hi_IN": "ହିନà­à¬¦à­€ (ଭାରତ)", + "hr": "କà­à¬°à­‹à¬†à¬Ÿà¬¿à¬†à¬¨à­", + "hr_BA": "କà­à¬°à­‹à¬†à¬Ÿà¬¿à¬†à¬¨à­ (ବୋସନିଆ à¬à¬¬à¬‚ ହରà­à¬œà¬—ୋଭିନା)", + "hr_HR": "କà­à¬°à­‹à¬†à¬Ÿà¬¿à¬†à¬¨à­ (କà­à¬°à­‹à¬†à¬Ÿà¬¿à¬†)", + "hu": "ହଙà­à¬—େରିଆନà­", + "hu_HU": "ହଙà­à¬—େରିଆନୠ(ହଙà­à¬—େରୀ)", + "hy": "ଆରà­à¬®à­‡à¬¨à¬¿à¬†à¬¨à­", + "hy_AM": "ଆରà­à¬®à­‡à¬¨à¬¿à¬†à¬¨à­ (ଆରà­à¬®à­‡à¬¨à¬¿à¬†)", + "id": "ଇଣà­à¬¡à­‹à¬¨à­‡à¬¸à¬¿à¬†à¬¨à­", + "id_ID": "ଇଣà­à¬¡à­‹à¬¨à­‡à¬¸à¬¿à¬†à¬¨à­ (ଇଣà­à¬¡à­‹à¬¨à­‡à¬¸à¬¿à¬†)", + "ig": "ଇଗà­à¬¬à­‹", + "ig_NG": "ଇଗà­à¬¬à­‹ (ନାଇଜେରିଆ)", + "ii": "ସିଚà­à¬†à¬¨à­ à­Ÿà­€", + "ii_CN": "ସିଚà­à¬†à¬¨à­ à­Ÿà­€ (ଚିନà­)", + "is": "ଆଇସଲାଣà­à¬¡à¬¿à¬•à­", + "is_IS": "ଆଇସଲାଣà­à¬¡à¬¿à¬•à­ (ଆଇସଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "it": "ଇଟାଲିଆନà­", + "it_CH": "ଇଟାଲିଆନୠ(ସà­à¬¬à¬¿à¬œà¬°à¬²à­à­Ÿà¬¾à¬£à­à¬¡)", + "it_IT": "ଇଟାଲିଆନୠ(ଇଟାଲୀ)", + "it_SM": "ଇଟାଲିଆନୠ(ସାନୠମାରିନୋ)", + "ja": "ଜାପାନୀଜà­", + "ja_JP": "ଜାପାନୀଜୠ(ଜାପାନà­)", + "ka": "ଜରà­à¬œà¬¿à¬†à¬¨à­", + "ka_GE": "ଜରà­à¬œà¬¿à¬†à¬¨à­ (ଜରà­à¬œà¬¿à¬†)", + "ki": "କୀକà­à­Ÿà­", + "ki_KE": "କୀକà­à­Ÿà­ (କେନିୟା)", + "kk": "କାଜାକà­", + "kk_KZ": "କାଜାକୠ(କାଜାକାସà­à¬¥à¬¾à¬¨à­)", + "kl": "ଗà­à¬°à­€à¬¨à¬²à¬¾à¬£à­à¬¡à¬¿à¬•à­", + "kl_GL": "ଗà­à¬°à­€à¬¨à¬²à¬¾à¬£à­à¬¡à¬¿à¬•à­ (ଗà­à¬°à­€à¬¨à¬²à­à­Ÿà¬¾à¬£à­à¬¡)", + "km": "ଖà­à¬®à­‡à¬°à­", + "km_KH": "ଖà­à¬®à­‡à¬°à­ (କାମà­à¬¬à­‹à¬¡à¬¿à¬†)", + "kn": "କନà­à¬¨à¬¡", + "kn_IN": "କନà­à¬¨à¬¡ (ଭାରତ)", + "ko": "କୋରିଆନà­", + "ko_KP": "କୋରିଆନୠ(ଉତà­à¬¤à¬° କୋରିଆ)", + "ko_KR": "କୋରିଆନୠ(ଦକà­à¬·à¬¿à¬£ କୋରିଆ)", + "ks": "କାଶà­à¬®à¬¿à¬°à­€", + "ks_IN": "କାଶà­à¬®à¬¿à¬°à­€ (ଭାରତ)", + "kw": "କୋରà­à¬¨à¬¿à¬¸à­", + "kw_GB": "କୋରà­à¬¨à¬¿à¬¸à­ (ବà­à¬°à¬¿à¬Ÿà­‡à¬¨à­)", + "ky": "କିରଗିଜà­", + "ky_KG": "କିରଗିଜୠ(କିରà­à¬—ିଜିସà­à¬¥à¬¾à¬¨)", + "lb": "ଲକà­à¬¸à­‡à¬®à¬¬à¬°à­à¬—ିସà­", + "lb_LU": "ଲକà­à¬¸à­‡à¬®à¬¬à¬°à­à¬—ିସୠ(ଲକà­à¬¸à­‡à¬®à¬¬à¬°à­à¬—)", + "lg": "ଗନà­à¬¦à¬¾", + "lg_UG": "ଗନà­à¬¦à¬¾ (ଉଗାଣà­à¬¡à¬¾)", + "ln": "ଲିଙà­à¬—ାଲା", + "ln_AO": "ଲିଙà­à¬—ାଲା (ଆଙà­à¬—ୋଲା)", + "ln_CD": "ଲିଙà­à¬—ାଲା (କଙà­à¬—à­‹-କିନସାସା)", + "ln_CF": "ଲିଙà­à¬—ାଲା (ମଧà­à­Ÿ ଆଫà­à¬°à¬¿à¬•ୀୟ ଗଣତନà­à¬¤à­à¬°)", + "ln_CG": "ଲିଙà­à¬—ାଲା (କଙà­à¬—à­‹-ବà­à¬°à¬¾à¬œà¬¿à¬­à¬¿à¬²à­à¬²à­‡)", + "lo": "ଲାଓ", + "lo_LA": "ଲାଓ (ଲାଓସà­)", + "lt": "ଲିଥà­à¬†à¬¨à¬¿à¬†à¬¨à­", + "lt_LT": "ଲିଥà­à¬†à¬¨à¬¿à¬†à¬¨à­ (ଲିଥାଆନିଆ)", + "lu": "ଲà­à­Ÿà­à¬¬à¬¾-କାଟାଙà­à¬—ା", + "lu_CD": "ଲà­à­Ÿà­à¬¬à¬¾-କାଟାଙà­à¬—ା (କଙà­à¬—à­‹-କିନସାସା)", + "lv": "ଲାଟଭିଆନà­", + "lv_LV": "ଲାଟଭିଆନୠ(ଲାଟଭିଆ)", + "mg": "ମାଲାଗାସୀ", + "mg_MG": "ମାଲାଗାସୀ (ମାଡାଗାସà­à¬•ରà­)", + "mk": "ମାକଡୋନିଆନà­", + "mk_MK": "ମାକଡୋନିଆନୠ(ମାସେଡୋନିଆ)", + "ml": "ମାଲାୟଲମà­", + "ml_IN": "ମାଲାୟଲମୠ(ଭାରତ)", + "mn": "ମଙà­à¬—ୋଲିଆନà­", + "mn_MN": "ମଙà­à¬—ୋଲିଆନୠ(ମଙà­à¬—ୋଲିଆ)", + "mr": "ମରାଠୀ", + "mr_IN": "ମରାଠୀ (ଭାରତ)", + "ms": "ମାଲୟ", + "ms_BN": "ମାଲୟ (ବà­à¬°à­à¬¨à­‡à¬‡)", + "ms_MY": "ମାଲୟ (ମାଲେସିଆ)", + "ms_SG": "ମାଲୟ (ସିଙà­à¬—ାପà­à¬°à­)", + "mt": "ମାଲଟୀଜà­", + "mt_MT": "ମାଲଟୀଜୠ(ମାଲà­à¬Ÿà¬¾)", + "my": "ବରà­à¬®à­€à¬œà­", + "my_MM": "ବରà­à¬®à­€à¬œà­ (ମିୟାମାରà­)", + "nb": "ନରୱେଜିଆନୠବୋକମଲà­", + "nb_NO": "ନରୱେଜିଆନୠବୋକମଲୠ(ନରୱେ)", + "nb_SJ": "ନରୱେଜିଆନୠବୋକମଲୠ(ସାଲà­à¬­à¬¾à¬°à­à¬¡ à¬à¬¬à¬‚ ଜାନୠମାୟୋନà­)", + "nd": "ଉତà­à¬¤à¬° ନେଡବେଲେ", + "nd_ZW": "ଉତà­à¬¤à¬° ନେଡବେଲେ (ଜିମà­à¬¬à¬¾à­±à­‡)", + "ne": "ନେପାଳୀ", + "ne_IN": "ନେପାଳୀ (ଭାରତ)", + "ne_NP": "ନେପାଳୀ (ନେପାଳ)", + "nl": "ଡଚà­", + "nl_AW": "ଡଚୠ(ଆରà­à¬¬à¬¾)", + "nl_BE": "ଡଚୠ(ବେଲଜିୟମà­)", + "nl_NL": "ଡଚୠ(ନେଦରଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "nl_SR": "ଡଚୠ(ସà­à¬°à¬¿à¬¨à¬¾à¬®)", + "nn": "ନରୱେଜିଆନୠନିୟୋରà­à¬¸à­à¬•", + "nn_NO": "ନରୱେଜିଆନୠନିୟୋରà­à¬¸à­à¬• (ନରୱେ)", + "no": "ନରୱେଜିଆନà­", + "no_NO": "ନରୱେଜିଆନୠ(ନରୱେ)", + "om": "ଓରୋମୋ", + "om_ET": "ଓରୋମୋ (ଇଥିଓପିଆ)", + "om_KE": "ଓରୋମୋ (କେନିୟା)", + "or": "ଓଡ଼ିଆ", + "or_IN": "ଓଡ଼ିଆ (ଭାରତ)", + "os": "ଓସେଟିକà­", + "os_GE": "ଓସେଟିକୠ(ଜରà­à¬œà¬¿à¬†)", + "os_RU": "ଓସେଟିକୠ(ରà­à¬·à¬¿à¬†)", + "pa": "ପଞà­à¬œà¬¾à¬¬à­€", + "pa_Arab": "ପଞà­à¬œà¬¾à¬¬à­€ (ଆରବିକà­)", + "pa_Arab_PK": "ପଞà­à¬œà¬¾à¬¬à­€ (ଆରବିକà­, ପାକିସà­à¬¤à¬¾à¬¨)", + "pa_Guru": "ପଞà­à¬œà¬¾à¬¬à­€ (ଗà­à¬°à­à¬®à­à¬–à­€)", + "pa_Guru_IN": "ପଞà­à¬œà¬¾à¬¬à­€ (ଗà­à¬°à­à¬®à­à¬–à­€, ଭାରତ)", + "pa_IN": "ପଞà­à¬œà¬¾à¬¬à­€ (ଭାରତ)", + "pa_PK": "ପଞà­à¬œà¬¾à¬¬à­€ (ପାକିସà­à¬¤à¬¾à¬¨)", + "pl": "ପୋଲିଶà­", + "pl_PL": "ପୋଲିଶୠ(ପୋଲାଣà­à¬¡)", + "ps": "ପାସà­à¬¤à­‹", + "ps_AF": "ପାସà­à¬¤à­‹ (ଆଫାଗାନିସà­à¬¤à¬¾à¬¨à­)", + "pt": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­", + "pt_AO": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­ (ଆଙà­à¬—ୋଲା)", + "pt_BR": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­ (ବà­à¬°à¬¾à¬œà¬¿à¬²à­)", + "pt_CH": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­ (ସà­à¬¬à¬¿à¬œà¬°à¬²à­à­Ÿà¬¾à¬£à­à¬¡)", + "pt_CV": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­ (କେପୠଭରà­à¬¦à­‡)", + "pt_GQ": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­ (ଇକà­à¬¬à¬¾à¬Ÿà­‡à¬°à¬¿à¬†à¬²à­ ଗà­à¬‡à¬¨à¬¿à¬†)", + "pt_GW": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­ (ଗà­à¬‡à¬¨à¬¿à¬†-ବିସାଉ)", + "pt_LU": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­ (ଲକà­à¬¸à­‡à¬®à¬¬à¬°à­à¬—)", + "pt_MO": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­ (ମାକାଉ SAR ଚିନà­)", + "pt_MZ": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­ (ମୋଜାମà­à¬¬à¬¿à¬•à­à­Ÿà­)", + "pt_PT": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­ (ପରà­à¬¤à­à¬¤à­à¬—ାଲà­)", + "pt_ST": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­ (ସାଓ ଟୋମେ à¬à¬¬à¬‚ ପà­à¬°à¬¿à¬¨à¬¸à¬¿à¬ªà¬¿)", + "pt_TL": "ପରà­à¬¤à­à¬¤à­à¬—à­à¬°à­€à¬œà­ (ପà­à¬°à­à¬¬ ତିମୋରà­)", + "qu": "କà­à­±à­‡à¬šà­à¬†", + "qu_BO": "କà­à­±à­‡à¬šà­à¬† (ବୋଲଭିଆ)", + "qu_EC": "କà­à­±à­‡à¬šà­à¬† (ଇକà­à­±à¬¾à¬¡à­‹à¬°à­)", + "qu_PE": "କà­à­±à­‡à¬šà­à¬† (ପେରà­)", + "rm": "ରେହେଟୋ-ରୋମାନà­à¬¸", + "rm_CH": "ରେହେଟୋ-ରୋମାନà­à¬¸ (ସà­à¬¬à¬¿à¬œà¬°à¬²à­à­Ÿà¬¾à¬£à­à¬¡)", + "rn": "ରà­à¬£à­à¬¡à¬¿", + "rn_BI": "ରà­à¬£à­à¬¡à¬¿ (ବà­à¬°à­à¬¨à­à¬¦à¬¿)", + "ro": "ରୋମାନିଆନà­", + "ro_MD": "ରୋମାନିଆନୠ(ମାଲଡୋଭା)", + "ro_RO": "ରୋମାନିଆନୠ(ରୋମାନିଆ)", + "ru": "ରଷିଆନà­", + "ru_BY": "ରଷିଆନୠ(ବେଲାରà­à¬·à­)", + "ru_KG": "ରଷିଆନୠ(କିରà­à¬—ିଜିସà­à¬¥à¬¾à¬¨)", + "ru_KZ": "ରଷିଆନୠ(କାଜାକାସà­à¬¥à¬¾à¬¨à­)", + "ru_MD": "ରଷିଆନୠ(ମାଲଡୋଭା)", + "ru_RU": "ରଷିଆନୠ(ରà­à¬·à¬¿à¬†)", + "ru_UA": "ରଷିଆନୠ(à­Ÿà­à¬•à­à¬°à¬¾à¬‡à¬¨à­)", + "rw": "କିନà­à­Ÿà¬¾à¬°à­±à¬¾à¬£à­à¬¡à¬¾", + "rw_RW": "କିନà­à­Ÿà¬¾à¬°à­±à¬¾à¬£à­à¬¡à¬¾ (ରାୱାଣà­à¬¡à¬¾)", + "se": "ଉତà­à¬¤à¬° ସାମି", + "se_FI": "ଉତà­à¬¤à¬° ସାମି (ଫିନଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "se_NO": "ଉତà­à¬¤à¬° ସାମି (ନରୱେ)", + "se_SE": "ଉତà­à¬¤à¬° ସାମି (ସà­à­±à­‡à¬¡à­‡à¬¨à­)", + "sg": "ସାଙà­à¬—à­‹", + "sg_CF": "ସାଙà­à¬—à­‹ (ମଧà­à­Ÿ ଆଫà­à¬°à¬¿à¬•ୀୟ ଗଣତନà­à¬¤à­à¬°)", + "sh": "ସରà­à¬¬à­‹-କà­à¬°à­‹à¬†à¬Ÿà¬¿à¬†à¬¨à­", + "sh_BA": "ସରà­à¬¬à­‹-କà­à¬°à­‹à¬†à¬Ÿà¬¿à¬†à¬¨à­ (ବୋସନିଆ à¬à¬¬à¬‚ ହରà­à¬œà¬—ୋଭିନା)", + "si": "ସିଂହଳ", + "si_LK": "ସିଂହଳ (ଶà­à¬°à­€à¬²à¬™à­à¬•ା)", + "sk": "ସà­à¬²à­‹à¬­à¬¾à¬•à­", + "sk_SK": "ସà­à¬²à­‹à¬­à¬¾à¬•à­ (ସà­à¬²à­‹à¬­à¬¾à¬•ିଆ)", + "sl": "ସà­à¬²à­‹à¬­à­‡à¬¨à¬¿à¬†à¬¨à­", + "sl_SI": "ସà­à¬²à­‹à¬­à­‡à¬¨à¬¿à¬†à¬¨à­ (ସà­à¬²à­‹à¬­à­‡à¬¨à¬¿à¬†)", + "sn": "ଶୋନା", + "sn_ZW": "ଶୋନା (ଜିମà­à¬¬à¬¾à­±à­‡)", + "so": "ସୋମାଲିଆ", + "so_DJ": "ସୋମାଲିଆ (ଡିବୌଟି)", + "so_ET": "ସୋମାଲିଆ (ଇଥିଓପିଆ)", + "so_KE": "ସୋମାଲିଆ (କେନିୟା)", + "so_SO": "ସୋମାଲିଆ (ସୋମାଲିଆ)", + "sq": "ଆଲବାନିଆନà­", + "sq_AL": "ଆଲବାନିଆନୠ(ଆଲବାନିଆ)", + "sq_MK": "ଆଲବାନିଆନୠ(ମାସେଡୋନିଆ)", + "sr": "ସରà­à¬¬à¬¿à¬†à¬¨à­", + "sr_BA": "ସରà­à¬¬à¬¿à¬†à¬¨à­ (ବୋସନିଆ à¬à¬¬à¬‚ ହରà­à¬œà¬—ୋଭିନା)", + "sr_Cyrl": "ସରà­à¬¬à¬¿à¬†à¬¨à­ (ସିରିଲିକà­)", + "sr_Cyrl_BA": "ସରà­à¬¬à¬¿à¬†à¬¨à­ (ସିରିଲିକà­, ବୋସନିଆ à¬à¬¬à¬‚ ହରà­à¬œà¬—ୋଭିନା)", + "sr_Cyrl_ME": "ସରà­à¬¬à¬¿à¬†à¬¨à­ (ସିରିଲିକà­, ମଣà­à¬Ÿà­‡à¬—à­à¬°à­‹)", + "sr_Cyrl_RS": "ସରà­à¬¬à¬¿à¬†à¬¨à­ (ସିରିଲିକà­, ସରà­à¬¬à¬¿à¬†)", + "sr_Latn": "ସରà­à¬¬à¬¿à¬†à¬¨à­ (ଲାଟିନà­)", + "sr_Latn_BA": "ସରà­à¬¬à¬¿à¬†à¬¨à­ (ଲାଟିନà­, ବୋସନିଆ à¬à¬¬à¬‚ ହରà­à¬œà¬—ୋଭିନା)", + "sr_Latn_ME": "ସରà­à¬¬à¬¿à¬†à¬¨à­ (ଲାଟିନà­, ମଣà­à¬Ÿà­‡à¬—à­à¬°à­‹)", + "sr_Latn_RS": "ସରà­à¬¬à¬¿à¬†à¬¨à­ (ଲାଟିନà­, ସରà­à¬¬à¬¿à¬†)", + "sr_ME": "ସରà­à¬¬à¬¿à¬†à¬¨à­ (ମଣà­à¬Ÿà­‡à¬—à­à¬°à­‹)", + "sr_RS": "ସରà­à¬¬à¬¿à¬†à¬¨à­ (ସରà­à¬¬à¬¿à¬†)", + "sv": "ସà­à­±à­‡à¬¡à¬¿à¬¸à­", + "sv_AX": "ସà­à­±à­‡à¬¡à¬¿à¬¸à­ (ଆଲାଣà­à¬¡ ଆଇସଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "sv_FI": "ସà­à­±à­‡à¬¡à¬¿à¬¸à­ (ଫିନଲà­à­Ÿà¬¾à¬£à­à¬¡)", + "sv_SE": "ସà­à­±à­‡à¬¡à¬¿à¬¸à­ (ସà­à­±à­‡à¬¡à­‡à¬¨à­)", + "sw": "ସà­à­±à¬¾à¬¹à¬¿à¬²à­", + "sw_CD": "ସà­à­±à¬¾à¬¹à¬¿à¬²à­ (କଙà­à¬—à­‹-କିନସାସା)", + "sw_KE": "ସà­à­±à¬¾à¬¹à¬¿à¬²à­ (କେନିୟା)", + "sw_TZ": "ସà­à­±à¬¾à¬¹à¬¿à¬²à­ (ତାଞà­à¬œà¬¾à¬¨à¬¿à¬†)", + "sw_UG": "ସà­à­±à¬¾à¬¹à¬¿à¬²à­ (ଉଗାଣà­à¬¡à¬¾)", + "ta": "ତାମିଲà­", + "ta_IN": "ତାମିଲୠ(ଭାରତ)", + "ta_LK": "ତାମିଲୠ(ଶà­à¬°à­€à¬²à¬™à­à¬•ା)", + "ta_MY": "ତାମିଲୠ(ମାଲେସିଆ)", + "ta_SG": "ତାମିଲୠ(ସିଙà­à¬—ାପà­à¬°à­)", + "te": "ତେଲà­à¬—à­", + "te_IN": "ତେଲà­à¬—à­ (ଭାରତ)", + "th": "ଥାଇ", + "th_TH": "ଥାଇ (ଥାଇଲାଣà­à¬¡)", + "ti": "ଟà­à¬°à¬¿à¬—ିନିଆ", + "ti_ER": "ଟà­à¬°à¬¿à¬—ିନିଆ (ଇରିଟà­à¬°à¬¿à­Ÿà¬¾)", + "ti_ET": "ଟà­à¬°à¬¿à¬—ିନିଆ (ଇଥିଓପିଆ)", + "tl": "ଟାଗାଲଗà­", + "tl_PH": "ଟାଗାଲଗୠ(ଫିଲିପାଇନସà­)", + "to": "ଟୋଙà­à¬—ା", + "to_TO": "ଟୋଙà­à¬—ା (ଟୋଙà­à¬—ା)", + "tr": "ତà­à¬°à­à¬•ିସà­", + "tr_CY": "ତà­à¬°à­à¬•ିସୠ(ସାଇପà­à¬°à¬¸à­)", + "tr_TR": "ତà­à¬°à­à¬•ିସୠ(ତà­à¬°à­à¬•à­€)", + "ug": "à­Ÿà­à¬˜à­à¬°à­", + "ug_CN": "à­Ÿà­à¬˜à­à¬°à­ (ଚିନà­)", + "uk": "à­Ÿà­à¬•à­à¬°à¬¾à¬¨à¬¿à¬†à¬¨à­", + "uk_UA": "à­Ÿà­à¬•à­à¬°à¬¾à¬¨à¬¿à¬†à¬¨à­ (à­Ÿà­à¬•à­à¬°à¬¾à¬‡à¬¨à­)", + "ur": "ଉରà­à¬¦à­à¬¦à­", + "ur_IN": "ଉରà­à¬¦à­à¬¦à­ (ଭାରତ)", + "ur_PK": "ଉରà­à¬¦à­à¬¦à­ (ପାକିସà­à¬¤à¬¾à¬¨)", + "uz": "ଉଜବେକà­", + "uz_AF": "ଉଜବେକୠ(ଆଫାଗାନିସà­à¬¤à¬¾à¬¨à­)", + "uz_Arab": "ଉଜବେକୠ(ଆରବିକà­)", + "uz_Arab_AF": "ଉଜବେକୠ(ଆରବିକà­, ଆଫାଗାନିସà­à¬¤à¬¾à¬¨à­)", + "uz_Cyrl": "ଉଜବେକୠ(ସିରିଲିକà­)", + "uz_Cyrl_UZ": "ଉଜବେକୠ(ସିରିଲିକà­, ଉଜବେକିସà­à¬¥à¬¾à¬¨à­)", + "uz_Latn": "ଉଜବେକୠ(ଲାଟିନà­)", + "uz_Latn_UZ": "ଉଜବେକୠ(ଲାଟିନà­, ଉଜବେକିସà­à¬¥à¬¾à¬¨à­)", + "uz_UZ": "ଉଜବେକୠ(ଉଜବେକିସà­à¬¥à¬¾à¬¨à­)", + "vi": "ଭିà¬à¬¤à¬¨à¬¾à¬®à¬¿à¬œà­", + "vi_VN": "ଭିà¬à¬¤à¬¨à¬¾à¬®à¬¿à¬œà­ (ଭିà¬à¬¤à¬¨à¬¾à¬®à­)", + "yi": "ୟିଡିସà­", + "yo": "ୟୋରà­à¬¬à¬¾", + "yo_BJ": "ୟୋରà­à¬¬à¬¾ (ବେନିନà­)", + "yo_NG": "ୟୋରà­à¬¬à¬¾ (ନାଇଜେରିଆ)", + "zh": "ଚାଇନୀଜà­", + "zh_CN": "ଚାଇନୀଜୠ(ଚିନà­)", + "zh_HK": "ଚାଇନୀଜୠ(ହଂକଂ ବିଶେଷ ପà­à¬°à¬¶à¬¾à¬¸à¬¨à¬¿à¬• କà­à¬·à­‡à¬¤à­à¬° ଚୀନà­)", + "zh_Hans": "ଚାଇନୀଜୠ(ସରଳୀକୃତ ହାନà­)", + "zh_Hans_CN": "ଚାଇନୀଜୠ(ସରଳୀକୃତ ହାନà­, ଚିନà­)", + "zh_Hans_HK": "ଚାଇନୀଜୠ(ସରଳୀକୃତ ହାନà­, ହଂକଂ ବିଶେଷ ପà­à¬°à¬¶à¬¾à¬¸à¬¨à¬¿à¬• କà­à¬·à­‡à¬¤à­à¬° ଚୀନà­)", + "zh_Hans_MO": "ଚାଇନୀଜୠ(ସରଳୀକୃତ ହାନà­, ମାକାଉ SAR ଚିନà­)", + "zh_Hans_SG": "ଚାଇନୀଜୠ(ସରଳୀକୃତ ହାନà­, ସିଙà­à¬—ାପà­à¬°à­)", + "zh_Hant": "ଚାଇନୀଜୠ(ପାରମà­à¬ªà¬°à¬¿à¬•ୠହାନà­)", + "zh_Hant_HK": "ଚାଇନୀଜୠ(ପାରମà­à¬ªà¬°à¬¿à¬•ୠହାନà­, ହଂକଂ ବିଶେଷ ପà­à¬°à¬¶à¬¾à¬¸à¬¨à¬¿à¬• କà­à¬·à­‡à¬¤à­à¬° ଚୀନà­)", + "zh_Hant_MO": "ଚାଇନୀଜୠ(ପାରମà­à¬ªà¬°à¬¿à¬•ୠହାନà­, ମାକାଉ SAR ଚିନà­)", + "zh_Hant_TW": "ଚାଇନୀଜୠ(ପାରମà­à¬ªà¬°à¬¿à¬•ୠହାନà­, ତାଇୱାନà­)", + "zh_MO": "ଚାଇନୀଜୠ(ମାକାଉ SAR ଚିନà­)", + "zh_SG": "ଚାଇନୀଜୠ(ସିଙà­à¬—ାପà­à¬°à­)", + "zh_TW": "ଚାଇନୀଜୠ(ତାଇୱାନà­)", + "zu": "ଜà­à¬²à­", + "zu_ZA": "ଜà­à¬²à­ (ଦକà­à¬·à¬¿à¬£ ଆଫà­à¬°à¬¿à¬•ା)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/os.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/os.json new file mode 100644 index 0000000000000000000000000000000000000000..d8e8c4e47df6aa965893c82c11a91559738938d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/os.json @@ -0,0 +1,64 @@ +{ + "Names": { + "af": "африкаанÑ", + "ar": "араббаг", + "az": "тӕтӕйраг", + "az_Cyrl": "тӕтӕйраг (Киррилицӕ)", + "az_Latn": "тӕтӕйраг (Латинаг)", + "bg": "болгайраг", + "bs": "боÑниаг", + "bs_Cyrl": "боÑниаг (Киррилицӕ)", + "bs_Latn": "боÑниаг (Латинаг)", + "ca": "каталайнаг", + "ca_FR": "каталайнаг (Франц)", + "ca_IT": "каталайнаг (Итали)", + "ce": "цӕцӕйнаг", + "ce_RU": "цӕцӕйнаг (УӕрӕÑе)", + "cs": "чехаг", + "da": "даниаг", + "de": "немыцаг", + "de_DE": "немыцаг (Герман)", + "de_IT": "немыцаг (Итали)", + "el": "бердзейнаг", + "en": "англиÑаг", + "en_DE": "англиÑаг (Герман)", + "en_GB": "англиÑаг (Стыр Британи)", + "en_IN": "англиÑаг (Инди)", + "en_US": "англиÑаг (ÐИШ)", + "eo": "еÑперанто", + "es": "иÑпайнаг", + "es_BR": "иÑпайнаг (Бразили)", + "es_US": "иÑпайнаг (ÐИШ)", + "et": "еÑтойнаг", + "eu": "баÑкаг", + "fa": "перÑайнаг", + "fi": "финнаг", + "fo": "фарераг", + "fr": "францаг", + "fr_FR": "францаг (Франц)", + "ga": "ирландиаг", + "he": "уираг", + "hr": "хорватаг", + "hu": "венгериаг", + "hy": "Ñомихаг", + "it": "италиаг", + "it_IT": "италиаг (Итали)", + "ja": "Ñпойнаг", + "ja_JP": "Ñпойнаг (Япон)", + "ka": "гуырдзиаг", + "ka_GE": "гуырдзиаг (ГуырдзыÑтон)", + "mk": "мӕчъидон", + "os": "ирон", + "os_GE": "ирон (ГуырдзыÑтон)", + "os_RU": "ирон (УӕрӕÑе)", + "pt": "португалиаг", + "pt_BR": "португалиаг (Бразили)", + "ru": "уырыÑÑаг", + "ru_RU": "уырыÑÑаг (УӕрӕÑе)", + "zh": "китайаг", + "zh_CN": "китайаг (Китай)", + "zh_Hans": "китайаг (Ӕнцонгонд китайаг)", + "zh_Hans_CN": "китайаг (Ӕнцонгонд китайаг, Китай)", + "zh_Hant": "китайаг (Традицион китайаг)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pa.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pa.json new file mode 100644 index 0000000000000000000000000000000000000000..7ffa0ec2d1b0dd1d64b2961c40048cb0136010c8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pa.json @@ -0,0 +1,564 @@ +{ + "Names": { + "af": "ਅਫ਼ਰੀਕੀ", + "af_NA": "ਅਫ਼ਰੀਕੀ (ਨਾਮੀਬੀਆ)", + "af_ZA": "ਅਫ਼ਰੀਕੀ (ਦੱਖਣ ਅਫਰੀਕਾ)", + "ak": "ਅਕਾਨ", + "ak_GH": "ਅਕਾਨ (ਘਾਨਾ)", + "am": "ਅਮਹਾਰਿਕ", + "am_ET": "ਅਮਹਾਰਿਕ (ਇਥੋਪੀਆ)", + "ar": "ਅਰਬੀ", + "ar_AE": "ਅਰਬੀ (ਸੰਯà©à¨•ਤ ਅਰਬ ਅਮੀਰਾਤ)", + "ar_BH": "ਅਰਬੀ (ਬਹਿਰੀਨ)", + "ar_DJ": "ਅਰਬੀ (ਜ਼ੀਬੂਤੀ)", + "ar_DZ": "ਅਰਬੀ (ਅਲਜੀਰੀਆ)", + "ar_EG": "ਅਰਬੀ (ਮਿਸਰ)", + "ar_EH": "ਅਰਬੀ (ਪੱਛਮੀ ਸਹਾਰਾ)", + "ar_ER": "ਅਰਬੀ (ਇਰੀਟà©à¨°à¨¿à¨†)", + "ar_IL": "ਅਰਬੀ (ਇਜ਼ਰਾਈਲ)", + "ar_IQ": "ਅਰਬੀ (ਇਰਾਕ)", + "ar_JO": "ਅਰਬੀ (ਜਾਰਡਨ)", + "ar_KM": "ਅਰਬੀ (ਕੋਮੋਰੋਸ)", + "ar_KW": "ਅਰਬੀ (ਕà©à¨µà©ˆà¨¤)", + "ar_LB": "ਅਰਬੀ (ਲੈਬਨਾਨ)", + "ar_LY": "ਅਰਬੀ (ਲੀਬੀਆ)", + "ar_MA": "ਅਰਬੀ (ਮੋਰੱਕੋ)", + "ar_MR": "ਅਰਬੀ (ਮੋਰਿਟਾਨੀਆ)", + "ar_OM": "ਅਰਬੀ (ਓਮਾਨ)", + "ar_PS": "ਅਰਬੀ (ਫਿਲੀਸਤੀਨੀ ਇਲਾਕਾ)", + "ar_QA": "ਅਰਬੀ (ਕਤਰ)", + "ar_SA": "ਅਰਬੀ (ਸਾਊਦੀ ਅਰਬ)", + "ar_SD": "ਅਰਬੀ (ਸੂਡਾਨ)", + "ar_SO": "ਅਰਬੀ (ਸੋਮਾਲੀਆ)", + "ar_SS": "ਅਰਬੀ (ਦੱਖਣ ਸà©à¨¡à¨¾à¨¨)", + "ar_SY": "ਅਰਬੀ (ਸੀਰੀਆ)", + "ar_TD": "ਅਰਬੀ (ਚਾਡ)", + "ar_TN": "ਅਰਬੀ (ਟਿਊਨੀਸ਼ੀਆ)", + "ar_YE": "ਅਰਬੀ (ਯਮਨ)", + "as": "ਅਸਾਮੀ", + "as_IN": "ਅਸਾਮੀ (ਭਾਰਤ)", + "az": "ਅਜ਼ਰਬਾਈਜਾਨੀ", + "az_AZ": "ਅਜ਼ਰਬਾਈਜਾਨੀ (ਅਜ਼ਰਬਾਈਜਾਨ)", + "az_Cyrl": "ਅਜ਼ਰਬਾਈਜਾਨੀ (ਸਿਰੀਲਿਕ)", + "az_Cyrl_AZ": "ਅਜ਼ਰਬਾਈਜਾਨੀ (ਸਿਰੀਲਿਕ, ਅਜ਼ਰਬਾਈਜਾਨ)", + "az_Latn": "ਅਜ਼ਰਬਾਈਜਾਨੀ (ਲਾਤੀਨੀ)", + "az_Latn_AZ": "ਅਜ਼ਰਬਾਈਜਾਨੀ (ਲਾਤੀਨੀ, ਅਜ਼ਰਬਾਈਜਾਨ)", + "be": "ਬੇਲਾਰੂਸੀ", + "be_BY": "ਬੇਲਾਰੂਸੀ (ਬੇਲਾਰੂਸ)", + "bg": "ਬà©à¨²à¨—ਾਰੀਆਈ", + "bg_BG": "ਬà©à¨²à¨—ਾਰੀਆਈ (ਬà©à¨²à¨—ਾਰੀਆ)", + "bm": "ਬੰਬਾਰਾ", + "bm_ML": "ਬੰਬਾਰਾ (ਮਾਲੀ)", + "bn": "ਬੰਗਾਲੀ", + "bn_BD": "ਬੰਗਾਲੀ (ਬੰਗਲਾਦੇਸ਼)", + "bn_IN": "ਬੰਗਾਲੀ (ਭਾਰਤ)", + "bo": "ਤਿੱਬਤੀ", + "bo_CN": "ਤਿੱਬਤੀ (ਚੀਨ)", + "bo_IN": "ਤਿੱਬਤੀ (ਭਾਰਤ)", + "br": "ਬਰੇਟਨ", + "br_FR": "ਬਰੇਟਨ (ਫ਼ਰਾਂਸ)", + "bs": "ਬੋਸਨੀਆਈ", + "bs_BA": "ਬੋਸਨੀਆਈ (ਬੋਸਨੀਆ ਅਤੇ ਹਰਜ਼ੇਗੋਵੀਨਾ)", + "bs_Cyrl": "ਬੋਸਨੀਆਈ (ਸਿਰੀਲਿਕ)", + "bs_Cyrl_BA": "ਬੋਸਨੀਆਈ (ਸਿਰੀਲਿਕ, ਬੋਸਨੀਆ ਅਤੇ ਹਰਜ਼ੇਗੋਵੀਨਾ)", + "bs_Latn": "ਬੋਸਨੀਆਈ (ਲਾਤੀਨੀ)", + "bs_Latn_BA": "ਬੋਸਨੀਆਈ (ਲਾਤੀਨੀ, ਬੋਸਨੀਆ ਅਤੇ ਹਰਜ਼ੇਗੋਵੀਨਾ)", + "ca": "ਕੈਟਾਲਾਨ", + "ca_AD": "ਕੈਟਾਲਾਨ (ਅੰਡੋਰਾ)", + "ca_ES": "ਕੈਟਾਲਾਨ (ਸਪੇਨ)", + "ca_FR": "ਕੈਟਾਲਾਨ (ਫ਼ਰਾਂਸ)", + "ca_IT": "ਕੈਟਾਲਾਨ (ਇਟਲੀ)", + "ce": "ਚੇਚਨ", + "ce_RU": "ਚੇਚਨ (ਰੂਸ)", + "cs": "ਚੈੱਕ", + "cs_CZ": "ਚੈੱਕ (ਚੈੱਕ ਗਣਰਾਜ)", + "cy": "ਵੈਲਸ਼", + "cy_GB": "ਵੈਲਸ਼ (ਯੂਨਾਈਟਡ ਕਿੰਗਡਮ)", + "da": "ਡੈਨਿਸ਼", + "da_DK": "ਡੈਨਿਸ਼ (ਡੈਨਮਾਰਕ)", + "da_GL": "ਡੈਨਿਸ਼ (ਗà©à¨°à©€à¨¨à¨²à©ˆà¨‚ਡ)", + "de": "ਜਰਮਨ", + "de_AT": "ਜਰਮਨ (ਆਸਟਰੀਆ)", + "de_BE": "ਜਰਮਨ (ਬੈਲਜੀਅਮ)", + "de_CH": "ਜਰਮਨ (ਸਵਿਟਜ਼ਰਲੈਂਡ)", + "de_DE": "ਜਰਮਨ (ਜਰਮਨੀ)", + "de_IT": "ਜਰਮਨ (ਇਟਲੀ)", + "de_LI": "ਜਰਮਨ (ਲਿਚੇਂਸਟਾਇਨ)", + "de_LU": "ਜਰਮਨ (ਲਕਜ਼ਮਬਰਗ)", + "dz": "ਜ਼ੋਂਗਖਾ", + "dz_BT": "ਜ਼ੋਂਗਖਾ (ਭੂਟਾਨ)", + "ee": "ਈਵਈ", + "ee_GH": "ਈਵਈ (ਘਾਨਾ)", + "ee_TG": "ਈਵਈ (ਟੋਗੋ)", + "el": "ਯੂਨਾਨੀ", + "el_CY": "ਯੂਨਾਨੀ (ਸਾਇਪà©à¨°à¨¸)", + "el_GR": "ਯੂਨਾਨੀ (ਗà©à¨°à©€à¨¸)", + "en": "ਅੰਗਰੇਜ਼ੀ", + "en_AG": "ਅੰਗਰੇਜ਼ੀ (à¨à¨‚ਟੀਗà©à¨† ਅਤੇ ਬਾਰਬà©à¨¡à¨¾)", + "en_AI": "ਅੰਗਰੇਜ਼ੀ (ਅੰਗà©à¨‡à¨²à¨¾)", + "en_AS": "ਅੰਗਰੇਜ਼ੀ (ਅਮੈਰੀਕਨ ਸਮੋਆ)", + "en_AT": "ਅੰਗਰੇਜ਼ੀ (ਆਸਟਰੀਆ)", + "en_AU": "ਅੰਗਰੇਜ਼ੀ (ਆਸਟà©à¨°à©‡à¨²à©€à¨†)", + "en_BB": "ਅੰਗਰੇਜ਼ੀ (ਬਾਰਬਾਡੋਸ)", + "en_BE": "ਅੰਗਰੇਜ਼ੀ (ਬੈਲਜੀਅਮ)", + "en_BI": "ਅੰਗਰੇਜ਼ੀ (ਬà©à¨°à©à©°à¨¡à©€)", + "en_BM": "ਅੰਗਰੇਜ਼ੀ (ਬਰਮੂਡਾ)", + "en_BS": "ਅੰਗਰੇਜ਼ੀ (ਬਹਾਮਾਸ)", + "en_BW": "ਅੰਗਰੇਜ਼ੀ (ਬੋਤਸਵਾਨਾ)", + "en_BZ": "ਅੰਗਰੇਜ਼ੀ (ਬੇਲੀਜ਼)", + "en_CA": "ਅੰਗਰੇਜ਼ੀ (ਕੈਨੇਡਾ)", + "en_CC": "ਅੰਗਰੇਜ਼ੀ (ਕੋਕੋਸ (ਕੀਲਿੰਗ) ਟਾਪੂ)", + "en_CH": "ਅੰਗਰੇਜ਼ੀ (ਸਵਿਟਜ਼ਰਲੈਂਡ)", + "en_CK": "ਅੰਗਰੇਜ਼ੀ (ਕà©à©±à¨• ਟਾਪੂ)", + "en_CM": "ਅੰਗਰੇਜ਼ੀ (ਕੈਮਰੂਨ)", + "en_CX": "ਅੰਗਰੇਜ਼ੀ (ਕà©à¨°à¨¿à¨¸à¨®à¨¿à¨¸ ਟਾਪੂ)", + "en_CY": "ਅੰਗਰੇਜ਼ੀ (ਸਾਇਪà©à¨°à¨¸)", + "en_DE": "ਅੰਗਰੇਜ਼ੀ (ਜਰਮਨੀ)", + "en_DG": "ਅੰਗਰੇਜ਼ੀ (ਡੀਇਗੋ ਗਾਰਸੀਆ)", + "en_DK": "ਅੰਗਰੇਜ਼ੀ (ਡੈਨਮਾਰਕ)", + "en_DM": "ਅੰਗਰੇਜ਼ੀ (ਡੋਮੀਨਿਕਾ)", + "en_ER": "ਅੰਗਰੇਜ਼ੀ (ਇਰੀਟà©à¨°à¨¿à¨†)", + "en_FI": "ਅੰਗਰੇਜ਼ੀ (ਫਿਨਲੈਂਡ)", + "en_FJ": "ਅੰਗਰੇਜ਼ੀ (ਫ਼ਿਜੀ)", + "en_FK": "ਅੰਗਰੇਜ਼ੀ (ਫ਼ਾਕਲੈਂਡ ਟਾਪੂ)", + "en_FM": "ਅੰਗਰੇਜ਼ੀ (ਮਾਇਕà©à¨°à©‹à¨¨à©‡à¨¸à¨¼à©€à¨†)", + "en_GB": "ਅੰਗਰੇਜ਼ੀ (ਯੂਨਾਈਟਡ ਕਿੰਗਡਮ)", + "en_GD": "ਅੰਗਰੇਜ਼ੀ (ਗà©à¨°à©‡à¨¨à¨¾à¨¡à¨¾)", + "en_GG": "ਅੰਗਰੇਜ਼ੀ (ਗਰਨਜੀ)", + "en_GH": "ਅੰਗਰੇਜ਼ੀ (ਘਾਨਾ)", + "en_GI": "ਅੰਗਰੇਜ਼ੀ (ਜਿਬਰਾਲਟਰ)", + "en_GM": "ਅੰਗਰੇਜ਼ੀ (ਗੈਂਬੀਆ)", + "en_GU": "ਅੰਗਰੇਜ਼ੀ (ਗà©à¨†à¨®)", + "en_GY": "ਅੰਗਰੇਜ਼ੀ (ਗà©à¨¯à¨¾à¨¨à¨¾)", + "en_HK": "ਅੰਗਰੇਜ਼ੀ (ਹਾਂਗ ਕਾਂਗ à¨à¨¸à¨à¨†à¨° ਚੀਨ)", + "en_IE": "ਅੰਗਰੇਜ਼ੀ (ਆਇਰਲੈਂਡ)", + "en_IL": "ਅੰਗਰੇਜ਼ੀ (ਇਜ਼ਰਾਈਲ)", + "en_IM": "ਅੰਗਰੇਜ਼ੀ (ਆਇਲ ਆਫ ਮੈਨ)", + "en_IN": "ਅੰਗਰੇਜ਼ੀ (ਭਾਰਤ)", + "en_IO": "ਅੰਗਰੇਜ਼ੀ (ਬਰਤਾਨਵੀ ਹਿੰਦ ਮਹਾਂਸਾਗਰ ਖਿੱਤਾ)", + "en_JE": "ਅੰਗਰੇਜ਼ੀ (ਜਰਸੀ)", + "en_JM": "ਅੰਗਰੇਜ਼ੀ (ਜਮਾਇਕਾ)", + "en_KE": "ਅੰਗਰੇਜ਼ੀ (ਕੀਨੀਆ)", + "en_KI": "ਅੰਗਰੇਜ਼ੀ (ਕਿਰਬਾਤੀ)", + "en_KN": "ਅੰਗਰੇਜ਼ੀ (ਸੇਂਟ ਕਿਟਸ à¨à¨‚ਡ ਨੇਵਿਸ)", + "en_KY": "ਅੰਗਰੇਜ਼ੀ (ਕੇਮੈਨ ਟਾਪੂ)", + "en_LC": "ਅੰਗਰੇਜ਼ੀ (ਸੇਂਟ ਲੂਸੀਆ)", + "en_LR": "ਅੰਗਰੇਜ਼ੀ (ਲਾਈਬੀਰੀਆ)", + "en_LS": "ਅੰਗਰੇਜ਼ੀ (ਲੇਸੋਥੋ)", + "en_MG": "ਅੰਗਰੇਜ਼ੀ (ਮੈਡਾਗਾਸਕਰ)", + "en_MH": "ਅੰਗਰੇਜ਼ੀ (ਮਾਰਸ਼ਲ ਟਾਪੂ)", + "en_MO": "ਅੰਗਰੇਜ਼ੀ (ਮਕਾਉ à¨à¨¸à¨à¨†à¨° ਚੀਨ)", + "en_MP": "ਅੰਗਰੇਜ਼ੀ (ਉੱਤਰੀ ਮਾਰੀਆਨਾ ਟਾਪੂ)", + "en_MS": "ਅੰਗਰੇਜ਼ੀ (ਮੋਂਟਸੇਰਾਤ)", + "en_MT": "ਅੰਗਰੇਜ਼ੀ (ਮਾਲਟਾ)", + "en_MU": "ਅੰਗਰੇਜ਼ੀ (ਮੌਰਿਸ਼ਸ)", + "en_MW": "ਅੰਗਰੇਜ਼ੀ (ਮਲਾਵੀ)", + "en_MY": "ਅੰਗਰੇਜ਼ੀ (ਮਲੇਸ਼ੀਆ)", + "en_NA": "ਅੰਗਰੇਜ਼ੀ (ਨਾਮੀਬੀਆ)", + "en_NF": "ਅੰਗਰੇਜ਼ੀ (ਨੋਰਫੌਕ ਟਾਪੂ)", + "en_NG": "ਅੰਗਰੇਜ਼ੀ (ਨਾਈਜੀਰੀਆ)", + "en_NL": "ਅੰਗਰੇਜ਼ੀ (ਨੀਦਰਲੈਂਡ)", + "en_NR": "ਅੰਗਰੇਜ਼ੀ (ਨਾਉਰੂ)", + "en_NU": "ਅੰਗਰੇਜ਼ੀ (ਨਿਯੂ)", + "en_NZ": "ਅੰਗਰੇਜ਼ੀ (ਨਿਊਜ਼ੀਲੈਂਡ)", + "en_PG": "ਅੰਗਰੇਜ਼ੀ (ਪਾਪੂਆ ਨਿਊ ਗਿਨੀ)", + "en_PH": "ਅੰਗਰੇਜ਼ੀ (ਫਿਲੀਪੀਨਜ)", + "en_PK": "ਅੰਗਰੇਜ਼ੀ (ਪਾਕਿਸਤਾਨ)", + "en_PN": "ਅੰਗਰੇਜ਼ੀ (ਪਿਟਕੇਰਨ ਟਾਪੂ)", + "en_PR": "ਅੰਗਰੇਜ਼ੀ (ਪਿਊਰਟੋ ਰਿਕੋ)", + "en_PW": "ਅੰਗਰੇਜ਼ੀ (ਪਲਾਉ)", + "en_RW": "ਅੰਗਰੇਜ਼ੀ (ਰਵਾਂਡਾ)", + "en_SB": "ਅੰਗਰੇਜ਼ੀ (ਸੋਲੋਮਨ ਟਾਪੂ)", + "en_SC": "ਅੰਗਰੇਜ਼ੀ (ਸੇਸ਼ਲਸ)", + "en_SD": "ਅੰਗਰੇਜ਼ੀ (ਸੂਡਾਨ)", + "en_SE": "ਅੰਗਰੇਜ਼ੀ (ਸਵੀਡਨ)", + "en_SG": "ਅੰਗਰੇਜ਼ੀ (ਸਿੰਗਾਪà©à¨°)", + "en_SH": "ਅੰਗਰੇਜ਼ੀ (ਸੇਂਟ ਹੇਲੇਨਾ)", + "en_SI": "ਅੰਗਰੇਜ਼ੀ (ਸਲੋਵੇਨੀਆ)", + "en_SL": "ਅੰਗਰੇਜ਼ੀ (ਸਿà¨à¨°à¨¾ ਲਿਓਨ)", + "en_SS": "ਅੰਗਰੇਜ਼ੀ (ਦੱਖਣ ਸà©à¨¡à¨¾à¨¨)", + "en_SX": "ਅੰਗਰੇਜ਼ੀ (ਸਿੰਟ ਮਾਰਟੀਨ)", + "en_SZ": "ਅੰਗਰੇਜ਼ੀ (ਸਵਾਜ਼ੀਲੈਂਡ)", + "en_TC": "ਅੰਗਰੇਜ਼ੀ (ਟà©à¨°à¨•ਸ ਅਤੇ ਕੈਕੋਸ ਟਾਪੂ)", + "en_TK": "ਅੰਗਰੇਜ਼ੀ (ਟੋਕੇਲਾਉ)", + "en_TO": "ਅੰਗਰੇਜ਼ੀ (ਟੌਂਗਾ)", + "en_TT": "ਅੰਗਰੇਜ਼ੀ (ਟà©à¨°à¨¿à¨¨à©€à¨¡à¨¾à¨¡ ਅਤੇ ਟੋਬਾਗੋ)", + "en_TV": "ਅੰਗਰੇਜ਼ੀ (ਟà©à¨µà¨¾à¨²à©‚)", + "en_TZ": "ਅੰਗਰੇਜ਼ੀ (ਤਨਜ਼ਾਨੀਆ)", + "en_UG": "ਅੰਗਰੇਜ਼ੀ (ਯੂਗਾਂਡਾ)", + "en_UM": "ਅੰਗਰੇਜ਼ੀ (ਯੂ.à¨à©±à¨¸. ਦੂਰ-ਦà©à¨°à¨¾à¨¡à©‡ ਟਾਪੂ)", + "en_US": "ਅੰਗਰੇਜ਼ੀ (ਸੰਯà©à¨•ਤ ਰਾਜ)", + "en_VC": "ਅੰਗਰੇਜ਼ੀ (ਸੇਂਟ ਵਿਨਸੈਂਟ à¨à¨‚ਡ ਗà©à¨°à©‡à¨¨à¨¾à¨¡à©€à¨¨à¨¸)", + "en_VG": "ਅੰਗਰੇਜ਼ੀ (ਬà©à¨°à¨¿à¨Ÿà¨¿à¨¸à¨¼ ਵਰਜਿਨ ਟਾਪੂ)", + "en_VI": "ਅੰਗਰੇਜ਼ੀ (ਯੂ à¨à©±à¨¸ ਵਰਜਿਨ ਟਾਪੂ)", + "en_VU": "ਅੰਗਰੇਜ਼ੀ (ਵਾਨੂਆਟੂ)", + "en_WS": "ਅੰਗਰੇਜ਼ੀ (ਸਾਮੋਆ)", + "en_ZA": "ਅੰਗਰੇਜ਼ੀ (ਦੱਖਣ ਅਫਰੀਕਾ)", + "en_ZM": "ਅੰਗਰੇਜ਼ੀ (ਜ਼ਾਮਬੀਆ)", + "en_ZW": "ਅੰਗਰੇਜ਼ੀ (ਜ਼ਿੰਬਾਬਵੇ)", + "eo": "ਇਸਪੇਰਾਂਟੋ", + "es": "ਸਪੇਨੀ", + "es_AR": "ਸਪੇਨੀ (ਅਰਜਨਟੀਨਾ)", + "es_BO": "ਸਪੇਨੀ (ਬੋਲੀਵੀਆ)", + "es_BR": "ਸਪੇਨੀ (ਬà©à¨°à¨¾à¨œà¨¼à©€à¨²)", + "es_CL": "ਸਪੇਨੀ (ਚਿਲੀ)", + "es_CO": "ਸਪੇਨੀ (ਕੋਲੰਬੀਆ)", + "es_CR": "ਸਪੇਨੀ (ਕੋਸਟਾ ਰੀਕਾ)", + "es_CU": "ਸਪੇਨੀ (ਕਿਊਬਾ)", + "es_DO": "ਸਪੇਨੀ (ਡੋਮੀਨਿਕਾਈ ਗਣਰਾਜ)", + "es_EA": "ਸਪੇਨੀ (ਸਿਓਟਾ ਅਤੇ ਮੇਲਿੱਲਾ)", + "es_EC": "ਸਪੇਨੀ (ਇਕਵੇਡੋਰ)", + "es_ES": "ਸਪੇਨੀ (ਸਪੇਨ)", + "es_GQ": "ਸਪੇਨੀ (ਭੂ-ਖੰਡੀ ਗਿਨੀ)", + "es_GT": "ਸਪੇਨੀ (ਗà©à¨†à¨Ÿà©‡à¨®à¨¾à¨²à¨¾)", + "es_HN": "ਸਪੇਨੀ (ਹੋਂਡà©à¨°à¨¸)", + "es_IC": "ਸਪੇਨੀ (ਕੇਨਾਰੀ ਟਾਪੂ)", + "es_MX": "ਸਪੇਨੀ (ਮੈਕਸੀਕੋ)", + "es_NI": "ਸਪੇਨੀ (ਨਿਕਾਰਾਗà©à¨†)", + "es_PA": "ਸਪੇਨੀ (ਪਨਾਮਾ)", + "es_PE": "ਸਪੇਨੀ (ਪੇਰੂ)", + "es_PH": "ਸਪੇਨੀ (ਫਿਲੀਪੀਨਜ)", + "es_PR": "ਸਪੇਨੀ (ਪਿਊਰਟੋ ਰਿਕੋ)", + "es_PY": "ਸਪੇਨੀ (ਪੈਰਾਗਵੇ)", + "es_SV": "ਸਪੇਨੀ (ਅਲ ਸਲਵਾਡੋਰ)", + "es_US": "ਸਪੇਨੀ (ਸੰਯà©à¨•ਤ ਰਾਜ)", + "es_UY": "ਸਪੇਨੀ (ਉਰੂਗਵੇ)", + "es_VE": "ਸਪੇਨੀ (ਵੇਨੇਜ਼ੂà¨à¨²à¨¾)", + "et": "ਇਸਟੋਨੀਆਈ", + "et_EE": "ਇਸਟੋਨੀਆਈ (ਇਸਟੋਨੀਆ)", + "eu": "ਬਾਸਕ", + "eu_ES": "ਬਾਸਕ (ਸਪੇਨ)", + "fa": "ਫ਼ਾਰਸੀ", + "fa_AF": "ਫ਼ਾਰਸੀ (ਅਫ਼ਗਾਨਿਸਤਾਨ)", + "fa_IR": "ਫ਼ਾਰਸੀ (ਈਰਾਨ)", + "ff": "ਫà©à¨²à¨¾à¨¹", + "ff_CM": "ਫà©à¨²à¨¾à¨¹ (ਕੈਮਰੂਨ)", + "ff_GN": "ਫà©à¨²à¨¾à¨¹ (ਗਿਨੀ)", + "ff_MR": "ਫà©à¨²à¨¾à¨¹ (ਮੋਰਿਟਾਨੀਆ)", + "ff_SN": "ਫà©à¨²à¨¾à¨¹ (ਸੇਨੇਗਲ)", + "fi": "ਫਿਨਿਸ਼", + "fi_FI": "ਫਿਨਿਸ਼ (ਫਿਨਲੈਂਡ)", + "fo": "ਫ਼ੇਰੋਸੇ", + "fo_DK": "ਫ਼ੇਰੋਸੇ (ਡੈਨਮਾਰਕ)", + "fo_FO": "ਫ਼ੇਰੋਸੇ (ਫੈਰੋ ਟਾਪੂ)", + "fr": "ਫਰਾਂਸੀਸੀ", + "fr_BE": "ਫਰਾਂਸੀਸੀ (ਬੈਲਜੀਅਮ)", + "fr_BF": "ਫਰਾਂਸੀਸੀ (ਬà©à¨°à¨•ੀਨਾ ਫ਼ਾਸੋ)", + "fr_BI": "ਫਰਾਂਸੀਸੀ (ਬà©à¨°à©à©°à¨¡à©€)", + "fr_BJ": "ਫਰਾਂਸੀਸੀ (ਬੇਨਿਨ)", + "fr_BL": "ਫਰਾਂਸੀਸੀ (ਸੇਂਟ ਬਾਰਥੇਲੇਮੀ)", + "fr_CA": "ਫਰਾਂਸੀਸੀ (ਕੈਨੇਡਾ)", + "fr_CD": "ਫਰਾਂਸੀਸੀ (ਕਾਂਗੋ - ਕਿੰਸ਼ਾਸਾ)", + "fr_CF": "ਫਰਾਂਸੀਸੀ (ਕੇਂਦਰੀ ਅਫ਼ਰੀਕੀ ਗਣਰਾਜ)", + "fr_CG": "ਫਰਾਂਸੀਸੀ (ਕਾਂਗੋ - ਬà©à¨°à¨¾à¨œà¨¼à¨¾à¨µà¨¿à¨²à©‡)", + "fr_CH": "ਫਰਾਂਸੀਸੀ (ਸਵਿਟਜ਼ਰਲੈਂਡ)", + "fr_CI": "ਫਰਾਂਸੀਸੀ (ਕੋਟ ਡੀਵੋਆਰ)", + "fr_CM": "ਫਰਾਂਸੀਸੀ (ਕੈਮਰੂਨ)", + "fr_DJ": "ਫਰਾਂਸੀਸੀ (ਜ਼ੀਬੂਤੀ)", + "fr_DZ": "ਫਰਾਂਸੀਸੀ (ਅਲਜੀਰੀਆ)", + "fr_FR": "ਫਰਾਂਸੀਸੀ (ਫ਼ਰਾਂਸ)", + "fr_GA": "ਫਰਾਂਸੀਸੀ (ਗਬੋਨ)", + "fr_GF": "ਫਰਾਂਸੀਸੀ (ਫਰੈਂਚ ਗà©à¨‡à¨†à¨¨à¨¾)", + "fr_GN": "ਫਰਾਂਸੀਸੀ (ਗਿਨੀ)", + "fr_GP": "ਫਰਾਂਸੀਸੀ (ਗà©à¨†à¨¡à©‡à¨²à©‹à¨ª)", + "fr_GQ": "ਫਰਾਂਸੀਸੀ (ਭੂ-ਖੰਡੀ ਗਿਨੀ)", + "fr_HT": "ਫਰਾਂਸੀਸੀ (ਹੈਤੀ)", + "fr_KM": "ਫਰਾਂਸੀਸੀ (ਕੋਮੋਰੋਸ)", + "fr_LU": "ਫਰਾਂਸੀਸੀ (ਲਕਜ਼ਮਬਰਗ)", + "fr_MA": "ਫਰਾਂਸੀਸੀ (ਮੋਰੱਕੋ)", + "fr_MC": "ਫਰਾਂਸੀਸੀ (ਮੋਨਾਕੋ)", + "fr_MF": "ਫਰਾਂਸੀਸੀ (ਸੇਂਟ ਮਾਰਟਿਨ)", + "fr_MG": "ਫਰਾਂਸੀਸੀ (ਮੈਡਾਗਾਸਕਰ)", + "fr_ML": "ਫਰਾਂਸੀਸੀ (ਮਾਲੀ)", + "fr_MQ": "ਫਰਾਂਸੀਸੀ (ਮਾਰਟੀਨਿਕ)", + "fr_MR": "ਫਰਾਂਸੀਸੀ (ਮੋਰਿਟਾਨੀਆ)", + "fr_MU": "ਫਰਾਂਸੀਸੀ (ਮੌਰਿਸ਼ਸ)", + "fr_NC": "ਫਰਾਂਸੀਸੀ (ਨਿਊ ਕੈਲੇਡੋਨੀਆ)", + "fr_NE": "ਫਰਾਂਸੀਸੀ (ਨਾਈਜਰ)", + "fr_PF": "ਫਰਾਂਸੀਸੀ (ਫਰੈਂਚ ਪੋਲੀਨੇਸ਼ੀਆ)", + "fr_PM": "ਫਰਾਂਸੀਸੀ (ਸੇਂਟ ਪੀਅਰੇ à¨à¨‚ਡ ਮਿਕੇਲਨ)", + "fr_RE": "ਫਰਾਂਸੀਸੀ (ਰਿਯੂਨੀਅਨ)", + "fr_RW": "ਫਰਾਂਸੀਸੀ (ਰਵਾਂਡਾ)", + "fr_SC": "ਫਰਾਂਸੀਸੀ (ਸੇਸ਼ਲਸ)", + "fr_SN": "ਫਰਾਂਸੀਸੀ (ਸੇਨੇਗਲ)", + "fr_SY": "ਫਰਾਂਸੀਸੀ (ਸੀਰੀਆ)", + "fr_TD": "ਫਰਾਂਸੀਸੀ (ਚਾਡ)", + "fr_TG": "ਫਰਾਂਸੀਸੀ (ਟੋਗੋ)", + "fr_TN": "ਫਰਾਂਸੀਸੀ (ਟਿਊਨੀਸ਼ੀਆ)", + "fr_VU": "ਫਰਾਂਸੀਸੀ (ਵਾਨੂਆਟੂ)", + "fr_WF": "ਫਰਾਂਸੀਸੀ (ਵਾਲਿਸ ਅਤੇ ਫੂਟੂਨਾ)", + "fr_YT": "ਫਰਾਂਸੀਸੀ (ਮਾਯੋਟੀ)", + "fy": "ਪੱਛਮੀ ਫà©à¨°à¨¿à¨¸à©€à¨…ਨ", + "fy_NL": "ਪੱਛਮੀ ਫà©à¨°à¨¿à¨¸à©€à¨…ਨ (ਨੀਦਰਲੈਂਡ)", + "ga": "ਆਇਰਸ਼", + "ga_IE": "ਆਇਰਸ਼ (ਆਇਰਲੈਂਡ)", + "gd": "ਸਕਾਟਿਸ਼ ਗੇਲਿਕ", + "gd_GB": "ਸਕਾਟਿਸ਼ ਗੇਲਿਕ (ਯੂਨਾਈਟਡ ਕਿੰਗਡਮ)", + "gl": "ਗੈਲਿਸ਼ਿਅਨ", + "gl_ES": "ਗੈਲਿਸ਼ਿਅਨ (ਸਪੇਨ)", + "gu": "ਗà©à¨œà¨°à¨¾à¨¤à©€", + "gu_IN": "ਗà©à¨œà¨°à¨¾à¨¤à©€ (ਭਾਰਤ)", + "gv": "ਮੈਂਕਸ", + "gv_IM": "ਮੈਂਕਸ (ਆਇਲ ਆਫ ਮੈਨ)", + "ha": "ਹੌਸਾ", + "ha_GH": "ਹੌਸਾ (ਘਾਨਾ)", + "ha_NE": "ਹੌਸਾ (ਨਾਈਜਰ)", + "ha_NG": "ਹੌਸਾ (ਨਾਈਜੀਰੀਆ)", + "he": "ਹਿਬਰੂ", + "he_IL": "ਹਿਬਰੂ (ਇਜ਼ਰਾਈਲ)", + "hi": "ਹਿੰਦੀ", + "hi_IN": "ਹਿੰਦੀ (ਭਾਰਤ)", + "hr": "ਕà©à¨°à©‹à¨à¨¸à¨¼à¨¿à¨†à¨ˆ", + "hr_BA": "ਕà©à¨°à©‹à¨à¨¸à¨¼à¨¿à¨†à¨ˆ (ਬੋਸਨੀਆ ਅਤੇ ਹਰਜ਼ੇਗੋਵੀਨਾ)", + "hr_HR": "ਕà©à¨°à©‹à¨à¨¸à¨¼à¨¿à¨†à¨ˆ (ਕਰੋà¨à¨¸à¨¼à©€à¨†)", + "hu": "ਹੰਗਰੀਆਈ", + "hu_HU": "ਹੰਗਰੀਆਈ (ਹੰਗਰੀ)", + "hy": "ਅਰਮੀਨੀਆਈ", + "hy_AM": "ਅਰਮੀਨੀਆਈ (ਅਰਮੀਨੀਆ)", + "id": "ਇੰਡੋਨੇਸ਼ੀਆਈ", + "id_ID": "ਇੰਡੋਨੇਸ਼ੀਆਈ (ਇੰਡੋਨੇਸ਼ੀਆ)", + "ig": "ਇਗਬੋ", + "ig_NG": "ਇਗਬੋ (ਨਾਈਜੀਰੀਆ)", + "ii": "ਸਿਚà©à¨†à¨¨ ਯੀ", + "ii_CN": "ਸਿਚà©à¨†à¨¨ ਯੀ (ਚੀਨ)", + "is": "ਆਈਸਲੈਂਡਿਕ", + "is_IS": "ਆਈਸਲੈਂਡਿਕ (ਆਈਸਲੈਂਡ)", + "it": "ਇਤਾਲਵੀ", + "it_CH": "ਇਤਾਲਵੀ (ਸਵਿਟਜ਼ਰਲੈਂਡ)", + "it_IT": "ਇਤਾਲਵੀ (ਇਟਲੀ)", + "it_SM": "ਇਤਾਲਵੀ (ਸੈਨ ਮਰੀਨੋ)", + "ja": "ਜਪਾਨੀ", + "ja_JP": "ਜਪਾਨੀ (ਜਪਾਨ)", + "ka": "ਜਾਰਜੀਆਈ", + "ka_GE": "ਜਾਰਜੀਆਈ (ਜਾਰਜੀਆ)", + "ki": "ਕਿਕੂਯੂ", + "ki_KE": "ਕਿਕੂਯੂ (ਕੀਨੀਆ)", + "kk": "ਕਜ਼ਾਖ਼", + "kk_KZ": "ਕਜ਼ਾਖ਼ (ਕਜ਼ਾਖਸਤਾਨ)", + "kl": "ਕਲਾਅੱਲੀਸà©à¨Ÿ", + "kl_GL": "ਕਲਾਅੱਲੀਸà©à¨Ÿ (ਗà©à¨°à©€à¨¨à¨²à©ˆà¨‚ਡ)", + "km": "ਖਮੇਰ", + "km_KH": "ਖਮੇਰ (ਕੰਬੋਡੀਆ)", + "kn": "ਕੰਨੜ", + "kn_IN": "ਕੰਨੜ (ਭਾਰਤ)", + "ko": "ਕੋਰੀਆਈ", + "ko_KP": "ਕੋਰੀਆਈ (ਉੱਤਰ ਕੋਰੀਆ)", + "ko_KR": "ਕੋਰੀਆਈ (ਦੱਖਣ ਕੋਰੀਆ)", + "ks": "ਕਸ਼ਮੀਰੀ", + "ks_IN": "ਕਸ਼ਮੀਰੀ (ਭਾਰਤ)", + "kw": "ਕੋਰਨਿਸ਼", + "kw_GB": "ਕੋਰਨਿਸ਼ (ਯੂਨਾਈਟਡ ਕਿੰਗਡਮ)", + "ky": "ਕਿਰਗੀਜ਼", + "ky_KG": "ਕਿਰਗੀਜ਼ (ਕਿਰਗਿਜ਼ਸਤਾਨ)", + "lb": "ਲਕਜ਼ਮਬਰਗਿਸ਼", + "lb_LU": "ਲਕਜ਼ਮਬਰਗਿਸ਼ (ਲਕਜ਼ਮਬਰਗ)", + "lg": "ਗਾਂਡਾ", + "lg_UG": "ਗਾਂਡਾ (ਯੂਗਾਂਡਾ)", + "ln": "ਲਿੰਗਾਲਾ", + "ln_AO": "ਲਿੰਗਾਲਾ (ਅੰਗੋਲਾ)", + "ln_CD": "ਲਿੰਗਾਲਾ (ਕਾਂਗੋ - ਕਿੰਸ਼ਾਸਾ)", + "ln_CF": "ਲਿੰਗਾਲਾ (ਕੇਂਦਰੀ ਅਫ਼ਰੀਕੀ ਗਣਰਾਜ)", + "ln_CG": "ਲਿੰਗਾਲਾ (ਕਾਂਗੋ - ਬà©à¨°à¨¾à¨œà¨¼à¨¾à¨µà¨¿à¨²à©‡)", + "lo": "ਲਾਓ", + "lo_LA": "ਲਾਓ (ਲਾਓਸ)", + "lt": "ਲਿਥà©à¨†à¨¨à©€à¨…ਨ", + "lt_LT": "ਲਿਥà©à¨†à¨¨à©€à¨…ਨ (ਲਿਥà©à¨†à¨¨à©€à¨†)", + "lu": "ਲੂਬਾ-ਕਾਟਾਂਗਾ", + "lu_CD": "ਲੂਬਾ-ਕਾਟਾਂਗਾ (ਕਾਂਗੋ - ਕਿੰਸ਼ਾਸਾ)", + "lv": "ਲਾਤੀਵੀ", + "lv_LV": "ਲਾਤੀਵੀ (ਲਾਤਵੀਆ)", + "mg": "ਮੇਲੇਗਸੀ", + "mg_MG": "ਮੇਲੇਗਸੀ (ਮੈਡਾਗਾਸਕਰ)", + "mk": "ਮੈਕਡੋਨੀਆਈ", + "mk_MK": "ਮੈਕਡੋਨੀਆਈ (ਮੈਕਡੋਨੀਆ)", + "ml": "ਮਲਿਆਲਮ", + "ml_IN": "ਮਲਿਆਲਮ (ਭਾਰਤ)", + "mn": "ਮੰਗੋਲੀ", + "mn_MN": "ਮੰਗੋਲੀ (ਮੰਗੋਲੀਆ)", + "mr": "ਮਰਾਠੀ", + "mr_IN": "ਮਰਾਠੀ (ਭਾਰਤ)", + "ms": "ਮਲਯ", + "ms_BN": "ਮਲਯ (ਬਰੂਨੇਈ)", + "ms_MY": "ਮਲਯ (ਮਲੇਸ਼ੀਆ)", + "ms_SG": "ਮਲਯ (ਸਿੰਗਾਪà©à¨°)", + "mt": "ਮਾਲਟੀਜ਼", + "mt_MT": "ਮਾਲਟੀਜ਼ (ਮਾਲਟਾ)", + "my": "ਬਰਮੀ", + "my_MM": "ਬਰਮੀ (ਮਿਆਂਮਾਰ (ਬਰਮਾ))", + "nb": "ਨਾਰਵੇਜਿਆਈ ਬੋਕਮਲ", + "nb_NO": "ਨਾਰਵੇਜਿਆਈ ਬੋਕਮਲ (ਨਾਰਵੇ)", + "nb_SJ": "ਨਾਰਵੇਜਿਆਈ ਬੋਕਮਲ (ਸਵਾਲਬਰਡ ਅਤੇ ਜਾਨ ਮਾਯੇਨ)", + "nd": "ਉੱਤਰੀ ਨਡੇਬੇਲੇ", + "nd_ZW": "ਉੱਤਰੀ ਨਡੇਬੇਲੇ (ਜ਼ਿੰਬਾਬਵੇ)", + "ne": "ਨੇਪਾਲੀ", + "ne_IN": "ਨੇਪਾਲੀ (ਭਾਰਤ)", + "ne_NP": "ਨੇਪਾਲੀ (ਨੇਪਾਲ)", + "nl": "ਡੱਚ", + "nl_AW": "ਡੱਚ (ਅਰੂਬਾ)", + "nl_BE": "ਡੱਚ (ਬੈਲਜੀਅਮ)", + "nl_BQ": "ਡੱਚ (ਕੈਰੇਬੀਆਈ ਨੀਦਰਲੈਂਡ)", + "nl_CW": "ਡੱਚ (ਕà©à¨°à¨¾à¨•ਾਓ)", + "nl_NL": "ਡੱਚ (ਨੀਦਰਲੈਂਡ)", + "nl_SR": "ਡੱਚ (ਸੂਰੀਨਾਮ)", + "nl_SX": "ਡੱਚ (ਸਿੰਟ ਮਾਰਟੀਨ)", + "nn": "ਨਾਰਵੇਜਿਆਈ ਨਿਓਨੌਰਸਕ", + "nn_NO": "ਨਾਰਵੇਜਿਆਈ ਨਿਓਨੌਰਸਕ (ਨਾਰਵੇ)", + "no": "ਨਾਰਵੇਜਿਆਈ", + "no_NO": "ਨਾਰਵੇਜਿਆਈ (ਨਾਰਵੇ)", + "om": "ਓਰੋਮੋ", + "om_ET": "ਓਰੋਮੋ (ਇਥੋਪੀਆ)", + "om_KE": "ਓਰੋਮੋ (ਕੀਨੀਆ)", + "or": "ਉੜੀਆ", + "or_IN": "ਉੜੀਆ (ਭਾਰਤ)", + "os": "ਓਸੈਟਿਕ", + "os_GE": "ਓਸੈਟਿਕ (ਜਾਰਜੀਆ)", + "os_RU": "ਓਸੈਟਿਕ (ਰੂਸ)", + "pa": "ਪੰਜਾਬੀ", + "pa_Arab": "ਪੰਜਾਬੀ (ਅਰਬੀ)", + "pa_Arab_PK": "ਪੰਜਾਬੀ (ਅਰਬੀ, ਪਾਕਿਸਤਾਨ)", + "pa_Guru": "ਪੰਜਾਬੀ (ਗà©à¨°à¨®à©à¨–à©€)", + "pa_Guru_IN": "ਪੰਜਾਬੀ (ਗà©à¨°à¨®à©à¨–à©€, ਭਾਰਤ)", + "pa_IN": "ਪੰਜਾਬੀ (ਭਾਰਤ)", + "pa_PK": "ਪੰਜਾਬੀ (ਪਾਕਿਸਤਾਨ)", + "pl": "ਪੋਲੈਂਡੀ", + "pl_PL": "ਪੋਲੈਂਡੀ (ਪੋਲੈਂਡ)", + "ps": "ਪਸ਼ਤੋ", + "ps_AF": "ਪਸ਼ਤੋ (ਅਫ਼ਗਾਨਿਸਤਾਨ)", + "pt": "ਪà©à¨°à¨¤à¨—ਾਲੀ", + "pt_AO": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਅੰਗੋਲਾ)", + "pt_BR": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਬà©à¨°à¨¾à¨œà¨¼à©€à¨²)", + "pt_CH": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਸਵਿਟਜ਼ਰਲੈਂਡ)", + "pt_CV": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਕੇਪ ਵਰਡੇ)", + "pt_GQ": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਭੂ-ਖੰਡੀ ਗਿਨੀ)", + "pt_GW": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਗਿਨੀ-ਬਿਸਾਉ)", + "pt_LU": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਲਕਜ਼ਮਬਰਗ)", + "pt_MO": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਮਕਾਉ à¨à¨¸à¨à¨†à¨° ਚੀਨ)", + "pt_MZ": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਮੋਜ਼ਾਮਬੀਕ)", + "pt_PT": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਪà©à¨°à¨¤à¨—ਾਲ)", + "pt_ST": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਸਾਓ ਟੋਮ ਅਤੇ ਪà©à¨°à¨¿à©°à¨¸à©€à¨ªà©‡)", + "pt_TL": "ਪà©à¨°à¨¤à¨—ਾਲੀ (ਤਿਮੋਰ-ਲੇਸਤੇ)", + "qu": "ਕਕੇਸ਼à©à¨†", + "qu_BO": "ਕਕੇਸ਼à©à¨† (ਬੋਲੀਵੀਆ)", + "qu_EC": "ਕਕੇਸ਼à©à¨† (ਇਕਵੇਡੋਰ)", + "qu_PE": "ਕਕੇਸ਼à©à¨† (ਪੇਰੂ)", + "rm": "ਰੋਮਾਂਸ਼", + "rm_CH": "ਰੋਮਾਂਸ਼ (ਸਵਿਟਜ਼ਰਲੈਂਡ)", + "rn": "ਰà©à©°à¨¡à©€", + "rn_BI": "ਰà©à©°à¨¡à©€ (ਬà©à¨°à©à©°à¨¡à©€)", + "ro": "ਰੋਮਾਨੀਆਈ", + "ro_MD": "ਰੋਮਾਨੀਆਈ (ਮੋਲਡੋਵਾ)", + "ro_RO": "ਰੋਮਾਨੀਆਈ (ਰੋਮਾਨੀਆ)", + "ru": "ਰੂਸੀ", + "ru_BY": "ਰੂਸੀ (ਬੇਲਾਰੂਸ)", + "ru_KG": "ਰੂਸੀ (ਕਿਰਗਿਜ਼ਸਤਾਨ)", + "ru_KZ": "ਰੂਸੀ (ਕਜ਼ਾਖਸਤਾਨ)", + "ru_MD": "ਰੂਸੀ (ਮੋਲਡੋਵਾ)", + "ru_RU": "ਰੂਸੀ (ਰੂਸ)", + "ru_UA": "ਰੂਸੀ (ਯੂਕਰੇਨ)", + "rw": "ਕਿਨਿਆਰਵਾਂਡਾ", + "rw_RW": "ਕਿਨਿਆਰਵਾਂਡਾ (ਰਵਾਂਡਾ)", + "se": "ਉੱਤਰੀ ਸਾਮੀ", + "se_FI": "ਉੱਤਰੀ ਸਾਮੀ (ਫਿਨਲੈਂਡ)", + "se_NO": "ਉੱਤਰੀ ਸਾਮੀ (ਨਾਰਵੇ)", + "se_SE": "ਉੱਤਰੀ ਸਾਮੀ (ਸਵੀਡਨ)", + "sg": "ਸਾਂਗੋ", + "sg_CF": "ਸਾਂਗੋ (ਕੇਂਦਰੀ ਅਫ਼ਰੀਕੀ ਗਣਰਾਜ)", + "si": "ਸਿੰਹਾਲਾ", + "si_LK": "ਸਿੰਹਾਲਾ (ਸà©à¨°à©€ ਲੰਕਾ)", + "sk": "ਸਲੋਵਾਕ", + "sk_SK": "ਸਲੋਵਾਕ (ਸਲੋਵਾਕੀਆ)", + "sl": "ਸਲੋਵੇਨੀਆਈ", + "sl_SI": "ਸਲੋਵੇਨੀਆਈ (ਸਲੋਵੇਨੀਆ)", + "sn": "ਸ਼ੋਨਾ", + "sn_ZW": "ਸ਼ੋਨਾ (ਜ਼ਿੰਬਾਬਵੇ)", + "so": "ਸੋਮਾਲੀ", + "so_DJ": "ਸੋਮਾਲੀ (ਜ਼ੀਬੂਤੀ)", + "so_ET": "ਸੋਮਾਲੀ (ਇਥੋਪੀਆ)", + "so_KE": "ਸੋਮਾਲੀ (ਕੀਨੀਆ)", + "so_SO": "ਸੋਮਾਲੀ (ਸੋਮਾਲੀਆ)", + "sq": "ਅਲਬਾਨੀਆਈ", + "sq_AL": "ਅਲਬਾਨੀਆਈ (ਅਲਬਾਨੀਆ)", + "sq_MK": "ਅਲਬਾਨੀਆਈ (ਮੈਕਡੋਨੀਆ)", + "sq_XK": "ਅਲਬਾਨੀਆਈ (ਕੋਸੋਵੋ)", + "sr": "ਸਰਬੀਆਈ", + "sr_BA": "ਸਰਬੀਆਈ (ਬੋਸਨੀਆ ਅਤੇ ਹਰਜ਼ੇਗੋਵੀਨਾ)", + "sr_Cyrl": "ਸਰਬੀਆਈ (ਸਿਰੀਲਿਕ)", + "sr_Cyrl_BA": "ਸਰਬੀਆਈ (ਸਿਰੀਲਿਕ, ਬੋਸਨੀਆ ਅਤੇ ਹਰਜ਼ੇਗੋਵੀਨਾ)", + "sr_Cyrl_ME": "ਸਰਬੀਆਈ (ਸਿਰੀਲਿਕ, ਮੋਂਟੇਨੇਗਰੋ)", + "sr_Cyrl_RS": "ਸਰਬੀਆਈ (ਸਿਰੀਲਿਕ, ਸਰਬੀਆ)", + "sr_Cyrl_XK": "ਸਰਬੀਆਈ (ਸਿਰੀਲਿਕ, ਕੋਸੋਵੋ)", + "sr_Latn": "ਸਰਬੀਆਈ (ਲਾਤੀਨੀ)", + "sr_Latn_BA": "ਸਰਬੀਆਈ (ਲਾਤੀਨੀ, ਬੋਸਨੀਆ ਅਤੇ ਹਰਜ਼ੇਗੋਵੀਨਾ)", + "sr_Latn_ME": "ਸਰਬੀਆਈ (ਲਾਤੀਨੀ, ਮੋਂਟੇਨੇਗਰੋ)", + "sr_Latn_RS": "ਸਰਬੀਆਈ (ਲਾਤੀਨੀ, ਸਰਬੀਆ)", + "sr_Latn_XK": "ਸਰਬੀਆਈ (ਲਾਤੀਨੀ, ਕੋਸੋਵੋ)", + "sr_ME": "ਸਰਬੀਆਈ (ਮੋਂਟੇਨੇਗਰੋ)", + "sr_RS": "ਸਰਬੀਆਈ (ਸਰਬੀਆ)", + "sr_XK": "ਸਰਬੀਆਈ (ਕੋਸੋਵੋ)", + "sv": "ਸਵੀਡਿਸ਼", + "sv_AX": "ਸਵੀਡਿਸ਼ (ਅਲੈਂਡ ਟਾਪੂ)", + "sv_FI": "ਸਵੀਡਿਸ਼ (ਫਿਨਲੈਂਡ)", + "sv_SE": "ਸਵੀਡਿਸ਼ (ਸਵੀਡਨ)", + "sw": "ਸਵਾਹਿਲੀ", + "sw_CD": "ਸਵਾਹਿਲੀ (ਕਾਂਗੋ - ਕਿੰਸ਼ਾਸਾ)", + "sw_KE": "ਸਵਾਹਿਲੀ (ਕੀਨੀਆ)", + "sw_TZ": "ਸਵਾਹਿਲੀ (ਤਨਜ਼ਾਨੀਆ)", + "sw_UG": "ਸਵਾਹਿਲੀ (ਯੂਗਾਂਡਾ)", + "ta": "ਤਮਿਲ", + "ta_IN": "ਤਮਿਲ (ਭਾਰਤ)", + "ta_LK": "ਤਮਿਲ (ਸà©à¨°à©€ ਲੰਕਾ)", + "ta_MY": "ਤਮਿਲ (ਮਲੇਸ਼ੀਆ)", + "ta_SG": "ਤਮਿਲ (ਸਿੰਗਾਪà©à¨°)", + "te": "ਤੇਲਗੂ", + "te_IN": "ਤੇਲਗੂ (ਭਾਰਤ)", + "th": "ਥਾਈ", + "th_TH": "ਥਾਈ (ਥਾਈਲੈਂਡ)", + "ti": "ਤਿਗà©à¨°à©€à¨¨à¨¿à¨†", + "ti_ER": "ਤਿਗà©à¨°à©€à¨¨à¨¿à¨† (ਇਰੀਟà©à¨°à¨¿à¨†)", + "ti_ET": "ਤਿਗà©à¨°à©€à¨¨à¨¿à¨† (ਇਥੋਪੀਆ)", + "to": "ਟੌਂਗਨ", + "to_TO": "ਟੌਂਗਨ (ਟੌਂਗਾ)", + "tr": "ਤà©à¨°à¨•à©€", + "tr_CY": "ਤà©à¨°à¨•à©€ (ਸਾਇਪà©à¨°à¨¸)", + "tr_TR": "ਤà©à¨°à¨•à©€ (ਤà©à¨°à¨•à©€)", + "ug": "ਉਇਗà©à¨°", + "ug_CN": "ਉਇਗà©à¨° (ਚੀਨ)", + "uk": "ਯੂਕਰੇਨੀਆਈ", + "uk_UA": "ਯੂਕਰੇਨੀਆਈ (ਯੂਕਰੇਨ)", + "ur": "ਉੜਦੂ", + "ur_IN": "ਉੜਦੂ (ਭਾਰਤ)", + "ur_PK": "ਉੜਦੂ (ਪਾਕਿਸਤਾਨ)", + "uz": "ਉਜ਼ਬੇਕ", + "uz_AF": "ਉਜ਼ਬੇਕ (ਅਫ਼ਗਾਨਿਸਤਾਨ)", + "uz_Arab": "ਉਜ਼ਬੇਕ (ਅਰਬੀ)", + "uz_Arab_AF": "ਉਜ਼ਬੇਕ (ਅਰਬੀ, ਅਫ਼ਗਾਨਿਸਤਾਨ)", + "uz_Cyrl": "ਉਜ਼ਬੇਕ (ਸਿਰੀਲਿਕ)", + "uz_Cyrl_UZ": "ਉਜ਼ਬੇਕ (ਸਿਰੀਲਿਕ, ਉਜ਼ਬੇਕਿਸਤਾਨ)", + "uz_Latn": "ਉਜ਼ਬੇਕ (ਲਾਤੀਨੀ)", + "uz_Latn_UZ": "ਉਜ਼ਬੇਕ (ਲਾਤੀਨੀ, ਉਜ਼ਬੇਕਿਸਤਾਨ)", + "uz_UZ": "ਉਜ਼ਬੇਕ (ਉਜ਼ਬੇਕਿਸਤਾਨ)", + "vi": "ਵੀਅਤਨਾਮੀ", + "vi_VN": "ਵੀਅਤਨਾਮੀ (ਵੀਅਤਨਾਮ)", + "yi": "ਯਿਦਿਸ਼", + "yo": "ਯੋਰੂਬਾ", + "yo_BJ": "ਯੋਰੂਬਾ (ਬੇਨਿਨ)", + "yo_NG": "ਯੋਰੂਬਾ (ਨਾਈਜੀਰੀਆ)", + "zh": "ਚੀਨੀ (ਮੈਂਡਰਿਨ)", + "zh_CN": "ਚੀਨੀ (ਚੀਨ)", + "zh_HK": "ਚੀਨੀ (ਹਾਂਗ ਕਾਂਗ à¨à¨¸à¨à¨†à¨° ਚੀਨ)", + "zh_Hans": "ਚੀਨੀ (ਸਰਲ)", + "zh_Hans_CN": "ਚੀਨੀ (ਸਰਲ, ਚੀਨ)", + "zh_Hans_HK": "ਚੀਨੀ (ਸਰਲ, ਹਾਂਗ ਕਾਂਗ à¨à¨¸à¨à¨†à¨° ਚੀਨ)", + "zh_Hans_MO": "ਚੀਨੀ (ਸਰਲ, ਮਕਾਉ à¨à¨¸à¨à¨†à¨° ਚੀਨ)", + "zh_Hans_SG": "ਚੀਨੀ (ਸਰਲ, ਸਿੰਗਾਪà©à¨°)", + "zh_Hant": "ਚੀਨੀ (ਰਵਾਇਤੀ)", + "zh_Hant_HK": "ਚੀਨੀ (ਰਵਾਇਤੀ, ਹਾਂਗ ਕਾਂਗ à¨à¨¸à¨à¨†à¨° ਚੀਨ)", + "zh_Hant_MO": "ਚੀਨੀ (ਰਵਾਇਤੀ, ਮਕਾਉ à¨à¨¸à¨à¨†à¨° ਚੀਨ)", + "zh_Hant_TW": "ਚੀਨੀ (ਰਵਾਇਤੀ, ਤਾਇਵਾਨ)", + "zh_MO": "ਚੀਨੀ (ਮਕਾਉ à¨à¨¸à¨à¨†à¨° ਚੀਨ)", + "zh_SG": "ਚੀਨੀ (ਸਿੰਗਾਪà©à¨°)", + "zh_TW": "ਚੀਨੀ (ਤਾਇਵਾਨ)", + "zu": "ਜ਼à©à¨²à©‚", + "zu_ZA": "ਜ਼à©à¨²à©‚ (ਦੱਖਣ ਅਫਰੀਕਾ)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pa_Arab.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pa_Arab.json new file mode 100644 index 0000000000000000000000000000000000000000..bea27624f1d03b36051a73e81804f39c5458ef64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pa_Arab.json @@ -0,0 +1,15 @@ +{ + "Names": { + "en_PK": "ਅੰਗਰੇਜ਼ੀ (پاکستان)", + "pa": "پنجابی", + "pa_Arab": "پنجابی (عربی)", + "pa_Arab_PK": "پنجابی (عربی, پاکستان)", + "pa_Guru": "پنجابی (Ú¯ÙØ±Ù…ÙÚ©Ú¾ÛŒ)", + "pa_Guru_IN": "پنجابی (Ú¯ÙØ±Ù…ÙÚ©Ú¾ÛŒ, ਭਾਰਤ)", + "pa_IN": "پنجابی (ਭਾਰਤ)", + "pa_PK": "پنجابی (پاکستان)", + "ur_PK": "ਉੜਦੂ (پاکستان)", + "uz_Arab": "ਉਜ਼ਬੇਕ (عربی)", + "uz_Arab_AF": "ਉਜ਼ਬੇਕ (عربی, ਅਫ਼ਗਾਨਿਸਤਾਨ)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pa_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pa_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..998c720f45b88141ac045863a5eaca02144126b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pa_IN.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "pa_Guru_IN" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pa_PK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pa_PK.json new file mode 100644 index 0000000000000000000000000000000000000000..d6a1a0784c033609d3762e42fb730d088f1c0027 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pa_PK.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "pa_Arab_PK" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pl.json new file mode 100644 index 0000000000000000000000000000000000000000..2b2772ce556195cddbb177fbda347498a372e3d7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pl.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibia)", + "af_ZA": "afrikaans (Republika PoÅ‚udniowej Afryki)", + "ak": "akan", + "ak_GH": "akan (Ghana)", + "am": "amharski", + "am_ET": "amharski (Etiopia)", + "ar": "arabski", + "ar_AE": "arabski (Zjednoczone Emiraty Arabskie)", + "ar_BH": "arabski (Bahrajn)", + "ar_DJ": "arabski (Dżibuti)", + "ar_DZ": "arabski (Algieria)", + "ar_EG": "arabski (Egipt)", + "ar_EH": "arabski (Sahara Zachodnia)", + "ar_ER": "arabski (Erytrea)", + "ar_IL": "arabski (Izrael)", + "ar_IQ": "arabski (Irak)", + "ar_JO": "arabski (Jordania)", + "ar_KM": "arabski (Komory)", + "ar_KW": "arabski (Kuwejt)", + "ar_LB": "arabski (Liban)", + "ar_LY": "arabski (Libia)", + "ar_MA": "arabski (Maroko)", + "ar_MR": "arabski (Mauretania)", + "ar_OM": "arabski (Oman)", + "ar_PS": "arabski (Terytoria PalestyÅ„skie)", + "ar_QA": "arabski (Katar)", + "ar_SA": "arabski (Arabia Saudyjska)", + "ar_SD": "arabski (Sudan)", + "ar_SO": "arabski (Somalia)", + "ar_SS": "arabski (Sudan PoÅ‚udniowy)", + "ar_SY": "arabski (Syria)", + "ar_TD": "arabski (Czad)", + "ar_TN": "arabski (Tunezja)", + "ar_YE": "arabski (Jemen)", + "as": "asamski", + "as_IN": "asamski (Indie)", + "az": "azerbejdżaÅ„ski", + "az_AZ": "azerbejdżaÅ„ski (Azerbejdżan)", + "az_Cyrl": "azerbejdżaÅ„ski (cyrylica)", + "az_Cyrl_AZ": "azerbejdżaÅ„ski (cyrylica, Azerbejdżan)", + "az_Latn": "azerbejdżaÅ„ski (Å‚aciÅ„skie)", + "az_Latn_AZ": "azerbejdżaÅ„ski (Å‚aciÅ„skie, Azerbejdżan)", + "be": "biaÅ‚oruski", + "be_BY": "biaÅ‚oruski (BiaÅ‚oruÅ›)", + "bg": "buÅ‚garski", + "bg_BG": "buÅ‚garski (BuÅ‚garia)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengalski", + "bn_BD": "bengalski (Bangladesz)", + "bn_IN": "bengalski (Indie)", + "bo": "tybetaÅ„ski", + "bo_CN": "tybetaÅ„ski (Chiny)", + "bo_IN": "tybetaÅ„ski (Indie)", + "br": "bretoÅ„ski", + "br_FR": "bretoÅ„ski (Francja)", + "bs": "boÅ›niacki", + "bs_BA": "boÅ›niacki (BoÅ›nia i Hercegowina)", + "bs_Cyrl": "boÅ›niacki (cyrylica)", + "bs_Cyrl_BA": "boÅ›niacki (cyrylica, BoÅ›nia i Hercegowina)", + "bs_Latn": "boÅ›niacki (Å‚aciÅ„skie)", + "bs_Latn_BA": "boÅ›niacki (Å‚aciÅ„skie, BoÅ›nia i Hercegowina)", + "ca": "kataloÅ„ski", + "ca_AD": "kataloÅ„ski (Andora)", + "ca_ES": "kataloÅ„ski (Hiszpania)", + "ca_FR": "kataloÅ„ski (Francja)", + "ca_IT": "kataloÅ„ski (WÅ‚ochy)", + "ce": "czeczeÅ„ski", + "ce_RU": "czeczeÅ„ski (Rosja)", + "cs": "czeski", + "cs_CZ": "czeski (Czechy)", + "cy": "walijski", + "cy_GB": "walijski (Wielka Brytania)", + "da": "duÅ„ski", + "da_DK": "duÅ„ski (Dania)", + "da_GL": "duÅ„ski (Grenlandia)", + "de": "niemiecki", + "de_AT": "niemiecki (Austria)", + "de_BE": "niemiecki (Belgia)", + "de_CH": "niemiecki (Szwajcaria)", + "de_DE": "niemiecki (Niemcy)", + "de_IT": "niemiecki (WÅ‚ochy)", + "de_LI": "niemiecki (Liechtenstein)", + "de_LU": "niemiecki (Luksemburg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhutan)", + "ee": "ewe", + "ee_GH": "ewe (Ghana)", + "ee_TG": "ewe (Togo)", + "el": "grecki", + "el_CY": "grecki (Cypr)", + "el_GR": "grecki (Grecja)", + "en": "angielski", + "en_AG": "angielski (Antigua i Barbuda)", + "en_AI": "angielski (Anguilla)", + "en_AS": "angielski (Samoa AmerykaÅ„skie)", + "en_AT": "angielski (Austria)", + "en_AU": "angielski (Australia)", + "en_BB": "angielski (Barbados)", + "en_BE": "angielski (Belgia)", + "en_BI": "angielski (Burundi)", + "en_BM": "angielski (Bermudy)", + "en_BS": "angielski (Bahamy)", + "en_BW": "angielski (Botswana)", + "en_BZ": "angielski (Belize)", + "en_CA": "angielski (Kanada)", + "en_CC": "angielski (Wyspy Kokosowe)", + "en_CH": "angielski (Szwajcaria)", + "en_CK": "angielski (Wyspy Cooka)", + "en_CM": "angielski (Kamerun)", + "en_CX": "angielski (Wyspa Bożego Narodzenia)", + "en_CY": "angielski (Cypr)", + "en_DE": "angielski (Niemcy)", + "en_DG": "angielski (Diego Garcia)", + "en_DK": "angielski (Dania)", + "en_DM": "angielski (Dominika)", + "en_ER": "angielski (Erytrea)", + "en_FI": "angielski (Finlandia)", + "en_FJ": "angielski (Fidżi)", + "en_FK": "angielski (Falklandy)", + "en_FM": "angielski (Mikronezja)", + "en_GB": "angielski (Wielka Brytania)", + "en_GD": "angielski (Grenada)", + "en_GG": "angielski (Guernsey)", + "en_GH": "angielski (Ghana)", + "en_GI": "angielski (Gibraltar)", + "en_GM": "angielski (Gambia)", + "en_GU": "angielski (Guam)", + "en_GY": "angielski (Gujana)", + "en_HK": "angielski (SRA Hongkong (Chiny))", + "en_IE": "angielski (Irlandia)", + "en_IL": "angielski (Izrael)", + "en_IM": "angielski (Wyspa Man)", + "en_IN": "angielski (Indie)", + "en_IO": "angielski (Brytyjskie Terytorium Oceanu Indyjskiego)", + "en_JE": "angielski (Jersey)", + "en_JM": "angielski (Jamajka)", + "en_KE": "angielski (Kenia)", + "en_KI": "angielski (Kiribati)", + "en_KN": "angielski (Saint Kitts i Nevis)", + "en_KY": "angielski (Kajmany)", + "en_LC": "angielski (Saint Lucia)", + "en_LR": "angielski (Liberia)", + "en_LS": "angielski (Lesotho)", + "en_MG": "angielski (Madagaskar)", + "en_MH": "angielski (Wyspy Marshalla)", + "en_MO": "angielski (SRA Makau (Chiny))", + "en_MP": "angielski (Mariany Północne)", + "en_MS": "angielski (Montserrat)", + "en_MT": "angielski (Malta)", + "en_MU": "angielski (Mauritius)", + "en_MW": "angielski (Malawi)", + "en_MY": "angielski (Malezja)", + "en_NA": "angielski (Namibia)", + "en_NF": "angielski (Norfolk)", + "en_NG": "angielski (Nigeria)", + "en_NL": "angielski (Holandia)", + "en_NR": "angielski (Nauru)", + "en_NU": "angielski (Niue)", + "en_NZ": "angielski (Nowa Zelandia)", + "en_PG": "angielski (Papua-Nowa Gwinea)", + "en_PH": "angielski (Filipiny)", + "en_PK": "angielski (Pakistan)", + "en_PN": "angielski (Pitcairn)", + "en_PR": "angielski (Portoryko)", + "en_PW": "angielski (Palau)", + "en_RW": "angielski (Rwanda)", + "en_SB": "angielski (Wyspy Salomona)", + "en_SC": "angielski (Seszele)", + "en_SD": "angielski (Sudan)", + "en_SE": "angielski (Szwecja)", + "en_SG": "angielski (Singapur)", + "en_SH": "angielski (Wyspa ÅšwiÄ™tej Heleny)", + "en_SI": "angielski (SÅ‚owenia)", + "en_SL": "angielski (Sierra Leone)", + "en_SS": "angielski (Sudan PoÅ‚udniowy)", + "en_SX": "angielski (Sint Maarten)", + "en_SZ": "angielski (Suazi)", + "en_TC": "angielski (Turks i Caicos)", + "en_TK": "angielski (Tokelau)", + "en_TO": "angielski (Tonga)", + "en_TT": "angielski (Trynidad i Tobago)", + "en_TV": "angielski (Tuvalu)", + "en_TZ": "angielski (Tanzania)", + "en_UG": "angielski (Uganda)", + "en_UM": "angielski (Dalekie Wyspy Mniejsze Stanów Zjednoczonych)", + "en_US": "angielski (Stany Zjednoczone)", + "en_VC": "angielski (Saint Vincent i Grenadyny)", + "en_VG": "angielski (Brytyjskie Wyspy Dziewicze)", + "en_VI": "angielski (Wyspy Dziewicze Stanów Zjednoczonych)", + "en_VU": "angielski (Vanuatu)", + "en_WS": "angielski (Samoa)", + "en_ZA": "angielski (Republika PoÅ‚udniowej Afryki)", + "en_ZM": "angielski (Zambia)", + "en_ZW": "angielski (Zimbabwe)", + "eo": "esperanto", + "es": "hiszpaÅ„ski", + "es_AR": "hiszpaÅ„ski (Argentyna)", + "es_BO": "hiszpaÅ„ski (Boliwia)", + "es_BR": "hiszpaÅ„ski (Brazylia)", + "es_CL": "hiszpaÅ„ski (Chile)", + "es_CO": "hiszpaÅ„ski (Kolumbia)", + "es_CR": "hiszpaÅ„ski (Kostaryka)", + "es_CU": "hiszpaÅ„ski (Kuba)", + "es_DO": "hiszpaÅ„ski (Dominikana)", + "es_EA": "hiszpaÅ„ski (Ceuta i Melilla)", + "es_EC": "hiszpaÅ„ski (Ekwador)", + "es_ES": "hiszpaÅ„ski (Hiszpania)", + "es_GQ": "hiszpaÅ„ski (Gwinea Równikowa)", + "es_GT": "hiszpaÅ„ski (Gwatemala)", + "es_HN": "hiszpaÅ„ski (Honduras)", + "es_IC": "hiszpaÅ„ski (Wyspy Kanaryjskie)", + "es_MX": "hiszpaÅ„ski (Meksyk)", + "es_NI": "hiszpaÅ„ski (Nikaragua)", + "es_PA": "hiszpaÅ„ski (Panama)", + "es_PE": "hiszpaÅ„ski (Peru)", + "es_PH": "hiszpaÅ„ski (Filipiny)", + "es_PR": "hiszpaÅ„ski (Portoryko)", + "es_PY": "hiszpaÅ„ski (Paragwaj)", + "es_SV": "hiszpaÅ„ski (Salwador)", + "es_US": "hiszpaÅ„ski (Stany Zjednoczone)", + "es_UY": "hiszpaÅ„ski (Urugwaj)", + "es_VE": "hiszpaÅ„ski (Wenezuela)", + "et": "estoÅ„ski", + "et_EE": "estoÅ„ski (Estonia)", + "eu": "baskijski", + "eu_ES": "baskijski (Hiszpania)", + "fa": "perski", + "fa_AF": "perski (Afganistan)", + "fa_IR": "perski (Iran)", + "ff": "fulani", + "ff_CM": "fulani (Kamerun)", + "ff_GN": "fulani (Gwinea)", + "ff_MR": "fulani (Mauretania)", + "ff_SN": "fulani (Senegal)", + "fi": "fiÅ„ski", + "fi_FI": "fiÅ„ski (Finlandia)", + "fo": "farerski", + "fo_DK": "farerski (Dania)", + "fo_FO": "farerski (Wyspy Owcze)", + "fr": "francuski", + "fr_BE": "francuski (Belgia)", + "fr_BF": "francuski (Burkina Faso)", + "fr_BI": "francuski (Burundi)", + "fr_BJ": "francuski (Benin)", + "fr_BL": "francuski (Saint-Barthélemy)", + "fr_CA": "francuski (Kanada)", + "fr_CD": "francuski (Demokratyczna Republika Konga)", + "fr_CF": "francuski (Republika ÅšrodkowoafrykaÅ„ska)", + "fr_CG": "francuski (Kongo)", + "fr_CH": "francuski (Szwajcaria)", + "fr_CI": "francuski (Côte d’Ivoire)", + "fr_CM": "francuski (Kamerun)", + "fr_DJ": "francuski (Dżibuti)", + "fr_DZ": "francuski (Algieria)", + "fr_FR": "francuski (Francja)", + "fr_GA": "francuski (Gabon)", + "fr_GF": "francuski (Gujana Francuska)", + "fr_GN": "francuski (Gwinea)", + "fr_GP": "francuski (Gwadelupa)", + "fr_GQ": "francuski (Gwinea Równikowa)", + "fr_HT": "francuski (Haiti)", + "fr_KM": "francuski (Komory)", + "fr_LU": "francuski (Luksemburg)", + "fr_MA": "francuski (Maroko)", + "fr_MC": "francuski (Monako)", + "fr_MF": "francuski (Saint-Martin)", + "fr_MG": "francuski (Madagaskar)", + "fr_ML": "francuski (Mali)", + "fr_MQ": "francuski (Martynika)", + "fr_MR": "francuski (Mauretania)", + "fr_MU": "francuski (Mauritius)", + "fr_NC": "francuski (Nowa Kaledonia)", + "fr_NE": "francuski (Niger)", + "fr_PF": "francuski (Polinezja Francuska)", + "fr_PM": "francuski (Saint-Pierre i Miquelon)", + "fr_RE": "francuski (Reunion)", + "fr_RW": "francuski (Rwanda)", + "fr_SC": "francuski (Seszele)", + "fr_SN": "francuski (Senegal)", + "fr_SY": "francuski (Syria)", + "fr_TD": "francuski (Czad)", + "fr_TG": "francuski (Togo)", + "fr_TN": "francuski (Tunezja)", + "fr_VU": "francuski (Vanuatu)", + "fr_WF": "francuski (Wallis i Futuna)", + "fr_YT": "francuski (Majotta)", + "fy": "zachodniofryzyjski", + "fy_NL": "zachodniofryzyjski (Holandia)", + "ga": "irlandzki", + "ga_IE": "irlandzki (Irlandia)", + "gd": "szkocki gaelicki", + "gd_GB": "szkocki gaelicki (Wielka Brytania)", + "gl": "galicyjski", + "gl_ES": "galicyjski (Hiszpania)", + "gu": "gudżarati", + "gu_IN": "gudżarati (Indie)", + "gv": "manx", + "gv_IM": "manx (Wyspa Man)", + "ha": "hausa", + "ha_GH": "hausa (Ghana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigeria)", + "he": "hebrajski", + "he_IL": "hebrajski (Izrael)", + "hi": "hindi", + "hi_IN": "hindi (Indie)", + "hr": "chorwacki", + "hr_BA": "chorwacki (BoÅ›nia i Hercegowina)", + "hr_HR": "chorwacki (Chorwacja)", + "hu": "wÄ™gierski", + "hu_HU": "wÄ™gierski (WÄ™gry)", + "hy": "ormiaÅ„ski", + "hy_AM": "ormiaÅ„ski (Armenia)", + "id": "indonezyjski", + "id_ID": "indonezyjski (Indonezja)", + "ig": "igbo", + "ig_NG": "igbo (Nigeria)", + "ii": "syczuaÅ„ski", + "ii_CN": "syczuaÅ„ski (Chiny)", + "is": "islandzki", + "is_IS": "islandzki (Islandia)", + "it": "wÅ‚oski", + "it_CH": "wÅ‚oski (Szwajcaria)", + "it_IT": "wÅ‚oski (WÅ‚ochy)", + "it_SM": "wÅ‚oski (San Marino)", + "ja": "japoÅ„ski", + "ja_JP": "japoÅ„ski (Japonia)", + "ka": "gruziÅ„ski", + "ka_GE": "gruziÅ„ski (Gruzja)", + "ki": "kikuju", + "ki_KE": "kikuju (Kenia)", + "kk": "kazachski", + "kk_KZ": "kazachski (Kazachstan)", + "kl": "grenlandzki", + "kl_GL": "grenlandzki (Grenlandia)", + "km": "khmerski", + "km_KH": "khmerski (Kambodża)", + "kn": "kannada", + "kn_IN": "kannada (Indie)", + "ko": "koreaÅ„ski", + "ko_KP": "koreaÅ„ski (Korea Północna)", + "ko_KR": "koreaÅ„ski (Korea PoÅ‚udniowa)", + "ks": "kaszmirski", + "ks_IN": "kaszmirski (Indie)", + "kw": "kornijski", + "kw_GB": "kornijski (Wielka Brytania)", + "ky": "kirgiski", + "ky_KG": "kirgiski (Kirgistan)", + "lb": "luksemburski", + "lb_LU": "luksemburski (Luksemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Demokratyczna Republika Konga)", + "ln_CF": "lingala (Republika ÅšrodkowoafrykaÅ„ska)", + "ln_CG": "lingala (Kongo)", + "lo": "laotaÅ„ski", + "lo_LA": "laotaÅ„ski (Laos)", + "lt": "litewski", + "lt_LT": "litewski (Litwa)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Demokratyczna Republika Konga)", + "lv": "Å‚otewski", + "lv_LV": "Å‚otewski (Åotwa)", + "mg": "malgaski", + "mg_MG": "malgaski (Madagaskar)", + "mk": "macedoÅ„ski", + "mk_MK": "macedoÅ„ski (Macedonia)", + "ml": "malajalam", + "ml_IN": "malajalam (Indie)", + "mn": "mongolski", + "mn_MN": "mongolski (Mongolia)", + "mr": "marathi", + "mr_IN": "marathi (Indie)", + "ms": "malajski", + "ms_BN": "malajski (Brunei)", + "ms_MY": "malajski (Malezja)", + "ms_SG": "malajski (Singapur)", + "mt": "maltaÅ„ski", + "mt_MT": "maltaÅ„ski (Malta)", + "my": "birmaÅ„ski", + "my_MM": "birmaÅ„ski (Mjanma (Birma))", + "nb": "norweski (bokmÃ¥l)", + "nb_NO": "norweski (Norwegia)", + "nb_SJ": "norweski (Svalbard i Jan Mayen)", + "nd": "ndebele północny", + "nd_ZW": "ndebele północny (Zimbabwe)", + "ne": "nepalski", + "ne_IN": "nepalski (Indie)", + "ne_NP": "nepalski (Nepal)", + "nl": "niderlandzki", + "nl_AW": "niderlandzki (Aruba)", + "nl_BE": "niderlandzki (Belgia)", + "nl_BQ": "niderlandzki (Niderlandy Karaibskie)", + "nl_CW": "niderlandzki (Curaçao)", + "nl_NL": "niderlandzki (Holandia)", + "nl_SR": "niderlandzki (Surinam)", + "nl_SX": "niderlandzki (Sint Maarten)", + "nn": "norweski (nynorsk)", + "nn_NO": "norweski (Norwegia)", + "no": "norweski", + "no_NO": "norweski (Norwegia)", + "om": "oromo", + "om_ET": "oromo (Etiopia)", + "om_KE": "oromo (Kenia)", + "or": "orija", + "or_IN": "orija (Indie)", + "os": "osetyjski", + "os_GE": "osetyjski (Gruzja)", + "os_RU": "osetyjski (Rosja)", + "pa": "pendżabski", + "pa_Arab": "pendżabski (arabskie)", + "pa_Arab_PK": "pendżabski (arabskie, Pakistan)", + "pa_Guru": "pendżabski (gurmukhi)", + "pa_Guru_IN": "pendżabski (gurmukhi, Indie)", + "pa_IN": "pendżabski (Indie)", + "pa_PK": "pendżabski (Pakistan)", + "pl": "polski", + "pl_PL": "polski (Polska)", + "ps": "paszto", + "ps_AF": "paszto (Afganistan)", + "pt": "portugalski", + "pt_AO": "portugalski (Angola)", + "pt_BR": "portugalski (Brazylia)", + "pt_CH": "portugalski (Szwajcaria)", + "pt_CV": "portugalski (Republika Zielonego PrzylÄ…dka)", + "pt_GQ": "portugalski (Gwinea Równikowa)", + "pt_GW": "portugalski (Gwinea Bissau)", + "pt_LU": "portugalski (Luksemburg)", + "pt_MO": "portugalski (SRA Makau (Chiny))", + "pt_MZ": "portugalski (Mozambik)", + "pt_PT": "portugalski (Portugalia)", + "pt_ST": "portugalski (Wyspy ÅšwiÄ™tego Tomasza i Książęca)", + "pt_TL": "portugalski (Timor Wschodni)", + "qu": "keczua", + "qu_BO": "keczua (Boliwia)", + "qu_EC": "keczua (Ekwador)", + "qu_PE": "keczua (Peru)", + "rm": "retoromaÅ„ski", + "rm_CH": "retoromaÅ„ski (Szwajcaria)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumuÅ„ski", + "ro_MD": "rumuÅ„ski (MoÅ‚dawia)", + "ro_RO": "rumuÅ„ski (Rumunia)", + "ru": "rosyjski", + "ru_BY": "rosyjski (BiaÅ‚oruÅ›)", + "ru_KG": "rosyjski (Kirgistan)", + "ru_KZ": "rosyjski (Kazachstan)", + "ru_MD": "rosyjski (MoÅ‚dawia)", + "ru_RU": "rosyjski (Rosja)", + "ru_UA": "rosyjski (Ukraina)", + "rw": "kinya-ruanda", + "rw_RW": "kinya-ruanda (Rwanda)", + "se": "północnolapoÅ„ski", + "se_FI": "północnolapoÅ„ski (Finlandia)", + "se_NO": "północnolapoÅ„ski (Norwegia)", + "se_SE": "północnolapoÅ„ski (Szwecja)", + "sg": "sango", + "sg_CF": "sango (Republika ÅšrodkowoafrykaÅ„ska)", + "sh": "serbsko-chorwacki", + "sh_BA": "serbsko-chorwacki (BoÅ›nia i Hercegowina)", + "si": "syngaleski", + "si_LK": "syngaleski (Sri Lanka)", + "sk": "sÅ‚owacki", + "sk_SK": "sÅ‚owacki (SÅ‚owacja)", + "sl": "sÅ‚oweÅ„ski", + "sl_SI": "sÅ‚oweÅ„ski (SÅ‚owenia)", + "sn": "shona", + "sn_ZW": "shona (Zimbabwe)", + "so": "somalijski", + "so_DJ": "somalijski (Dżibuti)", + "so_ET": "somalijski (Etiopia)", + "so_KE": "somalijski (Kenia)", + "so_SO": "somalijski (Somalia)", + "sq": "albaÅ„ski", + "sq_AL": "albaÅ„ski (Albania)", + "sq_MK": "albaÅ„ski (Macedonia)", + "sq_XK": "albaÅ„ski (Kosowo)", + "sr": "serbski", + "sr_BA": "serbski (BoÅ›nia i Hercegowina)", + "sr_Cyrl": "serbski (cyrylica)", + "sr_Cyrl_BA": "serbski (cyrylica, BoÅ›nia i Hercegowina)", + "sr_Cyrl_ME": "serbski (cyrylica, Czarnogóra)", + "sr_Cyrl_RS": "serbski (cyrylica, Serbia)", + "sr_Cyrl_XK": "serbski (cyrylica, Kosowo)", + "sr_Latn": "serbski (Å‚aciÅ„skie)", + "sr_Latn_BA": "serbski (Å‚aciÅ„skie, BoÅ›nia i Hercegowina)", + "sr_Latn_ME": "serbski (Å‚aciÅ„skie, Czarnogóra)", + "sr_Latn_RS": "serbski (Å‚aciÅ„skie, Serbia)", + "sr_Latn_XK": "serbski (Å‚aciÅ„skie, Kosowo)", + "sr_ME": "serbski (Czarnogóra)", + "sr_RS": "serbski (Serbia)", + "sr_XK": "serbski (Kosowo)", + "sv": "szwedzki", + "sv_AX": "szwedzki (Wyspy Alandzkie)", + "sv_FI": "szwedzki (Finlandia)", + "sv_SE": "szwedzki (Szwecja)", + "sw": "suahili", + "sw_CD": "suahili (Demokratyczna Republika Konga)", + "sw_KE": "suahili (Kenia)", + "sw_TZ": "suahili (Tanzania)", + "sw_UG": "suahili (Uganda)", + "ta": "tamilski", + "ta_IN": "tamilski (Indie)", + "ta_LK": "tamilski (Sri Lanka)", + "ta_MY": "tamilski (Malezja)", + "ta_SG": "tamilski (Singapur)", + "te": "telugu", + "te_IN": "telugu (Indie)", + "th": "tajski", + "th_TH": "tajski (Tajlandia)", + "ti": "tigrinia", + "ti_ER": "tigrinia (Erytrea)", + "ti_ET": "tigrinia (Etiopia)", + "tl": "tagalski", + "tl_PH": "tagalski (Filipiny)", + "to": "tonga", + "to_TO": "tonga (Tonga)", + "tr": "turecki", + "tr_CY": "turecki (Cypr)", + "tr_TR": "turecki (Turcja)", + "ug": "ujgurski", + "ug_CN": "ujgurski (Chiny)", + "uk": "ukraiÅ„ski", + "uk_UA": "ukraiÅ„ski (Ukraina)", + "ur": "urdu", + "ur_IN": "urdu (Indie)", + "ur_PK": "urdu (Pakistan)", + "uz": "uzbecki", + "uz_AF": "uzbecki (Afganistan)", + "uz_Arab": "uzbecki (arabskie)", + "uz_Arab_AF": "uzbecki (arabskie, Afganistan)", + "uz_Cyrl": "uzbecki (cyrylica)", + "uz_Cyrl_UZ": "uzbecki (cyrylica, Uzbekistan)", + "uz_Latn": "uzbecki (Å‚aciÅ„skie)", + "uz_Latn_UZ": "uzbecki (Å‚aciÅ„skie, Uzbekistan)", + "uz_UZ": "uzbecki (Uzbekistan)", + "vi": "wietnamski", + "vi_VN": "wietnamski (Wietnam)", + "yi": "jidysz", + "yo": "joruba", + "yo_BJ": "joruba (Benin)", + "yo_NG": "joruba (Nigeria)", + "zh": "chiÅ„ski", + "zh_CN": "chiÅ„ski (Chiny)", + "zh_HK": "chiÅ„ski (SRA Hongkong (Chiny))", + "zh_Hans": "chiÅ„ski (uproszczone)", + "zh_Hans_CN": "chiÅ„ski (uproszczone, Chiny)", + "zh_Hans_HK": "chiÅ„ski (uproszczone, SRA Hongkong (Chiny))", + "zh_Hans_MO": "chiÅ„ski (uproszczone, SRA Makau (Chiny))", + "zh_Hans_SG": "chiÅ„ski (uproszczone, Singapur)", + "zh_Hant": "chiÅ„ski (tradycyjne)", + "zh_Hant_HK": "chiÅ„ski (tradycyjne, SRA Hongkong (Chiny))", + "zh_Hant_MO": "chiÅ„ski (tradycyjne, SRA Makau (Chiny))", + "zh_Hant_TW": "chiÅ„ski (tradycyjne, Tajwan)", + "zh_MO": "chiÅ„ski (SRA Makau (Chiny))", + "zh_SG": "chiÅ„ski (Singapur)", + "zh_TW": "chiÅ„ski (Tajwan)", + "zu": "zulu", + "zu_ZA": "zulu (Republika PoÅ‚udniowej Afryki)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ps.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ps.json new file mode 100644 index 0000000000000000000000000000000000000000..04d4b2ac84438bb4df9d2dc1c01892d5b7070d9b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ps.json @@ -0,0 +1,108 @@ +{ + "Names": { + "am": "امهاري", + "am_ET": "امهاري (حبشه)", + "ar": "عربي", + "ar_DZ": "عربي (الجزایر)", + "ar_EG": "عربي (مصر)", + "ar_IQ": "عربي (عراق)", + "ar_KW": "عربي (کویټ)", + "ar_LB": "عربي (لبنان)", + "ar_LY": "عربي (لیبیا)", + "ar_MA": "عربي (مراکش)", + "ar_PS": "عربي (Ùلسطین)", + "ar_SA": "عربي (سعودی عربستان)", + "ar_SY": "عربي (سوریه)", + "ar_YE": "عربي (یمن)", + "as": "آسامي", + "as_IN": "آسامي (هند)", + "be": "بÛلاروسي", + "bg": "بلغاري", + "bg_BG": "بلغاري (بلغاریه)", + "bs": "بوسني", + "de": "الماني", + "de_AT": "الماني (اتریش)", + "de_CH": "الماني (سویس)", + "de_DE": "الماني (المان)", + "de_IT": "الماني (ایټالیه)", + "el": "یوناني", + "el_GR": "یوناني (یونان)", + "en": "انګریزي", + "en_AT": "انګریزي (اتریش)", + "en_CA": "انګریزي (کاناډا)", + "en_CH": "انګریزي (سویس)", + "en_DE": "انګریزي (المان)", + "en_DK": "انګریزي (ډنمارک)", + "en_FI": "انګریزي (Ùنلینډ)", + "en_GB": "انګریزي (برتانیه)", + "en_GH": "انګریزي (ګانا)", + "en_IN": "انګریزي (هند)", + "en_JM": "انګریزي (جمیکا)", + "en_LR": "انګریزي (لایبریا)", + "en_MY": "انګریزي (مالیزیا)", + "en_NG": "انګریزي (نایجیریا)", + "en_NL": "انګریزي (هالÛÙ†Ú‰)", + "en_NZ": "انګریزي (نیوزیلنډ)", + "en_PK": "انګریزي (پاکستان)", + "en_RW": "انګریزي (روندا)", + "en_SE": "انګریزي (سویډن)", + "en_TZ": "انګریزي (تنزانیا)", + "et": "حبشي", + "eu": "باسکي", + "eu_ES": "باسکي (هسپانیه)", + "fa": "ÙØ§Ø±Ø³ÙŠ", + "fa_AF": "ÙØ§Ø±Ø³ÙŠ (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "fi": "Ùینلنډي", + "fi_FI": "Ùینلنډي (Ùنلینډ)", + "fr": "ÙØ±Ø§Ù†Ø³ÙˆÙŠ", + "fr_CA": "ÙØ±Ø§Ù†Ø³ÙˆÙŠ (کاناډا)", + "fr_CH": "ÙØ±Ø§Ù†Ø³ÙˆÙŠ (سویس)", + "fr_DZ": "ÙØ±Ø§Ù†Ø³ÙˆÙŠ (الجزایر)", + "fr_FR": "ÙØ±Ø§Ù†Ø³ÙˆÙŠ (ÙØ±Ø§Ù†Ø³Ù‡)", + "fr_GN": "ÙØ±Ø§Ù†Ø³ÙˆÙŠ (ګیانا)", + "fr_MA": "ÙØ±Ø§Ù†Ø³ÙˆÙŠ (مراکش)", + "fr_RW": "ÙØ±Ø§Ù†Ø³ÙˆÙŠ (روندا)", + "fr_SY": "ÙØ±Ø§Ù†Ø³ÙˆÙŠ (سوریه)", + "he": "عبري", + "hi": "هندي", + "hi_IN": "هندي (هند)", + "hy": "ارمني", + "it": "ایټالوي", + "it_CH": "ایټالوي (سویس)", + "it_IT": "ایټالوي (ایټالیه)", + "ja": "جاپانی", + "ja_JP": "جاپانی (جاپان)", + "mg": "ملغاسي", + "mk": "مقدوني", + "mn": "مغولي", + "mn_MN": "مغولي (مغولستان)", + "ms": "ملایا", + "ms_MY": "ملایا (مالیزیا)", + "ne": "Ù†Ûپالي", + "ne_IN": "Ù†Ûپالي (هند)", + "ne_NP": "Ù†Ûپالي (نیپال)", + "nl": "هالÛÙ†Ú‰ÙŠ", + "nl_NL": "هالÛÙ†Ú‰ÙŠ (هالÛÙ†Ú‰)", + "pl": "پولنډي", + "pl_PL": "پولنډي (پولنډ)", + "ps": "پښتو", + "ps_AF": "پښتو (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "pt": "پورتګالي", + "pt_AO": "پورتګالي (انګولا)", + "pt_CH": "پورتګالي (سویس)", + "pt_PT": "پورتګالي (پورتګال)", + "ru": "روسي", + "ru_RU": "روسي (روسیه)", + "sq": "الباني", + "sq_AL": "الباني (البانیه)", + "sv": "سویډنی", + "sv_FI": "سویډنی (Ùنلینډ)", + "sv_SE": "سویډنی (سویډن)", + "uz": "ازبکي", + "uz_AF": "ازبکي (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "uz_Arab": "ازبکي (عربي)", + "uz_Arab_AF": "ازبکي (عربي, Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "zh": "چیني", + "zh_CN": "چیني (چین)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pt.json new file mode 100644 index 0000000000000000000000000000000000000000..6a10998045e04398e84dd63d8c9806e035990d08 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pt.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "africâner", + "af_NA": "africâner (Namíbia)", + "af_ZA": "africâner (Ãfrica do Sul)", + "ak": "akan", + "ak_GH": "akan (Gana)", + "am": "amárico", + "am_ET": "amárico (Etiópia)", + "ar": "árabe", + "ar_AE": "árabe (Emirados Ãrabes Unidos)", + "ar_BH": "árabe (Bahrein)", + "ar_DJ": "árabe (Djibuti)", + "ar_DZ": "árabe (Argélia)", + "ar_EG": "árabe (Egito)", + "ar_EH": "árabe (Saara Ocidental)", + "ar_ER": "árabe (Eritreia)", + "ar_IL": "árabe (Israel)", + "ar_IQ": "árabe (Iraque)", + "ar_JO": "árabe (Jordânia)", + "ar_KM": "árabe (Comores)", + "ar_KW": "árabe (Kuwait)", + "ar_LB": "árabe (Líbano)", + "ar_LY": "árabe (Líbia)", + "ar_MA": "árabe (Marrocos)", + "ar_MR": "árabe (Mauritânia)", + "ar_OM": "árabe (Omã)", + "ar_PS": "árabe (Territórios palestinos)", + "ar_QA": "árabe (Catar)", + "ar_SA": "árabe (Arábia Saudita)", + "ar_SD": "árabe (Sudão)", + "ar_SO": "árabe (Somália)", + "ar_SS": "árabe (Sudão do Sul)", + "ar_SY": "árabe (Síria)", + "ar_TD": "árabe (Chade)", + "ar_TN": "árabe (Tunísia)", + "ar_YE": "árabe (Iêmen)", + "as": "assamês", + "as_IN": "assamês (Ãndia)", + "az": "azerbaijano", + "az_AZ": "azerbaijano (Azerbaijão)", + "az_Cyrl": "azerbaijano (cirílico)", + "az_Cyrl_AZ": "azerbaijano (cirílico, Azerbaijão)", + "az_Latn": "azerbaijano (latim)", + "az_Latn_AZ": "azerbaijano (latim, Azerbaijão)", + "be": "bielorrusso", + "be_BY": "bielorrusso (Bielorrússia)", + "bg": "búlgaro", + "bg_BG": "búlgaro (Bulgária)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengali", + "bn_BD": "bengali (Bangladesh)", + "bn_IN": "bengali (Ãndia)", + "bo": "tibetano", + "bo_CN": "tibetano (China)", + "bo_IN": "tibetano (Ãndia)", + "br": "bretão", + "br_FR": "bretão (França)", + "bs": "bósnio", + "bs_BA": "bósnio (Bósnia e Herzegovina)", + "bs_Cyrl": "bósnio (cirílico)", + "bs_Cyrl_BA": "bósnio (cirílico, Bósnia e Herzegovina)", + "bs_Latn": "bósnio (latim)", + "bs_Latn_BA": "bósnio (latim, Bósnia e Herzegovina)", + "ca": "catalão", + "ca_AD": "catalão (Andorra)", + "ca_ES": "catalão (Espanha)", + "ca_FR": "catalão (França)", + "ca_IT": "catalão (Itália)", + "ce": "checheno", + "ce_RU": "checheno (Rússia)", + "cs": "tcheco", + "cs_CZ": "tcheco (República Tcheca)", + "cy": "galês", + "cy_GB": "galês (Reino Unido)", + "da": "dinamarquês", + "da_DK": "dinamarquês (Dinamarca)", + "da_GL": "dinamarquês (Groenlândia)", + "de": "alemão", + "de_AT": "alemão (Ãustria)", + "de_BE": "alemão (Bélgica)", + "de_CH": "alemão (Suíça)", + "de_DE": "alemão (Alemanha)", + "de_IT": "alemão (Itália)", + "de_LI": "alemão (Liechtenstein)", + "de_LU": "alemão (Luxemburgo)", + "dz": "dzonga", + "dz_BT": "dzonga (Butão)", + "ee": "eve", + "ee_GH": "eve (Gana)", + "ee_TG": "eve (Togo)", + "el": "grego", + "el_CY": "grego (Chipre)", + "el_GR": "grego (Grécia)", + "en": "inglês", + "en_AG": "inglês (Antígua e Barbuda)", + "en_AI": "inglês (Anguilla)", + "en_AS": "inglês (Samoa Americana)", + "en_AT": "inglês (Ãustria)", + "en_AU": "inglês (Austrália)", + "en_BB": "inglês (Barbados)", + "en_BE": "inglês (Bélgica)", + "en_BI": "inglês (Burundi)", + "en_BM": "inglês (Bermudas)", + "en_BS": "inglês (Bahamas)", + "en_BW": "inglês (Botsuana)", + "en_BZ": "inglês (Belize)", + "en_CA": "inglês (Canadá)", + "en_CC": "inglês (Ilhas Cocos (Keeling))", + "en_CH": "inglês (Suíça)", + "en_CK": "inglês (Ilhas Cook)", + "en_CM": "inglês (República dos Camarões)", + "en_CX": "inglês (Ilha Christmas)", + "en_CY": "inglês (Chipre)", + "en_DE": "inglês (Alemanha)", + "en_DG": "inglês (Diego Garcia)", + "en_DK": "inglês (Dinamarca)", + "en_DM": "inglês (Dominica)", + "en_ER": "inglês (Eritreia)", + "en_FI": "inglês (Finlândia)", + "en_FJ": "inglês (Fiji)", + "en_FK": "inglês (Ilhas Malvinas)", + "en_FM": "inglês (Micronésia)", + "en_GB": "inglês (Reino Unido)", + "en_GD": "inglês (Granada)", + "en_GG": "inglês (Guernsey)", + "en_GH": "inglês (Gana)", + "en_GI": "inglês (Gibraltar)", + "en_GM": "inglês (Gâmbia)", + "en_GU": "inglês (Guam)", + "en_GY": "inglês (Guiana)", + "en_HK": "inglês (Hong Kong, RAE da China)", + "en_IE": "inglês (Irlanda)", + "en_IL": "inglês (Israel)", + "en_IM": "inglês (Ilha de Man)", + "en_IN": "inglês (Ãndia)", + "en_IO": "inglês (Território Britânico do Oceano Ãndico)", + "en_JE": "inglês (Jersey)", + "en_JM": "inglês (Jamaica)", + "en_KE": "inglês (Quênia)", + "en_KI": "inglês (Quiribati)", + "en_KN": "inglês (São Cristóvão e Nevis)", + "en_KY": "inglês (Ilhas Cayman)", + "en_LC": "inglês (Santa Lúcia)", + "en_LR": "inglês (Libéria)", + "en_LS": "inglês (Lesoto)", + "en_MG": "inglês (Madagascar)", + "en_MH": "inglês (Ilhas Marshall)", + "en_MO": "inglês (Macau, RAE da China)", + "en_MP": "inglês (Ilhas Marianas do Norte)", + "en_MS": "inglês (Montserrat)", + "en_MT": "inglês (Malta)", + "en_MU": "inglês (Maurício)", + "en_MW": "inglês (Malawi)", + "en_MY": "inglês (Malásia)", + "en_NA": "inglês (Namíbia)", + "en_NF": "inglês (Ilha Norfolk)", + "en_NG": "inglês (Nigéria)", + "en_NL": "inglês (Holanda)", + "en_NR": "inglês (Nauru)", + "en_NU": "inglês (Niue)", + "en_NZ": "inglês (Nova Zelândia)", + "en_PG": "inglês (Papua-Nova Guiné)", + "en_PH": "inglês (Filipinas)", + "en_PK": "inglês (Paquistão)", + "en_PN": "inglês (Ilhas Pitcairn)", + "en_PR": "inglês (Porto Rico)", + "en_PW": "inglês (Palau)", + "en_RW": "inglês (Ruanda)", + "en_SB": "inglês (Ilhas Salomão)", + "en_SC": "inglês (Seicheles)", + "en_SD": "inglês (Sudão)", + "en_SE": "inglês (Suécia)", + "en_SG": "inglês (Cingapura)", + "en_SH": "inglês (Santa Helena)", + "en_SI": "inglês (Eslovênia)", + "en_SL": "inglês (Serra Leoa)", + "en_SS": "inglês (Sudão do Sul)", + "en_SX": "inglês (Sint Maarten)", + "en_SZ": "inglês (Suazilândia)", + "en_TC": "inglês (Ilhas Turks e Caicos)", + "en_TK": "inglês (Tokelau)", + "en_TO": "inglês (Tonga)", + "en_TT": "inglês (Trinidad e Tobago)", + "en_TV": "inglês (Tuvalu)", + "en_TZ": "inglês (Tanzânia)", + "en_UG": "inglês (Uganda)", + "en_UM": "inglês (Ilhas Menores Distantes dos EUA)", + "en_US": "inglês (Estados Unidos)", + "en_VC": "inglês (São Vicente e Granadinas)", + "en_VG": "inglês (Ilhas Virgens Britânicas)", + "en_VI": "inglês (Ilhas Virgens dos EUA)", + "en_VU": "inglês (Vanuatu)", + "en_WS": "inglês (Samoa)", + "en_ZA": "inglês (Ãfrica do Sul)", + "en_ZM": "inglês (Zâmbia)", + "en_ZW": "inglês (Zimbábue)", + "eo": "esperanto", + "es": "espanhol", + "es_AR": "espanhol (Argentina)", + "es_BO": "espanhol (Bolívia)", + "es_BR": "espanhol (Brasil)", + "es_CL": "espanhol (Chile)", + "es_CO": "espanhol (Colômbia)", + "es_CR": "espanhol (Costa Rica)", + "es_CU": "espanhol (Cuba)", + "es_DO": "espanhol (República Dominicana)", + "es_EA": "espanhol (Ceuta e Melilha)", + "es_EC": "espanhol (Equador)", + "es_ES": "espanhol (Espanha)", + "es_GQ": "espanhol (Guiné Equatorial)", + "es_GT": "espanhol (Guatemala)", + "es_HN": "espanhol (Honduras)", + "es_IC": "espanhol (Ilhas Canárias)", + "es_MX": "espanhol (México)", + "es_NI": "espanhol (Nicarágua)", + "es_PA": "espanhol (Panamá)", + "es_PE": "espanhol (Peru)", + "es_PH": "espanhol (Filipinas)", + "es_PR": "espanhol (Porto Rico)", + "es_PY": "espanhol (Paraguai)", + "es_SV": "espanhol (El Salvador)", + "es_US": "espanhol (Estados Unidos)", + "es_UY": "espanhol (Uruguai)", + "es_VE": "espanhol (Venezuela)", + "et": "estoniano", + "et_EE": "estoniano (Estônia)", + "eu": "basco", + "eu_ES": "basco (Espanha)", + "fa": "persa", + "fa_AF": "persa (Afeganistão)", + "fa_IR": "persa (Irã)", + "ff": "fula", + "ff_CM": "fula (República dos Camarões)", + "ff_GN": "fula (Guiné)", + "ff_MR": "fula (Mauritânia)", + "ff_SN": "fula (Senegal)", + "fi": "finlandês", + "fi_FI": "finlandês (Finlândia)", + "fo": "feroês", + "fo_DK": "feroês (Dinamarca)", + "fo_FO": "feroês (Ilhas Faroe)", + "fr": "francês", + "fr_BE": "francês (Bélgica)", + "fr_BF": "francês (Burquina Faso)", + "fr_BI": "francês (Burundi)", + "fr_BJ": "francês (Benin)", + "fr_BL": "francês (São Bartolomeu)", + "fr_CA": "francês (Canadá)", + "fr_CD": "francês (Congo - Kinshasa)", + "fr_CF": "francês (República Centro-Africana)", + "fr_CG": "francês (Congo - Brazzaville)", + "fr_CH": "francês (Suíça)", + "fr_CI": "francês (Costa do Marfim)", + "fr_CM": "francês (República dos Camarões)", + "fr_DJ": "francês (Djibuti)", + "fr_DZ": "francês (Argélia)", + "fr_FR": "francês (França)", + "fr_GA": "francês (Gabão)", + "fr_GF": "francês (Guiana Francesa)", + "fr_GN": "francês (Guiné)", + "fr_GP": "francês (Guadalupe)", + "fr_GQ": "francês (Guiné Equatorial)", + "fr_HT": "francês (Haiti)", + "fr_KM": "francês (Comores)", + "fr_LU": "francês (Luxemburgo)", + "fr_MA": "francês (Marrocos)", + "fr_MC": "francês (Mônaco)", + "fr_MF": "francês (São Martinho)", + "fr_MG": "francês (Madagascar)", + "fr_ML": "francês (Mali)", + "fr_MQ": "francês (Martinica)", + "fr_MR": "francês (Mauritânia)", + "fr_MU": "francês (Maurício)", + "fr_NC": "francês (Nova Caledônia)", + "fr_NE": "francês (Níger)", + "fr_PF": "francês (Polinésia Francesa)", + "fr_PM": "francês (Saint Pierre e Miquelon)", + "fr_RE": "francês (Reunião)", + "fr_RW": "francês (Ruanda)", + "fr_SC": "francês (Seicheles)", + "fr_SN": "francês (Senegal)", + "fr_SY": "francês (Síria)", + "fr_TD": "francês (Chade)", + "fr_TG": "francês (Togo)", + "fr_TN": "francês (Tunísia)", + "fr_VU": "francês (Vanuatu)", + "fr_WF": "francês (Wallis e Futuna)", + "fr_YT": "francês (Mayotte)", + "fy": "frísio ocidental", + "fy_NL": "frísio ocidental (Holanda)", + "ga": "irlandês", + "ga_IE": "irlandês (Irlanda)", + "gd": "gaélico escocês", + "gd_GB": "gaélico escocês (Reino Unido)", + "gl": "galego", + "gl_ES": "galego (Espanha)", + "gu": "guzerate", + "gu_IN": "guzerate (Ãndia)", + "gv": "manx", + "gv_IM": "manx (Ilha de Man)", + "ha": "hauçá", + "ha_GH": "hauçá (Gana)", + "ha_NE": "hauçá (Níger)", + "ha_NG": "hauçá (Nigéria)", + "he": "hebraico", + "he_IL": "hebraico (Israel)", + "hi": "híndi", + "hi_IN": "híndi (Ãndia)", + "hr": "croata", + "hr_BA": "croata (Bósnia e Herzegovina)", + "hr_HR": "croata (Croácia)", + "hu": "húngaro", + "hu_HU": "húngaro (Hungria)", + "hy": "armênio", + "hy_AM": "armênio (Armênia)", + "id": "indonésio", + "id_ID": "indonésio (Indonésia)", + "ig": "ibo", + "ig_NG": "ibo (Nigéria)", + "ii": "sichuan yi", + "ii_CN": "sichuan yi (China)", + "is": "islandês", + "is_IS": "islandês (Islândia)", + "it": "italiano", + "it_CH": "italiano (Suíça)", + "it_IT": "italiano (Itália)", + "it_SM": "italiano (San Marino)", + "ja": "japonês", + "ja_JP": "japonês (Japão)", + "ka": "georgiano", + "ka_GE": "georgiano (Geórgia)", + "ki": "quicuio", + "ki_KE": "quicuio (Quênia)", + "kk": "cazaque", + "kk_KZ": "cazaque (Cazaquistão)", + "kl": "groenlandês", + "kl_GL": "groenlandês (Groenlândia)", + "km": "khmer", + "km_KH": "khmer (Camboja)", + "kn": "canarês", + "kn_IN": "canarês (Ãndia)", + "ko": "coreano", + "ko_KP": "coreano (Coreia do Norte)", + "ko_KR": "coreano (Coreia do Sul)", + "ks": "caxemira", + "ks_IN": "caxemira (Ãndia)", + "kw": "córnico", + "kw_GB": "córnico (Reino Unido)", + "ky": "quirguiz", + "ky_KG": "quirguiz (Quirguistão)", + "lb": "luxemburguês", + "lb_LU": "luxemburguês (Luxemburgo)", + "lg": "luganda", + "lg_UG": "luganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Congo - Kinshasa)", + "ln_CF": "lingala (República Centro-Africana)", + "ln_CG": "lingala (Congo - Brazzaville)", + "lo": "laosiano", + "lo_LA": "laosiano (Laos)", + "lt": "lituano", + "lt_LT": "lituano (Lituânia)", + "lu": "luba-catanga", + "lu_CD": "luba-catanga (Congo - Kinshasa)", + "lv": "letão", + "lv_LV": "letão (Letônia)", + "mg": "malgaxe", + "mg_MG": "malgaxe (Madagascar)", + "mk": "macedônio", + "mk_MK": "macedônio (Macedônia)", + "ml": "malaiala", + "ml_IN": "malaiala (Ãndia)", + "mn": "mongol", + "mn_MN": "mongol (Mongólia)", + "mr": "marata", + "mr_IN": "marata (Ãndia)", + "ms": "malaio", + "ms_BN": "malaio (Brunei)", + "ms_MY": "malaio (Malásia)", + "ms_SG": "malaio (Cingapura)", + "mt": "maltês", + "mt_MT": "maltês (Malta)", + "my": "birmanês", + "my_MM": "birmanês (Mianmar (Birmânia))", + "nb": "bokmÃ¥l norueguês", + "nb_NO": "bokmÃ¥l norueguês (Noruega)", + "nb_SJ": "bokmÃ¥l norueguês (Svalbard e Jan Mayen)", + "nd": "ndebele do norte", + "nd_ZW": "ndebele do norte (Zimbábue)", + "ne": "nepali", + "ne_IN": "nepali (Ãndia)", + "ne_NP": "nepali (Nepal)", + "nl": "holandês", + "nl_AW": "holandês (Aruba)", + "nl_BE": "holandês (Bélgica)", + "nl_BQ": "holandês (Países Baixos Caribenhos)", + "nl_CW": "holandês (Curaçao)", + "nl_NL": "holandês (Holanda)", + "nl_SR": "holandês (Suriname)", + "nl_SX": "holandês (Sint Maarten)", + "nn": "nynorsk norueguês", + "nn_NO": "nynorsk norueguês (Noruega)", + "no": "norueguês", + "no_NO": "norueguês (Noruega)", + "om": "oromo", + "om_ET": "oromo (Etiópia)", + "om_KE": "oromo (Quênia)", + "or": "oriya", + "or_IN": "oriya (Ãndia)", + "os": "osseto", + "os_GE": "osseto (Geórgia)", + "os_RU": "osseto (Rússia)", + "pa": "panjabi", + "pa_Arab": "panjabi (árabe)", + "pa_Arab_PK": "panjabi (árabe, Paquistão)", + "pa_Guru": "panjabi (gurmuqui)", + "pa_Guru_IN": "panjabi (gurmuqui, Ãndia)", + "pa_IN": "panjabi (Ãndia)", + "pa_PK": "panjabi (Paquistão)", + "pl": "polonês", + "pl_PL": "polonês (Polônia)", + "ps": "pashto", + "ps_AF": "pashto (Afeganistão)", + "pt": "português", + "pt_AO": "português (Angola)", + "pt_BR": "português (Brasil)", + "pt_CH": "português (Suíça)", + "pt_CV": "português (Cabo Verde)", + "pt_GQ": "português (Guiné Equatorial)", + "pt_GW": "português (Guiné-Bissau)", + "pt_LU": "português (Luxemburgo)", + "pt_MO": "português (Macau, RAE da China)", + "pt_MZ": "português (Moçambique)", + "pt_PT": "português (Portugal)", + "pt_ST": "português (São Tomé e Príncipe)", + "pt_TL": "português (Timor-Leste)", + "qu": "quíchua", + "qu_BO": "quíchua (Bolívia)", + "qu_EC": "quíchua (Equador)", + "qu_PE": "quíchua (Peru)", + "rm": "romanche", + "rm_CH": "romanche (Suíça)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "romeno", + "ro_MD": "romeno (Moldávia)", + "ro_RO": "romeno (Romênia)", + "ru": "russo", + "ru_BY": "russo (Bielorrússia)", + "ru_KG": "russo (Quirguistão)", + "ru_KZ": "russo (Cazaquistão)", + "ru_MD": "russo (Moldávia)", + "ru_RU": "russo (Rússia)", + "ru_UA": "russo (Ucrânia)", + "rw": "quiniaruanda", + "rw_RW": "quiniaruanda (Ruanda)", + "se": "sami setentrional", + "se_FI": "sami setentrional (Finlândia)", + "se_NO": "sami setentrional (Noruega)", + "se_SE": "sami setentrional (Suécia)", + "sg": "sango", + "sg_CF": "sango (República Centro-Africana)", + "sh": "servo-croata", + "sh_BA": "servo-croata (Bósnia e Herzegovina)", + "si": "cingalês", + "si_LK": "cingalês (Sri Lanka)", + "sk": "eslovaco", + "sk_SK": "eslovaco (Eslováquia)", + "sl": "esloveno", + "sl_SI": "esloveno (Eslovênia)", + "sn": "shona", + "sn_ZW": "shona (Zimbábue)", + "so": "somali", + "so_DJ": "somali (Djibuti)", + "so_ET": "somali (Etiópia)", + "so_KE": "somali (Quênia)", + "so_SO": "somali (Somália)", + "sq": "albanês", + "sq_AL": "albanês (Albânia)", + "sq_MK": "albanês (Macedônia)", + "sq_XK": "albanês (Kosovo)", + "sr": "sérvio", + "sr_BA": "sérvio (Bósnia e Herzegovina)", + "sr_Cyrl": "sérvio (cirílico)", + "sr_Cyrl_BA": "sérvio (cirílico, Bósnia e Herzegovina)", + "sr_Cyrl_ME": "sérvio (cirílico, Montenegro)", + "sr_Cyrl_RS": "sérvio (cirílico, Sérvia)", + "sr_Cyrl_XK": "sérvio (cirílico, Kosovo)", + "sr_Latn": "sérvio (latim)", + "sr_Latn_BA": "sérvio (latim, Bósnia e Herzegovina)", + "sr_Latn_ME": "sérvio (latim, Montenegro)", + "sr_Latn_RS": "sérvio (latim, Sérvia)", + "sr_Latn_XK": "sérvio (latim, Kosovo)", + "sr_ME": "sérvio (Montenegro)", + "sr_RS": "sérvio (Sérvia)", + "sr_XK": "sérvio (Kosovo)", + "sv": "sueco", + "sv_AX": "sueco (Ilhas Ã…land)", + "sv_FI": "sueco (Finlândia)", + "sv_SE": "sueco (Suécia)", + "sw": "suaíli", + "sw_CD": "suaíli (Congo - Kinshasa)", + "sw_KE": "suaíli (Quênia)", + "sw_TZ": "suaíli (Tanzânia)", + "sw_UG": "suaíli (Uganda)", + "ta": "tâmil", + "ta_IN": "tâmil (Ãndia)", + "ta_LK": "tâmil (Sri Lanka)", + "ta_MY": "tâmil (Malásia)", + "ta_SG": "tâmil (Cingapura)", + "te": "telugu", + "te_IN": "telugu (Ãndia)", + "th": "tailandês", + "th_TH": "tailandês (Tailândia)", + "ti": "tigrínio", + "ti_ER": "tigrínio (Eritreia)", + "ti_ET": "tigrínio (Etiópia)", + "tl": "tagalo", + "tl_PH": "tagalo (Filipinas)", + "to": "tonganês", + "to_TO": "tonganês (Tonga)", + "tr": "turco", + "tr_CY": "turco (Chipre)", + "tr_TR": "turco (Turquia)", + "ug": "uigur", + "ug_CN": "uigur (China)", + "uk": "ucraniano", + "uk_UA": "ucraniano (Ucrânia)", + "ur": "urdu", + "ur_IN": "urdu (Ãndia)", + "ur_PK": "urdu (Paquistão)", + "uz": "usbeque", + "uz_AF": "usbeque (Afeganistão)", + "uz_Arab": "usbeque (árabe)", + "uz_Arab_AF": "usbeque (árabe, Afeganistão)", + "uz_Cyrl": "usbeque (cirílico)", + "uz_Cyrl_UZ": "usbeque (cirílico, Uzbequistão)", + "uz_Latn": "usbeque (latim)", + "uz_Latn_UZ": "usbeque (latim, Uzbequistão)", + "uz_UZ": "usbeque (Uzbequistão)", + "vi": "vietnamita", + "vi_VN": "vietnamita (Vietnã)", + "yi": "iídiche", + "yo": "iorubá", + "yo_BJ": "iorubá (Benin)", + "yo_NG": "iorubá (Nigéria)", + "zh": "chinês", + "zh_CN": "chinês (China)", + "zh_HK": "chinês (Hong Kong, RAE da China)", + "zh_Hans": "chinês (simplificado)", + "zh_Hans_CN": "chinês (simplificado, China)", + "zh_Hans_HK": "chinês (simplificado, Hong Kong, RAE da China)", + "zh_Hans_MO": "chinês (simplificado, Macau, RAE da China)", + "zh_Hans_SG": "chinês (simplificado, Cingapura)", + "zh_Hant": "chinês (tradicional)", + "zh_Hant_HK": "chinês (tradicional, Hong Kong, RAE da China)", + "zh_Hant_MO": "chinês (tradicional, Macau, RAE da China)", + "zh_Hant_TW": "chinês (tradicional, Taiwan)", + "zh_MO": "chinês (Macau, RAE da China)", + "zh_SG": "chinês (Cingapura)", + "zh_TW": "chinês (Taiwan)", + "zu": "zulu", + "zu_ZA": "zulu (Ãfrica do Sul)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pt_PT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pt_PT.json new file mode 100644 index 0000000000000000000000000000000000000000..a717087558f5e4e1a6e4ef99183d924d66d2ac1f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/pt_PT.json @@ -0,0 +1,134 @@ +{ + "Names": { + "af": "africanês", + "af_NA": "africanês (Namíbia)", + "af_ZA": "africanês (Ãfrica do Sul)", + "ar_BH": "árabe (Barém)", + "ar_DJ": "árabe (Jibuti)", + "ar_PS": "árabe (Territórios palestinianos)", + "ar_YE": "árabe (Iémen)", + "bn_BD": "bengali (Bangladeche)", + "cs": "checo", + "cs_CZ": "checo (República Checa)", + "da_GL": "dinamarquês (Gronelândia)", + "de_LI": "alemão (Listenstaine)", + "ee": "ewe", + "ee_GH": "ewe (Gana)", + "ee_TG": "ewe (Togo)", + "en_AI": "inglês (Anguila)", + "en_BS": "inglês (Baamas)", + "en_CC": "inglês (Ilhas dos Cocos (Keeling))", + "en_CM": "inglês (Camarões)", + "en_CX": "inglês (Ilha do Natal)", + "en_DM": "inglês (Domínica)", + "en_FK": "inglês (Ilhas Falkland)", + "en_GU": "inglês (Guame)", + "en_KE": "inglês (Quénia)", + "en_KN": "inglês (São Cristóvão e Neves)", + "en_KY": "inglês (Ilhas Caimão)", + "en_MG": "inglês (Madagáscar)", + "en_MS": "inglês (Monserrate)", + "en_MU": "inglês (Maurícia)", + "en_MW": "inglês (Maláui)", + "en_NL": "inglês (Países Baixos)", + "en_SG": "inglês (Singapura)", + "en_SI": "inglês (Eslovénia)", + "en_TC": "inglês (Ilhas Turcas e Caicos)", + "en_TK": "inglês (Toquelau)", + "en_TT": "inglês (Trindade e Tobago)", + "en_UM": "inglês (Ilhas Menores Afastadas dos EUA)", + "en_ZW": "inglês (Zimbabué)", + "es_SV": "espanhol (Salvador)", + "et": "estónio", + "et_EE": "estónio (Estónia)", + "fa_IR": "persa (Irão)", + "ff_CM": "fula (Camarões)", + "fo_FO": "feroês (Ilhas Faroé)", + "fr_BJ": "francês (Benim)", + "fr_CD": "francês (Congo-Kinshasa)", + "fr_CG": "francês (Congo-Brazzaville)", + "fr_CM": "francês (Camarões)", + "fr_DJ": "francês (Jibuti)", + "fr_MC": "francês (Mónaco)", + "fr_MG": "francês (Madagáscar)", + "fr_MU": "francês (Maurícia)", + "fr_NC": "francês (Nova Caledónia)", + "fr_PM": "francês (São Pedro e Miquelão)", + "fr_YT": "francês (Maiote)", + "fy": "frísico ocidental", + "fy_NL": "frísico ocidental (Países Baixos)", + "ha": "haúça", + "ha_GH": "haúça (Gana)", + "ha_NE": "haúça (Níger)", + "ha_NG": "haúça (Nigéria)", + "hi": "hindi", + "hi_IN": "hindi (Ãndia)", + "hy": "arménio", + "hy_AM": "arménio (Arménia)", + "ig": "igbo", + "ig_NG": "igbo (Nigéria)", + "it_SM": "italiano (São Marinho)", + "ki_KE": "quicuio (Quénia)", + "kl_GL": "groenlandês (Gronelândia)", + "kn": "canarim", + "kn_IN": "canarim (Ãndia)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln_CD": "lingala (Congo-Kinshasa)", + "ln_CG": "lingala (Congo-Brazzaville)", + "lu_CD": "luba-catanga (Congo-Kinshasa)", + "lv_LV": "letão (Letónia)", + "mg_MG": "malgaxe (Madagáscar)", + "mk": "macedónio", + "mk_MK": "macedónio (Macedónia)", + "ms_SG": "malaio (Singapura)", + "nb": "norueguês bokmÃ¥l", + "nb_NO": "norueguês bokmÃ¥l (Noruega)", + "nb_SJ": "norueguês bokmÃ¥l (Svalbard e Jan Mayen)", + "nd_ZW": "ndebele do norte (Zimbabué)", + "nl_CW": "holandês (Curaçau)", + "nl_NL": "holandês (Países Baixos)", + "nn": "norueguês nynorsk", + "nn_NO": "norueguês nynorsk (Noruega)", + "om_KE": "oromo (Quénia)", + "os": "ossético", + "os_GE": "ossético (Geórgia)", + "os_RU": "ossético (Rússia)", + "pl": "polaco", + "pl_PL": "polaco (Polónia)", + "ps": "pastó", + "ps_AF": "pastó (Afeganistão)", + "ro_RO": "romeno (Roménia)", + "rw": "kinyarwanda", + "rw_RW": "kinyarwanda (Ruanda)", + "se": "sami do norte", + "se_FI": "sami do norte (Finlândia)", + "se_NO": "sami do norte (Noruega)", + "se_SE": "sami do norte (Suécia)", + "si_LK": "cingalês (Sri Lanca)", + "sl_SI": "esloveno (Eslovénia)", + "sn_ZW": "shona (Zimbabué)", + "so_DJ": "somali (Jibuti)", + "so_KE": "somali (Quénia)", + "sq_MK": "albanês (Macedónia)", + "sv_AX": "sueco (Alanda)", + "sw_CD": "suaíli (Congo-Kinshasa)", + "sw_KE": "suaíli (Quénia)", + "ta_LK": "tâmil (Sri Lanca)", + "ta_SG": "tâmil (Singapura)", + "ti": "tigrínia", + "ti_ER": "tigrínia (Eritreia)", + "ti_ET": "tigrínia (Etiópia)", + "to": "tonga", + "to_TO": "tonga (Tonga)", + "uz_Cyrl_UZ": "usbeque (cirílico, Usbequistão)", + "uz_Latn_UZ": "usbeque (latim, Usbequistão)", + "uz_UZ": "usbeque (Usbequistão)", + "vi_VN": "vietnamita (Vietname)", + "yo": "ioruba", + "yo_BJ": "ioruba (Benim)", + "yo_NG": "ioruba (Nigéria)", + "zh_Hans_SG": "chinês (simplificado, Singapura)", + "zh_SG": "chinês (Singapura)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/qu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/qu.json new file mode 100644 index 0000000000000000000000000000000000000000..614de530d23d670291b5db1cce32d652b9d2b94e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/qu.json @@ -0,0 +1,400 @@ +{ + "Names": { + "af": "Afrikaans Simi", + "af_NA": "Afrikaans Simi (Namibia)", + "af_ZA": "Afrikaans Simi (Sudáfrica)", + "am": "Amarico Simi", + "am_ET": "Amarico Simi (Etiopía)", + "ar": "Arabe Simi", + "ar_BH": "Arabe Simi (Baréin)", + "ar_DJ": "Arabe Simi (Yibuti)", + "ar_DZ": "Arabe Simi (Argelia)", + "ar_EG": "Arabe Simi (Egipto)", + "ar_ER": "Arabe Simi (Eritrea)", + "ar_IL": "Arabe Simi (Israel)", + "ar_IQ": "Arabe Simi (Irak)", + "ar_JO": "Arabe Simi (Jordania)", + "ar_KM": "Arabe Simi (Comoras)", + "ar_KW": "Arabe Simi (Kuwait)", + "ar_LB": "Arabe Simi (Líbano)", + "ar_MA": "Arabe Simi (Marruecos)", + "ar_MR": "Arabe Simi (Mauritania)", + "ar_OM": "Arabe Simi (Omán)", + "ar_PS": "Arabe Simi (Palestina Kamachikuq)", + "ar_QA": "Arabe Simi (Qatar)", + "ar_SA": "Arabe Simi (Arabia Saudí)", + "ar_SD": "Arabe Simi (Sudán)", + "ar_SO": "Arabe Simi (Somalia)", + "ar_SS": "Arabe Simi (Sudán del Sur)", + "ar_SY": "Arabe Simi (Siria)", + "ar_TD": "Arabe Simi (Chad)", + "ar_TN": "Arabe Simi (Túnez)", + "ar_YE": "Arabe Simi (Yemen)", + "as": "Asames Simi", + "as_IN": "Asames Simi (India)", + "az": "Azerbaiyano Simi", + "az_AZ": "Azerbaiyano Simi (Azerbaiyán)", + "be": "Bielorruso Simi", + "be_BY": "Bielorruso Simi (Belarús)", + "bg": "Bulgaro Simi", + "bg_BG": "Bulgaro Simi (Bulgaria)", + "bn": "Bangla Simi", + "bn_BD": "Bangla Simi (Bangladesh)", + "bn_IN": "Bangla Simi (India)", + "bo": "Tibetano Simi", + "bo_CN": "Tibetano Simi (China)", + "bo_IN": "Tibetano Simi (India)", + "br": "Breton Simi", + "br_FR": "Breton Simi (Francia)", + "bs": "Bosnio Simi", + "ca": "Catalan Simi", + "ca_AD": "Catalan Simi (Andorra)", + "ca_ES": "Catalan Simi (España)", + "ca_FR": "Catalan Simi (Francia)", + "ca_IT": "Catalan Simi (Italia)", + "cs": "Checo Simi", + "cy": "Gales Simi", + "cy_GB": "Gales Simi (Reino Unido)", + "da": "Danes Simi", + "da_DK": "Danes Simi (Dinamarca)", + "de": "Aleman Simi", + "de_AT": "Aleman Simi (Austria)", + "de_BE": "Aleman Simi (Bélgica)", + "de_CH": "Aleman Simi (Suiza)", + "de_DE": "Aleman Simi (Alemania)", + "de_IT": "Aleman Simi (Italia)", + "de_LI": "Aleman Simi (Liechtenstein)", + "de_LU": "Aleman Simi (Luxemburgo)", + "el": "Griego Simi", + "el_CY": "Griego Simi (Chipre)", + "el_GR": "Griego Simi (Grecia)", + "en": "Ingles Simi", + "en_AS": "Ingles Simi (Samoa Americana)", + "en_AT": "Ingles Simi (Austria)", + "en_AU": "Ingles Simi (Australia)", + "en_BE": "Ingles Simi (Bélgica)", + "en_BI": "Ingles Simi (Burundi)", + "en_BS": "Ingles Simi (Bahamas)", + "en_BW": "Ingles Simi (Botsuana)", + "en_CC": "Ingles Simi (Islas Cocos)", + "en_CH": "Ingles Simi (Suiza)", + "en_CM": "Ingles Simi (Camerún)", + "en_CX": "Ingles Simi (Isla Christmas)", + "en_CY": "Ingles Simi (Chipre)", + "en_DE": "Ingles Simi (Alemania)", + "en_DK": "Ingles Simi (Dinamarca)", + "en_DM": "Ingles Simi (Dominica)", + "en_ER": "Ingles Simi (Eritrea)", + "en_FI": "Ingles Simi (Finlandia)", + "en_FJ": "Ingles Simi (Fiyi)", + "en_FM": "Ingles Simi (Micronesia)", + "en_GB": "Ingles Simi (Reino Unido)", + "en_GG": "Ingles Simi (Guernesey)", + "en_GH": "Ingles Simi (Ghana)", + "en_GM": "Ingles Simi (Gambia)", + "en_GU": "Ingles Simi (Guam)", + "en_GY": "Ingles Simi (Guyana)", + "en_HK": "Ingles Simi (Hong Kong (RAE))", + "en_IL": "Ingles Simi (Israel)", + "en_IN": "Ingles Simi (India)", + "en_JE": "Ingles Simi (Jersey)", + "en_KE": "Ingles Simi (Kenia)", + "en_KI": "Ingles Simi (Kiribati)", + "en_KN": "Ingles Simi (San Cristóbal y Nieves)", + "en_LR": "Ingles Simi (Liberia)", + "en_LS": "Ingles Simi (Lesoto)", + "en_MG": "Ingles Simi (Madagascar)", + "en_MH": "Ingles Simi (Islas Marshall)", + "en_MO": "Ingles Simi (Macao RAE)", + "en_MP": "Ingles Simi (Islas Marianas del Norte)", + "en_MT": "Ingles Simi (Malta)", + "en_MU": "Ingles Simi (Mauricio)", + "en_MW": "Ingles Simi (Malawi)", + "en_NA": "Ingles Simi (Namibia)", + "en_NF": "Ingles Simi (Isla Norfolk)", + "en_NG": "Ingles Simi (Nigeria)", + "en_NL": "Ingles Simi (Países Bajos)", + "en_NR": "Ingles Simi (Nauru)", + "en_PG": "Ingles Simi (Papúa Nueva Guinea)", + "en_PH": "Ingles Simi (Filipinas)", + "en_PK": "Ingles Simi (Pakistán)", + "en_PN": "Ingles Simi (Islas Pitcairn)", + "en_PR": "Ingles Simi (Puerto Rico)", + "en_PW": "Ingles Simi (Palaos)", + "en_RW": "Ingles Simi (Ruanda)", + "en_SC": "Ingles Simi (Seychelles)", + "en_SD": "Ingles Simi (Sudán)", + "en_SE": "Ingles Simi (Suecia)", + "en_SG": "Ingles Simi (Singapur)", + "en_SI": "Ingles Simi (Eslovenia)", + "en_SL": "Ingles Simi (Sierra Leona)", + "en_SS": "Ingles Simi (Sudán del Sur)", + "en_SX": "Ingles Simi (Sint Maarten)", + "en_SZ": "Ingles Simi (Suazilandia)", + "en_TO": "Ingles Simi (Tonga)", + "en_TT": "Ingles Simi (Trinidad y Tobago)", + "en_TZ": "Ingles Simi (Tanzania)", + "en_UG": "Ingles Simi (Uganda)", + "en_UM": "Ingles Simi (Islas menores alejadas de los EE.UU.)", + "en_US": "Ingles Simi (Estados Unidos)", + "en_VI": "Ingles Simi (EE.UU. Islas Vírgenes)", + "en_VU": "Ingles Simi (Vanuatu)", + "en_WS": "Ingles Simi (Samoa)", + "en_ZA": "Ingles Simi (Sudáfrica)", + "en_ZM": "Ingles Simi (Zambia)", + "en_ZW": "Ingles Simi (Zimbabue)", + "es": "Español Simi", + "es_AR": "Español Simi (Argentina)", + "es_BO": "Español Simi (Bolivia)", + "es_BR": "Español Simi (Brasil)", + "es_CL": "Español Simi (Chile)", + "es_CO": "Español Simi (Colombia)", + "es_CR": "Español Simi (Costa Rica)", + "es_CU": "Español Simi (Cuba)", + "es_EC": "Español Simi (Ecuador)", + "es_ES": "Español Simi (España)", + "es_GQ": "Español Simi (Guinea Ecuatorial)", + "es_GT": "Español Simi (Guatemala)", + "es_HN": "Español Simi (Honduras)", + "es_MX": "Español Simi (México)", + "es_NI": "Español Simi (Nicaragua)", + "es_PA": "Español Simi (Panamá)", + "es_PE": "Español Simi (Perú)", + "es_PH": "Español Simi (Filipinas)", + "es_PR": "Español Simi (Puerto Rico)", + "es_PY": "Español Simi (Paraguay)", + "es_SV": "Español Simi (El Salvador)", + "es_US": "Español Simi (Estados Unidos)", + "es_UY": "Español Simi (Uruguay)", + "es_VE": "Español Simi (Venezuela)", + "et": "Estonio Simi", + "et_EE": "Estonio Simi (Estonia)", + "eu": "Euskera Simi", + "eu_ES": "Euskera Simi (España)", + "fa": "Persa Simi", + "fa_AF": "Persa Simi (Afganistán)", + "fa_IR": "Persa Simi (Irán)", + "ff": "Fulah Simi", + "ff_CM": "Fulah Simi (Camerún)", + "ff_GN": "Fulah Simi (Guinea)", + "ff_MR": "Fulah Simi (Mauritania)", + "ff_SN": "Fulah Simi (Senegal)", + "fi": "Fines Simi", + "fi_FI": "Fines Simi (Finlandia)", + "fo": "Feroes Simi", + "fo_DK": "Feroes Simi (Dinamarca)", + "fr": "Frances Simi", + "fr_BE": "Frances Simi (Bélgica)", + "fr_BI": "Frances Simi (Burundi)", + "fr_BJ": "Frances Simi (Benín)", + "fr_CD": "Frances Simi (Congo (RDC))", + "fr_CG": "Frances Simi (Congo)", + "fr_CH": "Frances Simi (Suiza)", + "fr_CI": "Frances Simi (Côte d’Ivoire)", + "fr_CM": "Frances Simi (Camerún)", + "fr_DJ": "Frances Simi (Yibuti)", + "fr_DZ": "Frances Simi (Argelia)", + "fr_FR": "Frances Simi (Francia)", + "fr_GA": "Frances Simi (Gabón)", + "fr_GN": "Frances Simi (Guinea)", + "fr_GQ": "Frances Simi (Guinea Ecuatorial)", + "fr_HT": "Frances Simi (Haití)", + "fr_KM": "Frances Simi (Comoras)", + "fr_LU": "Frances Simi (Luxemburgo)", + "fr_MA": "Frances Simi (Marruecos)", + "fr_MC": "Frances Simi (Mónaco)", + "fr_MF": "Frances Simi (San Martín)", + "fr_MG": "Frances Simi (Madagascar)", + "fr_ML": "Frances Simi (Malí)", + "fr_MR": "Frances Simi (Mauritania)", + "fr_MU": "Frances Simi (Mauricio)", + "fr_NC": "Frances Simi (Nueva Caledonia)", + "fr_NE": "Frances Simi (Níger)", + "fr_PF": "Frances Simi (Polinesia Francesa)", + "fr_PM": "Frances Simi (San Pedro y Miquelón)", + "fr_RW": "Frances Simi (Ruanda)", + "fr_SC": "Frances Simi (Seychelles)", + "fr_SN": "Frances Simi (Senegal)", + "fr_SY": "Frances Simi (Siria)", + "fr_TD": "Frances Simi (Chad)", + "fr_TG": "Frances Simi (Togo)", + "fr_TN": "Frances Simi (Túnez)", + "fr_VU": "Frances Simi (Vanuatu)", + "fr_WF": "Frances Simi (Wallis y Futuna)", + "fy": "Frison Simi", + "fy_NL": "Frison Simi (Países Bajos)", + "ga": "Irlandes Simi", + "gd": "Gaelico Escoces Simi", + "gd_GB": "Gaelico Escoces Simi (Reino Unido)", + "gl": "Gallego Simi", + "gl_ES": "Gallego Simi (España)", + "gu": "Gujarati Simi", + "gu_IN": "Gujarati Simi (India)", + "ha": "Hausa Simi", + "ha_GH": "Hausa Simi (Ghana)", + "ha_NE": "Hausa Simi (Níger)", + "ha_NG": "Hausa Simi (Nigeria)", + "he": "Hebreo Simi", + "he_IL": "Hebreo Simi (Israel)", + "hi": "Hindi Simi", + "hi_IN": "Hindi Simi (India)", + "hr": "Croata Simi", + "hr_HR": "Croata Simi (Croacia)", + "hu": "Hungaro Simi", + "hy": "Armenio Simi", + "hy_AM": "Armenio Simi (Armenia)", + "id": "Indonesio Simi", + "id_ID": "Indonesio Simi (Indonesia)", + "ig": "Igbo Simi", + "ig_NG": "Igbo Simi (Nigeria)", + "ii": "Yi Simi", + "ii_CN": "Yi Simi (China)", + "is": "Islandes Simi", + "is_IS": "Islandes Simi (Islandia)", + "it": "Italiano Simi", + "it_CH": "Italiano Simi (Suiza)", + "it_IT": "Italiano Simi (Italia)", + "it_SM": "Italiano Simi (San Marino)", + "ja": "Japones Simi", + "ka": "Georgiano Simi", + "kk": "Kazajo Simi", + "kk_KZ": "Kazajo Simi (Kazajistán)", + "kl": "Groenlandes Simi", + "km": "Khmer Simi", + "km_KH": "Khmer Simi (Camboya)", + "kn": "Kannada Simi", + "kn_IN": "Kannada Simi (India)", + "ko": "Coreano Simi", + "ko_KP": "Coreano Simi (Corea del Norte)", + "ko_KR": "Coreano Simi (Corea del Sur)", + "ky": "Kirghiz Simi", + "ky_KG": "Kirghiz Simi (Kirguistán)", + "lb": "Luxemburgues Simi", + "lb_LU": "Luxemburgues Simi (Luxemburgo)", + "lo": "Lao Simi", + "lo_LA": "Lao Simi (Laos)", + "lt": "Lituano Simi", + "lt_LT": "Lituano Simi (Lituania)", + "lv": "Leton Simi", + "lv_LV": "Leton Simi (Letonia)", + "mk": "Macedonio Simi", + "mk_MK": "Macedonio Simi (ERY Macedonia)", + "ml": "Malayalam Simi", + "ml_IN": "Malayalam Simi (India)", + "mn": "Mongol Simi", + "mr": "Marathi Simi", + "mr_IN": "Marathi Simi (India)", + "ms": "Malayo Simi", + "ms_BN": "Malayo Simi (Brunéi)", + "ms_SG": "Malayo Simi (Singapur)", + "mt": "Maltes Simi", + "mt_MT": "Maltes Simi (Malta)", + "ne": "Nepali Simi", + "ne_IN": "Nepali Simi (India)", + "ne_NP": "Nepali Simi (Nepal)", + "nl": "Neerlandes Simi", + "nl_BE": "Neerlandes Simi (Bélgica)", + "nl_BQ": "Neerlandes Simi (Bonaire)", + "nl_CW": "Neerlandes Simi (Curazao)", + "nl_NL": "Neerlandes Simi (Países Bajos)", + "nl_SR": "Neerlandes Simi (Surinam)", + "nl_SX": "Neerlandes Simi (Sint Maarten)", + "no": "Noruego Simi", + "no_NO": "Noruego Simi (Noruega)", + "or": "Odia Simi", + "or_IN": "Odia Simi (India)", + "pa": "Punyabi Simi", + "pa_IN": "Punyabi Simi (India)", + "pa_PK": "Punyabi Simi (Pakistán)", + "pl": "Polaco Simi", + "pl_PL": "Polaco Simi (Polonia)", + "ps": "Pashto Simi", + "ps_AF": "Pashto Simi (Afganistán)", + "pt": "Portugues Simi", + "pt_AO": "Portugues Simi (Angola)", + "pt_BR": "Portugues Simi (Brasil)", + "pt_CH": "Portugues Simi (Suiza)", + "pt_GQ": "Portugues Simi (Guinea Ecuatorial)", + "pt_GW": "Portugues Simi (Guinea-Bisáu)", + "pt_LU": "Portugues Simi (Luxemburgo)", + "pt_MO": "Portugues Simi (Macao RAE)", + "pt_MZ": "Portugues Simi (Mozambique)", + "pt_PT": "Portugues Simi (Portugal)", + "pt_ST": "Portugues Simi (Santo Tomé y Príncipe)", + "pt_TL": "Portugues Simi (Timor-Leste)", + "qu": "Runasimi", + "qu_BO": "Runasimi (Bolivia)", + "qu_EC": "Runasimi (Ecuador)", + "qu_PE": "Runasimi (Perú)", + "rm": "Romanche Simi", + "rm_CH": "Romanche Simi (Suiza)", + "ro": "Rumano Simi", + "ro_MD": "Rumano Simi (Moldova)", + "ru": "Ruso Simi", + "ru_BY": "Ruso Simi (Belarús)", + "ru_KG": "Ruso Simi (Kirguistán)", + "ru_KZ": "Ruso Simi (Kazajistán)", + "ru_MD": "Ruso Simi (Moldova)", + "ru_RU": "Ruso Simi (Rusia)", + "rw": "Kinyarwanda Simi", + "rw_RW": "Kinyarwanda Simi (Ruanda)", + "se": "Chincha Sami Simi", + "se_FI": "Chincha Sami Simi (Finlandia)", + "se_NO": "Chincha Sami Simi (Noruega)", + "se_SE": "Chincha Sami Simi (Suecia)", + "si": "Cingales Simi", + "si_LK": "Cingales Simi (Sri Lanka)", + "sk": "Eslovaco Simi", + "sk_SK": "Eslovaco Simi (Eslovaquia)", + "sl": "Esloveno Simi", + "sl_SI": "Esloveno Simi (Eslovenia)", + "sq": "Albanes Simi", + "sq_AL": "Albanes Simi (Albania)", + "sq_MK": "Albanes Simi (ERY Macedonia)", + "sr": "Serbio Simi", + "sr_RS": "Serbio Simi (Serbia)", + "sv": "Sueco Simi", + "sv_FI": "Sueco Simi (Finlandia)", + "sv_SE": "Sueco Simi (Suecia)", + "sw": "Suajili Simi", + "sw_CD": "Suajili Simi (Congo (RDC))", + "sw_KE": "Suajili Simi (Kenia)", + "sw_TZ": "Suajili Simi (Tanzania)", + "sw_UG": "Suajili Simi (Uganda)", + "ta": "Tamil Simi", + "ta_IN": "Tamil Simi (India)", + "ta_LK": "Tamil Simi (Sri Lanka)", + "ta_SG": "Tamil Simi (Singapur)", + "te": "Telugu Simi", + "te_IN": "Telugu Simi (India)", + "th": "Tailandes Simi", + "th_TH": "Tailandes Simi (Tailandia)", + "ti": "Tigriña Simi", + "ti_ER": "Tigriña Simi (Eritrea)", + "ti_ET": "Tigriña Simi (Etiopía)", + "tr": "Turco Simi", + "tr_CY": "Turco Simi (Chipre)", + "tr_TR": "Turco Simi (Turquía)", + "ug": "Uigur Simi", + "ug_CN": "Uigur Simi (China)", + "uk": "Ucraniano Simi", + "ur": "Urdu Simi", + "ur_IN": "Urdu Simi (India)", + "ur_PK": "Urdu Simi (Pakistán)", + "uz": "Uzbeko Simi", + "uz_AF": "Uzbeko Simi (Afganistán)", + "uz_UZ": "Uzbeko Simi (Uzbekistán)", + "vi": "Vietnamita Simi", + "vi_VN": "Vietnamita Simi (Vietnam)", + "yo": "Yoruba Simi", + "yo_BJ": "Yoruba Simi (Benín)", + "yo_NG": "Yoruba Simi (Nigeria)", + "zh": "Chino Simi", + "zh_CN": "Chino Simi (China)", + "zh_HK": "Chino Simi (Hong Kong (RAE))", + "zh_MO": "Chino Simi (Macao RAE)", + "zh_SG": "Chino Simi (Singapur)", + "zu": "Isizulu Simi", + "zu_ZA": "Isizulu Simi (Sudáfrica)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/rm.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/rm.json new file mode 100644 index 0000000000000000000000000000000000000000..2f842405ac885e249ef2131154301c0f9e4d0e80 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/rm.json @@ -0,0 +1,555 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibia)", + "af_ZA": "afrikaans (Africa dal Sid)", + "ak": "akan", + "ak_GH": "akan (Ghana)", + "am": "amaric", + "am_ET": "amaric (Etiopia)", + "ar": "arab", + "ar_AE": "arab (Emirats Arabs Unids)", + "ar_BH": "arab (Bahrain)", + "ar_DJ": "arab (Dschibuti)", + "ar_DZ": "arab (Algeria)", + "ar_EG": "arab (Egipta)", + "ar_EH": "arab (Sahara Occidentala)", + "ar_ER": "arab (Eritrea)", + "ar_IL": "arab (Israel)", + "ar_IQ": "arab (Irac)", + "ar_JO": "arab (Jordania)", + "ar_KM": "arab (Comoras)", + "ar_KW": "arab (Kuwait)", + "ar_LB": "arab (Libanon)", + "ar_LY": "arab (Libia)", + "ar_MA": "arab (Maroc)", + "ar_MR": "arab (Mauretania)", + "ar_OM": "arab (Oman)", + "ar_PS": "arab (Territori Palestinais)", + "ar_QA": "arab (Katar)", + "ar_SA": "arab (Arabia Saudita)", + "ar_SD": "arab (Sudan)", + "ar_SO": "arab (Somalia)", + "ar_SY": "arab (Siria)", + "ar_TD": "arab (Tschad)", + "ar_TN": "arab (Tunesia)", + "ar_YE": "arab (Jemen)", + "as": "assami", + "as_IN": "assami (India)", + "az": "aserbeidschanic", + "az_AZ": "aserbeidschanic (Aserbaidschan)", + "az_Cyrl": "aserbeidschanic (cirillic)", + "az_Cyrl_AZ": "aserbeidschanic (cirillic, Aserbaidschan)", + "az_Latn": "aserbeidschanic (latin)", + "az_Latn_AZ": "aserbeidschanic (latin, Aserbaidschan)", + "be": "bieloruss", + "be_BY": "bieloruss (Bielorussia)", + "bg": "bulgar", + "bg_BG": "bulgar (Bulgaria)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengal", + "bn_BD": "bengal (Bangladesch)", + "bn_IN": "bengal (India)", + "bo": "tibetan", + "bo_CN": "tibetan (China)", + "bo_IN": "tibetan (India)", + "br": "breton", + "br_FR": "breton (Frantscha)", + "bs": "bosniac", + "bs_BA": "bosniac (Bosnia ed Erzegovina)", + "bs_Cyrl": "bosniac (cirillic)", + "bs_Cyrl_BA": "bosniac (cirillic, Bosnia ed Erzegovina)", + "bs_Latn": "bosniac (latin)", + "bs_Latn_BA": "bosniac (latin, Bosnia ed Erzegovina)", + "ca": "catalan", + "ca_AD": "catalan (Andorra)", + "ca_ES": "catalan (Spagna)", + "ca_FR": "catalan (Frantscha)", + "ca_IT": "catalan (Italia)", + "ce": "tschetschen", + "ce_RU": "tschetschen (Russia)", + "cs": "tschec", + "cs_CZ": "tschec (Republica Tscheca)", + "cy": "kimric", + "cy_GB": "kimric (Reginavel Unì)", + "da": "danais", + "da_DK": "danais (Danemarc)", + "da_GL": "danais (Grönlanda)", + "de": "tudestg", + "de_AT": "tudestg (Austria)", + "de_BE": "tudestg (Belgia)", + "de_CH": "tudestg (Svizra)", + "de_DE": "tudestg (Germania)", + "de_IT": "tudestg (Italia)", + "de_LI": "tudestg (Liechtenstein)", + "de_LU": "tudestg (Luxemburg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhutan)", + "ee": "ewe", + "ee_GH": "ewe (Ghana)", + "ee_TG": "ewe (Togo)", + "el": "grec", + "el_CY": "grec (Cipra)", + "el_GR": "grec (Grezia)", + "en": "englais", + "en_AG": "englais (Antigua e Barbuda)", + "en_AI": "englais (Anguilla)", + "en_AS": "englais (Samoa Americana)", + "en_AT": "englais (Austria)", + "en_AU": "englais (Australia)", + "en_BB": "englais (Barbados)", + "en_BE": "englais (Belgia)", + "en_BI": "englais (Burundi)", + "en_BM": "englais (Bermudas)", + "en_BS": "englais (Bahamas)", + "en_BW": "englais (Botswana)", + "en_BZ": "englais (Belize)", + "en_CA": "englais (Canada)", + "en_CC": "englais (Inslas Cocos)", + "en_CH": "englais (Svizra)", + "en_CK": "englais (Inslas Cook)", + "en_CM": "englais (Camerun)", + "en_CX": "englais (Insla da Christmas)", + "en_CY": "englais (Cipra)", + "en_DE": "englais (Germania)", + "en_DK": "englais (Danemarc)", + "en_DM": "englais (Dominica)", + "en_ER": "englais (Eritrea)", + "en_FI": "englais (Finlanda)", + "en_FJ": "englais (Fidschi)", + "en_FK": "englais (Inslas dal Falkland)", + "en_FM": "englais (Micronesia)", + "en_GB": "englais (Reginavel Unì)", + "en_GD": "englais (Grenada)", + "en_GG": "englais (Guernsey)", + "en_GH": "englais (Ghana)", + "en_GI": "englais (Gibraltar)", + "en_GM": "englais (Gambia)", + "en_GU": "englais (Guam)", + "en_GY": "englais (Guyana)", + "en_HK": "englais (Regiun d’administraziun speziala da Hongkong, China)", + "en_IE": "englais (Irlanda)", + "en_IL": "englais (Israel)", + "en_IM": "englais (Insla da Man)", + "en_IN": "englais (India)", + "en_IO": "englais (Territori Britannic en l’Ocean Indic)", + "en_JE": "englais (Jersey)", + "en_JM": "englais (Giamaica)", + "en_KE": "englais (Kenia)", + "en_KI": "englais (Kiribati)", + "en_KN": "englais (Saint Kitts e Nevis)", + "en_KY": "englais (Inslas Cayman)", + "en_LC": "englais (Saint Lucia)", + "en_LR": "englais (Liberia)", + "en_LS": "englais (Lesotho)", + "en_MG": "englais (Madagascar)", + "en_MH": "englais (Inslas da Marshall)", + "en_MO": "englais (Regiun d’administraziun speziala Macao, China)", + "en_MP": "englais (Inslas Mariannas dal Nord)", + "en_MS": "englais (Montserrat)", + "en_MT": "englais (Malta)", + "en_MU": "englais (Mauritius)", + "en_MW": "englais (Malawi)", + "en_MY": "englais (Malaisia)", + "en_NA": "englais (Namibia)", + "en_NF": "englais (Insla Norfolk)", + "en_NG": "englais (Nigeria)", + "en_NL": "englais (Pajais Bass)", + "en_NR": "englais (Nauru)", + "en_NU": "englais (Niue)", + "en_NZ": "englais (Nova Zelanda)", + "en_PG": "englais (Papua Nova Guinea)", + "en_PH": "englais (Filippinas)", + "en_PK": "englais (Pakistan)", + "en_PN": "englais (Pitcairn)", + "en_PR": "englais (Puerto Rico)", + "en_PW": "englais (Palau)", + "en_RW": "englais (Ruanda)", + "en_SB": "englais (Salomonas)", + "en_SC": "englais (Seychellas)", + "en_SD": "englais (Sudan)", + "en_SE": "englais (Svezia)", + "en_SG": "englais (Singapur)", + "en_SH": "englais (Sontg’Elena)", + "en_SI": "englais (Slovenia)", + "en_SL": "englais (Sierra Leone)", + "en_SZ": "englais (Swaziland)", + "en_TC": "englais (Inslas Turks e Caicos)", + "en_TK": "englais (Tokelau)", + "en_TO": "englais (Tonga)", + "en_TT": "englais (Trinidad e Tobago)", + "en_TV": "englais (Tuvalu)", + "en_TZ": "englais (Tansania)", + "en_UG": "englais (Uganda)", + "en_UM": "englais (Inslas pitschnas perifericas dals Stadis Unids da l’America)", + "en_US": "englais (Stadis Unids da l’America)", + "en_VC": "englais (Saint Vincent e las Grenadinas)", + "en_VG": "englais (Inslas Verginas Britannicas)", + "en_VI": "englais (Inslas Verginas Americanas)", + "en_VU": "englais (Vanuatu)", + "en_WS": "englais (Samoa)", + "en_ZA": "englais (Africa dal Sid)", + "en_ZM": "englais (Sambia)", + "en_ZW": "englais (Simbabwe)", + "eo": "esperanto", + "es": "spagnol", + "es_AR": "spagnol (Argentinia)", + "es_BO": "spagnol (Bolivia)", + "es_BR": "spagnol (Brasila)", + "es_CL": "spagnol (Chile)", + "es_CO": "spagnol (Columbia)", + "es_CR": "spagnol (Costa Rica)", + "es_CU": "spagnol (Cuba)", + "es_DO": "spagnol (Republica Dominicana)", + "es_EC": "spagnol (Ecuador)", + "es_ES": "spagnol (Spagna)", + "es_GQ": "spagnol (Guinea Equatoriala)", + "es_GT": "spagnol (Guatemala)", + "es_HN": "spagnol (Honduras)", + "es_MX": "spagnol (Mexico)", + "es_NI": "spagnol (Nicaragua)", + "es_PA": "spagnol (Panama)", + "es_PE": "spagnol (Peru)", + "es_PH": "spagnol (Filippinas)", + "es_PR": "spagnol (Puerto Rico)", + "es_PY": "spagnol (Paraguai)", + "es_SV": "spagnol (El Salvador)", + "es_US": "spagnol (Stadis Unids da l’America)", + "es_UY": "spagnol (Uruguay)", + "es_VE": "spagnol (Venezuela)", + "et": "eston", + "et_EE": "eston (Estonia)", + "eu": "basc", + "eu_ES": "basc (Spagna)", + "fa": "persian", + "fa_AF": "persian (Afghanistan)", + "fa_IR": "persian (Iran)", + "ff": "fulah", + "ff_CM": "fulah (Camerun)", + "ff_GN": "fulah (Guinea)", + "ff_MR": "fulah (Mauretania)", + "ff_SN": "fulah (Senegal)", + "fi": "finlandais", + "fi_FI": "finlandais (Finlanda)", + "fo": "ferrais", + "fo_DK": "ferrais (Danemarc)", + "fo_FO": "ferrais (Inslas Feroe)", + "fr": "franzos", + "fr_BE": "franzos (Belgia)", + "fr_BF": "franzos (Burkina Faso)", + "fr_BI": "franzos (Burundi)", + "fr_BJ": "franzos (Benin)", + "fr_BL": "franzos (Son Barthélemy)", + "fr_CA": "franzos (Canada)", + "fr_CD": "franzos (Republica Democratica dal Congo)", + "fr_CF": "franzos (Republica Centralafricana)", + "fr_CG": "franzos (Congo)", + "fr_CH": "franzos (Svizra)", + "fr_CI": "franzos (Costa d’Ivur)", + "fr_CM": "franzos (Camerun)", + "fr_DJ": "franzos (Dschibuti)", + "fr_DZ": "franzos (Algeria)", + "fr_FR": "franzos (Frantscha)", + "fr_GA": "franzos (Gabun)", + "fr_GF": "franzos (Guyana Franzosa)", + "fr_GN": "franzos (Guinea)", + "fr_GP": "franzos (Guadeloupe)", + "fr_GQ": "franzos (Guinea Equatoriala)", + "fr_HT": "franzos (Haiti)", + "fr_KM": "franzos (Comoras)", + "fr_LU": "franzos (Luxemburg)", + "fr_MA": "franzos (Maroc)", + "fr_MC": "franzos (Monaco)", + "fr_MF": "franzos (Saint Martin)", + "fr_MG": "franzos (Madagascar)", + "fr_ML": "franzos (Mali)", + "fr_MQ": "franzos (Martinique)", + "fr_MR": "franzos (Mauretania)", + "fr_MU": "franzos (Mauritius)", + "fr_NC": "franzos (Nova Caledonia)", + "fr_NE": "franzos (Niger)", + "fr_PF": "franzos (Polinesia Franzosa)", + "fr_PM": "franzos (Saint Pierre e Miquelon)", + "fr_RE": "franzos (Réunion)", + "fr_RW": "franzos (Ruanda)", + "fr_SC": "franzos (Seychellas)", + "fr_SN": "franzos (Senegal)", + "fr_SY": "franzos (Siria)", + "fr_TD": "franzos (Tschad)", + "fr_TG": "franzos (Togo)", + "fr_TN": "franzos (Tunesia)", + "fr_VU": "franzos (Vanuatu)", + "fr_WF": "franzos (Wallis e Futuna)", + "fr_YT": "franzos (Mayotte)", + "fy": "fris", + "fy_NL": "fris (Pajais Bass)", + "ga": "irlandais", + "ga_IE": "irlandais (Irlanda)", + "gd": "gaelic scot", + "gd_GB": "gaelic scot (Reginavel Unì)", + "gl": "galician", + "gl_ES": "galician (Spagna)", + "gu": "gujarati", + "gu_IN": "gujarati (India)", + "gv": "manx", + "gv_IM": "manx (Insla da Man)", + "ha": "haussa", + "ha_GH": "haussa (Ghana)", + "ha_NE": "haussa (Niger)", + "ha_NG": "haussa (Nigeria)", + "he": "ebraic", + "he_IL": "ebraic (Israel)", + "hi": "hindi", + "hi_IN": "hindi (India)", + "hr": "croat", + "hr_BA": "croat (Bosnia ed Erzegovina)", + "hr_HR": "croat (Croazia)", + "hu": "ungarais", + "hu_HU": "ungarais (Ungaria)", + "hy": "armen", + "hy_AM": "armen (Armenia)", + "id": "indonais", + "id_ID": "indonais (Indonesia)", + "ig": "igbo", + "ig_NG": "igbo (Nigeria)", + "ii": "sichuan yi", + "ii_CN": "sichuan yi (China)", + "is": "islandais", + "is_IS": "islandais (Islanda)", + "it": "talian", + "it_CH": "talian (Svizra)", + "it_IT": "talian (Italia)", + "it_SM": "talian (San Marino)", + "ja": "giapunais", + "ja_JP": "giapunais (Giapun)", + "ka": "georgian", + "ka_GE": "georgian (Georgia)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenia)", + "kk": "casac", + "kk_KZ": "casac (Kasachstan)", + "kl": "grönlandais", + "kl_GL": "grönlandais (Grönlanda)", + "km": "cambodschan", + "km_KH": "cambodschan (Cambodscha)", + "kn": "kannada", + "kn_IN": "kannada (India)", + "ko": "corean", + "ko_KP": "corean (Corea dal Nord)", + "ko_KR": "corean (Corea dal Sid)", + "ks": "kashmiri", + "ks_IN": "kashmiri (India)", + "kw": "cornic", + "kw_GB": "cornic (Reginavel Unì)", + "ky": "kirghis", + "ky_KG": "kirghis (Kirghisistan)", + "lb": "luxemburgais", + "lb_LU": "luxemburgais (Luxemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Republica Democratica dal Congo)", + "ln_CF": "lingala (Republica Centralafricana)", + "ln_CG": "lingala (Congo)", + "lo": "laot", + "lo_LA": "laot (Laos)", + "lt": "lituan", + "lt_LT": "lituan (Lituania)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Republica Democratica dal Congo)", + "lv": "letton", + "lv_LV": "letton (Lettonia)", + "mg": "malagassi", + "mg_MG": "malagassi (Madagascar)", + "mk": "macedon", + "mk_MK": "macedon (Macedonia)", + "ml": "malayalam", + "ml_IN": "malayalam (India)", + "mn": "mongolic", + "mn_MN": "mongolic (Mongolia)", + "mr": "marathi", + "mr_IN": "marathi (India)", + "ms": "malaic", + "ms_BN": "malaic (Brunei)", + "ms_MY": "malaic (Malaisia)", + "ms_SG": "malaic (Singapur)", + "mt": "maltais", + "mt_MT": "maltais (Malta)", + "my": "birman", + "my_MM": "birman (Myanmar)", + "nb": "norvegais bokmÃ¥l", + "nb_NO": "norvegais bokmÃ¥l (Norvegia)", + "nb_SJ": "norvegais bokmÃ¥l (Svalbard e Jan Mayen)", + "nd": "ndebele dal nord", + "nd_ZW": "ndebele dal nord (Simbabwe)", + "ne": "nepalais", + "ne_IN": "nepalais (India)", + "ne_NP": "nepalais (Nepal)", + "nl": "ollandais", + "nl_AW": "ollandais (Aruba)", + "nl_BE": "ollandais (Belgia)", + "nl_NL": "ollandais (Pajais Bass)", + "nl_SR": "ollandais (Surinam)", + "nn": "norvegiais nynorsk", + "nn_NO": "norvegiais nynorsk (Norvegia)", + "no": "norvegiais", + "no_NO": "norvegiais (Norvegia)", + "om": "oromo", + "om_ET": "oromo (Etiopia)", + "om_KE": "oromo (Kenia)", + "or": "oriya", + "or_IN": "oriya (India)", + "os": "ossetic", + "os_GE": "ossetic (Georgia)", + "os_RU": "ossetic (Russia)", + "pa": "punjabi", + "pa_Arab": "punjabi (arab)", + "pa_Arab_PK": "punjabi (arab, Pakistan)", + "pa_Guru": "punjabi (gurmukhi)", + "pa_Guru_IN": "punjabi (gurmukhi, India)", + "pa_IN": "punjabi (India)", + "pa_PK": "punjabi (Pakistan)", + "pl": "polac", + "pl_PL": "polac (Pologna)", + "ps": "paschto", + "ps_AF": "paschto (Afghanistan)", + "pt": "portugais", + "pt_AO": "portugais (Angola)", + "pt_BR": "portugais (Brasila)", + "pt_CH": "portugais (Svizra)", + "pt_CV": "portugais (Cap Verd)", + "pt_GQ": "portugais (Guinea Equatoriala)", + "pt_GW": "portugais (Guinea-Bissau)", + "pt_LU": "portugais (Luxemburg)", + "pt_MO": "portugais (Regiun d’administraziun speziala Macao, China)", + "pt_MZ": "portugais (Mosambic)", + "pt_PT": "portugais (Portugal)", + "pt_ST": "portugais (São Tomé e Principe)", + "pt_TL": "portugais (Timor da l’Ost)", + "qu": "quechua", + "qu_BO": "quechua (Bolivia)", + "qu_EC": "quechua (Ecuador)", + "qu_PE": "quechua (Peru)", + "rm": "rumantsch", + "rm_CH": "rumantsch (Svizra)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumen", + "ro_MD": "rumen (Moldavia)", + "ro_RO": "rumen (Rumenia)", + "ru": "russ", + "ru_BY": "russ (Bielorussia)", + "ru_KG": "russ (Kirghisistan)", + "ru_KZ": "russ (Kasachstan)", + "ru_MD": "russ (Moldavia)", + "ru_RU": "russ (Russia)", + "ru_UA": "russ (Ucraina)", + "rw": "kinyarwanda", + "rw_RW": "kinyarwanda (Ruanda)", + "se": "sami dal nord", + "se_FI": "sami dal nord (Finlanda)", + "se_NO": "sami dal nord (Norvegia)", + "se_SE": "sami dal nord (Svezia)", + "sg": "sango", + "sg_CF": "sango (Republica Centralafricana)", + "sh": "serbo-croat", + "sh_BA": "serbo-croat (Bosnia ed Erzegovina)", + "si": "singalais", + "si_LK": "singalais (Sri Lanka)", + "sk": "slovac", + "sk_SK": "slovac (Slovachia)", + "sl": "sloven", + "sl_SI": "sloven (Slovenia)", + "sn": "shona", + "sn_ZW": "shona (Simbabwe)", + "so": "somali", + "so_DJ": "somali (Dschibuti)", + "so_ET": "somali (Etiopia)", + "so_KE": "somali (Kenia)", + "so_SO": "somali (Somalia)", + "sq": "albanais", + "sq_AL": "albanais (Albania)", + "sq_MK": "albanais (Macedonia)", + "sr": "serb", + "sr_BA": "serb (Bosnia ed Erzegovina)", + "sr_Cyrl": "serb (cirillic)", + "sr_Cyrl_BA": "serb (cirillic, Bosnia ed Erzegovina)", + "sr_Cyrl_ME": "serb (cirillic, Montenegro)", + "sr_Cyrl_RS": "serb (cirillic, Serbia)", + "sr_Latn": "serb (latin)", + "sr_Latn_BA": "serb (latin, Bosnia ed Erzegovina)", + "sr_Latn_ME": "serb (latin, Montenegro)", + "sr_Latn_RS": "serb (latin, Serbia)", + "sr_ME": "serb (Montenegro)", + "sr_RS": "serb (Serbia)", + "sv": "svedais", + "sv_AX": "svedais (Inslas Aland)", + "sv_FI": "svedais (Finlanda)", + "sv_SE": "svedais (Svezia)", + "sw": "suahili", + "sw_CD": "suahili (Republica Democratica dal Congo)", + "sw_KE": "suahili (Kenia)", + "sw_TZ": "suahili (Tansania)", + "sw_UG": "suahili (Uganda)", + "ta": "tamil", + "ta_IN": "tamil (India)", + "ta_LK": "tamil (Sri Lanka)", + "ta_MY": "tamil (Malaisia)", + "ta_SG": "tamil (Singapur)", + "te": "telugu", + "te_IN": "telugu (India)", + "th": "tailandais", + "th_TH": "tailandais (Tailanda)", + "ti": "tigrinya", + "ti_ER": "tigrinya (Eritrea)", + "ti_ET": "tigrinya (Etiopia)", + "tl": "tagalog", + "tl_PH": "tagalog (Filippinas)", + "to": "tonga", + "to_TO": "tonga (Tonga)", + "tr": "tirc", + "tr_CY": "tirc (Cipra)", + "tr_TR": "tirc (Tirchia)", + "ug": "uiguric", + "ug_CN": "uiguric (China)", + "uk": "ucranais", + "uk_UA": "ucranais (Ucraina)", + "ur": "urdu", + "ur_IN": "urdu (India)", + "ur_PK": "urdu (Pakistan)", + "uz": "usbec", + "uz_AF": "usbec (Afghanistan)", + "uz_Arab": "usbec (arab)", + "uz_Arab_AF": "usbec (arab, Afghanistan)", + "uz_Cyrl": "usbec (cirillic)", + "uz_Cyrl_UZ": "usbec (cirillic, Usbekistan)", + "uz_Latn": "usbec (latin)", + "uz_Latn_UZ": "usbec (latin, Usbekistan)", + "uz_UZ": "usbec (Usbekistan)", + "vi": "vietnamais", + "vi_VN": "vietnamais (Vietnam)", + "yi": "jiddic", + "yo": "yoruba", + "yo_BJ": "yoruba (Benin)", + "yo_NG": "yoruba (Nigeria)", + "zh": "chinais", + "zh_CN": "chinais (China)", + "zh_HK": "chinais (Regiun d’administraziun speziala da Hongkong, China)", + "zh_Hans": "chinais (scrittira chinaisa simplifitgada)", + "zh_Hans_CN": "chinais (scrittira chinaisa simplifitgada, China)", + "zh_Hans_HK": "chinais (scrittira chinaisa simplifitgada, Regiun d’administraziun speziala da Hongkong, China)", + "zh_Hans_MO": "chinais (scrittira chinaisa simplifitgada, Regiun d’administraziun speziala Macao, China)", + "zh_Hans_SG": "chinais (scrittira chinaisa simplifitgada, Singapur)", + "zh_Hant": "chinais (scrittira chinaisa tradiziunala)", + "zh_Hant_HK": "chinais (scrittira chinaisa tradiziunala, Regiun d’administraziun speziala da Hongkong, China)", + "zh_Hant_MO": "chinais (scrittira chinaisa tradiziunala, Regiun d’administraziun speziala Macao, China)", + "zh_Hant_TW": "chinais (scrittira chinaisa tradiziunala, Taiwan)", + "zh_MO": "chinais (Regiun d’administraziun speziala Macao, China)", + "zh_SG": "chinais (Singapur)", + "zh_TW": "chinais (Taiwan)", + "zu": "zulu", + "zu_ZA": "zulu (Africa dal Sid)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/rn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/rn.json new file mode 100644 index 0000000000000000000000000000000000000000..fe43fc3866d8fdff6425dbd98afb8344ae1859e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/rn.json @@ -0,0 +1,321 @@ +{ + "Names": { + "ak": "Igikani", + "ak_GH": "Igikani (Gana)", + "am": "Ikimuhariki", + "am_ET": "Ikimuhariki (Etiyopiya)", + "ar": "Icarabu", + "ar_AE": "Icarabu (Leta Zunze Ubumwe z’Abarabu)", + "ar_BH": "Icarabu (Bahareyini)", + "ar_DJ": "Icarabu (Jibuti)", + "ar_DZ": "Icarabu (Alijeriya)", + "ar_EG": "Icarabu (Misiri)", + "ar_ER": "Icarabu (Elitereya)", + "ar_IL": "Icarabu (Isiraheli)", + "ar_IQ": "Icarabu (Iraki)", + "ar_JO": "Icarabu (Yorudaniya)", + "ar_KM": "Icarabu (Izinga rya Komore)", + "ar_KW": "Icarabu (Koweti)", + "ar_LB": "Icarabu (Libani)", + "ar_LY": "Icarabu (Libiya)", + "ar_MA": "Icarabu (Maroke)", + "ar_MR": "Icarabu (Moritaniya)", + "ar_OM": "Icarabu (Omani)", + "ar_PS": "Icarabu (Palesitina Wesitibanka na Gaza)", + "ar_QA": "Icarabu (Katari)", + "ar_SA": "Icarabu (Arabiya Sawudite)", + "ar_SD": "Icarabu (Sudani)", + "ar_SO": "Icarabu (Somaliya)", + "ar_SY": "Icarabu (Siriya)", + "ar_TD": "Icarabu (Cadi)", + "ar_TN": "Icarabu (Tuniziya)", + "ar_YE": "Icarabu (Yemeni)", + "be": "Ikibelarusiya", + "be_BY": "Ikibelarusiya (Belausi)", + "bg": "Ikinyabuligariya", + "bg_BG": "Ikinyabuligariya (Buligariya)", + "bn": "Ikibengali", + "bn_BD": "Ikibengali (Bangaladeshi)", + "bn_IN": "Ikibengali (Ubuhindi)", + "cs": "Igiceke", + "cs_CZ": "Igiceke (Repubulika ya Ceke)", + "de": "Ikidage", + "de_AT": "Ikidage (Otirishe)", + "de_BE": "Ikidage (Ububiligi)", + "de_CH": "Ikidage (Ubusuwisi)", + "de_DE": "Ikidage (Ubudage)", + "de_IT": "Ikidage (Ubutaliyani)", + "de_LI": "Ikidage (Lishyitenshitayini)", + "de_LU": "Ikidage (Lukusamburu)", + "el": "Ikigereki", + "el_CY": "Ikigereki (Izinga rya Shipure)", + "el_GR": "Ikigereki (Ubugereki)", + "en": "Icongereza", + "en_AG": "Icongereza (Antigwa na Baribuda)", + "en_AI": "Icongereza (Angwila)", + "en_AS": "Icongereza (Samowa nyamerika)", + "en_AT": "Icongereza (Otirishe)", + "en_AU": "Icongereza (Ositaraliya)", + "en_BB": "Icongereza (Barubadosi)", + "en_BE": "Icongereza (Ububiligi)", + "en_BI": "Icongereza (Uburundi)", + "en_BM": "Icongereza (Berimuda)", + "en_BS": "Icongereza (Bahamasi)", + "en_BW": "Icongereza (Botswana)", + "en_BZ": "Icongereza (Belize)", + "en_CA": "Icongereza (Kanada)", + "en_CH": "Icongereza (Ubusuwisi)", + "en_CK": "Icongereza (Izinga rya Kuku)", + "en_CM": "Icongereza (Kameruni)", + "en_CY": "Icongereza (Izinga rya Shipure)", + "en_DE": "Icongereza (Ubudage)", + "en_DK": "Icongereza (Danimariki)", + "en_DM": "Icongereza (Dominika)", + "en_ER": "Icongereza (Elitereya)", + "en_FI": "Icongereza (Finilandi)", + "en_FJ": "Icongereza (Fiji)", + "en_FK": "Icongereza (Izinga rya Filikilandi)", + "en_FM": "Icongereza (Mikoroniziya)", + "en_GB": "Icongereza (Ubwongereza)", + "en_GD": "Icongereza (Gerenada)", + "en_GH": "Icongereza (Gana)", + "en_GI": "Icongereza (Juburalitari)", + "en_GM": "Icongereza (Gambiya)", + "en_GU": "Icongereza (Gwamu)", + "en_GY": "Icongereza (Guyane)", + "en_IE": "Icongereza (Irilandi)", + "en_IL": "Icongereza (Isiraheli)", + "en_IN": "Icongereza (Ubuhindi)", + "en_IO": "Icongereza (Intara y’Ubwongereza yo mu birwa by’Abahindi)", + "en_JM": "Icongereza (Jamayika)", + "en_KE": "Icongereza (Kenya)", + "en_KI": "Icongereza (Kiribati)", + "en_KN": "Icongereza (Sekitsi na Nevisi)", + "en_KY": "Icongereza (Ibirwa bya Keyimani)", + "en_LC": "Icongereza (Selusiya)", + "en_LR": "Icongereza (Liberiya)", + "en_LS": "Icongereza (Lesoto)", + "en_MG": "Icongereza (Madagasikari)", + "en_MH": "Icongereza (Izinga rya Marishari)", + "en_MP": "Icongereza (Amazinga ya Mariyana ryo mu majaruguru)", + "en_MS": "Icongereza (Monteserati)", + "en_MT": "Icongereza (Malita)", + "en_MU": "Icongereza (Izinga rya Morise)", + "en_MW": "Icongereza (Malawi)", + "en_MY": "Icongereza (Maleziya)", + "en_NA": "Icongereza (Namibiya)", + "en_NF": "Icongereza (izinga rya Norufoluke)", + "en_NG": "Icongereza (Nijeriya)", + "en_NL": "Icongereza (Ubuholandi)", + "en_NR": "Icongereza (Nawuru)", + "en_NU": "Icongereza (Niyuwe)", + "en_NZ": "Icongereza (Nuvelizelandi)", + "en_PG": "Icongereza (Papuwa Niyugineya)", + "en_PH": "Icongereza (Amazinga ya Filipine)", + "en_PK": "Icongereza (Pakisitani)", + "en_PN": "Icongereza (Pitikeyirini)", + "en_PR": "Icongereza (Puwetoriko)", + "en_PW": "Icongereza (Palawu)", + "en_RW": "Icongereza (u Rwanda)", + "en_SB": "Icongereza (Amazinga ya Salumoni)", + "en_SC": "Icongereza (Amazinga ya Seyisheli)", + "en_SD": "Icongereza (Sudani)", + "en_SE": "Icongereza (Suwedi)", + "en_SG": "Icongereza (Singapuru)", + "en_SH": "Icongereza (Sehelene)", + "en_SI": "Icongereza (Siloveniya)", + "en_SL": "Icongereza (Siyeralewone)", + "en_SZ": "Icongereza (Suwazilandi)", + "en_TC": "Icongereza (Amazinga ya Turkisi na Cayikosi)", + "en_TK": "Icongereza (Tokelawu)", + "en_TO": "Icongereza (Tonga)", + "en_TT": "Icongereza (Tirinidadi na Tobago)", + "en_TV": "Icongereza (Tuvalu)", + "en_TZ": "Icongereza (Tanzaniya)", + "en_UG": "Icongereza (Ubugande)", + "en_US": "Icongereza (Leta Zunze Ubumwe za Amerika)", + "en_VC": "Icongereza (Sevensa na Gerenadine)", + "en_VG": "Icongereza (Ibirwa by’isugi by’Abongereza)", + "en_VI": "Icongereza (Amazinga y’Isugi y’Abanyamerika)", + "en_VU": "Icongereza (Vanuwatu)", + "en_WS": "Icongereza (Samowa)", + "en_ZA": "Icongereza (Afurika y’Epfo)", + "en_ZM": "Icongereza (Zambiya)", + "en_ZW": "Icongereza (Zimbabwe)", + "es": "Icesipanyolo", + "es_AR": "Icesipanyolo (Arijantine)", + "es_BO": "Icesipanyolo (Boliviya)", + "es_BR": "Icesipanyolo (Burezili)", + "es_CL": "Icesipanyolo (Shili)", + "es_CO": "Icesipanyolo (Kolombiya)", + "es_CR": "Icesipanyolo (Kositarika)", + "es_CU": "Icesipanyolo (Kiba)", + "es_DO": "Icesipanyolo (Repubulika ya Dominika)", + "es_EC": "Icesipanyolo (Ekwateri)", + "es_ES": "Icesipanyolo (Hisipaniya)", + "es_GQ": "Icesipanyolo (Gineya Ekwatoriyali)", + "es_GT": "Icesipanyolo (Gwatemala)", + "es_HN": "Icesipanyolo (Hondurasi)", + "es_MX": "Icesipanyolo (Migizike)", + "es_NI": "Icesipanyolo (Nikaragwa)", + "es_PA": "Icesipanyolo (Panama)", + "es_PE": "Icesipanyolo (Peru)", + "es_PH": "Icesipanyolo (Amazinga ya Filipine)", + "es_PR": "Icesipanyolo (Puwetoriko)", + "es_PY": "Icesipanyolo (Paragwe)", + "es_SV": "Icesipanyolo (Eli Saluvatori)", + "es_US": "Icesipanyolo (Leta Zunze Ubumwe za Amerika)", + "es_UY": "Icesipanyolo (Irigwe)", + "es_VE": "Icesipanyolo (Venezuwela)", + "fa": "Igiperisi", + "fa_AF": "Igiperisi (Afuganisitani)", + "fa_IR": "Igiperisi (Irani)", + "fr": "Igifaransa", + "fr_BE": "Igifaransa (Ububiligi)", + "fr_BF": "Igifaransa (Burukina Faso)", + "fr_BI": "Igifaransa (Uburundi)", + "fr_BJ": "Igifaransa (Bene)", + "fr_CA": "Igifaransa (Kanada)", + "fr_CD": "Igifaransa (Repubulika Iharanira Demokarasi ya Kongo)", + "fr_CF": "Igifaransa (Repubulika ya Santarafurika)", + "fr_CG": "Igifaransa (Kongo)", + "fr_CH": "Igifaransa (Ubusuwisi)", + "fr_CI": "Igifaransa (Kotedivuware)", + "fr_CM": "Igifaransa (Kameruni)", + "fr_DJ": "Igifaransa (Jibuti)", + "fr_DZ": "Igifaransa (Alijeriya)", + "fr_FR": "Igifaransa (Ubufaransa)", + "fr_GA": "Igifaransa (Gabo)", + "fr_GF": "Igifaransa (Gwayana y’Abafaransa)", + "fr_GN": "Igifaransa (Guneya)", + "fr_GP": "Igifaransa (Gwadelupe)", + "fr_GQ": "Igifaransa (Gineya Ekwatoriyali)", + "fr_HT": "Igifaransa (Hayiti)", + "fr_KM": "Igifaransa (Izinga rya Komore)", + "fr_LU": "Igifaransa (Lukusamburu)", + "fr_MA": "Igifaransa (Maroke)", + "fr_MC": "Igifaransa (Monako)", + "fr_MG": "Igifaransa (Madagasikari)", + "fr_ML": "Igifaransa (Mali)", + "fr_MQ": "Igifaransa (Maritiniki)", + "fr_MR": "Igifaransa (Moritaniya)", + "fr_MU": "Igifaransa (Izinga rya Morise)", + "fr_NC": "Igifaransa (Niyukaledoniya)", + "fr_NE": "Igifaransa (Nijeri)", + "fr_PF": "Igifaransa (Polineziya y’Abafaransa)", + "fr_PM": "Igifaransa (Sempiyeri na Mikeloni)", + "fr_RE": "Igifaransa (Amazinga ya Reyiniyo)", + "fr_RW": "Igifaransa (u Rwanda)", + "fr_SC": "Igifaransa (Amazinga ya Seyisheli)", + "fr_SN": "Igifaransa (Senegali)", + "fr_SY": "Igifaransa (Siriya)", + "fr_TD": "Igifaransa (Cadi)", + "fr_TG": "Igifaransa (Togo)", + "fr_TN": "Igifaransa (Tuniziya)", + "fr_VU": "Igifaransa (Vanuwatu)", + "fr_WF": "Igifaransa (Walisi na Futuna)", + "fr_YT": "Igifaransa (Mayote)", + "ha": "Igihawusa", + "ha_GH": "Igihawusa (Gana)", + "ha_NE": "Igihawusa (Nijeri)", + "ha_NG": "Igihawusa (Nijeriya)", + "hi": "Igihindi", + "hi_IN": "Igihindi (Ubuhindi)", + "hu": "Ikinyahongiriya", + "hu_HU": "Ikinyahongiriya (Hungariya)", + "id": "Ikinyendoziya", + "id_ID": "Ikinyendoziya (Indoneziya)", + "ig": "Ikigubo", + "ig_NG": "Ikigubo (Nijeriya)", + "it": "Igitaliyani", + "it_CH": "Igitaliyani (Ubusuwisi)", + "it_IT": "Igitaliyani (Ubutaliyani)", + "it_SM": "Igitaliyani (Sanimarino)", + "ja": "Ikiyapani", + "ja_JP": "Ikiyapani (Ubuyapani)", + "km": "Igikambodiya", + "km_KH": "Igikambodiya (Kamboje)", + "ko": "Ikinyakoreya", + "ko_KP": "Ikinyakoreya (Koreya y’amajaruguru)", + "ko_KR": "Ikinyakoreya (Koreya y’amajepfo)", + "ms": "Ikinyamaleziya", + "ms_BN": "Ikinyamaleziya (Buruneyi)", + "ms_MY": "Ikinyamaleziya (Maleziya)", + "ms_SG": "Ikinyamaleziya (Singapuru)", + "my": "Ikinyabirimaniya", + "my_MM": "Ikinyabirimaniya (Birimaniya)", + "ne": "Ikinepali", + "ne_IN": "Ikinepali (Ubuhindi)", + "ne_NP": "Ikinepali (Nepali)", + "nl": "Igiholandi", + "nl_AW": "Igiholandi (Aruba)", + "nl_BE": "Igiholandi (Ububiligi)", + "nl_NL": "Igiholandi (Ubuholandi)", + "nl_SR": "Igiholandi (Suriname)", + "pa": "Igipunjabi", + "pa_IN": "Igipunjabi (Ubuhindi)", + "pa_PK": "Igipunjabi (Pakisitani)", + "pl": "Ikinyapolonye", + "pl_PL": "Ikinyapolonye (Polonye)", + "pt": "Igiporutugari", + "pt_AO": "Igiporutugari (Angola)", + "pt_BR": "Igiporutugari (Burezili)", + "pt_CH": "Igiporutugari (Ubusuwisi)", + "pt_CV": "Igiporutugari (Ibirwa bya Kapuveri)", + "pt_GQ": "Igiporutugari (Gineya Ekwatoriyali)", + "pt_GW": "Igiporutugari (Gineya Bisawu)", + "pt_LU": "Igiporutugari (Lukusamburu)", + "pt_MZ": "Igiporutugari (Mozambiki)", + "pt_PT": "Igiporutugari (Porutugali)", + "pt_ST": "Igiporutugari (Sawotome na Perensipe)", + "pt_TL": "Igiporutugari (Timoru y’iburasirazuba)", + "rn": "Ikirundi", + "rn_BI": "Ikirundi (Uburundi)", + "ro": "Ikinyarumaniya", + "ro_MD": "Ikinyarumaniya (Moludavi)", + "ro_RO": "Ikinyarumaniya (Rumaniya)", + "ru": "Ikirusiya", + "ru_BY": "Ikirusiya (Belausi)", + "ru_KG": "Ikirusiya (Kirigisitani)", + "ru_KZ": "Ikirusiya (Kazakisitani)", + "ru_MD": "Ikirusiya (Moludavi)", + "ru_RU": "Ikirusiya (Uburusiya)", + "ru_UA": "Ikirusiya (Ikerene)", + "rw": "Ikinyarwanda", + "rw_RW": "Ikinyarwanda (u Rwanda)", + "so": "Igisomali", + "so_DJ": "Igisomali (Jibuti)", + "so_ET": "Igisomali (Etiyopiya)", + "so_KE": "Igisomali (Kenya)", + "so_SO": "Igisomali (Somaliya)", + "sv": "Igisuweduwa", + "sv_FI": "Igisuweduwa (Finilandi)", + "sv_SE": "Igisuweduwa (Suwedi)", + "ta": "Igitamili", + "ta_IN": "Igitamili (Ubuhindi)", + "ta_LK": "Igitamili (Sirilanka)", + "ta_MY": "Igitamili (Maleziya)", + "ta_SG": "Igitamili (Singapuru)", + "th": "Ikinyatayilandi", + "th_TH": "Ikinyatayilandi (Tayilandi)", + "tr": "Igiturukiya", + "tr_CY": "Igiturukiya (Izinga rya Shipure)", + "tr_TR": "Igiturukiya (Turukiya)", + "uk": "Ikinyayukereni", + "uk_UA": "Ikinyayukereni (Ikerene)", + "ur": "Inyeyurudu", + "ur_IN": "Inyeyurudu (Ubuhindi)", + "ur_PK": "Inyeyurudu (Pakisitani)", + "vi": "Ikinyaviyetinamu", + "vi_VN": "Ikinyaviyetinamu (Viyetinamu)", + "yo": "Ikiyoruba", + "yo_BJ": "Ikiyoruba (Bene)", + "yo_NG": "Ikiyoruba (Nijeriya)", + "zh": "Igishinwa", + "zh_CN": "Igishinwa (Ubushinwa)", + "zh_SG": "Igishinwa (Singapuru)", + "zh_TW": "Igishinwa (Tayiwani)", + "zu": "Ikizulu", + "zu_ZA": "Ikizulu (Afurika y’Epfo)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ro.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ro.json new file mode 100644 index 0000000000000000000000000000000000000000..2372763071676131556e4f14c92a935363b8b391 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ro.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibia)", + "af_ZA": "afrikaans (Africa de Sud)", + "ak": "akan", + "ak_GH": "akan (Ghana)", + "am": "amharică", + "am_ET": "amharică (Etiopia)", + "ar": "arabă", + "ar_AE": "arabă (Emiratele Arabe Unite)", + "ar_BH": "arabă (Bahrain)", + "ar_DJ": "arabă (Djibouti)", + "ar_DZ": "arabă (Algeria)", + "ar_EG": "arabă (Egipt)", + "ar_EH": "arabă (Sahara Occidentală)", + "ar_ER": "arabă (Eritreea)", + "ar_IL": "arabă (Israel)", + "ar_IQ": "arabă (Irak)", + "ar_JO": "arabă (Iordania)", + "ar_KM": "arabă (Comore)", + "ar_KW": "arabă (Kuweit)", + "ar_LB": "arabă (Liban)", + "ar_LY": "arabă (Libia)", + "ar_MA": "arabă (Maroc)", + "ar_MR": "arabă (Mauritania)", + "ar_OM": "arabă (Oman)", + "ar_PS": "arabă (Teritoriile Palestiniene)", + "ar_QA": "arabă (Qatar)", + "ar_SA": "arabă (Arabia Saudită)", + "ar_SD": "arabă (Sudan)", + "ar_SO": "arabă (Somalia)", + "ar_SS": "arabă (Sudanul de Sud)", + "ar_SY": "arabă (Siria)", + "ar_TD": "arabă (Ciad)", + "ar_TN": "arabă (Tunisia)", + "ar_YE": "arabă (Yemen)", + "as": "asameză", + "as_IN": "asameză (India)", + "az": "azeră", + "az_AZ": "azeră (Azerbaidjan)", + "az_Cyrl": "azeră (chirilică)", + "az_Cyrl_AZ": "azeră (chirilică, Azerbaidjan)", + "az_Latn": "azeră (latină)", + "az_Latn_AZ": "azeră (latină, Azerbaidjan)", + "be": "bielorusă", + "be_BY": "bielorusă (Belarus)", + "bg": "bulgară", + "bg_BG": "bulgară (Bulgaria)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengaleză", + "bn_BD": "bengaleză (Bangladesh)", + "bn_IN": "bengaleză (India)", + "bo": "tibetană", + "bo_CN": "tibetană (China)", + "bo_IN": "tibetană (India)", + "br": "bretonă", + "br_FR": "bretonă (FranÈ›a)", + "bs": "bosniacă", + "bs_BA": "bosniacă (Bosnia È™i HerÈ›egovina)", + "bs_Cyrl": "bosniacă (chirilică)", + "bs_Cyrl_BA": "bosniacă (chirilică, Bosnia È™i HerÈ›egovina)", + "bs_Latn": "bosniacă (latină)", + "bs_Latn_BA": "bosniacă (latină, Bosnia È™i HerÈ›egovina)", + "ca": "catalană", + "ca_AD": "catalană (Andorra)", + "ca_ES": "catalană (Spania)", + "ca_FR": "catalană (FranÈ›a)", + "ca_IT": "catalană (Italia)", + "ce": "cecenă", + "ce_RU": "cecenă (Rusia)", + "cs": "cehă", + "cs_CZ": "cehă (Republica Cehă)", + "cy": "galeză", + "cy_GB": "galeză (Regatul Unit)", + "da": "daneză", + "da_DK": "daneză (Danemarca)", + "da_GL": "daneză (Groenlanda)", + "de": "germană", + "de_AT": "germană (Austria)", + "de_BE": "germană (Belgia)", + "de_CH": "germană (ElveÈ›ia)", + "de_DE": "germană (Germania)", + "de_IT": "germană (Italia)", + "de_LI": "germană (Liechtenstein)", + "de_LU": "germană (Luxemburg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhutan)", + "ee": "ewe", + "ee_GH": "ewe (Ghana)", + "ee_TG": "ewe (Togo)", + "el": "greacă", + "el_CY": "greacă (Cipru)", + "el_GR": "greacă (Grecia)", + "en": "engleză", + "en_AG": "engleză (Antigua È™i Barbuda)", + "en_AI": "engleză (Anguilla)", + "en_AS": "engleză (Samoa Americană)", + "en_AT": "engleză (Austria)", + "en_AU": "engleză (Australia)", + "en_BB": "engleză (Barbados)", + "en_BE": "engleză (Belgia)", + "en_BI": "engleză (Burundi)", + "en_BM": "engleză (Bermuda)", + "en_BS": "engleză (Bahamas)", + "en_BW": "engleză (Botswana)", + "en_BZ": "engleză (Belize)", + "en_CA": "engleză (Canada)", + "en_CC": "engleză (Insulele Cocos (Keeling))", + "en_CH": "engleză (ElveÈ›ia)", + "en_CK": "engleză (Insulele Cook)", + "en_CM": "engleză (Camerun)", + "en_CX": "engleză (Insula Christmas)", + "en_CY": "engleză (Cipru)", + "en_DE": "engleză (Germania)", + "en_DG": "engleză (Diego Garcia)", + "en_DK": "engleză (Danemarca)", + "en_DM": "engleză (Dominica)", + "en_ER": "engleză (Eritreea)", + "en_FI": "engleză (Finlanda)", + "en_FJ": "engleză (Fiji)", + "en_FK": "engleză (Insulele Falkland)", + "en_FM": "engleză (Micronezia)", + "en_GB": "engleză (Regatul Unit)", + "en_GD": "engleză (Grenada)", + "en_GG": "engleză (Guernsey)", + "en_GH": "engleză (Ghana)", + "en_GI": "engleză (Gibraltar)", + "en_GM": "engleză (Gambia)", + "en_GU": "engleză (Guam)", + "en_GY": "engleză (Guyana)", + "en_HK": "engleză (R.A.S. Hong Kong a Chinei)", + "en_IE": "engleză (Irlanda)", + "en_IL": "engleză (Israel)", + "en_IM": "engleză (Insula Man)", + "en_IN": "engleză (India)", + "en_IO": "engleză (Teritoriul Britanic din Oceanul Indian)", + "en_JE": "engleză (Jersey)", + "en_JM": "engleză (Jamaica)", + "en_KE": "engleză (Kenya)", + "en_KI": "engleză (Kiribati)", + "en_KN": "engleză (Saint Kitts È™i Nevis)", + "en_KY": "engleză (Insulele Cayman)", + "en_LC": "engleză (Sfânta Lucia)", + "en_LR": "engleză (Liberia)", + "en_LS": "engleză (Lesotho)", + "en_MG": "engleză (Madagascar)", + "en_MH": "engleză (Insulele Marshall)", + "en_MO": "engleză (R.A.S. Macao a Chinei)", + "en_MP": "engleză (Insulele Mariane de Nord)", + "en_MS": "engleză (Montserrat)", + "en_MT": "engleză (Malta)", + "en_MU": "engleză (Mauritius)", + "en_MW": "engleză (Malawi)", + "en_MY": "engleză (Malaysia)", + "en_NA": "engleză (Namibia)", + "en_NF": "engleză (Insula Norfolk)", + "en_NG": "engleză (Nigeria)", + "en_NL": "engleză (Țările de Jos)", + "en_NR": "engleză (Nauru)", + "en_NU": "engleză (Niue)", + "en_NZ": "engleză (Noua Zeelandă)", + "en_PG": "engleză (Papua-Noua Guinee)", + "en_PH": "engleză (Filipine)", + "en_PK": "engleză (Pakistan)", + "en_PN": "engleză (Insulele Pitcairn)", + "en_PR": "engleză (Puerto Rico)", + "en_PW": "engleză (Palau)", + "en_RW": "engleză (Rwanda)", + "en_SB": "engleză (Insulele Solomon)", + "en_SC": "engleză (Seychelles)", + "en_SD": "engleză (Sudan)", + "en_SE": "engleză (Suedia)", + "en_SG": "engleză (Singapore)", + "en_SH": "engleză (Sfânta Elena)", + "en_SI": "engleză (Slovenia)", + "en_SL": "engleză (Sierra Leone)", + "en_SS": "engleză (Sudanul de Sud)", + "en_SX": "engleză (Sint-Maarten)", + "en_SZ": "engleză (Swaziland)", + "en_TC": "engleză (Insulele Turks È™i Caicos)", + "en_TK": "engleză (Tokelau)", + "en_TO": "engleză (Tonga)", + "en_TT": "engleză (Trinidad È™i Tobago)", + "en_TV": "engleză (Tuvalu)", + "en_TZ": "engleză (Tanzania)", + "en_UG": "engleză (Uganda)", + "en_UM": "engleză (Insulele ÃŽndepărtate ale S.U.A.)", + "en_US": "engleză (Statele Unite ale Americii)", + "en_VC": "engleză (Saint Vincent È™i Grenadinele)", + "en_VG": "engleză (Insulele Virgine Britanice)", + "en_VI": "engleză (Insulele Virgine Americane)", + "en_VU": "engleză (Vanuatu)", + "en_WS": "engleză (Samoa)", + "en_ZA": "engleză (Africa de Sud)", + "en_ZM": "engleză (Zambia)", + "en_ZW": "engleză (Zimbabwe)", + "eo": "esperanto", + "es": "spaniolă", + "es_AR": "spaniolă (Argentina)", + "es_BO": "spaniolă (Bolivia)", + "es_BR": "spaniolă (Brazilia)", + "es_CL": "spaniolă (Chile)", + "es_CO": "spaniolă (Columbia)", + "es_CR": "spaniolă (Costa Rica)", + "es_CU": "spaniolă (Cuba)", + "es_DO": "spaniolă (Republica Dominicană)", + "es_EA": "spaniolă (Ceuta È™i Melilla)", + "es_EC": "spaniolă (Ecuador)", + "es_ES": "spaniolă (Spania)", + "es_GQ": "spaniolă (Guineea Ecuatorială)", + "es_GT": "spaniolă (Guatemala)", + "es_HN": "spaniolă (Honduras)", + "es_IC": "spaniolă (Insulele Canare)", + "es_MX": "spaniolă (Mexic)", + "es_NI": "spaniolă (Nicaragua)", + "es_PA": "spaniolă (Panama)", + "es_PE": "spaniolă (Peru)", + "es_PH": "spaniolă (Filipine)", + "es_PR": "spaniolă (Puerto Rico)", + "es_PY": "spaniolă (Paraguay)", + "es_SV": "spaniolă (El Salvador)", + "es_US": "spaniolă (Statele Unite ale Americii)", + "es_UY": "spaniolă (Uruguay)", + "es_VE": "spaniolă (Venezuela)", + "et": "estonă", + "et_EE": "estonă (Estonia)", + "eu": "bască", + "eu_ES": "bască (Spania)", + "fa": "persană", + "fa_AF": "persană (Afganistan)", + "fa_IR": "persană (Iran)", + "ff": "fulah", + "ff_CM": "fulah (Camerun)", + "ff_GN": "fulah (Guineea)", + "ff_MR": "fulah (Mauritania)", + "ff_SN": "fulah (Senegal)", + "fi": "finlandeză", + "fi_FI": "finlandeză (Finlanda)", + "fo": "faroeză", + "fo_DK": "faroeză (Danemarca)", + "fo_FO": "faroeză (Insulele Feroe)", + "fr": "franceză", + "fr_BE": "franceză (Belgia)", + "fr_BF": "franceză (Burkina Faso)", + "fr_BI": "franceză (Burundi)", + "fr_BJ": "franceză (Benin)", + "fr_BL": "franceză (Sfântul Bartolomeu)", + "fr_CA": "franceză (Canada)", + "fr_CD": "franceză (Congo - Kinshasa)", + "fr_CF": "franceză (Republica Centrafricană)", + "fr_CG": "franceză (Congo - Brazzaville)", + "fr_CH": "franceză (ElveÈ›ia)", + "fr_CI": "franceză (Côte d’Ivoire)", + "fr_CM": "franceză (Camerun)", + "fr_DJ": "franceză (Djibouti)", + "fr_DZ": "franceză (Algeria)", + "fr_FR": "franceză (FranÈ›a)", + "fr_GA": "franceză (Gabon)", + "fr_GF": "franceză (Guyana Franceză)", + "fr_GN": "franceză (Guineea)", + "fr_GP": "franceză (Guadelupa)", + "fr_GQ": "franceză (Guineea Ecuatorială)", + "fr_HT": "franceză (Haiti)", + "fr_KM": "franceză (Comore)", + "fr_LU": "franceză (Luxemburg)", + "fr_MA": "franceză (Maroc)", + "fr_MC": "franceză (Monaco)", + "fr_MF": "franceză (Sfântul Martin)", + "fr_MG": "franceză (Madagascar)", + "fr_ML": "franceză (Mali)", + "fr_MQ": "franceză (Martinica)", + "fr_MR": "franceză (Mauritania)", + "fr_MU": "franceză (Mauritius)", + "fr_NC": "franceză (Noua Caledonie)", + "fr_NE": "franceză (Niger)", + "fr_PF": "franceză (Polinezia Franceză)", + "fr_PM": "franceză (Saint-Pierre È™i Miquelon)", + "fr_RE": "franceză (Réunion)", + "fr_RW": "franceză (Rwanda)", + "fr_SC": "franceză (Seychelles)", + "fr_SN": "franceză (Senegal)", + "fr_SY": "franceză (Siria)", + "fr_TD": "franceză (Ciad)", + "fr_TG": "franceză (Togo)", + "fr_TN": "franceză (Tunisia)", + "fr_VU": "franceză (Vanuatu)", + "fr_WF": "franceză (Wallis È™i Futuna)", + "fr_YT": "franceză (Mayotte)", + "fy": "frizonă occidentală", + "fy_NL": "frizonă occidentală (Țările de Jos)", + "ga": "irlandeză", + "ga_IE": "irlandeză (Irlanda)", + "gd": "gaelică scoÈ›iană", + "gd_GB": "gaelică scoÈ›iană (Regatul Unit)", + "gl": "galiciană", + "gl_ES": "galiciană (Spania)", + "gu": "gujarati", + "gu_IN": "gujarati (India)", + "gv": "manx", + "gv_IM": "manx (Insula Man)", + "ha": "hausa", + "ha_GH": "hausa (Ghana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigeria)", + "he": "ebraică", + "he_IL": "ebraică (Israel)", + "hi": "hindi", + "hi_IN": "hindi (India)", + "hr": "croată", + "hr_BA": "croată (Bosnia È™i HerÈ›egovina)", + "hr_HR": "croată (CroaÈ›ia)", + "hu": "maghiară", + "hu_HU": "maghiară (Ungaria)", + "hy": "armeană", + "hy_AM": "armeană (Armenia)", + "id": "indoneziană", + "id_ID": "indoneziană (Indonezia)", + "ig": "igbo", + "ig_NG": "igbo (Nigeria)", + "ii": "sichuan yi", + "ii_CN": "sichuan yi (China)", + "is": "islandeză", + "is_IS": "islandeză (Islanda)", + "it": "italiană", + "it_CH": "italiană (ElveÈ›ia)", + "it_IT": "italiană (Italia)", + "it_SM": "italiană (San Marino)", + "ja": "japoneză", + "ja_JP": "japoneză (Japonia)", + "ka": "georgiană", + "ka_GE": "georgiană (Georgia)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenya)", + "kk": "kazahă", + "kk_KZ": "kazahă (Kazahstan)", + "kl": "kalaallisut", + "kl_GL": "kalaallisut (Groenlanda)", + "km": "khmeră", + "km_KH": "khmeră (Cambodgia)", + "kn": "kannada", + "kn_IN": "kannada (India)", + "ko": "coreeană", + "ko_KP": "coreeană (Coreea de Nord)", + "ko_KR": "coreeană (Coreea de Sud)", + "ks": "caÈ™miră", + "ks_IN": "caÈ™miră (India)", + "kw": "cornică", + "kw_GB": "cornică (Regatul Unit)", + "ky": "kârgâză", + "ky_KG": "kârgâză (Kârgâzstan)", + "lb": "luxemburgheză", + "lb_LU": "luxemburgheză (Luxemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Congo - Kinshasa)", + "ln_CF": "lingala (Republica Centrafricană)", + "ln_CG": "lingala (Congo - Brazzaville)", + "lo": "laoÈ›iană", + "lo_LA": "laoÈ›iană (Laos)", + "lt": "lituaniană", + "lt_LT": "lituaniană (Lituania)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Congo - Kinshasa)", + "lv": "letonă", + "lv_LV": "letonă (Letonia)", + "mg": "malgașă", + "mg_MG": "malgașă (Madagascar)", + "mk": "macedoneană", + "mk_MK": "macedoneană (Republica Macedonia)", + "ml": "malayalam", + "ml_IN": "malayalam (India)", + "mn": "mongolă", + "mn_MN": "mongolă (Mongolia)", + "mr": "marathi", + "mr_IN": "marathi (India)", + "ms": "malaeză", + "ms_BN": "malaeză (Brunei)", + "ms_MY": "malaeză (Malaysia)", + "ms_SG": "malaeză (Singapore)", + "mt": "malteză", + "mt_MT": "malteză (Malta)", + "my": "birmană", + "my_MM": "birmană (Myanmar (Birmania))", + "nb": "norvegiană bokmÃ¥l", + "nb_NO": "norvegiană bokmÃ¥l (Norvegia)", + "nb_SJ": "norvegiană bokmÃ¥l (Svalbard È™i Jan Mayen)", + "nd": "ndebele de nord", + "nd_ZW": "ndebele de nord (Zimbabwe)", + "ne": "nepaleză", + "ne_IN": "nepaleză (India)", + "ne_NP": "nepaleză (Nepal)", + "nl": "neerlandeză", + "nl_AW": "neerlandeză (Aruba)", + "nl_BE": "neerlandeză (Belgia)", + "nl_BQ": "neerlandeză (Insulele Caraibe Olandeze)", + "nl_CW": "neerlandeză (Curaçao)", + "nl_NL": "neerlandeză (Țările de Jos)", + "nl_SR": "neerlandeză (Suriname)", + "nl_SX": "neerlandeză (Sint-Maarten)", + "nn": "norvegiană nynorsk", + "nn_NO": "norvegiană nynorsk (Norvegia)", + "no": "norvegiană", + "no_NO": "norvegiană (Norvegia)", + "om": "oromo", + "om_ET": "oromo (Etiopia)", + "om_KE": "oromo (Kenya)", + "or": "oriya", + "or_IN": "oriya (India)", + "os": "osetă", + "os_GE": "osetă (Georgia)", + "os_RU": "osetă (Rusia)", + "pa": "punjabi", + "pa_Arab": "punjabi (arabă)", + "pa_Arab_PK": "punjabi (arabă, Pakistan)", + "pa_Guru": "punjabi (gurmukhi)", + "pa_Guru_IN": "punjabi (gurmukhi, India)", + "pa_IN": "punjabi (India)", + "pa_PK": "punjabi (Pakistan)", + "pl": "poloneză", + "pl_PL": "poloneză (Polonia)", + "ps": "paÈ™tună", + "ps_AF": "paÈ™tună (Afganistan)", + "pt": "portugheză", + "pt_AO": "portugheză (Angola)", + "pt_BR": "portugheză (Brazilia)", + "pt_CH": "portugheză (ElveÈ›ia)", + "pt_CV": "portugheză (Capul Verde)", + "pt_GQ": "portugheză (Guineea Ecuatorială)", + "pt_GW": "portugheză (Guineea-Bissau)", + "pt_LU": "portugheză (Luxemburg)", + "pt_MO": "portugheză (R.A.S. Macao a Chinei)", + "pt_MZ": "portugheză (Mozambic)", + "pt_PT": "portugheză (Portugalia)", + "pt_ST": "portugheză (Sao Tomé È™i Príncipe)", + "pt_TL": "portugheză (Timorul de Est)", + "qu": "quechua", + "qu_BO": "quechua (Bolivia)", + "qu_EC": "quechua (Ecuador)", + "qu_PE": "quechua (Peru)", + "rm": "romanșă", + "rm_CH": "romanșă (ElveÈ›ia)", + "rn": "kirundi", + "rn_BI": "kirundi (Burundi)", + "ro": "română", + "ro_MD": "română (Republica Moldova)", + "ro_RO": "română (România)", + "ru": "rusă", + "ru_BY": "rusă (Belarus)", + "ru_KG": "rusă (Kârgâzstan)", + "ru_KZ": "rusă (Kazahstan)", + "ru_MD": "rusă (Republica Moldova)", + "ru_RU": "rusă (Rusia)", + "ru_UA": "rusă (Ucraina)", + "rw": "kinyarwanda", + "rw_RW": "kinyarwanda (Rwanda)", + "se": "sami de nord", + "se_FI": "sami de nord (Finlanda)", + "se_NO": "sami de nord (Norvegia)", + "se_SE": "sami de nord (Suedia)", + "sg": "sango", + "sg_CF": "sango (Republica Centrafricană)", + "sh": "sârbo-croată", + "sh_BA": "sârbo-croată (Bosnia È™i HerÈ›egovina)", + "si": "singaleză", + "si_LK": "singaleză (Sri Lanka)", + "sk": "slovacă", + "sk_SK": "slovacă (Slovacia)", + "sl": "slovenă", + "sl_SI": "slovenă (Slovenia)", + "sn": "shona", + "sn_ZW": "shona (Zimbabwe)", + "so": "somaleză", + "so_DJ": "somaleză (Djibouti)", + "so_ET": "somaleză (Etiopia)", + "so_KE": "somaleză (Kenya)", + "so_SO": "somaleză (Somalia)", + "sq": "albaneză", + "sq_AL": "albaneză (Albania)", + "sq_MK": "albaneză (Republica Macedonia)", + "sq_XK": "albaneză (Kosovo)", + "sr": "sârbă", + "sr_BA": "sârbă (Bosnia È™i HerÈ›egovina)", + "sr_Cyrl": "sârbă (chirilică)", + "sr_Cyrl_BA": "sârbă (chirilică, Bosnia È™i HerÈ›egovina)", + "sr_Cyrl_ME": "sârbă (chirilică, Muntenegru)", + "sr_Cyrl_RS": "sârbă (chirilică, Serbia)", + "sr_Cyrl_XK": "sârbă (chirilică, Kosovo)", + "sr_Latn": "sârbă (latină)", + "sr_Latn_BA": "sârbă (latină, Bosnia È™i HerÈ›egovina)", + "sr_Latn_ME": "sârbă (latină, Muntenegru)", + "sr_Latn_RS": "sârbă (latină, Serbia)", + "sr_Latn_XK": "sârbă (latină, Kosovo)", + "sr_ME": "sârbă (Muntenegru)", + "sr_RS": "sârbă (Serbia)", + "sr_XK": "sârbă (Kosovo)", + "sv": "suedeză", + "sv_AX": "suedeză (Insulele Ã…land)", + "sv_FI": "suedeză (Finlanda)", + "sv_SE": "suedeză (Suedia)", + "sw": "swahili", + "sw_CD": "swahili (Congo - Kinshasa)", + "sw_KE": "swahili (Kenya)", + "sw_TZ": "swahili (Tanzania)", + "sw_UG": "swahili (Uganda)", + "ta": "tamilă", + "ta_IN": "tamilă (India)", + "ta_LK": "tamilă (Sri Lanka)", + "ta_MY": "tamilă (Malaysia)", + "ta_SG": "tamilă (Singapore)", + "te": "telugu", + "te_IN": "telugu (India)", + "th": "thailandeză", + "th_TH": "thailandeză (Thailanda)", + "ti": "tigrină", + "ti_ER": "tigrină (Eritreea)", + "ti_ET": "tigrină (Etiopia)", + "tl": "tagalog", + "tl_PH": "tagalog (Filipine)", + "to": "tongană", + "to_TO": "tongană (Tonga)", + "tr": "turcă", + "tr_CY": "turcă (Cipru)", + "tr_TR": "turcă (Turcia)", + "ug": "uigură", + "ug_CN": "uigură (China)", + "uk": "ucraineană", + "uk_UA": "ucraineană (Ucraina)", + "ur": "urdu", + "ur_IN": "urdu (India)", + "ur_PK": "urdu (Pakistan)", + "uz": "uzbecă", + "uz_AF": "uzbecă (Afganistan)", + "uz_Arab": "uzbecă (arabă)", + "uz_Arab_AF": "uzbecă (arabă, Afganistan)", + "uz_Cyrl": "uzbecă (chirilică)", + "uz_Cyrl_UZ": "uzbecă (chirilică, Uzbekistan)", + "uz_Latn": "uzbecă (latină)", + "uz_Latn_UZ": "uzbecă (latină, Uzbekistan)", + "uz_UZ": "uzbecă (Uzbekistan)", + "vi": "vietnameză", + "vi_VN": "vietnameză (Vietnam)", + "yi": "idiÈ™", + "yo": "yoruba", + "yo_BJ": "yoruba (Benin)", + "yo_NG": "yoruba (Nigeria)", + "zh": "chineză", + "zh_CN": "chineză (China)", + "zh_HK": "chineză (R.A.S. Hong Kong a Chinei)", + "zh_Hans": "chineză (simplificată)", + "zh_Hans_CN": "chineză (simplificată, China)", + "zh_Hans_HK": "chineză (simplificată, R.A.S. Hong Kong a Chinei)", + "zh_Hans_MO": "chineză (simplificată, R.A.S. Macao a Chinei)", + "zh_Hans_SG": "chineză (simplificată, Singapore)", + "zh_Hant": "chineză (tradiÈ›ională)", + "zh_Hant_HK": "chineză (tradiÈ›ională, R.A.S. Hong Kong a Chinei)", + "zh_Hant_MO": "chineză (tradiÈ›ională, R.A.S. Macao a Chinei)", + "zh_Hant_TW": "chineză (tradiÈ›ională, Taiwan)", + "zh_MO": "chineză (R.A.S. Macao a Chinei)", + "zh_SG": "chineză (Singapore)", + "zh_TW": "chineză (Taiwan)", + "zu": "zulu", + "zu_ZA": "zulu (Africa de Sud)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ro_MD.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ro_MD.json new file mode 100644 index 0000000000000000000000000000000000000000..bf38919a46c7a3b90e364c4f5b3e8359d8ba0487 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ro_MD.json @@ -0,0 +1,5 @@ +{ + "Names": { + "my_MM": "birmană (Myanmar)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ru.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ru.json new file mode 100644 index 0000000000000000000000000000000000000000..36c7a4de543e676cb26e56e11e262d9f7c918a32 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ru.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "африкаанÑ", + "af_NA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (ÐамибиÑ)", + "af_ZA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (ЮÐР)", + "ak": "акан", + "ak_GH": "акан (Гана)", + "am": "амхарÑкий", + "am_ET": "амхарÑкий (ЭфиопиÑ)", + "ar": "арабÑкий", + "ar_AE": "арабÑкий (ОÐЭ)", + "ar_BH": "арабÑкий (Бахрейн)", + "ar_DJ": "арабÑкий (Джибути)", + "ar_DZ": "арабÑкий (Ðлжир)", + "ar_EG": "арабÑкий (Египет)", + "ar_EH": "арабÑкий (Ð—Ð°Ð¿Ð°Ð´Ð½Ð°Ñ Ð¡Ð°Ñ…Ð°Ñ€Ð°)", + "ar_ER": "арабÑкий (ЭритреÑ)", + "ar_IL": "арабÑкий (Израиль)", + "ar_IQ": "арабÑкий (Ирак)", + "ar_JO": "арабÑкий (ИорданиÑ)", + "ar_KM": "арабÑкий (Коморы)", + "ar_KW": "арабÑкий (Кувейт)", + "ar_LB": "арабÑкий (Ливан)", + "ar_LY": "арабÑкий (ЛивиÑ)", + "ar_MA": "арабÑкий (Марокко)", + "ar_MR": "арабÑкий (МавританиÑ)", + "ar_OM": "арабÑкий (Оман)", + "ar_PS": "арабÑкий (ПалеÑтинÑкие территории)", + "ar_QA": "арабÑкий (Катар)", + "ar_SA": "арабÑкий (СаудовÑÐºÐ°Ñ ÐравиÑ)", + "ar_SD": "арабÑкий (Судан)", + "ar_SO": "арабÑкий (Сомали)", + "ar_SS": "арабÑкий (Южный Судан)", + "ar_SY": "арабÑкий (СириÑ)", + "ar_TD": "арабÑкий (Чад)", + "ar_TN": "арабÑкий (ТуниÑ)", + "ar_YE": "арабÑкий (Йемен)", + "as": "аÑÑамÑкий", + "as_IN": "аÑÑамÑкий (ИндиÑ)", + "az": "азербайджанÑкий", + "az_AZ": "азербайджанÑкий (Ðзербайджан)", + "az_Cyrl": "азербайджанÑкий (кириллица)", + "az_Cyrl_AZ": "азербайджанÑкий (кириллица, Ðзербайджан)", + "az_Latn": "азербайджанÑкий (латиница)", + "az_Latn_AZ": "азербайджанÑкий (латиница, Ðзербайджан)", + "be": "белоруÑÑкий", + "be_BY": "белоруÑÑкий (БеларуÑÑŒ)", + "bg": "болгарÑкий", + "bg_BG": "болгарÑкий (БолгариÑ)", + "bm": "бамбара", + "bm_ML": "бамбара (Мали)", + "bn": "бенгальÑкий", + "bn_BD": "бенгальÑкий (Бангладеш)", + "bn_IN": "бенгальÑкий (ИндиÑ)", + "bo": "тибетÑкий", + "bo_CN": "тибетÑкий (Китай)", + "bo_IN": "тибетÑкий (ИндиÑ)", + "br": "бретонÑкий", + "br_FR": "бретонÑкий (ФранциÑ)", + "bs": "боÑнийÑкий", + "bs_BA": "боÑнийÑкий (БоÑÐ½Ð¸Ñ Ð¸ Герцеговина)", + "bs_Cyrl": "боÑнийÑкий (кириллица)", + "bs_Cyrl_BA": "боÑнийÑкий (кириллица, БоÑÐ½Ð¸Ñ Ð¸ Герцеговина)", + "bs_Latn": "боÑнийÑкий (латиница)", + "bs_Latn_BA": "боÑнийÑкий (латиница, БоÑÐ½Ð¸Ñ Ð¸ Герцеговина)", + "ca": "каталанÑкий", + "ca_AD": "каталанÑкий (Ðндорра)", + "ca_ES": "каталанÑкий (ИÑпаниÑ)", + "ca_FR": "каталанÑкий (ФранциÑ)", + "ca_IT": "каталанÑкий (ИталиÑ)", + "ce": "чеченÑкий", + "ce_RU": "чеченÑкий (РоÑÑиÑ)", + "cs": "чешÑкий", + "cs_CZ": "чешÑкий (ЧехиÑ)", + "cy": "валлийÑкий", + "cy_GB": "валлийÑкий (ВеликобританиÑ)", + "da": "датÑкий", + "da_DK": "датÑкий (ДаниÑ)", + "da_GL": "датÑкий (ГренландиÑ)", + "de": "немецкий", + "de_AT": "немецкий (ÐвÑтриÑ)", + "de_BE": "немецкий (БельгиÑ)", + "de_CH": "немецкий (ШвейцариÑ)", + "de_DE": "немецкий (ГерманиÑ)", + "de_IT": "немецкий (ИталиÑ)", + "de_LI": "немецкий (Лихтенштейн)", + "de_LU": "немецкий (ЛюкÑембург)", + "dz": "дзонг-кÑ", + "dz_BT": "дзонг-ÐºÑ (Бутан)", + "ee": "Ñве", + "ee_GH": "Ñве (Гана)", + "ee_TG": "Ñве (Того)", + "el": "гречеÑкий", + "el_CY": "гречеÑкий (Кипр)", + "el_GR": "гречеÑкий (ГрециÑ)", + "en": "английÑкий", + "en_AG": "английÑкий (Ðнтигуа и Барбуда)", + "en_AI": "английÑкий (ÐнгильÑ)", + "en_AS": "английÑкий (ÐмериканÑкое Самоа)", + "en_AT": "английÑкий (ÐвÑтриÑ)", + "en_AU": "английÑкий (ÐвÑтралиÑ)", + "en_BB": "английÑкий (БарбадоÑ)", + "en_BE": "английÑкий (БельгиÑ)", + "en_BI": "английÑкий (Бурунди)", + "en_BM": "английÑкий (Бермуды)", + "en_BS": "английÑкий (Багамы)", + "en_BW": "английÑкий (БотÑвана)", + "en_BZ": "английÑкий (Белиз)", + "en_CA": "английÑкий (Канада)", + "en_CC": "английÑкий (КокоÑовые о-ва)", + "en_CH": "английÑкий (ШвейцариÑ)", + "en_CK": "английÑкий (ОÑтрова Кука)", + "en_CM": "английÑкий (Камерун)", + "en_CX": "английÑкий (о-в РождеÑтва)", + "en_CY": "английÑкий (Кипр)", + "en_DE": "английÑкий (ГерманиÑ)", + "en_DG": "английÑкий (Диего-ГарÑиÑ)", + "en_DK": "английÑкий (ДаниÑ)", + "en_DM": "английÑкий (Доминика)", + "en_ER": "английÑкий (ЭритреÑ)", + "en_FI": "английÑкий (ФинлÑндиÑ)", + "en_FJ": "английÑкий (Фиджи)", + "en_FK": "английÑкий (ФолклендÑкие о-ва)", + "en_FM": "английÑкий (Федеративные Штаты Микронезии)", + "en_GB": "английÑкий (ВеликобританиÑ)", + "en_GD": "английÑкий (Гренада)", + "en_GG": "английÑкий (ГернÑи)", + "en_GH": "английÑкий (Гана)", + "en_GI": "английÑкий (Гибралтар)", + "en_GM": "английÑкий (ГамбиÑ)", + "en_GU": "английÑкий (Гуам)", + "en_GY": "английÑкий (Гайана)", + "en_HK": "английÑкий (Гонконг (Ñпециальный админиÑтративный район))", + "en_IE": "английÑкий (ИрландиÑ)", + "en_IL": "английÑкий (Израиль)", + "en_IM": "английÑкий (о-в МÑн)", + "en_IN": "английÑкий (ИндиÑ)", + "en_IO": "английÑкий (БританÑÐºÐ°Ñ Ñ‚ÐµÑ€Ñ€Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ Ð² ИндийÑком океане)", + "en_JE": "английÑкий (ДжерÑи)", + "en_JM": "английÑкий (Ямайка)", + "en_KE": "английÑкий (КениÑ)", + "en_KI": "английÑкий (Кирибати)", + "en_KN": "английÑкий (Сент-ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ)", + "en_KY": "английÑкий (Каймановы о-ва)", + "en_LC": "английÑкий (Сент-ЛюÑиÑ)", + "en_LR": "английÑкий (ЛибериÑ)", + "en_LS": "английÑкий (ЛеÑото)", + "en_MG": "английÑкий (МадагаÑкар)", + "en_MH": "английÑкий (Маршалловы ОÑтрова)", + "en_MO": "английÑкий (Макао (Ñпециальный админиÑтративный район))", + "en_MP": "английÑкий (Северные МарианÑкие о-ва)", + "en_MS": "английÑкий (МонтÑеррат)", + "en_MT": "английÑкий (Мальта)", + "en_MU": "английÑкий (Маврикий)", + "en_MW": "английÑкий (Малави)", + "en_MY": "английÑкий (МалайзиÑ)", + "en_NA": "английÑкий (ÐамибиÑ)", + "en_NF": "английÑкий (о-в Ðорфолк)", + "en_NG": "английÑкий (ÐигериÑ)", + "en_NL": "английÑкий (Ðидерланды)", + "en_NR": "английÑкий (Ðауру)", + "en_NU": "английÑкий (ÐиуÑ)", + "en_NZ": "английÑкий (ÐÐ¾Ð²Ð°Ñ Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ)", + "en_PG": "английÑкий (Папуа – ÐÐ¾Ð²Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ)", + "en_PH": "английÑкий (Филиппины)", + "en_PK": "английÑкий (ПакиÑтан)", + "en_PN": "английÑкий (оÑтрова ПиткÑрн)", + "en_PR": "английÑкий (ПуÑрто-Рико)", + "en_PW": "английÑкий (Палау)", + "en_RW": "английÑкий (Руанда)", + "en_SB": "английÑкий (Соломоновы ОÑтрова)", + "en_SC": "английÑкий (СейшельÑкие ОÑтрова)", + "en_SD": "английÑкий (Судан)", + "en_SE": "английÑкий (ШвециÑ)", + "en_SG": "английÑкий (Сингапур)", + "en_SH": "английÑкий (о-в Св. Елены)", + "en_SI": "английÑкий (СловениÑ)", + "en_SL": "английÑкий (Сьерра-Леоне)", + "en_SS": "английÑкий (Южный Судан)", + "en_SX": "английÑкий (Синт-Мартен)", + "en_SZ": "английÑкий (Свазиленд)", + "en_TC": "английÑкий (о-ва Ð¢Ñ‘Ñ€ÐºÑ Ð¸ КайкоÑ)", + "en_TK": "английÑкий (Токелау)", + "en_TO": "английÑкий (Тонга)", + "en_TT": "английÑкий (Тринидад и Тобаго)", + "en_TV": "английÑкий (Тувалу)", + "en_TZ": "английÑкий (ТанзаниÑ)", + "en_UG": "английÑкий (Уганда)", + "en_UM": "английÑкий (Внешние малые о-ва (СШÐ))", + "en_US": "английÑкий (Соединенные Штаты)", + "en_VC": "английÑкий (Сент-ВинÑент и Гренадины)", + "en_VG": "английÑкий (ВиргинÑкие о-ва (БританÑкие))", + "en_VI": "английÑкий (ВиргинÑкие о-ва (СШÐ))", + "en_VU": "английÑкий (Вануату)", + "en_WS": "английÑкий (Самоа)", + "en_ZA": "английÑкий (ЮÐР)", + "en_ZM": "английÑкий (ЗамбиÑ)", + "en_ZW": "английÑкий (Зимбабве)", + "eo": "ÑÑперанто", + "es": "иÑпанÑкий", + "es_AR": "иÑпанÑкий (Ðргентина)", + "es_BO": "иÑпанÑкий (БоливиÑ)", + "es_BR": "иÑпанÑкий (БразилиÑ)", + "es_CL": "иÑпанÑкий (Чили)", + "es_CO": "иÑпанÑкий (КолумбиÑ)", + "es_CR": "иÑпанÑкий (КоÑта-Рика)", + "es_CU": "иÑпанÑкий (Куба)", + "es_DO": "иÑпанÑкий (ДоминиканÑÐºÐ°Ñ Ð ÐµÑпублика)", + "es_EA": "иÑпанÑкий (Сеута и МелильÑ)", + "es_EC": "иÑпанÑкий (Эквадор)", + "es_ES": "иÑпанÑкий (ИÑпаниÑ)", + "es_GQ": "иÑпанÑкий (Ð­ÐºÐ²Ð°Ñ‚Ð¾Ñ€Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ)", + "es_GT": "иÑпанÑкий (Гватемала)", + "es_HN": "иÑпанÑкий (ГондураÑ)", + "es_IC": "иÑпанÑкий (КанарÑкие о-ва)", + "es_MX": "иÑпанÑкий (МекÑика)", + "es_NI": "иÑпанÑкий (Ðикарагуа)", + "es_PA": "иÑпанÑкий (Панама)", + "es_PE": "иÑпанÑкий (Перу)", + "es_PH": "иÑпанÑкий (Филиппины)", + "es_PR": "иÑпанÑкий (ПуÑрто-Рико)", + "es_PY": "иÑпанÑкий (Парагвай)", + "es_SV": "иÑпанÑкий (Сальвадор)", + "es_US": "иÑпанÑкий (Соединенные Штаты)", + "es_UY": "иÑпанÑкий (Уругвай)", + "es_VE": "иÑпанÑкий (ВенеÑуÑла)", + "et": "ÑÑтонÑкий", + "et_EE": "ÑÑтонÑкий (ЭÑтониÑ)", + "eu": "баÑкÑкий", + "eu_ES": "баÑкÑкий (ИÑпаниÑ)", + "fa": "перÑидÑкий", + "fa_AF": "перÑидÑкий (ÐфганиÑтан)", + "fa_IR": "перÑидÑкий (Иран)", + "ff": "фулах", + "ff_CM": "фулах (Камерун)", + "ff_GN": "фулах (ГвинеÑ)", + "ff_MR": "фулах (МавританиÑ)", + "ff_SN": "фулах (Сенегал)", + "fi": "финÑкий", + "fi_FI": "финÑкий (ФинлÑндиÑ)", + "fo": "фарерÑкий", + "fo_DK": "фарерÑкий (ДаниÑ)", + "fo_FO": "фарерÑкий (ФарерÑкие о-ва)", + "fr": "французÑкий", + "fr_BE": "французÑкий (БельгиÑ)", + "fr_BF": "французÑкий (Буркина-ФаÑо)", + "fr_BI": "французÑкий (Бурунди)", + "fr_BJ": "французÑкий (Бенин)", + "fr_BL": "французÑкий (Сен-Бартелеми)", + "fr_CA": "французÑкий (Канада)", + "fr_CD": "французÑкий (Конго - КиншаÑа)", + "fr_CF": "французÑкий (ЦÐР)", + "fr_CG": "французÑкий (Конго - Браззавиль)", + "fr_CH": "французÑкий (ШвейцариÑ)", + "fr_CI": "французÑкий (Кот-д’Ивуар)", + "fr_CM": "французÑкий (Камерун)", + "fr_DJ": "французÑкий (Джибути)", + "fr_DZ": "французÑкий (Ðлжир)", + "fr_FR": "французÑкий (ФранциÑ)", + "fr_GA": "французÑкий (Габон)", + "fr_GF": "французÑкий (ФранцузÑÐºÐ°Ñ Ð“Ð²Ð¸Ð°Ð½Ð°)", + "fr_GN": "французÑкий (ГвинеÑ)", + "fr_GP": "французÑкий (Гваделупа)", + "fr_GQ": "французÑкий (Ð­ÐºÐ²Ð°Ñ‚Ð¾Ñ€Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ)", + "fr_HT": "французÑкий (Гаити)", + "fr_KM": "французÑкий (Коморы)", + "fr_LU": "французÑкий (ЛюкÑембург)", + "fr_MA": "французÑкий (Марокко)", + "fr_MC": "французÑкий (Монако)", + "fr_MF": "французÑкий (Сен-Мартен)", + "fr_MG": "французÑкий (МадагаÑкар)", + "fr_ML": "французÑкий (Мали)", + "fr_MQ": "французÑкий (Мартиника)", + "fr_MR": "французÑкий (МавританиÑ)", + "fr_MU": "французÑкий (Маврикий)", + "fr_NC": "французÑкий (ÐÐ¾Ð²Ð°Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ)", + "fr_NE": "французÑкий (Ðигер)", + "fr_PF": "французÑкий (ФранцузÑÐºÐ°Ñ ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ)", + "fr_PM": "французÑкий (Сен-Пьер и Микелон)", + "fr_RE": "французÑкий (Реюньон)", + "fr_RW": "французÑкий (Руанда)", + "fr_SC": "французÑкий (СейшельÑкие ОÑтрова)", + "fr_SN": "французÑкий (Сенегал)", + "fr_SY": "французÑкий (СириÑ)", + "fr_TD": "французÑкий (Чад)", + "fr_TG": "французÑкий (Того)", + "fr_TN": "французÑкий (ТуниÑ)", + "fr_VU": "французÑкий (Вануату)", + "fr_WF": "французÑкий (Ð£Ð¾Ð»Ð»Ð¸Ñ Ð¸ Футуна)", + "fr_YT": "французÑкий (Майотта)", + "fy": "западный фризÑкий", + "fy_NL": "западный фризÑкий (Ðидерланды)", + "ga": "ирландÑкий", + "ga_IE": "ирландÑкий (ИрландиÑ)", + "gd": "гÑльÑкий", + "gd_GB": "гÑльÑкий (ВеликобританиÑ)", + "gl": "галиÑийÑкий", + "gl_ES": "галиÑийÑкий (ИÑпаниÑ)", + "gu": "гуджарати", + "gu_IN": "гуджарати (ИндиÑ)", + "gv": "мÑнÑкий", + "gv_IM": "мÑнÑкий (о-в МÑн)", + "ha": "хауÑа", + "ha_GH": "хауÑа (Гана)", + "ha_NE": "хауÑа (Ðигер)", + "ha_NG": "хауÑа (ÐигериÑ)", + "he": "иврит", + "he_IL": "иврит (Израиль)", + "hi": "хинди", + "hi_IN": "хинди (ИндиÑ)", + "hr": "хорватÑкий", + "hr_BA": "хорватÑкий (БоÑÐ½Ð¸Ñ Ð¸ Герцеговина)", + "hr_HR": "хорватÑкий (ХорватиÑ)", + "hu": "венгерÑкий", + "hu_HU": "венгерÑкий (ВенгриÑ)", + "hy": "армÑнÑкий", + "hy_AM": "армÑнÑкий (ÐрмениÑ)", + "id": "индонезийÑкий", + "id_ID": "индонезийÑкий (ИндонезиÑ)", + "ig": "игбо", + "ig_NG": "игбо (ÐигериÑ)", + "ii": "ноÑу", + "ii_CN": "ноÑу (Китай)", + "is": "иÑландÑкий", + "is_IS": "иÑландÑкий (ИÑландиÑ)", + "it": "итальÑнÑкий", + "it_CH": "итальÑнÑкий (ШвейцариÑ)", + "it_IT": "итальÑнÑкий (ИталиÑ)", + "it_SM": "итальÑнÑкий (Сан-Марино)", + "ja": "ÑпонÑкий", + "ja_JP": "ÑпонÑкий (ЯпониÑ)", + "ka": "грузинÑкий", + "ka_GE": "грузинÑкий (ГрузиÑ)", + "ki": "кикуйю", + "ki_KE": "кикуйю (КениÑ)", + "kk": "казахÑкий", + "kk_KZ": "казахÑкий (КазахÑтан)", + "kl": "гренландÑкий", + "kl_GL": "гренландÑкий (ГренландиÑ)", + "km": "кхмерÑкий", + "km_KH": "кхмерÑкий (Камбоджа)", + "kn": "каннада", + "kn_IN": "каннада (ИндиÑ)", + "ko": "корейÑкий", + "ko_KP": "корейÑкий (КÐДР)", + "ko_KR": "корейÑкий (РеÑпублика КореÑ)", + "ks": "кашмири", + "ks_IN": "кашмири (ИндиÑ)", + "kw": "корнÑкий", + "kw_GB": "корнÑкий (ВеликобританиÑ)", + "ky": "киргизÑкий", + "ky_KG": "киргизÑкий (КиргизиÑ)", + "lb": "люкÑембургÑкий", + "lb_LU": "люкÑембургÑкий (ЛюкÑембург)", + "lg": "ганда", + "lg_UG": "ганда (Уганда)", + "ln": "лингала", + "ln_AO": "лингала (Ðнгола)", + "ln_CD": "лингала (Конго - КиншаÑа)", + "ln_CF": "лингала (ЦÐР)", + "ln_CG": "лингала (Конго - Браззавиль)", + "lo": "лаоÑÑкий", + "lo_LA": "лаоÑÑкий (ЛаоÑ)", + "lt": "литовÑкий", + "lt_LT": "литовÑкий (Литва)", + "lu": "луба-катанга", + "lu_CD": "луба-катанга (Конго - КиншаÑа)", + "lv": "латышÑкий", + "lv_LV": "латышÑкий (ЛатвиÑ)", + "mg": "малагаÑийÑкий", + "mg_MG": "малагаÑийÑкий (МадагаÑкар)", + "mk": "македонÑкий", + "mk_MK": "македонÑкий (МакедониÑ)", + "ml": "малаÑлам", + "ml_IN": "малаÑлам (ИндиÑ)", + "mn": "монгольÑкий", + "mn_MN": "монгольÑкий (МонголиÑ)", + "mr": "маратхи", + "mr_IN": "маратхи (ИндиÑ)", + "ms": "малайÑкий", + "ms_BN": "малайÑкий (Бруней-ДаруÑÑалам)", + "ms_MY": "малайÑкий (МалайзиÑ)", + "ms_SG": "малайÑкий (Сингапур)", + "mt": "мальтийÑкий", + "mt_MT": "мальтийÑкий (Мальта)", + "my": "бирманÑкий", + "my_MM": "бирманÑкий (МьÑнма (Бирма))", + "nb": "норвежÑкий букмол", + "nb_NO": "норвежÑкий букмол (ÐорвегиÑ)", + "nb_SJ": "норвежÑкий букмол (Шпицберген и Ян-Майен)", + "nd": "Ñеверный ндебеле", + "nd_ZW": "Ñеверный ндебеле (Зимбабве)", + "ne": "непальÑкий", + "ne_IN": "непальÑкий (ИндиÑ)", + "ne_NP": "непальÑкий (Ðепал)", + "nl": "нидерландÑкий", + "nl_AW": "нидерландÑкий (Ðруба)", + "nl_BE": "нидерландÑкий (БельгиÑ)", + "nl_BQ": "нидерландÑкий (БонÑйр, Синт-ЭÑÑ‚Ð°Ñ‚Ð¸ÑƒÑ Ð¸ Саба)", + "nl_CW": "нидерландÑкий (КюраÑао)", + "nl_NL": "нидерландÑкий (Ðидерланды)", + "nl_SR": "нидерландÑкий (Суринам)", + "nl_SX": "нидерландÑкий (Синт-Мартен)", + "nn": "нюнорÑк", + "nn_NO": "нюнорÑк (ÐорвегиÑ)", + "no": "норвежÑкий", + "no_NO": "норвежÑкий (ÐорвегиÑ)", + "om": "оромо", + "om_ET": "оромо (ЭфиопиÑ)", + "om_KE": "оромо (КениÑ)", + "or": "ориÑ", + "or_IN": "Ð¾Ñ€Ð¸Ñ (ИндиÑ)", + "os": "оÑетинÑкий", + "os_GE": "оÑетинÑкий (ГрузиÑ)", + "os_RU": "оÑетинÑкий (РоÑÑиÑ)", + "pa": "панджаби", + "pa_Arab": "панджаби (арабица)", + "pa_Arab_PK": "панджаби (арабица, ПакиÑтан)", + "pa_Guru": "панджаби (гурмукхи)", + "pa_Guru_IN": "панджаби (гурмукхи, ИндиÑ)", + "pa_IN": "панджаби (ИндиÑ)", + "pa_PK": "панджаби (ПакиÑтан)", + "pl": "польÑкий", + "pl_PL": "польÑкий (Польша)", + "ps": "пушту", + "ps_AF": "пушту (ÐфганиÑтан)", + "pt": "португальÑкий", + "pt_AO": "португальÑкий (Ðнгола)", + "pt_BR": "португальÑкий (БразилиÑ)", + "pt_CH": "португальÑкий (ШвейцариÑ)", + "pt_CV": "португальÑкий (Кабо-Верде)", + "pt_GQ": "португальÑкий (Ð­ÐºÐ²Ð°Ñ‚Ð¾Ñ€Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ)", + "pt_GW": "португальÑкий (ГвинеÑ-БиÑау)", + "pt_LU": "португальÑкий (ЛюкÑембург)", + "pt_MO": "португальÑкий (Макао (Ñпециальный админиÑтративный район))", + "pt_MZ": "португальÑкий (Мозамбик)", + "pt_PT": "португальÑкий (ПортугалиÑ)", + "pt_ST": "португальÑкий (Сан-Томе и ПринÑипи)", + "pt_TL": "португальÑкий (ВоÑточный Тимор)", + "qu": "кечуа", + "qu_BO": "кечуа (БоливиÑ)", + "qu_EC": "кечуа (Эквадор)", + "qu_PE": "кечуа (Перу)", + "rm": "романшÑкий", + "rm_CH": "романшÑкий (ШвейцариÑ)", + "rn": "рунди", + "rn_BI": "рунди (Бурунди)", + "ro": "румынÑкий", + "ro_MD": "румынÑкий (Молдова)", + "ro_RO": "румынÑкий (РумыниÑ)", + "ru": "руÑÑкий", + "ru_BY": "руÑÑкий (БеларуÑÑŒ)", + "ru_KG": "руÑÑкий (КиргизиÑ)", + "ru_KZ": "руÑÑкий (КазахÑтан)", + "ru_MD": "руÑÑкий (Молдова)", + "ru_RU": "руÑÑкий (РоÑÑиÑ)", + "ru_UA": "руÑÑкий (Украина)", + "rw": "киньÑруанда", + "rw_RW": "киньÑруанда (Руанда)", + "se": "ÑеверноÑаамÑкий", + "se_FI": "ÑеверноÑаамÑкий (ФинлÑндиÑ)", + "se_NO": "ÑеверноÑаамÑкий (ÐорвегиÑ)", + "se_SE": "ÑеверноÑаамÑкий (ШвециÑ)", + "sg": "Ñанго", + "sg_CF": "Ñанго (ЦÐР)", + "sh": "ÑербÑкохорватÑкий", + "sh_BA": "ÑербÑкохорватÑкий (БоÑÐ½Ð¸Ñ Ð¸ Герцеговина)", + "si": "ÑингальÑкий", + "si_LK": "ÑингальÑкий (Шри-Ланка)", + "sk": "Ñловацкий", + "sk_SK": "Ñловацкий (СловакиÑ)", + "sl": "ÑловенÑкий", + "sl_SI": "ÑловенÑкий (СловениÑ)", + "sn": "шона", + "sn_ZW": "шона (Зимбабве)", + "so": "Ñомали", + "so_DJ": "Ñомали (Джибути)", + "so_ET": "Ñомали (ЭфиопиÑ)", + "so_KE": "Ñомали (КениÑ)", + "so_SO": "Ñомали (Сомали)", + "sq": "албанÑкий", + "sq_AL": "албанÑкий (ÐлбаниÑ)", + "sq_MK": "албанÑкий (МакедониÑ)", + "sq_XK": "албанÑкий (КоÑово)", + "sr": "ÑербÑкий", + "sr_BA": "ÑербÑкий (БоÑÐ½Ð¸Ñ Ð¸ Герцеговина)", + "sr_Cyrl": "ÑербÑкий (кириллица)", + "sr_Cyrl_BA": "ÑербÑкий (кириллица, БоÑÐ½Ð¸Ñ Ð¸ Герцеговина)", + "sr_Cyrl_ME": "ÑербÑкий (кириллица, ЧерногориÑ)", + "sr_Cyrl_RS": "ÑербÑкий (кириллица, СербиÑ)", + "sr_Cyrl_XK": "ÑербÑкий (кириллица, КоÑово)", + "sr_Latn": "ÑербÑкий (латиница)", + "sr_Latn_BA": "ÑербÑкий (латиница, БоÑÐ½Ð¸Ñ Ð¸ Герцеговина)", + "sr_Latn_ME": "ÑербÑкий (латиница, ЧерногориÑ)", + "sr_Latn_RS": "ÑербÑкий (латиница, СербиÑ)", + "sr_Latn_XK": "ÑербÑкий (латиница, КоÑово)", + "sr_ME": "ÑербÑкий (ЧерногориÑ)", + "sr_RS": "ÑербÑкий (СербиÑ)", + "sr_XK": "ÑербÑкий (КоÑово)", + "sv": "шведÑкий", + "sv_AX": "шведÑкий (ÐландÑкие о-ва)", + "sv_FI": "шведÑкий (ФинлÑндиÑ)", + "sv_SE": "шведÑкий (ШвециÑ)", + "sw": "Ñуахили", + "sw_CD": "Ñуахили (Конго - КиншаÑа)", + "sw_KE": "Ñуахили (КениÑ)", + "sw_TZ": "Ñуахили (ТанзаниÑ)", + "sw_UG": "Ñуахили (Уганда)", + "ta": "тамильÑкий", + "ta_IN": "тамильÑкий (ИндиÑ)", + "ta_LK": "тамильÑкий (Шри-Ланка)", + "ta_MY": "тамильÑкий (МалайзиÑ)", + "ta_SG": "тамильÑкий (Сингапур)", + "te": "телугу", + "te_IN": "телугу (ИндиÑ)", + "th": "тайÑкий", + "th_TH": "тайÑкий (Таиланд)", + "ti": "тигриньÑ", + "ti_ER": "Ñ‚Ð¸Ð³Ñ€Ð¸Ð½ÑŒÑ (ЭритреÑ)", + "ti_ET": "Ñ‚Ð¸Ð³Ñ€Ð¸Ð½ÑŒÑ (ЭфиопиÑ)", + "tl": "тагалог", + "tl_PH": "тагалог (Филиппины)", + "to": "тонганÑкий", + "to_TO": "тонганÑкий (Тонга)", + "tr": "турецкий", + "tr_CY": "турецкий (Кипр)", + "tr_TR": "турецкий (ТурциÑ)", + "ug": "уйгурÑкий", + "ug_CN": "уйгурÑкий (Китай)", + "uk": "украинÑкий", + "uk_UA": "украинÑкий (Украина)", + "ur": "урду", + "ur_IN": "урду (ИндиÑ)", + "ur_PK": "урду (ПакиÑтан)", + "uz": "узбекÑкий", + "uz_AF": "узбекÑкий (ÐфганиÑтан)", + "uz_Arab": "узбекÑкий (арабица)", + "uz_Arab_AF": "узбекÑкий (арабица, ÐфганиÑтан)", + "uz_Cyrl": "узбекÑкий (кириллица)", + "uz_Cyrl_UZ": "узбекÑкий (кириллица, УзбекиÑтан)", + "uz_Latn": "узбекÑкий (латиница)", + "uz_Latn_UZ": "узбекÑкий (латиница, УзбекиÑтан)", + "uz_UZ": "узбекÑкий (УзбекиÑтан)", + "vi": "вьетнамÑкий", + "vi_VN": "вьетнамÑкий (Вьетнам)", + "yi": "идиш", + "yo": "йоруба", + "yo_BJ": "йоруба (Бенин)", + "yo_NG": "йоруба (ÐигериÑ)", + "zh": "китайÑкий", + "zh_CN": "китайÑкий (Китай)", + "zh_HK": "китайÑкий (Гонконг (Ñпециальный админиÑтративный район))", + "zh_Hans": "китайÑкий (ÑƒÐ¿Ñ€Ð¾Ñ‰ÐµÐ½Ð½Ð°Ñ ÐºÐ¸Ñ‚Ð°Ð¹ÑкаÑ)", + "zh_Hans_CN": "китайÑкий (ÑƒÐ¿Ñ€Ð¾Ñ‰ÐµÐ½Ð½Ð°Ñ ÐºÐ¸Ñ‚Ð°Ð¹ÑкаÑ, Китай)", + "zh_Hans_HK": "китайÑкий (ÑƒÐ¿Ñ€Ð¾Ñ‰ÐµÐ½Ð½Ð°Ñ ÐºÐ¸Ñ‚Ð°Ð¹ÑкаÑ, Гонконг (Ñпециальный админиÑтративный район))", + "zh_Hans_MO": "китайÑкий (ÑƒÐ¿Ñ€Ð¾Ñ‰ÐµÐ½Ð½Ð°Ñ ÐºÐ¸Ñ‚Ð°Ð¹ÑкаÑ, Макао (Ñпециальный админиÑтративный район))", + "zh_Hans_SG": "китайÑкий (ÑƒÐ¿Ñ€Ð¾Ñ‰ÐµÐ½Ð½Ð°Ñ ÐºÐ¸Ñ‚Ð°Ð¹ÑкаÑ, Сингапур)", + "zh_Hant": "китайÑкий (Ñ‚Ñ€Ð°Ð´Ð¸Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ ÐºÐ¸Ñ‚Ð°Ð¹ÑкаÑ)", + "zh_Hant_HK": "китайÑкий (Ñ‚Ñ€Ð°Ð´Ð¸Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ ÐºÐ¸Ñ‚Ð°Ð¹ÑкаÑ, Гонконг (Ñпециальный админиÑтративный район))", + "zh_Hant_MO": "китайÑкий (Ñ‚Ñ€Ð°Ð´Ð¸Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ ÐºÐ¸Ñ‚Ð°Ð¹ÑкаÑ, Макао (Ñпециальный админиÑтративный район))", + "zh_Hant_TW": "китайÑкий (Ñ‚Ñ€Ð°Ð´Ð¸Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ ÐºÐ¸Ñ‚Ð°Ð¹ÑкаÑ, Тайвань)", + "zh_MO": "китайÑкий (Макао (Ñпециальный админиÑтративный район))", + "zh_SG": "китайÑкий (Сингапур)", + "zh_TW": "китайÑкий (Тайвань)", + "zu": "зулу", + "zu_ZA": "зулу (ЮÐР)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ru_UA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ru_UA.json new file mode 100644 index 0000000000000000000000000000000000000000..2eab3e28be57ba7ddc3a1f0f4ba9c611ed995d9d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ru_UA.json @@ -0,0 +1,13 @@ +{ + "Names": { + "ar_AE": "арабÑкий (Объединенные ÐрабÑкие Эмираты)", + "en_CK": "английÑкий (О-ва Кука)", + "en_CX": "английÑкий (О-в РождеÑтва)", + "en_NF": "английÑкий (О-в Ðорфолк)", + "en_UM": "английÑкий (Малые ТихоокеанÑкие Отдаленные ОÑтрова СШÐ)", + "fr_CF": "французÑкий (Центрально-ÐфриканÑÐºÐ°Ñ Ð ÐµÑпублика)", + "ln_CF": "лингала (Центрально-ÐфриканÑÐºÐ°Ñ Ð ÐµÑпублика)", + "pt_TL": "португальÑкий (Тимор-ЛеÑте)", + "sg_CF": "Ñанго (Центрально-ÐфриканÑÐºÐ°Ñ Ð ÐµÑпублика)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/rw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/rw.json new file mode 100644 index 0000000000000000000000000000000000000000..eb5afdbfb1b632063842bfa1681bb9668ca8fbac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/rw.json @@ -0,0 +1,95 @@ +{ + "Names": { + "af": "Ikinyafurikaneri", + "am": "Inyamuhariki", + "ar": "Icyarabu", + "as": "Icyasamizi", + "az": "Inyazeribayijani", + "be": "Ikibelarusiya", + "bg": "Urunyabuligariya", + "bn": "Ikibengali", + "br": "Inyebiritoni", + "bs": "Inyebosiniya", + "ca": "Igikatalani", + "cs": "Igiceke", + "cy": "Ikigaluwa", + "da": "Ikidaninwa", + "de": "Ikidage", + "el": "Ikigereki", + "en": "Icyongereza", + "en_RW": "Icyongereza (Rwanda)", + "en_TO": "Icyongereza (Igitonga)", + "eo": "Icyesiperanto", + "es": "Icyesipanyolo", + "et": "Icyesitoniya", + "eu": "Ikibasiki", + "fa": "Inyeperisi", + "fi": "Igifinilande", + "fo": "Inyefaroyizi", + "fr": "Igifaransa", + "fr_RW": "Igifaransa (Rwanda)", + "fy": "Igifiriziyani", + "ga": "Ikirilandi", + "gd": "Ikigaluwa cy’Igisweduwa", + "gl": "Ikigalisiya", + "gu": "Inyegujarati", + "he": "Igiheburayo", + "hi": "Igihindi", + "hr": "Igikorowasiya", + "hu": "Igihongiriya", + "hy": "Ikinyarumeniya", + "id": "Ikinyendoziya", + "is": "Igisilande", + "it": "Igitaliyani", + "ja": "Ikiyapani", + "ka": "Inyejeworujiya", + "km": "Igikambodiya", + "kn": "Igikanada", + "ko": "Igikoreya", + "ky": "Inkerigizi", + "ln": "Ilingala", + "lo": "Ikilawotiyani", + "lt": "Ikilituwaniya", + "lv": "Ikinyaletoviyani", + "mk": "Ikimasedoniyani", + "ml": "Ikimalayalami", + "mn": "Ikimongoli", + "mr": "Ikimarati", + "ms": "Ikimalayi", + "mt": "Ikimaliteze", + "ne": "Ikinepali", + "nl": "Ikinerilande", + "nn": "Inyenoruveji (Nyonorusiki)", + "no": "Ikinoruveji", + "or": "Inyoriya", + "pa": "Igipunjabi", + "pl": "Igipolone", + "ps": "Impashito", + "pt": "Igiporutugali", + "ro": "Ikinyarumaniya", + "ru": "Ikirusiya", + "rw": "Kinyarwanda", + "rw_RW": "Kinyarwanda (Rwanda)", + "sh": "Inyeseribiya na Korowasiya", + "si": "Inyesimpaleze", + "sk": "Igisilovaki", + "sl": "Ikinyasiloveniya", + "so": "Igisomali", + "sq": "Icyalubaniya", + "sr": "Igiseribe", + "sv": "Igisuweduwa", + "sw": "Igiswahili", + "ta": "Igitamili", + "te": "Igitelugu", + "th": "Igitayi", + "ti": "Inyatigirinya", + "tr": "Igiturukiya", + "ug": "Ikiwiguri", + "uk": "Ikinyayukereni", + "ur": "Inyeyurudu", + "uz": "Inyeyuzubeki", + "vi": "Ikinyaviyetinamu", + "yi": "Inyeyidishi", + "zu": "Inyezulu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/se.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/se.json new file mode 100644 index 0000000000000000000000000000000000000000..4647d0bcba81c643e4c14475dd272c491db9427b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/se.json @@ -0,0 +1,430 @@ +{ + "Names": { + "af": "afrikánsagiella", + "af_NA": "afrikánsagiella (Namibia)", + "af_ZA": "afrikánsagiella (Mátta-Afrihká)", + "ar": "arábagiella", + "ar_AE": "arábagiella (Ovttastuvvan Arábaemiráhtat)", + "ar_BH": "arábagiella (Bahrain)", + "ar_DJ": "arábagiella (Djibouti)", + "ar_DZ": "arábagiella (Algeria)", + "ar_EG": "arábagiella (Egypta)", + "ar_EH": "arábagiella (Oarje-Sahára)", + "ar_ER": "arábagiella (Eritrea)", + "ar_IL": "arábagiella (Israel)", + "ar_IQ": "arábagiella (Irak)", + "ar_JO": "arábagiella (Jordánia)", + "ar_KM": "arábagiella (Komoros)", + "ar_KW": "arábagiella (Kuwait)", + "ar_LB": "arábagiella (Libanon)", + "ar_LY": "arábagiella (Libya)", + "ar_MA": "arábagiella (Marokko)", + "ar_MR": "arábagiella (Mauretánia)", + "ar_OM": "arábagiella (Oman)", + "ar_PS": "arábagiella (Palestina)", + "ar_QA": "arábagiella (Qatar)", + "ar_SA": "arábagiella (Saudi-Arábia)", + "ar_SD": "arábagiella (Davvisudan)", + "ar_SO": "arábagiella (Somália)", + "ar_SS": "arábagiella (Máttasudan)", + "ar_SY": "arábagiella (Syria)", + "ar_TD": "arábagiella (TÄad)", + "ar_TN": "arábagiella (Tunisia)", + "ar_YE": "arábagiella (Jemen)", + "be": "vilges-ruoššagiella", + "be_BY": "vilges-ruoššagiella (Vilges-Ruošša)", + "bg": "bulgáriagiella", + "bg_BG": "bulgáriagiella (Bulgária)", + "bn": "bengalgiella", + "bn_BD": "bengalgiella (Bangladesh)", + "bn_IN": "bengalgiella (India)", + "bo": "tibetagiella", + "bo_CN": "tibetagiella (Kiinná)", + "bo_IN": "tibetagiella (India)", + "br": "bretonagiella", + "br_FR": "bretonagiella (Frankriika)", + "bs": "bosniagiella", + "bs_BA": "bosniagiella (Bosnia-Hercegovina)", + "bs_Cyrl": "bosniagiella (kyrillalaÅ¡)", + "bs_Cyrl_BA": "bosniagiella (kyrillalaÅ¡, Bosnia-Hercegovina)", + "bs_Latn": "bosniagiella (láhtenaÅ¡)", + "bs_Latn_BA": "bosniagiella (láhtenaÅ¡, Bosnia-Hercegovina)", + "ca": "katalánagiella", + "ca_AD": "katalánagiella (Andorra)", + "ca_ES": "katalánagiella (Spánia)", + "ca_FR": "katalánagiella (Frankriika)", + "ca_IT": "katalánagiella (Itália)", + "cs": "Äeahkagiella", + "cs_CZ": "Äeahkagiella (ÄŒeahkka)", + "cy": "kymragiella", + "cy_GB": "kymragiella (Stuorra-Británnia)", + "da": "dánskkagiella", + "da_DK": "dánskkagiella (Dánmárku)", + "da_GL": "dánskkagiella (Kalaallit Nunaat)", + "de": "duiskkagiella", + "de_AT": "duiskkagiella (Nuortariika)", + "de_BE": "duiskkagiella (Belgia)", + "de_CH": "duiskkagiella (Å veica)", + "de_DE": "duiskkagiella (Duiska)", + "de_IT": "duiskkagiella (Itália)", + "de_LI": "duiskkagiella (Liechtenstein)", + "de_LU": "duiskkagiella (Luxembourg)", + "dz": "dzongkhagiella", + "dz_BT": "dzongkhagiella (Bhutan)", + "el": "greikkagiella", + "el_CY": "greikkagiella (Kypros)", + "el_GR": "greikkagiella (Greika)", + "en": "eaÅ‹galsgiella", + "en_AG": "eaÅ‹galsgiella (Antigua ja Barbuda)", + "en_AI": "eaÅ‹galsgiella (Anguilla)", + "en_AS": "eaÅ‹galsgiella (Amerihká Samoa)", + "en_AT": "eaÅ‹galsgiella (Nuortariika)", + "en_AU": "eaÅ‹galsgiella (Austrália)", + "en_BB": "eaÅ‹galsgiella (Barbados)", + "en_BE": "eaÅ‹galsgiella (Belgia)", + "en_BI": "eaÅ‹galsgiella (Burundi)", + "en_BM": "eaÅ‹galsgiella (Bermuda)", + "en_BS": "eaÅ‹galsgiella (Bahamas)", + "en_BW": "eaÅ‹galsgiella (Botswana)", + "en_BZ": "eaÅ‹galsgiella (Belize)", + "en_CA": "eaÅ‹galsgiella (Kanáda)", + "en_CC": "eaÅ‹galsgiella (Cocos-sullot)", + "en_CH": "eaÅ‹galsgiella (Å veica)", + "en_CK": "eaÅ‹galsgiella (Cook-sullot)", + "en_CM": "eaÅ‹galsgiella (Kamerun)", + "en_CX": "eaÅ‹galsgiella (Juovllat-sullot)", + "en_CY": "eaÅ‹galsgiella (Kypros)", + "en_DE": "eaÅ‹galsgiella (Duiska)", + "en_DG": "eaÅ‹galsgiella (Diego Garcia)", + "en_DK": "eaÅ‹galsgiella (Dánmárku)", + "en_DM": "eaÅ‹galsgiella (Dominica)", + "en_ER": "eaÅ‹galsgiella (Eritrea)", + "en_FI": "eaÅ‹galsgiella (Suopma)", + "en_FJ": "eaÅ‹galsgiella (Fijisullot)", + "en_FK": "eaÅ‹galsgiella (Falklandsullot)", + "en_FM": "eaÅ‹galsgiella (Mikronesia)", + "en_GB": "eaÅ‹galsgiella (Stuorra-Británnia)", + "en_GD": "eaÅ‹galsgiella (Grenada)", + "en_GG": "eaÅ‹galsgiella (Guernsey)", + "en_GH": "eaÅ‹galsgiella (Ghana)", + "en_GI": "eaÅ‹galsgiella (Gibraltar)", + "en_GM": "eaÅ‹galsgiella (Gámbia)", + "en_GU": "eaÅ‹galsgiella (Guam)", + "en_GY": "eaÅ‹galsgiella (Guyana)", + "en_HK": "eaÅ‹galsgiella (Hongkong)", + "en_IE": "eaÅ‹galsgiella (Irlánda)", + "en_IL": "eaÅ‹galsgiella (Israel)", + "en_IM": "eaÅ‹galsgiella (Mann-sullot)", + "en_IN": "eaÅ‹galsgiella (India)", + "en_JE": "eaÅ‹galsgiella (Jersey)", + "en_JM": "eaÅ‹galsgiella (Jamaica)", + "en_KE": "eaÅ‹galsgiella (Kenia)", + "en_KI": "eaÅ‹galsgiella (Kiribati)", + "en_KN": "eaÅ‹galsgiella (Saint Kitts ja Nevis)", + "en_KY": "eaÅ‹galsgiella (Cayman-sullot)", + "en_LC": "eaÅ‹galsgiella (Saint Lucia)", + "en_LR": "eaÅ‹galsgiella (Liberia)", + "en_LS": "eaÅ‹galsgiella (Lesotho)", + "en_MG": "eaÅ‹galsgiella (Madagaskar)", + "en_MH": "eaÅ‹galsgiella (Marshallsullot)", + "en_MO": "eaÅ‹galsgiella (Makáo)", + "en_MP": "eaÅ‹galsgiella (Davvi-Mariánat)", + "en_MS": "eaÅ‹galsgiella (Montserrat)", + "en_MT": "eaÅ‹galsgiella (Málta)", + "en_MU": "eaÅ‹galsgiella (Mauritius)", + "en_MW": "eaÅ‹galsgiella (Malawi)", + "en_MY": "eaÅ‹galsgiella (Malesia)", + "en_NA": "eaÅ‹galsgiella (Namibia)", + "en_NF": "eaÅ‹galsgiella (Norfolksullot)", + "en_NG": "eaÅ‹galsgiella (Nigeria)", + "en_NL": "eaÅ‹galsgiella (Vuolleeatnamat)", + "en_NR": "eaÅ‹galsgiella (Nauru)", + "en_NU": "eaÅ‹galsgiella (Niue)", + "en_NZ": "eaÅ‹galsgiella (Ođđa-Selánda)", + "en_PG": "eaÅ‹galsgiella (Papua-Ođđa-Guinea)", + "en_PH": "eaÅ‹galsgiella (Filippiinnat)", + "en_PK": "eaÅ‹galsgiella (Pakistan)", + "en_PN": "eaÅ‹galsgiella (Pitcairn)", + "en_PR": "eaÅ‹galsgiella (Puerto Rico)", + "en_PW": "eaÅ‹galsgiella (Palau)", + "en_RW": "eaÅ‹galsgiella (Rwanda)", + "en_SB": "eaÅ‹galsgiella (Salomon-sullot)", + "en_SC": "eaÅ‹galsgiella (Seychellsullot)", + "en_SD": "eaÅ‹galsgiella (Davvisudan)", + "en_SE": "eaÅ‹galsgiella (Ruoŧŧa)", + "en_SG": "eaÅ‹galsgiella (Singapore)", + "en_SH": "eaÅ‹galsgiella (Saint Helena)", + "en_SI": "eaÅ‹galsgiella (Slovenia)", + "en_SL": "eaÅ‹galsgiella (Sierra Leone)", + "en_SS": "eaÅ‹galsgiella (Máttasudan)", + "en_SX": "eaÅ‹galsgiella (Vuolleeatnamat Saint Martin)", + "en_SZ": "eaÅ‹galsgiella (Svazieana)", + "en_TC": "eaÅ‹galsgiella (Turks ja Caicos-sullot)", + "en_TK": "eaÅ‹galsgiella (Tokelau)", + "en_TO": "eaÅ‹galsgiella (Tonga)", + "en_TT": "eaÅ‹galsgiella (Trinidad ja Tobago)", + "en_TV": "eaÅ‹galsgiella (Tuvalu)", + "en_TZ": "eaÅ‹galsgiella (Tanzánia)", + "en_UG": "eaÅ‹galsgiella (Uganda)", + "en_US": "eaÅ‹galsgiella (Amerihká ovttastuvvan stáhtat)", + "en_VC": "eaÅ‹galsgiella (Saint Vincent ja Grenadine)", + "en_VG": "eaÅ‹galsgiella (Brittania Virgin-sullot)", + "en_VI": "eaÅ‹galsgiella (AOS Virgin-sullot)", + "en_VU": "eaÅ‹galsgiella (Vanuatu)", + "en_WS": "eaÅ‹galsgiella (Samoa)", + "en_ZA": "eaÅ‹galsgiella (Mátta-Afrihká)", + "en_ZM": "eaÅ‹galsgiella (Zambia)", + "en_ZW": "eaÅ‹galsgiella (Zimbabwe)", + "es": "spánskkagiella", + "es_AR": "spánskkagiella (Argentina)", + "es_BO": "spánskkagiella (Bolivia)", + "es_BR": "spánskkagiella (Brasil)", + "es_CL": "spánskkagiella (ÄŒiile)", + "es_CO": "spánskkagiella (Kolombia)", + "es_CR": "spánskkagiella (Costa Rica)", + "es_CU": "spánskkagiella (Kuba)", + "es_DO": "spánskkagiella (Dominikána dásseváldi)", + "es_EA": "spánskkagiella (Ceuta ja Melilla)", + "es_EC": "spánskkagiella (Ecuador)", + "es_ES": "spánskkagiella (Spánia)", + "es_GQ": "spánskkagiella (Ekvatoriála Guinea)", + "es_GT": "spánskkagiella (Guatemala)", + "es_HN": "spánskkagiella (Honduras)", + "es_IC": "spánskkagiella (Kanáriasullot)", + "es_MX": "spánskkagiella (Meksiko)", + "es_NI": "spánskkagiella (Nicaragua)", + "es_PA": "spánskkagiella (Panama)", + "es_PE": "spánskkagiella (Peru)", + "es_PH": "spánskkagiella (Filippiinnat)", + "es_PR": "spánskkagiella (Puerto Rico)", + "es_PY": "spánskkagiella (Paraguay)", + "es_SV": "spánskkagiella (El Salvador)", + "es_US": "spánskkagiella (Amerihká ovttastuvvan stáhtat)", + "es_UY": "spánskkagiella (Uruguay)", + "es_VE": "spánskkagiella (Venezuela)", + "et": "esttegiella", + "et_EE": "esttegiella (Estlánda)", + "fa": "persijagiella", + "fa_AF": "persijagiella (Afghanistan)", + "fa_IR": "persijagiella (Iran)", + "fi": "suomagiella", + "fi_FI": "suomagiella (Suopma)", + "fo": "fearagiella", + "fo_DK": "fearagiella (Dánmárku)", + "fo_FO": "fearagiella (Fearsullot)", + "fr": "fránskkagiella", + "fr_BE": "fránskkagiella (Belgia)", + "fr_BF": "fránskkagiella (Burkina Faso)", + "fr_BI": "fránskkagiella (Burundi)", + "fr_BJ": "fránskkagiella (Benin)", + "fr_BL": "fránskkagiella (Saint Barthélemy)", + "fr_CA": "fránskkagiella (Kanáda)", + "fr_CD": "fránskkagiella (Kongo-Kinshasa)", + "fr_CF": "fránskkagiella (Gaska-Afrihká dásseváldi)", + "fr_CG": "fránskkagiella (Kongo-Brazzaville)", + "fr_CH": "fránskkagiella (Å veica)", + "fr_CI": "fránskkagiella (Elfenbenariddu)", + "fr_CM": "fránskkagiella (Kamerun)", + "fr_DJ": "fránskkagiella (Djibouti)", + "fr_DZ": "fránskkagiella (Algeria)", + "fr_FR": "fránskkagiella (Frankriika)", + "fr_GA": "fránskkagiella (Gabon)", + "fr_GF": "fránskkagiella (Frankriikka Guayana)", + "fr_GN": "fránskkagiella (Guinea)", + "fr_GP": "fránskkagiella (Guadeloupe)", + "fr_GQ": "fránskkagiella (Ekvatoriála Guinea)", + "fr_HT": "fránskkagiella (Haiti)", + "fr_KM": "fránskkagiella (Komoros)", + "fr_LU": "fránskkagiella (Luxembourg)", + "fr_MA": "fránskkagiella (Marokko)", + "fr_MC": "fránskkagiella (Monaco)", + "fr_MF": "fránskkagiella (Frankriikka Saint Martin)", + "fr_MG": "fránskkagiella (Madagaskar)", + "fr_ML": "fránskkagiella (Mali)", + "fr_MQ": "fránskkagiella (Martinique)", + "fr_MR": "fránskkagiella (Mauretánia)", + "fr_MU": "fránskkagiella (Mauritius)", + "fr_NC": "fránskkagiella (Ođđa-Kaledonia)", + "fr_NE": "fránskkagiella (Niger)", + "fr_PF": "fránskkagiella (Frankriikka Polynesia)", + "fr_PM": "fránskkagiella (Saint Pierre ja Miquelon)", + "fr_RE": "fránskkagiella (Réunion)", + "fr_RW": "fránskkagiella (Rwanda)", + "fr_SC": "fránskkagiella (Seychellsullot)", + "fr_SN": "fránskkagiella (Senegal)", + "fr_SY": "fránskkagiella (Syria)", + "fr_TD": "fránskkagiella (TÄad)", + "fr_TG": "fránskkagiella (Togo)", + "fr_TN": "fránskkagiella (Tunisia)", + "fr_VU": "fránskkagiella (Vanuatu)", + "fr_WF": "fránskkagiella (Wallis ja Futuna)", + "fr_YT": "fránskkagiella (Mayotte)", + "fy": "oarjifriisagiella", + "fy_NL": "oarjifriisagiella (Vuolleeatnamat)", + "ga": "iirragiella", + "ga_IE": "iirragiella (Irlánda)", + "gu": "gujaratagiella", + "gu_IN": "gujaratagiella (India)", + "gv": "manksgiella", + "gv_IM": "manksgiella (Mann-sullot)", + "ha": "haussagiella", + "ha_GH": "haussagiella (Ghana)", + "ha_NE": "haussagiella (Niger)", + "ha_NG": "haussagiella (Nigeria)", + "hi": "hindigiella", + "hi_IN": "hindigiella (India)", + "hr": "kroátiagiella", + "hr_BA": "kroátiagiella (Bosnia-Hercegovina)", + "hr_HR": "kroátiagiella (Kroátia)", + "hu": "ungárgiella", + "hu_HU": "ungárgiella (Ungár)", + "hy": "armeenagiella", + "hy_AM": "armeenagiella (Armenia)", + "id": "indonesiagiella", + "id_ID": "indonesiagiella (Indonesia)", + "is": "islánddagiella", + "is_IS": "islánddagiella (Islánda)", + "it": "itáliagiella", + "it_CH": "itáliagiella (Å veica)", + "it_IT": "itáliagiella (Itália)", + "it_SM": "itáliagiella (San Marino)", + "ja": "japánagiella", + "ja_JP": "japánagiella (Japána)", + "ka": "georgiagiella", + "ka_GE": "georgiagiella (Georgia)", + "kk": "kazakgiella", + "kk_KZ": "kazakgiella (Kasakstan)", + "km": "kambodiagiella", + "km_KH": "kambodiagiella (Kambodža)", + "ko": "koreagiella", + "ko_KP": "koreagiella (Davvi-Korea)", + "ko_KR": "koreagiella (Mátta-Korea)", + "kw": "kornagiella", + "kw_GB": "kornagiella (Stuorra-Británnia)", + "lb": "luxemburggagiella", + "lb_LU": "luxemburggagiella (Luxembourg)", + "lo": "laogiella", + "lo_LA": "laogiella (Laos)", + "lt": "liettuvagiella", + "lt_LT": "liettuvagiella (Lietuva)", + "lv": "látviagiella", + "lv_LV": "látviagiella (Látvia)", + "mk": "makedoniagiella", + "mk_MK": "makedoniagiella (Makedonia)", + "mn": "mongoliagiella", + "mn_MN": "mongoliagiella (Mongolia)", + "mt": "maltagiella", + "mt_MT": "maltagiella (Málta)", + "my": "burmagiella", + "my_MM": "burmagiella (Burma)", + "nb": "girjedárogiella", + "nb_NO": "girjedárogiella (Norga)", + "nb_SJ": "girjedárogiella (Svalbárda ja Jan Mayen)", + "ne": "nepaligiella", + "ne_IN": "nepaligiella (India)", + "ne_NP": "nepaligiella (Nepal)", + "nl": "hollánddagiella", + "nl_AW": "hollánddagiella (Aruba)", + "nl_BE": "hollánddagiella (Belgia)", + "nl_CW": "hollánddagiella (Curaçao)", + "nl_NL": "hollánddagiella (Vuolleeatnamat)", + "nl_SR": "hollánddagiella (Surinam)", + "nl_SX": "hollánddagiella (Vuolleeatnamat Saint Martin)", + "nn": "ođđadárogiella", + "nn_NO": "ođđadárogiella (Norga)", + "no": "dárogiella", + "no_NO": "dárogiella (Norga)", + "pa": "panjabigiella", + "pa_Arab": "panjabigiella (arába)", + "pa_Arab_PK": "panjabigiella (arába, Pakistan)", + "pa_IN": "panjabigiella (India)", + "pa_PK": "panjabigiella (Pakistan)", + "pl": "polskkagiella", + "pl_PL": "polskkagiella (Polen)", + "pt": "portugálagiella", + "pt_AO": "portugálagiella (Angola)", + "pt_BR": "portugálagiella (Brasil)", + "pt_CH": "portugálagiella (Å veica)", + "pt_CV": "portugálagiella (Kap Verde)", + "pt_GQ": "portugálagiella (Ekvatoriála Guinea)", + "pt_GW": "portugálagiella (Guinea-Bissau)", + "pt_LU": "portugálagiella (Luxembourg)", + "pt_MO": "portugálagiella (Makáo)", + "pt_MZ": "portugálagiella (Mosambik)", + "pt_PT": "portugálagiella (Portugála)", + "pt_ST": "portugálagiella (São Tomé ja Príncipe)", + "pt_TL": "portugálagiella (Nuorta-Timor)", + "rm": "romanÅ¡giella", + "rm_CH": "romanÅ¡giella (Å veica)", + "ro": "romániagiella", + "ro_MD": "romániagiella (Moldávia)", + "ro_RO": "romániagiella (Románia)", + "ru": "ruoššagiella", + "ru_BY": "ruoššagiella (Vilges-Ruošša)", + "ru_KG": "ruoššagiella (Kirgisistan)", + "ru_KZ": "ruoššagiella (Kasakstan)", + "ru_MD": "ruoššagiella (Moldávia)", + "ru_RU": "ruoššagiella (Ruošša)", + "ru_UA": "ruoššagiella (Ukraina)", + "se": "davvisámegiella", + "se_FI": "davvisámegiella (Suopma)", + "se_NO": "davvisámegiella (Norga)", + "se_SE": "davvisámegiella (Ruoŧŧa)", + "sh": "serbokroatiagiella", + "sh_BA": "serbokroatiagiella (Bosnia-Hercegovina)", + "sk": "slovákiagiella", + "sk_SK": "slovákiagiella (Slovákia)", + "sl": "slovenagiella", + "sl_SI": "slovenagiella (Slovenia)", + "sq": "albánagiella", + "sq_AL": "albánagiella (Albánia)", + "sq_MK": "albánagiella (Makedonia)", + "sq_XK": "albánagiella (Kosovo)", + "sr": "serbiagiella", + "sr_BA": "serbiagiella (Bosnia-Hercegovina)", + "sr_Cyrl": "serbiagiella (kyrillalaÅ¡)", + "sr_Cyrl_BA": "serbiagiella (kyrillalaÅ¡, Bosnia-Hercegovina)", + "sr_Cyrl_ME": "serbiagiella (kyrillalaÅ¡, Montenegro)", + "sr_Cyrl_RS": "serbiagiella (kyrillalaÅ¡, Serbia)", + "sr_Cyrl_XK": "serbiagiella (kyrillalaÅ¡, Kosovo)", + "sr_Latn": "serbiagiella (láhtenaÅ¡)", + "sr_Latn_BA": "serbiagiella (láhtenaÅ¡, Bosnia-Hercegovina)", + "sr_Latn_ME": "serbiagiella (láhtenaÅ¡, Montenegro)", + "sr_Latn_RS": "serbiagiella (láhtenaÅ¡, Serbia)", + "sr_Latn_XK": "serbiagiella (láhtenaÅ¡, Kosovo)", + "sr_ME": "serbiagiella (Montenegro)", + "sr_RS": "serbiagiella (Serbia)", + "sr_XK": "serbiagiella (Kosovo)", + "sv": "ruoŧagiella", + "sv_AX": "ruoŧagiella (Ã…lánda)", + "sv_FI": "ruoŧagiella (Suopma)", + "sv_SE": "ruoŧagiella (Ruoŧŧa)", + "th": "ŧaigiella", + "th_TH": "ŧaigiella (Thaieana)", + "tr": "durkagiella", + "tr_CY": "durkagiella (Kypros)", + "tr_TR": "durkagiella (Durka)", + "uk": "ukrainagiella", + "uk_UA": "ukrainagiella (Ukraina)", + "ur": "urdugiella", + "ur_IN": "urdugiella (India)", + "ur_PK": "urdugiella (Pakistan)", + "vi": "vietnamgiella", + "vi_VN": "vietnamgiella (Vietnam)", + "zh": "kiinnágiella", + "zh_CN": "kiinnágiella (Kiinná)", + "zh_HK": "kiinnágiella (Hongkong)", + "zh_Hans": "kiinnágiella (álki)", + "zh_Hans_CN": "kiinnágiella (álki, Kiinná)", + "zh_Hans_HK": "kiinnágiella (álki, Hongkong)", + "zh_Hans_MO": "kiinnágiella (álki, Makáo)", + "zh_Hans_SG": "kiinnágiella (álki, Singapore)", + "zh_Hant": "kiinnágiella (árbevirolaÅ¡)", + "zh_Hant_HK": "kiinnágiella (árbevirolaÅ¡, Hongkong)", + "zh_Hant_MO": "kiinnágiella (árbevirolaÅ¡, Makáo)", + "zh_Hant_TW": "kiinnágiella (árbevirolaÅ¡, Taiwan)", + "zh_MO": "kiinnágiella (Makáo)", + "zh_SG": "kiinnágiella (Singapore)", + "zh_TW": "kiinnágiella (Taiwan)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/se_FI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/se_FI.json new file mode 100644 index 0000000000000000000000000000000000000000..ba2e99b73dd1eca29edf77a41595d2e198d6cf71 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/se_FI.json @@ -0,0 +1,48 @@ +{ + "Names": { + "ar_SD": "arábagiella (Sudan)", + "ar_TD": "arábagiella (Chad)", + "be": "vilgesruoššagiella", + "be_BY": "vilgesruoššagiella (Vilges-Ruošša)", + "bn": "bengalagiella", + "bn_BD": "bengalagiella (Bangladesh)", + "bn_IN": "bengalagiella (India)", + "bs_BA": "bosniagiella (Bosnia ja Hercegovina)", + "bs_Cyrl_BA": "bosniagiella (kyrillalaÅ¡, Bosnia ja Hercegovina)", + "bs_Latn_BA": "bosniagiella (láhtenaÅ¡, Bosnia ja Hercegovina)", + "en_SD": "eaÅ‹galsgiella (Sudan)", + "fr_TD": "fránskkagiella (Chad)", + "hr_BA": "kroátiagiella (Bosnia ja Hercegovina)", + "hy": "armenagiella", + "hy_AM": "armenagiella (Armenia)", + "kk": "kazakhgiella", + "kk_KZ": "kazakhgiella (Kasakstan)", + "km": "kambožagiella", + "km_KH": "kambožagiella (Kamboža)", + "ne": "nepalagiella", + "ne_IN": "nepalagiella (India)", + "ne_NP": "nepalagiella (Nepal)", + "pa": "panjabagiella", + "pa_Arab": "panjabagiella (arábalaÅ¡)", + "pa_Arab_PK": "panjabagiella (arábalaÅ¡, Pakistan)", + "pa_IN": "panjabagiella (India)", + "pa_PK": "panjabagiella (Pakistan)", + "sh_BA": "serbokroatiagiella (Bosnia ja Hercegovina)", + "sr_BA": "serbiagiella (Bosnia ja Hercegovina)", + "sr_Cyrl_BA": "serbiagiella (kyrillalaÅ¡, Bosnia ja Hercegovina)", + "sr_Latn_BA": "serbiagiella (láhtenaÅ¡, Bosnia ja Hercegovina)", + "th": "thaigiella", + "th_TH": "thaigiella (Thaieana)", + "vi": "vietnamagiella", + "vi_VN": "vietnamagiella (Vietnam)", + "zh_Hans": "kiinnágiella (álkes kiinnálaÅ¡)", + "zh_Hans_CN": "kiinnágiella (álkes kiinnálaÅ¡, Kiinná)", + "zh_Hans_HK": "kiinnágiella (álkes kiinnálaÅ¡, Hongkong)", + "zh_Hans_MO": "kiinnágiella (álkes kiinnálaÅ¡, Makáo)", + "zh_Hans_SG": "kiinnágiella (álkes kiinnálaÅ¡, Singapore)", + "zh_Hant": "kiinnágiella (árbevirolaÅ¡ kiinnálaÅ¡)", + "zh_Hant_HK": "kiinnágiella (árbevirolaÅ¡ kiinnálaÅ¡, Hongkong)", + "zh_Hant_MO": "kiinnágiella (árbevirolaÅ¡ kiinnálaÅ¡, Makáo)", + "zh_Hant_TW": "kiinnágiella (árbevirolaÅ¡ kiinnálaÅ¡, Taiwan)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sg.json new file mode 100644 index 0000000000000000000000000000000000000000..3d1d1d6e85d05acc3913ca9a40e679c4f6c0d710 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sg.json @@ -0,0 +1,321 @@ +{ + "Names": { + "ak": "Akâan", + "ak_GH": "Akâan (Ganäa)", + "am": "Amarîki", + "am_ET": "Amarîki (Etiopïi)", + "ar": "Arâbo", + "ar_AE": "Arâbo (Arâbo Emirâti Ôko)", + "ar_BH": "Arâbo (Bahrâina)", + "ar_DJ": "Arâbo (Dibutùii)", + "ar_DZ": "Arâbo (Alzerïi)", + "ar_EG": "Arâbo (Kâmitâ)", + "ar_ER": "Arâbo (Eritrëe)", + "ar_IL": "Arâbo (Israëli)", + "ar_IQ": "Arâbo (Irâki)", + "ar_JO": "Arâbo (Zordanïi)", + "ar_KM": "Arâbo (Kömôro)", + "ar_KW": "Arâbo (Köwêti)", + "ar_LB": "Arâbo (Libùaan)", + "ar_LY": "Arâbo (Libïi)", + "ar_MA": "Arâbo (Marôko)", + "ar_MR": "Arâbo (Moritanïi)", + "ar_OM": "Arâbo (Omâni)", + "ar_PS": "Arâbo (Sêse tî Palestîni)", + "ar_QA": "Arâbo (Katära)", + "ar_SA": "Arâbo (Saûdi Arabïi)", + "ar_SD": "Arâbo (Sudäan)", + "ar_SO": "Arâbo (Somalïi)", + "ar_SY": "Arâbo (Sirïi)", + "ar_TD": "Arâbo (Tyâde)", + "ar_TN": "Arâbo (Tunizïi)", + "ar_YE": "Arâbo (Yëmêni)", + "be": "Bielörûsi", + "be_BY": "Bielörûsi (Belarüsi)", + "bg": "Bulugäri", + "bg_BG": "Bulugäri (Bulugarïi)", + "bn": "Bengäli", + "bn_BD": "Bengäli (Bengladêshi)", + "bn_IN": "Bengäli (Ênnde)", + "cs": "Tyêki", + "cs_CZ": "Tyêki (Ködörösêse tî Tyêki)", + "de": "Zâmani", + "de_AT": "Zâmani (Otrîsi)", + "de_BE": "Zâmani (Bêleze, Belezîki)", + "de_CH": "Zâmani (Sûîsi)", + "de_DE": "Zâmani (Zâmani)", + "de_IT": "Zâmani (Italùii)", + "de_LI": "Zâmani (Liechtenstein,)", + "de_LU": "Zâmani (Lugzambûru)", + "el": "Gerêki", + "el_CY": "Gerêki (Sîpri)", + "el_GR": "Gerêki (Gerêsi)", + "en": "Anglëe", + "en_AG": "Anglëe (Antîgua na Barbûda)", + "en_AI": "Anglëe (Angûîla)", + "en_AS": "Anglëe (Samöa tî Amerîka)", + "en_AT": "Anglëe (Otrîsi)", + "en_AU": "Anglëe (Ostralïi, Sotralïi)", + "en_BB": "Anglëe (Barabâda)", + "en_BE": "Anglëe (Bêleze, Belezîki)", + "en_BI": "Anglëe (Burundïi)", + "en_BM": "Anglëe (Beremûda)", + "en_BS": "Anglëe (Bahâmasa)", + "en_BW": "Anglëe (Botswana)", + "en_BZ": "Anglëe (Belîzi)", + "en_CA": "Anglëe (Kanadäa)", + "en_CH": "Anglëe (Sûîsi)", + "en_CK": "Anglëe (âzûâ Kûku)", + "en_CM": "Anglëe (Kamerûne)", + "en_CY": "Anglëe (Sîpri)", + "en_DE": "Anglëe (Zâmani)", + "en_DK": "Anglëe (Danemêrke)", + "en_DM": "Anglëe (Dömïnîka)", + "en_ER": "Anglëe (Eritrëe)", + "en_FI": "Anglëe (Fëlânde)", + "en_FJ": "Anglëe (Fidyïi)", + "en_FK": "Anglëe (Âzûâ tî Mälüîni)", + "en_FM": "Anglëe (Mikronezïi)", + "en_GB": "Anglëe (Ködörögbïä--Ôko)", + "en_GD": "Anglëe (Grenâda)", + "en_GH": "Anglëe (Ganäa)", + "en_GI": "Anglëe (Zibraltära, Zibaratära)", + "en_GM": "Anglëe (Gambïi)", + "en_GU": "Anglëe (Guâm)", + "en_GY": "Anglëe (Gayâna)", + "en_IE": "Anglëe (Irlânde)", + "en_IL": "Anglëe (Israëli)", + "en_IN": "Anglëe (Ênnde)", + "en_IO": "Anglëe (Sêse tî Anglëe na Ngûyämä tî Ênnde)", + "en_JM": "Anglëe (Zamaîka)", + "en_KE": "Anglëe (Kenyäa)", + "en_KI": "Anglëe (Kiribati)", + "en_KN": "Anglëe (Sên-Krïstôfo-na-Nevîsi)", + "en_KY": "Anglëe (Âzûâ Ngundë, Kaimäni)", + "en_LC": "Anglëe (Sênt-Lisïi)", + "en_LR": "Anglëe (Liberïa)", + "en_LS": "Anglëe (Lesôtho)", + "en_MG": "Anglëe (Madagaskära)", + "en_MH": "Anglëe (Âzûâ Märshâl)", + "en_MP": "Anglëe (Âzûâ Märïâni tî Banga)", + "en_MS": "Anglëe (Monserâte)", + "en_MT": "Anglëe (Mâlta)", + "en_MU": "Anglëe (Mörîsi)", + "en_MW": "Anglëe (Malawïi)", + "en_MY": "Anglëe (Malezïi)", + "en_NA": "Anglëe (Namibùii)", + "en_NF": "Anglëe (Zûâ Nôrfôlko)", + "en_NG": "Anglëe (Nizerïa)", + "en_NL": "Anglëe (Holände)", + "en_NR": "Anglëe (Nauru)", + "en_NU": "Anglëe (Niue)", + "en_NZ": "Anglëe (Finî Zelânde)", + "en_PG": "Anglëe (Papû Finî Ginëe, Papuazïi)", + "en_PH": "Anglëe (Filipîni)", + "en_PK": "Anglëe (Pakistäan)", + "en_PN": "Anglëe (Pitikêrni)", + "en_PR": "Anglëe (Porto Rîko)", + "en_PW": "Anglëe (Palau)", + "en_RW": "Anglëe (Ruandäa)", + "en_SB": "Anglëe (Zûâ Salomöon)", + "en_SC": "Anglëe (Sëyshêle)", + "en_SD": "Anglëe (Sudäan)", + "en_SE": "Anglëe (Suêde)", + "en_SG": "Anglëe (Sïngäpûru)", + "en_SH": "Anglëe (Sênt-Helêna)", + "en_SI": "Anglëe (Solovenïi)", + "en_SL": "Anglëe (Sierä-Leône)", + "en_SZ": "Anglëe (Swäzïlânde)", + "en_TC": "Anglëe (Âzûâ Turku na Kaîki)", + "en_TK": "Anglëe (Tokelau)", + "en_TO": "Anglëe (Tonga)", + "en_TT": "Anglëe (Trinitùee na Tobagö)", + "en_TV": "Anglëe (Tüvalü)", + "en_TZ": "Anglëe (Tanzanïi)", + "en_UG": "Anglëe (Ugandäa)", + "en_US": "Anglëe (ÂLeaa-Ôko tî Amerika)", + "en_VC": "Anglëe (Sên-Vensäan na âGrenadîni)", + "en_VG": "Anglëe (Âzôâ Viîrîggo tî Anglëe)", + "en_VI": "Anglëe (Âzûâ Virîgo tî Amerîka)", + "en_VU": "Anglëe (Vanuatü)", + "en_WS": "Anglëe (Samoäa)", + "en_ZA": "Anglëe (Mbongo-Afrîka)", + "en_ZM": "Anglëe (Zambïi)", + "en_ZW": "Anglëe (Zimbäbwe)", + "es": "Espanyöl", + "es_AR": "Espanyöl (Arzantîna)", + "es_BO": "Espanyöl (Bolivïi)", + "es_BR": "Espanyöl (Brezîli)", + "es_CL": "Espanyöl (Shilïi)", + "es_CO": "Espanyöl (Kolombïi)", + "es_CR": "Espanyöl (Kôsta Rîka)", + "es_CU": "Espanyöl (Kubäa)", + "es_DO": "Espanyöl (Ködörösêse tî Dominîka)", + "es_EC": "Espanyöl (Ekuatëre)", + "es_ES": "Espanyöl (Espânye)", + "es_GQ": "Espanyöl (Ginëe tî Ekuatëre)", + "es_GT": "Espanyöl (Guatêmälä)", + "es_HN": "Espanyöl (Honduräsi)", + "es_MX": "Espanyöl (Mekisîki)", + "es_NI": "Espanyöl (Nikaragua)", + "es_PA": "Espanyöl (Panama)", + "es_PE": "Espanyöl (Perüu)", + "es_PH": "Espanyöl (Filipîni)", + "es_PR": "Espanyöl (Porto Rîko)", + "es_PY": "Espanyöl (Paraguëe)", + "es_SV": "Espanyöl (Salvadöro)", + "es_US": "Espanyöl (ÂLeaa-Ôko tî Amerika)", + "es_UY": "Espanyöl (Uruguëe)", + "es_VE": "Espanyöl (Venezueläa)", + "fa": "Farsî", + "fa_AF": "Farsî (Faganïta, Afganïstäan)", + "fa_IR": "Farsî (Iräan)", + "fr": "Farânzi", + "fr_BE": "Farânzi (Bêleze, Belezîki)", + "fr_BF": "Farânzi (Burkina Faso)", + "fr_BI": "Farânzi (Burundïi)", + "fr_BJ": "Farânzi (Benëen)", + "fr_CA": "Farânzi (Kanadäa)", + "fr_CD": "Farânzi (Ködörösêse tî Ngunuhalëzo tî kongö)", + "fr_CF": "Farânzi (Ködörösêse tî Bêafrîka)", + "fr_CG": "Farânzi (Kongö)", + "fr_CH": "Farânzi (Sûîsi)", + "fr_CI": "Farânzi (Kôdivüära)", + "fr_CM": "Farânzi (Kamerûne)", + "fr_DJ": "Farânzi (Dibutùii)", + "fr_DZ": "Farânzi (Alzerïi)", + "fr_FR": "Farânzi (Farânzi)", + "fr_GA": "Farânzi (Gaböon)", + "fr_GF": "Farânzi (Güyâni tî farânzi)", + "fr_GN": "Farânzi (Ginëe)", + "fr_GP": "Farânzi (Guadelûpu)", + "fr_GQ": "Farânzi (Ginëe tî Ekuatëre)", + "fr_HT": "Farânzi (Haitïi)", + "fr_KM": "Farânzi (Kömôro)", + "fr_LU": "Farânzi (Lugzambûru)", + "fr_MA": "Farânzi (Marôko)", + "fr_MC": "Farânzi (Monaköo)", + "fr_MG": "Farânzi (Madagaskära)", + "fr_ML": "Farânzi (Malïi)", + "fr_MQ": "Farânzi (Märtïnîki)", + "fr_MR": "Farânzi (Moritanïi)", + "fr_MU": "Farânzi (Mörîsi)", + "fr_NC": "Farânzi (Finî Kaledonïi)", + "fr_NE": "Farânzi (Nizëre)", + "fr_PF": "Farânzi (Polinezïi tî farânzi)", + "fr_PM": "Farânzi (Sên-Pyêre na Mikelöon)", + "fr_RE": "Farânzi (Reinïon)", + "fr_RW": "Farânzi (Ruandäa)", + "fr_SC": "Farânzi (Sëyshêle)", + "fr_SN": "Farânzi (Senegäle)", + "fr_SY": "Farânzi (Sirïi)", + "fr_TD": "Farânzi (Tyâde)", + "fr_TG": "Farânzi (Togö)", + "fr_TN": "Farânzi (Tunizïi)", + "fr_VU": "Farânzi (Vanuatü)", + "fr_WF": "Farânzi (Walîsi na Futuna)", + "fr_YT": "Farânzi (Mäyôte)", + "ha": "Haüsä", + "ha_GH": "Haüsä (Ganäa)", + "ha_NE": "Haüsä (Nizëre)", + "ha_NG": "Haüsä (Nizerïa)", + "hi": "Hîndi", + "hi_IN": "Hîndi (Ênnde)", + "hu": "Hongruäa", + "hu_HU": "Hongruäa (Hongirùii)", + "id": "Enndonezïi", + "id_ID": "Enndonezïi (Ênndonezïi)", + "ig": "Ãgbö", + "ig_NG": "Ãgbö (Nizerïa)", + "it": "Ênnde", + "it_CH": "Ênnde (Sûîsi)", + "it_IT": "Ênnde (Italùii)", + "it_SM": "Ênnde (Sên-Marëen)", + "ja": "Zaponëe", + "ja_JP": "Zaponëe (Zapöon)", + "km": "Kmêre", + "km_KH": "Kmêre (Kämbôzi)", + "ko": "Koreyëen", + "ko_KP": "Koreyëen (Korëe tî Banga)", + "ko_KR": "Koreyëen (Korëe tî Mbongo)", + "ms": "Malëe", + "ms_BN": "Malëe (Brunêi)", + "ms_MY": "Malëe (Malezïi)", + "ms_SG": "Malëe (Sïngäpûru)", + "my": "Miamära, Birimäni", + "my_MM": "Miamära, Birimäni (Myämâra)", + "ne": "Nepalëe", + "ne_IN": "Nepalëe (Ênnde)", + "ne_NP": "Nepalëe (Nëpâli)", + "nl": "Holandëe", + "nl_AW": "Holandëe (Arûba)", + "nl_BE": "Holandëe (Bêleze, Belezîki)", + "nl_NL": "Holandëe (Holände)", + "nl_SR": "Holandëe (Surinäm)", + "pa": "Penzäbï", + "pa_IN": "Penzäbï (Ênnde)", + "pa_PK": "Penzäbï (Pakistäan)", + "pl": "Polonëe", + "pl_PL": "Polonëe (Pölôni)", + "pt": "Portugëe, Pûra", + "pt_AO": "Portugëe, Pûra (Angoläa)", + "pt_BR": "Portugëe, Pûra (Brezîli)", + "pt_CH": "Portugëe, Pûra (Sûîsi)", + "pt_CV": "Portugëe, Pûra (Azûâ tî Kâpo-Vêre)", + "pt_GQ": "Portugëe, Pûra (Ginëe tî Ekuatëre)", + "pt_GW": "Portugëe, Pûra (Gninëe-Bisau)", + "pt_LU": "Portugëe, Pûra (Lugzambûru)", + "pt_MZ": "Portugëe, Pûra (Mözämbîka)", + "pt_PT": "Portugëe, Pûra (Pörtugäle, Ködörö Pûra)", + "pt_ST": "Portugëe, Pûra (Sâô Tömê na Prinsîpe)", + "pt_TL": "Portugëe, Pûra (Timôro tî Tö)", + "ro": "Rumëen", + "ro_MD": "Rumëen (Moldavùii)", + "ro_RO": "Rumëen (Rumanïi)", + "ru": "Rûsi", + "ru_BY": "Rûsi (Belarüsi)", + "ru_KG": "Rûsi (Kirigizitùaan)", + "ru_KZ": "Rûsi (Kazakisitäan)", + "ru_MD": "Rûsi (Moldavùii)", + "ru_RU": "Rûsi (Rusïi)", + "ru_UA": "Rûsi (Ukrêni)", + "rw": "Ruandäa", + "rw_RW": "Ruandäa (Ruandäa)", + "sg": "Sängö", + "sg_CF": "Sängö (Ködörösêse tî Bêafrîka)", + "so": "Somalïi", + "so_DJ": "Somalïi (Dibutùii)", + "so_ET": "Somalïi (Etiopïi)", + "so_KE": "Somalïi (Kenyäa)", + "so_SO": "Somalïi (Somalïi)", + "sv": "Sueduäa", + "sv_FI": "Sueduäa (Fëlânde)", + "sv_SE": "Sueduäa (Suêde)", + "ta": "Tämûli", + "ta_IN": "Tämûli (Ênnde)", + "ta_LK": "Tämûli (Sirî-Lanka)", + "ta_MY": "Tämûli (Malezïi)", + "ta_SG": "Tämûli (Sïngäpûru)", + "th": "Thâi", + "th_TH": "Thâi (Tailânde)", + "tr": "Tûrûku", + "tr_CY": "Tûrûku (Sîpri)", + "tr_TR": "Tûrûku (Turukïi)", + "uk": "Ukrêni", + "uk_UA": "Ukrêni (Ukrêni)", + "ur": "Ûrdu", + "ur_IN": "Ûrdu (Ênnde)", + "ur_PK": "Ûrdu (Pakistäan)", + "vi": "Vietnäm", + "vi_VN": "Vietnäm (Vietnäm)", + "yo": "Yoruba", + "yo_BJ": "Yoruba (Benëen)", + "yo_NG": "Yoruba (Nizerïa)", + "zh": "Shinuäa", + "zh_CN": "Shinuäa (Shîna)", + "zh_SG": "Shinuäa (Sïngäpûru)", + "zh_TW": "Shinuäa (Tâiwâni)", + "zu": "Zûlu", + "zu_ZA": "Zûlu (Mbongo-Afrîka)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sh.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sh.json new file mode 100644 index 0000000000000000000000000000000000000000..7124816265047f09d15b7c058c283f95199a0fc9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sh.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Latn" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sh_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sh_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..61b4214e556b22f54768870be605e4cc19ae238f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sh_BA.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Latn_BA" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sh_CS.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sh_CS.json new file mode 100644 index 0000000000000000000000000000000000000000..90df436a701afb72840996a8cffed4189c8a62a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sh_CS.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Latn_RS" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sh_YU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sh_YU.json new file mode 100644 index 0000000000000000000000000000000000000000..90df436a701afb72840996a8cffed4189c8a62a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sh_YU.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Latn_RS" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/si.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/si.json new file mode 100644 index 0000000000000000000000000000000000000000..8cdb24318ff137937039016e8d4d018c8bb8b1b4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/si.json @@ -0,0 +1,562 @@ +{ + "Names": { + "af": "à¶…à¶´à·Šâ€à¶»à·’à¶šà·à¶±à·”", + "af_NA": "à¶…à¶´à·Šâ€à¶»à·’à¶šà·à¶±à·” (à¶±à·à¶¸à·“බියà·à·€)", + "af_ZA": "à¶…à¶´à·Šâ€à¶»à·’à¶šà·à¶±à·” (දකුණු à¶…à¶´à·Šâ€à¶»à·’à¶šà·à·€)", + "ak": "à¶…à¶šà·à¶±à·Š", + "ak_GH": "à¶…à¶šà·à¶±à·Š (à¶à·à¶±à·à·€)", + "am": "ඇම්හà·à¶»à·’à¶šà·Š", + "am_ET": "ඇම්හà·à¶»à·’à¶šà·Š (ඉතියà·à¶´à·’යà·à·€)", + "ar": "à¶…à¶»à·à¶¶à·’", + "ar_AE": "à¶…à¶»à·à¶¶à·’ (එක්සත් à¶…à¶»à·à¶¶à·’ එමිර් à¶»à·à¶¢à·Šâ€à¶ºà¶º)", + "ar_BH": "à¶…à¶»à·à¶¶à·’ (බහරේන්)", + "ar_DJ": "à¶…à¶»à·à¶¶à·’ (ජිබුටි)", + "ar_DZ": "à¶…à¶»à·à¶¶à·’ (ඇල්ජීරියà·à·€)", + "ar_EG": "à¶…à¶»à·à¶¶à·’ (ඊජිප්තුව)", + "ar_EH": "à¶…à¶»à·à¶¶à·’ (à¶¶à¶§à·„à·’à¶» සහරà·à·€)", + "ar_ER": "à¶…à¶»à·à¶¶à·’ (එරිත්â€à¶»à·’යà·à·€)", + "ar_IL": "à¶…à¶»à·à¶¶à·’ (à¶Šà·à·Šâ€à¶»à·à¶ºà¶½à¶º)", + "ar_IQ": "à¶…à¶»à·à¶¶à·’ (ඉරà·à¶šà¶º)", + "ar_JO": "à¶…à¶»à·à¶¶à·’ (à¶¢à·à¶»à·Šà¶¯à·à¶±à¶º)", + "ar_KM": "à¶…à¶»à·à¶¶à·’ (කොමොරà·à·ƒà·Š)", + "ar_KW": "à¶…à¶»à·à¶¶à·’ (කුවේටය)", + "ar_LB": "à¶…à¶»à·à¶¶à·’ (ලෙබනනය)", + "ar_LY": "à¶…à¶»à·à¶¶à·’ (ලිබියà·à·€)", + "ar_MA": "à¶…à¶»à·à¶¶à·’ (මොරොක්කà·à·€)", + "ar_MR": "à¶…à¶»à·à¶¶à·’ (මොරිටේනියà·à·€)", + "ar_OM": "à¶…à¶»à·à¶¶à·’ (ඕමà·à¶±à¶º)", + "ar_PS": "à¶…à¶»à·à¶¶à·’ (පලස්තීන à¶»à·à¶¢à·Šâ€à¶ºà¶º)", + "ar_QA": "à¶…à¶»à·à¶¶à·’ (à¶šà¶§à·à¶»à·Š)", + "ar_SA": "à¶…à¶»à·à¶¶à·’ (සෞදි à¶…à¶»à·à¶¶à·’ය)", + "ar_SD": "à¶…à¶»à·à¶¶à·’ (සූඩà·à¶±à¶º)", + "ar_SO": "à¶…à¶»à·à¶¶à·’ (à·ƒà·à¶¸à·à¶½à·’යà·à·€)", + "ar_SS": "à¶…à¶»à·à¶¶à·’ (දකුණු සුඩà·à¶±à¶º)", + "ar_SY": "à¶…à¶»à·à¶¶à·’ (සිරියà·à·€)", + "ar_TD": "à¶…à¶»à·à¶¶à·’ (à¶ à·à¶ à·Š)", + "ar_TN": "à¶…à¶»à·à¶¶à·’ (ටියුනීසියà·à·€)", + "ar_YE": "à¶…à¶»à·à¶¶à·’ (යේමනය)", + "as": "ඇසමියà·à¶±à·”", + "as_IN": "ඇසමියà·à¶±à·” (ඉන්දියà·à·€)", + "az": "අසර්බයිජà·à¶±à·Š", + "az_AZ": "අසර්බයිජà·à¶±à·Š (අසර්බයිජà·à¶±à¶º)", + "az_Cyrl": "අසර්බයිජà·à¶±à·Š (සිරිලික්)", + "az_Cyrl_AZ": "අසර්බයිජà·à¶±à·Š (සිරිලික්, අසර්බයිජà·à¶±à¶º)", + "az_Latn": "අසර්බයිජà·à¶±à·Š (ලතින්)", + "az_Latn_AZ": "අසර්බයිජà·à¶±à·Š (ලතින්, අසර්බයිජà·à¶±à¶º)", + "be": "බෙලරුසියà·à¶±à·”", + "be_BY": "බෙලරුසියà·à¶±à·” (බෙලරුස්)", + "bg": "බල්ගේරියà·à¶±à·”", + "bg_BG": "බල්ගේරියà·à¶±à·” (බල්ගේරියà·à·€)", + "bm": "බම්බරà·", + "bm_ML": "බම්බර෠(මà·à¶½à·’)", + "bn": "බෙංගà·à¶½à·’", + "bn_BD": "බෙංගà·à¶½à·’ (බංග්ලà·à¶¯à·šà·à¶º)", + "bn_IN": "බෙංගà·à¶½à·’ (ඉන්දියà·à·€)", + "bo": "ටිබෙට්", + "bo_CN": "ටිබෙට් (චීනය)", + "bo_IN": "ටිබෙට් (ඉන්දියà·à·€)", + "br": "à¶¶à·Šâ€à¶»à·šà¶§à·œà¶±à·Š", + "br_FR": "à¶¶à·Šâ€à¶»à·šà¶§à·œà¶±à·Š (à¶´à·Šâ€à¶»à¶‚à·à¶º)", + "bs": "බොස්නියà·à¶±à·”", + "bs_BA": "බොස්නියà·à¶±à·” (බොස්නියà·à·€ සහ හර්සගොවීනà·à·€)", + "bs_Cyrl": "බොස්නියà·à¶±à·” (සිරිලික්)", + "bs_Cyrl_BA": "බොස්නියà·à¶±à·” (සිරිලික්, බොස්නියà·à·€ සහ හර්සගොවීනà·à·€)", + "bs_Latn": "බොස්නියà·à¶±à·” (ලතින්)", + "bs_Latn_BA": "බොස්නියà·à¶±à·” (ලතින්, බොස්නියà·à·€ සහ හර්සගොවීනà·à·€)", + "ca": "à¶šà·à¶§à¶½à¶±à·Š", + "ca_AD": "à¶šà·à¶§à¶½à¶±à·Š (ඇන්ඩà·à¶»à·à·€)", + "ca_ES": "à¶šà·à¶§à¶½à¶±à·Š (ස්පà·à¶¤à·Šà¶¤à¶º)", + "ca_FR": "à¶šà·à¶§à¶½à¶±à·Š (à¶´à·Šâ€à¶»à¶‚à·à¶º)", + "ca_IT": "à¶šà·à¶§à¶½à¶±à·Š (ඉතà·à¶½à·’ය)", + "ce": "චෙච්නියà·à¶±à·”", + "ce_RU": "චෙච්නියà·à¶±à·” (රුසියà·à·€)", + "cs": "චෙත්", + "cs_CZ": "චෙත් (චෙක් ජනරජය)", + "cy": "වේල්ස්", + "cy_GB": "වේල්ස් (එක්සත් à¶»à·à¶¢à¶°à·à¶±à·’ය)", + "da": "à¶©à·à¶±à·’à·à·Š", + "da_DK": "à¶©à·à¶±à·’à·à·Š (ඩෙන්මà·à¶»à·Šà¶šà¶º)", + "da_GL": "à¶©à·à¶±à·’à·à·Š (ග්â€à¶»à·“න්ලන්තය)", + "de": "ජර්මන්", + "de_AT": "ජර්මන් (ඔස්ට්â€à¶»à·’යà·à·€)", + "de_BE": "ජර්මන් (බෙල්ජියම)", + "de_CH": "ජර්මන් (ස්විස්ටර්ලන්තය)", + "de_DE": "ජර්මන් (ජර්මනිය)", + "de_IT": "ජර්මන් (ඉතà·à¶½à·’ය)", + "de_LI": "ජර්මන් (ලික්ටන්ස්ටයින්)", + "de_LU": "ජර්මන් (ලක්à·à¶¸à·Šà¶¶à¶»à·Šà¶œà·Š)", + "dz": "ඩිසොන්කà·", + "dz_BT": "ඩිසොන්ක෠(à¶·à·–à¶­à·à¶±à¶º)", + "ee": "ඉව්", + "ee_GH": "ඉව් (à¶à·à¶±à·à·€)", + "ee_TG": "ඉව් (ටොගà·)", + "el": "ග්â€à¶»à·“à¶š", + "el_CY": "ග්â€à¶»à·“à¶š (සයිප්â€à¶»à·ƒà¶º)", + "el_GR": "ග්â€à¶»à·“à¶š (ග්â€à¶»à·“සිය)", + "en": "ඉංග්â€à¶»à·“සි", + "en_AG": "ඉංග්â€à¶»à·“සි (ඇන්ටිගුව෠සහ à¶¶à·à¶¶à·’යුඩà·à·€)", + "en_AI": "ඉංග්â€à¶»à·“සි (ඇන්ගුයිලà·à·€)", + "en_AS": "ඉංග්â€à¶»à·“සි (ඇමරිකà·à¶±à·” à·ƒà·à¶¸à·à·€à·à·€)", + "en_AT": "ඉංග්â€à¶»à·“සි (ඔස්ට්â€à¶»à·’යà·à·€)", + "en_AU": "ඉංග්â€à¶»à·“සි (ඕස්ට්â€à¶»à·šà¶½à·’යà·à·€)", + "en_BB": "ඉංග්â€à¶»à·“සි (à¶¶à·à¶»à·Šà¶¶à¶©à·à·ƒà·Š)", + "en_BE": "ඉංග්â€à¶»à·“සි (බෙල්ජියම)", + "en_BI": "ඉංග්â€à¶»à·“සි (බුරුන්දි)", + "en_BM": "ඉංග්â€à¶»à·“සි (බර්මියුඩà·)", + "en_BS": "ඉංග්â€à¶»à·“සි (බහමà·à·ƒà·Š)", + "en_BW": "ඉංග්â€à¶»à·“සි (බොට්ස්වà·à¶±à·)", + "en_BZ": "ඉංග්â€à¶»à·“සි (බෙලීස්)", + "en_CA": "ඉංග්â€à¶»à·“සි (à¶šà·à¶±à¶©à·à·€)", + "en_CC": "ඉංග්â€à¶»à·“සි (කොකà·à·ƒà·Š දූපත්)", + "en_CH": "ඉංග්â€à¶»à·“සි (ස්විස්ටර්ලන්තය)", + "en_CK": "ඉංග්â€à¶»à·“සි (කුක් දූපත්)", + "en_CM": "ඉංග්â€à¶»à·“සි (à¶šà·à¶¸à¶»à·–න්)", + "en_CX": "ඉංග්â€à¶»à·“සි (à¶šà·Šâ€à¶»à·’ස්මස් දූපත)", + "en_CY": "ඉංග්â€à¶»à·“සි (සයිප්â€à¶»à·ƒà¶º)", + "en_DE": "ඉංග්â€à¶»à·“සි (ජර්මනිය)", + "en_DG": "ඉංග්â€à¶»à·“සි (දියà·à¶œà· à¶œà·à¶»à·Šà·ƒà·’යà·)", + "en_DK": "ඉංග්â€à¶»à·“සි (ඩෙන්මà·à¶»à·Šà¶šà¶º)", + "en_DM": "ඉංග්â€à¶»à·“සි (ඩොමිනිකà·à·€)", + "en_ER": "ඉංග්â€à¶»à·“සි (එරිත්â€à¶»à·’යà·à·€)", + "en_FI": "ඉංග්â€à¶»à·“සි (ෆින්ලන්තය)", + "en_FJ": "ඉංග්â€à¶»à·“සි (ෆීජී)", + "en_FK": "ඉංග්â€à¶»à·“සි (à·†à·à¶šà·Šà¶½à¶±à·Šà¶­ දූපත්)", + "en_FM": "ඉංග්â€à¶»à·“සි (මයික්â€à¶»à·œà¶±à·“සියà·à·€)", + "en_GB": "ඉංග්â€à¶»à·“සි (එක්සත් à¶»à·à¶¢à¶°à·à¶±à·’ය)", + "en_GD": "ඉංග්â€à¶»à·“සි (ග්â€à¶»à·à¶±à¶©à·à·€)", + "en_GG": "ඉංග්â€à¶»à·“සි (ගර්න්සිය)", + "en_GH": "ඉංග්â€à¶»à·“සි (à¶à·à¶±à·à·€)", + "en_GI": "ඉංග්â€à¶»à·“සි (ජිබ්â€à¶»à·à¶½à·Šà¶§à·à·€)", + "en_GM": "ඉංග්â€à¶»à·“සි (à¶œà·à¶¸à·Šà¶¶à·’යà·à·€)", + "en_GU": "ඉංග්â€à¶»à·“සි (ගුවà·à¶¸à·Š)", + "en_GY": "ඉංග්â€à¶»à·“සි (ගයනà·à·€)", + "en_HK": "ඉංග්â€à¶»à·“සි (හොංකොං à¶ à·“à¶± විà·à·šà·‚ පරිපà·à¶½à¶± à¶šà¶½à·à¶´à¶º)", + "en_IE": "ඉංග්â€à¶»à·“සි (අයර්ලන්තය)", + "en_IL": "ඉංග්â€à¶»à·“සි (à¶Šà·à·Šâ€à¶»à·à¶ºà¶½à¶º)", + "en_IM": "ඉංග්â€à¶»à·“සි (අයිල් ඔෆ් මෑන්)", + "en_IN": "ඉංග්â€à¶»à·“සි (ඉන්දියà·à·€)", + "en_IO": "ඉංග්â€à¶»à·“සි (à¶¶à·Šâ€à¶»à·’à¶­à·à¶±à·Šâ€à¶º ඉන්දීය à·ƒà·à¶œà¶» à¶¶à¶½ à¶´à·Šâ€à¶»à¶¯à·šà·à¶º)", + "en_JE": "ඉංග්â€à¶»à·“සි (ජර්සි)", + "en_JM": "ඉංග්â€à¶»à·“සි (à¶¢à·à¶¸à·™à¶ºà·’à¶šà·à·€)", + "en_KE": "ඉංග්â€à¶»à·“සි (කෙන්යà·à·€)", + "en_KI": "ඉංග්â€à¶»à·“සි (කිරිබති)", + "en_KN": "ඉංග්â€à¶»à·“සි (à·à·à¶±à·Šà¶­ කිට්ස් සහ නේවිස්)", + "en_KY": "ඉංග්â€à¶»à·“සි (කේමන් දූපත්)", + "en_LC": "ඉංග්â€à¶»à·“සි (à·à·à¶±à·Šà¶­ ලුසියà·)", + "en_LR": "ඉංග්â€à¶»à·“සි (ලයිබීරියà·à·€)", + "en_LS": "ඉංග්â€à¶»à·“සි (ලෙසතà·)", + "en_MG": "ඉංග්â€à¶»à·“සි (මà·à¶©à¶œà·ƒà·Šà¶šà¶»à¶º)", + "en_MH": "ඉංග්â€à¶»à·“සි (මà·à·‚ල් දූපත්)", + "en_MO": "ඉංග්â€à¶»à·“සි (මකà·à·€à·” à¶ à·“à¶± විà·à·šà·‚ පරිපà·à¶½à¶± à¶šà¶½à·à¶´à¶º)", + "en_MP": "ඉංග්â€à¶»à·“සි (උතුරු මරියà·à¶±à· දූපත්)", + "en_MS": "ඉංග්â€à¶»à·“සි (මොන්සෙරà·à¶§à·Š)", + "en_MT": "ඉංග්â€à¶»à·“සි (මà·à¶½à·Šà¶§à·à·€)", + "en_MU": "ඉංග්â€à¶»à·“සි (මුරුසිය)", + "en_MW": "ඉංග්â€à¶»à·“සි (මලà·à·€à·’)", + "en_MY": "ඉංග්â€à¶»à·“සි (මà·à¶½à·šà·ƒà·’යà·à·€)", + "en_NA": "ඉංග්â€à¶»à·“සි (à¶±à·à¶¸à·“බියà·à·€)", + "en_NF": "ඉංග්â€à¶»à·“සි (à¶±à·à·†à·à¶šà·Š දූපත)", + "en_NG": "ඉංග්â€à¶»à·“සි (නයිජීරියà·à·€)", + "en_NL": "ඉංග්â€à¶»à·“සි (නෙදර්ලන්තය)", + "en_NR": "ඉංග්â€à¶»à·“සි (à¶±à·à·€à·”රු)", + "en_NU": "ඉංග්â€à¶»à·“සි (නියූ)", + "en_NZ": "ඉංග්â€à¶»à·“සි (නවසීලන්තය)", + "en_PG": "ඉංග්â€à¶»à·“සි (à¶´à·à¶´à·”ව෠නිව් ගිනියà·à·€)", + "en_PH": "ඉංග්â€à¶»à·“සි (පිලිපීනය)", + "en_PK": "ඉංග්â€à¶»à·“සි (à¶´à·à¶šà·’ස්තà·à¶±à¶º)", + "en_PN": "ඉංග්â€à¶»à·“සි (පිට්කෙය්න් දූපත්)", + "en_PR": "ඉංග්â€à¶»à·“සි (පුවර්ට෠රිකà·)", + "en_PW": "ඉංග්â€à¶»à·“සි (à¶´à¶½à·à·€à·”)", + "en_RW": "ඉංග්â€à¶»à·“සි (රුවන්ඩà·à·€)", + "en_SB": "ඉංග්â€à¶»à·“සි (සොලමන් දූපත්)", + "en_SC": "ඉංග්â€à¶»à·“සි (සීà·à·™à¶½à·Šà·ƒà·Š)", + "en_SD": "ඉංග්â€à¶»à·“සි (සූඩà·à¶±à¶º)", + "en_SE": "ඉංග්â€à¶»à·“සි (ස්වීඩනය)", + "en_SG": "ඉංග්â€à¶»à·“සි (සිංගප්පූරුව)", + "en_SH": "ඉංග්â€à¶»à·“සි (à·à·à¶±à·Šà¶­ හෙලේනà·)", + "en_SI": "ඉංග්â€à¶»à·“සි (ස්ලà·à·€à·šà¶±à·’යà·à·€)", + "en_SL": "ඉංග්â€à¶»à·“සි (සියරà·à¶½à·’යà·à¶±à·Š)", + "en_SS": "ඉංග්â€à¶»à·“සි (දකුණු සුඩà·à¶±à¶º)", + "en_SX": "ඉංග්â€à¶»à·“සි (à·à·à¶±à·Šà¶­ මà·à¶»à·Šà¶§à·™à¶±à·Š)", + "en_SZ": "ඉංග්â€à¶»à·“සි (ස්වà·à·ƒà·’ලන්තය)", + "en_TC": "ඉංග්â€à¶»à·“සි (ටර්ක්ස් සහ කයිකොස් දූපත්)", + "en_TK": "ඉංග්â€à¶»à·“සි (ටොකලà·à·€à·”)", + "en_TO": "ඉංග්â€à¶»à·“සි (ටොංගà·)", + "en_TT": "ඉංග්â€à¶»à·“සි (à¶§à·Šâ€à¶»à·’නිඩෑඩ් සහ ටොබà·à¶œà·)", + "en_TV": "ඉංග්â€à¶»à·“සි (ටුවà·à¶½à·–)", + "en_TZ": "ඉංග්â€à¶»à·“සි (à¶§à·à¶±à·Šà·ƒà·à¶±à·’යà·à·€)", + "en_UG": "ඉංග්â€à¶»à·“සි (උගන්ඩà·à·€)", + "en_UM": "ඉංග්â€à¶»à·“සි (එක්සත් ජනපද ඈත දූපත්)", + "en_US": "ඉංග්â€à¶»à·“සි (එක්සත් ජනපදය)", + "en_VC": "ඉංග්â€à¶»à·“සි (à·à·à¶±à·Šà¶­ වින්සන්ට් සහ ග්â€à¶»à·™à¶±à¶©à·’න්ස්)", + "en_VG": "ඉංග්â€à¶»à·“සි (à¶¶à·Šâ€à¶»à·’à¶­à·à¶±à·Šâ€à¶º වර්ජින් දූපත්)", + "en_VI": "ඉංග්â€à¶»à·“සි (ඇමරිකà·à¶±à·” වර්ජින් දූපත්)", + "en_VU": "ඉංග්â€à¶»à·“සි (වනුවà·à¶§à·”)", + "en_WS": "ඉංග්â€à¶»à·“සි (à·ƒà·à¶¸à·à·€à·)", + "en_ZA": "ඉංග්â€à¶»à·“සි (දකුණු à¶…à¶´à·Šâ€à¶»à·’à¶šà·à·€)", + "en_ZM": "ඉංග්â€à¶»à·“සි (à·ƒà·à¶¸à·Šà¶¶à·’යà·à·€)", + "en_ZW": "ඉංග්â€à¶»à·“සි (සිම්බà·à¶¶à·Šà·€à·š)", + "eo": "එස්පà·à¶»à¶±à·Šà¶§à·", + "es": "ස්පà·à¶¤à·Šà¶¤", + "es_AR": "ස්පà·à¶¤à·Šà¶¤ (ආර්ජෙන්ටිනà·à·€)", + "es_BO": "ස්පà·à¶¤à·Šà¶¤ (බොලීවියà·à·€)", + "es_BR": "ස්පà·à¶¤à·Šà¶¤ (à¶¶à·Šâ€à¶»à·ƒà·“ලය)", + "es_CL": "ස්පà·à¶¤à·Šà¶¤ (චිලී)", + "es_CO": "ස්පà·à¶¤à·Šà¶¤ (කොළොම්බියà·à·€)", + "es_CR": "ස්පà·à¶¤à·Šà¶¤ (කොස්ටරිකà·à·€)", + "es_CU": "ස්පà·à¶¤à·Šà¶¤ (කියුබà·à·€)", + "es_DO": "ස්පà·à¶¤à·Šà¶¤ (ඩොමිනික෠ජනරජය)", + "es_EA": "ස්පà·à¶¤à·Šà¶¤ (සෙයුට෠සහ මෙලිල්ලà·)", + "es_EC": "ස්පà·à¶¤à·Šà¶¤ (ඉක්වදà·à¶»à¶º)", + "es_ES": "ස්පà·à¶¤à·Šà¶¤ (ස්පà·à¶¤à·Šà¶¤à¶º)", + "es_GQ": "ස්පà·à¶¤à·Šà¶¤ (සමක ගිනියà·à·€)", + "es_GT": "ස්පà·à¶¤à·Šà¶¤ (à¶œà·à¶­à¶¸à·à¶½à·à·€)", + "es_HN": "ස්පà·à¶¤à·Šà¶¤ (හොන්ඩුරà·à·ƒà·Š)", + "es_IC": "ස්පà·à¶¤à·Šà¶¤ (à¶šà·à¶±à¶»à·’ සූපත්)", + "es_MX": "ස්පà·à¶¤à·Šà¶¤ (මෙක්සිකà·à·€)", + "es_NI": "ස්පà·à¶¤à·Šà¶¤ (නිකරගුවà·à·€)", + "es_PA": "ස්පà·à¶¤à·Šà¶¤ (à¶´à·à¶±à¶¸à·à·€)", + "es_PE": "ස්පà·à¶¤à·Šà¶¤ (පේරු)", + "es_PH": "ස්පà·à¶¤à·Šà¶¤ (පිලිපීනය)", + "es_PR": "ස්පà·à¶¤à·Šà¶¤ (පුවර්ට෠රිකà·)", + "es_PY": "ස්පà·à¶¤à·Šà¶¤ (à¶´à·à¶»à¶œà·”වේ)", + "es_SV": "ස්පà·à¶¤à·Šà¶¤ (එල් à·ƒà·à¶½à·Šà·€à¶¯à·à¶»à¶º)", + "es_US": "ස්පà·à¶¤à·Šà¶¤ (එක්සත් ජනපදය)", + "es_UY": "ස්පà·à¶¤à·Šà¶¤ (උරුගුවේ)", + "es_VE": "ස්පà·à¶¤à·Šà¶¤ (වෙනිසියුලà·à·€)", + "et": "එස්තà·à¶±à·’යà·à¶±à·”", + "et_EE": "එස්තà·à¶±à·’යà·à¶±à·” (එස්තà·à¶±à·’යà·à·€)", + "eu": "බොස්කà·", + "eu_ES": "බොස්ක෠(ස්පà·à¶¤à·Šà¶¤à¶º)", + "fa": "පර්සියà·à¶±à·”", + "fa_AF": "පර්සියà·à¶±à·” (ඇෆ්ගනිස්ථà·à¶±à¶º)", + "fa_IR": "පර්සියà·à¶±à·” (ඉරà·à¶±à¶º)", + "ff": "ෆුලà·à·„à·Š", + "ff_CM": "ෆුලà·à·„à·Š (à¶šà·à¶¸à¶»à·–න්)", + "ff_GN": "ෆුලà·à·„à·Š (ගිණියà·à·€)", + "ff_MR": "ෆුලà·à·„à·Š (මොරිටේනියà·à·€)", + "ff_SN": "ෆුලà·à·„à·Š (සෙනගà·à¶½à¶º)", + "fi": "ෆින්ලන්ත", + "fi_FI": "ෆින්ලන්ත (ෆින්ලන්තය)", + "fo": "à·†à·à¶»à·à·ƒà·Š", + "fo_DK": "à·†à·à¶»à·à·ƒà·Š (ඩෙන්මà·à¶»à·Šà¶šà¶º)", + "fo_FO": "à·†à·à¶»à·à·ƒà·Š (à·†à·à¶»à· දූපත්)", + "fr": "à¶´à·Šâ€à¶»à¶‚à·", + "fr_BE": "à¶´à·Šâ€à¶»à¶‚à· (බෙල්ජියම)", + "fr_BF": "à¶´à·Šâ€à¶»à¶‚à· (බර්කින෠ෆà·à·ƒà·)", + "fr_BI": "à¶´à·Šâ€à¶»à¶‚à· (බුරුන්දි)", + "fr_BJ": "à¶´à·Šâ€à¶»à¶‚à· (බෙනින්)", + "fr_BL": "à¶´à·Šâ€à¶»à¶‚à· (à·à·à¶±à·Šà¶­ බර්තලෙමි)", + "fr_CA": "à¶´à·Šâ€à¶»à¶‚à· (à¶šà·à¶±à¶©à·à·€)", + "fr_CD": "à¶´à·Šâ€à¶»à¶‚à· (කොංගො - කින්à·à·à·ƒà·)", + "fr_CF": "à¶´à·Šâ€à¶»à¶‚à· (මධ්â€à¶ºà¶¸ à¶…à¶´à·Šâ€à¶»à·’à¶šà·à¶±à·” ජනරජය)", + "fr_CG": "à¶´à·Šâ€à¶»à¶‚à· (කොංගො - à¶¶à·Šâ€à¶»à·ƒà·à·€à·’ල්)", + "fr_CH": "à¶´à·Šâ€à¶»à¶‚à· (ස්විස්ටර්ලන්තය)", + "fr_CI": "à¶´à·Šâ€à¶»à¶‚à· (à¶šà·à¶§à·Š දි අයිවරි)", + "fr_CM": "à¶´à·Šâ€à¶»à¶‚à· (à¶šà·à¶¸à¶»à·–න්)", + "fr_DJ": "à¶´à·Šâ€à¶»à¶‚à· (ජිබුටි)", + "fr_DZ": "à¶´à·Šâ€à¶»à¶‚à· (ඇල්ජීරියà·à·€)", + "fr_FR": "à¶´à·Šâ€à¶»à¶‚à· (à¶´à·Šâ€à¶»à¶‚à·à¶º)", + "fr_GA": "à¶´à·Šâ€à¶»à¶‚à· (à¶œà·à¶¶à·œà¶±à·Š)", + "fr_GF": "à¶´à·Šâ€à¶»à¶‚à· (à¶´à·Šâ€à¶»à¶‚෠ගයනà·à·€)", + "fr_GN": "à¶´à·Šâ€à¶»à¶‚à· (ගිණියà·à·€)", + "fr_GP": "à¶´à·Šâ€à¶»à¶‚à· (ග්වà·à¶©à¶½à·à¶´à·Š)", + "fr_GQ": "à¶´à·Šâ€à¶»à¶‚à· (සමක ගිනියà·à·€)", + "fr_HT": "à¶´à·Šâ€à¶»à¶‚à· (හයිටි)", + "fr_KM": "à¶´à·Šâ€à¶»à¶‚à· (කොමොරà·à·ƒà·Š)", + "fr_LU": "à¶´à·Šâ€à¶»à¶‚à· (ලක්à·à¶¸à·Šà¶¶à¶»à·Šà¶œà·Š)", + "fr_MA": "à¶´à·Šâ€à¶»à¶‚à· (මොරොක්කà·à·€)", + "fr_MC": "à¶´à·Šâ€à¶»à¶‚à· (මොනà·à¶šà·à·€)", + "fr_MF": "à¶´à·Šâ€à¶»à¶‚à· (à·à·à¶±à·Šà¶­ මà·à¶»à·Šà¶§à·’න්)", + "fr_MG": "à¶´à·Šâ€à¶»à¶‚à· (මà·à¶©à¶œà·ƒà·Šà¶šà¶»à¶º)", + "fr_ML": "à¶´à·Šâ€à¶»à¶‚à· (මà·à¶½à·’)", + "fr_MQ": "à¶´à·Šâ€à¶»à¶‚à· (මර්ටිනික්)", + "fr_MR": "à¶´à·Šâ€à¶»à¶‚à· (මොරිටේනියà·à·€)", + "fr_MU": "à¶´à·Šâ€à¶»à¶‚à· (මුරුසිය)", + "fr_NC": "à¶´à·Šâ€à¶»à¶‚à· (නව à¶šà·à¶½à·’à¶©à·à¶±à·’යà·à·€)", + "fr_NE": "à¶´à·Šâ€à¶»à¶‚à· (නයිජර්)", + "fr_PF": "à¶´à·Šâ€à¶»à¶‚à· (à¶´à·Šâ€à¶»à¶‚෠පොලිනීසියà·à·€)", + "fr_PM": "à¶´à·Šâ€à¶»à¶‚à· (à·à·à¶±à·Šà¶­ පියරේ සහ මà·à¶šà·à¶½à¶±à·Š)", + "fr_RE": "à¶´à·Šâ€à¶»à¶‚à· (රීයුනියන්)", + "fr_RW": "à¶´à·Šâ€à¶»à¶‚à· (රුවන්ඩà·à·€)", + "fr_SC": "à¶´à·Šâ€à¶»à¶‚à· (සීà·à·™à¶½à·Šà·ƒà·Š)", + "fr_SN": "à¶´à·Šâ€à¶»à¶‚à· (සෙනගà·à¶½à¶º)", + "fr_SY": "à¶´à·Šâ€à¶»à¶‚à· (සිරියà·à·€)", + "fr_TD": "à¶´à·Šâ€à¶»à¶‚à· (à¶ à·à¶ à·Š)", + "fr_TG": "à¶´à·Šâ€à¶»à¶‚à· (ටොගà·)", + "fr_TN": "à¶´à·Šâ€à¶»à¶‚à· (ටියුනීසියà·à·€)", + "fr_VU": "à¶´à·Šâ€à¶»à¶‚à· (වනුවà·à¶§à·”)", + "fr_WF": "à¶´à·Šâ€à¶»à¶‚à· (à·€à·à¶½à·’ස් සහ ෆුටුනà·)", + "fr_YT": "à¶´à·Šâ€à¶»à¶‚à· (මයà·à¶§à·Š)", + "fy": "à¶¶à¶§à·„à·’à¶» ෆ්â€à¶»à·’සියà·à¶±à·”", + "fy_NL": "à¶¶à¶§à·„à·’à¶» ෆ්â€à¶»à·’සියà·à¶±à·” (නෙදර්ලන්තය)", + "ga": "අයර්ලන්ත", + "ga_IE": "අයර්ලන්ත (අයර්ලන්තය)", + "gd": "ස්කොට්ටිà·à·Š ගෙලික්", + "gd_GB": "ස්කොට්ටිà·à·Š ගෙලික් (එක්සත් à¶»à·à¶¢à¶°à·à¶±à·’ය)", + "gl": "à¶œà·à¶½à·“සියà·à¶±à·”", + "gl_ES": "à¶œà·à¶½à·“සියà·à¶±à·” (ස්පà·à¶¤à·Šà¶¤à¶º)", + "gu": "ගුජරà·à¶§à·’", + "gu_IN": "ගුජරà·à¶§à·’ (ඉන්දියà·à·€)", + "gv": "මà·à¶±à·Šà¶šà·Šà·ƒà·Š", + "gv_IM": "මà·à¶±à·Šà¶šà·Šà·ƒà·Š (අයිල් ඔෆ් මෑන්)", + "ha": "à·„à·à·ƒà·", + "ha_GH": "à·„à·à·ƒà· (à¶à·à¶±à·à·€)", + "ha_NE": "à·„à·à·ƒà· (නයිජර්)", + "ha_NG": "à·„à·à·ƒà· (නයිජීරියà·à·€)", + "he": "à·„à·“à¶¶à·²", + "he_IL": "à·„à·“à¶¶à·² (à¶Šà·à·Šâ€à¶»à·à¶ºà¶½à¶º)", + "hi": "හින්දි", + "hi_IN": "හින්දි (ඉන්දියà·à·€)", + "hr": "à¶šà·Šâ€à¶»à·à¶ºà·šà·à·’යà·à¶±à·”", + "hr_BA": "à¶šà·Šâ€à¶»à·à¶ºà·šà·à·’යà·à¶±à·” (බොස්නියà·à·€ සහ හර්සගොවීනà·à·€)", + "hr_HR": "à¶šà·Šâ€à¶»à·à¶ºà·šà·à·’යà·à¶±à·” (à¶šà·Šâ€à¶»à·œà¶’ෂියà·à·€)", + "hu": "හන්ගේරියà·à¶±à·”", + "hu_HU": "හන්ගේරියà·à¶±à·” (හන්ගේරියà·à·€)", + "hy": "ආර්මේනියà·à¶±à·”", + "hy_AM": "ආර්මේනියà·à¶±à·” (ආර්මේනියà·à·€)", + "id": "ඉන්දුනීසියà·à¶±à·”", + "id_ID": "ඉන්දුනීසියà·à¶±à·” (ඉන්දුනීසියà·à·€)", + "ig": "ඉග්බà·", + "ig_NG": "ඉග්බ෠(නයිජීරියà·à·€)", + "ii": "සිචුආන් යී", + "ii_CN": "සිචුආන් යී (චීනය)", + "is": "අයිස්ලන්ත", + "is_IS": "අයිස්ලන්ත (අයිස්ලන්තය)", + "it": "ඉතà·à¶½à·’", + "it_CH": "ඉතà·à¶½à·’ (ස්විස්ටර්ලන්තය)", + "it_IT": "ඉතà·à¶½à·’ (ඉතà·à¶½à·’ය)", + "it_SM": "ඉතà·à¶½à·’ (à·ƒà·à¶±à·Š මà·à¶»à·’à¶±à·)", + "ja": "ජපන්", + "ja_JP": "ජපන් (ජපà·à¶±à¶º)", + "ka": "à¶¢à·à¶»à·Šà¶¢à·’යà·à¶±à·”", + "ka_GE": "à¶¢à·à¶»à·Šà¶¢à·’යà·à¶±à·” (à¶¢à·à¶»à·Šà¶¢à·’යà·à·€)", + "ki": "කිකුයු", + "ki_KE": "කිකුයු (කෙන්යà·à·€)", + "kk": "à¶šà·ƒà·à¶›à·Š", + "kk_KZ": "à¶šà·ƒà·à¶›à·Š (කසකස්තà·à¶±à¶º)", + "kl": "à¶šà¶½à·à¶½à·’සට්", + "kl_GL": "à¶šà¶½à·à¶½à·’සට් (ග්â€à¶»à·“න්ලන්තය)", + "km": "කමර්", + "km_KH": "කමර් (à¶šà·à¶¸à·Šà¶¶à·à¶¢à¶º)", + "kn": "à¶šà¶«à·Šà¶«à¶©", + "kn_IN": "à¶šà¶«à·Šà¶«à¶© (ඉන්දියà·à·€)", + "ko": "කොරියà·à¶±à·”", + "ko_KP": "කොරියà·à¶±à·” (උතුරු කොරියà·à·€)", + "ko_KR": "කොරියà·à¶±à·” (දකුණු කොරියà·à·€)", + "ks": "à¶šà·à·‚්මීර්", + "ks_IN": "à¶šà·à·‚්මීර් (ඉන්දියà·à·€)", + "kw": "à¶šà·à¶±à·“සියà·à¶±à·”", + "kw_GB": "à¶šà·à¶±à·“සියà·à¶±à·” (එක්සත් à¶»à·à¶¢à¶°à·à¶±à·’ය)", + "ky": "කිර්ගිස්", + "ky_KG": "කිර්ගිස් (කිර්ගිස්තà·à¶±à¶º)", + "lb": "ලක්සà·à¶¸à·Šà¶¶à¶»à·Šà¶œà·Š", + "lb_LU": "ලක්සà·à¶¸à·Šà¶¶à¶»à·Šà¶œà·Š (ලක්à·à¶¸à·Šà¶¶à¶»à·Šà¶œà·Š)", + "lg": "ගන්ඩà·", + "lg_UG": "ගන්ඩ෠(උගන්ඩà·à·€)", + "ln": "ලින්ගලà·", + "ln_AO": "ලින්ගල෠(ඇන්ගà·à¶½à·à·€)", + "ln_CD": "ලින්ගල෠(කොංගො - කින්à·à·à·ƒà·)", + "ln_CF": "ලින්ගල෠(මධ්â€à¶ºà¶¸ à¶…à¶´à·Šâ€à¶»à·’à¶šà·à¶±à·” ජනරජය)", + "ln_CG": "ලින්ගල෠(කොංගො - à¶¶à·Šâ€à¶»à·ƒà·à·€à·’ල්)", + "lo": "à¶½à·à¶•", + "lo_LA": "à¶½à·à¶• (à¶½à·à¶•සය)", + "lt": "ලිතුවේනියà·à¶±à·”", + "lt_LT": "ලිතුවේනියà·à¶±à·” (ලිතුවේනියà·à·€)", + "lu": "ලු", + "lu_CD": "ලු (කොංගො - කින්à·à·à·ƒà·)", + "lv": "à¶½à·à¶§à·Šà·€à·’යà·à¶±à·”", + "lv_LV": "à¶½à·à¶§à·Šà·€à·’යà·à¶±à·” (à¶½à·à¶§à·Šà·€à·’යà·à·€)", + "mg": "මලගà·à·ƒà·’", + "mg_MG": "මලගà·à·ƒà·’ (මà·à¶©à¶œà·ƒà·Šà¶šà¶»à¶º)", + "mk": "මà·à·ƒà·’à¶©à·à¶±à·’යà·à¶±à·”", + "mk_MK": "මà·à·ƒà·’à¶©à·à¶±à·’යà·à¶±à·” (මà·à·ƒà·’à¶©à·à¶±à·’යà·à·€)", + "ml": "මලයà·à¶½à¶¸à·Š", + "ml_IN": "මලයà·à¶½à¶¸à·Š (ඉන්දියà·à·€)", + "mn": "මොංගà·à¶½à·’යà·à¶±à·”", + "mn_MN": "මොංගà·à¶½à·’යà·à¶±à·” (මොන්ගà·à¶½à·’යà·à·€)", + "mr": "මරà·à¶­à·’", + "mr_IN": "මරà·à¶­à·’ (ඉන්දියà·à·€)", + "ms": "මà·à¶½à·š", + "ms_BN": "මà·à¶½à·š (බෲනà·à¶ºà·’)", + "ms_MY": "මà·à¶½à·š (මà·à¶½à·šà·ƒà·’යà·à·€)", + "ms_SG": "මà·à¶½à·š (සිංගප්පූරුව)", + "mt": "මොල්ටිස්", + "mt_MT": "මොල්ටිස් (මà·à¶½à·Šà¶§à·à·€)", + "my": "බුරුම", + "my_MM": "බුරුම (මියන්මà·à¶»à¶º (බුරුමය))", + "nb": "à¶±à·à·€à·šà¶¢à·’යà·à¶±à·” බොක්මà·à¶½à·Š", + "nb_NO": "à¶±à·à·€à·šà¶¢à·’යà·à¶±à·” බොක්මà·à¶½à·Š (à¶±à·à¶»à·Šà·€à·š)", + "nb_SJ": "à¶±à·à·€à·šà¶¢à·’යà·à¶±à·” බොක්මà·à¶½à·Š (ස්වෙල්බර්ඩ් සහ ජේන් මයේන්)", + "nd": "උතුරු එන්ඩිබෙලෙ", + "nd_ZW": "උතුරු එන්ඩිබෙලෙ (සිම්බà·à¶¶à·Šà·€à·š)", + "ne": "නේපà·à¶½", + "ne_IN": "නේපà·à¶½ (ඉන්දියà·à·€)", + "ne_NP": "නේපà·à¶½ (නේපà·à¶½à¶º)", + "nl": "ලන්දේසි", + "nl_AW": "ලන්දේසි (අරුබà·à·€)", + "nl_BE": "ලන්දේසි (බෙල්ජියම)", + "nl_BQ": "ලන්දේසි (à¶šà·à¶»à·’බියà·à¶±à·” නෙදර්ලන්තය)", + "nl_CW": "ලන්දේසි (කුරකà·à·€à·)", + "nl_NL": "ලන්දේසි (නෙදර්ලන්තය)", + "nl_SR": "ලන්දේසි (සුරිනà·à¶¸à¶º)", + "nl_SX": "ලන්දේසි (à·à·à¶±à·Šà¶­ මà·à¶»à·Šà¶§à·™à¶±à·Š)", + "nn": "නොවේර්ජියà·à¶±à·” නයිනà·à¶»à·Šà·ƒà·Šà¶šà·Š", + "nn_NO": "නොවේර්ජියà·à¶±à·” නයිනà·à¶»à·Šà·ƒà·Šà¶šà·Š (à¶±à·à¶»à·Šà·€à·š)", + "om": "ඔරොමà·", + "om_ET": "ඔරොම෠(ඉතියà·à¶´à·’යà·à·€)", + "om_KE": "ඔරොම෠(කෙන්යà·à·€)", + "or": "ඔරියà·", + "or_IN": "ඔරිය෠(ඉන්දියà·à·€)", + "os": "ඔසිටෙක්", + "os_GE": "ඔසිටෙක් (à¶¢à·à¶»à·Šà¶¢à·’යà·à·€)", + "os_RU": "ඔසිටෙක් (රුසියà·à·€)", + "pa": "පන්ජà·à¶¶à·’", + "pa_Arab": "පන්ජà·à¶¶à·’ (à¶…à¶»à·à¶¶à·’)", + "pa_Arab_PK": "පන්ජà·à¶¶à·’ (à¶…à¶»à·à¶¶à·’, à¶´à·à¶šà·’ස්තà·à¶±à¶º)", + "pa_Guru": "පන්ජà·à¶¶à·’ (ගුර්මුඛි)", + "pa_Guru_IN": "පන්ජà·à¶¶à·’ (ගුර්මුඛි, ඉන්දියà·à·€)", + "pa_IN": "පන්ජà·à¶¶à·’ (ඉන්දියà·à·€)", + "pa_PK": "පන්ජà·à¶¶à·’ (à¶´à·à¶šà·’ස්තà·à¶±à¶º)", + "pl": "à¶´à·à¶½à¶±à·Šà¶­", + "pl_PL": "à¶´à·à¶½à¶±à·Šà¶­ (à¶´à·à¶½à¶±à·Šà¶­à¶º)", + "ps": "à¶´à·‚à·Šà¶§à·œ", + "ps_AF": "à¶´à·‚à·Šà¶§à·œ (ඇෆ්ගනිස්ථà·à¶±à¶º)", + "pt": "පෘතුගීසි", + "pt_AO": "පෘතුගීසි (ඇන්ගà·à¶½à·à·€)", + "pt_BR": "පෘතුගීසි (à¶¶à·Šâ€à¶»à·ƒà·“ලය)", + "pt_CH": "පෘතුගීසි (ස්විස්ටර්ලන්තය)", + "pt_CV": "පෘතුගීසි (à¶šà·šà¶´à·Š වර්ඩ්)", + "pt_GQ": "පෘතුගීසි (සමක ගිනියà·à·€)", + "pt_GW": "පෘතුගීසි (ගිනි බිසව්)", + "pt_LU": "පෘතුගීසි (ලක්à·à¶¸à·Šà¶¶à¶»à·Šà¶œà·Š)", + "pt_MO": "පෘතුගීසි (මකà·à·€à·” à¶ à·“à¶± විà·à·šà·‚ පරිපà·à¶½à¶± à¶šà¶½à·à¶´à¶º)", + "pt_MZ": "පෘතුගීසි (මොසà·à¶¸à·Šà¶¶à·’à¶šà·Š)", + "pt_PT": "පෘතුගීසි (පෘතුගà·à¶½à¶º)", + "pt_ST": "පෘතුගීසි (à·ƒà·à¶• à¶­à·à¶¸à·Š සහ à¶´à·Šâ€à¶»à·’න්සිප්)", + "pt_TL": "පෘතුගීසි (ටිමà·à¶»à·Š - ලෙස්ත්)", + "qu": "ක්වීචුවà·", + "qu_BO": "ක්වීචුව෠(බොලීවියà·à·€)", + "qu_EC": "ක්වීචුව෠(ඉක්වදà·à¶»à¶º)", + "qu_PE": "ක්වීචුව෠(පේරු)", + "rm": "රොමෑන්à·à·Š", + "rm_CH": "රොමෑන්à·à·Š (ස්විස්ටර්ලන්තය)", + "rn": "රුන්ඩි", + "rn_BI": "රුන්ඩි (බුරුන්දි)", + "ro": "රොමේනියà·à¶±à·”", + "ro_MD": "රොමේනියà·à¶±à·” (මොල්ඩà·à·€à·à·€)", + "ro_RO": "රොමේනියà·à¶±à·” (රුමේනියà·à·€)", + "ru": "රුසියà·à¶±à·”", + "ru_BY": "රුසියà·à¶±à·” (බෙලරුස්)", + "ru_KG": "රුසියà·à¶±à·” (කිර්ගිස්තà·à¶±à¶º)", + "ru_KZ": "රුසියà·à¶±à·” (කසකස්තà·à¶±à¶º)", + "ru_MD": "රුසියà·à¶±à·” (මොල්ඩà·à·€à·à·€)", + "ru_RU": "රුසියà·à¶±à·” (රුසියà·à·€)", + "ru_UA": "රුසියà·à¶±à·” (යුක්රේනය)", + "rw": "කින්යර්වන්ඩà·", + "rw_RW": "කින්යර්වන්ඩ෠(රුවන්ඩà·à·€)", + "se": "උතුරු à·ƒà·à¶¸à·’", + "se_FI": "උතුරු à·ƒà·à¶¸à·’ (ෆින්ලන්තය)", + "se_NO": "උතුරු à·ƒà·à¶¸à·’ (à¶±à·à¶»à·Šà·€à·š)", + "se_SE": "උතුරු à·ƒà·à¶¸à·’ (ස්වීඩනය)", + "sg": "සන්ග්â€à¶»à·", + "sg_CF": "සන්ග්â€à¶»à· (මධ්â€à¶ºà¶¸ à¶…à¶´à·Šâ€à¶»à·’à¶šà·à¶±à·” ජනරජය)", + "si": "සිංහල", + "si_LK": "සිංහල (à·à·Šâ€à¶»à·“ ලංකà·à·€)", + "sk": "ස්ලà·à·€à·à¶šà·Š", + "sk_SK": "ස්ලà·à·€à·à¶šà·Š (ස්ලà·à·€à·à¶šà·’යà·à·€)", + "sl": "ස්ලà·à·€à·šà¶±à·’යà·à¶±à·”", + "sl_SI": "ස්ලà·à·€à·šà¶±à·’යà·à¶±à·” (ස්ලà·à·€à·šà¶±à·’යà·à·€)", + "sn": "à·à·à¶±à·", + "sn_ZW": "à·à·à¶±à· (සිම්බà·à¶¶à·Šà·€à·š)", + "so": "à·ƒà·à¶¸à·à¶½à·’", + "so_DJ": "à·ƒà·à¶¸à·à¶½à·’ (ජිබුටි)", + "so_ET": "à·ƒà·à¶¸à·à¶½à·’ (ඉතියà·à¶´à·’යà·à·€)", + "so_KE": "à·ƒà·à¶¸à·à¶½à·’ (කෙන්යà·à·€)", + "so_SO": "à·ƒà·à¶¸à·à¶½à·’ (à·ƒà·à¶¸à·à¶½à·’යà·à·€)", + "sq": "ඇල්බේනියà·à¶±à·”", + "sq_AL": "ඇල්බේනියà·à¶±à·” (ඇල්බේනියà·à·€)", + "sq_MK": "ඇල්බේනියà·à¶±à·” (මà·à·ƒà·’à¶©à·à¶±à·’යà·à·€)", + "sq_XK": "ඇල්බේනියà·à¶±à·” (කොසà·à·€à·)", + "sr": "සර්බියà·à¶±à·”", + "sr_BA": "සර්බියà·à¶±à·” (බොස්නියà·à·€ සහ හර්සගොවීනà·à·€)", + "sr_Cyrl": "සර්බියà·à¶±à·” (සිරිලික්)", + "sr_Cyrl_BA": "සර්බියà·à¶±à·” (සිරිලික්, බොස්නියà·à·€ සහ හර්සගොවීනà·à·€)", + "sr_Cyrl_ME": "සර්බියà·à¶±à·” (සිරිලික්, මොන්ටෙනීග්â€à¶»à·)", + "sr_Cyrl_RS": "සර්බියà·à¶±à·” (සිරිලික්, සර්බියà·à·€)", + "sr_Cyrl_XK": "සර්බියà·à¶±à·” (සිරිලික්, කොසà·à·€à·)", + "sr_Latn": "සර්බියà·à¶±à·” (ලතින්)", + "sr_Latn_BA": "සර්බියà·à¶±à·” (ලතින්, බොස්නියà·à·€ සහ හර්සගොවීනà·à·€)", + "sr_Latn_ME": "සර්බියà·à¶±à·” (ලතින්, මොන්ටෙනීග්â€à¶»à·)", + "sr_Latn_RS": "සර්බියà·à¶±à·” (ලතින්, සර්බියà·à·€)", + "sr_Latn_XK": "සර්බියà·à¶±à·” (ලතින්, කොසà·à·€à·)", + "sr_ME": "සර්බියà·à¶±à·” (මොන්ටෙනීග්â€à¶»à·)", + "sr_RS": "සර්බියà·à¶±à·” (සර්බියà·à·€)", + "sr_XK": "සර්බියà·à¶±à·” (කොසà·à·€à·)", + "sv": "ස්වීඩන්", + "sv_AX": "ස්වීඩන් (ඕලන්ඩ් දූපත්)", + "sv_FI": "ස්වීඩන් (ෆින්ලන්තය)", + "sv_SE": "ස්වීඩන් (ස්වීඩනය)", + "sw": "ස්වà·à·„ිලි", + "sw_CD": "ස්වà·à·„ිලි (කොංගො - කින්à·à·à·ƒà·)", + "sw_KE": "ස්වà·à·„ිලි (කෙන්යà·à·€)", + "sw_TZ": "ස්වà·à·„ිලි (à¶§à·à¶±à·Šà·ƒà·à¶±à·’යà·à·€)", + "sw_UG": "ස්වà·à·„ිලි (උගන්ඩà·à·€)", + "ta": "දෙමළ", + "ta_IN": "දෙමළ (ඉන්දියà·à·€)", + "ta_LK": "දෙමළ (à·à·Šâ€à¶»à·“ ලංකà·à·€)", + "ta_MY": "දෙමළ (මà·à¶½à·šà·ƒà·’යà·à·€)", + "ta_SG": "දෙමළ (සිංගප්පූරුව)", + "te": "තෙළිඟු", + "te_IN": "තෙළිඟු (ඉන්දියà·à·€)", + "th": "à¶­à·à¶ºà·’", + "th_TH": "à¶­à·à¶ºà·’ (à¶­à·à¶ºà·’ලන්තය)", + "ti": "ටිග්â€à¶»à·’න්යà·", + "ti_ER": "ටිග්â€à¶»à·’න්ය෠(එරිත්â€à¶»à·’යà·à·€)", + "ti_ET": "ටිග්â€à¶»à·’න්ය෠(ඉතියà·à¶´à·’යà·à·€)", + "to": "ටොංගà·", + "to_TO": "ටොංග෠(ටොංගà·)", + "tr": "තුර්කි", + "tr_CY": "තුර්කි (සයිප්â€à¶»à·ƒà¶º)", + "tr_TR": "තුර්කි (තුර්කිය)", + "ug": "උයිගර්", + "ug_CN": "උයිගර් (චීනය)", + "uk": "යුක්රේනියà·à¶±à·”", + "uk_UA": "යුක්රේනියà·à¶±à·” (යුක්රේනය)", + "ur": "උර්දු", + "ur_IN": "උර්දු (ඉන්දියà·à·€)", + "ur_PK": "උර්දු (à¶´à·à¶šà·’ස්තà·à¶±à¶º)", + "uz": "උස්බෙක්", + "uz_AF": "උස්බෙක් (ඇෆ්ගනිස්ථà·à¶±à¶º)", + "uz_Arab": "උස්බෙක් (à¶…à¶»à·à¶¶à·’)", + "uz_Arab_AF": "උස්බෙක් (à¶…à¶»à·à¶¶à·’, ඇෆ්ගනිස්ථà·à¶±à¶º)", + "uz_Cyrl": "උස්බෙක් (සිරිලික්)", + "uz_Cyrl_UZ": "උස්බෙක් (සිරිලික්, උස්බෙකිස්ථà·à¶±à¶º)", + "uz_Latn": "උස්බෙක් (ලතින්)", + "uz_Latn_UZ": "උස්බෙක් (ලතින්, උස්බෙකිස්ථà·à¶±à¶º)", + "uz_UZ": "උස්බෙක් (උස්බෙකිස්ථà·à¶±à¶º)", + "vi": "වියට්නà·à¶¸à·Š", + "vi_VN": "වියට්නà·à¶¸à·Š (වියට්නà·à¶¸à¶º)", + "yi": "යිඩිà·à·Š", + "yo": "යොරූබà·", + "yo_BJ": "යොරූබ෠(බෙනින්)", + "yo_NG": "යොරූබ෠(නයිජීරියà·à·€)", + "zh": "à¶ à·“à¶±", + "zh_CN": "à¶ à·“à¶± (චීනය)", + "zh_HK": "à¶ à·“à¶± (හොංකොං à¶ à·“à¶± විà·à·šà·‚ පරිපà·à¶½à¶± à¶šà¶½à·à¶´à¶º)", + "zh_Hans": "à¶ à·“à¶± (සුළුකළ)", + "zh_Hans_CN": "à¶ à·“à¶± (සුළුකළ, චීනය)", + "zh_Hans_HK": "à¶ à·“à¶± (සුළුකළ, හොංකොං à¶ à·“à¶± විà·à·šà·‚ පරිපà·à¶½à¶± à¶šà¶½à·à¶´à¶º)", + "zh_Hans_MO": "à¶ à·“à¶± (සුළුකළ, මකà·à·€à·” à¶ à·“à¶± විà·à·šà·‚ පරිපà·à¶½à¶± à¶šà¶½à·à¶´à¶º)", + "zh_Hans_SG": "à¶ à·“à¶± (සුළුකළ, සිංගප්පූරුව)", + "zh_Hant": "à¶ à·“à¶± (à·ƒà·à¶¸à·Šà¶´à·Šâ€à¶»à¶¯à·à¶ºà·’à¶š)", + "zh_Hant_HK": "à¶ à·“à¶± (à·ƒà·à¶¸à·Šà¶´à·Šâ€à¶»à¶¯à·à¶ºà·’à¶š, හොංකොං à¶ à·“à¶± විà·à·šà·‚ පරිපà·à¶½à¶± à¶šà¶½à·à¶´à¶º)", + "zh_Hant_MO": "à¶ à·“à¶± (à·ƒà·à¶¸à·Šà¶´à·Šâ€à¶»à¶¯à·à¶ºà·’à¶š, මකà·à·€à·” à¶ à·“à¶± විà·à·šà·‚ පරිපà·à¶½à¶± à¶šà¶½à·à¶´à¶º)", + "zh_Hant_TW": "à¶ à·“à¶± (à·ƒà·à¶¸à·Šà¶´à·Šâ€à¶»à¶¯à·à¶ºà·’à¶š, à¶­à·à¶ºà·’à·€à·à¶±à¶º)", + "zh_MO": "à¶ à·“à¶± (මකà·à·€à·” à¶ à·“à¶± විà·à·šà·‚ පරිපà·à¶½à¶± à¶šà¶½à·à¶´à¶º)", + "zh_SG": "à¶ à·“à¶± (සිංගප්පූරුව)", + "zh_TW": "à¶ à·“à¶± (à¶­à·à¶ºà·’à·€à·à¶±à¶º)", + "zu": "සුලු", + "zu_ZA": "සුලු (දකුණු à¶…à¶´à·Šâ€à¶»à·’à¶šà·à·€)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sk.json new file mode 100644 index 0000000000000000000000000000000000000000..75af02d31792cf6885a35ad60e09ae6699281920 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sk.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikánÄina", + "af_NA": "afrikánÄina (Namíbia)", + "af_ZA": "afrikánÄina (Južná Afrika)", + "ak": "akanÄina", + "ak_GH": "akanÄina (Ghana)", + "am": "amharÄina", + "am_ET": "amharÄina (Etiópia)", + "ar": "arabÄina", + "ar_AE": "arabÄina (Spojené arabské emiráty)", + "ar_BH": "arabÄina (Bahrajn)", + "ar_DJ": "arabÄina (Džibutsko)", + "ar_DZ": "arabÄina (Alžírsko)", + "ar_EG": "arabÄina (Egypt)", + "ar_EH": "arabÄina (Západná Sahara)", + "ar_ER": "arabÄina (Eritrea)", + "ar_IL": "arabÄina (Izrael)", + "ar_IQ": "arabÄina (Irak)", + "ar_JO": "arabÄina (Jordánsko)", + "ar_KM": "arabÄina (Komory)", + "ar_KW": "arabÄina (Kuvajt)", + "ar_LB": "arabÄina (Libanon)", + "ar_LY": "arabÄina (Líbya)", + "ar_MA": "arabÄina (Maroko)", + "ar_MR": "arabÄina (Mauritánia)", + "ar_OM": "arabÄina (Omán)", + "ar_PS": "arabÄina (Palestínske územia)", + "ar_QA": "arabÄina (Katar)", + "ar_SA": "arabÄina (Saudská Arábia)", + "ar_SD": "arabÄina (Sudán)", + "ar_SO": "arabÄina (Somálsko)", + "ar_SS": "arabÄina (Južný Sudán)", + "ar_SY": "arabÄina (Sýria)", + "ar_TD": "arabÄina (ÄŒad)", + "ar_TN": "arabÄina (Tunisko)", + "ar_YE": "arabÄina (Jemen)", + "as": "ásamÄina", + "as_IN": "ásamÄina (India)", + "az": "azerbajdžanÄina", + "az_AZ": "azerbajdžanÄina (Azerbajdžan)", + "az_Cyrl": "azerbajdžanÄina (cyrilika)", + "az_Cyrl_AZ": "azerbajdžanÄina (cyrilika, Azerbajdžan)", + "az_Latn": "azerbajdžanÄina (latinka)", + "az_Latn_AZ": "azerbajdžanÄina (latinka, Azerbajdžan)", + "be": "bieloruÅ¡tina", + "be_BY": "bieloruÅ¡tina (Bielorusko)", + "bg": "bulharÄina", + "bg_BG": "bulharÄina (Bulharsko)", + "bm": "bambarÄina", + "bm_ML": "bambarÄina (Mali)", + "bn": "bengálÄina", + "bn_BD": "bengálÄina (Bangladéš)", + "bn_IN": "bengálÄina (India)", + "bo": "tibetÄina", + "bo_CN": "tibetÄina (Čína)", + "bo_IN": "tibetÄina (India)", + "br": "bretónÄina", + "br_FR": "bretónÄina (Francúzsko)", + "bs": "bosniaÄtina", + "bs_BA": "bosniaÄtina (Bosna a Hercegovina)", + "bs_Cyrl": "bosniaÄtina (cyrilika)", + "bs_Cyrl_BA": "bosniaÄtina (cyrilika, Bosna a Hercegovina)", + "bs_Latn": "bosniaÄtina (latinka)", + "bs_Latn_BA": "bosniaÄtina (latinka, Bosna a Hercegovina)", + "ca": "katalánÄina", + "ca_AD": "katalánÄina (Andorra)", + "ca_ES": "katalánÄina (Å panielsko)", + "ca_FR": "katalánÄina (Francúzsko)", + "ca_IT": "katalánÄina (Taliansko)", + "ce": "ÄeÄenÄina", + "ce_RU": "ÄeÄenÄina (Rusko)", + "cs": "ÄeÅ¡tina", + "cs_CZ": "ÄeÅ¡tina (ÄŒeská republika)", + "cy": "waleÅ¡tina", + "cy_GB": "waleÅ¡tina (Spojené kráľovstvo)", + "da": "dánÄina", + "da_DK": "dánÄina (Dánsko)", + "da_GL": "dánÄina (Grónsko)", + "de": "nemÄina", + "de_AT": "nemÄina (Rakúsko)", + "de_BE": "nemÄina (Belgicko)", + "de_CH": "nemÄina (Å vajÄiarsko)", + "de_DE": "nemÄina (Nemecko)", + "de_IT": "nemÄina (Taliansko)", + "de_LI": "nemÄina (LichtenÅ¡tajnsko)", + "de_LU": "nemÄina (Luxembursko)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhután)", + "ee": "eweÅ¡tina", + "ee_GH": "eweÅ¡tina (Ghana)", + "ee_TG": "eweÅ¡tina (Togo)", + "el": "gréÄtina", + "el_CY": "gréÄtina (Cyprus)", + "el_GR": "gréÄtina (Grécko)", + "en": "angliÄtina", + "en_AG": "angliÄtina (Antigua a Barbuda)", + "en_AI": "angliÄtina (Anguilla)", + "en_AS": "angliÄtina (Americká Samoa)", + "en_AT": "angliÄtina (Rakúsko)", + "en_AU": "angliÄtina (Austrália)", + "en_BB": "angliÄtina (Barbados)", + "en_BE": "angliÄtina (Belgicko)", + "en_BI": "angliÄtina (Burundi)", + "en_BM": "angliÄtina (Bermudy)", + "en_BS": "angliÄtina (Bahamy)", + "en_BW": "angliÄtina (Botswana)", + "en_BZ": "angliÄtina (Belize)", + "en_CA": "angliÄtina (Kanada)", + "en_CC": "angliÄtina (Kokosové ostrovy)", + "en_CH": "angliÄtina (Å vajÄiarsko)", + "en_CK": "angliÄtina (Cookove ostrovy)", + "en_CM": "angliÄtina (Kamerun)", + "en_CX": "angliÄtina (VianoÄný ostrov)", + "en_CY": "angliÄtina (Cyprus)", + "en_DE": "angliÄtina (Nemecko)", + "en_DG": "angliÄtina (Diego Garcia)", + "en_DK": "angliÄtina (Dánsko)", + "en_DM": "angliÄtina (Dominika)", + "en_ER": "angliÄtina (Eritrea)", + "en_FI": "angliÄtina (Fínsko)", + "en_FJ": "angliÄtina (Fidži)", + "en_FK": "angliÄtina (Falklandy)", + "en_FM": "angliÄtina (Mikronézia)", + "en_GB": "angliÄtina (Spojené kráľovstvo)", + "en_GD": "angliÄtina (Grenada)", + "en_GG": "angliÄtina (Guernsey)", + "en_GH": "angliÄtina (Ghana)", + "en_GI": "angliÄtina (Gibraltár)", + "en_GM": "angliÄtina (Gambia)", + "en_GU": "angliÄtina (Guam)", + "en_GY": "angliÄtina (Guayana)", + "en_HK": "angliÄtina (Hongkong – OAO Číny)", + "en_IE": "angliÄtina (Ãrsko)", + "en_IL": "angliÄtina (Izrael)", + "en_IM": "angliÄtina (Ostrov Man)", + "en_IN": "angliÄtina (India)", + "en_IO": "angliÄtina (Britské indickooceánske územie)", + "en_JE": "angliÄtina (Jersey)", + "en_JM": "angliÄtina (Jamajka)", + "en_KE": "angliÄtina (Keňa)", + "en_KI": "angliÄtina (Kiribati)", + "en_KN": "angliÄtina (Svätý KriÅ¡tof a Nevis)", + "en_KY": "angliÄtina (Kajmanie ostrovy)", + "en_LC": "angliÄtina (Svätá Lucia)", + "en_LR": "angliÄtina (Libéria)", + "en_LS": "angliÄtina (Lesotho)", + "en_MG": "angliÄtina (Madagaskar)", + "en_MH": "angliÄtina (Marshallove ostrovy)", + "en_MO": "angliÄtina (Macao – OAO Číny)", + "en_MP": "angliÄtina (Severné Mariány)", + "en_MS": "angliÄtina (Montserrat)", + "en_MT": "angliÄtina (Malta)", + "en_MU": "angliÄtina (Maurícius)", + "en_MW": "angliÄtina (Malawi)", + "en_MY": "angliÄtina (Malajzia)", + "en_NA": "angliÄtina (Namíbia)", + "en_NF": "angliÄtina (Norfolk)", + "en_NG": "angliÄtina (Nigéria)", + "en_NL": "angliÄtina (Holandsko)", + "en_NR": "angliÄtina (Nauru)", + "en_NU": "angliÄtina (Niue)", + "en_NZ": "angliÄtina (Nový Zéland)", + "en_PG": "angliÄtina (Papua Nová Guinea)", + "en_PH": "angliÄtina (Filipíny)", + "en_PK": "angliÄtina (Pakistan)", + "en_PN": "angliÄtina (Pitcairnove ostrovy)", + "en_PR": "angliÄtina (Portoriko)", + "en_PW": "angliÄtina (Palau)", + "en_RW": "angliÄtina (Rwanda)", + "en_SB": "angliÄtina (Å alamúnove ostrovy)", + "en_SC": "angliÄtina (Seychely)", + "en_SD": "angliÄtina (Sudán)", + "en_SE": "angliÄtina (Å védsko)", + "en_SG": "angliÄtina (Singapur)", + "en_SH": "angliÄtina (Svätá Helena)", + "en_SI": "angliÄtina (Slovinsko)", + "en_SL": "angliÄtina (Sierra Leone)", + "en_SS": "angliÄtina (Južný Sudán)", + "en_SX": "angliÄtina (Svätý Martin (hol.))", + "en_SZ": "angliÄtina (Svazijsko)", + "en_TC": "angliÄtina (Turks a Caicos)", + "en_TK": "angliÄtina (Tokelau)", + "en_TO": "angliÄtina (Tonga)", + "en_TT": "angliÄtina (Trinidad a Tobago)", + "en_TV": "angliÄtina (Tuvalu)", + "en_TZ": "angliÄtina (Tanzánia)", + "en_UG": "angliÄtina (Uganda)", + "en_UM": "angliÄtina (MenÅ¡ie odľahlé ostrovy USA)", + "en_US": "angliÄtina (Spojené Å¡táty)", + "en_VC": "angliÄtina (Svätý Vincent a Grenadíny)", + "en_VG": "angliÄtina (Britské Panenské ostrovy)", + "en_VI": "angliÄtina (Americké Panenské ostrovy)", + "en_VU": "angliÄtina (Vanuatu)", + "en_WS": "angliÄtina (Samoa)", + "en_ZA": "angliÄtina (Južná Afrika)", + "en_ZM": "angliÄtina (Zambia)", + "en_ZW": "angliÄtina (Zimbabwe)", + "eo": "esperanto", + "es": "Å¡panielÄina", + "es_AR": "Å¡panielÄina (Argentína)", + "es_BO": "Å¡panielÄina (Bolívia)", + "es_BR": "Å¡panielÄina (Brazília)", + "es_CL": "Å¡panielÄina (ÄŒile)", + "es_CO": "Å¡panielÄina (Kolumbia)", + "es_CR": "Å¡panielÄina (Kostarika)", + "es_CU": "Å¡panielÄina (Kuba)", + "es_DO": "Å¡panielÄina (Dominikánska republika)", + "es_EA": "Å¡panielÄina (Ceuta a Melilla)", + "es_EC": "Å¡panielÄina (Ekvádor)", + "es_ES": "Å¡panielÄina (Å panielsko)", + "es_GQ": "Å¡panielÄina (Rovníková Guinea)", + "es_GT": "Å¡panielÄina (Guatemala)", + "es_HN": "Å¡panielÄina (Honduras)", + "es_IC": "Å¡panielÄina (Kanárske ostrovy)", + "es_MX": "Å¡panielÄina (Mexiko)", + "es_NI": "Å¡panielÄina (Nikaragua)", + "es_PA": "Å¡panielÄina (Panama)", + "es_PE": "Å¡panielÄina (Peru)", + "es_PH": "Å¡panielÄina (Filipíny)", + "es_PR": "Å¡panielÄina (Portoriko)", + "es_PY": "Å¡panielÄina (Paraguaj)", + "es_SV": "Å¡panielÄina (Salvádor)", + "es_US": "Å¡panielÄina (Spojené Å¡táty)", + "es_UY": "Å¡panielÄina (Uruguaj)", + "es_VE": "Å¡panielÄina (Venezuela)", + "et": "estónÄina", + "et_EE": "estónÄina (Estónsko)", + "eu": "baskiÄtina", + "eu_ES": "baskiÄtina (Å panielsko)", + "fa": "perzÅ¡tina", + "fa_AF": "perzÅ¡tina (Afganistan)", + "fa_IR": "perzÅ¡tina (Irán)", + "ff": "fulbÄina", + "ff_CM": "fulbÄina (Kamerun)", + "ff_GN": "fulbÄina (Guinea)", + "ff_MR": "fulbÄina (Mauritánia)", + "ff_SN": "fulbÄina (Senegal)", + "fi": "fínÄina", + "fi_FI": "fínÄina (Fínsko)", + "fo": "faerÄina", + "fo_DK": "faerÄina (Dánsko)", + "fo_FO": "faerÄina (Faerské ostrovy)", + "fr": "francúzÅ¡tina", + "fr_BE": "francúzÅ¡tina (Belgicko)", + "fr_BF": "francúzÅ¡tina (Burkina Faso)", + "fr_BI": "francúzÅ¡tina (Burundi)", + "fr_BJ": "francúzÅ¡tina (Benin)", + "fr_BL": "francúzÅ¡tina (Svätý Bartolomej)", + "fr_CA": "francúzÅ¡tina (Kanada)", + "fr_CD": "francúzÅ¡tina (Konžská demokratická republika)", + "fr_CF": "francúzÅ¡tina (Stredoafrická republika)", + "fr_CG": "francúzÅ¡tina (Konžská republika)", + "fr_CH": "francúzÅ¡tina (Å vajÄiarsko)", + "fr_CI": "francúzÅ¡tina (Pobrežie Slonoviny)", + "fr_CM": "francúzÅ¡tina (Kamerun)", + "fr_DJ": "francúzÅ¡tina (Džibutsko)", + "fr_DZ": "francúzÅ¡tina (Alžírsko)", + "fr_FR": "francúzÅ¡tina (Francúzsko)", + "fr_GA": "francúzÅ¡tina (Gabon)", + "fr_GF": "francúzÅ¡tina (Francúzska Guayana)", + "fr_GN": "francúzÅ¡tina (Guinea)", + "fr_GP": "francúzÅ¡tina (Guadeloupe)", + "fr_GQ": "francúzÅ¡tina (Rovníková Guinea)", + "fr_HT": "francúzÅ¡tina (Haiti)", + "fr_KM": "francúzÅ¡tina (Komory)", + "fr_LU": "francúzÅ¡tina (Luxembursko)", + "fr_MA": "francúzÅ¡tina (Maroko)", + "fr_MC": "francúzÅ¡tina (Monako)", + "fr_MF": "francúzÅ¡tina (Svätý Martin (fr.))", + "fr_MG": "francúzÅ¡tina (Madagaskar)", + "fr_ML": "francúzÅ¡tina (Mali)", + "fr_MQ": "francúzÅ¡tina (Martinik)", + "fr_MR": "francúzÅ¡tina (Mauritánia)", + "fr_MU": "francúzÅ¡tina (Maurícius)", + "fr_NC": "francúzÅ¡tina (Nová Kaledónia)", + "fr_NE": "francúzÅ¡tina (Niger)", + "fr_PF": "francúzÅ¡tina (Francúzska Polynézia)", + "fr_PM": "francúzÅ¡tina (Saint Pierre a Miquelon)", + "fr_RE": "francúzÅ¡tina (Réunion)", + "fr_RW": "francúzÅ¡tina (Rwanda)", + "fr_SC": "francúzÅ¡tina (Seychely)", + "fr_SN": "francúzÅ¡tina (Senegal)", + "fr_SY": "francúzÅ¡tina (Sýria)", + "fr_TD": "francúzÅ¡tina (ÄŒad)", + "fr_TG": "francúzÅ¡tina (Togo)", + "fr_TN": "francúzÅ¡tina (Tunisko)", + "fr_VU": "francúzÅ¡tina (Vanuatu)", + "fr_WF": "francúzÅ¡tina (Wallis a Futuna)", + "fr_YT": "francúzÅ¡tina (Mayotte)", + "fy": "západná frízÅ¡tina", + "fy_NL": "západná frízÅ¡tina (Holandsko)", + "ga": "írÄina", + "ga_IE": "írÄina (Ãrsko)", + "gd": "Å¡kótska gaelÄina", + "gd_GB": "Å¡kótska gaelÄina (Spojené kráľovstvo)", + "gl": "galícijÄina", + "gl_ES": "galícijÄina (Å panielsko)", + "gu": "gudžarátÄina", + "gu_IN": "gudžarátÄina (India)", + "gv": "manÄina", + "gv_IM": "manÄina (Ostrov Man)", + "ha": "hauÅ¡tina", + "ha_GH": "hauÅ¡tina (Ghana)", + "ha_NE": "hauÅ¡tina (Niger)", + "ha_NG": "hauÅ¡tina (Nigéria)", + "he": "hebrejÄina", + "he_IL": "hebrejÄina (Izrael)", + "hi": "hindÄina", + "hi_IN": "hindÄina (India)", + "hr": "chorvátÄina", + "hr_BA": "chorvátÄina (Bosna a Hercegovina)", + "hr_HR": "chorvátÄina (Chorvátsko)", + "hu": "maÄarÄina", + "hu_HU": "maÄarÄina (MaÄarsko)", + "hy": "arménÄina", + "hy_AM": "arménÄina (Arménsko)", + "id": "indonézÅ¡tina", + "id_ID": "indonézÅ¡tina (Indonézia)", + "ig": "igboÅ¡tina", + "ig_NG": "igboÅ¡tina (Nigéria)", + "ii": "s’Ächuanská iovÄina", + "ii_CN": "s’Ächuanská iovÄina (Čína)", + "is": "islandÄina", + "is_IS": "islandÄina (Island)", + "it": "talianÄina", + "it_CH": "talianÄina (Å vajÄiarsko)", + "it_IT": "talianÄina (Taliansko)", + "it_SM": "talianÄina (San Maríno)", + "ja": "japonÄina", + "ja_JP": "japonÄina (Japonsko)", + "ka": "gruzínÄina", + "ka_GE": "gruzínÄina (Gruzínsko)", + "ki": "kikujÄina", + "ki_KE": "kikujÄina (Keňa)", + "kk": "kazaÅ¡tina", + "kk_KZ": "kazaÅ¡tina (Kazachstan)", + "kl": "grónÄina", + "kl_GL": "grónÄina (Grónsko)", + "km": "khmérÄina", + "km_KH": "khmérÄina (Kambodža)", + "kn": "kannadÄina", + "kn_IN": "kannadÄina (India)", + "ko": "kórejÄina", + "ko_KP": "kórejÄina (Severná Kórea)", + "ko_KR": "kórejÄina (Južná Kórea)", + "ks": "kaÅ¡mírÄina", + "ks_IN": "kaÅ¡mírÄina (India)", + "kw": "kornÄina", + "kw_GB": "kornÄina (Spojené kráľovstvo)", + "ky": "kirgizÅ¡tina", + "ky_KG": "kirgizÅ¡tina (Kirgizsko)", + "lb": "luxemburÄina", + "lb_LU": "luxemburÄina (Luxembursko)", + "lg": "gandÄina", + "lg_UG": "gandÄina (Uganda)", + "ln": "lingalÄina", + "ln_AO": "lingalÄina (Angola)", + "ln_CD": "lingalÄina (Konžská demokratická republika)", + "ln_CF": "lingalÄina (Stredoafrická republika)", + "ln_CG": "lingalÄina (Konžská republika)", + "lo": "laoÅ¡tina", + "lo_LA": "laoÅ¡tina (Laos)", + "lt": "litovÄina", + "lt_LT": "litovÄina (Litva)", + "lu": "lubÄina (katanžská)", + "lu_CD": "lubÄina (Konžská demokratická republika)", + "lv": "lotyÅ¡tina", + "lv_LV": "lotyÅ¡tina (LotyÅ¡sko)", + "mg": "malgaÅ¡tina", + "mg_MG": "malgaÅ¡tina (Madagaskar)", + "mk": "macedónÄina", + "mk_MK": "macedónÄina (Macedónsko)", + "ml": "malajálamÄina", + "ml_IN": "malajálamÄina (India)", + "mn": "mongolÄina", + "mn_MN": "mongolÄina (Mongolsko)", + "mr": "maráthÄina", + "mr_IN": "maráthÄina (India)", + "ms": "malajÄina", + "ms_BN": "malajÄina (Brunej)", + "ms_MY": "malajÄina (Malajzia)", + "ms_SG": "malajÄina (Singapur)", + "mt": "maltÄina", + "mt_MT": "maltÄina (Malta)", + "my": "barmÄina", + "my_MM": "barmÄina (Mjanmarsko)", + "nb": "nórÄina (bokmal)", + "nb_NO": "nórÄina (Nórsko)", + "nb_SJ": "nórÄina (Svalbard a Jan Mayen)", + "nd": "severná ndebelÄina", + "nd_ZW": "severná ndebelÄina (Zimbabwe)", + "ne": "nepálÄina", + "ne_IN": "nepálÄina (India)", + "ne_NP": "nepálÄina (Nepál)", + "nl": "holandÄina", + "nl_AW": "holandÄina (Aruba)", + "nl_BE": "holandÄina (Belgicko)", + "nl_BQ": "holandÄina (Karibské Holandsko)", + "nl_CW": "holandÄina (Curaçao)", + "nl_NL": "holandÄina (Holandsko)", + "nl_SR": "holandÄina (Surinam)", + "nl_SX": "holandÄina (Svätý Martin (hol.))", + "nn": "nórÄina (nynorsk)", + "nn_NO": "nórÄina (Nórsko)", + "no": "nórÄina", + "no_NO": "nórÄina (Nórsko)", + "om": "oromÄina", + "om_ET": "oromÄina (Etiópia)", + "om_KE": "oromÄina (Keňa)", + "or": "uríjÄina", + "or_IN": "uríjÄina (India)", + "os": "osetÄina", + "os_GE": "osetÄina (Gruzínsko)", + "os_RU": "osetÄina (Rusko)", + "pa": "pandžábÄina", + "pa_Arab": "pandžábÄina (arabské)", + "pa_Arab_PK": "pandžábÄina (arabské, Pakistan)", + "pa_Guru": "pandžábÄina (gurmukhi)", + "pa_Guru_IN": "pandžábÄina (gurmukhi, India)", + "pa_IN": "pandžábÄina (India)", + "pa_PK": "pandžábÄina (Pakistan)", + "pl": "poľština", + "pl_PL": "poľština (Poľsko)", + "ps": "paÅ¡tÄina", + "ps_AF": "paÅ¡tÄina (Afganistan)", + "pt": "portugalÄina", + "pt_AO": "portugalÄina (Angola)", + "pt_BR": "portugalÄina (Brazília)", + "pt_CH": "portugalÄina (Å vajÄiarsko)", + "pt_CV": "portugalÄina (Kapverdy)", + "pt_GQ": "portugalÄina (Rovníková Guinea)", + "pt_GW": "portugalÄina (Guinea-Bissau)", + "pt_LU": "portugalÄina (Luxembursko)", + "pt_MO": "portugalÄina (Macao – OAO Číny)", + "pt_MZ": "portugalÄina (Mozambik)", + "pt_PT": "portugalÄina (Portugalsko)", + "pt_ST": "portugalÄina (Svätý Tomáš a Princov ostrov)", + "pt_TL": "portugalÄina (Východný Timor)", + "qu": "keÄuánÄina", + "qu_BO": "keÄuánÄina (Bolívia)", + "qu_EC": "keÄuánÄina (Ekvádor)", + "qu_PE": "keÄuánÄina (Peru)", + "rm": "rétorománÄina", + "rm_CH": "rétorománÄina (Å vajÄiarsko)", + "rn": "rundÄina", + "rn_BI": "rundÄina (Burundi)", + "ro": "rumunÄina", + "ro_MD": "rumunÄina (Moldavsko)", + "ro_RO": "rumunÄina (Rumunsko)", + "ru": "ruÅ¡tina", + "ru_BY": "ruÅ¡tina (Bielorusko)", + "ru_KG": "ruÅ¡tina (Kirgizsko)", + "ru_KZ": "ruÅ¡tina (Kazachstan)", + "ru_MD": "ruÅ¡tina (Moldavsko)", + "ru_RU": "ruÅ¡tina (Rusko)", + "ru_UA": "ruÅ¡tina (Ukrajina)", + "rw": "rwandÄina", + "rw_RW": "rwandÄina (Rwanda)", + "se": "severná laponÄina", + "se_FI": "severná laponÄina (Fínsko)", + "se_NO": "severná laponÄina (Nórsko)", + "se_SE": "severná laponÄina (Å védsko)", + "sg": "sango", + "sg_CF": "sango (Stredoafrická republika)", + "sh": "srbochorvátÄina", + "sh_BA": "srbochorvátÄina (Bosna a Hercegovina)", + "si": "sinhalÄina", + "si_LK": "sinhalÄina (Srí Lanka)", + "sk": "slovenÄina", + "sk_SK": "slovenÄina (Slovensko)", + "sl": "slovinÄina", + "sl_SI": "slovinÄina (Slovinsko)", + "sn": "Å¡onÄina", + "sn_ZW": "Å¡onÄina (Zimbabwe)", + "so": "somálÄina", + "so_DJ": "somálÄina (Džibutsko)", + "so_ET": "somálÄina (Etiópia)", + "so_KE": "somálÄina (Keňa)", + "so_SO": "somálÄina (Somálsko)", + "sq": "albánÄina", + "sq_AL": "albánÄina (Albánsko)", + "sq_MK": "albánÄina (Macedónsko)", + "sq_XK": "albánÄina (Kosovo)", + "sr": "srbÄina", + "sr_BA": "srbÄina (Bosna a Hercegovina)", + "sr_Cyrl": "srbÄina (cyrilika)", + "sr_Cyrl_BA": "srbÄina (cyrilika, Bosna a Hercegovina)", + "sr_Cyrl_ME": "srbÄina (cyrilika, ÄŒierna Hora)", + "sr_Cyrl_RS": "srbÄina (cyrilika, Srbsko)", + "sr_Cyrl_XK": "srbÄina (cyrilika, Kosovo)", + "sr_Latn": "srbÄina (latinka)", + "sr_Latn_BA": "srbÄina (latinka, Bosna a Hercegovina)", + "sr_Latn_ME": "srbÄina (latinka, ÄŒierna Hora)", + "sr_Latn_RS": "srbÄina (latinka, Srbsko)", + "sr_Latn_XK": "srbÄina (latinka, Kosovo)", + "sr_ME": "srbÄina (ÄŒierna Hora)", + "sr_RS": "srbÄina (Srbsko)", + "sr_XK": "srbÄina (Kosovo)", + "sv": "Å¡védÄina", + "sv_AX": "Å¡védÄina (Alandy)", + "sv_FI": "Å¡védÄina (Fínsko)", + "sv_SE": "Å¡védÄina (Å védsko)", + "sw": "swahilÄina", + "sw_CD": "swahilÄina (Konžská demokratická republika)", + "sw_KE": "swahilÄina (Keňa)", + "sw_TZ": "swahilÄina (Tanzánia)", + "sw_UG": "swahilÄina (Uganda)", + "ta": "tamilÄina", + "ta_IN": "tamilÄina (India)", + "ta_LK": "tamilÄina (Srí Lanka)", + "ta_MY": "tamilÄina (Malajzia)", + "ta_SG": "tamilÄina (Singapur)", + "te": "telugÄina", + "te_IN": "telugÄina (India)", + "th": "thajÄina", + "th_TH": "thajÄina (Thajsko)", + "ti": "tigriňa", + "ti_ER": "tigriňa (Eritrea)", + "ti_ET": "tigriňa (Etiópia)", + "tl": "tagalÄina", + "tl_PH": "tagalÄina (Filipíny)", + "to": "tongÄina", + "to_TO": "tongÄina (Tonga)", + "tr": "tureÄtina", + "tr_CY": "tureÄtina (Cyprus)", + "tr_TR": "tureÄtina (Turecko)", + "ug": "ujgurÄina", + "ug_CN": "ujgurÄina (Čína)", + "uk": "ukrajinÄina", + "uk_UA": "ukrajinÄina (Ukrajina)", + "ur": "urdÄina", + "ur_IN": "urdÄina (India)", + "ur_PK": "urdÄina (Pakistan)", + "uz": "uzbeÄtina", + "uz_AF": "uzbeÄtina (Afganistan)", + "uz_Arab": "uzbeÄtina (arabské)", + "uz_Arab_AF": "uzbeÄtina (arabské, Afganistan)", + "uz_Cyrl": "uzbeÄtina (cyrilika)", + "uz_Cyrl_UZ": "uzbeÄtina (cyrilika, Uzbekistan)", + "uz_Latn": "uzbeÄtina (latinka)", + "uz_Latn_UZ": "uzbeÄtina (latinka, Uzbekistan)", + "uz_UZ": "uzbeÄtina (Uzbekistan)", + "vi": "vietnamÄina", + "vi_VN": "vietnamÄina (Vietnam)", + "yi": "jidiÅ¡", + "yo": "jorubÄina", + "yo_BJ": "jorubÄina (Benin)", + "yo_NG": "jorubÄina (Nigéria)", + "zh": "ÄínÅ¡tina", + "zh_CN": "ÄínÅ¡tina (Čína)", + "zh_HK": "ÄínÅ¡tina (Hongkong – OAO Číny)", + "zh_Hans": "ÄínÅ¡tina (zjednoduÅ¡ené)", + "zh_Hans_CN": "ÄínÅ¡tina (zjednoduÅ¡ené, Čína)", + "zh_Hans_HK": "ÄínÅ¡tina (zjednoduÅ¡ené, Hongkong – OAO Číny)", + "zh_Hans_MO": "ÄínÅ¡tina (zjednoduÅ¡ené, Macao – OAO Číny)", + "zh_Hans_SG": "ÄínÅ¡tina (zjednoduÅ¡ené, Singapur)", + "zh_Hant": "ÄínÅ¡tina (tradiÄné)", + "zh_Hant_HK": "ÄínÅ¡tina (tradiÄné, Hongkong – OAO Číny)", + "zh_Hant_MO": "ÄínÅ¡tina (tradiÄné, Macao – OAO Číny)", + "zh_Hant_TW": "ÄínÅ¡tina (tradiÄné, Taiwan)", + "zh_MO": "ÄínÅ¡tina (Macao – OAO Číny)", + "zh_SG": "ÄínÅ¡tina (Singapur)", + "zh_TW": "ÄínÅ¡tina (Taiwan)", + "zu": "zuluÅ¡tina", + "zu_ZA": "zuluÅ¡tina (Južná Afrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sl.json new file mode 100644 index 0000000000000000000000000000000000000000..f5355db29528be66b3cf705f1c98e79096b979d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sl.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikanÅ¡Äina", + "af_NA": "afrikanÅ¡Äina (Namibija)", + "af_ZA": "afrikanÅ¡Äina (JužnoafriÅ¡ka republika)", + "ak": "akanÅ¡Äina", + "ak_GH": "akanÅ¡Äina (Gana)", + "am": "amharÅ¡Äina", + "am_ET": "amharÅ¡Äina (Etiopija)", + "ar": "arabÅ¡Äina", + "ar_AE": "arabÅ¡Äina (Združeni arabski emirati)", + "ar_BH": "arabÅ¡Äina (Bahrajn)", + "ar_DJ": "arabÅ¡Äina (Džibuti)", + "ar_DZ": "arabÅ¡Äina (Alžirija)", + "ar_EG": "arabÅ¡Äina (Egipt)", + "ar_EH": "arabÅ¡Äina (Zahodna Sahara)", + "ar_ER": "arabÅ¡Äina (Eritreja)", + "ar_IL": "arabÅ¡Äina (Izrael)", + "ar_IQ": "arabÅ¡Äina (Irak)", + "ar_JO": "arabÅ¡Äina (Jordanija)", + "ar_KM": "arabÅ¡Äina (Komori)", + "ar_KW": "arabÅ¡Äina (Kuvajt)", + "ar_LB": "arabÅ¡Äina (Libanon)", + "ar_LY": "arabÅ¡Äina (Libija)", + "ar_MA": "arabÅ¡Äina (Maroko)", + "ar_MR": "arabÅ¡Äina (Mavretanija)", + "ar_OM": "arabÅ¡Äina (Oman)", + "ar_PS": "arabÅ¡Äina (Palestinsko ozemlje)", + "ar_QA": "arabÅ¡Äina (Katar)", + "ar_SA": "arabÅ¡Äina (Saudova Arabija)", + "ar_SD": "arabÅ¡Äina (Sudan)", + "ar_SO": "arabÅ¡Äina (Somalija)", + "ar_SS": "arabÅ¡Äina (Južni Sudan)", + "ar_SY": "arabÅ¡Äina (Sirija)", + "ar_TD": "arabÅ¡Äina (ÄŒad)", + "ar_TN": "arabÅ¡Äina (Tunizija)", + "ar_YE": "arabÅ¡Äina (Jemen)", + "as": "asamÅ¡Äina", + "as_IN": "asamÅ¡Äina (Indija)", + "az": "azerbajdžanÅ¡Äina", + "az_AZ": "azerbajdžanÅ¡Äina (Azerbajdžan)", + "az_Cyrl": "azerbajdžanÅ¡Äina (cirilica)", + "az_Cyrl_AZ": "azerbajdžanÅ¡Äina (cirilica, Azerbajdžan)", + "az_Latn": "azerbajdžanÅ¡Äina (latinica)", + "az_Latn_AZ": "azerbajdžanÅ¡Äina (latinica, Azerbajdžan)", + "be": "beloruÅ¡Äina", + "be_BY": "beloruÅ¡Äina (Belorusija)", + "bg": "bolgarÅ¡Äina", + "bg_BG": "bolgarÅ¡Äina (Bolgarija)", + "bm": "bambarÅ¡Äina", + "bm_ML": "bambarÅ¡Äina (Mali)", + "bn": "bengalÅ¡Äina", + "bn_BD": "bengalÅ¡Äina (BangladeÅ¡)", + "bn_IN": "bengalÅ¡Äina (Indija)", + "bo": "tibetanÅ¡Äina", + "bo_CN": "tibetanÅ¡Äina (Kitajska)", + "bo_IN": "tibetanÅ¡Äina (Indija)", + "br": "bretonÅ¡Äina", + "br_FR": "bretonÅ¡Äina (Francija)", + "bs": "bosanÅ¡Äina", + "bs_BA": "bosanÅ¡Äina (Bosna in Hercegovina)", + "bs_Cyrl": "bosanÅ¡Äina (cirilica)", + "bs_Cyrl_BA": "bosanÅ¡Äina (cirilica, Bosna in Hercegovina)", + "bs_Latn": "bosanÅ¡Äina (latinica)", + "bs_Latn_BA": "bosanÅ¡Äina (latinica, Bosna in Hercegovina)", + "ca": "katalonÅ¡Äina", + "ca_AD": "katalonÅ¡Äina (Andora)", + "ca_ES": "katalonÅ¡Äina (Å panija)", + "ca_FR": "katalonÅ¡Äina (Francija)", + "ca_IT": "katalonÅ¡Äina (Italija)", + "ce": "ÄeÄenÅ¡Äina", + "ce_RU": "ÄeÄenÅ¡Äina (Rusija)", + "cs": "ÄeÅ¡Äina", + "cs_CZ": "ÄeÅ¡Äina (ÄŒeÅ¡ka)", + "cy": "valižanÅ¡Äina", + "cy_GB": "valižanÅ¡Äina (Združeno kraljestvo)", + "da": "danÅ¡Äina", + "da_DK": "danÅ¡Äina (Danska)", + "da_GL": "danÅ¡Äina (Grenlandija)", + "de": "nemÅ¡Äina", + "de_AT": "nemÅ¡Äina (Avstrija)", + "de_BE": "nemÅ¡Äina (Belgija)", + "de_CH": "nemÅ¡Äina (Å vica)", + "de_DE": "nemÅ¡Äina (NemÄija)", + "de_IT": "nemÅ¡Äina (Italija)", + "de_LI": "nemÅ¡Äina (LihtenÅ¡tajn)", + "de_LU": "nemÅ¡Äina (Luksemburg)", + "dz": "dzonka", + "dz_BT": "dzonka (Butan)", + "ee": "evenÅ¡Äina", + "ee_GH": "evenÅ¡Äina (Gana)", + "ee_TG": "evenÅ¡Äina (Togo)", + "el": "grÅ¡Äina", + "el_CY": "grÅ¡Äina (Ciper)", + "el_GR": "grÅ¡Äina (GrÄija)", + "en": "angleÅ¡Äina", + "en_AG": "angleÅ¡Äina (Antigva in Barbuda)", + "en_AI": "angleÅ¡Äina (Angvila)", + "en_AS": "angleÅ¡Äina (AmeriÅ¡ka Samoa)", + "en_AT": "angleÅ¡Äina (Avstrija)", + "en_AU": "angleÅ¡Äina (Avstralija)", + "en_BB": "angleÅ¡Äina (Barbados)", + "en_BE": "angleÅ¡Äina (Belgija)", + "en_BI": "angleÅ¡Äina (Burundi)", + "en_BM": "angleÅ¡Äina (Bermudi)", + "en_BS": "angleÅ¡Äina (Bahami)", + "en_BW": "angleÅ¡Äina (Bocvana)", + "en_BZ": "angleÅ¡Äina (Belize)", + "en_CA": "angleÅ¡Äina (Kanada)", + "en_CC": "angleÅ¡Äina (Kokosovi otoki)", + "en_CH": "angleÅ¡Äina (Å vica)", + "en_CK": "angleÅ¡Äina (Cookovi otoki)", + "en_CM": "angleÅ¡Äina (Kamerun)", + "en_CX": "angleÅ¡Äina (BožiÄni otok)", + "en_CY": "angleÅ¡Äina (Ciper)", + "en_DE": "angleÅ¡Äina (NemÄija)", + "en_DG": "angleÅ¡Äina (Diego Garcia)", + "en_DK": "angleÅ¡Äina (Danska)", + "en_DM": "angleÅ¡Äina (Dominika)", + "en_ER": "angleÅ¡Äina (Eritreja)", + "en_FI": "angleÅ¡Äina (Finska)", + "en_FJ": "angleÅ¡Äina (Fidži)", + "en_FK": "angleÅ¡Äina (Falklandski otoki)", + "en_FM": "angleÅ¡Äina (Mikronezija)", + "en_GB": "angleÅ¡Äina (Združeno kraljestvo)", + "en_GD": "angleÅ¡Äina (Grenada)", + "en_GG": "angleÅ¡Äina (Guernsey)", + "en_GH": "angleÅ¡Äina (Gana)", + "en_GI": "angleÅ¡Äina (Gibraltar)", + "en_GM": "angleÅ¡Äina (Gambija)", + "en_GU": "angleÅ¡Äina (Guam)", + "en_GY": "angleÅ¡Äina (Gvajana)", + "en_HK": "angleÅ¡Äina (Posebno administrativno obmoÄje LR Kitajske Hongkong)", + "en_IE": "angleÅ¡Äina (Irska)", + "en_IL": "angleÅ¡Äina (Izrael)", + "en_IM": "angleÅ¡Äina (Otok Man)", + "en_IN": "angleÅ¡Äina (Indija)", + "en_IO": "angleÅ¡Äina (Britansko ozemlje v Indijskem oceanu)", + "en_JE": "angleÅ¡Äina (Jersey)", + "en_JM": "angleÅ¡Äina (Jamajka)", + "en_KE": "angleÅ¡Äina (Kenija)", + "en_KI": "angleÅ¡Äina (Kiribati)", + "en_KN": "angleÅ¡Äina (Saint Kitts in Nevis)", + "en_KY": "angleÅ¡Äina (Kajmanski otoki)", + "en_LC": "angleÅ¡Äina (Saint Lucia)", + "en_LR": "angleÅ¡Äina (Liberija)", + "en_LS": "angleÅ¡Äina (Lesoto)", + "en_MG": "angleÅ¡Äina (Madagaskar)", + "en_MH": "angleÅ¡Äina (Marshallovi otoki)", + "en_MO": "angleÅ¡Äina (Posebno administrativno obmoÄje LR Kitajske Macao)", + "en_MP": "angleÅ¡Äina (Severni Marianski otoki)", + "en_MS": "angleÅ¡Äina (Montserrat)", + "en_MT": "angleÅ¡Äina (Malta)", + "en_MU": "angleÅ¡Äina (Mauritius)", + "en_MW": "angleÅ¡Äina (Malavi)", + "en_MY": "angleÅ¡Äina (Malezija)", + "en_NA": "angleÅ¡Äina (Namibija)", + "en_NF": "angleÅ¡Äina (NorfolÅ¡ki otok)", + "en_NG": "angleÅ¡Äina (Nigerija)", + "en_NL": "angleÅ¡Äina (Nizozemska)", + "en_NR": "angleÅ¡Äina (Nauru)", + "en_NU": "angleÅ¡Äina (Niue)", + "en_NZ": "angleÅ¡Äina (Nova Zelandija)", + "en_PG": "angleÅ¡Äina (Papua Nova Gvineja)", + "en_PH": "angleÅ¡Äina (Filipini)", + "en_PK": "angleÅ¡Äina (Pakistan)", + "en_PN": "angleÅ¡Äina (Pitcairn)", + "en_PR": "angleÅ¡Äina (Portoriko)", + "en_PW": "angleÅ¡Äina (Palau)", + "en_RW": "angleÅ¡Äina (Ruanda)", + "en_SB": "angleÅ¡Äina (Salomonovi otoki)", + "en_SC": "angleÅ¡Äina (SejÅ¡eli)", + "en_SD": "angleÅ¡Äina (Sudan)", + "en_SE": "angleÅ¡Äina (Å vedska)", + "en_SG": "angleÅ¡Äina (Singapur)", + "en_SH": "angleÅ¡Äina (Sveta Helena)", + "en_SI": "angleÅ¡Äina (Slovenija)", + "en_SL": "angleÅ¡Äina (Sierra Leone)", + "en_SS": "angleÅ¡Äina (Južni Sudan)", + "en_SX": "angleÅ¡Äina (Sint Maarten)", + "en_SZ": "angleÅ¡Äina (Svazi)", + "en_TC": "angleÅ¡Äina (Otoki Turks in Caicos)", + "en_TK": "angleÅ¡Äina (Tokelau)", + "en_TO": "angleÅ¡Äina (Tonga)", + "en_TT": "angleÅ¡Äina (Trinidad in Tobago)", + "en_TV": "angleÅ¡Äina (Tuvalu)", + "en_TZ": "angleÅ¡Äina (Tanzanija)", + "en_UG": "angleÅ¡Äina (Uganda)", + "en_UM": "angleÅ¡Äina (Stranski zunanji otoki Združenih držav)", + "en_US": "angleÅ¡Äina (Združene države Amerike)", + "en_VC": "angleÅ¡Äina (Saint Vincent in Grenadine)", + "en_VG": "angleÅ¡Äina (Britanski DeviÅ¡ki otoki)", + "en_VI": "angleÅ¡Äina (AmeriÅ¡ki DeviÅ¡ki otoki)", + "en_VU": "angleÅ¡Äina (Vanuatu)", + "en_WS": "angleÅ¡Äina (Samoa)", + "en_ZA": "angleÅ¡Äina (JužnoafriÅ¡ka republika)", + "en_ZM": "angleÅ¡Äina (Zambija)", + "en_ZW": "angleÅ¡Äina (Zimbabve)", + "eo": "esperanto", + "es": "Å¡panÅ¡Äina", + "es_AR": "Å¡panÅ¡Äina (Argentina)", + "es_BO": "Å¡panÅ¡Äina (Bolivija)", + "es_BR": "Å¡panÅ¡Äina (Brazilija)", + "es_CL": "Å¡panÅ¡Äina (ÄŒile)", + "es_CO": "Å¡panÅ¡Äina (Kolumbija)", + "es_CR": "Å¡panÅ¡Äina (Kostarika)", + "es_CU": "Å¡panÅ¡Äina (Kuba)", + "es_DO": "Å¡panÅ¡Äina (Dominikanska republika)", + "es_EA": "Å¡panÅ¡Äina (Ceuta in Melilla)", + "es_EC": "Å¡panÅ¡Äina (Ekvador)", + "es_ES": "Å¡panÅ¡Äina (Å panija)", + "es_GQ": "Å¡panÅ¡Äina (Ekvatorialna Gvineja)", + "es_GT": "Å¡panÅ¡Äina (Gvatemala)", + "es_HN": "Å¡panÅ¡Äina (Honduras)", + "es_IC": "Å¡panÅ¡Äina (Kanarski otoki)", + "es_MX": "Å¡panÅ¡Äina (Mehika)", + "es_NI": "Å¡panÅ¡Äina (Nikaragva)", + "es_PA": "Å¡panÅ¡Äina (Panama)", + "es_PE": "Å¡panÅ¡Äina (Peru)", + "es_PH": "Å¡panÅ¡Äina (Filipini)", + "es_PR": "Å¡panÅ¡Äina (Portoriko)", + "es_PY": "Å¡panÅ¡Äina (Paragvaj)", + "es_SV": "Å¡panÅ¡Äina (Salvador)", + "es_US": "Å¡panÅ¡Äina (Združene države Amerike)", + "es_UY": "Å¡panÅ¡Äina (Urugvaj)", + "es_VE": "Å¡panÅ¡Äina (Venezuela)", + "et": "estonÅ¡Äina", + "et_EE": "estonÅ¡Äina (Estonija)", + "eu": "baskovÅ¡Äina", + "eu_ES": "baskovÅ¡Äina (Å panija)", + "fa": "perzijÅ¡Äina", + "fa_AF": "perzijÅ¡Äina (Afganistan)", + "fa_IR": "perzijÅ¡Äina (Iran)", + "ff": "fulÅ¡Äina", + "ff_CM": "fulÅ¡Äina (Kamerun)", + "ff_GN": "fulÅ¡Äina (Gvineja)", + "ff_MR": "fulÅ¡Äina (Mavretanija)", + "ff_SN": "fulÅ¡Äina (Senegal)", + "fi": "finÅ¡Äina", + "fi_FI": "finÅ¡Äina (Finska)", + "fo": "ferÅ¡Äina", + "fo_DK": "ferÅ¡Äina (Danska)", + "fo_FO": "ferÅ¡Äina (Ferski otoki)", + "fr": "francoÅ¡Äina", + "fr_BE": "francoÅ¡Äina (Belgija)", + "fr_BF": "francoÅ¡Äina (Burkina Faso)", + "fr_BI": "francoÅ¡Äina (Burundi)", + "fr_BJ": "francoÅ¡Äina (Benin)", + "fr_BL": "francoÅ¡Äina (Saint Barthélemy)", + "fr_CA": "francoÅ¡Äina (Kanada)", + "fr_CD": "francoÅ¡Äina (DemokratiÄna republika Kongo)", + "fr_CF": "francoÅ¡Äina (CentralnoafriÅ¡ka republika)", + "fr_CG": "francoÅ¡Äina (Kongo - Brazzaville)", + "fr_CH": "francoÅ¡Äina (Å vica)", + "fr_CI": "francoÅ¡Äina (SlonokoÅ¡Äena obala)", + "fr_CM": "francoÅ¡Äina (Kamerun)", + "fr_DJ": "francoÅ¡Äina (Džibuti)", + "fr_DZ": "francoÅ¡Äina (Alžirija)", + "fr_FR": "francoÅ¡Äina (Francija)", + "fr_GA": "francoÅ¡Äina (Gabon)", + "fr_GF": "francoÅ¡Äina (Francoska Gvajana)", + "fr_GN": "francoÅ¡Äina (Gvineja)", + "fr_GP": "francoÅ¡Äina (Gvadalupe)", + "fr_GQ": "francoÅ¡Äina (Ekvatorialna Gvineja)", + "fr_HT": "francoÅ¡Äina (Haiti)", + "fr_KM": "francoÅ¡Äina (Komori)", + "fr_LU": "francoÅ¡Äina (Luksemburg)", + "fr_MA": "francoÅ¡Äina (Maroko)", + "fr_MC": "francoÅ¡Äina (Monako)", + "fr_MF": "francoÅ¡Äina (Saint Martin)", + "fr_MG": "francoÅ¡Äina (Madagaskar)", + "fr_ML": "francoÅ¡Äina (Mali)", + "fr_MQ": "francoÅ¡Äina (Martinik)", + "fr_MR": "francoÅ¡Äina (Mavretanija)", + "fr_MU": "francoÅ¡Äina (Mauritius)", + "fr_NC": "francoÅ¡Äina (Nova Kaledonija)", + "fr_NE": "francoÅ¡Äina (Niger)", + "fr_PF": "francoÅ¡Äina (Francoska Polinezija)", + "fr_PM": "francoÅ¡Äina (Saint Pierre in Miquelon)", + "fr_RE": "francoÅ¡Äina (Reunion)", + "fr_RW": "francoÅ¡Äina (Ruanda)", + "fr_SC": "francoÅ¡Äina (SejÅ¡eli)", + "fr_SN": "francoÅ¡Äina (Senegal)", + "fr_SY": "francoÅ¡Äina (Sirija)", + "fr_TD": "francoÅ¡Äina (ÄŒad)", + "fr_TG": "francoÅ¡Äina (Togo)", + "fr_TN": "francoÅ¡Äina (Tunizija)", + "fr_VU": "francoÅ¡Äina (Vanuatu)", + "fr_WF": "francoÅ¡Äina (Wallis in Futuna)", + "fr_YT": "francoÅ¡Äina (Mayotte)", + "fy": "zahodna frizijÅ¡Äina", + "fy_NL": "zahodna frizijÅ¡Äina (Nizozemska)", + "ga": "irÅ¡Äina", + "ga_IE": "irÅ¡Äina (Irska)", + "gd": "Å¡kotska gelÅ¡Äina", + "gd_GB": "Å¡kotska gelÅ¡Äina (Združeno kraljestvo)", + "gl": "galicijÅ¡Äina", + "gl_ES": "galicijÅ¡Äina (Å panija)", + "gu": "gudžaratÅ¡Äina", + "gu_IN": "gudžaratÅ¡Äina (Indija)", + "gv": "manÅ¡Äina", + "gv_IM": "manÅ¡Äina (Otok Man)", + "ha": "havÅ¡Äina", + "ha_GH": "havÅ¡Äina (Gana)", + "ha_NE": "havÅ¡Äina (Niger)", + "ha_NG": "havÅ¡Äina (Nigerija)", + "he": "hebrejÅ¡Äina", + "he_IL": "hebrejÅ¡Äina (Izrael)", + "hi": "hindujÅ¡Äina", + "hi_IN": "hindujÅ¡Äina (Indija)", + "hr": "hrvaÅ¡Äina", + "hr_BA": "hrvaÅ¡Äina (Bosna in Hercegovina)", + "hr_HR": "hrvaÅ¡Äina (HrvaÅ¡ka)", + "hu": "madžarÅ¡Äina", + "hu_HU": "madžarÅ¡Äina (Madžarska)", + "hy": "armenÅ¡Äina", + "hy_AM": "armenÅ¡Äina (Armenija)", + "id": "indonezijÅ¡Äina", + "id_ID": "indonezijÅ¡Äina (Indonezija)", + "ig": "igboÅ¡Äina", + "ig_NG": "igboÅ¡Äina (Nigerija)", + "ii": "seÄuanska jiÅ¡Äina", + "ii_CN": "seÄuanska jiÅ¡Äina (Kitajska)", + "is": "islandÅ¡Äina", + "is_IS": "islandÅ¡Äina (Islandija)", + "it": "italijanÅ¡Äina", + "it_CH": "italijanÅ¡Äina (Å vica)", + "it_IT": "italijanÅ¡Äina (Italija)", + "it_SM": "italijanÅ¡Äina (San Marino)", + "ja": "japonÅ¡Äina", + "ja_JP": "japonÅ¡Äina (Japonska)", + "ka": "gruzijÅ¡Äina", + "ka_GE": "gruzijÅ¡Äina (Gruzija)", + "ki": "kikujÅ¡Äina", + "ki_KE": "kikujÅ¡Äina (Kenija)", + "kk": "kazaÅ¡Äina", + "kk_KZ": "kazaÅ¡Äina (Kazahstan)", + "kl": "grenlandÅ¡Äina", + "kl_GL": "grenlandÅ¡Äina (Grenlandija)", + "km": "kmerÅ¡Äina", + "km_KH": "kmerÅ¡Äina (Kambodža)", + "kn": "kanada", + "kn_IN": "kanada (Indija)", + "ko": "korejÅ¡Äina", + "ko_KP": "korejÅ¡Äina (Severna Koreja)", + "ko_KR": "korejÅ¡Äina (Južna Koreja)", + "ks": "kaÅ¡mirÅ¡Äina", + "ks_IN": "kaÅ¡mirÅ¡Äina (Indija)", + "kw": "kornijÅ¡Äina", + "kw_GB": "kornijÅ¡Äina (Združeno kraljestvo)", + "ky": "kirgiÅ¡Äina", + "ky_KG": "kirgiÅ¡Äina (Kirgizistan)", + "lb": "luksemburÅ¡Äina", + "lb_LU": "luksemburÅ¡Äina (Luksemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (DemokratiÄna republika Kongo)", + "ln_CF": "lingala (CentralnoafriÅ¡ka republika)", + "ln_CG": "lingala (Kongo - Brazzaville)", + "lo": "laoÅ¡Äina", + "lo_LA": "laoÅ¡Äina (Laos)", + "lt": "litovÅ¡Äina", + "lt_LT": "litovÅ¡Äina (Litva)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (DemokratiÄna republika Kongo)", + "lv": "latvijÅ¡Äina", + "lv_LV": "latvijÅ¡Äina (Latvija)", + "mg": "malagaÅ¡Äina", + "mg_MG": "malagaÅ¡Äina (Madagaskar)", + "mk": "makedonÅ¡Äina", + "mk_MK": "makedonÅ¡Äina (Makedonija)", + "ml": "malajalamÅ¡Äina", + "ml_IN": "malajalamÅ¡Äina (Indija)", + "mn": "mongolÅ¡Äina", + "mn_MN": "mongolÅ¡Äina (Mongolija)", + "mr": "maratÅ¡Äina", + "mr_IN": "maratÅ¡Äina (Indija)", + "ms": "malajÅ¡Äina", + "ms_BN": "malajÅ¡Äina (Brunej)", + "ms_MY": "malajÅ¡Äina (Malezija)", + "ms_SG": "malajÅ¡Äina (Singapur)", + "mt": "malteÅ¡Äina", + "mt_MT": "malteÅ¡Äina (Malta)", + "my": "burmanÅ¡Äina", + "my_MM": "burmanÅ¡Äina (Mjanmar (Burma))", + "nb": "knjižna norveÅ¡Äina", + "nb_NO": "knjižna norveÅ¡Äina (NorveÅ¡ka)", + "nb_SJ": "knjižna norveÅ¡Äina (Svalbard in Jan Mayen)", + "nd": "severna ndebelÅ¡Äina", + "nd_ZW": "severna ndebelÅ¡Äina (Zimbabve)", + "ne": "nepalÅ¡Äina", + "ne_IN": "nepalÅ¡Äina (Indija)", + "ne_NP": "nepalÅ¡Äina (Nepal)", + "nl": "nizozemÅ¡Äina", + "nl_AW": "nizozemÅ¡Äina (Aruba)", + "nl_BE": "nizozemÅ¡Äina (Belgija)", + "nl_BQ": "nizozemÅ¡Äina (Nizozemski Karibi)", + "nl_CW": "nizozemÅ¡Äina (Curaçao)", + "nl_NL": "nizozemÅ¡Äina (Nizozemska)", + "nl_SR": "nizozemÅ¡Äina (Surinam)", + "nl_SX": "nizozemÅ¡Äina (Sint Maarten)", + "nn": "novonorveÅ¡Äina", + "nn_NO": "novonorveÅ¡Äina (NorveÅ¡ka)", + "no": "norveÅ¡Äina", + "no_NO": "norveÅ¡Äina (NorveÅ¡ka)", + "om": "oromo", + "om_ET": "oromo (Etiopija)", + "om_KE": "oromo (Kenija)", + "or": "odijÅ¡Äina", + "or_IN": "odijÅ¡Äina (Indija)", + "os": "osetinÅ¡Äina", + "os_GE": "osetinÅ¡Äina (Gruzija)", + "os_RU": "osetinÅ¡Äina (Rusija)", + "pa": "pandžabÅ¡Äina", + "pa_Arab": "pandžabÅ¡Äina (arabski)", + "pa_Arab_PK": "pandžabÅ¡Äina (arabski, Pakistan)", + "pa_Guru": "pandžabÅ¡Äina (gurmuki)", + "pa_Guru_IN": "pandžabÅ¡Äina (gurmuki, Indija)", + "pa_IN": "pandžabÅ¡Äina (Indija)", + "pa_PK": "pandžabÅ¡Äina (Pakistan)", + "pl": "poljÅ¡Äina", + "pl_PL": "poljÅ¡Äina (Poljska)", + "ps": "paÅ¡tunÅ¡Äina", + "ps_AF": "paÅ¡tunÅ¡Äina (Afganistan)", + "pt": "portugalÅ¡Äina", + "pt_AO": "portugalÅ¡Äina (Angola)", + "pt_BR": "portugalÅ¡Äina (Brazilija)", + "pt_CH": "portugalÅ¡Äina (Å vica)", + "pt_CV": "portugalÅ¡Äina (Zelenortski otoki)", + "pt_GQ": "portugalÅ¡Äina (Ekvatorialna Gvineja)", + "pt_GW": "portugalÅ¡Äina (Gvineja Bissau)", + "pt_LU": "portugalÅ¡Äina (Luksemburg)", + "pt_MO": "portugalÅ¡Äina (Posebno administrativno obmoÄje LR Kitajske Macao)", + "pt_MZ": "portugalÅ¡Äina (Mozambik)", + "pt_PT": "portugalÅ¡Äina (Portugalska)", + "pt_ST": "portugalÅ¡Äina (Sao Tome in Principe)", + "pt_TL": "portugalÅ¡Äina (Timor-Leste)", + "qu": "keÄuanÅ¡Äina", + "qu_BO": "keÄuanÅ¡Äina (Bolivija)", + "qu_EC": "keÄuanÅ¡Äina (Ekvador)", + "qu_PE": "keÄuanÅ¡Äina (Peru)", + "rm": "retoromanÅ¡Äina", + "rm_CH": "retoromanÅ¡Äina (Å vica)", + "rn": "rundÅ¡Äina", + "rn_BI": "rundÅ¡Äina (Burundi)", + "ro": "romunÅ¡Äina", + "ro_MD": "romunÅ¡Äina (Moldavija)", + "ro_RO": "romunÅ¡Äina (Romunija)", + "ru": "ruÅ¡Äina", + "ru_BY": "ruÅ¡Äina (Belorusija)", + "ru_KG": "ruÅ¡Äina (Kirgizistan)", + "ru_KZ": "ruÅ¡Äina (Kazahstan)", + "ru_MD": "ruÅ¡Äina (Moldavija)", + "ru_RU": "ruÅ¡Äina (Rusija)", + "ru_UA": "ruÅ¡Äina (Ukrajina)", + "rw": "ruandÅ¡Äina", + "rw_RW": "ruandÅ¡Äina (Ruanda)", + "se": "severna samijÅ¡Äina", + "se_FI": "severna samijÅ¡Äina (Finska)", + "se_NO": "severna samijÅ¡Äina (NorveÅ¡ka)", + "se_SE": "severna samijÅ¡Äina (Å vedska)", + "sg": "sango", + "sg_CF": "sango (CentralnoafriÅ¡ka republika)", + "sh": "srbohrvaÅ¡Äina", + "sh_BA": "srbohrvaÅ¡Äina (Bosna in Hercegovina)", + "si": "sinhalÅ¡Äina", + "si_LK": "sinhalÅ¡Äina (Å rilanka)", + "sk": "slovaÅ¡Äina", + "sk_SK": "slovaÅ¡Äina (SlovaÅ¡ka)", + "sl": "slovenÅ¡Äina", + "sl_SI": "slovenÅ¡Äina (Slovenija)", + "sn": "Å¡onÅ¡Äina", + "sn_ZW": "Å¡onÅ¡Äina (Zimbabve)", + "so": "somalÅ¡Äina", + "so_DJ": "somalÅ¡Äina (Džibuti)", + "so_ET": "somalÅ¡Äina (Etiopija)", + "so_KE": "somalÅ¡Äina (Kenija)", + "so_SO": "somalÅ¡Äina (Somalija)", + "sq": "albanÅ¡Äina", + "sq_AL": "albanÅ¡Äina (Albanija)", + "sq_MK": "albanÅ¡Äina (Makedonija)", + "sq_XK": "albanÅ¡Äina (Kosovo)", + "sr": "srbÅ¡Äina", + "sr_BA": "srbÅ¡Äina (Bosna in Hercegovina)", + "sr_Cyrl": "srbÅ¡Äina (cirilica)", + "sr_Cyrl_BA": "srbÅ¡Äina (cirilica, Bosna in Hercegovina)", + "sr_Cyrl_ME": "srbÅ¡Äina (cirilica, ÄŒrna gora)", + "sr_Cyrl_RS": "srbÅ¡Äina (cirilica, Srbija)", + "sr_Cyrl_XK": "srbÅ¡Äina (cirilica, Kosovo)", + "sr_Latn": "srbÅ¡Äina (latinica)", + "sr_Latn_BA": "srbÅ¡Äina (latinica, Bosna in Hercegovina)", + "sr_Latn_ME": "srbÅ¡Äina (latinica, ÄŒrna gora)", + "sr_Latn_RS": "srbÅ¡Äina (latinica, Srbija)", + "sr_Latn_XK": "srbÅ¡Äina (latinica, Kosovo)", + "sr_ME": "srbÅ¡Äina (ÄŒrna gora)", + "sr_RS": "srbÅ¡Äina (Srbija)", + "sr_XK": "srbÅ¡Äina (Kosovo)", + "sv": "Å¡vedÅ¡Äina", + "sv_AX": "Å¡vedÅ¡Äina (Ã…landski otoki)", + "sv_FI": "Å¡vedÅ¡Äina (Finska)", + "sv_SE": "Å¡vedÅ¡Äina (Å vedska)", + "sw": "svahili", + "sw_CD": "svahili (DemokratiÄna republika Kongo)", + "sw_KE": "svahili (Kenija)", + "sw_TZ": "svahili (Tanzanija)", + "sw_UG": "svahili (Uganda)", + "ta": "tamilÅ¡Äina", + "ta_IN": "tamilÅ¡Äina (Indija)", + "ta_LK": "tamilÅ¡Äina (Å rilanka)", + "ta_MY": "tamilÅ¡Äina (Malezija)", + "ta_SG": "tamilÅ¡Äina (Singapur)", + "te": "telugijÅ¡Äina", + "te_IN": "telugijÅ¡Äina (Indija)", + "th": "tajÅ¡Äina", + "th_TH": "tajÅ¡Äina (Tajska)", + "ti": "tigrajÅ¡Äina", + "ti_ER": "tigrajÅ¡Äina (Eritreja)", + "ti_ET": "tigrajÅ¡Äina (Etiopija)", + "tl": "tagalogÅ¡Äina", + "tl_PH": "tagalogÅ¡Äina (Filipini)", + "to": "tongÅ¡Äina", + "to_TO": "tongÅ¡Äina (Tonga)", + "tr": "turÅ¡Äina", + "tr_CY": "turÅ¡Äina (Ciper)", + "tr_TR": "turÅ¡Äina (TurÄija)", + "ug": "ujgurÅ¡Äina", + "ug_CN": "ujgurÅ¡Äina (Kitajska)", + "uk": "ukrajinÅ¡Äina", + "uk_UA": "ukrajinÅ¡Äina (Ukrajina)", + "ur": "urdujÅ¡Äina", + "ur_IN": "urdujÅ¡Äina (Indija)", + "ur_PK": "urdujÅ¡Äina (Pakistan)", + "uz": "uzbeÅ¡Äina", + "uz_AF": "uzbeÅ¡Äina (Afganistan)", + "uz_Arab": "uzbeÅ¡Äina (arabski)", + "uz_Arab_AF": "uzbeÅ¡Äina (arabski, Afganistan)", + "uz_Cyrl": "uzbeÅ¡Äina (cirilica)", + "uz_Cyrl_UZ": "uzbeÅ¡Äina (cirilica, Uzbekistan)", + "uz_Latn": "uzbeÅ¡Äina (latinica)", + "uz_Latn_UZ": "uzbeÅ¡Äina (latinica, Uzbekistan)", + "uz_UZ": "uzbeÅ¡Äina (Uzbekistan)", + "vi": "vietnamÅ¡Äina", + "vi_VN": "vietnamÅ¡Äina (Vietnam)", + "yi": "jidiÅ¡", + "yo": "jorubÅ¡Äina", + "yo_BJ": "jorubÅ¡Äina (Benin)", + "yo_NG": "jorubÅ¡Äina (Nigerija)", + "zh": "kitajÅ¡Äina", + "zh_CN": "kitajÅ¡Äina (Kitajska)", + "zh_HK": "kitajÅ¡Äina (Posebno administrativno obmoÄje LR Kitajske Hongkong)", + "zh_Hans": "kitajÅ¡Äina (poenostavljena pisava han)", + "zh_Hans_CN": "kitajÅ¡Äina (poenostavljena pisava han, Kitajska)", + "zh_Hans_HK": "kitajÅ¡Äina (poenostavljena pisava han, Posebno administrativno obmoÄje LR Kitajske Hongkong)", + "zh_Hans_MO": "kitajÅ¡Äina (poenostavljena pisava han, Posebno administrativno obmoÄje LR Kitajske Macao)", + "zh_Hans_SG": "kitajÅ¡Äina (poenostavljena pisava han, Singapur)", + "zh_Hant": "kitajÅ¡Äina (tradicionalna pisava han)", + "zh_Hant_HK": "kitajÅ¡Äina (tradicionalna pisava han, Posebno administrativno obmoÄje LR Kitajske Hongkong)", + "zh_Hant_MO": "kitajÅ¡Äina (tradicionalna pisava han, Posebno administrativno obmoÄje LR Kitajske Macao)", + "zh_Hant_TW": "kitajÅ¡Äina (tradicionalna pisava han, Tajvan)", + "zh_MO": "kitajÅ¡Äina (Posebno administrativno obmoÄje LR Kitajske Macao)", + "zh_SG": "kitajÅ¡Äina (Singapur)", + "zh_TW": "kitajÅ¡Äina (Tajvan)", + "zu": "zulujÅ¡Äina", + "zu_ZA": "zulujÅ¡Äina (JužnoafriÅ¡ka republika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sn.json new file mode 100644 index 0000000000000000000000000000000000000000..1be618e2a8cd2e44d1fe02c665b524ca5ec201fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sn.json @@ -0,0 +1,320 @@ +{ + "Names": { + "ak": "chiAkani", + "ak_GH": "chiAkani (Ghana)", + "am": "chiAmaric", + "am_ET": "chiAmaric (Etiopia)", + "ar": "chiArabu", + "ar_AE": "chiArabu (United Arab Emirates)", + "ar_BH": "chiArabu (Bahareni)", + "ar_DJ": "chiArabu (Djibouti)", + "ar_DZ": "chiArabu (Aljeria)", + "ar_EG": "chiArabu (Egypt)", + "ar_ER": "chiArabu (Eritrea)", + "ar_IL": "chiArabu (Izuraeri)", + "ar_IQ": "chiArabu (Iraq)", + "ar_JO": "chiArabu (Jordan)", + "ar_KM": "chiArabu (Komoro)", + "ar_KW": "chiArabu (Kuwait)", + "ar_LB": "chiArabu (Lebanon)", + "ar_LY": "chiArabu (Libya)", + "ar_MA": "chiArabu (Morocco)", + "ar_MR": "chiArabu (Mauritania)", + "ar_OM": "chiArabu (Oman)", + "ar_QA": "chiArabu (Qatar)", + "ar_SA": "chiArabu (Saudi Arabia)", + "ar_SD": "chiArabu (Sudan)", + "ar_SO": "chiArabu (Somalia)", + "ar_SY": "chiArabu (Syria)", + "ar_TD": "chiArabu (Chadi)", + "ar_TN": "chiArabu (Tunisia)", + "ar_YE": "chiArabu (Yemen)", + "be": "chiBelarusi", + "be_BY": "chiBelarusi (Belarusi)", + "bg": "chiBulgarian", + "bg_BG": "chiBulgarian (Bulgaria)", + "bn": "chiBengali", + "bn_BD": "chiBengali (Bangladeshi)", + "bn_IN": "chiBengali (India)", + "cs": "chiCzech", + "cs_CZ": "chiCzech (Czech Republic)", + "de": "chiJerimani", + "de_AT": "chiJerimani (Austria)", + "de_BE": "chiJerimani (Beljium)", + "de_CH": "chiJerimani (Switzerland)", + "de_DE": "chiJerimani (Germany)", + "de_IT": "chiJerimani (Italy)", + "de_LI": "chiJerimani (Liechtenstein)", + "de_LU": "chiJerimani (Luxembourg)", + "el": "chiGreek", + "el_CY": "chiGreek (Cyprus)", + "el_GR": "chiGreek (Greece)", + "en": "Chirungu", + "en_AG": "Chirungu (Antigua ne Barbuda)", + "en_AI": "Chirungu (Anguila)", + "en_AS": "Chirungu (Samoa ye Amerika)", + "en_AT": "Chirungu (Austria)", + "en_AU": "Chirungu (Australia)", + "en_BB": "Chirungu (Barbados)", + "en_BE": "Chirungu (Beljium)", + "en_BI": "Chirungu (Burundi)", + "en_BM": "Chirungu (Bermuda)", + "en_BS": "Chirungu (Bahama)", + "en_BW": "Chirungu (Botswana)", + "en_BZ": "Chirungu (Belize)", + "en_CA": "Chirungu (Kanada)", + "en_CH": "Chirungu (Switzerland)", + "en_CK": "Chirungu (Zvitsuwa zveCook)", + "en_CM": "Chirungu (Kameruni)", + "en_CY": "Chirungu (Cyprus)", + "en_DE": "Chirungu (Germany)", + "en_DK": "Chirungu (Denmark)", + "en_DM": "Chirungu (Dominica)", + "en_ER": "Chirungu (Eritrea)", + "en_FI": "Chirungu (Finland)", + "en_FJ": "Chirungu (Fiji)", + "en_FK": "Chirungu (Zvitsuwa zveFalklands)", + "en_FM": "Chirungu (Micronesia)", + "en_GB": "Chirungu (United Kingdom)", + "en_GD": "Chirungu (Grenada)", + "en_GH": "Chirungu (Ghana)", + "en_GI": "Chirungu (Gibraltar)", + "en_GM": "Chirungu (Gambia)", + "en_GU": "Chirungu (Guam)", + "en_GY": "Chirungu (Guyana)", + "en_IE": "Chirungu (Ireland)", + "en_IL": "Chirungu (Izuraeri)", + "en_IN": "Chirungu (India)", + "en_IO": "Chirungu (British Indian Ocean Territory)", + "en_JM": "Chirungu (Jamaica)", + "en_KE": "Chirungu (Kenya)", + "en_KI": "Chirungu (Kiribati)", + "en_KN": "Chirungu (Saint Kitts and Nevis)", + "en_KY": "Chirungu (Zvitsuwa zveCayman)", + "en_LC": "Chirungu (Saint Lucia)", + "en_LR": "Chirungu (Liberia)", + "en_LS": "Chirungu (Lesotho)", + "en_MG": "Chirungu (Madagascar)", + "en_MH": "Chirungu (Zvitsuwa zveMarshall)", + "en_MP": "Chirungu (Zvitsuwa zvekumaodzanyemba eMariana)", + "en_MS": "Chirungu (Montserrat)", + "en_MT": "Chirungu (Malta)", + "en_MU": "Chirungu (Mauritius)", + "en_MW": "Chirungu (Malawi)", + "en_MY": "Chirungu (Malaysia)", + "en_NA": "Chirungu (Namibia)", + "en_NF": "Chirungu (Chitsuwa cheNorfolk)", + "en_NG": "Chirungu (Nigeria)", + "en_NL": "Chirungu (Netherlands)", + "en_NR": "Chirungu (Nauru)", + "en_NU": "Chirungu (Niue)", + "en_NZ": "Chirungu (New Zealand)", + "en_PG": "Chirungu (Papua New Guinea)", + "en_PH": "Chirungu (Philippines)", + "en_PK": "Chirungu (Pakistan)", + "en_PN": "Chirungu (Pitcairn)", + "en_PR": "Chirungu (Puerto Rico)", + "en_PW": "Chirungu (Palau)", + "en_RW": "Chirungu (Rwanda)", + "en_SB": "Chirungu (Zvitsuwa zvaSolomon)", + "en_SC": "Chirungu (Seychelles)", + "en_SD": "Chirungu (Sudan)", + "en_SE": "Chirungu (Sweden)", + "en_SG": "Chirungu (Singapore)", + "en_SH": "Chirungu (Saint Helena)", + "en_SI": "Chirungu (Slovenia)", + "en_SL": "Chirungu (Sierra Leone)", + "en_SZ": "Chirungu (Swaziland)", + "en_TC": "Chirungu (Zvitsuwa zveTurk neCaico)", + "en_TK": "Chirungu (Tokelau)", + "en_TO": "Chirungu (Tonga)", + "en_TT": "Chirungu (Trinidad and Tobago)", + "en_TV": "Chirungu (Tuvalu)", + "en_TZ": "Chirungu (Tanzania)", + "en_UG": "Chirungu (Uganda)", + "en_US": "Chirungu (Amerika)", + "en_VC": "Chirungu (Saint Vincent and the Grenadines)", + "en_VG": "Chirungu (Zvitsuwa zveHingirandi)", + "en_VI": "Chirungu (Zvitsuwa zveAmerika)", + "en_VU": "Chirungu (Vanuatu)", + "en_WS": "Chirungu (Samoa)", + "en_ZA": "Chirungu (South Africa)", + "en_ZM": "Chirungu (Zambia)", + "en_ZW": "Chirungu (Zimbabwe)", + "es": "chiSpanish", + "es_AR": "chiSpanish (Ajentina)", + "es_BO": "chiSpanish (Bolivia)", + "es_BR": "chiSpanish (Brazil)", + "es_CL": "chiSpanish (Chile)", + "es_CO": "chiSpanish (Kolombia)", + "es_CR": "chiSpanish (Kostarika)", + "es_CU": "chiSpanish (Cuba)", + "es_DO": "chiSpanish (Dominican Republic)", + "es_EC": "chiSpanish (Ecuador)", + "es_ES": "chiSpanish (Spain)", + "es_GQ": "chiSpanish (Equatorial Guinea)", + "es_GT": "chiSpanish (Guatemala)", + "es_HN": "chiSpanish (Honduras)", + "es_MX": "chiSpanish (Mexico)", + "es_NI": "chiSpanish (Nicaragua)", + "es_PA": "chiSpanish (Panama)", + "es_PE": "chiSpanish (Peru)", + "es_PH": "chiSpanish (Philippines)", + "es_PR": "chiSpanish (Puerto Rico)", + "es_PY": "chiSpanish (Paraguay)", + "es_SV": "chiSpanish (El Salvador)", + "es_US": "chiSpanish (Amerika)", + "es_UY": "chiSpanish (Uruguay)", + "es_VE": "chiSpanish (Venezuela)", + "fa": "chiPeshiya", + "fa_AF": "chiPeshiya (Afuganistani)", + "fa_IR": "chiPeshiya (Iran)", + "fr": "chiFurenchi", + "fr_BE": "chiFurenchi (Beljium)", + "fr_BF": "chiFurenchi (Bukinafaso)", + "fr_BI": "chiFurenchi (Burundi)", + "fr_BJ": "chiFurenchi (Benini)", + "fr_CA": "chiFurenchi (Kanada)", + "fr_CD": "chiFurenchi (Democratic Republic of the Congo)", + "fr_CF": "chiFurenchi (Central African Republic)", + "fr_CG": "chiFurenchi (Kongo)", + "fr_CH": "chiFurenchi (Switzerland)", + "fr_CI": "chiFurenchi (Ivory Coast)", + "fr_CM": "chiFurenchi (Kameruni)", + "fr_DJ": "chiFurenchi (Djibouti)", + "fr_DZ": "chiFurenchi (Aljeria)", + "fr_FR": "chiFurenchi (France)", + "fr_GA": "chiFurenchi (Gabon)", + "fr_GF": "chiFurenchi (French Guiana)", + "fr_GN": "chiFurenchi (Guinea)", + "fr_GP": "chiFurenchi (Guadeloupe)", + "fr_GQ": "chiFurenchi (Equatorial Guinea)", + "fr_HT": "chiFurenchi (Haiti)", + "fr_KM": "chiFurenchi (Komoro)", + "fr_LU": "chiFurenchi (Luxembourg)", + "fr_MA": "chiFurenchi (Morocco)", + "fr_MC": "chiFurenchi (Monaco)", + "fr_MG": "chiFurenchi (Madagascar)", + "fr_ML": "chiFurenchi (Mali)", + "fr_MQ": "chiFurenchi (Martinique)", + "fr_MR": "chiFurenchi (Mauritania)", + "fr_MU": "chiFurenchi (Mauritius)", + "fr_NC": "chiFurenchi (New Caledonia)", + "fr_NE": "chiFurenchi (Niger)", + "fr_PF": "chiFurenchi (French Polynesia)", + "fr_PM": "chiFurenchi (Saint Pierre and Miquelon)", + "fr_RE": "chiFurenchi (Réunion)", + "fr_RW": "chiFurenchi (Rwanda)", + "fr_SC": "chiFurenchi (Seychelles)", + "fr_SN": "chiFurenchi (Senegal)", + "fr_SY": "chiFurenchi (Syria)", + "fr_TD": "chiFurenchi (Chadi)", + "fr_TG": "chiFurenchi (Togo)", + "fr_TN": "chiFurenchi (Tunisia)", + "fr_VU": "chiFurenchi (Vanuatu)", + "fr_WF": "chiFurenchi (Wallis and Futuna)", + "fr_YT": "chiFurenchi (Mayotte)", + "ha": "chiHausa", + "ha_GH": "chiHausa (Ghana)", + "ha_NE": "chiHausa (Niger)", + "ha_NG": "chiHausa (Nigeria)", + "hi": "chiHindi", + "hi_IN": "chiHindi (India)", + "hu": "chiHungari", + "hu_HU": "chiHungari (Hungary)", + "id": "chiIndonesia", + "id_ID": "chiIndonesia (Indonesia)", + "ig": "chiIgbo", + "ig_NG": "chiIgbo (Nigeria)", + "it": "chiTariana", + "it_CH": "chiTariana (Switzerland)", + "it_IT": "chiTariana (Italy)", + "it_SM": "chiTariana (San Marino)", + "ja": "chiJapani", + "ja_JP": "chiJapani (Japan)", + "km": "chiKhema", + "km_KH": "chiKhema (Kambodia)", + "ko": "chiKoria", + "ko_KP": "chiKoria (Korea, North)", + "ko_KR": "chiKoria (Korea, South)", + "ms": "chiMalay", + "ms_BN": "chiMalay (Burunei)", + "ms_MY": "chiMalay (Malaysia)", + "ms_SG": "chiMalay (Singapore)", + "my": "chiBurma", + "my_MM": "chiBurma (Myanmar)", + "ne": "chiNepali", + "ne_IN": "chiNepali (India)", + "ne_NP": "chiNepali (Nepal)", + "nl": "chiDutch", + "nl_AW": "chiDutch (Arubha)", + "nl_BE": "chiDutch (Beljium)", + "nl_NL": "chiDutch (Netherlands)", + "nl_SR": "chiDutch (Suriname)", + "pa": "chiPunjabi", + "pa_IN": "chiPunjabi (India)", + "pa_PK": "chiPunjabi (Pakistan)", + "pl": "chiPolish", + "pl_PL": "chiPolish (Poland)", + "pt": "chiPutukezi", + "pt_AO": "chiPutukezi (Angola)", + "pt_BR": "chiPutukezi (Brazil)", + "pt_CH": "chiPutukezi (Switzerland)", + "pt_CV": "chiPutukezi (Zvitsuwa zveCape Verde)", + "pt_GQ": "chiPutukezi (Equatorial Guinea)", + "pt_GW": "chiPutukezi (Guinea-Bissau)", + "pt_LU": "chiPutukezi (Luxembourg)", + "pt_MZ": "chiPutukezi (Mozambique)", + "pt_PT": "chiPutukezi (Portugal)", + "pt_ST": "chiPutukezi (São Tomé and Príncipe)", + "pt_TL": "chiPutukezi (East Timor)", + "ro": "chiRomanian", + "ro_MD": "chiRomanian (Moldova)", + "ro_RO": "chiRomanian (Romania)", + "ru": "chiRashiya", + "ru_BY": "chiRashiya (Belarusi)", + "ru_KG": "chiRashiya (Kyrgyzstan)", + "ru_KZ": "chiRashiya (Kazakhstan)", + "ru_MD": "chiRashiya (Moldova)", + "ru_RU": "chiRashiya (Russia)", + "ru_UA": "chiRashiya (Ukraine)", + "rw": "chiRwanda", + "rw_RW": "chiRwanda (Rwanda)", + "sn": "chiShona", + "sn_ZW": "chiShona (Zimbabwe)", + "so": "chiSomali", + "so_DJ": "chiSomali (Djibouti)", + "so_ET": "chiSomali (Etiopia)", + "so_KE": "chiSomali (Kenya)", + "so_SO": "chiSomali (Somalia)", + "sv": "chiSwedish", + "sv_FI": "chiSwedish (Finland)", + "sv_SE": "chiSwedish (Sweden)", + "ta": "chiTamil", + "ta_IN": "chiTamil (India)", + "ta_LK": "chiTamil (Sri Lanka)", + "ta_MY": "chiTamil (Malaysia)", + "ta_SG": "chiTamil (Singapore)", + "th": "chiThai", + "th_TH": "chiThai (Thailand)", + "tr": "chiTurkish", + "tr_CY": "chiTurkish (Cyprus)", + "tr_TR": "chiTurkish (Turkey)", + "uk": "chiUkrenia", + "uk_UA": "chiUkrenia (Ukraine)", + "ur": "chiUrdu", + "ur_IN": "chiUrdu (India)", + "ur_PK": "chiUrdu (Pakistan)", + "vi": "chiVietnam", + "vi_VN": "chiVietnam (Vietnam)", + "yo": "chiYoruba", + "yo_BJ": "chiYoruba (Benini)", + "yo_NG": "chiYoruba (Nigeria)", + "zh": "chiChinese", + "zh_CN": "chiChinese (China)", + "zh_SG": "chiChinese (Singapore)", + "zh_TW": "chiChinese (Taiwan)", + "zu": "chiZulu", + "zu_ZA": "chiZulu (South Africa)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/so.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/so.json new file mode 100644 index 0000000000000000000000000000000000000000..f541e1ca111f30a50a510cc63d39ae94540ffc24 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/so.json @@ -0,0 +1,321 @@ +{ + "Names": { + "ak": "Akan", + "ak_GH": "Akan (Gaana)", + "am": "Axmaari", + "am_ET": "Axmaari (Itoobiya)", + "ar": "Carabi", + "ar_AE": "Carabi (Imaaraadka Carabta ee Midoobay)", + "ar_BH": "Carabi (Baxreyn)", + "ar_DJ": "Carabi (Jabuuti)", + "ar_DZ": "Carabi (Aljeeriya)", + "ar_EG": "Carabi (Masar)", + "ar_ER": "Carabi (Eretereeya)", + "ar_IL": "Carabi (Israaʼiil)", + "ar_IQ": "Carabi (Ciraaq)", + "ar_JO": "Carabi (Urdun)", + "ar_KM": "Carabi (Komooros)", + "ar_KW": "Carabi (Kuwayt)", + "ar_LB": "Carabi (Lubnaan)", + "ar_LY": "Carabi (Liibiya)", + "ar_MA": "Carabi (Marooko)", + "ar_MR": "Carabi (Muritaaniya)", + "ar_OM": "Carabi (Cumaan)", + "ar_PS": "Carabi (Falastiin Daanka galbeed iyo Qasa)", + "ar_QA": "Carabi (Qadar)", + "ar_SA": "Carabi (Sacuudi Carabiya)", + "ar_SD": "Carabi (Suudaan)", + "ar_SO": "Carabi (Soomaaliya)", + "ar_SY": "Carabi (Suuriya)", + "ar_TD": "Carabi (Jaad)", + "ar_TN": "Carabi (Tuniisiya)", + "ar_YE": "Carabi (Yaman)", + "be": "Beleruusiyaan", + "be_BY": "Beleruusiyaan (Belarus)", + "bg": "Bulgeeriyaan", + "bg_BG": "Bulgeeriyaan (Bulgaariya)", + "bn": "Bangaali", + "bn_BD": "Bangaali (Bangaaladheesh)", + "bn_IN": "Bangaali (Hindiya)", + "cs": "Jeeg", + "cs_CZ": "Jeeg (Jamhuuriyadda Jek)", + "de": "Jarmal", + "de_AT": "Jarmal (Awsteriya)", + "de_BE": "Jarmal (Biljam)", + "de_CH": "Jarmal (Swiiserlaand)", + "de_DE": "Jarmal (Jarmal)", + "de_IT": "Jarmal (Talyaani)", + "de_LI": "Jarmal (Liechtenstein)", + "de_LU": "Jarmal (Luksemboorg)", + "el": "Giriik", + "el_CY": "Giriik (Qubrus)", + "el_GR": "Giriik (Giriig)", + "en": "Ingiriisi", + "en_AG": "Ingiriisi (Antigua iyo Barbuda)", + "en_AI": "Ingiriisi (Anguilla)", + "en_AS": "Ingiriisi (Samowa Ameerika)", + "en_AT": "Ingiriisi (Awsteriya)", + "en_AU": "Ingiriisi (Awstaraaliya)", + "en_BB": "Ingiriisi (Baarbadoos)", + "en_BE": "Ingiriisi (Biljam)", + "en_BI": "Ingiriisi (Burundi)", + "en_BM": "Ingiriisi (Bermuuda)", + "en_BS": "Ingiriisi (Bahaamas)", + "en_BW": "Ingiriisi (Botuswaana)", + "en_BZ": "Ingiriisi (Belize)", + "en_CA": "Ingiriisi (Kanada)", + "en_CH": "Ingiriisi (Swiiserlaand)", + "en_CK": "Ingiriisi (Jaziiradda Cook)", + "en_CM": "Ingiriisi (Kaameruun)", + "en_CY": "Ingiriisi (Qubrus)", + "en_DE": "Ingiriisi (Jarmal)", + "en_DK": "Ingiriisi (Denmark)", + "en_DM": "Ingiriisi (Domeenika)", + "en_ER": "Ingiriisi (Eretereeya)", + "en_FI": "Ingiriisi (Finland)", + "en_FJ": "Ingiriisi (Fiji)", + "en_FK": "Ingiriisi (Jaziiradaha Fooklaan)", + "en_FM": "Ingiriisi (Micronesia)", + "en_GB": "Ingiriisi (United Kingdom)", + "en_GD": "Ingiriisi (Giriinaada)", + "en_GH": "Ingiriisi (Gaana)", + "en_GI": "Ingiriisi (Gibraltar)", + "en_GM": "Ingiriisi (Gambiya)", + "en_GU": "Ingiriisi (Guam)", + "en_GY": "Ingiriisi (Guyana)", + "en_IE": "Ingiriisi (Ayrlaand)", + "en_IL": "Ingiriisi (Israaʼiil)", + "en_IN": "Ingiriisi (Hindiya)", + "en_IO": "Ingiriisi (British Indian Ocean Territory)", + "en_JM": "Ingiriisi (Jameyka)", + "en_KE": "Ingiriisi (Kiiniya)", + "en_KI": "Ingiriisi (Kiribati)", + "en_KN": "Ingiriisi (Saint Kitts and Nevis)", + "en_KY": "Ingiriisi (Cayman Islands)", + "en_LC": "Ingiriisi (Saint Lucia)", + "en_LR": "Ingiriisi (Laybeeriya)", + "en_LS": "Ingiriisi (Losooto)", + "en_MG": "Ingiriisi (Madagaskar)", + "en_MH": "Ingiriisi (Marshall Islands)", + "en_MP": "Ingiriisi (Northern Mariana Islands)", + "en_MS": "Ingiriisi (Montserrat)", + "en_MT": "Ingiriisi (Maalda)", + "en_MU": "Ingiriisi (Murishiyoos)", + "en_MW": "Ingiriisi (Malaawi)", + "en_MY": "Ingiriisi (Malaysia)", + "en_NA": "Ingiriisi (Namiibiya)", + "en_NF": "Ingiriisi (Norfolk Island)", + "en_NG": "Ingiriisi (Nayjeeriya)", + "en_NL": "Ingiriisi (Netherlands)", + "en_NR": "Ingiriisi (Nauru)", + "en_NU": "Ingiriisi (Niue)", + "en_NZ": "Ingiriisi (Neyuusilaand)", + "en_PG": "Ingiriisi (Papua New Guinea)", + "en_PH": "Ingiriisi (Filibiin)", + "en_PK": "Ingiriisi (Bakistaan)", + "en_PN": "Ingiriisi (Pitcairn)", + "en_PR": "Ingiriisi (Puerto Rico)", + "en_PW": "Ingiriisi (Palau)", + "en_RW": "Ingiriisi (Ruwanda)", + "en_SB": "Ingiriisi (Solomon Islands)", + "en_SC": "Ingiriisi (Sishelis)", + "en_SD": "Ingiriisi (Suudaan)", + "en_SE": "Ingiriisi (Iswidhan)", + "en_SG": "Ingiriisi (Singaboor)", + "en_SH": "Ingiriisi (Saint Helena)", + "en_SI": "Ingiriisi (Slovenia)", + "en_SL": "Ingiriisi (Siraaliyoon)", + "en_SZ": "Ingiriisi (Iswaasilaand)", + "en_TC": "Ingiriisi (Turks and Caicos Islands)", + "en_TK": "Ingiriisi (Tokelau)", + "en_TO": "Ingiriisi (Tonga)", + "en_TT": "Ingiriisi (Trinidad and Tobago)", + "en_TV": "Ingiriisi (Tuvalu)", + "en_TZ": "Ingiriisi (Tansaaniya)", + "en_UG": "Ingiriisi (Ugaanda)", + "en_US": "Ingiriisi (Maraykanka)", + "en_VC": "Ingiriisi (Saint Vincent and the Grenadines)", + "en_VG": "Ingiriisi (British Virgin Islands)", + "en_VI": "Ingiriisi (U.S. Virgin Islands)", + "en_VU": "Ingiriisi (Vanuatu)", + "en_WS": "Ingiriisi (Samoa)", + "en_ZA": "Ingiriisi (Koonfur Afrika)", + "en_ZM": "Ingiriisi (Saambiya)", + "en_ZW": "Ingiriisi (Simbaabwe)", + "es": "Isbaanish", + "es_AR": "Isbaanish (Arjantiin)", + "es_BO": "Isbaanish (Boliifiya)", + "es_BR": "Isbaanish (Braasiil)", + "es_CL": "Isbaanish (Jili)", + "es_CO": "Isbaanish (Kolombiya)", + "es_CR": "Isbaanish (Kosta Riika)", + "es_CU": "Isbaanish (Kuuba)", + "es_DO": "Isbaanish (Jamhuuriyadda Domeenika)", + "es_EC": "Isbaanish (Ikuwadoor)", + "es_ES": "Isbaanish (Isbeyn)", + "es_GQ": "Isbaanish (Equatorial Guinea)", + "es_GT": "Isbaanish (Guwaatamaala)", + "es_HN": "Isbaanish (Honduras)", + "es_MX": "Isbaanish (Meksiko)", + "es_NI": "Isbaanish (Nikaraaguwa)", + "es_PA": "Isbaanish (Panama)", + "es_PE": "Isbaanish (Peru)", + "es_PH": "Isbaanish (Filibiin)", + "es_PR": "Isbaanish (Puerto Rico)", + "es_PY": "Isbaanish (Paraguay)", + "es_SV": "Isbaanish (El Salvador)", + "es_US": "Isbaanish (Maraykanka)", + "es_UY": "Isbaanish (Uruguwaay)", + "es_VE": "Isbaanish (Fenisuweela)", + "fa": "Faarisi", + "fa_AF": "Faarisi (Afgaanistaan)", + "fa_IR": "Faarisi (Iiraan)", + "fr": "Faransiis", + "fr_BE": "Faransiis (Biljam)", + "fr_BF": "Faransiis (Burkiina Faaso)", + "fr_BI": "Faransiis (Burundi)", + "fr_BJ": "Faransiis (Biniin)", + "fr_CA": "Faransiis (Kanada)", + "fr_CD": "Faransiis (Jamhuuriyadda Dimuquraadiga Kongo)", + "fr_CF": "Faransiis (Jamhuuriyadda Afrikada Dhexe)", + "fr_CG": "Faransiis (Kongo)", + "fr_CH": "Faransiis (Swiiserlaand)", + "fr_CI": "Faransiis (Ivory coast)", + "fr_CM": "Faransiis (Kaameruun)", + "fr_DJ": "Faransiis (Jabuuti)", + "fr_DZ": "Faransiis (Aljeeriya)", + "fr_FR": "Faransiis (Faransiis)", + "fr_GA": "Faransiis (Gaaboon)", + "fr_GF": "Faransiis (French Guiana)", + "fr_GN": "Faransiis (Gini)", + "fr_GP": "Faransiis (Guadeloupe)", + "fr_GQ": "Faransiis (Equatorial Guinea)", + "fr_HT": "Faransiis (Hayti)", + "fr_KM": "Faransiis (Komooros)", + "fr_LU": "Faransiis (Luksemboorg)", + "fr_MA": "Faransiis (Marooko)", + "fr_MC": "Faransiis (Moonako)", + "fr_MG": "Faransiis (Madagaskar)", + "fr_ML": "Faransiis (Maali)", + "fr_MQ": "Faransiis (Martinique)", + "fr_MR": "Faransiis (Muritaaniya)", + "fr_MU": "Faransiis (Murishiyoos)", + "fr_NC": "Faransiis (New Caledonia)", + "fr_NE": "Faransiis (Nayjer)", + "fr_PF": "Faransiis (French Polynesia)", + "fr_PM": "Faransiis (Saint Pierre and Miquelon)", + "fr_RE": "Faransiis (Réunion)", + "fr_RW": "Faransiis (Ruwanda)", + "fr_SC": "Faransiis (Sishelis)", + "fr_SN": "Faransiis (Sinigaal)", + "fr_SY": "Faransiis (Suuriya)", + "fr_TD": "Faransiis (Jaad)", + "fr_TG": "Faransiis (Toogo)", + "fr_TN": "Faransiis (Tuniisiya)", + "fr_VU": "Faransiis (Vanuatu)", + "fr_WF": "Faransiis (Wallis and Futuna)", + "fr_YT": "Faransiis (Mayotte)", + "fy": "Firiisiyan Galbeed", + "fy_NL": "Firiisiyan Galbeed (Netherlands)", + "ha": "Hawsa", + "ha_GH": "Hawsa (Gaana)", + "ha_NE": "Hawsa (Nayjer)", + "ha_NG": "Hawsa (Nayjeeriya)", + "hi": "Hindi", + "hi_IN": "Hindi (Hindiya)", + "hu": "Hangariyaan", + "hu_HU": "Hangariyaan (Hangeri)", + "id": "Indunuusiyaan", + "id_ID": "Indunuusiyaan (Indoneesiya)", + "ig": "Igbo", + "ig_NG": "Igbo (Nayjeeriya)", + "it": "Talyaani", + "it_CH": "Talyaani (Swiiserlaand)", + "it_IT": "Talyaani (Talyaani)", + "it_SM": "Talyaani (San Marino)", + "ja": "Jabbaaniis", + "ja_JP": "Jabbaaniis (Jabaan)", + "km": "Kamboodhian", + "km_KH": "Kamboodhian (Kamboodiya)", + "ko": "Kuuriyaan", + "ko_KP": "Kuuriyaan (Kuuriyada Waqooyi)", + "ko_KR": "Kuuriyaan (Kuuriyada Koonfureed)", + "ms": "Malaay", + "ms_BN": "Malaay (Buruneeya)", + "ms_MY": "Malaay (Malaysia)", + "ms_SG": "Malaay (Singaboor)", + "my": "Burmese", + "my_MM": "Burmese (Miyanmar)", + "ne": "Nebaali", + "ne_IN": "Nebaali (Hindiya)", + "ne_NP": "Nebaali (Nebaal)", + "nl": "Holandays", + "nl_AW": "Holandays (Aruba)", + "nl_BE": "Holandays (Biljam)", + "nl_NL": "Holandays (Netherlands)", + "nl_SR": "Holandays (Suriname)", + "pa": "Bunjaabi", + "pa_IN": "Bunjaabi (Hindiya)", + "pa_PK": "Bunjaabi (Bakistaan)", + "pl": "Boolish", + "pl_PL": "Boolish (Booland)", + "pt": "Boortaqiis", + "pt_AO": "Boortaqiis (Angoola)", + "pt_BR": "Boortaqiis (Braasiil)", + "pt_CH": "Boortaqiis (Swiiserlaand)", + "pt_CV": "Boortaqiis (Cape Verde Islands)", + "pt_GQ": "Boortaqiis (Equatorial Guinea)", + "pt_GW": "Boortaqiis (Gini-Bisaaw)", + "pt_LU": "Boortaqiis (Luksemboorg)", + "pt_MZ": "Boortaqiis (Musambiig)", + "pt_PT": "Boortaqiis (Bortuqaal)", + "pt_ST": "Boortaqiis (São Tomé and Príncipe)", + "pt_TL": "Boortaqiis (Timorka bari)", + "ro": "Romanka", + "ro_MD": "Romanka (Moldofa)", + "ro_RO": "Romanka (Rumaaniya)", + "ru": "Ruush", + "ru_BY": "Ruush (Belarus)", + "ru_KG": "Ruush (Kirgistaan)", + "ru_KZ": "Ruush (Kasaakhistaan)", + "ru_MD": "Ruush (Moldofa)", + "ru_RU": "Ruush (Ruush)", + "ru_UA": "Ruush (Ukrayn)", + "rw": "Rwanda", + "rw_RW": "Rwanda (Ruwanda)", + "so": "Soomaali", + "so_DJ": "Soomaali (Jabuuti)", + "so_ET": "Soomaali (Itoobiya)", + "so_KE": "Soomaali (Kiiniya)", + "so_SO": "Soomaali (Soomaaliya)", + "sv": "Swiidhis", + "sv_FI": "Swiidhis (Finland)", + "sv_SE": "Swiidhis (Iswidhan)", + "ta": "Tamiil", + "ta_IN": "Tamiil (Hindiya)", + "ta_LK": "Tamiil (Sirilaanka)", + "ta_MY": "Tamiil (Malaysia)", + "ta_SG": "Tamiil (Singaboor)", + "th": "Taaylandays", + "th_TH": "Taaylandays (Taylaand)", + "tr": "Turkish", + "tr_CY": "Turkish (Qubrus)", + "tr_TR": "Turkish (Turki)", + "uk": "Yukreeniyaan", + "uk_UA": "Yukreeniyaan (Ukrayn)", + "ur": "Urduu", + "ur_IN": "Urduu (Hindiya)", + "ur_PK": "Urduu (Bakistaan)", + "vi": "Fiitnaamays", + "vi_VN": "Fiitnaamays (Fiyetnaam)", + "yo": "Yoruuba", + "yo_BJ": "Yoruuba (Biniin)", + "yo_NG": "Yoruuba (Nayjeeriya)", + "zh": "Jayniis", + "zh_CN": "Jayniis (Shiinaha)", + "zh_SG": "Jayniis (Singaboor)", + "zh_TW": "Jayniis (Taywaan)", + "zu": "Zuulu", + "zu_ZA": "Zuulu (Koonfur Afrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sq.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sq.json new file mode 100644 index 0000000000000000000000000000000000000000..e7054787755fd09c13a619734037c79be00ce32c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sq.json @@ -0,0 +1,566 @@ +{ + "Names": { + "af": "afrikanisht", + "af_NA": "afrikanisht (Namibi)", + "af_ZA": "afrikanisht (Afrika e Jugut)", + "ak": "akanisht", + "ak_GH": "akanisht (Ganë)", + "am": "amarisht", + "am_ET": "amarisht (Etiopi)", + "ar": "arabisht", + "ar_AE": "arabisht (Emiratet e Bashkuara Arabe)", + "ar_BH": "arabisht (Bahrejn)", + "ar_DJ": "arabisht (Xhibuti)", + "ar_DZ": "arabisht (Algjeri)", + "ar_EG": "arabisht (Egjipt)", + "ar_EH": "arabisht (Saharaja Perëndimore)", + "ar_ER": "arabisht (Eritre)", + "ar_IL": "arabisht (Izrael)", + "ar_IQ": "arabisht (Irak)", + "ar_JO": "arabisht (Jordani)", + "ar_KM": "arabisht (Komore)", + "ar_KW": "arabisht (Kuvajt)", + "ar_LB": "arabisht (Liban)", + "ar_LY": "arabisht (Libi)", + "ar_MA": "arabisht (Marok)", + "ar_MR": "arabisht (Mauritani)", + "ar_OM": "arabisht (Oman)", + "ar_PS": "arabisht (Territoret Palestineze)", + "ar_QA": "arabisht (Katar)", + "ar_SA": "arabisht (Arabia Saudite)", + "ar_SD": "arabisht (Sudan)", + "ar_SO": "arabisht (Somali)", + "ar_SS": "arabisht (Sudani i Jugut)", + "ar_SY": "arabisht (Siri)", + "ar_TD": "arabisht (Çad)", + "ar_TN": "arabisht (Tunizi)", + "ar_YE": "arabisht (Jemen)", + "as": "asamezisht", + "as_IN": "asamezisht (Indi)", + "az": "azerbajxhanisht", + "az_AZ": "azerbajxhanisht (Azerbajxhan)", + "az_Cyrl": "azerbajxhanisht (cirilik)", + "az_Cyrl_AZ": "azerbajxhanisht (cirilik, Azerbajxhan)", + "az_Latn": "azerbajxhanisht (latin)", + "az_Latn_AZ": "azerbajxhanisht (latin, Azerbajxhan)", + "be": "bjellorusisht", + "be_BY": "bjellorusisht (Bjellorusi)", + "bg": "bullgarisht", + "bg_BG": "bullgarisht (Bullgari)", + "bm": "bambarisht", + "bm_ML": "bambarisht (Mali)", + "bn": "bengalisht", + "bn_BD": "bengalisht (Bangladesh)", + "bn_IN": "bengalisht (Indi)", + "bo": "tibetisht", + "bo_CN": "tibetisht (Kinë)", + "bo_IN": "tibetisht (Indi)", + "br": "bretonisht", + "br_FR": "bretonisht (Francë)", + "bs": "boshnjakisht", + "bs_BA": "boshnjakisht (Bosnjë-Hercegovinë)", + "bs_Cyrl": "boshnjakisht (cirilik)", + "bs_Cyrl_BA": "boshnjakisht (cirilik, Bosnjë-Hercegovinë)", + "bs_Latn": "boshnjakisht (latin)", + "bs_Latn_BA": "boshnjakisht (latin, Bosnjë-Hercegovinë)", + "ca": "katalonisht", + "ca_AD": "katalonisht (Andorrë)", + "ca_ES": "katalonisht (Spanjë)", + "ca_FR": "katalonisht (Francë)", + "ca_IT": "katalonisht (Itali)", + "ce": "çeçenisht", + "ce_RU": "çeçenisht (Rusi)", + "cs": "çekisht", + "cs_CZ": "çekisht (Republika Çeke)", + "cy": "uellsisht", + "cy_GB": "uellsisht (Mbretëria e Bashkuar)", + "da": "danisht", + "da_DK": "danisht (Danimarkë)", + "da_GL": "danisht (Grenlandë)", + "de": "gjermanisht", + "de_AT": "gjermanisht (Austri)", + "de_BE": "gjermanisht (Belgjikë)", + "de_CH": "gjermanisht (Zvicër)", + "de_DE": "gjermanisht (Gjermani)", + "de_IT": "gjermanisht (Itali)", + "de_LI": "gjermanisht (Lihtenshtajn)", + "de_LU": "gjermanisht (Luksemburg)", + "dz": "xhongaisht", + "dz_BT": "xhongaisht (Butan)", + "ee": "eveisht", + "ee_GH": "eveisht (Ganë)", + "ee_TG": "eveisht (Togo)", + "el": "greqisht", + "el_CY": "greqisht (Qipro)", + "el_GR": "greqisht (Greqi)", + "en": "anglisht", + "en_AG": "anglisht (Antigua e Barbuda)", + "en_AI": "anglisht (Anguilë)", + "en_AS": "anglisht (Samoa Amerikane)", + "en_AT": "anglisht (Austri)", + "en_AU": "anglisht (Australi)", + "en_BB": "anglisht (Barbados)", + "en_BE": "anglisht (Belgjikë)", + "en_BI": "anglisht (Burundi)", + "en_BM": "anglisht (Bermudë)", + "en_BS": "anglisht (Bahamas)", + "en_BW": "anglisht (Botsvanë)", + "en_BZ": "anglisht (Belizë)", + "en_CA": "anglisht (Kanada)", + "en_CC": "anglisht (Ishujt Kokos)", + "en_CH": "anglisht (Zvicër)", + "en_CK": "anglisht (Ishujt Kuk)", + "en_CM": "anglisht (Kamerun)", + "en_CX": "anglisht (Ishulli i Krishtlindjes)", + "en_CY": "anglisht (Qipro)", + "en_DE": "anglisht (Gjermani)", + "en_DG": "anglisht (Diego-Garsia)", + "en_DK": "anglisht (Danimarkë)", + "en_DM": "anglisht (Dominikë)", + "en_ER": "anglisht (Eritre)", + "en_FI": "anglisht (Finlandë)", + "en_FJ": "anglisht (Fixhi)", + "en_FK": "anglisht (Ishujt Falkland)", + "en_FM": "anglisht (Mikronezi)", + "en_GB": "anglisht (Mbretëria e Bashkuar)", + "en_GD": "anglisht (Grenadë)", + "en_GG": "anglisht (Gernsej)", + "en_GH": "anglisht (Ganë)", + "en_GI": "anglisht (Gjibraltar)", + "en_GM": "anglisht (Gambia)", + "en_GU": "anglisht (Guam)", + "en_GY": "anglisht (Guajanë)", + "en_HK": "anglisht (RVAK i Hong Kongut)", + "en_IE": "anglisht (Irlandë)", + "en_IL": "anglisht (Izrael)", + "en_IM": "anglisht (Ishulli i Manit)", + "en_IN": "anglisht (Indi)", + "en_IO": "anglisht (Territori Britanik i Oqeanit Indian)", + "en_JE": "anglisht (Xhersej)", + "en_JM": "anglisht (Xhamajkë)", + "en_KE": "anglisht (Kenia)", + "en_KI": "anglisht (Kiribati)", + "en_KN": "anglisht (Shën Kits dhe Nevis)", + "en_KY": "anglisht (Ishujt Kajman)", + "en_LC": "anglisht (Shën-Luçia)", + "en_LR": "anglisht (Liberi)", + "en_LS": "anglisht (Lesoto)", + "en_MG": "anglisht (Madagaskar)", + "en_MH": "anglisht (Ishujt Marshall)", + "en_MO": "anglisht (RVAK i Makaos)", + "en_MP": "anglisht (Ishujt e Marianës Veriore)", + "en_MS": "anglisht (Montserat)", + "en_MT": "anglisht (Maltë)", + "en_MU": "anglisht (Mauritius)", + "en_MW": "anglisht (Malavi)", + "en_MY": "anglisht (Malajzi)", + "en_NA": "anglisht (Namibi)", + "en_NF": "anglisht (Ishulli Norfolk)", + "en_NG": "anglisht (Nigeri)", + "en_NL": "anglisht (Holandë)", + "en_NR": "anglisht (Nauru)", + "en_NU": "anglisht (Niue)", + "en_NZ": "anglisht (Zelandë e Re)", + "en_PG": "anglisht (Papua Guineja e Re)", + "en_PH": "anglisht (Filipine)", + "en_PK": "anglisht (Pakistan)", + "en_PN": "anglisht (Ishujt Pitkern)", + "en_PR": "anglisht (Porto-Riko)", + "en_PW": "anglisht (Palau)", + "en_RW": "anglisht (Ruandë)", + "en_SB": "anglisht (Ishujt Solomon)", + "en_SC": "anglisht (Sejshelle)", + "en_SD": "anglisht (Sudan)", + "en_SE": "anglisht (Suedi)", + "en_SG": "anglisht (Singapor)", + "en_SH": "anglisht (Shën-Helenë)", + "en_SI": "anglisht (Slloveni)", + "en_SL": "anglisht (Siera-Leone)", + "en_SS": "anglisht (Sudani i Jugut)", + "en_SX": "anglisht (Sint Marten)", + "en_SZ": "anglisht (Svazilandë)", + "en_TC": "anglisht (Ishujt Turks dhe Kaikos)", + "en_TK": "anglisht (Tokelau)", + "en_TO": "anglisht (Tonga)", + "en_TT": "anglisht (Trinidad e Tobago)", + "en_TV": "anglisht (Tuvalu)", + "en_TZ": "anglisht (Tanzani)", + "en_UG": "anglisht (Ugandë)", + "en_UM": "anglisht (Ishujt periferikë të SHBA-së)", + "en_US": "anglisht (Shtetet e Bashkuara të Amerikës)", + "en_VC": "anglisht (Shën Vincent dhe Grenadine)", + "en_VG": "anglisht (Ishujt e Virgjër Britanikë)", + "en_VI": "anglisht (Ishujt e Virgjër Amerikanë)", + "en_VU": "anglisht (Vanuatu)", + "en_WS": "anglisht (Samoa)", + "en_ZA": "anglisht (Afrika e Jugut)", + "en_ZM": "anglisht (Zambia)", + "en_ZW": "anglisht (Zimbabve)", + "eo": "esperanto", + "es": "spanjisht", + "es_AR": "spanjisht (Argjentinë)", + "es_BO": "spanjisht (Bolivi)", + "es_BR": "spanjisht (Brazil)", + "es_CL": "spanjisht (Kili)", + "es_CO": "spanjisht (Kolumbi)", + "es_CR": "spanjisht (Kosta-Rikë)", + "es_CU": "spanjisht (Kubë)", + "es_DO": "spanjisht (Republika Dominikane)", + "es_EA": "spanjisht (Theuta e Melila)", + "es_EC": "spanjisht (Ekuador)", + "es_ES": "spanjisht (Spanjë)", + "es_GQ": "spanjisht (Guineja Ekuatoriale)", + "es_GT": "spanjisht (Guatemalë)", + "es_HN": "spanjisht (Honduras)", + "es_IC": "spanjisht (Ishujt Kanarie)", + "es_MX": "spanjisht (Meksikë)", + "es_NI": "spanjisht (Nikaragua)", + "es_PA": "spanjisht (Panama)", + "es_PE": "spanjisht (Peru)", + "es_PH": "spanjisht (Filipine)", + "es_PR": "spanjisht (Porto-Riko)", + "es_PY": "spanjisht (Paraguai)", + "es_SV": "spanjisht (Salvador)", + "es_US": "spanjisht (Shtetet e Bashkuara të Amerikës)", + "es_UY": "spanjisht (Uruguai)", + "es_VE": "spanjisht (Venezuelë)", + "et": "estonisht", + "et_EE": "estonisht (Estoni)", + "eu": "baskisht", + "eu_ES": "baskisht (Spanjë)", + "fa": "persisht", + "fa_AF": "persisht (Afganistan)", + "fa_IR": "persisht (Iran)", + "ff": "fulaisht", + "ff_CM": "fulaisht (Kamerun)", + "ff_GN": "fulaisht (Guine)", + "ff_MR": "fulaisht (Mauritani)", + "ff_SN": "fulaisht (Senegal)", + "fi": "finlandisht", + "fi_FI": "finlandisht (Finlandë)", + "fo": "faroisht", + "fo_DK": "faroisht (Danimarkë)", + "fo_FO": "faroisht (Ishujt Faroe)", + "fr": "frëngjisht", + "fr_BE": "frëngjisht (Belgjikë)", + "fr_BF": "frëngjisht (Burkina-Faso)", + "fr_BI": "frëngjisht (Burundi)", + "fr_BJ": "frëngjisht (Benin)", + "fr_BL": "frëngjisht (Shën Bartolomeu)", + "fr_CA": "frëngjisht (Kanada)", + "fr_CD": "frëngjisht (Kongo-Kinshasa)", + "fr_CF": "frëngjisht (Repubika e Afrikës Qendrore)", + "fr_CG": "frëngjisht (Kongo-Brazavilë)", + "fr_CH": "frëngjisht (Zvicër)", + "fr_CI": "frëngjisht (Côte d’Ivoire)", + "fr_CM": "frëngjisht (Kamerun)", + "fr_DJ": "frëngjisht (Xhibuti)", + "fr_DZ": "frëngjisht (Algjeri)", + "fr_FR": "frëngjisht (Francë)", + "fr_GA": "frëngjisht (Gabon)", + "fr_GF": "frëngjisht (Guajana Franceze)", + "fr_GN": "frëngjisht (Guine)", + "fr_GP": "frëngjisht (Guadalupe)", + "fr_GQ": "frëngjisht (Guineja Ekuatoriale)", + "fr_HT": "frëngjisht (Haiti)", + "fr_KM": "frëngjisht (Komore)", + "fr_LU": "frëngjisht (Luksemburg)", + "fr_MA": "frëngjisht (Marok)", + "fr_MC": "frëngjisht (Monako)", + "fr_MF": "frëngjisht (Shën-Martin)", + "fr_MG": "frëngjisht (Madagaskar)", + "fr_ML": "frëngjisht (Mali)", + "fr_MQ": "frëngjisht (Martinikë)", + "fr_MR": "frëngjisht (Mauritani)", + "fr_MU": "frëngjisht (Mauritius)", + "fr_NC": "frëngjisht (Kaledonia e Re)", + "fr_NE": "frëngjisht (Niger)", + "fr_PF": "frëngjisht (Polinezia Franceze)", + "fr_PM": "frëngjisht (Shën Pier dhe Mikelon)", + "fr_RE": "frëngjisht (Reunion)", + "fr_RW": "frëngjisht (Ruandë)", + "fr_SC": "frëngjisht (Sejshelle)", + "fr_SN": "frëngjisht (Senegal)", + "fr_SY": "frëngjisht (Siri)", + "fr_TD": "frëngjisht (Çad)", + "fr_TG": "frëngjisht (Togo)", + "fr_TN": "frëngjisht (Tunizi)", + "fr_VU": "frëngjisht (Vanuatu)", + "fr_WF": "frëngjisht (Uollis e Futuna)", + "fr_YT": "frëngjisht (Majotë)", + "fy": "frizianishte perëndimore", + "fy_NL": "frizianishte perëndimore (Holandë)", + "ga": "irlandisht", + "ga_IE": "irlandisht (Irlandë)", + "gd": "galishte skoceze", + "gd_GB": "galishte skoceze (Mbretëria e Bashkuar)", + "gl": "galicisht", + "gl_ES": "galicisht (Spanjë)", + "gu": "guxharatisht", + "gu_IN": "guxharatisht (Indi)", + "gv": "manksisht", + "gv_IM": "manksisht (Ishulli i Manit)", + "ha": "hausisht", + "ha_GH": "hausisht (Ganë)", + "ha_NE": "hausisht (Niger)", + "ha_NG": "hausisht (Nigeri)", + "he": "hebraisht", + "he_IL": "hebraisht (Izrael)", + "hi": "indisht", + "hi_IN": "indisht (Indi)", + "hr": "kroatisht", + "hr_BA": "kroatisht (Bosnjë-Hercegovinë)", + "hr_HR": "kroatisht (Kroaci)", + "hu": "hungarisht", + "hu_HU": "hungarisht (Hungari)", + "hy": "armenisht", + "hy_AM": "armenisht (Armeni)", + "id": "indonezisht", + "id_ID": "indonezisht (Indonezi)", + "ig": "igboisht", + "ig_NG": "igboisht (Nigeri)", + "ii": "sishuanisht", + "ii_CN": "sishuanisht (Kinë)", + "is": "islandisht", + "is_IS": "islandisht (Islandë)", + "it": "italisht", + "it_CH": "italisht (Zvicër)", + "it_IT": "italisht (Itali)", + "it_SM": "italisht (San-Marino)", + "ja": "japonisht", + "ja_JP": "japonisht (Japoni)", + "ka": "gjeorgjisht", + "ka_GE": "gjeorgjisht (Gjeorgji)", + "ki": "kikujuisht", + "ki_KE": "kikujuisht (Kenia)", + "kk": "kazakisht", + "kk_KZ": "kazakisht (Kazakistan)", + "kl": "kalalisutisht", + "kl_GL": "kalalisutisht (Grenlandë)", + "km": "kmerisht", + "km_KH": "kmerisht (Kamboxhia)", + "kn": "kanadisht", + "kn_IN": "kanadisht (Indi)", + "ko": "koreanisht", + "ko_KP": "koreanisht (Koreja e Veriut)", + "ko_KR": "koreanisht (Koreja e Jugut)", + "ks": "kashmirisht", + "ks_IN": "kashmirisht (Indi)", + "kw": "kornisht", + "kw_GB": "kornisht (Mbretëria e Bashkuar)", + "ky": "kirgizisht", + "ky_KG": "kirgizisht (Kirgistan)", + "lb": "luksemburgisht", + "lb_LU": "luksemburgisht (Luksemburg)", + "lg": "gandaisht", + "lg_UG": "gandaisht (Ugandë)", + "ln": "lingalisht", + "ln_AO": "lingalisht (Angolë)", + "ln_CD": "lingalisht (Kongo-Kinshasa)", + "ln_CF": "lingalisht (Repubika e Afrikës Qendrore)", + "ln_CG": "lingalisht (Kongo-Brazavilë)", + "lo": "laosisht", + "lo_LA": "laosisht (Laos)", + "lt": "lituanisht", + "lt_LT": "lituanisht (Lituani)", + "lu": "luba-katangaisht", + "lu_CD": "luba-katangaisht (Kongo-Kinshasa)", + "lv": "letonisht", + "lv_LV": "letonisht (Letoni)", + "mg": "malagezisht", + "mg_MG": "malagezisht (Madagaskar)", + "mk": "maqedonisht", + "mk_MK": "maqedonisht (Maqedoni)", + "ml": "malajalamisht", + "ml_IN": "malajalamisht (Indi)", + "mn": "mongolisht", + "mn_MN": "mongolisht (Mongoli)", + "mr": "maratisht", + "mr_IN": "maratisht (Indi)", + "ms": "malajisht", + "ms_BN": "malajisht (Brunei)", + "ms_MY": "malajisht (Malajzi)", + "ms_SG": "malajisht (Singapor)", + "mt": "maltisht", + "mt_MT": "maltisht (Maltë)", + "my": "birmanisht", + "my_MM": "birmanisht (Mianmar (Burma))", + "nb": "norvegjishte letrare", + "nb_NO": "norvegjishte letrare (Norvegji)", + "nb_SJ": "norvegjishte letrare (Svalbard e Jan-Majen)", + "nd": "ndebelishte veriore", + "nd_ZW": "ndebelishte veriore (Zimbabve)", + "ne": "nepalisht", + "ne_IN": "nepalisht (Indi)", + "ne_NP": "nepalisht (Nepal)", + "nl": "holandisht", + "nl_AW": "holandisht (Arubë)", + "nl_BE": "holandisht (Belgjikë)", + "nl_BQ": "holandisht (Karaibet holandeze)", + "nl_CW": "holandisht (Kuraçao)", + "nl_NL": "holandisht (Holandë)", + "nl_SR": "holandisht (Surinami)", + "nl_SX": "holandisht (Sint Marten)", + "nn": "norvegjishte nynorsk", + "nn_NO": "norvegjishte nynorsk (Norvegji)", + "no": "norvegjisht", + "no_NO": "norvegjisht (Norvegji)", + "om": "oromoisht", + "om_ET": "oromoisht (Etiopi)", + "om_KE": "oromoisht (Kenia)", + "or": "odisht", + "or_IN": "odisht (Indi)", + "os": "osetisht", + "os_GE": "osetisht (Gjeorgji)", + "os_RU": "osetisht (Rusi)", + "pa": "panxhabisht", + "pa_Arab": "panxhabisht (arabik)", + "pa_Arab_PK": "panxhabisht (arabik, Pakistan)", + "pa_Guru": "panxhabisht (gurmuk)", + "pa_Guru_IN": "panxhabisht (gurmuk, Indi)", + "pa_IN": "panxhabisht (Indi)", + "pa_PK": "panxhabisht (Pakistan)", + "pl": "polonisht", + "pl_PL": "polonisht (Poloni)", + "ps": "pashtoisht", + "ps_AF": "pashtoisht (Afganistan)", + "pt": "portugalisht", + "pt_AO": "portugalisht (Angolë)", + "pt_BR": "portugalisht (Brazil)", + "pt_CH": "portugalisht (Zvicër)", + "pt_CV": "portugalisht (Kepi i Gjelbër)", + "pt_GQ": "portugalisht (Guineja Ekuatoriale)", + "pt_GW": "portugalisht (Guine-Bisau)", + "pt_LU": "portugalisht (Luksemburg)", + "pt_MO": "portugalisht (RVAK i Makaos)", + "pt_MZ": "portugalisht (Mozambik)", + "pt_PT": "portugalisht (Portugali)", + "pt_ST": "portugalisht (Sao-Tome e Prinsipe)", + "pt_TL": "portugalisht (Timor-Leste)", + "qu": "keçuaisht", + "qu_BO": "keçuaisht (Bolivi)", + "qu_EC": "keçuaisht (Ekuador)", + "qu_PE": "keçuaisht (Peru)", + "rm": "retoromanisht", + "rm_CH": "retoromanisht (Zvicër)", + "rn": "rundisht", + "rn_BI": "rundisht (Burundi)", + "ro": "rumanisht", + "ro_MD": "rumanisht (Moldavi)", + "ro_RO": "rumanisht (Rumani)", + "ru": "rusisht", + "ru_BY": "rusisht (Bjellorusi)", + "ru_KG": "rusisht (Kirgistan)", + "ru_KZ": "rusisht (Kazakistan)", + "ru_MD": "rusisht (Moldavi)", + "ru_RU": "rusisht (Rusi)", + "ru_UA": "rusisht (Ukrainë)", + "rw": "kiniaruandisht", + "rw_RW": "kiniaruandisht (Ruandë)", + "se": "samishte veriore", + "se_FI": "samishte veriore (Finlandë)", + "se_NO": "samishte veriore (Norvegji)", + "se_SE": "samishte veriore (Suedi)", + "sg": "sangoisht", + "sg_CF": "sangoisht (Repubika e Afrikës Qendrore)", + "sh": "serbo-kroatisht", + "sh_BA": "serbo-kroatisht (Bosnjë-Hercegovinë)", + "si": "sinhalisht", + "si_LK": "sinhalisht (Sri-Lankë)", + "sk": "sllovakisht", + "sk_SK": "sllovakisht (Sllovaki)", + "sl": "sllovenisht", + "sl_SI": "sllovenisht (Slloveni)", + "sn": "shonisht", + "sn_ZW": "shonisht (Zimbabve)", + "so": "somalisht", + "so_DJ": "somalisht (Xhibuti)", + "so_ET": "somalisht (Etiopi)", + "so_KE": "somalisht (Kenia)", + "so_SO": "somalisht (Somali)", + "sq": "shqip", + "sq_AL": "shqip (Shqipëri)", + "sq_MK": "shqip (Maqedoni)", + "sq_XK": "shqip (Kosovë)", + "sr": "serbisht", + "sr_BA": "serbisht (Bosnjë-Hercegovinë)", + "sr_Cyrl": "serbisht (cirilik)", + "sr_Cyrl_BA": "serbisht (cirilik, Bosnjë-Hercegovinë)", + "sr_Cyrl_ME": "serbisht (cirilik, Mal i Zi)", + "sr_Cyrl_RS": "serbisht (cirilik, Serbi)", + "sr_Cyrl_XK": "serbisht (cirilik, Kosovë)", + "sr_Latn": "serbisht (latin)", + "sr_Latn_BA": "serbisht (latin, Bosnjë-Hercegovinë)", + "sr_Latn_ME": "serbisht (latin, Mal i Zi)", + "sr_Latn_RS": "serbisht (latin, Serbi)", + "sr_Latn_XK": "serbisht (latin, Kosovë)", + "sr_ME": "serbisht (Mal i Zi)", + "sr_RS": "serbisht (Serbi)", + "sr_XK": "serbisht (Kosovë)", + "sv": "suedisht", + "sv_AX": "suedisht (Ishujt Alandë)", + "sv_FI": "suedisht (Finlandë)", + "sv_SE": "suedisht (Suedi)", + "sw": "suahilisht", + "sw_CD": "suahilisht (Kongo-Kinshasa)", + "sw_KE": "suahilisht (Kenia)", + "sw_TZ": "suahilisht (Tanzani)", + "sw_UG": "suahilisht (Ugandë)", + "ta": "tamilisht", + "ta_IN": "tamilisht (Indi)", + "ta_LK": "tamilisht (Sri-Lankë)", + "ta_MY": "tamilisht (Malajzi)", + "ta_SG": "tamilisht (Singapor)", + "te": "teluguisht", + "te_IN": "teluguisht (Indi)", + "th": "tajlandisht", + "th_TH": "tajlandisht (Tajlandë)", + "ti": "tigrinjaisht", + "ti_ER": "tigrinjaisht (Eritre)", + "ti_ET": "tigrinjaisht (Etiopi)", + "to": "tonganisht", + "to_TO": "tonganisht (Tonga)", + "tr": "turqisht", + "tr_CY": "turqisht (Qipro)", + "tr_TR": "turqisht (Turqi)", + "ug": "ujgurisht", + "ug_CN": "ujgurisht (Kinë)", + "uk": "ukrainisht", + "uk_UA": "ukrainisht (Ukrainë)", + "ur": "urduisht", + "ur_IN": "urduisht (Indi)", + "ur_PK": "urduisht (Pakistan)", + "uz": "uzbekisht", + "uz_AF": "uzbekisht (Afganistan)", + "uz_Arab": "uzbekisht (arabik)", + "uz_Arab_AF": "uzbekisht (arabik, Afganistan)", + "uz_Cyrl": "uzbekisht (cirilik)", + "uz_Cyrl_UZ": "uzbekisht (cirilik, Uzbekistan)", + "uz_Latn": "uzbekisht (latin)", + "uz_Latn_UZ": "uzbekisht (latin, Uzbekistan)", + "uz_UZ": "uzbekisht (Uzbekistan)", + "vi": "vietnamisht", + "vi_VN": "vietnamisht (Vietnam)", + "yi": "jidisht", + "yo": "jorubaisht", + "yo_BJ": "jorubaisht (Benin)", + "yo_NG": "jorubaisht (Nigeri)", + "zh": "kinezisht", + "zh_CN": "kinezisht (Kinë)", + "zh_HK": "kinezisht (RVAK i Hong Kongut)", + "zh_Hans": "kinezisht (i thjeshtuar)", + "zh_Hans_CN": "kinezisht (i thjeshtuar, Kinë)", + "zh_Hans_HK": "kinezisht (i thjeshtuar, RVAK i Hong Kongut)", + "zh_Hans_MO": "kinezisht (i thjeshtuar, RVAK i Makaos)", + "zh_Hans_SG": "kinezisht (i thjeshtuar, Singapor)", + "zh_Hant": "kinezisht (tradicional)", + "zh_Hant_HK": "kinezisht (tradicional, RVAK i Hong Kongut)", + "zh_Hant_MO": "kinezisht (tradicional, RVAK i Makaos)", + "zh_Hant_TW": "kinezisht (tradicional, Tajvan)", + "zh_MO": "kinezisht (RVAK i Makaos)", + "zh_SG": "kinezisht (Singapor)", + "zh_TW": "kinezisht (Tajvan)", + "zu": "zuluisht", + "zu_ZA": "zuluisht (Afrika e Jugut)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr.json new file mode 100644 index 0000000000000000000000000000000000000000..a5f6cce48c32a66c4764edd40d230d91ce2a7229 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "африканÑ", + "af_NA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð½Ñ (Ðамибија)", + "af_ZA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð½Ñ (Јужноафричка Република)", + "ak": "аканÑки", + "ak_GH": "аканÑки (Гана)", + "am": "амхарÑки", + "am_ET": "амхарÑки (Етиопија)", + "ar": "арапÑки", + "ar_AE": "арапÑки (Уједињени ÐрапÑки Емирати)", + "ar_BH": "арапÑки (Бахреин)", + "ar_DJ": "арапÑки (Ðибути)", + "ar_DZ": "арапÑки (Ðлжир)", + "ar_EG": "арапÑки (Египат)", + "ar_EH": "арапÑки (Западна Сахара)", + "ar_ER": "арапÑки (Еритреја)", + "ar_IL": "арапÑки (Израел)", + "ar_IQ": "арапÑки (Ирак)", + "ar_JO": "арапÑки (Јордан)", + "ar_KM": "арапÑки (КоморÑка ОÑтрва)", + "ar_KW": "арапÑки (Кувајт)", + "ar_LB": "арапÑки (Либан)", + "ar_LY": "арапÑки (Либија)", + "ar_MA": "арапÑки (Мароко)", + "ar_MR": "арапÑки (Мауританија)", + "ar_OM": "арапÑки (Оман)", + "ar_PS": "арапÑки (ПалеÑтинÑке територије)", + "ar_QA": "арапÑки (Катар)", + "ar_SA": "арапÑки (СаудијÑка Ðрабија)", + "ar_SD": "арапÑки (Судан)", + "ar_SO": "арапÑки (Сомалија)", + "ar_SS": "арапÑки (Јужни Судан)", + "ar_SY": "арапÑки (Сирија)", + "ar_TD": "арапÑки (Чад)", + "ar_TN": "арапÑки (ТуниÑ)", + "ar_YE": "арапÑки (Јемен)", + "as": "аÑамÑки", + "as_IN": "аÑамÑки (Индија)", + "az": "азербејџанÑки", + "az_AZ": "азербејџанÑки (Ðзербејџан)", + "az_Cyrl": "азербејџанÑки (ћирилица)", + "az_Cyrl_AZ": "азербејџанÑки (ћирилица, Ðзербејџан)", + "az_Latn": "азербејџанÑки (латиница)", + "az_Latn_AZ": "азербејџанÑки (латиница, Ðзербејџан)", + "be": "белоруÑки", + "be_BY": "белоруÑки (БелоруÑија)", + "bg": "бугарÑки", + "bg_BG": "бугарÑки (БугарÑка)", + "bm": "бамбара", + "bm_ML": "бамбара (Мали)", + "bn": "бенгалÑки", + "bn_BD": "бенгалÑки (Бангладеш)", + "bn_IN": "бенгалÑки (Индија)", + "bo": "тибетанÑки", + "bo_CN": "тибетанÑки (Кина)", + "bo_IN": "тибетанÑки (Индија)", + "br": "бретонÑки", + "br_FR": "бретонÑки (ФранцуÑка)", + "bs": "боÑанÑки", + "bs_BA": "боÑанÑки (БоÑна и Херцеговина)", + "bs_Cyrl": "боÑанÑки (ћирилица)", + "bs_Cyrl_BA": "боÑанÑки (ћирилица, БоÑна и Херцеговина)", + "bs_Latn": "боÑанÑки (латиница)", + "bs_Latn_BA": "боÑанÑки (латиница, БоÑна и Херцеговина)", + "ca": "каталонÑки", + "ca_AD": "каталонÑки (Ðндора)", + "ca_ES": "каталонÑки (Шпанија)", + "ca_FR": "каталонÑки (ФранцуÑка)", + "ca_IT": "каталонÑки (Италија)", + "ce": "чеченÑки", + "ce_RU": "чеченÑки (РуÑија)", + "cs": "чешки", + "cs_CZ": "чешки (Чешка)", + "cy": "велшки", + "cy_GB": "велшки (Уједињено КраљевÑтво)", + "da": "данÑки", + "da_DK": "данÑки (ДанÑка)", + "da_GL": "данÑки (Гренланд)", + "de": "немачки", + "de_AT": "немачки (ÐуÑтрија)", + "de_BE": "немачки (Белгија)", + "de_CH": "немачки (ШвајцарÑка)", + "de_DE": "немачки (Ðемачка)", + "de_IT": "немачки (Италија)", + "de_LI": "немачки (Лихтенштајн)", + "de_LU": "немачки (ЛукÑембург)", + "dz": "џонга", + "dz_BT": "џонга (Бутан)", + "ee": "еве", + "ee_GH": "еве (Гана)", + "ee_TG": "еве (Того)", + "el": "грчки", + "el_CY": "грчки (Кипар)", + "el_GR": "грчки (Грчка)", + "en": "енглеÑки", + "en_AG": "енглеÑки (Ðнтигва и Барбуда)", + "en_AI": "енглеÑки (Ðнгвила)", + "en_AS": "енглеÑки (Ðмеричка Самоа)", + "en_AT": "енглеÑки (ÐуÑтрија)", + "en_AU": "енглеÑки (ÐуÑтралија)", + "en_BB": "енглеÑки (БарбадоÑ)", + "en_BE": "енглеÑки (Белгија)", + "en_BI": "енглеÑки (Бурунди)", + "en_BM": "енглеÑки (Бермуда)", + "en_BS": "енглеÑки (Бахами)", + "en_BW": "енглеÑки (Боцвана)", + "en_BZ": "енглеÑки (Белизе)", + "en_CA": "енглеÑки (Канада)", + "en_CC": "енглеÑки (КокоÑова (Килингова) ОÑтрва)", + "en_CH": "енглеÑки (ШвајцарÑка)", + "en_CK": "енглеÑки (Кукова ОÑтрва)", + "en_CM": "енглеÑки (Камерун)", + "en_CX": "енглеÑки (Божићно ОÑтрво)", + "en_CY": "енглеÑки (Кипар)", + "en_DE": "енглеÑки (Ðемачка)", + "en_DG": "енглеÑки (Дијего ГарÑија)", + "en_DK": "енглеÑки (ДанÑка)", + "en_DM": "енглеÑки (Доминика)", + "en_ER": "енглеÑки (Еритреја)", + "en_FI": "енглеÑки (ФинÑка)", + "en_FJ": "енглеÑки (Фиџи)", + "en_FK": "енглеÑки (ФокландÑка ОÑтрва)", + "en_FM": "енглеÑки (Микронезија)", + "en_GB": "енглеÑки (Уједињено КраљевÑтво)", + "en_GD": "енглеÑки (Гренада)", + "en_GG": "енглеÑки (Гернзи)", + "en_GH": "енглеÑки (Гана)", + "en_GI": "енглеÑки (Гибралтар)", + "en_GM": "енглеÑки (Гамбија)", + "en_GU": "енглеÑки (Гуам)", + "en_GY": "енглеÑки (Гвајана)", + "en_HK": "енглеÑки (СÐР Хонгконг (Кина))", + "en_IE": "енглеÑки (ИрÑка)", + "en_IL": "енглеÑки (Израел)", + "en_IM": "енглеÑки (ОÑтрво Ман)", + "en_IN": "енглеÑки (Индија)", + "en_IO": "енглеÑки (БританÑка територија ИндијÑког океана)", + "en_JE": "енглеÑки (Ðерзи)", + "en_JM": "енглеÑки (Јамајка)", + "en_KE": "енглеÑки (Кенија)", + "en_KI": "енглеÑки (Кирибати)", + "en_KN": "енглеÑки (Сент ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ)", + "en_KY": "енглеÑки (КајманÑка ОÑтрва)", + "en_LC": "енглеÑки (Света Луција)", + "en_LR": "енглеÑки (Либерија)", + "en_LS": "енглеÑки (ЛеÑото)", + "en_MG": "енглеÑки (МадагаÑкар)", + "en_MH": "енглеÑки (МаршалÑка ОÑтрва)", + "en_MO": "енглеÑки (СÐР Макао (Кина))", + "en_MP": "енглеÑки (Северна МаријанÑка ОÑтрва)", + "en_MS": "енглеÑки (МонÑерат)", + "en_MT": "енглеÑки (Малта)", + "en_MU": "енглеÑки (МаурицијуÑ)", + "en_MW": "енглеÑки (Малави)", + "en_MY": "енглеÑки (Малезија)", + "en_NA": "енглеÑки (Ðамибија)", + "en_NF": "енглеÑки (ОÑтрво Ðорфок)", + "en_NG": "енглеÑки (Ðигерија)", + "en_NL": "енглеÑки (Холандија)", + "en_NR": "енглеÑки (Ðауру)", + "en_NU": "енглеÑки (Ðиуе)", + "en_NZ": "енглеÑки (Ðови Зеланд)", + "en_PG": "енглеÑки (Папуа Ðова Гвинеја)", + "en_PH": "енглеÑки (Филипини)", + "en_PK": "енглеÑки (ПакиÑтан)", + "en_PN": "енглеÑки (Питкерн)", + "en_PR": "енглеÑки (Порторико)", + "en_PW": "енглеÑки (Палау)", + "en_RW": "енглеÑки (Руанда)", + "en_SB": "енглеÑки (СоломонÑка ОÑтрва)", + "en_SC": "енглеÑки (Сејшели)", + "en_SD": "енглеÑки (Судан)", + "en_SE": "енглеÑки (ШведÑка)", + "en_SG": "енглеÑки (Сингапур)", + "en_SH": "енглеÑки (Света Јелена)", + "en_SI": "енглеÑки (Словенија)", + "en_SL": "енглеÑки (Сијера Леоне)", + "en_SS": "енглеÑки (Јужни Судан)", + "en_SX": "енглеÑки (Свети Мартин (Холандија))", + "en_SZ": "енглеÑки (Свазиленд)", + "en_TC": "енглеÑки (ОÑтрва Ð¢ÑƒÑ€ÐºÑ Ð¸ КаикоÑ)", + "en_TK": "енглеÑки (Токелау)", + "en_TO": "енглеÑки (Тонга)", + "en_TT": "енглеÑки (Тринидад и Тобаго)", + "en_TV": "енглеÑки (Тувалу)", + "en_TZ": "енглеÑки (Танзанија)", + "en_UG": "енглеÑки (Уганда)", + "en_UM": "енглеÑки (Удаљена оÑтрва СÐД)", + "en_US": "енглеÑки (Сједињене Државе)", + "en_VC": "енглеÑки (Сент ВинÑент и Гренадини)", + "en_VG": "енглеÑки (БританÑка ДевичанÑка ОÑтрва)", + "en_VI": "енглеÑки (Ðмеричка ДевичанÑка ОÑтрва)", + "en_VU": "енглеÑки (Вануату)", + "en_WS": "енглеÑки (Самоа)", + "en_ZA": "енглеÑки (Јужноафричка Република)", + "en_ZM": "енглеÑки (Замбија)", + "en_ZW": "енглеÑки (Зимбабве)", + "eo": "еÑперанто", + "es": "шпанÑки", + "es_AR": "шпанÑки (Ðргентина)", + "es_BO": "шпанÑки (Боливија)", + "es_BR": "шпанÑки (Бразил)", + "es_CL": "шпанÑки (Чиле)", + "es_CO": "шпанÑки (Колумбија)", + "es_CR": "шпанÑки (КоÑтарика)", + "es_CU": "шпанÑки (Куба)", + "es_DO": "шпанÑки (ДоминиканÑка Република)", + "es_EA": "шпанÑки (Сеута и Мелиља)", + "es_EC": "шпанÑки (Еквадор)", + "es_ES": "шпанÑки (Шпанија)", + "es_GQ": "шпанÑки (Екваторијална Гвинеја)", + "es_GT": "шпанÑки (Гватемала)", + "es_HN": "шпанÑки (ХондураÑ)", + "es_IC": "шпанÑки (КанарÑка ОÑтрва)", + "es_MX": "шпанÑки (МекÑико)", + "es_NI": "шпанÑки (Ðикарагва)", + "es_PA": "шпанÑки (Панама)", + "es_PE": "шпанÑки (Перу)", + "es_PH": "шпанÑки (Филипини)", + "es_PR": "шпанÑки (Порторико)", + "es_PY": "шпанÑки (Парагвај)", + "es_SV": "шпанÑки (Салвадор)", + "es_US": "шпанÑки (Сједињене Државе)", + "es_UY": "шпанÑки (Уругвај)", + "es_VE": "шпанÑки (Венецуела)", + "et": "еÑтонÑки", + "et_EE": "еÑтонÑки (ЕÑтонија)", + "eu": "баÑкијÑки", + "eu_ES": "баÑкијÑки (Шпанија)", + "fa": "перÑијÑки", + "fa_AF": "перÑијÑки (ÐвганиÑтан)", + "fa_IR": "перÑијÑки (Иран)", + "ff": "фула", + "ff_CM": "фула (Камерун)", + "ff_GN": "фула (Гвинеја)", + "ff_MR": "фула (Мауританија)", + "ff_SN": "фула (Сенегал)", + "fi": "финÑки", + "fi_FI": "финÑки (ФинÑка)", + "fo": "фарÑки", + "fo_DK": "фарÑки (ДанÑка)", + "fo_FO": "фарÑки (ФарÑка ОÑтрва)", + "fr": "француÑки", + "fr_BE": "француÑки (Белгија)", + "fr_BF": "француÑки (Буркина ФаÑо)", + "fr_BI": "француÑки (Бурунди)", + "fr_BJ": "француÑки (Бенин)", + "fr_BL": "француÑки (Сен Бартелеми)", + "fr_CA": "француÑки (Канада)", + "fr_CD": "француÑки (Конго - КиншаÑа)", + "fr_CF": "француÑки (Централноафричка Република)", + "fr_CG": "француÑки (Конго - Бразавил)", + "fr_CH": "француÑки (ШвајцарÑка)", + "fr_CI": "француÑки (Обала Слоноваче)", + "fr_CM": "француÑки (Камерун)", + "fr_DJ": "француÑки (Ðибути)", + "fr_DZ": "француÑки (Ðлжир)", + "fr_FR": "француÑки (ФранцуÑка)", + "fr_GA": "француÑки (Габон)", + "fr_GF": "француÑки (ФранцуÑка Гвајана)", + "fr_GN": "француÑки (Гвинеја)", + "fr_GP": "француÑки (Гваделуп)", + "fr_GQ": "француÑки (Екваторијална Гвинеја)", + "fr_HT": "француÑки (Хаити)", + "fr_KM": "француÑки (КоморÑка ОÑтрва)", + "fr_LU": "француÑки (ЛукÑембург)", + "fr_MA": "француÑки (Мароко)", + "fr_MC": "француÑки (Монако)", + "fr_MF": "француÑки (Свети Мартин (ФранцуÑка))", + "fr_MG": "француÑки (МадагаÑкар)", + "fr_ML": "француÑки (Мали)", + "fr_MQ": "француÑки (Мартиник)", + "fr_MR": "француÑки (Мауританија)", + "fr_MU": "француÑки (МаурицијуÑ)", + "fr_NC": "француÑки (Ðова Каледонија)", + "fr_NE": "француÑки (Ðигер)", + "fr_PF": "француÑки (ФранцуÑка Полинезија)", + "fr_PM": "француÑки (Сен Пјер и Микелон)", + "fr_RE": "француÑки (Реинион)", + "fr_RW": "француÑки (Руанда)", + "fr_SC": "француÑки (Сејшели)", + "fr_SN": "француÑки (Сенегал)", + "fr_SY": "француÑки (Сирија)", + "fr_TD": "француÑки (Чад)", + "fr_TG": "француÑки (Того)", + "fr_TN": "француÑки (ТуниÑ)", + "fr_VU": "француÑки (Вануату)", + "fr_WF": "француÑки (Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна)", + "fr_YT": "француÑки (Мајот)", + "fy": "западни фризијÑки", + "fy_NL": "западни фризијÑки (Холандија)", + "ga": "ирÑки", + "ga_IE": "ирÑки (ИрÑка)", + "gd": "шкотÑки гелÑки", + "gd_GB": "шкотÑки гелÑки (Уједињено КраљевÑтво)", + "gl": "галицијÑки", + "gl_ES": "галицијÑки (Шпанија)", + "gu": "гуџарати", + "gu_IN": "гуџарати (Индија)", + "gv": "манкÑ", + "gv_IM": "Ð¼Ð°Ð½ÐºÑ (ОÑтрво Ман)", + "ha": "хауÑа", + "ha_GH": "хауÑа (Гана)", + "ha_NE": "хауÑа (Ðигер)", + "ha_NG": "хауÑа (Ðигерија)", + "he": "хебрејÑки", + "he_IL": "хебрејÑки (Израел)", + "hi": "хинди", + "hi_IN": "хинди (Индија)", + "hr": "хрватÑки", + "hr_BA": "хрватÑки (БоÑна и Херцеговина)", + "hr_HR": "хрватÑки (ХрватÑка)", + "hu": "мађарÑки", + "hu_HU": "мађарÑки (МађарÑка)", + "hy": "јерменÑки", + "hy_AM": "јерменÑки (Јерменија)", + "id": "индонежанÑки", + "id_ID": "индонежанÑки (Индонезија)", + "ig": "игбо", + "ig_NG": "игбо (Ðигерија)", + "ii": "ÑечуанÑки ји", + "ii_CN": "ÑечуанÑки ји (Кина)", + "is": "иÑландÑки", + "is_IS": "иÑландÑки (ИÑланд)", + "it": "италијанÑки", + "it_CH": "италијанÑки (ШвајцарÑка)", + "it_IT": "италијанÑки (Италија)", + "it_SM": "италијанÑки (Сан Марино)", + "ja": "јапанÑки", + "ja_JP": "јапанÑки (Јапан)", + "ka": "грузијÑки", + "ka_GE": "грузијÑки (Грузија)", + "ki": "кикују", + "ki_KE": "кикују (Кенија)", + "kk": "казашки", + "kk_KZ": "казашки (КазахÑтан)", + "kl": "гренландÑки", + "kl_GL": "гренландÑки (Гренланд)", + "km": "кмерÑки", + "km_KH": "кмерÑки (Камбоџа)", + "kn": "канада", + "kn_IN": "канада (Индија)", + "ko": "корејÑки", + "ko_KP": "корејÑки (Северна Кореја)", + "ko_KR": "корејÑки (Јужна Кореја)", + "ks": "кашмирÑки", + "ks_IN": "кашмирÑки (Индија)", + "kw": "корнволÑки", + "kw_GB": "корнволÑки (Уједињено КраљевÑтво)", + "ky": "киргиÑки", + "ky_KG": "киргиÑки (КиргиÑтан)", + "lb": "лукÑембуршки", + "lb_LU": "лукÑембуршки (ЛукÑембург)", + "lg": "ганда", + "lg_UG": "ганда (Уганда)", + "ln": "лингала", + "ln_AO": "лингала (Ðнгола)", + "ln_CD": "лингала (Конго - КиншаÑа)", + "ln_CF": "лингала (Централноафричка Република)", + "ln_CG": "лингала (Конго - Бразавил)", + "lo": "лаоÑки", + "lo_LA": "лаоÑки (ЛаоÑ)", + "lt": "литванÑки", + "lt_LT": "литванÑки (Литванија)", + "lu": "луба-катанга", + "lu_CD": "луба-катанга (Конго - КиншаÑа)", + "lv": "летонÑки", + "lv_LV": "летонÑки (Летонија)", + "mg": "малгашки", + "mg_MG": "малгашки (МадагаÑкар)", + "mk": "македонÑки", + "mk_MK": "македонÑки (Македонија)", + "ml": "малајалам", + "ml_IN": "малајалам (Индија)", + "mn": "монголÑки", + "mn_MN": "монголÑки (Монголија)", + "mr": "марати", + "mr_IN": "марати (Индија)", + "ms": "малајÑки", + "ms_BN": "малајÑки (Брунеј)", + "ms_MY": "малајÑки (Малезија)", + "ms_SG": "малајÑки (Сингапур)", + "mt": "малтешки", + "mt_MT": "малтешки (Малта)", + "my": "бурманÑки", + "my_MM": "бурманÑки (Мијанмар (Бурма))", + "nb": "норвешки букмол", + "nb_NO": "норвешки букмол (Ðорвешка)", + "nb_SJ": "норвешки букмол (Свалбард и Јан Мајен)", + "nd": "Ñеверни ндебеле", + "nd_ZW": "Ñеверни ндебеле (Зимбабве)", + "ne": "непалÑки", + "ne_IN": "непалÑки (Индија)", + "ne_NP": "непалÑки (Ðепал)", + "nl": "холандÑки", + "nl_AW": "холандÑки (Ðруба)", + "nl_BE": "холандÑки (Белгија)", + "nl_BQ": "холандÑки (КарипÑка Холандија)", + "nl_CW": "холандÑки (КураÑао)", + "nl_NL": "холандÑки (Холандија)", + "nl_SR": "холандÑки (Суринам)", + "nl_SX": "холандÑки (Свети Мартин (Холандија))", + "nn": "норвешки нинорÑк", + "nn_NO": "норвешки нинорÑк (Ðорвешка)", + "no": "норвешки", + "no_NO": "норвешки (Ðорвешка)", + "om": "оромо", + "om_ET": "оромо (Етиопија)", + "om_KE": "оромо (Кенија)", + "or": "одија", + "or_IN": "одија (Индија)", + "os": "оÑетинÑки", + "os_GE": "оÑетинÑки (Грузија)", + "os_RU": "оÑетинÑки (РуÑија)", + "pa": "пенџапÑки", + "pa_Arab": "пенџапÑки (арапÑко пиÑмо)", + "pa_Arab_PK": "пенџапÑки (арапÑко пиÑмо, ПакиÑтан)", + "pa_Guru": "пенџапÑки (гурмуки пиÑмо)", + "pa_Guru_IN": "пенџапÑки (гурмуки пиÑмо, Индија)", + "pa_IN": "пенџапÑки (Индија)", + "pa_PK": "пенџапÑки (ПакиÑтан)", + "pl": "пољÑки", + "pl_PL": "пољÑки (ПољÑка)", + "ps": "паштунÑки", + "ps_AF": "паштунÑки (ÐвганиÑтан)", + "pt": "португалÑки", + "pt_AO": "португалÑки (Ðнгола)", + "pt_BR": "португалÑки (Бразил)", + "pt_CH": "португалÑки (ШвајцарÑка)", + "pt_CV": "португалÑки (ЗеленортÑка ОÑтрва)", + "pt_GQ": "португалÑки (Екваторијална Гвинеја)", + "pt_GW": "португалÑки (Гвинеја-БиÑао)", + "pt_LU": "португалÑки (ЛукÑембург)", + "pt_MO": "португалÑки (СÐР Макао (Кина))", + "pt_MZ": "португалÑки (Мозамбик)", + "pt_PT": "португалÑки (Португалија)", + "pt_ST": "португалÑки (Сао Томе и Принципе)", + "pt_TL": "португалÑки (ИÑточни Тимор)", + "qu": "кечуа", + "qu_BO": "кечуа (Боливија)", + "qu_EC": "кечуа (Еквадор)", + "qu_PE": "кечуа (Перу)", + "rm": "романш", + "rm_CH": "романш (ШвајцарÑка)", + "rn": "кирунди", + "rn_BI": "кирунди (Бурунди)", + "ro": "румунÑки", + "ro_MD": "румунÑки (Молдавија)", + "ro_RO": "румунÑки (Румунија)", + "ru": "руÑки", + "ru_BY": "руÑки (БелоруÑија)", + "ru_KG": "руÑки (КиргиÑтан)", + "ru_KZ": "руÑки (КазахÑтан)", + "ru_MD": "руÑки (Молдавија)", + "ru_RU": "руÑки (РуÑија)", + "ru_UA": "руÑки (Украјина)", + "rw": "кињаруанда", + "rw_RW": "кињаруанда (Руанда)", + "se": "Ñеверни Ñами", + "se_FI": "Ñеверни Ñами (ФинÑка)", + "se_NO": "Ñеверни Ñами (Ðорвешка)", + "se_SE": "Ñеверни Ñами (ШведÑка)", + "sg": "Ñанго", + "sg_CF": "Ñанго (Централноафричка Република)", + "sh": "ÑрпÑкохрватÑки", + "sh_BA": "ÑрпÑкохрватÑки (БоÑна и Херцеговина)", + "si": "Ñинхалешки", + "si_LK": "Ñинхалешки (Шри Ланка)", + "sk": "Ñловачки", + "sk_SK": "Ñловачки (Словачка)", + "sl": "Ñловеначки", + "sl_SI": "Ñловеначки (Словенија)", + "sn": "шона", + "sn_ZW": "шона (Зимбабве)", + "so": "ÑомалÑки", + "so_DJ": "ÑомалÑки (Ðибути)", + "so_ET": "ÑомалÑки (Етиопија)", + "so_KE": "ÑомалÑки (Кенија)", + "so_SO": "ÑомалÑки (Сомалија)", + "sq": "албанÑки", + "sq_AL": "албанÑки (Ðлбанија)", + "sq_MK": "албанÑки (Македонија)", + "sq_XK": "албанÑки (КоÑово)", + "sr": "ÑрпÑки", + "sr_BA": "ÑрпÑки (БоÑна и Херцеговина)", + "sr_Cyrl": "ÑрпÑки (ћирилица)", + "sr_Cyrl_BA": "ÑрпÑки (ћирилица, БоÑна и Херцеговина)", + "sr_Cyrl_ME": "ÑрпÑки (ћирилица, Црна Гора)", + "sr_Cyrl_RS": "ÑрпÑки (ћирилица, Србија)", + "sr_Cyrl_XK": "ÑрпÑки (ћирилица, КоÑово)", + "sr_Latn": "ÑрпÑки (латиница)", + "sr_Latn_BA": "ÑрпÑки (латиница, БоÑна и Херцеговина)", + "sr_Latn_ME": "ÑрпÑки (латиница, Црна Гора)", + "sr_Latn_RS": "ÑрпÑки (латиница, Србија)", + "sr_Latn_XK": "ÑрпÑки (латиница, КоÑово)", + "sr_ME": "ÑрпÑки (Црна Гора)", + "sr_RS": "ÑрпÑки (Србија)", + "sr_XK": "ÑрпÑки (КоÑово)", + "sv": "шведÑки", + "sv_AX": "шведÑки (ОландÑка ОÑтрва)", + "sv_FI": "шведÑки (ФинÑка)", + "sv_SE": "шведÑки (ШведÑка)", + "sw": "Ñвахили", + "sw_CD": "Ñвахили (Конго - КиншаÑа)", + "sw_KE": "Ñвахили (Кенија)", + "sw_TZ": "Ñвахили (Танзанија)", + "sw_UG": "Ñвахили (Уганда)", + "ta": "тамилÑки", + "ta_IN": "тамилÑки (Индија)", + "ta_LK": "тамилÑки (Шри Ланка)", + "ta_MY": "тамилÑки (Малезија)", + "ta_SG": "тамилÑки (Сингапур)", + "te": "телугу", + "te_IN": "телугу (Индија)", + "th": "тајÑки", + "th_TH": "тајÑки (Тајланд)", + "ti": "тигриња", + "ti_ER": "тигриња (Еритреја)", + "ti_ET": "тигриња (Етиопија)", + "tl": "тагалог", + "tl_PH": "тагалог (Филипини)", + "to": "тонганÑки", + "to_TO": "тонганÑки (Тонга)", + "tr": "турÑки", + "tr_CY": "турÑки (Кипар)", + "tr_TR": "турÑки (ТурÑка)", + "ug": "ујгурÑки", + "ug_CN": "ујгурÑки (Кина)", + "uk": "украјинÑки", + "uk_UA": "украјинÑки (Украјина)", + "ur": "урду", + "ur_IN": "урду (Индија)", + "ur_PK": "урду (ПакиÑтан)", + "uz": "узбечки", + "uz_AF": "узбечки (ÐвганиÑтан)", + "uz_Arab": "узбечки (арапÑко пиÑмо)", + "uz_Arab_AF": "узбечки (арапÑко пиÑмо, ÐвганиÑтан)", + "uz_Cyrl": "узбечки (ћирилица)", + "uz_Cyrl_UZ": "узбечки (ћирилица, УзбекиÑтан)", + "uz_Latn": "узбечки (латиница)", + "uz_Latn_UZ": "узбечки (латиница, УзбекиÑтан)", + "uz_UZ": "узбечки (УзбекиÑтан)", + "vi": "вијетнамÑки", + "vi_VN": "вијетнамÑки (Вијетнам)", + "yi": "јидиш", + "yo": "јоруба", + "yo_BJ": "јоруба (Бенин)", + "yo_NG": "јоруба (Ðигерија)", + "zh": "кинеÑки", + "zh_CN": "кинеÑки (Кина)", + "zh_HK": "кинеÑки (СÐР Хонгконг (Кина))", + "zh_Hans": "кинеÑки (поједноÑтављено кинеÑко пиÑмо)", + "zh_Hans_CN": "кинеÑки (поједноÑтављено кинеÑко пиÑмо, Кина)", + "zh_Hans_HK": "кинеÑки (поједноÑтављено кинеÑко пиÑмо, СÐР Хонгконг (Кина))", + "zh_Hans_MO": "кинеÑки (поједноÑтављено кинеÑко пиÑмо, СÐР Макао (Кина))", + "zh_Hans_SG": "кинеÑки (поједноÑтављено кинеÑко пиÑмо, Сингапур)", + "zh_Hant": "кинеÑки (традиционално кинеÑко пиÑмо)", + "zh_Hant_HK": "кинеÑки (традиционално кинеÑко пиÑмо, СÐР Хонгконг (Кина))", + "zh_Hant_MO": "кинеÑки (традиционално кинеÑко пиÑмо, СÐР Макао (Кина))", + "zh_Hant_TW": "кинеÑки (традиционално кинеÑко пиÑмо, Тајван)", + "zh_MO": "кинеÑки (СÐР Макао (Кина))", + "zh_SG": "кинеÑки (Сингапур)", + "zh_TW": "кинеÑки (Тајван)", + "zu": "зулу", + "zu_ZA": "зулу (Јужноафричка Република)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..1abbba48084fe77ec85738793c48ddd358838ab6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_BA.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Cyrl_BA" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_CS.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_CS.json new file mode 100644 index 0000000000000000000000000000000000000000..ea9adc0ba7cba3e5dd60d2276d892593f96d68e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_CS.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Cyrl_RS" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..914867710f6b38ef45266a3a0689cb0ad825623d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_BA.json @@ -0,0 +1,38 @@ +{ + "Names": { + "be": "бјелоруÑки", + "be_BY": "бјелоруÑки (БјелоруÑија)", + "bm": "бамананкан", + "bm_ML": "бамананкан (Мали)", + "bn": "бангла", + "bn_BD": "бангла (Бангладеш)", + "bn_IN": "бангла (Индија)", + "cs_CZ": "чешки (Чешка Република)", + "de_DE": "немачки (Њемачка)", + "en_DE": "енглеÑки (Њемачка)", + "en_KN": "енглеÑки (Свети ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ)", + "en_MO": "енглеÑки (СÐР Макао)", + "en_UM": "енглеÑки (Мања удаљена оÑтрва СÐД)", + "en_VC": "енглеÑки (Свети ВинÑент и Гренадини)", + "en_VG": "енглеÑки (БританÑка ДјевичанÑка ОÑтрва)", + "en_VI": "енглеÑки (Ðмеричка ДјевичанÑка ОÑтрва)", + "fr_CG": "француÑки (Конго)", + "fr_CI": "француÑки (Обала Слоноваче (Кот д’Ивоар))", + "fr_PM": "француÑки (Свети Пјер и Микелон)", + "fr_RE": "француÑки (Реунион)", + "ln_CG": "лингала (Конго)", + "lo": "лаошки", + "lo_LA": "лаошки (ЛаоÑ)", + "pt_CV": "португалÑки (Кабо Верде)", + "pt_MO": "португалÑки (СÐР Макао)", + "pt_TL": "португалÑки (Тимор-ЛеÑте (ИÑточни Тимор))", + "ru_BY": "руÑки (БјелоруÑија)", + "si": "ÑинхалÑки", + "si_LK": "ÑинхалÑки (Шри Ланка)", + "zh_Hans_MO": "кинеÑки (поједноÑтављено кинеÑко пиÑмо, СÐР Макао)", + "zh_Hant_MO": "кинеÑки (традиционално кинеÑко пиÑмо, СÐР Макао)", + "zh_MO": "кинеÑки (СÐР Макао)", + "zu": "иÑизулу", + "zu_ZA": "иÑизулу (Јужноафричка Република)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_CS.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_CS.json new file mode 100644 index 0000000000000000000000000000000000000000..ea9adc0ba7cba3e5dd60d2276d892593f96d68e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_CS.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Cyrl_RS" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_ME.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_ME.json new file mode 100644 index 0000000000000000000000000000000000000000..1fe945beeab6c46f003a7b3bcbec94bb0a085454 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_ME.json @@ -0,0 +1,35 @@ +{ + "Names": { + "be": "бјелоруÑки", + "be_BY": "бјелоруÑки (БјелоруÑија)", + "bm": "бамананкан", + "bm_ML": "бамананкан (Мали)", + "bn": "бангла", + "bn_BD": "бангла (Бангладеш)", + "bn_IN": "бангла (Индија)", + "cs_CZ": "чешки (Чешка Република)", + "de_DE": "немачки (Њемачка)", + "en_DE": "енглеÑки (Њемачка)", + "en_KN": "енглеÑки (Свети ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ)", + "en_UM": "енглеÑки (Мања удаљена оÑтрва СÐД)", + "en_VC": "енглеÑки (Свети ВинÑент и Гренадини)", + "en_VG": "енглеÑки (БританÑка ДјевичанÑка ОÑтрва)", + "en_VI": "енглеÑки (Ðмеричка ДјевичанÑка ОÑтрва)", + "ff": "фулах", + "ff_CM": "фулах (Камерун)", + "ff_GN": "фулах (Гвинеја)", + "ff_MR": "фулах (Мауританија)", + "ff_SN": "фулах (Сенегал)", + "fr_CG": "француÑки (Конго)", + "fr_CI": "француÑки (Обала Слоноваче (Кот д’Ивоар))", + "fr_PM": "француÑки (Свети Пјер и Микелон)", + "fr_RE": "француÑки (Реунион)", + "ln_CG": "лингала (Конго)", + "lo": "лаошки", + "lo_LA": "лаошки (ЛаоÑ)", + "pt_TL": "португалÑки (Тимор-ЛеÑте (ИÑточни Тимор))", + "ru_BY": "руÑки (БјелоруÑија)", + "zu": "иÑизулу", + "zu_ZA": "иÑизулу (Јужноафричка Република)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_XK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_XK.json new file mode 100644 index 0000000000000000000000000000000000000000..cd664c8b38962e7f305ea74c762aba7c29e28ab5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_XK.json @@ -0,0 +1,40 @@ +{ + "Names": { + "bm": "бамананкан", + "bm_ML": "бамананкан (Мали)", + "bn": "бангла", + "bn_BD": "бангла (Бангладеш)", + "bn_IN": "бангла (Индија)", + "cs_CZ": "чешки (Чешка Република)", + "en_HK": "енглеÑки (СÐР Хонгконг)", + "en_KN": "енглеÑки (Свети ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ)", + "en_MO": "енглеÑки (СÐР Макао)", + "en_UM": "енглеÑки (Мања удаљена оÑтрва СÐД)", + "en_VC": "енглеÑки (Свети ВинÑент и Гренадини)", + "ff": "фулах", + "ff_CM": "фулах (Камерун)", + "ff_GN": "фулах (Гвинеја)", + "ff_MR": "фулах (Мауританија)", + "ff_SN": "фулах (Сенегал)", + "fr_CG": "француÑки (Конго)", + "fr_CI": "француÑки (Обала Слоноваче (Кот д’Ивоар))", + "fr_PM": "француÑки (Свети Пјер и Микелон)", + "fr_RE": "француÑки (Реунион)", + "ln_CG": "лингала (Конго)", + "lo": "лаошки", + "lo_LA": "лаошки (ЛаоÑ)", + "pt_CV": "португалÑки (Кабо Верде)", + "pt_MO": "португалÑки (СÐР Макао)", + "pt_TL": "португалÑки (Тимор-ЛеÑте (ИÑточни Тимор))", + "si": "ÑинхалÑки", + "si_LK": "ÑинхалÑки (Шри Ланка)", + "zh_HK": "кинеÑки (СÐР Хонгконг)", + "zh_Hans_HK": "кинеÑки (поједноÑтављено кинеÑко пиÑмо, СÐР Хонгконг)", + "zh_Hans_MO": "кинеÑки (поједноÑтављено кинеÑко пиÑмо, СÐР Макао)", + "zh_Hant_HK": "кинеÑки (традиционално кинеÑко пиÑмо, СÐР Хонгконг)", + "zh_Hant_MO": "кинеÑки (традиционално кинеÑко пиÑмо, СÐР Макао)", + "zh_MO": "кинеÑки (СÐР Макао)", + "zu": "иÑизулу", + "zu_ZA": "иÑизулу (Јужноафричка Република)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_YU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_YU.json new file mode 100644 index 0000000000000000000000000000000000000000..ea9adc0ba7cba3e5dd60d2276d892593f96d68e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_YU.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Cyrl_RS" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn.json new file mode 100644 index 0000000000000000000000000000000000000000..e5bb38c65f9d633e02ba73f4a854ae2b2b1dced2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikans", + "af_NA": "afrikans (Namibija)", + "af_ZA": "afrikans (JužnoafriÄka Republika)", + "ak": "akanski", + "ak_GH": "akanski (Gana)", + "am": "amharski", + "am_ET": "amharski (Etiopija)", + "ar": "arapski", + "ar_AE": "arapski (Ujedinjeni Arapski Emirati)", + "ar_BH": "arapski (Bahrein)", + "ar_DJ": "arapski (Džibuti)", + "ar_DZ": "arapski (Alžir)", + "ar_EG": "arapski (Egipat)", + "ar_EH": "arapski (Zapadna Sahara)", + "ar_ER": "arapski (Eritreja)", + "ar_IL": "arapski (Izrael)", + "ar_IQ": "arapski (Irak)", + "ar_JO": "arapski (Jordan)", + "ar_KM": "arapski (Komorska Ostrva)", + "ar_KW": "arapski (Kuvajt)", + "ar_LB": "arapski (Liban)", + "ar_LY": "arapski (Libija)", + "ar_MA": "arapski (Maroko)", + "ar_MR": "arapski (Mauritanija)", + "ar_OM": "arapski (Oman)", + "ar_PS": "arapski (Palestinske teritorije)", + "ar_QA": "arapski (Katar)", + "ar_SA": "arapski (Saudijska Arabija)", + "ar_SD": "arapski (Sudan)", + "ar_SO": "arapski (Somalija)", + "ar_SS": "arapski (Južni Sudan)", + "ar_SY": "arapski (Sirija)", + "ar_TD": "arapski (ÄŒad)", + "ar_TN": "arapski (Tunis)", + "ar_YE": "arapski (Jemen)", + "as": "asamski", + "as_IN": "asamski (Indija)", + "az": "azerbejdžanski", + "az_AZ": "azerbejdžanski (Azerbejdžan)", + "az_Cyrl": "azerbejdžanski (ćirilica)", + "az_Cyrl_AZ": "azerbejdžanski (ćirilica, Azerbejdžan)", + "az_Latn": "azerbejdžanski (latinica)", + "az_Latn_AZ": "azerbejdžanski (latinica, Azerbejdžan)", + "be": "beloruski", + "be_BY": "beloruski (Belorusija)", + "bg": "bugarski", + "bg_BG": "bugarski (Bugarska)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengalski", + "bn_BD": "bengalski (BangladeÅ¡)", + "bn_IN": "bengalski (Indija)", + "bo": "tibetanski", + "bo_CN": "tibetanski (Kina)", + "bo_IN": "tibetanski (Indija)", + "br": "bretonski", + "br_FR": "bretonski (Francuska)", + "bs": "bosanski", + "bs_BA": "bosanski (Bosna i Hercegovina)", + "bs_Cyrl": "bosanski (ćirilica)", + "bs_Cyrl_BA": "bosanski (ćirilica, Bosna i Hercegovina)", + "bs_Latn": "bosanski (latinica)", + "bs_Latn_BA": "bosanski (latinica, Bosna i Hercegovina)", + "ca": "katalonski", + "ca_AD": "katalonski (Andora)", + "ca_ES": "katalonski (Å panija)", + "ca_FR": "katalonski (Francuska)", + "ca_IT": "katalonski (Italija)", + "ce": "ÄeÄenski", + "ce_RU": "ÄeÄenski (Rusija)", + "cs": "ÄeÅ¡ki", + "cs_CZ": "ÄeÅ¡ki (ÄŒeÅ¡ka)", + "cy": "velÅ¡ki", + "cy_GB": "velÅ¡ki (Ujedinjeno Kraljevstvo)", + "da": "danski", + "da_DK": "danski (Danska)", + "da_GL": "danski (Grenland)", + "de": "nemaÄki", + "de_AT": "nemaÄki (Austrija)", + "de_BE": "nemaÄki (Belgija)", + "de_CH": "nemaÄki (Å vajcarska)", + "de_DE": "nemaÄki (NemaÄka)", + "de_IT": "nemaÄki (Italija)", + "de_LI": "nemaÄki (LihtenÅ¡tajn)", + "de_LU": "nemaÄki (Luksemburg)", + "dz": "džonga", + "dz_BT": "džonga (Butan)", + "ee": "eve", + "ee_GH": "eve (Gana)", + "ee_TG": "eve (Togo)", + "el": "grÄki", + "el_CY": "grÄki (Kipar)", + "el_GR": "grÄki (GrÄka)", + "en": "engleski", + "en_AG": "engleski (Antigva i Barbuda)", + "en_AI": "engleski (Angvila)", + "en_AS": "engleski (AmeriÄka Samoa)", + "en_AT": "engleski (Austrija)", + "en_AU": "engleski (Australija)", + "en_BB": "engleski (Barbados)", + "en_BE": "engleski (Belgija)", + "en_BI": "engleski (Burundi)", + "en_BM": "engleski (Bermuda)", + "en_BS": "engleski (Bahami)", + "en_BW": "engleski (Bocvana)", + "en_BZ": "engleski (Belize)", + "en_CA": "engleski (Kanada)", + "en_CC": "engleski (Kokosova (Kilingova) Ostrva)", + "en_CH": "engleski (Å vajcarska)", + "en_CK": "engleski (Kukova Ostrva)", + "en_CM": "engleski (Kamerun)", + "en_CX": "engleski (Božićno Ostrvo)", + "en_CY": "engleski (Kipar)", + "en_DE": "engleski (NemaÄka)", + "en_DG": "engleski (Dijego Garsija)", + "en_DK": "engleski (Danska)", + "en_DM": "engleski (Dominika)", + "en_ER": "engleski (Eritreja)", + "en_FI": "engleski (Finska)", + "en_FJ": "engleski (Fidži)", + "en_FK": "engleski (Foklandska Ostrva)", + "en_FM": "engleski (Mikronezija)", + "en_GB": "engleski (Ujedinjeno Kraljevstvo)", + "en_GD": "engleski (Grenada)", + "en_GG": "engleski (Gernzi)", + "en_GH": "engleski (Gana)", + "en_GI": "engleski (Gibraltar)", + "en_GM": "engleski (Gambija)", + "en_GU": "engleski (Guam)", + "en_GY": "engleski (Gvajana)", + "en_HK": "engleski (SAR Hongkong (Kina))", + "en_IE": "engleski (Irska)", + "en_IL": "engleski (Izrael)", + "en_IM": "engleski (Ostrvo Man)", + "en_IN": "engleski (Indija)", + "en_IO": "engleski (Britanska teritorija Indijskog okeana)", + "en_JE": "engleski (Džerzi)", + "en_JM": "engleski (Jamajka)", + "en_KE": "engleski (Kenija)", + "en_KI": "engleski (Kiribati)", + "en_KN": "engleski (Sent Kits i Nevis)", + "en_KY": "engleski (Kajmanska Ostrva)", + "en_LC": "engleski (Sveta Lucija)", + "en_LR": "engleski (Liberija)", + "en_LS": "engleski (Lesoto)", + "en_MG": "engleski (Madagaskar)", + "en_MH": "engleski (MarÅ¡alska Ostrva)", + "en_MO": "engleski (SAR Makao (Kina))", + "en_MP": "engleski (Severna Marijanska Ostrva)", + "en_MS": "engleski (Monserat)", + "en_MT": "engleski (Malta)", + "en_MU": "engleski (Mauricijus)", + "en_MW": "engleski (Malavi)", + "en_MY": "engleski (Malezija)", + "en_NA": "engleski (Namibija)", + "en_NF": "engleski (Ostrvo Norfok)", + "en_NG": "engleski (Nigerija)", + "en_NL": "engleski (Holandija)", + "en_NR": "engleski (Nauru)", + "en_NU": "engleski (Niue)", + "en_NZ": "engleski (Novi Zeland)", + "en_PG": "engleski (Papua Nova Gvineja)", + "en_PH": "engleski (Filipini)", + "en_PK": "engleski (Pakistan)", + "en_PN": "engleski (Pitkern)", + "en_PR": "engleski (Portoriko)", + "en_PW": "engleski (Palau)", + "en_RW": "engleski (Ruanda)", + "en_SB": "engleski (Solomonska Ostrva)", + "en_SC": "engleski (SejÅ¡eli)", + "en_SD": "engleski (Sudan)", + "en_SE": "engleski (Å vedska)", + "en_SG": "engleski (Singapur)", + "en_SH": "engleski (Sveta Jelena)", + "en_SI": "engleski (Slovenija)", + "en_SL": "engleski (Sijera Leone)", + "en_SS": "engleski (Južni Sudan)", + "en_SX": "engleski (Sveti Martin (Holandija))", + "en_SZ": "engleski (Svazilend)", + "en_TC": "engleski (Ostrva Turks i Kaikos)", + "en_TK": "engleski (Tokelau)", + "en_TO": "engleski (Tonga)", + "en_TT": "engleski (Trinidad i Tobago)", + "en_TV": "engleski (Tuvalu)", + "en_TZ": "engleski (Tanzanija)", + "en_UG": "engleski (Uganda)", + "en_UM": "engleski (Udaljena ostrva SAD)", + "en_US": "engleski (Sjedinjene Države)", + "en_VC": "engleski (Sent Vinsent i Grenadini)", + "en_VG": "engleski (Britanska DeviÄanska Ostrva)", + "en_VI": "engleski (AmeriÄka DeviÄanska Ostrva)", + "en_VU": "engleski (Vanuatu)", + "en_WS": "engleski (Samoa)", + "en_ZA": "engleski (JužnoafriÄka Republika)", + "en_ZM": "engleski (Zambija)", + "en_ZW": "engleski (Zimbabve)", + "eo": "esperanto", + "es": "Å¡panski", + "es_AR": "Å¡panski (Argentina)", + "es_BO": "Å¡panski (Bolivija)", + "es_BR": "Å¡panski (Brazil)", + "es_CL": "Å¡panski (ÄŒile)", + "es_CO": "Å¡panski (Kolumbija)", + "es_CR": "Å¡panski (Kostarika)", + "es_CU": "Å¡panski (Kuba)", + "es_DO": "Å¡panski (Dominikanska Republika)", + "es_EA": "Å¡panski (Seuta i Melilja)", + "es_EC": "Å¡panski (Ekvador)", + "es_ES": "Å¡panski (Å panija)", + "es_GQ": "Å¡panski (Ekvatorijalna Gvineja)", + "es_GT": "Å¡panski (Gvatemala)", + "es_HN": "Å¡panski (Honduras)", + "es_IC": "Å¡panski (Kanarska Ostrva)", + "es_MX": "Å¡panski (Meksiko)", + "es_NI": "Å¡panski (Nikaragva)", + "es_PA": "Å¡panski (Panama)", + "es_PE": "Å¡panski (Peru)", + "es_PH": "Å¡panski (Filipini)", + "es_PR": "Å¡panski (Portoriko)", + "es_PY": "Å¡panski (Paragvaj)", + "es_SV": "Å¡panski (Salvador)", + "es_US": "Å¡panski (Sjedinjene Države)", + "es_UY": "Å¡panski (Urugvaj)", + "es_VE": "Å¡panski (Venecuela)", + "et": "estonski", + "et_EE": "estonski (Estonija)", + "eu": "baskijski", + "eu_ES": "baskijski (Å panija)", + "fa": "persijski", + "fa_AF": "persijski (Avganistan)", + "fa_IR": "persijski (Iran)", + "ff": "fula", + "ff_CM": "fula (Kamerun)", + "ff_GN": "fula (Gvineja)", + "ff_MR": "fula (Mauritanija)", + "ff_SN": "fula (Senegal)", + "fi": "finski", + "fi_FI": "finski (Finska)", + "fo": "farski", + "fo_DK": "farski (Danska)", + "fo_FO": "farski (Farska Ostrva)", + "fr": "francuski", + "fr_BE": "francuski (Belgija)", + "fr_BF": "francuski (Burkina Faso)", + "fr_BI": "francuski (Burundi)", + "fr_BJ": "francuski (Benin)", + "fr_BL": "francuski (Sen Bartelemi)", + "fr_CA": "francuski (Kanada)", + "fr_CD": "francuski (Kongo - KinÅ¡asa)", + "fr_CF": "francuski (CentralnoafriÄka Republika)", + "fr_CG": "francuski (Kongo - Brazavil)", + "fr_CH": "francuski (Å vajcarska)", + "fr_CI": "francuski (Obala SlonovaÄe)", + "fr_CM": "francuski (Kamerun)", + "fr_DJ": "francuski (Džibuti)", + "fr_DZ": "francuski (Alžir)", + "fr_FR": "francuski (Francuska)", + "fr_GA": "francuski (Gabon)", + "fr_GF": "francuski (Francuska Gvajana)", + "fr_GN": "francuski (Gvineja)", + "fr_GP": "francuski (Gvadelup)", + "fr_GQ": "francuski (Ekvatorijalna Gvineja)", + "fr_HT": "francuski (Haiti)", + "fr_KM": "francuski (Komorska Ostrva)", + "fr_LU": "francuski (Luksemburg)", + "fr_MA": "francuski (Maroko)", + "fr_MC": "francuski (Monako)", + "fr_MF": "francuski (Sveti Martin (Francuska))", + "fr_MG": "francuski (Madagaskar)", + "fr_ML": "francuski (Mali)", + "fr_MQ": "francuski (Martinik)", + "fr_MR": "francuski (Mauritanija)", + "fr_MU": "francuski (Mauricijus)", + "fr_NC": "francuski (Nova Kaledonija)", + "fr_NE": "francuski (Niger)", + "fr_PF": "francuski (Francuska Polinezija)", + "fr_PM": "francuski (Sen Pjer i Mikelon)", + "fr_RE": "francuski (Reinion)", + "fr_RW": "francuski (Ruanda)", + "fr_SC": "francuski (SejÅ¡eli)", + "fr_SN": "francuski (Senegal)", + "fr_SY": "francuski (Sirija)", + "fr_TD": "francuski (ÄŒad)", + "fr_TG": "francuski (Togo)", + "fr_TN": "francuski (Tunis)", + "fr_VU": "francuski (Vanuatu)", + "fr_WF": "francuski (Valis i Futuna)", + "fr_YT": "francuski (Majot)", + "fy": "zapadni frizijski", + "fy_NL": "zapadni frizijski (Holandija)", + "ga": "irski", + "ga_IE": "irski (Irska)", + "gd": "Å¡kotski gelski", + "gd_GB": "Å¡kotski gelski (Ujedinjeno Kraljevstvo)", + "gl": "galicijski", + "gl_ES": "galicijski (Å panija)", + "gu": "gudžarati", + "gu_IN": "gudžarati (Indija)", + "gv": "manks", + "gv_IM": "manks (Ostrvo Man)", + "ha": "hausa", + "ha_GH": "hausa (Gana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigerija)", + "he": "hebrejski", + "he_IL": "hebrejski (Izrael)", + "hi": "hindi", + "hi_IN": "hindi (Indija)", + "hr": "hrvatski", + "hr_BA": "hrvatski (Bosna i Hercegovina)", + "hr_HR": "hrvatski (Hrvatska)", + "hu": "maÄ‘arski", + "hu_HU": "maÄ‘arski (MaÄ‘arska)", + "hy": "jermenski", + "hy_AM": "jermenski (Jermenija)", + "id": "indonežanski", + "id_ID": "indonežanski (Indonezija)", + "ig": "igbo", + "ig_NG": "igbo (Nigerija)", + "ii": "seÄuanski ji", + "ii_CN": "seÄuanski ji (Kina)", + "is": "islandski", + "is_IS": "islandski (Island)", + "it": "italijanski", + "it_CH": "italijanski (Å vajcarska)", + "it_IT": "italijanski (Italija)", + "it_SM": "italijanski (San Marino)", + "ja": "japanski", + "ja_JP": "japanski (Japan)", + "ka": "gruzijski", + "ka_GE": "gruzijski (Gruzija)", + "ki": "kikuju", + "ki_KE": "kikuju (Kenija)", + "kk": "kazaÅ¡ki", + "kk_KZ": "kazaÅ¡ki (Kazahstan)", + "kl": "grenlandski", + "kl_GL": "grenlandski (Grenland)", + "km": "kmerski", + "km_KH": "kmerski (Kambodža)", + "kn": "kanada", + "kn_IN": "kanada (Indija)", + "ko": "korejski", + "ko_KP": "korejski (Severna Koreja)", + "ko_KR": "korejski (Južna Koreja)", + "ks": "kaÅ¡mirski", + "ks_IN": "kaÅ¡mirski (Indija)", + "kw": "kornvolski", + "kw_GB": "kornvolski (Ujedinjeno Kraljevstvo)", + "ky": "kirgiski", + "ky_KG": "kirgiski (Kirgistan)", + "lb": "luksemburÅ¡ki", + "lb_LU": "luksemburÅ¡ki (Luksemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongo - KinÅ¡asa)", + "ln_CF": "lingala (CentralnoafriÄka Republika)", + "ln_CG": "lingala (Kongo - Brazavil)", + "lo": "laoski", + "lo_LA": "laoski (Laos)", + "lt": "litvanski", + "lt_LT": "litvanski (Litvanija)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Kongo - KinÅ¡asa)", + "lv": "letonski", + "lv_LV": "letonski (Letonija)", + "mg": "malgaÅ¡ki", + "mg_MG": "malgaÅ¡ki (Madagaskar)", + "mk": "makedonski", + "mk_MK": "makedonski (Makedonija)", + "ml": "malajalam", + "ml_IN": "malajalam (Indija)", + "mn": "mongolski", + "mn_MN": "mongolski (Mongolija)", + "mr": "marati", + "mr_IN": "marati (Indija)", + "ms": "malajski", + "ms_BN": "malajski (Brunej)", + "ms_MY": "malajski (Malezija)", + "ms_SG": "malajski (Singapur)", + "mt": "malteÅ¡ki", + "mt_MT": "malteÅ¡ki (Malta)", + "my": "burmanski", + "my_MM": "burmanski (Mijanmar (Burma))", + "nb": "norveÅ¡ki bukmol", + "nb_NO": "norveÅ¡ki bukmol (NorveÅ¡ka)", + "nb_SJ": "norveÅ¡ki bukmol (Svalbard i Jan Majen)", + "nd": "severni ndebele", + "nd_ZW": "severni ndebele (Zimbabve)", + "ne": "nepalski", + "ne_IN": "nepalski (Indija)", + "ne_NP": "nepalski (Nepal)", + "nl": "holandski", + "nl_AW": "holandski (Aruba)", + "nl_BE": "holandski (Belgija)", + "nl_BQ": "holandski (Karipska Holandija)", + "nl_CW": "holandski (Kurasao)", + "nl_NL": "holandski (Holandija)", + "nl_SR": "holandski (Surinam)", + "nl_SX": "holandski (Sveti Martin (Holandija))", + "nn": "norveÅ¡ki ninorsk", + "nn_NO": "norveÅ¡ki ninorsk (NorveÅ¡ka)", + "no": "norveÅ¡ki", + "no_NO": "norveÅ¡ki (NorveÅ¡ka)", + "om": "oromo", + "om_ET": "oromo (Etiopija)", + "om_KE": "oromo (Kenija)", + "or": "odija", + "or_IN": "odija (Indija)", + "os": "osetinski", + "os_GE": "osetinski (Gruzija)", + "os_RU": "osetinski (Rusija)", + "pa": "pendžapski", + "pa_Arab": "pendžapski (arapsko pismo)", + "pa_Arab_PK": "pendžapski (arapsko pismo, Pakistan)", + "pa_Guru": "pendžapski (gurmuki pismo)", + "pa_Guru_IN": "pendžapski (gurmuki pismo, Indija)", + "pa_IN": "pendžapski (Indija)", + "pa_PK": "pendžapski (Pakistan)", + "pl": "poljski", + "pl_PL": "poljski (Poljska)", + "ps": "paÅ¡tunski", + "ps_AF": "paÅ¡tunski (Avganistan)", + "pt": "portugalski", + "pt_AO": "portugalski (Angola)", + "pt_BR": "portugalski (Brazil)", + "pt_CH": "portugalski (Å vajcarska)", + "pt_CV": "portugalski (Zelenortska Ostrva)", + "pt_GQ": "portugalski (Ekvatorijalna Gvineja)", + "pt_GW": "portugalski (Gvineja-Bisao)", + "pt_LU": "portugalski (Luksemburg)", + "pt_MO": "portugalski (SAR Makao (Kina))", + "pt_MZ": "portugalski (Mozambik)", + "pt_PT": "portugalski (Portugalija)", + "pt_ST": "portugalski (Sao Tome i Principe)", + "pt_TL": "portugalski (IstoÄni Timor)", + "qu": "keÄua", + "qu_BO": "keÄua (Bolivija)", + "qu_EC": "keÄua (Ekvador)", + "qu_PE": "keÄua (Peru)", + "rm": "romanÅ¡", + "rm_CH": "romanÅ¡ (Å vajcarska)", + "rn": "kirundi", + "rn_BI": "kirundi (Burundi)", + "ro": "rumunski", + "ro_MD": "rumunski (Moldavija)", + "ro_RO": "rumunski (Rumunija)", + "ru": "ruski", + "ru_BY": "ruski (Belorusija)", + "ru_KG": "ruski (Kirgistan)", + "ru_KZ": "ruski (Kazahstan)", + "ru_MD": "ruski (Moldavija)", + "ru_RU": "ruski (Rusija)", + "ru_UA": "ruski (Ukrajina)", + "rw": "kinjaruanda", + "rw_RW": "kinjaruanda (Ruanda)", + "se": "severni sami", + "se_FI": "severni sami (Finska)", + "se_NO": "severni sami (NorveÅ¡ka)", + "se_SE": "severni sami (Å vedska)", + "sg": "sango", + "sg_CF": "sango (CentralnoafriÄka Republika)", + "sh": "srpskohrvatski", + "sh_BA": "srpskohrvatski (Bosna i Hercegovina)", + "si": "sinhaleÅ¡ki", + "si_LK": "sinhaleÅ¡ki (Å ri Lanka)", + "sk": "slovaÄki", + "sk_SK": "slovaÄki (SlovaÄka)", + "sl": "slovenaÄki", + "sl_SI": "slovenaÄki (Slovenija)", + "sn": "Å¡ona", + "sn_ZW": "Å¡ona (Zimbabve)", + "so": "somalski", + "so_DJ": "somalski (Džibuti)", + "so_ET": "somalski (Etiopija)", + "so_KE": "somalski (Kenija)", + "so_SO": "somalski (Somalija)", + "sq": "albanski", + "sq_AL": "albanski (Albanija)", + "sq_MK": "albanski (Makedonija)", + "sq_XK": "albanski (Kosovo)", + "sr": "srpski", + "sr_BA": "srpski (Bosna i Hercegovina)", + "sr_Cyrl": "srpski (ćirilica)", + "sr_Cyrl_BA": "srpski (ćirilica, Bosna i Hercegovina)", + "sr_Cyrl_ME": "srpski (ćirilica, Crna Gora)", + "sr_Cyrl_RS": "srpski (ćirilica, Srbija)", + "sr_Cyrl_XK": "srpski (ćirilica, Kosovo)", + "sr_Latn": "srpski (latinica)", + "sr_Latn_BA": "srpski (latinica, Bosna i Hercegovina)", + "sr_Latn_ME": "srpski (latinica, Crna Gora)", + "sr_Latn_RS": "srpski (latinica, Srbija)", + "sr_Latn_XK": "srpski (latinica, Kosovo)", + "sr_ME": "srpski (Crna Gora)", + "sr_RS": "srpski (Srbija)", + "sr_XK": "srpski (Kosovo)", + "sv": "Å¡vedski", + "sv_AX": "Å¡vedski (Olandska Ostrva)", + "sv_FI": "Å¡vedski (Finska)", + "sv_SE": "Å¡vedski (Å vedska)", + "sw": "svahili", + "sw_CD": "svahili (Kongo - KinÅ¡asa)", + "sw_KE": "svahili (Kenija)", + "sw_TZ": "svahili (Tanzanija)", + "sw_UG": "svahili (Uganda)", + "ta": "tamilski", + "ta_IN": "tamilski (Indija)", + "ta_LK": "tamilski (Å ri Lanka)", + "ta_MY": "tamilski (Malezija)", + "ta_SG": "tamilski (Singapur)", + "te": "telugu", + "te_IN": "telugu (Indija)", + "th": "tajski", + "th_TH": "tajski (Tajland)", + "ti": "tigrinja", + "ti_ER": "tigrinja (Eritreja)", + "ti_ET": "tigrinja (Etiopija)", + "tl": "tagalog", + "tl_PH": "tagalog (Filipini)", + "to": "tonganski", + "to_TO": "tonganski (Tonga)", + "tr": "turski", + "tr_CY": "turski (Kipar)", + "tr_TR": "turski (Turska)", + "ug": "ujgurski", + "ug_CN": "ujgurski (Kina)", + "uk": "ukrajinski", + "uk_UA": "ukrajinski (Ukrajina)", + "ur": "urdu", + "ur_IN": "urdu (Indija)", + "ur_PK": "urdu (Pakistan)", + "uz": "uzbeÄki", + "uz_AF": "uzbeÄki (Avganistan)", + "uz_Arab": "uzbeÄki (arapsko pismo)", + "uz_Arab_AF": "uzbeÄki (arapsko pismo, Avganistan)", + "uz_Cyrl": "uzbeÄki (ćirilica)", + "uz_Cyrl_UZ": "uzbeÄki (ćirilica, Uzbekistan)", + "uz_Latn": "uzbeÄki (latinica)", + "uz_Latn_UZ": "uzbeÄki (latinica, Uzbekistan)", + "uz_UZ": "uzbeÄki (Uzbekistan)", + "vi": "vijetnamski", + "vi_VN": "vijetnamski (Vijetnam)", + "yi": "jidiÅ¡", + "yo": "joruba", + "yo_BJ": "joruba (Benin)", + "yo_NG": "joruba (Nigerija)", + "zh": "kineski", + "zh_CN": "kineski (Kina)", + "zh_HK": "kineski (SAR Hongkong (Kina))", + "zh_Hans": "kineski (pojednostavljeno kinesko pismo)", + "zh_Hans_CN": "kineski (pojednostavljeno kinesko pismo, Kina)", + "zh_Hans_HK": "kineski (pojednostavljeno kinesko pismo, SAR Hongkong (Kina))", + "zh_Hans_MO": "kineski (pojednostavljeno kinesko pismo, SAR Makao (Kina))", + "zh_Hans_SG": "kineski (pojednostavljeno kinesko pismo, Singapur)", + "zh_Hant": "kineski (tradicionalno kinesko pismo)", + "zh_Hant_HK": "kineski (tradicionalno kinesko pismo, SAR Hongkong (Kina))", + "zh_Hant_MO": "kineski (tradicionalno kinesko pismo, SAR Makao (Kina))", + "zh_Hant_TW": "kineski (tradicionalno kinesko pismo, Tajvan)", + "zh_MO": "kineski (SAR Makao (Kina))", + "zh_SG": "kineski (Singapur)", + "zh_TW": "kineski (Tajvan)", + "zu": "zulu", + "zu_ZA": "zulu (JužnoafriÄka Republika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..e1470d53a8b9811692ebf3b0272d6cfc525d0058 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_BA.json @@ -0,0 +1,38 @@ +{ + "Names": { + "be": "bjeloruski", + "be_BY": "bjeloruski (Bjelorusija)", + "bm": "bamanankan", + "bm_ML": "bamanankan (Mali)", + "bn": "bangla", + "bn_BD": "bangla (BangladeÅ¡)", + "bn_IN": "bangla (Indija)", + "cs_CZ": "ÄeÅ¡ki (ÄŒeÅ¡ka Republika)", + "de_DE": "nemaÄki (NjemaÄka)", + "en_DE": "engleski (NjemaÄka)", + "en_KN": "engleski (Sveti Kits i Nevis)", + "en_MO": "engleski (SAR Makao)", + "en_UM": "engleski (Manja udaljena ostrva SAD)", + "en_VC": "engleski (Sveti Vinsent i Grenadini)", + "en_VG": "engleski (Britanska DjeviÄanska Ostrva)", + "en_VI": "engleski (AmeriÄka DjeviÄanska Ostrva)", + "fr_CG": "francuski (Kongo)", + "fr_CI": "francuski (Obala SlonovaÄe (Kot d’Ivoar))", + "fr_PM": "francuski (Sveti Pjer i Mikelon)", + "fr_RE": "francuski (Reunion)", + "ln_CG": "lingala (Kongo)", + "lo": "laoÅ¡ki", + "lo_LA": "laoÅ¡ki (Laos)", + "pt_CV": "portugalski (Kabo Verde)", + "pt_MO": "portugalski (SAR Makao)", + "pt_TL": "portugalski (Timor-Leste (IstoÄni Timor))", + "ru_BY": "ruski (Bjelorusija)", + "si": "sinhalski", + "si_LK": "sinhalski (Å ri Lanka)", + "zh_Hans_MO": "kineski (pojednostavljeno kinesko pismo, SAR Makao)", + "zh_Hant_MO": "kineski (tradicionalno kinesko pismo, SAR Makao)", + "zh_MO": "kineski (SAR Makao)", + "zu": "isizulu", + "zu_ZA": "isizulu (JužnoafriÄka Republika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_CS.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_CS.json new file mode 100644 index 0000000000000000000000000000000000000000..90df436a701afb72840996a8cffed4189c8a62a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_CS.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Latn_RS" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_ME.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_ME.json new file mode 100644 index 0000000000000000000000000000000000000000..6cbabe91fc38266a7c250d06ae62f4c8b87977b4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_ME.json @@ -0,0 +1,35 @@ +{ + "Names": { + "be": "bjeloruski", + "be_BY": "bjeloruski (Bjelorusija)", + "bm": "bamanankan", + "bm_ML": "bamanankan (Mali)", + "bn": "bangla", + "bn_BD": "bangla (BangladeÅ¡)", + "bn_IN": "bangla (Indija)", + "cs_CZ": "ÄeÅ¡ki (ÄŒeÅ¡ka Republika)", + "de_DE": "nemaÄki (NjemaÄka)", + "en_DE": "engleski (NjemaÄka)", + "en_KN": "engleski (Sveti Kits i Nevis)", + "en_UM": "engleski (Manja udaljena ostrva SAD)", + "en_VC": "engleski (Sveti Vinsent i Grenadini)", + "en_VG": "engleski (Britanska DjeviÄanska Ostrva)", + "en_VI": "engleski (AmeriÄka DjeviÄanska Ostrva)", + "ff": "fulah", + "ff_CM": "fulah (Kamerun)", + "ff_GN": "fulah (Gvineja)", + "ff_MR": "fulah (Mauritanija)", + "ff_SN": "fulah (Senegal)", + "fr_CG": "francuski (Kongo)", + "fr_CI": "francuski (Obala SlonovaÄe (Kot d’Ivoar))", + "fr_PM": "francuski (Sveti Pjer i Mikelon)", + "fr_RE": "francuski (Reunion)", + "ln_CG": "lingala (Kongo)", + "lo": "laoÅ¡ki", + "lo_LA": "laoÅ¡ki (Laos)", + "pt_TL": "portugalski (Timor-Leste (IstoÄni Timor))", + "ru_BY": "ruski (Bjelorusija)", + "zu": "isizulu", + "zu_ZA": "isizulu (JužnoafriÄka Republika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_XK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_XK.json new file mode 100644 index 0000000000000000000000000000000000000000..b1b87befcf6fb0d72a2c60ad69e44b14f093a8a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_XK.json @@ -0,0 +1,40 @@ +{ + "Names": { + "bm": "bamanankan", + "bm_ML": "bamanankan (Mali)", + "bn": "bangla", + "bn_BD": "bangla (BangladeÅ¡)", + "bn_IN": "bangla (Indija)", + "cs_CZ": "ÄeÅ¡ki (ÄŒeÅ¡ka Republika)", + "en_HK": "engleski (SAR Hongkong)", + "en_KN": "engleski (Sveti Kits i Nevis)", + "en_MO": "engleski (SAR Makao)", + "en_UM": "engleski (Manja udaljena ostrva SAD)", + "en_VC": "engleski (Sveti Vinsent i Grenadini)", + "ff": "fulah", + "ff_CM": "fulah (Kamerun)", + "ff_GN": "fulah (Gvineja)", + "ff_MR": "fulah (Mauritanija)", + "ff_SN": "fulah (Senegal)", + "fr_CG": "francuski (Kongo)", + "fr_CI": "francuski (Obala SlonovaÄe (Kot d’Ivoar))", + "fr_PM": "francuski (Sveti Pjer i Mikelon)", + "fr_RE": "francuski (Reunion)", + "ln_CG": "lingala (Kongo)", + "lo": "laoÅ¡ki", + "lo_LA": "laoÅ¡ki (Laos)", + "pt_CV": "portugalski (Kabo Verde)", + "pt_MO": "portugalski (SAR Makao)", + "pt_TL": "portugalski (Timor-Leste (IstoÄni Timor))", + "si": "sinhalski", + "si_LK": "sinhalski (Å ri Lanka)", + "zh_HK": "kineski (SAR Hongkong)", + "zh_Hans_HK": "kineski (pojednostavljeno kinesko pismo, SAR Hongkong)", + "zh_Hans_MO": "kineski (pojednostavljeno kinesko pismo, SAR Makao)", + "zh_Hant_HK": "kineski (tradicionalno kinesko pismo, SAR Hongkong)", + "zh_Hant_MO": "kineski (tradicionalno kinesko pismo, SAR Makao)", + "zh_MO": "kineski (SAR Makao)", + "zu": "isizulu", + "zu_ZA": "isizulu (JužnoafriÄka Republika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_YU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_YU.json new file mode 100644 index 0000000000000000000000000000000000000000..90df436a701afb72840996a8cffed4189c8a62a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_YU.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Latn_RS" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_ME.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_ME.json new file mode 100644 index 0000000000000000000000000000000000000000..afb199f8fe88bddd743b2fce02b18d376f33385a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_ME.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Latn_ME" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_RS.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_RS.json new file mode 100644 index 0000000000000000000000000000000000000000..ea9adc0ba7cba3e5dd60d2276d892593f96d68e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_RS.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Cyrl_RS" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_XK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_XK.json new file mode 100644 index 0000000000000000000000000000000000000000..0219f846e19581a5f915613b4bd9bb71972ab33c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_XK.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Cyrl_XK" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_YU.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_YU.json new file mode 100644 index 0000000000000000000000000000000000000000..ea9adc0ba7cba3e5dd60d2276d892593f96d68e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sr_YU.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "sr_Cyrl_RS" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sv.json new file mode 100644 index 0000000000000000000000000000000000000000..03e19b6fea1c3f506c2fd6636fb3eb7601b21066 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sv.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibia)", + "af_ZA": "afrikaans (Sydafrika)", + "ak": "akan", + "ak_GH": "akan (Ghana)", + "am": "amhariska", + "am_ET": "amhariska (Etiopien)", + "ar": "arabiska", + "ar_AE": "arabiska (Förenade Arabemiraten)", + "ar_BH": "arabiska (Bahrain)", + "ar_DJ": "arabiska (Djibouti)", + "ar_DZ": "arabiska (Algeriet)", + "ar_EG": "arabiska (Egypten)", + "ar_EH": "arabiska (Västsahara)", + "ar_ER": "arabiska (Eritrea)", + "ar_IL": "arabiska (Israel)", + "ar_IQ": "arabiska (Irak)", + "ar_JO": "arabiska (Jordanien)", + "ar_KM": "arabiska (Komorerna)", + "ar_KW": "arabiska (Kuwait)", + "ar_LB": "arabiska (Libanon)", + "ar_LY": "arabiska (Libyen)", + "ar_MA": "arabiska (Marocko)", + "ar_MR": "arabiska (Mauretanien)", + "ar_OM": "arabiska (Oman)", + "ar_PS": "arabiska (Palestinska territorierna)", + "ar_QA": "arabiska (Qatar)", + "ar_SA": "arabiska (Saudiarabien)", + "ar_SD": "arabiska (Sudan)", + "ar_SO": "arabiska (Somalia)", + "ar_SS": "arabiska (Sydsudan)", + "ar_SY": "arabiska (Syrien)", + "ar_TD": "arabiska (Tchad)", + "ar_TN": "arabiska (Tunisien)", + "ar_YE": "arabiska (Jemen)", + "as": "assamesiska", + "as_IN": "assamesiska (Indien)", + "az": "azerbajdzjanska", + "az_AZ": "azerbajdzjanska (Azerbajdzjan)", + "az_Cyrl": "azerbajdzjanska (kyrilliska)", + "az_Cyrl_AZ": "azerbajdzjanska (kyrilliska, Azerbajdzjan)", + "az_Latn": "azerbajdzjanska (latinska)", + "az_Latn_AZ": "azerbajdzjanska (latinska, Azerbajdzjan)", + "be": "vitryska", + "be_BY": "vitryska (Vitryssland)", + "bg": "bulgariska", + "bg_BG": "bulgariska (Bulgarien)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengali", + "bn_BD": "bengali (Bangladesh)", + "bn_IN": "bengali (Indien)", + "bo": "tibetanska", + "bo_CN": "tibetanska (Kina)", + "bo_IN": "tibetanska (Indien)", + "br": "bretonska", + "br_FR": "bretonska (Frankrike)", + "bs": "bosniska", + "bs_BA": "bosniska (Bosnien och Hercegovina)", + "bs_Cyrl": "bosniska (kyrilliska)", + "bs_Cyrl_BA": "bosniska (kyrilliska, Bosnien och Hercegovina)", + "bs_Latn": "bosniska (latinska)", + "bs_Latn_BA": "bosniska (latinska, Bosnien och Hercegovina)", + "ca": "katalanska", + "ca_AD": "katalanska (Andorra)", + "ca_ES": "katalanska (Spanien)", + "ca_FR": "katalanska (Frankrike)", + "ca_IT": "katalanska (Italien)", + "ce": "tjetjenska", + "ce_RU": "tjetjenska (Ryssland)", + "cs": "tjeckiska", + "cs_CZ": "tjeckiska (Tjeckien)", + "cy": "walesiska", + "cy_GB": "walesiska (Storbritannien)", + "da": "danska", + "da_DK": "danska (Danmark)", + "da_GL": "danska (Grönland)", + "de": "tyska", + "de_AT": "tyska (Österrike)", + "de_BE": "tyska (Belgien)", + "de_CH": "tyska (Schweiz)", + "de_DE": "tyska (Tyskland)", + "de_IT": "tyska (Italien)", + "de_LI": "tyska (Liechtenstein)", + "de_LU": "tyska (Luxemburg)", + "dz": "dzongkha", + "dz_BT": "dzongkha (Bhutan)", + "ee": "ewe", + "ee_GH": "ewe (Ghana)", + "ee_TG": "ewe (Togo)", + "el": "grekiska", + "el_CY": "grekiska (Cypern)", + "el_GR": "grekiska (Grekland)", + "en": "engelska", + "en_AG": "engelska (Antigua och Barbuda)", + "en_AI": "engelska (Anguilla)", + "en_AS": "engelska (Amerikanska Samoa)", + "en_AT": "engelska (Österrike)", + "en_AU": "engelska (Australien)", + "en_BB": "engelska (Barbados)", + "en_BE": "engelska (Belgien)", + "en_BI": "engelska (Burundi)", + "en_BM": "engelska (Bermuda)", + "en_BS": "engelska (Bahamas)", + "en_BW": "engelska (Botswana)", + "en_BZ": "engelska (Belize)", + "en_CA": "engelska (Kanada)", + "en_CC": "engelska (Kokosöarna)", + "en_CH": "engelska (Schweiz)", + "en_CK": "engelska (Cooköarna)", + "en_CM": "engelska (Kamerun)", + "en_CX": "engelska (Julön)", + "en_CY": "engelska (Cypern)", + "en_DE": "engelska (Tyskland)", + "en_DG": "engelska (Diego Garcia)", + "en_DK": "engelska (Danmark)", + "en_DM": "engelska (Dominica)", + "en_ER": "engelska (Eritrea)", + "en_FI": "engelska (Finland)", + "en_FJ": "engelska (Fiji)", + "en_FK": "engelska (Falklandsöarna)", + "en_FM": "engelska (Mikronesien)", + "en_GB": "engelska (Storbritannien)", + "en_GD": "engelska (Grenada)", + "en_GG": "engelska (Guernsey)", + "en_GH": "engelska (Ghana)", + "en_GI": "engelska (Gibraltar)", + "en_GM": "engelska (Gambia)", + "en_GU": "engelska (Guam)", + "en_GY": "engelska (Guyana)", + "en_HK": "engelska (Hongkong, S.A.R. Kina)", + "en_IE": "engelska (Irland)", + "en_IL": "engelska (Israel)", + "en_IM": "engelska (Isle of Man)", + "en_IN": "engelska (Indien)", + "en_IO": "engelska (Brittiska territoriet i Indiska oceanen)", + "en_JE": "engelska (Jersey)", + "en_JM": "engelska (Jamaica)", + "en_KE": "engelska (Kenya)", + "en_KI": "engelska (Kiribati)", + "en_KN": "engelska (S:t Kitts och Nevis)", + "en_KY": "engelska (Caymanöarna)", + "en_LC": "engelska (S:t Lucia)", + "en_LR": "engelska (Liberia)", + "en_LS": "engelska (Lesotho)", + "en_MG": "engelska (Madagaskar)", + "en_MH": "engelska (Marshallöarna)", + "en_MO": "engelska (Macao, S.A.R. Kina)", + "en_MP": "engelska (Nordmarianerna)", + "en_MS": "engelska (Montserrat)", + "en_MT": "engelska (Malta)", + "en_MU": "engelska (Mauritius)", + "en_MW": "engelska (Malawi)", + "en_MY": "engelska (Malaysia)", + "en_NA": "engelska (Namibia)", + "en_NF": "engelska (Norfolkön)", + "en_NG": "engelska (Nigeria)", + "en_NL": "engelska (Nederländerna)", + "en_NR": "engelska (Nauru)", + "en_NU": "engelska (Niue)", + "en_NZ": "engelska (Nya Zeeland)", + "en_PG": "engelska (Papua Nya Guinea)", + "en_PH": "engelska (Filippinerna)", + "en_PK": "engelska (Pakistan)", + "en_PN": "engelska (Pitcairnöarna)", + "en_PR": "engelska (Puerto Rico)", + "en_PW": "engelska (Palau)", + "en_RW": "engelska (Rwanda)", + "en_SB": "engelska (Salomonöarna)", + "en_SC": "engelska (Seychellerna)", + "en_SD": "engelska (Sudan)", + "en_SE": "engelska (Sverige)", + "en_SG": "engelska (Singapore)", + "en_SH": "engelska (S:t Helena)", + "en_SI": "engelska (Slovenien)", + "en_SL": "engelska (Sierra Leone)", + "en_SS": "engelska (Sydsudan)", + "en_SX": "engelska (Sint Maarten)", + "en_SZ": "engelska (Swaziland)", + "en_TC": "engelska (Turks- och Caicosöarna)", + "en_TK": "engelska (Tokelau)", + "en_TO": "engelska (Tonga)", + "en_TT": "engelska (Trinidad och Tobago)", + "en_TV": "engelska (Tuvalu)", + "en_TZ": "engelska (Tanzania)", + "en_UG": "engelska (Uganda)", + "en_UM": "engelska (USA:s yttre öar)", + "en_US": "engelska (USA)", + "en_VC": "engelska (S:t Vincent och Grenadinerna)", + "en_VG": "engelska (Brittiska Jungfruöarna)", + "en_VI": "engelska (Amerikanska Jungfruöarna)", + "en_VU": "engelska (Vanuatu)", + "en_WS": "engelska (Samoa)", + "en_ZA": "engelska (Sydafrika)", + "en_ZM": "engelska (Zambia)", + "en_ZW": "engelska (Zimbabwe)", + "eo": "esperanto", + "es": "spanska", + "es_AR": "spanska (Argentina)", + "es_BO": "spanska (Bolivia)", + "es_BR": "spanska (Brasilien)", + "es_CL": "spanska (Chile)", + "es_CO": "spanska (Colombia)", + "es_CR": "spanska (Costa Rica)", + "es_CU": "spanska (Kuba)", + "es_DO": "spanska (Dominikanska republiken)", + "es_EA": "spanska (Ceuta och Melilla)", + "es_EC": "spanska (Ecuador)", + "es_ES": "spanska (Spanien)", + "es_GQ": "spanska (Ekvatorialguinea)", + "es_GT": "spanska (Guatemala)", + "es_HN": "spanska (Honduras)", + "es_IC": "spanska (Kanarieöarna)", + "es_MX": "spanska (Mexiko)", + "es_NI": "spanska (Nicaragua)", + "es_PA": "spanska (Panama)", + "es_PE": "spanska (Peru)", + "es_PH": "spanska (Filippinerna)", + "es_PR": "spanska (Puerto Rico)", + "es_PY": "spanska (Paraguay)", + "es_SV": "spanska (El Salvador)", + "es_US": "spanska (USA)", + "es_UY": "spanska (Uruguay)", + "es_VE": "spanska (Venezuela)", + "et": "estniska", + "et_EE": "estniska (Estland)", + "eu": "baskiska", + "eu_ES": "baskiska (Spanien)", + "fa": "persiska", + "fa_AF": "persiska (Afghanistan)", + "fa_IR": "persiska (Iran)", + "ff": "fulani", + "ff_CM": "fulani (Kamerun)", + "ff_GN": "fulani (Guinea)", + "ff_MR": "fulani (Mauretanien)", + "ff_SN": "fulani (Senegal)", + "fi": "finska", + "fi_FI": "finska (Finland)", + "fo": "färöiska", + "fo_DK": "färöiska (Danmark)", + "fo_FO": "färöiska (Färöarna)", + "fr": "franska", + "fr_BE": "franska (Belgien)", + "fr_BF": "franska (Burkina Faso)", + "fr_BI": "franska (Burundi)", + "fr_BJ": "franska (Benin)", + "fr_BL": "franska (S:t Barthélemy)", + "fr_CA": "franska (Kanada)", + "fr_CD": "franska (Kongo-Kinshasa)", + "fr_CF": "franska (Centralafrikanska republiken)", + "fr_CG": "franska (Kongo-Brazzaville)", + "fr_CH": "franska (Schweiz)", + "fr_CI": "franska (Elfenbenskusten)", + "fr_CM": "franska (Kamerun)", + "fr_DJ": "franska (Djibouti)", + "fr_DZ": "franska (Algeriet)", + "fr_FR": "franska (Frankrike)", + "fr_GA": "franska (Gabon)", + "fr_GF": "franska (Franska Guyana)", + "fr_GN": "franska (Guinea)", + "fr_GP": "franska (Guadeloupe)", + "fr_GQ": "franska (Ekvatorialguinea)", + "fr_HT": "franska (Haiti)", + "fr_KM": "franska (Komorerna)", + "fr_LU": "franska (Luxemburg)", + "fr_MA": "franska (Marocko)", + "fr_MC": "franska (Monaco)", + "fr_MF": "franska (Saint-Martin)", + "fr_MG": "franska (Madagaskar)", + "fr_ML": "franska (Mali)", + "fr_MQ": "franska (Martinique)", + "fr_MR": "franska (Mauretanien)", + "fr_MU": "franska (Mauritius)", + "fr_NC": "franska (Nya Kaledonien)", + "fr_NE": "franska (Niger)", + "fr_PF": "franska (Franska Polynesien)", + "fr_PM": "franska (S:t Pierre och Miquelon)", + "fr_RE": "franska (Réunion)", + "fr_RW": "franska (Rwanda)", + "fr_SC": "franska (Seychellerna)", + "fr_SN": "franska (Senegal)", + "fr_SY": "franska (Syrien)", + "fr_TD": "franska (Tchad)", + "fr_TG": "franska (Togo)", + "fr_TN": "franska (Tunisien)", + "fr_VU": "franska (Vanuatu)", + "fr_WF": "franska (Wallis- och Futunaöarna)", + "fr_YT": "franska (Mayotte)", + "fy": "västfrisiska", + "fy_NL": "västfrisiska (Nederländerna)", + "ga": "iriska", + "ga_IE": "iriska (Irland)", + "gd": "skotsk gäliska", + "gd_GB": "skotsk gäliska (Storbritannien)", + "gl": "galiciska", + "gl_ES": "galiciska (Spanien)", + "gu": "gujarati", + "gu_IN": "gujarati (Indien)", + "gv": "manx", + "gv_IM": "manx (Isle of Man)", + "ha": "hausa", + "ha_GH": "hausa (Ghana)", + "ha_NE": "hausa (Niger)", + "ha_NG": "hausa (Nigeria)", + "he": "hebreiska", + "he_IL": "hebreiska (Israel)", + "hi": "hindi", + "hi_IN": "hindi (Indien)", + "hr": "kroatiska", + "hr_BA": "kroatiska (Bosnien och Hercegovina)", + "hr_HR": "kroatiska (Kroatien)", + "hu": "ungerska", + "hu_HU": "ungerska (Ungern)", + "hy": "armeniska", + "hy_AM": "armeniska (Armenien)", + "id": "indonesiska", + "id_ID": "indonesiska (Indonesien)", + "ig": "igbo", + "ig_NG": "igbo (Nigeria)", + "ii": "szezuan i", + "ii_CN": "szezuan i (Kina)", + "is": "isländska", + "is_IS": "isländska (Island)", + "it": "italienska", + "it_CH": "italienska (Schweiz)", + "it_IT": "italienska (Italien)", + "it_SM": "italienska (San Marino)", + "ja": "japanska", + "ja_JP": "japanska (Japan)", + "ka": "georgiska", + "ka_GE": "georgiska (Georgien)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Kenya)", + "kk": "kazakiska", + "kk_KZ": "kazakiska (Kazakstan)", + "kl": "grönländska", + "kl_GL": "grönländska (Grönland)", + "km": "kambodjanska", + "km_KH": "kambodjanska (Kambodja)", + "kn": "kannada", + "kn_IN": "kannada (Indien)", + "ko": "koreanska", + "ko_KP": "koreanska (Nordkorea)", + "ko_KR": "koreanska (Sydkorea)", + "ks": "kashmiriska", + "ks_IN": "kashmiriska (Indien)", + "kw": "korniska", + "kw_GB": "korniska (Storbritannien)", + "ky": "kirgisiska", + "ky_KG": "kirgisiska (Kirgizistan)", + "lb": "luxemburgiska", + "lb_LU": "luxemburgiska (Luxemburg)", + "lg": "luganda", + "lg_UG": "luganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongo-Kinshasa)", + "ln_CF": "lingala (Centralafrikanska republiken)", + "ln_CG": "lingala (Kongo-Brazzaville)", + "lo": "laotiska", + "lo_LA": "laotiska (Laos)", + "lt": "litauiska", + "lt_LT": "litauiska (Litauen)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Kongo-Kinshasa)", + "lv": "lettiska", + "lv_LV": "lettiska (Lettland)", + "mg": "malagassiska", + "mg_MG": "malagassiska (Madagaskar)", + "mk": "makedonska", + "mk_MK": "makedonska (Makedonien)", + "ml": "malayalam", + "ml_IN": "malayalam (Indien)", + "mn": "mongoliska", + "mn_MN": "mongoliska (Mongoliet)", + "mr": "marathi", + "mr_IN": "marathi (Indien)", + "ms": "malajiska", + "ms_BN": "malajiska (Brunei)", + "ms_MY": "malajiska (Malaysia)", + "ms_SG": "malajiska (Singapore)", + "mt": "maltesiska", + "mt_MT": "maltesiska (Malta)", + "my": "burmesiska", + "my_MM": "burmesiska (Myanmar (Burma))", + "nb": "bokmÃ¥l", + "nb_NO": "bokmÃ¥l (Norge)", + "nb_SJ": "bokmÃ¥l (Svalbard och Jan Mayen)", + "nd": "nordndebele", + "nd_ZW": "nordndebele (Zimbabwe)", + "ne": "nepalesiska", + "ne_IN": "nepalesiska (Indien)", + "ne_NP": "nepalesiska (Nepal)", + "nl": "nederländska", + "nl_AW": "nederländska (Aruba)", + "nl_BE": "nederländska (Belgien)", + "nl_BQ": "nederländska (Karibiska Nederländerna)", + "nl_CW": "nederländska (Curaçao)", + "nl_NL": "nederländska (Nederländerna)", + "nl_SR": "nederländska (Surinam)", + "nl_SX": "nederländska (Sint Maarten)", + "nn": "nynorska", + "nn_NO": "nynorska (Norge)", + "no": "norska", + "no_NO": "norska (Norge)", + "om": "oromo", + "om_ET": "oromo (Etiopien)", + "om_KE": "oromo (Kenya)", + "or": "oriya", + "or_IN": "oriya (Indien)", + "os": "ossetiska", + "os_GE": "ossetiska (Georgien)", + "os_RU": "ossetiska (Ryssland)", + "pa": "punjabi", + "pa_Arab": "punjabi (arabiska)", + "pa_Arab_PK": "punjabi (arabiska, Pakistan)", + "pa_Guru": "punjabi (gurmukhi)", + "pa_Guru_IN": "punjabi (gurmukhi, Indien)", + "pa_IN": "punjabi (Indien)", + "pa_PK": "punjabi (Pakistan)", + "pl": "polska", + "pl_PL": "polska (Polen)", + "ps": "afghanska", + "ps_AF": "afghanska (Afghanistan)", + "pt": "portugisiska", + "pt_AO": "portugisiska (Angola)", + "pt_BR": "portugisiska (Brasilien)", + "pt_CH": "portugisiska (Schweiz)", + "pt_CV": "portugisiska (Kap Verde)", + "pt_GQ": "portugisiska (Ekvatorialguinea)", + "pt_GW": "portugisiska (Guinea-Bissau)", + "pt_LU": "portugisiska (Luxemburg)", + "pt_MO": "portugisiska (Macao, S.A.R. Kina)", + "pt_MZ": "portugisiska (Moçambique)", + "pt_PT": "portugisiska (Portugal)", + "pt_ST": "portugisiska (São Tomé och Príncipe)", + "pt_TL": "portugisiska (Östtimor)", + "qu": "quechua", + "qu_BO": "quechua (Bolivia)", + "qu_EC": "quechua (Ecuador)", + "qu_PE": "quechua (Peru)", + "rm": "rätoromanska", + "rm_CH": "rätoromanska (Schweiz)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumänska", + "ro_MD": "rumänska (Moldavien)", + "ro_RO": "rumänska (Rumänien)", + "ru": "ryska", + "ru_BY": "ryska (Vitryssland)", + "ru_KG": "ryska (Kirgizistan)", + "ru_KZ": "ryska (Kazakstan)", + "ru_MD": "ryska (Moldavien)", + "ru_RU": "ryska (Ryssland)", + "ru_UA": "ryska (Ukraina)", + "rw": "kinjarwanda", + "rw_RW": "kinjarwanda (Rwanda)", + "se": "nordsamiska", + "se_FI": "nordsamiska (Finland)", + "se_NO": "nordsamiska (Norge)", + "se_SE": "nordsamiska (Sverige)", + "sg": "sango", + "sg_CF": "sango (Centralafrikanska republiken)", + "sh": "serbokroatiska", + "sh_BA": "serbokroatiska (Bosnien och Hercegovina)", + "si": "singalesiska", + "si_LK": "singalesiska (Sri Lanka)", + "sk": "slovakiska", + "sk_SK": "slovakiska (Slovakien)", + "sl": "slovenska", + "sl_SI": "slovenska (Slovenien)", + "sn": "shona", + "sn_ZW": "shona (Zimbabwe)", + "so": "somaliska", + "so_DJ": "somaliska (Djibouti)", + "so_ET": "somaliska (Etiopien)", + "so_KE": "somaliska (Kenya)", + "so_SO": "somaliska (Somalia)", + "sq": "albanska", + "sq_AL": "albanska (Albanien)", + "sq_MK": "albanska (Makedonien)", + "sq_XK": "albanska (Kosovo)", + "sr": "serbiska", + "sr_BA": "serbiska (Bosnien och Hercegovina)", + "sr_Cyrl": "serbiska (kyrilliska)", + "sr_Cyrl_BA": "serbiska (kyrilliska, Bosnien och Hercegovina)", + "sr_Cyrl_ME": "serbiska (kyrilliska, Montenegro)", + "sr_Cyrl_RS": "serbiska (kyrilliska, Serbien)", + "sr_Cyrl_XK": "serbiska (kyrilliska, Kosovo)", + "sr_Latn": "serbiska (latinska)", + "sr_Latn_BA": "serbiska (latinska, Bosnien och Hercegovina)", + "sr_Latn_ME": "serbiska (latinska, Montenegro)", + "sr_Latn_RS": "serbiska (latinska, Serbien)", + "sr_Latn_XK": "serbiska (latinska, Kosovo)", + "sr_ME": "serbiska (Montenegro)", + "sr_RS": "serbiska (Serbien)", + "sr_XK": "serbiska (Kosovo)", + "sv": "svenska", + "sv_AX": "svenska (Ã…land)", + "sv_FI": "svenska (Finland)", + "sv_SE": "svenska (Sverige)", + "sw": "swahili", + "sw_CD": "swahili (Kongo-Kinshasa)", + "sw_KE": "swahili (Kenya)", + "sw_TZ": "swahili (Tanzania)", + "sw_UG": "swahili (Uganda)", + "ta": "tamil", + "ta_IN": "tamil (Indien)", + "ta_LK": "tamil (Sri Lanka)", + "ta_MY": "tamil (Malaysia)", + "ta_SG": "tamil (Singapore)", + "te": "telugu", + "te_IN": "telugu (Indien)", + "th": "thailändska", + "th_TH": "thailändska (Thailand)", + "ti": "tigrinja", + "ti_ER": "tigrinja (Eritrea)", + "ti_ET": "tigrinja (Etiopien)", + "tl": "tagalog", + "tl_PH": "tagalog (Filippinerna)", + "to": "tonganska", + "to_TO": "tonganska (Tonga)", + "tr": "turkiska", + "tr_CY": "turkiska (Cypern)", + "tr_TR": "turkiska (Turkiet)", + "ug": "uiguriska", + "ug_CN": "uiguriska (Kina)", + "uk": "ukrainska", + "uk_UA": "ukrainska (Ukraina)", + "ur": "urdu", + "ur_IN": "urdu (Indien)", + "ur_PK": "urdu (Pakistan)", + "uz": "uzbekiska", + "uz_AF": "uzbekiska (Afghanistan)", + "uz_Arab": "uzbekiska (arabiska)", + "uz_Arab_AF": "uzbekiska (arabiska, Afghanistan)", + "uz_Cyrl": "uzbekiska (kyrilliska)", + "uz_Cyrl_UZ": "uzbekiska (kyrilliska, Uzbekistan)", + "uz_Latn": "uzbekiska (latinska)", + "uz_Latn_UZ": "uzbekiska (latinska, Uzbekistan)", + "uz_UZ": "uzbekiska (Uzbekistan)", + "vi": "vietnamesiska", + "vi_VN": "vietnamesiska (Vietnam)", + "yi": "jiddisch", + "yo": "yoruba", + "yo_BJ": "yoruba (Benin)", + "yo_NG": "yoruba (Nigeria)", + "zh": "kinesiska", + "zh_CN": "kinesiska (Kina)", + "zh_HK": "kinesiska (Hongkong, S.A.R. Kina)", + "zh_Hans": "kinesiska (förenklade)", + "zh_Hans_CN": "kinesiska (förenklade, Kina)", + "zh_Hans_HK": "kinesiska (förenklade, Hongkong, S.A.R. Kina)", + "zh_Hans_MO": "kinesiska (förenklade, Macao, S.A.R. Kina)", + "zh_Hans_SG": "kinesiska (förenklade, Singapore)", + "zh_Hant": "kinesiska (traditionella)", + "zh_Hant_HK": "kinesiska (traditionella, Hongkong, S.A.R. Kina)", + "zh_Hant_MO": "kinesiska (traditionella, Macao, S.A.R. Kina)", + "zh_Hant_TW": "kinesiska (traditionella, Taiwan)", + "zh_MO": "kinesiska (Macao, S.A.R. Kina)", + "zh_SG": "kinesiska (Singapore)", + "zh_TW": "kinesiska (Taiwan)", + "zu": "zulu", + "zu_ZA": "zulu (Sydafrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sv_FI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sv_FI.json new file mode 100644 index 0000000000000000000000000000000000000000..cb3d14079a4521d7dcd223cb95e813703447b574 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sv_FI.json @@ -0,0 +1,6 @@ +{ + "Names": { + "ky": "kirgiziska", + "ky_KG": "kirgiziska (Kirgizistan)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sw.json new file mode 100644 index 0000000000000000000000000000000000000000..52afa89d495fc3af9d82825fc77a82eb89dc393e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sw.json @@ -0,0 +1,566 @@ +{ + "Names": { + "af": "Kiafrikana", + "af_NA": "Kiafrikana (Namibia)", + "af_ZA": "Kiafrikana (Afrika Kusini)", + "ak": "Kiakani", + "ak_GH": "Kiakani (Ghana)", + "am": "Kiamhari", + "am_ET": "Kiamhari (Ethiopia)", + "ar": "Kiarabu", + "ar_AE": "Kiarabu (Falme za Kiarabu)", + "ar_BH": "Kiarabu (Bahareni)", + "ar_DJ": "Kiarabu (Jibuti)", + "ar_DZ": "Kiarabu (Aljeria)", + "ar_EG": "Kiarabu (Misri)", + "ar_EH": "Kiarabu (Sahara Magharibi)", + "ar_ER": "Kiarabu (Eritrea)", + "ar_IL": "Kiarabu (Israeli)", + "ar_IQ": "Kiarabu (Iraki)", + "ar_JO": "Kiarabu (Jordan)", + "ar_KM": "Kiarabu (Komoro)", + "ar_KW": "Kiarabu (Kuwait)", + "ar_LB": "Kiarabu (Lebanon)", + "ar_LY": "Kiarabu (Libya)", + "ar_MA": "Kiarabu (Morocco)", + "ar_MR": "Kiarabu (Moritania)", + "ar_OM": "Kiarabu (Oman)", + "ar_PS": "Kiarabu (Maeneo ya Palestina)", + "ar_QA": "Kiarabu (Qatar)", + "ar_SA": "Kiarabu (Saudia)", + "ar_SD": "Kiarabu (Sudan)", + "ar_SO": "Kiarabu (Somalia)", + "ar_SS": "Kiarabu (Sudan Kusini)", + "ar_SY": "Kiarabu (Syria)", + "ar_TD": "Kiarabu (Chad)", + "ar_TN": "Kiarabu (Tunisia)", + "ar_YE": "Kiarabu (Yemeni)", + "as": "Kiassam", + "as_IN": "Kiassam (India)", + "az": "Kiazerbaijani", + "az_AZ": "Kiazerbaijani (Azerbaijan)", + "az_Cyrl": "Kiazerbaijani (Kisiriliki)", + "az_Cyrl_AZ": "Kiazerbaijani (Kisiriliki, Azerbaijan)", + "az_Latn": "Kiazerbaijani (Kilatini)", + "az_Latn_AZ": "Kiazerbaijani (Kilatini, Azerbaijan)", + "be": "Kibelarusi", + "be_BY": "Kibelarusi (Belarusi)", + "bg": "Kibulgaria", + "bg_BG": "Kibulgaria (Bulgaria)", + "bm": "Kibambara", + "bm_ML": "Kibambara (Mali)", + "bn": "Kibengali", + "bn_BD": "Kibengali (Bangladeshi)", + "bn_IN": "Kibengali (India)", + "bo": "Kitibeti", + "bo_CN": "Kitibeti (China)", + "bo_IN": "Kitibeti (India)", + "br": "Kibretoni", + "br_FR": "Kibretoni (Ufaransa)", + "bs": "Kibosnia", + "bs_BA": "Kibosnia (Bosnia na Hezegovina)", + "bs_Cyrl": "Kibosnia (Kisiriliki)", + "bs_Cyrl_BA": "Kibosnia (Kisiriliki, Bosnia na Hezegovina)", + "bs_Latn": "Kibosnia (Kilatini)", + "bs_Latn_BA": "Kibosnia (Kilatini, Bosnia na Hezegovina)", + "ca": "Kikatalani", + "ca_AD": "Kikatalani (Andora)", + "ca_ES": "Kikatalani (Hispania)", + "ca_FR": "Kikatalani (Ufaransa)", + "ca_IT": "Kikatalani (Italia)", + "ce": "Kichechenia", + "ce_RU": "Kichechenia (Urusi)", + "cs": "Kicheki", + "cs_CZ": "Kicheki (Jamhuri ya Cheki)", + "cy": "Kiwelisi", + "cy_GB": "Kiwelisi (Uingereza)", + "da": "Kidenmaki", + "da_DK": "Kidenmaki (Denmark)", + "da_GL": "Kidenmaki (Grinlandi)", + "de": "Kijerumani", + "de_AT": "Kijerumani (Austria)", + "de_BE": "Kijerumani (Ubelgiji)", + "de_CH": "Kijerumani (Uswisi)", + "de_DE": "Kijerumani (Ujerumani)", + "de_IT": "Kijerumani (Italia)", + "de_LI": "Kijerumani (Liechtenstein)", + "de_LU": "Kijerumani (Luxembourg)", + "dz": "Kizongkha", + "dz_BT": "Kizongkha (Bhutan)", + "ee": "Kiewe", + "ee_GH": "Kiewe (Ghana)", + "ee_TG": "Kiewe (Togo)", + "el": "Kigiriki", + "el_CY": "Kigiriki (Cyprus)", + "el_GR": "Kigiriki (Ugiriki)", + "en": "Kiingereza", + "en_AG": "Kiingereza (Antigua na Barbuda)", + "en_AI": "Kiingereza (Anguilla)", + "en_AS": "Kiingereza (Samoa ya Marekani)", + "en_AT": "Kiingereza (Austria)", + "en_AU": "Kiingereza (Australia)", + "en_BB": "Kiingereza (Babadosi)", + "en_BE": "Kiingereza (Ubelgiji)", + "en_BI": "Kiingereza (Burundi)", + "en_BM": "Kiingereza (Bermuda)", + "en_BS": "Kiingereza (Bahama)", + "en_BW": "Kiingereza (Botswana)", + "en_BZ": "Kiingereza (Belize)", + "en_CA": "Kiingereza (Kanada)", + "en_CC": "Kiingereza (Visiwa vya Cocos (Keeling))", + "en_CH": "Kiingereza (Uswisi)", + "en_CK": "Kiingereza (Visiwa vya Cook)", + "en_CM": "Kiingereza (Kameruni)", + "en_CX": "Kiingereza (Kisiwa cha Krismasi)", + "en_CY": "Kiingereza (Cyprus)", + "en_DE": "Kiingereza (Ujerumani)", + "en_DG": "Kiingereza (Diego Garcia)", + "en_DK": "Kiingereza (Denmark)", + "en_DM": "Kiingereza (Dominika)", + "en_ER": "Kiingereza (Eritrea)", + "en_FI": "Kiingereza (Ufini)", + "en_FJ": "Kiingereza (Fiji)", + "en_FK": "Kiingereza (Visiwa vya Falkland)", + "en_FM": "Kiingereza (Mikronesia)", + "en_GB": "Kiingereza (Uingereza)", + "en_GD": "Kiingereza (Grenada)", + "en_GG": "Kiingereza (Guernsey)", + "en_GH": "Kiingereza (Ghana)", + "en_GI": "Kiingereza (Jibralta)", + "en_GM": "Kiingereza (Gambia)", + "en_GU": "Kiingereza (Guam)", + "en_GY": "Kiingereza (Guyana)", + "en_HK": "Kiingereza (Hong Kong SAR China)", + "en_IE": "Kiingereza (Ayalandi)", + "en_IL": "Kiingereza (Israeli)", + "en_IM": "Kiingereza (Isle of Man)", + "en_IN": "Kiingereza (India)", + "en_IO": "Kiingereza (Eneo la Uingereza katika Bahari Hindi)", + "en_JE": "Kiingereza (Jersey)", + "en_JM": "Kiingereza (Jamaika)", + "en_KE": "Kiingereza (Kenya)", + "en_KI": "Kiingereza (Kiribati)", + "en_KN": "Kiingereza (Santakitzi na Nevis)", + "en_KY": "Kiingereza (Visiwa vya Kayman)", + "en_LC": "Kiingereza (Santalusia)", + "en_LR": "Kiingereza (Liberia)", + "en_LS": "Kiingereza (Lesoto)", + "en_MG": "Kiingereza (Madagaska)", + "en_MH": "Kiingereza (Visiwa vya Marshall)", + "en_MO": "Kiingereza (Macau SAR China)", + "en_MP": "Kiingereza (Visiwa vya Mariana vya Kaskazini)", + "en_MS": "Kiingereza (Montserrati)", + "en_MT": "Kiingereza (Malta)", + "en_MU": "Kiingereza (Morisi)", + "en_MW": "Kiingereza (Malawi)", + "en_MY": "Kiingereza (Malesia)", + "en_NA": "Kiingereza (Namibia)", + "en_NF": "Kiingereza (Kisiwa cha Norfolk)", + "en_NG": "Kiingereza (Nigeria)", + "en_NL": "Kiingereza (Uholanzi)", + "en_NR": "Kiingereza (Nauru)", + "en_NU": "Kiingereza (Niue)", + "en_NZ": "Kiingereza (Nyuzilandi)", + "en_PG": "Kiingereza (Papua New Guinea)", + "en_PH": "Kiingereza (Ufilipino)", + "en_PK": "Kiingereza (Pakistani)", + "en_PN": "Kiingereza (Visiwa vya Pitcairn)", + "en_PR": "Kiingereza (Puerto Rico)", + "en_PW": "Kiingereza (Palau)", + "en_RW": "Kiingereza (Rwanda)", + "en_SB": "Kiingereza (Visiwa vya Solomon)", + "en_SC": "Kiingereza (Ushelisheli)", + "en_SD": "Kiingereza (Sudan)", + "en_SE": "Kiingereza (Uswidi)", + "en_SG": "Kiingereza (Singapore)", + "en_SH": "Kiingereza (Santahelena)", + "en_SI": "Kiingereza (Slovenia)", + "en_SL": "Kiingereza (Siera Leoni)", + "en_SS": "Kiingereza (Sudan Kusini)", + "en_SX": "Kiingereza (Sint Maarten)", + "en_SZ": "Kiingereza (Uswazi)", + "en_TC": "Kiingereza (Visiwa vya Turki na Kaiko)", + "en_TK": "Kiingereza (Tokelau)", + "en_TO": "Kiingereza (Tonga)", + "en_TT": "Kiingereza (Trinidad na Tobago)", + "en_TV": "Kiingereza (Tuvalu)", + "en_TZ": "Kiingereza (Tanzania)", + "en_UG": "Kiingereza (Uganda)", + "en_UM": "Kiingereza (Visiwa Vidogo vya Nje vya Marekani)", + "en_US": "Kiingereza (Marekani)", + "en_VC": "Kiingereza (Santavisenti na Grenadini)", + "en_VG": "Kiingereza (Visiwa vya Virgin vya Uingereza)", + "en_VI": "Kiingereza (Visiwa vya Virgin vya Marekani)", + "en_VU": "Kiingereza (Vanuatu)", + "en_WS": "Kiingereza (Samoa)", + "en_ZA": "Kiingereza (Afrika Kusini)", + "en_ZM": "Kiingereza (Zambia)", + "en_ZW": "Kiingereza (Zimbabwe)", + "eo": "Kiesperanto", + "es": "Kihispania", + "es_AR": "Kihispania (Ajentina)", + "es_BO": "Kihispania (Bolivia)", + "es_BR": "Kihispania (Brazili)", + "es_CL": "Kihispania (Chile)", + "es_CO": "Kihispania (Kolombia)", + "es_CR": "Kihispania (Kostarika)", + "es_CU": "Kihispania (Kuba)", + "es_DO": "Kihispania (Jamhuri ya Dominika)", + "es_EA": "Kihispania (Ceuta na Melilla)", + "es_EC": "Kihispania (Ekwado)", + "es_ES": "Kihispania (Hispania)", + "es_GQ": "Kihispania (Ginekweta)", + "es_GT": "Kihispania (Guatemala)", + "es_HN": "Kihispania (Hondurasi)", + "es_IC": "Kihispania (Visiwa vya Kanari)", + "es_MX": "Kihispania (Meksiko)", + "es_NI": "Kihispania (Nikaragwa)", + "es_PA": "Kihispania (Panama)", + "es_PE": "Kihispania (Peru)", + "es_PH": "Kihispania (Ufilipino)", + "es_PR": "Kihispania (Puerto Rico)", + "es_PY": "Kihispania (Paragwai)", + "es_SV": "Kihispania (Elsavado)", + "es_US": "Kihispania (Marekani)", + "es_UY": "Kihispania (Urugwai)", + "es_VE": "Kihispania (Venezuela)", + "et": "Kiestonia", + "et_EE": "Kiestonia (Estonia)", + "eu": "Kibasque", + "eu_ES": "Kibasque (Hispania)", + "fa": "Kiajemi", + "fa_AF": "Kiajemi (Afghanistan)", + "fa_IR": "Kiajemi (Iran)", + "ff": "Kifula", + "ff_CM": "Kifula (Kameruni)", + "ff_GN": "Kifula (Gine)", + "ff_MR": "Kifula (Moritania)", + "ff_SN": "Kifula (Senegali)", + "fi": "Kifini", + "fi_FI": "Kifini (Ufini)", + "fo": "Kifaroe", + "fo_DK": "Kifaroe (Denmark)", + "fo_FO": "Kifaroe (Visiwa vya Faroe)", + "fr": "Kifaransa", + "fr_BE": "Kifaransa (Ubelgiji)", + "fr_BF": "Kifaransa (Bukinafaso)", + "fr_BI": "Kifaransa (Burundi)", + "fr_BJ": "Kifaransa (Benin)", + "fr_BL": "Kifaransa (Santabathelemi)", + "fr_CA": "Kifaransa (Kanada)", + "fr_CD": "Kifaransa (Jamhuri ya Kidemokrasia ya Kongo)", + "fr_CF": "Kifaransa (Jamhuri ya Afrika ya Kati)", + "fr_CG": "Kifaransa (Kongo - Brazzaville)", + "fr_CH": "Kifaransa (Uswisi)", + "fr_CI": "Kifaransa (Côte d’Ivoire)", + "fr_CM": "Kifaransa (Kameruni)", + "fr_DJ": "Kifaransa (Jibuti)", + "fr_DZ": "Kifaransa (Aljeria)", + "fr_FR": "Kifaransa (Ufaransa)", + "fr_GA": "Kifaransa (Gabon)", + "fr_GF": "Kifaransa (Gwiyana ya Ufaransa)", + "fr_GN": "Kifaransa (Gine)", + "fr_GP": "Kifaransa (Guadeloupe)", + "fr_GQ": "Kifaransa (Ginekweta)", + "fr_HT": "Kifaransa (Haiti)", + "fr_KM": "Kifaransa (Komoro)", + "fr_LU": "Kifaransa (Luxembourg)", + "fr_MA": "Kifaransa (Morocco)", + "fr_MC": "Kifaransa (Monako)", + "fr_MF": "Kifaransa (Saint Martin)", + "fr_MG": "Kifaransa (Madagaska)", + "fr_ML": "Kifaransa (Mali)", + "fr_MQ": "Kifaransa (Martiniki)", + "fr_MR": "Kifaransa (Moritania)", + "fr_MU": "Kifaransa (Morisi)", + "fr_NC": "Kifaransa (Nyukaledonia)", + "fr_NE": "Kifaransa (Niger)", + "fr_PF": "Kifaransa (Polinesia ya Ufaransa)", + "fr_PM": "Kifaransa (Santapierre na Miquelon)", + "fr_RE": "Kifaransa (Riyunioni)", + "fr_RW": "Kifaransa (Rwanda)", + "fr_SC": "Kifaransa (Ushelisheli)", + "fr_SN": "Kifaransa (Senegali)", + "fr_SY": "Kifaransa (Syria)", + "fr_TD": "Kifaransa (Chad)", + "fr_TG": "Kifaransa (Togo)", + "fr_TN": "Kifaransa (Tunisia)", + "fr_VU": "Kifaransa (Vanuatu)", + "fr_WF": "Kifaransa (Walis na Futuna)", + "fr_YT": "Kifaransa (Mayotte)", + "fy": "Kifrisia cha Magharibi", + "fy_NL": "Kifrisia cha Magharibi (Uholanzi)", + "ga": "Kiayalandi", + "ga_IE": "Kiayalandi (Ayalandi)", + "gd": "Kigaeli cha Uskoti", + "gd_GB": "Kigaeli cha Uskoti (Uingereza)", + "gl": "Kigalisi", + "gl_ES": "Kigalisi (Hispania)", + "gu": "Kigujarati", + "gu_IN": "Kigujarati (India)", + "gv": "Kimanx", + "gv_IM": "Kimanx (Isle of Man)", + "ha": "Kihausa", + "ha_GH": "Kihausa (Ghana)", + "ha_NE": "Kihausa (Niger)", + "ha_NG": "Kihausa (Nigeria)", + "he": "Kiebrania", + "he_IL": "Kiebrania (Israeli)", + "hi": "Kihindi", + "hi_IN": "Kihindi (India)", + "hr": "Kikroeshia", + "hr_BA": "Kikroeshia (Bosnia na Hezegovina)", + "hr_HR": "Kikroeshia (Korasia)", + "hu": "Kihangari", + "hu_HU": "Kihangari (Hungaria)", + "hy": "Kiarmenia", + "hy_AM": "Kiarmenia (Armenia)", + "id": "Kiindonesia", + "id_ID": "Kiindonesia (Indonesia)", + "ig": "Kiigbo", + "ig_NG": "Kiigbo (Nigeria)", + "ii": "Sichuan Yi", + "ii_CN": "Sichuan Yi (China)", + "is": "Kiaisilandi", + "is_IS": "Kiaisilandi (Aislandi)", + "it": "Kiitaliano", + "it_CH": "Kiitaliano (Uswisi)", + "it_IT": "Kiitaliano (Italia)", + "it_SM": "Kiitaliano (San Marino)", + "ja": "Kijapani", + "ja_JP": "Kijapani (Japani)", + "ka": "Kijojia", + "ka_GE": "Kijojia (Jojia)", + "ki": "Kikikuyu", + "ki_KE": "Kikikuyu (Kenya)", + "kk": "Kikazakh", + "kk_KZ": "Kikazakh (Kazakistani)", + "kl": "Kikalaallisut", + "kl_GL": "Kikalaallisut (Grinlandi)", + "km": "Kikambodia", + "km_KH": "Kikambodia (Kambodia)", + "kn": "Kikannada", + "kn_IN": "Kikannada (India)", + "ko": "Kikorea", + "ko_KP": "Kikorea (Korea Kaskazini)", + "ko_KR": "Kikorea (Korea Kusini)", + "ks": "Kikashmiri", + "ks_IN": "Kikashmiri (India)", + "kw": "Kikorni", + "kw_GB": "Kikorni (Uingereza)", + "ky": "Kikyrgyz", + "ky_KG": "Kikyrgyz (Kirigizistani)", + "lb": "Kilasembagi", + "lb_LU": "Kilasembagi (Luxembourg)", + "lg": "Kiganda", + "lg_UG": "Kiganda (Uganda)", + "ln": "Kilingala", + "ln_AO": "Kilingala (Angola)", + "ln_CD": "Kilingala (Jamhuri ya Kidemokrasia ya Kongo)", + "ln_CF": "Kilingala (Jamhuri ya Afrika ya Kati)", + "ln_CG": "Kilingala (Kongo - Brazzaville)", + "lo": "Kilaosi", + "lo_LA": "Kilaosi (Laosi)", + "lt": "Kilithuania", + "lt_LT": "Kilithuania (Lithuania)", + "lu": "Kiluba-Katanga", + "lu_CD": "Kiluba-Katanga (Jamhuri ya Kidemokrasia ya Kongo)", + "lv": "Kilatvia", + "lv_LV": "Kilatvia (Latvia)", + "mg": "Kimalagasi", + "mg_MG": "Kimalagasi (Madagaska)", + "mk": "Kimacedonia", + "mk_MK": "Kimacedonia (Macedonia)", + "ml": "Kimalayalam", + "ml_IN": "Kimalayalam (India)", + "mn": "Kimongolia", + "mn_MN": "Kimongolia (Mongolia)", + "mr": "Kimarathi", + "mr_IN": "Kimarathi (India)", + "ms": "Kimalei", + "ms_BN": "Kimalei (Brunei)", + "ms_MY": "Kimalei (Malesia)", + "ms_SG": "Kimalei (Singapore)", + "mt": "Kimalta", + "mt_MT": "Kimalta (Malta)", + "my": "Kiburma", + "my_MM": "Kiburma (Myanmar (Burma))", + "nb": "Kinorwe cha BokmÃ¥l", + "nb_NO": "Kinorwe cha BokmÃ¥l (Norway)", + "nb_SJ": "Kinorwe cha BokmÃ¥l (Svalbard na Jan Mayen)", + "nd": "Kindebele cha Kaskazini", + "nd_ZW": "Kindebele cha Kaskazini (Zimbabwe)", + "ne": "Kinepali", + "ne_IN": "Kinepali (India)", + "ne_NP": "Kinepali (Nepal)", + "nl": "Kiholanzi", + "nl_AW": "Kiholanzi (Aruba)", + "nl_BE": "Kiholanzi (Ubelgiji)", + "nl_BQ": "Kiholanzi (Uholanzi ya Karibiani)", + "nl_CW": "Kiholanzi (Kurakao)", + "nl_NL": "Kiholanzi (Uholanzi)", + "nl_SR": "Kiholanzi (Surinamu)", + "nl_SX": "Kiholanzi (Sint Maarten)", + "nn": "Kinorwe cha Nynorsk", + "nn_NO": "Kinorwe cha Nynorsk (Norway)", + "no": "Kinorwe", + "no_NO": "Kinorwe (Norway)", + "om": "Kioromo", + "om_ET": "Kioromo (Ethiopia)", + "om_KE": "Kioromo (Kenya)", + "or": "Kioriya", + "or_IN": "Kioriya (India)", + "os": "Kiosetia", + "os_GE": "Kiosetia (Jojia)", + "os_RU": "Kiosetia (Urusi)", + "pa": "Kipunjabi", + "pa_Arab": "Kipunjabi (Kiarabu)", + "pa_Arab_PK": "Kipunjabi (Kiarabu, Pakistani)", + "pa_Guru": "Kipunjabi (Kigurmukhi)", + "pa_Guru_IN": "Kipunjabi (Kigurmukhi, India)", + "pa_IN": "Kipunjabi (India)", + "pa_PK": "Kipunjabi (Pakistani)", + "pl": "Kipolandi", + "pl_PL": "Kipolandi (Polandi)", + "ps": "Kipashto", + "ps_AF": "Kipashto (Afghanistan)", + "pt": "Kireno", + "pt_AO": "Kireno (Angola)", + "pt_BR": "Kireno (Brazili)", + "pt_CH": "Kireno (Uswisi)", + "pt_CV": "Kireno (Cape Verde)", + "pt_GQ": "Kireno (Ginekweta)", + "pt_GW": "Kireno (Ginebisau)", + "pt_LU": "Kireno (Luxembourg)", + "pt_MO": "Kireno (Macau SAR China)", + "pt_MZ": "Kireno (Msumbiji)", + "pt_PT": "Kireno (Ureno)", + "pt_ST": "Kireno (São Tomé na Príncipe)", + "pt_TL": "Kireno (Timor-Leste)", + "qu": "Kiquechua", + "qu_BO": "Kiquechua (Bolivia)", + "qu_EC": "Kiquechua (Ekwado)", + "qu_PE": "Kiquechua (Peru)", + "rm": "Kiromanshi", + "rm_CH": "Kiromanshi (Uswisi)", + "rn": "Kirundi", + "rn_BI": "Kirundi (Burundi)", + "ro": "Kiromania", + "ro_MD": "Kiromania (Moldova)", + "ro_RO": "Kiromania (Romania)", + "ru": "Kirusi", + "ru_BY": "Kirusi (Belarusi)", + "ru_KG": "Kirusi (Kirigizistani)", + "ru_KZ": "Kirusi (Kazakistani)", + "ru_MD": "Kirusi (Moldova)", + "ru_RU": "Kirusi (Urusi)", + "ru_UA": "Kirusi (Ukraine)", + "rw": "Kinyarwanda", + "rw_RW": "Kinyarwanda (Rwanda)", + "se": "Kisami cha Kaskazini", + "se_FI": "Kisami cha Kaskazini (Ufini)", + "se_NO": "Kisami cha Kaskazini (Norway)", + "se_SE": "Kisami cha Kaskazini (Uswidi)", + "sg": "Kisango", + "sg_CF": "Kisango (Jamhuri ya Afrika ya Kati)", + "sh": "Kiserbia-kroeshia", + "sh_BA": "Kiserbia-kroeshia (Bosnia na Hezegovina)", + "si": "Kisinhala", + "si_LK": "Kisinhala (Sri Lanka)", + "sk": "Kislovakia", + "sk_SK": "Kislovakia (Slovakia)", + "sl": "Kislovenia", + "sl_SI": "Kislovenia (Slovenia)", + "sn": "Kishona", + "sn_ZW": "Kishona (Zimbabwe)", + "so": "Kisomali", + "so_DJ": "Kisomali (Jibuti)", + "so_ET": "Kisomali (Ethiopia)", + "so_KE": "Kisomali (Kenya)", + "so_SO": "Kisomali (Somalia)", + "sq": "Kialbania", + "sq_AL": "Kialbania (Albania)", + "sq_MK": "Kialbania (Macedonia)", + "sq_XK": "Kialbania (Kosovo)", + "sr": "Kiserbia", + "sr_BA": "Kiserbia (Bosnia na Hezegovina)", + "sr_Cyrl": "Kiserbia (Kisiriliki)", + "sr_Cyrl_BA": "Kiserbia (Kisiriliki, Bosnia na Hezegovina)", + "sr_Cyrl_ME": "Kiserbia (Kisiriliki, Montenegro)", + "sr_Cyrl_RS": "Kiserbia (Kisiriliki, Serbia)", + "sr_Cyrl_XK": "Kiserbia (Kisiriliki, Kosovo)", + "sr_Latn": "Kiserbia (Kilatini)", + "sr_Latn_BA": "Kiserbia (Kilatini, Bosnia na Hezegovina)", + "sr_Latn_ME": "Kiserbia (Kilatini, Montenegro)", + "sr_Latn_RS": "Kiserbia (Kilatini, Serbia)", + "sr_Latn_XK": "Kiserbia (Kilatini, Kosovo)", + "sr_ME": "Kiserbia (Montenegro)", + "sr_RS": "Kiserbia (Serbia)", + "sr_XK": "Kiserbia (Kosovo)", + "sv": "Kiswidi", + "sv_AX": "Kiswidi (Visiwa vya Alandi)", + "sv_FI": "Kiswidi (Ufini)", + "sv_SE": "Kiswidi (Uswidi)", + "sw": "Kiswahili", + "sw_CD": "Kiswahili (Jamhuri ya Kidemokrasia ya Kongo)", + "sw_KE": "Kiswahili (Kenya)", + "sw_TZ": "Kiswahili (Tanzania)", + "sw_UG": "Kiswahili (Uganda)", + "ta": "Kitamil", + "ta_IN": "Kitamil (India)", + "ta_LK": "Kitamil (Sri Lanka)", + "ta_MY": "Kitamil (Malesia)", + "ta_SG": "Kitamil (Singapore)", + "te": "Kitelugu", + "te_IN": "Kitelugu (India)", + "th": "Kitailandi", + "th_TH": "Kitailandi (Tailandi)", + "ti": "Kitigrinya", + "ti_ER": "Kitigrinya (Eritrea)", + "ti_ET": "Kitigrinya (Ethiopia)", + "to": "Kitonga", + "to_TO": "Kitonga (Tonga)", + "tr": "Kituruki", + "tr_CY": "Kituruki (Cyprus)", + "tr_TR": "Kituruki (Uturuki)", + "ug": "Kiuyghur", + "ug_CN": "Kiuyghur (China)", + "uk": "Kiukraine", + "uk_UA": "Kiukraine (Ukraine)", + "ur": "Kiurdu", + "ur_IN": "Kiurdu (India)", + "ur_PK": "Kiurdu (Pakistani)", + "uz": "Kiuzbeki", + "uz_AF": "Kiuzbeki (Afghanistan)", + "uz_Arab": "Kiuzbeki (Kiarabu)", + "uz_Arab_AF": "Kiuzbeki (Kiarabu, Afghanistan)", + "uz_Cyrl": "Kiuzbeki (Kisiriliki)", + "uz_Cyrl_UZ": "Kiuzbeki (Kisiriliki, Uzibekistani)", + "uz_Latn": "Kiuzbeki (Kilatini)", + "uz_Latn_UZ": "Kiuzbeki (Kilatini, Uzibekistani)", + "uz_UZ": "Kiuzbeki (Uzibekistani)", + "vi": "Kivietinamu", + "vi_VN": "Kivietinamu (Vietnam)", + "yi": "Kiyiddi", + "yo": "Kiyoruba", + "yo_BJ": "Kiyoruba (Benin)", + "yo_NG": "Kiyoruba (Nigeria)", + "zh": "Kichina", + "zh_CN": "Kichina (China)", + "zh_HK": "Kichina (Hong Kong SAR China)", + "zh_Hans": "Kichina (Rahisi)", + "zh_Hans_CN": "Kichina (Rahisi, China)", + "zh_Hans_HK": "Kichina (Rahisi, Hong Kong SAR China)", + "zh_Hans_MO": "Kichina (Rahisi, Macau SAR China)", + "zh_Hans_SG": "Kichina (Rahisi, Singapore)", + "zh_Hant": "Kichina (Cha jadi)", + "zh_Hant_HK": "Kichina (Cha jadi, Hong Kong SAR China)", + "zh_Hant_MO": "Kichina (Cha jadi, Macau SAR China)", + "zh_Hant_TW": "Kichina (Cha jadi, Taiwan)", + "zh_MO": "Kichina (Macau SAR China)", + "zh_SG": "Kichina (Singapore)", + "zh_TW": "Kichina (Taiwan)", + "zu": "Kizulu", + "zu_ZA": "Kizulu (Afrika Kusini)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sw_CD.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sw_CD.json new file mode 100644 index 0000000000000000000000000000000000000000..1be00d278e1b669ddf7da4512b0566f7abfd0b38 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sw_CD.json @@ -0,0 +1,67 @@ +{ + "Names": { + "ak": "Kiakan", + "ak_GH": "Kiakan (Ghana)", + "ar_JO": "Kiarabu (Yordani)", + "ar_LB": "Kiarabu (Lebanoni)", + "ar_MA": "Kiarabu (Moroko)", + "ar_OM": "Kiarabu (Omani)", + "ar_QA": "Kiarabu (Katari)", + "ar_SD": "Kiarabu (Sudani)", + "ar_TD": "Kiarabu (Chadi)", + "az": "Kiazabajani", + "az_AZ": "Kiazabajani (Azabajani)", + "az_Cyrl": "Kiazabajani (Kisiriliki)", + "az_Cyrl_AZ": "Kiazabajani (Kisiriliki, Azabajani)", + "az_Latn": "Kiazabajani (Kilatini)", + "az_Latn_AZ": "Kiazabajani (Kilatini, Azabajani)", + "da_DK": "Kidenmaki (Denmaki)", + "de_LI": "Kijerumani (Lishenteni)", + "de_LU": "Kijerumani (Lasembagi)", + "el_CY": "Kigiriki (Saiprasi)", + "en_CX": "Kiingereza (Kisiwa cha Christmas)", + "en_CY": "Kiingereza (Saiprasi)", + "en_DK": "Kiingereza (Denmaki)", + "en_NG": "Kiingereza (Nijeria)", + "en_PR": "Kiingereza (Puetoriko)", + "en_SD": "Kiingereza (Sudani)", + "es_PR": "Kihispania (Puetoriko)", + "fa_AF": "Kiajemi (Afuganistani)", + "fo_DK": "Kifaroe (Denmaki)", + "fr_BJ": "Kifaransa (Benini)", + "fr_CI": "Kifaransa (Kodivaa)", + "fr_LU": "Kifaransa (Lasembagi)", + "fr_MA": "Kifaransa (Moroko)", + "fr_NE": "Kifaransa (Nijeri)", + "fr_TD": "Kifaransa (Chadi)", + "gv": "Kimanksi", + "gv_IM": "Kimanksi (Isle of Man)", + "ha_NE": "Kihausa (Nijeri)", + "ha_NG": "Kihausa (Nijeria)", + "hr_HR": "Kikroeshia (Kroeshia)", + "ig_NG": "Kiigbo (Nijeria)", + "ky": "Kikirigizi", + "ky_KG": "Kikirigizi (Kirigizistani)", + "lb_LU": "Kilasembagi (Lasembagi)", + "lv_LV": "Kilatvia (Lativia)", + "mk": "Kimasedonia", + "mk_MK": "Kimasedonia (Macedonia)", + "my_MM": "Kiburma (Myama)", + "nb_NO": "Kinorwe cha BokmÃ¥l (Norwe)", + "ne_NP": "Kinepali (Nepali)", + "nn_NO": "Kinorwe cha Nynorsk (Norwe)", + "no_NO": "Kinorwe (Norwe)", + "ps_AF": "Kipashto (Afuganistani)", + "pt_LU": "Kireno (Lasembagi)", + "pt_ST": "Kireno (Sao Tome na Prinsipe)", + "pt_TL": "Kireno (Timori ya Mashariki)", + "se_NO": "Kisami cha Kaskazini (Norwe)", + "tr_CY": "Kituruki (Saiprasi)", + "uz_AF": "Kiuzbeki (Afuganistani)", + "uz_Arab_AF": "Kiuzbeki (Kiarabu, Afuganistani)", + "vi_VN": "Kivietinamu (Vietnamu)", + "yi": "Kiyidi", + "yo_BJ": "Kiyoruba (Benini)", + "yo_NG": "Kiyoruba (Nijeria)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sw_KE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sw_KE.json new file mode 100644 index 0000000000000000000000000000000000000000..bd66f6195fa7bd12a55acb94db3c2ccd9e144998 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/sw_KE.json @@ -0,0 +1,49 @@ +{ + "Names": { + "ar_JO": "Kiarabu (Yordani)", + "ar_LB": "Kiarabu (Lebanoni)", + "ar_OM": "Kiarabu (Omani)", + "ar_QA": "Kiarabu (Katari)", + "ar_TD": "Kiarabu (Chadi)", + "az": "Kiazabajani", + "az_AZ": "Kiazabajani (Azabajani)", + "az_Cyrl": "Kiazabajani (Kisiriliki)", + "az_Cyrl_AZ": "Kiazabajani (Kisiriliki, Azabajani)", + "az_Latn": "Kiazabajani (Kilatini)", + "az_Latn_AZ": "Kiazabajani (Kilatini, Azabajani)", + "de_LI": "Kijerumani (Lishtensteni)", + "de_LU": "Kijerumani (Lasembagi)", + "el_CY": "Kigiriki (Saiprasi)", + "en_CX": "Kiingereza (Kisiwa cha Christmas)", + "en_CY": "Kiingereza (Saiprasi)", + "en_LS": "Kiingereza (Lesotho)", + "en_NG": "Kiingereza (Nijeria)", + "en_PR": "Kiingereza (Puetoriko)", + "es_PR": "Kihispania (Puetoriko)", + "fr_CI": "Kifaransa (Ivorikosti)", + "fr_GP": "Kifaransa (Gwadelupe)", + "fr_LU": "Kifaransa (Lasembagi)", + "fr_NE": "Kifaransa (Nijer)", + "fr_TD": "Kifaransa (Chadi)", + "ha_NE": "Kihausa (Nijer)", + "ha_NG": "Kihausa (Nijeria)", + "ig_NG": "Kiigbo (Nijeria)", + "lb_LU": "Kilasembagi (Lasembagi)", + "lv_LV": "Kilatvia (Lativia)", + "mk": "Kimasedonia", + "mk_MK": "Kimasedonia (Macedonia)", + "nb_NO": "Kinorwe cha BokmÃ¥l (Norwe)", + "ne_NP": "Kinepali (Nepali)", + "nl_SR": "Kiholanzi (Suriname)", + "nn_NO": "Kinorwe cha Nynorsk (Norwe)", + "no_NO": "Kinorwe (Norwe)", + "or": "Kiodia", + "or_IN": "Kiodia (India)", + "pt_LU": "Kireno (Lasembagi)", + "pt_ST": "Kireno (Sao Tome na Prinsipe)", + "se_NO": "Kisami cha Kaskazini (Norwe)", + "tr_CY": "Kituruki (Saiprasi)", + "vi_VN": "Kivietinamu (Vietnamu)", + "yo_NG": "Kiyoruba (Nijeria)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ta.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ta.json new file mode 100644 index 0000000000000000000000000000000000000000..e8d173ace49d8d5f2fde972d01d8eb8c3b885248 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ta.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "ஆஃபà¯à®°à®¿à®•ானà¯à®¸à¯", + "af_NA": "ஆஃபà¯à®°à®¿à®•ானà¯à®¸à¯ (நமீபியா)", + "af_ZA": "ஆஃபà¯à®°à®¿à®•ானà¯à®¸à¯ (தென௠ஆபà¯à®ªà®¿à®°à®¿à®•à¯à®•ா)", + "ak": "அகானà¯", + "ak_GH": "அகான௠(கானா)", + "am": "à®…à®®à¯à®¹à®¾à®°à®¿à®•à¯", + "am_ET": "à®…à®®à¯à®¹à®¾à®°à®¿à®•௠(எதà¯à®¤à®¿à®¯à¯‹à®ªà¯à®ªà®¿à®¯à®¾)", + "ar": "அரபிகà¯", + "ar_AE": "அரபிக௠(à®à®•à¯à®•ிய அரப௠எமிரேடà¯à®¸à¯)", + "ar_BH": "அரபிக௠(பஹà¯à®°à¯ˆà®©à¯)", + "ar_DJ": "அரபிக௠(ஜிபௌடà¯à®Ÿà®¿)", + "ar_DZ": "அரபிக௠(அலà¯à®œà¯€à®°à®¿à®¯à®¾)", + "ar_EG": "அரபிக௠(எகிபà¯à®¤à¯)", + "ar_EH": "அரபிக௠(மேறà¯à®•௠சஹாரா)", + "ar_ER": "அரபிக௠(எரிடà¯à®°à®¿à®¯à®¾)", + "ar_IL": "அரபிக௠(இஸà¯à®°à¯‡à®²à¯)", + "ar_IQ": "அரபிக௠(ஈராகà¯)", + "ar_JO": "அரபிக௠(ஜோரà¯à®Ÿà®¾à®©à¯)", + "ar_KM": "அரபிக௠(கோமரோஸà¯)", + "ar_KW": "அரபிக௠(கà¯à®µà¯ˆà®¤à¯)", + "ar_LB": "அரபிக௠(லெபனானà¯)", + "ar_LY": "அரபிக௠(லிபியா)", + "ar_MA": "அரபிக௠(மொராகà¯à®•ோ)", + "ar_MR": "அரபிக௠(மௌரிடானியா)", + "ar_OM": "அரபிக௠(ஓமனà¯)", + "ar_PS": "அரபிக௠(பாலஸà¯à®¤à¯€à®©à®¿à®¯ பிரதேசஙà¯à®•ளà¯)", + "ar_QA": "அரபிக௠(கதà¯à®¤à®¾à®°à¯)", + "ar_SA": "அரபிக௠(சவூதி அரேபியா)", + "ar_SD": "அரபிக௠(சூடானà¯)", + "ar_SO": "அரபிக௠(சோமாலியா)", + "ar_SS": "அரபிக௠(தெறà¯à®•௠சூடானà¯)", + "ar_SY": "அரபிக௠(சிரியா)", + "ar_TD": "அரபிக௠(சாடà¯)", + "ar_TN": "அரபிக௠(டà¯à®©à®¿à®šà®¿à®¯à®¾)", + "ar_YE": "அரபிக௠(à®à®®à®©à¯)", + "as": "அஸà¯à®¸à®¾à®®à¯€à®¸à¯", + "as_IN": "அஸà¯à®¸à®¾à®®à¯€à®¸à¯ (இநà¯à®¤à®¿à®¯à®¾)", + "az": "அஸரà¯à®ªà¯ˆà®œà®¾à®©à®¿", + "az_AZ": "அஸரà¯à®ªà¯ˆà®œà®¾à®©à®¿ (அசரà¯à®ªà¯ˆà®œà®¾à®©à¯)", + "az_Cyrl": "அஸரà¯à®ªà¯ˆà®œà®¾à®©à®¿ (சிரிலிகà¯)", + "az_Cyrl_AZ": "அஸரà¯à®ªà¯ˆà®œà®¾à®©à®¿ (சிரிலிகà¯, அசரà¯à®ªà¯ˆà®œà®¾à®©à¯)", + "az_Latn": "அஸரà¯à®ªà¯ˆà®œà®¾à®©à®¿ (லதà¯à®¤à®¿à®©à¯)", + "az_Latn_AZ": "அஸரà¯à®ªà¯ˆà®œà®¾à®©à®¿ (லதà¯à®¤à®¿à®©à¯, அசரà¯à®ªà¯ˆà®œà®¾à®©à¯)", + "be": "பெலாரà¯à®·à®¿à®¯à®©à¯", + "be_BY": "பெலாரà¯à®·à®¿à®¯à®©à¯ (பெலாரூஸà¯)", + "bg": "பலà¯à®•ேரியனà¯", + "bg_BG": "பலà¯à®•ேரியன௠(பலà¯à®•ேரியா)", + "bm": "பமà¯à®ªà®¾à®°à®¾", + "bm_ML": "பமà¯à®ªà®¾à®°à®¾ (மாலி)", + "bn": "வஙà¯à®•ாளமà¯", + "bn_BD": "வஙà¯à®•ாளம௠(பஙà¯à®•ளாதேஷà¯)", + "bn_IN": "வஙà¯à®•ாளம௠(இநà¯à®¤à®¿à®¯à®¾)", + "bo": "திபெதà¯à®¤à®¿à®¯à®©à¯", + "bo_CN": "திபெதà¯à®¤à®¿à®¯à®©à¯ (சீனா)", + "bo_IN": "திபெதà¯à®¤à®¿à®¯à®©à¯ (இநà¯à®¤à®¿à®¯à®¾)", + "br": "பிரெடà¯à®Ÿà®©à¯", + "br_FR": "பிரெடà¯à®Ÿà®©à¯ (பிரானà¯à®¸à¯)", + "bs": "போஸà¯à®©à®¿à®¯à®©à¯", + "bs_BA": "போஸà¯à®©à®¿à®¯à®©à¯ (போஸà¯à®©à®¿à®¯à®¾ & ஹெரà¯à®¸à®•ோவினா)", + "bs_Cyrl": "போஸà¯à®©à®¿à®¯à®©à¯ (சிரிலிகà¯)", + "bs_Cyrl_BA": "போஸà¯à®©à®¿à®¯à®©à¯ (சிரிலிகà¯, போஸà¯à®©à®¿à®¯à®¾ & ஹெரà¯à®¸à®•ோவினா)", + "bs_Latn": "போஸà¯à®©à®¿à®¯à®©à¯ (லதà¯à®¤à®¿à®©à¯)", + "bs_Latn_BA": "போஸà¯à®©à®¿à®¯à®©à¯ (லதà¯à®¤à®¿à®©à¯, போஸà¯à®©à®¿à®¯à®¾ & ஹெரà¯à®¸à®•ோவினா)", + "ca": "கேடà¯à®Ÿà®²à®¾à®©à¯", + "ca_AD": "கேடà¯à®Ÿà®²à®¾à®©à¯ (அனà¯à®Ÿà¯‹à®°à®¾)", + "ca_ES": "கேடà¯à®Ÿà®²à®¾à®©à¯ (ஸà¯à®ªà¯†à®¯à®¿à®©à¯)", + "ca_FR": "கேடà¯à®Ÿà®²à®¾à®©à¯ (பிரானà¯à®¸à¯)", + "ca_IT": "கேடà¯à®Ÿà®²à®¾à®©à¯ (இதà¯à®¤à®¾à®²à®¿)", + "ce": "செசà¯à®šà¯†à®©à¯", + "ce_RU": "செசà¯à®šà¯†à®©à¯ (à®°à®·à¯à®¯à®¾)", + "cs": "செகà¯", + "cs_CZ": "செக௠(செக௠கà¯à®Ÿà®¿à®¯à®°à®šà¯)", + "cy": "வேலà¯à®·à¯", + "cy_GB": "வேலà¯à®·à¯ (யà¯à®©à¯ˆà®Ÿà¯†à®Ÿà¯ கிஙà¯à®Ÿà®®à¯)", + "da": "டேனிஷà¯", + "da_DK": "டேனிஷ௠(டெனà¯à®®à®¾à®°à¯à®•à¯)", + "da_GL": "டேனிஷ௠(கிரீனà¯à®²à®¾à®¨à¯à®¤à¯)", + "de": "ஜெரà¯à®®à®©à¯", + "de_AT": "ஜெரà¯à®®à®©à¯ (ஆஸà¯à®¤à®¿à®°à®¿à®¯à®¾)", + "de_BE": "ஜெரà¯à®®à®©à¯ (பெலà¯à®œà®¿à®¯à®®à¯)", + "de_CH": "ஜெரà¯à®®à®©à¯ (ஸà¯à®µà®¿à®Ÿà¯à®šà®°à¯à®²à®¾à®¨à¯à®¤à¯)", + "de_DE": "ஜெரà¯à®®à®©à¯ (ஜெரà¯à®®à®©à®¿)", + "de_IT": "ஜெரà¯à®®à®©à¯ (இதà¯à®¤à®¾à®²à®¿)", + "de_LI": "ஜெரà¯à®®à®©à¯ (லிசà¯à®šà¯†à®£à¯à®¸à¯à®Ÿà¯†à®¯à¯à®©à¯)", + "de_LU": "ஜெரà¯à®®à®©à¯ (லகà¯à®¸à¯à®šà®®à¯à®ªà®°à¯à®•à¯)", + "dz": "பூடானி", + "dz_BT": "பூடானி (பூடானà¯)", + "ee": "ஈவà¯", + "ee_GH": "ஈவ௠(கானா)", + "ee_TG": "ஈவ௠(டோகோ)", + "el": "கிரேகà¯à®•à®®à¯", + "el_CY": "கிரேகà¯à®•ம௠(சைபà¯à®°à®¸à¯)", + "el_GR": "கிரேகà¯à®•ம௠(கிரீஸà¯)", + "en": "ஆஙà¯à®•ிலமà¯", + "en_AG": "ஆஙà¯à®•ிலம௠(ஆணà¯à®Ÿà®¿à®•à¯à®µà®¾ மறà¯à®±à¯à®®à¯ பாரà¯à®ªà¯à®Ÿà®¾)", + "en_AI": "ஆஙà¯à®•ிலம௠(à®…à®™à¯à®•à¯à®¯à¯à®²à®¾)", + "en_AS": "ஆஙà¯à®•ிலம௠(அமெரிகà¯à®• சமோவா)", + "en_AT": "ஆஙà¯à®•ிலம௠(ஆஸà¯à®¤à®¿à®°à®¿à®¯à®¾)", + "en_AU": "ஆஙà¯à®•ிலம௠(ஆஸà¯à®¤à®¿à®°à¯‡à®²à®¿à®¯à®¾)", + "en_BB": "ஆஙà¯à®•ிலம௠(பாரà¯à®ªà®Ÿà¯‹à®¸à¯)", + "en_BE": "ஆஙà¯à®•ிலம௠(பெலà¯à®œà®¿à®¯à®®à¯)", + "en_BI": "ஆஙà¯à®•ிலம௠(பà¯à®°à¯à®£à¯à®Ÿà®¿)", + "en_BM": "ஆஙà¯à®•ிலம௠(பெரà¯à®®à¯à®Ÿà®¾)", + "en_BS": "ஆஙà¯à®•ிலம௠(பஹாமாஸà¯)", + "en_BW": "ஆஙà¯à®•ிலம௠(போடà¯à®¸à¯à®µà®¾à®©à®¾)", + "en_BZ": "ஆஙà¯à®•ிலம௠(பெலிஸà¯)", + "en_CA": "ஆஙà¯à®•ிலம௠(கனடா)", + "en_CC": "ஆஙà¯à®•ிலம௠(கோகோஸ௠(கீலிஙà¯) தீவà¯à®•ளà¯)", + "en_CH": "ஆஙà¯à®•ிலம௠(ஸà¯à®µà®¿à®Ÿà¯à®šà®°à¯à®²à®¾à®¨à¯à®¤à¯)", + "en_CK": "ஆஙà¯à®•ிலம௠(கà¯à®•௠தீவà¯à®•ளà¯)", + "en_CM": "ஆஙà¯à®•ிலம௠(கேமரூனà¯)", + "en_CX": "ஆஙà¯à®•ிலம௠(கிறிஸà¯à®¤à¯à®®à®¸à¯ தீவà¯)", + "en_CY": "ஆஙà¯à®•ிலம௠(சைபà¯à®°à®¸à¯)", + "en_DE": "ஆஙà¯à®•ிலம௠(ஜெரà¯à®®à®©à®¿)", + "en_DG": "ஆஙà¯à®•ிலம௠(டியகோ காரà¯à®·à®¿à®¯à®¾)", + "en_DK": "ஆஙà¯à®•ிலம௠(டெனà¯à®®à®¾à®°à¯à®•à¯)", + "en_DM": "ஆஙà¯à®•ிலம௠(டொமினிகா)", + "en_ER": "ஆஙà¯à®•ிலம௠(எரிடà¯à®°à®¿à®¯à®¾)", + "en_FI": "ஆஙà¯à®•ிலம௠(பினà¯à®²à®¾à®¨à¯à®¤à¯)", + "en_FJ": "ஆஙà¯à®•ிலம௠(ஃபிஜி)", + "en_FK": "ஆஙà¯à®•ிலம௠(ஃபாகà¯à®²à®¾à®¨à¯à®¤à¯ தீவà¯à®•ளà¯)", + "en_FM": "ஆஙà¯à®•ிலம௠(மைகà¯à®°à¯‹à®©à¯‡à®·à®¿à®¯à®¾)", + "en_GB": "ஆஙà¯à®•ிலம௠(யà¯à®©à¯ˆà®Ÿà¯†à®Ÿà¯ கிஙà¯à®Ÿà®®à¯)", + "en_GD": "ஆஙà¯à®•ிலம௠(கிரனெடா)", + "en_GG": "ஆஙà¯à®•ிலம௠(கெரà¯à®©à¯à®šà®¿)", + "en_GH": "ஆஙà¯à®•ிலம௠(கானா)", + "en_GI": "ஆஙà¯à®•ிலம௠(ஜிபà¯à®°à®¾à®²à¯à®Ÿà®°à¯)", + "en_GM": "ஆஙà¯à®•ிலம௠(காமà¯à®ªà®¿à®¯à®¾)", + "en_GU": "ஆஙà¯à®•ிலம௠(கà¯à®µà®¾à®®à¯)", + "en_GY": "ஆஙà¯à®•ிலம௠(கயானா)", + "en_HK": "ஆஙà¯à®•ிலம௠(ஹாஙà¯à®•ாங௠எஸà¯à®à®†à®°à¯ சீனா)", + "en_IE": "ஆஙà¯à®•ிலம௠(அயரà¯à®²à®¾à®¨à¯à®¤à¯)", + "en_IL": "ஆஙà¯à®•ிலம௠(இஸà¯à®°à¯‡à®²à¯)", + "en_IM": "ஆஙà¯à®•ிலம௠(à®à®²à¯ ஆஃப௠மேனà¯)", + "en_IN": "ஆஙà¯à®•ிலம௠(இநà¯à®¤à®¿à®¯à®¾)", + "en_IO": "ஆஙà¯à®•ிலம௠(பிரிடà¯à®Ÿà®¿à®·à¯ இநà¯à®¤à®¿à®¯à®ªà¯ பெரà¯à®™à¯à®•டல௠பிரதேசமà¯)", + "en_JE": "ஆஙà¯à®•ிலம௠(ஜெரà¯à®šà®¿)", + "en_JM": "ஆஙà¯à®•ிலம௠(ஜமைகா)", + "en_KE": "ஆஙà¯à®•ிலம௠(கெனà¯à®¯à®¾)", + "en_KI": "ஆஙà¯à®•ிலம௠(கிரிபாடà¯à®Ÿà®¿)", + "en_KN": "ஆஙà¯à®•ிலம௠(செயினà¯à®Ÿà¯ கிடà¯à®¸à¯ & நெவிஸà¯)", + "en_KY": "ஆஙà¯à®•ிலம௠(கெயà¯à®®à¯†à®©à¯ தீவà¯à®•ளà¯)", + "en_LC": "ஆஙà¯à®•ிலம௠(செயினà¯à®Ÿà¯ லூசியா)", + "en_LR": "ஆஙà¯à®•ிலம௠(லைபீரியா)", + "en_LS": "ஆஙà¯à®•ிலம௠(லெசோதோ)", + "en_MG": "ஆஙà¯à®•ிலம௠(மடகாஸà¯à®•à®°à¯)", + "en_MH": "ஆஙà¯à®•ிலம௠(மாரà¯à®·à®²à¯ தீவà¯à®•ளà¯)", + "en_MO": "ஆஙà¯à®•ிலம௠(மகாவ௠எஸà¯à®à®†à®°à¯ சீனா)", + "en_MP": "ஆஙà¯à®•ிலம௠(வடகà¯à®•௠மரியானா தீவà¯à®•ளà¯)", + "en_MS": "ஆஙà¯à®•ிலம௠(மாணà¯à®Ÿà¯à®šà¯†à®°à®¾à®Ÿà¯)", + "en_MT": "ஆஙà¯à®•ிலம௠(மாலà¯à®Ÿà®¾)", + "en_MU": "ஆஙà¯à®•ிலம௠(மொரிசியஸà¯)", + "en_MW": "ஆஙà¯à®•ிலம௠(மலாவி)", + "en_MY": "ஆஙà¯à®•ிலம௠(மலேசியா)", + "en_NA": "ஆஙà¯à®•ிலம௠(நமீபியா)", + "en_NF": "ஆஙà¯à®•ிலம௠(நாரà¯à®ƒà®ªà¯‹à®•௠தீவà¯à®•ளà¯)", + "en_NG": "ஆஙà¯à®•ிலம௠(நைஜீரியா)", + "en_NL": "ஆஙà¯à®•ிலம௠(நெதரà¯à®²à®¾à®¨à¯à®¤à¯)", + "en_NR": "ஆஙà¯à®•ிலம௠(நௌரà¯)", + "en_NU": "ஆஙà¯à®•ிலம௠(நியூ)", + "en_NZ": "ஆஙà¯à®•ிலம௠(நியூசிலாநà¯à®¤à¯)", + "en_PG": "ஆஙà¯à®•ிலம௠(பபà¯à®ªà¯à®µà®¾ நியூ கினியா)", + "en_PH": "ஆஙà¯à®•ிலம௠(பிலிபà¯à®ªà¯ˆà®©à¯à®¸à¯)", + "en_PK": "ஆஙà¯à®•ிலம௠(பாகிஸà¯à®¤à®¾à®©à¯)", + "en_PN": "ஆஙà¯à®•ிலம௠(பிடà¯à®•ெயà¯à®°à¯à®©à¯ தீவà¯à®•ளà¯)", + "en_PR": "ஆஙà¯à®•ிலம௠(பியூரà¯à®Ÿà¯‹ ரிகோ)", + "en_PW": "ஆஙà¯à®•ிலம௠(பாலோ)", + "en_RW": "ஆஙà¯à®•ிலம௠(à®°à¯à®µà®¾à®£à¯à®Ÿà®¾)", + "en_SB": "ஆஙà¯à®•ிலம௠(சாலமன௠தீவà¯à®•ளà¯)", + "en_SC": "ஆஙà¯à®•ிலம௠(சீஷெலà¯à®¸à¯)", + "en_SD": "ஆஙà¯à®•ிலம௠(சூடானà¯)", + "en_SE": "ஆஙà¯à®•ிலம௠(ஸà¯à®µà¯€à®Ÿà®©à¯)", + "en_SG": "ஆஙà¯à®•ிலம௠(சிஙà¯à®•பà¯à®ªà¯‚à®°à¯)", + "en_SH": "ஆஙà¯à®•ிலம௠(செயினà¯à®Ÿà¯ ஹெலெனா)", + "en_SI": "ஆஙà¯à®•ிலம௠(ஸà¯à®²à¯‹à®µà¯‡à®©à®¿à®¯à®¾)", + "en_SL": "ஆஙà¯à®•ிலம௠(சியாரா லியோனà¯)", + "en_SS": "ஆஙà¯à®•ிலம௠(தெறà¯à®•௠சூடானà¯)", + "en_SX": "ஆஙà¯à®•ிலம௠(சினà¯à®Ÿà¯ மாரà¯à®Ÿà¯†à®©à¯)", + "en_SZ": "ஆஙà¯à®•ிலம௠(ஸà¯à®µà®¾à®¸à®¿à®²à®¾à®¨à¯à®¤à¯)", + "en_TC": "ஆஙà¯à®•ிலம௠(டரà¯à®•à¯à®¸à¯ & கைகோஸ௠தீவà¯à®•ளà¯)", + "en_TK": "ஆஙà¯à®•ிலம௠(டோகேலோ)", + "en_TO": "ஆஙà¯à®•ிலம௠(டோஙà¯à®•ா)", + "en_TT": "ஆஙà¯à®•ிலம௠(டிரினிடாட௠& டொபாகோ)", + "en_TV": "ஆஙà¯à®•ிலம௠(தà¯à®µà®¾à®²à¯‚)", + "en_TZ": "ஆஙà¯à®•ிலம௠(தானà¯à®šà®¾à®©à®¿à®¯à®¾)", + "en_UG": "ஆஙà¯à®•ிலம௠(உகாணà¯à®Ÿà®¾)", + "en_UM": "ஆஙà¯à®•ிலம௠(யூ.எஸà¯. வெளிபà¯à®ªà¯à®±à®¤à¯ தீவà¯à®•ளà¯)", + "en_US": "ஆஙà¯à®•ிலம௠(அமெரிகà¯à®•ா)", + "en_VC": "ஆஙà¯à®•ிலம௠(செயினà¯à®Ÿà¯ வினà¯à®šà¯†à®©à¯à®Ÿà¯ & கிரெனடைனà¯à®¸à¯)", + "en_VG": "ஆஙà¯à®•ிலம௠(பிரிடà¯à®Ÿà¯€à®·à¯ கனà¯à®©à®¿à®¤à¯ தீவà¯à®•ளà¯)", + "en_VI": "ஆஙà¯à®•ிலம௠(யூ.எஸà¯. கனà¯à®©à®¿à®¤à¯ தீவà¯à®•ளà¯)", + "en_VU": "ஆஙà¯à®•ிலம௠(வனà¯à®µà®¾à®Ÿà¯à®Ÿà¯)", + "en_WS": "ஆஙà¯à®•ிலம௠(சமோவா)", + "en_ZA": "ஆஙà¯à®•ிலம௠(தென௠ஆபà¯à®ªà®¿à®°à®¿à®•à¯à®•ா)", + "en_ZM": "ஆஙà¯à®•ிலம௠(ஜாமà¯à®ªà®¿à®¯à®¾)", + "en_ZW": "ஆஙà¯à®•ிலம௠(ஜிமà¯à®ªà®¾à®ªà¯à®µà¯‡)", + "eo": "எஸà¯à®ªà®°à¯‡à®©à¯à®Ÿà¯‹", + "es": "ஸà¯à®ªà®¾à®©à®¿à®·à¯", + "es_AR": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (à®…à®°à¯à®œà¯†à®©à¯à®Ÿà®¿à®©à®¾)", + "es_BO": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (பொலிவியா)", + "es_BR": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (பிரேசிலà¯)", + "es_CL": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (சிலி)", + "es_CO": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (கொலமà¯à®ªà®¿à®¯à®¾)", + "es_CR": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (கோஸà¯à®Ÿà®¾à®°à®¿à®•ா)", + "es_CU": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (கியூபா)", + "es_DO": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (டொமினிகன௠கà¯à®Ÿà®¿à®¯à®°à®šà¯)", + "es_EA": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (சியூடா & மெலிலà¯à®²à®¾)", + "es_EC": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (ஈகà¯à®µà®Ÿà®¾à®°à¯)", + "es_ES": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (ஸà¯à®ªà¯†à®¯à®¿à®©à¯)", + "es_GQ": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (ஈகà¯à®µà®Ÿà¯‹à®°à®¿à®¯à®²à¯ கினியா)", + "es_GT": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (கவà¯à®¤à®®à®¾à®²à®¾)", + "es_HN": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (ஹோணà¯à®Ÿà¯‚ராஸà¯)", + "es_IC": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (கேனரி தீவà¯à®•ளà¯)", + "es_MX": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (மெகà¯à®šà®¿à®•ோ)", + "es_NI": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (நிகரகà¯à®µà®¾)", + "es_PA": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (பனாமா)", + "es_PE": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (பெரà¯)", + "es_PH": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (பிலிபà¯à®ªà¯ˆà®©à¯à®¸à¯)", + "es_PR": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (பியூரà¯à®Ÿà¯‹ ரிகோ)", + "es_PY": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (பராகà¯à®µà¯‡)", + "es_SV": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (எல௠சாலà¯à®µà®Ÿà®¾à®°à¯)", + "es_US": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (அமெரிகà¯à®•ா)", + "es_UY": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (உரà¯à®•à¯à®µà¯‡)", + "es_VE": "ஸà¯à®ªà®¾à®©à®¿à®·à¯ (வெனிசà¯à®²à®¾)", + "et": "எஸà¯à®Ÿà¯‹à®©à®¿à®¯à®©à¯", + "et_EE": "எஸà¯à®Ÿà¯‹à®©à®¿à®¯à®©à¯ (எஸà¯à®Ÿà¯‹à®©à®¿à®¯à®¾)", + "eu": "பாஸà¯à®•à¯", + "eu_ES": "பாஸà¯à®•௠(ஸà¯à®ªà¯†à®¯à®¿à®©à¯)", + "fa": "பெரà¯à®·à®¿à®¯à®©à¯", + "fa_AF": "பெரà¯à®·à®¿à®¯à®©à¯ (ஆபà¯à®•ானிஸà¯à®¤à®¾à®©à¯)", + "fa_IR": "பெரà¯à®·à®¿à®¯à®©à¯ (ஈரானà¯)", + "ff": "ஃபà¯à®²à®¾", + "ff_CM": "ஃபà¯à®²à®¾ (கேமரூனà¯)", + "ff_GN": "ஃபà¯à®²à®¾ (கினியா)", + "ff_MR": "ஃபà¯à®²à®¾ (மௌரிடானியா)", + "ff_SN": "ஃபà¯à®²à®¾ (செனெகலà¯)", + "fi": "ஃபினà¯à®©à®¿à®·à¯", + "fi_FI": "ஃபினà¯à®©à®¿à®·à¯ (பினà¯à®²à®¾à®¨à¯à®¤à¯)", + "fo": "ஃபரோயிஸà¯", + "fo_DK": "ஃபரோயிஸ௠(டெனà¯à®®à®¾à®°à¯à®•à¯)", + "fo_FO": "ஃபரோயிஸ௠(ஃபாரோ தீவà¯à®•ளà¯)", + "fr": "பிரெஞà¯à®šà¯", + "fr_BE": "பிரெஞà¯à®šà¯ (பெலà¯à®œà®¿à®¯à®®à¯)", + "fr_BF": "பிரெஞà¯à®šà¯ (பà¯à®°à¯à®•ினா ஃபாஸோ)", + "fr_BI": "பிரெஞà¯à®šà¯ (பà¯à®°à¯à®£à¯à®Ÿà®¿)", + "fr_BJ": "பிரெஞà¯à®šà¯ (பெனினà¯)", + "fr_BL": "பிரெஞà¯à®šà¯ (செயினà¯à®Ÿà¯ பாரà¯à®¤à¯‡à®²à¯†à®®à®¿)", + "fr_CA": "பிரெஞà¯à®šà¯ (கனடா)", + "fr_CD": "பிரெஞà¯à®šà¯ (காஙà¯à®•ோ - கினà¯à®·à®¾à®šà®¾)", + "fr_CF": "பிரெஞà¯à®šà¯ (மதà¯à®¤à®¿à®¯ ஆபà¯à®°à®¿à®•à¯à®•க௠கà¯à®Ÿà®¿à®¯à®°à®šà¯)", + "fr_CG": "பிரெஞà¯à®šà¯ (காஙà¯à®•ோ - பà¯à®°à®¾à®¸à®¾à®µà®¿à®²à¯à®²à¯‡)", + "fr_CH": "பிரெஞà¯à®šà¯ (ஸà¯à®µà®¿à®Ÿà¯à®šà®°à¯à®²à®¾à®¨à¯à®¤à¯)", + "fr_CI": "பிரெஞà¯à®šà¯ (கோட௠தி’வாயரà¯)", + "fr_CM": "பிரெஞà¯à®šà¯ (கேமரூனà¯)", + "fr_DJ": "பிரெஞà¯à®šà¯ (ஜிபௌடà¯à®Ÿà®¿)", + "fr_DZ": "பிரெஞà¯à®šà¯ (அலà¯à®œà¯€à®°à®¿à®¯à®¾)", + "fr_FR": "பிரெஞà¯à®šà¯ (பிரானà¯à®¸à¯)", + "fr_GA": "பிரெஞà¯à®šà¯ (கேபானà¯)", + "fr_GF": "பிரெஞà¯à®šà¯ (பிரெஞà¯à®šà¯ கயானா)", + "fr_GN": "பிரெஞà¯à®šà¯ (கினியா)", + "fr_GP": "பிரெஞà¯à®šà¯ (கà¯à®µà®¾à®¤à¯‡à®²à¯‹à®ªà¯)", + "fr_GQ": "பிரெஞà¯à®šà¯ (ஈகà¯à®µà®Ÿà¯‹à®°à®¿à®¯à®²à¯ கினியா)", + "fr_HT": "பிரெஞà¯à®šà¯ (ஹைடà¯à®Ÿà®¿)", + "fr_KM": "பிரெஞà¯à®šà¯ (கோமரோஸà¯)", + "fr_LU": "பிரெஞà¯à®šà¯ (லகà¯à®¸à¯à®šà®®à¯à®ªà®°à¯à®•à¯)", + "fr_MA": "பிரெஞà¯à®šà¯ (மொராகà¯à®•ோ)", + "fr_MC": "பிரெஞà¯à®šà¯ (மொனாகà¯à®•ோ)", + "fr_MF": "பிரெஞà¯à®šà¯ (செயினà¯à®Ÿà¯ மாரà¯à®Ÿà¯à®Ÿà¯€à®©à¯)", + "fr_MG": "பிரெஞà¯à®šà¯ (மடகாஸà¯à®•à®°à¯)", + "fr_ML": "பிரெஞà¯à®šà¯ (மாலி)", + "fr_MQ": "பிரெஞà¯à®šà¯ (மாரà¯à®Ÿà®¿à®©à®¿à®•à¯)", + "fr_MR": "பிரெஞà¯à®šà¯ (மௌரிடானியா)", + "fr_MU": "பிரெஞà¯à®šà¯ (மொரிசியஸà¯)", + "fr_NC": "பிரெஞà¯à®šà¯ (நியூ கேலிடோனியா)", + "fr_NE": "பிரெஞà¯à®šà¯ (நைஜரà¯)", + "fr_PF": "பிரெஞà¯à®šà¯ (பிரெஞà¯à®šà¯ பாலினேஷியா)", + "fr_PM": "பிரெஞà¯à®šà¯ (செயினà¯à®Ÿà¯ பியர௠& மிகà¯à®µà¯‡à®²à®¾à®©à¯)", + "fr_RE": "பிரெஞà¯à®šà¯ (ரீயூனியனà¯)", + "fr_RW": "பிரெஞà¯à®šà¯ (à®°à¯à®µà®¾à®£à¯à®Ÿà®¾)", + "fr_SC": "பிரெஞà¯à®šà¯ (சீஷெலà¯à®¸à¯)", + "fr_SN": "பிரெஞà¯à®šà¯ (செனெகலà¯)", + "fr_SY": "பிரெஞà¯à®šà¯ (சிரியா)", + "fr_TD": "பிரெஞà¯à®šà¯ (சாடà¯)", + "fr_TG": "பிரெஞà¯à®šà¯ (டோகோ)", + "fr_TN": "பிரெஞà¯à®šà¯ (டà¯à®©à®¿à®šà®¿à®¯à®¾)", + "fr_VU": "பிரெஞà¯à®šà¯ (வனà¯à®µà®¾à®Ÿà¯à®Ÿà¯)", + "fr_WF": "பிரெஞà¯à®šà¯ (வாலிஸ௠மறà¯à®±à¯à®®à¯ ஃபà¯à®Ÿà¯à®©à®¾)", + "fr_YT": "பிரெஞà¯à®šà¯ (மயோடà¯)", + "fy": "மேறà¯à®•௠ஃபà¯à®°à®¿à®·à®¿à®¯à®©à¯", + "fy_NL": "மேறà¯à®•௠ஃபà¯à®°à®¿à®·à®¿à®¯à®©à¯ (நெதரà¯à®²à®¾à®¨à¯à®¤à¯)", + "ga": "à®à®°à®¿à®·à¯", + "ga_IE": "à®à®°à®¿à®·à¯ (அயரà¯à®²à®¾à®¨à¯à®¤à¯)", + "gd": "ஸà¯à®•ாடà¯à®¸à¯ கேலிகà¯", + "gd_GB": "ஸà¯à®•ாடà¯à®¸à¯ கேலிக௠(யà¯à®©à¯ˆà®Ÿà¯†à®Ÿà¯ கிஙà¯à®Ÿà®®à¯)", + "gl": "காலிஸியனà¯", + "gl_ES": "காலிஸியன௠(ஸà¯à®ªà¯†à®¯à®¿à®©à¯)", + "gu": "கà¯à®œà®°à®¾à®¤à¯à®¤à®¿", + "gu_IN": "கà¯à®œà®°à®¾à®¤à¯à®¤à®¿ (இநà¯à®¤à®¿à®¯à®¾)", + "gv": "மேஙà¯à®•à¯à®¸à¯", + "gv_IM": "மேஙà¯à®•à¯à®¸à¯ (à®à®²à¯ ஆஃப௠மேனà¯)", + "ha": "ஹௌஸா", + "ha_GH": "ஹௌஸா (கானா)", + "ha_NE": "ஹௌஸா (நைஜரà¯)", + "ha_NG": "ஹௌஸா (நைஜீரியா)", + "he": "ஹீபà¯à®°à¯‚", + "he_IL": "ஹீபà¯à®°à¯‚ (இஸà¯à®°à¯‡à®²à¯)", + "hi": "இநà¯à®¤à®¿", + "hi_IN": "இநà¯à®¤à®¿ (இநà¯à®¤à®¿à®¯à®¾)", + "hr": "கà¯à®°à¯‹à®·à®¿à®¯à®©à¯", + "hr_BA": "கà¯à®°à¯‹à®·à®¿à®¯à®©à¯ (போஸà¯à®©à®¿à®¯à®¾ & ஹெரà¯à®¸à®•ோவினா)", + "hr_HR": "கà¯à®°à¯‹à®·à®¿à®¯à®©à¯ (கà¯à®°à¯‡à®·à®¿à®¯à®¾)", + "hu": "ஹஙà¯à®•ேரியனà¯", + "hu_HU": "ஹஙà¯à®•ேரியன௠(ஹஙà¯à®•ேரி)", + "hy": "ஆரà¯à®®à¯‡à®©à®¿à®¯à®©à¯", + "hy_AM": "ஆரà¯à®®à¯‡à®©à®¿à®¯à®©à¯ (à®…à®°à¯à®®à¯‡à®©à®¿à®¯à®¾)", + "id": "இநà¯à®¤à¯‹à®©à¯‡à®·à®¿à®¯à®©à¯", + "id_ID": "இநà¯à®¤à¯‹à®©à¯‡à®·à®¿à®¯à®©à¯ (இநà¯à®¤à¯‹à®©à¯‡à®šà®¿à®¯à®¾)", + "ig": "இகà¯à®ªà¯‹", + "ig_NG": "இகà¯à®ªà¯‹ (நைஜீரியா)", + "ii": "சிசà¯à®µà®¾à®©à¯ ஈ", + "ii_CN": "சிசà¯à®µà®¾à®©à¯ ஈ (சீனா)", + "is": "à®à®¸à¯à®²à¯‡à®£à¯à®Ÿà®¿à®•à¯", + "is_IS": "à®à®¸à¯à®²à¯‡à®£à¯à®Ÿà®¿à®•௠(à®à®¸à¯à®²à®¾à®¨à¯à®¤à¯)", + "it": "இதà¯à®¤à®¾à®²à®¿à®¯à®©à¯", + "it_CH": "இதà¯à®¤à®¾à®²à®¿à®¯à®©à¯ (ஸà¯à®µà®¿à®Ÿà¯à®šà®°à¯à®²à®¾à®¨à¯à®¤à¯)", + "it_IT": "இதà¯à®¤à®¾à®²à®¿à®¯à®©à¯ (இதà¯à®¤à®¾à®²à®¿)", + "it_SM": "இதà¯à®¤à®¾à®²à®¿à®¯à®©à¯ (சான௠மரினோ)", + "ja": "ஜபà¯à®ªà®¾à®©à®¿à®¯à®®à¯", + "ja_JP": "ஜபà¯à®ªà®¾à®©à®¿à®¯à®®à¯ (ஜபà¯à®ªà®¾à®©à¯)", + "ka": "ஜாரà¯à®œà®¿à®¯à®©à¯", + "ka_GE": "ஜாரà¯à®œà®¿à®¯à®©à¯ (ஜாரà¯à®œà®¿à®¯à®¾)", + "ki": "கிகà¯à®¯à¯‚", + "ki_KE": "கிகà¯à®¯à¯‚ (கெனà¯à®¯à®¾)", + "kk": "கசாகà¯", + "kk_KZ": "கசாக௠(கஸகஸà¯à®¤à®¾à®©à¯)", + "kl": "கலாலிசூடà¯", + "kl_GL": "கலாலிசூட௠(கிரீனà¯à®²à®¾à®¨à¯à®¤à¯)", + "km": "கெமெரà¯", + "km_KH": "கெமெர௠(கமà¯à®ªà¯‹à®Ÿà®¿à®¯à®¾)", + "kn": "கனà¯à®©à®Ÿà®®à¯", + "kn_IN": "கனà¯à®©à®Ÿà®®à¯ (இநà¯à®¤à®¿à®¯à®¾)", + "ko": "கொரியனà¯", + "ko_KP": "கொரியன௠(வட கொரியா)", + "ko_KR": "கொரியன௠(தென௠கொரியா)", + "ks": "காஷà¯à®®à®¿à®°à®¿", + "ks_IN": "காஷà¯à®®à®¿à®°à®¿ (இநà¯à®¤à®¿à®¯à®¾)", + "kw": "காரà¯à®©à®¿à®·à¯", + "kw_GB": "காரà¯à®©à®¿à®·à¯ (யà¯à®©à¯ˆà®Ÿà¯†à®Ÿà¯ கிஙà¯à®Ÿà®®à¯)", + "ky": "கிரà¯à®•ிஸà¯", + "ky_KG": "கிரà¯à®•ிஸ௠(கிரà¯à®•ிஸà¯à®¤à®¾à®©à¯)", + "lb": "லகà¯à®¸à®®à¯à®ªà¯‹à®°à¯à®•ிஷà¯", + "lb_LU": "லகà¯à®¸à®®à¯à®ªà¯‹à®°à¯à®•ிஷ௠(லகà¯à®¸à¯à®šà®®à¯à®ªà®°à¯à®•à¯)", + "lg": "கானà¯à®Ÿà®¾", + "lg_UG": "கானà¯à®Ÿà®¾ (உகாணà¯à®Ÿà®¾)", + "ln": "லிஙà¯à®•ாலா", + "ln_AO": "லிஙà¯à®•ாலா (à®…à®™à¯à®•ோலா)", + "ln_CD": "லிஙà¯à®•ாலா (காஙà¯à®•ோ - கினà¯à®·à®¾à®šà®¾)", + "ln_CF": "லிஙà¯à®•ாலா (மதà¯à®¤à®¿à®¯ ஆபà¯à®°à®¿à®•à¯à®•க௠கà¯à®Ÿà®¿à®¯à®°à®šà¯)", + "ln_CG": "லிஙà¯à®•ாலா (காஙà¯à®•ோ - பà¯à®°à®¾à®¸à®¾à®µà®¿à®²à¯à®²à¯‡)", + "lo": "லாவோ", + "lo_LA": "லாவோ (லாவோஸà¯)", + "lt": "லிதà¯à®µà¯‡à®©à®¿à®¯à®©à¯", + "lt_LT": "லிதà¯à®µà¯‡à®©à®¿à®¯à®©à¯ (லிதà¯à®µà¯‡à®©à®¿à®¯à®¾)", + "lu": "லà¯à®ªà®¾-கடாஙà¯à®•ா", + "lu_CD": "லà¯à®ªà®¾-கடாஙà¯à®•ா (காஙà¯à®•ோ - கினà¯à®·à®¾à®šà®¾)", + "lv": "லாடà¯à®µà®¿à®¯à®©à¯", + "lv_LV": "லாடà¯à®µà®¿à®¯à®©à¯ (லாடà¯à®µà®¿à®¯à®¾)", + "mg": "மலகாஸி", + "mg_MG": "மலகாஸி (மடகாஸà¯à®•à®°à¯)", + "mk": "மாஸிடோனியனà¯", + "mk_MK": "மாஸிடோனியன௠(மாசிடோனியா)", + "ml": "மலையாளமà¯", + "ml_IN": "மலையாளம௠(இநà¯à®¤à®¿à®¯à®¾)", + "mn": "மஙà¯à®•ோலியனà¯", + "mn_MN": "மஙà¯à®•ோலியன௠(மஙà¯à®•ோலியா)", + "mr": "மராதà¯à®¤à®¿", + "mr_IN": "மராதà¯à®¤à®¿ (இநà¯à®¤à®¿à®¯à®¾)", + "ms": "மலாயà¯", + "ms_BN": "மலாய௠(பà¯à®°à¯à®©à¯‡)", + "ms_MY": "மலாய௠(மலேசியா)", + "ms_SG": "மலாய௠(சிஙà¯à®•பà¯à®ªà¯‚à®°à¯)", + "mt": "மாலà¯à®Ÿà®¿à®¸à¯", + "mt_MT": "மாலà¯à®Ÿà®¿à®¸à¯ (மாலà¯à®Ÿà®¾)", + "my": "பரà¯à®®à¯€à®¸à¯", + "my_MM": "பரà¯à®®à¯€à®¸à¯ (மியானà¯à®®à®¾à®°à¯ (பரà¯à®®à®¾))", + "nb": "நாரà¯à®µà¯‡à®œà®¿à®¯à®©à¯ பொகà¯à®®à®¾à®²à¯", + "nb_NO": "நாரà¯à®µà¯‡à®œà®¿à®¯à®©à¯ பொகà¯à®®à®¾à®²à¯ (நாரà¯à®µà¯‡)", + "nb_SJ": "நாரà¯à®µà¯‡à®œà®¿à®¯à®©à¯ பொகà¯à®®à®¾à®²à¯ (ஸà¯à®µà®²à¯à®ªà®¾à®°à¯à®Ÿà¯ & ஜான௠மேயனà¯)", + "nd": "வடகà¯à®•௠தெபெலே", + "nd_ZW": "வடகà¯à®•௠தெபெலே (ஜிமà¯à®ªà®¾à®ªà¯à®µà¯‡)", + "ne": "நேபாளி", + "ne_IN": "நேபாளி (இநà¯à®¤à®¿à®¯à®¾)", + "ne_NP": "நேபாளி (நேபாளமà¯)", + "nl": "டசà¯à®šà¯", + "nl_AW": "டசà¯à®šà¯ (அரூபா)", + "nl_BE": "டசà¯à®šà¯ (பெலà¯à®œà®¿à®¯à®®à¯)", + "nl_BQ": "டசà¯à®šà¯ (கரீபியன௠நெதரà¯à®²à®¾à®¨à¯à®¤à¯)", + "nl_CW": "டசà¯à®šà¯ (கà¯à®°à®¾à®•வà¯)", + "nl_NL": "டசà¯à®šà¯ (நெதரà¯à®²à®¾à®¨à¯à®¤à¯)", + "nl_SR": "டசà¯à®šà¯ (சà¯à®°à®¿à®©à®¾à®®à¯)", + "nl_SX": "டசà¯à®šà¯ (சினà¯à®Ÿà¯ மாரà¯à®Ÿà¯†à®©à¯)", + "nn": "நாரà¯à®µà¯‡à®œà®¿à®¯à®©à¯ நியூநாரà¯à®¸à¯à®•à¯", + "nn_NO": "நாரà¯à®µà¯‡à®œà®¿à®¯à®©à¯ நியூநாரà¯à®¸à¯à®•௠(நாரà¯à®µà¯‡)", + "no": "நாரà¯à®µà¯‡à®œà®¿à®¯à®©à¯", + "no_NO": "நாரà¯à®µà¯‡à®œà®¿à®¯à®©à¯ (நாரà¯à®µà¯‡)", + "om": "ஒரோமோ", + "om_ET": "ஒரோமோ (எதà¯à®¤à®¿à®¯à¯‹à®ªà¯à®ªà®¿à®¯à®¾)", + "om_KE": "ஒரோமோ (கெனà¯à®¯à®¾)", + "or": "ஒடியா", + "or_IN": "ஒடியா (இநà¯à®¤à®¿à®¯à®¾)", + "os": "ஒசெடà¯à®Ÿà®¿à®•à¯", + "os_GE": "ஒசெடà¯à®Ÿà®¿à®•௠(ஜாரà¯à®œà®¿à®¯à®¾)", + "os_RU": "ஒசெடà¯à®Ÿà®¿à®•௠(à®°à®·à¯à®¯à®¾)", + "pa": "பஞà¯à®šà®¾à®ªà®¿", + "pa_Arab": "பஞà¯à®šà®¾à®ªà®¿ (அரபிகà¯)", + "pa_Arab_PK": "பஞà¯à®šà®¾à®ªà®¿ (அரபிகà¯, பாகிஸà¯à®¤à®¾à®©à¯)", + "pa_Guru": "பஞà¯à®šà®¾à®ªà®¿ (கà¯à®°à¯à®®à¯à®•ி)", + "pa_Guru_IN": "பஞà¯à®šà®¾à®ªà®¿ (கà¯à®°à¯à®®à¯à®•ி, இநà¯à®¤à®¿à®¯à®¾)", + "pa_IN": "பஞà¯à®šà®¾à®ªà®¿ (இநà¯à®¤à®¿à®¯à®¾)", + "pa_PK": "பஞà¯à®šà®¾à®ªà®¿ (பாகிஸà¯à®¤à®¾à®©à¯)", + "pl": "போலிஷà¯", + "pl_PL": "போலிஷ௠(போலநà¯à®¤à¯)", + "ps": "பஷà¯à®¤à¯‹", + "ps_AF": "பஷà¯à®¤à¯‹ (ஆபà¯à®•ானிஸà¯à®¤à®¾à®©à¯)", + "pt": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸà¯", + "pt_AO": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸ௠(à®…à®™à¯à®•ோலா)", + "pt_BR": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸ௠(பிரேசிலà¯)", + "pt_CH": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸ௠(ஸà¯à®µà®¿à®Ÿà¯à®šà®°à¯à®²à®¾à®¨à¯à®¤à¯)", + "pt_CV": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸ௠(கேப௠வெரà¯à®Ÿà¯‡)", + "pt_GQ": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸ௠(ஈகà¯à®µà®Ÿà¯‹à®°à®¿à®¯à®²à¯ கினியா)", + "pt_GW": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸ௠(கினியா-பிஸà¯à®¸à®¾à®µà¯)", + "pt_LU": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸ௠(லகà¯à®¸à¯à®šà®®à¯à®ªà®°à¯à®•à¯)", + "pt_MO": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸ௠(மகாவ௠எஸà¯à®à®†à®°à¯ சீனா)", + "pt_MZ": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸ௠(மொசாமà¯à®ªà®¿à®•à¯)", + "pt_PT": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸ௠(போரà¯à®šà¯à®šà¯à®•à¯à®•லà¯)", + "pt_ST": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸ௠(சாவ௠தோம௠& பà¯à®°à®¿à®©à¯à®šà®¿à®ªà®¿)", + "pt_TL": "போரà¯à®šà¯à®šà¯à®•à¯à®•ீஸ௠(தைமூரà¯-லெஸà¯à®¤à¯‡)", + "qu": "கà¯à®µà¯†à®šà¯à®šà¯à®µà®¾", + "qu_BO": "கà¯à®µà¯†à®šà¯à®šà¯à®µà®¾ (பொலிவியா)", + "qu_EC": "கà¯à®µà¯†à®šà¯à®šà¯à®µà®¾ (ஈகà¯à®µà®Ÿà®¾à®°à¯)", + "qu_PE": "கà¯à®µà¯†à®šà¯à®šà¯à®µà®¾ (பெரà¯)", + "rm": "ரோமானà¯à®·à¯", + "rm_CH": "ரோமானà¯à®·à¯ (ஸà¯à®µà®¿à®Ÿà¯à®šà®°à¯à®²à®¾à®¨à¯à®¤à¯)", + "rn": "à®°à¯à®£à¯à®Ÿà®¿", + "rn_BI": "à®°à¯à®£à¯à®Ÿà®¿ (பà¯à®°à¯à®£à¯à®Ÿà®¿)", + "ro": "ரோமேனியனà¯", + "ro_MD": "ரோமேனியன௠(மாலà¯à®Ÿà¯‹à®µà®¾)", + "ro_RO": "ரோமேனியன௠(à®°à¯à®®à¯‡à®©à®¿à®¯à®¾)", + "ru": "ரஷியனà¯", + "ru_BY": "ரஷியன௠(பெலாரூஸà¯)", + "ru_KG": "ரஷியன௠(கிரà¯à®•ிஸà¯à®¤à®¾à®©à¯)", + "ru_KZ": "ரஷியன௠(கஸகஸà¯à®¤à®¾à®©à¯)", + "ru_MD": "ரஷியன௠(மாலà¯à®Ÿà¯‹à®µà®¾)", + "ru_RU": "ரஷியன௠(à®°à®·à¯à®¯à®¾)", + "ru_UA": "ரஷியன௠(உகà¯à®°à¯ˆà®©à¯)", + "rw": "கினà¯à®¯à®¾à®°à¯à®µà®¾à®©à¯à®Ÿà®¾", + "rw_RW": "கினà¯à®¯à®¾à®°à¯à®µà®¾à®©à¯à®Ÿà®¾ (à®°à¯à®µà®¾à®£à¯à®Ÿà®¾)", + "se": "வடகà¯à®•௠சமி", + "se_FI": "வடகà¯à®•௠சமி (பினà¯à®²à®¾à®¨à¯à®¤à¯)", + "se_NO": "வடகà¯à®•௠சமி (நாரà¯à®µà¯‡)", + "se_SE": "வடகà¯à®•௠சமி (ஸà¯à®µà¯€à®Ÿà®©à¯)", + "sg": "சாஙà¯à®•ோ", + "sg_CF": "சாஙà¯à®•ோ (மதà¯à®¤à®¿à®¯ ஆபà¯à®°à®¿à®•à¯à®•க௠கà¯à®Ÿà®¿à®¯à®°à®šà¯)", + "sh": "செரà¯à®ªà¯‹-கà¯à®°à¯‹à®·à®¿à®¯à®©à¯", + "sh_BA": "செரà¯à®ªà¯‹-கà¯à®°à¯‹à®·à®¿à®¯à®©à¯ (போஸà¯à®©à®¿à®¯à®¾ & ஹெரà¯à®¸à®•ோவினா)", + "si": "சிஙà¯à®•ளமà¯", + "si_LK": "சிஙà¯à®•ளம௠(இலஙà¯à®•ை)", + "sk": "ஸà¯à®²à¯‹à®µà®¾à®•à¯", + "sk_SK": "ஸà¯à®²à¯‹à®µà®¾à®•௠(ஸà¯à®²à¯‹à®µà®¾à®•ியா)", + "sl": "ஸà¯à®²à¯‹à®µà¯‡à®©à®¿à®¯à®©à¯", + "sl_SI": "ஸà¯à®²à¯‹à®µà¯‡à®©à®¿à®¯à®©à¯ (ஸà¯à®²à¯‹à®µà¯‡à®©à®¿à®¯à®¾)", + "sn": "ஷோனா", + "sn_ZW": "ஷோனா (ஜிமà¯à®ªà®¾à®ªà¯à®µà¯‡)", + "so": "சோமாலி", + "so_DJ": "சோமாலி (ஜிபௌடà¯à®Ÿà®¿)", + "so_ET": "சோமாலி (எதà¯à®¤à®¿à®¯à¯‹à®ªà¯à®ªà®¿à®¯à®¾)", + "so_KE": "சோமாலி (கெனà¯à®¯à®¾)", + "so_SO": "சோமாலி (சோமாலியா)", + "sq": "அலà¯à®ªà¯‡à®©à®¿à®¯à®©à¯", + "sq_AL": "அலà¯à®ªà¯‡à®©à®¿à®¯à®©à¯ (அலà¯à®ªà¯‡à®©à®¿à®¯à®¾)", + "sq_MK": "அலà¯à®ªà¯‡à®©à®¿à®¯à®©à¯ (மாசிடோனியா)", + "sq_XK": "அலà¯à®ªà¯‡à®©à®¿à®¯à®©à¯ (கொசோவோ)", + "sr": "செரà¯à®ªà®¿à®¯à®©à¯", + "sr_BA": "செரà¯à®ªà®¿à®¯à®©à¯ (போஸà¯à®©à®¿à®¯à®¾ & ஹெரà¯à®¸à®•ோவினா)", + "sr_Cyrl": "செரà¯à®ªà®¿à®¯à®©à¯ (சிரிலிகà¯)", + "sr_Cyrl_BA": "செரà¯à®ªà®¿à®¯à®©à¯ (சிரிலிகà¯, போஸà¯à®©à®¿à®¯à®¾ & ஹெரà¯à®¸à®•ோவினா)", + "sr_Cyrl_ME": "செரà¯à®ªà®¿à®¯à®©à¯ (சிரிலிகà¯, மானà¯à®Ÿà¯‡à®©à¯†à®•à¯à®°à¯‹)", + "sr_Cyrl_RS": "செரà¯à®ªà®¿à®¯à®©à¯ (சிரிலிகà¯, செரà¯à®ªà®¿à®¯à®¾)", + "sr_Cyrl_XK": "செரà¯à®ªà®¿à®¯à®©à¯ (சிரிலிகà¯, கொசோவோ)", + "sr_Latn": "செரà¯à®ªà®¿à®¯à®©à¯ (லதà¯à®¤à®¿à®©à¯)", + "sr_Latn_BA": "செரà¯à®ªà®¿à®¯à®©à¯ (லதà¯à®¤à®¿à®©à¯, போஸà¯à®©à®¿à®¯à®¾ & ஹெரà¯à®¸à®•ோவினா)", + "sr_Latn_ME": "செரà¯à®ªà®¿à®¯à®©à¯ (லதà¯à®¤à®¿à®©à¯, மானà¯à®Ÿà¯‡à®©à¯†à®•à¯à®°à¯‹)", + "sr_Latn_RS": "செரà¯à®ªà®¿à®¯à®©à¯ (லதà¯à®¤à®¿à®©à¯, செரà¯à®ªà®¿à®¯à®¾)", + "sr_Latn_XK": "செரà¯à®ªà®¿à®¯à®©à¯ (லதà¯à®¤à®¿à®©à¯, கொசோவோ)", + "sr_ME": "செரà¯à®ªà®¿à®¯à®©à¯ (மானà¯à®Ÿà¯‡à®©à¯†à®•à¯à®°à¯‹)", + "sr_RS": "செரà¯à®ªà®¿à®¯à®©à¯ (செரà¯à®ªà®¿à®¯à®¾)", + "sr_XK": "செரà¯à®ªà®¿à®¯à®©à¯ (கொசோவோ)", + "sv": "ஸà¯à®µà¯€à®Ÿà®¿à®·à¯", + "sv_AX": "ஸà¯à®µà¯€à®Ÿà®¿à®·à¯ (ஆலநà¯à®¤à¯ தீவà¯à®•ளà¯)", + "sv_FI": "ஸà¯à®µà¯€à®Ÿà®¿à®·à¯ (பினà¯à®²à®¾à®¨à¯à®¤à¯)", + "sv_SE": "ஸà¯à®µà¯€à®Ÿà®¿à®·à¯ (ஸà¯à®µà¯€à®Ÿà®©à¯)", + "sw": "ஸà¯à®µà®¾à®¹à®¿à®²à®¿", + "sw_CD": "ஸà¯à®µà®¾à®¹à®¿à®²à®¿ (காஙà¯à®•ோ - கினà¯à®·à®¾à®šà®¾)", + "sw_KE": "ஸà¯à®µà®¾à®¹à®¿à®²à®¿ (கெனà¯à®¯à®¾)", + "sw_TZ": "ஸà¯à®µà®¾à®¹à®¿à®²à®¿ (தானà¯à®šà®¾à®©à®¿à®¯à®¾)", + "sw_UG": "ஸà¯à®µà®¾à®¹à®¿à®²à®¿ (உகாணà¯à®Ÿà®¾)", + "ta": "தமிழà¯", + "ta_IN": "தமிழ௠(இநà¯à®¤à®¿à®¯à®¾)", + "ta_LK": "தமிழ௠(இலஙà¯à®•ை)", + "ta_MY": "தமிழ௠(மலேசியா)", + "ta_SG": "தமிழ௠(சிஙà¯à®•பà¯à®ªà¯‚à®°à¯)", + "te": "தெலà¯à®™à¯à®•à¯", + "te_IN": "தெலà¯à®™à¯à®•௠(இநà¯à®¤à®¿à®¯à®¾)", + "th": "தாயà¯", + "th_TH": "தாய௠(தாயà¯à®²à®¾à®¨à¯à®¤à¯)", + "ti": "டிகà¯à®°à®¿à®©à¯à®¯à®¾", + "ti_ER": "டிகà¯à®°à®¿à®©à¯à®¯à®¾ (எரிடà¯à®°à®¿à®¯à®¾)", + "ti_ET": "டிகà¯à®°à®¿à®©à¯à®¯à®¾ (எதà¯à®¤à®¿à®¯à¯‹à®ªà¯à®ªà®¿à®¯à®¾)", + "tl": "டாகாலோகà¯", + "tl_PH": "டாகாலோக௠(பிலிபà¯à®ªà¯ˆà®©à¯à®¸à¯)", + "to": "டோஙà¯à®•ானà¯", + "to_TO": "டோஙà¯à®•ான௠(டோஙà¯à®•ா)", + "tr": "தà¯à®°à¯à®•à¯à®•ிஷà¯", + "tr_CY": "தà¯à®°à¯à®•à¯à®•ிஷ௠(சைபà¯à®°à®¸à¯)", + "tr_TR": "தà¯à®°à¯à®•à¯à®•ிஷ௠(தà¯à®°à¯à®•à¯à®•ி)", + "ug": "உயà¯à®•à¯à®°à¯", + "ug_CN": "உயà¯à®•à¯à®°à¯ (சீனா)", + "uk": "உகà¯à®°à¯ˆà®©à®¿à®¯à®©à¯", + "uk_UA": "உகà¯à®°à¯ˆà®©à®¿à®¯à®©à¯ (உகà¯à®°à¯ˆà®©à¯)", + "ur": "உரà¯à®¤à¯", + "ur_IN": "உரà¯à®¤à¯ (இநà¯à®¤à®¿à®¯à®¾)", + "ur_PK": "உரà¯à®¤à¯ (பாகிஸà¯à®¤à®¾à®©à¯)", + "uz": "உஸà¯à®ªà¯†à®•à¯", + "uz_AF": "உஸà¯à®ªà¯†à®•௠(ஆபà¯à®•ானிஸà¯à®¤à®¾à®©à¯)", + "uz_Arab": "உஸà¯à®ªà¯†à®•௠(அரபிகà¯)", + "uz_Arab_AF": "உஸà¯à®ªà¯†à®•௠(அரபிகà¯, ஆபà¯à®•ானிஸà¯à®¤à®¾à®©à¯)", + "uz_Cyrl": "உஸà¯à®ªà¯†à®•௠(சிரிலிகà¯)", + "uz_Cyrl_UZ": "உஸà¯à®ªà¯†à®•௠(சிரிலிகà¯, உஸà¯à®ªà¯†à®•ிஸà¯à®¤à®¾à®©à¯)", + "uz_Latn": "உஸà¯à®ªà¯†à®•௠(லதà¯à®¤à®¿à®©à¯)", + "uz_Latn_UZ": "உஸà¯à®ªà¯†à®•௠(லதà¯à®¤à®¿à®©à¯, உஸà¯à®ªà¯†à®•ிஸà¯à®¤à®¾à®©à¯)", + "uz_UZ": "உஸà¯à®ªà¯†à®•௠(உஸà¯à®ªà¯†à®•ிஸà¯à®¤à®¾à®©à¯)", + "vi": "வியடà¯à®¨à®¾à®®à¯€à®¸à¯", + "vi_VN": "வியடà¯à®¨à®¾à®®à¯€à®¸à¯ (வியடà¯à®¨à®¾à®®à¯)", + "yi": "யெடà¯à®Ÿà®¿à®·à¯", + "yo": "யோரà¯à®ªà®¾", + "yo_BJ": "யோரà¯à®ªà®¾ (பெனினà¯)", + "yo_NG": "யோரà¯à®ªà®¾ (நைஜீரியா)", + "zh": "சீனமà¯", + "zh_CN": "சீனம௠(சீனா)", + "zh_HK": "சீனம௠(ஹாஙà¯à®•ாங௠எஸà¯à®à®†à®°à¯ சீனா)", + "zh_Hans": "சீனம௠(எளிதாகà¯à®•பà¯à®ªà®Ÿà¯à®Ÿà®¤à¯)", + "zh_Hans_CN": "சீனம௠(எளிதாகà¯à®•பà¯à®ªà®Ÿà¯à®Ÿà®¤à¯, சீனா)", + "zh_Hans_HK": "சீனம௠(எளிதாகà¯à®•பà¯à®ªà®Ÿà¯à®Ÿà®¤à¯, ஹாஙà¯à®•ாங௠எஸà¯à®à®†à®°à¯ சீனா)", + "zh_Hans_MO": "சீனம௠(எளிதாகà¯à®•பà¯à®ªà®Ÿà¯à®Ÿà®¤à¯, மகாவ௠எஸà¯à®à®†à®°à¯ சீனா)", + "zh_Hans_SG": "சீனம௠(எளிதாகà¯à®•பà¯à®ªà®Ÿà¯à®Ÿà®¤à¯, சிஙà¯à®•பà¯à®ªà¯‚à®°à¯)", + "zh_Hant": "சீனம௠(பாரமà¯à®ªà®°à®¿à®¯à®®à¯)", + "zh_Hant_HK": "சீனம௠(பாரமà¯à®ªà®°à®¿à®¯à®®à¯, ஹாஙà¯à®•ாங௠எஸà¯à®à®†à®°à¯ சீனா)", + "zh_Hant_MO": "சீனம௠(பாரமà¯à®ªà®°à®¿à®¯à®®à¯, மகாவ௠எஸà¯à®à®†à®°à¯ சீனா)", + "zh_Hant_TW": "சீனம௠(பாரமà¯à®ªà®°à®¿à®¯à®®à¯, தைவானà¯)", + "zh_MO": "சீனம௠(மகாவ௠எஸà¯à®à®†à®°à¯ சீனா)", + "zh_SG": "சீனம௠(சிஙà¯à®•பà¯à®ªà¯‚à®°à¯)", + "zh_TW": "சீனம௠(தைவானà¯)", + "zu": "ஜà¯à®²à¯", + "zu_ZA": "ஜà¯à®²à¯ (தென௠ஆபà¯à®ªà®¿à®°à®¿à®•à¯à®•ா)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/te.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/te.json new file mode 100644 index 0000000000000000000000000000000000000000..da22f5c52d384c8efb69c1e966bf54461d4f7d4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/te.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "ఆఫà±à°°à°¿à°•ానà±à°¸à±", + "af_NA": "ఆఫà±à°°à°¿à°•ానà±à°¸à± (నమీబియా)", + "af_ZA": "ఆఫà±à°°à°¿à°•ానà±à°¸à± (దకà±à°·à°¿à°£ ఆఫà±à°°à°¿à°•à°¾)", + "ak": "అకానà±", + "ak_GH": "అకానౠ(ఘనా)", + "am": "à°…à°®à±à°¹à°¾à°°à°¿à°•à±", + "am_ET": "à°…à°®à±à°¹à°¾à°°à°¿à°•à± (ఇథియోపియా)", + "ar": "అరబికà±", + "ar_AE": "అరబికౠ(à°¯à±à°¨à±ˆà°Ÿà±†à°¡à± అరబౠఎమిరేటà±à°¸à±)", + "ar_BH": "అరబికౠ(బహà±à°°à±†à°¯à°¿à°¨à±)", + "ar_DJ": "అరబికౠ(జిబౌటి)", + "ar_DZ": "అరబికౠ(à°…à°²à±à°œà±€à°°à°¿à°¯à°¾)", + "ar_EG": "అరబికౠ(ఈజిపà±à°Ÿà±)", + "ar_EH": "అరబికౠ(పడమటి సహారా)", + "ar_ER": "అరబికౠ(à°Žà°°à°¿à°Ÿà±à°°à°¿à°¯à°¾)", + "ar_IL": "అరబికౠ(ఇజà±à°°à°¾à°¯à°¿à°²à±)", + "ar_IQ": "అరబికౠ(ఇరాకà±)", + "ar_JO": "అరబికౠ(జోరà±à°¡à°¾à°¨à±)", + "ar_KM": "అరబికౠ(కొమొరోసà±)", + "ar_KW": "అరబికౠ(à°•à±à°µà±ˆà°Ÿà±)", + "ar_LB": "అరబికౠ(లెబనానà±)", + "ar_LY": "అరబికౠ(లిబియా)", + "ar_MA": "అరబికౠ(మొరాకో)", + "ar_MR": "అరబికౠ(మౌరిటేనియా)", + "ar_OM": "అరబికౠ(ఒమనà±)", + "ar_PS": "అరబికౠ(పాలసà±à°¤à±€à°¨à°¿à°¯à°¨à± à°ªà±à°°à°¾à°‚తాలà±)", + "ar_QA": "అరబికౠ(ఖతరà±)", + "ar_SA": "అరబికౠ(సౌదీ అరేబియా)", + "ar_SD": "అరబికౠ(సూడానà±)", + "ar_SO": "అరబికౠ(సోమాలియా)", + "ar_SS": "అరబికౠ(దకà±à°·à°¿à°£ సూడానà±)", + "ar_SY": "అరబికౠ(సిరియా)", + "ar_TD": "అరబికౠ(చాదà±)", + "ar_TN": "అరబికౠ(à°Ÿà±à°¯à±à°¨à±€à°·à°¿à°¯à°¾)", + "ar_YE": "అరబికౠ(యెమెనà±)", + "as": "à°…à°¸à±à°¸à°¾à°®à±€à°¸à±", + "as_IN": "à°…à°¸à±à°¸à°¾à°®à±€à°¸à± (భారత దేశం)", + "az": "అజరà±à°¬à±ˆà°œà°¾à°¨à°¿", + "az_AZ": "అజరà±à°¬à±ˆà°œà°¾à°¨à°¿ (అజరà±à°¬à±ˆà°œà°¾à°¨à±)", + "az_Cyrl": "అజరà±à°¬à±ˆà°œà°¾à°¨à°¿ (సిరిలికà±)", + "az_Cyrl_AZ": "అజరà±à°¬à±ˆà°œà°¾à°¨à°¿ (సిరిలికà±, అజరà±à°¬à±ˆà°œà°¾à°¨à±)", + "az_Latn": "అజరà±à°¬à±ˆà°œà°¾à°¨à°¿ (లాటినà±)", + "az_Latn_AZ": "అజరà±à°¬à±ˆà°œà°¾à°¨à°¿ (లాటినà±, అజరà±à°¬à±ˆà°œà°¾à°¨à±)", + "be": "బెలరà±à°·à°¿à°¯à°¨à±", + "be_BY": "బెలరà±à°·à°¿à°¯à°¨à± (బెలారసà±)", + "bg": "బలà±à°—ేరియనà±", + "bg_BG": "బలà±à°—ేరియనౠ(బలà±à°—ేరియా)", + "bm": "బంబారా", + "bm_ML": "బంబారా (మాలి)", + "bn": "బాంగà±à°²à°¾", + "bn_BD": "బాంగà±à°²à°¾ (బంగà±à°²à°¾à°¦à±‡à°¶à±)", + "bn_IN": "బాంగà±à°²à°¾ (భారత దేశం)", + "bo": "టిబెటనà±", + "bo_CN": "టిబెటనౠ(చైనా)", + "bo_IN": "టిబెటనౠ(భారత దేశం)", + "br": "à°¬à±à°°à±†à°Ÿà°¨à±", + "br_FR": "à°¬à±à°°à±†à°Ÿà°¨à± (à°«à±à°°à°¾à°¨à±à°¸à±â€Œ)", + "bs": "బోసà±à°¨à°¿à°¯à°¨à±", + "bs_BA": "బోసà±à°¨à°¿à°¯à°¨à± (బోసà±à°¨à°¿à°¯à°¾ మరియౠహెరà±à°œà±†à°—ొవీనా)", + "bs_Cyrl": "బోసà±à°¨à°¿à°¯à°¨à± (సిరిలికà±)", + "bs_Cyrl_BA": "బోసà±à°¨à°¿à°¯à°¨à± (సిరిలికà±, బోసà±à°¨à°¿à°¯à°¾ మరియౠహెరà±à°œà±†à°—ొవీనా)", + "bs_Latn": "బోసà±à°¨à°¿à°¯à°¨à± (లాటినà±)", + "bs_Latn_BA": "బోసà±à°¨à°¿à°¯à°¨à± (లాటినà±, బోసà±à°¨à°¿à°¯à°¾ మరియౠహెరà±à°œà±†à°—ొవీనా)", + "ca": "కెటలానà±", + "ca_AD": "కెటలానౠ(అండొరà±à°°à°¾)", + "ca_ES": "కెటలానౠ(à°¸à±à°ªà±†à°¯à°¿à°¨à±)", + "ca_FR": "కెటలానౠ(à°«à±à°°à°¾à°¨à±à°¸à±â€Œ)", + "ca_IT": "కెటలానౠ(ఇటలీ)", + "ce": "చెచెనà±", + "ce_RU": "చెచెనౠ(à°°à°·à±à°¯à°¾)", + "cs": "చెకà±", + "cs_CZ": "చెకౠ(చెకౠరిపబà±à°²à°¿à°•à±)", + "cy": "వెలà±à°·à±", + "cy_GB": "వెలà±à°·à± (à°¯à±à°¨à±ˆà°Ÿà±†à°¡à± à°•à°¿à°‚à°—à±â€Œà°¡à°®à±)", + "da": "డానిషà±", + "da_DK": "డానిషౠ(డెనà±à°®à°¾à°°à±à°•à±)", + "da_GL": "డానిషౠ(à°—à±à°°à±€à°¨à±â€Œà°²à°¾à°‚à°¡à±)", + "de": "జరà±à°®à°¨à±", + "de_AT": "జరà±à°®à°¨à± (ఆసà±à°Ÿà±à°°à°¿à°¯à°¾)", + "de_BE": "జరà±à°®à°¨à± (బెలà±à°œà°¿à°¯à°‚)", + "de_CH": "జరà±à°®à°¨à± (à°¸à±à°µà°¿à°Ÿà±à°œà°°à±à°²à°¾à°‚à°¡à±)", + "de_DE": "జరà±à°®à°¨à± (జరà±à°®à°¨à±€)", + "de_IT": "జరà±à°®à°¨à± (ఇటలీ)", + "de_LI": "జరà±à°®à°¨à± (లికà±à°Ÿà±†à°¸à±à°Ÿà±‡à°¨à±)", + "de_LU": "జరà±à°®à°¨à± (లకà±à°¸à°‚బరà±à°—à±)", + "dz": "జోంఖా", + "dz_BT": "జోంఖా (భూటానà±)", + "ee": "ఈవీ", + "ee_GH": "ఈవీ (ఘనా)", + "ee_TG": "ఈవీ (టోగో)", + "el": "à°—à±à°°à±€à°•à±", + "el_CY": "à°—à±à°°à±€à°•à± (సైపà±à°°à°¸à±)", + "el_GR": "à°—à±à°°à±€à°•à± (à°—à±à°°à±€à°¸à±)", + "en": "ఆంగà±à°²à°‚", + "en_AG": "ఆంగà±à°²à°‚ (ఆంటిగà±à°µà°¾ మరియౠబారà±à°¬à±à°¡à°¾)", + "en_AI": "ఆంగà±à°²à°‚ (ఆంగవిలà±à°²à°¾)", + "en_AS": "ఆంగà±à°²à°‚ (అమెరికనౠసమోవా)", + "en_AT": "ఆంగà±à°²à°‚ (ఆసà±à°Ÿà±à°°à°¿à°¯à°¾)", + "en_AU": "ఆంగà±à°²à°‚ (ఆసà±à°Ÿà±à°°à±‡à°²à°¿à°¯à°¾)", + "en_BB": "ఆంగà±à°²à°‚ (బారà±à°¬à°¡à±‹à°¸à±)", + "en_BE": "ఆంగà±à°²à°‚ (బెలà±à°œà°¿à°¯à°‚)", + "en_BI": "ఆంగà±à°²à°‚ (à°¬à±à°°à±à°‚à°¡à°¿)", + "en_BM": "ఆంగà±à°²à°‚ (బెరà±à°®à±à°¡à°¾)", + "en_BS": "ఆంగà±à°²à°‚ (బహామాసà±)", + "en_BW": "ఆంగà±à°²à°‚ (బోటà±à°¸à±à°µà°¾à°¨à°¾)", + "en_BZ": "ఆంగà±à°²à°‚ (బెలిజà±)", + "en_CA": "ఆంగà±à°²à°‚ (కెనడా)", + "en_CC": "ఆంగà±à°²à°‚ (కోకోసౠ(కీలింగà±) దీవà±à°²à±)", + "en_CH": "ఆంగà±à°²à°‚ (à°¸à±à°µà°¿à°Ÿà±à°œà°°à±à°²à°¾à°‚à°¡à±)", + "en_CK": "ఆంగà±à°²à°‚ (à°•à±à°•ౠదీవà±à°²à±)", + "en_CM": "ఆంగà±à°²à°‚ (కామెరూనà±)", + "en_CX": "ఆంగà±à°²à°‚ (à°•à±à°°à°¿à°¸à±à°®à°¸à± దీవి)", + "en_CY": "ఆంగà±à°²à°‚ (సైపà±à°°à°¸à±)", + "en_DE": "ఆంగà±à°²à°‚ (జరà±à°®à°¨à±€)", + "en_DG": "ఆంగà±à°²à°‚ (డియాగో గారà±à°¸à°¿à°¯à°¾)", + "en_DK": "ఆంగà±à°²à°‚ (డెనà±à°®à°¾à°°à±à°•à±)", + "en_DM": "ఆంగà±à°²à°‚ (డొమెనికా)", + "en_ER": "ఆంగà±à°²à°‚ (à°Žà°°à°¿à°Ÿà±à°°à°¿à°¯à°¾)", + "en_FI": "ఆంగà±à°²à°‚ (à°«à°¿à°¨à±à°²à°¾à°‚à°¡à±)", + "en_FJ": "ఆంగà±à°²à°‚ (ఫిజీ)", + "en_FK": "ఆంగà±à°²à°‚ (ఫాకà±â€Œà°²à±à°¯à°¾à°‚డౠదీవà±à°²à±)", + "en_FM": "ఆంగà±à°²à°‚ (మైకà±à°°à±‹à°¨à±‡à°·à°¿à°¯à°¾)", + "en_GB": "ఆంగà±à°²à°‚ (à°¯à±à°¨à±ˆà°Ÿà±†à°¡à± à°•à°¿à°‚à°—à±â€Œà°¡à°®à±)", + "en_GD": "ఆంగà±à°²à°‚ (à°—à±à°°à±†à°¨à±†à°¡à°¾)", + "en_GG": "ఆంగà±à°²à°‚ (à°—à±à°µà±‡à°°à±à°¨à°¸à±‡)", + "en_GH": "ఆంగà±à°²à°‚ (ఘనా)", + "en_GI": "ఆంగà±à°²à°‚ (జిబà±à°°à°¾à°²à±à°Ÿà°¾à°°à±)", + "en_GM": "ఆంగà±à°²à°‚ (గాంబియా)", + "en_GU": "ఆంగà±à°²à°‚ (à°—à±à°µà°¾à°®à±)", + "en_GY": "ఆంగà±à°²à°‚ (గయానా)", + "en_HK": "ఆంగà±à°²à°‚ (హాంకాంగౠఎసà±à°à°†à°°à± చైనా)", + "en_IE": "ఆంగà±à°²à°‚ (à°à°°à±à°²à°¾à°‚à°¡à±)", + "en_IL": "ఆంగà±à°²à°‚ (ఇజà±à°°à°¾à°¯à°¿à°²à±)", + "en_IM": "ఆంగà±à°²à°‚ (à°à°²à± ఆఫౠమానà±)", + "en_IN": "ఆంగà±à°²à°‚ (భారత దేశం)", + "en_IO": "ఆంగà±à°²à°‚ (à°¬à±à°°à°¿à°Ÿà±€à°·à± భారతీయ సమà±à°¦à±à°°à°ªà± à°ªà±à°°à°¾à°‚తం)", + "en_JE": "ఆంగà±à°²à°‚ (జెరà±à°¸à±€)", + "en_JM": "ఆంగà±à°²à°‚ (జమైకా)", + "en_KE": "ఆంగà±à°²à°‚ (కెనà±à°¯à°¾)", + "en_KI": "ఆంగà±à°²à°‚ (కిరిబాటి)", + "en_KN": "ఆంగà±à°²à°‚ (సెంటౠకిటà±à°Ÿà±à°¸à± మరియౠనెవిసà±)", + "en_KY": "ఆంగà±à°²à°‚ (కేమానౠదీవà±à°²à±)", + "en_LC": "ఆంగà±à°²à°‚ (సెంటౠలూసియా)", + "en_LR": "ఆంగà±à°²à°‚ (లైబీరియా)", + "en_LS": "ఆంగà±à°²à°‚ (లెసోతో)", + "en_MG": "ఆంగà±à°²à°‚ (మడగాసà±à°•à°°à±)", + "en_MH": "ఆంగà±à°²à°‚ (మారà±à°·à°²à± దీవà±à°²à±)", + "en_MO": "ఆంగà±à°²à°‚ (మకావౠఎసà±à°à°†à°°à± చైనా)", + "en_MP": "ఆంగà±à°²à°‚ (ఉతà±à°¤à°° మరియానా దీవà±à°²à±)", + "en_MS": "ఆంగà±à°²à°‚ (మోంటà±à°¸à±‡à°°à±à°°à°¾à°Ÿà±)", + "en_MT": "ఆంగà±à°²à°‚ (మాలà±à°Ÿà°¾)", + "en_MU": "ఆంగà±à°²à°‚ (మారిషసà±)", + "en_MW": "ఆంగà±à°²à°‚ (మాలావి)", + "en_MY": "ఆంగà±à°²à°‚ (మలేషియా)", + "en_NA": "ఆంగà±à°²à°‚ (నమీబియా)", + "en_NF": "ఆంగà±à°²à°‚ (నారà±à°«à±‹à°•ౠదీవి)", + "en_NG": "ఆంగà±à°²à°‚ (నైజీరియా)", + "en_NL": "ఆంగà±à°²à°‚ (నెదరà±à°²à°¾à°‚à°¡à±à°¸à±)", + "en_NR": "ఆంగà±à°²à°‚ (నౌరà±)", + "en_NU": "ఆంగà±à°²à°‚ (నియà±)", + "en_NZ": "ఆంగà±à°²à°‚ (à°¨à±à°¯à±‚జిలాండà±)", + "en_PG": "ఆంగà±à°²à°‚ (పాపà±à°µà°¾ à°¨à±à°¯à± గినియా)", + "en_PH": "ఆంగà±à°²à°‚ (ఫిలిపà±à°ªà±€à°¨à±à°¸à±)", + "en_PK": "ఆంగà±à°²à°‚ (పాకిసà±à°¤à°¾à°¨à±)", + "en_PN": "ఆంగà±à°²à°‚ (పిటà±â€Œà°•ెయిరà±à°¨à± దీవà±à°²à±)", + "en_PR": "ఆంగà±à°²à°‚ (à°«à±à°¯à±‚à°°à±à°Ÿà±‹ రికో)", + "en_PW": "ఆంగà±à°²à°‚ (పలావà±)", + "en_RW": "ఆంగà±à°²à°‚ (à°°à±à°µà°¾à°‚à°¡à°¾)", + "en_SB": "ఆంగà±à°²à°‚ (సోలమనౠదీవà±à°²à±)", + "en_SC": "ఆంగà±à°²à°‚ (సీషెలà±à°¸à±)", + "en_SD": "ఆంగà±à°²à°‚ (సూడానà±)", + "en_SE": "ఆంగà±à°²à°‚ (à°¸à±à°µà±€à°¡à°¨à±)", + "en_SG": "ఆంగà±à°²à°‚ (సింగపూరà±)", + "en_SH": "ఆంగà±à°²à°‚ (సెయింటౠహెలినా)", + "en_SI": "ఆంగà±à°²à°‚ (à°¸à±à°²à±‹à°µà±‡à°¨à°¿à°¯à°¾)", + "en_SL": "ఆంగà±à°²à°‚ (సియెరà±à°°à°¾ లియానà±)", + "en_SS": "ఆంగà±à°²à°‚ (దకà±à°·à°¿à°£ సూడానà±)", + "en_SX": "ఆంగà±à°²à°‚ (సింటౠమారà±à°Ÿà±†à°¨à±)", + "en_SZ": "ఆంగà±à°²à°‚ (à°¸à±à°µà°¾à°œà°¿à°²à±à°¯à°¾à°‚à°¡à±)", + "en_TC": "ఆంగà±à°²à°‚ (à°¤à±à°°à±à°•ౠమరియౠకాలికోసౠదీవà±à°²à±)", + "en_TK": "ఆంగà±à°²à°‚ (టోకేలావà±)", + "en_TO": "ఆంగà±à°²à°‚ (టోంగా)", + "en_TT": "ఆంగà±à°²à°‚ (à°Ÿà±à°°à°¿à°¨à°¿à°¡à°¾à°¡à± మరియౠటొబాగో)", + "en_TV": "ఆంగà±à°²à°‚ (à°Ÿà±à°µà°¾à°²à±)", + "en_TZ": "ఆంగà±à°²à°‚ (టాంజానియా)", + "en_UG": "ఆంగà±à°²à°‚ (ఉగాండా)", + "en_UM": "ఆంగà±à°²à°‚ (సంయà±à°•à±à°¤ రాజà±à°¯ అమెరికా బయట ఉనà±à°¨ దీవà±à°²à±)", + "en_US": "ఆంగà±à°²à°‚ (అమెరికా సంయà±à°•à±à°¤ రాషà±à°Ÿà±à°°à°¾à°²à±)", + "en_VC": "ఆంగà±à°²à°‚ (సెంటౠవినà±à°¸à±†à°‚టౠమరియౠగà±à°°à±†à°¨à°¡à±€à°¨à±à°¸à±)", + "en_VG": "ఆంగà±à°²à°‚ (à°¬à±à°°à°¿à°Ÿà°¿à°·à± వరà±à°œà°¿à°¨à± దీవà±à°²à±)", + "en_VI": "ఆంగà±à°²à°‚ (à°¯à±.à°Žà°¸à±. వరà±à°œà°¿à°¨à± దీవà±à°²à±)", + "en_VU": "ఆంగà±à°²à°‚ (వనాటà±)", + "en_WS": "ఆంగà±à°²à°‚ (సమోవా)", + "en_ZA": "ఆంగà±à°²à°‚ (దకà±à°·à°¿à°£ ఆఫà±à°°à°¿à°•à°¾)", + "en_ZM": "ఆంగà±à°²à°‚ (జాంబియా)", + "en_ZW": "ఆంగà±à°²à°‚ (జింబాబà±à°µà±‡)", + "eo": "à°Žà°¸à±à°ªà±†à°°à°¾à°‚టో", + "es": "à°¸à±à°ªà°¾à°¨à°¿à°·à±", + "es_AR": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (à°…à°°à±à°œà±†à°‚టీనా)", + "es_BO": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (బొలీవియా)", + "es_BR": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (à°¬à±à°°à±†à°œà°¿à°²à±)", + "es_CL": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (చిలీ)", + "es_CO": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (కొలంబియా)", + "es_CR": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (కోసà±à°Ÿà°¾ à°°à°¿à°•à°¾)", + "es_CU": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (à°•à±à°¯à±‚బా)", + "es_DO": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (డొమెనికనౠరిపబà±à°²à°¿à°•à±)", + "es_EA": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (à°¸à±à°¯à±‚à°Ÿà°¾ & మెలిలà±à°²à°¾)", + "es_EC": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (ఈకà±à°µà°¡à°¾à°°à±)", + "es_ES": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (à°¸à±à°ªà±†à°¯à°¿à°¨à±)", + "es_GQ": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (ఈకà±à°µà°Ÿà±‹à°°à°¿à°¯à°²à± గినియా)", + "es_GT": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (à°—à±à°µà°¾à°Ÿà°¿à°®à°¾à°²)", + "es_HN": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (హోండà±à°°à°¾à°¸à±)", + "es_IC": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (కేనరీ దీవà±à°²à±)", + "es_MX": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (మెకà±à°¸à°¿à°•ో)", + "es_NI": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (నికరాగà±à°µà°¾)", + "es_PA": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (పనామా)", + "es_PE": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (పెరూ)", + "es_PH": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (ఫిలిపà±à°ªà±€à°¨à±à°¸à±)", + "es_PR": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (à°«à±à°¯à±‚à°°à±à°Ÿà±‹ రికో)", + "es_PY": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (పరాగà±à°µà±‡)", + "es_SV": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (ఎలౠసాలà±à°µà°¡à±‹à°°à±)", + "es_US": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (అమెరికా సంయà±à°•à±à°¤ రాషà±à°Ÿà±à°°à°¾à°²à±)", + "es_UY": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (à°Šà°°à±à°—à±à°µà±‡)", + "es_VE": "à°¸à±à°ªà°¾à°¨à°¿à°·à± (వెనà±à°œà±à°²à°¾)", + "et": "ఈసà±à°Ÿà±‹à°¨à°¿à°¯à°¨à±", + "et_EE": "ఈసà±à°Ÿà±‹à°¨à°¿à°¯à°¨à± (à°Žà°¸à±à°Ÿà±‹à°¨à°¿à°¯à°¾)", + "eu": "బాసà±à°•à±à°¯à±‚", + "eu_ES": "బాసà±à°•à±à°¯à±‚ (à°¸à±à°ªà±†à°¯à°¿à°¨à±)", + "fa": "పరà±à°·à°¿à°¯à°¨à±", + "fa_AF": "పరà±à°·à°¿à°¯à°¨à± (ఆఫà±à°˜à°¨à°¿à°¸à±à°¤à°¾à°¨à±)", + "fa_IR": "పరà±à°·à°¿à°¯à°¨à± (ఇరానà±)", + "ff": "à°«à±à°¯à±à°²", + "ff_CM": "à°«à±à°¯à±à°² (కామెరూనà±)", + "ff_GN": "à°«à±à°¯à±à°² (గినియా)", + "ff_MR": "à°«à±à°¯à±à°² (మౌరిటేనియా)", + "ff_SN": "à°«à±à°¯à±à°² (సెనెగలà±)", + "fi": "à°«à°¿à°¨à±à°¨à°¿à°·à±", + "fi_FI": "à°«à°¿à°¨à±à°¨à°¿à°·à± (à°«à°¿à°¨à±à°²à°¾à°‚à°¡à±)", + "fo": "ఫారోయీజà±", + "fo_DK": "ఫారోయీజౠ(డెనà±à°®à°¾à°°à±à°•à±)", + "fo_FO": "ఫారోయీజౠ(ఫారో దీవà±à°²à±)", + "fr": "à°«à±à°°à±†à°‚à°šà±", + "fr_BE": "à°«à±à°°à±†à°‚à°šà± (బెలà±à°œà°¿à°¯à°‚)", + "fr_BF": "à°«à±à°°à±†à°‚à°šà± (à°¬à±à°°à±à°•ినా ఫాసో)", + "fr_BI": "à°«à±à°°à±†à°‚à°šà± (à°¬à±à°°à±à°‚à°¡à°¿)", + "fr_BJ": "à°«à±à°°à±†à°‚à°šà± (బెనినà±)", + "fr_BL": "à°«à±à°°à±†à°‚à°šà± (సెంటౠబరà±à°¤à±‡à°²à±†à°®à±€)", + "fr_CA": "à°«à±à°°à±†à°‚à°šà± (కెనడా)", + "fr_CD": "à°«à±à°°à±†à°‚à°šà± (కాంగో- à°•à°¿à°¨à±à°·à°¾à°¸à°¾)", + "fr_CF": "à°«à±à°°à±†à°‚à°šà± (సెంటà±à°°à°²à± ఆఫà±à°°à°¿à°•నౠరిపబà±à°²à°¿à°•à±)", + "fr_CG": "à°«à±à°°à±†à°‚à°šà± (కాంగో- à°¬à±à°°à°¾à°œà°¾à°µà°¿à°²à±à°²à°¿)", + "fr_CH": "à°«à±à°°à±†à°‚à°šà± (à°¸à±à°µà°¿à°Ÿà±à°œà°°à±à°²à°¾à°‚à°¡à±)", + "fr_CI": "à°«à±à°°à±†à°‚à°šà± (కోటెడౠà°à°µà±‹à°¯à°¿à°°à±)", + "fr_CM": "à°«à±à°°à±†à°‚à°šà± (కామెరూనà±)", + "fr_DJ": "à°«à±à°°à±†à°‚à°šà± (జిబౌటి)", + "fr_DZ": "à°«à±à°°à±†à°‚à°šà± (à°…à°²à±à°œà±€à°°à°¿à°¯à°¾)", + "fr_FR": "à°«à±à°°à±†à°‚à°šà± (à°«à±à°°à°¾à°¨à±à°¸à±â€Œ)", + "fr_GA": "à°«à±à°°à±†à°‚à°šà± (గాబనà±)", + "fr_GF": "à°«à±à°°à±†à°‚à°šà± (à°«à±à°°à±†à°‚చౠగియానా)", + "fr_GN": "à°«à±à°°à±†à°‚à°šà± (గినియా)", + "fr_GP": "à°«à±à°°à±†à°‚à°šà± (à°—à±à°µà°¾à°¡à±‡à°²à±‹à°ªà±)", + "fr_GQ": "à°«à±à°°à±†à°‚à°šà± (ఈకà±à°µà°Ÿà±‹à°°à°¿à°¯à°²à± గినియా)", + "fr_HT": "à°«à±à°°à±†à°‚à°šà± (హైటి)", + "fr_KM": "à°«à±à°°à±†à°‚à°šà± (కొమొరోసà±)", + "fr_LU": "à°«à±à°°à±†à°‚à°šà± (లకà±à°¸à°‚బరà±à°—à±)", + "fr_MA": "à°«à±à°°à±†à°‚à°šà± (మొరాకో)", + "fr_MC": "à°«à±à°°à±†à°‚à°šà± (మొనాకో)", + "fr_MF": "à°«à±à°°à±†à°‚à°šà± (సెంటౠమారà±à°Ÿà°¿à°¨à±)", + "fr_MG": "à°«à±à°°à±†à°‚à°šà± (మడగాసà±à°•à°°à±)", + "fr_ML": "à°«à±à°°à±†à°‚à°šà± (మాలి)", + "fr_MQ": "à°«à±à°°à±†à°‚à°šà± (మారà±à°Ÿà°¿à°¨à°¿à°•à±)", + "fr_MR": "à°«à±à°°à±†à°‚à°šà± (మౌరిటేనియా)", + "fr_MU": "à°«à±à°°à±†à°‚à°šà± (మారిషసà±)", + "fr_NC": "à°«à±à°°à±†à°‚à°šà± (à°•à±à°°à±Šà°¤à±à°¤ కాలెడోనియా)", + "fr_NE": "à°«à±à°°à±†à°‚à°šà± (నైజరà±)", + "fr_PF": "à°«à±à°°à±†à°‚à°šà± (à°«à±à°°à±†à°‚చౠపోలినిషియా)", + "fr_PM": "à°«à±à°°à±†à°‚à°šà± (సెంటౠపియెరౠమరియౠమికెలానà±)", + "fr_RE": "à°«à±à°°à±†à°‚à°šà± (రియూనియనà±)", + "fr_RW": "à°«à±à°°à±†à°‚à°šà± (à°°à±à°µà°¾à°‚à°¡à°¾)", + "fr_SC": "à°«à±à°°à±†à°‚à°šà± (సీషెలà±à°¸à±)", + "fr_SN": "à°«à±à°°à±†à°‚à°šà± (సెనెగలà±)", + "fr_SY": "à°«à±à°°à±†à°‚à°šà± (సిరియా)", + "fr_TD": "à°«à±à°°à±†à°‚à°šà± (చాదà±)", + "fr_TG": "à°«à±à°°à±†à°‚à°šà± (టోగో)", + "fr_TN": "à°«à±à°°à±†à°‚à°šà± (à°Ÿà±à°¯à±à°¨à±€à°·à°¿à°¯à°¾)", + "fr_VU": "à°«à±à°°à±†à°‚à°šà± (వనాటà±)", + "fr_WF": "à°«à±à°°à±†à°‚à°šà± (వాలిసౠ& à°«à±à°¯à±à°¤à±à°¯à±à°¨à°¾)", + "fr_YT": "à°«à±à°°à±†à°‚à°šà± (మాయొటà±à°Ÿà°¿)", + "fy": "పశà±à°šà°¿à°® à°«à±à°°à°¿à°¸à°¿à°¯à°¨à±", + "fy_NL": "పశà±à°šà°¿à°® à°«à±à°°à°¿à°¸à°¿à°¯à°¨à± (నెదరà±à°²à°¾à°‚à°¡à±à°¸à±)", + "ga": "à°à°°à°¿à°·à±", + "ga_IE": "à°à°°à°¿à°·à± (à°à°°à±à°²à°¾à°‚à°¡à±)", + "gd": "à°¸à±à°•ాటిషౠగేలికà±", + "gd_GB": "à°¸à±à°•ాటిషౠగేలికౠ(à°¯à±à°¨à±ˆà°Ÿà±†à°¡à± à°•à°¿à°‚à°—à±â€Œà°¡à°®à±)", + "gl": "గాలిషియనà±", + "gl_ES": "గాలిషియనౠ(à°¸à±à°ªà±†à°¯à°¿à°¨à±)", + "gu": "à°—à±à°œà°°à°¾à°¤à°¿", + "gu_IN": "à°—à±à°œà°°à°¾à°¤à°¿ (భారత దేశం)", + "gv": "మంకసà±", + "gv_IM": "మంకసౠ(à°à°²à± ఆఫౠమానà±)", + "ha": "హౌసా", + "ha_GH": "హౌసా (ఘనా)", + "ha_NE": "హౌసా (నైజరà±)", + "ha_NG": "హౌసా (నైజీరియా)", + "he": "హీబà±à°°à±‚", + "he_IL": "హీబà±à°°à±‚ (ఇజà±à°°à°¾à°¯à°¿à°²à±)", + "hi": "హిందీ", + "hi_IN": "హిందీ (భారత దేశం)", + "hr": "à°•à±à°°à±‹à°¯à±‡à°·à°¿à°¯à°¨à±", + "hr_BA": "à°•à±à°°à±‹à°¯à±‡à°·à°¿à°¯à°¨à± (బోసà±à°¨à°¿à°¯à°¾ మరియౠహెరà±à°œà±†à°—ొవీనా)", + "hr_HR": "à°•à±à°°à±‹à°¯à±‡à°·à°¿à°¯à°¨à± (à°•à±à°°à±‹à°¯à±‡à°·à°¿à°¯à°¾)", + "hu": "హంగేరియనà±", + "hu_HU": "హంగేరియనౠ(హంగేరీ)", + "hy": "ఆరà±à°®à±‡à°¨à°¿à°¯à°¨à±", + "hy_AM": "ఆరà±à°®à±‡à°¨à°¿à°¯à°¨à± (ఆరà±à°®à±‡à°¨à°¿à°¯à°¾)", + "id": "ఇండోనేషియనà±", + "id_ID": "ఇండోనేషియనౠ(ఇండోనేషియా)", + "ig": "ఇగà±à°¬à±‹", + "ig_NG": "ఇగà±à°¬à±‹ (నైజీరియా)", + "ii": "à°¶à°¿à°·à±à°µà°¨à± à°ˆ", + "ii_CN": "à°¶à°¿à°·à±à°µà°¨à± à°ˆ (చైనా)", + "is": "à°à°¸à±à°²à°¾à°‚à°¡à°¿à°•à±", + "is_IS": "à°à°¸à±à°²à°¾à°‚à°¡à°¿à°•à± (à°à°¸à±à°²à°¾à°‚à°¡à±)", + "it": "ఇటాలియనà±", + "it_CH": "ఇటాలియనౠ(à°¸à±à°µà°¿à°Ÿà±à°œà°°à±à°²à°¾à°‚à°¡à±)", + "it_IT": "ఇటాలియనౠ(ఇటలీ)", + "it_SM": "ఇటాలియనౠ(సానౠమారినో)", + "ja": "జపనీసà±", + "ja_JP": "జపనీసౠ(జపానà±)", + "ka": "జారà±à°œà°¿à°¯à°¨à±", + "ka_GE": "జారà±à°œà°¿à°¯à°¨à± (జారà±à°œà°¿à°¯à°¾)", + "ki": "à°•à°¿à°•à±à°¯à±", + "ki_KE": "à°•à°¿à°•à±à°¯à± (కెనà±à°¯à°¾)", + "kk": "కజఖà±", + "kk_KZ": "కజఖౠ(కజకసà±à°¤à°¾à°¨à±)", + "kl": "కలాలà±à°²à°¿à°¸à±‚à°Ÿà±", + "kl_GL": "కలాలà±à°²à°¿à°¸à±‚à°Ÿà± (à°—à±à°°à±€à°¨à±â€Œà°²à°¾à°‚à°¡à±)", + "km": "à°–à±à°®à±‡à°°à±", + "km_KH": "à°–à±à°®à±‡à°°à± (కంబోడియా)", + "kn": "à°•à°¨à±à°¨à°¡", + "kn_IN": "à°•à°¨à±à°¨à°¡ (భారత దేశం)", + "ko": "కొరియనà±", + "ko_KP": "కొరియనౠ(ఉతà±à°¤à°° కొరియా)", + "ko_KR": "కొరియనౠ(దకà±à°·à°¿à°£ కొరియా)", + "ks": "కాశà±à°®à±€à°°à°¿", + "ks_IN": "కాశà±à°®à±€à°°à°¿ (భారత దేశం)", + "kw": "కోరà±à°¨à°¿à°·à±", + "kw_GB": "కోరà±à°¨à°¿à°·à± (à°¯à±à°¨à±ˆà°Ÿà±†à°¡à± à°•à°¿à°‚à°—à±â€Œà°¡à°®à±)", + "ky": "à°•à°¿à°°à±à°—à°¿à°œà±", + "ky_KG": "à°•à°¿à°°à±à°—ిజౠ(à°•à°¿à°°à±à°—ిజిసà±à°¤à°¾à°¨à±)", + "lb": "à°²à±à°•à±à°¸à°‚బరà±à°—à°¿à°·à±", + "lb_LU": "à°²à±à°•à±à°¸à°‚బరà±à°—à°¿à°·à± (లకà±à°¸à°‚బరà±à°—à±)", + "lg": "గాండా", + "lg_UG": "గాండా (ఉగాండా)", + "ln": "లింగాల", + "ln_AO": "లింగాల (అంగోలా)", + "ln_CD": "లింగాల (కాంగో- à°•à°¿à°¨à±à°·à°¾à°¸à°¾)", + "ln_CF": "లింగాల (సెంటà±à°°à°²à± ఆఫà±à°°à°¿à°•నౠరిపబà±à°²à°¿à°•à±)", + "ln_CG": "లింగాల (కాంగో- à°¬à±à°°à°¾à°œà°¾à°µà°¿à°²à±à°²à°¿)", + "lo": "లావో", + "lo_LA": "లావో (లావోసà±)", + "lt": "లిథà±à°¯à±‡à°¨à°¿à°¯à°¨à±", + "lt_LT": "లిథà±à°¯à±‡à°¨à°¿à°¯à°¨à± (లిథà±à°µà±‡à°¨à°¿à°¯à°¾)", + "lu": "లూబ-కటాంగ", + "lu_CD": "లూబ-కటాంగ (కాంగో- à°•à°¿à°¨à±à°·à°¾à°¸à°¾)", + "lv": "లాటà±à°µà°¿à°¯à°¨à±", + "lv_LV": "లాటà±à°µà°¿à°¯à°¨à± (లాతà±à°µà°¿à°¯à°¾)", + "mg": "మాలాగసి", + "mg_MG": "మాలాగసి (మడగాసà±à°•à°°à±)", + "mk": "మసడోనియనà±", + "mk_MK": "మసడోనియనౠ(మేసిడోనియా)", + "ml": "మలయాళం", + "ml_IN": "మలయాళం (భారత దేశం)", + "mn": "మంగోలియనà±", + "mn_MN": "మంగోలియనౠ(మంగోలియా)", + "mr": "మరాఠీ", + "mr_IN": "మరాఠీ (భారత దేశం)", + "ms": "మలేయà±", + "ms_BN": "మలేయౠ(à°¬à±à°°à±‚నై)", + "ms_MY": "మలేయౠ(మలేషియా)", + "ms_SG": "మలేయౠ(సింగపూరà±)", + "mt": "మాలà±à°Ÿà±€à°¸à±", + "mt_MT": "మాలà±à°Ÿà±€à°¸à± (మాలà±à°Ÿà°¾)", + "my": "బరà±à°®à±€à°¸à±", + "my_MM": "బరà±à°®à±€à°¸à± (మయనà±à°®à°¾à°°à± (బరà±à°®à°¾))", + "nb": "నారà±à°µà±‡à°œà°¿à°¯à°¨à± బొకà±à°®à°¾à°²à±", + "nb_NO": "నారà±à°µà±‡à°œà°¿à°¯à°¨à± బొకà±à°®à°¾à°²à± (నారà±à°µà±‡)", + "nb_SJ": "నారà±à°µà±‡à°œà°¿à°¯à°¨à± బొకà±à°®à°¾à°²à± (à°¸à±à°µà°¾à°²à±à°¬à°¾à°°à±à°¡à± మరియౠయానౠమాయేనà±)", + "nd": "ఉతà±à°¤à°° దెబెలె", + "nd_ZW": "ఉతà±à°¤à°° దెబెలె (జింబాబà±à°µà±‡)", + "ne": "నేపాలి", + "ne_IN": "నేపాలి (భారత దేశం)", + "ne_NP": "నేపాలి (నేపాలà±)", + "nl": "à°¡à°šà±", + "nl_AW": "à°¡à°šà± (à°…à°°à±à°¬à°¾)", + "nl_BE": "à°¡à°šà± (బెలà±à°œà°¿à°¯à°‚)", + "nl_BQ": "à°¡à°šà± (కరీబియనౠనెదరà±à°²à°¾à°‚à°¡à±à°¸à±)", + "nl_CW": "à°¡à°šà± (à°•à±à°°à°¾à°•వో)", + "nl_NL": "à°¡à°šà± (నెదరà±à°²à°¾à°‚à°¡à±à°¸à±)", + "nl_SR": "à°¡à°šà± (సూరినామà±)", + "nl_SX": "à°¡à°šà± (సింటౠమారà±à°Ÿà±†à°¨à±)", + "nn": "నారà±à°µà±‡à°œà°¿à°¯à°¾à°¨à± à°¨à±à°¯à±‹à°°à±à°¸à±à°•à±", + "nn_NO": "నారà±à°µà±‡à°œà°¿à°¯à°¾à°¨à± à°¨à±à°¯à±‹à°°à±à°¸à±à°•à± (నారà±à°µà±‡)", + "no": "నారà±à°µà±‡à°œà°¿à°¯à°¨à±", + "no_NO": "నారà±à°µà±‡à°œà°¿à°¯à°¨à± (నారà±à°µà±‡)", + "om": "ఒరోమో", + "om_ET": "ఒరోమో (ఇథియోపియా)", + "om_KE": "ఒరోమో (కెనà±à°¯à°¾)", + "or": "ఒడియా", + "or_IN": "ఒడియా (భారత దేశం)", + "os": "ఒసేటికà±", + "os_GE": "ఒసేటికౠ(జారà±à°œà°¿à°¯à°¾)", + "os_RU": "ఒసేటికౠ(à°°à°·à±à°¯à°¾)", + "pa": "పంజాబీ", + "pa_Arab": "పంజాబీ (అరబికà±)", + "pa_Arab_PK": "పంజాబీ (అరబికà±, పాకిసà±à°¤à°¾à°¨à±)", + "pa_Guru": "పంజాబీ (à°—à±à°°à±à°®à±à°–à°¿)", + "pa_Guru_IN": "పంజాబీ (à°—à±à°°à±à°®à±à°–à°¿, భారత దేశం)", + "pa_IN": "పంజాబీ (భారత దేశం)", + "pa_PK": "పంజాబీ (పాకిసà±à°¤à°¾à°¨à±)", + "pl": "పోలిషà±", + "pl_PL": "పోలిషౠ(పోలాండà±)", + "ps": "పాషà±à°Ÿà±‹", + "ps_AF": "పాషà±à°Ÿà±‹ (ఆఫà±à°˜à°¨à°¿à°¸à±à°¤à°¾à°¨à±)", + "pt": "పోరà±à°šà±à°—ీసà±", + "pt_AO": "పోరà±à°šà±à°—ీసౠ(అంగోలా)", + "pt_BR": "పోరà±à°šà±à°—ీసౠ(à°¬à±à°°à±†à°œà°¿à°²à±)", + "pt_CH": "పోరà±à°šà±à°—ీసౠ(à°¸à±à°µà°¿à°Ÿà±à°œà°°à±à°²à°¾à°‚à°¡à±)", + "pt_CV": "పోరà±à°šà±à°—ీసౠ(కేపౠవెరà±à°¡à±‡)", + "pt_GQ": "పోరà±à°šà±à°—ీసౠ(ఈకà±à°µà°Ÿà±‹à°°à°¿à°¯à°²à± గినియా)", + "pt_GW": "పోరà±à°šà±à°—ీసౠ(గినియా-బిసà±à°¸à°¾à°µà±)", + "pt_LU": "పోరà±à°šà±à°—ీసౠ(లకà±à°¸à°‚బరà±à°—à±)", + "pt_MO": "పోరà±à°šà±à°—ీసౠ(మకావౠఎసà±à°à°†à°°à± చైనా)", + "pt_MZ": "పోరà±à°šà±à°—ీసౠ(మొజాంబికà±)", + "pt_PT": "పోరà±à°šà±à°—ీసౠ(పోరà±à°šà±à°—à°²à±)", + "pt_ST": "పోరà±à°šà±à°—ీసౠ(సావోటోమౠ& à°ªà±à°°à°¿à°¨à±à°¸à°¿à°ªà±‡)", + "pt_TL": "పోరà±à°šà±à°—ీసౠ(టిమోరà±-లెసà±à°Ÿà±†)", + "qu": "కెషà±à°¯à°¾", + "qu_BO": "కెషà±à°¯à°¾ (బొలీవియా)", + "qu_EC": "కెషà±à°¯à°¾ (ఈకà±à°µà°¡à°¾à°°à±)", + "qu_PE": "కెషà±à°¯à°¾ (పెరూ)", + "rm": "రోమనà±à°·à±", + "rm_CH": "రోమనà±à°·à± (à°¸à±à°µà°¿à°Ÿà±à°œà°°à±à°²à°¾à°‚à°¡à±)", + "rn": "à°°à°‚à°¡à°¿", + "rn_BI": "à°°à°‚à°¡à°¿ (à°¬à±à°°à±à°‚à°¡à°¿)", + "ro": "రోమానియనà±", + "ro_MD": "రోమానియనౠ(మోలà±à°¡à±‹à°µà°¾)", + "ro_RO": "రోమానియనౠ(రోమానియా)", + "ru": "à°°à°·à±à°¯à°¨à±", + "ru_BY": "à°°à°·à±à°¯à°¨à± (బెలారసà±)", + "ru_KG": "à°°à°·à±à°¯à°¨à± (à°•à°¿à°°à±à°—ిజిసà±à°¤à°¾à°¨à±)", + "ru_KZ": "à°°à°·à±à°¯à°¨à± (కజకసà±à°¤à°¾à°¨à±)", + "ru_MD": "à°°à°·à±à°¯à°¨à± (మోలà±à°¡à±‹à°µà°¾)", + "ru_RU": "à°°à°·à±à°¯à°¨à± (à°°à°·à±à°¯à°¾)", + "ru_UA": "à°°à°·à±à°¯à°¨à± (ఉకà±à°°à±†à°¯à°¿à°¨à±)", + "rw": "à°•à°¿à°¨à±à°¯à°°à±à°µà°¾à°‚à°¡à°¾", + "rw_RW": "à°•à°¿à°¨à±à°¯à°°à±à°µà°¾à°‚à°¡à°¾ (à°°à±à°µà°¾à°‚à°¡à°¾)", + "se": "ఉతà±à°¤à°° సామి", + "se_FI": "ఉతà±à°¤à°° సామి (à°«à°¿à°¨à±à°²à°¾à°‚à°¡à±)", + "se_NO": "ఉతà±à°¤à°° సామి (నారà±à°µà±‡)", + "se_SE": "ఉతà±à°¤à°° సామి (à°¸à±à°µà±€à°¡à°¨à±)", + "sg": "సాంగో", + "sg_CF": "సాంగో (సెంటà±à°°à°²à± ఆఫà±à°°à°¿à°•నౠరిపబà±à°²à°¿à°•à±)", + "sh": "సేరà±à°¬à±‹-à°•à±à°°à±Šà°¯à±‡à°·à°¿à°¯à°¨à±", + "sh_BA": "సేరà±à°¬à±‹-à°•à±à°°à±Šà°¯à±‡à°·à°¿à°¯à°¨à± (బోసà±à°¨à°¿à°¯à°¾ మరియౠహెరà±à°œà±†à°—ొవీనా)", + "si": "సింహళం", + "si_LK": "సింహళం (à°¶à±à°°à±€à°²à°‚à°•)", + "sk": "à°¸à±à°²à±‹à°µà°¾à°•à±", + "sk_SK": "à°¸à±à°²à±‹à°µà°¾à°•à± (à°¸à±à°²à±‹à°µà±‡à°•ియా)", + "sl": "à°¸à±à°²à±‹à°µà±‡à°¨à°¿à°¯à°¾à°¨à±", + "sl_SI": "à°¸à±à°²à±‹à°µà±‡à°¨à°¿à°¯à°¾à°¨à± (à°¸à±à°²à±‹à°µà±‡à°¨à°¿à°¯à°¾)", + "sn": "షోన", + "sn_ZW": "షోన (జింబాబà±à°µà±‡)", + "so": "సోమాలి", + "so_DJ": "సోమాలి (జిబౌటి)", + "so_ET": "సోమాలి (ఇథియోపియా)", + "so_KE": "సోమాలి (కెనà±à°¯à°¾)", + "so_SO": "సోమాలి (సోమాలియా)", + "sq": "à°…à°²à±à°¬à±‡à°¨à°¿à°¯à°¨à±", + "sq_AL": "à°…à°²à±à°¬à±‡à°¨à°¿à°¯à°¨à± (à°…à°²à±à°¬à±‡à°¨à°¿à°¯à°¾)", + "sq_MK": "à°…à°²à±à°¬à±‡à°¨à°¿à°¯à°¨à± (మేసిడోనియా)", + "sq_XK": "à°…à°²à±à°¬à±‡à°¨à°¿à°¯à°¨à± (కొసోవో)", + "sr": "సెరà±à°¬à°¿à°¯à°¨à±", + "sr_BA": "సెరà±à°¬à°¿à°¯à°¨à± (బోసà±à°¨à°¿à°¯à°¾ మరియౠహెరà±à°œà±†à°—ొవీనా)", + "sr_Cyrl": "సెరà±à°¬à°¿à°¯à°¨à± (సిరిలికà±)", + "sr_Cyrl_BA": "సెరà±à°¬à°¿à°¯à°¨à± (సిరిలికà±, బోసà±à°¨à°¿à°¯à°¾ మరియౠహెరà±à°œà±†à°—ొవీనా)", + "sr_Cyrl_ME": "సెరà±à°¬à°¿à°¯à°¨à± (సిరిలికà±, మోంటేనేగà±à°°à±‹)", + "sr_Cyrl_RS": "సెరà±à°¬à°¿à°¯à°¨à± (సిరిలికà±, సెరà±à°¬à°¿à°¯à°¾)", + "sr_Cyrl_XK": "సెరà±à°¬à°¿à°¯à°¨à± (సిరిలికà±, కొసోవో)", + "sr_Latn": "సెరà±à°¬à°¿à°¯à°¨à± (లాటినà±)", + "sr_Latn_BA": "సెరà±à°¬à°¿à°¯à°¨à± (లాటినà±, బోసà±à°¨à°¿à°¯à°¾ మరియౠహెరà±à°œà±†à°—ొవీనా)", + "sr_Latn_ME": "సెరà±à°¬à°¿à°¯à°¨à± (లాటినà±, మోంటేనేగà±à°°à±‹)", + "sr_Latn_RS": "సెరà±à°¬à°¿à°¯à°¨à± (లాటినà±, సెరà±à°¬à°¿à°¯à°¾)", + "sr_Latn_XK": "సెరà±à°¬à°¿à°¯à°¨à± (లాటినà±, కొసోవో)", + "sr_ME": "సెరà±à°¬à°¿à°¯à°¨à± (మోంటేనేగà±à°°à±‹)", + "sr_RS": "సెరà±à°¬à°¿à°¯à°¨à± (సెరà±à°¬à°¿à°¯à°¾)", + "sr_XK": "సెరà±à°¬à°¿à°¯à°¨à± (కొసోవో)", + "sv": "à°¸à±à°µà±€à°¡à°¿à°·à±", + "sv_AX": "à°¸à±à°µà±€à°¡à°¿à°·à± (ఆలేండౠదీవà±à°²à±)", + "sv_FI": "à°¸à±à°µà±€à°¡à°¿à°·à± (à°«à°¿à°¨à±à°²à°¾à°‚à°¡à±)", + "sv_SE": "à°¸à±à°µà±€à°¡à°¿à°·à± (à°¸à±à°µà±€à°¡à°¨à±)", + "sw": "à°¸à±à°µà°¾à°¹à°¿à°²à°¿", + "sw_CD": "à°¸à±à°µà°¾à°¹à°¿à°²à°¿ (కాంగో- à°•à°¿à°¨à±à°·à°¾à°¸à°¾)", + "sw_KE": "à°¸à±à°µà°¾à°¹à°¿à°²à°¿ (కెనà±à°¯à°¾)", + "sw_TZ": "à°¸à±à°µà°¾à°¹à°¿à°²à°¿ (టాంజానియా)", + "sw_UG": "à°¸à±à°µà°¾à°¹à°¿à°²à°¿ (ఉగాండా)", + "ta": "తమిళమà±", + "ta_IN": "తమిళమౠ(భారత దేశం)", + "ta_LK": "తమిళమౠ(à°¶à±à°°à±€à°²à°‚à°•)", + "ta_MY": "తమిళమౠ(మలేషియా)", + "ta_SG": "తమిళమౠ(సింగపూరà±)", + "te": "తెలà±à°—à±", + "te_IN": "తెలà±à°—à± (భారత దేశం)", + "th": "థాయà±", + "th_TH": "థాయౠ(థాయిలాండà±)", + "ti": "తిగà±à°°à°¿à°¨à±à°¯à°¾", + "ti_ER": "తిగà±à°°à°¿à°¨à±à°¯à°¾ (à°Žà°°à°¿à°Ÿà±à°°à°¿à°¯à°¾)", + "ti_ET": "తిగà±à°°à°¿à°¨à±à°¯à°¾ (ఇథియోపియా)", + "tl": "టగలాగà±", + "tl_PH": "టగలాగౠ(ఫిలిపà±à°ªà±€à°¨à±à°¸à±)", + "to": "టాంగానà±", + "to_TO": "టాంగానౠ(టోంగా)", + "tr": "à°Ÿà°°à±à°•à°¿à°·à±", + "tr_CY": "à°Ÿà°°à±à°•à°¿à°·à± (సైపà±à°°à°¸à±)", + "tr_TR": "à°Ÿà°°à±à°•à°¿à°·à± (à°Ÿà°°à±à°•à±€)", + "ug": "ఉయà±â€Œà°˜à°°à±", + "ug_CN": "ఉయà±â€Œà°˜à°°à± (చైనా)", + "uk": "ఉకà±à°°à±‡à°¨à°¿à°¯à°¨à±", + "uk_UA": "ఉకà±à°°à±‡à°¨à°¿à°¯à°¨à± (ఉకà±à°°à±†à°¯à°¿à°¨à±)", + "ur": "ఉరà±à°¦à±‚", + "ur_IN": "ఉరà±à°¦à±‚ (భారత దేశం)", + "ur_PK": "ఉరà±à°¦à±‚ (పాకిసà±à°¤à°¾à°¨à±)", + "uz": "ఉజà±à°¬à±†à°•à±", + "uz_AF": "ఉజà±à°¬à±†à°•à± (ఆఫà±à°˜à°¨à°¿à°¸à±à°¤à°¾à°¨à±)", + "uz_Arab": "ఉజà±à°¬à±†à°•à± (అరబికà±)", + "uz_Arab_AF": "ఉజà±à°¬à±†à°•à± (అరబికà±, ఆఫà±à°˜à°¨à°¿à°¸à±à°¤à°¾à°¨à±)", + "uz_Cyrl": "ఉజà±à°¬à±†à°•à± (సిరిలికà±)", + "uz_Cyrl_UZ": "ఉజà±à°¬à±†à°•à± (సిరిలికà±, ఉజà±à°¬à±†à°•à°¿à°¸à±à°¤à°¾à°¨à±)", + "uz_Latn": "ఉజà±à°¬à±†à°•à± (లాటినà±)", + "uz_Latn_UZ": "ఉజà±à°¬à±†à°•à± (లాటినà±, ఉజà±à°¬à±†à°•à°¿à°¸à±à°¤à°¾à°¨à±)", + "uz_UZ": "ఉజà±à°¬à±†à°•à± (ఉజà±à°¬à±†à°•à°¿à°¸à±à°¤à°¾à°¨à±)", + "vi": "వియతà±à°¨à°¾à°®à±€à°¸à±", + "vi_VN": "వియతà±à°¨à°¾à°®à±€à°¸à± (వియతà±à°¨à°¾à°‚)", + "yi": "ఇడà±à°¡à°¿à°·à±", + "yo": "యోరà±à°¬à°¾", + "yo_BJ": "యోరà±à°¬à°¾ (బెనినà±)", + "yo_NG": "యోరà±à°¬à°¾ (నైజీరియా)", + "zh": "చైనీసà±", + "zh_CN": "చైనీసౠ(చైనా)", + "zh_HK": "చైనీసౠ(హాంకాంగౠఎసà±à°à°†à°°à± చైనా)", + "zh_Hans": "చైనీసౠ(సరళీకృతం)", + "zh_Hans_CN": "చైనీసౠ(సరళీకృతం, చైనా)", + "zh_Hans_HK": "చైనీసౠ(సరళీకృతం, హాంకాంగౠఎసà±à°à°†à°°à± చైనా)", + "zh_Hans_MO": "చైనీసౠ(సరళీకృతం, మకావౠఎసà±à°à°†à°°à± చైనా)", + "zh_Hans_SG": "చైనీసౠ(సరళీకృతం, సింగపూరà±)", + "zh_Hant": "చైనీసౠ(సాంపà±à°°à°¦à°¾à°¯à°•)", + "zh_Hant_HK": "చైనీసౠ(సాంపà±à°°à°¦à°¾à°¯à°•, హాంకాంగౠఎసà±à°à°†à°°à± చైనా)", + "zh_Hant_MO": "చైనీసౠ(సాంపà±à°°à°¦à°¾à°¯à°•, మకావౠఎసà±à°à°†à°°à± చైనా)", + "zh_Hant_TW": "చైనీసౠ(సాంపà±à°°à°¦à°¾à°¯à°•, తైవానà±)", + "zh_MO": "చైనీసౠ(మకావౠఎసà±à°à°†à°°à± చైనా)", + "zh_SG": "చైనీసౠ(సింగపూరà±)", + "zh_TW": "చైనీసౠ(తైవానà±)", + "zu": "జూలూ", + "zu_ZA": "జూలూ (దకà±à°·à°¿à°£ ఆఫà±à°°à°¿à°•à°¾)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/th.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/th.json new file mode 100644 index 0000000000000000000000000000000000000000..2538f8d0ebb3c9594373f4aa48fd561ea1f7cb08 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/th.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¸™à¸ªà¹Œ", + "af_NA": "à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¸™à¸ªà¹Œ (นามิเบีย)", + "af_ZA": "à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¸™à¸ªà¹Œ (à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¹ƒà¸•้)", + "ak": "อาคัน", + "ak_GH": "อาคัน (à¸à¸²à¸™à¸²)", + "am": "อัมฮารา", + "am_ET": "อัมฮารา (เอธิโอเปีย)", + "ar": "อาหรับ", + "ar_AE": "อาหรับ (สหรัà¸à¸­à¸²à¸«à¸£à¸±à¸šà¹€à¸­à¸¡à¸´à¹€à¸£à¸•ส์)", + "ar_BH": "อาหรับ (บาห์เรน)", + "ar_DJ": "อาหรับ (จิบูตี)", + "ar_DZ": "อาหรับ (à¹à¸­à¸¥à¸ˆà¸µà¹€à¸£à¸µà¸¢)", + "ar_EG": "อาหรับ (อียิปต์)", + "ar_EH": "อาหรับ (ซาฮาราตะวันตà¸)", + "ar_ER": "อาหรับ (เอริเทรีย)", + "ar_IL": "อาหรับ (อิสราเอล)", + "ar_IQ": "อาหรับ (อิรัà¸)", + "ar_JO": "อาหรับ (จอร์à¹à¸”น)", + "ar_KM": "อาหรับ (คอโมโรส)", + "ar_KW": "อาหรับ (คูเวต)", + "ar_LB": "อาหรับ (เลบานอน)", + "ar_LY": "อาหรับ (ลิเบีย)", + "ar_MA": "อาหรับ (โมร็อà¸à¹‚à¸)", + "ar_MR": "อาหรับ (มอริเตเนีย)", + "ar_OM": "อาหรับ (โอมาน)", + "ar_PS": "อาหรับ (ดินà¹à¸”นปาเลสไตน์)", + "ar_QA": "อาหรับ (à¸à¸²à¸•าร์)", + "ar_SA": "อาหรับ (ซาอุดีอาระเบีย)", + "ar_SD": "อาหรับ (ซูดาน)", + "ar_SO": "อาหรับ (โซมาเลีย)", + "ar_SS": "อาหรับ (ซูดานใต้)", + "ar_SY": "อาหรับ (ซีเรีย)", + "ar_TD": "อาหรับ (ชาด)", + "ar_TN": "อาหรับ (ตูนิเซีย)", + "ar_YE": "อาหรับ (เยเมน)", + "as": "อัสสัม", + "as_IN": "อัสสัม (อินเดีย)", + "az": "อาเซอร์ไบจาน", + "az_AZ": "อาเซอร์ไบจาน (อาเซอร์ไบจาน)", + "az_Cyrl": "อาเซอร์ไบจาน (ซีริลลิà¸)", + "az_Cyrl_AZ": "อาเซอร์ไบจาน (ซีริลลิà¸, อาเซอร์ไบจาน)", + "az_Latn": "อาเซอร์ไบจาน (ละติน)", + "az_Latn_AZ": "อาเซอร์ไบจาน (ละติน, อาเซอร์ไบจาน)", + "be": "เบลารุส", + "be_BY": "เบลารุส (เบลารุส)", + "bg": "บัลà¹à¸à¹€à¸£à¸µà¸¢", + "bg_BG": "บัลà¹à¸à¹€à¸£à¸µà¸¢ (บัลà¹à¸à¹€à¸£à¸µà¸¢)", + "bm": "บัมบารา", + "bm_ML": "บัมบารา (มาลี)", + "bn": "เบงà¸à¸²à¸¥à¸µ", + "bn_BD": "เบงà¸à¸²à¸¥à¸µ (บังà¸à¸¥à¸²à¹€à¸—ศ)", + "bn_IN": "เบงà¸à¸²à¸¥à¸µ (อินเดีย)", + "bo": "ทิเบต", + "bo_CN": "ทิเบต (จีน)", + "bo_IN": "ทิเบต (อินเดีย)", + "br": "เบรตัน", + "br_FR": "เบรตัน (à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª)", + "bs": "บอสเนีย", + "bs_BA": "บอสเนีย (บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸µà¸™à¸²)", + "bs_Cyrl": "บอสเนีย (ซีริลลิà¸)", + "bs_Cyrl_BA": "บอสเนีย (ซีริลลิà¸, บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸µà¸™à¸²)", + "bs_Latn": "บอสเนีย (ละติน)", + "bs_Latn_BA": "บอสเนีย (ละติน, บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸µà¸™à¸²)", + "ca": "à¸à¸²à¸•าลัง", + "ca_AD": "à¸à¸²à¸•าลัง (อันดอร์รา)", + "ca_ES": "à¸à¸²à¸•าลัง (สเปน)", + "ca_FR": "à¸à¸²à¸•าลัง (à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª)", + "ca_IT": "à¸à¸²à¸•าลัง (อิตาลี)", + "ce": "เชเชน", + "ce_RU": "เชเชน (รัสเซีย)", + "cs": "เช็à¸", + "cs_CZ": "เช็ภ(สาธารณรัà¸à¹€à¸Šà¹‡à¸)", + "cy": "เวลส์", + "cy_GB": "เวลส์ (สหราชอาณาจัà¸à¸£)", + "da": "เดนมาร์à¸", + "da_DK": "เดนมาร์ภ(เดนมาร์à¸)", + "da_GL": "เดนมาร์ภ(à¸à¸£à¸µà¸™à¹à¸¥à¸™à¸”์)", + "de": "เยอรมัน", + "de_AT": "เยอรมัน (ออสเตรีย)", + "de_BE": "เยอรมัน (เบลเยียม)", + "de_CH": "เยอรมัน (สวิตเซอร์à¹à¸¥à¸™à¸”์)", + "de_DE": "เยอรมัน (เยอรมนี)", + "de_IT": "เยอรมัน (อิตาลี)", + "de_LI": "เยอรมัน (ลิà¸à¹€à¸•นสไตน์)", + "de_LU": "เยอรมัน (ลัà¸à¹€à¸‹à¸¡à¹€à¸šà¸´à¸£à¹Œà¸)", + "dz": "ซองคา", + "dz_BT": "ซองคา (ภูà¸à¸²à¸™)", + "ee": "เอเว", + "ee_GH": "เอเว (à¸à¸²à¸™à¸²)", + "ee_TG": "เอเว (โตโà¸)", + "el": "à¸à¸£à¸µà¸", + "el_CY": "à¸à¸£à¸µà¸ (ไซปรัส)", + "el_GR": "à¸à¸£à¸µà¸ (à¸à¸£à¸µà¸‹)", + "en": "อังà¸à¸¤à¸©", + "en_AG": "อังà¸à¸¤à¸© (à¹à¸­à¸™à¸•ิà¸à¸²à¹à¸¥à¸°à¸šà¸²à¸£à¹Œà¸šà¸¹à¸”า)", + "en_AI": "อังà¸à¸¤à¸© (à¹à¸­à¸‡à¸à¸§à¸´à¸¥à¸¥à¸²)", + "en_AS": "อังà¸à¸¤à¸© (อเมริà¸à¸±à¸™à¸‹à¸²à¸¡à¸±à¸§)", + "en_AT": "อังà¸à¸¤à¸© (ออสเตรีย)", + "en_AU": "อังà¸à¸¤à¸© (ออสเตรเลีย)", + "en_BB": "อังà¸à¸¤à¸© (บาร์เบโดส)", + "en_BE": "อังà¸à¸¤à¸© (เบลเยียม)", + "en_BI": "อังà¸à¸¤à¸© (บุรุนดี)", + "en_BM": "อังà¸à¸¤à¸© (เบอร์มิวดา)", + "en_BS": "อังà¸à¸¤à¸© (บาฮามาส)", + "en_BW": "อังà¸à¸¤à¸© (บอตสวานา)", + "en_BZ": "อังà¸à¸¤à¸© (เบลีซ)", + "en_CA": "อังà¸à¸¤à¸© (à¹à¸„นาดา)", + "en_CC": "อังà¸à¸¤à¸© (หมู่เà¸à¸²à¸°à¹‚คโคส (คีลิง))", + "en_CH": "อังà¸à¸¤à¸© (สวิตเซอร์à¹à¸¥à¸™à¸”์)", + "en_CK": "อังà¸à¸¤à¸© (หมู่เà¸à¸²à¸°à¸„ุà¸)", + "en_CM": "อังà¸à¸¤à¸© (à¹à¸„เมอรูน)", + "en_CX": "อังà¸à¸¤à¸© (เà¸à¸²à¸°à¸„ริสต์มาส)", + "en_CY": "อังà¸à¸¤à¸© (ไซปรัส)", + "en_DE": "อังà¸à¸¤à¸© (เยอรมนี)", + "en_DG": "อังà¸à¸¤à¸© (ดิเอโà¸à¸à¸²à¸£à¹Œà¹€à¸‹à¸µà¸¢)", + "en_DK": "อังà¸à¸¤à¸© (เดนมาร์à¸)", + "en_DM": "อังà¸à¸¤à¸© (โดมินิà¸à¸²)", + "en_ER": "อังà¸à¸¤à¸© (เอริเทรีย)", + "en_FI": "อังà¸à¸¤à¸© (ฟินà¹à¸¥à¸™à¸”์)", + "en_FJ": "อังà¸à¸¤à¸© (ฟิจิ)", + "en_FK": "อังà¸à¸¤à¸© (หมู่เà¸à¸²à¸°à¸Ÿà¸­à¸¥à¹Œà¸à¹à¸¥à¸™à¸”์)", + "en_FM": "อังà¸à¸¤à¸© (ไมโครนีเซีย)", + "en_GB": "อังà¸à¸¤à¸© (สหราชอาณาจัà¸à¸£)", + "en_GD": "อังà¸à¸¤à¸© (เà¸à¸£à¹€à¸™à¸”า)", + "en_GG": "อังà¸à¸¤à¸© (เà¸à¸´à¸£à¹Œà¸™à¸‹à¸µà¸¢à¹Œ)", + "en_GH": "อังà¸à¸¤à¸© (à¸à¸²à¸™à¸²)", + "en_GI": "อังà¸à¸¤à¸© (ยิบรอลตาร์)", + "en_GM": "อังà¸à¸¤à¸© (à¹à¸à¸¡à¹€à¸šà¸µà¸¢)", + "en_GU": "อังà¸à¸¤à¸© (à¸à¸§à¸¡)", + "en_GY": "อังà¸à¸¤à¸© (à¸à¸²à¸¢à¸­à¸²à¸™à¸²)", + "en_HK": "อังà¸à¸¤à¸© (เขตปà¸à¸„รองพิเศษฮ่องà¸à¸‡à¹à¸«à¹ˆà¸‡à¸ªà¸²à¸˜à¸²à¸£à¸“รัà¸à¸›à¸£à¸°à¸Šà¸²à¸Šà¸™à¸ˆà¸µà¸™)", + "en_IE": "อังà¸à¸¤à¸© (ไอร์à¹à¸¥à¸™à¸”์)", + "en_IL": "อังà¸à¸¤à¸© (อิสราเอล)", + "en_IM": "อังà¸à¸¤à¸© (เà¸à¸²à¸°à¹à¸¡à¸™)", + "en_IN": "อังà¸à¸¤à¸© (อินเดีย)", + "en_IO": "อังà¸à¸¤à¸© (บริติชอินเดียนโอเชียนเทร์ริทอรี)", + "en_JE": "อังà¸à¸¤à¸© (เจอร์ซีย์)", + "en_JM": "อังà¸à¸¤à¸© (จาเมà¸à¸²)", + "en_KE": "อังà¸à¸¤à¸© (เคนยา)", + "en_KI": "อังà¸à¸¤à¸© (คิริบาส)", + "en_KN": "อังà¸à¸¤à¸© (เซนต์คิตส์à¹à¸¥à¸°à¹€à¸™à¸§à¸´à¸ª)", + "en_KY": "อังà¸à¸¤à¸© (หมู่เà¸à¸²à¸°à¹€à¸„ย์à¹à¸¡à¸™)", + "en_LC": "อังà¸à¸¤à¸© (เซนต์ลูเซีย)", + "en_LR": "อังà¸à¸¤à¸© (ไลบีเรีย)", + "en_LS": "อังà¸à¸¤à¸© (เลโซโท)", + "en_MG": "อังà¸à¸¤à¸© (มาดาà¸à¸±à¸ªà¸à¸²à¸£à¹Œ)", + "en_MH": "อังà¸à¸¤à¸© (หมู่เà¸à¸²à¸°à¸¡à¸²à¸£à¹Œà¹à¸Šà¸¥à¸¥à¹Œ)", + "en_MO": "อังà¸à¸¤à¸© (เขตปà¸à¸„รองพิเศษมาเà¸à¹Šà¸²à¹à¸«à¹ˆà¸‡à¸ªà¸²à¸˜à¸²à¸£à¸“รัà¸à¸›à¸£à¸°à¸Šà¸²à¸Šà¸™à¸ˆà¸µà¸™)", + "en_MP": "อังà¸à¸¤à¸© (หมู่เà¸à¸²à¸°à¸™à¸­à¸£à¹Œà¹€à¸—ิร์นมาเรียนา)", + "en_MS": "อังà¸à¸¤à¸© (มอนต์เซอร์รัต)", + "en_MT": "อังà¸à¸¤à¸© (มอลตา)", + "en_MU": "อังà¸à¸¤à¸© (มอริเชียส)", + "en_MW": "อังà¸à¸¤à¸© (มาลาวี)", + "en_MY": "อังà¸à¸¤à¸© (มาเลเซีย)", + "en_NA": "อังà¸à¸¤à¸© (นามิเบีย)", + "en_NF": "อังà¸à¸¤à¸© (เà¸à¸²à¸°à¸™à¸­à¸£à¹Œà¸Ÿà¸­à¸¥à¹Œà¸)", + "en_NG": "อังà¸à¸¤à¸© (ไนจีเรีย)", + "en_NL": "อังà¸à¸¤à¸© (เนเธอร์à¹à¸¥à¸™à¸”์)", + "en_NR": "อังà¸à¸¤à¸© (นาอูรู)", + "en_NU": "อังà¸à¸¤à¸© (นีอูเอ)", + "en_NZ": "อังà¸à¸¤à¸© (นิวซีà¹à¸¥à¸™à¸”์)", + "en_PG": "อังà¸à¸¤à¸© (ปาปัวนิวà¸à¸´à¸™à¸µ)", + "en_PH": "อังà¸à¸¤à¸© (ฟิลิปปินส์)", + "en_PK": "อังà¸à¸¤à¸© (ปาà¸à¸µà¸ªà¸–าน)", + "en_PN": "อังà¸à¸¤à¸© (หมู่เà¸à¸²à¸°à¸žà¸´à¸•à¹à¸„ร์น)", + "en_PR": "อังà¸à¸¤à¸© (เปอร์โตริโà¸)", + "en_PW": "อังà¸à¸¤à¸© (ปาเลา)", + "en_RW": "อังà¸à¸¤à¸© (รวันดา)", + "en_SB": "อังà¸à¸¤à¸© (หมู่เà¸à¸²à¸°à¹‚ซโลมอน)", + "en_SC": "อังà¸à¸¤à¸© (เซเชลส์)", + "en_SD": "อังà¸à¸¤à¸© (ซูดาน)", + "en_SE": "อังà¸à¸¤à¸© (สวีเดน)", + "en_SG": "อังà¸à¸¤à¸© (สิงคโปร์)", + "en_SH": "อังà¸à¸¤à¸© (เซนต์เฮเลนา)", + "en_SI": "อังà¸à¸¤à¸© (สโลวีเนีย)", + "en_SL": "อังà¸à¸¤à¸© (เซียร์ราลีโอน)", + "en_SS": "อังà¸à¸¤à¸© (ซูดานใต้)", + "en_SX": "อังà¸à¸¤à¸© (เซนต์มาร์ติน)", + "en_SZ": "อังà¸à¸¤à¸© (สวาซิà¹à¸¥à¸™à¸”์)", + "en_TC": "อังà¸à¸¤à¸© (หมู่เà¸à¸²à¸°à¹€à¸•ิà¸à¸ªà¹Œà¹à¸¥à¸°à¸«à¸¡à¸¹à¹ˆà¹€à¸à¸²à¸°à¹€à¸„คอส)", + "en_TK": "อังà¸à¸¤à¸© (โตเà¸à¹€à¸¥à¸²)", + "en_TO": "อังà¸à¸¤à¸© (ตองà¸à¸²)", + "en_TT": "อังà¸à¸¤à¸© (ตรินิà¹à¸”ดà¹à¸¥à¸°à¹‚ตเบโà¸)", + "en_TV": "อังà¸à¸¤à¸© (ตูวาลู)", + "en_TZ": "อังà¸à¸¤à¸© (à¹à¸—นซาเนีย)", + "en_UG": "อังà¸à¸¤à¸© (ยูà¸à¸±à¸™à¸”า)", + "en_UM": "อังà¸à¸¤à¸© (หมู่เà¸à¸²à¸°à¸£à¸­à¸šà¸™à¸­à¸à¸‚องสหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸²)", + "en_US": "อังà¸à¸¤à¸© (สหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸²)", + "en_VC": "อังà¸à¸¤à¸© (เซนต์วินเซนต์à¹à¸¥à¸°à¹€à¸à¸£à¸™à¸²à¸”ีนส์)", + "en_VG": "อังà¸à¸¤à¸© (หมู่เà¸à¸²à¸°à¸šà¸£à¸´à¸•ิชเวอร์จิน)", + "en_VI": "อังà¸à¸¤à¸© (หมู่เà¸à¸²à¸°à¸¢à¸¹à¹€à¸­à¸ªà¹€à¸§à¸­à¸£à¹Œà¸ˆà¸´à¸™)", + "en_VU": "อังà¸à¸¤à¸© (วานูอาตู)", + "en_WS": "อังà¸à¸¤à¸© (ซามัว)", + "en_ZA": "อังà¸à¸¤à¸© (à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¹ƒà¸•้)", + "en_ZM": "อังà¸à¸¤à¸© (à¹à¸‹à¸¡à¹€à¸šà¸µà¸¢)", + "en_ZW": "อังà¸à¸¤à¸© (ซิมบับเว)", + "eo": "เอสเปอรันโต", + "es": "สเปน", + "es_AR": "สเปน (อาร์เจนตินา)", + "es_BO": "สเปน (โบลิเวีย)", + "es_BR": "สเปน (บราซิล)", + "es_CL": "สเปน (ชิลี)", + "es_CO": "สเปน (โคลอมเบีย)", + "es_CR": "สเปน (คอสตาริà¸à¸²)", + "es_CU": "สเปน (คิวบา)", + "es_DO": "สเปน (สาธารณรัà¸à¹‚ดมินิà¸à¸±à¸™)", + "es_EA": "สเปน (เซวตาà¹à¸¥à¸°à¹€à¸¡à¸¥à¸µà¸¢à¸²)", + "es_EC": "สเปน (เอà¸à¸§à¸²à¸”อร์)", + "es_ES": "สเปน (สเปน)", + "es_GQ": "สเปน (อิเควทอเรียลà¸à¸´à¸™à¸µ)", + "es_GT": "สเปน (à¸à¸±à¸§à¹€à¸•มาลา)", + "es_HN": "สเปน (ฮอนดูรัส)", + "es_IC": "สเปน (หมู่เà¸à¸²à¸°à¸„านารี)", + "es_MX": "สเปน (เม็à¸à¸‹à¸´à¹‚à¸)", + "es_NI": "สเปน (นิà¸à¸²à¸£à¸²à¸à¸±à¸§)", + "es_PA": "สเปน (ปานามา)", + "es_PE": "สเปน (เปรู)", + "es_PH": "สเปน (ฟิลิปปินส์)", + "es_PR": "สเปน (เปอร์โตริโà¸)", + "es_PY": "สเปน (ปาราà¸à¸§à¸±à¸¢)", + "es_SV": "สเปน (เอลซัลวาดอร์)", + "es_US": "สเปน (สหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸²)", + "es_UY": "สเปน (อุรุà¸à¸§à¸±à¸¢)", + "es_VE": "สเปน (เวเนซุเอลา)", + "et": "เอสโตเนีย", + "et_EE": "เอสโตเนีย (เอสโตเนีย)", + "eu": "บัสเà¸", + "eu_ES": "บัสเภ(สเปน)", + "fa": "เปอร์เซีย", + "fa_AF": "เปอร์เซีย (อัฟà¸à¸²à¸™à¸´à¸ªà¸–าน)", + "fa_IR": "เปอร์เซีย (อิหร่าน)", + "ff": "ฟูลาฮ์", + "ff_CM": "ฟูลาฮ์ (à¹à¸„เมอรูน)", + "ff_GN": "ฟูลาฮ์ (à¸à¸´à¸™à¸µ)", + "ff_MR": "ฟูลาฮ์ (มอริเตเนีย)", + "ff_SN": "ฟูลาฮ์ (เซเนà¸à¸±à¸¥)", + "fi": "ฟินà¹à¸¥à¸™à¸”์", + "fi_FI": "ฟินà¹à¸¥à¸™à¸”์ (ฟินà¹à¸¥à¸™à¸”์)", + "fo": "à¹à¸Ÿà¹‚ร", + "fo_DK": "à¹à¸Ÿà¹‚ร (เดนมาร์à¸)", + "fo_FO": "à¹à¸Ÿà¹‚ร (หมู่เà¸à¸²à¸°à¹à¸Ÿà¹‚ร)", + "fr": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª", + "fr_BE": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (เบลเยียม)", + "fr_BF": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (บูร์à¸à¸´à¸™à¸²à¸Ÿà¸²à¹‚ซ)", + "fr_BI": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (บุรุนดี)", + "fr_BJ": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (เบนิน)", + "fr_BL": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (เซนต์บาร์เธเลมี)", + "fr_CA": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (à¹à¸„นาดา)", + "fr_CD": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (คองโà¸-à¸à¸´à¸™à¸Šà¸²à¸‹à¸²)", + "fr_CF": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (สาธารณรัà¸à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¸à¸¥à¸²à¸‡)", + "fr_CG": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (คองโà¸-บราซซาวิล)", + "fr_CH": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (สวิตเซอร์à¹à¸¥à¸™à¸”์)", + "fr_CI": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (โà¸à¸•ดิวัวร์)", + "fr_CM": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (à¹à¸„เมอรูน)", + "fr_DJ": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (จิบูตี)", + "fr_DZ": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (à¹à¸­à¸¥à¸ˆà¸µà¹€à¸£à¸µà¸¢)", + "fr_FR": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª)", + "fr_GA": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (à¸à¸²à¸šà¸­à¸‡)", + "fr_GF": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (เฟรนช์เà¸à¸µà¸¢à¸™à¸²)", + "fr_GN": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (à¸à¸´à¸™à¸µ)", + "fr_GP": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (à¸à¸§à¸²à¹€à¸”อลูป)", + "fr_GQ": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (อิเควทอเรียลà¸à¸´à¸™à¸µ)", + "fr_HT": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (เฮติ)", + "fr_KM": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (คอโมโรส)", + "fr_LU": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (ลัà¸à¹€à¸‹à¸¡à¹€à¸šà¸´à¸£à¹Œà¸)", + "fr_MA": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (โมร็อà¸à¹‚à¸)", + "fr_MC": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (โมนาโà¸)", + "fr_MF": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (เซนต์มาติน)", + "fr_MG": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (มาดาà¸à¸±à¸ªà¸à¸²à¸£à¹Œ)", + "fr_ML": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (มาลี)", + "fr_MQ": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (มาร์ตินีà¸)", + "fr_MR": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (มอริเตเนีย)", + "fr_MU": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (มอริเชียส)", + "fr_NC": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (นิวà¹à¸„ลิโดเนีย)", + "fr_NE": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (ไนเจอร์)", + "fr_PF": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (เฟรนช์โปลินีเซีย)", + "fr_PM": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (à¹à¸‹à¸‡à¸›à¸µà¹à¸¢à¸£à¹Œà¹à¸¥à¸°à¸¡à¸µà¹€à¸à¸­à¸¥à¸‡)", + "fr_RE": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (เรอูนียง)", + "fr_RW": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (รวันดา)", + "fr_SC": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (เซเชลส์)", + "fr_SN": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (เซเนà¸à¸±à¸¥)", + "fr_SY": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (ซีเรีย)", + "fr_TD": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (ชาด)", + "fr_TG": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (โตโà¸)", + "fr_TN": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (ตูนิเซีย)", + "fr_VU": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (วานูอาตู)", + "fr_WF": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (วาลลิสà¹à¸¥à¸°à¸Ÿà¸¸à¸•ูนา)", + "fr_YT": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª (มายอต)", + "fy": "ฟริเซียนตะวันตà¸", + "fy_NL": "ฟริเซียนตะวันตภ(เนเธอร์à¹à¸¥à¸™à¸”์)", + "ga": "ไอริช", + "ga_IE": "ไอริช (ไอร์à¹à¸¥à¸™à¸”์)", + "gd": "สà¸à¸­à¸•ส์à¸à¸²à¸¥à¸´à¸", + "gd_GB": "สà¸à¸­à¸•ส์à¸à¸²à¸¥à¸´à¸ (สหราชอาณาจัà¸à¸£)", + "gl": "à¸à¸²à¸¥à¸´à¹€à¸‹à¸µà¸¢", + "gl_ES": "à¸à¸²à¸¥à¸´à¹€à¸‹à¸µà¸¢ (สเปน)", + "gu": "คุชราต", + "gu_IN": "คุชราต (อินเดีย)", + "gv": "มานซ์", + "gv_IM": "มานซ์ (เà¸à¸²à¸°à¹à¸¡à¸™)", + "ha": "เฮาชา", + "ha_GH": "เฮาชา (à¸à¸²à¸™à¸²)", + "ha_NE": "เฮาชา (ไนเจอร์)", + "ha_NG": "เฮาชา (ไนจีเรีย)", + "he": "ฮิบรู", + "he_IL": "ฮิบรู (อิสราเอล)", + "hi": "ฮินดี", + "hi_IN": "ฮินดี (อินเดีย)", + "hr": "โครเอเชีย", + "hr_BA": "โครเอเชีย (บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸µà¸™à¸²)", + "hr_HR": "โครเอเชีย (โครเอเชีย)", + "hu": "ฮังà¸à¸²à¸£à¸µ", + "hu_HU": "ฮังà¸à¸²à¸£à¸µ (ฮังà¸à¸²à¸£à¸µ)", + "hy": "อาร์เมเนีย", + "hy_AM": "อาร์เมเนีย (อาร์เมเนีย)", + "id": "อินโดนีเชีย", + "id_ID": "อินโดนีเชีย (อินโดนีเซีย)", + "ig": "อิà¸à¹‚บ", + "ig_NG": "อิà¸à¹‚บ (ไนจีเรีย)", + "ii": "เสฉวนยิ", + "ii_CN": "เสฉวนยิ (จีน)", + "is": "ไอซ์à¹à¸¥à¸™à¸”์", + "is_IS": "ไอซ์à¹à¸¥à¸™à¸”์ (ไอซ์à¹à¸¥à¸™à¸”์)", + "it": "อิตาลี", + "it_CH": "อิตาลี (สวิตเซอร์à¹à¸¥à¸™à¸”์)", + "it_IT": "อิตาลี (อิตาลี)", + "it_SM": "อิตาลี (ซานมารีโน)", + "ja": "à¸à¸µà¹ˆà¸›à¸¸à¹ˆà¸™", + "ja_JP": "à¸à¸µà¹ˆà¸›à¸¸à¹ˆà¸™ (à¸à¸µà¹ˆà¸›à¸¸à¹ˆà¸™)", + "ka": "จอร์เจีย", + "ka_GE": "จอร์เจีย (จอร์เจีย)", + "ki": "à¸à¸µà¸à¸¹à¸¢à¸¹", + "ki_KE": "à¸à¸µà¸à¸¹à¸¢à¸¹ (เคนยา)", + "kk": "คาซัค", + "kk_KZ": "คาซัค (คาซัคสถาน)", + "kl": "à¸à¸£à¸µà¸™à¹à¸¥à¸™à¸”์", + "kl_GL": "à¸à¸£à¸µà¸™à¹à¸¥à¸™à¸”์ (à¸à¸£à¸µà¸™à¹à¸¥à¸™à¸”์)", + "km": "เขมร", + "km_KH": "เขมร (à¸à¸±à¸¡à¸žà¸¹à¸Šà¸²)", + "kn": "à¸à¸±à¸™à¸™à¸²à¸”า", + "kn_IN": "à¸à¸±à¸™à¸™à¸²à¸”า (อินเดีย)", + "ko": "เà¸à¸²à¸«à¸¥à¸µ", + "ko_KP": "เà¸à¸²à¸«à¸¥à¸µ (เà¸à¸²à¸«à¸¥à¸µà¹€à¸«à¸™à¸·à¸­)", + "ko_KR": "เà¸à¸²à¸«à¸¥à¸µ (เà¸à¸²à¸«à¸¥à¸µà¹ƒà¸•้)", + "ks": "à¸à¸±à¸¨à¸¡à¸µà¸£à¹Œ", + "ks_IN": "à¸à¸±à¸¨à¸¡à¸µà¸£à¹Œ (อินเดีย)", + "kw": "คอร์นิช", + "kw_GB": "คอร์นิช (สหราชอาณาจัà¸à¸£)", + "ky": "คีร์à¸à¸µà¸‹", + "ky_KG": "คีร์à¸à¸µà¸‹ (คีร์à¸à¸µà¸‹à¸ªà¸–าน)", + "lb": "ลัà¸à¹€à¸‹à¸¡à¹€à¸šà¸´à¸£à¹Œà¸", + "lb_LU": "ลัà¸à¹€à¸‹à¸¡à¹€à¸šà¸´à¸£à¹Œà¸ (ลัà¸à¹€à¸‹à¸¡à¹€à¸šà¸´à¸£à¹Œà¸)", + "lg": "ยูà¸à¸±à¸™à¸”า", + "lg_UG": "ยูà¸à¸±à¸™à¸”า (ยูà¸à¸±à¸™à¸”า)", + "ln": "ลิงà¸à¸²à¸¥à¸²", + "ln_AO": "ลิงà¸à¸²à¸¥à¸² (à¹à¸­à¸‡à¹‚à¸à¸¥à¸²)", + "ln_CD": "ลิงà¸à¸²à¸¥à¸² (คองโà¸-à¸à¸´à¸™à¸Šà¸²à¸‹à¸²)", + "ln_CF": "ลิงà¸à¸²à¸¥à¸² (สาธารณรัà¸à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¸à¸¥à¸²à¸‡)", + "ln_CG": "ลิงà¸à¸²à¸¥à¸² (คองโà¸-บราซซาวิล)", + "lo": "ลาว", + "lo_LA": "ลาว (ลาว)", + "lt": "ลิทัวเนีย", + "lt_LT": "ลิทัวเนีย (ลิทัวเนีย)", + "lu": "ลูบา-à¸à¸²à¸•องà¸à¸²", + "lu_CD": "ลูบา-à¸à¸²à¸•องà¸à¸² (คองโà¸-à¸à¸´à¸™à¸Šà¸²à¸‹à¸²)", + "lv": "ลัตเวีย", + "lv_LV": "ลัตเวีย (ลัตเวีย)", + "mg": "มาลาà¸à¸²à¸‹à¸µ", + "mg_MG": "มาลาà¸à¸²à¸‹à¸µ (มาดาà¸à¸±à¸ªà¸à¸²à¸£à¹Œ)", + "mk": "มาซิโดเนีย", + "mk_MK": "มาซิโดเนีย (มาซิโดเนีย)", + "ml": "มาลายาลัม", + "ml_IN": "มาลายาลัม (อินเดีย)", + "mn": "มองโà¸à¹€à¸¥à¸µà¸¢", + "mn_MN": "มองโà¸à¹€à¸¥à¸µà¸¢ (มองโà¸à¹€à¸¥à¸µà¸¢)", + "mr": "มราà¸à¸µ", + "mr_IN": "มราà¸à¸µ (อินเดีย)", + "ms": "มาเลย์", + "ms_BN": "มาเลย์ (บรูไน)", + "ms_MY": "มาเลย์ (มาเลเซีย)", + "ms_SG": "มาเลย์ (สิงคโปร์)", + "mt": "มอลตา", + "mt_MT": "มอลตา (มอลตา)", + "my": "พม่า", + "my_MM": "พม่า (เมียนมาร์ (พม่า))", + "nb": "นอร์เวย์บุคมอล", + "nb_NO": "นอร์เวย์บุคมอล (นอร์เวย์)", + "nb_SJ": "นอร์เวย์บุคมอล (สฟาลบาร์à¹à¸¥à¸°à¸¢à¸²à¸™à¹„มเอน)", + "nd": "เอ็นเดเบเลเหนือ", + "nd_ZW": "เอ็นเดเบเลเหนือ (ซิมบับเว)", + "ne": "เนปาล", + "ne_IN": "เนปาล (อินเดีย)", + "ne_NP": "เนปาล (เนปาล)", + "nl": "ดัตช์", + "nl_AW": "ดัตช์ (อารูบา)", + "nl_BE": "ดัตช์ (เบลเยียม)", + "nl_BQ": "ดัตช์ (เนเธอร์à¹à¸¥à¸™à¸”์à¹à¸„ริบเบียน)", + "nl_CW": "ดัตช์ (คูราเซา)", + "nl_NL": "ดัตช์ (เนเธอร์à¹à¸¥à¸™à¸”์)", + "nl_SR": "ดัตช์ (ซูรินาเม)", + "nl_SX": "ดัตช์ (เซนต์มาร์ติน)", + "nn": "นอร์เวย์นีนอสà¸à¹Œ", + "nn_NO": "นอร์เวย์นีนอสà¸à¹Œ (นอร์เวย์)", + "no": "นอร์เวย์", + "no_NO": "นอร์เวย์ (นอร์เวย์)", + "om": "โอโรโม", + "om_ET": "โอโรโม (เอธิโอเปีย)", + "om_KE": "โอโรโม (เคนยา)", + "or": "โอริยา", + "or_IN": "โอริยา (อินเดีย)", + "os": "ออสเซเตีย", + "os_GE": "ออสเซเตีย (จอร์เจีย)", + "os_RU": "ออสเซเตีย (รัสเซีย)", + "pa": "ปัà¸à¸ˆà¸²à¸š", + "pa_Arab": "ปัà¸à¸ˆà¸²à¸š (อาหรับ)", + "pa_Arab_PK": "ปัà¸à¸ˆà¸²à¸š (อาหรับ, ปาà¸à¸µà¸ªà¸–าน)", + "pa_Guru": "ปัà¸à¸ˆà¸²à¸š (à¸à¸¹à¸£à¹Œà¸¡à¸¹à¸„ี)", + "pa_Guru_IN": "ปัà¸à¸ˆà¸²à¸š (à¸à¸¹à¸£à¹Œà¸¡à¸¹à¸„ี, อินเดีย)", + "pa_IN": "ปัà¸à¸ˆà¸²à¸š (อินเดีย)", + "pa_PK": "ปัà¸à¸ˆà¸²à¸š (ปาà¸à¸µà¸ªà¸–าน)", + "pl": "โปà¹à¸¥à¸™à¸”์", + "pl_PL": "โปà¹à¸¥à¸™à¸”์ (โปà¹à¸¥à¸™à¸”์)", + "ps": "พาชตู", + "ps_AF": "พาชตู (อัฟà¸à¸²à¸™à¸´à¸ªà¸–าน)", + "pt": "โปรตุเà¸à¸ª", + "pt_AO": "โปรตุเà¸à¸ª (à¹à¸­à¸‡à¹‚à¸à¸¥à¸²)", + "pt_BR": "โปรตุเà¸à¸ª (บราซิล)", + "pt_CH": "โปรตุเà¸à¸ª (สวิตเซอร์à¹à¸¥à¸™à¸”์)", + "pt_CV": "โปรตุเà¸à¸ª (เคปเวิร์ด)", + "pt_GQ": "โปรตุเà¸à¸ª (อิเควทอเรียลà¸à¸´à¸™à¸µ)", + "pt_GW": "โปรตุเà¸à¸ª (à¸à¸´à¸™à¸µ-บิสเซา)", + "pt_LU": "โปรตุเà¸à¸ª (ลัà¸à¹€à¸‹à¸¡à¹€à¸šà¸´à¸£à¹Œà¸)", + "pt_MO": "โปรตุเà¸à¸ª (เขตปà¸à¸„รองพิเศษมาเà¸à¹Šà¸²à¹à¸«à¹ˆà¸‡à¸ªà¸²à¸˜à¸²à¸£à¸“รัà¸à¸›à¸£à¸°à¸Šà¸²à¸Šà¸™à¸ˆà¸µà¸™)", + "pt_MZ": "โปรตุเà¸à¸ª (โมซัมบิà¸)", + "pt_PT": "โปรตุเà¸à¸ª (โปรตุเà¸à¸ª)", + "pt_ST": "โปรตุเà¸à¸ª (เซาตูเมà¹à¸¥à¸°à¸›à¸£à¸´à¸™à¸‹à¸´à¸›à¸µ)", + "pt_TL": "โปรตุเà¸à¸ª (ติมอร์-เลสเต)", + "qu": "ควิชัว", + "qu_BO": "ควิชัว (โบลิเวีย)", + "qu_EC": "ควิชัว (เอà¸à¸§à¸²à¸”อร์)", + "qu_PE": "ควิชัว (เปรู)", + "rm": "โรà¹à¸¡à¸™à¸‹à¹Œ", + "rm_CH": "โรà¹à¸¡à¸™à¸‹à¹Œ (สวิตเซอร์à¹à¸¥à¸™à¸”์)", + "rn": "บุรุนดี", + "rn_BI": "บุรุนดี (บุรุนดี)", + "ro": "โรมาเนีย", + "ro_MD": "โรมาเนีย (มอลโดวา)", + "ro_RO": "โรมาเนีย (โรมาเนีย)", + "ru": "รัสเซีย", + "ru_BY": "รัสเซีย (เบลารุส)", + "ru_KG": "รัสเซีย (คีร์à¸à¸µà¸‹à¸ªà¸–าน)", + "ru_KZ": "รัสเซีย (คาซัคสถาน)", + "ru_MD": "รัสเซีย (มอลโดวา)", + "ru_RU": "รัสเซีย (รัสเซีย)", + "ru_UA": "รัสเซีย (ยูเครน)", + "rw": "รวันดา", + "rw_RW": "รวันดา (รวันดา)", + "se": "ซามิเหนือ", + "se_FI": "ซามิเหนือ (ฟินà¹à¸¥à¸™à¸”์)", + "se_NO": "ซามิเหนือ (นอร์เวย์)", + "se_SE": "ซามิเหนือ (สวีเดน)", + "sg": "à¹à¸‹à¸‡à¹‚à¸", + "sg_CF": "à¹à¸‹à¸‡à¹‚ภ(สาธารณรัà¸à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¸à¸¥à¸²à¸‡)", + "sh": "เซอร์โบ-โครเอเชีย", + "sh_BA": "เซอร์โบ-โครเอเชีย (บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸µà¸™à¸²)", + "si": "สิงหล", + "si_LK": "สิงหล (ศรีลังà¸à¸²)", + "sk": "สโลวัà¸", + "sk_SK": "สโลวัภ(สโลวะเà¸à¸µà¸¢)", + "sl": "สโลวีเนีย", + "sl_SI": "สโลวีเนีย (สโลวีเนีย)", + "sn": "โชนา", + "sn_ZW": "โชนา (ซิมบับเว)", + "so": "โซมาลี", + "so_DJ": "โซมาลี (จิบูตี)", + "so_ET": "โซมาลี (เอธิโอเปีย)", + "so_KE": "โซมาลี (เคนยา)", + "so_SO": "โซมาลี (โซมาเลีย)", + "sq": "à¹à¸­à¸¥à¹€à¸šà¹€à¸™à¸µà¸¢", + "sq_AL": "à¹à¸­à¸¥à¹€à¸šà¹€à¸™à¸µà¸¢ (à¹à¸­à¸¥à¹€à¸šà¹€à¸™à¸µà¸¢)", + "sq_MK": "à¹à¸­à¸¥à¹€à¸šà¹€à¸™à¸µà¸¢ (มาซิโดเนีย)", + "sq_XK": "à¹à¸­à¸¥à¹€à¸šà¹€à¸™à¸µà¸¢ (โคโซโว)", + "sr": "เซอร์เบีย", + "sr_BA": "เซอร์เบีย (บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸µà¸™à¸²)", + "sr_Cyrl": "เซอร์เบีย (ซีริลลิà¸)", + "sr_Cyrl_BA": "เซอร์เบีย (ซีริลลิà¸, บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸µà¸™à¸²)", + "sr_Cyrl_ME": "เซอร์เบีย (ซีริลลิà¸, มอนเตเนโà¸à¸£)", + "sr_Cyrl_RS": "เซอร์เบีย (ซีริลลิà¸, เซอร์เบีย)", + "sr_Cyrl_XK": "เซอร์เบีย (ซีริลลิà¸, โคโซโว)", + "sr_Latn": "เซอร์เบีย (ละติน)", + "sr_Latn_BA": "เซอร์เบีย (ละติน, บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸µà¸™à¸²)", + "sr_Latn_ME": "เซอร์เบีย (ละติน, มอนเตเนโà¸à¸£)", + "sr_Latn_RS": "เซอร์เบีย (ละติน, เซอร์เบีย)", + "sr_Latn_XK": "เซอร์เบีย (ละติน, โคโซโว)", + "sr_ME": "เซอร์เบีย (มอนเตเนโà¸à¸£)", + "sr_RS": "เซอร์เบีย (เซอร์เบีย)", + "sr_XK": "เซอร์เบีย (โคโซโว)", + "sv": "สวีเดน", + "sv_AX": "สวีเดน (หมู่เà¸à¸²à¸°à¹‚อลันด์)", + "sv_FI": "สวีเดน (ฟินà¹à¸¥à¸™à¸”์)", + "sv_SE": "สวีเดน (สวีเดน)", + "sw": "สวาฮีลี", + "sw_CD": "สวาฮีลี (คองโà¸-à¸à¸´à¸™à¸Šà¸²à¸‹à¸²)", + "sw_KE": "สวาฮีลี (เคนยา)", + "sw_TZ": "สวาฮีลี (à¹à¸—นซาเนีย)", + "sw_UG": "สวาฮีลี (ยูà¸à¸±à¸™à¸”า)", + "ta": "ทมิฬ", + "ta_IN": "ทมิฬ (อินเดีย)", + "ta_LK": "ทมิฬ (ศรีลังà¸à¸²)", + "ta_MY": "ทมิฬ (มาเลเซีย)", + "ta_SG": "ทมิฬ (สิงคโปร์)", + "te": "เตลูà¸à¸¹", + "te_IN": "เตลูà¸à¸¹ (อินเดีย)", + "th": "ไทย", + "th_TH": "ไทย (ไทย)", + "ti": "ติà¸à¸£à¸´à¸à¸à¸²", + "ti_ER": "ติà¸à¸£à¸´à¸à¸à¸² (เอริเทรีย)", + "ti_ET": "ติà¸à¸£à¸´à¸à¸à¸² (เอธิโอเปีย)", + "tl": "ตาà¸à¸²à¸¥à¹‡à¸­à¸", + "tl_PH": "ตาà¸à¸²à¸¥à¹‡à¸­à¸ (ฟิลิปปินส์)", + "to": "ตองà¸à¸²", + "to_TO": "ตองà¸à¸² (ตองà¸à¸²)", + "tr": "ตุรà¸à¸µ", + "tr_CY": "ตุรà¸à¸µ (ไซปรัส)", + "tr_TR": "ตุรà¸à¸µ (ตุรà¸à¸µ)", + "ug": "อุยà¸à¸±à¸§", + "ug_CN": "อุยà¸à¸±à¸§ (จีน)", + "uk": "ยูเครน", + "uk_UA": "ยูเครน (ยูเครน)", + "ur": "อูรดู", + "ur_IN": "อูรดู (อินเดีย)", + "ur_PK": "อูรดู (ปาà¸à¸µà¸ªà¸–าน)", + "uz": "อุซเบà¸", + "uz_AF": "อุซเบภ(อัฟà¸à¸²à¸™à¸´à¸ªà¸–าน)", + "uz_Arab": "อุซเบภ(อาหรับ)", + "uz_Arab_AF": "อุซเบภ(อาหรับ, อัฟà¸à¸²à¸™à¸´à¸ªà¸–าน)", + "uz_Cyrl": "อุซเบภ(ซีริลลิà¸)", + "uz_Cyrl_UZ": "อุซเบภ(ซีริลลิà¸, อุซเบà¸à¸´à¸ªà¸–าน)", + "uz_Latn": "อุซเบภ(ละติน)", + "uz_Latn_UZ": "อุซเบภ(ละติน, อุซเบà¸à¸´à¸ªà¸–าน)", + "uz_UZ": "อุซเบภ(อุซเบà¸à¸´à¸ªà¸–าน)", + "vi": "เวียดนาม", + "vi_VN": "เวียดนาม (เวียดนาม)", + "yi": "ยิว", + "yo": "โยรูบา", + "yo_BJ": "โยรูบา (เบนิน)", + "yo_NG": "โยรูบา (ไนจีเรีย)", + "zh": "จีน", + "zh_CN": "จีน (จีน)", + "zh_HK": "จีน (เขตปà¸à¸„รองพิเศษฮ่องà¸à¸‡à¹à¸«à¹ˆà¸‡à¸ªà¸²à¸˜à¸²à¸£à¸“รัà¸à¸›à¸£à¸°à¸Šà¸²à¸Šà¸™à¸ˆà¸µà¸™)", + "zh_Hans": "จีน (ตัวย่อ)", + "zh_Hans_CN": "จีน (ตัวย่อ, จีน)", + "zh_Hans_HK": "จีน (ตัวย่อ, เขตปà¸à¸„รองพิเศษฮ่องà¸à¸‡à¹à¸«à¹ˆà¸‡à¸ªà¸²à¸˜à¸²à¸£à¸“รัà¸à¸›à¸£à¸°à¸Šà¸²à¸Šà¸™à¸ˆà¸µà¸™)", + "zh_Hans_MO": "จีน (ตัวย่อ, เขตปà¸à¸„รองพิเศษมาเà¸à¹Šà¸²à¹à¸«à¹ˆà¸‡à¸ªà¸²à¸˜à¸²à¸£à¸“รัà¸à¸›à¸£à¸°à¸Šà¸²à¸Šà¸™à¸ˆà¸µà¸™)", + "zh_Hans_SG": "จีน (ตัวย่อ, สิงคโปร์)", + "zh_Hant": "จีน (ตัวเต็ม)", + "zh_Hant_HK": "จีน (ตัวเต็ม, เขตปà¸à¸„รองพิเศษฮ่องà¸à¸‡à¹à¸«à¹ˆà¸‡à¸ªà¸²à¸˜à¸²à¸£à¸“รัà¸à¸›à¸£à¸°à¸Šà¸²à¸Šà¸™à¸ˆà¸µà¸™)", + "zh_Hant_MO": "จีน (ตัวเต็ม, เขตปà¸à¸„รองพิเศษมาเà¸à¹Šà¸²à¹à¸«à¹ˆà¸‡à¸ªà¸²à¸˜à¸²à¸£à¸“รัà¸à¸›à¸£à¸°à¸Šà¸²à¸Šà¸™à¸ˆà¸µà¸™)", + "zh_Hant_TW": "จีน (ตัวเต็ม, ไต้หวัน)", + "zh_MO": "จีน (เขตปà¸à¸„รองพิเศษมาเà¸à¹Šà¸²à¹à¸«à¹ˆà¸‡à¸ªà¸²à¸˜à¸²à¸£à¸“รัà¸à¸›à¸£à¸°à¸Šà¸²à¸Šà¸™à¸ˆà¸µà¸™)", + "zh_SG": "จีน (สิงคโปร์)", + "zh_TW": "จีน (ไต้หวัน)", + "zu": "ซูลู", + "zu_ZA": "ซูลู (à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¹ƒà¸•้)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ti.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ti.json new file mode 100644 index 0000000000000000000000000000000000000000..b9ea394ac272dc9179cf360bef46ea26deddf109 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ti.json @@ -0,0 +1,86 @@ +{ + "Names": { + "af": "አáሪቃንሰኛ", + "am": "አáˆáˆáˆ¨áŠ›", + "ar": "ዓረበኛ", + "az": "አዜርባይጃንኛ", + "az_Latn": "አዜርባይጃንኛ (ላቲን)", + "be": "ቤላራሻኛ", + "bg": "ቡáˆáŒ‹áˆªáŠ›", + "bn": "በንጋሊኛ", + "br": "ብሬቶን", + "bs": "ቦስኒያን", + "bs_Latn": "ቦስኒያን (ላቲን)", + "ca": "ካታላን", + "cs": "ቼክኛ", + "cy": "ወáˆáˆ½", + "da": "ዴኒሽ", + "de": "ጀርመን", + "el": "áŒáˆªáŠ¨áŠ›", + "en": "እንáŒáˆŠá‹áŠ›", + "eo": "ኤስáራንቶ", + "es": "ስá“ኒሽ", + "et": "ኤስቶኒአን", + "eu": "ባስክኛ", + "fa": "áርሲያኛ", + "fi": "áŠáŠ’áˆ½", + "fo": "á‹áˆ®áŠ›", + "fr": "áˆáˆ¨áŠ•áˆ³á‹­áŠ›", + "fy": "áሪሰኛ", + "ga": "አይሪሽ", + "gd": "እስኮትስ ጌáˆáŠ­áŠ›", + "gl": "ጋለቪኛ", + "gu": "ጉጃራቲኛ", + "he": "ዕብራስጥ", + "hi": "ሕንደኛ", + "hr": "ክሮሽያንኛ", + "hu": "ሀንጋሪኛ", + "id": "እንዶኑሲኛ", + "is": "አይስላንደኛ", + "it": "ጣሊያንኛ", + "ja": "ጃá“ንኛ", + "ka": "ጊዮርጊያኛ", + "kn": "ካማደኛ", + "ko": "ኮሪያኛ", + "ky": "ኪሩጋዚ", + "lt": "ሊቱአኒየን", + "lv": "ላቲቪያን", + "mk": "ማክዶኒኛ", + "ml": "ማላያላáˆáŠ›", + "mr": "ማራቲኛ", + "ms": "ማላይኛ", + "mt": "ማáˆá‰²áˆµáŠ›", + "ne": "ኔá–ሊኛ", + "nl": "ደች", + "nn": "ኖርዌይኛ (ናይ áŠáŠ–áˆ­áˆµáŠ­)", + "no": "ኖርዌጂያን", + "or": "ኦሪያ", + "pa": "á‘ንጃቢኛ", + "pl": "á–ሊሽ", + "ps": "á“ሽቶ", + "pt": "á–ርቱጋሊኛ", + "ro": "ሮማኒያን", + "ru": "ራሽኛ", + "sh": "ሰርቦ- ክሮዊታን", + "si": "ስንሃáˆáŠ›", + "sk": "ስሎቨክኛ", + "sl": "ስá‰á‰ªáŠ›", + "sq": "አáˆá‰¤áŠ’áŠ›", + "sr": "ሰርቢኛ", + "sr_Latn": "ሰርቢኛ (ላቲን)", + "sv": "ስዊድንኛ", + "sw": "ሰዋሂሊኛ", + "ta": "ታሚáˆáŠ›", + "te": "ተሉጉኛ", + "th": "ታይኛ", + "ti": "ትáŒáˆ­áŠ›", + "tr": "ቱርከኛ", + "uk": "ዩክረኒኛ", + "ur": "ኡርዱኛ", + "uz": "ኡá‹á‰ áŠ­áŠ›", + "uz_Latn": "ኡá‹á‰ áŠ­áŠ› (ላቲን)", + "vi": "ቪትናáˆáŠ›", + "yi": "ዪዲሽ", + "zu": "ዙሉኛ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/tl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/tl.json new file mode 100644 index 0000000000000000000000000000000000000000..943de5d92156bec5d0277b3afb47aeccd2469550 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/tl.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "fil" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/tl_PH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/tl_PH.json new file mode 100644 index 0000000000000000000000000000000000000000..03a1258991da8432c83e3f6324d9b82d4ff833fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/tl_PH.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "fil_PH" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/to.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/to.json new file mode 100644 index 0000000000000000000000000000000000000000..2361d83719f7996bf20289b13945f34571ca02ea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/to.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "lea fakaÊ»afilikana", + "af_NA": "lea fakaÊ»afilikana (Namipia)", + "af_ZA": "lea fakaÊ»afilikana (Ê»Afilika tonga)", + "ak": "lea fakaÊ»akani", + "ak_GH": "lea fakaÊ»akani (Kana)", + "am": "lea fakaÊ»ameliki", + "am_ET": "lea fakaÊ»ameliki (ʻĪtiÅpia)", + "ar": "lea fakaÊ»alepea", + "ar_AE": "lea fakaÊ»alepea (Ê»Alepea Fakatahataha)", + "ar_BH": "lea fakaÊ»alepea (Paleini)", + "ar_DJ": "lea fakaÊ»alepea (Siputi)", + "ar_DZ": "lea fakaÊ»alepea (Ê»Aisilia)", + "ar_EG": "lea fakaÊ»alepea (Ê»Isipite)", + "ar_EH": "lea fakaÊ»alepea (Sahala fakahihifo)", + "ar_ER": "lea fakaÊ»alepea (Ê»Elitulia)", + "ar_IL": "lea fakaÊ»alepea (Ê»Isileli)", + "ar_IQ": "lea fakaÊ»alepea (Ê»Ilaaki)", + "ar_JO": "lea fakaÊ»alepea (Soatane)", + "ar_KM": "lea fakaÊ»alepea (Komolosi)", + "ar_KW": "lea fakaÊ»alepea (Kueiti)", + "ar_LB": "lea fakaÊ»alepea (Lepanoni)", + "ar_LY": "lea fakaÊ»alepea (LÄ«pia)", + "ar_MA": "lea fakaÊ»alepea (Moloko)", + "ar_MR": "lea fakaÊ»alepea (Maulitenia)", + "ar_OM": "lea fakaÊ»alepea (Ê»Omani)", + "ar_PS": "lea fakaÊ»alepea (Potu Palesitaine)", + "ar_QA": "lea fakaÊ»alepea (KatÄ)", + "ar_SA": "lea fakaÊ»alepea (Saute Ê»Alepea)", + "ar_SD": "lea fakaÊ»alepea (SÅ«teni)", + "ar_SO": "lea fakaÊ»alepea (SÅmalia)", + "ar_SS": "lea fakaÊ»alepea (SÅ«tani fakatonga)", + "ar_SY": "lea fakaÊ»alepea (SÄ«lia)", + "ar_TD": "lea fakaÊ»alepea (SÄti)", + "ar_TN": "lea fakaÊ»alepea (TunÄ«sia)", + "ar_YE": "lea fakaÊ»alepea (Iemeni)", + "as": "lea fakaÊ»asamia", + "as_IN": "lea fakaÊ»asamia (Ê»Initia)", + "az": "lea fakaÊ»asapaisani", + "az_AZ": "lea fakaÊ»asapaisani (Ê»Asapaisani)", + "az_Cyrl": "lea fakaÊ»asapaisani (tohinima fakalÅ«sia)", + "az_Cyrl_AZ": "lea fakaÊ»asapaisani (tohinima fakalÅ«sia, Ê»Asapaisani)", + "az_Latn": "lea fakaÊ»asapaisani (tohinima fakalatina)", + "az_Latn_AZ": "lea fakaÊ»asapaisani (tohinima fakalatina, Ê»Asapaisani)", + "be": "lea fakapelalusi", + "be_BY": "lea fakapelalusi (Pelalusi)", + "bg": "lea fakapulukalia", + "bg_BG": "lea fakapulukalia (Pulukalia)", + "bm": "lea fakapamipala", + "bm_ML": "lea fakapamipala (MÄli)", + "bn": "lea fakapengikali", + "bn_BD": "lea fakapengikali (PengilÄtesi)", + "bn_IN": "lea fakapengikali (Ê»Initia)", + "bo": "lea fakatipeti", + "bo_CN": "lea fakatipeti (Siaina)", + "bo_IN": "lea fakatipeti (Ê»Initia)", + "br": "lea fakapeletoni", + "br_FR": "lea fakapeletoni (FalanisÄ“)", + "bs": "lea fakaposinia", + "bs_BA": "lea fakaposinia (Posinia mo HesikÅvina)", + "bs_Cyrl": "lea fakaposinia (tohinima fakalÅ«sia)", + "bs_Cyrl_BA": "lea fakaposinia (tohinima fakalÅ«sia, Posinia mo HesikÅvina)", + "bs_Latn": "lea fakaposinia (tohinima fakalatina)", + "bs_Latn_BA": "lea fakaposinia (tohinima fakalatina, Posinia mo HesikÅvina)", + "ca": "lea fakakatalani", + "ca_AD": "lea fakakatalani (Ê»Anitola)", + "ca_ES": "lea fakakatalani (Sipeini)", + "ca_FR": "lea fakakatalani (FalanisÄ“)", + "ca_IT": "lea fakakatalani (ʻĪtali)", + "ce": "lea fakasese", + "ce_RU": "lea fakasese (LÅ«sia)", + "cs": "lea fakaseki", + "cs_CZ": "lea fakaseki (Lipapilika Seki)", + "cy": "lea fakauÄ“lesi", + "cy_GB": "lea fakauÄ“lesi (PilitÄnia)", + "da": "lea fakatenimaÊ»ake", + "da_DK": "lea fakatenimaÊ»ake (TenimaÊ»ake)", + "da_GL": "lea fakatenimaÊ»ake (Kulinilani)", + "de": "lea fakasiamane", + "de_AT": "lea fakasiamane (Ê»Aositulia)", + "de_BE": "lea fakasiamane (Pelesiume)", + "de_CH": "lea fakasiamane (Suisilani)", + "de_DE": "lea fakasiamane (Siamane)", + "de_IT": "lea fakasiamane (ʻĪtali)", + "de_LI": "lea fakasiamane (Likitenisiteini)", + "de_LU": "lea fakasiamane (Lakisimipeki)", + "dz": "lea fakatisÅngika", + "dz_BT": "lea fakatisÅngika (PÅ«tani)", + "ee": "lea fakaÊ»eue", + "ee_GH": "lea fakaÊ»eue (Kana)", + "ee_TG": "lea fakaÊ»eue (Toko)", + "el": "lea fakakalisi", + "el_CY": "lea fakakalisi (Saipalesi)", + "el_GR": "lea fakakalisi (Kalisi)", + "en": "lea fakapÄlangi", + "en_AG": "lea fakapÄlangi (Anitikua mo Palaputa)", + "en_AI": "lea fakapÄlangi (Anikuila)", + "en_AS": "lea fakapÄlangi (HaÊ»amoa Ê»Amelika)", + "en_AT": "lea fakapÄlangi (Ê»Aositulia)", + "en_AU": "lea fakapÄlangi (Ê»AositelÄ“lia)", + "en_BB": "lea fakapÄlangi (PÄpeitosi)", + "en_BE": "lea fakapÄlangi (Pelesiume)", + "en_BI": "lea fakapÄlangi (Puluniti)", + "en_BM": "lea fakapÄlangi (PÄ“muta)", + "en_BS": "lea fakapÄlangi (Pahama)", + "en_BW": "lea fakapÄlangi (Potisiuana)", + "en_BZ": "lea fakapÄlangi (Pelise)", + "en_CA": "lea fakapÄlangi (KÄnata)", + "en_CC": "lea fakapÄlangi (Ê»Otumotu Koko)", + "en_CH": "lea fakapÄlangi (Suisilani)", + "en_CK": "lea fakapÄlangi (Ê»Otumotu Kuki)", + "en_CM": "lea fakapÄlangi (Kameluni)", + "en_CX": "lea fakapÄlangi (Motu Kilisimasi)", + "en_CY": "lea fakapÄlangi (Saipalesi)", + "en_DE": "lea fakapÄlangi (Siamane)", + "en_DG": "lea fakapÄlangi (Tieko KÄsia)", + "en_DK": "lea fakapÄlangi (TenimaÊ»ake)", + "en_DM": "lea fakapÄlangi (Tominika)", + "en_ER": "lea fakapÄlangi (Ê»Elitulia)", + "en_FI": "lea fakapÄlangi (Finilani)", + "en_FJ": "lea fakapÄlangi (Fisi)", + "en_FK": "lea fakapÄlangi (Ê»Otumotu Fokulani)", + "en_FM": "lea fakapÄlangi (MikolonÄ«sia)", + "en_GB": "lea fakapÄlangi (PilitÄnia)", + "en_GD": "lea fakapÄlangi (KelenatÄ)", + "en_GG": "lea fakapÄlangi (KuenisÄ«)", + "en_GH": "lea fakapÄlangi (Kana)", + "en_GI": "lea fakapÄlangi (SipalÄlitÄ)", + "en_GM": "lea fakapÄlangi (Kamipia)", + "en_GU": "lea fakapÄlangi (Kuamu)", + "en_GY": "lea fakapÄlangi (Kuiana)", + "en_HK": "lea fakapÄlangi (Hongi Kongi SAR Siaina)", + "en_IE": "lea fakapÄlangi (Ê»Aealani)", + "en_IL": "lea fakapÄlangi (Ê»Isileli)", + "en_IM": "lea fakapÄlangi (Motu Mani)", + "en_IN": "lea fakapÄlangi (Ê»Initia)", + "en_IO": "lea fakapÄlangi (Potu fonua moana Ê»Initia fakapilitÄnia)", + "en_JE": "lea fakapÄlangi (SelusÄ«)", + "en_JM": "lea fakapÄlangi (Samaika)", + "en_KE": "lea fakapÄlangi (KeniÄ)", + "en_KI": "lea fakapÄlangi (Kilipasi)", + "en_KN": "lea fakapÄlangi (SÄ Kitisi mo Nevisi)", + "en_KY": "lea fakapÄlangi (Ê»Otumotu Keimeni)", + "en_LC": "lea fakapÄlangi (SÄ LÅ«sia)", + "en_LR": "lea fakapÄlangi (Laipelia)", + "en_LS": "lea fakapÄlangi (Lesoto)", + "en_MG": "lea fakapÄlangi (Matakasika)", + "en_MH": "lea fakapÄlangi (Ê»Otumotu MÄsolo)", + "en_MO": "lea fakapÄlangi (Makau SAR Siaina)", + "en_MP": "lea fakapÄlangi (Ê»Otumotu Maliana tokelau)", + "en_MS": "lea fakapÄlangi (MoÊ»ungaselati)", + "en_MT": "lea fakapÄlangi (Malita)", + "en_MU": "lea fakapÄlangi (Maulitiusi)", + "en_MW": "lea fakapÄlangi (Malaui)", + "en_MY": "lea fakapÄlangi (MalÄ“sia)", + "en_NA": "lea fakapÄlangi (Namipia)", + "en_NF": "lea fakapÄlangi (Motu NÅfoliki)", + "en_NG": "lea fakapÄlangi (Naisilia)", + "en_NL": "lea fakapÄlangi (HÅlani)", + "en_NR": "lea fakapÄlangi (Naulu)", + "en_NU": "lea fakapÄlangi (NiuÄ“)", + "en_NZ": "lea fakapÄlangi (NuÊ»usila)", + "en_PG": "lea fakapÄlangi (Papuaniukini)", + "en_PH": "lea fakapÄlangi (Filipaini)", + "en_PK": "lea fakapÄlangi (PÄkisitani)", + "en_PN": "lea fakapÄlangi (Ê»Otumotu Pitikeni)", + "en_PR": "lea fakapÄlangi (PuÄ“to Liko)", + "en_PW": "lea fakapÄlangi (Palau)", + "en_RW": "lea fakapÄlangi (LuanitÄ)", + "en_SB": "lea fakapÄlangi (Ê»Otumotu Solomone)", + "en_SC": "lea fakapÄlangi (Ê»Otumotu Seiseli)", + "en_SD": "lea fakapÄlangi (SÅ«teni)", + "en_SE": "lea fakapÄlangi (SuÄ“teni)", + "en_SG": "lea fakapÄlangi (Singapoa)", + "en_SH": "lea fakapÄlangi (SÄ Helena)", + "en_SI": "lea fakapÄlangi (SilÅvenia)", + "en_SL": "lea fakapÄlangi (Siela Leone)", + "en_SS": "lea fakapÄlangi (SÅ«tani fakatonga)", + "en_SX": "lea fakapÄlangi (SÄ MÄtini (fakahÅlani))", + "en_SZ": "lea fakapÄlangi (Suasilani)", + "en_TC": "lea fakapÄlangi (Ê»Otumotu Tuki mo Kaikosi)", + "en_TK": "lea fakapÄlangi (Tokelau)", + "en_TO": "lea fakapÄlangi (Tonga)", + "en_TT": "lea fakapÄlangi (Tilinitati mo Topako)", + "en_TV": "lea fakapÄlangi (TÅ«valu)", + "en_TZ": "lea fakapÄlangi (TenisÄnia)", + "en_UG": "lea fakapÄlangi (Ê»IukanitÄ)", + "en_UM": "lea fakapÄlangi (Ê»Otumotu siÊ»i Ê»o Ê»Amelika)", + "en_US": "lea fakapÄlangi (PuleÊ»anga fakatahataha Ê»Amelika)", + "en_VC": "lea fakapÄlangi (SÄ Viniseni mo Kulenatini)", + "en_VG": "lea fakapÄlangi (Ê»Otumotu Vilikini fakapilitÄnia)", + "en_VI": "lea fakapÄlangi (Ê»Otumotu Vilikini fakaÊ»amelika)", + "en_VU": "lea fakapÄlangi (Vanuatu)", + "en_WS": "lea fakapÄlangi (HaÊ»amoa)", + "en_ZA": "lea fakapÄlangi (Ê»Afilika tonga)", + "en_ZM": "lea fakapÄlangi (Semipia)", + "en_ZW": "lea fakapÄlangi (Simipapuei)", + "eo": "lea fakaÊ»esipulanito", + "es": "lea fakasipÄ“nisi", + "es_AR": "lea fakasipÄ“nisi (Ê»Asenitina)", + "es_BO": "lea fakasipÄ“nisi (PolÄ«via)", + "es_BR": "lea fakasipÄ“nisi (PalÄsili)", + "es_CL": "lea fakasipÄ“nisi (Sili)", + "es_CO": "lea fakasipÄ“nisi (Kolomipia)", + "es_CR": "lea fakasipÄ“nisi (Kosita Lika)", + "es_CU": "lea fakasipÄ“nisi (Kiupa)", + "es_DO": "lea fakasipÄ“nisi (Lipapilika Tominika)", + "es_EA": "lea fakasipÄ“nisi (Siuta mo Melila)", + "es_EC": "lea fakasipÄ“nisi (Ê»Ekuetoa)", + "es_ES": "lea fakasipÄ“nisi (Sipeini)", + "es_GQ": "lea fakasipÄ“nisi (Ê»Ekueta Kini)", + "es_GT": "lea fakasipÄ“nisi (Kuatamala)", + "es_HN": "lea fakasipÄ“nisi (Honitulasi)", + "es_IC": "lea fakasipÄ“nisi (Ê»Otumotu Kaneli)", + "es_MX": "lea fakasipÄ“nisi (Mekisikou)", + "es_NI": "lea fakasipÄ“nisi (Nikalakua)", + "es_PA": "lea fakasipÄ“nisi (PanamÄ)", + "es_PE": "lea fakasipÄ“nisi (PelÅ«)", + "es_PH": "lea fakasipÄ“nisi (Filipaini)", + "es_PR": "lea fakasipÄ“nisi (PuÄ“to Liko)", + "es_PY": "lea fakasipÄ“nisi (Palakuai)", + "es_SV": "lea fakasipÄ“nisi (Ê»Ele Salavatoa)", + "es_US": "lea fakasipÄ“nisi (PuleÊ»anga fakatahataha Ê»Amelika)", + "es_UY": "lea fakasipÄ“nisi (Ê»Ulukuai)", + "es_VE": "lea fakasipÄ“nisi (Venesuela)", + "et": "lea fakaÊ»esitÅnia", + "et_EE": "lea fakaÊ»esitÅnia (Ê»EsitÅnia)", + "eu": "lea fakapÄsiki", + "eu_ES": "lea fakapÄsiki (Sipeini)", + "fa": "lea fakapÄ“sia", + "fa_AF": "lea fakapÄ“sia (Ê»AfikÄnisitani)", + "fa_IR": "lea fakapÄ“sia (Ê»Ilaani)", + "ff": "lea fakafulÄ", + "ff_CM": "lea fakafulÄ (Kameluni)", + "ff_GN": "lea fakafulÄ (Kini)", + "ff_MR": "lea fakafulÄ (Maulitenia)", + "ff_SN": "lea fakafulÄ (Senekalo)", + "fi": "lea fakafinilani", + "fi_FI": "lea fakafinilani (Finilani)", + "fo": "lea fakafaloe", + "fo_DK": "lea fakafaloe (TenimaÊ»ake)", + "fo_FO": "lea fakafaloe (Ê»Otumotu Faloe)", + "fr": "lea fakafalanisÄ“", + "fr_BE": "lea fakafalanisÄ“ (Pelesiume)", + "fr_BF": "lea fakafalanisÄ“ (Pekano Faso)", + "fr_BI": "lea fakafalanisÄ“ (Puluniti)", + "fr_BJ": "lea fakafalanisÄ“ (Penini)", + "fr_BL": "lea fakafalanisÄ“ (SÄ PatÄ“lemi)", + "fr_CA": "lea fakafalanisÄ“ (KÄnata)", + "fr_CD": "lea fakafalanisÄ“ (Kongo - Kinisasa)", + "fr_CF": "lea fakafalanisÄ“ (Lipapilika Ê»Afilika Lotoloto)", + "fr_CG": "lea fakafalanisÄ“ (Kongo - Palasavila)", + "fr_CH": "lea fakafalanisÄ“ (Suisilani)", + "fr_CI": "lea fakafalanisÄ“ (Matafonua Ê»AivolÄ«)", + "fr_CM": "lea fakafalanisÄ“ (Kameluni)", + "fr_DJ": "lea fakafalanisÄ“ (Siputi)", + "fr_DZ": "lea fakafalanisÄ“ (Ê»Aisilia)", + "fr_FR": "lea fakafalanisÄ“ (FalanisÄ“)", + "fr_GA": "lea fakafalanisÄ“ (Kaponi)", + "fr_GF": "lea fakafalanisÄ“ (Kuiana fakafalanisÄ“)", + "fr_GN": "lea fakafalanisÄ“ (Kini)", + "fr_GP": "lea fakafalanisÄ“ (Kuatalupe)", + "fr_GQ": "lea fakafalanisÄ“ (Ê»Ekueta Kini)", + "fr_HT": "lea fakafalanisÄ“ (Haiti)", + "fr_KM": "lea fakafalanisÄ“ (Komolosi)", + "fr_LU": "lea fakafalanisÄ“ (Lakisimipeki)", + "fr_MA": "lea fakafalanisÄ“ (Moloko)", + "fr_MC": "lea fakafalanisÄ“ (Monako)", + "fr_MF": "lea fakafalanisÄ“ (SÄ MÄtini (fakafalanisÄ“))", + "fr_MG": "lea fakafalanisÄ“ (Matakasika)", + "fr_ML": "lea fakafalanisÄ“ (MÄli)", + "fr_MQ": "lea fakafalanisÄ“ (MÄteniki)", + "fr_MR": "lea fakafalanisÄ“ (Maulitenia)", + "fr_MU": "lea fakafalanisÄ“ (Maulitiusi)", + "fr_NC": "lea fakafalanisÄ“ (Niu KaletÅnia)", + "fr_NE": "lea fakafalanisÄ“ (Nisia)", + "fr_PF": "lea fakafalanisÄ“ (Polinisia fakafalanisÄ“)", + "fr_PM": "lea fakafalanisÄ“ (SÄ Piea mo Mikeloni)", + "fr_RE": "lea fakafalanisÄ“ (LÄ“unioni)", + "fr_RW": "lea fakafalanisÄ“ (LuanitÄ)", + "fr_SC": "lea fakafalanisÄ“ (Ê»Otumotu Seiseli)", + "fr_SN": "lea fakafalanisÄ“ (Senekalo)", + "fr_SY": "lea fakafalanisÄ“ (SÄ«lia)", + "fr_TD": "lea fakafalanisÄ“ (SÄti)", + "fr_TG": "lea fakafalanisÄ“ (Toko)", + "fr_TN": "lea fakafalanisÄ“ (TunÄ«sia)", + "fr_VU": "lea fakafalanisÄ“ (Vanuatu)", + "fr_WF": "lea fakafalanisÄ“ (Ê»Uvea mo Futuna)", + "fr_YT": "lea fakafalanisÄ“ (Maiote)", + "fy": "lea fakafilisia-hihifo", + "fy_NL": "lea fakafilisia-hihifo (HÅlani)", + "ga": "lea fakaÊ»aelani", + "ga_IE": "lea fakaÊ»aelani (Ê»Aealani)", + "gd": "lea fakakaeliki", + "gd_GB": "lea fakakaeliki (PilitÄnia)", + "gl": "lea fakakalisia", + "gl_ES": "lea fakakalisia (Sipeini)", + "gu": "lea fakakutalati", + "gu_IN": "lea fakakutalati (Ê»Initia)", + "gv": "lea fakamangikÄ«", + "gv_IM": "lea fakamangikÄ« (Motu Mani)", + "ha": "lea fakahausa", + "ha_GH": "lea fakahausa (Kana)", + "ha_NE": "lea fakahausa (Nisia)", + "ha_NG": "lea fakahausa (Naisilia)", + "he": "lea fakahepelÅ«", + "he_IL": "lea fakahepelÅ« (Ê»Isileli)", + "hi": "lea fakahinitÄ«", + "hi_IN": "lea fakahinitÄ« (Ê»Initia)", + "hr": "lea fakakuloisia", + "hr_BA": "lea fakakuloisia (Posinia mo HesikÅvina)", + "hr_HR": "lea fakakuloisia (Kuloisia)", + "hu": "lea fakahungakalia", + "hu_HU": "lea fakahungakalia (Hungakalia)", + "hy": "lea fakaÊ»Ämenia", + "hy_AM": "lea fakaÊ»Ämenia (ʻĀmenia)", + "id": "lea fakaÊ»initÅnesia", + "id_ID": "lea fakaÊ»initÅnesia (Ê»InitonÄ“sia)", + "ig": "lea fakaÊ»ikipÅ", + "ig_NG": "lea fakaÊ»ikipÅ (Naisilia)", + "ii": "lea fakasisiuani-Ä«", + "ii_CN": "lea fakasisiuani-Ä« (Siaina)", + "is": "lea fakaÊ»aisilani", + "is_IS": "lea fakaÊ»aisilani (Ê»Aisilani)", + "it": "lea fakaʻītali", + "it_CH": "lea fakaʻītali (Suisilani)", + "it_IT": "lea fakaʻītali (ʻĪtali)", + "it_SM": "lea fakaʻītali (SÄ Malino)", + "ja": "lea fakasiapani", + "ja_JP": "lea fakasiapani (Siapani)", + "ka": "lea fakaseÅsia", + "ka_GE": "lea fakaseÅsia (SeÅsia)", + "ki": "lea fakakikuiu", + "ki_KE": "lea fakakikuiu (KeniÄ)", + "kk": "lea fakakasaki", + "kk_KZ": "lea fakakasaki (Kasakitani)", + "kl": "lea fakakalaÊ»alisuti", + "kl_GL": "lea fakakalaÊ»alisuti (Kulinilani)", + "km": "lea fakakamipÅtia", + "km_KH": "lea fakakamipÅtia (KamipÅtia)", + "kn": "lea fakakanata", + "kn_IN": "lea fakakanata (Ê»Initia)", + "ko": "lea fakakÅlea", + "ko_KP": "lea fakakÅlea (KÅlea tokelau)", + "ko_KR": "lea fakakÅlea (KÅlea tonga)", + "ks": "lea fakakÄsimila", + "ks_IN": "lea fakakÄsimila (Ê»Initia)", + "kw": "lea fakakoniuali", + "kw_GB": "lea fakakoniuali (PilitÄnia)", + "ky": "lea fakakÄ«sisi", + "ky_KG": "lea fakakÄ«sisi (KÄ«kisitani)", + "lb": "lea fakalakisimipeki", + "lb_LU": "lea fakalakisimipeki (Lakisimipeki)", + "lg": "lea fakakanita", + "lg_UG": "lea fakakanita (Ê»IukanitÄ)", + "ln": "lea lingikala", + "ln_AO": "lea lingikala (Ê»Angikola)", + "ln_CD": "lea lingikala (Kongo - Kinisasa)", + "ln_CF": "lea lingikala (Lipapilika Ê»Afilika Lotoloto)", + "ln_CG": "lea lingikala (Kongo - Palasavila)", + "lo": "lea fakalau", + "lo_LA": "lea fakalau (Lau)", + "lt": "lea fakalituania", + "lt_LT": "lea fakalituania (Lituania)", + "lu": "lea fakalupa-katanga", + "lu_CD": "lea fakalupa-katanga (Kongo - Kinisasa)", + "lv": "lea fakalativia", + "lv_LV": "lea fakalativia (Lativia)", + "mg": "lea fakamalakasi", + "mg_MG": "lea fakamalakasi (Matakasika)", + "mk": "lea fakamasitÅnia", + "mk_MK": "lea fakamasitÅnia (MasetÅnia)", + "ml": "lea fakaÊ»initia-malÄialami", + "ml_IN": "lea fakaÊ»initia-malÄialami (Ê»Initia)", + "mn": "lea fakamongokÅlia", + "mn_MN": "lea fakamongokÅlia (MongokÅlia)", + "mr": "lea fakamalati", + "mr_IN": "lea fakamalati (Ê»Initia)", + "ms": "lea fakamalei", + "ms_BN": "lea fakamalei (Pulunei)", + "ms_MY": "lea fakamalei (MalÄ“sia)", + "ms_SG": "lea fakamalei (Singapoa)", + "mt": "lea fakamalita", + "mt_MT": "lea fakamalita (Malita)", + "my": "lea fakapema", + "my_MM": "lea fakapema (Pema)", + "nb": "lea fakanouaÄ“-pokimali", + "nb_NO": "lea fakanouaÄ“-pokimali (NoauÄ“)", + "nb_SJ": "lea fakanouaÄ“-pokimali (SivolopÄti mo Sani Maieni)", + "nd": "lea fakanetepele-tokelau", + "nd_ZW": "lea fakanetepele-tokelau (Simipapuei)", + "ne": "lea fakanepali", + "ne_IN": "lea fakanepali (Ê»Initia)", + "ne_NP": "lea fakanepali (Nepali)", + "nl": "lea fakahÅlani", + "nl_AW": "lea fakahÅlani (Ê»Alupa)", + "nl_BE": "lea fakahÅlani (Pelesiume)", + "nl_BQ": "lea fakahÅlani (Kalipiane fakahÅlani)", + "nl_CW": "lea fakahÅlani (Kulasao)", + "nl_NL": "lea fakahÅlani (HÅlani)", + "nl_SR": "lea fakahÅlani (Suliname)", + "nl_SX": "lea fakahÅlani (SÄ MÄtini (fakahÅlani))", + "nn": "lea fakanoauÄ“-ninosiki", + "nn_NO": "lea fakanoauÄ“-ninosiki (NoauÄ“)", + "no": "lea fakanouaÄ“", + "no_NO": "lea fakanouaÄ“ (NoauÄ“)", + "om": "lea fakaÊ»olomo", + "om_ET": "lea fakaÊ»olomo (ʻĪtiÅpia)", + "om_KE": "lea fakaÊ»olomo (KeniÄ)", + "or": "lea faka-Ê»otia", + "or_IN": "lea faka-Ê»otia (Ê»Initia)", + "os": "lea fakaÊ»osetiki", + "os_GE": "lea fakaÊ»osetiki (SeÅsia)", + "os_RU": "lea fakaÊ»osetiki (LÅ«sia)", + "pa": "lea fakapÅ«nusapi", + "pa_Arab": "lea fakapÅ«nusapi (tohinima fakaÊ»alepea)", + "pa_Arab_PK": "lea fakapÅ«nusapi (tohinima fakaÊ»alepea, PÄkisitani)", + "pa_Guru": "lea fakapÅ«nusapi (tohinima fakakÅ«muki)", + "pa_Guru_IN": "lea fakapÅ«nusapi (tohinima fakakÅ«muki, Ê»Initia)", + "pa_IN": "lea fakapÅ«nusapi (Ê»Initia)", + "pa_PK": "lea fakapÅ«nusapi (PÄkisitani)", + "pl": "lea fakapolani", + "pl_PL": "lea fakapolani (Polani)", + "ps": "lea fakapasitÅ", + "ps_AF": "lea fakapasitÅ (Ê»AfikÄnisitani)", + "pt": "lea fakapotukali", + "pt_AO": "lea fakapotukali (Ê»Angikola)", + "pt_BR": "lea fakapotukali (PalÄsili)", + "pt_CH": "lea fakapotukali (Suisilani)", + "pt_CV": "lea fakapotukali (MuiÊ»i VÄ“te)", + "pt_GQ": "lea fakapotukali (Ê»Ekueta Kini)", + "pt_GW": "lea fakapotukali (Kini-Pisau)", + "pt_LU": "lea fakapotukali (Lakisimipeki)", + "pt_MO": "lea fakapotukali (Makau SAR Siaina)", + "pt_MZ": "lea fakapotukali (MosÄ“mipiki)", + "pt_PT": "lea fakapotukali (Potukali)", + "pt_ST": "lea fakapotukali (Sao TomÄ“ mo Pilinisipe)", + "pt_TL": "lea fakapotukali (Timoa hahake)", + "qu": "lea fakakuetisa", + "qu_BO": "lea fakakuetisa (PolÄ«via)", + "qu_EC": "lea fakakuetisa (Ê»Ekuetoa)", + "qu_PE": "lea fakakuetisa (PelÅ«)", + "rm": "lea fakalaito-lomÄ“nia", + "rm_CH": "lea fakalaito-lomÄ“nia (Suisilani)", + "rn": "lea fakaluaniti", + "rn_BI": "lea fakaluaniti (Puluniti)", + "ro": "lea fakalÅmenia", + "ro_MD": "lea fakalÅmenia (Molotova)", + "ro_RO": "lea fakalÅmenia (LomÄ“nia)", + "ru": "lea fakalÅ«sia", + "ru_BY": "lea fakalÅ«sia (Pelalusi)", + "ru_KG": "lea fakalÅ«sia (KÄ«kisitani)", + "ru_KZ": "lea fakalÅ«sia (Kasakitani)", + "ru_MD": "lea fakalÅ«sia (Molotova)", + "ru_RU": "lea fakalÅ«sia (LÅ«sia)", + "ru_UA": "lea fakalÅ«sia (ʻŪkalaÊ»ine)", + "rw": "lea fakakiniÄuanita", + "rw_RW": "lea fakakiniÄuanita (LuanitÄ)", + "se": "lea fakasami-tokelau", + "se_FI": "lea fakasami-tokelau (Finilani)", + "se_NO": "lea fakasami-tokelau (NoauÄ“)", + "se_SE": "lea fakasami-tokelau (SuÄ“teni)", + "sg": "lea fakasangikÅ", + "sg_CF": "lea fakasangikÅ (Lipapilika Ê»Afilika Lotoloto)", + "sh": "lea fakakuloisia-sÄ“pia", + "sh_BA": "lea fakakuloisia-sÄ“pia (Posinia mo HesikÅvina)", + "si": "lea fakasingihala", + "si_LK": "lea fakasingihala (SÄ«langikÄ)", + "sk": "lea fakasolÄvaki", + "sk_SK": "lea fakasolÄvaki (SilÅvakia)", + "sl": "lea fakasolovenia", + "sl_SI": "lea fakasolovenia (SilÅvenia)", + "sn": "lea fakasiona", + "sn_ZW": "lea fakasiona (Simipapuei)", + "so": "lea fakasomali", + "so_DJ": "lea fakasomali (Siputi)", + "so_ET": "lea fakasomali (ʻĪtiÅpia)", + "so_KE": "lea fakasomali (KeniÄ)", + "so_SO": "lea fakasomali (SÅmalia)", + "sq": "lea fakaÊ»alapÄ“nia", + "sq_AL": "lea fakaÊ»alapÄ“nia (Ê»Alipania)", + "sq_MK": "lea fakaÊ»alapÄ“nia (MasetÅnia)", + "sq_XK": "lea fakaÊ»alapÄ“nia (KÅsovo)", + "sr": "lea fakasÄ“pia", + "sr_BA": "lea fakasÄ“pia (Posinia mo HesikÅvina)", + "sr_Cyrl": "lea fakasÄ“pia (tohinima fakalÅ«sia)", + "sr_Cyrl_BA": "lea fakasÄ“pia (tohinima fakalÅ«sia, Posinia mo HesikÅvina)", + "sr_Cyrl_ME": "lea fakasÄ“pia (tohinima fakalÅ«sia, Monitenikalo)", + "sr_Cyrl_RS": "lea fakasÄ“pia (tohinima fakalÅ«sia, SÄ“pia)", + "sr_Cyrl_XK": "lea fakasÄ“pia (tohinima fakalÅ«sia, KÅsovo)", + "sr_Latn": "lea fakasÄ“pia (tohinima fakalatina)", + "sr_Latn_BA": "lea fakasÄ“pia (tohinima fakalatina, Posinia mo HesikÅvina)", + "sr_Latn_ME": "lea fakasÄ“pia (tohinima fakalatina, Monitenikalo)", + "sr_Latn_RS": "lea fakasÄ“pia (tohinima fakalatina, SÄ“pia)", + "sr_Latn_XK": "lea fakasÄ“pia (tohinima fakalatina, KÅsovo)", + "sr_ME": "lea fakasÄ“pia (Monitenikalo)", + "sr_RS": "lea fakasÄ“pia (SÄ“pia)", + "sr_XK": "lea fakasÄ“pia (KÅsovo)", + "sv": "lea fakasuÄ“teni", + "sv_AX": "lea fakasuÄ“teni (Ê»Otumotu Ê»Alani)", + "sv_FI": "lea fakasuÄ“teni (Finilani)", + "sv_SE": "lea fakasuÄ“teni (SuÄ“teni)", + "sw": "lea fakasuahili", + "sw_CD": "lea fakasuahili (Kongo - Kinisasa)", + "sw_KE": "lea fakasuahili (KeniÄ)", + "sw_TZ": "lea fakasuahili (TenisÄnia)", + "sw_UG": "lea fakasuahili (Ê»IukanitÄ)", + "ta": "lea fakatamili", + "ta_IN": "lea fakatamili (Ê»Initia)", + "ta_LK": "lea fakatamili (SÄ«langikÄ)", + "ta_MY": "lea fakatamili (MalÄ“sia)", + "ta_SG": "lea fakatamili (Singapoa)", + "te": "lea fakaÊ»initia-teluku", + "te_IN": "lea fakaÊ»initia-teluku (Ê»Initia)", + "th": "lea fakatailani", + "th_TH": "lea fakatailani (Tailani)", + "ti": "lea fakatikilinia", + "ti_ER": "lea fakatikilinia (Ê»Elitulia)", + "ti_ET": "lea fakatikilinia (ʻĪtiÅpia)", + "tl": "lea fakatakÄloka", + "tl_PH": "lea fakatakÄloka (Filipaini)", + "to": "lea fakatonga", + "to_TO": "lea fakatonga (Tonga)", + "tr": "lea fakatoake", + "tr_CY": "lea fakatoake (Saipalesi)", + "tr_TR": "lea fakatoake (Toake)", + "ug": "lea fakaÊ»uikÅ«li", + "ug_CN": "lea fakaÊ»uikÅ«li (Siaina)", + "uk": "lea fakaʻūkalaÊ»ine", + "uk_UA": "lea fakaʻūkalaÊ»ine (ʻŪkalaÊ»ine)", + "ur": "lea fakaʻūtÅ«", + "ur_IN": "lea fakaʻūtÅ« (Ê»Initia)", + "ur_PK": "lea fakaʻūtÅ« (PÄkisitani)", + "uz": "lea fakaÊ»usipeki", + "uz_AF": "lea fakaÊ»usipeki (Ê»AfikÄnisitani)", + "uz_Arab": "lea fakaÊ»usipeki (tohinima fakaÊ»alepea)", + "uz_Arab_AF": "lea fakaÊ»usipeki (tohinima fakaÊ»alepea, Ê»AfikÄnisitani)", + "uz_Cyrl": "lea fakaÊ»usipeki (tohinima fakalÅ«sia)", + "uz_Cyrl_UZ": "lea fakaÊ»usipeki (tohinima fakalÅ«sia, Ê»Usipekitani)", + "uz_Latn": "lea fakaÊ»usipeki (tohinima fakalatina)", + "uz_Latn_UZ": "lea fakaÊ»usipeki (tohinima fakalatina, Ê»Usipekitani)", + "uz_UZ": "lea fakaÊ»usipeki (Ê»Usipekitani)", + "vi": "lea fakavietinami", + "vi_VN": "lea fakavietinami (Vietinami)", + "yi": "lea fakaÄ«tisi", + "yo": "lea fakaÊ»iÅlupa", + "yo_BJ": "lea fakaÊ»iÅlupa (Penini)", + "yo_NG": "lea fakaÊ»iÅlupa (Naisilia)", + "zh": "lea fakasiaina", + "zh_CN": "lea fakasiaina (Siaina)", + "zh_HK": "lea fakasiaina (Hongi Kongi SAR Siaina)", + "zh_Hans": "lea fakasiaina (tohinima fakasiaina-fakafaingofua)", + "zh_Hans_CN": "lea fakasiaina (tohinima fakasiaina-fakafaingofua, Siaina)", + "zh_Hans_HK": "lea fakasiaina (tohinima fakasiaina-fakafaingofua, Hongi Kongi SAR Siaina)", + "zh_Hans_MO": "lea fakasiaina (tohinima fakasiaina-fakafaingofua, Makau SAR Siaina)", + "zh_Hans_SG": "lea fakasiaina (tohinima fakasiaina-fakafaingofua, Singapoa)", + "zh_Hant": "lea fakasiaina (tohinima fakasiaina-tukufakaholo)", + "zh_Hant_HK": "lea fakasiaina (tohinima fakasiaina-tukufakaholo, Hongi Kongi SAR Siaina)", + "zh_Hant_MO": "lea fakasiaina (tohinima fakasiaina-tukufakaholo, Makau SAR Siaina)", + "zh_Hant_TW": "lea fakasiaina (tohinima fakasiaina-tukufakaholo, Taiuani)", + "zh_MO": "lea fakasiaina (Makau SAR Siaina)", + "zh_SG": "lea fakasiaina (Singapoa)", + "zh_TW": "lea fakasiaina (Taiuani)", + "zu": "lea fakasulu", + "zu_ZA": "lea fakasulu (Ê»Afilika tonga)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/tr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/tr.json new file mode 100644 index 0000000000000000000000000000000000000000..b70fa9427dba6c8d0bd52dc3893f125987785e0d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/tr.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Afrikaanca", + "af_NA": "Afrikaanca (Namibya)", + "af_ZA": "Afrikaanca (Güney Afrika)", + "ak": "Akan", + "ak_GH": "Akan (Gana)", + "am": "Amharca", + "am_ET": "Amharca (Etiyopya)", + "ar": "Arapça", + "ar_AE": "Arapça (BirleÅŸik Arap Emirlikleri)", + "ar_BH": "Arapça (Bahreyn)", + "ar_DJ": "Arapça (Cibuti)", + "ar_DZ": "Arapça (Cezayir)", + "ar_EG": "Arapça (Mısır)", + "ar_EH": "Arapça (Batı Sahra)", + "ar_ER": "Arapça (Eritre)", + "ar_IL": "Arapça (İsrail)", + "ar_IQ": "Arapça (Irak)", + "ar_JO": "Arapça (Ürdün)", + "ar_KM": "Arapça (Komorlar)", + "ar_KW": "Arapça (Kuveyt)", + "ar_LB": "Arapça (Lübnan)", + "ar_LY": "Arapça (Libya)", + "ar_MA": "Arapça (Fas)", + "ar_MR": "Arapça (Moritanya)", + "ar_OM": "Arapça (Umman)", + "ar_PS": "Arapça (Filistin Bölgeleri)", + "ar_QA": "Arapça (Katar)", + "ar_SA": "Arapça (Suudi Arabistan)", + "ar_SD": "Arapça (Sudan)", + "ar_SO": "Arapça (Somali)", + "ar_SS": "Arapça (Güney Sudan)", + "ar_SY": "Arapça (Suriye)", + "ar_TD": "Arapça (Çad)", + "ar_TN": "Arapça (Tunus)", + "ar_YE": "Arapça (Yemen)", + "as": "Assamca", + "as_IN": "Assamca (Hindistan)", + "az": "Azerice", + "az_AZ": "Azerice (Azerbaycan)", + "az_Cyrl": "Azerice (Kiril)", + "az_Cyrl_AZ": "Azerice (Kiril, Azerbaycan)", + "az_Latn": "Azerice (Latin)", + "az_Latn_AZ": "Azerice (Latin, Azerbaycan)", + "be": "Belarusça", + "be_BY": "Belarusça (Belarus)", + "bg": "Bulgarca", + "bg_BG": "Bulgarca (Bulgaristan)", + "bm": "Bambara", + "bm_ML": "Bambara (Mali)", + "bn": "Bengalce", + "bn_BD": "Bengalce (BangladeÅŸ)", + "bn_IN": "Bengalce (Hindistan)", + "bo": "Tibetçe", + "bo_CN": "Tibetçe (Çin)", + "bo_IN": "Tibetçe (Hindistan)", + "br": "Bretonca", + "br_FR": "Bretonca (Fransa)", + "bs": "BoÅŸnakça", + "bs_BA": "BoÅŸnakça (Bosna-Hersek)", + "bs_Cyrl": "BoÅŸnakça (Kiril)", + "bs_Cyrl_BA": "BoÅŸnakça (Kiril, Bosna-Hersek)", + "bs_Latn": "BoÅŸnakça (Latin)", + "bs_Latn_BA": "BoÅŸnakça (Latin, Bosna-Hersek)", + "ca": "Katalanca", + "ca_AD": "Katalanca (Andorra)", + "ca_ES": "Katalanca (İspanya)", + "ca_FR": "Katalanca (Fransa)", + "ca_IT": "Katalanca (İtalya)", + "ce": "Çeçence", + "ce_RU": "Çeçence (Rusya)", + "cs": "Çekçe", + "cs_CZ": "Çekçe (Çek Cumhuriyeti)", + "cy": "Galce", + "cy_GB": "Galce (BirleÅŸik Krallık)", + "da": "Danca", + "da_DK": "Danca (Danimarka)", + "da_GL": "Danca (Grönland)", + "de": "Almanca", + "de_AT": "Almanca (Avusturya)", + "de_BE": "Almanca (Belçika)", + "de_CH": "Almanca (İsviçre)", + "de_DE": "Almanca (Almanya)", + "de_IT": "Almanca (İtalya)", + "de_LI": "Almanca (Liechtenstein)", + "de_LU": "Almanca (Lüksemburg)", + "dz": "Dzongkha", + "dz_BT": "Dzongkha (Butan)", + "ee": "Ewe", + "ee_GH": "Ewe (Gana)", + "ee_TG": "Ewe (Togo)", + "el": "Yunanca", + "el_CY": "Yunanca (Kıbrıs)", + "el_GR": "Yunanca (Yunanistan)", + "en": "İngilizce", + "en_AG": "İngilizce (Antigua ve Barbuda)", + "en_AI": "İngilizce (Anguilla)", + "en_AS": "İngilizce (Amerikan Samoası)", + "en_AT": "İngilizce (Avusturya)", + "en_AU": "İngilizce (Avustralya)", + "en_BB": "İngilizce (Barbados)", + "en_BE": "İngilizce (Belçika)", + "en_BI": "İngilizce (Burundi)", + "en_BM": "İngilizce (Bermuda)", + "en_BS": "İngilizce (Bahamalar)", + "en_BW": "İngilizce (Botsvana)", + "en_BZ": "İngilizce (Belize)", + "en_CA": "İngilizce (Kanada)", + "en_CC": "İngilizce (Cocos (Keeling) Adaları)", + "en_CH": "İngilizce (İsviçre)", + "en_CK": "İngilizce (Cook Adaları)", + "en_CM": "İngilizce (Kamerun)", + "en_CX": "İngilizce (Christmas Adası)", + "en_CY": "İngilizce (Kıbrıs)", + "en_DE": "İngilizce (Almanya)", + "en_DG": "İngilizce (Diego Garcia)", + "en_DK": "İngilizce (Danimarka)", + "en_DM": "İngilizce (Dominika)", + "en_ER": "İngilizce (Eritre)", + "en_FI": "İngilizce (Finlandiya)", + "en_FJ": "İngilizce (Fiji)", + "en_FK": "İngilizce (Falkland Adaları)", + "en_FM": "İngilizce (Mikronezya)", + "en_GB": "İngilizce (BirleÅŸik Krallık)", + "en_GD": "İngilizce (Grenada)", + "en_GG": "İngilizce (Guernsey)", + "en_GH": "İngilizce (Gana)", + "en_GI": "İngilizce (Cebelitarık)", + "en_GM": "İngilizce (Gambiya)", + "en_GU": "İngilizce (Guam)", + "en_GY": "İngilizce (Guyana)", + "en_HK": "İngilizce (Çin Hong Kong ÖİB)", + "en_IE": "İngilizce (İrlanda)", + "en_IL": "İngilizce (İsrail)", + "en_IM": "İngilizce (Man Adası)", + "en_IN": "İngilizce (Hindistan)", + "en_IO": "İngilizce (Britanya Hint Okyanusu Toprakları)", + "en_JE": "İngilizce (Jersey)", + "en_JM": "İngilizce (Jamaika)", + "en_KE": "İngilizce (Kenya)", + "en_KI": "İngilizce (Kiribati)", + "en_KN": "İngilizce (Saint Kitts ve Nevis)", + "en_KY": "İngilizce (Cayman Adaları)", + "en_LC": "İngilizce (Saint Lucia)", + "en_LR": "İngilizce (Liberya)", + "en_LS": "İngilizce (Lesotho)", + "en_MG": "İngilizce (Madagaskar)", + "en_MH": "İngilizce (Marshall Adaları)", + "en_MO": "İngilizce (Çin Makao ÖİB)", + "en_MP": "İngilizce (Kuzey Mariana Adaları)", + "en_MS": "İngilizce (Montserrat)", + "en_MT": "İngilizce (Malta)", + "en_MU": "İngilizce (Mauritius)", + "en_MW": "İngilizce (Malavi)", + "en_MY": "İngilizce (Malezya)", + "en_NA": "İngilizce (Namibya)", + "en_NF": "İngilizce (Norfolk Adası)", + "en_NG": "İngilizce (Nijerya)", + "en_NL": "İngilizce (Hollanda)", + "en_NR": "İngilizce (Nauru)", + "en_NU": "İngilizce (Niue)", + "en_NZ": "İngilizce (Yeni Zelanda)", + "en_PG": "İngilizce (Papua Yeni Gine)", + "en_PH": "İngilizce (Filipinler)", + "en_PK": "İngilizce (Pakistan)", + "en_PN": "İngilizce (Pitcairn Adaları)", + "en_PR": "İngilizce (Porto Riko)", + "en_PW": "İngilizce (Palau)", + "en_RW": "İngilizce (Ruanda)", + "en_SB": "İngilizce (Solomon Adaları)", + "en_SC": "İngilizce (SeyÅŸeller)", + "en_SD": "İngilizce (Sudan)", + "en_SE": "İngilizce (İsveç)", + "en_SG": "İngilizce (Singapur)", + "en_SH": "İngilizce (Saint Helena)", + "en_SI": "İngilizce (Slovenya)", + "en_SL": "İngilizce (Sierra Leone)", + "en_SS": "İngilizce (Güney Sudan)", + "en_SX": "İngilizce (Sint Maarten)", + "en_SZ": "İngilizce (Svaziland)", + "en_TC": "İngilizce (Turks ve Caicos Adaları)", + "en_TK": "İngilizce (Tokelau)", + "en_TO": "İngilizce (Tonga)", + "en_TT": "İngilizce (Trinidad ve Tobago)", + "en_TV": "İngilizce (Tuvalu)", + "en_TZ": "İngilizce (Tanzanya)", + "en_UG": "İngilizce (Uganda)", + "en_UM": "İngilizce (ABD Uzak Adaları)", + "en_US": "İngilizce (Amerika BirleÅŸik Devletleri)", + "en_VC": "İngilizce (Saint Vincent ve Grenadinler)", + "en_VG": "İngilizce (Britanya Virjin Adaları)", + "en_VI": "İngilizce (ABD Virjin Adaları)", + "en_VU": "İngilizce (Vanuatu)", + "en_WS": "İngilizce (Samoa)", + "en_ZA": "İngilizce (Güney Afrika)", + "en_ZM": "İngilizce (Zambiya)", + "en_ZW": "İngilizce (Zimbabve)", + "eo": "Esperanto", + "es": "İspanyolca", + "es_AR": "İspanyolca (Arjantin)", + "es_BO": "İspanyolca (Bolivya)", + "es_BR": "İspanyolca (Brezilya)", + "es_CL": "İspanyolca (Åžili)", + "es_CO": "İspanyolca (Kolombiya)", + "es_CR": "İspanyolca (Kosta Rika)", + "es_CU": "İspanyolca (Küba)", + "es_DO": "İspanyolca (Dominik Cumhuriyeti)", + "es_EA": "İspanyolca (Septe ve Melilla)", + "es_EC": "İspanyolca (Ekvador)", + "es_ES": "İspanyolca (İspanya)", + "es_GQ": "İspanyolca (Ekvator Ginesi)", + "es_GT": "İspanyolca (Guatemala)", + "es_HN": "İspanyolca (Honduras)", + "es_IC": "İspanyolca (Kanarya Adaları)", + "es_MX": "İspanyolca (Meksika)", + "es_NI": "İspanyolca (Nikaragua)", + "es_PA": "İspanyolca (Panama)", + "es_PE": "İspanyolca (Peru)", + "es_PH": "İspanyolca (Filipinler)", + "es_PR": "İspanyolca (Porto Riko)", + "es_PY": "İspanyolca (Paraguay)", + "es_SV": "İspanyolca (El Salvador)", + "es_US": "İspanyolca (Amerika BirleÅŸik Devletleri)", + "es_UY": "İspanyolca (Uruguay)", + "es_VE": "İspanyolca (Venezuela)", + "et": "Estonca", + "et_EE": "Estonca (Estonya)", + "eu": "Baskça", + "eu_ES": "Baskça (İspanya)", + "fa": "Farsça", + "fa_AF": "Farsça (Afganistan)", + "fa_IR": "Farsça (İran)", + "ff": "Fula dili", + "ff_CM": "Fula dili (Kamerun)", + "ff_GN": "Fula dili (Gine)", + "ff_MR": "Fula dili (Moritanya)", + "ff_SN": "Fula dili (Senegal)", + "fi": "Fince", + "fi_FI": "Fince (Finlandiya)", + "fo": "Faroe Dili", + "fo_DK": "Faroe Dili (Danimarka)", + "fo_FO": "Faroe Dili (Faroe Adaları)", + "fr": "Fransızca", + "fr_BE": "Fransızca (Belçika)", + "fr_BF": "Fransızca (Burkina Faso)", + "fr_BI": "Fransızca (Burundi)", + "fr_BJ": "Fransızca (Benin)", + "fr_BL": "Fransızca (Saint Barthelemy)", + "fr_CA": "Fransızca (Kanada)", + "fr_CD": "Fransızca (Kongo - KinÅŸasa)", + "fr_CF": "Fransızca (Orta Afrika Cumhuriyeti)", + "fr_CG": "Fransızca (Kongo - Brazavil)", + "fr_CH": "Fransızca (İsviçre)", + "fr_CI": "Fransızca (FildiÅŸi Sahili)", + "fr_CM": "Fransızca (Kamerun)", + "fr_DJ": "Fransızca (Cibuti)", + "fr_DZ": "Fransızca (Cezayir)", + "fr_FR": "Fransızca (Fransa)", + "fr_GA": "Fransızca (Gabon)", + "fr_GF": "Fransızca (Fransız Guyanası)", + "fr_GN": "Fransızca (Gine)", + "fr_GP": "Fransızca (Guadalupe)", + "fr_GQ": "Fransızca (Ekvator Ginesi)", + "fr_HT": "Fransızca (Haiti)", + "fr_KM": "Fransızca (Komorlar)", + "fr_LU": "Fransızca (Lüksemburg)", + "fr_MA": "Fransızca (Fas)", + "fr_MC": "Fransızca (Monako)", + "fr_MF": "Fransızca (Saint Martin)", + "fr_MG": "Fransızca (Madagaskar)", + "fr_ML": "Fransızca (Mali)", + "fr_MQ": "Fransızca (Martinik)", + "fr_MR": "Fransızca (Moritanya)", + "fr_MU": "Fransızca (Mauritius)", + "fr_NC": "Fransızca (Yeni Kaledonya)", + "fr_NE": "Fransızca (Nijer)", + "fr_PF": "Fransızca (Fransız Polinezyası)", + "fr_PM": "Fransızca (Saint Pierre ve Miquelon)", + "fr_RE": "Fransızca (Réunion)", + "fr_RW": "Fransızca (Ruanda)", + "fr_SC": "Fransızca (SeyÅŸeller)", + "fr_SN": "Fransızca (Senegal)", + "fr_SY": "Fransızca (Suriye)", + "fr_TD": "Fransızca (Çad)", + "fr_TG": "Fransızca (Togo)", + "fr_TN": "Fransızca (Tunus)", + "fr_VU": "Fransızca (Vanuatu)", + "fr_WF": "Fransızca (Wallis ve Futuna)", + "fr_YT": "Fransızca (Mayotte)", + "fy": "Batı Frizcesi", + "fy_NL": "Batı Frizcesi (Hollanda)", + "ga": "İrlandaca", + "ga_IE": "İrlandaca (İrlanda)", + "gd": "İskoç Gaelcesi", + "gd_GB": "İskoç Gaelcesi (BirleÅŸik Krallık)", + "gl": "Galiçyaca", + "gl_ES": "Galiçyaca (İspanya)", + "gu": "Güceratça", + "gu_IN": "Güceratça (Hindistan)", + "gv": "Manks", + "gv_IM": "Manks (Man Adası)", + "ha": "Hausa dili", + "ha_GH": "Hausa dili (Gana)", + "ha_NE": "Hausa dili (Nijer)", + "ha_NG": "Hausa dili (Nijerya)", + "he": "İbranice", + "he_IL": "İbranice (İsrail)", + "hi": "Hintçe", + "hi_IN": "Hintçe (Hindistan)", + "hr": "Hırvatça", + "hr_BA": "Hırvatça (Bosna-Hersek)", + "hr_HR": "Hırvatça (Hırvatistan)", + "hu": "Macarca", + "hu_HU": "Macarca (Macaristan)", + "hy": "Ermenice", + "hy_AM": "Ermenice (Ermenistan)", + "id": "Endonezce", + "id_ID": "Endonezce (Endonezya)", + "ig": "İbo dili", + "ig_NG": "İbo dili (Nijerya)", + "ii": "Sichuan Yi", + "ii_CN": "Sichuan Yi (Çin)", + "is": "İzlandaca", + "is_IS": "İzlandaca (İzlanda)", + "it": "İtalyanca", + "it_CH": "İtalyanca (İsviçre)", + "it_IT": "İtalyanca (İtalya)", + "it_SM": "İtalyanca (San Marino)", + "ja": "Japonca", + "ja_JP": "Japonca (Japonya)", + "ka": "Gürcüce", + "ka_GE": "Gürcüce (Gürcistan)", + "ki": "Kikuyu", + "ki_KE": "Kikuyu (Kenya)", + "kk": "Kazakça", + "kk_KZ": "Kazakça (Kazakistan)", + "kl": "Grönland dili", + "kl_GL": "Grönland dili (Grönland)", + "km": "Kmerce", + "km_KH": "Kmerce (Kamboçya)", + "kn": "Kannada dili", + "kn_IN": "Kannada dili (Hindistan)", + "ko": "Korece", + "ko_KP": "Korece (Kuzey Kore)", + "ko_KR": "Korece (Güney Kore)", + "ks": "KeÅŸmir dili", + "ks_IN": "KeÅŸmir dili (Hindistan)", + "kw": "Kernevekçe", + "kw_GB": "Kernevekçe (BirleÅŸik Krallık)", + "ky": "Kırgızca", + "ky_KG": "Kırgızca (Kırgızistan)", + "lb": "Lüksemburgca", + "lb_LU": "Lüksemburgca (Lüksemburg)", + "lg": "Ganda", + "lg_UG": "Ganda (Uganda)", + "ln": "Lingala", + "ln_AO": "Lingala (Angola)", + "ln_CD": "Lingala (Kongo - KinÅŸasa)", + "ln_CF": "Lingala (Orta Afrika Cumhuriyeti)", + "ln_CG": "Lingala (Kongo - Brazavil)", + "lo": "Lao dili", + "lo_LA": "Lao dili (Laos)", + "lt": "Litvanca", + "lt_LT": "Litvanca (Litvanya)", + "lu": "Luba-Katanga", + "lu_CD": "Luba-Katanga (Kongo - KinÅŸasa)", + "lv": "Letonca", + "lv_LV": "Letonca (Letonya)", + "mg": "Malgaşça", + "mg_MG": "Malgaşça (Madagaskar)", + "mk": "Makedonca", + "mk_MK": "Makedonca (Makedonya)", + "ml": "Malayalam dili", + "ml_IN": "Malayalam dili (Hindistan)", + "mn": "MoÄŸolca", + "mn_MN": "MoÄŸolca (MoÄŸolistan)", + "mr": "Marathi", + "mr_IN": "Marathi (Hindistan)", + "ms": "Malayca", + "ms_BN": "Malayca (Brunei)", + "ms_MY": "Malayca (Malezya)", + "ms_SG": "Malayca (Singapur)", + "mt": "Maltaca", + "mt_MT": "Maltaca (Malta)", + "my": "Burmaca", + "my_MM": "Burmaca (Myanmar (Burma))", + "nb": "Norveççe BokmÃ¥l", + "nb_NO": "Norveççe BokmÃ¥l (Norveç)", + "nb_SJ": "Norveççe BokmÃ¥l (Svalbard ve Jan Mayen)", + "nd": "Kuzey Ndebele", + "nd_ZW": "Kuzey Ndebele (Zimbabve)", + "ne": "Nepalce", + "ne_IN": "Nepalce (Hindistan)", + "ne_NP": "Nepalce (Nepal)", + "nl": "Felemenkçe", + "nl_AW": "Felemenkçe (Aruba)", + "nl_BE": "Felemenkçe (Belçika)", + "nl_BQ": "Felemenkçe (Karayip Hollanda)", + "nl_CW": "Felemenkçe (Curaçao)", + "nl_NL": "Felemenkçe (Hollanda)", + "nl_SR": "Felemenkçe (Surinam)", + "nl_SX": "Felemenkçe (Sint Maarten)", + "nn": "Norveççe Nynorsk", + "nn_NO": "Norveççe Nynorsk (Norveç)", + "no": "Norveççe", + "no_NO": "Norveççe (Norveç)", + "om": "Oromo dili", + "om_ET": "Oromo dili (Etiyopya)", + "om_KE": "Oromo dili (Kenya)", + "or": "Oriya Dili", + "or_IN": "Oriya Dili (Hindistan)", + "os": "Osetçe", + "os_GE": "Osetçe (Gürcistan)", + "os_RU": "Osetçe (Rusya)", + "pa": "Pencapça", + "pa_Arab": "Pencapça (Arap)", + "pa_Arab_PK": "Pencapça (Arap, Pakistan)", + "pa_Guru": "Pencapça (Gurmukhi)", + "pa_Guru_IN": "Pencapça (Gurmukhi, Hindistan)", + "pa_IN": "Pencapça (Hindistan)", + "pa_PK": "Pencapça (Pakistan)", + "pl": "Lehçe", + "pl_PL": "Lehçe (Polonya)", + "ps": "PeÅŸtuca", + "ps_AF": "PeÅŸtuca (Afganistan)", + "pt": "Portekizce", + "pt_AO": "Portekizce (Angola)", + "pt_BR": "Portekizce (Brezilya)", + "pt_CH": "Portekizce (İsviçre)", + "pt_CV": "Portekizce (Cape Verde)", + "pt_GQ": "Portekizce (Ekvator Ginesi)", + "pt_GW": "Portekizce (Gine-Bissau)", + "pt_LU": "Portekizce (Lüksemburg)", + "pt_MO": "Portekizce (Çin Makao ÖİB)", + "pt_MZ": "Portekizce (Mozambik)", + "pt_PT": "Portekizce (Portekiz)", + "pt_ST": "Portekizce (São Tomé ve Príncipe)", + "pt_TL": "Portekizce (Timor-Leste)", + "qu": "Keçuva dili", + "qu_BO": "Keçuva dili (Bolivya)", + "qu_EC": "Keçuva dili (Ekvador)", + "qu_PE": "Keçuva dili (Peru)", + "rm": "Romanşça", + "rm_CH": "Romanşça (İsviçre)", + "rn": "Kirundi", + "rn_BI": "Kirundi (Burundi)", + "ro": "Rumence", + "ro_MD": "Rumence (Moldova)", + "ro_RO": "Rumence (Romanya)", + "ru": "Rusça", + "ru_BY": "Rusça (Belarus)", + "ru_KG": "Rusça (Kırgızistan)", + "ru_KZ": "Rusça (Kazakistan)", + "ru_MD": "Rusça (Moldova)", + "ru_RU": "Rusça (Rusya)", + "ru_UA": "Rusça (Ukrayna)", + "rw": "Kinyarwanda", + "rw_RW": "Kinyarwanda (Ruanda)", + "se": "Kuzey Laponcası", + "se_FI": "Kuzey Laponcası (Finlandiya)", + "se_NO": "Kuzey Laponcası (Norveç)", + "se_SE": "Kuzey Laponcası (İsveç)", + "sg": "Sango", + "sg_CF": "Sango (Orta Afrika Cumhuriyeti)", + "sh": "Sırp-Hırvat Dili", + "sh_BA": "Sırp-Hırvat Dili (Bosna-Hersek)", + "si": "Seylanca", + "si_LK": "Seylanca (Sri Lanka)", + "sk": "Slovakça", + "sk_SK": "Slovakça (Slovakya)", + "sl": "Slovence", + "sl_SI": "Slovence (Slovenya)", + "sn": "Shona", + "sn_ZW": "Shona (Zimbabve)", + "so": "Somalice", + "so_DJ": "Somalice (Cibuti)", + "so_ET": "Somalice (Etiyopya)", + "so_KE": "Somalice (Kenya)", + "so_SO": "Somalice (Somali)", + "sq": "Arnavutça", + "sq_AL": "Arnavutça (Arnavutluk)", + "sq_MK": "Arnavutça (Makedonya)", + "sq_XK": "Arnavutça (Kosova)", + "sr": "Sırpça", + "sr_BA": "Sırpça (Bosna-Hersek)", + "sr_Cyrl": "Sırpça (Kiril)", + "sr_Cyrl_BA": "Sırpça (Kiril, Bosna-Hersek)", + "sr_Cyrl_ME": "Sırpça (Kiril, KaradaÄŸ)", + "sr_Cyrl_RS": "Sırpça (Kiril, Sırbistan)", + "sr_Cyrl_XK": "Sırpça (Kiril, Kosova)", + "sr_Latn": "Sırpça (Latin)", + "sr_Latn_BA": "Sırpça (Latin, Bosna-Hersek)", + "sr_Latn_ME": "Sırpça (Latin, KaradaÄŸ)", + "sr_Latn_RS": "Sırpça (Latin, Sırbistan)", + "sr_Latn_XK": "Sırpça (Latin, Kosova)", + "sr_ME": "Sırpça (KaradaÄŸ)", + "sr_RS": "Sırpça (Sırbistan)", + "sr_XK": "Sırpça (Kosova)", + "sv": "İsveççe", + "sv_AX": "İsveççe (Ã…land Adaları)", + "sv_FI": "İsveççe (Finlandiya)", + "sv_SE": "İsveççe (İsveç)", + "sw": "Svahili", + "sw_CD": "Svahili (Kongo - KinÅŸasa)", + "sw_KE": "Svahili (Kenya)", + "sw_TZ": "Svahili (Tanzanya)", + "sw_UG": "Svahili (Uganda)", + "ta": "Tamilce", + "ta_IN": "Tamilce (Hindistan)", + "ta_LK": "Tamilce (Sri Lanka)", + "ta_MY": "Tamilce (Malezya)", + "ta_SG": "Tamilce (Singapur)", + "te": "Telugu dili", + "te_IN": "Telugu dili (Hindistan)", + "th": "Tayca", + "th_TH": "Tayca (Tayland)", + "ti": "Tigrinya", + "ti_ER": "Tigrinya (Eritre)", + "ti_ET": "Tigrinya (Etiyopya)", + "tl": "Tagalogca", + "tl_PH": "Tagalogca (Filipinler)", + "to": "Tonga dili", + "to_TO": "Tonga dili (Tonga)", + "tr": "Türkçe", + "tr_CY": "Türkçe (Kıbrıs)", + "tr_TR": "Türkçe (Türkiye)", + "ug": "Uygurca", + "ug_CN": "Uygurca (Çin)", + "uk": "Ukraynaca", + "uk_UA": "Ukraynaca (Ukrayna)", + "ur": "Urduca", + "ur_IN": "Urduca (Hindistan)", + "ur_PK": "Urduca (Pakistan)", + "uz": "Özbekçe", + "uz_AF": "Özbekçe (Afganistan)", + "uz_Arab": "Özbekçe (Arap)", + "uz_Arab_AF": "Özbekçe (Arap, Afganistan)", + "uz_Cyrl": "Özbekçe (Kiril)", + "uz_Cyrl_UZ": "Özbekçe (Kiril, Özbekistan)", + "uz_Latn": "Özbekçe (Latin)", + "uz_Latn_UZ": "Özbekçe (Latin, Özbekistan)", + "uz_UZ": "Özbekçe (Özbekistan)", + "vi": "Vietnamca", + "vi_VN": "Vietnamca (Vietnam)", + "yi": "YidiÅŸ", + "yo": "Yorubaca", + "yo_BJ": "Yorubaca (Benin)", + "yo_NG": "Yorubaca (Nijerya)", + "zh": "Çince", + "zh_CN": "Çince (Çin)", + "zh_HK": "Çince (Çin Hong Kong ÖİB)", + "zh_Hans": "Çince (BasitleÅŸtirilmiÅŸ)", + "zh_Hans_CN": "Çince (BasitleÅŸtirilmiÅŸ, Çin)", + "zh_Hans_HK": "Çince (BasitleÅŸtirilmiÅŸ, Çin Hong Kong ÖİB)", + "zh_Hans_MO": "Çince (BasitleÅŸtirilmiÅŸ, Çin Makao ÖİB)", + "zh_Hans_SG": "Çince (BasitleÅŸtirilmiÅŸ, Singapur)", + "zh_Hant": "Çince (Geleneksel)", + "zh_Hant_HK": "Çince (Geleneksel, Çin Hong Kong ÖİB)", + "zh_Hant_MO": "Çince (Geleneksel, Çin Makao ÖİB)", + "zh_Hant_TW": "Çince (Geleneksel, Tayvan)", + "zh_MO": "Çince (Çin Makao ÖİB)", + "zh_SG": "Çince (Singapur)", + "zh_TW": "Çince (Tayvan)", + "zu": "Zuluca", + "zu_ZA": "Zuluca (Güney Afrika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ug.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ug.json new file mode 100644 index 0000000000000000000000000000000000000000..41c8248f6f93e94254a477a480e61d826169fbbb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ug.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Ø¦Ø§ÙØ±Ù‰ÙƒØ§Ù†Ú†Û•", + "af_NA": "Ø¦Ø§ÙØ±Ù‰ÙƒØ§Ù†Ú†Û• (نامىبىيە)", + "af_ZA": "Ø¦Ø§ÙØ±Ù‰ÙƒØ§Ù†Ú†Û• (جەنۇبىي Ø¦Ø§ÙØ±Ù‰Ù‚ا)", + "ak": "ئاكانچە", + "ak_GH": "ئاكانچە (گانا)", + "am": "ئامھارچە", + "am_ET": "ئامھارچە (ئÛÙىيوپىيە)", + "ar": "ئەرەبچە", + "ar_AE": "ئەرەبچە (ئەرەب بىرلەشمە خەلىپىلىكى)", + "ar_BH": "ئەرەبچە (بەھرەين)", + "ar_DJ": "ئەرەبچە (جىبۇتى)", + "ar_DZ": "ئەرەبچە (ئالجىرىيە)", + "ar_EG": "ئەرەبچە (مىسىر)", + "ar_EH": "ئەرەبچە (غەربىي ساخارا)", + "ar_ER": "ئەرەبچە (Ø¦ÛØ±Ù‰ØªØ±Ù‰ÙŠÛ•)", + "ar_IL": "ئەرەبچە (ئىسرائىلىيە)", + "ar_IQ": "ئەرەبچە (ئىراق)", + "ar_JO": "ئەرەبچە (ئىيوردانىيە)", + "ar_KM": "ئەرەبچە (كومورو)", + "ar_KW": "ئەرەبچە (كۇۋەيت)", + "ar_LB": "ئەرەبچە (لىۋان)", + "ar_LY": "ئەرەبچە (لىۋىيە)", + "ar_MA": "ئەرەبچە (ماراكەش)", + "ar_MR": "ئەرەبچە (ماۋرىتانىيە)", + "ar_OM": "ئەرەبچە (ئومان)", + "ar_PS": "ئەرەبچە (پەلەستىن زÛمىنى)", + "ar_QA": "ئەرەبچە (قاتار)", + "ar_SA": "ئەرەبچە (سەئۇدىي ئەرەبىستان)", + "ar_SD": "ئەرەبچە (سۇدان)", + "ar_SO": "ئەرەبچە (سومالى)", + "ar_SS": "ئەرەبچە (جەنۇبىي سۇدان)", + "ar_SY": "ئەرەبچە (سۇرىيە)", + "ar_TD": "ئەرەبچە (چاد)", + "ar_TN": "ئەرەبچە (تۇنىس)", + "ar_YE": "ئەرەبچە (ÙŠÛ•Ù…Û•Ù†)", + "as": "ئاسامچە", + "as_IN": "ئاسامچە (ھىندىستان)", + "az": "ئەزەربەيجانچە", + "az_AZ": "ئەزەربەيجانچە (ئەزەربەيجان)", + "az_Cyrl": "ئەزەربەيجانچە (كىرىل)", + "az_Cyrl_AZ": "ئەزەربەيجانچە (كىرىل, ئەزەربەيجان)", + "az_Latn": "ئەزەربەيجانچە (لاتىنچە)", + "az_Latn_AZ": "ئەزەربەيجانچە (لاتىنچە, ئەزەربەيجان)", + "be": "بÛلارۇسچە", + "be_BY": "بÛلارۇسچە (بÛلارۇسىيە)", + "bg": "بۇلغارچە", + "bg_BG": "بۇلغارچە (بۇلغارىيە)", + "bm": "بامباراچە", + "bm_ML": "بامباراچە (مالى)", + "bn": "بÛنگالچە", + "bn_BD": "بÛنگالچە (بÛنگال)", + "bn_IN": "بÛنگالچە (ھىندىستان)", + "bo": "تىبەتچە", + "bo_CN": "تىبەتچە (جۇڭگو)", + "bo_IN": "تىبەتچە (ھىندىستان)", + "br": "Ø¨Ù‰Ø±ÛØªÙˆÙ†Ú†Û•", + "br_FR": "Ø¨Ù‰Ø±ÛØªÙˆÙ†Ú†Û• (Ùىرانسىيە)", + "bs": "بوسىنچە", + "bs_BA": "بوسىنچە (بوسىنىيە Û‹Û• Ú¯ÛØ±ØªØ³Ûگوۋىنا)", + "bs_Cyrl": "بوسىنچە (كىرىل)", + "bs_Cyrl_BA": "بوسىنچە (كىرىل, بوسىنىيە Û‹Û• Ú¯ÛØ±ØªØ³Ûگوۋىنا)", + "bs_Latn": "بوسىنچە (لاتىنچە)", + "bs_Latn_BA": "بوسىنچە (لاتىنچە, بوسىنىيە Û‹Û• Ú¯ÛØ±ØªØ³Ûگوۋىنا)", + "ca": "كاتالانچە", + "ca_AD": "كاتالانچە (ئاندوررا)", + "ca_ES": "كاتالانچە (ئىسپانىيە)", + "ca_FR": "كاتالانچە (Ùىرانسىيە)", + "ca_IT": "كاتالانچە (ئىتالىيە)", + "ce": "Ú†Ûچىنچە", + "ce_RU": "Ú†Ûچىنچە (رۇسىيە)", + "cs": "Ú†ÛØ®Ú†Û•", + "cs_CZ": "Ú†ÛØ®Ú†Û• (Ú†ÛØ® جۇمھۇرىيىتى)", + "cy": "Û‹Ûلشچە", + "cy_GB": "Û‹Ûلشچە (بىرلەشمە پادىشاھلىق)", + "da": "دانىشچە", + "da_DK": "دانىشچە (دانىيە)", + "da_GL": "دانىشچە (گىرÛنلاندىيە)", + "de": "Ú¯ÛØ±Ù…انچە", + "de_AT": "Ú¯ÛØ±Ù…انچە (ئاۋىستىرىيە)", + "de_BE": "Ú¯ÛØ±Ù…انچە (بÛلگىيە)", + "de_CH": "Ú¯ÛØ±Ù…انچە (Ø´Ù‰Û‹ÛØªØ³Ø§Ø±Ù‰ÙŠÛ•)", + "de_DE": "Ú¯ÛØ±Ù…انچە (Ú¯ÛØ±Ù…انىيە)", + "de_IT": "Ú¯ÛØ±Ù…انچە (ئىتالىيە)", + "de_LI": "Ú¯ÛØ±Ù…انچە (لىكتÛنستÛين)", + "de_LU": "Ú¯ÛØ±Ù…انچە (لىيۇكسÛمبۇرگ)", + "dz": "زوڭخاچە", + "dz_BT": "زوڭخاچە (بۇتان)", + "ee": "ئÛÛ‹ÛÚ†Û•", + "ee_GH": "ئÛÛ‹ÛÚ†Û• (گانا)", + "ee_TG": "ئÛÛ‹ÛÚ†Û• (توگو)", + "el": "گىرÛÙƒÚ†Û•", + "el_CY": "گىرÛÙƒÚ†Û• (سىپرۇس)", + "el_GR": "گىرÛÙƒÚ†Û• (Ú¯Ù‰Ø±ÛØªØ³Ù‰ÙŠÛ•)", + "en": "ئىنگلىزچە", + "en_AG": "ئىنگلىزچە (ئانتىگۇئا Û‹Û• باربۇدا)", + "en_AI": "ئىنگلىزچە (ئانگۋىللا)", + "en_AS": "ئىنگلىزچە (Ø¦Ø§Ù…ÛØ±Ù‰ÙƒØ§ ساموئا)", + "en_AT": "ئىنگلىزچە (ئاۋىستىرىيە)", + "en_AU": "ئىنگلىزچە (ئاۋسترالىيە)", + "en_BB": "ئىنگلىزچە (باربادوس)", + "en_BE": "ئىنگلىزچە (بÛلگىيە)", + "en_BI": "ئىنگلىزچە (بۇرۇندى)", + "en_BM": "ئىنگلىزچە (Ø¨ÛØ±Ù…ۇدا)", + "en_BS": "ئىنگلىزچە (باھاما)", + "en_BW": "ئىنگلىزچە (بوتسۋانا)", + "en_BZ": "ئىنگلىزچە (بÛلىز)", + "en_CA": "ئىنگلىزچە (كانادا)", + "en_CC": "ئىنگلىزچە (كوكوس (كىلىڭ) ئاراللىرى)", + "en_CH": "ئىنگلىزچە (Ø´Ù‰Û‹ÛØªØ³Ø§Ø±Ù‰ÙŠÛ•)", + "en_CK": "ئىنگلىزچە (ÙƒÛ‡Ùƒ ئاراللىرى)", + "en_CM": "ئىنگلىزچە (ÙƒØ§Ù…ÛØ±ÙˆÙ†)", + "en_CX": "ئىنگلىزچە (مىلاد ئارىلى)", + "en_CY": "ئىنگلىزچە (سىپرۇس)", + "en_DE": "ئىنگلىزچە (Ú¯ÛØ±Ù…انىيە)", + "en_DG": "ئىنگلىزچە (دÛÚ¯Ùˆ-گارشىيا)", + "en_DK": "ئىنگلىزچە (دانىيە)", + "en_DM": "ئىنگلىزچە (دومىنىكا)", + "en_ER": "ئىنگلىزچە (Ø¦ÛØ±Ù‰ØªØ±Ù‰ÙŠÛ•)", + "en_FI": "ئىنگلىزچە (Ùىنلاندىيە)", + "en_FJ": "ئىنگلىزچە (Ùىجى)", + "en_FK": "ئىنگلىزچە (ÙØ§Ù„كلاند ئاراللىرى)", + "en_FM": "ئىنگلىزچە (Ù…Ù‰ÙƒØ±ÙˆÙ†ÛØ²Ù‰ÙŠÛ•)", + "en_GB": "ئىنگلىزچە (بىرلەشمە پادىشاھلىق)", + "en_GD": "ئىنگلىزچە (گىرÛنادا)", + "en_GG": "ئىنگلىزچە (گۇرنسÛÙŠ)", + "en_GH": "ئىنگلىزچە (گانا)", + "en_GI": "ئىنگلىزچە (جەبىلتارىق)", + "en_GM": "ئىنگلىزچە (گامبىيە)", + "en_GU": "ئىنگلىزچە (گۇئام)", + "en_GY": "ئىنگلىزچە (گىۋىيانا)", + "en_HK": "ئىنگلىزچە (شياڭگاڭ ئالاھىدە مەمۇرىي رايونى (جۇڭگو))", + "en_IE": "ئىنگلىزچە (ئىرÛلاندىيە)", + "en_IL": "ئىنگلىزچە (ئىسرائىلىيە)", + "en_IM": "ئىنگلىزچە (مان ئارىلى)", + "en_IN": "ئىنگلىزچە (ھىندىستان)", + "en_IO": "ئىنگلىزچە (ئەنگلىيەگە قاراشلىق ھىندى ئوكيان ØªÛØ±Ø±Ù‰ØªÙˆØ±Ù‰ÙŠÛ•سى)", + "en_JE": "ئىنگلىزچە (Ø¬ÛØ±Ø³ÛÙŠ)", + "en_JM": "ئىنگلىزچە (يامايكا)", + "en_KE": "ئىنگلىزچە (ÙƒÛنىيە)", + "en_KI": "ئىنگلىزچە (كىرىباتى)", + "en_KN": "ئىنگلىزچە (ساينت كىتىس Û‹Û• Ù†Ûۋىس)", + "en_KY": "ئىنگلىزچە (كايمان ئاراللىرى)", + "en_LC": "ئىنگلىزچە (ساينت لۇسىيە)", + "en_LR": "ئىنگلىزچە (Ù„Ù‰Ø¨ÛØ±Ù‰ÙŠÛ•)", + "en_LS": "ئىنگلىزچە (Ù„ÛØ³ÙˆØªÙˆ)", + "en_MG": "ئىنگلىزچە (ماداغاسقار)", + "en_MH": "ئىنگلىزچە (مارشال ئاراللىرى)", + "en_MO": "ئىنگلىزچە (ئاۋمÛÙ† ئالاھىدە مەمۇرىي رايونى)", + "en_MP": "ئىنگلىزچە (شىمالىي مارىيانا ئاراللىرى)", + "en_MS": "ئىنگلىزچە (Ù…ÙˆÙ†ØªØ³ÛØ±Ø±Ø§Øª)", + "en_MT": "ئىنگلىزچە (مالتا)", + "en_MU": "ئىنگلىزچە (ماۋرىتىيۇس)", + "en_MW": "ئىنگلىزچە (مالاۋى)", + "en_MY": "ئىنگلىزچە (مالايسىيا)", + "en_NA": "ئىنگلىزچە (نامىبىيە)", + "en_NF": "ئىنگلىزچە (نورÙولك ئارىلى)", + "en_NG": "ئىنگلىزچە (Ù†Ù‰Ú¯ÛØ±Ù‰ÙŠÛ•)", + "en_NL": "ئىنگلىزچە (گوللاندىيە)", + "en_NR": "ئىنگلىزچە (ناۋرۇ)", + "en_NU": "ئىنگلىزچە (نيۇئÛ)", + "en_NZ": "ئىنگلىزچە (ÙŠÛÚ­Ù‰ زÛلاندىيە)", + "en_PG": "ئىنگلىزچە (پاپۇئا ÙŠÛÚ­Ù‰ گىۋىنىيەسى)", + "en_PH": "ئىنگلىزچە (Ùىلىپپىن)", + "en_PK": "ئىنگلىزچە (پاكىستان)", + "en_PN": "ئىنگلىزچە (پىتكايرن ئاراللىرى)", + "en_PR": "ئىنگلىزچە (Ù¾Û‡Ø¦ÛØ±ØªÙˆ رىكو)", + "en_PW": "ئىنگلىزچە (پالائۇ)", + "en_RW": "ئىنگلىزچە (رىۋاندا)", + "en_SB": "ئىنگلىزچە (سولومون ئاراللىرى)", + "en_SC": "ئىنگلىزچە (سÛيشÛÙ„)", + "en_SD": "ئىنگلىزچە (سۇدان)", + "en_SE": "ئىنگلىزچە (Ø´Ù‰Û‹ÛØªØ³Ù‰ÙŠÛ•)", + "en_SG": "ئىنگلىزچە (سىنگاپور)", + "en_SH": "ئىنگلىزچە (ساينىت Ú¾ÛÙ„Ûنا)", + "en_SI": "ئىنگلىزچە (سىلوۋÛنىيە)", + "en_SL": "ئىنگلىزچە (Ø³ÛØ±Ø±Ø§Ù„ÛØ¦ÙˆÙ†)", + "en_SS": "ئىنگلىزچە (جەنۇبىي سۇدان)", + "en_SX": "ئىنگلىزچە (سىنت مارتÛÙ†)", + "en_SZ": "ئىنگلىزچە (Ø³Ù‰Û‹ÛØ²Ù‰Ù„اند)", + "en_TC": "ئىنگلىزچە (تۇركس Û‹Û• كايكوس ئاراللىرى)", + "en_TK": "ئىنگلىزچە (توكÛلاۋ)", + "en_TO": "ئىنگلىزچە (تونگا)", + "en_TT": "ئىنگلىزچە (تىرىنىداد Û‹Û• توباگو)", + "en_TV": "ئىنگلىزچە (تۇۋالۇ)", + "en_TZ": "ئىنگلىزچە (تانزانىيە)", + "en_UG": "ئىنگلىزچە (ئۇگاندا)", + "en_UM": "ئىنگلىزچە (ئا Ù‚ Ø´ تاشقى ئاراللىرى)", + "en_US": "ئىنگلىزچە (Ø¦Ø§Ù…ÛØ±Ù‰ÙƒØ§ قوشما ئىشتاتلىرى)", + "en_VC": "ئىنگلىزچە (ساينت ۋىنسÛنت Û‹Û• گىرÛÙ†Ø§Ø¯Ù‰Ù†ÛØ³)", + "en_VG": "ئىنگلىزچە (ئەنگلىيە ۋىرگىن ئاراللىرى)", + "en_VI": "ئىنگلىزچە (ئا Ù‚ Ø´ ۋىرگىن ئاراللىرى)", + "en_VU": "ئىنگلىزچە (ۋانۇئاتۇ)", + "en_WS": "ئىنگلىزچە (ساموئا)", + "en_ZA": "ئىنگلىزچە (جەنۇبىي Ø¦Ø§ÙØ±Ù‰Ù‚ا)", + "en_ZM": "ئىنگلىزچە (زامبىيە)", + "en_ZW": "ئىنگلىزچە (زىمبابۋÛ)", + "eo": "Ø¦ÛØ³Ù¾Ø±Ø§Ù†ØªÙˆÚ†Û•", + "es": "ئىسپانچە", + "es_AR": "ئىسپانچە (ئارگÛنتىنا)", + "es_BO": "ئىسپانچە (بولىۋىيە)", + "es_BR": "ئىسپانچە (بىرازىلىيە)", + "es_CL": "ئىسپانچە (چىلى)", + "es_CO": "ئىسپانچە (كولومبىيە)", + "es_CR": "ئىسپانچە (كوستارىكا)", + "es_CU": "ئىسپانچە (كۇبا)", + "es_DO": "ئىسپانچە (دومىنىكا جۇمھۇرىيىتى)", + "es_EA": "ئىسپانچە (سÛيتا Û‹Û• Ù…Ûلىلا)", + "es_EC": "ئىسپانچە (ئÛكۋاتور)", + "es_ES": "ئىسپانچە (ئىسپانىيە)", + "es_GQ": "ئىسپانچە (ئÛكۋاتور گىۋىنىيەسى)", + "es_GT": "ئىسپانچە (گىۋاتÛمالا)", + "es_HN": "ئىسپانچە (ھوندۇراس)", + "es_IC": "ئىسپانچە (كانارى ئاراللىرى)", + "es_MX": "ئىسپانچە (Ù…Ûكسىكا)", + "es_NI": "ئىسپانچە (نىكاراگۇئا)", + "es_PA": "ئىسپانچە (پاناما)", + "es_PE": "ئىسپانچە (Ù¾ÛØ±Û‡)", + "es_PH": "ئىسپانچە (Ùىلىپپىن)", + "es_PR": "ئىسپانچە (Ù¾Û‡Ø¦ÛØ±ØªÙˆ رىكو)", + "es_PY": "ئىسپانچە (پاراگۋاي)", + "es_SV": "ئىسپانچە (سالۋادور)", + "es_US": "ئىسپانچە (Ø¦Ø§Ù…ÛØ±Ù‰ÙƒØ§ قوشما ئىشتاتلىرى)", + "es_UY": "ئىسپانچە (ئۇرۇگۋاي)", + "es_VE": "ئىسپانچە (Û‹ÛÙ†ÛØ³Û‡Ø¦Ûلا)", + "et": "Ø¦ÛØ³ØªÙˆÙ†Ú†Û•", + "et_EE": "Ø¦ÛØ³ØªÙˆÙ†Ú†Û• (Ø¦ÛØ³ØªÙˆÙ†Ù‰ÙŠÛ•)", + "eu": "باسكىچە", + "eu_ES": "باسكىچە (ئىسپانىيە)", + "fa": "پارسچە", + "fa_AF": "پارسچە (Ø¦Ø§ÙØºØ§Ù†Ù‰Ø³ØªØ§Ù†)", + "fa_IR": "پارسچە (ئىران)", + "ff": "Ùۇلاھچە", + "ff_CM": "Ùۇلاھچە (ÙƒØ§Ù…ÛØ±ÙˆÙ†)", + "ff_GN": "Ùۇلاھچە (گىۋىنىيە)", + "ff_MR": "Ùۇلاھچە (ماۋرىتانىيە)", + "ff_SN": "Ùۇلاھچە (سÛÙ†Ûگال)", + "fi": "Ùىنچە", + "fi_FI": "Ùىنچە (Ùىنلاندىيە)", + "fo": "ÙØ§Ø¦Ûروچە", + "fo_DK": "ÙØ§Ø¦Ûروچە (دانىيە)", + "fo_FO": "ÙØ§Ø¦Ûروچە (ÙØ§Ø±Ùˆ ئاراللىرى)", + "fr": "Ùىرانسۇزچە", + "fr_BE": "Ùىرانسۇزچە (بÛلگىيە)", + "fr_BF": "Ùىرانسۇزچە (بۇركىنا ÙØ§Ø³Ùˆ)", + "fr_BI": "Ùىرانسۇزچە (بۇرۇندى)", + "fr_BJ": "Ùىرانسۇزچە (بÛنىن)", + "fr_BL": "Ùىرانسۇزچە (ساينت بارتÛÙ„Ûمى)", + "fr_CA": "Ùىرانسۇزچە (كانادا)", + "fr_CD": "Ùىرانسۇزچە (كونگو - كىنشاسا)", + "fr_CF": "Ùىرانسۇزچە (ئوتتۇرا Ø¦Ø§ÙØ±Ù‰Ù‚ا جۇمھۇرىيىتى)", + "fr_CG": "Ùىرانسۇزچە (كونگو - بىراززاۋىل)", + "fr_CH": "Ùىرانسۇزچە (Ø´Ù‰Û‹ÛØªØ³Ø§Ø±Ù‰ÙŠÛ•)", + "fr_CI": "Ùىرانسۇزچە (ÙƒÙˆØªÛ Ø¯Û Ø¦Ù‰Û‹ÙˆØ¦Ù‰Ø±)", + "fr_CM": "Ùىرانسۇزچە (ÙƒØ§Ù…ÛØ±ÙˆÙ†)", + "fr_DJ": "Ùىرانسۇزچە (جىبۇتى)", + "fr_DZ": "Ùىرانسۇزچە (ئالجىرىيە)", + "fr_FR": "Ùىرانسۇزچە (Ùىرانسىيە)", + "fr_GA": "Ùىرانسۇزچە (گابون)", + "fr_GF": "Ùىرانسۇزچە (Ùىرانسىيەگە قاراشلىق گىۋىيانا)", + "fr_GN": "Ùىرانسۇزچە (گىۋىنىيە)", + "fr_GP": "Ùىرانسۇزچە (گىۋادÛÙ„Û‡Ù¾)", + "fr_GQ": "Ùىرانسۇزچە (ئÛكۋاتور گىۋىنىيەسى)", + "fr_HT": "Ùىرانسۇزچە (ھايتى)", + "fr_KM": "Ùىرانسۇزچە (كومورو)", + "fr_LU": "Ùىرانسۇزچە (لىيۇكسÛمبۇرگ)", + "fr_MA": "Ùىرانسۇزچە (ماراكەش)", + "fr_MC": "Ùىرانسۇزچە (موناكو)", + "fr_MF": "Ùىرانسۇزچە (ساينت مارتىن)", + "fr_MG": "Ùىرانسۇزچە (ماداغاسقار)", + "fr_ML": "Ùىرانسۇزچە (مالى)", + "fr_MQ": "Ùىرانسۇزچە (مارتىنىكا)", + "fr_MR": "Ùىرانسۇزچە (ماۋرىتانىيە)", + "fr_MU": "Ùىرانسۇزچە (ماۋرىتىيۇس)", + "fr_NC": "Ùىرانسۇزچە (ÙŠÛÚ­Ù‰ ÙƒØ§Ù„ÛØ¯ÙˆÙ†Ù‰ÙŠÛ•)", + "fr_NE": "Ùىرانسۇزچە (Ù†Ù‰Ú¯ÛØ±)", + "fr_PF": "Ùىرانسۇزچە (Ùىرانسىيەگە قاراشلىق Ù¾ÙˆÙ„Ù‰Ù†ÛØ²Ù‰ÙŠÛ•)", + "fr_PM": "Ùىرانسۇزچە (ساينت Ù¾Ù‰ÙŠÛØ± Û‹Û• مىكÛلون ئاراللىرى)", + "fr_RE": "Ùىرانسۇزچە (رÛيۇنىيون)", + "fr_RW": "Ùىرانسۇزچە (رىۋاندا)", + "fr_SC": "Ùىرانسۇزچە (سÛيشÛÙ„)", + "fr_SN": "Ùىرانسۇزچە (سÛÙ†Ûگال)", + "fr_SY": "Ùىرانسۇزچە (سۇرىيە)", + "fr_TD": "Ùىرانسۇزچە (چاد)", + "fr_TG": "Ùىرانسۇزچە (توگو)", + "fr_TN": "Ùىرانسۇزچە (تۇنىس)", + "fr_VU": "Ùىرانسۇزچە (ۋانۇئاتۇ)", + "fr_WF": "Ùىرانسۇزچە (ۋاللىس Û‹Û• Ùۇتۇنا)", + "fr_YT": "Ùىرانسۇزچە (مايوتى)", + "fy": "غەربىي Ùىرسچە", + "fy_NL": "غەربىي Ùىرسچە (گوللاندىيە)", + "ga": "ئىرÛلاندچە", + "ga_IE": "ئىرÛلاندچە (ئىرÛلاندىيە)", + "gd": "شوتلاندىيە گايلچىسى", + "gd_GB": "شوتلاندىيە گايلچىسى (بىرلەشمە پادىشاھلىق)", + "gl": "گالىچە", + "gl_ES": "گالىچە (ئىسپانىيە)", + "gu": "گۇجاراتچە", + "gu_IN": "گۇجاراتچە (ھىندىستان)", + "gv": "مانچە", + "gv_IM": "مانچە (مان ئارىلى)", + "ha": "خائۇساچە", + "ha_GH": "خائۇساچە (گانا)", + "ha_NE": "خائۇساچە (Ù†Ù‰Ú¯ÛØ±)", + "ha_NG": "خائۇساچە (Ù†Ù‰Ú¯ÛØ±Ù‰ÙŠÛ•)", + "he": "ئىبرانىيچە", + "he_IL": "ئىبرانىيچە (ئىسرائىلىيە)", + "hi": "ھىندىچە", + "hi_IN": "ھىندىچە (ھىندىستان)", + "hr": "كىرودىچە", + "hr_BA": "كىرودىچە (بوسىنىيە Û‹Û• Ú¯ÛØ±ØªØ³Ûگوۋىنا)", + "hr_HR": "كىرودىچە (كىرودىيە)", + "hu": "Û‹Ûنگىرچە", + "hu_HU": "Û‹Ûنگىرچە (Û‹Ûنگىرىيە)", + "hy": "ئەرمÛÙ†Ú†Û•", + "hy_AM": "ئەرمÛÙ†Ú†Û• (ئەرمÛنىيە)", + "id": "Ú¾Ù‰Ù†Ø¯ÙˆÙ†ÛØ²Ú†Û•", + "id_ID": "Ú¾Ù‰Ù†Ø¯ÙˆÙ†ÛØ²Ú†Û• (Ú¾Ù‰Ù†Ø¯ÙˆÙ†ÛØ²Ù‰ÙŠÛ•)", + "ig": "ئىگبوچە", + "ig_NG": "ئىگبوچە (Ù†Ù‰Ú¯ÛØ±Ù‰ÙŠÛ•)", + "ii": "يىچە (سىچۈەن)", + "ii_CN": "يىچە (جۇڭگو)", + "is": "ئىسلاندچە", + "is_IS": "ئىسلاندچە (ئىسلاندىيە)", + "it": "ئىتالىيانچە", + "it_CH": "ئىتالىيانچە (Ø´Ù‰Û‹ÛØªØ³Ø§Ø±Ù‰ÙŠÛ•)", + "it_IT": "ئىتالىيانچە (ئىتالىيە)", + "it_SM": "ئىتالىيانچە (سان مارىنو)", + "ja": "ياپونچە", + "ja_JP": "ياپونچە (ياپونىيە)", + "ka": "گىرۇزچە", + "ka_GE": "گىرۇزچە (گىرۇزىيە)", + "ki": "كىكۇيۇچە", + "ki_KE": "كىكۇيۇچە (ÙƒÛنىيە)", + "kk": "قازاقچە", + "kk_KZ": "قازاقچە (قازاقىستان)", + "kl": "گىرÛنلاندچە", + "kl_GL": "گىرÛنلاندچە (گىرÛنلاندىيە)", + "km": "ÙƒÙ‰Ù…ÛØ±Ú†Û•", + "km_KH": "ÙƒÙ‰Ù…ÛØ±Ú†Û• (كامبودژا)", + "kn": "كانناداچە", + "kn_IN": "كانناداچە (ھىندىستان)", + "ko": "كورÛÙŠÛ•Ú†Û•", + "ko_KP": "كورÛÙŠÛ•Ú†Û• (چاۋشيەن)", + "ko_KR": "كورÛÙŠÛ•Ú†Û• (كورÛÙŠÛ•)", + "ks": "كەشمىرچە", + "ks_IN": "كەشمىرچە (ھىندىستان)", + "kw": "كورنىشچە", + "kw_GB": "كورنىشچە (بىرلەشمە پادىشاھلىق)", + "ky": "قىرغىزچە", + "ky_KG": "قىرغىزچە (قىرغىزىستان)", + "lb": "لىيۇكسÛمبۇرگچە", + "lb_LU": "لىيۇكسÛمبۇرگچە (لىيۇكسÛمبۇرگ)", + "lg": "گانداچە", + "lg_UG": "گانداچە (ئۇگاندا)", + "ln": "لىنگالاچە", + "ln_AO": "لىنگالاچە (ئانگولا)", + "ln_CD": "لىنگالاچە (كونگو - كىنشاسا)", + "ln_CF": "لىنگالاچە (ئوتتۇرا Ø¦Ø§ÙØ±Ù‰Ù‚ا جۇمھۇرىيىتى)", + "ln_CG": "لىنگالاچە (كونگو - بىراززاۋىل)", + "lo": "لائوسچە", + "lo_LA": "لائوسچە (لائوس)", + "lt": "لىتۋانىچە", + "lt_LT": "لىتۋانىچە (لىتۋانىيە)", + "lu": "لۇبا-كاتانگاچە", + "lu_CD": "لۇبا-كاتانگاچە (كونگو - كىنشاسا)", + "lv": "لاتچە", + "lv_LV": "لاتچە (لاتۋىيە)", + "mg": "مالاگاسچە", + "mg_MG": "مالاگاسچە (ماداغاسقار)", + "mk": "Ù…Ø§ÙƒÛØ¯ÙˆÙ†Ú†Û•", + "mk_MK": "Ù…Ø§ÙƒÛØ¯ÙˆÙ†Ú†Û• (Ù…Ø§ÙƒÛØ¯ÙˆÙ†Ù‰ÙŠÛ•)", + "ml": "مالايالامچە", + "ml_IN": "مالايالامچە (ھىندىستان)", + "mn": "موڭغۇلچە", + "mn_MN": "موڭغۇلچە (موڭغۇلىيە)", + "mr": "ماراتىچە", + "mr_IN": "ماراتىچە (ھىندىستان)", + "ms": "مالايچە", + "ms_BN": "مالايچە (بىرۇنÛÙŠ)", + "ms_MY": "مالايچە (مالايسىيا)", + "ms_SG": "مالايچە (سىنگاپور)", + "mt": "مالتاچە", + "mt_MT": "مالتاچە (مالتا)", + "my": "بىرماچە", + "my_MM": "بىرماچە (بىرما)", + "nb": "نورۋىگىيە بوكمالچە", + "nb_NO": "نورۋىگىيە بوكمالچە (نورۋÛگىيە)", + "nb_SJ": "نورۋىگىيە بوكمالچە (سىۋالبارد Û‹Û• يان مايÛÙ†)", + "nd": "شىمالى ندەبەلەچە", + "nd_ZW": "شىمالى ندەبەلەچە (زىمبابۋÛ)", + "ne": "Ù†Ûپالچە", + "ne_IN": "Ù†Ûپالچە (ھىندىستان)", + "ne_NP": "Ù†Ûپالچە (Ù†Ûپال)", + "nl": "گوللاندچە", + "nl_AW": "گوللاندچە (ئارۇبا)", + "nl_BE": "گوللاندچە (بÛلگىيە)", + "nl_BQ": "گوللاندچە (كارىب دÛڭىزى گوللاندىيە)", + "nl_CW": "گوللاندچە (كۇراچاۋ)", + "nl_NL": "گوللاندچە (گوللاندىيە)", + "nl_SR": "گوللاندچە (سۇرىنام)", + "nl_SX": "گوللاندچە (سىنت مارتÛÙ†)", + "nn": "ÙŠÛÚ­Ù‰ نورۋÛÚ¯Ú†Û•", + "nn_NO": "ÙŠÛÚ­Ù‰ نورۋÛÚ¯Ú†Û• (نورۋÛگىيە)", + "no": "نورۋÛÚ¯Ú†Û•", + "no_NO": "نورۋÛÚ¯Ú†Û• (نورۋÛگىيە)", + "om": "ئوروموچە", + "om_ET": "ئوروموچە (ئÛÙىيوپىيە)", + "om_KE": "ئوروموچە (ÙƒÛنىيە)", + "or": "ئودىياچە", + "or_IN": "ئودىياچە (ھىندىستان)", + "os": "Ø¦ÙˆØ³Ø³ÛØªÚ†Û•Ú†Û•", + "os_GE": "Ø¦ÙˆØ³Ø³ÛØªÚ†Û•Ú†Û• (گىرۇزىيە)", + "os_RU": "Ø¦ÙˆØ³Ø³ÛØªÚ†Û•Ú†Û• (رۇسىيە)", + "pa": "پەنجابچە", + "pa_Arab": "پەنجابچە (ئەرەب)", + "pa_Arab_PK": "پەنجابچە (ئەرەب, پاكىستان)", + "pa_Guru": "پەنجابچە (گۇرمۇكىچە)", + "pa_Guru_IN": "پەنجابچە (گۇرمۇكىچە, ھىندىستان)", + "pa_IN": "پەنجابچە (ھىندىستان)", + "pa_PK": "پەنجابچە (پاكىستان)", + "pl": "پولەكچە", + "pl_PL": "پولەكچە (پولشا)", + "ps": "پۇشتۇچە", + "ps_AF": "پۇشتۇچە (Ø¦Ø§ÙØºØ§Ù†Ù‰Ø³ØªØ§Ù†)", + "pt": "پورتۇگالچە", + "pt_AO": "پورتۇگالچە (ئانگولا)", + "pt_BR": "پورتۇگالچە (بىرازىلىيە)", + "pt_CH": "پورتۇگالچە (Ø´Ù‰Û‹ÛØªØ³Ø§Ø±Ù‰ÙŠÛ•)", + "pt_CV": "پورتۇگالچە (ÙŠÛØ´Ù‰Ù„ تۇمشۇق)", + "pt_GQ": "پورتۇگالچە (ئÛكۋاتور گىۋىنىيەسى)", + "pt_GW": "پورتۇگالچە (گىۋىنىيە بىسسائۇ)", + "pt_LU": "پورتۇگالچە (لىيۇكسÛمبۇرگ)", + "pt_MO": "پورتۇگالچە (ئاۋمÛÙ† ئالاھىدە مەمۇرىي رايونى)", + "pt_MZ": "پورتۇگالچە (موزامبىك)", + "pt_PT": "پورتۇگالچە (پورتۇگالىيە)", + "pt_ST": "پورتۇگالچە (سان ØªÙˆÙ…Û Û‹Û• پرىنسىپÛ)", + "pt_TL": "پورتۇگالچە (شەرقىي تىمور)", + "qu": "ÙƒÛچىۋاچە", + "qu_BO": "ÙƒÛچىۋاچە (بولىۋىيە)", + "qu_EC": "ÙƒÛچىۋاچە (ئÛكۋاتور)", + "qu_PE": "ÙƒÛچىۋاچە (Ù¾ÛØ±Û‡)", + "rm": "رومانسچە", + "rm_CH": "رومانسچە (Ø´Ù‰Û‹ÛØªØ³Ø§Ø±Ù‰ÙŠÛ•)", + "rn": "رۇندىچە", + "rn_BI": "رۇندىچە (بۇرۇندى)", + "ro": "رومىنچە", + "ro_MD": "رومىنچە (مولدوۋا)", + "ro_RO": "رومىنچە (رومىنىيە)", + "ru": "رۇسچە", + "ru_BY": "رۇسچە (بÛلارۇسىيە)", + "ru_KG": "رۇسچە (قىرغىزىستان)", + "ru_KZ": "رۇسچە (قازاقىستان)", + "ru_MD": "رۇسچە (مولدوۋا)", + "ru_RU": "رۇسچە (رۇسىيە)", + "ru_UA": "رۇسچە (ئۇكرائىنا)", + "rw": "ÙƒÛنىيەرىۋانداچە", + "rw_RW": "ÙƒÛنىيەرىۋانداچە (رىۋاندا)", + "se": "شىمالىي سامىچە", + "se_FI": "شىمالىي سامىچە (Ùىنلاندىيە)", + "se_NO": "شىمالىي سامىچە (نورۋÛگىيە)", + "se_SE": "شىمالىي سامىچە (Ø´Ù‰Û‹ÛØªØ³Ù‰ÙŠÛ•)", + "sg": "سانگوچە", + "sg_CF": "سانگوچە (ئوتتۇرا Ø¦Ø§ÙØ±Ù‰Ù‚ا جۇمھۇرىيىتى)", + "sh": "Ø³ÛØ±Ø¨-كرودىيەچە", + "sh_BA": "Ø³ÛØ±Ø¨-كرودىيەچە (بوسىنىيە Û‹Û• Ú¯ÛØ±ØªØ³Ûگوۋىنا)", + "si": "سىنگالچە", + "si_LK": "سىنگالچە (سىرىلانكا)", + "sk": "سىلوۋاكچە", + "sk_SK": "سىلوۋاكچە (سىلوۋاكىيە)", + "sl": "سىلوۋÛÙ†Ú†Û•", + "sl_SI": "سىلوۋÛÙ†Ú†Û• (سىلوۋÛنىيە)", + "sn": "شوناچە", + "sn_ZW": "شوناچە (زىمبابۋÛ)", + "so": "سومالىچە", + "so_DJ": "سومالىچە (جىبۇتى)", + "so_ET": "سومالىچە (ئÛÙىيوپىيە)", + "so_KE": "سومالىچە (ÙƒÛنىيە)", + "so_SO": "سومالىچە (سومالى)", + "sq": "ئالبانچە", + "sq_AL": "ئالبانچە (ئالبانىيە)", + "sq_MK": "ئالبانچە (Ù…Ø§ÙƒÛØ¯ÙˆÙ†Ù‰ÙŠÛ•)", + "sq_XK": "ئالبانچە (كوسوۋو)", + "sr": "Ø³ÛØ±Ø¨Ú†Û•", + "sr_BA": "Ø³ÛØ±Ø¨Ú†Û• (بوسىنىيە Û‹Û• Ú¯ÛØ±ØªØ³Ûگوۋىنا)", + "sr_Cyrl": "Ø³ÛØ±Ø¨Ú†Û• (كىرىل)", + "sr_Cyrl_BA": "Ø³ÛØ±Ø¨Ú†Û• (كىرىل, بوسىنىيە Û‹Û• Ú¯ÛØ±ØªØ³Ûگوۋىنا)", + "sr_Cyrl_ME": "Ø³ÛØ±Ø¨Ú†Û• (كىرىل, قارا تاغ)", + "sr_Cyrl_RS": "Ø³ÛØ±Ø¨Ú†Û• (كىرىل, Ø³ÛØ±Ø¨Ù‰ÙŠÛ•)", + "sr_Cyrl_XK": "Ø³ÛØ±Ø¨Ú†Û• (كىرىل, كوسوۋو)", + "sr_Latn": "Ø³ÛØ±Ø¨Ú†Û• (لاتىنچە)", + "sr_Latn_BA": "Ø³ÛØ±Ø¨Ú†Û• (لاتىنچە, بوسىنىيە Û‹Û• Ú¯ÛØ±ØªØ³Ûگوۋىنا)", + "sr_Latn_ME": "Ø³ÛØ±Ø¨Ú†Û• (لاتىنچە, قارا تاغ)", + "sr_Latn_RS": "Ø³ÛØ±Ø¨Ú†Û• (لاتىنچە, Ø³ÛØ±Ø¨Ù‰ÙŠÛ•)", + "sr_Latn_XK": "Ø³ÛØ±Ø¨Ú†Û• (لاتىنچە, كوسوۋو)", + "sr_ME": "Ø³ÛØ±Ø¨Ú†Û• (قارا تاغ)", + "sr_RS": "Ø³ÛØ±Ø¨Ú†Û• (Ø³ÛØ±Ø¨Ù‰ÙŠÛ•)", + "sr_XK": "Ø³ÛØ±Ø¨Ú†Û• (كوسوۋو)", + "sv": "Ø´Ù‰Û‹ÛØ¯Ú†Û•", + "sv_AX": "Ø´Ù‰Û‹ÛØ¯Ú†Û• (ئالاند ئاراللىرى)", + "sv_FI": "Ø´Ù‰Û‹ÛØ¯Ú†Û• (Ùىنلاندىيە)", + "sv_SE": "Ø´Ù‰Û‹ÛØ¯Ú†Û• (Ø´Ù‰Û‹ÛØªØ³Ù‰ÙŠÛ•)", + "sw": "سىۋاھىلچە", + "sw_CD": "سىۋاھىلچە (كونگو - كىنشاسا)", + "sw_KE": "سىۋاھىلچە (ÙƒÛنىيە)", + "sw_TZ": "سىۋاھىلچە (تانزانىيە)", + "sw_UG": "سىۋاھىلچە (ئۇگاندا)", + "ta": "تامىلچە", + "ta_IN": "تامىلچە (ھىندىستان)", + "ta_LK": "تامىلچە (سىرىلانكا)", + "ta_MY": "تامىلچە (مالايسىيا)", + "ta_SG": "تامىلچە (سىنگاپور)", + "te": "تÛÙ„Û‡Ú¯Û‡Ú†Û•", + "te_IN": "تÛÙ„Û‡Ú¯Û‡Ú†Û• (ھىندىستان)", + "th": "تايلاندچە", + "th_TH": "تايلاندچە (تايلاند)", + "ti": "تىگرىنياچە", + "ti_ER": "تىگرىنياچە (Ø¦ÛØ±Ù‰ØªØ±Ù‰ÙŠÛ•)", + "ti_ET": "تىگرىنياچە (ئÛÙىيوپىيە)", + "tl": "تاگالوگچە", + "tl_PH": "تاگالوگچە (Ùىلىپپىن)", + "to": "تونگانچە", + "to_TO": "تونگانچە (تونگا)", + "tr": "تۈركچە", + "tr_CY": "تۈركچە (سىپرۇس)", + "tr_TR": "تۈركچە (تۈركىيە)", + "ug": "ئۇيغۇرچە", + "ug_CN": "ئۇيغۇرچە (جۇڭگو)", + "uk": "ئۇكرائىنچە", + "uk_UA": "ئۇكرائىنچە (ئۇكرائىنا)", + "ur": "ئوردۇچە", + "ur_IN": "ئوردۇچە (ھىندىستان)", + "ur_PK": "ئوردۇچە (پاكىستان)", + "uz": "ئۆزبÛÙƒÚ†Û•", + "uz_AF": "ئۆزبÛÙƒÚ†Û• (Ø¦Ø§ÙØºØ§Ù†Ù‰Ø³ØªØ§Ù†)", + "uz_Arab": "ئۆزبÛÙƒÚ†Û• (ئەرەب)", + "uz_Arab_AF": "ئۆزبÛÙƒÚ†Û• (ئەرەب, Ø¦Ø§ÙØºØ§Ù†Ù‰Ø³ØªØ§Ù†)", + "uz_Cyrl": "ئۆزبÛÙƒÚ†Û• (كىرىل)", + "uz_Cyrl_UZ": "ئۆزبÛÙƒÚ†Û• (كىرىل, ئۆزبÛكىستان)", + "uz_Latn": "ئۆزبÛÙƒÚ†Û• (لاتىنچە)", + "uz_Latn_UZ": "ئۆزبÛÙƒÚ†Û• (لاتىنچە, ئۆزبÛكىستان)", + "uz_UZ": "ئۆزبÛÙƒÚ†Û• (ئۆزبÛكىستان)", + "vi": "Û‹Ù‰ÙŠÛØªÙ†Ø§Ù…Ú†Û•", + "vi_VN": "Û‹Ù‰ÙŠÛØªÙ†Ø§Ù…Ú†Û• (Û‹Ù‰ÙŠÛØªÙ†Ø§Ù…)", + "yi": "يىددىشچە", + "yo": "يورۇباچە", + "yo_BJ": "يورۇباچە (بÛنىن)", + "yo_NG": "يورۇباچە (Ù†Ù‰Ú¯ÛØ±Ù‰ÙŠÛ•)", + "zh": "خەنزۇچە", + "zh_CN": "خەنزۇچە (جۇڭگو)", + "zh_HK": "خەنزۇچە (شياڭگاڭ ئالاھىدە مەمۇرىي رايونى (جۇڭگو))", + "zh_Hans": "خەنزۇچە (ئاددىي خەنچە)", + "zh_Hans_CN": "خەنزۇچە (ئاددىي خەنچە, جۇڭگو)", + "zh_Hans_HK": "خەنزۇچە (ئاددىي خەنچە, شياڭگاڭ ئالاھىدە مەمۇرىي رايونى (جۇڭگو))", + "zh_Hans_MO": "خەنزۇچە (ئاددىي خەنچە, ئاۋمÛÙ† ئالاھىدە مەمۇرىي رايونى)", + "zh_Hans_SG": "خەنزۇچە (ئاددىي خەنچە, سىنگاپور)", + "zh_Hant": "خەنزۇچە (مۇرەككەپ خەنچە)", + "zh_Hant_HK": "خەنزۇچە (مۇرەككەپ خەنچە, شياڭگاڭ ئالاھىدە مەمۇرىي رايونى (جۇڭگو))", + "zh_Hant_MO": "خەنزۇچە (مۇرەككەپ خەنچە, ئاۋمÛÙ† ئالاھىدە مەمۇرىي رايونى)", + "zh_Hant_TW": "خەنزۇچە (مۇرەككەپ خەنچە, تەيۋەن)", + "zh_MO": "خەنزۇچە (ئاۋمÛÙ† ئالاھىدە مەمۇرىي رايونى)", + "zh_SG": "خەنزۇچە (سىنگاپور)", + "zh_TW": "خەنزۇچە (تەيۋەن)", + "zu": "زۇلۇچە", + "zu_ZA": "زۇلۇچە (جەنۇبىي Ø¦Ø§ÙØ±Ù‰Ù‚ا)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uk.json new file mode 100644 index 0000000000000000000000000000000000000000..fee54b353b3525b8043f549975b8860d845efebb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uk.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "африкаанÑ", + "af_NA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (ÐамібіÑ)", + "af_ZA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (Південно-ÐфриканÑька РеÑпубліка)", + "ak": "акан", + "ak_GH": "акан (Гана)", + "am": "амхарÑька", + "am_ET": "амхарÑька (ЕфіопіÑ)", + "ar": "арабÑька", + "ar_AE": "арабÑька (Обʼєднані ÐрабÑькі Емірати)", + "ar_BH": "арабÑька (Бахрейн)", + "ar_DJ": "арабÑька (Джибуті)", + "ar_DZ": "арабÑька (Ðлжир)", + "ar_EG": "арабÑька (Єгипет)", + "ar_EH": "арабÑька (Західна Сахара)", + "ar_ER": "арабÑька (ЕритреÑ)", + "ar_IL": "арабÑька (Ізраїль)", + "ar_IQ": "арабÑька (Ірак)", + "ar_JO": "арабÑька (ЙорданіÑ)", + "ar_KM": "арабÑька (КоморÑькі оÑтрови)", + "ar_KW": "арабÑька (Кувейт)", + "ar_LB": "арабÑька (Ліван)", + "ar_LY": "арабÑька (ЛівіÑ)", + "ar_MA": "арабÑька (Марокко)", + "ar_MR": "арабÑька (МавританіÑ)", + "ar_OM": "арабÑька (Оман)", + "ar_PS": "арабÑька (ПалеÑтинÑькі території)", + "ar_QA": "арабÑька (Катар)", + "ar_SA": "арабÑька (СаудівÑька ÐравіÑ)", + "ar_SD": "арабÑька (Судан)", + "ar_SO": "арабÑька (Сомалі)", + "ar_SS": "арабÑька (Південний Судан)", + "ar_SY": "арабÑька (СиріÑ)", + "ar_TD": "арабÑька (Чад)", + "ar_TN": "арабÑька (ТуніÑ)", + "ar_YE": "арабÑька (Ємен)", + "as": "аÑÑамÑька", + "as_IN": "аÑÑамÑька (ІндіÑ)", + "az": "азербайджанÑька", + "az_AZ": "азербайджанÑька (Ðзербайджан)", + "az_Cyrl": "азербайджанÑька (кирилицÑ)", + "az_Cyrl_AZ": "азербайджанÑька (кирилицÑ, Ðзербайджан)", + "az_Latn": "азербайджанÑька (латиницÑ)", + "az_Latn_AZ": "азербайджанÑька (латиницÑ, Ðзербайджан)", + "be": "білоруÑька", + "be_BY": "білоруÑька (БілоруÑÑŒ)", + "bg": "болгарÑька", + "bg_BG": "болгарÑька (БолгаріÑ)", + "bm": "бамбара", + "bm_ML": "бамбара (Малі)", + "bn": "бенгальÑька", + "bn_BD": "бенгальÑька (Бангладеш)", + "bn_IN": "бенгальÑька (ІндіÑ)", + "bo": "тибетÑька", + "bo_CN": "тибетÑька (Китай)", + "bo_IN": "тибетÑька (ІндіÑ)", + "br": "бретонÑька", + "br_FR": "бретонÑька (ФранціÑ)", + "bs": "боÑнійÑька", + "bs_BA": "боÑнійÑька (БоÑÐ½Ñ–Ñ Ñ– Герцоговина)", + "bs_Cyrl": "боÑнійÑька (кирилицÑ)", + "bs_Cyrl_BA": "боÑнійÑька (кирилицÑ, БоÑÐ½Ñ–Ñ Ñ– Герцоговина)", + "bs_Latn": "боÑнійÑька (латиницÑ)", + "bs_Latn_BA": "боÑнійÑька (латиницÑ, БоÑÐ½Ñ–Ñ Ñ– Герцоговина)", + "ca": "каталонÑька", + "ca_AD": "каталонÑька (Ðндорра)", + "ca_ES": "каталонÑька (ІÑпаніÑ)", + "ca_FR": "каталонÑька (ФранціÑ)", + "ca_IT": "каталонÑька (ІталіÑ)", + "ce": "чеченÑька", + "ce_RU": "чеченÑька (РоÑÑ–Ñ)", + "cs": "чеÑька", + "cs_CZ": "чеÑька (ЧеÑька РеÑпубліка)", + "cy": "валлійÑька", + "cy_GB": "валлійÑька (Велика БританіÑ)", + "da": "данÑька", + "da_DK": "данÑька (ДаніÑ)", + "da_GL": "данÑька (ГренландіÑ)", + "de": "німецька", + "de_AT": "німецька (ÐвÑтріÑ)", + "de_BE": "німецька (БельгіÑ)", + "de_CH": "німецька (ШвейцаріÑ)", + "de_DE": "німецька (Ðімеччина)", + "de_IT": "німецька (ІталіÑ)", + "de_LI": "німецька (Ліхтенштейн)", + "de_LU": "німецька (ЛюкÑембург)", + "dz": "дзонг-ке", + "dz_BT": "дзонг-ке (Бутан)", + "ee": "еве", + "ee_GH": "еве (Гана)", + "ee_TG": "еве (Того)", + "el": "грецька", + "el_CY": "грецька (Кіпр)", + "el_GR": "грецька (ГреціÑ)", + "en": "англійÑька", + "en_AG": "англійÑька (Ðнтигуа Ñ– Барбуда)", + "en_AI": "англійÑька (ÐнгільÑ)", + "en_AS": "англійÑька (ÐмериканÑьке Самоа)", + "en_AT": "англійÑька (ÐвÑтріÑ)", + "en_AU": "англійÑька (ÐвÑтраліÑ)", + "en_BB": "англійÑька (БарбадоÑ)", + "en_BE": "англійÑька (БельгіÑ)", + "en_BI": "англійÑька (Бурунді)", + "en_BM": "англійÑька (БермудÑькі оÑтрови)", + "en_BS": "англійÑька (БагамÑькі ОÑтрови)", + "en_BW": "англійÑька (БотÑвана)", + "en_BZ": "англійÑька (Беліз)", + "en_CA": "англійÑька (Канада)", + "en_CC": "англійÑька (КокоÑові (Кілінгові) оÑтрови)", + "en_CH": "англійÑька (ШвейцаріÑ)", + "en_CK": "англійÑька (ОÑтрови Кука)", + "en_CM": "англійÑька (Камерун)", + "en_CX": "англійÑька (ОÑтрів Різдва)", + "en_CY": "англійÑька (Кіпр)", + "en_DE": "англійÑька (Ðімеччина)", + "en_DG": "англійÑька (Дієго-ГарÑÑ–Ñ)", + "en_DK": "англійÑька (ДаніÑ)", + "en_DM": "англійÑька (Домініка)", + "en_ER": "англійÑька (ЕритреÑ)", + "en_FI": "англійÑька (ФінлÑндіÑ)", + "en_FJ": "англійÑька (Фіджі)", + "en_FK": "англійÑька (ФолклендÑькі оÑтрови)", + "en_FM": "англійÑька (МікронезіÑ)", + "en_GB": "англійÑька (Велика БританіÑ)", + "en_GD": "англійÑька (Гренада)", + "en_GG": "англійÑька (ГернÑÑ–)", + "en_GH": "англійÑька (Гана)", + "en_GI": "англійÑька (Гібралтар)", + "en_GM": "англійÑька (ГамбіÑ)", + "en_GU": "англійÑька (Гуам)", + "en_GY": "англійÑька (ГаÑна)", + "en_HK": "англійÑька (Гонконг, О.Ð.Р. Китаю)", + "en_IE": "англійÑька (ІрландіÑ)", + "en_IL": "англійÑька (Ізраїль)", + "en_IM": "англійÑька (ОÑтрів Мен)", + "en_IN": "англійÑька (ІндіÑ)", + "en_IO": "англійÑька (БританÑькі території в ІндійÑькому океані)", + "en_JE": "англійÑька (ДжерÑÑ–)", + "en_JM": "англійÑька (Ямайка)", + "en_KE": "англійÑька (КеніÑ)", + "en_KI": "англійÑька (Кірибаті)", + "en_KN": "англійÑька (Сент-ÐšÑ–Ñ‚Ñ Ñ– ÐевіÑ)", + "en_KY": "англійÑька (Кайманові оÑтрови)", + "en_LC": "англійÑька (Сент-ЛюÑÑ–Ñ)", + "en_LR": "англійÑька (ЛіберіÑ)", + "en_LS": "англійÑька (ЛеÑото)", + "en_MG": "англійÑька (МадагаÑкар)", + "en_MH": "англійÑька (Маршаллові ОÑтрови)", + "en_MO": "англійÑька (Макао, О.Ð.Р Китаю)", + "en_MP": "англійÑька (Північні МаріанÑькі ОÑтрови)", + "en_MS": "англійÑька (МонтÑеррат)", + "en_MT": "англійÑька (Мальта)", + "en_MU": "англійÑька (Маврикій)", + "en_MW": "англійÑька (Малаві)", + "en_MY": "англійÑька (МалайзіÑ)", + "en_NA": "англійÑька (ÐамібіÑ)", + "en_NF": "англійÑька (ОÑтрів Ðорфолк)", + "en_NG": "англійÑька (ÐігеріÑ)", + "en_NL": "англійÑька (Ðідерланди)", + "en_NR": "англійÑька (Ðауру)", + "en_NU": "англійÑька (Ðіуе)", + "en_NZ": "англійÑька (Ðова ЗеландіÑ)", + "en_PG": "англійÑька (Папуа Ðова ГвінеÑ)", + "en_PH": "англійÑька (Філіппіни)", + "en_PK": "англійÑька (ПакиÑтан)", + "en_PN": "англійÑька (ОÑтрови Піткерн)", + "en_PR": "англійÑька (Пуерто-Рико)", + "en_PW": "англійÑька (Палау)", + "en_RW": "англійÑька (Руанда)", + "en_SB": "англійÑька (Соломонові ОÑтрови)", + "en_SC": "англійÑька (СейшельÑькі ОÑтрови)", + "en_SD": "англійÑька (Судан)", + "en_SE": "англійÑька (ШвеціÑ)", + "en_SG": "англійÑька (Сінгапур)", + "en_SH": "англійÑька (ОÑтрів СвÑтої Єлени)", + "en_SI": "англійÑька (СловеніÑ)", + "en_SL": "англійÑька (Сьєрра-Леоне)", + "en_SS": "англійÑька (Південний Судан)", + "en_SX": "англійÑька (Сінт-Мартен)", + "en_SZ": "англійÑька (Свазіленд)", + "en_TC": "англійÑька (ОÑтрови Ð¢ÐµÑ€ÐºÑ Ñ– КайкоÑ)", + "en_TK": "англійÑька (Токелау)", + "en_TO": "англійÑька (Тонга)", + "en_TT": "англійÑька (Тринідад Ñ– Тобаго)", + "en_TV": "англійÑька (Тувалу)", + "en_TZ": "англійÑька (ТанзаніÑ)", + "en_UG": "англійÑька (Уганда)", + "en_UM": "англійÑька (Віддалені оÑтрови СШÐ)", + "en_US": "англійÑька (СШÐ)", + "en_VC": "англійÑька (Сент-ВінÑент Ñ– Гренадини)", + "en_VG": "англійÑька (БританÑькі ВіргінÑькі оÑтрови)", + "en_VI": "англійÑька (ВіргінÑькі оÑтрови, СШÐ)", + "en_VU": "англійÑька (Вануату)", + "en_WS": "англійÑька (Самоа)", + "en_ZA": "англійÑька (Південно-ÐфриканÑька РеÑпубліка)", + "en_ZM": "англійÑька (ЗамбіÑ)", + "en_ZW": "англійÑька (Зімбабве)", + "eo": "еÑперанто", + "es": "Ñ–ÑпанÑька", + "es_AR": "Ñ–ÑпанÑька (Ðргентина)", + "es_BO": "Ñ–ÑпанÑька (БолівіÑ)", + "es_BR": "Ñ–ÑпанÑька (БразиліÑ)", + "es_CL": "Ñ–ÑпанÑька (Чилі)", + "es_CO": "Ñ–ÑпанÑька (КолумбіÑ)", + "es_CR": "Ñ–ÑпанÑька (КоÑта-Рика)", + "es_CU": "Ñ–ÑпанÑька (Куба)", + "es_DO": "Ñ–ÑпанÑька (ДомініканÑька РеÑпубліка)", + "es_EA": "Ñ–ÑпанÑька (Сеута Ñ– МелільÑ)", + "es_EC": "Ñ–ÑпанÑька (Еквадор)", + "es_ES": "Ñ–ÑпанÑька (ІÑпаніÑ)", + "es_GQ": "Ñ–ÑпанÑька (Екваторіальна ГвінеÑ)", + "es_GT": "Ñ–ÑпанÑька (Гватемала)", + "es_HN": "Ñ–ÑпанÑька (ГондураÑ)", + "es_IC": "Ñ–ÑпанÑька (КанарÑькі оÑтрови)", + "es_MX": "Ñ–ÑпанÑька (МекÑика)", + "es_NI": "Ñ–ÑпанÑька (Ðікарагуа)", + "es_PA": "Ñ–ÑпанÑька (Панама)", + "es_PE": "Ñ–ÑпанÑька (Перу)", + "es_PH": "Ñ–ÑпанÑька (Філіппіни)", + "es_PR": "Ñ–ÑпанÑька (Пуерто-Рико)", + "es_PY": "Ñ–ÑпанÑька (Парагвай)", + "es_SV": "Ñ–ÑпанÑька (Сальвадор)", + "es_US": "Ñ–ÑпанÑька (СШÐ)", + "es_UY": "Ñ–ÑпанÑька (Уругвай)", + "es_VE": "Ñ–ÑпанÑька (ВенеÑуела)", + "et": "еÑтонÑька", + "et_EE": "еÑтонÑька (ЕÑтоніÑ)", + "eu": "баÑкÑька", + "eu_ES": "баÑкÑька (ІÑпаніÑ)", + "fa": "перÑька", + "fa_AF": "перÑька (ÐфганіÑтан)", + "fa_IR": "перÑька (Іран)", + "ff": "фула", + "ff_CM": "фула (Камерун)", + "ff_GN": "фула (ГвінеÑ)", + "ff_MR": "фула (МавританіÑ)", + "ff_SN": "фула (Сенегал)", + "fi": "фінÑька", + "fi_FI": "фінÑька (ФінлÑндіÑ)", + "fo": "фарерÑька", + "fo_DK": "фарерÑька (ДаніÑ)", + "fo_FO": "фарерÑька (ФарерÑькі ОÑтрови)", + "fr": "французька", + "fr_BE": "французька (БельгіÑ)", + "fr_BF": "французька (Буркіна-ФаÑо)", + "fr_BI": "французька (Бурунді)", + "fr_BJ": "французька (Бенін)", + "fr_BL": "французька (Сен-Бартельмі)", + "fr_CA": "французька (Канада)", + "fr_CD": "французька (Конго – КіншаÑа)", + "fr_CF": "французька (ЦентральноафриканÑька РеÑпубліка)", + "fr_CG": "французька (Конго – Браззавіль)", + "fr_CH": "французька (ШвейцаріÑ)", + "fr_CI": "французька (Кот-д’Івуар)", + "fr_CM": "французька (Камерун)", + "fr_DJ": "французька (Джибуті)", + "fr_DZ": "французька (Ðлжир)", + "fr_FR": "французька (ФранціÑ)", + "fr_GA": "французька (Габон)", + "fr_GF": "французька (Французька Гвіана)", + "fr_GN": "французька (ГвінеÑ)", + "fr_GP": "французька (Гваделупа)", + "fr_GQ": "французька (Екваторіальна ГвінеÑ)", + "fr_HT": "французька (Гаїті)", + "fr_KM": "французька (КоморÑькі оÑтрови)", + "fr_LU": "французька (ЛюкÑембург)", + "fr_MA": "французька (Марокко)", + "fr_MC": "французька (Монако)", + "fr_MF": "французька (Сен-Мартен)", + "fr_MG": "французька (МадагаÑкар)", + "fr_ML": "французька (Малі)", + "fr_MQ": "французька (Мартиніка)", + "fr_MR": "французька (МавританіÑ)", + "fr_MU": "французька (Маврикій)", + "fr_NC": "французька (Ðова КаледоніÑ)", + "fr_NE": "французька (Ðігер)", + "fr_PF": "французька (Французька ПолінезіÑ)", + "fr_PM": "французька (Сен-Пʼєр Ñ– Мікелон)", + "fr_RE": "французька (Реюньйон)", + "fr_RW": "французька (Руанда)", + "fr_SC": "французька (СейшельÑькі ОÑтрови)", + "fr_SN": "французька (Сенегал)", + "fr_SY": "французька (СиріÑ)", + "fr_TD": "французька (Чад)", + "fr_TG": "французька (Того)", + "fr_TN": "французька (ТуніÑ)", + "fr_VU": "французька (Вануату)", + "fr_WF": "французька (Ð’Ð¾Ð»Ð»Ñ–Ñ Ñ– Футуна)", + "fr_YT": "французька (Майотта)", + "fy": "західнофризька", + "fy_NL": "західнофризька (Ðідерланди)", + "ga": "ірландÑька", + "ga_IE": "ірландÑька (ІрландіÑ)", + "gd": "гаельÑька", + "gd_GB": "гаельÑька (Велика БританіÑ)", + "gl": "галіÑійÑька", + "gl_ES": "галіÑійÑька (ІÑпаніÑ)", + "gu": "гуджараті", + "gu_IN": "гуджараті (ІндіÑ)", + "gv": "менкÑька", + "gv_IM": "менкÑька (ОÑтрів Мен)", + "ha": "хауÑа", + "ha_GH": "хауÑа (Гана)", + "ha_NE": "хауÑа (Ðігер)", + "ha_NG": "хауÑа (ÐігеріÑ)", + "he": "іврит", + "he_IL": "іврит (Ізраїль)", + "hi": "гінді", + "hi_IN": "гінді (ІндіÑ)", + "hr": "хорватÑька", + "hr_BA": "хорватÑька (БоÑÐ½Ñ–Ñ Ñ– Герцоговина)", + "hr_HR": "хорватÑька (ХорватіÑ)", + "hu": "угорÑька", + "hu_HU": "угорÑька (Угорщина)", + "hy": "вірменÑька", + "hy_AM": "вірменÑька (ВірменіÑ)", + "id": "індонезійÑька", + "id_ID": "індонезійÑька (ІндонезіÑ)", + "ig": "ігбо", + "ig_NG": "ігбо (ÐігеріÑ)", + "ii": "Ñичуань", + "ii_CN": "Ñичуань (Китай)", + "is": "Ñ–ÑландÑька", + "is_IS": "Ñ–ÑландÑька (ІÑландіÑ)", + "it": "італійÑька", + "it_CH": "італійÑька (ШвейцаріÑ)", + "it_IT": "італійÑька (ІталіÑ)", + "it_SM": "італійÑька (Сан-Марино)", + "ja": "ÑпонÑька", + "ja_JP": "ÑпонÑька (ЯпоніÑ)", + "ka": "грузинÑька", + "ka_GE": "грузинÑька (ГрузіÑ)", + "ki": "кікуйю", + "ki_KE": "кікуйю (КеніÑ)", + "kk": "казахÑька", + "kk_KZ": "казахÑька (КазахÑтан)", + "kl": "калаалліÑут", + "kl_GL": "калаалліÑут (ГренландіÑ)", + "km": "кхмерÑька", + "km_KH": "кхмерÑька (Камбоджа)", + "kn": "каннада", + "kn_IN": "каннада (ІндіÑ)", + "ko": "корейÑька", + "ko_KP": "корейÑька (Північна КореÑ)", + "ko_KR": "корейÑька (Південна КореÑ)", + "ks": "кашмірÑька", + "ks_IN": "кашмірÑька (ІндіÑ)", + "kw": "корнійÑька", + "kw_GB": "корнійÑька (Велика БританіÑ)", + "ky": "киргизька", + "ky_KG": "киргизька (КиргизÑтан)", + "lb": "люкÑембурзька", + "lb_LU": "люкÑембурзька (ЛюкÑембург)", + "lg": "ганда", + "lg_UG": "ганда (Уганда)", + "ln": "лінгала", + "ln_AO": "лінгала (Ðнгола)", + "ln_CD": "лінгала (Конго – КіншаÑа)", + "ln_CF": "лінгала (ЦентральноафриканÑька РеÑпубліка)", + "ln_CG": "лінгала (Конго – Браззавіль)", + "lo": "лаоÑька", + "lo_LA": "лаоÑька (ЛаоÑ)", + "lt": "литовÑька", + "lt_LT": "литовÑька (Литва)", + "lu": "луба-катанга", + "lu_CD": "луба-катанга (Конго – КіншаÑа)", + "lv": "латвійÑька", + "lv_LV": "латвійÑька (ЛатвіÑ)", + "mg": "малагаÑійÑька", + "mg_MG": "малагаÑійÑька (МадагаÑкар)", + "mk": "македонÑька", + "mk_MK": "македонÑька (МакедоніÑ)", + "ml": "малаÑлам", + "ml_IN": "малаÑлам (ІндіÑ)", + "mn": "монгольÑька", + "mn_MN": "монгольÑька (МонголіÑ)", + "mr": "маратхі", + "mr_IN": "маратхі (ІндіÑ)", + "ms": "малайÑька", + "ms_BN": "малайÑька (Бруней)", + "ms_MY": "малайÑька (МалайзіÑ)", + "ms_SG": "малайÑька (Сінгапур)", + "mt": "мальтійÑька", + "mt_MT": "мальтійÑька (Мальта)", + "my": "бірманÑька", + "my_MM": "бірманÑька (МʼÑнма (Бірма))", + "nb": "букмол (ÐорвегіÑ)", + "nb_NO": "букмол (ÐорвегіÑ)", + "nb_SJ": "букмол (ОÑтрови Свальбард Ñ– Ян-Маєн)", + "nd": "ндебелє північна", + "nd_ZW": "ндебелє північна (Зімбабве)", + "ne": "непальÑька", + "ne_IN": "непальÑька (ІндіÑ)", + "ne_NP": "непальÑька (Ðепал)", + "nl": "голландÑька", + "nl_AW": "голландÑька (Ðруба)", + "nl_BE": "голландÑька (БельгіÑ)", + "nl_BQ": "голландÑька (ÐідерландÑькі КарибÑькі оÑтрови)", + "nl_CW": "голландÑька (КюраÑао)", + "nl_NL": "голландÑька (Ðідерланди)", + "nl_SR": "голландÑька (Суринам)", + "nl_SX": "голландÑька (Сінт-Мартен)", + "nn": "нюношк (ÐорвегіÑ)", + "nn_NO": "нюношк (ÐорвегіÑ)", + "no": "норвезька", + "no_NO": "норвезька (ÐорвегіÑ)", + "om": "оромо", + "om_ET": "оромо (ЕфіопіÑ)", + "om_KE": "оромо (КеніÑ)", + "or": "оріÑ", + "or_IN": "Ð¾Ñ€Ñ–Ñ (ІндіÑ)", + "os": "оÑетинÑька", + "os_GE": "оÑетинÑька (ГрузіÑ)", + "os_RU": "оÑетинÑька (РоÑÑ–Ñ)", + "pa": "панджабі", + "pa_Arab": "панджабі (арабицÑ)", + "pa_Arab_PK": "панджабі (арабицÑ, ПакиÑтан)", + "pa_Guru": "панджабі (гурмухі)", + "pa_Guru_IN": "панджабі (гурмухі, ІндіÑ)", + "pa_IN": "панджабі (ІндіÑ)", + "pa_PK": "панджабі (ПакиÑтан)", + "pl": "польÑька", + "pl_PL": "польÑька (Польща)", + "ps": "пушту", + "ps_AF": "пушту (ÐфганіÑтан)", + "pt": "португальÑька", + "pt_AO": "португальÑька (Ðнгола)", + "pt_BR": "португальÑька (БразиліÑ)", + "pt_CH": "португальÑька (ШвейцаріÑ)", + "pt_CV": "португальÑька (Кабо-Верде)", + "pt_GQ": "португальÑька (Екваторіальна ГвінеÑ)", + "pt_GW": "португальÑька (ГвінеÑ-БіÑау)", + "pt_LU": "португальÑька (ЛюкÑембург)", + "pt_MO": "португальÑька (Макао, О.Ð.Р Китаю)", + "pt_MZ": "португальÑька (Мозамбік)", + "pt_PT": "португальÑька (ПортугаліÑ)", + "pt_ST": "португальÑька (Сан-Томе Ñ– ПрінÑіпі)", + "pt_TL": "португальÑька (Тимор-Лешті)", + "qu": "кечуа", + "qu_BO": "кечуа (БолівіÑ)", + "qu_EC": "кечуа (Еквадор)", + "qu_PE": "кечуа (Перу)", + "rm": "ретороманÑька", + "rm_CH": "ретороманÑька (ШвейцаріÑ)", + "rn": "рунді", + "rn_BI": "рунді (Бурунді)", + "ro": "румунÑька", + "ro_MD": "румунÑька (Молдова)", + "ro_RO": "румунÑька (РумуніÑ)", + "ru": "роÑійÑька", + "ru_BY": "роÑійÑька (БілоруÑÑŒ)", + "ru_KG": "роÑійÑька (КиргизÑтан)", + "ru_KZ": "роÑійÑька (КазахÑтан)", + "ru_MD": "роÑійÑька (Молдова)", + "ru_RU": "роÑійÑька (РоÑÑ–Ñ)", + "ru_UA": "роÑійÑька (Україна)", + "rw": "кіньÑруанда", + "rw_RW": "кіньÑруанда (Руанда)", + "se": "ÑаамÑька північна", + "se_FI": "ÑаамÑька північна (ФінлÑндіÑ)", + "se_NO": "ÑаамÑька північна (ÐорвегіÑ)", + "se_SE": "ÑаамÑька північна (ШвеціÑ)", + "sg": "Ñанго", + "sg_CF": "Ñанго (ЦентральноафриканÑька РеÑпубліка)", + "sh": "ÑербÑько-хорватÑька", + "sh_BA": "ÑербÑько-хорватÑька (БоÑÐ½Ñ–Ñ Ñ– Герцоговина)", + "si": "ÑингальÑька", + "si_LK": "ÑингальÑька (Шрі-Ланка)", + "sk": "Ñловацька", + "sk_SK": "Ñловацька (Словаччина)", + "sl": "ÑловенÑька", + "sl_SI": "ÑловенÑька (СловеніÑ)", + "sn": "шона", + "sn_ZW": "шона (Зімбабве)", + "so": "Ñомалі", + "so_DJ": "Ñомалі (Джибуті)", + "so_ET": "Ñомалі (ЕфіопіÑ)", + "so_KE": "Ñомалі (КеніÑ)", + "so_SO": "Ñомалі (Сомалі)", + "sq": "албанÑька", + "sq_AL": "албанÑька (ÐлбаніÑ)", + "sq_MK": "албанÑька (МакедоніÑ)", + "sq_XK": "албанÑька (КоÑово)", + "sr": "ÑербÑька", + "sr_BA": "ÑербÑька (БоÑÐ½Ñ–Ñ Ñ– Герцоговина)", + "sr_Cyrl": "ÑербÑька (кирилицÑ)", + "sr_Cyrl_BA": "ÑербÑька (кирилицÑ, БоÑÐ½Ñ–Ñ Ñ– Герцоговина)", + "sr_Cyrl_ME": "ÑербÑька (кирилицÑ, ЧорногоріÑ)", + "sr_Cyrl_RS": "ÑербÑька (кирилицÑ, СербіÑ)", + "sr_Cyrl_XK": "ÑербÑька (кирилицÑ, КоÑово)", + "sr_Latn": "ÑербÑька (латиницÑ)", + "sr_Latn_BA": "ÑербÑька (латиницÑ, БоÑÐ½Ñ–Ñ Ñ– Герцоговина)", + "sr_Latn_ME": "ÑербÑька (латиницÑ, ЧорногоріÑ)", + "sr_Latn_RS": "ÑербÑька (латиницÑ, СербіÑ)", + "sr_Latn_XK": "ÑербÑька (латиницÑ, КоÑово)", + "sr_ME": "ÑербÑька (ЧорногоріÑ)", + "sr_RS": "ÑербÑька (СербіÑ)", + "sr_XK": "ÑербÑька (КоÑово)", + "sv": "шведÑька", + "sv_AX": "шведÑька (ÐландÑькі оÑтрови)", + "sv_FI": "шведÑька (ФінлÑндіÑ)", + "sv_SE": "шведÑька (ШвеціÑ)", + "sw": "Ñуахілі", + "sw_CD": "Ñуахілі (Конго – КіншаÑа)", + "sw_KE": "Ñуахілі (КеніÑ)", + "sw_TZ": "Ñуахілі (ТанзаніÑ)", + "sw_UG": "Ñуахілі (Уганда)", + "ta": "тамільÑька", + "ta_IN": "тамільÑька (ІндіÑ)", + "ta_LK": "тамільÑька (Шрі-Ланка)", + "ta_MY": "тамільÑька (МалайзіÑ)", + "ta_SG": "тамільÑька (Сінгапур)", + "te": "телугу", + "te_IN": "телугу (ІндіÑ)", + "th": "тайÑька", + "th_TH": "тайÑька (Таїланд)", + "ti": "тигриньÑ", + "ti_ER": "Ñ‚Ð¸Ð³Ñ€Ð¸Ð½ÑŒÑ (ЕритреÑ)", + "ti_ET": "Ñ‚Ð¸Ð³Ñ€Ð¸Ð½ÑŒÑ (ЕфіопіÑ)", + "tl": "тагальÑька", + "tl_PH": "тагальÑька (Філіппіни)", + "to": "тонганÑька", + "to_TO": "тонганÑька (Тонга)", + "tr": "турецька", + "tr_CY": "турецька (Кіпр)", + "tr_TR": "турецька (Туреччина)", + "ug": "уйгурÑька", + "ug_CN": "уйгурÑька (Китай)", + "uk": "українÑька", + "uk_UA": "українÑька (Україна)", + "ur": "урду", + "ur_IN": "урду (ІндіÑ)", + "ur_PK": "урду (ПакиÑтан)", + "uz": "узбецька", + "uz_AF": "узбецька (ÐфганіÑтан)", + "uz_Arab": "узбецька (арабицÑ)", + "uz_Arab_AF": "узбецька (арабицÑ, ÐфганіÑтан)", + "uz_Cyrl": "узбецька (кирилицÑ)", + "uz_Cyrl_UZ": "узбецька (кирилицÑ, УзбекиÑтан)", + "uz_Latn": "узбецька (латиницÑ)", + "uz_Latn_UZ": "узбецька (латиницÑ, УзбекиÑтан)", + "uz_UZ": "узбецька (УзбекиÑтан)", + "vi": "вʼєтнамÑька", + "vi_VN": "вʼєтнамÑька (Вʼєтнам)", + "yi": "ідиш", + "yo": "йоруба", + "yo_BJ": "йоруба (Бенін)", + "yo_NG": "йоруба (ÐігеріÑ)", + "zh": "китайÑька", + "zh_CN": "китайÑька (Китай)", + "zh_HK": "китайÑька (Гонконг, О.Ð.Р. Китаю)", + "zh_Hans": "китайÑька (Ñпрощена)", + "zh_Hans_CN": "китайÑька (Ñпрощена, Китай)", + "zh_Hans_HK": "китайÑька (Ñпрощена, Гонконг, О.Ð.Р. Китаю)", + "zh_Hans_MO": "китайÑька (Ñпрощена, Макао, О.Ð.Р Китаю)", + "zh_Hans_SG": "китайÑька (Ñпрощена, Сінгапур)", + "zh_Hant": "китайÑька (традиційна)", + "zh_Hant_HK": "китайÑька (традиційна, Гонконг, О.Ð.Р. Китаю)", + "zh_Hant_MO": "китайÑька (традиційна, Макао, О.Ð.Р Китаю)", + "zh_Hant_TW": "китайÑька (традиційна, Тайвань)", + "zh_MO": "китайÑька (Макао, О.Ð.Р Китаю)", + "zh_SG": "китайÑька (Сінгапур)", + "zh_TW": "китайÑька (Тайвань)", + "zu": "зулуÑька", + "zu_ZA": "зулуÑька (Південно-ÐфриканÑька РеÑпубліка)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ur.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ur.json new file mode 100644 index 0000000000000000000000000000000000000000..b4a58fb17d339775d77452b414851a2db656880c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ur.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Ø§ÛŒÙØ±ÛŒÚ©Ø§Ù†Ø²", + "af_NA": "Ø§ÛŒÙØ±ÛŒÚ©Ø§Ù†Ø² (نامیبیا)", + "af_ZA": "Ø§ÛŒÙØ±ÛŒÚ©Ø§Ù†Ø² (جنوبی Ø§ÙØ±ÛŒÙ‚Û)", + "ak": "اکان", + "ak_GH": "اکان (گھانا)", + "am": "Ø§Ù…ÛØ§Ø±ÛŒ", + "am_ET": "Ø§Ù…ÛØ§Ø±ÛŒ (ایتھوپیا)", + "ar": "عربی", + "ar_AE": "عربی (Ù…ØªØ­Ø¯Û Ø¹Ø±Ø¨ امارات)", + "ar_BH": "عربی (بحرین)", + "ar_DJ": "عربی (جبوتی)", + "ar_DZ": "عربی (الجیریا)", + "ar_EG": "عربی (مصر)", + "ar_EH": "عربی (مغربی صحارا)", + "ar_ER": "عربی (اریٹیریا)", + "ar_IL": "عربی (اسرائیل)", + "ar_IQ": "عربی (عراق)", + "ar_JO": "عربی (اردن)", + "ar_KM": "عربی (کوموروس)", + "ar_KW": "عربی (کویت)", + "ar_LB": "عربی (لبنان)", + "ar_LY": "عربی (لیبیا)", + "ar_MA": "عربی (مراکش)", + "ar_MR": "عربی (موریطانیÛ)", + "ar_OM": "عربی (عمان)", + "ar_PS": "عربی (Ùلسطینی خطے)", + "ar_QA": "عربی (قطر)", + "ar_SA": "عربی (سعودی عرب)", + "ar_SD": "عربی (سوڈان)", + "ar_SO": "عربی (صومالیÛ)", + "ar_SS": "عربی (جنوبی سوڈان)", + "ar_SY": "عربی (شام)", + "ar_TD": "عربی (چاڈ)", + "ar_TN": "عربی (تونس)", + "ar_YE": "عربی (یمن)", + "as": "آسامی", + "as_IN": "آسامی (بھارت)", + "az": "آذربائیجانی", + "az_AZ": "آذربائیجانی (آذر بائیجان)", + "az_Cyrl": "آذربائیجانی (سیریلک)", + "az_Cyrl_AZ": "آذربائیجانی (سیریلک, آذر بائیجان)", + "az_Latn": "آذربائیجانی (لاطینی)", + "az_Latn_AZ": "آذربائیجانی (لاطینی, آذر بائیجان)", + "be": "بیلاروسی", + "be_BY": "بیلاروسی (بیلاروس)", + "bg": "بلغاری", + "bg_BG": "بلغاری (بلغاریÛ)", + "bm": "بمبارا", + "bm_ML": "بمبارا (مالی)", + "bn": "بنگالی", + "bn_BD": "بنگالی (Ø¨Ù†Ú¯Ù„Û Ø¯ÛŒØ´)", + "bn_IN": "بنگالی (بھارت)", + "bo": "تبتی", + "bo_CN": "تبتی (چین)", + "bo_IN": "تبتی (بھارت)", + "br": "بریٹن", + "br_FR": "بریٹن (ÙØ±Ø§Ù†Ø³)", + "bs": "بوسنی", + "bs_BA": "بوسنی (بوسنیا اور ÛØ±Ø²ÛŒÚ¯ÙˆÙˆÛŒÙ†Ø§)", + "bs_Cyrl": "بوسنی (سیریلک)", + "bs_Cyrl_BA": "بوسنی (سیریلک, بوسنیا اور ÛØ±Ø²ÛŒÚ¯ÙˆÙˆÛŒÙ†Ø§)", + "bs_Latn": "بوسنی (لاطینی)", + "bs_Latn_BA": "بوسنی (لاطینی, بوسنیا اور ÛØ±Ø²ÛŒÚ¯ÙˆÙˆÛŒÙ†Ø§)", + "ca": "کیٹالان", + "ca_AD": "کیٹالان (انڈورا)", + "ca_ES": "کیٹالان (ÛØ³Ù¾Ø§Ù†ÛŒÛ)", + "ca_FR": "کیٹالان (ÙØ±Ø§Ù†Ø³)", + "ca_IT": "کیٹالان (اٹلی)", + "ce": "چیچن", + "ce_RU": "چیچن (روس)", + "cs": "چیک", + "cs_CZ": "چیک (چیک جمÛوریÛ)", + "cy": "ویلش", + "cy_GB": "ویلش (سلطنت متحدÛ)", + "da": "ڈینش", + "da_DK": "ڈینش (ڈنمارک)", + "da_GL": "ڈینش (گرین لینڈ)", + "de": "جرمن", + "de_AT": "جرمن (آسٹریا)", + "de_BE": "جرمن (بیلجیم)", + "de_CH": "جرمن (سوئٹزر لینڈ)", + "de_DE": "جرمن (جرمنی)", + "de_IT": "جرمن (اٹلی)", + "de_LI": "جرمن (لیشٹنسٹائن)", + "de_LU": "جرمن (لکسمبرگ)", + "dz": "ژونگکھا", + "dz_BT": "ژونگکھا (بھوٹان)", + "ee": "ایو", + "ee_GH": "ایو (گھانا)", + "ee_TG": "ایو (ٹوگو)", + "el": "یونانی", + "el_CY": "یونانی (قبرص)", + "el_GR": "یونانی (یونان)", + "en": "انگریزی", + "en_AG": "انگریزی (انٹیگوا اور باربودا)", + "en_AI": "انگریزی (انگوئیلا)", + "en_AS": "انگریزی (امریکی ساموآ)", + "en_AT": "انگریزی (آسٹریا)", + "en_AU": "انگریزی (آسٹریلیا)", + "en_BB": "انگریزی (بارباڈوس)", + "en_BE": "انگریزی (بیلجیم)", + "en_BI": "انگریزی (برونڈی)", + "en_BM": "انگریزی (برمودا)", + "en_BS": "انگریزی (Ø¨ÛØ§Ù…اس)", + "en_BW": "انگریزی (بوتسوانا)", + "en_BZ": "انگریزی (بیلائز)", + "en_CA": "انگریزی (کینیڈا)", + "en_CC": "انگریزی (کوکوس (کیلنگ) جزائر)", + "en_CH": "انگریزی (سوئٹزر لینڈ)", + "en_CK": "انگریزی (Ú©Ú© آئلینڈز)", + "en_CM": "انگریزی (کیمرون)", + "en_CX": "انگریزی (Ø¬Ø²ÛŒØ±Û Ú©Ø±Ø³Ù…Ø³)", + "en_CY": "انگریزی (قبرص)", + "en_DE": "انگریزی (جرمنی)", + "en_DG": "انگریزی (ڈائجو گارسیا)", + "en_DK": "انگریزی (ڈنمارک)", + "en_DM": "انگریزی (ڈومنیکا)", + "en_ER": "انگریزی (اریٹیریا)", + "en_FI": "انگریزی (ÙÙ† لینڈ)", + "en_FJ": "انگریزی (ÙØ¬ÛŒ)", + "en_FK": "انگریزی (ÙØ§Ú©Ù„ینڈ جزائر)", + "en_FM": "انگریزی (مائکرونیشیا)", + "en_GB": "انگریزی (سلطنت متحدÛ)", + "en_GD": "انگریزی (گریناڈا)", + "en_GG": "انگریزی (گوئرنسی)", + "en_GH": "انگریزی (گھانا)", + "en_GI": "انگریزی (جبل الطارق)", + "en_GM": "انگریزی (گیمبیا)", + "en_GU": "انگریزی (گوام)", + "en_GY": "انگریزی (گیانا)", + "en_HK": "انگریزی (ÛØ§Ù†Ú¯ کانگ SAR چین)", + "en_IE": "انگریزی (آئرلینڈ)", + "en_IL": "انگریزی (اسرائیل)", + "en_IM": "انگریزی (آئل آ٠مین)", + "en_IN": "انگریزی (بھارت)", + "en_IO": "انگریزی (برطانوی بحر Ûند کا علاقÛ)", + "en_JE": "انگریزی (جرسی)", + "en_JM": "انگریزی (جمائیکا)", + "en_KE": "انگریزی (کینیا)", + "en_KI": "انگریزی (کریباتی)", + "en_KN": "انگریزی (سینٹ کٹس اور نیویس)", + "en_KY": "انگریزی (کیمین آئلینڈز)", + "en_LC": "انگریزی (سینٹ لوسیا)", + "en_LR": "انگریزی (لائبیریا)", + "en_LS": "انگریزی (لیسوتھو)", + "en_MG": "انگریزی (مڈغاسکر)", + "en_MH": "انگریزی (مارشل آئلینڈز)", + "en_MO": "انگریزی (مکاؤ SAR چین)", + "en_MP": "انگریزی (شمالی ماریانا آئلینڈز)", + "en_MS": "انگریزی (مونٹسیراٹ)", + "en_MT": "انگریزی (مالٹا)", + "en_MU": "انگریزی (ماریشس)", + "en_MW": "انگریزی (ملاوی)", + "en_MY": "انگریزی (ملائشیا)", + "en_NA": "انگریزی (نامیبیا)", + "en_NF": "انگریزی (نارÙÙˆÚ© آئلینڈ)", + "en_NG": "انگریزی (نائجیریا)", + "en_NL": "انگریزی (نیدر لینڈز)", + "en_NR": "انگریزی (نؤرو)", + "en_NU": "انگریزی (نیئو)", + "en_NZ": "انگریزی (نیوزی لینڈ)", + "en_PG": "انگریزی (پاپوآ نیو Ú¯Ù†ÛŒ)", + "en_PH": "انگریزی (Ùلپائن)", + "en_PK": "انگریزی (پاکستان)", + "en_PN": "انگریزی (پٹکائرن جزائر)", + "en_PR": "انگریزی (پیورٹو ریکو)", + "en_PW": "انگریزی (پلاؤ)", + "en_RW": "انگریزی (روانڈا)", + "en_SB": "انگریزی (سولومن آئلینڈز)", + "en_SC": "انگریزی (سشلیز)", + "en_SD": "انگریزی (سوڈان)", + "en_SE": "انگریزی (سویڈن)", + "en_SG": "انگریزی (سنگاپور)", + "en_SH": "انگریزی (سینٹ Ûیلینا)", + "en_SI": "انگریزی (سلووینیا)", + "en_SL": "انگریزی (سیئر لیون)", + "en_SS": "انگریزی (جنوبی سوڈان)", + "en_SX": "انگریزی (سنٹ مارٹن)", + "en_SZ": "انگریزی (سوازی لینڈ)", + "en_TC": "انگریزی (ترکس اور کیکاؤس جزائر)", + "en_TK": "انگریزی (ٹوکیلاؤ)", + "en_TO": "انگریزی (ٹونگا)", + "en_TT": "انگریزی (ترینیداد اور ٹوباگو)", + "en_TV": "انگریزی (ٹووالو)", + "en_TZ": "انگریزی (تنزانیÛ)", + "en_UG": "انگریزی (یوگنڈا)", + "en_UM": "انگریزی (Ø§Ù…Ø±ÛŒÚ©Û Ø³Û’ Ø¨Ø§ÛØ± Ú©Û’ چھوٹے جزائز)", + "en_US": "انگریزی (Ø±ÛŒØ§Ø³ØªÛØ§Ø¦Û’ متحدÛ)", + "en_VC": "انگریزی (سینٹ ونسنٹ اور گرینیڈائنز)", + "en_VG": "انگریزی (برٹش ورجن آئلینڈز)", + "en_VI": "انگریزی (امریکی ورجن آئلینڈز)", + "en_VU": "انگریزی (وینوآٹو)", + "en_WS": "انگریزی (ساموآ)", + "en_ZA": "انگریزی (جنوبی Ø§ÙØ±ÛŒÙ‚Û)", + "en_ZM": "انگریزی (زامبیا)", + "en_ZW": "انگریزی (زمبابوے)", + "eo": "ایسپرانٹو", + "es": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ", + "es_AR": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (ارجنٹینا)", + "es_BO": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (بولیویا)", + "es_BR": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (برازیل)", + "es_CL": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (Ú†Ù„ÛŒ)", + "es_CO": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (کولمبیا)", + "es_CR": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (کوسٹا ریکا)", + "es_CU": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (کیوبا)", + "es_DO": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (ڈومنیکن جمÛوریÛ)", + "es_EA": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (سیئوٹا اور میلیلا)", + "es_EC": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (ایکواڈور)", + "es_ES": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (ÛØ³Ù¾Ø§Ù†ÛŒÛ)", + "es_GQ": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (استوائی گیانا)", + "es_GT": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (گواٹے مالا)", + "es_HN": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (Ûونڈاروس)", + "es_IC": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (کینری آئلینڈز)", + "es_MX": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (میکسیکو)", + "es_NI": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (نکاراگووا)", + "es_PA": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (پانامÛ)", + "es_PE": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (پیرو)", + "es_PH": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (Ùلپائن)", + "es_PR": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (پیورٹو ریکو)", + "es_PY": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (پیراگوئے)", + "es_SV": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (ال سلواڈور)", + "es_US": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (Ø±ÛŒØ§Ø³ØªÛØ§Ø¦Û’ متحدÛ)", + "es_UY": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (یوروگوئے)", + "es_VE": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (وینزوئیلا)", + "et": "اسٹونین", + "et_EE": "اسٹونین (اسٹونیا)", + "eu": "باسکی", + "eu_ES": "باسکی (ÛØ³Ù¾Ø§Ù†ÛŒÛ)", + "fa": "ÙØ§Ø±Ø³ÛŒ", + "fa_AF": "ÙØ§Ø±Ø³ÛŒ (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "fa_IR": "ÙØ§Ø±Ø³ÛŒ (ایران)", + "ff": "ÙولÛ", + "ff_CM": "ÙÙˆÙ„Û (کیمرون)", + "ff_GN": "ÙÙˆÙ„Û (Ú¯Ù†ÛŒ)", + "ff_MR": "ÙÙˆÙ„Û (موریطانیÛ)", + "ff_SN": "ÙÙˆÙ„Û (سینیگل)", + "fi": "Ùینیش", + "fi_FI": "Ùینیش (ÙÙ† لینڈ)", + "fo": "Ùیروئیز", + "fo_DK": "Ùیروئیز (ڈنمارک)", + "fo_FO": "Ùیروئیز (جزائر ÙØ§Ø±Ùˆ)", + "fr": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ", + "fr_BE": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (بیلجیم)", + "fr_BF": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (برکینا ÙØ§Ø³Ùˆ)", + "fr_BI": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (برونڈی)", + "fr_BJ": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (بینن)", + "fr_BL": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (سینٹ برتھلیمی)", + "fr_CA": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (کینیڈا)", + "fr_CD": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (کانگو - کنشاسا)", + "fr_CF": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (وسط Ø§ÙØ±ÛŒÙ‚ÛŒ جمÛوریÛ)", + "fr_CG": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (کانگو - برازاویلے)", + "fr_CH": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (سوئٹزر لینڈ)", + "fr_CI": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (کوٹ ÚˆÛŒ آئیوری)", + "fr_CM": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (کیمرون)", + "fr_DJ": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (جبوتی)", + "fr_DZ": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (الجیریا)", + "fr_FR": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (ÙØ±Ø§Ù†Ø³)", + "fr_GA": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (گیبون)", + "fr_GF": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (ÙØ±ÛŒÙ†Ú† گیانا)", + "fr_GN": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (Ú¯Ù†ÛŒ)", + "fr_GP": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (گواڈیلوپ)", + "fr_GQ": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (استوائی گیانا)", + "fr_HT": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (Ûیٹی)", + "fr_KM": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (کوموروس)", + "fr_LU": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (لکسمبرگ)", + "fr_MA": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (مراکش)", + "fr_MC": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (موناکو)", + "fr_MF": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (سینٹ مارٹن)", + "fr_MG": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (مڈغاسکر)", + "fr_ML": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (مالی)", + "fr_MQ": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (مارٹینک)", + "fr_MR": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (موریطانیÛ)", + "fr_MU": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (ماریشس)", + "fr_NC": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (نیو کلیڈونیا)", + "fr_NE": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (نائجر)", + "fr_PF": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ پولینیشیا)", + "fr_PM": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (سینٹ پیئر اور میکلیئون)", + "fr_RE": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (ری یونین)", + "fr_RW": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (روانڈا)", + "fr_SC": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (سشلیز)", + "fr_SN": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (سینیگل)", + "fr_SY": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (شام)", + "fr_TD": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (چاڈ)", + "fr_TG": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (ٹوگو)", + "fr_TN": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (تونس)", + "fr_VU": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (وینوآٹو)", + "fr_WF": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (ویلیز اور Ùیوٹیونا)", + "fr_YT": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (مایوٹ)", + "fy": "مغربی ÙØ±ÛŒØ³ÛŒØ¦Ù†", + "fy_NL": "مغربی ÙØ±ÛŒØ³ÛŒØ¦Ù† (نیدر لینڈز)", + "ga": "Ø¢Ø¦ÛŒØ±ÙØ´", + "ga_IE": "Ø¢Ø¦ÛŒØ±ÙØ´ (آئرلینڈ)", + "gd": "سکاٹ گیلÙÚ©", + "gd_GB": "سکاٹ گیلÙÚ© (سلطنت متحدÛ)", + "gl": "گالیشیائی", + "gl_ES": "گالیشیائی (ÛØ³Ù¾Ø§Ù†ÛŒÛ)", + "gu": "گجراتی", + "gu_IN": "گجراتی (بھارت)", + "gv": "مینکس", + "gv_IM": "مینکس (آئل آ٠مین)", + "ha": "ÛØ¤Ø³Ø§", + "ha_GH": "ÛØ¤Ø³Ø§ (گھانا)", + "ha_NE": "ÛØ¤Ø³Ø§ (نائجر)", + "ha_NG": "ÛØ¤Ø³Ø§ (نائجیریا)", + "he": "عبرانی", + "he_IL": "عبرانی (اسرائیل)", + "hi": "Ûندی", + "hi_IN": "Ûندی (بھارت)", + "hr": "کراتی", + "hr_BA": "کراتی (بوسنیا اور ÛØ±Ø²ÛŒÚ¯ÙˆÙˆÛŒÙ†Ø§)", + "hr_HR": "کراتی (کروشیا)", + "hu": "Ûنگیرین", + "hu_HU": "Ûنگیرین (Ûنگری)", + "hy": "ارمینی", + "hy_AM": "ارمینی (آرمینیا)", + "id": "انڈونیثیائی", + "id_ID": "انڈونیثیائی (انڈونیشیا)", + "ig": "اÙگبو", + "ig_NG": "اÙگبو (نائجیریا)", + "ii": "سچوان ای", + "ii_CN": "سچوان ای (چین)", + "is": "آئس لینڈک", + "is_IS": "آئس لینڈک (آئس لینڈ)", + "it": "اطالوی", + "it_CH": "اطالوی (سوئٹزر لینڈ)", + "it_IT": "اطالوی (اٹلی)", + "it_SM": "اطالوی (سان مارینو)", + "ja": "جاپانی", + "ja_JP": "جاپانی (جاپان)", + "ka": "جارجی", + "ka_GE": "جارجی (جارجیا)", + "ki": "کیکویو", + "ki_KE": "کیکویو (کینیا)", + "kk": "قزاخ", + "kk_KZ": "قزاخ (قازقستان)", + "kl": "كالاليست", + "kl_GL": "كالاليست (گرین لینڈ)", + "km": "خمیر", + "km_KH": "خمیر (کمبوڈیا)", + "kn": "کنّاڈا", + "kn_IN": "کنّاڈا (بھارت)", + "ko": "کوریائی", + "ko_KP": "کوریائی (شمالی کوریا)", + "ko_KR": "کوریائی (جنوبی کوریا)", + "ks": "کشمیری", + "ks_IN": "کشمیری (بھارت)", + "kw": "کورنش", + "kw_GB": "کورنش (سلطنت متحدÛ)", + "ky": "کرغیزی", + "ky_KG": "کرغیزی (کرغزستان)", + "lb": "لکسمبرگیش", + "lb_LU": "لکسمبرگیش (لکسمبرگ)", + "lg": "گینڈا", + "lg_UG": "گینڈا (یوگنڈا)", + "ln": "Ù„Ùنگَلا", + "ln_AO": "Ù„Ùنگَلا (انگولا)", + "ln_CD": "Ù„Ùنگَلا (کانگو - کنشاسا)", + "ln_CF": "Ù„Ùنگَلا (وسط Ø§ÙØ±ÛŒÙ‚ÛŒ جمÛوریÛ)", + "ln_CG": "Ù„Ùنگَلا (کانگو - برازاویلے)", + "lo": "لاؤ", + "lo_LA": "لاؤ (لاؤس)", + "lt": "لیتھوینین", + "lt_LT": "لیتھوینین (لیتھونیا)", + "lu": "لبا-كاتانجا", + "lu_CD": "لبا-كاتانجا (کانگو - کنشاسا)", + "lv": "لیٹوین", + "lv_LV": "لیٹوین (لٹویا)", + "mg": "ملاگاسی", + "mg_MG": "ملاگاسی (مڈغاسکر)", + "mk": "مقدونیائی", + "mk_MK": "مقدونیائی (مقدونیÛ)", + "ml": "مالایالم", + "ml_IN": "مالایالم (بھارت)", + "mn": "منگولین", + "mn_MN": "منگولین (منگولیا)", + "mr": "مراٹهی", + "mr_IN": "مراٹهی (بھارت)", + "ms": "مالے", + "ms_BN": "مالے (برونائی)", + "ms_MY": "مالے (ملائشیا)", + "ms_SG": "مالے (سنگاپور)", + "mt": "مالٹی", + "mt_MT": "مالٹی (مالٹا)", + "my": "برمی", + "my_MM": "برمی (میانمار (برما))", + "nb": "نارویجین بوکمل", + "nb_NO": "نارویجین بوکمل (ناروے)", + "nb_SJ": "نارویجین بوکمل (سوالبرڈ اور جان ماین)", + "nd": "شمالی دبیل", + "nd_ZW": "شمالی دبیل (زمبابوے)", + "ne": "نیپالی", + "ne_IN": "نیپالی (بھارت)", + "ne_NP": "نیپالی (نیپال)", + "nl": "ÚˆÚ†", + "nl_AW": "ÚˆÚ† (اروبا)", + "nl_BE": "ÚˆÚ† (بیلجیم)", + "nl_BQ": "ÚˆÚ† (کریبیائی نیدرلینڈز)", + "nl_CW": "ÚˆÚ† (کیوراکاؤ)", + "nl_NL": "ÚˆÚ† (نیدر لینڈز)", + "nl_SR": "ÚˆÚ† (سورینام)", + "nl_SX": "ÚˆÚ† (سنٹ مارٹن)", + "nn": "نورویجینی نینورسک", + "nn_NO": "نورویجینی نینورسک (ناروے)", + "no": "نارویجین", + "no_NO": "نارویجین (ناروے)", + "om": "اورومو", + "om_ET": "اورومو (ایتھوپیا)", + "om_KE": "اورومو (کینیا)", + "or": "اڑیÛ", + "or_IN": "Ø§Ú‘ÛŒÛ (بھارت)", + "os": "اوسیٹک", + "os_GE": "اوسیٹک (جارجیا)", + "os_RU": "اوسیٹک (روس)", + "pa": "پنجابی", + "pa_Arab": "پنجابی (عربی)", + "pa_Arab_PK": "پنجابی (عربی, پاکستان)", + "pa_Guru": "پنجابی (گرمکھی)", + "pa_Guru_IN": "پنجابی (گرمکھی, بھارت)", + "pa_IN": "پنجابی (بھارت)", + "pa_PK": "پنجابی (پاکستان)", + "pl": "پولش", + "pl_PL": "پولش (پولینڈ)", + "ps": "پشتو", + "ps_AF": "پشتو (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "pt": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ", + "pt_AO": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ (انگولا)", + "pt_BR": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ (برازیل)", + "pt_CH": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ (سوئٹزر لینڈ)", + "pt_CV": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ (کیپ ورڈی)", + "pt_GQ": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ (استوائی گیانا)", + "pt_GW": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ (Ú¯Ù†ÛŒ بساؤ)", + "pt_LU": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ (لکسمبرگ)", + "pt_MO": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ (مکاؤ SAR چین)", + "pt_MZ": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ (موزمبیق)", + "pt_PT": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ (پرتگال)", + "pt_ST": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ (ساؤ ٹوم اور پرنسپے)", + "pt_TL": "Ù¾ÙØ±ØªÚ¯Ø§Ù„ÛŒ (تیمور لیسٹ)", + "qu": "کویچوآ", + "qu_BO": "کویچوآ (بولیویا)", + "qu_EC": "کویچوآ (ایکواڈور)", + "qu_PE": "کویچوآ (پیرو)", + "rm": "رومانش", + "rm_CH": "رومانش (سوئٹزر لینڈ)", + "rn": "رونڈی", + "rn_BI": "رونڈی (برونڈی)", + "ro": "رومینین", + "ro_MD": "رومینین (مالدووا)", + "ro_RO": "رومینین (رومانیÛ)", + "ru": "روسی", + "ru_BY": "روسی (بیلاروس)", + "ru_KG": "روسی (کرغزستان)", + "ru_KZ": "روسی (قازقستان)", + "ru_MD": "روسی (مالدووا)", + "ru_RU": "روسی (روس)", + "ru_UA": "روسی (یوکرین)", + "rw": "کینیاروانڈا", + "rw_RW": "کینیاروانڈا (روانڈا)", + "se": "شمالی سامی", + "se_FI": "شمالی سامی (ÙÙ† لینڈ)", + "se_NO": "شمالی سامی (ناروے)", + "se_SE": "شمالی سامی (سویڈن)", + "sg": "ساںغو", + "sg_CF": "ساںغو (وسط Ø§ÙØ±ÛŒÙ‚ÛŒ جمÛوریÛ)", + "sh": "سربو-کروئیشین", + "sh_BA": "سربو-کروئیشین (بوسنیا اور ÛØ±Ø²ÛŒÚ¯ÙˆÙˆÛŒÙ†Ø§)", + "si": "Ø³Ù†ÛØ§Ù„ا", + "si_LK": "Ø³Ù†ÛØ§Ù„ا (سری لنکا)", + "sk": "سلوواک", + "sk_SK": "سلوواک (سلوواکیÛ)", + "sl": "سلووینیائی", + "sl_SI": "سلووینیائی (سلووینیا)", + "sn": "شونا", + "sn_ZW": "شونا (زمبابوے)", + "so": "صومالی", + "so_DJ": "صومالی (جبوتی)", + "so_ET": "صومالی (ایتھوپیا)", + "so_KE": "صومالی (کینیا)", + "so_SO": "صومالی (صومالیÛ)", + "sq": "البانی", + "sq_AL": "البانی (البانیÛ)", + "sq_MK": "البانی (مقدونیÛ)", + "sq_XK": "البانی (کوسووو)", + "sr": "سربین", + "sr_BA": "سربین (بوسنیا اور ÛØ±Ø²ÛŒÚ¯ÙˆÙˆÛŒÙ†Ø§)", + "sr_Cyrl": "سربین (سیریلک)", + "sr_Cyrl_BA": "سربین (سیریلک, بوسنیا اور ÛØ±Ø²ÛŒÚ¯ÙˆÙˆÛŒÙ†Ø§)", + "sr_Cyrl_ME": "سربین (سیریلک, مونٹے نیگرو)", + "sr_Cyrl_RS": "سربین (سیریلک, سربیا)", + "sr_Cyrl_XK": "سربین (سیریلک, کوسووو)", + "sr_Latn": "سربین (لاطینی)", + "sr_Latn_BA": "سربین (لاطینی, بوسنیا اور ÛØ±Ø²ÛŒÚ¯ÙˆÙˆÛŒÙ†Ø§)", + "sr_Latn_ME": "سربین (لاطینی, مونٹے نیگرو)", + "sr_Latn_RS": "سربین (لاطینی, سربیا)", + "sr_Latn_XK": "سربین (لاطینی, کوسووو)", + "sr_ME": "سربین (مونٹے نیگرو)", + "sr_RS": "سربین (سربیا)", + "sr_XK": "سربین (کوسووو)", + "sv": "سویڈش", + "sv_AX": "سویڈش (آلینڈ آئلینڈز)", + "sv_FI": "سویڈش (ÙÙ† لینڈ)", + "sv_SE": "سویڈش (سویڈن)", + "sw": "سواحلی", + "sw_CD": "سواحلی (کانگو - کنشاسا)", + "sw_KE": "سواحلی (کینیا)", + "sw_TZ": "سواحلی (تنزانیÛ)", + "sw_UG": "سواحلی (یوگنڈا)", + "ta": "تمل", + "ta_IN": "تمل (بھارت)", + "ta_LK": "تمل (سری لنکا)", + "ta_MY": "تمل (ملائشیا)", + "ta_SG": "تمل (سنگاپور)", + "te": "تیلگو", + "te_IN": "تیلگو (بھارت)", + "th": "تھائی", + "th_TH": "تھائی (تھائی لینڈ)", + "ti": "ٹگرینیا", + "ti_ER": "ٹگرینیا (اریٹیریا)", + "ti_ET": "ٹگرینیا (ایتھوپیا)", + "tl": "ٹیگا لوگ", + "tl_PH": "ٹیگا لوگ (Ùلپائن)", + "to": "ٹونگن", + "to_TO": "ٹونگن (ٹونگا)", + "tr": "ترکی", + "tr_CY": "ترکی (قبرص)", + "tr_TR": "ترکی (ترکی)", + "ug": "ÛŒÙˆØ¦Ú¯ÛØ±", + "ug_CN": "ÛŒÙˆØ¦Ú¯ÛØ± (چین)", + "uk": "یوکرینیائی", + "uk_UA": "یوکرینیائی (یوکرین)", + "ur": "اردو", + "ur_IN": "اردو (بھارت)", + "ur_PK": "اردو (پاکستان)", + "uz": "ازبیک", + "uz_AF": "ازبیک (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "uz_Arab": "ازبیک (عربی)", + "uz_Arab_AF": "ازبیک (عربی, Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "uz_Cyrl": "ازبیک (سیریلک)", + "uz_Cyrl_UZ": "ازبیک (سیریلک, ازبکستان)", + "uz_Latn": "ازبیک (لاطینی)", + "uz_Latn_UZ": "ازبیک (لاطینی, ازبکستان)", + "uz_UZ": "ازبیک (ازبکستان)", + "vi": "ویتنامی", + "vi_VN": "ویتنامی (ویتنام)", + "yi": "یدش", + "yo": "یوروبا", + "yo_BJ": "یوروبا (بینن)", + "yo_NG": "یوروبا (نائجیریا)", + "zh": "چینی", + "zh_CN": "چینی (چین)", + "zh_HK": "چینی (ÛØ§Ù†Ú¯ کانگ SAR چین)", + "zh_Hans": "چینی (آسان)", + "zh_Hans_CN": "چینی (آسان, چین)", + "zh_Hans_HK": "چینی (آسان, ÛØ§Ù†Ú¯ کانگ SAR چین)", + "zh_Hans_MO": "چینی (آسان, مکاؤ SAR چین)", + "zh_Hans_SG": "چینی (آسان, سنگاپور)", + "zh_Hant": "چینی (روایتی)", + "zh_Hant_HK": "چینی (روایتی, ÛØ§Ù†Ú¯ کانگ SAR چین)", + "zh_Hant_MO": "چینی (روایتی, مکاؤ SAR چین)", + "zh_Hant_TW": "چینی (روایتی, تائیوان)", + "zh_MO": "چینی (مکاؤ SAR چین)", + "zh_SG": "چینی (سنگاپور)", + "zh_TW": "چینی (تائیوان)", + "zu": "زولو", + "zu_ZA": "زولو (جنوبی Ø§ÙØ±ÛŒÙ‚Û)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ur_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ur_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..03c866c19c7c9d9a36a885db8cc6c62394c2c93f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/ur_IN.json @@ -0,0 +1,34 @@ +{ + "Names": { + "af": "Ø§ÙØ±ÛŒÙ‚ÛŒ", + "af_NA": "Ø§ÙØ±ÛŒÙ‚ÛŒ (نامیبیا)", + "af_ZA": "Ø§ÙØ±ÛŒÙ‚ÛŒ (جنوبی Ø§ÙØ±ÛŒÙ‚Û)", + "en_CC": "انگریزی (جزائر (کیلنگ) کوکوس)", + "en_CK": "انگریزی (جزائر Ú©Ú©)", + "en_DG": "انگریزی (ڈیگو گارشیا)", + "en_FK": "انگریزی (جزائر ÙØ§Ú©Ù„ینڈ)", + "en_IO": "انگریزی (برطانوی بحرÛند خطÛ)", + "en_MH": "انگریزی (جزائر مارشل)", + "en_MP": "انگریزی (جزائر شمالی ماریانا)", + "en_NF": "انگریزی (Ø¬Ø²ÛŒØ±Û Ù†Ø§Ø±ÙÙˆÚ©)", + "en_PN": "انگریزی (جزائر پٹکیرن)", + "en_SB": "انگریزی (جزائر سلیمان)", + "en_TC": "انگریزی (جزائر کیکس Ùˆ ترکیÛ)", + "en_UM": "انگریزی (امریکی بیرونی جزائر)", + "en_VG": "انگریزی (برطانوی جزائر ورجن)", + "en_VI": "انگریزی (امریکی جزائر ورجن)", + "es_IC": "ÛØ³Ù¾Ø§Ù†ÙˆÛŒ (جزائر کناری)", + "fo_FO": "Ùیروئیز (جزائر Ùیرو)", + "fr_GF": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ (ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ گیانا)", + "hr": "کروشین", + "hr_BA": "کروشین (بوسنیا اور ÛØ±Ø²ÛŒÚ¯ÙˆÙˆÛŒÙ†Ø§)", + "hr_HR": "کروشین (کروشیا)", + "ka": "جارجيائى", + "ka_GE": "جارجيائى (جارجیا)", + "kl": "کلالیسٹ", + "kl_GL": "کلالیسٹ (گرین لینڈ)", + "kn": "Ú©Ù†Ú‘", + "kn_IN": "Ú©Ù†Ú‘ (بھارت)", + "sv_AX": "سویڈش (جزائر آلینڈ)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz.json new file mode 100644 index 0000000000000000000000000000000000000000..7ea75655321cdf1a7e1d64100e2e5c6a0b9683dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz.json @@ -0,0 +1,555 @@ +{ + "Names": { + "af": "afrikaans", + "af_NA": "afrikaans (Namibiya)", + "af_ZA": "afrikaans (Janubiy Afrika Respublikasi)", + "ak": "akan", + "ak_GH": "akan (Gana)", + "am": "amxar", + "am_ET": "amxar (Efiopiya)", + "ar": "arab", + "ar_AE": "arab (Birlashgan Arab Amirliklari)", + "ar_BH": "arab (Bahrayn)", + "ar_DJ": "arab (Jibuti)", + "ar_DZ": "arab (Jazoir)", + "ar_EG": "arab (Misr)", + "ar_EH": "arab (G‘arbiy Sahroi Kabir)", + "ar_ER": "arab (Eritreya)", + "ar_IL": "arab (Isroil)", + "ar_IQ": "arab (Iroq)", + "ar_JO": "arab (Iordaniya)", + "ar_KM": "arab (Komor orollari)", + "ar_KW": "arab (Quvayt)", + "ar_LB": "arab (Livan)", + "ar_LY": "arab (Liviya)", + "ar_MA": "arab (Marokash)", + "ar_MR": "arab (Mavritaniya)", + "ar_OM": "arab (Ummon)", + "ar_PS": "arab (Falastin hududi)", + "ar_QA": "arab (Qatar)", + "ar_SA": "arab (Saudiya Arabistoni)", + "ar_SD": "arab (Sudan)", + "ar_SO": "arab (Somali)", + "ar_SS": "arab (Janubiy Sudan)", + "ar_SY": "arab (Suriya)", + "ar_TD": "arab (Chad)", + "ar_TN": "arab (Tunis)", + "ar_YE": "arab (Yaman)", + "as": "assam", + "as_IN": "assam (Hindiston)", + "az": "ozarbayjon", + "az_AZ": "ozarbayjon (Ozarbayjon)", + "az_Cyrl": "ozarbayjon (kirill)", + "az_Cyrl_AZ": "ozarbayjon (kirill, Ozarbayjon)", + "az_Latn": "ozarbayjon (lotin)", + "az_Latn_AZ": "ozarbayjon (lotin, Ozarbayjon)", + "be": "belarus", + "be_BY": "belarus (Belarus)", + "bg": "bolgar", + "bg_BG": "bolgar (Bolgariya)", + "bm": "bambara", + "bm_ML": "bambara (Mali)", + "bn": "bengal", + "bn_BD": "bengal (Bangladesh)", + "bn_IN": "bengal (Hindiston)", + "bo": "tibet", + "bo_CN": "tibet (Xitoy)", + "bo_IN": "tibet (Hindiston)", + "br": "breton", + "br_FR": "breton (Fransiya)", + "bs": "bosniy", + "bs_BA": "bosniy (Bosniya va Gertsegovina)", + "bs_Cyrl": "bosniy (kirill)", + "bs_Cyrl_BA": "bosniy (kirill, Bosniya va Gertsegovina)", + "bs_Latn": "bosniy (lotin)", + "bs_Latn_BA": "bosniy (lotin, Bosniya va Gertsegovina)", + "ca": "katalan", + "ca_AD": "katalan (Andorra)", + "ca_ES": "katalan (Ispaniya)", + "ca_FR": "katalan (Fransiya)", + "ca_IT": "katalan (Italiya)", + "ce": "chechen", + "ce_RU": "chechen (Rossiya)", + "cs": "chex", + "cs_CZ": "chex (Chexiya Respublikasi)", + "cy": "valliy", + "cy_GB": "valliy (Buyuk Britaniya)", + "da": "dat", + "da_DK": "dat (Daniya)", + "da_GL": "dat (Grenlandiya)", + "de": "nemischa", + "de_AT": "nemischa (Avstriya)", + "de_BE": "nemischa (Belgiya)", + "de_CH": "nemischa (Shveytsariya)", + "de_DE": "nemischa (Germaniya)", + "de_IT": "nemischa (Italiya)", + "de_LI": "nemischa (Lixtenshteyn)", + "de_LU": "nemischa (Lyuksemburg)", + "dz": "dzongka", + "dz_BT": "dzongka (Butan)", + "ee": "eve", + "ee_GH": "eve (Gana)", + "ee_TG": "eve (Togo)", + "el": "grek", + "el_CY": "grek (Kipr)", + "el_GR": "grek (Gretsiya)", + "en": "inglizcha", + "en_AG": "inglizcha (Antigua va Barbuda)", + "en_AI": "inglizcha (Angilya)", + "en_AS": "inglizcha (Amerika Samoasi)", + "en_AT": "inglizcha (Avstriya)", + "en_AU": "inglizcha (Avstraliya)", + "en_BB": "inglizcha (Barbados)", + "en_BE": "inglizcha (Belgiya)", + "en_BI": "inglizcha (Burundi)", + "en_BM": "inglizcha (Bermuda orollari)", + "en_BS": "inglizcha (Bagama orollari)", + "en_BW": "inglizcha (Botsvana)", + "en_BZ": "inglizcha (Beliz)", + "en_CA": "inglizcha (Kanada)", + "en_CC": "inglizcha (Kokos (Kiling) orollari)", + "en_CH": "inglizcha (Shveytsariya)", + "en_CK": "inglizcha (Kuk orollari)", + "en_CM": "inglizcha (Kamerun)", + "en_CX": "inglizcha (Rojdestvo oroli)", + "en_CY": "inglizcha (Kipr)", + "en_DE": "inglizcha (Germaniya)", + "en_DG": "inglizcha (Diyego-Garsiya)", + "en_DK": "inglizcha (Daniya)", + "en_DM": "inglizcha (Dominika)", + "en_ER": "inglizcha (Eritreya)", + "en_FI": "inglizcha (Finlandiya)", + "en_FJ": "inglizcha (Fiji)", + "en_FK": "inglizcha (Folklend orollari)", + "en_FM": "inglizcha (Mikroneziya)", + "en_GB": "inglizcha (Buyuk Britaniya)", + "en_GD": "inglizcha (Grenada)", + "en_GG": "inglizcha (Gernsi)", + "en_GH": "inglizcha (Gana)", + "en_GI": "inglizcha (Gibraltar)", + "en_GM": "inglizcha (Gambiya)", + "en_GU": "inglizcha (Guam)", + "en_GY": "inglizcha (Gayana)", + "en_HK": "inglizcha (Gonkong (Xitoy MMH))", + "en_IE": "inglizcha (Irlandiya)", + "en_IL": "inglizcha (Isroil)", + "en_IM": "inglizcha (Men oroli)", + "en_IN": "inglizcha (Hindiston)", + "en_IO": "inglizcha (Britaniyaning Hind okeanidagi hududi)", + "en_JE": "inglizcha (Jersi)", + "en_JM": "inglizcha (Yamayka)", + "en_KE": "inglizcha (Keniya)", + "en_KI": "inglizcha (Kiribati)", + "en_KN": "inglizcha (Sent-Kits va Nevis)", + "en_KY": "inglizcha (Kayman orollari)", + "en_LC": "inglizcha (Sent-Lyusiya)", + "en_LR": "inglizcha (Liberiya)", + "en_LS": "inglizcha (Lesoto)", + "en_MG": "inglizcha (Madagaskar)", + "en_MH": "inglizcha (Marshall orollari)", + "en_MO": "inglizcha (Makao (Xitoy MMH))", + "en_MP": "inglizcha (Shimoliy Mariana orollari)", + "en_MS": "inglizcha (Montserrat)", + "en_MT": "inglizcha (Malta)", + "en_MU": "inglizcha (Mavrikiy)", + "en_MW": "inglizcha (Malavi)", + "en_MY": "inglizcha (Malayziya)", + "en_NA": "inglizcha (Namibiya)", + "en_NF": "inglizcha (Norfolk oroli)", + "en_NG": "inglizcha (Nigeriya)", + "en_NL": "inglizcha (Niderlandiya)", + "en_NR": "inglizcha (Nauru)", + "en_NU": "inglizcha (Niue)", + "en_NZ": "inglizcha (Yangi Zelandiya)", + "en_PG": "inglizcha (Papua – Yangi Gvineya)", + "en_PH": "inglizcha (Filippin)", + "en_PK": "inglizcha (Pokiston)", + "en_PN": "inglizcha (Pitkern orollari)", + "en_PR": "inglizcha (Puerto-Riko)", + "en_PW": "inglizcha (Palau)", + "en_RW": "inglizcha (Ruanda)", + "en_SB": "inglizcha (Solomon orollari)", + "en_SC": "inglizcha (Seyshel orollari)", + "en_SD": "inglizcha (Sudan)", + "en_SE": "inglizcha (Shvetsiya)", + "en_SG": "inglizcha (Singapur)", + "en_SH": "inglizcha (Muqaddas Yelena oroli)", + "en_SI": "inglizcha (Sloveniya)", + "en_SL": "inglizcha (Syerra-Leone)", + "en_SS": "inglizcha (Janubiy Sudan)", + "en_SX": "inglizcha (Sint-Marten)", + "en_SZ": "inglizcha (Svazilend)", + "en_TC": "inglizcha (Turks va Kaykos orollari)", + "en_TK": "inglizcha (Tokelau)", + "en_TO": "inglizcha (Tonga)", + "en_TT": "inglizcha (Trinidad va Tobago)", + "en_TV": "inglizcha (Tuvalu)", + "en_TZ": "inglizcha (Tanzaniya)", + "en_UG": "inglizcha (Uganda)", + "en_UM": "inglizcha (AQSH yondosh orollari)", + "en_US": "inglizcha (Amerika Qo‘shma Shtatlari)", + "en_VC": "inglizcha (Sent-Vinsent va Grenadin)", + "en_VG": "inglizcha (Britaniya Virgin orollari)", + "en_VI": "inglizcha (AQSH Virgin orollari)", + "en_VU": "inglizcha (Vanuatu)", + "en_WS": "inglizcha (Samoa)", + "en_ZA": "inglizcha (Janubiy Afrika Respublikasi)", + "en_ZM": "inglizcha (Zambiya)", + "en_ZW": "inglizcha (Zimbabve)", + "eo": "esperanto", + "es": "ispancha", + "es_AR": "ispancha (Argentina)", + "es_BO": "ispancha (Boliviya)", + "es_BR": "ispancha (Braziliya)", + "es_CL": "ispancha (Chili)", + "es_CO": "ispancha (Kolumbiya)", + "es_CR": "ispancha (Kosta-Rika)", + "es_CU": "ispancha (Kuba)", + "es_DO": "ispancha (Dominikan Respublikasi)", + "es_EA": "ispancha (Seuta va Melilya)", + "es_EC": "ispancha (Ekvador)", + "es_ES": "ispancha (Ispaniya)", + "es_GQ": "ispancha (Ekvatorial Gvineya)", + "es_GT": "ispancha (Gvatemala)", + "es_HN": "ispancha (Gonduras)", + "es_IC": "ispancha (Kanar orollari)", + "es_MX": "ispancha (Meksika)", + "es_NI": "ispancha (Nikaragua)", + "es_PA": "ispancha (Panama)", + "es_PE": "ispancha (Peru)", + "es_PH": "ispancha (Filippin)", + "es_PR": "ispancha (Puerto-Riko)", + "es_PY": "ispancha (Paragvay)", + "es_SV": "ispancha (Salvador)", + "es_US": "ispancha (Amerika Qo‘shma Shtatlari)", + "es_UY": "ispancha (Urugvay)", + "es_VE": "ispancha (Venesuela)", + "et": "estoncha", + "et_EE": "estoncha (Estoniya)", + "eu": "bask", + "eu_ES": "bask (Ispaniya)", + "fa": "fors", + "fa_AF": "fors (AfgÊ»oniston)", + "fa_IR": "fors (Eron)", + "fi": "fincha", + "fi_FI": "fincha (Finlandiya)", + "fo": "farercha", + "fo_DK": "farercha (Daniya)", + "fo_FO": "farercha (Farer orollari)", + "fr": "fransuzcha", + "fr_BE": "fransuzcha (Belgiya)", + "fr_BF": "fransuzcha (Burkina-Faso)", + "fr_BI": "fransuzcha (Burundi)", + "fr_BJ": "fransuzcha (Benin)", + "fr_BL": "fransuzcha (Sen-Bartelemi)", + "fr_CA": "fransuzcha (Kanada)", + "fr_CD": "fransuzcha (Kongo – Kinshasa)", + "fr_CF": "fransuzcha (Markaziy Afrika Respublikasi)", + "fr_CG": "fransuzcha (Kongo – Brazzavil)", + "fr_CH": "fransuzcha (Shveytsariya)", + "fr_CI": "fransuzcha (Kot-d’Ivuar)", + "fr_CM": "fransuzcha (Kamerun)", + "fr_DJ": "fransuzcha (Jibuti)", + "fr_DZ": "fransuzcha (Jazoir)", + "fr_FR": "fransuzcha (Fransiya)", + "fr_GA": "fransuzcha (Gabon)", + "fr_GF": "fransuzcha (Fransuz Gvianasi)", + "fr_GN": "fransuzcha (Gvineya)", + "fr_GP": "fransuzcha (Gvadelupe)", + "fr_GQ": "fransuzcha (Ekvatorial Gvineya)", + "fr_HT": "fransuzcha (Gaiti)", + "fr_KM": "fransuzcha (Komor orollari)", + "fr_LU": "fransuzcha (Lyuksemburg)", + "fr_MA": "fransuzcha (Marokash)", + "fr_MC": "fransuzcha (Monako)", + "fr_MF": "fransuzcha (Sent-Martin)", + "fr_MG": "fransuzcha (Madagaskar)", + "fr_ML": "fransuzcha (Mali)", + "fr_MQ": "fransuzcha (Martinika)", + "fr_MR": "fransuzcha (Mavritaniya)", + "fr_MU": "fransuzcha (Mavrikiy)", + "fr_NC": "fransuzcha (Yangi Kaledoniya)", + "fr_NE": "fransuzcha (Niger)", + "fr_PF": "fransuzcha (Fransuz Polineziyasi)", + "fr_PM": "fransuzcha (Sen-Pyer va Mikelon)", + "fr_RE": "fransuzcha (Reyunion)", + "fr_RW": "fransuzcha (Ruanda)", + "fr_SC": "fransuzcha (Seyshel orollari)", + "fr_SN": "fransuzcha (Senegal)", + "fr_SY": "fransuzcha (Suriya)", + "fr_TD": "fransuzcha (Chad)", + "fr_TG": "fransuzcha (Togo)", + "fr_TN": "fransuzcha (Tunis)", + "fr_VU": "fransuzcha (Vanuatu)", + "fr_WF": "fransuzcha (Uollis va Futuna)", + "fr_YT": "fransuzcha (Mayotta)", + "fy": "g‘arbiy friz", + "fy_NL": "g‘arbiy friz (Niderlandiya)", + "ga": "irland", + "ga_IE": "irland (Irlandiya)", + "gl": "galisiy", + "gl_ES": "galisiy (Ispaniya)", + "gu": "gujarot", + "gu_IN": "gujarot (Hindiston)", + "gv": "men", + "gv_IM": "men (Men oroli)", + "ha": "xausa", + "ha_GH": "xausa (Gana)", + "ha_NE": "xausa (Niger)", + "ha_NG": "xausa (Nigeriya)", + "he": "ibroniy", + "he_IL": "ibroniy (Isroil)", + "hi": "hind", + "hi_IN": "hind (Hindiston)", + "hr": "xorvat", + "hr_BA": "xorvat (Bosniya va Gertsegovina)", + "hr_HR": "xorvat (Xorvatiya)", + "hu": "venger", + "hu_HU": "venger (Vengriya)", + "hy": "arman", + "hy_AM": "arman (Armaniston)", + "id": "indonez", + "id_ID": "indonez (Indoneziya)", + "ig": "igbo", + "ig_NG": "igbo (Nigeriya)", + "ii": "sichuan", + "ii_CN": "sichuan (Xitoy)", + "is": "island", + "is_IS": "island (Islandiya)", + "it": "italyan", + "it_CH": "italyan (Shveytsariya)", + "it_IT": "italyan (Italiya)", + "it_SM": "italyan (San-Marino)", + "ja": "yapon", + "ja_JP": "yapon (Yaponiya)", + "ka": "gruzincha", + "ka_GE": "gruzincha (Gruziya)", + "ki": "kikuyu", + "ki_KE": "kikuyu (Keniya)", + "kk": "qozoqcha", + "kk_KZ": "qozoqcha (QozogÊ»iston)", + "kl": "grenland", + "kl_GL": "grenland (Grenlandiya)", + "km": "xmercha", + "km_KH": "xmercha (Kambodja)", + "kn": "kannada", + "kn_IN": "kannada (Hindiston)", + "ko": "koreyscha", + "ko_KP": "koreyscha (Shimoliy Koreya)", + "ko_KR": "koreyscha (Janubiy Koreya)", + "ks": "kashmircha", + "ks_IN": "kashmircha (Hindiston)", + "kw": "korn", + "kw_GB": "korn (Buyuk Britaniya)", + "ky": "qirgÊ»izcha", + "ky_KG": "qirgÊ»izcha (QirgÊ»iziston)", + "lb": "lyuksemburgcha", + "lb_LU": "lyuksemburgcha (Lyuksemburg)", + "lg": "ganda", + "lg_UG": "ganda (Uganda)", + "ln": "lingala", + "ln_AO": "lingala (Angola)", + "ln_CD": "lingala (Kongo – Kinshasa)", + "ln_CF": "lingala (Markaziy Afrika Respublikasi)", + "ln_CG": "lingala (Kongo – Brazzavil)", + "lo": "laos", + "lo_LA": "laos (Laos)", + "lt": "litva", + "lt_LT": "litva (Litva)", + "lu": "luba-katanga", + "lu_CD": "luba-katanga (Kongo – Kinshasa)", + "lv": "latishcha", + "lv_LV": "latishcha (Latviya)", + "mg": "malagasiy", + "mg_MG": "malagasiy (Madagaskar)", + "mk": "makedon", + "mk_MK": "makedon (Makedoniya)", + "ml": "malayalam", + "ml_IN": "malayalam (Hindiston)", + "mn": "mo‘g‘ul", + "mn_MN": "mo‘g‘ul (Mongoliya)", + "mr": "maratxi", + "mr_IN": "maratxi (Hindiston)", + "ms": "malay", + "ms_BN": "malay (Bruney)", + "ms_MY": "malay (Malayziya)", + "ms_SG": "malay (Singapur)", + "mt": "maltiy", + "mt_MT": "maltiy (Malta)", + "my": "birman", + "my_MM": "birman (Myanma (Birma))", + "nb": "norveg-bokmal", + "nb_NO": "norveg-bokmal (Norvegiya)", + "nb_SJ": "norveg-bokmal (Svalbard va Yan-Mayen)", + "nd": "shimoliy ndebele", + "nd_ZW": "shimoliy ndebele (Zimbabve)", + "ne": "nepal", + "ne_IN": "nepal (Hindiston)", + "ne_NP": "nepal (Nepal)", + "nl": "golland", + "nl_AW": "golland (Aruba)", + "nl_BE": "golland (Belgiya)", + "nl_BQ": "golland (Boneyr, Sint-Estatius va Saba)", + "nl_CW": "golland (Kyurasao)", + "nl_NL": "golland (Niderlandiya)", + "nl_SR": "golland (Surinam)", + "nl_SX": "golland (Sint-Marten)", + "nn": "norveg-nyunorsk", + "nn_NO": "norveg-nyunorsk (Norvegiya)", + "om": "oromo", + "om_ET": "oromo (Efiopiya)", + "om_KE": "oromo (Keniya)", + "or": "oriya", + "or_IN": "oriya (Hindiston)", + "os": "osetin", + "os_GE": "osetin (Gruziya)", + "os_RU": "osetin (Rossiya)", + "pa": "panjobcha", + "pa_Arab": "panjobcha (arab)", + "pa_Arab_PK": "panjobcha (arab, Pokiston)", + "pa_Guru": "panjobcha (gurmukxi)", + "pa_Guru_IN": "panjobcha (gurmukxi, Hindiston)", + "pa_IN": "panjobcha (Hindiston)", + "pa_PK": "panjobcha (Pokiston)", + "pl": "polyakcha", + "pl_PL": "polyakcha (Polsha)", + "ps": "pushtu", + "ps_AF": "pushtu (AfgÊ»oniston)", + "pt": "portugalcha", + "pt_AO": "portugalcha (Angola)", + "pt_BR": "portugalcha (Braziliya)", + "pt_CH": "portugalcha (Shveytsariya)", + "pt_CV": "portugalcha (Kabo-Verde)", + "pt_GQ": "portugalcha (Ekvatorial Gvineya)", + "pt_GW": "portugalcha (Gvineya-Bisau)", + "pt_LU": "portugalcha (Lyuksemburg)", + "pt_MO": "portugalcha (Makao (Xitoy MMH))", + "pt_MZ": "portugalcha (Mozambik)", + "pt_PT": "portugalcha (Portugaliya)", + "pt_ST": "portugalcha (San-Tome va Prinsipi)", + "pt_TL": "portugalcha (Timor-Leste)", + "qu": "kechua", + "qu_BO": "kechua (Boliviya)", + "qu_EC": "kechua (Ekvador)", + "qu_PE": "kechua (Peru)", + "rm": "romansh", + "rm_CH": "romansh (Shveytsariya)", + "rn": "rundi", + "rn_BI": "rundi (Burundi)", + "ro": "rumincha", + "ro_MD": "rumincha (Moldova)", + "ro_RO": "rumincha (Ruminiya)", + "ru": "ruscha", + "ru_BY": "ruscha (Belarus)", + "ru_KG": "ruscha (QirgÊ»iziston)", + "ru_KZ": "ruscha (QozogÊ»iston)", + "ru_MD": "ruscha (Moldova)", + "ru_RU": "ruscha (Rossiya)", + "ru_UA": "ruscha (Ukraina)", + "rw": "kinyaruanda", + "rw_RW": "kinyaruanda (Ruanda)", + "se": "shimoliy saam", + "se_FI": "shimoliy saam (Finlandiya)", + "se_NO": "shimoliy saam (Norvegiya)", + "se_SE": "shimoliy saam (Shvetsiya)", + "sg": "sango", + "sg_CF": "sango (Markaziy Afrika Respublikasi)", + "si": "singal", + "si_LK": "singal (Shri-Lanka)", + "sk": "slovakcha", + "sk_SK": "slovakcha (Slovakiya)", + "sl": "slovencha", + "sl_SI": "slovencha (Sloveniya)", + "sn": "shona", + "sn_ZW": "shona (Zimbabve)", + "so": "somalicha", + "so_DJ": "somalicha (Jibuti)", + "so_ET": "somalicha (Efiopiya)", + "so_KE": "somalicha (Keniya)", + "so_SO": "somalicha (Somali)", + "sq": "alban", + "sq_AL": "alban (Albaniya)", + "sq_MK": "alban (Makedoniya)", + "sq_XK": "alban (Kosovo)", + "sr": "serbcha", + "sr_BA": "serbcha (Bosniya va Gertsegovina)", + "sr_Cyrl": "serbcha (kirill)", + "sr_Cyrl_BA": "serbcha (kirill, Bosniya va Gertsegovina)", + "sr_Cyrl_ME": "serbcha (kirill, Chernogoriya)", + "sr_Cyrl_RS": "serbcha (kirill, Serbiya)", + "sr_Cyrl_XK": "serbcha (kirill, Kosovo)", + "sr_Latn": "serbcha (lotin)", + "sr_Latn_BA": "serbcha (lotin, Bosniya va Gertsegovina)", + "sr_Latn_ME": "serbcha (lotin, Chernogoriya)", + "sr_Latn_RS": "serbcha (lotin, Serbiya)", + "sr_Latn_XK": "serbcha (lotin, Kosovo)", + "sr_ME": "serbcha (Chernogoriya)", + "sr_RS": "serbcha (Serbiya)", + "sr_XK": "serbcha (Kosovo)", + "sv": "shved", + "sv_AX": "shved (Aland orollari)", + "sv_FI": "shved (Finlandiya)", + "sv_SE": "shved (Shvetsiya)", + "sw": "suaxili", + "sw_CD": "suaxili (Kongo – Kinshasa)", + "sw_KE": "suaxili (Keniya)", + "sw_TZ": "suaxili (Tanzaniya)", + "sw_UG": "suaxili (Uganda)", + "ta": "tamil", + "ta_IN": "tamil (Hindiston)", + "ta_LK": "tamil (Shri-Lanka)", + "ta_MY": "tamil (Malayziya)", + "ta_SG": "tamil (Singapur)", + "te": "telugu", + "te_IN": "telugu (Hindiston)", + "th": "tay", + "th_TH": "tay (Tailand)", + "ti": "tigrinya", + "ti_ER": "tigrinya (Eritreya)", + "ti_ET": "tigrinya (Efiopiya)", + "to": "tongan", + "to_TO": "tongan (Tonga)", + "tr": "turk", + "tr_CY": "turk (Kipr)", + "tr_TR": "turk (Turkiya)", + "ug": "uyg‘ur", + "ug_CN": "uyg‘ur (Xitoy)", + "uk": "ukrain", + "uk_UA": "ukrain (Ukraina)", + "ur": "urdu", + "ur_IN": "urdu (Hindiston)", + "ur_PK": "urdu (Pokiston)", + "uz": "o‘zbek", + "uz_AF": "o‘zbek (AfgÊ»oniston)", + "uz_Arab": "o‘zbek (arab)", + "uz_Arab_AF": "o‘zbek (arab, AfgÊ»oniston)", + "uz_Cyrl": "o‘zbek (kirill)", + "uz_Cyrl_UZ": "o‘zbek (kirill, OÊ»zbekiston)", + "uz_Latn": "o‘zbek (lotin)", + "uz_Latn_UZ": "o‘zbek (lotin, OÊ»zbekiston)", + "uz_UZ": "o‘zbek (OÊ»zbekiston)", + "vi": "vyetnam", + "vi_VN": "vyetnam (Vyetnam)", + "yi": "idish", + "yo": "yoruba", + "yo_BJ": "yoruba (Benin)", + "yo_NG": "yoruba (Nigeriya)", + "zh": "xitoy", + "zh_CN": "xitoy (Xitoy)", + "zh_HK": "xitoy (Gonkong (Xitoy MMH))", + "zh_Hans": "xitoy (soddalashgan xitoy)", + "zh_Hans_CN": "xitoy (soddalashgan xitoy, Xitoy)", + "zh_Hans_HK": "xitoy (soddalashgan xitoy, Gonkong (Xitoy MMH))", + "zh_Hans_MO": "xitoy (soddalashgan xitoy, Makao (Xitoy MMH))", + "zh_Hans_SG": "xitoy (soddalashgan xitoy, Singapur)", + "zh_Hant": "xitoy (an’anaviy xitoy)", + "zh_Hant_HK": "xitoy (an’anaviy xitoy, Gonkong (Xitoy MMH))", + "zh_Hant_MO": "xitoy (an’anaviy xitoy, Makao (Xitoy MMH))", + "zh_Hant_TW": "xitoy (an’anaviy xitoy, Tayvan)", + "zh_MO": "xitoy (Makao (Xitoy MMH))", + "zh_SG": "xitoy (Singapur)", + "zh_TW": "xitoy (Tayvan)", + "zu": "zulu", + "zu_ZA": "zulu (Janubiy Afrika Respublikasi)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz_AF.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz_AF.json new file mode 100644 index 0000000000000000000000000000000000000000..d44b235f94c8afba3c4d9ece2b205aeb96a25c62 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz_AF.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "uz_Arab_AF" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz_Arab.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz_Arab.json new file mode 100644 index 0000000000000000000000000000000000000000..d467718ac10ad0084510c0cfb8dd434c923b19a7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz_Arab.json @@ -0,0 +1,20 @@ +{ + "Names": { + "fa": "دری", + "fa_AF": "دری (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "fa_IR": "دری (Eron)", + "pa_Arab": "panjobcha (عربی)", + "pa_Arab_PK": "panjobcha (عربی, Pokiston)", + "ps": "پشتو", + "ps_AF": "پشتو (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "uz": "اوزبیک", + "uz_AF": "اوزبیک (Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "uz_Arab": "اوزبیک (عربی)", + "uz_Arab_AF": "اوزبیک (عربی, Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†)", + "uz_Cyrl": "اوزبیک (kirill)", + "uz_Cyrl_UZ": "اوزبیک (kirill, OÊ»zbekiston)", + "uz_Latn": "اوزبیک (lotin)", + "uz_Latn_UZ": "اوزبیک (lotin, OÊ»zbekiston)", + "uz_UZ": "اوزبیک (OÊ»zbekiston)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..7bca83877a3b8a63b0d4845e614761a488fc31a7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz_Cyrl.json @@ -0,0 +1,560 @@ +{ + "Names": { + "af": "африкаанÑ", + "af_NA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (ÐамибиÑ)", + "af_ZA": "Ð°Ñ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (Жанубий Ðфрика РеÑпубликаÑи)", + "ak": "аканча", + "ak_GH": "аканча (Гана)", + "am": "амхарча", + "am_ET": "амхарча (ЭфиопиÑ)", + "ar": "арабча", + "ar_AE": "арабча (Бирлашган Ðраб Ðмирликлари)", + "ar_BH": "арабча (Баҳрайн)", + "ar_DJ": "арабча (Жибути)", + "ar_DZ": "арабча (Жазоир)", + "ar_EG": "арабча (МиÑÑ€)", + "ar_EH": "арабча (Ғарбий Саҳрои Кабир)", + "ar_ER": "арабча (ЭритреÑ)", + "ar_IL": "арабча (ИÑроил)", + "ar_IQ": "арабча (Ироқ)", + "ar_JO": "арабча (ИорданиÑ)", + "ar_KM": "арабча (Комор ороллари)", + "ar_KW": "арабча (Қувайт)", + "ar_LB": "арабча (Ливан)", + "ar_LY": "арабча (ЛивиÑ)", + "ar_MA": "арабча (Марокаш)", + "ar_MR": "арабча (МавританиÑ)", + "ar_OM": "арабча (Уммон)", + "ar_PS": "арабча (ФалаÑтин ҳудуди)", + "ar_QA": "арабча (Қатар)", + "ar_SA": "арабча (Ð¡Ð°ÑƒÐ´Ð¸Ñ ÐрабиÑтони)", + "ar_SD": "арабча (Судан)", + "ar_SO": "арабча (Сомали)", + "ar_SS": "арабча (Жанубий Судан)", + "ar_SY": "арабча (СуриÑ)", + "ar_TD": "арабча (Чад)", + "ar_TN": "арабча (ТуниÑ)", + "ar_YE": "арабча (Яман)", + "as": "аÑÑомча", + "as_IN": "аÑÑомча (ҲиндиÑтон)", + "az": "озарбайжонча", + "az_AZ": "озарбайжонча (Озарбайжон)", + "az_Cyrl": "озарбайжонча (Кирил)", + "az_Cyrl_AZ": "озарбайжонча (Кирил, Озарбайжон)", + "az_Latn": "озарбайжонча (Лотин)", + "az_Latn_AZ": "озарбайжонча (Лотин, Озарбайжон)", + "be": "беларуÑча", + "be_BY": "беларуÑча (БелоруÑиÑ)", + "bg": "болгарча", + "bg_BG": "болгарча (БолгариÑ)", + "bm": "бамбарча", + "bm_ML": "бамбарча (Мали)", + "bn": "бенгалча", + "bn_BD": "бенгалча (Бангладеш)", + "bn_IN": "бенгалча (ҲиндиÑтон)", + "bo": "тибетча", + "bo_CN": "тибетча (Хитой)", + "bo_IN": "тибетча (ҲиндиÑтон)", + "br": "бретонча", + "br_FR": "бретонча (ФранциÑ)", + "bs": "боÑнийча", + "bs_BA": "боÑнийча (БоÑÐ½Ð¸Ñ Ð²Ð° Герцеговина)", + "bs_Cyrl": "боÑнийча (Кирил)", + "bs_Cyrl_BA": "боÑнийча (Кирил, БоÑÐ½Ð¸Ñ Ð²Ð° Герцеговина)", + "bs_Latn": "боÑнийча (Лотин)", + "bs_Latn_BA": "боÑнийча (Лотин, БоÑÐ½Ð¸Ñ Ð²Ð° Герцеговина)", + "ca": "каталонча", + "ca_AD": "каталонча (Ðндорра)", + "ca_ES": "каталонча (ИÑпаниÑ)", + "ca_FR": "каталонча (ФранциÑ)", + "ca_IT": "каталонча (ИталиÑ)", + "ce": "чечен тили", + "ce_RU": "чечен тили (РоÑÑиÑ)", + "cs": "чехча", + "cs_CZ": "чехча (Ð§ÐµÑ…Ð¸Ñ Ð ÐµÑпубликаÑи)", + "cy": "уÑлÑча", + "cy_GB": "уÑлÑча (Буюк БританиÑ)", + "da": "датча", + "da_DK": "датча (ДаниÑ)", + "da_GL": "датча (ГренландиÑ)", + "de": "немиÑча", + "de_AT": "немиÑча (ÐвÑтриÑ)", + "de_BE": "немиÑча (БельгиÑ)", + "de_CH": "немиÑча (ШвейцариÑ)", + "de_DE": "немиÑча (ГерманиÑ)", + "de_IT": "немиÑча (ИталиÑ)", + "de_LI": "немиÑча (Лихтенштейн)", + "de_LU": "немиÑча (ЛюкÑембург)", + "dz": "дзонгка", + "dz_BT": "дзонгка (Бутан)", + "ee": "Ñвеча", + "ee_GH": "Ñвеча (Гана)", + "ee_TG": "Ñвеча (Того)", + "el": "грекча", + "el_CY": "грекча (Кипр)", + "el_GR": "грекча (ГрециÑ)", + "en": "инглизча", + "en_AG": "инглизча (Ðнтигуа ва Барбуда)", + "en_AI": "инглизча (ÐнгилÑ)", + "en_AS": "инглизча (Ðмерика СамоаÑи)", + "en_AT": "инглизча (ÐвÑтриÑ)", + "en_AU": "инглизча (ÐвÑтралиÑ)", + "en_BB": "инглизча (БарбадоÑ)", + "en_BE": "инглизча (БельгиÑ)", + "en_BI": "инглизча (Бурунди)", + "en_BM": "инглизча (Бермуда)", + "en_BS": "инглизча (Багама ороллари)", + "en_BW": "инглизча (БотÑванна)", + "en_BZ": "инглизча (Белиз)", + "en_CA": "инглизча (Канада)", + "en_CC": "инглизча (ÐšÐ¾ÐºÐ¾Ñ (Килинг) ороллари)", + "en_CH": "инглизча (ШвейцариÑ)", + "en_CK": "инглизча (Кук ороллари)", + "en_CM": "инглизча (Камерун)", + "en_CX": "инглизча (РождеÑтво ороли)", + "en_CY": "инглизча (Кипр)", + "en_DE": "инглизча (ГерманиÑ)", + "en_DG": "инглизча (Диего-ГарÑиÑ)", + "en_DK": "инглизча (ДаниÑ)", + "en_DM": "инглизча (Доминика)", + "en_ER": "инглизча (ЭритреÑ)", + "en_FI": "инглизча (ФинлÑндиÑ)", + "en_FJ": "инглизча (Фижи)", + "en_FK": "инглизча (Фолкленд ороллари)", + "en_FM": "инглизча (МикронезиÑ)", + "en_GB": "инглизча (Буюк БританиÑ)", + "en_GD": "инглизча (Гренада)", + "en_GG": "инглизча (ГернÑи)", + "en_GH": "инглизча (Гана)", + "en_GI": "инглизча (Гибралтар)", + "en_GM": "инглизча (ГамбиÑ)", + "en_GU": "инглизча (Гуам)", + "en_GY": "инглизча (ГаÑна)", + "en_HK": "инглизча (Гонконг (Хитой ММҲ))", + "en_IE": "инглизча (ИрландиÑ)", + "en_IL": "инглизча (ИÑроил)", + "en_IM": "инглизча (МÑн ороли)", + "en_IN": "инглизча (ҲиндиÑтон)", + "en_IO": "инглизча (БританиÑнинг Ҳинд океанидаги ҳудуди)", + "en_JE": "инглизча (ЖерÑи)", + "en_JM": "инглизча (Ямайка)", + "en_KE": "инглизча (КениÑ)", + "en_KI": "инглизча (Кирибати)", + "en_KN": "инглизча (Сент-ÐšÐ¸Ñ‚Ñ Ð²Ð° ÐевиÑ)", + "en_KY": "инглизча (Кайман ороллари)", + "en_LC": "инглизча (Сент-ЛюÑиÑ)", + "en_LR": "инглизча (ЛибериÑ)", + "en_LS": "инглизча (ЛеÑото)", + "en_MG": "инглизча (МадагаÑкар)", + "en_MH": "инглизча (Маршал ороллари)", + "en_MO": "инглизча (Макао (Хитой ММҲ))", + "en_MP": "инглизча (Шимолий Марианна ороллари)", + "en_MS": "инглизча (МонтÑеррат)", + "en_MT": "инглизча (Мальта)", + "en_MU": "инглизча (Маврикий)", + "en_MW": "инглизча (Малави)", + "en_MY": "инглизча (МалайзиÑ)", + "en_NA": "инглизча (ÐамибиÑ)", + "en_NF": "инглизча (Ðорфолк ороллари)", + "en_NG": "инглизча (ÐигериÑ)", + "en_NL": "инглизча (ÐидерландиÑ)", + "en_NR": "инглизча (Ðауру)", + "en_NU": "инглизча (ÐиуÑ)", + "en_NZ": "инглизча (Янги ЗеландиÑ)", + "en_PG": "инглизча (Папуа - Янги ГвинеÑ)", + "en_PH": "инглизча (Филиппин)", + "en_PK": "инглизча (ПокиÑтон)", + "en_PN": "инглизча (ПиткÑрн ороллари)", + "en_PR": "инглизча (ПуÑрто-Рико)", + "en_PW": "инглизча (Палау)", + "en_RW": "инглизча (Руанда)", + "en_SB": "инглизча (Соломон ороллари)", + "en_SC": "инглизча (Сейшел ороллари)", + "en_SD": "инглизча (Судан)", + "en_SE": "инглизча (ШвециÑ)", + "en_SG": "инглизча (Сингапур)", + "en_SH": "инглизча (ÐœÑƒÒ›Ð°Ð´Ð´Ð°Ñ Ð•Ð»ÐµÐ½Ð° ороли)", + "en_SI": "инглизча (СловениÑ)", + "en_SL": "инглизча (Сьерра-Леоне)", + "en_SS": "инглизча (Жанубий Судан)", + "en_SX": "инглизча (Синт-Мартен)", + "en_SZ": "инглизча (Свазиленд)", + "en_TC": "инглизча (Ð¢ÑƒÑ€ÐºÑ Ð²Ð° ÐšÐ°Ð¹ÐºÐ¾Ñ Ð¾Ñ€Ð¾Ð»Ð»Ð°Ñ€Ð¸)", + "en_TK": "инглизча (Токелау)", + "en_TO": "инглизча (Тонга)", + "en_TT": "инглизча (Тринидад ва Тобаго)", + "en_TV": "инглизча (Тувалу)", + "en_TZ": "инглизча (ТанзаниÑ)", + "en_UG": "инглизча (Уганда)", + "en_UM": "инглизча (ÐҚШ ёндош ороллари)", + "en_US": "инглизча (Ðмерика Қўшма Штатлари)", + "en_VC": "инглизча (Сент-ВинÑент ва Гренадин)", + "en_VG": "инглизча (Ð‘Ñ€Ñ‚Ð°Ð½Ð¸Ñ Ð’Ð¸Ñ€Ð³Ð¸Ð½ ороллари)", + "en_VI": "инглизча (ÐҚШ Виргин ороллари)", + "en_VU": "инглизча (Вануату)", + "en_WS": "инглизча (Самоа)", + "en_ZA": "инглизча (Жанубий Ðфрика РеÑпубликаÑи)", + "en_ZM": "инглизча (ЗамбиÑ)", + "en_ZW": "инглизча (Зимбабве)", + "eo": "ÑÑперанто", + "es": "иÑпанча", + "es_AR": "иÑпанча (Ðргентина)", + "es_BO": "иÑпанча (БоливиÑ)", + "es_BR": "иÑпанча (БразилиÑ)", + "es_CL": "иÑпанча (Чили)", + "es_CO": "иÑпанча (КолумбиÑ)", + "es_CR": "иÑпанча (КоÑта-Рика)", + "es_CU": "иÑпанча (Куба)", + "es_DO": "иÑпанча (Доминикан РеÑпубликаÑи)", + "es_EA": "иÑпанча (СÑута ва Мелилла)", + "es_EC": "иÑпанча (Эквадор)", + "es_ES": "иÑпанча (ИÑпаниÑ)", + "es_GQ": "иÑпанча (Экваториал ГвинеÑ)", + "es_GT": "иÑпанча (Гватемала)", + "es_HN": "иÑпанча (ГондураÑ)", + "es_IC": "иÑпанча (Канар ороллари)", + "es_MX": "иÑпанча (МекÑика)", + "es_NI": "иÑпанча (Ðикарагуа)", + "es_PA": "иÑпанча (Панама)", + "es_PE": "иÑпанча (Перу)", + "es_PH": "иÑпанча (Филиппин)", + "es_PR": "иÑпанча (ПуÑрто-Рико)", + "es_PY": "иÑпанча (Парагвай)", + "es_SV": "иÑпанча (Салвадор)", + "es_US": "иÑпанча (Ðмерика Қўшма Штатлари)", + "es_UY": "иÑпанча (Уругвай)", + "es_VE": "иÑпанча (ВенеÑуÑла)", + "et": "ÑÑтонча", + "et_EE": "ÑÑтонча (ЭÑтониÑ)", + "eu": "баÑкча", + "eu_ES": "баÑкча (ИÑпаниÑ)", + "fa": "форÑий", + "fa_AF": "форÑий (ÐфғониÑтон)", + "fa_IR": "форÑий (Эрон)", + "ff": "фулаҳ", + "ff_CM": "фулаҳ (Камерун)", + "ff_GN": "фулаҳ (ГвинеÑ)", + "ff_MR": "фулаҳ (МавританиÑ)", + "ff_SN": "фулаҳ (Сенегал)", + "fi": "финча", + "fi_FI": "финча (ФинлÑндиÑ)", + "fo": "фарерча", + "fo_DK": "фарерча (ДаниÑ)", + "fo_FO": "фарерча (Фарер ороллари)", + "fr": "французча", + "fr_BE": "французча (БельгиÑ)", + "fr_BF": "французча (Буркина-ФаÑо)", + "fr_BI": "французча (Бурунди)", + "fr_BJ": "французча (Бенин)", + "fr_BL": "французча (Сен-Бартелеми)", + "fr_CA": "французча (Канада)", + "fr_CD": "французча (Конго-КиншаÑа)", + "fr_CF": "французча (Марказий Ðфрика РеÑпубликаÑи)", + "fr_CG": "французча (Конго Браззавиль)", + "fr_CH": "французча (ШвейцариÑ)", + "fr_CI": "французча (Кот-д’Ивуар)", + "fr_CM": "французча (Камерун)", + "fr_DJ": "французча (Жибути)", + "fr_DZ": "французча (Жазоир)", + "fr_FR": "французча (ФранциÑ)", + "fr_GA": "французча (Габон)", + "fr_GF": "французча (Француз ГвианаÑи)", + "fr_GN": "французча (ГвинеÑ)", + "fr_GP": "французча (Гваделупе)", + "fr_GQ": "французча (Экваториал ГвинеÑ)", + "fr_HT": "французча (Гаити)", + "fr_KM": "французча (Комор ороллари)", + "fr_LU": "французча (ЛюкÑембург)", + "fr_MA": "французча (Марокаш)", + "fr_MC": "французча (Монако)", + "fr_MF": "французча (Сент-Мартин)", + "fr_MG": "французча (МадагаÑкар)", + "fr_ML": "французча (Мали)", + "fr_MQ": "французча (Мартиника)", + "fr_MR": "французча (МавританиÑ)", + "fr_MU": "французча (Маврикий)", + "fr_NC": "французча (Янги КаледониÑ)", + "fr_NE": "французча (Ðигер)", + "fr_PF": "французча (Француз ПолинезиÑÑи)", + "fr_PM": "французча (Сент-Пьер ва Микелон)", + "fr_RE": "французча (Реюнион)", + "fr_RW": "французча (Руанда)", + "fr_SC": "французча (Сейшел ороллари)", + "fr_SN": "французча (Сенегал)", + "fr_SY": "французча (СуриÑ)", + "fr_TD": "французча (Чад)", + "fr_TG": "французча (Того)", + "fr_TN": "французча (ТуниÑ)", + "fr_VU": "французча (Вануату)", + "fr_WF": "французча (Ð£Ð¾Ð»Ð»Ð¸Ñ Ð²Ð° Футуна)", + "fr_YT": "французча (Майотта)", + "fy": "ғарбий фризча", + "fy_NL": "ғарбий фризча (ÐидерландиÑ)", + "ga": "ирландча", + "ga_IE": "ирландча (ИрландиÑ)", + "gd": "шотландча гаелик", + "gd_GB": "шотландча гаелик (Буюк БританиÑ)", + "gl": "галицийча", + "gl_ES": "галицийча (ИÑпаниÑ)", + "gu": "гужаротча", + "gu_IN": "гужаротча (ҲиндиÑтон)", + "gv": "мÑнча", + "gv_IM": "мÑнча (МÑн ороли)", + "ha": "хауÑа", + "ha_GH": "хауÑа (Гана)", + "ha_NE": "хауÑа (Ðигер)", + "ha_NG": "хауÑа (ÐигериÑ)", + "he": "иброний", + "he_IL": "иброний (ИÑроил)", + "hi": "ҳинди", + "hi_IN": "ҳинди (ҲиндиÑтон)", + "hr": "хорватча", + "hr_BA": "хорватча (БоÑÐ½Ð¸Ñ Ð²Ð° Герцеговина)", + "hr_HR": "хорватча (ХорватиÑ)", + "hu": "венгерча", + "hu_HU": "венгерча (ВенгриÑ)", + "hy": "арманча", + "hy_AM": "арманча (ÐрманиÑтон)", + "id": "индонезча", + "id_ID": "индонезча (ИндонезиÑ)", + "ig": "игбо", + "ig_NG": "игбо (ÐигериÑ)", + "ii_CN": "sichuan (Хитой)", + "is": "иÑландча", + "is_IS": "иÑландча (ИÑландиÑ)", + "it": "италÑнча", + "it_CH": "италÑнча (ШвейцариÑ)", + "it_IT": "италÑнча (ИталиÑ)", + "it_SM": "италÑнча (Сан-Марино)", + "ja": "Ñпонча", + "ja_JP": "Ñпонча (ЯпониÑ)", + "ka": "грузинча", + "ka_GE": "грузинча (ГрузиÑ)", + "ki": "кикую", + "ki_KE": "кикую (КениÑ)", + "kk": "қозоқча", + "kk_KZ": "қозоқча (ҚозоғиÑтон)", + "kl": "гренландча", + "kl_GL": "гренландча (ГренландиÑ)", + "km": "хмерча", + "km_KH": "хмерча (Камбоджа)", + "kn": "каннада", + "kn_IN": "каннада (ҲиндиÑтон)", + "ko": "корейÑча", + "ko_KP": "корейÑча (Шимолий КореÑ)", + "ko_KR": "корейÑча (Жанубий КореÑ)", + "ks": "кашмирча", + "ks_IN": "кашмирча (ҲиндиÑтон)", + "kw": "корнча", + "kw_GB": "корнча (Буюк БританиÑ)", + "ky": "қирғизча", + "ky_KG": "қирғизча (ҚирғизиÑтон)", + "lb": "люкÑембургча", + "lb_LU": "люкÑембургча (ЛюкÑембург)", + "lg": "гандача", + "lg_UG": "гандача (Уганда)", + "ln": "лингалча", + "ln_AO": "лингалча (Ðнгола)", + "ln_CD": "лингалча (Конго-КиншаÑа)", + "ln_CF": "лингалча (Марказий Ðфрика РеÑпубликаÑи)", + "ln_CG": "лингалча (Конго Браззавиль)", + "lo": "лаоÑча", + "lo_LA": "лаоÑча (ЛаоÑ)", + "lt": "литвача", + "lt_LT": "литвача (Литва)", + "lu": "луба-катанга", + "lu_CD": "луба-катанга (Конго-КиншаÑа)", + "lv": "латишча", + "lv_LV": "латишча (ЛатвиÑ)", + "mg": "малагаÑийча", + "mg_MG": "малагаÑийча (МадагаÑкар)", + "mk": "македонча", + "mk_MK": "македонча (МакедониÑ)", + "ml": "малаÑлам", + "ml_IN": "малаÑлам (ҲиндиÑтон)", + "mn": "мўғулча", + "mn_MN": "мўғулча (МонголиÑ)", + "mr": "маратхи", + "mr_IN": "маратхи (ҲиндиÑтон)", + "ms": "малай тил", + "ms_BN": "малай тил (Бруней)", + "ms_MY": "малай тил (МалайзиÑ)", + "ms_SG": "малай тил (Сингапур)", + "mt": "малтача", + "mt_MT": "малтача (Мальта)", + "my": "бирманча", + "my_MM": "бирманча (МьÑнма (Бирма))", + "nb": "норвегча бокмал", + "nb_NO": "норвегча бокмал (ÐорвегиÑ)", + "nb_SJ": "норвегча бокмал (Свалбард ва Ян-Майен)", + "nd": "шимолий ндебеле", + "nd_ZW": "шимолий ндебеле (Зимбабве)", + "ne": "непалча", + "ne_IN": "непалча (ҲиндиÑтон)", + "ne_NP": "непалча (Ðепал)", + "nl": "голландча", + "nl_AW": "голландча (Ðруба)", + "nl_BE": "голландча (БельгиÑ)", + "nl_BQ": "голландча (Бонейр, Синт-ЭÑÑ‚Ð°Ñ‚Ð¸ÑƒÑ Ð²Ð° Саба)", + "nl_CW": "голландча (КюраÑао)", + "nl_NL": "голландча (ÐидерландиÑ)", + "nl_SR": "голландча (Суринам)", + "nl_SX": "голландча (Синт-Мартен)", + "nn": "норвегча нюнорÑк", + "nn_NO": "норвегча нюнорÑк (ÐорвегиÑ)", + "om": "оромо", + "om_ET": "оромо (ЭфиопиÑ)", + "om_KE": "оромо (КениÑ)", + "or": "одиÑ", + "or_IN": "Ð¾Ð´Ð¸Ñ (ҲиндиÑтон)", + "os_GE": "osetin (ГрузиÑ)", + "os_RU": "osetin (РоÑÑиÑ)", + "pa": "панжобча", + "pa_Arab": "панжобча (Ðраб)", + "pa_Arab_PK": "панжобча (Ðраб, ПокиÑтон)", + "pa_Guru": "панжобча (Гурмухи)", + "pa_Guru_IN": "панжобча (Гурмухи, ҲиндиÑтон)", + "pa_IN": "панжобча (ҲиндиÑтон)", + "pa_PK": "панжобча (ПокиÑтон)", + "pl": "полÑкча", + "pl_PL": "полÑкча (Польша)", + "ps": "пушту", + "ps_AF": "пушту (ÐфғониÑтон)", + "pt": "португалча", + "pt_AO": "португалча (Ðнгола)", + "pt_BR": "португалча (БразилиÑ)", + "pt_CH": "португалча (ШвейцариÑ)", + "pt_CV": "португалча (Кабо-Верде)", + "pt_GQ": "португалча (Экваториал ГвинеÑ)", + "pt_GW": "португалча (ГвинеÑ-БиÑау)", + "pt_LU": "португалча (ЛюкÑембург)", + "pt_MO": "португалча (Макао (Хитой ММҲ))", + "pt_MZ": "португалча (Мозамбик)", + "pt_PT": "португалча (ПортугалиÑ)", + "pt_ST": "португалча (Сан-Томе ва ПринÑипи)", + "pt_TL": "португалча (Тимор-ЛеÑте)", + "qu": "кечуа", + "qu_BO": "кечуа (БоливиÑ)", + "qu_EC": "кечуа (Эквадор)", + "qu_PE": "кечуа (Перу)", + "rm": "романшча", + "rm_CH": "романшча (ШвейцариÑ)", + "rn": "рунди", + "rn_BI": "рунди (Бурунди)", + "ro": "руминча", + "ro_MD": "руминча (Молдова)", + "ro_RO": "руминча (РуминиÑ)", + "ru": "руÑча", + "ru_BY": "руÑча (БелоруÑиÑ)", + "ru_KG": "руÑча (ҚирғизиÑтон)", + "ru_KZ": "руÑча (ҚозоғиÑтон)", + "ru_MD": "руÑча (Молдова)", + "ru_RU": "руÑча (РоÑÑиÑ)", + "ru_UA": "руÑча (Украина)", + "rw": "кинÑруанда", + "rw_RW": "кинÑруанда (Руанда)", + "se": "шимолий Ñаамча", + "se_FI": "шимолий Ñаамча (ФинлÑндиÑ)", + "se_NO": "шимолий Ñаамча (ÐорвегиÑ)", + "se_SE": "шимолий Ñаамча (ШвециÑ)", + "sg": "Ñанго", + "sg_CF": "Ñанго (Марказий Ðфрика РеÑпубликаÑи)", + "si": "Ñингалча", + "si_LK": "Ñингалча (Шри-Ланка)", + "sk": "Ñловакча", + "sk_SK": "Ñловакча (СловакиÑ)", + "sl": "Ñловенча", + "sl_SI": "Ñловенча (СловениÑ)", + "sn": "шона", + "sn_ZW": "шона (Зимбабве)", + "so": "Ñомалича", + "so_DJ": "Ñомалича (Жибути)", + "so_ET": "Ñомалича (ЭфиопиÑ)", + "so_KE": "Ñомалича (КениÑ)", + "so_SO": "Ñомалича (Сомали)", + "sq": "албанча", + "sq_AL": "албанча (ÐлбаниÑ)", + "sq_MK": "албанча (МакедониÑ)", + "sq_XK": "албанча (КоÑово)", + "sr": "Ñербча", + "sr_BA": "Ñербча (БоÑÐ½Ð¸Ñ Ð²Ð° Герцеговина)", + "sr_Cyrl": "Ñербча (Кирил)", + "sr_Cyrl_BA": "Ñербча (Кирил, БоÑÐ½Ð¸Ñ Ð²Ð° Герцеговина)", + "sr_Cyrl_ME": "Ñербча (Кирил, ЧерногориÑ)", + "sr_Cyrl_RS": "Ñербча (Кирил, СербиÑ)", + "sr_Cyrl_XK": "Ñербча (Кирил, КоÑово)", + "sr_Latn": "Ñербча (Лотин)", + "sr_Latn_BA": "Ñербча (Лотин, БоÑÐ½Ð¸Ñ Ð²Ð° Герцеговина)", + "sr_Latn_ME": "Ñербча (Лотин, ЧерногориÑ)", + "sr_Latn_RS": "Ñербча (Лотин, СербиÑ)", + "sr_Latn_XK": "Ñербча (Лотин, КоÑово)", + "sr_ME": "Ñербча (ЧерногориÑ)", + "sr_RS": "Ñербча (СербиÑ)", + "sr_XK": "Ñербча (КоÑово)", + "sv": "шведча", + "sv_AX": "шведча (Ðланд ороллари)", + "sv_FI": "шведча (ФинлÑндиÑ)", + "sv_SE": "шведча (ШвециÑ)", + "sw": "Ñуахили", + "sw_CD": "Ñуахили (Конго-КиншаÑа)", + "sw_KE": "Ñуахили (КениÑ)", + "sw_TZ": "Ñуахили (ТанзаниÑ)", + "sw_UG": "Ñуахили (Уганда)", + "ta": "тамилча", + "ta_IN": "тамилча (ҲиндиÑтон)", + "ta_LK": "тамилча (Шри-Ланка)", + "ta_MY": "тамилча (МалайзиÑ)", + "ta_SG": "тамилча (Сингапур)", + "te": "телугу", + "te_IN": "телугу (ҲиндиÑтон)", + "th": "тайча", + "th_TH": "тайча (Таиланд)", + "ti": "тигринÑча", + "ti_ER": "тигринÑча (ЭритреÑ)", + "ti_ET": "тигринÑча (ЭфиопиÑ)", + "to": "тонганча", + "to_TO": "тонганча (Тонга)", + "tr": "туркча", + "tr_CY": "туркча (Кипр)", + "tr_TR": "туркча (ТуркиÑ)", + "ug": "уйғурча", + "ug_CN": "уйғурча (Хитой)", + "uk": "украинча", + "uk_UA": "украинча (Украина)", + "ur": "урду", + "ur_IN": "урду (ҲиндиÑтон)", + "ur_PK": "урду (ПокиÑтон)", + "uz": "ўзбекча", + "uz_AF": "ўзбекча (ÐфғониÑтон)", + "uz_Arab": "ўзбекча (Ðраб)", + "uz_Arab_AF": "ўзбекча (Ðраб, ÐфғониÑтон)", + "uz_Cyrl": "ўзбекча (Кирил)", + "uz_Cyrl_UZ": "ўзбекча (Кирил, ЎзбекиÑтон)", + "uz_Latn": "ўзбекча (Лотин)", + "uz_Latn_UZ": "ўзбекча (Лотин, ЎзбекиÑтон)", + "uz_UZ": "ўзбекча (ЎзбекиÑтон)", + "vi": "ветнамча", + "vi_VN": "ветнамча (Вьетнам)", + "yi": "иддиш", + "yo": "йоруба", + "yo_BJ": "йоруба (Бенин)", + "yo_NG": "йоруба (ÐигериÑ)", + "zh": "хитойча", + "zh_CN": "хитойча (Хитой)", + "zh_HK": "хитойча (Гонконг (Хитой ММҲ))", + "zh_Hans": "хитойча (Соддалаштирилган)", + "zh_Hans_CN": "хитойча (Соддалаштирилган, Хитой)", + "zh_Hans_HK": "хитойча (Соддалаштирилган, Гонконг (Хитой ММҲ))", + "zh_Hans_MO": "хитойча (Соддалаштирилган, Макао (Хитой ММҲ))", + "zh_Hans_SG": "хитойча (Соддалаштирилган, Сингапур)", + "zh_Hant": "хитойча (Ðнъанавий)", + "zh_Hant_HK": "хитойча (Ðнъанавий, Гонконг (Хитой ММҲ))", + "zh_Hant_MO": "хитойча (Ðнъанавий, Макао (Хитой ММҲ))", + "zh_Hant_TW": "хитойча (Ðнъанавий, Тайван)", + "zh_MO": "хитойча (Макао (Хитой ММҲ))", + "zh_SG": "хитойча (Сингапур)", + "zh_TW": "хитойча (Тайван)", + "zu": "зулу", + "zu_ZA": "зулу (Жанубий Ðфрика РеÑпубликаÑи)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz_UZ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz_UZ.json new file mode 100644 index 0000000000000000000000000000000000000000..1d0a2d35e246f201c98bbd3523bcffdeadeb06ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/uz_UZ.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "uz_Latn_UZ" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/vi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/vi.json new file mode 100644 index 0000000000000000000000000000000000000000..ec1cf7e30e2b6d3e8dfd5dc81e1dbdc61b9f1b2f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/vi.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "Tiếng Afrikaans", + "af_NA": "Tiếng Afrikaans (Namibia)", + "af_ZA": "Tiếng Afrikaans (Nam Phi)", + "ak": "Tiếng Akan", + "ak_GH": "Tiếng Akan (Ghana)", + "am": "Tiếng Amharic", + "am_ET": "Tiếng Amharic (Ethiopia)", + "ar": "Tiếng Ả Rập", + "ar_AE": "Tiếng Ả Rập (Các Tiểu Vương quốc Ả Rập Thống nhất)", + "ar_BH": "Tiếng Ả Rập (Bahrain)", + "ar_DJ": "Tiếng Ả Rập (Djibouti)", + "ar_DZ": "Tiếng Ả Rập (Algeria)", + "ar_EG": "Tiếng Ả Rập (Ai Cập)", + "ar_EH": "Tiếng Ả Rập (Tây Sahara)", + "ar_ER": "Tiếng Ả Rập (Eritrea)", + "ar_IL": "Tiếng Ả Rập (Israel)", + "ar_IQ": "Tiếng Ả Rập (Iraq)", + "ar_JO": "Tiếng Ả Rập (Jordan)", + "ar_KM": "Tiếng Ả Rập (Comoros)", + "ar_KW": "Tiếng Ả Rập (Kuwait)", + "ar_LB": "Tiếng Ả Rập (Li-băng)", + "ar_LY": "Tiếng Ả Rập (Libya)", + "ar_MA": "Tiếng Ả Rập (Ma-rốc)", + "ar_MR": "Tiếng Ả Rập (Mauritania)", + "ar_OM": "Tiếng Ả Rập (Oman)", + "ar_PS": "Tiếng Ả Rập (Lãnh thổ Palestine)", + "ar_QA": "Tiếng Ả Rập (Qatar)", + "ar_SA": "Tiếng Ả Rập (Ả Rập Xê-út)", + "ar_SD": "Tiếng Ả Rập (Sudan)", + "ar_SO": "Tiếng Ả Rập (Somalia)", + "ar_SS": "Tiếng Ả Rập (Nam Sudan)", + "ar_SY": "Tiếng Ả Rập (Syria)", + "ar_TD": "Tiếng Ả Rập (Chad)", + "ar_TN": "Tiếng Ả Rập (Tunisia)", + "ar_YE": "Tiếng Ả Rập (Yemen)", + "as": "Tiếng Assam", + "as_IN": "Tiếng Assam (Ấn Äá»™)", + "az": "Tiếng Azerbaijan", + "az_AZ": "Tiếng Azerbaijan (Azerbaijan)", + "az_Cyrl": "Tiếng Azerbaijan (Chữ Kirin)", + "az_Cyrl_AZ": "Tiếng Azerbaijan (Chữ Kirin, Azerbaijan)", + "az_Latn": "Tiếng Azerbaijan (Chữ La tinh)", + "az_Latn_AZ": "Tiếng Azerbaijan (Chữ La tinh, Azerbaijan)", + "be": "Tiếng Belarus", + "be_BY": "Tiếng Belarus (Belarus)", + "bg": "Tiếng Bulgaria", + "bg_BG": "Tiếng Bulgaria (Bulgaria)", + "bm": "Tiếng Bambara", + "bm_ML": "Tiếng Bambara (Mali)", + "bn": "Tiếng Bangla", + "bn_BD": "Tiếng Bangla (Bangladesh)", + "bn_IN": "Tiếng Bangla (Ấn Äá»™)", + "bo": "Tiếng Tây Tạng", + "bo_CN": "Tiếng Tây Tạng (Trung Quốc)", + "bo_IN": "Tiếng Tây Tạng (Ấn Äá»™)", + "br": "Tiếng Breton", + "br_FR": "Tiếng Breton (Pháp)", + "bs": "Tiếng Bosnia", + "bs_BA": "Tiếng Bosnia (Bosnia và Herzegovina)", + "bs_Cyrl": "Tiếng Bosnia (Chữ Kirin)", + "bs_Cyrl_BA": "Tiếng Bosnia (Chữ Kirin, Bosnia và Herzegovina)", + "bs_Latn": "Tiếng Bosnia (Chữ La tinh)", + "bs_Latn_BA": "Tiếng Bosnia (Chữ La tinh, Bosnia và Herzegovina)", + "ca": "Tiếng Catalan", + "ca_AD": "Tiếng Catalan (Andorra)", + "ca_ES": "Tiếng Catalan (Tây Ban Nha)", + "ca_FR": "Tiếng Catalan (Pháp)", + "ca_IT": "Tiếng Catalan (Ã)", + "ce": "Tiếng Chechen", + "ce_RU": "Tiếng Chechen (Nga)", + "cs": "Tiếng Séc", + "cs_CZ": "Tiếng Séc (Cá»™ng hòa Séc)", + "cy": "Tiếng Wales", + "cy_GB": "Tiếng Wales (Vương quốc Anh)", + "da": "Tiếng Äan Mạch", + "da_DK": "Tiếng Äan Mạch (Äan Mạch)", + "da_GL": "Tiếng Äan Mạch (Greenland)", + "de": "Tiếng Äức", + "de_AT": "Tiếng Äức (Ão)", + "de_BE": "Tiếng Äức (Bỉ)", + "de_CH": "Tiếng Äức (Thụy SÄ©)", + "de_DE": "Tiếng Äức (Äức)", + "de_IT": "Tiếng Äức (Ã)", + "de_LI": "Tiếng Äức (Liechtenstein)", + "de_LU": "Tiếng Äức (Luxembourg)", + "dz": "Tiếng Dzongkha", + "dz_BT": "Tiếng Dzongkha (Bhutan)", + "ee": "Tiếng Ewe", + "ee_GH": "Tiếng Ewe (Ghana)", + "ee_TG": "Tiếng Ewe (Togo)", + "el": "Tiếng Hy Lạp", + "el_CY": "Tiếng Hy Lạp (Síp)", + "el_GR": "Tiếng Hy Lạp (Hy Lạp)", + "en": "Tiếng Anh", + "en_AG": "Tiếng Anh (Antigua và Barbuda)", + "en_AI": "Tiếng Anh (Anguilla)", + "en_AS": "Tiếng Anh (Äảo Somoa thuá»™c Mỹ)", + "en_AT": "Tiếng Anh (Ão)", + "en_AU": "Tiếng Anh (Australia)", + "en_BB": "Tiếng Anh (Barbados)", + "en_BE": "Tiếng Anh (Bỉ)", + "en_BI": "Tiếng Anh (Burundi)", + "en_BM": "Tiếng Anh (Bermuda)", + "en_BS": "Tiếng Anh (Bahamas)", + "en_BW": "Tiếng Anh (Botswana)", + "en_BZ": "Tiếng Anh (Belize)", + "en_CA": "Tiếng Anh (Canada)", + "en_CC": "Tiếng Anh (Quần đảo Cocos (Keeling))", + "en_CH": "Tiếng Anh (Thụy SÄ©)", + "en_CK": "Tiếng Anh (Quần đảo Cook)", + "en_CM": "Tiếng Anh (Cameroon)", + "en_CX": "Tiếng Anh (Äảo Giáng Sinh)", + "en_CY": "Tiếng Anh (Síp)", + "en_DE": "Tiếng Anh (Äức)", + "en_DG": "Tiếng Anh (Diego Garcia)", + "en_DK": "Tiếng Anh (Äan Mạch)", + "en_DM": "Tiếng Anh (Dominica)", + "en_ER": "Tiếng Anh (Eritrea)", + "en_FI": "Tiếng Anh (Phần Lan)", + "en_FJ": "Tiếng Anh (Fiji)", + "en_FK": "Tiếng Anh (Quần đảo Falkland)", + "en_FM": "Tiếng Anh (Micronesia)", + "en_GB": "Tiếng Anh (Vương quốc Anh)", + "en_GD": "Tiếng Anh (Grenada)", + "en_GG": "Tiếng Anh (Guernsey)", + "en_GH": "Tiếng Anh (Ghana)", + "en_GI": "Tiếng Anh (Gibraltar)", + "en_GM": "Tiếng Anh (Gambia)", + "en_GU": "Tiếng Anh (Guam)", + "en_GY": "Tiếng Anh (Guyana)", + "en_HK": "Tiếng Anh (Hồng Kông, Trung Quốc)", + "en_IE": "Tiếng Anh (Ireland)", + "en_IL": "Tiếng Anh (Israel)", + "en_IM": "Tiếng Anh (Äảo Man)", + "en_IN": "Tiếng Anh (Ấn Äá»™)", + "en_IO": "Tiếng Anh (Lãnh thổ Anh tại Ấn Äá»™ Dương)", + "en_JE": "Tiếng Anh (Jersey)", + "en_JM": "Tiếng Anh (Jamaica)", + "en_KE": "Tiếng Anh (Kenya)", + "en_KI": "Tiếng Anh (Kiribati)", + "en_KN": "Tiếng Anh (St. Kitts và Nevis)", + "en_KY": "Tiếng Anh (Quần đảo Cayman)", + "en_LC": "Tiếng Anh (St. Lucia)", + "en_LR": "Tiếng Anh (Liberia)", + "en_LS": "Tiếng Anh (Lesotho)", + "en_MG": "Tiếng Anh (Madagascar)", + "en_MH": "Tiếng Anh (Quần đảo Marshall)", + "en_MO": "Tiếng Anh (Macao, Trung Quốc)", + "en_MP": "Tiếng Anh (Quần đảo Bắc Mariana)", + "en_MS": "Tiếng Anh (Montserrat)", + "en_MT": "Tiếng Anh (Malta)", + "en_MU": "Tiếng Anh (Mauritius)", + "en_MW": "Tiếng Anh (Malawi)", + "en_MY": "Tiếng Anh (Malaysia)", + "en_NA": "Tiếng Anh (Namibia)", + "en_NF": "Tiếng Anh (Äảo Norfolk)", + "en_NG": "Tiếng Anh (Nigeria)", + "en_NL": "Tiếng Anh (Hà Lan)", + "en_NR": "Tiếng Anh (Nauru)", + "en_NU": "Tiếng Anh (Niue)", + "en_NZ": "Tiếng Anh (New Zealand)", + "en_PG": "Tiếng Anh (Papua New Guinea)", + "en_PH": "Tiếng Anh (Philippines)", + "en_PK": "Tiếng Anh (Pakistan)", + "en_PN": "Tiếng Anh (Quần đảo Pitcairn)", + "en_PR": "Tiếng Anh (Puerto Rico)", + "en_PW": "Tiếng Anh (Palau)", + "en_RW": "Tiếng Anh (Rwanda)", + "en_SB": "Tiếng Anh (Quần đảo Solomon)", + "en_SC": "Tiếng Anh (Seychelles)", + "en_SD": "Tiếng Anh (Sudan)", + "en_SE": "Tiếng Anh (Thụy Äiển)", + "en_SG": "Tiếng Anh (Singapore)", + "en_SH": "Tiếng Anh (St. Helena)", + "en_SI": "Tiếng Anh (Slovenia)", + "en_SL": "Tiếng Anh (Sierra Leone)", + "en_SS": "Tiếng Anh (Nam Sudan)", + "en_SX": "Tiếng Anh (Sint Maarten)", + "en_SZ": "Tiếng Anh (Swaziland)", + "en_TC": "Tiếng Anh (Quần đảo Turk và Caicos)", + "en_TK": "Tiếng Anh (Tokelau)", + "en_TO": "Tiếng Anh (Tonga)", + "en_TT": "Tiếng Anh (Trinidad và Tobago)", + "en_TV": "Tiếng Anh (Tuvalu)", + "en_TZ": "Tiếng Anh (Tanzania)", + "en_UG": "Tiếng Anh (Uganda)", + "en_UM": "Tiếng Anh (Các đảo xa thuá»™c Hoa Kỳ)", + "en_US": "Tiếng Anh (Hoa Kỳ)", + "en_VC": "Tiếng Anh (St. Vincent và Grenadines)", + "en_VG": "Tiếng Anh (Quần đảo Virgin thuá»™c Anh)", + "en_VI": "Tiếng Anh (Quần đảo Virgin thuá»™c Mỹ)", + "en_VU": "Tiếng Anh (Vanuatu)", + "en_WS": "Tiếng Anh (Samoa)", + "en_ZA": "Tiếng Anh (Nam Phi)", + "en_ZM": "Tiếng Anh (Zambia)", + "en_ZW": "Tiếng Anh (Zimbabwe)", + "eo": "Tiếng Quốc Tế Ngữ", + "es": "Tiếng Tây Ban Nha", + "es_AR": "Tiếng Tây Ban Nha (Argentina)", + "es_BO": "Tiếng Tây Ban Nha (Bolivia)", + "es_BR": "Tiếng Tây Ban Nha (Brazil)", + "es_CL": "Tiếng Tây Ban Nha (Chile)", + "es_CO": "Tiếng Tây Ban Nha (Colombia)", + "es_CR": "Tiếng Tây Ban Nha (Costa Rica)", + "es_CU": "Tiếng Tây Ban Nha (Cuba)", + "es_DO": "Tiếng Tây Ban Nha (Cá»™ng hòa Dominica)", + "es_EA": "Tiếng Tây Ban Nha (Ceuta và Melilla)", + "es_EC": "Tiếng Tây Ban Nha (Ecuador)", + "es_ES": "Tiếng Tây Ban Nha (Tây Ban Nha)", + "es_GQ": "Tiếng Tây Ban Nha (Guinea Xích Äạo)", + "es_GT": "Tiếng Tây Ban Nha (Guatemala)", + "es_HN": "Tiếng Tây Ban Nha (Honduras)", + "es_IC": "Tiếng Tây Ban Nha (Quần đảo Canary)", + "es_MX": "Tiếng Tây Ban Nha (Mexico)", + "es_NI": "Tiếng Tây Ban Nha (Nicaragua)", + "es_PA": "Tiếng Tây Ban Nha (Panama)", + "es_PE": "Tiếng Tây Ban Nha (Peru)", + "es_PH": "Tiếng Tây Ban Nha (Philippines)", + "es_PR": "Tiếng Tây Ban Nha (Puerto Rico)", + "es_PY": "Tiếng Tây Ban Nha (Paraguay)", + "es_SV": "Tiếng Tây Ban Nha (El Salvador)", + "es_US": "Tiếng Tây Ban Nha (Hoa Kỳ)", + "es_UY": "Tiếng Tây Ban Nha (Uruguay)", + "es_VE": "Tiếng Tây Ban Nha (Venezuela)", + "et": "Tiếng Estonia", + "et_EE": "Tiếng Estonia (Estonia)", + "eu": "Tiếng Basque", + "eu_ES": "Tiếng Basque (Tây Ban Nha)", + "fa": "Tiếng Ba Tư", + "fa_AF": "Tiếng Ba Tư (Afghanistan)", + "fa_IR": "Tiếng Ba Tư (Iran)", + "ff": "Tiếng Fulah", + "ff_CM": "Tiếng Fulah (Cameroon)", + "ff_GN": "Tiếng Fulah (Guinea)", + "ff_MR": "Tiếng Fulah (Mauritania)", + "ff_SN": "Tiếng Fulah (Senegal)", + "fi": "Tiếng Phần Lan", + "fi_FI": "Tiếng Phần Lan (Phần Lan)", + "fo": "Tiếng Faroe", + "fo_DK": "Tiếng Faroe (Äan Mạch)", + "fo_FO": "Tiếng Faroe (Quần đảo Faroe)", + "fr": "Tiếng Pháp", + "fr_BE": "Tiếng Pháp (Bỉ)", + "fr_BF": "Tiếng Pháp (Burkina Faso)", + "fr_BI": "Tiếng Pháp (Burundi)", + "fr_BJ": "Tiếng Pháp (Benin)", + "fr_BL": "Tiếng Pháp (St. Barthélemy)", + "fr_CA": "Tiếng Pháp (Canada)", + "fr_CD": "Tiếng Pháp (Congo - Kinshasa)", + "fr_CF": "Tiếng Pháp (Cá»™ng hòa Trung Phi)", + "fr_CG": "Tiếng Pháp (Congo - Brazzaville)", + "fr_CH": "Tiếng Pháp (Thụy SÄ©)", + "fr_CI": "Tiếng Pháp (Côte d’Ivoire)", + "fr_CM": "Tiếng Pháp (Cameroon)", + "fr_DJ": "Tiếng Pháp (Djibouti)", + "fr_DZ": "Tiếng Pháp (Algeria)", + "fr_FR": "Tiếng Pháp (Pháp)", + "fr_GA": "Tiếng Pháp (Gabon)", + "fr_GF": "Tiếng Pháp (Guiana thuá»™c Pháp)", + "fr_GN": "Tiếng Pháp (Guinea)", + "fr_GP": "Tiếng Pháp (Guadeloupe)", + "fr_GQ": "Tiếng Pháp (Guinea Xích Äạo)", + "fr_HT": "Tiếng Pháp (Haiti)", + "fr_KM": "Tiếng Pháp (Comoros)", + "fr_LU": "Tiếng Pháp (Luxembourg)", + "fr_MA": "Tiếng Pháp (Ma-rốc)", + "fr_MC": "Tiếng Pháp (Monaco)", + "fr_MF": "Tiếng Pháp (St. Martin)", + "fr_MG": "Tiếng Pháp (Madagascar)", + "fr_ML": "Tiếng Pháp (Mali)", + "fr_MQ": "Tiếng Pháp (Martinique)", + "fr_MR": "Tiếng Pháp (Mauritania)", + "fr_MU": "Tiếng Pháp (Mauritius)", + "fr_NC": "Tiếng Pháp (New Caledonia)", + "fr_NE": "Tiếng Pháp (Niger)", + "fr_PF": "Tiếng Pháp (Polynesia thuá»™c Pháp)", + "fr_PM": "Tiếng Pháp (Saint Pierre và Miquelon)", + "fr_RE": "Tiếng Pháp (Réunion)", + "fr_RW": "Tiếng Pháp (Rwanda)", + "fr_SC": "Tiếng Pháp (Seychelles)", + "fr_SN": "Tiếng Pháp (Senegal)", + "fr_SY": "Tiếng Pháp (Syria)", + "fr_TD": "Tiếng Pháp (Chad)", + "fr_TG": "Tiếng Pháp (Togo)", + "fr_TN": "Tiếng Pháp (Tunisia)", + "fr_VU": "Tiếng Pháp (Vanuatu)", + "fr_WF": "Tiếng Pháp (Wallis và Futuna)", + "fr_YT": "Tiếng Pháp (Mayotte)", + "fy": "Tiếng Frisia", + "fy_NL": "Tiếng Frisia (Hà Lan)", + "ga": "Tiếng Ireland", + "ga_IE": "Tiếng Ireland (Ireland)", + "gd": "Tiếng Gael Scotland", + "gd_GB": "Tiếng Gael Scotland (Vương quốc Anh)", + "gl": "Tiếng Galician", + "gl_ES": "Tiếng Galician (Tây Ban Nha)", + "gu": "Tiếng Gujarati", + "gu_IN": "Tiếng Gujarati (Ấn Äá»™)", + "gv": "Tiếng Manx", + "gv_IM": "Tiếng Manx (Äảo Man)", + "ha": "Tiếng Hausa", + "ha_GH": "Tiếng Hausa (Ghana)", + "ha_NE": "Tiếng Hausa (Niger)", + "ha_NG": "Tiếng Hausa (Nigeria)", + "he": "Tiếng Do Thái", + "he_IL": "Tiếng Do Thái (Israel)", + "hi": "Tiếng Hindi", + "hi_IN": "Tiếng Hindi (Ấn Äá»™)", + "hr": "Tiếng Croatia", + "hr_BA": "Tiếng Croatia (Bosnia và Herzegovina)", + "hr_HR": "Tiếng Croatia (Croatia)", + "hu": "Tiếng Hungary", + "hu_HU": "Tiếng Hungary (Hungary)", + "hy": "Tiếng Armenia", + "hy_AM": "Tiếng Armenia (Armenia)", + "id": "Tiếng Indonesia", + "id_ID": "Tiếng Indonesia (Indonesia)", + "ig": "Tiếng Igbo", + "ig_NG": "Tiếng Igbo (Nigeria)", + "ii": "Tiếng Di Tứ Xuyên", + "ii_CN": "Tiếng Di Tứ Xuyên (Trung Quốc)", + "is": "Tiếng Iceland", + "is_IS": "Tiếng Iceland (Iceland)", + "it": "Tiếng Ã", + "it_CH": "Tiếng à (Thụy SÄ©)", + "it_IT": "Tiếng à (Ã)", + "it_SM": "Tiếng à (San Marino)", + "ja": "Tiếng Nhật", + "ja_JP": "Tiếng Nhật (Nhật Bản)", + "ka": "Tiếng Gruzia", + "ka_GE": "Tiếng Gruzia (Gruzia)", + "ki": "Tiếng Kikuyu", + "ki_KE": "Tiếng Kikuyu (Kenya)", + "kk": "Tiếng Kazakh", + "kk_KZ": "Tiếng Kazakh (Kazakhstan)", + "kl": "Tiếng Kalaallisut", + "kl_GL": "Tiếng Kalaallisut (Greenland)", + "km": "Tiếng KhÆ¡-me", + "km_KH": "Tiếng KhÆ¡-me (Campuchia)", + "kn": "Tiếng Kannada", + "kn_IN": "Tiếng Kannada (Ấn Äá»™)", + "ko": "Tiếng Hàn", + "ko_KP": "Tiếng Hàn (Triá»u Tiên)", + "ko_KR": "Tiếng Hàn (Hàn Quốc)", + "ks": "Tiếng Kashmir", + "ks_IN": "Tiếng Kashmir (Ấn Äá»™)", + "kw": "Tiếng Cornwall", + "kw_GB": "Tiếng Cornwall (Vương quốc Anh)", + "ky": "Tiếng Kyrgyz", + "ky_KG": "Tiếng Kyrgyz (Kyrgyzstan)", + "lb": "Tiếng Luxembourg", + "lb_LU": "Tiếng Luxembourg (Luxembourg)", + "lg": "Tiếng Ganda", + "lg_UG": "Tiếng Ganda (Uganda)", + "ln": "Tiếng Lingala", + "ln_AO": "Tiếng Lingala (Angola)", + "ln_CD": "Tiếng Lingala (Congo - Kinshasa)", + "ln_CF": "Tiếng Lingala (Cá»™ng hòa Trung Phi)", + "ln_CG": "Tiếng Lingala (Congo - Brazzaville)", + "lo": "Tiếng Lào", + "lo_LA": "Tiếng Lào (Lào)", + "lt": "Tiếng Litva", + "lt_LT": "Tiếng Litva (Litva)", + "lu": "Tiếng Luba-Katanga", + "lu_CD": "Tiếng Luba-Katanga (Congo - Kinshasa)", + "lv": "Tiếng Latvia", + "lv_LV": "Tiếng Latvia (Latvia)", + "mg": "Tiếng Malagasy", + "mg_MG": "Tiếng Malagasy (Madagascar)", + "mk": "Tiếng Macedonia", + "mk_MK": "Tiếng Macedonia (Macedonia)", + "ml": "Tiếng Malayalam", + "ml_IN": "Tiếng Malayalam (Ấn Äá»™)", + "mn": "Tiếng Mông Cổ", + "mn_MN": "Tiếng Mông Cổ (Mông Cổ)", + "mr": "Tiếng Marathi", + "mr_IN": "Tiếng Marathi (Ấn Äá»™)", + "ms": "Tiếng Mã Lai", + "ms_BN": "Tiếng Mã Lai (Brunei)", + "ms_MY": "Tiếng Mã Lai (Malaysia)", + "ms_SG": "Tiếng Mã Lai (Singapore)", + "mt": "Tiếng Malta", + "mt_MT": "Tiếng Malta (Malta)", + "my": "Tiếng Miến Äiện", + "my_MM": "Tiếng Miến Äiện (Myanmar (Miến Äiện))", + "nb": "Tiếng Na Uy (BokmÃ¥l)", + "nb_NO": "Tiếng Na Uy (Na Uy)", + "nb_SJ": "Tiếng Na Uy (Svalbard và Jan Mayen)", + "nd": "Tiếng Ndebele Miá»n Bắc", + "nd_ZW": "Tiếng Ndebele Miá»n Bắc (Zimbabwe)", + "ne": "Tiếng Nepal", + "ne_IN": "Tiếng Nepal (Ấn Äá»™)", + "ne_NP": "Tiếng Nepal (Nepal)", + "nl": "Tiếng Hà Lan", + "nl_AW": "Tiếng Hà Lan (Aruba)", + "nl_BE": "Tiếng Hà Lan (Bỉ)", + "nl_BQ": "Tiếng Hà Lan (Ca-ri-bê Hà Lan)", + "nl_CW": "Tiếng Hà Lan (Curaçao)", + "nl_NL": "Tiếng Hà Lan (Hà Lan)", + "nl_SR": "Tiếng Hà Lan (Suriname)", + "nl_SX": "Tiếng Hà Lan (Sint Maarten)", + "nn": "Tiếng Na Uy (Nynorsk)", + "nn_NO": "Tiếng Na Uy (Na Uy)", + "no": "Tiếng Na Uy", + "no_NO": "Tiếng Na Uy (Na Uy)", + "om": "Tiếng Oromo", + "om_ET": "Tiếng Oromo (Ethiopia)", + "om_KE": "Tiếng Oromo (Kenya)", + "or": "Tiếng Odia", + "or_IN": "Tiếng Odia (Ấn Äá»™)", + "os": "Tiếng Ossetic", + "os_GE": "Tiếng Ossetic (Gruzia)", + "os_RU": "Tiếng Ossetic (Nga)", + "pa": "Tiếng Punjab", + "pa_Arab": "Tiếng Punjab (Chữ Ả Rập)", + "pa_Arab_PK": "Tiếng Punjab (Chữ Ả Rập, Pakistan)", + "pa_Guru": "Tiếng Punjab (Chữ Gurmukhi)", + "pa_Guru_IN": "Tiếng Punjab (Chữ Gurmukhi, Ấn Äá»™)", + "pa_IN": "Tiếng Punjab (Ấn Äá»™)", + "pa_PK": "Tiếng Punjab (Pakistan)", + "pl": "Tiếng Ba Lan", + "pl_PL": "Tiếng Ba Lan (Ba Lan)", + "ps": "Tiếng Pashto", + "ps_AF": "Tiếng Pashto (Afghanistan)", + "pt": "Tiếng Bồ Äào Nha", + "pt_AO": "Tiếng Bồ Äào Nha (Angola)", + "pt_BR": "Tiếng Bồ Äào Nha (Brazil)", + "pt_CH": "Tiếng Bồ Äào Nha (Thụy SÄ©)", + "pt_CV": "Tiếng Bồ Äào Nha (Cape Verde)", + "pt_GQ": "Tiếng Bồ Äào Nha (Guinea Xích Äạo)", + "pt_GW": "Tiếng Bồ Äào Nha (Guinea-Bissau)", + "pt_LU": "Tiếng Bồ Äào Nha (Luxembourg)", + "pt_MO": "Tiếng Bồ Äào Nha (Macao, Trung Quốc)", + "pt_MZ": "Tiếng Bồ Äào Nha (Mozambique)", + "pt_PT": "Tiếng Bồ Äào Nha (Bồ Äào Nha)", + "pt_ST": "Tiếng Bồ Äào Nha (São Tomé và Príncipe)", + "pt_TL": "Tiếng Bồ Äào Nha (Timor-Leste)", + "qu": "Tiếng Quechua", + "qu_BO": "Tiếng Quechua (Bolivia)", + "qu_EC": "Tiếng Quechua (Ecuador)", + "qu_PE": "Tiếng Quechua (Peru)", + "rm": "Tiếng Romansh", + "rm_CH": "Tiếng Romansh (Thụy SÄ©)", + "rn": "Tiếng Rundi", + "rn_BI": "Tiếng Rundi (Burundi)", + "ro": "Tiếng Romania", + "ro_MD": "Tiếng Romania (Moldova)", + "ro_RO": "Tiếng Romania (Romania)", + "ru": "Tiếng Nga", + "ru_BY": "Tiếng Nga (Belarus)", + "ru_KG": "Tiếng Nga (Kyrgyzstan)", + "ru_KZ": "Tiếng Nga (Kazakhstan)", + "ru_MD": "Tiếng Nga (Moldova)", + "ru_RU": "Tiếng Nga (Nga)", + "ru_UA": "Tiếng Nga (Ukraina)", + "rw": "Tiếng Kinyarwanda", + "rw_RW": "Tiếng Kinyarwanda (Rwanda)", + "se": "Tiếng Sami Miá»n Bắc", + "se_FI": "Tiếng Sami Miá»n Bắc (Phần Lan)", + "se_NO": "Tiếng Sami Miá»n Bắc (Na Uy)", + "se_SE": "Tiếng Sami Miá»n Bắc (Thụy Äiển)", + "sg": "Tiếng Sango", + "sg_CF": "Tiếng Sango (Cá»™ng hòa Trung Phi)", + "sh": "Tiếng Serbo-Croatia", + "sh_BA": "Tiếng Serbo-Croatia (Bosnia và Herzegovina)", + "si": "Tiếng Sinhala", + "si_LK": "Tiếng Sinhala (Sri Lanka)", + "sk": "Tiếng Slovak", + "sk_SK": "Tiếng Slovak (Slovakia)", + "sl": "Tiếng Slovenia", + "sl_SI": "Tiếng Slovenia (Slovenia)", + "sn": "Tiếng Shona", + "sn_ZW": "Tiếng Shona (Zimbabwe)", + "so": "Tiếng Somali", + "so_DJ": "Tiếng Somali (Djibouti)", + "so_ET": "Tiếng Somali (Ethiopia)", + "so_KE": "Tiếng Somali (Kenya)", + "so_SO": "Tiếng Somali (Somalia)", + "sq": "Tiếng Albania", + "sq_AL": "Tiếng Albania (Albania)", + "sq_MK": "Tiếng Albania (Macedonia)", + "sq_XK": "Tiếng Albania (Kosovo)", + "sr": "Tiếng Serbia", + "sr_BA": "Tiếng Serbia (Bosnia và Herzegovina)", + "sr_Cyrl": "Tiếng Serbia (Chữ Kirin)", + "sr_Cyrl_BA": "Tiếng Serbia (Chữ Kirin, Bosnia và Herzegovina)", + "sr_Cyrl_ME": "Tiếng Serbia (Chữ Kirin, Montenegro)", + "sr_Cyrl_RS": "Tiếng Serbia (Chữ Kirin, Serbia)", + "sr_Cyrl_XK": "Tiếng Serbia (Chữ Kirin, Kosovo)", + "sr_Latn": "Tiếng Serbia (Chữ La tinh)", + "sr_Latn_BA": "Tiếng Serbia (Chữ La tinh, Bosnia và Herzegovina)", + "sr_Latn_ME": "Tiếng Serbia (Chữ La tinh, Montenegro)", + "sr_Latn_RS": "Tiếng Serbia (Chữ La tinh, Serbia)", + "sr_Latn_XK": "Tiếng Serbia (Chữ La tinh, Kosovo)", + "sr_ME": "Tiếng Serbia (Montenegro)", + "sr_RS": "Tiếng Serbia (Serbia)", + "sr_XK": "Tiếng Serbia (Kosovo)", + "sv": "Tiếng Thụy Äiển", + "sv_AX": "Tiếng Thụy Äiển (Quần đảo Ã…land)", + "sv_FI": "Tiếng Thụy Äiển (Phần Lan)", + "sv_SE": "Tiếng Thụy Äiển (Thụy Äiển)", + "sw": "Tiếng Swahili", + "sw_CD": "Tiếng Swahili (Congo - Kinshasa)", + "sw_KE": "Tiếng Swahili (Kenya)", + "sw_TZ": "Tiếng Swahili (Tanzania)", + "sw_UG": "Tiếng Swahili (Uganda)", + "ta": "Tiếng Tamil", + "ta_IN": "Tiếng Tamil (Ấn Äá»™)", + "ta_LK": "Tiếng Tamil (Sri Lanka)", + "ta_MY": "Tiếng Tamil (Malaysia)", + "ta_SG": "Tiếng Tamil (Singapore)", + "te": "Tiếng Telugu", + "te_IN": "Tiếng Telugu (Ấn Äá»™)", + "th": "Tiếng Thái", + "th_TH": "Tiếng Thái (Thái Lan)", + "ti": "Tiếng Tigrinya", + "ti_ER": "Tiếng Tigrinya (Eritrea)", + "ti_ET": "Tiếng Tigrinya (Ethiopia)", + "tl": "Tiếng Tagalog", + "tl_PH": "Tiếng Tagalog (Philippines)", + "to": "Tiếng Tonga", + "to_TO": "Tiếng Tonga (Tonga)", + "tr": "Tiếng Thổ NhÄ© Kỳ", + "tr_CY": "Tiếng Thổ NhÄ© Kỳ (Síp)", + "tr_TR": "Tiếng Thổ NhÄ© Kỳ (Thổ NhÄ© Kỳ)", + "ug": "Tiếng Duy Ngô NhÄ©", + "ug_CN": "Tiếng Duy Ngô NhÄ© (Trung Quốc)", + "uk": "Tiếng Ucraina", + "uk_UA": "Tiếng Ucraina (Ukraina)", + "ur": "Tiếng Urdu", + "ur_IN": "Tiếng Urdu (Ấn Äá»™)", + "ur_PK": "Tiếng Urdu (Pakistan)", + "uz": "Tiếng Uzbek", + "uz_AF": "Tiếng Uzbek (Afghanistan)", + "uz_Arab": "Tiếng Uzbek (Chữ Ả Rập)", + "uz_Arab_AF": "Tiếng Uzbek (Chữ Ả Rập, Afghanistan)", + "uz_Cyrl": "Tiếng Uzbek (Chữ Kirin)", + "uz_Cyrl_UZ": "Tiếng Uzbek (Chữ Kirin, Uzbekistan)", + "uz_Latn": "Tiếng Uzbek (Chữ La tinh)", + "uz_Latn_UZ": "Tiếng Uzbek (Chữ La tinh, Uzbekistan)", + "uz_UZ": "Tiếng Uzbek (Uzbekistan)", + "vi": "Tiếng Việt", + "vi_VN": "Tiếng Việt (Việt Nam)", + "yi": "Tiếng Yiddish", + "yo": "Tiếng Yoruba", + "yo_BJ": "Tiếng Yoruba (Benin)", + "yo_NG": "Tiếng Yoruba (Nigeria)", + "zh": "Tiếng Trung", + "zh_CN": "Tiếng Trung (Trung Quốc)", + "zh_HK": "Tiếng Trung (Hồng Kông, Trung Quốc)", + "zh_Hans": "Tiếng Trung (Giản thể)", + "zh_Hans_CN": "Tiếng Trung (Giản thể, Trung Quốc)", + "zh_Hans_HK": "Tiếng Trung (Giản thể, Hồng Kông, Trung Quốc)", + "zh_Hans_MO": "Tiếng Trung (Giản thể, Macao, Trung Quốc)", + "zh_Hans_SG": "Tiếng Trung (Giản thể, Singapore)", + "zh_Hant": "Tiếng Trung (Phồn thể)", + "zh_Hant_HK": "Tiếng Trung (Phồn thể, Hồng Kông, Trung Quốc)", + "zh_Hant_MO": "Tiếng Trung (Phồn thể, Macao, Trung Quốc)", + "zh_Hant_TW": "Tiếng Trung (Phồn thể, Äài Loan)", + "zh_MO": "Tiếng Trung (Macao, Trung Quốc)", + "zh_SG": "Tiếng Trung (Singapore)", + "zh_TW": "Tiếng Trung (Äài Loan)", + "zu": "Tiếng Zulu", + "zu_ZA": "Tiếng Zulu (Nam Phi)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/yi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/yi.json new file mode 100644 index 0000000000000000000000000000000000000000..3cf806d91b3d7b542c327cc55f04ace674d0f193 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/yi.json @@ -0,0 +1,406 @@ +{ + "Names": { + "af": "×ַפֿריק×ַנס", + "af_NA": "×ַפֿריק×ַנס (× ×ַמיביע)", + "af_ZA": "×ַפֿריק×ַנס (דרו×Ö¾×ַפֿריקע)", + "am": "×ַמה×ַריש", + "am_ET": "×ַמה×ַריש (עטי×פּיע)", + "ar": "×ַר×ַביש", + "ar_DJ": "×ַר×ַביש (דזשיבוטי)", + "ar_EG": "×ַר×ַביש (עגיפּטן)", + "ar_ER": "×ַר×ַביש (עריטרעע)", + "ar_IL": "×ַר×ַביש (ישר×ל)", + "ar_KM": "×ַר×ַביש (×§×מ×ר×ס)", + "ar_LB": "×ַר×ַביש (לבנון)", + "ar_LY": "×ַר×ַביש (ליביע)", + "ar_MA": "×ַר×ַביש (מ×ַר××§×)", + "ar_MR": "×ַר×ַביש (מ×ַריט×Ö·× ×™×¢)", + "ar_QA": "×ַר×ַביש (×§×ַט×ַר)", + "ar_SD": "×ַר×ַביש (סוד×ַן)", + "ar_SO": "×ַר×ַביש (ס×מ×ַליע)", + "ar_SS": "×ַר×ַביש (דרו×־סוד×ַן)", + "ar_SY": "×ַר×ַביש (סיריע)", + "ar_TD": "×ַר×ַביש (טש×ַד)", + "ar_TN": "×ַר×ַביש (טוניסיע)", + "ar_YE": "×ַר×ַביש (תימן)", + "as": "×ַס×ַמיש", + "as_IN": "×ַס×ַמיש (×ינדיע)", + "az": "×ַזערביידזש×ַניש", + "az_Cyrl": "×ַזערביידזש×ַניש (ציריליש)", + "az_Latn": "×ַזערביידזש×ַניש (גַלחיש)", + "be": "בעל×ַרוסיש", + "be_BY": "בעל×ַרוסיש (בעל×ַרוס)", + "bg": "בולג×ַריש", + "bg_BG": "בולג×ַריש (בולג×ַריע)", + "bn": "בענג×ַליש", + "bn_BD": "בענג×ַליש (ב×ַנגל×ַדעש)", + "bn_IN": "בענג×ַליש (×ינדיע)", + "bo": "טיבעטיש", + "bo_CN": "טיבעטיש (×›×™× ×¢)", + "bo_IN": "טיבעטיש (×ינדיע)", + "br": "ברעט×ניש", + "br_FR": "ברעט×ניש (פֿר×ַנקרייך)", + "bs": "ב×סניש", + "bs_BA": "ב×סניש (ב×סניע הערצעג×ווינע)", + "bs_Cyrl": "ב×סניש (ציריליש)", + "bs_Cyrl_BA": "ב×סניש (ציריליש, ב×סניע הערצעג×ווינע)", + "bs_Latn": "ב×סניש (גַלחיש)", + "bs_Latn_BA": "ב×סניש (גַלחיש, ב×סניע הערצעג×ווינע)", + "ca": "×§×ַט×ַל×ניש", + "ca_AD": "×§×ַט×ַל×ניש (×ַנד×רע)", + "ca_ES": "×§×ַט×ַל×ניש (שפּ×Ö·× ×™×¢)", + "ca_FR": "×§×ַט×ַל×ניש (פֿר×ַנקרייך)", + "ca_IT": "×§×ַט×ַל×ניש (×יט×ַליע)", + "cs": "טשעכיש", + "cs_CZ": "טשעכיש (טשעכיי)", + "cy": "וועלשיש", + "cy_GB": "וועלשיש (פֿ×ַר×ייניגטע קעניגרייך)", + "da": "דעניש", + "da_DK": "דעניש (דענמ×ַרק)", + "da_GL": "דעניש (גרינל×ַנד)", + "de": "דײַטש", + "de_AT": "דײַטש (עסטרייך)", + "de_BE": "דײַטש (בעלגיע)", + "de_CH": "דײַטש (שווייץ)", + "de_DE": "דײַטש (דייטשל×ַנד)", + "de_IT": "דײַטש (×יט×ַליע)", + "de_LI": "דײַטש (ליכטנשטיין)", + "de_LU": "דײַטש (לוקסעמבורג)", + "el": "גריכיש", + "el_GR": "גריכיש (גריכנל×ַנד)", + "en": "ענגליש", + "en_AG": "ענגליש (×ַנטיגוע ×ון ב×ַרבודע)", + "en_AT": "ענגליש (עסטרייך)", + "en_AU": "ענגליש (×ויסטר×ַליע)", + "en_BB": "ענגליש (ב×ַרב×ַד×ס)", + "en_BE": "ענגליש (בעלגיע)", + "en_BI": "ענגליש (בורונדי)", + "en_BM": "ענגליש (בערמודע)", + "en_BS": "ענגליש (ב×Ö·×”×ַמ×ַס)", + "en_BW": "ענגליש (ב×צוו×Ö·× ×¢)", + "en_BZ": "ענגליש (בעליז)", + "en_CA": "ענגליש (×§×Ö·× ×ַדע)", + "en_CH": "ענגליש (שווייץ)", + "en_CK": "ענגליש (קוק ×ינזלען)", + "en_CM": "ענגליש (×§×ַמערון)", + "en_DE": "ענגליש (דייטשל×ַנד)", + "en_DK": "ענגליש (דענמ×ַרק)", + "en_DM": "ענגליש (ד×מיניקע)", + "en_ER": "ענגליש (עריטרעע)", + "en_FI": "ענגליש (פֿינל×ַנד)", + "en_FJ": "ענגליש (פֿידזשי)", + "en_FK": "ענגליש (פֿ×ַלקל×ַנד ×ינזלען)", + "en_FM": "ענגליש (מיקר×× ×¢×–×™×¢)", + "en_GB": "ענגליש (פֿ×ַר×ייניגטע קעניגרייך)", + "en_GD": "ענגליש (גרענ×ַד×Ö·)", + "en_GG": "ענגליש (גערנזי)", + "en_GH": "ענגליש (×’×”×Ö·× ×¢)", + "en_GI": "ענגליש (גיבר×ַלט×ַר)", + "en_GM": "ענגליש (×’×ַמביע)", + "en_GU": "ענגליש (גוו×Ö·×)", + "en_GY": "ענגליש (גוי×Ö·× ×¢)", + "en_IE": "ענגליש (×ירל×ַנד)", + "en_IL": "ענגליש (ישר×ל)", + "en_IN": "ענגליש (×ינדיע)", + "en_JE": "ענגליש (דזשערזי)", + "en_JM": "ענגליש (דזש×ַמייקע)", + "en_KE": "ענגליש (×§×¢× ×™×¢)", + "en_KI": "ענגליש (קיריב×ַטי)", + "en_KY": "ענגליש (קיימ×ַן ×ינזלען)", + "en_LR": "ענגליש (ליבעריע)", + "en_LS": "ענגליש (לעס×ט×)", + "en_MG": "ענגליש (מ×ַד×Ö·×’×ַסק×ַר)", + "en_MH": "ענגליש (מ×ַרש×ַל ×ינזלען)", + "en_MS": "ענגליש (מ×נטסער×ַט)", + "en_MT": "ענגליש (מ×ַלט×Ö·)", + "en_MU": "ענגליש (מ×ריציוס)", + "en_MW": "ענגליש (מ×ַל×ַווי)", + "en_MY": "ענגליש (מ×ַלייזיע)", + "en_NA": "ענגליש (× ×ַמיביע)", + "en_NF": "ענגליש (× ×רפֿ×לק ×ינזל)", + "en_NG": "ענגליש (ניגעריע)", + "en_NL": "ענגליש (×”×ל×ַנד)", + "en_NZ": "ענגליש (ניו זיל×ַנד)", + "en_PG": "ענגליש (פּ×ַפּו×Ö· נײַ ×’×™× ×¢)", + "en_PH": "ענגליש (פֿיליפּינען)", + "en_PK": "ענגליש (פּ×ַקיסט×ַן)", + "en_PN": "ענגליש (פּיטקערן ×ינזלען)", + "en_PR": "ענגליש (פּ×רט×־ריק×)", + "en_RW": "ענגליש (רוו×ַנדע)", + "en_SB": "ענגליש (ס×ל×מ×ן ×ינזלען)", + "en_SC": "ענגליש (סיישעל)", + "en_SD": "ענגליש (סוד×ַן)", + "en_SE": "ענגליש (שוועדן)", + "en_SG": "ענגליש (סינג×ַפּור)", + "en_SH": "ענגליש (סט העלענע)", + "en_SI": "ענגליש (סל×וועניע)", + "en_SL": "ענגליש (סיערע לע×× ×¢)", + "en_SS": "ענגליש (דרו×־סוד×ַן)", + "en_SZ": "ענגליש (סוו×ַזיל×ַנד)", + "en_TO": "ענגליש (ט×× ×’×Ö·)", + "en_TT": "ענגליש (טריניד×ַד ×ון ט×ב×Ö·×’×)", + "en_TV": "ענגליש (טו×וו×ַלו)", + "en_TZ": "ענגליש (ט×Ö·× ×–×Ö·× ×™×¢)", + "en_UG": "ענגליש (×וג×ַנדע)", + "en_US": "ענגליש (פֿ×ַר×ייניגטע שט×ַטן)", + "en_VU": "ענגליש (וו×ַנו×ַטו)", + "en_WS": "ענגליש (ס×ַמ××Ö·)", + "en_ZA": "ענגליש (דרו×Ö¾×ַפֿריקע)", + "en_ZM": "ענגליש (×–×ַמביע)", + "en_ZW": "ענגליש (זימב×ַבווע)", + "eo": "עספּער×ַנט×", + "es": "שפּ×ַניש", + "es_AR": "שפּ×ַניש (×ַרגענטינע)", + "es_BO": "שפּ×ַניש (ב×ליוויע)", + "es_BR": "שפּ×ַניש (בר×ַזיל)", + "es_CL": "שפּ×ַניש (טשילע)", + "es_CO": "שפּ×ַניש (×§×ל×מביע)", + "es_CR": "שפּ×ַניש (×§×סט×Ö· ריק×Ö·)", + "es_CU": "שפּ×ַניש (קוב×Ö·)", + "es_DO": "שפּ×ַניש (ד×מיניק×ַנישע רעפּובליק)", + "es_EC": "שפּ×ַניש (עקוו×ַד×ר)", + "es_ES": "שפּ×ַניש (שפּ×Ö·× ×™×¢)", + "es_GQ": "שפּ×ַניש (עקוו×ַט×רישע ×’×™× ×¢)", + "es_GT": "שפּ×ַניש (גוו×ַטעמ×ַלע)", + "es_HN": "שפּ×ַניש (×”×נדור×ַס)", + "es_IC": "שפּ×ַניש (×§×Ö·× ×ַרישע ×ינזלען)", + "es_MX": "שפּ×ַניש (מעקסיקע)", + "es_NI": "שפּ×ַניש (× ×™×§×ַר×ַגוע)", + "es_PA": "שפּ×ַניש (פּ×Ö·× ×ַמ×Ö·)", + "es_PE": "שפּ×ַניש (פּערו)", + "es_PH": "שפּ×ַניש (פֿיליפּינען)", + "es_PR": "שפּ×ַניש (פּ×רט×־ריק×)", + "es_PY": "שפּ×ַניש (פּ×ַר×ַגווײַ)", + "es_SV": "שפּ×ַניש (על ס×ַלוו×ַד×ר)", + "es_US": "שפּ×ַניש (פֿ×ַר×ייניגטע שט×ַטן)", + "es_UY": "שפּ×ַניש (×ורוגוויי)", + "es_VE": "שפּ×ַניש (ווענעזועלע)", + "et": "עסטיש", + "et_EE": "עסטיש (עסטל×ַנד)", + "eu": "ב×ַסקיש", + "eu_ES": "ב×ַסקיש (שפּ×Ö·× ×™×¢)", + "fa": "פּערסיש", + "fa_AF": "פּערסיש (×ַפֿגה×ַניסט×ַן)", + "fa_IR": "פּערסיש (×יר×ַן)", + "fi": "פֿיניש", + "fi_FI": "פֿיניש (פֿינל×ַנד)", + "fo": "פֿ×ַר×יש", + "fo_DK": "פֿ×ַר×יש (דענמ×ַרק)", + "fo_FO": "פֿ×ַר×יש (פֿ×Ö·×¨× ×ינזלען)", + "fr": "פֿר×ַנצויזיש", + "fr_BE": "פֿר×ַנצויזיש (בעלגיע)", + "fr_BF": "פֿר×ַנצויזיש (בורקינע פֿ×ַס×)", + "fr_BI": "פֿר×ַנצויזיש (בורונדי)", + "fr_BJ": "פֿר×ַנצויזיש (בענין)", + "fr_CA": "פֿר×ַנצויזיש (×§×Ö·× ×ַדע)", + "fr_CD": "פֿר×ַנצויזיש (×§×× ×’×־קינש×Ö·×–×¢)", + "fr_CF": "פֿר×ַנצויזיש (צענטר×ַל־×ַפֿריק×ַנישע רעפּובליק)", + "fr_CH": "פֿר×ַנצויזיש (שווייץ)", + "fr_CI": "פֿר×ַנצויזיש (העלפֿ×Ö· נדביין ב×רטן)", + "fr_CM": "פֿר×ַנצויזיש (×§×ַמערון)", + "fr_DJ": "פֿר×ַנצויזיש (דזשיבוטי)", + "fr_FR": "פֿר×ַנצויזיש (פֿר×ַנקרייך)", + "fr_GA": "פֿר×ַנצויזיש (×’×ַב×ן)", + "fr_GF": "פֿר×ַנצויזיש (פֿר×ַנצויזישע גוי×Ö·× ×¢)", + "fr_GN": "פֿר×ַנצויזיש (×’×™× ×¢)", + "fr_GP": "פֿר×ַנצויזיש (גוו×ַדעלופ)", + "fr_GQ": "פֿר×ַנצויזיש (עקוו×ַט×רישע ×’×™× ×¢)", + "fr_HT": "פֿר×ַנצויזיש (×”×ַיטי)", + "fr_KM": "פֿר×ַנצויזיש (×§×מ×ר×ס)", + "fr_LU": "פֿר×ַנצויזיש (לוקסעמבורג)", + "fr_MA": "פֿר×ַנצויזיש (מ×ַר××§×)", + "fr_MC": "פֿר×ַנצויזיש (מ×× ×Ö·×§×)", + "fr_MG": "פֿר×ַנצויזיש (מ×ַד×Ö·×’×ַסק×ַר)", + "fr_ML": "פֿר×ַנצויזיש (מ×ַלי)", + "fr_MQ": "פֿר×ַנצויזיש (מ×ַרטיניק)", + "fr_MR": "פֿר×ַנצויזיש (מ×ַריט×Ö·× ×™×¢)", + "fr_MU": "פֿר×ַנצויזיש (מ×ריציוס)", + "fr_NC": "פֿר×ַנצויזיש (נײַ ×§×ַלעד×× ×™×¢)", + "fr_NE": "פֿר×ַנצויזיש (ניזשער)", + "fr_PF": "פֿר×ַנצויזיש (פֿר×ַנצויזישע פּ×לינעזיע)", + "fr_RE": "פֿר×ַנצויזיש (רע×וני×ן)", + "fr_RW": "פֿר×ַנצויזיש (רוו×ַנדע)", + "fr_SC": "פֿר×ַנצויזיש (סיישעל)", + "fr_SN": "פֿר×ַנצויזיש (סענעג×ַל)", + "fr_SY": "פֿר×ַנצויזיש (סיריע)", + "fr_TD": "פֿר×ַנצויזיש (טש×ַד)", + "fr_TG": "פֿר×ַנצויזיש (ט××’×)", + "fr_TN": "פֿר×ַנצויזיש (טוניסיע)", + "fr_VU": "פֿר×ַנצויזיש (וו×ַנו×ַטו)", + "fr_YT": "פֿר×ַנצויזיש (מ×Ö·×™×ט)", + "fy": "מערב־פֿריזיש", + "fy_NL": "מערב־פֿריזיש (×”×ל×ַנד)", + "ga": "×יריש", + "ga_IE": "×יריש (×ירל×ַנד)", + "gd": "סק×טיש געליש", + "gd_GB": "סק×טיש געליש (פֿ×ַר×ייניגטע קעניגרייך)", + "gl": "×’×ַלישיש", + "gl_ES": "×’×ַלישיש (שפּ×Ö·× ×™×¢)", + "gv": "מ×ַנקס", + "ha": "×”×ַוס×Ö·", + "ha_GH": "×”×ַוס×Ö· (×’×”×Ö·× ×¢)", + "ha_NE": "×”×ַוס×Ö· (ניזשער)", + "ha_NG": "×”×ַוס×Ö· (ניגעריע)", + "he": "העברע×יש", + "he_IL": "העברע×יש (ישר×ל)", + "hi": "הינדי", + "hi_IN": "הינדי (×ינדיע)", + "hr": "קר××ַטיש", + "hr_BA": "קר××ַטיש (ב×סניע הערצעג×ווינע)", + "hr_HR": "קר××ַטיש (קר××ַטיע)", + "hu": "×ונגעריש", + "hu_HU": "×ונגעריש (×ונגערן)", + "hy": "×ַרמעניש", + "hy_AM": "×ַרמעניש (×ַרמעניע)", + "id": "×ינד×נעזיש", + "id_ID": "×ינד×נעזיש (×ינד×× ×¢×–×™×¢)", + "is": "×יסל×ַנדיש", + "is_IS": "×יסל×ַנדיש (×יסל×ַנד)", + "it": "×יט×ַליעניש", + "it_CH": "×יט×ַליעניש (שווייץ)", + "it_IT": "×יט×ַליעניש (×יט×ַליע)", + "it_SM": "×יט×ַליעניש (ס×ַן מ×ַרינ×)", + "ja": "×™×ַפּ×ַניש", + "ja_JP": "×™×ַפּ×ַניש (×™×ַפּ×ַן)", + "ka": "גרוזיניש", + "ka_GE": "גרוזיניש (גרוזיע)", + "kk": "×§×Ö·×–×ַכיש", + "km": "כמער", + "km_KH": "כמער (×§×ַמב×דיע)", + "kn": "×§×Ö·× ×ַד×Ö·", + "kn_IN": "×§×Ö·× ×ַד×Ö· (×ינדיע)", + "ko": "×§×רע×יש", + "kw": "×§×רניש", + "kw_GB": "×§×רניש (פֿ×ַר×ייניגטע קעניגרייך)", + "ky": "קירגיזיש", + "lb": "לוקסעמבורגיש", + "lb_LU": "לוקסעמבורגיש (לוקסעמבורג)", + "lo": "ל×Ö·×", + "lo_LA": "ל×Ö·× (ל×Ö·×ס)", + "lt": "ליטוויש", + "lt_LT": "ליטוויש (ליטע)", + "lv": "לעטיש", + "lv_LV": "לעטיש (לעטל×ַנד)", + "mk": "מ×ַקעד×ניש", + "mk_MK": "מ×ַקעד×ניש (מ×ַקעד×× ×™×¢)", + "ml": "מ×ַל×Ö·×™×ַל×Ö·×", + "ml_IN": "מ×ַל×Ö·×™×ַל×Ö·× (×ינדיע)", + "mn": "מ×× ×’×ליש", + "mn_MN": "מ×× ×’×ליש (מ×× ×’×ליי)", + "mt": "מ×ַלטעזיש", + "mt_MT": "מ×ַלטעזיש (מ×ַלט×Ö·)", + "my": "בירמ×ַניש", + "my_MM": "בירמ×ַניש (מי×ַנמ×ַר)", + "ne": "נעפּ×ַליש", + "ne_IN": "נעפּ×ַליש (×ינדיע)", + "ne_NP": "נעפּ×ַליש (נעפּ×ַל)", + "nl": "×”×לענדיש", + "nl_AW": "×”×לענדיש (×ַרוב×Ö·)", + "nl_BE": "×”×לענדיש (בעלגיע)", + "nl_CW": "×”×לענדיש (קור×ַס×Ö·×)", + "nl_NL": "×”×לענדיש (×”×ל×ַנד)", + "nl_SR": "×”×לענדיש (סורינ×Ö·×)", + "nn": "נײַ־נ×רוועגיש", + "nn_NO": "נײַ־נ×רוועגיש (× ×רוועגיע)", + "no": "× ×רוועגיש", + "no_NO": "× ×רוועגיש (× ×רוועגיע)", + "os": "×סעטיש", + "os_GE": "×סעטיש (גרוזיע)", + "os_RU": "×סעטיש (רוסל×ַנד)", + "pl": "פּויליש", + "pl_PL": "פּויליש (פּוילן)", + "ps": "פּ×ַשט×Ö¸", + "ps_AF": "פּ×ַשט×Ö¸ (×ַפֿגה×ַניסט×ַן)", + "pt": "פּ×רטוגעזיש", + "pt_AO": "פּ×רטוגעזיש (×Ö·× ×’×לע)", + "pt_BR": "פּ×רטוגעזיש (בר×ַזיל)", + "pt_CH": "פּ×רטוגעזיש (שווייץ)", + "pt_CV": "פּ×רטוגעזיש (×§×ַפּווערדישע ×ינזלען)", + "pt_GQ": "פּ×רטוגעזיש (עקוו×ַט×רישע ×’×™× ×¢)", + "pt_GW": "פּ×רטוגעזיש (גינע־ביס×ַו)", + "pt_LU": "פּ×רטוגעזיש (לוקסעמבורג)", + "pt_MZ": "פּ×רטוגעזיש (מ××–×ַמביק)", + "pt_PT": "פּ×רטוגעזיש (פּ×רטוג×ַל)", + "pt_ST": "פּ×רטוגעזיש (ס×Ö·× ×˜×מע ×ון פּרינסיפּע)", + "ro": "רומעניש", + "ro_MD": "רומעניש (מ×לד×ווע)", + "ro_RO": "רומעניש (רומעניע)", + "ru": "רוסיש", + "ru_BY": "רוסיש (בעל×ַרוס)", + "ru_MD": "רוסיש (מ×לד×ווע)", + "ru_RU": "רוסיש (רוסל×ַנד)", + "ru_UA": "רוסיש (×וקר×Ö·×™× ×¢)", + "se": "× ×רדס×ַמיש", + "se_FI": "× ×רדס×ַמיש (פֿינל×ַנד)", + "se_NO": "× ×רדס×ַמיש (× ×רוועגיע)", + "se_SE": "× ×רדס×ַמיש (שוועדן)", + "sh": "סערב×־קר××ַטיש", + "sh_BA": "סערב×־קר××ַטיש (ב×סניע הערצעג×ווינע)", + "si": "סינה×ַליש", + "si_LK": "סינה×ַליש (סרי־ל×Ö·× ×§×Ö·)", + "sk": "סל×וו×ַקיש", + "sk_SK": "סל×וו×ַקיש (סל×וו×Ö·×§×™×™)", + "sl": "סל×וועניש", + "sl_SI": "סל×וועניש (סל×וועניע)", + "sn": "ש×× ×Ö·", + "sn_ZW": "ש×× ×Ö· (זימב×ַבווע)", + "so": "ס×מ×ַליש", + "so_DJ": "ס×מ×ַליש (דזשיבוטי)", + "so_ET": "ס×מ×ַליש (עטי×פּיע)", + "so_KE": "ס×מ×ַליש (×§×¢× ×™×¢)", + "so_SO": "ס×מ×ַליש (ס×מ×ַליע)", + "sq": "×ַלב×ַניש", + "sq_AL": "×ַלב×ַניש (×ַלב×Ö·× ×™×¢)", + "sq_MK": "×ַלב×ַניש (מ×ַקעד×× ×™×¢)", + "sq_XK": "×ַלב×ַניש (×§×ס×וו×)", + "sr": "סערביש", + "sr_BA": "סערביש (ב×סניע הערצעג×ווינע)", + "sr_Cyrl": "סערביש (ציריליש)", + "sr_Cyrl_BA": "סערביש (ציריליש, ב×סניע הערצעג×ווינע)", + "sr_Cyrl_ME": "סערביש (ציריליש, מ×נטענעגר×)", + "sr_Cyrl_RS": "סערביש (ציריליש, סערביע)", + "sr_Cyrl_XK": "סערביש (ציריליש, ×§×ס×וו×)", + "sr_Latn": "סערביש (גַלחיש)", + "sr_Latn_BA": "סערביש (גַלחיש, ב×סניע הערצעג×ווינע)", + "sr_Latn_ME": "סערביש (גַלחיש, מ×נטענעגר×)", + "sr_Latn_RS": "סערביש (גַלחיש, סערביע)", + "sr_Latn_XK": "סערביש (גַלחיש, ×§×ס×וו×)", + "sr_ME": "סערביש (מ×נטענעגר×)", + "sr_RS": "סערביש (סערביע)", + "sr_XK": "סערביש (×§×ס×וו×)", + "sv": "שוועדיש", + "sv_FI": "שוועדיש (פֿינל×ַנד)", + "sv_SE": "שוועדיש (שוועדן)", + "sw": "סוו×ַהיליש", + "sw_CD": "סוו×ַהיליש (×§×× ×’×־קינש×Ö·×–×¢)", + "sw_KE": "סוו×ַהיליש (×§×¢× ×™×¢)", + "sw_TZ": "סוו×ַהיליש (ט×Ö·× ×–×Ö·× ×™×¢)", + "sw_UG": "סוו×ַהיליש (×וג×ַנדע)", + "ta": "ט×ַמיל", + "ta_IN": "ט×ַמיל (×ינדיע)", + "ta_LK": "ט×ַמיל (סרי־ל×Ö·× ×§×Ö·)", + "ta_MY": "ט×ַמיל (מ×ַלייזיע)", + "ta_SG": "ט×ַמיל (סינג×ַפּור)", + "tl": "ט×Ö·×’×ַל××’", + "tl_PH": "ט×Ö·×’×ַל××’ (פֿיליפּינען)", + "uk": "×וקר×Ö·×יניש", + "uk_UA": "×וקר×Ö·×יניש (×וקר×Ö·×™× ×¢)", + "ur": "×ורדו", + "ur_IN": "×ורדו (×ינדיע)", + "ur_PK": "×ורדו (פּ×ַקיסט×ַן)", + "uz": "×וזבעקיש", + "uz_AF": "×וזבעקיש (×ַפֿגה×ַניסט×ַן)", + "uz_Arab": "×וזבעקיש (×ַר×ַביש)", + "uz_Arab_AF": "×וזבעקיש (×ַר×ַביש, ×ַפֿגה×ַניסט×ַן)", + "uz_Cyrl": "×וזבעקיש (ציריליש)", + "uz_Latn": "×וזבעקיש (גַלחיש)", + "vi": "וויעטנ×ַמעזיש", + "vi_VN": "וויעטנ×ַמעזיש (וויעטנ×Ö·×)", + "yi": "ייִדיש", + "zh": "כינעזיש", + "zh_CN": "כינעזיש (×›×™× ×¢)", + "zh_SG": "כינעזיש (סינג×ַפּור)", + "zu": "זולו", + "zu_ZA": "זולו (דרו×Ö¾×ַפֿריקע)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/yo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/yo.json new file mode 100644 index 0000000000000000000000000000000000000000..ca7ae1a415478e9aebb7151db92f234c2f1b8b70 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/yo.json @@ -0,0 +1,411 @@ +{ + "Names": { + "af": "Èdè Afrikani", + "af_NA": "Èdè Afrikani (OrílẹÌède Namibia)", + "af_ZA": "Èdè Afrikani (OrílẹÌède Ariwa Afirika)", + "ak": "Èdè Akani", + "ak_GH": "Èdè Akani (OrílẹÌède Gana)", + "am": "Èdè Amariki", + "am_ET": "Èdè Amariki (OrílẹÌède Etopia)", + "ar": "Èdè Arabiki", + "ar_AE": "Èdè Arabiki (OrílẹÌède Ẹmirate ti Awá»n Arabu)", + "ar_BH": "Èdè Arabiki (OrílẹÌède Báránì)", + "ar_DJ": "Èdè Arabiki (OrílẹÌède Díbá»Ìótì)", + "ar_DZ": "Èdè Arabiki (OrílẹÌède Àlùgèríánì)", + "ar_EG": "Èdè Arabiki (OrílẹÌède Égípítì)", + "ar_ER": "Èdè Arabiki (OrílẹÌède Eritira)", + "ar_IL": "Èdè Arabiki (OrílẹÌède Iserẹli)", + "ar_IQ": "Èdè Arabiki (OrílẹÌède Iraki)", + "ar_JO": "Èdè Arabiki (OrílẹÌède Já»dani)", + "ar_KM": "Èdè Arabiki (OrílẹÌède Kòmòrósì)", + "ar_KW": "Èdè Arabiki (OrílẹÌède Kuweti)", + "ar_LB": "Èdè Arabiki (OrílẹÌède Lebanoni)", + "ar_LY": "Èdè Arabiki (OrílẹÌède Libiya)", + "ar_MA": "Èdè Arabiki (OrílẹÌède Moroko)", + "ar_MR": "Èdè Arabiki (OrílẹÌède Maritania)", + "ar_OM": "Èdè Arabiki (OrílẹÌède Ọá»ma)", + "ar_PS": "Èdè Arabiki (OrílẹÌède Iwá»orun Pakisitian ati Gaá¹£a)", + "ar_QA": "Èdè Arabiki (OrílẹÌède Kota)", + "ar_SA": "Èdè Arabiki (OrílẹÌède Saudi Arabia)", + "ar_SD": "Èdè Arabiki (OrílẹÌède Sudani)", + "ar_SO": "Èdè Arabiki (OrílẹÌède Somalia)", + "ar_SY": "Èdè Arabiki (OrílẹÌède Siria)", + "ar_TD": "Èdè Arabiki (OrílẹÌède ṣààdì)", + "ar_TN": "Èdè Arabiki (OrílẹÌède Tuniá¹£ia)", + "ar_YE": "Èdè Arabiki (OrílẹÌède yemeni)", + "as": "Ti Assam", + "as_IN": "Ti Assam (OrílẹÌède India)", + "az": "Èdè Azerbaijani", + "az_AZ": "Èdè Azerbaijani (OrílẹÌède AsẹÌbájánì)", + "be": "Èdè Belarusi", + "be_BY": "Èdè Belarusi (OrílẹÌède Bélárúsì)", + "bg": "Èdè Bugaria", + "bg_BG": "Èdè Bugaria (OrílẹÌède Bùùgáríà)", + "bn": "Èdè Bengali", + "bn_BD": "Èdè Bengali (OrílẹÌède Bángáládésì)", + "bn_IN": "Èdè Bengali (OrílẹÌède India)", + "br": "Èdè Bretoni", + "br_FR": "Èdè Bretoni (OrílẹÌède Faranse)", + "bs": "Èdè Bosnia", + "bs_BA": "Èdè Bosnia (OrílẹÌède Bá»Ì€síníà àti Ẹtisẹgófínà)", + "ca": "Èdè Catala", + "ca_AD": "Èdè Catala (OrílẹÌède Ààndórà)", + "ca_ES": "Èdè Catala (OrílẹÌède Sipani)", + "ca_FR": "Èdè Catala (OrílẹÌède Faranse)", + "ca_IT": "Èdè Catala (OrílẹÌède Italiyi)", + "cs": "Èdè seeki", + "cs_CZ": "Èdè seeki (OrílẹÌède ṣẹÌẹÌkì)", + "cy": "Èdè Welshi", + "cy_GB": "Èdè Welshi (OrílẹÌède Omobabirin)", + "da": "Èdè Ilẹ̀ Denmark", + "da_DK": "Èdè Ilẹ̀ Denmark (OrílẹÌède DẹÌmákì)", + "da_GL": "Èdè Ilẹ̀ Denmark (OrílẹÌède Gerelandi)", + "de": "Èdè Ilẹ̀ Gemani", + "de_AT": "Èdè Ilẹ̀ Gemani (OrílẹÌède Asítíríà)", + "de_BE": "Èdè Ilẹ̀ Gemani (OrílẹÌède Bégíá»Ìmù)", + "de_CH": "Èdè Ilẹ̀ Gemani (OrílẹÌède switiá¹£ilandi)", + "de_DE": "Èdè Ilẹ̀ Gemani (OrílẹÌède Gemani)", + "de_IT": "Èdè Ilẹ̀ Gemani (OrílẹÌède Italiyi)", + "de_LI": "Èdè Ilẹ̀ Gemani (OrílẹÌède Lẹṣitẹnisiteni)", + "de_LU": "Èdè Ilẹ̀ Gemani (OrílẹÌède Lusemogi)", + "el": "Èdè Giriki", + "el_CY": "Èdè Giriki (OrílẹÌède Kúrúsì)", + "el_GR": "Èdè Giriki (OrílẹÌède Geriisi)", + "en": "Èdè Gẹ̀ẹÌsì", + "en_AG": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Ààntígúà àti Báríbúdà)", + "en_AI": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Ààngúlílà)", + "en_AS": "Èdè Gẹ̀ẹÌsì (Sámóánì ti OrílẹÌède Àméríkà)", + "en_AT": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Asítíríà)", + "en_AU": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Ãstràlìá)", + "en_BB": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Bábádósì)", + "en_BE": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Bégíá»Ìmù)", + "en_BI": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Bùùrúndì)", + "en_BM": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Bémúdà)", + "en_BS": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Bàhámásì)", + "en_BW": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Bá»Ì€tìsúwánà)", + "en_BZ": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Bèlísẹ̀)", + "en_CA": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Kánádà)", + "en_CH": "Èdè Gẹ̀ẹÌsì (OrílẹÌède switiá¹£ilandi)", + "en_CK": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Etíokun Kùúkù)", + "en_CM": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Kamerúúnì)", + "en_CY": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Kúrúsì)", + "en_DE": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Gemani)", + "en_DK": "Èdè Gẹ̀ẹÌsì (OrílẹÌède DẹÌmákì)", + "en_DM": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Dòmíníkà)", + "en_ER": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Eritira)", + "en_FI": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Filandi)", + "en_FJ": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Fiji)", + "en_FK": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Etikun Fakalandi)", + "en_FM": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Makoronesia)", + "en_GB": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Omobabirin)", + "en_GD": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Genada)", + "en_GH": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Gana)", + "en_GI": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Gibaratara)", + "en_GM": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Gambia)", + "en_GU": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Guamu)", + "en_GY": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Guyana)", + "en_IE": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Ailandi)", + "en_IL": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Iserẹli)", + "en_IN": "Èdè Gẹ̀ẹÌsì (OrílẹÌède India)", + "en_IO": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Etíkun Ãndíánì ti ÃŒlú Bírítísì)", + "en_JM": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Jamaika)", + "en_KE": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Kenya)", + "en_KI": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Kiribati)", + "en_KN": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Kiiti ati Neefi)", + "en_KY": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Etíokun Kámánì)", + "en_LC": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Luá¹£ia)", + "en_LR": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Laberia)", + "en_LS": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Lesoto)", + "en_MG": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Madasika)", + "en_MH": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Etikun Máṣali)", + "en_MP": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Etikun Guusu Mariana)", + "en_MS": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Motserati)", + "en_MT": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Malata)", + "en_MU": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Maritiusi)", + "en_MW": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Malawi)", + "en_MY": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Malasia)", + "en_NA": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Namibia)", + "en_NF": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Etikun Ná»Ìúfókì)", + "en_NG": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Nàìjíríà)", + "en_NL": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Nedalandi)", + "en_NR": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Nauru)", + "en_NU": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Niue)", + "en_NZ": "Èdè Gẹ̀ẹÌsì (OrílẹÌède á¹£ilandi Titun)", + "en_PG": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Paapu ti Giini)", + "en_PH": "Èdè Gẹ̀ẹÌsì (OrílẹÌède filipini)", + "en_PK": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Pakisitan)", + "en_PN": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Pikarini)", + "en_PR": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Pá»to Riko)", + "en_PW": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Paalu)", + "en_RW": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Ruwanda)", + "en_SB": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Etikun Solomoni)", + "en_SC": "Èdè Gẹ̀ẹÌsì (OrílẹÌède seṣẹlẹsi)", + "en_SD": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Sudani)", + "en_SE": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Swidini)", + "en_SG": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Singapo)", + "en_SH": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Hẹlena)", + "en_SI": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Silofania)", + "en_SL": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Siria looni)", + "en_SZ": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Saá¹£iland)", + "en_TC": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Tá»á»ki ati Etikun Kaká»si)", + "en_TK": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Tokelau)", + "en_TO": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Tonga)", + "en_TT": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Tirinida ati Tobaga)", + "en_TV": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Tufalu)", + "en_TZ": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Taná¹£ania)", + "en_UG": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Uganda)", + "en_US": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Orilẹede Amerika)", + "en_VC": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Fisẹnnti ati Genadina)", + "en_VG": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Etíkun Fágínì ti ìlú Bírítísì)", + "en_VI": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Etikun Fagini ti Amẹrika)", + "en_VU": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Faniatu)", + "en_WS": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Samá»)", + "en_ZA": "Èdè Gẹ̀ẹÌsì (OrílẹÌède Ariwa Afirika)", + "en_ZM": "Èdè Gẹ̀ẹÌsì (OrílẹÌède á¹£amibia)", + "en_ZW": "Èdè Gẹ̀ẹÌsì (OrílẹÌède á¹£imibabe)", + "eo": "Èdè Esperanto", + "es": "Èdè Sipanisi", + "es_AR": "Èdè Sipanisi (OrílẹÌède Agentínà)", + "es_BO": "Èdè Sipanisi (OrílẹÌède Bá»Ì€lífíyà)", + "es_BR": "Èdè Sipanisi (OrílẹÌède Bàràsílì)", + "es_CL": "Èdè Sipanisi (OrílẹÌède ṣílè)", + "es_CO": "Èdè Sipanisi (OrílẹÌède Kòlómíbìa)", + "es_CR": "Èdè Sipanisi (OrílẹÌède Kuusita Ríkà)", + "es_CU": "Èdè Sipanisi (OrílẹÌède Kúbà)", + "es_DO": "Èdè Sipanisi (OrilẹÌède Dòmíníkánì)", + "es_EC": "Èdè Sipanisi (OrílẹÌède Ekuádò)", + "es_ES": "Èdè Sipanisi (OrílẹÌède Sipani)", + "es_GQ": "Èdè Sipanisi (OrílẹÌède Ekutoria Gini)", + "es_GT": "Èdè Sipanisi (OrílẹÌède Guatemala)", + "es_HN": "Èdè Sipanisi (OrílẹÌède Hondurasi)", + "es_MX": "Èdè Sipanisi (OrílẹÌède Mesiko)", + "es_NI": "Èdè Sipanisi (OrílẹÌède NIkaragua)", + "es_PA": "Èdè Sipanisi (OrílẹÌède Panama)", + "es_PE": "Èdè Sipanisi (OrílẹÌède Peru)", + "es_PH": "Èdè Sipanisi (OrílẹÌède filipini)", + "es_PR": "Èdè Sipanisi (OrílẹÌède Pá»to Riko)", + "es_PY": "Èdè Sipanisi (OrílẹÌède Paraguye)", + "es_SV": "Èdè Sipanisi (OrílẹÌède Ẹẹsáfádò)", + "es_US": "Èdè Sipanisi (OrílẹÌède Orilẹede Amerika)", + "es_UY": "Èdè Sipanisi (OrílẹÌède Nruguayi)", + "es_VE": "Èdè Sipanisi (OrílẹÌède Fẹnẹṣuẹla)", + "et": "Èdè Estonia", + "et_EE": "Èdè Estonia (OrílẹÌède Esitonia)", + "eu": "Èdè Baski", + "eu_ES": "Èdè Baski (OrílẹÌède Sipani)", + "fa": "Èdè Pasia", + "fa_AF": "Èdè Pasia (OrílẹÌède Àfùgànístánì)", + "fa_IR": "Èdè Pasia (OrílẹÌède Irani)", + "fi": "Èdè Finisi", + "fi_FI": "Èdè Finisi (OrílẹÌède Filandi)", + "fo": "Èdè Faroesi", + "fo_DK": "Èdè Faroesi (OrílẹÌède DẹÌmákì)", + "fr": "Èdè Faransé", + "fr_BE": "Èdè Faransé (OrílẹÌède Bégíá»Ìmù)", + "fr_BF": "Èdè Faransé (OrílẹÌède Bùùkíná Fasò)", + "fr_BI": "Èdè Faransé (OrílẹÌède Bùùrúndì)", + "fr_BJ": "Èdè Faransé (OrílẹÌède Bẹ̀nẹ̀)", + "fr_CA": "Èdè Faransé (OrílẹÌède Kánádà)", + "fr_CD": "Èdè Faransé (OrilẹÌède Kóngò)", + "fr_CF": "Èdè Faransé (OrílẹÌède Àrin gùngun Ãfíríkà)", + "fr_CG": "Èdè Faransé (OrílẹÌède Kóngò)", + "fr_CH": "Èdè Faransé (OrílẹÌède switiá¹£ilandi)", + "fr_CI": "Èdè Faransé (OrílẹÌède Kóútè forà)", + "fr_CM": "Èdè Faransé (OrílẹÌède Kamerúúnì)", + "fr_DJ": "Èdè Faransé (OrílẹÌède Díbá»Ìótì)", + "fr_DZ": "Èdè Faransé (OrílẹÌède Àlùgèríánì)", + "fr_FR": "Èdè Faransé (OrílẹÌède Faranse)", + "fr_GA": "Èdè Faransé (OrílẹÌède Gabon)", + "fr_GF": "Èdè Faransé (OrílẹÌède Firená¹£i Guana)", + "fr_GN": "Èdè Faransé (OrílẹÌède Gene)", + "fr_GP": "Èdè Faransé (OrílẹÌède Gadelope)", + "fr_GQ": "Èdè Faransé (OrílẹÌède Ekutoria Gini)", + "fr_HT": "Èdè Faransé (OrílẹÌède Haati)", + "fr_KM": "Èdè Faransé (OrílẹÌède Kòmòrósì)", + "fr_LU": "Èdè Faransé (OrílẹÌède Lusemogi)", + "fr_MA": "Èdè Faransé (OrílẹÌède Moroko)", + "fr_MC": "Èdè Faransé (OrílẹÌède Monako)", + "fr_MG": "Èdè Faransé (OrílẹÌède Madasika)", + "fr_ML": "Èdè Faransé (OrílẹÌède Mali)", + "fr_MQ": "Èdè Faransé (OrílẹÌède Matinikuwi)", + "fr_MR": "Èdè Faransé (OrílẹÌède Maritania)", + "fr_MU": "Èdè Faransé (OrílẹÌède Maritiusi)", + "fr_NC": "Èdè Faransé (OrílẹÌède Kaledonia Titun)", + "fr_NE": "Èdè Faransé (OrílẹÌède Nàìjá)", + "fr_PF": "Èdè Faransé (OrílẹÌède Firená¹£i Polinesia)", + "fr_PM": "Èdè Faransé (OrílẹÌède Pẹẹri ati mikuloni)", + "fr_RE": "Èdè Faransé (OrílẹÌède Riuniyan)", + "fr_RW": "Èdè Faransé (OrílẹÌède Ruwanda)", + "fr_SC": "Èdè Faransé (OrílẹÌède seṣẹlẹsi)", + "fr_SN": "Èdè Faransé (OrílẹÌède Sẹnẹga)", + "fr_SY": "Èdè Faransé (OrílẹÌède Siria)", + "fr_TD": "Èdè Faransé (OrílẹÌède ṣààdì)", + "fr_TG": "Èdè Faransé (OrílẹÌède Togo)", + "fr_TN": "Èdè Faransé (OrílẹÌède Tuniá¹£ia)", + "fr_VU": "Èdè Faransé (OrílẹÌède Faniatu)", + "fr_WF": "Èdè Faransé (OrílẹÌède Wali ati futuna)", + "fr_YT": "Èdè Faransé (OrílẹÌède Mayote)", + "fy": "Èdè Frisia", + "fy_NL": "Èdè Frisia (OrílẹÌède Nedalandi)", + "ga": "Èdè Ireland", + "ga_IE": "Èdè Ireland (OrílẹÌède Ailandi)", + "gd": "Èdè Gaelik ti Ilu Scotland", + "gd_GB": "Èdè Gaelik ti Ilu Scotland (OrílẹÌède Omobabirin)", + "gl": "Èdè Galicia", + "gl_ES": "Èdè Galicia (OrílẹÌède Sipani)", + "gu": "Èdè Gujarati", + "gu_IN": "Èdè Gujarati (OrílẹÌède India)", + "ha": "Èdè Hausa", + "ha_GH": "Èdè Hausa (OrílẹÌède Gana)", + "ha_NE": "Èdè Hausa (OrílẹÌède Nàìjá)", + "ha_NG": "Èdè Hausa (OrílẹÌède Nàìjíríà)", + "he": "Èdè Heberu", + "he_IL": "Èdè Heberu (OrílẹÌède Iserẹli)", + "hi": "Èdè Hindi", + "hi_IN": "Èdè Hindi (OrílẹÌède India)", + "hr": "Èdè Kroatia", + "hr_BA": "Èdè Kroatia (OrílẹÌède Bá»Ì€síníà àti Ẹtisẹgófínà)", + "hr_HR": "Èdè Kroatia (OrílẹÌède Kòróátíà)", + "hu": "Èdè Hungaria", + "hu_HU": "Èdè Hungaria (OrílẹÌède Hungari)", + "hy": "Èdè Ile Armenia", + "hy_AM": "Èdè Ile Armenia (OrílẹÌède Améníà)", + "id": "Èdè Indonasia", + "id_ID": "Èdè Indonasia (OrílẹÌède Indonesia)", + "ig": "Èdè Ibo", + "ig_NG": "Èdè Ibo (OrílẹÌède Nàìjíríà)", + "is": "Èdè Icelandic", + "is_IS": "Èdè Icelandic (OrílẹÌède Aá¹£ilandi)", + "it": "Èdè Italiani", + "it_CH": "Èdè Italiani (OrílẹÌède switiá¹£ilandi)", + "it_IT": "Èdè Italiani (OrílẹÌède Italiyi)", + "it_SM": "Èdè Italiani (OrílẹÌède Sani Marino)", + "ja": "Èdè Japanisi", + "ja_JP": "Èdè Japanisi (OrílẹÌède Japani)", + "ka": "Èdè Georgia", + "ka_GE": "Èdè Georgia (OrílẹÌède Gá»gia)", + "km": "Èdè kameri", + "km_KH": "Èdè kameri (OrílẹÌède Kàmùbódíà)", + "kn": "Èdè Kannada", + "kn_IN": "Èdè Kannada (OrílẹÌède India)", + "ko": "Èdè Koria", + "ko_KP": "Èdè Koria (OrílẹÌède Guusu Ká»ria)", + "ko_KR": "Èdè Koria (OrílẹÌède Ariwa Ká»ria)", + "lt": "Èdè Lithuania", + "lt_LT": "Èdè Lithuania (OrílẹÌède Lituania)", + "lv": "Èdè Latvianu", + "lv_LV": "Èdè Latvianu (OrílẹÌède Latifia)", + "mk": "Èdè Macedonia", + "mk_MK": "Èdè Macedonia (OrílẹÌède Masidonia)", + "mr": "Èdè marathi", + "mr_IN": "Èdè marathi (OrílẹÌède India)", + "ms": "Èdè Malaya", + "ms_BN": "Èdè Malaya (OrílẹÌède BúrúnẹÌlì)", + "ms_MY": "Èdè Malaya (OrílẹÌède Malasia)", + "ms_SG": "Èdè Malaya (OrílẹÌède Singapo)", + "mt": "Èdè Malta", + "mt_MT": "Èdè Malta (OrílẹÌède Malata)", + "my": "Èdè Bumiisi", + "my_MM": "Èdè Bumiisi (OrílẹÌède Manamari)", + "ne": "Èdè Nepali", + "ne_IN": "Èdè Nepali (OrílẹÌède India)", + "ne_NP": "Èdè Nepali (OrílẹÌède Nepa)", + "nl": "Èdè Duki", + "nl_AW": "Èdè Duki (OrílẹÌède Ãrúbà)", + "nl_BE": "Èdè Duki (OrílẹÌède Bégíá»Ìmù)", + "nl_NL": "Èdè Duki (OrílẹÌède Nedalandi)", + "nl_SR": "Èdè Duki (OrílẹÌède Surinami)", + "no": "Èdè Norway", + "no_NO": "Èdè Norway (OrílẹÌède Ná»á»wii)", + "pa": "Èdè Punjabi", + "pa_IN": "Èdè Punjabi (OrílẹÌède India)", + "pa_PK": "Èdè Punjabi (OrílẹÌède Pakisitan)", + "pl": "Èdè Ilẹ̀ Polandi", + "pl_PL": "Èdè Ilẹ̀ Polandi (OrílẹÌède Polandi)", + "pt": "Èdè Pá»tugi", + "pt_AO": "Èdè Pá»tugi (OrílẹÌède Ààngólà)", + "pt_BR": "Èdè Pá»tugi (OrílẹÌède Bàràsílì)", + "pt_CH": "Èdè Pá»tugi (OrílẹÌède switiá¹£ilandi)", + "pt_CV": "Èdè Pá»tugi (OrílẹÌède Etíokun Kápé féndè)", + "pt_GQ": "Èdè Pá»tugi (OrílẹÌède Ekutoria Gini)", + "pt_GW": "Èdè Pá»tugi (OrílẹÌède Gene-Busau)", + "pt_LU": "Èdè Pá»tugi (OrílẹÌède Lusemogi)", + "pt_MZ": "Èdè Pá»tugi (OrílẹÌède Moá¹£amibiku)", + "pt_PT": "Èdè Pá»tugi (OrílẹÌède Pá»tugi)", + "pt_ST": "Èdè Pá»tugi (OrílẹÌède Sao tomi ati piriiá¹£ipi)", + "pt_TL": "Èdè Pá»tugi (OrílẹÌède ÃŒlàOòrùn Tímá»Ì€)", + "ro": "Èdè Romania", + "ro_MD": "Èdè Romania (OrílẹÌède Modofia)", + "ro_RO": "Èdè Romania (OrílẹÌède Romaniya)", + "ru": "Èdè Ì£Rá»á»sia", + "ru_BY": "Èdè Ì£Rá»á»sia (OrílẹÌède Bélárúsì)", + "ru_KG": "Èdè Ì£Rá»á»sia (OrílẹÌède Kuriá¹£isitani)", + "ru_KZ": "Èdè Ì£Rá»á»sia (OrílẹÌède Kaá¹£aá¹£atani)", + "ru_MD": "Èdè Ì£Rá»á»sia (OrílẹÌède Modofia)", + "ru_RU": "Èdè Ì£Rá»á»sia (OrílẹÌède Rá»á¹£ia)", + "ru_UA": "Èdè Ì£Rá»á»sia (OrílẹÌède Ukarini)", + "rw": "Èdè Ruwanda", + "rw_RW": "Èdè Ruwanda (OrílẹÌède Ruwanda)", + "sh": "Èdè Serbo-Croatiani", + "sh_BA": "Èdè Serbo-Croatiani (OrílẹÌède Bá»Ì€síníà àti Ẹtisẹgófínà)", + "si": "Èdè Sinhalese", + "si_LK": "Èdè Sinhalese (OrílẹÌède Siri Lanka)", + "sk": "Èdè Slovaki", + "sk_SK": "Èdè Slovaki (OrílẹÌède Silofakia)", + "sl": "Èdè Slovenia", + "sl_SI": "Èdè Slovenia (OrílẹÌède Silofania)", + "so": "Èdè ara Somalia", + "so_DJ": "Èdè ara Somalia (OrílẹÌède Díbá»Ìótì)", + "so_ET": "Èdè ara Somalia (OrílẹÌède Etopia)", + "so_KE": "Èdè ara Somalia (OrílẹÌède Kenya)", + "so_SO": "Èdè ara Somalia (OrílẹÌède Somalia)", + "sq": "Èdè Albania", + "sq_AL": "Èdè Albania (OrílẹÌède Àlùbàníánì)", + "sq_MK": "Èdè Albania (OrílẹÌède Masidonia)", + "sr": "Èdè Serbia", + "sr_BA": "Èdè Serbia (OrílẹÌède Bá»Ì€síníà àti Ẹtisẹgófínà)", + "sv": "Èdè Suwidiisi", + "sv_FI": "Èdè Suwidiisi (OrílẹÌède Filandi)", + "sv_SE": "Èdè Suwidiisi (OrílẹÌède Swidini)", + "sw": "Èdè Swahili", + "sw_CD": "Èdè Swahili (OrilẹÌède Kóngò)", + "sw_KE": "Èdè Swahili (OrílẹÌède Kenya)", + "sw_TZ": "Èdè Swahili (OrílẹÌède Taná¹£ania)", + "sw_UG": "Èdè Swahili (OrílẹÌède Uganda)", + "ta": "Èdè Tamili", + "ta_IN": "Èdè Tamili (OrílẹÌède India)", + "ta_LK": "Èdè Tamili (OrílẹÌède Siri Lanka)", + "ta_MY": "Èdè Tamili (OrílẹÌède Malasia)", + "ta_SG": "Èdè Tamili (OrílẹÌède Singapo)", + "te": "Èdè Telugu", + "te_IN": "Èdè Telugu (OrílẹÌède India)", + "th": "Èdè Tai", + "th_TH": "Èdè Tai (OrílẹÌède Tailandi)", + "ti": "Èdè Tigrinya", + "ti_ER": "Èdè Tigrinya (OrílẹÌède Eritira)", + "ti_ET": "Èdè Tigrinya (OrílẹÌède Etopia)", + "tr": "Èdè Tá»á»kisi", + "tr_CY": "Èdè Tá»á»kisi (OrílẹÌède Kúrúsì)", + "tr_TR": "Èdè Tá»á»kisi (OrílẹÌède Tá»á»ki)", + "uk": "Èdè Ukania", + "uk_UA": "Èdè Ukania (OrílẹÌède Ukarini)", + "ur": "Èdè Udu", + "ur_IN": "Èdè Udu (OrílẹÌède India)", + "ur_PK": "Èdè Udu (OrílẹÌède Pakisitan)", + "uz": "Èdè Uzbek", + "uz_AF": "Èdè Uzbek (OrílẹÌède Àfùgànístánì)", + "uz_UZ": "Èdè Uzbek (OrílẹÌède Ná¹£ibẹkisitani)", + "vi": "Èdè Jetinamu", + "vi_VN": "Èdè Jetinamu (OrílẹÌède Fẹtinami)", + "yi": "Èdè Yiddishi", + "yo": "Èdè Yorùbá", + "yo_BJ": "Èdè Yorùbá (OrílẹÌède Bẹ̀nẹ̀)", + "yo_NG": "Èdè Yorùbá (OrílẹÌède Nàìjíríà)", + "zh": "Èdè Mandari", + "zh_CN": "Èdè Mandari (OrílẹÌède ṣáínà)", + "zh_SG": "Èdè Mandari (OrílẹÌède Singapo)", + "zh_TW": "Èdè Mandari (OrílẹÌède Taiwani)", + "zu": "Èdè á¹¢ulu", + "zu_ZA": "Èdè á¹¢ulu (OrílẹÌède Ariwa Afirika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/yo_BJ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/yo_BJ.json new file mode 100644 index 0000000000000000000000000000000000000000..9288ebc9eff2c09e7d17c92bcecd49458001e1cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/yo_BJ.json @@ -0,0 +1,335 @@ +{ + "Names": { + "af_NA": "Èdè Afrikani (OrílÉ›Ìède Namibia)", + "af_ZA": "Èdè Afrikani (OrílÉ›Ìède Ariwa Afirika)", + "ak_GH": "Èdè Akani (OrílÉ›Ìède Gana)", + "am_ET": "Èdè Amariki (OrílÉ›Ìède Etopia)", + "ar_AE": "Èdè Arabiki (OrílÉ›Ìède Æmirate ti AwÉ”n Arabu)", + "ar_BH": "Èdè Arabiki (OrílÉ›Ìède Báránì)", + "ar_DJ": "Èdè Arabiki (OrílÉ›Ìède DíbÉ”Ìótì)", + "ar_DZ": "Èdè Arabiki (OrílÉ›Ìède Àlùgèríánì)", + "ar_EG": "Èdè Arabiki (OrílÉ›Ìède Égípítì)", + "ar_ER": "Èdè Arabiki (OrílÉ›Ìède Eritira)", + "ar_IL": "Èdè Arabiki (OrílÉ›Ìède IserÉ›li)", + "ar_IQ": "Èdè Arabiki (OrílÉ›Ìède Iraki)", + "ar_JO": "Èdè Arabiki (OrílÉ›Ìède JÉ”dani)", + "ar_KM": "Èdè Arabiki (OrílÉ›Ìède Kòmòrósì)", + "ar_KW": "Èdè Arabiki (OrílÉ›Ìède Kuweti)", + "ar_LB": "Èdè Arabiki (OrílÉ›Ìède Lebanoni)", + "ar_LY": "Èdè Arabiki (OrílÉ›Ìède Libiya)", + "ar_MA": "Èdè Arabiki (OrílÉ›Ìède Moroko)", + "ar_MR": "Èdè Arabiki (OrílÉ›Ìède Maritania)", + "ar_OM": "Èdè Arabiki (OrílÉ›Ìède Ɔɔma)", + "ar_PS": "Èdè Arabiki (OrílÉ›Ìède IwÉ”orun Pakisitian ati Gasha)", + "ar_QA": "Èdè Arabiki (OrílÉ›Ìède Kota)", + "ar_SA": "Èdè Arabiki (OrílÉ›Ìède Saudi Arabia)", + "ar_SD": "Èdè Arabiki (OrílÉ›Ìède Sudani)", + "ar_SO": "Èdè Arabiki (OrílÉ›Ìède Somalia)", + "ar_SY": "Èdè Arabiki (OrílÉ›Ìède Siria)", + "ar_TD": "Èdè Arabiki (OrílÉ›Ìède shààdì)", + "ar_TN": "Èdè Arabiki (OrílÉ›Ìède Tunishia)", + "ar_YE": "Èdè Arabiki (OrílÉ›Ìède yemeni)", + "as_IN": "Ti Assam (OrílÉ›Ìède India)", + "az_AZ": "Èdè Azerbaijani (OrílÉ›Ìède AsÉ›Ìbájánì)", + "be_BY": "Èdè Belarusi (OrílÉ›Ìède Bélárúsì)", + "bg_BG": "Èdè Bugaria (OrílÉ›Ìède Bùùgáríà)", + "bn_BD": "Èdè Bengali (OrílÉ›Ìède Bángáládésì)", + "bn_IN": "Èdè Bengali (OrílÉ›Ìède India)", + "br_FR": "Èdè Bretoni (OrílÉ›Ìède Faranse)", + "bs_BA": "Èdè Bosnia (OrílÉ›Ìède Bɔ̀síníà àti ÆtisÉ›gófínà)", + "ca_AD": "Èdè Catala (OrílÉ›Ìède Ààndórà)", + "ca_ES": "Èdè Catala (OrílÉ›Ìède Sipani)", + "ca_FR": "Èdè Catala (OrílÉ›Ìède Faranse)", + "ca_IT": "Èdè Catala (OrílÉ›Ìède Italiyi)", + "cs_CZ": "Èdè seeki (OrílÉ›Ìède shÉ›ÌÉ›Ìkì)", + "cy_GB": "Èdè Welshi (OrílÉ›Ìède Omobabirin)", + "da": "Èdè Ilɛ̀ Denmark", + "da_DK": "Èdè Ilɛ̀ Denmark (OrílÉ›Ìède DÉ›Ìmákì)", + "da_GL": "Èdè Ilɛ̀ Denmark (OrílÉ›Ìède Gerelandi)", + "de": "Èdè Ilɛ̀ Gemani", + "de_AT": "Èdè Ilɛ̀ Gemani (OrílÉ›Ìède Asítíríà)", + "de_BE": "Èdè Ilɛ̀ Gemani (OrílÉ›Ìède BégíɔÌmù)", + "de_CH": "Èdè Ilɛ̀ Gemani (OrílÉ›Ìède switishilandi)", + "de_DE": "Èdè Ilɛ̀ Gemani (OrílÉ›Ìède Gemani)", + "de_IT": "Èdè Ilɛ̀ Gemani (OrílÉ›Ìède Italiyi)", + "de_LI": "Èdè Ilɛ̀ Gemani (OrílÉ›Ìède LÉ›shitÉ›nisiteni)", + "de_LU": "Èdè Ilɛ̀ Gemani (OrílÉ›Ìède Lusemogi)", + "el_CY": "Èdè Giriki (OrílÉ›Ìède Kúrúsì)", + "el_GR": "Èdè Giriki (OrílÉ›Ìède Geriisi)", + "en": "Èdè Gɛ̀ɛÌsì", + "en_AG": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Ààntígúà àti Báríbúdà)", + "en_AI": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Ààngúlílà)", + "en_AS": "Èdè Gɛ̀ɛÌsì (Sámóánì ti OrílÉ›Ìède Àméríkà)", + "en_AT": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Asítíríà)", + "en_AU": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Ãstràlìá)", + "en_BB": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Bábádósì)", + "en_BE": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède BégíɔÌmù)", + "en_BI": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Bùùrúndì)", + "en_BM": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Bémúdà)", + "en_BS": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Bàhámásì)", + "en_BW": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Bɔ̀tìsúwánà)", + "en_BZ": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Bèlísɛ̀)", + "en_CA": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Kánádà)", + "en_CH": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède switishilandi)", + "en_CK": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Etíokun Kùúkù)", + "en_CM": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Kamerúúnì)", + "en_CY": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Kúrúsì)", + "en_DE": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Gemani)", + "en_DK": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède DÉ›Ìmákì)", + "en_DM": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Dòmíníkà)", + "en_ER": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Eritira)", + "en_FI": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Filandi)", + "en_FJ": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Fiji)", + "en_FK": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Etikun Fakalandi)", + "en_FM": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Makoronesia)", + "en_GB": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Omobabirin)", + "en_GD": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Genada)", + "en_GH": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Gana)", + "en_GI": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Gibaratara)", + "en_GM": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Gambia)", + "en_GU": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Guamu)", + "en_GY": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Guyana)", + "en_IE": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Ailandi)", + "en_IL": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède IserÉ›li)", + "en_IN": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède India)", + "en_IO": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Etíkun Ãndíánì ti ÃŒlú Bírítísì)", + "en_JM": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Jamaika)", + "en_KE": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Kenya)", + "en_KI": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Kiribati)", + "en_KN": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Kiiti ati Neefi)", + "en_KY": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Etíokun Kámánì)", + "en_LC": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Lushia)", + "en_LR": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Laberia)", + "en_LS": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Lesoto)", + "en_MG": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Madasika)", + "en_MH": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Etikun Máshali)", + "en_MP": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Etikun Guusu Mariana)", + "en_MS": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Motserati)", + "en_MT": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Malata)", + "en_MU": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Maritiusi)", + "en_MW": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Malawi)", + "en_MY": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Malasia)", + "en_NA": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Namibia)", + "en_NF": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Etikun NÉ”Ìúfókì)", + "en_NG": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Nàìjíríà)", + "en_NL": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Nedalandi)", + "en_NR": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Nauru)", + "en_NU": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Niue)", + "en_NZ": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède shilandi Titun)", + "en_PG": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Paapu ti Giini)", + "en_PH": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède filipini)", + "en_PK": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Pakisitan)", + "en_PN": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Pikarini)", + "en_PR": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède PÉ”to Riko)", + "en_PW": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Paalu)", + "en_RW": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Ruwanda)", + "en_SB": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Etikun Solomoni)", + "en_SC": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède seshÉ›lÉ›si)", + "en_SD": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Sudani)", + "en_SE": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Swidini)", + "en_SG": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Singapo)", + "en_SH": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède HÉ›lena)", + "en_SI": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Silofania)", + "en_SL": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Siria looni)", + "en_SZ": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Sashiland)", + "en_TC": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Tɔɔki ati Etikun KakÉ”si)", + "en_TK": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Tokelau)", + "en_TO": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Tonga)", + "en_TT": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Tirinida ati Tobaga)", + "en_TV": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Tufalu)", + "en_TZ": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Tanshania)", + "en_UG": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Uganda)", + "en_US": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède OrilÉ›ede Amerika)", + "en_VC": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède FisÉ›nnti ati Genadina)", + "en_VG": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Etíkun Fágínì ti ìlú Bírítísì)", + "en_VI": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Etikun Fagini ti AmÉ›rika)", + "en_VU": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Faniatu)", + "en_WS": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède SamÉ”)", + "en_ZA": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède Ariwa Afirika)", + "en_ZM": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède shamibia)", + "en_ZW": "Èdè Gɛ̀ɛÌsì (OrílÉ›Ìède shimibabe)", + "es_AR": "Èdè Sipanisi (OrílÉ›Ìède Agentínà)", + "es_BO": "Èdè Sipanisi (OrílÉ›Ìède Bɔ̀lífíyà)", + "es_BR": "Èdè Sipanisi (OrílÉ›Ìède Bàràsílì)", + "es_CL": "Èdè Sipanisi (OrílÉ›Ìède shílè)", + "es_CO": "Èdè Sipanisi (OrílÉ›Ìède Kòlómíbìa)", + "es_CR": "Èdè Sipanisi (OrílÉ›Ìède Kuusita Ríkà)", + "es_CU": "Èdè Sipanisi (OrílÉ›Ìède Kúbà)", + "es_DO": "Èdè Sipanisi (OrilÉ›Ìède Dòmíníkánì)", + "es_EC": "Èdè Sipanisi (OrílÉ›Ìède Ekuádò)", + "es_ES": "Èdè Sipanisi (OrílÉ›Ìède Sipani)", + "es_GQ": "Èdè Sipanisi (OrílÉ›Ìède Ekutoria Gini)", + "es_GT": "Èdè Sipanisi (OrílÉ›Ìède Guatemala)", + "es_HN": "Èdè Sipanisi (OrílÉ›Ìède Hondurasi)", + "es_MX": "Èdè Sipanisi (OrílÉ›Ìède Mesiko)", + "es_NI": "Èdè Sipanisi (OrílÉ›Ìède NIkaragua)", + "es_PA": "Èdè Sipanisi (OrílÉ›Ìède Panama)", + "es_PE": "Èdè Sipanisi (OrílÉ›Ìède Peru)", + "es_PH": "Èdè Sipanisi (OrílÉ›Ìède filipini)", + "es_PR": "Èdè Sipanisi (OrílÉ›Ìède PÉ”to Riko)", + "es_PY": "Èdè Sipanisi (OrílÉ›Ìède Paraguye)", + "es_SV": "Èdè Sipanisi (OrílÉ›Ìède ÆÉ›sáfádò)", + "es_US": "Èdè Sipanisi (OrílÉ›Ìède OrilÉ›ede Amerika)", + "es_UY": "Èdè Sipanisi (OrílÉ›Ìède Nruguayi)", + "es_VE": "Èdè Sipanisi (OrílÉ›Ìède FÉ›nÉ›shuÉ›la)", + "et_EE": "Èdè Estonia (OrílÉ›Ìède Esitonia)", + "eu_ES": "Èdè Baski (OrílÉ›Ìède Sipani)", + "fa_AF": "Èdè Pasia (OrílÉ›Ìède Àfùgànístánì)", + "fa_IR": "Èdè Pasia (OrílÉ›Ìède Irani)", + "fi_FI": "Èdè Finisi (OrílÉ›Ìède Filandi)", + "fo_DK": "Èdè Faroesi (OrílÉ›Ìède DÉ›Ìmákì)", + "fr_BE": "Èdè Faransé (OrílÉ›Ìède BégíɔÌmù)", + "fr_BF": "Èdè Faransé (OrílÉ›Ìède Bùùkíná Fasò)", + "fr_BI": "Èdè Faransé (OrílÉ›Ìède Bùùrúndì)", + "fr_BJ": "Èdè Faransé (OrílÉ›Ìède Bɛ̀nɛ̀)", + "fr_CA": "Èdè Faransé (OrílÉ›Ìède Kánádà)", + "fr_CD": "Èdè Faransé (OrilÉ›Ìède Kóngò)", + "fr_CF": "Èdè Faransé (OrílÉ›Ìède Àrin gùngun Ãfíríkà)", + "fr_CG": "Èdè Faransé (OrílÉ›Ìède Kóngò)", + "fr_CH": "Èdè Faransé (OrílÉ›Ìède switishilandi)", + "fr_CI": "Èdè Faransé (OrílÉ›Ìède Kóútè forà)", + "fr_CM": "Èdè Faransé (OrílÉ›Ìède Kamerúúnì)", + "fr_DJ": "Èdè Faransé (OrílÉ›Ìède DíbÉ”Ìótì)", + "fr_DZ": "Èdè Faransé (OrílÉ›Ìède Àlùgèríánì)", + "fr_FR": "Èdè Faransé (OrílÉ›Ìède Faranse)", + "fr_GA": "Èdè Faransé (OrílÉ›Ìède Gabon)", + "fr_GF": "Èdè Faransé (OrílÉ›Ìède Firenshi Guana)", + "fr_GN": "Èdè Faransé (OrílÉ›Ìède Gene)", + "fr_GP": "Èdè Faransé (OrílÉ›Ìède Gadelope)", + "fr_GQ": "Èdè Faransé (OrílÉ›Ìède Ekutoria Gini)", + "fr_HT": "Èdè Faransé (OrílÉ›Ìède Haati)", + "fr_KM": "Èdè Faransé (OrílÉ›Ìède Kòmòrósì)", + "fr_LU": "Èdè Faransé (OrílÉ›Ìède Lusemogi)", + "fr_MA": "Èdè Faransé (OrílÉ›Ìède Moroko)", + "fr_MC": "Èdè Faransé (OrílÉ›Ìède Monako)", + "fr_MG": "Èdè Faransé (OrílÉ›Ìède Madasika)", + "fr_ML": "Èdè Faransé (OrílÉ›Ìède Mali)", + "fr_MQ": "Èdè Faransé (OrílÉ›Ìède Matinikuwi)", + "fr_MR": "Èdè Faransé (OrílÉ›Ìède Maritania)", + "fr_MU": "Èdè Faransé (OrílÉ›Ìède Maritiusi)", + "fr_NC": "Èdè Faransé (OrílÉ›Ìède Kaledonia Titun)", + "fr_NE": "Èdè Faransé (OrílÉ›Ìède Nàìjá)", + "fr_PF": "Èdè Faransé (OrílÉ›Ìède Firenshi Polinesia)", + "fr_PM": "Èdè Faransé (OrílÉ›Ìède Pɛɛri ati mikuloni)", + "fr_RE": "Èdè Faransé (OrílÉ›Ìède Riuniyan)", + "fr_RW": "Èdè Faransé (OrílÉ›Ìède Ruwanda)", + "fr_SC": "Èdè Faransé (OrílÉ›Ìède seshÉ›lÉ›si)", + "fr_SN": "Èdè Faransé (OrílÉ›Ìède SÉ›nÉ›ga)", + "fr_SY": "Èdè Faransé (OrílÉ›Ìède Siria)", + "fr_TD": "Èdè Faransé (OrílÉ›Ìède shààdì)", + "fr_TG": "Èdè Faransé (OrílÉ›Ìède Togo)", + "fr_TN": "Èdè Faransé (OrílÉ›Ìède Tunishia)", + "fr_VU": "Èdè Faransé (OrílÉ›Ìède Faniatu)", + "fr_WF": "Èdè Faransé (OrílÉ›Ìède Wali ati futuna)", + "fr_YT": "Èdè Faransé (OrílÉ›Ìède Mayote)", + "fy_NL": "Èdè Frisia (OrílÉ›Ìède Nedalandi)", + "ga_IE": "Èdè Ireland (OrílÉ›Ìède Ailandi)", + "gd_GB": "Èdè Gaelik ti Ilu Scotland (OrílÉ›Ìède Omobabirin)", + "gl_ES": "Èdè Galicia (OrílÉ›Ìède Sipani)", + "gu_IN": "Èdè Gujarati (OrílÉ›Ìède India)", + "ha_GH": "Èdè Hausa (OrílÉ›Ìède Gana)", + "ha_NE": "Èdè Hausa (OrílÉ›Ìède Nàìjá)", + "ha_NG": "Èdè Hausa (OrílÉ›Ìède Nàìjíríà)", + "he_IL": "Èdè Heberu (OrílÉ›Ìède IserÉ›li)", + "hi_IN": "Èdè Hindi (OrílÉ›Ìède India)", + "hr_BA": "Èdè Kroatia (OrílÉ›Ìède Bɔ̀síníà àti ÆtisÉ›gófínà)", + "hr_HR": "Èdè Kroatia (OrílÉ›Ìède Kòróátíà)", + "hu_HU": "Èdè Hungaria (OrílÉ›Ìède Hungari)", + "hy_AM": "Èdè Ile Armenia (OrílÉ›Ìède Améníà)", + "id_ID": "Èdè Indonasia (OrílÉ›Ìède Indonesia)", + "ig_NG": "Èdè Ibo (OrílÉ›Ìède Nàìjíríà)", + "is_IS": "Èdè Icelandic (OrílÉ›Ìède Ashilandi)", + "it_CH": "Èdè Italiani (OrílÉ›Ìède switishilandi)", + "it_IT": "Èdè Italiani (OrílÉ›Ìède Italiyi)", + "it_SM": "Èdè Italiani (OrílÉ›Ìède Sani Marino)", + "ja_JP": "Èdè Japanisi (OrílÉ›Ìède Japani)", + "ka_GE": "Èdè Georgia (OrílÉ›Ìède GÉ”gia)", + "km_KH": "Èdè kameri (OrílÉ›Ìède Kàmùbódíà)", + "kn_IN": "Èdè Kannada (OrílÉ›Ìède India)", + "ko_KP": "Èdè Koria (OrílÉ›Ìède Guusu KÉ”ria)", + "ko_KR": "Èdè Koria (OrílÉ›Ìède Ariwa KÉ”ria)", + "lt_LT": "Èdè Lithuania (OrílÉ›Ìède Lituania)", + "lv_LV": "Èdè Latvianu (OrílÉ›Ìède Latifia)", + "mk_MK": "Èdè Macedonia (OrílÉ›Ìède Masidonia)", + "mr_IN": "Èdè marathi (OrílÉ›Ìède India)", + "ms_BN": "Èdè Malaya (OrílÉ›Ìède BúrúnÉ›Ìlì)", + "ms_MY": "Èdè Malaya (OrílÉ›Ìède Malasia)", + "ms_SG": "Èdè Malaya (OrílÉ›Ìède Singapo)", + "mt_MT": "Èdè Malta (OrílÉ›Ìède Malata)", + "my_MM": "Èdè Bumiisi (OrílÉ›Ìède Manamari)", + "ne_IN": "Èdè Nepali (OrílÉ›Ìède India)", + "ne_NP": "Èdè Nepali (OrílÉ›Ìède Nepa)", + "nl_AW": "Èdè Duki (OrílÉ›Ìède Ãrúbà)", + "nl_BE": "Èdè Duki (OrílÉ›Ìède BégíɔÌmù)", + "nl_NL": "Èdè Duki (OrílÉ›Ìède Nedalandi)", + "nl_SR": "Èdè Duki (OrílÉ›Ìède Surinami)", + "no_NO": "Èdè Norway (OrílÉ›Ìède Nɔɔwii)", + "pa_IN": "Èdè Punjabi (OrílÉ›Ìède India)", + "pa_PK": "Èdè Punjabi (OrílÉ›Ìède Pakisitan)", + "pl": "Èdè Ilɛ̀ Polandi", + "pl_PL": "Èdè Ilɛ̀ Polandi (OrílÉ›Ìède Polandi)", + "pt": "Èdè PÉ”tugi", + "pt_AO": "Èdè PÉ”tugi (OrílÉ›Ìède Ààngólà)", + "pt_BR": "Èdè PÉ”tugi (OrílÉ›Ìède Bàràsílì)", + "pt_CH": "Èdè PÉ”tugi (OrílÉ›Ìède switishilandi)", + "pt_CV": "Èdè PÉ”tugi (OrílÉ›Ìède Etíokun Kápé féndè)", + "pt_GQ": "Èdè PÉ”tugi (OrílÉ›Ìède Ekutoria Gini)", + "pt_GW": "Èdè PÉ”tugi (OrílÉ›Ìède Gene-Busau)", + "pt_LU": "Èdè PÉ”tugi (OrílÉ›Ìède Lusemogi)", + "pt_MZ": "Èdè PÉ”tugi (OrílÉ›Ìède Moshamibiku)", + "pt_PT": "Èdè PÉ”tugi (OrílÉ›Ìède PÉ”tugi)", + "pt_ST": "Èdè PÉ”tugi (OrílÉ›Ìède Sao tomi ati piriishipi)", + "pt_TL": "Èdè PÉ”tugi (OrílÉ›Ìède ÃŒlàOòrùn Tímɔ̀)", + "ro_MD": "Èdè Romania (OrílÉ›Ìède Modofia)", + "ro_RO": "Èdè Romania (OrílÉ›Ìède Romaniya)", + "ru": "Èdè Ì£Rɔɔsia", + "ru_BY": "Èdè Ì£Rɔɔsia (OrílÉ›Ìède Bélárúsì)", + "ru_KG": "Èdè Ì£Rɔɔsia (OrílÉ›Ìède Kurishisitani)", + "ru_KZ": "Èdè Ì£Rɔɔsia (OrílÉ›Ìède Kashashatani)", + "ru_MD": "Èdè Ì£Rɔɔsia (OrílÉ›Ìède Modofia)", + "ru_RU": "Èdè Ì£Rɔɔsia (OrílÉ›Ìède RÉ”shia)", + "ru_UA": "Èdè Ì£Rɔɔsia (OrílÉ›Ìède Ukarini)", + "rw_RW": "Èdè Ruwanda (OrílÉ›Ìède Ruwanda)", + "sh_BA": "Èdè Serbo-Croatiani (OrílÉ›Ìède Bɔ̀síníà àti ÆtisÉ›gófínà)", + "si_LK": "Èdè Sinhalese (OrílÉ›Ìède Siri Lanka)", + "sk_SK": "Èdè Slovaki (OrílÉ›Ìède Silofakia)", + "sl_SI": "Èdè Slovenia (OrílÉ›Ìède Silofania)", + "so_DJ": "Èdè ara Somalia (OrílÉ›Ìède DíbÉ”Ìótì)", + "so_ET": "Èdè ara Somalia (OrílÉ›Ìède Etopia)", + "so_KE": "Èdè ara Somalia (OrílÉ›Ìède Kenya)", + "so_SO": "Èdè ara Somalia (OrílÉ›Ìède Somalia)", + "sq_AL": "Èdè Albania (OrílÉ›Ìède Àlùbàníánì)", + "sq_MK": "Èdè Albania (OrílÉ›Ìède Masidonia)", + "sr_BA": "Èdè Serbia (OrílÉ›Ìède Bɔ̀síníà àti ÆtisÉ›gófínà)", + "sv_FI": "Èdè Suwidiisi (OrílÉ›Ìède Filandi)", + "sv_SE": "Èdè Suwidiisi (OrílÉ›Ìède Swidini)", + "sw_CD": "Èdè Swahili (OrilÉ›Ìède Kóngò)", + "sw_KE": "Èdè Swahili (OrílÉ›Ìède Kenya)", + "sw_TZ": "Èdè Swahili (OrílÉ›Ìède Tanshania)", + "sw_UG": "Èdè Swahili (OrílÉ›Ìède Uganda)", + "ta_IN": "Èdè Tamili (OrílÉ›Ìède India)", + "ta_LK": "Èdè Tamili (OrílÉ›Ìède Siri Lanka)", + "ta_MY": "Èdè Tamili (OrílÉ›Ìède Malasia)", + "ta_SG": "Èdè Tamili (OrílÉ›Ìède Singapo)", + "te_IN": "Èdè Telugu (OrílÉ›Ìède India)", + "th_TH": "Èdè Tai (OrílÉ›Ìède Tailandi)", + "ti_ER": "Èdè Tigrinya (OrílÉ›Ìède Eritira)", + "ti_ET": "Èdè Tigrinya (OrílÉ›Ìède Etopia)", + "tr": "Èdè Tɔɔkisi", + "tr_CY": "Èdè Tɔɔkisi (OrílÉ›Ìède Kúrúsì)", + "tr_TR": "Èdè Tɔɔkisi (OrílÉ›Ìède Tɔɔki)", + "uk_UA": "Èdè Ukania (OrílÉ›Ìède Ukarini)", + "ur_IN": "Èdè Udu (OrílÉ›Ìède India)", + "ur_PK": "Èdè Udu (OrílÉ›Ìède Pakisitan)", + "uz_AF": "Èdè Uzbek (OrílÉ›Ìède Àfùgànístánì)", + "uz_UZ": "Èdè Uzbek (OrílÉ›Ìède NshibÉ›kisitani)", + "vi_VN": "Èdè Jetinamu (OrílÉ›Ìède FÉ›tinami)", + "yo_BJ": "Èdè Yorùbá (OrílÉ›Ìède Bɛ̀nɛ̀)", + "yo_NG": "Èdè Yorùbá (OrílÉ›Ìède Nàìjíríà)", + "zh_CN": "Èdè Mandari (OrílÉ›Ìède sháínà)", + "zh_SG": "Èdè Mandari (OrílÉ›Ìède Singapo)", + "zh_TW": "Èdè Mandari (OrílÉ›Ìède Taiwani)", + "zu": "Èdè Shulu", + "zu_ZA": "Èdè Shulu (OrílÉ›Ìède Ariwa Afirika)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh.json new file mode 100644 index 0000000000000000000000000000000000000000..2742722ced17af9993fb4dbf079d9bb47349ca41 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh.json @@ -0,0 +1,568 @@ +{ + "Names": { + "af": "å—éžè·å…°è¯­", + "af_NA": "å—éžè·å…°è¯­ (纳米比亚)", + "af_ZA": "å—éžè·å…°è¯­ (å—éž)", + "ak": "阿肯文", + "ak_GH": "阿肯文 (加纳)", + "am": "阿姆哈拉文", + "am_ET": "阿姆哈拉文 (埃塞俄比亚)", + "ar": "阿拉伯语", + "ar_AE": "阿拉伯语 (阿拉伯è”åˆé…‹é•¿å›½)", + "ar_BH": "阿拉伯语 (å·´æž—)", + "ar_DJ": "阿拉伯语 (å‰å¸ƒæ)", + "ar_DZ": "阿拉伯语 (阿尔åŠåˆ©äºš)", + "ar_EG": "阿拉伯语 (埃åŠ)", + "ar_EH": "阿拉伯语 (西撒哈拉)", + "ar_ER": "阿拉伯语 (厄立特里亚)", + "ar_IL": "阿拉伯语 (以色列)", + "ar_IQ": "阿拉伯语 (伊拉克)", + "ar_JO": "阿拉伯语 (约旦)", + "ar_KM": "阿拉伯语 (ç§‘æ‘©ç½—)", + "ar_KW": "阿拉伯语 (ç§‘å¨ç‰¹)", + "ar_LB": "阿拉伯语 (黎巴嫩)", + "ar_LY": "阿拉伯语 (利比亚)", + "ar_MA": "阿拉伯语 (摩洛哥)", + "ar_MR": "阿拉伯语 (毛里塔尼亚)", + "ar_OM": "阿拉伯语 (阿曼)", + "ar_PS": "阿拉伯语 (å·´å‹’æ–¯å¦é¢†åœŸ)", + "ar_QA": "阿拉伯语 (å¡å¡”å°”)", + "ar_SA": "阿拉伯语 (沙特阿拉伯)", + "ar_SD": "阿拉伯语 (è‹ä¸¹)", + "ar_SO": "阿拉伯语 (索马里)", + "ar_SS": "阿拉伯语 (å—è‹ä¸¹)", + "ar_SY": "阿拉伯语 (å™åˆ©äºš)", + "ar_TD": "阿拉伯语 (ä¹å¾—)", + "ar_TN": "阿拉伯语 (çªå°¼æ–¯)", + "ar_YE": "阿拉伯语 (也门)", + "as": "阿è¨å§†æ–‡", + "as_IN": "阿è¨å§†æ–‡ (å°åº¦)", + "az": "阿塞拜疆语", + "az_AZ": "阿塞拜疆语 (阿塞拜疆)", + "az_Cyrl": "阿塞拜疆语 (西里尔文)", + "az_Cyrl_AZ": "阿塞拜疆语 (西里尔文, 阿塞拜疆)", + "az_Latn": "阿塞拜疆语 (æ‹‰ä¸æ–‡)", + "az_Latn_AZ": "阿塞拜疆语 (æ‹‰ä¸æ–‡, 阿塞拜疆)", + "be": "白俄罗斯语", + "be_BY": "白俄罗斯语 (白俄罗斯)", + "bg": "ä¿åŠ åˆ©äºšè¯­", + "bg_BG": "ä¿åŠ åˆ©äºšè¯­ (ä¿åŠ åˆ©äºš)", + "bm": "ç­å·´æ‹‰æ–‡", + "bm_ML": "ç­å·´æ‹‰æ–‡ (马里)", + "bn": "孟加拉语", + "bn_BD": "孟加拉语 (孟加拉国)", + "bn_IN": "孟加拉语 (å°åº¦)", + "bo": "è—语", + "bo_CN": "è—语 (中国)", + "bo_IN": "è—语 (å°åº¦)", + "br": "布列塔尼文", + "br_FR": "布列塔尼文 (法国)", + "bs": "波斯尼亚语", + "bs_BA": "波斯尼亚语 (波斯尼亚和黑塞哥维那)", + "bs_Cyrl": "波斯尼亚语 (西里尔文)", + "bs_Cyrl_BA": "波斯尼亚语 (西里尔文, 波斯尼亚和黑塞哥维那)", + "bs_Latn": "波斯尼亚语 (æ‹‰ä¸æ–‡)", + "bs_Latn_BA": "波斯尼亚语 (æ‹‰ä¸æ–‡, 波斯尼亚和黑塞哥维那)", + "ca": "加泰罗尼亚语", + "ca_AD": "加泰罗尼亚语 (安é“å°”)", + "ca_ES": "加泰罗尼亚语 (西ç­ç‰™)", + "ca_FR": "加泰罗尼亚语 (法国)", + "ca_IT": "加泰罗尼亚语 (æ„大利)", + "ce": "车臣文", + "ce_RU": "车臣文 (ä¿„ç½—æ–¯)", + "cs": "æ·å…‹è¯­", + "cs_CZ": "æ·å…‹è¯­ (æ·å…‹å…±å’Œå›½)", + "cy": "å¨å°”士语", + "cy_GB": "å¨å°”士语 (英国)", + "da": "丹麦语", + "da_DK": "丹麦语 (丹麦)", + "da_GL": "丹麦语 (格陵兰)", + "de": "å¾·æ–‡", + "de_AT": "å¾·æ–‡ (奥地利)", + "de_BE": "å¾·æ–‡ (比利时)", + "de_CH": "å¾·æ–‡ (瑞士)", + "de_DE": "å¾·æ–‡ (德国)", + "de_IT": "å¾·æ–‡ (æ„大利)", + "de_LI": "å¾·æ–‡ (列支敦士登)", + "de_LU": "å¾·æ–‡ (墿£®å ¡)", + "dz": "宗塿–‡", + "dz_BT": "宗塿–‡ (ä¸ä¸¹)", + "ee": "埃维文", + "ee_GH": "埃维文 (加纳)", + "ee_TG": "埃维文 (多哥)", + "el": "希腊语", + "el_CY": "希腊语 (塞浦路斯)", + "el_GR": "希腊语 (希腊)", + "en": "英语", + "en_AG": "英语 (安æç“œå’Œå·´å¸ƒè¾¾)", + "en_AI": "英语 (安圭拉)", + "en_AS": "英语 (ç¾Žå±žè¨æ‘©äºš)", + "en_AT": "英语 (奥地利)", + "en_AU": "英语 (澳大利亚)", + "en_BB": "英语 (巴巴多斯)", + "en_BE": "英语 (比利时)", + "en_BI": "英语 (布隆迪)", + "en_BM": "英语 (百慕大)", + "en_BS": "英语 (巴哈马)", + "en_BW": "英语 (åšèŒ¨ç“¦çº³)", + "en_BZ": "英语 (伯利兹)", + "en_CA": "英语 (加拿大)", + "en_CC": "英语 (科科斯(基林)群岛)", + "en_CH": "英语 (瑞士)", + "en_CK": "英语 (库克群岛)", + "en_CM": "英语 (喀麦隆)", + "en_CX": "英语 (圣诞岛)", + "en_CY": "英语 (塞浦路斯)", + "en_DE": "英语 (德国)", + "en_DG": "英语 (迪戈加西亚岛)", + "en_DK": "英语 (丹麦)", + "en_DM": "英语 (多米尼克)", + "en_ER": "英语 (厄立特里亚)", + "en_FI": "英语 (芬兰)", + "en_FJ": "英语 (æ–æµŽ)", + "en_FK": "英语 (ç¦å…‹å…°ç¾¤å²›)", + "en_FM": "英语 (密克罗尼西亚)", + "en_GB": "英语 (英国)", + "en_GD": "英语 (格林纳达)", + "en_GG": "英语 (æ ¼æ©è¥¿å²›)", + "en_GH": "英语 (加纳)", + "en_GI": "英语 (直布罗陀)", + "en_GM": "英语 (冈比亚)", + "en_GU": "英语 (关岛)", + "en_GY": "英语 (圭亚那)", + "en_HK": "英语 (中国香港特别行政区)", + "en_IE": "英语 (爱尔兰)", + "en_IL": "英语 (以色列)", + "en_IM": "英语 (马æ©å²›)", + "en_IN": "英语 (å°åº¦)", + "en_IO": "英语 (英属å°åº¦æ´‹é¢†åœ°)", + "en_JE": "英语 (泽西岛)", + "en_JM": "英语 (牙买加)", + "en_KE": "英语 (肯尼亚)", + "en_KI": "英语 (基里巴斯)", + "en_KN": "英语 (圣基茨和尼维斯)", + "en_KY": "英语 (开曼群岛)", + "en_LC": "英语 (圣å¢è¥¿äºš)", + "en_LR": "英语 (利比里亚)", + "en_LS": "英语 (莱索托)", + "en_MG": "英语 (马达加斯加)", + "en_MH": "英语 (马ç»å°”群岛)", + "en_MO": "英语 (中国澳门特别行政区)", + "en_MP": "英语 (北马里亚纳群岛)", + "en_MS": "英语 (蒙特塞拉特)", + "en_MT": "英语 (马耳他)", + "en_MU": "英语 (毛里求斯)", + "en_MW": "英语 (马拉维)", + "en_MY": "英语 (马æ¥è¥¿äºš)", + "en_NA": "英语 (纳米比亚)", + "en_NF": "英语 (诺ç¦å…‹å²›)", + "en_NG": "英语 (尼日利亚)", + "en_NL": "英语 (è·å…°)", + "en_NR": "英语 (ç‘™é²)", + "en_NU": "英语 (纽埃)", + "en_NZ": "英语 (新西兰)", + "en_PG": "英语 (巴布亚新几内亚)", + "en_PH": "英语 (è²å¾‹å®¾)", + "en_PK": "英语 (巴基斯å¦)", + "en_PN": "英语 (皮特凯æ©ç¾¤å²›)", + "en_PR": "英语 (波多黎å„)", + "en_PW": "英语 (帕劳)", + "en_RW": "英语 (墿—ºè¾¾)", + "en_SB": "英语 (所罗门群岛)", + "en_SC": "英语 (塞舌尔)", + "en_SD": "英语 (è‹ä¸¹)", + "en_SE": "英语 (瑞典)", + "en_SG": "英语 (新加å¡)", + "en_SH": "英语 (圣赫勒拿)", + "en_SI": "英语 (斯洛文尼亚)", + "en_SL": "英语 (塞拉利昂)", + "en_SS": "英语 (å—è‹ä¸¹)", + "en_SX": "英语 (è·å±žåœ£é©¬ä¸)", + "en_SZ": "英语 (æ–¯å¨å£«å…°)", + "en_TC": "英语 (特克斯和凯科斯群岛)", + "en_TK": "英语 (托克劳)", + "en_TO": "英语 (汤加)", + "en_TT": "英语 (特立尼达和多巴哥)", + "en_TV": "英语 (图瓦å¢)", + "en_TZ": "英语 (妿¡‘尼亚)", + "en_UG": "英语 (乌干达)", + "en_UM": "英语 (美国本土外å°å²›å±¿)", + "en_US": "英语 (美国)", + "en_VC": "英语 (åœ£æ–‡æ£®ç‰¹å’Œæ ¼æž—çº³ä¸æ–¯)", + "en_VG": "英语 (英属维尔京群岛)", + "en_VI": "英语 (美属维尔京群岛)", + "en_VU": "英语 (瓦努阿图)", + "en_WS": "英语 (è¨æ‘©äºš)", + "en_ZA": "英语 (å—éž)", + "en_ZM": "英语 (赞比亚)", + "en_ZW": "英语 (津巴布韦)", + "eo": "世界语", + "es": "西ç­ç‰™æ–‡", + "es_AR": "西ç­ç‰™æ–‡ (阿根廷)", + "es_BO": "西ç­ç‰™æ–‡ (玻利维亚)", + "es_BR": "西ç­ç‰™æ–‡ (巴西)", + "es_CL": "西ç­ç‰™æ–‡ (智利)", + "es_CO": "西ç­ç‰™æ–‡ (哥伦比亚)", + "es_CR": "西ç­ç‰™æ–‡ (哥斯达黎加)", + "es_CU": "西ç­ç‰™æ–‡ (å¤å·´)", + "es_DO": "西ç­ç‰™æ–‡ (多米尼加共和国)", + "es_EA": "西ç­ç‰™æ–‡ (ä¼‘è¾¾åŠæ¢…利利亚)", + "es_EC": "西ç­ç‰™æ–‡ (厄瓜多尔)", + "es_ES": "西ç­ç‰™æ–‡ (西ç­ç‰™)", + "es_GQ": "西ç­ç‰™æ–‡ (赤é“几内亚)", + "es_GT": "西ç­ç‰™æ–‡ (å±åœ°é©¬æ‹‰)", + "es_HN": "西ç­ç‰™æ–‡ (洪都拉斯)", + "es_IC": "西ç­ç‰™æ–‡ (加纳利群岛)", + "es_MX": "西ç­ç‰™æ–‡ (墨西哥)", + "es_NI": "西ç­ç‰™æ–‡ (尼加拉瓜)", + "es_PA": "西ç­ç‰™æ–‡ (巴拿马)", + "es_PE": "西ç­ç‰™æ–‡ (秘é²)", + "es_PH": "西ç­ç‰™æ–‡ (è²å¾‹å®¾)", + "es_PR": "西ç­ç‰™æ–‡ (波多黎å„)", + "es_PY": "西ç­ç‰™æ–‡ (巴拉圭)", + "es_SV": "西ç­ç‰™æ–‡ (è¨å°”瓦多)", + "es_US": "西ç­ç‰™æ–‡ (美国)", + "es_UY": "西ç­ç‰™æ–‡ (乌拉圭)", + "es_VE": "西ç­ç‰™æ–‡ (委内瑞拉)", + "et": "爱沙尼亚语", + "et_EE": "爱沙尼亚语 (爱沙尼亚)", + "eu": "巴斯克文", + "eu_ES": "巴斯克文 (西ç­ç‰™)", + "fa": "波斯文", + "fa_AF": "波斯文 (阿富汗)", + "fa_IR": "波斯文 (伊朗)", + "ff": "富拉文", + "ff_CM": "富拉文 (喀麦隆)", + "ff_GN": "富拉文 (几内亚)", + "ff_MR": "富拉文 (毛里塔尼亚)", + "ff_SN": "富拉文 (塞内加尔)", + "fi": "芬兰语", + "fi_FI": "芬兰语 (芬兰)", + "fo": "法罗文", + "fo_DK": "法罗文 (丹麦)", + "fo_FO": "法罗文 (法罗群岛)", + "fr": "法语", + "fr_BE": "法语 (比利时)", + "fr_BF": "法语 (布基纳法索)", + "fr_BI": "法语 (布隆迪)", + "fr_BJ": "法语 (è´å®)", + "fr_BL": "法语 (圣巴泰勒米)", + "fr_CA": "法语 (加拿大)", + "fr_CD": "法语 (刚果(金))", + "fr_CF": "法语 (中éžå…±å’Œå›½)", + "fr_CG": "法语 (刚果(布))", + "fr_CH": "法语 (瑞士)", + "fr_CI": "法语 (科特迪瓦)", + "fr_CM": "法语 (喀麦隆)", + "fr_DJ": "法语 (å‰å¸ƒæ)", + "fr_DZ": "法语 (阿尔åŠåˆ©äºš)", + "fr_FR": "法语 (法国)", + "fr_GA": "法语 (加蓬)", + "fr_GF": "法语 (法属圭亚那)", + "fr_GN": "法语 (几内亚)", + "fr_GP": "法语 (瓜德罗普)", + "fr_GQ": "法语 (赤é“几内亚)", + "fr_HT": "法语 (海地)", + "fr_KM": "法语 (ç§‘æ‘©ç½—)", + "fr_LU": "法语 (墿£®å ¡)", + "fr_MA": "法语 (摩洛哥)", + "fr_MC": "法语 (摩纳哥)", + "fr_MF": "法语 (圣马ä¸å²›)", + "fr_MG": "法语 (马达加斯加)", + "fr_ML": "法语 (马里)", + "fr_MQ": "法语 (马æå°¼å…‹)", + "fr_MR": "法语 (毛里塔尼亚)", + "fr_MU": "法语 (毛里求斯)", + "fr_NC": "法语 (新喀里多尼亚)", + "fr_NE": "法语 (尼日尔)", + "fr_PF": "法语 (法属波利尼西亚)", + "fr_PM": "法语 (圣皮埃尔和密克隆群岛)", + "fr_RE": "法语 (留尼汪)", + "fr_RW": "法语 (墿—ºè¾¾)", + "fr_SC": "法语 (塞舌尔)", + "fr_SN": "法语 (塞内加尔)", + "fr_SY": "法语 (å™åˆ©äºš)", + "fr_TD": "法语 (ä¹å¾—)", + "fr_TG": "法语 (多哥)", + "fr_TN": "法语 (çªå°¼æ–¯)", + "fr_VU": "法语 (瓦努阿图)", + "fr_WF": "法语 (瓦利斯和富图纳)", + "fr_YT": "法语 (马约特)", + "fy": "西弗里西亚文", + "fy_NL": "西弗里西亚文 (è·å…°)", + "ga": "爱尔兰语", + "ga_IE": "爱尔兰语 (爱尔兰)", + "gd": "è‹æ ¼å…°ç›–尔文", + "gd_GB": "è‹æ ¼å…°ç›–尔文 (英国)", + "gl": "加利西亚语", + "gl_ES": "加利西亚语 (西ç­ç‰™)", + "gu": "å¤å‰æ‹‰ç‰¹è¯­", + "gu_IN": "å¤å‰æ‹‰ç‰¹è¯­ (å°åº¦)", + "gv": "马æ©å²›æ–‡", + "gv_IM": "马æ©å²›æ–‡ (马æ©å²›)", + "ha": "è±ªè¨æ–‡", + "ha_GH": "è±ªè¨æ–‡ (加纳)", + "ha_NE": "è±ªè¨æ–‡ (尼日尔)", + "ha_NG": "è±ªè¨æ–‡ (尼日利亚)", + "he": "希伯æ¥è¯­", + "he_IL": "希伯æ¥è¯­ (以色列)", + "hi": "å°åœ°è¯­", + "hi_IN": "å°åœ°è¯­ (å°åº¦)", + "hr": "克罗地亚语", + "hr_BA": "克罗地亚语 (波斯尼亚和黑塞哥维那)", + "hr_HR": "克罗地亚语 (克罗地亚)", + "hu": "匈牙利语", + "hu_HU": "匈牙利语 (匈牙利)", + "hy": "亚美尼亚语", + "hy_AM": "亚美尼亚语 (亚美尼亚)", + "id": "å°åº¦å°¼è¥¿äºšè¯­", + "id_ID": "å°åº¦å°¼è¥¿äºšè¯­ (å°åº¦å°¼è¥¿äºš)", + "ig": "伊布文", + "ig_NG": "伊布文 (尼日利亚)", + "ii": "å››å·å½æ–‡", + "ii_CN": "å››å·å½æ–‡ (中国)", + "is": "冰岛语", + "is_IS": "冰岛语 (冰岛)", + "it": "æ„大利语", + "it_CH": "æ„大利语 (瑞士)", + "it_IT": "æ„大利语 (æ„大利)", + "it_SM": "æ„大利语 (圣马力诺)", + "ja": "日语", + "ja_JP": "日语 (日本)", + "ka": "æ ¼é²å‰äºšè¯­", + "ka_GE": "æ ¼é²å‰äºšè¯­ (æ ¼é²å‰äºš)", + "ki": "å‰åº“尤文", + "ki_KE": "å‰åº“尤文 (肯尼亚)", + "kk": "哈è¨å…‹è¯­", + "kk_KZ": "哈è¨å…‹è¯­ (哈è¨å…‹æ–¯å¦)", + "kl": "格陵兰文", + "kl_GL": "格陵兰文 (格陵兰)", + "km": "高棉文", + "km_KH": "高棉文 (柬埔寨)", + "kn": "å¡çº³è¾¾æ–‡", + "kn_IN": "å¡çº³è¾¾æ–‡ (å°åº¦)", + "ko": "韩文", + "ko_KP": "韩文 (æœé²œ)", + "ko_KR": "韩文 (韩国)", + "ks": "克什米尔文", + "ks_IN": "克什米尔文 (å°åº¦)", + "kw": "凯尔特文", + "kw_GB": "凯尔特文 (英国)", + "ky": "å‰å°”剿–¯æ–‡", + "ky_KG": "å‰å°”剿–¯æ–‡ (å‰å°”剿–¯æ–¯å¦)", + "lb": "墿£®å ¡è¯­", + "lb_LU": "墿£®å ¡è¯­ (墿£®å ¡)", + "lg": "å¢å¹²è¾¾æ–‡", + "lg_UG": "å¢å¹²è¾¾æ–‡ (乌干达)", + "ln": "林加拉文", + "ln_AO": "林加拉文 (安哥拉)", + "ln_CD": "林加拉文 (刚果(金))", + "ln_CF": "林加拉文 (中éžå…±å’Œå›½)", + "ln_CG": "林加拉文 (刚果(布))", + "lo": "è€æŒè¯­", + "lo_LA": "è€æŒè¯­ (è€æŒ)", + "lt": "立陶宛语", + "lt_LT": "立陶宛语 (ç«‹é™¶å®›)", + "lu": "é²å·´åŠ ä¸¹åŠ æ–‡", + "lu_CD": "é²å·´åŠ ä¸¹åŠ æ–‡ (刚果(金))", + "lv": "拉脱维亚语", + "lv_LV": "拉脱维亚语 (拉脱维亚)", + "mg": "马尔加什文", + "mg_MG": "马尔加什文 (马达加斯加)", + "mk": "马其顿文", + "mk_MK": "马其顿文 (马其顿)", + "ml": "马拉雅拉姆语", + "ml_IN": "马拉雅拉姆语 (å°åº¦)", + "mn": "è’™å¤æ–‡", + "mn_MN": "è’™å¤æ–‡ (è’™å¤)", + "mr": "马拉地文", + "mr_IN": "马拉地文 (å°åº¦)", + "ms": "马æ¥è¯­", + "ms_BN": "马æ¥è¯­ (文莱)", + "ms_MY": "马æ¥è¯­ (马æ¥è¥¿äºš)", + "ms_SG": "马æ¥è¯­ (新加å¡)", + "mt": "马耳他文", + "mt_MT": "马耳他文 (马耳他)", + "my": "缅甸语", + "my_MM": "缅甸语 (缅甸)", + "nb": "挪å¨åšå…‹é©¬å°”语", + "nb_NO": "挪å¨åšå…‹é©¬å°”语 (挪å¨)", + "nb_SJ": "挪å¨åšå…‹é©¬å°”语 (斯瓦尔巴和扬马延)", + "nd": "北æ©å¾·è´å‹’æ–‡", + "nd_ZW": "北æ©å¾·è´å‹’æ–‡ (津巴布韦)", + "ne": "尼泊尔语", + "ne_IN": "尼泊尔语 (å°åº¦)", + "ne_NP": "尼泊尔语 (尼泊尔)", + "nl": "è·å…°è¯­", + "nl_AW": "è·å…°è¯­ (阿é²å·´)", + "nl_BE": "è·å…°è¯­ (比利时)", + "nl_BQ": "è·å…°è¯­ (è·å±žåŠ å‹’æ¯”åŒº)", + "nl_CW": "è·å…°è¯­ (库拉索)", + "nl_NL": "è·å…°è¯­ (è·å…°)", + "nl_SR": "è·å…°è¯­ (è‹é‡Œå—)", + "nl_SX": "è·å…°è¯­ (è·å±žåœ£é©¬ä¸)", + "nn": "挪å¨å°¼è¯ºæ–¯å…‹æ–‡", + "nn_NO": "挪å¨å°¼è¯ºæ–¯å…‹æ–‡ (挪å¨)", + "no": "挪å¨è¯­", + "no_NO": "挪å¨è¯­ (挪å¨)", + "om": "奥洛莫文", + "om_ET": "奥洛莫文 (埃塞俄比亚)", + "om_KE": "奥洛莫文 (肯尼亚)", + "or": "奥里亚文", + "or_IN": "奥里亚文 (å°åº¦)", + "os": "奥塞梯文", + "os_GE": "奥塞梯文 (æ ¼é²å‰äºš)", + "os_RU": "奥塞梯文 (ä¿„ç½—æ–¯)", + "pa": "æ—鮿™®æ–‡", + "pa_Arab": "æ—鮿™®æ–‡ (阿拉伯文)", + "pa_Arab_PK": "æ—鮿™®æ–‡ (阿拉伯文, 巴基斯å¦)", + "pa_Guru": "æ—鮿™®æ–‡ (æžœé²ç©†å¥‡æ–‡)", + "pa_Guru_IN": "æ—鮿™®æ–‡ (æžœé²ç©†å¥‡æ–‡, å°åº¦)", + "pa_IN": "æ—鮿™®æ–‡ (å°åº¦)", + "pa_PK": "æ—鮿™®æ–‡ (巴基斯å¦)", + "pl": "波兰文", + "pl_PL": "波兰文 (波兰)", + "ps": "普什图文", + "ps_AF": "普什图文 (阿富汗)", + "pt": "è‘¡è„牙文", + "pt_AO": "è‘¡è„牙文 (安哥拉)", + "pt_BR": "è‘¡è„牙文 (巴西)", + "pt_CH": "è‘¡è„牙文 (瑞士)", + "pt_CV": "è‘¡è„牙文 (佛得角)", + "pt_GQ": "è‘¡è„牙文 (赤é“几内亚)", + "pt_GW": "è‘¡è„牙文 (几内亚比ç»)", + "pt_LU": "è‘¡è„牙文 (墿£®å ¡)", + "pt_MO": "è‘¡è„牙文 (中国澳门特别行政区)", + "pt_MZ": "è‘¡è„牙文 (莫桑比克)", + "pt_PT": "è‘¡è„牙文 (è‘¡è„牙)", + "pt_ST": "è‘¡è„牙文 (圣多美和普林西比)", + "pt_TL": "è‘¡è„牙文 (ä¸œå¸æ±¶)", + "qu": "盖丘亚文", + "qu_BO": "盖丘亚文 (玻利维亚)", + "qu_EC": "盖丘亚文 (厄瓜多尔)", + "qu_PE": "盖丘亚文 (秘é²)", + "rm": "罗曼什文", + "rm_CH": "罗曼什文 (瑞士)", + "rn": "隆迪文", + "rn_BI": "隆迪文 (布隆迪)", + "ro": "罗马尼亚文", + "ro_MD": "罗马尼亚文 (摩尔多瓦)", + "ro_RO": "罗马尼亚文 (罗马尼亚)", + "ru": "ä¿„æ–‡", + "ru_BY": "ä¿„æ–‡ (白俄罗斯)", + "ru_KG": "ä¿„æ–‡ (å‰å°”剿–¯æ–¯å¦)", + "ru_KZ": "ä¿„æ–‡ (哈è¨å…‹æ–¯å¦)", + "ru_MD": "ä¿„æ–‡ (摩尔多瓦)", + "ru_RU": "ä¿„æ–‡ (ä¿„ç½—æ–¯)", + "ru_UA": "ä¿„æ–‡ (乌克兰)", + "rw": "墿—ºè¾¾è¯­", + "rw_RW": "墿—ºè¾¾è¯­ (墿—ºè¾¾)", + "se": "北è¨ç±³æ–‡", + "se_FI": "北è¨ç±³æ–‡ (芬兰)", + "se_NO": "北è¨ç±³æ–‡ (挪å¨)", + "se_SE": "北è¨ç±³æ–‡ (瑞典)", + "sg": "桑戈文", + "sg_CF": "桑戈文 (中éžå…±å’Œå›½)", + "sh": "塞尔维亚-克罗地亚文", + "sh_BA": "塞尔维亚-克罗地亚文 (波斯尼亚和黑塞哥维那)", + "si": "僧伽罗文", + "si_LK": "僧伽罗文 (斯里兰å¡)", + "sk": "斯洛ä¼å…‹æ–‡", + "sk_SK": "斯洛ä¼å…‹æ–‡ (斯洛ä¼å…‹)", + "sl": "斯洛文尼亚文", + "sl_SI": "斯洛文尼亚文 (斯洛文尼亚)", + "sn": "ç»çº³æ–‡", + "sn_ZW": "ç»çº³æ–‡ (津巴布韦)", + "so": "索马里文", + "so_DJ": "索马里文 (å‰å¸ƒæ)", + "so_ET": "索马里文 (埃塞俄比亚)", + "so_KE": "索马里文 (肯尼亚)", + "so_SO": "索马里文 (索马里)", + "sq": "阿尔巴尼亚文", + "sq_AL": "阿尔巴尼亚文 (阿尔巴尼亚)", + "sq_MK": "阿尔巴尼亚文 (马其顿)", + "sq_XK": "阿尔巴尼亚文 (科索沃)", + "sr": "塞尔维亚文", + "sr_BA": "塞尔维亚文 (波斯尼亚和黑塞哥维那)", + "sr_Cyrl": "塞尔维亚文 (西里尔文)", + "sr_Cyrl_BA": "塞尔维亚文 (西里尔文, 波斯尼亚和黑塞哥维那)", + "sr_Cyrl_ME": "塞尔维亚文 (西里尔文, 黑山)", + "sr_Cyrl_RS": "塞尔维亚文 (西里尔文, 塞尔维亚)", + "sr_Cyrl_XK": "塞尔维亚文 (西里尔文, 科索沃)", + "sr_Latn": "塞尔维亚文 (æ‹‰ä¸æ–‡)", + "sr_Latn_BA": "塞尔维亚文 (æ‹‰ä¸æ–‡, 波斯尼亚和黑塞哥维那)", + "sr_Latn_ME": "塞尔维亚文 (æ‹‰ä¸æ–‡, 黑山)", + "sr_Latn_RS": "塞尔维亚文 (æ‹‰ä¸æ–‡, 塞尔维亚)", + "sr_Latn_XK": "塞尔维亚文 (æ‹‰ä¸æ–‡, 科索沃)", + "sr_ME": "塞尔维亚文 (黑山)", + "sr_RS": "塞尔维亚文 (塞尔维亚)", + "sr_XK": "塞尔维亚文 (科索沃)", + "sv": "瑞典语", + "sv_AX": "瑞典语 (奥兰群岛)", + "sv_FI": "瑞典语 (芬兰)", + "sv_SE": "瑞典语 (瑞典)", + "sw": "斯瓦希里文", + "sw_CD": "斯瓦希里文 (刚果(金))", + "sw_KE": "斯瓦希里文 (肯尼亚)", + "sw_TZ": "斯瓦希里文 (妿¡‘尼亚)", + "sw_UG": "斯瓦希里文 (乌干达)", + "ta": "泰米尔语", + "ta_IN": "泰米尔语 (å°åº¦)", + "ta_LK": "泰米尔语 (斯里兰å¡)", + "ta_MY": "泰米尔语 (马æ¥è¥¿äºš)", + "ta_SG": "泰米尔语 (新加å¡)", + "te": "æ³°å¢å›ºè¯­", + "te_IN": "æ³°å¢å›ºè¯­ (å°åº¦)", + "th": "泰语", + "th_TH": "泰语 (泰国)", + "ti": "ææ ¼åˆ©å°¼äºšæ–‡", + "ti_ER": "ææ ¼åˆ©å°¼äºšæ–‡ (厄立特里亚)", + "ti_ET": "ææ ¼åˆ©å°¼äºšæ–‡ (埃塞俄比亚)", + "tl": "他加禄文", + "tl_PH": "他加禄文 (è²å¾‹å®¾)", + "to": "汤加文", + "to_TO": "汤加文 (汤加)", + "tr": "土耳其文", + "tr_CY": "土耳其文 (塞浦路斯)", + "tr_TR": "土耳其文 (土耳其)", + "ug": "ç»´å¾å°”语", + "ug_CN": "ç»´å¾å°”语 (中国)", + "uk": "乌克兰语", + "uk_UA": "乌克兰语 (乌克兰)", + "ur": "乌尔都语", + "ur_IN": "乌尔都语 (å°åº¦)", + "ur_PK": "乌尔都语 (巴基斯å¦)", + "uz": "乌兹别克语", + "uz_AF": "乌兹别克语 (阿富汗)", + "uz_Arab": "乌兹别克语 (阿拉伯文)", + "uz_Arab_AF": "乌兹别克语 (阿拉伯文, 阿富汗)", + "uz_Cyrl": "乌兹别克语 (西里尔文)", + "uz_Cyrl_UZ": "乌兹别克语 (西里尔文, 乌兹别克斯å¦)", + "uz_Latn": "乌兹别克语 (æ‹‰ä¸æ–‡)", + "uz_Latn_UZ": "乌兹别克语 (æ‹‰ä¸æ–‡, 乌兹别克斯å¦)", + "uz_UZ": "乌兹别克语 (乌兹别克斯å¦)", + "vi": "è¶Šå—语", + "vi_VN": "è¶Šå—语 (è¶Šå—)", + "yi": "æ„第绪文", + "yo": "约é²å·´æ–‡", + "yo_BJ": "约é²å·´æ–‡ (è´å®)", + "yo_NG": "约é²å·´æ–‡ (尼日利亚)", + "zh": "中文", + "zh_CN": "中文 (中国)", + "zh_HK": "中文 (中国香港特别行政区)", + "zh_Hans": "中文 (简体)", + "zh_Hans_CN": "中文 (简体, 中国)", + "zh_Hans_HK": "中文 (简体, 中国香港特别行政区)", + "zh_Hans_MO": "中文 (简体, 中国澳门特别行政区)", + "zh_Hans_SG": "中文 (简体, 新加å¡)", + "zh_Hant": "中文 (ç¹ä½“)", + "zh_Hant_HK": "中文 (ç¹ä½“, 中国香港特别行政区)", + "zh_Hant_MO": "中文 (ç¹ä½“, 中国澳门特别行政区)", + "zh_Hant_TW": "中文 (ç¹ä½“, å°æ¹¾)", + "zh_MO": "中文 (中国澳门特别行政区)", + "zh_SG": "中文 (新加å¡)", + "zh_TW": "中文 (å°æ¹¾)", + "zu": "祖é²è¯­", + "zu_ZA": "祖é²è¯­ (å—éž)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_CN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_CN.json new file mode 100644 index 0000000000000000000000000000000000000000..03620084ecaf818d0a93c6185089f91285727222 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_CN.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "zh_Hans_CN" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_HK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_HK.json new file mode 100644 index 0000000000000000000000000000000000000000..dcc5f542148ac33a3ea1c83b02260ef4a798b8b6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_HK.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "zh_Hant_HK" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_Hant.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_Hant.json new file mode 100644 index 0000000000000000000000000000000000000000..7ca92c053be09f1f9d70fc5132681170fcc0df83 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_Hant.json @@ -0,0 +1,518 @@ +{ + "Names": { + "af": "å—éžè·è˜­æ–‡", + "af_NA": "å—éžè·è˜­æ–‡ (ç´ç±³æ¯”亞)", + "af_ZA": "å—éžè·è˜­æ–‡ (å—éž)", + "ak": "é˜¿åŽæ–‡", + "ak_GH": "é˜¿åŽæ–‡ (迦ç´)", + "am_ET": "阿姆哈拉文 (衣索比亞)", + "ar": "阿拉伯文", + "ar_AE": "阿拉伯文 (阿拉伯è¯åˆå¤§å…¬åœ‹)", + "ar_BH": "阿拉伯文 (å·´æž—)", + "ar_DJ": "阿拉伯文 (å‰å¸ƒåœ°)", + "ar_DZ": "阿拉伯文 (阿爾åŠåˆ©äºž)", + "ar_EG": "阿拉伯文 (埃åŠ)", + "ar_EH": "阿拉伯文 (西撒哈拉)", + "ar_ER": "阿拉伯文 (厄利垂亞)", + "ar_IL": "阿拉伯文 (以色列)", + "ar_IQ": "阿拉伯文 (伊拉克)", + "ar_JO": "阿拉伯文 (ç´„æ—¦)", + "ar_KM": "阿拉伯文 (葛摩)", + "ar_KW": "阿拉伯文 (ç§‘å¨ç‰¹)", + "ar_LB": "阿拉伯文 (黎巴嫩)", + "ar_LY": "阿拉伯文 (利比亞)", + "ar_MA": "阿拉伯文 (摩洛哥)", + "ar_MR": "阿拉伯文 (茅利塔尼亞)", + "ar_OM": "阿拉伯文 (阿曼王國)", + "ar_PS": "阿拉伯文 (å·´å‹’æ–¯å¦è‡ªæ²»å€)", + "ar_QA": "阿拉伯文 (å¡é”)", + "ar_SA": "阿拉伯文 (æ²™çƒåœ°é˜¿æ‹‰ä¼¯)", + "ar_SD": "阿拉伯文 (蘇丹)", + "ar_SO": "阿拉伯文 (索馬利亞)", + "ar_SS": "阿拉伯文 (å—蘇丹)", + "ar_SY": "阿拉伯文 (敘利亞)", + "ar_TD": "阿拉伯文 (查德)", + "ar_TN": "阿拉伯文 (çªå°¼è¥¿äºž)", + "ar_YE": "阿拉伯文 (葉門)", + "as": "阿薩姆文", + "as_IN": "阿薩姆文 (å°åº¦)", + "az": "亞塞拜然文", + "az_AZ": "亞塞拜然文 (亞塞拜然)", + "az_Cyrl": "亞塞拜然文 (斯拉夫文)", + "az_Cyrl_AZ": "亞塞拜然文 (斯拉夫文, 亞塞拜然)", + "az_Latn": "亞塞拜然文 (æ‹‰ä¸æ–‡)", + "az_Latn_AZ": "亞塞拜然文 (æ‹‰ä¸æ–‡, 亞塞拜然)", + "be": "白俄羅斯文", + "be_BY": "白俄羅斯文 (白俄羅斯)", + "bg": "ä¿åŠ åˆ©äºžæ–‡", + "bg_BG": "ä¿åŠ åˆ©äºžæ–‡ (ä¿åŠ åˆ©äºž)", + "bm_ML": "ç­å·´æ‹‰æ–‡ (馬利)", + "bn": "孟加拉文", + "bn_BD": "孟加拉文 (孟加拉)", + "bn_IN": "孟加拉文 (å°åº¦)", + "bo": "è—æ–‡", + "bo_CN": "è—æ–‡ (中國)", + "bo_IN": "è—æ–‡ (å°åº¦)", + "br_FR": "布列塔尼文 (法國)", + "bs": "波士尼亞文", + "bs_BA": "波士尼亞文 (波士尼亞與赫塞哥維ç´)", + "bs_Cyrl": "波士尼亞文 (斯拉夫文)", + "bs_Cyrl_BA": "波士尼亞文 (斯拉夫文, 波士尼亞與赫塞哥維ç´)", + "bs_Latn": "波士尼亞文 (æ‹‰ä¸æ–‡)", + "bs_Latn_BA": "波士尼亞文 (æ‹‰ä¸æ–‡, 波士尼亞與赫塞哥維ç´)", + "ca": "加泰蘭文", + "ca_AD": "加泰蘭文 (安é“爾)", + "ca_ES": "加泰蘭文 (西ç­ç‰™)", + "ca_FR": "加泰蘭文 (法國)", + "ca_IT": "加泰蘭文 (義大利)", + "ce": "車臣文", + "ce_RU": "車臣文 (ä¿„ç¾…æ–¯)", + "cs": "æ·å…‹æ–‡", + "cs_CZ": "æ·å…‹æ–‡ (æ·å…‹å…±å’Œåœ‹)", + "cy": "å¨çˆ¾æ–¯æ–‡", + "cy_GB": "å¨çˆ¾æ–¯æ–‡ (英國)", + "da": "丹麥文", + "da_DK": "丹麥文 (丹麥)", + "da_GL": "丹麥文 (格陵蘭)", + "de_AT": "å¾·æ–‡ (奧地利)", + "de_BE": "å¾·æ–‡ (比利時)", + "de_DE": "å¾·æ–‡ (德國)", + "de_IT": "å¾·æ–‡ (義大利)", + "de_LI": "å¾·æ–‡ (列支敦斯登)", + "de_LU": "å¾·æ–‡ (盧森堡)", + "ee": "埃維文", + "ee_GH": "埃維文 (迦ç´)", + "ee_TG": "埃維文 (多哥)", + "el": "希臘文", + "el_CY": "希臘文 (賽普勒斯)", + "el_GR": "希臘文 (希臘)", + "en": "英文", + "en_AG": "英文 (安地å¡åŠå·´å¸ƒé”)", + "en_AI": "英文 (安圭拉)", + "en_AS": "英文 (美屬薩摩亞)", + "en_AT": "英文 (奧地利)", + "en_AU": "英文 (澳洲)", + "en_BB": "英文 (å·´è²å¤š)", + "en_BE": "英文 (比利時)", + "en_BI": "英文 (蒲隆地)", + "en_BM": "英文 (百慕é”)", + "en_BS": "英文 (巴哈馬)", + "en_BW": "英文 (波札那)", + "en_BZ": "英文 (è²é‡Œæ–¯)", + "en_CA": "英文 (加拿大)", + "en_CC": "英文 (科科斯(基林)群島)", + "en_CH": "英文 (瑞士)", + "en_CK": "英文 (庫克群島)", + "en_CM": "英文 (喀麥隆)", + "en_CX": "英文 (è–誕島)", + "en_CY": "英文 (賽普勒斯)", + "en_DE": "英文 (德國)", + "en_DG": "英文 (迪亞哥加西亞島)", + "en_DK": "英文 (丹麥)", + "en_DM": "英文 (多米尼克)", + "en_ER": "英文 (厄利垂亞)", + "en_FI": "英文 (芬蘭)", + "en_FJ": "英文 (æ–æ¿Ÿ)", + "en_FK": "英文 (ç¦å…‹è˜­ç¾¤å³¶)", + "en_FM": "英文 (密克羅尼西亞群島)", + "en_GB": "英文 (英國)", + "en_GD": "英文 (格瑞那é”)", + "en_GG": "英文 (æ ¹æ¯)", + "en_GH": "英文 (迦ç´)", + "en_GI": "英文 (直布羅陀)", + "en_GM": "英文 (甘比亞)", + "en_GU": "英文 (關島)", + "en_GY": "英文 (蓋亞那)", + "en_HK": "英文 (中國香港特別行政å€)", + "en_IE": "英文 (愛爾蘭)", + "en_IL": "英文 (以色列)", + "en_IM": "英文 (曼島)", + "en_IN": "英文 (å°åº¦)", + "en_IO": "英文 (英屬å°åº¦æ´‹é ˜åœ°)", + "en_JE": "英文 (澤西島)", + "en_JM": "英文 (牙買加)", + "en_KE": "英文 (肯亞)", + "en_KI": "英文 (å‰é‡Œå·´æ–¯)", + "en_KN": "英文 (è–克里斯多ç¦åŠå°¼ç¶­æ–¯)", + "en_KY": "英文 (開曼群島)", + "en_LC": "英文 (è–露西亞)", + "en_LR": "英文 (賴比瑞亞)", + "en_LS": "英文 (賴索托)", + "en_MG": "英文 (馬é”加斯加)", + "en_MH": "英文 (馬紹爾群島)", + "en_MO": "英文 (中國澳門特別行政å€)", + "en_MP": "英文 (北馬里亞ç´ç¾¤å³¶)", + "en_MS": "英文 (蒙哲臘)", + "en_MT": "英文 (馬爾他)", + "en_MU": "英文 (模里西斯)", + "en_MW": "英文 (馬拉å¨)", + "en_MY": "英文 (馬來西亞)", + "en_NA": "英文 (ç´ç±³æ¯”亞)", + "en_NF": "英文 (諾ç¦å…‹å³¶)", + "en_NG": "英文 (奈åŠåˆ©äºž)", + "en_NL": "英文 (è·è˜­)", + "en_NR": "英文 (諾魯)", + "en_NU": "英文 (ç´åŸƒå³¶)", + "en_NZ": "英文 (ç´è¥¿è˜­)", + "en_PG": "英文 (巴布亞ç´å¹¾å…§äºž)", + "en_PH": "英文 (è²å¾‹è³“)", + "en_PK": "英文 (巴基斯å¦)", + "en_PN": "英文 (皮特肯群島)", + "en_PR": "英文 (波多黎å„)", + "en_PW": "英文 (帛ç‰)", + "en_RW": "英文 (盧安é”)", + "en_SB": "英文 (索羅門群島)", + "en_SC": "英文 (塞席爾)", + "en_SD": "英文 (蘇丹)", + "en_SE": "英文 (瑞典)", + "en_SG": "英文 (新加å¡)", + "en_SH": "英文 (è–赫勒拿島)", + "en_SI": "英文 (斯洛維尼亞)", + "en_SL": "英文 (ç…å­å±±)", + "en_SS": "英文 (å—蘇丹)", + "en_SX": "英文 (è·å±¬è–馬ä¸)", + "en_SZ": "英文 (å²ç“¦æ¿Ÿè˜­)", + "en_TC": "英文 (土克斯åŠé–‹ç§‘斯群島)", + "en_TK": "英文 (托克勞群島)", + "en_TO": "英文 (æ±åŠ )", + "en_TT": "英文 (åƒé‡Œé”åŠæ‰˜å·´å“¥)", + "en_TV": "英文 (å瓦魯)", + "en_TZ": "英文 (å¦å°šå°¼äºž)", + "en_UG": "英文 (çƒå¹²é”)", + "en_UM": "英文 (美國本土外å°å³¶å¶¼)", + "en_US": "英文 (美國)", + "en_VC": "英文 (è–æ–‡æ£®åŠæ ¼ç‘žé‚£ä¸)", + "en_VG": "英文 (英屬維京群島)", + "en_VI": "英文 (美屬維京群島)", + "en_VU": "英文 (è¬é‚£æœ)", + "en_WS": "英文 (薩摩亞)", + "en_ZA": "英文 (å—éž)", + "en_ZM": "英文 (尚比亞)", + "en_ZW": "英文 (辛巴å¨)", + "eo": "世界文", + "es_BO": "西ç­ç‰™æ–‡ (玻利維亞)", + "es_CO": "西ç­ç‰™æ–‡ (哥倫比亞)", + "es_CR": "西ç­ç‰™æ–‡ (哥斯大黎加)", + "es_DO": "西ç­ç‰™æ–‡ (多明尼加共和國)", + "es_EA": "西ç­ç‰™æ–‡ (休é”與梅利利亞)", + "es_EC": "西ç­ç‰™æ–‡ (厄瓜多)", + "es_GQ": "西ç­ç‰™æ–‡ (赤é“幾內亞)", + "es_GT": "西ç­ç‰™æ–‡ (瓜地馬拉)", + "es_HN": "西ç­ç‰™æ–‡ (å®éƒ½æ‹‰æ–¯)", + "es_IC": "西ç­ç‰™æ–‡ (加那利群島)", + "es_PA": "西ç­ç‰™æ–‡ (巴拿馬)", + "es_PE": "西ç­ç‰™æ–‡ (秘魯)", + "es_PH": "西ç­ç‰™æ–‡ (è²å¾‹è³“)", + "es_SV": "西ç­ç‰™æ–‡ (薩爾瓦多)", + "es_US": "西ç­ç‰™æ–‡ (美國)", + "es_UY": "西ç­ç‰™æ–‡ (çƒæ‹‰åœ­)", + "es_VE": "西ç­ç‰™æ–‡ (委內瑞拉)", + "et": "愛沙尼亞文", + "et_EE": "愛沙尼亞文 (愛沙尼亞)", + "ff_CM": "富拉文 (喀麥隆)", + "ff_GN": "富拉文 (幾內亞)", + "ff_MR": "富拉文 (茅利塔尼亞)", + "ff_SN": "富拉文 (塞內加爾)", + "fi": "芬蘭文", + "fi_FI": "芬蘭文 (芬蘭)", + "fo": "法羅文", + "fo_DK": "法羅文 (丹麥)", + "fo_FO": "法羅文 (法羅群島)", + "fr": "法文", + "fr_BE": "法文 (比利時)", + "fr_BF": "法文 (布å‰ç´æ³•ç´¢)", + "fr_BI": "法文 (蒲隆地)", + "fr_BJ": "法文 (è²å—)", + "fr_BL": "法文 (è–巴瑟米)", + "fr_CA": "法文 (加拿大)", + "fr_CD": "法文 (å‰›æžœï¼ˆé‡‘å¤æ²™ï¼‰)", + "fr_CF": "法文 (中éžå…±å’Œåœ‹)", + "fr_CG": "法文 (剛果(布拉薩))", + "fr_CH": "法文 (瑞士)", + "fr_CI": "法文 (象牙海岸)", + "fr_CM": "法文 (喀麥隆)", + "fr_DJ": "法文 (å‰å¸ƒåœ°)", + "fr_DZ": "法文 (阿爾åŠåˆ©äºž)", + "fr_FR": "法文 (法國)", + "fr_GA": "法文 (加彭)", + "fr_GF": "法文 (法屬圭亞那)", + "fr_GN": "法文 (幾內亞)", + "fr_GP": "法文 (瓜地洛普)", + "fr_GQ": "法文 (赤é“幾內亞)", + "fr_HT": "法文 (海地)", + "fr_KM": "法文 (葛摩)", + "fr_LU": "法文 (盧森堡)", + "fr_MA": "法文 (摩洛哥)", + "fr_MC": "法文 (æ‘©ç´å“¥)", + "fr_MF": "法文 (法屬è–馬ä¸)", + "fr_MG": "法文 (馬é”加斯加)", + "fr_ML": "法文 (馬利)", + "fr_MQ": "法文 (馬ä¸å°¼å…‹å³¶)", + "fr_MR": "法文 (茅利塔尼亞)", + "fr_MU": "法文 (模里西斯)", + "fr_NC": "法文 (新喀里多尼亞)", + "fr_NE": "法文 (尼日)", + "fr_PF": "法文 (法屬玻里尼西亞)", + "fr_PM": "法文 (è–皮埃爾和密克隆群島)", + "fr_RE": "法文 (留尼旺)", + "fr_RW": "法文 (盧安é”)", + "fr_SC": "法文 (塞席爾)", + "fr_SN": "法文 (塞內加爾)", + "fr_SY": "法文 (敘利亞)", + "fr_TD": "法文 (查德)", + "fr_TG": "法文 (多哥)", + "fr_TN": "法文 (çªå°¼è¥¿äºž)", + "fr_VU": "法文 (è¬é‚£æœ)", + "fr_WF": "法文 (瓦利斯群島和富圖那群島)", + "fr_YT": "法文 (馬約特)", + "fy": "西弗里西亞文", + "fy_NL": "西弗里西亞文 (è·è˜­)", + "ga": "愛爾蘭文", + "ga_IE": "愛爾蘭文 (愛爾蘭)", + "gd": "蘇格蘭蓋爾文", + "gd_GB": "蘇格蘭蓋爾文 (英國)", + "gl": "加利西亞文", + "gl_ES": "加利西亞文 (西ç­ç‰™)", + "gu": "å¤å‰æ‹‰ç‰¹æ–‡", + "gu_IN": "å¤å‰æ‹‰ç‰¹æ–‡ (å°åº¦)", + "gv": "曼島文", + "gv_IM": "曼島文 (曼島)", + "ha": "豪撒文", + "ha_GH": "豪撒文 (迦ç´)", + "ha_NE": "豪撒文 (尼日)", + "ha_NG": "豪撒文 (奈åŠåˆ©äºž)", + "he": "希伯來文", + "he_IL": "希伯來文 (以色列)", + "hi": "å°åœ°æ–‡", + "hi_IN": "å°åœ°æ–‡ (å°åº¦)", + "hr": "克羅埃西亞文", + "hr_BA": "克羅埃西亞文 (波士尼亞與赫塞哥維ç´)", + "hr_HR": "克羅埃西亞文 (克羅埃西亞)", + "hu": "匈牙利文", + "hu_HU": "匈牙利文 (匈牙利)", + "hy": "亞美尼亞文", + "hy_AM": "亞美尼亞文 (亞美尼亞)", + "id": "å°å°¼æ–‡", + "id_ID": "å°å°¼æ–‡ (å°å°¼)", + "ig_NG": "伊布文 (奈åŠåˆ©äºž)", + "ii_CN": "å››å·å½æ–‡ (中國)", + "is": "冰島文", + "is_IS": "冰島文 (冰島)", + "it": "義大利文", + "it_CH": "義大利文 (瑞士)", + "it_IT": "義大利文 (義大利)", + "it_SM": "義大利文 (è–馬利諾)", + "ja": "日文", + "ja_JP": "日文 (日本)", + "ka": "喬治亞文", + "ka_GE": "喬治亞文 (喬治亞)", + "ki": "å‰åº«å°¤æ–‡", + "ki_KE": "å‰åº«å°¤æ–‡ (肯亞)", + "kk": "哈薩克文", + "kk_KZ": "哈薩克文 (哈薩克)", + "kl": "格陵蘭文", + "kl_GL": "格陵蘭文 (格陵蘭)", + "kn": "åŽé‚£é”æ–‡", + "kn_IN": "åŽé‚£é”æ–‡ (å°åº¦)", + "ko": "韓文", + "ko_KP": "韓文 (北韓)", + "ko_KR": "韓文 (å—韓)", + "ks": "喀什米爾文", + "ks_IN": "喀什米爾文 (å°åº¦)", + "kw": "康瓦耳文", + "kw_GB": "康瓦耳文 (英國)", + "ky": "å‰çˆ¾å‰æ–¯æ–‡", + "ky_KG": "å‰çˆ¾å‰æ–¯æ–‡ (å‰çˆ¾å‰æ–¯)", + "lb": "盧森堡文", + "lb_LU": "盧森堡文 (盧森堡)", + "lg": "干锿–‡", + "lg_UG": "干锿–‡ (çƒå¹²é”)", + "ln_CD": "林加拉文 (å‰›æžœï¼ˆé‡‘å¤æ²™ï¼‰)", + "ln_CF": "林加拉文 (中éžå…±å’Œåœ‹)", + "ln_CG": "林加拉文 (剛果(布拉薩))", + "lo": "寮文", + "lo_LA": "寮文 (寮國)", + "lt": "立陶宛文", + "lt_LT": "立陶宛文 (ç«‹é™¶å®›)", + "lu": "魯巴加丹加文", + "lu_CD": "魯巴加丹加文 (å‰›æžœï¼ˆé‡‘å¤æ²™ï¼‰)", + "lv": "拉脫維亞文", + "lv_LV": "拉脫維亞文 (拉脫維亞)", + "mg": "馬拉加什文", + "mg_MG": "馬拉加什文 (馬é”加斯加)", + "mk": "馬其頓文", + "mk_MK": "馬其頓文 (馬其頓)", + "ml": "馬來亞拉姆文", + "ml_IN": "馬來亞拉姆文 (å°åº¦)", + "mr": "馬拉地文", + "mr_IN": "馬拉地文 (å°åº¦)", + "ms": "馬來文", + "ms_BN": "馬來文 (æ±¶èŠ)", + "ms_MY": "馬來文 (馬來西亞)", + "ms_SG": "馬來文 (新加å¡)", + "mt": "馬爾他文", + "mt_MT": "馬爾他文 (馬爾他)", + "my": "緬甸文", + "my_MM": "緬甸文 (緬甸)", + "nb": "å·´å…‹æ‘©æŒªå¨æ–‡", + "nb_NO": "å·´å…‹æ‘©æŒªå¨æ–‡ (挪å¨)", + "nb_SJ": "å·´å…‹æ‘©æŒªå¨æ–‡ (冷岸åŠå¤®æ£‰)", + "nd": "北地畢列文", + "nd_ZW": "北地畢列文 (辛巴å¨)", + "ne": "尼泊爾文", + "ne_IN": "尼泊爾文 (å°åº¦)", + "ne_NP": "尼泊爾文 (尼泊爾)", + "nl": "è·è˜­æ–‡", + "nl_AW": "è·è˜­æ–‡ (è·å±¬é˜¿é­¯å·´)", + "nl_BE": "è·è˜­æ–‡ (比利時)", + "nl_BQ": "è·è˜­æ–‡ (è·è˜­åŠ å‹’æ¯”å€)", + "nl_CW": "è·è˜­æ–‡ (庫拉索)", + "nl_NL": "è·è˜­æ–‡ (è·è˜­)", + "nl_SR": "è·è˜­æ–‡ (蘇利å—)", + "nl_SX": "è·è˜­æ–‡ (è·å±¬è–馬ä¸)", + "nn": "è€è«¾æ–¯å…‹æŒªå¨æ–‡", + "nn_NO": "è€è«¾æ–¯å…‹æŒªå¨æ–‡ (挪å¨)", + "no": "æŒªå¨æ–‡", + "no_NO": "æŒªå¨æ–‡ (挪å¨)", + "om": "奧羅莫文", + "om_ET": "奧羅莫文 (衣索比亞)", + "om_KE": "奧羅莫文 (肯亞)", + "or": "æ­è¿ªäºžæ–‡", + "or_IN": "æ­è¿ªäºžæ–‡ (å°åº¦)", + "os": "å¥§å¡žææ–‡", + "os_GE": "å¥§å¡žææ–‡ (喬治亞)", + "os_RU": "å¥§å¡žææ–‡ (ä¿„ç¾…æ–¯)", + "pa_Guru": "æ—鮿™®æ–‡ (å¤é­¯ç©†å¥‡æ–‡)", + "pa_Guru_IN": "æ—鮿™®æ–‡ (å¤é­¯ç©†å¥‡æ–‡, å°åº¦)", + "pl": "波蘭文", + "pl_PL": "波蘭文 (波蘭)", + "ps": "普什圖文", + "ps_AF": "普什圖文 (阿富汗)", + "pt_CV": "è‘¡è„牙文 (ç¶­å¾·è§’)", + "pt_GQ": "è‘¡è„牙文 (赤é“幾內亞)", + "pt_GW": "è‘¡è„牙文 (幾內亞比索)", + "pt_LU": "è‘¡è„牙文 (盧森堡)", + "pt_MO": "è‘¡è„牙文 (中國澳門特別行政å€)", + "pt_MZ": "è‘¡è„牙文 (莫三比克)", + "pt_ST": "è‘¡è„牙文 (è–多美普林西比)", + "pt_TL": "è‘¡è„牙文 (æ±å¸æ±¶)", + "qu": "蓋楚瓦文", + "qu_BO": "蓋楚瓦文 (玻利維亞)", + "qu_EC": "蓋楚瓦文 (厄瓜多)", + "qu_PE": "蓋楚瓦文 (秘魯)", + "rm": "羅曼斯文", + "rm_CH": "羅曼斯文 (瑞士)", + "rn_BI": "隆迪文 (蒲隆地)", + "ro": "羅馬尼亞文", + "ro_MD": "羅馬尼亞文 (摩爾多瓦)", + "ro_RO": "羅馬尼亞文 (羅馬尼亞)", + "ru_BY": "ä¿„æ–‡ (白俄羅斯)", + "ru_KG": "ä¿„æ–‡ (å‰çˆ¾å‰æ–¯)", + "ru_KZ": "ä¿„æ–‡ (哈薩克)", + "ru_MD": "ä¿„æ–‡ (摩爾多瓦)", + "ru_RU": "ä¿„æ–‡ (ä¿„ç¾…æ–¯)", + "ru_UA": "ä¿„æ–‡ (çƒå…‹è˜­)", + "rw": "ç›§å®‰é”æ–‡", + "rw_RW": "ç›§å®‰é”æ–‡ (盧安é”)", + "se": "北薩米文", + "se_FI": "北薩米文 (芬蘭)", + "se_NO": "北薩米文 (挪å¨)", + "se_SE": "北薩米文 (瑞典)", + "sg_CF": "桑戈文 (中éžå…±å’Œåœ‹)", + "sh": "塞爾維亞克羅埃西亞文", + "sh_BA": "塞爾維亞克羅埃西亞文 (波士尼亞與赫塞哥維ç´)", + "si": "僧伽羅文", + "si_LK": "僧伽羅文 (斯里蘭å¡)", + "sl": "斯洛維尼亞文", + "sl_SI": "斯洛維尼亞文 (斯洛維尼亞)", + "sn": "ç´¹ç´æ–‡", + "sn_ZW": "ç´¹ç´æ–‡ (辛巴å¨)", + "so": "索馬利文", + "so_DJ": "索馬利文 (å‰å¸ƒåœ°)", + "so_ET": "索馬利文 (衣索比亞)", + "so_KE": "索馬利文 (肯亞)", + "so_SO": "索馬利文 (索馬利亞)", + "sq": "阿爾巴尼亞文", + "sq_AL": "阿爾巴尼亞文 (阿爾巴尼亞)", + "sq_MK": "阿爾巴尼亞文 (馬其頓)", + "sq_XK": "阿爾巴尼亞文 (科索沃)", + "sr": "塞爾維亞文", + "sr_BA": "塞爾維亞文 (波士尼亞與赫塞哥維ç´)", + "sr_Cyrl": "塞爾維亞文 (斯拉夫文)", + "sr_Cyrl_BA": "塞爾維亞文 (斯拉夫文, 波士尼亞與赫塞哥維ç´)", + "sr_Cyrl_ME": "塞爾維亞文 (斯拉夫文, 蒙特內哥羅)", + "sr_Cyrl_RS": "塞爾維亞文 (斯拉夫文, 塞爾維亞)", + "sr_Cyrl_XK": "塞爾維亞文 (斯拉夫文, 科索沃)", + "sr_Latn": "塞爾維亞文 (æ‹‰ä¸æ–‡)", + "sr_Latn_BA": "塞爾維亞文 (æ‹‰ä¸æ–‡, 波士尼亞與赫塞哥維ç´)", + "sr_Latn_ME": "塞爾維亞文 (æ‹‰ä¸æ–‡, 蒙特內哥羅)", + "sr_Latn_RS": "塞爾維亞文 (æ‹‰ä¸æ–‡, 塞爾維亞)", + "sr_Latn_XK": "塞爾維亞文 (æ‹‰ä¸æ–‡, 科索沃)", + "sr_ME": "塞爾維亞文 (蒙特內哥羅)", + "sr_RS": "塞爾維亞æ–‡ (塞爾維亞)", + "sr_XK": "塞爾維亞文 (科索沃)", + "sv": "瑞典文", + "sv_AX": "瑞典文 (奧蘭群島)", + "sv_FI": "瑞典文 (芬蘭)", + "sv_SE": "瑞典文 (瑞典)", + "sw": "å²ç“¦å¸Œé‡Œæ–‡", + "sw_CD": "å²ç“¦å¸Œé‡Œæ–‡ (å‰›æžœï¼ˆé‡‘å¤æ²™ï¼‰)", + "sw_KE": "å²ç“¦å¸Œé‡Œæ–‡ (肯亞)", + "sw_TZ": "å²ç“¦å¸Œé‡Œæ–‡ (å¦å°šå°¼äºž)", + "sw_UG": "å²ç“¦å¸Œé‡Œæ–‡ (çƒå¹²é”)", + "ta": "å¦ç±³çˆ¾æ–‡", + "ta_IN": "å¦ç±³çˆ¾æ–‡ (å°åº¦)", + "ta_LK": "å¦ç±³çˆ¾æ–‡ (斯里蘭å¡)", + "ta_MY": "å¦ç±³çˆ¾æ–‡ (馬來西亞)", + "ta_SG": "å¦ç±³çˆ¾æ–‡ (新加å¡)", + "te": "泰盧固文", + "te_IN": "泰盧固文 (å°åº¦)", + "th": "æ³°æ–‡", + "th_TH": "æ³°æ–‡ (泰國)", + "ti": "ææ ¼åˆ©å°¼äºžæ–‡", + "ti_ER": "ææ ¼åˆ©å°¼äºžæ–‡ (厄利垂亞)", + "ti_ET": "ææ ¼åˆ©å°¼äºžæ–‡ (衣索比亞)", + "tl": "å¡”åŠ è·¯æ—æ–‡", + "tl_PH": "å¡”åŠ è·¯æ—æ–‡ (è²å¾‹è³“)", + "to": "æ±åŠ æ–‡", + "to_TO": "æ±åŠ æ–‡ (æ±åŠ )", + "tr_CY": "土耳其文 (賽普勒斯)", + "ug": "ç¶­å¾çˆ¾æ–‡", + "ug_CN": "ç¶­å¾çˆ¾æ–‡ (中國)", + "uk": "çƒå…‹è˜­æ–‡", + "uk_UA": "çƒå…‹è˜­æ–‡ (çƒå…‹è˜­)", + "ur": "çƒéƒ½æ–‡", + "ur_IN": "çƒéƒ½æ–‡ (å°åº¦)", + "ur_PK": "çƒéƒ½æ–‡ (巴基斯å¦)", + "uz": "çƒèŒ²åˆ¥å…‹æ–‡", + "uz_AF": "çƒèŒ²åˆ¥å…‹æ–‡ (阿富汗)", + "uz_Arab": "çƒèŒ²åˆ¥å…‹æ–‡ (阿拉伯文)", + "uz_Arab_AF": "çƒèŒ²åˆ¥å…‹æ–‡ (阿拉伯文, 阿富汗)", + "uz_Cyrl": "çƒèŒ²åˆ¥å…‹æ–‡ (斯拉夫文)", + "uz_Cyrl_UZ": "çƒèŒ²åˆ¥å…‹æ–‡ (斯拉夫文, çƒèŒ²åˆ¥å…‹)", + "uz_Latn": "çƒèŒ²åˆ¥å…‹æ–‡ (æ‹‰ä¸æ–‡)", + "uz_Latn_UZ": "çƒèŒ²åˆ¥å…‹æ–‡ (æ‹‰ä¸æ–‡, çƒèŒ²åˆ¥å…‹)", + "uz_UZ": "çƒèŒ²åˆ¥å…‹æ–‡ (çƒèŒ²åˆ¥å…‹)", + "vi": "è¶Šå—æ–‡", + "vi_VN": "è¶Šå—æ–‡ (è¶Šå—)", + "yi": "æ„第緒文", + "yo": "約魯巴文", + "yo_BJ": "約魯巴文 (è²å—)", + "yo_NG": "約魯巴文 (奈åŠåˆ©äºž)", + "zh_CN": "中文 (中國)", + "zh_HK": "中文 (中國香港特別行政å€)", + "zh_Hans": "中文 (ç°¡é«”)", + "zh_Hans_CN": "中文 (ç°¡é«”, 中國)", + "zh_Hans_HK": "中文 (ç°¡é«”, 中國香港特別行政å€)", + "zh_Hans_MO": "中文 (ç°¡é«”, 中國澳門特別行政å€)", + "zh_Hans_SG": "中文 (ç°¡é«”, 新加å¡)", + "zh_Hant": "中文 (ç¹é«”)", + "zh_Hant_HK": "中文 (ç¹é«”, 中國香港特別行政å€)", + "zh_Hant_MO": "中文 (ç¹é«”, 中國澳門特別行政å€)", + "zh_Hant_TW": "中文 (ç¹é«”, å°ç£)", + "zh_MO": "中文 (中國澳門特別行政å€)", + "zh_TW": "中文 (å°ç£)", + "zu": "祖魯文", + "zu_ZA": "祖魯文 (å—éž)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_Hant_HK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_Hant_HK.json new file mode 100644 index 0000000000000000000000000000000000000000..c3623967750ef41526941130328394ed74a7dabc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_Hant_HK.json @@ -0,0 +1,205 @@ +{ + "Names": { + "ak_GH": "é˜¿åŽæ–‡ (加ç´)", + "am_ET": "阿姆哈拉文 (埃塞俄比亞)", + "ar_AE": "阿拉伯文 (阿拉伯è¯åˆé…‹é•·åœ‹)", + "ar_DJ": "阿拉伯文 (å‰å¸ƒæ)", + "ar_ER": "阿拉伯文 (厄立特里亞)", + "ar_KM": "阿拉伯文 (ç§‘æ‘©ç¾…)", + "ar_MR": "阿拉伯文 (毛里塔尼亞)", + "ar_OM": "阿拉伯文 (阿曼)", + "ar_PS": "阿拉伯文 (å·´å‹’æ–¯å¦é ˜åœŸ)", + "ar_QA": "阿拉伯文 (å¡å¡”爾)", + "ar_SA": "阿拉伯文 (沙地阿拉伯)", + "ar_SO": "阿拉伯文 (索馬里)", + "ar_SY": "阿拉伯文 (æ•利亞)", + "ar_TD": "阿拉伯文 (ä¹å¾—)", + "ar_YE": "阿拉伯文 (也門)", + "az": "阿塞拜疆文", + "az_AZ": "阿塞拜疆文 (阿塞拜疆)", + "az_Cyrl": "阿塞拜疆文 (西里爾文)", + "az_Cyrl_AZ": "阿塞拜疆文 (西里爾文, 阿塞拜疆)", + "az_Latn": "阿塞拜疆文 (拉ä¸å­—æ¯)", + "az_Latn_AZ": "阿塞拜疆文 (拉ä¸å­—æ¯, 阿塞拜疆)", + "bm_ML": "ç­å·´æ‹‰æ–‡ (馬里)", + "br": "布里多尼文", + "br_FR": "布里多尼文 (法國)", + "bs": "波斯尼亞文", + "bs_BA": "波斯尼亞文 (波斯尼亞和黑塞哥維那)", + "bs_Cyrl": "波斯尼亞文 (西里爾文)", + "bs_Cyrl_BA": "波斯尼亞文 (西里爾文, 波斯尼亞和黑塞哥維那)", + "bs_Latn": "波斯尼亞文 (拉ä¸å­—æ¯)", + "bs_Latn_BA": "波斯尼亞文 (拉ä¸å­—æ¯, 波斯尼亞和黑塞哥維那)", + "ca": "加泰隆尼亞文", + "ca_AD": "加泰隆尼亞文 (安é“爾)", + "ca_ES": "加泰隆尼亞文 (西ç­ç‰™)", + "ca_FR": "加泰隆尼亞文 (法國)", + "ca_IT": "加泰隆尼亞文 (æ„大利)", + "ee_GH": "埃維文 (加ç´)", + "ee_TG": "埃維文 (多哥共和國)", + "el_CY": "希臘文 (塞浦路斯)", + "en_AG": "英文 (安æç“œå’Œå·´å¸ƒé”)", + "en_BB": "英文 (巴巴多斯)", + "en_BI": "英文 (布隆迪)", + "en_BW": "英文 (åšèŒ¨ç“¦ç´)", + "en_BZ": "英文 (伯利茲)", + "en_CC": "英文 (å¯å¯æ–¯ç¾¤å³¶)", + "en_CY": "英文 (塞浦路斯)", + "en_ER": "英文 (厄立特里亞)", + "en_GD": "英文 (格林ç´é”)", + "en_GH": "英文 (加ç´)", + "en_GM": "英文 (岡比亞)", + "en_GY": "英文 (圭亞那)", + "en_IM": "英文 (馬æ©å³¶)", + "en_KE": "英文 (肯雅)", + "en_KN": "英文 (è–基茨和尼維斯)", + "en_LC": "英文 (è–盧西亞)", + "en_LR": "英文 (利比里亞)", + "en_LS": "英文 (èŠç´¢æ‰˜)", + "en_MS": "英文 (蒙特塞拉特)", + "en_MT": "英文 (馬耳他)", + "en_MU": "英文 (毛里裘斯)", + "en_MW": "英文 (馬拉維)", + "en_NG": "英文 (尼日利亞)", + "en_NR": "英文 (瑙魯)", + "en_PG": "英文 (巴布亞新幾內亞)", + "en_PN": "英文 (皮特凱æ©å³¶)", + "en_RW": "英文 (ç›§æ—ºé”)", + "en_SB": "英文 (所羅門群島)", + "en_SC": "英文 (塞舌爾)", + "en_SI": "英文 (斯洛文尼亞)", + "en_SL": "英文 (塞拉利昂)", + "en_SZ": "英文 (æ–¯å¨å£«è˜­)", + "en_TC": "英文 (特克斯和凱科斯群島)", + "en_TO": "英文 (湯加)", + "en_TT": "英文 (åƒé‡Œé”和多巴哥)", + "en_TV": "英文 (圖瓦盧)", + "en_TZ": "英文 (妿¡‘尼亞)", + "en_VC": "英文 (è–æ–‡æ£®ç‰¹å’Œæ ¼æž—ç´ä¸æ–¯)", + "en_VG": "英文 (英屬維爾京群島)", + "en_VI": "英文 (美屬維爾京群島)", + "en_VU": "英文 (瓦努阿圖)", + "en_ZM": "英文 (贊比亞)", + "en_ZW": "英文 (津巴布韋)", + "eo": "世界語", + "es_CR": "西ç­ç‰™æ–‡ (哥斯é”黎加)", + "es_EC": "西ç­ç‰™æ–‡ (厄瓜多爾)", + "es_GT": "西ç­ç‰™æ–‡ (å±åœ°é¦¬æ‹‰)", + "ff_MR": "富拉文 (毛里塔尼亞)", + "fr_BF": "法文 (å¸ƒåŸºç´æ³•ç´¢)", + "fr_BI": "法文 (布隆迪)", + "fr_BJ": "法文 (è²å¯§)", + "fr_BL": "法文 (è–å·´æ³°å‹’ç±³)", + "fr_CI": "法文 (科特迪瓦)", + "fr_DJ": "法文 (å‰å¸ƒæ)", + "fr_GA": "法文 (加蓬)", + "fr_KM": "法文 (ç§‘æ‘©ç¾…)", + "fr_ML": "法文 (馬里)", + "fr_MR": "法文 (毛里塔尼亞)", + "fr_MU": "法文 (毛里裘斯)", + "fr_NE": "法文 (尼日爾)", + "fr_PF": "法文 (法屬波利尼西亞)", + "fr_RW": "法文 (ç›§æ—ºé”)", + "fr_SC": "法文 (塞舌爾)", + "fr_SY": "法文 (æ•利亞)", + "fr_TD": "法文 (ä¹å¾—)", + "fr_TG": "法文 (多哥共和國)", + "fr_VU": "法文 (瓦努阿圖)", + "gl": "加里西亞文", + "gl_ES": "加里西亞文 (西ç­ç‰™)", + "gv_IM": "曼島文 (馬æ©å³¶)", + "ha_GH": "豪撒文 (加ç´)", + "ha_NE": "豪撒文 (尼日爾)", + "ha_NG": "豪撒文 (尼日利亞)", + "hi": "å°åº¦æ–‡", + "hi_IN": "å°åº¦æ–‡ (å°åº¦)", + "hr": "克羅地亞文", + "hr_BA": "克羅地亞文 (波斯尼亞和黑塞哥維那)", + "hr_HR": "克羅地亞文 (克羅地亞)", + "ig_NG": "伊布文 (尼日利亞)", + "it": "æ„大利文", + "it_CH": "æ„大利文 (瑞士)", + "it_IT": "æ„大利文 (æ„大利)", + "it_SM": "æ„大利文 (è–馬利諾)", + "ka": "格魯å‰äºžæ–‡", + "ka_GE": "格魯å‰äºžæ–‡ (格魯å‰äºž)", + "ki_KE": "å‰åº«å°¤æ–‡ (肯雅)", + "kn": "åŽç´é”æ–‡", + "kn_IN": "åŽç´é”æ–‡ (å°åº¦)", + "lo": "è€æ’¾æ–‡", + "lo_LA": "è€æ’¾æ–‡ (è€æ’¾)", + "mg": "馬拉加斯文", + "mg_MG": "馬拉加斯文 (馬é”加斯加)", + "ml": "馬拉雅拉姆文", + "ml_IN": "馬拉雅拉姆文 (å°åº¦)", + "mt": "馬耳他文", + "mt_MT": "馬耳他文 (馬耳他)", + "nb_SJ": "å·´å…‹æ‘©æŒªå¨æ–‡ (æ–¯ç“¦çˆ¾å·´ç‰¹ç¾¤å³¶åŠæšé¦¬å»¶å³¶)", + "nd_ZW": "北地畢列文 (津巴布韋)", + "nl_AW": "è·è˜­æ–‡ (阿魯巴)", + "nl_SR": "è·è˜­æ–‡ (蘇里å—)", + "om_ET": "奧羅莫文 (埃塞俄比亞)", + "om_KE": "奧羅莫文 (肯雅)", + "or": "奧里雅文", + "or_IN": "奧里雅文 (å°åº¦)", + "os_GE": "å¥§å¡žææ–‡ (格魯å‰äºž)", + "pa_Guru": "æ—鮿™®æ–‡ (夿œ¨åŸºæ–‡)", + "pa_Guru_IN": "æ—鮿™®æ–‡ (夿œ¨åŸºæ–‡, å°åº¦)", + "pt_GW": "è‘¡è„牙文 (幾內亞比紹)", + "pt_ST": "è‘¡è„牙文 (è–多美和普林西比)", + "qu_EC": "蓋楚瓦文 (厄瓜多爾)", + "rw": "ç›§æ—ºé”æ–‡", + "rw_RW": "ç›§æ—ºé”æ–‡ (ç›§æ—ºé”)", + "sh_BA": "塞爾維亞克羅埃西亞文 (波斯尼亞和黑塞哥維那)", + "sl": "斯洛文尼亞文", + "sl_SI": "斯洛文尼亞文 (斯洛文尼亞)", + "sn": "ä¿®ç´æ–‡", + "sn_ZW": "ä¿®ç´æ–‡ (津巴布韋)", + "so": "索馬里文", + "so_DJ": "索馬里文 (å‰å¸ƒæ)", + "so_ET": "索馬里文 (埃塞俄比亞)", + "so_KE": "索馬里文 (肯雅)", + "so_SO": "索馬里文 (索馬里)", + "sr_BA": "塞爾維亞文 (波斯尼亞和黑塞哥維那)", + "sr_Cyrl": "塞爾維亞文 (西里爾文)", + "sr_Cyrl_BA": "塞爾維亞文 (西里爾文, 波斯尼亞和黑塞哥維那)", + "sr_Cyrl_ME": "塞爾維亞文 (西里爾文, 黑山)", + "sr_Cyrl_RS": "塞爾維亞文 (西里爾文, 塞爾維亞)", + "sr_Cyrl_XK": "塞爾維亞文 (西里爾文, 科索沃)", + "sr_Latn": "塞爾維亞文 (拉ä¸å­—æ¯)", + "sr_Latn_BA": "塞爾維亞文 (拉ä¸å­—æ¯, 波斯尼亞和黑塞哥維那)", + "sr_Latn_ME": "塞爾維亞文 (拉ä¸å­—æ¯, 黑山)", + "sr_Latn_RS": "塞爾維亞文 (拉ä¸å­—æ¯, 塞爾維亞)", + "sr_Latn_XK": "塞爾維亞文 (拉ä¸å­—æ¯, 科索沃)", + "sr_ME": "塞爾維亞文 (黑山)", + "sw_KE": "å²ç“¦å¸Œé‡Œæ–‡ (肯雅)", + "sw_TZ": "å²ç“¦å¸Œé‡Œæ–‡ (妿¡‘尼亞)", + "ta": "泰米爾文", + "ta_IN": "泰米爾文 (å°åº¦)", + "ta_LK": "泰米爾文 (斯里蘭å¡)", + "ta_MY": "泰米爾文 (馬來西亞)", + "ta_SG": "泰米爾文 (新加å¡)", + "ti_ER": "ææ ¼åˆ©å°¼äºžæ–‡ (厄立特里亞)", + "ti_ET": "ææ ¼åˆ©å°¼äºžæ–‡ (埃塞俄比亞)", + "to": "湯加文", + "to_TO": "湯加文 (湯加)", + "ur": "çƒçˆ¾éƒ½æ–‡", + "ur_IN": "çƒçˆ¾éƒ½æ–‡ (å°åº¦)", + "ur_PK": "çƒçˆ¾éƒ½æ–‡ (巴基斯å¦)", + "uz_Cyrl": "çƒèŒ²åˆ¥å…‹æ–‡ (西里爾文)", + "uz_Cyrl_UZ": "çƒèŒ²åˆ¥å…‹æ–‡ (西里爾文, çƒèŒ²åˆ¥å…‹)", + "uz_Latn": "çƒèŒ²åˆ¥å…‹æ–‡ (拉ä¸å­—æ¯)", + "uz_Latn_UZ": "çƒèŒ²åˆ¥å…‹æ–‡ (拉ä¸å­—æ¯, çƒèŒ²åˆ¥å…‹)", + "yo_BJ": "約魯巴文 (è²å¯§)", + "yo_NG": "約魯巴文 (尼日利亞)", + "zh_Hans": "中文 (簡體字)", + "zh_Hans_CN": "中文 (簡體字, 中國)", + "zh_Hans_HK": "中文 (簡體字, 中國香港特別行政å€)", + "zh_Hans_MO": "中文 (簡體字, 中國澳門特別行政å€)", + "zh_Hans_SG": "中文 (簡體字, 新加å¡)", + "zh_Hant": "中文 (ç¹é«”å­—)", + "zh_Hant_HK": "中文 (ç¹é«”å­—, 中國香港特別行政å€)", + "zh_Hant_MO": "中文 (ç¹é«”å­—, 中國澳門特別行政å€)", + "zh_Hant_TW": "中文 (ç¹é«”å­—, å°ç£)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_MO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_MO.json new file mode 100644 index 0000000000000000000000000000000000000000..d98d40644ebff9909742023209b1ba64533cb29d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_MO.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "zh_Hant_MO" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_SG.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_SG.json new file mode 100644 index 0000000000000000000000000000000000000000..c404a160bbaa4073211607236f9770ce943a0906 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_SG.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "zh_Hans_SG" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_TW.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_TW.json new file mode 100644 index 0000000000000000000000000000000000000000..721267a6b00a1cf2f26bf79ddff4a2e3aaca8524 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zh_TW.json @@ -0,0 +1,3 @@ +{ + "%%ALIAS": "zh_Hant_TW" +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zu.json new file mode 100644 index 0000000000000000000000000000000000000000..72b339e377f7167d1e9f259672dc8f4a66f4bcf7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/locales/zu.json @@ -0,0 +1,566 @@ +{ + "Names": { + "af": "i-Afrikaans", + "af_NA": "i-Afrikaans (i-Namibia)", + "af_ZA": "i-Afrikaans (i-South Africa)", + "ak": "isi-Akan", + "ak_GH": "isi-Akan (i-Ghana)", + "am": "isi-Amharic", + "am_ET": "isi-Amharic (i-Ethiopia)", + "ar": "isi-Arabic", + "ar_AE": "isi-Arabic (i-United Arab Emirates)", + "ar_BH": "isi-Arabic (i-Bahrain)", + "ar_DJ": "isi-Arabic (i-Djibouti)", + "ar_DZ": "isi-Arabic (i-Algeria)", + "ar_EG": "isi-Arabic (i-Egypt)", + "ar_EH": "isi-Arabic (i-Western Sahara)", + "ar_ER": "isi-Arabic (i-Eritrea)", + "ar_IL": "isi-Arabic (kwa-Israel)", + "ar_IQ": "isi-Arabic (i-Iraq)", + "ar_JO": "isi-Arabic (i-Jordan)", + "ar_KM": "isi-Arabic (i-Comoros)", + "ar_KW": "isi-Arabic (i-Kuwait)", + "ar_LB": "isi-Arabic (i-Lebanon)", + "ar_LY": "isi-Arabic (i-Libya)", + "ar_MA": "isi-Arabic (i-Morocco)", + "ar_MR": "isi-Arabic (i-Mauritania)", + "ar_OM": "isi-Arabic (i-Oman)", + "ar_PS": "isi-Arabic (i-Palestinian Territories)", + "ar_QA": "isi-Arabic (i-Qatar)", + "ar_SA": "isi-Arabic (i-Saudi Arabia)", + "ar_SD": "isi-Arabic (i-Sudan)", + "ar_SO": "isi-Arabic (i-Somalia)", + "ar_SS": "isi-Arabic (i-South Sudan)", + "ar_SY": "isi-Arabic (i-Syria)", + "ar_TD": "isi-Arabic (i-Chad)", + "ar_TN": "isi-Arabic (i-Tunisia)", + "ar_YE": "isi-Arabic (i-Yemen)", + "as": "isi-Assamese", + "as_IN": "isi-Assamese (i-India)", + "az": "isi-Azerbaijani", + "az_AZ": "isi-Azerbaijani (i-Azerbaijan)", + "az_Cyrl": "isi-Azerbaijani (isi-Cyrillic)", + "az_Cyrl_AZ": "isi-Azerbaijani (isi-Cyrillic, i-Azerbaijan)", + "az_Latn": "isi-Azerbaijani (isi-Latin)", + "az_Latn_AZ": "isi-Azerbaijani (isi-Latin, i-Azerbaijan)", + "be": "isi-Belarusian", + "be_BY": "isi-Belarusian (i-Belarus)", + "bg": "isi-Bulgari", + "bg_BG": "isi-Bulgari (i-Bulgaria)", + "bm": "isi-Bambara", + "bm_ML": "isi-Bambara (iMali)", + "bn": "isi-Bengali", + "bn_BD": "isi-Bengali (i-Bangladesh)", + "bn_IN": "isi-Bengali (i-India)", + "bo": "isi-Tibetan", + "bo_CN": "isi-Tibetan (i-China)", + "bo_IN": "isi-Tibetan (i-India)", + "br": "isi-Breton", + "br_FR": "isi-Breton (i-France)", + "bs": "isi-Bosnian", + "bs_BA": "isi-Bosnian (i-Bosnia ne-Herzegovina)", + "bs_Cyrl": "isi-Bosnian (isi-Cyrillic)", + "bs_Cyrl_BA": "isi-Bosnian (isi-Cyrillic, i-Bosnia ne-Herzegovina)", + "bs_Latn": "isi-Bosnian (isi-Latin)", + "bs_Latn_BA": "isi-Bosnian (isi-Latin, i-Bosnia ne-Herzegovina)", + "ca": "isi-Catalan", + "ca_AD": "isi-Catalan (i-Andorra)", + "ca_ES": "isi-Catalan (i-Spain)", + "ca_FR": "isi-Catalan (i-France)", + "ca_IT": "isi-Catalan (i-Italy)", + "ce": "isi-Chechen", + "ce_RU": "isi-Chechen (i-Russia)", + "cs": "isi-Czech", + "cs_CZ": "isi-Czech (i-Czech Republic)", + "cy": "isi-Welsh", + "cy_GB": "isi-Welsh (i-United Kingdom)", + "da": "isi-Danish", + "da_DK": "isi-Danish (i-Denmark)", + "da_GL": "isi-Danish (i-Greenland)", + "de": "isi-German", + "de_AT": "isi-German (i-Austria)", + "de_BE": "isi-German (i-Belgium)", + "de_CH": "isi-German (i-Switzerland)", + "de_DE": "isi-German (i-Germany)", + "de_IT": "isi-German (i-Italy)", + "de_LI": "isi-German (i-Liechtenstein)", + "de_LU": "isi-German (i-Luxembourg)", + "dz": "isi-Dzongkha", + "dz_BT": "isi-Dzongkha (i-Bhutan)", + "ee": "isi-Ewe", + "ee_GH": "isi-Ewe (i-Ghana)", + "ee_TG": "isi-Ewe (i-Togo)", + "el": "isi-Greek", + "el_CY": "isi-Greek (i-Cyprus)", + "el_GR": "isi-Greek (i-Greece)", + "en": "i-English", + "en_AG": "i-English (i-Antigua ne-Barbuda)", + "en_AI": "i-English (i-Anguilla)", + "en_AS": "i-English (i-American Samoa)", + "en_AT": "i-English (i-Austria)", + "en_AU": "i-English (i-Australia)", + "en_BB": "i-English (i-Barbados)", + "en_BE": "i-English (i-Belgium)", + "en_BI": "i-English (i-Burundi)", + "en_BM": "i-English (i-Bermuda)", + "en_BS": "i-English (i-Bahamas)", + "en_BW": "i-English (iBotswana)", + "en_BZ": "i-English (i-Belize)", + "en_CA": "i-English (i-Canada)", + "en_CC": "i-English (i-Cocos (Keeling) Islands)", + "en_CH": "i-English (i-Switzerland)", + "en_CK": "i-English (i-Cook Islands)", + "en_CM": "i-English (i-Cameroon)", + "en_CX": "i-English (i-Christmas Island)", + "en_CY": "i-English (i-Cyprus)", + "en_DE": "i-English (i-Germany)", + "en_DG": "i-English (i-Diego Garcia)", + "en_DK": "i-English (i-Denmark)", + "en_DM": "i-English (i-Dominica)", + "en_ER": "i-English (i-Eritrea)", + "en_FI": "i-English (i-Finland)", + "en_FJ": "i-English (i-Fiji)", + "en_FK": "i-English (i-Falkland Islands)", + "en_FM": "i-English (i-Micronesia)", + "en_GB": "i-English (i-United Kingdom)", + "en_GD": "i-English (i-Grenada)", + "en_GG": "i-English (i-Guernsey)", + "en_GH": "i-English (i-Ghana)", + "en_GI": "i-English (i-Gibraltar)", + "en_GM": "i-English (i-Gambia)", + "en_GU": "i-English (i-Guam)", + "en_GY": "i-English (i-Guyana)", + "en_HK": "i-English (i-Hong Kong SAR China)", + "en_IE": "i-English (i-Ireland)", + "en_IL": "i-English (kwa-Israel)", + "en_IM": "i-English (i-Isle of Man)", + "en_IN": "i-English (i-India)", + "en_IO": "i-English (i-British Indian Ocean Territory)", + "en_JE": "i-English (i-Jersey)", + "en_JM": "i-English (i-Jamaica)", + "en_KE": "i-English (i-Kenya)", + "en_KI": "i-English (i-Kiribati)", + "en_KN": "i-English (i-Saint Kitts ne-Nevis)", + "en_KY": "i-English (i-Cayman Islands)", + "en_LC": "i-English (i-Saint Lucia)", + "en_LR": "i-English (i-Liberia)", + "en_LS": "i-English (iLesotho)", + "en_MG": "i-English (i-Madagascar)", + "en_MH": "i-English (i-Marshall Islands)", + "en_MO": "i-English (i-Macau SAR China)", + "en_MP": "i-English (i-Northern Mariana Islands)", + "en_MS": "i-English (i-Montserrat)", + "en_MT": "i-English (i-Malta)", + "en_MU": "i-English (i-Mauritius)", + "en_MW": "i-English (iMalawi)", + "en_MY": "i-English (i-Malaysia)", + "en_NA": "i-English (i-Namibia)", + "en_NF": "i-English (i-Norfolk Island)", + "en_NG": "i-English (i-Nigeria)", + "en_NL": "i-English (i-Netherlands)", + "en_NR": "i-English (i-Nauru)", + "en_NU": "i-English (i-Niue)", + "en_NZ": "i-English (i-New Zealand)", + "en_PG": "i-English (i-Papua New Guinea)", + "en_PH": "i-English (i-Philippines)", + "en_PK": "i-English (i-Pakistan)", + "en_PN": "i-English (i-Pitcairn Islands)", + "en_PR": "i-English (i-Puerto Rico)", + "en_PW": "i-English (i-Palau)", + "en_RW": "i-English (i-Rwanda)", + "en_SB": "i-English (i-Solomon Islands)", + "en_SC": "i-English (i-Seychelles)", + "en_SD": "i-English (i-Sudan)", + "en_SE": "i-English (i-Sweden)", + "en_SG": "i-English (i-Singapore)", + "en_SH": "i-English (i-St. Helena)", + "en_SI": "i-English (i-Slovenia)", + "en_SL": "i-English (i-Sierra Leone)", + "en_SS": "i-English (i-South Sudan)", + "en_SX": "i-English (i-Sint Maarten)", + "en_SZ": "i-English (i-Swaziland)", + "en_TC": "i-English (i-Turks ne-Caicos Islands)", + "en_TK": "i-English (i-Tokelau)", + "en_TO": "i-English (i-Tonga)", + "en_TT": "i-English (i-Trinidad ne-Tobago)", + "en_TV": "i-English (i-Tuvalu)", + "en_TZ": "i-English (i-Tanzania)", + "en_UG": "i-English (i-Uganda)", + "en_UM": "i-English (i-U.S. Minor Outlying Islands)", + "en_US": "i-English (i-United States)", + "en_VC": "i-English (i-Saint Vincent ne-Grenadines)", + "en_VG": "i-English (i-British Virgin Islands)", + "en_VI": "i-English (i-U.S. Virgin Islands)", + "en_VU": "i-English (i-Vanuatu)", + "en_WS": "i-English (i-Samoa)", + "en_ZA": "i-English (i-South Africa)", + "en_ZM": "i-English (i-Zambia)", + "en_ZW": "i-English (iZimbabwe)", + "eo": "isi-Esperanto", + "es": "isi-Spanish", + "es_AR": "isi-Spanish (i-Argentina)", + "es_BO": "isi-Spanish (i-Bolivia)", + "es_BR": "isi-Spanish (i-Brazil)", + "es_CL": "isi-Spanish (i-Chile)", + "es_CO": "isi-Spanish (i-Colombia)", + "es_CR": "isi-Spanish (i-Costa Rica)", + "es_CU": "isi-Spanish (i-Cuba)", + "es_DO": "isi-Spanish (i-Dominican Republic)", + "es_EA": "isi-Spanish (i-Cueta ne-Melilla)", + "es_EC": "isi-Spanish (i-Ecuador)", + "es_ES": "isi-Spanish (i-Spain)", + "es_GQ": "isi-Spanish (i-Equatorial Guinea)", + "es_GT": "isi-Spanish (i-Guatemala)", + "es_HN": "isi-Spanish (i-Honduras)", + "es_IC": "isi-Spanish (i-Canary Islands)", + "es_MX": "isi-Spanish (i-Mexico)", + "es_NI": "isi-Spanish (i-Nicaragua)", + "es_PA": "isi-Spanish (i-Panama)", + "es_PE": "isi-Spanish (i-Peru)", + "es_PH": "isi-Spanish (i-Philippines)", + "es_PR": "isi-Spanish (i-Puerto Rico)", + "es_PY": "isi-Spanish (i-Paraguay)", + "es_SV": "isi-Spanish (i-El Salvador)", + "es_US": "isi-Spanish (i-United States)", + "es_UY": "isi-Spanish (i-Uruguay)", + "es_VE": "isi-Spanish (i-Venezuela)", + "et": "isi-Estonia", + "et_EE": "isi-Estonia (i-Estonia)", + "eu": "isi-Basque", + "eu_ES": "isi-Basque (i-Spain)", + "fa": "isi-Persian", + "fa_AF": "isi-Persian (i-Afghanistan)", + "fa_IR": "isi-Persian (i-Iran)", + "ff": "isi-Fulah", + "ff_CM": "isi-Fulah (i-Cameroon)", + "ff_GN": "isi-Fulah (i-Guinea)", + "ff_MR": "isi-Fulah (i-Mauritania)", + "ff_SN": "isi-Fulah (i-Senegal)", + "fi": "isi-Finnish", + "fi_FI": "isi-Finnish (i-Finland)", + "fo": "isi-Faroese", + "fo_DK": "isi-Faroese (i-Denmark)", + "fo_FO": "isi-Faroese (i-Faroe Islands)", + "fr": "isi-French", + "fr_BE": "isi-French (i-Belgium)", + "fr_BF": "isi-French (i-Burkina Faso)", + "fr_BI": "isi-French (i-Burundi)", + "fr_BJ": "isi-French (i-Benin)", + "fr_BL": "isi-French (i-Saint Barthélemy)", + "fr_CA": "isi-French (i-Canada)", + "fr_CD": "isi-French (i-Congo - Kinshasa)", + "fr_CF": "isi-French (i-Central African Republic)", + "fr_CG": "isi-French (i-Congo - Brazzaville)", + "fr_CH": "isi-French (i-Switzerland)", + "fr_CI": "isi-French (i-Côte d’Ivoire)", + "fr_CM": "isi-French (i-Cameroon)", + "fr_DJ": "isi-French (i-Djibouti)", + "fr_DZ": "isi-French (i-Algeria)", + "fr_FR": "isi-French (i-France)", + "fr_GA": "isi-French (i-Gabon)", + "fr_GF": "isi-French (i-French Guiana)", + "fr_GN": "isi-French (i-Guinea)", + "fr_GP": "isi-French (i-Guadeloupe)", + "fr_GQ": "isi-French (i-Equatorial Guinea)", + "fr_HT": "isi-French (i-Haiti)", + "fr_KM": "isi-French (i-Comoros)", + "fr_LU": "isi-French (i-Luxembourg)", + "fr_MA": "isi-French (i-Morocco)", + "fr_MC": "isi-French (i-Monaco)", + "fr_MF": "isi-French (i-Saint Martin)", + "fr_MG": "isi-French (i-Madagascar)", + "fr_ML": "isi-French (iMali)", + "fr_MQ": "isi-French (i-Martinique)", + "fr_MR": "isi-French (i-Mauritania)", + "fr_MU": "isi-French (i-Mauritius)", + "fr_NC": "isi-French (i-New Caledonia)", + "fr_NE": "isi-French (i-Niger)", + "fr_PF": "isi-French (i-French Polynesia)", + "fr_PM": "isi-French (i-Saint Pierre kanye ne-Miquelon)", + "fr_RE": "isi-French (i-Réunion)", + "fr_RW": "isi-French (i-Rwanda)", + "fr_SC": "isi-French (i-Seychelles)", + "fr_SN": "isi-French (i-Senegal)", + "fr_SY": "isi-French (i-Syria)", + "fr_TD": "isi-French (i-Chad)", + "fr_TG": "isi-French (i-Togo)", + "fr_TN": "isi-French (i-Tunisia)", + "fr_VU": "isi-French (i-Vanuatu)", + "fr_WF": "isi-French (i-Wallis ne-Futuna)", + "fr_YT": "isi-French (i-Mayotte)", + "fy": "isi-Western Frisian", + "fy_NL": "isi-Western Frisian (i-Netherlands)", + "ga": "isi-Irish", + "ga_IE": "isi-Irish (i-Ireland)", + "gd": "i-Scottish Gaelic", + "gd_GB": "i-Scottish Gaelic (i-United Kingdom)", + "gl": "isi-Galicia", + "gl_ES": "isi-Galicia (i-Spain)", + "gu": "isi-Gujarati", + "gu_IN": "isi-Gujarati (i-India)", + "gv": "isi-Manx", + "gv_IM": "isi-Manx (i-Isle of Man)", + "ha": "isi-Hausa", + "ha_GH": "isi-Hausa (i-Ghana)", + "ha_NE": "isi-Hausa (i-Niger)", + "ha_NG": "isi-Hausa (i-Nigeria)", + "he": "isi-Hebrew", + "he_IL": "isi-Hebrew (kwa-Israel)", + "hi": "isi-Hindi", + "hi_IN": "isi-Hindi (i-India)", + "hr": "isi-Croatian", + "hr_BA": "isi-Croatian (i-Bosnia ne-Herzegovina)", + "hr_HR": "isi-Croatian (i-Croatia)", + "hu": "isi-Hungarian", + "hu_HU": "isi-Hungarian (i-Hungary)", + "hy": "isi-Armenia", + "hy_AM": "isi-Armenia (i-Armenia)", + "id": "isi-Indonesian", + "id_ID": "isi-Indonesian (i-Indonesia)", + "ig": "isi-Igbo", + "ig_NG": "isi-Igbo (i-Nigeria)", + "ii": "isi-Sichuan Yi", + "ii_CN": "isi-Sichuan Yi (i-China)", + "is": "isi-Icelandic", + "is_IS": "isi-Icelandic (i-Iceland)", + "it": "isi-Italian", + "it_CH": "isi-Italian (i-Switzerland)", + "it_IT": "isi-Italian (i-Italy)", + "it_SM": "isi-Italian (i-San Marino)", + "ja": "isi-Japanese", + "ja_JP": "isi-Japanese (i-Japan)", + "ka": "isi-Georgian", + "ka_GE": "isi-Georgian (i-Georgia)", + "ki": "isi-Kikuyu", + "ki_KE": "isi-Kikuyu (i-Kenya)", + "kk": "isi-Kazakh", + "kk_KZ": "isi-Kazakh (i-Kazakhstan)", + "kl": "isi-Kalaallisut", + "kl_GL": "isi-Kalaallisut (i-Greenland)", + "km": "isi-Khmer", + "km_KH": "isi-Khmer (i-Cambodia)", + "kn": "isi-Kannada", + "kn_IN": "isi-Kannada (i-India)", + "ko": "isi-Korean", + "ko_KP": "isi-Korean (i-North Korea)", + "ko_KR": "isi-Korean (i-South Korea)", + "ks": "isi-Kashmiri", + "ks_IN": "isi-Kashmiri (i-India)", + "kw": "isi-Cornish", + "kw_GB": "isi-Cornish (i-United Kingdom)", + "ky": "isi-Kyrgyz", + "ky_KG": "isi-Kyrgyz (i-Kyrgyzstan)", + "lb": "isi-Luxembourgish", + "lb_LU": "isi-Luxembourgish (i-Luxembourg)", + "lg": "isi-Ganda", + "lg_UG": "isi-Ganda (i-Uganda)", + "ln": "isi-Lingala", + "ln_AO": "isi-Lingala (i-Angola)", + "ln_CD": "isi-Lingala (i-Congo - Kinshasa)", + "ln_CF": "isi-Lingala (i-Central African Republic)", + "ln_CG": "isi-Lingala (i-Congo - Brazzaville)", + "lo": "i-Lao", + "lo_LA": "i-Lao (i-Laos)", + "lt": "isi-Lithuanian", + "lt_LT": "isi-Lithuanian (i-Lithuania)", + "lu": "isi-Luba-Katanga", + "lu_CD": "isi-Luba-Katanga (i-Congo - Kinshasa)", + "lv": "isi-Latvian", + "lv_LV": "isi-Latvian (i-Latvia)", + "mg": "isi-Malagasy", + "mg_MG": "isi-Malagasy (i-Madagascar)", + "mk": "isi-Macedonian", + "mk_MK": "isi-Macedonian (i-Macedonia)", + "ml": "isi-Malayalam", + "ml_IN": "isi-Malayalam (i-India)", + "mn": "isi-Mongolian", + "mn_MN": "isi-Mongolian (i-Mongolia)", + "mr": "isi-Marathi", + "mr_IN": "isi-Marathi (i-India)", + "ms": "isi-Malay", + "ms_BN": "isi-Malay (i-Brunei)", + "ms_MY": "isi-Malay (i-Malaysia)", + "ms_SG": "isi-Malay (i-Singapore)", + "mt": "isi-Maltese", + "mt_MT": "isi-Maltese (i-Malta)", + "my": "isi-Burmese", + "my_MM": "isi-Burmese (i-Myanmar (Burma))", + "nb": "isi-Norwegian BokmÃ¥l", + "nb_NO": "isi-Norwegian BokmÃ¥l (i-Norway)", + "nb_SJ": "isi-Norwegian BokmÃ¥l (i-Svalbard ne-Jan Mayen)", + "nd": "isi-North Ndebele", + "nd_ZW": "isi-North Ndebele (iZimbabwe)", + "ne": "isi-Nepali", + "ne_IN": "isi-Nepali (i-India)", + "ne_NP": "isi-Nepali (i-Nepal)", + "nl": "isi-Dutch", + "nl_AW": "isi-Dutch (i-Aruba)", + "nl_BE": "isi-Dutch (i-Belgium)", + "nl_BQ": "isi-Dutch (i-Caribbean Netherlands)", + "nl_CW": "isi-Dutch (i-Curaçao)", + "nl_NL": "isi-Dutch (i-Netherlands)", + "nl_SR": "isi-Dutch (i-Suriname)", + "nl_SX": "isi-Dutch (i-Sint Maarten)", + "nn": "i-Norwegian Nynorsk", + "nn_NO": "i-Norwegian Nynorsk (i-Norway)", + "no": "isi-Norwegian", + "no_NO": "isi-Norwegian (i-Norway)", + "om": "i-Oromo", + "om_ET": "i-Oromo (i-Ethiopia)", + "om_KE": "i-Oromo (i-Kenya)", + "or": "isi-Odia", + "or_IN": "isi-Odia (i-India)", + "os": "isi-Ossetic", + "os_GE": "isi-Ossetic (i-Georgia)", + "os_RU": "isi-Ossetic (i-Russia)", + "pa": "isi-Punjabi", + "pa_Arab": "isi-Punjabi (isi-Arabic)", + "pa_Arab_PK": "isi-Punjabi (isi-Arabic, i-Pakistan)", + "pa_Guru": "isi-Punjabi (isi-Gurmukhi)", + "pa_Guru_IN": "isi-Punjabi (isi-Gurmukhi, i-India)", + "pa_IN": "isi-Punjabi (i-India)", + "pa_PK": "isi-Punjabi (i-Pakistan)", + "pl": "isi-Polish", + "pl_PL": "isi-Polish (i-Poland)", + "ps": "isi-Pashto", + "ps_AF": "isi-Pashto (i-Afghanistan)", + "pt": "isi-Portuguese", + "pt_AO": "isi-Portuguese (i-Angola)", + "pt_BR": "isi-Portuguese (i-Brazil)", + "pt_CH": "isi-Portuguese (i-Switzerland)", + "pt_CV": "isi-Portuguese (i-Cape Verde)", + "pt_GQ": "isi-Portuguese (i-Equatorial Guinea)", + "pt_GW": "isi-Portuguese (i-Guinea-Bissau)", + "pt_LU": "isi-Portuguese (i-Luxembourg)", + "pt_MO": "isi-Portuguese (i-Macau SAR China)", + "pt_MZ": "isi-Portuguese (i-Mozambique)", + "pt_PT": "isi-Portuguese (i-Portugal)", + "pt_ST": "isi-Portuguese (i-São Tomé kanye ne-Príncipe)", + "pt_TL": "isi-Portuguese (i-Timor-Leste)", + "qu": "isi-Quechua", + "qu_BO": "isi-Quechua (i-Bolivia)", + "qu_EC": "isi-Quechua (i-Ecuador)", + "qu_PE": "isi-Quechua (i-Peru)", + "rm": "isi-Romansh", + "rm_CH": "isi-Romansh (i-Switzerland)", + "rn": "isi-Rundi", + "rn_BI": "isi-Rundi (i-Burundi)", + "ro": "isi-Romanian", + "ro_MD": "isi-Romanian (i-Moldova)", + "ro_RO": "isi-Romanian (i-Romania)", + "ru": "isi-Russian", + "ru_BY": "isi-Russian (i-Belarus)", + "ru_KG": "isi-Russian (i-Kyrgyzstan)", + "ru_KZ": "isi-Russian (i-Kazakhstan)", + "ru_MD": "isi-Russian (i-Moldova)", + "ru_RU": "isi-Russian (i-Russia)", + "ru_UA": "isi-Russian (i-Ukraine)", + "rw": "isi-Kinyarwanda", + "rw_RW": "isi-Kinyarwanda (i-Rwanda)", + "se": "isi-Northern Sami", + "se_FI": "isi-Northern Sami (i-Finland)", + "se_NO": "isi-Northern Sami (i-Norway)", + "se_SE": "isi-Northern Sami (i-Sweden)", + "sg": "isi-Sango", + "sg_CF": "isi-Sango (i-Central African Republic)", + "sh": "isi-Serbo-Croatian", + "sh_BA": "isi-Serbo-Croatian (i-Bosnia ne-Herzegovina)", + "si": "i-Sinhala", + "si_LK": "i-Sinhala (i-Sri Lanka)", + "sk": "isi-Slovak", + "sk_SK": "isi-Slovak (i-Slovakia)", + "sl": "isi-Slovenian", + "sl_SI": "isi-Slovenian (i-Slovenia)", + "sn": "isiShona", + "sn_ZW": "isiShona (iZimbabwe)", + "so": "isi-Somali", + "so_DJ": "isi-Somali (i-Djibouti)", + "so_ET": "isi-Somali (i-Ethiopia)", + "so_KE": "isi-Somali (i-Kenya)", + "so_SO": "isi-Somali (i-Somalia)", + "sq": "isi-Albania", + "sq_AL": "isi-Albania (i-Albania)", + "sq_MK": "isi-Albania (i-Macedonia)", + "sq_XK": "isi-Albania (i-Kosovo)", + "sr": "isi-Serbian", + "sr_BA": "isi-Serbian (i-Bosnia ne-Herzegovina)", + "sr_Cyrl": "isi-Serbian (isi-Cyrillic)", + "sr_Cyrl_BA": "isi-Serbian (isi-Cyrillic, i-Bosnia ne-Herzegovina)", + "sr_Cyrl_ME": "isi-Serbian (isi-Cyrillic, i-Montenegro)", + "sr_Cyrl_RS": "isi-Serbian (isi-Cyrillic, i-Serbia)", + "sr_Cyrl_XK": "isi-Serbian (isi-Cyrillic, i-Kosovo)", + "sr_Latn": "isi-Serbian (isi-Latin)", + "sr_Latn_BA": "isi-Serbian (isi-Latin, i-Bosnia ne-Herzegovina)", + "sr_Latn_ME": "isi-Serbian (isi-Latin, i-Montenegro)", + "sr_Latn_RS": "isi-Serbian (isi-Latin, i-Serbia)", + "sr_Latn_XK": "isi-Serbian (isi-Latin, i-Kosovo)", + "sr_ME": "isi-Serbian (i-Montenegro)", + "sr_RS": "isi-Serbian (i-Serbia)", + "sr_XK": "isi-Serbian (i-Kosovo)", + "sv": "isi-Swedish", + "sv_AX": "isi-Swedish (i-Ã…land Islands)", + "sv_FI": "isi-Swedish (i-Finland)", + "sv_SE": "isi-Swedish (i-Sweden)", + "sw": "isiSwahili", + "sw_CD": "isiSwahili (i-Congo - Kinshasa)", + "sw_KE": "isiSwahili (i-Kenya)", + "sw_TZ": "isiSwahili (i-Tanzania)", + "sw_UG": "isiSwahili (i-Uganda)", + "ta": "isi-Tamil", + "ta_IN": "isi-Tamil (i-India)", + "ta_LK": "isi-Tamil (i-Sri Lanka)", + "ta_MY": "isi-Tamil (i-Malaysia)", + "ta_SG": "isi-Tamil (i-Singapore)", + "te": "isi-Telugu", + "te_IN": "isi-Telugu (i-India)", + "th": "isi-Thai", + "th_TH": "isi-Thai (i-Thailand)", + "ti": "isi-Tigrinya", + "ti_ER": "isi-Tigrinya (i-Eritrea)", + "ti_ET": "isi-Tigrinya (i-Ethiopia)", + "to": "isi-Tongan", + "to_TO": "isi-Tongan (i-Tonga)", + "tr": "isi-Turkish", + "tr_CY": "isi-Turkish (i-Cyprus)", + "tr_TR": "isi-Turkish (i-Turkey)", + "ug": "isi-Uighur", + "ug_CN": "isi-Uighur (i-China)", + "uk": "isi-Ukrainian", + "uk_UA": "isi-Ukrainian (i-Ukraine)", + "ur": "isi-Urdu", + "ur_IN": "isi-Urdu (i-India)", + "ur_PK": "isi-Urdu (i-Pakistan)", + "uz": "isi-Uzbek", + "uz_AF": "isi-Uzbek (i-Afghanistan)", + "uz_Arab": "isi-Uzbek (isi-Arabic)", + "uz_Arab_AF": "isi-Uzbek (isi-Arabic, i-Afghanistan)", + "uz_Cyrl": "isi-Uzbek (isi-Cyrillic)", + "uz_Cyrl_UZ": "isi-Uzbek (isi-Cyrillic, i-Uzbekistan)", + "uz_Latn": "isi-Uzbek (isi-Latin)", + "uz_Latn_UZ": "isi-Uzbek (isi-Latin, i-Uzbekistan)", + "uz_UZ": "isi-Uzbek (i-Uzbekistan)", + "vi": "isi-Vietnamese", + "vi_VN": "isi-Vietnamese (i-Vietnam)", + "yi": "isi-Yiddish", + "yo": "isi-Yoruba", + "yo_BJ": "isi-Yoruba (i-Benin)", + "yo_NG": "isi-Yoruba (i-Nigeria)", + "zh": "isi-Chinese", + "zh_CN": "isi-Chinese (i-China)", + "zh_HK": "isi-Chinese (i-Hong Kong SAR China)", + "zh_Hans": "isi-Chinese (enziwe lula)", + "zh_Hans_CN": "isi-Chinese (enziwe lula, i-China)", + "zh_Hans_HK": "isi-Chinese (enziwe lula, i-Hong Kong SAR China)", + "zh_Hans_MO": "isi-Chinese (enziwe lula, i-Macau SAR China)", + "zh_Hans_SG": "isi-Chinese (enziwe lula, i-Singapore)", + "zh_Hant": "isi-Chinese (okosiko)", + "zh_Hant_HK": "isi-Chinese (okosiko, i-Hong Kong SAR China)", + "zh_Hant_MO": "isi-Chinese (okosiko, i-Macau SAR China)", + "zh_Hant_TW": "isi-Chinese (okosiko, i-Taiwan)", + "zh_MO": "isi-Chinese (i-Macau SAR China)", + "zh_SG": "isi-Chinese (i-Singapore)", + "zh_TW": "isi-Chinese (i-Taiwan)", + "zu": "isiZulu", + "zu_ZA": "isiZulu (i-South Africa)" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/af.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/af.json new file mode 100644 index 0000000000000000000000000000000000000000..d6c5367063643e3c7d3f0c010609313c5a82ad81 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/af.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.44", + "Names": { + "AC": "Ascensioneiland", + "AD": "Andorra", + "AE": "Verenigde Arabiese Emirate", + "AF": "Afganistan", + "AG": "Antigua en Barbuda", + "AI": "Anguilla", + "AL": "Albanië", + "AM": "Armenië", + "AO": "Angola", + "AQ": "Antarktika", + "AR": "Argentinië", + "AS": "Amerikaans-Samoa", + "AT": "Oostenryk", + "AU": "Australië", + "AW": "Aruba", + "AX": "Ã…landeilande", + "AZ": "Azerbeidjan", + "BA": "Bosnië en Herzegowina", + "BB": "Barbados", + "BD": "Bangladesj", + "BE": "België", + "BF": "Burkina Faso", + "BG": "Bulgarye", + "BH": "Bahrein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Sint Barthélemy", + "BM": "Bermuda", + "BN": "Broenei", + "BO": "Bolivië", + "BQ": "Karibiese Nederland", + "BR": "Brasilië", + "BS": "Bahamas", + "BT": "Bhoetan", + "BW": "Botswana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kokos-eilande", + "CD": "Demokratiese Republiek van die Kongo", + "CF": "Sentraal-Afrikaanse Republiek", + "CG": "Kongo - Brazzaville", + "CH": "Switserland", + "CI": "Ivoorkus", + "CK": "Cookeilande", + "CL": "Chili", + "CM": "Kameroen", + "CN": "Sjina", + "CO": "Colombië", + "CR": "Costa Rica", + "CU": "Kuba", + "CV": "Kaap Verde", + "CW": "Curaçao", + "CX": "Kerseiland", + "CY": "Siprus", + "CZ": "Tjeggiese Republiek", + "DE": "Duitsland", + "DG": "Diego Garcia", + "DJ": "Djiboeti", + "DK": "Denemarke", + "DM": "Dominica", + "DO": "Dominikaanse Republiek", + "DZ": "Algerië", + "EA": "Ceuta en Melilla", + "EC": "Ecuador", + "EE": "Estland", + "EG": "Egipte", + "EH": "Wes-Sahara", + "ER": "Eritrea", + "ES": "Spanje", + "ET": "Ethiopië", + "FI": "Finland", + "FJ": "Fidji", + "FK": "Falklandeilande", + "FM": "Mikronesië", + "FO": "Faroëreilande", + "FR": "Frankryk", + "GA": "Gaboen", + "GB": "Verenigde Koninkryk", + "GD": "Grenada", + "GE": "Georgië", + "GF": "Frans-Guyana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Groenland", + "GM": "Gambië", + "GN": "Guinee", + "GP": "Guadeloupe", + "GQ": "Ekwatoriaal-Guinee", + "GR": "Griekeland", + "GS": "Suid-Georgië en die Suidelike Sandwicheilande", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinee-Bissau", + "GY": "Guyana", + "HK": "Hongkong SAS Sjina", + "HN": "Honduras", + "HR": "Kroasië", + "HT": "Haïti", + "HU": "Hongarye", + "IC": "Kanariese Eilande", + "ID": "Indonesië", + "IE": "Ierland", + "IL": "Israel", + "IM": "Eiland Man", + "IN": "Indië", + "IO": "Brits-Indiese Oseaangebied", + "IQ": "Irak", + "IR": "Iran", + "IS": "Ysland", + "IT": "Italië", + "JE": "Jersey", + "JM": "Jamaika", + "JO": "Jordanië", + "JP": "Japan", + "KE": "Kenia", + "KG": "Kirgisië", + "KH": "Kambodja", + "KI": "Kiribati", + "KM": "Comore", + "KN": "St. Kitts en Nevis", + "KP": "Noord-Korea", + "KR": "Suid-Korea", + "KW": "Koeweit", + "KY": "Kaaimanseilande", + "KZ": "Kazakstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "St. Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberië", + "LS": "Lesotho", + "LT": "Litaue", + "LU": "Luxemburg", + "LV": "Letland", + "LY": "Libië", + "MA": "Marokko", + "MC": "Monaco", + "MD": "Moldowa", + "ME": "Montenegro", + "MF": "St. Martin", + "MG": "Madagaskar", + "MH": "Marshalleilande", + "MK": "Macedonië", + "ML": "Mali", + "MM": "Mianmar (Birma)", + "MN": "Mongolië", + "MO": "Macau SAS Sjina", + "MP": "Noord-Mariane-eilande", + "MQ": "Martinique", + "MR": "Mauritanië", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maledive", + "MW": "Malawi", + "MX": "Meksiko", + "MY": "Maleisië", + "MZ": "Mosambiek", + "NA": "Namibië", + "NC": "Nieu-Kaledonië", + "NE": "Niger", + "NF": "Norfolkeiland", + "NG": "Nigerië", + "NI": "Nicaragua", + "NL": "Nederland", + "NO": "Noorweë", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nieu-Seeland", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Frans-Polinesië", + "PG": "Papoea-Nieu-Guinee", + "PH": "Filippyne", + "PK": "Pakistan", + "PL": "Pole", + "PM": "St. Pierre en Miquelon", + "PN": "Pitcairneilande", + "PR": "Puerto Rico", + "PS": "Palestynse gebiede", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Katar", + "RE": "Réunion", + "RO": "Roemenië", + "RS": "Serwië", + "RU": "Rusland", + "RW": "Rwanda", + "SA": "Saoedi-Arabië", + "SB": "Salomonseilande", + "SC": "Seychelle", + "SD": "Soedan", + "SE": "Swede", + "SG": "Singapoer", + "SH": "Sint Helena", + "SI": "Slowenië", + "SJ": "Svalbard en Jan Mayen", + "SK": "Slowakye", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalië", + "SR": "Suriname", + "SS": "Suid-Soedan", + "ST": "São Tomé en Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Sirië", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Turks- en Caicoseilande", + "TD": "Tsjad", + "TF": "Franse Suidelike Gebiede", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tadjikistan", + "TK": "Tokelau", + "TL": "Oos-Timor", + "TM": "Turkmenië", + "TN": "Tunisië", + "TO": "Tonga", + "TR": "Turkye", + "TT": "Trinidad en Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzanië", + "UA": "Oekraïne", + "UG": "Uganda", + "UM": "VS klein omliggende eilande", + "UN": "verenigde nasies", + "US": "Verenigde State van Amerika", + "UY": "Uruguay", + "UZ": "Oesbekistan", + "VA": "Vatikaanstad", + "VC": "St. Vincent en die Grenadine", + "VE": "Venezuela", + "VG": "Britse Maagde-eilande", + "VI": "Amerikaanse Maagde-eilande", + "VN": "Viëtnam", + "VU": "Vanuatu", + "WF": "Wallis en Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Suid-Afrika", + "ZM": "Zambië", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ak.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ak.json new file mode 100644 index 0000000000000000000000000000000000000000..1ed3b2a89a92bb8760a3fb74aeb13f66ce8dcd53 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ak.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AD": "Andora", + "AE": "United Arab Emirates", + "AF": "Afganistan", + "AG": "Antigua ne Baabuda", + "AI": "Anguila", + "AL": "Albenia", + "AM": "Aamenia", + "AO": "Angola", + "AR": "AgyÉ›ntina", + "AS": "AmÉ›rika Samoa", + "AT": "Ɔstria", + "AU": "Ɔstrelia", + "AW": "Aruba", + "AZ": "Azebaegyan", + "BA": "Bosnia ne HÉ›zegovina", + "BB": "Baabados", + "BD": "BangladÉ›hye", + "BE": "BÉ›lgyium", + "BF": "BÉ”kina Faso", + "BG": "BÉ”lgeria", + "BH": "Baren", + "BI": "Burundi", + "BJ": "BÉ›nin", + "BM": "BÉ›muda", + "BN": "Brunae", + "BO": "Bolivia", + "BR": "Brazil", + "BS": "Bahama", + "BT": "Butan", + "BW": "BÉ”tswana", + "BY": "BÉ›larus", + "BZ": "Beliz", + "CA": "Kanada", + "CD": "Kongo (Zair)", + "CF": "Afrika Finimfin Man", + "CG": "Kongo", + "CH": "Swetzaland", + "CI": "La Côte d’Ivoire", + "CK": "Kook NsupÉ”w", + "CL": "Kyili", + "CM": "KamÉ›run", + "CN": "Kyaena", + "CO": "Kolombia", + "CR": "KÉ”sta Rika", + "CU": "Kuba", + "CV": "KepvÉ›dfo Islands", + "CY": "SaeprÉ”s", + "CZ": "KyÉ›k KurokÉ›se", + "DE": "Gyaaman", + "DJ": "Gyibuti", + "DK": "DÉ›nmak", + "DM": "DÉ”meneka", + "DO": "DÉ”meneka KurokÉ›se", + "DZ": "Ɔlgyeria", + "EC": "IkuwadÉ”", + "EE": "Æstonia", + "EG": "Nisrim", + "ER": "Æritrea", + "ES": "Spain", + "ET": "Ithiopia", + "FI": "Finland", + "FJ": "Figyi", + "FK": "FÉ”lkman Aeland", + "FM": "Maekronehyia", + "FR": "FrÉ›nkyeman", + "GA": "GabÉ”n", + "GB": "Ahendiman Nkabom", + "GD": "Grenada", + "GE": "GyÉ”gyea", + "GF": "FrÉ›nkye Gayana", + "GH": "Gaana", + "GI": "Gyebralta", + "GL": "Greenman", + "GM": "Gambia", + "GN": "Gini", + "GP": "Guwadelup", + "GQ": "Gini Ikuweta", + "GR": "Greekman", + "GT": "Guwatemala", + "GU": "Guam", + "GW": "Gini Bisaw", + "GY": "Gayana", + "HN": "HÉ”nduras", + "HR": "Krowehyia", + "HT": "Heiti", + "HU": "Hangari", + "ID": "IndÉ”nehyia", + "IE": "Aereland", + "IL": "Israel", + "IN": "India", + "IO": "Britenfo HÉ”n Man WÉ” India Po No Mu", + "IQ": "Irak", + "IR": "Iran", + "IS": "Aesland", + "IT": "Itali", + "JM": "Gyameka", + "JO": "GyÉ”dan", + "JP": "Gyapan", + "KE": "KÉ›nya", + "KG": "Kɛɛgestan", + "KH": "Kambodia", + "KI": "Kiribati", + "KM": "KÉ”mÉ”rÉ”s", + "KN": "Saint Kitts ne NÉ›ves", + "KP": "Etifi Koria", + "KR": "Anaafo Koria", + "KW": "Kuwete", + "KY": "Kemanfo Islands", + "KZ": "Kazakstan", + "LA": "Laos", + "LB": "LÉ›banÉ”n", + "LC": "Saint Lucia", + "LI": "Lektenstaen", + "LK": "Sri Lanka", + "LR": "Laeberia", + "LS": "LÉ›sutu", + "LT": "Lituwenia", + "LU": "LaksembÉ›g", + "LV": "Latvia", + "LY": "Libya", + "MA": "Moroko", + "MC": "MÉ”nako", + "MD": "MÉ”ldova", + "MG": "Madagaska", + "MH": "Marshall Islands", + "MK": "Masedonia", + "ML": "Mali", + "MM": "Miyanma", + "MN": "MÉ”ngolia", + "MP": "Northern Mariana Islands", + "MQ": "Matinik", + "MR": "MÉ”retenia", + "MS": "Mantserat", + "MT": "MÉ”lta", + "MU": "MÉ”rehyeÉ”s", + "MV": "Maldives", + "MW": "Malawi", + "MX": "MÉ›ksiko", + "MY": "Malehyia", + "MZ": "Mozambik", + "NA": "Namibia", + "NC": "Kaledonia Foforo", + "NE": "NigyÉ›", + "NF": "NÉ”folk Aeland", + "NG": "Naegyeria", + "NI": "Nekaraguwa", + "NL": "NÉ›dÉ›land", + "NO": "Nɔɔwe", + "NP": "NÉ›pÉ”l", + "NR": "Naworu", + "NU": "Niyu", + "NZ": "Ziland Foforo", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "FrÉ›nkye PÉ”lenehyia", + "PG": "Papua Guinea Foforo", + "PH": "Philippines", + "PK": "Pakistan", + "PL": "Poland", + "PM": "Saint Pierre ne Miquelon", + "PN": "Pitcairn", + "PR": "PuÉ›to Riko", + "PS": "Palestaen West Bank ne Gaza", + "PT": "PÉ”tugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Kata", + "RE": "ReyuniÉ”n", + "RO": "Romenia", + "RU": "RÉ”hyea", + "RW": "Rwanda", + "SA": "Saudi Arabia", + "SB": "Solomon Islands", + "SC": "SeyhyÉ›l", + "SD": "Sudan", + "SE": "Sweden", + "SG": "SingapÉ”", + "SH": "Saint Helena", + "SI": "Slovinia", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "ST": "São Tomé and Príncipe", + "SV": "Æl SalvadÉ”", + "SY": "Siria", + "SZ": "Swaziland", + "TC": "Turks ne Caicos Islands", + "TD": "Kyad", + "TG": "Togo", + "TH": "Taeland", + "TJ": "Tajikistan", + "TK": "Tokelau", + "TL": "TimÉ” Boka", + "TM": "TÉ›kmÉ›nistan", + "TN": "Tunihyia", + "TO": "Tonga", + "TR": "Tɛɛki", + "TT": "Trinidad ne Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukren", + "UG": "Uganda", + "US": "AmÉ›rika", + "UY": "Yurugwae", + "UZ": "UzbÉ›kistan", + "VA": "Vatican Man", + "VC": "Saint Vincent ne Grenadines", + "VE": "Venezuela", + "VG": "Britainfo Virgin Islands", + "VI": "AmÉ›rika Virgin Islands", + "VN": "ViÉ›tnam", + "VU": "Vanuatu", + "WF": "Wallis ne Futuna", + "WS": "Samoa", + "YE": "YÉ›men", + "YT": "MayÉ”te", + "ZA": "Afrika Anaafo", + "ZM": "Zambia", + "ZW": "Zembabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/am.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/am.json new file mode 100644 index 0000000000000000000000000000000000000000..087aa8e454f28c3ff1b56cc1fef32f921c1b1257 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/am.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "አሴንሽን ደሴት", + "AD": "አንዶራ", + "AE": "የተባበሩት ዓረብ ኤáˆáˆ¬á‰µáˆµ", + "AF": "አáጋኒስታን", + "AG": "አንቲጓ እና ባሩዳ", + "AI": "አንጉኢላ", + "AL": "አáˆá‰£áŠ’á‹«", + "AM": "አርሜኒያ", + "AO": "አንáŒáˆ‹", + "AQ": "አንታርክቲካ", + "AR": "አርጀንቲና", + "AS": "የአሜሪካ ሳሞአ", + "AT": "ኦስትሪያ", + "AU": "አá‹áˆµá‰µáˆ«áˆá‹«", + "AW": "አሩባ", + "AX": "የአላንድ ደሴቶች", + "AZ": "አዘርባጃን", + "BA": "ቦስኒያ እና ሄርዞጎቪኒያ", + "BB": "ባርቤዶስ", + "BD": "ባንáŒáˆ‹á‹²áˆ½", + "BE": "ቤáˆáŒ„áˆ", + "BF": "ቡርኪና á‹áˆ¶", + "BG": "ቡáˆáŒŒáˆªá‹«", + "BH": "ባህሬን", + "BI": "ብሩንዲ", + "BJ": "ቤኒን", + "BL": "ቅዱስ በርቴሎሜ", + "BM": "ቤርሙዳ", + "BN": "ብሩኒ", + "BO": "ቦሊቪያ", + "BQ": "የካሪቢያን ኔዘርላንድስ", + "BR": "ብራዚáˆ", + "BS": "ባሃማስ", + "BT": "ቡህታን", + "BW": "ቦትስዋና", + "BY": "ቤላሩስ", + "BZ": "ቤሊዘ", + "CA": "ካናዳ", + "CC": "ኮኮስ(ኬሊንáŒ) ደሴቶች", + "CD": "ኮንጎ-ኪንሻሳ", + "CF": "የመካከለኛዠአáሪካ ሪáብሊክ", + "CG": "ኮንጎ ብራዛቪáˆ", + "CH": "ስዊዘርላንድ", + "CI": "ኮት ዲቯር", + "CK": "ኩክ ደሴቶች", + "CL": "ቺሊ", + "CM": "ካሜሩን", + "CN": "ቻይና", + "CO": "ኮሎáˆá‰¢á‹«", + "CR": "ኮስታ ሪካ", + "CU": "ኩባ", + "CV": "ኬᕠቬርዴ", + "CW": "ኩራሳዎ", + "CX": "የገና ደሴት", + "CY": "ሳይá•ረስ", + "CZ": "ቼክ ሪá‘ብሊክ", + "DE": "ጀርመን", + "DG": "ዲዬጎ ጋርሺያ", + "DJ": "ጂቡቲ", + "DK": "ዴንማርክ", + "DM": "ዶሚኒካ", + "DO": "ዶሚኒክ ሪá‘ብሊክ", + "DZ": "አáˆáŒ„ሪያ", + "EA": "ሴኡታና ሜሊላ", + "EC": "ኢኳዶር", + "EE": "ኤስቶኒያ", + "EG": "áŒá‰¥áŒ½", + "EH": "áˆá‹•ራባዊ ሳህራ", + "ER": "ኤርትራ", + "ES": "ስá”ን", + "ET": "ኢትዮጵያ", + "FI": "áŠáŠ•áˆ‹áŠ•á‹µ", + "FJ": "áŠáŒ‚", + "FK": "የáŽáŠ­áˆ‹áŠ•á‹µ ደሴቶች", + "FM": "ሚክሮኔዢያ", + "FO": "የá‹áˆ® ደሴቶች", + "FR": "áˆáˆ¨áŠ•áˆ³á‹­", + "GA": "ጋቦን", + "GB": "እንáŒáˆŠá‹", + "GD": "áŒáˆ¬áŠ“á‹³", + "GE": "ጆርጂያ", + "GF": "የáˆáˆ¨áŠ•áˆ³á‹­ ጉዊአና", + "GG": "ጉርáŠáˆ²", + "GH": "ጋና", + "GI": "ጂብራáˆá‰°áˆ­", + "GL": "áŒáˆªáŠ•áˆ‹áŠ•á‹µ", + "GM": "ጋáˆá‰¢á‹«", + "GN": "ጊኒ", + "GP": "ጉዋደሉá•", + "GQ": "ኢኳቶሪያሠጊኒ", + "GR": "áŒáˆªáŠ­", + "GS": "ደቡብ ጆርጂያ እና የደቡብ ሳንድዊች ደሴቶች", + "GT": "ጉዋቲማላ", + "GU": "ጉዋáˆ", + "GW": "ጊኒ ቢሳኦ", + "GY": "ጉያና", + "HK": "ሆንጠኮንጠáˆá‹© የአስተዳደር ክáˆáˆ ቻይና", + "HN": "ሆንዱራስ", + "HR": "ክሮኤሽያ", + "HT": "ሀይቲ", + "HU": "ሀንጋሪ", + "IC": "የካናሪ ደሴቶች", + "ID": "ኢንዶኔዢያ", + "IE": "አየርላንድ", + "IL": "እስራኤáˆ", + "IM": "አይሠኦá ማን", + "IN": "ህንድ", + "IO": "የብሪታኒያ ህንድ á‹á‰‚ያኖስ áŒá‹›á‰µ", + "IQ": "ኢራቅ", + "IR": "ኢራን", + "IS": "አይስላንድ", + "IT": "ጣሊያን", + "JE": "ጀርሲ", + "JM": "ጃማይካ", + "JO": "ጆርዳን", + "JP": "ጃá“ን", + "KE": "ኬንያ", + "KG": "ኪርጊስታን", + "KH": "ካáˆá‰¦á‹²á‹«", + "KI": "ኪሪባቲ", + "KM": "ኮሞሮስ", + "KN": "ቅዱስ ኪትስ እና ኔቪስ", + "KP": "ሰሜን ኮሪያ", + "KR": "ደቡብ ኮሪያ", + "KW": "ክዌት", + "KY": "ካይማን ደሴቶች", + "KZ": "ካዛኪስታን", + "LA": "ላኦስ", + "LB": "ሊባኖስ", + "LC": "ሴንት ሉቺያ", + "LI": "ሊችተንስታይን", + "LK": "ሲሪላንካ", + "LR": "ላይቤሪያ", + "LS": "ሌሶቶ", + "LT": "ሊቱዌኒያ", + "LU": "ሉክሰáˆá‰ áˆ­áŒ", + "LV": "ላትቪያ", + "LY": "ሊቢያ", + "MA": "ሞሮኮ", + "MC": "ሞናኮ", + "MD": "ሞáˆá‹¶á‰«", + "ME": "ሞንተኔáŒáˆ®", + "MF": "ሴንት ማርቲን", + "MG": "ማዳጋስካር", + "MH": "ማርሻሠአይላንድ", + "MK": "መቄዶንያ", + "ML": "ማሊ", + "MM": "ማይናማር(በርማ)", + "MN": "ሞንጎሊያ", + "MO": "ማካኡ áˆá‹© የአስተዳደር ክáˆáˆ ቻይና", + "MP": "የሰሜናዊ ማሪያና ደሴቶች", + "MQ": "ማርቲኒክ", + "MR": "ሞሪቴኒያ", + "MS": "ሞንትሴራት", + "MT": "ማáˆá‰³", + "MU": "ሞሪሸስ", + "MV": "ማáˆá‹²á‰­áˆµ", + "MW": "ማላዊ", + "MX": "ሜክሲኮ", + "MY": "ማሌዢያ", + "MZ": "ሞዛáˆá‰¢áŠ­", + "NA": "ናሚቢያ", + "NC": "ኒዠካሌዶኒያ", + "NE": "ኒጀር", + "NF": "ኖርáŽáˆáŠ­ ደሴት", + "NG": "ናይጄሪያ", + "NI": "ኒካራጓ", + "NL": "ኔዘርላንድ", + "NO": "ኖርዌይ", + "NP": "ኔá“áˆ", + "NR": "ናኡሩ", + "NU": "ኒኡይ", + "NZ": "ኒዠዚላንድ", + "OM": "ኦማን", + "PA": "á“ናማ", + "PE": "á”ሩ", + "PF": "የáˆáˆ¨áŠ•áˆ³á‹­ á–ሊኔዢያ", + "PG": "á“á‘á‹‹ ኒዠጊኒ", + "PH": "áŠáˆŠá’ንስ", + "PK": "á“ኪስታን", + "PL": "á–ላንድ", + "PM": "ቅዱስ á’ዬር እና ሚኩኤሎን", + "PN": "á’ትካኢርን አይስላንድ", + "PR": "á–ርታ ሪኮ", + "PS": "የááˆáˆµáŒ¤áˆ áŒá‹›á‰µ", + "PT": "á–ርቱጋáˆ", + "PW": "á“ላá‹", + "PY": "á“ራጓይ", + "QA": "ኳታር", + "RE": "ሪዩኒየን", + "RO": "ሮሜኒያ", + "RS": "ሰርብያ", + "RU": "ራሽያ", + "RW": "ሩዋንዳ", + "SA": "ሳá‹á‹µáŠ áˆ¨á‰¢á‹«", + "SB": "ሰሎሞን ደሴት", + "SC": "ሲሼáˆáˆµ", + "SD": "ሱዳን", + "SE": "ስዊድን", + "SG": "ሲንጋá–ር", + "SH": "ሴንት ሄለና", + "SI": "ስሎቬኒያ", + "SJ": "ስቫáˆá‰£áˆ­á‹µ እና ጃን ማየን", + "SK": "ስሎቫኪያ", + "SL": "ሴራሊዮን", + "SM": "ሳን ማሪኖ", + "SN": "ሴኔጋáˆ", + "SO": "ሱማሌ", + "SR": "ሱሪናáˆ", + "SS": "ደቡብ ሱዳን", + "ST": "ሳኦ ቶሜ እና á•ሪንሲá”", + "SV": "ኤሠሳáˆá‰«á‹¶áˆ­", + "SX": "ሲንት ማርተን", + "SY": "ሲሪያ", + "SZ": "ሱዋዚላንድ", + "TA": "ትሪስታን ዲ ኩንሃ", + "TC": "የቱርኮችና የካኢኮስ ደሴቶች", + "TD": "ቻድ", + "TF": "የáˆáˆ¨áŠ•áˆ³á‹­ ደቡባዊ áŒá‹›á‰¶á‰½", + "TG": "ቶáŒ", + "TH": "ታይላንድ", + "TJ": "ታጃኪስታን", + "TK": "ቶክላá‹", + "TL": "áˆáˆµáˆ«á‰… ሌስት", + "TM": "ቱርክሜኒስታን", + "TN": "ቱኒዚያ", + "TO": "ቶንጋ", + "TR": "ቱርክ", + "TT": "ትሪናዳድ እና ቶቤጎ", + "TV": "ቱቫሉ", + "TW": "ታይዋን", + "TZ": "ታንዛኒያ", + "UA": "ዩክሬን", + "UG": "ዩጋንዳ", + "UM": "የዩ ኤስ ጠረá ላይ ያሉ ደሴቶች", + "UN": "የተባበሩት መንáŒáˆµá‰³á‰µ", + "US": "ዩናይትድ ስቴትስ", + "UY": "ኡራጓይ", + "UZ": "ኡá‹á‰¤áŠªáˆµá‰³áŠ•", + "VA": "ቫቲካን ከተማ", + "VC": "ቅዱስ ቪንሴንት እና áŒáˆ¬áŠ“á‹²áŠ•áˆµ", + "VE": "ቬንዙዌላ", + "VG": "የእንáŒáˆŠá‹ ቨርጂን ደሴቶች", + "VI": "የአሜሪካ ቨርጂን ደሴቶች", + "VN": "ቬትናáˆ", + "VU": "ቫኑአቱ", + "WF": "ዋሊስ እና á‰á‰±áŠ“ ደሴቶች", + "WS": "ሳሞአ", + "XK": "ኮሶቮ", + "YE": "የመን", + "YT": "ሜይኦቴ", + "ZA": "ደቡብ አáሪካ", + "ZM": "á‹›áˆá‰¢á‹«", + "ZW": "ዚáˆá‰§á‰¤" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ar.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ar.json new file mode 100644 index 0000000000000000000000000000000000000000..6f678699f8c830806c9e671c182391db468b2d50 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ar.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "جزيرة أسينشيون", + "AD": "أندورا", + "AE": "الإمارات العربية المتحدة", + "AF": "Ø£ÙØºØ§Ù†Ø³ØªØ§Ù†", + "AG": "أنتيغوا وبربودا", + "AI": "أنغويلا", + "AL": "ألبانيا", + "AM": "أرمينيا", + "AO": "أنغولا", + "AQ": "أنتاركتيكا", + "AR": "الأرجنتين", + "AS": "ساموا الأمريكية", + "AT": "النمسا", + "AU": "أستراليا", + "AW": "أروبا", + "AX": "جزر آلاند", + "AZ": "أذربيجان", + "BA": "البوسنة والهرسك", + "BB": "بربادوس", + "BD": "بنغلاديش", + "BE": "بلجيكا", + "BF": "بوركينا ÙØ§Ø³Ùˆ", + "BG": "بلغاريا", + "BH": "البحرين", + "BI": "بوروندي", + "BJ": "بنين", + "BL": "سان بارتليمي", + "BM": "برمودا", + "BN": "بروناي", + "BO": "بوليÙيا", + "BQ": "هولندا الكاريبية", + "BR": "البرازيل", + "BS": "البهاما", + "BT": "بوتان", + "BW": "بتسوانا", + "BY": "بيلاروس", + "BZ": "بليز", + "CA": "كندا", + "CC": "جزر كوكوس (كيلينغ)", + "CD": "الكونغو - كينشاسا", + "CF": "جمهورية Ø£ÙØ±ÙŠÙ‚يا الوسطى", + "CG": "الكونغو - برازاÙيل", + "CH": "سويسرا", + "CI": "ساحل العاج", + "CK": "جزر كوك", + "CL": "تشيلي", + "CM": "الكاميرون", + "CN": "الصين", + "CO": "كولومبيا", + "CR": "كوستاريكا", + "CU": "كوبا", + "CV": "الرأس الأخضر", + "CW": "كوراساو", + "CX": "جزيرة الكريسماس", + "CY": "قبرص", + "CZ": "جمهورية التشيك", + "DE": "ألمانيا", + "DG": "دييغو غارسيا", + "DJ": "جيبوتي", + "DK": "الدانمرك", + "DM": "دومينيكا", + "DO": "جمهورية الدومينيكان", + "DZ": "الجزائر", + "EA": "سيوتا وميليلا", + "EC": "الإكوادور", + "EE": "إستونيا", + "EG": "مصر", + "EH": "الصحراء الغربية", + "ER": "إريتريا", + "ES": "إسبانيا", + "ET": "إثيوبيا", + "FI": "Ùنلندا", + "FJ": "Ùيجي", + "FK": "جزر Ùوكلاند", + "FM": "ميكرونيزيا", + "FO": "جزر ÙØ§Ø±Ùˆ", + "FR": "ÙØ±Ù†Ø³Ø§", + "GA": "الغابون", + "GB": "المملكة المتحدة", + "GD": "غرينادا", + "GE": "جورجيا", + "GF": "غويانا Ø§Ù„ÙØ±Ù†Ø³ÙŠØ©", + "GG": "غيرنزي", + "GH": "غانا", + "GI": "جبل طارق", + "GL": "غرينلاند", + "GM": "غامبيا", + "GN": "غينيا", + "GP": "غوادلوب", + "GQ": "غينيا الاستوائية", + "GR": "اليونان", + "GS": "جورجيا الجنوبية وجزر ساندويتش الجنوبية", + "GT": "غواتيمالا", + "GU": "غوام", + "GW": "غينيا بيساو", + "GY": "غيانا", + "HK": "هونغ كونغ الصينية", + "HN": "هندوراس", + "HR": "كرواتيا", + "HT": "هايتي", + "HU": "هنغاريا", + "IC": "جزر الكناري", + "ID": "إندونيسيا", + "IE": "أيرلندا", + "IL": "إسرائيل", + "IM": "جزيرة مان", + "IN": "الهند", + "IO": "الإقليم البريطاني ÙÙŠ المحيط الهندي", + "IQ": "العراق", + "IR": "إيران", + "IS": "أيسلندا", + "IT": "إيطاليا", + "JE": "جيرسي", + "JM": "جامايكا", + "JO": "الأردن", + "JP": "اليابان", + "KE": "كينيا", + "KG": "قيرغيزستان", + "KH": "كمبوديا", + "KI": "كيريباتي", + "KM": "جزر القمر", + "KN": "سانت كيتس ونيÙيس", + "KP": "كوريا الشمالية", + "KR": "كوريا الجنوبية", + "KW": "الكويت", + "KY": "جزر كايمان", + "KZ": "كازاخستان", + "LA": "لاوس", + "LB": "لبنان", + "LC": "سانت لوسيا", + "LI": "ليختنشتاين", + "LK": "سريلانكا", + "LR": "ليبيريا", + "LS": "ليسوتو", + "LT": "ليتوانيا", + "LU": "لوكسمبورغ", + "LV": "لاتÙيا", + "LY": "ليبيا", + "MA": "المغرب", + "MC": "موناكو", + "MD": "Ù…ÙˆÙ„Ø¯ÙˆÙØ§", + "ME": "الجبل الأسود", + "MF": "سانت مارتن", + "MG": "مدغشقر", + "MH": "جزر مارشال", + "MK": "مقدونيا", + "ML": "مالي", + "MM": "ميانمار (بورما)", + "MN": "منغوليا", + "MO": "مكاو الصينية (منطقة إدارية خاصة)", + "MP": "جزر ماريانا الشمالية", + "MQ": "جزر المارتينيك", + "MR": "موريتانيا", + "MS": "مونتسرات", + "MT": "مالطا", + "MU": "موريشيوس", + "MV": "جزر المالديÙ", + "MW": "ملاوي", + "MX": "المكسيك", + "MY": "ماليزيا", + "MZ": "موزمبيق", + "NA": "ناميبيا", + "NC": "كاليدونيا الجديدة", + "NE": "النيجر", + "NF": "جزيرة نورÙولك", + "NG": "نيجيريا", + "NI": "نيكاراغوا", + "NL": "هولندا", + "NO": "النرويج", + "NP": "نيبال", + "NR": "ناورو", + "NU": "نيوي", + "NZ": "نيوزيلندا", + "OM": "عÙمان", + "PA": "بنما", + "PE": "بيرو", + "PF": "بولينيزيا Ø§Ù„ÙØ±Ù†Ø³ÙŠØ©", + "PG": "بابوا غينيا الجديدة", + "PH": "الÙلبين", + "PK": "باكستان", + "PL": "بولندا", + "PM": "سانت بيير وميكولون", + "PN": "جزر بيتكيرن", + "PR": "بورتوريكو", + "PS": "الأراضي الÙلسطينية", + "PT": "البرتغال", + "PW": "بالاو", + "PY": "باراغواي", + "QA": "قطر", + "RE": "روينيون", + "RO": "رومانيا", + "RS": "صربيا", + "RU": "روسيا", + "RW": "رواندا", + "SA": "المملكة العربية السعودية", + "SB": "جزر سليمان", + "SC": "سيشل", + "SD": "السودان", + "SE": "السويد", + "SG": "سنغاÙورة", + "SH": "سانت هيلانة", + "SI": "سلوÙينيا", + "SJ": "Ø³ÙØ§Ù„بارد وجان مايان", + "SK": "Ø³Ù„ÙˆÙØ§ÙƒÙŠØ§", + "SL": "سيراليون", + "SM": "سان مارينو", + "SN": "السنغال", + "SO": "الصومال", + "SR": "سورينام", + "SS": "جنوب السودان", + "ST": "ساو تومي وبرينسيبي", + "SV": "Ø§Ù„Ø³Ù„ÙØ§Ø¯ÙˆØ±", + "SX": "سينت مارتن", + "SY": "سوريا", + "SZ": "سوازيلاند", + "TA": "تريستان دي كونها", + "TC": "جزر توركس وكايكوس", + "TD": "تشاد", + "TF": "الأقاليم الجنوبية Ø§Ù„ÙØ±Ù†Ø³ÙŠØ©", + "TG": "توغو", + "TH": "تايلاند", + "TJ": "طاجيكستان", + "TK": "توكيلو", + "TL": "تيمور- ليشتي", + "TM": "تركمانستان", + "TN": "تونس", + "TO": "تونغا", + "TR": "تركيا", + "TT": "ترينيداد وتوباغو", + "TV": "ØªÙˆÙØ§Ù„Ùˆ", + "TW": "تايوان", + "TZ": "تنزانيا", + "UA": "أوكرانيا", + "UG": "أوغندا", + "UM": "جزر الولايات المتحدة النائية", + "UN": "الأمم المتحدة", + "US": "الولايات المتحدة", + "UY": "أورغواي", + "UZ": "أوزبكستان", + "VA": "Ø§Ù„ÙØ§ØªÙŠÙƒØ§Ù†", + "VC": "سانت Ùنسنت وجزر غرينادين", + "VE": "Ùنزويلا", + "VG": "جزر Ùيرجن البريطانية", + "VI": "جزر Ùيرجن التابعة للولايات المتحدة", + "VN": "Ùيتنام", + "VU": "ÙØ§Ù†ÙˆØ§ØªÙˆ", + "WF": "جزر والس ÙˆÙوتونا", + "WS": "ساموا", + "XK": "كوسوÙÙˆ", + "YE": "اليمن", + "YT": "مايوت", + "ZA": "جنوب Ø£ÙØ±ÙŠÙ‚يا", + "ZM": "زامبيا", + "ZW": "زيمبابوي" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ar_LY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ar_LY.json new file mode 100644 index 0000000000000000000000000000000000000000..b98f76dac1ca0ed148eeb2fe4119a08f4319d45f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ar_LY.json @@ -0,0 +1,8 @@ +{ + "Version": "2.1.27.99", + "Names": { + "EA": "سبتة ومليلية", + "MS": "مونتيسيرات", + "UY": "أوروغواي" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ar_SA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ar_SA.json new file mode 100644 index 0000000000000000000000000000000000000000..9caf578d2f51a7884167606ae2bfe011acd11bdc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ar_SA.json @@ -0,0 +1,10 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BS": "جزر البهاما", + "EA": "سبتة ومليلية", + "MS": "مونتيسيرات", + "PM": "سان بيير وميكولون", + "UY": "أوروغواي" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/as.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/as.json new file mode 100644 index 0000000000000000000000000000000000000000..9c03a5308034dc012d9cbd63e70c5399fe839b21 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/as.json @@ -0,0 +1,19 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AQ": "à¦à¦¨à§à¦Ÿà¦¾à§°à§à¦Ÿà¦¿à¦•া", + "BR": "বà§à§°à¦¾à¦œà¦¿à¦²", + "CN": "চীন", + "DE": "জাৰà§à¦®à¦¾à¦¨à¦¿", + "FR": "ফà§à§°à¦¾à¦¨à§à¦¸", + "GB": "সংযà§à¦•à§à¦¤ ৰাজà§à¦¯", + "GS": "দকà§à¦·à¦¿à¦£ জৰà§à¦œà¦¿à¦¯à¦¼à¦¾ আৰৠদকà§à¦·à¦¿à¦£ চেণà§à¦¡à§±à¦¿à¦šà§â€Œ দà§à¦¬à§€à¦ª", + "IN": "ভাৰত", + "IO": "বà§à§°à¦¿à¦Ÿà¦¿à¦¶à§à¦¬ ইণà§à¦¡à¦¿à¦¯à¦¼à¦¾à¦¨ মহাসাগৰৰ অঞà§à¦šà¦²", + "IT": "ইটালি", + "JP": "জাপান", + "RU": "à§°à§à¦š", + "TF": "দকà§à¦·à¦¿à¦£ ফà§à§°à¦¾à¦¨à§à¦¸à§° অঞà§à¦šà¦²", + "US": "যà§à¦•à§à¦¤à§°à¦¾à¦·à§à¦Ÿà§à§°" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/az.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/az.json new file mode 100644 index 0000000000000000000000000000000000000000..4089664628660f50670d416bc3183a8dc882e6a2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/az.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Askenson adası", + "AD": "Andorra", + "AE": "BirləşmiÅŸ ÆrÉ™b ÆmirliklÉ™ri", + "AF": "Æfqanıstan", + "AG": "Antiqua vÉ™ Barbuda", + "AI": "Angilya", + "AL": "Albaniya", + "AM": "ErmÉ™nistan", + "AO": "Anqola", + "AQ": "Antarktika", + "AR": "Argentina", + "AS": "Amerika Samoası", + "AT": "Avstriya", + "AU": "Avstraliya", + "AW": "Aruba", + "AX": "Aland adaları", + "AZ": "AzÉ™rbaycan", + "BA": "Bosniya vÉ™ Herseqovina", + "BB": "Barbados", + "BD": "BanqladeÅŸ", + "BE": "Belçika", + "BF": "Burkina Faso", + "BG": "Bolqarıstan", + "BH": "BÉ™hreyn", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Sent-Bartelemi", + "BM": "Bermud adaları", + "BN": "Bruney", + "BO": "Boliviya", + "BQ": "Karib Niderlandı", + "BR": "Braziliya", + "BS": "Baham adaları", + "BT": "Butan", + "BW": "Botsvana", + "BY": "Belarus", + "BZ": "Beliz", + "CA": "Kanada", + "CC": "Kokos (Kilinq) adaları", + "CD": "Konqo - KinÅŸasa", + "CF": "MÉ™rkÉ™zi Afrika Respublikası", + "CG": "Konqo - Brazzavil", + "CH": "İsveçrÉ™", + "CI": "Kotd’ivuar", + "CK": "Kuk adaları", + "CL": "Çili", + "CM": "Kamerun", + "CN": "Çin", + "CO": "Kolumbiya", + "CR": "Kosta Rika", + "CU": "Kuba", + "CV": "Kabo-Verde", + "CW": "Kurasao", + "CX": "Milad adası", + "CY": "Kipr", + "CZ": "Çex Respublikası", + "DE": "Almaniya", + "DG": "Dieqo Qarsiya", + "DJ": "Cibuti", + "DK": "Danimarka", + "DM": "Dominika", + "DO": "Dominikan Respublikası", + "DZ": "ÆlcÉ™zair", + "EA": "Seuta vÉ™ Melilya", + "EC": "Ekvador", + "EE": "Estoniya", + "EG": "Misir", + "EH": "QÉ™rbi Saxara", + "ER": "Eritreya", + "ES": "İspaniya", + "ET": "Efiopiya", + "FI": "Finlandiya", + "FJ": "Fici", + "FK": "Folklend adaları", + "FM": "Mikroneziya", + "FO": "Farer adaları", + "FR": "Fransa", + "GA": "Qabon", + "GB": "BirləşmiÅŸ Krallıq", + "GD": "Qrenada", + "GE": "Gürcüstan", + "GF": "Fransa Qvianası", + "GG": "Gernsi", + "GH": "Qana", + "GI": "CÉ™bÉ™llütariq", + "GL": "Qrenlandiya", + "GM": "Qambiya", + "GN": "Qvineya", + "GP": "Qvadelupa", + "GQ": "Ekvatorial Qvineya", + "GR": "Yunanıstan", + "GS": "CÉ™nubi Corciya vÉ™ CÉ™nubi Sendviç adaları", + "GT": "Qvatemala", + "GU": "Quam", + "GW": "Qvineya-Bisau", + "GY": "Qayana", + "HK": "Honq Konq Xüsusi İnzibati Ærazi Çin", + "HN": "Honduras", + "HR": "Xorvatiya", + "HT": "Haiti", + "HU": "Macarıstan", + "IC": "Kanar adaları", + "ID": "İndoneziya", + "IE": "İrlandiya", + "IL": "İsrail", + "IM": "Men adası", + "IN": "Hindistan", + "IO": "Britaniyanın Hind Okeanı Ærazisi", + "IQ": "İraq", + "IR": "İran", + "IS": "İslandiya", + "IT": "İtaliya", + "JE": "Cersi", + "JM": "Yamayka", + "JO": "İordaniya", + "JP": "Yaponiya", + "KE": "Keniya", + "KG": "Qırğızıstan", + "KH": "Kamboca", + "KI": "Kiribati", + "KM": "Komor adaları", + "KN": "Sent-Kits vÉ™ Nevis", + "KP": "Åžimali Koreya", + "KR": "CÉ™nubi Koreya", + "KW": "Küveyt", + "KY": "Kayman adaları", + "KZ": "Qazaxıstan", + "LA": "Laos", + "LB": "Livan", + "LC": "Sent-Lusiya", + "LI": "LixtenÅŸteyn", + "LK": "Åžri-Lanka", + "LR": "Liberiya", + "LS": "Lesoto", + "LT": "Litva", + "LU": "Lüksemburq", + "LV": "Latviya", + "LY": "Liviya", + "MA": "MÉ™rakeÅŸ", + "MC": "Monako", + "MD": "Moldova", + "ME": "Monteneqro", + "MF": "Sent Martin", + "MG": "Madaqaskar", + "MH": "MarÅŸal adaları", + "MK": "Makedoniya", + "ML": "Mali", + "MM": "Myanma", + "MN": "Monqolustan", + "MO": "Makao Xüsusi İnzibati Ærazi Çin", + "MP": "Åžimali Marian adaları", + "MQ": "Martinik", + "MR": "Mavritaniya", + "MS": "Monserat", + "MT": "Malta", + "MU": "Mavriki", + "MV": "Maldiv adaları", + "MW": "Malavi", + "MX": "Meksika", + "MY": "Malayziya", + "MZ": "Mozambik", + "NA": "Namibiya", + "NC": "Yeni Kaledoniya", + "NE": "Niger", + "NF": "Norfolk adası", + "NG": "Nigeriya", + "NI": "Nikaraqua", + "NL": "Niderland", + "NO": "Norveç", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Yeni Zelandiya", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Fransa Polineziyası", + "PG": "Papua-Yeni Qvineya", + "PH": "Filippin", + "PK": "Pakistan", + "PL": "PolÅŸa", + "PM": "MüqÉ™ddÉ™s Pyer vÉ™ Mikelon", + "PN": "Pitkern adaları", + "PR": "Puerto Riko", + "PS": "FÉ™lÉ™stin ÆrazilÉ™ri", + "PT": "Portuqaliya", + "PW": "Palau", + "PY": "Paraqvay", + "QA": "QÉ™tÉ™r", + "RE": "Reyunyon", + "RO": "Rumıniya", + "RS": "Serbiya", + "RU": "Rusiya", + "RW": "Ruanda", + "SA": "SÉ™udiyyÉ™ ÆrÉ™bistanı", + "SB": "Solomon adaları", + "SC": "SeyÅŸel adaları", + "SD": "Sudan", + "SE": "İsveç", + "SG": "Sinqapur", + "SH": "MüqÉ™ddÉ™s Yelena", + "SI": "Sloveniya", + "SJ": "Svalbard vÉ™ Yan-Mayen", + "SK": "Slovakiya", + "SL": "Syerra-Leone", + "SM": "San-Marino", + "SN": "Seneqal", + "SO": "Somali", + "SR": "Surinam", + "SS": "CÉ™nubi Sudan", + "ST": "San-Tome vÉ™ Prinsipi", + "SV": "Salvador", + "SX": "Sint-Marten", + "SY": "Suriya", + "SZ": "Svazilend", + "TA": "Tristan da Kunya", + "TC": "Törks vÉ™ Kaykos adaları", + "TD": "Çad", + "TF": "Fransanın CÉ™nub ÆrazilÉ™ri", + "TG": "Toqo", + "TH": "Tailand", + "TJ": "Tacikistan", + "TK": "Tokelau", + "TL": "Şərqi Timor", + "TM": "TürkmÉ™nistan", + "TN": "Tunis", + "TO": "Tonqa", + "TR": "TürkiyÉ™", + "TT": "Trinidad vÉ™ Tobaqo", + "TV": "Tuvalu", + "TW": "Tayvan", + "TZ": "Tanzaniya", + "UA": "Ukrayna", + "UG": "Uqanda", + "UM": "ABÅž-a baÄŸlı kiçik adacıqlar", + "UN": "BirləşmiÅŸ MillÉ™tlÉ™r Təşkilatı", + "US": "Amerika BirləşmiÅŸ Åžtatları", + "UY": "Uruqvay", + "UZ": "ÖzbÉ™kistan", + "VA": "Vatikan", + "VC": "Sent-Vinsent vÉ™ QrenadinlÉ™r", + "VE": "Venesuela", + "VG": "Britaniyanın Virgin adaları", + "VI": "ABÅž Virgin adaları", + "VN": "Vyetnam", + "VU": "Vanuatu", + "WF": "Uollis vÉ™ Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "YÉ™mÉ™n", + "YT": "Mayot", + "ZA": "CÉ™nub Afrika", + "ZM": "Zambiya", + "ZW": "Zimbabve" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/az_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/az_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..4db155af0955dd3738f8aa7b592710fcc9bcffda --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/az_Cyrl.json @@ -0,0 +1,254 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AC": "ÐÑкенÑон адаÑÑ‹", + "AD": "Ðндорра", + "AE": "Бирләшмиш Әрәб Әмирликләри", + "AF": "ӘфганыÑтан", + "AG": "Ðнтигуа вә Барбуда", + "AI": "ÐнÒилја", + "AL": "Ðлбанија", + "AM": "ЕрмәниÑтан", + "AO": "Ðнгола", + "AQ": "Ðнтарктика", + "AR": "ÐÑ€Òентина", + "AS": "Ðмерика СамоаÑÑ‹", + "AT": "ÐвÑтрија", + "AU": "ÐвÑтралија", + "AW": "Ðруба", + "AX": "Ðланд адалары", + "AZ": "Ðзәрбајҹан", + "BA": "БоÑнија вә ҺерÑеговина", + "BB": "БарбадоÑ", + "BD": "Бангладеш", + "BE": "Белчика", + "BF": "Буркина ФаÑо", + "BG": "БолгарыÑтан", + "BH": "Бәһрејн", + "BI": "Бурунди", + "BJ": "Бенин", + "BL": "Сент-Бартелеми", + "BM": "Бермуд адалары", + "BN": "Брунеј", + "BO": "Боливија", + "BR": "Бразилија", + "BS": "Баһам адалары", + "BT": "Бутан", + "BW": "БотÑвана", + "BY": "БеларуÑ", + "BZ": "Белиз", + "CA": "Канада", + "CC": "ÐšÐ¾ÐºÐ¾Ñ (Килинг) адалары", + "CD": "Конго-КиншаÑа", + "CF": "Мәркәзи Ðфрика РеÑпубликаÑÑ‹", + "CG": "Конго-Браззавил", + "CH": "ИÑвечрә", + "CI": "Kотд’ивуар", + "CK": "Кук адалары", + "CL": "Чили", + "CM": "Камерун", + "CN": "Чин", + "CO": "Колумбија", + "CR": "КоÑта Рика", + "CU": "Куба", + "CV": "Кабо-Верде", + "CW": "КураÑао", + "CX": "Милад адаÑÑ‹", + "CY": "Кипр", + "CZ": "Чех РеÑпубликаÑÑ‹", + "DE": "Ðлманија", + "DG": "Диего ГарÑија", + "DJ": "Ҹибути", + "DK": "Данимарка", + "DM": "Доминика", + "DO": "Доминикан РеÑпубликаÑÑ‹", + "DZ": "Әлҹәзаир", + "EA": "Сеута вә Мелилја", + "EC": "Еквадор", + "EE": "ЕÑтонија", + "EG": "МиÑир", + "ER": "Еритреја", + "ES": "ИÑпанија", + "ET": "Ефиопија", + "FI": "Финландија", + "FJ": "Фиҹи", + "FK": "Фолкленд адалары", + "FM": "Микронезија", + "FO": "Фарер адалары", + "FR": "ФранÑа", + "GA": "Габон", + "GB": "Бирләшмиш Краллыг", + "GD": "Гренада", + "GE": "ҜүрҹүÑтан", + "GF": "ФранÑа ГвианаÑÑ‹", + "GG": "ҜернÑи", + "GH": "Гана", + "GI": "Ҹәбәллүтариг", + "GL": "Гренландија", + "GM": "Гамбија", + "GN": "Гвинеја", + "GP": "Гваделупа", + "GQ": "Екваториал Гвинеја", + "GR": "ЈунаныÑтан", + "GS": "Ҹәнуби Ҹорҹија вә Ҹәнуби Сендвич адалары", + "GT": "Гватемала", + "GU": "Гуам", + "GW": "Гвинеја-БиÑау", + "GY": "Гајана", + "HK": "Һонк Конг Ð¥Ò¯ÑуÑи Инзибати Әрази Чин", + "HN": "ҺондураÑ", + "HR": "Хорватија", + "HT": "Һаити", + "HU": "МаҹарыÑтан", + "IC": "Канар адалары", + "ID": "Индонезија", + "IE": "Ирландија", + "IL": "ИÑраил", + "IM": "Мен адаÑÑ‹", + "IN": "ҺиндиÑтан", + "IO": "Британтјанын Һинд Океаны ӘразиÑи", + "IQ": "Ираг", + "IR": "Иран", + "IS": "ИÑландија", + "IT": "Италија", + "JE": "ҸерÑи", + "JM": "Јамајка", + "JO": "Иорданија", + "JP": "Јапонија", + "KE": "Кенија", + "KG": "ГырғызыÑтан", + "KH": "Камбоҹа", + "KI": "Кирибати", + "KM": "Комор адалары", + "KN": "Сент-ÐšÐ¸Ñ‚Ñ Ð²Ó™ ÐевиÑ", + "KP": "Шимали Кореја", + "KR": "Ҹәнуби Кореја", + "KW": "Күвејт", + "KY": "Кајман адалары", + "KZ": "ГазахыÑтан", + "LA": "ЛаоÑ", + "LB": "Ливан", + "LC": "Сент-ЛуÑија", + "LI": "Лихтенштејн", + "LK": "Шри-Ланка", + "LR": "Либерија", + "LS": "ЛеÑото", + "LT": "Литва", + "LU": "ЛүкÑембург", + "LV": "Латвија", + "LY": "Ливија", + "MA": "Мәракеш", + "MC": "Монако", + "MD": "Молдова", + "ME": "Монтенегро", + "MF": "Сент Мартин", + "MG": "МадагаÑкар", + "MH": "Маршал адалары", + "ML": "Мали", + "MM": "Мјанма", + "MN": "МонголуÑтан", + "MO": "Макао Ð¥Ò¯ÑуÑи Инзибати Әрази Чин", + "MP": "Шимали Мариан адалары", + "MQ": "Мартиник", + "MR": "Мавританија", + "MS": "МонÑерат", + "MT": "Малта", + "MU": "Маврики", + "MV": "Малдив адалары", + "MW": "Малави", + "MX": "МекÑика", + "MY": "Малајзија", + "MZ": "Мозамбик", + "NA": "Ðамибија", + "NC": "Јени Каледонија", + "NE": "ÐиÒер", + "NF": "Ðорфолк адаÑÑ‹", + "NG": "ÐиÒерија", + "NI": "Ðикарагуа", + "NL": "Ðидерланд", + "NO": "Ðорвеч", + "NP": "Ðепал", + "NR": "Ðауру", + "NU": "Ðиуе", + "NZ": "Јени Зеландија", + "OM": "Оман", + "PA": "Панама", + "PE": "Перу", + "PF": "ФранÑа ПолинезијаÑÑ‹", + "PG": "Папуа-Јени Гвинеја", + "PH": "Филиппин", + "PK": "ПакиÑтан", + "PL": "Полша", + "PM": "ÐœÒ¯Ð³Ó™Ð´Ð´Ó™Ñ ÐŸÑ˜ÐµÑ€ вә Микелон", + "PN": "Питкерн адалары", + "PR": "Пуерто Рико", + "PT": "Португалија", + "PW": "Палау", + "PY": "Парагвај", + "QA": "Гәтәр", + "RE": "Рејунјон", + "RO": "Румынија", + "RS": "Сербија", + "RU": "РуÑија", + "RW": "Руанда", + "SA": "Сәудијјә ӘрәбиÑтаны", + "SB": "Соломон адалары", + "SC": "Сејшел адалары", + "SD": "Судан", + "SE": "ИÑвеч", + "SG": "Сингапур", + "SH": "ÐœÒ¯Ð³Ó™Ð´Ð´Ó™Ñ ÐˆÐµÐ»ÐµÐ½Ð°", + "SI": "Словенија", + "SJ": "Свалбард вә Јан-Мајен", + "SK": "Словакија", + "SL": "Сјерра-Леоне", + "SM": "Сан-Марино", + "SN": "Сенегал", + "SO": "Сомали", + "SR": "Суринам", + "SS": "Ҹәнуби Судан", + "ST": "Сан-Томе вә ПринÑипи", + "SV": "Салвадор", + "SX": "Синт-Мартен", + "SY": "Сурија", + "SZ": "Свазиленд", + "TA": "ТриÑтан да Кунја", + "TC": "Ð¢Ó©Ñ€ÐºÑ Ð²Ó™ ÐšÐ°Ñ˜ÐºÐ¾Ñ Ð°Ð´Ð°Ð»Ð°Ñ€Ñ‹", + "TD": "Чад", + "TF": "ФранÑанын Ҹәнуб Әразиләри", + "TG": "Того", + "TH": "Таиланд", + "TJ": "ТаҹикиÑтан", + "TK": "Токелау", + "TL": "Шәрги Тимор", + "TM": "ТүркмәниÑтан", + "TN": "ТуниÑ", + "TO": "Тонга", + "TR": "Түркијә", + "TT": "Тринидад вә Тобаго", + "TV": "Тувалу", + "TW": "Тајван", + "TZ": "Танзанија", + "UA": "Украјна", + "UG": "Уганда", + "UM": "ÐБШ-а бағлы кичик адаҹыглар", + "US": "Ðмерика Бирләшмиш Штатлары", + "UY": "Уругвај", + "UZ": "ӨзбәкиÑтан", + "VA": "Ватикан", + "VC": "Сент-ВинÑент вә Гренадинләр", + "VE": "ВенеÑуела", + "VG": "Британијанын ВирÒин адалары", + "VI": "ÐБШ ВирÒин адалары", + "VN": "Вјетнам", + "VU": "Вануату", + "WF": "Ð£Ð¾Ð»Ð»Ð¸Ñ Ð²Ó™ Футуна", + "WS": "Самоа", + "XK": "КоÑово", + "YE": "Јәмән", + "YT": "Мајот", + "ZA": "Ҹәнуб Ðфрика", + "ZM": "Замбија", + "ZW": "Зимбабве" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/be.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/be.json new file mode 100644 index 0000000000000000000000000000000000000000..2cafd246dbc9afa22eabd4d3fcbc5f07f00369e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/be.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.29.66", + "Names": { + "AC": "ВоÑтраў УзнÑÑеннÑ", + "AD": "Ðндора", + "AE": "Ðб’ÑÐ´Ð½Ð°Ð½Ñ‹Ñ ÐрабÑÐºÑ–Ñ Ð­Ð¼Ñ–Ñ€Ð°Ñ‚Ñ‹", + "AF": "ÐфганіÑтан", + "AG": "Ðнтыгуа Ñ– Барбуда", + "AI": "ÐнгільÑ", + "AL": "ÐлбаніÑ", + "AM": "ÐрменіÑ", + "AO": "Ðнгола", + "AQ": "Ðнтарктыка", + "AR": "Ðргенціна", + "AS": "ÐмерыканÑкае Самоа", + "AT": "ÐÑžÑтрыÑ", + "AU": "ÐÑžÑтраліÑ", + "AW": "Ðруба", + "AX": "ÐландÑÐºÑ–Ñ Ð°Ñтравы", + "AZ": "Ðзербайджан", + "BA": "БоÑÐ½Ñ–Ñ Ñ– Герцагавіна", + "BB": "БарбадаÑ", + "BD": "БангладÑш", + "BE": "БельгіÑ", + "BF": "Буркіна-ФаÑо", + "BG": "БалгарыÑ", + "BH": "БахрÑйн", + "BI": "Бурундзі", + "BJ": "Бенін", + "BL": "Сен-БартÑльмі", + "BM": "БермудÑÐºÑ–Ñ Ð°Ñтравы", + "BN": "Бруней", + "BO": "БалівіÑ", + "BQ": "КарыбÑÐºÑ–Ñ ÐідÑрланды", + "BR": "БразіліÑ", + "BS": "Багамы", + "BT": "Бутан", + "BW": "БатÑвана", + "BY": "БеларуÑÑŒ", + "BZ": "Беліз", + "CA": "Канада", + "CC": "КакоÑÐ°Ð²Ñ‹Ñ (Кілінг) аÑтравы", + "CD": "Конга (КіншаÑа)", + "CF": "ЦÑнтральнаафрыканÑÐºÐ°Ñ Ð ÑÑпубліка", + "CG": "Конга - Бразавіль", + "CH": "ШвейцарыÑ", + "CI": "Кот-д’Івуар", + "CK": "ÐÑтравы Кука", + "CL": "Чылі", + "CM": "Камерун", + "CN": "Кітай", + "CO": "КалумбіÑ", + "CR": "КоÑта-Рыка", + "CU": "Куба", + "CV": "Каба-ВердÑ", + "CW": "КюраÑаа", + "CX": "ВоÑтраў КалÑд", + "CY": "Кіпр", + "CZ": "ЧÑÑ…Ñ–Ñ", + "DE": "ГерманіÑ", + "DG": "ВоÑтраў Дыега-ГарÑÑ–Ñ", + "DJ": "Джыбуці", + "DK": "ДаніÑ", + "DM": "Дамініка", + "DO": "ДамініканÑÐºÐ°Ñ Ð ÑÑпубліка", + "DZ": "Ðлжыр", + "EA": "Сеўта Ñ– МелільÑ", + "EC": "Эквадор", + "EE": "ЭÑтоніÑ", + "EG": "Егіпет", + "EH": "ЗаходнÑÑ Ð¡Ð°Ñ…Ð°Ñ€Ð°", + "ER": "ЭрытрÑÑ", + "ES": "ІÑпаніÑ", + "ET": "ЭфіопіÑ", + "FI": "ФінлÑндыÑ", + "FJ": "Фіджы", + "FK": "ФалклендÑÐºÑ–Ñ Ð°Ñтравы", + "FM": "МікранезіÑ", + "FO": "ФарÑÑ€ÑÐºÑ–Ñ Ð°Ñтравы", + "FR": "ФранцыÑ", + "GA": "Габон", + "GB": "Ð’ÑлікабрытаніÑ", + "GD": "ГрÑнада", + "GE": "ГрузіÑ", + "GF": "ФранцузÑÐºÐ°Ñ Ð“Ð²Ñ–Ñна", + "GG": "ГернÑÑ–", + "GH": "Гана", + "GI": "Гібралтар", + "GL": "ГрÑнландыÑ", + "GM": "ГамбіÑ", + "GN": "ГвінеÑ", + "GP": "ГвадÑлупа", + "GQ": "ЭкватарыÑÐ»ÑŒÐ½Ð°Ñ Ð“Ð²Ñ–Ð½ÐµÑ", + "GR": "ГрÑцыÑ", + "GS": "ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ Ð”Ð¶Ð¾Ñ€Ð´Ð¶Ñ‹Ñ Ñ– ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ñ‹Ñ Ð¡Ð°Ð½Ð´Ð²Ñ–Ñ‡Ð°Ð²Ñ‹ аÑтравы", + "GT": "ГватÑмала", + "GU": "Гуам", + "GW": "ГвінеÑ-БіÑау", + "GY": "ГаÑна", + "HK": "Ганконг, СÐР (Кітай)", + "HN": "ГандураÑ", + "HR": "ХарватыÑ", + "HT": "Гаіці", + "HU": "ВенгрыÑ", + "IC": "КанарÑÐºÑ–Ñ Ð°Ñтравы", + "ID": "ІнданезіÑ", + "IE": "ІрландыÑ", + "IL": "Ізраіль", + "IM": "ВоÑтраў МÑн", + "IN": "ІндыÑ", + "IO": "БрытанÑÐºÐ°Ñ Ñ‚ÑÑ€Ñ‹Ñ‚Ð¾Ñ€Ñ‹Ñ Ñž ІндыйÑкім акіÑне", + "IQ": "Ірак", + "IR": "Іран", + "IS": "ІÑландыÑ", + "IT": "ІталіÑ", + "JE": "ДжÑÑ€ÑÑ–", + "JM": "Ямайка", + "JO": "ІарданіÑ", + "JP": "ЯпоніÑ", + "KE": "КеніÑ", + "KG": "КыргызÑтан", + "KH": "Камбоджа", + "KI": "Кірыбаці", + "KM": "КаморÑÐºÑ–Ñ ÐÑтравы", + "KN": "Сент-ÐšÑ–Ñ‚Ñ Ñ– ÐевіÑ", + "KP": "ÐŸÐ°ÑžÐ½Ð¾Ñ‡Ð½Ð°Ñ ÐšÐ°Ñ€ÑÑ", + "KR": "ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ð°Ñ ÐšÐ°Ñ€ÑÑ", + "KW": "Кувейт", + "KY": "Кайманавы аÑтравы", + "KZ": "КазахÑтан", + "LA": "ЛаоÑ", + "LB": "Ліван", + "LC": "Сент-ЛюÑÑ–Ñ", + "LI": "ЛіхтÑнштÑйн", + "LK": "Шры-Ланка", + "LR": "ЛіберыÑ", + "LS": "ЛеÑота", + "LT": "Літва", + "LU": "ЛюкÑембург", + "LV": "ЛатвіÑ", + "LY": "ЛівіÑ", + "MA": "Марока", + "MC": "Манака", + "MD": "Малдова", + "ME": "ЧарнагорыÑ", + "MF": "Сен-МартÑн", + "MG": "МадагаÑкар", + "MH": "Маршалавы ÐÑтравы", + "MK": "МакедоніÑ", + "ML": "Малі", + "MM": "М’Ñнма (Бірма)", + "MN": "МанголіÑ", + "MO": "Макаа, СÐР (Кітай)", + "MP": "ÐŸÐ°ÑžÐ½Ð¾Ñ‡Ð½Ñ‹Ñ ÐœÐ°Ñ€Ñ‹ÑнÑÐºÑ–Ñ Ð°Ñтравы", + "MQ": "Марцініка", + "MR": "МаўрытаніÑ", + "MS": "МантÑерат", + "MT": "Мальта", + "MU": "Маўрыкій", + "MV": "Мальдывы", + "MW": "Малаві", + "MX": "МекÑіка", + "MY": "МалайзіÑ", + "MZ": "Мазамбік", + "NA": "ÐамібіÑ", + "NC": "ÐÐ¾Ð²Ð°Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ñ–Ñ", + "NE": "Ðігер", + "NF": "ВоÑтраў Ðорфалк", + "NG": "ÐігерыÑ", + "NI": "Ðікарагуа", + "NL": "ÐідÑрланды", + "NO": "ÐарвегіÑ", + "NP": "Ðепал", + "NR": "Ðауру", + "NU": "ÐіуÑ", + "NZ": "ÐÐ¾Ð²Ð°Ñ Ð—ÐµÐ»Ð°Ð½Ð´Ñ‹Ñ", + "OM": "Ðман", + "PA": "Панама", + "PE": "Перу", + "PF": "ФранцузÑÐºÐ°Ñ ÐŸÐ°Ð»Ñ–Ð½ÐµÐ·Ñ–Ñ", + "PG": "Папуа-ÐÐ¾Ð²Ð°Ñ Ð“Ð²Ñ–Ð½ÐµÑ", + "PH": "Філіпіны", + "PK": "ПакіÑтан", + "PL": "Польшча", + "PM": "Сен-П’ер Ñ– Мікелон", + "PN": "ÐÑтравы ПіткÑрн", + "PR": "ПуÑрта-Рыка", + "PS": "ПалеÑцінÑÐºÑ–Ñ Ð¢Ñрыторыі", + "PT": "ПартугаліÑ", + "PW": "Палау", + "PY": "Парагвай", + "QA": "Катар", + "RE": "РÑюньён", + "RO": "РумыніÑ", + "RS": "СербіÑ", + "RU": "РаÑÑ–Ñ", + "RW": "Руанда", + "SA": "СаудаўÑÐºÐ°Ñ ÐравіÑ", + "SB": "Саламонавы ÐÑтравы", + "SC": "СейшÑльÑÐºÑ–Ñ ÐÑтравы", + "SD": "Судан", + "SE": "ШвецыÑ", + "SG": "Сінгапур", + "SH": "ВоÑтраў СвÑтой Ðлены", + "SI": "СлавеніÑ", + "SJ": "Шпіцберген Ñ– Ян-Маен", + "SK": "СлавакіÑ", + "SL": "Сьера-ЛеонÑ", + "SM": "Сан-Марына", + "SN": "Сенегал", + "SO": "Самалі", + "SR": "Сурынам", + "SS": "Паўднёвы Судан", + "ST": "Сан-Ð¢Ð°Ð¼Ñ Ñ– ПрынÑіпі", + "SV": "Сальвадор", + "SX": "Сінт-МартÑн", + "SY": "СірыÑ", + "SZ": "Свазіленд", + "TA": "ТрыÑтан-да-КуньÑ", + "TC": "Ð¦Ñ‘Ñ€ÐºÑ Ñ– КайкаÑ", + "TD": "Чад", + "TF": "ФранцузÑÐºÑ–Ñ ÐŸÐ°ÑžÐ´Ð½Ñ‘Ð²Ñ‹Ñ Ñ‚Ñрыторыі", + "TG": "Тога", + "TH": "Тайланд", + "TJ": "ТаджыкіÑтан", + "TK": "Такелау", + "TL": "Тымор-Лешці", + "TM": "ТуркменіÑтан", + "TN": "ТуніÑ", + "TO": "Тонга", + "TR": "ТурцыÑ", + "TT": "Трынідад Ñ– Табага", + "TV": "Тувалу", + "TW": "Тайвань", + "TZ": "ТанзаніÑ", + "UA": "Украіна", + "UG": "Уганда", + "UM": "ÐœÐ°Ð»Ñ‹Ñ ÐÐ´Ð´Ð°Ð»ÐµÐ½Ñ‹Ñ Ð°Ñтравы ЗШÐ", + "US": "Ð—Ð»ÑƒÑ‡Ð°Ð½Ñ‹Ñ Ð¨Ñ‚Ð°Ñ‚Ñ‹ Ðмерыкі", + "UY": "Уругвай", + "UZ": "УзбекіÑтан", + "VA": "Ватыкан", + "VC": "Сент-ВінÑент Ñ– ГрÑнадзіны", + "VE": "ВенеÑуÑла", + "VG": "БрытанÑÐºÑ–Ñ Ð’Ñ–Ñ€Ð³Ñ–Ð½ÑÐºÑ–Ñ Ð°Ñтравы", + "VI": "ÐмерыканÑÐºÑ–Ñ Ð’Ñ–Ñ€Ð³Ñ–Ð½ÑÐºÑ–Ñ Ð°Ñтравы", + "VN": "В’етнам", + "VU": "Вануату", + "WF": "Ð£Ð¾Ð»Ñ–Ñ Ñ– Футуна", + "WS": "Самоа", + "XK": "КоÑава", + "YE": "Емен", + "YT": "Маёта", + "ZA": "ПаўднёваафрыканÑÐºÐ°Ñ Ð ÑÑпубліка", + "ZM": "ЗамбіÑ", + "ZW": "ЗімбабвÑ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bg.json new file mode 100644 index 0000000000000000000000000000000000000000..44fcf646b6367a284169db4ac0d137920770490b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bg.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.30.6", + "Names": { + "AC": "оÑтров ВъзнеÑение", + "AD": "Ðндора", + "AE": "Обединени арабÑки емирÑтва", + "AF": "ÐфганиÑтан", + "AG": "Ðнтигуа и Барбуда", + "AI": "Ðнгуила", + "AL": "ÐлбаниÑ", + "AM": "ÐрмениÑ", + "AO": "Ðнгола", + "AQ": "Ðнтарктика", + "AR": "Ðржентина", + "AS": "ÐмериканÑка Самоа", + "AT": "ÐвÑтриÑ", + "AU": "ÐвÑтралиÑ", + "AW": "Ðруба", + "AX": "ОландÑки оÑтрови", + "AZ": "Ðзербайджан", + "BA": "БоÑна и Херцеговина", + "BB": "БарбадоÑ", + "BD": "Бангладеш", + "BE": "БелгиÑ", + "BF": "Буркина ФаÑо", + "BG": "БългариÑ", + "BH": "Бахрейн", + "BI": "Бурунди", + "BJ": "Бенин", + "BL": "Сен Бартелеми", + "BM": "Бермуда", + "BN": "Бруней ДаруÑÑалам", + "BO": "БоливиÑ", + "BQ": "КарибÑка ÐидерландиÑ", + "BR": "БразилиÑ", + "BS": "Бахами", + "BT": "Бутан", + "BW": "БотÑвана", + "BY": "БеларуÑ", + "BZ": "Белиз", + "CA": "Канада", + "CC": "КокоÑови оÑтрови (оÑтрови Кийлинг)", + "CD": "Конго (КиншаÑа)", + "CF": "ЦентралноафриканÑка република", + "CG": "Конго (Бразавил)", + "CH": "ШвейцариÑ", + "CI": "Кот д’Ивоар", + "CK": "оÑтрови Кук", + "CL": "Чили", + "CM": "Камерун", + "CN": "Китай", + "CO": "КолумбиÑ", + "CR": "КоÑта Рика", + "CU": "Куба", + "CV": "Кабо Верде", + "CW": "КюраÑао", + "CX": "оÑтров РождеÑтво", + "CY": "Кипър", + "CZ": "Чешка република", + "DE": "ГерманиÑ", + "DG": "Диего ГарÑиÑ", + "DJ": "Джибути", + "DK": "ДаниÑ", + "DM": "Доминика", + "DO": "ДоминиканÑка република", + "DZ": "Ðлжир", + "EA": "Сеута и МелиÑ", + "EC": "Еквадор", + "EE": "ЕÑтониÑ", + "EG": "Египет", + "EH": "Западна Сахара", + "ER": "ЕритреÑ", + "ES": "ИÑпаниÑ", + "ET": "ЕтиопиÑ", + "FI": "ФинландиÑ", + "FJ": "Фиджи", + "FK": "ФолклендÑки оÑтрови", + "FM": "МикронезиÑ", + "FO": "ФарьорÑки оÑтрови", + "FR": "ФранциÑ", + "GA": "Габон", + "GB": "Обединеното кралÑтво", + "GD": "Гренада", + "GE": "ГрузиÑ", + "GF": "ФренÑка Гвиана", + "GG": "Гърнзи", + "GH": "Гана", + "GI": "Гибралтар", + "GL": "ГренландиÑ", + "GM": "ГамбиÑ", + "GN": "ГвинеÑ", + "GP": "Гваделупа", + "GQ": "Екваториална ГвинеÑ", + "GR": "ГърциÑ", + "GS": "Южна Ð”Ð¶Ð¾Ñ€Ð´Ð¶Ð¸Ñ Ð¸ Южни Сандвичеви оÑтрови", + "GT": "Гватемала", + "GU": "Гуам", + "GW": "ГвинеÑ-БиÑау", + "GY": "ГаÑна", + "HK": "Хонконг, СÐР на Китай", + "HN": "ХондураÑ", + "HR": "ХърватиÑ", + "HT": "Хаити", + "HU": "УнгариÑ", + "IC": "КанарÑки оÑтрови", + "ID": "ИндонезиÑ", + "IE": "ИрландиÑ", + "IL": "Израел", + "IM": "оÑтров Ман", + "IN": "ИндиÑ", + "IO": "БританÑка Ñ‚ÐµÑ€Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ Ð² ИндийÑÐºÐ¸Ñ Ð¾ÐºÐµÐ°Ð½", + "IQ": "Ирак", + "IR": "Иран", + "IS": "ИÑландиÑ", + "IT": "ИталиÑ", + "JE": "ДжърÑи", + "JM": "Ямайка", + "JO": "ЙорданиÑ", + "JP": "ЯпониÑ", + "KE": "КениÑ", + "KG": "КиргизÑтан", + "KH": "Камбоджа", + "KI": "Кирибати", + "KM": "КоморÑки оÑтрови", + "KN": "Сейнт ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ", + "KP": "Северна КореÑ", + "KR": "Южна КореÑ", + "KW": "Кувейт", + "KY": "Кайманови оÑтрови", + "KZ": "КазахÑтан", + "LA": "ЛаоÑ", + "LB": "Ливан", + "LC": "Сейнт ЛуÑиÑ", + "LI": "Лихтенщайн", + "LK": "Шри Ланка", + "LR": "ЛибериÑ", + "LS": "ЛеÑото", + "LT": "Литва", + "LU": "ЛюкÑембург", + "LV": "ЛатвиÑ", + "LY": "ЛибиÑ", + "MA": "Мароко", + "MC": "Монако", + "MD": "Молдова", + "ME": "Черна гора", + "MF": "Сен Мартен", + "MG": "МадагаÑкар", + "MH": "Маршалови оÑтрови", + "MK": "МакедониÑ", + "ML": "Мали", + "MM": "Мианмар (Бирма)", + "MN": "МонголиÑ", + "MO": "Макао, СÐР на Китай", + "MP": "Северни МарианÑки оÑтрови", + "MQ": "Мартиника", + "MR": "МавританиÑ", + "MS": "МонтÑерат", + "MT": "Малта", + "MU": "Мавриций", + "MV": "Малдиви", + "MW": "Малави", + "MX": "МекÑико", + "MY": "МалайзиÑ", + "MZ": "Мозамбик", + "NA": "ÐамибиÑ", + "NC": "Ðова КаледониÑ", + "NE": "Ðигер", + "NF": "оÑтров Ðорфолк", + "NG": "ÐигериÑ", + "NI": "Ðикарагуа", + "NL": "ÐидерландиÑ", + "NO": "ÐорвегиÑ", + "NP": "Ðепал", + "NR": "Ðауру", + "NU": "Ðиуе", + "NZ": "Ðова ЗеландиÑ", + "OM": "Оман", + "PA": "Панама", + "PE": "Перу", + "PF": "ФренÑка ПолинезиÑ", + "PG": "Папуа-Ðова ГвинеÑ", + "PH": "Филипини", + "PK": "ПакиÑтан", + "PL": "Полша", + "PM": "Сен Пиер и Микелон", + "PN": "ОÑтрови Питкерн", + "PR": "Пуерто Рико", + "PS": "ПалеÑтинÑки територии", + "PT": "ПортугалиÑ", + "PW": "Палау", + "PY": "Парагвай", + "QA": "Катар", + "RE": "Реюнион", + "RO": "РумъниÑ", + "RS": "СърбиÑ", + "RU": "РуÑиÑ", + "RW": "Руанда", + "SA": "СаудитÑка ÐрабиÑ", + "SB": "Соломонови оÑтрови", + "SC": "Сейшели", + "SD": "Судан", + "SE": "ШвециÑ", + "SG": "Сингапур", + "SH": "Света Елена", + "SI": "СловениÑ", + "SJ": "Свалбард и Ян Майен", + "SK": "СловакиÑ", + "SL": "Сиера Леоне", + "SM": "Сан Марино", + "SN": "Сенегал", + "SO": "СомалиÑ", + "SR": "Суринам", + "SS": "Южен Судан", + "ST": "Сао Томе и ПринÑипи", + "SV": "Салвадор", + "SX": "Синт Мартен", + "SY": "СириÑ", + "SZ": "Свазиленд", + "TA": "ТриÑтан да КунÑ", + "TC": "оÑтрови Ð¢ÑŠÑ€ÐºÑ Ð¸ КайкоÑ", + "TD": "Чад", + "TF": "ФренÑки южни територии", + "TG": "Того", + "TH": "Тайланд", + "TJ": "ТаджикиÑтан", + "TK": "Токелау", + "TL": "Източен Тимор", + "TM": "ТуркмениÑтан", + "TN": "ТуниÑ", + "TO": "Тонга", + "TR": "ТурциÑ", + "TT": "Тринидад и Тобаго", + "TV": "Тувалу", + "TW": "Тайван", + "TZ": "ТанзаниÑ", + "UA": "Украйна", + "UG": "Уганда", + "UM": "Отдалечени оÑтрови на СÐЩ", + "UN": "ÐžÑ€Ð³Ð°Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð½Ð° обединените нации", + "US": "Съединени щати", + "UY": "Уругвай", + "UZ": "УзбекиÑтан", + "VA": "Ватикан", + "VC": "Сейнт ВинÑънт и Гренадини", + "VE": "Венецуела", + "VG": "БританÑки ВирджинÑки оÑтрови", + "VI": "ÐмериканÑки ВирджинÑки оÑтрови", + "VN": "Виетнам", + "VU": "Вануату", + "WF": "Ð£Ð¾Ð»Ð¸Ñ Ð¸ Футуна", + "WS": "Самоа", + "XK": "КоÑово", + "YE": "Йемен", + "YT": "Майот", + "ZA": "Южна Ðфрика", + "ZM": "ЗамбиÑ", + "ZW": "Зимбабве" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bm.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bm.json new file mode 100644 index 0000000000000000000000000000000000000000..664f519445a9c9eccbf2825f7f92baab076a798e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bm.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AD": "AndÉ”r", + "AE": "Arabu mara kafoli", + "AF": "AfiganistaÅ‹", + "AG": "Antiga-ni-Barbuda", + "AI": "Angiya", + "AL": "Alibani", + "AM": "Arimeni", + "AO": "Angola", + "AR": "Arizantin", + "AS": "Samowa amerikani", + "AT": "Otirisi", + "AU": "Ositirali", + "AW": "Aruba", + "AZ": "AzÉ›rbayjaÅ‹", + "BA": "Bozni-Ærizigovini", + "BB": "Barbadi", + "BD": "BÉ›ngiladÉ›si", + "BE": "BÉ›liziki", + "BF": "Burukina Faso", + "BG": "Buligari", + "BH": "Bareyini", + "BI": "Burundi", + "BJ": "BenÉ›n", + "BM": "Bermudi", + "BN": "BurinÉ›yi", + "BO": "Bolivi", + "BR": "Berezili", + "BS": "Bahamasi", + "BT": "ButaÅ‹", + "BW": "BÉ”tisiwana", + "BY": "Belarusi", + "BZ": "Belizi", + "CA": "Kanada", + "CD": "Kongo ka republiki demÉ”kratiki", + "CF": "Santarafiriki", + "CG": "Kongo", + "CH": "Suwisi", + "CI": "Kodiwari", + "CK": "Kuki Gun", + "CL": "Sili", + "CM": "Kameruni", + "CN": "Siniwajamana", + "CO": "Kolombi", + "CR": "KÉ”sitarika", + "CU": "Kuba", + "CV": "CapivÉ›rdi", + "CY": "Cipri", + "CZ": "Ceki republiki", + "DE": "Alimaɲi", + "DJ": "Jibuti", + "DK": "Danemarki", + "DM": "DÉ”miniki", + "DO": "DÉ”mimiki republiki", + "DZ": "Alizeri", + "EC": "EkwatÉ”r", + "EE": "Esetoni", + "EG": "Eziputi", + "ER": "Eritere", + "ES": "Esipaɲi", + "ET": "Etiopi", + "FI": "Finilandi", + "FJ": "Fiji", + "FK": "Maluwini Gun", + "FM": "Mikironesi", + "FR": "Faransi", + "GA": "Gabɔŋ", + "GB": "AngilÉ›tÉ›ri", + "GD": "Granadi", + "GE": "ZeyÉ”rzi", + "GF": "Faransi ka gwiyani", + "GH": "Gana", + "GI": "Zibralitari", + "GL": "GÉ”rÉ”henelandi", + "GM": "Ganbi", + "GN": "Gine", + "GP": "Gwadelup", + "GQ": "Gine ekwatÉ”ri", + "GR": "GÉ›rÉ›si", + "GT": "Gwatemala", + "GU": "Gwam", + "GW": "Gine Bisawo", + "GY": "Gwiyana", + "HN": "HÉ”ndirasi", + "HR": "Kroasi", + "HT": "Ayiti", + "HU": "HÉ”ngri", + "ID": "Ændonezi", + "IE": "Irilandi", + "IL": "Isirayeli", + "IN": "Ændujamana", + "IO": "AngilÉ› ka É›ndu dugukolo", + "IQ": "Iraki", + "IR": "IraÅ‹", + "IS": "Isilandi", + "IT": "Itali", + "JM": "Zamayiki", + "JO": "ZÉ”rdani", + "JP": "ZapÉ”n", + "KE": "Keniya", + "KG": "KirigizisitaÅ‹", + "KH": "Kamboji", + "KI": "Kiribati", + "KM": "KomÉ”ri", + "KN": "KristÉ”fo-Senu-ni-ÆevÉ›s", + "KP": "Kɛɲɛka Kore", + "KR": "Worodugu Kore", + "KW": "KowÉ›ti", + "KY": "Bama Gun", + "KZ": "KazakistaÅ‹", + "LA": "Layosi", + "LB": "LibaÅ‹", + "LC": "Lusi-Senu", + "LI": "LisÉ›nsitayini", + "LK": "Sirilanka", + "LR": "Liberiya", + "LS": "Lesoto", + "LT": "Lituyani", + "LU": "Likisanburu", + "LV": "Letoni", + "LY": "Libi", + "MA": "MarÉ”ku", + "MC": "Monako", + "MD": "Molidavi", + "MG": "Madagasikari", + "MH": "Marisali Gun", + "MK": "MacedÉ”ni", + "ML": "Mali", + "MM": "Myanimari", + "MN": "MoÅ‹oli", + "MP": "Kɛɲɛka Mariyani Gun", + "MQ": "Maritiniki", + "MR": "MÉ”ritani", + "MS": "MoÅ‹sera", + "MT": "Malti", + "MU": "Morisi", + "MV": "Maldivi", + "MW": "Malawi", + "MX": "Meksiki", + "MY": "MalÉ›zi", + "MZ": "Mozanbiki", + "NA": "Namibi", + "NC": "Kaledoni Koura", + "NE": "NizÉ›ri", + "NF": "NÉ”rofoliki Gun", + "NG": "Nizeriya", + "NI": "Nikaragwa", + "NL": "Peyiba", + "NO": "NÉ”riwÉ›zi", + "NP": "Nepali", + "NR": "Nawuru", + "NU": "Nyuwe", + "NZ": "Zelandi Koura", + "OM": "OmaÅ‹", + "PA": "Panama", + "PE": "Peru", + "PF": "Faransi ka polinezi", + "PG": "Papuwasi-Gine-Koura", + "PH": "Filipini", + "PK": "PakisitaÅ‹", + "PL": "Poloɲi", + "PM": "PiyÉ›ri-Senu-ni-Mikelɔŋ", + "PN": "Pitikarini", + "PR": "PÉ”rotoriko", + "PS": "Palesitini", + "PT": "PÉ”ritigali", + "PW": "Palawu", + "PY": "Paraguwayi", + "QA": "Katari", + "RE": "Reyuɲɔŋ", + "RO": "Rumani", + "RU": "Irisi", + "RW": "Ruwanda", + "SA": "Arabiya Sawudiya", + "SB": "Salomo Gun", + "SC": "SesÉ›li", + "SD": "SudaÅ‹", + "SE": "SuwÉ›di", + "SG": "SÉ›ngapuri", + "SH": "ÆlÉ›ni Senu", + "SI": "Sloveni", + "SK": "Slowaki", + "SL": "Siyera LewÉ”ni", + "SM": "Marini-Senu", + "SN": "Senegali", + "SO": "Somali", + "SR": "Surinami", + "ST": "Sawo Tome-ni-Prinicipe", + "SV": "SalivadÉ”r", + "SY": "Siri", + "SZ": "Swazilandi", + "TC": "Turiki Gun ni Kayiki", + "TD": "Cadi", + "TG": "Togo", + "TH": "Tayilandi", + "TJ": "Tajikisitani", + "TK": "Tokelo", + "TL": "KÉ”rÉ”n TimÉ”r", + "TM": "Turikimenisitani", + "TN": "Tunizi", + "TO": "Tonga", + "TR": "Turiki", + "TT": "Trinite-ni-Tobago", + "TV": "Tuvalu", + "TW": "Tayiwani", + "TZ": "Tanzani", + "UA": "UkÉ›rÉ›ni", + "UG": "Uganda", + "US": "Ameriki", + "UY": "Urugwayi", + "UZ": "Uzebekisitani", + "VA": "VatikaÅ‹", + "VC": "VinisÉ›n-Senu-ni-Grenadini", + "VE": "Venezuwela", + "VG": "AngilÉ› ka Sungurunnin Gun", + "VI": "Ameriki ka Sungurunnin Gun", + "VN": "WiyÉ›tinamu", + "VU": "Vanuwatu", + "WF": "Walisi-ni-Futuna", + "WS": "Samowa", + "YE": "YemÉ›ni", + "YT": "Mayoti", + "ZA": "Worodugu Afriki", + "ZM": "Zanbi", + "ZW": "Zimbabuwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bn.json new file mode 100644 index 0000000000000000000000000000000000000000..bc0a90ce3f160aa1b1910ec8f3ed8da19b20c4dd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bn.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.44", + "Names": { + "AC": "অà§à¦¯à¦¾à¦¸à¦¸à§‡à¦¨à¦¶à¦¨ আইলà§à¦¯à¦¾à¦¨à§à¦¡", + "AD": "আনà§à¦¡à§‹à¦°à¦¾", + "AE": "সংযà§à¦•à§à¦¤ আরব আমিরাত", + "AF": "আফগানিসà§à¦¤à¦¾à¦¨", + "AG": "à¦à¦¨à§à¦Ÿà¦¿à¦—à§à¦¯à¦¼à¦¾ ও বারবà§à¦¡à¦¾", + "AI": "à¦à§à¦¯à¦¾à¦™à§à¦—à§à¦‡à¦²à¦¾", + "AL": "আলবেনিয়া", + "AM": "আরà§à¦®à§‡à¦¨à¦¿à¦¯à¦¼à¦¾", + "AO": "অà§à¦¯à¦¾à¦™à§à¦—োলা", + "AQ": "অà§à¦¯à¦¾à¦¨à§à¦Ÿà¦¾à¦°à§à¦•টিকা", + "AR": "আরà§à¦œà§‡à¦¨à§à¦Ÿà¦¿à¦¨à¦¾", + "AS": "আমেরিকান সামোয়া", + "AT": "অসà§à¦Ÿà§à¦°à¦¿à¦¯à¦¼à¦¾", + "AU": "অসà§à¦Ÿà§à¦°à§‡à¦²à¦¿à¦¯à¦¼à¦¾", + "AW": "আরà§à¦¬à¦¾", + "AX": "আলানà§à¦¡ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "AZ": "আজারবাইজান", + "BA": "বসনিয়া ও হারà§à¦œà§‡à¦—োভিনা", + "BB": "বারবাদোস", + "BD": "বাংলাদেশ", + "BE": "বেলজিয়াম", + "BF": "বà§à¦°à¦•িনা ফাসো", + "BG": "বà§à¦²à¦—েরিয়া", + "BH": "বাহরাইন", + "BI": "বà§à¦°à§à¦¨à§à¦¡à¦¿", + "BJ": "বেনিন", + "BL": "সেনà§à¦Ÿ বারথেলিমি", + "BM": "বারমà§à¦¡à¦¾", + "BN": "বà§à¦°à§à¦¨à§‡à¦‡", + "BO": "বলিভিয়া", + "BQ": "কà§à¦¯à¦¾à¦°à¦¿à¦¬à¦¿à¦¯à¦¼à¦¾à¦¨ নেদারলà§à¦¯à¦¾à¦¨à§à¦¡à¦¸", + "BR": "বà§à¦°à¦¾à¦œà¦¿à¦²", + "BS": "বাহামা দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "BT": "ভà§à¦Ÿà¦¾à¦¨", + "BW": "বতসোয়ানা", + "BY": "বেলারà§à¦¶", + "BZ": "বেলিজ", + "CA": "কানাডা", + "CC": "কোকোস (কিলিং) দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "CD": "কঙà§à¦—à§‹-কিনশাসা", + "CF": "মধà§à¦¯ আফà§à¦°à¦¿à¦•ার পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦°", + "CG": "কঙà§à¦—à§‹ - বà§à¦°à¦¾à¦œà¦¾à¦­à¦¿à¦²", + "CH": "সà§à¦‡à¦œà¦¾à¦°à¦²à§à¦¯à¦¾à¦¨à§à¦¡", + "CI": "আইভরি কোসà§à¦Ÿ", + "CK": "কà§à¦• দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "CL": "চিলি", + "CM": "কà§à¦¯à¦¾à¦®à§‡à¦°à§à¦¨", + "CN": "চীন", + "CO": "কলমà§à¦¬à¦¿à¦¯à¦¼à¦¾", + "CR": "কোসà§à¦Ÿà¦¾à¦°à¦¿à¦•া", + "CU": "কিউবা", + "CV": "কেপভারà§à¦¦à§‡", + "CW": "কিউরাসাও", + "CX": "কà§à¦°à¦¿à¦¸à¦®à¦¾à¦¸ দà§à¦¬à§€à¦ª", + "CY": "সাইপà§à¦°à¦¾à¦¸", + "CZ": "চেক পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦°", + "DE": "জারà§à¦®à¦¾à¦¨à¦¿", + "DG": "দিয়েগো গারà§à¦¸à¦¿à¦¯à¦¼à¦¾", + "DJ": "জিবà§à¦¤à¦¿", + "DK": "ডেনমারà§à¦•", + "DM": "ডোমিনিকা", + "DO": "ডোমেনিকান পà§à¦°à¦œà¦¾à¦¤à¦¨à§à¦¤à§à¦°", + "DZ": "আলজেরিয়া", + "EA": "কà§à¦‰à¦Ÿà¦¾ à¦à¦¬à¦‚ মেলিলা", + "EC": "ইকà§à¦¯à¦¼à§‡à¦¡à¦°", + "EE": "à¦à¦¸à§à¦¤à§‹à¦¨à¦¿à¦¯à¦¼à¦¾", + "EG": "মিশর", + "EH": "পশà§à¦šà¦¿à¦® সাহারা", + "ER": "ইরিতà§à¦°à¦¿à¦¯à¦¼à¦¾", + "ES": "সà§à¦ªà§‡à¦¨", + "ET": "ইফিওপিয়া", + "FI": "ফিনলà§à¦¯à¦¾à¦¨à§à¦¡", + "FJ": "ফিজি", + "FK": "ফকলà§à¦¯à¦¾à¦¨à§à¦¡ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "FM": "মাইকà§à¦°à§‹à¦¨à§‡à¦¶à¦¿à¦¯à¦¼à¦¾", + "FO": "ফà§à¦¯à¦¾à¦°à¦“ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "FR": "ফà§à¦°à¦¾à¦¨à§à¦¸", + "GA": "গà§à¦¯à¦¾à¦¬à¦¨", + "GB": "যà§à¦•à§à¦¤à¦°à¦¾à¦œà§à¦¯", + "GD": "গà§à¦°à§‡à¦¨à¦¾à¦¡à¦¾", + "GE": "জরà§à¦œà¦¿à¦¯à¦¼à¦¾", + "GF": "ফরাসী গায়ানা", + "GG": "গà§à¦°à¦¾à¦žà§à¦œà¦¿", + "GH": "ঘানা", + "GI": "জিবà§à¦°à¦¾à¦²à§à¦Ÿà¦¾à¦°", + "GL": "গà§à¦°à§€à¦¨à¦²à§à¦¯à¦¾à¦¨à§à¦¡", + "GM": "গামà§à¦¬à¦¿à¦¯à¦¼à¦¾", + "GN": "গিনি", + "GP": "গà§à¦¯à¦¼à¦¾à¦¦à§‡à¦²à§Œà¦ª", + "GQ": "নিরকà§à¦·à§€à¦¯à¦¼ গিনি", + "GR": "গà§à¦°à§€à¦¸", + "GS": "দকà§à¦·à¦¿à¦£ জরà§à¦œà¦¿à¦¯à¦¼à¦¾ ও দকà§à¦·à¦¿à¦£ সà§à¦¯à¦¾à¦¨à§à¦¡à¦‰à¦‡à¦š দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "GT": "গà§à¦¯à¦¼à¦¾à¦¤à§‡à¦®à¦¾à¦²à¦¾", + "GU": "গà§à¦¯à¦¼à¦¾à¦®", + "GW": "গিনি-বিসাউ", + "GY": "গিয়ানা", + "HK": "হংকং à¦à¦¸à¦à¦†à¦° চীনা", + "HN": "হণà§à¦¡à§à¦°à¦¾à¦¸", + "HR": "কà§à¦°à§‹à¦¯à¦¼à§‡à¦¶à¦¿à¦¯à¦¼à¦¾", + "HT": "হাইতি", + "HU": "হাঙà§à¦—েরি", + "IC": "কà§à¦¯à¦¾à¦¨à¦¾à¦°à¦¿ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "ID": "ইনà§à¦¦à§‹à¦¨à§‡à¦¶à¦¿à¦¯à¦¼à¦¾", + "IE": "আয়ারলà§à¦¯à¦¾à¦¨à§à¦¡", + "IL": "ইজরায়েল", + "IM": "আইল অফ মà§à¦¯à¦¾à¦¨", + "IN": "ভারত", + "IO": "বà§à¦°à¦¿à¦Ÿà¦¿à¦¶ ভারত মহাসাগরীয় অঞà§à¦šà¦²", + "IQ": "ইরাক", + "IR": "ইরান", + "IS": "আইসলà§à¦¯à¦¾à¦¨à§à¦¡", + "IT": "ইতালি", + "JE": "জারà§à¦¸à¦¿", + "JM": "জামাইকা", + "JO": "জরà§à¦¡à¦¨", + "JP": "জাপান", + "KE": "কেনিয়া", + "KG": "কিরগিজিসà§à¦¤à¦¾à¦¨", + "KH": "কমà§à¦¬à§‹à¦¡à¦¿à¦¯à¦¼à¦¾", + "KI": "কিরিবাতি", + "KM": "কমোরোস", + "KN": "সেনà§à¦Ÿ কিটস ও নেভিস", + "KP": "উতà§à¦¤à¦° কোরিয়া", + "KR": "দকà§à¦·à¦¿à¦£ কোরিয়া", + "KW": "কà§à¦¯à¦¼à§‡à¦¤", + "KY": "কেমà§à¦¯à¦¾à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "KZ": "কাজাখসà§à¦¤à¦¾à¦¨", + "LA": "লাওস", + "LB": "লেবানন", + "LC": "সেনà§à¦Ÿ লà§à¦¸à¦¿à¦¯à¦¼à¦¾", + "LI": "লিচেনসà§à¦Ÿà§‡à¦‡à¦¨", + "LK": "শà§à¦°à§€à¦²à¦™à§à¦•া", + "LR": "লাইবেরিয়া", + "LS": "লেসোথো", + "LT": "লিথà§à¦¯à¦¼à¦¾à¦¨à¦¿à¦¯à¦¼à¦¾", + "LU": "লাকà§à¦¸à§‡à¦®à¦¬à¦¾à¦°à§à¦—", + "LV": "লাতà§à¦­à¦¿à¦¯à¦¼à¦¾", + "LY": "লিবিয়া", + "MA": "মোরকà§à¦•à§‹", + "MC": "মোনাকো", + "MD": "মোলà§à¦¦à¦¾à¦­à¦¿à¦¯à¦¼à¦¾", + "ME": "মনà§à¦Ÿà¦¿à¦¨à¦¿à¦—à§à¦°à§‹", + "MF": "সেনà§à¦Ÿ মারà§à¦Ÿà¦¿à¦¨", + "MG": "মাদাগাসà§à¦•ার", + "MH": "মারà§à¦¶à¦¾à¦² দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "MK": "মà§à¦¯à¦¾à¦¸à¦¾à¦¡à§‹à¦¨à¦¿à¦¯à¦¼à¦¾", + "ML": "মালি", + "MM": "মায়ানমার (বারà§à¦®à¦¾)", + "MN": "মঙà§à¦—োলিয়া", + "MO": "মà§à¦¯à¦¾à¦•াও à¦à¦¸à¦à¦†à¦° চীনা", + "MP": "উতà§à¦¤à¦°à¦¾à¦žà§à¦šà¦²à§€à¦¯à¦¼ মারিয়ানা দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "MQ": "মারà§à¦Ÿà¦¿à¦¨à¦¿à¦•", + "MR": "মরিতানিয়া", + "MS": "মনà§à¦Ÿà¦¸à§‡à¦°à¦¾à¦Ÿ", + "MT": "মালà§à¦Ÿà¦¾", + "MU": "মরিশাস", + "MV": "মালদà§à¦¬à§€à¦ª", + "MW": "মালাউই", + "MX": "মেকà§à¦¸à¦¿à¦•à§‹", + "MY": "মালয়েশিয়া", + "MZ": "মোজামà§à¦¬à¦¿à¦•", + "NA": "নামিবিয়া", + "NC": "নিউ কà§à¦¯à¦¾à¦²à§‡à¦¡à§‹à¦¨à¦¿à¦¯à¦¼à¦¾", + "NE": "নাইজার", + "NF": "নিরফোক দà§à¦¬à§€à¦ª", + "NG": "নাইজেরিয়া", + "NI": "নিকারাগà§à¦¯à¦¼à¦¾", + "NL": "নেদারলà§à¦¯à¦¾à¦¨à§à¦¡à¦¸", + "NO": "নরওয়ে", + "NP": "নেপাল", + "NR": "নাউরà§", + "NU": "নিউয়ে", + "NZ": "নিউজিলà§à¦¯à¦¾à¦¨à§à¦¡", + "OM": "ওমান", + "PA": "পানামা", + "PE": "পেরà§", + "PF": "ফরাসী পলিনেশিয়া", + "PG": "পাপà§à¦¯à¦¼à¦¾ নিউ গিনি", + "PH": "ফিলিপাইন", + "PK": "পাকিসà§à¦¤à¦¾à¦¨", + "PL": "পোলà§à¦¯à¦¾à¦¨à§à¦¡", + "PM": "সেনà§à¦Ÿ পিয়ের ও মিকà§à¦¯à¦¼à§‡à¦²à¦¨", + "PN": "পিটকেয়ারà§à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "PR": "পà§à¦¯à¦¼à§‡à¦°à§à¦¤à§‹ রিকো", + "PS": "ফিলিসà§à¦¤à¦¿à¦¨ অঞà§à¦šà¦²à¦¸à¦®à§‚হ", + "PT": "পরà§à¦¤à§à¦—াল", + "PW": "পালাউ", + "PY": "পà§à¦¯à¦¾à¦°à¦¾à¦—à§à¦¯à¦¼à§‡", + "QA": "কাতার", + "RE": "রিইউনিয়ন", + "RO": "রোমানিয়া", + "RS": "সারà§à¦¬à¦¿à¦¯à¦¼à¦¾", + "RU": "রাশিয়া", + "RW": "রà§à¦¯à¦¼à¦¾à¦¨à§à¦¡à¦¾", + "SA": "সৌদি আরব", + "SB": "সলোমন দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "SC": "সিসিলি", + "SD": "সà§à¦¦à¦¾à¦¨", + "SE": "সà§à¦‡à¦¡à§‡à¦¨", + "SG": "সিঙà§à¦—াপà§à¦°", + "SH": "সেনà§à¦Ÿ হেলেনা", + "SI": "সà§à¦²à§‹à¦­à¦¾à¦¨à¦¿à¦¯à¦¼à¦¾", + "SJ": "সà§à¦¬à¦¾à¦²à¦¬à¦¾à¦°à§à¦¡ ও জান মেয়েন", + "SK": "সà§à¦²à§‹à¦­à¦¾à¦•িয়া", + "SL": "সিয়েরালিওন", + "SM": "সান মারিনো", + "SN": "সেনেগাল", + "SO": "সোমালিয়া", + "SR": "সà§à¦°à¦¿à¦¨à¦¾à¦®", + "SS": "দকà§à¦·à¦¿à¦£ সà§à¦¦à¦¾à¦¨", + "ST": "সাওটোমা ও পà§à¦°à¦¿à¦¨à§à¦¸à¦¿à¦ªà¦¿", + "SV": "à¦à¦² সালভেদর", + "SX": "সিনà§à¦Ÿ মারà§à¦Ÿà§‡à¦¨", + "SY": "সিরিয়া", + "SZ": "সোয়াজিলà§à¦¯à¦¾à¦¨à§à¦¡", + "TA": "টà§à¦°à¦¿à¦¸à§à¦Ÿà¦¾à¦¨ ডা কà§à¦¨à¦¹à¦¾", + "TC": "তà§à¦°à§à¦•স ও কাইকোস দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "TD": "চাদ", + "TF": "ফরাসী দকà§à¦·à¦¿à¦£à¦¾à¦žà§à¦šà¦²", + "TG": "টোগো", + "TH": "থাইলà§à¦¯à¦¾à¦¨à§à¦¡", + "TJ": "তাজিকসà§à¦¥à¦¾à¦¨", + "TK": "টোকেলাউ", + "TL": "তিমà§à¦°-লেসà§à¦¤à§‡", + "TM": "তà§à¦°à§à¦•মেনিসà§à¦¤à¦¾à¦¨", + "TN": "তিউনিসিয়া", + "TO": "টোঙà§à¦—া", + "TR": "তà§à¦°à¦¸à§à¦•", + "TT": "তà§à¦°à¦¿à¦¨à¦¿à¦¨à¦¾à¦¦ ও টোবà§à¦¯à¦¾à¦—à§‹", + "TV": "টà§à¦­à¦¾à¦²à§", + "TW": "তাইওয়ান", + "TZ": "তাঞà§à¦œà¦¾à¦¨à¦¿à¦¯à¦¼à¦¾", + "UA": "ইউকà§à¦°à§‡à¦¨", + "UG": "উগানà§à¦¡à¦¾", + "UM": "যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦°à§‡à¦° পারà§à¦¶à§à¦¬à¦¬à¦°à§à¦¤à§€ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "UN": "জাতিসংঘ", + "US": "মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦°", + "UY": "উরà§à¦—à§à¦¯à¦¼à§‡", + "UZ": "উজবেকিসà§à¦¤à¦¾à¦¨", + "VA": "ভà§à¦¯à¦¾à¦Ÿà¦¿à¦•ান সিটি", + "VC": "সেনà§à¦Ÿ ভিনসেনà§à¦Ÿ ও দà§à¦¯à¦¾ গà§à¦°à§‡à¦¨à¦¾à¦¡à¦¿à¦¨à¦¸", + "VE": "ভেনেজà§à¦¯à¦¼à§‡à¦²à¦¾", + "VG": "বà§à¦°à¦¿à¦Ÿà¦¿à¦¶ ভারà§à¦œà¦¿à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "VI": "মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦°à§‡à¦° ভারà§à¦œà¦¿à¦¨ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ", + "VN": "ভিয়েতনাম", + "VU": "ভানà§à¦¯à¦¼à¦¾à¦Ÿà§", + "WF": "ওয়ালিস ও ফà§à¦Ÿà§à¦¨à¦¾", + "WS": "সামোয়া", + "XK": "কসোভো", + "YE": "ইয়েমেন", + "YT": "মায়োতà§à¦¤à§‡", + "ZA": "দকà§à¦·à¦¿à¦£ আফà§à¦°à¦¿à¦•া", + "ZM": "জামà§à¦¬à¦¿à¦¯à¦¼à¦¾", + "ZW": "জিমà§à¦¬à¦¾à¦¬à§‹à¦¯à¦¼à§‡" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bn_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bn_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..147988e602ae9bffe489535cfeb6ac8cce5f4186 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bn_IN.json @@ -0,0 +1,8 @@ +{ + "Version": "2.1.29.54", + "Names": { + "HN": "হনà§à¦¡à§à¦°à¦¾à¦¸", + "MD": "মলডোভা", + "UM": "মারà§à¦•িন যà§à¦•à§à¦¤à¦°à¦¾à¦·à§à¦Ÿà§à¦°à§‡à¦° পারà§à¦¶à§à¦¬à¦¬à¦°à§à¦¤à§€ দà§à¦¬à§€à¦ªà¦ªà§à¦žà§à¦œ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bo.json new file mode 100644 index 0000000000000000000000000000000000000000..f704c5c0d00c694adf30aafbf0a1178aaecea19e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bo.json @@ -0,0 +1,15 @@ +{ + "Version": "2.1.27.40", + "Names": { + "CN": "རྒྱ་ནག", + "DE": "འཇར་མན་", + "GB": "དབྱིན་ཇི་", + "IN": "རྒྱ་གར་", + "IT": "ཨི་ཀྲར་ལི་", + "JP": "ཉི་ཧོང་", + "KR": "ལྷོ་ཀོ་རི་ཡà¼", + "NP": "བལ་ཡུལ་", + "RU": "ཨུ་རུ་སུ་", + "US": "ཨ་མེ་རི་ཀà¼" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bo_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bo_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..d2a4e7b1edf3c07ce22166d55599049c85b9d634 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bo_IN.json @@ -0,0 +1,4 @@ +{ + "Version": "2.1.27.40", + "Names": [] +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/br.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/br.json new file mode 100644 index 0000000000000000000000000000000000000000..628f124b4f14f7410cb309bc7138398f0223fbb2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/br.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AC": "Enez Ascension", + "AD": "Andorra", + "AE": "Emirelezhioù Arab Unanet", + "AF": "Afghanistan", + "AG": "Antigua ha Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antarktika", + "AR": "Arcʼhantina", + "AS": "Samoa Amerikan", + "AT": "Aostria", + "AU": "Aostralia", + "AW": "Aruba", + "AX": "Inizi Ã…land", + "AZ": "Azerbaidjan", + "BA": "Bosnia ha Herzegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Karib Nederlandat", + "BR": "Brazil", + "BS": "Bahamas", + "BT": "Bhoutan", + "BW": "Botswana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Inizi Kokoz", + "CD": "Kongo - Kinshasa", + "CF": "Republik Kreizafrikan", + "CG": "Kongo - Brazzaville", + "CH": "Suis", + "CI": "Aod an Olifant", + "CK": "Inizi Cook", + "CL": "Chile", + "CM": "Kameroun", + "CN": "Sina", + "CO": "Kolombia", + "CR": "Costa Rica", + "CU": "Kuba", + "CV": "Kab-Glas", + "CW": "Curaçao", + "CX": "Enez Christmas", + "CY": "Kiprenez", + "CZ": "Republik Tchek", + "DE": "Alamagn", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Danmark", + "DM": "Dominica", + "DO": "Republik Dominikan", + "DZ": "Aljeria", + "EA": "Ceuta ha Melilla", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Egipt", + "EH": "Sahara ar Cʼhornôg", + "ER": "Eritrea", + "ES": "Spagn", + "ET": "Etiopia", + "FI": "Finland", + "FJ": "Fidji", + "FK": "Inizi Falkland", + "FM": "Mikronezia", + "FO": "Inizi Faero", + "FR": "Frañs", + "GA": "Gabon", + "GB": "Rouantelezh-Unanet", + "GD": "Grenada", + "GE": "Jorjia", + "GF": "Gwiana cʼhall", + "GG": "Gwernenez", + "GH": "Ghana", + "GI": "Jibraltar", + "GL": "Greunland", + "GM": "Gambia", + "GN": "Ginea", + "GP": "Gwadeloup", + "GQ": "Ginea ar Cʼheheder", + "GR": "Gres", + "GS": "Inizi Georgia ar Su hag Inizi Sandwich ar Su", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Ginea-Bissau", + "GY": "Guyana", + "HK": "Hong Kong RMD Sina", + "HN": "Honduras", + "HR": "Kroatia", + "HT": "Haiti", + "HU": "Hungaria", + "IC": "Inizi Kanariez", + "ID": "Indonezia", + "IE": "Iwerzhon", + "IL": "Israel", + "IM": "Enez Vanav", + "IN": "India", + "IO": "Tiriad breizhveurat Meurvor Indez", + "IQ": "Iraq", + "IR": "Iran", + "IS": "Island", + "IT": "Italia", + "JE": "Jerzenez", + "JM": "Jamaika", + "JO": "Jordania", + "JP": "Japan", + "KE": "Kenya", + "KG": "Kyrgyzstan", + "KH": "Kambodja", + "KI": "Kiribati", + "KM": "Komorez", + "KN": "Saint Kitts ha Nevis", + "KP": "Korea an Norzh", + "KR": "Korea ar Su", + "KW": "Koweit", + "KY": "Inizi Cayman", + "KZ": "Kazakstan", + "LA": "Laos", + "LB": "Liban", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lituania", + "LU": "Luksembourg", + "LV": "Latvia", + "LY": "Libia", + "MA": "Maroko", + "MC": "Monaco", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "Saint Martin", + "MG": "Madagaskar", + "MH": "Inizi Marshall", + "MK": "Makedonia", + "ML": "Mali", + "MM": "Myanmar (Birmania)", + "MN": "Mongolia", + "MO": "Macau RMD Sina", + "MP": "Inizi Mariana an Norzh", + "MQ": "Martinik", + "MR": "Maouritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Moris", + "MV": "Maldivez", + "MW": "Malawi", + "MX": "Mecʼhiko", + "MY": "Malaysia", + "MZ": "Mozambik", + "NA": "Namibia", + "NC": "Kaledonia Nevez", + "NE": "Niger", + "NF": "Enez Norfolk", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Izelvroioù", + "NO": "Norvegia", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Zeland-Nevez", + "OM": "Oman", + "PA": "Panamá", + "PE": "Perou", + "PF": "Polinezia Cʼhall", + "PG": "Papoua Ginea-Nevez", + "PH": "Filipinez", + "PK": "Pakistan", + "PL": "Polonia", + "PM": "Sant-Pêr-ha-Mikelon", + "PN": "Enez Pitcairn", + "PR": "Puerto Rico", + "PS": "Tiriadoù Palestina", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Ar Reünion", + "RO": "Roumania", + "RS": "Serbia", + "RU": "Rusia", + "RW": "Rwanda", + "SA": "Arabia Saoudat", + "SB": "Inizi Salomon", + "SC": "Sechelez", + "SD": "Soudan", + "SE": "Sveden", + "SG": "Singapour", + "SH": "Saint-Helena", + "SI": "Slovenia", + "SJ": "Svalbard", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "SS": "Susoudan", + "ST": "São Tomé ha Príncipe", + "SV": "Salvador", + "SX": "Sint Maarten", + "SY": "Siria", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Inizi Turks ha Caicos", + "TD": "Tchad", + "TF": "Douaroù aostral Frañs", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tadjikistan", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turkmenistan", + "TN": "Tunizia", + "TO": "Tonga", + "TR": "Turkia", + "TT": "Trinidad ha Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraina", + "UG": "Ouganda", + "UM": "Inizi diabell ar Stadoù-Unanet", + "US": "Stadoù-Unanet", + "UY": "Uruguay", + "UZ": "Ouzbekistan", + "VA": "Vatikan", + "VC": "Sant Visant hag ar Grenadinez", + "VE": "Venezuela", + "VG": "Inizi Gwercʼh Breizh-Veur", + "VI": "Inizi Gwercʼh ar Stadoù-Unanet", + "VN": "Viêt Nam", + "VU": "Vanuatu", + "WF": "Wallis ha Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yemen", + "YT": "Mayotte", + "ZA": "Suafrika", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bs.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bs.json new file mode 100644 index 0000000000000000000000000000000000000000..9d267224b79f3feab316ce32317e3dee08e5437c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bs.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Ostrvo Asension", + "AD": "Andora", + "AE": "Ujedinjeni Arapski Emirati", + "AF": "Afganistan", + "AG": "Antigva i Barbuda", + "AI": "Angvila", + "AL": "Albanija", + "AM": "Armenija", + "AO": "Angola", + "AQ": "Antarktika", + "AR": "Argentina", + "AS": "AmeriÄka Samoa", + "AT": "Austrija", + "AU": "Australija", + "AW": "Aruba", + "AX": "Olandska Ostrva", + "AZ": "Azerbejdžan", + "BA": "Bosna i Hercegovina", + "BB": "Barbados", + "BD": "BangladeÅ¡", + "BE": "Belgija", + "BF": "Burkina Faso", + "BG": "Bugarska", + "BH": "Bahrein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Sveti Bartolomej", + "BM": "Bermuda", + "BN": "Brunej", + "BO": "Bolivija", + "BQ": "Karipska Holandija", + "BR": "Brazil", + "BS": "Bahami", + "BT": "Butan", + "BW": "Bocvana", + "BY": "Bjelorusija", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kokosova (Kilingova) Ostrva", + "CD": "Demokratska Republika Kongo", + "CF": "CentralnoafriÄka Republika", + "CG": "Kongo", + "CH": "Å vicarska", + "CI": "Obala SlonovaÄe", + "CK": "Kukova Ostrva", + "CL": "ÄŒile", + "CM": "Kamerun", + "CN": "Kina", + "CO": "Kolumbija", + "CR": "Kostarika", + "CU": "Kuba", + "CV": "Kape Verde", + "CW": "Kurasao", + "CX": "Božićna Ostrva", + "CY": "Kipar", + "CZ": "ÄŒeÅ¡ka Republika", + "DE": "NjemaÄka", + "DG": "Dijego Garsija", + "DJ": "Džibuti", + "DK": "Danska", + "DM": "Dominika", + "DO": "Dominikanska Republika", + "DZ": "Alžir", + "EA": "Seuta i Melilja", + "EC": "Ekvador", + "EE": "Estonija", + "EG": "Egipat", + "EH": "Zapadna Sahara", + "ER": "Eritreja", + "ES": "Å panija", + "ET": "Etiopija", + "FI": "Finska", + "FJ": "Fidži", + "FK": "Folklandska Ostrva", + "FM": "Mikronezija", + "FO": "Farska Ostrva", + "FR": "Francuska", + "GA": "Gabon", + "GB": "Velika Britanija", + "GD": "Grenada", + "GE": "Gruzija", + "GF": "Francuska Gvajana", + "GG": "Gernzi", + "GH": "Gana", + "GI": "Gibraltar", + "GL": "Grenland", + "GM": "Gambija", + "GN": "Gvineja", + "GP": "Gvadalupe", + "GQ": "Ekvatorijalna Gvineja", + "GR": "GrÄka", + "GS": "Južna Džordžija i Južna SendviÄka Ostrva", + "GT": "Gvatemala", + "GU": "Guam", + "GW": "Gvineja-Bisao", + "GY": "Gvajana", + "HK": "Hong Kong (SAR Kina)", + "HN": "Honduras", + "HR": "Hrvatska", + "HT": "Haiti", + "HU": "MaÄ‘arska", + "IC": "Kanarska Ostrva", + "ID": "Indonezija", + "IE": "Irska", + "IL": "Izrael", + "IM": "Ostrvo Man", + "IN": "Indija", + "IO": "Britanska Teritorija u Indijskom Okeanu", + "IQ": "Irak", + "IR": "Iran", + "IS": "Island", + "IT": "Italija", + "JE": "Džerzi", + "JM": "Jamajka", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenija", + "KG": "Kirgistan", + "KH": "Kambodža", + "KI": "Kiribati", + "KM": "Komorska Ostrva", + "KN": "Sveti Kits i Nevis", + "KP": "Sjeverna Koreja", + "KR": "Južna Koreja", + "KW": "Kuvajt", + "KY": "Kajmanska Ostrva", + "KZ": "Kazahstan", + "LA": "Laos", + "LB": "Liban", + "LC": "Sveta Lucija", + "LI": "LihtenÅ¡tajn", + "LK": "Å ri Lanka", + "LR": "Liberija", + "LS": "Lesoto", + "LT": "Litvanija", + "LU": "Luksemburg", + "LV": "Latvija", + "LY": "Libija", + "MA": "Maroko", + "MC": "Monako", + "MD": "Moldavija", + "ME": "Crna Gora", + "MF": "Sv. Martin", + "MG": "Madagaskar", + "MH": "MarÅ¡alova Ostrva", + "MK": "Makedonija", + "ML": "Mali", + "MM": "Mijanmar", + "MN": "Mongolija", + "MO": "Makao (SAR Kina)", + "MP": "Sjeverna Marijanska Ostrva", + "MQ": "Martinik", + "MR": "Mauritanija", + "MS": "Monserat", + "MT": "Malta", + "MU": "Mauricijus", + "MV": "Maldivi", + "MW": "Malavi", + "MX": "Meksiko", + "MY": "Malezija", + "MZ": "Mozambik", + "NA": "Namibija", + "NC": "Nova Kaledonija", + "NE": "Niger", + "NF": "Ostrvo Norfolk", + "NG": "Nigerija", + "NI": "Nikaragva", + "NL": "Holandija", + "NO": "NorveÅ¡ka", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Novi Zeland", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Francuska Polinezija", + "PG": "Papua Nova Gvineja", + "PH": "Filipini", + "PK": "Pakistan", + "PL": "Poljska", + "PM": "Sveti Petar i Mikelon", + "PN": "Pitkernska Ostrva", + "PR": "Porto Riko", + "PS": "Palestinska Teritorija", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paragvaj", + "QA": "Katar", + "RE": "Reunion", + "RO": "Rumunija", + "RS": "Srbija", + "RU": "Rusija", + "RW": "Ruanda", + "SA": "Saudijska Arabija", + "SB": "Solomonska Ostrva", + "SC": "SejÅ¡eli", + "SD": "Sudan", + "SE": "Å vedska", + "SG": "Singapur", + "SH": "Sveta Helena", + "SI": "Slovenija", + "SJ": "Svalbard i Jan Majen", + "SK": "SlovaÄka", + "SL": "Sijera Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalija", + "SR": "Surinam", + "SS": "Južni Sudan", + "ST": "Sao Tome i Principe", + "SV": "Salvador", + "SX": "Sint Marten", + "SY": "Sirija", + "SZ": "Svazilend", + "TA": "Tristan da Kunja", + "TC": "Ostrva Turks i Kaikos", + "TD": "ÄŒad", + "TF": "Francuske Južne Teritorije", + "TG": "Togo", + "TH": "Tajland", + "TJ": "Tadžikistan", + "TK": "Tokelau", + "TL": "IstoÄni Timor", + "TM": "Turkmenistan", + "TN": "Tunis", + "TO": "Tonga", + "TR": "Turska", + "TT": "Trinidad i Tobago", + "TV": "Tuvalu", + "TW": "Tajvan", + "TZ": "Tanzanija", + "UA": "Ukrajina", + "UG": "Uganda", + "UM": "AmeriÄka Vanjska Ostrva", + "UN": "Ujedinjene Nacije", + "US": "Sjedinjene AmeriÄke Države", + "UY": "Urugvaj", + "UZ": "Uzbekistan", + "VA": "Vatikan", + "VC": "Sveti Vinsent i Grenadin", + "VE": "Venecuela", + "VG": "Britanska DjeviÄanska Ostrva", + "VI": "AmeriÄka DjeviÄanska Ostrva", + "VN": "Vijetnam", + "VU": "Vanuatu", + "WF": "Ostrva Valis i Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Majote", + "ZA": "JužnoafriÄka Republika", + "ZM": "Zambija", + "ZW": "Zimbabve" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bs_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bs_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..50d1f34b41b8547669f724e1c0d65869a0beadbb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/bs_Cyrl.json @@ -0,0 +1,253 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AC": "ОÑтрво ÐÑенÑион", + "AD": "Ðндора", + "AE": "Уједињени ÐрапÑки Емирати", + "AF": "ÐвганиÑтан", + "AG": "Ðнтигва и Барбуда", + "AI": "Ðнгвила", + "AL": "Ðлбанија", + "AM": "Ðрменија", + "AO": "Ðнгола", + "AQ": "Ðнтарктик", + "AR": "Ðргентина", + "AS": "Ðмеричка Самоа", + "AT": "ÐуÑтрија", + "AU": "ÐуÑтралија", + "AW": "Ðруба", + "AX": "ÐландÑка оÑтрва", + "AZ": "Ðзербејџан", + "BA": "БоÑна и Херцеговина", + "BB": "БарбадоÑ", + "BD": "Бангладеш", + "BE": "Белгија", + "BF": "Буркина ФаÑо", + "BG": "БугарÑка", + "BH": "Бахреин", + "BI": "Бурунди", + "BJ": "Бенин", + "BL": "Свети Бартоломеј", + "BM": "Бермуда", + "BN": "Брунеј", + "BO": "Боливија", + "BR": "Бразил", + "BS": "Бахами", + "BT": "Бутан", + "BW": "Боцвана", + "BY": "БелоруÑија", + "BZ": "Белизе", + "CA": "Канада", + "CC": "ÐšÐ¾ÐºÐ¾Ñ (Келинг) ОÑтрва", + "CD": "Конго - КиншаÑа", + "CF": "Централно Ðфричка Република", + "CG": "Конго - Бразавил", + "CH": "ШвајцарÑка", + "CI": "Обала Слоноваче", + "CK": "Кукова ОÑтрва", + "CL": "Чиле", + "CM": "Камерун", + "CN": "Кина", + "CO": "Колумбија", + "CR": "КоÑтарика", + "CU": "Куба", + "CV": "Капе Верде", + "CX": "Божићна оÑтрва", + "CY": "Кипар", + "CZ": "Чешка", + "DE": "Ðемачка", + "DG": "Дијего ГарÑија", + "DJ": "Ðибути", + "DK": "ДанÑка", + "DM": "Доминика", + "DO": "ДоминиканÑка Република", + "DZ": "Ðлжир", + "EA": "Сеута и Мелиља", + "EC": "Еквадор", + "EE": "ЕÑтонија", + "EG": "Египат", + "EH": "Западна Сахара", + "ER": "Еритреја", + "ES": "Шпанија", + "ET": "Етиопија", + "FI": "ФинÑка", + "FJ": "Фиџи", + "FK": "ФокландÑка оÑтрва", + "FM": "Микронезија", + "FO": "ФарÑка ОÑтрва", + "FR": "ФранцуÑка", + "GA": "Габон", + "GB": "Велика Британија", + "GD": "Гренада", + "GE": "Грузија", + "GF": "ФранцуÑка Гвајана", + "GG": "ГурнÑи", + "GH": "Гана", + "GI": "Гибралтар", + "GL": "Гренланд", + "GM": "Гамбија", + "GN": "Гвинеја", + "GP": "Гваделупе", + "GQ": "Екваторијална Гвинеја", + "GR": "Грчка", + "GS": "Јужна Ðорџија и Јужна Сендвич ОÑтрва", + "GT": "Гватемала", + "GU": "Гуам", + "GW": "Гвинеја-БиÑао", + "GY": "Гвајана", + "HK": "Хонг Конг С. Ð. Р. Кина", + "HN": "ХондураÑ", + "HR": "ХрватÑка", + "HT": "Хаити", + "HU": "МађарÑка", + "IC": "КанарÑка оÑтрва", + "ID": "Индонезија", + "IE": "ИрÑка", + "IL": "Израел", + "IM": "ОÑтрво Ман", + "IN": "Индија", + "IO": "БританÑка територија у ИндијÑком океану", + "IQ": "Ирак", + "IR": "Иран", + "IS": "ИÑланд", + "IT": "Италија", + "JE": "ÐерÑи", + "JM": "Јамајка", + "JO": "Јордан", + "JP": "Јапан", + "KE": "Кенија", + "KG": "КиргизÑтан", + "KH": "Камбоџа", + "KI": "Кирибати", + "KM": "КоморÑка ОÑтрва", + "KN": "Сент ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ", + "KP": "Северна Кореја", + "KR": "Јужна Кореја", + "KW": "Кувајт", + "KY": "КајманÑка ОÑтрва", + "KZ": "КазахÑтан", + "LA": "ЛаоÑ", + "LB": "Либан", + "LC": "Сент Луција", + "LI": "Лихтенштајн", + "LK": "Шри Ланка", + "LR": "Либерија", + "LS": "ЛеÑото", + "LT": "Литванија", + "LU": "ЛукÑембург", + "LV": "Летонија", + "LY": "Либија", + "MA": "Мароко", + "MC": "Монако", + "MD": "Молдавија", + "ME": "Црна Гора", + "MF": "Сент Мартин", + "MG": "МадагаÑкар", + "MH": "МаршалÑка ОÑтрва", + "MK": "Македонија", + "ML": "Мали", + "MM": "Мијанмар (Бурма)", + "MN": "Монголија", + "MO": "Макао С. Ð. Р. Кина", + "MP": "Северна МаријанÑка ОÑтрва", + "MQ": "Мартиник", + "MR": "Мауританија", + "MS": "МонÑерат", + "MT": "Малта", + "MU": "МаурицијуÑ", + "MV": "Малдиви", + "MW": "Малави", + "MX": "МекÑико", + "MY": "Малезија", + "MZ": "Мозамбик", + "NA": "Ðамибија", + "NC": "Ðова Каледонија", + "NE": "Ðигер", + "NF": "Ðорфолк ОÑтрво", + "NG": "Ðигерија", + "NI": "Ðикарагва", + "NL": "Холандија", + "NO": "Ðорвешка", + "NP": "Ðепал", + "NR": "Ðауру", + "NU": "Ðиуе", + "NZ": "Ðови Зеланд", + "OM": "Оман", + "PA": "Панама", + "PE": "Перу", + "PF": "ФранцуÑка Полинезија", + "PG": "Папуа Ðова Гвинеја", + "PH": "Филипини", + "PK": "ПакиÑтан", + "PL": "ПољÑка", + "PM": "Сен Пјер и Микелон", + "PN": "Питкерн", + "PR": "Порто Рико", + "PS": "ПалеÑтинÑке територије", + "PT": "Португалија", + "PW": "Палау", + "PY": "Парагвај", + "QA": "Катар", + "RE": "Реинион", + "RO": "Румунија", + "RS": "Србија", + "RU": "РуÑија", + "RW": "Руанда", + "SA": "СаудијÑка Ðрабија", + "SB": "СоломонÑка ОÑтрва", + "SC": "Сејшели", + "SD": "Судан", + "SE": "ШведÑка", + "SG": "Сингапур", + "SH": "Света Јелена", + "SI": "Словенија", + "SJ": "Свалбард и Јанмајен ОÑтрва", + "SK": "Словачка", + "SL": "Сијера Леоне", + "SM": "Сан Марино", + "SN": "Сенегал", + "SO": "Сомалија", + "SR": "Суринам", + "ST": "Сао Томе и Принципе", + "SV": "Салвадор", + "SY": "Сирија", + "SZ": "Свазиленд", + "TA": "ТриÑтан да Куња", + "TC": "Ð¢ÑƒÑ€ÐºÑ Ð¸ ÐšÐ°Ñ˜ÐºÐ¾Ñ ÐžÑтрва", + "TD": "Чад", + "TF": "ФранцуÑке Јужне Територије", + "TG": "Того", + "TH": "Тајланд", + "TJ": "ТаџикиÑтан", + "TK": "Токелау", + "TL": "ИÑточни Тимор", + "TM": "ТуркмениÑтан", + "TN": "ТуниÑ", + "TO": "Тонга", + "TR": "ТурÑка", + "TT": "Тринидад и Тобаго", + "TV": "Тувалу", + "TW": "Тајван", + "TZ": "Танзанија", + "UA": "Украјина", + "UG": "Уганда", + "UM": "Мања удаљена оÑтрва СÐД", + "US": "Сједињене Ðмеричке Државе", + "UY": "Уругвај", + "UZ": "УзбекиÑтан", + "VA": "Ватикан", + "VC": "Сент ВинÑент и Гренадини", + "VE": "Венецуела", + "VG": "БританÑка ДевичанÑка ОÑтрва", + "VI": "С.Ð.Д. ДевичанÑка ОÑтрва", + "VN": "Вијетнам", + "VU": "Вануату", + "WF": "Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна ОÑтрва", + "WS": "Самоа", + "YE": "Јемен", + "YT": "Мајоте", + "ZA": "Јужноафричка Република", + "ZM": "Замбија", + "ZW": "Зимбабве" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ca.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ca.json new file mode 100644 index 0000000000000000000000000000000000000000..f1cb0703849587ee5357dbdeb418e9549c913831 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ca.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Illa de l’Ascensió", + "AD": "Andorra", + "AE": "Emirats Àrabs Units", + "AF": "Afganistan", + "AG": "Antigua i Barbuda", + "AI": "Anguilla", + "AL": "Albània", + "AM": "Armènia", + "AO": "Angola", + "AQ": "Antàrtida", + "AR": "Argentina", + "AS": "Samoa Nord-americana", + "AT": "Àustria", + "AU": "Austràlia", + "AW": "Aruba", + "AX": "Illes Ã…land", + "AZ": "Azerbaidjan", + "BA": "Bòsnia i Hercegovina", + "BB": "Barbados", + "BD": "Bangla Desh", + "BE": "Bèlgica", + "BF": "Burkina Faso", + "BG": "Bulgària", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benín", + "BL": "Saint Barthélemy", + "BM": "Bermudes", + "BN": "Brunei", + "BO": "Bolívia", + "BQ": "Carib Neerlandès", + "BR": "Brasil", + "BS": "Bahames", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Belarús", + "BZ": "Belize", + "CA": "Canadà", + "CC": "Illes Cocos", + "CD": "Congo - Kinshasa", + "CF": "República Centreafricana", + "CG": "Congo - Brazzaville", + "CH": "Suïssa", + "CI": "Costa d’Ivori", + "CK": "Illes Cook", + "CL": "Xile", + "CM": "Camerun", + "CN": "Xina", + "CO": "Colòmbia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Cap Verd", + "CW": "Curaçao", + "CX": "Illa Christmas", + "CY": "Xipre", + "CZ": "República Txeca", + "DE": "Alemanya", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Dinamarca", + "DM": "Dominica", + "DO": "República Dominicana", + "DZ": "Algèria", + "EA": "Ceuta i Melilla", + "EC": "Equador", + "EE": "Estònia", + "EG": "Egipte", + "EH": "Sàhara Occidental", + "ER": "Eritrea", + "ES": "Espanya", + "ET": "Etiòpia", + "FI": "Finlàndia", + "FJ": "Fiji", + "FK": "Illes Malvines", + "FM": "Micronèsia", + "FO": "Illes Fèroe", + "FR": "França", + "GA": "Gabon", + "GB": "Regne Unit", + "GD": "Grenada", + "GE": "Geòrgia", + "GF": "Guaiana Francesa", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grenlàndia", + "GM": "Gàmbia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Guinea Equatorial", + "GR": "Grècia", + "GS": "Illes Geòrgia del Sud i Sandwich del Sud", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea Bissau", + "GY": "Guyana", + "HK": "Hong Kong (RAE Xina)", + "HN": "Hondures", + "HR": "Croàcia", + "HT": "Haití", + "HU": "Hongria", + "IC": "Illes Canàries", + "ID": "Indonèsia", + "IE": "Irlanda", + "IL": "Israel", + "IM": "Illa de Man", + "IN": "Ãndia", + "IO": "Territori Britànic de l’Oceà Ãndic", + "IQ": "Iraq", + "IR": "Iran", + "IS": "Islàndia", + "IT": "Itàlia", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordània", + "JP": "Japó", + "KE": "Kenya", + "KG": "Kirguizistan", + "KH": "Cambodja", + "KI": "Kiribati", + "KM": "Comores", + "KN": "Saint Christopher i Nevis", + "KP": "Corea del Nord", + "KR": "Corea del Sud", + "KW": "Kuwait", + "KY": "Illes Caiman", + "KZ": "Kazakhstan", + "LA": "Laos", + "LB": "Líban", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Libèria", + "LS": "Lesotho", + "LT": "Lituània", + "LU": "Luxemburg", + "LV": "Letònia", + "LY": "Líbia", + "MA": "Marroc", + "MC": "Mònaco", + "MD": "Moldàvia", + "ME": "Montenegro", + "MF": "Saint Martin", + "MG": "Madagascar", + "MH": "Illes Marshall", + "MK": "Macedònia", + "ML": "Mali", + "MM": "Myanmar (Birmània)", + "MN": "Mongòlia", + "MO": "Macau (RAE Xina)", + "MP": "Illes Mariannes del Nord", + "MQ": "Martinica", + "MR": "Mauritània", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Maurici", + "MV": "Maldives", + "MW": "Malawi", + "MX": "Mèxic", + "MY": "Malàisia", + "MZ": "Moçambic", + "NA": "Namíbia", + "NC": "Nova Caledònia", + "NE": "Níger", + "NF": "Norfolk", + "NG": "Nigèria", + "NI": "Nicaragua", + "NL": "Països Baixos", + "NO": "Noruega", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nova Zelanda", + "OM": "Oman", + "PA": "Panamà", + "PE": "Perú", + "PF": "Polinèsia Francesa", + "PG": "Papua Nova Guinea", + "PH": "Filipines", + "PK": "Pakistan", + "PL": "Polònia", + "PM": "Saint-Pierre-et-Miquelon", + "PN": "Illes Pitcairn", + "PR": "Puerto Rico", + "PS": "territoris palestins", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguai", + "QA": "Qatar", + "RE": "Illa de la Reunió", + "RO": "Romania", + "RS": "Sèrbia", + "RU": "Rússia", + "RW": "Ruanda", + "SA": "Aràbia Saudita", + "SB": "Illes Salomó", + "SC": "Seychelles", + "SD": "Sudan", + "SE": "Suècia", + "SG": "Singapur", + "SH": "Saint Helena", + "SI": "Eslovènia", + "SJ": "Svalbard i Jan Mayen", + "SK": "Eslovàquia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somàlia", + "SR": "Surinam", + "SS": "Sudan del Sud", + "ST": "São Tomé i Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Síria", + "SZ": "Swazilàndia", + "TA": "Tristão da Cunha", + "TC": "Illes Turks i Caicos", + "TD": "Txad", + "TF": "Territoris Francesos del Sud", + "TG": "Togo", + "TH": "Tailàndia", + "TJ": "Tadjikistan", + "TK": "Tokelau", + "TL": "Timor Oriental", + "TM": "Turkmenistan", + "TN": "Tunísia", + "TO": "Tonga", + "TR": "Turquia", + "TT": "Trinitat i Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzània", + "UA": "Ucraïna", + "UG": "Uganda", + "UM": "Illes Perifèriques Menors dels EUA", + "UN": "Nacions Unides", + "US": "Estats Units", + "UY": "Uruguai", + "UZ": "Uzbekistan", + "VA": "Ciutat del Vaticà", + "VC": "Saint Vincent i les Grenadines", + "VE": "Veneçuela", + "VG": "Illes Verges Britàniques", + "VI": "Illes Verges Nord-americanes", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis i Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Iemen", + "YT": "Mayotte", + "ZA": "República de Sud-àfrica", + "ZM": "Zàmbia", + "ZW": "Zimbàbue" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ce.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ce.json new file mode 100644 index 0000000000000000000000000000000000000000..afcb2732c8d3fe85eee46f5f6b44c3c4f5342817 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ce.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AC": "Ðйъадаларан гӀайре", + "AD": "Ðндорра", + "AE": "Ӏарбийн Цхьанатоьхна Эмираташ", + "AF": "ОвхӀан-пачхьалкх", + "AG": "Ðнтигуа а, Барбуда а", + "AI": "ÐнгильÑ", + "AL": "Ðлбани", + "AM": "Эрмалойчоь", + "AO": "Ðнгола", + "AQ": "Ðнтарктида", + "AR": "Ðргентина", + "AS": "Ðмерикан Самоа", + "AT": "ÐвÑтри", + "AU": "ÐвÑтрали", + "AW": "Ðруба", + "AX": "Ðландан гӀайренаш", + "AZ": "Ðзербайджан", + "BA": "БоÑни а, Герцеговина а", + "BB": "БарбадоÑ", + "BD": "Бангладеш", + "BE": "Бельги", + "BF": "Буркина- ФаÑо", + "BG": "Болгари", + "BH": "Бахрейн", + "BI": "Бурунди", + "BJ": "Бенин", + "BL": "Сен-Бартельми", + "BM": "Бермудан гӀайренаш", + "BN": "Бруней-ДаруÑÑалам", + "BO": "Боливи", + "BQ": "БонÑйр, Синт-ЭÑÑ‚Ð°Ñ‚Ð¸ÑƒÑ Ð°, Саба а", + "BR": "Бразили", + "BS": "Багаман гӀайренаш", + "BT": "Бутан", + "BW": "БотÑвана", + "BY": "БелоруÑÑи", + "BZ": "Белиз", + "CA": "Канада", + "CC": "КокоÑийн гӀайренаш", + "CD": "Демократин РеÑпублика Конго", + "CF": "Юккъерчу Ðфрикин РеÑпублика", + "CG": "РеÑпублика Конго", + "CH": "Швейцари", + "CI": "Кот-Д’ивуар", + "CK": "Кукан гӀайренаш", + "CL": "Чили", + "CM": "Камерун", + "CN": "Китай", + "CO": "Колумби", + "CR": "КоÑта-Рика", + "CU": "Куба", + "CV": "Кабо-Верде", + "CW": "КюраÑао", + "CX": "ГӀайре ÓиÑа пайхÓамар вина де", + "CY": "Кипр", + "CZ": "Чехи", + "DE": "Германи", + "DG": "Диего-ГарÑи", + "DJ": "Джибути", + "DK": "Дани", + "DM": "Доминика", + "DO": "Доминикан РеÑпублика", + "DZ": "Ðлжир", + "EA": "Сеута а, ÐœÐµÐ»Ð¸Ð»ÑŒÑ Ð°", + "EC": "Эквадор", + "EE": "ЭÑтони", + "EG": "МиÑар", + "EH": "Малхбузен Саьхьара", + "ER": "Эритрей", + "ES": "ИÑпани", + "ET": "Эфиопи", + "FI": "ФинлÑнди", + "FJ": "Фиджи", + "FK": "Фолклендан гӀайренаш", + "FM": "Микронезин Федеративни штаташ", + "FO": "Фарерийн гӀайренаш", + "FR": "Франци", + "GA": "Габон", + "GB": "Йоккха Британи", + "GD": "Гренада", + "GE": "Гуьржийчоь", + "GF": "Французийн Гвиана", + "GG": "ГернÑи", + "GH": "Гана", + "GI": "Гибралтар", + "GL": "Гренланди", + "GM": "Гамби", + "GN": "Гвиней", + "GP": "Гваделупа", + "GQ": "Экваторан Гвиней", + "GR": "Греци", + "GS": "Къилба Джорджи а, Къилба Гавайн гӀайренаш а", + "GT": "Гватемала", + "GU": "Гуам", + "GW": "Гвиней-БиÑау", + "GY": "Гайана", + "HK": "Гонконг (ша-къаьÑтина кӀошт)", + "HN": "ГондураÑ", + "HR": "Хорвати", + "HT": "Гаити", + "HU": "Венгри", + "IC": "Канаран гӀайренаш", + "ID": "Индонези", + "IE": "Ирланди", + "IL": "Израиль", + "IM": "МÑн гӀайре", + "IN": "Инди", + "IO": "Британин латта Индин океанехь", + "IQ": "Ӏиракъ", + "IR": "ГӀажарийчоь", + "IS": "ИÑланди", + "IT": "Итали", + "JE": "ДжерÑи", + "JM": "Ямайка", + "JO": "Урдан", + "JP": "Япони", + "KE": "Кени", + "KG": "Киргизи", + "KH": "Камбоджа", + "KI": "Кирибати", + "KM": "Комораш", + "KN": "Сент-ÐšÐ¸Ñ‚Ñ Ð°, ÐÐµÐ²Ð¸Ñ Ð°", + "KP": "КъилбаÑеда Корей", + "KR": "Къилба Корей", + "KW": "Кувейт", + "KY": "Кайман гӀайренаш", + "KZ": "КазахÑтан", + "LA": "ЛаоÑ", + "LB": "Ливан", + "LC": "Сент-ЛюÑи", + "LI": "Лихтенштейн", + "LK": "Шри-Ланка", + "LR": "Либери", + "LS": "ЛеÑото", + "LT": "Литва", + "LU": "ЛюкÑембург", + "LV": "Латви", + "LY": "Ливи", + "MA": "Марокко", + "MC": "Монако", + "MD": "Молдави", + "ME": "Ӏаьржаламанхойчоь", + "MF": "Сен-Мартен", + "MG": "МадагаÑкар", + "MH": "Маршаллан гӀайренаш", + "MK": "Македони", + "ML": "Мали", + "MM": "МьÑнма (Бирма)", + "MN": "Монголи", + "MO": "Макао (ша-къаьÑтина кӀошт)", + "MP": "КъилбаÑеда Марианан гӀайренаш", + "MQ": "Мартиника", + "MR": "Мавритани", + "MS": "МонтÑеррат", + "MT": "Мальта", + "MU": "Маврики", + "MV": "Мальдиваш", + "MW": "Малави", + "MX": "МекÑика", + "MY": "Малайзи", + "MZ": "Мозамбик", + "NA": "Ðамиби", + "NC": "Керла Каледони", + "NE": "Ðигер", + "NF": "Ðорфолк гӀайре", + "NG": "Ðигери", + "NI": "Ðикарагуа", + "NL": "Ðидерландаш", + "NO": "Ðорвеги", + "NP": "Ðепал", + "NR": "Ðауру", + "NU": "ÐиуÑ", + "NZ": "Керла Зеланди", + "OM": "Оман", + "PA": "Панама", + "PE": "Перу", + "PF": "Французийн Полинези", + "PG": "Папуа — Керла Гвиней", + "PH": "Филиппинаш", + "PK": "ПакиÑтан", + "PL": "Польша", + "PM": "Сен-Пьер а, Микелон а", + "PN": "ПиткÑрн гӀайренаш", + "PR": "ПуÑрто-Рико", + "PS": "ПалеÑтинан латтанаш", + "PT": "Португали", + "PW": "Палау", + "PY": "Парагвай", + "QA": "Катар", + "RE": "Реюньон", + "RO": "Румыни", + "RS": "Серби", + "RU": "РоÑÑи", + "RW": "Руанда", + "SA": "СаӀудийн Ðрави", + "SB": "Соломонан гӀайренаш", + "SC": "Сейшелан гӀайренаш", + "SD": "Судан", + "SE": "Швеци", + "SG": "Сингапур", + "SH": "Сийлахьчу Еленин гӀайре", + "SI": "Словени", + "SJ": "Шпицберген а, Ян-Майен а", + "SK": "Словаки", + "SL": "Сьерра- Леоне", + "SM": "Сан-Марино", + "SN": "Сенегал", + "SO": "Сомали", + "SR": "Суринам", + "SS": "Къилба Судан", + "ST": "Сан-Томе а, ПринÑипи а", + "SV": "Сальвадор", + "SX": "Синт-Мартен", + "SY": "Шема", + "SZ": "Свазиленд", + "TA": "ТриÑтан-да- КуньÑ", + "TC": "Ð¢Ñ‘Ñ€ÐºÑ Ð°, ÐšÐ°Ð¹ÐºÐ¾Ñ Ð° гӀайренаш", + "TD": "Чад", + "TF": "Французийн къилба латтанаш", + "TG": "Того", + "TH": "Таиланд", + "TJ": "ТаджикиÑтан", + "TK": "Токелау", + "TL": "Малхбален Тимор", + "TM": "Туркмени", + "TN": "ТуниÑ", + "TO": "Тонга", + "TR": "Туркойчоь", + "TT": "Тринидад а, Тобаго а", + "TV": "Тувалу", + "TW": "Тайвань", + "TZ": "Танзани", + "UA": "Украина", + "UG": "Уганда", + "UM": "ÐЦШн арахьара кегийн гӀайренаш", + "US": "Цхьанатоьхна Штаташ", + "UY": "Уругвай", + "UZ": "УзбекиÑтан", + "VA": "Ватикан", + "VC": "Сент-ВинÑент а, Гренадинаш а", + "VE": "ВенеÑуÑла", + "VG": "Виргинийн гӀайренаш (Британи)", + "VI": "Виргинийн гӀайренаш (ÐЦШ)", + "VN": "Вьетнам", + "VU": "Вануату", + "WF": "Ð£Ð¾Ð»Ð»Ð¸Ñ Ð°, Футуна а", + "WS": "Самоа", + "XK": "КоÑово", + "YE": "Йемен", + "YT": "Майотта", + "ZA": "Къилба-Ðфрикин РеÑпублика", + "ZM": "Замби", + "ZW": "Зимбабве" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/cs.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/cs.json new file mode 100644 index 0000000000000000000000000000000000000000..737067e32c4c1b4dafdb09114052607cc869380d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/cs.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Ascension", + "AD": "Andorra", + "AE": "Spojené arabské emiráty", + "AF": "Afghánistán", + "AG": "Antigua a Barbuda", + "AI": "Anguilla", + "AL": "Albánie", + "AM": "Arménie", + "AO": "Angola", + "AQ": "Antarktida", + "AR": "Argentina", + "AS": "Americká Samoa", + "AT": "Rakousko", + "AU": "Austrálie", + "AW": "Aruba", + "AX": "Ã…landy", + "AZ": "Ãzerbájdžán", + "BA": "Bosna a Hercegovina", + "BB": "Barbados", + "BD": "Bangladéš", + "BE": "Belgie", + "BF": "Burkina Faso", + "BG": "Bulharsko", + "BH": "Bahrajn", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Svatý BartolomÄ›j", + "BM": "Bermudy", + "BN": "Brunej", + "BO": "Bolívie", + "BQ": "Karibské Nizozemsko", + "BR": "Brazílie", + "BS": "Bahamy", + "BT": "Bhútán", + "BW": "Botswana", + "BY": "BÄ›lorusko", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kokosové ostrovy", + "CD": "Kongo – Kinshasa", + "CF": "StÅ™edoafrická republika", + "CG": "Kongo – Brazzaville", + "CH": "Å výcarsko", + "CI": "PobÅ™eží slonoviny", + "CK": "Cookovy ostrovy", + "CL": "Chile", + "CM": "Kamerun", + "CN": "Čína", + "CO": "Kolumbie", + "CR": "Kostarika", + "CU": "Kuba", + "CV": "Kapverdy", + "CW": "Curaçao", + "CX": "VánoÄní ostrov", + "CY": "Kypr", + "CZ": "ÄŒeská republika", + "DE": "NÄ›mecko", + "DG": "Diego García", + "DJ": "Džibutsko", + "DK": "Dánsko", + "DM": "Dominika", + "DO": "Dominikánská republika", + "DZ": "Alžírsko", + "EA": "Ceuta a Melilla", + "EC": "Ekvádor", + "EE": "Estonsko", + "EG": "Egypt", + "EH": "Západní Sahara", + "ER": "Eritrea", + "ES": "Å panÄ›lsko", + "ET": "Etiopie", + "FI": "Finsko", + "FJ": "Fidži", + "FK": "Falklandské ostrovy", + "FM": "Mikronésie", + "FO": "Faerské ostrovy", + "FR": "Francie", + "GA": "Gabon", + "GB": "Spojené království", + "GD": "Grenada", + "GE": "Gruzie", + "GF": "Francouzská Guyana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grónsko", + "GM": "Gambie", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Rovníková Guinea", + "GR": "Řecko", + "GS": "Jižní Georgie a Jižní Sandwichovy ostrovy", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hongkong – ZAO Číny", + "HN": "Honduras", + "HR": "Chorvatsko", + "HT": "Haiti", + "HU": "MaÄarsko", + "IC": "Kanárské ostrovy", + "ID": "Indonésie", + "IE": "Irsko", + "IL": "Izrael", + "IM": "Ostrov Man", + "IN": "Indie", + "IO": "Britské indickooceánské území", + "IQ": "Irák", + "IR": "Ãrán", + "IS": "Island", + "IT": "Itálie", + "JE": "Jersey", + "JM": "Jamajka", + "JO": "Jordánsko", + "JP": "Japonsko", + "KE": "Keňa", + "KG": "Kyrgyzstán", + "KH": "Kambodža", + "KI": "Kiribati", + "KM": "Komory", + "KN": "Svatý KryÅ¡tof a Nevis", + "KP": "Severní Korea", + "KR": "Jižní Korea", + "KW": "Kuvajt", + "KY": "Kajmanské ostrovy", + "KZ": "Kazachstán", + "LA": "Laos", + "LB": "Libanon", + "LC": "Svatá Lucie", + "LI": "LichtenÅ¡tejnsko", + "LK": "Srí Lanka", + "LR": "Libérie", + "LS": "Lesotho", + "LT": "Litva", + "LU": "Lucembursko", + "LV": "LotyÅ¡sko", + "LY": "Libye", + "MA": "Maroko", + "MC": "Monako", + "MD": "Moldavsko", + "ME": "ÄŒerná Hora", + "MF": "Svatý Martin (Francie)", + "MG": "Madagaskar", + "MH": "Marshallovy ostrovy", + "MK": "Makedonie", + "ML": "Mali", + "MM": "Myanmar (Barma)", + "MN": "Mongolsko", + "MO": "Macao – ZAO Číny", + "MP": "Severní Mariany", + "MQ": "Martinik", + "MR": "Mauritánie", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauricius", + "MV": "Maledivy", + "MW": "Malawi", + "MX": "Mexiko", + "MY": "Malajsie", + "MZ": "Mosambik", + "NA": "Namibie", + "NC": "Nová Kaledonie", + "NE": "Niger", + "NF": "Norfolk", + "NG": "Nigérie", + "NI": "Nikaragua", + "NL": "Nizozemsko", + "NO": "Norsko", + "NP": "Nepál", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nový Zéland", + "OM": "Omán", + "PA": "Panama", + "PE": "Peru", + "PF": "Francouzská Polynésie", + "PG": "Papua-Nová Guinea", + "PH": "Filipíny", + "PK": "Pákistán", + "PL": "Polsko", + "PM": "Saint-Pierre a Miquelon", + "PN": "Pitcairnovy ostrovy", + "PR": "Portoriko", + "PS": "Palestinská území", + "PT": "Portugalsko", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Katar", + "RE": "Réunion", + "RO": "Rumunsko", + "RS": "Srbsko", + "RU": "Rusko", + "RW": "Rwanda", + "SA": "Saúdská Arábie", + "SB": "Å alamounovy ostrovy", + "SC": "Seychely", + "SD": "Súdán", + "SE": "Å védsko", + "SG": "Singapur", + "SH": "Svatá Helena", + "SI": "Slovinsko", + "SJ": "Å picberky a Jan Mayen", + "SK": "Slovensko", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somálsko", + "SR": "Surinam", + "SS": "Jižní Súdán", + "ST": "Svatý Tomáš a Princův ostrov", + "SV": "Salvador", + "SX": "Svatý Martin (Nizozemsko)", + "SY": "Sýrie", + "SZ": "Svazijsko", + "TA": "Tristan da Cunha", + "TC": "Turks a Caicos", + "TD": "ÄŒad", + "TF": "Francouzská jižní území", + "TG": "Togo", + "TH": "Thajsko", + "TJ": "Tádžikistán", + "TK": "Tokelau", + "TL": "Východní Timor", + "TM": "Turkmenistán", + "TN": "Tunisko", + "TO": "Tonga", + "TR": "Turecko", + "TT": "Trinidad a Tobago", + "TV": "Tuvalu", + "TW": "Tchaj-wan", + "TZ": "Tanzanie", + "UA": "Ukrajina", + "UG": "Uganda", + "UM": "Menší odlehlé ostrovy USA", + "UN": "OSN", + "US": "Spojené státy", + "UY": "Uruguay", + "UZ": "Uzbekistán", + "VA": "Vatikán", + "VC": "Svatý Vincenc a Grenadiny", + "VE": "Venezuela", + "VG": "Britské Panenské ostrovy", + "VI": "Americké Panenské ostrovy", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis a Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Jihoafrická republika", + "ZM": "Zambie", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/cy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/cy.json new file mode 100644 index 0000000000000000000000000000000000000000..dc718c0f026eeef7ac386b473737b08cdcc4a1d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/cy.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.30.6", + "Names": { + "AC": "Ynys Ascension", + "AD": "Andorra", + "AE": "Emiradau Arabaidd Unedig", + "AF": "Afghanistan", + "AG": "Antigua a Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antarctica", + "AR": "Yr Ariannin", + "AS": "Samoa America", + "AT": "Awstria", + "AU": "Awstralia", + "AW": "Aruba", + "AX": "Ynysoedd Ã…land", + "AZ": "Azerbaijan", + "BA": "Bosnia a Hercegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Gwlad Belg", + "BF": "Burkina Faso", + "BG": "Bwlgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolifia", + "BQ": "Antilles yr Iseldiroedd", + "BR": "Brasil", + "BS": "Y Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Belarws", + "BZ": "Belize", + "CA": "Canada", + "CC": "Ynysoedd Cocos (Keeling)", + "CD": "Y Congo - Kinshasa", + "CF": "Gweriniaeth Canolbarth Affrica", + "CG": "Y Congo - Brazzaville", + "CH": "Y Swistir", + "CI": "Côte d’Ivoire", + "CK": "Ynysoedd Cook", + "CL": "Chile", + "CM": "Camerŵn", + "CN": "Tsieina", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Ciwba", + "CV": "Cabo Verde", + "CW": "Curaçao", + "CX": "Ynys y Nadolig", + "CY": "Cyprus", + "CZ": "Gweriniaeth Tsiec", + "DE": "Yr Almaen", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Denmarc", + "DM": "Dominica", + "DO": "Gweriniaeth Dominica", + "DZ": "Algeria", + "EA": "Ceuta a Melilla", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Yr Aifft", + "EH": "Gorllewin Sahara", + "ER": "Eritrea", + "ES": "Sbaen", + "ET": "Ethiopia", + "FI": "Y Ffindir", + "FJ": "Fiji", + "FK": "Ynysoedd y Falkland\/Malvinas", + "FM": "Micronesia", + "FO": "Ynysoedd Ffaro", + "FR": "Ffrainc", + "GA": "Gabon", + "GB": "Y Deyrnas Unedig", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Guyane Ffrengig", + "GG": "Ynys y Garn", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Yr Ynys Las", + "GM": "Gambia", + "GN": "Guinée", + "GP": "Guadeloupe", + "GQ": "Guinea Gyhydeddol", + "GR": "Gwlad Groeg", + "GS": "De Georgia ac Ynysoedd Sandwich y De", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guiné-Bissau", + "GY": "Guyana", + "HK": "Hong Kong RhGA Tsieina", + "HN": "Honduras", + "HR": "Croatia", + "HT": "Haiti", + "HU": "Hwngari", + "IC": "Yr Ynysoedd Dedwydd", + "ID": "Indonesia", + "IE": "Iwerddon", + "IL": "Israel", + "IM": "Ynys Manaw", + "IN": "India", + "IO": "Tiriogaeth Brydeinig Cefnfor India", + "IQ": "Irac", + "IR": "Iran", + "IS": "Gwlad yr Iâ", + "IT": "Yr Eidal", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Gwlad Iorddonen", + "JP": "Japan", + "KE": "Kenya", + "KG": "Kyrgyzstan", + "KH": "Cambodia", + "KI": "Kiribati", + "KM": "Comoros", + "KN": "Saint Kitts a Nevis", + "KP": "Gogledd Korea", + "KR": "De Korea", + "KW": "Kuwait", + "KY": "Ynysoedd Cayman", + "KZ": "Kazakstan", + "LA": "Laos", + "LB": "Libanus", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lithuania", + "LU": "Lwcsembwrg", + "LV": "Latfia", + "LY": "Libya", + "MA": "Moroco", + "MC": "Monaco", + "MD": "Moldofa", + "ME": "Montenegro", + "MF": "Saint Martin", + "MG": "Madagascar", + "MH": "Ynysoedd Marshall", + "MK": "Macedonia", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongolia", + "MO": "Macau RhGA Tsieina", + "MP": "Ynysoedd Gogledd Mariana", + "MQ": "Martinique", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Y Maldives", + "MW": "Malawi", + "MX": "Mecsico", + "MY": "Malaysia", + "MZ": "Mozambique", + "NA": "Namibia", + "NC": "Caledonia Newydd", + "NE": "Niger", + "NF": "Ynys Norfolk", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Yr Iseldiroedd", + "NO": "Norwy", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Seland Newydd", + "OM": "Oman", + "PA": "Panama", + "PE": "Periw", + "PF": "Polynesia Ffrengig", + "PG": "Papua Guinea Newydd", + "PH": "Y Philipinau", + "PK": "Pakistan", + "PL": "Gwlad Pwyl", + "PM": "Saint-Pierre-et-Miquelon", + "PN": "Ynysoedd Pitcairn", + "PR": "Puerto Rico", + "PS": "Tiriogaethau Palesteinaidd", + "PT": "Portiwgal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Rwmania", + "RS": "Serbia", + "RU": "Rwsia", + "RW": "Rwanda", + "SA": "Saudi Arabia", + "SB": "Ynysoedd Solomon", + "SC": "Seychelles", + "SD": "Swdan", + "SE": "Sweden", + "SG": "Singapore", + "SH": "Saint Helena", + "SI": "Slofenia", + "SJ": "Svalbard a Jan Mayen", + "SK": "Slofacia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "SS": "De Swdan", + "ST": "São Tomé a Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syria", + "SZ": "Gwlad Swazi", + "TA": "Tristan da Cunha", + "TC": "Ynysoedd Turks a Caicos", + "TD": "Tchad", + "TF": "Tiroedd Deheuol ac Antarctig Ffrainc", + "TG": "Togo", + "TH": "Gwlad Thai", + "TJ": "Tajikistan", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Twrci", + "TT": "Trinidad a Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Wcráin", + "UG": "Uganda", + "UM": "Ynysoedd Pellennig UDA", + "UN": "Cenhedloedd Unedig", + "US": "Yr Unol Daleithiau", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VA": "Y Fatican", + "VC": "Saint Vincent a’r Grenadines", + "VE": "Venezuela", + "VG": "Ynysoedd Gwyryf Prydain", + "VI": "Ynysoedd Gwyryf yr Unol Daleithiau", + "VN": "Fietnam", + "VU": "Vanuatu", + "WF": "Wallis a Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yemen", + "YT": "Mayotte", + "ZA": "De Affrica", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/da.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/da.json new file mode 100644 index 0000000000000000000000000000000000000000..331ba5a7112a94dba62bad52dcea1a156ded96d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/da.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Ascensionøen", + "AD": "Andorra", + "AE": "De Forenede Arabiske Emirater", + "AF": "Afghanistan", + "AG": "Antigua og Barbuda", + "AI": "Anguilla", + "AL": "Albanien", + "AM": "Armenien", + "AO": "Angola", + "AQ": "Antarktis", + "AR": "Argentina", + "AS": "Amerikansk Samoa", + "AT": "Østrig", + "AU": "Australien", + "AW": "Aruba", + "AX": "Ã…land", + "AZ": "Aserbajdsjan", + "BA": "Bosnien-Hercegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgien", + "BF": "Burkina Faso", + "BG": "Bulgarien", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "De tidligere Nederlandske Antiller", + "BR": "Brasilien", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Hviderusland", + "BZ": "Belize", + "CA": "Canada", + "CC": "Cocosøerne", + "CD": "Congo-Kinshasa", + "CF": "Den Centralafrikanske Republik", + "CG": "Congo-Brazzaville", + "CH": "Schweiz", + "CI": "Elfenbenskysten", + "CK": "Cookøerne", + "CL": "Chile", + "CM": "Cameroun", + "CN": "Kina", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Kap Verde", + "CW": "Curaçao", + "CX": "Juleøen", + "CY": "Cypern", + "CZ": "Tjekkiet", + "DE": "Tyskland", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Danmark", + "DM": "Dominica", + "DO": "Den Dominikanske Republik", + "DZ": "Algeriet", + "EA": "Ceuta og Melilla", + "EC": "Ecuador", + "EE": "Estland", + "EG": "Egypten", + "EH": "Vestsahara", + "ER": "Eritrea", + "ES": "Spanien", + "ET": "Etiopien", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Falklandsøerne", + "FM": "Mikronesiens Forenede Stater", + "FO": "Færøerne", + "FR": "Frankrig", + "GA": "Gabon", + "GB": "Storbritannien", + "GD": "Grenada", + "GE": "Georgien", + "GF": "Fransk Guyana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grønland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Ækvatorialguinea", + "GR": "Grækenland", + "GS": "South Georgia og De Sydlige Sandwichøer", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "SAR Hongkong", + "HN": "Honduras", + "HR": "Kroatien", + "HT": "Haiti", + "HU": "Ungarn", + "IC": "Kanariske øer", + "ID": "Indonesien", + "IE": "Irland", + "IL": "Israel", + "IM": "Isle of Man", + "IN": "Indien", + "IO": "Det britiske territorium i Det Indiske Ocean", + "IQ": "Irak", + "IR": "Iran", + "IS": "Island", + "IT": "Italien", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenya", + "KG": "Kirgisistan", + "KH": "Cambodja", + "KI": "Kiribati", + "KM": "Comorerne", + "KN": "Saint Kitts og Nevis", + "KP": "Nordkorea", + "KR": "Sydkorea", + "KW": "Kuwait", + "KY": "Caymanøerne", + "KZ": "Kasakhstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Litauen", + "LU": "Luxembourg", + "LV": "Letland", + "LY": "Libyen", + "MA": "Marokko", + "MC": "Monaco", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "Saint Martin", + "MG": "Madagaskar", + "MH": "Marshalløerne", + "MK": "Makedonien", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongoliet", + "MO": "SAR Macao", + "MP": "Nordmarianerne", + "MQ": "Martinique", + "MR": "Mauretanien", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldiverne", + "MW": "Malawi", + "MX": "Mexico", + "MY": "Malaysia", + "MZ": "Mozambique", + "NA": "Namibia", + "NC": "Ny Kaledonien", + "NE": "Niger", + "NF": "Norfolk Island", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Holland", + "NO": "Norge", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "New Zealand", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Fransk Polynesien", + "PG": "Papua Ny Guinea", + "PH": "Filippinerne", + "PK": "Pakistan", + "PL": "Polen", + "PM": "Saint Pierre og Miquelon", + "PN": "Pitcairn", + "PR": "Puerto Rico", + "PS": "De palæstinensiske omrÃ¥der", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Rumænien", + "RS": "Serbien", + "RU": "Rusland", + "RW": "Rwanda", + "SA": "Saudi-Arabien", + "SB": "Salomonøerne", + "SC": "Seychellerne", + "SD": "Sudan", + "SE": "Sverige", + "SG": "Singapore", + "SH": "St. Helena", + "SI": "Slovenien", + "SJ": "Svalbard og Jan Mayen", + "SK": "Slovakiet", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "SS": "Sydsudan", + "ST": "São Tomé og Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syrien", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Turks- og Caicosøerne", + "TD": "Tchad", + "TF": "De franske besiddelser i Det Sydlige Indiske Ocean", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tadsjikistan", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turkmenistan", + "TN": "Tunesien", + "TO": "Tonga", + "TR": "Tyrkiet", + "TT": "Trinidad og Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraine", + "UG": "Uganda", + "UM": "Amerikanske oversøiske øer", + "UN": "Forenede Nationer", + "US": "USA", + "UY": "Uruguay", + "UZ": "Usbekistan", + "VA": "Vatikanstaten", + "VC": "Saint Vincent og Grenadinerne", + "VE": "Venezuela", + "VG": "De Britiske Jomfruøer", + "VI": "De Amerikanske Jomfruøer", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis og Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yemen", + "YT": "Mayotte", + "ZA": "Sydafrika", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/de.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/de.json new file mode 100644 index 0000000000000000000000000000000000000000..ad760aa13d245d50b84391684f1bcbe82ae8f992 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/de.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Ascension", + "AD": "Andorra", + "AE": "Vereinigte Arabische Emirate", + "AF": "Afghanistan", + "AG": "Antigua und Barbuda", + "AI": "Anguilla", + "AL": "Albanien", + "AM": "Armenien", + "AO": "Angola", + "AQ": "Antarktis", + "AR": "Argentinien", + "AS": "Amerikanisch-Samoa", + "AT": "Österreich", + "AU": "Australien", + "AW": "Aruba", + "AX": "Ã…landinseln", + "AZ": "Aserbaidschan", + "BA": "Bosnien und Herzegowina", + "BB": "Barbados", + "BD": "Bangladesch", + "BE": "Belgien", + "BF": "Burkina Faso", + "BG": "Bulgarien", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "St. Barthélemy", + "BM": "Bermuda", + "BN": "Brunei Darussalam", + "BO": "Bolivien", + "BQ": "Bonaire, Sint Eustatius und Saba", + "BR": "Brasilien", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botsuana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kokosinseln", + "CD": "Kongo-Kinshasa", + "CF": "Zentralafrikanische Republik", + "CG": "Kongo-Brazzaville", + "CH": "Schweiz", + "CI": "Côte d’Ivoire", + "CK": "Cookinseln", + "CL": "Chile", + "CM": "Kamerun", + "CN": "China", + "CO": "Kolumbien", + "CR": "Costa Rica", + "CU": "Kuba", + "CV": "Cabo Verde", + "CW": "Curaçao", + "CX": "Weihnachtsinsel", + "CY": "Zypern", + "CZ": "Tschechische Republik", + "DE": "Deutschland", + "DG": "Diego Garcia", + "DJ": "Dschibuti", + "DK": "Dänemark", + "DM": "Dominica", + "DO": "Dominikanische Republik", + "DZ": "Algerien", + "EA": "Ceuta und Melilla", + "EC": "Ecuador", + "EE": "Estland", + "EG": "Ägypten", + "EH": "Westsahara", + "ER": "Eritrea", + "ES": "Spanien", + "ET": "Äthiopien", + "FI": "Finnland", + "FJ": "Fidschi", + "FK": "Falklandinseln", + "FM": "Mikronesien", + "FO": "Färöer", + "FR": "Frankreich", + "GA": "Gabun", + "GB": "Vereinigtes Königreich", + "GD": "Grenada", + "GE": "Georgien", + "GF": "Französisch-Guayana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grönland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Äquatorialguinea", + "GR": "Griechenland", + "GS": "Südgeorgien und die Südlichen Sandwichinseln", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Sonderverwaltungszone Hongkong", + "HN": "Honduras", + "HR": "Kroatien", + "HT": "Haiti", + "HU": "Ungarn", + "IC": "Kanarische Inseln", + "ID": "Indonesien", + "IE": "Irland", + "IL": "Israel", + "IM": "Isle of Man", + "IN": "Indien", + "IO": "Britisches Territorium im Indischen Ozean", + "IQ": "Irak", + "IR": "Iran", + "IS": "Island", + "IT": "Italien", + "JE": "Jersey", + "JM": "Jamaika", + "JO": "Jordanien", + "JP": "Japan", + "KE": "Kenia", + "KG": "Kirgisistan", + "KH": "Kambodscha", + "KI": "Kiribati", + "KM": "Komoren", + "KN": "St. Kitts und Nevis", + "KP": "Nordkorea", + "KR": "Südkorea", + "KW": "Kuwait", + "KY": "Kaimaninseln", + "KZ": "Kasachstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "St. Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Litauen", + "LU": "Luxemburg", + "LV": "Lettland", + "LY": "Libyen", + "MA": "Marokko", + "MC": "Monaco", + "MD": "Republik Moldau", + "ME": "Montenegro", + "MF": "St. Martin", + "MG": "Madagaskar", + "MH": "Marshallinseln", + "MK": "Mazedonien", + "ML": "Mali", + "MM": "Myanmar", + "MN": "Mongolei", + "MO": "Sonderverwaltungsregion Macau", + "MP": "Nördliche Marianen", + "MQ": "Martinique", + "MR": "Mauretanien", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Malediven", + "MW": "Malawi", + "MX": "Mexiko", + "MY": "Malaysia", + "MZ": "Mosambik", + "NA": "Namibia", + "NC": "Neukaledonien", + "NE": "Niger", + "NF": "Norfolkinsel", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Niederlande", + "NO": "Norwegen", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Neuseeland", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Französisch-Polynesien", + "PG": "Papua-Neuguinea", + "PH": "Philippinen", + "PK": "Pakistan", + "PL": "Polen", + "PM": "St. Pierre und Miquelon", + "PN": "Pitcairninseln", + "PR": "Puerto Rico", + "PS": "Palästinensische Autonomiegebiete", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Katar", + "RE": "Réunion", + "RO": "Rumänien", + "RS": "Serbien", + "RU": "Russland", + "RW": "Ruanda", + "SA": "Saudi-Arabien", + "SB": "Salomonen", + "SC": "Seychellen", + "SD": "Sudan", + "SE": "Schweden", + "SG": "Singapur", + "SH": "St. Helena", + "SI": "Slowenien", + "SJ": "Spitzbergen", + "SK": "Slowakei", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "SS": "Südsudan", + "ST": "São Tomé und Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syrien", + "SZ": "Swasiland", + "TA": "Tristan da Cunha", + "TC": "Turks- und Caicosinseln", + "TD": "Tschad", + "TF": "Französische Süd- und Antarktisgebiete", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tadschikistan", + "TK": "Tokelau", + "TL": "Osttimor", + "TM": "Turkmenistan", + "TN": "Tunesien", + "TO": "Tonga", + "TR": "Türkei", + "TT": "Trinidad und Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tansania", + "UA": "Ukraine", + "UG": "Uganda", + "UM": "Amerikanische Überseeinseln", + "UN": "Vereinte Nationen", + "US": "Vereinigte Staaten", + "UY": "Uruguay", + "UZ": "Usbekistan", + "VA": "Vatikanstadt", + "VC": "St. Vincent und die Grenadinen", + "VE": "Venezuela", + "VG": "Britische Jungferninseln", + "VI": "Amerikanische Jungferninseln", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis und Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Südafrika", + "ZM": "Sambia", + "ZW": "Simbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/de_AT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/de_AT.json new file mode 100644 index 0000000000000000000000000000000000000000..9f5f0e793b53fdd7539a3747a99943cbe341ddd9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/de_AT.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.28.73", + "Names": { + "SJ": "Svalbard und Jan Mayen" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/de_CH.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/de_CH.json new file mode 100644 index 0000000000000000000000000000000000000000..84cc5bd0c2bb5662e51c9e26ff57e7d4f08f39ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/de_CH.json @@ -0,0 +1,12 @@ +{ + "Version": "2.1.29.33", + "Names": { + "BN": "Brunei", + "BW": "Botswana", + "BY": "Weissrussland", + "CV": "Kapverden", + "GB": "Grossbritannien", + "SB": "Salomon-Inseln", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/dz.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/dz.json new file mode 100644 index 0000000000000000000000000000000000000000..05af2671f9e0f508915a8106ca8dd341e7d93497 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/dz.json @@ -0,0 +1,257 @@ +{ + "Version": "2.1.29.61", + "Names": { + "AC": "ཨེ་སེན་ཤུན་ཚོ་གླིང༌", + "AD": "ཨཱན་དོ་ར", + "AE": "ཡུ་ནཱའི་ཊེཌ་ ཨ་རབ་ ཨེ་མེ་རེཊས", + "AF": "ཨཕ་གྷ་ནི་སà½à½±à½“", + "AG": "ཨན་ཊི་གུ་à½à¼‹ ཨེནཌ་ བྷར་བྷུ་ཌ", + "AI": "ཨང་གི་ལ", + "AL": "ཨཱལ་བེ་ནི་ཡ", + "AM": "ཨར་མི་ནི་ཡ", + "AO": "ཨང་གྷོ་ལ", + "AQ": "འཛམ་གླིང་ལྷོ་མà½à½ à½²à¼‹à½à¾±à½‚ས་གླིང", + "AR": "ཨར་ཇེན་ཊི་ན", + "AS": "ས་མོ་ཨ་ཡུ་ཨེས་ཨེ་མངའ་à½à½¼à½„ས", + "AT": "ཨཱོས་ཊྲི་ཡ", + "AU": "ཨཱོས་ཊྲེལ་ལི་ཡ", + "AW": "ཨ་རུ་བཱ", + "AX": "ཨ་ལནཌ་གླིང་ཚོམ", + "AZ": "ཨ་ཛར་བྷའི་ཇཱན", + "BA": "བྷོས་ནི་ཡ་ ཨེནཌ་ ཧར་ཛི་གྷོ་བི་ན", + "BB": "བྷར་བེ་ཌོས", + "BD": "བངྒ་ལ་དེཤ", + "BE": "བྷེལ་ཇམ", + "BF": "བྷར་ཀི་ན་ ཕེ་སོ", + "BG": "བུལ་ག་རི་ཡ", + "BH": "བྷ་རེན", + "BI": "བྷུ་རུན་ཌི", + "BJ": "བྷེ་ནིན", + "BL": "སེནཊ་ བར་à½à½¼à¼‹à½£à½¼à½˜à¼‹à½˜à½²à½ à½´", + "BM": "བར་མུ་ཌ", + "BN": "བྷྲུ་ནའི", + "BO": "བྷེ་ལི་བི་ཡ", + "BQ": "ཀེ་རི་བི་ཡེན་ནེ་དར་ལནཌས྄", + "BR": "བྲ་ཛིལ", + "BS": "བྷ་ཧ་མས྄", + "BT": "འབྲུག", + "BW": "བྷོཙ་à½à¼‹à½“", + "BY": "བེལ་ཨ་རུ་སུ", + "BZ": "བྷེ་ལིཛ", + "CA": "ཀེ་ན་ཌ", + "CC": "ཀོ་ཀོས་གླིང་ཚོམ", + "CD": "ཀོང་གྷོ ཀིན་ཤ་ས", + "CF": "སེན་ཊལ་ ཨཕ་རི་ཀཱན་ རི་པབ་ལིཀ", + "CG": "ཀོང་གྷོ བྷྲ་ཛ་བིལ", + "CH": "སུ་à½à½²à½Šà¼‹à½›à½¢à¼‹à½£à½ºà½“ཌ", + "CI": "ཀོ་ཊེ་ ཌི་ཨི་à½à½¼à¼‹à½¢à½º", + "CK": "ཀུག་གླིང་ཚོམ", + "CL": "ཅི་ལི", + "CM": "ཀེ་མ་རུན", + "CN": "རྒྱ་ནག", + "CO": "ཀོ་ལོམ་བྷི་ཡ", + "CR": "ཀོས་ཊ་རི་ཀ", + "CU": "ཀིའུ་བྷ", + "CV": "ཀེཔ་བཱཌ", + "CW": "ཀྱཱུར་ར་ཀོ", + "CX": "à½à½²à¼‹à½¢à½²à½¦à¾Ÿà¼‹à½˜à½ºà½¦à¼‹à½˜à½šà½¼à¼‹à½‚ླིང", + "CY": "སཱའི་པྲས", + "CZ": "ཅེཀ་ རི་པབ་ལིཀ", + "DE": "ཇཱར་མ་ནི", + "DG": "ཌི་ཡེ་གོ་གར་སིའོ", + "DJ": "ཇི་བྷུ་ཊི", + "DK": "ཌེན་མཱཀ", + "DM": "ཌོ་མི་ནི་ཀ", + "DO": "ཌོ་མི་ནི་ཀཱན་ རི་པབ་ལིཀ", + "DZ": "ཨཱལ་ཇི་རི་ཡ", + "EA": "སེ་ཨུ་à½à¼‹ ཨེནཌ་ མེལ་ལི་ལ", + "EC": "ཨེ་à½à¾­à¼‹à½Œà½¼à½¢", + "EE": "ཨེས་ཊོ་ནི་ཡ", + "EG": "ཨི་ཇིབཊ", + "EH": "ནུབ་ཕྱོགས་ ས་ཧཱ་ར", + "ER": "ཨེ་རི་ཊྲེ་ཡ", + "ES": "ཨིས་པེན", + "ET": "ཨི་à½à½²à¼‹à½¡à½¼à¼‹à½”ི་ཡ", + "FI": "ཕིན་ལེནཌ", + "FJ": "ཕི་ཇི", + "FK": "ཕལà¾à¼‹à½£à½“ྜ་གླིང་ཚོམ", + "FM": "མའི་ཀྲོ་ནི་ཤི་ཡ", + "FO": "ཕཱའེ་རོ་གླིང་ཚོམ", + "FR": "ཕྲཱནས", + "GA": "གྷ་བྷོན", + "GB": "ཡུ་ནཱའི་ཊེཌ་ ཀིང་ཌམ", + "GD": "གྲྀ་ན་ཌ", + "GE": "ཇཽར་ཇཱ", + "GF": "གུའི་ཡ་ན་ ཕྲནས྄་མངའ་à½à½¼à½„ས", + "GG": "གུ་ཨེརྣ་སི", + "GH": "གྷ་ན", + "GI": "ཇིབ་རཱལ་ཊར", + "GL": "གིརཱིན་ལནཌ྄", + "GM": "གྷེམ་བི་ཡ", + "GN": "གྷི་ནི", + "GP": "གོ་ཌེ་ལུ་པེ", + "GQ": "ཨེ་ཀུ་ཊོ་རེལ་ གི་ནི", + "GR": "གིརིས྄", + "GS": "སཱའུà½à¼‹à½‡à½½à½¢à¼‹à½‡à½±à¼‹ དང་ སཱའུà½à¼‹à½¦à½ºà½“ཌ྄་à½à½²à½…་གླིང་ཚོམ", + "GT": "གྷོ་ཊ་མ་ལ", + "GU": "གུ་འམ་ མཚོ་གླིང", + "GW": "གྷི་ནི་ བྷི་སཱའུ", + "GY": "གྷ་ཡ་ན", + "HK": "ཧོང་ཀོང་ཅཱའི་ན", + "HN": "ཧཱན་ཌུ་རཱས྄", + "HR": "ཀྲོ་ཨེ་ཤ", + "HT": "ཧེ་ཊི", + "HU": "ཧཱང་གྷ་རི", + "IC": "ཀ་ནེ་རི་གླིང་ཚོམ", + "ID": "ཨིན་ཌོ་ནེ་ཤི་ཡ", + "IE": "ཨཱ་ཡ་ལེནཌ", + "IL": "ཨིས་ར་ཡེལ", + "IM": "ཨ་ཡུལ་ ཨོཕ་ མཱན", + "IN": "རྒྱ་གར", + "IO": "བྲི་ཊིཤ་རྒྱ་གར་གྱི་རྒྱ་མཚོ་ས་à½à½¼à½„ས", + "IQ": "ཨི་རཱཀ", + "IR": "ཨི་རཱན", + "IS": "ཨཱའིས་ལེནཌ", + "IT": "ཨི་ཊ་ལི", + "JE": "ཇེར་སི", + "JM": "ཇཱ་མཻ་ཀ", + "JO": "ཇོར་ཌན", + "JP": "ཇ་པཱན", + "KE": "ཀེན་ཡ", + "KG": "ཀིར་གིས་སà½à½±à½“", + "KH": "ཀམ་བྷོ་ཌི་ཡ", + "KI": "ཀི་རི་བ་à½à½²à¼‹à½˜à½šà½¼à¼‹à½‚ླིང", + "KM": "ཀོ་མོ་རོས", + "KN": "སེནཊ་ ཀིཊས་ དང་ ནེ་བིས", + "KP": "བྱང་ ཀོ་རི་ཡ", + "KR": "ལྷོ་ ཀོ་རི་ཡ", + "KW": "ཀུ་à½à½ºà½Š", + "KY": "à½à½ºà¼‹à½˜à½ºà½“་གླིང་ཚོམ", + "KZ": "ཀ་ཛགས་སà½à½±à½“", + "LA": "ལཱ་à½à½¼à½¦", + "LB": "ལེ་བ་ནོན", + "LC": "སེནཊ་ ལུ་སི་ཡ", + "LI": "ལིཀ་à½à½“ས་à½à¼‹à½¡à½²à½“", + "LK": "ཤྲཱི་ལང་ཀ", + "LR": "ལཱའི་བེ་རི་ཡ", + "LS": "ལཻ་སོ་à½à½¼", + "LT": "ལི་à½à½´à¼‹à½à½ºà¼‹à½“ི་ཡ", + "LU": "ལག་ཛམ་བོརྒ", + "LV": "ལཊ་བི་ཡ", + "LY": "ལི་བི་ཡ", + "MA": "མོ་རོ་ཀོ", + "MC": "མོ་ན་ཀོ", + "MD": "མོལ་དོ་བཱ", + "ME": "མོན་ཊི་ནེག་རོ", + "MF": "སེནཊ་ མཱར་ཊིན", + "MG": "མ་དཱ་གེས་ཀར", + "MH": "མར་ཤེལ་གླིང་ཚོམ", + "MK": "མ་སེ་ཌོ་ནི་ཡ", + "ML": "མཱ་ལི", + "MM": "མི་ཡཱན་མར་ (བྷར་མ)", + "MN": "སོག་པོ་ཡུལ", + "MO": "མཀ་ཨའུ་ཅཱའི་ན", + "MP": "བྱང་ཕྱོགས་ཀྱི་མ་ར་ཡ་ན་གླིང་ཚོམ", + "MQ": "མཱར་ཊི་ནིཀ", + "MR": "མོ་རི་ཊེ་ནི་ཡ", + "MS": "མོན་ས་རཊ", + "MT": "མཱལ་ཊ", + "MU": "མོ་རི་ཤཱས", + "MV": "མཱལ་དིབས", + "MW": "མ་ལ་à½à½²", + "MX": "མེཀ་སི་ཀོ", + "MY": "མ་ལེ་ཤི་ཡ", + "MZ": "མོ་ཛམ་བྷིཀ", + "NA": "ན་མི་བི་ཡ", + "NC": "ནིའུ་ཀ་ལི་དོ་ནི་ཡ", + "NE": "ནཱའི་ཇཱ", + "NF": "ནོར་ཕོལཀ་མཚོ་གླིང༌", + "NG": "ནཱའི་ཇི་རི་ཡ", + "NI": "ནི་ཀྲ་à½à¼‹à½‚", + "NL": "ནེ་དར་ལནཌས྄", + "NO": "ནོར་à½à½º", + "NP": "བལ་ཡུལ", + "NR": "ནའུ་རུ་", + "NU": "ནི་ཨུ་ཨཻ", + "NZ": "ནིའུ་ཛི་ལེནཌ", + "OM": "ཨོ་མཱན", + "PA": "པ་ན་མ", + "PE": "པེ་རུ", + "PF": "ཕྲཱནས྄་ཀྱི་པོ་ལི་ནི་ཤི་ཡ", + "PG": "པ་པུ་ ནིའུ་གི་ནི", + "PH": "ཕི་ལི་པིནས", + "PK": "པ་ཀི་སà½à½±à½“", + "PL": "པོ་ལེནཌ", + "PM": "སིནཊ་པི་ཡེར་ ཨེནཌ་ མིཀོ་ལེན", + "PN": "པིཊ་ཀེ་ཡེརན་གླིང་ཚོམ", + "PR": "པུ་འེར་ཊོ་རི་à½à½¼", + "PS": "པེ་ལིསི་ཊི་ནི་ཡན་ཊེ་རི་à½à½¼à¼‹à½¢à½²", + "PT": "པོར་ཅུ་གཱལ", + "PW": "པ་ལའུ", + "PY": "པ་ར་གུ་à½à½ à½²", + "QA": "ཀ་ཊར", + "RE": "རེ་ཡུ་ནི་ཡོན", + "RO": "རོ་མེ་ནི་ཡ", + "RS": "སཱར་བྷི་ཡ", + "RU": "ཨུ་རུ་སུ", + "RW": "རུ་à½à½“་ཌ", + "SA": "སཱà½à¼‹à½‘ི་ ཨ་རེ་བྷི་ཡ", + "SB": "སོ་ལོ་མོན་ གླིང་ཚོམ", + "SC": "སེ་ཤཱལས", + "SD": "སུ་ཌཱན", + "SE": "སུའི་ཌེན", + "SG": "སིང་ག་པོར", + "SH": "སེནཊ་ ཧེ་ལི་ན", + "SI": "སུ་ལོ་བི་ནི་ཡ", + "SJ": "སྭཱལ་བྷརྡ་ ཨེནཌ་ ཇཱན་མ་ཡེན", + "SK": "སུ་ལོ་བཱ་ཀི་ཡ", + "SL": "སི་ར་ ལི་འོན", + "SM": "སཱན་མ་རི་ནོ", + "SN": "སེ་ནི་གྷལ", + "SO": "སོ་མ་ལི་ཡ", + "SR": "སུ་རི་ནཱམ", + "SS": "སཱའུà½à¼‹ སུ་ཌཱན", + "ST": "སà½à¼‹ ཊོ་མེ་ ཨེནཌ་ པྲྀན་སི་པེ", + "SV": "ཨེལ་སལ་བ་ཌོར", + "SX": "སིནཊ་ མཱར་ཊེན", + "SY": "སི་རི་ཡ", + "SZ": "སུ་à½à¼‹à½›à½²à¼‹à½£à½ºà½“ཌ", + "TA": "à½à¾²à½²à½¦à¼‹à½à½“་ད་ཀུན་ཧ", + "TC": "à½à½´à½¢à¾à½¦à¾„་ ཨེནཌ་ ཀ་ཀོས་གླིང་ཚོམ", + "TD": "ཅཱཌ", + "TF": "ཕྲནཅ་གི་ལྷོ་ཕྱོགས་མངའ་à½à½¼à½„ས", + "TG": "ཊོ་གྷོ", + "TH": "à½à½±à½ à½²à¼‹à½£à½ºà½“ཌ", + "TJ": "à½à¼‹à½‡à½²à½‚་གི་སà½à½±à½“", + "TK": "à½à½¼à¼‹à½€à½ºà¼‹à½£à½ à½´à¼‹ མཚོ་གླིང", + "TL": "à½à½²à¼‹à¼‹à½˜à½¼à½¢à¼‹à½£à½ºà¼‹à½¨à½ºà½¦à½Š", + "TM": "ཊཱརཀ་མེནའི་སà½à½±à½“", + "TN": "ཊུ་ནི་ཤི་ཡ", + "TO": "ཊོང་གྷ", + "TR": "ཊཱར་ཀི", + "TT": "ཊི་ནི་ཌཱཌ་ ཨེནཌ་ ཊོ་བྷེ་གྷོ", + "TV": "à½à½´à¼‹à½à¼‹à½£à½´", + "TW": "ཊཱའི་à½à½±à½“", + "TZ": "ཊཱན་ཛཱ་ནི་ཡ", + "UA": "ཡུ་ཀརེན", + "UG": "ཡུ་གྷན་ཌ", + "UM": "ཡུ་ཨེས་གྱི་མà½à½ à¼‹à½˜à½šà½˜à½¦à¼‹à½˜à½šà½¼à¼‹à½‚ླིང་", + "US": "ཡུ་ཨེས་ཨེ", + "UY": "ཡུ་རུ་གུ་à½à½ à½²", + "UZ": "ཨུས་བེག་གི་སà½à½±à½“", + "VA": "བ་ཊི་ཀཱན་ སི་ཊི", + "VC": "སེནཊ་à½à½²à½“་སེནཌ྄ ཨེནཌ་ གི་རེ་ན་དིནས྄", + "VE": "བེ་ནི་ཛུ་à½à½ºà¼‹à½£", + "VG": "à½à½¢à½‡à½²à½“་གླིང་ཚོམ་ བྲཱི་ཊིཤ་མངའ་à½à½¼à½„ས", + "VI": "à½à½¢à½‡à½²à½“་གླིང་ཚོམ་ ཡུ་ཨེས་ཨེ་མངའ་à½à½¼à½„ས", + "VN": "བེཊ་ནཱམ", + "VU": "à½à¼‹à½“ུ་ཨ་à½à½´", + "WF": "à½à½£à¼‹à½£à½²à½¦à¾„་ ཨེནཌ་ ཕུ་à½à½´à¼‹à½“་", + "WS": "ས་མོ་ཨ", + "YE": "ཡེ་མེན", + "YT": "མེ་ཡོཊ", + "ZA": "སཱའུà½à¼‹ ཨཕ་རི་ཀ", + "ZM": "ཛམ་བྷི་ཡ", + "ZW": "ཛིམ་བྷབ་à½à½º" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ee.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ee.json new file mode 100644 index 0000000000000000000000000000000000000000..7b303bfb2941f9f52618030d2a7e25288822bd5a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ee.json @@ -0,0 +1,252 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AC": "Ascension Æ’udomekpo nutome", + "AD": "Andorra nutome", + "AE": "United Arab Emirates nutome", + "AF": "Afghanistan nutome", + "AG": "ÌAntigua kple Barbuda nutome", + "AI": "Anguilla nutome", + "AL": "Albania nutome", + "AM": "Armenia nutome", + "AO": "Angola nutome", + "AQ": "Antartica nutome", + "AR": "Argentina nutome", + "AS": "Amerika Samoa nutome", + "AT": "Austria nutome", + "AU": "Australia nutome", + "AW": "Aruba nutome", + "AX": "Ã…land Æ’udomekpo nutome", + "AZ": "Azerbaijan nutome", + "BA": "Bosnia kple Herzergovina nutome", + "BB": "Barbados nutome", + "BD": "Bangladesh nutome", + "BE": "Belgium nutome", + "BF": "Burkina Faso nutome", + "BG": "Bulgaria nutome", + "BH": "Bahrain nutome", + "BI": "Burundi nutome", + "BJ": "Benin nutome", + "BL": "Saint Barthélemy nutome", + "BM": "Bermuda nutome", + "BN": "Brunei nutome", + "BO": "Bolivia nutome", + "BR": "Brazil nutome", + "BS": "Bahamas nutome", + "BT": "Bhutan nutome", + "BW": "Botswana nutome", + "BY": "Belarus nutome", + "BZ": "Belize nutome", + "CA": "Canada nutome", + "CC": "Kokos (Kiling) fudomekpo nutome", + "CD": "Kongo Kinshasa nutome", + "CF": "Titina Afrika repÉ”blik nutome", + "CG": "Kongo Brazzaville nutome", + "CH": "Switzerland nutome", + "CI": "Kote d’Ivoire nutome", + "CK": "Kook Æ’udomekpo nutome", + "CL": "Tsile nutome", + "CM": "Kamerun nutome", + "CN": "Tsaina nutome", + "CO": "Kolombia nutome", + "CR": "Kosta Rika nutome", + "CU": "Kuba nutome", + "CV": "Kape Verde nutome", + "CX": "Kristmas Æ’udomekpo nutome", + "CY": "Saiprus nutome", + "CZ": "TsÉ›k repÉ”blik nutome", + "DE": "Germania nutome", + "DG": "Diego Garsia nutome", + "DJ": "Dzibuti nutome", + "DK": "Denmark nutome", + "DM": "Dominika nutome", + "DO": "Dominika repÉ”blik nutome", + "DZ": "Algeria nutome", + "EA": "Keuta and Melilla nutome", + "EC": "EkuadÉ” nutome", + "EE": "Estonia nutome", + "EG": "Egypte nutome", + "EH": "Æ”etoÉ–oÆ’e Sahara nutome", + "ER": "Eritrea nutome", + "ES": "Spain nutome", + "ET": "Etiopia nutome", + "FI": "Finland nutome", + "FJ": "Fidzi nutome", + "FK": "Falkland Æ’udomekpowo nutome", + "FM": "Mikronesia nutome", + "FO": "Faroe Æ’udomekpowo nutome", + "FR": "France nutome", + "GA": "GabÉ”n nutome", + "GB": "United Kingdom nutome", + "GD": "Grenada nutome", + "GE": "Georgia nutome", + "GF": "Frentsi Gayana nutome", + "GG": "Guernse nutome", + "GH": "Ghana nutome", + "GI": "Gibraltar nutome", + "GL": "Grinland nutome", + "GM": "Gambia nutome", + "GN": "Guini nutome", + "GP": "Guadelupe nutome", + "GQ": "Ekuatorial Guini nutome", + "GR": "Greece nutome", + "GS": "Anyiehe Georgia kple Anyiehe Sandwich Æ’udomekpowo nutome", + "GT": "Guatemala nutome", + "GU": "Guam nutome", + "GW": "Gini-Bisao nutome", + "GY": "Guyanadu", + "HK": "HÉ”ng KÉ”ng SAR Tsaina nutome", + "HN": "Hondurasdu", + "HR": "Kroatsia nutome", + "HT": "Haiti nutome", + "HU": "Hungari nutome", + "IC": "Kanari Æ’udomekpowo nutome", + "ID": "Indonesia nutome", + "IE": "Ireland nutome", + "IL": "Israel nutome", + "IM": "Aisle of Man nutome", + "IN": "India nutome", + "IO": "BritaintÉ”wo Æ’e india Æ’udome nutome", + "IQ": "iraqdukÉ”", + "IR": "Iran nutome", + "IS": "Aiseland nutome", + "IT": "Italia nutome", + "JE": "DzÉ›se nutome", + "JM": "Dzamaika nutome", + "JO": "Yordan nutome", + "JP": "Dzapan nutome", + "KE": "Kenya nutome", + "KG": "Kirgizstan nutome", + "KH": "Kambodia nutome", + "KI": "Kiribati nutome", + "KM": "Komoros nutome", + "KN": "Saint Kitis kple Nevis nutome", + "KP": "Dziehe Korea nutome", + "KR": "Anyiehe Korea nutome", + "KW": "Kuwait nutome", + "KY": "Kayman Æ’udomekpowo nutome", + "KZ": "Kazakstan nutome", + "LA": "Laos nutome", + "LB": "LebanÉ”n nutome", + "LC": "Saint Lusia nutome", + "LI": "Litsenstein nutome", + "LK": "Sri Lanka nutome", + "LR": "Liberia nutome", + "LS": "LÉ›soto nutome", + "LT": "Lituania nutome", + "LU": "LazembÉ”g nutome", + "LV": "Latvia nutome", + "LY": "Libya nutome", + "MA": "Moroko nutome", + "MC": "Monako nutome", + "MD": "Moldova nutome", + "ME": "Montenegro nutome", + "MF": "Saint Martin nutome", + "MG": "Madagaska nutome", + "MH": "Marshal Æ’udomekpowo nutome", + "MK": "Makedonia nutome", + "ML": "Mali nutome", + "MM": "Myanmar (Burma) nutome", + "MN": "Mongolia nutome", + "MO": "Macau SAR Tsaina nutome", + "MP": "Dziehe Marina Æ’udomekpowo nutome", + "MQ": "Martiniki nutome", + "MR": "Mauritania nutome", + "MS": "Montserrat nutome", + "MT": "Malta nutome", + "MU": "mauritiusdukÉ”", + "MV": "maldivesdukÉ”", + "MW": "Malawi nutome", + "MX": "Mexico nutome", + "MY": "Malaysia nutome", + "MZ": "Mozambiki nutome", + "NA": "Namibia nutome", + "NC": "New Kaledonia nutome", + "NE": "Niger nutome", + "NF": "Norfolk Æ’udomekpo nutome", + "NG": "Nigeria nutome", + "NI": "NicaraguadukÉ”", + "NL": "Netherlands nutome", + "NO": "Norway nutome", + "NP": "Nepal nutome", + "NR": "Nauru nutome", + "NU": "Niue nutome", + "NZ": "New Zealand nutome", + "OM": "Oman nutome", + "PA": "Panama nutome", + "PE": "Peru nutome", + "PF": "Frentsi PÉ”linesia nutome", + "PG": "Papua New Gini nutome", + "PH": "Filipini nutome", + "PK": "Pakistan nutome", + "PL": "Poland nutome", + "PM": "Saint Pierre kple MikelÉ”n nutome", + "PN": "Pitkairn Æ’udomekpo nutome", + "PR": "Puerto Riko nutome", + "PS": "Palestinia nutome", + "PT": "Portugal nutome", + "PW": "Palau nutome", + "PY": "Paragua nutome", + "QA": "Katar nutome", + "RE": "Réunion nutome", + "RO": "Romania nutome", + "RU": "Russia nutome", + "RW": "Rwanda nutome", + "SA": "Saudi Arabia nutome", + "SB": "Solomon Æ’udomekpowo nutome", + "SC": "SeshÉ›ls nutome", + "SD": "Sudan nutome", + "SE": "Sweden nutome", + "SG": "SingapÉ”r nutome", + "SH": "Saint Helena nutome", + "SI": "Slovenia nutome", + "SJ": "Svalbard kple Yan Mayen nutome", + "SK": "Slovakia nutome", + "SL": "Sierra Leone nutome", + "SM": "San Marino nutome", + "SN": "Senegal nutome", + "SO": "Somalia nutome", + "SR": "Suriname nutome", + "ST": "São Tomé kple Príncipe nutome", + "SV": "El SalvadÉ” nutome", + "SY": "Siria nutome", + "SZ": "Swaziland nutome", + "TA": "Tristan da Kunha nutome", + "TC": "TÉ›ks kple Kaikos Æ’udomekpowo nutome", + "TD": "Tsad nutome", + "TF": "Anyiehe Franseme nutome", + "TG": "Togo nutome", + "TH": "Thailand nutome", + "TJ": "Tajikistan nutome", + "TK": "Tokelau nutome", + "TL": "Timor-Leste nutome", + "TM": "TÉ›kmenistan nutome", + "TN": "Tunisia nutome", + "TO": "Tonga nutome", + "TR": "TÉ›ki nutome", + "TT": "Trinidad kple Tobago nutome", + "TV": "Tuvalu nutome", + "TW": "Taiwan nutome", + "TZ": "Tanzania nutome", + "UA": "Ukraine nutome", + "UG": "Uganda nutome", + "UM": "U.S. Minor Outlaying Æ’udomekpowo nutome", + "US": "USA nutome", + "UY": "uruguaydukÉ”", + "UZ": "Uzbekistan nutome", + "VA": "Vatikandu nutome", + "VC": "Saint Vincent kple Grenadine nutome", + "VE": "Venezuela nutome", + "VG": "BritaintÉ”wo Æ’e Virgin Æ’udomekpowo nutome", + "VI": "U.S. VÉ›rgin Æ’udomekpowo nutome", + "VN": "Vietnam nutome", + "VU": "Vanuatu nutome", + "WF": "Wallis kple Futuna nutome", + "WS": "Samoa nutome", + "YE": "Yemen nutome", + "YT": "Mayotte nutome", + "ZA": "Anyiehe Africa nutome", + "ZM": "Zambia nutome", + "ZW": "Zimbabwe nutome" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/el.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/el.json new file mode 100644 index 0000000000000000000000000000000000000000..b3cd323075f6afddf8041e96d146a26c1680bfbb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/el.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Îήσος Ασενσιόν", + "AD": "ΑνδόÏα", + "AE": "Ηνωμένα ΑÏαβικά ΕμιÏάτα", + "AF": "Αφγανιστάν", + "AG": "Αντίγκουα και ΜπαÏμποÏντα", + "AI": "Ανγκουίλα", + "AL": "Αλβανία", + "AM": "ΑÏμενία", + "AO": "Ανγκόλα", + "AQ": "ΑνταÏκτική", + "AR": "ΑÏγεντινή", + "AS": "ΑμεÏικανική Σαμόα", + "AT": "ΑυστÏία", + "AU": "ΑυστÏαλία", + "AW": "ΑÏοÏμπα", + "AX": "Îήσοι Όλαντ", + "AZ": "ΑζεÏμπαϊτζάν", + "BA": "Βοσνία - ΕÏζεγοβίνη", + "BB": "ΜπαÏμπάντος", + "BD": "Μπανγκλαντές", + "BE": "Βέλγιο", + "BF": "ΜπουÏκίνα Φάσο", + "BG": "ΒουλγαÏία", + "BH": "ΜπαχÏέιν", + "BI": "ΜπουÏοÏντι", + "BJ": "Μπενίν", + "BL": "Άγιος ΒαÏθολομαίος", + "BM": "ΒεÏμοÏδες", + "BN": "ΜπÏουνέι", + "BO": "Βολιβία", + "BQ": "Ολλανδία ΚαÏαϊβικής", + "BR": "Î’Ïαζιλία", + "BS": "Μπαχάμες", + "BT": "Μπουτάν", + "BW": "Μποτσουάνα", + "BY": "ΛευκοÏωσία", + "BZ": "Μπελίζ", + "CA": "Καναδάς", + "CC": "Îήσοι Κόκος (Κίλινγκ)", + "CD": "Κονγκό - Κινσάσα", + "CF": "ΚεντÏοαφÏικανική ΔημοκÏατία", + "CG": "Κονγκό - ΜπÏαζαβίλ", + "CH": "Ελβετία", + "CI": "Ακτή ΕλεφαντοστοÏ", + "CK": "Îήσοι Κουκ", + "CL": "Χιλή", + "CM": "ΚαμεÏοÏν", + "CN": "Κίνα", + "CO": "Κολομβία", + "CR": "Κόστα Ρίκα", + "CU": "ΚοÏβα", + "CV": "ΠÏάσινο ΑκÏωτήÏιο", + "CW": "ΚουÏασάο", + "CX": "Îήσος των ΧÏιστουγέννων", + "CY": "ΚÏÏ€Ïος", + "CZ": "Τσεχική ΔημοκÏατία", + "DE": "ΓεÏμανία", + "DG": "Îτιέγκο ΓκαÏσία", + "DJ": "Τζιμπουτί", + "DK": "Δανία", + "DM": "Îτομίνικα", + "DO": "Δομινικανή ΔημοκÏατία", + "DZ": "ΑλγεÏία", + "EA": "ΘεοÏτα και Μελίλα", + "EC": "ΕκουαδόÏ", + "EE": "Εσθονία", + "EG": "Αίγυπτος", + "EH": "Δυτική ΣαχάÏα", + "ER": "ΕÏυθÏαία", + "ES": "Ισπανία", + "ET": "Αιθιοπία", + "FI": "Φινλανδία", + "FJ": "Φίτζι", + "FK": "Îήσοι Φόκλαντ", + "FM": "ΜικÏονησία", + "FO": "Îήσοι ΦεÏόες", + "FR": "Γαλλία", + "GA": "Γκαμπόν", + "GB": "Ηνωμένο Βασίλειο", + "GD": "ΓÏενάδα", + "GE": "ΓεωÏγία", + "GF": "Γαλλική Γουιάνα", + "GG": "ΓκέÏνζι", + "GH": "Γκάνα", + "GI": "ΓιβÏαλτάÏ", + "GL": "ΓÏοιλανδία", + "GM": "Γκάμπια", + "GN": "Γουινέα", + "GP": "ΓουαδελοÏπη", + "GQ": "ΙσημεÏινή Γουινέα", + "GR": "Ελλάδα", + "GS": "Îήσοι Îότια ΓεωÏγία και Îότιες Σάντουιτς", + "GT": "Γουατεμάλα", + "GU": "Γκουάμ", + "GW": "Γουινέα Μπισάου", + "GY": "Γουιάνα", + "HK": "Χονγκ Κονγκ ΕΔΠ Κίνας", + "HN": "ΟνδοÏÏα", + "HR": "ΚÏοατία", + "HT": "Αϊτή", + "HU": "ΟυγγαÏία", + "IC": "ΚανάÏιοι Îήσοι", + "ID": "Ινδονησία", + "IE": "ΙÏλανδία", + "IL": "ΙσÏαήλ", + "IM": "Îήσος Μαν", + "IN": "Ινδία", + "IO": "Î’Ïετανικά Εδάφη Î™Î½Î´Î¹ÎºÎ¿Ï Î©ÎºÎµÎ±Î½Î¿Ï", + "IQ": "ΙÏάκ", + "IR": "ΙÏάν", + "IS": "Ισλανδία", + "IT": "Ιταλία", + "JE": "ΤζέÏζι", + "JM": "Τζαμάικα", + "JO": "ΙοÏδανία", + "JP": "Ιαπωνία", + "KE": "Κένυα", + "KG": "ΚιÏγιστάν", + "KH": "Καμπότζη", + "KI": "ΚιÏιμπάτι", + "KM": "ΚομόÏες", + "KN": "Άγιος ΧÏιστόφοÏος και Îέβις", + "KP": "Î’ÏŒÏεια ΚοÏέα", + "KR": "Îότια ΚοÏέα", + "KW": "Κουβέιτ", + "KY": "Îήσοι Κάιμαν", + "KZ": "Καζακστάν", + "LA": "Λάος", + "LB": "Λίβανος", + "LC": "Αγία Λουκία", + "LI": "Λιχτενστάιν", + "LK": "ΣÏι Λάνκα", + "LR": "ΛιβεÏία", + "LS": "Λεσότο", + "LT": "Λιθουανία", + "LU": "ΛουξεμβοÏÏγο", + "LV": "Λετονία", + "LY": "ΛιβÏη", + "MA": "ΜαÏόκο", + "MC": "Μονακό", + "MD": "Μολδαβία", + "ME": "ΜαυÏοβοÏνιο", + "MF": "Άγιος ΜαÏτίνος (Γαλλικό τμήμα)", + "MG": "ΜαδαγασκάÏη", + "MH": "Îήσοι ΜάÏσαλ", + "MK": "ΠÏώην Γιουγκοσλαβική ΔημοκÏατία της Μακεδονίας", + "ML": "Μάλι", + "MM": "ΜιανμάÏ\/ΒιÏμανία", + "MN": "Μογγολία", + "MO": "Μακάο ΕΔΠ Κίνας", + "MP": "Îήσοι Î’ÏŒÏειες ΜαÏιάνες", + "MQ": "ΜαÏτινίκα", + "MR": "ΜαυÏιτανία", + "MS": "ΜονσεÏάτ", + "MT": "Μάλτα", + "MU": "ΜαυÏίκιος", + "MV": "Μαλδίβες", + "MW": "Μαλάουι", + "MX": "Μεξικό", + "MY": "Μαλαισία", + "MZ": "Μοζαμβίκη", + "NA": "Îαμίμπια", + "NC": "Îέα Καληδονία", + "NE": "ÎίγηÏας", + "NF": "Îήσος ÎÏŒÏφολκ", + "NG": "ÎιγηÏία", + "NI": "ÎικαÏάγουα", + "NL": "Ολλανδία", + "NO": "ÎοÏβηγία", + "NP": "Îεπάλ", + "NR": "ÎαουÏοÏ", + "NU": "ÎιοÏε", + "NZ": "Îέα Ζηλανδία", + "OM": "Ομάν", + "PA": "Παναμάς", + "PE": "ΠεÏοÏ", + "PF": "Γαλλική Πολυνησία", + "PG": "ΠαποÏα Îέα Γουινέα", + "PH": "Φιλιππίνες", + "PK": "Πακιστάν", + "PL": "Πολωνία", + "PM": "Σεν Î Î¹ÎµÏ ÎºÎ±Î¹ Μικελόν", + "PN": "Îήσοι ΠίτκεÏν", + "PR": "ΠουέÏτο Ρίκο", + "PS": "Παλαιστινιακά Εδάφη", + "PT": "ΠοÏτογαλία", + "PW": "Παλάου", + "PY": "ΠαÏαγουάη", + "QA": "ΚατάÏ", + "RE": "Ρεϊνιόν", + "RO": "Ρουμανία", + "RS": "ΣεÏβία", + "RU": "Ρωσία", + "RW": "Ρουάντα", + "SA": "Σαουδική ΑÏαβία", + "SB": "Îήσοι Σολομώντος", + "SC": "Σεϋχέλλες", + "SD": "Σουδάν", + "SE": "Σουηδία", + "SG": "ΣιγκαποÏÏη", + "SH": "Αγία Ελένη", + "SI": "Σλοβενία", + "SJ": "ΣβάλμπαÏντ και Γιαν Μαγιέν", + "SK": "Σλοβακία", + "SL": "ΣιέÏα Λεόνε", + "SM": "Άγιος ΜαÏίνος", + "SN": "Σενεγάλη", + "SO": "Σομαλία", + "SR": "ΣουÏινάμ", + "SS": "Îότιο Σουδάν", + "ST": "Σάο Τομέ και ΠÏίνσιπε", + "SV": "Ελ ΣαλβαδόÏ", + "SX": "Άγιος ΜαÏτίνος (Ολλανδικό τμήμα)", + "SY": "ΣυÏία", + "SZ": "Σουαζιλάνδη", + "TA": "ΤÏιστάν ντα ΚοÏνια", + "TC": "Îήσοι ΤεÏκ και Κάικος", + "TD": "Τσαντ", + "TF": "Γαλλικές πεÏιοχές του νοτίου ημισφαιÏίου", + "TG": "Τόγκο", + "TH": "Ταϊλάνδη", + "TJ": "Τατζικιστάν", + "TK": "Τοκελάου", + "TL": "ΤιμόÏ-Λέστε", + "TM": "ΤουÏκμενιστάν", + "TN": "Τυνησία", + "TO": "Τόνγκα", + "TR": "ΤουÏκία", + "TT": "ΤÏινιντάντ και Τομπάγκο", + "TV": "ΤουβαλοÏ", + "TW": "Ταϊβάν", + "TZ": "Τανζανία", + "UA": "ΟυκÏανία", + "UG": "Ουγκάντα", + "UM": "ΑπομακÏυσμένες Îησίδες ΗΠΑ", + "UN": "Ηνωμένα Έθνη", + "US": "Ηνωμένες Πολιτείες", + "UY": "ΟυÏουγουάη", + "UZ": "Ουζμπεκιστάν", + "VA": "Βατικανό", + "VC": "Άγιος Βικέντιος και ΓÏεναδίνες", + "VE": "Βενεζουέλα", + "VG": "Î’Ïετανικές ΠαÏθένοι Îήσοι", + "VI": "ΑμεÏικανικές ΠαÏθένοι Îήσοι", + "VN": "Βιετνάμ", + "VU": "Βανουάτου", + "WF": "Ουάλις και ΦουτοÏνα", + "WS": "Σαμόα", + "XK": "Κόσοβο", + "YE": "Υεμένη", + "YT": "Μαγιότ", + "ZA": "Îότια ΑφÏική", + "ZM": "Ζάμπια", + "ZW": "Ζιμπάμπουε" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/en.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/en.json new file mode 100644 index 0000000000000000000000000000000000000000..28917397892aec223c460938b7ec8e54d94c3015 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/en.json @@ -0,0 +1,260 @@ +{ + "Version": "2.1.30.50", + "Names": { + "AC": "Ascension Island", + "AD": "Andorra", + "AE": "United Arab Emirates", + "AF": "Afghanistan", + "AG": "Antigua & Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antarctica", + "AR": "Argentina", + "AS": "American Samoa", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Ã…land Islands", + "AZ": "Azerbaijan", + "BA": "Bosnia & Herzegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgium", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "St. Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Caribbean Netherlands", + "BR": "Brazil", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Canada", + "CC": "Cocos (Keeling) Islands", + "CD": "Congo - Kinshasa", + "CF": "Central African Republic", + "CG": "Congo - Brazzaville", + "CH": "Switzerland", + "CI": "Côte d’Ivoire", + "CK": "Cook Islands", + "CL": "Chile", + "CM": "Cameroon", + "CN": "China", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Cape Verde", + "CW": "Curaçao", + "CX": "Christmas Island", + "CY": "Cyprus", + "CZ": "Czech Republic", + "DE": "Germany", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Denmark", + "DM": "Dominica", + "DO": "Dominican Republic", + "DZ": "Algeria", + "EA": "Ceuta & Melilla", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Egypt", + "EH": "Western Sahara", + "ER": "Eritrea", + "ES": "Spain", + "ET": "Ethiopia", + "EZ": "Eurozone", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Falkland Islands", + "FM": "Micronesia", + "FO": "Faroe Islands", + "FR": "France", + "GA": "Gabon", + "GB": "United Kingdom", + "GD": "Grenada", + "GE": "Georgia", + "GF": "French Guiana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Greenland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Equatorial Guinea", + "GR": "Greece", + "GS": "South Georgia & South Sandwich Islands", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hong Kong SAR China", + "HN": "Honduras", + "HR": "Croatia", + "HT": "Haiti", + "HU": "Hungary", + "IC": "Canary Islands", + "ID": "Indonesia", + "IE": "Ireland", + "IL": "Israel", + "IM": "Isle of Man", + "IN": "India", + "IO": "British Indian Ocean Territory", + "IQ": "Iraq", + "IR": "Iran", + "IS": "Iceland", + "IT": "Italy", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenya", + "KG": "Kyrgyzstan", + "KH": "Cambodia", + "KI": "Kiribati", + "KM": "Comoros", + "KN": "St. Kitts & Nevis", + "KP": "North Korea", + "KR": "South Korea", + "KW": "Kuwait", + "KY": "Cayman Islands", + "KZ": "Kazakhstan", + "LA": "Laos", + "LB": "Lebanon", + "LC": "St. Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lithuania", + "LU": "Luxembourg", + "LV": "Latvia", + "LY": "Libya", + "MA": "Morocco", + "MC": "Monaco", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "St. Martin", + "MG": "Madagascar", + "MH": "Marshall Islands", + "MK": "Macedonia", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongolia", + "MO": "Macau SAR China", + "MP": "Northern Mariana Islands", + "MQ": "Martinique", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldives", + "MW": "Malawi", + "MX": "Mexico", + "MY": "Malaysia", + "MZ": "Mozambique", + "NA": "Namibia", + "NC": "New Caledonia", + "NE": "Niger", + "NF": "Norfolk Island", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Netherlands", + "NO": "Norway", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "New Zealand", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "French Polynesia", + "PG": "Papua New Guinea", + "PH": "Philippines", + "PK": "Pakistan", + "PL": "Poland", + "PM": "St. Pierre & Miquelon", + "PN": "Pitcairn Islands", + "PR": "Puerto Rico", + "PS": "Palestinian Territories", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Romania", + "RS": "Serbia", + "RU": "Russia", + "RW": "Rwanda", + "SA": "Saudi Arabia", + "SB": "Solomon Islands", + "SC": "Seychelles", + "SD": "Sudan", + "SE": "Sweden", + "SG": "Singapore", + "SH": "St. Helena", + "SI": "Slovenia", + "SJ": "Svalbard & Jan Mayen", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "SS": "South Sudan", + "ST": "São Tomé & Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syria", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Turks & Caicos Islands", + "TD": "Chad", + "TF": "French Southern Territories", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tajikistan", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Turkey", + "TT": "Trinidad & Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraine", + "UG": "Uganda", + "UM": "U.S. Outlying Islands", + "UN": "United Nations", + "US": "United States", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VA": "Vatican City", + "VC": "St. Vincent & Grenadines", + "VE": "Venezuela", + "VG": "British Virgin Islands", + "VI": "U.S. Virgin Islands", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis & Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yemen", + "YT": "Mayotte", + "ZA": "South Africa", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/eo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/eo.json new file mode 100644 index 0000000000000000000000000000000000000000..13d080581d58df48a2ef714dd8eb5877e292cc78 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/eo.json @@ -0,0 +1,227 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AD": "Andoro", + "AE": "UnuiÄintaj Arabaj Emirlandoj", + "AF": "Afganujo", + "AG": "Antigvo-Barbudo", + "AI": "Angvilo", + "AL": "Albanujo", + "AM": "Armenujo", + "AO": "Angolo", + "AQ": "Antarkto", + "AR": "Argentino", + "AT": "AÅ­strujo", + "AU": "AÅ­stralio", + "AW": "Arubo", + "AZ": "AzerbajÄano", + "BA": "Bosnio-Hercegovino", + "BB": "Barbado", + "BD": "BangladeÅo", + "BE": "Belgujo", + "BF": "Burkino", + "BG": "Bulgarujo", + "BH": "Barejno", + "BI": "Burundo", + "BJ": "Benino", + "BM": "Bermudoj", + "BN": "Brunejo", + "BO": "Bolivio", + "BR": "Brazilo", + "BS": "Bahamoj", + "BT": "Butano", + "BW": "Bocvano", + "BY": "Belorusujo", + "BZ": "Belizo", + "CA": "Kanado", + "CF": "Centr-Afrika Respubliko", + "CG": "Kongolo", + "CH": "Svisujo", + "CI": "Ebur-Bordo", + "CK": "Kukinsuloj", + "CL": "Ĉilio", + "CM": "Kameruno", + "CN": "Ĉinujo", + "CO": "Kolombio", + "CR": "Kostariko", + "CU": "Kubo", + "CV": "Kabo-Verdo", + "CY": "Kipro", + "CZ": "ĈeÄ¥ujo", + "DE": "Germanujo", + "DJ": "Äœibutio", + "DK": "Danujo", + "DM": "Dominiko", + "DO": "Domingo", + "DZ": "AlÄerio", + "EC": "Ekvadoro", + "EE": "Estonujo", + "EG": "Egipto", + "EH": "Okcidenta Saharo", + "ER": "Eritreo", + "ES": "Hispanujo", + "ET": "Etiopujo", + "FI": "Finnlando", + "FJ": "FiÄoj", + "FM": "Mikronezio", + "FO": "Ferooj", + "FR": "Francujo", + "GA": "Gabono", + "GB": "UnuiÄinta ReÄlando", + "GD": "Grenado", + "GE": "Kartvelujo", + "GF": "Franca Gviano", + "GH": "Ganao", + "GI": "Äœibraltaro", + "GL": "Gronlando", + "GM": "Gambio", + "GN": "Gvineo", + "GP": "Gvadelupo", + "GQ": "Ekvatora Gvineo", + "GR": "Grekujo", + "GS": "Sud-Georgio kaj Sud-Sandviĉinsuloj", + "GT": "Gvatemalo", + "GU": "Gvamo", + "GW": "Gvineo-BisaÅ­o", + "GY": "Gujano", + "HN": "Honduro", + "HR": "Kroatujo", + "HT": "Haitio", + "HU": "Hungarujo", + "ID": "Indonezio", + "IE": "Irlando", + "IL": "Israelo", + "IN": "Hindujo", + "IO": "Brita Hindoceana Teritorio", + "IQ": "Irako", + "IR": "Irano", + "IS": "Islando", + "IT": "Italujo", + "JM": "Jamajko", + "JO": "Jordanio", + "JP": "Japanujo", + "KE": "Kenjo", + "KG": "Kirgizistano", + "KH": "KamboÄo", + "KI": "Kiribato", + "KM": "Komoroj", + "KN": "Sent-Kristofo kaj Neviso", + "KP": "Nord-Koreo", + "KR": "Sud-Koreo", + "KW": "Kuvajto", + "KY": "Kejmanoj", + "KZ": "KazaÄ¥stano", + "LA": "Laoso", + "LB": "Libano", + "LC": "Sent-Lucio", + "LI": "LiÄ¥tenÅtejno", + "LK": "Sri-Lanko", + "LR": "Liberio", + "LS": "Lesoto", + "LT": "Litovujo", + "LU": "Luksemburgo", + "LV": "Latvujo", + "LY": "Libio", + "MA": "Maroko", + "MC": "Monako", + "MD": "Moldavujo", + "MG": "Madagaskaro", + "MH": "MarÅaloj", + "MK": "Makedonujo", + "ML": "Malio", + "MM": "Mjanmao", + "MN": "Mongolujo", + "MP": "Nord-Marianoj", + "MQ": "Martiniko", + "MR": "MaÅ­ritanujo", + "MT": "Malto", + "MU": "MaÅ­ricio", + "MV": "Maldivoj", + "MW": "Malavio", + "MX": "Meksiko", + "MY": "Malajzio", + "MZ": "Mozambiko", + "NA": "Namibio", + "NC": "Nov-Kaledonio", + "NE": "NiÄero", + "NF": "Norfolkinsulo", + "NG": "NiÄerio", + "NI": "Nikaragvo", + "NL": "Nederlando", + "NO": "Norvegujo", + "NP": "Nepalo", + "NR": "Nauro", + "NU": "Niuo", + "NZ": "Nov-Zelando", + "OM": "Omano", + "PA": "Panamo", + "PE": "Peruo", + "PF": "Franca Polinezio", + "PG": "Papuo-Nov-Gvineo", + "PH": "Filipinoj", + "PK": "Pakistano", + "PL": "Pollando", + "PM": "Sent-Piero kaj Mikelono", + "PN": "Pitkarna Insulo", + "PR": "Puerto-Riko", + "PT": "Portugalujo", + "PW": "BelaÅ­o", + "PY": "Paragvajo", + "QA": "Kataro", + "RE": "Reunio", + "RO": "Rumanujo", + "RU": "Rusujo", + "RW": "Ruando", + "SA": "SaÅ­da Arabujo", + "SB": "Salomonoj", + "SC": "SejÅeloj", + "SD": "Sudano", + "SE": "Svedujo", + "SG": "Singapuro", + "SH": "Sent-Heleno", + "SI": "Slovenujo", + "SJ": "Svalbardo kaj Jan-Majen-insulo", + "SK": "Slovakujo", + "SL": "Siera-Leono", + "SM": "San-Marino", + "SN": "Senegalo", + "SO": "Somalujo", + "SR": "Surinamo", + "ST": "Sao-Tomeo kaj Principeo", + "SV": "Salvadoro", + "SY": "Sirio", + "SZ": "Svazilando", + "TD": "Ĉado", + "TG": "Togolo", + "TH": "Tajlando", + "TJ": "TaÄikujo", + "TM": "Turkmenujo", + "TN": "Tunizio", + "TO": "Tongo", + "TR": "Turkujo", + "TT": "Trinidado kaj Tobago", + "TV": "Tuvalo", + "TW": "Tajvano", + "TZ": "Tanzanio", + "UA": "Ukrajno", + "UG": "Ugando", + "UM": "Usonaj malgrandaj insuloj", + "US": "Usono", + "UY": "Urugvajo", + "UZ": "Uzbekujo", + "VA": "Vatikano", + "VC": "Sent-Vincento kaj la Grenadinoj", + "VE": "Venezuelo", + "VG": "Britaj Virgulininsuloj", + "VI": "Usonaj Virgulininsuloj", + "VN": "Vjetnamo", + "VU": "Vanuatuo", + "WF": "Valiso kaj Futuno", + "WS": "Samoo", + "YE": "Jemeno", + "YT": "Majoto", + "ZA": "Sud-Afriko", + "ZM": "Zambio", + "ZW": "Zimbabvo" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es.json new file mode 100644 index 0000000000000000000000000000000000000000..233c28eeeae5f720c04868704dd263cdb14d20f9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.28.80", + "Names": { + "AC": "Isla de la Ascensión", + "AD": "Andorra", + "AE": "Emiratos Ãrabes Unidos", + "AF": "Afganistán", + "AG": "Antigua y Barbuda", + "AI": "Anguila", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antártida", + "AR": "Argentina", + "AS": "Samoa Americana", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Islas Ã…land", + "AZ": "Azerbaiyán", + "BA": "Bosnia-Herzegovina", + "BB": "Barbados", + "BD": "Bangladés", + "BE": "Bélgica", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Baréin", + "BI": "Burundi", + "BJ": "Benín", + "BL": "San Bartolomé", + "BM": "Bermudas", + "BN": "Brunéi", + "BO": "Bolivia", + "BQ": "Caribe neerlandés", + "BR": "Brasil", + "BS": "Bahamas", + "BT": "Bután", + "BW": "Botsuana", + "BY": "Bielorrusia", + "BZ": "Belice", + "CA": "Canadá", + "CC": "Islas Cocos", + "CD": "República Democrática del Congo", + "CF": "República Centroafricana", + "CG": "República del Congo", + "CH": "Suiza", + "CI": "Côte d’Ivoire", + "CK": "Islas Cook", + "CL": "Chile", + "CM": "Camerún", + "CN": "China", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Cabo Verde", + "CW": "Curazao", + "CX": "Isla de Navidad", + "CY": "Chipre", + "CZ": "República Checa", + "DE": "Alemania", + "DG": "Diego García", + "DJ": "Yibuti", + "DK": "Dinamarca", + "DM": "Dominica", + "DO": "República Dominicana", + "DZ": "Argelia", + "EA": "Ceuta y Melilla", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Egipto", + "EH": "Sáhara Occidental", + "ER": "Eritrea", + "ES": "España", + "ET": "Etiopía", + "FI": "Finlandia", + "FJ": "Fiyi", + "FK": "Islas Malvinas", + "FM": "Micronesia", + "FO": "Islas Feroe", + "FR": "Francia", + "GA": "Gabón", + "GB": "Reino Unido", + "GD": "Granada", + "GE": "Georgia", + "GF": "Guayana Francesa", + "GG": "Guernesey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Groenlandia", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadalupe", + "GQ": "Guinea Ecuatorial", + "GR": "Grecia", + "GS": "Islas Georgia del Sur y Sandwich del Sur", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bisáu", + "GY": "Guyana", + "HK": "RAE de Hong Kong (China)", + "HN": "Honduras", + "HR": "Croacia", + "HT": "Haití", + "HU": "Hungría", + "IC": "Canarias", + "ID": "Indonesia", + "IE": "Irlanda", + "IL": "Israel", + "IM": "Isla de Man", + "IN": "India", + "IO": "Territorio Británico del Océano Ãndico", + "IQ": "Irak", + "IR": "Irán", + "IS": "Islandia", + "IT": "Italia", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordania", + "JP": "Japón", + "KE": "Kenia", + "KG": "Kirguistán", + "KH": "Camboya", + "KI": "Kiribati", + "KM": "Comoras", + "KN": "San Cristóbal y Nieves", + "KP": "Corea del Norte", + "KR": "Corea del Sur", + "KW": "Kuwait", + "KY": "Islas Caimán", + "KZ": "Kazajistán", + "LA": "Laos", + "LB": "Líbano", + "LC": "Santa Lucía", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesoto", + "LT": "Lituania", + "LU": "Luxemburgo", + "LV": "Letonia", + "LY": "Libia", + "MA": "Marruecos", + "MC": "Mónaco", + "MD": "Moldavia", + "ME": "Montenegro", + "MF": "San Martín", + "MG": "Madagascar", + "MH": "Islas Marshall", + "MK": "Macedonia", + "ML": "Mali", + "MM": "Myanmar (Birmania)", + "MN": "Mongolia", + "MO": "RAE de Macao (China)", + "MP": "Islas Marianas del Norte", + "MQ": "Martinica", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauricio", + "MV": "Maldivas", + "MW": "Malaui", + "MX": "México", + "MY": "Malasia", + "MZ": "Mozambique", + "NA": "Namibia", + "NC": "Nueva Caledonia", + "NE": "Níger", + "NF": "Isla Norfolk", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Países Bajos", + "NO": "Noruega", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nueva Zelanda", + "OM": "Omán", + "PA": "Panamá", + "PE": "Perú", + "PF": "Polinesia Francesa", + "PG": "Papúa Nueva Guinea", + "PH": "Filipinas", + "PK": "Pakistán", + "PL": "Polonia", + "PM": "San Pedro y Miquelón", + "PN": "Islas Pitcairn", + "PR": "Puerto Rico", + "PS": "Territorios Palestinos", + "PT": "Portugal", + "PW": "Palaos", + "PY": "Paraguay", + "QA": "Catar", + "RE": "Reunión", + "RO": "Rumanía", + "RS": "Serbia", + "RU": "Rusia", + "RW": "Ruanda", + "SA": "Arabia Saudí", + "SB": "Islas Salomón", + "SC": "Seychelles", + "SD": "Sudán", + "SE": "Suecia", + "SG": "Singapur", + "SH": "Santa Elena", + "SI": "Eslovenia", + "SJ": "Svalbard y Jan Mayen", + "SK": "Eslovaquia", + "SL": "Sierra Leona", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "SS": "Sudán del Sur", + "ST": "Santo Tomé y Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Siria", + "SZ": "Suazilandia", + "TA": "Tristán de Acuña", + "TC": "Islas Turcas y Caicos", + "TD": "Chad", + "TF": "Territorios Australes Franceses", + "TG": "Togo", + "TH": "Tailandia", + "TJ": "Tayikistán", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turkmenistán", + "TN": "Túnez", + "TO": "Tonga", + "TR": "Turquía", + "TT": "Trinidad y Tobago", + "TV": "Tuvalu", + "TW": "Taiwán", + "TZ": "Tanzania", + "UA": "Ucrania", + "UG": "Uganda", + "UM": "Islas menores alejadas de EE. UU.", + "US": "Estados Unidos", + "UY": "Uruguay", + "UZ": "Uzbekistán", + "VA": "Ciudad del Vaticano", + "VC": "San Vicente y las Granadinas", + "VE": "Venezuela", + "VG": "Islas Vírgenes Británicas", + "VI": "Islas Vírgenes de EE. UU.", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis y Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yemen", + "YT": "Mayotte", + "ZA": "Sudáfrica", + "ZM": "Zambia", + "ZW": "Zimbabue" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_419.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_419.json new file mode 100644 index 0000000000000000000000000000000000000000..d236097f5679f4a3356d0e8192099efe0a7124c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_419.json @@ -0,0 +1,10 @@ +{ + "Version": "2.1.27.99", + "Names": { + "CI": "Costa de Marfil", + "IC": "Islas Canarias", + "TA": "Tristán da Cunha", + "TL": "Timor Oriental", + "UM": "Islas Ultramarinas de EE.UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_AR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_AR.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_AR.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_BO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_BO.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_BO.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_CL.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_CL.json new file mode 100644 index 0000000000000000000000000000000000000000..27fb03a5c3ee3efddeebb09cefed70ba30902fd9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_CL.json @@ -0,0 +1,10 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "EH": "Sahara Occidental", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_CO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_CO.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_CO.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_CR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_CR.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_CR.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_DO.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_DO.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_DO.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_EC.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_EC.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_EC.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_GT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_GT.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_GT.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_HN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_HN.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_HN.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_MX.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_MX.json new file mode 100644 index 0000000000000000000000000000000000000000..e37b80568379a8f59f266af54fd0d47f67251fa9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_MX.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.28.76", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas Ultramarinas Menores de Estados Unidos" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_NI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_NI.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_NI.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_PA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_PA.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_PA.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_PE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_PE.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_PE.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_PR.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_PR.json new file mode 100644 index 0000000000000000000000000000000000000000..b823decfa6195bac8e1533f0e67f3d98f6c55f2a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_PR.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.99", + "Names": { + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_PY.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_PY.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_PY.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_SV.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_SV.json new file mode 100644 index 0000000000000000000000000000000000000000..b823decfa6195bac8e1533f0e67f3d98f6c55f2a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_SV.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.99", + "Names": { + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_US.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_US.json new file mode 100644 index 0000000000000000000000000000000000000000..b823decfa6195bac8e1533f0e67f3d98f6c55f2a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_US.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.99", + "Names": { + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_VE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_VE.json new file mode 100644 index 0000000000000000000000000000000000000000..17716fdebb6f1098c1194e95306f7c89ea293426 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/es_VE.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BA": "Bosnia y Herzegovina", + "TA": "Tristán de Acuña", + "TL": "Timor-Leste", + "UM": "Islas menores alejadas de EE. UU." + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/et.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/et.json new file mode 100644 index 0000000000000000000000000000000000000000..c9405001ef8e7d23fceee27021e256c2ef87cea2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/et.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Ascensioni saar", + "AD": "Andorra", + "AE": "Araabia Ühendemiraadid", + "AF": "Afganistan", + "AG": "Antigua ja Barbuda", + "AI": "Anguilla", + "AL": "Albaania", + "AM": "Armeenia", + "AO": "Angola", + "AQ": "Antarktika", + "AR": "Argentina", + "AS": "Ameerika Samoa", + "AT": "Austria", + "AU": "Austraalia", + "AW": "Aruba", + "AX": "Ahvenamaa", + "AZ": "Aserbaidžaan", + "BA": "Bosnia ja Hertsegoviina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "Bulgaaria", + "BH": "Bahrein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Boliivia", + "BQ": "Hollandi Kariibi mere saared", + "BR": "Brasiilia", + "BS": "Bahama", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Valgevene", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kookossaared", + "CD": "Kongo DV", + "CF": "Kesk-Aafrika Vabariik", + "CG": "Kongo Vabariik", + "CH": "Å veits", + "CI": "Côte d’Ivoire", + "CK": "Cooki saared", + "CL": "TÅ¡iili", + "CM": "Kamerun", + "CN": "Hiina", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Kuuba", + "CV": "Roheneemesaared", + "CW": "Curaçao", + "CX": "Jõulusaar", + "CY": "Küpros", + "CZ": "TÅ¡ehhi", + "DE": "Saksamaa", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Taani", + "DM": "Dominica", + "DO": "Dominikaani Vabariik", + "DZ": "Alžeeria", + "EA": "Ceuta ja Melilla", + "EC": "Ecuador", + "EE": "Eesti", + "EG": "Egiptus", + "EH": "Lääne-Sahara", + "ER": "Eritrea", + "ES": "Hispaania", + "ET": "Etioopia", + "FI": "Soome", + "FJ": "Fidži", + "FK": "Falklandi saared", + "FM": "Mikroneesia", + "FO": "Fääri saared", + "FR": "Prantsusmaa", + "GA": "Gabon", + "GB": "Suurbritannia", + "GD": "Grenada", + "GE": "Gruusia", + "GF": "Prantsuse Guajaana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Gröönimaa", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Ekvatoriaal-Guinea", + "GR": "Kreeka", + "GS": "Lõuna-Georgia ja Lõuna-Sandwichi saared", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hongkongi erihalduspiirkond", + "HN": "Honduras", + "HR": "Horvaatia", + "HT": "Haiti", + "HU": "Ungari", + "IC": "Kanaari saared", + "ID": "Indoneesia", + "IE": "Iirimaa", + "IL": "Iisrael", + "IM": "Mani saar", + "IN": "India", + "IO": "Briti India ookeani ala", + "IQ": "Iraak", + "IR": "Iraan", + "IS": "Island", + "IT": "Itaalia", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordaania", + "JP": "Jaapan", + "KE": "Keenia", + "KG": "Kõrgõzstan", + "KH": "Kambodža", + "KI": "Kiribati", + "KM": "Komoorid", + "KN": "Saint Kitts ja Nevis", + "KP": "Põhja-Korea", + "KR": "Lõuna-Korea", + "KW": "Kuveit", + "KY": "Kaimanisaared", + "KZ": "Kasahstan", + "LA": "Laos", + "LB": "Liibanon", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Libeeria", + "LS": "Lesotho", + "LT": "Leedu", + "LU": "Luksemburg", + "LV": "Läti", + "LY": "Liibüa", + "MA": "Maroko", + "MC": "Monaco", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "Saint-Martin", + "MG": "Madagaskar", + "MH": "Marshalli Saared", + "MK": "Makedoonia", + "ML": "Mali", + "MM": "Myanmar (Birma)", + "MN": "Mongoolia", + "MO": "Macau erihalduspiirkond", + "MP": "Põhja-Mariaanid", + "MQ": "Martinique", + "MR": "Mauritaania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldiivid", + "MW": "Malawi", + "MX": "Mehhiko", + "MY": "Malaisia", + "MZ": "Mosambiik", + "NA": "Namiibia", + "NC": "Uus-Kaledoonia", + "NE": "Niger", + "NF": "Norfolk", + "NG": "Nigeeria", + "NI": "Nicaragua", + "NL": "Holland", + "NO": "Norra", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Uus-Meremaa", + "OM": "Omaan", + "PA": "Panama", + "PE": "Peruu", + "PF": "Prantsuse Polüneesia", + "PG": "Paapua Uus-Guinea", + "PH": "Filipiinid", + "PK": "Pakistan", + "PL": "Poola", + "PM": "Saint Pierre ja Miquelon", + "PN": "Pitcairni saared", + "PR": "Puerto Rico", + "PS": "Palestiina alad", + "PT": "Portugal", + "PW": "Belau", + "PY": "Paraguay", + "QA": "Katar", + "RE": "Réunion", + "RO": "Rumeenia", + "RS": "Serbia", + "RU": "Venemaa", + "RW": "Rwanda", + "SA": "Saudi Araabia", + "SB": "Saalomoni Saared", + "SC": "SeiÅ¡ellid", + "SD": "Sudaan", + "SE": "Rootsi", + "SG": "Singapur", + "SH": "Saint Helena", + "SI": "Sloveenia", + "SJ": "Svalbard ja Jan Mayen", + "SK": "Slovakkia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somaalia", + "SR": "Suriname", + "SS": "Lõuna-Sudaan", + "ST": "São Tomé ja Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Süüria", + "SZ": "Svaasimaa", + "TA": "Tristan da Cunha", + "TC": "Turks ja Caicos", + "TD": "TÅ¡aad", + "TF": "Prantsuse Lõunaalad", + "TG": "Togo", + "TH": "Tai", + "TJ": "Tadžikistan", + "TK": "Tokelau", + "TL": "Ida-Timor", + "TM": "Türkmenistan", + "TN": "Tuneesia", + "TO": "Tonga", + "TR": "Türgi", + "TT": "Trinidad ja Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tansaania", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "Ühendriikide hajasaared", + "UN": "Ühendatud Rahvaste Organisatsioon", + "US": "Ameerika Ühendriigid", + "UY": "Uruguay", + "UZ": "Usbekistan", + "VA": "Vatikan", + "VC": "Saint Vincent ja Grenadiinid", + "VE": "Venezuela", + "VG": "Briti Neitsisaared", + "VI": "USA Neitsisaared", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis ja Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jeemen", + "YT": "Mayotte", + "ZA": "Lõuna-Aafrika Vabariik", + "ZM": "Sambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/eu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/eu.json new file mode 100644 index 0000000000000000000000000000000000000000..739bba8b49e7721178fd47c2b1fb119dfdaec586 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/eu.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.29.20", + "Names": { + "AC": "Ascension uhartea", + "AD": "Andorra", + "AE": "Arabiar Emirerri Batuak", + "AF": "Afganistan", + "AG": "Antigua eta Barbuda", + "AI": "Angila", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antartika", + "AR": "Argentina", + "AS": "Amerikar Samoa", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Aland uharteak", + "AZ": "Azerbaijan", + "BA": "Bosnia-Herzegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgika", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Karibeko Herbehereak", + "BR": "Brasil", + "BS": "Bahamak", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Bielorrusia", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Cocos uharteak", + "CD": "Kongoko Errepublika Demokratikoa", + "CF": "Afrika Erdiko Errepublika", + "CG": "Kongo (Brazzaville)", + "CH": "Suitza", + "CI": "Boli Kosta", + "CK": "Cook uharteak", + "CL": "Txile", + "CM": "Kamerun", + "CN": "Txina", + "CO": "Kolonbia", + "CR": "Costa Rica", + "CU": "Kuba", + "CV": "Cabo Verde", + "CW": "Curaçao", + "CX": "Christmas uhartea", + "CY": "Zipre", + "CZ": "Txekiar Errepublika", + "DE": "Alemania", + "DG": "Diego Garcia", + "DJ": "Djibuti", + "DK": "Danimarka", + "DM": "Dominika", + "DO": "Dominikar Errepublika", + "DZ": "Aljeria", + "EA": "Ceuta eta Melilla", + "EC": "Ekuador", + "EE": "Estonia", + "EG": "Egipto", + "EH": "Mendebaldeko Sahara", + "ER": "Eritrea", + "ES": "Espainia", + "ET": "Etiopia", + "FI": "Finlandia", + "FJ": "Fiji", + "FK": "Malvinak", + "FM": "Mikronesia", + "FO": "Faroe uharteak", + "FR": "Frantzia", + "GA": "Gabon", + "GB": "Erresuma Batua", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Guyana Frantsesa", + "GG": "Guernesey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Groenlandia", + "GM": "Gambia", + "GN": "Ginea", + "GP": "Guadalupe", + "GQ": "Ekuatore Ginea", + "GR": "Grezia", + "GS": "Hegoaldeko Georgia eta Hegoaldeko Sandwich uharteak", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Ginea-Bissau", + "GY": "Guyana", + "HK": "Hong Kong AEB Txina", + "HN": "Honduras", + "HR": "Kroazia", + "HT": "Haiti", + "HU": "Hungaria", + "IC": "Kanariak", + "ID": "Indonesia", + "IE": "Irlanda", + "IL": "Israel", + "IM": "Man uhartea", + "IN": "India", + "IO": "Indiako Ozeanoko lurralde britainiarra", + "IQ": "Irak", + "IR": "Iran", + "IS": "Islandia", + "IT": "Italia", + "JE": "Jersey", + "JM": "Jamaika", + "JO": "Jordania", + "JP": "Japonia", + "KE": "Kenya", + "KG": "Kirgizistan", + "KH": "Kanbodia", + "KI": "Kiribati", + "KM": "Komoreak", + "KN": "Saint Kitts eta Nevis", + "KP": "Ipar Korea", + "KR": "Hego Korea", + "KW": "Kuwait", + "KY": "Kaiman uharteak", + "KZ": "Kazakhstan", + "LA": "Laos", + "LB": "Libano", + "LC": "Santa Luzia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lituania", + "LU": "Luxenburgo", + "LV": "Letonia", + "LY": "Libia", + "MA": "Maroko", + "MC": "Monako", + "MD": "Moldavia", + "ME": "Montenegro", + "MF": "San Martin", + "MG": "Madagaskar", + "MH": "Marshall uharteak", + "MK": "Mazedonia", + "ML": "Mali", + "MM": "Myanmar (Birmania)", + "MN": "Mongolia", + "MO": "Macau AEB Txina", + "MP": "Iparraldeko Mariana uharteak", + "MQ": "Martinika", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Maurizio", + "MV": "Maldivak", + "MW": "Malawi", + "MX": "Mexiko", + "MY": "Malaysia", + "MZ": "Mozambike", + "NA": "Namibia", + "NC": "Kaledonia Berria", + "NE": "Niger", + "NF": "Norfolk uhartea", + "NG": "Nigeria", + "NI": "Nikaragua", + "NL": "Herbehereak", + "NO": "Norvegia", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Zeelanda Berria", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Polinesia Frantsesa", + "PG": "Papua Ginea Berria", + "PH": "Filipinak", + "PK": "Pakistan", + "PL": "Polonia", + "PM": "Saint-Pierre eta Mikelune", + "PN": "Pitcairn uharteak", + "PR": "Puerto Rico", + "PS": "Palestinako Lurraldeak", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguai", + "QA": "Qatar", + "RE": "Reunion", + "RO": "Errumania", + "RS": "Serbia", + "RU": "Errusia", + "RW": "Ruanda", + "SA": "Saudi Arabia", + "SB": "Salomon uharteak", + "SC": "Seychelleak", + "SD": "Sudan", + "SE": "Suedia", + "SG": "Singapur", + "SH": "Santa Helena", + "SI": "Eslovenia", + "SJ": "Svalbard eta Jan Mayen uharteak", + "SK": "Eslovakia", + "SL": "Sierra Leona", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "SS": "Hego Sudan", + "ST": "Sao Tome eta Principe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Siria", + "SZ": "Swazilandia", + "TA": "Tristan da Cunha", + "TC": "Turk eta Caico uharteak", + "TD": "Txad", + "TF": "Hegoaldeko lurralde frantsesak", + "TG": "Togo", + "TH": "Thailandia", + "TJ": "Tajikistan", + "TK": "Tokelau", + "TL": "Ekialdeko Timor", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Turkia", + "TT": "Trinidad eta Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "Ameriketako Estatu Batuetako Kanpoaldeko Uharte Txikiak", + "US": "Ameriketako Estatu Batuak", + "UY": "Uruguai", + "UZ": "Uzbekistan", + "VA": "Vatikano Hiria", + "VC": "Saint Vincent eta Grenadinak", + "VE": "Venezuela", + "VG": "Birjina uharte britainiarrak", + "VI": "Birjina uharte amerikarrak", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis eta Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yemen", + "YT": "Mayotte", + "ZA": "Hegoafrika", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fa.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fa.json new file mode 100644 index 0000000000000000000000000000000000000000..bc712c331922f1f6cc1f50cb845a78ac6b8c0f9e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fa.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.44", + "Names": { + "AC": "جزایر آسنسیون", + "AD": "آندورا", + "AE": "امارات متحدهٔ عربی", + "AF": "Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†", + "AG": "آنتیگوا Ùˆ باربودا", + "AI": "آنگویلا", + "AL": "آلبانی", + "AM": "ارمنستان", + "AO": "آنگولا", + "AQ": "جنوبگان", + "AR": "آرژانتین", + "AS": "ساموآی امریکا", + "AT": "اتریش", + "AU": "استرالیا", + "AW": "آروبا", + "AX": "جزایر آلاند", + "AZ": "جمهوری آذربایجان", + "BA": "بوسنی Ùˆ هرزگوین", + "BB": "باربادوس", + "BD": "بنگلادش", + "BE": "بلژیک", + "BF": "Ø¨ÙˆØ±Ú©ÛŒÙ†Ø§ÙØ§Ø³Ùˆ", + "BG": "بلغارستان", + "BH": "بحرین", + "BI": "بوروندی", + "BJ": "بنین", + "BL": "سن بارتلمی", + "BM": "برمودا", + "BN": "برونئی", + "BO": "بولیوی", + "BQ": "جزایر کارائیب هلند", + "BR": "برزیل", + "BS": "باهاما", + "BT": "بوتان", + "BW": "بوتسوانا", + "BY": "بلاروس", + "BZ": "بلیز", + "CA": "کانادا", + "CC": "جزایر کوکوس", + "CD": "Ú©Ù†Ú¯Ùˆ - کینشاسا", + "CF": "جمهوری Ø§ÙØ±ÛŒÙ‚ای مرکزی", + "CG": "Ú©Ù†Ú¯Ùˆ - برازویل", + "CH": "سوئیس", + "CI": "ساحل عاج", + "CK": "جزایر Ú©ÙˆÚ©", + "CL": "شیلی", + "CM": "کامرون", + "CN": "چین", + "CO": "کلمبیا", + "CR": "کاستاریکا", + "CU": "کوبا", + "CV": "کیپ‌ورد", + "CW": "کوراسائو", + "CX": "جزیرهٔ کریسمس", + "CY": "قبرس", + "CZ": "جمهوری Ú†Ú©", + "DE": "آلمان", + "DG": "دیه‌گو گارسیا", + "DJ": "جیبوتی", + "DK": "دانمارک", + "DM": "دومینیکا", + "DO": "جمهوری دومینیکن", + "DZ": "الجزایر", + "EA": "سبته Ùˆ ملیله", + "EC": "اکوادور", + "EE": "استونی", + "EG": "مصر", + "EH": "صحرای غربی", + "ER": "اریتره", + "ES": "اسپانیا", + "ET": "اتیوپی", + "FI": "Ùنلاند", + "FJ": "Ùیجی", + "FK": "جزایر ÙØ§Ù„کلند", + "FM": "میکرونزی", + "FO": "جزایر ÙØ§Ø±Ùˆ", + "FR": "ÙØ±Ø§Ù†Ø³Ù‡", + "GA": "گابن", + "GB": "بریتانیا", + "GD": "گرنادا", + "GE": "گرجستان", + "GF": "گویان ÙØ±Ø§Ù†Ø³Ù‡", + "GG": "گرنزی", + "GH": "غنا", + "GI": "جبل‌الطارق", + "GL": "گرینلند", + "GM": "گامبیا", + "GN": "گینه", + "GP": "گوادلوپ", + "GQ": "گینهٔ استوایی", + "GR": "یونان", + "GS": "جزایر جورجیای جنوبی Ùˆ ساندویچ جنوبی", + "GT": "گواتمالا", + "GU": "گوام", + "GW": "گینهٔ بیسائو", + "GY": "گویان", + "HK": "هنگ‌کنگ، ناحیهٔ ویژهٔ حکومتی چین", + "HN": "هندوراس", + "HR": "کرواسی", + "HT": "هائیتی", + "HU": "مجارستان", + "IC": "جزایر قناری", + "ID": "اندونزی", + "IE": "ایرلند", + "IL": "اسرائیل", + "IM": "جزیرهٔ من", + "IN": "هند", + "IO": "قلمرو بریتانیا در اقیانوس هند", + "IQ": "عراق", + "IR": "ایران", + "IS": "ایسلند", + "IT": "ایتالیا", + "JE": "جرزی", + "JM": "جامائیکا", + "JO": "اردن", + "JP": "ژاپن", + "KE": "کنیا", + "KG": "قرقیزستان", + "KH": "کامبوج", + "KI": "کیریباتی", + "KM": "کومورو", + "KN": "سنت کیتس Ùˆ نویس", + "KP": "کرهٔ شمالی", + "KR": "کرهٔ جنوبی", + "KW": "کویت", + "KY": "جزایر Ú©Ùیمن", + "KZ": "قزاقستان", + "LA": "لائوس", + "LB": "لبنان", + "LC": "سنت لوسیا", + "LI": "لیختن‌اشتاین", + "LK": "سری‌لانکا", + "LR": "لیبریا", + "LS": "لسوتو", + "LT": "لیتوانی", + "LU": "لوکزامبورگ", + "LV": "لتونی", + "LY": "لیبی", + "MA": "مراکش", + "MC": "موناکو", + "MD": "مولداوی", + "ME": "مونته‌نگرو", + "MF": "سنت مارتین", + "MG": "ماداگاسکار", + "MH": "جزایر مارشال", + "MK": "مقدونیه", + "ML": "مالی", + "MM": "میانمار (برمه)", + "MN": "مغولستان", + "MO": "ماکائو، ناحیهٔ ویژهٔ حکومتی چین", + "MP": "جزایر ماریانای شمالی", + "MQ": "مارتینیک", + "MR": "موریتانی", + "MS": "مونت‌سرات", + "MT": "مالت", + "MU": "موریس", + "MV": "مالدیو", + "MW": "مالاوی", + "MX": "مکزیک", + "MY": "مالزی", + "MZ": "موزامبیک", + "NA": "نامیبیا", + "NC": "کالدونیای جدید", + "NE": "نیجر", + "NF": "جزیرهٔ نورÙولک", + "NG": "نیجریه", + "NI": "نیکاراگوئه", + "NL": "هلند", + "NO": "نروژ", + "NP": "نپال", + "NR": "نائورو", + "NU": "نیوئه", + "NZ": "نیوزیلند", + "OM": "عمان", + "PA": "پاناما", + "PE": "پرو", + "PF": "پلی‌نزی ÙØ±Ø§Ù†Ø³Ù‡", + "PG": "پاپوا گینهٔ نو", + "PH": "Ùیلیپین", + "PK": "پاکستان", + "PL": "لهستان", + "PM": "سن پیر Ùˆ میکلن", + "PN": "جزایر پیت‌کرن", + "PR": "پورتوریکو", + "PS": "سرزمین‌های Ùلسطینی", + "PT": "پرتغال", + "PW": "پالائو", + "PY": "پاراگوئه", + "QA": "قطر", + "RE": "رئونیون", + "RO": "رومانی", + "RS": "صربستان", + "RU": "روسیه", + "RW": "رواندا", + "SA": "عربستان سعودی", + "SB": "جزایر سلیمان", + "SC": "سیشل", + "SD": "سودان", + "SE": "سوئد", + "SG": "سنگاپور", + "SH": "سنت هلن", + "SI": "اسلوونی", + "SJ": "اسوالبارد Ùˆ جان‌ماین", + "SK": "اسلواکی", + "SL": "سیرالئون", + "SM": "سان‌مارینو", + "SN": "سنگال", + "SO": "سومالی", + "SR": "سورینام", + "SS": "سودان جنوبی", + "ST": "سائوتومه Ùˆ پرینسیپ", + "SV": "السالوادور", + "SX": "سنت مارتن", + "SY": "سوریه", + "SZ": "سوازیلند", + "TA": "تریستان دا کونا", + "TC": "جزایر تورکس Ùˆ کایکوس", + "TD": "چاد", + "TF": "قلمروهای جنوبی ÙØ±Ø§Ù†Ø³Ù‡", + "TG": "توگو", + "TH": "تایلند", + "TJ": "تاجیکستان", + "TK": "توکلائو", + "TL": "تیمور-لسته", + "TM": "ترکمنستان", + "TN": "تونس", + "TO": "تونگا", + "TR": "ترکیه", + "TT": "ترینیداد Ùˆ توباگو", + "TV": "تووالو", + "TW": "تایوان", + "TZ": "تانزانیا", + "UA": "اوکراین", + "UG": "اوگاندا", + "UM": "جزایر Ø¯ÙˆØ±Ø§ÙØªØ§Ø¯Ù‡Ù” ایالات متحده", + "UN": "سازمان ملل متحد", + "US": "ایالات متحده", + "UY": "اروگوئه", + "UZ": "ازبکستان", + "VA": "واتیکان", + "VC": "سنت وینسنت Ùˆ گرنادین", + "VE": "ونزوئلا", + "VG": "جزایر ویرجین بریتانیا", + "VI": "جزایر ویرجین ایالات متحده", + "VN": "ویتنام", + "VU": "وانواتو", + "WF": "والیس Ùˆ Ùوتونا", + "WS": "ساموآ", + "XK": "کوزوو", + "YE": "یمن", + "YT": "مایوت", + "ZA": "Ø§ÙØ±ÛŒÙ‚ای جنوبی", + "ZM": "زامبیا", + "ZW": "زیمبابوه" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fa_AF.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fa_AF.json new file mode 100644 index 0000000000000000000000000000000000000000..adec06492da0fc3db889ee7b7788b5a4c40ee547 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fa_AF.json @@ -0,0 +1,97 @@ +{ + "Version": "2.1.29.44", + "Names": { + "AD": "اندورا", + "AG": "انتیگوا Ùˆ باربودا", + "AL": "البانیا", + "AO": "انگولا", + "AQ": "انترکتیکا", + "AR": "ارجنتاین", + "AU": "آسترالیا", + "BA": "بوسنیا Ùˆ هرزه‌گوینا", + "BD": "بنگله‌دیش", + "BE": "بلجیم", + "BG": "بلغاریا", + "BN": "برونی", + "BO": "بولیویا", + "BR": "برازیل", + "BS": "بهاماس", + "BY": "روسیهٔ سÙید", + "CD": "کانگو - کینشاسا", + "CG": "کانگو - برازویل", + "CH": "سویس", + "CL": "Ú†Ù„ÛŒ", + "CO": "کولمبیا", + "CR": "کاستریکا", + "CU": "کیوبا", + "DK": "دنمارک", + "EE": "استونیا", + "ER": "اریتریا", + "ES": "هسپانیه", + "ET": "ایتوپیا", + "FI": "Ùنلند", + "FM": "میکرونزیا", + "GD": "گرینادا", + "GH": "گانا", + "GN": "گینیا", + "GQ": "گینیا استوایی", + "GT": "گواتیمالا", + "GW": "گینیا بیسائو", + "GY": "گیانا", + "HN": "هاندوراس", + "HR": "کروشیا", + "HT": "هایتی", + "ID": "اندونیزیا", + "IE": "آیرلند", + "IS": "آیسلند", + "JP": "جاپان", + "KE": "کینیا", + "KG": "قرغزستان", + "KH": "کمپوچیا", + "KP": "کوریای شمالی", + "KR": "کوریای جنوبی", + "LK": "سریلانکا", + "LS": "لیسوتو", + "LT": "لتوانیا", + "LV": "لاتویا", + "LY": "لیبیا", + "MG": "مادغاسکر", + "MN": "منگولیا", + "MR": "موریتانیا", + "MT": "مالتا", + "MX": "مکسیکو", + "MY": "مالیزیا", + "MZ": "موزمبیق", + "NE": "نایجر", + "NG": "نیجریا", + "NI": "نیکاراگوا", + "NL": "هالند", + "NO": "ناروی", + "NP": "نیپال", + "NZ": "زیلاند جدید", + "PA": "پانامه", + "PE": "پیرو", + "PG": "پاپوا نیو گینیا", + "PL": "پولند", + "PT": "پرتگال", + "PY": "پاراگوای", + "RO": "رومانیا", + "RW": "روآندا", + "SE": "سویدن", + "SG": "سینگاپور", + "SI": "سلونیا", + "SK": "سلواکیا", + "SL": "سیرالیون", + "SN": "سینیگال", + "SO": "سومالیه", + "SV": "السلوادور", + "TJ": "تاجکستان", + "UA": "اکراین", + "UG": "یوگاندا", + "UY": "یوروگوای", + "VC": "سنت وینسنت Ùˆ گرنادین‌ها", + "VE": "ونزویلا", + "XK": "کوسوا", + "ZW": "زیمبابوی" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ff.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ff.json new file mode 100644 index 0000000000000000000000000000000000000000..04b8bf09f4e78c12542ff03b5f5859fa0d2c2f52 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ff.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AD": "Anndoora", + "AE": "Emiraat Araab DenntuÉ—e", + "AF": "Afganistaan", + "AG": "Antiguwaa e Barbudaa", + "AI": "Anngiyaa", + "AL": "Albanii", + "AM": "Armenii", + "AO": "Anngolaa", + "AR": "Arjantiin", + "AS": "Samowa Amerik", + "AT": "Otiriis", + "AU": "Ostaraalii", + "AW": "Aruuba", + "AZ": "Ajerbayjaan", + "BA": "Bosnii Hersegowiin", + "BB": "Barbadoos", + "BD": "Banglaadees", + "BE": "Beljik", + "BF": "Burkibaa Faaso", + "BG": "Bulgarii", + "BH": "Bahreyn", + "BI": "Burunndi", + "BJ": "Benee", + "BM": "Bermudaa", + "BN": "Burnaay", + "BO": "Boliwii", + "BR": "Beresiil", + "BS": "Bahamaas", + "BT": "Butaan", + "BW": "Botswaana", + "BY": "Belaruus", + "BZ": "Beliise", + "CA": "Kanadaa", + "CD": "Ndenndaandi Demokaraasiire Konngo", + "CF": "Ndenndaandi Santarafrik", + "CG": "Konngo", + "CH": "Suwiis", + "CI": "Kodduwaar", + "CK": "DuuÉ—e Kuuk", + "CL": "Cilii", + "CM": "Kameruun", + "CN": "Siin", + "CO": "Kolombiya", + "CR": "Kosta Rikaa", + "CU": "Kubaa", + "CV": "DuuÉ—e Kap Weer", + "CY": "Siipar", + "CZ": "Ndenndaandi Cek", + "DE": "Almaañ", + "DJ": "Jibutii", + "DK": "Danmark", + "DM": "Dominika", + "DO": "Ndenndanndi Dominika", + "DZ": "Alaseri", + "EC": "Ekuwatoor", + "EE": "Estoni", + "EG": "Ejipt", + "ER": "Eriteree", + "ES": "Espaañ", + "ET": "Ecoppi", + "FI": "Fenland", + "FJ": "Fijji", + "FK": "DuuÉ—e Falkland", + "FM": "Mikoronesii", + "FR": "Farayse", + "GA": "Gaboo", + "GB": "Laamateeri Rentundi", + "GD": "Garnaad", + "GE": "Jeorgii", + "GF": "Giyaan Farayse", + "GH": "Ganaa", + "GI": "Jibraltaar", + "GL": "Gorwendland", + "GM": "Gammbi", + "GN": "Gine", + "GP": "Gwaadalup", + "GQ": "Ginee Ekuwaatoriyaal", + "GR": "Gerees", + "GT": "Gwaatemalaa", + "GU": "Guwam", + "GW": "Gine-Bisaawo", + "GY": "Giyaan", + "HN": "Onnduraas", + "HR": "Korwasii", + "HT": "Haytii", + "HU": "Onngiri", + "ID": "Enndonesii", + "IE": "Irlannda", + "IL": "Israa’iila", + "IN": "Enndo", + "IO": "Keeriindi britaani to maayo enndo", + "IQ": "Iraak", + "IR": "Iraan", + "IS": "Islannda", + "IT": "Itali", + "JM": "Jamayka", + "JO": "Jordani", + "JP": "Sapoo", + "KE": "Keñaa", + "KG": "Kirgistaan", + "KH": "Kambodso", + "KI": "Kiribari", + "KM": "Komoor", + "KN": "Sent Kits e Newis", + "KP": "Koree Rewo", + "KR": "Koree Worgo", + "KW": "Kuweyti", + "KY": "DuuÉ—e Kaymaa", + "KZ": "Kasakstaan", + "LA": "Lawoos", + "LB": "Libaa", + "LC": "Sent Lusiyaa", + "LI": "Lincenstayn", + "LK": "Siri Lanka", + "LR": "Liberiyaa", + "LS": "Lesoto", + "LT": "Lituaanii", + "LU": "Liksembuur", + "LV": "Letonii", + "LY": "Libi", + "MA": "Maruk", + "MC": "Monaakoo", + "MD": "Moldawii", + "MG": "Madagaskaar", + "MH": "DuuÉ—e Marsaal", + "MK": "Meceduwaan", + "ML": "Maali", + "MM": "Miyamaar", + "MN": "Monngolii", + "MP": "DuuÉ—e Mariyaana Rewo", + "MQ": "Martinik", + "MR": "Muritani", + "MS": "Monseraat", + "MT": "Malte", + "MU": "Moriis", + "MV": "Maldiiwe", + "MW": "Malaawi", + "MX": "Meksik", + "MY": "Malesii", + "MZ": "Mosammbik", + "NA": "Namibii", + "NC": "Nuwel Kaledonii", + "NE": "Nijeer", + "NF": "DuuÉ—e Norfolk", + "NG": "Nijeriyaa", + "NI": "Nikaraguwaa", + "NL": "Nederlannda", + "NO": "Norwees", + "NP": "Nepaal", + "NR": "Nawuru", + "NU": "Niuwe", + "NZ": "Nuwel Selannda", + "OM": "Omaan", + "PA": "Panamaa", + "PE": "Peru", + "PF": "Polinesii Farayse", + "PG": "Papuwaa Nuwel Gine", + "PH": "Filipiin", + "PK": "Pakistaan", + "PL": "Poloñ", + "PM": "See Piyeer e Mikeloo", + "PN": "Pitkern", + "PR": "Porto Rikoo", + "PS": "Palestiin Sisjordani e Gaasaa", + "PT": "Purtugaal", + "PW": "Palawu", + "PY": "Paraguwaay", + "QA": "Kataar", + "RE": "Rewiñoo", + "RO": "Rumanii", + "RU": "Riisii", + "RW": "Ruwanndaa", + "SA": "Arabii Sawdit", + "SB": "DuuÉ—e Solomon", + "SC": "Seysel", + "SD": "Sudaan", + "SE": "Suweed", + "SG": "Sinngapuur", + "SH": "Sent Helen", + "SI": "Slowenii", + "SK": "Slowakii", + "SL": "Seraa liyon", + "SM": "See Maree", + "SN": "Senegaal", + "SO": "Somalii", + "SR": "Surinaam", + "ST": "Sawo Tome e Perensipe", + "SV": "El Salwador", + "SY": "Sirii", + "SZ": "Swaasilannda", + "TC": "DuuÉ—e Turke e Keikoos", + "TD": "Caad", + "TG": "Togoo", + "TH": "Taylannda", + "TJ": "Tajikistaan", + "TK": "Tokelaaw", + "TL": "Timoor FuÉ—naange", + "TM": "Turkmenistaan", + "TN": "Tunisii", + "TO": "Tonngaa", + "TR": "Turkii", + "TT": "Tirnidaad e Tobaago", + "TV": "Tuwaluu", + "TW": "Taywaan", + "TZ": "Tansanii", + "UA": "Ukereen", + "UG": "Unganndaa", + "US": "Dowlaaji DentuÉ—i Amerik", + "UY": "Uruguwaay", + "UZ": "Usbekistaan", + "VA": "Dowla Waticaan", + "VC": "See Weesaa e Garnadiin", + "VE": "Wenesuwelaa", + "VG": "duuÉ—e kecce britanii", + "VI": "DuuÉ—e Kecce Amerik", + "VN": "Wiyetnaam", + "VU": "Wanuwaatuu", + "WF": "Walis e Futuna", + "WS": "Samowaa", + "YE": "Yemen", + "YT": "Mayoot", + "ZA": "Afrik bÅ‹ Worgo", + "ZM": "Sammbi", + "ZW": "Simbaabuwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fi.json new file mode 100644 index 0000000000000000000000000000000000000000..f4ab82a4235635dcd8c2e88f25622d52bfca7c38 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fi.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.88", + "Names": { + "AC": "Ascension-saari", + "AD": "Andorra", + "AE": "Arabiemiirikunnat", + "AF": "Afganistan", + "AG": "Antigua ja Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antarktis", + "AR": "Argentiina", + "AS": "Amerikan Samoa", + "AT": "Itävalta", + "AU": "Australia", + "AW": "Aruba", + "AX": "Ahvenanmaa", + "AZ": "Azerbaidžan", + "BA": "Bosnia ja Hertsegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint-Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Karibian Alankomaat", + "BR": "Brasilia", + "BS": "Bahama", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Valko-Venäjä", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kookossaaret (Keelingsaaret)", + "CD": "Kongon demokraattinen tasavalta", + "CF": "Keski-Afrikan tasavalta", + "CG": "Kongon tasavalta", + "CH": "Sveitsi", + "CI": "Norsunluurannikko", + "CK": "Cookinsaaret", + "CL": "Chile", + "CM": "Kamerun", + "CN": "Kiina", + "CO": "Kolumbia", + "CR": "Costa Rica", + "CU": "Kuuba", + "CV": "Kap Verde", + "CW": "Curaçao", + "CX": "Joulusaari", + "CY": "Kypros", + "CZ": "TÅ¡ekki", + "DE": "Saksa", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Tanska", + "DM": "Dominica", + "DO": "Dominikaaninen tasavalta", + "DZ": "Algeria", + "EA": "Ceuta ja Melilla", + "EC": "Ecuador", + "EE": "Viro", + "EG": "Egypti", + "EH": "Länsi-Sahara", + "ER": "Eritrea", + "ES": "Espanja", + "ET": "Etiopia", + "FI": "Suomi", + "FJ": "Fidži", + "FK": "Falklandinsaaret", + "FM": "Mikronesian liittovaltio", + "FO": "Färsaaret", + "FR": "Ranska", + "GA": "Gabon", + "GB": "Iso-Britannia", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Ranskan Guayana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grönlanti", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Päiväntasaajan Guinea", + "GR": "Kreikka", + "GS": "Etelä-Georgia ja Eteläiset Sandwichsaaret", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hongkong – Kiinan e.h.a.", + "HN": "Honduras", + "HR": "Kroatia", + "HT": "Haiti", + "HU": "Unkari", + "IC": "Kanariansaaret", + "ID": "Indonesia", + "IE": "Irlanti", + "IL": "Israel", + "IM": "Mansaari", + "IN": "Intia", + "IO": "Brittiläinen Intian valtameren alue", + "IQ": "Irak", + "IR": "Iran", + "IS": "Islanti", + "IT": "Italia", + "JE": "Jersey", + "JM": "Jamaika", + "JO": "Jordania", + "JP": "Japani", + "KE": "Kenia", + "KG": "Kirgisia", + "KH": "Kambodža", + "KI": "Kiribati", + "KM": "Komorit", + "KN": "Saint Kitts ja Nevis", + "KP": "Pohjois-Korea", + "KR": "Etelä-Korea", + "KW": "Kuwait", + "KY": "Caymansaaret", + "KZ": "Kazakstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Liettua", + "LU": "Luxemburg", + "LV": "Latvia", + "LY": "Libya", + "MA": "Marokko", + "MC": "Monaco", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "Saint-Martin", + "MG": "Madagaskar", + "MH": "Marshallinsaaret", + "MK": "Makedonia", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongolia", + "MO": "Macao – Kiinan e.h.a.", + "MP": "Pohjois-Mariaanit", + "MQ": "Martinique", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Malediivit", + "MW": "Malawi", + "MX": "Meksiko", + "MY": "Malesia", + "MZ": "Mosambik", + "NA": "Namibia", + "NC": "Uusi-Kaledonia", + "NE": "Niger", + "NF": "Norfolkinsaari", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Alankomaat", + "NO": "Norja", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Uusi-Seelanti", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Ranskan Polynesia", + "PG": "Papua-Uusi-Guinea", + "PH": "Filippiinit", + "PK": "Pakistan", + "PL": "Puola", + "PM": "Saint-Pierre ja Miquelon", + "PN": "Pitcairn", + "PR": "Puerto Rico", + "PS": "Palestiinalaisalueet", + "PT": "Portugali", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Romania", + "RS": "Serbia", + "RU": "Venäjä", + "RW": "Ruanda", + "SA": "Saudi-Arabia", + "SB": "Salomonsaaret", + "SC": "Seychellit", + "SD": "Sudan", + "SE": "Ruotsi", + "SG": "Singapore", + "SH": "Saint Helena", + "SI": "Slovenia", + "SJ": "Huippuvuoret ja Jan Mayen", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "SS": "Etelä-Sudan", + "ST": "São Tomé ja Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syyria", + "SZ": "Swazimaa", + "TA": "Tristan da Cunha", + "TC": "Turks- ja Caicossaaret", + "TD": "TÅ¡ad", + "TF": "Ranskan eteläiset alueet", + "TG": "Togo", + "TH": "Thaimaa", + "TJ": "Tadžikistan", + "TK": "Tokelau", + "TL": "Itä-Timor", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Turkki", + "TT": "Trinidad ja Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tansania", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "Yhdysvaltain erillissaaret", + "UN": "Yhdistyneet kansakunnat", + "US": "Yhdysvallat", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VA": "Vatikaani", + "VC": "Saint Vincent ja Grenadiinit", + "VE": "Venezuela", + "VG": "Brittiläiset Neitsytsaaret", + "VI": "Yhdysvaltain Neitsytsaaret", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis ja Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Etelä-Afrikka", + "ZM": "Sambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fo.json new file mode 100644 index 0000000000000000000000000000000000000000..d9dffbbc8c963e3d96fd8dfd2dc28f4ea8fee3f1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fo.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AC": "Ascension", + "AD": "Andorra", + "AE": "Sameindu Emirríkini", + "AF": "Afganistan", + "AG": "Antigua & Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antarktis", + "AR": "Argentina", + "AS": "Amerikanska Samoa", + "AT": "Eysturríki", + "AU": "Avstralia", + "AW": "Aruba", + "AX": "Ãland", + "AZ": "Aserbadjan", + "BA": "Bosnia-Hersegovina", + "BB": "Barbados", + "BD": "Bangladesj", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Barein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "St-Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Niðurlonds Karibia", + "BR": "Brasil", + "BS": "Bahamaoyggjar", + "BT": "Butan", + "BW": "Botsvana", + "BY": "Hvítarussland", + "BZ": "Belis", + "CA": "Kanada", + "CC": "Kokosoyggjar", + "CD": "Kongo, Dem. Lýðveldið", + "CF": "Miðafrikalýðveldið", + "CG": "Kongo", + "CH": "Sveis", + "CI": "Fílabeinsstrondin", + "CK": "Cooksoyggjar", + "CL": "Kili", + "CM": "Kamerun", + "CN": "Kina", + "CO": "Kolombia", + "CR": "Kosta Rika", + "CU": "Kuba", + "CV": "Grønhøvdaoyggjar", + "CW": "Curaçao", + "CX": "Jólaoyggjin", + "CY": "Kýpros", + "CZ": "Kekkia", + "DE": "Týskland", + "DG": "Diego Garcia", + "DJ": "Djibuti", + "DK": "Danmark", + "DM": "Dominika", + "DO": "Dominikalýðveldið", + "DZ": "Algeria", + "EA": "Ceuta og Melilla", + "EC": "Ekvador", + "EE": "Estland", + "EG": "Egyptaland", + "EH": "Vestursahara", + "ER": "Eritrea", + "ES": "Spania", + "ET": "Etiopia", + "FI": "Finnland", + "FJ": "Fiji", + "FK": "Falklandsoyggjar", + "FM": "Mikronesiasamveldið", + "FO": "Føroyar", + "FR": "Frakland", + "GA": "Gabon", + "GB": "Stórabretland", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Franska Gujana", + "GG": "Guernsey", + "GH": "Gana", + "GI": "Gibraltar", + "GL": "Grønland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Ekvatorguinea", + "GR": "Grikkaland", + "GS": "Suðurgeorgia og Suðursandwichoyggjar", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Gujana", + "HK": "Hong Kong SAR Kina", + "HN": "Honduras", + "HR": "Kroatia", + "HT": "Haiti", + "HU": "Ungarn", + "IC": "Kanariuoyggjar", + "ID": "Indonesia", + "IE": "Ãrland", + "IL": "Ãsrael", + "IM": "Isle of Man", + "IN": "India", + "IO": "Stóra Bretlands Indiahavoyggjar", + "IQ": "Irak", + "IR": "Iran", + "IS": "Ãsland", + "IT": "Italia", + "JE": "Jersey", + "JM": "Jamaika", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenja", + "KG": "Kirgisia", + "KH": "Kambodja", + "KI": "Kiribati", + "KM": "Komoroyggjar", + "KN": "St. Kitts & Nevis", + "KP": "Norðurkorea", + "KR": "Suðurkorea", + "KW": "Kuvait", + "KY": "Caymanoyggjar", + "KZ": "Kasakstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "St. Lusia", + "LI": "Liktinstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesoto", + "LT": "Litava", + "LU": "Luksemborg", + "LV": "Lettland", + "LY": "Libya", + "MA": "Marokko", + "MC": "Monako", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "St-Martin", + "MG": "Madagaskar", + "MH": "Marshalloyggjar", + "MK": "Makedónia", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongolia", + "MO": "Makao SAR Kina", + "MP": "Norðaru Mariuoyggjar", + "MQ": "Martinique", + "MR": "Móritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Móritius", + "MV": "Maldivoyggjar", + "MW": "Malavi", + "MX": "Meksiko", + "MY": "Malaisia", + "MZ": "Mosambik", + "NA": "Namibia", + "NC": "Nýkaledónia", + "NE": "Niger", + "NF": "Norfolksoyggj", + "NG": "Nigeria", + "NI": "Nikaragua", + "NL": "Niðurlond", + "NO": "Noreg", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nýsæland", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Franska Polynesia", + "PG": "Papua Nýguinea", + "PH": "Filipsoyggjar", + "PK": "Pakistan", + "PL": "Pólland", + "PM": "Saint Pierre og Miquelon", + "PN": "Pitcairnoyggjar", + "PR": "Puerto Riko", + "PS": "Palestinskt landøki", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguai", + "QA": "Katar", + "RE": "Réunion", + "RO": "Rumenia", + "RS": "Serbia", + "RU": "Russland", + "RW": "Ruanda", + "SA": "Saudiarabia", + "SB": "Salomonoyggjar", + "SC": "Seyskelloyggjar", + "SD": "Sudan", + "SE": "Svøríki", + "SG": "Singapor", + "SH": "St. Helena", + "SI": "Slovenia", + "SJ": "Svalbard & Jan Mayen", + "SK": "Slovakia", + "SL": "Sierra Leona", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "SS": "Suðursudan", + "ST": "Sao Tome & Prinsipi", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Sýria", + "SZ": "Svasiland", + "TA": "Tristan da Cunha", + "TC": "Turks- og Caicosoyggjar", + "TD": "Kjad", + "TF": "Fronsku sunnaru landaøki", + "TG": "Togo", + "TH": "Tailand", + "TJ": "Tadsjikistan", + "TK": "Tokelau", + "TL": "Eysturtimor", + "TM": "Turkmenistan", + "TN": "Tunesia", + "TO": "Tonga", + "TR": "Turkaland", + "TT": "Trinidad & Tobago", + "TV": "Tuvalu", + "TW": "Taivan", + "TZ": "Tansania", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "Sambandsríki Amerikas fjarskotnu oyggjar", + "US": "Sambandsríki Amerika", + "UY": "Uruguai", + "UZ": "Usbekistan", + "VA": "Vatikanbýur", + "VC": "St. Vinsent & Grenadinoyggjar", + "VE": "Venesuela", + "VG": "Stóra Bretlands Jomfrúoyggjar", + "VI": "Sambandsríki Amerikas Jomfrúoyggjar", + "VN": "Vjetnam", + "VU": "Vanuatu", + "WF": "Wallis- og Futunaoyggjar", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Suðurafrika", + "ZM": "Sambia", + "ZW": "Simbabvi" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fr.json new file mode 100644 index 0000000000000000000000000000000000000000..3e65a57c2916a1eea5ebad7384680758b847b43f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fr.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "ÃŽle de l’Ascension", + "AD": "Andorre", + "AE": "Émirats arabes unis", + "AF": "Afghanistan", + "AG": "Antigua-et-Barbuda", + "AI": "Anguilla", + "AL": "Albanie", + "AM": "Arménie", + "AO": "Angola", + "AQ": "Antarctique", + "AR": "Argentine", + "AS": "Samoa américaines", + "AT": "Autriche", + "AU": "Australie", + "AW": "Aruba", + "AX": "ÃŽles Ã…land", + "AZ": "Azerbaïdjan", + "BA": "Bosnie-Herzégovine", + "BB": "Barbade", + "BD": "Bangladesh", + "BE": "Belgique", + "BF": "Burkina Faso", + "BG": "Bulgarie", + "BH": "Bahreïn", + "BI": "Burundi", + "BJ": "Bénin", + "BL": "Saint-Barthélemy", + "BM": "Bermudes", + "BN": "Brunéi Darussalam", + "BO": "Bolivie", + "BQ": "Pays-Bas caribéens", + "BR": "Brésil", + "BS": "Bahamas", + "BT": "Bhoutan", + "BW": "Botswana", + "BY": "Biélorussie", + "BZ": "Belize", + "CA": "Canada", + "CC": "ÃŽles Cocos", + "CD": "Congo-Kinshasa", + "CF": "République centrafricaine", + "CG": "Congo-Brazzaville", + "CH": "Suisse", + "CI": "Côte d’Ivoire", + "CK": "ÃŽles Cook", + "CL": "Chili", + "CM": "Cameroun", + "CN": "Chine", + "CO": "Colombie", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Cap-Vert", + "CW": "Curaçao", + "CX": "ÃŽle Christmas", + "CY": "Chypre", + "CZ": "République tchèque", + "DE": "Allemagne", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Danemark", + "DM": "Dominique", + "DO": "République dominicaine", + "DZ": "Algérie", + "EA": "Ceuta et Melilla", + "EC": "Équateur", + "EE": "Estonie", + "EG": "Égypte", + "EH": "Sahara occidental", + "ER": "Érythrée", + "ES": "Espagne", + "ET": "Éthiopie", + "FI": "Finlande", + "FJ": "Fidji", + "FK": "ÃŽles Malouines", + "FM": "États fédérés de Micronésie", + "FO": "ÃŽles Féroé", + "FR": "France", + "GA": "Gabon", + "GB": "Royaume-Uni", + "GD": "Grenade", + "GE": "Géorgie", + "GF": "Guyane française", + "GG": "Guernesey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Groenland", + "GM": "Gambie", + "GN": "Guinée", + "GP": "Guadeloupe", + "GQ": "Guinée équatoriale", + "GR": "Grèce", + "GS": "Géorgie du Sud et îles Sandwich du Sud", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinée-Bissau", + "GY": "Guyana", + "HK": "R.A.S. chinoise de Hong Kong", + "HN": "Honduras", + "HR": "Croatie", + "HT": "Haïti", + "HU": "Hongrie", + "IC": "ÃŽles Canaries", + "ID": "Indonésie", + "IE": "Irlande", + "IL": "Israël", + "IM": "ÃŽle de Man", + "IN": "Inde", + "IO": "Territoire britannique de l’océan Indien", + "IQ": "Irak", + "IR": "Iran", + "IS": "Islande", + "IT": "Italie", + "JE": "Jersey", + "JM": "Jamaïque", + "JO": "Jordanie", + "JP": "Japon", + "KE": "Kenya", + "KG": "Kirghizistan", + "KH": "Cambodge", + "KI": "Kiribati", + "KM": "Comores", + "KN": "Saint-Christophe-et-Niévès", + "KP": "Corée du Nord", + "KR": "Corée du Sud", + "KW": "Koweït", + "KY": "ÃŽles Caïmans", + "KZ": "Kazakhstan", + "LA": "Laos", + "LB": "Liban", + "LC": "Sainte-Lucie", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Libéria", + "LS": "Lesotho", + "LT": "Lituanie", + "LU": "Luxembourg", + "LV": "Lettonie", + "LY": "Libye", + "MA": "Maroc", + "MC": "Monaco", + "MD": "Moldavie", + "ME": "Monténégro", + "MF": "Saint-Martin", + "MG": "Madagascar", + "MH": "ÃŽles Marshall", + "MK": "Macédoine", + "ML": "Mali", + "MM": "Myanmar (Birmanie)", + "MN": "Mongolie", + "MO": "R.A.S. chinoise de Macao", + "MP": "ÃŽles Mariannes du Nord", + "MQ": "Martinique", + "MR": "Mauritanie", + "MS": "Montserrat", + "MT": "Malte", + "MU": "Maurice", + "MV": "Maldives", + "MW": "Malawi", + "MX": "Mexique", + "MY": "Malaisie", + "MZ": "Mozambique", + "NA": "Namibie", + "NC": "Nouvelle-Calédonie", + "NE": "Niger", + "NF": "ÃŽle Norfolk", + "NG": "Nigéria", + "NI": "Nicaragua", + "NL": "Pays-Bas", + "NO": "Norvège", + "NP": "Népal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nouvelle-Zélande", + "OM": "Oman", + "PA": "Panama", + "PE": "Pérou", + "PF": "Polynésie française", + "PG": "Papouasie-Nouvelle-Guinée", + "PH": "Philippines", + "PK": "Pakistan", + "PL": "Pologne", + "PM": "Saint-Pierre-et-Miquelon", + "PN": "ÃŽles Pitcairn", + "PR": "Porto Rico", + "PS": "Territoires palestiniens", + "PT": "Portugal", + "PW": "Palaos", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "La Réunion", + "RO": "Roumanie", + "RS": "Serbie", + "RU": "Russie", + "RW": "Rwanda", + "SA": "Arabie saoudite", + "SB": "ÃŽles Salomon", + "SC": "Seychelles", + "SD": "Soudan", + "SE": "Suède", + "SG": "Singapour", + "SH": "Sainte-Hélène", + "SI": "Slovénie", + "SJ": "Svalbard et Jan Mayen", + "SK": "Slovaquie", + "SL": "Sierra Leone", + "SM": "Saint-Marin", + "SN": "Sénégal", + "SO": "Somalie", + "SR": "Suriname", + "SS": "Soudan du Sud", + "ST": "Sao Tomé-et-Principe", + "SV": "El Salvador", + "SX": "Saint-Martin (partie néerlandaise)", + "SY": "Syrie", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "ÃŽles Turques-et-Caïques", + "TD": "Tchad", + "TF": "Terres australes françaises", + "TG": "Togo", + "TH": "Thaïlande", + "TJ": "Tadjikistan", + "TK": "Tokélaou", + "TL": "Timor oriental", + "TM": "Turkménistan", + "TN": "Tunisie", + "TO": "Tonga", + "TR": "Turquie", + "TT": "Trinité-et-Tobago", + "TV": "Tuvalu", + "TW": "Taïwan", + "TZ": "Tanzanie", + "UA": "Ukraine", + "UG": "Ouganda", + "UM": "ÃŽles mineures éloignées des États-Unis", + "UN": "Nations Unies", + "US": "États-Unis", + "UY": "Uruguay", + "UZ": "Ouzbékistan", + "VA": "État de la Cité du Vatican", + "VC": "Saint-Vincent-et-les-Grenadines", + "VE": "Venezuela", + "VG": "ÃŽles Vierges britanniques", + "VI": "ÃŽles Vierges des États-Unis", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis-et-Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yémen", + "YT": "Mayotte", + "ZA": "Afrique du Sud", + "ZM": "Zambie", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fr_BE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fr_BE.json new file mode 100644 index 0000000000000000000000000000000000000000..d7c69ca809fb4df870101efa87165ef98c98d8c9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fr_BE.json @@ -0,0 +1,7 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BN": "Brunei", + "GS": "ÃŽles Géorgie du Sud et Sandwich du Sud" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fr_CA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fr_CA.json new file mode 100644 index 0000000000000000000000000000000000000000..31e831e14c1c8b87d4f6c20c6748bfa83ea21409 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fr_CA.json @@ -0,0 +1,31 @@ +{ + "Version": "2.1.27.99", + "Names": { + "AC": "île de l’Ascension", + "AX": "îles d’Åland", + "BN": "Brunei", + "BY": "Bélarus", + "CC": "îles Cocos (Keeling)", + "CK": "îles Cook", + "CX": "île Christmas", + "FK": "îles Malouines", + "FM": "Micronésie", + "FO": "îles Féroé", + "IC": "îles Canaries", + "IM": "île de Man", + "MF": "Saint-Martin (France)", + "MM": "Myanmar", + "MP": "Mariannes du Nord", + "NF": "île Norfolk", + "PN": "îles Pitcairn", + "RE": "la Réunion", + "SX": "Saint-Martin (Pays-Bas)", + "TK": "Tokelau", + "TL": "Timor-Leste", + "UM": "îles mineures éloignées des États-Unis", + "VA": "Cité du Vatican", + "VC": "Saint-Vincent-et-les Grenadines", + "VG": "îles Vierges britanniques", + "VI": "îles Vierges américaines" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fy.json new file mode 100644 index 0000000000000000000000000000000000000000..bd62e890aced53e96e3af468f12ba3b344d36294 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/fy.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.29.44", + "Names": { + "AC": "Ascension", + "AD": "Andorra", + "AE": "Verenigde Arabyske Emiraten", + "AF": "Afghanistan", + "AG": "Antigua en Barbuda", + "AI": "Anguilla", + "AL": "Albanië", + "AM": "Armenië", + "AO": "Angola", + "AQ": "Antarctica", + "AR": "Argentinië", + "AS": "Amerikaansk Samoa", + "AT": "Eastenryk", + "AU": "Australië", + "AW": "Aruba", + "AX": "Ã…lân", + "AZ": "Azerbeidzjan", + "BA": "Bosnië en Herzegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "België", + "BF": "Burkina Faso", + "BG": "Bulgarije", + "BH": "Bahrein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Karibysk Nederlân", + "BR": "Brazilië", + "BS": "Bahama’s", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Wit-Ruslân", + "BZ": "Belize", + "CA": "Canada", + "CC": "Kokosilanen", + "CD": "Congo-Kinshasa", + "CF": "Sintraal-Afrikaanske Republyk", + "CG": "Congo-Brazzaville", + "CH": "Switserlân", + "CI": "Ivoorkust", + "CK": "Cookeilannen", + "CL": "Chili", + "CM": "Kameroen", + "CN": "Sina", + "CO": "Kolombia", + "CR": "Costa Rica", + "CU": "Kuba", + "CV": "Kaapverdië", + "CW": "Curaçao", + "CX": "Krysteilan", + "CY": "Syprus", + "CZ": "Tsjechje", + "DE": "Dútslân", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Denemarken", + "DM": "Dominika", + "DO": "Dominikaanske Republyk", + "DZ": "Algerije", + "EA": "Ceuta en Melilla", + "EC": "Ecuador", + "EE": "Estlân", + "EG": "Egypte", + "EH": "Westelijke Sahara", + "ER": "Eritrea", + "ES": "Spanje", + "ET": "Ethiopië", + "FI": "Finlân", + "FJ": "Fiji", + "FK": "Falklâneilannen", + "FM": "Micronesië", + "FO": "Faeröer", + "FR": "Frankrijk", + "GA": "Gabon", + "GB": "Verenigd Koninkrijk", + "GD": "Grenada", + "GE": "Georgië", + "GF": "Frans-Guyana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grienlân", + "GM": "Gambia", + "GN": "Guinee", + "GP": "Guadeloupe", + "GQ": "Equatoriaal-Guinea", + "GR": "Grikelân", + "GS": "Sûd-Georgia en Sûdlike Sandwicheilannen", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinee-Bissau", + "GY": "Guyana", + "HK": "Hongkong SAR van Sina", + "HN": "Honduras", + "HR": "Kroatië", + "HT": "Haïti", + "HU": "Hongarije", + "IC": "Kanaryske Eilânnen", + "ID": "Yndonesië", + "IE": "Ierlân", + "IL": "Israël", + "IM": "Isle of Man", + "IN": "India", + "IO": "Britse Gebieden yn de Indyske Oseaan", + "IQ": "Irak", + "IR": "Iran", + "IS": "Yslân", + "IT": "Italië", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordanië", + "JP": "Japan", + "KE": "Kenia", + "KG": "Kirgizië", + "KH": "Cambodja", + "KI": "Kiribati", + "KM": "Comoren", + "KN": "Saint Kitts en Nevis", + "KP": "Noard-Korea", + "KR": "Sûd-Korea", + "KW": "Koeweit", + "KY": "Caymaneilannen", + "KZ": "Kazachstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Litouwen", + "LU": "Luxemburg", + "LV": "Letlân", + "LY": "Libië", + "MA": "Marokko", + "MC": "Monaco", + "MD": "Moldavië", + "ME": "Montenegro", + "MF": "Saint-Martin", + "MG": "Madeiaskar", + "MH": "Marshalleilannen", + "MK": "Macedonië", + "ML": "Mali", + "MM": "Myanmar (Birma)", + "MN": "Mongolië", + "MO": "Macao SAR van Sina", + "MP": "Noardlike Marianeneilannen", + "MQ": "Martinique", + "MR": "Mauritanië", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldiven", + "MW": "Malawi", + "MX": "Mexico", + "MY": "Maleisië", + "MZ": "Mozambique", + "NA": "Namibië", + "NC": "Nij-Caledonië", + "NE": "Niger", + "NF": "Norfolkeilân", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Nederlân", + "NO": "Noarwegen", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nij-Seelân", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Frans-Polynesië", + "PG": "Papoea-Nij-Guinea", + "PH": "Filipijnen", + "PK": "Pakistan", + "PL": "Polen", + "PM": "Saint-Pierre en Miquelon", + "PN": "Pitcairneilannen", + "PR": "Puerto Rico", + "PS": "Palestynske gebieten", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Roemenië", + "RS": "Servië", + "RU": "Ruslân", + "RW": "Rwanda", + "SA": "Saoedi-Arabië", + "SB": "Salomonseilannen", + "SC": "Seychellen", + "SD": "Soedan", + "SE": "Zweden", + "SG": "Singapore", + "SH": "Sint-Helena", + "SI": "Slovenië", + "SJ": "Spitsbergen en Jan Mayen", + "SK": "Slowakije", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalië", + "SR": "Suriname", + "SS": "Sûd-Soedan", + "ST": "Sao Tomé en Principe", + "SV": "El Salvador", + "SX": "Sint-Maarten", + "SY": "Syrië", + "SZ": "Swazilân", + "TA": "Tristan da Cunha", + "TC": "Turks- en Caicoseilannen", + "TD": "Tsjaad", + "TF": "Franse Gebieden in de zuidelijke Indyske Oseaan", + "TG": "Togo", + "TH": "Thailân", + "TJ": "Tadzjikistan", + "TK": "Tokelau", + "TL": "East-Timor", + "TM": "Turkmenistan", + "TN": "Tunesië", + "TO": "Tonga", + "TR": "Turkije", + "TT": "Trinidad en Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Oekraïne", + "UG": "Oeganda", + "UM": "Lyts ôflizzen eilannen fan de Ferienigde Staten", + "US": "Ferienigde Staten", + "UY": "Uruguay", + "UZ": "Oezbekistan", + "VA": "Vaticaanstêd", + "VC": "Saint Vincent en de Grenadines", + "VE": "Venezuela", + "VG": "Britse Maagdeneilannen", + "VI": "Amerikaanske Maagdeneilannen", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis en Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Sûd-Afrika", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ga.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ga.json new file mode 100644 index 0000000000000000000000000000000000000000..e4beb7f6e25d10ba6270b5f85bd1c8ac9a2b881a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ga.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Oileán na Deascabhála", + "AD": "Andóra", + "AE": "Aontas na nÉimíríochtaí Arabacha", + "AF": "An Afganastáin", + "AG": "Antigua agus Barbúda", + "AI": "Angaíle", + "AL": "An Albáin", + "AM": "An Airméin", + "AO": "Angóla", + "AQ": "An Antartaice", + "AR": "An Airgintín", + "AS": "Samó Meiriceánach", + "AT": "An Ostair", + "AU": "An Astráil", + "AW": "Arúba", + "AX": "Oileáin Ã…land", + "AZ": "An Asarbaiseáin", + "BA": "An Bhoisnia agus An Heirseagaivéin", + "BB": "Barbadós", + "BD": "An Bhanglaidéis", + "BE": "An Bheilg", + "BF": "Buircíne Fasó", + "BG": "An Bhulgáir", + "BH": "Bairéin", + "BI": "An Bhurúin", + "BJ": "Beinin", + "BL": "Saint Barthélemy", + "BM": "Beirmiúda", + "BN": "Brúiné", + "BO": "An Bholaiv", + "BQ": "An Ãsiltír Chairibeach", + "BR": "An Bhrasaíl", + "BS": "Na Bahámaí", + "BT": "An Bhútáin", + "BW": "An Bhotsuáin", + "BY": "An Bhealarúis", + "BZ": "An Bheilís", + "CA": "Ceanada", + "CC": "Oileáin Cocos (Keeling)", + "CD": "Poblacht Dhaonlathach an Chongó", + "CF": "Poblacht na hAfraice Láir", + "CG": "An Congó", + "CH": "An Eilvéis", + "CI": "An Cósta Eabhair", + "CK": "Oileáin Cook", + "CL": "An tSile", + "CM": "Camarún", + "CN": "An tSín", + "CO": "An Cholóim", + "CR": "Cósta Ríce", + "CU": "Cúba", + "CV": "Rinn Verde", + "CW": "Curaçao", + "CX": "Oileán na Nollag", + "CY": "An Chipir", + "CZ": "Poblacht na Seice", + "DE": "An Ghearmáin", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "An Danmhairg", + "DM": "Doiminice", + "DO": "An Phoblacht Dhoiminiceach", + "DZ": "An Ailgéir", + "EA": "Ceuta agus Melilla", + "EC": "Eacuadór", + "EE": "An Eastóin", + "EG": "An Éigipt", + "EH": "An Sahára Thiar", + "ER": "An Eiritré", + "ES": "An Spáinn", + "ET": "An Aetóip", + "FI": "An Fhionlainn", + "FJ": "Fidsí", + "FK": "Oileáin Fháclainne", + "FM": "An Mhicrinéis", + "FO": "Oileáin Fharó", + "FR": "An Fhrainc", + "GA": "An Ghabúin", + "GB": "An Ríocht Aontaithe", + "GD": "Greanáda", + "GE": "An tSeoirsia", + "GF": "Guáin na Fraince", + "GG": "Geansaí", + "GH": "Gána", + "GI": "Giobráltar", + "GL": "An Ghraonlainn", + "GM": "An Ghaimbia", + "GN": "An Ghuine", + "GP": "Guadalúip", + "GQ": "An Ghuine Mheánchriosach", + "GR": "An Ghréig", + "GS": "An tSeoirsia Theas agus Oileáin Sandwich Theas", + "GT": "Guatamala", + "GU": "Guam", + "GW": "Guine Bissau", + "GY": "An Ghuáin", + "HK": "S.R.R. na Síne Hong Cong", + "HN": "Hondúras", + "HR": "An Chróit", + "HT": "Háítí", + "HU": "An Ungáir", + "IC": "Na hOileáin Chanáracha", + "ID": "An Indinéis", + "IE": "Éire", + "IL": "Iosrael", + "IM": "Oileán Mhanann", + "IN": "An India", + "IO": "Críoch Aigéan Indiach na Breataine", + "IQ": "An Iaráic", + "IR": "An Iaráin", + "IS": "An Ãoslainn", + "IT": "An Iodáil", + "JE": "Geirsí", + "JM": "Iamáice", + "JO": "An Iordáin", + "JP": "An tSeapáin", + "KE": "An Chéinia", + "KG": "An Chirgeastáin", + "KH": "An Chambóid", + "KI": "Cireabaití", + "KM": "Oileáin Chomóra", + "KN": "San Críostóir-Nimheas", + "KP": "An Chóiré Thuaidh", + "KR": "An Chóiré Theas", + "KW": "Cuáit", + "KY": "Oileáin Cayman", + "KZ": "An Chasacstáin", + "LA": "Laos", + "LB": "An Liobáin", + "LC": "Saint Lucia", + "LI": "Lichtinstéin", + "LK": "Srí Lanca", + "LR": "An Libéir", + "LS": "Leosóta", + "LT": "An Liotuáin", + "LU": "Lucsamburg", + "LV": "An Laitvia", + "LY": "An Libia", + "MA": "Maracó", + "MC": "Monacó", + "MD": "An Mholdóiv", + "ME": "Montainéagró", + "MF": "Saint-Martin", + "MG": "Madagascar", + "MH": "Oileáin Marshall", + "MK": "An Mhacadóin", + "ML": "Mailí", + "MM": "Maenmar (Burma)", + "MN": "An Mhongóil", + "MO": "S.R.R. na Síne Macao", + "MP": "Na hOileáin Mháirianacha Thuaidh", + "MQ": "Martinique", + "MR": "An Mháratáin", + "MS": "Montsarat", + "MT": "Málta", + "MU": "Oileán Mhuirís", + "MV": "Oileáin Mhaildíve", + "MW": "An Mhaláiv", + "MX": "Meicsiceo", + "MY": "An Mhalaeisia", + "MZ": "Mósaimbíc", + "NA": "An Namaib", + "NC": "An Nua-Chaladóin", + "NE": "An Nígir", + "NF": "Oileán Norfolk", + "NG": "An Nigéir", + "NI": "Nicearagua", + "NL": "An Ãsiltír", + "NO": "An Iorua", + "NP": "Neipeal", + "NR": "Nárú", + "NU": "Niue", + "NZ": "An Nua-Shéalainn", + "OM": "Óman", + "PA": "Panama", + "PE": "Peiriú", + "PF": "Polainéis na Fraince", + "PG": "Nua-Ghuine Phapua", + "PH": "Na hOileáin Fhilipíneacha", + "PK": "An Phacastáin", + "PL": "An Pholainn", + "PM": "Saint-Pierre-et-Miquelon", + "PN": "Oileáin Pitcairn", + "PR": "Portó Ríce", + "PS": "Na Críocha Palaistíneacha", + "PT": "An Phortaingéil", + "PW": "Palau", + "PY": "Paragua", + "QA": "Catar", + "RE": "Réunion", + "RO": "An Rómáin", + "RS": "An tSeirbia", + "RU": "An Rúis", + "RW": "Ruanda", + "SA": "An Araib Shádach", + "SB": "Oileáin Sholomón", + "SC": "Na Séiséil", + "SD": "An tSúdáin", + "SE": "An tSualainn", + "SG": "Singeapór", + "SH": "San Héilin", + "SI": "An tSlóivéin", + "SJ": "Svalbard agus Jan Mayen", + "SK": "An tSlóvaic", + "SL": "Siarra Leon", + "SM": "San Mairíne", + "SN": "An tSeineagáil", + "SO": "An tSomáil", + "SR": "Suranam", + "SS": "An tSúdáin Theas", + "ST": "São Tomé agus Príncipe", + "SV": "An tSalvadóir", + "SX": "Sint Maarten", + "SY": "An tSiria", + "SZ": "An tSuasalainn", + "TA": "Tristan da Cunha", + "TC": "Oileáin na dTurcach agus Caicos", + "TD": "Sead", + "TF": "Críocha Francacha Dheisceart an Domhain", + "TG": "Tóga", + "TH": "An Téalainn", + "TJ": "An Táidsíceastáin", + "TK": "Tócalá", + "TL": "Tíomór Thoir", + "TM": "An Tuircméanastáin", + "TN": "An Túinéis", + "TO": "Tonga", + "TR": "An Tuirc", + "TT": "Oileán na Tríonóide agus Tobága", + "TV": "Tuvalu", + "TW": "An Téaváin", + "TZ": "An Tansáin", + "UA": "An Úcráin", + "UG": "Uganda", + "UM": "Oileáin Imeallacha S.A.M.", + "UN": "Náisiúin Aontaithe", + "US": "Stáit Aontaithe Mheiriceá", + "UY": "Urugua", + "UZ": "An Úisbéiceastáin", + "VA": "An Vatacáin", + "VC": "San Uinseann agus na Greanáidíní", + "VE": "Veiniséala", + "VG": "Oileáin Bhriotanacha na Maighdean", + "VI": "Oileáin Mheiriceánacha na Maighdean", + "VN": "Vítneam", + "VU": "Vanuatú", + "WF": "Vailís agus Futúna", + "WS": "Samó", + "XK": "An Chosaiv", + "YE": "Éimin", + "YT": "Mayotte", + "ZA": "An Afraic Theas", + "ZM": "An tSaimbia", + "ZW": "An tSiombáib" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/gd.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/gd.json new file mode 100644 index 0000000000000000000000000000000000000000..11d700122263d38f081a13bd19f31a818200f258 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/gd.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AC": "Eilean na Deasgabhalach", + "AD": "Andorra", + "AE": "Na h-Iomaratan Arabach Aonaichte", + "AF": "Afghanastàn", + "AG": "Aintìoga is Barbuda", + "AI": "Anguillia", + "AL": "Albàinia", + "AM": "Airmeinea", + "AO": "Angòla", + "AQ": "An Antartaig", + "AR": "An Argantain", + "AS": "Samotha na h-Aimeireaga", + "AT": "An Ostair", + "AU": "Astràilia", + "AW": "Arùba", + "AX": "Na h-Eileanan Ã…land", + "AZ": "Asarbaideàn", + "BA": "Bosna agus Hearsagobhana", + "BB": "Barbados", + "BD": "Bangladais", + "BE": "A’ Bheilg", + "BF": "Buirciona Faso", + "BG": "A’ Bhulgair", + "BH": "Bachrain", + "BI": "Burundaidh", + "BJ": "Beinin", + "BL": "Saint Barthélemy", + "BM": "Bearmùda", + "BN": "Brùnaigh", + "BO": "Boilibhia", + "BQ": "Na Tìrean ÃŒsle Caraibeach", + "BR": "Braisil", + "BS": "Na h-Eileanan Bhathama", + "BT": "Butàn", + "BW": "Botsuana", + "BY": "A’ Bhealaruis", + "BZ": "A’ Bheilìs", + "CA": "Canada", + "CC": "Na h-Eileanan Chocos (Keeling)", + "CD": "Congo - Kinshasa", + "CF": "Poblachd Meadhan Afraga", + "CG": "A’ Chongo - Brazzaville", + "CH": "An Eilbheis", + "CI": "Côte d’Ivoire", + "CK": "Eileanan Cook", + "CL": "An t-Sile", + "CM": "Camarun", + "CN": "An t-Sìn", + "CO": "Coloimbia", + "CR": "Costa Rìcea", + "CU": "Cùba", + "CV": "An Ceap Uaine", + "CW": "Curaçao", + "CX": "Eilean na Nollaig", + "CY": "Cìopras", + "CZ": "Poblachd na Seice", + "DE": "A’ Ghearmailt", + "DG": "Diego Garcia", + "DJ": "Diobùtaidh", + "DK": "An Danmhairg", + "DM": "Doiminicea", + "DO": "A’ Phoblachd Dhoiminiceach", + "DZ": "Aildiria", + "EA": "Ceuta agus Melilla", + "EC": "Eacuador", + "EE": "An Eastoin", + "EG": "An Èiphit", + "EH": "Sathara an Iar", + "ER": "Eartra", + "ES": "An Spàinnt", + "ET": "An Itiop", + "FI": "An Fhionnlann", + "FJ": "Fìdi", + "FK": "Na h-Eileanan Fàclannach", + "FM": "Na Meanbh-eileanan", + "FO": "Na h-Eileanan Fàro", + "FR": "An Fhraing", + "GA": "Gabon", + "GB": "An Rìoghachd Aonaichte", + "GD": "Greanàda", + "GE": "A’ Chairtbheil", + "GF": "Guidheàna na Frainge", + "GG": "Geàrnsaidh", + "GH": "Gàna", + "GI": "Diobraltar", + "GL": "A’ Ghraonlann", + "GM": "A’ Ghaimbia", + "GN": "Gini", + "GP": "Guadalup", + "GQ": "Gini Mheadhan-Chriosach", + "GR": "A’ Ghreug", + "GS": "Seòirsea a Deas is na h-Eileanan Sandwich a Deas", + "GT": "Guatamala", + "GU": "Guam", + "GW": "Gini-Bioso", + "GY": "Guidheàna", + "HK": "Hong Kong SAR na Sìne", + "HN": "Hondùras", + "HR": "A’ Chròthais", + "HT": "Haidhti", + "HU": "An Ungair", + "IC": "Na h-Eileanan Canàrach", + "ID": "Na h-Innd-innse", + "IE": "Èirinn", + "IL": "Iosrael", + "IM": "Eilean Mhanainn", + "IN": "Na h-Innseachan", + "IO": "Ranntair Breatannach Cuan nan Innseachan", + "IQ": "Ioràc", + "IR": "Ioràn", + "IS": "Innis Tìle", + "IT": "An Eadailt", + "JE": "Deàrsaidh", + "JM": "Diameuga", + "JO": "Iòrdan", + "JP": "An t-Seapan", + "KE": "Ceinia", + "KG": "Cìorgastan", + "KH": "Cambuidea", + "KI": "Ciribeas", + "KM": "Comoros", + "KN": "Naomh Crìstean is Nibheis", + "KP": "Coirèa a Tuath", + "KR": "Coirèa", + "KW": "Cuibhèit", + "KY": "Na h-Eileanan Caimean", + "KZ": "Casachstàn", + "LA": "Làthos", + "LB": "Leabanon", + "LC": "Naomh Lùisea", + "LI": "Lichtenstein", + "LK": "Sri Lanca", + "LR": "Libèir", + "LS": "Leasoto", + "LT": "An Liotuain", + "LU": "Lugsamburg", + "LV": "An Laitbhe", + "LY": "Libia", + "MA": "Moroco", + "MC": "Monaco", + "MD": "A’ Mholdobha", + "ME": "Am Monadh Neagrach", + "MF": "Naomh Màrtainn", + "MG": "Madagasgar", + "MH": "Eileanan Mharshall", + "MK": "A’ Mhasadon", + "ML": "Màili", + "MM": "Miànmar", + "MN": "Dùthaich nam Mongol", + "MO": "Macàthu SAR na Sìne", + "MP": "Na h-Eileanan Mairianach a Tuath", + "MQ": "Mairtinic", + "MR": "Moratàinea", + "MS": "Montsarat", + "MT": "Malta", + "MU": "Na h-Eileanan Mhoiriseas", + "MV": "Na h-Eileanan Mhaladaibh", + "MW": "Malabhaidh", + "MX": "Meagsago", + "MY": "Malaidhsea", + "MZ": "Mòsaimbic", + "NA": "An Namaib", + "NC": "Cailleann Nuadh", + "NE": "Nìgeir", + "NF": "Eilean Norfolk", + "NG": "Nigèiria", + "NI": "Niocaragua", + "NL": "Na Tìrean ÃŒsle", + "NO": "Nirribhidh", + "NP": "Neapàl", + "NR": "Nabhru", + "NU": "Niue", + "NZ": "Sealainn Nuadh", + "OM": "Omàn", + "PA": "Panama", + "PE": "Pearù", + "PF": "Poilinèis na Frainge", + "PG": "Gini Nuadh Phaputhach", + "PH": "Na h-Eileanan Filipineach", + "PK": "Pagastàn", + "PL": "A’ Phòlainn", + "PM": "Saint Pierre agus Miquelon", + "PN": "Eileanan Peit a’ Chàirn", + "PR": "Porto Rìceo", + "PS": "Na Ranntairean Palastaineach", + "PT": "A’ Phortagail", + "PW": "Palabh", + "PY": "Paraguaidh", + "QA": "Catar", + "RE": "Réunion", + "RO": "Romàinia", + "RS": "An t-Sèirb", + "RU": "An Ruis", + "RW": "Rubhanda", + "SA": "Aràibia nan Sabhd", + "SB": "Eileanan Sholaimh", + "SC": "Na h-Eileanan Sheiseall", + "SD": "Sudàn", + "SE": "An t-Suain", + "SG": "Singeapòr", + "SH": "Eilean Naomh Eilidh", + "SI": "An t-Slòbhain", + "SJ": "Svalbard agus Jan Mayen", + "SK": "An t-Slòbhac", + "SL": "Siarra Leòmhann", + "SM": "San Marino", + "SN": "Seanagal", + "SO": "Somàilia", + "SR": "Suranam", + "SS": "Sudàn a Deas", + "ST": "São Tomé agus Príncipe", + "SV": "An Salbhador", + "SX": "Sint Maarten", + "SY": "Siridhea", + "SZ": "Dùthaich nan Suasaidh", + "TA": "Tristan da Cunha", + "TC": "Na h-Eileanan Turcach is Caiceo", + "TD": "An t-Seàd", + "TF": "Ranntairean a Deas na Frainge", + "TG": "Togo", + "TH": "Dùthaich nan Tàidh", + "TJ": "Taidigeastàn", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turcmanastàn", + "TN": "Tuinisea", + "TO": "Tonga", + "TR": "An Tuirc", + "TT": "Trianaid agus Tobago", + "TV": "Tubhalu", + "TW": "Taidh-Bhàn", + "TZ": "An Tansan", + "UA": "An Ucràin", + "UG": "Uganda", + "UM": "Meanbh-Eileanan Iomallach nan SA", + "US": "Na Stàitean Aonaichte", + "UY": "Uruguaidh", + "UZ": "Usbagastàn", + "VA": "Cathair na Bhatacain", + "VC": "Naomh Bhionsant agus Eileanan Greanadach", + "VE": "A’ Bheiniseala", + "VG": "Eileanan Breatannach na Maighdinn", + "VI": "Eileanan na Maighdinn aig na SA", + "VN": "Bhiet-Nam", + "VU": "Vanuatu", + "WF": "Uallas agus Futuna", + "WS": "Samotha", + "XK": "A’ Chosobho", + "YE": "An Eaman", + "YT": "Mayotte", + "ZA": "Afraga a Deas", + "ZM": "Sàimbia", + "ZW": "An t-Sìombab" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/gl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/gl.json new file mode 100644 index 0000000000000000000000000000000000000000..56af5ed6a8851510b924b2e4af4363ae1fe2b5d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/gl.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Illa de Ascensión", + "AD": "Andorra", + "AE": "Emiratos Ãrabes Unidos", + "AF": "Afganistán", + "AG": "Antiga e Barbuda", + "AI": "Anguila", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antártida", + "AR": "Arxentina", + "AS": "Samoa Americana", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Illas Aland", + "AZ": "Acerbaixán", + "BA": "Bosnia-Hercegovina", + "BB": "Barbados", + "BD": "Bangladés", + "BE": "Bélxica", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint-Barthélemy", + "BM": "Bermudas", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Caribe Neerlandés", + "BR": "Brasil", + "BS": "Bahamas", + "BT": "Bután", + "BW": "Botsuana", + "BY": "Bielorrusia", + "BZ": "Belice", + "CA": "Canadá", + "CC": "Illas Cocos (Keeling)", + "CD": "República Democrática do Congo", + "CF": "República Centroafricana", + "CG": "República do Congo", + "CH": "Suíza", + "CI": "Costa do Marfil", + "CK": "Illas Cook", + "CL": "Chile", + "CM": "Camerún", + "CN": "A China", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Cabo Verde", + "CW": "Curaçao", + "CX": "Illa de Nadal", + "CY": "Chipre", + "CZ": "República Checa", + "DE": "Alemaña", + "DG": "Diego García", + "DJ": "Djibuti", + "DK": "Dinamarca", + "DM": "Dominica", + "DO": "República Dominicana", + "DZ": "Alxeria", + "EA": "Ceuta e Melilla", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Exipto", + "EH": "Sáhara Occidental", + "ER": "Eritrea", + "ES": "España", + "ET": "Etiopía", + "FI": "Finlandia", + "FJ": "Fidxi", + "FK": "Illas Malvinas", + "FM": "Micronesia", + "FO": "Illas Feroe", + "FR": "Francia", + "GA": "Gabón", + "GB": "Reino Unido", + "GD": "Granada", + "GE": "Xeorxia", + "GF": "Güiana Francesa", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Xibraltar", + "GL": "Groenlandia", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadalupe", + "GQ": "Guinea Ecuatorial", + "GR": "Grecia", + "GS": "Illas Xeorxia do Sur e Sandwich do Sur", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bisau", + "GY": "Güiana", + "HK": "Hong Kong RAE de China", + "HN": "Honduras", + "HR": "Croacia", + "HT": "Haití", + "HU": "Hungría", + "IC": "Illas Canarias", + "ID": "Indonesia", + "IE": "Irlanda", + "IL": "Israel", + "IM": "Illa de Man", + "IN": "A India", + "IO": "Territorio Británico do Océano Ãndico", + "IQ": "Iraq", + "IR": "Irán", + "IS": "Islandia", + "IT": "Italia", + "JE": "Jersey", + "JM": "Xamaica", + "JO": "Xordania", + "JP": "O Xapón", + "KE": "Kenya", + "KG": "Quirguicistán", + "KH": "Camboxa", + "KI": "Kiribati", + "KM": "Comores", + "KN": "Saint Kitts e Nevis", + "KP": "Corea do Norte", + "KR": "Corea do Sur", + "KW": "Kuwait", + "KY": "Illas Caimán", + "KZ": "Casaquistán", + "LA": "Laos", + "LB": "Líbano", + "LC": "Santa Lucía", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesoto", + "LT": "Lituania", + "LU": "Luxemburgo", + "LV": "Letonia", + "LY": "Libia", + "MA": "Marrocos", + "MC": "Mónaco", + "MD": "Moldavia", + "ME": "Montenegro", + "MF": "Saint-Martin", + "MG": "Madagascar", + "MH": "Illas Marshall", + "MK": "Macedonia", + "ML": "Malí", + "MM": "Myanmar (Birmania)", + "MN": "Mongolia", + "MO": "Macau RAE de China", + "MP": "Illas Marianas do Norte", + "MQ": "Martinica", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauricio", + "MV": "Maldivas", + "MW": "Malaui", + "MX": "México", + "MY": "Malaisia", + "MZ": "Mozambique", + "NA": "Namibia", + "NC": "Nova Caledonia", + "NE": "Níxer", + "NF": "Illa Norfolk", + "NG": "Nixeria", + "NI": "Nicaragua", + "NL": "Países Baixos", + "NO": "Noruega", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nova Zelandia", + "OM": "Omán", + "PA": "Panamá", + "PE": "Perú", + "PF": "Polinesia Francesa", + "PG": "Papúa-Nova Guinea", + "PH": "Filipinas", + "PK": "Paquistán", + "PL": "Polonia", + "PM": "Saint Pierre e Miquelon", + "PN": "Illas Pitcairn", + "PR": "Porto Rico", + "PS": "Territorios palestinos", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguai", + "QA": "Qatar", + "RE": "Reunión", + "RO": "Romanía", + "RS": "Serbia", + "RU": "Rusia", + "RW": "Ruanda", + "SA": "Arabia Saudita", + "SB": "Illas Salomón", + "SC": "Seixeles", + "SD": "Sudán", + "SE": "Suecia", + "SG": "Singapur", + "SH": "Santa Helena", + "SI": "Eslovenia", + "SJ": "Svalbard e Jan Mayen", + "SK": "Eslovaquia", + "SL": "Serra Leoa", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "SS": "Sudán do sur", + "ST": "San Tomé e Príncipe", + "SV": "O Salvador", + "SX": "Sint Maarten", + "SY": "Siria", + "SZ": "Suacilandia", + "TA": "Tristán da Cunha", + "TC": "Illas Turks e Caicos", + "TD": "Chad", + "TF": "Territorios Austrais Franceses", + "TG": "Togo", + "TH": "Tailandia", + "TJ": "Taxiquistán", + "TK": "Toquelau", + "TL": "Timor Leste", + "TM": "Turcomenistán", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Turquía", + "TT": "Trinidad e Tobago", + "TV": "Tuvalu", + "TW": "Taiwán", + "TZ": "Tanzania", + "UA": "Ucraína", + "UG": "Uganda", + "UM": "Illas Ultramarinas dos EUA", + "UN": "Nacións Unidas", + "US": "Estados Unidos de América", + "UY": "Uruguai", + "UZ": "Uzbekistán", + "VA": "Cidade do Vaticano", + "VC": "San Vicente e as Granadinas", + "VE": "Venezuela", + "VG": "Illas Virxes Británicas", + "VI": "Illas Virxes Estadounidenses", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis e Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Iemen", + "YT": "Mayotte", + "ZA": "Suráfrica", + "ZM": "Zambia", + "ZW": "Cimbabue" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/gu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/gu.json new file mode 100644 index 0000000000000000000000000000000000000000..e1d8cee967d6d0d49b2b1b8c328b17c2a027147b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/gu.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "àªàª¸à«‡àª¨à«àª¶àª¨ આઇલેનà«àª¡", + "AD": "àªàª‚ડોરા", + "AE": "યà«àª¨àª¾àª‡àªŸà«‡àª¡ આરબ અમીરાત", + "AF": "અફઘાનિસà«àª¤àª¾àª¨", + "AG": "àªàª¨à«àªŸà«€àª—à«àª† અને બરà«àª®à«àª¡àª¾", + "AI": "àªàª‚ગà«àªµàª¿àª²àª¾", + "AL": "અલà«àª¬à«‡àª¨àª¿àª¯àª¾", + "AM": "આરà«àª®à«‡àª¨àª¿àª¯àª¾", + "AO": "અંગોલા", + "AQ": "àªàª¨à«àªŸàª¾àª°à«àª•ટિકા", + "AR": "આરà«àªœà«‡àª¨à«àªŸà«€àª¨àª¾", + "AS": "અમેરીકન સમોઆ", + "AT": "ઑસà«àªŸà«àª°àª¿àª¯àª¾", + "AU": "ઑસà«àªŸà«àª°à«‡àª²àª¿àª¯àª¾", + "AW": "અરà«àª¬àª¾", + "AX": "àªàª²à«‡àª‚ડ ટાપà«àª“", + "AZ": "અàªàª°àª¬à«ˆàªœàª¾àª¨", + "BA": "બોસà«àª¨àª¿àª¯àª¾ અને હરà«àªà«‡àª—ોવિના", + "BB": "બારà«àª¬àª¾àª¡à«‹àª¸", + "BD": "બાંગà«àª²àª¾àª¦à«‡àª¶", + "BE": "બેલà«àªœà«€àª¯àª®", + "BF": "બà«àª°à«àª•િના ફાસો", + "BG": "બલà«àª—ેરિયા", + "BH": "બેહરીન", + "BI": "બà«àª°à«àª‚ડી", + "BJ": "બેનિન", + "BL": "સેનà«àªŸ બારà«àª¥à«‡àª²à«‡àª®à«€", + "BM": "બરà«àª®à«àª¡àª¾", + "BN": "બà«àª°à«àª¨à«‡àª‡", + "BO": "બોલિવિયા", + "BQ": "કેરેબિયન નેધરલેનà«àª¡à«àª", + "BR": "બà«àª°àª¾àªàª¿àª²", + "BS": "બહામાસ", + "BT": "ભૂટાન", + "BW": "બોતà«àª¸à«àªµàª¾àª¨àª¾", + "BY": "બેલારà«àª¸", + "BZ": "બેલીàª", + "CA": "કેનેડા", + "CC": "કોકોઠ(કીલીંગ) આઇલેનà«àª¡à«àª¸", + "CD": "કોંગો - કિંશાસા", + "CF": "સેનà«àªŸà«àª°àª² આફà«àª°àª¿àª•ન રીપબà«àª²àª¿àª•", + "CG": "કોંગો - બà«àª°àª¾àªàª¾àªµàª¿àª²à«‡", + "CH": "સà«àªµàª¿àªŸà«àªàª°à«àª²à«…નà«àª¡", + "CI": "કોટ ડી આઇવરી", + "CK": "કà«àª• આઇલેનà«àª¡à«àª¸", + "CL": "ચિલી", + "CM": "કૅમરૂન", + "CN": "ચીન", + "CO": "કોલમà«àª¬àª¿àª¯àª¾", + "CR": "કોસà«àªŸàª¾ રિકા", + "CU": "કà«àª¯à«àª¬àª¾", + "CV": "કૅપ વરà«àª¡à«‡", + "CW": "કà«àª¯à«àª°àª¾àª¸àª¾àª“", + "CX": "કà«àª°àª¿àª¸àª®àª¸ આઇલેનà«àª¡", + "CY": "સાયપà«àª°àª¸", + "CZ": "ચેક રીપબà«àª²àª¿àª•", + "DE": "જરà«àª®àª¨à«€", + "DG": "ડિàªàª—à«‹ ગારસિઆ", + "DJ": "જીબૌટી", + "DK": "ડેનમારà«àª•", + "DM": "ડોમિનિકા", + "DO": "ડોમિનિકન રીપબà«àª²àª¿àª•", + "DZ": "અલà«àªœà«€àª°àª¿àª¯àª¾", + "EA": "સà«àª¯à«àªŸàª¾ અને મેલિલા", + "EC": "àªàª•à«àªµàª¾àª¡à«‹àª°", + "EE": "àªàª¸à«àªŸà«‹àª¨àª¿àª¯àª¾", + "EG": "ઇજિપà«àª¤", + "EH": "પશà«àªšàª¿àª®à«€ સહારા", + "ER": "àªàª°àª¿àªŸà«àª°àª¿àª¯àª¾", + "ES": "સà«àªªà«‡àª¨", + "ET": "ઇથિઓપિયા", + "FI": "ફિનલેનà«àª¡", + "FJ": "ફીજી", + "FK": "ફૉકલેનà«àª¡ ટાપà«àª“", + "FM": "માઇકà«àª°à«‹àª¨à«‡àª¶àª¿àª¯àª¾", + "FO": "ફૅરો ટાપà«àª“", + "FR": "ફà«àª°àª¾àª‚સ", + "GA": "ગેબન", + "GB": "યà«àª¨àª¾àª‡àªŸà«‡àª¡ કિંગડમ", + "GD": "ગà«àª°à«‡àª¨à«‡àª¡àª¾", + "GE": "જà«àª¯à«‹àª°à«àªœà«€àª¯àª¾", + "GF": "ફà«àª°à«‡àª‚ચ ગયાના", + "GG": "ગà«àªµà«‡àª°à«àª¨àª¸à«‡", + "GH": "ઘાના", + "GI": "જીબà«àª°àª¾àª²à«àªŸàª°", + "GL": "ગà«àª°à«€àª¨àª²à«‡àª¨à«àª¡", + "GM": "ગેમà«àª¬àª¿àª¯àª¾", + "GN": "ગિની", + "GP": "ગà«àªµàª¾àª¡à«‡àª²à«‹àªª", + "GQ": "ઇકà«àªµà«‡àªŸà«‹àª°àª¿àª¯àª² ગિની", + "GR": "ગà«àª°à«€àª¸", + "GS": "દકà«àª·àª¿àª£ જà«àª¯à«‹àª°à«àªœà«€àª¯àª¾ અને દકà«àª·àª¿àª£ સેનà«àª¡àªµàª¿àªš આઇલેનà«àª¡à«àª¸", + "GT": "ગà«àªµàª¾àªŸà«‡àª®àª¾àª²àª¾", + "GU": "ગà«àªµàª¾àª®", + "GW": "ગિની-બિસાઉ", + "GY": "ગયાના", + "HK": "હોંગકોંગ SAR ચીન", + "HN": "હોનà«àª¡à«àª°àª¸", + "HR": "કà«àª°à«‹àªàª¶àª¿àª¯àª¾", + "HT": "હૈતિ", + "HU": "હંગેરી", + "IC": "કૅનેરી ટાપà«àª“", + "ID": "ઇનà«àª¡à«‹àª¨à«‡àª¶àª¿àª¯àª¾", + "IE": "આયરà«àª²à«‡àª¨à«àª¡", + "IL": "ઇàªàª°àª¾àª‡àª²", + "IM": "આઈલ ઓફ મૅન", + "IN": "ભારત", + "IO": "બà«àª°àª¿àªŸàª¿àª¶ ઇનà«àª¡àª¿àª¯àª¨ ઓશન ટેરિટરી", + "IQ": "ઇરાક", + "IR": "ઈરાન", + "IS": "આઇસલેનà«àª¡", + "IT": "ઇટાલી", + "JE": "જરà«àª¸à«€", + "JM": "જમૈકા", + "JO": "જોરà«àª¡àª¨", + "JP": "જાપાન", + "KE": "કેનà«àª¯àª¾", + "KG": "કિરà«àª—િàªà«àª¸à«àª¤àª¾àª¨", + "KH": "કંબોડિયા", + "KI": "કિરિબાટી", + "KM": "કોમોરસ", + "KN": "સેનà«àªŸ કિટà«àª¸ અને નેવિસ", + "KP": "ઉતà«àª¤àª° કોરિયા", + "KR": "દકà«àª·àª¿àª£ કોરિયા", + "KW": "કà«àªµà«ˆàª¤", + "KY": "કેમેન ટાપà«àª“", + "KZ": "કàªàª¾àª•િસà«àª¤àª¾àª¨", + "LA": "લાઓસ", + "LB": "લેબનોન", + "LC": "સેનà«àªŸ લà«àª¸àª¿àª¯àª¾", + "LI": "લૈચટેંસà«àªŸà«‡àª‡àª¨", + "LK": "શà«àª°à«€àª²àª‚કા", + "LR": "લાઇબેરિયા", + "LS": "લેસોથો", + "LT": "લિથà«àª†àª¨àª¿àª¯àª¾", + "LU": "લકà«àªàª®àª¬àª°à«àª—", + "LV": "લાતà«àªµàª¿àª¯àª¾", + "LY": "લિબિયા", + "MA": "મોરોકà«àª•à«‹", + "MC": "મોનાકો", + "MD": "મોલડોવા", + "ME": "મૉનà«àªŸà«‡àª‚નેગà«àª°à«‹", + "MF": "સેનà«àªŸ મારà«àªŸàª¿àª¨", + "MG": "મેડાગાસà«àª•ર", + "MH": "મારà«àª¶àª² આઇલેનà«àª¡à«àª¸", + "MK": "મેસેડોનિયા", + "ML": "માલી", + "MM": "મà«àª¯àª¾àª‚માર (બરà«àª®àª¾)", + "MN": "મંગોલિયા", + "MO": "મકાઉ SAR ચીન", + "MP": "ઉતà«àª¤àª°à«€àª¯ મારિયાના આઇલેનà«àª¡à«àª¸", + "MQ": "મારà«àªŸà«€àª¨à«€àª•", + "MR": "મૌરિટાનિયા", + "MS": "મોંટસેરાત", + "MT": "માલà«àªŸàª¾", + "MU": "મોરિશિયસ", + "MV": "માલદિવà«àª¸", + "MW": "માલાવી", + "MX": "મેકà«àª¸àª¿àª•à«‹", + "MY": "મલેશિયા", + "MZ": "મોàªàª¾àª®à«àª¬àª¿àª•", + "NA": "નામિબિયા", + "NC": "નà«àª¯à« સેલેડોનિયા", + "NE": "નાઇજર", + "NF": "નોરફૉક ટાપà«", + "NG": "નાઇજીરીયા", + "NI": "નિકારાગà«àª†", + "NL": "નેધરલેનà«àª¡", + "NO": "નૉરà«àªµà«‡", + "NP": "નેપાળ", + "NR": "નૌરà«", + "NU": "નીયà«", + "NZ": "નà«àª¯à«àªà«€àª²à«‡àª¨à«àª¡", + "OM": "ઓમાન", + "PA": "પનામા", + "PE": "પેરà«", + "PF": "ફà«àª°à«‡àª‚ચ પોલિનેશિયા", + "PG": "પાપà«àª† નà«àª¯à«‚ ગિની", + "PH": "ફિલીપાઇનà«àª¸", + "PK": "પાકિસà«àª¤àª¾àª¨", + "PL": "પોલેંડ", + "PM": "સેનà«àªŸ પિયર અને મીકà«àªµà«‡àª²àª¨", + "PN": "પીટકૈરà«àª¨ આઇલેનà«àª¡à«àª¸", + "PR": "પà«àª¯à«àª…રà«àªŸà«‹ રિકો", + "PS": "પેલેસà«àªŸàª¿àª¨àª¿àª¯àª¨ ટેરિટરી", + "PT": "પોરà«àªŸà«àª—લ", + "PW": "પલાઉ", + "PY": "પેરાગà«àªµà«‡", + "QA": "કતાર", + "RE": "રીયà«àª¨àª¿àª¯àª¨", + "RO": "રોમાનિયા", + "RS": "સરà«àª¬àª¿àª¯àª¾", + "RU": "રશિયા", + "RW": "રવાંડા", + "SA": "સાઉદી અરેબિયા", + "SB": "સોલોમન આઇલેનà«àª¡à«àª¸", + "SC": "સેશેલà«àª¸", + "SD": "સà«àª¦àª¾àª¨", + "SE": "સà«àªµà«€àª¡àª¨", + "SG": "સિંગાપà«àª°", + "SH": "સેનà«àªŸ હેલેના", + "SI": "સà«àª²à«‹àªµà«‡àª¨àª¿àª¯àª¾", + "SJ": "સà«àªµàª¾àª²àª¬àª°à«àª¡ અને જેન મેયન", + "SK": "સà«àª²à«‹àªµà«‡àª•િયા", + "SL": "સીàªàª°àª¾ લેઓન", + "SM": "સૅન મેરિનો", + "SN": "સેનેગલ", + "SO": "સોમાલિયા", + "SR": "સà«àª°à«€àª¨àª¾àª®", + "SS": "દકà«àª·àª¿àª£ સà«àª¦àª¾àª¨", + "ST": "સાઓ ટૉમ અને પà«àª°àª¿àª‚સિપે", + "SV": "àªàª² સેલà«àªµàª¾àª¡à«‹àª°", + "SX": "સિંટ મારà«àªŸà«‡àª¨", + "SY": "સીરિયા", + "SZ": "સà«àªµàª¾àªàª¿àª²à«‡àª¨à«àª¡", + "TA": "તà«àª°àª¿àª¸à«àª¤àª¾àª¨ દા કà«àª¨à«àª¹àª¾", + "TC": "તà«àª°à«àª•à«àª¸ અને કાઇકોસ ટાપà«àª“", + "TD": "ચાડ", + "TF": "ફà«àª°à«‡àª‚ચ સદરà«àª¨ ટેરિટરીàª", + "TG": "ટોગો", + "TH": "થાઇલેંડ", + "TJ": "તાજીકિસà«àª¤àª¾àª¨", + "TK": "ટોકેલાઉ", + "TL": "તિમોર-લેસà«àª¤à«‡", + "TM": "તà«àª°à«àª•મેનિસà«àª¤àª¾àª¨", + "TN": "ટà«àª¯à«àª¨àª¿àª¶àª¿àª¯àª¾", + "TO": "ટોંગા", + "TR": "તà«àª°à«àª•à«€", + "TT": "ટà«àª°àª¿àª¨à«€àª¦àª¾àª¦ અને ટોબેગો", + "TV": "તà«àªµàª¾àª²à«", + "TW": "તાઇવાન", + "TZ": "તાંàªàª¾àª¨àª¿àª¯àª¾", + "UA": "યà«àª•à«àª°à«‡àª¨", + "UG": "યà«àª—ાંડા", + "UM": "સંયà«àª•à«àª¤ રાજà«àª¯ આઉટલાઇંગ આયલેનà«àª¡à«àª¸", + "UN": "સંયà«àª•à«àª¤ રાષà«àªŸà«àª°", + "US": "સંયà«àª•ત રાજà«àª¯ અમેરિકા", + "UY": "ઉરà«àª—à«àªµà«‡", + "UZ": "ઉàªà«àª¬à«‡àª•િસà«àª¤àª¾àª¨", + "VA": "વેટિકન સિટી", + "VC": "સેનà«àªŸ વિનà«àª¸à«‡àªŸ અને ગà«àª°à«‡àª¨à«‡àª¡à«€àª¨à«àª¸", + "VE": "વેનેàªà«àªàª²àª¾", + "VG": "બà«àª°àª¿àªŸàª¿àª¶ વરà«àªœàª¿àª¨ ટાપà«àª“", + "VI": "યà«.àªàª¸. વરà«àªœàª¿àª¨ ટાપà«àª“", + "VN": "વિયેતનામ", + "VU": "વાનà«àª†àª¤à«", + "WF": "વેલીસ અને ફà«àª¯à«àªŸà«àª¨àª¾", + "WS": "સમોઆ", + "XK": "કોસોવો", + "YE": "યેમેન", + "YT": "મેયોટ", + "ZA": "દકà«àª·àª¿àª£ આફà«àª°àª¿àª•ા", + "ZM": "àªàª¾àª®à«àª¬àª¿àª¯àª¾", + "ZW": "àªàª¿àª®à«àª¬àª¾àª¬à«àªµà«‡" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/gv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/gv.json new file mode 100644 index 0000000000000000000000000000000000000000..c52e8a07efa0427188a53685ace11b3be5b17c85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/gv.json @@ -0,0 +1,7 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GB": "Rywvaneth Unys", + "IM": "Ellan Vannin" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ha.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ha.json new file mode 100644 index 0000000000000000000000000000000000000000..57a29038e78e7fb6812e26b74097aa223b9b5b51 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ha.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AD": "Andora", + "AE": "HaÉ—aÉ—É—iyar Daular Larabawa", + "AF": "Afaganistan", + "AG": "Antigwa da Barbuba", + "AI": "Angila", + "AL": "Albaniya", + "AM": "Armeniya", + "AO": "Angola", + "AR": "Arjantiniya", + "AS": "Samowa Ta Amurka", + "AT": "Ostiriya", + "AU": "Ostareliya", + "AW": "Aruba", + "AZ": "Azarbaijan", + "BA": "Bosniya Harzagobina", + "BB": "Barbadas", + "BD": "Bangiladas", + "BE": "Belgiyom", + "BF": "Burkina Faso", + "BG": "Bulgariya", + "BH": "Baharan", + "BI": "Burundi", + "BJ": "Binin", + "BM": "Barmuda", + "BN": "Burune", + "BO": "Bolibiya", + "BR": "Birazil", + "BS": "Bahamas", + "BT": "Butan", + "BW": "Baswana", + "BY": "Belarus", + "BZ": "Beliz", + "CA": "Kanada", + "CD": "Jamhuriyar DimokuraÉ—iyyar Kongo", + "CF": "Jamhuriyar Afirka Ta Tsakiya", + "CG": "Kongo", + "CH": "Suwizalan", + "CI": "Aibari Kwas", + "CK": "Tsibiran Kuku", + "CL": "Cayile", + "CM": "Kamaru", + "CN": "Caina, Sin", + "CO": "Kolambiya", + "CR": "Kwasta Rika", + "CU": "Kyuba", + "CV": "Tsibiran Kap Barde", + "CY": "Sifurus", + "CZ": "Jamhuriyar Cak", + "DE": "Jamus", + "DJ": "Jibuti", + "DK": "Danmark", + "DM": "Dominika", + "DO": "Jamhuriyar Dominika", + "DZ": "Aljeriya", + "EC": "Ekwador", + "EE": "Estoniya", + "EG": "Masar, Misira", + "ER": "Eritireya", + "ES": "Sipen", + "ET": "Habasha", + "FI": "Finlan", + "FJ": "Fiji", + "FK": "Tsibiran Falkilan", + "FM": "Mikuronesiya", + "FR": "Faransa", + "GA": "Gabon", + "GB": "Birtaniya", + "GD": "Girnada", + "GE": "Jiwarjiya", + "GF": "Gini Ta Faransa", + "GH": "Gana", + "GI": "Jibaraltar", + "GL": "Grinlan", + "GM": "Gambiya", + "GN": "Gini", + "GP": "Gwadaluf", + "GQ": "Gini Ta Ikwaita", + "GR": "Girka", + "GT": "Gwatamala", + "GU": "Gwam", + "GW": "Gini Bisau", + "GY": "Guyana", + "HN": "Honduras", + "HR": "Kurowaishiya", + "HT": "Haiti", + "HU": "Hungari", + "ID": "Indunusiya", + "IE": "Ayalan", + "IL": "Iziraʼila", + "IN": "Indiya", + "IO": "Yankin Birtaniya Na Tekun Indiya", + "IQ": "IraÆ™i", + "IR": "Iran", + "IS": "Aisalan", + "IT": "Italiya", + "JM": "Jamaika", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenya", + "KG": "Kirgizistan", + "KH": "Kambodiya", + "KI": "Kiribati", + "KM": "Kwamoras", + "KN": "San Kiti Da Nebis", + "KP": "Koreya Ta Arewa", + "KR": "Koreya Ta Kudu", + "KW": "Kwiyat", + "KY": "Tsibiran Kaiman", + "KZ": "Kazakistan", + "LA": "Lawas", + "LB": "Labanan", + "LC": "San Lusiya", + "LI": "Licansitan", + "LK": "Siri Lanka", + "LR": "Laberiya", + "LS": "Lesoto", + "LT": "Lituweniya", + "LU": "Lukusambur", + "LV": "latibiya", + "LY": "Libiya", + "MA": "Maroko", + "MC": "Monako", + "MD": "Maldoba", + "MG": "Madagaskar", + "MH": "Tsibiran Marshal", + "MK": "Masedoniya", + "ML": "Mali", + "MM": "Burma, Miyamar", + "MN": "Mangoliya", + "MP": "Tsibiran Mariyana Na Arewa", + "MQ": "Martinik", + "MR": "Moritaniya", + "MS": "Manserati", + "MT": "Malta", + "MU": "Moritus", + "MV": "Maldibi", + "MW": "Malawi", + "MX": "Makasiko", + "MY": "Malaisiya", + "MZ": "Mozambik", + "NA": "Namibiya", + "NC": "Kaledoniya Sabuwa", + "NE": "Nijar", + "NF": "Tsibirin Narfalk", + "NG": "Najeriya", + "NI": "Nikaraguwa", + "NL": "Holan", + "NO": "Norwe", + "NP": "Nefal", + "NR": "Nauru", + "NU": "Niyu", + "NZ": "Nuzilan", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Folinesiya Ta Faransa", + "PG": "Papuwa Nugini", + "PH": "Filipin", + "PK": "Pakistan", + "PL": "Polan", + "PM": "San Piyar Da Mikelan", + "PN": "Pitakarin", + "PR": "Porto Riko", + "PS": "PalasÉ—inu", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paragai", + "QA": "Kwatar", + "RE": "Rawuniyan", + "RO": "Romaniya", + "RU": "Rasha", + "RW": "Ruwanda", + "SA": "Ƙasar Makka", + "SB": "Tsibiran Salaman", + "SC": "Saishal", + "SD": "Sudan", + "SE": "Suwedan", + "SG": "Singapur", + "SH": "San Helena", + "SI": "Sulobeniya", + "SK": "Sulobakiya", + "SL": "Salewo", + "SM": "San Marino", + "SN": "Sinigal", + "SO": "Somaliya", + "SR": "Suriname", + "ST": "Sawo Tome Da Paransip", + "SV": "El Salbador", + "SY": "Sham, Siriya", + "SZ": "Suwazilan", + "TC": "Turkis Da Tsibiran Kaikwas", + "TD": "Cadi", + "TG": "Togo", + "TH": "Tailan", + "TJ": "Tajikistan", + "TK": "Takelau", + "TL": "Timor Ta Gabas", + "TM": "Turkumenistan", + "TN": "Tunisiya", + "TO": "Tanga", + "TR": "Turkiyya", + "TT": "Tirinidad Da Tobago", + "TV": "Tubalu", + "TW": "Taiwan", + "TZ": "Tanzaniya", + "UA": "Yukaran", + "UG": "Yuganda", + "US": "Amurka", + "UY": "Yurugai", + "UZ": "Uzubekistan", + "VA": "Batikan", + "VC": "San Binsan Da Girnadin", + "VE": "Benezuwela", + "VG": "Tsibirin Birjin Na Birtaniya", + "VI": "Tsibiran Birjin Ta Amurka", + "VN": "Biyetinam", + "VU": "Banuwatu", + "WF": "Walis Da Futuna", + "WS": "Samowa", + "YE": "Yamal", + "YT": "Mayoti", + "ZA": "Afirka Ta Kudu", + "ZM": "Zambiya", + "ZW": "Zimbabuwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/he.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/he.json new file mode 100644 index 0000000000000000000000000000000000000000..5828bb31adf8f391539544b6b793c6dde798593e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/he.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.27", + "Names": { + "AC": "×”××™ ×סנשן", + "AD": "×נדורה", + "AE": "×יחוד ×”×מירויות הערביות", + "AF": "×פגניסטן", + "AG": "×נטיגו××” וברבודה", + "AI": "×נגילה", + "AL": "×לבניה", + "AM": "×רמניה", + "AO": "×נגולה", + "AQ": "×נט×רקטיקה", + "AR": "×רגנטינה", + "AS": "סמו××” ×”×מריקנית", + "AT": "×וסטריה", + "AU": "×וסטרליה", + "AW": "×רובה", + "AX": "××™×™ ×ולנד", + "AZ": "×זרבייג׳ן", + "BA": "בוסניה והרצגובינה", + "BB": "ברבדוס", + "BD": "בנגלדש", + "BE": "בלגיה", + "BF": "בורקינה פ×סו", + "BG": "בולגריה", + "BH": "בחריין", + "BI": "בורונדי", + "BJ": "בנין", + "BL": "סנט ברתולומי×ו", + "BM": "ברמודה", + "BN": "ברוניי", + "BO": "בוליביה", + "BQ": "×”××™×™× ×”×§×¨×™×‘×™×™× ×”×”×•×œ× ×“×™×™×", + "BR": "ברזיל", + "BS": "××™×™ בה×מה", + "BT": "בהוטן", + "BW": "בוצוו×× ×”", + "BY": "בל×רוס", + "BZ": "בליז", + "CA": "קנדה", + "CC": "××™×™ קוקוס (קילינג)", + "CD": "קונגו - קינש×סה", + "CF": "הרפובליקה של מרכז ×פריקה", + "CG": "קונגו - ברז×ויל", + "CH": "שווייץ", + "CI": "חוף השנהב", + "CK": "××™×™ קוק", + "CL": "צ׳ילה", + "CM": "קמרון", + "CN": "סין", + "CO": "קולומביה", + "CR": "קוסטה ריקה", + "CU": "קובה", + "CV": "×›×£ ורדה", + "CW": "קור×ס×ו", + "CX": "×”××™ כריסטמס", + "CY": "קפריסין", + "CZ": "הרפובליקה הצ׳כית", + "DE": "גרמניה", + "DG": "דייגו גרסיה", + "DJ": "ג׳יבוטי", + "DK": "דנמרק", + "DM": "דומיניקה", + "DO": "הרפובליקה הדומיניקנית", + "DZ": "×לג׳יריה", + "EA": "ס×וטה ומלייה", + "EC": "×קוודור", + "EE": "×סטוניה", + "EG": "מצרי×", + "EH": "סהרה המערבית", + "ER": "×ריתרי××”", + "ES": "ספרד", + "ET": "×תיופיה", + "FI": "פינלנד", + "FJ": "פיג׳י", + "FK": "××™×™ פוקלנד", + "FM": "מיקרונזיה", + "FO": "××™×™ פ×רו", + "FR": "צרפת", + "GA": "גבון", + "GB": "הממלכה המ×וחדת", + "GD": "גרנדה", + "GE": "×’×ורגיה", + "GF": "×’×™×× ×” הצרפתית", + "GG": "גרנסי", + "GH": "×’×× ×”", + "GI": "גיברלטר", + "GL": "גרינלנד", + "GM": "גמביה", + "GN": "×’×™× ××”", + "GP": "גוו×דלופ", + "GQ": "×’×™× ××” המשוונית", + "GR": "יוון", + "GS": "ג׳ורג׳יה הדרומית ו××™×™ סנדוויץ׳ הדרומיי×", + "GT": "גו×טמלה", + "GU": "גו××", + "GW": "×’×™× ××” ביס×ו", + "GY": "×’×™×× ×”", + "HK": "הונג קונג (מחוז מנהלי מיוחד של סין)", + "HN": "הונדורס", + "HR": "קרו×טיה", + "HT": "×”×יטי", + "HU": "הונגריה", + "IC": "×”××™×™× ×”×§× ×¨×™×™×", + "ID": "×ינדונזיה", + "IE": "×ירלנד", + "IL": "ישר×ל", + "IM": "×”××™ מ×ן", + "IN": "הודו", + "IO": "הטריטוריה הבריטית ב×וקיינוס ההודי", + "IQ": "עיר××§", + "IR": "×יר×ן", + "IS": "×יסלנד", + "IT": "×יטליה", + "JE": "ג׳רסי", + "JM": "ג׳מייקה", + "JO": "ירדן", + "JP": "יפן", + "KE": "×§× ×™×”", + "KG": "קירגיזסטן", + "KH": "קמבודיה", + "KI": "קיריב×טי", + "KM": "קומורו", + "KN": "סנט קיטס ונוויס", + "KP": "קורי××” הצפונית", + "KR": "קורי××” הדרומית", + "KW": "כווית", + "KY": "××™×™ קיימן", + "KZ": "קזחסטן", + "LA": "ל×וס", + "LB": "לבנון", + "LC": "סנט לוסיה", + "LI": "ליכטנשטיין", + "LK": "סרי לנקה", + "LR": "ליבריה", + "LS": "לסוטו", + "LT": "ליט×", + "LU": "לוקסמבורג", + "LV": "לטביה", + "LY": "לוב", + "MA": "מרוקו", + "MC": "מונקו", + "MD": "מולדובה", + "ME": "מונטנגרו", + "MF": "סן מרטן", + "MG": "מדגסקר", + "MH": "××™×™ מרשל", + "MK": "מקדוניה", + "ML": "מ×לי", + "MM": "מי×נמר (בורמה)", + "MN": "מונגוליה", + "MO": "מק×ו (מחוז מנהלי מיוחד של סין)", + "MP": "××™×™ מרי×× ×” הצפוניי×", + "MQ": "מרטיניק", + "MR": "מ×וריטניה", + "MS": "מונסר×ט", + "MT": "מלטה", + "MU": "מ×וריציוס", + "MV": "×”××™×™× ×”×ž×œ×“×™×‘×™×™×", + "MW": "מל×ווי", + "MX": "מקסיקו", + "MY": "מלזיה", + "MZ": "מוזמביק", + "NA": "נמיביה", + "NC": "קלדוניה החדשה", + "NE": "ניז׳ר", + "NF": "××™×™ נורפוק", + "NG": "ניגריה", + "NI": "ניקרגו××”", + "NL": "הולנד", + "NO": "נורווגיה", + "NP": "נפ×ל", + "NR": "× ×ורו", + "NU": "ניווה", + "NZ": "ניו זילנד", + "OM": "עומ×ן", + "PA": "פנמה", + "PE": "פרו", + "PF": "פולינזיה הצרפתית", + "PG": "פפו××” ×’×™× ××” החדשה", + "PH": "הפיליפיני×", + "PK": "פקיסטן", + "PL": "פולין", + "PM": "סנט פייר ומיקלון", + "PN": "××™×™ פיטקרן", + "PR": "פו×רטו ריקו", + "PS": "×”×©×˜×—×™× ×”×¤×œ×¡×˜×™× ×™×™×", + "PT": "פורטוגל", + "PW": "פל×ו", + "PY": "פרגוו××™", + "QA": "קט×ר", + "RE": "ר×וניון", + "RO": "רומניה", + "RS": "סרביה", + "RU": "רוסיה", + "RW": "רו×נדה", + "SA": "ערב הסעודית", + "SB": "××™×™ שלמה", + "SC": "××™×™ סיישל", + "SD": "סודן", + "SE": "שוודיה", + "SG": "סינגפור", + "SH": "סנט הלנה", + "SI": "סלובניה", + "SJ": "סוולב×רד וי×ן מ×יין", + "SK": "סלובקיה", + "SL": "סיירה ל×ונה", + "SM": "סן מרינו", + "SN": "סנגל", + "SO": "סומליה", + "SR": "סורינ×", + "SS": "×“×¨×•× ×¡×•×“×Ÿ", + "ST": "ס×ו טומה ופרינסיפה", + "SV": "×ל סלבדור", + "SX": "סנט מ×רטן", + "SY": "סוריה", + "SZ": "סווזילנד", + "TA": "טריסטן דה קונה", + "TC": "××™×™ טורקס וק×יקוס", + "TD": "צ׳×ד", + "TF": "הטריטוריות הדרומיות של צרפת", + "TG": "טוגו", + "TH": "ת×ילנד", + "TJ": "טג׳יקיסטן", + "TK": "טוקל×ו", + "TL": "טימור לסטה", + "TM": "טורקמניסטן", + "TN": "טוניסיה", + "TO": "טונגה", + "TR": "טורקיה", + "TT": "טרינידד וטובגו", + "TV": "טוב×לו", + "TW": "טייוו×ן", + "TZ": "טנזניה", + "UA": "×וקר××™× ×”", + "UG": "×וגנדה", + "UM": "×”××™×™× ×”×ž×¨×•×—×§×™× ×”×§×˜× ×™× ×©×œ ×רה״ב", + "UN": "×”×ומות המ×וחדות", + "US": "×רצות הברית", + "UY": "×ורוגוו××™", + "UZ": "×וזבקיסטן", + "VA": "הוותיקן", + "VC": "סנט וינסנט והגרנדיני×", + "VE": "ונצו×לה", + "VG": "××™×™ הבתולה הבריטיי×", + "VI": "××™×™ הבתולה של ×רצות הברית", + "VN": "וייטנ××", + "VU": "ונו×טו", + "WF": "××™×™ ווליס ופוטונה", + "WS": "סמו××”", + "XK": "קוסובו", + "YE": "תימן", + "YT": "מ×יוט", + "ZA": "×“×¨×•× ×פריקה", + "ZM": "זמביה", + "ZW": "זימבבו××”" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/hi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/hi.json new file mode 100644 index 0000000000000000000000000000000000000000..7c25e6d1639777e98ae7cf26be59e39f80004b65 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/hi.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "असेंशन दà¥à¤µà¥€à¤ª", + "AD": "à¤à¤‚डोरा", + "AE": "संयà¥à¤•à¥à¤¤ अरब अमीरात", + "AF": "अफ़गानिसà¥à¤¤à¤¾à¤¨", + "AG": "à¤à¤‚टिगà¥à¤† और बरबà¥à¤¡à¤¾", + "AI": "à¤à¤‚गà¥à¤µà¤¿à¤²à¤¾", + "AL": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾", + "AM": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾", + "AO": "अंगोला", + "AQ": "अंटारà¥à¤•टिका", + "AR": "अरà¥à¤œà¥‡à¤‚टीना", + "AS": "अमेरिकी समोआ", + "AT": "ऑसà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾", + "AU": "ऑसà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾", + "AW": "अरूबा", + "AX": "à¤à¤²à¥ˆà¤‚ड दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "AZ": "अज़रबैजान", + "BA": "बोसà¥à¤¨à¤¿à¤¯à¤¾ और हरà¥à¤œà¤¼à¥‡à¤—ोविना", + "BB": "बारबाडोस", + "BD": "बांगà¥à¤²à¤¾à¤¦à¥‡à¤¶", + "BE": "बेलà¥à¤œà¤¿à¤¯à¤®", + "BF": "बà¥à¤°à¥à¤•िना फ़ासो", + "BG": "बà¥à¤²à¥à¤—ारिया", + "BH": "बहरीन", + "BI": "बà¥à¤°à¥à¤‚डी", + "BJ": "बेनिन", + "BL": "सेंट बारà¥à¤¥à¥‡à¤²à¥‡à¤®à¥€", + "BM": "बरमूडा", + "BN": "बà¥à¤°à¥‚नेई", + "BO": "बोलीविया", + "BQ": "कैरिबियन नीदरलैंड", + "BR": "बà¥à¤°à¤¾à¤œà¤¼à¥€à¤²", + "BS": "बहामास", + "BT": "भूटान", + "BW": "बोतà¥à¤¸à¥à¤µà¤¾à¤¨à¤¾", + "BY": "बेलारूस", + "BZ": "बेलीज़", + "CA": "कनाडा", + "CC": "कोकोस (कीलिंग) दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "CD": "कांगो - किंशासा", + "CF": "मधà¥à¤¯ अफ़à¥à¤°à¥€à¤•ी गणराजà¥à¤¯", + "CG": "कांगो – बà¥à¤°à¤¾à¤œà¤¼à¤¾à¤µà¤¿à¤²", + "CH": "सà¥à¤µà¤¿à¤Ÿà¥à¤œà¤¼à¤°à¤²à¥ˆà¤‚ड", + "CI": "कोट डी आइवर", + "CK": "कà¥à¤• दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "CL": "चिली", + "CM": "कैमरून", + "CN": "चीन", + "CO": "कोलंबिया", + "CR": "कोसà¥à¤Ÿà¤¾à¤°à¤¿à¤•ा", + "CU": "कà¥à¤¯à¥‚बा", + "CV": "केप वरà¥à¤¡", + "CW": "कà¥à¤¯à¥‚रासाओ", + "CX": "कà¥à¤°à¤¿à¤¸à¤®à¤¸ दà¥à¤µà¥€à¤ª", + "CY": "साइपà¥à¤°à¤¸", + "CZ": "चेक गणराजà¥à¤¯", + "DE": "जरà¥à¤®à¤¨à¥€", + "DG": "डिà¤à¤—ो गारà¥à¤¸à¤¿à¤¯à¤¾", + "DJ": "जिबूती", + "DK": "डेनमारà¥à¤•", + "DM": "डोमिनिका", + "DO": "डोमिनिकन गणराजà¥à¤¯", + "DZ": "अलà¥à¤œà¥€à¤°à¤¿à¤¯à¤¾", + "EA": "सेउटा और मेलिला", + "EC": "इकà¥à¤µà¤¾à¤¡à¥‹à¤°", + "EE": "à¤à¤¸à¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾", + "EG": "मिसà¥à¤°", + "EH": "पशà¥à¤šà¤¿à¤®à¥€ सहारा", + "ER": "इरिटà¥à¤°à¤¿à¤¯à¤¾", + "ES": "सà¥à¤ªà¥‡à¤¨", + "ET": "इथियोपिया", + "FI": "फ़िनलैंड", + "FJ": "फ़िजी", + "FK": "फ़ॉकलैंड दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "FM": "माइकà¥à¤°à¥‹à¤¨à¥‡à¤¶à¤¿à¤¯à¤¾", + "FO": "फ़ेरो दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "FR": "फ़à¥à¤°à¤¾à¤‚स", + "GA": "गैबॉन", + "GB": "यूनाइटेड किंगडम", + "GD": "गà¥à¤°à¥‡à¤¨à¤¾à¤¡à¤¾", + "GE": "जॉरà¥à¤œà¤¿à¤¯à¤¾", + "GF": "फ़à¥à¤°à¥‡à¤‚च गयाना", + "GG": "गरà¥à¤¨à¤¸à¥€", + "GH": "घाना", + "GI": "जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤°", + "GL": "गà¥à¤°à¥€à¤¨à¤²à¥ˆà¤‚ड", + "GM": "गामà¥à¤¬à¤¿à¤¯à¤¾", + "GN": "गिनी", + "GP": "गà¥à¤µà¤¾à¤¡à¥‡à¤²à¥‚प", + "GQ": "इकà¥à¤µà¥‡à¤Ÿà¥‹à¤°à¤¿à¤¯à¤² गिनी", + "GR": "यूनान", + "GS": "दकà¥à¤·à¤¿à¤£ जॉरà¥à¤œà¤¿à¤¯à¤¾ और दकà¥à¤·à¤¿à¤£ सैंडविच दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "GT": "गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾", + "GU": "गà¥à¤†à¤®", + "GW": "गिनी-बिसाउ", + "GY": "गयाना", + "HK": "हाà¤à¤— काà¤à¤— (चीन विशेष पà¥à¤°à¤¶à¤¾à¤¸à¤¨à¤¿à¤• कà¥à¤·à¥‡à¤¤à¥à¤°)", + "HN": "होंडूरास", + "HR": "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾", + "HT": "हैती", + "HU": "हंगरी", + "IC": "कैनेरी दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "ID": "इंडोनेशिया", + "IE": "आयरलैंड", + "IL": "इज़राइल", + "IM": "आइल ऑफ़ मैन", + "IN": "भारत", + "IO": "बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ हिंद महासागरीय कà¥à¤·à¥‡à¤¤à¥à¤°", + "IQ": "इराक", + "IR": "ईरान", + "IS": "आइसलैंड", + "IT": "इटली", + "JE": "जरà¥à¤¸à¥€", + "JM": "जमैका", + "JO": "जॉरà¥à¤¡à¤¨", + "JP": "जापान", + "KE": "केनà¥à¤¯à¤¾", + "KG": "किरà¥à¤—िज़सà¥à¤¤à¤¾à¤¨", + "KH": "कंबोडिया", + "KI": "किरिबाती", + "KM": "कोमोरोस", + "KN": "सेंट किटà¥à¤¸ और नेविस", + "KP": "उतà¥à¤¤à¤° कोरिया", + "KR": "दकà¥à¤·à¤¿à¤£ कोरिया", + "KW": "कà¥à¤µà¥ˆà¤¤", + "KY": "केमैन दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "KZ": "कज़ाखसà¥à¤¤à¤¾à¤¨", + "LA": "लाओस", + "LB": "लेबनान", + "LC": "सेंट लूसिया", + "LI": "लिचेंसà¥à¤Ÿà¥€à¤¨", + "LK": "शà¥à¤°à¥€à¤²à¤‚का", + "LR": "लाइबेरिया", + "LS": "लेसोथो", + "LT": "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾", + "LU": "लगà¥à¤œà¤¼à¤®à¤¬à¤°à¥à¤—", + "LV": "लातविया", + "LY": "लीबिया", + "MA": "मोरकà¥à¤•ो", + "MC": "मोनाको", + "MD": "मॉलà¥à¤¡à¥‹à¤µà¤¾", + "ME": "मोंटेनेगà¥à¤°à¥‹", + "MF": "सेंट मारà¥à¤Ÿà¤¿à¤¨", + "MG": "मेडागासà¥à¤•र", + "MH": "मारà¥à¤¶à¤² दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "MK": "मैसिडोनिया", + "ML": "माली", + "MM": "मà¥à¤¯à¤¾à¤‚मार (बरà¥à¤®à¤¾)", + "MN": "मंगोलिया", + "MO": "मकाऊ (विशेष पà¥à¤°à¤¶à¤¾à¤¸à¤¨à¤¿à¤• कà¥à¤·à¥‡à¤¤à¥à¤° चीन)", + "MP": "उतà¥à¤¤à¤°à¥€ मारियाना दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "MQ": "मारà¥à¤Ÿà¥€à¤¨à¤¿à¤•", + "MR": "मॉरिटानिया", + "MS": "मोंटसेरात", + "MT": "मालà¥à¤Ÿà¤¾", + "MU": "मॉरिशस", + "MV": "मालदीव", + "MW": "मलावी", + "MX": "मैकà¥à¤¸à¤¿à¤•ो", + "MY": "मलेशिया", + "MZ": "मोज़ांबिक", + "NA": "नामीबिया", + "NC": "नà¥à¤¯à¥‚ कैलेडोनिया", + "NE": "नाइजर", + "NF": "नॉरफ़ॉक दà¥à¤µà¥€à¤ª", + "NG": "नाइजीरिया", + "NI": "निकारागà¥à¤†", + "NL": "नीदरलैंड", + "NO": "नॉरà¥à¤µà¥‡", + "NP": "नेपाल", + "NR": "नाउरà¥", + "NU": "नीयू", + "NZ": "नà¥à¤¯à¥‚ज़ीलैंड", + "OM": "ओमान", + "PA": "पनामा", + "PE": "पेरू", + "PF": "फ़à¥à¤°à¥‡à¤‚च पोलिनेशिया", + "PG": "पापà¥à¤† नà¥à¤¯à¥‚ गिनी", + "PH": "फ़िलिपींस", + "PK": "पाकिसà¥à¤¤à¤¾à¤¨", + "PL": "पोलैंड", + "PM": "सेंट पिà¤à¤°à¥‡ और मिकà¥à¤µà¥‡à¤²à¤¾à¤¨", + "PN": "पिटकैरà¥à¤¨ दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "PR": "पोरà¥à¤Ÿà¥‹ रिको", + "PS": "फ़िलिसà¥à¤¤à¥€à¤¨à¥€ कà¥à¤·à¥‡à¤¤à¥à¤°", + "PT": "पà¥à¤°à¥à¤¤à¤—ाल", + "PW": "पलाऊ", + "PY": "पेरागà¥à¤µà¥‡", + "QA": "क़तर", + "RE": "रियूनियन", + "RO": "रोमानिया", + "RS": "सरà¥à¤¬à¤¿à¤¯à¤¾", + "RU": "रूस", + "RW": "रवांडा", + "SA": "सऊदी अरब", + "SB": "सोलोमन दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "SC": "सेशेलà¥à¤¸", + "SD": "सूडान", + "SE": "सà¥à¤µà¥€à¤¡à¤¨", + "SG": "सिंगापà¥à¤°", + "SH": "सेंट हेलेना", + "SI": "सà¥à¤²à¥‹à¤µà¥‡à¤¨à¤¿à¤¯à¤¾", + "SJ": "सà¥à¤µà¤¾à¤²à¤¬à¤¾à¤°à¥à¤¡ और जान मायेन", + "SK": "सà¥à¤²à¥‹à¤µà¤¾à¤•िया", + "SL": "सिà¤à¤°à¤¾ लियोन", + "SM": "सैन मेरीनो", + "SN": "सेनेगल", + "SO": "सोमालिया", + "SR": "सूरीनाम", + "SS": "दकà¥à¤·à¤¿à¤£ सूडान", + "ST": "साओ टोम और पà¥à¤°à¤¿à¤‚सिपे", + "SV": "अल सलà¥à¤µà¤¾à¤¡à¥‹à¤°", + "SX": "सिंट मारà¥à¤Ÿà¤¿à¤¨", + "SY": "सीरिया", + "SZ": "सà¥à¤µà¤¾à¤œà¤¼à¥€à¤²à¥ˆà¤‚ड", + "TA": "तà¥à¤°à¤¿à¤¸à¥à¤Ÿà¤¾à¤¨ डा कà¥à¤¨à¤¾", + "TC": "तà¥à¤°à¥à¤• और कैकोज़ दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "TD": "चाड", + "TF": "फ़à¥à¤°à¤¾à¤‚सीसी दकà¥à¤·à¤¿à¤£à¥€ कà¥à¤·à¥‡à¤¤à¥à¤°", + "TG": "टोगो", + "TH": "थाईलैंड", + "TJ": "ताज़िकिसà¥à¤¤à¤¾à¤¨", + "TK": "तोकेलाउ", + "TL": "तिमोर-लेसà¥à¤¤", + "TM": "तà¥à¤°à¥à¤•मेनिसà¥à¤¤à¤¾à¤¨", + "TN": "टà¥à¤¯à¥‚नीशिया", + "TO": "टोंगा", + "TR": "तà¥à¤°à¥à¤•ी", + "TT": "तà¥à¤°à¤¿à¤¨à¤¿à¤¦à¤¾à¤¦ और टोबैगो", + "TV": "तà¥à¤µà¤¾à¤²à¥‚", + "TW": "ताइवान", + "TZ": "तंज़ानिया", + "UA": "यूकà¥à¤°à¥‡à¤¨", + "UG": "यà¥à¤—ांडा", + "UM": "यू.à¤à¤¸. आउटलाइंग दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "UN": "संयà¥à¤•à¥à¤¤ राषà¥à¤Ÿà¥à¤°", + "US": "संयà¥à¤•à¥à¤¤ राजà¥à¤¯", + "UY": "उरूगà¥à¤µà¥‡", + "UZ": "उज़à¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨", + "VA": "वेटिकन सिटी", + "VC": "सेंट विंसेंट और गà¥à¤°à¥‡à¤¨à¤¾à¤¡à¤¾à¤‡à¤‚स", + "VE": "वेनेज़à¥à¤à¤²à¤¾", + "VG": "बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ वरà¥à¤œà¤¿à¤¨ दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "VI": "यू.à¤à¤¸. वरà¥à¤œà¤¿à¤¨ दà¥à¤µà¥€à¤ªà¤¸à¤®à¥‚ह", + "VN": "वियतनाम", + "VU": "वनà¥à¤†à¤¤à¥‚", + "WF": "वालिस और फ़à¥à¤¯à¥‚चूना", + "WS": "समोआ", + "XK": "कोसोवो", + "YE": "यमन", + "YT": "मायोते", + "ZA": "दकà¥à¤·à¤¿à¤£ अफ़à¥à¤°à¥€à¤•ा", + "ZM": "ज़ामà¥à¤¬à¤¿à¤¯à¤¾", + "ZW": "ज़िमà¥à¤¬à¤¾à¤¬à¥à¤µà¥‡" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/hr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/hr.json new file mode 100644 index 0000000000000000000000000000000000000000..6df243b748bab597c02eb9fc981db5dd55bea484 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/hr.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Otok Ascension", + "AD": "Andora", + "AE": "Ujedinjeni Arapski Emirati", + "AF": "Afganistan", + "AG": "Antigva i Barbuda", + "AI": "Angvila", + "AL": "Albanija", + "AM": "Armenija", + "AO": "Angola", + "AQ": "Antarktika", + "AR": "Argentina", + "AS": "AmeriÄka Samoa", + "AT": "Austrija", + "AU": "Australija", + "AW": "Aruba", + "AX": "Ã…landski otoci", + "AZ": "Azerbajdžan", + "BA": "Bosna i Hercegovina", + "BB": "Barbados", + "BD": "BangladeÅ¡", + "BE": "Belgija", + "BF": "Burkina Faso", + "BG": "Bugarska", + "BH": "Bahrein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermudi", + "BN": "Brunej", + "BO": "Bolivija", + "BQ": "Karipski otoci Nizozemske", + "BR": "Brazil", + "BS": "Bahami", + "BT": "Butan", + "BW": "Bocvana", + "BY": "Bjelorusija", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kokosovi (Keelingovi) otoci", + "CD": "Kongo - Kinshasa", + "CF": "SrednjoafriÄka Republika", + "CG": "Kongo - Brazzaville", + "CH": "Å vicarska", + "CI": "Obala Bjelokosti", + "CK": "Cookovi Otoci", + "CL": "ÄŒile", + "CM": "Kamerun", + "CN": "Kina", + "CO": "Kolumbija", + "CR": "Kostarika", + "CU": "Kuba", + "CV": "Zelenortska Republika", + "CW": "Curaçao", + "CX": "Božićni otok", + "CY": "Cipar", + "CZ": "ÄŒeÅ¡ka Republika", + "DE": "NjemaÄka", + "DG": "Diego Garcia", + "DJ": "Džibuti", + "DK": "Danska", + "DM": "Dominika", + "DO": "Dominikanska Republika", + "DZ": "Alžir", + "EA": "Ceuta i Melilla", + "EC": "Ekvador", + "EE": "Estonija", + "EG": "Egipat", + "EH": "Zapadna Sahara", + "ER": "Eritreja", + "ES": "Å panjolska", + "ET": "Etiopija", + "FI": "Finska", + "FJ": "Fidži", + "FK": "Falklandski otoci", + "FM": "Mikronezija", + "FO": "Farski otoci", + "FR": "Francuska", + "GA": "Gabon", + "GB": "Ujedinjeno Kraljevstvo", + "GD": "Grenada", + "GE": "Gruzija", + "GF": "Francuska Gijana", + "GG": "Guernsey", + "GH": "Gana", + "GI": "Gibraltar", + "GL": "Grenland", + "GM": "Gambija", + "GN": "Gvineja", + "GP": "Guadalupe", + "GQ": "Ekvatorska Gvineja", + "GR": "GrÄka", + "GS": "Južna Georgija i Južni SendviÄki Otoci", + "GT": "Gvatemala", + "GU": "Guam", + "GW": "Gvineja Bisau", + "GY": "Gvajana", + "HK": "PUP Hong Kong Kina", + "HN": "Honduras", + "HR": "Hrvatska", + "HT": "Haiti", + "HU": "MaÄ‘arska", + "IC": "Kanarski otoci", + "ID": "Indonezija", + "IE": "Irska", + "IL": "Izrael", + "IM": "Otok Man", + "IN": "Indija", + "IO": "Britanski Indijskooceanski teritorij", + "IQ": "Irak", + "IR": "Iran", + "IS": "Island", + "IT": "Italija", + "JE": "Jersey", + "JM": "Jamajka", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenija", + "KG": "Kirgistan", + "KH": "Kambodža", + "KI": "Kiribati", + "KM": "Komori", + "KN": "Sveti Kristofor i Nevis", + "KP": "Sjeverna Koreja", + "KR": "Južna Koreja", + "KW": "Kuvajt", + "KY": "Kajmanski otoci", + "KZ": "Kazahstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "Sveta Lucija", + "LI": "LihtenÅ¡tajn", + "LK": "Å ri Lanka", + "LR": "Liberija", + "LS": "Lesoto", + "LT": "Litva", + "LU": "Luksemburg", + "LV": "Latvija", + "LY": "Libija", + "MA": "Maroko", + "MC": "Monako", + "MD": "Moldavija", + "ME": "Crna Gora", + "MF": "Saint Martin", + "MG": "Madagaskar", + "MH": "MarÅ¡alovi Otoci", + "MK": "Makedonija", + "ML": "Mali", + "MM": "Mjanmar (Burma)", + "MN": "Mongolija", + "MO": "PUP Makao Kina", + "MP": "Sjevernomarijanski otoci", + "MQ": "Martinique", + "MR": "Mauretanija", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauricijus", + "MV": "Maldivi", + "MW": "Malavi", + "MX": "Meksiko", + "MY": "Malezija", + "MZ": "Mozambik", + "NA": "Namibija", + "NC": "Nova Kaledonija", + "NE": "Niger", + "NF": "Otok Norfolk", + "NG": "Nigerija", + "NI": "Nikaragva", + "NL": "Nizozemska", + "NO": "NorveÅ¡ka", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Novi Zeland", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Francuska Polinezija", + "PG": "Papua Nova Gvineja", + "PH": "Filipini", + "PK": "Pakistan", + "PL": "Poljska", + "PM": "Saint-Pierre-et-Miquelon", + "PN": "Otoci Pitcairn", + "PR": "Portoriko", + "PS": "Palestinsko PodruÄje", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paragvaj", + "QA": "Katar", + "RE": "Réunion", + "RO": "Rumunjska", + "RS": "Srbija", + "RU": "Rusija", + "RW": "Ruanda", + "SA": "Saudijska Arabija", + "SB": "Salomonski Otoci", + "SC": "SejÅ¡eli", + "SD": "Sudan", + "SE": "Å vedska", + "SG": "Singapur", + "SH": "Sveta Helena", + "SI": "Slovenija", + "SJ": "Svalbard i Jan Mayen", + "SK": "SlovaÄka", + "SL": "Sijera Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalija", + "SR": "Surinam", + "SS": "Južni Sudan", + "ST": "Sveti Toma i Princip", + "SV": "Salvador", + "SX": "Sint Maarten", + "SY": "Sirija", + "SZ": "Svazi", + "TA": "Tristan da Cunha", + "TC": "Otoci Turks i Caicos", + "TD": "ÄŒad", + "TF": "Francuski južni i antarktiÄki teritoriji", + "TG": "Togo", + "TH": "Tajland", + "TJ": "Tadžikistan", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turkmenistan", + "TN": "Tunis", + "TO": "Tonga", + "TR": "Turska", + "TT": "Trinidad i Tobago", + "TV": "Tuvalu", + "TW": "Tajvan", + "TZ": "Tanzanija", + "UA": "Ukrajina", + "UG": "Uganda", + "UM": "Mali udaljeni otoci SAD-a", + "UN": "Ujedinjeni narodi", + "US": "Sjedinjene AmeriÄke Države", + "UY": "Urugvaj", + "UZ": "Uzbekistan", + "VA": "Vatikanski Grad", + "VC": "Sveti Vincent i Grenadini", + "VE": "Venezuela", + "VG": "Britanski DjeviÄanski otoci", + "VI": "AmeriÄki DjeviÄanski otoci", + "VN": "Vijetnam", + "VU": "Vanuatu", + "WF": "Wallis i Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "JužnoafriÄka Republika", + "ZM": "Zambija", + "ZW": "Zimbabve" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/hu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/hu.json new file mode 100644 index 0000000000000000000000000000000000000000..2f0636416519a8d5990afddf91a67c458c7ad4af --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/hu.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Ascension-sziget", + "AD": "Andorra", + "AE": "Egyesült Arab Emírségek", + "AF": "Afganisztán", + "AG": "Antigua és Barbuda", + "AI": "Anguilla", + "AL": "Albánia", + "AM": "Örményország", + "AO": "Angola", + "AQ": "Antarktisz", + "AR": "Argentína", + "AS": "Amerikai Szamoa", + "AT": "Ausztria", + "AU": "Ausztrália", + "AW": "Aruba", + "AX": "Ã…land-szigetek", + "AZ": "Azerbajdzsán", + "BA": "Bosznia-Hercegovina", + "BB": "Barbados", + "BD": "Banglades", + "BE": "Belgium", + "BF": "Burkina Faso", + "BG": "Bulgária", + "BH": "Bahrein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint-Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolívia", + "BQ": "Holland Karib-térség", + "BR": "Brazília", + "BS": "Bahama-szigetek", + "BT": "Bhután", + "BW": "Botswana", + "BY": "Belarusz", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kókusz (Keeling)-szigetek", + "CD": "Kongó - Kinshasa", + "CF": "Közép-afrikai Köztársaság", + "CG": "Kongó - Brazzaville", + "CH": "Svájc", + "CI": "Elefántcsontpart", + "CK": "Cook-szigetek", + "CL": "Chile", + "CM": "Kamerun", + "CN": "Kína", + "CO": "Kolumbia", + "CR": "Costa Rica", + "CU": "Kuba", + "CV": "Zöld-foki Köztársaság", + "CW": "Curaçao", + "CX": "Karácsony-sziget", + "CY": "Ciprus", + "CZ": "Csehország", + "DE": "Németország", + "DG": "Diego Garcia", + "DJ": "Dzsibuti", + "DK": "Dánia", + "DM": "Dominika", + "DO": "Dominikai Köztársaság", + "DZ": "Algéria", + "EA": "Ceuta és Melilla", + "EC": "Ecuador", + "EE": "Észtország", + "EG": "Egyiptom", + "EH": "Nyugat-Szahara", + "ER": "Eritrea", + "ES": "Spanyolország", + "ET": "Etiópia", + "FI": "Finnország", + "FJ": "Fidzsi", + "FK": "Falkland-szigetek", + "FM": "Mikronézia", + "FO": "Feröer-szigetek", + "FR": "Franciaország", + "GA": "Gabon", + "GB": "Egyesült Királyság", + "GD": "Grenada", + "GE": "Grúzia", + "GF": "Francia Guyana", + "GG": "Guernsey", + "GH": "Ghána", + "GI": "Gibraltár", + "GL": "Grönland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "EgyenlítÅ‘i-Guinea", + "GR": "Görögország", + "GS": "Déli-Georgia és Déli-Sandwich-szigetek", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Bissau-Guinea", + "GY": "Guyana", + "HK": "Hongkong KKT", + "HN": "Honduras", + "HR": "Horvátország", + "HT": "Haiti", + "HU": "Magyarország", + "IC": "Kanári-szigetek", + "ID": "Indonézia", + "IE": "Ãrország", + "IL": "Izrael", + "IM": "Man-sziget", + "IN": "India", + "IO": "Brit Indiai-óceáni Terület", + "IQ": "Irak", + "IR": "Irán", + "IS": "Izland", + "IT": "Olaszország", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordánia", + "JP": "Japán", + "KE": "Kenya", + "KG": "Kirgizisztán", + "KH": "Kambodzsa", + "KI": "Kiribati", + "KM": "Comore-szigetek", + "KN": "Saint Kitts és Nevis", + "KP": "Észak-Korea", + "KR": "Dél-Korea", + "KW": "Kuvait", + "KY": "Kajmán-szigetek", + "KZ": "Kazahsztán", + "LA": "Laosz", + "LB": "Libanon", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Srí Lanka", + "LR": "Libéria", + "LS": "Lesotho", + "LT": "Litvánia", + "LU": "Luxemburg", + "LV": "Lettország", + "LY": "Líbia", + "MA": "Marokkó", + "MC": "Monaco", + "MD": "Moldova", + "ME": "Montenegró", + "MF": "Saint Martin", + "MG": "Madagaszkár", + "MH": "Marshall-szigetek", + "MK": "Macedónia", + "ML": "Mali", + "MM": "Mianmar (Burma)", + "MN": "Mongólia", + "MO": "Makaó KKT", + "MP": "Északi Mariana-szigetek", + "MQ": "Martinique", + "MR": "Mauritánia", + "MS": "Montserrat", + "MT": "Málta", + "MU": "Mauritius", + "MV": "Maldív-szigetek", + "MW": "Malawi", + "MX": "Mexikó", + "MY": "Malajzia", + "MZ": "Mozambik", + "NA": "Namíbia", + "NC": "Új-Kaledónia", + "NE": "Niger", + "NF": "Norfolk-sziget", + "NG": "Nigéria", + "NI": "Nicaragua", + "NL": "Hollandia", + "NO": "Norvégia", + "NP": "Nepál", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Új-Zéland", + "OM": "Omán", + "PA": "Panama", + "PE": "Peru", + "PF": "Francia Polinézia", + "PG": "Pápua Új-Guinea", + "PH": "Fülöp-szigetek", + "PK": "Pakisztán", + "PL": "Lengyelország", + "PM": "Saint-Pierre és Miquelon", + "PN": "Pitcairn-szigetek", + "PR": "Puerto Rico", + "PS": "Palesztin Terület", + "PT": "Portugália", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Katar", + "RE": "Réunion", + "RO": "Románia", + "RS": "Szerbia", + "RU": "Oroszország", + "RW": "Ruanda", + "SA": "Szaúd-Arábia", + "SB": "Salamon-szigetek", + "SC": "Seychelle-szigetek", + "SD": "Szudán", + "SE": "Svédország", + "SG": "Szingapúr", + "SH": "Szent Ilona", + "SI": "Szlovénia", + "SJ": "Svalbard és Jan Mayen", + "SK": "Szlovákia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Szenegál", + "SO": "Szomália", + "SR": "Suriname", + "SS": "Dél-Szudán", + "ST": "Sao Tomé és Príncipe", + "SV": "Salvador", + "SX": "Sint Maarten", + "SY": "Szíria", + "SZ": "Szváziföld", + "TA": "Tristan da Cunha", + "TC": "Turks- és Caicos-szigetek", + "TD": "Csád", + "TF": "Francia Déli Területek", + "TG": "Togo", + "TH": "Thaiföld", + "TJ": "Tádzsikisztán", + "TK": "Tokelau", + "TL": "Kelet-Timor", + "TM": "Türkmenisztán", + "TN": "Tunézia", + "TO": "Tonga", + "TR": "Törökország", + "TT": "Trinidad és Tobago", + "TV": "Tuvalu", + "TW": "Tajvan", + "TZ": "Tanzánia", + "UA": "Ukrajna", + "UG": "Uganda", + "UM": "Az Amerikai Egyesült Ãllamok lakatlan külbirtokai", + "UN": "ENSZ", + "US": "Egyesült Ãllamok", + "UY": "Uruguay", + "UZ": "Üzbegisztán", + "VA": "Vatikán", + "VC": "Saint Vincent és a Grenadine-szigetek", + "VE": "Venezuela", + "VG": "Brit Virgin-szigetek", + "VI": "Amerikai Virgin-szigetek", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis és Futuna", + "WS": "Szamoa", + "XK": "Koszovó", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Dél-afrikai Köztársaság", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/hy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/hy.json new file mode 100644 index 0000000000000000000000000000000000000000..f7615061705da1b3aed27941c61d58c68d026523 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/hy.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Õ€Õ¡Õ´Õ¢Õ¡Ö€Õ±Õ´Õ¡Õ¶ Õ¯Õ²Õ¦Õ«", + "AD": "Ô±Õ¶Õ¤Õ¸Ö€Ö€Õ¡", + "AE": "Ô±Ö€Õ¡Õ¢Õ¡Õ¯Õ¡Õ¶ Õ„Õ«Õ¡ÖÕµÕ¡Õ¬ Ô·Õ´Õ«Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€", + "AF": "Ô±Ö†Õ²Õ¡Õ¶Õ½Õ¿Õ¡Õ¶", + "AG": "Ô±Õ¶Õ¿Õ«Õ£Õ¸Ö‚Õ¡ Ö‡ Ô²Õ¡Ö€Õ¢Õ¸Ö‚Õ¤Õ¡", + "AI": "Ô±Õ¶Õ£Õ¸Ö‚Õ«Õ¬Õ¡", + "AL": "Ô±Õ¬Õ¢Õ¡Õ¶Õ«Õ¡", + "AM": "Õ€Õ¡ÕµÕ¡Õ½Õ¿Õ¡Õ¶", + "AO": "Ô±Õ¶Õ£Õ¸Õ¬Õ¡", + "AQ": "Ô±Õ¶Õ¿Õ¡Ö€Õ¯Õ¿Õ«Õ¤Õ¡", + "AR": "Ô±Ö€Õ£Õ¥Õ¶Õ¿Õ«Õ¶Õ¡", + "AS": "Ô±Õ´Õ¥Ö€Õ«Õ¯ÕµÕ¡Õ¶ ÕÕ¡Õ´Õ¸Õ¡", + "AT": "Ô±Õ¾Õ½Õ¿Ö€Õ«Õ¡", + "AU": "Ô±Õ¾Õ½Õ¿Ö€Õ¡Õ¬Õ«Õ¡", + "AW": "Ô±Ö€Õ¸Ö‚Õ¢Õ¡", + "AX": "Ô±Õ¬Õ¡Õ¶Õ¤ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "AZ": "Ô±Õ¤Ö€Õ¢Õ¥Õ»Õ¡Õ¶", + "BA": "Ô²Õ¸Õ½Õ¶Õ«Õ¡ Ö‡ Õ€Õ¥Ö€ÖÕ¥Õ£Õ¸Õ¾Õ«Õ¶Õ¡", + "BB": "Ô²Õ¡Ö€Õ¢Õ¡Õ¤Õ¸Õ½", + "BD": "Ô²Õ¡Õ¶Õ£Õ¬Õ¡Õ¤Õ¥Õ·", + "BE": "Ô²Õ¥Õ¬Õ£Õ«Õ¡", + "BF": "Ô²Õ¸Ö‚Ö€Õ¯Õ«Õ¶Õ¡ Õ–Õ¡Õ½Õ¸", + "BG": "Ô²Õ¸Ö‚Õ¬Õ²Õ¡Ö€Õ«Õ¡", + "BH": "Ô²Õ¡Õ°Ö€Õ¥ÕµÕ¶", + "BI": "Ô²Õ¸Ö‚Ö€Õ¸Ö‚Õ¶Õ¤Õ«", + "BJ": "Ô²Õ¥Õ¶Õ«Õ¶", + "BL": "ÕÕ¥Õ¶ Ô²Õ¡Ö€Õ¿Õ¥Õ¬Õ´Õ«", + "BM": "Ô²Õ¥Ö€Õ´Õ¸Ö‚Õ¤Õ¶Õ¥Ö€", + "BN": "Ô²Ö€Õ¸Ö‚Õ¶Õ¥Õµ", + "BO": "Ô²Õ¸Õ¬Õ«Õ¾Õ«Õ¡", + "BQ": "Ô¿Õ¡Ö€Õ«Õ¢ÕµÕ¡Õ¶ Õ†Õ«Õ¤Õ¥Õ¼Õ¬Õ¡Õ¶Õ¤Õ¶Õ¥Ö€", + "BR": "Ô²Ö€Õ¡Õ¦Õ«Õ¬Õ«Õ¡", + "BS": "Ô²Õ¡Õ°Õ¡Õ´Õ¡Õ¶Õ¥Ö€", + "BT": "Ô²Õ¸Ö‚Õ©Õ¡Õ¶", + "BW": "Ô²Õ¸Õ©Õ½Õ¾Õ¡Õ¶Õ¡", + "BY": "Ô²Õ¥Õ¬Õ¡Õ¼Õ¸Ö‚Õ½", + "BZ": "Ô²Õ¥Õ¬Õ«Õ¦", + "CA": "Ô¿Õ¡Õ¶Õ¡Õ¤Õ¡", + "CC": "Ô¿Õ¸Õ¯Õ¸Õ½ÕµÕ¡Õ¶ (Õ”Õ«Õ¬Õ«Õ¶Õ£) Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "CD": "Ô¿Õ¸Õ¶Õ£Õ¸ - Ô¿Õ«Õ¶Õ·Õ¡Õ½Õ¡", + "CF": "Ô¿Õ¥Õ¶Õ¿Ö€Õ¸Õ¶Õ¡Õ¯Õ¡Õ¶ Ô±Ö†Ö€Õ«Õ¯ÕµÕ¡Õ¶ Õ€Õ¡Õ¶Ö€Õ¡ÕºÕ¥Õ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶", + "CG": "Ô¿Õ¸Õ¶Õ£Õ¸ - Ô²Ö€Õ¡Õ¦Õ¡Õ¾Õ«Õ¬", + "CH": "Õ‡Õ¾Õ¥ÕµÖÕ¡Ö€Õ«Õ¡", + "CI": "Ô¿Õ¸Õ¿ դ’Իվուար", + "CK": "Ô¿Õ¸Ö‚Õ¯Õ« Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "CL": "Õ‰Õ«Õ¬Õ«", + "CM": "Ô¿Õ¡Õ´Õ¥Ö€Õ¸Ö‚Õ¶", + "CN": "Õ‰Õ«Õ¶Õ¡Õ½Õ¿Õ¡Õ¶", + "CO": "Ô¿Õ¸Õ¬Õ¸Ö‚Õ´Õ¢Õ«Õ¡", + "CR": "Ô¿Õ¸Õ½Õ¿Õ¡ Ռիկա", + "CU": "Ô¿Õ¸Ö‚Õ¢Õ¡", + "CV": "Ô¿Õ¡Õ¢Õ¸ ÕŽÕ¥Ö€Õ¤Õ¥", + "CW": "Ô¿ÕµÕ¸Ö‚Ö€Õ¡Õ½Õ¡Õ¸", + "CX": "ÕÕ¸Ö‚Ö€Õ¢ Ô¾Õ¶Õ¶Õ¤ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«", + "CY": "Ô¿Õ«ÕºÖ€Õ¸Õ½", + "CZ": "Õ‰Õ¥Õ­Õ«Õ¡", + "DE": "Ô³Õ¥Ö€Õ´Õ¡Õ¶Õ«Õ¡", + "DG": "Ô´Õ«Õ¥Õ£Õ¸ Ô³Õ¡Ö€Õ½Õ«Õ¡", + "DJ": "Õ‹Õ«Õ¢Õ¸Ö‚Õ©Õ«", + "DK": "Ô´Õ¡Õ¶Õ«Õ¡", + "DM": "Ô´Õ¸Õ´Õ«Õ¶Õ«Õ¯Õ¡", + "DO": "Ô´Õ¸Õ´Õ«Õ¶Õ«Õ¯ÕµÕ¡Õ¶ Õ€Õ¡Õ¶Ö€Õ¡ÕºÕ¥Õ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶", + "DZ": "Ô±Õ¬ÕªÕ«Ö€", + "EA": "ÕÕ¥Õ¸Ö‚Õ¿Õ¡ Ö‡ Õ„Õ¥Õ¬Õ«Õ¬ÕµÕ¡", + "EC": "Ô·Õ¯Õ¾Õ¡Õ¤Õ¸Ö€", + "EE": "Ô·Õ½Õ¿Õ¸Õ¶Õ«Õ¡", + "EG": "ÔµÕ£Õ«ÕºÕ¿Õ¸Õ½", + "EH": "Ô±Ö€Ö‡Õ´Õ¿ÕµÕ¡Õ¶ ÕÕ¡Õ°Õ¡Ö€Õ¡", + "ER": "Ô·Ö€Õ«Õ©Ö€Õ¥Õ¡", + "ES": "Ô»Õ½ÕºÕ¡Õ¶Õ«Õ¡", + "ET": "ÔµÕ©Õ¸Õ¾ÕºÕ«Õ¡", + "FI": "Õ–Õ«Õ¶Õ¬Õ¡Õ¶Õ¤Õ«Õ¡", + "FJ": "Õ–Õ«Õ»Õ«", + "FK": "Õ–Õ¸Õ¬Ö„Õ¬Õ¥Õ¶Õ¤ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "FM": "Õ„Õ«Õ¯Ö€Õ¸Õ¶Õ¥Õ¦Õ«Õ¡", + "FO": "Õ–Õ¡Ö€Õ¥Ö€ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "FR": "Õ–Ö€Õ¡Õ¶Õ½Õ«Õ¡", + "GA": "Ô³Õ¡Õ¢Õ¸Õ¶", + "GB": "Õ„Õ«Õ¡ÖÕµÕ¡Õ¬ Ô¹Õ¡Õ£Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶", + "GD": "Ô³Ö€Õ¥Õ¶Õ¡Õ¤Õ¡", + "GE": "ÕŽÖ€Õ¡Õ½Õ¿Õ¡Õ¶", + "GF": "Õ–Ö€Õ¡Õ¶Õ½Õ«Õ¡Õ¯Õ¡Õ¶ Ô³Õ¾Õ«Õ¡Õ¶Õ¡", + "GG": "Ô³Õ¥Ö€Õ¶Õ½Õ«", + "GH": "Ô³Õ¡Õ¶Õ¡", + "GI": "Õ‹Õ«Õ¢Ö€Õ¡Õ¬Õ©Õ¡Ö€", + "GL": "Ô³Ö€Õ¥Õ¶Õ¬Õ¡Õ¶Õ¤Õ«Õ¡", + "GM": "Ô³Õ¡Õ´Õ¢Õ«Õ¡", + "GN": "Ô³Õ¾Õ«Õ¶Õ¥Õ¡", + "GP": "Ô³Õ¾Õ¡Õ¤Õ¥Õ¬Õ¸Ö‚ÕºÕ¡", + "GQ": "Õ€Õ¡Õ½Õ¡Ö€Õ¡Õ¯Õ¡Õ®Õ¡ÕµÕ«Õ¶ Ô³Õ¾Õ«Õ¶Õ¥Õ¡", + "GR": "Õ€Õ¸Ö‚Õ¶Õ¡Õ½Õ¿Õ¡Õ¶", + "GS": "Õ€Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ Õ‹Õ¸Ö€Õ»Õ«Õ¡ Ö‡ Õ€Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ ÕÕ¥Õ¶Õ¤Õ¾Õ«Õ¹ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "GT": "Ô³Õ¾Õ¡Õ¿Õ¥Õ´Õ¡Õ¬Õ¡", + "GU": "Ô³Õ¸Ö‚Õ¡Õ´", + "GW": "Ô³Õ¾Õ«Õ¶Õ¥Õ¡-Ô²Õ«Õ½Õ½Õ¡Õ¸Ö‚", + "GY": "Ô³Õ¡ÕµÕ¡Õ¶Õ¡", + "HK": "Õ€Õ¸Õ¶Õ¯Õ¸Õ¶Õ£Õ« Õ€ÕŽÕ‡", + "HN": "Õ€Õ¸Õ¶Õ¤Õ¸Ö‚Ö€Õ¡Õ½", + "HR": "Ô½Õ¸Ö€Õ¾Õ¡Õ©Õ«Õ¡", + "HT": "Õ€Õ¡ÕµÕ«Õ©Õ«", + "HU": "Õ€Õ¸Ö‚Õ¶Õ£Õ¡Ö€Õ«Õ¡", + "IC": "Ô¿Õ¡Õ¶Õ¡Ö€ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "ID": "Ô»Õ¶Õ¤Õ¸Õ¶Õ¥Õ¦Õ«Õ¡", + "IE": "Ô»Õ¼Õ¬Õ¡Õ¶Õ¤Õ«Õ¡", + "IL": "Ô»Õ½Ö€Õ¡ÕµÕ¥Õ¬", + "IM": "Õ„Õ¥Õ¶ Õ¯Õ²Õ¦Õ«", + "IN": "Õ€Õ¶Õ¤Õ¯Õ¡Õ½Õ¿Õ¡Õ¶", + "IO": "Ô²Ö€Õ«Õ¿Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ ÕÕ¡Ö€Õ¡Õ®Ö„ Õ€Õ¶Õ¤Õ¯Õ¡Õ¯Õ¡Õ¶ Õ•Õ¾Õ¯Õ«Õ¡Õ¶Õ¸Õ½Õ¸Ö‚Õ´", + "IQ": "Ô»Ö€Õ¡Ö„", + "IR": "Ô»Ö€Õ¡Õ¶", + "IS": "Ô»Õ½Õ¬Õ¡Õ¶Õ¤Õ«Õ¡", + "IT": "Ô»Õ¿Õ¡Õ¬Õ«Õ¡", + "JE": "Õ‹Õ¥Ö€Õ½Õ«", + "JM": "ÕƒÕ¡Õ´Õ¡ÕµÕ¯Õ¡", + "JO": "Õ€Õ¸Ö€Õ¤Õ¡Õ¶Õ¡Õ¶", + "JP": "ÕƒÕ¡ÕºÕ¸Õ¶Õ«Õ¡", + "KE": "Õ”Õ¥Õ¶Õ«Õ¡", + "KG": "Õ‚Ö€Õ²Õ¦Õ½Õ¿Õ¡Õ¶", + "KH": "Ô¿Õ¡Õ´Õ¢Õ¸Õ»Õ¡", + "KI": "Ô¿Õ«Ö€Õ«Õ¢Õ¡Õ¿Õ«", + "KM": "Ô¿Õ¸Õ´Õ¸Ö€ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "KN": "ÕÕ¥Õ¶Õ¿ Õ”Õ«Õ¿Õ½ Ö‡ Õ†Ö‡Õ«Õ½", + "KP": "Õ€ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Ô¿Õ¸Ö€Õ¥Õ¡", + "KR": "Õ€Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ Ô¿Õ¸Ö€Õ¥Õ¡", + "KW": "Õ”Õ¸Ö‚Õ¾Õ¥ÕµÕ©", + "KY": "Ô¿Õ¡ÕµÕ´Õ¡Õ¶ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "KZ": "Õ‚Õ¡Õ¦Õ¡Õ­Õ½Õ¿Õ¡Õ¶", + "LA": "Ô¼Õ¡Õ¸Õ½", + "LB": "Ô¼Õ«Õ¢Õ¡Õ¶Õ¡Õ¶", + "LC": "ÕÕ¥Õ¶Õ© Ô¼ÕµÕ¸Ö‚Õ½Õ«Õ¡", + "LI": "Ô¼Õ«Õ­Õ¿Õ¥Õ¶Õ·Õ¿Õ¥ÕµÕ¶", + "LK": "Õ‡Ö€Õ« Ô¼Õ¡Õ¶Õ¯Õ¡", + "LR": "Ô¼Õ«Õ¢Õ¥Ö€Õ«Õ¡", + "LS": "Ô¼Õ¥Õ½Õ¸Õ¿Õ¸", + "LT": "Ô¼Õ«Õ¿Õ¾Õ¡", + "LU": "Ô¼ÕµÕ¸Ö‚Ö„Õ½Õ¥Õ´Õ¢Õ¸Ö‚Ö€Õ£", + "LV": "Ô¼Õ¡Õ¿Õ¾Õ«Õ¡", + "LY": "Ô¼Õ«Õ¢Õ«Õ¡", + "MA": "Õ„Õ¡Ö€Õ¸Õ¯Õ¯Õ¸", + "MC": "Õ„Õ¸Õ¶Õ¡Õ¯Õ¸", + "MD": "Õ„Õ¸Õ¬Õ¤Õ¸Õ¾Õ¡", + "ME": "Õ‰Õ¥Õ¼Õ¶Õ¸Õ£Õ¸Ö€Õ«Õ¡", + "MF": "ÕÕ¥Õ¶ Õ„Õ¡Ö€Õ¿Õ¥Õ¶", + "MG": "Õ„Õ¡Õ¤Õ¡Õ£Õ¡Õ½Õ¯Õ¡Ö€", + "MH": "Õ„Õ¡Ö€Õ·Õ¡Õ¬ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "MK": "Õ„Õ¡Õ¯Õ¥Õ¤Õ¸Õ¶Õ«Õ¡", + "ML": "Õ„Õ¡Õ¬Õ«", + "MM": "Õ„ÕµÕ¡Õ¶Õ´Õ¡ (Ô²Õ«Ö€Õ´Õ¡)", + "MN": "Õ„Õ¸Õ¶Õ²Õ¸Õ¬Õ«Õ¡", + "MO": "Õ‰Õ«Õ¶Õ¡Õ½Õ¿Õ¡Õ¶Õ« Õ„Õ¡Õ¯Õ¡Õ¸ Õ€ÕŽÕ‡", + "MP": "Õ€ÕµÕ¸Ö‚Õ½Õ«Õ½Õ¡ÕµÕ«Õ¶ Õ„Õ¡Ö€Õ«Õ¡Õ¶ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "MQ": "Õ„Õ¡Ö€Õ¿Õ«Õ¶Õ«Õ¯Õ¡", + "MR": "Õ„Õ¡Õ¾Ö€Õ«Õ¿Õ¡Õ¶Õ«Õ¡", + "MS": "Õ„Õ¸Õ¶Õ½Õ¥Õ¼Õ¡Õ¿", + "MT": "Õ„Õ¡Õ¬Õ©Õ¡", + "MU": "Õ„Õ¡Õ¾Ö€Õ«Õ¯Õ«Õ¸Õ½", + "MV": "Õ„Õ¡Õ¬Õ¤Õ«Õ¾Õ¶Õ¥Ö€", + "MW": "Õ„Õ¡Õ¬Õ¡Õ¾Õ«", + "MX": "Õ„Õ¥Ö„Õ½Õ«Õ¯Õ¡", + "MY": "Õ„Õ¡Õ¬Õ¡ÕµÕ¦Õ«Õ¡", + "MZ": "Õ„Õ¸Õ¦Õ¡Õ´Õ¢Õ«Õ¯", + "NA": "Õ†Õ¡Õ´Õ«Õ¢Õ«Õ¡", + "NC": "Õ†Õ¸Ö€ Ô¿Õ¡Õ¬Õ¥Õ¤Õ¸Õ¶Õ«Õ¡", + "NE": "Õ†Õ«Õ£Õ¥Ö€", + "NF": "Õ†Õ¸Ö€Ö†Õ¸Õ¬Õ¯ Õ¯Õ²Õ¦Õ«", + "NG": "Õ†Õ«Õ£Õ¥Ö€Õ«Õ¡", + "NI": "Õ†Õ«Õ¯Õ¡Ö€Õ¡Õ£Õ¸Ö‚Õ¡", + "NL": "Õ†Õ«Õ¤Õ¥Õ¼Õ¬Õ¡Õ¶Õ¤Õ¶Õ¥Ö€", + "NO": "Õ†Õ¸Ö€Õ¾Õ¥Õ£Õ«Õ¡", + "NP": "Õ†Õ¥ÕºÕ¡Õ¬", + "NR": "Õ†Õ¡Õ¸Ö‚Ö€Õ¸Ö‚", + "NU": "Õ†Õ«Õ¸Ö‚Õ¥", + "NZ": "Õ†Õ¸Ö€ Ô¶Õ¥Õ¬Õ¡Õ¶Õ¤Õ«Õ¡", + "OM": "Õ•Õ´Õ¡Õ¶", + "PA": "ÕŠÕ¡Õ¶Õ¡Õ´Õ¡", + "PE": "ÕŠÕ¥Ö€Õ¸Ö‚", + "PF": "Õ–Ö€Õ¡Õ¶Õ½Õ«Õ¡Õ¯Õ¡Õ¶ ÕŠÕ¸Õ¬Õ«Õ¶Õ¥Õ¦Õ«Õ¡", + "PG": "ÕŠÕ¡ÕºÕ¸Ö‚Õ¡ Õ†Õ¸Ö€ Ô³Õ¾Õ«Õ¶Õ¥Õ¡", + "PH": "Õ–Õ«Õ¬Õ«ÕºÕ«Õ¶Õ¶Õ¥Ö€", + "PK": "ÕŠÕ¡Õ¯Õ«Õ½Õ¿Õ¡Õ¶", + "PL": "Ô¼Õ¥Õ°Õ¡Õ½Õ¿Õ¡Õ¶", + "PM": "ÕÕ¥Õ¶ ÕŠÕ«Õ¥Õ¼ Ö‡ Õ„Õ«Ö„Õ¥Õ¬Õ¸Õ¶", + "PN": "ÕŠÕ«Õ¿Õ¯Õ¥Õ¼Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "PR": "ÕŠÕ¸Ö‚Õ¥Ö€Õ¿Õ¸ Ռիկո", + "PS": "ÕŠÕ¡Õ²Õ¥Õ½Õ¿Õ«Õ¶ÕµÕ¡Õ¶ Õ¿Õ¡Ö€Õ¡Õ®Ö„Õ¶Õ¥Ö€", + "PT": "ÕŠÕ¸Ö€Õ¿Õ¸Ö‚Õ£Õ¡Õ¬Õ«Õ¡", + "PW": "ÕŠÕ¡Õ¬Õ¡Õ¸Ö‚", + "PY": "ÕŠÕ¡Ö€Õ¡Õ£Õ¾Õ¡Õµ", + "QA": "Ô¿Õ¡Õ¿Õ¡Ö€", + "RE": "Ռեյունիոն", + "RO": "Ռումինիա", + "RS": "ÕÕ¥Ö€Õ¢Õ«Õ¡", + "RU": "Ռուսաստան", + "RW": "Ռուանդա", + "SA": "ÕÕ¡Õ¸Ö‚Õ¤ÕµÕ¡Õ¶ Ô±Ö€Õ¡Õ¢Õ«Õ¡", + "SB": "ÕÕ¸Õ²Õ¸Õ´Õ¸Õ¶ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "SC": "ÕÕ¥ÕµÕ·Õ¥Õ¬Õ¶Õ¥Ö€", + "SD": "ÕÕ¸Ö‚Õ¤Õ¡Õ¶", + "SE": "Õ‡Õ¾Õ¥Õ¤Õ«Õ¡", + "SG": "ÕÕ«Õ¶Õ£Õ¡ÕºÕ¸Ö‚Ö€", + "SH": "ÕÕ¸Ö‚Ö€Õ¢ Õ€Õ¥Õ²Õ«Õ¶Õ¥Õ« Õ¯Õ²Õ¦Õ«", + "SI": "ÕÕ¬Õ¸Õ¾Õ¥Õ¶Õ«Õ¡", + "SJ": "ÕÕ¾Õ¡Õ¬Õ¢Õ¡Ö€Õ¤ Ö‡ Õ…Õ¡Õ¶ Õ„Õ¡ÕµÕ¥Õ¶", + "SK": "ÕÕ¬Õ¸Õ¾Õ¡Õ¯Õ«Õ¡", + "SL": "ÕÕ«Õ¥Õ¼Õ¡ Ô¼Õ¥Õ¸Õ¶Õ¥", + "SM": "ÕÕ¡Õ¶ Õ„Õ¡Ö€Õ«Õ¶Õ¸", + "SN": "ÕÕ¥Õ¶Õ¥Õ£Õ¡Õ¬", + "SO": "ÕÕ¸Õ´Õ¡Õ¬Õ«", + "SR": "ÕÕ¸Ö‚Ö€Õ«Õ¶Õ¡Õ´", + "SS": "Õ€Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ ÕÕ¸Ö‚Õ¤Õ¡Õ¶", + "ST": "ÕÕ¡Õ¶ ÕÕ¸Õ´Õ¥ Ö‡ Õ“Ö€Õ«Õ¶Õ½Õ«ÕºÕ«", + "SV": "ÕÕ¡Õ¬Õ¾Õ¡Õ¤Õ¸Ö€", + "SX": "ÕÕ«Õ¶Õ¿ Õ„Õ¡Ö€Õ¿Õ¥Õ¶", + "SY": "ÕÕ«Ö€Õ«Õ¡", + "SZ": "ÕÕ¾Õ¡Õ¦Õ«Õ¬Õ¥Õ¶Õ¤", + "TA": "ÕÖ€Õ«Õ½Õ¿Õ¡Õ¶ Õ¤Õ¡ Ô¿Õ¸Ö‚Õ¶ÕµÕ¡", + "TC": "Ô¹Õ¨Ö€Ö„Õ½ Ö‡ Ô¿Õ¡ÕµÕ¯Õ¸Õ½ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "TD": "Õ‰Õ¡Õ¤", + "TF": "Õ–Ö€Õ¡Õ¶Õ½Õ«Õ¡Õ¯Õ¡Õ¶ Õ€Õ¡Ö€Õ¡Õ¾Õ¡ÕµÕ«Õ¶ ÕÕ¡Ö€Õ¡Õ®Ö„Õ¶Õ¥Ö€", + "TG": "ÕÕ¸Õ£Õ¸", + "TH": "Ô¹Õ¡ÕµÕ¬Õ¡Õ¶Õ¤", + "TJ": "ÕÕ¡Õ»Õ«Õ¯Õ½Õ¿Õ¡Õ¶", + "TK": "ÕÕ¸Õ¯Õ¥Õ¬Õ¡Õ¸Ö‚", + "TL": "Ô¹Õ«Õ´Õ¸Ö€ Ô¼Õ¥Õ·Õ¿Õ«", + "TM": "Ô¹Õ¸Ö‚Ö€Ö„Õ´Õ¥Õ¶Õ½Õ¿Õ¡Õ¶", + "TN": "Ô¹Õ¸Ö‚Õ¶Õ«Õ½", + "TO": "ÕÕ¸Õ¶Õ£Õ¡", + "TR": "Ô¹Õ¸Ö‚Ö€Ö„Õ«Õ¡", + "TT": "ÕÖ€Õ«Õ¶Õ«Õ¤Õ¡Õ¤ Ö‡ ÕÕ¸Õ¢Õ¡Õ£Õ¸", + "TV": "ÕÕ¸Ö‚Õ¾Õ¡Õ¬Õ¸Ö‚", + "TW": "Ô¹Õ¡ÕµÕ¾Õ¡Õ¶", + "TZ": "ÕÕ¡Õ¶Õ¦Õ¡Õ¶Õ«Õ¡", + "UA": "ÕˆÖ‚Õ¯Ö€Õ¡Õ«Õ¶Õ¡", + "UG": "ÕˆÖ‚Õ£Õ¡Õ¶Õ¤Õ¡", + "UM": "Ô±Ö€Õ¿Õ¡Ö„Õ«Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€ (Ô±Õ„Õ†)", + "UN": "Õ„Õ«Õ¡Õ¾Õ¸Ö€Õ¾Õ¡Õ® Õ¡Õ¦Õ£Õ¥Ö€Õ« Õ¯Õ¡Õ¦Õ´Õ¡Õ¯Õ¥Ö€ÕºÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶", + "US": "Õ„Õ«Õ¡ÖÕµÕ¡Õ¬ Õ†Õ¡Õ°Õ¡Õ¶Õ£Õ¶Õ¥Ö€", + "UY": "ÕˆÖ‚Ö€Õ¸Ö‚Õ£Õ¾Õ¡Õµ", + "UZ": "ÕˆÖ‚Õ¦Õ¢Õ¥Õ¯Õ½Õ¿Õ¡Õ¶", + "VA": "ÕŽÕ¡Õ¿Õ«Õ¯Õ¡Õ¶", + "VC": "ÕÕ¥Õ¶Õ© ÕŽÕ«Õ¶Õ½Õ¥Õ¶Õ© Ö‡ Ô³Ö€Õ¥Õ¶Õ¡Õ¤Õ«Õ¶Õ¶Õ¥Ö€", + "VE": "ÕŽÕ¥Õ¶Õ¥Õ½Õ¸Ö‚Õ¥Õ¬Õ¡", + "VG": "Ô²Ö€Õ«Õ¿Õ¡Õ¶Õ¡Õ¯Õ¡Õ¶ ÕŽÕ«Ö€Õ»Õ«Õ¶ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "VI": "Ô±Õ„Õ† ÕŽÕ«Ö€Õ»Õ«Õ¶ÕµÕ¡Õ¶ Õ¯Õ²Õ¦Õ«Õ¶Õ¥Ö€", + "VN": "ÕŽÕ«Õ¥Õ¿Õ¶Õ¡Õ´", + "VU": "ÕŽÕ¡Õ¶Õ¸Ö‚Õ¡Õ¿Õ¸Ö‚", + "WF": "ÕˆÖ‚Õ¸Õ¬Õ«Õ½ Ö‡ Õ–Õ¸Ö‚Õ¿Õ¸Ö‚Õ¶Õ¡", + "WS": "ÕÕ¡Õ´Õ¸Õ¡", + "XK": "Ô¿Õ¸Õ½Õ¸Õ¾Õ¸", + "YE": "ÔµÕ´Õ¥Õ¶", + "YT": "Õ„Õ¡ÕµÕ¸Õ¿", + "ZA": "Õ€Õ¡Ö€Õ¡Õ¾Õ¡Ö†Ö€Õ«Õ¯ÕµÕ¡Õ¶ Õ€Õ¡Õ¶Ö€Õ¡ÕºÕ¥Õ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶", + "ZM": "Ô¶Õ¡Õ´Õ¢Õ«Õ¡", + "ZW": "Ô¶Õ«Õ´Õ¢Õ¡Õ¢Õ¾Õ¥" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/id.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/id.json new file mode 100644 index 0000000000000000000000000000000000000000..4d54933cc8cd385c7608e668bd5fa2f330022415 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/id.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Pulau Ascension", + "AD": "Andorra", + "AE": "Uni Emirat Arab", + "AF": "Afganistan", + "AG": "Antigua dan Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antartika", + "AR": "Argentina", + "AS": "Samoa Amerika", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Kepulauan Aland", + "AZ": "Azerbaijan", + "BA": "Bosnia dan Herzegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Karibia Belanda", + "BR": "Brasil", + "BS": "Bahama", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kepulauan Cocos (Keeling)", + "CD": "Kongo - Kinshasa", + "CF": "Republik Afrika Tengah", + "CG": "Kongo - Brazzaville", + "CH": "Swiss", + "CI": "Cote d’Ivoire", + "CK": "Kepulauan Cook", + "CL": "Cile", + "CM": "Kamerun", + "CN": "Tiongkok", + "CO": "Kolombia", + "CR": "Kosta Rika", + "CU": "Kuba", + "CV": "Tanjung Verde", + "CW": "Curaçao", + "CX": "Pulau Christmas", + "CY": "Siprus", + "CZ": "Republik Cheska", + "DE": "Jerman", + "DG": "Diego Garcia", + "DJ": "Jibuti", + "DK": "Denmark", + "DM": "Dominika", + "DO": "Republik Dominika", + "DZ": "Aljazair", + "EA": "Ceuta dan Melilla", + "EC": "Ekuador", + "EE": "Estonia", + "EG": "Mesir", + "EH": "Sahara Barat", + "ER": "Eritrea", + "ES": "Spanyol", + "ET": "Etiopia", + "FI": "Finlandia", + "FJ": "Fiji", + "FK": "Kepulauan Malvinas", + "FM": "Mikronesia", + "FO": "Kepulauan Faroe", + "FR": "Prancis", + "GA": "Gabon", + "GB": "Inggris Raya", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Guyana Prancis", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grinlandia", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Guinea Ekuatorial", + "GR": "Yunani", + "GS": "Georgia Selatan & Kep. Sandwich Selatan", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hong Kong SAR Tiongkok", + "HN": "Honduras", + "HR": "Kroasia", + "HT": "Haiti", + "HU": "Hungaria", + "IC": "Kepulauan Canary", + "ID": "Indonesia", + "IE": "Irlandia", + "IL": "Israel", + "IM": "Pulau Man", + "IN": "India", + "IO": "Wilayah Inggris di Samudra Hindia", + "IQ": "Irak", + "IR": "Iran", + "IS": "Islandia", + "IT": "Italia", + "JE": "Jersey", + "JM": "Jamaika", + "JO": "Yordania", + "JP": "Jepang", + "KE": "Kenya", + "KG": "Kirgistan", + "KH": "Kamboja", + "KI": "Kiribati", + "KM": "Komoro", + "KN": "Saint Kitts dan Nevis", + "KP": "Korea Utara", + "KR": "Korea Selatan", + "KW": "Kuwait", + "KY": "Kepulauan Cayman", + "KZ": "Kazakstan", + "LA": "Laos", + "LB": "Lebanon", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lituania", + "LU": "Luksemburg", + "LV": "Latvia", + "LY": "Libia", + "MA": "Maroko", + "MC": "Monako", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "Saint Martin", + "MG": "Madagaskar", + "MH": "Kepulauan Marshall", + "MK": "Makedonia", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongolia", + "MO": "Makau SAR Tiongkok", + "MP": "Kepulauan Mariana Utara", + "MQ": "Martinik", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maladewa", + "MW": "Malawi", + "MX": "Meksiko", + "MY": "Malaysia", + "MZ": "Mozambik", + "NA": "Namibia", + "NC": "Kaledonia Baru", + "NE": "Niger", + "NF": "Kepulauan Norfolk", + "NG": "Nigeria", + "NI": "Nikaragua", + "NL": "Belanda", + "NO": "Norwegia", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Selandia Baru", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Polinesia Prancis", + "PG": "Papua Nugini", + "PH": "Filipina", + "PK": "Pakistan", + "PL": "Polandia", + "PM": "Saint Pierre dan Miquelon", + "PN": "Kepulauan Pitcairn", + "PR": "Puerto Riko", + "PS": "Wilayah Palestina", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Rumania", + "RS": "Serbia", + "RU": "Rusia", + "RW": "Rwanda", + "SA": "Arab Saudi", + "SB": "Kepulauan Solomon", + "SC": "Seychelles", + "SD": "Sudan", + "SE": "Swedia", + "SG": "Singapura", + "SH": "Saint Helena", + "SI": "Slovenia", + "SJ": "Kepulauan Svalbard dan Jan Mayen", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "SS": "Sudan Selatan", + "ST": "Sao Tome dan Principe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Suriah", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Kepulauan Turks dan Caicos", + "TD": "Cad", + "TF": "Wilayah Kutub Selatan Prancis", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tajikistan", + "TK": "Tokelau", + "TL": "Timor Leste", + "TM": "Turkimenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Turki", + "TT": "Trinidad dan Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "Kepulauan Terluar A.S.", + "UN": "Perserikatan Bangsa-Bangsa", + "US": "Amerika Serikat", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VA": "Vatikan", + "VC": "Saint Vincent dan Grenadines", + "VE": "Venezuela", + "VG": "Kepulauan Virgin Inggris", + "VI": "Kepulauan Virgin A.S.", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Kepulauan Wallis dan Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yaman", + "YT": "Mayotte", + "ZA": "Afrika Selatan", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ig.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ig.json new file mode 100644 index 0000000000000000000000000000000000000000..1c8d76a7bc783367806deca2c2d43151731f3c1e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ig.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.84", + "Names": { + "BJ": "Binin", + "BM": "Bemuda", + "CN": "Chaina", + "HT": "Hati", + "KM": "Comorosu", + "LY": "Libyia", + "MV": "Maldivesa", + "NG": "Nigeria" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ii.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ii.json new file mode 100644 index 0000000000000000000000000000000000000000..cc409962c88221cd40f6a221092ebde84e1925d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ii.json @@ -0,0 +1,15 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BR": "ꀠꑭ", + "CN": "êꇩ", + "DE": "ꄓꇩ", + "FR": "ꃔꇩ", + "GB": "ꑱꇩ", + "IN": "ê‘´ê„—", + "IT": "ꑴꄊꆺ", + "JP": "êꀪ", + "RU": "ꊉꇆꌦ", + "US": "ꂰꇩ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/in.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/in.json new file mode 100644 index 0000000000000000000000000000000000000000..4d54933cc8cd385c7608e668bd5fa2f330022415 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/in.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Pulau Ascension", + "AD": "Andorra", + "AE": "Uni Emirat Arab", + "AF": "Afganistan", + "AG": "Antigua dan Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antartika", + "AR": "Argentina", + "AS": "Samoa Amerika", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Kepulauan Aland", + "AZ": "Azerbaijan", + "BA": "Bosnia dan Herzegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Karibia Belanda", + "BR": "Brasil", + "BS": "Bahama", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kepulauan Cocos (Keeling)", + "CD": "Kongo - Kinshasa", + "CF": "Republik Afrika Tengah", + "CG": "Kongo - Brazzaville", + "CH": "Swiss", + "CI": "Cote d’Ivoire", + "CK": "Kepulauan Cook", + "CL": "Cile", + "CM": "Kamerun", + "CN": "Tiongkok", + "CO": "Kolombia", + "CR": "Kosta Rika", + "CU": "Kuba", + "CV": "Tanjung Verde", + "CW": "Curaçao", + "CX": "Pulau Christmas", + "CY": "Siprus", + "CZ": "Republik Cheska", + "DE": "Jerman", + "DG": "Diego Garcia", + "DJ": "Jibuti", + "DK": "Denmark", + "DM": "Dominika", + "DO": "Republik Dominika", + "DZ": "Aljazair", + "EA": "Ceuta dan Melilla", + "EC": "Ekuador", + "EE": "Estonia", + "EG": "Mesir", + "EH": "Sahara Barat", + "ER": "Eritrea", + "ES": "Spanyol", + "ET": "Etiopia", + "FI": "Finlandia", + "FJ": "Fiji", + "FK": "Kepulauan Malvinas", + "FM": "Mikronesia", + "FO": "Kepulauan Faroe", + "FR": "Prancis", + "GA": "Gabon", + "GB": "Inggris Raya", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Guyana Prancis", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grinlandia", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Guinea Ekuatorial", + "GR": "Yunani", + "GS": "Georgia Selatan & Kep. Sandwich Selatan", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hong Kong SAR Tiongkok", + "HN": "Honduras", + "HR": "Kroasia", + "HT": "Haiti", + "HU": "Hungaria", + "IC": "Kepulauan Canary", + "ID": "Indonesia", + "IE": "Irlandia", + "IL": "Israel", + "IM": "Pulau Man", + "IN": "India", + "IO": "Wilayah Inggris di Samudra Hindia", + "IQ": "Irak", + "IR": "Iran", + "IS": "Islandia", + "IT": "Italia", + "JE": "Jersey", + "JM": "Jamaika", + "JO": "Yordania", + "JP": "Jepang", + "KE": "Kenya", + "KG": "Kirgistan", + "KH": "Kamboja", + "KI": "Kiribati", + "KM": "Komoro", + "KN": "Saint Kitts dan Nevis", + "KP": "Korea Utara", + "KR": "Korea Selatan", + "KW": "Kuwait", + "KY": "Kepulauan Cayman", + "KZ": "Kazakstan", + "LA": "Laos", + "LB": "Lebanon", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lituania", + "LU": "Luksemburg", + "LV": "Latvia", + "LY": "Libia", + "MA": "Maroko", + "MC": "Monako", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "Saint Martin", + "MG": "Madagaskar", + "MH": "Kepulauan Marshall", + "MK": "Makedonia", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongolia", + "MO": "Makau SAR Tiongkok", + "MP": "Kepulauan Mariana Utara", + "MQ": "Martinik", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maladewa", + "MW": "Malawi", + "MX": "Meksiko", + "MY": "Malaysia", + "MZ": "Mozambik", + "NA": "Namibia", + "NC": "Kaledonia Baru", + "NE": "Niger", + "NF": "Kepulauan Norfolk", + "NG": "Nigeria", + "NI": "Nikaragua", + "NL": "Belanda", + "NO": "Norwegia", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Selandia Baru", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Polinesia Prancis", + "PG": "Papua Nugini", + "PH": "Filipina", + "PK": "Pakistan", + "PL": "Polandia", + "PM": "Saint Pierre dan Miquelon", + "PN": "Kepulauan Pitcairn", + "PR": "Puerto Riko", + "PS": "Wilayah Palestina", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Rumania", + "RS": "Serbia", + "RU": "Rusia", + "RW": "Rwanda", + "SA": "Arab Saudi", + "SB": "Kepulauan Solomon", + "SC": "Seychelles", + "SD": "Sudan", + "SE": "Swedia", + "SG": "Singapura", + "SH": "Saint Helena", + "SI": "Slovenia", + "SJ": "Kepulauan Svalbard dan Jan Mayen", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "SS": "Sudan Selatan", + "ST": "Sao Tome dan Principe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Suriah", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Kepulauan Turks dan Caicos", + "TD": "Cad", + "TF": "Wilayah Kutub Selatan Prancis", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tajikistan", + "TK": "Tokelau", + "TL": "Timor Leste", + "TM": "Turkimenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Turki", + "TT": "Trinidad dan Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "Kepulauan Terluar A.S.", + "UN": "Perserikatan Bangsa-Bangsa", + "US": "Amerika Serikat", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VA": "Vatikan", + "VC": "Saint Vincent dan Grenadines", + "VE": "Venezuela", + "VG": "Kepulauan Virgin Inggris", + "VI": "Kepulauan Virgin A.S.", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Kepulauan Wallis dan Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yaman", + "YT": "Mayotte", + "ZA": "Afrika Selatan", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/is.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/is.json new file mode 100644 index 0000000000000000000000000000000000000000..5970e4afa4c74a92de5dcf3b94ba9be7ab7ce040 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/is.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.65", + "Names": { + "AC": "Ascension-eyja", + "AD": "Andorra", + "AE": "Sameinuðu arabísku furstadæmin", + "AF": "Afganistan", + "AG": "Antígva og Barbúda", + "AI": "Angvilla", + "AL": "Albanía", + "AM": "Armenía", + "AO": "Angóla", + "AQ": "Suðurskautslandið", + "AR": "Argentína", + "AS": "Bandaríska Samóa", + "AT": "Austurríki", + "AU": "Ãstralía", + "AW": "Arúba", + "AX": "Ãlandseyjar", + "AZ": "Aserbaídsjan", + "BA": "Bosnía og Hersegóvína", + "BB": "Barbados", + "BD": "Bangladess", + "BE": "Belgía", + "BF": "Búrkína Fasó", + "BG": "Búlgaría", + "BH": "Barein", + "BI": "Búrúndí", + "BJ": "Benín", + "BL": "Sankti Bartólómeusareyjar", + "BM": "Bermúdaeyjar", + "BN": "Brúnei", + "BO": "Bólivía", + "BQ": "Karíbahafshluti Hollands", + "BR": "Brasilía", + "BS": "Bahamaeyjar", + "BT": "Bútan", + "BW": "Botsvana", + "BY": "Hvíta-Rússland", + "BZ": "Belís", + "CA": "Kanada", + "CC": "Kókoseyjar (Keeling)", + "CD": "Kongó-Kinshasa", + "CF": "Mið-Afríkulýðveldið", + "CG": "Kongó-Brazzaville", + "CH": "Sviss", + "CI": "Fílabeinsströndin", + "CK": "Cooks-eyjar", + "CL": "Síle", + "CM": "Kamerún", + "CN": "Kína", + "CO": "Kólumbía", + "CR": "Kostaríka", + "CU": "Kúba", + "CV": "Grænhöfðaeyjar", + "CW": "Curacao", + "CX": "Jólaey", + "CY": "Kýpur", + "CZ": "Tékkland", + "DE": "Þýskaland", + "DG": "Diego Garcia", + "DJ": "Djíbútí", + "DK": "Danmörk", + "DM": "Dóminíka", + "DO": "Dóminíska lýðveldið", + "DZ": "Alsír", + "EA": "Ceuta og Melilla", + "EC": "Ekvador", + "EE": "Eistland", + "EG": "Egyptaland", + "EH": "Vestur-Sahara", + "ER": "Erítrea", + "ES": "Spánn", + "ET": "Eþíópía", + "FI": "Finnland", + "FJ": "Fídjíeyjar", + "FK": "Falklandseyjar", + "FM": "Míkrónesía", + "FO": "Færeyjar", + "FR": "Frakkland", + "GA": "Gabon", + "GB": "Bretland", + "GD": "Grenada", + "GE": "Georgía", + "GF": "Franska Gvæjana", + "GG": "Guernsey", + "GH": "Gana", + "GI": "Gíbraltar", + "GL": "Grænland", + "GM": "Gambía", + "GN": "Gínea", + "GP": "Gvadelúpeyjar", + "GQ": "Miðbaugs-Gínea", + "GR": "Grikkland", + "GS": "Suður-Georgía og Suður-Sandvíkureyjar", + "GT": "Gvatemala", + "GU": "Gvam", + "GW": "Gínea-Bissá", + "GY": "Gvæjana", + "HK": "Sjálfstjórnarsvæðið Hong Kong", + "HN": "Hondúras", + "HR": "Króatía", + "HT": "Haítí", + "HU": "Ungverjaland", + "IC": "Kanaríeyjar", + "ID": "Indónesía", + "IE": "Ãrland", + "IL": "Ãsrael", + "IM": "Mön", + "IN": "Indland", + "IO": "Bresku Indlandshafseyjar", + "IQ": "Ãrak", + "IR": "Ãran", + "IS": "Ãsland", + "IT": "Ãtalía", + "JE": "Jersey", + "JM": "Jamaíka", + "JO": "Jórdanía", + "JP": "Japan", + "KE": "Kenía", + "KG": "Kirgistan", + "KH": "Kambódía", + "KI": "Kíribatí", + "KM": "Kómoreyjar", + "KN": "Sankti Kitts og Nevis", + "KP": "Norður-Kórea", + "KR": "Suður-Kórea", + "KW": "Kúveit", + "KY": "Caymaneyjar", + "KZ": "Kasakstan", + "LA": "Laos", + "LB": "Líbanon", + "LC": "Sankti Lúsía", + "LI": "Liechtenstein", + "LK": "Srí Lanka", + "LR": "Líbería", + "LS": "Lesótó", + "LT": "Litháen", + "LU": "Lúxemborg", + "LV": "Lettland", + "LY": "Líbía", + "MA": "Marokkó", + "MC": "Mónakó", + "MD": "Moldóva", + "ME": "Svartfjallaland", + "MF": "St. Martin", + "MG": "Madagaskar", + "MH": "Marshalleyjar", + "MK": "Makedónía", + "ML": "Malí", + "MM": "Mjanmar (Búrma)", + "MN": "Mongólía", + "MO": "Sjálfstjórnarsvæðið Makaó", + "MP": "Norður-Maríanaeyjar", + "MQ": "Martiník", + "MR": "Máritanía", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Máritíus", + "MV": "Maldíveyjar", + "MW": "Malaví", + "MX": "Mexíkó", + "MY": "Malasía", + "MZ": "Mósambík", + "NA": "Namibía", + "NC": "Nýja-Kaledónía", + "NE": "Níger", + "NF": "Norfolkeyja", + "NG": "Nígería", + "NI": "Níkaragva", + "NL": "Holland", + "NO": "Noregur", + "NP": "Nepal", + "NR": "Nárú", + "NU": "Niue", + "NZ": "Nýja-Sjáland", + "OM": "Óman", + "PA": "Panama", + "PE": "Perú", + "PF": "Franska Pólýnesía", + "PG": "Papúa Nýja-Gínea", + "PH": "Filippseyjar", + "PK": "Pakistan", + "PL": "Pólland", + "PM": "Sankti Pierre og Miquelon", + "PN": "Pitcairn-eyjar", + "PR": "Púertó Ríkó", + "PS": "Heimastjórnarsvæði Palestínumanna", + "PT": "Portúgal", + "PW": "Palá", + "PY": "Paragvæ", + "QA": "Katar", + "RE": "Réunion", + "RO": "Rúmenía", + "RS": "Serbía", + "RU": "Rússland", + "RW": "Rúanda", + "SA": "Sádi-Arabía", + "SB": "Salómonseyjar", + "SC": "Seychelles-eyjar", + "SD": "Súdan", + "SE": "Svíþjóð", + "SG": "Singapúr", + "SH": "Sankti Helena", + "SI": "Slóvenía", + "SJ": "Svalbarði og Jan Mayen", + "SK": "Slóvakía", + "SL": "Síerra Leóne", + "SM": "San Marínó", + "SN": "Senegal", + "SO": "Sómalía", + "SR": "Súrínam", + "SS": "Suður-Súdan", + "ST": "Saó Tóme og Prinsípe", + "SV": "El Salvador", + "SX": "Sankti Martin", + "SY": "Sýrland", + "SZ": "Svasíland", + "TA": "Tristan da Cunha", + "TC": "Turks- og Caicoseyjar", + "TD": "Tsjad", + "TF": "Frönsku suðlægu landsvæðin", + "TG": "Tógó", + "TH": "Taíland", + "TJ": "Tadsjikistan", + "TK": "Tókelá", + "TL": "Tímor-Leste", + "TM": "Túrkmenistan", + "TN": "Túnis", + "TO": "Tonga", + "TR": "Tyrkland", + "TT": "Trínidad og Tóbagó", + "TV": "Túvalú", + "TW": "Taívan", + "TZ": "Tansanía", + "UA": "Úkraína", + "UG": "Úganda", + "UM": "Smáeyjar Bandaríkjanna", + "UN": "Sameinuðu þjóðirnar", + "US": "Bandaríkin", + "UY": "Úrúgvæ", + "UZ": "Úsbekistan", + "VA": "Vatíkanið", + "VC": "Sankti Vinsent og Grenadíneyjar", + "VE": "Venesúela", + "VG": "Bresku Jómfrúaeyjar", + "VI": "Bandarísku Jómfrúaeyjar", + "VN": "Víetnam", + "VU": "Vanúatú", + "WF": "Wallis- og Fútúnaeyjar", + "WS": "Samóa", + "XK": "Kósóvó", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Suður-Afríka", + "ZM": "Sambía", + "ZW": "Simbabve" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/it.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/it.json new file mode 100644 index 0000000000000000000000000000000000000000..f4e71a8fe8f7187703dffa037c12ac4e61eb87df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/it.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Isola Ascensione", + "AD": "Andorra", + "AE": "Emirati Arabi Uniti", + "AF": "Afghanistan", + "AG": "Antigua e Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antartide", + "AR": "Argentina", + "AS": "Samoa americane", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Isole Ã…land", + "AZ": "Azerbaigian", + "BA": "Bosnia ed Erzegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgio", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint-Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Caraibi olandesi", + "BR": "Brasile", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Bielorussia", + "BZ": "Belize", + "CA": "Canada", + "CC": "Isole Cocos (Keeling)", + "CD": "Congo - Kinshasa", + "CF": "Repubblica Centrafricana", + "CG": "Congo-Brazzaville", + "CH": "Svizzera", + "CI": "Costa d’Avorio", + "CK": "Isole Cook", + "CL": "Cile", + "CM": "Camerun", + "CN": "Cina", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Capo Verde", + "CW": "Curaçao", + "CX": "Isola Christmas", + "CY": "Cipro", + "CZ": "Repubblica Ceca", + "DE": "Germania", + "DG": "Diego Garcia", + "DJ": "Gibuti", + "DK": "Danimarca", + "DM": "Dominica", + "DO": "Repubblica Dominicana", + "DZ": "Algeria", + "EA": "Ceuta e Melilla", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Egitto", + "EH": "Sahara occidentale", + "ER": "Eritrea", + "ES": "Spagna", + "ET": "Etiopia", + "FI": "Finlandia", + "FJ": "Figi", + "FK": "Isole Falkland", + "FM": "Micronesia", + "FO": "Isole Fær Øer", + "FR": "Francia", + "GA": "Gabon", + "GB": "Regno Unito", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Guyana francese", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibilterra", + "GL": "Groenlandia", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadalupa", + "GQ": "Guinea Equatoriale", + "GR": "Grecia", + "GS": "Georgia del Sud e Sandwich australi", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "RAS di Hong Kong", + "HN": "Honduras", + "HR": "Croazia", + "HT": "Haiti", + "HU": "Ungheria", + "IC": "Isole Canarie", + "ID": "Indonesia", + "IE": "Irlanda", + "IL": "Israele", + "IM": "Isola di Man", + "IN": "India", + "IO": "Territorio britannico dell’Oceano Indiano", + "IQ": "Iraq", + "IR": "Iran", + "IS": "Islanda", + "IT": "Italia", + "JE": "Jersey", + "JM": "Giamaica", + "JO": "Giordania", + "JP": "Giappone", + "KE": "Kenya", + "KG": "Kirghizistan", + "KH": "Cambogia", + "KI": "Kiribati", + "KM": "Comore", + "KN": "Saint Kitts e Nevis", + "KP": "Corea del Nord", + "KR": "Corea del Sud", + "KW": "Kuwait", + "KY": "Isole Cayman", + "KZ": "Kazakistan", + "LA": "Laos", + "LB": "Libano", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lituania", + "LU": "Lussemburgo", + "LV": "Lettonia", + "LY": "Libia", + "MA": "Marocco", + "MC": "Monaco", + "MD": "Moldavia", + "ME": "Montenegro", + "MF": "Saint Martin", + "MG": "Madagascar", + "MH": "Isole Marshall", + "MK": "Repubblica di Macedonia", + "ML": "Mali", + "MM": "Myanmar (Birmania)", + "MN": "Mongolia", + "MO": "RAS di Macao", + "MP": "Isole Marianne settentrionali", + "MQ": "Martinica", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldive", + "MW": "Malawi", + "MX": "Messico", + "MY": "Malaysia", + "MZ": "Mozambico", + "NA": "Namibia", + "NC": "Nuova Caledonia", + "NE": "Niger", + "NF": "Isola Norfolk", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Paesi Bassi", + "NO": "Norvegia", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nuova Zelanda", + "OM": "Oman", + "PA": "Panamá", + "PE": "Perù", + "PF": "Polinesia francese", + "PG": "Papua Nuova Guinea", + "PH": "Filippine", + "PK": "Pakistan", + "PL": "Polonia", + "PM": "Saint Pierre e Miquelon", + "PN": "Isole Pitcairn", + "PR": "Portorico", + "PS": "Territori palestinesi", + "PT": "Portogallo", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Riunione", + "RO": "Romania", + "RS": "Serbia", + "RU": "Russia", + "RW": "Ruanda", + "SA": "Arabia Saudita", + "SB": "Isole Salomone", + "SC": "Seychelles", + "SD": "Sudan", + "SE": "Svezia", + "SG": "Singapore", + "SH": "Sant’Elena", + "SI": "Slovenia", + "SJ": "Svalbard e Jan Mayen", + "SK": "Slovacchia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "SS": "Sud Sudan", + "ST": "São Tomé e Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Siria", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Isole Turks e Caicos", + "TD": "Ciad", + "TF": "Terre australi francesi", + "TG": "Togo", + "TH": "Thailandia", + "TJ": "Tagikistan", + "TK": "Tokelau", + "TL": "Timor Leste", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Turchia", + "TT": "Trinidad e Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ucraina", + "UG": "Uganda", + "UM": "Altre isole americane del Pacifico", + "UN": "nazioni unite", + "US": "Stati Uniti", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VA": "Città del Vaticano", + "VC": "Saint Vincent e Grenadines", + "VE": "Venezuela", + "VG": "Isole Vergini Britanniche", + "VI": "Isole Vergini Americane", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis e Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yemen", + "YT": "Mayotte", + "ZA": "Sudafrica", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/iw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/iw.json new file mode 100644 index 0000000000000000000000000000000000000000..5828bb31adf8f391539544b6b793c6dde798593e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/iw.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.27", + "Names": { + "AC": "×”××™ ×סנשן", + "AD": "×נדורה", + "AE": "×יחוד ×”×מירויות הערביות", + "AF": "×פגניסטן", + "AG": "×נטיגו××” וברבודה", + "AI": "×נגילה", + "AL": "×לבניה", + "AM": "×רמניה", + "AO": "×נגולה", + "AQ": "×נט×רקטיקה", + "AR": "×רגנטינה", + "AS": "סמו××” ×”×מריקנית", + "AT": "×וסטריה", + "AU": "×וסטרליה", + "AW": "×רובה", + "AX": "××™×™ ×ולנד", + "AZ": "×זרבייג׳ן", + "BA": "בוסניה והרצגובינה", + "BB": "ברבדוס", + "BD": "בנגלדש", + "BE": "בלגיה", + "BF": "בורקינה פ×סו", + "BG": "בולגריה", + "BH": "בחריין", + "BI": "בורונדי", + "BJ": "בנין", + "BL": "סנט ברתולומי×ו", + "BM": "ברמודה", + "BN": "ברוניי", + "BO": "בוליביה", + "BQ": "×”××™×™× ×”×§×¨×™×‘×™×™× ×”×”×•×œ× ×“×™×™×", + "BR": "ברזיל", + "BS": "××™×™ בה×מה", + "BT": "בהוטן", + "BW": "בוצוו×× ×”", + "BY": "בל×רוס", + "BZ": "בליז", + "CA": "קנדה", + "CC": "××™×™ קוקוס (קילינג)", + "CD": "קונגו - קינש×סה", + "CF": "הרפובליקה של מרכז ×פריקה", + "CG": "קונגו - ברז×ויל", + "CH": "שווייץ", + "CI": "חוף השנהב", + "CK": "××™×™ קוק", + "CL": "צ׳ילה", + "CM": "קמרון", + "CN": "סין", + "CO": "קולומביה", + "CR": "קוסטה ריקה", + "CU": "קובה", + "CV": "×›×£ ורדה", + "CW": "קור×ס×ו", + "CX": "×”××™ כריסטמס", + "CY": "קפריסין", + "CZ": "הרפובליקה הצ׳כית", + "DE": "גרמניה", + "DG": "דייגו גרסיה", + "DJ": "ג׳יבוטי", + "DK": "דנמרק", + "DM": "דומיניקה", + "DO": "הרפובליקה הדומיניקנית", + "DZ": "×לג׳יריה", + "EA": "ס×וטה ומלייה", + "EC": "×קוודור", + "EE": "×סטוניה", + "EG": "מצרי×", + "EH": "סהרה המערבית", + "ER": "×ריתרי××”", + "ES": "ספרד", + "ET": "×תיופיה", + "FI": "פינלנד", + "FJ": "פיג׳י", + "FK": "××™×™ פוקלנד", + "FM": "מיקרונזיה", + "FO": "××™×™ פ×רו", + "FR": "צרפת", + "GA": "גבון", + "GB": "הממלכה המ×וחדת", + "GD": "גרנדה", + "GE": "×’×ורגיה", + "GF": "×’×™×× ×” הצרפתית", + "GG": "גרנסי", + "GH": "×’×× ×”", + "GI": "גיברלטר", + "GL": "גרינלנד", + "GM": "גמביה", + "GN": "×’×™× ××”", + "GP": "גוו×דלופ", + "GQ": "×’×™× ××” המשוונית", + "GR": "יוון", + "GS": "ג׳ורג׳יה הדרומית ו××™×™ סנדוויץ׳ הדרומיי×", + "GT": "גו×טמלה", + "GU": "גו××", + "GW": "×’×™× ××” ביס×ו", + "GY": "×’×™×× ×”", + "HK": "הונג קונג (מחוז מנהלי מיוחד של סין)", + "HN": "הונדורס", + "HR": "קרו×טיה", + "HT": "×”×יטי", + "HU": "הונגריה", + "IC": "×”××™×™× ×”×§× ×¨×™×™×", + "ID": "×ינדונזיה", + "IE": "×ירלנד", + "IL": "ישר×ל", + "IM": "×”××™ מ×ן", + "IN": "הודו", + "IO": "הטריטוריה הבריטית ב×וקיינוס ההודי", + "IQ": "עיר××§", + "IR": "×יר×ן", + "IS": "×יסלנד", + "IT": "×יטליה", + "JE": "ג׳רסי", + "JM": "ג׳מייקה", + "JO": "ירדן", + "JP": "יפן", + "KE": "×§× ×™×”", + "KG": "קירגיזסטן", + "KH": "קמבודיה", + "KI": "קיריב×טי", + "KM": "קומורו", + "KN": "סנט קיטס ונוויס", + "KP": "קורי××” הצפונית", + "KR": "קורי××” הדרומית", + "KW": "כווית", + "KY": "××™×™ קיימן", + "KZ": "קזחסטן", + "LA": "ל×וס", + "LB": "לבנון", + "LC": "סנט לוסיה", + "LI": "ליכטנשטיין", + "LK": "סרי לנקה", + "LR": "ליבריה", + "LS": "לסוטו", + "LT": "ליט×", + "LU": "לוקסמבורג", + "LV": "לטביה", + "LY": "לוב", + "MA": "מרוקו", + "MC": "מונקו", + "MD": "מולדובה", + "ME": "מונטנגרו", + "MF": "סן מרטן", + "MG": "מדגסקר", + "MH": "××™×™ מרשל", + "MK": "מקדוניה", + "ML": "מ×לי", + "MM": "מי×נמר (בורמה)", + "MN": "מונגוליה", + "MO": "מק×ו (מחוז מנהלי מיוחד של סין)", + "MP": "××™×™ מרי×× ×” הצפוניי×", + "MQ": "מרטיניק", + "MR": "מ×וריטניה", + "MS": "מונסר×ט", + "MT": "מלטה", + "MU": "מ×וריציוס", + "MV": "×”××™×™× ×”×ž×œ×“×™×‘×™×™×", + "MW": "מל×ווי", + "MX": "מקסיקו", + "MY": "מלזיה", + "MZ": "מוזמביק", + "NA": "נמיביה", + "NC": "קלדוניה החדשה", + "NE": "ניז׳ר", + "NF": "××™×™ נורפוק", + "NG": "ניגריה", + "NI": "ניקרגו××”", + "NL": "הולנד", + "NO": "נורווגיה", + "NP": "נפ×ל", + "NR": "× ×ורו", + "NU": "ניווה", + "NZ": "ניו זילנד", + "OM": "עומ×ן", + "PA": "פנמה", + "PE": "פרו", + "PF": "פולינזיה הצרפתית", + "PG": "פפו××” ×’×™× ××” החדשה", + "PH": "הפיליפיני×", + "PK": "פקיסטן", + "PL": "פולין", + "PM": "סנט פייר ומיקלון", + "PN": "××™×™ פיטקרן", + "PR": "פו×רטו ריקו", + "PS": "×”×©×˜×—×™× ×”×¤×œ×¡×˜×™× ×™×™×", + "PT": "פורטוגל", + "PW": "פל×ו", + "PY": "פרגוו××™", + "QA": "קט×ר", + "RE": "ר×וניון", + "RO": "רומניה", + "RS": "סרביה", + "RU": "רוסיה", + "RW": "רו×נדה", + "SA": "ערב הסעודית", + "SB": "××™×™ שלמה", + "SC": "××™×™ סיישל", + "SD": "סודן", + "SE": "שוודיה", + "SG": "סינגפור", + "SH": "סנט הלנה", + "SI": "סלובניה", + "SJ": "סוולב×רד וי×ן מ×יין", + "SK": "סלובקיה", + "SL": "סיירה ל×ונה", + "SM": "סן מרינו", + "SN": "סנגל", + "SO": "סומליה", + "SR": "סורינ×", + "SS": "×“×¨×•× ×¡×•×“×Ÿ", + "ST": "ס×ו טומה ופרינסיפה", + "SV": "×ל סלבדור", + "SX": "סנט מ×רטן", + "SY": "סוריה", + "SZ": "סווזילנד", + "TA": "טריסטן דה קונה", + "TC": "××™×™ טורקס וק×יקוס", + "TD": "צ׳×ד", + "TF": "הטריטוריות הדרומיות של צרפת", + "TG": "טוגו", + "TH": "ת×ילנד", + "TJ": "טג׳יקיסטן", + "TK": "טוקל×ו", + "TL": "טימור לסטה", + "TM": "טורקמניסטן", + "TN": "טוניסיה", + "TO": "טונגה", + "TR": "טורקיה", + "TT": "טרינידד וטובגו", + "TV": "טוב×לו", + "TW": "טייוו×ן", + "TZ": "טנזניה", + "UA": "×וקר××™× ×”", + "UG": "×וגנדה", + "UM": "×”××™×™× ×”×ž×¨×•×—×§×™× ×”×§×˜× ×™× ×©×œ ×רה״ב", + "UN": "×”×ומות המ×וחדות", + "US": "×רצות הברית", + "UY": "×ורוגוו××™", + "UZ": "×וזבקיסטן", + "VA": "הוותיקן", + "VC": "סנט וינסנט והגרנדיני×", + "VE": "ונצו×לה", + "VG": "××™×™ הבתולה הבריטיי×", + "VI": "××™×™ הבתולה של ×רצות הברית", + "VN": "וייטנ××", + "VU": "ונו×טו", + "WF": "××™×™ ווליס ופוטונה", + "WS": "סמו××”", + "XK": "קוסובו", + "YE": "תימן", + "YT": "מ×יוט", + "ZA": "×“×¨×•× ×פריקה", + "ZM": "זמביה", + "ZW": "זימבבו××”" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ja.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ja.json new file mode 100644 index 0000000000000000000000000000000000000000..7798d20a7aa12c2677e1989c17e2263a4d7ed503 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ja.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "アセンション島", + "AD": "アンドラ", + "AE": "アラブ首長国連邦", + "AF": "アフガニスタン", + "AG": "アンティグア・ãƒãƒ¼ãƒ–ーダ", + "AI": "アンギラ", + "AL": "アルãƒãƒ‹ã‚¢", + "AM": "アルメニア", + "AO": "アンゴラ", + "AQ": "å—æ¥µ", + "AR": "アルゼンãƒãƒ³", + "AS": "米領サモア", + "AT": "オーストリア", + "AU": "オーストラリア", + "AW": "アルãƒ", + "AX": "オーランド諸島", + "AZ": "アゼルãƒã‚¤ã‚¸ãƒ£ãƒ³", + "BA": "ボスニア・ヘルツェゴビナ", + "BB": "ãƒãƒ«ãƒãƒ‰ã‚¹", + "BD": "ãƒãƒ³ã‚°ãƒ©ãƒ‡ã‚·ãƒ¥", + "BE": "ベルギー", + "BF": "ブルキナファソ", + "BG": "ブルガリア", + "BH": "ãƒãƒ¼ãƒ¬ãƒ¼ãƒ³", + "BI": "ブルンジ", + "BJ": "ベナン", + "BL": "サン・ãƒãƒ«ãƒ†ãƒ«ãƒŸãƒ¼å³¶", + "BM": "ãƒãƒŸãƒ¥ãƒ¼ãƒ€", + "BN": "ブルãƒã‚¤", + "BO": "ボリビア", + "BQ": "オランダ領カリブ", + "BR": "ブラジル", + "BS": "ãƒãƒãƒž", + "BT": "ブータン", + "BW": "ボツワナ", + "BY": "ベラルーシ", + "BZ": "ベリーズ", + "CA": "カナダ", + "CC": "ココス(キーリング)諸島", + "CD": "コンゴ民主共和国(キンシャサ)", + "CF": "中央アフリカ共和国", + "CG": "コンゴ共和国(ブラザビル)", + "CH": "スイス", + "CI": "コートジボワール", + "CK": "クック諸島", + "CL": "ãƒãƒª", + "CM": "カメルーン", + "CN": "中国", + "CO": "コロンビア", + "CR": "コスタリカ", + "CU": "キューãƒ", + "CV": "カーボベルデ", + "CW": "キュラソー", + "CX": "クリスマス島", + "CY": "キプロス", + "CZ": "ãƒã‚§ã‚³å…±å’Œå›½", + "DE": "ドイツ", + "DG": "ディエゴガルシア島", + "DJ": "ジブãƒ", + "DK": "デンマーク", + "DM": "ドミニカ国", + "DO": "ドミニカ共和国", + "DZ": "アルジェリア", + "EA": "セウタ・メリリャ", + "EC": "エクアドル", + "EE": "エストニア", + "EG": "エジプト", + "EH": "西サãƒãƒ©", + "ER": "エリトリア", + "ES": "スペイン", + "ET": "エãƒã‚ªãƒ”ã‚¢", + "FI": "フィンランド", + "FJ": "フィジー", + "FK": "フォークランド諸島", + "FM": "ミクロãƒã‚·ã‚¢é€£é‚¦", + "FO": "フェロー諸島", + "FR": "フランス", + "GA": "ガボン", + "GB": "イギリス", + "GD": "グレナダ", + "GE": "ジョージア", + "GF": "ä»é ˜ã‚®ã‚¢ãƒŠ", + "GG": "ガーンジー", + "GH": "ガーナ", + "GI": "ジブラルタル", + "GL": "グリーンランド", + "GM": "ガンビア", + "GN": "ギニア", + "GP": "グアドループ", + "GQ": "赤é“ギニア", + "GR": "ギリシャ", + "GS": "å—ジョージア島・å—サンドイッãƒè«¸å³¶", + "GT": "グアテマラ", + "GU": "グアム", + "GW": "ギニアビサウ", + "GY": "ガイアナ", + "HK": "中è¯äººæ°‘共和国香港特別行政区", + "HN": "ホンジュラス", + "HR": "クロアãƒã‚¢", + "HT": "ãƒã‚¤ãƒ", + "HU": "ãƒãƒ³ã‚¬ãƒªãƒ¼", + "IC": "カナリア諸島", + "ID": "インドãƒã‚·ã‚¢", + "IE": "アイルランド", + "IL": "イスラエル", + "IM": "マン島", + "IN": "インド", + "IO": "英領インド洋地域", + "IQ": "イラク", + "IR": "イラン", + "IS": "アイスランド", + "IT": "イタリア", + "JE": "ジャージー", + "JM": "ジャマイカ", + "JO": "ヨルダン", + "JP": "日本", + "KE": "ケニア", + "KG": "キルギス", + "KH": "カンボジア", + "KI": "キリãƒã‚¹", + "KM": "コモロ", + "KN": "セントクリストファー・ãƒãƒ¼ãƒ´ã‚£ã‚¹", + "KP": "æœé®®æ°‘主主義人民共和国", + "KR": "大韓民国", + "KW": "クウェート", + "KY": "ケイマン諸島", + "KZ": "カザフスタン", + "LA": "ラオス", + "LB": "レãƒãƒŽãƒ³", + "LC": "セントルシア", + "LI": "リヒテンシュタイン", + "LK": "スリランカ", + "LR": "リベリア", + "LS": "レソト", + "LT": "リトアニア", + "LU": "ルクセンブルク", + "LV": "ラトビア", + "LY": "リビア", + "MA": "モロッコ", + "MC": "モナコ", + "MD": "モルドãƒ", + "ME": "モンテãƒã‚°ãƒ­", + "MF": "サン・マルタン", + "MG": "マダガスカル", + "MH": "マーシャル諸島", + "MK": "マケドニア", + "ML": "マリ", + "MM": "ミャンマー", + "MN": "モンゴル", + "MO": "中è¯äººæ°‘共和国マカオ特別行政区", + "MP": "北マリアナ諸島", + "MQ": "マルティニーク", + "MR": "モーリタニア", + "MS": "モントセラト", + "MT": "マルタ", + "MU": "モーリシャス", + "MV": "モルディブ", + "MW": "マラウイ", + "MX": "メキシコ", + "MY": "マレーシア", + "MZ": "モザンビーク", + "NA": "ナミビア", + "NC": "ニューカレドニア", + "NE": "ニジェール", + "NF": "ノーフォーク島", + "NG": "ナイジェリア", + "NI": "ニカラグア", + "NL": "オランダ", + "NO": "ノルウェー", + "NP": "ãƒãƒ‘ール", + "NR": "ナウル", + "NU": "ニウエ", + "NZ": "ニュージーランド", + "OM": "オマーン", + "PA": "パナマ", + "PE": "ペルー", + "PF": "ä»é ˜ãƒãƒªãƒã‚·ã‚¢", + "PG": "パプアニューギニア", + "PH": "フィリピン", + "PK": "パキスタン", + "PL": "ãƒãƒ¼ãƒ©ãƒ³ãƒ‰", + "PM": "サンピエール島・ミクロン島", + "PN": "ピトケアン諸島", + "PR": "プエルトリコ", + "PS": "パレスãƒãƒŠè‡ªæ²»åŒº", + "PT": "ãƒãƒ«ãƒˆã‚¬ãƒ«", + "PW": "パラオ", + "PY": "パラグアイ", + "QA": "カタール", + "RE": "レユニオン島", + "RO": "ルーマニア", + "RS": "セルビア", + "RU": "ロシア", + "RW": "ルワンダ", + "SA": "サウジアラビア", + "SB": "ソロモン諸島", + "SC": "セーシェル", + "SD": "スーダン", + "SE": "スウェーデン", + "SG": "シンガãƒãƒ¼ãƒ«", + "SH": "セントヘレナ", + "SI": "スロベニア", + "SJ": "スãƒãƒ¼ãƒ«ãƒãƒ«è«¸å³¶ãƒ»ãƒ¤ãƒ³ãƒžã‚¤ã‚¨ãƒ³å³¶", + "SK": "スロãƒã‚­ã‚¢", + "SL": "シエラレオãƒ", + "SM": "サンマリノ", + "SN": "ã‚»ãƒã‚¬ãƒ«", + "SO": "ソマリア", + "SR": "スリナム", + "SS": "å—スーダン", + "ST": "サントメ・プリンシペ", + "SV": "エルサルãƒãƒ‰ãƒ«", + "SX": "シント・マールテン", + "SY": "シリア", + "SZ": "スワジランド", + "TA": "トリスタン・ダ・クーニャ", + "TC": "タークス・カイコス諸島", + "TD": "ãƒãƒ£ãƒ‰", + "TF": "ä»é ˜æ¥µå—諸島", + "TG": "トーゴ", + "TH": "タイ", + "TJ": "タジキスタン", + "TK": "トケラウ", + "TL": "æ±ãƒ†ã‚£ãƒ¢ãƒ¼ãƒ«", + "TM": "トルクメニスタン", + "TN": "ãƒãƒ¥ãƒ‹ã‚¸ã‚¢", + "TO": "トンガ", + "TR": "トルコ", + "TT": "トリニダード・トãƒã‚´", + "TV": "ツãƒãƒ«", + "TW": "å°æ¹¾", + "TZ": "タンザニア", + "UA": "ウクライナ", + "UG": "ウガンダ", + "UM": "åˆè¡†å›½é ˜æœ‰å°é›¢å³¶", + "UN": "ã“ãã•ã„れんã”ã†", + "US": "アメリカåˆè¡†å›½", + "UY": "ウルグアイ", + "UZ": "ウズベキスタン", + "VA": "ãƒãƒã‚«ãƒ³å¸‚国", + "VC": "セントビンセントåŠã³ã‚°ãƒ¬ãƒŠãƒ‡ã‚£ãƒ¼ãƒ³è«¸å³¶", + "VE": "ベãƒã‚ºã‚¨ãƒ©", + "VG": "英領ヴァージン諸島", + "VI": "米領ヴァージン諸島", + "VN": "ベトナム", + "VU": "ãƒãƒŒã‚¢ãƒ„", + "WF": "ウォリス・フツナ", + "WS": "サモア", + "XK": "コソボ", + "YE": "イエメン", + "YT": "マヨット島", + "ZA": "å—アフリカ", + "ZM": "ザンビア", + "ZW": "ジンãƒãƒ–エ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ka.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ka.json new file mode 100644 index 0000000000000000000000000000000000000000..cc02581eb9a1839e94a9e291f80cff45622aed41 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ka.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.20", + "Names": { + "AC": "áƒáƒ›áƒáƒ¦áƒšáƒ”ბის კუნძული", + "AD": "áƒáƒœáƒ“áƒáƒ áƒ", + "AE": "áƒáƒ áƒáƒ‘თრგáƒáƒ”რთიáƒáƒœáƒ”ბული სáƒáƒáƒ›áƒ˜áƒ áƒáƒ”ბი", + "AF": "áƒáƒ•ღáƒáƒœáƒ”თი", + "AG": "áƒáƒœáƒ¢áƒ˜áƒ’ურდრბáƒáƒ áƒ‘უდáƒ", + "AI": "áƒáƒœáƒ’ვილáƒ", + "AL": "áƒáƒšáƒ‘áƒáƒœáƒ”თი", + "AM": "სáƒáƒ›áƒ®áƒ”თი", + "AO": "áƒáƒœáƒ’áƒáƒšáƒ", + "AQ": "áƒáƒœáƒ¢áƒáƒ áƒ¥áƒ¢áƒ˜áƒ™áƒ", + "AR": "áƒáƒ áƒ’ენტინáƒ", + "AS": "áƒáƒ›áƒ”რიკის სáƒáƒ›áƒáƒ", + "AT": "áƒáƒ•სტრიáƒ", + "AU": "áƒáƒ•სტრáƒáƒšáƒ˜áƒ", + "AW": "áƒáƒ áƒ£áƒ‘áƒ", + "AX": "áƒáƒšáƒáƒœáƒ“ის კუნძულები", + "AZ": "áƒáƒ–ერბáƒáƒ˜áƒ¯áƒáƒœáƒ˜", + "BA": "ბáƒáƒ¡áƒœáƒ˜áƒ დრჰერცეგáƒáƒ•ინáƒ", + "BB": "ბáƒáƒ áƒ‘áƒáƒ“áƒáƒ¡áƒ˜", + "BD": "ბáƒáƒœáƒ’ლáƒáƒ“ეში", + "BE": "ბელგიáƒ", + "BF": "ბურკინáƒ-ფáƒáƒ¡áƒ", + "BG": "ბულგáƒáƒ áƒ”თი", + "BH": "ბáƒáƒ°áƒ áƒ”ინი", + "BI": "ბურუნდი", + "BJ": "ბენინი", + "BL": "სენ-ბáƒáƒ áƒ—ელმი", + "BM": "ბერმუდáƒ", + "BN": "ბრუნეი", + "BO": "ბáƒáƒšáƒ˜áƒ•იáƒ", + "BQ": "კáƒáƒ áƒ˜áƒ‘ის ნიდერლáƒáƒœáƒ“ები", + "BR": "ბრáƒáƒ–ილიáƒ", + "BS": "ბáƒáƒ°áƒáƒ›áƒ˜áƒ¡ კუნძულები", + "BT": "ბუტáƒáƒœáƒ˜", + "BW": "ბáƒáƒ¢áƒ¡áƒ•áƒáƒœáƒ", + "BY": "ბელáƒáƒ áƒ£áƒ¡áƒ˜", + "BZ": "ბელიზი", + "CA": "კáƒáƒœáƒáƒ“áƒ", + "CC": "ქáƒáƒ¥áƒáƒ¡áƒ˜áƒ¡ (კილინგის) კუნძულები", + "CD": "კáƒáƒœáƒ’რ- კინშáƒáƒ¡áƒ", + "CF": "ცენტრáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ¤áƒ áƒ˜áƒ™áƒ˜áƒ¡ რესპუბლიკáƒ", + "CG": "კáƒáƒœáƒ’რ- ბრáƒáƒ–áƒáƒ•ილი", + "CH": "შვეიცáƒáƒ áƒ˜áƒ", + "CI": "კáƒáƒ¢-დივუáƒáƒ áƒ˜", + "CK": "კუკის კუნძულები", + "CL": "ჩილე", + "CM": "კáƒáƒ›áƒ”რუნი", + "CN": "ჩინეთი", + "CO": "კáƒáƒšáƒ£áƒ›áƒ‘იáƒ", + "CR": "კáƒáƒ¡áƒ¢áƒ-რიკáƒ", + "CU": "კუბáƒ", + "CV": "კáƒáƒ‘áƒ-ვერდე", + "CW": "კიურáƒáƒ¡áƒáƒ", + "CX": "შáƒáƒ‘ის კუნძული", + "CY": "კვიპრáƒáƒ¡áƒ˜", + "CZ": "ჩეხეთის რესპუბლიკáƒ", + "DE": "გერმáƒáƒœáƒ˜áƒ", + "DG": "დიეგáƒ-გáƒáƒ áƒ¡áƒ˜áƒ", + "DJ": "ჯიბუტი", + "DK": "დáƒáƒœáƒ˜áƒ", + "DM": "დáƒáƒ›áƒ˜áƒœáƒ˜áƒ™áƒ", + "DO": "დáƒáƒ›áƒ˜áƒœáƒ˜áƒ™áƒ”ლთრრესპუბლიკáƒ", + "DZ": "áƒáƒšáƒŸáƒ˜áƒ áƒ˜", + "EA": "სეუტრდრმელილáƒ", + "EC": "ეკვáƒáƒ“áƒáƒ áƒ˜", + "EE": "ესტáƒáƒœáƒ”თი", + "EG": "ეგვიპტე", + "EH": "დáƒáƒ¡áƒáƒ•ლეთ სáƒáƒ°áƒáƒ áƒ", + "ER": "ერიტრეáƒ", + "ES": "ესპáƒáƒœáƒ”თი", + "ET": "ეთიáƒáƒžáƒ˜áƒ", + "FI": "ფინეთი", + "FJ": "ფიჯი", + "FK": "ფáƒáƒšáƒ™áƒšáƒ”ნდის კუნძულები", + "FM": "მიკრáƒáƒœáƒ”ზიáƒ", + "FO": "ფáƒáƒ áƒ”რის კუნძულები", + "FR": "სáƒáƒ¤áƒ áƒáƒœáƒ’ეთი", + "GA": "გáƒáƒ‘áƒáƒœáƒ˜", + "GB": "გáƒáƒ”რთიáƒáƒœáƒ”ბული სáƒáƒ›áƒ”ფáƒ", + "GD": "გრენáƒáƒ“áƒ", + "GE": "სáƒáƒ¥áƒáƒ áƒ—ველáƒ", + "GF": "სáƒáƒ¤áƒ áƒáƒœáƒ’ეთის გვიáƒáƒœáƒ", + "GG": "გერნსი", + "GH": "გáƒáƒœáƒ", + "GI": "გიბრáƒáƒšáƒ¢áƒáƒ áƒ˜", + "GL": "გრენლáƒáƒœáƒ“იáƒ", + "GM": "გáƒáƒ›áƒ‘იáƒ", + "GN": "გვინეáƒ", + "GP": "გვáƒáƒ“ელუპáƒ", + "GQ": "ეკვáƒáƒ¢áƒáƒ áƒ£áƒšáƒ˜ გვინეáƒ", + "GR": "სáƒáƒ‘ერძნეთი", + "GS": "სáƒáƒ›áƒ®áƒ áƒ”თ ჯáƒáƒ áƒ¯áƒ˜áƒ დრსáƒáƒ›áƒ®áƒ áƒ”თ სენდვიჩის კუნძულები", + "GT": "გვáƒáƒ¢áƒ”მáƒáƒšáƒ", + "GU": "გუáƒáƒ›áƒ˜", + "GW": "გვინეáƒ-ბისáƒáƒ£", + "GY": "გáƒáƒ˜áƒáƒœáƒ", + "HK": "ჰáƒáƒœáƒ™áƒáƒœáƒ’ის სპეციáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ“მინისტრáƒáƒªáƒ˜áƒ£áƒšáƒ˜ რეგიáƒáƒœáƒ˜ ჩინეთი", + "HN": "ჰáƒáƒœáƒ“ურáƒáƒ¡áƒ˜", + "HR": "ხáƒáƒ áƒ•áƒáƒ¢áƒ˜áƒ", + "HT": "ჰáƒáƒ˜áƒ¢áƒ˜", + "HU": "უნგრეთი", + "IC": "კáƒáƒœáƒáƒ áƒ˜áƒ¡ კუნძულები", + "ID": "ინდáƒáƒœáƒ”ზიáƒ", + "IE": "ირლáƒáƒœáƒ“იáƒ", + "IL": "ისრáƒáƒ”ლი", + "IM": "მენის კუნძული", + "IN": "ინდáƒáƒ”თი", + "IO": "ბრიტáƒáƒœáƒ”თის ტერიტáƒáƒ áƒ˜áƒ ინდáƒáƒ”თის áƒáƒ™áƒ”áƒáƒœáƒ”ში", + "IQ": "ერáƒáƒ§áƒ˜", + "IR": "ირáƒáƒœáƒ˜", + "IS": "ისლáƒáƒœáƒ“იáƒ", + "IT": "იტáƒáƒšáƒ˜áƒ", + "JE": "ჯერსი", + "JM": "იáƒáƒ›áƒáƒ˜áƒ™áƒ", + "JO": "იáƒáƒ áƒ“áƒáƒœáƒ˜áƒ", + "JP": "იáƒáƒžáƒáƒœáƒ˜áƒ", + "KE": "კენიáƒ", + "KG": "ყირგიზეთი", + "KH": "კáƒáƒ›áƒ‘áƒáƒ¯áƒ", + "KI": "კირიბáƒáƒ¢áƒ˜", + "KM": "კáƒáƒ›áƒáƒ áƒ˜áƒ¡ კუნძულები", + "KN": "სენტ-კიტსი დრნევისი", + "KP": "ჩრდილáƒáƒ”თ კáƒáƒ áƒ”áƒ", + "KR": "სáƒáƒ›áƒ®áƒ áƒ”თ კáƒáƒ áƒ”áƒ", + "KW": "ქუვეითი", + "KY": "კáƒáƒ˜áƒ›áƒáƒœáƒ˜áƒ¡ კუნძულები", + "KZ": "ყáƒáƒ–áƒáƒ®áƒ”თი", + "LA": "ლáƒáƒáƒ¡áƒ˜", + "LB": "ლიბáƒáƒœáƒ˜", + "LC": "სენტ-ლუსიáƒ", + "LI": "ლიხტენშტáƒáƒ˜áƒœáƒ˜", + "LK": "შრი-ლáƒáƒœáƒ™áƒ", + "LR": "ლიბერიáƒ", + "LS": "ლესáƒáƒ—áƒ", + "LT": "ლიტვáƒ", + "LU": "ლუქსემბურგი", + "LV": "ლáƒáƒ¢áƒ•იáƒ", + "LY": "ლიბიáƒ", + "MA": "მáƒáƒ áƒáƒ™áƒ", + "MC": "მáƒáƒœáƒáƒ™áƒ", + "MD": "მáƒáƒšáƒ“áƒáƒ•áƒ", + "ME": "მáƒáƒœáƒ¢áƒ”ნეგრáƒ", + "MF": "სენ-მáƒáƒ áƒ¢áƒ”ნი", + "MG": "მáƒáƒ“áƒáƒ’áƒáƒ¡áƒ™áƒáƒ áƒ˜", + "MH": "მáƒáƒ áƒ¨áƒáƒšáƒ˜áƒ¡ კუნძულები", + "MK": "მáƒáƒ™áƒ”დáƒáƒœáƒ˜áƒ", + "ML": "მáƒáƒšáƒ˜", + "MM": "მიáƒáƒœáƒ›áƒáƒ áƒ˜ (ბირმáƒ)", + "MN": "მáƒáƒœáƒ¦áƒáƒšáƒ”თი", + "MO": "მáƒáƒ™áƒáƒáƒ¡ სპეციáƒáƒšáƒ£áƒ áƒ˜ áƒáƒ“მინისტრáƒáƒªáƒ˜áƒ£áƒšáƒ˜ რეგიáƒáƒœáƒ˜ ჩინეთი", + "MP": "ჩრდილáƒáƒ”თ მáƒáƒ áƒ˜áƒáƒœáƒáƒ¡ კუნძულები", + "MQ": "მáƒáƒ áƒ¢áƒ˜áƒœáƒ˜áƒ™áƒ", + "MR": "მáƒáƒ•რიტáƒáƒœáƒ˜áƒ", + "MS": "მáƒáƒœáƒ¡áƒ”რáƒáƒ¢áƒ˜", + "MT": "მáƒáƒšáƒ¢áƒ", + "MU": "მáƒáƒ•რიკი", + "MV": "მáƒáƒšáƒ“ივები", + "MW": "მáƒáƒšáƒáƒ•ი", + "MX": "მექსიკáƒ", + "MY": "მáƒáƒšáƒáƒ˜áƒ–იáƒ", + "MZ": "მáƒáƒ–áƒáƒ›áƒ‘იკი", + "NA": "ნáƒáƒ›áƒ˜áƒ‘იáƒ", + "NC": "áƒáƒ®áƒáƒšáƒ˜ კáƒáƒšáƒ”დáƒáƒœáƒ˜áƒ", + "NE": "ნიგერი", + "NF": "ნáƒáƒ áƒ¤áƒáƒšáƒ™áƒ˜áƒ¡ კუნძული", + "NG": "ნიგერიáƒ", + "NI": "ნიკáƒáƒ áƒáƒ’უáƒ", + "NL": "ნიდერლáƒáƒœáƒ“ები", + "NO": "ნáƒáƒ áƒ•ეგიáƒ", + "NP": "ნეპáƒáƒšáƒ˜", + "NR": "ნáƒáƒ£áƒ áƒ£", + "NU": "ნიუე", + "NZ": "áƒáƒ®áƒáƒšáƒ˜ ზელáƒáƒœáƒ“იáƒ", + "OM": "áƒáƒ›áƒáƒœáƒ˜", + "PA": "პáƒáƒœáƒáƒ›áƒ", + "PE": "პერუ", + "PF": "სáƒáƒ¤áƒ áƒáƒœáƒ’ეთის პáƒáƒšáƒ˜áƒœáƒ”ზიáƒ", + "PG": "პáƒáƒžáƒ£áƒ-áƒáƒ®áƒáƒšáƒ˜ გვინეáƒ", + "PH": "ფილიპინები", + "PK": "პáƒáƒ™áƒ˜áƒ¡áƒ¢áƒáƒœáƒ˜", + "PL": "პáƒáƒšáƒáƒœáƒ”თი", + "PM": "სენ-პიერი დრმიკელáƒáƒœáƒ˜", + "PN": "პიტკერნის კუნძულები", + "PR": "პუერტáƒ-რიკáƒ", + "PS": "პáƒáƒšáƒ”სტინის ტერიტáƒáƒ áƒ˜áƒ”ბი", + "PT": "პáƒáƒ áƒ¢áƒ£áƒ’áƒáƒšáƒ˜áƒ", + "PW": "პáƒáƒšáƒáƒ£", + "PY": "პáƒáƒ áƒáƒ’ვáƒáƒ˜", + "QA": "კáƒáƒ¢áƒáƒ áƒ˜", + "RE": "რეუნიáƒáƒœáƒ˜", + "RO": "რუმინეთი", + "RS": "სერბეთი", + "RU": "რუსეთი", + "RW": "რუáƒáƒœáƒ“áƒ", + "SA": "სáƒáƒ£áƒ“ის áƒáƒ áƒáƒ‘ეთი", + "SB": "სáƒáƒšáƒáƒ›áƒáƒœáƒ˜áƒ¡ კუნძულები", + "SC": "სეიშელის კუნძულები", + "SD": "სუდáƒáƒœáƒ˜", + "SE": "შვედეთი", + "SG": "სინგáƒáƒžáƒ£áƒ áƒ˜", + "SH": "წმინდრელენეს კუნძული", + "SI": "სლáƒáƒ•ენიáƒ", + "SJ": "შპიცბერგენი დრიáƒáƒœ-მáƒáƒ˜áƒ”ნი", + "SK": "სლáƒáƒ•áƒáƒ™áƒ”თი", + "SL": "სიერáƒ-ლეáƒáƒœáƒ”", + "SM": "სáƒáƒœ-მáƒáƒ áƒ˜áƒœáƒ", + "SN": "სენეგáƒáƒšáƒ˜", + "SO": "სáƒáƒ›áƒáƒšáƒ˜", + "SR": "სურინáƒáƒ›áƒ˜", + "SS": "სáƒáƒ›áƒ®áƒ áƒ”თ სუდáƒáƒœáƒ˜", + "ST": "სáƒáƒœ-ტáƒáƒ›áƒ” დრპრინსიპი", + "SV": "სáƒáƒšáƒ•áƒáƒ“áƒáƒ áƒ˜", + "SX": "სინტ-მáƒáƒ áƒ¢áƒ”ნი", + "SY": "სირიáƒ", + "SZ": "სვáƒáƒ–ილენდი", + "TA": "ტრისტáƒáƒœ-დáƒ-კუნიáƒ", + "TC": "თერქს-ქáƒáƒ˜áƒ¥áƒáƒ¡áƒ˜áƒ¡ კუნძულები", + "TD": "ჩáƒáƒ“ი", + "TF": "ფრáƒáƒœáƒ’ული სáƒáƒ›áƒ®áƒ áƒ”თის ტერიტáƒáƒ áƒ˜áƒ”ბი", + "TG": "ტáƒáƒ’áƒ", + "TH": "ტáƒáƒ˜áƒšáƒáƒœáƒ“ი", + "TJ": "ტáƒáƒ¯áƒ˜áƒ™áƒ”თი", + "TK": "ტáƒáƒ™áƒ”ლáƒáƒ£", + "TL": "ტიმáƒáƒ -ლესტე", + "TM": "თურქმენეთი", + "TN": "ტუნისი", + "TO": "ტáƒáƒœáƒ’áƒ", + "TR": "თურქეთი", + "TT": "ტრინიდáƒáƒ“ი დრტáƒáƒ‘áƒáƒ’áƒ", + "TV": "ტუვáƒáƒšáƒ£", + "TW": "ტáƒáƒ˜áƒ•áƒáƒœáƒ˜", + "TZ": "ტáƒáƒœáƒ–áƒáƒœáƒ˜áƒ", + "UA": "უკრáƒáƒ˜áƒœáƒ", + "UG": "უგáƒáƒœáƒ“áƒ", + "UM": "áƒáƒ¨áƒ¨-ის შáƒáƒ áƒ”ული კუნძულები", + "UN": "გáƒáƒ”რáƒ", + "US": "áƒáƒ›áƒ”რიკის შეერთებული შტáƒáƒ¢áƒ”ბი", + "UY": "ურუგვáƒáƒ˜", + "UZ": "უზბეკეთი", + "VA": "ქáƒáƒšáƒáƒ¥áƒ˜ ვáƒáƒ¢áƒ˜áƒ™áƒáƒœáƒ˜", + "VC": "სენტ-ვინსენტი დრგრენáƒáƒ“ინები", + "VE": "ვენესუელáƒ", + "VG": "ბრიტáƒáƒœáƒ”თის ვირჯინის კუნძულები", + "VI": "áƒáƒ¨áƒ¨-ის ვირჯინის კუნძულები", + "VN": "ვიეტნáƒáƒ›áƒ˜", + "VU": "ვáƒáƒœáƒ£áƒáƒ¢áƒ£", + "WF": "უáƒáƒšáƒ˜áƒ¡áƒ˜ დრფუტუნáƒ", + "WS": "სáƒáƒ›áƒáƒ", + "XK": "კáƒáƒ¡áƒáƒ•áƒ", + "YE": "იემენი", + "YT": "მáƒáƒ˜áƒáƒ¢áƒ", + "ZA": "სáƒáƒ›áƒ®áƒ áƒ”თ áƒáƒ¤áƒ áƒ˜áƒ™áƒ˜áƒ¡ რესპუბლიკáƒ", + "ZM": "ზáƒáƒ›áƒ‘იáƒ", + "ZW": "ზიმბáƒáƒ‘ვე" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ki.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ki.json new file mode 100644 index 0000000000000000000000000000000000000000..5d9ac740df730e5d0231af37f240175e16757afc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ki.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AD": "Andora", + "AE": "Falme za Kiarabu", + "AF": "Afuganistani", + "AG": "Antigua na Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AR": "Ajentina", + "AS": "Samoa ya Marekani", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AZ": "Azabajani", + "BA": "Bosnia na Hezegovina", + "BB": "Babadosi", + "BD": "Bangladeshi", + "BE": "Ubelgiji", + "BF": "Bukinafaso", + "BG": "Bulgaria", + "BH": "Bahareni", + "BI": "Mburundi", + "BJ": "Benini", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BR": "Brazili", + "BS": "Bahama", + "BT": "Butani", + "BW": "Botswana", + "BY": "Belarusi", + "BZ": "Belize", + "CA": "Kanada", + "CD": "Jamhuri ya Kidemokrasia ya Kongo", + "CF": "Jamhuri ya Afrika ya Kati", + "CG": "Kongo", + "CH": "Uswisi", + "CI": "Kodivaa", + "CK": "Visiwa vya Cook", + "CL": "Chile", + "CM": "Kameruni", + "CN": "Caina", + "CO": "Kolombia", + "CR": "Kostarika", + "CU": "Kiumba", + "CV": "Kepuvede", + "CY": "Kuprosi", + "CZ": "Jamhuri ya Cheki", + "DE": "Njeremani", + "DJ": "Jibuti", + "DK": "Denmaki", + "DM": "Dominika", + "DO": "Jamhuri ya Dominika", + "DZ": "Aljeria", + "EC": "Ekwado", + "EE": "Estonia", + "EG": "Misri", + "ER": "Eritrea", + "ES": "Hispania", + "ET": "Uhabeshi", + "FI": "Ufini", + "FJ": "Fiji", + "FK": "Visiwa vya Falkland", + "FM": "Mikronesia", + "FR": "Ubaranja", + "GA": "Gaboni", + "GB": "Ngeretha", + "GD": "Grenada", + "GE": "Jojia", + "GF": "Gwiyana ya Ufaransa", + "GH": "Ngana", + "GI": "Jibralta", + "GL": "Grinlandi", + "GM": "Gambia", + "GN": "Gine", + "GP": "Gwadelupe", + "GQ": "Ginekweta", + "GR": "Ugiriki", + "GT": "Gwatemala", + "GU": "Gwam", + "GW": "Ginebisau", + "GY": "Guyana", + "HN": "Hondurasi", + "HR": "Korasia", + "HT": "Haiti", + "HU": "Hungaria", + "ID": "Indonesia", + "IE": "Ayalandi", + "IL": "Israeli", + "IN": "India", + "IO": "Eneo la Uingereza katika Bahari Hindi", + "IQ": "Iraki", + "IR": "Uajemi", + "IS": "Aislandi", + "IT": "Italia", + "JM": "Jamaika", + "JO": "Njorondani", + "JP": "Njabani", + "KE": "Kenya", + "KG": "Kirigizistani", + "KH": "Kambodia", + "KI": "Kiribati", + "KM": "Komoro", + "KN": "Santakitzi na Nevis", + "KP": "Korea Kaskazini", + "KR": "Korea Kusini", + "KW": "Kuwaiti", + "KY": "Visiwa vya Kayman", + "KZ": "Kazakistani", + "LA": "Laosi", + "LB": "Lebanoni", + "LC": "Santalusia", + "LI": "Lishenteni", + "LK": "Sirilanka", + "LR": "Liberia", + "LS": "Lesoto", + "LT": "Litwania", + "LU": "Lasembagi", + "LV": "Lativia", + "LY": "Libya", + "MA": "Moroko", + "MC": "Monako", + "MD": "Moldova", + "MG": "Bukini", + "MH": "Visiwa vya Marshal", + "MK": "Masedonia", + "ML": "Mali", + "MM": "Myama", + "MN": "Mongolia", + "MP": "Visiwa vya Mariana vya Kaskazini", + "MQ": "Martiniki", + "MR": "Moritania", + "MS": "Montserrati", + "MT": "Malta", + "MU": "Morisi", + "MV": "Modivu", + "MW": "Malawi", + "MX": "Meksiko", + "MY": "Malesia", + "MZ": "Msumbiji", + "NA": "Namimbia", + "NC": "Nyukaledonia", + "NE": "Nijeri", + "NF": "Kisiwa cha Norfok", + "NG": "Nainjeria", + "NI": "Nikaragwa", + "NL": "Uholanzi", + "NO": "Norwe", + "NP": "Nepali", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nyuzilandi", + "OM": "Omani", + "PA": "Panama", + "PE": "Peru", + "PF": "Polinesia ya Ufaransa", + "PG": "Papua", + "PH": "Filipino", + "PK": "Pakistani", + "PL": "Polandi", + "PM": "Santapieri na Mikeloni", + "PN": "Pitkairni", + "PR": "Pwetoriko", + "PS": "Ukingo wa Magharibi na Ukanda wa Gaza wa Palestina", + "PT": "Ureno", + "PW": "Palau", + "PY": "Paragwai", + "QA": "Katari", + "RE": "Riyunioni", + "RO": "Romania", + "RU": "Urusi", + "RW": "Rwanda", + "SA": "Saudi", + "SB": "Visiwa vya Solomon", + "SC": "Shelisheli", + "SD": "Sudani", + "SE": "Uswidi", + "SG": "Singapoo", + "SH": "Santahelena", + "SI": "Slovenia", + "SK": "Slovakia", + "SL": "Siera Leoni", + "SM": "Samarino", + "SN": "Senegali", + "SO": "Somaria", + "SR": "Surinamu", + "ST": "Sao Tome na Principe", + "SV": "Elsavado", + "SY": "Siria", + "SZ": "Uswazi", + "TC": "Visiwa vya Turki na Kaiko", + "TD": "Chadi", + "TG": "Togo", + "TH": "Tailandi", + "TJ": "Tajikistani", + "TK": "Tokelau", + "TL": "Timori ya Mashariki", + "TM": "Turukimenistani", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Uturuki", + "TT": "Trinidad na Tobago", + "TV": "Tuvalu", + "TW": "Taiwani", + "TZ": "Tanzania", + "UA": "Ukraini", + "UG": "Uganda", + "US": "Amerika", + "UY": "Urugwai", + "UZ": "Uzibekistani", + "VA": "Vatikani", + "VC": "Santavisenti na Grenadini", + "VE": "Venezuela", + "VG": "Visiwa vya Virgin vya Uingereza", + "VI": "Visiwa vya Virgin vya Marekani", + "VN": "Vietinamu", + "VU": "Vanuatu", + "WF": "Walis na Futuna", + "WS": "Samoa", + "YE": "Yemeni", + "YT": "Mayotte", + "ZA": "Afrika Kusini", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/kk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/kk.json new file mode 100644 index 0000000000000000000000000000000000000000..28a3bd8292e1cde503c307636031f7b4718e7c4c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/kk.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Ó˜Ñкенжін аралы", + "AD": "Ðндорра", + "AE": "Біріккен Ðраб Әмірліктері", + "AF": "ÐуғанÑтан", + "AG": "Ðнтигуа және Барбуда", + "AI": "ÐнгильÑ", + "AL": "ÐлбаниÑ", + "AM": "ÐрмениÑ", + "AO": "Ðнгола", + "AQ": "Ðнтарктида", + "AR": "Ðргентина", + "AS": "Ðмерикалық Самоа", + "AT": "ÐвÑтриÑ", + "AU": "ÐвÑтралиÑ", + "AW": "Ðруба", + "AX": "Ðланд аралдары", + "AZ": "Әзірбайжан", + "BA": "БоÑÐ½Ð¸Ñ Ð¶Ó™Ð½Ðµ Герцеговина", + "BB": "БарбадоÑ", + "BD": "Бангладеш", + "BE": "БельгиÑ", + "BF": "Буркина-ФаÑо", + "BG": "БолгариÑ", + "BH": "Бахрейн", + "BI": "Бурунди", + "BJ": "Бенин", + "BL": "Сен-Бартелеми", + "BM": "Бермуд аралдары", + "BN": "Бруней", + "BO": "БоливиÑ", + "BQ": "Кариб ÐидерландыÑÑ‹", + "BR": "БразилиÑ", + "BS": "Багам аралдары", + "BT": "Бутан", + "BW": "БотÑвана", + "BY": "БеларуÑÑŒ", + "BZ": "Белиз", + "CA": "Канада", + "CC": "ÐšÐ¾ÐºÐ¾Ñ (Килинг) аралдары", + "CD": "Конго", + "CF": "Орталық Ðфрика РеÑпубликаÑÑ‹", + "CG": "Конго-Браззавиль РеÑпубликаÑÑ‹", + "CH": "ШвейцариÑ", + "CI": "Кот-д’Ивуар", + "CK": "Кук аралдары", + "CL": "Чили", + "CM": "Камерун", + "CN": "Қытай", + "CO": "КолумбиÑ", + "CR": "КоÑта-Рика", + "CU": "Куба", + "CV": "Кабо-Верде", + "CW": "КюраÑао", + "CX": "РождеÑтво аралы", + "CY": "Кипр", + "CZ": "Чех РеÑпубликаÑÑ‹", + "DE": "ГерманиÑ", + "DG": "Диего-ГарÑиÑ", + "DJ": "Джибути", + "DK": "ДаниÑ", + "DM": "Доминика", + "DO": "Доминикан РеÑпубликаÑÑ‹", + "DZ": "Ðлжир", + "EA": "Сеута және МелильÑ", + "EC": "Эквадор", + "EE": "ЭÑтониÑ", + "EG": "МыÑыр", + "EH": "Ð‘Ð°Ñ‚Ñ‹Ñ Ð¡Ð°Ñ…Ð°Ñ€Ð°", + "ER": "ЭритреÑ", + "ES": "ИÑпаниÑ", + "ET": "ЭфиопиÑ", + "FI": "ФинлÑндиÑ", + "FJ": "Фиджи", + "FK": "Фолкленд аралдары", + "FM": "МикронезиÑ", + "FO": "Фарер аралдары", + "FR": "ФранциÑ", + "GA": "Габон", + "GB": "ҰлыбританиÑ", + "GD": "Гренада", + "GE": "ГрузиÑ", + "GF": "Француз ГвианаÑÑ‹", + "GG": "ГернÑи", + "GH": "Гана", + "GI": "Гибралтар", + "GL": "ГренландиÑ", + "GM": "ГамбиÑ", + "GN": "ГвинеÑ", + "GP": "Гваделупа", + "GQ": "Экваторлық ГвинеÑ", + "GR": "ГрекиÑ", + "GS": "ОңтүÑтік Ð“ÐµÐ¾Ñ€Ð³Ð¸Ñ Ð¶Ó™Ð½Ðµ ОңтүÑтік Сандвич аралдары", + "GT": "Гватемала", + "GU": "Гуам", + "GW": "ГвинеÑ-БиÑау", + "GY": "Гайана", + "HK": "Қытай Халық РеÑпубликаÑының Гонконг арнайы әкімшілік ауданы", + "HN": "ГондураÑ", + "HR": "ХорватиÑ", + "HT": "Гаити", + "HU": "ВенгриÑ", + "IC": "Канар аралдары", + "ID": "ИндонезиÑ", + "IE": "ИрландиÑ", + "IL": "Израиль", + "IM": "МÑн аралы", + "IN": "ҮндіÑтан", + "IO": "Үнді мұхитындағы Британ аймағы", + "IQ": "Ирак", + "IR": "Иран", + "IS": "ИÑландиÑ", + "IT": "ИталиÑ", + "JE": "ДжерÑи", + "JM": "Ямайка", + "JO": "ИорданиÑ", + "JP": "ЖапониÑ", + "KE": "КениÑ", + "KG": "ҚырғызÑтан", + "KH": "Камбоджа", + "KI": "Кирибати", + "KM": "Комор аралдары", + "KN": "Сент-ÐšÐ¸Ñ‚Ñ Ð¶Ó™Ð½Ðµ ÐевиÑ", + "KP": "СолтүÑтік КореÑ", + "KR": "ОңтүÑтік КореÑ", + "KW": "Кувейт", + "KY": "Кайман аралдары", + "KZ": "ҚазақÑтан", + "LA": "ЛаоÑ", + "LB": "Ливан", + "LC": "Сент-ЛюÑиÑ", + "LI": "Лихтенштейн", + "LK": "Шри-Ланка", + "LR": "ЛибериÑ", + "LS": "ЛеÑото", + "LT": "Литва", + "LU": "ЛюкÑембург", + "LV": "ЛатвиÑ", + "LY": "ЛивиÑ", + "MA": "Марокко", + "MC": "Монако", + "MD": "Молдова", + "ME": "ЧерногориÑ", + "MF": "Сен-Мартен", + "MG": "МадагаÑкар", + "MH": "Маршалл аралдары", + "MK": "МакедониÑ", + "ML": "Мали", + "MM": "МьÑнма (Бирма)", + "MN": "МоңғолиÑ", + "MO": "Қытай Халық РеÑпубликаÑының Макао арнайы әкімшілік ауданы", + "MP": "СолтүÑтік Мариана аралдары", + "MQ": "Мартиника", + "MR": "МавританиÑ", + "MS": "МонтÑеррат", + "MT": "Мальта", + "MU": "Маврикий", + "MV": "Мальдив аралдары", + "MW": "Малави", + "MX": "МекÑика", + "MY": "МалайзиÑ", + "MZ": "Мозамбик", + "NA": "ÐамибиÑ", + "NC": "Жаңа КаледониÑ", + "NE": "Ðигер", + "NF": "Ðорфолк аралы", + "NG": "ÐигериÑ", + "NI": "Ðикарагуа", + "NL": "Ðидерланд", + "NO": "ÐорвегиÑ", + "NP": "Ðепал", + "NR": "Ðауру", + "NU": "ÐиуÑ", + "NZ": "Жаңа ЗеландиÑ", + "OM": "Оман", + "PA": "Панама", + "PE": "Перу", + "PF": "Француз ПолинезиÑÑÑ‹", + "PG": "Папуа — Жаңа ГвинеÑ", + "PH": "Филиппин", + "PK": "ПәкіÑтан", + "PL": "Польша", + "PM": "Сен-Пьер және Микелон", + "PN": "ПиткÑрн аралдары", + "PR": "ПуÑрто-Рико", + "PS": "ПалеÑтина аймақтары", + "PT": "ПортугалиÑ", + "PW": "Палау", + "PY": "Парагвай", + "QA": "Катар", + "RE": "Реюньон", + "RO": "РумыниÑ", + "RS": "СербиÑ", + "RU": "РеÑей", + "RW": "Руанда", + "SA": "Сауд ÐрабиÑÑÑ‹", + "SB": "Соломон аралдары", + "SC": "Сейшель аралдары", + "SD": "Судан", + "SE": "ШвециÑ", + "SG": "Сингапур", + "SH": "Әулие Елена аралы", + "SI": "СловениÑ", + "SJ": "Шпицберген және Ян-Майен", + "SK": "СловакиÑ", + "SL": "Сьерра-Леоне", + "SM": "Сан-Марино", + "SN": "Сенегал", + "SO": "Сомали", + "SR": "Суринам", + "SS": "ОңтүÑтік Судан", + "ST": "Сан-Томе және ПринÑипи", + "SV": "Сальвадор", + "SX": "Синт-Мартен", + "SY": "СириÑ", + "SZ": "Свазиленд", + "TA": "ТриÑтан-да-КуньÑ", + "TC": "Ð¢ÐµÑ€ÐºÑ Ð¶Ó™Ð½Ðµ ÐšÐ°Ð¹ÐºÐ¾Ñ Ð°Ñ€Ð°Ð»Ð´Ð°Ñ€Ñ‹", + "TD": "Чад", + "TF": "ФранциÑның оңтүÑтік аймақтары", + "TG": "Того", + "TH": "Тайланд", + "TJ": "ТәжікÑтан", + "TK": "Токелау", + "TL": "Тимор-ЛеÑте", + "TM": "ТүрікменÑтан", + "TN": "ТуниÑ", + "TO": "Тонга", + "TR": "ТүркиÑ", + "TT": "Тринидад және Тобаго", + "TV": "Тувалу", + "TW": "Тайвань", + "TZ": "ТанзаниÑ", + "UA": "Украина", + "UG": "Уганда", + "UM": "ÐҚШ-тың Ñыртқы кіші аралдары", + "UN": "Біріккен Ұлттар Ұйымы", + "US": "Ðмерика Құрама Штаттары", + "UY": "Уругвай", + "UZ": "ӨзбекÑтан", + "VA": "Ватикан", + "VC": "Сент-ВинÑент және Гренадин аралдары", + "VE": "ВенеÑуÑла", + "VG": "Британдық Виргин аралдары", + "VI": "ÐҚШ-тың Виргин аралдары", + "VN": "Вьетнам", + "VU": "Вануату", + "WF": "Ð£Ð¾Ð»Ð»Ð¸Ñ Ð¶Ó™Ð½Ðµ Футуна", + "WS": "Самоа", + "XK": "КоÑово", + "YE": "Йемен", + "YT": "Майотта", + "ZA": "ОңтүÑтік Ðфрика РеÑпубликаÑÑ‹", + "ZM": "ЗамбиÑ", + "ZW": "Зимбабве" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/kl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/kl.json new file mode 100644 index 0000000000000000000000000000000000000000..5cba91fbb5c72fb0a5f998f59e1f6ce126540a5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/kl.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GL": "Kalaallit Nunaat" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/km.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/km.json new file mode 100644 index 0000000000000000000000000000000000000000..b1560f1e42fdf4e701fc08da392fc60f128abae2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/km.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "កោះ​អាសáŸáž“សិន", + "AD": "អង់ដូរ៉ា", + "AE": "អារ៉ាប់រួម", + "AF": "អាហ្វហ្គានីស្ážáž¶áž“", + "AG": "អង់ទីហ្គា និង បាប៊ុយដា", + "AI": "អង់ហ្គីឡា", + "AL": "អាល់បានី", + "AM": "អាមáŸáž“ី", + "AO": "អង់ហ្គោឡា", + "AQ": "អង់ážáž¶áž€áŸ‹áž‘ិក", + "AR": "អាហ្សង់ទីន", + "AS": "សាមáŸážš អាមáŸážšáž·áž€áž¶áŸ†áž„", + "AT": "អូទ្រីស", + "AU": "អូស្ážáŸ’រាលី", + "AW": "អារូបា", + "AX": "កោះ​អាឡាំង", + "AZ": "អាស៊ែបៃហ្សង់", + "BA": "បូស្នី និងហឺហ្សីហ្គូវីណា", + "BB": "បាបាដុស", + "BD": "បង់ក្លាដែស", + "BE": "បែលហ្ស៊ិក", + "BF": "បួគីណាហ្វាសូ", + "BG": "ប៊ុលហ្គារី", + "BH": "បារ៉ែន", + "BI": "ប៊ូរុនឌី", + "BJ": "áž”áŸážŽáž¶áŸ†áž„", + "BL": "សង់ បាážáŸáž¡áŸáž˜áŸ‰áž¸", + "BM": "ប៊ឺមុយដា", + "BN": "ប្រ៊ុយណáŸ", + "BO": "បូលីវី", + "BQ": "ហុល្លង់ ការ៉ាប៊ីន", + "BR": "ប្រáŸážŸáŸŠáž¸áž›", + "BS": "បាហាម៉ា", + "BT": "ប៊ូážáž¶áž“", + "BW": "បុážážŸáŸ’វាណា", + "BY": "áž”áŸáž¡áž¶ážšáž»ážŸáŸ’ស", + "BZ": "áž”áŸáž›áž¸áž áŸ’ស", + "CA": "កាណាដា", + "CC": "កោះ​កូកូស (គីលីង)", + "CD": "កុងហ្គោ- គីនស្ហាសា", + "CF": "សាធារណរដ្ឋអាហ្វ្រិកកណ្ដាល", + "CG": "កុងហ្គោ - ប្រាហ្សាវីល", + "CH": "ស្វីស", + "CI": "កូដឌីវáŸážš", + "CK": "កោះ​ážáž¼áž€", + "CL": "ស៊ីលី", + "CM": "កាមáŸážšáž¼áž“", + "CN": "áž…áž·áž“", + "CO": "កូឡុំប៊ី", + "CR": "កូស្ážáž¶ážšáž¸áž€áž¶", + "CU": "គុយបា", + "CV": "កាបវែរ", + "CW": "កូរ៉ាកៅ", + "CX": "កោះ​គ្រីស្មាស", + "CY": "ស៊ីប", + "CZ": "សាធារណរដ្ឋឆáŸáž€", + "DE": "អាល្លឺម៉ង់", + "DG": "ឌៀហ្គោហ្គាស៊ី", + "DJ": "ជីប៊ូទី", + "DK": "ដាណឺម៉ាក", + "DM": "ដូមីនីក", + "DO": "សាធារណរដ្ឋ​ដូមីនីក", + "DZ": "អាល់ហ្សáŸážšáž¸", + "EA": "ជឺážáž¶ និង​ម៉áŸáž›áž¸áž¡áž¶", + "EC": "អáŸáž€áŸ’វាឌáŸážš", + "EE": "អáŸážŸáŸ’ážáž¼áž“ី", + "EG": "អáŸáž áŸ’ស៊ីប", + "EH": "សាហារ៉ាážáž¶áž„លិច", + "ER": "អáŸážšáž¸áž‘្រា", + "ES": "អáŸážŸáŸ’ប៉ាញ", + "ET": "អáŸážáŸ’យូពី", + "FI": "ហ្វាំងឡង់", + "FJ": "ហ្វីជី", + "FK": "កោះ​ហ្វក់ឡែន", + "FM": "មីក្រូណáŸážŸáŸŠáž¸", + "FO": "កោះ​ហ្វារ៉ូ", + "FR": "បារាំង", + "GA": "ហ្គាបុង", + "GB": "ចក្រភព​អង់គ្លáŸážŸ", + "GD": "ហ្គ្រីណាដា", + "GE": "ហ្សកហ្ស៊ី", + "GF": "ហ្គៀណាបារាំង", + "GG": "ហ្គáŸáž“ស៊ី", + "GH": "ហ្គាណា", + "GI": "ហ្គីប្រាលážáž¶", + "GL": "ហ្គ្រោអង់ឡង់", + "GM": "ហ្គាំប៊ី", + "GN": "ហ្គីណáŸ", + "GP": "ហ្គោដឺឡុប", + "GQ": "ហ្គីណáŸáž¢áŸáž€áŸ’វាទáŸážš", + "GR": "ក្រិក", + "GS": "កោះ​ហ្សកហ្ស៊ី​ážáž¶áž„​ážáŸ’បូង និង សាន់វិច​ážáž¶áž„​ážáŸ’បូង", + "GT": "ហ្គាážáŸáž˜áŸ‰áž¶áž¡áž¶", + "GU": "ហ្គាំ", + "GW": "ហ្គីណáŸáž”៊ីសូ", + "GY": "ហ្គីយ៉ាណា", + "HK": "ហុងកុង", + "HN": "ហុងឌូរ៉ាស", + "HR": "ក្រូអាáž", + "HT": "ហៃទី", + "HU": "ហុងគ្រី", + "IC": "កោះ​កាណារី", + "ID": "ឥណ្ឌូណáŸážŸáŸŠáž¸", + "IE": "អៀរឡង់", + "IL": "អ៊ីស្រាអែល", + "IM": "អែលអុហ្វមែន", + "IN": "ឥណ្ឌា", + "IO": "ដែនដី​អង់គ្លáŸážŸâ€‹áž“ៅ​មហា​សមុទ្រ​ឥណ្ឌា", + "IQ": "អ៊ីរ៉ាក់", + "IR": "អ៊ីរ៉ង់", + "IS": "អ៊ីស្លង់", + "IT": "អ៊ីážáž¶áž›áž¸", + "JE": "ជឺស៊ី", + "JM": "ចាម៉ៃកា", + "JO": "ហ៊្សកដានី", + "JP": "ជប៉ុន", + "KE": "កáŸáž“យ៉ា", + "KG": "កៀហ្ស៊ីស៊ីស្ážáž¶áž“", + "KH": "កម្ពុជា", + "KI": "គិរិបាទី", + "KM": "កូមáŸážš", + "KN": "សង់ឃីហនិង​ណáŸážœáž¸ážŸ", + "KP": "កូរ៉áŸâ€‹ážáž¶áž„​ជើង", + "KR": "កូរ៉áŸâ€‹ážáž¶áž„​ážáŸ’បូង", + "KW": "គុយវ៉ែáž", + "KY": "កោះ​កៃម៉ង់", + "KZ": "កាហ្សាក់ស្ážáž¶áž“", + "LA": "ឡាវ", + "LB": "លីបង់", + "LC": "សង់​លូសៀ", + "LI": "លិចទáŸáž“ស្ážáŸ‚áž“", + "LK": "ស្រីលង្កា", + "LR": "លីបáŸážšáž¸áž™áŸ‰áž¶", + "LS": "áž¡áŸážŸáž¼ážáž¼", + "LT": "លីទុយអានី", + "LU": "លុចហ្សំបួរ", + "LV": "ឡាážážœáž¸áž™áŸ‰áž¶", + "LY": "លីប៊ី", + "MA": "ម៉ារ៉ុក", + "MC": "ម៉ូណាកូ", + "MD": "ម៉ុលដាវី", + "ME": "ម៉ុងážáŸážŽáŸáž áŸ’គ្រោ", + "MF": "សង់​ម៉ាទីន", + "MG": "ម៉ាដាហ្គាស្កា", + "MH": "កោះ​ម៉ាស់សល", + "MK": "ម៉ាសáŸážŠáž¼áž“áž¶", + "ML": "ម៉ាលី", + "MM": "មីយ៉ាន់ម៉ា (ភូមា)", + "MN": "ម៉ុងហ្គោលី", + "MO": "ម៉ាកាវ", + "MP": "កោះ​ម៉ារីណា​ážáž¶áž„​ជើង", + "MQ": "ម៉ាទីនីក", + "MR": "ម៉ូរីážáž¶áž“ី", + "MS": "ម៉ុង​សáŸážšáŸ‰áž„់", + "MT": "ម៉ាល់ážáž¶", + "MU": "ម៉ូរីស", + "MV": "ម៉ាល់ឌីវ", + "MW": "ម៉ាឡាវី", + "MX": "ម៉ិកស៊ិក", + "MY": "ម៉ាឡáŸážŸáŸŠáž¸", + "MZ": "ម៉ូហ្សាំប៊ិក", + "NA": "ណាមីប៊ី", + "NC": "ញូកាឡáŸážŠáž¼áž“ៀ", + "NE": "នីហ្សáŸážš", + "NF": "កោះ​ណáŸážšáž áŸ’វក់", + "NG": "នីហ្សáŸážšáž¸áž™áŸ‰áž¶", + "NI": "នីការ៉ាហ្គáŸážš", + "NL": "ហូឡង់", + "NO": "áž“áŸážšážœáŸ‚ស", + "NP": "áž“áŸáž”៉ាល់", + "NR": "ណូរូ", + "NU": "ណៀ", + "NZ": "នូវែលហ្សáŸáž¡áž„់", + "OM": "អូម៉ង់", + "PA": "ប៉ាណាម៉ា", + "PE": "ប៉áŸážšáž¼", + "PF": "ប៉ូលី​ណáŸážŸáŸŠáž¸â€‹áž”ារាំង", + "PG": "ប៉ាពួញ៉ូហ្គីណáŸ", + "PH": "ហ្វីលីពីន", + "PK": "ប៉ាគីស្ážáž¶áž“", + "PL": "ប៉ូឡូញ", + "PM": "សង់ព្យែរ និង​មីគីឡុង", + "PN": "កោះ​ភីážáž€áž¶áž“", + "PR": "áž–áŸážšážáž¼ážšáž¸áž€áž¼", + "PS": "ដែន​ប៉ាលáŸážŸáŸ’ទីន", + "PT": "áž–áŸážšáž‘ុយហ្គាល់", + "PW": "ផៅឡូ", + "PY": "ប៉ារ៉ាហ្គាយ", + "QA": "កាážáž¶", + "RE": "ážšáŸáž¢áž»áž™áž‰áŸ‰áž»áž„", + "RO": "រូម៉ានី", + "RS": "ស៊ែប", + "RU": "រុស្ស៊ី", + "RW": "រវ៉ាន់ដា", + "SA": "អារ៉ាប៊ីសាអូឌីáž", + "SB": "កោះ​សូឡូម៉ុង", + "SC": "សីសែល", + "SD": "ស៊ូដង់", + "SE": "ស៊ុយអែáž", + "SG": "សិង្ហបុរី", + "SH": "សង់​ហáŸáž¡áŸážŽáž¶", + "SI": "ស្លូវáŸáž“ី", + "SJ": "ស្វាលបាដ និង ហ្សង់ម៉ាយáŸáž“", + "SK": "ស្លូវ៉ាគី", + "SL": "សáŸážšáŸ‰áž¶áž¡áŸáž¢áž¼áž“", + "SM": "សាន​ម៉ារីណូ", + "SN": "សáŸážŽáŸáž áŸ’គាល់", + "SO": "សូម៉ាលី", + "SR": "សូរីណាម", + "SS": "ស៊ូដង់​ážáž¶áž„​ážáŸ’បូង", + "ST": "សៅážáž¼áž˜áŸ‰áŸ និង ប្រាំងស៊ីប", + "SV": "អែលសាល់វ៉ាឌáŸážš", + "SX": "សីង​ម៉ាធីន", + "SY": "ស៊ីរី", + "SZ": "ស្វាហ្ស៊ីឡង់", + "TA": "ទ្រីស្ážáž„់​ដា​ចូនហា", + "TC": "កោះ​ទួគ និង កៃកូស", + "TD": "ឆាដ", + "TF": "ដែនដី​បារាំង​នៅ​ភាគážáž¶áž„ážáŸ’បូង", + "TG": "ážáž¼áž áŸ’គោ", + "TH": "ážáŸƒ", + "TJ": "ážáž¶áž áŸ’ស៊ីគីស្ážáž¶áž“", + "TK": "ážáž¼ážáŸáž¡áŸ…", + "TL": "ទីមáŸážš", + "TM": "ážáž½áž€áž˜áŸ‰áŸáž“ីស្ážáž¶áž“", + "TN": "ទុយនáŸážŸáŸŠáž¸", + "TO": "ážáž»áž„ហ្គា", + "TR": "ទួរគី", + "TT": "ទ្រីនីដាហនិង​ážáž¼áž”ាហ្គោ", + "TV": "ទូវ៉ាលូ", + "TW": "ážáŸƒážœáŸ‰áž¶áž“់", + "TZ": "ážáž„់ហ្សានី", + "UA": "អ៊ុយក្រែន", + "UG": "អ៊ូហ្គង់ដា", + "UM": "កោះ​អៅឡាយីង​អាមáŸážšáž·áž€", + "UN": "អង្គការសហប្រជាជាážáž·", + "US": "សហរដ្ឋអាមáŸážšáž·áž€", + "UY": "អ៊ុយរ៉ាហ្គាយ", + "UZ": "អ៊ូសបáŸáž‚ីស្ážáž¶áž“", + "VA": "បុរី​វ៉ាទីកង់", + "VC": "សាំង​វីនសáŸáž“ និង​ឌឹ​ហ្គ្រីណាឌីនីស", + "VE": "ážœáŸáž“áŸáž áŸ’ស៊ុយឡា", + "VG": "កោះ​វឺជិន​ចក្រភព​អង់គ្លáŸážŸ", + "VI": "កោះ​វឺជីន​អាមáŸážšáž·áž€", + "VN": "វៀážážŽáž¶áž˜", + "VU": "វ៉ានូអាទូ", + "WF": "វ៉ាលីស និង​ហ្វូទូណា", + "WS": "សាមáŸážš", + "XK": "កូសូវ៉ូ", + "YE": "áž™áŸáž˜áŸ‚áž“", + "YT": "ម៉ាយុáž", + "ZA": "អាហ្វ្រិកážáž¶áž„ážáŸ’បូង", + "ZM": "ហ្សាំប៊ី", + "ZW": "ហ្ស៊ីមបាវ៉áŸ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/kn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/kn.json new file mode 100644 index 0000000000000000000000000000000000000000..9e48a10694226bb5dbc2d332a1b4afb8fe3659de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/kn.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "ಅಸೆನà³à²¶à²¨à³ ದà³à²µà³€à²ª", + "AD": "ಅಂಡೋರಾ", + "AE": "ಸಂಯà³à²•à³à²¤ ಅರಬೠಎಮಿರೇಟಸà³", + "AF": "ಅಫಘಾನಿಸà³à²¥à²¾à²¨à³", + "AG": "ಆಂಟಿಗà³à²µà²¾ ಮತà³à²¤à³ ಬರà³à²¬à³à²¡à²¾", + "AI": "ಆಂಗà³à²µà²¿à²²à³à²²à²¾", + "AL": "ಅಲà³à²¬à³‡à²¨à²¿à²¯à²¾", + "AM": "ಅರà³à²®à³‡à²¨à²¿à²¯à²¾", + "AO": "ಅಂಗೋಲಾ", + "AQ": "ಅಂಟಾರà³à²Ÿà²¿à²•ಾ", + "AR": "ಅರà³à²œà³†à²‚ಟಿನಾ", + "AS": "ಅಮೇರಿಕನೠಸಮೋವಾ", + "AT": "ಆಸà³à²Ÿà³à²°à²¿à²¯à²¾", + "AU": "ಆಸà³à²Ÿà³à²°à³‡à²²à²¿à²¯", + "AW": "ಅರà³à²¬à²¾", + "AX": "ಆಲà³à²¯à²¾à²‚ಡೠದà³à²µà³€à²ªà²—ಳà³", + "AZ": "ಅಜರà³à²¬à³ˆà²œà²¾à²¨à³", + "BA": "ಬೋಸà³à²¨à²¿à²¯à²¾ ಮತà³à²¤à³ ಹರà³à²œà³†à²—ೋವಿನಾ", + "BB": "ಬಾರà³à²¬à²¡à³‹à²¸à³", + "BD": "ಬಾಂಗà³à²²à²¾à²¦à³‡à²¶à³", + "BE": "ಬೆಲà³à²œà²¿à²¯à²®à³", + "BF": "ಬà³à²°à³à²•ಿನಾ ಫಾಸೋ", + "BG": "ಬಲà³à²—ೇರಿಯಾ", + "BH": "ಬಹà³à²°à³‡à²¨à³", + "BI": "ಬà³à²°à³à²‚ಡಿ", + "BJ": "ಬೆನಿನà³", + "BL": "ಸೇಂಟೠಬಾರà³à²¥à³†à²²à³†à²®à²¿", + "BM": "ಬರà³à²®à³à²¡à²¾", + "BN": "ಬà³à²°à³‚ನಿ", + "BO": "ಬೊಲಿವಿಯಾ", + "BQ": "ಕೆರೀಬಿಯನೠನೆದರà³â€Œà²²à³à²¯à²¾à²‚ಡà³à²¸à³", + "BR": "ಬà³à²°à³†à²œà²¿à²²à³", + "BS": "ಬಹಾಮಾಸà³", + "BT": "ಭೂತಾನà³", + "BW": "ಬೋಟà³à²¸à³â€Œà²µà²¾à²¨à²¾", + "BY": "ಬೆಲಾರಸà³", + "BZ": "ಬೆಲಿಜà³", + "CA": "ಕೆನಡಾ", + "CC": "ಕೊಕೊಸೠ(ಕೀಲಿಂಗà³) ದà³à²µà³€à²ªà²—ಳà³", + "CD": "ಕಾಂಗೋ - ಕಿನà³à²¶à²¾à²¸à²¾", + "CF": "ಮಧà³à²¯ ಆಫà³à²°à²¿à²•ಾ ಗಣರಾಜà³à²¯", + "CG": "ಕಾಂಗೋ - ಬà³à²°à²¾à²œà²¾à²µà²¿à²²à³à²²à³‡", + "CH": "ಸà³à²µà²¿à²Ÿà³à²œà²°à³à²²à³à²¯à²¾à²‚ಡà³", + "CI": "ಕೋತà³â€Œ ದಿವಾರà³â€", + "CK": "ಕà³à²•ೠದà³à²µà³€à²ªà²—ಳà³", + "CL": "ಚಿಲಿ", + "CM": "ಕà³à²¯à²¾à²®à²°à³‹à²¨à³", + "CN": "ಚೀನಾ", + "CO": "ಕೊಲಂಬಿಯಾ", + "CR": "ಕೊಸà³à²Ÿà²¾ ರಿಕಾ", + "CU": "ಕà³à²¯à³‚ಬಾ", + "CV": "ಕೇಪೠವರà³à²¡à³†", + "CW": "ಕà³à²°à²¾à²•ಾವà³", + "CX": "ಕà³à²°à²¿à²¸à³à²®à²¸à³ ದà³à²µà³€à²ª", + "CY": "ಸೈಪà³à²°à²¸à³", + "CZ": "à²à³†à²•ೠರಿಪಬà³à²²à²¿à²•à³", + "DE": "ಜರà³à²®à²¨à²¿", + "DG": "ಡೈಗೋ ಗಾರà³à²¸à²¿à²¯", + "DJ": "ಜಿಬೋಟಿ", + "DK": "ಡೆನà³à²®à²¾à²°à³à²•à³", + "DM": "ಡೊಮಿನಿಕಾ", + "DO": "ಡೊಮೆನಿಕನೠರಿಪಬà³à²²à²¿à²•à³", + "DZ": "ಅಲà³à²—ೇರಿಯಾ", + "EA": "ಸೆಯà³à²Ÿà²¾ ಹಾಗೂ ಮೆಲಿಲà³à²²à²¾", + "EC": "ಈಕà³à²µà³†à²¡à²¾à²°à³", + "EE": "ಎಸà³à²Ÿà³‹à²¨à²¿à²¯à²¾", + "EG": "ಈಜಿಪà³à²Ÿà³", + "EH": "ಪಶà³à²šà²¿à²® ಸಹಾರಾ", + "ER": "à²à²°à²¿à²Ÿà³à²°à²¿à²¯à²¾", + "ES": "ಸà³à²ªà³‡à²¨à³", + "ET": "ಇಥಿಯೋಪಿಯಾ", + "FI": "ಫಿನà³â€Œà²²à³à²¯à²¾à²‚ಡà³", + "FJ": "ಫಿಜಿ", + "FK": "ಫಾಲà³à²•à³â€Œà²²à³à²¯à²¾à²‚ಡೠದà³à²µà³€à²ªà²—ಳà³", + "FM": "ಮೈಕà³à²°à³‹à²¨à³‡à²¶à²¿à²¯à²¾", + "FO": "ಫರೋ ದà³à²µà³€à²ªà²—ಳà³", + "FR": "ಫà³à²°à²¾à²¨à³à²¸à³", + "GA": "ಗೆಬೊನà³", + "GB": "ಬà³à²°à²¿à²Ÿà²¨à³\/ಇಂಗà³à²²à³†à²‚ಡà³", + "GD": "ಗà³à²°à³†à²¨à³†à²¡à²¾", + "GE": "ಜಾರà³à²œà²¿à²¯à²¾", + "GF": "ಫà³à²°à³†à²‚ಚೠಗಯಾನಾ", + "GG": "ಗà³à²°à³à²¨à³â€Œà²¸à³†", + "GH": "ಘಾನಾ", + "GI": "ಗಿಬà³à²°à²¾à²²à³à²Ÿà²°à³", + "GL": "ಗà³à²°à³€à²¨à³â€Œà²²à³à²¯à²¾à²‚ಡà³", + "GM": "ಗà³à²¯à²¾à²‚ಬಿಯಾ", + "GN": "ಗಿನಿ", + "GP": "ಗà³à²¡à³†à²²à³‹à²ªà³", + "GQ": "ಈಕà³à²µà³†à²Ÿà³‹à²°à²¿à²¯à²²à³ ಗಿನಿ", + "GR": "ಗà³à²°à³€à²¸à³", + "GS": "ದಕà³à²·à²¿à²£ ಜಾರà³à²œà²¿à²¯à²¾ ಮತà³à²¤à³ ದಕà³à²·à²¿à²£ ಸà³à²¯à²¾à²‚ಡà³â€à²µà²¿à²šà³ ದà³à²µà³€à²ªà²—ಳà³", + "GT": "ಗà³à²µà²¾à²Ÿà³†à²®à²¾à²²à²¾", + "GU": "ಗà³à²¯à²¾à²®à³", + "GW": "ಗಿನಿ-ಬಿಸà³à²¸à²¾à²µà³", + "GY": "ಗಯಾನಾ", + "HK": "ಹಾಂಗೠಕಾಂಗೠSAR ಚೈನಾ", + "HN": "ಹೊಂಡà³à²°à²¾à²¸à³", + "HR": "ಕà³à²°à³Šà²¯à³‡à²¶à²¿à²¯à²¾", + "HT": "ಹೈಟಿ", + "HU": "ಹಂಗೇರಿ", + "IC": "ಕà³à²¯à²¾à²¨à²°à²¿ ದà³à²µà³€à²ªà²—ಳà³", + "ID": "ಇಂಡೋನೇಶಿಯಾ", + "IE": "à²à²°à³à²²à³†à²‚ಡà³", + "IL": "ಇಸà³à²°à³‡à²²à³", + "IM": "à²à²²à³ ಆಫೠಮà³à²¯à²¾à²¨à³", + "IN": "ಭಾರತ", + "IO": "ಬà³à²°à²¿à²Ÿà³€à²·à³ ಹಿಂದೂ ಮಹಾಸಾಗರದ ಪà³à²°à²¦à³‡à²¶", + "IQ": "ಇರಾಕà³", + "IR": "ಇರಾನà³", + "IS": "à²à²¸à³â€Œà²²à³à²¯à²¾à²‚ಡà³", + "IT": "ಇಟಲಿ", + "JE": "ಜೆರà³à²¸à²¿", + "JM": "ಜಮೈಕಾ", + "JO": "ಜೋರà³à²¡à²¾à²¨à³", + "JP": "ಜಪಾನà³", + "KE": "ಕೀನà³à²¯à²¾", + "KG": "ಕಿರà³à²—ಿಸà³à²¥à²¾à²¨à³", + "KH": "ಕಾಂಬೋಡಿಯಾ", + "KI": "ಕಿರಿಬಾತಿ", + "KM": "ಕೊಮೊರೊಸà³", + "KN": "ಸೇಂಟೠಕಿಟà³à²¸à³ ಮತà³à²¤à³ ನೆವಿಸà³", + "KP": "ಉತà³à²¤à²° ಕೋರಿಯಾ", + "KR": "ದಕà³à²·à²¿à²£ ಕೋರಿಯಾ", + "KW": "ಕà³à²µà³ˆà²¤à³", + "KY": "ಕೇಮನೠದà³à²µà³€à²ªà²—ಳà³", + "KZ": "ಕà²à²¾à²•ಿಸà³à²¥à²¾à²¨à³", + "LA": "ಲಾವೋಸà³", + "LB": "ಲೆಬನಾನà³", + "LC": "ಸೇಂಟೠಲೂಸಿಯಾ", + "LI": "ಲಿಚೆನà³â€Œà²¸à³à²Ÿà³ˆà²¨à³", + "LK": "ಶà³à²°à³€à²²à²‚ಕಾ", + "LR": "ಲಿಬೇರಿಯಾ", + "LS": "ಲೆಸೊಥೋ", + "LT": "ಲಿಥà³à²µà³‡à²¨à²¿à²¯à²¾", + "LU": "ಲಕà³à²¸à²‚ಬರà³à²—à³", + "LV": "ಲಾಟà³à²µà²¿à²¯à²¾", + "LY": "ಲಿಬಿಯಾ", + "MA": "ಮೊರಾಕà³à²•ೊ", + "MC": "ಮೊನಾಕೊ", + "MD": "ಮೊಲà³à²¡à³‹à²µà²¾", + "ME": "ಮೊಂಟೆನೆಗà³à²°à³‹", + "MF": "ಸೇಂಟೠಮಾರà³à²Ÿà²¿à²¨à³", + "MG": "ಮಡಗಾಸà³à²•ರà³", + "MH": "ಮಾರà³à²·à²²à³ ದà³à²µà³€à²ªà²—ಳà³", + "MK": "ಮà³à²¯à²¾à²¸à²¿à²¡à³‹à²¨à²¿à²¯à²¾", + "ML": "ಮಾಲಿ", + "MM": "ಮಯನà³à²®à²¾à²°à³ (ಬರà³à²®à²¾)", + "MN": "ಮೊಂಗೋಲಿಯಾ", + "MO": "ಮಖಾವೠ(SAR) ಚೈನಾ", + "MP": "ಉತà³à²¤à²° ಮರಿಯಾನಾ ದà³à²µà³€à²ªà²—ಳà³", + "MQ": "ಮಾರà³à²Ÿà²¿à²¨à²¿à²•à³", + "MR": "ಮಾರಿಟೇನಿಯಾ", + "MS": "ಮಾಂಟà³â€Œà²¸à³†à²°à³‡à²Ÿà³", + "MT": "ಮಾಲà³à²Ÿà²¾", + "MU": "ಮಾರಿಷಸà³", + "MV": "ಮಾಲà³à²¡à²¿à²µà³à²¸à³", + "MW": "ಮಲಾವಿ", + "MX": "ಮೆಕà³à²¸à²¿à²•ೊ", + "MY": "ಮಲೇಶಿಯಾ", + "MZ": "ಮೊಜಾಂಬಿಕà³", + "NA": "ನಮೀಬಿಯಾ", + "NC": "ನà³à²¯à³‚ ಕà³à²¯à²¾à²²à²¿à²¡à³‹à²¨à²¿à²¯à²¾", + "NE": "ನೈಜರà³", + "NF": "ನಾರà³à²«à³‹à²•ೠದà³à²µà³€à²ª", + "NG": "ನೈಜೀರಿಯಾ", + "NI": "ನಿಕಾರಾಗà³à²µà²¾", + "NL": "ನೆದರà³â€Œà²²à³à²¯à²¾à²‚ಡà³à²¸à³", + "NO": "ನಾರà³à²µà³‡", + "NP": "ನೇಪಾಳ", + "NR": "ನೌರà³", + "NU": "ನಿಯà³", + "NZ": "ನà³à²¯à³‚ಜಿಲೆಂಡà³", + "OM": "ಓಮನà³", + "PA": "ಪನಾಮಾ", + "PE": "ಪೆರà³", + "PF": "ಫà³à²°à³†à²‚ಚೠಪಾಲಿನೇಷà³à²¯à²¾", + "PG": "ಪಪà³à²µà²¾ ನà³à²¯à³‚ಗಿನಿಯಾ", + "PH": "ಫಿಲಿಫೈನà³à²¸à³", + "PK": "ಪಾಕಿಸà³à²¤à²¾à²¨", + "PL": "ಪೋಲà³à²¯à²¾à²‚ಡà³", + "PM": "ಸೇಂಟೠಪಿಯರೆ ಮತà³à²¤à³ ಮಿಕೆಲನà³", + "PN": "ಪಿಟà³â€Œà²•ೈರà³à²¨à³ ದà³à²µà³€à²ªà²—ಳà³", + "PR": "ಪà³à²¯à³‚ರà³à²Ÿà³‹ ರಿಕೊ", + "PS": "ಪà³à²¯à²¾à²²à³‡à²¸à³à²Ÿà³‡à²¨à²¿à²¯à²¨à³ ಪà³à²°à²¦à³‡à²¶à²—ಳà³", + "PT": "ಪೋರà³à²šà³à²—ಲà³", + "PW": "ಪಲಾವà³", + "PY": "ಪರಾಗà³à²µà³‡", + "QA": "ಖತಾರà³", + "RE": "ರೀಯೂನಿಯನà³", + "RO": "ರೊಮೇನಿಯಾ", + "RS": "ಸೆರà³à²¬à²¿à²¯à²¾", + "RU": "ರಷà³à²¯à²¾", + "RW": "ರà³à²µà²¾à²‚ಡಾ", + "SA": "ಸೌದಿ ಅರೇಬಿಯಾ", + "SB": "ಸೊಲೊಮನೠದà³à²µà³€à²ªà²—ಳà³", + "SC": "ಸೀಶೆಲà³à²²à³†à²¸à³", + "SD": "ಸೂಡಾನà³", + "SE": "ಸà³à²µà³€à²¡à²¨à³", + "SG": "ಸಿಂಗಾಪà³à²°à³", + "SH": "ಸೇಂಟೠಹೆಲೆನಾ", + "SI": "ಸà³à²²à³‹à²µà³‡à²¨à²¿à²¯à²¾", + "SJ": "ಸà³à²µà²¾à²²à³à²¬à²¾à²°à³à²¡à³ ಮತà³à²¤à³ ಜಾನೠಮೆಯನà³", + "SK": "ಸà³à²²à³‹à²µà²¾à²•ಿಯಾ", + "SL": "ಸಿಯೆರà³à²°à²¾ ಲಿಯೋನà³", + "SM": "ಸà³à²¯à²¾à²¨à³ ಮೆರಿನೋ", + "SN": "ಸೆನೆಗಲà³", + "SO": "ಸೊಮಾಲಿಯಾ", + "SR": "ಸà³à²°à²¿à²¨à²¾à²®", + "SS": "ದಕà³à²·à²¿à²£ ಸೂಡಾನà³", + "ST": "ಸಾವೋ ಟೋಮೠಮತà³à²¤à³ ಪà³à²°à²¿à²¨à³à²¸à²¿à²ªà²¿", + "SV": "ಎಲೠಸಾಲà³à²µà³‡à²¡à²¾à²°à³", + "SX": "ಸಿಂಟೠಮಾರà³à²Ÿà³†à²¨à³", + "SY": "ಸಿರಿಯಾ", + "SZ": "ಸà³à²µà²¾à²œà²¿à²²à³à²¯à²¾à²‚ಡà³", + "TA": "ಟà³à²°à²¿à²¸à³à²¤à²¨à³ ಡಾ ಕà³à²¨à³à²¹à²¾", + "TC": "ಟರà³à²•à³à²¸à³ ಮತà³à²¤à³ ಕೈಕೋಸೠದà³à²µà³€à²ªà²—ಳà³", + "TD": "ಚಾದà³", + "TF": "ಫà³à²°à³†à²‚ಚೠದಕà³à²·à²¿à²£ ಪà³à²°à²¦à³‡à²¶à²—ಳà³", + "TG": "ಟೋಗೋ", + "TH": "ಥೈಲà³à²¯à²¾à²‚ಡà³", + "TJ": "ತಜಿಕಿಸà³à²¤à²¾à²¨à³", + "TK": "ಟೊಕೆಲಾವà³", + "TL": "ಪೂರà³à²µ ತಿಮೋರà³", + "TM": "ತà³à²°à³à²•ಮೆನಿಸà³à²¤à²¾à²¨à³", + "TN": "ಟà³à²¨à²¿à²¶à²¿à²¯à²¾", + "TO": "ಟೊಂಗ", + "TR": "ಟರà³à²•ಿ", + "TT": "ಟà³à²°à²¿à²¨à²¿à²¡à²¾à²¡à³ ಮತà³à²¤à³ ಟೊಬಾಗೊ", + "TV": "ಟà³à²µà²¾à²²à³", + "TW": "ಥೈವಾನà³", + "TZ": "ತಾಂಜೇನಿಯಾ", + "UA": "ಉಕà³à²°à³ˆà²¨à³", + "UG": "ಉಗಾಂಡಾ", + "UM": "ಯà³à²Žà²¸à³â€Œ. ಔಟà³â€Œà²²à³‡à²¯à²¿à²‚ಗೠದà³à²µà³€à²ªà²—ಳà³", + "UN": "ಸಂಯà³à²•à³à²¤ ಸಂಸà³à²¥à²¾à²¨à²—ಳà³", + "US": "ಅಮೇರಿಕಾ ಸಂಯà³à²•à³à²¤ ಸಂಸà³à²¥à²¾à²¨", + "UY": "ಉರà³à²—à³à²µà³‡", + "UZ": "ಉಜà³à²¬à³‡à²•ಿಸà³à²¥à²¾à²¨à³", + "VA": "ವà³à²¯à²¾à²Ÿà²¿à²•ನà³", + "VC": "ಸೇಂಟà³. ವಿನà³à²¸à³†à²‚ಟೠಮತà³à²¤à³ ಗà³à²°à³†à²¨à³†à²¡à³ˆà²¨à³à²¸à³", + "VE": "ವೆನೆಜà³à²µà³†à²²à²¾", + "VG": "ಬà³à²°à²¿à²Ÿà²¿à²·à³ ವರà³à²œà²¿à²¨à³ ದà³à²µà³€à²ªà²—ಳà³", + "VI": "ಯà³.ಎಸà³. ವರà³à²œà²¿à²¨à³ ದà³à²µà³€à²ªà²—ಳà³", + "VN": "ವಿಯೇಟà³à²¨à²¾à²®à³", + "VU": "ವನೌಟà³", + "WF": "ವಾಲಿಸೠಮತà³à²¤à³ ಫà³à²Ÿà³à²¨à²¾", + "WS": "ಸಮೋವಾ", + "XK": "ಕೊಸೊವೊ", + "YE": "ಯೆಮನà³", + "YT": "ಮಯೊಟà³à²Ÿà³†", + "ZA": "ದಕà³à²·à²¿à²£ ಆಫà³à²°à²¿à²•ಾ", + "ZM": "à²à²¾à²‚ಬಿಯಾ", + "ZW": "ಜಿಂಬಾಬà³à²µà³†" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ko.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ko.json new file mode 100644 index 0000000000000000000000000000000000000000..98cf3380c93672c2ae949a68be9d2d930517d1a2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ko.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.22", + "Names": { + "AC": "어센션 섬", + "AD": "안ë„ë¼", + "AE": "ì•„ëžì—미리트", + "AF": "아프가니스탄", + "AG": "앤티가 바부다", + "AI": "앵귈ë¼", + "AL": "알바니아", + "AM": "아르메니아", + "AO": "앙골ë¼", + "AQ": "남극 대륙", + "AR": "아르헨티나", + "AS": "아메리칸 사모아", + "AT": "오스트리아", + "AU": "오스트레ì¼ë¦¬ì•„", + "AW": "아루바", + "AX": "올란드 ì œë„", + "AZ": "아제르바ì´ìž”", + "BA": "보스니아 헤르체고비나", + "BB": "바베ì´ë„스", + "BD": "방글ë¼ë°ì‹œ", + "BE": "벨기ì—", + "BF": "부르키나파소", + "BG": "불가리아", + "BH": "바레ì¸", + "BI": "부룬디", + "BJ": "베냉", + "BL": "ìƒë°”르텔레미", + "BM": "버뮤다", + "BN": "브루나ì´", + "BO": "볼리비아", + "BQ": "네ëœëž€ë“œë ¹ 카리브", + "BR": "브ë¼ì§ˆ", + "BS": "바하마", + "BT": "부탄", + "BW": "보츠와나", + "BY": "벨ë¼ë£¨ìФ", + "BZ": "벨리즈", + "CA": "ìºë‚˜ë‹¤", + "CC": "코코스 ì œë„", + "CD": "콩고-킨샤사", + "CF": "중앙 아프리카 공화국", + "CG": "콩고-브ë¼ìžë¹Œ", + "CH": "스위스", + "CI": "코트디부아르", + "CK": "ì¿¡ ì œë„", + "CL": "ì¹ ë ˆ", + "CM": "카메룬", + "CN": "중국", + "CO": "콜롬비아", + "CR": "코스타리카", + "CU": "ì¿ ë°”", + "CV": "카보베르ë°", + "CW": "퀴ë¼ì†Œ", + "CX": "í¬ë¦¬ìŠ¤ë§ˆìŠ¤ì„¬", + "CY": "키프로스", + "CZ": "ì²´ì½”", + "DE": "ë…ì¼", + "DG": "ë””ì—ê³  가르시아", + "DJ": "지부티", + "DK": "ë´ë§ˆí¬", + "DM": "ë„미니카", + "DO": "ë„미니카 공화국", + "DZ": "알제리", + "EA": "세우타 ë° ë©œë¦¬ì•¼", + "EC": "ì—ì½°ë„르", + "EE": "ì—스토니아", + "EG": "ì´ì§‘트", + "EH": "서사하ë¼", + "ER": "ì—리트리아", + "ES": "스페ì¸", + "ET": "ì—티오피아", + "FI": "핀란드", + "FJ": "피지", + "FK": "í¬í´ëžœë“œ ì œë„", + "FM": "미í¬ë¡œë„¤ì‹œì•„", + "FO": "페로 ì œë„", + "FR": "프랑스", + "GA": "가봉", + "GB": "ì˜êµ­", + "GD": "그레나다", + "GE": "조지아", + "GF": "프랑스령 기아나", + "GG": "ê±´ì§€", + "GH": "가나", + "GI": "지브롤터", + "GL": "그린란드", + "GM": "ê°ë¹„ì•„", + "GN": "기니", + "GP": "과들루프", + "GQ": "ì ë„ 기니", + "GR": "그리스", + "GS": "사우스조지아 사우스샌드위치 ì œë„", + "GT": "과테ë§ë¼", + "GU": "ê´Œ", + "GW": "기니비사우", + "GY": "ê°€ì´ì•„나", + "HK": "í™ì½©(중국 특별행정구)", + "HN": "온ë‘ë¼ìФ", + "HR": "í¬ë¡œì•„í‹°ì•„", + "HT": "ì•„ì´í‹°", + "HU": "í—가리", + "IC": "카나리아 ì œë„", + "ID": "ì¸ë„네시아", + "IE": "ì•„ì¼ëžœë“œ", + "IL": "ì´ìФë¼ì—˜", + "IM": "맨 섬", + "IN": "ì¸ë„", + "IO": "ì˜êµ­ë ¹ ì¸ë„ì–‘ ì‹ë¯¼ì§€", + "IQ": "ì´ë¼í¬", + "IR": "ì´ëž€", + "IS": "ì•„ì´ìŠ¬ëž€ë“œ", + "IT": "ì´íƒˆë¦¬ì•„", + "JE": "저지", + "JM": "ìžë©”ì´ì¹´", + "JO": "요르단", + "JP": "ì¼ë³¸", + "KE": "ì¼€ëƒ", + "KG": "키르기스스탄", + "KH": "캄보디아", + "KI": "키리바시", + "KM": "코모로", + "KN": "세ì¸íŠ¸í‚¤ì¸  네비스", + "KP": "ë¶í•œ", + "KR": "대한민국", + "KW": "쿠웨ì´íЏ", + "KY": "ì¼€ì´ë§¨ ì œë„", + "KZ": "ì¹´ìží스탄", + "LA": "ë¼ì˜¤ìФ", + "LB": "레바논", + "LC": "세ì¸íŠ¸ë£¨ì‹œì•„", + "LI": "리히í…슈타ì¸", + "LK": "스리랑카", + "LR": "ë¼ì´ë² ë¦¬ì•„", + "LS": "레소토", + "LT": "리투아니아", + "LU": "룩셈부르í¬", + "LV": "ë¼íŠ¸ë¹„ì•„", + "LY": "리비아", + "MA": "모로코", + "MC": "모나코", + "MD": "몰ë„ë°”", + "ME": "몬테네그로", + "MF": "ìƒë§ˆë¥´íƒ±", + "MG": "마다가스카르", + "MH": "마셜 ì œë„", + "MK": "마케ë„니아", + "ML": "ë§ë¦¬", + "MM": "미얀마", + "MN": "몽골", + "MO": "마카오(중국 특별행정구)", + "MP": "ë¶ë§ˆë¦¬ì•„나제ë„", + "MQ": "마르티니í¬", + "MR": "모리타니", + "MS": "몬트세ë¼íЏ", + "MT": "몰타", + "MU": "모리셔스", + "MV": "몰디브", + "MW": "ë§ë¼ìœ„", + "MX": "멕시코", + "MY": "ë§ë ˆì´ì‹œì•„", + "MZ": "모잠비í¬", + "NA": "나미비아", + "NC": "뉴칼레ë„니아", + "NE": "니제르", + "NF": "ë…¸í½ì„¬", + "NG": "나ì´ì§€ë¦¬ì•„", + "NI": "니카ë¼ê³¼", + "NL": "네ëœëž€ë“œ", + "NO": "노르웨ì´", + "NP": "네팔", + "NR": "나우루", + "NU": "니우ì—", + "NZ": "뉴질랜드", + "OM": "오만", + "PA": "파나마", + "PE": "페루", + "PF": "프랑스령 í´ë¦¬ë„¤ì‹œì•„", + "PG": "파푸아뉴기니", + "PH": "필리핀", + "PK": "파키스탄", + "PL": "í´ëž€ë“œ", + "PM": "ìƒí”¼ì—르 미í´ë¡±", + "PN": "í•케언 섬", + "PR": "푸ì—르토리코", + "PS": "íŒ”ë ˆìŠ¤íƒ€ì¸ ì§€êµ¬", + "PT": "í¬ë¥´íˆ¬ê°ˆ", + "PW": "팔ë¼ìš°", + "PY": "파ë¼ê³¼ì´", + "QA": "카타르", + "RE": "리유니온", + "RO": "루마니아", + "RS": "세르비아", + "RU": "러시아", + "RW": "르완다", + "SA": "사우디아ë¼ë¹„ì•„", + "SB": "솔로몬 ì œë„", + "SC": "세ì´ì…¸", + "SD": "수단", + "SE": "스웨ë´", + "SG": "싱가í¬ë¥´", + "SH": "세ì¸íŠ¸í—¬ë ˆë‚˜", + "SI": "슬로베니아", + "SJ": "스발바르제ë„-얀마웬섬", + "SK": "슬로바키아", + "SL": "시ì—ë¼ë¦¬ì˜¨", + "SM": "산마리노", + "SN": "세네갈", + "SO": "소ë§ë¦¬ì•„", + "SR": "수리남", + "SS": "남수단", + "ST": "ìƒíˆ¬ë©” 프린시페", + "SV": "엘살바ë„르", + "SX": "신트마르턴", + "SY": "시리아", + "SZ": "스와질란드", + "TA": "트리스탄다쿠나", + "TC": "í„°í¬ìФ ì¼€ì´ì»¤ìФ ì œë„", + "TD": "차드", + "TF": "프랑스 남부 지방", + "TG": "토고", + "TH": "태국", + "TJ": "타지키스탄", + "TK": "토켈ë¼ìš°", + "TL": "ë™í‹°ëª¨ë¥´", + "TM": "투르í¬ë©”니스탄", + "TN": "튀니지", + "TO": "통가", + "TR": "터키", + "TT": "트리니다드 토바고", + "TV": "투발루", + "TW": "대만", + "TZ": "탄ìžë‹ˆì•„", + "UA": "ìš°í¬ë¼ì´ë‚˜", + "UG": "우간다", + "UM": "미국령 해외 ì œë„", + "UN": "유엔", + "US": "미국", + "UY": "우루과ì´", + "UZ": "우즈베키스탄", + "VA": "바티칸 시국", + "VC": "세ì¸íŠ¸ë¹ˆì„¼íŠ¸ê·¸ë ˆë‚˜ë”˜", + "VE": "베네수엘ë¼", + "VG": "ì˜êµ­ë ¹ 버진아ì¼ëžœë“œ", + "VI": "미국령 버진아ì¼ëžœë“œ", + "VN": "베트남", + "VU": "바누아투", + "WF": "왈리스-푸투나 ì œë„", + "WS": "사모아", + "XK": "코소보", + "YE": "예멘", + "YT": "마요트", + "ZA": "남아프리카", + "ZM": "잠비아", + "ZW": "ì§ë°”브웨" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ko_KP.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ko_KP.json new file mode 100644 index 0000000000000000000000000000000000000000..c9188ad4667be2edf586313a01caa293b77390ba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ko_KP.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "KP": "조선민주주ì˜ì¸ë¯¼ê³µí™”êµ­" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ks.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ks.json new file mode 100644 index 0000000000000000000000000000000000000000..77daec5ec9f49f06b09edc63c58e633fa0dbfc65 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ks.json @@ -0,0 +1,246 @@ +{ + "Version": "2.1.30.6", + "Names": { + "AD": "اٮ۪نڑورا", + "AE": "Ù…ÙØªØ­Ø¯Û عرَب امارات", + "AF": "Ø§ÙŽÙØºØ§Ù†ÙŽØ³ØªØ§Ù†", + "AG": "اٮ۪نٹÙÚ¯Ùوا تÛÙ• باربوڑا", + "AI": "انگوئیلا", + "AL": "اٮ۪لبانÙیا", + "AM": "اَرمانÙیا", + "AO": "انگولا", + "AQ": "اینٹارٹÙکا", + "AR": "أرجَنٹینا", + "AS": "اَمریٖکَن سَموا", + "AT": "آسٹÙیا", + "AU": "آسٹریلÙیا", + "AW": "اَروٗبا", + "AX": "ایلینٛڑ جٔزیٖرٕ", + "AZ": "آزَرباجان", + "BA": "بوسنÙیا تÛÙ• ÛَرزÙگووÙنا", + "BB": "باربیڈاس", + "BD": "بَنٛگلادیش", + "BE": "بیٛلجÙیَم", + "BF": "Ø¨ÙØ±Ú©Ùنا Ùیسو", + "BG": "بَلجیرÙیا", + "BH": "بحریٖن", + "BI": "بورَنڈÙ", + "BJ": "بÙÙ†ÙÙ†", + "BL": "سینٛٹ بارتَھیلمی", + "BM": "بٔرمیوڈا", + "BN": "Ø¨ÙØ±Ù†Ù”Û’", + "BO": "بولÙÙˆÙیا", + "BQ": "برطانوی Ù‚ÙØ·Ø¨Û٠جَنوٗبی علاقÛÙ•", + "BR": "برٛازÙÙ„", + "BS": "Ø¨ÙŽÛØ§Ù…َس", + "BT": "بوٗٹان", + "BW": "بوتَسوانا", + "BY": "بیلاروٗس", + "BZ": "Ø¨ÛŒÙ„ÙØ¬", + "CA": "کینَڑا", + "CC": "کوکَس کیٖلÙÙ†Ù›Ú¯ جٔزیٖرٕ", + "CD": "کونٛگو Ú©Ùنشاسا", + "CF": "مرکٔزی Ø§ÙŽÙØ±ÛŒÙ–Ú©ÛŒ جموٗریَت", + "CG": "کونٛگو بٔرٛزاوÙÙ„ÛŒ", + "CH": "سÙÙˆÙØ²ÙŽØ±Ù„ینٛڑ", + "CI": "اَیوٕری کوسٹ", + "CK": "Ú©ÙÚ© جٔزیٖرٕ", + "CL": "Ú†ÙÙ„ÛŒ", + "CM": "Ú©ÛŒÙšÙ…ÙØ±ÙˆÙ—Ù†", + "CN": "چیٖن", + "CO": "کولَمبÙیا", + "CR": "کوسٹا رÙکا", + "CU": "کیوٗبا", + "CV": "کیپ ؤرڑی", + "CX": "Ú©Ø±ÙØ³Ù…َس جٔزیٖرٕ", + "CY": "Ø³Ø§ÛŒÙØ±Ù›Ø³", + "CZ": "چیک جَموٗرÙیَت", + "DE": "جرمٔنی", + "DJ": "Ø¬ÙØ¨ÙˆÙ—تی", + "DK": "ڈینٛمارٕک", + "DM": "ڈومÙÙ†Ùکا", + "DO": "ڈومÙÙ†ÙÚ©ÙŽÙ† جموٗرÙیَت", + "DZ": "اٮ۪لجیرÙیا", + "EC": "اÙکواڑور", + "EE": "ایسٹونÙیا", + "EG": "Ù…ÙØ³Ù”ر", + "EH": "مشرÙÙ‚ÛŒ Ø³ÙŽÛØ§Ø±Ø§", + "ER": "Ø§ÙØ±Ù•Ù¹Ùیا", + "ES": "سٕپین", + "ET": "Ø§ÙØªÚ¾ÙˆÙ¾Ùیا", + "FI": "ÙÙنلینٛڑ", + "FJ": "ÙÙØ¬ÛŒ", + "FK": "Ùٕلاکلینٛڑ جٔزیٖرٕ", + "FR": "ÙØ±Ù›Ø§Ù†Ø³", + "GA": "گیبان", + "GB": "ÛŒÙنایٹÙÚ‘ Ú©ÙÙ†Ù›Ú¯ÚˆÙŽÙ…", + "GD": "گرٛنیڑا", + "GE": "جارجÙیا", + "GF": "ÙØ±Ù›Ø§Ù†Ø³Ùسی Ú¯ÙØ§Ù†Ø§", + "GG": "گیوَنَرسے", + "GH": "گانا", + "GI": "Ø¬ÙØ¨Ø±Ø§Ù„ٹَر", + "GL": "گریٖنلینٛڑ", + "GM": "گَمبÙیا", + "GN": "Ú¯ÙÙ†ÛŒ", + "GP": "گَواڑیلوپ", + "GQ": "اÙÚ©ÙˆÙٹورÙیَل Ú¯ÙÙ†ÛŒ", + "GR": "گریٖس", + "GS": "جنوٗبی جارجÙیا تÛÙ• جنوٗبی سینٛڑوٕچ جٔزیٖرٕ", + "GT": "گوتیدالا", + "GU": "Ú¯Ùوام", + "GW": "گیٖنی Ø¨ÙØ³Ø§Ùˆ", + "GY": "Ú¯Ùیانا", + "HK": "ÛØ§Ù†Ù›Ú¯ کانٛگ ایس اے آر چیٖن", + "HN": "ÛØ§Ù†Ù›ÚˆÙˆÙ—Ø±ÙØ³", + "HR": "کرٛوشÙیا", + "HT": "ÛØ§ÛŒØªÛŒ", + "HU": "Ûَنٛگری", + "ID": "اÙنڑونیشÙیا", + "IE": "اَیَرلینٛڑ", + "IL": "Ø§ÙØ³Ø±Ø§ÛŒÙ–Ù„", + "IM": "Ø¢ÛŒÙÙ„ آ٠میٛن", + "IN": "ÛÙنٛدوستان", + "IO": "برطانوی بحر٠ÛÙÙ†Ù›Ø¯Û Ø¹Ù„Ø§Ù‚ÛÙ•", + "IQ": "ایٖراق", + "IR": "ایٖران", + "IS": "Ø§ÙŽÛŒÙØ³Ù„ینٛڑ", + "IT": "اÙٹلی", + "JE": "جٔرسی", + "JM": "جَمایکا", + "JP": "جاپان", + "KE": "Ú©Ùنٛیا", + "KG": "Ú©ÙØ±Ú¯Ùستان", + "KH": "کَمبوڑÙیا", + "KI": "Ú©ÙØ±Ù•باتی", + "KM": "کَمورَس", + "KN": "سینٛٹ Ú©Ùٹَس تÛÙ• Ù†ÛŒÙˆÙØ³", + "KP": "Ø´Ùمٲلی کورÙیا", + "KR": "جنوٗبی کورÙیا", + "KW": "Ú©Ùویت", + "KY": "کیمَن جٔزیٖرٕ", + "KZ": "Ú©ÙŽØ²Ø§Ú©ÙØ³ØªØ§Ù†", + "LA": "لاس", + "LB": "لٮ۪بنان", + "LC": "سینٛٹ لوٗسÙیا", + "LI": "Ù„Ùکٹیٛسٹیٖن", + "LK": "Ø³ÙØ±ÛŒÙ–لَنٛکا", + "LR": "لایبیرÙیا", + "LS": "لیسوتھو", + "LT": "Ù„ÙØªÚ¾ÙوانÙیا", + "LU": "لَکسَمبٔرٕگ", + "LV": "لیٛٹوÙیا", + "LY": "Ù„ÙØ¨ÛŒØ§", + "MA": "موروکو", + "MC": "مونیٚکو", + "MD": "مولڑاوÙیا", + "ME": "Ù…ÙˆÙ¹ÙˆÙ†ÛŒÙ›Ú¯ÙØ±ÛŒÙˆ", + "MF": "سینٛٹ مارٹÙÙ†", + "MG": "میڑاگاسکار", + "MH": "مارشَل جٔزیٖرٕ", + "MK": "مٮ۪سوڑونÙیا", + "ML": "مالی", + "MM": "مَیَنما بٔرما", + "MN": "مَنٛگولÙیا", + "MO": "مَکاوو ایس اے آر چیٖن", + "MP": "Ø´Ùمٲلی مارÙیانا جٔزیٖرٕ", + "MQ": "مارٹÙÙ†ÙÚ©", + "MR": "مارٕٹانÙیا", + "MS": "مانٛٹسیراٹ", + "MT": "مالٹا", + "MU": "Ù…ÙˆØ±ÙØ´ÙŽØ³", + "MV": "مالدیٖو", + "MW": "ملاوی", + "MX": "مٮ۪کسÙÚ©Ùˆ", + "MY": "مَلیشÙیا", + "MZ": "موزَمبÙÚ©", + "NA": "Ù†Ø§Ù…ÙØ¨Ùیا", + "NC": "Ù†ÙÙˆ کیلÙڑونÙیا", + "NE": "نایجَر", + "NF": "Ù†Ø§Ø±ÙØ§Ú© جٔزیٖرٕ", + "NG": "نایجیرÙیا", + "NI": "ناکاراگÙوا", + "NL": "نیٖدَرلینٛڑ", + "NO": "ناروے", + "NP": "نیپال", + "NR": "نارووٗ", + "NU": "نیوٗ", + "NZ": "نیوٗزÙلینٛڑ", + "OM": "اومان", + "PA": "پَناما", + "PE": "پیٖروٗ", + "PF": "ÙØ±Ù›Ø§Ù†Ø³ÛŒ پولÙنیشÙیا", + "PG": "پاپÙوا نیوٗ گیٖنی", + "PH": "ÙÙÙ„ÙÙ¾Ùینس", + "PK": "Ù¾Ø§Ú©ÙØ³ØªØ§Ù†", + "PL": "پولینٛڑ", + "PM": "سینٛٹ پیٖری تÛÙ• موکیلÙیَن", + "PN": "Ù¾ÙÙ¹Ú©ÛŒØ±Ù•Ù†Û Ø¬Ù”Ø²ÛŒÙ–Ø±Ù•", + "PR": "پٔرٹو رÙÚ©Ùˆ", + "PS": "Ùَلَستیٖن", + "PT": "Ù¾ÙØ±ØªÙگال", + "PW": "پَلاو", + "PY": "پَراگÙÛ’", + "QA": "Ù‚ÙŽØ·ÙØ±", + "RE": "رÙیوٗنÙیَن", + "RO": "رومانÙیا", + "RS": "سَربÙیا", + "RU": "روٗس", + "RW": "روٗوانٛڈا", + "SA": "سوٗدی عربÙÛŒÛ", + "SB": "سولامان جٔزیٖرٕ", + "SC": "Ø³ÛŒØ´ÙŽÙ„ÙØ³", + "SD": "سوٗڈان", + "SE": "سÙÙˆÙÚˆÙŽÙ†", + "SG": "ٛسÙنٛگاپوٗر", + "SH": "سینٛٹ ÛÙ®ÛªÙ„Ùنا", + "SI": "سَلووینÙیا", + "SJ": "سَوالبریڑ تÛÙ• جان ماییڑ", + "SK": "سَلوواکÙیا", + "SL": "سیٖرالیوون", + "SM": "سین میرÙنو", + "SN": "سینیگَل", + "SO": "سومالÙیا", + "SR": "Ø³ÙØ±Ùنام", + "ST": "ساو توم تÛÙ• پرٛنسÙÙ¾ÛŒ", + "SV": "اٮ۪ل سَلواڑور", + "SY": "شام", + "SZ": "سÙوزÙلینٛڑ", + "TC": "ØªÙØ±ÙÚ© تÛÙ• کیکوس جٔزیٖرٕ", + "TD": "چاڑ", + "TF": "ÙØ±Ù›Ø§Ù†Ø³Ùسی جَنوٗبی عَلاقÛÙ•", + "TG": "ٹوگو", + "TH": "تھایلینٛڑ", + "TJ": "ØªØ§Ø¬Ú©ÙØ³ØªØ§Ù†", + "TK": "توکیلاو", + "TL": "مَشرÙÙ‚ÛŒ تایمور", + "TM": "ØªÙØ±Ù…ÙÙ†ÙØ³ØªØ§Ù†", + "TN": "ٹونیشÙیا", + "TO": "ٹونٛگا", + "TR": "ØªÙØ±Ú©ÛŒ", + "TT": "ٹرٛنÙنداد تÛÙ• ٹوبیگو", + "TV": "توٗوالوٗ", + "TW": "تایوان", + "TZ": "تَنجانÙیا", + "UA": "یوٗرÙکین", + "UG": "یوٗگانٛڑا", + "UM": "یوٗنایٹÙÚ‘ سÙÙ¹ÛŒÙ¹ÙØ³ ماینَر آوÙٹلییÙÙ†Ù›Ú¯ جٔزیٖرٕ", + "US": "یوٗنایٹÙÚ‘ سÙÙ¹ÛŒÙ¹ÙØ³", + "UY": "یوٗروگے", + "UZ": "Ø§ÙØ²Ø¨ÙÚ©ÙØ³ØªØ§Ù†", + "VA": "ویٹÙÚ©ÙŽÙ† سÙÙ¹ÛŒ", + "VC": "سینٛٹ وینسٮ۪ٹ تÛÙ• گرٛیناڑاینٕز", + "VE": "وینازوٗلا", + "VG": "بَرطانوی ؤرجÙÙ† جٔزیٖرٕ", + "VI": "یوٗ ایس ؤرجÙÙ† جٔزیٖرٕ", + "VN": "ویٹÙنام", + "VU": "وانوٗتوٗ", + "WF": "ÙˆØ§Ù„ÙØ³ تÛÙ• Ùیوٗچوٗنا", + "WS": "سیمووا", + "YE": "یَمَن", + "YT": "مَییٹ", + "ZA": "جَنوٗبی Ø§ÙŽÙØ±ÛŒÙ–کا", + "ZM": "جامبÙیا", + "ZW": "زÙمبابے" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/kw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/kw.json new file mode 100644 index 0000000000000000000000000000000000000000..27581e9038ce0135bc632d1699ac0d5229020bf5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/kw.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "GB": "Rywvaneth Unys" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ky.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ky.json new file mode 100644 index 0000000000000000000000000000000000000000..5b39903957d9069bc7c64684a5a16ca0c2f96f86 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ky.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "ÐÑÑеншин аралы", + "AD": "Ðндорра", + "AE": "Бириккен Ðраб Эмираттары", + "AF": "ÐфганиÑтан", + "AG": "Ðнтигуа жана Барбуда", + "AI": "Ðнгуила", + "AL": "ÐлбаниÑ", + "AM": "ÐрмениÑ", + "AO": "Ðнгола", + "AQ": "Ðнтарктика", + "AR": "Ðргентина", + "AS": "Ðмерика СамоаÑÑ‹", + "AT": "ÐвÑтриÑ", + "AU": "ÐвÑтралиÑ", + "AW": "Ðруба", + "AX": "Ðланд аралдары", + "AZ": "Ðзербайжан", + "BA": "БоÑÐ½Ð¸Ñ Ð¶Ð°Ð½Ð° Герцеговина", + "BB": "БарбадоÑ", + "BD": "Бангладеш", + "BE": "БельгиÑ", + "BF": "Буркина-ФаÑо", + "BG": "БолгариÑ", + "BH": "Бахрейн", + "BI": "Бурунди", + "BJ": "Бенин", + "BL": "Сент Бартелеми", + "BM": "Бермуд аралдары", + "BN": "Бруней", + "BO": "БоливиÑ", + "BQ": "Кариб Ðидерланддары", + "BR": "БразилиÑ", + "BS": "Багам аралдары", + "BT": "Бутан", + "BW": "БотÑвана", + "BY": "БеларуÑÑŒ", + "BZ": "Белиз", + "CA": "Канада", + "CC": "ÐšÐ¾ÐºÐ¾Ñ (Килиӊ) аралдары", + "CD": "Конго-КиншаÑа", + "CF": "Борбордук Ðфрика РеÑпубликаÑÑ‹", + "CG": "Конго-Браззавил", + "CH": "ШвейцариÑ", + "CI": "Кот-д’Ивуар", + "CK": "Кук аралдары", + "CL": "Чили", + "CM": "Камерун", + "CN": "Кытай", + "CO": "КолумбиÑ", + "CR": "КоÑта-Рика", + "CU": "Куба", + "CV": "Капе Верде", + "CW": "КюраÑао", + "CX": "КриÑÐ¼Ð°Ñ Ð°Ñ€Ð°Ð»Ñ‹", + "CY": "Кипр", + "CZ": "Чех РеÑпубликаÑÑ‹", + "DE": "ГерманиÑ", + "DG": "Диего ГарÑиÑ", + "DJ": "Джибути", + "DK": "ДаниÑ", + "DM": "Доминика", + "DO": "Доминика РеÑпубликаÑÑ‹", + "DZ": "Ðлжир", + "EA": "Сеута жана Мелилла", + "EC": "Эквадор", + "EE": "ЭÑтониÑ", + "EG": "Египет", + "EH": "Батыш Сахара", + "ER": "ЭритреÑ", + "ES": "ИÑпаниÑ", + "ET": "ЭфиопиÑ", + "FI": "ФинлÑндиÑ", + "FJ": "Фиджи", + "FK": "ФолклÑнд аралдары", + "FM": "МикронезиÑ", + "FO": "Фарер аралдары", + "FR": "ФранциÑ", + "GA": "Габон", + "GB": "Улуу БританиÑ", + "GD": "Гренада", + "GE": "ГрузиÑ", + "GF": "Гвиана (ФранциÑ)", + "GG": "ГернÑи", + "GH": "Гана", + "GI": "Гибралтар", + "GL": "ГренландиÑ", + "GM": "ГамбиÑ", + "GN": "ГвинеÑ", + "GP": "Гваделупа", + "GQ": "Экваториалдык ГвинеÑ", + "GR": "ГрециÑ", + "GS": "Түштүк Ð–Ð¾Ñ€Ð¶Ð¸Ñ Ð¶Ð°Ð½Ð° Түштүк СÑндвич аралдары", + "GT": "Гватемала", + "GU": "Гуам", + "GW": "ГвинеÑ-БиÑау", + "GY": "Гайана", + "HK": "Гонконг Кытай ÐÐÐ", + "HN": "ГондураÑ", + "HR": "ХорватиÑ", + "HT": "Гаити", + "HU": "ВенгриÑ", + "IC": "Канар аралдары", + "ID": "ИндонезиÑ", + "IE": "ИрландиÑ", + "IL": "Израиль", + "IM": "МÑн аралы", + "IN": "ИндиÑ", + "IO": "БританиÑнын Ð˜Ð½Ð´Ð¸Ñ Ð¾ÐºÐµÐ°Ð½Ñ‹Ð½Ð´Ð°Ð³Ñ‹ аймагы", + "IQ": "Ирак", + "IR": "Иран", + "IS": "ИÑландиÑ", + "IT": "ИталиÑ", + "JE": "ЖерÑи", + "JM": "Ямайка", + "JO": "ИорданиÑ", + "JP": "ЯпониÑ", + "KE": "КениÑ", + "KG": "КыргызÑтан", + "KH": "Камбоджа", + "KI": "Кирибати", + "KM": "КомороÑ", + "KN": "Сент-ÐšÐ¸Ñ‚Ñ Ð¶Ð°Ð½Ð° ÐевиÑ", + "KP": "Түндүк КореÑ", + "KR": "Түштүк КореÑ", + "KW": "Кувейт", + "KY": "Кайман Ðралдары", + "KZ": "КазакÑтан", + "LA": "ЛаоÑ", + "LB": "Ливан", + "LC": "Сент-ЛюÑиÑ", + "LI": "Лихтенштейн", + "LK": "Шри-Ланка", + "LR": "ЛибериÑ", + "LS": "ЛеÑото", + "LT": "Литва", + "LU": "ЛюкÑембург", + "LV": "ЛатвиÑ", + "LY": "ЛивиÑ", + "MA": "Марокко", + "MC": "Монако", + "MD": "Молдова", + "ME": "ЧерногориÑ", + "MF": "Сент-Мартин", + "MG": "МадагаÑкар", + "MH": "Маршалл аралдары", + "MK": "МакедониÑ", + "ML": "Мали", + "MM": "МьÑнма (Бирма)", + "MN": "МонголиÑ", + "MO": "Макау Кытай ÐÐÐ", + "MP": "Түндүк Мариана аралдары", + "MQ": "Мартиника", + "MR": "МавританиÑ", + "MS": "МонÑеррат", + "MT": "Мальта", + "MU": "Маврикий", + "MV": "Малдив аралдары", + "MW": "Малави", + "MX": "МекÑика", + "MY": "МалайзиÑ", + "MZ": "Мозамбик", + "NA": "ÐамибиÑ", + "NC": "Жаӊы КаледониÑ", + "NE": "Ðигер", + "NF": "Ðорфолк аралы", + "NG": "ÐигериÑ", + "NI": "Ðикарагуа", + "NL": "Ðидерланддар", + "NO": "ÐорвегиÑ", + "NP": "Ðепал", + "NR": "Ðауру", + "NU": "ÐиуÑ", + "NZ": "Жаӊы ЗеландиÑ", + "OM": "Оман", + "PA": "Панама", + "PE": "Перу", + "PF": "Француз ПолинезиÑÑÑ‹", + "PG": "Папуа Жаңы-ГвинеÑ", + "PH": "Филлипин", + "PK": "ПакиÑтан", + "PL": "Польша", + "PM": "Сен-Пьер жана Микелон", + "PN": "ПиткÑрн аралдары", + "PR": "ПуÑрто-Рико", + "PS": "ПалеÑтина аймактары", + "PT": "ПортугалиÑ", + "PW": "Палау", + "PY": "Парагвай", + "QA": "Катар", + "RE": "Реюнион", + "RO": "РумыниÑ", + "RS": "СербиÑ", + "RU": "РоÑÑиÑ", + "RW": "Руанда", + "SA": "Сауд ÐрабиÑÑÑ‹", + "SB": "Соломон аралдары", + "SC": "Сейшелдер", + "SD": "Судан", + "SE": "ШвециÑ", + "SG": "Сингапур", + "SH": "Ыйык Елена", + "SI": "СловениÑ", + "SJ": "Свалбард жана Жан Майен", + "SK": "СловакиÑ", + "SL": "Сьерра-Леоне", + "SM": "Сан Марино", + "SN": "Сенегал", + "SO": "Сомали", + "SR": "Суринаме", + "SS": "Түштүк Судан", + "ST": "Сан-Томе жана ПринÑипи", + "SV": "Эл Салвадор", + "SX": "Синт Маартен", + "SY": "СириÑ", + "SZ": "Свазиленд", + "TA": "ТриÑтан да КуньÑ", + "TC": "Ð¢Ò¯Ñ€ÐºÑ Ð¶Ð°Ð½Ð° ÐšÐ°Ð¹ÐºÐ¾Ñ Ð°Ñ€Ð°Ð»Ð´Ð°Ñ€Ñ‹", + "TD": "Чад", + "TF": "ФранциÑнын Түштүктөгү аймактары", + "TG": "Того", + "TH": "Таиланд", + "TJ": "ТажикÑтан", + "TK": "Токелау", + "TL": "Тимор-ЛеÑте", + "TM": "ТүркмөнÑтан", + "TN": "ТуниÑ", + "TO": "Тонга", + "TR": "ТүркиÑ", + "TT": "Тринидад жана Тобаго", + "TV": "Тувалу", + "TW": "Тайвань", + "TZ": "ТанзаниÑ", + "UA": "Украина", + "UG": "Уганда", + "UM": "ÐКШнын Ñырткы аралдары", + "UN": "БУ", + "US": "Ðмерика Кошмо Штаттары", + "UY": "Уругвай", + "UZ": "ӨзбекÑтан", + "VA": "Ватикан", + "VC": "Сент-ВинÑент жана Гренадиналар", + "VE": "ВенеÑуÑла", + "VG": "Виргин аралдары (БританиÑ)", + "VI": "Виргин аралдары (ÐКШ)", + "VN": "Вьетнам", + "VU": "Вануату", + "WF": "Ð£Ð¾Ð»Ð»Ð¸Ñ Ð¶Ð°Ð½Ð° Футуна", + "WS": "Самоа", + "XK": "КоÑово", + "YE": "Йемен", + "YT": "Майотта", + "ZA": "Түштүк Ðфрика РеÑпубликаÑÑ‹", + "ZM": "ЗамбиÑ", + "ZW": "Зимбабве" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lb.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lb.json new file mode 100644 index 0000000000000000000000000000000000000000..806242bae7100eac408e2234f040800c90e2b801 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lb.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AC": "Ascension", + "AD": "Andorra", + "AE": "Vereenegt Arabesch Emirater", + "AF": "Afghanistan", + "AG": "Antigua a Barbuda", + "AI": "Anguilla", + "AL": "Albanien", + "AM": "Armenien", + "AO": "Angola", + "AQ": "Antarktis", + "AR": "Argentinien", + "AS": "Amerikanesch-Samoa", + "AT": "Éisträich", + "AU": "Australien", + "AW": "Aruba", + "AX": "Ã…landinselen", + "AZ": "Aserbaidschan", + "BA": "Bosnien an Herzegowina", + "BB": "Barbados", + "BD": "Bangladesch", + "BE": "Belsch", + "BF": "Burkina Faso", + "BG": "Bulgarien", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint-Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivien", + "BQ": "Karibescht Holland", + "BR": "Brasilien", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botsuana", + "BY": "Wäissrussland", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kokosinselen", + "CD": "Kongo-Kinshasa", + "CF": "Zentralafrikanesch Republik", + "CG": "Kongo-Brazzaville", + "CH": "Schwäiz", + "CI": "Côte d’Ivoire", + "CK": "Cookinselen", + "CL": "Chile", + "CM": "Kamerun", + "CN": "China", + "CO": "Kolumbien", + "CR": "Costa Rica", + "CU": "Kuba", + "CV": "Kap Verde", + "CW": "Curaçao", + "CX": "Chrëschtdagsinsel", + "CY": "Zypern", + "CZ": "Tschechien", + "DE": "Däitschland", + "DG": "Diego Garcia", + "DJ": "Dschibuti", + "DK": "Dänemark", + "DM": "Dominica", + "DO": "Dominikanesch Republik", + "DZ": "Algerien", + "EA": "Ceuta a Melilla", + "EC": "Ecuador", + "EE": "Estland", + "EG": "Egypten", + "EH": "Westsahara", + "ER": "Eritrea", + "ES": "Spanien", + "ET": "Ethiopien", + "FI": "Finnland", + "FJ": "Fidschi", + "FK": "Falklandinselen", + "FM": "Mikronesien", + "FO": "Färöer", + "FR": "Frankräich", + "GA": "Gabun", + "GB": "Groussbritannien", + "GD": "Grenada", + "GE": "Georgien", + "GF": "Guayane", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grönland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Equatorialguinea", + "GR": "Griicheland", + "GS": "Südgeorgien an déi Südlech Sandwichinselen", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Spezialverwaltungszon Hong Kong", + "HN": "Honduras", + "HR": "Kroatien", + "HT": "Haiti", + "HU": "Ungarn", + "IC": "Kanaresch Inselen", + "ID": "Indonesien", + "IE": "Irland", + "IL": "Israel", + "IM": "Isle of Man", + "IN": "Indien", + "IO": "Britescht Territorium am Indeschen Ozean", + "IQ": "Irak", + "IR": "Iran", + "IS": "Island", + "IT": "Italien", + "JE": "Jersey", + "JM": "Jamaika", + "JO": "Jordanien", + "JP": "Japan", + "KE": "Kenia", + "KG": "Kirgisistan", + "KH": "Kambodscha", + "KI": "Kiribati", + "KM": "Komoren", + "KN": "St. Kitts an Nevis", + "KP": "Nordkorea", + "KR": "Südkorea", + "KW": "Kuwait", + "KY": "Kaimaninselen", + "KZ": "Kasachstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "St. Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Litauen", + "LU": "Lëtzebuerg", + "LV": "Lettland", + "LY": "Libyen", + "MA": "Marokko", + "MC": "Monaco", + "MD": "Moldawien", + "ME": "Montenegro", + "MF": "St. Martin", + "MG": "Madagaskar", + "MH": "Marshallinselen", + "MK": "Mazedonien", + "ML": "Mali", + "MM": "Myanmar", + "MN": "Mongolei", + "MO": "Spezialverwaltungszon Macau", + "MP": "Nërdlech Marianen", + "MQ": "Martinique", + "MR": "Mauretanien", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldiven", + "MW": "Malawi", + "MX": "Mexiko", + "MY": "Malaysia", + "MZ": "Mosambik", + "NA": "Namibia", + "NC": "Neikaledonien", + "NE": "Niger", + "NF": "Norfolkinsel", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Holland", + "NO": "Norwegen", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Neiséiland", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Franséisch-Polynesien", + "PG": "Papua-Neiguinea", + "PH": "Philippinnen", + "PK": "Pakistan", + "PL": "Polen", + "PM": "St. Pierre a Miquelon", + "PN": "Pitcairninselen", + "PR": "Puerto Rico", + "PS": "Palestinensesch Autonomiegebidder", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Katar", + "RE": "Réunion", + "RO": "Rumänien", + "RS": "Serbien", + "RU": "Russland", + "RW": "Ruanda", + "SA": "Saudi-Arabien", + "SB": "Salomonen", + "SC": "Seychellen", + "SD": "Sudan", + "SE": "Schweden", + "SG": "Singapur", + "SH": "St. Helena", + "SI": "Slowenien", + "SJ": "Svalbard a Jan Mayen", + "SK": "Slowakei", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "SS": "Südsudan", + "ST": "São Tomé a Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syrien", + "SZ": "Swasiland", + "TA": "Tristan da Cunha", + "TC": "Turks- a Caicosinselen", + "TD": "Tschad", + "TF": "Franséisch Süd- an Antarktisgebidder", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tadschikistan", + "TK": "Tokelau", + "TL": "Osttimor", + "TM": "Turkmenistan", + "TN": "Tunesien", + "TO": "Tonga", + "TR": "Tierkei", + "TT": "Trinidad an Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tansania", + "UA": "Ukrain", + "UG": "Uganda", + "UM": "Amerikanesch-Ozeanien", + "US": "Vereenegt Staate vun Amerika", + "UY": "Uruguay", + "UZ": "Usbekistan", + "VA": "Vatikanstad", + "VC": "St. Vincent an d’Grenadinnen", + "VE": "Venezuela", + "VG": "Britesch Joffereninselen", + "VI": "Amerikanesch Joffereninselen", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis a Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Südafrika", + "ZM": "Sambia", + "ZW": "Simbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lg.json new file mode 100644 index 0000000000000000000000000000000000000000..b5035b952ac327f25c1189815b6f970aa1add96d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lg.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AD": "Andora", + "AE": "Emireeti", + "AF": "Afaganisitani", + "AG": "Antigwa ne Barabuda", + "AI": "Angwila", + "AL": "Alibaniya", + "AM": "Arameniya", + "AO": "Angola", + "AR": "Arigentina", + "AS": "Samowa omumerika", + "AT": "Awusituriya", + "AU": "Awusitureliya", + "AW": "Aruba", + "AZ": "Azerebayijaani", + "BA": "Boziniya Hezegovina", + "BB": "Barabadosi", + "BD": "Bangaladesi", + "BE": "Bubirigi", + "BF": "Burukina Faso", + "BG": "Bulugariya", + "BH": "Baareeni", + "BI": "Burundi", + "BJ": "Benini", + "BM": "Beremuda", + "BN": "Burunayi", + "BO": "Boliviya", + "BR": "Buraziiri", + "BS": "Bahamasi", + "BT": "Butaani", + "BW": "Botiswana", + "BY": "Belarusi", + "BZ": "Belize", + "CA": "Kanada", + "CD": "Kongo - Zayire", + "CF": "Lipubulika eya Senturafiriki", + "CG": "Kongo", + "CH": "Switizirandi", + "CI": "Kote Divwa", + "CK": "Bizinga bya Kkuki", + "CL": "Cile", + "CM": "Kameruuni", + "CN": "Cayina", + "CO": "Kolombya", + "CR": "Kosita Rika", + "CU": "Cuba", + "CV": "Bizinga by’e Kepu Veredi", + "CY": "Sipuriya", + "CZ": "Lipubulika ya Ceeka", + "DE": "Budaaki", + "DJ": "Jjibuti", + "DK": "Denimaaka", + "DM": "Dominika", + "DO": "Lipubulika ya Dominika", + "DZ": "Aligerya", + "EC": "Ekwado", + "EE": "Esitoniya", + "EG": "Misiri", + "ER": "Eritureya", + "ES": "Sipeyini", + "ET": "Esyopya", + "FI": "Finilandi", + "FJ": "Fiji", + "FK": "Bizinga by’eFalikalandi", + "FM": "Mikuronezya", + "FR": "Bufalansa", + "GA": "Gaboni", + "GB": "Bungereza", + "GD": "Gurenada", + "GE": "Gyogya", + "GF": "Guyana enfalansa", + "GH": "Gana", + "GI": "Giburalita", + "GL": "Gurenelandi", + "GM": "Gambya", + "GN": "Gini", + "GP": "Gwadalupe", + "GQ": "Gayana ey’oku ekweta", + "GR": "Bugereeki\/Buyonaani", + "GT": "Gwatemala", + "GU": "Gwamu", + "GW": "Gini-Bisawu", + "GY": "Gayana", + "HN": "Hundurasi", + "HR": "Kurowesya", + "HT": "Hayiti", + "HU": "Hangare", + "ID": "Yindonezya", + "IE": "Ayalandi", + "IL": "Yisirayeri", + "IN": "Buyindi", + "IO": "Bizinga by’eCago", + "IQ": "Yiraaka", + "IR": "Yiraani", + "IS": "Ayisirandi", + "IT": "Yitale", + "JM": "Jamayika", + "JO": "Yorodani", + "JP": "Japani", + "KE": "Kenya", + "KG": "Kirigizisitaani", + "KH": "Kambodya", + "KI": "Kiribati", + "KM": "Bizinga by’eKomoro", + "KN": "Senti Kitisi ne Nevisi", + "KP": "Koreya ey’omumambuka", + "KR": "Koreya ey’omumaserengeta", + "KW": "Kuweti", + "KY": "Bizinga ebya Kayimaani", + "KZ": "Kazakisitaani", + "LA": "Lawosi", + "LB": "Lebanoni", + "LC": "Senti Luciya", + "LI": "Licitensitayini", + "LK": "Sirilanka", + "LR": "Liberya", + "LS": "Lesoso", + "LT": "Lisuwenya", + "LU": "Lukisembaaga", + "LV": "Lativya", + "LY": "Libya", + "MA": "Moroko", + "MC": "Monako", + "MD": "Molodova", + "MG": "Madagasika", + "MH": "Bizinga bya Mariso", + "MK": "Masedoniya", + "ML": "Mali", + "MM": "Myanima", + "MN": "Mongoliya", + "MP": "Bizinga bya Mariyana eby’omumambuka", + "MQ": "Maritiniiki", + "MR": "Mawulitenya", + "MS": "Monteseraati", + "MT": "Malita", + "MU": "Mawulisyasi", + "MV": "Bizinga by’eMalidive", + "MW": "Malawi", + "MX": "Mekisiko", + "MY": "Malezya", + "MZ": "Mozambiiki", + "NA": "Namibiya", + "NC": "Kaledonya mupya", + "NE": "Nije", + "NF": "Kizinga ky’eNorofoko", + "NG": "Nayijerya", + "NI": "Nikaraguwa", + "NL": "Holandi", + "NO": "Nowe", + "NP": "Nepalo", + "NR": "Nawuru", + "NU": "Niyuwe", + "NZ": "Niyuziirandi", + "OM": "Omaani", + "PA": "Panama", + "PE": "Peru", + "PF": "Polinesiya enfalansa", + "PG": "Papwa Nyugini", + "PH": "Bizinga bya Firipino", + "PK": "Pakisitaani", + "PL": "Polandi", + "PM": "Senti Piyere ne Mikeloni", + "PN": "Pitikeeni", + "PR": "Potoriko", + "PS": "Palesitayini", + "PT": "Potugaali", + "PW": "Palawu", + "PY": "Paragwayi", + "QA": "Kataa", + "RE": "Leyunyoni", + "RO": "Lomaniya", + "RU": "Lasa", + "RW": "Rwanda", + "SA": "Sawudarebya - Buwarabu", + "SB": "Bizanga by’eSolomooni", + "SC": "Sesere", + "SD": "Sudaani", + "SE": "Swideni", + "SG": "Singapowa", + "SH": "Senti Herena", + "SI": "Sirovenya", + "SK": "Sirovakya", + "SL": "Siyeralewone", + "SM": "Sanimarino", + "SN": "Senegaalo", + "SO": "Somaliya", + "SR": "Surinaamu", + "ST": "Sanitome ne Purincipe", + "SV": "El salivado", + "SY": "Siriya", + "SZ": "Swazirandi", + "TC": "Bizinga by’eTaaka ne Kayikosi", + "TD": "Caadi", + "TG": "Togo", + "TH": "Tayirandi", + "TJ": "Tajikisitaani", + "TK": "Tokelawu", + "TL": "Timowa", + "TM": "Takimenesitaani", + "TN": "Tunisya", + "TO": "Tonga", + "TR": "Ttake", + "TT": "Turindaadi ne Tobago", + "TV": "Tuvalu", + "TW": "Tayiwani", + "TZ": "Tanzaniya", + "UA": "Yukurayine", + "UG": "Yuganda", + "US": "Amerika", + "UY": "Wurugwayi", + "UZ": "Wuzibekisitaani", + "VA": "Vatikaani", + "VC": "Senti Vinsenti ne Gurendadiini", + "VE": "Venzwera", + "VG": "Bizinga ebya Virigini ebitwalibwa Bungereza", + "VI": "Bizinga bya Virigini eby’Amerika", + "VN": "Vyetinaamu", + "VU": "Vanawuwatu", + "WF": "Walisi ne Futuna", + "WS": "Samowa", + "YE": "Yemeni", + "YT": "Mayotte", + "ZA": "Sawusafirika", + "ZM": "Zambya", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ln.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ln.json new file mode 100644 index 0000000000000000000000000000000000000000..0328c1a2d4d0b887fb1c6cd2b24e861b1f9e5dfe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ln.json @@ -0,0 +1,235 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AD": "AndorÉ›", + "AE": "LÉ›mila alabo", + "AF": "Afiganisitá", + "AG": "Antiga mpé Barbuda", + "AI": "AngiyÉ›", + "AL": "Alibani", + "AM": "AmÉ›ni", + "AO": "Angóla", + "AQ": "Antarctique", + "AR": "ArizantinÉ›", + "AS": "Samoa ya Ameriki", + "AT": "Otilisi", + "AU": "Ositáli", + "AW": "Aruba", + "AZ": "AzÉ›lÉ›baizá", + "BA": "Bosini mpé Hezegovine", + "BB": "BarÉ›badÉ›", + "BD": "BengalidÉ›si", + "BE": "Beleziki", + "BF": "Bukina Faso", + "BG": "Biligari", + "BH": "BahrÉ›nÉ›", + "BI": "Burundi", + "BJ": "BenÉ›", + "BM": "Bermuda", + "BN": "Brineyi", + "BO": "Bolivi", + "BR": "BrezílÉ›", + "BS": "BahamasÉ›", + "BT": "Butáni", + "BW": "Botswana", + "BY": "Byelorisi", + "BZ": "BelizÉ›", + "CA": "Kanada", + "CD": "Republíki ya Kongó Demokratíki", + "CF": "Repibiki ya Afríka ya Káti", + "CG": "Kongo", + "CH": "SwisÉ›", + "CI": "KotídivualÉ›", + "CK": "Bisanga bya KookÉ›", + "CL": "Síli", + "CM": "KamÉ›rune", + "CN": "SinÉ›", + "CO": "Kolombi", + "CR": "Kositarika", + "CU": "Kiba", + "CV": "Bisanga bya KapevÉ›rÉ›", + "CY": "SípÉ›lÉ›", + "CZ": "Repibiki TsekÉ›", + "DE": "Alemani", + "DJ": "Dzibuti", + "DK": "DanÉ›marike", + "DM": "Domínike", + "DO": "Repibiki ya DomínikÉ›", + "DZ": "AlizÉ›ri", + "EC": "EkwatÉ›ÌlÉ›", + "EE": "Esitoni", + "EG": "Ezípite", + "ER": "ElitelÉ›", + "ES": "Esipanye", + "ET": "Etsíopi", + "FI": "FilandÉ›", + "FJ": "Fidzi", + "FK": "Bisanga bya Maluni", + "FM": "Mikronezi", + "FR": "FalánsÉ›", + "GA": "GabÉ”", + "GB": "AngÉ›lÉ›tÉ›ÌlÉ›", + "GD": "GelenadÉ›", + "GE": "Zorzi", + "GF": "GiyanÉ› ya FalánsÉ›", + "GG": "Guernesey", + "GH": "Gana", + "GI": "ZibatalÉ›", + "GL": "Gowelande", + "GM": "Gambi", + "GN": "GinÉ›", + "GP": "GwadÉ›lupÉ›", + "GQ": "GinÉ›ÌkwatÉ›ÌlÉ›", + "GR": "Geleki", + "GS": "ÃŽles de Géorgie du Sud et Sandwich du Sud", + "GT": "Gwatémala", + "GU": "GwamÉ›", + "GW": "GinÉ›bisau", + "GY": "Giyane", + "HN": "OndurasÉ›", + "HR": "Krowasi", + "HT": "Ayiti", + "HU": "Ongili", + "ID": "Indonezi", + "IE": "IrelandÉ›", + "IL": "IsirayelÉ›", + "IN": "ÃndÉ›", + "IO": "Mabelé ya AngÉ›lÉ›tÉ›ÌlÉ› na mbú ya Indiya", + "IQ": "Iraki", + "IR": "Irâ", + "IS": "IsilandÉ›", + "IT": "Itali", + "JM": "Zamaiki", + "JO": "ZÉ”dani", + "JP": "ZapÉ”", + "KE": "Kenya", + "KG": "Kigizisitá", + "KH": "Kambodza", + "KI": "Kiribati", + "KM": "KomorÉ›", + "KN": "Sántu krístofe mpé Nevɛ̀s", + "KP": "KorÉ› ya nÉ”Ìrdi", + "KR": "KorÉ› ya súdi", + "KW": "Koweti", + "KY": "Bisanga bya Kayíma", + "KZ": "Kazakisitá", + "LA": "Lawosi", + "LB": "Libá", + "LC": "Sántu lisi", + "LI": "LishÉ›teni", + "LK": "Sirilanka", + "LR": "Libériya", + "LS": "Lesoto", + "LT": "Litwani", + "LU": "Likisambulu", + "LV": "Letoni", + "LY": "Libí", + "MA": "MarokÉ›", + "MC": "Monako", + "MD": "Molidavi", + "ME": "Monténégro", + "MG": "Madagasikari", + "MH": "Bisanga bya MarishalÉ›", + "MK": "MasedwanÉ›", + "ML": "Malí", + "MM": "Birmanie", + "MN": "Mongolí", + "MP": "Bisanga bya MarianÉ› ya nÉ”Ìrdi", + "MQ": "Martiniki", + "MR": "Moritani", + "MS": "MÉ”sera", + "MT": "MalitÉ›", + "MU": "MorisÉ›", + "MV": "MadívÉ›", + "MW": "Malawi", + "MX": "Meksike", + "MY": "Malezi", + "MZ": "Mozambíki", + "NA": "Namibi", + "NC": "Kaledoni ya sika", + "NE": "NizÉ›rÉ›", + "NF": "Esanga NorfokÉ›", + "NG": "Nizerya", + "NI": "Nikaragwa", + "NL": "OlandÉ›", + "NO": "NorivezÉ›", + "NP": "NepálÉ›", + "NR": "Nauru", + "NU": "Nyué", + "NZ": "ZelandÉ› ya sika", + "OM": "OmánÉ›", + "PA": "Panama", + "PE": "Péru", + "PF": "Polinezi ya FalánsÉ›", + "PG": "Papwazi GinÉ› ya sika", + "PH": "FilipinÉ›", + "PK": "Pakisitá", + "PL": "Poloni", + "PM": "Sántu pététo mpé MikelÉ”", + "PN": "Pikairni", + "PR": "PÉ”toriko", + "PS": "PalÉ›sine", + "PT": "PutúlugÉ›si", + "PW": "Palau", + "PY": "Palagwei", + "QA": "Katari", + "RE": "Lenyo", + "RO": "Romani", + "RS": "Serbie", + "RU": "Risí", + "RW": "Rwanda", + "SA": "Alabi SawuditÉ›", + "SB": "Bisanga SolomÉ”", + "SC": "SÉ›shÉ›lÉ›", + "SD": "Sudá", + "SE": "SwédÉ›", + "SG": "SingapurÉ›", + "SH": "Sántu eleni", + "SI": "Siloveni", + "SK": "Silovaki", + "SL": "Siera LeonÉ›", + "SM": "Sántu MarinÉ›", + "SN": "SenegalÉ›", + "SO": "Somali", + "SR": "SurinamÉ›", + "ST": "Sao Tomé mpé PresipÉ›", + "SV": "SavadÉ”rÉ›", + "SY": "Sirí", + "SZ": "Swazilandi", + "TC": "Bisanga bya Turki mpé Kaiko", + "TD": "Tsádi", + "TF": "Terres australes et antarctiques françaises", + "TG": "Togo", + "TH": "TailandÉ›", + "TJ": "Tazikisitá", + "TK": "Tokelau", + "TL": "TimorÉ› ya MoniÉ›lÉ›", + "TM": "TikÉ›ménisitá", + "TN": "Tinizi", + "TO": "Tonga", + "TR": "Tiliki", + "TT": "TinidadÉ› mpé Tobago", + "TV": "Tuvalu", + "TW": "Taiwanin", + "TZ": "Tanzani", + "UA": "IkrÉ›ni", + "UG": "Uganda", + "US": "Ameriki", + "UY": "Irigwei", + "UZ": "UzibÉ›kisitá", + "VA": "Vatiká", + "VC": "Sántu vesá mpé GelenadinÉ›", + "VE": "Venézuela", + "VG": "Bisanga bya Vierzi ya AngÉ›lÉ›tÉ›ÌlÉ›", + "VI": "Bisanga bya Vierzi ya Ameriki", + "VN": "ViyetinamÉ›", + "VU": "Vanuatu", + "WF": "WalisÉ› mpé Futuna", + "WS": "Samoa", + "YE": "YemÉ›nÉ›", + "YT": "MayotÉ›", + "ZA": "Afríka ya Súdi", + "ZM": "Zambi", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lo.json new file mode 100644 index 0000000000000000000000000000000000000000..421abaad9a41c1b46aa81aeb908581b83a214811 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lo.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "ເàºàº²àº°àº­àº²à»€àºŠàº™àºŠàº±àº™", + "AD": "ອັນດà»àº£àº²", + "AE": "ສະຫະລັດອາຣັບເອມິເຣດ", + "AF": "ອາຟàºàº²àº™àº´àº”ສະຖານ", + "AG": "à»àº­àº™àº—ິàºàº»àº§ à»àº¥àº° ບາບູດາ", + "AI": "à»àº­àº™àºàº¸àºàº¥àº²", + "AL": "à»àº­àº§à»€àºšà»€àº™àº", + "AM": "ອາເມເນàº", + "AO": "à»àº­àº‡à»‚àºàº¥àº²", + "AQ": "à»àº­àº™àº•າດຕິàºàº²", + "AR": "ອາເຈນທິນາ", + "AS": "ອາເມຣິàºàº² ຊາມົວ", + "AT": "ອອສເທຣàº", + "AU": "ອອສເຕຣເລàº", + "AW": "ອາຣູບາ", + "AX": "ຫມູ່ເàºàº²àº°à»‚ອລັນ", + "AZ": "ອາເຊີໄບຈານ", + "BA": "ບອດສະເນຠà»àº¥àº° à»àº®àºªà»‚àºàº§àºµàº™àº²", + "BB": "ບາບາໂດສ", + "BD": "ບັງàºàº°àº¥àº²à»€àº—ດ", + "BE": "ເບວຢຽມ", + "BF": "ເບີàºàº´àº™àº² ຟາໂຊ", + "BG": "ບັງàºàº²à»€àº£àº", + "BH": "ບາເຣນ", + "BI": "ບູຣຸນດິ", + "BJ": "ເບນິນ", + "BL": "ເຊນ ບາເທເລມີ", + "BM": "ເບີມິວດາ", + "BN": "ບຣູໄນ", + "BO": "ໂບລິເວàº", + "BQ": "ຄາຣິບບຽນ ເນເທີà»àº¥àº™", + "BR": "ບະເລຊີນ", + "BS": "ບາຮາມາສ", + "BT": "ພູຖານ", + "BW": "ບອດສະວານາ", + "BY": "ເບວບາຣຸສ", + "BZ": "ເບລີຊ", + "CA": "à»àº„ນາດາ", + "CC": "ຫມູ່ເàºàº²àº°à»‚àºà»‚àºàºª", + "CD": "ຄອງໂຠ- ຄິນຊາຊາ", + "CF": "ສາທາລະນະລັດອາຟຣິàºàº²àºàº²àº‡", + "CG": "ຄອງໂຠ- ບຣາຊາວິວ", + "CH": "ສະວິດເຊີà»àº¥àº™", + "CI": "ໂຄຕີ ວົວ", + "CK": "à»àº¹à»ˆà»€àºàº²àº°àº„ຸàº", + "CL": "ຈີເລ", + "CM": "ຄາເມຣູນ", + "CN": "ຈີນ", + "CO": "ໂຄລົມເບàº", + "CR": "ໂຄສຕາ ຣິàºàº²", + "CU": "ຄິວບາ", + "CV": "ເຄບ ເວີດ", + "CW": "ຄູຣາຊາວ", + "CX": "ເàºàº²àº°àº„ຣິສມາດ", + "CY": "ໄຊປຣັສ", + "CZ": "ສາທາລະນະລັດເຊັàº", + "DE": "ເຢàºàº¥àº°àº¡àº±àº™", + "DG": "ດິເອໂຠàºàº²à»€àºŠàº", + "DJ": "ຈິບູຕິ", + "DK": "ເດນມາàº", + "DM": "ໂດມີນິຄາ", + "DO": "ສາທາລະນະລັດ ໂດມິນິàºàº±àº™", + "DZ": "ອັລຈິເຣàº", + "EA": "ເຊວຕາ à»àº¥àº°à»€àº¡àº¥àº´àº™àº¥àº²", + "EC": "ເອàºàº§àº²àº”à»", + "EE": "ເອສໂຕເນàº", + "EG": "ອີຢິບ", + "EH": "ຊາຮາຣາຕາເວັນຕົàº", + "ER": "ເອຣິເທຣàº", + "ES": "ສະເປນ", + "ET": "ອີທິໂອເປàº", + "FI": "ຟິນà»àº¥àº™", + "FJ": "ຟິຈິ", + "FK": "ຫມູ່ເàºàº²àº°àºŸàº­àºà»àº¥àº™", + "FM": "ໄມໂຄຣນີເຊàº", + "FO": "ຫມູ່ເàºàº²àº°à»àºŸà»‚ຣ", + "FR": "àºàº£àº±à»ˆàº‡", + "GA": "àºàº²àºšàº­àº™", + "GB": "ສະຫະລາດຊະອະນາຈັàº", + "GD": "ເàºàº£à»€àº™àº”າ", + "GE": "ຈà»à»€àºˆàº", + "GF": "ເຟຣນຊ໌ àºàº¸àºàº­àº²àº™àº²", + "GG": "ເàºàºµàº™àºŠàºµ", + "GH": "àºàº²àº™àº²", + "GI": "ຈິບບຣອນທາ", + "GL": "àºàº£àºµàº™à»àº¥àº™", + "GM": "ສາທາລະນະລັດà»àºàº¡à»€àºšàº", + "GN": "àºàº´àº™àºµ", + "GP": "àºàº»àº§àº”າລູບ", + "GQ": "ເອຄົວໂທຣຽວ àºàºµàº™àºµ", + "GR": "àºàº£àºµàºŠ", + "GS": "à»àº¹à»ˆà»€àºàº²àº°àºˆà»à»€àºˆàº & ເຊົາ à»àºŠàº™àº§àº´àº”", + "GT": "àºàº»àº§à»€àº—ມາລາ", + "GU": "àºàº§àº²àº¡", + "GW": "àºàº´àº™àºµ-ບິສເຊົາ", + "GY": "àºàº²àºàº¢àº²àº™àº²", + "HK": "ຮອງàºàº»àº‡ ເຂດປົàºàº„ອງພິເສດ ຈີນ", + "HN": "ຮອນດູຣັສ", + "HR": "ໂຄຣເອເທàº", + "HT": "ໄຮຕິ", + "HU": "ຮັງàºàº²àº£àºµ", + "IC": "à»àº¹à»ˆà»€àºàº²àº°àº„ານາຣີ", + "ID": "ອິນໂດເນເຊàº", + "IE": "ໄອຣ໌à»àº¥àº™", + "IL": "ອິສຣາເອວ", + "IM": "ເອວ ອອບ à»àº¡àº™", + "IN": "ອິນເດàº", + "IO": "ເຂດà»àº”ນອັງàºàº´àº”ໃນມະຫາສະມຸດອິນເດàº", + "IQ": "ອີຣັàº", + "IR": "ອີຣານ", + "IS": "ໄອສà»àº¥àº™", + "IT": "ອິຕາລີ", + "JE": "ເຈີຊີ", + "JM": "ຈາໄມຄາ", + "JO": "ຈà»à»àº”ນ", + "JP": "àºàºµà»ˆàº›àº¸à»ˆàº™", + "KE": "ເຄນຢາ", + "KG": "ຄີàºàº´àºªàº–ານ", + "KH": "àºàº³àº›àº¹à»€àºˆàº", + "KI": "ຄິຣິບາທິ", + "KM": "ໂຄໂມໂຣສ", + "KN": "ເຊນ ຄິດ à»àº¥àº° ເນວິສ", + "KP": "ເàºàº»àº²àº«àº¥àºµà»€à»œàº·àº­", + "KR": "ເàºàº»àº²àº«àº¥àºµà»ƒàº•້", + "KW": "àºàº¹à»€àº§àº”", + "KY": "à»àº¹à»ˆà»€àºàº²àº° ເຄà»àº¡àº™", + "KZ": "ຄາຊັàºàºªàº°àº–ານ", + "LA": "ລາວ", + "LB": "ເລບານອນ", + "LC": "ເຊນ ລູເຊàº", + "LI": "ລິດເທນສະຕາàº", + "LK": "ສີລັງàºàº²", + "LR": "ລິເບີເຣàº", + "LS": "ເລໂຊໂທ", + "LT": "ລິທົວເນàº", + "LU": "ລຸàºàºŠàº³àºšàº»àº§", + "LV": "ລັດເວàº", + "LY": "ລິເບàº", + "MA": "ໂມຣັອàºà»‚ຄ", + "MC": "ໂມນາໂຄ", + "MD": "ໂມນໂດວາ", + "ME": "ມອນເຕເນໂàºàº£", + "MF": "ເຊນ ມາທິນ", + "MG": "ມາດາàºàº²àºªàºàº²", + "MH": "ຫມູ່ເàºàº²àº°àº¡àº²à»àºŠàº§", + "MK": "à»àº¡àºŠàº´à»‚ດເນàº", + "ML": "ມາລີ", + "MM": "ມຽນມາ (ເບີມາ)", + "MN": "ມອງໂàºà»€àº¥àº", + "MO": "ມາເàºàº»à»‰àº² ເຂດປົàºàº„ອງພິເສດ ຈີນ", + "MP": "ຫມູ່ເàºàº²àº°àº¡àº²à»àºŠàº§àº•ອນເຫນືອ", + "MQ": "ມາຕິນີàº", + "MR": "ມົວຣິເທເນàº", + "MS": "ມອນເຊີຣາດ", + "MT": "ມອນທາ", + "MU": "ມົວຣິຊຽສ", + "MV": "ມັນດິຟ", + "MW": "ມາລາວີ", + "MX": "ເມັàºàºŠàº´à»‚àº", + "MY": "ມາເລເຊàº", + "MZ": "ໂມà»àºŠàº¡àºšàº´àº", + "NA": "ນາມີເບàº", + "NC": "ນິວ ຄາເລໂດເນàº", + "NE": "ນິເຈີ", + "NF": "ເàºàº²àº°àº™à»à»‚ຟàº", + "NG": "ໄນຈີເຣàº", + "NI": "ນິàºàº„າຣາàºàº»àº§", + "NL": "ເນເທີà»àº¥àº™", + "NO": "ນà»à»€àº§", + "NP": "ເນປານ", + "NR": "ນາອູຣູ", + "NU": "ນີອູເອ", + "NZ": "ນິວຊີà»àº¥àº™", + "OM": "ໂອມານ", + "PA": "ພານາມາ", + "PE": "ເປຣູ", + "PF": "ເຟຣນຊ໌ ໂພລິນີເຊàº", + "PG": "ປາປົວນິວàºàºµàº™àºµ", + "PH": "ຟິລິບປິນ", + "PK": "ປາàºàº´àº”ສະຖານ", + "PL": "ໂປà»àº¥àº™", + "PM": "ເຊນ ປີà»àº­ ມິເàºàº§àº¥àº­àº™", + "PN": "à»àº¹à»ˆà»€àºàº²àº°àºžàº´àº”à»àº„ນ", + "PR": "ເພືອໂຕ ຣິໂàº", + "PS": "ດິນà»àº”ນ ປາເລສຕິນຽນ", + "PT": "ພອລທູໂàº", + "PW": "ປາລາວ", + "PY": "ພາຣາàºàº§àº", + "QA": "àºàº²àº•າ", + "RE": "ເຣອູນິàºàº»àº‡", + "RO": "ໂຣà»àº¡à»€àº™àº", + "RS": "ເຊີເບàº", + "RU": "ຣັດເຊàº", + "RW": "ຣວັນດາ", + "SA": "ຊາອຸດິ ອາຣາເບàº", + "SB": "ຫມູ່ເàºàº²àº°à»‚ຊໂລມອນ", + "SC": "ເຊເຊວເລສ", + "SD": "ຊູດານ", + "SE": "ສະວີເດັນ", + "SG": "ສິງàºàº°à»‚ປ", + "SH": "ເຊນ ເຮເລນາ", + "SI": "ສະໂລເວເນàº", + "SJ": "ສະວາບາ à»àº¥àº° à»àº¢àº™ ມາເຢນ", + "SK": "ສະໂລວາເàºàº", + "SL": "ເຊàºàº£àº² ລີໂອນ", + "SM": "à»àºŠàº™ ມາຣິໂນ", + "SN": "ເຊນີໂàºàº¥", + "SO": "ໂຊມາລີ", + "SR": "ຊູຣິນາມ", + "SS": "ຊູດານໃຕ້", + "ST": "ເຊົາທູເມ à»àº¥àº° ພຣິນຊິບ", + "SV": "ເອວ ຊà»àº§àº²àº”à»", + "SX": "ຊິນ ມາເທັນ", + "SY": "ຊີເຣàº", + "SZ": "ສະວາຊິà»àº¥àº™", + "TA": "ທຣິສຕັນ ດາ àºàº±àº™àº®àº²", + "TC": "à»àº¹à»ˆà»€àºàº²àº° ເທີຠà»àº¥àº° ໄຄໂຄສ", + "TD": "ຊາດ", + "TF": "ເຂດà»àº”ນທາງໃຕ້ຂອàºàº®àº±à»ˆàº‡", + "TG": "ໂຕໂàº", + "TH": "ໄທ", + "TJ": "ທາຈິàºàº´àº”ສະຖານ", + "TK": "ໂຕເàºà»€àº¥àº»àº²", + "TL": "ທິມà»-ເລສເຕ", + "TM": "ເທີàºà»€àº¡àº™àº´àºªàº°àº–ານ", + "TN": "ຕູນິເຊàº", + "TO": "ທອງàºàº²", + "TR": "ເທີຄີ", + "TT": "ທຣິນິà»àº”ດ à»àº¥àº° ໂທà»àºšà»‚àº", + "TV": "ຕູວາລູ", + "TW": "ໄຕ້ຫວັນ", + "TZ": "ທານຊາເນàº", + "UA": "ຢູເຄຣນ", + "UG": "ອູàºàº²àº™àº”າ", + "UM": "à»àº¹à»ˆà»€àºàº²àº°àº®àº­àºšàº™àº­àºàº‚ອງສະຫະລັດຯ", + "UN": "ສະຫະປະຊາຊາດ", + "US": "ສະຫະລັດ", + "UY": "ອູຣຸàºàº§àº", + "UZ": "ອຸສເບàºàº´àºªàº°àº–ານ", + "VA": "ນະຄອນ ວາຕິàºàº±àº™", + "VC": "ເຊນ ວິນເຊນ à»àº¥àº° ເàºàº£à»€àº™àº”ິນ", + "VE": "ເວເນຊູເອລາ", + "VG": "à»àº¹à»ˆà»€àºàº²àº° ບຣິທິຊ ເວີຈິນ", + "VI": "à»àº¹à»ˆà»€àºàº²àº° ຢູເອສ ເວີຈິນ", + "VN": "ຫວຽດນາມ", + "VU": "ວານົວຕູ", + "WF": "ວາລລິສ à»àº¥àº° ຟູຕູນາ", + "WS": "ຊາມົວ", + "XK": "ໂຄໂຊໂວ", + "YE": "ເຢເມນ", + "YT": "ມາຢັອດ", + "ZA": "ອາຟຣິàºàº²à»ƒàº•້", + "ZM": "à»àºŠàº¡à»€àºšàº", + "ZW": "ຊິມບັບເວ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lt.json new file mode 100644 index 0000000000000000000000000000000000000000..7db358bc8a15afb4d57c66ad95edb70cfc093bf4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lt.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Dangun Žengimo sala", + "AD": "Andora", + "AE": "Jungtiniai Arabų Emyratai", + "AF": "Afganistanas", + "AG": "Antigva ir Barbuda", + "AI": "Angilija", + "AL": "Albanija", + "AM": "ArmÄ—nija", + "AO": "Angola", + "AQ": "Antarktida", + "AR": "Argentina", + "AS": "Amerikos Samoa", + "AT": "Austrija", + "AU": "Australija", + "AW": "Aruba", + "AX": "Alandų Salos", + "AZ": "Azerbaidžanas", + "BA": "Bosnija ir Hercegovina", + "BB": "Barbadosas", + "BD": "BangladeÅ¡as", + "BE": "Belgija", + "BF": "Burkina Fasas", + "BG": "Bulgarija", + "BH": "Bahreinas", + "BI": "Burundis", + "BJ": "Beninas", + "BL": "Sen Bartelemi", + "BM": "Bermuda", + "BN": "BrunÄ—jus", + "BO": "Bolivija", + "BQ": "Karibų Nyderlandai", + "BR": "Brazilija", + "BS": "Bahamos", + "BT": "Butanas", + "BW": "Botsvana", + "BY": "Baltarusija", + "BZ": "Belizas", + "CA": "Kanada", + "CC": "Kokosų (Kilingo) Salos", + "CD": "Kongas-KinÅ¡asa", + "CF": "CentrinÄ—s Afrikos Respublika", + "CG": "Kongas-Brazavilis", + "CH": "Å veicarija", + "CI": "Dramblio Kaulo Krantas", + "CK": "Kuko Salos", + "CL": "ÄŒilÄ—", + "CM": "KamerÅ«nas", + "CN": "Kinija", + "CO": "Kolumbija", + "CR": "Kosta Rika", + "CU": "Kuba", + "CV": "Žaliasis KyÅ¡ulys", + "CW": "Kiurasao", + "CX": "KalÄ—dų Sala", + "CY": "Kipras", + "CZ": "ÄŒekija", + "DE": "Vokietija", + "DG": "Diego Garsija", + "DJ": "Džibutis", + "DK": "Danija", + "DM": "Dominika", + "DO": "Dominikos Respublika", + "DZ": "Alžyras", + "EA": "Seuta ir Melila", + "EC": "Ekvadoras", + "EE": "Estija", + "EG": "Egiptas", + "EH": "Vakarų Sachara", + "ER": "EritrÄ—ja", + "ES": "Ispanija", + "ET": "Etiopija", + "FI": "Suomija", + "FJ": "Fidžis", + "FK": "Folklando Salos", + "FM": "Mikronezija", + "FO": "Farerų Salos", + "FR": "PrancÅ«zija", + "GA": "Gabonas", + "GB": "JungtinÄ— KaralystÄ—", + "GD": "Grenada", + "GE": "Gruzija", + "GF": "PrancÅ«zijos Gviana", + "GG": "Gernsis", + "GH": "Gana", + "GI": "Gibraltaras", + "GL": "Grenlandija", + "GM": "Gambija", + "GN": "GvinÄ—ja", + "GP": "Gvadelupa", + "GQ": "Pusiaujo GvinÄ—ja", + "GR": "Graikija", + "GS": "Pietų Džordžija ir Pietų SandviÄo salos", + "GT": "Gvatemala", + "GU": "Guamas", + "GW": "Bisau GvinÄ—ja", + "GY": "Gajana", + "HK": "Ypatingasis Administracinis Kinijos Regionas Honkongas", + "HN": "HondÅ«ras", + "HR": "Kroatija", + "HT": "Haitis", + "HU": "Vengrija", + "IC": "Kanarų salos", + "ID": "Indonezija", + "IE": "Airija", + "IL": "Izraelis", + "IM": "Meno Sala", + "IN": "Indija", + "IO": "Indijos Vandenyno Britų Sritis", + "IQ": "Irakas", + "IR": "Iranas", + "IS": "Islandija", + "IT": "Italija", + "JE": "Džersis", + "JM": "Jamaika", + "JO": "Jordanija", + "JP": "Japonija", + "KE": "Kenija", + "KG": "Kirgizija", + "KH": "Kambodža", + "KI": "Kiribatis", + "KM": "Komorai", + "KN": "Sent Kitsas ir Nevis", + "KP": "Å iaurÄ—s KorÄ—ja", + "KR": "Pietų KorÄ—ja", + "KW": "Kuveitas", + "KY": "Kaimanų Salos", + "KZ": "Kazachstanas", + "LA": "Laosas", + "LB": "Libanas", + "LC": "Sent Lusija", + "LI": "LichtenÅ¡teinas", + "LK": "Å ri Lanka", + "LR": "Liberija", + "LS": "Lesotas", + "LT": "Lietuva", + "LU": "Liuksemburgas", + "LV": "Latvija", + "LY": "Libija", + "MA": "Marokas", + "MC": "Monakas", + "MD": "Moldova", + "ME": "Juodkalnija", + "MF": "Sen Martenas", + "MG": "Madagaskaras", + "MH": "MarÅ¡alo Salos", + "MK": "Makedonija", + "ML": "Malis", + "MM": "Mianmaras (Birma)", + "MN": "Mongolija", + "MO": "Ypatingasis Administracinis Kinijos Regionas Makao", + "MP": "Marianos Å iaurinÄ—s Salos", + "MQ": "Martinika", + "MR": "Mauritanija", + "MS": "Montseratas", + "MT": "Malta", + "MU": "Mauricijus", + "MV": "Maldyvai", + "MW": "Malavis", + "MX": "Meksika", + "MY": "Malaizija", + "MZ": "Mozambikas", + "NA": "Namibija", + "NC": "Naujoji Kaledonija", + "NE": "Nigeris", + "NF": "Norfolko sala", + "NG": "Nigerija", + "NI": "Nikaragva", + "NL": "Nyderlandai", + "NO": "Norvegija", + "NP": "Nepalas", + "NR": "Nauru", + "NU": "NiujÄ—", + "NZ": "Naujoji Zelandija", + "OM": "Omanas", + "PA": "Panama", + "PE": "Peru", + "PF": "PrancÅ«zijos Polinezija", + "PG": "Papua Naujoji GvinÄ—ja", + "PH": "Filipinai", + "PK": "Pakistanas", + "PL": "Lenkija", + "PM": "Sen Pjeras ir Mikelonas", + "PN": "Pitkerno salos", + "PR": "Puerto Rikas", + "PS": "Palestinos teritorija", + "PT": "Portugalija", + "PW": "Palau", + "PY": "Paragvajus", + "QA": "Kataras", + "RE": "Reunjonas", + "RO": "Rumunija", + "RS": "Serbija", + "RU": "Rusija", + "RW": "Ruanda", + "SA": "Saudo Arabija", + "SB": "Saliamono Salos", + "SC": "SeiÅ¡eliai", + "SD": "Sudanas", + "SE": "Å vedija", + "SG": "SingapÅ«ras", + "SH": "Å v. Elenos Sala", + "SI": "SlovÄ—nija", + "SJ": "Svalbardas ir Janas Majenas", + "SK": "Slovakija", + "SL": "Siera LeonÄ—", + "SM": "San Marinas", + "SN": "Senegalas", + "SO": "Somalis", + "SR": "Surinamas", + "SS": "Pietų Sudanas", + "ST": "San TomÄ— ir PrinsipÄ—", + "SV": "Salvadoras", + "SX": "Sint Martenas", + "SY": "Sirija", + "SZ": "Svazilandas", + "TA": "Tristanas da Kunja", + "TC": "Terkso ir Kaikoso Salos", + "TD": "ÄŒadas", + "TF": "PrancÅ«zijos Pietų sritys", + "TG": "Togas", + "TH": "Tailandas", + "TJ": "Tadžikija", + "TK": "Tokelau", + "TL": "Rytų Timoras", + "TM": "TurkmÄ—nistanas", + "TN": "Tunisas", + "TO": "Tonga", + "TR": "Turkija", + "TT": "Trinidadas ir Tobagas", + "TV": "Tuvalu", + "TW": "Taivanas", + "TZ": "Tanzanija", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "Jungtinių Valstijų Mažosios Tolimosios Salos", + "UN": "JungtinÄ—s Tautos", + "US": "JungtinÄ—s Valstijos", + "UY": "Urugvajus", + "UZ": "Uzbekistanas", + "VA": "Vatikano Miesto ValstybÄ—", + "VC": "Å ventasis Vincentas ir Grenadinai", + "VE": "Venesuela", + "VG": "Didžiosios Britanijos Mergelių Salos", + "VI": "Jungtinių Valstijų Mergelių Salos", + "VN": "Vietnamas", + "VU": "Vanuatu", + "WF": "Volisas ir FutÅ«na", + "WS": "Samoa", + "XK": "Kosovas", + "YE": "Jemenas", + "YT": "Majotas", + "ZA": "Pietų Afrika", + "ZM": "Zambija", + "ZW": "ZimbabvÄ—" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lu.json new file mode 100644 index 0000000000000000000000000000000000000000..5bde5828347ce2d45508b401996d3dcf3a3cefa4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lu.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AD": "Andore", + "AE": "Lemila alabu", + "AF": "Afuganisita", + "AG": "Antiga ne Barbuda", + "AI": "Angiye", + "AL": "Alubani", + "AM": "Ameni", + "AO": "Angola", + "AR": "Alijantine", + "AS": "Samoa wa Ameriki", + "AT": "Otilisi", + "AU": "Ositali", + "AW": "Aruba", + "AZ": "Ajelbayidja", + "BA": "Mbosini ne Hezegovine", + "BB": "Barebade", + "BD": "Benguladeshi", + "BE": "Belejiki", + "BF": "Bukinafaso", + "BG": "Biligari", + "BH": "Bahrene", + "BI": "Burundi", + "BJ": "Bene", + "BM": "Bermuda", + "BN": "Brineyi", + "BO": "Mbolivi", + "BR": "Mnulezile", + "BS": "Bahamase", + "BT": "Butani", + "BW": "Mbotswana", + "BY": "Byelorisi", + "BZ": "Belize", + "CA": "Kanada", + "CD": "Ditunga wa Kongu", + "CF": "Ditunga dya Afrika wa munkatshi", + "CG": "Kongu", + "CH": "Swise", + "CI": "Kotedivuale", + "CK": "Lutanda lua KookÉ›", + "CL": "Shili", + "CM": "Kamerune", + "CN": "Shine", + "CO": "Kolombi", + "CR": "Kositarika", + "CU": "Kuba", + "CV": "Lutanda lua Kapevele", + "CY": "Shipele", + "CZ": "Ditunga dya Tsheka", + "DE": "Alemanu", + "DJ": "Djibuti", + "DK": "Danemalaku", + "DM": "Duminiku", + "DO": "Ditunga wa Duminiku", + "DZ": "Alijeri", + "EC": "Ekwatele", + "EE": "Esitoni", + "EG": "Mushidi", + "ER": "Elitele", + "ES": "Nsipani", + "ET": "Etshiopi", + "FI": "Filande", + "FJ": "Fuji", + "FK": "Lutanda lua Maluni", + "FM": "Mikronezi", + "FR": "Nfalanse", + "GA": "Ngabu", + "GB": "Angeletele", + "GD": "Ngelenade", + "GE": "Joriji", + "GF": "Giyane wa Nfalanse", + "GH": "Ngana", + "GI": "Jibeletale", + "GL": "Ngowelande", + "GM": "Gambi", + "GN": "Ngine", + "GP": "Ngwadelupe", + "GQ": "Gine Ekwatele", + "GR": "Ngeleka", + "GT": "Ngwatemala", + "GU": "Ngwame", + "GW": "Nginebisau", + "GY": "Ngiyane", + "HN": "Ondurase", + "HR": "Krowasi", + "HT": "Ayiti", + "HU": "Ongili", + "ID": "Indonezi", + "IE": "Irelande", + "IL": "Isirayele", + "IN": "Inde", + "IO": "Lutanda lwa Angeletele ku mbu wa Indiya", + "IQ": "Iraki", + "IR": "Ira", + "IS": "Isilande", + "IT": "Itali", + "JM": "Jamaiki", + "JO": "Jodani", + "JP": "Japu", + "KE": "Kenya", + "KG": "Kigizisita", + "KH": "Kambodza", + "KI": "Kiribati", + "KM": "Komoru", + "KN": "Santu krístofe ne Neves", + "KP": "Kore wa muulu", + "KR": "Kore wa mwinshi", + "KW": "Koweti", + "KY": "Lutanda lua Kayima", + "KZ": "Kazakusita", + "LA": "Lawosi", + "LB": "Liba", + "LC": "Santu lisi", + "LI": "Lishuteni", + "LK": "Sirilanka", + "LR": "Liberiya", + "LS": "Lesoto", + "LT": "Litwani", + "LU": "Likisambulu", + "LV": "Letoni", + "LY": "Libi", + "MA": "Maroke", + "MC": "Monaku", + "MD": "Molidavi", + "MG": "Madagasikari", + "MH": "Lutanda lua Marishale", + "MK": "Masedwane", + "ML": "Mali", + "MM": "Myamare", + "MN": "Mongoli", + "MP": "Lutanda lua Mariane wa muulu", + "MQ": "Martiniki", + "MR": "Moritani", + "MS": "Musera", + "MT": "Malite", + "MU": "Morise", + "MV": "Madive", + "MW": "Malawi", + "MX": "Meksike", + "MY": "Malezi", + "MZ": "Mozambiki", + "NA": "Namibi", + "NC": "Kaledoni wa mumu", + "NE": "Nijere", + "NF": "Lutanda lua Norfok", + "NG": "Nijerya", + "NI": "Nikaragwa", + "NL": "OlandÉ›", + "NO": "Noriveje", + "NP": "NepálÉ›", + "NR": "Nauru", + "NU": "Nyue", + "NZ": "Zelanda wa mumu", + "OM": "Omane", + "PA": "Panama", + "PE": "Peru", + "PF": "Polinezi wa Nfalanse", + "PG": "Papwazi wa NginÉ› wa mumu", + "PH": "Nfilipi", + "PK": "Pakisita", + "PL": "Mpoloni", + "PM": "Santu pététo ne Mikelu", + "PN": "Pikairni", + "PR": "Mpotoriku", + "PS": "Palesine", + "PT": "Mputulugeshi", + "PW": "Palau", + "PY": "Palagwei", + "QA": "Katari", + "RE": "Lenyo", + "RO": "Romani", + "RU": "Risi", + "RW": "Rwanda", + "SA": "Alabu Nsawudi", + "SB": "Lutanda lua Solomu", + "SC": "Seshele", + "SD": "Suda", + "SE": "Suwedi", + "SG": "Singapure", + "SH": "Santu eleni", + "SI": "Siloveni", + "SK": "Silovaki", + "SL": "Siera Leone", + "SM": "Santu Marine", + "SN": "Senegale", + "SO": "Somali", + "SR": "Suriname", + "ST": "Sao Tome ne PresipÉ›", + "SV": "Savadore", + "SY": "Siri", + "SZ": "Swazilandi", + "TC": "Lutanda lua Tuluki ne Kaiko", + "TD": "Tshadi", + "TG": "Togu", + "TH": "Tayilanda", + "TJ": "Tazikisita", + "TK": "Tokelau", + "TL": "Timoru wa diboku", + "TM": "Tukemenisita", + "TN": "Tinizi", + "TO": "Tonga", + "TR": "Tuluki", + "TT": "Tinidade ne Tobago", + "TV": "Tuvalu", + "TW": "Taiwani", + "TZ": "Tanzani", + "UA": "Ukreni", + "UG": "Uganda", + "US": "Ameriki", + "UY": "Irigwei", + "UZ": "Uzibekisita", + "VA": "Nvatika", + "VC": "Santu vesa ne Ngelenadine", + "VE": "Venezuela", + "VG": "Lutanda lua Vierzi wa Angeletele", + "VI": "Lutanda lua Vierzi wa Ameriki", + "VN": "Viyetiname", + "VU": "Vanuatu", + "WF": "Walise ne Futuna", + "WS": "Samoa", + "YE": "Yemenu", + "YT": "Mayote", + "ZA": "Afrika ya Súdi", + "ZM": "Zambi", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lv.json new file mode 100644 index 0000000000000000000000000000000000000000..b64c7098ba87f60357497d4ea4c3c6521750889f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/lv.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "DebesbraukÅ¡anas sala", + "AD": "Andora", + "AE": "Apvienotie ArÄbu EmirÄti", + "AF": "AfganistÄna", + "AG": "Antigva un Barbuda", + "AI": "Angilja", + "AL": "AlbÄnija", + "AM": "ArmÄ“nija", + "AO": "Angola", + "AQ": "Antarktika", + "AR": "ArgentÄ«na", + "AS": "ASV Samoa", + "AT": "Austrija", + "AU": "AustrÄlija", + "AW": "Aruba", + "AX": "Olandes salas", + "AZ": "AzerbaidžÄna", + "BA": "Bosnija un Hercegovina", + "BB": "Barbadosa", + "BD": "BangladeÅ¡a", + "BE": "Beļģija", + "BF": "Burkinafaso", + "BG": "BulgÄrija", + "BH": "Bahreina", + "BI": "Burundija", + "BJ": "Benina", + "BL": "SenbartelmÄ«", + "BM": "Bermudu salas", + "BN": "Bruneja", + "BO": "BolÄ«vija", + "BQ": "NÄ«derlandes KarÄ«bu salas", + "BR": "BrazÄ«lija", + "BS": "Bahamu salas", + "BT": "ButÄna", + "BW": "BotsvÄna", + "BY": "Baltkrievija", + "BZ": "Beliza", + "CA": "KanÄda", + "CC": "Kokosu (KÄ«linga) salas", + "CD": "Kongo (KinÅ¡asa)", + "CF": "CentrÄlÄfrikas Republika", + "CG": "Kongo (Brazavila)", + "CH": "Å veice", + "CI": "KotdivuÄra", + "CK": "Kuka salas", + "CL": "Čīle", + "CM": "KamerÅ«na", + "CN": "Ķīna", + "CO": "Kolumbija", + "CR": "Kostarika", + "CU": "Kuba", + "CV": "Kaboverde", + "CW": "Kirasao", + "CX": "ZiemsvÄ“tku sala", + "CY": "Kipra", + "CZ": "ÄŒehijas Republika", + "DE": "VÄcija", + "DG": "Djego Garsijas atols", + "DJ": "Džibutija", + "DK": "DÄnija", + "DM": "Dominika", + "DO": "DominikÄna", + "DZ": "Alžīrija", + "EA": "SeÅ«ta un Melilja", + "EC": "Ekvadora", + "EE": "Igaunija", + "EG": "Ä’Ä£ipte", + "EH": "RietumsahÄra", + "ER": "Eritreja", + "ES": "SpÄnija", + "ET": "Etiopija", + "FI": "Somija", + "FJ": "Fidži", + "FK": "Folklenda salas", + "FM": "MikronÄ“zija", + "FO": "FÄ“ru salas", + "FR": "Francija", + "GA": "Gabona", + "GB": "LielbritÄnija", + "GD": "GrenÄda", + "GE": "Gruzija", + "GF": "Francijas GviÄna", + "GG": "GÄ“rnsija", + "GH": "Gana", + "GI": "GibraltÄrs", + "GL": "Grenlande", + "GM": "Gambija", + "GN": "Gvineja", + "GP": "Gvadelupa", + "GQ": "EkvatoriÄlÄ Gvineja", + "GR": "GrieÄ·ija", + "GS": "Dienviddžordžija un DienvidsendviÄu salas", + "GT": "Gvatemala", + "GU": "Guama", + "GW": "Gvineja-Bisava", + "GY": "GajÄna", + "HK": "Ķīnas Ä«paÅ¡Äs pÄrvaldes apgabals Honkonga", + "HN": "Hondurasa", + "HR": "HorvÄtija", + "HT": "Haiti", + "HU": "UngÄrija", + "IC": "KanÄriju salas", + "ID": "IndonÄ“zija", + "IE": "Īrija", + "IL": "IzraÄ“la", + "IM": "Mena", + "IN": "Indija", + "IO": "Indijas okeÄna Britu teritorija", + "IQ": "IrÄka", + "IR": "IrÄna", + "IS": "Īslande", + "IT": "ItÄlija", + "JE": "Džērsija", + "JM": "Jamaika", + "JO": "JordÄnija", + "JP": "JapÄna", + "KE": "Kenija", + "KG": "KirgizstÄna", + "KH": "Kambodža", + "KI": "Kiribati", + "KM": "Komoru salas", + "KN": "Sentkitsa un Nevisa", + "KP": "Ziemeļkoreja", + "KR": "Dienvidkoreja", + "KW": "Kuveita", + "KY": "Kaimanu salas", + "KZ": "KazahstÄna", + "LA": "Laosa", + "LB": "LibÄna", + "LC": "SentlÅ«sija", + "LI": "LihtenÅ¡teina", + "LK": "Å rilanka", + "LR": "LibÄ“rija", + "LS": "Lesoto", + "LT": "Lietuva", + "LU": "Luksemburga", + "LV": "Latvija", + "LY": "LÄ«bija", + "MA": "Maroka", + "MC": "Monako", + "MD": "Moldova", + "ME": "Melnkalne", + "MF": "SenmartÄ“na", + "MG": "Madagaskara", + "MH": "MÄrÅ¡ala salas", + "MK": "MaÄ·edonija", + "ML": "Mali", + "MM": "Mjanma (Birma)", + "MN": "Mongolija", + "MO": "Ķīnas Ä«paÅ¡Äs pÄrvaldes apgabals Makao", + "MP": "Ziemeļu Marianas salas", + "MQ": "Martinika", + "MR": "MauritÄnija", + "MS": "Montserrata", + "MT": "Malta", + "MU": "MaurÄ«cija", + "MV": "MaldÄ«vija", + "MW": "MalÄvija", + "MX": "Meksika", + "MY": "Malaizija", + "MZ": "Mozambika", + "NA": "NamÄ«bija", + "NC": "Jaunkaledonija", + "NE": "NigÄ“ra", + "NF": "Norfolkas sala", + "NG": "NigÄ“rija", + "NI": "Nikaragva", + "NL": "NÄ«derlande", + "NO": "Norvēģija", + "NP": "NepÄla", + "NR": "Nauru", + "NU": "Niue", + "NZ": "JaunzÄ“lande", + "OM": "OmÄna", + "PA": "Panama", + "PE": "Peru", + "PF": "Francijas PolinÄ“zija", + "PG": "Papua-Jaungvineja", + "PH": "FilipÄ«nas", + "PK": "PakistÄna", + "PL": "Polija", + "PM": "SenpjÄ“ra un Mikelona", + "PN": "PitkÄ“rnas salas", + "PR": "Puertoriko", + "PS": "PalestÄ«na", + "PT": "PortugÄle", + "PW": "Palau", + "PY": "Paragvaja", + "QA": "Katara", + "RE": "Reinjona", + "RO": "RumÄnija", + "RS": "Serbija", + "RU": "Krievija", + "RW": "Ruanda", + "SA": "SaÅ«da ArÄbija", + "SB": "ZÄlamana salas", + "SC": "SeiÅ¡elu salas", + "SD": "SudÄna", + "SE": "Zviedrija", + "SG": "SingapÅ«ra", + "SH": "Sv.HelÄ“nas sala", + "SI": "SlovÄ“nija", + "SJ": "SvalbÄra un Jana Majena sala", + "SK": "SlovÄkija", + "SL": "Sjerraleone", + "SM": "SanmarÄ«no", + "SN": "SenegÄla", + "SO": "SomÄlija", + "SR": "Surinama", + "SS": "DienvidsudÄna", + "ST": "Santome un Prinsipi", + "SV": "Salvadora", + "SX": "SintmÄrtena", + "SY": "SÄ«rija", + "SZ": "Svazilenda", + "TA": "Tristana da Kuņas salas", + "TC": "TÄ“rksas un Kaikosas salas", + "TD": "ÄŒada", + "TF": "Francijas DienvidjÅ«ru teritorija", + "TG": "Togo", + "TH": "Taizeme", + "TJ": "TadžikistÄna", + "TK": "Tokelau", + "TL": "Austrumtimora", + "TM": "TurkmenistÄna", + "TN": "Tunisija", + "TO": "Tonga", + "TR": "Turcija", + "TT": "TrinidÄda un TobÄgo", + "TV": "Tuvalu", + "TW": "TaivÄna", + "TZ": "TanzÄnija", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "ASV MazÄs AizjÅ«ras salas", + "UN": "Apvienoto NÄciju OrganizÄcija", + "US": "Amerikas SavienotÄs Valstis", + "UY": "Urugvaja", + "UZ": "UzbekistÄna", + "VA": "VatikÄns", + "VC": "Sentvinsenta un GrenadÄ«nas", + "VE": "VenecuÄ“la", + "VG": "Britu Virdžīnas", + "VI": "ASV Virdžīnas", + "VN": "Vjetnama", + "VU": "Vanuatu", + "WF": "Volisa un Futunas salas", + "WS": "Samoa", + "XK": "Kosova", + "YE": "Jemena", + "YT": "Majota", + "ZA": "DienvidÄfrikas Republika", + "ZM": "Zambija", + "ZW": "Zimbabve" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/meta.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..c95ca7761ca656952b4d2555440f9836c58c38d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/meta.json @@ -0,0 +1,260 @@ +{ + "Version": "2.1.30.58", + "Regions": [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AS", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BW", + "BY", + "BZ", + "CA", + "CC", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CU", + "CV", + "CW", + "CX", + "CY", + "CZ", + "DE", + "DG", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EA", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "EZ", + "FI", + "FJ", + "FK", + "FM", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "IC", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IR", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KP", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MH", + "MK", + "ML", + "MM", + "MN", + "MO", + "MP", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NF", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PW", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SY", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "UM", + "UN", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VI", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW" + ] +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mg.json new file mode 100644 index 0000000000000000000000000000000000000000..a8359f8ae89402684131e1479a44c3485ee7f5e2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mg.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AD": "Andorra", + "AE": "Emirà Arabo mitambatra", + "AF": "Afghanistan", + "AG": "Antiga sy Barboda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AR": "Arzantina", + "AS": "Samoa amerikanina", + "AT": "Aotrisy", + "AU": "Aostralia", + "AW": "Arobà", + "AZ": "Azerbaidjan", + "BA": "Bosnia sy Herzegovina", + "BB": "Barbady", + "BD": "Bangladesy", + "BE": "Belzika", + "BF": "Borkina Faso", + "BG": "Biolgaria", + "BH": "Bahrain", + "BI": "Borondi", + "BJ": "Benin", + "BM": "Bermioda", + "BN": "Brunei", + "BO": "Bolivia", + "BR": "Brezila", + "BS": "Bahamas", + "BT": "Bhotana", + "BW": "Botsoana", + "BY": "Belarosy", + "BZ": "Belize", + "CA": "Kanada", + "CD": "Repoblikan’i Kongo", + "CF": "Repoblika Ivon’Afrika", + "CG": "Kôngô", + "CH": "Soisa", + "CI": "Côte d’Ivoire", + "CK": "Nosy Kook", + "CL": "Shili", + "CM": "Kamerona", + "CN": "Sina", + "CO": "Kôlômbia", + "CR": "Kosta Rikà", + "CU": "Kiobà", + "CV": "Nosy Cap-Vert", + "CY": "Sypra", + "CZ": "Repoblikan’i Tseky", + "DE": "Alemaina", + "DJ": "Djiboti", + "DK": "Danmarka", + "DM": "Dominika", + "DO": "Repoblika Dominikanina", + "DZ": "Alzeria", + "EC": "Ekoatera", + "EE": "Estonia", + "EG": "Ejypta", + "ER": "Eritrea", + "ES": "Espaina", + "ET": "Ethiopia", + "FI": "Finlandy", + "FJ": "Fidji", + "FK": "Nosy Falkand", + "FM": "Mikrônezia", + "FR": "Frantsa", + "GA": "Gabon", + "GB": "Angletera", + "GD": "Grenady", + "GE": "Zeorzia", + "GF": "Guyana frantsay", + "GH": "Ghana", + "GI": "Zibraltara", + "GL": "Groenland", + "GM": "Gambia", + "GN": "Ginea", + "GP": "Goadelopy", + "GQ": "Guinea Ekoatera", + "GR": "Gresy", + "GT": "Goatemalà", + "GU": "Guam", + "GW": "Giné-Bisao", + "GY": "Guyana", + "HN": "Hondiorasy", + "HR": "Kroasia", + "HT": "Haiti", + "HU": "Hongria", + "ID": "Indonezia", + "IE": "Irlandy", + "IL": "Israely", + "IN": "Indy", + "IO": "Faridranomasina indiana britanika", + "IQ": "Irak", + "IR": "Iran", + "IS": "Islandy", + "IT": "Italia", + "JM": "Jamaïka", + "JO": "Jordania", + "JP": "Japana", + "KE": "Kenya", + "KG": "Kiordistan", + "KH": "Kambôdja", + "KI": "Kiribati", + "KM": "Kômaoro", + "KN": "Saint-Christophe-et-Niévès", + "KP": "Korea Avaratra", + "KR": "Korea Atsimo", + "KW": "Kôeity", + "KY": "Nosy Kayman", + "KZ": "Kazakhstan", + "LA": "Laôs", + "LB": "Libana", + "LC": "Sainte-Lucie", + "LI": "Listenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Litoania", + "LU": "Lioksamboro", + "LV": "Letonia", + "LY": "Libya", + "MA": "Marôka", + "MC": "Mônakô", + "MD": "Môldavia", + "MG": "Madagasikara", + "MH": "Nosy Marshall", + "MK": "Makedonia", + "ML": "Mali", + "MM": "Myanmar", + "MN": "Môngôlia", + "MP": "Nosy Mariana Atsinanana", + "MQ": "Martinika", + "MR": "Maoritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Maorisy", + "MV": "Maldiva", + "MW": "Malaoì", + "MX": "Meksika", + "MY": "Malaizia", + "MZ": "Mozambika", + "NA": "Namibia", + "NC": "Nouvelle-Calédonie", + "NE": "Niger", + "NF": "Nosy Norfolk", + "NG": "Nizeria", + "NI": "Nikaragoà", + "NL": "Holanda", + "NO": "Nôrvezy", + "NP": "Nepala", + "NR": "Naorò", + "NU": "Nioé", + "NZ": "Nouvelle-Zélande", + "OM": "Oman", + "PA": "Panama", + "PE": "Peroa", + "PF": "Polynezia frantsay", + "PG": "Papouasie-Nouvelle-Guinée", + "PH": "Filipina", + "PK": "Pakistan", + "PL": "Pôlôna", + "PM": "Saint-Pierre-et-Miquelon", + "PN": "Pitkairn", + "PR": "Pôrtô Rikô", + "PS": "Palestina", + "PT": "Pôrtiogala", + "PW": "Palao", + "PY": "Paragoay", + "QA": "Katar", + "RE": "Larenion", + "RO": "Romania", + "RU": "Rosia", + "RW": "Roanda", + "SA": "Arabia saodita", + "SB": "Nosy Salomona", + "SC": "Seyshela", + "SD": "Sodan", + "SE": "Soedy", + "SG": "Singaporo", + "SH": "Sainte-Hélène", + "SI": "Slovenia", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "Saint-Marin", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Sorinam", + "ST": "São Tomé-et-Príncipe", + "SV": "El Salvador", + "SY": "Syria", + "SZ": "Soazilandy", + "TC": "Nosy Turks sy Caïques", + "TD": "Tsady", + "TG": "Togo", + "TH": "Thailandy", + "TJ": "Tajikistan", + "TK": "Tokelao", + "TL": "Timor Atsinanana", + "TM": "Torkmenistan", + "TN": "Tonizia", + "TO": "Tongà", + "TR": "Torkia", + "TT": "Trinidad sy Tobagô", + "TV": "Tovalò", + "TW": "Taioana", + "TZ": "Tanzania", + "UA": "Okraina", + "UG": "Oganda", + "US": "Etazonia", + "UY": "Orogoay", + "UZ": "Ozbekistan", + "VA": "Firenen’i Vatikana", + "VC": "Saint-Vincent-et-les Grenadines", + "VE": "Venezoelà", + "VG": "Nosy britanika virijiny", + "VI": "Nosy Virijiny Etazonia", + "VN": "Vietnam", + "VU": "Vanoatò", + "WF": "Wallis sy Futuna", + "WS": "Samoa", + "YE": "Yemen", + "YT": "Mayôty", + "ZA": "Afrika Atsimo", + "ZM": "Zambia", + "ZW": "Zimbaboe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mk.json new file mode 100644 index 0000000000000000000000000000000000000000..b7761a7e8f3c77cbdbadc53f4e74518979baa98c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mk.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "ОÑтров ÐÑенÑион", + "AD": "Ðндора", + "AE": "Обединети ÐрапÑки Емирати", + "AF": "ÐвганиÑтан", + "AG": "Ðнтигва и Барбуда", + "AI": "Ðнгвила", + "AL": "Ðлбанија", + "AM": "Ерменија", + "AO": "Ðнгола", + "AQ": "Ðнтарктик", + "AR": "Ðргентина", + "AS": "ÐмериканÑка Самоа", + "AT": "ÐвÑтрија", + "AU": "ÐвÑтралија", + "AW": "Ðруба", + "AX": "ОландÑки ОÑтрови", + "AZ": "Ðзербејџан", + "BA": "БоÑна и Херцеговина", + "BB": "БарбадоÑ", + "BD": "Бангладеш", + "BE": "Белгија", + "BF": "Буркина ФаÑо", + "BG": "Бугарија", + "BH": "Бахреин", + "BI": "Бурунди", + "BJ": "Бенин", + "BL": "Свети Вартоломеј", + "BM": "Бермуди", + "BN": "Брунеј", + "BO": "Боливија", + "BQ": "КарипÑка Холандија", + "BR": "Бразил", + "BS": "Бахами", + "BT": "Бутан", + "BW": "Боцвана", + "BY": "БелоруÑија", + "BZ": "Белизе", + "CA": "Канада", + "CC": "КокоÑови (Килиншки) ОÑтрови", + "CD": "Конго - КиншаÑа", + "CF": "ЦентралноафриканÑка Република", + "CG": "Конго - Бразавил", + "CH": "Швајцарија", + "CI": "Брегот на Слоновата КоÑка", + "CK": "Кукови ОÑтрови", + "CL": "Чиле", + "CM": "Камерун", + "CN": "Кина", + "CO": "Колумбија", + "CR": "КоÑтарика", + "CU": "Куба", + "CV": "Зелен ’Рт", + "CW": "КураÑао", + "CX": "Божиќен ОÑтров", + "CY": "Кипар", + "CZ": "Република Чешка", + "DE": "Германија", + "DG": "Диего ГарÑија", + "DJ": "Ðибути", + "DK": "ДанÑка", + "DM": "Доминика", + "DO": "ДоминиканÑка Република", + "DZ": "Ðлжир", + "EA": "Сеута и Мелиља", + "EC": "Еквадор", + "EE": "ЕÑтонија", + "EG": "Египет", + "EH": "Западна Сахара", + "ER": "Еритреја", + "ES": "Шпанија", + "ET": "Етиопија", + "FI": "ФинÑка", + "FJ": "Фиџи", + "FK": "ФолкландÑки ОÑтрови", + "FM": "Микронезија", + "FO": "ФарÑки ОÑтрови", + "FR": "Франција", + "GA": "Габон", + "GB": "Обединето КралÑтво", + "GD": "Гренада", + "GE": "Грузија", + "GF": "ФранцуÑка Гвајана", + "GG": "Гернзи", + "GH": "Гана", + "GI": "Гибралтар", + "GL": "Гренланд", + "GM": "Гамбија", + "GN": "Гвинеја", + "GP": "Гвадалупе", + "GQ": "ЕкваторÑка Гвинеја", + "GR": "Грција", + "GS": "Јужна Ðорџија и Јужни Сендвички ОÑтрови", + "GT": "Гватемала", + "GU": "Гуам", + "GW": "Гвинеја-БиÑау", + "GY": "Гвајана", + "HK": "Хонг Конг С.Ð.Р Кина", + "HN": "ХондураÑ", + "HR": "ХрватÑка", + "HT": "Хаити", + "HU": "Унгарија", + "IC": "КанарÑки ОÑтрови", + "ID": "Индонезија", + "IE": "ИрÑка", + "IL": "Израел", + "IM": "ОÑтров Ман", + "IN": "Индија", + "IO": "БританÑка ИндоокеанÑка Територија", + "IQ": "Ирак", + "IR": "Иран", + "IS": "ИÑланд", + "IT": "Италија", + "JE": "ÐерÑи", + "JM": "Јамајка", + "JO": "Јордан", + "JP": "Јапонија", + "KE": "Кенија", + "KG": "КиргиÑтан", + "KH": "Камбоџа", + "KI": "Кирибати", + "KM": "КоморÑки ОÑтрови", + "KN": "Свети КриÑтофер и ÐевиÑ", + "KP": "Северна Кореја", + "KR": "Јужна Кореја", + "KW": "Кувајт", + "KY": "КајманÑки ОÑтрови", + "KZ": "КазахÑтан", + "LA": "ЛаоÑ", + "LB": "Либан", + "LC": "Света Луција", + "LI": "Лихтенштајн", + "LK": "Шри Ланка", + "LR": "Либерија", + "LS": "ЛеÑото", + "LT": "Литванија", + "LU": "ЛукÑембург", + "LV": "Латвија", + "LY": "Либија", + "MA": "Мароко", + "MC": "Монако", + "MD": "Молдавија", + "ME": "Црна Гора", + "MF": "Сент Мартин", + "MG": "МадагаÑкар", + "MH": "МаршалÑки ОÑтрови", + "MK": "Македонија", + "ML": "Мали", + "MM": "Мјанмар (Бурма)", + "MN": "Монголија", + "MO": "Макао СÐР", + "MP": "Северни МаријанÑки ОÑтрови", + "MQ": "Мартиник", + "MR": "Мавританија", + "MS": "МонÑерат", + "MT": "Малта", + "MU": "МаврициуÑ", + "MV": "Малдиви", + "MW": "Малави", + "MX": "МекÑико", + "MY": "Малезија", + "MZ": "Мозамбик", + "NA": "Ðамибија", + "NC": "Ðова Каледонија", + "NE": "Ðигер", + "NF": "Ðорфолшки ОÑтров", + "NG": "Ðигерија", + "NI": "Ðикарагва", + "NL": "Холандија", + "NO": "Ðорвешка", + "NP": "Ðепал", + "NR": "Ðауру", + "NU": "Ðиује", + "NZ": "Ðов Зеланд", + "OM": "Оман", + "PA": "Панама", + "PE": "Перу", + "PF": "ФранцуÑка Полинезија", + "PG": "Папуа Ðова Гвинеја", + "PH": "Филипини", + "PK": "ПакиÑтан", + "PL": "ПолÑка", + "PM": "Сент Пјер и Микелан", + "PN": "ПиткернÑки ОÑтрови", + "PR": "Порторико", + "PS": "ПалеÑтинÑки територии", + "PT": "Португалија", + "PW": "Палау", + "PY": "Парагвај", + "QA": "Катар", + "RE": "Реунион", + "RO": "Романија", + "RS": "Србија", + "RU": "РуÑија", + "RW": "Руанда", + "SA": "СаудиÑка Ðрабија", + "SB": "СоломонÑки ОÑтрови", + "SC": "Сејшели", + "SD": "Судан", + "SE": "ШведÑка", + "SG": "Сингапур", + "SH": "Света Елена", + "SI": "Словенија", + "SJ": "Свалбард и Жан Мејен", + "SK": "Словачка", + "SL": "Сиера Леоне", + "SM": "Сан Марино", + "SN": "Сенегал", + "SO": "Сомалија", + "SR": "Суринам", + "SS": "Јужен Судан", + "ST": "Сао Томе и ПринÑипе", + "SV": "Ел Салвадор", + "SX": "Свети Мартин", + "SY": "Сирија", + "SZ": "Свазиленд", + "TA": "ТриÑтан да Куња", + "TC": "ОÑтрови Ð¢ÑƒÑ€ÐºÑ Ð¸ КаикоÑ", + "TD": "Чад", + "TF": "ФранцуÑки Јужни Територии", + "TG": "Того", + "TH": "Тајланд", + "TJ": "ТаџикиÑтан", + "TK": "Токелау", + "TL": "ИÑточен Тимор (Тимор ЛеÑте)", + "TM": "ТуркмениÑтан", + "TN": "ТуниÑ", + "TO": "Тонга", + "TR": "Турција", + "TT": "Тринидад и Тобаго", + "TV": "Тувалу", + "TW": "Тајван", + "TZ": "Танзанија", + "UA": "Украина", + "UG": "Уганда", + "UM": "ÐмериканÑки територии во Пацификот", + "UN": "обединети нации", + "US": "Соединети ÐмериканÑки Држави", + "UY": "Уругвај", + "UZ": "УзбекиÑтан", + "VA": "Ватикан", + "VC": "Свети ВинÑент и Гренадините", + "VE": "Венецуела", + "VG": "БританÑки ДевÑтвени ОÑтрови", + "VI": "ÐмериканÑки ДевÑтвени ОÑтрови", + "VN": "Виетнам", + "VU": "Вануату", + "WF": "Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна", + "WS": "Самоа", + "XK": "КоÑово", + "YE": "Јемен", + "YT": "Мајот", + "ZA": "ЈужноафриканÑка Република", + "ZM": "Замбија", + "ZW": "Зимбабве" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ml.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ml.json new file mode 100644 index 0000000000000000000000000000000000000000..8ba622b60984b15115e334226ce044ac0758392f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ml.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "അസൻഷൻ à´¦àµà´µàµ€à´ªàµ", + "AD": "à´…à´¨àµà´±àµ‹à´±", + "AE": "à´¯àµà´£àµˆà´±àµà´±à´¡àµ അറബൠഎമിറൈറàµà´±àµâ€Œà´¸àµ", + "AF": "à´…à´«àµâ€Œà´—ാനിസàµà´¥à´¾àµ»", + "AG": "ആൻറിഗàµà´µà´¯àµà´‚ ബർബàµà´¡à´¯àµà´‚", + "AI": "ആൻഗàµà´µà´¿à´²àµà´²", + "AL": "അൽബേനിയ", + "AM": "അർമേനിയ", + "AO": "അംഗോള", + "AQ": "അൻറാർടàµà´Ÿà´¿à´•àµà´•", + "AR": "അർജൻറീന", + "AS": "അമേരികàµà´•ൻ സമോവ", + "AT": "à´“à´¸àµà´Ÿàµà´°à´¿à´¯", + "AU": "à´“à´¸àµâ€Œà´Ÿàµà´°àµ‡à´²à´¿à´¯", + "AW": "അറൂബ", + "AX": "അലൻഡൠദàµà´µàµ€à´ªàµà´•ൾ", + "AZ": "അസർബൈജാൻ", + "BA": "ബോസàµà´¨à´¿à´¯à´¯àµà´‚ ഹെർസഗോവിനയàµà´‚", + "BB": "ബാർബഡോസàµ", + "BD": "ബംഗàµà´²à´¾à´¦àµ‡à´¶àµ", + "BE": "ബെൽജിയം", + "BF": "à´¬àµàµ¼à´•àµà´•ിനാ ഫാസോ", + "BG": "ബൾഗേറിയ", + "BH": "ബഹàµà´±à´¿àµ»", + "BI": "ബറàµà´£àµà´Ÿà´¿", + "BJ": "ബെനിൻ", + "BL": "സെനàµà´±àµ ബാർതàµà´¤à´²à´®à´¿", + "BM": "ബർമàµà´¡", + "BN": "à´¬àµà´°àµ‚ണൈ", + "BO": "ബൊളീവിയ", + "BQ": "കരീബിയൻ നെതർലാൻഡàµà´¸àµ", + "BR": "à´¬àµà´°à´¸àµ€àµ½", + "BS": "ബഹാമാസàµ", + "BT": "ഭൂടàµà´Ÿà´¾àµ»", + "BW": "ബോടàµà´¸àµà´µà´¾à´¨", + "BY": "ബെലറൂസàµ", + "BZ": "ബെലീസàµ", + "CA": "കാനഡ", + "CC": "കോകàµà´•സൠ(കീലിംഗàµ) à´¦àµà´µàµ€à´ªàµà´•ൾ", + "CD": "കോംഗോ - കിൻഷാസ", + "CF": "സെൻടàµà´°àµ½ ആഫàµà´°à´¿à´•àµà´•ൻ റിപàµà´ªà´¬àµà´²à´¿à´•àµ", + "CG": "കോംഗോ - à´¬àµà´°à´¾à´¸à´µà´¿à´²àµà´²à´¿", + "CH": "à´¸àµà´µà´¿à´±àµà´±àµà´¸àµ¼à´²à´¾àµ»à´¡àµ", + "CI": "കോടàµà´Ÿàµ à´¡à´¿ വാർ", + "CK": "à´•àµà´•àµà´•ൠദàµà´µàµ€à´ªàµà´•ൾ", + "CL": "ചിലി", + "CM": "കാമറൂൺ", + "CN": "ചൈന", + "CO": "കൊളംബിയ", + "CR": "കോസàµà´±àµà´±à´±à´¿à´•àµà´•", + "CU": "à´•àµà´¯àµ‚à´¬", + "CV": "കേപàµà´ªàµ വെർദെ", + "CW": "à´•àµà´±à´¾à´•ാവോ", + "CX": "à´•àµà´°à´¿à´¸àµà´®à´¸àµ à´¦àµà´µàµ€à´ªàµ", + "CY": "സൈപàµà´°à´¸àµ", + "CZ": "ചെകàµà´•ൠറിപàµà´ªà´¬àµà´²à´¿à´•àµ", + "DE": "ജർമനി", + "DG": "ഡീഗോ à´—àµà´°à´¾à´·àµà´¯", + "DJ": "ദിജിബൗടàµà´Ÿà´¿", + "DK": "ഡെൻമാർകàµà´•àµ", + "DM": "ഡൊമിനികàµà´•", + "DO": "ഡൊമിനികàµà´•ൻ റിപàµà´ªà´¬àµà´²à´¿à´•àµ", + "DZ": "അൾജീരിയ", + "EA": "സെയൂതàµà´¤ ആൻഡൠമെലിയ", + "EC": "ഇകàµà´µà´¡àµ‹àµ¼", + "EE": "à´Žà´¸àµà´±àµà´±àµ‹à´£à´¿à´¯â€", + "EG": "ഈജിപàµà´¤àµ", + "EH": "പശàµà´šà´¿à´® സഹാറ", + "ER": "എറിതàµà´°à´¿à´¯", + "ES": "à´¸àµâ€Œà´ªàµ†à´¯à´¿àµ»", + "ET": "à´Žà´¤àµà´¯àµ‹à´ªàµà´¯", + "FI": "ഫിൻലാൻഡàµ", + "FJ": "ഫിജി", + "FK": "ഫാകàµà´•àµâ€Œà´²à´¾à´¨àµà´±àµ à´¦àµà´µàµ€à´ªàµà´•ൾ", + "FM": "മൈകàµà´°àµ‹à´¨àµ‡à´·àµà´¯", + "FO": "ഫറോ à´¦àµà´µàµ€à´ªàµà´•ൾ", + "FR": "à´«àµà´°à´¾àµ»à´¸àµ", + "GA": "ഗാബൺ", + "GB": "à´¯àµà´£àµˆà´±àµà´±à´¡àµ à´•à´¿à´‚à´—àµà´¡à´‚", + "GD": "à´—àµà´°à´¨àµ‡à´¡", + "GE": "ജോർജàµà´œà´¿à´¯", + "GF": "à´«àµà´°à´žàµà´šàµ ഗയാന", + "GG": "ഗേൺസി", + "GH": "ഘാന", + "GI": "ജിബàµà´°à´¾àµ¾à´Ÿàµà´Ÿàµ¼", + "GL": "à´—àµà´°àµ€àµ»à´²à´¾àµ»à´±àµ", + "GM": "ഗാംബിയ", + "GN": "ഗിനിയ", + "GP": "à´—àµà´µà´¾à´¡à´²àµ‚à´ªàµà´ªàµ", + "GQ": "ഇകàµà´µà´±àµà´±àµ‹à´±à´¿à´¯àµ½ ഗിനിയ", + "GR": "à´—àµà´°àµ€à´¸àµ", + "GS": "ദകàµà´·à´¿à´£ ജോർജàµà´œà´¿à´¯à´¯àµà´‚ ദകàµà´·à´¿à´£ സാൻഡàµâ€Œà´µà´¿à´šàµà´šàµ à´¦àµà´µàµ€à´ªàµà´•à´³àµà´‚", + "GT": "à´—àµà´µà´¾à´Ÿàµà´Ÿà´¿à´®à´¾à´²", + "GU": "à´—àµà´µà´¾à´‚", + "GW": "ഗിനിയ-ബിസൗ", + "GY": "ഗയാന", + "HK": "ഹോങàµà´•ോങàµà´™àµ (SAR) ചൈന", + "HN": "ഹോണàµà´Ÿàµà´±à´¾à´¸àµ", + "HR": "à´•àµà´°àµŠà´¯àµ‡à´·àµà´¯", + "HT": "ഹെയàµà´¤à´¿", + "HU": "ഹംഗറി", + "IC": "കാനറി à´¦àµà´µàµ€à´ªàµà´•ൾ", + "ID": "ഇനàµà´¤àµ‹à´¨àµ‡à´·àµà´¯", + "IE": "അയർലൻഡàµ", + "IL": "ഇസàµà´°à´¾à´¯àµ‡àµ½", + "IM": "à´àµ½ ഓഫൠമാൻ", + "IN": "ഇനàµà´¤àµà´¯", + "IO": "à´¬àµà´°à´¿à´Ÿàµà´Ÿàµ€à´·àµ ഇനàµà´¤àµà´¯àµ» മഹാസമàµà´¦àµà´° à´ªàµà´°à´¦àµ‡à´¶à´‚", + "IQ": "ഇറാഖàµ", + "IR": "ഇറാൻ", + "IS": "à´à´¸àµâ€Œà´²à´¾à´¨àµà´±àµ", + "IT": "ഇറàµà´±à´²à´¿", + "JE": "ജേഴàµà´¸à´¿", + "JM": "ജമൈകàµà´•", + "JO": "ജോർദàµà´¦à´¾àµ»", + "JP": "ജപàµà´ªà´¾àµ»", + "KE": "കെനിയ", + "KG": "കിർഗിസàµà´¥à´¾àµ»", + "KH": "കംബോഡിയ", + "KI": "കിരിബാടàµà´Ÿà´¿", + "KM": "കോമൊറോസàµ", + "KN": "സെനàµà´±àµ à´•à´¿à´±àµà´±àµâ€Œà´¸àµà´‚ നെവിസàµà´‚", + "KP": "ഉതàµà´¤à´°à´•ൊറിയ", + "KR": "ദകàµà´·à´¿à´£à´•ൊറിയ", + "KW": "à´•àµà´µàµˆà´±àµà´±àµ", + "KY": "കേമാൻ à´¦àµà´µàµ€à´ªàµà´•ൾ", + "KZ": "കസാഖിസàµà´¥à´¾àµ»", + "LA": "ലാവോസàµ", + "LB": "ലെബനൻ", + "LC": "സെൻറൠലൂസിയ", + "LI": "ലിചàµà´šàµºà´¸àµà´±àµà´±àµˆàµ»", + "LK": "à´¶àµà´°àµ€à´²à´™àµà´•", + "LR": "ലൈബീരിയ", + "LS": "ലെസോതോ", + "LT": "ലിതàµà´µà´¾à´¨à´¿à´¯", + "LU": "ലകàµà´¸à´‚ബർഗàµ", + "LV": "ലാറàµà´±àµà´µà´¿à´¯", + "LY": "ലിബിയ", + "MA": "മൊറോകàµà´•ൊ", + "MC": "മൊണാകàµà´•ോ", + "MD": "മൾഡോവ", + "ME": "മോണàµà´Ÿàµ†à´¨àµ†à´—àµà´°àµ‹", + "MF": "സെൻറൠമാർടàµà´Ÿà´¿àµ»", + "MG": "മഡഗാസàµà´•ർ", + "MH": "മാർഷൽâ€â€ à´¦àµà´µàµ€à´ªàµà´•ൾ", + "MK": "മാസിഡോണിയ", + "ML": "മാലി", + "MM": "à´®àµà´¯à´¾àµ»à´®à´¾àµ¼ (ബർമàµà´®)", + "MN": "മംഗോളിയ", + "MO": "മകàµà´•ാവൠ(SAR) ചൈന", + "MP": "ഉതàµà´¤à´° മറിയാനാ à´¦àµà´µàµ€à´ªàµà´•ൾ", + "MQ": "മാർടàµà´Ÿà´¿à´¨à´¿à´•àµà´•àµ", + "MR": "മൗറിറàµà´±à´¾à´¨à´¿à´¯", + "MS": "മൊണàµà´Ÿàµ†à´¸à´°à´¤àµà´¤àµ", + "MT": "മാൾടàµà´Ÿ", + "MU": "മൗറീഷàµà´¯à´¸àµ", + "MV": "മാലിദàµà´µàµ€à´ªàµ", + "MW": "മലാവി", + "MX": "മെകàµà´¸à´¿à´•àµà´•ോ", + "MY": "മലേഷàµà´¯", + "MZ": "മൊസാംബികàµà´•àµ", + "NA": "നമീബിയ", + "NC": "à´¨àµà´¯àµ‚ കാലിഡോണിയ", + "NE": "നൈജർ", + "NF": "നോർഫോകൠദàµà´µàµ€à´ªàµ", + "NG": "നൈജീരിയ", + "NI": "നികàµà´•രാഗàµà´µ", + "NL": "നെതർലാൻഡàµâ€Œà´¸àµ", + "NO": "നോർവെ", + "NP": "നേപàµà´ªà´¾àµ¾", + "NR": "നൗറàµ", + "NU": "à´¨àµà´¯àµ‚യി", + "NZ": "à´¨àµà´¯àµ‚സിലാൻറàµ", + "OM": "ഒമാൻ", + "PA": "പനാമ", + "PE": "പെറàµ", + "PF": "à´«àµà´°à´žàµà´šàµ പോളിനേഷàµà´¯", + "PG": "പാപàµà´ªàµà´µ à´¨àµà´¯àµ‚ ഗിനിയ", + "PH": "ഫിലിപàµà´ªàµ€àµ»à´¸àµ", + "PK": "പാകàµà´•à´¿à´¸àµà´¥à´¾àµ»", + "PL": "പോളണàµà´Ÿàµ", + "PM": "സെനàµà´±àµ പിയറിയàµà´‚ മികàµà´•ലണàµà´‚", + "PN": "പിറàµà´±àµâ€Œà´•െയàµâ€Œàµ» à´¦àµà´µàµ€à´ªàµà´•ൾ", + "PR": "à´ªàµà´¯àµ‚ർടàµà´Ÿàµ‹ റികàµà´•ോ", + "PS": "പാലസàµâ€Œà´¤àµ€àµ» à´ªàµà´°à´¦àµ‡à´¶à´™àµà´™àµ¾", + "PT": "പോർചàµà´šàµà´—ൽ", + "PW": "പലാവàµ", + "PY": "പരാഗàµà´µàµ‡", + "QA": "à´–à´¤àµà´¤àµ¼", + "RE": "റീയൂണിയൻ", + "RO": "റൊമാനിയ", + "RS": "സെർബിയ", + "RU": "റഷàµà´¯", + "RW": "à´±àµà´µà´¾à´£àµà´Ÿ", + "SA": "സൗദി അറേബàµà´¯", + "SB": "സോളമൻ†ദàµà´µàµ€à´ªàµà´•ൾ", + "SC": "സീഷെൽസàµ", + "SD": "à´¸àµà´¡à´¾àµ»", + "SE": "à´¸àµà´µàµ€à´¡àµ»", + "SG": "സിംഗപàµà´ªàµàµ¼", + "SH": "സെൻറൠഹെലീന", + "SI": "à´¸àµà´²àµ‹à´µàµ‡à´¨à´¿à´¯", + "SJ": "à´¸àµà´µà´¾àµ½à´¬à´¾à´¡àµà´‚ ജാൻ മായേനàµà´‚", + "SK": "à´¸àµà´²àµ‹à´µà´¾à´•àµà´¯", + "SL": "സിയെറ ലിയോൺ", + "SM": "സാൻ മറിനോ", + "SN": "സെനഗൽ", + "SO": "സോമാലിയ", + "SR": "à´¸àµà´°à´¿à´¨à´¾à´‚", + "SS": "ദകàµà´·à´¿à´£ à´¸àµà´¡à´¾àµ»", + "ST": "സാവോ ടോമàµà´‚ à´ªàµà´°à´¿àµ»à´¸à´¿à´ªàµ†à´¯àµà´‚", + "SV": "എൽ സാൽവദോർ", + "SX": "സിനàµà´±àµ മാർടàµà´Ÿàµ†àµ»", + "SY": "സിറിയ", + "SZ": "à´¸àµà´µà´¾à´¸à´¿à´²à´¾àµ»à´±àµ", + "TA": "à´Ÿàµà´°à´¸àµà´±àµà´±àµ» à´¡ കൂന", + "TC": "ടർകàµà´•àµâ€Œà´¸àµà´‚ കെയàµâ€Œà´•àµà´•ോ à´¦àµà´µàµ€à´ªàµà´•à´³àµà´‚", + "TD": "ഛാഡàµ", + "TF": "à´«àµà´°à´žàµà´šàµ ദകàµà´·à´¿à´£ ഭൂപàµà´°à´¦àµ‡à´¶à´‚", + "TG": "ടോഗോ", + "TH": "തായàµâ€Œà´²à´¾àµ»à´¡àµ", + "TJ": "താജികàµà´•à´¿à´¸àµà´¥à´¾àµ»", + "TK": "ടോകàµà´•െലൂ", + "TL": "തിമോർ-ലെസàµà´±àµà´±àµ†", + "TM": "à´¤àµàµ¼à´•àµà´•àµà´®àµ†à´¨à´¿à´¸àµà´¥à´¾àµ»", + "TN": "à´Ÿàµà´£àµ€à´·àµà´¯", + "TO": "ടോംഗ", + "TR": "à´¤àµàµ¼à´•àµà´•à´¿", + "TT": "à´Ÿàµà´°à´¿à´¨à´¿à´¡à´¾à´¡àµà´‚ à´Ÿàµà´¬à´¾à´—ോയàµà´‚", + "TV": "à´Ÿàµà´µà´¾à´²àµ", + "TW": "തായàµâ€Œà´µà´¾àµ»", + "TZ": "ടാൻസാനിയ", + "UA": "ഉകàµà´°àµ†à´¯àµâ€Œàµ»", + "UG": "ഉഗാണàµà´Ÿ", + "UM": "à´¯àµ.à´Žà´¸àµ. à´¦àµà´µàµ€à´ªà´¸à´®àµ‚ഹങàµà´™àµ¾", + "UN": "à´à´•àµà´¯à´°à´¾à´·àµà´Ÿàµà´°à´¸à´­", + "US": "അമേരികàµà´•ൻ à´à´•àµà´¯à´¨à´¾à´Ÿàµà´•ൾ", + "UY": "ഉറàµà´—àµà´µàµ‡", + "UZ": "ഉസàµâ€Œà´¬àµ†à´•àµà´•à´¿à´¸àµà´¥à´¾àµ»", + "VA": "വതàµà´¤à´¿à´•àµà´•ാൻ", + "VC": "സെനàµà´±àµ വിൻസെനàµà´±àµà´‚ à´—àµà´°à´¨àµ†à´¡àµˆàµ»à´¸àµà´‚", + "VE": "വെനിസàµà´µàµ‡à´²", + "VG": "à´¬àµà´°à´¿à´Ÿàµà´Ÿàµ€à´·àµ വെർജിൻ à´¦àµà´µàµ€à´ªàµà´•ൾ", + "VI": "à´¯àµ.à´Žà´¸àµ. വെർജിൻ à´¦àµà´µàµ€à´ªàµà´•ൾ", + "VN": "വിയറàµà´±àµà´¨à´¾à´‚", + "VU": "വനàµà´µà´¾à´¤àµ", + "WF": "വാലിസൠആനàµà´±àµ à´«àµà´¯àµ‚à´šàµà´¯àµà´¨", + "WS": "സമോവ", + "XK": "കൊസോവൊ", + "YE": "യെമൻ", + "YT": "മയോടàµà´Ÿà´¿", + "ZA": "ദകàµà´·à´¿à´£à´¾à´«àµà´°à´¿à´•àµà´•", + "ZM": "സാംബിയ", + "ZW": "സിംബാബàµâ€Œà´µàµ‡" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mn.json new file mode 100644 index 0000000000000000000000000000000000000000..a8dc1f396e0784530574e7e56db9a9e27ad6e19d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mn.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "ÐÑкенÑион арал", + "AD": "Ðндорра", + "AE": "Ðрабын ÐÑгдÑÑн Эмират", + "AF": "ÐфганиÑтан", + "AG": "Ðнтигуа ба Барбуда", + "AI": "Ðнгила", + "AL": "Ðлбани", + "AM": "Ðрмени", + "AO": "Ðнгол", + "AQ": "Ðнтарктик", + "AR": "Ðргентин", + "AS": "Ðмерикийн Самоа", + "AT": "ÐвÑтри", + "AU": "ÐвÑтрали", + "AW": "Ðруба", + "AX": "Ðландын Ðрлууд", + "AZ": "Ðзербайжан", + "BA": "БоÑни Герцеговин", + "BB": "БарбадоÑ", + "BD": "Бангладеш", + "BE": "Белги", + "BF": "Буркина фаÑо", + "BG": "Болгар", + "BH": "Бахрейн", + "BI": "Бурунди", + "BJ": "Бенин", + "BL": "Сент Бартельми", + "BM": "Бермуд", + "BN": "Бруней", + "BO": "Боливи", + "BQ": "Карибын Ðидерланд", + "BR": "Бразил", + "BS": "Багам", + "BT": "Бутан", + "BW": "БотÑвана", + "BY": "БеларуÑÑŒ", + "BZ": "Белиз", + "CA": "Канад", + "CC": "ÐšÐ¾ÐºÐ¾Ñ (Кийлинг) арлууд", + "CD": "Конго-КиншаÑа", + "CF": "Төв Ðфрикийн Бүгд Ðайрамдах УлÑ", + "CG": "Конго Браззавиль", + "CH": "Швейцари", + "CI": "Кот д’Ивуар", + "CK": "Күүкийн арлууд", + "CL": "Чили", + "CM": "Камерун", + "CN": "Ð¥Ñтад", + "CO": "Колумб", + "CR": "КоÑта Рика", + "CU": "Куба", + "CV": "Капе Верде", + "CW": "Куракао", + "CX": "Зул Ñарын арал", + "CY": "Кипр", + "CZ": "Бүгд Ðайрамдах Чех УлÑ", + "DE": "Герман", + "DG": "Диего ГарÑиа", + "DJ": "Джибути", + "DK": "Дани", + "DM": "Доминик", + "DO": "Бүгд Ðайрамдах Доминикан УлÑ", + "DZ": "Ðлжир", + "EA": "Сеута ба МелильÑ", + "EC": "Эквадор", + "EE": "ЭÑтони", + "EG": "Египет", + "EH": "Баруун Сахар", + "ER": "Эритри", + "ES": "ИÑпани", + "ET": "Этиоп", + "FI": "Финланд", + "FJ": "Фижи", + "FK": "Фолькландын Ðрлууд", + "FM": "Микронези", + "FO": "Ð¤Ð°Ñ€Ð¾Ñ Ðрлууд", + "FR": "Франц", + "GA": "Габон", + "GB": "Их Британи", + "GD": "Гренада", + "GE": "Гүрж", + "GF": "Францын Гайана", + "GG": "ГернÑи", + "GH": "Гана", + "GI": "Гибралтар", + "GL": "Гренланд", + "GM": "Гамби", + "GN": "Гвиней", + "GP": "Гваделуп", + "GQ": "Экваторын Гвиней", + "GR": "Грек", + "GS": "Өмнөд Жоржиа ба Өмнөд СÑндвичийн Ðрлууд", + "GT": "Гватемал", + "GU": "Гуам", + "GW": "Гвиней-БиÑау", + "GY": "Гайана", + "HK": "БÐÐ¥ÐУ-ын ТуÑгай захиргааны Ð±Ò¯Ñ Ð¥Ð¾Ð½Ð³ Конг", + "HN": "ГондураÑ", + "HR": "Хорват", + "HT": "Гаити", + "HU": "Унгар", + "IC": "Канарын арлууд", + "ID": "Индонези", + "IE": "Ирланд", + "IL": "Израиль", + "IM": "МÑн Ðрал", + "IN": "ЭнÑтхÑг", + "IO": "Британийн харьÑа ЭнÑтхÑгийн далай дахь нутаг дÑвÑгÑрүүд", + "IQ": "Ирак", + "IR": "Иран", + "IS": "ИÑланд", + "IT": "Итали", + "JE": "ЖерÑи", + "JM": "Ямайк", + "JO": "Йордан", + "JP": "Япон", + "KE": "Кени", + "KG": "КыргызÑтан", + "KH": "Камбож", + "KI": "Кирибати", + "KM": "КомороÑ", + "KN": "Сент-ÐšÐ¸Ñ‚Ñ‚Ñ Ð±Ð° ÐевиÑ", + "KP": "Хойд СолонгоÑ", + "KR": "Өмнөд СолонгоÑ", + "KW": "Кувейт", + "KY": "Кайманы Ðрлууд", + "KZ": "КазахÑтан", + "LA": "ЛаоÑ", + "LB": "Ливан", + "LC": "Сент ЛюÑиа", + "LI": "Лихтенштейн", + "LK": "Шри Ланка", + "LR": "Либери", + "LS": "ЛеÑото", + "LT": "Литва", + "LU": "ЛюкÑембург", + "LV": "Латви", + "LY": "Ливи", + "MA": "Марокко", + "MC": "Монако", + "MD": "Молдав", + "ME": "Монтенегро", + "MF": "Сент-Мартин", + "MG": "МадагаÑкар", + "MH": "Маршаллын арлууд", + "MK": "Македон", + "ML": "Мали", + "MM": "МьÑнмар (Бурма)", + "MN": "Монгол", + "MO": "БÐÐ¥ÐУ-ын ТуÑгай захиргааны Ð±Ò¯Ñ ÐœÐ°ÐºÐ°Ð¾", + "MP": "Хойд Марианы арлууд", + "MQ": "Мартиник", + "MR": "Мавритани", + "MS": "МонтÑеррат", + "MT": "Мальта", + "MU": "МавритуÑ", + "MV": "Мальдив", + "MW": "Малави", + "MX": "МекÑик", + "MY": "Малайз", + "MZ": "Мозамбик", + "NA": "Ðамиби", + "NC": "Ð¨Ð¸Ð½Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸", + "NE": "Ðигер", + "NF": "Ðорфолк арлууд", + "NG": "Ðигери", + "NI": "Ðикарагуа", + "NL": "Ðидерланд", + "NO": "Ðорвеги", + "NP": "Балба", + "NR": "Ðауру", + "NU": "ÐиуÑ", + "NZ": "Ð¨Ð¸Ð½Ñ Ð—ÐµÐ»Ð°Ð½Ð´", + "OM": "Оман", + "PA": "Панам", + "PE": "Перу", + "PF": "Францын Полинез", + "PG": "Папуа Ð¨Ð¸Ð½Ñ Ð“Ð²Ð¸Ð½ÐµÐ¹", + "PH": "Филиппин", + "PK": "ПакиÑтан", + "PL": "Польш", + "PM": "СÑнт Пьер ба Микелон", + "PN": "ПиткÑрн арлууд", + "PR": "ПуÑрто Рико", + "PS": "ПалеÑтины нутаг дÑвÑгÑрүүд", + "PT": "Португаль", + "PW": "Палау", + "PY": "Парагвай", + "QA": "Катар", + "RE": "Реюньон", + "RO": "Румын", + "RS": "Серби", + "RU": "ОроÑ", + "RW": "Руанда", + "SA": "Саудын Ðраб", + "SB": "Соломоны Ðрлууд", + "SC": "Сейшел", + "SD": "Судан", + "SE": "Швед", + "SG": "Сингапур", + "SH": "Сент Хелена", + "SI": "Словени", + "SJ": "Свалбард ба Ян Майен", + "SK": "Словак", + "SL": "Сьерра-Леоне", + "SM": "Сан-Марино", + "SN": "Сенегал", + "SO": "Сомали", + "SR": "Суринам", + "SS": "Өмнөд Судан", + "ST": "Сан-Томе ба ПринÑипи", + "SV": "Эль Сальвадор", + "SX": "Синт Мартен", + "SY": "Сири", + "SZ": "Свазиланд", + "TA": "ТриÑтан да КуньÑ", + "TC": "Турк ба КайкоÑын Ðрлууд", + "TD": "Чад", + "TF": "Францын өмнөд газар нутаг", + "TG": "Того", + "TH": "Тайланд", + "TJ": "ТажикиÑтан", + "TK": "Токелау", + "TL": "Тимор-ЛеÑте", + "TM": "ТуркмениÑтан", + "TN": "ТуниÑ", + "TO": "Тонга", + "TR": "Турк", + "TT": "Тринидад Тобаго", + "TV": "Тувалу", + "TW": "Тайвань", + "TZ": "Танзани", + "UA": "Украин", + "UG": "Уганда", + "UM": "ÐÐУ-ын тойрÑон арлууд", + "UN": "ÐÑгдÑÑн ҮндÑÑтний Байгууллага", + "US": "Ðмерикийн ÐÑгдÑÑн УлÑ", + "UY": "Уругвай", + "UZ": "УзбекиÑтан", + "VA": "Ватикан хот улÑ", + "VC": "СÑнт ВинÑÑнт ба Гренадин", + "VE": "ВенеÑуÑл", + "VG": "Британийн Виржиний Ðрлууд", + "VI": "ÐÐУ-ын Виржиний Ðрлууд", + "VN": "Вьетнам", + "VU": "Вануату", + "WF": "Ð£Ð¾Ð»Ð»Ð¸Ñ Ð±Ð° Футуна", + "WS": "Самоа", + "XK": "КоÑово", + "YE": "Йемен", + "YT": "Майотте", + "ZA": "Өмнөд Ðфрик тив", + "ZM": "Замби", + "ZW": "Зимбабве" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mo.json new file mode 100644 index 0000000000000000000000000000000000000000..785e0274a94596f382da80a9edba0f016660d2ed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mo.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.99", + "Names": { + "MM": "Myanmar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mr.json new file mode 100644 index 0000000000000000000000000000000000000000..acd7202fdea93697fa0f4bc4375d8a3cc3ec038c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mr.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "अâ€à¥…सेनà¥à¤¶à¤¿à¤¯à¤¨ बेट", + "AD": "अà¤à¤¡à¥‹à¤°à¤¾", + "AE": "संयà¥à¤•à¥à¤¤ अरब अमीरात", + "AF": "अफगाणिसà¥à¤¤à¤¾à¤¨", + "AG": "अà¤à¤Ÿà¤¿à¤—à¥à¤µà¤¾ आणि बरà¥à¤¬à¥à¤¡à¤¾", + "AI": "अà¤à¤—à¥à¤µà¤¿à¤²à¤¾", + "AL": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾", + "AM": "अरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾", + "AO": "अंगोला", + "AQ": "अंटारà¥à¤•à¥à¤Ÿà¤¿à¤•ा", + "AR": "अरà¥à¤œà¥‡à¤‚टिना", + "AS": "अमेरिकन सामोआ", + "AT": "ऑसà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾", + "AU": "ऑसà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾", + "AW": "अरà¥à¤¬à¤¾", + "AX": "अâ€à¥…लà¤à¤¡ बेटे", + "AZ": "अà¤à¤°à¤¬à¥ˆà¤œà¤¾à¤¨", + "BA": "बोसà¥à¤¨à¤¿à¤¯à¤¾ अणि हरà¥à¤œà¥‡à¤—ोविना", + "BB": "बारà¥à¤¬à¤¾à¤¡à¥‹à¤¸", + "BD": "बांगलादेश", + "BE": "बेलà¥à¤œà¤¿à¤¯à¤®", + "BF": "बà¥à¤°à¥à¤•िना फासो", + "BG": "बलà¥à¤—ेरिया", + "BH": "बहारीन", + "BI": "बà¥à¤°à¥à¤‚डी", + "BJ": "बेनिन", + "BL": "सेंट बारà¥à¤¥à¥‡à¤²à¥‡à¤®à¥€", + "BM": "बरà¥à¤®à¥à¤¡à¤¾", + "BN": "बà¥à¤°à¥à¤¨à¥‡à¤ˆ", + "BO": "बोलिवà¥à¤¹à¤¿à¤¯à¤¾", + "BQ": "कॅरिबियन नेदरलà¤à¤¡à¥à¤¸", + "BR": "बà¥à¤°à¤¾à¤à¤¿à¤²", + "BS": "बहामाज", + "BT": "भूतान", + "BW": "बोटà¥à¤¸à¤µà¤¾à¤¨à¤¾", + "BY": "बेलारूस", + "BZ": "बलिà¤", + "CA": "कॅनडा", + "CC": "कोकोस (कीलिंग) बेटे", + "CD": "काà¤à¤—ो - किंशासा", + "CF": "केंदà¥à¤°à¥€à¤¯ अफà¥à¤°à¤¿à¤•ी पà¥à¤°à¤œà¤¾à¤¸à¤¤à¥à¤¤à¤¾à¤•", + "CG": "काà¤à¤—ो - बà¥à¤°à¤¾à¤à¤¾à¤µà¤¿à¤²à¥‡", + "CH": "सà¥à¤µà¤¿à¤¤à¥à¤à¤°à¥à¤²à¤‚ड", + "CI": "आयवà¥à¤¹à¤°à¥€ कोसà¥à¤Ÿ", + "CK": "कà¥à¤• बेटे", + "CL": "चिली", + "CM": "कॅमेरून", + "CN": "चीन", + "CO": "कोलमà¥à¤¬à¤¿à¤¯à¤¾", + "CR": "कोसà¥à¤Ÿà¤¾ रिका", + "CU": "कà¥à¤¯à¥‚बा", + "CV": "केप वà¥à¤¹à¤°à¥à¤¡à¥‡", + "CW": "कà¥à¤¯à¥à¤°à¤¾à¤¸à¤¾à¤“", + "CX": "खà¥à¤°à¤¿à¤¸à¤®à¤¸ बेट", + "CY": "सायपà¥à¤°à¤¸", + "CZ": "à¤à¥‡à¤• पà¥à¤°à¤œà¤¾à¤¸à¤¤à¥à¤¤à¤¾à¤•", + "DE": "जरà¥à¤®à¤¨à¥€", + "DG": "दिà¤à¤—ो गारà¥à¤¸à¤¿à¤¯à¤¾", + "DJ": "जिबौटी", + "DK": "डेनà¥à¤®à¤¾à¤°à¥à¤•", + "DM": "डोमिनिका", + "DO": "डोमिनिकन पà¥à¤°à¤œà¤¾à¤¸à¤¤à¥à¤¤à¤¾à¤•", + "DZ": "अलà¥à¤œà¥€à¤°à¤¿à¤¯à¤¾", + "EA": "सà¥à¤¯à¥‚टा आणि मेलिला", + "EC": "इकà¥à¤µà¤¾à¤¡à¥‹à¤°", + "EE": "à¤à¤¸à¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾", + "EG": "इजिपà¥à¤¤", + "EH": "पशà¥à¤šà¤¿à¤® सहारा", + "ER": "à¤à¤°à¤¿à¤Ÿà¥à¤°à¤¿à¤¯à¤¾", + "ES": "सà¥à¤ªà¥‡à¤¨", + "ET": "इथिओपिया", + "FI": "फिनलंड", + "FJ": "फिजी", + "FK": "फॉकलंड बेटे", + "FM": "मायकà¥à¤°à¥‹à¤¨à¥‡à¤¶à¤¿à¤¯à¤¾", + "FO": "फेरो बेटे", + "FR": "फà¥à¤°à¤¾à¤¨à¥à¤¸", + "GA": "गॅबॉन", + "GB": "यà¥à¤¨à¤¾à¤¯à¤Ÿà¥‡à¤¡ किंगडम", + "GD": "गà¥à¤°à¥‡à¤¨à¥‡à¤¡à¤¾", + "GE": "जॉरà¥à¤œà¤¿à¤¯à¤¾", + "GF": "फà¥à¤°à¥‡à¤‚च गयाना", + "GG": "गà¥à¤µà¥‡à¤°à¥à¤¨à¤¸à¥‡", + "GH": "घाना", + "GI": "जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤°", + "GL": "गà¥à¤°à¥€à¤¨à¤²à¤‚ड", + "GM": "गामà¥à¤¬à¤¿à¤¯à¤¾", + "GN": "गिनी", + "GP": "गà¥à¤µà¤¾à¤¡à¥‡à¤²à¥‹à¤‰à¤ªà¥‡", + "GQ": "इकà¥à¤µà¥‡à¤Ÿà¥‹à¤°à¤¿à¤¯à¤² गिनी", + "GR": "गà¥à¤°à¥€à¤¸", + "GS": "दकà¥à¤·à¤¿à¤£ जॉरà¥à¤œà¤¿à¤¯à¤¾ आणि दकà¥à¤·à¤¿à¤£ सà¤à¤¡à¤µà¤¿à¤š बेटे", + "GT": "गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾", + "GU": "गà¥à¤†à¤®", + "GW": "गिनी-बिसाउ", + "GY": "गयाना", + "HK": "हाà¤à¤—काà¤à¤— à¤à¤¸à¤à¤†à¤° चीन", + "HN": "होंडà¥à¤°à¤¾à¤¸", + "HR": "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾", + "HT": "हैती", + "HU": "हंगेरी", + "IC": "कॅनरी बेटे", + "ID": "इंडोनेशिया", + "IE": "आयरà¥à¤²à¤‚ड", + "IL": "इसà¥à¤¤à¥à¤°à¤¾à¤‡à¤²", + "IM": "आयल ऑफ मॅन", + "IN": "भारत", + "IO": "बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ हिंदी महासागर कà¥à¤·à¥‡à¤¤à¥à¤°", + "IQ": "इराक", + "IR": "इराण", + "IS": "आइसलà¤à¤¡", + "IT": "इटली", + "JE": "जरà¥à¤¸à¥€", + "JM": "जमैका", + "JO": "जॉरà¥à¤¡à¤¨", + "JP": "जपान", + "KE": "केनिया", + "KG": "किरगिà¤à¤¸à¥à¤¤à¤¾à¤¨", + "KH": "कंबोडिया", + "KI": "किरीबाटी", + "KM": "कोमोरोज", + "KN": "सेंट किटà¥à¤¸ आणि नेवà¥à¤¹à¤¿à¤¸", + "KP": "उतà¥à¤¤à¤° कोरिया", + "KR": "दकà¥à¤·à¤¿à¤£ कोरिया", + "KW": "कà¥à¤µà¥‡à¤¤", + "KY": "केमन बेटे", + "KZ": "कà¤à¤¾à¤•सà¥à¤¤à¤¾à¤¨", + "LA": "लाओस", + "LB": "लेबनॉन", + "LC": "सेंट लà¥à¤¯à¥‚सिया", + "LI": "लिकà¥à¤Ÿà¥‡à¤¨à¤¸à¥à¤Ÿà¤¾à¤‡à¤¨", + "LK": "शà¥à¤°à¥€à¤²à¤‚का", + "LR": "लायबेरिया", + "LS": "लेसोथो", + "LT": "लिथà¥à¤†à¤¨à¤¿à¤¯à¤¾", + "LU": "लकà¥à¤à¥‡à¤‚बरà¥à¤—", + "LV": "लातà¥à¤µà¤¿à¤¯à¤¾", + "LY": "लिबिया", + "MA": "मोरोकà¥à¤•ो", + "MC": "मोनॅको", + "MD": "मोलà¥à¤¡à¥‹à¤µà¥à¤¹à¤¾", + "ME": "मोंटेनेगà¥à¤°à¥‹", + "MF": "सेंट मारà¥à¤Ÿà¤¿à¤¨", + "MG": "मादागासà¥à¤•र", + "MH": "मारà¥à¤¶à¤² बेटे", + "MK": "मॅसेडोनिया", + "ML": "माली", + "MM": "मà¥à¤¯à¤¾à¤¨à¤®à¤¾à¤° (बरà¥à¤®à¤¾)", + "MN": "मंगोलिया", + "MO": "मकाओ à¤à¤¸à¤à¤†à¤° चीन", + "MP": "उतà¥à¤¤à¤°à¥€ मारियाना बेटे", + "MQ": "मारà¥à¤Ÿà¤¿à¤¨à¤¿à¤•", + "MR": "मॉरिटानिया", + "MS": "मॉनà¥à¤Ÿà¥à¤¸à¥‡à¤°à¤¾à¤Ÿ", + "MT": "मालà¥à¤Ÿà¤¾", + "MU": "मॉरिशस", + "MV": "मालदीव", + "MW": "मलावी", + "MX": "मेकà¥à¤¸à¤¿à¤•ो", + "MY": "मलेशिया", + "MZ": "मोà¤à¤¾à¤®à¥à¤¬à¤¿à¤•", + "NA": "नामिबिया", + "NC": "नà¥à¤¯à¥‚ कॅलेडोनिया", + "NE": "नाइजर", + "NF": "नॉरफॉक बेट", + "NG": "नायजेरिया", + "NI": "निकारागà¥à¤µà¤¾", + "NL": "नेदरलà¤à¤¡", + "NO": "नॉरà¥à¤µà¥‡", + "NP": "नेपाळ", + "NR": "नाउरू", + "NU": "नीयू", + "NZ": "नà¥à¤¯à¥‚à¤à¥€à¤²à¤‚ड", + "OM": "ओमान", + "PA": "पनामा", + "PE": "पेरू", + "PF": "फà¥à¤°à¥‡à¤‚च पॉलिनेशिया", + "PG": "पापà¥à¤† नà¥à¤¯à¥‚ गिनी", + "PH": "फिलिपिनà¥à¤¸", + "PK": "पाकिसà¥à¤¤à¤¾à¤¨", + "PL": "पोलंड", + "PM": "सेंट पियरे आणि मिकà¥à¤µà¥‡à¤²à¥‹à¤¨", + "PN": "पिटकैरà¥à¤¨ बेटे", + "PR": "पà¥à¤¯à¥à¤à¤°à¥à¤¤à¥‹ रिको", + "PS": "पॅलेसà¥à¤Ÿà¤¿à¤¨à¤¿à¤¯à¤¨ पà¥à¤°à¤¦à¥‡à¤¶", + "PT": "पोरà¥à¤¤à¥à¤—ाल", + "PW": "पलाऊ", + "PY": "परागà¥à¤µà¥‡", + "QA": "कतार", + "RE": "रियà¥à¤¨à¤¿à¤¯à¤¨", + "RO": "रोमानिया", + "RS": "सरà¥à¤¬à¤¿à¤¯à¤¾", + "RU": "रशिया", + "RW": "रवांडा", + "SA": "सौदी अरब", + "SB": "सोलोमन बेटे", + "SC": "सेशेलà¥à¤¸", + "SD": "सà¥à¤¦à¤¾à¤¨", + "SE": "सà¥à¤µà¥€à¤¡à¤¨", + "SG": "सिंगापूर", + "SH": "सेंट हेलेना", + "SI": "सà¥à¤²à¥‹à¤µà¥à¤¹à¥‡à¤¨à¤¿à¤¯à¤¾", + "SJ": "सà¥à¤µà¤¾à¤²à¤¬à¤°à¥à¤¡ आणि जान मायेन", + "SK": "सà¥à¤²à¥‹à¤µà¥à¤¹à¤¾à¤•िया", + "SL": "सिà¤à¤°à¤¾ लिओन", + "SM": "सॅन मरीनो", + "SN": "सेनेगल", + "SO": "सोमालिया", + "SR": "सà¥à¤°à¤¿à¤¨à¤¾à¤®", + "SS": "दकà¥à¤·à¤¿à¤£ सà¥à¤¦à¤¾à¤¨", + "ST": "साओ टोम आणि पà¥à¤°à¤¿à¤‚सिपे", + "SV": "अल सालà¥à¤µà¤¾à¤¡à¥‹à¤°", + "SX": "सिंट मारà¥à¤Ÿà¥‡à¤¨", + "SY": "सीरिया", + "SZ": "सà¥à¤µà¤¾à¤à¤¿à¤²à¤à¤¡", + "TA": "टà¥à¤°à¤¿à¤¸à¥à¤Ÿà¤¨ दा कà¥à¤¨à¥à¤¹à¤¾", + "TC": "टरà¥à¤•à¥à¤¸ आणि कैकोस बेटे", + "TD": "चाड", + "TF": "फà¥à¤°à¥‡à¤‚च दाकà¥à¤·à¤¿à¤£à¤¾à¤¤à¥à¤¯ पà¥à¤°à¤¦à¥‡à¤¶", + "TG": "टोगो", + "TH": "थायलंड", + "TJ": "ताजिकिसà¥à¤¤à¤¾à¤¨", + "TK": "तोकेलाउ", + "TL": "तिमोर-लेसà¥à¤¤à¥‡", + "TM": "तà¥à¤°à¥à¤•मेनिसà¥à¤¤à¤¾à¤¨", + "TN": "टà¥à¤¯à¥‚निशिया", + "TO": "टोंगा", + "TR": "तà¥à¤°à¥à¤•ी", + "TT": "तà¥à¤°à¤¿à¤¨à¤¿à¤¦à¤¾à¤¦ आणि टोबॅगो", + "TV": "टà¥à¤µà¤¾à¤²à¥", + "TW": "तैवान", + "TZ": "टांà¤à¤¾à¤¨à¤¿à¤¯à¤¾", + "UA": "यà¥à¤•à¥à¤°à¥‡à¤¨", + "UG": "यà¥à¤—ांडा", + "UM": "यू.à¤à¤¸. आउटलाइंग बेटे", + "UN": "संयà¥à¤•à¥à¤¤ राषà¥à¤Ÿà¥à¤°", + "US": "यà¥à¤¨à¤¾à¤¯à¤Ÿà¥‡à¤¡ सà¥à¤Ÿà¥‡à¤Ÿà¥à¤¸", + "UY": "उरà¥à¤—à¥à¤µà¥‡", + "UZ": "उà¤à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨", + "VA": "वà¥à¤¹à¥…टिकन सिटी", + "VC": "सेंट वà¥à¤¹à¤¿à¤¨à¥à¤¸à¥‡à¤‚ट आणि गà¥à¤°à¥‡à¤¨à¤¡à¤¾à¤‡à¤¨à¥à¤¸", + "VE": "वà¥à¤¹à¥‡à¤¨à¥‡à¤à¥à¤à¤²à¤¾", + "VG": "बà¥à¤°à¤¿à¤Ÿà¤¿à¤¶ वà¥à¤¹à¤°à¥à¤œà¤¿à¤¨ बेटे", + "VI": "यू.à¤à¤¸. वà¥à¤¹à¤°à¥à¤œà¤¿à¤¨ बेटे", + "VN": "वà¥à¤¹à¤¿à¤à¤¤à¤¨à¤¾à¤®", + "VU": "वानà¥à¤†à¤¤à¥", + "WF": "वालिस आणि फà¥à¤¯à¥‚चूना", + "WS": "सामोआ", + "XK": "कोसोवà¥à¤¹à¥‹", + "YE": "येमेन", + "YT": "मायोटà¥à¤Ÿà¥‡", + "ZA": "दकà¥à¤·à¤¿à¤£ आफà¥à¤°à¤¿à¤•ा", + "ZM": "à¤à¤¾à¤®à¥à¤¬à¤¿à¤¯à¤¾", + "ZW": "à¤à¤¿à¤®à¥à¤¬à¤¾à¤¬à¥à¤µà¥‡" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ms.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ms.json new file mode 100644 index 0000000000000000000000000000000000000000..e21e619ea0c4d40d8b8ba66da363243804b1c000 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ms.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Pulau Ascension", + "AD": "Andorra", + "AE": "Emiriah Arab Bersatu", + "AF": "Afghanistan", + "AG": "Antigua dan Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antartika", + "AR": "Argentina", + "AS": "Samoa Amerika", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Kepulauan Aland", + "AZ": "Azerbaijan", + "BA": "Bosnia dan Herzegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgium", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Belanda Caribbean", + "BR": "Brazil", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kepulauan Cocos (Keeling)", + "CD": "Congo - Kinshasa", + "CF": "Republik Afrika Tengah", + "CG": "Congo - Brazzaville", + "CH": "Switzerland", + "CI": "Cote d’Ivoire", + "CK": "Kepulauan Cook", + "CL": "Chile", + "CM": "Cameroon", + "CN": "China", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Cape Verde", + "CW": "Curacao", + "CX": "Pulau Krismas", + "CY": "Cyprus", + "CZ": "Republik Czech", + "DE": "Jerman", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Denmark", + "DM": "Dominica", + "DO": "Republik Dominica", + "DZ": "Algeria", + "EA": "Ceuta dan Melilla", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Mesir", + "EH": "Sahara Barat", + "ER": "Eritrea", + "ES": "Sepanyol", + "ET": "Ethiopia", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Kepulauan Falkland", + "FM": "Micronesia", + "FO": "Kepulauan Faroe", + "FR": "Perancis", + "GA": "Gabon", + "GB": "United Kingdom", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Guiana Perancis", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Greenland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Guinea Khatulistiwa", + "GR": "Greece", + "GS": "Kepulauan Georgia Selatan & Sandwich Selatan", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea Bissau", + "GY": "Guyana", + "HK": "Hong Kong SAR China", + "HN": "Honduras", + "HR": "Croatia", + "HT": "Haiti", + "HU": "Hungary", + "IC": "Kepulauan Canary", + "ID": "Indonesia", + "IE": "Ireland", + "IL": "Israel", + "IM": "Isle of Man", + "IN": "India", + "IO": "Wilayah Lautan Hindi British", + "IQ": "Iraq", + "IR": "Iran", + "IS": "Iceland", + "IT": "Itali", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordan", + "JP": "Jepun", + "KE": "Kenya", + "KG": "Kyrgyzstan", + "KH": "Kemboja", + "KI": "Kiribati", + "KM": "Comoros", + "KN": "Saint Kitts dan Nevis", + "KP": "Korea Utara", + "KR": "Korea Selatan", + "KW": "Kuwait", + "KY": "Kepulauan Cayman", + "KZ": "Kazakhstan", + "LA": "Laos", + "LB": "Lubnan", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lithuania", + "LU": "Luxembourg", + "LV": "Latvia", + "LY": "Libya", + "MA": "Maghribi", + "MC": "Monaco", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "Saint Martin", + "MG": "Madagaskar", + "MH": "Kepulauan Marshall", + "MK": "Macedonia", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongolia", + "MO": "Macau SAR China", + "MP": "Kepulauan Mariana Utara", + "MQ": "Martinique", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldives", + "MW": "Malawi", + "MX": "Mexico", + "MY": "Malaysia", + "MZ": "Mozambique", + "NA": "Namibia", + "NC": "New Caledonia", + "NE": "Niger", + "NF": "Pulau Norfolk", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Belanda", + "NO": "Norway", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "New Zealand", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Polinesia Perancis", + "PG": "Papua New Guinea", + "PH": "Filipina", + "PK": "Pakistan", + "PL": "Poland", + "PM": "Saint Pierre dan Miquelon", + "PN": "Kepulauan Pitcairn", + "PR": "Puerto Rico", + "PS": "Wilayah Palestin", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Reunion", + "RO": "Romania", + "RS": "Serbia", + "RU": "Rusia", + "RW": "Rwanda", + "SA": "Arab Saudi", + "SB": "Kepulauan Solomon", + "SC": "Seychelles", + "SD": "Sudan", + "SE": "Sweden", + "SG": "Singapura", + "SH": "Saint Helena", + "SI": "Slovenia", + "SJ": "Svalbard dan Jan Mayen", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "SS": "Sudan Selatan", + "ST": "Sao Tome dan Principe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syria", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Kepulauan Turks dan Caicos", + "TD": "Chad", + "TF": "Wilayah Selatan Perancis", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tajikistan", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Turki", + "TT": "Trinidad dan Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraine", + "UG": "Uganda", + "UM": "Kepulauan Terpencil A.S.", + "UN": "Bangsa-bangsa Bersatu", + "US": "Amerika Syarikat", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VA": "Kota Vatican", + "VC": "Saint Vincent dan Grenadines", + "VE": "Venezuela", + "VG": "Kepulauan Virgin British", + "VI": "Kepulauan Virgin A.S.", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis dan Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yaman", + "YT": "Mayotte", + "ZA": "Afrika Selatan", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mt.json new file mode 100644 index 0000000000000000000000000000000000000000..0835be6c9a418ae7693c0ce6033741ef17d7b956 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/mt.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AC": "Ascension Island", + "AD": "Andorra", + "AE": "l-Emirati Għarab Magħquda", + "AF": "l-Afganistan", + "AG": "Antigua u Barbuda", + "AI": "Anguilla", + "AL": "l-Albanija", + "AM": "l-Armenja", + "AO": "l-Angola", + "AQ": "l-Antartika", + "AR": "l-ArÄ¡entina", + "AS": "is-Samoa Amerikana", + "AT": "l-Awstrija", + "AU": "l-Awstralja", + "AW": "Aruba", + "AX": "il-Gżejjer Aland", + "AZ": "l-AżerbajÄ¡an", + "BA": "il-Bożnija-Ħerzegovina", + "BB": "Barbados", + "BD": "il-Bangladesh", + "BE": "il-BelÄ¡ju", + "BF": "il-Burkina Faso", + "BG": "il-Bulgarija", + "BH": "il-Bahrain", + "BI": "il-Burundi", + "BJ": "il-Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "il-Brunei", + "BO": "il-Bolivja", + "BQ": "in-Netherlands tal-Karibew", + "BR": "Il-Brażil", + "BS": "il-Bahamas", + "BT": "il-Bhutan", + "BW": "il-Botswana", + "BY": "il-Belarussja", + "BZ": "il-Belize", + "CA": "il-Kanada", + "CC": "Gżejjer Cocos (Keeling)", + "CD": "ir-Repubblika Demokratika tal-Kongo", + "CF": "ir-Repubblika ÄŠentru-Afrikana", + "CG": "il-Kongo - Brazzaville", + "CH": "Å»vizzera", + "CI": "il-Kosta tal-Avorju", + "CK": "Gżejjer Cook", + "CL": "iÄ‹-ÄŠili", + "CM": "il-Kamerun", + "CN": "CN", + "CO": "il-Kolombja", + "CR": "il-Costa Rica", + "CU": "Kuba", + "CV": "Cape Verde", + "CW": "Curaçao", + "CX": "il-Gżira Christmas", + "CY": "ÄŠipru", + "CZ": "ir-Repubblika ÄŠeka", + "DE": "il-Ä ermanja", + "DG": "Diego Garcia", + "DJ": "il-Djibouti", + "DK": "id-Danimarka", + "DM": "Dominica", + "DO": "ir-Repubblika Dominicana", + "DZ": "l-AlÄ¡erija", + "EA": "Ceuta u Melilla", + "EC": "l-Ekwador", + "EE": "l-Estonja", + "EG": "l-EÄ¡ittu", + "EH": "is-Saħara tal-Punent", + "ER": "l-Eritrea", + "ES": "Spanja", + "ET": "l-Etjopja", + "FI": "il-Finlandja", + "FJ": "FiÄ¡i", + "FK": "il-Gżejjer Falkland", + "FM": "Mikroneżja", + "FO": "il-Gżejjer Faeroe", + "FR": "Franza", + "GA": "il-Gabon", + "GB": "ir-Renju Unit", + "GD": "Grenada", + "GE": "il-Georgia", + "GF": "il-Guyana FranÄ‹iża", + "GG": "Guernsey", + "GH": "il-Ghana", + "GI": "Ä ibiltà", + "GL": "Greenland", + "GM": "il-Gambja", + "GN": "il-Guinea", + "GP": "Guadeloupe", + "GQ": "il-Guinea Ekwatorjali", + "GR": "il-GreÄ‹ja", + "GS": "il-Georgia tan-Nofsinhar u l-Gżejjer Sandwich tan-Nofsinhar", + "GT": "il-Gwatemala", + "GU": "Guam", + "GW": "il-Guinea-Bissau", + "GY": "il-Guyana", + "HK": "ir-ReÄ¡jun Amministrattiv SpeÄ‹jali ta’ Hong Kong tar-Repubblika tal-Poplu taÄ‹-ÄŠina", + "HN": "il-Honduras", + "HR": "il-Kroazja", + "HT": "il-Haiti", + "HU": "l-Ungerija", + "IC": "il-Gżejjer Canary", + "ID": "l-Indoneżja", + "IE": "l-Irlanda", + "IL": "Iżrael", + "IM": "Isle of Man", + "IN": "l-Indja", + "IO": "Territorju Brittaniku tal-OÄ‹ean Indjan", + "IQ": "l-Iraq", + "IR": "l-Iran", + "IS": "l-iżlanda", + "IT": "l-Italja", + "JE": "Jersey", + "JM": "il-Ä amajka", + "JO": "il-Ä ordan", + "JP": "il-Ä appun", + "KE": "il-Kenja", + "KG": "il-Kirgiżistan", + "KH": "il-Kambodja", + "KI": "Kiribati", + "KM": "Comoros", + "KN": "Saint Kitts u Nevis", + "KP": "il-Korea ta’ Fuq", + "KR": "il-Korea t’Isfel", + "KW": "il-Kuwajt", + "KY": "il-Gżejjer Cayman", + "KZ": "il-Każakistan", + "LA": "il-Laos", + "LB": "il-Libanu", + "LC": "Saint Lucia", + "LI": "il-Liechtenstein", + "LK": "is-Sri Lanka", + "LR": "il-Liberja", + "LS": "il-Lesoto", + "LT": "il-Litwanja", + "LU": "il-Lussemburgu", + "LV": "il-Latvja", + "LY": "il-Libja", + "MA": "il-Marokk", + "MC": "Monaco", + "MD": "il-Moldova", + "ME": "il-Montenegro", + "MF": "Saint Martin", + "MG": "Madagascar", + "MH": "Gżejjer Marshall", + "MK": "l-Eks-Repubblika Jugoslava tal-MaÄ‹edonia", + "ML": "il-Mali", + "MM": "il-Myanmar\/Burma", + "MN": "il-Mongolja", + "MO": "ir-ReÄ¡jun Amministrattiv SpeÄ‹jali tal-Macao tar-Repubblika tal-Poplu taÄ‹-ÄŠina", + "MP": "Ġżejjer Mariana tat-Tramuntana", + "MQ": "Martinique", + "MR": "il-Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "il-Maldivi", + "MW": "il-Malawi", + "MX": "il-Messiku", + "MY": "il-Malasja", + "MZ": "il-Mozambique", + "NA": "in-Namibja", + "NC": "New Caledonia", + "NE": "in-NiÄ¡er", + "NF": "Gżira Norfolk", + "NG": "in-NiÄ¡erja", + "NI": "in-Nikaragwa", + "NL": "in-Netherlands", + "NO": "in-NorveÄ¡ja", + "NP": "in-Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "New Zealand", + "OM": "l-Oman", + "PA": "il-Panama", + "PE": "il-Perù", + "PF": "Polineżja FranÄ‹iża", + "PG": "Papua New Guinea", + "PH": "il-Filippini", + "PK": "il-Pakistan", + "PL": "il-Polonja", + "PM": "Saint Pierre u Miquelon", + "PN": "Gżejjer Pitcairn", + "PR": "Puerto Rico", + "PS": "it-Territorji Palestinjani", + "PT": "il-Portugall", + "PW": "Palau", + "PY": "il-Paragwaj", + "QA": "il-Qatar", + "RE": "Réunion", + "RO": "ir-Rumanija", + "RS": "is-Serbja", + "RU": "ir-Russja", + "RW": "ir-Rwanda", + "SA": "l-Arabia Sawdija", + "SB": "il-Gżejjer Solomon", + "SC": "is-Seychelles", + "SD": "is-Sudan", + "SE": "l-Iżvezja", + "SG": "Singapore", + "SH": "Saint Helena", + "SI": "is-Slovenja", + "SJ": "Svalbard u Jan Mayen", + "SK": "is-Slovakkja", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "is-Senegal", + "SO": "is-Somalja", + "SR": "is-Suriname", + "SS": "is-Sudan t’Isfel", + "ST": "São Tomé u Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "is-Sirja", + "SZ": "is-Swaziland", + "TA": "Tristan da Cunha", + "TC": "il-Gżejjer Turks u Caicos", + "TD": "iÄ‹-Chad", + "TF": "It-Territorji FranÄ‹iżi tan-Nofsinhar", + "TG": "it-Togo", + "TH": "it-Tajlandja", + "TJ": "it-TaÄ¡ikistan", + "TK": "it-Tokelau", + "TL": "Timor Leste", + "TM": "it-Turkmenistan", + "TN": "it-Tuneżija", + "TO": "Tonga", + "TR": "it-Turkija", + "TT": "Trinidad u Tobago", + "TV": "Tuvalu", + "TW": "it-Tajwan", + "TZ": "it-Tanzanija", + "UA": "l-Ukrajna", + "UG": "l-Uganda", + "UM": "Il-Gżejjer Minuri Mbiegħda tal-Istati Uniti", + "US": "l-Istati Uniti", + "UY": "l-Urugwaj", + "UZ": "l-Użbekistan", + "VA": "l-Istat tal-Belt tal-Vatikan", + "VC": "Saint Vincent u l-Grenadini", + "VE": "il-Venezwela", + "VG": "il-Gżejjer VerÄ¡ni BrittaniÄ‹i", + "VI": "il-Gżejjer VerÄ¡ni tal-Istati Uniti", + "VN": "il-Vjetnam", + "VU": "Vanuatu", + "WF": "Wallis u Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "il-Jemen", + "YT": "Mayotte", + "ZA": "l-Afrika t’Isfel", + "ZM": "iż-Å»ambja", + "ZW": "iż-Å»imbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/my.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/my.json new file mode 100644 index 0000000000000000000000000000000000000000..ca1aa7110c08b939e0584692e60d13d852079a00 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/my.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.30.50", + "Names": { + "AC": "á€á€€á€ºá€á€±á€¬á€ºá€™á€°á€€á€»á€½á€”်း", + "AD": "အင်ဒိုရာ", + "AE": "ယူအေအီး", + "AF": "အာဖဂန်နစ္စá€á€”်", + "AG": "အင်á€á€®á€‚ွါနှင့် ဘာဘူဒါ", + "AI": "အန်ဂီလာ", + "AL": "အယ်လ်ဘေးနီးယား", + "AM": "အာမေးနီးယား", + "AO": "အင်ဂိုလာ", + "AQ": "အန္á€á€¬á€á€­á€€", + "AR": "အာဂျင်á€á€®á€¸á€”ား", + "AS": "အမေရိကန် ဆမိုးအား", + "AT": "ဩစá€á€¼á€®á€¸á€šá€¬á€¸", + "AU": "ဩစá€á€¼á€±á€¸á€œá€»", + "AW": "အာရူးဗား", + "AX": "အာလန်ကျွန်း", + "AZ": "အဇာဘိုင်ဂျန်", + "BA": "ဘော့စနီးယားနှင့် ဟာဇီဂိုဗီနား", + "BB": "ဘာဘေးဒိုးစ်", + "BD": "ဘင်္ဂလားဒေ့ရှ်", + "BE": "ဘယ်လ်ဂျီယမ်", + "BF": "ဘာကီးနား ဖားဆို", + "BG": "ဘူလ်ဂေးရီးယား", + "BH": "ဘာရိန်း", + "BI": "ဘူရွန်ဒီ", + "BJ": "ဘီနင်", + "BL": "စိန့်ဘာသယ်လ်မီ", + "BM": "ဘာမြူဒါ", + "BN": "ဘရူနိုင်း", + "BO": "ဘိုလီးဗီးယား", + "BQ": "ကာရစ်ဘီယံ နယ်သာလန်", + "BR": "ဘရာဇီး", + "BS": "ဘဟားမား", + "BT": "ဘူá€á€”်", + "BW": "ဘော့ဆွာနာ", + "BY": "ဘီလာရုဇ်", + "BZ": "ဘလိဇ်", + "CA": "ကနေဒါ", + "CC": "ကိုကိုးကျွန်း", + "CD": "ကွန်ဂို", + "CF": "ဗဟို အာဖရိက ပြည်ထောင်စု", + "CG": "ကွန်ဂို-ဘရာဇာဗီးလ်", + "CH": "ဆွစ်ဇာလန်", + "CI": "ကို့á€á€º ဒီဗွာ", + "CK": "ကွá€á€º ကျွန်းစု", + "CL": "á€á€»á€®á€œá€®", + "CM": "ကင်မရွန်း", + "CN": "á€á€›á€¯á€á€º", + "CO": "ကိုလံဘီယာ", + "CR": "ကို့စ်á€á€¬á€›á€®á€€á€¬", + "CU": "ကျူးဘား", + "CV": "ကိá€á€ºá€—ာဒီ", + "CW": "ကျူရေးကိုးစ်", + "CX": "á€á€›á€…်စမá€á€º ကျွန်း", + "CY": "ဆိုက်ပရပ်စ်", + "CZ": "á€á€»á€€á€º ပြည်ထောင်စု", + "DE": "ဂျာမá€á€®", + "DG": "ဒီအဲဂိုဂါစီရာ", + "DJ": "ဂျီဘူá€á€®", + "DK": "ဒိန်းမá€á€º", + "DM": "ဒိုမီနီကာ", + "DO": "ဒိုမီနီကန်", + "DZ": "အယ်လ်ဂျီးရီးယား", + "EA": "ဆယ်ဥá€á€¬á€”ှင့်မယ်လီလ်လာ", + "EC": "အီကွေဒေါ", + "EE": "အက်စá€á€­á€¯á€¸á€”ီးယား", + "EG": "အီဂျစ်", + "EH": "အနောက် ဆာဟာရ", + "ER": "အီရီထရီးယား", + "ES": "စပိန်", + "ET": "အီသီယိုးပီးယား", + "FI": "ဖင်လန်", + "FJ": "ဖီဂျီ", + "FK": "ဖော့ကလန် ကျွန်းစု", + "FM": "မိုင်á€á€›á€­á€¯á€”ီရှား", + "FO": "ဖာရိုး ကျွန်းစုများ", + "FR": "ပြင်သစ်", + "GA": "ဂါဘွန်", + "GB": "ယူနိုက်á€á€€á€ºá€€á€„်းဒမ်း", + "GD": "ဂရီနေဒါ", + "GE": "ဂျော်ဂျီယာ", + "GF": "ပြင်သစ် ဂိုင်ယာနာ", + "GG": "ဂွန်းဇီ", + "GH": "ဂါနာ", + "GI": "ဂျီဘရော်လ်á€á€¬", + "GL": "ဂရင်းလန်း", + "GM": "ဂမ်ဘီရာ", + "GN": "ဂီနီ", + "GP": "ဂွါဒီလု", + "GQ": "အီကွေá€á€¬ ဂီနီ", + "GR": "ဂရိ", + "GS": "á€á€±á€¬á€„် ဂျော်ဂျီယာ နှင့် á€á€±á€¬á€„် ဆင်းဒá€á€…်ဂျ် ကျွန်းစုများ", + "GT": "ဂွါá€á€®á€™á€¬á€œá€¬", + "GU": "ဂူအမ်", + "GW": "ဂီနီ-ဘီစော", + "GY": "ဂိုင်ယာနာ", + "HK": "ဟောင်ကောင် (á€á€›á€¯á€á€ºá€•ြည်)", + "HN": "ဟွန်ဒူးရပ်စ်", + "HR": "á€á€›á€­á€¯á€¡á€±á€¸á€›á€¾á€¬á€¸", + "HT": "ဟေá€á€®", + "HU": "ဟန်ဂေရီ", + "IC": "ကနေရီ ကျွန်းစု", + "ID": "အင်ဒိုနီးရှား", + "IE": "အိုင်ယာလန်", + "IL": "အစ္စရေး", + "IM": "မန်ကျွန်း", + "IN": "အိန္ဒိယ", + "IO": "ဗြိá€á€­á€žá€»á€¾á€•ိုင် အိန္ဒိယသမုဒ္ဒရာကျွန်းများ", + "IQ": "အီရá€á€º", + "IR": "အီရန်", + "IS": "အိုက်စလန်", + "IT": "အီá€á€œá€®", + "JE": "ဂျာစီ", + "JM": "ဂျမေကာ", + "JO": "ဂျော်ဒန်", + "JP": "ဂျပန်", + "KE": "ကင်ညာ", + "KG": "ကာဂျစ္စá€á€”်", + "KH": "ကမ္ဘောဒီးယား", + "KI": "á€á€®á€›á€®á€˜á€¬á€á€®", + "KM": "ကိုမိုရိုစ်", + "KN": "စိန့်ကစ်နှင့်နီဗီစ်", + "KP": "မြောက်ကိုရီးယား", + "KR": "á€á€±á€¬á€„်ကိုရီးယား", + "KW": "ကူá€á€­á€á€º", + "KY": "ကေမန် ကျွန်းစု", + "KZ": "ကာဇက်စá€á€”်", + "LA": "လာအို", + "LB": "လက်ဘနွန်", + "LC": "စိန့်လူစီယာ", + "LI": "လစ်á€á€”်စá€á€­á€”်း", + "LK": "သီရိလင်္ကာ", + "LR": "လိုက်ဘေးရီးယား", + "LS": "လီဆိုသို", + "LT": "လစ်သူယေးနီးယား", + "LU": "လူဇင်ဘá€á€º", + "LV": "လá€á€ºá€—ီးယား", + "LY": "လစ်ဗျား", + "MA": "မော်ရိုကို", + "MC": "မိုနာကို", + "MD": "မောလ်ဒိုဗာ", + "ME": "မွန်á€á€®á€”ိဂရိုး", + "MF": "စိန့်မာá€á€„်", + "MG": "မဒါဂá€á€ºá€…ကား", + "MH": "မာရှယ် ကျွန်းစု", + "MK": "မက်စီဒိုးနီးယား", + "ML": "မာလီ", + "MM": "မြန်မာ", + "MN": "မွန်ဂိုးလီးယား", + "MO": "မကာအို (á€á€›á€¯á€á€ºá€•ြည်)", + "MP": "á€á€±á€¬á€„်ပိုင်းမာရီအာနာကျွန်းစု", + "MQ": "မာá€á€®á€”ိá€á€º", + "MR": "မော်ရီá€á€±á€¸á€”ီးယား", + "MS": "မောင့်စဲရက်", + "MT": "မောလ်á€á€¬", + "MU": "မောရစ်ရှ", + "MV": "မော်လ်ဒိုက်", + "MW": "မာလာá€á€®", + "MX": "မက္ကဆီကို", + "MY": "မလေးရှား", + "MZ": "မိုဇမ်ဘစ်", + "NA": "နမီးဘီးယား", + "NC": "နယူး ကယ်လီဒိုနီးယား", + "NE": "နိုင်ဂျာ", + "NF": "နောဖုá€á€ºá€€á€»á€½á€”်း", + "NG": "နိုင်ဂျီးရီးယား", + "NI": "နီကာရာဂွါ", + "NL": "နယ်သာလန်", + "NO": "နော်á€á€±", + "NP": "နီပေါ", + "NR": "နော်ရူး", + "NU": "နီဥူအေ", + "NZ": "နယူးဇီလန်", + "OM": "အိုမန်", + "PA": "ပနားမား", + "PE": "ပီရူး", + "PF": "ပြင်သစ် ပေါ်လီနီးရှား", + "PG": "ပါပူအာ နယူးဂီနီ", + "PH": "ဖိလစ်ပိုင်", + "PK": "ပါကစ္စá€á€”်", + "PL": "ပိုလန်", + "PM": "စိန့်ပီအဲရ်နှင့် မီကွီလွန်", + "PN": "ပစ်á€á€ºá€€á€­á€”်းကျွန်းစု", + "PR": "ပေါ်á€á€­á€¯á€›á€®á€€á€­á€¯", + "PS": "ပါလက်စá€á€­á€¯á€„်း ပိုင်နက်", + "PT": "ပေါ်á€á€°á€‚ီ", + "PW": "ပလာအို", + "PY": "ပါရာဂွေး", + "QA": "ကာá€á€¬", + "RE": "ဟေညွန်", + "RO": "ရိုမေးနီးယား", + "RS": "ဆားဘီးယား", + "RU": "ရုရှ", + "RW": "ရá€á€”်ဒါ", + "SA": "ဆော်ဒီအာရေးဘီးယား", + "SB": "ဆော်လမွန်ကျွန်းစု", + "SC": "ဆေးရှဲ", + "SD": "ဆူဒန်", + "SE": "ဆွီဒင်", + "SG": "စင်္ကာပူ", + "SH": "စိန့်ဟယ်လယ်နာ", + "SI": "စလိုဗေးနီးယား", + "SJ": "စဗိုလ်ဘá€á€ºá€”ှင့်ဂျန်မေရန်", + "SK": "ဆလိုဗက်ကီးယား", + "SL": "ဆီယာရာ လီယွန်း", + "SM": "ဆန်မာရီနို", + "SN": "ဆီနီဂေါ", + "SO": "ဆိုမာလီယာ", + "SR": "ဆူရာနမ်", + "SS": "á€á€±á€¬á€„် ဆူဒန်", + "ST": "ဆောင်á€á€°á€™á€±á€¸á€”ှင့် ပရင်စီပီ", + "SV": "အယ်လ်ဆာဗေးဒိုး", + "SX": "စင့်မာá€á€„်", + "SY": "ဆီးရီးယား", + "SZ": "ဆွာဇီလန်", + "TA": "ထရစ္စá€á€”် ဒါ ကွန်ဟာ", + "TC": "á€á€á€ºá€…်နှင့်ကာအီကိုစ်ကျွန်းစု", + "TD": "á€á€»á€’်", + "TF": "ပြင်သစ် á€á€±á€¬á€„်ပိုင်း ပိုင်နက်များ", + "TG": "á€á€­á€¯á€‚ို", + "TH": "ထိုင်း", + "TJ": "á€á€¬á€‚ျီကစ္စá€á€”်", + "TK": "á€á€­á€¯á€€á€œá€±á€¬á€„်", + "TL": "အရှေ့á€á€®á€™á€±á€¬", + "TM": "á€á€¬á€·á€á€ºá€™á€„်နစ္စá€á€”်", + "TN": "á€á€°á€”ီးရှား", + "TO": "á€á€½á€”်ဂါ", + "TR": "á€á€°á€›á€€á€®", + "TT": "ထရီနီဒá€á€ºá€”ှင့် á€á€­á€¯á€˜á€€á€ºá€‚ို", + "TV": "á€á€°á€—ားလူ", + "TW": "ထိုင်á€á€™á€º", + "TZ": "á€á€”်ဇန်းနီးယား", + "UA": "ယူကရိန်း", + "UG": "ယူဂန်းဒါး", + "UM": "ယူနိုက်á€á€€á€ºá€…á€á€­á€á€º ကျွန်းနိုင်ငံများ", + "UN": "ကုလသမဂ္ဂ", + "US": "ယူနိုက်á€á€€á€ºá€…á€á€­á€á€º", + "UY": "ဥရုဂွေး", + "UZ": "ဉဇဘက်ကစ္စá€á€”်", + "VA": "ဗာá€á€®á€€á€”်စီá€á€®á€¸", + "VC": "စိန့်ဗင်းဆင့်နှင့် ဂရိနေဒိုင်", + "VE": "ဗင်နီဇွဲလား", + "VG": "ဗြိá€á€­á€žá€»á€¾ ဗာဂျင်း ကျွန်းစု", + "VI": "ယူအက်စ် ဗာဂျင်း ကျွန်းစု", + "VN": "ဗီယက်နမ်", + "VU": "ဗနွားá€á€°", + "WF": "á€á€±á€«á€œá€…်နှင့် ဖူကျူးနား", + "WS": "ဆမိုးအား", + "XK": "ကိုဆိုဗို", + "YE": "ယီမင်", + "YT": "မာယိုá€á€±á€¸", + "ZA": "á€á€±á€¬á€„်အာဖရိက", + "ZM": "ဇမ်ဘီယာ", + "ZW": "ဇင်ဘာဘွေ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/nb.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/nb.json new file mode 100644 index 0000000000000000000000000000000000000000..f9659eec79d62cbcdcdb2bbafce0119e3678aec9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/nb.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.30.7", + "Names": { + "AC": "Ascension", + "AD": "Andorra", + "AE": "De forente arabiske emirater", + "AF": "Afghanistan", + "AG": "Antigua og Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antarktis", + "AR": "Argentina", + "AS": "Amerikansk Samoa", + "AT": "Østerrike", + "AU": "Australia", + "AW": "Aruba", + "AX": "Ã…land", + "AZ": "Aserbajdsjan", + "BA": "Bosnia-Hercegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint-Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Karibisk Nederland", + "BR": "Brasil", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Hviterussland", + "BZ": "Belize", + "CA": "Canada", + "CC": "Kokosøyene", + "CD": "Kongo-Kinshasa", + "CF": "Den sentralafrikanske republikk", + "CG": "Kongo-Brazzaville", + "CH": "Sveits", + "CI": "Elfenbenskysten", + "CK": "Cookøyene", + "CL": "Chile", + "CM": "Kamerun", + "CN": "Kina", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Kapp Verde", + "CW": "Curaçao", + "CX": "Christmasøya", + "CY": "Kypros", + "CZ": "Den tsjekkiske republikk", + "DE": "Tyskland", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Danmark", + "DM": "Dominica", + "DO": "Den dominikanske republikk", + "DZ": "Algerie", + "EA": "Ceuta og Melilla", + "EC": "Ecuador", + "EE": "Estland", + "EG": "Egypt", + "EH": "Vest-Sahara", + "ER": "Eritrea", + "ES": "Spania", + "ET": "Etiopia", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Falklandsøyene", + "FM": "Mikronesiaføderasjonen", + "FO": "Færøyene", + "FR": "Frankrike", + "GA": "Gabon", + "GB": "Storbritannia", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Fransk Guyana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grønland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Ekvatorial-Guinea", + "GR": "Hellas", + "GS": "Sør-Georgia og Sør-Sandwichøyene", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hongkong S.A.R. Kina", + "HN": "Honduras", + "HR": "Kroatia", + "HT": "Haiti", + "HU": "Ungarn", + "IC": "Kanariøyene", + "ID": "Indonesia", + "IE": "Irland", + "IL": "Israel", + "IM": "Man", + "IN": "India", + "IO": "Det britiske territoriet i Indiahavet", + "IQ": "Irak", + "IR": "Iran", + "IS": "Island", + "IT": "Italia", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenya", + "KG": "Kirgisistan", + "KH": "Kambodsja", + "KI": "Kiribati", + "KM": "Komorene", + "KN": "Saint Kitts og Nevis", + "KP": "Nord-Korea", + "KR": "Sør-Korea", + "KW": "Kuwait", + "KY": "Caymanøyene", + "KZ": "Kasakhstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "St. Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Litauen", + "LU": "Luxemburg", + "LV": "Latvia", + "LY": "Libya", + "MA": "Marokko", + "MC": "Monaco", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "Saint-Martin", + "MG": "Madagaskar", + "MH": "Marshalløyene", + "MK": "Makedonia", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongolia", + "MO": "Macao S.A.R. Kina", + "MP": "Nord-Marianene", + "MQ": "Martinique", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldivene", + "MW": "Malawi", + "MX": "Mexico", + "MY": "Malaysia", + "MZ": "Mosambik", + "NA": "Namibia", + "NC": "Ny-Caledonia", + "NE": "Niger", + "NF": "Norfolkøya", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Nederland", + "NO": "Norge", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "New Zealand", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Fransk Polynesia", + "PG": "Papua Ny-Guinea", + "PH": "Filippinene", + "PK": "Pakistan", + "PL": "Polen", + "PM": "St. Pierre og Miquelon", + "PN": "Pitcairn", + "PR": "Puerto Rico", + "PS": "Det palestinske omrÃ¥det", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Romania", + "RS": "Serbia", + "RU": "Russland", + "RW": "Rwanda", + "SA": "Saudi-Arabia", + "SB": "Salomonøyene", + "SC": "Seychellene", + "SD": "Sudan", + "SE": "Sverige", + "SG": "Singapore", + "SH": "St. Helena", + "SI": "Slovenia", + "SJ": "Svalbard og Jan Mayen", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "SS": "Sør-Sudan", + "ST": "São Tomé og Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syria", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Turks- og Caicosøyene", + "TD": "Tsjad", + "TF": "De franske sørterritorier", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tadsjikistan", + "TK": "Tokelau", + "TL": "Øst-Timor", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Tyrkia", + "TT": "Trinidad og Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "USAs ytre øyer", + "UN": "FN", + "US": "USA", + "UY": "Uruguay", + "UZ": "Usbekistan", + "VA": "Vatikanstaten", + "VC": "St. Vincent og Grenadinene", + "VE": "Venezuela", + "VG": "De britiske jomfruøyene", + "VI": "De amerikanske jomfruøyene", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis og Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Sør-Afrika", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/nd.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/nd.json new file mode 100644 index 0000000000000000000000000000000000000000..ba86ab853d86e0fedd55ac80b6d1defbb777903a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/nd.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.65", + "Names": { + "AD": "Andora", + "AE": "United Arab Emirates", + "AF": "Afghanistan", + "AG": "Antigua le Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AR": "Ajentina", + "AS": "Samoa ye Amelika", + "AT": "Austria", + "AU": "Australia", + "AW": "Arubha", + "AZ": "Azerbaijan", + "BA": "Bhosnia le Herzegovina", + "BB": "Bhabhadosi", + "BD": "Bhangiladeshi", + "BE": "Bhelgium", + "BF": "Bhukina Faso", + "BG": "Bhulgariya", + "BH": "Bhahareni", + "BI": "Bhurundi", + "BJ": "Bhenini", + "BM": "Bhemuda", + "BN": "Brunei", + "BO": "Bholiviya", + "BR": "Brazili", + "BS": "Bhahamas", + "BT": "Bhutani", + "BW": "Botswana", + "BY": "Bhelarusi", + "BZ": "Bhelize", + "CA": "Khanada", + "CD": "Democratic Republic of the Congo", + "CF": "Central African Republic", + "CG": "Khongo", + "CH": "Switzerland", + "CI": "Ivory Coast", + "CK": "Cook Islands", + "CL": "Chile", + "CM": "Khameruni", + "CN": "China", + "CO": "Kholombiya", + "CR": "Khosta Rikha", + "CU": "Cuba", + "CV": "Cape Verde Islands", + "CY": "Cyprus", + "CZ": "Czech Republic", + "DE": "Germany", + "DJ": "Djibouti", + "DK": "Denmakhi", + "DM": "Dominikha", + "DO": "Dominican Republic", + "DZ": "Aljeriya", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Egypt", + "ER": "Eritrea", + "ES": "Spain", + "ET": "Ethiopia", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Falkland Islands", + "FM": "Micronesia", + "FR": "Furansi", + "GA": "Gabhoni", + "GB": "United Kingdom", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Gwiyana ye Furansi", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Greenland", + "GM": "Gambiya", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Equatorial Guinea", + "GR": "Greece", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HN": "Honduras", + "HR": "Croatia", + "HT": "Hayiti", + "HU": "Hungary", + "ID": "Indonesiya", + "IE": "Ireland", + "IL": "Isuraeli", + "IN": "Indiya", + "IO": "British Indian Ocean Territory", + "IQ": "Iraki", + "IR": "Iran", + "IS": "Iceland", + "IT": "Itali", + "JM": "Jamaica", + "JO": "Jodani", + "JP": "Japan", + "KE": "Khenya", + "KG": "Kyrgyzstan", + "KH": "Cambodia", + "KI": "Khiribati", + "KM": "Khomoro", + "KN": "Saint Kitts and Nevis", + "KP": "North Korea", + "KR": "South Korea", + "KW": "Khuweiti", + "KY": "Cayman Islands", + "KZ": "Kazakhstan", + "LA": "Laos", + "LB": "Lebhanoni", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Libheriya", + "LS": "Lesotho", + "LT": "Lithuania", + "LU": "Luxembourg", + "LV": "Latvia", + "LY": "Libhiya", + "MA": "Morokho", + "MC": "Monakho", + "MD": "Moldova", + "MG": "Madagaska", + "MH": "Marshall Islands", + "MK": "Macedonia", + "ML": "Mali", + "MM": "Myanmar", + "MN": "Mongolia", + "MP": "Northern Mariana Islands", + "MQ": "Martinique", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldives", + "MW": "Malawi", + "MX": "Meksikho", + "MY": "Malezhiya", + "MZ": "Mozambique", + "NA": "Namibhiya", + "NC": "New Caledonia", + "NE": "Niger", + "NF": "Norfolk Island", + "NG": "Nigeriya", + "NI": "Nicaragua", + "NL": "Netherlands", + "NO": "Noweyi", + "NP": "Nephali", + "NR": "Nauru", + "NU": "Niue", + "NZ": "New Zealand", + "OM": "Omani", + "PA": "Panama", + "PE": "Pheru", + "PF": "Pholinesiya ye Fulansi", + "PG": "Papua New Guinea", + "PH": "Philippines", + "PK": "Phakistani", + "PL": "Pholandi", + "PM": "Saint Pierre and Miquelon", + "PN": "Pitcairn", + "PR": "Puerto Rico", + "PS": "Palestinian West Bank and Gaza", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Kathari", + "RE": "Réunion", + "RO": "Romania", + "RU": "Rashiya", + "RW": "Ruwanda", + "SA": "Saudi Arabia", + "SB": "Solomon Islands", + "SC": "Seychelles", + "SD": "Sudani", + "SE": "Sweden", + "SG": "Singapore", + "SH": "Saint Helena", + "SI": "Slovenia", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegali", + "SO": "Somaliya", + "SR": "Suriname", + "ST": "São Tomé and Príncipe", + "SV": "El Salvador", + "SY": "Syria", + "SZ": "Swaziland", + "TC": "Turks and Caicos Islands", + "TD": "Chadi", + "TG": "Thogo", + "TH": "Thayilandi", + "TJ": "Tajikistan", + "TK": "Thokelawu", + "TL": "East Timor", + "TM": "Turkmenistan", + "TN": "Tunisiya", + "TO": "Thonga", + "TR": "Thekhi", + "TT": "Trinidad le Tobago", + "TV": "Thuvalu", + "TW": "Thayiwani", + "TZ": "Tanzaniya", + "UA": "Yukreini", + "UG": "Uganda", + "US": "Amelika", + "UY": "Yurugwai", + "UZ": "Uzbekistan", + "VA": "Vatican State", + "VC": "Saint Vincent and the Grenadines", + "VE": "Venezuela", + "VG": "British Virgin Islands", + "VI": "U.S. Virgin Islands", + "VN": "Vietnam", + "VU": "Vhanuatu", + "WF": "Wallis and Futuna", + "WS": "Samowa", + "YE": "Yemeni", + "YT": "Mayotte", + "ZA": "Mzansi ye Afrika", + "ZM": "Zambiya", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ne.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ne.json new file mode 100644 index 0000000000000000000000000000000000000000..aacf3d7f38921b6fcfcffa77c30f113c00dd4dc2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ne.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.20", + "Names": { + "AC": "à¤à¤¸à¥à¤•ेनà¥à¤¸à¤¨ टापà¥", + "AD": "अनà¥à¤¡à¥‹à¤°à¥à¤°à¤¾", + "AE": "संयà¥à¤•à¥à¤¤ अरब इमिराटà¥à¤¸", + "AF": "अफगानिसà¥à¤¤à¤¾à¤¨", + "AG": "à¤à¤¨à¥à¤Ÿà¤¿à¤—à¥à¤† र बारबà¥à¤¡à¤¾", + "AI": "आङà¥à¤—à¥à¤‡à¤²à¤¾", + "AL": "अलà¥à¤¬à¤¾à¤¨à¤¿à¤¯à¤¾", + "AM": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾", + "AO": "अङà¥à¤—ोला", + "AQ": "अनà¥à¤Ÿà¤¾à¤°à¤Ÿà¤¿à¤•ा", + "AR": "अरà¥à¤œà¥‡à¤¨à¥à¤Ÿà¤¿à¤¨à¤¾", + "AS": "अमेरिकी समोआ", + "AT": "अषà¥à¤Ÿà¥à¤°à¤¿à¤¯à¤¾", + "AU": "अषà¥à¤Ÿà¥à¤°à¥‡à¤²à¤¿à¤¯à¤¾", + "AW": "आरूबा", + "AX": "अलानà¥à¤¡ टापà¥à¤¹à¤°à¥", + "AZ": "अजरबैजान", + "BA": "बोसà¥à¤¨à¤¿à¤¯à¤¾ à¤à¤£à¥à¤¡ हरà¥à¤œà¤—ोभिनिया", + "BB": "बारà¥à¤¬à¤¾à¤¡à¥‹à¤¸", + "BD": "बङà¥à¤—लादेश", + "BE": "बेलà¥à¤œà¤¿à¤¯à¤®", + "BF": "बरà¥à¤•िना फासो", + "BG": "बà¥à¤²à¥à¤—ेरिया", + "BH": "बहराइन", + "BI": "बà¥à¤°à¥‚णà¥à¤¡à¥€", + "BJ": "बेनिन", + "BL": "सेनà¥à¤Ÿ बारà¥à¤¥à¤¾à¤²à¥‡à¤®à¥€", + "BM": "बरà¥à¤®à¥à¤¡à¤¾", + "BN": "बà¥à¤°à¥à¤¨à¤¾à¤‡", + "BO": "बोलिभिया", + "BQ": "कà¥à¤¯à¤¾à¤°à¤¿à¤µà¤¿à¤¯à¤¨ नेदरलà¥à¤¯à¤¾à¤£à¥à¤¡à¥à¤¸", + "BR": "बà¥à¤°à¤¾à¤œà¤¿à¤²", + "BS": "बहामास", + "BT": "भà¥à¤Ÿà¤¾à¤¨", + "BW": "बोटà¥à¤¸à¥à¤µà¤¾à¤¨à¤¾", + "BY": "बेलारूस", + "BZ": "बेलिज", + "CA": "कà¥à¤¯à¤¾à¤¨à¤¾à¤¡à¤¾", + "CC": "कोकोस (किलिंग) टापà¥à¤¹à¤°à¥", + "CD": "कोङà¥à¤—ो-किनà¥à¤¶à¤¾à¤¸à¤¾", + "CF": "केनà¥à¤¦à¥à¤°à¥€à¤¯ अफà¥à¤°à¤¿à¤•ी गणतनà¥à¤¤à¥à¤°", + "CG": "कोङà¥à¤—ो - बà¥à¤°à¤¾à¤œà¥à¤œà¤¾à¤­à¤¿à¤²à¥à¤²à¥‡", + "CH": "सà¥à¤µà¤¿à¤œà¤°à¤²à¥à¤¯à¤¾à¤£à¥à¤¡", + "CI": "आइभोरी कोसà¥à¤Ÿ", + "CK": "कà¥à¤• टापà¥à¤¹à¤°à¥", + "CL": "चिली", + "CM": "कà¥à¤¯à¤¾à¤®à¤°à¥‚न", + "CN": "चीन", + "CO": "कोलोमà¥à¤¬à¤¿à¤¯à¤¾", + "CR": "कोषà¥à¤Ÿà¤¾à¤°à¤¿à¤•ा", + "CU": "कà¥à¤¯à¥à¤¬à¤¾", + "CV": "केप भरà¥à¤¡à¥‡", + "CW": "कà¥à¤°à¤¾à¤•ाओ", + "CX": "कà¥à¤°à¤¿à¤·à¥à¤Ÿà¤®à¤¸ टापà¥", + "CY": "साइपà¥à¤°à¤¸", + "CZ": "चेक गणतनà¥à¤¤à¥à¤°", + "DE": "जरà¥à¤®à¤¨à¥€", + "DG": "डियगो गारà¥à¤¸à¤¿à¤¯à¤¾", + "DJ": "डिजिबà¥à¤Ÿà¥€", + "DK": "डेनमारà¥à¤•", + "DM": "डोमिनिका", + "DO": "डोमिनिकन गणतनà¥à¤¤à¥à¤°", + "DZ": "अलà¥à¤œà¥‡à¤°à¤¿à¤¯à¤¾", + "EA": "सिउटा र मेलिला", + "EC": "इकà¥à¤µà¤¡à¥‡à¤°", + "EE": "इसà¥à¤Ÿà¥‹à¤¨à¤¿à¤¯à¤¾", + "EG": "इजिपà¥à¤Ÿ", + "EH": "पशà¥à¤šà¤¿à¤®à¥€ साहारा", + "ER": "à¤à¤°à¤¿à¤¤à¥à¤°à¤¿à¤¯à¤¾", + "ES": "सà¥à¤ªà¥‡à¤¨", + "ET": "इथियोपिया", + "FI": "फिनà¥à¤²à¥à¤¯à¤¾à¤£à¥à¤¡", + "FJ": "फिजी", + "FK": "फकलà¥à¤¯à¤¾à¤£à¥à¤¡ टापà¥à¤¹à¤°à¥", + "FM": "माइकà¥à¤°à¥‹à¤¨à¥‡à¤¸à¤¿à¤¯à¤¾", + "FO": "फारो टापà¥à¤¹à¤°à¥‚", + "FR": "फà¥à¤°à¤¾à¤¨à¥à¤¸", + "GA": "गावोन", + "GB": "बेलायत", + "GD": "गà¥à¤°à¥‡à¤¨à¤¾à¤¡à¤¾", + "GE": "जरà¥à¤œà¤¿à¤¯à¤¾", + "GF": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ गायना", + "GG": "गà¥à¤à¤°à¥à¤¨à¤¸à¥‡", + "GH": "घाना", + "GI": "जिबà¥à¤°à¤¾à¤²à¥à¤Ÿà¤¾à¤°", + "GL": "गà¥à¤°à¤¿à¤¨à¤²à¥à¤¯à¤¾à¤£à¥à¤¡", + "GM": "गामà¥à¤µà¤¿à¤¯à¤¾", + "GN": "गिनी", + "GP": "गà¥à¤µà¤¾à¤¡à¥‡à¤²à¥à¤ª", + "GQ": "भू-मधà¥à¤¯à¥€à¤¯ गिनी", + "GR": "गà¥à¤°à¤¿à¤¸", + "GS": "दकà¥à¤·à¤¿à¤£ जरà¥à¤œà¤¿à¤¯à¤¾ र दकà¥à¤·à¤¿à¤£ सà¥à¤¯à¤¾à¤¨à¥à¤¡à¤µà¥€à¤š टापà¥à¤¹à¤°à¥‚", + "GT": "गà¥à¤µà¤¾à¤Ÿà¥‡à¤®à¤¾à¤²à¤¾", + "GU": "गà¥à¤µà¤¾à¤®", + "GW": "गिनी-बिसाउ", + "GY": "गà¥à¤¯à¤¾à¤¨à¤¾", + "HK": "हङकङ चिनिया समाजवादी सà¥à¤µà¤¾à¤¯à¤¤à¥à¤¤ कà¥à¤·à¥‡à¤¤à¥à¤°", + "HN": "हनà¥à¤¡à¥à¤°à¤¾à¤¸", + "HR": "कà¥à¤°à¥‹à¤à¤¶à¤¿à¤¯à¤¾", + "HT": "हैटी", + "HU": "हङà¥à¤—ेरी", + "IC": "कà¥à¤¯à¤¾à¤¨à¤¾à¤°à¥€ टापà¥à¤¹à¤°à¥‚", + "ID": "इनà¥à¤¡à¥‹à¤¨à¥‡à¤¶à¤¿à¤¯à¤¾", + "IE": "आयरलà¥à¤¯à¤¾à¤£à¥à¤¡", + "IL": "इजरायल", + "IM": "आइजà¥à¤²à¥‡ अफॠमà¥à¤¯à¤¾à¤¨", + "IN": "भारत", + "IO": "बेलायती हिनà¥à¤¦ महासागर कà¥à¤·à¥‡à¤¤à¥à¤°", + "IQ": "इराक", + "IR": "इरान", + "IS": "आइसà¥à¤²à¥à¤¯à¤¾à¤£à¥à¤¡", + "IT": "इटाली", + "JE": "जरà¥à¤¸à¥€", + "JM": "जमाइका", + "JO": "जोरà¥à¤¡à¤¨", + "JP": "जापान", + "KE": "केनà¥à¤¯à¤¾", + "KG": "किरà¥à¤—िसà¥à¤¥à¤¾à¤¨", + "KH": "कमà¥à¤¬à¥‹à¤¡à¤¿à¤¯à¤¾", + "KI": "किरिबाटी", + "KM": "कोमोरोस", + "KN": "सेनà¥à¤Ÿ किटà¥à¤¸ र नेभिस", + "KP": "उतà¥à¤¤à¤° कोरिया", + "KR": "दकà¥à¤·à¤¿à¤£ कोरिया", + "KW": "कà¥à¤µà¥‡à¤¤", + "KY": "केयमान टापà¥", + "KZ": "काजाकसà¥à¤¤à¤¾à¤¨", + "LA": "लाओस", + "LB": "लेबनन", + "LC": "सेनà¥à¤Ÿ लà¥à¤¸à¤¿à¤¯à¤¾", + "LI": "लिà¤à¤–टेनà¥à¤¸à¥à¤Ÿà¤¾à¤‡à¤¨", + "LK": "शà¥à¤°à¥€à¤²à¤™à¥à¤•ा", + "LR": "लाइबेरिया", + "LS": "लेसोथो", + "LT": "लिथà¥à¤…निया", + "LU": "लकà¥à¤œà¥‡à¤®à¤¬à¤°à¥à¤—", + "LV": "लाटà¥à¤­à¤¿à¤¯à¤¾", + "LY": "लिबिया", + "MA": "मोरोकà¥à¤•ो", + "MC": "मोनाको", + "MD": "मालà¥à¤¡à¥‹à¤­à¤¾", + "ME": "मोनà¥à¤Ÿà¥‡à¤¨à¥‡à¤—à¥à¤°à¥‹", + "MF": "सेनà¥à¤Ÿ मारà¥à¤Ÿà¤¿à¤¨", + "MG": "मडागासà¥à¤•र", + "MH": "मारà¥à¤¶à¤² टापà¥à¤¹à¤°à¥", + "MK": "मà¥à¤¯à¤¾à¤•ेडोनिया", + "ML": "माली", + "MM": "मà¥à¤¯à¤¾à¤¨à¥à¤®à¤¾à¤° (बरà¥à¤®à¤¾)", + "MN": "मङà¥à¤—ोलिया", + "MO": "मकावो चिनिà¤à¤¯à¤¾ सà¥à¤µà¤¶à¤¾à¤¸à¤¿à¤¤ कà¥à¤·à¥‡à¤¤à¥à¤°", + "MP": "उतà¥à¤¤à¤°à¥€ मारिआना टापà¥", + "MQ": "मारà¥à¤Ÿà¤¿à¤¨à¤¿à¤•", + "MR": "माउरिटानिया", + "MS": "मोनà¥à¤Ÿà¤¸à¥‡à¤°à¥à¤°à¤¾à¤Ÿ", + "MT": "मालà¥à¤Ÿà¤¾", + "MU": "माउरिटस", + "MV": "मालà¥à¤¦à¤¿à¤­à¥à¤¸", + "MW": "मालावी", + "MX": "मेकà¥à¤¸à¤¿à¤•ो", + "MY": "मलेसिया", + "MZ": "मोजामà¥à¤¬à¤¿à¤•", + "NA": "नामिबिया", + "NC": "नयाठकालेडोनिया", + "NE": "नाइजर", + "NF": "नोरफोलà¥à¤• टापà¥", + "NG": "नाइजेरिया", + "NI": "निकारागà¥à¤µà¤¾", + "NL": "नेदरलà¥à¤¯à¤¾à¤£à¥à¤¡à¥à¤¸", + "NO": "नरà¥à¤µà¥‡", + "NP": "नेपाल", + "NR": "नाउरू", + "NU": "नियà¥à¤‡", + "NZ": "नà¥à¤¯à¥à¤œà¤¿à¤²à¥à¤¯à¤¾à¤£à¥à¤¡", + "OM": "ओमन", + "PA": "पनामा", + "PE": "पेरू", + "PF": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ पोलिनेसिया", + "PG": "पपà¥à¤† नà¥à¤¯à¥‚ गाइनिया", + "PH": "फिलिपिनà¥à¤¸", + "PK": "पाकिसà¥à¤¤à¤¾à¤¨", + "PL": "पोलà¥à¤¯à¤¾à¤£à¥à¤¡", + "PM": "सेनà¥à¤Ÿ पिरà¥à¤°à¥‡ र मिकà¥à¤•ेलोन", + "PN": "पिटकाइरà¥à¤¨ टापà¥à¤¹à¤°à¥", + "PR": "पà¥à¤à¤°à¥à¤Ÿà¥‹ रिको", + "PS": "पà¥à¤¯à¤¾à¤²à¥‡à¤¸à¥à¤Ÿà¤¨à¥€ भू-भागहरà¥", + "PT": "पोरà¥à¤šà¥à¤—ल", + "PW": "पलाउ", + "PY": "पà¥à¤¯à¤¾à¤°à¤¾à¤—à¥à¤µà¥‡", + "QA": "कतार", + "RE": "रियà¥à¤¨à¤¿à¤¯à¤¨", + "RO": "रोमानिया", + "RS": "सरà¥à¤¬à¤¿à¤¯à¤¾", + "RU": "रूस", + "RW": "रवाणà¥à¤¡à¤¾", + "SA": "साउदी अरब", + "SB": "सोलोमोन टापà¥à¤¹à¤°à¥", + "SC": "सेचेलेस", + "SD": "सà¥à¤¡à¤¾à¤¨", + "SE": "सà¥à¤µà¤¿à¤¡à¥‡à¤¨", + "SG": "सिङà¥à¤—ापà¥à¤°", + "SH": "सेनà¥à¤Ÿ हेलेना", + "SI": "सà¥à¤²à¥‹à¤­à¥‡à¤¨à¤¿à¤¯à¤¾", + "SJ": "सभालà¥à¤¬à¤¾à¤°à¥à¤¡ र जान मायेन", + "SK": "सà¥à¤²à¥‹à¤­à¤¾à¤•िया", + "SL": "सिà¤à¤°à¥à¤°à¤¾ लिओन", + "SM": "सानॠमारिनो", + "SN": "सेनेगाल", + "SO": "सोमालिया", + "SR": "सà¥à¤°à¤¿à¤¨à¥‡à¤®", + "SS": "दकà¥à¤·à¤¿à¤£à¥€ सà¥à¤¡à¤¾à¤¨", + "ST": "साओ टोमे र पà¥à¤°à¤¿à¤¨à¥à¤¸à¤¿à¤ª", + "SV": "à¤à¤²à¥ सालà¥à¤­à¤¾à¤¡à¥‹à¤°", + "SX": "सिनà¥à¤Ÿ मारà¥à¤Ÿà¥‡à¤¨", + "SY": "सिरिया", + "SZ": "सà¥à¤µà¤¾à¤œà¤¿à¤²à¥à¤¯à¤¾à¤£à¥à¤¡", + "TA": "टà¥à¤°à¤¿à¤¸à¥à¤Ÿà¤¾à¤¨ डा कà¥à¤¨à¥à¤¹à¤¾", + "TC": "तà¥à¤°à¥à¤• र काइकोस टापà¥", + "TD": "चाड", + "TF": "फà¥à¤°à¤¾à¤¨à¥à¤¸à¥‡à¤²à¥€ दकà¥à¤·à¤¿à¤£à¥€ कà¥à¤·à¥‡à¤¤à¥à¤°à¤¹à¤°à¥", + "TG": "टोगो", + "TH": "थाइलà¥à¤¯à¤¾à¤£à¥à¤¡", + "TJ": "ताजिकिसà¥à¤¤à¤¾à¤¨", + "TK": "तोकेलाउ", + "TL": "टिमोर-लेसà¥à¤Ÿà¥‡", + "TM": "तà¥à¤°à¥à¤•मेनिसà¥à¤¤à¤¾à¤¨", + "TN": "टà¥à¤¯à¥à¤¨à¤¿à¤¸à¤¿à¤¯à¤¾", + "TO": "टोंगा", + "TR": "टरà¥à¤•ी", + "TT": "तà¥à¤°à¤¿à¤¨à¤¿à¤¡à¤¾à¤¡ à¤à¤£à¥à¤¡ टोबागो", + "TV": "तà¥à¤­à¤¾à¤²à¥", + "TW": "ताइवान", + "TZ": "तानà¥à¤œà¤¾à¤¨à¤¿à¤¯à¤¾", + "UA": "यà¥à¤•à¥à¤°à¥‡à¤¨", + "UG": "यà¥à¤—ाणà¥à¤¡à¤¾", + "UM": "संयà¥à¤•à¥à¤¤ राजà¥à¤¯à¤•ा बाहà¥à¤¯ टापà¥à¤¹à¤°à¥", + "UN": "संयà¥à¤•à¥à¤¤ राषà¥à¤Ÿà¥à¤° संघ", + "US": "संयà¥à¤•à¥à¤¤ राजà¥à¤¯", + "UY": "उरूगà¥à¤µà¥‡", + "UZ": "उजà¥à¤¬à¥‡à¤•िसà¥à¤¤à¤¾à¤¨", + "VA": "भेटिकन सिटी", + "VC": "सेनà¥à¤Ÿ भिनà¥à¤¸à¥‡à¤¨à¥à¤Ÿ र गà¥à¤°à¥‡à¤¨à¤¾à¤¡à¤¿à¤¨à¥à¤¸", + "VE": "भेनेजà¥à¤à¤²à¤¾", + "VG": "बेलायती भरà¥à¤œà¤¿à¤¨ टापà¥à¤¹à¤°à¥", + "VI": "संयà¥à¤•à¥à¤¤ राजà¥à¤¯ भरà¥à¤œà¤¿à¤¨ टापà¥à¤¹à¤°à¥", + "VN": "भिà¤à¤¤à¤¨à¤¾à¤®", + "VU": "भानà¥à¤†à¤¤à¥", + "WF": "वालिस र फà¥à¤Ÿà¥à¤¨à¤¾", + "WS": "सामोआ", + "XK": "कोसोवो", + "YE": "येमेन", + "YT": "मायोटà¥à¤Ÿ", + "ZA": "दकà¥à¤·à¤¿à¤£ अफà¥à¤°à¤¿à¤•ा", + "ZM": "जामà¥à¤¬à¤¿à¤¯à¤¾", + "ZW": "जिमà¥à¤¬à¤¾à¤¬à¥‡" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/nl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/nl.json new file mode 100644 index 0000000000000000000000000000000000000000..8d22f961f43f55b9601c08b9240b1813704b587c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/nl.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Ascension", + "AD": "Andorra", + "AE": "Verenigde Arabische Emiraten", + "AF": "Afghanistan", + "AG": "Antigua en Barbuda", + "AI": "Anguilla", + "AL": "Albanië", + "AM": "Armenië", + "AO": "Angola", + "AQ": "Antarctica", + "AR": "Argentinië", + "AS": "Amerikaans-Samoa", + "AT": "Oostenrijk", + "AU": "Australië", + "AW": "Aruba", + "AX": "Ã…land", + "AZ": "Azerbeidzjan", + "BA": "Bosnië en Herzegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "België", + "BF": "Burkina Faso", + "BG": "Bulgarije", + "BH": "Bahrein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint-Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Caribisch Nederland", + "BR": "Brazilië", + "BS": "Bahama’s", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Canada", + "CC": "Cocoseilanden", + "CD": "Congo-Kinshasa", + "CF": "Centraal-Afrikaanse Republiek", + "CG": "Congo-Brazzaville", + "CH": "Zwitserland", + "CI": "Ivoorkust", + "CK": "Cookeilanden", + "CL": "Chili", + "CM": "Kameroen", + "CN": "China", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Kaapverdië", + "CW": "Curaçao", + "CX": "Christmaseiland", + "CY": "Cyprus", + "CZ": "Tsjechië", + "DE": "Duitsland", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Denemarken", + "DM": "Dominica", + "DO": "Dominicaanse Republiek", + "DZ": "Algerije", + "EA": "Ceuta en Melilla", + "EC": "Ecuador", + "EE": "Estland", + "EG": "Egypte", + "EH": "Westelijke Sahara", + "ER": "Eritrea", + "ES": "Spanje", + "ET": "Ethiopië", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Falklandeilanden", + "FM": "Micronesia", + "FO": "Faeröer", + "FR": "Frankrijk", + "GA": "Gabon", + "GB": "Verenigd Koninkrijk", + "GD": "Grenada", + "GE": "Georgië", + "GF": "Frans-Guyana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Groenland", + "GM": "Gambia", + "GN": "Guinee", + "GP": "Guadeloupe", + "GQ": "Equatoriaal-Guinea", + "GR": "Griekenland", + "GS": "Zuid-Georgia en Zuidelijke Sandwicheilanden", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinee-Bissau", + "GY": "Guyana", + "HK": "Hongkong SAR van China", + "HN": "Honduras", + "HR": "Kroatië", + "HT": "Haïti", + "HU": "Hongarije", + "IC": "Canarische Eilanden", + "ID": "Indonesië", + "IE": "Ierland", + "IL": "Israël", + "IM": "Isle of Man", + "IN": "India", + "IO": "Britse Gebieden in de Indische Oceaan", + "IQ": "Irak", + "IR": "Iran", + "IS": "IJsland", + "IT": "Italië", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordanië", + "JP": "Japan", + "KE": "Kenia", + "KG": "Kirgizië", + "KH": "Cambodja", + "KI": "Kiribati", + "KM": "Comoren", + "KN": "Saint Kitts en Nevis", + "KP": "Noord-Korea", + "KR": "Zuid-Korea", + "KW": "Koeweit", + "KY": "Kaaimaneilanden", + "KZ": "Kazachstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Litouwen", + "LU": "Luxemburg", + "LV": "Letland", + "LY": "Libië", + "MA": "Marokko", + "MC": "Monaco", + "MD": "Moldavië", + "ME": "Montenegro", + "MF": "Saint-Martin", + "MG": "Madagaskar", + "MH": "Marshalleilanden", + "MK": "Macedonië", + "ML": "Mali", + "MM": "Myanmar (Birma)", + "MN": "Mongolië", + "MO": "Macau SAR van China", + "MP": "Noordelijke Marianen", + "MQ": "Martinique", + "MR": "Mauritanië", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldiven", + "MW": "Malawi", + "MX": "Mexico", + "MY": "Maleisië", + "MZ": "Mozambique", + "NA": "Namibië", + "NC": "Nieuw-Caledonië", + "NE": "Niger", + "NF": "Norfolk", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Nederland", + "NO": "Noorwegen", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nieuw-Zeeland", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Frans-Polynesië", + "PG": "Papoea-Nieuw-Guinea", + "PH": "Filipijnen", + "PK": "Pakistan", + "PL": "Polen", + "PM": "Saint-Pierre en Miquelon", + "PN": "Pitcairneilanden", + "PR": "Puerto Rico", + "PS": "Palestijnse gebieden", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Roemenië", + "RS": "Servië", + "RU": "Rusland", + "RW": "Rwanda", + "SA": "Saoedi-Arabië", + "SB": "Salomonseilanden", + "SC": "Seychellen", + "SD": "Soedan", + "SE": "Zweden", + "SG": "Singapore", + "SH": "Sint-Helena", + "SI": "Slovenië", + "SJ": "Spitsbergen en Jan Mayen", + "SK": "Slowakije", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalië", + "SR": "Suriname", + "SS": "Zuid-Soedan", + "ST": "Sao Tomé en Principe", + "SV": "El Salvador", + "SX": "Sint-Maarten", + "SY": "Syrië", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Turks- en Caicoseilanden", + "TD": "Tsjaad", + "TF": "Franse Gebieden in de zuidelijke Indische Oceaan", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tadzjikistan", + "TK": "Tokelau", + "TL": "Oost-Timor", + "TM": "Turkmenistan", + "TN": "Tunesië", + "TO": "Tonga", + "TR": "Turkije", + "TT": "Trinidad en Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Oekraïne", + "UG": "Oeganda", + "UM": "Kleine afgelegen eilanden van de Verenigde Staten", + "UN": "verenigde naties", + "US": "Verenigde Staten", + "UY": "Uruguay", + "UZ": "Oezbekistan", + "VA": "Vaticaanstad", + "VC": "Saint Vincent en de Grenadines", + "VE": "Venezuela", + "VG": "Britse Maagdeneilanden", + "VI": "Amerikaanse Maagdeneilanden", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis en Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Zuid-Afrika", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/nn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/nn.json new file mode 100644 index 0000000000000000000000000000000000000000..1df91ca99f5babcdaf37ebb3611d2cfeb5288c3c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/nn.json @@ -0,0 +1,257 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AC": "Ascension", + "AD": "Andorra", + "AE": "Dei sameinte arabiske emirata", + "AF": "Afghanistan", + "AG": "Antigua og Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antarktis", + "AR": "Argentina", + "AS": "Amerikansk Samoa", + "AT": "Austerrike", + "AU": "Australia", + "AW": "Aruba", + "AX": "Ã…land", + "AZ": "Aserbajdsjan", + "BA": "Bosnia og Hercegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BR": "Brasil", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Kviterussland", + "BZ": "Belize", + "CA": "Canada", + "CC": "Kokosøyane", + "CD": "Kongo-Kinshasa", + "CF": "Den sentralafrikanske republikken", + "CG": "Kongo-Brazzaville", + "CH": "Sveits", + "CI": "Elfenbeinskysten", + "CK": "Cookøyane", + "CL": "Chile", + "CM": "Kamerun", + "CN": "Kina", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Kapp Verde", + "CW": "Curaçao", + "CX": "Christmasøya", + "CY": "Kypros", + "CZ": "Tsjekkia", + "DE": "Tyskland", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Danmark", + "DM": "Dominica", + "DO": "Den dominikanske republikken", + "DZ": "Algerie", + "EA": "Ceuta og Melilla", + "EC": "Ecuador", + "EE": "Estland", + "EG": "Egypt", + "EH": "Vest-Sahara", + "ER": "Eritrea", + "ES": "Spania", + "ET": "Etiopia", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Falklandsøyane", + "FM": "Mikronesiaføderasjonen", + "FO": "Færøyane", + "FR": "Frankrike", + "GA": "Gabon", + "GB": "Storbritannia", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Fransk Guyana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grønland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Ekvatorial-Guinea", + "GR": "Hellas", + "GS": "Sør-Georgia og Sør-Sandwich-øyane", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hongkong S.A.R. Kina", + "HN": "Honduras", + "HR": "Kroatia", + "HT": "Haiti", + "HU": "Ungarn", + "IC": "Kanariøyane", + "ID": "Indonesia", + "IE": "Irland", + "IL": "Israel", + "IM": "Man", + "IN": "India", + "IO": "Britiske omrÃ¥de i Det indiske hav", + "IQ": "Irak", + "IR": "Iran", + "IS": "Island", + "IT": "Italia", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenya", + "KG": "Kirgisistan", + "KH": "Kambodsja", + "KI": "Kiribati", + "KM": "Komorane", + "KN": "St. Christopher og Nevis", + "KP": "Nord-Korea", + "KR": "Sør-Korea", + "KW": "Kuwait", + "KY": "Caymanøyane", + "KZ": "Kasakhstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "St. Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Litauen", + "LU": "Luxembourg", + "LV": "Latvia", + "LY": "Libya", + "MA": "Marokko", + "MC": "Monaco", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "Saint Martin", + "MG": "Madagaskar", + "MH": "Marshalløyane", + "MK": "Makedonia", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongolia", + "MO": "Macao S.A.R. Kina", + "MP": "Nord-Marianane", + "MQ": "Martinique", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldivane", + "MW": "Malawi", + "MX": "Mexico", + "MY": "Malaysia", + "MZ": "Mosambik", + "NA": "Namibia", + "NC": "Ny-Caledonia", + "NE": "Niger", + "NF": "Norfolkøyane", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Nederland", + "NO": "Noreg", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "New Zealand", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Fransk Polynesia", + "PG": "Papua Ny-Guinea", + "PH": "Filippinane", + "PK": "Pakistan", + "PL": "Polen", + "PM": "St. Pierre og Miquelon", + "PN": "Pitcairn", + "PR": "Puerto Rico", + "PS": "Palestinsk territorium", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Romania", + "RS": "Serbia", + "RU": "Russland", + "RW": "Rwanda", + "SA": "Saudi-Arabia", + "SB": "Salomonøyane", + "SC": "Seychellane", + "SD": "Sudan", + "SE": "Sverige", + "SG": "Singapore", + "SH": "Saint Helena", + "SI": "Slovenia", + "SJ": "Svalbard og Jan Mayen", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "SS": "Sør-Sudan", + "ST": "São Tomé og Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syria", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Turks- og Caicosøyane", + "TD": "Tsjad", + "TF": "Franske søromrÃ¥de", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tadsjikistan", + "TK": "Tokelau", + "TL": "Timor-Leste (Aust-Timor)", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Tyrkia", + "TT": "Trinidad og Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "USAs ytre småøyar", + "US": "USA", + "UY": "Uruguay", + "UZ": "Usbekistan", + "VA": "Vatikanstaten", + "VC": "St. Vincent og Grenadinane", + "VE": "Venezuela", + "VG": "Dei britiske jomfruøyane", + "VI": "Dei amerikanske jomfruøyane", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis og Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Sør-Afrika", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/no.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/no.json new file mode 100644 index 0000000000000000000000000000000000000000..f9659eec79d62cbcdcdb2bbafce0119e3678aec9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/no.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.30.7", + "Names": { + "AC": "Ascension", + "AD": "Andorra", + "AE": "De forente arabiske emirater", + "AF": "Afghanistan", + "AG": "Antigua og Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antarktis", + "AR": "Argentina", + "AS": "Amerikansk Samoa", + "AT": "Østerrike", + "AU": "Australia", + "AW": "Aruba", + "AX": "Ã…land", + "AZ": "Aserbajdsjan", + "BA": "Bosnia-Hercegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint-Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Karibisk Nederland", + "BR": "Brasil", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Hviterussland", + "BZ": "Belize", + "CA": "Canada", + "CC": "Kokosøyene", + "CD": "Kongo-Kinshasa", + "CF": "Den sentralafrikanske republikk", + "CG": "Kongo-Brazzaville", + "CH": "Sveits", + "CI": "Elfenbenskysten", + "CK": "Cookøyene", + "CL": "Chile", + "CM": "Kamerun", + "CN": "Kina", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Kapp Verde", + "CW": "Curaçao", + "CX": "Christmasøya", + "CY": "Kypros", + "CZ": "Den tsjekkiske republikk", + "DE": "Tyskland", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Danmark", + "DM": "Dominica", + "DO": "Den dominikanske republikk", + "DZ": "Algerie", + "EA": "Ceuta og Melilla", + "EC": "Ecuador", + "EE": "Estland", + "EG": "Egypt", + "EH": "Vest-Sahara", + "ER": "Eritrea", + "ES": "Spania", + "ET": "Etiopia", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Falklandsøyene", + "FM": "Mikronesiaføderasjonen", + "FO": "Færøyene", + "FR": "Frankrike", + "GA": "Gabon", + "GB": "Storbritannia", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Fransk Guyana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grønland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Ekvatorial-Guinea", + "GR": "Hellas", + "GS": "Sør-Georgia og Sør-Sandwichøyene", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hongkong S.A.R. Kina", + "HN": "Honduras", + "HR": "Kroatia", + "HT": "Haiti", + "HU": "Ungarn", + "IC": "Kanariøyene", + "ID": "Indonesia", + "IE": "Irland", + "IL": "Israel", + "IM": "Man", + "IN": "India", + "IO": "Det britiske territoriet i Indiahavet", + "IQ": "Irak", + "IR": "Iran", + "IS": "Island", + "IT": "Italia", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenya", + "KG": "Kirgisistan", + "KH": "Kambodsja", + "KI": "Kiribati", + "KM": "Komorene", + "KN": "Saint Kitts og Nevis", + "KP": "Nord-Korea", + "KR": "Sør-Korea", + "KW": "Kuwait", + "KY": "Caymanøyene", + "KZ": "Kasakhstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "St. Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Litauen", + "LU": "Luxemburg", + "LV": "Latvia", + "LY": "Libya", + "MA": "Marokko", + "MC": "Monaco", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "Saint-Martin", + "MG": "Madagaskar", + "MH": "Marshalløyene", + "MK": "Makedonia", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongolia", + "MO": "Macao S.A.R. Kina", + "MP": "Nord-Marianene", + "MQ": "Martinique", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldivene", + "MW": "Malawi", + "MX": "Mexico", + "MY": "Malaysia", + "MZ": "Mosambik", + "NA": "Namibia", + "NC": "Ny-Caledonia", + "NE": "Niger", + "NF": "Norfolkøya", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Nederland", + "NO": "Norge", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "New Zealand", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Fransk Polynesia", + "PG": "Papua Ny-Guinea", + "PH": "Filippinene", + "PK": "Pakistan", + "PL": "Polen", + "PM": "St. Pierre og Miquelon", + "PN": "Pitcairn", + "PR": "Puerto Rico", + "PS": "Det palestinske omrÃ¥det", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Romania", + "RS": "Serbia", + "RU": "Russland", + "RW": "Rwanda", + "SA": "Saudi-Arabia", + "SB": "Salomonøyene", + "SC": "Seychellene", + "SD": "Sudan", + "SE": "Sverige", + "SG": "Singapore", + "SH": "St. Helena", + "SI": "Slovenia", + "SJ": "Svalbard og Jan Mayen", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "SS": "Sør-Sudan", + "ST": "São Tomé og Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syria", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Turks- og Caicosøyene", + "TD": "Tsjad", + "TF": "De franske sørterritorier", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tadsjikistan", + "TK": "Tokelau", + "TL": "Øst-Timor", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Tyrkia", + "TT": "Trinidad og Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "USAs ytre øyer", + "UN": "FN", + "US": "USA", + "UY": "Uruguay", + "UZ": "Usbekistan", + "VA": "Vatikanstaten", + "VC": "St. Vincent og Grenadinene", + "VE": "Venezuela", + "VG": "De britiske jomfruøyene", + "VI": "De amerikanske jomfruøyene", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis og Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Sør-Afrika", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/om.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/om.json new file mode 100644 index 0000000000000000000000000000000000000000..90892d434b8baf4f1061144db52751f7fdfb92f2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/om.json @@ -0,0 +1,17 @@ +{ + "Version": "2.1.27.98", + "Names": { + "BR": "Brazil", + "CN": "China", + "DE": "Germany", + "ET": "Itoophiyaa", + "FR": "France", + "GB": "United Kingdom", + "IN": "India", + "IT": "Italy", + "JP": "Japan", + "KE": "Keeniyaa", + "RU": "Russia", + "US": "United States" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/or.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/or.json new file mode 100644 index 0000000000000000000000000000000000000000..e0caf934f65116ec20a205abe8aabbd656664592 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/or.json @@ -0,0 +1,248 @@ +{ + "Version": "2.1.27.78", + "Names": { + "AD": "ଆଣà­à¬¡à­‹à¬°à¬¾", + "AE": "ସଂଯà­à¬•à­à¬¤ ଆରବ à¬à¬®à¬¿à¬°à­‡à¬Ÿà¬¸à­", + "AF": "ଆଫାଗାନିସà­à¬¤à¬¾à¬¨à­", + "AG": "ଆଣà­à¬Ÿà¬¿à¬—à­à¬† à¬à¬¬à¬‚ ବାରବà­à¬¦à¬¾", + "AI": "ଆଙà­à¬—à­à¬‡à¬²à­à¬²à¬¾", + "AL": "ଆଲବାନିଆ", + "AM": "ଆରà­à¬®à­‡à¬¨à¬¿à¬†", + "AO": "ଆଙà­à¬—ୋଲା", + "AQ": "ଆରà­à¬£à­à¬Ÿà¬•ଟିକା", + "AR": "ଆରà­à¬œà­‡à¬£à­à¬Ÿà¬¿à¬¨à¬¾", + "AS": "ଆମେରିକାନୠସାମୋଆ", + "AT": "ଅଷà­à¬Ÿà­à¬°à¬¿à¬†", + "AU": "ଅଷà­à¬Ÿà­à¬°à­‡à¬²à¬¿à¬†", + "AW": "ଆରà­à¬¬à¬¾", + "AX": "ଆଲାଣà­à¬¡ ଆଇସଲà­à­Ÿà¬¾à¬£à­à¬¡", + "AZ": "ଆଜେରବାଇଜାନà­", + "BA": "ବୋସନିଆ à¬à¬¬à¬‚ ହରà­à¬œà¬—ୋଭିନା", + "BB": "ବାରବାଡୋସà­", + "BD": "ବାଙà­à¬—ଲାଦେଶà­", + "BE": "ବେଲଜିୟମà­", + "BF": "ବà­à¬°à­à¬•ିନୋ ଫାସୋ", + "BG": "ବà­à¬²à¬—େରିଆ", + "BH": "ବାହାରିନà­", + "BI": "ବà­à¬°à­à¬¨à­à¬¦à¬¿", + "BJ": "ବେନିନà­", + "BL": "ସେଣà­à¬Ÿ ବାରà­à¬¥à­‡à¬²à­‡à¬®à¬¿", + "BM": "ବରମà­à¬¡à¬¾", + "BN": "ବà­à¬°à­à¬¨à­‡à¬‡", + "BO": "ବୋଲଭିଆ", + "BR": "ବà­à¬°à¬¾à¬œà¬¿à¬²à­", + "BS": "ବାହାମାସà­", + "BT": "ଭà­à¬Ÿà¬¾à¬¨à­", + "BW": "ବୋଟସà­à¬¬à¬¾à¬¨à­", + "BY": "ବେଲାରà­à¬·à­", + "BZ": "ବେଲିଜà­", + "CA": "କାନାଡା", + "CC": "କୋକୋସୠଆଇସଲà­à­Ÿà¬¾à¬£à­à¬¡", + "CD": "କଙà­à¬—à­‹-କିନସାସା", + "CF": "ମଧà­à­Ÿ ଆଫà­à¬°à¬¿à¬•ୀୟ ଗଣତନà­à¬¤à­à¬°", + "CG": "କଙà­à¬—à­‹-ବà­à¬°à¬¾à¬œà¬¿à¬­à¬¿à¬²à­à¬²à­‡", + "CH": "ସà­à¬¬à¬¿à¬œà¬°à¬²à­à­Ÿà¬¾à¬£à­à¬¡", + "CI": "ଆଇବରୀ କୋଷà­à¬Ÿ", + "CK": "କà­à¬•ୠଆଇସଲà­à­Ÿà¬¾à¬£à­à¬¡", + "CL": "ଚିଲà­à¬²à­€", + "CM": "କାମେରà­à¬¨à­", + "CN": "ଚିନà­", + "CO": "କୋଲମà­à¬¬à¬¿à¬†", + "CR": "କୋଷà­à¬Ÿà¬¾ ରିକା", + "CU": "କà­à­±à¬¿à¬¬à¬¾", + "CV": "କେପୠଭରà­à¬¦à­‡", + "CX": "ଖà­à¬°à­€à¬·à­à¬Ÿà¬®à¬¾à¬¸ ଆଇଲà­à­Ÿà¬¾à¬£à­à¬¡", + "CY": "ସାଇପà­à¬°à¬¸à­", + "CZ": "ଚେକୠସାଧାରଣତନà­à¬¤à­à¬°", + "DE": "ଜରà­à¬®à¬¾à¬¨à­€", + "DJ": "ଡିବୌଟି", + "DK": "ଡେନମାରà­à¬•", + "DM": "ଡୋମିନାକା", + "DO": "ଡୋମିନକାନୠପà­à¬°à¬œà¬¾à¬¤à¬¨à­à¬¤à­à¬°", + "DZ": "ଆଲଜେରିଆ", + "EC": "ଇକà­à­±à¬¾à¬¡à­‹à¬°à­", + "EE": "à¬à¬¸à­à¬¤à­‹à¬¨à¬¿à¬†", + "EG": "ଇଜିପà­à¬Ÿ", + "EH": "ପଶà­à¬šà¬¿à¬® ସାହାରା", + "ER": "ଇରିଟà­à¬°à¬¿à­Ÿà¬¾", + "ES": "ସà­à¬ªà­‡à¬¨à­", + "ET": "ଇଥିଓପିଆ", + "FI": "ଫିନଲà­à­Ÿà¬¾à¬£à­à¬¡", + "FJ": "ଫିଜି", + "FK": "ଫଲà­à¬•ଲà­à­Ÿà¬¾à¬£à­à¬¡ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ", + "FM": "ମାଇକà­à¬°à­‹à¬¨à­‡à¬¸à¬¿à¬†", + "FO": "ଫାରୋଇ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ", + "FR": "ଫà­à¬°à¬¾à¬¨à­à¬¸", + "GA": "ଗାବୋନà­", + "GB": "ବà­à¬°à¬¿à¬Ÿà­‡à¬¨à­", + "GD": "ଗà­à¬°à­‡à¬¨à¬¾à¬¡à¬¾", + "GE": "ଜରà­à¬œà¬¿à¬†", + "GF": "ଫà­à¬°à­‡à¬žà­à¬š ଗà­à¬‡à¬¨à¬¾", + "GG": "ଗà­à¬à¬°à¬¨à­‡à¬¸à¬¿", + "GH": "ଘାନା", + "GI": "ଜିବà­à¬°à¬¾à¬²à­à¬Ÿà¬°à­", + "GL": "ଗà­à¬°à­€à¬¨à¬²à­à­Ÿà¬¾à¬£à­à¬¡", + "GM": "ଗାମà­à¬¬à¬¿à¬†", + "GN": "ଗà­à¬à¬¨à­‡à¬†", + "GP": "ଗୌଡେଲୌପେ", + "GQ": "ଇକà­à¬¬à¬¾à¬Ÿà­‡à¬°à¬¿à¬†à¬²à­ ଗà­à¬‡à¬¨à¬¿à¬†", + "GR": "ଗà­à¬°à­€à¬¸à­", + "GS": "ଦକà­à¬·à¬¿à¬£ ଜରà­à¬œà¬¿à¬† à¬à¬¬à¬‚ ଦକà­à¬·à¬¿à¬£ ସାଣà­à¬¡à­±à¬¿à¬šà­ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ", + "GT": "ଗà­à¬à¬¤à¬®à¬¾à¬²à¬¾", + "GU": "ଗà­à¬†à¬®à­", + "GW": "ଗà­à¬‡à¬¨à¬¿à¬†-ବିସାଉ", + "GY": "ଗà­à¬‡à¬¨à¬¾", + "HK": "ହଂକଂ ବିଶେଷ ପà­à¬°à¬¶à¬¾à¬¸à¬¨à¬¿à¬• କà­à¬·à­‡à¬¤à­à¬° ଚୀନà­", + "HN": "ହୋଣà­à¬¡à¬¾à¬°à­à¬¸à­", + "HR": "କà­à¬°à­‹à¬†à¬Ÿà¬¿à¬†", + "HT": "ହାଇତି", + "HU": "ହଙà­à¬—େରୀ", + "ID": "ଇଣà­à¬¡à­‹à¬¨à­‡à¬¸à¬¿à¬†", + "IE": "ଆୟରଲà­à­Ÿà¬¾à¬£à­à¬¡", + "IL": "ଇସà­à¬°à¬¾à¬à¬²à­", + "IM": "ଆଇଲୠଅଫୠମୈନà­", + "IN": "ଭାରତ", + "IO": "ବà­à¬°à¬¿à¬Ÿà¬¿à¬¶à­ ଭାରତୀୟ ସାମà­à¬¦à­à¬°à¬¿à¬• କà­à¬·à­‡à¬¤à­à¬°", + "IQ": "ଇରାକà­", + "IR": "ଇରାନà­", + "IS": "ଆଇସଲà­à­Ÿà¬¾à¬£à­à¬¡", + "IT": "ଇଟାଲୀ", + "JE": "ଜରà­à¬¸à¬¿", + "JM": "ଜାମାଇକା", + "JO": "ଜୋରà­à¬¡à¬¾à¬¨à­", + "JP": "ଜାପାନà­", + "KE": "କେନିୟା", + "KG": "କିରà­à¬—ିଜିସà­à¬¥à¬¾à¬¨", + "KH": "କାମà­à¬¬à­‹à¬¡à¬¿à¬†", + "KI": "କିରିବାଟୀ", + "KM": "କାମୋରସà­", + "KN": "ସେଣà­à¬Ÿ କିଟସୠà¬à¬£à­à¬¡ ନେଭିସà­", + "KP": "ଉତà­à¬¤à¬° କୋରିଆ", + "KR": "ଦକà­à¬·à¬¿à¬£ କୋରିଆ", + "KW": "କà­à¬à¬¤à­", + "KY": "କେମà­à­Ÿà¬¾à¬¨à­ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ", + "KZ": "କାଜାକାସà­à¬¥à¬¾à¬¨à­", + "LA": "ଲାଓସà­", + "LB": "ଲେବାନନà­", + "LC": "ସେଣà­à¬Ÿ ଲà­à¬¸à¬¿à¬†", + "LI": "ଲିଚେସà­à¬¤à¬¿à¬†à¬¨à¬¾à¬¨à­", + "LK": "ଶà­à¬°à­€à¬²à¬™à­à¬•ା", + "LR": "ଲିବେରିଆ", + "LS": "ଲେସୋଥୋ", + "LT": "ଲିଥାଆନିଆ", + "LU": "ଲକà­à¬¸à­‡à¬®à¬¬à¬°à­à¬—", + "LV": "ଲାଟଭିଆ", + "LY": "ଲିବିଆ", + "MA": "ମୋରୋକà­à¬•à­‹", + "MC": "ମୋନାକୋ", + "MD": "ମାଲଡୋଭା", + "ME": "ମଣà­à¬Ÿà­‡à¬—à­à¬°à­‹", + "MF": "ସେଣà­à¬Ÿ ମାରà­à¬Ÿà¬¿à¬¨à­", + "MG": "ମାଡାଗାସà­à¬•ରà­", + "MH": "ମାରà­à¬¶à¬²à­ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ", + "MK": "ମାସେଡୋନିଆ", + "ML": "ମାଳୀ", + "MM": "ମିୟାମାରà­", + "MN": "ମଙà­à¬—ୋଲିଆ", + "MO": "ମାକାଉ SAR ଚିନà­", + "MP": "ଉତà­à¬¤à¬° ମାରିଆନା ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ", + "MQ": "ମାରà­à¬Ÿà¬¿à¬¨à¬¿à¬•à­à­Ÿà­", + "MR": "ମାଉରିଟାନିଆ", + "MS": "ମଣà­à¬Ÿà­‡à¬¸à­‡à¬°à¬¾à¬Ÿà­", + "MT": "ମାଲà­à¬Ÿà¬¾", + "MU": "ମୌରିସସà­", + "MV": "ମାଳଦà­à¬¬à­€à¬ª", + "MW": "ମାଲୱି", + "MX": "ମେକà­à¬¸à¬¿à¬•à­‹", + "MY": "ମାଲେସିଆ", + "MZ": "ମୋଜାମà­à¬¬à¬¿à¬•à­à­Ÿà­", + "NA": "ନାମà­à¬¬à¬¿à¬†", + "NC": "ନୂତନ କାଲେଡୋନିଆ", + "NE": "ନାଇଜରà­", + "NF": "ନରଫà­à¬²à¬•ୠଦà­à¬¬à­€à¬ª", + "NG": "ନାଇଜେରିଆ", + "NI": "ନିକାରାଗà­à¬†", + "NL": "ନେଦରଲà­à­Ÿà¬¾à¬£à­à¬¡", + "NO": "ନରୱେ", + "NP": "ନେପାଳ", + "NR": "ନାଉରà­", + "NU": "ନିଉ", + "NZ": "ନà­à­Ÿà­à¬œà¬¿à¬²à¬¾à¬£à­à¬¡", + "OM": "ଓମାନà­", + "PA": "ପାନାମା", + "PE": "ପେରà­", + "PF": "ଫà­à¬°à­‡à¬žà­à¬š ପଲିନେସିଆ", + "PG": "ପପà­à¬† ନà­à­Ÿà­ ଗà­à¬à¬¨à¬¿à¬†", + "PH": "ଫିଲିପାଇନସà­", + "PK": "ପାକିସà­à¬¤à¬¾à¬¨", + "PL": "ପୋଲାଣà­à¬¡", + "PM": "ସେଣà­à¬Ÿ ପିà¬à¬°à­‡ à¬à¬¬à¬‚ ମିକà­à¬¬à¬¾à¬²à­‹à¬¨à­", + "PN": "ପିଟକାଇରିନà­", + "PR": "ପà­à¬à¬°à­à¬¤à­à¬¤à­‹ ରିକୋ", + "PS": "ପାଲେସà­à¬¤à­‡à¬¨à¬¿à¬†", + "PT": "ପରà­à¬¤à­à¬¤à­à¬—ାଲà­", + "PW": "ପାଲାଉ", + "PY": "ପାରାଗà­à¬", + "QA": "କତାରà­", + "RE": "ରିୟà­à¬¨à¬¿à¬…ନà­", + "RO": "ରୋମାନିଆ", + "RS": "ସରà­à¬¬à¬¿à¬†", + "RU": "ରà­à¬·à¬¿à¬†", + "RW": "ରାୱାଣà­à¬¡à¬¾", + "SA": "ସାଉଦି ଆରବିଆ", + "SB": "ସୋଲୋମନୠଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ", + "SC": "ସେଚେଲସà­", + "SD": "ସà­à¬¦à¬¾à¬¨à­", + "SE": "ସà­à­±à­‡à¬¡à­‡à¬¨à­", + "SG": "ସିଙà­à¬—ାପà­à¬°à­", + "SH": "ସେଣà­à¬Ÿ ହେଲେନା", + "SI": "ସà­à¬²à­‹à¬­à­‡à¬¨à¬¿à¬†", + "SJ": "ସାଲà­à¬­à¬¾à¬°à­à¬¡ à¬à¬¬à¬‚ ଜାନୠମାୟୋନà­", + "SK": "ସà­à¬²à­‹à¬­à¬¾à¬•ିଆ", + "SL": "ସିଓରା ଲିଓନà­", + "SM": "ସାନୠମାରିନୋ", + "SN": "ସେନେଗାଲà­", + "SO": "ସୋମାଲିଆ", + "SR": "ସà­à¬°à¬¿à¬¨à¬¾à¬®", + "ST": "ସାଓ ଟୋମେ à¬à¬¬à¬‚ ପà­à¬°à¬¿à¬¨à¬¸à¬¿à¬ªà¬¿", + "SV": "à¬à¬²à­ ସାଲଭାଡୋରà­", + "SY": "ସିରିଆ", + "SZ": "ସà­à¬¬à¬¾à¬œà¬¿à¬²à¬¾à¬£à­à¬¡", + "TC": "ତà­à¬°à­à¬•ସୠà¬à¬¬à¬‚ ସାଇକସୠଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ", + "TD": "ଚାଦà­", + "TF": "ଫରାସୀ ଦକà­à¬·à¬¿à¬£ କà­à¬·à­‡à¬¤à­à¬°", + "TG": "ଟୋଗୋ", + "TH": "ଥାଇଲାଣà­à¬¡", + "TJ": "ତାଜିକିସà­à¬¥à¬¾à¬¨à­", + "TK": "ଟୋକେଲାଉ", + "TL": "ପà­à¬°à­à¬¬ ତିମୋରà­", + "TM": "ତà­à¬°à­à¬•ମେନିସà­à¬¤à¬¾à¬¨à­", + "TN": "ତà­à¬¨à¬¿à¬¸à¬¿à¬†", + "TO": "ଟୋଙà­à¬—ା", + "TR": "ତà­à¬°à­à¬•à­€", + "TT": "ତà­à¬°à¬¿à¬¨à¬¿à¬¦à¬¾à¬¦à­ à¬à¬¬à¬‚ ଟୋବାଗୋ", + "TV": "ଟà­à¬­à¬¾à¬²à­", + "TW": "ତାଇୱାନà­", + "TZ": "ତାଞà­à¬œà¬¾à¬¨à¬¿à¬†", + "UA": "à­Ÿà­à¬•à­à¬°à¬¾à¬‡à¬¨à­", + "UG": "ଉଗାଣà­à¬¡à¬¾", + "UM": "à­Ÿà­à¬¨à¬¾à¬‡à¬Ÿà­‡à¬¡à­ ଷà­à¬Ÿà­‡à¬Ÿà¬¸à­ ମାଇନରୠଆଉଟଲେଇଂ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ", + "US": "ଯà­à¬•à­à¬¤ ରାଷà­à¬Ÿà­à¬° ଆମେରିକା", + "UY": "ଉରà­à¬—à­à¬", + "UZ": "ଉଜବେକିସà­à¬¥à¬¾à¬¨à­", + "VA": "ଭାଟିକାନà­", + "VC": "ସେଣà­à¬Ÿ ଭିନସେଣà­à¬Ÿ à¬à¬¬à¬‚ ଦି ଗà­à¬°à­‡à¬¨à¬¾à¬¡à¬¿à¬¸à­", + "VE": "ଭେନଜà­à¬à¬²à¬¾", + "VG": "ବà­à¬°à¬¿à¬Ÿà¬¿à¬¶à­ ଭରà­à¬œà¬¿à¬¨à­ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ", + "VI": "à­Ÿà­à¬à¬¸à­ ଭରà­à¬œà¬¿à¬¨à­ ଦà­à¬¬à­€à¬ªà¬ªà­à¬žà­à¬œ", + "VN": "ଭିà¬à¬¤à¬¨à¬¾à¬®à­", + "VU": "ଭାନà­à¬†à¬¤à­", + "WF": "ୱାଲିସୠà¬à¬¬à¬‚ ଫà­à¬¤à­à¬¨à¬¾", + "WS": "ସାମୋଆ", + "YE": "ୟେମେନà­", + "YT": "ମାୟୋଟେ", + "ZA": "ଦକà­à¬·à¬¿à¬£ ଆଫà­à¬°à¬¿à¬•ା", + "ZM": "ଜାମà­à¬¬à¬¿à¬†", + "ZW": "ଜିମà­à¬¬à¬¾à­±à­‡" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/os.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/os.json new file mode 100644 index 0000000000000000000000000000000000000000..c0166cde5571a42c738306b5c0604baf816767f1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/os.json @@ -0,0 +1,16 @@ +{ + "Version": "2.1.27.40", + "Names": { + "BR": "Бразили", + "CN": "Китай", + "DE": "Герман", + "FR": "Франц", + "GB": "Стыр Британи", + "GE": "ГуырдзыÑтон", + "IN": "Инди", + "IT": "Итали", + "JP": "Япон", + "RU": "УӕрӕÑе", + "US": "ÐИШ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pa.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pa.json new file mode 100644 index 0000000000000000000000000000000000000000..de3bb0247073da8adc1f8df8aa8b7d2ae3b271d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pa.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "ਅਸੈਂਸ਼ਨ ਟਾਪੂ", + "AD": "ਅੰਡੋਰਾ", + "AE": "ਸੰਯà©à¨•ਤ ਅਰਬ ਅਮੀਰਾਤ", + "AF": "ਅਫ਼ਗਾਨਿਸਤਾਨ", + "AG": "à¨à¨‚ਟੀਗà©à¨† ਅਤੇ ਬਾਰਬà©à¨¡à¨¾", + "AI": "ਅੰਗà©à¨‡à¨²à¨¾", + "AL": "ਅਲਬਾਨੀਆ", + "AM": "ਅਰਮੀਨੀਆ", + "AO": "ਅੰਗੋਲਾ", + "AQ": "ਅੰਟਾਰਕਟਿਕਾ", + "AR": "ਅਰਜਨਟੀਨਾ", + "AS": "ਅਮੈਰੀਕਨ ਸਮੋਆ", + "AT": "ਆਸਟਰੀਆ", + "AU": "ਆਸਟà©à¨°à©‡à¨²à©€à¨†", + "AW": "ਅਰੂਬਾ", + "AX": "ਅਲੈਂਡ ਟਾਪੂ", + "AZ": "ਅਜ਼ਰਬਾਈਜਾਨ", + "BA": "ਬੋਸਨੀਆ ਅਤੇ ਹਰਜ਼ੇਗੋਵੀਨਾ", + "BB": "ਬਾਰਬਾਡੋਸ", + "BD": "ਬੰਗਲਾਦੇਸ਼", + "BE": "ਬੈਲਜੀਅਮ", + "BF": "ਬà©à¨°à¨•ੀਨਾ ਫ਼ਾਸੋ", + "BG": "ਬà©à¨²à¨—ਾਰੀਆ", + "BH": "ਬਹਿਰੀਨ", + "BI": "ਬà©à¨°à©à©°à¨¡à©€", + "BJ": "ਬੇਨਿਨ", + "BL": "ਸੇਂਟ ਬਾਰਥੇਲੇਮੀ", + "BM": "ਬਰਮੂਡਾ", + "BN": "ਬਰੂਨੇਈ", + "BO": "ਬੋਲੀਵੀਆ", + "BQ": "ਕੈਰੇਬੀਆਈ ਨੀਦਰਲੈਂਡ", + "BR": "ਬà©à¨°à¨¾à¨œà¨¼à©€à¨²", + "BS": "ਬਹਾਮਾਸ", + "BT": "ਭੂਟਾਨ", + "BW": "ਬੋਤਸਵਾਨਾ", + "BY": "ਬੇਲਾਰੂਸ", + "BZ": "ਬੇਲੀਜ਼", + "CA": "ਕੈਨੇਡਾ", + "CC": "ਕੋਕੋਸ (ਕੀਲਿੰਗ) ਟਾਪੂ", + "CD": "ਕਾਂਗੋ - ਕਿੰਸ਼ਾਸਾ", + "CF": "ਕੇਂਦਰੀ ਅਫ਼ਰੀਕੀ ਗਣਰਾਜ", + "CG": "ਕਾਂਗੋ - ਬà©à¨°à¨¾à¨œà¨¼à¨¾à¨µà¨¿à¨²à©‡", + "CH": "ਸਵਿਟਜ਼ਰਲੈਂਡ", + "CI": "ਕੋਟ ਡੀਵੋਆਰ", + "CK": "ਕà©à©±à¨• ਟਾਪੂ", + "CL": "ਚਿਲੀ", + "CM": "ਕੈਮਰੂਨ", + "CN": "ਚੀਨ", + "CO": "ਕੋਲੰਬੀਆ", + "CR": "ਕੋਸਟਾ ਰੀਕਾ", + "CU": "ਕਿਊਬਾ", + "CV": "ਕੇਪ ਵਰਡੇ", + "CW": "ਕà©à¨°à¨¾à¨•ਾਓ", + "CX": "ਕà©à¨°à¨¿à¨¸à¨®à¨¿à¨¸ ਟਾਪੂ", + "CY": "ਸਾਇਪà©à¨°à¨¸", + "CZ": "ਚੈੱਕ ਗਣਰਾਜ", + "DE": "ਜਰਮਨੀ", + "DG": "ਡੀਇਗੋ ਗਾਰਸੀਆ", + "DJ": "ਜ਼ੀਬੂਤੀ", + "DK": "ਡੈਨਮਾਰਕ", + "DM": "ਡੋਮੀਨਿਕਾ", + "DO": "ਡੋਮੀਨਿਕਾਈ ਗਣਰਾਜ", + "DZ": "ਅਲਜੀਰੀਆ", + "EA": "ਸਿਓਟਾ ਅਤੇ ਮੇਲਿੱਲਾ", + "EC": "ਇਕਵੇਡੋਰ", + "EE": "ਇਸਟੋਨੀਆ", + "EG": "ਮਿਸਰ", + "EH": "ਪੱਛਮੀ ਸਹਾਰਾ", + "ER": "ਇਰੀਟà©à¨°à¨¿à¨†", + "ES": "ਸਪੇਨ", + "ET": "ਇਥੋਪੀਆ", + "FI": "ਫਿਨਲੈਂਡ", + "FJ": "ਫ਼ਿਜੀ", + "FK": "ਫ਼ਾਕਲੈਂਡ ਟਾਪੂ", + "FM": "ਮਾਇਕà©à¨°à©‹à¨¨à©‡à¨¸à¨¼à©€à¨†", + "FO": "ਫੈਰੋ ਟਾਪੂ", + "FR": "ਫ਼ਰਾਂਸ", + "GA": "ਗਬੋਨ", + "GB": "ਯੂਨਾਈਟਡ ਕਿੰਗਡਮ", + "GD": "ਗà©à¨°à©‡à¨¨à¨¾à¨¡à¨¾", + "GE": "ਜਾਰਜੀਆ", + "GF": "ਫਰੈਂਚ ਗà©à¨‡à¨†à¨¨à¨¾", + "GG": "ਗਰਨਜੀ", + "GH": "ਘਾਨਾ", + "GI": "ਜਿਬਰਾਲਟਰ", + "GL": "ਗà©à¨°à©€à¨¨à¨²à©ˆà¨‚ਡ", + "GM": "ਗੈਂਬੀਆ", + "GN": "ਗਿਨੀ", + "GP": "ਗà©à¨†à¨¡à©‡à¨²à©‹à¨ª", + "GQ": "ਭੂ-ਖੰਡੀ ਗਿਨੀ", + "GR": "ਗà©à¨°à©€à¨¸", + "GS": "ਦੱਖਣੀ ਜਾਰਜੀਆ ਅਤੇ ਦੱਖਣੀ ਸੈਂਡਵਿਚ ਟਾਪੂ", + "GT": "ਗà©à¨†à¨Ÿà©‡à¨®à¨¾à¨²à¨¾", + "GU": "ਗà©à¨†à¨®", + "GW": "ਗਿਨੀ-ਬਿਸਾਉ", + "GY": "ਗà©à¨¯à¨¾à¨¨à¨¾", + "HK": "ਹਾਂਗ ਕਾਂਗ à¨à¨¸à¨à¨†à¨° ਚੀਨ", + "HN": "ਹੋਂਡà©à¨°à¨¸", + "HR": "ਕਰੋà¨à¨¸à¨¼à©€à¨†", + "HT": "ਹੈਤੀ", + "HU": "ਹੰਗਰੀ", + "IC": "ਕੇਨਾਰੀ ਟਾਪੂ", + "ID": "ਇੰਡੋਨੇਸ਼ੀਆ", + "IE": "ਆਇਰਲੈਂਡ", + "IL": "ਇਜ਼ਰਾਈਲ", + "IM": "ਆਇਲ ਆਫ ਮੈਨ", + "IN": "ਭਾਰਤ", + "IO": "ਬਰਤਾਨਵੀ ਹਿੰਦ ਮਹਾਂਸਾਗਰ ਖਿੱਤਾ", + "IQ": "ਇਰਾਕ", + "IR": "ਈਰਾਨ", + "IS": "ਆਈਸਲੈਂਡ", + "IT": "ਇਟਲੀ", + "JE": "ਜਰਸੀ", + "JM": "ਜਮਾਇਕਾ", + "JO": "ਜਾਰਡਨ", + "JP": "ਜਪਾਨ", + "KE": "ਕੀਨੀਆ", + "KG": "ਕਿਰਗਿਜ਼ਸਤਾਨ", + "KH": "ਕੰਬੋਡੀਆ", + "KI": "ਕਿਰਬਾਤੀ", + "KM": "ਕੋਮੋਰੋਸ", + "KN": "ਸੇਂਟ ਕਿਟਸ à¨à¨‚ਡ ਨੇਵਿਸ", + "KP": "ਉੱਤਰ ਕੋਰੀਆ", + "KR": "ਦੱਖਣ ਕੋਰੀਆ", + "KW": "ਕà©à¨µà©ˆà¨¤", + "KY": "ਕੇਮੈਨ ਟਾਪੂ", + "KZ": "ਕਜ਼ਾਖਸਤਾਨ", + "LA": "ਲਾਓਸ", + "LB": "ਲੈਬਨਾਨ", + "LC": "ਸੇਂਟ ਲੂਸੀਆ", + "LI": "ਲਿਚੇਂਸਟਾਇਨ", + "LK": "ਸà©à¨°à©€ ਲੰਕਾ", + "LR": "ਲਾਈਬੀਰੀਆ", + "LS": "ਲੇਸੋਥੋ", + "LT": "ਲਿਥà©à¨†à¨¨à©€à¨†", + "LU": "ਲਕਜ਼ਮਬਰਗ", + "LV": "ਲਾਤਵੀਆ", + "LY": "ਲੀਬੀਆ", + "MA": "ਮੋਰੱਕੋ", + "MC": "ਮੋਨਾਕੋ", + "MD": "ਮੋਲਡੋਵਾ", + "ME": "ਮੋਂਟੇਨੇਗਰੋ", + "MF": "ਸੇਂਟ ਮਾਰਟਿਨ", + "MG": "ਮੈਡਾਗਾਸਕਰ", + "MH": "ਮਾਰਸ਼ਲ ਟਾਪੂ", + "MK": "ਮੈਕਡੋਨੀਆ", + "ML": "ਮਾਲੀ", + "MM": "ਮਿਆਂਮਾਰ (ਬਰਮਾ)", + "MN": "ਮੰਗੋਲੀਆ", + "MO": "ਮਕਾਉ à¨à¨¸à¨à¨†à¨° ਚੀਨ", + "MP": "ਉੱਤਰੀ ਮਾਰੀਆਨਾ ਟਾਪੂ", + "MQ": "ਮਾਰਟੀਨਿਕ", + "MR": "ਮੋਰਿਟਾਨੀਆ", + "MS": "ਮੋਂਟਸੇਰਾਤ", + "MT": "ਮਾਲਟਾ", + "MU": "ਮੌਰਿਸ਼ਸ", + "MV": "ਮਾਲਦੀਵ", + "MW": "ਮਲਾਵੀ", + "MX": "ਮੈਕਸੀਕੋ", + "MY": "ਮਲੇਸ਼ੀਆ", + "MZ": "ਮੋਜ਼ਾਮਬੀਕ", + "NA": "ਨਾਮੀਬੀਆ", + "NC": "ਨਿਊ ਕੈਲੇਡੋਨੀਆ", + "NE": "ਨਾਈਜਰ", + "NF": "ਨੋਰਫੌਕ ਟਾਪੂ", + "NG": "ਨਾਈਜੀਰੀਆ", + "NI": "ਨਿਕਾਰਾਗà©à¨†", + "NL": "ਨੀਦਰਲੈਂਡ", + "NO": "ਨਾਰਵੇ", + "NP": "ਨੇਪਾਲ", + "NR": "ਨਾਉਰੂ", + "NU": "ਨਿਯੂ", + "NZ": "ਨਿਊਜ਼ੀਲੈਂਡ", + "OM": "ਓਮਾਨ", + "PA": "ਪਨਾਮਾ", + "PE": "ਪੇਰੂ", + "PF": "ਫਰੈਂਚ ਪੋਲੀਨੇਸ਼ੀਆ", + "PG": "ਪਾਪੂਆ ਨਿਊ ਗਿਨੀ", + "PH": "ਫਿਲੀਪੀਨਜ", + "PK": "ਪਾਕਿਸਤਾਨ", + "PL": "ਪੋਲੈਂਡ", + "PM": "ਸੇਂਟ ਪੀਅਰੇ à¨à¨‚ਡ ਮਿਕੇਲਨ", + "PN": "ਪਿਟਕੇਰਨ ਟਾਪੂ", + "PR": "ਪਿਊਰਟੋ ਰਿਕੋ", + "PS": "ਫਿਲੀਸਤੀਨੀ ਇਲਾਕਾ", + "PT": "ਪà©à¨°à¨¤à¨—ਾਲ", + "PW": "ਪਲਾਉ", + "PY": "ਪੈਰਾਗਵੇ", + "QA": "ਕਤਰ", + "RE": "ਰਿਯੂਨੀਅਨ", + "RO": "ਰੋਮਾਨੀਆ", + "RS": "ਸਰਬੀਆ", + "RU": "ਰੂਸ", + "RW": "ਰਵਾਂਡਾ", + "SA": "ਸਾਊਦੀ ਅਰਬ", + "SB": "ਸੋਲੋਮਨ ਟਾਪੂ", + "SC": "ਸੇਸ਼ਲਸ", + "SD": "ਸੂਡਾਨ", + "SE": "ਸਵੀਡਨ", + "SG": "ਸਿੰਗਾਪà©à¨°", + "SH": "ਸੇਂਟ ਹੇਲੇਨਾ", + "SI": "ਸਲੋਵੇਨੀਆ", + "SJ": "ਸਵਾਲਬਰਡ ਅਤੇ ਜਾਨ ਮਾਯੇਨ", + "SK": "ਸਲੋਵਾਕੀਆ", + "SL": "ਸਿà¨à¨°à¨¾ ਲਿਓਨ", + "SM": "ਸੈਨ ਮਰੀਨੋ", + "SN": "ਸੇਨੇਗਲ", + "SO": "ਸੋਮਾਲੀਆ", + "SR": "ਸੂਰੀਨਾਮ", + "SS": "ਦੱਖਣ ਸà©à¨¡à¨¾à¨¨", + "ST": "ਸਾਓ ਟੋਮ ਅਤੇ ਪà©à¨°à¨¿à©°à¨¸à©€à¨ªà©‡", + "SV": "ਅਲ ਸਲਵਾਡੋਰ", + "SX": "ਸਿੰਟ ਮਾਰਟੀਨ", + "SY": "ਸੀਰੀਆ", + "SZ": "ਸਵਾਜ਼ੀਲੈਂਡ", + "TA": "ਟà©à¨°à¨¿à¨¸à¨Ÿà¨¾à¨¨ ਦਾ ਕà©à©°à¨¹à¨¾", + "TC": "ਟà©à¨°à¨•ਸ ਅਤੇ ਕੈਕੋਸ ਟਾਪੂ", + "TD": "ਚਾਡ", + "TF": "ਫਰੈਂਚ ਦੱਖਣੀ ਪà©à¨°à¨¦à©‡à¨¸à¨¼", + "TG": "ਟੋਗੋ", + "TH": "ਥਾਈਲੈਂਡ", + "TJ": "ਤਾਜਿਕਿਸਤਾਨ", + "TK": "ਟੋਕੇਲਾਉ", + "TL": "ਤਿਮੋਰ-ਲੇਸਤੇ", + "TM": "ਤà©à¨°à¨•ਮੇਨਿਸਤਾਨ", + "TN": "ਟਿਊਨੀਸ਼ੀਆ", + "TO": "ਟੌਂਗਾ", + "TR": "ਤà©à¨°à¨•à©€", + "TT": "ਟà©à¨°à¨¿à¨¨à©€à¨¡à¨¾à¨¡ ਅਤੇ ਟੋਬਾਗੋ", + "TV": "ਟà©à¨µà¨¾à¨²à©‚", + "TW": "ਤਾਇਵਾਨ", + "TZ": "ਤਨਜ਼ਾਨੀਆ", + "UA": "ਯੂਕਰੇਨ", + "UG": "ਯੂਗਾਂਡਾ", + "UM": "ਯੂ.à¨à©±à¨¸. ਦੂਰ-ਦà©à¨°à¨¾à¨¡à©‡ ਟਾਪੂ", + "UN": "ਸੰਯà©à¨•ਤ ਰਾਸ਼ਟਰ", + "US": "ਸੰਯà©à¨•ਤ ਰਾਜ", + "UY": "ਉਰੂਗਵੇ", + "UZ": "ਉਜ਼ਬੇਕਿਸਤਾਨ", + "VA": "ਵੈਟੀਕਨ ਸਿਟੀ", + "VC": "ਸੇਂਟ ਵਿਨਸੈਂਟ à¨à¨‚ਡ ਗà©à¨°à©‡à¨¨à¨¾à¨¡à©€à¨¨à¨¸", + "VE": "ਵੇਨੇਜ਼ੂà¨à¨²à¨¾", + "VG": "ਬà©à¨°à¨¿à¨Ÿà¨¿à¨¸à¨¼ ਵਰਜਿਨ ਟਾਪੂ", + "VI": "ਯੂ à¨à©±à¨¸ ਵਰਜਿਨ ਟਾਪੂ", + "VN": "ਵੀਅਤਨਾਮ", + "VU": "ਵਾਨੂਆਟੂ", + "WF": "ਵਾਲਿਸ ਅਤੇ ਫੂਟੂਨਾ", + "WS": "ਸਾਮੋਆ", + "XK": "ਕੋਸੋਵੋ", + "YE": "ਯਮਨ", + "YT": "ਮਾਯੋਟੀ", + "ZA": "ਦੱਖਣ ਅਫਰੀਕਾ", + "ZM": "ਜ਼ਾਮਬੀਆ", + "ZW": "ਜ਼ਿੰਬਾਬਵੇ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pa_Arab.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pa_Arab.json new file mode 100644 index 0000000000000000000000000000000000000000..ab65e07277c9231767df673723a217f8ae4e15c3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pa_Arab.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "PK": "پاکستان" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pl.json new file mode 100644 index 0000000000000000000000000000000000000000..97bef7e83c5dd7fef9d2573e192cd72fa29040c1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pl.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Wyspa WniebowstÄ…pienia", + "AD": "Andora", + "AE": "Zjednoczone Emiraty Arabskie", + "AF": "Afganistan", + "AG": "Antigua i Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antarktyka", + "AR": "Argentyna", + "AS": "Samoa AmerykaÅ„skie", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Wyspy Alandzkie", + "AZ": "Azerbejdżan", + "BA": "BoÅ›nia i Hercegowina", + "BB": "Barbados", + "BD": "Bangladesz", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "BuÅ‚garia", + "BH": "Bahrajn", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint-Barthélemy", + "BM": "Bermudy", + "BN": "Brunei", + "BO": "Boliwia", + "BQ": "Niderlandy Karaibskie", + "BR": "Brazylia", + "BS": "Bahamy", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "BiaÅ‚oruÅ›", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Wyspy Kokosowe", + "CD": "Demokratyczna Republika Konga", + "CF": "Republika ÅšrodkowoafrykaÅ„ska", + "CG": "Kongo", + "CH": "Szwajcaria", + "CI": "Côte d’Ivoire", + "CK": "Wyspy Cooka", + "CL": "Chile", + "CM": "Kamerun", + "CN": "Chiny", + "CO": "Kolumbia", + "CR": "Kostaryka", + "CU": "Kuba", + "CV": "Republika Zielonego PrzylÄ…dka", + "CW": "Curaçao", + "CX": "Wyspa Bożego Narodzenia", + "CY": "Cypr", + "CZ": "Czechy", + "DE": "Niemcy", + "DG": "Diego Garcia", + "DJ": "Dżibuti", + "DK": "Dania", + "DM": "Dominika", + "DO": "Dominikana", + "DZ": "Algieria", + "EA": "Ceuta i Melilla", + "EC": "Ekwador", + "EE": "Estonia", + "EG": "Egipt", + "EH": "Sahara Zachodnia", + "ER": "Erytrea", + "ES": "Hiszpania", + "ET": "Etiopia", + "FI": "Finlandia", + "FJ": "Fidżi", + "FK": "Falklandy", + "FM": "Mikronezja", + "FO": "Wyspy Owcze", + "FR": "Francja", + "GA": "Gabon", + "GB": "Wielka Brytania", + "GD": "Grenada", + "GE": "Gruzja", + "GF": "Gujana Francuska", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grenlandia", + "GM": "Gambia", + "GN": "Gwinea", + "GP": "Gwadelupa", + "GQ": "Gwinea Równikowa", + "GR": "Grecja", + "GS": "Georgia PoÅ‚udniowa i Sandwich PoÅ‚udniowy", + "GT": "Gwatemala", + "GU": "Guam", + "GW": "Gwinea Bissau", + "GY": "Gujana", + "HK": "SRA Hongkong (Chiny)", + "HN": "Honduras", + "HR": "Chorwacja", + "HT": "Haiti", + "HU": "WÄ™gry", + "IC": "Wyspy Kanaryjskie", + "ID": "Indonezja", + "IE": "Irlandia", + "IL": "Izrael", + "IM": "Wyspa Man", + "IN": "Indie", + "IO": "Brytyjskie Terytorium Oceanu Indyjskiego", + "IQ": "Irak", + "IR": "Iran", + "IS": "Islandia", + "IT": "WÅ‚ochy", + "JE": "Jersey", + "JM": "Jamajka", + "JO": "Jordania", + "JP": "Japonia", + "KE": "Kenia", + "KG": "Kirgistan", + "KH": "Kambodża", + "KI": "Kiribati", + "KM": "Komory", + "KN": "Saint Kitts i Nevis", + "KP": "Korea Północna", + "KR": "Korea PoÅ‚udniowa", + "KW": "Kuwejt", + "KY": "Kajmany", + "KZ": "Kazachstan", + "LA": "Laos", + "LB": "Liban", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Litwa", + "LU": "Luksemburg", + "LV": "Åotwa", + "LY": "Libia", + "MA": "Maroko", + "MC": "Monako", + "MD": "MoÅ‚dawia", + "ME": "Czarnogóra", + "MF": "Saint-Martin", + "MG": "Madagaskar", + "MH": "Wyspy Marshalla", + "MK": "Macedonia", + "ML": "Mali", + "MM": "Mjanma (Birma)", + "MN": "Mongolia", + "MO": "SRA Makau (Chiny)", + "MP": "Mariany Północne", + "MQ": "Martynika", + "MR": "Mauretania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Malediwy", + "MW": "Malawi", + "MX": "Meksyk", + "MY": "Malezja", + "MZ": "Mozambik", + "NA": "Namibia", + "NC": "Nowa Kaledonia", + "NE": "Niger", + "NF": "Norfolk", + "NG": "Nigeria", + "NI": "Nikaragua", + "NL": "Holandia", + "NO": "Norwegia", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nowa Zelandia", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Polinezja Francuska", + "PG": "Papua-Nowa Gwinea", + "PH": "Filipiny", + "PK": "Pakistan", + "PL": "Polska", + "PM": "Saint-Pierre i Miquelon", + "PN": "Pitcairn", + "PR": "Portoryko", + "PS": "Terytoria PalestyÅ„skie", + "PT": "Portugalia", + "PW": "Palau", + "PY": "Paragwaj", + "QA": "Katar", + "RE": "Reunion", + "RO": "Rumunia", + "RS": "Serbia", + "RU": "Rosja", + "RW": "Rwanda", + "SA": "Arabia Saudyjska", + "SB": "Wyspy Salomona", + "SC": "Seszele", + "SD": "Sudan", + "SE": "Szwecja", + "SG": "Singapur", + "SH": "Wyspa ÅšwiÄ™tej Heleny", + "SI": "SÅ‚owenia", + "SJ": "Svalbard i Jan Mayen", + "SK": "SÅ‚owacja", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "SS": "Sudan PoÅ‚udniowy", + "ST": "Wyspy ÅšwiÄ™tego Tomasza i Książęca", + "SV": "Salwador", + "SX": "Sint Maarten", + "SY": "Syria", + "SZ": "Suazi", + "TA": "Tristan da Cunha", + "TC": "Turks i Caicos", + "TD": "Czad", + "TF": "Francuskie Terytoria PoÅ‚udniowe i Antarktyczne", + "TG": "Togo", + "TH": "Tajlandia", + "TJ": "Tadżykistan", + "TK": "Tokelau", + "TL": "Timor Wschodni", + "TM": "Turkmenistan", + "TN": "Tunezja", + "TO": "Tonga", + "TR": "Turcja", + "TT": "Trynidad i Tobago", + "TV": "Tuvalu", + "TW": "Tajwan", + "TZ": "Tanzania", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "Dalekie Wyspy Mniejsze Stanów Zjednoczonych", + "UN": "Organizacja Narodów Zjednoczonych", + "US": "Stany Zjednoczone", + "UY": "Urugwaj", + "UZ": "Uzbekistan", + "VA": "Watykan", + "VC": "Saint Vincent i Grenadyny", + "VE": "Wenezuela", + "VG": "Brytyjskie Wyspy Dziewicze", + "VI": "Wyspy Dziewicze Stanów Zjednoczonych", + "VN": "Wietnam", + "VU": "Vanuatu", + "WF": "Wallis i Futuna", + "WS": "Samoa", + "XK": "Kosowo", + "YE": "Jemen", + "YT": "Majotta", + "ZA": "Republika PoÅ‚udniowej Afryki", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ps.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ps.json new file mode 100644 index 0000000000000000000000000000000000000000..ec8481b1ad7b45eb245b12fadcb3fbaf1710a206 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ps.json @@ -0,0 +1,68 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AF": "Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†", + "AL": "البانیه", + "AO": "انګولا", + "AQ": "انتارکتیکا", + "AT": "اتریش", + "BD": "بنګله‌دیش", + "BG": "بلغاریه", + "CA": "کاناډا", + "CH": "سویس", + "CN": "چین", + "CO": "کولمبیا", + "CU": "کیوبا", + "DE": "المان", + "DK": "ډنمارک", + "DZ": "الجزایر", + "EG": "مصر", + "ES": "هسپانیه", + "ET": "حبشه", + "FI": "Ùنلینډ", + "FR": "ÙØ±Ø§Ù†Ø³Ù‡", + "GB": "برتانیه", + "GH": "ګانا", + "GN": "ګیانا", + "GR": "یونان", + "GT": "ګواتیمالا", + "HN": "هانډوراس", + "HU": "مجارستان", + "ID": "اندونیزیا", + "IN": "هند", + "IQ": "عراق", + "IS": "آیسلینډ", + "IT": "ایټالیه", + "JM": "جمیکا", + "JP": "جاپان", + "KH": "کمبودیا", + "KW": "کویټ", + "LA": "لاوس", + "LB": "لبنان", + "LR": "لایبریا", + "LY": "لیبیا", + "MA": "مراکش", + "MN": "مغولستان", + "MY": "مالیزیا", + "NG": "نایجیریا", + "NI": "نکاراګوا", + "NL": "هالÛÙ†Ú‰", + "NO": "ناروÛ", + "NP": "نیپال", + "NZ": "نیوزیلنډ", + "PK": "پاکستان", + "PL": "پولنډ", + "PS": "Ùلسطین", + "PT": "پورتګال", + "RU": "روسیه", + "RW": "روندا", + "SA": "سعودی عربستان", + "SE": "سویډن", + "SV": "سالوÛډور", + "SY": "سوریه", + "TJ": "تاجکستان", + "TZ": "تنزانیا", + "UY": "یوروګوای", + "YE": "یمن" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pt.json new file mode 100644 index 0000000000000000000000000000000000000000..0da2b90f9b6d08ea7b2936201722c295ce7febbd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pt.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Ilha de Ascensão", + "AD": "Andorra", + "AE": "Emirados Ãrabes Unidos", + "AF": "Afeganistão", + "AG": "Antígua e Barbuda", + "AI": "Anguilla", + "AL": "Albânia", + "AM": "Armênia", + "AO": "Angola", + "AQ": "Antártida", + "AR": "Argentina", + "AS": "Samoa Americana", + "AT": "Ãustria", + "AU": "Austrália", + "AW": "Aruba", + "AX": "Ilhas Ã…land", + "AZ": "Azerbaijão", + "BA": "Bósnia e Herzegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Bélgica", + "BF": "Burquina Faso", + "BG": "Bulgária", + "BH": "Bahrein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "São Bartolomeu", + "BM": "Bermudas", + "BN": "Brunei", + "BO": "Bolívia", + "BQ": "Países Baixos Caribenhos", + "BR": "Brasil", + "BS": "Bahamas", + "BT": "Butão", + "BW": "Botsuana", + "BY": "Bielorrússia", + "BZ": "Belize", + "CA": "Canadá", + "CC": "Ilhas Cocos (Keeling)", + "CD": "Congo - Kinshasa", + "CF": "República Centro-Africana", + "CG": "Congo - Brazzaville", + "CH": "Suíça", + "CI": "Costa do Marfim", + "CK": "Ilhas Cook", + "CL": "Chile", + "CM": "República dos Camarões", + "CN": "China", + "CO": "Colômbia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Cabo Verde", + "CW": "Curaçao", + "CX": "Ilha Christmas", + "CY": "Chipre", + "CZ": "República Tcheca", + "DE": "Alemanha", + "DG": "Diego Garcia", + "DJ": "Djibuti", + "DK": "Dinamarca", + "DM": "Dominica", + "DO": "República Dominicana", + "DZ": "Argélia", + "EA": "Ceuta e Melilha", + "EC": "Equador", + "EE": "Estônia", + "EG": "Egito", + "EH": "Saara Ocidental", + "ER": "Eritreia", + "ES": "Espanha", + "ET": "Etiópia", + "FI": "Finlândia", + "FJ": "Fiji", + "FK": "Ilhas Malvinas", + "FM": "Micronésia", + "FO": "Ilhas Faroe", + "FR": "França", + "GA": "Gabão", + "GB": "Reino Unido", + "GD": "Granada", + "GE": "Geórgia", + "GF": "Guiana Francesa", + "GG": "Guernsey", + "GH": "Gana", + "GI": "Gibraltar", + "GL": "Groenlândia", + "GM": "Gâmbia", + "GN": "Guiné", + "GP": "Guadalupe", + "GQ": "Guiné Equatorial", + "GR": "Grécia", + "GS": "Ilhas Geórgia do Sul e Sandwich do Sul", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guiné-Bissau", + "GY": "Guiana", + "HK": "Hong Kong, RAE da China", + "HN": "Honduras", + "HR": "Croácia", + "HT": "Haiti", + "HU": "Hungria", + "IC": "Ilhas Canárias", + "ID": "Indonésia", + "IE": "Irlanda", + "IL": "Israel", + "IM": "Ilha de Man", + "IN": "Ãndia", + "IO": "Território Britânico do Oceano Ãndico", + "IQ": "Iraque", + "IR": "Irã", + "IS": "Islândia", + "IT": "Itália", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordânia", + "JP": "Japão", + "KE": "Quênia", + "KG": "Quirguistão", + "KH": "Camboja", + "KI": "Quiribati", + "KM": "Comores", + "KN": "São Cristóvão e Nevis", + "KP": "Coreia do Norte", + "KR": "Coreia do Sul", + "KW": "Kuwait", + "KY": "Ilhas Cayman", + "KZ": "Cazaquistão", + "LA": "Laos", + "LB": "Líbano", + "LC": "Santa Lúcia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Libéria", + "LS": "Lesoto", + "LT": "Lituânia", + "LU": "Luxemburgo", + "LV": "Letônia", + "LY": "Líbia", + "MA": "Marrocos", + "MC": "Mônaco", + "MD": "Moldávia", + "ME": "Montenegro", + "MF": "São Martinho", + "MG": "Madagascar", + "MH": "Ilhas Marshall", + "MK": "Macedônia", + "ML": "Mali", + "MM": "Mianmar (Birmânia)", + "MN": "Mongólia", + "MO": "Macau, RAE da China", + "MP": "Ilhas Marianas do Norte", + "MQ": "Martinica", + "MR": "Mauritânia", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Maurício", + "MV": "Maldivas", + "MW": "Malawi", + "MX": "México", + "MY": "Malásia", + "MZ": "Moçambique", + "NA": "Namíbia", + "NC": "Nova Caledônia", + "NE": "Níger", + "NF": "Ilha Norfolk", + "NG": "Nigéria", + "NI": "Nicarágua", + "NL": "Holanda", + "NO": "Noruega", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nova Zelândia", + "OM": "Omã", + "PA": "Panamá", + "PE": "Peru", + "PF": "Polinésia Francesa", + "PG": "Papua-Nova Guiné", + "PH": "Filipinas", + "PK": "Paquistão", + "PL": "Polônia", + "PM": "Saint Pierre e Miquelon", + "PN": "Ilhas Pitcairn", + "PR": "Porto Rico", + "PS": "Territórios palestinos", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguai", + "QA": "Catar", + "RE": "Reunião", + "RO": "Romênia", + "RS": "Sérvia", + "RU": "Rússia", + "RW": "Ruanda", + "SA": "Arábia Saudita", + "SB": "Ilhas Salomão", + "SC": "Seicheles", + "SD": "Sudão", + "SE": "Suécia", + "SG": "Cingapura", + "SH": "Santa Helena", + "SI": "Eslovênia", + "SJ": "Svalbard e Jan Mayen", + "SK": "Eslováquia", + "SL": "Serra Leoa", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somália", + "SR": "Suriname", + "SS": "Sudão do Sul", + "ST": "São Tomé e Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Síria", + "SZ": "Suazilândia", + "TA": "Tristão da Cunha", + "TC": "Ilhas Turks e Caicos", + "TD": "Chade", + "TF": "Territórios Franceses do Sul", + "TG": "Togo", + "TH": "Tailândia", + "TJ": "Tajiquistão", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turcomenistão", + "TN": "Tunísia", + "TO": "Tonga", + "TR": "Turquia", + "TT": "Trinidad e Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzânia", + "UA": "Ucrânia", + "UG": "Uganda", + "UM": "Ilhas Menores Distantes dos EUA", + "UN": "Nações Unidas", + "US": "Estados Unidos", + "UY": "Uruguai", + "UZ": "Uzbequistão", + "VA": "Cidade do Vaticano", + "VC": "São Vicente e Granadinas", + "VE": "Venezuela", + "VG": "Ilhas Virgens Britânicas", + "VI": "Ilhas Virgens dos EUA", + "VN": "Vietnã", + "VU": "Vanuatu", + "WF": "Wallis e Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Iêmen", + "YT": "Mayotte", + "ZA": "Ãfrica do Sul", + "ZM": "Zâmbia", + "ZW": "Zimbábue" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pt_PT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pt_PT.json new file mode 100644 index 0000000000000000000000000000000000000000..c96cb8a96d01a5fcaef70d8bb6143d86490c25c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/pt_PT.json @@ -0,0 +1,59 @@ +{ + "Version": "2.1.29.54", + "Names": { + "AI": "Anguila", + "AM": "Arménia", + "AX": "Alanda", + "BD": "Bangladeche", + "BH": "Barém", + "BJ": "Benim", + "BS": "Baamas", + "CC": "Ilhas dos Cocos (Keeling)", + "CD": "Congo-Kinshasa", + "CG": "Congo-Brazzaville", + "CM": "Camarões", + "CW": "Curaçau", + "CX": "Ilha do Natal", + "CZ": "República Checa", + "DJ": "Jibuti", + "DM": "Domínica", + "EE": "Estónia", + "FK": "Ilhas Falkland", + "FO": "Ilhas Faroé", + "GL": "Gronelândia", + "GU": "Guame", + "IR": "Irão", + "KE": "Quénia", + "KN": "São Cristóvão e Neves", + "KY": "Ilhas Caimão", + "LI": "Listenstaine", + "LK": "Sri Lanca", + "LV": "Letónia", + "MC": "Mónaco", + "MG": "Madagáscar", + "MK": "Macedónia", + "MS": "Monserrate", + "MU": "Maurícia", + "MW": "Maláui", + "NC": "Nova Caledónia", + "NL": "Países Baixos", + "PL": "Polónia", + "PM": "São Pedro e Miquelão", + "PS": "Territórios palestinianos", + "RO": "Roménia", + "SG": "Singapura", + "SI": "Eslovénia", + "SM": "São Marinho", + "SV": "Salvador", + "TC": "Ilhas Turcas e Caicos", + "TK": "Toquelau", + "TM": "Turquemenistão", + "TT": "Trindade e Tobago", + "UM": "Ilhas Menores Afastadas dos EUA", + "UZ": "Usbequistão", + "VN": "Vietname", + "YE": "Iémen", + "YT": "Maiote", + "ZW": "Zimbabué" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/qu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/qu.json new file mode 100644 index 0000000000000000000000000000000000000000..f11d5c788a11e6a5ea50fefeae89c4b05729e004 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/qu.json @@ -0,0 +1,194 @@ +{ + "Version": "2.1.27.98", + "Names": { + "AD": "Andorra", + "AF": "Afganistán", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AR": "Argentina", + "AS": "Samoa Americana", + "AT": "Austria", + "AU": "Australia", + "AZ": "Azerbaiyán", + "BD": "Bangladesh", + "BE": "Bélgica", + "BG": "Bulgaria", + "BH": "Baréin", + "BI": "Burundi", + "BJ": "Benín", + "BN": "Brunéi", + "BO": "Bolivia", + "BQ": "Bonaire", + "BR": "Brasil", + "BS": "Bahamas", + "BT": "Bután", + "BW": "Botsuana", + "BY": "Belarús", + "CC": "Islas Cocos", + "CD": "Congo (RDC)", + "CG": "Congo", + "CH": "Suiza", + "CI": "Côte d’Ivoire", + "CL": "Chile", + "CM": "Camerún", + "CN": "China", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CW": "Curazao", + "CX": "Isla Christmas", + "CY": "Chipre", + "DE": "Alemania", + "DJ": "Yibuti", + "DK": "Dinamarca", + "DM": "Dominica", + "DZ": "Argelia", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Egipto", + "ER": "Eritrea", + "ES": "España", + "ET": "Etiopía", + "FI": "Finlandia", + "FJ": "Fiyi", + "FM": "Micronesia", + "FR": "Francia", + "GA": "Gabón", + "GB": "Reino Unido", + "GG": "Guernesey", + "GH": "Ghana", + "GM": "Gambia", + "GN": "Guinea", + "GQ": "Guinea Ecuatorial", + "GR": "Grecia", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bisáu", + "GY": "Guyana", + "HK": "Hong Kong (RAE)", + "HN": "Honduras", + "HR": "Croacia", + "HT": "Haití", + "ID": "Indonesia", + "IL": "Israel", + "IN": "India", + "IQ": "Irak", + "IR": "Irán", + "IS": "Islandia", + "IT": "Italia", + "JE": "Jersey", + "JO": "Jordania", + "KE": "Kenia", + "KG": "Kirguistán", + "KH": "Camboya", + "KI": "Kiribati", + "KM": "Comoras", + "KN": "San Cristóbal y Nieves", + "KP": "Corea del Norte", + "KR": "Corea del Sur", + "KW": "Kuwait", + "KZ": "Kazajistán", + "LA": "Laos", + "LB": "Líbano", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesoto", + "LT": "Lituania", + "LU": "Luxemburgo", + "LV": "Letonia", + "MA": "Marruecos", + "MC": "Mónaco", + "MD": "Moldova", + "MF": "San Martín", + "MG": "Madagascar", + "MH": "Islas Marshall", + "MK": "ERY Macedonia", + "ML": "Malí", + "MM": "Myanmar", + "MO": "Macao RAE", + "MP": "Islas Marianas del Norte", + "MR": "Mauritania", + "MT": "Malta", + "MU": "Mauricio", + "MV": "Maldivas", + "MW": "Malawi", + "MX": "México", + "MZ": "Mozambique", + "NA": "Namibia", + "NC": "Nueva Caledonia", + "NE": "Níger", + "NF": "Isla Norfolk", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Países Bajos", + "NO": "Noruega", + "NP": "Nepal", + "NR": "Nauru", + "OM": "Omán", + "PA": "Panamá", + "PE": "Perú", + "PF": "Polinesia Francesa", + "PG": "Papúa Nueva Guinea", + "PH": "Filipinas", + "PK": "Pakistán", + "PL": "Polonia", + "PM": "San Pedro y Miquelón", + "PN": "Islas Pitcairn", + "PR": "Puerto Rico", + "PS": "Palestina Kamachikuq", + "PT": "Portugal", + "PW": "Palaos", + "PY": "Paraguay", + "QA": "Qatar", + "RS": "Serbia", + "RU": "Rusia", + "RW": "Ruanda", + "SA": "Arabia Saudí", + "SC": "Seychelles", + "SD": "Sudán", + "SE": "Suecia", + "SG": "Singapur", + "SI": "Eslovenia", + "SK": "Eslovaquia", + "SL": "Sierra Leona", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "SS": "Sudán del Sur", + "ST": "Santo Tomé y Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Siria", + "SZ": "Suazilandia", + "TD": "Chad", + "TF": "Territorios Australes Franceses", + "TG": "Togo", + "TH": "Tailandia", + "TJ": "Tayikistán", + "TL": "Timor-Leste", + "TN": "Túnez", + "TO": "Tonga", + "TR": "Turquía", + "TT": "Trinidad y Tobago", + "TZ": "Tanzania", + "UG": "Uganda", + "UM": "Islas menores alejadas de los EE.UU.", + "US": "Estados Unidos", + "UY": "Uruguay", + "UZ": "Uzbekistán", + "VA": "Santa Sede (Ciudad del Vaticano)", + "VE": "Venezuela", + "VI": "EE.UU. Islas Vírgenes", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis y Futuna", + "WS": "Samoa", + "YE": "Yemen", + "ZA": "Sudáfrica", + "ZM": "Zambia", + "ZW": "Zimbabue" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/rm.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/rm.json new file mode 100644 index 0000000000000000000000000000000000000000..f0cc0394ab607b0966bc36e42f962eacc4005a6b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/rm.json @@ -0,0 +1,248 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AD": "Andorra", + "AE": "Emirats Arabs Unids", + "AF": "Afghanistan", + "AG": "Antigua e Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antarctica", + "AR": "Argentinia", + "AS": "Samoa Americana", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Inslas Aland", + "AZ": "Aserbaidschan", + "BA": "Bosnia ed Erzegovina", + "BB": "Barbados", + "BD": "Bangladesch", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Son Barthélemy", + "BM": "Bermudas", + "BN": "Brunei", + "BO": "Bolivia", + "BR": "Brasila", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Bielorussia", + "BZ": "Belize", + "CA": "Canada", + "CC": "Inslas Cocos", + "CD": "Republica Democratica dal Congo", + "CF": "Republica Centralafricana", + "CG": "Congo", + "CH": "Svizra", + "CI": "Costa d’Ivur", + "CK": "Inslas Cook", + "CL": "Chile", + "CM": "Camerun", + "CN": "China", + "CO": "Columbia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Cap Verd", + "CX": "Insla da Christmas", + "CY": "Cipra", + "CZ": "Republica Tscheca", + "DE": "Germania", + "DJ": "Dschibuti", + "DK": "Danemarc", + "DM": "Dominica", + "DO": "Republica Dominicana", + "DZ": "Algeria", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Egipta", + "EH": "Sahara Occidentala", + "ER": "Eritrea", + "ES": "Spagna", + "ET": "Etiopia", + "FI": "Finlanda", + "FJ": "Fidschi", + "FK": "Inslas dal Falkland", + "FM": "Micronesia", + "FO": "Inslas Feroe", + "FR": "Frantscha", + "GA": "Gabun", + "GB": "Reginavel Unì", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Guyana Franzosa", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grönlanda", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Guinea Equatoriala", + "GR": "Grezia", + "GS": "Georgia dal Sid e las Inslas Sandwich dal Sid", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Regiun d’administraziun speziala da Hongkong, China", + "HN": "Honduras", + "HR": "Croazia", + "HT": "Haiti", + "HU": "Ungaria", + "ID": "Indonesia", + "IE": "Irlanda", + "IL": "Israel", + "IM": "Insla da Man", + "IN": "India", + "IO": "Territori Britannic en l’Ocean Indic", + "IQ": "Irac", + "IR": "Iran", + "IS": "Islanda", + "IT": "Italia", + "JE": "Jersey", + "JM": "Giamaica", + "JO": "Jordania", + "JP": "Giapun", + "KE": "Kenia", + "KG": "Kirghisistan", + "KH": "Cambodscha", + "KI": "Kiribati", + "KM": "Comoras", + "KN": "Saint Kitts e Nevis", + "KP": "Corea dal Nord", + "KR": "Corea dal Sid", + "KW": "Kuwait", + "KY": "Inslas Cayman", + "KZ": "Kasachstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lituania", + "LU": "Luxemburg", + "LV": "Lettonia", + "LY": "Libia", + "MA": "Maroc", + "MC": "Monaco", + "MD": "Moldavia", + "ME": "Montenegro", + "MF": "Saint Martin", + "MG": "Madagascar", + "MH": "Inslas da Marshall", + "MK": "Macedonia", + "ML": "Mali", + "MM": "Myanmar", + "MN": "Mongolia", + "MO": "Regiun d’administraziun speziala Macao, China", + "MP": "Inslas Mariannas dal Nord", + "MQ": "Martinique", + "MR": "Mauretania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldivas", + "MW": "Malawi", + "MX": "Mexico", + "MY": "Malaisia", + "MZ": "Mosambic", + "NA": "Namibia", + "NC": "Nova Caledonia", + "NE": "Niger", + "NF": "Insla Norfolk", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Pajais Bass", + "NO": "Norvegia", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nova Zelanda", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Polinesia Franzosa", + "PG": "Papua Nova Guinea", + "PH": "Filippinas", + "PK": "Pakistan", + "PL": "Pologna", + "PM": "Saint Pierre e Miquelon", + "PN": "Pitcairn", + "PR": "Puerto Rico", + "PS": "Territori Palestinais", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguai", + "QA": "Katar", + "RE": "Réunion", + "RO": "Rumenia", + "RS": "Serbia", + "RU": "Russia", + "RW": "Ruanda", + "SA": "Arabia Saudita", + "SB": "Salomonas", + "SC": "Seychellas", + "SD": "Sudan", + "SE": "Svezia", + "SG": "Singapur", + "SH": "Sontg’Elena", + "SI": "Slovenia", + "SJ": "Svalbard e Jan Mayen", + "SK": "Slovachia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "ST": "São Tomé e Principe", + "SV": "El Salvador", + "SY": "Siria", + "SZ": "Swaziland", + "TC": "Inslas Turks e Caicos", + "TD": "Tschad", + "TF": "Territoris Franzos Meridiunals", + "TG": "Togo", + "TH": "Tailanda", + "TJ": "Tadschikistan", + "TK": "Tokelau", + "TL": "Timor da l’Ost", + "TM": "Turkmenistan", + "TN": "Tunesia", + "TO": "Tonga", + "TR": "Tirchia", + "TT": "Trinidad e Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tansania", + "UA": "Ucraina", + "UG": "Uganda", + "UM": "Inslas pitschnas perifericas dals Stadis Unids da l’America", + "US": "Stadis Unids da l’America", + "UY": "Uruguay", + "UZ": "Usbekistan", + "VA": "Citad dal Vatican", + "VC": "Saint Vincent e las Grenadinas", + "VE": "Venezuela", + "VG": "Inslas Verginas Britannicas", + "VI": "Inslas Verginas Americanas", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis e Futuna", + "WS": "Samoa", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Africa dal Sid", + "ZM": "Sambia", + "ZW": "Simbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/rn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/rn.json new file mode 100644 index 0000000000000000000000000000000000000000..9161777b1e0e6df93afca69678f7de9bd027b585 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/rn.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AD": "Andora", + "AE": "Leta Zunze Ubumwe z’Abarabu", + "AF": "Afuganisitani", + "AG": "Antigwa na Baribuda", + "AI": "Angwila", + "AL": "Alubaniya", + "AM": "Arumeniya", + "AO": "Angola", + "AR": "Arijantine", + "AS": "Samowa nyamerika", + "AT": "Otirishe", + "AU": "Ositaraliya", + "AW": "Aruba", + "AZ": "Azerubayijani", + "BA": "Bosiniya na Herigozevine", + "BB": "Barubadosi", + "BD": "Bangaladeshi", + "BE": "Ububiligi", + "BF": "Burukina Faso", + "BG": "Buligariya", + "BH": "Bahareyini", + "BI": "Uburundi", + "BJ": "Bene", + "BM": "Berimuda", + "BN": "Buruneyi", + "BO": "Boliviya", + "BR": "Burezili", + "BS": "Bahamasi", + "BT": "Butani", + "BW": "Botswana", + "BY": "Belausi", + "BZ": "Belize", + "CA": "Kanada", + "CD": "Repubulika Iharanira Demokarasi ya Kongo", + "CF": "Repubulika ya Santarafurika", + "CG": "Kongo", + "CH": "Ubusuwisi", + "CI": "Kotedivuware", + "CK": "Izinga rya Kuku", + "CL": "Shili", + "CM": "Kameruni", + "CN": "Ubushinwa", + "CO": "Kolombiya", + "CR": "Kositarika", + "CU": "Kiba", + "CV": "Ibirwa bya Kapuveri", + "CY": "Izinga rya Shipure", + "CZ": "Repubulika ya Ceke", + "DE": "Ubudage", + "DJ": "Jibuti", + "DK": "Danimariki", + "DM": "Dominika", + "DO": "Repubulika ya Dominika", + "DZ": "Alijeriya", + "EC": "Ekwateri", + "EE": "Esitoniya", + "EG": "Misiri", + "ER": "Elitereya", + "ES": "Hisipaniya", + "ET": "Etiyopiya", + "FI": "Finilandi", + "FJ": "Fiji", + "FK": "Izinga rya Filikilandi", + "FM": "Mikoroniziya", + "FR": "Ubufaransa", + "GA": "Gabo", + "GB": "Ubwongereza", + "GD": "Gerenada", + "GE": "Jeworujiya", + "GF": "Gwayana y’Abafaransa", + "GH": "Gana", + "GI": "Juburalitari", + "GL": "Gurunilandi", + "GM": "Gambiya", + "GN": "Guneya", + "GP": "Gwadelupe", + "GQ": "Gineya Ekwatoriyali", + "GR": "Ubugereki", + "GT": "Gwatemala", + "GU": "Gwamu", + "GW": "Gineya Bisawu", + "GY": "Guyane", + "HN": "Hondurasi", + "HR": "Korowasiya", + "HT": "Hayiti", + "HU": "Hungariya", + "ID": "Indoneziya", + "IE": "Irilandi", + "IL": "Isiraheli", + "IN": "Ubuhindi", + "IO": "Intara y’Ubwongereza yo mu birwa by’Abahindi", + "IQ": "Iraki", + "IR": "Irani", + "IS": "Ayisilandi", + "IT": "Ubutaliyani", + "JM": "Jamayika", + "JO": "Yorudaniya", + "JP": "Ubuyapani", + "KE": "Kenya", + "KG": "Kirigisitani", + "KH": "Kamboje", + "KI": "Kiribati", + "KM": "Izinga rya Komore", + "KN": "Sekitsi na Nevisi", + "KP": "Koreya y’amajaruguru", + "KR": "Koreya y’amajepfo", + "KW": "Koweti", + "KY": "Ibirwa bya Keyimani", + "KZ": "Kazakisitani", + "LA": "Layosi", + "LB": "Libani", + "LC": "Selusiya", + "LI": "Lishyitenshitayini", + "LK": "Sirilanka", + "LR": "Liberiya", + "LS": "Lesoto", + "LT": "Lituwaniya", + "LU": "Lukusamburu", + "LV": "Lativa", + "LY": "Libiya", + "MA": "Maroke", + "MC": "Monako", + "MD": "Moludavi", + "MG": "Madagasikari", + "MH": "Izinga rya Marishari", + "MK": "Masedoniya", + "ML": "Mali", + "MM": "Birimaniya", + "MN": "Mongoliya", + "MP": "Amazinga ya Mariyana ryo mu majaruguru", + "MQ": "Maritiniki", + "MR": "Moritaniya", + "MS": "Monteserati", + "MT": "Malita", + "MU": "Izinga rya Morise", + "MV": "Moludave", + "MW": "Malawi", + "MX": "Migizike", + "MY": "Maleziya", + "MZ": "Mozambiki", + "NA": "Namibiya", + "NC": "Niyukaledoniya", + "NE": "Nijeri", + "NF": "izinga rya Norufoluke", + "NG": "Nijeriya", + "NI": "Nikaragwa", + "NL": "Ubuholandi", + "NO": "Noruveji", + "NP": "Nepali", + "NR": "Nawuru", + "NU": "Niyuwe", + "NZ": "Nuvelizelandi", + "OM": "Omani", + "PA": "Panama", + "PE": "Peru", + "PF": "Polineziya y’Abafaransa", + "PG": "Papuwa Niyugineya", + "PH": "Amazinga ya Filipine", + "PK": "Pakisitani", + "PL": "Polonye", + "PM": "Sempiyeri na Mikeloni", + "PN": "Pitikeyirini", + "PR": "Puwetoriko", + "PS": "Palesitina Wesitibanka na Gaza", + "PT": "Porutugali", + "PW": "Palawu", + "PY": "Paragwe", + "QA": "Katari", + "RE": "Amazinga ya Reyiniyo", + "RO": "Rumaniya", + "RU": "Uburusiya", + "RW": "u Rwanda", + "SA": "Arabiya Sawudite", + "SB": "Amazinga ya Salumoni", + "SC": "Amazinga ya Seyisheli", + "SD": "Sudani", + "SE": "Suwedi", + "SG": "Singapuru", + "SH": "Sehelene", + "SI": "Siloveniya", + "SK": "Silovakiya", + "SL": "Siyeralewone", + "SM": "Sanimarino", + "SN": "Senegali", + "SO": "Somaliya", + "SR": "Suriname", + "ST": "Sawotome na Perensipe", + "SV": "Eli Saluvatori", + "SY": "Siriya", + "SZ": "Suwazilandi", + "TC": "Amazinga ya Turkisi na Cayikosi", + "TD": "Cadi", + "TG": "Togo", + "TH": "Tayilandi", + "TJ": "Tajikisitani", + "TK": "Tokelawu", + "TL": "Timoru y’iburasirazuba", + "TM": "Turukumenisitani", + "TN": "Tuniziya", + "TO": "Tonga", + "TR": "Turukiya", + "TT": "Tirinidadi na Tobago", + "TV": "Tuvalu", + "TW": "Tayiwani", + "TZ": "Tanzaniya", + "UA": "Ikerene", + "UG": "Ubugande", + "US": "Leta Zunze Ubumwe za Amerika", + "UY": "Irigwe", + "UZ": "Uzubekisitani", + "VA": "Umurwa wa Vatikani", + "VC": "Sevensa na Gerenadine", + "VE": "Venezuwela", + "VG": "Ibirwa by’isugi by’Abongereza", + "VI": "Amazinga y’Isugi y’Abanyamerika", + "VN": "Viyetinamu", + "VU": "Vanuwatu", + "WF": "Walisi na Futuna", + "WS": "Samowa", + "YE": "Yemeni", + "YT": "Mayote", + "ZA": "Afurika y’Epfo", + "ZM": "Zambiya", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ro.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ro.json new file mode 100644 index 0000000000000000000000000000000000000000..705835b6798fea0c23c9694137ef25499975f010 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ro.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Insula Ascension", + "AD": "Andorra", + "AE": "Emiratele Arabe Unite", + "AF": "Afganistan", + "AG": "Antigua È™i Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antarctica", + "AR": "Argentina", + "AS": "Samoa Americană", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Insulele Ã…land", + "AZ": "Azerbaidjan", + "BA": "Bosnia È™i HerÈ›egovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Sfântul Bartolomeu", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Insulele Caraibe Olandeze", + "BR": "Brazilia", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Canada", + "CC": "Insulele Cocos (Keeling)", + "CD": "Congo - Kinshasa", + "CF": "Republica Centrafricană", + "CG": "Congo - Brazzaville", + "CH": "ElveÈ›ia", + "CI": "Côte d’Ivoire", + "CK": "Insulele Cook", + "CL": "Chile", + "CM": "Camerun", + "CN": "China", + "CO": "Columbia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Capul Verde", + "CW": "Curaçao", + "CX": "Insula Christmas", + "CY": "Cipru", + "CZ": "Republica Cehă", + "DE": "Germania", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Danemarca", + "DM": "Dominica", + "DO": "Republica Dominicană", + "DZ": "Algeria", + "EA": "Ceuta È™i Melilla", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Egipt", + "EH": "Sahara Occidentală", + "ER": "Eritreea", + "ES": "Spania", + "ET": "Etiopia", + "FI": "Finlanda", + "FJ": "Fiji", + "FK": "Insulele Falkland", + "FM": "Micronezia", + "FO": "Insulele Feroe", + "FR": "FranÈ›a", + "GA": "Gabon", + "GB": "Regatul Unit", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Guyana Franceză", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Groenlanda", + "GM": "Gambia", + "GN": "Guineea", + "GP": "Guadelupa", + "GQ": "Guineea Ecuatorială", + "GR": "Grecia", + "GS": "Georgia de Sud È™i Insulele Sandwich de Sud", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guineea-Bissau", + "GY": "Guyana", + "HK": "R.A.S. Hong Kong a Chinei", + "HN": "Honduras", + "HR": "CroaÈ›ia", + "HT": "Haiti", + "HU": "Ungaria", + "IC": "Insulele Canare", + "ID": "Indonezia", + "IE": "Irlanda", + "IL": "Israel", + "IM": "Insula Man", + "IN": "India", + "IO": "Teritoriul Britanic din Oceanul Indian", + "IQ": "Irak", + "IR": "Iran", + "IS": "Islanda", + "IT": "Italia", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Iordania", + "JP": "Japonia", + "KE": "Kenya", + "KG": "Kârgâzstan", + "KH": "Cambodgia", + "KI": "Kiribati", + "KM": "Comore", + "KN": "Saint Kitts È™i Nevis", + "KP": "Coreea de Nord", + "KR": "Coreea de Sud", + "KW": "Kuweit", + "KY": "Insulele Cayman", + "KZ": "Kazahstan", + "LA": "Laos", + "LB": "Liban", + "LC": "Sfânta Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lituania", + "LU": "Luxemburg", + "LV": "Letonia", + "LY": "Libia", + "MA": "Maroc", + "MC": "Monaco", + "MD": "Republica Moldova", + "ME": "Muntenegru", + "MF": "Sfântul Martin", + "MG": "Madagascar", + "MH": "Insulele Marshall", + "MK": "Republica Macedonia", + "ML": "Mali", + "MM": "Myanmar (Birmania)", + "MN": "Mongolia", + "MO": "R.A.S. Macao a Chinei", + "MP": "Insulele Mariane de Nord", + "MQ": "Martinica", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldive", + "MW": "Malawi", + "MX": "Mexic", + "MY": "Malaysia", + "MZ": "Mozambic", + "NA": "Namibia", + "NC": "Noua Caledonie", + "NE": "Niger", + "NF": "Insula Norfolk", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Țările de Jos", + "NO": "Norvegia", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Noua Zeelandă", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Polinezia Franceză", + "PG": "Papua-Noua Guinee", + "PH": "Filipine", + "PK": "Pakistan", + "PL": "Polonia", + "PM": "Saint-Pierre È™i Miquelon", + "PN": "Insulele Pitcairn", + "PR": "Puerto Rico", + "PS": "Teritoriile Palestiniene", + "PT": "Portugalia", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "România", + "RS": "Serbia", + "RU": "Rusia", + "RW": "Rwanda", + "SA": "Arabia Saudită", + "SB": "Insulele Solomon", + "SC": "Seychelles", + "SD": "Sudan", + "SE": "Suedia", + "SG": "Singapore", + "SH": "Sfânta Elena", + "SI": "Slovenia", + "SJ": "Svalbard È™i Jan Mayen", + "SK": "Slovacia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "SS": "Sudanul de Sud", + "ST": "Sao Tomé È™i Príncipe", + "SV": "El Salvador", + "SX": "Sint-Maarten", + "SY": "Siria", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Insulele Turks È™i Caicos", + "TD": "Ciad", + "TF": "Teritoriile Australe È™i Antarctice Franceze", + "TG": "Togo", + "TH": "Thailanda", + "TJ": "Tadjikistan", + "TK": "Tokelau", + "TL": "Timorul de Est", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Turcia", + "TT": "Trinidad È™i Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ucraina", + "UG": "Uganda", + "UM": "Insulele ÃŽndepărtate ale S.U.A.", + "UN": "NaÈ›iunile Unite", + "US": "Statele Unite ale Americii", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VA": "Statul Cetății Vaticanului", + "VC": "Saint Vincent È™i Grenadinele", + "VE": "Venezuela", + "VG": "Insulele Virgine Britanice", + "VI": "Insulele Virgine Americane", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis È™i Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yemen", + "YT": "Mayotte", + "ZA": "Africa de Sud", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ro_MD.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ro_MD.json new file mode 100644 index 0000000000000000000000000000000000000000..785e0274a94596f382da80a9edba0f016660d2ed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ro_MD.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.99", + "Names": { + "MM": "Myanmar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ru.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ru.json new file mode 100644 index 0000000000000000000000000000000000000000..9a1887d3c9ae86be538ad733d3d131331976776b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ru.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.20", + "Names": { + "AC": "о-в ВознеÑениÑ", + "AD": "Ðндорра", + "AE": "ОÐЭ", + "AF": "ÐфганиÑтан", + "AG": "Ðнтигуа и Барбуда", + "AI": "ÐнгильÑ", + "AL": "ÐлбаниÑ", + "AM": "ÐрмениÑ", + "AO": "Ðнгола", + "AQ": "Ðнтарктида", + "AR": "Ðргентина", + "AS": "ÐмериканÑкое Самоа", + "AT": "ÐвÑтриÑ", + "AU": "ÐвÑтралиÑ", + "AW": "Ðруба", + "AX": "ÐландÑкие о-ва", + "AZ": "Ðзербайджан", + "BA": "БоÑÐ½Ð¸Ñ Ð¸ Герцеговина", + "BB": "БарбадоÑ", + "BD": "Бангладеш", + "BE": "БельгиÑ", + "BF": "Буркина-ФаÑо", + "BG": "БолгариÑ", + "BH": "Бахрейн", + "BI": "Бурунди", + "BJ": "Бенин", + "BL": "Сен-Бартелеми", + "BM": "Бермуды", + "BN": "Бруней-ДаруÑÑалам", + "BO": "БоливиÑ", + "BQ": "БонÑйр, Синт-ЭÑÑ‚Ð°Ñ‚Ð¸ÑƒÑ Ð¸ Саба", + "BR": "БразилиÑ", + "BS": "Багамы", + "BT": "Бутан", + "BW": "БотÑвана", + "BY": "БеларуÑÑŒ", + "BZ": "Белиз", + "CA": "Канада", + "CC": "КокоÑовые о-ва", + "CD": "Конго - КиншаÑа", + "CF": "ЦÐР", + "CG": "Конго - Браззавиль", + "CH": "ШвейцариÑ", + "CI": "Кот-д’Ивуар", + "CK": "ОÑтрова Кука", + "CL": "Чили", + "CM": "Камерун", + "CN": "Китай", + "CO": "КолумбиÑ", + "CR": "КоÑта-Рика", + "CU": "Куба", + "CV": "Кабо-Верде", + "CW": "КюраÑао", + "CX": "о-в РождеÑтва", + "CY": "Кипр", + "CZ": "ЧехиÑ", + "DE": "ГерманиÑ", + "DG": "Диего-ГарÑиÑ", + "DJ": "Джибути", + "DK": "ДаниÑ", + "DM": "Доминика", + "DO": "ДоминиканÑÐºÐ°Ñ Ð ÐµÑпублика", + "DZ": "Ðлжир", + "EA": "Сеута и МелильÑ", + "EC": "Эквадор", + "EE": "ЭÑтониÑ", + "EG": "Египет", + "EH": "Ð—Ð°Ð¿Ð°Ð´Ð½Ð°Ñ Ð¡Ð°Ñ…Ð°Ñ€Ð°", + "ER": "ЭритреÑ", + "ES": "ИÑпаниÑ", + "ET": "ЭфиопиÑ", + "FI": "ФинлÑндиÑ", + "FJ": "Фиджи", + "FK": "ФолклендÑкие о-ва", + "FM": "Федеративные Штаты Микронезии", + "FO": "ФарерÑкие о-ва", + "FR": "ФранциÑ", + "GA": "Габон", + "GB": "ВеликобританиÑ", + "GD": "Гренада", + "GE": "ГрузиÑ", + "GF": "ФранцузÑÐºÐ°Ñ Ð“Ð²Ð¸Ð°Ð½Ð°", + "GG": "ГернÑи", + "GH": "Гана", + "GI": "Гибралтар", + "GL": "ГренландиÑ", + "GM": "ГамбиÑ", + "GN": "ГвинеÑ", + "GP": "Гваделупа", + "GQ": "Ð­ÐºÐ²Ð°Ñ‚Ð¾Ñ€Ð¸Ð°Ð»ÑŒÐ½Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ", + "GR": "ГрециÑ", + "GS": "Ð®Ð¶Ð½Ð°Ñ Ð“ÐµÐ¾Ñ€Ð³Ð¸Ñ Ð¸ Южные Сандвичевы о-ва", + "GT": "Гватемала", + "GU": "Гуам", + "GW": "ГвинеÑ-БиÑау", + "GY": "Гайана", + "HK": "Гонконг (Ñпециальный админиÑтративный район)", + "HN": "ГондураÑ", + "HR": "ХорватиÑ", + "HT": "Гаити", + "HU": "ВенгриÑ", + "IC": "КанарÑкие о-ва", + "ID": "ИндонезиÑ", + "IE": "ИрландиÑ", + "IL": "Израиль", + "IM": "о-в МÑн", + "IN": "ИндиÑ", + "IO": "БританÑÐºÐ°Ñ Ñ‚ÐµÑ€Ñ€Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ Ð² ИндийÑком океане", + "IQ": "Ирак", + "IR": "Иран", + "IS": "ИÑландиÑ", + "IT": "ИталиÑ", + "JE": "ДжерÑи", + "JM": "Ямайка", + "JO": "ИорданиÑ", + "JP": "ЯпониÑ", + "KE": "КениÑ", + "KG": "КиргизиÑ", + "KH": "Камбоджа", + "KI": "Кирибати", + "KM": "Коморы", + "KN": "Сент-ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ", + "KP": "КÐДР", + "KR": "РеÑпублика КореÑ", + "KW": "Кувейт", + "KY": "Каймановы о-ва", + "KZ": "КазахÑтан", + "LA": "ЛаоÑ", + "LB": "Ливан", + "LC": "Сент-ЛюÑиÑ", + "LI": "Лихтенштейн", + "LK": "Шри-Ланка", + "LR": "ЛибериÑ", + "LS": "ЛеÑото", + "LT": "Литва", + "LU": "ЛюкÑембург", + "LV": "ЛатвиÑ", + "LY": "ЛивиÑ", + "MA": "Марокко", + "MC": "Монако", + "MD": "Молдова", + "ME": "ЧерногориÑ", + "MF": "Сен-Мартен", + "MG": "МадагаÑкар", + "MH": "Маршалловы ОÑтрова", + "MK": "МакедониÑ", + "ML": "Мали", + "MM": "МьÑнма (Бирма)", + "MN": "МонголиÑ", + "MO": "Макао (Ñпециальный админиÑтративный район)", + "MP": "Северные МарианÑкие о-ва", + "MQ": "Мартиника", + "MR": "МавританиÑ", + "MS": "МонтÑеррат", + "MT": "Мальта", + "MU": "Маврикий", + "MV": "Мальдивы", + "MW": "Малави", + "MX": "МекÑика", + "MY": "МалайзиÑ", + "MZ": "Мозамбик", + "NA": "ÐамибиÑ", + "NC": "ÐÐ¾Ð²Ð°Ñ ÐšÐ°Ð»ÐµÐ´Ð¾Ð½Ð¸Ñ", + "NE": "Ðигер", + "NF": "о-в Ðорфолк", + "NG": "ÐигериÑ", + "NI": "Ðикарагуа", + "NL": "Ðидерланды", + "NO": "ÐорвегиÑ", + "NP": "Ðепал", + "NR": "Ðауру", + "NU": "ÐиуÑ", + "NZ": "ÐÐ¾Ð²Ð°Ñ Ð—ÐµÐ»Ð°Ð½Ð´Ð¸Ñ", + "OM": "Оман", + "PA": "Панама", + "PE": "Перу", + "PF": "ФранцузÑÐºÐ°Ñ ÐŸÐ¾Ð»Ð¸Ð½ÐµÐ·Ð¸Ñ", + "PG": "Папуа – ÐÐ¾Ð²Ð°Ñ Ð“Ð²Ð¸Ð½ÐµÑ", + "PH": "Филиппины", + "PK": "ПакиÑтан", + "PL": "Польша", + "PM": "Сен-Пьер и Микелон", + "PN": "оÑтрова ПиткÑрн", + "PR": "ПуÑрто-Рико", + "PS": "ПалеÑтинÑкие территории", + "PT": "ПортугалиÑ", + "PW": "Палау", + "PY": "Парагвай", + "QA": "Катар", + "RE": "Реюньон", + "RO": "РумыниÑ", + "RS": "СербиÑ", + "RU": "РоÑÑиÑ", + "RW": "Руанда", + "SA": "СаудовÑÐºÐ°Ñ ÐравиÑ", + "SB": "Соломоновы ОÑтрова", + "SC": "СейшельÑкие ОÑтрова", + "SD": "Судан", + "SE": "ШвециÑ", + "SG": "Сингапур", + "SH": "о-в Св. Елены", + "SI": "СловениÑ", + "SJ": "Шпицберген и Ян-Майен", + "SK": "СловакиÑ", + "SL": "Сьерра-Леоне", + "SM": "Сан-Марино", + "SN": "Сенегал", + "SO": "Сомали", + "SR": "Суринам", + "SS": "Южный Судан", + "ST": "Сан-Томе и ПринÑипи", + "SV": "Сальвадор", + "SX": "Синт-Мартен", + "SY": "СириÑ", + "SZ": "Свазиленд", + "TA": "ТриÑтан-да-КуньÑ", + "TC": "о-ва Ð¢Ñ‘Ñ€ÐºÑ Ð¸ КайкоÑ", + "TD": "Чад", + "TF": "ФранцузÑкие Южные территории", + "TG": "Того", + "TH": "Таиланд", + "TJ": "ТаджикиÑтан", + "TK": "Токелау", + "TL": "ВоÑточный Тимор", + "TM": "ТуркмениÑтан", + "TN": "ТуниÑ", + "TO": "Тонга", + "TR": "ТурциÑ", + "TT": "Тринидад и Тобаго", + "TV": "Тувалу", + "TW": "Тайвань", + "TZ": "ТанзаниÑ", + "UA": "Украина", + "UG": "Уганда", + "UM": "Внешние малые о-ва (СШÐ)", + "UN": "ÐžÑ€Ð³Ð°Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ ÐžÐ±ÑŠÐµÐ´Ð¸Ð½ÐµÐ½Ð½Ñ‹Ñ… Ðаций", + "US": "Соединенные Штаты", + "UY": "Уругвай", + "UZ": "УзбекиÑтан", + "VA": "Ватикан", + "VC": "Сент-ВинÑент и Гренадины", + "VE": "ВенеÑуÑла", + "VG": "ВиргинÑкие о-ва (БританÑкие)", + "VI": "ВиргинÑкие о-ва (СШÐ)", + "VN": "Вьетнам", + "VU": "Вануату", + "WF": "Ð£Ð¾Ð»Ð»Ð¸Ñ Ð¸ Футуна", + "WS": "Самоа", + "XK": "КоÑово", + "YE": "Йемен", + "YT": "Майотта", + "ZA": "ЮÐР", + "ZM": "ЗамбиÑ", + "ZW": "Зимбабве" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ru_UA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ru_UA.json new file mode 100644 index 0000000000000000000000000000000000000000..c0944266b800119ae0ec897efe26355a6865c495 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ru_UA.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.99", + "Names": { + "AC": "О-в ВознеÑениÑ", + "AE": "Объединенные ÐрабÑкие Эмираты", + "CF": "Центрально-ÐфриканÑÐºÐ°Ñ Ð ÐµÑпублика", + "CK": "О-ва Кука", + "CX": "О-в РождеÑтва", + "NF": "О-в Ðорфолк", + "TL": "Тимор-ЛеÑте", + "UM": "Малые ТихоокеанÑкие Отдаленные ОÑтрова СШÐ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/rw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/rw.json new file mode 100644 index 0000000000000000000000000000000000000000..35bd099adcd4403cc2ad5f235416437b9f0cb598 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/rw.json @@ -0,0 +1,7 @@ +{ + "Version": "2.1.27.98", + "Names": { + "RW": "Rwanda", + "TO": "Igitonga" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/se.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/se.json new file mode 100644 index 0000000000000000000000000000000000000000..b3c4724d83c290097550c3c35076dca32ede8dd9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/se.json @@ -0,0 +1,254 @@ +{ + "Version": "2.1.27.98", + "Names": { + "AC": "Ascension", + "AD": "Andorra", + "AE": "Ovttastuvvan Arábaemiráhtat", + "AF": "Afghanistan", + "AG": "Antigua ja Barbuda", + "AI": "Anguilla", + "AL": "Albánia", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antárktis", + "AR": "Argentina", + "AS": "Amerihká Samoa", + "AT": "Nuortariika", + "AU": "Austrália", + "AW": "Aruba", + "AX": "Ã…lánda", + "AZ": "Aserbaižan", + "BA": "Bosnia-Hercegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgia", + "BF": "Burkina Faso", + "BG": "Bulgária", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BR": "Brasil", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Vilges-Ruošša", + "BZ": "Belize", + "CA": "Kanáda", + "CC": "Cocos-sullot", + "CD": "Kongo-Kinshasa", + "CF": "Gaska-Afrihká dásseváldi", + "CG": "Kongo-Brazzaville", + "CH": "Å veica", + "CI": "Elfenbenariddu", + "CK": "Cook-sullot", + "CL": "ÄŒiile", + "CM": "Kamerun", + "CN": "Kiinná", + "CO": "Kolombia", + "CR": "Costa Rica", + "CU": "Kuba", + "CV": "Kap Verde", + "CW": "Curaçao", + "CX": "Juovllat-sullot", + "CY": "Kypros", + "CZ": "ÄŒeahkka", + "DE": "Duiska", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Dánmárku", + "DM": "Dominica", + "DO": "Dominikána dásseváldi", + "DZ": "Algeria", + "EA": "Ceuta ja Melilla", + "EC": "Ecuador", + "EE": "Estlánda", + "EG": "Egypta", + "EH": "Oarje-Sahára", + "ER": "Eritrea", + "ES": "Spánia", + "ET": "Etiopia", + "FI": "Suopma", + "FJ": "Fijisullot", + "FK": "Falklandsullot", + "FM": "Mikronesia", + "FO": "Fearsullot", + "FR": "Frankriika", + "GA": "Gabon", + "GB": "Stuorra-Británnia", + "GD": "Grenada", + "GE": "Georgia", + "GF": "Frankriikka Guayana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Kalaallit Nunaat", + "GM": "Gámbia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Ekvatoriála Guinea", + "GR": "Greika", + "GS": "Lulli Georgia ja Lulli Sandwich-sullot", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hongkong", + "HN": "Honduras", + "HR": "Kroátia", + "HT": "Haiti", + "HU": "Ungár", + "IC": "Kanáriasullot", + "ID": "Indonesia", + "IE": "Irlánda", + "IL": "Israel", + "IM": "Mann-sullot", + "IN": "India", + "IQ": "Irak", + "IR": "Iran", + "IS": "Islánda", + "IT": "Itália", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordánia", + "JP": "Japána", + "KE": "Kenia", + "KG": "Kirgisistan", + "KH": "Kambodža", + "KI": "Kiribati", + "KM": "Komoros", + "KN": "Saint Kitts ja Nevis", + "KP": "Davvi-Korea", + "KR": "Mátta-Korea", + "KW": "Kuwait", + "KY": "Cayman-sullot", + "KZ": "Kasakstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lietuva", + "LU": "Luxembourg", + "LV": "Látvia", + "LY": "Libya", + "MA": "Marokko", + "MC": "Monaco", + "MD": "Moldávia", + "ME": "Montenegro", + "MF": "Frankriikka Saint Martin", + "MG": "Madagaskar", + "MH": "Marshallsullot", + "MK": "Makedonia", + "ML": "Mali", + "MM": "Burma", + "MN": "Mongolia", + "MO": "Makáo", + "MP": "Davvi-Mariánat", + "MQ": "Martinique", + "MR": "Mauretánia", + "MS": "Montserrat", + "MT": "Málta", + "MU": "Mauritius", + "MV": "Malediivvat", + "MW": "Malawi", + "MX": "Meksiko", + "MY": "Malesia", + "MZ": "Mosambik", + "NA": "Namibia", + "NC": "Ođđa-Kaledonia", + "NE": "Niger", + "NF": "Norfolksullot", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Vuolleeatnamat", + "NO": "Norga", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Ođđa-Selánda", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Frankriikka Polynesia", + "PG": "Papua-Ođđa-Guinea", + "PH": "Filippiinnat", + "PK": "Pakistan", + "PL": "Polen", + "PM": "Saint Pierre ja Miquelon", + "PN": "Pitcairn", + "PR": "Puerto Rico", + "PS": "Palestina", + "PT": "Portugála", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Románia", + "RS": "Serbia", + "RU": "Ruošša", + "RW": "Rwanda", + "SA": "Saudi-Arábia", + "SB": "Salomon-sullot", + "SC": "Seychellsullot", + "SD": "Davvisudan", + "SE": "Ruoŧŧa", + "SG": "Singapore", + "SH": "Saint Helena", + "SI": "Slovenia", + "SJ": "Svalbárda ja Jan Mayen", + "SK": "Slovákia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somália", + "SR": "Surinam", + "SS": "Máttasudan", + "ST": "São Tomé ja Príncipe", + "SV": "El Salvador", + "SX": "Vuolleeatnamat Saint Martin", + "SY": "Syria", + "SZ": "Svazieana", + "TA": "Tristan da Cunha", + "TC": "Turks ja Caicos-sullot", + "TD": "TÄad", + "TG": "Togo", + "TH": "Thaieana", + "TJ": "Tažikistan", + "TK": "Tokelau", + "TL": "Nuorta-Timor", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Durka", + "TT": "Trinidad ja Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzánia", + "UA": "Ukraina", + "UG": "Uganda", + "US": "Amerihká ovttastuvvan stáhtat", + "UY": "Uruguay", + "UZ": "Usbekistan", + "VA": "Vatikána", + "VC": "Saint Vincent ja Grenadine", + "VE": "Venezuela", + "VG": "Brittania Virgin-sullot", + "VI": "AOS Virgin-sullot", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis ja Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Mátta-Afrihká", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/se_FI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/se_FI.json new file mode 100644 index 0000000000000000000000000000000000000000..7d772dc329e97b3a342efc42551976482f8b3d11 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/se_FI.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.78", + "Names": { + "BA": "Bosnia ja Hercegovina", + "KH": "Kamboža", + "SD": "Sudan", + "TD": "Chad" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sg.json new file mode 100644 index 0000000000000000000000000000000000000000..61caf0760364aee05b5480dbf96a3f4a10a279c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sg.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AD": "Andôro", + "AE": "Arâbo Emirâti Ôko", + "AF": "Faganïta, Afganïstäan", + "AG": "Antîgua na Barbûda", + "AI": "Angûîla", + "AL": "Albanïi", + "AM": "Armenïi", + "AO": "Angoläa", + "AR": "Arzantîna", + "AS": "Samöa tî Amerîka", + "AT": "Otrîsi", + "AU": "Ostralïi, Sotralïi", + "AW": "Arûba", + "AZ": "Zerebaidyäan, Azerbaidyäan,", + "BA": "Bosnïi na Herzegovînni", + "BB": "Barabâda", + "BD": "Bengladêshi", + "BE": "Bêleze, Belezîki", + "BF": "Burkina Faso", + "BG": "Bulugarïi", + "BH": "Bahrâina", + "BI": "Burundïi", + "BJ": "Benëen", + "BM": "Beremûda", + "BN": "Brunêi", + "BO": "Bolivïi", + "BR": "Brezîli", + "BS": "Bahâmasa", + "BT": "Butäan", + "BW": "Botswana", + "BY": "Belarüsi", + "BZ": "Belîzi", + "CA": "Kanadäa", + "CD": "Ködörösêse tî Ngunuhalëzo tî kongö", + "CF": "Ködörösêse tî Bêafrîka", + "CG": "Kongö", + "CH": "Sûîsi", + "CI": "Kôdivüära", + "CK": "âzûâ Kûku", + "CL": "Shilïi", + "CM": "Kamerûne", + "CN": "Shîna", + "CO": "Kolombïi", + "CR": "Kôsta Rîka", + "CU": "Kubäa", + "CV": "Azûâ tî Kâpo-Vêre", + "CY": "Sîpri", + "CZ": "Ködörösêse tî Tyêki", + "DE": "Zâmani", + "DJ": "Dibutùii", + "DK": "Danemêrke", + "DM": "Dömïnîka", + "DO": "Ködörösêse tî Dominîka", + "DZ": "Alzerïi", + "EC": "Ekuatëre", + "EE": "Estonïi", + "EG": "Kâmitâ", + "ER": "Eritrëe", + "ES": "Espânye", + "ET": "Etiopïi", + "FI": "Fëlânde", + "FJ": "Fidyïi", + "FK": "Âzûâ tî Mälüîni", + "FM": "Mikronezïi", + "FR": "Farânzi", + "GA": "Gaböon", + "GB": "Ködörögbïä--Ôko", + "GD": "Grenâda", + "GE": "Zorzïi", + "GF": "Güyâni tî farânzi", + "GH": "Ganäa", + "GI": "Zibraltära, Zibaratära", + "GL": "Gorolânde", + "GM": "Gambïi", + "GN": "Ginëe", + "GP": "Guadelûpu", + "GQ": "Ginëe tî Ekuatëre", + "GR": "Gerêsi", + "GT": "Guatêmälä", + "GU": "Guâm", + "GW": "Gninëe-Bisau", + "GY": "Gayâna", + "HN": "Honduräsi", + "HR": "Kroasïi", + "HT": "Haitïi", + "HU": "Hongirùii", + "ID": "Ênndonezïi", + "IE": "Irlânde", + "IL": "Israëli", + "IN": "Ênnde", + "IO": "Sêse tî Anglëe na Ngûyämä tî Ênnde", + "IQ": "Irâki", + "IR": "Iräan", + "IS": "Islânde", + "IT": "Italùii", + "JM": "Zamaîka", + "JO": "Zordanïi", + "JP": "Zapöon", + "KE": "Kenyäa", + "KG": "Kirigizitùaan", + "KH": "Kämbôzi", + "KI": "Kiribati", + "KM": "Kömôro", + "KN": "Sên-Krïstôfo-na-Nevîsi", + "KP": "Korëe tî Banga", + "KR": "Korëe tî Mbongo", + "KW": "Köwêti", + "KY": "Âzûâ Ngundë, Kaimäni", + "KZ": "Kazakisitäan", + "LA": "Lùaôsi", + "LB": "Libùaan", + "LC": "Sênt-Lisïi", + "LI": "Liechtenstein,", + "LK": "Sirî-Lanka", + "LR": "Liberïa", + "LS": "Lesôtho", + "LT": "Lituanïi", + "LU": "Lugzambûru", + "LV": "Letonùii", + "LY": "Libïi", + "MA": "Marôko", + "MC": "Monaköo", + "MD": "Moldavùii", + "MG": "Madagaskära", + "MH": "Âzûâ Märshâl", + "MK": "Maseduäni", + "ML": "Malïi", + "MM": "Myämâra", + "MN": "Mongolïi", + "MP": "Âzûâ Märïâni tî Banga", + "MQ": "Märtïnîki", + "MR": "Moritanïi", + "MS": "Monserâte", + "MT": "Mâlta", + "MU": "Mörîsi", + "MV": "Maldîva", + "MW": "Malawïi", + "MX": "Mekisîki", + "MY": "Malezïi", + "MZ": "Mözämbîka", + "NA": "Namibùii", + "NC": "Finî Kaledonïi", + "NE": "Nizëre", + "NF": "Zûâ Nôrfôlko", + "NG": "Nizerïa", + "NI": "Nikaragua", + "NL": "Holände", + "NO": "Nörvêzi", + "NP": "Nëpâli", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Finî Zelânde", + "OM": "Omâni", + "PA": "Panama", + "PE": "Perüu", + "PF": "Polinezïi tî farânzi", + "PG": "Papû Finî Ginëe, Papuazïi", + "PH": "Filipîni", + "PK": "Pakistäan", + "PL": "Pölôni", + "PM": "Sên-Pyêre na Mikelöon", + "PN": "Pitikêrni", + "PR": "Porto Rîko", + "PS": "Sêse tî Palestîni", + "PT": "Pörtugäle, Ködörö Pûra", + "PW": "Palau", + "PY": "Paraguëe", + "QA": "Katära", + "RE": "Reinïon", + "RO": "Rumanïi", + "RU": "Rusïi", + "RW": "Ruandäa", + "SA": "Saûdi Arabïi", + "SB": "Zûâ Salomöon", + "SC": "Sëyshêle", + "SD": "Sudäan", + "SE": "Suêde", + "SG": "Sïngäpûru", + "SH": "Sênt-Helêna", + "SI": "Solovenïi", + "SK": "Solovakïi", + "SL": "Sierä-Leône", + "SM": "Sên-Marëen", + "SN": "Senegäle", + "SO": "Somalïi", + "SR": "Surinäm", + "ST": "Sâô Tömê na Prinsîpe", + "SV": "Salvadöro", + "SY": "Sirïi", + "SZ": "Swäzïlânde", + "TC": "Âzûâ Turku na Kaîki", + "TD": "Tyâde", + "TG": "Togö", + "TH": "Tailânde", + "TJ": "Taazikiistäan", + "TK": "Tokelau", + "TL": "Timôro tî Tö", + "TM": "Turkumenistäan", + "TN": "Tunizïi", + "TO": "Tonga", + "TR": "Turukïi", + "TT": "Trinitùee na Tobagö", + "TV": "Tüvalü", + "TW": "Tâiwâni", + "TZ": "Tanzanïi", + "UA": "Ukrêni", + "UG": "Ugandäa", + "US": "ÂLeaa-Ôko tî Amerika", + "UY": "Uruguëe", + "UZ": "Uzbekistäan", + "VA": "Letëe tî Vatikäan", + "VC": "Sên-Vensäan na âGrenadîni", + "VE": "Venezueläa", + "VG": "Âzôâ Viîrîggo tî Anglëe", + "VI": "Âzûâ Virîgo tî Amerîka", + "VN": "Vietnäm", + "VU": "Vanuatü", + "WF": "Walîsi na Futuna", + "WS": "Samoäa", + "YE": "Yëmêni", + "YT": "Mäyôte", + "ZA": "Mbongo-Afrîka", + "ZM": "Zambïi", + "ZW": "Zimbäbwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sh.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sh.json new file mode 100644 index 0000000000000000000000000000000000000000..cbc505d7c28504cf2cb781d803dda8dc6a7235ed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sh.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.33", + "Names": { + "AC": "Ostrvo Asension", + "AD": "Andora", + "AE": "Ujedinjeni Arapski Emirati", + "AF": "Avganistan", + "AG": "Antigva i Barbuda", + "AI": "Angvila", + "AL": "Albanija", + "AM": "Jermenija", + "AO": "Angola", + "AQ": "Antarktik", + "AR": "Argentina", + "AS": "AmeriÄka Samoa", + "AT": "Austrija", + "AU": "Australija", + "AW": "Aruba", + "AX": "Olandska Ostrva", + "AZ": "Azerbejdžan", + "BA": "Bosna i Hercegovina", + "BB": "Barbados", + "BD": "BangladeÅ¡", + "BE": "Belgija", + "BF": "Burkina Faso", + "BG": "Bugarska", + "BH": "Bahrein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Sen Bartelemi", + "BM": "Bermuda", + "BN": "Brunej", + "BO": "Bolivija", + "BQ": "Karipska Holandija", + "BR": "Brazil", + "BS": "Bahami", + "BT": "Butan", + "BW": "Bocvana", + "BY": "Belorusija", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kokosova (Kilingova) Ostrva", + "CD": "Kongo - KinÅ¡asa", + "CF": "CentralnoafriÄka Republika", + "CG": "Kongo - Brazavil", + "CH": "Å vajcarska", + "CI": "Obala SlonovaÄe", + "CK": "Kukova Ostrva", + "CL": "ÄŒile", + "CM": "Kamerun", + "CN": "Kina", + "CO": "Kolumbija", + "CR": "Kostarika", + "CU": "Kuba", + "CV": "Zelenortska Ostrva", + "CW": "Kurasao", + "CX": "Božićno Ostrvo", + "CY": "Kipar", + "CZ": "ÄŒeÅ¡ka", + "DE": "NemaÄka", + "DG": "Dijego Garsija", + "DJ": "Džibuti", + "DK": "Danska", + "DM": "Dominika", + "DO": "Dominikanska Republika", + "DZ": "Alžir", + "EA": "Seuta i Melilja", + "EC": "Ekvador", + "EE": "Estonija", + "EG": "Egipat", + "EH": "Zapadna Sahara", + "ER": "Eritreja", + "ES": "Å panija", + "ET": "Etiopija", + "FI": "Finska", + "FJ": "Fidži", + "FK": "Foklandska Ostrva", + "FM": "Mikronezija", + "FO": "Farska Ostrva", + "FR": "Francuska", + "GA": "Gabon", + "GB": "Ujedinjeno Kraljevstvo", + "GD": "Grenada", + "GE": "Gruzija", + "GF": "Francuska Gvajana", + "GG": "Gernzi", + "GH": "Gana", + "GI": "Gibraltar", + "GL": "Grenland", + "GM": "Gambija", + "GN": "Gvineja", + "GP": "Gvadelup", + "GQ": "Ekvatorijalna Gvineja", + "GR": "GrÄka", + "GS": "Južna Džordžija i Južna SendviÄka Ostrva", + "GT": "Gvatemala", + "GU": "Guam", + "GW": "Gvineja-Bisao", + "GY": "Gvajana", + "HK": "SAR Hongkong (Kina)", + "HN": "Honduras", + "HR": "Hrvatska", + "HT": "Haiti", + "HU": "MaÄ‘arska", + "IC": "Kanarska Ostrva", + "ID": "Indonezija", + "IE": "Irska", + "IL": "Izrael", + "IM": "Ostrvo Man", + "IN": "Indija", + "IO": "Britanska teritorija Indijskog okeana", + "IQ": "Irak", + "IR": "Iran", + "IS": "Island", + "IT": "Italija", + "JE": "Džerzi", + "JM": "Jamajka", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenija", + "KG": "Kirgistan", + "KH": "Kambodža", + "KI": "Kiribati", + "KM": "Komorska Ostrva", + "KN": "Sent Kits i Nevis", + "KP": "Severna Koreja", + "KR": "Južna Koreja", + "KW": "Kuvajt", + "KY": "Kajmanska Ostrva", + "KZ": "Kazahstan", + "LA": "Laos", + "LB": "Liban", + "LC": "Sveta Lucija", + "LI": "LihtenÅ¡tajn", + "LK": "Å ri Lanka", + "LR": "Liberija", + "LS": "Lesoto", + "LT": "Litvanija", + "LU": "Luksemburg", + "LV": "Letonija", + "LY": "Libija", + "MA": "Maroko", + "MC": "Monako", + "MD": "Moldavija", + "ME": "Crna Gora", + "MF": "Sveti Martin (Francuska)", + "MG": "Madagaskar", + "MH": "MarÅ¡alska Ostrva", + "MK": "Makedonija", + "ML": "Mali", + "MM": "Mijanmar (Burma)", + "MN": "Mongolija", + "MO": "SAR Makao (Kina)", + "MP": "Severna Marijanska Ostrva", + "MQ": "Martinik", + "MR": "Mauritanija", + "MS": "Monserat", + "MT": "Malta", + "MU": "Mauricijus", + "MV": "Maldivi", + "MW": "Malavi", + "MX": "Meksiko", + "MY": "Malezija", + "MZ": "Mozambik", + "NA": "Namibija", + "NC": "Nova Kaledonija", + "NE": "Niger", + "NF": "Ostrvo Norfok", + "NG": "Nigerija", + "NI": "Nikaragva", + "NL": "Holandija", + "NO": "NorveÅ¡ka", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Novi Zeland", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Francuska Polinezija", + "PG": "Papua Nova Gvineja", + "PH": "Filipini", + "PK": "Pakistan", + "PL": "Poljska", + "PM": "Sen Pjer i Mikelon", + "PN": "Pitkern", + "PR": "Portoriko", + "PS": "Palestinske teritorije", + "PT": "Portugalija", + "PW": "Palau", + "PY": "Paragvaj", + "QA": "Katar", + "RE": "Reinion", + "RO": "Rumunija", + "RS": "Srbija", + "RU": "Rusija", + "RW": "Ruanda", + "SA": "Saudijska Arabija", + "SB": "Solomonska Ostrva", + "SC": "SejÅ¡eli", + "SD": "Sudan", + "SE": "Å vedska", + "SG": "Singapur", + "SH": "Sveta Jelena", + "SI": "Slovenija", + "SJ": "Svalbard i Jan Majen", + "SK": "SlovaÄka", + "SL": "Sijera Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalija", + "SR": "Surinam", + "SS": "Južni Sudan", + "ST": "Sao Tome i Principe", + "SV": "Salvador", + "SX": "Sveti Martin (Holandija)", + "SY": "Sirija", + "SZ": "Svazilend", + "TA": "Tristan da Kunja", + "TC": "Ostrva Turks i Kaikos", + "TD": "ÄŒad", + "TF": "Francuske Južne Teritorije", + "TG": "Togo", + "TH": "Tajland", + "TJ": "Tadžikistan", + "TK": "Tokelau", + "TL": "IstoÄni Timor", + "TM": "Turkmenistan", + "TN": "Tunis", + "TO": "Tonga", + "TR": "Turska", + "TT": "Trinidad i Tobago", + "TV": "Tuvalu", + "TW": "Tajvan", + "TZ": "Tanzanija", + "UA": "Ukrajina", + "UG": "Uganda", + "UM": "Udaljena ostrva SAD", + "UN": "Ujedinjene nacije", + "US": "Sjedinjene Države", + "UY": "Urugvaj", + "UZ": "Uzbekistan", + "VA": "Vatikan", + "VC": "Sent Vinsent i Grenadini", + "VE": "Venecuela", + "VG": "Britanska DeviÄanska Ostrva", + "VI": "AmeriÄka DeviÄanska Ostrva", + "VN": "Vijetnam", + "VU": "Vanuatu", + "WF": "Valis i Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Majot", + "ZA": "JužnoafriÄka Republika", + "ZM": "Zambija", + "ZW": "Zimbabve" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sh_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sh_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..863ccb3fba7294831e3afa6132118d7b731926a9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sh_BA.json @@ -0,0 +1,20 @@ +{ + "Version": "2.1.29.33", + "Names": { + "BY": "Bjelorusija", + "CG": "Kongo", + "CI": "Obala SlonovaÄe (Kot d’Ivoar)", + "CV": "Kabo Verde", + "CZ": "ÄŒeÅ¡ka Republika", + "DE": "NjemaÄka", + "KN": "Sveti Kits i Nevis", + "MO": "SAR Makao", + "PM": "Sveti Pjer i Mikelon", + "RE": "Reunion", + "TL": "Timor-Leste (IstoÄni Timor)", + "UM": "Manja udaljena ostrva SAD", + "VC": "Sveti Vinsent i Grenadini", + "VG": "Britanska DjeviÄanska Ostrva", + "VI": "AmeriÄka DjeviÄanska Ostrva" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/si.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/si.json new file mode 100644 index 0000000000000000000000000000000000000000..ddef8a32419319d15b5e9c897d4a44c843faed51 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/si.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "ඇසෙන්ෂන් දිවයින", + "AD": "ඇන්ඩà·à¶»à·à·€", + "AE": "එක්සත් à¶…à¶»à·à¶¶à·’ එමිර් à¶»à·à¶¢à·Šâ€à¶ºà¶º", + "AF": "ඇෆ්ගනිස්ථà·à¶±à¶º", + "AG": "ඇන්ටිගුව෠සහ à¶¶à·à¶¶à·’යුඩà·à·€", + "AI": "ඇන්ගුයිලà·à·€", + "AL": "ඇල්බේනියà·à·€", + "AM": "ආර්මේනියà·à·€", + "AO": "ඇන්ගà·à¶½à·à·€", + "AQ": "ඇන්ටà·à¶šà·Šà¶§à·’à¶šà·à·€", + "AR": "ආර්ජෙන්ටිනà·à·€", + "AS": "ඇමරිකà·à¶±à·” à·ƒà·à¶¸à·à·€à·à·€", + "AT": "ඔස්ට්â€à¶»à·’යà·à·€", + "AU": "ඕස්ට්â€à¶»à·šà¶½à·’යà·à·€", + "AW": "අරුබà·à·€", + "AX": "ඕලන්ඩ් දූපත්", + "AZ": "අසර්බයිජà·à¶±à¶º", + "BA": "බොස්නියà·à·€ සහ හර්සගොවීනà·à·€", + "BB": "à¶¶à·à¶»à·Šà¶¶à¶©à·à·ƒà·Š", + "BD": "බංග්ලà·à¶¯à·šà·à¶º", + "BE": "බෙල්ජියම", + "BF": "බර්කින෠ෆà·à·ƒà·", + "BG": "බල්ගේරියà·à·€", + "BH": "බහරේන්", + "BI": "බුරුන්දි", + "BJ": "බෙනින්", + "BL": "à·à·à¶±à·Šà¶­ බර්තලෙමි", + "BM": "බර්මියුඩà·", + "BN": "බෲනà·à¶ºà·’", + "BO": "බොලීවියà·à·€", + "BQ": "à¶šà·à¶»à·’බියà·à¶±à·” නෙදර්ලන්තය", + "BR": "à¶¶à·Šâ€à¶»à·ƒà·“ලය", + "BS": "බහමà·à·ƒà·Š", + "BT": "à¶·à·–à¶­à·à¶±à¶º", + "BW": "බොට්ස්වà·à¶±à·", + "BY": "බෙලරුස්", + "BZ": "බෙලීස්", + "CA": "à¶šà·à¶±à¶©à·à·€", + "CC": "කොකà·à·ƒà·Š දූපත්", + "CD": "කොංගො - කින්à·à·à·ƒà·", + "CF": "මධ්â€à¶ºà¶¸ à¶…à¶´à·Šâ€à¶»à·’à¶šà·à¶±à·” ජනරජය", + "CG": "කොංගො - à¶¶à·Šâ€à¶»à·ƒà·à·€à·’ල්", + "CH": "ස්විස්ටර්ලන්තය", + "CI": "à¶šà·à¶§à·Š දි අයිවරි", + "CK": "කුක් දූපත්", + "CL": "චිලී", + "CM": "à¶šà·à¶¸à¶»à·–න්", + "CN": "චීනය", + "CO": "කොළොම්බියà·à·€", + "CR": "කොස්ටරිකà·à·€", + "CU": "කියුබà·à·€", + "CV": "à¶šà·šà¶´à·Š වර්ඩ්", + "CW": "කුරකà·à·€à·", + "CX": "à¶šà·Šâ€à¶»à·’ස්මස් දූපත", + "CY": "සයිප්â€à¶»à·ƒà¶º", + "CZ": "චෙක් ජනරජය", + "DE": "ජර්මනිය", + "DG": "දියà·à¶œà· à¶œà·à¶»à·Šà·ƒà·’යà·", + "DJ": "ජිබුටි", + "DK": "ඩෙන්මà·à¶»à·Šà¶šà¶º", + "DM": "ඩොමිනිකà·à·€", + "DO": "ඩොමිනික෠ජනරජය", + "DZ": "ඇල්ජීරියà·à·€", + "EA": "සෙයුට෠සහ මෙලිල්ලà·", + "EC": "ඉක්වදà·à¶»à¶º", + "EE": "එස්තà·à¶±à·’යà·à·€", + "EG": "ඊජිප්තුව", + "EH": "à¶¶à¶§à·„à·’à¶» සහරà·à·€", + "ER": "එරිත්â€à¶»à·’යà·à·€", + "ES": "ස්පà·à¶¤à·Šà¶¤à¶º", + "ET": "ඉතියà·à¶´à·’යà·à·€", + "FI": "ෆින්ලන්තය", + "FJ": "ෆීජී", + "FK": "à·†à·à¶šà·Šà¶½à¶±à·Šà¶­ දූපත්", + "FM": "මයික්â€à¶»à·œà¶±à·“සියà·à·€", + "FO": "à·†à·à¶»à· දූපත්", + "FR": "à¶´à·Šâ€à¶»à¶‚à·à¶º", + "GA": "à¶œà·à¶¶à·œà¶±à·Š", + "GB": "එක්සත් à¶»à·à¶¢à¶°à·à¶±à·’ය", + "GD": "ග්â€à¶»à·à¶±à¶©à·à·€", + "GE": "à¶¢à·à¶»à·Šà¶¢à·’යà·à·€", + "GF": "à¶´à·Šâ€à¶»à¶‚෠ගයනà·à·€", + "GG": "ගර්න්සිය", + "GH": "à¶à·à¶±à·à·€", + "GI": "ජිබ්â€à¶»à·à¶½à·Šà¶§à·à·€", + "GL": "ග්â€à¶»à·“න්ලන්තය", + "GM": "à¶œà·à¶¸à·Šà¶¶à·’යà·à·€", + "GN": "ගිණියà·à·€", + "GP": "ග්වà·à¶©à¶½à·à¶´à·Š", + "GQ": "සමක ගිනියà·à·€", + "GR": "ග්â€à¶»à·“සිය", + "GS": "දකුණු à¶¢à·à¶»à·Šà¶¢à·’යà·à·€ සහ දකුණු à·ƒà·à¶±à·Šà¶©à·Šà·€à·’à¶ à·Š දූපත්", + "GT": "à¶œà·à¶­à¶¸à·à¶½à·à·€", + "GU": "ගුවà·à¶¸à·Š", + "GW": "ගිනි බිසව්", + "GY": "ගයනà·à·€", + "HK": "හොංකොං à¶ à·“à¶± විà·à·šà·‚ පරිපà·à¶½à¶± à¶šà¶½à·à¶´à¶º", + "HN": "හොන්ඩුරà·à·ƒà·Š", + "HR": "à¶šà·Šâ€à¶»à·œà¶’ෂියà·à·€", + "HT": "හයිටි", + "HU": "හන්ගේරියà·à·€", + "IC": "à¶šà·à¶±à¶»à·’ සූපත්", + "ID": "ඉන්දුනීසියà·à·€", + "IE": "අයර්ලන්තය", + "IL": "à¶Šà·à·Šâ€à¶»à·à¶ºà¶½à¶º", + "IM": "අයිල් ඔෆ් මෑන්", + "IN": "ඉන්දියà·à·€", + "IO": "à¶¶à·Šâ€à¶»à·’à¶­à·à¶±à·Šâ€à¶º ඉන්දීය à·ƒà·à¶œà¶» à¶¶à¶½ à¶´à·Šâ€à¶»à¶¯à·šà·à¶º", + "IQ": "ඉරà·à¶šà¶º", + "IR": "ඉරà·à¶±à¶º", + "IS": "අයිස්ලන්තය", + "IT": "ඉතà·à¶½à·’ය", + "JE": "ජර්සි", + "JM": "à¶¢à·à¶¸à·™à¶ºà·’à¶šà·à·€", + "JO": "à¶¢à·à¶»à·Šà¶¯à·à¶±à¶º", + "JP": "ජපà·à¶±à¶º", + "KE": "කෙන්යà·à·€", + "KG": "කිර්ගිස්තà·à¶±à¶º", + "KH": "à¶šà·à¶¸à·Šà¶¶à·à¶¢à¶º", + "KI": "කිරිබති", + "KM": "කොමොරà·à·ƒà·Š", + "KN": "à·à·à¶±à·Šà¶­ කිට්ස් සහ නේවිස්", + "KP": "උතුරු කොරියà·à·€", + "KR": "දකුණු කොරියà·à·€", + "KW": "කුවේටය", + "KY": "කේමන් දූපත්", + "KZ": "කසකස්තà·à¶±à¶º", + "LA": "à¶½à·à¶•සය", + "LB": "ලෙබනනය", + "LC": "à·à·à¶±à·Šà¶­ ලුසියà·", + "LI": "ලික්ටන්ස්ටයින්", + "LK": "à·à·Šâ€à¶»à·“ ලංකà·à·€", + "LR": "ලයිබීරියà·à·€", + "LS": "ලෙසතà·", + "LT": "ලිතුවේනියà·à·€", + "LU": "ලක්à·à¶¸à·Šà¶¶à¶»à·Šà¶œà·Š", + "LV": "à¶½à·à¶§à·Šà·€à·’යà·à·€", + "LY": "ලිබියà·à·€", + "MA": "මොරොක්කà·à·€", + "MC": "මොනà·à¶šà·à·€", + "MD": "මොල්ඩà·à·€à·à·€", + "ME": "මොන්ටෙනීග්â€à¶»à·", + "MF": "à·à·à¶±à·Šà¶­ මà·à¶»à·Šà¶§à·’න්", + "MG": "මà·à¶©à¶œà·ƒà·Šà¶šà¶»à¶º", + "MH": "මà·à·‚ල් දූපත්", + "MK": "මà·à·ƒà·’à¶©à·à¶±à·’යà·à·€", + "ML": "මà·à¶½à·’", + "MM": "මියන්මà·à¶»à¶º (බුරුමය)", + "MN": "මොන්ගà·à¶½à·’යà·à·€", + "MO": "මකà·à·€à·” à¶ à·“à¶± විà·à·šà·‚ පරිපà·à¶½à¶± à¶šà¶½à·à¶´à¶º", + "MP": "උතුරු මරියà·à¶±à· දූපත්", + "MQ": "මර්ටිනික්", + "MR": "මොරිටේනියà·à·€", + "MS": "මොන්සෙරà·à¶§à·Š", + "MT": "මà·à¶½à·Šà¶§à·à·€", + "MU": "මුරුසිය", + "MV": "මà·à¶½ දිවයින", + "MW": "මලà·à·€à·’", + "MX": "මෙක්සිකà·à·€", + "MY": "මà·à¶½à·šà·ƒà·’යà·à·€", + "MZ": "මොසà·à¶¸à·Šà¶¶à·’à¶šà·Š", + "NA": "à¶±à·à¶¸à·“බියà·à·€", + "NC": "නව à¶šà·à¶½à·’à¶©à·à¶±à·’යà·à·€", + "NE": "නයිජර්", + "NF": "à¶±à·à·†à·à¶šà·Š දූපත", + "NG": "නයිජීරියà·à·€", + "NI": "නිකරගුවà·à·€", + "NL": "නෙදර්ලන්තය", + "NO": "à¶±à·à¶»à·Šà·€à·š", + "NP": "නේපà·à¶½à¶º", + "NR": "à¶±à·à·€à·”රු", + "NU": "නියූ", + "NZ": "නවසීලන්තය", + "OM": "ඕමà·à¶±à¶º", + "PA": "à¶´à·à¶±à¶¸à·à·€", + "PE": "පේරු", + "PF": "à¶´à·Šâ€à¶»à¶‚෠පොලිනීසියà·à·€", + "PG": "à¶´à·à¶´à·”ව෠නිව් ගිනියà·à·€", + "PH": "පිලිපීනය", + "PK": "à¶´à·à¶šà·’ස්තà·à¶±à¶º", + "PL": "à¶´à·à¶½à¶±à·Šà¶­à¶º", + "PM": "à·à·à¶±à·Šà¶­ පියරේ සහ මà·à¶šà·à¶½à¶±à·Š", + "PN": "පිට්කෙය්න් දූපත්", + "PR": "පුවර්ට෠රිකà·", + "PS": "පලස්තීන à¶»à·à¶¢à·Šâ€à¶ºà¶º", + "PT": "පෘතුගà·à¶½à¶º", + "PW": "à¶´à¶½à·à·€à·”", + "PY": "à¶´à·à¶»à¶œà·”වේ", + "QA": "à¶šà¶§à·à¶»à·Š", + "RE": "රීයුනියන්", + "RO": "රුමේනියà·à·€", + "RS": "සර්බියà·à·€", + "RU": "රුසියà·à·€", + "RW": "රුවන්ඩà·à·€", + "SA": "සෞදි à¶…à¶»à·à¶¶à·’ය", + "SB": "සොලමන් දූපත්", + "SC": "සීà·à·™à¶½à·Šà·ƒà·Š", + "SD": "සූඩà·à¶±à¶º", + "SE": "ස්වීඩනය", + "SG": "සිංගප්පූරුව", + "SH": "à·à·à¶±à·Šà¶­ හෙලේනà·", + "SI": "ස්ලà·à·€à·šà¶±à·’යà·à·€", + "SJ": "ස්වෙල්බර්ඩ් සහ ජේන් මයේන්", + "SK": "ස්ලà·à·€à·à¶šà·’යà·à·€", + "SL": "සියරà·à¶½à·’යà·à¶±à·Š", + "SM": "à·ƒà·à¶±à·Š මà·à¶»à·’à¶±à·", + "SN": "සෙනගà·à¶½à¶º", + "SO": "à·ƒà·à¶¸à·à¶½à·’යà·à·€", + "SR": "සුරිනà·à¶¸à¶º", + "SS": "දකුණු සුඩà·à¶±à¶º", + "ST": "à·ƒà·à¶• à¶­à·à¶¸à·Š සහ à¶´à·Šâ€à¶»à·’න්සිප්", + "SV": "එල් à·ƒà·à¶½à·Šà·€à¶¯à·à¶»à¶º", + "SX": "à·à·à¶±à·Šà¶­ මà·à¶»à·Šà¶§à·™à¶±à·Š", + "SY": "සිරියà·à·€", + "SZ": "ස්වà·à·ƒà·’ලන්තය", + "TA": "à¶§à·Šâ€à¶»à·’ස්ටන් ද කුන්හà·", + "TC": "ටර්ක්ස් සහ කයිකොස් දූපත්", + "TD": "à¶ à·à¶ à·Š", + "TF": "දකුණු à¶´à·Šâ€à¶»à¶‚෠දූපත් සමූහය", + "TG": "ටොගà·", + "TH": "à¶­à·à¶ºà·’ලන්තය", + "TJ": "ටජිකිස්තà·à¶±à¶º", + "TK": "ටොකලà·à·€à·”", + "TL": "ටිමà·à¶»à·Š - ලෙස්ත්", + "TM": "ටර්ක්මෙනිස්ථà·à¶±à¶º", + "TN": "ටියුනීසියà·à·€", + "TO": "ටොංගà·", + "TR": "තුර්කිය", + "TT": "à¶§à·Šâ€à¶»à·’නිඩෑඩ් සහ ටොබà·à¶œà·", + "TV": "ටුවà·à¶½à·–", + "TW": "à¶­à·à¶ºà·’à·€à·à¶±à¶º", + "TZ": "à¶§à·à¶±à·Šà·ƒà·à¶±à·’යà·à·€", + "UA": "යුක්රේනය", + "UG": "උගන්ඩà·à·€", + "UM": "එක්සත් ජනපද ඈත දූපත්", + "UN": "එක්සත් à¶¢à·à¶­à·“න්", + "US": "එක්සත් ජනපදය", + "UY": "උරුගුවේ", + "UZ": "උස්බෙකිස්ථà·à¶±à¶º", + "VA": "වතිකà·à¶±à·” නගරය", + "VC": "à·à·à¶±à·Šà¶­ වින්සන්ට් සහ ග්â€à¶»à·™à¶±à¶©à·’න්ස්", + "VE": "වෙනිසියුලà·à·€", + "VG": "à¶¶à·Šâ€à¶»à·’à¶­à·à¶±à·Šâ€à¶º වර්ජින් දූපත්", + "VI": "ඇමරිකà·à¶±à·” වර්ජින් දූපත්", + "VN": "වියට්නà·à¶¸à¶º", + "VU": "වනුවà·à¶§à·”", + "WF": "à·€à·à¶½à·’ස් සහ ෆුටුනà·", + "WS": "à·ƒà·à¶¸à·à·€à·", + "XK": "කොසà·à·€à·", + "YE": "යේමනය", + "YT": "මයà·à¶§à·Š", + "ZA": "දකුණු à¶…à¶´à·Šâ€à¶»à·’à¶šà·à·€", + "ZM": "à·ƒà·à¶¸à·Šà¶¶à·’යà·à·€", + "ZW": "සිම්බà·à¶¶à·Šà·€à·š" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sk.json new file mode 100644 index 0000000000000000000000000000000000000000..e82d70fdc995058a248d292909305cf40a882ed1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sk.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Ascension", + "AD": "Andorra", + "AE": "Spojené arabské emiráty", + "AF": "Afganistan", + "AG": "Antigua a Barbuda", + "AI": "Anguilla", + "AL": "Albánsko", + "AM": "Arménsko", + "AO": "Angola", + "AQ": "Antarktída", + "AR": "Argentína", + "AS": "Americká Samoa", + "AT": "Rakúsko", + "AU": "Austrália", + "AW": "Aruba", + "AX": "Alandy", + "AZ": "Azerbajdžan", + "BA": "Bosna a Hercegovina", + "BB": "Barbados", + "BD": "Bangladéš", + "BE": "Belgicko", + "BF": "Burkina Faso", + "BG": "Bulharsko", + "BH": "Bahrajn", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Svätý Bartolomej", + "BM": "Bermudy", + "BN": "Brunej", + "BO": "Bolívia", + "BQ": "Karibské Holandsko", + "BR": "Brazília", + "BS": "Bahamy", + "BT": "Bhután", + "BW": "Botswana", + "BY": "Bielorusko", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kokosové ostrovy", + "CD": "Konžská demokratická republika", + "CF": "Stredoafrická republika", + "CG": "Konžská republika", + "CH": "Å vajÄiarsko", + "CI": "Pobrežie Slonoviny", + "CK": "Cookove ostrovy", + "CL": "ÄŒile", + "CM": "Kamerun", + "CN": "Čína", + "CO": "Kolumbia", + "CR": "Kostarika", + "CU": "Kuba", + "CV": "Kapverdy", + "CW": "Curaçao", + "CX": "VianoÄný ostrov", + "CY": "Cyprus", + "CZ": "ÄŒeská republika", + "DE": "Nemecko", + "DG": "Diego Garcia", + "DJ": "Džibutsko", + "DK": "Dánsko", + "DM": "Dominika", + "DO": "Dominikánska republika", + "DZ": "Alžírsko", + "EA": "Ceuta a Melilla", + "EC": "Ekvádor", + "EE": "Estónsko", + "EG": "Egypt", + "EH": "Západná Sahara", + "ER": "Eritrea", + "ES": "Å panielsko", + "ET": "Etiópia", + "FI": "Fínsko", + "FJ": "Fidži", + "FK": "Falklandy", + "FM": "Mikronézia", + "FO": "Faerské ostrovy", + "FR": "Francúzsko", + "GA": "Gabon", + "GB": "Spojené kráľovstvo", + "GD": "Grenada", + "GE": "Gruzínsko", + "GF": "Francúzska Guayana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltár", + "GL": "Grónsko", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Rovníková Guinea", + "GR": "Grécko", + "GS": "Južná Georgia a Južné Sandwichove ostrovy", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guayana", + "HK": "Hongkong – OAO Číny", + "HN": "Honduras", + "HR": "Chorvátsko", + "HT": "Haiti", + "HU": "MaÄarsko", + "IC": "Kanárske ostrovy", + "ID": "Indonézia", + "IE": "Ãrsko", + "IL": "Izrael", + "IM": "Ostrov Man", + "IN": "India", + "IO": "Britské indickooceánske územie", + "IQ": "Irak", + "IR": "Irán", + "IS": "Island", + "IT": "Taliansko", + "JE": "Jersey", + "JM": "Jamajka", + "JO": "Jordánsko", + "JP": "Japonsko", + "KE": "Keňa", + "KG": "Kirgizsko", + "KH": "Kambodža", + "KI": "Kiribati", + "KM": "Komory", + "KN": "Svätý KriÅ¡tof a Nevis", + "KP": "Severná Kórea", + "KR": "Južná Kórea", + "KW": "Kuvajt", + "KY": "Kajmanie ostrovy", + "KZ": "Kazachstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "Svätá Lucia", + "LI": "LichtenÅ¡tajnsko", + "LK": "Srí Lanka", + "LR": "Libéria", + "LS": "Lesotho", + "LT": "Litva", + "LU": "Luxembursko", + "LV": "LotyÅ¡sko", + "LY": "Líbya", + "MA": "Maroko", + "MC": "Monako", + "MD": "Moldavsko", + "ME": "ÄŒierna Hora", + "MF": "Svätý Martin (fr.)", + "MG": "Madagaskar", + "MH": "Marshallove ostrovy", + "MK": "Macedónsko", + "ML": "Mali", + "MM": "Mjanmarsko", + "MN": "Mongolsko", + "MO": "Macao – OAO Číny", + "MP": "Severné Mariány", + "MQ": "Martinik", + "MR": "Mauritánia", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Maurícius", + "MV": "Maldivy", + "MW": "Malawi", + "MX": "Mexiko", + "MY": "Malajzia", + "MZ": "Mozambik", + "NA": "Namíbia", + "NC": "Nová Kaledónia", + "NE": "Niger", + "NF": "Norfolk", + "NG": "Nigéria", + "NI": "Nikaragua", + "NL": "Holandsko", + "NO": "Nórsko", + "NP": "Nepál", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nový Zéland", + "OM": "Omán", + "PA": "Panama", + "PE": "Peru", + "PF": "Francúzska Polynézia", + "PG": "Papua Nová Guinea", + "PH": "Filipíny", + "PK": "Pakistan", + "PL": "Poľsko", + "PM": "Saint Pierre a Miquelon", + "PN": "Pitcairnove ostrovy", + "PR": "Portoriko", + "PS": "Palestínske územia", + "PT": "Portugalsko", + "PW": "Palau", + "PY": "Paraguaj", + "QA": "Katar", + "RE": "Réunion", + "RO": "Rumunsko", + "RS": "Srbsko", + "RU": "Rusko", + "RW": "Rwanda", + "SA": "Saudská Arábia", + "SB": "Å alamúnove ostrovy", + "SC": "Seychely", + "SD": "Sudán", + "SE": "Å védsko", + "SG": "Singapur", + "SH": "Svätá Helena", + "SI": "Slovinsko", + "SJ": "Svalbard a Jan Mayen", + "SK": "Slovensko", + "SL": "Sierra Leone", + "SM": "San Maríno", + "SN": "Senegal", + "SO": "Somálsko", + "SR": "Surinam", + "SS": "Južný Sudán", + "ST": "Svätý Tomáš a Princov ostrov", + "SV": "Salvádor", + "SX": "Svätý Martin (hol.)", + "SY": "Sýria", + "SZ": "Svazijsko", + "TA": "Tristan da Cunha", + "TC": "Turks a Caicos", + "TD": "ÄŒad", + "TF": "Francúzske južné a antarktické územia", + "TG": "Togo", + "TH": "Thajsko", + "TJ": "Tadžikistan", + "TK": "Tokelau", + "TL": "Východný Timor", + "TM": "Turkménsko", + "TN": "Tunisko", + "TO": "Tonga", + "TR": "Turecko", + "TT": "Trinidad a Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzánia", + "UA": "Ukrajina", + "UG": "Uganda", + "UM": "MenÅ¡ie odľahlé ostrovy USA", + "UN": "OSN", + "US": "Spojené Å¡táty", + "UY": "Uruguaj", + "UZ": "Uzbekistan", + "VA": "Vatikán", + "VC": "Svätý Vincent a Grenadíny", + "VE": "Venezuela", + "VG": "Britské Panenské ostrovy", + "VI": "Americké Panenské ostrovy", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis a Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Južná Afrika", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sl.json new file mode 100644 index 0000000000000000000000000000000000000000..d44225192cbcd64164098bea62cc5af6323dbd8a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sl.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Otok Ascension", + "AD": "Andora", + "AE": "Združeni arabski emirati", + "AF": "Afganistan", + "AG": "Antigva in Barbuda", + "AI": "Angvila", + "AL": "Albanija", + "AM": "Armenija", + "AO": "Angola", + "AQ": "Antarktika", + "AR": "Argentina", + "AS": "AmeriÅ¡ka Samoa", + "AT": "Avstrija", + "AU": "Avstralija", + "AW": "Aruba", + "AX": "Ã…landski otoki", + "AZ": "Azerbajdžan", + "BA": "Bosna in Hercegovina", + "BB": "Barbados", + "BD": "BangladeÅ¡", + "BE": "Belgija", + "BF": "Burkina Faso", + "BG": "Bolgarija", + "BH": "Bahrajn", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermudi", + "BN": "Brunej", + "BO": "Bolivija", + "BQ": "Nizozemski Karibi", + "BR": "Brazilija", + "BS": "Bahami", + "BT": "Butan", + "BW": "Bocvana", + "BY": "Belorusija", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kokosovi otoki", + "CD": "DemokratiÄna republika Kongo", + "CF": "CentralnoafriÅ¡ka republika", + "CG": "Kongo - Brazzaville", + "CH": "Å vica", + "CI": "SlonokoÅ¡Äena obala", + "CK": "Cookovi otoki", + "CL": "ÄŒile", + "CM": "Kamerun", + "CN": "Kitajska", + "CO": "Kolumbija", + "CR": "Kostarika", + "CU": "Kuba", + "CV": "Zelenortski otoki", + "CW": "Curaçao", + "CX": "BožiÄni otok", + "CY": "Ciper", + "CZ": "ÄŒeÅ¡ka", + "DE": "NemÄija", + "DG": "Diego Garcia", + "DJ": "Džibuti", + "DK": "Danska", + "DM": "Dominika", + "DO": "Dominikanska republika", + "DZ": "Alžirija", + "EA": "Ceuta in Melilla", + "EC": "Ekvador", + "EE": "Estonija", + "EG": "Egipt", + "EH": "Zahodna Sahara", + "ER": "Eritreja", + "ES": "Å panija", + "ET": "Etiopija", + "FI": "Finska", + "FJ": "Fidži", + "FK": "Falklandski otoki", + "FM": "Mikronezija", + "FO": "Ferski otoki", + "FR": "Francija", + "GA": "Gabon", + "GB": "Združeno kraljestvo", + "GD": "Grenada", + "GE": "Gruzija", + "GF": "Francoska Gvajana", + "GG": "Guernsey", + "GH": "Gana", + "GI": "Gibraltar", + "GL": "Grenlandija", + "GM": "Gambija", + "GN": "Gvineja", + "GP": "Gvadalupe", + "GQ": "Ekvatorialna Gvineja", + "GR": "GrÄija", + "GS": "Južna Georgia in Južni Sandwichevi otoki", + "GT": "Gvatemala", + "GU": "Guam", + "GW": "Gvineja Bissau", + "GY": "Gvajana", + "HK": "Posebno administrativno obmoÄje LR Kitajske Hongkong", + "HN": "Honduras", + "HR": "HrvaÅ¡ka", + "HT": "Haiti", + "HU": "Madžarska", + "IC": "Kanarski otoki", + "ID": "Indonezija", + "IE": "Irska", + "IL": "Izrael", + "IM": "Otok Man", + "IN": "Indija", + "IO": "Britansko ozemlje v Indijskem oceanu", + "IQ": "Irak", + "IR": "Iran", + "IS": "Islandija", + "IT": "Italija", + "JE": "Jersey", + "JM": "Jamajka", + "JO": "Jordanija", + "JP": "Japonska", + "KE": "Kenija", + "KG": "Kirgizistan", + "KH": "Kambodža", + "KI": "Kiribati", + "KM": "Komori", + "KN": "Saint Kitts in Nevis", + "KP": "Severna Koreja", + "KR": "Južna Koreja", + "KW": "Kuvajt", + "KY": "Kajmanski otoki", + "KZ": "Kazahstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "Saint Lucia", + "LI": "LihtenÅ¡tajn", + "LK": "Å rilanka", + "LR": "Liberija", + "LS": "Lesoto", + "LT": "Litva", + "LU": "Luksemburg", + "LV": "Latvija", + "LY": "Libija", + "MA": "Maroko", + "MC": "Monako", + "MD": "Moldavija", + "ME": "ÄŒrna gora", + "MF": "Saint Martin", + "MG": "Madagaskar", + "MH": "Marshallovi otoki", + "MK": "Makedonija", + "ML": "Mali", + "MM": "Mjanmar (Burma)", + "MN": "Mongolija", + "MO": "Posebno administrativno obmoÄje LR Kitajske Macao", + "MP": "Severni Marianski otoki", + "MQ": "Martinik", + "MR": "Mavretanija", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldivi", + "MW": "Malavi", + "MX": "Mehika", + "MY": "Malezija", + "MZ": "Mozambik", + "NA": "Namibija", + "NC": "Nova Kaledonija", + "NE": "Niger", + "NF": "NorfolÅ¡ki otok", + "NG": "Nigerija", + "NI": "Nikaragva", + "NL": "Nizozemska", + "NO": "NorveÅ¡ka", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nova Zelandija", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Francoska Polinezija", + "PG": "Papua Nova Gvineja", + "PH": "Filipini", + "PK": "Pakistan", + "PL": "Poljska", + "PM": "Saint Pierre in Miquelon", + "PN": "Pitcairn", + "PR": "Portoriko", + "PS": "Palestinsko ozemlje", + "PT": "Portugalska", + "PW": "Palau", + "PY": "Paragvaj", + "QA": "Katar", + "RE": "Reunion", + "RO": "Romunija", + "RS": "Srbija", + "RU": "Rusija", + "RW": "Ruanda", + "SA": "Saudova Arabija", + "SB": "Salomonovi otoki", + "SC": "SejÅ¡eli", + "SD": "Sudan", + "SE": "Å vedska", + "SG": "Singapur", + "SH": "Sveta Helena", + "SI": "Slovenija", + "SJ": "Svalbard in Jan Mayen", + "SK": "SlovaÅ¡ka", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalija", + "SR": "Surinam", + "SS": "Južni Sudan", + "ST": "Sao Tome in Principe", + "SV": "Salvador", + "SX": "Sint Maarten", + "SY": "Sirija", + "SZ": "Svazi", + "TA": "Tristan da Cunha", + "TC": "Otoki Turks in Caicos", + "TD": "ÄŒad", + "TF": "Francosko južno ozemlje", + "TG": "Togo", + "TH": "Tajska", + "TJ": "Tadžikistan", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turkmenistan", + "TN": "Tunizija", + "TO": "Tonga", + "TR": "TurÄija", + "TT": "Trinidad in Tobago", + "TV": "Tuvalu", + "TW": "Tajvan", + "TZ": "Tanzanija", + "UA": "Ukrajina", + "UG": "Uganda", + "UM": "Stranski zunanji otoki Združenih držav", + "UN": "Združeni narodi", + "US": "Združene države Amerike", + "UY": "Urugvaj", + "UZ": "Uzbekistan", + "VA": "Vatikan", + "VC": "Saint Vincent in Grenadine", + "VE": "Venezuela", + "VG": "Britanski DeviÅ¡ki otoki", + "VI": "AmeriÅ¡ki DeviÅ¡ki otoki", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis in Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "JužnoafriÅ¡ka republika", + "ZM": "Zambija", + "ZW": "Zimbabve" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sn.json new file mode 100644 index 0000000000000000000000000000000000000000..81bb30b4126bf9c1cadea999eaf3b493eae8f424 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sn.json @@ -0,0 +1,228 @@ +{ + "Version": "2.1.27.98", + "Names": { + "AD": "Andora", + "AE": "United Arab Emirates", + "AF": "Afuganistani", + "AG": "Antigua ne Barbuda", + "AI": "Anguila", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AR": "Ajentina", + "AS": "Samoa ye Amerika", + "AT": "Austria", + "AU": "Australia", + "AW": "Arubha", + "AZ": "Azabajani", + "BA": "Boznia ne Herzegovina", + "BB": "Barbados", + "BD": "Bangladeshi", + "BE": "Beljium", + "BF": "Bukinafaso", + "BG": "Bulgaria", + "BH": "Bahareni", + "BI": "Burundi", + "BJ": "Benini", + "BM": "Bermuda", + "BN": "Burunei", + "BO": "Bolivia", + "BR": "Brazil", + "BS": "Bahama", + "BT": "Bhutani", + "BW": "Botswana", + "BY": "Belarusi", + "BZ": "Belize", + "CA": "Kanada", + "CD": "Democratic Republic of the Congo", + "CF": "Central African Republic", + "CG": "Kongo", + "CH": "Switzerland", + "CI": "Ivory Coast", + "CK": "Zvitsuwa zveCook", + "CL": "Chile", + "CM": "Kameruni", + "CN": "China", + "CO": "Kolombia", + "CR": "Kostarika", + "CU": "Cuba", + "CV": "Zvitsuwa zveCape Verde", + "CY": "Cyprus", + "CZ": "Czech Republic", + "DE": "Germany", + "DJ": "Djibouti", + "DK": "Denmark", + "DM": "Dominica", + "DO": "Dominican Republic", + "DZ": "Aljeria", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Egypt", + "ER": "Eritrea", + "ES": "Spain", + "ET": "Etiopia", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Zvitsuwa zveFalklands", + "FM": "Micronesia", + "FR": "France", + "GA": "Gabon", + "GB": "United Kingdom", + "GD": "Grenada", + "GE": "Georgia", + "GF": "French Guiana", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Greenland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Equatorial Guinea", + "GR": "Greece", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HN": "Honduras", + "HR": "Korasia", + "HT": "Haiti", + "HU": "Hungary", + "ID": "Indonesia", + "IE": "Ireland", + "IL": "Izuraeri", + "IN": "India", + "IO": "British Indian Ocean Territory", + "IQ": "Iraq", + "IR": "Iran", + "IS": "Iceland", + "IT": "Italy", + "JM": "Jamaica", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenya", + "KG": "Kyrgyzstan", + "KH": "Kambodia", + "KI": "Kiribati", + "KM": "Komoro", + "KN": "Saint Kitts and Nevis", + "KP": "Korea, North", + "KR": "Korea, South", + "KW": "Kuwait", + "KY": "Zvitsuwa zveCayman", + "KZ": "Kazakhstan", + "LA": "Laos", + "LB": "Lebanon", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lithuania", + "LU": "Luxembourg", + "LV": "Latvia", + "LY": "Libya", + "MA": "Morocco", + "MC": "Monaco", + "MD": "Moldova", + "MG": "Madagascar", + "MH": "Zvitsuwa zveMarshall", + "MK": "Macedonia", + "ML": "Mali", + "MM": "Myanmar", + "MN": "Mongolia", + "MP": "Zvitsuwa zvekumaodzanyemba eMariana", + "MQ": "Martinique", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldives", + "MW": "Malawi", + "MX": "Mexico", + "MY": "Malaysia", + "MZ": "Mozambique", + "NA": "Namibia", + "NC": "New Caledonia", + "NE": "Niger", + "NF": "Chitsuwa cheNorfolk", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Netherlands", + "NO": "Norway", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "New Zealand", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "French Polynesia", + "PG": "Papua New Guinea", + "PH": "Philippines", + "PK": "Pakistan", + "PL": "Poland", + "PM": "Saint Pierre and Miquelon", + "PN": "Pitcairn", + "PR": "Puerto Rico", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Romania", + "RU": "Russia", + "RW": "Rwanda", + "SA": "Saudi Arabia", + "SB": "Zvitsuwa zvaSolomon", + "SC": "Seychelles", + "SD": "Sudan", + "SE": "Sweden", + "SG": "Singapore", + "SH": "Saint Helena", + "SI": "Slovenia", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "ST": "São Tomé and Príncipe", + "SV": "El Salvador", + "SY": "Syria", + "SZ": "Swaziland", + "TC": "Zvitsuwa zveTurk neCaico", + "TD": "Chadi", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tajikistan", + "TK": "Tokelau", + "TL": "East Timor", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Turkey", + "TT": "Trinidad and Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraine", + "UG": "Uganda", + "US": "Amerika", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VA": "Vatican State", + "VC": "Saint Vincent and the Grenadines", + "VE": "Venezuela", + "VG": "Zvitsuwa zveHingirandi", + "VI": "Zvitsuwa zveAmerika", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis and Futuna", + "WS": "Samoa", + "YE": "Yemen", + "YT": "Mayotte", + "ZA": "South Africa", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/so.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/so.json new file mode 100644 index 0000000000000000000000000000000000000000..2afc55359082b84268edaaa11dd1f17fa355e8fc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/so.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.78", + "Names": { + "AD": "Andora", + "AE": "Imaaraadka Carabta ee Midoobay", + "AF": "Afgaanistaan", + "AG": "Antigua iyo Barbuda", + "AI": "Anguilla", + "AL": "Albaaniya", + "AM": "Armeeniya", + "AO": "Angoola", + "AR": "Arjantiin", + "AS": "Samowa Ameerika", + "AT": "Awsteriya", + "AU": "Awstaraaliya", + "AW": "Aruba", + "AZ": "Azerbajaan", + "BA": "Bosniya Hersigoviina", + "BB": "Baarbadoos", + "BD": "Bangaaladheesh", + "BE": "Biljam", + "BF": "Burkiina Faaso", + "BG": "Bulgaariya", + "BH": "Baxreyn", + "BI": "Burundi", + "BJ": "Biniin", + "BM": "Bermuuda", + "BN": "Buruneeya", + "BO": "Boliifiya", + "BR": "Braasiil", + "BS": "Bahaamas", + "BT": "Bhutan", + "BW": "Botuswaana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Kanada", + "CD": "Jamhuuriyadda Dimuquraadiga Kongo", + "CF": "Jamhuuriyadda Afrikada Dhexe", + "CG": "Kongo", + "CH": "Swiiserlaand", + "CI": "Ivory coast", + "CK": "Jaziiradda Cook", + "CL": "Jili", + "CM": "Kaameruun", + "CN": "Shiinaha", + "CO": "Kolombiya", + "CR": "Kosta Riika", + "CU": "Kuuba", + "CV": "Cape Verde Islands", + "CY": "Qubrus", + "CZ": "Jamhuuriyadda Jek", + "DE": "Jarmal", + "DJ": "Jabuuti", + "DK": "Denmark", + "DM": "Domeenika", + "DO": "Jamhuuriyadda Domeenika", + "DZ": "Aljeeriya", + "EC": "Ikuwadoor", + "EE": "Estooniya", + "EG": "Masar", + "ER": "Eretereeya", + "ES": "Isbeyn", + "ET": "Itoobiya", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Jaziiradaha Fooklaan", + "FM": "Micronesia", + "FR": "Faransiis", + "GA": "Gaaboon", + "GB": "United Kingdom", + "GD": "Giriinaada", + "GE": "Joorjiya", + "GF": "French Guiana", + "GH": "Gaana", + "GI": "Gibraltar", + "GL": "Greenland", + "GM": "Gambiya", + "GN": "Gini", + "GP": "Guadeloupe", + "GQ": "Equatorial Guinea", + "GR": "Giriig", + "GT": "Guwaatamaala", + "GU": "Guam", + "GW": "Gini-Bisaaw", + "GY": "Guyana", + "HN": "Honduras", + "HR": "Korweeshiya", + "HT": "Hayti", + "HU": "Hangeri", + "ID": "Indoneesiya", + "IE": "Ayrlaand", + "IL": "Israaʼiil", + "IN": "Hindiya", + "IO": "British Indian Ocean Territory", + "IQ": "Ciraaq", + "IR": "Iiraan", + "IS": "Iislaand", + "IT": "Talyaani", + "JM": "Jameyka", + "JO": "Urdun", + "JP": "Jabaan", + "KE": "Kiiniya", + "KG": "Kirgistaan", + "KH": "Kamboodiya", + "KI": "Kiribati", + "KM": "Komooros", + "KN": "Saint Kitts and Nevis", + "KP": "Kuuriyada Waqooyi", + "KR": "Kuuriyada Koonfureed", + "KW": "Kuwayt", + "KY": "Cayman Islands", + "KZ": "Kasaakhistaan", + "LA": "Laos", + "LB": "Lubnaan", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sirilaanka", + "LR": "Laybeeriya", + "LS": "Losooto", + "LT": "Lituweeniya", + "LU": "Luksemboorg", + "LV": "Latfiya", + "LY": "Liibiya", + "MA": "Marooko", + "MC": "Moonako", + "MD": "Moldofa", + "MG": "Madagaskar", + "MH": "Marshall Islands", + "MK": "Makadooniya", + "ML": "Maali", + "MM": "Miyanmar", + "MN": "Mongooliya", + "MP": "Northern Mariana Islands", + "MQ": "Martinique", + "MR": "Muritaaniya", + "MS": "Montserrat", + "MT": "Maalda", + "MU": "Murishiyoos", + "MV": "Maaldiqeen", + "MW": "Malaawi", + "MX": "Meksiko", + "MY": "Malaysia", + "MZ": "Musambiig", + "NA": "Namiibiya", + "NC": "New Caledonia", + "NE": "Nayjer", + "NF": "Norfolk Island", + "NG": "Nayjeeriya", + "NI": "Nikaraaguwa", + "NL": "Netherlands", + "NO": "Noorweey", + "NP": "Nebaal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Neyuusilaand", + "OM": "Cumaan", + "PA": "Panama", + "PE": "Peru", + "PF": "French Polynesia", + "PG": "Papua New Guinea", + "PH": "Filibiin", + "PK": "Bakistaan", + "PL": "Booland", + "PM": "Saint Pierre and Miquelon", + "PN": "Pitcairn", + "PR": "Puerto Rico", + "PS": "Falastiin Daanka galbeed iyo Qasa", + "PT": "Bortuqaal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qadar", + "RE": "Réunion", + "RO": "Rumaaniya", + "RU": "Ruush", + "RW": "Ruwanda", + "SA": "Sacuudi Carabiya", + "SB": "Solomon Islands", + "SC": "Sishelis", + "SD": "Suudaan", + "SE": "Iswidhan", + "SG": "Singaboor", + "SH": "Saint Helena", + "SI": "Slovenia", + "SK": "Slovakia", + "SL": "Siraaliyoon", + "SM": "San Marino", + "SN": "Sinigaal", + "SO": "Soomaaliya", + "SR": "Suriname", + "ST": "São Tomé and Príncipe", + "SV": "El Salvador", + "SY": "Suuriya", + "SZ": "Iswaasilaand", + "TC": "Turks and Caicos Islands", + "TD": "Jaad", + "TG": "Toogo", + "TH": "Taylaand", + "TJ": "Tajikistan", + "TK": "Tokelau", + "TL": "Timorka bari", + "TM": "Turkmenistan", + "TN": "Tuniisiya", + "TO": "Tonga", + "TR": "Turki", + "TT": "Trinidad and Tobago", + "TV": "Tuvalu", + "TW": "Taywaan", + "TZ": "Tansaaniya", + "UA": "Ukrayn", + "UG": "Ugaanda", + "US": "Maraykanka", + "UY": "Uruguwaay", + "UZ": "Uusbakistaan", + "VA": "Faatikaan", + "VC": "Saint Vincent and the Grenadines", + "VE": "Fenisuweela", + "VG": "British Virgin Islands", + "VI": "U.S. Virgin Islands", + "VN": "Fiyetnaam", + "VU": "Vanuatu", + "WF": "Wallis and Futuna", + "WS": "Samoa", + "YE": "Yaman", + "YT": "Mayotte", + "ZA": "Koonfur Afrika", + "ZM": "Saambiya", + "ZW": "Simbaabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sq.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sq.json new file mode 100644 index 0000000000000000000000000000000000000000..197f931977dd4a018e2bb70c42ce514b626b9ee7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sq.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Ishulli Asenshion", + "AD": "Andorrë", + "AE": "Emiratet e Bashkuara Arabe", + "AF": "Afganistan", + "AG": "Antigua e Barbuda", + "AI": "Anguilë", + "AL": "Shqipëri", + "AM": "Armeni", + "AO": "Angolë", + "AQ": "Antarktikë", + "AR": "Argjentinë", + "AS": "Samoa Amerikane", + "AT": "Austri", + "AU": "Australi", + "AW": "Arubë", + "AX": "Ishujt Alandë", + "AZ": "Azerbajxhan", + "BA": "Bosnjë-Hercegovinë", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgjikë", + "BF": "Burkina-Faso", + "BG": "Bullgari", + "BH": "Bahrejn", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Shën Bartolomeu", + "BM": "Bermudë", + "BN": "Brunei", + "BO": "Bolivi", + "BQ": "Karaibet holandeze", + "BR": "Brazil", + "BS": "Bahamas", + "BT": "Butan", + "BW": "Botsvanë", + "BY": "Bjellorusi", + "BZ": "Belizë", + "CA": "Kanada", + "CC": "Ishujt Kokos", + "CD": "Kongo-Kinshasa", + "CF": "Repubika e Afrikës Qendrore", + "CG": "Kongo-Brazavilë", + "CH": "Zvicër", + "CI": "Côte d’Ivoire", + "CK": "Ishujt Kuk", + "CL": "Kili", + "CM": "Kamerun", + "CN": "Kinë", + "CO": "Kolumbi", + "CR": "Kosta-Rikë", + "CU": "Kubë", + "CV": "Kepi i Gjelbër", + "CW": "Kuraçao", + "CX": "Ishulli i Krishtlindjes", + "CY": "Qipro", + "CZ": "Republika Çeke", + "DE": "Gjermani", + "DG": "Diego-Garsia", + "DJ": "Xhibuti", + "DK": "Danimarkë", + "DM": "Dominikë", + "DO": "Republika Dominikane", + "DZ": "Algjeri", + "EA": "Theuta e Melila", + "EC": "Ekuador", + "EE": "Estoni", + "EG": "Egjipt", + "EH": "Saharaja Perëndimore", + "ER": "Eritre", + "ES": "Spanjë", + "ET": "Etiopi", + "FI": "Finlandë", + "FJ": "Fixhi", + "FK": "Ishujt Falkland", + "FM": "Mikronezi", + "FO": "Ishujt Faroe", + "FR": "Francë", + "GA": "Gabon", + "GB": "Mbretëria e Bashkuar", + "GD": "Grenadë", + "GE": "Gjeorgji", + "GF": "Guajana Franceze", + "GG": "Gernsej", + "GH": "Ganë", + "GI": "Gjibraltar", + "GL": "Grenlandë", + "GM": "Gambia", + "GN": "Guine", + "GP": "Guadalupe", + "GQ": "Guineja Ekuatoriale", + "GR": "Greqi", + "GS": "Xhorxha Jugore dhe Ishujt Senduiçë të Jugut", + "GT": "Guatemalë", + "GU": "Guam", + "GW": "Guine-Bisau", + "GY": "Guajanë", + "HK": "RVAK i Hong Kongut", + "HN": "Honduras", + "HR": "Kroaci", + "HT": "Haiti", + "HU": "Hungari", + "IC": "Ishujt Kanarie", + "ID": "Indonezi", + "IE": "Irlandë", + "IL": "Izrael", + "IM": "Ishulli i Manit", + "IN": "Indi", + "IO": "Territori Britanik i Oqeanit Indian", + "IQ": "Irak", + "IR": "Iran", + "IS": "Islandë", + "IT": "Itali", + "JE": "Xhersej", + "JM": "Xhamajkë", + "JO": "Jordani", + "JP": "Japoni", + "KE": "Kenia", + "KG": "Kirgistan", + "KH": "Kamboxhia", + "KI": "Kiribati", + "KM": "Komore", + "KN": "Shën Kits dhe Nevis", + "KP": "Koreja e Veriut", + "KR": "Koreja e Jugut", + "KW": "Kuvajt", + "KY": "Ishujt Kajman", + "KZ": "Kazakistan", + "LA": "Laos", + "LB": "Liban", + "LC": "Shën-Luçia", + "LI": "Lihtenshtajn", + "LK": "Sri-Lankë", + "LR": "Liberi", + "LS": "Lesoto", + "LT": "Lituani", + "LU": "Luksemburg", + "LV": "Letoni", + "LY": "Libi", + "MA": "Marok", + "MC": "Monako", + "MD": "Moldavi", + "ME": "Mal i Zi", + "MF": "Shën-Martin", + "MG": "Madagaskar", + "MH": "Ishujt Marshall", + "MK": "Maqedoni", + "ML": "Mali", + "MM": "Mianmar (Burma)", + "MN": "Mongoli", + "MO": "RVAK i Makaos", + "MP": "Ishujt e Marianës Veriore", + "MQ": "Martinikë", + "MR": "Mauritani", + "MS": "Montserat", + "MT": "Maltë", + "MU": "Mauritius", + "MV": "Maldive", + "MW": "Malavi", + "MX": "Meksikë", + "MY": "Malajzi", + "MZ": "Mozambik", + "NA": "Namibi", + "NC": "Kaledonia e Re", + "NE": "Niger", + "NF": "Ishulli Norfolk", + "NG": "Nigeri", + "NI": "Nikaragua", + "NL": "Holandë", + "NO": "Norvegji", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Zelandë e Re", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Polinezia Franceze", + "PG": "Papua Guineja e Re", + "PH": "Filipine", + "PK": "Pakistan", + "PL": "Poloni", + "PM": "Shën Pier dhe Mikelon", + "PN": "Ishujt Pitkern", + "PR": "Porto-Riko", + "PS": "Territoret Palestineze", + "PT": "Portugali", + "PW": "Palau", + "PY": "Paraguai", + "QA": "Katar", + "RE": "Reunion", + "RO": "Rumani", + "RS": "Serbi", + "RU": "Rusi", + "RW": "Ruandë", + "SA": "Arabia Saudite", + "SB": "Ishujt Solomon", + "SC": "Sejshelle", + "SD": "Sudan", + "SE": "Suedi", + "SG": "Singapor", + "SH": "Shën-Helenë", + "SI": "Slloveni", + "SJ": "Svalbard e Jan-Majen", + "SK": "Sllovaki", + "SL": "Siera-Leone", + "SM": "San-Marino", + "SN": "Senegal", + "SO": "Somali", + "SR": "Surinami", + "SS": "Sudani i Jugut", + "ST": "Sao-Tome e Prinsipe", + "SV": "Salvador", + "SX": "Sint Marten", + "SY": "Siri", + "SZ": "Svazilandë", + "TA": "Tristan-da-Kuna", + "TC": "Ishujt Turks dhe Kaikos", + "TD": "Çad", + "TF": "Territoret Jugore Franceze", + "TG": "Togo", + "TH": "Tajlandë", + "TJ": "Taxhikistan", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turkmenistan", + "TN": "Tunizi", + "TO": "Tonga", + "TR": "Turqi", + "TT": "Trinidad e Tobago", + "TV": "Tuvalu", + "TW": "Tajvan", + "TZ": "Tanzani", + "UA": "Ukrainë", + "UG": "Ugandë", + "UM": "Ishujt periferikë të SHBA-së", + "UN": "kombet e bashkuara", + "US": "Shtetet e Bashkuara të Amerikës", + "UY": "Uruguai", + "UZ": "Uzbekistan", + "VA": "Vatikan", + "VC": "Shën Vincent dhe Grenadine", + "VE": "Venezuelë", + "VG": "Ishujt e Virgjër Britanikë", + "VI": "Ishujt e Virgjër Amerikanë", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Uollis e Futuna", + "WS": "Samoa", + "XK": "Kosovë", + "YE": "Jemen", + "YT": "Majotë", + "ZA": "Afrika e Jugut", + "ZM": "Zambia", + "ZW": "Zimbabve" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr.json new file mode 100644 index 0000000000000000000000000000000000000000..ac4549f2c05b282838f9312b5bc318d4eef4aa1b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "ОÑтрво ÐÑенÑион", + "AD": "Ðндора", + "AE": "Уједињени ÐрапÑки Емирати", + "AF": "ÐвганиÑтан", + "AG": "Ðнтигва и Барбуда", + "AI": "Ðнгвила", + "AL": "Ðлбанија", + "AM": "Јерменија", + "AO": "Ðнгола", + "AQ": "Ðнтарктик", + "AR": "Ðргентина", + "AS": "Ðмеричка Самоа", + "AT": "ÐуÑтрија", + "AU": "ÐуÑтралија", + "AW": "Ðруба", + "AX": "ОландÑка ОÑтрва", + "AZ": "Ðзербејџан", + "BA": "БоÑна и Херцеговина", + "BB": "БарбадоÑ", + "BD": "Бангладеш", + "BE": "Белгија", + "BF": "Буркина ФаÑо", + "BG": "БугарÑка", + "BH": "Бахреин", + "BI": "Бурунди", + "BJ": "Бенин", + "BL": "Сен Бартелеми", + "BM": "Бермуда", + "BN": "Брунеј", + "BO": "Боливија", + "BQ": "КарипÑка Холандија", + "BR": "Бразил", + "BS": "Бахами", + "BT": "Бутан", + "BW": "Боцвана", + "BY": "БелоруÑија", + "BZ": "Белизе", + "CA": "Канада", + "CC": "КокоÑова (Килингова) ОÑтрва", + "CD": "Конго - КиншаÑа", + "CF": "Централноафричка Република", + "CG": "Конго - Бразавил", + "CH": "ШвајцарÑка", + "CI": "Обала Слоноваче", + "CK": "Кукова ОÑтрва", + "CL": "Чиле", + "CM": "Камерун", + "CN": "Кина", + "CO": "Колумбија", + "CR": "КоÑтарика", + "CU": "Куба", + "CV": "ЗеленортÑка ОÑтрва", + "CW": "КураÑао", + "CX": "Божићно ОÑтрво", + "CY": "Кипар", + "CZ": "Чешка", + "DE": "Ðемачка", + "DG": "Дијего ГарÑија", + "DJ": "Ðибути", + "DK": "ДанÑка", + "DM": "Доминика", + "DO": "ДоминиканÑка Република", + "DZ": "Ðлжир", + "EA": "Сеута и Мелиља", + "EC": "Еквадор", + "EE": "ЕÑтонија", + "EG": "Египат", + "EH": "Западна Сахара", + "ER": "Еритреја", + "ES": "Шпанија", + "ET": "Етиопија", + "FI": "ФинÑка", + "FJ": "Фиџи", + "FK": "ФокландÑка ОÑтрва", + "FM": "Микронезија", + "FO": "ФарÑка ОÑтрва", + "FR": "ФранцуÑка", + "GA": "Габон", + "GB": "Уједињено КраљевÑтво", + "GD": "Гренада", + "GE": "Грузија", + "GF": "ФранцуÑка Гвајана", + "GG": "Гернзи", + "GH": "Гана", + "GI": "Гибралтар", + "GL": "Гренланд", + "GM": "Гамбија", + "GN": "Гвинеја", + "GP": "Гваделуп", + "GQ": "Екваторијална Гвинеја", + "GR": "Грчка", + "GS": "Јужна Ðорџија и Јужна Сендвичка ОÑтрва", + "GT": "Гватемала", + "GU": "Гуам", + "GW": "Гвинеја-БиÑао", + "GY": "Гвајана", + "HK": "СÐР Хонгконг (Кина)", + "HN": "ХондураÑ", + "HR": "ХрватÑка", + "HT": "Хаити", + "HU": "МађарÑка", + "IC": "КанарÑка ОÑтрва", + "ID": "Индонезија", + "IE": "ИрÑка", + "IL": "Израел", + "IM": "ОÑтрво Ман", + "IN": "Индија", + "IO": "БританÑка територија ИндијÑког океана", + "IQ": "Ирак", + "IR": "Иран", + "IS": "ИÑланд", + "IT": "Италија", + "JE": "Ðерзи", + "JM": "Јамајка", + "JO": "Јордан", + "JP": "Јапан", + "KE": "Кенија", + "KG": "КиргиÑтан", + "KH": "Камбоџа", + "KI": "Кирибати", + "KM": "КоморÑка ОÑтрва", + "KN": "Сент ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ", + "KP": "Северна Кореја", + "KR": "Јужна Кореја", + "KW": "Кувајт", + "KY": "КајманÑка ОÑтрва", + "KZ": "КазахÑтан", + "LA": "ЛаоÑ", + "LB": "Либан", + "LC": "Света Луција", + "LI": "Лихтенштајн", + "LK": "Шри Ланка", + "LR": "Либерија", + "LS": "ЛеÑото", + "LT": "Литванија", + "LU": "ЛукÑембург", + "LV": "Летонија", + "LY": "Либија", + "MA": "Мароко", + "MC": "Монако", + "MD": "Молдавија", + "ME": "Црна Гора", + "MF": "Свети Мартин (ФранцуÑка)", + "MG": "МадагаÑкар", + "MH": "МаршалÑка ОÑтрва", + "MK": "Македонија", + "ML": "Мали", + "MM": "Мијанмар (Бурма)", + "MN": "Монголија", + "MO": "СÐР Макао (Кина)", + "MP": "Северна МаријанÑка ОÑтрва", + "MQ": "Мартиник", + "MR": "Мауританија", + "MS": "МонÑерат", + "MT": "Малта", + "MU": "МаурицијуÑ", + "MV": "Малдиви", + "MW": "Малави", + "MX": "МекÑико", + "MY": "Малезија", + "MZ": "Мозамбик", + "NA": "Ðамибија", + "NC": "Ðова Каледонија", + "NE": "Ðигер", + "NF": "ОÑтрво Ðорфок", + "NG": "Ðигерија", + "NI": "Ðикарагва", + "NL": "Холандија", + "NO": "Ðорвешка", + "NP": "Ðепал", + "NR": "Ðауру", + "NU": "Ðиуе", + "NZ": "Ðови Зеланд", + "OM": "Оман", + "PA": "Панама", + "PE": "Перу", + "PF": "ФранцуÑка Полинезија", + "PG": "Папуа Ðова Гвинеја", + "PH": "Филипини", + "PK": "ПакиÑтан", + "PL": "ПољÑка", + "PM": "Сен Пјер и Микелон", + "PN": "Питкерн", + "PR": "Порторико", + "PS": "ПалеÑтинÑке територије", + "PT": "Португалија", + "PW": "Палау", + "PY": "Парагвај", + "QA": "Катар", + "RE": "Реинион", + "RO": "Румунија", + "RS": "Србија", + "RU": "РуÑија", + "RW": "Руанда", + "SA": "СаудијÑка Ðрабија", + "SB": "СоломонÑка ОÑтрва", + "SC": "Сејшели", + "SD": "Судан", + "SE": "ШведÑка", + "SG": "Сингапур", + "SH": "Света Јелена", + "SI": "Словенија", + "SJ": "Свалбард и Јан Мајен", + "SK": "Словачка", + "SL": "Сијера Леоне", + "SM": "Сан Марино", + "SN": "Сенегал", + "SO": "Сомалија", + "SR": "Суринам", + "SS": "Јужни Судан", + "ST": "Сао Томе и Принципе", + "SV": "Салвадор", + "SX": "Свети Мартин (Холандија)", + "SY": "Сирија", + "SZ": "Свазиленд", + "TA": "ТриÑтан да Куња", + "TC": "ОÑтрва Ð¢ÑƒÑ€ÐºÑ Ð¸ КаикоÑ", + "TD": "Чад", + "TF": "ФранцуÑке Јужне Територије", + "TG": "Того", + "TH": "Тајланд", + "TJ": "ТаџикиÑтан", + "TK": "Токелау", + "TL": "ИÑточни Тимор", + "TM": "ТуркмениÑтан", + "TN": "ТуниÑ", + "TO": "Тонга", + "TR": "ТурÑка", + "TT": "Тринидад и Тобаго", + "TV": "Тувалу", + "TW": "Тајван", + "TZ": "Танзанија", + "UA": "Украјина", + "UG": "Уганда", + "UM": "Удаљена оÑтрва СÐД", + "UN": "Уједињене нације", + "US": "Сједињене Државе", + "UY": "Уругвај", + "UZ": "УзбекиÑтан", + "VA": "Ватикан", + "VC": "Сент ВинÑент и Гренадини", + "VE": "Венецуела", + "VG": "БританÑка ДевичанÑка ОÑтрва", + "VI": "Ðмеричка ДевичанÑка ОÑтрва", + "VN": "Вијетнам", + "VU": "Вануату", + "WF": "Ð’Ð°Ð»Ð¸Ñ Ð¸ Футуна", + "WS": "Самоа", + "XK": "КоÑово", + "YE": "Јемен", + "YT": "Мајот", + "ZA": "Јужноафричка Република", + "ZM": "Замбија", + "ZW": "Зимбабве" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..a10204fcc17ea114f3a04e5a8d460e0445b140eb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_BA.json @@ -0,0 +1,20 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BY": "БјелоруÑија", + "CG": "Конго", + "CI": "Обала Слоноваче (Кот д’Ивоар)", + "CV": "Кабо Верде", + "CZ": "Чешка Република", + "DE": "Њемачка", + "KN": "Свети ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ", + "MO": "СÐР Макао", + "PM": "Свети Пјер и Микелон", + "RE": "Реунион", + "TL": "Тимор-ЛеÑте (ИÑточни Тимор)", + "UM": "Мања удаљена оÑтрва СÐД", + "VC": "Свети ВинÑент и Гренадини", + "VG": "БританÑка ДјевичанÑка ОÑтрва", + "VI": "Ðмеричка ДјевичанÑка ОÑтрва" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Cyrl_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Cyrl_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..a10204fcc17ea114f3a04e5a8d460e0445b140eb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Cyrl_BA.json @@ -0,0 +1,20 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BY": "БјелоруÑија", + "CG": "Конго", + "CI": "Обала Слоноваче (Кот д’Ивоар)", + "CV": "Кабо Верде", + "CZ": "Чешка Република", + "DE": "Њемачка", + "KN": "Свети ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ", + "MO": "СÐР Макао", + "PM": "Свети Пјер и Микелон", + "RE": "Реунион", + "TL": "Тимор-ЛеÑте (ИÑточни Тимор)", + "UM": "Мања удаљена оÑтрва СÐД", + "VC": "Свети ВинÑент и Гренадини", + "VG": "БританÑка ДјевичанÑка ОÑтрва", + "VI": "Ðмеричка ДјевичанÑка ОÑтрва" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Cyrl_ME.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Cyrl_ME.json new file mode 100644 index 0000000000000000000000000000000000000000..1814bb1de2c04ea66adbc6bb94f2949deb275454 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Cyrl_ME.json @@ -0,0 +1,18 @@ +{ + "Version": "2.1.27.99", + "Names": { + "BY": "БјелоруÑија", + "CG": "Конго", + "CI": "Обала Слоноваче (Кот д’Ивоар)", + "CZ": "Чешка Република", + "DE": "Њемачка", + "KN": "Свети ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ", + "PM": "Свети Пјер и Микелон", + "RE": "Реунион", + "TL": "Тимор-ЛеÑте (ИÑточни Тимор)", + "UM": "Мања удаљена оÑтрва СÐД", + "VC": "Свети ВинÑент и Гренадини", + "VG": "БританÑка ДјевичанÑка ОÑтрва", + "VI": "Ðмеричка ДјевичанÑка ОÑтрва" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Cyrl_XK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Cyrl_XK.json new file mode 100644 index 0000000000000000000000000000000000000000..f82c4cbdc146942b55dc140c8d537f04da62c608 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Cyrl_XK.json @@ -0,0 +1,17 @@ +{ + "Version": "2.1.27.99", + "Names": { + "CG": "Конго", + "CI": "Обала Слоноваче (Кот д’Ивоар)", + "CV": "Кабо Верде", + "CZ": "Чешка Република", + "HK": "СÐР Хонгконг", + "KN": "Свети ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ", + "MO": "СÐР Макао", + "PM": "Свети Пјер и Микелон", + "RE": "Реунион", + "TL": "Тимор-ЛеÑте (ИÑточни Тимор)", + "UM": "Мања удаљена оÑтрва СÐД", + "VC": "Свети ВинÑент и Гренадини" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn.json new file mode 100644 index 0000000000000000000000000000000000000000..cbc505d7c28504cf2cb781d803dda8dc6a7235ed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.33", + "Names": { + "AC": "Ostrvo Asension", + "AD": "Andora", + "AE": "Ujedinjeni Arapski Emirati", + "AF": "Avganistan", + "AG": "Antigva i Barbuda", + "AI": "Angvila", + "AL": "Albanija", + "AM": "Jermenija", + "AO": "Angola", + "AQ": "Antarktik", + "AR": "Argentina", + "AS": "AmeriÄka Samoa", + "AT": "Austrija", + "AU": "Australija", + "AW": "Aruba", + "AX": "Olandska Ostrva", + "AZ": "Azerbejdžan", + "BA": "Bosna i Hercegovina", + "BB": "Barbados", + "BD": "BangladeÅ¡", + "BE": "Belgija", + "BF": "Burkina Faso", + "BG": "Bugarska", + "BH": "Bahrein", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Sen Bartelemi", + "BM": "Bermuda", + "BN": "Brunej", + "BO": "Bolivija", + "BQ": "Karipska Holandija", + "BR": "Brazil", + "BS": "Bahami", + "BT": "Butan", + "BW": "Bocvana", + "BY": "Belorusija", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kokosova (Kilingova) Ostrva", + "CD": "Kongo - KinÅ¡asa", + "CF": "CentralnoafriÄka Republika", + "CG": "Kongo - Brazavil", + "CH": "Å vajcarska", + "CI": "Obala SlonovaÄe", + "CK": "Kukova Ostrva", + "CL": "ÄŒile", + "CM": "Kamerun", + "CN": "Kina", + "CO": "Kolumbija", + "CR": "Kostarika", + "CU": "Kuba", + "CV": "Zelenortska Ostrva", + "CW": "Kurasao", + "CX": "Božićno Ostrvo", + "CY": "Kipar", + "CZ": "ÄŒeÅ¡ka", + "DE": "NemaÄka", + "DG": "Dijego Garsija", + "DJ": "Džibuti", + "DK": "Danska", + "DM": "Dominika", + "DO": "Dominikanska Republika", + "DZ": "Alžir", + "EA": "Seuta i Melilja", + "EC": "Ekvador", + "EE": "Estonija", + "EG": "Egipat", + "EH": "Zapadna Sahara", + "ER": "Eritreja", + "ES": "Å panija", + "ET": "Etiopija", + "FI": "Finska", + "FJ": "Fidži", + "FK": "Foklandska Ostrva", + "FM": "Mikronezija", + "FO": "Farska Ostrva", + "FR": "Francuska", + "GA": "Gabon", + "GB": "Ujedinjeno Kraljevstvo", + "GD": "Grenada", + "GE": "Gruzija", + "GF": "Francuska Gvajana", + "GG": "Gernzi", + "GH": "Gana", + "GI": "Gibraltar", + "GL": "Grenland", + "GM": "Gambija", + "GN": "Gvineja", + "GP": "Gvadelup", + "GQ": "Ekvatorijalna Gvineja", + "GR": "GrÄka", + "GS": "Južna Džordžija i Južna SendviÄka Ostrva", + "GT": "Gvatemala", + "GU": "Guam", + "GW": "Gvineja-Bisao", + "GY": "Gvajana", + "HK": "SAR Hongkong (Kina)", + "HN": "Honduras", + "HR": "Hrvatska", + "HT": "Haiti", + "HU": "MaÄ‘arska", + "IC": "Kanarska Ostrva", + "ID": "Indonezija", + "IE": "Irska", + "IL": "Izrael", + "IM": "Ostrvo Man", + "IN": "Indija", + "IO": "Britanska teritorija Indijskog okeana", + "IQ": "Irak", + "IR": "Iran", + "IS": "Island", + "IT": "Italija", + "JE": "Džerzi", + "JM": "Jamajka", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenija", + "KG": "Kirgistan", + "KH": "Kambodža", + "KI": "Kiribati", + "KM": "Komorska Ostrva", + "KN": "Sent Kits i Nevis", + "KP": "Severna Koreja", + "KR": "Južna Koreja", + "KW": "Kuvajt", + "KY": "Kajmanska Ostrva", + "KZ": "Kazahstan", + "LA": "Laos", + "LB": "Liban", + "LC": "Sveta Lucija", + "LI": "LihtenÅ¡tajn", + "LK": "Å ri Lanka", + "LR": "Liberija", + "LS": "Lesoto", + "LT": "Litvanija", + "LU": "Luksemburg", + "LV": "Letonija", + "LY": "Libija", + "MA": "Maroko", + "MC": "Monako", + "MD": "Moldavija", + "ME": "Crna Gora", + "MF": "Sveti Martin (Francuska)", + "MG": "Madagaskar", + "MH": "MarÅ¡alska Ostrva", + "MK": "Makedonija", + "ML": "Mali", + "MM": "Mijanmar (Burma)", + "MN": "Mongolija", + "MO": "SAR Makao (Kina)", + "MP": "Severna Marijanska Ostrva", + "MQ": "Martinik", + "MR": "Mauritanija", + "MS": "Monserat", + "MT": "Malta", + "MU": "Mauricijus", + "MV": "Maldivi", + "MW": "Malavi", + "MX": "Meksiko", + "MY": "Malezija", + "MZ": "Mozambik", + "NA": "Namibija", + "NC": "Nova Kaledonija", + "NE": "Niger", + "NF": "Ostrvo Norfok", + "NG": "Nigerija", + "NI": "Nikaragva", + "NL": "Holandija", + "NO": "NorveÅ¡ka", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Novi Zeland", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Francuska Polinezija", + "PG": "Papua Nova Gvineja", + "PH": "Filipini", + "PK": "Pakistan", + "PL": "Poljska", + "PM": "Sen Pjer i Mikelon", + "PN": "Pitkern", + "PR": "Portoriko", + "PS": "Palestinske teritorije", + "PT": "Portugalija", + "PW": "Palau", + "PY": "Paragvaj", + "QA": "Katar", + "RE": "Reinion", + "RO": "Rumunija", + "RS": "Srbija", + "RU": "Rusija", + "RW": "Ruanda", + "SA": "Saudijska Arabija", + "SB": "Solomonska Ostrva", + "SC": "SejÅ¡eli", + "SD": "Sudan", + "SE": "Å vedska", + "SG": "Singapur", + "SH": "Sveta Jelena", + "SI": "Slovenija", + "SJ": "Svalbard i Jan Majen", + "SK": "SlovaÄka", + "SL": "Sijera Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalija", + "SR": "Surinam", + "SS": "Južni Sudan", + "ST": "Sao Tome i Principe", + "SV": "Salvador", + "SX": "Sveti Martin (Holandija)", + "SY": "Sirija", + "SZ": "Svazilend", + "TA": "Tristan da Kunja", + "TC": "Ostrva Turks i Kaikos", + "TD": "ÄŒad", + "TF": "Francuske Južne Teritorije", + "TG": "Togo", + "TH": "Tajland", + "TJ": "Tadžikistan", + "TK": "Tokelau", + "TL": "IstoÄni Timor", + "TM": "Turkmenistan", + "TN": "Tunis", + "TO": "Tonga", + "TR": "Turska", + "TT": "Trinidad i Tobago", + "TV": "Tuvalu", + "TW": "Tajvan", + "TZ": "Tanzanija", + "UA": "Ukrajina", + "UG": "Uganda", + "UM": "Udaljena ostrva SAD", + "UN": "Ujedinjene nacije", + "US": "Sjedinjene Države", + "UY": "Urugvaj", + "UZ": "Uzbekistan", + "VA": "Vatikan", + "VC": "Sent Vinsent i Grenadini", + "VE": "Venecuela", + "VG": "Britanska DeviÄanska Ostrva", + "VI": "AmeriÄka DeviÄanska Ostrva", + "VN": "Vijetnam", + "VU": "Vanuatu", + "WF": "Valis i Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Majot", + "ZA": "JužnoafriÄka Republika", + "ZM": "Zambija", + "ZW": "Zimbabve" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn_BA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn_BA.json new file mode 100644 index 0000000000000000000000000000000000000000..863ccb3fba7294831e3afa6132118d7b731926a9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn_BA.json @@ -0,0 +1,20 @@ +{ + "Version": "2.1.29.33", + "Names": { + "BY": "Bjelorusija", + "CG": "Kongo", + "CI": "Obala SlonovaÄe (Kot d’Ivoar)", + "CV": "Kabo Verde", + "CZ": "ÄŒeÅ¡ka Republika", + "DE": "NjemaÄka", + "KN": "Sveti Kits i Nevis", + "MO": "SAR Makao", + "PM": "Sveti Pjer i Mikelon", + "RE": "Reunion", + "TL": "Timor-Leste (IstoÄni Timor)", + "UM": "Manja udaljena ostrva SAD", + "VC": "Sveti Vinsent i Grenadini", + "VG": "Britanska DjeviÄanska Ostrva", + "VI": "AmeriÄka DjeviÄanska Ostrva" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn_ME.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn_ME.json new file mode 100644 index 0000000000000000000000000000000000000000..5cd9000dcb829a30d024248a03cf5fad51b16f4f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn_ME.json @@ -0,0 +1,18 @@ +{ + "Version": "2.1.29.33", + "Names": { + "BY": "Bjelorusija", + "CG": "Kongo", + "CI": "Obala SlonovaÄe (Kot d’Ivoar)", + "CZ": "ÄŒeÅ¡ka Republika", + "DE": "NjemaÄka", + "KN": "Sveti Kits i Nevis", + "PM": "Sveti Pjer i Mikelon", + "RE": "Reunion", + "TL": "Timor-Leste (IstoÄni Timor)", + "UM": "Manja udaljena ostrva SAD", + "VC": "Sveti Vinsent i Grenadini", + "VG": "Britanska DjeviÄanska Ostrva", + "VI": "AmeriÄka DjeviÄanska Ostrva" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn_XK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn_XK.json new file mode 100644 index 0000000000000000000000000000000000000000..86b50ad5979568bce01a30614748574463567047 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn_XK.json @@ -0,0 +1,17 @@ +{ + "Version": "2.1.29.33", + "Names": { + "CG": "Kongo", + "CI": "Obala SlonovaÄe (Kot d’Ivoar)", + "CV": "Kabo Verde", + "CZ": "ÄŒeÅ¡ka Republika", + "HK": "SAR Hongkong", + "KN": "Sveti Kits i Nevis", + "MO": "SAR Makao", + "PM": "Sveti Pjer i Mikelon", + "RE": "Reunion", + "TL": "Timor-Leste (IstoÄni Timor)", + "UM": "Manja udaljena ostrva SAD", + "VC": "Sveti Vinsent i Grenadini" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_ME.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_ME.json new file mode 100644 index 0000000000000000000000000000000000000000..5cd9000dcb829a30d024248a03cf5fad51b16f4f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_ME.json @@ -0,0 +1,18 @@ +{ + "Version": "2.1.29.33", + "Names": { + "BY": "Bjelorusija", + "CG": "Kongo", + "CI": "Obala SlonovaÄe (Kot d’Ivoar)", + "CZ": "ÄŒeÅ¡ka Republika", + "DE": "NjemaÄka", + "KN": "Sveti Kits i Nevis", + "PM": "Sveti Pjer i Mikelon", + "RE": "Reunion", + "TL": "Timor-Leste (IstoÄni Timor)", + "UM": "Manja udaljena ostrva SAD", + "VC": "Sveti Vinsent i Grenadini", + "VG": "Britanska DjeviÄanska Ostrva", + "VI": "AmeriÄka DjeviÄanska Ostrva" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_XK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_XK.json new file mode 100644 index 0000000000000000000000000000000000000000..f82c4cbdc146942b55dc140c8d537f04da62c608 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sr_XK.json @@ -0,0 +1,17 @@ +{ + "Version": "2.1.27.99", + "Names": { + "CG": "Конго", + "CI": "Обала Слоноваче (Кот д’Ивоар)", + "CV": "Кабо Верде", + "CZ": "Чешка Република", + "HK": "СÐР Хонгконг", + "KN": "Свети ÐšÐ¸Ñ‚Ñ Ð¸ ÐевиÑ", + "MO": "СÐР Макао", + "PM": "Свети Пјер и Микелон", + "RE": "Реунион", + "TL": "Тимор-ЛеÑте (ИÑточни Тимор)", + "UM": "Мања удаљена оÑтрва СÐД", + "VC": "Свети ВинÑент и Гренадини" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sv.json new file mode 100644 index 0000000000000000000000000000000000000000..9cd8171d2c867d223f28d4d843f93e0db8127009 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sv.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.30.7", + "Names": { + "AC": "Ascension", + "AD": "Andorra", + "AE": "Förenade Arabemiraten", + "AF": "Afghanistan", + "AG": "Antigua och Barbuda", + "AI": "Anguilla", + "AL": "Albanien", + "AM": "Armenien", + "AO": "Angola", + "AQ": "Antarktis", + "AR": "Argentina", + "AS": "Amerikanska Samoa", + "AT": "Österrike", + "AU": "Australien", + "AW": "Aruba", + "AX": "Ã…land", + "AZ": "Azerbajdzjan", + "BA": "Bosnien och Hercegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgien", + "BF": "Burkina Faso", + "BG": "Bulgarien", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "S:t Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Karibiska Nederländerna", + "BR": "Brasilien", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Vitryssland", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Kokosöarna", + "CD": "Kongo-Kinshasa", + "CF": "Centralafrikanska republiken", + "CG": "Kongo-Brazzaville", + "CH": "Schweiz", + "CI": "Elfenbenskusten", + "CK": "Cooköarna", + "CL": "Chile", + "CM": "Kamerun", + "CN": "Kina", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Kuba", + "CV": "Kap Verde", + "CW": "Curaçao", + "CX": "Julön", + "CY": "Cypern", + "CZ": "Tjeckien", + "DE": "Tyskland", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Danmark", + "DM": "Dominica", + "DO": "Dominikanska republiken", + "DZ": "Algeriet", + "EA": "Ceuta och Melilla", + "EC": "Ecuador", + "EE": "Estland", + "EG": "Egypten", + "EH": "Västsahara", + "ER": "Eritrea", + "ES": "Spanien", + "ET": "Etiopien", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Falklandsöarna", + "FM": "Mikronesien", + "FO": "Färöarna", + "FR": "Frankrike", + "GA": "Gabon", + "GB": "Storbritannien", + "GD": "Grenada", + "GE": "Georgien", + "GF": "Franska Guyana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Grönland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Ekvatorialguinea", + "GR": "Grekland", + "GS": "Sydgeorgien och Sydsandwichöarna", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hongkong, S.A.R. Kina", + "HN": "Honduras", + "HR": "Kroatien", + "HT": "Haiti", + "HU": "Ungern", + "IC": "Kanarieöarna", + "ID": "Indonesien", + "IE": "Irland", + "IL": "Israel", + "IM": "Isle of Man", + "IN": "Indien", + "IO": "Brittiska territoriet i Indiska oceanen", + "IQ": "Irak", + "IR": "Iran", + "IS": "Island", + "IT": "Italien", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordanien", + "JP": "Japan", + "KE": "Kenya", + "KG": "Kirgizistan", + "KH": "Kambodja", + "KI": "Kiribati", + "KM": "Komorerna", + "KN": "S:t Kitts och Nevis", + "KP": "Nordkorea", + "KR": "Sydkorea", + "KW": "Kuwait", + "KY": "Caymanöarna", + "KZ": "Kazakstan", + "LA": "Laos", + "LB": "Libanon", + "LC": "S:t Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Litauen", + "LU": "Luxemburg", + "LV": "Lettland", + "LY": "Libyen", + "MA": "Marocko", + "MC": "Monaco", + "MD": "Moldavien", + "ME": "Montenegro", + "MF": "Saint-Martin", + "MG": "Madagaskar", + "MH": "Marshallöarna", + "MK": "Makedonien", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongoliet", + "MO": "Macao, S.A.R. Kina", + "MP": "Nordmarianerna", + "MQ": "Martinique", + "MR": "Mauretanien", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldiverna", + "MW": "Malawi", + "MX": "Mexiko", + "MY": "Malaysia", + "MZ": "Moçambique", + "NA": "Namibia", + "NC": "Nya Kaledonien", + "NE": "Niger", + "NF": "Norfolkön", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Nederländerna", + "NO": "Norge", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nya Zeeland", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Franska Polynesien", + "PG": "Papua Nya Guinea", + "PH": "Filippinerna", + "PK": "Pakistan", + "PL": "Polen", + "PM": "S:t Pierre och Miquelon", + "PN": "Pitcairnöarna", + "PR": "Puerto Rico", + "PS": "Palestinska territorierna", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Rumänien", + "RS": "Serbien", + "RU": "Ryssland", + "RW": "Rwanda", + "SA": "Saudiarabien", + "SB": "Salomonöarna", + "SC": "Seychellerna", + "SD": "Sudan", + "SE": "Sverige", + "SG": "Singapore", + "SH": "S:t Helena", + "SI": "Slovenien", + "SJ": "Svalbard och Jan Mayen", + "SK": "Slovakien", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Surinam", + "SS": "Sydsudan", + "ST": "São Tomé och Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syrien", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Turks- och Caicosöarna", + "TD": "Tchad", + "TF": "Franska sydterritorierna", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tadzjikistan", + "TK": "Tokelau", + "TL": "Östtimor", + "TM": "Turkmenistan", + "TN": "Tunisien", + "TO": "Tonga", + "TR": "Turkiet", + "TT": "Trinidad och Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "USA:s yttre öar", + "UN": "Förenta Nationerna", + "US": "USA", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VA": "Vatikanstaten", + "VC": "S:t Vincent och Grenadinerna", + "VE": "Venezuela", + "VG": "Brittiska Jungfruöarna", + "VI": "Amerikanska Jungfruöarna", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis- och Futunaöarna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Jemen", + "YT": "Mayotte", + "ZA": "Sydafrika", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sw.json new file mode 100644 index 0000000000000000000000000000000000000000..b870b482c0273c5260e0a28b02e80da49bc75151 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sw.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Kisiwa cha Ascension", + "AD": "Andora", + "AE": "Falme za Kiarabu", + "AF": "Afghanistan", + "AG": "Antigua na Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antaktika", + "AR": "Ajentina", + "AS": "Samoa ya Marekani", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Visiwa vya Alandi", + "AZ": "Azerbaijan", + "BA": "Bosnia na Hezegovina", + "BB": "Babadosi", + "BD": "Bangladeshi", + "BE": "Ubelgiji", + "BF": "Bukinafaso", + "BG": "Bulgaria", + "BH": "Bahareni", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Santabathelemi", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Uholanzi ya Karibiani", + "BR": "Brazili", + "BS": "Bahama", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Belarusi", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Visiwa vya Cocos (Keeling)", + "CD": "Jamhuri ya Kidemokrasia ya Kongo", + "CF": "Jamhuri ya Afrika ya Kati", + "CG": "Kongo - Brazzaville", + "CH": "Uswisi", + "CI": "Côte d’Ivoire", + "CK": "Visiwa vya Cook", + "CL": "Chile", + "CM": "Kameruni", + "CN": "China", + "CO": "Kolombia", + "CR": "Kostarika", + "CU": "Kuba", + "CV": "Cape Verde", + "CW": "Kurakao", + "CX": "Kisiwa cha Krismasi", + "CY": "Cyprus", + "CZ": "Jamhuri ya Cheki", + "DE": "Ujerumani", + "DG": "Diego Garcia", + "DJ": "Jibuti", + "DK": "Denmark", + "DM": "Dominika", + "DO": "Jamhuri ya Dominika", + "DZ": "Aljeria", + "EA": "Ceuta na Melilla", + "EC": "Ekwado", + "EE": "Estonia", + "EG": "Misri", + "EH": "Sahara Magharibi", + "ER": "Eritrea", + "ES": "Hispania", + "ET": "Ethiopia", + "FI": "Ufini", + "FJ": "Fiji", + "FK": "Visiwa vya Falkland", + "FM": "Mikronesia", + "FO": "Visiwa vya Faroe", + "FR": "Ufaransa", + "GA": "Gabon", + "GB": "Uingereza", + "GD": "Grenada", + "GE": "Jojia", + "GF": "Gwiyana ya Ufaransa", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Jibralta", + "GL": "Grinlandi", + "GM": "Gambia", + "GN": "Gine", + "GP": "Guadeloupe", + "GQ": "Ginekweta", + "GR": "Ugiriki", + "GS": "Jojia Kusini na Visiwa vya Sandwich Kusini", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Ginebisau", + "GY": "Guyana", + "HK": "Hong Kong SAR China", + "HN": "Hondurasi", + "HR": "Korasia", + "HT": "Haiti", + "HU": "Hungaria", + "IC": "Visiwa vya Kanari", + "ID": "Indonesia", + "IE": "Ayalandi", + "IL": "Israeli", + "IM": "Isle of Man", + "IN": "India", + "IO": "Eneo la Uingereza katika Bahari Hindi", + "IQ": "Iraki", + "IR": "Iran", + "IS": "Aislandi", + "IT": "Italia", + "JE": "Jersey", + "JM": "Jamaika", + "JO": "Jordan", + "JP": "Japani", + "KE": "Kenya", + "KG": "Kirigizistani", + "KH": "Kambodia", + "KI": "Kiribati", + "KM": "Komoro", + "KN": "Santakitzi na Nevis", + "KP": "Korea Kaskazini", + "KR": "Korea Kusini", + "KW": "Kuwait", + "KY": "Visiwa vya Kayman", + "KZ": "Kazakistani", + "LA": "Laosi", + "LB": "Lebanon", + "LC": "Santalusia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesoto", + "LT": "Lithuania", + "LU": "Luxembourg", + "LV": "Latvia", + "LY": "Libya", + "MA": "Morocco", + "MC": "Monako", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "Saint Martin", + "MG": "Madagaska", + "MH": "Visiwa vya Marshall", + "MK": "Macedonia", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongolia", + "MO": "Macau SAR China", + "MP": "Visiwa vya Mariana vya Kaskazini", + "MQ": "Martiniki", + "MR": "Moritania", + "MS": "Montserrati", + "MT": "Malta", + "MU": "Morisi", + "MV": "Maldives", + "MW": "Malawi", + "MX": "Meksiko", + "MY": "Malesia", + "MZ": "Msumbiji", + "NA": "Namibia", + "NC": "Nyukaledonia", + "NE": "Niger", + "NF": "Kisiwa cha Norfolk", + "NG": "Nigeria", + "NI": "Nikaragwa", + "NL": "Uholanzi", + "NO": "Norway", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Nyuzilandi", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Polinesia ya Ufaransa", + "PG": "Papua New Guinea", + "PH": "Ufilipino", + "PK": "Pakistani", + "PL": "Polandi", + "PM": "Santapierre na Miquelon", + "PN": "Visiwa vya Pitcairn", + "PR": "Puerto Rico", + "PS": "Maeneo ya Palestina", + "PT": "Ureno", + "PW": "Palau", + "PY": "Paragwai", + "QA": "Qatar", + "RE": "Riyunioni", + "RO": "Romania", + "RS": "Serbia", + "RU": "Urusi", + "RW": "Rwanda", + "SA": "Saudia", + "SB": "Visiwa vya Solomon", + "SC": "Ushelisheli", + "SD": "Sudan", + "SE": "Uswidi", + "SG": "Singapore", + "SH": "Santahelena", + "SI": "Slovenia", + "SJ": "Svalbard na Jan Mayen", + "SK": "Slovakia", + "SL": "Siera Leoni", + "SM": "San Marino", + "SN": "Senegali", + "SO": "Somalia", + "SR": "Surinamu", + "SS": "Sudan Kusini", + "ST": "São Tomé na Príncipe", + "SV": "Elsavado", + "SX": "Sint Maarten", + "SY": "Syria", + "SZ": "Uswazi", + "TA": "Tristan da Cunha", + "TC": "Visiwa vya Turki na Kaiko", + "TD": "Chad", + "TF": "Maeneo ya Kusini ya Ufaransa", + "TG": "Togo", + "TH": "Tailandi", + "TJ": "Tajikistani", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turukimenistani", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Uturuki", + "TT": "Trinidad na Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraine", + "UG": "Uganda", + "UM": "Visiwa Vidogo vya Nje vya Marekani", + "UN": "Umoja wa Mataifa", + "US": "Marekani", + "UY": "Urugwai", + "UZ": "Uzibekistani", + "VA": "Vatikani", + "VC": "Santavisenti na Grenadini", + "VE": "Venezuela", + "VG": "Visiwa vya Virgin vya Uingereza", + "VI": "Visiwa vya Virgin vya Marekani", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Walis na Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yemeni", + "YT": "Mayotte", + "ZA": "Afrika Kusini", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sw_CD.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sw_CD.json new file mode 100644 index 0000000000000000000000000000000000000000..ffa7d58f3da3f6e94be83b37e9e98f35aea7c34a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sw_CD.json @@ -0,0 +1,33 @@ +{ + "Version": "2.1.27.99", + "Names": { + "AF": "Afuganistani", + "AZ": "Azabajani", + "BJ": "Benini", + "CI": "Kodivaa", + "CX": "Kisiwa cha Christmas", + "CY": "Saiprasi", + "DK": "Denmaki", + "HR": "Kroeshia", + "JO": "Yordani", + "LB": "Lebanoni", + "LI": "Lishenteni", + "LU": "Lasembagi", + "LV": "Lativia", + "MA": "Moroko", + "MM": "Myama", + "MV": "Maldivi", + "NE": "Nijeri", + "NG": "Nijeria", + "NO": "Norwe", + "NP": "Nepali", + "OM": "Omani", + "PR": "Puetoriko", + "QA": "Katari", + "SD": "Sudani", + "ST": "Sao Tome na Prinsipe", + "TD": "Chadi", + "TL": "Timori ya Mashariki", + "VN": "Vietnamu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sw_KE.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sw_KE.json new file mode 100644 index 0000000000000000000000000000000000000000..f071e13c9310892458adf4d435a52f00c66d1d4b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/sw_KE.json @@ -0,0 +1,28 @@ +{ + "Version": "2.1.27.99", + "Names": { + "AZ": "Azabajani", + "CI": "Ivorikosti", + "CX": "Kisiwa cha Christmas", + "CY": "Saiprasi", + "GP": "Gwadelupe", + "JO": "Yordani", + "LB": "Lebanoni", + "LI": "Lishtensteni", + "LS": "Lesotho", + "LU": "Lasembagi", + "LV": "Lativia", + "MV": "Maldivi", + "NE": "Nijer", + "NG": "Nijeria", + "NO": "Norwe", + "NP": "Nepali", + "OM": "Omani", + "PR": "Puetoriko", + "QA": "Katari", + "SR": "Suriname", + "ST": "Sao Tome na Prinsipe", + "TD": "Chadi", + "VN": "Vietnamu" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ta.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ta.json new file mode 100644 index 0000000000000000000000000000000000000000..a20b24e2fcc65a0d52222d8e3d71a6a5cb4b6129 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ta.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "அஷனà¯à®·à®¿à®¯à®©à¯ தீவà¯", + "AD": "அனà¯à®Ÿà¯‹à®°à®¾", + "AE": "à®à®•à¯à®•ிய அரப௠எமிரேடà¯à®¸à¯", + "AF": "ஆபà¯à®•ானிஸà¯à®¤à®¾à®©à¯", + "AG": "ஆணà¯à®Ÿà®¿à®•à¯à®µà®¾ மறà¯à®±à¯à®®à¯ பாரà¯à®ªà¯à®Ÿà®¾", + "AI": "à®…à®™à¯à®•à¯à®¯à¯à®²à®¾", + "AL": "அலà¯à®ªà¯‡à®©à®¿à®¯à®¾", + "AM": "à®…à®°à¯à®®à¯‡à®©à®¿à®¯à®¾", + "AO": "à®…à®™à¯à®•ோலா", + "AQ": "அணà¯à®Ÿà®¾à®°à¯à®Ÿà®¿à®•ா", + "AR": "à®…à®°à¯à®œà¯†à®©à¯à®Ÿà®¿à®©à®¾", + "AS": "அமெரிகà¯à®• சமோவா", + "AT": "ஆஸà¯à®¤à®¿à®°à®¿à®¯à®¾", + "AU": "ஆஸà¯à®¤à®¿à®°à¯‡à®²à®¿à®¯à®¾", + "AW": "அரூபா", + "AX": "ஆலநà¯à®¤à¯ தீவà¯à®•ளà¯", + "AZ": "அசரà¯à®ªà¯ˆà®œà®¾à®©à¯", + "BA": "போஸà¯à®©à®¿à®¯à®¾ & ஹெரà¯à®¸à®•ோவினா", + "BB": "பாரà¯à®ªà®Ÿà¯‹à®¸à¯", + "BD": "பஙà¯à®•ளாதேஷà¯", + "BE": "பெலà¯à®œà®¿à®¯à®®à¯", + "BF": "பà¯à®°à¯à®•ினா ஃபாஸோ", + "BG": "பலà¯à®•ேரியா", + "BH": "பஹà¯à®°à¯ˆà®©à¯", + "BI": "பà¯à®°à¯à®£à¯à®Ÿà®¿", + "BJ": "பெனினà¯", + "BL": "செயினà¯à®Ÿà¯ பாரà¯à®¤à¯‡à®²à¯†à®®à®¿", + "BM": "பெரà¯à®®à¯à®Ÿà®¾", + "BN": "பà¯à®°à¯à®©à¯‡", + "BO": "பொலிவியா", + "BQ": "கரீபியன௠நெதரà¯à®²à®¾à®¨à¯à®¤à¯", + "BR": "பிரேசிலà¯", + "BS": "பஹாமாஸà¯", + "BT": "பூடானà¯", + "BW": "போடà¯à®¸à¯à®µà®¾à®©à®¾", + "BY": "பெலாரூஸà¯", + "BZ": "பெலிஸà¯", + "CA": "கனடா", + "CC": "கோகோஸ௠(கீலிஙà¯) தீவà¯à®•ளà¯", + "CD": "காஙà¯à®•ோ - கினà¯à®·à®¾à®šà®¾", + "CF": "மதà¯à®¤à®¿à®¯ ஆபà¯à®°à®¿à®•à¯à®•க௠கà¯à®Ÿà®¿à®¯à®°à®šà¯", + "CG": "காஙà¯à®•ோ - பà¯à®°à®¾à®¸à®¾à®µà®¿à®²à¯à®²à¯‡", + "CH": "ஸà¯à®µà®¿à®Ÿà¯à®šà®°à¯à®²à®¾à®¨à¯à®¤à¯", + "CI": "கோட௠தி’வாயரà¯", + "CK": "கà¯à®•௠தீவà¯à®•ளà¯", + "CL": "சிலி", + "CM": "கேமரூனà¯", + "CN": "சீனா", + "CO": "கொலமà¯à®ªà®¿à®¯à®¾", + "CR": "கோஸà¯à®Ÿà®¾à®°à®¿à®•ா", + "CU": "கியூபா", + "CV": "கேப௠வெரà¯à®Ÿà¯‡", + "CW": "கà¯à®°à®¾à®•வà¯", + "CX": "கிறிஸà¯à®¤à¯à®®à®¸à¯ தீவà¯", + "CY": "சைபà¯à®°à®¸à¯", + "CZ": "செக௠கà¯à®Ÿà®¿à®¯à®°à®šà¯", + "DE": "ஜெரà¯à®®à®©à®¿", + "DG": "டியகோ காரà¯à®·à®¿à®¯à®¾", + "DJ": "ஜிபௌடà¯à®Ÿà®¿", + "DK": "டெனà¯à®®à®¾à®°à¯à®•à¯", + "DM": "டொமினிகா", + "DO": "டொமினிகன௠கà¯à®Ÿà®¿à®¯à®°à®šà¯", + "DZ": "அலà¯à®œà¯€à®°à®¿à®¯à®¾", + "EA": "சியூடா & மெலிலà¯à®²à®¾", + "EC": "ஈகà¯à®µà®Ÿà®¾à®°à¯", + "EE": "எஸà¯à®Ÿà¯‹à®©à®¿à®¯à®¾", + "EG": "எகிபà¯à®¤à¯", + "EH": "மேறà¯à®•௠சஹாரா", + "ER": "எரிடà¯à®°à®¿à®¯à®¾", + "ES": "ஸà¯à®ªà¯†à®¯à®¿à®©à¯", + "ET": "எதà¯à®¤à®¿à®¯à¯‹à®ªà¯à®ªà®¿à®¯à®¾", + "FI": "பினà¯à®²à®¾à®¨à¯à®¤à¯", + "FJ": "ஃபிஜி", + "FK": "ஃபாகà¯à®²à®¾à®¨à¯à®¤à¯ தீவà¯à®•ளà¯", + "FM": "மைகà¯à®°à¯‹à®©à¯‡à®·à®¿à®¯à®¾", + "FO": "ஃபாரோ தீவà¯à®•ளà¯", + "FR": "பிரானà¯à®¸à¯", + "GA": "கேபானà¯", + "GB": "யà¯à®©à¯ˆà®Ÿà¯†à®Ÿà¯ கிஙà¯à®Ÿà®®à¯", + "GD": "கிரனெடா", + "GE": "ஜாரà¯à®œà®¿à®¯à®¾", + "GF": "பிரெஞà¯à®šà¯ கயானா", + "GG": "கெரà¯à®©à¯à®šà®¿", + "GH": "கானா", + "GI": "ஜிபà¯à®°à®¾à®²à¯à®Ÿà®°à¯", + "GL": "கிரீனà¯à®²à®¾à®¨à¯à®¤à¯", + "GM": "காமà¯à®ªà®¿à®¯à®¾", + "GN": "கினியா", + "GP": "கà¯à®µà®¾à®¤à¯‡à®²à¯‹à®ªà¯", + "GQ": "ஈகà¯à®µà®Ÿà¯‹à®°à®¿à®¯à®²à¯ கினியா", + "GR": "கிரீஸà¯", + "GS": "தெறà¯à®•௠ஜாரà¯à®œà®¿à®¯à®¾ மறà¯à®±à¯à®®à¯ தெறà¯à®•௠சாணà¯à®Ÿà¯à®µà®¿à®šà¯ தீவà¯à®•ளà¯", + "GT": "கவà¯à®¤à®®à®¾à®²à®¾", + "GU": "கà¯à®µà®¾à®®à¯", + "GW": "கினியா-பிஸà¯à®¸à®¾à®µà¯", + "GY": "கயானா", + "HK": "ஹாஙà¯à®•ாங௠எஸà¯à®à®†à®°à¯ சீனா", + "HN": "ஹோணà¯à®Ÿà¯‚ராஸà¯", + "HR": "கà¯à®°à¯‡à®·à®¿à®¯à®¾", + "HT": "ஹைடà¯à®Ÿà®¿", + "HU": "ஹஙà¯à®•ேரி", + "IC": "கேனரி தீவà¯à®•ளà¯", + "ID": "இநà¯à®¤à¯‹à®©à¯‡à®šà®¿à®¯à®¾", + "IE": "அயரà¯à®²à®¾à®¨à¯à®¤à¯", + "IL": "இஸà¯à®°à¯‡à®²à¯", + "IM": "à®à®²à¯ ஆஃப௠மேனà¯", + "IN": "இநà¯à®¤à®¿à®¯à®¾", + "IO": "பிரிடà¯à®Ÿà®¿à®·à¯ இநà¯à®¤à®¿à®¯à®ªà¯ பெரà¯à®™à¯à®•டல௠பிரதேசமà¯", + "IQ": "ஈராகà¯", + "IR": "ஈரானà¯", + "IS": "à®à®¸à¯à®²à®¾à®¨à¯à®¤à¯", + "IT": "இதà¯à®¤à®¾à®²à®¿", + "JE": "ஜெரà¯à®šà®¿", + "JM": "ஜமைகா", + "JO": "ஜோரà¯à®Ÿà®¾à®©à¯", + "JP": "ஜபà¯à®ªà®¾à®©à¯", + "KE": "கெனà¯à®¯à®¾", + "KG": "கிரà¯à®•ிஸà¯à®¤à®¾à®©à¯", + "KH": "கமà¯à®ªà¯‹à®Ÿà®¿à®¯à®¾", + "KI": "கிரிபாடà¯à®Ÿà®¿", + "KM": "கோமரோஸà¯", + "KN": "செயினà¯à®Ÿà¯ கிடà¯à®¸à¯ & நெவிஸà¯", + "KP": "வட கொரியா", + "KR": "தென௠கொரியா", + "KW": "கà¯à®µà¯ˆà®¤à¯", + "KY": "கெயà¯à®®à¯†à®©à¯ தீவà¯à®•ளà¯", + "KZ": "கஸகஸà¯à®¤à®¾à®©à¯", + "LA": "லாவோஸà¯", + "LB": "லெபனானà¯", + "LC": "செயினà¯à®Ÿà¯ லூசியா", + "LI": "லிசà¯à®šà¯†à®£à¯à®¸à¯à®Ÿà¯†à®¯à¯à®©à¯", + "LK": "இலஙà¯à®•ை", + "LR": "லைபீரியா", + "LS": "லெசோதோ", + "LT": "லிதà¯à®µà¯‡à®©à®¿à®¯à®¾", + "LU": "லகà¯à®¸à¯à®šà®®à¯à®ªà®°à¯à®•à¯", + "LV": "லாடà¯à®µà®¿à®¯à®¾", + "LY": "லிபியா", + "MA": "மொராகà¯à®•ோ", + "MC": "மொனாகà¯à®•ோ", + "MD": "மாலà¯à®Ÿà¯‹à®µà®¾", + "ME": "மானà¯à®Ÿà¯‡à®©à¯†à®•à¯à®°à¯‹", + "MF": "செயினà¯à®Ÿà¯ மாரà¯à®Ÿà¯à®Ÿà¯€à®©à¯", + "MG": "மடகாஸà¯à®•à®°à¯", + "MH": "மாரà¯à®·à®²à¯ தீவà¯à®•ளà¯", + "MK": "மாசிடோனியா", + "ML": "மாலி", + "MM": "மியானà¯à®®à®¾à®°à¯ (பரà¯à®®à®¾)", + "MN": "மஙà¯à®•ோலியா", + "MO": "மகாவ௠எஸà¯à®à®†à®°à¯ சீனா", + "MP": "வடகà¯à®•௠மரியானா தீவà¯à®•ளà¯", + "MQ": "மாரà¯à®Ÿà®¿à®©à®¿à®•à¯", + "MR": "மௌரிடானியா", + "MS": "மாணà¯à®Ÿà¯à®šà¯†à®°à®¾à®Ÿà¯", + "MT": "மாலà¯à®Ÿà®¾", + "MU": "மொரிசியஸà¯", + "MV": "மாலதà¯à®¤à¯€à®µà¯", + "MW": "மலாவி", + "MX": "மெகà¯à®šà®¿à®•ோ", + "MY": "மலேசியா", + "MZ": "மொசாமà¯à®ªà®¿à®•à¯", + "NA": "நமீபியா", + "NC": "நியூ கேலிடோனியா", + "NE": "நைஜரà¯", + "NF": "நாரà¯à®ƒà®ªà¯‹à®•௠தீவà¯à®•ளà¯", + "NG": "நைஜீரியா", + "NI": "நிகரகà¯à®µà®¾", + "NL": "நெதரà¯à®²à®¾à®¨à¯à®¤à¯", + "NO": "நாரà¯à®µà¯‡", + "NP": "நேபாளமà¯", + "NR": "நௌரà¯", + "NU": "நியூ", + "NZ": "நியூசிலாநà¯à®¤à¯", + "OM": "ஓமனà¯", + "PA": "பனாமா", + "PE": "பெரà¯", + "PF": "பிரெஞà¯à®šà¯ பாலினேஷியா", + "PG": "பபà¯à®ªà¯à®µà®¾ நியூ கினியா", + "PH": "பிலிபà¯à®ªà¯ˆà®©à¯à®¸à¯", + "PK": "பாகிஸà¯à®¤à®¾à®©à¯", + "PL": "போலநà¯à®¤à¯", + "PM": "செயினà¯à®Ÿà¯ பியர௠& மிகà¯à®µà¯‡à®²à®¾à®©à¯", + "PN": "பிடà¯à®•ெயà¯à®°à¯à®©à¯ தீவà¯à®•ளà¯", + "PR": "பியூரà¯à®Ÿà¯‹ ரிகோ", + "PS": "பாலஸà¯à®¤à¯€à®©à®¿à®¯ பிரதேசஙà¯à®•ளà¯", + "PT": "போரà¯à®šà¯à®šà¯à®•à¯à®•லà¯", + "PW": "பாலோ", + "PY": "பராகà¯à®µà¯‡", + "QA": "கதà¯à®¤à®¾à®°à¯", + "RE": "ரீயூனியனà¯", + "RO": "à®°à¯à®®à¯‡à®©à®¿à®¯à®¾", + "RS": "செரà¯à®ªà®¿à®¯à®¾", + "RU": "à®°à®·à¯à®¯à®¾", + "RW": "à®°à¯à®µà®¾à®£à¯à®Ÿà®¾", + "SA": "சவூதி அரேபியா", + "SB": "சாலமன௠தீவà¯à®•ளà¯", + "SC": "சீஷெலà¯à®¸à¯", + "SD": "சூடானà¯", + "SE": "ஸà¯à®µà¯€à®Ÿà®©à¯", + "SG": "சிஙà¯à®•பà¯à®ªà¯‚à®°à¯", + "SH": "செயினà¯à®Ÿà¯ ஹெலெனா", + "SI": "ஸà¯à®²à¯‹à®µà¯‡à®©à®¿à®¯à®¾", + "SJ": "ஸà¯à®µà®²à¯à®ªà®¾à®°à¯à®Ÿà¯ & ஜான௠மேயனà¯", + "SK": "ஸà¯à®²à¯‹à®µà®¾à®•ியா", + "SL": "சியாரா லியோனà¯", + "SM": "சான௠மரினோ", + "SN": "செனெகலà¯", + "SO": "சோமாலியா", + "SR": "சà¯à®°à®¿à®©à®¾à®®à¯", + "SS": "தெறà¯à®•௠சூடானà¯", + "ST": "சாவ௠தோம௠& பà¯à®°à®¿à®©à¯à®šà®¿à®ªà®¿", + "SV": "எல௠சாலà¯à®µà®Ÿà®¾à®°à¯", + "SX": "சினà¯à®Ÿà¯ மாரà¯à®Ÿà¯†à®©à¯", + "SY": "சிரியா", + "SZ": "ஸà¯à®µà®¾à®¸à®¿à®²à®¾à®¨à¯à®¤à¯", + "TA": "டிரிஸà¯à®Ÿà®©à¯ டா கà¯à®©à¯à®¹à®¾", + "TC": "டரà¯à®•à¯à®¸à¯ & கைகோஸ௠தீவà¯à®•ளà¯", + "TD": "சாடà¯", + "TF": "பிரெஞà¯à®šà¯ தெறà¯à®•௠பிரதேசஙà¯à®•ளà¯", + "TG": "டோகோ", + "TH": "தாயà¯à®²à®¾à®¨à¯à®¤à¯", + "TJ": "தஜிகிஸà¯à®¤à®¾à®©à¯", + "TK": "டோகேலோ", + "TL": "தைமூரà¯-லெஸà¯à®¤à¯‡", + "TM": "தà¯à®°à¯à®•à¯à®®à¯†à®©à®¿à®¸à¯à®¤à®¾à®©à¯", + "TN": "டà¯à®©à®¿à®šà®¿à®¯à®¾", + "TO": "டோஙà¯à®•ா", + "TR": "தà¯à®°à¯à®•à¯à®•ி", + "TT": "டிரினிடாட௠& டொபாகோ", + "TV": "தà¯à®µà®¾à®²à¯‚", + "TW": "தைவானà¯", + "TZ": "தானà¯à®šà®¾à®©à®¿à®¯à®¾", + "UA": "உகà¯à®°à¯ˆà®©à¯", + "UG": "உகாணà¯à®Ÿà®¾", + "UM": "யூ.எஸà¯. வெளிபà¯à®ªà¯à®±à®¤à¯ தீவà¯à®•ளà¯", + "UN": "à®à®•à¯à®•ிய நாடà¯à®•ளà¯", + "US": "அமெரிகà¯à®•ா", + "UY": "உரà¯à®•à¯à®µà¯‡", + "UZ": "உஸà¯à®ªà¯†à®•ிஸà¯à®¤à®¾à®©à¯", + "VA": "வாடிகன௠நகரமà¯", + "VC": "செயினà¯à®Ÿà¯ வினà¯à®šà¯†à®©à¯à®Ÿà¯ & கிரெனடைனà¯à®¸à¯", + "VE": "வெனிசà¯à®²à®¾", + "VG": "பிரிடà¯à®Ÿà¯€à®·à¯ கனà¯à®©à®¿à®¤à¯ தீவà¯à®•ளà¯", + "VI": "யூ.எஸà¯. கனà¯à®©à®¿à®¤à¯ தீவà¯à®•ளà¯", + "VN": "வியடà¯à®¨à®¾à®®à¯", + "VU": "வனà¯à®µà®¾à®Ÿà¯à®Ÿà¯", + "WF": "வாலிஸ௠மறà¯à®±à¯à®®à¯ ஃபà¯à®Ÿà¯à®©à®¾", + "WS": "சமோவா", + "XK": "கொசோவோ", + "YE": "à®à®®à®©à¯", + "YT": "மயோடà¯", + "ZA": "தென௠ஆபà¯à®ªà®¿à®°à®¿à®•à¯à®•ா", + "ZM": "ஜாமà¯à®ªà®¿à®¯à®¾", + "ZW": "ஜிமà¯à®ªà®¾à®ªà¯à®µà¯‡" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/te.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/te.json new file mode 100644 index 0000000000000000000000000000000000000000..d434ddf6612765207f76ca5061f903bcb79b2bd7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/te.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "ఎసెషనౠదీవి", + "AD": "అండొరà±à°°à°¾", + "AE": "à°¯à±à°¨à±ˆà°Ÿà±†à°¡à± అరబౠఎమిరేటà±à°¸à±", + "AF": "ఆఫà±à°˜à°¨à°¿à°¸à±à°¤à°¾à°¨à±", + "AG": "ఆంటిగà±à°µà°¾ మరియౠబారà±à°¬à±à°¡à°¾", + "AI": "ఆంగవిలà±à°²à°¾", + "AL": "à°…à°²à±à°¬à±‡à°¨à°¿à°¯à°¾", + "AM": "ఆరà±à°®à±‡à°¨à°¿à°¯à°¾", + "AO": "అంగోలా", + "AQ": "అంటారà±à°•à°Ÿà°¿à°•à°¾", + "AR": "à°…à°°à±à°œà±†à°‚టీనా", + "AS": "అమెరికనౠసమోవా", + "AT": "ఆసà±à°Ÿà±à°°à°¿à°¯à°¾", + "AU": "ఆసà±à°Ÿà±à°°à±‡à°²à°¿à°¯à°¾", + "AW": "à°…à°°à±à°¬à°¾", + "AX": "ఆలేండౠదీవà±à°²à±", + "AZ": "అజరà±à°¬à±ˆà°œà°¾à°¨à±", + "BA": "బోసà±à°¨à°¿à°¯à°¾ మరియౠహెరà±à°œà±†à°—ొవీనా", + "BB": "బారà±à°¬à°¡à±‹à°¸à±", + "BD": "బంగà±à°²à°¾à°¦à±‡à°¶à±", + "BE": "బెలà±à°œà°¿à°¯à°‚", + "BF": "à°¬à±à°°à±à°•ినా ఫాసో", + "BG": "బలà±à°—ేరియా", + "BH": "బహà±à°°à±†à°¯à°¿à°¨à±", + "BI": "à°¬à±à°°à±à°‚à°¡à°¿", + "BJ": "బెనినà±", + "BL": "సెంటౠబరà±à°¤à±‡à°²à±†à°®à±€", + "BM": "బెరà±à°®à±à°¡à°¾", + "BN": "à°¬à±à°°à±‚నై", + "BO": "బొలీవియా", + "BQ": "కరీబియనౠనెదరà±à°²à°¾à°‚à°¡à±à°¸à±", + "BR": "à°¬à±à°°à±†à°œà°¿à°²à±", + "BS": "బహామాసà±", + "BT": "భూటానà±", + "BW": "బోటà±à°¸à±à°µà°¾à°¨à°¾", + "BY": "బెలారసà±", + "BZ": "బెలిజà±", + "CA": "కెనడా", + "CC": "కోకోసౠ(కీలింగà±) దీవà±à°²à±", + "CD": "కాంగో- à°•à°¿à°¨à±à°·à°¾à°¸à°¾", + "CF": "సెంటà±à°°à°²à± ఆఫà±à°°à°¿à°•నౠరిపబà±à°²à°¿à°•à±", + "CG": "కాంగో- à°¬à±à°°à°¾à°œà°¾à°µà°¿à°²à±à°²à°¿", + "CH": "à°¸à±à°µà°¿à°Ÿà±à°œà°°à±à°²à°¾à°‚à°¡à±", + "CI": "కోటెడౠà°à°µà±‹à°¯à°¿à°°à±", + "CK": "à°•à±à°•ౠదీవà±à°²à±", + "CL": "చిలీ", + "CM": "కామెరూనà±", + "CN": "చైనా", + "CO": "కొలంబియా", + "CR": "కోసà±à°Ÿà°¾ à°°à°¿à°•à°¾", + "CU": "à°•à±à°¯à±‚బా", + "CV": "కేపౠవెరà±à°¡à±‡", + "CW": "à°•à±à°°à°¾à°•వో", + "CX": "à°•à±à°°à°¿à°¸à±à°®à°¸à± దీవి", + "CY": "సైపà±à°°à°¸à±", + "CZ": "చెకౠరిపబà±à°²à°¿à°•à±", + "DE": "జరà±à°®à°¨à±€", + "DG": "డియాగో గారà±à°¸à°¿à°¯à°¾", + "DJ": "జిబౌటి", + "DK": "డెనà±à°®à°¾à°°à±à°•à±", + "DM": "డొమెనికా", + "DO": "డొమెనికనౠరిపబà±à°²à°¿à°•à±", + "DZ": "à°…à°²à±à°œà±€à°°à°¿à°¯à°¾", + "EA": "à°¸à±à°¯à±‚à°Ÿà°¾ & మెలిలà±à°²à°¾", + "EC": "ఈకà±à°µà°¡à°¾à°°à±", + "EE": "à°Žà°¸à±à°Ÿà±‹à°¨à°¿à°¯à°¾", + "EG": "ఈజిపà±à°Ÿà±", + "EH": "పడమటి సహారా", + "ER": "à°Žà°°à°¿à°Ÿà±à°°à°¿à°¯à°¾", + "ES": "à°¸à±à°ªà±†à°¯à°¿à°¨à±", + "ET": "ఇథియోపియా", + "FI": "à°«à°¿à°¨à±à°²à°¾à°‚à°¡à±", + "FJ": "ఫిజీ", + "FK": "ఫాకà±â€Œà°²à±à°¯à°¾à°‚డౠదీవà±à°²à±", + "FM": "మైకà±à°°à±‹à°¨à±‡à°·à°¿à°¯à°¾", + "FO": "ఫారో దీవà±à°²à±", + "FR": "à°«à±à°°à°¾à°¨à±à°¸à±â€Œ", + "GA": "గాబనà±", + "GB": "à°¯à±à°¨à±ˆà°Ÿà±†à°¡à± à°•à°¿à°‚à°—à±â€Œà°¡à°®à±", + "GD": "à°—à±à°°à±†à°¨à±†à°¡à°¾", + "GE": "జారà±à°œà°¿à°¯à°¾", + "GF": "à°«à±à°°à±†à°‚చౠగియానా", + "GG": "à°—à±à°µà±‡à°°à±à°¨à°¸à±‡", + "GH": "ఘనా", + "GI": "జిబà±à°°à°¾à°²à±à°Ÿà°¾à°°à±", + "GL": "à°—à±à°°à±€à°¨à±â€Œà°²à°¾à°‚à°¡à±", + "GM": "గాంబియా", + "GN": "గినియా", + "GP": "à°—à±à°µà°¾à°¡à±‡à°²à±‹à°ªà±", + "GQ": "ఈకà±à°µà°Ÿà±‹à°°à°¿à°¯à°²à± గినియా", + "GR": "à°—à±à°°à±€à°¸à±", + "GS": "దకà±à°·à°¿à°£ జారà±à°œà°¿à°¯à°¾ & దకà±à°·à°¿à°£ శాండà±à°µà°¿à°šà± దీవà±à°²à±", + "GT": "à°—à±à°µà°¾à°Ÿà°¿à°®à°¾à°²", + "GU": "à°—à±à°µà°¾à°®à±", + "GW": "గినియా-బిసà±à°¸à°¾à°µà±", + "GY": "గయానా", + "HK": "హాంకాంగౠఎసà±à°à°†à°°à± చైనా", + "HN": "హోండà±à°°à°¾à°¸à±", + "HR": "à°•à±à°°à±‹à°¯à±‡à°·à°¿à°¯à°¾", + "HT": "హైటి", + "HU": "హంగేరీ", + "IC": "కేనరీ దీవà±à°²à±", + "ID": "ఇండోనేషియా", + "IE": "à°à°°à±à°²à°¾à°‚à°¡à±", + "IL": "ఇజà±à°°à°¾à°¯à°¿à°²à±", + "IM": "à°à°²à± ఆఫౠమానà±", + "IN": "భారత దేశం", + "IO": "à°¬à±à°°à°¿à°Ÿà±€à°·à± భారతీయ సమà±à°¦à±à°°à°ªà± à°ªà±à°°à°¾à°‚తం", + "IQ": "ఇరాకà±", + "IR": "ఇరానà±", + "IS": "à°à°¸à±à°²à°¾à°‚à°¡à±", + "IT": "ఇటలీ", + "JE": "జెరà±à°¸à±€", + "JM": "జమైకా", + "JO": "జోరà±à°¡à°¾à°¨à±", + "JP": "జపానà±", + "KE": "కెనà±à°¯à°¾", + "KG": "à°•à°¿à°°à±à°—ిజిసà±à°¤à°¾à°¨à±", + "KH": "కంబోడియా", + "KI": "కిరిబాటి", + "KM": "కొమొరోసà±", + "KN": "సెంటౠకిటà±à°Ÿà±à°¸à± మరియౠనెవిసà±", + "KP": "ఉతà±à°¤à°° కొరియా", + "KR": "దకà±à°·à°¿à°£ కొరియా", + "KW": "à°•à±à°µà±ˆà°Ÿà±", + "KY": "కేమానౠదీవà±à°²à±", + "KZ": "కజకసà±à°¤à°¾à°¨à±", + "LA": "లావోసà±", + "LB": "లెబనానà±", + "LC": "సెంటౠలూసియా", + "LI": "లికà±à°Ÿà±†à°¸à±à°Ÿà±‡à°¨à±", + "LK": "à°¶à±à°°à±€à°²à°‚à°•", + "LR": "లైబీరియా", + "LS": "లెసోతో", + "LT": "లిథà±à°µà±‡à°¨à°¿à°¯à°¾", + "LU": "లకà±à°¸à°‚బరà±à°—à±", + "LV": "లాతà±à°µà°¿à°¯à°¾", + "LY": "లిబియా", + "MA": "మొరాకో", + "MC": "మొనాకో", + "MD": "మోలà±à°¡à±‹à°µà°¾", + "ME": "మోంటేనేగà±à°°à±‹", + "MF": "సెంటౠమారà±à°Ÿà°¿à°¨à±", + "MG": "మడగాసà±à°•à°°à±", + "MH": "మారà±à°·à°²à± దీవà±à°²à±", + "MK": "మేసిడోనియా", + "ML": "మాలి", + "MM": "మయనà±à°®à°¾à°°à± (బరà±à°®à°¾)", + "MN": "మంగోలియా", + "MO": "మకావౠఎసà±à°à°†à°°à± చైనా", + "MP": "ఉతà±à°¤à°° మరియానా దీవà±à°²à±", + "MQ": "మారà±à°Ÿà°¿à°¨à°¿à°•à±", + "MR": "మౌరిటేనియా", + "MS": "మోంటà±à°¸à±‡à°°à±à°°à°¾à°Ÿà±", + "MT": "మాలà±à°Ÿà°¾", + "MU": "మారిషసà±", + "MV": "మాలà±à°¦à±€à°µà±à°²à±", + "MW": "మాలావి", + "MX": "మెకà±à°¸à°¿à°•ో", + "MY": "మలేషియా", + "MZ": "మొజాంబికà±", + "NA": "నమీబియా", + "NC": "à°•à±à°°à±Šà°¤à±à°¤ కాలెడోనియా", + "NE": "నైజరà±", + "NF": "నారà±à°«à±‹à°•ౠదీవి", + "NG": "నైజీరియా", + "NI": "నికరాగà±à°µà°¾", + "NL": "నెదరà±à°²à°¾à°‚à°¡à±à°¸à±", + "NO": "నారà±à°µà±‡", + "NP": "నేపాలà±", + "NR": "నౌరà±", + "NU": "నియà±", + "NZ": "à°¨à±à°¯à±‚జిలాండà±", + "OM": "ఒమనà±", + "PA": "పనామా", + "PE": "పెరూ", + "PF": "à°«à±à°°à±†à°‚చౠపోలినిషియా", + "PG": "పాపà±à°µà°¾ à°¨à±à°¯à± గినియా", + "PH": "ఫిలిపà±à°ªà±€à°¨à±à°¸à±", + "PK": "పాకిసà±à°¤à°¾à°¨à±", + "PL": "పోలాండà±", + "PM": "సెంటౠపియెరౠమరియౠమికెలానà±", + "PN": "పిటà±â€Œà°•ెయిరà±à°¨à± దీవà±à°²à±", + "PR": "à°«à±à°¯à±‚à°°à±à°Ÿà±‹ రికో", + "PS": "పాలసà±à°¤à±€à°¨à°¿à°¯à°¨à± à°ªà±à°°à°¾à°‚తాలà±", + "PT": "పోరà±à°šà±à°—à°²à±", + "PW": "పలావà±", + "PY": "పరాగà±à°µà±‡", + "QA": "ఖతరà±", + "RE": "రియూనియనà±", + "RO": "రోమానియా", + "RS": "సెరà±à°¬à°¿à°¯à°¾", + "RU": "à°°à°·à±à°¯à°¾", + "RW": "à°°à±à°µà°¾à°‚à°¡à°¾", + "SA": "సౌదీ అరేబియా", + "SB": "సోలమనౠదీవà±à°²à±", + "SC": "సీషెలà±à°¸à±", + "SD": "సూడానà±", + "SE": "à°¸à±à°µà±€à°¡à°¨à±", + "SG": "సింగపూరà±", + "SH": "సెయింటౠహెలినా", + "SI": "à°¸à±à°²à±‹à°µà±‡à°¨à°¿à°¯à°¾", + "SJ": "à°¸à±à°µà°¾à°²à±à°¬à°¾à°°à±à°¡à± మరియౠయానౠమాయేనà±", + "SK": "à°¸à±à°²à±‹à°µà±‡à°•ియా", + "SL": "సియెరà±à°°à°¾ లియానà±", + "SM": "సానౠమారినో", + "SN": "సెనెగలà±", + "SO": "సోమాలియా", + "SR": "సూరినామà±", + "SS": "దకà±à°·à°¿à°£ సూడానà±", + "ST": "సావోటోమౠ& à°ªà±à°°à°¿à°¨à±à°¸à°¿à°ªà±‡", + "SV": "ఎలౠసాలà±à°µà°¡à±‹à°°à±", + "SX": "సింటౠమారà±à°Ÿà±†à°¨à±", + "SY": "సిరియా", + "SZ": "à°¸à±à°µà°¾à°œà°¿à°²à±à°¯à°¾à°‚à°¡à±", + "TA": "à°Ÿà±à°°à°¿à°¸à±à°Ÿà°¨à± à°¡ à°•à°¨à±à°¹à°¾", + "TC": "à°¤à±à°°à±à°•ౠమరియౠకాలికోసౠదీవà±à°²à±", + "TD": "చాదà±", + "TF": "à°«à±à°°à±†à°‚చౠదకà±à°·à°¿à°£ à°ªà±à°°à°¾à°‚తాలà±", + "TG": "టోగో", + "TH": "థాయిలాండà±", + "TJ": "తజికిసà±à°¤à°¾à°¨à±", + "TK": "టోకేలావà±", + "TL": "టిమోరà±-లెసà±à°Ÿà±†", + "TM": "à°¤à±à°°à±à°•మేనిసà±à°¤à°¾à°¨à±", + "TN": "à°Ÿà±à°¯à±à°¨à±€à°·à°¿à°¯à°¾", + "TO": "టోంగా", + "TR": "à°Ÿà°°à±à°•à±€", + "TT": "à°Ÿà±à°°à°¿à°¨à°¿à°¡à°¾à°¡à± మరియౠటొబాగో", + "TV": "à°Ÿà±à°µà°¾à°²à±", + "TW": "తైవానà±", + "TZ": "టాంజానియా", + "UA": "ఉకà±à°°à±†à°¯à°¿à°¨à±", + "UG": "ఉగాండా", + "UM": "సంయà±à°•à±à°¤ రాజà±à°¯ అమెరికా బయట ఉనà±à°¨ దీవà±à°²à±", + "UN": "à°¯à±à°¨à±ˆà°Ÿà±†à°¡à± నేషనà±à°¸à±", + "US": "అమెరికా సంయà±à°•à±à°¤ రాషà±à°Ÿà±à°°à°¾à°²à±", + "UY": "à°Šà°°à±à°—à±à°µà±‡", + "UZ": "ఉజà±à°¬à±†à°•à°¿à°¸à±à°¤à°¾à°¨à±", + "VA": "వాటికనౠనగరం", + "VC": "సెంటౠవినà±à°¸à±†à°‚టౠమరియౠగà±à°°à±†à°¨à°¡à±€à°¨à±à°¸à±", + "VE": "వెనà±à°œà±à°²à°¾", + "VG": "à°¬à±à°°à°¿à°Ÿà°¿à°·à± వరà±à°œà°¿à°¨à± దీవà±à°²à±", + "VI": "à°¯à±.à°Žà°¸à±. వరà±à°œà°¿à°¨à± దీవà±à°²à±", + "VN": "వియతà±à°¨à°¾à°‚", + "VU": "వనాటà±", + "WF": "వాలిసౠ& à°«à±à°¯à±à°¤à±à°¯à±à°¨à°¾", + "WS": "సమోవా", + "XK": "కొసోవో", + "YE": "యెమెనà±", + "YT": "మాయొటà±à°Ÿà°¿", + "ZA": "దకà±à°·à°¿à°£ ఆఫà±à°°à°¿à°•à°¾", + "ZM": "జాంబియా", + "ZW": "జింబాబà±à°µà±‡" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/th.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/th.json new file mode 100644 index 0000000000000000000000000000000000000000..7cb79d72e53b72f168bd3cea9b137e6bfd394216 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/th.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "เà¸à¸²à¸°à¹à¸­à¸ªà¹€à¸‹à¸™à¸Šà¸±à¸™", + "AD": "อันดอร์รา", + "AE": "สหรัà¸à¸­à¸²à¸«à¸£à¸±à¸šà¹€à¸­à¸¡à¸´à¹€à¸£à¸•ส์", + "AF": "อัฟà¸à¸²à¸™à¸´à¸ªà¸–าน", + "AG": "à¹à¸­à¸™à¸•ิà¸à¸²à¹à¸¥à¸°à¸šà¸²à¸£à¹Œà¸šà¸¹à¸”า", + "AI": "à¹à¸­à¸‡à¸à¸§à¸´à¸¥à¸¥à¸²", + "AL": "à¹à¸­à¸¥à¹€à¸šà¹€à¸™à¸µà¸¢", + "AM": "อาร์เมเนีย", + "AO": "à¹à¸­à¸‡à¹‚à¸à¸¥à¸²", + "AQ": "à¹à¸­à¸™à¸•าร์à¸à¸•ิà¸à¸²", + "AR": "อาร์เจนตินา", + "AS": "อเมริà¸à¸±à¸™à¸‹à¸²à¸¡à¸±à¸§", + "AT": "ออสเตรีย", + "AU": "ออสเตรเลีย", + "AW": "อารูบา", + "AX": "หมู่เà¸à¸²à¸°à¹‚อลันด์", + "AZ": "อาเซอร์ไบจาน", + "BA": "บอสเนียà¹à¸¥à¸°à¹€à¸®à¸­à¸£à¹Œà¹€à¸‹à¹‚à¸à¸§à¸µà¸™à¸²", + "BB": "บาร์เบโดส", + "BD": "บังà¸à¸¥à¸²à¹€à¸—ศ", + "BE": "เบลเยียม", + "BF": "บูร์à¸à¸´à¸™à¸²à¸Ÿà¸²à¹‚ซ", + "BG": "บัลà¹à¸à¹€à¸£à¸µà¸¢", + "BH": "บาห์เรน", + "BI": "บุรุนดี", + "BJ": "เบนิน", + "BL": "เซนต์บาร์เธเลมี", + "BM": "เบอร์มิวดา", + "BN": "บรูไน", + "BO": "โบลิเวีย", + "BQ": "เนเธอร์à¹à¸¥à¸™à¸”์à¹à¸„ริบเบียน", + "BR": "บราซิล", + "BS": "บาฮามาส", + "BT": "ภูà¸à¸²à¸™", + "BW": "บอตสวานา", + "BY": "เบลารุส", + "BZ": "เบลีซ", + "CA": "à¹à¸„นาดา", + "CC": "หมู่เà¸à¸²à¸°à¹‚คโคส (คีลิง)", + "CD": "คองโà¸-à¸à¸´à¸™à¸Šà¸²à¸‹à¸²", + "CF": "สาธารณรัà¸à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¸à¸¥à¸²à¸‡", + "CG": "คองโà¸-บราซซาวิล", + "CH": "สวิตเซอร์à¹à¸¥à¸™à¸”์", + "CI": "โà¸à¸•ดิวัวร์", + "CK": "หมู่เà¸à¸²à¸°à¸„ุà¸", + "CL": "ชิลี", + "CM": "à¹à¸„เมอรูน", + "CN": "จีน", + "CO": "โคลอมเบีย", + "CR": "คอสตาริà¸à¸²", + "CU": "คิวบา", + "CV": "เคปเวิร์ด", + "CW": "คูราเซา", + "CX": "เà¸à¸²à¸°à¸„ริสต์มาส", + "CY": "ไซปรัส", + "CZ": "สาธารณรัà¸à¹€à¸Šà¹‡à¸", + "DE": "เยอรมนี", + "DG": "ดิเอโà¸à¸à¸²à¸£à¹Œà¹€à¸‹à¸µà¸¢", + "DJ": "จิบูตี", + "DK": "เดนมาร์à¸", + "DM": "โดมินิà¸à¸²", + "DO": "สาธารณรัà¸à¹‚ดมินิà¸à¸±à¸™", + "DZ": "à¹à¸­à¸¥à¸ˆà¸µà¹€à¸£à¸µà¸¢", + "EA": "เซวตาà¹à¸¥à¸°à¹€à¸¡à¸¥à¸µà¸¢à¸²", + "EC": "เอà¸à¸§à¸²à¸”อร์", + "EE": "เอสโตเนีย", + "EG": "อียิปต์", + "EH": "ซาฮาราตะวันตà¸", + "ER": "เอริเทรีย", + "ES": "สเปน", + "ET": "เอธิโอเปีย", + "FI": "ฟินà¹à¸¥à¸™à¸”์", + "FJ": "ฟิจิ", + "FK": "หมู่เà¸à¸²à¸°à¸Ÿà¸­à¸¥à¹Œà¸à¹à¸¥à¸™à¸”์", + "FM": "ไมโครนีเซีย", + "FO": "หมู่เà¸à¸²à¸°à¹à¸Ÿà¹‚ร", + "FR": "à¸à¸£à¸±à¹ˆà¸‡à¹€à¸¨à¸ª", + "GA": "à¸à¸²à¸šà¸­à¸‡", + "GB": "สหราชอาณาจัà¸à¸£", + "GD": "เà¸à¸£à¹€à¸™à¸”า", + "GE": "จอร์เจีย", + "GF": "เฟรนช์เà¸à¸µà¸¢à¸™à¸²", + "GG": "เà¸à¸´à¸£à¹Œà¸™à¸‹à¸µà¸¢à¹Œ", + "GH": "à¸à¸²à¸™à¸²", + "GI": "ยิบรอลตาร์", + "GL": "à¸à¸£à¸µà¸™à¹à¸¥à¸™à¸”์", + "GM": "à¹à¸à¸¡à¹€à¸šà¸µà¸¢", + "GN": "à¸à¸´à¸™à¸µ", + "GP": "à¸à¸§à¸²à¹€à¸”อลูป", + "GQ": "อิเควทอเรียลà¸à¸´à¸™à¸µ", + "GR": "à¸à¸£à¸µà¸‹", + "GS": "เà¸à¸²à¸°à¹€à¸‹à¸²à¸—์จอร์เจียà¹à¸¥à¸°à¸«à¸¡à¸¹à¹ˆà¹€à¸à¸²à¸°à¹€à¸‹à¸²à¸—์à¹à¸‹à¸™à¸”์วิช", + "GT": "à¸à¸±à¸§à¹€à¸•มาลา", + "GU": "à¸à¸§à¸¡", + "GW": "à¸à¸´à¸™à¸µ-บิสเซา", + "GY": "à¸à¸²à¸¢à¸­à¸²à¸™à¸²", + "HK": "เขตปà¸à¸„รองพิเศษฮ่องà¸à¸‡à¹à¸«à¹ˆà¸‡à¸ªà¸²à¸˜à¸²à¸£à¸“รัà¸à¸›à¸£à¸°à¸Šà¸²à¸Šà¸™à¸ˆà¸µà¸™", + "HN": "ฮอนดูรัส", + "HR": "โครเอเชีย", + "HT": "เฮติ", + "HU": "ฮังà¸à¸²à¸£à¸µ", + "IC": "หมู่เà¸à¸²à¸°à¸„านารี", + "ID": "อินโดนีเซีย", + "IE": "ไอร์à¹à¸¥à¸™à¸”์", + "IL": "อิสราเอล", + "IM": "เà¸à¸²à¸°à¹à¸¡à¸™", + "IN": "อินเดีย", + "IO": "บริติชอินเดียนโอเชียนเทร์ริทอรี", + "IQ": "อิรัà¸", + "IR": "อิหร่าน", + "IS": "ไอซ์à¹à¸¥à¸™à¸”์", + "IT": "อิตาลี", + "JE": "เจอร์ซีย์", + "JM": "จาเมà¸à¸²", + "JO": "จอร์à¹à¸”น", + "JP": "à¸à¸µà¹ˆà¸›à¸¸à¹ˆà¸™", + "KE": "เคนยา", + "KG": "คีร์à¸à¸µà¸‹à¸ªà¸–าน", + "KH": "à¸à¸±à¸¡à¸žà¸¹à¸Šà¸²", + "KI": "คิริบาส", + "KM": "คอโมโรส", + "KN": "เซนต์คิตส์à¹à¸¥à¸°à¹€à¸™à¸§à¸´à¸ª", + "KP": "เà¸à¸²à¸«à¸¥à¸µà¹€à¸«à¸™à¸·à¸­", + "KR": "เà¸à¸²à¸«à¸¥à¸µà¹ƒà¸•้", + "KW": "คูเวต", + "KY": "หมู่เà¸à¸²à¸°à¹€à¸„ย์à¹à¸¡à¸™", + "KZ": "คาซัคสถาน", + "LA": "ลาว", + "LB": "เลบานอน", + "LC": "เซนต์ลูเซีย", + "LI": "ลิà¸à¹€à¸•นสไตน์", + "LK": "ศรีลังà¸à¸²", + "LR": "ไลบีเรีย", + "LS": "เลโซโท", + "LT": "ลิทัวเนีย", + "LU": "ลัà¸à¹€à¸‹à¸¡à¹€à¸šà¸´à¸£à¹Œà¸", + "LV": "ลัตเวีย", + "LY": "ลิเบีย", + "MA": "โมร็อà¸à¹‚à¸", + "MC": "โมนาโà¸", + "MD": "มอลโดวา", + "ME": "มอนเตเนโà¸à¸£", + "MF": "เซนต์มาติน", + "MG": "มาดาà¸à¸±à¸ªà¸à¸²à¸£à¹Œ", + "MH": "หมู่เà¸à¸²à¸°à¸¡à¸²à¸£à¹Œà¹à¸Šà¸¥à¸¥à¹Œ", + "MK": "มาซิโดเนีย", + "ML": "มาลี", + "MM": "เมียนมาร์ (พม่า)", + "MN": "มองโà¸à¹€à¸¥à¸µà¸¢", + "MO": "เขตปà¸à¸„รองพิเศษมาเà¸à¹Šà¸²à¹à¸«à¹ˆà¸‡à¸ªà¸²à¸˜à¸²à¸£à¸“รัà¸à¸›à¸£à¸°à¸Šà¸²à¸Šà¸™à¸ˆà¸µà¸™", + "MP": "หมู่เà¸à¸²à¸°à¸™à¸­à¸£à¹Œà¹€à¸—ิร์นมาเรียนา", + "MQ": "มาร์ตินีà¸", + "MR": "มอริเตเนีย", + "MS": "มอนต์เซอร์รัต", + "MT": "มอลตา", + "MU": "มอริเชียส", + "MV": "มัลดีฟส์", + "MW": "มาลาวี", + "MX": "เม็à¸à¸‹à¸´à¹‚à¸", + "MY": "มาเลเซีย", + "MZ": "โมซัมบิà¸", + "NA": "นามิเบีย", + "NC": "นิวà¹à¸„ลิโดเนีย", + "NE": "ไนเจอร์", + "NF": "เà¸à¸²à¸°à¸™à¸­à¸£à¹Œà¸Ÿà¸­à¸¥à¹Œà¸", + "NG": "ไนจีเรีย", + "NI": "นิà¸à¸²à¸£à¸²à¸à¸±à¸§", + "NL": "เนเธอร์à¹à¸¥à¸™à¸”์", + "NO": "นอร์เวย์", + "NP": "เนปาล", + "NR": "นาอูรู", + "NU": "นีอูเอ", + "NZ": "นิวซีà¹à¸¥à¸™à¸”์", + "OM": "โอมาน", + "PA": "ปานามา", + "PE": "เปรู", + "PF": "เฟรนช์โปลินีเซีย", + "PG": "ปาปัวนิวà¸à¸´à¸™à¸µ", + "PH": "ฟิลิปปินส์", + "PK": "ปาà¸à¸µà¸ªà¸–าน", + "PL": "โปà¹à¸¥à¸™à¸”์", + "PM": "à¹à¸‹à¸‡à¸›à¸µà¹à¸¢à¸£à¹Œà¹à¸¥à¸°à¸¡à¸µà¹€à¸à¸­à¸¥à¸‡", + "PN": "หมู่เà¸à¸²à¸°à¸žà¸´à¸•à¹à¸„ร์น", + "PR": "เปอร์โตริโà¸", + "PS": "ดินà¹à¸”นปาเลสไตน์", + "PT": "โปรตุเà¸à¸ª", + "PW": "ปาเลา", + "PY": "ปาราà¸à¸§à¸±à¸¢", + "QA": "à¸à¸²à¸•าร์", + "RE": "เรอูนียง", + "RO": "โรมาเนีย", + "RS": "เซอร์เบีย", + "RU": "รัสเซีย", + "RW": "รวันดา", + "SA": "ซาอุดีอาระเบีย", + "SB": "หมู่เà¸à¸²à¸°à¹‚ซโลมอน", + "SC": "เซเชลส์", + "SD": "ซูดาน", + "SE": "สวีเดน", + "SG": "สิงคโปร์", + "SH": "เซนต์เฮเลนา", + "SI": "สโลวีเนีย", + "SJ": "สฟาลบาร์à¹à¸¥à¸°à¸¢à¸²à¸™à¹„มเอน", + "SK": "สโลวะเà¸à¸µà¸¢", + "SL": "เซียร์ราลีโอน", + "SM": "ซานมารีโน", + "SN": "เซเนà¸à¸±à¸¥", + "SO": "โซมาเลีย", + "SR": "ซูรินาเม", + "SS": "ซูดานใต้", + "ST": "เซาตูเมà¹à¸¥à¸°à¸›à¸£à¸´à¸™à¸‹à¸´à¸›à¸µ", + "SV": "เอลซัลวาดอร์", + "SX": "เซนต์มาร์ติน", + "SY": "ซีเรีย", + "SZ": "สวาซิà¹à¸¥à¸™à¸”์", + "TA": "ทริสตัน เดอ คูนา", + "TC": "หมู่เà¸à¸²à¸°à¹€à¸•ิà¸à¸ªà¹Œà¹à¸¥à¸°à¸«à¸¡à¸¹à¹ˆà¹€à¸à¸²à¸°à¹€à¸„คอส", + "TD": "ชาด", + "TF": "เฟรนช์เซาเทิร์นเทร์ริทอรีส์", + "TG": "โตโà¸", + "TH": "ไทย", + "TJ": "ทาจิà¸à¸´à¸ªà¸–าน", + "TK": "โตเà¸à¹€à¸¥à¸²", + "TL": "ติมอร์-เลสเต", + "TM": "เติร์à¸à¹€à¸¡à¸™à¸´à¸ªà¸–าน", + "TN": "ตูนิเซีย", + "TO": "ตองà¸à¸²", + "TR": "ตุรà¸à¸µ", + "TT": "ตรินิà¹à¸”ดà¹à¸¥à¸°à¹‚ตเบโà¸", + "TV": "ตูวาลู", + "TW": "ไต้หวัน", + "TZ": "à¹à¸—นซาเนีย", + "UA": "ยูเครน", + "UG": "ยูà¸à¸±à¸™à¸”า", + "UM": "หมู่เà¸à¸²à¸°à¸£à¸­à¸šà¸™à¸­à¸à¸‚องสหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸²", + "UN": "สหประชาชาติ", + "US": "สหรัà¸à¸­à¹€à¸¡à¸£à¸´à¸à¸²", + "UY": "อุรุà¸à¸§à¸±à¸¢", + "UZ": "อุซเบà¸à¸´à¸ªà¸–าน", + "VA": "นครวาติà¸à¸±à¸™", + "VC": "เซนต์วินเซนต์à¹à¸¥à¸°à¹€à¸à¸£à¸™à¸²à¸”ีนส์", + "VE": "เวเนซุเอลา", + "VG": "หมู่เà¸à¸²à¸°à¸šà¸£à¸´à¸•ิชเวอร์จิน", + "VI": "หมู่เà¸à¸²à¸°à¸¢à¸¹à¹€à¸­à¸ªà¹€à¸§à¸­à¸£à¹Œà¸ˆà¸´à¸™", + "VN": "เวียดนาม", + "VU": "วานูอาตู", + "WF": "วาลลิสà¹à¸¥à¸°à¸Ÿà¸¸à¸•ูนา", + "WS": "ซามัว", + "XK": "โคโซโว", + "YE": "เยเมน", + "YT": "มายอต", + "ZA": "à¹à¸­à¸Ÿà¸£à¸´à¸à¸²à¹ƒà¸•้", + "ZM": "à¹à¸‹à¸¡à¹€à¸šà¸µà¸¢", + "ZW": "ซิมบับเว" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/tl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/tl.json new file mode 100644 index 0000000000000000000000000000000000000000..e5243881fea49e17387a1868c30a0c885025df30 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/tl.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Acsencion island", + "AD": "Andorra", + "AE": "United Arab Emirates", + "AF": "Afghanistan", + "AG": "Antigua and Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Antarctica", + "AR": "Argentina", + "AS": "American Samoa", + "AT": "Austria", + "AU": "Australia", + "AW": "Aruba", + "AX": "Ã…land Islands", + "AZ": "Azerbaijan", + "BA": "Bosnia and Herzegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgium", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Caribbean Netherlands", + "BR": "Brazil", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Canada", + "CC": "Cocos (Keeling) Islands", + "CD": "Congo - Kinshasa", + "CF": "Central African Republic", + "CG": "Congo - Brazzaville", + "CH": "Switzerland", + "CI": "Côte d’Ivoire", + "CK": "Cook Islands", + "CL": "Chile", + "CM": "Cameroon", + "CN": "China", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Cape Verde", + "CW": "Curaçao", + "CX": "Christmas Island", + "CY": "Cyprus", + "CZ": "Czech Republic", + "DE": "Germany", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Denmark", + "DM": "Dominica", + "DO": "Dominican Republic", + "DZ": "Algeria", + "EA": "Ceuta and Melilla", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Egypt", + "EH": "Kanlurang Sahara", + "ER": "Eritrea", + "ES": "Spain", + "ET": "Ethiopia", + "FI": "Finland", + "FJ": "Fiji", + "FK": "Falkland Islands", + "FM": "Micronesia", + "FO": "Faroe Islands", + "FR": "France", + "GA": "Gabon", + "GB": "United Kingdom", + "GD": "Grenada", + "GE": "Georgia", + "GF": "French Guiana", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Greenland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Equatorial Guinea", + "GR": "Greece", + "GS": "South Georgia and the South Sandwich Islands", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hong Kong SAR China", + "HN": "Honduras", + "HR": "Croatia", + "HT": "Haiti", + "HU": "Hungary", + "IC": "Canary Islands", + "ID": "Indonesia", + "IE": "Ireland", + "IL": "Israel", + "IM": "Isle of Man", + "IN": "India", + "IO": "British Indian Ocean Territory", + "IQ": "Iraq", + "IR": "Iran", + "IS": "Iceland", + "IT": "Italy", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordan", + "JP": "Japan", + "KE": "Kenya", + "KG": "Kyrgyzstan", + "KH": "Cambodia", + "KI": "Kiribati", + "KM": "Comoros", + "KN": "Saint Kitts and Nevis", + "KP": "Hilagang Korea", + "KR": "Timog Korea", + "KW": "Kuwait", + "KY": "Cayman Islands", + "KZ": "Kazakhstan", + "LA": "Laos", + "LB": "Lebanon", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Lithuania", + "LU": "Luxembourg", + "LV": "Latvia", + "LY": "Libya", + "MA": "Morocco", + "MC": "Monaco", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "Saint Martin", + "MG": "Madagascar", + "MH": "Marshall Islands", + "MK": "Macedonia", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "Mongolia", + "MO": "Macau SAR China", + "MP": "Northern Mariana Islands", + "MQ": "Martinique", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldives", + "MW": "Malawi", + "MX": "Mexico", + "MY": "Malaysia", + "MZ": "Mozambique", + "NA": "Namibia", + "NC": "New Caledonia", + "NE": "Niger", + "NF": "Norfolk Island", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Netherlands", + "NO": "Norway", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "New Zealand", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "French Polynesia", + "PG": "Papua New Guinea", + "PH": "Pilipinas", + "PK": "Pakistan", + "PL": "Poland", + "PM": "Saint Pierre and Miquelon", + "PN": "Pitcairn Islands", + "PR": "Puerto Rico", + "PS": "Palestinian Territories", + "PT": "Portugal", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Romania", + "RS": "Serbia", + "RU": "Russia", + "RW": "Rwanda", + "SA": "Saudi Arabia", + "SB": "Solomon Islands", + "SC": "Seychelles", + "SD": "Sudan", + "SE": "Sweden", + "SG": "Singapore", + "SH": "Saint Helena", + "SI": "Slovenia", + "SJ": "Svalbard and Jan Mayen", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "SS": "Timog Sudan", + "ST": "São Tomé and Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syria", + "SZ": "Swaziland", + "TA": "Tristan de Cunha", + "TC": "Turks and Caicos Islands", + "TD": "Chad", + "TF": "French Southern Territories", + "TG": "Togo", + "TH": "Thailand", + "TJ": "Tajikistan", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Turkey", + "TT": "Trinidad and Tobago", + "TV": "Tuvalu", + "TW": "Taiwan", + "TZ": "Tanzania", + "UA": "Ukraine", + "UG": "Uganda", + "UM": "U.S. Outlying Islands", + "UN": "Nagkakaisang Bansa", + "US": "Estados Unidos", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VA": "Vatican City", + "VC": "Saint Vincent and the Grenadines", + "VE": "Venezuela", + "VG": "British Virgin Islands", + "VI": "U.S. Virgin Islands", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis and Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yemen", + "YT": "Mayotte", + "ZA": "South Africa", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/to.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/to.json new file mode 100644 index 0000000000000000000000000000000000000000..1fc7c721ec6b815a8e7c86e4d1309e269d5bc643 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/to.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.27.98", + "Names": { + "AC": "Motu Ê»Asenisini", + "AD": "Ê»Anitola", + "AE": "Ê»Alepea Fakatahataha", + "AF": "Ê»AfikÄnisitani", + "AG": "Anitikua mo Palaputa", + "AI": "Anikuila", + "AL": "Ê»Alipania", + "AM": "ʻĀmenia", + "AO": "Ê»Angikola", + "AQ": "Ê»AnitÄtika", + "AR": "Ê»Asenitina", + "AS": "HaÊ»amoa Ê»Amelika", + "AT": "Ê»Aositulia", + "AU": "Ê»AositelÄ“lia", + "AW": "Ê»Alupa", + "AX": "Ê»Otumotu Ê»Alani", + "AZ": "Ê»Asapaisani", + "BA": "Posinia mo HesikÅvina", + "BB": "PÄpeitosi", + "BD": "PengilÄtesi", + "BE": "Pelesiume", + "BF": "Pekano Faso", + "BG": "Pulukalia", + "BH": "Paleini", + "BI": "Puluniti", + "BJ": "Penini", + "BL": "SÄ PatÄ“lemi", + "BM": "PÄ“muta", + "BN": "Pulunei", + "BO": "PolÄ«via", + "BQ": "Kalipiane fakahÅlani", + "BR": "PalÄsili", + "BS": "Pahama", + "BT": "PÅ«tani", + "BW": "Potisiuana", + "BY": "Pelalusi", + "BZ": "Pelise", + "CA": "KÄnata", + "CC": "Ê»Otumotu Koko", + "CD": "Kongo - Kinisasa", + "CF": "Lipapilika Ê»Afilika Lotoloto", + "CG": "Kongo - Palasavila", + "CH": "Suisilani", + "CI": "Matafonua Ê»AivolÄ«", + "CK": "Ê»Otumotu Kuki", + "CL": "Sili", + "CM": "Kameluni", + "CN": "Siaina", + "CO": "Kolomipia", + "CR": "Kosita Lika", + "CU": "Kiupa", + "CV": "MuiÊ»i VÄ“te", + "CW": "Kulasao", + "CX": "Motu Kilisimasi", + "CY": "Saipalesi", + "CZ": "Lipapilika Seki", + "DE": "Siamane", + "DG": "Tieko KÄsia", + "DJ": "Siputi", + "DK": "TenimaÊ»ake", + "DM": "Tominika", + "DO": "Lipapilika Tominika", + "DZ": "Ê»Aisilia", + "EA": "Siuta mo Melila", + "EC": "Ê»Ekuetoa", + "EE": "Ê»EsitÅnia", + "EG": "Ê»Isipite", + "EH": "Sahala fakahihifo", + "ER": "Ê»Elitulia", + "ES": "Sipeini", + "ET": "ʻĪtiÅpia", + "FI": "Finilani", + "FJ": "Fisi", + "FK": "Ê»Otumotu Fokulani", + "FM": "MikolonÄ«sia", + "FO": "Ê»Otumotu Faloe", + "FR": "FalanisÄ“", + "GA": "Kaponi", + "GB": "PilitÄnia", + "GD": "KelenatÄ", + "GE": "SeÅsia", + "GF": "Kuiana fakafalanisÄ“", + "GG": "KuenisÄ«", + "GH": "Kana", + "GI": "SipalÄlitÄ", + "GL": "Kulinilani", + "GM": "Kamipia", + "GN": "Kini", + "GP": "Kuatalupe", + "GQ": "Ê»Ekueta Kini", + "GR": "Kalisi", + "GS": "Ê»Otumotu SeÅsia-tonga mo Saniuisi-tonga", + "GT": "Kuatamala", + "GU": "Kuamu", + "GW": "Kini-Pisau", + "GY": "Kuiana", + "HK": "Hongi Kongi SAR Siaina", + "HN": "Honitulasi", + "HR": "Kuloisia", + "HT": "Haiti", + "HU": "Hungakalia", + "IC": "Ê»Otumotu Kaneli", + "ID": "Ê»InitonÄ“sia", + "IE": "Ê»Aealani", + "IL": "Ê»Isileli", + "IM": "Motu Mani", + "IN": "Ê»Initia", + "IO": "Potu fonua moana Ê»Initia fakapilitÄnia", + "IQ": "Ê»Ilaaki", + "IR": "Ê»Ilaani", + "IS": "Ê»Aisilani", + "IT": "ʻĪtali", + "JE": "SelusÄ«", + "JM": "Samaika", + "JO": "Soatane", + "JP": "Siapani", + "KE": "KeniÄ", + "KG": "KÄ«kisitani", + "KH": "KamipÅtia", + "KI": "Kilipasi", + "KM": "Komolosi", + "KN": "SÄ Kitisi mo Nevisi", + "KP": "KÅlea tokelau", + "KR": "KÅlea tonga", + "KW": "Kueiti", + "KY": "Ê»Otumotu Keimeni", + "KZ": "Kasakitani", + "LA": "Lau", + "LB": "Lepanoni", + "LC": "SÄ LÅ«sia", + "LI": "Likitenisiteini", + "LK": "SÄ«langikÄ", + "LR": "Laipelia", + "LS": "Lesoto", + "LT": "Lituania", + "LU": "Lakisimipeki", + "LV": "Lativia", + "LY": "LÄ«pia", + "MA": "Moloko", + "MC": "Monako", + "MD": "Molotova", + "ME": "Monitenikalo", + "MF": "SÄ MÄtini (fakafalanisÄ“)", + "MG": "Matakasika", + "MH": "Ê»Otumotu MÄsolo", + "MK": "MasetÅnia", + "ML": "MÄli", + "MM": "Pema", + "MN": "MongokÅlia", + "MO": "Makau SAR Siaina", + "MP": "Ê»Otumotu Maliana tokelau", + "MQ": "MÄteniki", + "MR": "Maulitenia", + "MS": "MoÊ»ungaselati", + "MT": "Malita", + "MU": "Maulitiusi", + "MV": "Malativisi", + "MW": "Malaui", + "MX": "Mekisikou", + "MY": "MalÄ“sia", + "MZ": "MosÄ“mipiki", + "NA": "Namipia", + "NC": "Niu KaletÅnia", + "NE": "Nisia", + "NF": "Motu NÅfoliki", + "NG": "Naisilia", + "NI": "Nikalakua", + "NL": "HÅlani", + "NO": "NoauÄ“", + "NP": "Nepali", + "NR": "Naulu", + "NU": "NiuÄ“", + "NZ": "NuÊ»usila", + "OM": "Ê»Omani", + "PA": "PanamÄ", + "PE": "PelÅ«", + "PF": "Polinisia fakafalanisÄ“", + "PG": "Papuaniukini", + "PH": "Filipaini", + "PK": "PÄkisitani", + "PL": "Polani", + "PM": "SÄ Piea mo Mikeloni", + "PN": "Ê»Otumotu Pitikeni", + "PR": "PuÄ“to Liko", + "PS": "Potu Palesitaine", + "PT": "Potukali", + "PW": "Palau", + "PY": "Palakuai", + "QA": "KatÄ", + "RE": "LÄ“unioni", + "RO": "LomÄ“nia", + "RS": "SÄ“pia", + "RU": "LÅ«sia", + "RW": "LuanitÄ", + "SA": "Saute Ê»Alepea", + "SB": "Ê»Otumotu Solomone", + "SC": "Ê»Otumotu Seiseli", + "SD": "SÅ«teni", + "SE": "SuÄ“teni", + "SG": "Singapoa", + "SH": "SÄ Helena", + "SI": "SilÅvenia", + "SJ": "SivolopÄti mo Sani Maieni", + "SK": "SilÅvakia", + "SL": "Siela Leone", + "SM": "SÄ Malino", + "SN": "Senekalo", + "SO": "SÅmalia", + "SR": "Suliname", + "SS": "SÅ«tani fakatonga", + "ST": "Sao TomÄ“ mo Pilinisipe", + "SV": "Ê»Ele Salavatoa", + "SX": "SÄ MÄtini (fakahÅlani)", + "SY": "SÄ«lia", + "SZ": "Suasilani", + "TA": "Tulisitani ta Kunuha", + "TC": "Ê»Otumotu Tuki mo Kaikosi", + "TD": "SÄti", + "TF": "Potu fonua tonga fakafalanisÄ“", + "TG": "Toko", + "TH": "Tailani", + "TJ": "Tasikitani", + "TK": "Tokelau", + "TL": "Timoa hahake", + "TM": "TÅ«kimenisitani", + "TN": "TunÄ«sia", + "TO": "Tonga", + "TR": "Toake", + "TT": "Tilinitati mo Topako", + "TV": "TÅ«valu", + "TW": "Taiuani", + "TZ": "TenisÄnia", + "UA": "ʻŪkalaÊ»ine", + "UG": "Ê»IukanitÄ", + "UM": "Ê»Otumotu siÊ»i Ê»o Ê»Amelika", + "US": "PuleÊ»anga fakatahataha Ê»Amelika", + "UY": "Ê»Ulukuai", + "UZ": "Ê»Usipekitani", + "VA": "Kolo Vatikani", + "VC": "SÄ Viniseni mo Kulenatini", + "VE": "Venesuela", + "VG": "Ê»Otumotu Vilikini fakapilitÄnia", + "VI": "Ê»Otumotu Vilikini fakaÊ»amelika", + "VN": "Vietinami", + "VU": "Vanuatu", + "WF": "Ê»Uvea mo Futuna", + "WS": "HaÊ»amoa", + "XK": "KÅsovo", + "YE": "Iemeni", + "YT": "Maiote", + "ZA": "Ê»Afilika tonga", + "ZM": "Semipia", + "ZW": "Simipapuei" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/tr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/tr.json new file mode 100644 index 0000000000000000000000000000000000000000..229ca98cd3628de8cbe05073c0d70a4dac8f6ecc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/tr.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Ascension Adası", + "AD": "Andorra", + "AE": "BirleÅŸik Arap Emirlikleri", + "AF": "Afganistan", + "AG": "Antigua ve Barbuda", + "AI": "Anguilla", + "AL": "Arnavutluk", + "AM": "Ermenistan", + "AO": "Angola", + "AQ": "Antarktika", + "AR": "Arjantin", + "AS": "Amerikan Samoası", + "AT": "Avusturya", + "AU": "Avustralya", + "AW": "Aruba", + "AX": "Ã…land Adaları", + "AZ": "Azerbaycan", + "BA": "Bosna-Hersek", + "BB": "Barbados", + "BD": "BangladeÅŸ", + "BE": "Belçika", + "BF": "Burkina Faso", + "BG": "Bulgaristan", + "BH": "Bahreyn", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Saint Barthelemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivya", + "BQ": "Karayip Hollanda", + "BR": "Brezilya", + "BS": "Bahamalar", + "BT": "Butan", + "BW": "Botsvana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Kanada", + "CC": "Cocos (Keeling) Adaları", + "CD": "Kongo - KinÅŸasa", + "CF": "Orta Afrika Cumhuriyeti", + "CG": "Kongo - Brazavil", + "CH": "İsviçre", + "CI": "FildiÅŸi Sahili", + "CK": "Cook Adaları", + "CL": "Åžili", + "CM": "Kamerun", + "CN": "Çin", + "CO": "Kolombiya", + "CR": "Kosta Rika", + "CU": "Küba", + "CV": "Cape Verde", + "CW": "Curaçao", + "CX": "Christmas Adası", + "CY": "Kıbrıs", + "CZ": "Çek Cumhuriyeti", + "DE": "Almanya", + "DG": "Diego Garcia", + "DJ": "Cibuti", + "DK": "Danimarka", + "DM": "Dominika", + "DO": "Dominik Cumhuriyeti", + "DZ": "Cezayir", + "EA": "Septe ve Melilla", + "EC": "Ekvador", + "EE": "Estonya", + "EG": "Mısır", + "EH": "Batı Sahra", + "ER": "Eritre", + "ES": "İspanya", + "ET": "Etiyopya", + "FI": "Finlandiya", + "FJ": "Fiji", + "FK": "Falkland Adaları", + "FM": "Mikronezya", + "FO": "Faroe Adaları", + "FR": "Fransa", + "GA": "Gabon", + "GB": "BirleÅŸik Krallık", + "GD": "Grenada", + "GE": "Gürcistan", + "GF": "Fransız Guyanası", + "GG": "Guernsey", + "GH": "Gana", + "GI": "Cebelitarık", + "GL": "Grönland", + "GM": "Gambiya", + "GN": "Gine", + "GP": "Guadalupe", + "GQ": "Ekvator Ginesi", + "GR": "Yunanistan", + "GS": "Güney Georgia ve Güney Sandwich Adaları", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Gine-Bissau", + "GY": "Guyana", + "HK": "Çin Hong Kong ÖİB", + "HN": "Honduras", + "HR": "Hırvatistan", + "HT": "Haiti", + "HU": "Macaristan", + "IC": "Kanarya Adaları", + "ID": "Endonezya", + "IE": "İrlanda", + "IL": "İsrail", + "IM": "Man Adası", + "IN": "Hindistan", + "IO": "Britanya Hint Okyanusu Toprakları", + "IQ": "Irak", + "IR": "İran", + "IS": "İzlanda", + "IT": "İtalya", + "JE": "Jersey", + "JM": "Jamaika", + "JO": "Ürdün", + "JP": "Japonya", + "KE": "Kenya", + "KG": "Kırgızistan", + "KH": "Kamboçya", + "KI": "Kiribati", + "KM": "Komorlar", + "KN": "Saint Kitts ve Nevis", + "KP": "Kuzey Kore", + "KR": "Güney Kore", + "KW": "Kuveyt", + "KY": "Cayman Adaları", + "KZ": "Kazakistan", + "LA": "Laos", + "LB": "Lübnan", + "LC": "Saint Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberya", + "LS": "Lesotho", + "LT": "Litvanya", + "LU": "Lüksemburg", + "LV": "Letonya", + "LY": "Libya", + "MA": "Fas", + "MC": "Monako", + "MD": "Moldova", + "ME": "KaradaÄŸ", + "MF": "Saint Martin", + "MG": "Madagaskar", + "MH": "Marshall Adaları", + "MK": "Makedonya", + "ML": "Mali", + "MM": "Myanmar (Burma)", + "MN": "MoÄŸolistan", + "MO": "Çin Makao ÖİB", + "MP": "Kuzey Mariana Adaları", + "MQ": "Martinik", + "MR": "Moritanya", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldivler", + "MW": "Malavi", + "MX": "Meksika", + "MY": "Malezya", + "MZ": "Mozambik", + "NA": "Namibya", + "NC": "Yeni Kaledonya", + "NE": "Nijer", + "NF": "Norfolk Adası", + "NG": "Nijerya", + "NI": "Nikaragua", + "NL": "Hollanda", + "NO": "Norveç", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Yeni Zelanda", + "OM": "Umman", + "PA": "Panama", + "PE": "Peru", + "PF": "Fransız Polinezyası", + "PG": "Papua Yeni Gine", + "PH": "Filipinler", + "PK": "Pakistan", + "PL": "Polonya", + "PM": "Saint Pierre ve Miquelon", + "PN": "Pitcairn Adaları", + "PR": "Porto Riko", + "PS": "Filistin Bölgeleri", + "PT": "Portekiz", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Katar", + "RE": "Réunion", + "RO": "Romanya", + "RS": "Sırbistan", + "RU": "Rusya", + "RW": "Ruanda", + "SA": "Suudi Arabistan", + "SB": "Solomon Adaları", + "SC": "SeyÅŸeller", + "SD": "Sudan", + "SE": "İsveç", + "SG": "Singapur", + "SH": "Saint Helena", + "SI": "Slovenya", + "SJ": "Svalbard ve Jan Mayen", + "SK": "Slovakya", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somali", + "SR": "Surinam", + "SS": "Güney Sudan", + "ST": "São Tomé ve Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Suriye", + "SZ": "Svaziland", + "TA": "Tristan da Cunha", + "TC": "Turks ve Caicos Adaları", + "TD": "Çad", + "TF": "Fransız Güney Toprakları", + "TG": "Togo", + "TH": "Tayland", + "TJ": "Tacikistan", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Türkmenistan", + "TN": "Tunus", + "TO": "Tonga", + "TR": "Türkiye", + "TT": "Trinidad ve Tobago", + "TV": "Tuvalu", + "TW": "Tayvan", + "TZ": "Tanzanya", + "UA": "Ukrayna", + "UG": "Uganda", + "UM": "ABD Uzak Adaları", + "UN": "BirleÅŸmiÅŸ Milletler", + "US": "Amerika BirleÅŸik Devletleri", + "UY": "Uruguay", + "UZ": "Özbekistan", + "VA": "Vatikan", + "VC": "Saint Vincent ve Grenadinler", + "VE": "Venezuela", + "VG": "Britanya Virjin Adaları", + "VI": "ABD Virjin Adaları", + "VN": "Vietnam", + "VU": "Vanuatu", + "WF": "Wallis ve Futuna", + "WS": "Samoa", + "XK": "Kosova", + "YE": "Yemen", + "YT": "Mayotte", + "ZA": "Güney Afrika", + "ZM": "Zambiya", + "ZW": "Zimbabve" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ug.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ug.json new file mode 100644 index 0000000000000000000000000000000000000000..6e8c397f7b34b48533fc7869788ddf77494caf99 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ug.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.28.76", + "Names": { + "AC": "ئاسسÛنسىيون ئارىلى", + "AD": "ئاندوررا", + "AE": "ئەرەب بىرلەشمە خەلىپىلىكى", + "AF": "Ø¦Ø§ÙØºØ§Ù†Ù‰Ø³ØªØ§Ù†", + "AG": "ئانتىگۇئا Û‹Û• باربۇدا", + "AI": "ئانگۋىللا", + "AL": "ئالبانىيە", + "AM": "ئەرمÛنىيە", + "AO": "ئانگولا", + "AQ": "ئانتاركتىكا", + "AR": "ئارگÛنتىنا", + "AS": "Ø¦Ø§Ù…ÛØ±Ù‰ÙƒØ§ ساموئا", + "AT": "ئاۋىستىرىيە", + "AU": "ئاۋسترالىيە", + "AW": "ئارۇبا", + "AX": "ئالاند ئاراللىرى", + "AZ": "ئەزەربەيجان", + "BA": "بوسىنىيە Û‹Û• Ú¯ÛØ±ØªØ³Ûگوۋىنا", + "BB": "باربادوس", + "BD": "بÛنگال", + "BE": "بÛلگىيە", + "BF": "بۇركىنا ÙØ§Ø³Ùˆ", + "BG": "بۇلغارىيە", + "BH": "بەھرەين", + "BI": "بۇرۇندى", + "BJ": "بÛنىن", + "BL": "ساينت بارتÛÙ„Ûمى", + "BM": "Ø¨ÛØ±Ù…ۇدا", + "BN": "بىرۇنÛÙŠ", + "BO": "بولىۋىيە", + "BQ": "كارىب دÛڭىزى گوللاندىيە", + "BR": "بىرازىلىيە", + "BS": "باھاما", + "BT": "بۇتان", + "BW": "بوتسۋانا", + "BY": "بÛلارۇسىيە", + "BZ": "بÛلىز", + "CA": "كانادا", + "CC": "كوكوس (كىلىڭ) ئاراللىرى", + "CD": "كونگو - كىنشاسا", + "CF": "ئوتتۇرا Ø¦Ø§ÙØ±Ù‰Ù‚ا جۇمھۇرىيىتى", + "CG": "كونگو - بىراززاۋىل", + "CH": "Ø´Ù‰Û‹ÛØªØ³Ø§Ø±Ù‰ÙŠÛ•", + "CI": "ÙƒÙˆØªÛ Ø¯Û Ø¦Ù‰Û‹ÙˆØ¦Ù‰Ø±", + "CK": "ÙƒÛ‡Ùƒ ئاراللىرى", + "CL": "چىلى", + "CM": "ÙƒØ§Ù…ÛØ±ÙˆÙ†", + "CN": "جۇڭگو", + "CO": "كولومبىيە", + "CR": "كوستارىكا", + "CU": "كۇبا", + "CV": "ÙŠÛØ´Ù‰Ù„ تۇمشۇق", + "CW": "كۇراچاۋ", + "CX": "مىلاد ئارىلى", + "CY": "سىپرۇس", + "CZ": "Ú†ÛØ® جۇمھۇرىيىتى", + "DE": "Ú¯ÛØ±Ù…انىيە", + "DG": "دÛÚ¯Ùˆ-گارشىيا", + "DJ": "جىبۇتى", + "DK": "دانىيە", + "DM": "دومىنىكا", + "DO": "دومىنىكا جۇمھۇرىيىتى", + "DZ": "ئالجىرىيە", + "EA": "سÛيتا Û‹Û• Ù…Ûلىلا", + "EC": "ئÛكۋاتور", + "EE": "Ø¦ÛØ³ØªÙˆÙ†Ù‰ÙŠÛ•", + "EG": "مىسىر", + "EH": "غەربىي ساخارا", + "ER": "Ø¦ÛØ±Ù‰ØªØ±Ù‰ÙŠÛ•", + "ES": "ئىسپانىيە", + "ET": "ئÛÙىيوپىيە", + "FI": "Ùىنلاندىيە", + "FJ": "Ùىجى", + "FK": "ÙØ§Ù„كلاند ئاراللىرى", + "FM": "Ù…Ù‰ÙƒØ±ÙˆÙ†ÛØ²Ù‰ÙŠÛ•", + "FO": "ÙØ§Ø±Ùˆ ئاراللىرى", + "FR": "Ùىرانسىيە", + "GA": "گابون", + "GB": "بىرلەشمە پادىشاھلىق", + "GD": "گىرÛنادا", + "GE": "گىرۇزىيە", + "GF": "Ùىرانسىيەگە قاراشلىق گىۋىيانا", + "GG": "گۇرنسÛÙŠ", + "GH": "گانا", + "GI": "جەبىلتارىق", + "GL": "گىرÛنلاندىيە", + "GM": "گامبىيە", + "GN": "گىۋىنىيە", + "GP": "گىۋادÛÙ„Û‡Ù¾", + "GQ": "ئÛكۋاتور گىۋىنىيەسى", + "GR": "Ú¯Ù‰Ø±ÛØªØ³Ù‰ÙŠÛ•", + "GS": "جەنۇبىي جورجىيە Û‹Û• جەنۇبىي ساندۋىچ ئاراللىرى", + "GT": "گىۋاتÛمالا", + "GU": "گۇئام", + "GW": "گىۋىنىيە بىسسائۇ", + "GY": "گىۋىيانا", + "HK": "شياڭگاڭ ئالاھىدە مەمۇرىي رايونى (جۇڭگو)", + "HN": "ھوندۇراس", + "HR": "كىرودىيە", + "HT": "ھايتى", + "HU": "Û‹Ûنگىرىيە", + "IC": "كانارى ئاراللىرى", + "ID": "Ú¾Ù‰Ù†Ø¯ÙˆÙ†ÛØ²Ù‰ÙŠÛ•", + "IE": "ئىرÛلاندىيە", + "IL": "ئىسرائىلىيە", + "IM": "مان ئارىلى", + "IN": "ھىندىستان", + "IO": "ئەنگلىيەگە قاراشلىق ھىندى ئوكيان ØªÛØ±Ø±Ù‰ØªÙˆØ±Ù‰ÙŠÛ•سى", + "IQ": "ئىراق", + "IR": "ئىران", + "IS": "ئىسلاندىيە", + "IT": "ئىتالىيە", + "JE": "Ø¬ÛØ±Ø³ÛÙŠ", + "JM": "يامايكا", + "JO": "ئىيوردانىيە", + "JP": "ياپونىيە", + "KE": "ÙƒÛنىيە", + "KG": "قىرغىزىستان", + "KH": "كامبودژا", + "KI": "كىرىباتى", + "KM": "كومورو", + "KN": "ساينت كىتىس Û‹Û• Ù†Ûۋىس", + "KP": "چاۋشيەن", + "KR": "كورÛÙŠÛ•", + "KW": "كۇۋەيت", + "KY": "كايمان ئاراللىرى", + "KZ": "قازاقىستان", + "LA": "لائوس", + "LB": "لىۋان", + "LC": "ساينت لۇسىيە", + "LI": "لىكتÛنستÛين", + "LK": "سىرىلانكا", + "LR": "Ù„Ù‰Ø¨ÛØ±Ù‰ÙŠÛ•", + "LS": "Ù„ÛØ³ÙˆØªÙˆ", + "LT": "لىتۋانىيە", + "LU": "لىيۇكسÛمبۇرگ", + "LV": "لاتۋىيە", + "LY": "لىۋىيە", + "MA": "ماراكەش", + "MC": "موناكو", + "MD": "مولدوۋا", + "ME": "قارا تاغ", + "MF": "ساينت مارتىن", + "MG": "ماداغاسقار", + "MH": "مارشال ئاراللىرى", + "MK": "Ù…Ø§ÙƒÛØ¯ÙˆÙ†Ù‰ÙŠÛ•", + "ML": "مالى", + "MM": "بىرما", + "MN": "موڭغۇلىيە", + "MO": "ئاۋمÛÙ† ئالاھىدە مەمۇرىي رايونى", + "MP": "شىمالىي مارىيانا ئاراللىرى", + "MQ": "مارتىنىكا", + "MR": "ماۋرىتانىيە", + "MS": "Ù…ÙˆÙ†ØªØ³ÛØ±Ø±Ø§Øª", + "MT": "مالتا", + "MU": "ماۋرىتىيۇس", + "MV": "مالدىۋÛ", + "MW": "مالاۋى", + "MX": "Ù…Ûكسىكا", + "MY": "مالايسىيا", + "MZ": "موزامبىك", + "NA": "نامىبىيە", + "NC": "ÙŠÛÚ­Ù‰ ÙƒØ§Ù„ÛØ¯ÙˆÙ†Ù‰ÙŠÛ•", + "NE": "Ù†Ù‰Ú¯ÛØ±", + "NF": "نورÙولك ئارىلى", + "NG": "Ù†Ù‰Ú¯ÛØ±Ù‰ÙŠÛ•", + "NI": "نىكاراگۇئا", + "NL": "گوللاندىيە", + "NO": "نورۋÛگىيە", + "NP": "Ù†Ûپال", + "NR": "ناۋرۇ", + "NU": "نيۇئÛ", + "NZ": "ÙŠÛÚ­Ù‰ زÛلاندىيە", + "OM": "ئومان", + "PA": "پاناما", + "PE": "Ù¾ÛØ±Û‡", + "PF": "Ùىرانسىيەگە قاراشلىق Ù¾ÙˆÙ„Ù‰Ù†ÛØ²Ù‰ÙŠÛ•", + "PG": "پاپۇئا ÙŠÛÚ­Ù‰ گىۋىنىيەسى", + "PH": "Ùىلىپپىن", + "PK": "پاكىستان", + "PL": "پولشا", + "PM": "ساينت Ù¾Ù‰ÙŠÛØ± Û‹Û• مىكÛلون ئاراللىرى", + "PN": "پىتكايرن ئاراللىرى", + "PR": "Ù¾Û‡Ø¦ÛØ±ØªÙˆ رىكو", + "PS": "پەلەستىن زÛمىنى", + "PT": "پورتۇگالىيە", + "PW": "پالائۇ", + "PY": "پاراگۋاي", + "QA": "قاتار", + "RE": "رÛيۇنىيون", + "RO": "رومىنىيە", + "RS": "Ø³ÛØ±Ø¨Ù‰ÙŠÛ•", + "RU": "رۇسىيە", + "RW": "رىۋاندا", + "SA": "سەئۇدىي ئەرەبىستان", + "SB": "سولومون ئاراللىرى", + "SC": "سÛيشÛÙ„", + "SD": "سۇدان", + "SE": "Ø´Ù‰Û‹ÛØªØ³Ù‰ÙŠÛ•", + "SG": "سىنگاپور", + "SH": "ساينىت Ú¾ÛÙ„Ûنا", + "SI": "سىلوۋÛنىيە", + "SJ": "سىۋالبارد Û‹Û• يان مايÛÙ†", + "SK": "سىلوۋاكىيە", + "SL": "Ø³ÛØ±Ø±Ø§Ù„ÛØ¦ÙˆÙ†", + "SM": "سان مارىنو", + "SN": "سÛÙ†Ûگال", + "SO": "سومالى", + "SR": "سۇرىنام", + "SS": "جەنۇبىي سۇدان", + "ST": "سان ØªÙˆÙ…Û Û‹Û• پرىنسىپÛ", + "SV": "سالۋادور", + "SX": "سىنت مارتÛÙ†", + "SY": "سۇرىيە", + "SZ": "Ø³Ù‰Û‹ÛØ²Ù‰Ù„اند", + "TA": "ترىستان داكۇنھا", + "TC": "تۇركس Û‹Û• كايكوس ئاراللىرى", + "TD": "چاد", + "TF": "Ùىرانسىيەنىڭ جەنۇبىي زÛمىنى", + "TG": "توگو", + "TH": "تايلاند", + "TJ": "تاجىكىستان", + "TK": "توكÛلاۋ", + "TL": "شەرقىي تىمور", + "TM": "تۈركمەنىستان", + "TN": "تۇنىس", + "TO": "تونگا", + "TR": "تۈركىيە", + "TT": "تىرىنىداد Û‹Û• توباگو", + "TV": "تۇۋالۇ", + "TW": "تەيۋەن", + "TZ": "تانزانىيە", + "UA": "ئۇكرائىنا", + "UG": "ئۇگاندا", + "UM": "ئا Ù‚ Ø´ تاشقى ئاراللىرى", + "US": "Ø¦Ø§Ù…ÛØ±Ù‰ÙƒØ§ قوشما ئىشتاتلىرى", + "UY": "ئۇرۇگۋاي", + "UZ": "ئۆزبÛكىستان", + "VA": "ۋاتىكان", + "VC": "ساينت ۋىنسÛنت Û‹Û• گىرÛÙ†Ø§Ø¯Ù‰Ù†ÛØ³", + "VE": "Û‹ÛÙ†ÛØ³Û‡Ø¦Ûلا", + "VG": "ئەنگلىيە ۋىرگىن ئاراللىرى", + "VI": "ئا Ù‚ Ø´ ۋىرگىن ئاراللىرى", + "VN": "Û‹Ù‰ÙŠÛØªÙ†Ø§Ù…", + "VU": "ۋانۇئاتۇ", + "WF": "ۋاللىس Û‹Û• Ùۇتۇنا", + "WS": "ساموئا", + "XK": "كوسوۋو", + "YE": "ÙŠÛ•Ù…Û•Ù†", + "YT": "مايوتى", + "ZA": "جەنۇبىي Ø¦Ø§ÙØ±Ù‰Ù‚ا", + "ZM": "زامبىيە", + "ZW": "زىمبابۋÛ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/uk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/uk.json new file mode 100644 index 0000000000000000000000000000000000000000..75242a56e3ccdef715d901bf3edbb6d6d2fec512 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/uk.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.38", + "Names": { + "AC": "ОÑтрів ВознеÑіннÑ", + "AD": "Ðндорра", + "AE": "Обʼєднані ÐрабÑькі Емірати", + "AF": "ÐфганіÑтан", + "AG": "Ðнтигуа Ñ– Барбуда", + "AI": "ÐнгільÑ", + "AL": "ÐлбаніÑ", + "AM": "ВірменіÑ", + "AO": "Ðнгола", + "AQ": "Ðнтарктика", + "AR": "Ðргентина", + "AS": "ÐмериканÑьке Самоа", + "AT": "ÐвÑтріÑ", + "AU": "ÐвÑтраліÑ", + "AW": "Ðруба", + "AX": "ÐландÑькі оÑтрови", + "AZ": "Ðзербайджан", + "BA": "БоÑÐ½Ñ–Ñ Ñ– Герцоговина", + "BB": "БарбадоÑ", + "BD": "Бангладеш", + "BE": "БельгіÑ", + "BF": "Буркіна-ФаÑо", + "BG": "БолгаріÑ", + "BH": "Бахрейн", + "BI": "Бурунді", + "BJ": "Бенін", + "BL": "Сен-Бартельмі", + "BM": "БермудÑькі оÑтрови", + "BN": "Бруней", + "BO": "БолівіÑ", + "BQ": "ÐідерландÑькі КарибÑькі оÑтрови", + "BR": "БразиліÑ", + "BS": "БагамÑькі ОÑтрови", + "BT": "Бутан", + "BW": "БотÑвана", + "BY": "БілоруÑÑŒ", + "BZ": "Беліз", + "CA": "Канада", + "CC": "КокоÑові (Кілінгові) оÑтрови", + "CD": "Конго – КіншаÑа", + "CF": "ЦентральноафриканÑька РеÑпубліка", + "CG": "Конго – Браззавіль", + "CH": "ШвейцаріÑ", + "CI": "Кот-д’Івуар", + "CK": "ОÑтрови Кука", + "CL": "Чилі", + "CM": "Камерун", + "CN": "Китай", + "CO": "КолумбіÑ", + "CR": "КоÑта-Рика", + "CU": "Куба", + "CV": "Кабо-Верде", + "CW": "КюраÑао", + "CX": "ОÑтрів Різдва", + "CY": "Кіпр", + "CZ": "ЧеÑька РеÑпубліка", + "DE": "Ðімеччина", + "DG": "Дієго-ГарÑÑ–Ñ", + "DJ": "Джибуті", + "DK": "ДаніÑ", + "DM": "Домініка", + "DO": "ДомініканÑька РеÑпубліка", + "DZ": "Ðлжир", + "EA": "Сеута Ñ– МелільÑ", + "EC": "Еквадор", + "EE": "ЕÑтоніÑ", + "EG": "Єгипет", + "EH": "Західна Сахара", + "ER": "ЕритреÑ", + "ES": "ІÑпаніÑ", + "ET": "ЕфіопіÑ", + "FI": "ФінлÑндіÑ", + "FJ": "Фіджі", + "FK": "ФолклендÑькі оÑтрови", + "FM": "МікронезіÑ", + "FO": "ФарерÑькі ОÑтрови", + "FR": "ФранціÑ", + "GA": "Габон", + "GB": "Велика БританіÑ", + "GD": "Гренада", + "GE": "ГрузіÑ", + "GF": "Французька Гвіана", + "GG": "ГернÑÑ–", + "GH": "Гана", + "GI": "Гібралтар", + "GL": "ГренландіÑ", + "GM": "ГамбіÑ", + "GN": "ГвінеÑ", + "GP": "Гваделупа", + "GQ": "Екваторіальна ГвінеÑ", + "GR": "ГреціÑ", + "GS": "Південна Ð”Ð¶Ð¾Ñ€Ð´Ð¶Ñ–Ñ Ñ‚Ð° Південні Сандвічеві оÑтрови", + "GT": "Гватемала", + "GU": "Гуам", + "GW": "ГвінеÑ-БіÑау", + "GY": "ГаÑна", + "HK": "Гонконг, О.Ð.Р. Китаю", + "HN": "ГондураÑ", + "HR": "ХорватіÑ", + "HT": "Гаїті", + "HU": "Угорщина", + "IC": "КанарÑькі оÑтрови", + "ID": "ІндонезіÑ", + "IE": "ІрландіÑ", + "IL": "Ізраїль", + "IM": "ОÑтрів Мен", + "IN": "ІндіÑ", + "IO": "БританÑькі території в ІндійÑькому океані", + "IQ": "Ірак", + "IR": "Іран", + "IS": "ІÑландіÑ", + "IT": "ІталіÑ", + "JE": "ДжерÑÑ–", + "JM": "Ямайка", + "JO": "ЙорданіÑ", + "JP": "ЯпоніÑ", + "KE": "КеніÑ", + "KG": "КиргизÑтан", + "KH": "Камбоджа", + "KI": "Кірибаті", + "KM": "КоморÑькі оÑтрови", + "KN": "Сент-ÐšÑ–Ñ‚Ñ Ñ– ÐевіÑ", + "KP": "Північна КореÑ", + "KR": "Південна КореÑ", + "KW": "Кувейт", + "KY": "Кайманові оÑтрови", + "KZ": "КазахÑтан", + "LA": "ЛаоÑ", + "LB": "Ліван", + "LC": "Сент-ЛюÑÑ–Ñ", + "LI": "Ліхтенштейн", + "LK": "Шрі-Ланка", + "LR": "ЛіберіÑ", + "LS": "ЛеÑото", + "LT": "Литва", + "LU": "ЛюкÑембург", + "LV": "ЛатвіÑ", + "LY": "ЛівіÑ", + "MA": "Марокко", + "MC": "Монако", + "MD": "Молдова", + "ME": "ЧорногоріÑ", + "MF": "Сен-Мартен", + "MG": "МадагаÑкар", + "MH": "Маршаллові ОÑтрови", + "MK": "МакедоніÑ", + "ML": "Малі", + "MM": "МʼÑнма (Бірма)", + "MN": "МонголіÑ", + "MO": "Макао, О.Ð.Р Китаю", + "MP": "Північні МаріанÑькі ОÑтрови", + "MQ": "Мартиніка", + "MR": "МавританіÑ", + "MS": "МонтÑеррат", + "MT": "Мальта", + "MU": "Маврикій", + "MV": "Мальдіви", + "MW": "Малаві", + "MX": "МекÑика", + "MY": "МалайзіÑ", + "MZ": "Мозамбік", + "NA": "ÐамібіÑ", + "NC": "Ðова КаледоніÑ", + "NE": "Ðігер", + "NF": "ОÑтрів Ðорфолк", + "NG": "ÐігеріÑ", + "NI": "Ðікарагуа", + "NL": "Ðідерланди", + "NO": "ÐорвегіÑ", + "NP": "Ðепал", + "NR": "Ðауру", + "NU": "Ðіуе", + "NZ": "Ðова ЗеландіÑ", + "OM": "Оман", + "PA": "Панама", + "PE": "Перу", + "PF": "Французька ПолінезіÑ", + "PG": "Папуа Ðова ГвінеÑ", + "PH": "Філіппіни", + "PK": "ПакиÑтан", + "PL": "Польща", + "PM": "Сен-Пʼєр Ñ– Мікелон", + "PN": "ОÑтрови Піткерн", + "PR": "Пуерто-Рико", + "PS": "ПалеÑтинÑькі території", + "PT": "ПортугаліÑ", + "PW": "Палау", + "PY": "Парагвай", + "QA": "Катар", + "RE": "Реюньйон", + "RO": "РумуніÑ", + "RS": "СербіÑ", + "RU": "РоÑÑ–Ñ", + "RW": "Руанда", + "SA": "СаудівÑька ÐравіÑ", + "SB": "Соломонові ОÑтрови", + "SC": "СейшельÑькі ОÑтрови", + "SD": "Судан", + "SE": "ШвеціÑ", + "SG": "Сінгапур", + "SH": "ОÑтрів СвÑтої Єлени", + "SI": "СловеніÑ", + "SJ": "ОÑтрови Свальбард Ñ– Ян-Маєн", + "SK": "Словаччина", + "SL": "Сьєрра-Леоне", + "SM": "Сан-Марино", + "SN": "Сенегал", + "SO": "Сомалі", + "SR": "Суринам", + "SS": "Південний Судан", + "ST": "Сан-Томе Ñ– ПрінÑіпі", + "SV": "Сальвадор", + "SX": "Сінт-Мартен", + "SY": "СиріÑ", + "SZ": "Свазіленд", + "TA": "ТріÑтан-да-КуньÑ", + "TC": "ОÑтрови Ð¢ÐµÑ€ÐºÑ Ñ– КайкоÑ", + "TD": "Чад", + "TF": "Французькі Південні Території", + "TG": "Того", + "TH": "Таїланд", + "TJ": "ТаджикиÑтан", + "TK": "Токелау", + "TL": "Тимор-Лешті", + "TM": "ТуркменіÑтан", + "TN": "ТуніÑ", + "TO": "Тонга", + "TR": "Туреччина", + "TT": "Тринідад Ñ– Тобаго", + "TV": "Тувалу", + "TW": "Тайвань", + "TZ": "ТанзаніÑ", + "UA": "Україна", + "UG": "Уганда", + "UM": "Віддалені оÑтрови СШÐ", + "UN": "ÐžÑ€Ð³Ð°Ð½Ñ–Ð·Ð°Ñ†Ñ–Ñ ÐžÐ±â€™Ñ”Ð´Ð½Ð°Ð½Ð¸Ñ… Ðацій", + "US": "СШÐ", + "UY": "Уругвай", + "UZ": "УзбекиÑтан", + "VA": "Ватикан", + "VC": "Сент-ВінÑент Ñ– Гренадини", + "VE": "ВенеÑуела", + "VG": "БританÑькі ВіргінÑькі оÑтрови", + "VI": "ВіргінÑькі оÑтрови, СШÐ", + "VN": "Вʼєтнам", + "VU": "Вануату", + "WF": "Ð’Ð¾Ð»Ð»Ñ–Ñ Ñ– Футуна", + "WS": "Самоа", + "XK": "КоÑово", + "YE": "Ємен", + "YT": "Майотта", + "ZA": "Південно-ÐфриканÑька РеÑпубліка", + "ZM": "ЗамбіÑ", + "ZW": "Зімбабве" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ur.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ur.json new file mode 100644 index 0000000000000000000000000000000000000000..14b3cbf5a81aa816057ffa5099d1f2826f9447e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ur.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "اسینشن آئلینڈ", + "AD": "انڈورا", + "AE": "Ù…ØªØ­Ø¯Û Ø¹Ø±Ø¨ امارات", + "AF": "Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†", + "AG": "انٹیگوا اور باربودا", + "AI": "انگوئیلا", + "AL": "البانیÛ", + "AM": "آرمینیا", + "AO": "انگولا", + "AQ": "انٹارکٹیکا", + "AR": "ارجنٹینا", + "AS": "امریکی ساموآ", + "AT": "آسٹریا", + "AU": "آسٹریلیا", + "AW": "اروبا", + "AX": "آلینڈ آئلینڈز", + "AZ": "آذر بائیجان", + "BA": "بوسنیا اور ÛØ±Ø²ÛŒÚ¯ÙˆÙˆÛŒÙ†Ø§", + "BB": "بارباڈوس", + "BD": "Ø¨Ù†Ú¯Ù„Û Ø¯ÛŒØ´", + "BE": "بیلجیم", + "BF": "برکینا ÙØ§Ø³Ùˆ", + "BG": "بلغاریÛ", + "BH": "بحرین", + "BI": "برونڈی", + "BJ": "بینن", + "BL": "سینٹ برتھلیمی", + "BM": "برمودا", + "BN": "برونائی", + "BO": "بولیویا", + "BQ": "کریبیائی نیدرلینڈز", + "BR": "برازیل", + "BS": "Ø¨ÛØ§Ù…اس", + "BT": "بھوٹان", + "BW": "بوتسوانا", + "BY": "بیلاروس", + "BZ": "بیلائز", + "CA": "کینیڈا", + "CC": "کوکوس (کیلنگ) جزائر", + "CD": "کانگو - کنشاسا", + "CF": "وسط Ø§ÙØ±ÛŒÙ‚ÛŒ جمÛوریÛ", + "CG": "کانگو - برازاویلے", + "CH": "سوئٹزر لینڈ", + "CI": "کوٹ ÚˆÛŒ آئیوری", + "CK": "Ú©Ú© آئلینڈز", + "CL": "Ú†Ù„ÛŒ", + "CM": "کیمرون", + "CN": "چین", + "CO": "کولمبیا", + "CR": "کوسٹا ریکا", + "CU": "کیوبا", + "CV": "کیپ ورڈی", + "CW": "کیوراکاؤ", + "CX": "Ø¬Ø²ÛŒØ±Û Ú©Ø±Ø³Ù…Ø³", + "CY": "قبرص", + "CZ": "چیک جمÛوریÛ", + "DE": "جرمنی", + "DG": "ڈائجو گارسیا", + "DJ": "جبوتی", + "DK": "ڈنمارک", + "DM": "ڈومنیکا", + "DO": "ڈومنیکن جمÛوریÛ", + "DZ": "الجیریا", + "EA": "سیئوٹا اور میلیلا", + "EC": "ایکواڈور", + "EE": "اسٹونیا", + "EG": "مصر", + "EH": "مغربی صحارا", + "ER": "اریٹیریا", + "ES": "ÛØ³Ù¾Ø§Ù†ÛŒÛ", + "ET": "ایتھوپیا", + "FI": "ÙÙ† لینڈ", + "FJ": "ÙØ¬ÛŒ", + "FK": "ÙØ§Ú©Ù„ینڈ جزائر", + "FM": "مائکرونیشیا", + "FO": "جزائر ÙØ§Ø±Ùˆ", + "FR": "ÙØ±Ø§Ù†Ø³", + "GA": "گیبون", + "GB": "سلطنت متحدÛ", + "GD": "گریناڈا", + "GE": "جارجیا", + "GF": "ÙØ±ÛŒÙ†Ú† گیانا", + "GG": "گوئرنسی", + "GH": "گھانا", + "GI": "جبل الطارق", + "GL": "گرین لینڈ", + "GM": "گیمبیا", + "GN": "Ú¯Ù†ÛŒ", + "GP": "گواڈیلوپ", + "GQ": "استوائی گیانا", + "GR": "یونان", + "GS": "جنوبی جارجیا اور جنوبی سینڈوچ جزائر", + "GT": "گواٹے مالا", + "GU": "گوام", + "GW": "Ú¯Ù†ÛŒ بساؤ", + "GY": "گیانا", + "HK": "ÛØ§Ù†Ú¯ کانگ SAR چین", + "HN": "Ûونڈاروس", + "HR": "کروشیا", + "HT": "Ûیٹی", + "HU": "Ûنگری", + "IC": "کینری آئلینڈز", + "ID": "انڈونیشیا", + "IE": "آئرلینڈ", + "IL": "اسرائیل", + "IM": "آئل آ٠مین", + "IN": "بھارت", + "IO": "برطانوی بحر Ûند کا علاقÛ", + "IQ": "عراق", + "IR": "ایران", + "IS": "آئس لینڈ", + "IT": "اٹلی", + "JE": "جرسی", + "JM": "جمائیکا", + "JO": "اردن", + "JP": "جاپان", + "KE": "کینیا", + "KG": "کرغزستان", + "KH": "کمبوڈیا", + "KI": "کریباتی", + "KM": "کوموروس", + "KN": "سینٹ کٹس اور نیویس", + "KP": "شمالی کوریا", + "KR": "جنوبی کوریا", + "KW": "کویت", + "KY": "کیمین آئلینڈز", + "KZ": "قازقستان", + "LA": "لاؤس", + "LB": "لبنان", + "LC": "سینٹ لوسیا", + "LI": "لیشٹنسٹائن", + "LK": "سری لنکا", + "LR": "لائبیریا", + "LS": "لیسوتھو", + "LT": "لیتھونیا", + "LU": "لکسمبرگ", + "LV": "لٹویا", + "LY": "لیبیا", + "MA": "مراکش", + "MC": "موناکو", + "MD": "مالدووا", + "ME": "مونٹے نیگرو", + "MF": "سینٹ مارٹن", + "MG": "مڈغاسکر", + "MH": "مارشل آئلینڈز", + "MK": "مقدونیÛ", + "ML": "مالی", + "MM": "میانمار (برما)", + "MN": "منگولیا", + "MO": "مکاؤ SAR چین", + "MP": "شمالی ماریانا آئلینڈز", + "MQ": "مارٹینک", + "MR": "موریطانیÛ", + "MS": "مونٹسیراٹ", + "MT": "مالٹا", + "MU": "ماریشس", + "MV": "مالدیپ", + "MW": "ملاوی", + "MX": "میکسیکو", + "MY": "ملائشیا", + "MZ": "موزمبیق", + "NA": "نامیبیا", + "NC": "نیو کلیڈونیا", + "NE": "نائجر", + "NF": "نارÙÙˆÚ© آئلینڈ", + "NG": "نائجیریا", + "NI": "نکاراگووا", + "NL": "نیدر لینڈز", + "NO": "ناروے", + "NP": "نیپال", + "NR": "نؤرو", + "NU": "نیئو", + "NZ": "نیوزی لینڈ", + "OM": "عمان", + "PA": "پانامÛ", + "PE": "پیرو", + "PF": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ پولینیشیا", + "PG": "پاپوآ نیو Ú¯Ù†ÛŒ", + "PH": "Ùلپائن", + "PK": "پاکستان", + "PL": "پولینڈ", + "PM": "سینٹ پیئر اور میکلیئون", + "PN": "پٹکائرن جزائر", + "PR": "پیورٹو ریکو", + "PS": "Ùلسطینی خطے", + "PT": "پرتگال", + "PW": "پلاؤ", + "PY": "پیراگوئے", + "QA": "قطر", + "RE": "ری یونین", + "RO": "رومانیÛ", + "RS": "سربیا", + "RU": "روس", + "RW": "روانڈا", + "SA": "سعودی عرب", + "SB": "سولومن آئلینڈز", + "SC": "سشلیز", + "SD": "سوڈان", + "SE": "سویڈن", + "SG": "سنگاپور", + "SH": "سینٹ Ûیلینا", + "SI": "سلووینیا", + "SJ": "سوالبرڈ اور جان ماین", + "SK": "سلوواکیÛ", + "SL": "سیئر لیون", + "SM": "سان مارینو", + "SN": "سینیگل", + "SO": "صومالیÛ", + "SR": "سورینام", + "SS": "جنوبی سوڈان", + "ST": "ساؤ ٹوم اور پرنسپے", + "SV": "ال سلواڈور", + "SX": "سنٹ مارٹن", + "SY": "شام", + "SZ": "سوازی لینڈ", + "TA": "ٹرسٹن ڈا Ú©ÛŒÙˆÙ†ÛØ§", + "TC": "ترکس اور کیکاؤس جزائر", + "TD": "چاڈ", + "TF": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ جنوبی خطے", + "TG": "ٹوگو", + "TH": "تھائی لینڈ", + "TJ": "تاجکستان", + "TK": "ٹوکیلاؤ", + "TL": "تیمور لیسٹ", + "TM": "ترکمانستان", + "TN": "تونس", + "TO": "ٹونگا", + "TR": "ترکی", + "TT": "ترینیداد اور ٹوباگو", + "TV": "ٹووالو", + "TW": "تائیوان", + "TZ": "تنزانیÛ", + "UA": "یوکرین", + "UG": "یوگنڈا", + "UM": "Ø§Ù…Ø±ÛŒÚ©Û Ø³Û’ Ø¨Ø§ÛØ± Ú©Û’ چھوٹے جزائز", + "UN": "اقوام متحدÛ", + "US": "Ø±ÛŒØ§Ø³ØªÛØ§Ø¦Û’ متحدÛ", + "UY": "یوروگوئے", + "UZ": "ازبکستان", + "VA": "واٹیکن سٹی", + "VC": "سینٹ ونسنٹ اور گرینیڈائنز", + "VE": "وینزوئیلا", + "VG": "برٹش ورجن آئلینڈز", + "VI": "امریکی ورجن آئلینڈز", + "VN": "ویتنام", + "VU": "وینوآٹو", + "WF": "ویلیز اور Ùیوٹیونا", + "WS": "ساموآ", + "XK": "کوسووو", + "YE": "یمن", + "YT": "مایوٹ", + "ZA": "جنوبی Ø§ÙØ±ÛŒÙ‚Û", + "ZM": "زامبیا", + "ZW": "زمبابوے" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ur_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ur_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..def922cab70b33aa323bc50b7635518fb005568a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/ur_IN.json @@ -0,0 +1,25 @@ +{ + "Version": "2.1.27.79", + "Names": { + "AC": "Ø¬Ø²ÛŒØ±Û Ø§Ø³ÛŒÙ†Ø´Ù†", + "AX": "جزائر آلینڈ", + "CC": "جزائر (کیلنگ) کوکوس", + "CK": "جزائر Ú©Ú©", + "DG": "ڈیگو گارشیا", + "FK": "جزائر ÙØ§Ú©Ù„ینڈ", + "FO": "جزائر Ùیرو", + "GF": "ÙØ±Ø§Ù†Ø³ÛŒØ³ÛŒ گیانا", + "IC": "جزائر کناری", + "IO": "برطانوی بحرÛند خطÛ", + "MH": "جزائر مارشل", + "MP": "جزائر شمالی ماریانا", + "NF": "Ø¬Ø²ÛŒØ±Û Ù†Ø§Ø±ÙÙˆÚ©", + "PN": "جزائر پٹکیرن", + "SB": "جزائر سلیمان", + "TA": "ترسٹان دا کونیا", + "TC": "جزائر کیکس Ùˆ ترکیÛ", + "UM": "امریکی بیرونی جزائر", + "VG": "برطانوی جزائر ورجن", + "VI": "امریکی جزائر ورجن" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/uz.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/uz.json new file mode 100644 index 0000000000000000000000000000000000000000..089d74c1391c116bb84eb72b54c9b4d823b2875f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/uz.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.44", + "Names": { + "AC": "Me’roj oroli", + "AD": "Andorra", + "AE": "Birlashgan Arab Amirliklari", + "AF": "AfgÊ»oniston", + "AG": "Antigua va Barbuda", + "AI": "Angilya", + "AL": "Albaniya", + "AM": "Armaniston", + "AO": "Angola", + "AQ": "Antarktida", + "AR": "Argentina", + "AS": "Amerika Samoasi", + "AT": "Avstriya", + "AU": "Avstraliya", + "AW": "Aruba", + "AX": "Aland orollari", + "AZ": "Ozarbayjon", + "BA": "Bosniya va Gertsegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Belgiya", + "BF": "Burkina-Faso", + "BG": "Bolgariya", + "BH": "Bahrayn", + "BI": "Burundi", + "BJ": "Benin", + "BL": "Sen-Bartelemi", + "BM": "Bermuda orollari", + "BN": "Bruney", + "BO": "Boliviya", + "BQ": "Boneyr, Sint-Estatius va Saba", + "BR": "Braziliya", + "BS": "Bagama orollari", + "BT": "Butan", + "BW": "Botsvana", + "BY": "Belarus", + "BZ": "Beliz", + "CA": "Kanada", + "CC": "Kokos (Kiling) orollari", + "CD": "Kongo – Kinshasa", + "CF": "Markaziy Afrika Respublikasi", + "CG": "Kongo – Brazzavil", + "CH": "Shveytsariya", + "CI": "Kot-d’Ivuar", + "CK": "Kuk orollari", + "CL": "Chili", + "CM": "Kamerun", + "CN": "Xitoy", + "CO": "Kolumbiya", + "CR": "Kosta-Rika", + "CU": "Kuba", + "CV": "Kabo-Verde", + "CW": "Kyurasao", + "CX": "Rojdestvo oroli", + "CY": "Kipr", + "CZ": "Chexiya Respublikasi", + "DE": "Germaniya", + "DG": "Diyego-Garsiya", + "DJ": "Jibuti", + "DK": "Daniya", + "DM": "Dominika", + "DO": "Dominikan Respublikasi", + "DZ": "Jazoir", + "EA": "Seuta va Melilya", + "EC": "Ekvador", + "EE": "Estoniya", + "EG": "Misr", + "EH": "G‘arbiy Sahroi Kabir", + "ER": "Eritreya", + "ES": "Ispaniya", + "ET": "Efiopiya", + "FI": "Finlandiya", + "FJ": "Fiji", + "FK": "Folklend orollari", + "FM": "Mikroneziya", + "FO": "Farer orollari", + "FR": "Fransiya", + "GA": "Gabon", + "GB": "Buyuk Britaniya", + "GD": "Grenada", + "GE": "Gruziya", + "GF": "Fransuz Gvianasi", + "GG": "Gernsi", + "GH": "Gana", + "GI": "Gibraltar", + "GL": "Grenlandiya", + "GM": "Gambiya", + "GN": "Gvineya", + "GP": "Gvadelupe", + "GQ": "Ekvatorial Gvineya", + "GR": "Gretsiya", + "GS": "Janubiy Georgiya va Janubiy Sendvich orollari", + "GT": "Gvatemala", + "GU": "Guam", + "GW": "Gvineya-Bisau", + "GY": "Gayana", + "HK": "Gonkong (Xitoy MMH)", + "HN": "Gonduras", + "HR": "Xorvatiya", + "HT": "Gaiti", + "HU": "Vengriya", + "IC": "Kanar orollari", + "ID": "Indoneziya", + "IE": "Irlandiya", + "IL": "Isroil", + "IM": "Men oroli", + "IN": "Hindiston", + "IO": "Britaniyaning Hind okeanidagi hududi", + "IQ": "Iroq", + "IR": "Eron", + "IS": "Islandiya", + "IT": "Italiya", + "JE": "Jersi", + "JM": "Yamayka", + "JO": "Iordaniya", + "JP": "Yaponiya", + "KE": "Keniya", + "KG": "QirgÊ»iziston", + "KH": "Kambodja", + "KI": "Kiribati", + "KM": "Komor orollari", + "KN": "Sent-Kits va Nevis", + "KP": "Shimoliy Koreya", + "KR": "Janubiy Koreya", + "KW": "Quvayt", + "KY": "Kayman orollari", + "KZ": "QozogÊ»iston", + "LA": "Laos", + "LB": "Livan", + "LC": "Sent-Lyusiya", + "LI": "Lixtenshteyn", + "LK": "Shri-Lanka", + "LR": "Liberiya", + "LS": "Lesoto", + "LT": "Litva", + "LU": "Lyuksemburg", + "LV": "Latviya", + "LY": "Liviya", + "MA": "Marokash", + "MC": "Monako", + "MD": "Moldova", + "ME": "Chernogoriya", + "MF": "Sent-Martin", + "MG": "Madagaskar", + "MH": "Marshall orollari", + "MK": "Makedoniya", + "ML": "Mali", + "MM": "Myanma (Birma)", + "MN": "Mongoliya", + "MO": "Makao (Xitoy MMH)", + "MP": "Shimoliy Mariana orollari", + "MQ": "Martinika", + "MR": "Mavritaniya", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mavrikiy", + "MV": "Maldiv orollari", + "MW": "Malavi", + "MX": "Meksika", + "MY": "Malayziya", + "MZ": "Mozambik", + "NA": "Namibiya", + "NC": "Yangi Kaledoniya", + "NE": "Niger", + "NF": "Norfolk oroli", + "NG": "Nigeriya", + "NI": "Nikaragua", + "NL": "Niderlandiya", + "NO": "Norvegiya", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "Yangi Zelandiya", + "OM": "Ummon", + "PA": "Panama", + "PE": "Peru", + "PF": "Fransuz Polineziyasi", + "PG": "Papua – Yangi Gvineya", + "PH": "Filippin", + "PK": "Pokiston", + "PL": "Polsha", + "PM": "Sen-Pyer va Mikelon", + "PN": "Pitkern orollari", + "PR": "Puerto-Riko", + "PS": "Falastin hududi", + "PT": "Portugaliya", + "PW": "Palau", + "PY": "Paragvay", + "QA": "Qatar", + "RE": "Reyunion", + "RO": "Ruminiya", + "RS": "Serbiya", + "RU": "Rossiya", + "RW": "Ruanda", + "SA": "Saudiya Arabistoni", + "SB": "Solomon orollari", + "SC": "Seyshel orollari", + "SD": "Sudan", + "SE": "Shvetsiya", + "SG": "Singapur", + "SH": "Muqaddas Yelena oroli", + "SI": "Sloveniya", + "SJ": "Svalbard va Yan-Mayen", + "SK": "Slovakiya", + "SL": "Syerra-Leone", + "SM": "San-Marino", + "SN": "Senegal", + "SO": "Somali", + "SR": "Surinam", + "SS": "Janubiy Sudan", + "ST": "San-Tome va Prinsipi", + "SV": "Salvador", + "SX": "Sint-Marten", + "SY": "Suriya", + "SZ": "Svazilend", + "TA": "Tristan-da-Kunya", + "TC": "Turks va Kaykos orollari", + "TD": "Chad", + "TF": "Fransuz Janubiy hududlari", + "TG": "Togo", + "TH": "Tailand", + "TJ": "Tojikiston", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turkmaniston", + "TN": "Tunis", + "TO": "Tonga", + "TR": "Turkiya", + "TT": "Trinidad va Tobago", + "TV": "Tuvalu", + "TW": "Tayvan", + "TZ": "Tanzaniya", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "AQSH yondosh orollari", + "UN": "Birlashgan Millatlar Tashkiloti", + "US": "Amerika Qo‘shma Shtatlari", + "UY": "Urugvay", + "UZ": "OÊ»zbekiston", + "VA": "Vatikan", + "VC": "Sent-Vinsent va Grenadin", + "VE": "Venesuela", + "VG": "Britaniya Virgin orollari", + "VI": "AQSH Virgin orollari", + "VN": "Vyetnam", + "VU": "Vanuatu", + "WF": "Uollis va Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yaman", + "YT": "Mayotta", + "ZA": "Janubiy Afrika Respublikasi", + "ZM": "Zambiya", + "ZW": "Zimbabve" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/uz_Arab.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/uz_Arab.json new file mode 100644 index 0000000000000000000000000000000000000000..939c7559362f146efe1db4e50cf3c20aff53eaee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/uz_Arab.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AF": "Ø§ÙØºØ§Ù†Ø³ØªØ§Ù†" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/uz_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/uz_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..976b4b0979cf64a9fc0d649ca27d7e0786da97ec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/uz_Cyrl.json @@ -0,0 +1,258 @@ +{ + "Version": "2.1.27.98", + "Names": { + "AC": "Меърож ороли", + "AD": "Ðндорра", + "AE": "Бирлашган Ðраб Ðмирликлари", + "AF": "ÐфғониÑтон", + "AG": "Ðнтигуа ва Барбуда", + "AI": "ÐнгилÑ", + "AL": "ÐлбаниÑ", + "AM": "ÐрманиÑтон", + "AO": "Ðнгола", + "AQ": "Ðнтарктида", + "AR": "Ðргентина", + "AS": "Ðмерика СамоаÑи", + "AT": "ÐвÑтриÑ", + "AU": "ÐвÑтралиÑ", + "AW": "Ðруба", + "AX": "Ðланд ороллари", + "AZ": "Озарбайжон", + "BA": "БоÑÐ½Ð¸Ñ Ð²Ð° Герцеговина", + "BB": "БарбадоÑ", + "BD": "Бангладеш", + "BE": "БельгиÑ", + "BF": "Буркина-ФаÑо", + "BG": "БолгариÑ", + "BH": "Баҳрайн", + "BI": "Бурунди", + "BJ": "Бенин", + "BL": "Сен-Бартелеми", + "BM": "Бермуда", + "BN": "Бруней", + "BO": "БоливиÑ", + "BQ": "Бонейр, Синт-ЭÑÑ‚Ð°Ñ‚Ð¸ÑƒÑ Ð²Ð° Саба", + "BR": "БразилиÑ", + "BS": "Багама ороллари", + "BT": "Бутан", + "BW": "БотÑванна", + "BY": "БелоруÑиÑ", + "BZ": "Белиз", + "CA": "Канада", + "CC": "ÐšÐ¾ÐºÐ¾Ñ (Килинг) ороллари", + "CD": "Конго-КиншаÑа", + "CF": "Марказий Ðфрика РеÑпубликаÑи", + "CG": "Конго Браззавиль", + "CH": "ШвейцариÑ", + "CI": "Кот-д’Ивуар", + "CK": "Кук ороллари", + "CL": "Чили", + "CM": "Камерун", + "CN": "Хитой", + "CO": "КолумбиÑ", + "CR": "КоÑта-Рика", + "CU": "Куба", + "CV": "Кабо-Верде", + "CW": "КюраÑао", + "CX": "РождеÑтво ороли", + "CY": "Кипр", + "CZ": "Ð§ÐµÑ…Ð¸Ñ Ð ÐµÑпубликаÑи", + "DE": "ГерманиÑ", + "DG": "Диего-ГарÑиÑ", + "DJ": "Жибути", + "DK": "ДаниÑ", + "DM": "Доминика", + "DO": "Доминикан РеÑпубликаÑи", + "DZ": "Жазоир", + "EA": "СÑута ва Мелилла", + "EC": "Эквадор", + "EE": "ЭÑтониÑ", + "EG": "МиÑÑ€", + "EH": "Ғарбий Саҳрои Кабир", + "ER": "ЭритреÑ", + "ES": "ИÑпаниÑ", + "ET": "ЭфиопиÑ", + "FI": "ФинлÑндиÑ", + "FJ": "Фижи", + "FK": "Фолкленд ороллари", + "FM": "МикронезиÑ", + "FO": "Фарер ороллари", + "FR": "ФранциÑ", + "GA": "Габон", + "GB": "Буюк БританиÑ", + "GD": "Гренада", + "GE": "ГрузиÑ", + "GF": "Француз ГвианаÑи", + "GG": "ГернÑи", + "GH": "Гана", + "GI": "Гибралтар", + "GL": "ГренландиÑ", + "GM": "ГамбиÑ", + "GN": "ГвинеÑ", + "GP": "Гваделупе", + "GQ": "Экваториал ГвинеÑ", + "GR": "ГрециÑ", + "GS": "Жанубий Ð“ÐµÐ¾Ñ€Ð³Ð¸Ñ Ð²Ð° Жанубий Сендвич ороллари", + "GT": "Гватемала", + "GU": "Гуам", + "GW": "ГвинеÑ-БиÑау", + "GY": "ГаÑна", + "HK": "Гонконг (Хитой ММҲ)", + "HN": "ГондураÑ", + "HR": "ХорватиÑ", + "HT": "Гаити", + "HU": "ВенгриÑ", + "IC": "Канар ороллари", + "ID": "ИндонезиÑ", + "IE": "ИрландиÑ", + "IL": "ИÑроил", + "IM": "МÑн ороли", + "IN": "ҲиндиÑтон", + "IO": "БританиÑнинг Ҳинд океанидаги ҳудуди", + "IQ": "Ироқ", + "IR": "Эрон", + "IS": "ИÑландиÑ", + "IT": "ИталиÑ", + "JE": "ЖерÑи", + "JM": "Ямайка", + "JO": "ИорданиÑ", + "JP": "ЯпониÑ", + "KE": "КениÑ", + "KG": "ҚирғизиÑтон", + "KH": "Камбоджа", + "KI": "Кирибати", + "KM": "Комор ороллари", + "KN": "Сент-ÐšÐ¸Ñ‚Ñ Ð²Ð° ÐевиÑ", + "KP": "Шимолий КореÑ", + "KR": "Жанубий КореÑ", + "KW": "Қувайт", + "KY": "Кайман ороллари", + "KZ": "ҚозоғиÑтон", + "LA": "ЛаоÑ", + "LB": "Ливан", + "LC": "Сент-ЛюÑиÑ", + "LI": "Лихтенштейн", + "LK": "Шри-Ланка", + "LR": "ЛибериÑ", + "LS": "ЛеÑото", + "LT": "Литва", + "LU": "ЛюкÑембург", + "LV": "ЛатвиÑ", + "LY": "ЛивиÑ", + "MA": "Марокаш", + "MC": "Монако", + "MD": "Молдова", + "ME": "ЧерногориÑ", + "MF": "Сент-Мартин", + "MG": "МадагаÑкар", + "MH": "Маршал ороллари", + "MK": "МакедониÑ", + "ML": "Мали", + "MM": "МьÑнма (Бирма)", + "MN": "МонголиÑ", + "MO": "Макао (Хитой ММҲ)", + "MP": "Шимолий Марианна ороллари", + "MQ": "Мартиника", + "MR": "МавританиÑ", + "MS": "МонтÑеррат", + "MT": "Мальта", + "MU": "Маврикий", + "MV": "Мальдив ороллари", + "MW": "Малави", + "MX": "МекÑика", + "MY": "МалайзиÑ", + "MZ": "Мозамбик", + "NA": "ÐамибиÑ", + "NC": "Янги КаледониÑ", + "NE": "Ðигер", + "NF": "Ðорфолк ороллари", + "NG": "ÐигериÑ", + "NI": "Ðикарагуа", + "NL": "ÐидерландиÑ", + "NO": "ÐорвегиÑ", + "NP": "Ðепал", + "NR": "Ðауру", + "NU": "ÐиуÑ", + "NZ": "Янги ЗеландиÑ", + "OM": "Уммон", + "PA": "Панама", + "PE": "Перу", + "PF": "Француз ПолинезиÑÑи", + "PG": "Папуа - Янги ГвинеÑ", + "PH": "Филиппин", + "PK": "ПокиÑтон", + "PL": "Польша", + "PM": "Сент-Пьер ва Микелон", + "PN": "ПиткÑрн ороллари", + "PR": "ПуÑрто-Рико", + "PS": "ФалаÑтин ҳудуди", + "PT": "ПортугалиÑ", + "PW": "Палау", + "PY": "Парагвай", + "QA": "Қатар", + "RE": "Реюнион", + "RO": "РуминиÑ", + "RS": "СербиÑ", + "RU": "РоÑÑиÑ", + "RW": "Руанда", + "SA": "Ð¡Ð°ÑƒÐ´Ð¸Ñ ÐрабиÑтони", + "SB": "Соломон ороллари", + "SC": "Сейшел ороллари", + "SD": "Судан", + "SE": "ШвециÑ", + "SG": "Сингапур", + "SH": "ÐœÑƒÒ›Ð°Ð´Ð´Ð°Ñ Ð•Ð»ÐµÐ½Ð° ороли", + "SI": "СловениÑ", + "SJ": "Свалбард ва Ян-Майен", + "SK": "СловакиÑ", + "SL": "Сьерра-Леоне", + "SM": "Сан-Марино", + "SN": "Сенегал", + "SO": "Сомали", + "SR": "Суринам", + "SS": "Жанубий Судан", + "ST": "Сан-Томе ва ПринÑипи", + "SV": "Салвадор", + "SX": "Синт-Мартен", + "SY": "СуриÑ", + "SZ": "Свазиленд", + "TA": "ТриÑтан-да-КунÑ", + "TC": "Ð¢ÑƒÑ€ÐºÑ Ð²Ð° ÐšÐ°Ð¹ÐºÐ¾Ñ Ð¾Ñ€Ð¾Ð»Ð»Ð°Ñ€Ð¸", + "TD": "Чад", + "TF": "Француз жанубий худудлари", + "TG": "Того", + "TH": "Таиланд", + "TJ": "ТожикиÑтон", + "TK": "Токелау", + "TL": "Тимор-ЛеÑте", + "TM": "ТуркманиÑтон", + "TN": "ТуниÑ", + "TO": "Тонга", + "TR": "ТуркиÑ", + "TT": "Тринидад ва Тобаго", + "TV": "Тувалу", + "TW": "Тайван", + "TZ": "ТанзаниÑ", + "UA": "Украина", + "UG": "Уганда", + "UM": "ÐҚШ ёндош ороллари", + "US": "Ðмерика Қўшма Штатлари", + "UY": "Уругвай", + "UZ": "ЎзбекиÑтон", + "VA": "Ватикан", + "VC": "Сент-ВинÑент ва Гренадин", + "VE": "ВенеÑуÑла", + "VG": "Ð‘Ñ€Ñ‚Ð°Ð½Ð¸Ñ Ð’Ð¸Ñ€Ð³Ð¸Ð½ ороллари", + "VI": "ÐҚШ Виргин ороллари", + "VN": "Вьетнам", + "VU": "Вануату", + "WF": "Ð£Ð¾Ð»Ð»Ð¸Ñ Ð²Ð° Футуна", + "WS": "Самоа", + "XK": "КоÑово", + "YE": "Яман", + "YT": "Майотта", + "ZA": "Жанубий Ðфрика РеÑпубликаÑи", + "ZM": "ЗамбиÑ", + "ZW": "Зимбабве" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/vi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/vi.json new file mode 100644 index 0000000000000000000000000000000000000000..51c3601bf54fad3f09064b9da6d27d0ed0a37f09 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/vi.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "Äảo Ascension", + "AD": "Andorra", + "AE": "Các Tiểu Vương quốc Ả Rập Thống nhất", + "AF": "Afghanistan", + "AG": "Antigua và Barbuda", + "AI": "Anguilla", + "AL": "Albania", + "AM": "Armenia", + "AO": "Angola", + "AQ": "Nam Cá»±c", + "AR": "Argentina", + "AS": "Äảo Somoa thuá»™c Mỹ", + "AT": "Ão", + "AU": "Australia", + "AW": "Aruba", + "AX": "Quần đảo Ã…land", + "AZ": "Azerbaijan", + "BA": "Bosnia và Herzegovina", + "BB": "Barbados", + "BD": "Bangladesh", + "BE": "Bỉ", + "BF": "Burkina Faso", + "BG": "Bulgaria", + "BH": "Bahrain", + "BI": "Burundi", + "BJ": "Benin", + "BL": "St. Barthélemy", + "BM": "Bermuda", + "BN": "Brunei", + "BO": "Bolivia", + "BQ": "Ca-ri-bê Hà Lan", + "BR": "Brazil", + "BS": "Bahamas", + "BT": "Bhutan", + "BW": "Botswana", + "BY": "Belarus", + "BZ": "Belize", + "CA": "Canada", + "CC": "Quần đảo Cocos (Keeling)", + "CD": "Congo - Kinshasa", + "CF": "Cá»™ng hòa Trung Phi", + "CG": "Congo - Brazzaville", + "CH": "Thụy SÄ©", + "CI": "Côte d’Ivoire", + "CK": "Quần đảo Cook", + "CL": "Chile", + "CM": "Cameroon", + "CN": "Trung Quốc", + "CO": "Colombia", + "CR": "Costa Rica", + "CU": "Cuba", + "CV": "Cape Verde", + "CW": "Curaçao", + "CX": "Äảo Giáng Sinh", + "CY": "Síp", + "CZ": "Cá»™ng hòa Séc", + "DE": "Äức", + "DG": "Diego Garcia", + "DJ": "Djibouti", + "DK": "Äan Mạch", + "DM": "Dominica", + "DO": "Cá»™ng hòa Dominica", + "DZ": "Algeria", + "EA": "Ceuta và Melilla", + "EC": "Ecuador", + "EE": "Estonia", + "EG": "Ai Cập", + "EH": "Tây Sahara", + "ER": "Eritrea", + "ES": "Tây Ban Nha", + "ET": "Ethiopia", + "FI": "Phần Lan", + "FJ": "Fiji", + "FK": "Quần đảo Falkland", + "FM": "Micronesia", + "FO": "Quần đảo Faroe", + "FR": "Pháp", + "GA": "Gabon", + "GB": "Vương quốc Anh", + "GD": "Grenada", + "GE": "Gruzia", + "GF": "Guiana thuá»™c Pháp", + "GG": "Guernsey", + "GH": "Ghana", + "GI": "Gibraltar", + "GL": "Greenland", + "GM": "Gambia", + "GN": "Guinea", + "GP": "Guadeloupe", + "GQ": "Guinea Xích Äạo", + "GR": "Hy Lạp", + "GS": "Quần đảo Nam Georgia và Nam Sandwich", + "GT": "Guatemala", + "GU": "Guam", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HK": "Hồng Kông, Trung Quốc", + "HN": "Honduras", + "HR": "Croatia", + "HT": "Haiti", + "HU": "Hungary", + "IC": "Quần đảo Canary", + "ID": "Indonesia", + "IE": "Ireland", + "IL": "Israel", + "IM": "Äảo Man", + "IN": "Ấn Äá»™", + "IO": "Lãnh thổ Anh tại Ấn Äá»™ Dương", + "IQ": "Iraq", + "IR": "Iran", + "IS": "Iceland", + "IT": "Ã", + "JE": "Jersey", + "JM": "Jamaica", + "JO": "Jordan", + "JP": "Nhật Bản", + "KE": "Kenya", + "KG": "Kyrgyzstan", + "KH": "Campuchia", + "KI": "Kiribati", + "KM": "Comoros", + "KN": "St. Kitts và Nevis", + "KP": "Triá»u Tiên", + "KR": "Hàn Quốc", + "KW": "Kuwait", + "KY": "Quần đảo Cayman", + "KZ": "Kazakhstan", + "LA": "Lào", + "LB": "Li-băng", + "LC": "St. Lucia", + "LI": "Liechtenstein", + "LK": "Sri Lanka", + "LR": "Liberia", + "LS": "Lesotho", + "LT": "Litva", + "LU": "Luxembourg", + "LV": "Latvia", + "LY": "Libya", + "MA": "Ma-rốc", + "MC": "Monaco", + "MD": "Moldova", + "ME": "Montenegro", + "MF": "St. Martin", + "MG": "Madagascar", + "MH": "Quần đảo Marshall", + "MK": "Macedonia", + "ML": "Mali", + "MM": "Myanmar (Miến Äiện)", + "MN": "Mông Cổ", + "MO": "Macao, Trung Quốc", + "MP": "Quần đảo Bắc Mariana", + "MQ": "Martinique", + "MR": "Mauritania", + "MS": "Montserrat", + "MT": "Malta", + "MU": "Mauritius", + "MV": "Maldives", + "MW": "Malawi", + "MX": "Mexico", + "MY": "Malaysia", + "MZ": "Mozambique", + "NA": "Namibia", + "NC": "New Caledonia", + "NE": "Niger", + "NF": "Äảo Norfolk", + "NG": "Nigeria", + "NI": "Nicaragua", + "NL": "Hà Lan", + "NO": "Na Uy", + "NP": "Nepal", + "NR": "Nauru", + "NU": "Niue", + "NZ": "New Zealand", + "OM": "Oman", + "PA": "Panama", + "PE": "Peru", + "PF": "Polynesia thuá»™c Pháp", + "PG": "Papua New Guinea", + "PH": "Philippines", + "PK": "Pakistan", + "PL": "Ba Lan", + "PM": "Saint Pierre và Miquelon", + "PN": "Quần đảo Pitcairn", + "PR": "Puerto Rico", + "PS": "Lãnh thổ Palestine", + "PT": "Bồ Äào Nha", + "PW": "Palau", + "PY": "Paraguay", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Romania", + "RS": "Serbia", + "RU": "Nga", + "RW": "Rwanda", + "SA": "Ả Rập Xê-út", + "SB": "Quần đảo Solomon", + "SC": "Seychelles", + "SD": "Sudan", + "SE": "Thụy Äiển", + "SG": "Singapore", + "SH": "St. Helena", + "SI": "Slovenia", + "SJ": "Svalbard và Jan Mayen", + "SK": "Slovakia", + "SL": "Sierra Leone", + "SM": "San Marino", + "SN": "Senegal", + "SO": "Somalia", + "SR": "Suriname", + "SS": "Nam Sudan", + "ST": "São Tomé và Príncipe", + "SV": "El Salvador", + "SX": "Sint Maarten", + "SY": "Syria", + "SZ": "Swaziland", + "TA": "Tristan da Cunha", + "TC": "Quần đảo Turk và Caicos", + "TD": "Chad", + "TF": "Lãnh thổ phía Nam Thuá»™c Pháp", + "TG": "Togo", + "TH": "Thái Lan", + "TJ": "Tajikistan", + "TK": "Tokelau", + "TL": "Timor-Leste", + "TM": "Turkmenistan", + "TN": "Tunisia", + "TO": "Tonga", + "TR": "Thổ NhÄ© Kỳ", + "TT": "Trinidad và Tobago", + "TV": "Tuvalu", + "TW": "Äài Loan", + "TZ": "Tanzania", + "UA": "Ukraina", + "UG": "Uganda", + "UM": "Các đảo xa thuá»™c Hoa Kỳ", + "UN": "Liên hiệp quốc", + "US": "Hoa Kỳ", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VA": "Thành Vatican", + "VC": "St. Vincent và Grenadines", + "VE": "Venezuela", + "VG": "Quần đảo Virgin thuá»™c Anh", + "VI": "Quần đảo Virgin thuá»™c Mỹ", + "VN": "Việt Nam", + "VU": "Vanuatu", + "WF": "Wallis và Futuna", + "WS": "Samoa", + "XK": "Kosovo", + "YE": "Yemen", + "YT": "Mayotte", + "ZA": "Nam Phi", + "ZM": "Zambia", + "ZW": "Zimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/yi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/yi.json new file mode 100644 index 0000000000000000000000000000000000000000..c7ffdae7baa14b3b02a75329b31de84f38fd54a2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/yi.json @@ -0,0 +1,203 @@ +{ + "Version": "2.1.27.97", + "Names": { + "AD": "×ַנד×רע", + "AF": "×ַפֿגה×ַניסט×ַן", + "AG": "×ַנטיגוע ×ון ב×ַרבודע", + "AL": "×ַלב×Ö·× ×™×¢", + "AM": "×ַרמעניע", + "AO": "×Ö·× ×’×לע", + "AQ": "×ַנט×ַרקטיקע", + "AR": "×ַרגענטינע", + "AT": "עסטרייך", + "AU": "×ויסטר×ַליע", + "AW": "×ַרוב×Ö·", + "BA": "ב×סניע הערצעג×ווינע", + "BB": "ב×ַרב×ַד×ס", + "BD": "ב×ַנגל×ַדעש", + "BE": "בעלגיע", + "BF": "בורקינע פֿ×ַס×", + "BG": "בולג×ַריע", + "BI": "בורונדי", + "BJ": "בענין", + "BM": "בערמודע", + "BN": "ברוניי", + "BO": "ב×ליוויע", + "BR": "בר×ַזיל", + "BS": "ב×Ö·×”×ַמ×ַס", + "BT": "בהוט×ַן", + "BW": "ב×צוו×Ö·× ×¢", + "BY": "בעל×ַרוס", + "BZ": "בעליז", + "CA": "×§×Ö·× ×ַדע", + "CD": "×§×× ×’×־קינש×Ö·×–×¢", + "CF": "צענטר×ַל־×ַפֿריק×ַנישע רעפּובליק", + "CH": "שווייץ", + "CI": "העלפֿ×Ö· נדביין ב×רטן", + "CK": "קוק ×ינזלען", + "CL": "טשילע", + "CM": "×§×ַמערון", + "CN": "×›×™× ×¢", + "CO": "×§×ל×מביע", + "CR": "×§×סט×Ö· ריק×Ö·", + "CU": "קוב×Ö·", + "CV": "×§×ַפּווערדישע ×ינזלען", + "CW": "קור×ַס×Ö·×", + "CZ": "טשעכיי", + "DE": "דייטשל×ַנד", + "DJ": "דזשיבוטי", + "DK": "דענמ×ַרק", + "DM": "ד×מיניקע", + "DO": "ד×מיניק×ַנישע רעפּובליק", + "EC": "עקוו×ַד×ר", + "EE": "עסטל×ַנד", + "EG": "עגיפּטן", + "ER": "עריטרעע", + "ES": "שפּ×Ö·× ×™×¢", + "ET": "עטי×פּיע", + "FI": "פֿינל×ַנד", + "FJ": "פֿידזשי", + "FK": "פֿ×ַלקל×ַנד ×ינזלען", + "FM": "מיקר×× ×¢×–×™×¢", + "FO": "פֿ×Ö·×¨× ×ינזלען", + "FR": "פֿר×ַנקרייך", + "GA": "×’×ַב×ן", + "GB": "פֿ×ַר×ייניגטע קעניגרייך", + "GD": "גרענ×ַד×Ö·", + "GE": "גרוזיע", + "GF": "פֿר×ַנצויזישע גוי×Ö·× ×¢", + "GG": "גערנזי", + "GH": "×’×”×Ö·× ×¢", + "GI": "גיבר×ַלט×ַר", + "GL": "גרינל×ַנד", + "GM": "×’×ַמביע", + "GN": "×’×™× ×¢", + "GP": "גוו×ַדעלופ", + "GQ": "עקוו×ַט×רישע ×’×™× ×¢", + "GR": "גריכנל×ַנד", + "GT": "גוו×ַטעמ×ַלע", + "GU": "גוו×Ö·×", + "GW": "גינע־ביס×ַו", + "GY": "גוי×Ö·× ×¢", + "HN": "×”×נדור×ַס", + "HR": "קר××ַטיע", + "HT": "×”×ַיטי", + "HU": "×ונגערן", + "IC": "×§×Ö·× ×ַרישע ×ינזלען", + "ID": "×ינד×× ×¢×–×™×¢", + "IE": "×ירל×ַנד", + "IL": "ישר×ל", + "IN": "×ינדיע", + "IR": "×יר×ַן", + "IS": "×יסל×ַנד", + "IT": "×יט×ַליע", + "JE": "דזשערזי", + "JM": "דזש×ַמייקע", + "JP": "×™×ַפּ×ַן", + "KE": "×§×¢× ×™×¢", + "KH": "×§×ַמב×דיע", + "KI": "קיריב×ַטי", + "KM": "×§×מ×ר×ס", + "KY": "קיימ×ַן ×ינזלען", + "LA": "ל×Ö·×ס", + "LB": "לבנון", + "LI": "ליכטנשטיין", + "LK": "סרי־ל×Ö·× ×§×Ö·", + "LR": "ליבעריע", + "LS": "לעס×ט×", + "LT": "ליטע", + "LU": "לוקסעמבורג", + "LV": "לעטל×ַנד", + "LY": "ליביע", + "MA": "מ×ַר××§×", + "MC": "מ×× ×Ö·×§×", + "MD": "מ×לד×ווע", + "ME": "מ×נטענעגר×", + "MG": "מ×ַד×Ö·×’×ַסק×ַר", + "MH": "מ×ַרש×ַל ×ינזלען", + "MK": "מ×ַקעד×× ×™×¢", + "ML": "מ×ַלי", + "MM": "מי×ַנמ×ַר", + "MN": "מ×× ×’×ליי", + "MQ": "מ×ַרטיניק", + "MR": "מ×ַריט×Ö·× ×™×¢", + "MS": "מ×נטסער×ַט", + "MT": "מ×ַלט×Ö·", + "MU": "מ×ריציוס", + "MV": "מ×ַלדיוון", + "MW": "מ×ַל×ַווי", + "MX": "מעקסיקע", + "MY": "מ×ַלייזיע", + "MZ": "מ××–×ַמביק", + "NA": "× ×ַמיביע", + "NC": "נײַ ×§×ַלעד×× ×™×¢", + "NE": "ניזשער", + "NF": "× ×רפֿ×לק ×ינזל", + "NG": "ניגעריע", + "NI": "× ×™×§×ַר×ַגוע", + "NL": "×”×ל×ַנד", + "NO": "× ×רוועגיע", + "NP": "נעפּ×ַל", + "NZ": "ניו זיל×ַנד", + "PA": "פּ×Ö·× ×ַמ×Ö·", + "PE": "פּערו", + "PF": "פֿר×ַנצויזישע פּ×לינעזיע", + "PG": "פּ×ַפּו×Ö· נײַ ×’×™× ×¢", + "PH": "פֿיליפּינען", + "PK": "פּ×ַקיסט×ַן", + "PL": "פּוילן", + "PN": "פּיטקערן ×ינזלען", + "PR": "פּ×רט×־ריק×", + "PT": "פּ×רטוג×ַל", + "PY": "פּ×ַר×ַגווײַ", + "QA": "×§×ַט×ַר", + "RE": "רע×וני×ן", + "RO": "רומעניע", + "RS": "סערביע", + "RU": "רוסל×ַנד", + "RW": "רוו×ַנדע", + "SB": "ס×ל×מ×ן ×ינזלען", + "SC": "סיישעל", + "SD": "סוד×ַן", + "SE": "שוועדן", + "SG": "סינג×ַפּור", + "SH": "סט העלענע", + "SI": "סל×וועניע", + "SK": "סל×וו×Ö·×§×™×™", + "SL": "סיערע לע×× ×¢", + "SM": "ס×ַן מ×ַרינ×", + "SN": "סענעג×ַל", + "SO": "ס×מ×ַליע", + "SR": "סורינ×Ö·×", + "SS": "דרו×־סוד×ַן", + "ST": "ס×Ö·× ×˜×מע ×ון פּרינסיפּע", + "SV": "על ס×ַלוו×ַד×ר", + "SY": "סיריע", + "SZ": "סוו×ַזיל×ַנד", + "TD": "טש×ַד", + "TG": "ט××’×", + "TH": "טייל×ַנד", + "TM": "טורקמעניסט×ַן", + "TN": "טוניסיע", + "TO": "ט×× ×’×Ö·", + "TR": "טערקיי", + "TT": "טריניד×ַד ×ון ט×ב×Ö·×’×", + "TV": "טו×וו×ַלו", + "TZ": "ט×Ö·× ×–×Ö·× ×™×¢", + "UA": "×וקר×Ö·×™× ×¢", + "UG": "×וג×ַנדע", + "US": "פֿ×ַר×ייניגטע שט×ַטן", + "UY": "×ורוגוויי", + "VA": "וו×ַטיק×ַן שט×ָט", + "VE": "ווענעזועלע", + "VN": "וויעטנ×Ö·×", + "VU": "וו×ַנו×ַטו", + "WS": "ס×ַמ××Ö·", + "XK": "×§×ס×וו×", + "YE": "תימן", + "YT": "מ×Ö·×™×ט", + "ZA": "דרו×Ö¾×ַפֿריקע", + "ZM": "×–×ַמביע", + "ZW": "זימב×ַבווע" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/yo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/yo.json new file mode 100644 index 0000000000000000000000000000000000000000..5a41bee8b949272327f7c2f4c620e53f3f99c8ba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/yo.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.27.40", + "Names": { + "AD": "OrílẹÌède Ààndórà", + "AE": "OrílẹÌède Ẹmirate ti Awá»n Arabu", + "AF": "OrílẹÌède Àfùgànístánì", + "AG": "OrílẹÌède Ààntígúà àti Báríbúdà", + "AI": "OrílẹÌède Ààngúlílà", + "AL": "OrílẹÌède Àlùbàníánì", + "AM": "OrílẹÌède Améníà", + "AO": "OrílẹÌède Ààngólà", + "AR": "OrílẹÌède Agentínà", + "AS": "Sámóánì ti OrílẹÌède Àméríkà", + "AT": "OrílẹÌède Asítíríà", + "AU": "OrílẹÌède Ãstràlìá", + "AW": "OrílẹÌède Ãrúbà", + "AZ": "OrílẹÌède AsẹÌbájánì", + "BA": "OrílẹÌède Bá»Ì€síníà àti Ẹtisẹgófínà", + "BB": "OrílẹÌède Bábádósì", + "BD": "OrílẹÌède Bángáládésì", + "BE": "OrílẹÌède Bégíá»Ìmù", + "BF": "OrílẹÌède Bùùkíná Fasò", + "BG": "OrílẹÌède Bùùgáríà", + "BH": "OrílẹÌède Báránì", + "BI": "OrílẹÌède Bùùrúndì", + "BJ": "OrílẹÌède Bẹ̀nẹ̀", + "BM": "OrílẹÌède Bémúdà", + "BN": "OrílẹÌède BúrúnẹÌlì", + "BO": "OrílẹÌède Bá»Ì€lífíyà", + "BR": "OrílẹÌède Bàràsílì", + "BS": "OrílẹÌède Bàhámásì", + "BT": "OrílẹÌède Bútánì", + "BW": "OrílẹÌède Bá»Ì€tìsúwánà", + "BY": "OrílẹÌède Bélárúsì", + "BZ": "OrílẹÌède Bèlísẹ̀", + "CA": "OrílẹÌède Kánádà", + "CD": "OrilẹÌède Kóngò", + "CF": "OrílẹÌède Àrin gùngun Ãfíríkà", + "CG": "OrílẹÌède Kóngò", + "CH": "OrílẹÌède switiá¹£ilandi", + "CI": "OrílẹÌède Kóútè forà", + "CK": "OrílẹÌède Etíokun Kùúkù", + "CL": "OrílẹÌède ṣílè", + "CM": "OrílẹÌède Kamerúúnì", + "CN": "OrílẹÌède ṣáínà", + "CO": "OrílẹÌède Kòlómíbìa", + "CR": "OrílẹÌède Kuusita Ríkà", + "CU": "OrílẹÌède Kúbà", + "CV": "OrílẹÌède Etíokun Kápé féndè", + "CY": "OrílẹÌède Kúrúsì", + "CZ": "OrílẹÌède ṣẹÌẹÌkì", + "DE": "OrílẹÌède Gemani", + "DJ": "OrílẹÌède Díbá»Ìótì", + "DK": "OrílẹÌède DẹÌmákì", + "DM": "OrílẹÌède Dòmíníkà", + "DO": "OrilẹÌède Dòmíníkánì", + "DZ": "OrílẹÌède Àlùgèríánì", + "EC": "OrílẹÌède Ekuádò", + "EE": "OrílẹÌède Esitonia", + "EG": "OrílẹÌède Égípítì", + "ER": "OrílẹÌède Eritira", + "ES": "OrílẹÌède Sipani", + "ET": "OrílẹÌède Etopia", + "FI": "OrílẹÌède Filandi", + "FJ": "OrílẹÌède Fiji", + "FK": "OrílẹÌède Etikun Fakalandi", + "FM": "OrílẹÌède Makoronesia", + "FR": "OrílẹÌède Faranse", + "GA": "OrílẹÌède Gabon", + "GB": "OrílẹÌède Omobabirin", + "GD": "OrílẹÌède Genada", + "GE": "OrílẹÌède Gá»gia", + "GF": "OrílẹÌède Firená¹£i Guana", + "GH": "OrílẹÌède Gana", + "GI": "OrílẹÌède Gibaratara", + "GL": "OrílẹÌède Gerelandi", + "GM": "OrílẹÌède Gambia", + "GN": "OrílẹÌède Gene", + "GP": "OrílẹÌède Gadelope", + "GQ": "OrílẹÌède Ekutoria Gini", + "GR": "OrílẹÌède Geriisi", + "GT": "OrílẹÌède Guatemala", + "GU": "OrílẹÌède Guamu", + "GW": "OrílẹÌède Gene-Busau", + "GY": "OrílẹÌède Guyana", + "HN": "OrílẹÌède Hondurasi", + "HR": "OrílẹÌède Kòróátíà", + "HT": "OrílẹÌède Haati", + "HU": "OrílẹÌède Hungari", + "ID": "OrílẹÌède Indonesia", + "IE": "OrílẹÌède Ailandi", + "IL": "OrílẹÌède Iserẹli", + "IN": "OrílẹÌède India", + "IO": "OrílẹÌède Etíkun Ãndíánì ti ÃŒlú Bírítísì", + "IQ": "OrílẹÌède Iraki", + "IR": "OrílẹÌède Irani", + "IS": "OrílẹÌède Aá¹£ilandi", + "IT": "OrílẹÌède Italiyi", + "JM": "OrílẹÌède Jamaika", + "JO": "OrílẹÌède Já»dani", + "JP": "OrílẹÌède Japani", + "KE": "OrílẹÌède Kenya", + "KG": "OrílẹÌède Kuriá¹£isitani", + "KH": "OrílẹÌède Kàmùbódíà", + "KI": "OrílẹÌède Kiribati", + "KM": "OrílẹÌède Kòmòrósì", + "KN": "OrílẹÌède Kiiti ati Neefi", + "KP": "OrílẹÌède Guusu Ká»ria", + "KR": "OrílẹÌède Ariwa Ká»ria", + "KW": "OrílẹÌède Kuweti", + "KY": "OrílẹÌède Etíokun Kámánì", + "KZ": "OrílẹÌède Kaá¹£aá¹£atani", + "LA": "OrílẹÌède Laosi", + "LB": "OrílẹÌède Lebanoni", + "LC": "OrílẹÌède Luá¹£ia", + "LI": "OrílẹÌède Lẹṣitẹnisiteni", + "LK": "OrílẹÌède Siri Lanka", + "LR": "OrílẹÌède Laberia", + "LS": "OrílẹÌède Lesoto", + "LT": "OrílẹÌède Lituania", + "LU": "OrílẹÌède Lusemogi", + "LV": "OrílẹÌède Latifia", + "LY": "OrílẹÌède Libiya", + "MA": "OrílẹÌède Moroko", + "MC": "OrílẹÌède Monako", + "MD": "OrílẹÌède Modofia", + "MG": "OrílẹÌède Madasika", + "MH": "OrílẹÌède Etikun Máṣali", + "MK": "OrílẹÌède Masidonia", + "ML": "OrílẹÌède Mali", + "MM": "OrílẹÌède Manamari", + "MN": "OrílẹÌède Mogolia", + "MP": "OrílẹÌède Etikun Guusu Mariana", + "MQ": "OrílẹÌède Matinikuwi", + "MR": "OrílẹÌède Maritania", + "MS": "OrílẹÌède Motserati", + "MT": "OrílẹÌède Malata", + "MU": "OrílẹÌède Maritiusi", + "MV": "OrílẹÌède Maladifi", + "MW": "OrílẹÌède Malawi", + "MX": "OrílẹÌède Mesiko", + "MY": "OrílẹÌède Malasia", + "MZ": "OrílẹÌède Moá¹£amibiku", + "NA": "OrílẹÌède Namibia", + "NC": "OrílẹÌède Kaledonia Titun", + "NE": "OrílẹÌède Nàìjá", + "NF": "OrílẹÌède Etikun Ná»Ìúfókì", + "NG": "OrílẹÌède Nàìjíríà", + "NI": "OrílẹÌède NIkaragua", + "NL": "OrílẹÌède Nedalandi", + "NO": "OrílẹÌède Ná»á»wii", + "NP": "OrílẹÌède Nepa", + "NR": "OrílẹÌède Nauru", + "NU": "OrílẹÌède Niue", + "NZ": "OrílẹÌède á¹£ilandi Titun", + "OM": "OrílẹÌède Ọá»ma", + "PA": "OrílẹÌède Panama", + "PE": "OrílẹÌède Peru", + "PF": "OrílẹÌède Firená¹£i Polinesia", + "PG": "OrílẹÌède Paapu ti Giini", + "PH": "OrílẹÌède filipini", + "PK": "OrílẹÌède Pakisitan", + "PL": "OrílẹÌède Polandi", + "PM": "OrílẹÌède Pẹẹri ati mikuloni", + "PN": "OrílẹÌède Pikarini", + "PR": "OrílẹÌède Pá»to Riko", + "PS": "OrílẹÌède Iwá»orun Pakisitian ati Gaá¹£a", + "PT": "OrílẹÌède Pá»tugi", + "PW": "OrílẹÌède Paalu", + "PY": "OrílẹÌède Paraguye", + "QA": "OrílẹÌède Kota", + "RE": "OrílẹÌède Riuniyan", + "RO": "OrílẹÌède Romaniya", + "RU": "OrílẹÌède Rá»á¹£ia", + "RW": "OrílẹÌède Ruwanda", + "SA": "OrílẹÌède Saudi Arabia", + "SB": "OrílẹÌède Etikun Solomoni", + "SC": "OrílẹÌède seṣẹlẹsi", + "SD": "OrílẹÌède Sudani", + "SE": "OrílẹÌède Swidini", + "SG": "OrílẹÌède Singapo", + "SH": "OrílẹÌède Hẹlena", + "SI": "OrílẹÌède Silofania", + "SK": "OrílẹÌède Silofakia", + "SL": "OrílẹÌède Siria looni", + "SM": "OrílẹÌède Sani Marino", + "SN": "OrílẹÌède Sẹnẹga", + "SO": "OrílẹÌède Somalia", + "SR": "OrílẹÌède Surinami", + "ST": "OrílẹÌède Sao tomi ati piriiá¹£ipi", + "SV": "OrílẹÌède Ẹẹsáfádò", + "SY": "OrílẹÌède Siria", + "SZ": "OrílẹÌède Saá¹£iland", + "TC": "OrílẹÌède Tá»á»ki ati Etikun Kaká»si", + "TD": "OrílẹÌède ṣààdì", + "TG": "OrílẹÌède Togo", + "TH": "OrílẹÌède Tailandi", + "TJ": "OrílẹÌède Takisitani", + "TK": "OrílẹÌède Tokelau", + "TL": "OrílẹÌède ÃŒlàOòrùn Tímá»Ì€", + "TM": "OrílẹÌède Tá»á»kimenisita", + "TN": "OrílẹÌède Tuniá¹£ia", + "TO": "OrílẹÌède Tonga", + "TR": "OrílẹÌède Tá»á»ki", + "TT": "OrílẹÌède Tirinida ati Tobaga", + "TV": "OrílẹÌède Tufalu", + "TW": "OrílẹÌède Taiwani", + "TZ": "OrílẹÌède Taná¹£ania", + "UA": "OrílẹÌède Ukarini", + "UG": "OrílẹÌède Uganda", + "US": "OrílẹÌède Orilẹede Amerika", + "UY": "OrílẹÌède Nruguayi", + "UZ": "OrílẹÌède Ná¹£ibẹkisitani", + "VA": "OrílẹÌède Fatikani", + "VC": "OrílẹÌède Fisẹnnti ati Genadina", + "VE": "OrílẹÌède Fẹnẹṣuẹla", + "VG": "OrílẹÌède Etíkun Fágínì ti ìlú Bírítísì", + "VI": "OrílẹÌède Etikun Fagini ti Amẹrika", + "VN": "OrílẹÌède Fẹtinami", + "VU": "OrílẹÌède Faniatu", + "WF": "OrílẹÌède Wali ati futuna", + "WS": "OrílẹÌède Samá»", + "YE": "OrílẹÌède yemeni", + "YT": "OrílẹÌède Mayote", + "ZA": "OrílẹÌède Ariwa Afirika", + "ZM": "OrílẹÌède á¹£amibia", + "ZW": "OrílẹÌède á¹£imibabe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/yo_BJ.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/yo_BJ.json new file mode 100644 index 0000000000000000000000000000000000000000..afb98110103cd27478d72baec4f966f56bcc5575 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/yo_BJ.json @@ -0,0 +1,229 @@ +{ + "Version": "2.1.29.54", + "Names": { + "AD": "OrílÉ›Ìède Ààndórà", + "AE": "OrílÉ›Ìède Æmirate ti AwÉ”n Arabu", + "AF": "OrílÉ›Ìède Àfùgànístánì", + "AG": "OrílÉ›Ìède Ààntígúà àti Báríbúdà", + "AI": "OrílÉ›Ìède Ààngúlílà", + "AL": "OrílÉ›Ìède Àlùbàníánì", + "AM": "OrílÉ›Ìède Améníà", + "AO": "OrílÉ›Ìède Ààngólà", + "AR": "OrílÉ›Ìède Agentínà", + "AS": "Sámóánì ti OrílÉ›Ìède Àméríkà", + "AT": "OrílÉ›Ìède Asítíríà", + "AU": "OrílÉ›Ìède Ãstràlìá", + "AW": "OrílÉ›Ìède Ãrúbà", + "AZ": "OrílÉ›Ìède AsÉ›Ìbájánì", + "BA": "OrílÉ›Ìède Bɔ̀síníà àti ÆtisÉ›gófínà", + "BB": "OrílÉ›Ìède Bábádósì", + "BD": "OrílÉ›Ìède Bángáládésì", + "BE": "OrílÉ›Ìède BégíɔÌmù", + "BF": "OrílÉ›Ìède Bùùkíná Fasò", + "BG": "OrílÉ›Ìède Bùùgáríà", + "BH": "OrílÉ›Ìède Báránì", + "BI": "OrílÉ›Ìède Bùùrúndì", + "BJ": "OrílÉ›Ìède Bɛ̀nɛ̀", + "BM": "OrílÉ›Ìède Bémúdà", + "BN": "OrílÉ›Ìède BúrúnÉ›Ìlì", + "BO": "OrílÉ›Ìède Bɔ̀lífíyà", + "BR": "OrílÉ›Ìède Bàràsílì", + "BS": "OrílÉ›Ìède Bàhámásì", + "BT": "OrílÉ›Ìède Bútánì", + "BW": "OrílÉ›Ìède Bɔ̀tìsúwánà", + "BY": "OrílÉ›Ìède Bélárúsì", + "BZ": "OrílÉ›Ìède Bèlísɛ̀", + "CA": "OrílÉ›Ìède Kánádà", + "CD": "OrilÉ›Ìède Kóngò", + "CF": "OrílÉ›Ìède Àrin gùngun Ãfíríkà", + "CG": "OrílÉ›Ìède Kóngò", + "CH": "OrílÉ›Ìède switishilandi", + "CI": "OrílÉ›Ìède Kóútè forà", + "CK": "OrílÉ›Ìède Etíokun Kùúkù", + "CL": "OrílÉ›Ìède shílè", + "CM": "OrílÉ›Ìède Kamerúúnì", + "CN": "OrílÉ›Ìède sháínà", + "CO": "OrílÉ›Ìède Kòlómíbìa", + "CR": "OrílÉ›Ìède Kuusita Ríkà", + "CU": "OrílÉ›Ìède Kúbà", + "CV": "OrílÉ›Ìède Etíokun Kápé féndè", + "CY": "OrílÉ›Ìède Kúrúsì", + "CZ": "OrílÉ›Ìède shÉ›ÌÉ›Ìkì", + "DE": "OrílÉ›Ìède Gemani", + "DJ": "OrílÉ›Ìède DíbÉ”Ìótì", + "DK": "OrílÉ›Ìède DÉ›Ìmákì", + "DM": "OrílÉ›Ìède Dòmíníkà", + "DO": "OrilÉ›Ìède Dòmíníkánì", + "DZ": "OrílÉ›Ìède Àlùgèríánì", + "EC": "OrílÉ›Ìède Ekuádò", + "EE": "OrílÉ›Ìède Esitonia", + "EG": "OrílÉ›Ìède Égípítì", + "ER": "OrílÉ›Ìède Eritira", + "ES": "OrílÉ›Ìède Sipani", + "ET": "OrílÉ›Ìède Etopia", + "FI": "OrílÉ›Ìède Filandi", + "FJ": "OrílÉ›Ìède Fiji", + "FK": "OrílÉ›Ìède Etikun Fakalandi", + "FM": "OrílÉ›Ìède Makoronesia", + "FR": "OrílÉ›Ìède Faranse", + "GA": "OrílÉ›Ìède Gabon", + "GB": "OrílÉ›Ìède Omobabirin", + "GD": "OrílÉ›Ìède Genada", + "GE": "OrílÉ›Ìède GÉ”gia", + "GF": "OrílÉ›Ìède Firenshi Guana", + "GH": "OrílÉ›Ìède Gana", + "GI": "OrílÉ›Ìède Gibaratara", + "GL": "OrílÉ›Ìède Gerelandi", + "GM": "OrílÉ›Ìède Gambia", + "GN": "OrílÉ›Ìède Gene", + "GP": "OrílÉ›Ìède Gadelope", + "GQ": "OrílÉ›Ìède Ekutoria Gini", + "GR": "OrílÉ›Ìède Geriisi", + "GT": "OrílÉ›Ìède Guatemala", + "GU": "OrílÉ›Ìède Guamu", + "GW": "OrílÉ›Ìède Gene-Busau", + "GY": "OrílÉ›Ìède Guyana", + "HN": "OrílÉ›Ìède Hondurasi", + "HR": "OrílÉ›Ìède Kòróátíà", + "HT": "OrílÉ›Ìède Haati", + "HU": "OrílÉ›Ìède Hungari", + "ID": "OrílÉ›Ìède Indonesia", + "IE": "OrílÉ›Ìède Ailandi", + "IL": "OrílÉ›Ìède IserÉ›li", + "IN": "OrílÉ›Ìède India", + "IO": "OrílÉ›Ìède Etíkun Ãndíánì ti ÃŒlú Bírítísì", + "IQ": "OrílÉ›Ìède Iraki", + "IR": "OrílÉ›Ìède Irani", + "IS": "OrílÉ›Ìède Ashilandi", + "IT": "OrílÉ›Ìède Italiyi", + "JM": "OrílÉ›Ìède Jamaika", + "JO": "OrílÉ›Ìède JÉ”dani", + "JP": "OrílÉ›Ìède Japani", + "KE": "OrílÉ›Ìède Kenya", + "KG": "OrílÉ›Ìède Kurishisitani", + "KH": "OrílÉ›Ìède Kàmùbódíà", + "KI": "OrílÉ›Ìède Kiribati", + "KM": "OrílÉ›Ìède Kòmòrósì", + "KN": "OrílÉ›Ìède Kiiti ati Neefi", + "KP": "OrílÉ›Ìède Guusu KÉ”ria", + "KR": "OrílÉ›Ìède Ariwa KÉ”ria", + "KW": "OrílÉ›Ìède Kuweti", + "KY": "OrílÉ›Ìède Etíokun Kámánì", + "KZ": "OrílÉ›Ìède Kashashatani", + "LA": "OrílÉ›Ìède Laosi", + "LB": "OrílÉ›Ìède Lebanoni", + "LC": "OrílÉ›Ìède Lushia", + "LI": "OrílÉ›Ìède LÉ›shitÉ›nisiteni", + "LK": "OrílÉ›Ìède Siri Lanka", + "LR": "OrílÉ›Ìède Laberia", + "LS": "OrílÉ›Ìède Lesoto", + "LT": "OrílÉ›Ìède Lituania", + "LU": "OrílÉ›Ìède Lusemogi", + "LV": "OrílÉ›Ìède Latifia", + "LY": "OrílÉ›Ìède Libiya", + "MA": "OrílÉ›Ìède Moroko", + "MC": "OrílÉ›Ìède Monako", + "MD": "OrílÉ›Ìède Modofia", + "MG": "OrílÉ›Ìède Madasika", + "MH": "OrílÉ›Ìède Etikun Máshali", + "MK": "OrílÉ›Ìède Masidonia", + "ML": "OrílÉ›Ìède Mali", + "MM": "OrílÉ›Ìède Manamari", + "MN": "OrílÉ›Ìède Mogolia", + "MP": "OrílÉ›Ìède Etikun Guusu Mariana", + "MQ": "OrílÉ›Ìède Matinikuwi", + "MR": "OrílÉ›Ìède Maritania", + "MS": "OrílÉ›Ìède Motserati", + "MT": "OrílÉ›Ìède Malata", + "MU": "OrílÉ›Ìède Maritiusi", + "MV": "OrílÉ›Ìède Maladifi", + "MW": "OrílÉ›Ìède Malawi", + "MX": "OrílÉ›Ìède Mesiko", + "MY": "OrílÉ›Ìède Malasia", + "MZ": "OrílÉ›Ìède Moshamibiku", + "NA": "OrílÉ›Ìède Namibia", + "NC": "OrílÉ›Ìède Kaledonia Titun", + "NE": "OrílÉ›Ìède Nàìjá", + "NF": "OrílÉ›Ìède Etikun NÉ”Ìúfókì", + "NG": "OrílÉ›Ìède Nàìjíríà", + "NI": "OrílÉ›Ìède NIkaragua", + "NL": "OrílÉ›Ìède Nedalandi", + "NO": "OrílÉ›Ìède Nɔɔwii", + "NP": "OrílÉ›Ìède Nepa", + "NR": "OrílÉ›Ìède Nauru", + "NU": "OrílÉ›Ìède Niue", + "NZ": "OrílÉ›Ìède shilandi Titun", + "OM": "OrílÉ›Ìède Ɔɔma", + "PA": "OrílÉ›Ìède Panama", + "PE": "OrílÉ›Ìède Peru", + "PF": "OrílÉ›Ìède Firenshi Polinesia", + "PG": "OrílÉ›Ìède Paapu ti Giini", + "PH": "OrílÉ›Ìède filipini", + "PK": "OrílÉ›Ìède Pakisitan", + "PL": "OrílÉ›Ìède Polandi", + "PM": "OrílÉ›Ìède Pɛɛri ati mikuloni", + "PN": "OrílÉ›Ìède Pikarini", + "PR": "OrílÉ›Ìède PÉ”to Riko", + "PS": "OrílÉ›Ìède IwÉ”orun Pakisitian ati Gasha", + "PT": "OrílÉ›Ìède PÉ”tugi", + "PW": "OrílÉ›Ìède Paalu", + "PY": "OrílÉ›Ìède Paraguye", + "QA": "OrílÉ›Ìède Kota", + "RE": "OrílÉ›Ìède Riuniyan", + "RO": "OrílÉ›Ìède Romaniya", + "RU": "OrílÉ›Ìède RÉ”shia", + "RW": "OrílÉ›Ìède Ruwanda", + "SA": "OrílÉ›Ìède Saudi Arabia", + "SB": "OrílÉ›Ìède Etikun Solomoni", + "SC": "OrílÉ›Ìède seshÉ›lÉ›si", + "SD": "OrílÉ›Ìède Sudani", + "SE": "OrílÉ›Ìède Swidini", + "SG": "OrílÉ›Ìède Singapo", + "SH": "OrílÉ›Ìède HÉ›lena", + "SI": "OrílÉ›Ìède Silofania", + "SK": "OrílÉ›Ìède Silofakia", + "SL": "OrílÉ›Ìède Siria looni", + "SM": "OrílÉ›Ìède Sani Marino", + "SN": "OrílÉ›Ìède SÉ›nÉ›ga", + "SO": "OrílÉ›Ìède Somalia", + "SR": "OrílÉ›Ìède Surinami", + "ST": "OrílÉ›Ìède Sao tomi ati piriishipi", + "SV": "OrílÉ›Ìède ÆÉ›sáfádò", + "SY": "OrílÉ›Ìède Siria", + "SZ": "OrílÉ›Ìède Sashiland", + "TC": "OrílÉ›Ìède Tɔɔki ati Etikun KakÉ”si", + "TD": "OrílÉ›Ìède shààdì", + "TG": "OrílÉ›Ìède Togo", + "TH": "OrílÉ›Ìède Tailandi", + "TJ": "OrílÉ›Ìède Takisitani", + "TK": "OrílÉ›Ìède Tokelau", + "TL": "OrílÉ›Ìède ÃŒlàOòrùn Tímɔ̀", + "TM": "OrílÉ›Ìède Tɔɔkimenisita", + "TN": "OrílÉ›Ìède Tunishia", + "TO": "OrílÉ›Ìède Tonga", + "TR": "OrílÉ›Ìède Tɔɔki", + "TT": "OrílÉ›Ìède Tirinida ati Tobaga", + "TV": "OrílÉ›Ìède Tufalu", + "TW": "OrílÉ›Ìède Taiwani", + "TZ": "OrílÉ›Ìède Tanshania", + "UA": "OrílÉ›Ìède Ukarini", + "UG": "OrílÉ›Ìède Uganda", + "US": "OrílÉ›Ìède OrilÉ›ede Amerika", + "UY": "OrílÉ›Ìède Nruguayi", + "UZ": "OrílÉ›Ìède NshibÉ›kisitani", + "VA": "OrílÉ›Ìède Fatikani", + "VC": "OrílÉ›Ìède FisÉ›nnti ati Genadina", + "VE": "OrílÉ›Ìède FÉ›nÉ›shuÉ›la", + "VG": "OrílÉ›Ìède Etíkun Fágínì ti ìlú Bírítísì", + "VI": "OrílÉ›Ìède Etikun Fagini ti AmÉ›rika", + "VN": "OrílÉ›Ìède FÉ›tinami", + "VU": "OrílÉ›Ìède Faniatu", + "WF": "OrílÉ›Ìède Wali ati futuna", + "WS": "OrílÉ›Ìède SamÉ”", + "YE": "OrílÉ›Ìède yemeni", + "YT": "OrílÉ›Ìède Mayote", + "ZA": "OrílÉ›Ìède Ariwa Afirika", + "ZM": "OrílÉ›Ìède shamibia", + "ZW": "OrílÉ›Ìède shimibabe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zh.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zh.json new file mode 100644 index 0000000000000000000000000000000000000000..2c0413f9157a52aff9b2465f8a694aaf1f42e93f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zh.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.84", + "Names": { + "AC": "阿森æ¾å²›", + "AD": "安é“å°”", + "AE": "阿拉伯è”åˆé…‹é•¿å›½", + "AF": "阿富汗", + "AG": "安æç“œå’Œå·´å¸ƒè¾¾", + "AI": "安圭拉", + "AL": "阿尔巴尼亚", + "AM": "亚美尼亚", + "AO": "安哥拉", + "AQ": "å—æžæ´²", + "AR": "阿根廷", + "AS": "ç¾Žå±žè¨æ‘©äºš", + "AT": "奥地利", + "AU": "澳大利亚", + "AW": "阿é²å·´", + "AX": "奥兰群岛", + "AZ": "阿塞拜疆", + "BA": "波斯尼亚和黑塞哥维那", + "BB": "巴巴多斯", + "BD": "孟加拉国", + "BE": "比利时", + "BF": "布基纳法索", + "BG": "ä¿åŠ åˆ©äºš", + "BH": "å·´æž—", + "BI": "布隆迪", + "BJ": "è´å®", + "BL": "圣巴泰勒米", + "BM": "百慕大", + "BN": "文莱", + "BO": "玻利维亚", + "BQ": "è·å±žåŠ å‹’æ¯”åŒº", + "BR": "巴西", + "BS": "巴哈马", + "BT": "ä¸ä¸¹", + "BW": "åšèŒ¨ç“¦çº³", + "BY": "白俄罗斯", + "BZ": "伯利兹", + "CA": "加拿大", + "CC": "科科斯(基林)群岛", + "CD": "刚果(金)", + "CF": "中éžå…±å’Œå›½", + "CG": "刚果(布)", + "CH": "瑞士", + "CI": "科特迪瓦", + "CK": "库克群岛", + "CL": "智利", + "CM": "喀麦隆", + "CN": "中国", + "CO": "哥伦比亚", + "CR": "哥斯达黎加", + "CU": "å¤å·´", + "CV": "佛得角", + "CW": "库拉索", + "CX": "圣诞岛", + "CY": "塞浦路斯", + "CZ": "æ·å…‹å…±å’Œå›½", + "DE": "德国", + "DG": "迪戈加西亚岛", + "DJ": "å‰å¸ƒæ", + "DK": "丹麦", + "DM": "多米尼克", + "DO": "多米尼加共和国", + "DZ": "阿尔åŠåˆ©äºš", + "EA": "ä¼‘è¾¾åŠæ¢…利利亚", + "EC": "厄瓜多尔", + "EE": "爱沙尼亚", + "EG": "埃åŠ", + "EH": "西撒哈拉", + "ER": "厄立特里亚", + "ES": "西ç­ç‰™", + "ET": "埃塞俄比亚", + "FI": "芬兰", + "FJ": "æ–æµŽ", + "FK": "ç¦å…‹å…°ç¾¤å²›", + "FM": "密克罗尼西亚", + "FO": "法罗群岛", + "FR": "法国", + "GA": "加蓬", + "GB": "英国", + "GD": "格林纳达", + "GE": "æ ¼é²å‰äºš", + "GF": "法属圭亚那", + "GG": "æ ¼æ©è¥¿å²›", + "GH": "加纳", + "GI": "直布罗陀", + "GL": "格陵兰", + "GM": "冈比亚", + "GN": "几内亚", + "GP": "瓜德罗普", + "GQ": "赤é“几内亚", + "GR": "希腊", + "GS": "å—ä¹”æ²»äºšå’Œå—æ¡‘å¨å¥‡ç¾¤å²›", + "GT": "å±åœ°é©¬æ‹‰", + "GU": "关岛", + "GW": "几内亚比ç»", + "GY": "圭亚那", + "HK": "中国香港特别行政区", + "HN": "洪都拉斯", + "HR": "克罗地亚", + "HT": "海地", + "HU": "匈牙利", + "IC": "加纳利群岛", + "ID": "å°åº¦å°¼è¥¿äºš", + "IE": "爱尔兰", + "IL": "以色列", + "IM": "马æ©å²›", + "IN": "å°åº¦", + "IO": "英属å°åº¦æ´‹é¢†åœ°", + "IQ": "伊拉克", + "IR": "伊朗", + "IS": "冰岛", + "IT": "æ„大利", + "JE": "泽西岛", + "JM": "牙买加", + "JO": "约旦", + "JP": "日本", + "KE": "肯尼亚", + "KG": "å‰å°”剿–¯æ–¯å¦", + "KH": "柬埔寨", + "KI": "基里巴斯", + "KM": "ç§‘æ‘©ç½—", + "KN": "圣基茨和尼维斯", + "KP": "æœé²œ", + "KR": "韩国", + "KW": "ç§‘å¨ç‰¹", + "KY": "开曼群岛", + "KZ": "哈è¨å…‹æ–¯å¦", + "LA": "è€æŒ", + "LB": "黎巴嫩", + "LC": "圣å¢è¥¿äºš", + "LI": "列支敦士登", + "LK": "斯里兰å¡", + "LR": "利比里亚", + "LS": "莱索托", + "LT": "ç«‹é™¶å®›", + "LU": "墿£®å ¡", + "LV": "拉脱维亚", + "LY": "利比亚", + "MA": "摩洛哥", + "MC": "摩纳哥", + "MD": "摩尔多瓦", + "ME": "黑山", + "MF": "圣马ä¸å²›", + "MG": "马达加斯加", + "MH": "马ç»å°”群岛", + "MK": "马其顿", + "ML": "马里", + "MM": "缅甸", + "MN": "è’™å¤", + "MO": "中国澳门特别行政区", + "MP": "北马里亚纳群岛", + "MQ": "马æå°¼å…‹", + "MR": "毛里塔尼亚", + "MS": "蒙特塞拉特", + "MT": "马耳他", + "MU": "毛里求斯", + "MV": "马尔代夫", + "MW": "马拉维", + "MX": "墨西哥", + "MY": "马æ¥è¥¿äºš", + "MZ": "莫桑比克", + "NA": "纳米比亚", + "NC": "新喀里多尼亚", + "NE": "尼日尔", + "NF": "诺ç¦å…‹å²›", + "NG": "尼日利亚", + "NI": "尼加拉瓜", + "NL": "è·å…°", + "NO": "挪å¨", + "NP": "尼泊尔", + "NR": "ç‘™é²", + "NU": "纽埃", + "NZ": "新西兰", + "OM": "阿曼", + "PA": "巴拿马", + "PE": "秘é²", + "PF": "法属波利尼西亚", + "PG": "巴布亚新几内亚", + "PH": "è²å¾‹å®¾", + "PK": "巴基斯å¦", + "PL": "波兰", + "PM": "圣皮埃尔和密克隆群岛", + "PN": "皮特凯æ©ç¾¤å²›", + "PR": "波多黎å„", + "PS": "å·´å‹’æ–¯å¦é¢†åœŸ", + "PT": "è‘¡è„牙", + "PW": "帕劳", + "PY": "巴拉圭", + "QA": "å¡å¡”å°”", + "RE": "留尼汪", + "RO": "罗马尼亚", + "RS": "塞尔维亚", + "RU": "ä¿„ç½—æ–¯", + "RW": "墿—ºè¾¾", + "SA": "沙特阿拉伯", + "SB": "所罗门群岛", + "SC": "塞舌尔", + "SD": "è‹ä¸¹", + "SE": "瑞典", + "SG": "新加å¡", + "SH": "圣赫勒拿", + "SI": "斯洛文尼亚", + "SJ": "斯瓦尔巴和扬马延", + "SK": "斯洛ä¼å…‹", + "SL": "塞拉利昂", + "SM": "圣马力诺", + "SN": "塞内加尔", + "SO": "索马里", + "SR": "è‹é‡Œå—", + "SS": "å—è‹ä¸¹", + "ST": "圣多美和普林西比", + "SV": "è¨å°”瓦多", + "SX": "è·å±žåœ£é©¬ä¸", + "SY": "å™åˆ©äºš", + "SZ": "æ–¯å¨å£«å…°", + "TA": "特里斯å¦-达库尼亚群岛", + "TC": "特克斯和凯科斯群岛", + "TD": "ä¹å¾—", + "TF": "法属å—部领地", + "TG": "多哥", + "TH": "泰国", + "TJ": "å¡”å‰å…‹æ–¯å¦", + "TK": "托克劳", + "TL": "ä¸œå¸æ±¶", + "TM": "土库曼斯å¦", + "TN": "çªå°¼æ–¯", + "TO": "汤加", + "TR": "土耳其", + "TT": "特立尼达和多巴哥", + "TV": "图瓦å¢", + "TW": "å°æ¹¾", + "TZ": "妿¡‘尼亚", + "UA": "乌克兰", + "UG": "乌干达", + "UM": "美国本土外å°å²›å±¿", + "UN": "è”åˆå›½", + "US": "美国", + "UY": "乌拉圭", + "UZ": "乌兹别克斯å¦", + "VA": "梵蒂冈", + "VC": "åœ£æ–‡æ£®ç‰¹å’Œæ ¼æž—çº³ä¸æ–¯", + "VE": "委内瑞拉", + "VG": "英属维尔京群岛", + "VI": "美属维尔京群岛", + "VN": "è¶Šå—", + "VU": "瓦努阿图", + "WF": "瓦利斯和富图纳", + "WS": "è¨æ‘©äºš", + "XK": "科索沃", + "YE": "也门", + "YT": "马约特", + "ZA": "å—éž", + "ZM": "赞比亚", + "ZW": "津巴布韦" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zh_HK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zh_HK.json new file mode 100644 index 0000000000000000000000000000000000000000..f974b60a5d8727a7d2bcf2e6116cff2dbe248005 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zh_HK.json @@ -0,0 +1,92 @@ +{ + "Version": "2.1.27.99", + "Names": { + "AE": "阿拉伯è¯åˆé…‹é•·åœ‹", + "AG": "安æç“œå’Œå·´å¸ƒé”", + "AW": "阿魯巴", + "AZ": "阿塞拜疆", + "BA": "波斯尼亞和黑塞哥維那", + "BB": "巴巴多斯", + "BF": "å¸ƒåŸºç´æ³•ç´¢", + "BI": "布隆迪", + "BJ": "è²å¯§", + "BL": "è–å·´æ³°å‹’ç±³", + "BW": "åšèŒ¨ç“¦ç´", + "BZ": "伯利茲", + "CC": "å¯å¯æ–¯ç¾¤å³¶", + "CI": "科特迪瓦", + "CR": "哥斯é”黎加", + "CV": "佛得角", + "CY": "塞浦路斯", + "DJ": "å‰å¸ƒæ", + "EC": "厄瓜多爾", + "ER": "厄立特里亞", + "ET": "埃塞俄比亞", + "GA": "加蓬", + "GD": "格林ç´é”", + "GE": "格魯å‰äºž", + "GH": "加ç´", + "GM": "岡比亞", + "GS": "å—使²»äºžå³¶èˆ‡å—æ¡‘å¨å¥‡ç¾¤å³¶", + "GT": "å±åœ°é¦¬æ‹‰", + "GW": "幾內亞比紹", + "GY": "圭亞那", + "HN": "洪都拉斯", + "HR": "克羅地亞", + "IM": "馬æ©å³¶", + "IT": "æ„大利", + "KE": "肯雅", + "KM": "ç§‘æ‘©ç¾…", + "KN": "è–基茨和尼維斯", + "LA": "è€æ’¾", + "LC": "è–盧西亞", + "LI": "列支敦士登", + "LR": "利比里亞", + "LS": "èŠç´¢æ‰˜", + "ME": "黑山", + "ML": "馬里", + "MR": "毛里塔尼亞", + "MS": "蒙特塞拉特", + "MT": "馬耳他", + "MU": "毛里裘斯", + "MV": "馬爾代夫", + "MW": "馬拉維", + "MZ": "莫桑比克", + "NE": "尼日爾", + "NG": "尼日利亞", + "NR": "瑙魯", + "OM": "阿曼", + "PF": "法屬波利尼西亞", + "PG": "巴布亞新幾內亞", + "PN": "皮特凱æ©å³¶", + "PS": "å·´å‹’æ–¯å¦é ˜åœŸ", + "QA": "å¡å¡”爾", + "RW": "ç›§æ—ºé”", + "SA": "沙地阿拉伯", + "SB": "所羅門群島", + "SC": "塞舌爾", + "SI": "斯洛文尼亞", + "SJ": "æ–¯ç“¦çˆ¾å·´ç‰¹ç¾¤å³¶åŠæšé¦¬å»¶å³¶", + "SL": "塞拉利昂", + "SO": "索馬里", + "SR": "蘇里å—", + "ST": "è–多美和普林西比", + "SY": "æ•利亞", + "SZ": "æ–¯å¨å£«è˜­", + "TC": "特克斯和凱科斯群島", + "TD": "ä¹å¾—", + "TF": "法屬å—部領地", + "TG": "多哥共和國", + "TO": "湯加", + "TT": "åƒé‡Œé”和多巴哥", + "TV": "圖瓦盧", + "TZ": "妿¡‘尼亞", + "VC": "è–æ–‡æ£®ç‰¹å’Œæ ¼æž—ç´ä¸æ–¯", + "VG": "英屬維爾京群島", + "VI": "美屬維爾京群島", + "VU": "瓦努阿圖", + "YE": "也門", + "ZM": "贊比亞", + "ZW": "津巴布韋" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zh_Hant.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zh_Hant.json new file mode 100644 index 0000000000000000000000000000000000000000..3701d28f95dc3464be5938ca3f513f11c33a7a26 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zh_Hant.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.28.79", + "Names": { + "AC": "阿森æ¾å³¶", + "AD": "安é“爾", + "AE": "阿拉伯è¯åˆå¤§å…¬åœ‹", + "AF": "阿富汗", + "AG": "安地å¡åŠå·´å¸ƒé”", + "AI": "安圭拉", + "AL": "阿爾巴尼亞", + "AM": "亞美尼亞", + "AO": "安哥拉", + "AQ": "å—æ¥µæ´²", + "AR": "阿根廷", + "AS": "美屬薩摩亞", + "AT": "奧地利", + "AU": "澳洲", + "AW": "è·å±¬é˜¿é­¯å·´", + "AX": "奧蘭群島", + "AZ": "亞塞拜然", + "BA": "波士尼亞與赫塞哥維ç´", + "BB": "å·´è²å¤š", + "BD": "孟加拉", + "BE": "比利時", + "BF": "布å‰ç´æ³•ç´¢", + "BG": "ä¿åŠ åˆ©äºž", + "BH": "å·´æž—", + "BI": "蒲隆地", + "BJ": "è²å—", + "BL": "è–巴瑟米", + "BM": "百慕é”", + "BN": "æ±¶èŠ", + "BO": "玻利維亞", + "BQ": "è·è˜­åŠ å‹’æ¯”å€", + "BR": "巴西", + "BS": "巴哈馬", + "BT": "ä¸ä¸¹", + "BW": "波札那", + "BY": "白俄羅斯", + "BZ": "è²é‡Œæ–¯", + "CA": "加拿大", + "CC": "科科斯(基林)群島", + "CD": "å‰›æžœï¼ˆé‡‘å¤æ²™ï¼‰", + "CF": "中éžå…±å’Œåœ‹", + "CG": "剛果(布拉薩)", + "CH": "瑞士", + "CI": "象牙海岸", + "CK": "庫克群島", + "CL": "智利", + "CM": "喀麥隆", + "CN": "中國", + "CO": "哥倫比亞", + "CR": "哥斯大黎加", + "CU": "å¤å·´", + "CV": "ç¶­å¾·è§’", + "CW": "庫拉索", + "CX": "è–誕島", + "CY": "賽普勒斯", + "CZ": "æ·å…‹å…±å’Œåœ‹", + "DE": "德國", + "DG": "迪亞哥加西亞島", + "DJ": "å‰å¸ƒåœ°", + "DK": "丹麥", + "DM": "多米尼克", + "DO": "多明尼加共和國", + "DZ": "阿爾åŠåˆ©äºž", + "EA": "休é”與梅利利亞", + "EC": "厄瓜多", + "EE": "愛沙尼亞", + "EG": "埃åŠ", + "EH": "西撒哈拉", + "ER": "厄利垂亞", + "ES": "西ç­ç‰™", + "ET": "衣索比亞", + "FI": "芬蘭", + "FJ": "æ–æ¿Ÿ", + "FK": "ç¦å…‹è˜­ç¾¤å³¶", + "FM": "密克羅尼西亞群島", + "FO": "法羅群島", + "FR": "法國", + "GA": "加彭", + "GB": "英國", + "GD": "格瑞那é”", + "GE": "喬治亞", + "GF": "法屬圭亞那", + "GG": "æ ¹æ¯", + "GH": "迦ç´", + "GI": "直布羅陀", + "GL": "格陵蘭", + "GM": "甘比亞", + "GN": "幾內亞", + "GP": "瓜地洛普", + "GQ": "赤é“幾內亞", + "GR": "希臘", + "GS": "å—喬治亞與å—三明治群島", + "GT": "瓜地馬拉", + "GU": "關島", + "GW": "幾內亞比索", + "GY": "蓋亞那", + "HK": "中國香港特別行政å€", + "HN": "å®éƒ½æ‹‰æ–¯", + "HR": "克羅埃西亞", + "HT": "海地", + "HU": "匈牙利", + "IC": "加那利群島", + "ID": "å°å°¼", + "IE": "愛爾蘭", + "IL": "以色列", + "IM": "曼島", + "IN": "å°åº¦", + "IO": "英屬å°åº¦æ´‹é ˜åœ°", + "IQ": "伊拉克", + "IR": "伊朗", + "IS": "冰島", + "IT": "義大利", + "JE": "澤西島", + "JM": "牙買加", + "JO": "ç´„æ—¦", + "JP": "日本", + "KE": "肯亞", + "KG": "å‰çˆ¾å‰æ–¯", + "KH": "柬埔寨", + "KI": "å‰é‡Œå·´æ–¯", + "KM": "葛摩", + "KN": "è–克里斯多ç¦åŠå°¼ç¶­æ–¯", + "KP": "北韓", + "KR": "å—韓", + "KW": "ç§‘å¨ç‰¹", + "KY": "開曼群島", + "KZ": "哈薩克", + "LA": "寮國", + "LB": "黎巴嫩", + "LC": "è–露西亞", + "LI": "列支敦斯登", + "LK": "斯里蘭å¡", + "LR": "賴比瑞亞", + "LS": "賴索托", + "LT": "ç«‹é™¶å®›", + "LU": "盧森堡", + "LV": "拉脫維亞", + "LY": "利比亞", + "MA": "摩洛哥", + "MC": "æ‘©ç´å“¥", + "MD": "摩爾多瓦", + "ME": "蒙特內哥羅", + "MF": "法屬è–馬ä¸", + "MG": "馬é”加斯加", + "MH": "馬紹爾群島", + "MK": "馬其頓", + "ML": "馬利", + "MM": "緬甸", + "MN": "è’™å¤", + "MO": "中國澳門特別行政å€", + "MP": "北馬里亞ç´ç¾¤å³¶", + "MQ": "馬ä¸å°¼å…‹å³¶", + "MR": "茅利塔尼亞", + "MS": "蒙哲臘", + "MT": "馬爾他", + "MU": "模里西斯", + "MV": "馬爾地夫", + "MW": "馬拉å¨", + "MX": "墨西哥", + "MY": "馬來西亞", + "MZ": "莫三比克", + "NA": "ç´ç±³æ¯”亞", + "NC": "新喀里多尼亞", + "NE": "尼日", + "NF": "諾ç¦å…‹å³¶", + "NG": "奈åŠåˆ©äºž", + "NI": "尼加拉瓜", + "NL": "è·è˜­", + "NO": "挪å¨", + "NP": "尼泊爾", + "NR": "諾魯", + "NU": "ç´åŸƒå³¶", + "NZ": "ç´è¥¿è˜­", + "OM": "阿曼王國", + "PA": "巴拿馬", + "PE": "秘魯", + "PF": "法屬玻里尼西亞", + "PG": "巴布亞ç´å¹¾å…§äºž", + "PH": "è²å¾‹è³“", + "PK": "巴基斯å¦", + "PL": "波蘭", + "PM": "è–皮埃爾和密克隆群島", + "PN": "皮特肯群島", + "PR": "波多黎å„", + "PS": "å·´å‹’æ–¯å¦è‡ªæ²»å€", + "PT": "è‘¡è„牙", + "PW": "帛ç‰", + "PY": "巴拉圭", + "QA": "å¡é”", + "RE": "留尼旺", + "RO": "羅馬尼亞", + "RS": "塞爾維亞", + "RU": "ä¿„ç¾…æ–¯", + "RW": "盧安é”", + "SA": "æ²™çƒåœ°é˜¿æ‹‰ä¼¯", + "SB": "索羅門群島", + "SC": "塞席爾", + "SD": "蘇丹", + "SE": "瑞典", + "SG": "新加å¡", + "SH": "è–赫勒拿島", + "SI": "斯洛維尼亞", + "SJ": "冷岸åŠå¤®æ£‰", + "SK": "斯洛ä¼å…‹", + "SL": "ç…å­å±±", + "SM": "è–馬利諾", + "SN": "塞內加爾", + "SO": "索馬利亞", + "SR": "蘇利å—", + "SS": "å—蘇丹", + "ST": "è–多美普林西比", + "SV": "薩爾瓦多", + "SX": "è·å±¬è–馬ä¸", + "SY": "敘利亞", + "SZ": "å²ç“¦æ¿Ÿè˜­", + "TA": "特里斯å¦é”庫尼亞群島", + "TC": "土克斯åŠé–‹ç§‘斯群島", + "TD": "查德", + "TF": "æ³•å±¬å—æ–¹å±¬åœ°", + "TG": "多哥", + "TH": "泰國", + "TJ": "å¡”å‰å…‹", + "TK": "托克勞群島", + "TL": "æ±å¸æ±¶", + "TM": "土庫曼", + "TN": "çªå°¼è¥¿äºž", + "TO": "æ±åŠ ", + "TR": "土耳其", + "TT": "åƒé‡Œé”åŠæ‰˜å·´å“¥", + "TV": "å瓦魯", + "TW": "å°ç£", + "TZ": "å¦å°šå°¼äºž", + "UA": "çƒå…‹è˜­", + "UG": "çƒå¹²é”", + "UM": "美國本土外å°å³¶å¶¼", + "UN": "è¯åˆåœ‹", + "US": "美國", + "UY": "çƒæ‹‰åœ­", + "UZ": "çƒèŒ²åˆ¥å…‹", + "VA": "梵蒂岡", + "VC": "è–æ–‡æ£®åŠæ ¼ç‘žé‚£ä¸", + "VE": "委內瑞拉", + "VG": "英屬維京群島", + "VI": "美屬維京群島", + "VN": "è¶Šå—", + "VU": "è¬é‚£æœ", + "WF": "瓦利斯群島和富圖那群島", + "WS": "薩摩亞", + "XK": "科索沃", + "YE": "葉門", + "YT": "馬約特", + "ZA": "å—éž", + "ZM": "尚比亞", + "ZW": "辛巴å¨" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zh_Hant_HK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zh_Hant_HK.json new file mode 100644 index 0000000000000000000000000000000000000000..f974b60a5d8727a7d2bcf2e6116cff2dbe248005 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zh_Hant_HK.json @@ -0,0 +1,92 @@ +{ + "Version": "2.1.27.99", + "Names": { + "AE": "阿拉伯è¯åˆé…‹é•·åœ‹", + "AG": "安æç“œå’Œå·´å¸ƒé”", + "AW": "阿魯巴", + "AZ": "阿塞拜疆", + "BA": "波斯尼亞和黑塞哥維那", + "BB": "巴巴多斯", + "BF": "å¸ƒåŸºç´æ³•ç´¢", + "BI": "布隆迪", + "BJ": "è²å¯§", + "BL": "è–å·´æ³°å‹’ç±³", + "BW": "åšèŒ¨ç“¦ç´", + "BZ": "伯利茲", + "CC": "å¯å¯æ–¯ç¾¤å³¶", + "CI": "科特迪瓦", + "CR": "哥斯é”黎加", + "CV": "佛得角", + "CY": "塞浦路斯", + "DJ": "å‰å¸ƒæ", + "EC": "厄瓜多爾", + "ER": "厄立特里亞", + "ET": "埃塞俄比亞", + "GA": "加蓬", + "GD": "格林ç´é”", + "GE": "格魯å‰äºž", + "GH": "加ç´", + "GM": "岡比亞", + "GS": "å—使²»äºžå³¶èˆ‡å—æ¡‘å¨å¥‡ç¾¤å³¶", + "GT": "å±åœ°é¦¬æ‹‰", + "GW": "幾內亞比紹", + "GY": "圭亞那", + "HN": "洪都拉斯", + "HR": "克羅地亞", + "IM": "馬æ©å³¶", + "IT": "æ„大利", + "KE": "肯雅", + "KM": "ç§‘æ‘©ç¾…", + "KN": "è–基茨和尼維斯", + "LA": "è€æ’¾", + "LC": "è–盧西亞", + "LI": "列支敦士登", + "LR": "利比里亞", + "LS": "èŠç´¢æ‰˜", + "ME": "黑山", + "ML": "馬里", + "MR": "毛里塔尼亞", + "MS": "蒙特塞拉特", + "MT": "馬耳他", + "MU": "毛里裘斯", + "MV": "馬爾代夫", + "MW": "馬拉維", + "MZ": "莫桑比克", + "NE": "尼日爾", + "NG": "尼日利亞", + "NR": "瑙魯", + "OM": "阿曼", + "PF": "法屬波利尼西亞", + "PG": "巴布亞新幾內亞", + "PN": "皮特凱æ©å³¶", + "PS": "å·´å‹’æ–¯å¦é ˜åœŸ", + "QA": "å¡å¡”爾", + "RW": "ç›§æ—ºé”", + "SA": "沙地阿拉伯", + "SB": "所羅門群島", + "SC": "塞舌爾", + "SI": "斯洛文尼亞", + "SJ": "æ–¯ç“¦çˆ¾å·´ç‰¹ç¾¤å³¶åŠæšé¦¬å»¶å³¶", + "SL": "塞拉利昂", + "SO": "索馬里", + "SR": "蘇里å—", + "ST": "è–多美和普林西比", + "SY": "æ•利亞", + "SZ": "æ–¯å¨å£«è˜­", + "TC": "特克斯和凱科斯群島", + "TD": "ä¹å¾—", + "TF": "法屬å—部領地", + "TG": "多哥共和國", + "TO": "湯加", + "TT": "åƒé‡Œé”和多巴哥", + "TV": "圖瓦盧", + "TZ": "妿¡‘尼亞", + "VC": "è–æ–‡æ£®ç‰¹å’Œæ ¼æž—ç´ä¸æ–¯", + "VG": "英屬維爾京群島", + "VI": "美屬維爾京群島", + "VU": "瓦努阿圖", + "YE": "也門", + "ZM": "贊比亞", + "ZW": "津巴布韋" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zu.json new file mode 100644 index 0000000000000000000000000000000000000000..f6cb4eb52a19089a534c9d7a9a473424fc196c82 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/regions/zu.json @@ -0,0 +1,259 @@ +{ + "Version": "2.1.29.22", + "Names": { + "AC": "i-Ascension Island", + "AD": "i-Andorra", + "AE": "i-United Arab Emirates", + "AF": "i-Afghanistan", + "AG": "i-Antigua ne-Barbuda", + "AI": "i-Anguilla", + "AL": "i-Albania", + "AM": "i-Armenia", + "AO": "i-Angola", + "AQ": "i-Antarctica", + "AR": "i-Argentina", + "AS": "i-American Samoa", + "AT": "i-Austria", + "AU": "i-Australia", + "AW": "i-Aruba", + "AX": "i-Ã…land Islands", + "AZ": "i-Azerbaijan", + "BA": "i-Bosnia ne-Herzegovina", + "BB": "i-Barbados", + "BD": "i-Bangladesh", + "BE": "i-Belgium", + "BF": "i-Burkina Faso", + "BG": "i-Bulgaria", + "BH": "i-Bahrain", + "BI": "i-Burundi", + "BJ": "i-Benin", + "BL": "i-Saint Barthélemy", + "BM": "i-Bermuda", + "BN": "i-Brunei", + "BO": "i-Bolivia", + "BQ": "i-Caribbean Netherlands", + "BR": "i-Brazil", + "BS": "i-Bahamas", + "BT": "i-Bhutan", + "BW": "iBotswana", + "BY": "i-Belarus", + "BZ": "i-Belize", + "CA": "i-Canada", + "CC": "i-Cocos (Keeling) Islands", + "CD": "i-Congo - Kinshasa", + "CF": "i-Central African Republic", + "CG": "i-Congo - Brazzaville", + "CH": "i-Switzerland", + "CI": "i-Côte d’Ivoire", + "CK": "i-Cook Islands", + "CL": "i-Chile", + "CM": "i-Cameroon", + "CN": "i-China", + "CO": "i-Colombia", + "CR": "i-Costa Rica", + "CU": "i-Cuba", + "CV": "i-Cape Verde", + "CW": "i-Curaçao", + "CX": "i-Christmas Island", + "CY": "i-Cyprus", + "CZ": "i-Czech Republic", + "DE": "i-Germany", + "DG": "i-Diego Garcia", + "DJ": "i-Djibouti", + "DK": "i-Denmark", + "DM": "i-Dominica", + "DO": "i-Dominican Republic", + "DZ": "i-Algeria", + "EA": "i-Cueta ne-Melilla", + "EC": "i-Ecuador", + "EE": "i-Estonia", + "EG": "i-Egypt", + "EH": "i-Western Sahara", + "ER": "i-Eritrea", + "ES": "i-Spain", + "ET": "i-Ethiopia", + "FI": "i-Finland", + "FJ": "i-Fiji", + "FK": "i-Falkland Islands", + "FM": "i-Micronesia", + "FO": "i-Faroe Islands", + "FR": "i-France", + "GA": "i-Gabon", + "GB": "i-United Kingdom", + "GD": "i-Grenada", + "GE": "i-Georgia", + "GF": "i-French Guiana", + "GG": "i-Guernsey", + "GH": "i-Ghana", + "GI": "i-Gibraltar", + "GL": "i-Greenland", + "GM": "i-Gambia", + "GN": "i-Guinea", + "GP": "i-Guadeloupe", + "GQ": "i-Equatorial Guinea", + "GR": "i-Greece", + "GS": "i-South Georgia ne-South Sandwich Islands", + "GT": "i-Guatemala", + "GU": "i-Guam", + "GW": "i-Guinea-Bissau", + "GY": "i-Guyana", + "HK": "i-Hong Kong SAR China", + "HN": "i-Honduras", + "HR": "i-Croatia", + "HT": "i-Haiti", + "HU": "i-Hungary", + "IC": "i-Canary Islands", + "ID": "i-Indonesia", + "IE": "i-Ireland", + "IL": "kwa-Israel", + "IM": "i-Isle of Man", + "IN": "i-India", + "IO": "i-British Indian Ocean Territory", + "IQ": "i-Iraq", + "IR": "i-Iran", + "IS": "i-Iceland", + "IT": "i-Italy", + "JE": "i-Jersey", + "JM": "i-Jamaica", + "JO": "i-Jordan", + "JP": "i-Japan", + "KE": "i-Kenya", + "KG": "i-Kyrgyzstan", + "KH": "i-Cambodia", + "KI": "i-Kiribati", + "KM": "i-Comoros", + "KN": "i-Saint Kitts ne-Nevis", + "KP": "i-North Korea", + "KR": "i-South Korea", + "KW": "i-Kuwait", + "KY": "i-Cayman Islands", + "KZ": "i-Kazakhstan", + "LA": "i-Laos", + "LB": "i-Lebanon", + "LC": "i-Saint Lucia", + "LI": "i-Liechtenstein", + "LK": "i-Sri Lanka", + "LR": "i-Liberia", + "LS": "iLesotho", + "LT": "i-Lithuania", + "LU": "i-Luxembourg", + "LV": "i-Latvia", + "LY": "i-Libya", + "MA": "i-Morocco", + "MC": "i-Monaco", + "MD": "i-Moldova", + "ME": "i-Montenegro", + "MF": "i-Saint Martin", + "MG": "i-Madagascar", + "MH": "i-Marshall Islands", + "MK": "i-Macedonia", + "ML": "iMali", + "MM": "i-Myanmar (Burma)", + "MN": "i-Mongolia", + "MO": "i-Macau SAR China", + "MP": "i-Northern Mariana Islands", + "MQ": "i-Martinique", + "MR": "i-Mauritania", + "MS": "i-Montserrat", + "MT": "i-Malta", + "MU": "i-Mauritius", + "MV": "i-Maldives", + "MW": "iMalawi", + "MX": "i-Mexico", + "MY": "i-Malaysia", + "MZ": "i-Mozambique", + "NA": "i-Namibia", + "NC": "i-New Caledonia", + "NE": "i-Niger", + "NF": "i-Norfolk Island", + "NG": "i-Nigeria", + "NI": "i-Nicaragua", + "NL": "i-Netherlands", + "NO": "i-Norway", + "NP": "i-Nepal", + "NR": "i-Nauru", + "NU": "i-Niue", + "NZ": "i-New Zealand", + "OM": "i-Oman", + "PA": "i-Panama", + "PE": "i-Peru", + "PF": "i-French Polynesia", + "PG": "i-Papua New Guinea", + "PH": "i-Philippines", + "PK": "i-Pakistan", + "PL": "i-Poland", + "PM": "i-Saint Pierre kanye ne-Miquelon", + "PN": "i-Pitcairn Islands", + "PR": "i-Puerto Rico", + "PS": "i-Palestinian Territories", + "PT": "i-Portugal", + "PW": "i-Palau", + "PY": "i-Paraguay", + "QA": "i-Qatar", + "RE": "i-Réunion", + "RO": "i-Romania", + "RS": "i-Serbia", + "RU": "i-Russia", + "RW": "i-Rwanda", + "SA": "i-Saudi Arabia", + "SB": "i-Solomon Islands", + "SC": "i-Seychelles", + "SD": "i-Sudan", + "SE": "i-Sweden", + "SG": "i-Singapore", + "SH": "i-St. Helena", + "SI": "i-Slovenia", + "SJ": "i-Svalbard ne-Jan Mayen", + "SK": "i-Slovakia", + "SL": "i-Sierra Leone", + "SM": "i-San Marino", + "SN": "i-Senegal", + "SO": "i-Somalia", + "SR": "i-Suriname", + "SS": "i-South Sudan", + "ST": "i-São Tomé kanye ne-Príncipe", + "SV": "i-El Salvador", + "SX": "i-Sint Maarten", + "SY": "i-Syria", + "SZ": "i-Swaziland", + "TA": "i-Tristan da Cunha", + "TC": "i-Turks ne-Caicos Islands", + "TD": "i-Chad", + "TF": "i-French Southern Territories", + "TG": "i-Togo", + "TH": "i-Thailand", + "TJ": "i-Tajikistan", + "TK": "i-Tokelau", + "TL": "i-Timor-Leste", + "TM": "i-Turkmenistan", + "TN": "i-Tunisia", + "TO": "i-Tonga", + "TR": "i-Turkey", + "TT": "i-Trinidad ne-Tobago", + "TV": "i-Tuvalu", + "TW": "i-Taiwan", + "TZ": "i-Tanzania", + "UA": "i-Ukraine", + "UG": "i-Uganda", + "UM": "i-U.S. Minor Outlying Islands", + "UN": "I-United Nations", + "US": "i-United States", + "UY": "i-Uruguay", + "UZ": "i-Uzbekistan", + "VA": "i-Vatican City", + "VC": "i-Saint Vincent ne-Grenadines", + "VE": "i-Venezuela", + "VG": "i-British Virgin Islands", + "VI": "i-U.S. Virgin Islands", + "VN": "i-Vietnam", + "VU": "i-Vanuatu", + "WF": "i-Wallis ne-Futuna", + "WS": "i-Samoa", + "XK": "i-Kosovo", + "YE": "i-Yemen", + "YT": "i-Mayotte", + "ZA": "i-South Africa", + "ZM": "i-Zambia", + "ZW": "iZimbabwe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/af.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/af.json new file mode 100644 index 0000000000000000000000000000000000000000..eb4e001795120e2075edf970e096cad7b1b64227 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/af.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.29.44", + "Names": { + "Arab": "Arabies", + "Armn": "Armeens", + "Beng": "Bengaals", + "Bopo": "Bopomofo", + "Brai": "Braille", + "Cyrl": "Sirillies", + "Deva": "Devanagari", + "Ethi": "Etiopies", + "Geor": "Georgies", + "Grek": "Grieks", + "Gujr": "Gudjarati", + "Guru": "Gurmukhi", + "Hanb": "Hanb", + "Hang": "Hangul", + "Hani": "Han", + "Hans": "Vereenvoudig", + "Hant": "Tradisioneel", + "Hebr": "Hebreeus", + "Hira": "Hiragana", + "Hrkt": "Japannese lettergreepskrif", + "Jamo": "Jamo", + "Jpan": "Japannees", + "Kana": "Katakana", + "Khmr": "Khmer", + "Knda": "Kannada", + "Kore": "Koreaans", + "Laoo": "Lao", + "Latn": "Latyn", + "Mlym": "Malabaars", + "Mong": "Mongools", + "Mymr": "Mianmar", + "Orya": "Oriya", + "Sinh": "Sinhala", + "Taml": "Tamil", + "Telu": "Teloegoe", + "Thaa": "Thaana", + "Thai": "Thai", + "Tibt": "Tibettaans", + "Zmth": "Wiskundige notasie", + "Zsye": "Emoji", + "Zsym": "Simbole", + "Zxxx": "Ongeskrewe", + "Zyyy": "Algemeen", + "Zzzz": "Onbekende skryfstelsel" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/am.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/am.json new file mode 100644 index 0000000000000000000000000000000000000000..80fce8ad73fee4f37469d8afef3914827d5a7753 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/am.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "ዓረብኛ", + "Armn": "አርሜንያዊ", + "Beng": "ቤንጋሊ", + "Bopo": "ቦá–ሞáŽ", + "Brai": "ብሬይáˆ", + "Cyrl": "ሲይሪáˆáŠ­", + "Deva": "ደቫንጋሪ", + "Ethi": "ኢትዮá’ክ", + "Geor": "ጆርጂያዊ", + "Grek": "áŒáˆªáŠ­", + "Gujr": "ጉጃራቲ", + "Guru": "ጉርሙኪ", + "Hanb": "ሃንብ", + "Hang": "áˆáŠ•áŒ‰áˆ", + "Hani": "ሃን", + "Hans": "ቀለሠያለ", + "Hant": "ባህላዊ", + "Hebr": "እብራይስጥ", + "Hira": "ሂራጋና", + "Hrkt": "ካታካና ወይንሠሂራጋና", + "Jamo": "ጃሞ", + "Jpan": "ጃá“ንኛ", + "Kana": "ካታካና", + "Khmr": "ክህመር", + "Knda": "ካንአዳ", + "Kore": "ኮሪያኛ", + "Laoo": "ላኦ", + "Latn": "ላቲን", + "Mlym": "ማላያáˆáˆ", + "Mong": "ሞንጎሊያኛ", + "Mymr": "áˆá‹«áŠ•áˆ›áˆ­", + "Orya": "ኦሪያ", + "Sinh": "ሲንሃላ", + "Taml": "ታሚáˆ", + "Telu": "ተሉጉ", + "Thaa": "ታና", + "Thai": "ታይ", + "Tibt": "ቲቤታን", + "Zmth": "Zmth", + "Zsye": "Zsye", + "Zsym": "áˆáˆáŠ­á‰¶á‰½", + "Zxxx": "á‹«áˆá‰°áŒ»áˆ", + "Zyyy": "የጋራ", + "Zzzz": "á‹«áˆá‰³á‹ˆá‰€ ስክሪá•ት" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ar.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ar.json new file mode 100644 index 0000000000000000000000000000000000000000..38fa92d5900a5e3da80b7ff843c825d204268c2d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ar.json @@ -0,0 +1,124 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "العربية", + "Armn": "الأرمينية", + "Bali": "البالية", + "Batk": "الباتاك", + "Beng": "البنغالية", + "Blis": "رموز بليس", + "Bopo": "البوبوموÙÙˆ", + "Brah": "الهندوسية", + "Brai": "البرايل", + "Bugi": "البجينيز", + "Buhd": "البهيدية", + "Cans": "مقاطع كندية أصلية موحدة", + "Cari": "الكارية", + "Cham": "التشامية", + "Cher": "الشيروكي", + "Cirt": "السيرث", + "Copt": "القبطية", + "Cprt": "القبرصية", + "Cyrl": "السيريلية", + "Cyrs": "السيريلية السلاÙية الكنسية القديمة", + "Deva": "Ø§Ù„Ø¯ÙŠÙØ§Ù†Ø§Ø¬Ø§Ø±ÙŠ", + "Dsrt": "الديسيريت", + "Egyd": "الديموطيقية", + "Egyh": "الهيراطيقية", + "Egyp": "الهيروغليÙية", + "Ethi": "الأثيوبية", + "Geok": "الأبجدية الجورجية - Ø£Ø³ÙˆÙ…ØªØ§ÙØ±Ù„ÙŠ Ùˆ نسخري", + "Geor": "الجورجية", + "Glag": "الجلاجوليتيك", + "Goth": "القوطية", + "Grek": "اليونانية", + "Gujr": "التاغجراتية", + "Guru": "الجرمخي", + "Hanb": "هانب", + "Hang": "الهانغول", + "Hani": "الهان", + "Hano": "الهانونو", + "Hans": "المبسطة", + "Hant": "التقليدية", + "Hebr": "العبرية", + "Hira": "الهيراجانا", + "Hmng": "الباهوه همونج", + "Hrkt": "أبجدية مقطعية يابانية", + "Hung": "المجرية القديمة", + "Inds": "اندس - هارابان", + "Ital": "الإيطالية القديمة", + "Jamo": "جامو", + "Java": "الجاوية", + "Jpan": "اليابانية", + "Kali": "الكياه لى", + "Kana": "الكتكانا", + "Khar": "الخاروشتى", + "Khmr": "الخميرية", + "Knda": "الكانادا", + "Kore": "الكورية", + "Lana": "الانا", + "Laoo": "اللاو", + "Latf": "اللاتينية - متغير ÙØ±Ø§ÙƒØªØ±", + "Latg": "اللاتينية - متغير غيلى", + "Latn": "اللاتينية", + "Lepc": "الليبتشا - رونج", + "Limb": "الليمبو", + "Lina": "الخطية Ø£", + "Linb": "الخطية ب", + "Lyci": "الليسية", + "Lydi": "الليدية", + "Mand": "المانداينية", + "Maya": "المايا الهيروغليÙية", + "Mero": "الميرويتيك", + "Mlym": "الماليالام", + "Mong": "المغولية", + "Moon": "مون", + "Mymr": "الميانمار", + "Narb": "العربية الشمالية القديمة", + "Nkoo": "أنكو", + "Ogam": "الأوجهام", + "Orkh": "الأورخون", + "Orya": "الأوريا", + "Osma": "الأوسمانيا", + "Perm": "البيرميكية القديمة", + "Phag": "Ø§Ù„ÙØ§Ø¬Ø³Ø¨Ø§", + "Phnx": "الÙينيقية", + "Plrd": "الصوتيات الجماء", + "Roro": "رنجورنجو", + "Runr": "الروني", + "Sara": "الساراتي", + "Sarb": "العربية الجنوبية القديمة", + "Shaw": "الشواني", + "Sinh": "السينهالا", + "Sund": "السوندانية", + "Sylo": "السيلوتي ناغري", + "Syrc": "السريانية", + "Syre": "السريانية الأسترنجيلية", + "Syrj": "السريانية الغربية", + "Syrn": "السريانية الشرقية", + "Tagb": "التاجبانوا", + "Tale": "التاي لي", + "Talu": "التاى لى الجديد", + "Taml": "التاميلية", + "Telu": "التيلجو", + "Teng": "التينجوار", + "Tfng": "التيÙيناغ", + "Tglg": "التغالوغية", + "Thaa": "الثعنة", + "Thai": "التايلاندية", + "Tibt": "التبتية", + "Ugar": "الأجاريتيكية", + "Vaii": "Ø§Ù„ÙØ§ÙŠ", + "Visp": "الكلام المرئي", + "Xpeo": "Ø§Ù„ÙØ§Ø±Ø³ÙŠØ© القديمة", + "Xsux": "الكتابة المسمارية الأكدية السومرية", + "Yiii": "اليي", + "Zinh": "الموروث", + "Zmth": "تدوين رياضي", + "Zsye": "إيموجي", + "Zsym": "رموز", + "Zxxx": "غير مكتوب", + "Zyyy": "عام", + "Zzzz": "نظام كتابة غير معروÙ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/as.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/as.json new file mode 100644 index 0000000000000000000000000000000000000000..7fc0ba8900574dacdc9da3f953de984bf5830148 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/as.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "Beng": "বঙালী" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/az.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/az.json new file mode 100644 index 0000000000000000000000000000000000000000..a1a07f3feb677e01c54981176a0688005a70c217 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/az.json @@ -0,0 +1,133 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "É™rÉ™b", + "Armi": "armi", + "Armn": "ermÉ™ni", + "Avst": "avestan", + "Bali": "bali", + "Batk": "batak", + "Beng": "benqal", + "Blis": "blissymbols", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "brayl", + "Bugi": "buqin", + "Buhd": "buhid", + "Cakm": "kakm", + "Cans": "birləşmiÅŸ kanada yerli yazısı", + "Cari": "kariyan", + "Cham": "çam", + "Cher": "çiroki", + "Cirt": "sirt", + "Copt": "koptik", + "Cprt": "kipr", + "Cyrl": "kiril", + "Cyrs": "qÉ™dimi kilsa kirili", + "Deva": "devanaqari", + "Dsrt": "deseret", + "Egyd": "misir demotik", + "Egyh": "misir hiyeratik", + "Egyp": "misir hiyeroqlif", + "Ethi": "efiop", + "Geok": "gürcü xutsuri", + "Geor": "gürcü", + "Glag": "qlaqolitik", + "Goth": "qotik", + "Grek": "yunan", + "Gujr": "qucarat", + "Guru": "qurmuxi", + "Hanb": "hanb", + "Hang": "hanqıl", + "Hani": "han", + "Hano": "hanunu", + "Hans": "sadÉ™ləşmiÅŸ", + "Hant": "É™nÉ™nÉ™vi", + "Hebr": "ibrani", + "Hira": "iraqana", + "Hmng": "pahav monq", + "Hrkt": "hecalı yapon É™lifbası", + "Hung": "qÉ™dimi macar", + "Inds": "hindistan", + "Ital": "qÉ™dimi italyalı", + "Jamo": "jamo", + "Java": "cava", + "Jpan": "yapon", + "Kali": "kayax li", + "Kana": "katakana", + "Khar": "xaroÅŸti", + "Khmr": "kxmer", + "Knda": "kannada", + "Kore": "koreya", + "Kthi": "kti", + "Lana": "lanna", + "Laoo": "lao", + "Latf": "fraktur latını", + "Latg": "gael latını", + "Latn": "latın", + "Lepc": "lepçə", + "Limb": "limbu", + "Lyci": "lusian", + "Lydi": "ludian", + "Mand": "mandayen", + "Mani": "maniçayen", + "Maya": "maya hiyeroqlifi", + "Mero": "meroytik", + "Mlym": "malayalam", + "Mong": "monqol", + "Moon": "mun", + "Mtei": "meytey mayek", + "Mymr": "myanmar", + "Nkoo": "nko", + "Ogam": "oÄŸam", + "Olck": "ol çiki", + "Orkh": "orxon", + "Orya": "oriya", + "Osma": "osmanya", + "Perm": "qÉ™dimi permik", + "Phag": "faqs-pa", + "Phli": "fli", + "Phlp": "flp", + "Phlv": "kitab paxlavi", + "Phnx": "foenik", + "Plrd": "polard fonetik", + "Prti": "prti", + "Rjng": "recÉ™ng", + "Roro": "ronqoronqo", + "Runr": "runik", + "Samr": "samaritan", + "Sara": "sarati", + "Saur": "saurastra", + "Sgnw": "iÅŸarÉ™t yazısı", + "Shaw": "ÅŸavyan", + "Sinh": "sinhal", + "Sund": "sundan", + "Sylo": "siloti nÉ™qri", + "Syrc": "siryak", + "Syre": "estrangela süryanice", + "Tagb": "taqbanva", + "Tale": "tay le", + "Talu": "tÉ™zÉ™ tay lu", + "Taml": "tamil", + "Tavt": "tavt", + "Telu": "teluqu", + "Teng": "tengvar", + "Tfng": "tifinaq", + "Tglg": "taqaloq", + "Thaa": "thana", + "Thai": "tay", + "Tibt": "tibet", + "Ugar": "uqarit", + "Vaii": "vay", + "Visp": "danışma sÉ™slÉ™ri", + "Xpeo": "qÉ™dimi fars", + "Xsux": "sumer-akadyan kuneyform", + "Yiii": "yi", + "Zmth": "riyazi notasiya", + "Zsye": "emoji", + "Zsym": "simvollar", + "Zxxx": "yazısız", + "Zyyy": "ümumi yazı", + "Zzzz": "tanınmayan yazı" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/az_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/az_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..44cabfd94b725eac08ace39016b5ea39d54c1656 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/az_Cyrl.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "Cyrl": "Кирил" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/be.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/be.json new file mode 100644 index 0000000000000000000000000000000000000000..909350ca9d0ec9171bc5df2a61bcfd723a74da88 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/be.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.29.66", + "Names": { + "Arab": "арабÑкае", + "Armn": "армÑнÑкае", + "Beng": "бенгальÑкае", + "Bopo": "бапамофа", + "Brai": "шрыфт БрайлÑ", + "Cyrl": "кірыліца", + "Deva": "дÑванагары", + "Ethi": "ÑфіопÑкае", + "Geor": "грузінÑкае", + "Grek": "грÑчаÑкае", + "Gujr": "гуджараці", + "Guru": "гурмукхі", + "Hanb": "хан з бапамофа", + "Hang": "хангыль", + "Hani": "хан", + "Hans": "Ñпрошчанае кітайÑкае", + "Hant": "традыцыйнае кітайÑкае", + "Hebr": "ÑўрÑйÑкае", + "Hira": "хірагана", + "Hrkt": "ÑпонÑÐºÑ–Ñ ÑÐºÐ»Ð°Ð´Ð¾Ð²Ñ‹Ñ Ð¿Ñ–Ñьмы", + "Jamo": "чамо", + "Jpan": "ÑпонÑкае", + "Kana": "катакана", + "Khmr": "кхмерÑкае", + "Knda": "канада", + "Kore": "карÑйÑкае", + "Laoo": "лаоÑкае", + "Latn": "лацініца", + "Mlym": "малаÑлам", + "Mong": "ÑтарамангольÑкае", + "Mymr": "м’ÑнмарÑкае", + "Orya": "орыÑ", + "Sinh": "ÑінгальÑкае", + "Taml": "тамільÑкае", + "Telu": "Ñ‚Ñлугу", + "Thaa": "тана", + "Thai": "тайÑкае", + "Tibt": "тыбецкае", + "Zmth": "матÑÐ¼Ð°Ñ‚Ñ‹Ñ‡Ð½Ñ‹Ñ Ð·Ð½Ð°ÐºÑ–", + "Zsye": "Ñмодзі", + "Zsym": "Ñімвалы", + "Zxxx": "беÑпіÑьменнаÑ", + "Zyyy": "звычайнае", + "Zzzz": "невÑдомае піÑьмо" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bg.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bg.json new file mode 100644 index 0000000000000000000000000000000000000000..96150e0bd8f6ed46edb24bd8eb24e294b6e5debe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bg.json @@ -0,0 +1,127 @@ +{ + "Version": "2.1.30.6", + "Names": { + "Arab": "арабÑка", + "Armi": "ÐрамейÑка", + "Armn": "арменÑка", + "Avst": "ÐвеÑтанÑка", + "Bali": "БалийÑки", + "Batk": "БатакÑка", + "Beng": "бенгалÑка", + "Blis": "Ð‘Ð»Ð¸Ñ Ñимволи", + "Bopo": "бопомофо", + "Brah": "Брахми", + "Brai": "Брайлова", + "Bugi": "БугинÑка", + "Buhd": "Бухид", + "Cakm": "Чакма", + "Cans": "Унифицирани Ñимволи на канадÑки аборигени", + "Cari": "КарийÑка", + "Cham": "ХамитÑка", + "Cher": "Чероки", + "Cirt": "Кирт", + "Copt": "КоптÑка", + "Cprt": "КипърÑка", + "Cyrl": "кирилица", + "Deva": "деванагари", + "Dsrt": "Дезерет", + "Egyd": "ЕгипетÑко демотично пиÑмо", + "Egyh": "ЕгипетÑко йератично пиÑмо", + "Egyp": "ЕгипетÑки йероглифи", + "Ethi": "етиопÑка", + "Geok": "ГрузинÑка хуцури", + "Geor": "грузинÑка", + "Glag": "ГлаголичеÑка", + "Goth": "ГотичеÑка", + "Grek": "гръцка", + "Gujr": "гуджарати", + "Guru": "гурмукхи", + "Hanb": "ханб", + "Hang": "хангъл", + "Hani": "китайÑка", + "Hano": "Хануну", + "Hans": "опроÑтена", + "Hant": "традиционен", + "Hebr": "иврит", + "Hira": "хирагана", + "Hmng": "Пахау хмонг", + "Hrkt": "ÑпонÑка Ñричкова", + "Hung": "СтароунгарÑка", + "Inds": "ХарапÑка", + "Ital": "Древно италийÑка", + "Jamo": "джамо", + "Java": "ЯванÑка", + "Jpan": "ÑпонÑка", + "Kali": "ÐšÐ°Ñ Ð›Ð¸", + "Kana": "катакана", + "Khar": "Кхароштхи", + "Khmr": "кхмерÑка", + "Knda": "каннада", + "Kore": "корейÑка", + "Kthi": "Кайтхи", + "Lana": "Ланна", + "Laoo": "лаоÑка", + "Latf": "ЛатинÑка фрактура", + "Latg": "ГалÑка латинÑка", + "Latn": "латиница", + "Lepc": "Лепча", + "Limb": "Лимбу", + "Lina": "Линейна Ð", + "Linb": "Линейна Б", + "Lyci": "ЛицийÑка", + "Lydi": "ЛидийÑка", + "Mand": "МандаринÑка", + "Mani": "МанихейÑка", + "Maya": "Йероглифи на Маите", + "Mero": "МероитÑка", + "Mlym": "малаÑлам", + "Mong": "монголÑка", + "Moon": "Мун", + "Mtei": "Манипури", + "Mymr": "бирманÑка", + "Nkoo": "Ð’Ко", + "Ogam": "ОгамичеÑка", + "Olck": "Ол Чики", + "Orkh": "Орхоно-ениÑейÑка", + "Orya": "ориÑ", + "Osma": "ОÑманÑка", + "Perm": "Древно пермÑка", + "Phag": "ФагÑ-па", + "Phlv": "ПахлавÑка", + "Phnx": "ФиникийÑка", + "Plrd": "ПиÑменоÑÑ‚ Полард", + "Roro": "Ронго-ронго", + "Runr": "РуничеÑка", + "Samr": "СамаританÑка", + "Sara": "Сарати", + "Saur": "Саураштра", + "Sinh": "ÑинхалÑка", + "Sund": "СунданÑка", + "Sylo": "Силоти Ðагри", + "Syrc": "СирийÑка", + "Syre": "СирийÑка еÑтрангело", + "Syrj": "Западна ÑирийÑка", + "Syrn": "Източна ÑирийÑка", + "Tagb": "Тагбанва", + "Tale": "Тай Ле", + "Talu": "Ðова Тай Ле", + "Taml": "тамилÑка", + "Telu": "телугу", + "Tglg": "Тагалог", + "Thaa": "таана", + "Thai": "тайÑка", + "Tibt": "тибетÑка", + "Ugar": "УгаритÑка", + "Vaii": "ВайÑка", + "Visp": "Видима реч", + "Xpeo": "СтароперÑийÑка", + "Xsux": "Шумеро-акадÑки клинопиÑ", + "Yiii": "Йи", + "Zmth": "МатематичеÑки Ñимволи", + "Zsye": "емотикони", + "Zsym": "Ñимволи", + "Zxxx": "без пиÑменоÑÑ‚", + "Zyyy": "обща", + "Zzzz": "непозната пиÑменоÑÑ‚" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bn.json new file mode 100644 index 0000000000000000000000000000000000000000..1fd69788590fc630d0bc8de3c0536555bb5cabf6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bn.json @@ -0,0 +1,138 @@ +{ + "Version": "2.1.29.44", + "Names": { + "Arab": "আরবি", + "Armi": "আরমি", + "Armn": "আরà§à¦®à§‡à¦¨à§€à¦¯à¦¼", + "Avst": "আভেসতান", + "Bali": "বালীয়", + "Batk": "বাটাক", + "Beng": "বাংলা", + "Blis": "বà§à¦²à¦¿à¦¸à¦ªà§à¦°à¦¤à§€à¦•", + "Bopo": "বোপোমোফো", + "Brah": "বà§à¦°à¦¾à¦¹à§à¦®à§€", + "Brai": "বà§à¦°à§‡à¦‡à¦²", + "Bugi": "বà§à¦—ি", + "Buhd": "বà§à¦¹à¦¿à¦¡", + "Cakm": "চাকমা", + "Cans": "সংযà§à¦•à§à¦¤ কানাডিয়ান অà§à¦¯à¦¾à¦¬à§à¦°à§‹à¦œà¦¿à¦¨à¦¿à¦¯à¦¼à¦¾à¦¨ সিলেবিকà§à¦¸", + "Cari": "কà§à¦¯à¦¾à¦°à¦¿à¦¯à¦¼à¦¾à¦¨", + "Cham": "চà§à¦¯à¦¾à¦®", + "Cher": "চেরোকি", + "Cirt": "কিরà§à¦Ÿ", + "Copt": "কোপà§à¦Ÿà¦¿à¦•", + "Cprt": "সাইপà§à¦°à§‹à¦¯à¦¼à§‡à¦Ÿ", + "Cyrl": "সিরিলিক", + "Cyrs": "পà§à¦°à¦¾à¦šà§€à¦¨ চারà§à¦š সà§à¦²à¦¾à¦­à§‹à¦¨à¦¿à¦• সিরিলিক", + "Deva": "দেবনাগরি", + "Dsrt": "দেসেরাত", + "Egyd": "মিশরীয় ডেমোটিক", + "Egyh": "মিশরীয় হায়রেটিক", + "Egyp": "মিশরীয় হায়ারোগà§à¦²à¦¿à¦ª", + "Ethi": "ইথিওপিয়", + "Geok": "জরà§à¦œà¦¿à¦¯à¦¼ খà§à§Žà¦¸à§à¦°à¦¿", + "Geor": "জরà§à¦œà¦¿à¦¯à¦¼à¦¾à¦¨", + "Glag": "গà§à¦²à¦¾à¦—োলিটিক", + "Goth": "গোথিক", + "Grek": "গà§à¦°à¦¿à¦•", + "Gujr": "গà§à¦œà¦°à¦¾à¦Ÿà¦¿", + "Guru": "গà§à¦°à§à¦®à§à¦–ি", + "Hanb": "হà§à¦¯à¦¾à¦¨à¦¬à¦¿", + "Hang": "হাঙà§à¦—à§à¦²", + "Hani": "হà§à¦¯à¦¾à¦¨", + "Hano": "হà§à¦¯à¦¾à¦¨à§à¦¨à§", + "Hans": "সরলীকৃত", + "Hant": "à¦à¦¤à¦¿à¦¹à§à¦¯à¦¬à¦¾à¦¹à§€", + "Hebr": "হিবà§à¦°à§", + "Hira": "হিরাগানা", + "Hmng": "ফাহাও মঙ", + "Hrkt": "জাপানি অকà§à¦·à¦°à¦®à¦¾à¦²à¦¾", + "Hung": "পà§à¦°à§‹à¦¨à§‹ হাঙà§à¦—েরীয়", + "Inds": "সিনà§à¦§à§", + "Ital": "পà§à¦°à¦¾à¦šà§€à¦¨ ইতালি", + "Jamo": "জà§à¦¯à¦¾à¦®à§‹", + "Java": "জাভানিজ", + "Jpan": "জাপানী", + "Kali": "কায়াহ লি", + "Kana": "কাটাকানা", + "Khar": "খরোষà§à¦ à§€", + "Khmr": "খেমের", + "Knda": "কানাড়া", + "Kore": "কোরিয়ান", + "Kthi": "কাইথি", + "Lana": "লানà§à¦¨à¦¾", + "Laoo": "লাও", + "Latf": "ফà§à¦°à¦¾à¦•à§à¦Ÿà§à¦° লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨", + "Latg": "গà§à¦¯à¦¾à¦²à¦¿à¦• লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨", + "Latn": "লà§à¦¯à¦¾à¦Ÿà¦¿à¦¨", + "Lepc": "লেপà§à¦šà¦¾", + "Limb": "লিমà§à¦¬à§", + "Lina": "লিনিয়ার à¦", + "Linb": "লিনিয়ার বি", + "Lyci": "লাইসিয়ান", + "Lydi": "লাইডিয়ান", + "Mand": "মà§à¦¯à¦¾à¦¨à§à¦¡à¦¾à¦¯à¦¼à§€à¦¨", + "Mani": "মà§à¦¯à¦¾à¦¨à¦¿à¦šà¦¾à¦‡à¦¨", + "Maya": "মায়ান হায়ারোগà§à¦²à¦¿à¦ª", + "Mero": "মেরোইটিক", + "Mlym": "মালায়ালাম", + "Mong": "মোঙà§à¦—োলীয়", + "Moon": "মà§à¦¨", + "Mtei": "মেইটেই মায়েক", + "Mymr": "মায়ানমার", + "Nkoo": "à¦à¦¨à¦•à§‹", + "Ogam": "ওঘাম", + "Olck": "ওল চিকি", + "Orkh": "অরà§à¦–োন", + "Orya": "ওড়িয়া", + "Osma": "ওসমানিয়", + "Perm": "পà§à¦°à¦¾à¦šà§€à¦¨ পারà§à¦®à¦¿à¦•", + "Phag": "ফাগà§à¦¸-পা", + "Phli": "খদিত পাহলভি", + "Phlp": "সলà§à¦Ÿà¦¾à¦° পাহলভি", + "Phlv": "পà§à¦¸à§à¦¤à¦• পাহলভি", + "Phnx": "ফিনিশিয়", + "Plrd": "পোলারà§à¦¡ ধà§à¦¬à¦¨à¦¿à¦•", + "Prti": "পারà§à¦¥à¦¿à¦¯à¦¼à¦¨", + "Rjng": "রেজà§à¦¯à¦¾à¦™à§à¦—", + "Roro": "রোঙà§à¦—োরোঙà§à¦—à§‹", + "Runr": "রà§à¦¨à¦¿à¦•", + "Samr": "সমেরিটন", + "Sara": "সারাতি", + "Saur": "সৌরাষà§à¦Ÿà§à¦°", + "Sgnw": "চিহà§à¦¨ লিখন", + "Shaw": "সাভিয়ান", + "Sinh": "সিংহলি", + "Sund": "সানà§à¦¦à¦¾à¦¨à¦¿à¦œ", + "Sylo": "সিলেটি নাগরি", + "Syrc": "সিরিয়াক", + "Syre": "à¦à¦¸à§à¦Ÿà§à¦°à§‡à¦™à§à¦—েলো সিরিয়াক", + "Syrj": "পশà§à¦šà¦¿à¦®à¦¾à¦žà§à¦šà¦²à§€à¦¯à¦¼ সিরিয়াক", + "Syrn": "পূরà§à¦¬à¦¾à¦žà§à¦šà¦²à§€à¦¯à¦¼ সিরিয়াক", + "Tagb": "টাগোওয়ানা", + "Tale": "তাইলে", + "Talu": "নতà§à¦¨ তাই লà§", + "Taml": "তামিল", + "Tavt": "তাই ভিয়েৎ", + "Telu": "তেলেগà§", + "Teng": "তেঙà§à¦—োয়ার", + "Tfng": "তিফিনাগ", + "Tglg": "টাগালগ", + "Thaa": "থানা", + "Thai": "থাই", + "Tibt": "তিবà§à¦¬à¦¤à¦¿", + "Ugar": "উগারিটিক", + "Vaii": "ভাই", + "Visp": "দৃশà§à¦¯à¦®à¦¾à¦¨ ভাষা", + "Xpeo": "পà§à¦°à¦¾à¦šà§€à¦¨ ফারà§à¦¸à¦¿", + "Xsux": "সà§à¦®à§‡à¦°-আকà§à¦•াদীয় কীলকরূপ", + "Yiii": "উই", + "Zinh": "কাই", + "Zmth": "গানিতিক চিহà§à¦¨", + "Zsye": "ইমোজি", + "Zsym": "পà§à¦°à¦¤à¦¿à¦•গà§à¦²à¦¿", + "Zxxx": "অলিখিত", + "Zyyy": "সাধারন", + "Zzzz": "অজানা লিপি" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bo.json new file mode 100644 index 0000000000000000000000000000000000000000..b4473d5355f72d77985dba15583e0b325d7286cb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bo.json @@ -0,0 +1,9 @@ +{ + "Version": "2.1.27.40", + "Names": { + "Hans": "རྒྱ་ཡིག་གསར་པà¼", + "Hant": "རྒྱ་ཡིག་རྙིང་པà¼", + "Tibt": "བོད་ཡིག་", + "Zxxx": "སྙན་བརྒྱུད༠ཡིག་རིགས་སུ་མ་བཀོད་པའི་ཟིན་à½à½¼à¼" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/br.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/br.json new file mode 100644 index 0000000000000000000000000000000000000000..47923ad2009fb2ea9c984d4c735a7560824b07e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/br.json @@ -0,0 +1,70 @@ +{ + "Version": "2.1.28.76", + "Names": { + "Arab": "arabek", + "Armi": "arameek impalaerel", + "Armn": "armenianek", + "Avst": "avestek", + "Bali": "balinek", + "Beng": "bengali", + "Bopo": "bopomofo", + "Brai": "Braille", + "Bugi": "bougiek", + "Copt": "koptek", + "Cyrl": "kirillek", + "Cyrs": "kirillek henslavonek", + "Deva": "devanagari", + "Egyp": "hieroglifoù egiptek", + "Ethi": "etiopek", + "Geor": "jorjianek", + "Glag": "glagolitek", + "Goth": "gotek", + "Grek": "gresianek", + "Gujr": "gujarati", + "Guru": "gurmukhi", + "Hang": "hangeul", + "Hani": "han", + "Hans": "eeunaet", + "Hant": "hengounel", + "Hebr": "hebraek", + "Hira": "hiragana", + "Hluw": "hieroglifoù Anatolia", + "Ital": "henitalek", + "Java": "javanek", + "Jpan": "japanek", + "Kana": "katakana", + "Khmr": "khmer", + "Knda": "kannada", + "Kore": "koreanek", + "Laoo": "laosek", + "Latg": "latin gouezelek", + "Latn": "latin", + "Maya": "hieroglifoù mayaek", + "Mlym": "malayalam", + "Mong": "mongolek", + "Mymr": "myanmar", + "Ogam": "ogam", + "Orya": "oriya", + "Runr": "runek", + "Sinh": "singhalek", + "Sund": "sundanek", + "Syrc": "siriek", + "Syre": "siriek EstrangelÄ", + "Syrj": "siriek ar C’hornôg", + "Syrn": "siriek ar Reter", + "Taml": "tamilek", + "Telu": "telougou", + "Tglg": "tagalog", + "Thaa": "thaana", + "Thai": "thai", + "Tibt": "tibetanek", + "Ugar": "ougaritek", + "Vaii": "vai", + "Xpeo": "persek kozh", + "Zmth": "notadur jedoniel", + "Zsym": "arouezioù", + "Zxxx": "anskrivet", + "Zyyy": "boutin", + "Zzzz": "skritur dianav" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bs.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bs.json new file mode 100644 index 0000000000000000000000000000000000000000..3df4d60319e02e628ae2c1d88c54fc6184446698 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bs.json @@ -0,0 +1,137 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "arapsko pismo", + "Armi": "imperijsko aramejsko pismo", + "Armn": "armensko pismo", + "Avst": "avestansko pismo", + "Bali": "balijsko pismo", + "Batk": "batak pismo", + "Beng": "bengalsko pismo", + "Blis": "blisimboliÄno pismo", + "Bopo": "bopomofo pismo", + "Brah": "bramansko pismo", + "Brai": "brajevo pismo", + "Bugi": "buginsko pismo", + "Buhd": "buhidsko pismo", + "Cakm": "Äakmansko pismo", + "Cans": "Ujedinjeni kanadski aboridžinski silabici", + "Cari": "karijsko pismo", + "Cham": "Äamsko pismo", + "Cher": "Äeroki", + "Cirt": "cirt pismo", + "Copt": "koptiÄko pismo", + "Cprt": "kiparsko pismo", + "Cyrl": "ćirilica", + "Cyrs": "Staroslovenska crkvena ćirilica", + "Deva": "devanagari pismo", + "Dsrt": "dezeret", + "Egyd": "egipatsko narodno pismo", + "Egyh": "egipatsko hijeratsko pismo", + "Egyp": "egipatski hijeroglifi", + "Ethi": "etiopsko pismo", + "Geok": "gruzijsko khutsuri pismo", + "Geor": "gruzijsko pismo", + "Glag": "glagoljica", + "Goth": "gotika", + "Grek": "grÄko pismo", + "Gujr": "gudžarati pismo", + "Guru": "gurmuki pismo", + "Hanb": "hanb pismo", + "Hang": "hangul pismo", + "Hani": "han pismo", + "Hano": "hanuno pismo", + "Hans": "pojednostavljeno", + "Hant": "tradicionalno", + "Hebr": "hebrejsko pismo", + "Hira": "hiragana", + "Hmng": "pahawh hmong pismo", + "Hrkt": "katakana ili hiragana", + "Hung": "StaromaÄ‘arsko pismo", + "Inds": "induÅ¡ko ismo", + "Ital": "staro italsko pismo", + "Jamo": "jamo", + "Java": "javansko pismo", + "Jpan": "japansko pismo", + "Kali": "kajah li pismo", + "Kana": "katakana", + "Khar": "karoÅ¡ti pismo", + "Khmr": "kmersko pismo", + "Knda": "kanada pismo", + "Kore": "korejsko pismo", + "Kthi": "kaićansko pismo", + "Lana": "lanna pismo", + "Laoo": "laosko pismo", + "Latf": "latinica (fraktur varijanta)", + "Latg": "galska latinica", + "Latn": "latinica", + "Lepc": "lepÄa pismo", + "Limb": "limbu pismo", + "Lina": "linearno A pismo", + "Linb": "linearno B pismo", + "Lyci": "lisijsko pismo", + "Lydi": "lidijsko pismo", + "Mand": "mandeansko pismo", + "Mani": "manihejsko pismo", + "Maya": "majanski hijeroglifi", + "Mero": "meroitik pismo", + "Mlym": "malajalamsko pismo", + "Mong": "mongolsko pismo", + "Moon": "meseÄevo pismo", + "Mtei": "meitei majek pismo", + "Mymr": "mijanmarsko pismo", + "Nkoo": "n’ko pismo", + "Ogam": "ogham pismo", + "Olck": "ol Äiki pismo", + "Orkh": "orkhon pismo", + "Orya": "orija pismo", + "Osma": "osmanja pismo", + "Perm": "staro permiksko pismo", + "Phag": "phags-pa pismo", + "Phli": "pisani pahlavi", + "Phlp": "psalter pahlavi", + "Phlv": "pahlavi pismo", + "Phnx": "feniÄansko pismo", + "Plrd": "polard fonetsko pismo", + "Prti": "pisani partian", + "Rjng": "rejang pismo", + "Roro": "rongorongo pismo", + "Runr": "runsko pismo", + "Samr": "samaritansko pismo", + "Sara": "sarati pismo", + "Saur": "sauraÅ¡tra pismo", + "Sgnw": "znakovno pismo", + "Shaw": "Å¡avian pismo", + "Sinh": "sinhala pismo", + "Sylo": "siloti nagri pismo", + "Syrc": "sirijsko pismo", + "Syre": "sirijsko estrangelo pismo", + "Syrj": "zapadnosirijsko pismo", + "Syrn": "pismo istoÄne Sirije", + "Tagb": "tagbanva pismo", + "Tale": "tai le pismo", + "Talu": "novo tai lue pismo", + "Taml": "tamilsko pismo", + "Tavt": "tai viet pismo", + "Telu": "telugu pismo", + "Teng": "tengvar pismo", + "Tfng": "tifinag pismo", + "Tglg": "tagalog", + "Thaa": "tana pismo", + "Thai": "tajlandsko pismo", + "Tibt": "tibetansko pismo", + "Ugar": "ugaritsko pismo", + "Vaii": "vai pismo", + "Visp": "vidljivi govor", + "Xpeo": "staropersijsko pismo", + "Xsux": "sumersko-akadsko kuneiform pismo", + "Yiii": "ji pismo", + "Zinh": "nasledno pismo", + "Zmth": "matematiÄka notacija", + "Zsye": "emoji sliÄice", + "Zsym": "simboli", + "Zxxx": "nepisani jezik", + "Zyyy": "zajedniÄko pismo", + "Zzzz": "nepoznato pismo" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bs_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bs_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..a55a40c7a2c0faa9dccead15a3afcdc8501be294 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/bs_Cyrl.json @@ -0,0 +1,135 @@ +{ + "Version": "2.1.28.76", + "Names": { + "Arab": "арапÑко пиÑмо", + "Armi": "империјÑко арамејÑко пиÑмо", + "Armn": "јерменÑко пиÑмо", + "Avst": "авеÑтанÑко пиÑмо", + "Bali": "балијÑко пиÑмо", + "Batk": "батак пиÑмо", + "Beng": "бенгалÑко пиÑмо", + "Blis": "блиÑимболично пиÑмо", + "Bopo": "бопомофо пиÑмо", + "Brah": "браманÑко пиÑмо", + "Brai": "Брајево пиÑмо", + "Bugi": "бугинÑко пиÑмо", + "Buhd": "бухидÑко пиÑмо", + "Cakm": "чакманÑко пиÑмо", + "Cans": "уједињени канадÑки абориџинÑки Ñилабици", + "Cari": "каријÑко пиÑмо", + "Cham": "чамÑко пиÑмо", + "Cher": "Чероки", + "Cirt": "цирт пиÑмо", + "Copt": "коптичко пиÑмо", + "Cprt": "кипарÑко пиÑмо", + "Cyrl": "Ћирилица", + "Cyrs": "СтароÑловенÑка црквена ћирилица", + "Deva": "Деванагари", + "Dsrt": "Дезерет", + "Egyd": "египатÑко народно пиÑмо", + "Egyh": "египатÑко хијератÑко пиÑмо", + "Egyp": "египатÑки хијероглифи", + "Ethi": "етиопÑко пиÑмо", + "Geok": "грузијÑко кхутÑури пиÑмо", + "Geor": "грузијÑко пиÑмо", + "Glag": "глагољица", + "Goth": "Готика", + "Grek": "грчко пиÑмо", + "Gujr": "гујарати пиÑмо", + "Guru": "гурмуки пиÑмо", + "Hang": "хангул", + "Hani": "хан", + "Hano": "хануно", + "Hans": "поједноÑтављено кинеÑко пиÑмо", + "Hant": "традиционално кинеÑко пиÑмо", + "Hebr": "хебрејÑко пиÑмо", + "Hira": "Хирагана", + "Hmng": "пахав хмонг пиÑмо", + "Hrkt": "Катакана или Хирагана", + "Hung": "ÑтаромађарÑко пиÑмо", + "Inds": "индушко пиÑмо", + "Ital": "Ñтари италик", + "Jamo": "Ðамо", + "Java": "јаванÑко пиÑмо", + "Jpan": "јапанÑко пиÑмо", + "Kali": "кајах-ли пиÑмо", + "Kana": "Катакана", + "Khar": "карошти пиÑмо", + "Khmr": "кмерÑко пиÑмо", + "Knda": "каннада пиÑмо", + "Kore": "корејÑко пиÑмо", + "Kthi": "каити", + "Lana": "ланна пиÑмо", + "Laoo": "лаошко пиÑмо", + "Latf": "латиница (фрактур варијанта)", + "Latg": "галÑка латиница", + "Latn": "Латиница", + "Lepc": "лепча пиÑмо", + "Limb": "лимбу пиÑмо", + "Lina": "линеарно РпиÑмо", + "Linb": "линеарно Б пиÑмо", + "Lyci": "лиÑијÑко пиÑмо", + "Lydi": "лидијÑко пиÑмо", + "Mand": "мандеанÑко пиÑмо", + "Mani": "манихејÑко пиÑмо", + "Maya": "мајанÑки хијероглифи", + "Mero": "мероитик пиÑмо", + "Mlym": "малајалам пиÑмо", + "Mong": "монголÑко пиÑмо", + "Moon": "меÑечево пиÑмо", + "Mtei": "меитеи мајек пиÑмо", + "Mymr": "мијанмарÑко пиÑмо", + "Nkoo": "н’ко пиÑмо", + "Ogam": "огамÑко пиÑмо", + "Olck": "ол чики пиÑмо", + "Orkh": "орконÑко пиÑмо", + "Orya": "оријанÑко пиÑмо", + "Osma": "оÑмањанÑко пиÑмо", + "Perm": "Ñтаро пермикÑко пиÑмо", + "Phag": "пагÑ-па пиÑмо", + "Phli": "пиÑани пахлави", + "Phlp": "пÑалтер пахлави", + "Phlv": "пахлави пиÑмо", + "Phnx": "ФеничанÑко пиÑмо", + "Plrd": "поралд фонетÑко пиÑмо", + "Prti": "пиÑани партиан", + "Rjng": "рејанг пиÑмо", + "Roro": "ронгоронго пиÑмо", + "Runr": "рунÑко пиÑмо", + "Samr": "ÑамаританÑко пиÑмо", + "Sara": "Ñарати пиÑмо", + "Saur": "Ñаураштра пиÑмо", + "Sgnw": "знаковно пиÑмо", + "Shaw": "шавијанÑко пиÑмо", + "Sinh": "Ñинхала пиÑмо", + "Sylo": "Ñилоти нагри пиÑмо", + "Syrc": "ÑиријÑко пиÑмо", + "Syre": "ÑиријÑко еÑтрангело пиÑмо", + "Syrj": "западноÑиријÑко пиÑмо", + "Syrn": "пиÑмо иÑточне Сирије", + "Tagb": "тагбанва пиÑмо", + "Tale": "таи ле пиÑмо", + "Talu": "нови таи луе", + "Taml": "тамилÑко пиÑмо", + "Tavt": "таи виет пиÑмо", + "Telu": "телугу пиÑмо", + "Teng": "тенгвар пиÑмо", + "Tfng": "тифинаг пиÑмо", + "Tglg": "Тагалог", + "Thaa": "тхана пиÑмо", + "Thai": "тајландÑко пиÑмо", + "Tibt": "тибетанÑко пиÑмо", + "Ugar": "угаритÑко пиÑмо", + "Vaii": "ваи пиÑмо", + "Visp": "видљиви говор", + "Xpeo": "ÑтароперÑијÑко пиÑмо", + "Xsux": "ÑумерÑко-акадÑко кунеиформ пиÑмо", + "Yiii": "ји пиÑмо", + "Zinh": "наÑледно пиÑмо", + "Zmth": "математичка нотација", + "Zsym": "Ñимболи", + "Zxxx": "ÐепиÑани језик", + "Zyyy": "заједничко пиÑмо", + "Zzzz": "Ðепознато или неважеће пиÑмо" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ca.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ca.json new file mode 100644 index 0000000000000000000000000000000000000000..da2ff45d56bdca48edb5a5712d5c08137feaac7a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ca.json @@ -0,0 +1,178 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Adlm": "adlam", + "Afak": "afaka", + "Aghb": "albanès caucàsic", + "Ahom": "ahom", + "Arab": "àrab", + "Armi": "arameu imperial", + "Armn": "armeni", + "Avst": "avèstic", + "Bali": "balinès", + "Bamu": "bamum", + "Bass": "bassa vah", + "Batk": "batak", + "Beng": "bengalí", + "Bhks": "bhaiksuki", + "Blis": "símbols Bliss", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "braille", + "Bugi": "buginès", + "Buhd": "buhid", + "Cakm": "chakma", + "Cans": "síl·labes dels aborígens canadencs unificats", + "Cari": "carià", + "Cham": "cham", + "Cher": "cherokee", + "Cirt": "cirth", + "Copt": "copte", + "Cprt": "xipriota", + "Cyrl": "ciríl·lic", + "Cyrs": "ciríl·lic de l’antic eslau eclesiàstic", + "Deva": "devanagari", + "Dsrt": "deseret", + "Dupl": "taquigrafia Duployé", + "Egyd": "demòtic egipci", + "Egyh": "hieràtic egipci", + "Egyp": "jeroglífic egipci", + "Elba": "elbasan", + "Ethi": "etiòpic", + "Geok": "georgià hucuri", + "Geor": "georgià", + "Glag": "glagolític", + "Goth": "gòtic", + "Gran": "grantha", + "Grek": "grec", + "Gujr": "gujarati", + "Guru": "gurmukhi", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanunoo", + "Hans": "simplificat", + "Hant": "tradicional", + "Hebr": "hebreu", + "Hira": "hiragana", + "Hluw": "jeroglífic anatoli", + "Hmng": "pahawh hmong", + "Hrkt": "katakana o hiragana", + "Hung": "hongarès antic", + "Inds": "escriptura de la vall de l’Indus", + "Ital": "cursiva antiga", + "Jamo": "jamo", + "Java": "javanès", + "Jpan": "japonès", + "Jurc": "jürchen", + "Kali": "kayah li", + "Kana": "katakana", + "Khar": "kharosthi", + "Khmr": "khmer", + "Khoj": "khoja", + "Knda": "kannada", + "Kore": "coreà", + "Kpel": "kpelle", + "Kthi": "kaithi", + "Lana": "lanna", + "Laoo": "lao", + "Latf": "llatí fraktur", + "Latg": "llatí gaèlic", + "Latn": "llatí", + "Lepc": "lepcha", + "Limb": "limbu", + "Lina": "lineal A", + "Linb": "lineal B", + "Lisu": "lisu", + "Loma": "loma", + "Lyci": "lici", + "Lydi": "lidi", + "Mahj": "mahajani", + "Mand": "mandaic", + "Mani": "maniqueu", + "Maya": "jeroglífics maies", + "Mend": "mende", + "Merc": "cursiva meroítica", + "Mero": "meroític", + "Mlym": "malaiàlam", + "Modi": "modi", + "Mong": "mongol", + "Moon": "moon", + "Mroo": "mro", + "Mtei": "manipurí", + "Mult": "multani", + "Mymr": "birmà", + "Narb": "antic nord-aràbic", + "Nbat": "nabateu", + "Newa": "newar", + "Nkgb": "geba", + "Nkoo": "n’Ko", + "Nshu": "nü shu", + "Ogam": "ogham", + "Olck": "santali", + "Orkh": "orkhon", + "Orya": "oriya", + "Osge": "osage", + "Osma": "osmanya", + "Palm": "palmirè", + "Pauc": "Pau Cin Hau", + "Perm": "antic pèrmic", + "Phag": "phagspa", + "Phli": "pahlavi inscripcional", + "Phlp": "psalter pahlavi", + "Phlv": "pahlavi", + "Phnx": "fenici", + "Plrd": "pollard miao", + "Prti": "parthià inscripcional", + "Rjng": "rejang", + "Roro": "rongo-rongo", + "Runr": "rúnic", + "Samr": "samarità", + "Sara": "sarati", + "Sarb": "sud-aràbic antic", + "Saur": "saurashtra", + "Sgnw": "escriptura de signes", + "Shaw": "shavià", + "Shrd": "shrada", + "Sidd": "siddham", + "Sind": "devangari", + "Sinh": "singalès", + "Sora": "sora sompeng", + "Sund": "sundanès", + "Sylo": "syloti nagri", + "Syrc": "siríac", + "Syre": "siríac estrangelo", + "Syrj": "siríac occidental", + "Syrn": "siríac oriental", + "Tagb": "tagbanwa", + "Takr": "takri", + "Tale": "tai le", + "Talu": "nou tai lue", + "Taml": "tàmil", + "Tang": "tangut", + "Tavt": "tai viet", + "Telu": "telugu", + "Teng": "tengwar", + "Tfng": "tifinagh", + "Tglg": "tagàlog", + "Thaa": "thaana", + "Thai": "tailandès", + "Tibt": "tibetà", + "Tirh": "tirhut", + "Ugar": "ugarític", + "Vaii": "vai", + "Visp": "llenguatge visible", + "Wara": "varang kshiti", + "Wole": "woleai", + "Xpeo": "persa antic", + "Xsux": "cuneïforme sumeri-accadi", + "Yiii": "yi", + "Zinh": "heretat", + "Zmth": "notació matemàtica", + "Zsye": "emoji", + "Zsym": "símbols", + "Zxxx": "sense escriptura", + "Zyyy": "comú", + "Zzzz": "escriptura desconeguda" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ce.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ce.json new file mode 100644 index 0000000000000000000000000000000000000000..000a5b95246b20f82d1f68aa39fbc788daf7a6d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ce.json @@ -0,0 +1,44 @@ +{ + "Version": "2.1.28.76", + "Names": { + "Arab": "Ӏаьрбийн", + "Armn": "Ñрмалойн", + "Beng": "бенгалхойн", + "Bopo": "бопомофо", + "Brai": "брайлÑ", + "Cyrl": "кириллица", + "Deva": "деванагари", + "Ethi": "Ñфиопин", + "Geor": "гуьржийн", + "Grek": "грекийн", + "Gujr": "гуджарати", + "Guru": "гурмукхи", + "Hang": "хангыль", + "Hani": "китайн", + "Hans": "атта китайн", + "Hant": "ламаÑтан китайн", + "Hebr": "жугтийн", + "Hira": "хирагана", + "Jpan": "Ñпонийн", + "Kana": "катакана", + "Khmr": "кхмерийн", + "Knda": "каннада", + "Kore": "корейн", + "Laoo": "лаоÑÑийн", + "Latn": "латинан", + "Mlym": "малаÑлийн", + "Mong": "монголийн", + "Mymr": "мьÑнманийн", + "Orya": "ори", + "Sinh": "Ñингалхойн", + "Taml": "тамилхойн", + "Telu": "телугу", + "Thaa": "таана", + "Thai": "тайн", + "Tibt": "тибетхойн", + "Zsym": "Ñимволаш", + "Zxxx": "йоза доцу", + "Zyyy": "маÑÑара а тӀеÑцна", + "Zzzz": "доьвзуш доцу йоза" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/cs.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/cs.json new file mode 100644 index 0000000000000000000000000000000000000000..e1417452aed1a33aaf52da52a23f8b193ece7a6c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/cs.json @@ -0,0 +1,171 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "afaka", + "Aghb": "kavkazskoalbánské", + "Arab": "arabské", + "Armi": "aramejské (imperiální)", + "Armn": "arménské", + "Avst": "avestánské", + "Bali": "balijské", + "Bamu": "bamumské", + "Bass": "bassa vah", + "Batk": "batacké", + "Beng": "bengálské", + "Blis": "Blissovo písmo", + "Bopo": "bopomofo", + "Brah": "bráhmí", + "Brai": "Braillovo písmo", + "Bugi": "buginské", + "Buhd": "buhidské", + "Cakm": "Äakma", + "Cans": "slabiÄné písmo kanadských domorodců", + "Cari": "karijské", + "Cham": "Äam", + "Cher": "Äerokí", + "Cirt": "kirt", + "Copt": "koptské", + "Cprt": "kyperské", + "Cyrl": "cyrilice", + "Cyrs": "cyrilce - staroslovÄ›nská", + "Deva": "dévanágárí", + "Dsrt": "deseret", + "Dupl": "Duployého tÄ›snopis", + "Egyd": "egyptské démotické", + "Egyh": "egyptské hieratické", + "Egyp": "egyptské hieroglyfy", + "Elba": "elbasanské", + "Ethi": "etiopské", + "Geok": "gruzínské chutsuri", + "Geor": "gruzínské", + "Glag": "hlaholice", + "Goth": "gotické", + "Gran": "grantha", + "Grek": "Å™ecké", + "Gujr": "gudžarátí", + "Guru": "gurmukhi", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanunóo", + "Hans": "zjednoduÅ¡ené", + "Hant": "tradiÄní", + "Hebr": "hebrejské", + "Hira": "hiragana", + "Hluw": "anatolské hieroglyfy", + "Hmng": "hmongské", + "Hrkt": "japonské slabiÄné", + "Hung": "staromaÄarské", + "Inds": "harappské", + "Ital": "etruské", + "Jamo": "jamo", + "Java": "javánské", + "Jpan": "japonské", + "Jurc": "džürÄenské", + "Kali": "kayah li", + "Kana": "katakana", + "Khar": "kháróšthí", + "Khmr": "khmerské", + "Khoj": "chodžiki", + "Knda": "kannadské", + "Kore": "korejské", + "Kpel": "kpelle", + "Kthi": "kaithi", + "Lana": "lanna", + "Laoo": "laoské", + "Latf": "latinka - lomená", + "Latg": "latinka - galská", + "Latn": "latinka", + "Lepc": "lepÄské", + "Limb": "limbu", + "Lina": "lineární A", + "Linb": "lineární B", + "Lisu": "Fraserovo", + "Loma": "loma", + "Lyci": "lýkijské", + "Lydi": "lýdské", + "Mahj": "mahádžaní", + "Mand": "mandejské", + "Mani": "manichejské", + "Maya": "mayské hieroglyfy", + "Mend": "mendské", + "Merc": "meroitické psací", + "Mero": "meroitické", + "Mlym": "malajlámské", + "Modi": "modí", + "Mong": "mongolské", + "Moon": "Moonovo", + "Mroo": "mro", + "Mtei": "mejtej majek (manipurské)", + "Mymr": "myanmarské", + "Narb": "staroseveroarabské", + "Nbat": "nabatejské", + "Nkgb": "naxi geba", + "Nkoo": "n’ko", + "Nshu": "nü-Å¡u", + "Ogam": "ogamské", + "Olck": "santálské (ol chiki)", + "Orkh": "orchonské", + "Orya": "urijské", + "Osma": "osmanské", + "Palm": "palmýrské", + "Pauc": "pau cin hau", + "Perm": "staropermské", + "Phag": "phags-pa", + "Phli": "pahlavské klínové", + "Phlp": "pahlavské žalmové", + "Phlv": "pahlavské knižní", + "Phnx": "fénické", + "Plrd": "Pollardova fonetická abeceda", + "Prti": "parthské klínové", + "Rjng": "redžanské", + "Roro": "rongorongo", + "Runr": "runové", + "Samr": "samaÅ™ské", + "Sara": "sarati", + "Sarb": "starojihoarabské", + "Saur": "saurášterské", + "Sgnw": "SignWriting", + "Shaw": "Shawova abeceda", + "Shrd": "šáradá", + "Sidd": "siddham", + "Sind": "chudábádí", + "Sinh": "sinhálské", + "Sora": "sora sompeng", + "Sund": "sundské", + "Sylo": "sylhetské", + "Syrc": "syrské", + "Syre": "syrské - estrangelo", + "Syrj": "syrské - západní", + "Syrn": "syrské - východní", + "Tagb": "tagbanwa", + "Takr": "takrí", + "Tale": "tai le", + "Talu": "tai lü nové", + "Taml": "tamilské", + "Tang": "tangut", + "Tavt": "tai viet", + "Telu": "telugské", + "Teng": "tengwar", + "Tfng": "berberské", + "Tglg": "tagalské", + "Thaa": "thaana", + "Thai": "thajské", + "Tibt": "tibetské", + "Tirh": "tirhuta", + "Ugar": "ugaritské klínové", + "Vaii": "vai", + "Visp": "viditelná Å™eÄ", + "Wara": "varang kÅ¡iti", + "Wole": "karolínské (woleai)", + "Xpeo": "staroperské klínové písmo", + "Xsux": "sumero-akkadské klínové písmo", + "Yiii": "yi", + "Zmth": "matematický zápis", + "Zsye": "emodži", + "Zsym": "symboly", + "Zxxx": "bez zápisu", + "Zyyy": "obecné", + "Zzzz": "neznámé písmo" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/cy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/cy.json new file mode 100644 index 0000000000000000000000000000000000000000..e171b8547ebee016490a90a9d7c4b3d5fa7c4ed1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/cy.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.30.6", + "Names": { + "Arab": "Arabaidd", + "Armn": "Armenaidd", + "Beng": "Bengalaidd", + "Bopo": "Bopomofo", + "Brai": "Braille", + "Cyrl": "Cyrilig", + "Deva": "Devanagari", + "Ethi": "Ethiopig", + "Geor": "Georgaidd", + "Grek": "Groegaidd", + "Gujr": "Gwjarataidd", + "Guru": "Gwrmwci", + "Hanb": "Hanb", + "Hang": "Hangul", + "Hani": "Han", + "Hans": "Symledig", + "Hant": "Traddodiadol", + "Hebr": "Hebreig", + "Hira": "Hiragana", + "Hrkt": "Syllwyddor Japaneaidd", + "Jamo": "Jamo", + "Jpan": "Japaneaidd", + "Kana": "Catacana", + "Khmr": "Chmeraidd", + "Knda": "Canaraidd", + "Kore": "Coreaidd", + "Laoo": "Laoaidd", + "Latn": "Lladin", + "Mlym": "Malayalamaidd", + "Mong": "Mongolaidd", + "Mymr": "Myanmaraidd", + "Ogam": "Ogam", + "Orya": "Orïaidd", + "Sinh": "Sinhanaidd", + "Taml": "Tamilaidd", + "Telu": "Telugu", + "Thaa": "Thaana", + "Thai": "Tai", + "Tibt": "Tibetaidd", + "Zmth": "Nodiant Mathemategol", + "Zsye": "Emoji", + "Zsym": "Symbolau", + "Zxxx": "Anysgrifenedig", + "Zyyy": "Cyffredin", + "Zzzz": "Sgript anhysbys" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/da.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/da.json new file mode 100644 index 0000000000000000000000000000000000000000..8198921dca5522d5e7667ae540709f6f10ab7f15 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/da.json @@ -0,0 +1,166 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "afaka", + "Arab": "arabisk", + "Armi": "armi", + "Armn": "armensk", + "Avst": "avestansk", + "Bali": "balinesisk", + "Bamu": "bamum", + "Bass": "bassa", + "Batk": "batak", + "Beng": "bengali", + "Blis": "blissymboler", + "Bopo": "bopomofo", + "Brah": "bramisk", + "Brai": "brailleskrift", + "Bugi": "buginesisk", + "Buhd": "buhid", + "Cakm": "cakm", + "Cans": "oprindelige canadiske symboler", + "Cari": "kariansk", + "Cham": "cham", + "Cher": "cherokee", + "Cirt": "cirt", + "Copt": "koptisk", + "Cprt": "cypriotisk", + "Cyrl": "kyrillisk", + "Cyrs": "kyrillisk - oldkirkeslavisk variant", + "Deva": "devanagari", + "Dsrt": "deseret", + "Dupl": "Duploya-stenografi", + "Egyd": "egyptisk demotisk", + "Egyh": "egyptisk hieratisk", + "Egyp": "egyptiske hieroglyffer", + "Ethi": "etiopisk", + "Geok": "georgisk kutsuri", + "Geor": "georgisk", + "Glag": "glagolitisk", + "Goth": "gotisk", + "Gran": "grantha", + "Grek": "græsk", + "Gujr": "gujarati", + "Guru": "gurmukhi", + "Hanb": "han med bopomofo", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanunoo", + "Hans": "forenklet", + "Hant": "traditionelt", + "Hebr": "hebraisk", + "Hira": "hiragana", + "Hluw": "anatolske hieroglyffer", + "Hmng": "pahawh hmong", + "Hrkt": "japanske skrifttegn", + "Hung": "oldungarsk", + "Inds": "indus", + "Ital": "Olditalisk", + "Jamo": "jamo", + "Java": "javanesisk", + "Jpan": "japansk", + "Jurc": "jurchen", + "Kali": "kaya li", + "Kana": "katakana", + "Khar": "kharoshti", + "Khmr": "khmer", + "Khoj": "khojki", + "Knda": "kannada", + "Kore": "koreansk", + "Kpel": "kpelle", + "Kthi": "kthi", + "Lana": "lanna", + "Laoo": "lao", + "Latf": "latinsk - frakturvariant", + "Latg": "latinsk - gælisk variant", + "Latn": "latinsk", + "Lepc": "lepcha", + "Limb": "limbu", + "Lina": "lineær A", + "Linb": "lineær B", + "Lisu": "lisu", + "Loma": "loma", + "Lyci": "lykisk", + "Lydi": "lydisk", + "Mand": "mandaisk", + "Mani": "manikæisk", + "Maya": "mayahieroglyffer", + "Mend": "mende", + "Merc": "metroitisk sammenhængende", + "Mero": "meroitisk", + "Mlym": "malayalam", + "Mong": "mongolsk", + "Moon": "moon", + "Mroo": "mroo", + "Mtei": "meitei-mayek", + "Mymr": "burmesisk", + "Narb": "gammelt nordarabisk", + "Nbat": "nabateisk", + "Nkgb": "nakhi geba", + "Nkoo": "n’ko", + "Nshu": "nüshu", + "Ogam": "ogham", + "Olck": "ol-chiki", + "Orkh": "orkhon", + "Orya": "oriya", + "Osma": "osmannisk", + "Palm": "palmyrensk", + "Perm": "oldpermisk", + "Phag": "phags-pa", + "Phli": "phli", + "Phlp": "phlp", + "Phlv": "pahlavi", + "Phnx": "fønikisk", + "Plrd": "pollardtegn", + "Prti": "prti", + "Rjng": "rejang", + "Roro": "rongo-rongo", + "Runr": "runer", + "Samr": "samaritansk", + "Sara": "sarati", + "Sarb": "oldsørarabisk", + "Saur": "saurashtra", + "Sgnw": "tegnskrift", + "Shaw": "shavisk", + "Shrd": "sharada", + "Sind": "khudawadi", + "Sinh": "singalesisk", + "Sora": "sora", + "Sund": "sundanesisk", + "Sylo": "syloti nagri", + "Syrc": "syrisk", + "Syre": "syrisk - estrangelovariant", + "Syrj": "vestsyrisk", + "Syrn": "østsyriakisk", + "Tagb": "tagbanwa", + "Takr": "takri", + "Tale": "tai le", + "Talu": "tai lue", + "Taml": "tamilsk", + "Tang": "tangut", + "Tavt": "tavt", + "Telu": "telugu", + "Teng": "tengwar", + "Tfng": "tifinagh", + "Tglg": "tagalog", + "Thaa": "thaana", + "Thai": "thailandsk", + "Tibt": "tibetansk", + "Tirh": "tirhuta", + "Ugar": "ugaritisk", + "Vaii": "vai", + "Visp": "synlig tale", + "Wara": "varang kshiti", + "Wole": "woleai", + "Xpeo": "oldpersisk", + "Xsux": "sumero-akkadisk cuneiform", + "Yiii": "yi", + "Zinh": "arvet", + "Zmth": "matematisk notation", + "Zsye": "emoji", + "Zsym": "symboler", + "Zxxx": "uden skriftsprog", + "Zyyy": "fælles", + "Zzzz": "ukendt skriftsprog" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/de.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/de.json new file mode 100644 index 0000000000000000000000000000000000000000..02817c0b1d1486672d644c3323c3e92201007ded --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/de.json @@ -0,0 +1,172 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "Afaka", + "Aghb": "Kaukasisch-Albanisch", + "Arab": "Arabisch", + "Armi": "Armi", + "Armn": "Armenisch", + "Avst": "Avestisch", + "Bali": "Balinesisch", + "Bamu": "Bamun", + "Bass": "Bassa", + "Batk": "Battakisch", + "Beng": "Bengalisch", + "Blis": "Bliss-Symbole", + "Bopo": "Bopomofo", + "Brah": "Brahmi", + "Brai": "Blindenschrift", + "Bugi": "Buginesisch", + "Buhd": "Buhid", + "Cakm": "Chakma", + "Cans": "UCAS", + "Cari": "Karisch", + "Cham": "Cham", + "Cher": "Cherokee", + "Cirt": "Cirth", + "Copt": "Koptisch", + "Cprt": "Zypriotisch", + "Cyrl": "Kyrillisch", + "Cyrs": "Altkirchenslawisch", + "Deva": "Devanagari", + "Dsrt": "Deseret", + "Dupl": "Duployanisch", + "Egyd": "Ägyptisch - Demotisch", + "Egyh": "Ägyptisch - Hieratisch", + "Egyp": "Ägyptische Hieroglyphen", + "Elba": "Elbasanisch", + "Ethi": "Äthiopisch", + "Geok": "Khutsuri", + "Geor": "Georgisch", + "Glag": "Glagolitisch", + "Goth": "Gotisch", + "Gran": "Grantha", + "Grek": "Griechisch", + "Gujr": "Gujarati", + "Guru": "Gurmukhi", + "Hanb": "Hanb", + "Hang": "Hangul", + "Hani": "Chinesisch", + "Hano": "Hanunoo", + "Hans": "Vereinfacht", + "Hant": "Traditionell", + "Hebr": "Hebräisch", + "Hira": "Hiragana", + "Hluw": "Hieroglyphen-Luwisch", + "Hmng": "Pahawh Hmong", + "Hrkt": "Japanische Silbenschrift", + "Hung": "Altungarisch", + "Inds": "Indus-Schrift", + "Ital": "Altitalisch", + "Jamo": "Jamo", + "Java": "Javanesisch", + "Jpan": "Japanisch", + "Jurc": "Jurchen", + "Kali": "Kayah Li", + "Kana": "Katakana", + "Khar": "Kharoshthi", + "Khmr": "Khmer", + "Khoj": "Khojki", + "Knda": "Kannada", + "Kore": "Koreanisch", + "Kpel": "Kpelle", + "Kthi": "Kaithi", + "Lana": "Lanna", + "Laoo": "Laotisch", + "Latf": "Lateinisch - Fraktur-Variante", + "Latg": "Lateinisch - Gälische Variante", + "Latn": "Lateinisch", + "Lepc": "Lepcha", + "Limb": "Limbu", + "Lina": "Linear A", + "Linb": "Linear B", + "Lisu": "Fraser", + "Loma": "Loma", + "Lyci": "Lykisch", + "Lydi": "Lydisch", + "Mahj": "Mahajani", + "Mand": "Mandäisch", + "Mani": "Manichäisch", + "Maya": "Maya-Hieroglyphen", + "Mend": "Mende", + "Merc": "Meroitisch kursiv", + "Mero": "Meroitisch", + "Mlym": "Malayalam", + "Modi": "Modi", + "Mong": "Mongolisch", + "Moon": "Moon", + "Mroo": "Mro", + "Mtei": "Meitei Mayek", + "Mymr": "Birmanisch", + "Narb": "Altnordarabisch", + "Nbat": "Nabatäisch", + "Nkgb": "Geba", + "Nkoo": "N’Ko", + "Nshu": "Frauenschrift", + "Ogam": "Ogham", + "Olck": "Ol Chiki", + "Orkh": "Orchon-Runen", + "Orya": "Oriya", + "Osma": "Osmanisch", + "Palm": "Palmyrenisch", + "Pauc": "Pau Cin Hau", + "Perm": "Altpermisch", + "Phag": "Phags-pa", + "Phli": "Buch-Pahlavi", + "Phlp": "Psalter-Pahlavi", + "Phlv": "Pahlavi", + "Phnx": "Phönizisch", + "Plrd": "Pollard Phonetisch", + "Prti": "Parthisch", + "Rjng": "Rejang", + "Roro": "Rongorongo", + "Runr": "Runenschrift", + "Samr": "Samaritanisch", + "Sara": "Sarati", + "Sarb": "Altsüdarabisch", + "Saur": "Saurashtra", + "Sgnw": "Gebärdensprache", + "Shaw": "Shaw-Alphabet", + "Shrd": "Sharada", + "Sidd": "Siddham", + "Sind": "Khudawadi", + "Sinh": "Singhalesisch", + "Sora": "Sora Sompeng", + "Sund": "Sundanesisch", + "Sylo": "Syloti Nagri", + "Syrc": "Syrisch", + "Syre": "Syrisch - Estrangelo-Variante", + "Syrj": "Westsyrisch", + "Syrn": "Ostsyrisch", + "Tagb": "Tagbanwa", + "Takr": "Takri", + "Tale": "Tai Le", + "Talu": "Tai Lue", + "Taml": "Tamilisch", + "Tang": "Xixia", + "Tavt": "Tai-Viet", + "Telu": "Telugu", + "Teng": "Tengwar", + "Tfng": "Tifinagh", + "Tglg": "Tagalog", + "Thaa": "Thaana", + "Thai": "Thai", + "Tibt": "Tibetisch", + "Tirh": "Tirhuta", + "Ugar": "Ugaritisch", + "Vaii": "Vai", + "Visp": "Sichtbare Sprache", + "Wara": "Varang Kshiti", + "Wole": "Woleaianisch", + "Xpeo": "Altpersisch", + "Xsux": "Sumerisch-akkadische Keilschrift", + "Yiii": "Yi", + "Zinh": "Geerbter Schriftwert", + "Zmth": "Mathematische Notation", + "Zsye": "Emoji", + "Zsym": "Symbole", + "Zxxx": "Schriftlos", + "Zyyy": "Verbreitet", + "Zzzz": "Unbekannte Schrift" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/dz.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/dz.json new file mode 100644 index 0000000000000000000000000000000000000000..b058623eff63c4645f8085502ab31df844fceef4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/dz.json @@ -0,0 +1,44 @@ +{ + "Version": "2.1.29.61", + "Names": { + "Arab": "ཨེ་ར་བིཀ་ཡིག་གུ", + "Armn": "ཨར་མི་ནི་ཡཱན་ཡིག་གུ", + "Beng": "བངྒ་ལ་ཡིག་གུ", + "Bopo": "བོ་པོ་མོ་ཕཱོ་ཡིག་གུ", + "Brai": "འབུར་ཡིག", + "Cyrl": "སིརིལ་ལིཀ་ཡིག་གུ", + "Deva": "དེ་à½à¼‹à½“་ག་རི་ཡིག་གུ", + "Ethi": "ཨི་à½à½²à¼‹à½¡à½¼à¼‹à½”ིཀ྄་ཡིག་གུ", + "Geor": "ཇཽ་ཇི་ཡཱན་ཡིག་གུ", + "Grek": "གྲིཀ་ཡིག་གུ", + "Gujr": "གུ་ཇ་ར་à½à½²à¼‹à½¡à½²à½‚་གུ", + "Guru": "གུ་རུ་མུ་à½à¼‹à½¡à½²à½‚་གུ", + "Hang": "ཧཱན་གུལ་ཡིག་གུ", + "Hani": "རྒྱ་ནག་ཡིག་གུ", + "Hans": "རྒྱ་ཡིག་ ལུགས་གསར་", + "Hant": "ལུགས་རྙིང་ རྒྱ་ཡིག", + "Hebr": "ཧེ་བྲུ་ཡིག་གུ", + "Hira": "ཇ་པཱན་གྱི་ཧི་ར་ག་ན་ཡིག་གུ", + "Jpan": "ཇ་པཱན་ཡིག་གུ", + "Kana": "ཇ་པཱན་གྱི་ཀ་à½à¼‹à½€à¼‹à½“་ཡིག་གུ", + "Khmr": "à½à½ºà¼‹à½˜à½ºà½¢à¼‹à½¡à½²à½‚་གུ", + "Knda": "ཀ་ན་ཌ་ཡིག་གུ", + "Kore": "ཀོ་རི་ཡཱན་ཡིག་གུ", + "Laoo": "ལའོ་ཡིག་གུ", + "Latn": "ལེ་ཊིན་ཡིག་གུ", + "Mlym": "མ་ལ་ཡ་ལམ་ཡིག་གུ", + "Mong": "སོག་པོའི་ཡིག་གུ", + "Mymr": "བར་མིས་ཡིག་གུ", + "Orya": "ཨོ་རི་ཡ་ཡིག་གུ", + "Sinh": "སིན་ཧ་ལ་རིག་གུ", + "Taml": "à½à¼‹à½˜à½²à½£à¼‹à½¡à½²à½‚་གུ", + "Telu": "à½à½ºà¼‹à½£à½´à¼‹à½‚ུ་ཡིག་གུ", + "Thaa": "à½à½±à¼‹à½“་ཡིག་གུ", + "Thai": "à½à½±à½ à½²à¼‹à½¡à½²à½‚་གུ", + "Tibt": "ང་བཅས་ཀྱི་ཡིག་གུ", + "Zsym": "མཚན་རྟགས", + "Zxxx": "ཡིག་à½à½¼à½‚་མ་བཀོདཔ", + "Zyyy": "སྤྱིཡིག", + "Zzzz": "ངོ་མ་ཤེས་པའི་ཡི་གུ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ee.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ee.json new file mode 100644 index 0000000000000000000000000000000000000000..2c9ab7c9a8c9e1f3b82c170b2e0bd8c6e10db761 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ee.json @@ -0,0 +1,44 @@ +{ + "Version": "2.1.28.76", + "Names": { + "Arab": "ArabiagbeŋɔŋlÉ”", + "Armn": "armeniagbeŋɔŋlÉ”", + "Beng": "bengaligbeŋɔŋlÉ”", + "Bopo": "bopomfogbeŋɔŋlÉ”", + "Brai": "braillegbeŋɔŋlÉ”", + "Cyrl": "CyrillicgbeŋɔŋlÉ”", + "Deva": "devanagarigbeŋɔŋlÉ”", + "Ethi": "ethiopiagbeŋɔŋlÉ”", + "Geor": "gÉ”giagbeŋɔŋlÉ”", + "Grek": "grisigbeŋɔŋlÉ”", + "Gujr": "gudzaratigbeŋɔŋlÉ”", + "Guru": "gurmukhigbeŋɔŋlÉ”", + "Hang": "hangulgbeŋɔŋlÉ”", + "Hani": "hangbeŋɔŋlÉ”", + "Hans": "ChinesegbeŋɔŋlÉ”", + "Hant": "Blema ChinesegbeŋɔŋlÉ”", + "Hebr": "hebrigbeŋɔŋlÉ”", + "Hira": "hiraganagbeŋɔŋlÉ”", + "Jpan": "JapanesegbeŋɔŋlÉ”", + "Kana": "katakanagbeŋɔŋlÉ”", + "Khmr": "khmergbeŋɔŋlÉ”", + "Knda": "kannadagbeŋɔŋlÉ”", + "Kore": "KoreagbeŋɔŋlÉ”", + "Laoo": "laogbeŋɔŋlÉ”", + "Latn": "LatingbeŋɔŋlÉ”", + "Mlym": "malayagbeŋɔŋlÉ”", + "Mong": "mongoliagbeŋɔŋlÉ”", + "Mymr": "myanmargbeŋɔŋlÉ”", + "Orya": "oriyagbeŋɔŋlÉ”", + "Sinh": "sinhalagbeŋɔŋlÉ”", + "Taml": "tamilgbeŋɔŋlÉ”", + "Telu": "telegugbeŋɔŋlÉ”", + "Thaa": "thaanagbeŋɔŋlÉ”", + "Thai": "taigbeŋɔŋlÉ”", + "Tibt": "tibetgbeŋɔŋlÉ”", + "Zsym": "ŋɔŋlÉ”dzesiwo", + "Zxxx": "gbemaÅ‹lÉ”", + "Zyyy": "gbeŋɔŋlÉ” bÉ”bÉ”", + "Zzzz": "gbeŋɔŋlÉ” manya" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/el.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/el.json new file mode 100644 index 0000000000000000000000000000000000000000..cb27c79e4785d2d8b9db7af9917d9e2deefd0c53 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/el.json @@ -0,0 +1,138 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "ΑÏαβικό", + "Armi": "ΑυτοκÏατοÏικό ΑÏαμαϊκό", + "Armn": "ΑÏμενικό", + "Avst": "Αβεστάν", + "Bali": "Μπαλινίζ", + "Batk": "Μπατάκ", + "Beng": "Μπενγκάλι", + "Blis": "ΣÏμβολα Bliss", + "Bopo": "Μποπομόφο", + "Brah": "ΜπÏαχμί", + "Brai": "ΜπÏάιγ", + "Bugi": "ΜποÏγκις", + "Buhd": "Μπουχίντ", + "Cakm": "Τσάκμα", + "Cans": "Ενοποιημένοι Καναδεζικοί Συλλαβισμοί Ιθαγενών", + "Cari": "ΚαÏιάν", + "Cham": "Τσαμ", + "Cher": "ΤσεÏόκι", + "Cirt": "ΣεÏθ", + "Copt": "Κοπτικό", + "Cprt": "ΚυπÏιακό", + "Cyrl": "ΚυÏιλλικό", + "Cyrs": "Παλαιό Εκκλησιαστικό Σλαβικό ΚυÏιλλικό", + "Deva": "ÎτεβαναγκάÏι", + "Dsrt": "ÎτεσεÏέ", + "Egyd": "Λαϊκό Αιγυπτιακό", + "Egyh": "ΙεÏατικό Αιγυπτιακό", + "Egyp": "Αιγυπτιακά ΙεÏογλυφικά", + "Ethi": "Αιθιοπικό", + "Geok": "ΓεωÏγιανό ΚχουτσοÏÏι", + "Geor": "ΓεωÏγιανό", + "Glag": "Γκλαγκολιτικό", + "Goth": "Γοτθικό", + "Grek": "Ελληνικό", + "Gujr": "ΓκουγιαÏάτι", + "Guru": "ΓκουÏμουκχί", + "Hanb": "Χανμπ", + "Hang": "ΧανγκοÏλ", + "Hani": "Χαν", + "Hano": "ΧανοÏνου", + "Hans": "Απλοποιημένο", + "Hant": "ΠαÏαδοσιακό", + "Hebr": "ΕβÏαϊκό", + "Hira": "ΧιÏαγκάνα", + "Hmng": "Παχάχ Χμονγκ", + "Hrkt": "Κατακάνα ή ΧιÏαγκάνα", + "Hung": "Παλαιό ΟυγγÏικό", + "Inds": "Ίνδους", + "Ital": "Παλαιό Ιταλικό", + "Jamo": "Τζάμο", + "Java": "Ιαβανεζικό", + "Jpan": "Ιαπωνικό", + "Kali": "Καγιάχ Λι", + "Kana": "Κατακάνα", + "Khar": "ΚαÏόσθι", + "Khmr": "ΧμεÏ", + "Knda": "Κανάντα", + "Kore": "ΚοÏεατικό", + "Kthi": "Καϊθί", + "Lana": "Λάννα", + "Laoo": "Λάος", + "Latf": "ΦÏÎ¬ÎºÏ„Î¿Ï…Ï Î›Î±Ï„Î¹Î½Î¹ÎºÏŒ", + "Latg": "Γαελικό Λατινικό", + "Latn": "Λατινικό", + "Lepc": "Λέπτσα", + "Limb": "ΛιμποÏ", + "Lina": "ΓÏαμμικό Α", + "Linb": "ΓÏαμμικό Î’", + "Lyci": "Λυκιανικό", + "Lydi": "Λυδιανικό", + "Mand": "Μανδαϊκό", + "Mani": "Μανιχαϊκό", + "Maya": "ΙεÏογλυφικά Μάγια", + "Mero": "ΜεÏοϊτικό", + "Mlym": "Μαλαγιάλαμ", + "Mong": "Μογγολικό", + "Moon": "Μουν", + "Mtei": "Μεϊτέι Μάγεκ", + "Mymr": "ΜιανμάÏ", + "Nkoo": "Î’Κο", + "Ogam": "Όγκχαμ", + "Olck": "Ολ Τσίκι", + "Orkh": "ÎŒÏκχον", + "Orya": "ΟÏίγια", + "Osma": "Οσμάνγια", + "Perm": "Παλαιό ΠεÏμικό", + "Phag": "Παγκς-πα", + "Phli": "ΕπιγÏαφικό Παχλάβι", + "Phlp": "Î¨Î¬Î»Ï„ÎµÏ Î Î±Ï‡Î»Î¬Î²Î¹", + "Phlv": "Μπουκ Παχλαβί", + "Phnx": "Φοινικικό", + "Plrd": "Φωνητικό ΠόλαÏντ", + "Prti": "ΕπιγÏαφικό ΠαÏθιάν", + "Rjng": "Ρετζάνγκ", + "Roro": "ΡονγκοÏόνγκο", + "Runr": "Ρουνίκ", + "Samr": "ΣαμαÏιτικό", + "Sara": "ΣαÏάθι", + "Saur": "ΣαουÏάστÏα", + "Sgnw": "Îοηματική γÏαφή", + "Shaw": "Σαβιανό", + "Sinh": "Σινχάλα", + "Sund": "Σουνδανικό", + "Sylo": "Συλότι ÎάγκÏι", + "Syrc": "ΣυÏιακό", + "Syre": "ΕστÏαντζέλο ΣυÏιακό", + "Syrj": "Δυτικό ΣυÏιακό", + "Syrn": "Ανατολικό ΣυÏιακό", + "Tagb": "Ταγκμάνγουα", + "Tale": "Τάι Λε", + "Talu": "Îέο Τάι ΛοÏε", + "Taml": "Ταμίλ", + "Tavt": "Τάι Βιέτ", + "Telu": "ΤελοÏγκου", + "Teng": "ΤεγνγουάÏ", + "Tfng": "Τιφινάγκ", + "Tglg": "Ταγκαλόγκ", + "Thaa": "Θαανά", + "Thai": "Ταϊλανδικό", + "Tibt": "Θιβετιανό", + "Ugar": "ΟυγκαÏιτικό", + "Vaii": "Βάι", + "Visp": "ΟÏατή ομιλία", + "Xpeo": "Παλαιό ΠεÏσικό", + "Xsux": "ΣοÏμεÏο-Ακάντιαν ΚουνεϊφόÏμ", + "Yiii": "Γι", + "Zinh": "ΚληÏονομημένο", + "Zmth": "Μαθηματική σημειογÏαφία", + "Zsye": "Zsye", + "Zsym": "ΣÏμβολα", + "Zxxx": "ΆγÏαφο", + "Zyyy": "Κοινό", + "Zzzz": "Άγνωστη γÏαφή" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/en.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/en.json new file mode 100644 index 0000000000000000000000000000000000000000..829edf793b0e7bb659a152155d3ca85717d59058 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/en.json @@ -0,0 +1,180 @@ +{ + "Version": "2.1.30.50", + "Names": { + "Adlm": "Adlam", + "Afak": "Afaka", + "Aghb": "Caucasian Albanian", + "Ahom": "Ahom", + "Arab": "Arabic", + "Armi": "Imperial Aramaic", + "Armn": "Armenian", + "Avst": "Avestan", + "Bali": "Balinese", + "Bamu": "Bamum", + "Bass": "Bassa Vah", + "Batk": "Batak", + "Beng": "Bangla", + "Bhks": "Bhaiksuki", + "Blis": "Blissymbols", + "Bopo": "Bopomofo", + "Brah": "Brahmi", + "Brai": "Braille", + "Bugi": "Buginese", + "Buhd": "Buhid", + "Cakm": "Chakma", + "Cans": "Unified Canadian Aboriginal Syllabics", + "Cari": "Carian", + "Cham": "Cham", + "Cher": "Cherokee", + "Cirt": "Cirth", + "Copt": "Coptic", + "Cprt": "Cypriot", + "Cyrl": "Cyrillic", + "Cyrs": "Old Church Slavonic Cyrillic", + "Deva": "Devanagari", + "Dsrt": "Deseret", + "Dupl": "Duployan shorthand", + "Egyd": "Egyptian demotic", + "Egyh": "Egyptian hieratic", + "Egyp": "Egyptian hieroglyphs", + "Elba": "Elbasan", + "Ethi": "Ethiopic", + "Geok": "Georgian Khutsuri", + "Geor": "Georgian", + "Glag": "Glagolitic", + "Goth": "Gothic", + "Gran": "Grantha", + "Grek": "Greek", + "Gujr": "Gujarati", + "Guru": "Gurmukhi", + "Hanb": "Han with Bopomofo", + "Hang": "Hangul", + "Hani": "Han", + "Hano": "Hanunoo", + "Hans": "Simplified", + "Hant": "Traditional", + "Hatr": "Hatran", + "Hebr": "Hebrew", + "Hira": "Hiragana", + "Hluw": "Anatolian Hieroglyphs", + "Hmng": "Pahawh Hmong", + "Hrkt": "Japanese syllabaries", + "Hung": "Old Hungarian", + "Inds": "Indus", + "Ital": "Old Italic", + "Jamo": "Jamo", + "Java": "Javanese", + "Jpan": "Japanese", + "Jurc": "Jurchen", + "Kali": "Kayah Li", + "Kana": "Katakana", + "Khar": "Kharoshthi", + "Khmr": "Khmer", + "Khoj": "Khojki", + "Knda": "Kannada", + "Kore": "Korean", + "Kpel": "Kpelle", + "Kthi": "Kaithi", + "Lana": "Lanna", + "Laoo": "Lao", + "Latf": "Fraktur Latin", + "Latg": "Gaelic Latin", + "Latn": "Latin", + "Lepc": "Lepcha", + "Limb": "Limbu", + "Lina": "Linear A", + "Linb": "Linear B", + "Lisu": "Fraser", + "Loma": "Loma", + "Lyci": "Lycian", + "Lydi": "Lydian", + "Mahj": "Mahajani", + "Mand": "Mandaean", + "Mani": "Manichaean", + "Marc": "Marchen", + "Maya": "Mayan hieroglyphs", + "Mend": "Mende", + "Merc": "Meroitic Cursive", + "Mero": "Meroitic", + "Mlym": "Malayalam", + "Modi": "Modi", + "Mong": "Mongolian", + "Moon": "Moon", + "Mroo": "Mro", + "Mtei": "Meitei Mayek", + "Mult": "Multani", + "Mymr": "Myanmar", + "Narb": "Old North Arabian", + "Nbat": "Nabataean", + "Newa": "Newa", + "Nkgb": "Naxi Geba", + "Nkoo": "N’Ko", + "Nshu": "Nüshu", + "Ogam": "Ogham", + "Olck": "Ol Chiki", + "Orkh": "Orkhon", + "Orya": "Odia", + "Osge": "Osage", + "Osma": "Osmanya", + "Palm": "Palmyrene", + "Pauc": "Pau Cin Hau", + "Perm": "Old Permic", + "Phag": "Phags-pa", + "Phli": "Inscriptional Pahlavi", + "Phlp": "Psalter Pahlavi", + "Phlv": "Book Pahlavi", + "Phnx": "Phoenician", + "Plrd": "Pollard Phonetic", + "Prti": "Inscriptional Parthian", + "Rjng": "Rejang", + "Roro": "Rongorongo", + "Runr": "Runic", + "Samr": "Samaritan", + "Sara": "Sarati", + "Sarb": "Old South Arabian", + "Saur": "Saurashtra", + "Sgnw": "SignWriting", + "Shaw": "Shavian", + "Shrd": "Sharada", + "Sidd": "Siddham", + "Sind": "Khudawadi", + "Sinh": "Sinhala", + "Sora": "Sora Sompeng", + "Sund": "Sundanese", + "Sylo": "Syloti Nagri", + "Syrc": "Syriac", + "Syre": "Estrangelo Syriac", + "Syrj": "Western Syriac", + "Syrn": "Eastern Syriac", + "Tagb": "Tagbanwa", + "Takr": "Takri", + "Tale": "Tai Le", + "Talu": "New Tai Lue", + "Taml": "Tamil", + "Tang": "Tangut", + "Tavt": "Tai Viet", + "Telu": "Telugu", + "Teng": "Tengwar", + "Tfng": "Tifinagh", + "Tglg": "Tagalog", + "Thaa": "Thaana", + "Thai": "Thai", + "Tibt": "Tibetan", + "Tirh": "Tirhuta", + "Ugar": "Ugaritic", + "Vaii": "Vai", + "Visp": "Visible Speech", + "Wara": "Varang Kshiti", + "Wole": "Woleai", + "Xpeo": "Old Persian", + "Xsux": "Sumero-Akkadian Cuneiform", + "Yiii": "Yi", + "Zinh": "Inherited", + "Zmth": "Mathematical Notation", + "Zsye": "Emoji", + "Zsym": "Symbols", + "Zxxx": "Unwritten", + "Zyyy": "Common", + "Zzzz": "Unknown Script" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/en_IN.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/en_IN.json new file mode 100644 index 0000000000000000000000000000000000000000..0f07ea1a596c988d3927fffed2eb03714c8f6a26 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/en_IN.json @@ -0,0 +1,7 @@ +{ + "Version": "2.1.27.99", + "Names": { + "Beng": "Bengali", + "Orya": "Oriya" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/es.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/es.json new file mode 100644 index 0000000000000000000000000000000000000000..f0a4b5a2767e2c1a3efc2f5462780286bb0b5574 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/es.json @@ -0,0 +1,128 @@ +{ + "Version": "2.1.28.80", + "Names": { + "Arab": "árabe", + "Armn": "armenio", + "Avst": "avéstico", + "Bali": "balinés", + "Batk": "batak", + "Beng": "bengalí", + "Blis": "símbolos blis", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "braille", + "Bugi": "buginés", + "Buhd": "buhid", + "Cans": "símbolos aborígenes canadienses unificados", + "Cari": "cario", + "Cham": "cham", + "Cher": "cherokee", + "Cirt": "cirth", + "Copt": "copto", + "Cprt": "chipriota", + "Cyrl": "cirílico", + "Cyrs": "cirílico del antiguo eslavo eclesiástico", + "Deva": "devanagari", + "Dsrt": "deseret", + "Egyd": "egipcio demótico", + "Egyh": "egipcio hierático", + "Egyp": "jeroglíficos egipcios", + "Ethi": "etiópico", + "Geok": "georgiano eclesiástico", + "Geor": "georgiano", + "Glag": "glagolítico", + "Goth": "gótico", + "Grek": "griego", + "Gujr": "gujarati", + "Guru": "gurmuji", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanunoo", + "Hans": "simplificado", + "Hant": "tradicional", + "Hebr": "hebreo", + "Hira": "hiragana", + "Hmng": "pahawh hmong", + "Hrkt": "silabarios japoneses", + "Hung": "húngaro antiguo", + "Inds": "Indio (harappan)", + "Ital": "antigua bastardilla", + "Jamo": "jamo", + "Java": "javanés", + "Jpan": "japonés", + "Kali": "kayah li", + "Kana": "katakana", + "Khar": "kharosthi", + "Khmr": "jemer", + "Knda": "canarés", + "Kore": "coreano", + "Lana": "lanna", + "Laoo": "laosiano", + "Latf": "latino fraktur", + "Latg": "latino gaélico", + "Latn": "latino", + "Lepc": "lepcha", + "Limb": "limbu", + "Lina": "lineal A", + "Linb": "lineal B", + "Lyci": "licio", + "Lydi": "lidio", + "Mand": "mandeo", + "Maya": "jeroglíficos mayas", + "Mero": "meroítico", + "Mlym": "malayálam", + "Mong": "mongol", + "Moon": "moon", + "Mtei": "manipuri", + "Mymr": "birmano", + "Nkoo": "n’ko", + "Ogam": "ogham", + "Olck": "ol ciki", + "Orkh": "orkhon", + "Orya": "oriya", + "Osma": "osmaniya", + "Perm": "permiano antiguo", + "Phag": "phags-pa", + "Phnx": "fenicio", + "Plrd": "Pollard Miao", + "Rjng": "rejang", + "Roro": "rongo-rongo", + "Runr": "rúnico", + "Sara": "sarati", + "Saur": "saurashtra", + "Sgnw": "SignWriting", + "Shaw": "shaviano", + "Sinh": "cingalés", + "Sund": "sundanés", + "Sylo": "syloti nagri", + "Syrc": "siriaco", + "Syre": "siriaco estrangelo", + "Syrj": "siriaco occidental", + "Syrn": "siriaco oriental", + "Tagb": "tagbanúa", + "Tale": "tai le", + "Talu": "nuevo tai lue", + "Taml": "tamil", + "Telu": "telugu", + "Teng": "tengwar", + "Tfng": "tifinagh", + "Tglg": "tagalo", + "Thaa": "thaana", + "Thai": "tailandés", + "Tibt": "tibetano", + "Ugar": "ugarítico", + "Vaii": "vai", + "Visp": "lenguaje visible", + "Xpeo": "persa antiguo", + "Xsux": "cuneiforme sumerio-acadio", + "Yiii": "yi", + "Zinh": "heredado", + "Zmth": "notación matemática", + "Zsye": "emojis", + "Zsym": "símbolos", + "Zxxx": "no escrito", + "Zyyy": "común", + "Zzzz": "alfabeto desconocido" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/es_419.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/es_419.json new file mode 100644 index 0000000000000000000000000000000000000000..00f18e9b47b44e17d779a124f5ce9a83d2688292 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/es_419.json @@ -0,0 +1,8 @@ +{ + "Version": "2.1.27.99", + "Names": { + "Hrkt": "katakana o hiragana", + "Laoo": "lao", + "Latn": "latín" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/es_MX.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/es_MX.json new file mode 100644 index 0000000000000000000000000000000000000000..d5c594996d9523def96b6f0bb4b533c36b911f82 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/es_MX.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.28.76", + "Names": { + "Telu": "telugú" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/et.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/et.json new file mode 100644 index 0000000000000000000000000000000000000000..b626923f5c6dfca312cce70b090a3444cea10aab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/et.json @@ -0,0 +1,174 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "afaka", + "Aghb": "albaani", + "Ahom": "ahomi", + "Arab": "araabia", + "Armi": "vanaaramea", + "Armn": "armeenia", + "Avst": "avesta", + "Bali": "bali", + "Bamu": "bamumi", + "Bass": "bassa", + "Batk": "bataki", + "Beng": "bengali", + "Blis": "Blissi sümbolid", + "Bopo": "bopomofo", + "Brah": "braahmi", + "Brai": "punktkiri", + "Bugi": "bugi", + "Buhd": "buhidi", + "Cakm": "tÅ¡aakma", + "Cans": "Kanada põlisrahvaste ühtlustatud silpkiri", + "Cari": "kaaria", + "Cham": "tÅ¡aami", + "Cher": "tÅ¡erokii", + "Cirt": "Cirthi", + "Copt": "kopti", + "Cprt": "Küprose silpkiri", + "Cyrl": "kirillitsa", + "Cyrs": "kürilliline kirikuslaavi", + "Deva": "devanaagari", + "Dsrt": "desereti", + "Dupl": "Duployé kiirkiri", + "Egyd": "egiptuse demootiline", + "Egyh": "egiptuse hieraatiline", + "Egyp": "egiptuse hieroglüüfkiri", + "Elba": "Elbasani", + "Ethi": "etioopia", + "Geok": "hutsuri", + "Geor": "gruusia", + "Glag": "glagoolitsa", + "Goth": "gooti", + "Gran": "grantha", + "Grek": "kreeka", + "Gujr": "gudžarati", + "Guru": "gurmukhi", + "Hanb": "hanbi", + "Hang": "korea", + "Hani": "hani", + "Hano": "hanunoo", + "Hans": "lihtsustatud", + "Hant": "traditsiooniline", + "Hatr": "Hatra", + "Hebr": "heebrea", + "Hira": "hiragana", + "Hluw": "Anatoolia hieroglüüfkiri", + "Hmng": "phahau-hmongi kiri", + "Hrkt": "jaapani silpkirjad", + "Hung": "vanaungari", + "Inds": "Induse", + "Ital": "vanaitali", + "Jamo": "jamo", + "Java": "jaava", + "Jpan": "jaapani", + "Jurc": "tÅ¡urtÅ¡eni", + "Kali": "kaja-lii", + "Kana": "katakana", + "Khar": "kharoshthi", + "Khmr": "khmeeri", + "Khoj": "hodžki", + "Knda": "kannada", + "Kore": "korea segakiri", + "Kpel": "kpelle", + "Kthi": "kaithi", + "Lana": "tai-thami", + "Laoo": "lao", + "Latf": "ladina fraktuurkiri", + "Latg": "ladina gaeli", + "Latn": "ladina", + "Lepc": "leptÅ¡a", + "Limb": "limbu", + "Lina": "lineaarkiri A", + "Linb": "lineaarkiri B", + "Lisu": "lisu", + "Loma": "loma", + "Lyci": "lüükia", + "Lydi": "lüüdia", + "Mahj": "mahaadžani", + "Mand": "mandea", + "Mani": "mani", + "Maya": "maaja hieroglüüfkiri", + "Mend": "mende", + "Merc": "meroe kursiivkiri", + "Mero": "meroe", + "Mlym": "malajalami", + "Modi": "modi", + "Mong": "mongoli", + "Moon": "Mooni", + "Mroo": "mruu", + "Mtei": "meitei", + "Mult": "Multani", + "Mymr": "birma", + "Narb": "Põhja-Araabia", + "Nbat": "Nabatea", + "Nkgb": "nasi", + "Nkoo": "nkoo", + "Nshu": "nüšu", + "Ogam": "ogam", + "Olck": "santali", + "Orkh": "Orhoni", + "Orya": "oria", + "Osma": "osmani", + "Palm": "Palmyra", + "Perm": "vanapermi", + "Phag": "phakpa", + "Phli": "pahlavi raidkiri", + "Phlp": "pahlavi psalmikiri", + "Phlv": "pahlavi raamatukiri", + "Phnx": "foiniikia", + "Plrd": "Pollardi miao", + "Prti": "partia raidkiri", + "Rjng": "redžangi", + "Roro": "rongorongo", + "Runr": "ruunikiri", + "Samr": "Samaaria", + "Sara": "sarati", + "Sarb": "Lõuna-Araabia", + "Saur": "sauraÅ¡tra", + "Sgnw": "viipekiri", + "Shaw": "Shaw’ kiri", + "Shrd": "Å¡aarada", + "Sidd": "siddhami", + "Sind": "hudavadi", + "Sinh": "singali", + "Sora": "sora", + "Sund": "sunda", + "Sylo": "siloti", + "Syrc": "süüria", + "Syre": "süüria estrangelo", + "Syrj": "läänesüüria", + "Syrn": "idasüüria", + "Tagb": "tagbanva", + "Takr": "taakri", + "Tale": "tai-löö", + "Talu": "uus tai-lõõ", + "Taml": "tamili", + "Tang": "tanguudi", + "Tavt": "tai-vieti", + "Telu": "telugu", + "Teng": "Tengwari", + "Tfng": "tifinagi", + "Tglg": "tagalogi", + "Thaa": "taana", + "Thai": "tai", + "Tibt": "tiibeti", + "Tirh": "tirhuta", + "Ugar": "ugariti", + "Vaii": "vai", + "Visp": "nähtava kõne", + "Wara": "hoo", + "Wole": "voleai", + "Xpeo": "vanapärsia", + "Xsux": "sumeri-akadi kiilkiri", + "Yiii": "jii", + "Zinh": "päritud", + "Zmth": "matemaatiline tähistus", + "Zsye": "emoji", + "Zsym": "sümbolid", + "Zxxx": "kirjakeeleta", + "Zyyy": "üldine", + "Zzzz": "määramata kiri" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/eu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/eu.json new file mode 100644 index 0000000000000000000000000000000000000000..8642a3c87cbac9d12c5d24e941b56e9f4bc6fb5f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/eu.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.29.20", + "Names": { + "Arab": "arabiarra", + "Armn": "armeniarra", + "Beng": "bengaliarra", + "Bopo": "bopomofoa", + "Brai": "braillea", + "Cyrl": "zirilikoa", + "Deva": "devanagaria", + "Ethi": "etiopiarra", + "Geor": "georgiarra", + "Grek": "greziarra", + "Gujr": "gujaratera", + "Guru": "gurmukhia", + "Hanb": "hänera", + "Hang": "hangula", + "Hani": "idazkera txinatarra", + "Hans": "sinplifikatua", + "Hant": "tradizionala", + "Hebr": "hebreera", + "Hira": "hiragana", + "Hrkt": "silaba japoniarrak", + "Jamo": "jamo-bihurketa", + "Jpan": "japoniarra", + "Kana": "katakana", + "Khmr": "khemerarra", + "Knda": "kanadarra", + "Kore": "korearra", + "Laoo": "laosarra", + "Latn": "latina", + "Mlym": "malayalamera", + "Mong": "mongoliarra", + "Mymr": "birmaniarra", + "Orya": "oriyarra", + "Sinh": "sinhala", + "Taml": "tamilarra", + "Telu": "teluguarra", + "Thaa": "thaana", + "Thai": "thailandiarra", + "Tibt": "tibetarra", + "Zmth": "matematikako notazioa", + "Zsye": "emotikonoa", + "Zsym": "ikurrak", + "Zxxx": "idatzi gabea", + "Zyyy": "ohikoa", + "Zzzz": "idazkera ezezaguna" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fa.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fa.json new file mode 100644 index 0000000000000000000000000000000000000000..12ba1167755cdf7451db90cdba97a147bfd09d84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fa.json @@ -0,0 +1,128 @@ +{ + "Version": "2.1.29.44", + "Names": { + "Aghb": "آلبانیایی Ù‚Ùقازی", + "Arab": "عربی", + "Armi": "آرامی هخامنشی", + "Armn": "ارمنی", + "Avst": "اوستایی", + "Bali": "بالیایی", + "Batk": "باتاکی", + "Beng": "بنگالی", + "Blis": "نمادهای بلیس", + "Bopo": "بوپوموÙÙˆ", + "Brah": "براهمی", + "Brai": "بریل", + "Bugi": "بوگیایی", + "Buhd": "بوهید", + "Cakm": "چاکمایی", + "Cari": "کاری", + "Cham": "Ú†Ù…ÛŒ", + "Cher": "چروکیایی", + "Cirt": "کرت", + "Copt": "قبطی", + "Cprt": "قبرسی", + "Cyrl": "سیریلی", + "Deva": "دوناگری", + "Dsrt": "دیسرتی", + "Egyh": "کاهنی مصری", + "Egyp": "هیروگلی٠مصری", + "Ethi": "اتیوپیایی", + "Geok": "گرجی خوتسوری", + "Geor": "گرجی", + "Glag": "گلاگولیتی", + "Goth": "گوتی", + "Grek": "یونانی", + "Gujr": "گجراتی", + "Guru": "گورومخی", + "Hanb": "هانبی", + "Hang": "هانگول", + "Hani": "هان", + "Hano": "هانونویی", + "Hans": "ساده‌شده", + "Hant": "سنتی", + "Hebr": "عبری", + "Hira": "هیراگانا", + "Hluw": "هیروگلی٠آناتولی", + "Hrkt": "سیلابی‌های ژاپنی", + "Hung": "مجاری باستان", + "Inds": "ایندوس", + "Ital": "ایتالی باستان", + "Jamo": "جامو", + "Java": "جاوه‌ای", + "Jpan": "ژاپنی", + "Kali": "کایالی", + "Kana": "کاتاکانا", + "Khmr": "خمری", + "Khoj": "خواجکی", + "Knda": "کانارا", + "Kore": "کره‌ای", + "Kthi": "کثی", + "Lana": "لانایی", + "Laoo": "لائوسی", + "Latf": "لاتینی ÙØ±Ø§Ú©ØªÙˆØ±", + "Latg": "لاتینی گیلی", + "Latn": "لاتینی", + "Limb": "لیمبایی", + "Lina": "خطی الÙ", + "Linb": "خطی ب", + "Lyci": "لسیایی", + "Lydi": "لدیایی", + "Mand": "منده‌ای", + "Mani": "مانوی", + "Maya": "هیروگلی٠مایایی", + "Mero": "مروییتی", + "Mlym": "مالایالامی", + "Mong": "مغولی", + "Moon": "مونی", + "Mtei": "مایک میتی", + "Mymr": "میانمار", + "Narb": "عربی شمالی باستان", + "Nbat": "نبطی", + "Ogam": "اوگامی", + "Orkh": "اورخونی", + "Orya": "اوریه‌ای", + "Palm": "پالمیرایی", + "Perm": "پرمی باستان", + "Phli": "پهلوی کتیبه‌ای", + "Phlp": "پهلوی زبوری", + "Phlv": "پهلوی کتابی", + "Phnx": "Ùنیقی", + "Prti": "پارتی کتیبه‌ای", + "Rjng": "رجنگی", + "Runr": "رونی", + "Samr": "سامری", + "Sara": "ساراتی", + "Sarb": "عربی جنوبی باستان", + "Saur": "سوراشترایی", + "Shaw": "شاوی", + "Sinh": "سینهالی", + "Sylo": "سیلوتی نگاری", + "Syrc": "سریانی", + "Syre": "سریانی سطرنجیلی", + "Syrj": "سریانی غربی", + "Syrn": "سریانی شرقی", + "Tagb": "تگبنوایی", + "Taml": "تامیلی", + "Telu": "تلوگویی", + "Teng": "تنگوار", + "Tfng": "تیÙیناغی", + "Tglg": "تاگالوگی", + "Thaa": "تانه‌ای", + "Thai": "تایلندی", + "Tibt": "تبتی", + "Ugar": "اوگاریتی", + "Vaii": "ویایی", + "Visp": "Ú¯ÙØªØ§Ø± قابل مشاهده", + "Xpeo": "ÙØ§Ø±Ø³ÛŒ باستان", + "Xsux": "میخی Ø³ÙˆÙ…Ø±ÛŒâ€Ø§Ú©Ø¯ÛŒ", + "Yiii": "یی", + "Zinh": "موروثی", + "Zmth": "علائم ریاضی", + "Zsye": "اموجی", + "Zsym": "علائم", + "Zxxx": "نانوشته", + "Zyyy": "مشترک", + "Zzzz": "خط نامشخص" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fa_AF.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fa_AF.json new file mode 100644 index 0000000000000000000000000000000000000000..10a98854399f80d141eda7b6666e3bb2526e39f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fa_AF.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.29.44", + "Names": { + "Mong": "مغلی" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fi.json new file mode 100644 index 0000000000000000000000000000000000000000..e4db30bb4da581ff6357d91bc055b47e43ecd364 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fi.json @@ -0,0 +1,180 @@ +{ + "Version": "2.1.29.88", + "Names": { + "Adlm": "fulanin adlam-aakkosto", + "Afak": "afaka", + "Aghb": "kaukasianalbanialainen", + "Ahom": "ahom", + "Arab": "arabialainen", + "Armi": "valtakunnanaramealainen", + "Armn": "armenialainen", + "Avst": "avestalainen", + "Bali": "balilainen", + "Bamu": "bamum", + "Bass": "bassa", + "Batk": "batakilainen", + "Beng": "bengalilainen", + "Bhks": "sanskritin bhaiksuki-aakkosto", + "Blis": "bliss-symbolit", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "braille-pistekirjoitus", + "Bugi": "bugilainen", + "Buhd": "buhidilainen", + "Cakm": "chakmalainen", + "Cans": "kanadalaisten alkuperäiskansojen yhtenäistetty tavukirjoitus", + "Cari": "kaarialainen", + "Cham": "tÅ¡amilainen", + "Cher": "cherokeelainen", + "Cirt": "cirth", + "Copt": "koptilainen", + "Cprt": "muinaiskyproslainen", + "Cyrl": "kyrillinen", + "Cyrs": "kyrillinen muinaiskirkkoslaavimuunnelma", + "Deva": "devanagari", + "Dsrt": "deseret", + "Dupl": "Duployén pikakirjoitus", + "Egyd": "egyptiläinen demoottinen", + "Egyh": "egyptiläinen hieraattinen", + "Egyp": "egyptiläiset hieroglyfit", + "Elba": "elbasanilainen", + "Ethi": "etiopialainen", + "Geok": "muinaisgeorgialainen", + "Geor": "georgialainen", + "Glag": "glagoliittinen", + "Goth": "goottilainen", + "Gran": "grantha", + "Grek": "kreikkalainen", + "Gujr": "gudžaratilainen", + "Guru": "gurmukhi", + "Hanb": "kiinan han ja bopomofo", + "Hang": "hangul", + "Hani": "kiinalainen han", + "Hano": "hanunoolainen", + "Hans": "yksinkertaistettu han", + "Hant": "perinteinen han", + "Hatr": "hatralainen", + "Hebr": "heprealainen", + "Hira": "hiragana", + "Hluw": "anatolialaiset hieroglyfit", + "Hmng": "pahawh hmong", + "Hrkt": "hiragana tai katakana", + "Hung": "muinaisunkarilainen", + "Inds": "induslainen", + "Ital": "muinaisitalialainen", + "Jamo": "korean hangulin jamo-elementit", + "Java": "jaavalainen", + "Jpan": "japanilainen", + "Jurc": "džurtÅ¡en", + "Kali": "kayah li", + "Kana": "katakana", + "Khar": "kharosthi", + "Khmr": "khmeriläinen", + "Khoj": "khojki", + "Knda": "kannadalainen", + "Kore": "korealainen", + "Kpel": "kpelle", + "Kthi": "kaithi", + "Lana": "lanna", + "Laoo": "laolainen", + "Latf": "latinalainen fraktuuramuunnelma", + "Latg": "latinalainen gaelimuunnelma", + "Latn": "latinalainen", + "Lepc": "lepchalainen", + "Limb": "limbulainen", + "Lina": "lineaari-A", + "Linb": "lineaari-B", + "Lisu": "Fraserin aakkoset", + "Loma": "loma", + "Lyci": "lyykialainen", + "Lydi": "lyydialainen", + "Mahj": "mahajanilainen", + "Mand": "mandealainen", + "Mani": "manikealainen", + "Marc": "tiibetiläinen marchan-kirjoitus", + "Maya": "maya-hieroglyfit", + "Mend": "mende", + "Merc": "meroiittinen kursiivikirjoitus", + "Mero": "meroiittinen", + "Mlym": "malajalamilainen", + "Modi": "modi-aakkoset", + "Mong": "mongolilainen", + "Moon": "moon-kohokirjoitus", + "Mroo": "mro", + "Mtei": "meitei", + "Mult": "multanilainen", + "Mymr": "burmalainen", + "Narb": "muinaispohjoisarabialainen", + "Nbat": "nabatealainen", + "Newa": "newarin newa-tavukirjoitus", + "Nkgb": "naxi geba", + "Nkoo": "n’ko", + "Nshu": "nüshu", + "Ogam": "ogam", + "Olck": "ol chiki", + "Orkh": "orkhon", + "Orya": "orijalainen", + "Osge": "osagen aakkosto", + "Osma": "osmanjalainen", + "Palm": "palmyralainen", + "Pauc": "zotuallai", + "Perm": "muinaispermiläinen", + "Phag": "phags-pa", + "Phli": "piirtokirjoituspahlavilainen", + "Phlp": "psalttaripahlavilainen", + "Phlv": "kirjapahlavilainen", + "Phnx": "foinikialainen", + "Plrd": "Pollardin foneettinen", + "Prti": "piirtokirjoitusparthialainen", + "Rjng": "rejang", + "Roro": "rongorongo", + "Runr": "riimukirjoitus", + "Samr": "samarianaramealainen", + "Sara": "sarati", + "Sarb": "muinaiseteläarabialainen", + "Saur": "saurashtra", + "Sgnw": "SignWriting", + "Shaw": "shaw’lainen", + "Shrd": "Å¡arada", + "Sidd": "siddham-tavukirjoitus", + "Sind": "khudabadi", + "Sinh": "sinhalilainen", + "Sora": "sorang sompeng", + "Sund": "sundalainen", + "Sylo": "syloti nagri", + "Syrc": "syyrialainen", + "Syre": "syyrialainen estrangelo-muunnelma", + "Syrj": "syyrialainen läntinen muunnelma", + "Syrn": "syyrialainen itäinen muunnelma", + "Tagb": "tagbanwalainen", + "Takr": "takri", + "Tale": "tailelainen", + "Talu": "uusi tailuelainen", + "Taml": "tamililainen", + "Tang": "tangut", + "Tavt": "tai viet", + "Telu": "telugulainen", + "Teng": "tengwar", + "Tfng": "tifinagh", + "Tglg": "tagalogilainen", + "Thaa": "thaana", + "Thai": "thailainen", + "Tibt": "tiibetiläinen", + "Tirh": "tirhuta", + "Ugar": "ugaritilainen", + "Vaii": "vailainen", + "Visp": "näkyvä puhe", + "Wara": "varang kshiti", + "Wole": "woleai", + "Xpeo": "muinaispersialainen", + "Xsux": "sumerilais-akkadilainen nuolenpääkirjoitus", + "Yiii": "yiläinen", + "Zinh": "peritty", + "Zmth": "matemaattinen", + "Zsye": "emoji-symbolit", + "Zsym": "symbolit", + "Zxxx": "kirjoittamaton", + "Zyyy": "määrittämätön", + "Zzzz": "tuntematon kirjoitusjärjestelmä" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fo.json new file mode 100644 index 0000000000000000000000000000000000000000..b37629052b4ed2c78dfb46e0d1e0c89032984ca5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fo.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.76", + "Names": { + "Arab": "arabisk", + "Armn": "armenskt", + "Beng": "bengali", + "Bopo": "bopomofo", + "Brai": "blindaskrift", + "Cyrl": "kyrilliskt", + "Deva": "devanagari", + "Ethi": "etiopiskt", + "Geor": "georgianskt", + "Grek": "grikskt", + "Gujr": "gujarati", + "Guru": "gurmukhi", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "han", + "Hans": "einkult", + "Hant": "vanligt", + "Hebr": "hebraiskt", + "Hira": "hiragana", + "Hrkt": "japanskir stavir", + "Jamo": "jamo", + "Jpan": "japanskt", + "Kana": "katakana", + "Khmr": "khmer", + "Knda": "kannada", + "Kore": "koreanskt", + "Laoo": "lao", + "Latn": "latínskt", + "Mlym": "malayalam", + "Mong": "mongolsk", + "Mymr": "myanmarskt", + "Orya": "oriya", + "Sinh": "sinhala", + "Taml": "tamilskt", + "Telu": "telugu", + "Thaa": "thaana", + "Thai": "tailendskt", + "Tibt": "tibetskt", + "Zmth": "støddfrøðilig teknskipan", + "Zsye": "emoji", + "Zsym": "tekin", + "Zxxx": "óskriva", + "Zyyy": "vanlig", + "Zzzz": "ókend skrift" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fr.json new file mode 100644 index 0000000000000000000000000000000000000000..4d06a9167447837dbda1c4233c61ed32016e6d8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fr.json @@ -0,0 +1,138 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "arabe", + "Armi": "araméen impérial", + "Armn": "arménien", + "Avst": "avestique", + "Bali": "balinais", + "Batk": "batak", + "Beng": "bengali", + "Blis": "symboles Bliss", + "Bopo": "bopomofo", + "Brah": "brâhmî", + "Brai": "braille", + "Bugi": "bouguis", + "Buhd": "bouhide", + "Cakm": "chakma", + "Cans": "syllabaire autochtone canadien unifié", + "Cari": "carien", + "Cham": "cham", + "Cher": "cherokee", + "Cirt": "cirth", + "Copt": "copte", + "Cprt": "syllabaire chypriote", + "Cyrl": "cyrillique", + "Cyrs": "cyrillique (variante slavonne)", + "Deva": "dévanâgarî", + "Dsrt": "déséret", + "Egyd": "démotique égyptien", + "Egyh": "hiératique égyptien", + "Egyp": "hiéroglyphes égyptiens", + "Ethi": "éthiopique", + "Geok": "géorgien khoutsouri", + "Geor": "géorgien", + "Glag": "glagolitique", + "Goth": "gotique", + "Grek": "grec", + "Gujr": "goudjarâtî", + "Guru": "gourmoukhî", + "Hanb": "Hanb", + "Hang": "hangûl", + "Hani": "sinogrammes", + "Hano": "hanounóo", + "Hans": "simplifié", + "Hant": "traditionnel", + "Hebr": "hébreu", + "Hira": "hiragana", + "Hmng": "pahawh hmong", + "Hrkt": "katakana ou hiragana", + "Hung": "ancien hongrois", + "Inds": "indus", + "Ital": "ancien italique", + "Jamo": "Jamo", + "Java": "javanais", + "Jpan": "japonais", + "Kali": "kayah li", + "Kana": "katakana", + "Khar": "kharochthî", + "Khmr": "khmer", + "Knda": "kannara", + "Kore": "coréen", + "Kthi": "kaithî", + "Lana": "lanna", + "Laoo": "lao", + "Latf": "latin (variante brisée)", + "Latg": "latin (variante gaélique)", + "Latn": "latin", + "Lepc": "lepcha", + "Limb": "limbou", + "Lina": "linéaire A", + "Linb": "linéaire B", + "Lyci": "lycien", + "Lydi": "lydien", + "Mand": "mandéen", + "Mani": "manichéen", + "Maya": "hiéroglyphes mayas", + "Mero": "méroïtique", + "Mlym": "malayalam", + "Mong": "mongol", + "Moon": "moon", + "Mtei": "meitei mayek", + "Mymr": "birman", + "Nkoo": "n’ko", + "Ogam": "ogam", + "Olck": "ol tchiki", + "Orkh": "orkhon", + "Orya": "oriya", + "Osma": "osmanais", + "Perm": "ancien permien", + "Phag": "phags pa", + "Phli": "pehlevi des inscriptions", + "Phlp": "pehlevi des psautiers", + "Phlv": "pehlevi des livres", + "Phnx": "phénicien", + "Plrd": "phonétique de Pollard", + "Prti": "parthe des inscriptions", + "Rjng": "rejang", + "Roro": "rongorongo", + "Runr": "runique", + "Samr": "samaritain", + "Sara": "sarati", + "Saur": "saurashtra", + "Sgnw": "écriture des signes", + "Shaw": "shavien", + "Sinh": "cinghalais", + "Sund": "sundanais", + "Sylo": "sylotî nâgrî", + "Syrc": "syriaque", + "Syre": "syriaque estranghélo", + "Syrj": "syriaque occidental", + "Syrn": "syriaque oriental", + "Tagb": "tagbanoua", + "Tale": "taï-le", + "Talu": "nouveau taï-lue", + "Taml": "tamoul", + "Tavt": "taï viêt", + "Telu": "télougou", + "Teng": "tengwar", + "Tfng": "tifinagh", + "Tglg": "tagal", + "Thaa": "thâna", + "Thai": "thaï", + "Tibt": "tibétain", + "Ugar": "ougaritique", + "Vaii": "vaï", + "Visp": "parole visible", + "Xpeo": "cunéiforme persépolitain", + "Xsux": "cunéiforme suméro-akkadien", + "Yiii": "yi", + "Zinh": "hérité", + "Zmth": "notation mathématique", + "Zsye": "Zsye", + "Zsym": "symboles", + "Zxxx": "non écrit", + "Zyyy": "commun", + "Zzzz": "écriture inconnue" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fr_CA.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fr_CA.json new file mode 100644 index 0000000000000000000000000000000000000000..79f792e8fd8989146f0fdc26a7e847b41546535d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fr_CA.json @@ -0,0 +1,12 @@ +{ + "Version": "2.1.27.99", + "Names": { + "Deva": "devanagari", + "Gujr": "gujarati", + "Hanb": "hanb", + "Hrkt": "syllabaires japonais", + "Jamo": "jamo", + "Orya": "odia", + "Zsye": "zsye" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fy.json new file mode 100644 index 0000000000000000000000000000000000000000..5f5f72116c131aed5fb98818cd69c60745ce5337 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/fy.json @@ -0,0 +1,164 @@ +{ + "Version": "2.1.29.44", + "Names": { + "Afak": "Defaka", + "Arab": "Arabysk", + "Armi": "Keizerlijk Aramees", + "Armn": "Armeens", + "Avst": "Avestaansk", + "Bali": "Balineesk", + "Bamu": "Bamoun", + "Bass": "Bassa Vah", + "Batk": "Batak", + "Beng": "Bengalees", + "Blis": "Blissymbolen", + "Bopo": "Bopomofo", + "Brah": "Brahmi", + "Brai": "Braille", + "Bugi": "Bugineesk", + "Buhd": "Buhid", + "Cakm": "Chakma", + "Cans": "Verenigde Canadese Aboriginal-symbolen", + "Cari": "Karysk", + "Cham": "Cham", + "Cher": "Cherokee", + "Cirt": "Cirth", + "Copt": "Koptysk", + "Cprt": "Syprysk", + "Cyrl": "Syrillysk", + "Cyrs": "Aldkerkslavysk Syrillysk", + "Deva": "Devanagari", + "Dsrt": "Deseret", + "Dupl": "Duployan snelschrift", + "Egyd": "Egyptysk demotysk", + "Egyh": "Egyptysk hiëratysk", + "Egyp": "Egyptyske hiërogliefen", + "Ethi": "Ethiopysk", + "Geok": "Georgysk Khutsuri", + "Geor": "Georgysk", + "Glag": "Glagolitysk", + "Goth": "Gothysk", + "Gran": "Grantha", + "Grek": "Grieks", + "Gujr": "Gujarati", + "Guru": "Gurmukhi", + "Hang": "Hangul", + "Hani": "Han", + "Hano": "Hanunoo", + "Hans": "Ferienfâldigd", + "Hant": "Traditjoneel", + "Hebr": "Hebreeuwsk", + "Hira": "Hiragana", + "Hluw": "Anatolyske hiërogliefen", + "Hmng": "Pahawh Hmong", + "Hrkt": "Katakana of Hiragana", + "Hung": "Aldhongaars", + "Inds": "Indus", + "Ital": "Ald-italysk", + "Jamo": "Jamo", + "Java": "Javaansk", + "Jpan": "Japans", + "Jurc": "Jurchen", + "Kali": "Kayah Li", + "Kana": "Katakana", + "Khar": "Kharoshthi", + "Khmr": "Khmer", + "Khoj": "Khojki", + "Knda": "Kannada", + "Kore": "Koreaansk", + "Kpel": "Kpelle", + "Kthi": "Kaithi", + "Lana": "Lanna", + "Laoo": "Lao", + "Latf": "Gotysk Latyn", + "Latg": "Gaelysk Latyn", + "Latn": "Latyn", + "Lepc": "Lepcha", + "Limb": "Limbu", + "Lina": "Lineair A", + "Linb": "Lineair B", + "Lisu": "Fraser", + "Loma": "Loma", + "Lyci": "Lycysk", + "Lydi": "Lydysk", + "Mand": "Mandaeans", + "Mani": "Manicheaansk", + "Maya": "Mayahiërogliefen", + "Mend": "Mende", + "Merc": "Meroitysk cursief", + "Mero": "Meroïtysk", + "Mlym": "Malayalam", + "Mong": "Mongools", + "Moon": "Moon", + "Mroo": "Mro", + "Mtei": "Meitei", + "Mymr": "Myanmar", + "Narb": "Ald Noard-Arabysk", + "Nbat": "Nabateaansk", + "Nkgb": "Naxi Geba", + "Nkoo": "N’Ko", + "Nshu": "Nüshu", + "Ogam": "Ogham", + "Olck": "Ol Chiki", + "Orkh": "Orkhon", + "Orya": "Odia", + "Osma": "Osmanya", + "Palm": "Palmyreens", + "Perm": "Aldpermysk", + "Phag": "Phags-pa", + "Phli": "Inscriptioneel Pahlavi", + "Phlp": "Psalmen Pahlavi", + "Phlv": "Boek Pahlavi", + "Phnx": "Foenicysk", + "Plrd": "Pollard-fonetysk", + "Prti": "Inscriptioneel Parthysk", + "Rjng": "Rejang", + "Roro": "Rongorongo", + "Runr": "Runic", + "Samr": "Samaritaansk", + "Sara": "Sarati", + "Sarb": "Ald Sûd-Arabysk", + "Saur": "Saurashtra", + "Sgnw": "SignWriting", + "Shaw": "Shavian", + "Shrd": "Sharada", + "Sind": "Sindhi", + "Sinh": "Sinhala", + "Sora": "Sora Sompeng", + "Sund": "Soendaneesk", + "Sylo": "Syloti Nagri", + "Syrc": "Syriac", + "Syre": "Estrangelo Arameesk", + "Syrj": "West-Arameesk", + "Syrn": "East-Arameesk", + "Tagb": "Tagbanwa", + "Takr": "Takri", + "Tale": "Tai Le", + "Talu": "Nij Tai Lue", + "Taml": "Tamil", + "Tang": "Tangut", + "Tavt": "Tai Viet", + "Telu": "Telugu", + "Teng": "Tengwar", + "Tfng": "Tifinagh", + "Tglg": "Tagalog", + "Thaa": "Thaana", + "Thai": "Thais", + "Tibt": "Tibetaansk", + "Tirh": "Tirhuta", + "Ugar": "Ugaritysk", + "Vaii": "Vai", + "Visp": "Sichtbere spraak", + "Wara": "Varang Kshiti", + "Wole": "Woleai", + "Xpeo": "Aldperzysk", + "Xsux": "Sumero-Akkadian Cuneiform", + "Yiii": "Yi", + "Zinh": "Oergeërfd", + "Zmth": "Wiskundige notatie", + "Zsym": "Symbolen", + "Zxxx": "Ongeschreven", + "Zyyy": "Algemeen", + "Zzzz": "Onbekend schriftsysteem" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ga.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ga.json new file mode 100644 index 0000000000000000000000000000000000000000..79c8c7599b1b674844da09b492c3cb926dccf659 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ga.json @@ -0,0 +1,97 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Aghb": "Albánach Cugasach", + "Arab": "Arabach", + "Armi": "Aramach Impiriúil", + "Armn": "Airméanach", + "Avst": "Aivéisteach", + "Bali": "Bailíoch", + "Batk": "Batacach", + "Beng": "Beangálach", + "Bopo": "Bopomofo", + "Brai": "Braille", + "Bugi": "Buigineach", + "Buhd": "Buthaideach", + "Cher": "Seiricíoch", + "Copt": "Coptach", + "Cprt": "Cipireach", + "Cyrl": "Coireallach", + "Deva": "Déiveanágrach", + "Egyd": "Éigipteach coiteann", + "Egyh": "Éigipteach cliarúil", + "Egyp": "Iairiglifí Éigipteacha", + "Ethi": "Aetópach", + "Geor": "Seoirseach", + "Glag": "Glagalach", + "Goth": "Gotach", + "Grek": "Gréagach", + "Gujr": "Gúisearátach", + "Guru": "Gurmúcach", + "Hanb": "Han agus Bopomofo", + "Hang": "Hangalach", + "Hani": "Han", + "Hans": "Simplithe", + "Hant": "Traidisiúnta", + "Hebr": "Eabhrach", + "Hira": "Hireagánach", + "Hluw": "Iairiglifí Anatólacha", + "Hrkt": "Siollabraí Seapánacha", + "Hung": "Sean-Ungárach", + "Ital": "Sean-Iodáilic", + "Jamo": "Seamó", + "Java": "Iávach", + "Jpan": "Seapánach", + "Kana": "Catacánach", + "Khmr": "Ciméarach", + "Knda": "Cannadach", + "Kore": "Cóiréach", + "Laoo": "Laosach", + "Latg": "Cló Gaelach", + "Latn": "Laidineach", + "Limb": "Liombúch", + "Lina": "Líneach A", + "Linb": "Líneach B", + "Lisu": "Fraser", + "Lyci": "Liciach", + "Lydi": "Lidiach", + "Mahj": "Mahasánach", + "Mani": "Mainicéasach", + "Maya": "Iairiglifí Máigheacha", + "Mend": "Meindeach", + "Mlym": "Mailéalamach", + "Mong": "Mongólach", + "Mymr": "Maenmarach", + "Narb": "Sean-Arabach Thuaidh", + "Ogam": "Ogham", + "Orya": "Oiríseach", + "Perm": "Sean-Pheirmeach", + "Phnx": "Féiníceach", + "Plrd": "Pollard Foghrach", + "Prti": "Pairtiach Inscríbhinniúil", + "Runr": "Rúnach", + "Samr": "Samárach", + "Sarb": "Sean-Arabach Theas", + "Shaw": "Shawach", + "Sinh": "Siolónach", + "Syrc": "Siriceach", + "Taml": "Tamalach", + "Telu": "Teileagúch", + "Tfng": "Tifinagh", + "Tglg": "Tagálagach", + "Thaa": "Tánach", + "Thai": "Téalannach", + "Tibt": "Tibéadach", + "Ugar": "Úgairíteach", + "Xpeo": "Sean-Pheirseach", + "Xsux": "Dingchruthach Suiméar-Acádach", + "Yiii": "Ãs", + "Zinh": "Oidhreacht", + "Zmth": "Nodaireacht Mhatamaiticiúil", + "Zsye": "Emoji", + "Zsym": "Siombailí", + "Zxxx": "Gan Scríobh", + "Zyyy": "Coitianta", + "Zzzz": "Script Anaithnid" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/gd.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/gd.json new file mode 100644 index 0000000000000000000000000000000000000000..3c3c25bf11aa794e09b6f461055d8cb901ea6da7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/gd.json @@ -0,0 +1,140 @@ +{ + "Version": "2.1.28.76", + "Names": { + "Afak": "Afaka", + "Aghb": "Albàinis Chabhcasach", + "Ahom": "Ahom", + "Arab": "Arabais", + "Armi": "Aramais impireil", + "Armn": "Airmeinis", + "Avst": "Avestanais", + "Bali": "Bali", + "Bamu": "Bamum", + "Bass": "Bassa Vah", + "Batk": "Batak", + "Beng": "Beangailis", + "Blis": "Comharran Bliss", + "Bopo": "Bopomofo", + "Brah": "Brahmi", + "Brai": "Braille", + "Buhd": "Buhid", + "Cakm": "Chakma", + "Cans": "Sgrìobhadh Lideach Aonaichte nan Tùsanach Canadach", + "Cham": "Cham", + "Cher": "Cherokee", + "Cirt": "Cirth", + "Copt": "Coptais", + "Cprt": "Cìoprasais", + "Cyrl": "Cirilis", + "Cyrs": "Cirilis Seann-Slàbhais na h-Eaglaise", + "Deva": "Devanagari", + "Dsrt": "Deseret", + "Egyp": "Sealbh-sgrìobhadh Èipheiteach", + "Ethi": "Ge’ez", + "Geor": "Cairtbheilis", + "Goth": "Gotais", + "Gran": "Grantha", + "Grek": "Greugais", + "Gujr": "Gujarati", + "Guru": "Gurmukhi", + "Hang": "Hangul", + "Hani": "Han", + "Hano": "Hanunoo", + "Hans": "Simplichte", + "Hant": "Tradaiseanta", + "Hebr": "Eabhra", + "Hira": "Hiragana", + "Hluw": "Dealbh-sgrìobhadh Anatolach", + "Hmng": "Pahawh Hmong", + "Hrkt": "Katakana no Hiragana", + "Hung": "Seann-Ungarais", + "Ital": "Seann-Eadailtis", + "Jamo": "Jamo", + "Java": "Deàbhanais", + "Jpan": "Seapanais", + "Jurc": "Jurchen", + "Kali": "Kayah Li", + "Kana": "Katakana", + "Khar": "Kharoshthi", + "Khmr": "Cmèar", + "Khoj": "Khojki", + "Knda": "Kannada", + "Kore": "Coirèanais", + "Kpel": "Kpelle", + "Kthi": "Kaithi", + "Lana": "Lanna", + "Laoo": "Làtho", + "Latf": "Laideann fraktur", + "Latg": "Laideann Ghàidhealach", + "Latn": "Laideann", + "Lepc": "Lepcha", + "Limb": "Limbu", + "Lina": "Linear A", + "Linb": "Linear B", + "Loma": "Loma", + "Mahj": "Mahajani", + "Maya": "Dealbh-sgrìobhadh Mayach", + "Mend": "Mende", + "Mlym": "Malayalam", + "Modi": "Modi", + "Mong": "Mongolais", + "Mroo": "Mro", + "Mtei": "Meitei Mayek", + "Mult": "Multani", + "Mymr": "Miànmar", + "Narb": "Seann-Arabach Thuathach", + "Nkgb": "Naxi Geba", + "Nkoo": "N’ko", + "Nshu": "Nüshu", + "Ogam": "Ogham-chraobh", + "Olck": "Ol Chiki", + "Orkh": "Orkhon", + "Orya": "Oriya", + "Osma": "Osmanya", + "Pauc": "Pau Cin Hau", + "Phag": "Phags-pa", + "Prti": "Partais snaidh-sgrìobhte", + "Qaac": "Qaac", + "Rjng": "Rejang", + "Roro": "Rongorongo", + "Runr": "Rùn-sgrìobhadh", + "Sara": "Sarati", + "Sarb": "Seann-Arabais Dheasach", + "Saur": "Saurashtra", + "Shrd": "Sharada", + "Sidd": "Siddham", + "Sind": "Khudawadi", + "Sinh": "Sinhala", + "Sora": "Sora Sompeng", + "Sund": "Sunda", + "Sylo": "Syloti Nagri", + "Syrc": "Suraidheac", + "Syrj": "Suraidheac Siarach", + "Syrn": "Suraidheac Earach", + "Tagb": "Tagbanwa", + "Takr": "Takri", + "Tale": "Tai Le", + "Talu": "Tai Lue Ùr", + "Taml": "Taimil", + "Tang": "Tangut", + "Tavt": "Tai Viet", + "Telu": "Telugu", + "Teng": "Tengwar", + "Tfng": "Tifinagh", + "Tglg": "Tagalog", + "Thaa": "Thaana", + "Thai": "Tàidh", + "Tibt": "Tibeitis", + "Tirh": "Tirhuta", + "Vaii": "Vai", + "Wara": "Varang Kshiti", + "Wole": "Woleai", + "Xpeo": "Seann-Pheirsis", + "Yiii": "Yi", + "Zmth": "Gnìomhairean matamataig", + "Zsym": "Samhlaidhean", + "Zxxx": "Gun sgrìobhadh", + "Zyyy": "Coitcheann", + "Zzzz": "Litreadh neo-aithnichte" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/gl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/gl.json new file mode 100644 index 0000000000000000000000000000000000000000..531eb46984140a6044c3eb49b8482c3138bafc7b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/gl.json @@ -0,0 +1,50 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "árabe", + "Armn": "armenio", + "Beng": "bengalí", + "Bopo": "bopomofo", + "Brai": "braille", + "Cans": "Silabario aborixe canadiano unificado", + "Cyrl": "cirílico", + "Deva": "devanágari", + "Ethi": "etíope", + "Geor": "xeorxiano", + "Grek": "grego", + "Gujr": "guxaratí", + "Guru": "gurmukhi", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "han", + "Hans": "simplificado", + "Hant": "tradicional", + "Hebr": "hebreo", + "Hira": "hiragana", + "Hrkt": "silabarios xaponeses", + "Jamo": "jamo", + "Jpan": "xaponés", + "Kana": "katakana", + "Khmr": "khmer", + "Knda": "canarés", + "Kore": "coreano", + "Laoo": "laosiano", + "Latn": "latino", + "Mlym": "malabar", + "Mong": "mongol", + "Mymr": "birmano", + "Orya": "oriá", + "Sinh": "cingalés", + "Taml": "támil", + "Telu": "telugú", + "Thaa": "thaana", + "Thai": "tailandés", + "Tibt": "tibetano", + "Zmth": "notación matemática", + "Zsye": "emojis", + "Zsym": "símbolos", + "Zxxx": "non escrito", + "Zyyy": "común", + "Zzzz": "alfabeto descoñecido" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/gu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/gu.json new file mode 100644 index 0000000000000000000000000000000000000000..9e36ec999627b42b6d84b8a5837dfed455f0d222 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/gu.json @@ -0,0 +1,138 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "અરબી", + "Armi": "ઇમà«àªªàª¿àª°àª¿àª¯àª² આરà«àª®àª¨àª¿àª•", + "Armn": "અરà«àª®à«‡àª¨àª¿àª¯àª¨", + "Avst": "અવેસà«àª¤àª¨", + "Bali": "બાલીનીàª", + "Batk": "બટાક", + "Beng": "બંગાળી", + "Blis": "બà«àª²àª¿àª¸àª¿àª®à«àª¬à«‹àª²à«àª¸", + "Bopo": "બોપોમોફો", + "Brah": "બà«àª°àª¹à«àª®à«€", + "Brai": "બà«àª°à«‡àª²", + "Bugi": "બગિનીસ", + "Buhd": "બà«àª¹àª¿àª¦", + "Cakm": "ચકમા", + "Cans": "યà«àª¨àª¾àª‡àªŸà«‡àª¡ કેનેડિયન àªàª¬à«‹àª°àª¿àªœàª¨àª² સિલેબિકà«àª¸", + "Cari": "કરૈન", + "Cher": "ચેરોકી", + "Cirt": "સિરà«àª¥", + "Copt": "કોપà«àªŸàª¿àª•", + "Cprt": "સિપà«àª°àª¾àª¯àªŸ", + "Cyrl": "સિરિલિક", + "Cyrs": "ઓલà«àª¡ ચરà«àªš સà«àª²àª¾àªµà«‹àª¨àª¿àª• સિરિલિક", + "Deva": "દેવનાગરી", + "Dsrt": "ડેસરેટ", + "Egyd": "ઇજિપà«àª¶àª¿àª¯àª¨ ડેમોટિક", + "Egyh": "ઇજિપà«àª¶àª¿àª¯àª¨ હાઇરેટિક", + "Egyp": "ઇજિપà«àª¶àª¿àª¯àª¨ હાઇરોગà«àª²àª¿àª«à«àª¸", + "Ethi": "ઇથિયોપિક", + "Geok": "જà«àª¯à«‹àª°à«àªœàª¿àª…ન ખà«àª¤àª¸à«àª°à«€", + "Geor": "જà«àª¯à«‹àª°à«àªœàª¿àª…ન", + "Glag": "ગà«àª²à«‡àª—ોલિટિક", + "Goth": "ગોથિક", + "Grek": "ગà«àª°à«€àª•", + "Gujr": "ગà«àªœàª°àª¾àª¤à«€", + "Guru": "ગà«àª°à«‚મà«àª–à«€", + "Hanb": "હાનà«àª¬", + "Hang": "હંગà«àª²", + "Hani": "હાન", + "Hano": "હનà«àª¨à«‚", + "Hans": "સરળીકૃત", + "Hant": "પરંપરાગત", + "Hebr": "હીબà«àª°à«", + "Hira": "હિરાગાના", + "Hmng": "પહાઉ મોનà«àª—", + "Hrkt": "જાપાનીઠવરà«àª£àª®àª¾àª³àª¾", + "Hung": "ઓલà«àª¡ હંગેરિયન", + "Inds": "સિનà«àª§à«", + "Ital": "જૂનૠઇટાલિક", + "Jamo": "જેમો", + "Java": "જાવાનીસ", + "Jpan": "જાપાની", + "Kali": "કાયાહ લી", + "Kana": "કટાકાના", + "Khar": "ખારોશà«àª¥à«€", + "Khmr": "ખà«àª®à«‡àª°", + "Knda": "કનà«àª¨àª¡àª¾", + "Kore": "કોરિયન", + "Kthi": "કૈથી", + "Lana": "લાના", + "Laoo": "લાઓ", + "Latf": "ફà«àª°à«‡àª•તà«àª° લેટિન", + "Latg": "ગૈલિક લેટિન", + "Latn": "લેટિન", + "Lepc": "લેપચા", + "Limb": "લિમà«àª¬à«‚", + "Lina": "લીનિયર અ", + "Linb": "લીનિયર બી", + "Lyci": "લિશિયન", + "Lydi": "લિડિયન", + "Mand": "માનà«àª¡àª¾àª¯à«€àª¨", + "Mani": "માનીચાયીન", + "Maya": "મયાન હાઇરોગà«àª²àª¿àª«à«àª¸", + "Mero": "મેરોઇટિક", + "Mlym": "મલયાલમ", + "Mong": "મોંગોલિયન", + "Moon": "મૂન", + "Mtei": "મેઇતેઇ માયેક", + "Mymr": "મà«àª¯àª¾àª‚માર", + "Nkoo": "àªàª¨â€™ કો", + "Ogam": "ઓઘામ", + "Olck": "ઓલ ચિકી", + "Orkh": "ઓરખોન", + "Orya": "ઉડિયા", + "Osma": "ઓસà«àª®àª¾àª¨à«àª¯àª¾", + "Perm": "ઓલà«àª¡ પરમિક", + "Phag": "ફાગà«àª¸-પા", + "Phli": "ઇનà«àª¸à«àª•à«àª°àª¿àªªà«àª¶àª¨àª² પહલવી", + "Phlp": "સાલટર પહલવી", + "Phlv": "બà«àª• પહલવી", + "Phnx": "ફોનિશિયન", + "Plrd": "પોલારà«àª¡ ફોનેટિક", + "Prti": "ઇનà«àª¸à«àª•à«àª°àª¿àªªà«àª¶àª¨àª² પારà«àª¥àª¿àª¯àª¨", + "Qaae": "Qaae", + "Rjng": "રીજાંગ", + "Roro": "રોંગોરોંગો", + "Runr": "રૂનિક", + "Samr": "સમરિટાન", + "Sara": "સરાતી", + "Saur": "સૌરાષà«àªŸà«àª°", + "Sgnw": "સંકેત લિપી", + "Shaw": "શાવિયાન", + "Sinh": "સિંહલી", + "Sund": "સà«àª¦àª¾àª¨à«€àª", + "Sylo": "સિલોતી નાગરી", + "Syrc": "સિરિયેક", + "Syre": "àªàª¸à«àª¤à«àª°à«‡àª¨à«àªœà«‡àª²à«‹ સિરિયાક", + "Syrj": "પશà«àªšàª¿àª® સિરિયાક", + "Syrn": "પૂરà«àªµ સિરિયાક", + "Tagb": "તગબનà«àªµàª¾", + "Tale": "તાઇ લી", + "Talu": "નવીન તાઇ લૂ", + "Taml": "તમિલ", + "Tavt": "તાઇ વેઇત", + "Telu": "તેલà«àª—à«", + "Teng": "તેનà«àª—વાર", + "Tfng": "તિફિનાઘ", + "Tglg": "ટેગાલોગ", + "Thaa": "થાના", + "Thai": "થાઇ", + "Tibt": "ટિબેટી", + "Ugar": "યà«àª—ાતિટિક", + "Vaii": "વાઇ", + "Visp": "વિસિબલ સà«àªªà«€àªš", + "Xpeo": "જà«àª¨à«€ ફારસી", + "Xsux": "સà«àª®à«‡àª°à«‹ અકà«àª•ાદિયન સà«àª¨àª¿àª«à«‹àª°à«àª®", + "Yiii": "યી", + "Zinh": "વંશાગત", + "Zmth": "ગણિતીય સંકેતલિપિ", + "Zsye": "ઇમોજી", + "Zsym": "પà«àª°àª¤à«€àª•à«‹", + "Zxxx": "અલિખિત", + "Zyyy": "સામાનà«àª¯", + "Zzzz": "અજà«àªžàª¾àª¤ લિપિ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/he.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/he.json new file mode 100644 index 0000000000000000000000000000000000000000..1fe2f99e47d562dccd6e0d5ba078e943098b31b5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/he.json @@ -0,0 +1,72 @@ +{ + "Version": "2.1.29.27", + "Names": { + "Arab": "ערבי", + "Armn": "×רמני", + "Bali": "ב×לינזי", + "Beng": "בנגלי", + "Bopo": "בופומופו", + "Brai": "ברייל", + "Cham": "צ׳××", + "Cher": "צ׳ירוקי", + "Copt": "קופטי", + "Cprt": "קפריס××™", + "Cyrl": "קירילי", + "Cyrs": "קירילי סל×בוני כנסייתי עתיק", + "Deva": "דוו×נגרי", + "Egyp": "כתב חרטומי×", + "Ethi": "×תיופי", + "Geor": "×’×ורגי", + "Goth": "גותי", + "Grek": "יווני", + "Gujr": "גוג׳רטי", + "Guru": "גורמוקי", + "Hanb": "×”×נב", + "Hang": "×”×נגול", + "Hani": "×”×ן", + "Hans": "פשוט", + "Hant": "מסורתי", + "Hebr": "עברי", + "Hira": "הירג×× ×”", + "Hrkt": "הברתי יפני", + "Hung": "הונגרי עתיק", + "Inds": "×ינדוס", + "Ital": "×יטלקי עתיק", + "Jamo": "ג׳×מו", + "Java": "ג׳×וונזי", + "Jpan": "יפני", + "Kana": "קטק×× ×”", + "Khmr": "חמרי", + "Knda": "×§×× ×דה", + "Kore": "קורי×× ×™", + "Laoo": "ל×ית", + "Latg": "לטיני ×’×לי", + "Latn": "לטיני", + "Maya": "מ××™×”", + "Mlym": "מלי×ל××", + "Mong": "מונגולי", + "Mymr": "מי×נמר", + "Orya": "×ורייה", + "Phnx": "פיניקי", + "Runr": "רוני", + "Sinh": "סינהלה", + "Syrc": "סורי", + "Syrj": "סורי מערבי", + "Syrn": "סורי מזרחי", + "Taml": "טמיל", + "Telu": "טלוגו", + "Tglg": "טגלוג", + "Thaa": "ת×× ×”", + "Thai": "ת××™", + "Tibt": "טיבטי", + "Ugar": "×וגריתי", + "Xpeo": "פרסי עתיק", + "Zinh": "מורש", + "Zmth": "סימון מתמטי", + "Zsye": "×מוג׳י", + "Zsym": "סמלי×", + "Zxxx": "×œ× ×›×ª×•×‘", + "Zyyy": "רגיל", + "Zzzz": "כתב ש×ינו ידוע" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/hi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/hi.json new file mode 100644 index 0000000000000000000000000000000000000000..c8a890b5af43e6a601b6aac5e98af3948a4512c7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/hi.json @@ -0,0 +1,139 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "अरबी", + "Armi": "इमà¥à¤ªà¤¿à¤°à¤¿à¤¯à¤² आरà¥à¤®à¥‡à¤¨à¤¿à¤•", + "Armn": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾à¤ˆ", + "Avst": "अवेसà¥à¤¤à¤¨", + "Bali": "बाली", + "Batk": "बटकी", + "Beng": "बंगाली", + "Blis": "बà¥à¤²à¤¿à¤¸à¤¿à¤®à¥à¤¬à¥‰à¤²à¥à¤¸", + "Bopo": "बोपोमोफ़ो", + "Brah": "बà¥à¤°à¤¹à¥à¤®à¥€", + "Brai": "बà¥à¤°à¥‡à¤²", + "Bugi": "बगिनीस", + "Buhd": "बà¥à¤¹à¤¿à¤¦", + "Cakm": "चकमा", + "Cans": "यà¥à¤¨à¤¿à¤«à¤¾à¤‡à¤¡ कैनेडियन à¤à¤¬à¥‹à¤°à¤¿à¤œà¤¨à¤² सिलेबिकà¥à¤¸", + "Cari": "करैन", + "Cham": "चाम", + "Cher": "चेरोकी", + "Cirt": "किरà¥à¤¥", + "Copt": "कॉपà¥à¤Ÿà¤¿à¤•", + "Cprt": "काइपà¥à¤°à¤¾à¤¯à¤Ÿ", + "Cyrl": "सिरिलिक", + "Cyrs": "ओलà¥à¤¡ चरà¥à¤š सà¥à¤²à¤¾à¤µà¥‹à¤¨à¤¿à¤• सिरिलिक", + "Deva": "देवनागरी", + "Dsrt": "डेसरेट", + "Egyd": "इजिपà¥à¤¶à¤¿à¤¯à¤¨ डेमोटिक", + "Egyh": "इजिपà¥à¤¶à¤¿à¤¯à¤¨ हाइरेटिक", + "Egyp": "इजिपà¥à¤¶à¤¿à¤¯à¤¨ हाइरोगà¥à¤²à¤¿à¤«à¥à¤¸", + "Ethi": "इथियोपियाई", + "Geok": "जॉरà¥à¤œà¤¿à¤¯à¤¨ खà¥à¤¤à¤¸à¥à¤°à¥€", + "Geor": "जॉरà¥à¤œà¤¿à¤¯à¤¨", + "Glag": "गà¥à¤²à¥‡à¤—ोलिटिक", + "Goth": "गोथिक", + "Gran": "गà¥à¤°à¤¨à¥à¤¥", + "Grek": "यूनानी", + "Gujr": "गà¥à¤œà¤°à¤¾à¤¤à¥€", + "Guru": "गà¥à¤°à¤®à¥à¤–ी", + "Hanb": "हांब", + "Hang": "हंगà¥à¤²", + "Hani": "हान", + "Hano": "हनà¥à¤¨à¥‚", + "Hans": "सरलीकृत", + "Hant": "पारंपरिक", + "Hebr": "हिबà¥à¤°à¥‚", + "Hira": "हिरागाना", + "Hmng": "पाहो हà¥à¤®à¥‹à¤¨à¥à¤—", + "Hrkt": "जापानी सिलेबरीज़", + "Hung": "ऑलà¥à¤¡ हंगेरियन", + "Inds": "सिनà¥à¤§à¥", + "Ital": "पà¥à¤°à¤¾à¤¨à¥€ इटली", + "Jamo": "जामो", + "Java": "जावानीस", + "Jpan": "जापानी", + "Kali": "कायाह ली", + "Kana": "काताकाना", + "Khar": "खारोशथी", + "Khmr": "खमेर", + "Knda": "कनà¥à¤¨à¤¡à¤¼", + "Kore": "कोरियाई", + "Kthi": "कैथी", + "Lana": "लाना", + "Laoo": "लाओ", + "Latf": "फ़à¥à¤°à¥ˆà¤•à¥à¤Ÿà¥à¤° लातिनी", + "Latg": "गेली लातिनी", + "Latn": "लैटिन", + "Lepc": "लेपचा", + "Limb": "लिमà¥à¤¬à¥‚", + "Lina": "लीनियर A", + "Linb": "लीनियर बी", + "Lyci": "लिशियन", + "Lydi": "लिडियन", + "Mand": "मनडेन", + "Mani": "मनीशीन", + "Maya": "मयान हाइरोगà¥à¤²à¤¿à¤«à¥à¤¸", + "Mero": "मेरोइटिक", + "Mlym": "मलयालम", + "Mong": "मंगोलियाई", + "Moon": "मून", + "Mtei": "मेइतेइ मायेक", + "Mymr": "मà¥à¤¯à¤¾à¤‚मार", + "Nkoo": "à¤à¤¨à¥â€˜à¤•ो", + "Ogam": "ओगम", + "Olck": "ऑल चिकी", + "Orkh": "ओरखोन", + "Orya": "उड़िया", + "Osma": "ओसà¥à¤®à¤¾à¤¨à¥à¤¯à¤¾", + "Perm": "ओलà¥à¤¡ परमिक", + "Phag": "फागà¥à¤¸-पा", + "Phli": "इंसà¥à¤•à¥à¤°à¤¿à¤ªà¤¶à¥à¤¨à¤² पाहलवी", + "Phlp": "सॉलà¥à¤Ÿà¤° पाहलवी", + "Phlv": "बà¥à¤• पाहलवी", + "Phnx": "फोनिशियन", + "Plrd": "पॉलारà¥à¤¡ फोनेटिक", + "Prti": "इंसà¥à¤•à¥à¤°à¤¿à¤ªà¤¶à¥à¤¨à¤² पारà¥à¤¥à¤¿à¤¯à¤¨", + "Rjng": "रीजांग", + "Roro": "रोनà¥à¤—ोरोनà¥à¤—ो", + "Runr": "रूनिक", + "Samr": "समरिटन", + "Sara": "सराती", + "Saur": "सौराषà¥à¤Ÿà¥à¤°", + "Sgnw": "सांकेतिक लेख", + "Shaw": "शावियान", + "Sinh": "सिंहली", + "Sund": "सूडानी", + "Sylo": "सिलोती नागरी", + "Syrc": "सिरियेक", + "Syre": "à¤à¤¸à¥à¤¤à¥à¤°à¥‡à¤¨à¥à¤œà¥‡à¤²à¥‹ सिरिà¤à¤•", + "Syrj": "पशà¥à¤šà¤¿à¤® सिरिà¤à¤•", + "Syrn": "पूरà¥à¤µ सिरिà¤à¤•", + "Tagb": "तगबनà¥à¤µà¤¾", + "Tale": "ताई ली", + "Talu": "नया ताई लà¥", + "Taml": "तमिल", + "Tavt": "ताई विà¤à¤¤", + "Telu": "तेलà¥à¤—ू", + "Teng": "तेनà¥à¤—वार", + "Tfng": "तिफिनाघ", + "Tglg": "टैगालोग", + "Thaa": "थाना", + "Thai": "थाई", + "Tibt": "तिबà¥à¤¬à¤¤à¥€", + "Ugar": "यà¥à¤—ारिटिक", + "Vaii": "वाई", + "Visp": "विसिबल सà¥à¤ªà¥€à¤š", + "Xpeo": "पà¥à¤°à¤¾à¤¨à¥€ फारसी", + "Xsux": "सà¥à¤®à¥‡à¤°à¥‹ अकà¥à¤•ादियन सà¥à¤¨à¤¿à¤«à¥‰à¤°à¥à¤®", + "Yiii": "यी", + "Zinh": "विरासत", + "Zmth": "गणितीय संकेतन", + "Zsye": "ईमोजी", + "Zsym": "चिहà¥à¤¨", + "Zxxx": "अलिखित", + "Zyyy": "सामानà¥à¤¯", + "Zzzz": "अजà¥à¤žà¤¾à¤¤ लिपि" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/hr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/hr.json new file mode 100644 index 0000000000000000000000000000000000000000..44ebb4c8d1c1f7b9594676745ef4e753fa2cf15c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/hr.json @@ -0,0 +1,165 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "afaka pismo", + "Arab": "arapsko pismo", + "Armi": "aramejsko pismo", + "Armn": "armensko pismo", + "Avst": "avestansko pismo", + "Bali": "balijsko pismo", + "Bamu": "bamum pismo", + "Bass": "bassa vah pismo", + "Batk": "batak pismo", + "Beng": "bengalsko pismo", + "Blis": "blissymbols", + "Bopo": "bopomofo pismo", + "Brah": "brahmi pismo", + "Brai": "brajica", + "Bugi": "buginsko pismo", + "Buhd": "buhid pismo", + "Cakm": "chakma pismo", + "Cans": "unificirani kanadski aboriÄ‘inski slogovi", + "Cari": "karijsko pismo", + "Cham": "Äamsko pismo", + "Cher": "Äeroki pismo", + "Cirt": "cirth pismo", + "Copt": "koptsko pismo", + "Cprt": "cypriot pismo", + "Cyrl": "ćirilica", + "Cyrs": "staroslavenska crkvena Äirilica", + "Deva": "devangari pismo", + "Dsrt": "deseret pismo", + "Egyd": "egipatsko narodno pismo", + "Egyh": "egipatsko hijeratsko pismo", + "Egyp": "egipatski hijeroglifi", + "Ethi": "etiopsko pismo", + "Geok": "gruzijsko khutsuri pismo", + "Geor": "gruzijsko pismo", + "Glag": "glagoljica", + "Goth": "gotiÄko pismo", + "Gran": "grantha pismo", + "Grek": "grÄko pismo", + "Gujr": "gudžaratsko pismo", + "Guru": "gurmukhi pismo", + "Hanb": "hanb pismo", + "Hang": "hangul pismo", + "Hani": "hansko pismo", + "Hano": "hanunoo pismo", + "Hans": "pojednostavljeno pismo", + "Hant": "tradicionalno pismo", + "Hebr": "hebrejsko pismo", + "Hira": "hiragana pismo", + "Hluw": "anatolijski hijeroglifi", + "Hmng": "pahawh hmong pismo", + "Hrkt": "japansko slogovno pismo", + "Hung": "staro maÄ‘arsko pismo", + "Inds": "indijsko pismo", + "Ital": "staro talijansko pismo", + "Jamo": "jamo pismo", + "Java": "javansko pismo", + "Jpan": "japansko pismo", + "Jurc": "jurchen pismo", + "Kali": "kayah li pismo", + "Kana": "katakana pismo", + "Khar": "kharoshthi pismo", + "Khmr": "kmersko pismo", + "Khoj": "khojki pismo", + "Knda": "kannada pismo", + "Kore": "korejsko pismo", + "Kpel": "kpelle pismo", + "Kthi": "kaithi pismo", + "Lana": "lanna pismo", + "Laoo": "laosko pismo", + "Latf": "fraktur latinica", + "Latg": "keltska latinica", + "Latn": "latinica", + "Lepc": "lepcha pismo", + "Limb": "limbu pismo", + "Lina": "linear A pismo", + "Linb": "linear B pismo", + "Lisu": "fraser pismo", + "Loma": "loma pismo", + "Lyci": "likijsko pismo", + "Lydi": "lidijsko pismo", + "Mand": "mandai pismo", + "Mani": "manihejsko pismo", + "Maya": "majanski hijeroglifi", + "Mend": "mende pismo", + "Merc": "meroitski kurziv", + "Mero": "meroitic pismo", + "Mlym": "malajalamsko pismo", + "Mong": "mongolsko pismo", + "Moon": "moon pismo", + "Mroo": "mro pismo", + "Mtei": "meitei mayek pismo", + "Mymr": "mjanmarsko pismo", + "Narb": "staro sjevernoarapsko pismo", + "Nbat": "nabatejsko pismo", + "Nkgb": "naxi geba pismo", + "Nkoo": "n’ko pismo", + "Nshu": "nushu pismo", + "Ogam": "ogham pismo", + "Olck": "ol chiki pismo", + "Orkh": "orkhon pismo", + "Orya": "orijsko pismo", + "Osma": "osmanya pismo", + "Palm": "palmyrene pismo", + "Perm": "staro permic pismo", + "Phag": "phags-pa pismo", + "Phli": "pisani pahlavi", + "Phlp": "psalter pahlavi", + "Phlv": "pahlavi pismo", + "Phnx": "feniÄko pismo", + "Plrd": "pollard fonetsko pismo", + "Prti": "pisani parthian", + "Rjng": "rejang pismo", + "Roro": "rongorongo pismo", + "Runr": "runsko pismo", + "Samr": "samaritansko pismo", + "Sara": "sarati pismo", + "Sarb": "staro južnoarapsko pismo", + "Saur": "saurashtra pismo", + "Sgnw": "znakovno pismo", + "Shaw": "shavian pismo", + "Shrd": "sharada pismo", + "Sind": "khudawadi pismo", + "Sinh": "sinhaleÅ¡ko pismo", + "Sora": "sora sompeng pismo", + "Sund": "sundansko pismo", + "Sylo": "syloti nagri pismo", + "Syrc": "sirijsko pismo", + "Syre": "sirijsko estrangelo pismo", + "Syrj": "pismo zapadne Sirije", + "Syrn": "pismo istoÄne Sirije", + "Tagb": "tagbanwa pismo", + "Takr": "takri pismo", + "Tale": "tai le pismo", + "Talu": "novo tai lue pismo", + "Taml": "tamilsko pismo", + "Tang": "tangut pismo", + "Tavt": "tai viet pismo", + "Telu": "teluÅ¡ko pismo", + "Teng": "tengwar pismo", + "Tfng": "tifinar", + "Tglg": "tagalog pismo", + "Thaa": "thaana pismo", + "Thai": "tajsko pismo", + "Tibt": "tibetansko pismo", + "Tirh": "tirhuta pismo", + "Ugar": "ugaritsko pismo", + "Vaii": "vai pismo", + "Visp": "Visible Speech", + "Wara": "varang kshiti pismo", + "Wole": "woleai pismo", + "Xpeo": "staro perzijsko pismo", + "Xsux": "sumersko-akadsko cuneiform pismo", + "Yiii": "Yi pismo", + "Zinh": "nasljedno pismo", + "Zmth": "matematiÄko znakovlje", + "Zsye": "emotikoni", + "Zsym": "simboli", + "Zxxx": "jezik bez pismenosti", + "Zyyy": "zajedniÄko pismo", + "Zzzz": "nepoznato pismo" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/hu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/hu.json new file mode 100644 index 0000000000000000000000000000000000000000..5a9747c6d495dffac33fd3bed1469e7390b6c912 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/hu.json @@ -0,0 +1,137 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "Arab", + "Armi": "Birodalmi arámi", + "Armn": "Örmény", + "Avst": "Avesztán", + "Bali": "Balinéz", + "Batk": "Batak", + "Beng": "Bengáli", + "Blis": "Bliss jelképrendszer", + "Bopo": "Bopomofo", + "Brah": "Brámi", + "Brai": "Vakírás", + "Bugi": "Buginéz", + "Buhd": "Buhid", + "Cakm": "Csakma", + "Cans": "Egyesített kanadai Å‘slakos jelek", + "Cari": "Kari", + "Cham": "Csám", + "Cher": "Cseroki", + "Copt": "Kopt", + "Cprt": "Ciprusi", + "Cyrl": "Cirill", + "Cyrs": "Óegyházi szláv cirill", + "Deva": "Devanagári", + "Dsrt": "Deseret", + "Egyd": "Egyiptomi demotikus", + "Egyh": "Egyiptomi hieratikus", + "Egyp": "Egyiptomi hieroglifák", + "Ethi": "Etióp", + "Geok": "Grúz kucsuri", + "Geor": "Grúz", + "Glag": "Glagolitikus", + "Goth": "Gót", + "Grek": "Görög", + "Gujr": "Gudzsaráti", + "Guru": "Gurmuki", + "Hanb": "Hanb", + "Hang": "Hangul", + "Hani": "Han", + "Hano": "Hanunoo", + "Hans": "Egyszerűsített", + "Hant": "Hagyományos", + "Hebr": "Héber", + "Hira": "Hiragana", + "Hmng": "Pahawh hmong", + "Hrkt": "Katakana vagy hiragana", + "Hung": "Ómagyar", + "Inds": "Indus", + "Ital": "Régi olasz", + "Jamo": "Jamo", + "Java": "Jávai", + "Jpan": "Japán", + "Kali": "Kajah li", + "Kana": "Katakana", + "Khar": "Kharoshthi", + "Khmr": "Khmer", + "Knda": "Kannada", + "Kore": "Koreai", + "Kthi": "Kaithi", + "Lana": "Lanna", + "Laoo": "Lao", + "Latf": "Fraktur latin", + "Latg": "Gael latin", + "Latn": "Latin", + "Lepc": "Lepcha", + "Limb": "Limbu", + "Lina": "Lineáris A", + "Linb": "Lineáris B", + "Lyci": "Líciai", + "Lydi": "Lídiai", + "Mand": "Mandai", + "Mani": "Manicheus", + "Maya": "Maja hieroglifák", + "Mero": "Meroitikus", + "Mlym": "Malajálam", + "Mong": "Mongol", + "Moon": "Moon", + "Mtei": "Meitei mayek", + "Mymr": "Burmai", + "Nkoo": "N’ko", + "Ogam": "Ogham", + "Olck": "Ol chiki", + "Orkh": "Orhon", + "Orya": "Oriya", + "Osma": "Oszmán", + "Perm": "Ópermikus", + "Phag": "Phags-pa", + "Phli": "Felriatos pahlavi", + "Phlp": "Psalter pahlavi", + "Phlv": "Könyv pahlavi", + "Phnx": "FÅ‘niciai", + "Plrd": "Pollard fonetikus", + "Prti": "Feliratos parthian", + "Rjng": "Redzsang", + "Roro": "Rongorongo", + "Runr": "Runikus", + "Samr": "Szamaritán", + "Sara": "Szarati", + "Saur": "Szaurastra", + "Sgnw": "Jelírás", + "Shaw": "Shaw ábécé", + "Sinh": "Szingaléz", + "Sund": "Szundanéz", + "Sylo": "Sylheti nagári", + "Syrc": "Szíriai", + "Syre": "Estrangelo szíriai", + "Syrj": "Nyugat-szíriai", + "Syrn": "Kelet-szíriai", + "Tagb": "Tagbanwa", + "Tale": "Tai Le", + "Talu": "Új tai lue", + "Taml": "Tamil", + "Tavt": "Tai viet", + "Telu": "Telugu", + "Teng": "Tengwar", + "Tfng": "Berber", + "Tglg": "Tagalog", + "Thaa": "Thaana", + "Thai": "Thai", + "Tibt": "Tibeti", + "Ugar": "Ugari", + "Vaii": "Vai", + "Visp": "Látható beszéd", + "Xpeo": "Óperzsa", + "Xsux": "Ékírásos suméro-akkád", + "Yiii": "Ji", + "Zinh": "Származtatott", + "Zmth": "Matematikai jelrendszer", + "Zsye": "Emoji", + "Zsym": "Szimbólum", + "Zxxx": "Ãratlan nyelvek kódja", + "Zyyy": "Meghatározatlan", + "Zzzz": "Ismeretlen írásrendszer" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/hy.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/hy.json new file mode 100644 index 0000000000000000000000000000000000000000..9c9d23d48440774d8bd29dac8395d403d42121f3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/hy.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "Õ¡Ö€Õ¡Õ¢Õ¡Õ¯Õ¡Õ¶", + "Armn": "Õ°Õ¡ÕµÕ¯Õ¡Õ¯Õ¡Õ¶", + "Beng": "Õ¢Õ¥Õ¶Õ£Õ¡Õ¬Õ¡Õ¯Õ¡Õ¶", + "Bopo": "Õ¢Õ¸ÕºÕ¸Õ´Õ¸Ö†Õ¸", + "Brai": "Õ¢Ö€Õ¡ÕµÕ¬Õ«", + "Cyrl": "Õ¯ÕµÕ¸Ö‚Ö€Õ¥Õ²Õ¡Õ£Õ«Ö€", + "Deva": "Õ¤Õ¥Ö‚Õ¡Õ¶Õ¡Õ£Õ¡Ö€Õ«", + "Ethi": "Õ¥Õ©Õ¸Õ¾ÕºÕ¡Õ¯Õ¡Õ¶", + "Geor": "Õ¾Ö€Õ¡ÖÕ¡Õ¯Õ¡Õ¶", + "Grek": "Õ°Õ¸Ö‚Õ¶Õ¡Õ¯Õ¡Õ¶", + "Gujr": "Õ£Õ¸Ö‚Õ»Õ¡Ö€Õ¡Õ©Õ«", + "Guru": "Õ£Õ¸Ö‚Ö€Õ´Õ¸Ö‚Õ­Õ«", + "Hanb": "Õ°Õ¡Õ¶Õ¢", + "Hang": "Õ°Õ¡Õ¶Õ£Õ¸Ö‚Õ¬", + "Hani": "Õ¹Õ«Õ¶Õ¡Õ¯Õ¡Õ¶", + "Hans": "ÕºÕ¡Ö€Õ¦Õ¥ÖÕ¾Õ¡Õ® Õ¹Õ«Õ¶Õ¡Õ¯Õ¡Õ¶", + "Hant": "Õ¡Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¡Õ¶ Õ¹Õ«Õ¶Õ¡Õ¯Õ¡Õ¶", + "Hebr": "Õ¥Õ¢Ö€Õ¡ÕµÕ¡Õ¯Õ¡Õ¶", + "Hira": "Õ°Õ«Ö€Õ¡Õ£Õ¡Õ¶Õ¡", + "Hrkt": "Õ³Õ¡ÕºÕ¸Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¾Õ¡Õ¶Õ¯Õ¡Õ£Õ«Ö€", + "Jamo": "Õ»Õ¡Õ´Õ¸", + "Jpan": "Õ³Õ¡ÕºÕ¸Õ¶Õ¡Õ¯Õ¡Õ¶", + "Kana": "Õ¯Õ¡Õ¿Õ¡Õ¯Õ¡Õ¶Õ¡", + "Khmr": "Ö„Õ´Õ¥Ö€Õ¡Õ¯Õ¡Õ¶", + "Knda": "Õ¯Õ¡Õ¶Õ¶Õ¡Õ¤Õ¡", + "Kore": "Õ¯Õ¸Ö€Õ¥Õ¡Õ¯Õ¡Õ¶", + "Laoo": "Õ¬Õ¡Õ¸Õ½Õ¡Õ¯Õ¡Õ¶", + "Latn": "Õ¬Õ¡Õ¿Õ«Õ¶Õ¡Õ¯Õ¡Õ¶", + "Mlym": "Õ´Õ¡Õ¬Õ¡ÕµÕ¡Õ¬Õ¡Õ´", + "Mong": "Õ´Õ¸Õ¶Õ²Õ¸Õ¬Õ¡Õ¯Õ¡Õ¶", + "Mymr": "Õ´ÕµÕ¡Õ¶Õ´Õ¡Ö€Õ¡Õ¯Õ¡Õ¶", + "Orya": "Ö…Ö€Õ«ÕµÕ¡", + "Sinh": "Õ½Õ«Õ¶Õ°Õ¡Õ¬Õ¡Õ¯Õ¡Õ¶", + "Taml": "Õ©Õ¡Õ´Õ«Õ¬Õ¡Õ¯Õ¡Õ¶", + "Telu": "Õ©Õ¥Õ¬Õ¸Ö‚Õ£Õ¸Ö‚", + "Thaa": "Õ©Õ¡Õ¡Õ¶Õ¡", + "Thai": "Õ©Õ¡ÕµÕ¡Õ¯Õ¡Õ¶", + "Tibt": "Õ¿Õ«Õ¢Õ¥Õ©Õ¡Õ¯Õ¡Õ¶", + "Zmth": "Õ´Õ¡Õ©Õ¥Õ´Õ¡Õ¿Õ«Õ¯Õ¡Õ¯Õ¡Õ¶ Õ¶Õ·Õ¡Õ¶Õ¶Õ¥Ö€", + "Zsye": "Õ§Õ´Õ¸Õ±Õ«", + "Zsym": "Õ¶Õ·Õ¡Õ¶Õ¶Õ¥Ö€", + "Zxxx": "Õ¹Õ£Ö€Õ¾Õ¡Õ®", + "Zyyy": "Õ¨Õ¶Õ¤Õ°Õ¡Õ¶Õ¸Ö‚Ö€", + "Zzzz": "Õ¡Õ¶Õ°Õ¡ÕµÕ¿ Õ£Õ«Ö€" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/id.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/id.json new file mode 100644 index 0000000000000000000000000000000000000000..722e9fba3cfa06ae8dfc007f3c71fdf6df514a20 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/id.json @@ -0,0 +1,169 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "Afaka", + "Aghb": "Albania Kaukasia", + "Arab": "Arab", + "Armi": "Aram Imperial", + "Armn": "Armenia", + "Avst": "Avesta", + "Bali": "Bali", + "Bamu": "Bamum", + "Bass": "Bassa Vah", + "Batk": "Batak", + "Beng": "Bengali", + "Blis": "Blissymbol", + "Bopo": "Bopomofo", + "Brah": "Brahmi", + "Brai": "Braille", + "Bugi": "Bugis", + "Buhd": "Buhid", + "Cakm": "Chakma", + "Cans": "Simbol Aborigin Kanada Kesatuan", + "Cari": "Karia", + "Cham": "Cham", + "Cher": "Cherokee", + "Cirt": "Cirth", + "Copt": "Koptik", + "Cprt": "Siprus", + "Cyrl": "Sirilik", + "Cyrs": "Gereja Slavonia Sirilik Lama", + "Deva": "Devanagari", + "Dsrt": "Deseret", + "Dupl": "Stenografi Duployan", + "Egyd": "Demotik Mesir", + "Egyh": "Hieratik Mesir", + "Egyp": "Hieroglip Mesir", + "Ethi": "Etiopia", + "Geok": "Georgian Khutsuri", + "Geor": "Georgia", + "Glag": "Glagolitic", + "Goth": "Gothic", + "Gran": "Grantha", + "Grek": "Yunani", + "Gujr": "Gujarat", + "Guru": "Gurmukhi", + "Hanb": "Hanb", + "Hang": "Hangul", + "Hani": "Han", + "Hano": "Hanunoo", + "Hans": "Sederhana", + "Hant": "Tradisional", + "Hebr": "Ibrani", + "Hira": "Hiragana", + "Hluw": "Hieroglif Anatolia", + "Hmng": "Pahawh Hmong", + "Hrkt": "Katakana atau Hiragana", + "Hung": "Hungaria Kuno", + "Inds": "Indus", + "Ital": "Italia Lama", + "Jamo": "Jamo", + "Java": "Jawa", + "Jpan": "Jepang", + "Jurc": "Jurchen", + "Kali": "Kayah Li", + "Kana": "Katakana", + "Khar": "Kharoshthi", + "Khmr": "Khmer", + "Khoj": "Khojki", + "Knda": "Kannada", + "Kore": "Korea", + "Kpel": "Kpelle", + "Kthi": "Kaithi", + "Lana": "Lanna", + "Laoo": "Laos", + "Latf": "Latin Fraktur", + "Latg": "Latin Gaelik", + "Latn": "Latin", + "Lepc": "Lepcha", + "Limb": "Limbu", + "Lina": "Linear A", + "Linb": "Linear B", + "Lisu": "Lisu", + "Loma": "Loma", + "Lyci": "Lycia", + "Lydi": "Lydia", + "Mand": "Mandae", + "Mani": "Manikhei", + "Maya": "Hieroglip Maya", + "Mend": "Mende", + "Merc": "Kursif Meroitik", + "Mero": "Meroitik", + "Mlym": "Malayalam", + "Modi": "Modi", + "Mong": "Mongolia", + "Moon": "Moon", + "Mroo": "Mro", + "Mtei": "Meitei Mayek", + "Mymr": "Myanmar", + "Narb": "Arab Utara Kuno", + "Nbat": "Nabataea", + "Nkgb": "Naxi Geba", + "Nkoo": "N’Ko", + "Nshu": "Nushu", + "Ogam": "Ogham", + "Olck": "Chiki Lama", + "Orkh": "Orkhon", + "Orya": "Oriya", + "Osma": "Osmanya", + "Palm": "Palmira", + "Perm": "Permik Kuno", + "Phag": "Phags-pa", + "Phli": "Pahlevi", + "Phlp": "Mazmur Pahlevi", + "Phlv": "Kitab Pahlevi", + "Phnx": "Phoenix", + "Plrd": "Fonetik Pollard", + "Prti": "Prasasti Parthia", + "Rjng": "Rejang", + "Roro": "Rongorongo", + "Runr": "Runik", + "Samr": "Samaria", + "Sara": "Sarati", + "Sarb": "Arab Selatan Kuno", + "Saur": "Saurashtra", + "Sgnw": "Tulisan Isyarat", + "Shaw": "Shavia", + "Shrd": "Sharada", + "Sidd": "Siddham", + "Sind": "Khudawadi", + "Sinh": "Sinhala", + "Sora": "Sora Sompeng", + "Sund": "Sunda", + "Sylo": "Syloti Nagri", + "Syrc": "Suriah", + "Syre": "Suriah Estrangelo", + "Syrj": "Suriah Barat", + "Syrn": "Suriah Timur", + "Tagb": "Tagbanwa", + "Takr": "Takri", + "Tale": "Tai Le", + "Talu": "Tai Lue Baru", + "Taml": "Tamil", + "Tang": "Tangut", + "Tavt": "Tai Viet", + "Telu": "Telugu", + "Teng": "Tenghwar", + "Tfng": "Tifinagh", + "Tglg": "Tagalog", + "Thaa": "Thaana", + "Thai": "Thai", + "Tibt": "Tibet", + "Tirh": "Tirhuta", + "Ugar": "Ugaritik", + "Vaii": "Vai", + "Visp": "Ucapan Terlihat", + "Wara": "Varang Kshiti", + "Wole": "Woleai", + "Xpeo": "Persia Kuno", + "Xsux": "Cuneiform Sumero-Akkadia", + "Yiii": "Yi", + "Zinh": "Warisan", + "Zmth": "Notasi Matematika", + "Zsye": "Emoji", + "Zsym": "Simbol", + "Zxxx": "Tidak Tertulis", + "Zyyy": "Umum", + "Zzzz": "Skrip Tak Dikenal" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ii.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ii.json new file mode 100644 index 0000000000000000000000000000000000000000..2ff71519a3ffc1925eeff4daec8bf694cfe8e29f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ii.json @@ -0,0 +1,13 @@ +{ + "Version": "2.1.27.40", + "Names": { + "Arab": "ꀊê‡ê€¨ê±ê‚·", + "Cyrl": "ꀊꆨꌦê‡êƒšê±ê‚·", + "Hans": "êˆê¯ê‰Œêˆ²ê±ê‚·", + "Hant": "ꀎê‹ê‰Œêˆ²ê±ê‚·", + "Latn": "ê‡ê„€ê±ê‚·", + "Yiii": "ꆈꌠê±ê‚·", + "Zxxx": "ê±ê€‹ê‰†êŒ ", + "Zzzz": "ꅉꀋêšêŒ ê±ê‚·" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/in.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/in.json new file mode 100644 index 0000000000000000000000000000000000000000..722e9fba3cfa06ae8dfc007f3c71fdf6df514a20 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/in.json @@ -0,0 +1,169 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "Afaka", + "Aghb": "Albania Kaukasia", + "Arab": "Arab", + "Armi": "Aram Imperial", + "Armn": "Armenia", + "Avst": "Avesta", + "Bali": "Bali", + "Bamu": "Bamum", + "Bass": "Bassa Vah", + "Batk": "Batak", + "Beng": "Bengali", + "Blis": "Blissymbol", + "Bopo": "Bopomofo", + "Brah": "Brahmi", + "Brai": "Braille", + "Bugi": "Bugis", + "Buhd": "Buhid", + "Cakm": "Chakma", + "Cans": "Simbol Aborigin Kanada Kesatuan", + "Cari": "Karia", + "Cham": "Cham", + "Cher": "Cherokee", + "Cirt": "Cirth", + "Copt": "Koptik", + "Cprt": "Siprus", + "Cyrl": "Sirilik", + "Cyrs": "Gereja Slavonia Sirilik Lama", + "Deva": "Devanagari", + "Dsrt": "Deseret", + "Dupl": "Stenografi Duployan", + "Egyd": "Demotik Mesir", + "Egyh": "Hieratik Mesir", + "Egyp": "Hieroglip Mesir", + "Ethi": "Etiopia", + "Geok": "Georgian Khutsuri", + "Geor": "Georgia", + "Glag": "Glagolitic", + "Goth": "Gothic", + "Gran": "Grantha", + "Grek": "Yunani", + "Gujr": "Gujarat", + "Guru": "Gurmukhi", + "Hanb": "Hanb", + "Hang": "Hangul", + "Hani": "Han", + "Hano": "Hanunoo", + "Hans": "Sederhana", + "Hant": "Tradisional", + "Hebr": "Ibrani", + "Hira": "Hiragana", + "Hluw": "Hieroglif Anatolia", + "Hmng": "Pahawh Hmong", + "Hrkt": "Katakana atau Hiragana", + "Hung": "Hungaria Kuno", + "Inds": "Indus", + "Ital": "Italia Lama", + "Jamo": "Jamo", + "Java": "Jawa", + "Jpan": "Jepang", + "Jurc": "Jurchen", + "Kali": "Kayah Li", + "Kana": "Katakana", + "Khar": "Kharoshthi", + "Khmr": "Khmer", + "Khoj": "Khojki", + "Knda": "Kannada", + "Kore": "Korea", + "Kpel": "Kpelle", + "Kthi": "Kaithi", + "Lana": "Lanna", + "Laoo": "Laos", + "Latf": "Latin Fraktur", + "Latg": "Latin Gaelik", + "Latn": "Latin", + "Lepc": "Lepcha", + "Limb": "Limbu", + "Lina": "Linear A", + "Linb": "Linear B", + "Lisu": "Lisu", + "Loma": "Loma", + "Lyci": "Lycia", + "Lydi": "Lydia", + "Mand": "Mandae", + "Mani": "Manikhei", + "Maya": "Hieroglip Maya", + "Mend": "Mende", + "Merc": "Kursif Meroitik", + "Mero": "Meroitik", + "Mlym": "Malayalam", + "Modi": "Modi", + "Mong": "Mongolia", + "Moon": "Moon", + "Mroo": "Mro", + "Mtei": "Meitei Mayek", + "Mymr": "Myanmar", + "Narb": "Arab Utara Kuno", + "Nbat": "Nabataea", + "Nkgb": "Naxi Geba", + "Nkoo": "N’Ko", + "Nshu": "Nushu", + "Ogam": "Ogham", + "Olck": "Chiki Lama", + "Orkh": "Orkhon", + "Orya": "Oriya", + "Osma": "Osmanya", + "Palm": "Palmira", + "Perm": "Permik Kuno", + "Phag": "Phags-pa", + "Phli": "Pahlevi", + "Phlp": "Mazmur Pahlevi", + "Phlv": "Kitab Pahlevi", + "Phnx": "Phoenix", + "Plrd": "Fonetik Pollard", + "Prti": "Prasasti Parthia", + "Rjng": "Rejang", + "Roro": "Rongorongo", + "Runr": "Runik", + "Samr": "Samaria", + "Sara": "Sarati", + "Sarb": "Arab Selatan Kuno", + "Saur": "Saurashtra", + "Sgnw": "Tulisan Isyarat", + "Shaw": "Shavia", + "Shrd": "Sharada", + "Sidd": "Siddham", + "Sind": "Khudawadi", + "Sinh": "Sinhala", + "Sora": "Sora Sompeng", + "Sund": "Sunda", + "Sylo": "Syloti Nagri", + "Syrc": "Suriah", + "Syre": "Suriah Estrangelo", + "Syrj": "Suriah Barat", + "Syrn": "Suriah Timur", + "Tagb": "Tagbanwa", + "Takr": "Takri", + "Tale": "Tai Le", + "Talu": "Tai Lue Baru", + "Taml": "Tamil", + "Tang": "Tangut", + "Tavt": "Tai Viet", + "Telu": "Telugu", + "Teng": "Tenghwar", + "Tfng": "Tifinagh", + "Tglg": "Tagalog", + "Thaa": "Thaana", + "Thai": "Thai", + "Tibt": "Tibet", + "Tirh": "Tirhuta", + "Ugar": "Ugaritik", + "Vaii": "Vai", + "Visp": "Ucapan Terlihat", + "Wara": "Varang Kshiti", + "Wole": "Woleai", + "Xpeo": "Persia Kuno", + "Xsux": "Cuneiform Sumero-Akkadia", + "Yiii": "Yi", + "Zinh": "Warisan", + "Zmth": "Notasi Matematika", + "Zsye": "Emoji", + "Zsym": "Simbol", + "Zxxx": "Tidak Tertulis", + "Zyyy": "Umum", + "Zzzz": "Skrip Tak Dikenal" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/is.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/is.json new file mode 100644 index 0000000000000000000000000000000000000000..f9b6fc54784fb1c9856b2fb442c2bcd9facbb1f1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/is.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.29.65", + "Names": { + "Arab": "arabískt", + "Armn": "armenskt", + "Beng": "bengalskt", + "Bopo": "bopomofo", + "Brai": "blindraletur", + "Cyrl": "kyrillískt", + "Deva": "devanagari", + "Ethi": "eþíópískt", + "Geor": "georgískt", + "Grek": "grískt", + "Gujr": "gújaratí", + "Guru": "gurmukhi", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "kínverskt", + "Hans": "einfaldað", + "Hant": "hefðbundið", + "Hebr": "hebreskt", + "Hira": "hiragana", + "Hrkt": "katakana eða hiragana", + "Jamo": "jamo", + "Jpan": "japanskt", + "Kana": "katakana", + "Khmr": "kmer", + "Knda": "kannada", + "Kore": "kóreskt", + "Laoo": "lao", + "Latn": "latneskt", + "Mlym": "malalajam", + "Mong": "mongólskt", + "Mymr": "mjanmarskt", + "Orya": "oriya", + "Sinh": "sinhala", + "Taml": "tamílskt", + "Telu": "telúgú", + "Thaa": "thaana", + "Thai": "taílenskt", + "Tibt": "tíbeskt", + "Zmth": "stærðfræðitákn", + "Zsye": "emoji-tákn", + "Zsym": "tákn", + "Zxxx": "óskrifað", + "Zyyy": "almennt", + "Zzzz": "óþekkt letur" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/it.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/it.json new file mode 100644 index 0000000000000000000000000000000000000000..dc066444d0c4da2771d7ac17d46f7c270a2d3ecf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/it.json @@ -0,0 +1,166 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "afaka", + "Arab": "arabo", + "Armi": "aramaico imperiale", + "Armn": "armeno", + "Avst": "avestico", + "Bali": "balinese", + "Bamu": "bamum", + "Bass": "Bassa Vah", + "Batk": "batak", + "Beng": "bengalese", + "Blis": "simboli bliss", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "braille", + "Bugi": "buginese", + "Buhd": "buhid", + "Cakm": "chakma", + "Cans": "simboli aborigeni canadesi unificati", + "Cari": "carian", + "Cham": "cham", + "Cher": "cherokee", + "Cirt": "cirth", + "Copt": "copto", + "Cprt": "cipriota", + "Cyrl": "cirillico", + "Cyrs": "cirillico antica chiesa slavonica", + "Deva": "devanagari", + "Dsrt": "deseret", + "Dupl": "stenografia duployan", + "Egyd": "egiziano demotico", + "Egyh": "ieratico egiziano", + "Egyp": "geroglifici egiziani", + "Ethi": "etiope", + "Geok": "kutsuri", + "Geor": "georgiano", + "Glag": "glagolitico", + "Goth": "gotico", + "Gran": "grantha", + "Grek": "greco", + "Gujr": "gujarati", + "Guru": "gurmukhi", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanunoo", + "Hans": "semplificato", + "Hant": "tradizionale", + "Hebr": "ebraico", + "Hira": "hiragana", + "Hluw": "geroglifici anatolici", + "Hmng": "pahawn hmong", + "Hrkt": "katanaka o hiragana", + "Hung": "antico ungherese", + "Inds": "indu", + "Ital": "italico antico", + "Jamo": "jamo", + "Java": "javanese", + "Jpan": "giapponese", + "Jurc": "jurchen", + "Kali": "kayah li", + "Kana": "katakana", + "Khar": "kharoshthi", + "Khmr": "khmer", + "Khoj": "khojki", + "Knda": "kannada", + "Kore": "coreano", + "Kpel": "Kpelle", + "Kthi": "kaithi", + "Lana": "lanna", + "Laoo": "lao", + "Latf": "variante fraktur del latino", + "Latg": "variante gaelica del latino", + "Latn": "latino", + "Lepc": "lepcha", + "Limb": "limbu", + "Lina": "lineare A", + "Linb": "lineare B", + "Lisu": "lisu", + "Loma": "loma", + "Lyci": "lyci", + "Lydi": "lydi", + "Mand": "mandaico", + "Mani": "manicheo", + "Maya": "geroglifici maya", + "Mend": "mende", + "Merc": "corsivo meroitico", + "Mero": "meroitico", + "Mlym": "malayalam", + "Mong": "mongolo", + "Moon": "moon", + "Mroo": "mro", + "Mtei": "meetei mayek", + "Mymr": "birmano", + "Narb": "arabo settentrionale antico", + "Nbat": "nabateo", + "Nkgb": "geba naxi", + "Nkoo": "n’ko", + "Nshu": "nushu", + "Ogam": "ogham", + "Olck": "ol chiki", + "Orkh": "orkhon", + "Orya": "oriya", + "Osma": "osmanya", + "Palm": "palmireno", + "Perm": "permico antico", + "Phag": "phags-pa", + "Phli": "pahlavi delle iscrizioni", + "Phlp": "pahlavi psalter", + "Phlv": "pahlavi book", + "Phnx": "fenicio", + "Plrd": "fonetica di pollard", + "Prti": "partico delle iscrizioni", + "Rjng": "rejang", + "Roro": "rongorongo", + "Runr": "runico", + "Samr": "samaritano", + "Sara": "sarati", + "Sarb": "arabo meridionale antico", + "Saur": "saurashtra", + "Sgnw": "linguaggio dei segni", + "Shaw": "shaviano", + "Shrd": "sharada", + "Sind": "khudawadi", + "Sinh": "singalese", + "Sora": "sora sompeng", + "Sund": "sundanese", + "Sylo": "syloti nagri", + "Syrc": "siriano", + "Syre": "siriaco estrangelo", + "Syrj": "siriaco occidentale", + "Syrn": "siriaco orientale", + "Tagb": "tagbanwa", + "Takr": "takri", + "Tale": "tai le", + "Talu": "tai lue", + "Taml": "tamil", + "Tang": "tangut", + "Tavt": "tai viet", + "Telu": "telugu", + "Teng": "tengwar", + "Tfng": "tifinagh", + "Tglg": "tagalog", + "Thaa": "thaana", + "Thai": "thailandese", + "Tibt": "tibetano", + "Tirh": "tirhuta", + "Ugar": "ugarita", + "Vaii": "vaii", + "Visp": "alfabeto visivo", + "Wara": "varang kshiti", + "Wole": "woleai", + "Xpeo": "persiano antico", + "Xsux": "sumero-accadiano cuneiforme", + "Yiii": "yi", + "Zinh": "ereditato", + "Zmth": "notazione matematica", + "Zsye": "emoji", + "Zsym": "simboli", + "Zxxx": "non scritto", + "Zyyy": "comune", + "Zzzz": "scrittura sconosciuta" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/iw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/iw.json new file mode 100644 index 0000000000000000000000000000000000000000..1fe2f99e47d562dccd6e0d5ba078e943098b31b5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/iw.json @@ -0,0 +1,72 @@ +{ + "Version": "2.1.29.27", + "Names": { + "Arab": "ערבי", + "Armn": "×רמני", + "Bali": "ב×לינזי", + "Beng": "בנגלי", + "Bopo": "בופומופו", + "Brai": "ברייל", + "Cham": "צ׳××", + "Cher": "צ׳ירוקי", + "Copt": "קופטי", + "Cprt": "קפריס××™", + "Cyrl": "קירילי", + "Cyrs": "קירילי סל×בוני כנסייתי עתיק", + "Deva": "דוו×נגרי", + "Egyp": "כתב חרטומי×", + "Ethi": "×תיופי", + "Geor": "×’×ורגי", + "Goth": "גותי", + "Grek": "יווני", + "Gujr": "גוג׳רטי", + "Guru": "גורמוקי", + "Hanb": "×”×נב", + "Hang": "×”×נגול", + "Hani": "×”×ן", + "Hans": "פשוט", + "Hant": "מסורתי", + "Hebr": "עברי", + "Hira": "הירג×× ×”", + "Hrkt": "הברתי יפני", + "Hung": "הונגרי עתיק", + "Inds": "×ינדוס", + "Ital": "×יטלקי עתיק", + "Jamo": "ג׳×מו", + "Java": "ג׳×וונזי", + "Jpan": "יפני", + "Kana": "קטק×× ×”", + "Khmr": "חמרי", + "Knda": "×§×× ×דה", + "Kore": "קורי×× ×™", + "Laoo": "ל×ית", + "Latg": "לטיני ×’×לי", + "Latn": "לטיני", + "Maya": "מ××™×”", + "Mlym": "מלי×ל××", + "Mong": "מונגולי", + "Mymr": "מי×נמר", + "Orya": "×ורייה", + "Phnx": "פיניקי", + "Runr": "רוני", + "Sinh": "סינהלה", + "Syrc": "סורי", + "Syrj": "סורי מערבי", + "Syrn": "סורי מזרחי", + "Taml": "טמיל", + "Telu": "טלוגו", + "Tglg": "טגלוג", + "Thaa": "ת×× ×”", + "Thai": "ת××™", + "Tibt": "טיבטי", + "Ugar": "×וגריתי", + "Xpeo": "פרסי עתיק", + "Zinh": "מורש", + "Zmth": "סימון מתמטי", + "Zsye": "×מוג׳י", + "Zsym": "סמלי×", + "Zxxx": "×œ× ×›×ª×•×‘", + "Zyyy": "רגיל", + "Zzzz": "כתב ש×ינו ידוע" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ja.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ja.json new file mode 100644 index 0000000000000000000000000000000000000000..4214590c7331198578e3adac881dd3802b9259b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ja.json @@ -0,0 +1,172 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "アファカ文字", + "Aghb": "カフカス・アルãƒãƒ‹ã‚¢æ–‡å­—", + "Arab": "アラビア文字", + "Armi": "å¸å›½ã‚¢ãƒ©ãƒ æ–‡å­—", + "Armn": "アルメニア文字", + "Avst": "アヴェスター文字", + "Bali": "ãƒãƒªæ–‡å­—", + "Bamu": "ãƒãƒ ãƒ³æ–‡å­—", + "Bass": "ãƒã‚µæ–‡å­—", + "Batk": "ãƒã‚¿ã‚¯æ–‡å­—", + "Beng": "ベンガル文字", + "Blis": "ブリスシンボル", + "Bopo": "注音字æ¯", + "Brah": "ブラーフミー文字", + "Brai": "ブライユ点字", + "Bugi": "ブギス文字", + "Buhd": "ブヒッド文字", + "Cakm": "ãƒãƒ£ã‚¯ãƒžæ–‡å­—", + "Cans": "çµ±åˆã‚«ãƒŠãƒ€å…ˆä½æ°‘音節文字", + "Cari": "カリア文字", + "Cham": "ãƒãƒ£ãƒ æ–‡å­—", + "Cher": "ãƒã‚§ãƒ­ã‚­ãƒ¼æ–‡å­—", + "Cirt": "キアス文字", + "Copt": "コプト文字", + "Cprt": "キプロス文字", + "Cyrl": "キリル文字", + "Cyrs": "å¤ä»£æ•™ä¼šã‚¹ãƒ©ãƒ–語キリル文字", + "Deva": "デーãƒãƒŠãƒ¼ã‚¬ãƒªãƒ¼æ–‡å­—", + "Dsrt": "デセレット文字", + "Dupl": "デュプロワエå¼é€Ÿè¨˜", + "Egyd": "エジプト民衆文字", + "Egyh": "エジプト神官文字", + "Egyp": "エジプトè–刻文字", + "Elba": "エルãƒã‚µãƒ³æ–‡å­—", + "Ethi": "エãƒã‚ªãƒ”ア文字", + "Geok": "ジョージア文字(フツリ)", + "Geor": "ジョージア文字", + "Glag": "グラゴル文字", + "Goth": "ゴート文字", + "Gran": "グランタ文字", + "Grek": "ギリシャ文字", + "Gujr": "グジャラート文字", + "Guru": "グルムキー文字", + "Hanb": "漢語注音字æ¯", + "Hang": "ãƒãƒ³ã‚°ãƒ«", + "Hani": "漢字", + "Hano": "ãƒãƒŒãƒŽã‚ªæ–‡å­—", + "Hans": "簡体字", + "Hant": "ç¹ä½“å­—", + "Hebr": "ヘブライ文字", + "Hira": "ã²ã‚‰ãŒãª", + "Hluw": "アナトリア象形文字", + "Hmng": "パãƒã‚¦ãƒ»ãƒ•モン文字", + "Hrkt": "ä»®å", + "Hung": "å¤ä»£ãƒãƒ³ã‚¬ãƒªãƒ¼æ–‡å­—", + "Inds": "インダス文字", + "Ital": "å¤ã‚¤ã‚¿ãƒªã‚¢æ–‡å­—", + "Jamo": "å­—æ¯", + "Java": "ジャワ文字", + "Jpan": "æ—¥æœ¬èªžã®æ–‡å­—", + "Jurc": "女真文字", + "Kali": "カヤー文字", + "Kana": "カタカナ", + "Khar": "カローシュティー文字", + "Khmr": "クメール文字", + "Khoj": "ホジャ文字", + "Knda": "カンナダ文字", + "Kore": "éŸ“å›½èªžã®æ–‡å­—", + "Kpel": "クペレ文字", + "Kthi": "カイティ文字", + "Lana": "ラーンナー文字", + "Laoo": "ラオ文字", + "Latf": "ラテン文字(ドイツ文字)", + "Latg": "ラテン文字 (ゲール文字)", + "Latn": "ラテン文字", + "Lepc": "レプãƒãƒ£æ–‡å­—", + "Limb": "リンブ文字", + "Lina": "線文字A", + "Linb": "線文字B", + "Lisu": "フレイザー文字", + "Loma": "ロマ文字", + "Lyci": "リキア文字", + "Lydi": "リディア文字", + "Mahj": "マãƒãƒ¼ã‚¸ãƒ£ãƒ‹ãƒ¼æ–‡å­—", + "Mand": "マンダ文字", + "Mani": "マニ文字", + "Maya": "マヤ象形文字", + "Mend": "メンデ文字", + "Merc": "ãƒ¡ãƒ­ã‚¨æ–‡å­—è‰æ›¸ä½“", + "Mero": "メロエ文字", + "Mlym": "マラヤーラム文字", + "Modi": "モーディー文字", + "Mong": "モンゴル文字", + "Moon": "ムーン文字", + "Mroo": "ムロ文字", + "Mtei": "メイテイ文字", + "Mymr": "ミャンマー文字", + "Narb": "å¤ä»£åŒ—アラビア文字", + "Nbat": "ナãƒãƒ†ã‚¢æ–‡å­—", + "Nkgb": "ナシæ—ã‚²ãƒæ–‡å­—", + "Nkoo": "ンコ文字", + "Nshu": "女書", + "Ogam": "オガム文字", + "Olck": "オルãƒã‚­æ–‡å­—", + "Orkh": "オルホン文字", + "Orya": "オリヤー文字", + "Osma": "オスマニア文字", + "Palm": "パルミラ文字", + "Pauc": "パウ・ãƒãƒ³ãƒ»ãƒã‚¦æ–‡å­—", + "Perm": "å¤ãºãƒ«ãƒ æ–‡å­—", + "Phag": "パスパ文字", + "Phli": "碑文パフラヴィー文字", + "Phlp": "詩編用パフラヴィー文字", + "Phlv": "書物用パフラヴィー文字", + "Phnx": "フェニキア文字", + "Plrd": "ãƒãƒ©ãƒ¼ãƒ‰éŸ³å£°è¨˜å·", + "Prti": "碑文パルティア文字", + "Rjng": "ルジャン文字", + "Roro": "ロンゴロンゴ文字", + "Runr": "ルーン文字", + "Samr": "サマリア文字", + "Sara": "サラティ文字", + "Sarb": "å¤ä»£å—アラビア文字", + "Saur": "サウラーシュトラ文字", + "Sgnw": "手話文字", + "Shaw": "ショー文字", + "Shrd": "シャーラダー文字", + "Sidd": "梵字", + "Sind": "クダワディ文字", + "Sinh": "シンãƒãƒ©æ–‡å­—", + "Sora": "ソラング・ソンペング文字", + "Sund": "スンダ文字", + "Sylo": "シロティ・ナグリ文字", + "Syrc": "シリア文字", + "Syre": "シリア文字(エストランゲロ文字)", + "Syrj": "シリア文字(西方シリア文字)", + "Syrn": "シリア文字(æ±æ–¹ã‚·ãƒªã‚¢æ–‡å­—)", + "Tagb": "ã‚¿ã‚°ãƒãƒ³ãƒ¯æ–‡å­—", + "Takr": "タークリー文字", + "Tale": "タイ・レ文字", + "Talu": "新タイ・ルー文字", + "Taml": "タミール文字", + "Tang": "è¥¿å¤æ–‡å­—", + "Tavt": "タイ・ヴェト文字", + "Telu": "テルグ文字", + "Teng": "テングワール文字", + "Tfng": "ティフナグ文字", + "Tglg": "タガログ文字", + "Thaa": "ターナ文字", + "Thai": "タイ文字", + "Tibt": "ãƒãƒ™ãƒƒãƒˆæ–‡å­—", + "Tirh": "ティルフータ文字", + "Ugar": "ウガリット文字", + "Vaii": "ヴァイ文字", + "Visp": "視話法", + "Wara": "ãƒãƒ©ãƒ³ãƒ»ã‚¯ã‚·ãƒ†ã‚£æ–‡å­—", + "Wole": "ウォレアイ文字", + "Xpeo": "å¤ä»£ãƒšãƒ«ã‚·ã‚¢æ–‡å­—", + "Xsux": "シュメールï¼ã‚¢ãƒƒã‚«ãƒ‰èªžæ¥”形文字", + "Yiii": "イ文字", + "Zinh": "基底文字ã®ç¨®åˆ¥ã‚’継承ã™ã‚‹çµåˆæ–‡å­—", + "Zmth": "数学記å·", + "Zsye": "絵文字", + "Zsym": "è¨˜å·æ–‡å­—", + "Zxxx": "éžè¡¨è¨˜", + "Zyyy": "共通文字", + "Zzzz": "未定義文字" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ka.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ka.json new file mode 100644 index 0000000000000000000000000000000000000000..0069647a70bec12733641a0910fdc739725292e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ka.json @@ -0,0 +1,151 @@ +{ + "Version": "2.1.29.20", + "Names": { + "Afak": "áƒáƒ¤áƒáƒ™áƒ", + "Arab": "áƒáƒ áƒáƒ‘ული", + "Armi": "იმპერიული áƒáƒ áƒáƒ›áƒ”ული", + "Armn": "სáƒáƒ›áƒ®áƒ£áƒ áƒ˜", + "Avst": "áƒáƒ•ესტური", + "Bali": "ბáƒáƒšáƒ˜áƒ£áƒ áƒ˜", + "Bamu": "ბáƒáƒ›áƒ£áƒ›áƒ˜", + "Bass": "ბáƒáƒ¡áƒ ვáƒáƒ°áƒ˜", + "Batk": "ბáƒáƒ¢áƒáƒ™áƒ˜", + "Beng": "ბენგáƒáƒšáƒ£áƒ áƒ˜", + "Blis": "ბლისსიმბáƒáƒšáƒáƒ”ბი", + "Bopo": "ბáƒáƒžáƒáƒ›áƒáƒ¤áƒ", + "Brah": "ბრáƒáƒ°áƒ›áƒ˜", + "Brai": "ბრáƒáƒ˜áƒšáƒ˜", + "Buhd": "ბუჰიდი", + "Cakm": "ჩáƒáƒ™áƒ›áƒ", + "Cari": "კáƒáƒ áƒ˜áƒ£áƒšáƒ˜", + "Cham": "ჩáƒáƒ›áƒ˜", + "Cher": "ჩერáƒáƒ™áƒ˜", + "Cirt": "კირთი", + "Copt": "კáƒáƒžáƒ¢áƒ£áƒ áƒ˜", + "Cprt": "კვიპრáƒáƒ¡áƒ£áƒšáƒ˜", + "Cyrl": "კირილიცáƒ", + "Cyrs": "ძველი სლáƒáƒ•ური კირილიცáƒ", + "Deva": "დევáƒáƒœáƒáƒ’áƒáƒ áƒ˜", + "Dsrt": "დეზერეტის", + "Dupl": "დუპლáƒáƒ˜áƒ¡ სტენáƒáƒ’რáƒáƒ¤áƒ˜áƒ", + "Egyd": "ეგვიპტური დემáƒáƒ¢áƒ˜áƒ™áƒ£áƒ áƒ˜", + "Egyh": "ეგვიპტური იერáƒáƒ¢áƒ˜áƒ™áƒ£áƒšáƒ˜", + "Egyp": "ეგვიპტური იერáƒáƒ’ლიფური", + "Ethi": "ეთიáƒáƒžáƒ˜áƒ£áƒ áƒ˜", + "Geok": "ხუცური", + "Geor": "ქáƒáƒ áƒ—ული", + "Glag": "გლáƒáƒ’áƒáƒšáƒ˜áƒªáƒ", + "Goth": "გáƒáƒ—ური", + "Gran": "გრáƒáƒœáƒ—áƒ", + "Grek": "ბერძნული", + "Gujr": "გუჯáƒáƒ áƒáƒ—ული", + "Guru": "გურმუხი", + "Hanb": "ჰáƒáƒœáƒ‘ი", + "Hang": "ჰáƒáƒœáƒ’ული", + "Hani": "ჰáƒáƒœáƒ˜", + "Hano": "ჰáƒáƒœáƒ£áƒœáƒáƒ", + "Hans": "გáƒáƒ›áƒáƒ áƒ¢áƒ˜áƒ•ებული", + "Hant": "ტრáƒáƒ“იციული", + "Hebr": "ებრáƒáƒ£áƒšáƒ˜", + "Hira": "ჰირáƒáƒ’áƒáƒœáƒ", + "Hluw": "áƒáƒœáƒáƒ¢áƒáƒšáƒ˜áƒ£áƒ áƒ˜ იერáƒáƒ’ლიფური", + "Hmng": "ფáƒáƒ°áƒáƒ£-მáƒáƒœáƒ˜", + "Hrkt": "იáƒáƒžáƒáƒœáƒ£áƒ áƒ˜ კáƒáƒœáƒ", + "Hung": "ძველი უნგრული", + "Jamo": "ჯáƒáƒ›áƒ", + "Java": "იáƒáƒ•ური", + "Jpan": "იáƒáƒžáƒáƒœáƒ£áƒ áƒ˜", + "Jurc": "ჯურჯენული", + "Kali": "კáƒáƒ˜áƒáƒ°-ლი", + "Kana": "კáƒáƒ¢áƒáƒ™áƒáƒœáƒ", + "Khar": "ქáƒáƒ áƒáƒ¨áƒ—ი", + "Khmr": "ქმერული", + "Khoj": "ქáƒáƒ¯áƒ™áƒ˜", + "Knda": "კáƒáƒœáƒáƒ“áƒ", + "Kore": "კáƒáƒ áƒ”ული", + "Kpel": "კპელე", + "Kthi": "კáƒáƒ˜áƒ—ი", + "Laoo": "ლáƒáƒáƒ¡áƒ£áƒ áƒ˜", + "Latg": "გელური ლáƒáƒ—ინური", + "Latn": "ლáƒáƒ—ინური", + "Limb": "ლიმბუ", + "Lina": "A-ხáƒáƒ–áƒáƒ•áƒáƒœáƒ˜", + "Linb": "B-ხáƒáƒ–áƒáƒ•áƒáƒœáƒ˜", + "Loma": "ლáƒáƒ›áƒ", + "Lyci": "ლიკიური", + "Lydi": "ლიდიური", + "Mand": "მáƒáƒœáƒ“ეური", + "Mani": "მáƒáƒœáƒ˜áƒ¥áƒ”ური", + "Maya": "მáƒáƒ˜áƒáƒ¡ იერáƒáƒ’ლიფები", + "Mend": "მენდე", + "Merc": "მერáƒáƒ˜áƒ¢áƒ£áƒšáƒ˜ კურსივი", + "Mero": "მერáƒáƒ˜áƒ¢áƒ£áƒšáƒ˜", + "Mlym": "მáƒáƒšáƒáƒ˜áƒáƒšáƒáƒ›áƒ£áƒ áƒ˜", + "Mong": "მáƒáƒœáƒ¦áƒáƒšáƒ£áƒ áƒ˜", + "Mroo": "მრáƒ", + "Mymr": "მიáƒáƒœáƒ›áƒ£áƒ áƒ˜", + "Narb": "ძველი ჩრდილáƒáƒ”თ-áƒáƒ áƒáƒ‘ული", + "Nbat": "ნáƒáƒ‘áƒáƒ¢áƒ”ური", + "Nkoo": "ნკáƒ", + "Nshu": "ნუშუ", + "Ogam": "áƒáƒ¦áƒáƒ›áƒ˜", + "Olck": "áƒáƒš-ჩიკი", + "Orkh": "áƒáƒ áƒ®áƒáƒœáƒ£áƒšáƒ˜", + "Orya": "áƒáƒ áƒ˜áƒ", + "Osma": "áƒáƒ¡áƒ›áƒáƒœáƒ˜áƒ", + "Palm": "პáƒáƒšáƒ›áƒ˜áƒ áƒ£áƒšáƒ˜", + "Perm": "ძველი პერმული", + "Phag": "ფáƒáƒ’სპáƒ", + "Phli": "მáƒáƒœáƒ£áƒ›áƒ”ნტური ფáƒáƒšáƒáƒ£áƒ áƒ˜", + "Phlp": "ფსáƒáƒšáƒ›áƒ£áƒœáƒ£áƒ áƒ˜ ფáƒáƒšáƒáƒ£áƒ áƒ˜", + "Phlv": "წიგნური ფáƒáƒšáƒáƒ£áƒ áƒ˜", + "Phnx": "ფინიკიური", + "Prti": "მáƒáƒœáƒ£áƒ›áƒ”ნტური პáƒáƒ áƒ—ული", + "Rjng": "რეჯáƒáƒœáƒ’ი", + "Roro": "რáƒáƒœáƒ’áƒáƒ áƒáƒœáƒ’áƒ", + "Runr": "რუნული", + "Samr": "სáƒáƒ›áƒáƒ áƒ˜áƒ£áƒšáƒ˜", + "Sara": "სáƒáƒ áƒáƒ¢áƒ˜", + "Sarb": "ძველი სáƒáƒ›áƒ®áƒ áƒ”თ-áƒáƒ áƒáƒ‘ული", + "Saur": "სáƒáƒ£áƒ áƒáƒ¨áƒ¢áƒ áƒ", + "Sgnw": "ჟესტთáƒ", + "Shrd": "შáƒáƒ áƒáƒ“áƒ", + "Sind": "ქუდáƒáƒ•áƒáƒ“ი", + "Sinh": "სინჰáƒáƒšáƒ£áƒ áƒ˜", + "Sora": "სáƒáƒ áƒáƒœ-სáƒáƒ›áƒžáƒ”ნი", + "Sund": "სუნდáƒáƒœáƒ£áƒ áƒ˜", + "Sylo": "სილáƒáƒ¢áƒ˜ ნáƒáƒ’რი", + "Syrc": "სირიული", + "Syre": "სირიული ესტრáƒáƒœáƒ’ელáƒ", + "Syrj": "დáƒáƒ¡áƒáƒ•ლეთი სირიული", + "Syrn": "áƒáƒ¦áƒ›áƒáƒ¡áƒáƒ•ლეთი სირიული", + "Tagb": "ტáƒáƒ’ბáƒáƒœáƒ•áƒ", + "Takr": "ტáƒáƒ™áƒ áƒ˜", + "Tale": "ტáƒáƒ˜ ლე", + "Talu": "áƒáƒ®áƒáƒšáƒ˜ ტáƒáƒ˜ ლიუ", + "Taml": "ტáƒáƒ›áƒ˜áƒšáƒ£áƒ áƒ˜", + "Tang": "ტáƒáƒœáƒ¦áƒ£áƒ¢áƒ£áƒ áƒ˜", + "Tavt": "ტáƒáƒ˜-ვიეტი", + "Telu": "ტელუგუ", + "Teng": "ტენგვáƒáƒ áƒ˜", + "Tfng": "ტიფინáƒáƒ¦áƒ˜", + "Thaa": "თáƒáƒáƒœáƒ", + "Thai": "ტáƒáƒ˜", + "Tibt": "ტიბეტური", + "Tirh": "ტირჰუტáƒ", + "Ugar": "უგáƒáƒ áƒ˜áƒ—ული", + "Vaii": "ვáƒáƒ˜", + "Visp": "ხილული მეტყველებáƒ", + "Wara": "ვáƒáƒ áƒáƒœáƒ’-კშიტი", + "Wole": "ვáƒáƒšáƒ”áƒáƒ˜", + "Xpeo": "ძველი სპáƒáƒ áƒ¡áƒ£áƒšáƒ˜", + "Xsux": "შუმერულ-áƒáƒ¥áƒáƒ“ური ლურსმნული", + "Zinh": "გáƒáƒ“áƒáƒ¦áƒ”ბული", + "Zmth": "მáƒáƒ—ემáƒáƒ¢áƒ˜áƒ™áƒ£áƒ áƒ˜ ნáƒáƒ¢áƒáƒªáƒ˜áƒ", + "Zsye": "Emoji", + "Zsym": "სიმბáƒáƒšáƒáƒ”ბი", + "Zxxx": "უმწერლáƒáƒ‘áƒ", + "Zyyy": "ზáƒáƒ’áƒáƒ“ი", + "Zzzz": "უცნáƒáƒ‘ი დáƒáƒ›áƒ¬áƒ”რლáƒáƒ‘áƒ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/kk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/kk.json new file mode 100644 index 0000000000000000000000000000000000000000..7d6a8a83f871dde8c7f1300b7e8b289df55bdfae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/kk.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "араб жазуы", + "Armn": "армÑн жазуы", + "Beng": "бенгал жазуы", + "Bopo": "бопомофо жазу", + "Brai": "Брайль жазуы", + "Cyrl": "кирилл жазуы", + "Deva": "деванагари жазуы", + "Ethi": "Ñфиоп жазу", + "Geor": "грузин жазуы", + "Grek": "грек жазуы", + "Gujr": "гуджарати жазуы", + "Guru": "гурмукхи жазуы", + "Hanb": "ханб жазуы", + "Hang": "хангыл жазуы", + "Hani": "қытай жазуы", + "Hans": "жеңілдетілген қытай иероглифы", + "Hant": "дәÑтүрлі қытай иероглифы", + "Hebr": "иврит жазуы", + "Hira": "хирагана жазуы", + "Hrkt": "жапон Ñиллабарийі", + "Jamo": "чамо жазуы", + "Jpan": "жапон жазуы", + "Kana": "катакана жазуы", + "Khmr": "кхмер жазуы", + "Knda": "каннада жазуы", + "Kore": "корей жазуы", + "Laoo": "Ð»Ð°Ð¾Ñ Ð¶Ð°Ð·ÑƒÑ‹", + "Latn": "латын жазуы", + "Mlym": "малаÑлам жазуы", + "Mong": "моңғол жазуы", + "Mymr": "мьÑнма жазуы", + "Orya": "Ð¾Ñ€Ð¸Ñ Ð¶Ð°Ð·ÑƒÑ‹", + "Sinh": "Ñингаль жазуы", + "Taml": "тамиль жазуы", + "Telu": "телугу жазуы", + "Thaa": "таана жазуы", + "Thai": "тай жазуы", + "Tibt": "тибет жазуы", + "Zmth": "математикалық жазу", + "Zsye": "Ñмодзи", + "Zsym": "таңбалар", + "Zxxx": "жазуÑыз", + "Zyyy": "жалпы", + "Zzzz": "белгіÑіз жазу" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/km.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/km.json new file mode 100644 index 0000000000000000000000000000000000000000..b129077305a35c77485900249a8f4c6eb3f87025 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/km.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "អារ៉ាប់", + "Armn": "អាមáŸáž“ី", + "Beng": "បង់ក្លាដែស", + "Bopo": "បូផូម៉ូហ្វូ", + "Brai": "អក្សរ​សម្រាប់មនុស្ស​ពិការ​ភ្នែក", + "Cyrl": "ស៊ីរីលីក", + "Deva": "ដាវ៉ាន់ណាការិ", + "Ethi": "អáŸážáŸ’យូពី", + "Geor": "ហ្សកហ្ស៊ី", + "Grek": "ក្រិច", + "Gujr": "គូចារ៉ាទី", + "Guru": "កុមុយឃី", + "Hanb": "ហានបáŸ", + "Hang": "ហាំងកុល", + "Hani": "áž áž¶áž“", + "Hans": "អក្សរ​ចិន​កាážáŸ‹", + "Hant": "អក្សរ​ចិន​ពáŸáž‰", + "Hebr": "អ៊ីស្រាអែល", + "Hira": "ហ៊ីរ៉ាកាណា", + "Hrkt": "សញ្ញាសំឡáŸáž„ភាសាជប៉ុន", + "Jamo": "ចាម៉ូ", + "Jpan": "ជប៉ុន", + "Kana": "កាážáž¶áž€áž¶ážŽáž¶", + "Khmr": "ážáŸ’មែរ", + "Knda": "ážáž¶ážŽáž¶ážŠáž¶", + "Kore": "កូរ៉áŸ", + "Laoo": "ឡាវ", + "Latn": "ឡាážáž¶áŸ†áž„", + "Mlym": "មលយាលáŸáž˜", + "Mong": "ម៉ុងហ្គោលី", + "Mymr": "ភូមា", + "Orya": "អូឌៀ", + "Sinh": "ស៊ីនហាឡា", + "Taml": "ážáž¶áž˜áž¸áž›", + "Telu": "ážáŸáž›áž»áž‚áž»", + "Thaa": "ážáž¶ážŽáž¶", + "Thai": "ážáŸƒ", + "Tibt": "ទីបáŸ", + "Zmth": "និមិážáŸ’ážážŸáž‰áŸ’ញាគណិážážœáž·áž‘្យា", + "Zsye": "សញ្ញាអារម្មណáŸ", + "Zsym": "និមិážáŸ’ážážŸáž‰áŸ’ញា", + "Zxxx": "គ្មានការសរសáŸážš", + "Zyyy": "ទូទៅ", + "Zzzz": "អក្សរមិនស្គាល់" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/kn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/kn.json new file mode 100644 index 0000000000000000000000000000000000000000..c3e69b1401ef4ef1093ea2dcbbb57992d90bd7b3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/kn.json @@ -0,0 +1,138 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "ಅರೇಬಿಕà³", + "Armi": "ಇಂಪೀರಿಯಲೠಅರೆಮಾಯಿಕà³", + "Armn": "ಅರà³à²®à³‡à²¨à²¿à²¯à²¨à³", + "Avst": "ಅವೆಸà³à²¤à²¾à²¨à³", + "Bali": "ಬಾಲಿನೀಸà³", + "Batk": "ಬಾಟಕà³", + "Beng": "ಬೆಂಗಾಲಿ", + "Blis": "ಬà³à²²à²¿à²¸à³â€Œà²¸à²¿à²‚ಬಲà³à²¸à³", + "Bopo": "ಬೋಪೊಮೋಫೋ", + "Brah": "ಬà³à²°à²¾à²¹à³à²®à²¿", + "Brai": "ಬà³à²°à³ˆà²²à³", + "Bugi": "ಬಗಿನೀಸà³", + "Buhd": "ಬà³à²¹à²¿à²¦à³", + "Cakm": "ಕಾಕಂ", + "Cans": "ಯà³à²¨à²¿à²Ÿà³†à²¡à³ ಕೆನೆಡಿಯನೠಅಬೊರಿಜಿನಲೠಸಿಲà³à²¯à²¾à²¬à²¿à²•à³à²¸à³", + "Cari": "ಕರೇನà³", + "Cham": "ಚಾಮà³", + "Cher": "ಚೆರೋಕೀ", + "Cirt": "ಸಿರà³à²¥à³", + "Copt": "ಕಾಪà³à²Ÿà²¿à²•à³", + "Cprt": "ಸಿಪà³à²°à²¿à²¯à²¾à²Ÿà³", + "Cyrl": "ಸಿರಿಲಿಕà³", + "Cyrs": "ಪà³à²°à²¾à²šà³€à²¨ ಚರà³à²šà³ ಸà³à²²à³‹à²µà²¾à²¨à²¿à²•ೠಸಿರಿಲಿಕà³", + "Deva": "ದೇವನಾಗರಿ", + "Dsrt": "ಡಸರà³à²Ÿà³", + "Egyd": "ಈಜಿಪà³à²Ÿà²¿à²¯à²¨à³ ಡೆಮೋಟಿಕà³", + "Egyh": "ಈಜಿಪà³à²Ÿà²¿à²¯à²¨à³ ಹಯಾರಿಟಿಕà³", + "Egyp": "ಈಜಿಪà³à²Ÿà²¿à²¯à²¨à³ ಹೀರೋಗà³à²²à²¿à²«à³à²¸à³", + "Ethi": "ಇಥಿಯೋಪಿಕà³", + "Geok": "ಜಾರà³à²œà²¿à²¯à²¨à³ ಖà³à²¸à³à²¤à³à²°à²¿", + "Geor": "ಜಾರà³à²œà²¿à²¯à²¨à³", + "Glag": "ಗà³à²²à²¾à²—ೋಲಿಟಿಕà³", + "Goth": "ಗೋತಿಕà³", + "Grek": "ಗà³à²°à³€à²•à³", + "Gujr": "ಗà³à²œà²°à²¾à²¤à²¿", + "Guru": "ಗà³à²°à³à²®à³à²–ಿ", + "Hanb": "ಹಂಬà³", + "Hang": "ಹà³à²¯à²¾à²‚ಗà³à²²à³", + "Hani": "ಹಾನà³", + "Hano": "ಹನೂನೂ", + "Hans": "ಸರಳೀಕೃತ", + "Hant": "ಸಾಂಪà³à²°à²¦à²¾à²¯à²¿à²•", + "Hebr": "ಹೀಬà³à²°à³‚", + "Hira": "ಹಿರಾಗನ", + "Hmng": "ಪಹವೠಹà³à²®à³‹à²‚ಗà³", + "Hrkt": "ಜಪಾನೀಸೠಸಿಲಬರೀಸà³", + "Hung": "ಪà³à²°à²¾à²šà³€à²¨ ಹಂಗೇರಿಯನà³", + "Inds": "ಸಿಂಧೂ", + "Ital": "ಪà³à²°à²¾à²šà³€à²¨à³ ಇಟಾಲಿಕà³", + "Jamo": "ಜಮೋ", + "Java": "ಜಾವನೀಸà³", + "Jpan": "ಜಾಪನೀಸà³", + "Kali": "ಕೆಯಾ ಲಿ", + "Kana": "ಕಟಕಾನಾ", + "Khar": "ಖರೋಶà³à²¤à²¿", + "Khmr": "ಖಮೇರà³", + "Knda": "ಕನà³à²¨à²¡", + "Kore": "ಕೊರಿಯನà³", + "Kthi": "ಕೈಥಿ", + "Lana": "ಲಾನಾ", + "Laoo": "ಲಾವೋ", + "Latf": "ಫà³à²°à²¾à²•à³à²¤à²°à³ ಲà³à²¯à²¾à²Ÿà²¿à²¨à³", + "Latg": "ಗೇಲಿಕೠಲà³à²¯à²¾à²Ÿà²¿à²¨à³", + "Latn": "ಲà³à²¯à²¾à²Ÿà²¿à²¨à³", + "Lepc": "ಲೆಪà³à²šà²¾", + "Limb": "ಲಿಂಬà³", + "Lina": "ಲೀನಯರೠಎ", + "Linb": "ಲೀನಯರೠಬಿ", + "Lyci": "ಲೈಸಿಯನà³", + "Lydi": "ಲಿಡಿಯನà³", + "Mand": "ಮಂಡೇಯನà³", + "Mani": "ಮನಿಚೈಯನà³", + "Maya": "ಮಯಾನೠಹೀರೋಗà³à²²à²¿à²«à³à²¸à³", + "Mero": "ಮೆರೊಯಿಟಿಕà³", + "Mlym": "ಮಲಯಾಳಂ", + "Mong": "ಮಂಗೋಲಿಯನà³", + "Moon": "ಮೂನà³", + "Mtei": "ಮೈತಿ ಮಯೆಕà³", + "Mymr": "ಮà³à²¯à²¾à²¨à³à²®à²¾à²°à³", + "Nkoo": "ಎನà³â€à²•ೋ", + "Ogam": "ಓಘಮà³", + "Olck": "ಓಲೠಚಿಕಿ", + "Orkh": "ಓರà³à²–ೋನà³", + "Orya": "ಒರಿಯಾ", + "Osma": "ಓಸà³à²®à²¾à²¨à³à²¯à²¾", + "Perm": "ಪà³à²°à²¾à²šà³€à²¨ ಪೆರà³à²®à²¿à²•à³", + "Phag": "ಫಾಗà³à²¸à³-ಪಾ", + "Phli": "ಇನà³à²¸à³â€Œà²•à³à²°à²¿à²ªà³à²¶à²¨à²²à³ ಪಾಹà³à²²à²µà²¿", + "Phlp": "ಸಾಲà³à²Ÿà²°à³ ಪಾಹà³à²²à²µà²¿", + "Phlv": "ಬà³à²•ೠಪಾಹà³à²²à²µà²¿", + "Phnx": "ಫೀನಿಶಿಯನà³", + "Plrd": "ಪೊಲà³à²²à²¾à²°à³à²¡à³ ಫೊನೆಟಿಕà³", + "Prti": "ಇನà³à²¸à³â€Œà²•à³à²°à²¿à²ªà³à²¶à²¨à²²à³ ಪಾರà³à²¥à²¿à²¯à²¨à³", + "Rjng": "ರೆಜಾಂಗà³", + "Roro": "ರೋಂಗೋರೋಂಗೋ", + "Runr": "ರೂನಿಕà³", + "Samr": "ಸಮಾರಿಟನà³", + "Sara": "ಸರಾಟಿ", + "Saur": "ಸೌರಾಷà³à²Ÿà³à²°", + "Sgnw": "ಸೈನà³â€Œà²°à³ˆà²Ÿà²¿à²‚ಗà³", + "Shaw": "ಶಾವಿಯಾನà³", + "Sinh": "ಸಿಂಹಳ", + "Sund": "ಸà³à²‚ಡಾನೀಸà³", + "Sylo": "ಸೈಲೋಟಿ ನಗà³à²°à²¿", + "Syrc": "ಸಿರಿಯಾಕà³", + "Syre": "ಎಸà³à²Ÿà³à²°à²¾à²‚ಜಿಲೋ ಸಿರಿಯಾಕà³", + "Syrj": "ಪಶà³à²šà²¿à²® ಸಿರಿಯಾಕà³", + "Syrn": "ಪೂರà³à²µ ಸಿರಿಯಾಕà³", + "Tagb": "ಟಾಗà³à²¬à²¾à²¨à²µà²¾", + "Tale": "ಥಾಯೠಲಿ", + "Talu": "ನà³à²¯à³‚ ಥಾಯೠಲà³à²‡", + "Taml": "ತಮಿಳà³", + "Tavt": "ಥಾಯೠವಿಯೆಟà³", + "Telu": "ತೆಲà³à²—à³", + "Teng": "ತೆಂಗà³â€Œà²µà²¾à²°à³", + "Tfng": "ಟಿಫಿನಾಘà³", + "Tglg": "ಟà³à²¯à²¾à²—ಲೋಗà³", + "Thaa": "ಥಾನಾ", + "Thai": "ಥಾಯà³", + "Tibt": "ಟಿಬೇಟನà³", + "Ugar": "ಉಗಾರಿಟಿಕà³", + "Vaii": "ವಾಯà³", + "Visp": "ವಿಸಿಬಲೠಸà³à²ªà³€à²šà³", + "Xpeo": "ಪà³à²°à²¾à²šà³€à²¨ ಪರà³à²¶à²¿à²¯à²¨à³", + "Xsux": "ಸà³à²®à³‡à²°à³‹-ಅಕà³à²•ಾಡಿಯನೠಕà³à²¯à³‚ನಿಫಾರà³à²®à³", + "Yiii": "ಯಿ", + "Zinh": "ಇನà³â€à²¹à³†à²°à²¿à²Ÿà³†à²¡à³", + "Zmth": "ಗಣೀತ ಸಂಕೇತಲಿಪಿ", + "Zsye": "ಎಮೋಜಿ", + "Zsym": "ಸಂಕೇತಗಳà³", + "Zxxx": "ಅಲಿಖಿತ", + "Zyyy": "ಸಾಮಾನà³à²¯", + "Zzzz": "ಅಪರಿಚಿತ ಲಿಪಿ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ko.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ko.json new file mode 100644 index 0000000000000000000000000000000000000000..501e3fea82292154a335503ed70adb9212bfff85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ko.json @@ -0,0 +1,170 @@ +{ + "Version": "2.1.29.22", + "Names": { + "Afak": "아파카 문ìž", + "Aghb": "코카시안 알바니아 문ìž", + "Arab": "ì•„ëž ë¬¸ìž", + "Armi": "ì•„ëžì œêµ­ 문ìž", + "Armn": "아르메니아 문ìž", + "Avst": "아베스타 문ìž", + "Bali": "발리 문ìž", + "Bamu": "바뭄 문ìž", + "Bass": "바사바í 문ìž", + "Batk": "ë°”íƒ€í¬ ë¬¸ìž", + "Beng": "벵골 문ìž", + "Blis": "블리스기호 문ìž", + "Bopo": "주ìŒë¶€í˜¸", + "Brah": "브ë¼ë¯¸", + "Brai": "브ë¼ìœ  ì ìž", + "Bugi": "부기 문ìž", + "Buhd": "부히드 문ìž", + "Cakm": "ì°¨í¬ë§ˆ 문ìž", + "Cans": "통합 ìºë‚˜ë‹¤ 토착어", + "Cari": "카리 문ìž", + "Cham": "칸 ê³ ì–´", + "Cher": "체로키 문ìž", + "Cirt": "키르쓰", + "Copt": "콥트 문ìž", + "Cprt": "키프로스 문ìž", + "Cyrl": "키릴 문ìž", + "Cyrs": "고대êµíšŒìЬë¼ë¸Œì–´ 키릴문ìž", + "Deva": "ë°ë°”나가리 문ìž", + "Dsrt": "디저렛 문ìž", + "Dupl": "듀플로ì´ì•ˆ 문ìž", + "Egyd": "고대 ì´ì§‘트 민중문ìž", + "Egyh": "고대 ì´ì§‘트 신관문ìž", + "Egyp": "고대 ì´ì§‘트 신성문ìž", + "Elba": "엘바산 문ìž", + "Ethi": "ì—티오피아 문ìž", + "Geok": "그루지야 쿠츠리 문ìž", + "Geor": "조지아 문ìž", + "Glag": "글ë¼ê³¨ 문ìž", + "Goth": "고트 문ìž", + "Gran": "그란타 문ìž", + "Grek": "그리스 문ìž", + "Gujr": "구ìžë¼íЏ 문ìž", + "Guru": "구르무키 문ìž", + "Hanb": "ì£¼ìŒ ìžëª¨", + "Hang": "한글", + "Hani": "한ìž", + "Hano": "하누누 문ìž", + "Hans": "ê°„ì²´", + "Hant": "번체", + "Hebr": "히브리 문ìž", + "Hira": "히ë¼ê°€ë‚˜", + "Hluw": "아나톨리아 ìƒí˜•문ìž", + "Hmng": "파하우 몽 문ìž", + "Hrkt": "가나", + "Hung": "고대 í—가리 문ìž", + "Inds": "ì¸ë”스 문ìž", + "Ital": "고대 ì´íƒˆë¦¬ì•„ 문ìž", + "Jamo": "ìžëª¨", + "Java": "ìžë°” 문ìž", + "Jpan": "ì¼ë³¸ 문ìž", + "Jurc": "줄첸 문ìž", + "Kali": "카야 리 문ìž", + "Kana": "가타카나", + "Khar": "카로슈티 문ìž", + "Khmr": "í¬ë©”르 문ìž", + "Khoj": "코즈키 문ìž", + "Knda": "칸나다 문ìž", + "Kore": "한국어", + "Kpel": "í¬íŽ ë ˆ 문ìž", + "Kthi": "ì¹´ì´ì‹œ 문ìž", + "Lana": "란나 문ìž", + "Laoo": "ë¼ì˜¤ 문ìž", + "Latf": "ë…ì¼ì‹ 로마ìž", + "Latg": "ì•„ì¼ëžœë“œì‹ 로마ìž", + "Latn": "로마ìž", + "Lepc": "렙차 문ìž", + "Limb": "림부 문ìž", + "Lina": "선형 문ìž(A)", + "Linb": "선형 문ìž(B)", + "Lisu": "프레ì´ì € 문ìž", + "Loma": "로마 문ìž", + "Lyci": "리키아 문ìž", + "Lydi": "리디아 문ìž", + "Mahj": "마하ìžë‹ˆ 문ìž", + "Mand": "만다ì´ì•„ 문ìž", + "Mani": "ë§ˆë‹ˆêµ ë¬¸ìž", + "Maya": "마야 ìƒí˜• 문ìž", + "Mend": "ë©˜ë° ë¬¸ìž", + "Merc": "ë©”ë¡œì— í•„ê¸°ì²´", + "Mero": "ë©”ë¡œì— ë¬¸ìž", + "Mlym": "ë§ë¼ì–„람 문ìž", + "Mong": "몽골 문ìž", + "Moon": "문 문ìž", + "Mroo": "므로 문ìž", + "Mtei": "ë©”ì´í…Œì´ 마옉 문ìž", + "Mymr": "미얀마 문ìž", + "Narb": "옛 ë¶ë¶€ ì•„ë¼ë¹„ì•„ 문ìž", + "Nbat": "나바테아 문ìž", + "Nkgb": "나시 게바 문ìž", + "Nkoo": "ì‘ì½” 문ìž", + "Nshu": "누슈 문ìž", + "Ogam": "오검 문ìž", + "Olck": "올 치키 문ìž", + "Orkh": "오르혼어", + "Orya": "오리야 문ìž", + "Osma": "오스마니아 문ìž", + "Palm": "íŒ”ë¯¸ë¼ ë¬¸ìž", + "Perm": "고대 페름 문ìž", + "Phag": "파스파 문ìž", + "Phli": "명문 팔ë¼ë¹„ 문ìž", + "Phlp": "솔터 팔ë¼ë¹„ 문ìž", + "Phlv": "ë¶ íŒ”ë¼ë¹„ 문ìž", + "Phnx": "페니키아 문ìž", + "Plrd": "í´ë¼ë“œ í‘œìŒ ë¬¸ìž", + "Prti": "명문 파ë¼í‹°ì•„ 문ìž", + "Rjng": "레장 문ìž", + "Roro": "롱고롱고", + "Runr": "룬 문ìž", + "Samr": "사마리아 문ìž", + "Sara": "사ë¼í‹°", + "Sarb": "옛 남부 ì•„ë¼ë¹„ì•„ 문ìž", + "Saur": "사우ë¼ìŠˆíŠ¸ë¼ ë¬¸ìž", + "Sgnw": "수화 문ìž", + "Shaw": "샤비안 문ìž", + "Shrd": "사ë¼ë‹¤ 문ìž", + "Sidd": "실담ìž", + "Sind": "쿠다와디 문ìž", + "Sinh": "ì‹ í• ë¼ ë¬¸ìž", + "Sora": "ì†Œë¼ ì†œíŽ­ 문ìž", + "Sund": "순다 문ìž", + "Sylo": "실헤티 나가리", + "Syrc": "시리아 문ìž", + "Syre": "ì—ìŠ¤íŠ¸ëž‘ê²”ë¡œì‹ ì‹œë¦¬ì•„ 문ìž", + "Syrj": "서부 시리아 문ìž", + "Syrn": "ë™ë¶€ 시리아 문ìž", + "Tagb": "타그반와 문ìž", + "Takr": "타í¬ë¦¬ 문ìž", + "Tale": "íƒ€ì´ ë ˆ 문ìž", + "Talu": "ì‹  íƒ€ì´ ë£¨ì—", + "Taml": "타밀 문ìž", + "Tang": "탕구트 문ìž", + "Tavt": "태국 베트남 문ìž", + "Telu": "텔루구 문ìž", + "Teng": "텡과르 문ìž", + "Tfng": "티피나그 문ìž", + "Tglg": "타갈로그 문ìž", + "Thaa": "타나 문ìž", + "Thai": "íƒ€ì´ ë¬¸ìž", + "Tibt": "티베트 문ìž", + "Tirh": "티르후타 문ìž", + "Ugar": "우가리트 문ìž", + "Vaii": "ë°”ì´ ë¬¸ìž", + "Visp": "시화법", + "Wara": "바랑 í¬ì‹œí‹° 문ìž", + "Wole": "울레아ì´", + "Xpeo": "고대 페르시아 문ìž", + "Xsux": "수메르-아카드어 설형문ìž", + "Yiii": "ì´ ë¬¸ìž", + "Zinh": "구전 문ìž", + "Zmth": "수학 기호", + "Zsye": "ì´ëª¨í‹°ì½˜", + "Zsym": "기호", + "Zxxx": "구전", + "Zyyy": "ì¼ë°˜ 문ìž", + "Zzzz": "알 수 없는 문ìž" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ks.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ks.json new file mode 100644 index 0000000000000000000000000000000000000000..92997f3effa5668c6d75ad212abd27369d3e5f89 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ks.json @@ -0,0 +1,125 @@ +{ + "Version": "2.1.30.6", + "Names": { + "Arab": "اَربی", + "Armn": "اَرمانیَن", + "Avst": "اَویستَن", + "Bali": "بالَنیٖز", + "Batk": "باتَک", + "Beng": "بیٚنگٲلÛ", + "Blis": "بÙÙ„ÙØ³ سÙمبلز", + "Bopo": "بوپوموÙÙˆ", + "Brah": "برٛاÛÙ…ÛŒ", + "Brai": "بریل", + "Bugi": "بÙÚ¯Ùنیٖز", + "Buhd": "بÙÛÙØ¯", + "Cans": "ÛŒÙÙ†ÙÙØ§ÛŒÙÚ‘ کنیڑÙیَن ایٚب آرجÙÙ†ÙŽÙ„ سÙلیبÙÚ©", + "Cari": "کاریَن", + "Cham": "Ú†ÙŽÙ…", + "Cher": "چیٚروکی", + "Cirt": "Ú©ÙØ±ØªÚ¾", + "Copt": "کاپٹÙÚ©", + "Cprt": "Ú©ÙپرایÙÙ¹", + "Cyrl": "سَیرÙÙ„ÙÚ©", + "Cyrs": "پرون چٔرچسلیوونÙÚ© سَیرÙÙ„ÙÚ©", + "Deva": "دیوناگری", + "Dsrt": "ڈیٚسٔریٚٹ", + "Egyd": "Ø§ÙØ¬Ù¾Ø´Ùیَن ÚˆÙماٹÙÚ©", + "Egyh": "Ø§ÙØ¬Ùپشَن ÛَیریٹÙÚ©", + "Egyp": "Ø§ÙØ¬Ùپشَن ÛَیروگلÙپھس", + "Ethi": "Ø§ÙØªÚ¾ÛŒÙˆÙ¾ÙÚ©", + "Geok": "جارجÙیَن کھتسوری", + "Geor": "جارجÙیَن", + "Glag": "گلیگولÙÙ¹ÙÚ©", + "Goth": "گوتھÙÚ©", + "Grek": "گرَنتھا", + "Gujr": "گریٖک", + "Guru": "Ú¯ÙØ¬Ø±Ù²ØªÛ", + "Hang": "ÛØ§Ù†Ù›Ú¯ÙÙ„", + "Hani": "ÛØ§Ù†", + "Hano": "ÛØ§Ù†Ùنوٗ", + "Hans": "سÙمپلÙÙØ§ÛŒÙÚ‘ ÛØ§Ù†", + "Hant": "Ù¹Ø±ÛŒÚ‘ÙØ´ÙŽÙ†ÙŽÙ„", + "Hebr": "ÛÙØ¨Ø±ÙÙˆ", + "Hira": "Ûیٖراگانا", + "Hmng": "Ù¾ÙŽÛØ§Ùˆ مانٛگ", + "Hrkt": "کَٹاکانا یا ÛÙØ±Ø§Ú¯Ø§Ù†Ø§", + "Hung": "پرون Ûَنگیریَن", + "Inds": "اÙنڈَس", + "Ital": "اولڈ اÙٹیلÙÚ©", + "Java": "جاوَنیٖز", + "Jpan": "جیٚپَنیٖز", + "Kali": "کایا Ù„ÛŒ", + "Kana": "کَتاکانا", + "Khar": "خَروشتھی", + "Khmr": "کھٕمیر", + "Knda": "کَنَڑا", + "Kore": "کوریَن", + "Lana": "لانا", + "Laoo": "لاو", + "Latf": "ÙØ±Ù›Ú©ØªÙر لیٹÙÙ†", + "Latg": "گیلÙÚ© لیٹَن", + "Latn": "لیٹÙÙ†", + "Lepc": "لیٚپکا", + "Limb": "Ù„Ùمبوٗ", + "Lina": "لیٖنیَر اے", + "Linb": "لیٖنیَر بی", + "Lyci": "لیسÙیَن", + "Lydi": "لیدÙیَن", + "Mand": "مَندییَن", + "Mani": "مانیشییَن", + "Maya": "مایَن ÛیٖروگلÙÙ¾Ú¾", + "Mero": "Ù…ÙØ±Ø§ÛŒÙ¹ÙÚ©", + "Mlym": "مَلیالَم", + "Mong": "مَنٛگولیَن", + "Moon": "موٗن", + "Mtei": "میتی مایَک", + "Mymr": "مَیَنمار", + "Nkoo": "ایٚن Ú©Ùˆ", + "Ogam": "Ø§ÙˆÚ¯ÛØ§Ù…", + "Olck": "اول Ú†ÙÚ©ÛŒ", + "Orkh": "اورکھون", + "Orya": "اورÙیا", + "Osma": "اوسمانیا", + "Perm": "اولڈ پٔرمÙÚ©", + "Phag": "پھاگس پا", + "Phlv": "بوٗک Ù¾ÙŽÛَلوی", + "Phnx": "Ù¾Ú¾ÙˆÙ†ÙØ´Ùیَن", + "Plrd": "پولاڑ پھونÙÙ¹ÙÚ©", + "Rjng": "ریجَنٛگ", + "Roro": "رونٛگو رونٛگو", + "Runr": "رَنÙÚ©", + "Samr": "سَمارÙÙ¹ÙŽÙ†", + "Sara": "سَراتی", + "Saur": "سوراشٹرا", + "Sgnw": "Ø§ÙØ´Ø§Ø±Ù²ØªÛŒ Ù„ÙÚ©Ú¾Ù²Û’", + "Shaw": "شاویَن", + "Sinh": "سÙÙ†ÛØ§Ù„ا", + "Sund": "سَنڈَنیٖز", + "Sylo": "سیلوتی ناگری", + "Syrc": "سیٖرÙیَک", + "Syre": "ایٚسٹرینجÙلو سیٖرÙیَک", + "Syrj": "Ù…ØºØ±ÙØ¨ÛŒ سیٖریَک", + "Syrn": "مشرَقی سیٖریَک", + "Tagb": "تَگبَنوا", + "Tale": "تَیلیے", + "Talu": "نوٚو تیلو", + "Taml": "تَمÙÙ„", + "Telu": "تیلگوٗ", + "Teng": "تیٚنگوار", + "Tfng": "تÙÙÙناگ", + "Tglg": "تَگَلوگ", + "Thaa": "تھانا", + "Thai": "تھاے", + "Tibt": "ØªÙØ¨ØªÛŒ", + "Ugar": "اÙگارÙÙ¹ÙÚ©", + "Vaii": "واے", + "Visp": "ÙˆÙØ²Ùبٕل سپیٖچ", + "Xpeo": "پرون ÙØ§Ø±Ø³ÛŒ", + "Xsux": "سÙمیرو اکادیَن کوٗنÙÙØ§Ù…", + "Yiii": "یٖی", + "Zxxx": "لیٚکھنَے", + "Zyyy": "عام", + "Zzzz": "اَن Ø²Ù²Ù†Û ÛŒØ§ نا Ù„ÙŽÚ¯ÛÙ• ÛØ§Ø± رَسمÙÙ„ خظ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ky.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ky.json new file mode 100644 index 0000000000000000000000000000000000000000..8196a271c82b9a35fa16c52d7e8085e735feeff2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ky.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "Ðраб", + "Armn": "ÐрмÑн", + "Beng": "Бенгал", + "Bopo": "Бопомофо", + "Brai": "Брейл", + "Cyrl": "Кирилл", + "Deva": "Деванагари", + "Ethi": "Эфиоп", + "Geor": "Грузин", + "Grek": "Грек", + "Gujr": "Гужарати", + "Guru": "Гурмухи", + "Hanb": "Ханб", + "Hang": "Хангул", + "Hani": "Хань", + "Hans": "Жөнөкөйлөштүрүлгөн", + "Hant": "Салттуу", + "Hebr": "Иврит", + "Hira": "Хирагана", + "Hrkt": "Жапон ÑиллабографиÑÑÑ‹", + "Jamo": "Джамо", + "Jpan": "Жапан", + "Kana": "Катакана", + "Khmr": "Кмер", + "Knda": "Каннада", + "Kore": "Корей", + "Laoo": "Лао", + "Latn": "Латын", + "Mlym": "Малайалам", + "Mong": "Монгол", + "Mymr": "Мйанмар", + "Orya": "Орийа", + "Sinh": "Сингала", + "Taml": "Тамил", + "Telu": "Телу", + "Thaa": "Таана", + "Thai": "Тай", + "Tibt": "Тибет", + "Zmth": "Математикалык маани", + "Zsye": "Быйтыкча", + "Zsym": "Белгилер", + "Zxxx": "Жазылбаган", + "Zyyy": "Жалпы", + "Zzzz": "БелгиÑиз жазуу" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/lb.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/lb.json new file mode 100644 index 0000000000000000000000000000000000000000..8f761b01430152ca1f7aa63ef0c96dd20e33e8f1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/lb.json @@ -0,0 +1,127 @@ +{ + "Version": "2.1.28.76", + "Names": { + "Arab": "Arabesch", + "Armi": "Armi", + "Armn": "Armenesch", + "Avst": "Avestesch", + "Bali": "Balinesesch", + "Batk": "Battakesch", + "Beng": "Bengalesch", + "Blis": "Bliss-Symboler", + "Bopo": "Bopomofo", + "Brah": "Brahmi", + "Brai": "Blanneschrëft", + "Bugi": "Buginesesch", + "Buhd": "Buhid", + "Cans": "UCAS", + "Cari": "Karesch", + "Cham": "Cham", + "Cher": "Cherokee", + "Cirt": "Cirth", + "Copt": "Koptesch", + "Cprt": "Zypriotesch", + "Cyrl": "Kyrillesch", + "Cyrs": "Alkiercheslawesch", + "Deva": "Devanagari", + "Dsrt": "Deseret", + "Egyd": "Egyptesch-Demotesch", + "Egyh": "Egyptesch-Hieratesch", + "Egyp": "Egyptesch Hieroglyphen", + "Ethi": "Ethiopesch", + "Geok": "Khutsuri", + "Geor": "Georgesch", + "Glag": "Glagolitesch", + "Goth": "Gotesch", + "Grek": "Griichesch", + "Gujr": "Gujarati", + "Guru": "Gurmukhi", + "Hang": "Hangul", + "Hani": "Chinesesch", + "Hano": "Hanunoo", + "Hans": "Vereinfacht", + "Hant": "Traditionell", + "Hebr": "Hebräesch", + "Hira": "Hiragana", + "Hmng": "Pahawh Hmong", + "Hrkt": "Katakana oder Hiragana", + "Hung": "Alungaresch", + "Inds": "Indus-Schrëft", + "Ital": "Alitalesch", + "Java": "Javanesesch", + "Jpan": "Japanesch", + "Kali": "Kayah Li", + "Kana": "Katakana", + "Khar": "Kharoshthi", + "Khmr": "Khmer", + "Knda": "Kannada", + "Kore": "Koreanesch", + "Lana": "Lanna", + "Laoo": "Laotesch", + "Latf": "Laténgesch-Fraktur-Variant", + "Latg": "Laténgesch-Gällesch Variant", + "Latn": "Laténgesch", + "Lepc": "Lepcha", + "Limb": "Limbu", + "Lina": "Linear A", + "Linb": "Linear B", + "Lyci": "Lykesch", + "Lydi": "Lydesch", + "Mand": "Mandäesch", + "Mani": "Manichäesch", + "Maya": "Maya-Hieroglyphen", + "Mero": "Meroitesch", + "Mlym": "Malaysesch", + "Mong": "Mongolesch", + "Moon": "Moon", + "Mtei": "Meitei Mayek", + "Mymr": "Birmanesch", + "Nkoo": "N’Ko", + "Ogam": "Ogham", + "Olck": "Ol Chiki", + "Orkh": "Orchon-Runen", + "Orya": "Oriya", + "Osma": "Osmanesch", + "Perm": "Alpermesch", + "Phag": "Phags-pa", + "Phlv": "Pahlavi", + "Phnx": "Phönizesch", + "Plrd": "Pollard Phonetesch", + "Rjng": "Rejang", + "Roro": "Rongorongo", + "Runr": "Runeschrëft", + "Samr": "Samaritanesch", + "Sara": "Sarati", + "Saur": "Saurashtra", + "Sgnw": "Zeechesprooch", + "Shaw": "Shaw-Alphabet", + "Sinh": "Singhalesesch", + "Sund": "Sundanesesch", + "Sylo": "Syloti Nagri", + "Syrc": "Syresch", + "Syre": "Syresch-Estrangelo-Variant", + "Syrj": "Westsyresch", + "Syrn": "Ostsyresch", + "Tale": "Tai Le", + "Talu": "Tai Lue", + "Taml": "Tamilesch", + "Telu": "Telugu", + "Teng": "Tengwar", + "Tfng": "Tifinagh", + "Tglg": "Dagalog", + "Thaa": "Thaana", + "Thai": "Thai", + "Tibt": "Tibetesch", + "Ugar": "Ugaritesch", + "Vaii": "Vai", + "Visp": "Siichtbar Sprooch", + "Xpeo": "Alpersesch", + "Xsux": "Sumeresch-akkadesch Keilschrëft", + "Yiii": "Yi", + "Zinh": "Geierfte Schrëftwäert", + "Zsym": "Symboler", + "Zxxx": "Ouni Schrëft", + "Zyyy": "Onbestëmmt", + "Zzzz": "Oncodéiert Schrëft" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/lo.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/lo.json new file mode 100644 index 0000000000000000000000000000000000000000..e8f49db41295a9f0ebc87347f43fc19bad108277 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/lo.json @@ -0,0 +1,165 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "ອັບຟາàºàº²", + "Arab": "ອາຣາບິàº", + "Armi": "ອິມພີຮຽນ ອາເມອິàº", + "Armn": "ອາເມນຽນ", + "Avst": "ອະເວສຕະ", + "Bali": "ບາລີ", + "Bamu": "ບາມູມ", + "Bass": "ບັດຊາ", + "Batk": "ບາຕັàº", + "Beng": "ເບັງàºàº²", + "Blis": "ບລິàºàºŠàº´àº¡à»‚ບລສ", + "Bopo": "ຈູ້ອິນ", + "Brah": "ພຮາຫມີ", + "Brai": "ເບຣວ", + "Bugi": "ບູàºàº´àºª", + "Buhd": "ບູຮິດ", + "Cakm": "ຊາàºàº¡àº²", + "Cans": "ສັນàºàº²àº¥àº±àºàºŠàº»àº™à»€àºœàº»à»ˆàº²àºžàº·à»‰àº™à»€àº¡àº·àº­àº‡à»àº„ນນາດາ", + "Cari": "ຄາເຮàº", + "Cham": "ຈາມ", + "Cher": "ເຊໂຮàºàºµ", + "Cirt": "ເຊີຮ", + "Copt": "ຄອບຕິàº", + "Cprt": "ໄຊເປàº", + "Cyrl": "ຊີຣິວລິàº", + "Cyrs": "ເຊຮັດສລາ ໂວນິàºàºŠàºµàº®àº´àºàº¥àº´àºà»‚ບຮານ", + "Deva": "ດີວານາàºàº²àº£àºµ", + "Dsrt": "ເດເຊເຮ", + "Dupl": "ຊົວເລດັບໂລàºàº±àº™", + "Egyd": "ດີໂມຕິàºàº­àºµàºàº´àºš", + "Egyh": "ເຮàºàº®àº²àº•ິàºàº­àºµàºàº´àºš", + "Egyp": "ເຮàºà»‚ຮàºàº¥àº´àºŸàº­àºµàºàº´àºš", + "Ethi": "ອີທິໂອປິàº", + "Geok": "ຄອດຊູຮີຈà»à»€àºˆàº", + "Geor": "ຈà»àºˆàº½àº™", + "Glag": "àºàº¥àº²à»‚àºàº¥àº´àº•ິàº", + "Goth": "ໂàºàº®àº´àº", + "Gran": "ເຄນທາ", + "Grek": "àºàº£àºµàº", + "Gujr": "ຈູຈາຣາທີ", + "Guru": "àºàº»àº§àº¡àº¹àº„ີ", + "Hanb": "ຮັນ", + "Hang": "ຮັນàºàº¹àº™", + "Hani": "ຮານ", + "Hano": "ຮານູໂນໂອ", + "Hans": "à»àºšàºšàº®àº½àºšàº‡à»ˆàº²àº", + "Hant": "à»àºšàºšàº”ັ້ງເດີມ", + "Hebr": "ຮີບຣິວ", + "Hira": "ຣິຣະງະນະ", + "Hluw": "ອັàºàº¥àº®àº°àº­àº²àº™àº²à»‚ຕເລàº", + "Hmng": "ປາເຮາເມັງ", + "Hrkt": "ຕາຕາລາງພະàºàº²àº‡àºžàº²àºªàº²àºàºµà»ˆàº›àº¸à»ˆàº™", + "Hung": "ຮັງàºàº²àº®àºµà»‚ບຮານ", + "Inds": "ອິນດັດ", + "Ital": "ອີຕາລີໂບຮານ", + "Jamo": "ຈາໂມ", + "Java": "ຈາວາ", + "Jpan": "àºàºµà»ˆàº›àº¸à»ˆàº™", + "Jurc": "ຈູຮເຊັນ", + "Kali": "ຄàºàº²", + "Kana": "ຄະຕະàºàº°àº™àº°", + "Khar": "ຂà»à»‚ຮàºàºªàºµ", + "Khmr": "ຂະà»àº¡", + "Khoj": "ຄà»àºˆàº„ີ", + "Knda": "ຄັນນາດາ", + "Kore": "ເàºàº»àº²àº«àº¼àºµ", + "Kpel": "ເປລເລ", + "Kthi": "àºàº²àºàº•ິ", + "Lana": "ລ້ານນາ", + "Laoo": "ລາວ", + "Latf": "ລາຕິນ-ຟຮັ່ງເຕຣ", + "Latg": "ລາຕິນ-à»àºàº¥àº´àº", + "Latn": "ລາຕິນ", + "Lepc": "ເລຊາ", + "Limb": "ລິມບູ", + "Lina": "ລີເນàº", + "Linb": "ລີເນàºàº£", + "Lisu": "ເຟຣເຊຮ", + "Loma": "ໂລມາ", + "Lyci": "ໄລເຊàº", + "Lydi": "ລີເດàº", + "Mand": "à»àº¡àº™àº”ຽນ", + "Mani": "ມານິà»àºŠàº™", + "Maya": "ມາàºàº²à»„ຮໂຮàºàº¥àº´àºš", + "Mend": "ເມນເດ", + "Merc": "ເຄເລີຊີເມໂຮອິຕິàº", + "Mero": "ເມໂຮຕິàº", + "Mlym": "ມາເລຢາລາມ", + "Mong": "ມົງໂàºàº™", + "Moon": "ມູນ", + "Mroo": "ເມໂຮ", + "Mtei": "ເມເທມາເàºàº", + "Mymr": "ມຽນມາ", + "Narb": "ອາຮະເບàºà»€à»œàº·àº­à»‚ບຮານ", + "Nbat": "ນາບາທາທຽນ", + "Nkgb": "àºàºµàºšàº²-ນາຊີ", + "Nkoo": "ເອັນໂàº", + "Nshu": "ນຸຊຸ", + "Ogam": "ອອàºàº„ອນ", + "Olck": "ໂອຊິàºàº´", + "Orkh": "ອອàºàºªàº¡àº±àº™àºàº²", + "Orya": "ໂອເດàº", + "Palm": "ພາລໄມຮິນ", + "Perm": "ເພີມີໂບຮານ", + "Phag": "ຟາàºàºª-ປາ", + "Phli": "ປະຫລາວີອິນສຄິບຊັນà»àº™àº¥", + "Phlp": "ປະຫລາວີຊອດເຕຮ໌", + "Phlv": "ປະຫລາວີບຸàº", + "Phnx": "ຟີນິເຊàº", + "Plrd": "ສັດຕະສາດພà»àº®àº¥àº²", + "Prti": "ພາຮ໌ເທàºàº­àº´àº™àºªàº„ຮິປຊັນà»àº™àº¥", + "Rjng": "ເຮຈັງ", + "Roro": "ຮອງໂàºàº®àº­àº‡à»‚àº", + "Runr": "ຮູນິàº", + "Samr": "ຊາມາເລàº", + "Sara": "ຊາຮາຕິ", + "Sarb": "ອາລະເບàºà»ƒàº•້ໂບຮານ", + "Saur": "ໂສຮັດຕຣະ", + "Sgnw": "ໄຊນ໌ໄຮຕີ້ງ", + "Shaw": "ຊອວຽນ", + "Shrd": "ຊາຮາດາ", + "Sind": "ດຸດາວາດີ", + "Sinh": "ສິນຫາລາ", + "Sora": "ໂສຮາສົມເປັງ", + "Sund": "ຊຸນດາ", + "Sylo": "ຊີໂລຕິນາàºàº£àºµ", + "Syrc": "ຊີເຮàº", + "Syre": "ຊີເຮàºà»€àº­àºªàº—ຮານຈີໂລ", + "Syrj": "ຊີເຮàºàº•າເວັນຕົàº", + "Syrn": "ຊີເຮàºàº•າເວັນອອàº", + "Tagb": "ຕັàºàºšàº±àº™àº§àº²", + "Takr": "ທາຄຮີ", + "Tale": "ໄທເລ", + "Talu": "ໄທລື້ໃà»à»ˆ", + "Taml": "ທາມິລ", + "Tang": "ຕັນàºàº±àº™", + "Tavt": "ໄທຫວຽດ", + "Telu": "ເທລູàºàº¹", + "Teng": "ເທງàºàº§àº²àº®", + "Tfng": "ທີຟີນາàº", + "Tglg": "ຕາàºàº²àº¥àº­àº", + "Thaa": "ທານາ", + "Thai": "ໄທ", + "Tibt": "ທິເບທັນ", + "Tirh": "ເທຮຸທາ", + "Ugar": "àºàº¹àºàº²àº®àº´àº”", + "Vaii": "ໄວ", + "Visp": "ຄຳເວົ້າທີ່ເບີ່ງເຫັນໄດ້", + "Wara": "ວາຮັງàºàºªàº´àº•ິ", + "Wole": "ໂອລີເອ", + "Xpeo": "ເປຮເຊàºà»‚ບຮານ", + "Xsux": "ອັàºàºªàº­àº™àº®àº¹àºšàº›àº¥àºµà»ˆàº¡àºªàº¸à»€àº¡à»€àº®àº-ອັດຄາເດàº", + "Yiii": "àºàºµ", + "Zinh": "ອິນເຮຮິດ", + "Zmth": "ເຄື່ອງà»àº²àºàº—າງຄະນິດສາດ", + "Zsye": "ອີໂມຈິ", + "Zsym": "ສັນàºàº²àº¥àº±àº", + "Zxxx": "ບà»à»ˆàº¡àºµàºžàº²àºªàº²àº‚ຽນ", + "Zyyy": "ສາມັນ", + "Zzzz": "à»àºšàºšàº‚ຽນທີ່ບà»à»ˆàº®àº¹à»‰àºˆàº±àº" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/lt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/lt.json new file mode 100644 index 0000000000000000000000000000000000000000..02b0b2477a1647ed4d07766952e5e931b9b864f1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/lt.json @@ -0,0 +1,172 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "Afaka", + "Aghb": "Kaukazo Albanijos", + "Arab": "arabų", + "Armi": "imperinÄ— aramaikų", + "Armn": "armÄ—nų", + "Avst": "avestano", + "Bali": "BalieÄių", + "Bamu": "Bamum", + "Bass": "Bassa Vah", + "Batk": "batak", + "Beng": "bengalų", + "Blis": "„Bliss“ simboliai", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "brailio", + "Bugi": "buginezų", + "Buhd": "buhid", + "Cakm": "Äakma", + "Cans": "suvienodinti Kanados aborigenų silabiniai", + "Cari": "karių", + "Cham": "Äam", + "Cher": "Äerokių", + "Cirt": "kirt", + "Copt": "koptų", + "Cprt": "kipro", + "Cyrl": "kirilica", + "Cyrs": "senoji bažnytinÄ— slavų kirilica", + "Deva": "devanagari", + "Dsrt": "deseretas", + "Dupl": "DuplojÄ— stenografija", + "Egyd": "Egipto liaudies", + "Egyh": "Egipto žynių", + "Egyp": "egipto hieroglifai", + "Elba": "Elbasano", + "Ethi": "etiopų", + "Geok": "gruzinų kutsuri", + "Geor": "gruzinų", + "Glag": "glagolitik", + "Goth": "gotų", + "Gran": "Granta", + "Grek": "graikų", + "Gujr": "gudžaratų", + "Guru": "gurmuki", + "Hanb": "hanbų", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanuno", + "Hans": "supaprastinti", + "Hant": "tradiciniai", + "Hebr": "hebrajų", + "Hira": "hiragana", + "Hluw": "Anatolijaus hieroglifai", + "Hmng": "pahav hmong", + "Hrkt": "katakana \/ hiragana", + "Hung": "senasis vengrų", + "Inds": "indus", + "Ital": "senasis italų", + "Jamo": "Jamo simboliai", + "Java": "javieÄių", + "Jpan": "japonų", + "Jurc": "Jurchen", + "Kali": "kajah li", + "Kana": "katakana", + "Khar": "karoÅ¡ti", + "Khmr": "khmerų", + "Khoj": "Khojki", + "Knda": "kanadų", + "Kore": "korÄ—jieÄių", + "Kpel": "Kpelų", + "Kthi": "kaithi", + "Lana": "lana", + "Laoo": "laosieÄių", + "Latf": "fraktur lotynų", + "Latg": "gÄ—lų lotynų", + "Latn": "lotynų", + "Lepc": "lepÄa", + "Limb": "limbu", + "Lina": "linijiniai A", + "Linb": "linijiniai B", + "Lisu": "Fraser", + "Loma": "Loma", + "Lyci": "lician", + "Lydi": "lidian", + "Mahj": "Mahadžani", + "Mand": "mandÄ—jų", + "Mani": "maniÄų", + "Maya": "malų hieroglifai", + "Mend": "Mende", + "Merc": "Merojitų rankraÅ¡tinis", + "Mero": "meroitik", + "Mlym": "malajalių", + "Modi": "Modi", + "Mong": "mongolų", + "Moon": "mÅ«n", + "Mroo": "Mro", + "Mtei": "meitei majek", + "Mymr": "birmieÄių", + "Narb": "Senasis Å¡iaurÄ—s arabų", + "Nbat": "NabatÄ—jų", + "Nkgb": "Naxi Geba", + "Nkoo": "enko", + "Nshu": "Nüshu", + "Ogam": "ogham", + "Olck": "ol Äiki", + "Orkh": "orkon", + "Orya": "orijų", + "Osma": "osmanų", + "Palm": "Palmiros", + "Pauc": "Pau Cin Hau", + "Perm": "senieji permÄ—s", + "Phag": "pagsa pa", + "Phli": "raÅ¡ytiniai pahlavi", + "Phlp": "pselter pahlavi", + "Phlv": "buk pahvali", + "Phnx": "foenikų", + "Plrd": "polard fonetinÄ—", + "Prti": "raÅ¡ytiniai partų", + "Rjng": "rejang", + "Roro": "rongorongo", + "Runr": "runų", + "Samr": "samarieÄių", + "Sara": "sarati", + "Sarb": "senoji pietų Arabijos", + "Saur": "sauraÅ¡tra", + "Sgnw": "ženklų raÅ¡tas", + "Shaw": "Å¡avių", + "Shrd": "Å arados", + "Sidd": "Siddham", + "Sind": "Khudawadi", + "Sinh": "sinhalų", + "Sora": "Sora Sompeng", + "Sund": "sundų", + "Sylo": "syloti nagri", + "Syrc": "sirų", + "Syre": "estrangelo sirieÄių", + "Syrj": "vakarų sirų", + "Syrn": "rytų sirų", + "Tagb": "tagbanva", + "Takr": "Takri", + "Tale": "tai le", + "Talu": "naujasis Tailando lue", + "Taml": "tamilų", + "Tang": "Tangut", + "Tavt": "tai vet", + "Telu": "telugų", + "Teng": "tengvar", + "Tfng": "tifinag", + "Tglg": "tagalogų", + "Thaa": "hana", + "Thai": "tajų", + "Tibt": "tibetieÄių", + "Tirh": "Tirhuta", + "Ugar": "ugaritik", + "Vaii": "vai", + "Visp": "matoma kalba", + "Wara": "Varang Kshiti", + "Wole": "Woleai", + "Xpeo": "senieji persų", + "Xsux": "Å umero Akado dantiraÅ¡tis", + "Yiii": "ji", + "Zinh": "paveldÄ—tas", + "Zmth": "matematiniai simboliai", + "Zsye": "jaustukai", + "Zsym": "simbolių", + "Zxxx": "neparaÅ¡yta", + "Zyyy": "bendri", + "Zzzz": "nežinomi raÅ¡menys" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/lv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/lv.json new file mode 100644 index 0000000000000000000000000000000000000000..bece1e64abdc78978c0e82c32282450d31800a65 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/lv.json @@ -0,0 +1,82 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "arÄbu", + "Armi": "aramieÅ¡u", + "Armn": "armēņu", + "Bali": "balieÅ¡u", + "Beng": "bengÄļu", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "Braila raksts", + "Cher": "irokÄ“zu", + "Copt": "koptu", + "Cyrl": "kirilica", + "Cyrs": "senslÄvu", + "Deva": "devÄnagÄri", + "Egyd": "demotiskais raksts", + "Egyh": "hierÄtiskais raksts", + "Egyp": "ēģiptieÅ¡u hieroglifi", + "Ethi": "etiopieÅ¡u", + "Geor": "gruzÄ«nu", + "Goth": "gotu", + "Grek": "grieÄ·u", + "Gujr": "gudžaratu", + "Guru": "pandžabu", + "Hanb": "Ä·Ä«nieÅ¡u hanb", + "Hang": "hangila", + "Hani": "Ä·Ä«nieÅ¡u", + "Hans": "vienkÄrÅ¡otÄ", + "Hant": "tradicionÄlÄ", + "Hebr": "ivrits", + "Hira": "hiragana", + "Hrkt": "katakana vai hiragana", + "Hung": "senungÄru", + "Ital": "vecitÄļu", + "Jamo": "džamo", + "Java": "javieÅ¡u", + "Jpan": "japÄņu", + "Kana": "katakana", + "Khmr": "khmeru", + "Knda": "kannadu", + "Kore": "korejieÅ¡u", + "Laoo": "laosieÅ¡u", + "Latn": "latīņu", + "Lina": "lineÄrÄ A", + "Linb": "lineÄrÄ B", + "Lydi": "lÄ«dieÅ¡u", + "Maya": "maiju", + "Mlym": "malajalu", + "Mong": "mongoļu", + "Moon": "MÅ«na raksts", + "Mymr": "birmieÅ¡u", + "Ogam": "ogamiskais raksts", + "Orya": "oriju", + "Osma": "osmaņu turku", + "Phnx": "feniÄ·ieÅ¡u", + "Roro": "rongorongo", + "Runr": "rÅ«nu raksts", + "Samr": "samarieÅ¡u", + "Sinh": "singÄļu", + "Sund": "zundu", + "Syrc": "sÄ«rieÅ¡u", + "Syrj": "rietumsÄ«rieÅ¡u", + "Syrn": "austrumsÄ«rieÅ¡u", + "Taml": "tamilu", + "Telu": "telugu", + "Tglg": "tagalu", + "Thaa": "taana", + "Thai": "taju", + "Tibt": "tibetieÅ¡u", + "Xpeo": "senperieÅ¡u", + "Xsux": "Å¡umeru-akadieÅ¡u ķīļraksts", + "Yiii": "ji", + "Zinh": "mantotÄ", + "Zmth": "matemÄtiskais pieraksts", + "Zsye": "emocijzÄ«mes", + "Zsym": "simboli", + "Zxxx": "bez rakstÄ«bas", + "Zyyy": "vispÄrÄ“jÄ", + "Zzzz": "nezinÄma rakstÄ«ba" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/meta.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..c984647a8d61c6cdc14d1fac2e5edec8dac3a067 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/meta.json @@ -0,0 +1,228 @@ +{ + "Version": "2.1.30.58", + "Scripts": [ + "Adlm", + "Afak", + "Aghb", + "Ahom", + "Arab", + "Armi", + "Armn", + "Avst", + "Bali", + "Bamu", + "Bass", + "Batk", + "Beng", + "Bhks", + "Blis", + "Bopo", + "Brah", + "Brai", + "Bugi", + "Buhd", + "Cakm", + "Cans", + "Cari", + "Cham", + "Cher", + "Cirt", + "Copt", + "Cprt", + "Cyrl", + "Cyrs", + "Deva", + "Dsrt", + "Dupl", + "Egyd", + "Egyh", + "Egyp", + "Elba", + "Ethi", + "Geok", + "Geor", + "Glag", + "Goth", + "Gran", + "Grek", + "Gujr", + "Guru", + "Hanb", + "Hang", + "Hani", + "Hano", + "Hans", + "Hant", + "Hatr", + "Hebr", + "Hira", + "Hluw", + "Hmng", + "Hrkt", + "Hung", + "Inds", + "Ital", + "Jamo", + "Java", + "Jpan", + "Jurc", + "Kali", + "Kana", + "Khar", + "Khmr", + "Khoj", + "Knda", + "Kore", + "Kpel", + "Kthi", + "Lana", + "Laoo", + "Latf", + "Latg", + "Latn", + "Lepc", + "Limb", + "Lina", + "Linb", + "Lisu", + "Loma", + "Lyci", + "Lydi", + "Mahj", + "Mand", + "Mani", + "Marc", + "Maya", + "Mend", + "Merc", + "Mero", + "Mlym", + "Modi", + "Mong", + "Moon", + "Mroo", + "Mtei", + "Mult", + "Mymr", + "Narb", + "Nbat", + "Newa", + "Nkgb", + "Nkoo", + "Nshu", + "Ogam", + "Olck", + "Orkh", + "Orya", + "Osge", + "Osma", + "Palm", + "Pauc", + "Perm", + "Phag", + "Phli", + "Phlp", + "Phlv", + "Phnx", + "Plrd", + "Prti", + "Qaaa", + "Qaab", + "Qaac", + "Qaad", + "Qaae", + "Qaaf", + "Qaag", + "Qaah", + "Qaak", + "Qaal", + "Qaam", + "Qaan", + "Qaao", + "Qaap", + "Qaaq", + "Qaar", + "Qaas", + "Qaat", + "Qaau", + "Qaav", + "Qaaw", + "Qaax", + "Qaay", + "Qaaz", + "Qaba", + "Qabb", + "Qabc", + "Qabd", + "Qabe", + "Qabf", + "Qabg", + "Qabh", + "Qabi", + "Qabj", + "Qabk", + "Qabl", + "Qabm", + "Qabn", + "Qabo", + "Qabp", + "Qabq", + "Qabr", + "Qabs", + "Qabt", + "Qabu", + "Qabv", + "Qabw", + "Qabx", + "Rjng", + "Roro", + "Runr", + "Samr", + "Sara", + "Sarb", + "Saur", + "Sgnw", + "Shaw", + "Shrd", + "Sidd", + "Sind", + "Sinh", + "Sora", + "Sund", + "Sylo", + "Syrc", + "Syre", + "Syrj", + "Syrn", + "Tagb", + "Takr", + "Tale", + "Talu", + "Taml", + "Tang", + "Tavt", + "Telu", + "Teng", + "Tfng", + "Tglg", + "Thaa", + "Thai", + "Tibt", + "Tirh", + "Ugar", + "Vaii", + "Visp", + "Wara", + "Wole", + "Xpeo", + "Xsux", + "Yiii", + "Zinh", + "Zmth", + "Zsye", + "Zsym", + "Zxxx", + "Zyyy", + "Zzzz" + ] +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/mk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/mk.json new file mode 100644 index 0000000000000000000000000000000000000000..90f45cfcec9bfc169ca159abe945f01b611e1e8d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/mk.json @@ -0,0 +1,172 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "афака", + "Aghb": "кавкаÑкоалбанÑки", + "Arab": "арапÑко пиÑмо", + "Armi": "царÑкоарамејÑки", + "Armn": "ерменÑко пиÑмо", + "Avst": "авеÑтанÑко", + "Bali": "балиÑко", + "Bamu": "бамумÑко", + "Bass": "баÑа", + "Batk": "батачко", + "Beng": "бенгалÑко пиÑмо", + "Blis": "блиÑÑимболи", + "Bopo": "бопомофо", + "Brah": "брами", + "Brai": "брајово пиÑмо", + "Bugi": "бугиÑко", + "Buhd": "бухидÑко", + "Cakm": "чакманÑко", + "Cans": "канадÑко Ñлоговно", + "Cari": "кариÑко", + "Cham": "чамÑко", + "Cher": "черокиÑко", + "Cirt": "кирт", + "Copt": "коптÑко", + "Cprt": "кипарÑко", + "Cyrl": "кирилÑко пиÑмо", + "Cyrs": "ÑтароÑловенÑка кирилица", + "Deva": "деванагари", + "Dsrt": "дезеретÑко", + "Dupl": "Диплојеево ÑтенографÑко", + "Egyd": "египетÑко демотÑко", + "Egyh": "египетÑко хиератÑко", + "Egyp": "египетÑки хиероглифи", + "Elba": "елбаÑанÑко", + "Ethi": "етиопÑко пиÑмо", + "Geok": "грузиÑки хуцури", + "Geor": "грузиÑко пиÑмо", + "Glag": "глаголица", + "Goth": "готÑко", + "Gran": "гранта", + "Grek": "грчко пиÑмо", + "Gujr": "гуџарати", + "Guru": "гурмуки", + "Hanb": "ханб", + "Hang": "хангул", + "Hani": "ханÑко пиÑмо", + "Hano": "хануноовÑко", + "Hans": "поедноÑтавено", + "Hant": "традиционално", + "Hebr": "хебрејÑко пиÑмо", + "Hira": "хирагана", + "Hluw": "анадолÑки хиероглифи", + "Hmng": "пахауанÑко хмоншко", + "Hrkt": "јапонÑко Ñлоговно", + "Hung": "ÑтароунгарÑко", + "Inds": "харапÑко", + "Ital": "ÑтароиталÑко", + "Jamo": "џамо", + "Java": "јаванÑко", + "Jpan": "јапонÑко пиÑмо", + "Jurc": "џурченÑко", + "Kali": "каја ли", + "Kana": "катакана", + "Khar": "карошти", + "Khmr": "кмерÑко пиÑмо", + "Khoj": "хоџки", + "Knda": "каннада", + "Kore": "корејÑко пиÑмо", + "Kpel": "кпелÑко", + "Kthi": "кајти", + "Lana": "ланÑко", + "Laoo": "лаошко пиÑмо", + "Latf": "фрактурна латиница", + "Latg": "гелÑка латиница", + "Latn": "латинично пиÑмо", + "Lepc": "лепчанÑко", + "Limb": "лимбу", + "Lina": "линеарно Ð", + "Linb": "линеарно Б", + "Lisu": "Фрејзерово", + "Loma": "ломÑко", + "Lyci": "ликиÑко", + "Lydi": "лидиÑко", + "Mahj": "махаџани", + "Mand": "мандејÑко", + "Mani": "манихејÑко", + "Maya": "мајанÑки хиероглифи", + "Mend": "мендÑко", + "Merc": "мероитÑко ракопиÑно", + "Mero": "мероитÑко", + "Mlym": "малајаламÑко пиÑмо", + "Modi": "моди", + "Mong": "монголÑко пиÑмо", + "Moon": "Муново", + "Mroo": "мро", + "Mtei": "мејтејÑко", + "Mymr": "мјанмарÑко пиÑмо", + "Narb": "ÑтароÑеверноарапÑко", + "Nbat": "набатејÑко", + "Nkgb": "наÑиÑка геба", + "Nkoo": "нко", + "Nshu": "нишу", + "Ogam": "огам", + "Olck": "ол чики", + "Orkh": "ÑтаротурÑко", + "Orya": "оријанÑко пиÑмо", + "Osma": "ÑомалиÑко", + "Palm": "палмирÑко", + "Pauc": "Паучинхауово", + "Perm": "ÑтаропермÑко", + "Phag": "пагÑпа", + "Phli": "натпиÑно ÑредноперÑиÑко", + "Phlp": "пÑалтирÑко ÑредноперÑиÑко", + "Phlv": "книжевно ÑтароперÑиÑко", + "Phnx": "феникиÑко", + "Plrd": "Полардово", + "Prti": "натпиÑно партиÑко", + "Rjng": "реџаншко", + "Roro": "ронгоронго", + "Runr": "рунÑко", + "Samr": "ÑамарјанÑко", + "Sara": "Ñарати", + "Sarb": "ÑтаројужноарапÑко", + "Saur": "ÑаураштранÑко", + "Sgnw": "знаковно пишување", + "Shaw": "Шоово", + "Shrd": "шарада", + "Sidd": "Ñидам", + "Sind": "кудабади", + "Sinh": "ÑинхалÑко пиÑмо", + "Sora": "Ñоранг Ñомпенг", + "Sund": "ÑунданÑко", + "Sylo": "ÑилхетÑко нагари", + "Syrc": "ÑириÑко", + "Syre": "еÑтрангелÑко ÑириÑко", + "Syrj": "западноÑириÑко", + "Syrn": "иÑточноÑириÑко", + "Tagb": "тагбанванÑко", + "Takr": "такри", + "Tale": "тај ле", + "Talu": "ново тај луе", + "Taml": "тамилÑко пиÑмо", + "Tang": "тангутÑко", + "Tavt": "тај вјет", + "Telu": "телугу", + "Teng": "тенгвар", + "Tfng": "тифинаг", + "Tglg": "тагалошко", + "Thaa": "тана", + "Thai": "тајландÑко пиÑмо", + "Tibt": "тибетÑко пиÑмо", + "Tirh": "тирхута", + "Ugar": "угаритÑко", + "Vaii": "вај", + "Visp": "видлив говор", + "Wara": "варанг кшити", + "Wole": "волеајÑко", + "Xpeo": "ÑтароперÑиÑко", + "Xsux": "ÑумероакадÑко клинеÑто", + "Yiii": "ји", + "Zinh": "наÑледено", + "Zmth": "математичка нотација", + "Zsye": "емоџи", + "Zsym": "Ñимболи", + "Zxxx": "без пиÑмо", + "Zyyy": "општо", + "Zzzz": "непознато пиÑмо" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ml.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ml.json new file mode 100644 index 0000000000000000000000000000000000000000..159790dc1a1a32e041fa35ebd3032778872cbd05 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ml.json @@ -0,0 +1,138 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "അറബികàµ", + "Armi": "അർമി", + "Armn": "അർമേനിയൻ", + "Avst": "അവെസàµà´¥àµ»", + "Bali": "ബാലിനീസàµ", + "Batk": "ബടàµà´Ÿà´•àµ", + "Beng": "ബംഗാളി", + "Blis": "à´¬àµà´²à´¿à´¸àµ à´šà´¿à´¤àµà´° ലിപി", + "Bopo": "ബോപàµà´ªàµ‹à´®àµ‹à´«àµ‹", + "Brah": "à´¬àµà´°à´¾à´¹àµà´®à´¿", + "Brai": "à´¬àµà´°àµ†à´¯àµâ€Œà´²à´¿", + "Bugi": "à´¬àµà´—ിനീസàµ", + "Buhd": "à´¬àµà´¹à´¿à´¡àµ", + "Cakm": "à´šà´•à´‚", + "Cans": "à´à´•ീകൃത കനേഡിയൻ ഗോതàµà´°à´²à´¿à´ªà´¿", + "Cari": "ചരിയൻ", + "Cham": "ഛം", + "Cher": "ചെറോകàµà´•à´¿", + "Cirt": "ചിർതàµà´¤àµ", + "Copt": "കോപàµà´±àµà´±à´¿à´•àµ", + "Cprt": "സൈപàµà´°à´¿à´¯àµ‹à´Ÿàµà´Ÿàµ", + "Cyrl": "സിറിലികàµ", + "Cyrs": "à´ªàµà´°à´¾à´¤à´¨ ചർചàµà´šàµ à´¸àµà´²à´µàµ‹à´£à´¿à´•ൠസിറിലികàµ", + "Deva": "ദേവനാഗരി", + "Dsrt": "ഡെസെർടàµà´Ÿàµ", + "Egyd": "ഈജിപàµà´·àµà´¯àµ» ഡിമോടàµà´Ÿà´¿à´•àµ", + "Egyh": "ഈജിപàµà´·àµà´¯àµ» ഹിരാറàµà´±à´¿à´•àµ", + "Egyp": "ഈജിപàµà´·àµà´¯àµ» à´šà´¿à´¤àµà´°à´²à´¿à´ªà´¿", + "Ethi": "à´Žà´¤àµà´¯àµ‹à´ªà´¿à´•àµ", + "Geok": "ജോർജàµà´œà´¿à´¯àµ» à´–àµà´Ÿàµà´¸àµà´°à´¿", + "Geor": "ജോർജàµà´œà´¿à´¯àµ»", + "Glag": "à´—àµà´²à´—ോലിറàµà´±à´¿à´•àµ", + "Goth": "ഗോഥികàµ", + "Grek": "à´—àµà´°àµ€à´•àµà´•àµ", + "Gujr": "à´—àµà´œà´±à´¾à´¤àµà´¤à´¿", + "Guru": "à´—àµà´°àµà´®àµà´–à´¿", + "Hanb": "ഹൻബàµ", + "Hang": "ഹാംഗàµàµ½", + "Hani": "ഹാൻ", + "Hano": "ഹനàµà´¨àµ‚", + "Hans": "ലളിതവൽകàµà´•à´°à´¿à´šàµà´šà´¤àµ", + "Hant": "പരമàµà´ªà´°à´¾à´—തം", + "Hebr": "ഹീബàµà´°àµ", + "Hira": "ഹിരഗാന", + "Hmng": "പഹàµà´µà´¾ ഹമോംഗàµ", + "Hrkt": "ജാപàµà´ªà´¨àµ€à´¸àµ സിലàµà´²à´¬à´±àµ€à´¸àµ", + "Hung": "à´ªàµà´°à´¾à´¤à´¨ ഹംഗേറിയൻ", + "Inds": "സിനàµà´§àµ", + "Ital": "പഴയ ഇറàµà´±à´¾à´²à´¿à´¯àµ»", + "Jamo": "ജാമോ", + "Java": "ജാവനീസàµ", + "Jpan": "ജാപàµà´ªà´¨àµ€à´¸àµ", + "Kali": "കയാ ലി", + "Kana": "à´•à´±àµà´±à´•àµà´•ാന", + "Khar": "ഖരോഷàµà´Ÿà´¿", + "Khmr": "ഖമെർ", + "Knda": "à´•à´¨àµà´¨à´¡", + "Kore": "കൊറിയൻ", + "Kthi": "à´•àµà´¤à´¿", + "Lana": "ലനàµà´¨", + "Laoo": "ലാവോ", + "Latf": "à´«àµà´°à´¾à´•àµà´Ÿàµàµ¼ ലാറàµà´±à´¿àµ»", + "Latg": "ഗെയàµâ€Œà´²à´¿à´•ൠലാറàµà´±à´¿àµ»", + "Latn": "ലാറàµà´±à´¿àµ»", + "Lepc": "ലെപàµà´š", + "Limb": "ലിംബàµ", + "Lina": "സമരേഖയിലàµà´³àµà´³ à´Ž", + "Linb": "ലീനിയർ ബി", + "Lyci": "ലൈസിൻ", + "Lydi": "ലൈഡിയൻ", + "Mand": "മൻഡേയൻ", + "Mani": "മണിചേയൻ", + "Maya": "മായൻ à´šà´¿à´¤àµà´°à´²à´¿à´ªà´¿", + "Mero": "മെറോയിറàµà´±à´¿à´•àµ", + "Mlym": "മലയാളം", + "Mong": "മംഗോളിയൻ", + "Moon": "മൂൺ", + "Mtei": "മേറàµà´±à´¿ മായകàµ", + "Mymr": "à´®àµà´¯à´¾àµ»à´®à´¾àµ¼", + "Nkoo": "എൻകോ", + "Ogam": "ഒഖാം", + "Olck": "ഒൽ à´šà´¿à´•àµà´•à´¿", + "Orkh": "ഒർഖോൺ", + "Orya": "à´’à´¡à´¿à´¯", + "Osma": "à´’à´¸àµâ€Œà´®à´¾à´¨à´¿à´¯", + "Perm": "à´ªàµà´°à´¾à´¤à´¨ പെർമികàµ", + "Phag": "ഫഗസൠപ", + "Phli": "à´Žà´´àµà´¤àµà´¤àµ പഹൽവി", + "Phlp": "സാൾടàµà´Ÿàµ¼ പഹൽവി", + "Phlv": "പഹൽവി ലിപി", + "Phnx": "ഫിനീഷàµà´¯àµ»", + "Plrd": "പൊളàµà´³à´¾àµ¼à´¡àµ à´¶à´¬àµà´¦à´²à´¿à´ªà´¿", + "Prti": "പൃതി", + "Rjng": "റെജാംഗàµ", + "Roro": "റൊംഗോറൊംഗോ", + "Runr": "à´±àµà´£à´¿à´•àµ", + "Samr": "സമരിയ", + "Sara": "സരതി", + "Saur": "സൗരാഷàµà´Ÿàµà´°", + "Sgnw": "à´šà´¿à´¹àµà´¨à´²à´¿à´ªà´¿", + "Shaw": "ഷാവിയൻ", + "Sinh": "സിംഹള", + "Sund": "സനàµà´¤à´¾à´¨àµ€à´¸àµ", + "Sylo": "സൈലോതി നാഗരി", + "Syrc": "സിറിയകàµà´•àµ", + "Syre": "à´Žà´¸àµà´±àµà´±àµà´°à´¾à´‚à´—àµà´²àµ‹ സിറിയകàµ", + "Syrj": "പശàµà´šà´¿à´®à´¸àµà´±à´¿à´¯à´¾à´¨à´¿", + "Syrn": "à´•à´¿à´´à´•àµà´•ൻ സിറിയകàµ", + "Tagb": "തഗàµà´¬àµ»à´µà´¾", + "Tale": "തായൠലേ", + "Talu": "à´ªàµà´¤à´¿à´¯ തായൠലàµà´¯àµ‚", + "Taml": "തമിഴàµ", + "Tavt": "à´¤àµà´µà´Ÿàµ", + "Telu": "തെലàµà´™àµà´•àµ", + "Teng": "തെംഗàµà´µàµ¼", + "Tfng": "തിഫിനാഗàµ", + "Tglg": "തഗലോഗàµ", + "Thaa": "ഥാന", + "Thai": "തായàµ", + "Tibt": "ടിബറàµà´±àµ»", + "Ugar": "ഉഗàµà´°àµˆà´±àµà´±à´¿à´•àµ", + "Vaii": "വൈ", + "Visp": "ദൃശàµà´¯à´­à´¾à´·", + "Xpeo": "പഴയ പേർഷàµà´¯àµ»", + "Xsux": "à´¸àµà´®àµ‡à´±àµ‹ à´…à´•àµà´•ാഡിയൻ à´•àµà´¯àµà´£à´¿à´«àµ‹à´‚", + "Yiii": "യി", + "Zinh": "പാരമàµà´ªà´°àµà´¯à´®à´¾à´¯", + "Zmth": "ഗണിത രൂപം", + "Zsye": "ഇമോജി", + "Zsym": "à´šà´¿à´¹àµà´¨à´™àµà´™àµ¾", + "Zxxx": "à´Žà´´àµà´¤à´ªàµà´ªàµ†à´Ÿà´¾à´¤àµà´¤à´¤àµ", + "Zyyy": "സാധാരണ", + "Zzzz": "à´…à´œàµà´žà´¾à´¤ ലിപി" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/mn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/mn.json new file mode 100644 index 0000000000000000000000000000000000000000..7a51c2ffd89a82d84779c57e17c38493c693dd5f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/mn.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "араб", + "Armn": "армени", + "Beng": "бенгал", + "Bopo": "вопомофо", + "Brai": "брайл", + "Cyrl": "кирилл", + "Deva": "деванагари", + "Ethi": "Ñтиоп", + "Geor": "гүрж", + "Grek": "грек", + "Gujr": "гүжарати", + "Guru": "гурмукхи", + "Hanb": "ханб", + "Hang": "хангул", + "Hani": "хан", + "Hans": "Ñ…ÑлбаршуулÑан", + "Hant": "уламжлалт", + "Hebr": "еврей", + "Hira": "хирагана", + "Hrkt": "Ñпон Ñ…Ñлний үеийн цагаан толгой", + "Jamo": "жамо", + "Jpan": "Ñпон", + "Kana": "катакана", + "Khmr": "кхмер", + "Knda": "каннада", + "Kore": "ÑолонгоÑ", + "Laoo": "лаоÑ", + "Latn": "латин", + "Mlym": "малаÑлам", + "Mong": "монгол бичиг", + "Mymr": "мьÑнмар", + "Orya": "ориÑ", + "Sinh": "Ñинхала", + "Taml": "тамил", + "Telu": "Ñ‚Ñлүгү", + "Thaa": "тана", + "Thai": "тай", + "Tibt": "төвд", + "Zmth": "математик тооллын ÑиÑтем", + "Zsye": "Ñможи", + "Zsym": "Ñ‚ÑмдÑг", + "Zxxx": "бичигдÑÑгүй", + "Zyyy": "нийтлÑг", + "Zzzz": "тодорхойгүй бичиг" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/mr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/mr.json new file mode 100644 index 0000000000000000000000000000000000000000..9dc8912029742db7b286969e5c7d145f57c183ec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/mr.json @@ -0,0 +1,138 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "अरबी", + "Armi": "इमà¥à¤ªà¤¿à¤°à¤¿à¤¯à¤² आरà¥à¤®à¥‡à¤¨à¤¿à¤•", + "Armn": "अरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¨", + "Avst": "अवेसà¥à¤¤à¤¾à¤¨", + "Bali": "बाली", + "Batk": "बटाक", + "Beng": "बंगाली", + "Blis": "बà¥à¤²à¤¿à¤¸à¤¿à¤®à¥à¤¬à¥‰à¤²à¥à¤¸", + "Bopo": "बोपोमोफो", + "Brah": "बà¥à¤°à¤¹à¥à¤®à¥€", + "Brai": "बà¥à¤°à¥‡à¤²", + "Bugi": "बूगी", + "Buhd": "बà¥à¤¹à¤¿à¤¦", + "Cakm": "चकमा", + "Cans": "यूनिफाइड कॅनेडियन अâ€à¥…बोरिदनल सिलॅबिकà¥à¤¸", + "Cari": "कॅरियन", + "Cham": "चाम", + "Cher": "चेरोकी", + "Cirt": "किरà¥à¤¥", + "Copt": "कॉपà¥à¤Ÿà¤¿à¤•", + "Cprt": "सायपà¥à¤°à¤¿à¤‘ट", + "Cyrl": "सीरिलिक", + "Cyrs": "पà¥à¤°à¤¾à¤¤à¤¨ चरà¥à¤š सà¥à¤²à¤¾à¤µà¥à¤¹à¥‹à¤¨à¤¿à¤• सिरिलिक", + "Deva": "देवनागरी", + "Dsrt": "डेसरà¥à¤Ÿ", + "Egyd": "इजिपà¥à¤¶à¤¿à¤¯à¤¨ डेमोटिक", + "Egyh": "इजिपà¥à¤¶à¤¿à¤¯à¤¨ हायरेटिक", + "Egyp": "इजिपà¥à¤¶à¤¿à¤¯à¤¨ हायरोगà¥à¤²à¤¿à¤«à¥à¤¸", + "Ethi": "ईथिओपिक", + "Geok": "जॉरà¥à¤œà¤¿à¤¯à¤¨ खà¥à¤¤à¥à¤¸à¥à¤°à¥€", + "Geor": "जॉरà¥à¤œà¤¿à¤¯à¤¨", + "Glag": "गà¥à¤²à¥…गोलिटिक", + "Goth": "गोथिक", + "Grek": "गà¥à¤°à¥€à¤•", + "Gujr": "गà¥à¤œà¤°à¤¾à¤¤à¥€", + "Guru": "गà¥à¤°à¥à¤®à¥à¤–ी", + "Hanb": "हानà¥à¤¬", + "Hang": "हंगà¥à¤²", + "Hani": "हान", + "Hano": "हनà¥à¤¨à¥‚", + "Hans": "सरलीकृत", + "Hant": "पारंपारिक", + "Hebr": "हिबà¥à¤°à¥‚", + "Hira": "हिरागाना", + "Hmng": "पहाउ मंग", + "Hrkt": "जापानी सà¥à¤µà¤°à¤²à¤¿à¤ªà¥€", + "Hung": "पà¥à¤°à¤¾à¤¤à¤¨ हंगेरियन", + "Inds": "सिनà¥à¤§à¥", + "Ital": "जà¥à¤¨à¥€ इटालिक", + "Jamo": "जामो", + "Java": "जावानीस", + "Jpan": "जपानी", + "Kali": "कायाह ली", + "Kana": "कॅटाकाना", + "Khar": "खारोशà¥à¤¥à¥€", + "Khmr": "खà¥à¤®à¥‡à¤°", + "Knda": "कनà¥à¤¨à¤¡", + "Kore": "कोरियन", + "Kthi": "काइथी", + "Lana": "लाना", + "Laoo": "लाओ", + "Latf": "फà¥à¤°à¥…कà¥à¤¤à¥à¤° लॅटिन", + "Latg": "गाà¤à¤²à¤¿à¤• लेटिन", + "Latn": "लॅटिन", + "Lepc": "लेपचा", + "Limb": "लिमà¥à¤¬à¥‚", + "Lina": "लीनियार अ", + "Linb": "लीनियर बी", + "Lyci": "लायशियान", + "Lydi": "लायडियान", + "Mand": "मानà¥à¤¡à¤¾à¤¯à¥€à¤¨", + "Mani": "मानीचायीन", + "Maya": "मायान हाइरोगà¥à¤²à¤¿à¤«à¥à¤¸", + "Mero": "मेरोइटिक", + "Mlym": "मलà¥à¤¯à¤¾à¤³à¤®", + "Mong": "मंगोलियन", + "Moon": "मून", + "Mtei": "मेइतेइ मायेक", + "Mymr": "मà¥à¤¯à¤¾à¤¨à¤®à¤¾à¤°", + "Nkoo": "à¤à¤¨à¥â€˜à¤•ो", + "Ogam": "ओघाम", + "Olck": "ओल चिकि", + "Orkh": "ओरà¥à¤–ोन", + "Orya": "उडिया", + "Osma": "उसà¥à¤®à¤¾à¤¨à¤¿à¤¯à¤¾", + "Perm": "पà¥à¤°à¤¾à¤¤à¤¨ परà¥à¤®à¤¿à¤•", + "Phag": "फागà¥à¤¸-पा", + "Phli": "इनà¥à¤¸à¥à¤•à¥à¤°à¤¿à¤ªà¥à¤¶à¤¨à¤² पाहलवी", + "Phlp": "सॉलà¥à¤Ÿà¤° पाहलवी", + "Phlv": "बà¥à¤• पाहलवी", + "Phnx": "फोनिशियन", + "Plrd": "पोलारà¥à¤¡ फोनेटिक", + "Prti": "इनà¥à¤¸à¥à¤•à¥à¤°à¤¿à¤ªà¥à¤¶à¤¨à¤² परà¥à¤¥à¤¿à¤¯à¤¨", + "Rjng": "रीजांग", + "Roro": "रोनà¥à¤—ोरोनà¥à¤—ो", + "Runr": "रूनिक", + "Samr": "समरिटान", + "Sara": "सराती", + "Saur": "सौराषà¥à¤Ÿà¥à¤°", + "Sgnw": "संकेत लिपी", + "Shaw": "शॅवà¥à¤¹à¤¿à¤¯à¤¨", + "Sinh": "सिंहला", + "Sund": "सूदानी", + "Sylo": "सिलोती नागरी", + "Syrc": "सिरीयाक", + "Syre": "à¤à¤¸à¥à¤¤à¥à¤Ÿà¥à¤°à¥‡à¤¨à¥à¤œà¥‡à¤²à¥‹ सिरियाक", + "Syrj": "पशà¥à¤šà¤¿à¤®à¥€ सिरियाक", + "Syrn": "पूरà¥à¤µà¥€ सिरियाक", + "Tagb": "तगोआनà¥à¤µà¤¾", + "Tale": "ताई ली", + "Talu": "नवीन ताई लू", + "Taml": "तामिळ", + "Tavt": "ताई विà¤à¤¤", + "Telu": "तेलगà¥", + "Teng": "तेनà¥à¤—वार", + "Tfng": "तिफिनाघ", + "Tglg": "टागालोग", + "Thaa": "थाना", + "Thai": "थाई", + "Tibt": "तिबेटी", + "Ugar": "यà¥à¤—ारिटिक", + "Vaii": "वाई", + "Visp": "दृशà¥à¤¯ संवाद", + "Xpeo": "पà¥à¤°à¤¾à¤¤à¤¨ फारसी", + "Xsux": "दृशà¥à¤¯à¤®à¤¾à¤¨ भाषा", + "Yiii": "यी", + "Zinh": "वंशपरंपरागत", + "Zmth": "गणितीय संकेतलिपी", + "Zsye": "इमोजी", + "Zsym": "पà¥à¤°à¤¤à¥€à¤•", + "Zxxx": "अलिखित", + "Zyyy": "सामानà¥à¤¯", + "Zzzz": "अजà¥à¤žà¤¾à¤¤ लिपी" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ms.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ms.json new file mode 100644 index 0000000000000000000000000000000000000000..a7160b2e63a2531f4f8826ebcc9228c3cc2d326a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ms.json @@ -0,0 +1,52 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "Arab", + "Armn": "Armenia", + "Bali": "Bali", + "Bamu": "Bamu", + "Beng": "Benggala", + "Bopo": "Bopomofo", + "Brai": "Braille", + "Cans": "Cans", + "Cyrl": "Cyril", + "Deva": "Devanagari", + "Ethi": "Ethiopia", + "Geor": "Georgia", + "Grek": "Greek", + "Gujr": "Gujarat", + "Guru": "Gurmukhi", + "Hanb": "Hanb", + "Hang": "Hangul", + "Hani": "Han", + "Hans": "Ringkas", + "Hant": "Tradisional", + "Hebr": "Ibrani", + "Hira": "Hiragana", + "Hrkt": "Ejaan sukuan Jepun", + "Jamo": "Jamo", + "Jpan": "Jepun", + "Kana": "Katakana", + "Khmr": "Khmer", + "Knda": "Kannada", + "Kore": "Korea", + "Laoo": "Lao", + "Latn": "Latin", + "Mlym": "Malayalam", + "Mong": "Mongolia", + "Mymr": "Myammar", + "Orya": "Oriya", + "Sinh": "Sinhala", + "Taml": "Tamil", + "Telu": "Telugu", + "Thaa": "Thaana", + "Thai": "Thai", + "Tibt": "Tibet", + "Zmth": "Tatatanda matematik", + "Zsye": "Emoji", + "Zsym": "Simbol", + "Zxxx": "Tidak ditulis", + "Zyyy": "Lazim", + "Zzzz": "Tulisan Tidak Diketahui" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/mt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/mt.json new file mode 100644 index 0000000000000000000000000000000000000000..4465dc33b118c1013fafc380632be82e39601dea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/mt.json @@ -0,0 +1,15 @@ +{ + "Version": "2.1.28.76", + "Names": { + "Arab": "Għarbi", + "Cyrl": "ÄŠirilliku", + "Grek": "Grieg", + "Hans": "Simplifikat", + "Hant": "Tradizzjonali", + "Latn": "Latin", + "Xpeo": "Persjan Antik", + "Zxxx": "Mhux Miktub", + "Zyyy": "Komuni", + "Zzzz": "Kitba Mhux Magħrufa" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/my.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/my.json new file mode 100644 index 0000000000000000000000000000000000000000..b8041cba3d1984acabb1b2886a3e57fb2181ecf1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/my.json @@ -0,0 +1,57 @@ +{ + "Version": "2.1.30.50", + "Names": { + "Arab": "အာရေဗျ", + "Armn": "အာမေးနီးယား", + "Beng": "ဘင်္ဂါလီ", + "Bopo": "ဘိုပို", + "Brah": "ဗြဟ္မမီ", + "Brai": "ဘရေ", + "Cyrl": "စစ်ရိလစ်", + "Deva": "ဒီဗနာဂရီ", + "Ethi": "အီသီယိုးပီးယား", + "Geor": "ဂျော်ဂျီယာ", + "Grek": "ဂရိ", + "Gujr": "ဂုဂျာရသီ", + "Guru": "ဂူရူ", + "Hanb": "ဟန်ဘ်", + "Hang": "ဟန်ဂူးလ်", + "Hani": "ဟန်", + "Hans": "ရိုးရှင်း", + "Hant": "ရိုးရာ", + "Hebr": "ဟီဗရူး", + "Hira": "ဟီရဂန", + "Hrkt": "ဂျပန် အက္á€á€›á€¬", + "Jamo": "ဂျမို", + "Java": "ဂျာဗားနီးစ်", + "Jpan": "ဂျပန်", + "Kali": "ကယားလီ", + "Kana": "á€á€á€á€”", + "Khmr": "á€á€™á€¬", + "Knda": "á€á€”္နာဒါ", + "Kore": "ကိုရီးယား", + "Laoo": "လာအို", + "Latn": "လက်á€á€„်", + "Mlym": "မာလာယာလမ်", + "Mong": "မွန်ဂိုလီးယား", + "Mymr": "မြန်မာ", + "Orya": "အိုရာ", + "Sinh": "ဆင်ဟာလ", + "Tale": "á€á€­á€¯á€„်လီ", + "Taml": "á€á€™á€®á€¸á€œá€º", + "Telu": "á€á€®á€œá€¯", + "Tglg": "á€á€‚လော့ဂ်", + "Thaa": "သာအ်", + "Thai": "ထိုင်း", + "Tibt": "á€á€­á€˜á€€á€º", + "Visp": "မြင်နိုင်သော စကား", + "Xpeo": "ပါရှန် အဟောင်း", + "Yiii": "ရီ", + "Zmth": "ဂá€á€”်းသင်္á€á€»á€¬", + "Zsye": "အီမိုဂျီ", + "Zsym": "သင်္ကေá€", + "Zxxx": "မရေးထားသော", + "Zyyy": "အများနှင့်သက်ဆိုင်သော", + "Zzzz": "မသိ သို့မဟုá€á€º မရှိသော စကားလုံး" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/nb.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/nb.json new file mode 100644 index 0000000000000000000000000000000000000000..dc5c481e713a6b45e967bee75318b25c7213a41d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/nb.json @@ -0,0 +1,223 @@ +{ + "Version": "2.1.30.7", + "Names": { + "Afak": "afaka", + "Aghb": "kaukasus-albansk", + "Ahom": "ahom", + "Arab": "arabisk", + "Armi": "arameisk", + "Armn": "armensk", + "Avst": "avestisk", + "Bali": "balinesisk", + "Bamu": "bamum", + "Bass": "bassa vah", + "Batk": "batak", + "Beng": "bengalsk", + "Blis": "blissymbol", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "braille", + "Bugi": "buginesisk", + "Buhd": "buhid", + "Cakm": "chakma", + "Cans": "felles kanadiske ursprÃ¥ksstavelser", + "Cari": "karisk", + "Cham": "cham", + "Cher": "cherokee", + "Cirt": "cirth", + "Copt": "koptisk", + "Cprt": "kypriotisk", + "Cyrl": "kyrillisk", + "Cyrs": "kirkeslavisk kyrillisk", + "Deva": "devanagari", + "Dsrt": "deseret", + "Dupl": "duployan stenografi", + "Egyd": "egyptisk demotisk", + "Egyh": "egyptisk hieratisk", + "Egyp": "egyptiske hieroglyfer", + "Elba": "elbasisk", + "Ethi": "etiopisk", + "Geok": "georgisk khutsuri", + "Geor": "georgisk", + "Glag": "glagolittisk", + "Goth": "gotisk", + "Gran": "gammeltamilsk", + "Grek": "gresk", + "Gujr": "gujarati", + "Guru": "gurmukhi", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanunoo", + "Hans": "forenklet", + "Hant": "tradisjonell", + "Hatr": "hatransk armensk", + "Hebr": "hebraisk", + "Hira": "hiragana", + "Hluw": "anatoliske hieroglyfer", + "Hmng": "pahawh hmong", + "Hrkt": "japanske stavelsesskrifter", + "Hung": "gammelungarsk", + "Inds": "indus", + "Ital": "gammelitalisk", + "Jamo": "jamo", + "Java": "javanesisk", + "Jpan": "japansk", + "Jurc": "jurchen", + "Kali": "kayah li", + "Kana": "katakana", + "Khar": "kharoshthi", + "Khmr": "khmer", + "Khoj": "khojki", + "Knda": "kannada", + "Kore": "koreansk", + "Kpel": "kpelle", + "Kthi": "kaithisk", + "Lana": "lanna", + "Laoo": "laotisk", + "Latf": "frakturlatinsk", + "Latg": "gælisk latinsk", + "Latn": "latinsk", + "Lepc": "lepcha", + "Limb": "limbu", + "Lina": "lineær A", + "Linb": "lineær B", + "Lisu": "fraser", + "Loma": "loma", + "Lyci": "lykisk", + "Lydi": "lydisk", + "Mahj": "mahajani", + "Mand": "mandaisk", + "Mani": "manikeisk", + "Maya": "maya-hieroglyfer", + "Mend": "mende", + "Merc": "meroitisk kursiv", + "Mero": "meroitisk", + "Mlym": "malayalam", + "Modi": "modi", + "Mong": "mongolsk", + "Moon": "moon", + "Mroo": "mro", + "Mtei": "meitei-mayek", + "Mult": "multani", + "Mymr": "myanmar", + "Narb": "gammelnordarabisk", + "Nbat": "nabataeansk", + "Nkgb": "naxi geba", + "Nkoo": "n’ko", + "Nshu": "nüshu", + "Ogam": "ogham", + "Olck": "ol-chiki", + "Orkh": "orkhon", + "Orya": "oriya", + "Osma": "osmanya", + "Palm": "palmyrensk", + "Pauc": "pau cin hau", + "Perm": "gammelpermisk", + "Phag": "phags-pa", + "Phli": "inskripsjonspahlavi", + "Phlp": "psalter pahlavi", + "Phlv": "pahlavi", + "Phnx": "fønikisk", + "Plrd": "pollard-fonetisk", + "Prti": "inskripsjonsparthisk", + "Qaaa": "qaaa", + "Qaab": "qaab", + "Qaac": "qaac", + "Qaad": "qaad", + "Qaae": "qaae", + "Qaaf": "qaaf", + "Qaag": "qaag", + "Qaah": "qaah", + "Qaak": "qaak", + "Qaal": "qaal", + "Qaam": "qaam", + "Qaan": "qaan", + "Qaao": "qaao", + "Qaap": "qaap", + "Qaaq": "qaaq", + "Qaar": "qaar", + "Qaas": "qaas", + "Qaat": "qaat", + "Qaau": "qaau", + "Qaav": "qaav", + "Qaaw": "qaaw", + "Qaax": "qaax", + "Qaay": "qaay", + "Qaaz": "qaaz", + "Qaba": "qaba", + "Qabb": "qabb", + "Qabc": "qabc", + "Qabd": "qabd", + "Qabe": "qabe", + "Qabf": "qafb", + "Qabg": "qabg", + "Qabh": "qabh", + "Qabi": "qabi", + "Qabj": "qabj", + "Qabk": "qabk", + "Qabl": "qabl", + "Qabm": "qabm", + "Qabn": "qabn", + "Qabo": "qabo", + "Qabp": "qabp", + "Qabq": "qabq", + "Qabr": "qabr", + "Qabs": "qabs", + "Qabt": "qabt", + "Qabu": "qabu", + "Qabv": "qabv", + "Qabw": "qabw", + "Qabx": "qabx", + "Rjng": "rejang", + "Roro": "rongorongo", + "Runr": "runer", + "Samr": "samaritansk", + "Sara": "sarati", + "Sarb": "gammelsørarabisk", + "Saur": "saurashtra", + "Sgnw": "tegnskrift", + "Shaw": "shavisk", + "Shrd": "sharada", + "Sidd": "siddham", + "Sind": "khudawadi", + "Sinh": "sinhala", + "Sora": "sora sompeng", + "Sund": "sundanesisk", + "Sylo": "syloti nagri", + "Syrc": "syrisk", + "Syre": "estrangelosyriakisk", + "Syrj": "vestlig syriakisk", + "Syrn": "østlig syriakisk", + "Tagb": "tagbanwa", + "Takr": "takri", + "Tale": "tai le", + "Talu": "ny tai lue", + "Taml": "tamilsk", + "Tang": "tangut", + "Tavt": "tai viet", + "Telu": "telugu", + "Teng": "tengwar", + "Tfng": "tifinagh", + "Tglg": "tagalog", + "Thaa": "thaana", + "Thai": "thai", + "Tibt": "tibetansk", + "Tirh": "tirhuta", + "Ugar": "ugaritisk", + "Vaii": "vai", + "Visp": "synlig tale", + "Wara": "varang kshiti", + "Wole": "woleai", + "Xpeo": "gammelpersisk", + "Xsux": "sumersk-akkadisk kileskrift", + "Yiii": "yi", + "Zinh": "nedarvet", + "Zmth": "matematisk notasjon", + "Zsye": "zsye", + "Zsym": "symboler", + "Zxxx": "sprÃ¥k uten skrift", + "Zyyy": "felles", + "Zzzz": "ukjent skrift" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ne.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ne.json new file mode 100644 index 0000000000000000000000000000000000000000..48d6b33834173a330b9466ff0e32b005a7456f0b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ne.json @@ -0,0 +1,132 @@ +{ + "Version": "2.1.29.20", + "Names": { + "Arab": "अरबी", + "Armi": "आरà¥à¤®à¥€", + "Armn": "आरà¥à¤®à¥‡à¤¨à¤¿à¤¯à¤¾à¤²à¥€", + "Avst": "आभेसà¥à¤Ÿà¤¾à¤¨", + "Bali": "बाली", + "Batk": "बाटक", + "Beng": "बङà¥à¤—ाली", + "Blis": "बà¥à¤²à¤¿à¤œà¤¸à¤¿à¤®à¥à¤¬à¥‹à¤²à¥à¤¸", + "Bopo": "बोपोमोफो", + "Brah": "बà¥à¤°à¤¾à¤¹à¥à¤®à¥€", + "Brai": "बà¥à¤°à¥‡à¤²", + "Bugi": "बà¥à¤—िनिज", + "Buhd": "बà¥à¤¹à¤¿à¤¦", + "Cakm": "काकà¥à¤®à¥", + "Cari": "कारियन", + "Cham": "चाम", + "Cher": "चेरोकी", + "Cirt": "किरà¥à¤¥", + "Copt": "कपà¥à¤Ÿà¤¿à¤•", + "Cprt": "कपà¥à¤°à¤¿à¤¯à¤Ÿ", + "Cyrl": "सिरिलिक", + "Deva": "देवानागरी", + "Dsrt": "डेसेरेट", + "Egyd": "इजिपà¥à¤Ÿà¤¿à¤¯à¤¨ डेमोटिक", + "Egyh": "इजिपà¥à¤Ÿà¤¿à¤¯à¤¨ हाइरटिक", + "Egyp": "इजिपà¥à¤Ÿà¤¿à¤¯à¤¨ हाइरोगà¥à¤²à¤¿à¤«à¥à¤¸", + "Ethi": "इथियोपिक", + "Geok": "गà¥à¤°à¥à¤œà¤¿à¤¯à¤¾à¤²à¥€ खà¥à¤Ÿà¥à¤¸à¥à¤°à¥€", + "Geor": "जरà¥à¤œà¤¿à¤¯à¤¾à¤²à¥€", + "Glag": "गà¥à¤²à¤¾à¤—ोलिटिक", + "Goth": "गोथिक", + "Grek": "गà¥à¤°à¥€à¤•", + "Gujr": "गà¥à¤œà¤°à¤¾à¤¤à¥€", + "Guru": "गà¥à¤°à¥‚मà¥à¤–ी", + "Hanb": "हानà¥à¤¬", + "Hang": "हानà¥à¤—à¥à¤²", + "Hani": "हान", + "Hano": "हानà¥à¤¨à¥", + "Hans": "सरलिकृत चिनी", + "Hant": "परमà¥à¤ªà¤°à¤¾à¤—त चिनी", + "Hebr": "हिबà¥à¤°à¥", + "Hira": "हिरागना", + "Hmng": "पहावह हमोङà¥à¤—", + "Hrkt": "काताकाना वा हिरागाना", + "Hung": "पà¥à¤°à¤¾à¤¨à¥‹ हङà¥à¤—ेरियाली", + "Inds": "इनà¥à¤¦à¥à¤¸", + "Ital": "पà¥à¤°à¤¾à¤¨à¥‹ इटालिक", + "Jamo": "जामो", + "Java": "जाभानी", + "Jpan": "जापानी", + "Kali": "कायाहली", + "Kana": "काताकाना", + "Khar": "खारोसà¥à¤¥à¤¿à¤¤à¤¿", + "Khmr": "खमेर", + "Knda": "कानà¥à¤¨à¤¾à¤¡à¤¾", + "Kore": "कोरियन", + "Kthi": "कà¥à¤¥à¥€", + "Lana": "लानà¥à¤¨à¤¾", + "Laoo": "लाओ", + "Latf": "फà¥à¤°à¤¾à¤•à¥à¤Ÿà¥à¤° लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨", + "Latg": "गà¥à¤¯à¤¾à¤²à¤¿à¤• लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨", + "Latn": "लà¥à¤¯à¤¾à¤Ÿà¤¿à¤¨", + "Lepc": "लेपà¥à¤šà¤¾", + "Limb": "लिमà¥à¤¬à¥", + "Lyci": "लाइसियन", + "Lydi": "लाइडियन", + "Mand": "मानà¥à¤¡à¤¾à¤à¤¨", + "Mani": "मानिकाà¤à¤¨", + "Maya": "माया हाइरोगà¥à¤²à¤¿à¤«à¥à¤¸", + "Mero": "मेरियोटिक", + "Mlym": "मलायालम", + "Mong": "मङà¥à¤—ोल", + "Moon": "जून", + "Mtei": "माइटेइ मायेक", + "Mymr": "मà¥à¤¯à¤¾à¤¨à¥à¤®à¤¾à¤°", + "Nkoo": "à¤à¤¨à¥à¤•ो", + "Ogam": "ओघाम", + "Olck": "ओलचिकी", + "Orkh": "ओरà¥à¤–ोन", + "Orya": "ओडिया", + "Osma": "ओसà¥à¤®à¤¾à¤¨à¥à¤¯à¤¾", + "Perm": "पà¥à¤°à¤¾à¤¨à¥‹ परà¥à¤®à¤¿à¤•", + "Phag": "फागà¥à¤¸-पा", + "Phli": "फà¥à¤²à¤¿", + "Phlp": "फà¥à¤²à¥à¤ª", + "Phlv": "बà¥à¤• पहलà¥à¤­à¥€", + "Phnx": "फोनिसियन", + "Plrd": "पोलà¥à¤²à¤¾à¤°à¥à¤¡ फोनेटिक", + "Prti": "पिआरटी", + "Rjng": "रेजाङ", + "Roro": "रोङà¥à¤—ोरोङà¥à¤—ो", + "Runr": "रूनिक", + "Samr": "समारिटन", + "Sara": "सारती", + "Saur": "सौराषà¥à¤Ÿà¥à¤°", + "Sgnw": "साइनराइटिङ", + "Shaw": "शाभियन", + "Sinh": "सिनà¥à¤¹à¤¾à¤²à¤¾", + "Sylo": "सà¥à¤²à¥à¤¯à¥‹à¤Ÿà¥€ नागà¥à¤°à¥€", + "Syrc": "सिरियाक", + "Syre": "इसà¥à¤Ÿà¥à¤°à¥‡à¤¨à¤œà¥‡à¤²à¥‹ सिरियाक", + "Syrj": "पशà¥à¤šà¤¿à¤®à¥€ सिरियाक", + "Syrn": "पूरà¥à¤µà¥€ सिरियाक", + "Tagb": "टागà¥à¤µà¤¾à¤¨à¥à¤µà¤¾", + "Tale": "टाइले", + "Talu": "नà¥à¤¯à¥‚ टाइ लà¥à¤‡", + "Taml": "तामिल", + "Tavt": "टाभà¥à¤Ÿ", + "Telu": "तेलà¥à¤—à¥", + "Teng": "टेङà¥à¤µà¤¾à¤°", + "Tfng": "टिफिनाघ", + "Tglg": "टागालोग", + "Thaa": "थाना", + "Thai": "थाई", + "Tibt": "तिबà¥à¤¬à¤¤à¥€", + "Ugar": "यà¥à¤—ारिटिक", + "Vaii": "भाइ", + "Visp": "दृशà¥à¤¯à¤®à¤¯ वाणी", + "Xpeo": "पà¥à¤°à¤¾à¤¨à¥‹ परà¥à¤¸à¤¿à¤¯à¤¨", + "Yiii": "यी", + "Zinh": "इनà¥à¤¹à¥‡à¤°à¤¿à¤Ÿà¥‡à¤¡", + "Zmth": "Zmth", + "Zsye": "Zsye", + "Zsym": "पà¥à¤°à¤¤à¥€à¤•हरू", + "Zxxx": "नलेखिà¤à¤•ो", + "Zyyy": "साà¤à¤¾", + "Zzzz": "अजà¥à¤žà¤¾à¤¤ लिपि" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/nl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/nl.json new file mode 100644 index 0000000000000000000000000000000000000000..fd1379aa13fa6733f0cc263659e4e1604272930c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/nl.json @@ -0,0 +1,228 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Adlm": "Adlam", + "Afak": "Defaka", + "Aghb": "Kaukasisch Albanees", + "Ahom": "Ahom", + "Arab": "Arabisch", + "Armi": "Keizerlijk Aramees", + "Armn": "Armeens", + "Avst": "Avestaans", + "Bali": "Balinees", + "Bamu": "Bamoun", + "Bass": "Bassa Vah", + "Batk": "Batak", + "Beng": "Bengaals", + "Bhks": "Bhaiksuki", + "Blis": "Blissymbolen", + "Bopo": "Bopomofo", + "Brah": "Brahmi", + "Brai": "Braille", + "Bugi": "Buginees", + "Buhd": "Buhid", + "Cakm": "Chakma", + "Cans": "Verenigde Canadese Aboriginal-symbolen", + "Cari": "Carisch", + "Cham": "Cham", + "Cher": "Cherokee", + "Cirt": "Cirth", + "Copt": "Koptisch", + "Cprt": "Cyprisch", + "Cyrl": "Cyrillisch", + "Cyrs": "Oudkerkslavisch Cyrillisch", + "Deva": "Devanagari", + "Dsrt": "Deseret", + "Dupl": "Duployan snelschrift", + "Egyd": "Egyptisch demotisch", + "Egyh": "Egyptisch hiëratisch", + "Egyp": "Egyptische hiërogliefen", + "Elba": "Elbasan", + "Ethi": "Ethiopisch", + "Geok": "Georgisch Khutsuri", + "Geor": "Georgisch", + "Glag": "Glagolitisch", + "Goth": "Gothisch", + "Gran": "Grantha", + "Grek": "Grieks", + "Gujr": "Gujarati", + "Guru": "Gurmukhi", + "Hanb": "Hanb", + "Hang": "Hangul", + "Hani": "Han", + "Hano": "Hanunoo", + "Hans": "vereenvoudigd", + "Hant": "traditioneel", + "Hatr": "Hatran", + "Hebr": "Hebreeuws", + "Hira": "Hiragana", + "Hluw": "Anatolische hiërogliefen", + "Hmng": "Pahawh Hmong", + "Hrkt": "Katakana of Hiragana", + "Hung": "Oudhongaars", + "Inds": "Indus", + "Ital": "Oud-italisch", + "Jamo": "Jamo", + "Java": "Javaans", + "Jpan": "Japans", + "Jurc": "Jurchen", + "Kali": "Kayah Li", + "Kana": "Katakana", + "Khar": "Kharoshthi", + "Khmr": "Khmer", + "Khoj": "Khojki", + "Knda": "Kannada", + "Kore": "Koreaans", + "Kpel": "Kpelle", + "Kthi": "Kaithi", + "Lana": "Lanna", + "Laoo": "Laotiaans", + "Latf": "Gotisch Latijns", + "Latg": "Gaelisch Latijns", + "Latn": "Latijns", + "Lepc": "Lepcha", + "Limb": "Limbu", + "Lina": "Lineair A", + "Linb": "Lineair B", + "Lisu": "Fraser", + "Loma": "Loma", + "Lyci": "Lycisch", + "Lydi": "Lydisch", + "Mahj": "Mahajani", + "Mand": "Mandaeans", + "Mani": "Manicheaans", + "Marc": "Marchen", + "Maya": "Mayahiërogliefen", + "Mend": "Mende", + "Merc": "Meroitisch cursief", + "Mero": "Meroïtisch", + "Mlym": "Malayalam", + "Modi": "Modi", + "Mong": "Mongools", + "Moon": "Moon", + "Mroo": "Mro", + "Mtei": "Meitei", + "Mult": "Multani", + "Mymr": "Birmaans", + "Narb": "Oud Noord-Arabisch", + "Nbat": "Nabateaans", + "Newa": "Newari", + "Nkgb": "Naxi Geba", + "Nkoo": "N’Ko", + "Nshu": "Nüshu", + "Ogam": "Ogham", + "Olck": "Ol Chiki", + "Orkh": "Orkhon", + "Orya": "Odia", + "Osge": "Osage", + "Osma": "Osmanya", + "Palm": "Palmyreens", + "Pauc": "Pau Cin Hau", + "Perm": "Oudpermisch", + "Phag": "Phags-pa", + "Phli": "Inscriptioneel Pahlavi", + "Phlp": "Psalmen Pahlavi", + "Phlv": "Boek Pahlavi", + "Phnx": "Foenicisch", + "Plrd": "Pollard-fonetisch", + "Prti": "Inscriptioneel Parthisch", + "Qaaa": "Qaaa", + "Qaab": "Qaab", + "Qaac": "Qaac", + "Qaad": "Qaad", + "Qaae": "Qaae", + "Qaaf": "Qaaf", + "Qaag": "Qaag", + "Qaah": "Qaah", + "Qaak": "Qaak", + "Qaal": "Qaal", + "Qaam": "Qaam", + "Qaan": "Qaan", + "Qaao": "Qaao", + "Qaap": "Qaap", + "Qaaq": "Qaaq", + "Qaar": "Qaar", + "Qaas": "Qaas", + "Qaat": "Qaat", + "Qaau": "Qaau", + "Qaav": "Qaav", + "Qaaw": "Qaaw", + "Qaax": "Qaax", + "Qaay": "Qaay", + "Qaaz": "Qaaz", + "Qaba": "Qaba", + "Qabb": "Qabb", + "Qabc": "Qabc", + "Qabd": "Qabd", + "Qabe": "Qabe", + "Qabf": "Qabf", + "Qabg": "Qabg", + "Qabh": "Qabh", + "Qabi": "Qabi", + "Qabj": "Qabj", + "Qabk": "Qabk", + "Qabl": "Qabl", + "Qabm": "Qabm", + "Qabn": "Qabn", + "Qabo": "Qabo", + "Qabp": "Qabp", + "Qabq": "Qabq", + "Qabr": "Qabr", + "Qabs": "Qabs", + "Qabt": "Qabt", + "Qabu": "Qabu", + "Qabv": "Qabv", + "Qabw": "Qabw", + "Qabx": "Qabx", + "Rjng": "Rejang", + "Roro": "Rongorongo", + "Runr": "Runic", + "Samr": "Samaritaans", + "Sara": "Sarati", + "Sarb": "Oud Zuid-Arabisch", + "Saur": "Saurashtra", + "Sgnw": "SignWriting", + "Shaw": "Shavian", + "Shrd": "Sharada", + "Sidd": "Siddham", + "Sind": "Sindhi", + "Sinh": "Singalees", + "Sora": "Sora Sompeng", + "Sund": "Soendanees", + "Sylo": "Syloti Nagri", + "Syrc": "Syriac", + "Syre": "Estrangelo Aramees", + "Syrj": "West-Aramees", + "Syrn": "Oost-Aramees", + "Tagb": "Tagbanwa", + "Takr": "Takri", + "Tale": "Tai Le", + "Talu": "Nieuw Tai Lue", + "Taml": "Tamil", + "Tang": "Tangut", + "Tavt": "Tai Viet", + "Telu": "Telugu", + "Teng": "Tengwar", + "Tfng": "Tifinagh", + "Tglg": "Tagalog", + "Thaa": "Thaana", + "Thai": "Thai", + "Tibt": "Tibetaans", + "Tirh": "Tirhuta", + "Ugar": "Ugaritisch", + "Vaii": "Vai", + "Visp": "Zichtbare spraak", + "Wara": "Varang Kshiti", + "Wole": "Woleai", + "Xpeo": "Oudperzisch", + "Xsux": "Sumero-Akkadian Cuneiform", + "Yiii": "Yi", + "Zinh": "Overgeërfd", + "Zmth": "Wiskundige notatie", + "Zsye": "emoji", + "Zsym": "Symbolen", + "Zxxx": "ongeschreven", + "Zyyy": "algemeen", + "Zzzz": "onbekend schriftsysteem" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/nn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/nn.json new file mode 100644 index 0000000000000000000000000000000000000000..fdd26ee95ba36ecc2cfa9668fa8a26a24be48711 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/nn.json @@ -0,0 +1,135 @@ +{ + "Version": "2.1.28.76", + "Names": { + "Arab": "arabisk", + "Armi": "armisk", + "Armn": "armensk", + "Avst": "avestisk", + "Bali": "balinesisk", + "Batk": "batak", + "Beng": "bengali", + "Blis": "blissymbol", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "braille", + "Bugi": "buginesisk", + "Buhd": "buhid", + "Cakm": "chakma", + "Cans": "felles kanadiske ursprÃ¥ksstavingar", + "Cari": "karisk", + "Cham": "cham", + "Cher": "cherokee", + "Cirt": "cirth", + "Copt": "koptisk", + "Cprt": "kypriotisk", + "Cyrl": "kyrillisk", + "Cyrs": "kyrillisk (kyrkjeslavisk variant)", + "Deva": "devanagari", + "Dsrt": "deseret", + "Egyd": "egyptisk demotisk", + "Egyh": "egyptisk hieratisk", + "Egyp": "egyptiske hieroglyfar", + "Ethi": "etiopisk", + "Geok": "khutsuri (asomtavruli og nuskhuri)", + "Geor": "georgisk", + "Glag": "glagolittisk", + "Goth": "gotisk", + "Grek": "gresk", + "Gujr": "gujarati", + "Guru": "gurmukhi", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanunoo", + "Hans": "forenkla kinesisk", + "Hant": "tradisjonell kinesisk", + "Hebr": "hebraisk", + "Hira": "hiragana", + "Hmng": "pahawk hmong", + "Hrkt": "katakana eller hiragana", + "Hung": "gammalungarsk", + "Inds": "indus", + "Ital": "gammalitalisk", + "Java": "javanesisk", + "Jpan": "japansk", + "Kali": "kayah li", + "Kana": "katakana", + "Khar": "kharoshthi", + "Khmr": "khmer", + "Knda": "kannada", + "Kore": "koreansk", + "Kthi": "kaithisk", + "Lana": "lanna", + "Laoo": "laotisk", + "Latf": "latinsk (frakturvariant)", + "Latg": "latinsk (gælisk variant)", + "Latn": "latinsk", + "Lepc": "lepcha", + "Limb": "lumbu", + "Lina": "lineær A", + "Linb": "lineær B", + "Lyci": "lykisk", + "Lydi": "lydisk", + "Mand": "mandaisk", + "Mani": "manikeisk", + "Maya": "maya-hieroglyfar", + "Mero": "meroitisk", + "Mlym": "malayalam", + "Mong": "mongolsk", + "Moon": "moon", + "Mtei": "meitei-mayek", + "Mymr": "myanmar", + "Nkoo": "n’ko", + "Ogam": "ogham", + "Olck": "ol-chiki", + "Orkh": "orkhon", + "Orya": "oriya", + "Osma": "osmanya", + "Perm": "gammalpermisk", + "Phag": "phags-pa", + "Phli": "inskripsjonspahlavi", + "Phlp": "salmepahlavi", + "Phlv": "pahlavi", + "Phnx": "fønikisk", + "Plrd": "pollard-fonetisk", + "Prti": "inskripsjonsparthisk", + "Rjng": "rejang", + "Roro": "rongorongo", + "Runr": "runer", + "Samr": "samaritansk", + "Sara": "sarati", + "Saur": "saurashtra", + "Sgnw": "teiknskrift", + "Shaw": "shavisk", + "Sinh": "sinhala", + "Sund": "sundanesisk", + "Sylo": "syloti nagri", + "Syrc": "syriakisk", + "Syre": "syriakisk (estrangelo-variant)", + "Syrj": "syriakisk (vestleg variant)", + "Syrn": "syriakisk (austleg variant)", + "Tagb": "tagbanwa", + "Tale": "tai le", + "Talu": "ny tai lue", + "Taml": "tamilsk", + "Tavt": "tai viet", + "Telu": "telugu", + "Teng": "tengwar", + "Tfng": "tifinagh", + "Tglg": "tagalog", + "Thaa": "thaana", + "Thai": "thai", + "Tibt": "tibetansk", + "Ugar": "ugaritisk", + "Vaii": "vai", + "Visp": "synleg tale", + "Xpeo": "gammalpersisk", + "Xsux": "sumero-akkadisk kileskrift", + "Yiii": "yi", + "Zinh": "nedarva", + "Zmth": "matematisk notasjon", + "Zsym": "symbol", + "Zxxx": "kode for sprÃ¥k utan skrift", + "Zyyy": "felles", + "Zzzz": "ukjend skrift" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/no.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/no.json new file mode 100644 index 0000000000000000000000000000000000000000..dc5c481e713a6b45e967bee75318b25c7213a41d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/no.json @@ -0,0 +1,223 @@ +{ + "Version": "2.1.30.7", + "Names": { + "Afak": "afaka", + "Aghb": "kaukasus-albansk", + "Ahom": "ahom", + "Arab": "arabisk", + "Armi": "arameisk", + "Armn": "armensk", + "Avst": "avestisk", + "Bali": "balinesisk", + "Bamu": "bamum", + "Bass": "bassa vah", + "Batk": "batak", + "Beng": "bengalsk", + "Blis": "blissymbol", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "braille", + "Bugi": "buginesisk", + "Buhd": "buhid", + "Cakm": "chakma", + "Cans": "felles kanadiske ursprÃ¥ksstavelser", + "Cari": "karisk", + "Cham": "cham", + "Cher": "cherokee", + "Cirt": "cirth", + "Copt": "koptisk", + "Cprt": "kypriotisk", + "Cyrl": "kyrillisk", + "Cyrs": "kirkeslavisk kyrillisk", + "Deva": "devanagari", + "Dsrt": "deseret", + "Dupl": "duployan stenografi", + "Egyd": "egyptisk demotisk", + "Egyh": "egyptisk hieratisk", + "Egyp": "egyptiske hieroglyfer", + "Elba": "elbasisk", + "Ethi": "etiopisk", + "Geok": "georgisk khutsuri", + "Geor": "georgisk", + "Glag": "glagolittisk", + "Goth": "gotisk", + "Gran": "gammeltamilsk", + "Grek": "gresk", + "Gujr": "gujarati", + "Guru": "gurmukhi", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanunoo", + "Hans": "forenklet", + "Hant": "tradisjonell", + "Hatr": "hatransk armensk", + "Hebr": "hebraisk", + "Hira": "hiragana", + "Hluw": "anatoliske hieroglyfer", + "Hmng": "pahawh hmong", + "Hrkt": "japanske stavelsesskrifter", + "Hung": "gammelungarsk", + "Inds": "indus", + "Ital": "gammelitalisk", + "Jamo": "jamo", + "Java": "javanesisk", + "Jpan": "japansk", + "Jurc": "jurchen", + "Kali": "kayah li", + "Kana": "katakana", + "Khar": "kharoshthi", + "Khmr": "khmer", + "Khoj": "khojki", + "Knda": "kannada", + "Kore": "koreansk", + "Kpel": "kpelle", + "Kthi": "kaithisk", + "Lana": "lanna", + "Laoo": "laotisk", + "Latf": "frakturlatinsk", + "Latg": "gælisk latinsk", + "Latn": "latinsk", + "Lepc": "lepcha", + "Limb": "limbu", + "Lina": "lineær A", + "Linb": "lineær B", + "Lisu": "fraser", + "Loma": "loma", + "Lyci": "lykisk", + "Lydi": "lydisk", + "Mahj": "mahajani", + "Mand": "mandaisk", + "Mani": "manikeisk", + "Maya": "maya-hieroglyfer", + "Mend": "mende", + "Merc": "meroitisk kursiv", + "Mero": "meroitisk", + "Mlym": "malayalam", + "Modi": "modi", + "Mong": "mongolsk", + "Moon": "moon", + "Mroo": "mro", + "Mtei": "meitei-mayek", + "Mult": "multani", + "Mymr": "myanmar", + "Narb": "gammelnordarabisk", + "Nbat": "nabataeansk", + "Nkgb": "naxi geba", + "Nkoo": "n’ko", + "Nshu": "nüshu", + "Ogam": "ogham", + "Olck": "ol-chiki", + "Orkh": "orkhon", + "Orya": "oriya", + "Osma": "osmanya", + "Palm": "palmyrensk", + "Pauc": "pau cin hau", + "Perm": "gammelpermisk", + "Phag": "phags-pa", + "Phli": "inskripsjonspahlavi", + "Phlp": "psalter pahlavi", + "Phlv": "pahlavi", + "Phnx": "fønikisk", + "Plrd": "pollard-fonetisk", + "Prti": "inskripsjonsparthisk", + "Qaaa": "qaaa", + "Qaab": "qaab", + "Qaac": "qaac", + "Qaad": "qaad", + "Qaae": "qaae", + "Qaaf": "qaaf", + "Qaag": "qaag", + "Qaah": "qaah", + "Qaak": "qaak", + "Qaal": "qaal", + "Qaam": "qaam", + "Qaan": "qaan", + "Qaao": "qaao", + "Qaap": "qaap", + "Qaaq": "qaaq", + "Qaar": "qaar", + "Qaas": "qaas", + "Qaat": "qaat", + "Qaau": "qaau", + "Qaav": "qaav", + "Qaaw": "qaaw", + "Qaax": "qaax", + "Qaay": "qaay", + "Qaaz": "qaaz", + "Qaba": "qaba", + "Qabb": "qabb", + "Qabc": "qabc", + "Qabd": "qabd", + "Qabe": "qabe", + "Qabf": "qafb", + "Qabg": "qabg", + "Qabh": "qabh", + "Qabi": "qabi", + "Qabj": "qabj", + "Qabk": "qabk", + "Qabl": "qabl", + "Qabm": "qabm", + "Qabn": "qabn", + "Qabo": "qabo", + "Qabp": "qabp", + "Qabq": "qabq", + "Qabr": "qabr", + "Qabs": "qabs", + "Qabt": "qabt", + "Qabu": "qabu", + "Qabv": "qabv", + "Qabw": "qabw", + "Qabx": "qabx", + "Rjng": "rejang", + "Roro": "rongorongo", + "Runr": "runer", + "Samr": "samaritansk", + "Sara": "sarati", + "Sarb": "gammelsørarabisk", + "Saur": "saurashtra", + "Sgnw": "tegnskrift", + "Shaw": "shavisk", + "Shrd": "sharada", + "Sidd": "siddham", + "Sind": "khudawadi", + "Sinh": "sinhala", + "Sora": "sora sompeng", + "Sund": "sundanesisk", + "Sylo": "syloti nagri", + "Syrc": "syrisk", + "Syre": "estrangelosyriakisk", + "Syrj": "vestlig syriakisk", + "Syrn": "østlig syriakisk", + "Tagb": "tagbanwa", + "Takr": "takri", + "Tale": "tai le", + "Talu": "ny tai lue", + "Taml": "tamilsk", + "Tang": "tangut", + "Tavt": "tai viet", + "Telu": "telugu", + "Teng": "tengwar", + "Tfng": "tifinagh", + "Tglg": "tagalog", + "Thaa": "thaana", + "Thai": "thai", + "Tibt": "tibetansk", + "Tirh": "tirhuta", + "Ugar": "ugaritisk", + "Vaii": "vai", + "Visp": "synlig tale", + "Wara": "varang kshiti", + "Wole": "woleai", + "Xpeo": "gammelpersisk", + "Xsux": "sumersk-akkadisk kileskrift", + "Yiii": "yi", + "Zinh": "nedarvet", + "Zmth": "matematisk notasjon", + "Zsye": "zsye", + "Zsym": "symboler", + "Zxxx": "sprÃ¥k uten skrift", + "Zyyy": "felles", + "Zzzz": "ukjent skrift" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/om.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/om.json new file mode 100644 index 0000000000000000000000000000000000000000..5a57b6c376f14c6dec46436995f32f230dba9940 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/om.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.98", + "Names": { + "Latn": "Latin" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/or.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/or.json new file mode 100644 index 0000000000000000000000000000000000000000..a9efa7342a5a7510c22a52c5ec6c3cf948c72278 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/or.json @@ -0,0 +1,135 @@ +{ + "Version": "2.1.27.78", + "Names": { + "Arab": "ଆରବିକà­", + "Armi": "ଇମà­à¬ªà­‡à¬°à¬¿à¬†à¬²à­ ଆରମିକà­", + "Armn": "ଆରà­à¬®à­‡à¬¨à¬¿à¬†à¬¨à­", + "Avst": "ଆବେସà­à¬¥à¬¾à¬¨à­", + "Bali": "ବାଲିନୀଜà­", + "Batk": "ବାଟାକà­", + "Beng": "ବଙà­à¬—ାଳୀ", + "Blis": "ବà­à¬²à¬¿à¬¸à¬¿à¬®à­à¬¬à¬²à¬¸à­", + "Bopo": "ବୋପୋମୋଫୋ", + "Brah": "ବà­à¬°à¬¾à¬¹à­à¬®à­€", + "Brai": "ବà­à¬°à¬¿à¬²à­", + "Bugi": "ବà­à¬—ାନୀଜà­", + "Buhd": "ବà­à¬¹à¬¿à¬¦à­", + "Cakm": "ଚକମା", + "Cans": "à­Ÿà­à¬¨à¬¿à¬«à¬¾à¬à¬¡à­ କାନାଡିଆନୠଆବà­à¬°à­‹à¬œà¬¿à¬¨à¬¾à¬²à­ ସିଲାବିକସà­", + "Cari": "କୈରନà­", + "Cham": "ଛମà­", + "Cher": "ଚିରà­à¬•à­€", + "Cirt": "ସିରà­à¬¥", + "Copt": "କପଟିକà­", + "Cprt": "ସିପà­à¬°à¬…ଟà­", + "Cyrl": "ସିରିଲିକà­", + "Cyrs": "ଓଲà­à¬¡ ଚରà­à¬šà­à¬š ସାଲଭୋନିକୠସିରିଲିକà­", + "Deva": "ଦେବାନଗିରି", + "Dsrt": "ଡେସରà­à¬Ÿ", + "Egyd": "ଇଜିପà­à¬Ÿà¬¿à¬†à¬¨à­ ଡେମୋଟିକà­", + "Egyh": "ଇଜିପà­à¬Ÿà¬¿à¬†à¬¨à­ ହାଇଅରଟିକà­", + "Egyp": "ଇଜିପà­à¬Ÿà¬¿à¬†à¬¨à­ ହାଅରଗà­à¬²à¬¿à¬ªà¬¸à­", + "Ethi": "ଇଥୋପିକà­", + "Geok": "ଜରà­à¬œà¬¿à¬†à¬¨à­ ଖà­à¬Ÿà¬¸à­à¬°à­€", + "Geor": "ଜରà­à¬œà¬¿à¬†à¬¨à­", + "Glag": "ଗà­à¬²à¬¾à¬—à­à¬²à­‹à¬Ÿà¬¿à¬•à­", + "Goth": "ଗୋଥିକà­", + "Grek": "ଗà­à¬°à­€à¬•à­", + "Gujr": "ଗà­à¬œà­à¬°à¬¾à¬Ÿà­€", + "Guru": "ଗà­à¬°à­à¬®à­à¬–à­€", + "Hang": "ହାଙà­à¬—à­à¬²à­", + "Hani": "ହାନà­", + "Hano": "ହାନà­à¬¨à­", + "Hans": "ସରଳୀକୃତ ହାନà­", + "Hant": "ପାରମà­à¬ªà¬°à¬¿à¬•ୠହାନà­", + "Hebr": "ହେବà­à¬°à­à­Ÿà­", + "Hira": "ହିରାଗାନା", + "Hmng": "ପାହୋ ହୋଙà­à¬—", + "Hrkt": "କାଟାକାନୠକିମà­à¬¬à¬¾ ହିରାଗାନà­", + "Hung": "ପà­à¬°à­à¬£à¬¾ ହଙà­à¬—େରିଆନà­", + "Inds": "ସିନà­à¬§à­", + "Ital": "ପà­à¬°à­à¬£à¬¾ ଇଟାଲୀ", + "Java": "ଜାଭାନୀଜà­", + "Jpan": "ଜାପାନୀଜà­", + "Kali": "କାୟାହା ଲୀ", + "Kana": "କାଟକାନà­", + "Khar": "ଖାରୋସà­à¬¥à¬¿", + "Khmr": "ଖà­à¬®à­‡à¬°à­", + "Knda": "କନà­à¬¨à¬¡", + "Kore": "କୋରିଆନà­", + "Kthi": "କୈଥି", + "Lana": "ଲାନା", + "Laoo": "ଲାଓ", + "Latf": "ଫà­à¬°à¬¾à¬•ଥà­à¬°à­ ଲାଟିନà­", + "Latg": "ଗାà¬à¬²à¬¿à¬•ୠଲାଟିନà­", + "Latn": "ଲାଟିନà­", + "Lepc": "ଲେପଚା", + "Limb": "ଲିମà­à¬¬à­", + "Lina": "ଲିନିୟରà­", + "Linb": "ଲିନିୟରୠବି", + "Lyci": "ଲିଶିୟନà­", + "Lydi": "ଲିଡିୟନà­", + "Mand": "ମାନଡେନà­", + "Mani": "ମନଶୀନà­", + "Maya": "ମୟାନୠହାୟରଲଜିକସà­", + "Mero": "ମେରୋଇଟିକà­", + "Mlym": "ମାଲୟଲମà­", + "Mong": "ମଙà­à¬—ୋଲିଆନà­", + "Moon": "ଚନà­à¬¦à­à¬°", + "Mtei": "ମାà¬à¬¤à¬¿ ମାୟେକà­", + "Mymr": "ମିଆମାରà­", + "Nkoo": "à¬à¬¨à­ କୋ", + "Ogam": "ଓଘାମା", + "Olck": "ଓଲୠଚିକି", + "Orkh": "ଓରୋଖନà­", + "Orya": "ଓଡିଆ", + "Osma": "ଓସୋମାନିୟା", + "Perm": "ଓଲà­à¬¡ ପରମିକà­", + "Phag": "ଫାଗସà­-ପା", + "Phli": "ଇନସà­à¬•à­à¬°à­€à¬ªà¬¸à¬¾à¬¨à¬²à­ ପାହାଲାୱୀ", + "Phlp": "ସà­à¬²à¬¾à¬Ÿà¬°à­ ପାହାଲାୱୀ", + "Phlv": "ବà­à¬•ୠପାହାଲାୱୀ", + "Phnx": "ଫେନୋସିଆନà­", + "Plrd": "ପୋଲାରà­à¬¡ ଫୋନେଟିକà­", + "Prti": "ଇନସà­à¬•à­à¬°à­€à¬ªà¬¸à¬¾à¬¨à¬²à­ ପାରà­à¬¥à¬¿à¬†à¬¨à­", + "Rjng": "ରେଜାଙà­à¬—", + "Roro": "ରୋଙà­à¬—ୋରୋଙà­à¬—à­‹", + "Runr": "ରନିକà­", + "Samr": "ସମୌରିଟନà­", + "Sara": "ସାରାତି", + "Saur": "ସୌରାଷà­à¬Ÿà­à¬°", + "Sgnw": "ସାଙà­à¬•େତିକ ଲିଖ", + "Shaw": "ସାବିୟାନà­", + "Sinh": "ସିଂହଳ", + "Sund": "ସà­à¬¦à¬¾à¬¨à­€à¬œà­", + "Sylo": "ସୀଲିତୋ ନଗରୀ", + "Syrc": "ସିରିୟାକà­", + "Syre": "à¬à¬·à­à¬Ÿà­à¬°à¬¾à¬™à­à¬—େଲୋ ସିରିକà­", + "Syrj": "ୱେଷà­à¬Ÿà¬°à­à¬¨ ସିରିକà­", + "Syrn": "ଇଷà­à¬Ÿà¬°à­à¬¨ ସିରିକà­", + "Tagb": "ତଗବାନà­à­±à¬¾", + "Tale": "ତାଇ ଲେ", + "Talu": "ନୂତନ ତାଇ ଲà­à¬", + "Taml": "ତାମିଲà­", + "Tavt": "ତାଇ ଭିà¬à¬¤à­", + "Telu": "ତେଲà­à¬—à­", + "Teng": "ତେଙà­à¬—ୱାରà­", + "Tfng": "ତିଫିଙà­à¬˜à¬¾", + "Tglg": "ଟାଗାଲୋଗà­", + "Thaa": "ଥାନା", + "Thai": "ଥାଇ", + "Tibt": "ତିବେତାନà­", + "Ugar": "à­Ÿà­à¬—ାରିଟିକà­", + "Vaii": "ୱାଇ", + "Visp": "ଭିଜିବଲୠସà­à¬ªà¬¿à¬šà­", + "Xpeo": "ପà­à¬°à­à¬£à¬¾ ଫରାସୀ", + "Xsux": "ସà­à¬®à­‡à¬°à­‹-ଆକà­à¬•ାଡିଆନୠସà­à¬¨à¬¿à¬«à¬°à­à¬®", + "Yiii": "à­Ÿà­€", + "Zinh": "ବଂଶଗତ", + "Zmth": "ଗାଣିତିକ ନୋଟେସନà­", + "Zsym": "ସିମà­à¬¬à¬²à­", + "Zxxx": "ଅଲିଖିତ", + "Zyyy": "ସାଧାରଣ", + "Zzzz": "ଅଞà­à¬œà¬¾à¬¤ କିମà­à¬¬à¬¾ ଅବୈଧ ସà­à¬•à­à¬°à­€à¬ªà­à¬Ÿ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/os.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/os.json new file mode 100644 index 0000000000000000000000000000000000000000..9e95e6e60bcb3fe8ba884a8c09d6d43b8e6ba274 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/os.json @@ -0,0 +1,12 @@ +{ + "Version": "2.1.27.40", + "Names": { + "Arab": "Ðраббаг", + "Cyrl": "Киррилицӕ", + "Hans": "Ӕнцонгонд китайаг", + "Hant": "Традицион китайаг", + "Latn": "Латинаг", + "Zxxx": "ÐӕфыÑгӕ", + "Zzzz": "Ðӕзонгӕ Ñкрипт" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pa.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pa.json new file mode 100644 index 0000000000000000000000000000000000000000..ea2efe2da187fdf6b4ad61db026ddf36571731ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pa.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "ਅਰਬੀ", + "Armn": "ਅਰਮੀਨੀਆਈ", + "Beng": "ਬੰਗਾਲੀ", + "Bopo": "ਬੋਪੋਮੋਫੋ", + "Brai": "ਬਰੇਲ", + "Cyrl": "ਸਿਰੀਲਿਕ", + "Deva": "ਦੇਵਨਾਗਰੀ", + "Ethi": "ਇਥੀਓਪਿਕ", + "Geor": "ਜਾਰਜੀਆਈ", + "Grek": "ਯੂਨਾਨੀ", + "Gujr": "ਗà©à¨œà¨°à¨¾à¨¤à©€", + "Guru": "ਗà©à¨°à¨®à©à¨–à©€", + "Hanb": "ਹਾਂਬ", + "Hang": "ਹੰਗà©à¨²", + "Hani": "ਹਾਨ", + "Hans": "ਸਰਲ", + "Hant": "ਰਵਾਇਤੀ", + "Hebr": "ਹਿਬਰੂ", + "Hira": "ਹਿਰਾਗਾਨਾ", + "Hrkt": "ਜਾਪਾਨੀ ਸਿਲੇਬਰੀਜ਼", + "Jamo": "ਜਾਮੋ", + "Jpan": "ਜਪਾਨੀ", + "Kana": "ਕਾਟਾਕਾਨਾ", + "Khmr": "ਖਮੇਰ", + "Knda": "ਕੰਨੜ", + "Kore": "ਕੋਰੀਆਈ", + "Laoo": "ਲਾਓ", + "Latn": "ਲਾਤੀਨੀ", + "Mlym": "ਮਲਿਆਲਮ", + "Mong": "ਮੰਗੋਲੀਅਨ", + "Mymr": "ਮਿਆਂਮਾਰ", + "Orya": "ਉੜੀਆ", + "Sinh": "ਸਿੰਹਾਲਾ", + "Taml": "ਤਮਿਲ", + "Telu": "ਤੇਲਗੂ", + "Thaa": "ਥਾਨਾ", + "Thai": "ਥਾਈ", + "Tibt": "ਤਿੱਬਤੀ", + "Zmth": "ਗਣਿਤ ਚਿੰਨà©à¨¹-ਲਿਪੀ", + "Zsye": "ਇਮੋਜੀ", + "Zsym": "ਚਿੰਨà©à¨¹", + "Zxxx": "ਅਲਿਖਤ", + "Zyyy": "ਸਧਾਰਨ", + "Zzzz": "ਅਣਪਛਾਤੀ ਲਿਪੀ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pa_Arab.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pa_Arab.json new file mode 100644 index 0000000000000000000000000000000000000000..75fa968e2d8f2c23b6d100eb20e685cfd1b81237 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pa_Arab.json @@ -0,0 +1,7 @@ +{ + "Version": "2.1.27.40", + "Names": { + "Arab": "عربی", + "Guru": "Ú¯ÙØ±Ù…ÙÚ©Ú¾ÛŒ" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pl.json new file mode 100644 index 0000000000000000000000000000000000000000..05f22febd9f9caa0dbdfce882f9607c5d910d1df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pl.json @@ -0,0 +1,139 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "arabskie", + "Armi": "armi", + "Armn": "ormiaÅ„skie", + "Avst": "awestyjskie", + "Bali": "balijskie", + "Bamu": "bamun", + "Batk": "batak", + "Beng": "bengalskie", + "Blis": "symbole Blissa", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "Braille’a", + "Bugi": "bugiÅ„skie", + "Buhd": "buhid", + "Cakm": "chakma", + "Cans": "zunifikowane symbole kanadyjskich autochtonów", + "Cari": "karyjskie", + "Cham": "czamskie", + "Cher": "czirokeski", + "Cirt": "cirth", + "Copt": "koptyjskie", + "Cprt": "cypryjskie", + "Cyrl": "cyrylica", + "Cyrs": "cyrylica staro-cerkiewno-sÅ‚owiaÅ„ska", + "Deva": "dewanagari", + "Dsrt": "deseret", + "Egyd": "egipskie demotyczne", + "Egyh": "egipskie hieratyczne", + "Egyp": "hieroglify egipskie", + "Ethi": "etiopskie", + "Geok": "gruziÅ„skie chucuri", + "Geor": "gruziÅ„skie", + "Glag": "gÅ‚agolica", + "Goth": "gotyckie", + "Grek": "greckie", + "Gujr": "gudźarackie", + "Guru": "gurmukhi", + "Hanb": "hanb", + "Hang": "hangyl", + "Hani": "han", + "Hano": "hanunoo", + "Hans": "uproszczone", + "Hant": "tradycyjne", + "Hebr": "hebrajskie", + "Hira": "hiragana", + "Hmng": "pahawh hmong", + "Hrkt": "sylabariusze japoÅ„skie", + "Hung": "starowÄ™gierskie", + "Inds": "indus", + "Ital": "starowÅ‚oskie", + "Jamo": "jamo", + "Java": "jawajskie", + "Jpan": "japoÅ„skie", + "Kali": "kayah li", + "Kana": "katakana", + "Khar": "charosti", + "Khmr": "khmerskie", + "Knda": "kannada", + "Kore": "koreaÅ„skie", + "Kthi": "kaithi", + "Lana": "lanna", + "Laoo": "laotaÅ„skie", + "Latf": "Å‚aciÅ„ski - fraktura", + "Latg": "Å‚aciÅ„ski - odmiana gaelicka", + "Latn": "Å‚aciÅ„skie", + "Lepc": "lepcha", + "Limb": "limbu", + "Lina": "linearne A", + "Linb": "linearne B", + "Lyci": "likijskie", + "Lydi": "lidyjskie", + "Mand": "mandejskie", + "Mani": "manichejskie", + "Maya": "hieroglify Majów", + "Mero": "meroickie", + "Mlym": "malajalam", + "Mong": "mongolskie", + "Moon": "Moon’a", + "Mtei": "meitei mayek", + "Mymr": "birmaÅ„skie", + "Nkoo": "n’ko", + "Ogam": "ogham", + "Olck": "ol chiki", + "Orkh": "orchoÅ„skie", + "Orya": "orija", + "Osma": "osmanya", + "Perm": "staropermskie", + "Phag": "phags-pa", + "Phli": "inskrypcyjne pahlawi", + "Phlp": "pahlawi psaÅ‚terzowy", + "Phlv": "pahlawi książkowy", + "Phnx": "fenicki", + "Plrd": "fonetyczny Pollard’a", + "Prti": "partyjski inskrypcyjny", + "Rjng": "rejang", + "Roro": "rongorongo", + "Runr": "runiczne", + "Samr": "samarytaÅ„ski", + "Sara": "sarati", + "Saur": "saurashtra", + "Sgnw": "pismo znakowe", + "Shaw": "shawa", + "Sinh": "syngaleskie", + "Sund": "sundajskie", + "Sylo": "syloti nagri", + "Syrc": "syryjski", + "Syre": "syriacki estrangelo", + "Syrj": "syryjski (odmiana zachodnia)", + "Syrn": "syryjski (odmiana wschodnia)", + "Tagb": "tagbanwa", + "Tale": "tai le", + "Talu": "nowy tai lue", + "Taml": "tamilskie", + "Tavt": "tai viet", + "Telu": "telugu", + "Teng": "tengwar", + "Tfng": "tifinagh (berberski)", + "Tglg": "tagalog", + "Thaa": "thaana", + "Thai": "tajskie", + "Tibt": "tybetaÅ„skie", + "Ugar": "ugaryckie", + "Vaii": "vai", + "Visp": "Visible Speech", + "Xpeo": "staroperskie", + "Xsux": "klinowe sumero-akadyjskie", + "Yiii": "yi", + "Zinh": "dziedziczone", + "Zmth": "notacja matematyczna", + "Zsye": "Emoji", + "Zsym": "symbole", + "Zxxx": "jÄ™zyk bez systemu pisma", + "Zyyy": "wspólne", + "Zzzz": "nieznany skrypt" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ps.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ps.json new file mode 100644 index 0000000000000000000000000000000000000000..670362e0e2c2ccda1042a9c783cbd1fdce578e22 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ps.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "Arab": "عربي" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pt.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pt.json new file mode 100644 index 0000000000000000000000000000000000000000..9f5ec2b7c05b591da97bdd348982573b63c67bcf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pt.json @@ -0,0 +1,141 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "árabe", + "Armi": "armi", + "Armn": "armênio", + "Avst": "avéstico", + "Bali": "balinês", + "Bamu": "bamum", + "Batk": "bataque", + "Beng": "bengali", + "Blis": "símbolos bliss", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "braille", + "Bugi": "buginês", + "Buhd": "buhid", + "Cakm": "cakm", + "Cans": "escrita silábica unificada dos aborígenes canadenses", + "Cari": "cariano", + "Cham": "cham", + "Cher": "cherokee", + "Cirt": "cirth", + "Copt": "cóptico", + "Cprt": "cipriota", + "Cyrl": "cirílico", + "Cyrs": "cirílico eslavo eclesiástico", + "Deva": "devanágari", + "Dsrt": "deseret", + "Egyd": "demótico egípcio", + "Egyh": "hierático egípcio", + "Egyp": "hieróglifos egípcios", + "Ethi": "etiópico", + "Geok": "khutsuri georgiano", + "Geor": "georgiano", + "Glag": "glagolítico", + "Goth": "gótico", + "Grek": "grego", + "Gujr": "gujerati", + "Guru": "gurmuqui", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanunoo", + "Hans": "simplificado", + "Hant": "tradicional", + "Hebr": "hebraico", + "Hira": "hiragana", + "Hmng": "pahawh hmong", + "Hrkt": "silabários japoneses", + "Hung": "húngaro antigo", + "Inds": "indo", + "Ital": "itálico antigo", + "Jamo": "jamo", + "Java": "javanês", + "Jpan": "japonês", + "Kali": "kayah li", + "Kana": "katakana", + "Khar": "kharoshthi", + "Khmr": "khmer", + "Knda": "kannada", + "Kore": "coreano", + "Kthi": "kthi", + "Lana": "lanna", + "Laoo": "lao", + "Latf": "latim fraktur", + "Latg": "latim gaélico", + "Latn": "latim", + "Lepc": "lepcha", + "Limb": "limbu", + "Lina": "linear A", + "Linb": "linear B", + "Lisu": "lisu", + "Lyci": "lício", + "Lydi": "lídio", + "Mand": "mandaico", + "Mani": "maniqueano", + "Maya": "hieróglifos maias", + "Merc": "meroítico cursivo", + "Mero": "meroítico", + "Mlym": "malaiala", + "Mong": "mongol", + "Moon": "moon", + "Mtei": "meitei mayek", + "Mymr": "birmanês", + "Nkoo": "n’ko", + "Ogam": "ogâmico", + "Olck": "ol chiki", + "Orkh": "orkhon", + "Orya": "oriya", + "Osma": "osmania", + "Perm": "pérmico antigo", + "Phag": "phags-pa", + "Phli": "phli", + "Phlp": "phlp", + "Phlv": "pahlavi antigo", + "Phnx": "fenício", + "Plrd": "fonético pollard", + "Prti": "prti", + "Rjng": "rejang", + "Roro": "rongorongo", + "Runr": "rúnico", + "Samr": "samaritano", + "Sara": "sarati", + "Saur": "saurashtra", + "Sgnw": "signwriting", + "Shaw": "shaviano", + "Sinh": "cingalês", + "Sund": "sundanês", + "Sylo": "syloti nagri", + "Syrc": "siríaco", + "Syre": "siríaco estrangelo", + "Syrj": "siríaco ocidental", + "Syrn": "siríaco oriental", + "Tagb": "tagbanwa", + "Tale": "tai Le", + "Talu": "novo tai lue", + "Taml": "tâmil", + "Tavt": "tavt", + "Telu": "télugo", + "Teng": "tengwar", + "Tfng": "tifinagh", + "Tglg": "tagalo", + "Thaa": "thaana", + "Thai": "tailandês", + "Tibt": "tibetano", + "Ugar": "ugarítico", + "Vaii": "vai", + "Visp": "visible speech", + "Xpeo": "persa antigo", + "Xsux": "sumério-acadiano cuneiforme", + "Yiii": "yi", + "Zinh": "herdado", + "Zmth": "notação matemática", + "Zsye": "Emoji", + "Zsym": "zsym", + "Zxxx": "ágrafo", + "Zyyy": "comum", + "Zzzz": "escrita desconhecida" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pt_PT.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pt_PT.json new file mode 100644 index 0000000000000000000000000000000000000000..e51e9e02a1030f6ed30ce9430b139782c6cd6e10 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/pt_PT.json @@ -0,0 +1,16 @@ +{ + "Version": "2.1.29.54", + "Names": { + "Armn": "arménio", + "Egyd": "egípcio demótico", + "Egyh": "egípcio hierático", + "Gujr": "guzerate", + "Inds": "indus", + "Sylo": "siloti nagri", + "Tale": "tai le", + "Telu": "telugu", + "Zsye": "emoji", + "Zsym": "símbolos", + "Zxxx": "não escrito" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/rm.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/rm.json new file mode 100644 index 0000000000000000000000000000000000000000..1847a44c43d58452b311c0e13de6d1b3ad7e3de6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/rm.json @@ -0,0 +1,135 @@ +{ + "Version": "2.1.28.76", + "Names": { + "Arab": "arab", + "Armi": "arameic imperial", + "Armn": "armen", + "Avst": "avestic", + "Bali": "balinais", + "Batk": "batak", + "Beng": "bengal", + "Blis": "simbols da Bliss", + "Bopo": "bopomofo", + "Brah": "brahmi", + "Brai": "scrittira da Braille", + "Bugi": "buginais", + "Buhd": "buhid", + "Cakm": "chakma", + "Cans": "simbols autoctons canadais unifitgads", + "Cari": "carian", + "Cham": "cham", + "Cher": "cherokee", + "Cirt": "cirth", + "Copt": "coptic", + "Cprt": "cipriot", + "Cyrl": "cirillic", + "Cyrs": "slav da baselgia vegl", + "Deva": "devanagari", + "Dsrt": "deseret", + "Egyd": "egipzian demotic", + "Egyh": "egipzian ieratic", + "Egyp": "ieroglifas egipzianas", + "Ethi": "etiopic", + "Geok": "kutsuri", + "Geor": "georgian", + "Glag": "glagolitic", + "Goth": "gotic", + "Grek": "grec", + "Gujr": "gujarati", + "Guru": "gurmukhi", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanunoo", + "Hans": "scrittira chinaisa simplifitgada", + "Hant": "scrittira chinaisa tradiziunala", + "Hebr": "ebraic", + "Hira": "hiragana", + "Hmng": "pahawn hmong", + "Hrkt": "katanaka u hiragana", + "Hung": "ungarais vegl", + "Inds": "indus", + "Ital": "italic vegl", + "Java": "javanais", + "Jpan": "giapunais", + "Kali": "kayah li", + "Kana": "katakana", + "Khar": "kharoshthi", + "Khmr": "khmer\/cambodschan", + "Knda": "kannada", + "Kore": "corean", + "Kthi": "kaithi", + "Lana": "lanna", + "Laoo": "laot", + "Latf": "latin (scrittira gotica)", + "Latg": "latin (scrittira gaelica)", + "Latn": "latin", + "Lepc": "lepcha", + "Limb": "limbu", + "Lina": "linear A", + "Linb": "linear B", + "Lyci": "lichic", + "Lydi": "lidic", + "Mand": "mandaic", + "Mani": "manicheic", + "Maya": "ieroglifas maya", + "Mero": "meroitic", + "Mlym": "malaisian", + "Mong": "mongolic", + "Moon": "moon", + "Mtei": "meetei mayek", + "Mymr": "burmais", + "Nkoo": "n’ko", + "Ogam": "ogham", + "Olck": "ol chiki", + "Orkh": "orkhon", + "Orya": "oriya", + "Osma": "osman", + "Perm": "permic vegl", + "Phag": "phags-pa", + "Phli": "pahlavi dad inscripziuns", + "Phlp": "pahlavi da psalms", + "Phlv": "pahlavi da cudeschs", + "Phnx": "fenizian", + "Plrd": "fonetica da Pollard", + "Prti": "partic dad inscripziuns", + "Rjng": "rejang", + "Roro": "rongorongo", + "Runr": "runic", + "Samr": "samaritan", + "Sara": "sarati", + "Saur": "saurashtra", + "Sgnw": "lingua da segns", + "Shaw": "shavian", + "Sinh": "singalais", + "Sund": "sundanais", + "Sylo": "syloti nagri", + "Syrc": "siric", + "Syre": "siric estrangelo", + "Syrj": "siric dal vest", + "Syrn": "siric da l’ost", + "Tagb": "tagbanwa", + "Tale": "tai le", + "Talu": "tai lue", + "Taml": "tamil", + "Tavt": "tai viet", + "Telu": "telugu", + "Teng": "tengwar", + "Tfng": "tifinagh", + "Tglg": "tagalog", + "Thaa": "thaana", + "Thai": "tailandais", + "Tibt": "tibetan", + "Ugar": "ugaritic", + "Vaii": "vaii", + "Visp": "alfabet visibel", + "Xpeo": "persian vegl", + "Xsux": "scrittira a cugn sumeric-accadica", + "Yiii": "yi", + "Zinh": "ertà", + "Zmth": "notaziun matematica", + "Zsym": "simbols", + "Zxxx": "linguas na scrittas", + "Zyyy": "betg determinà", + "Zzzz": "scrittira nunenconuschenta u nunvalaivla" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ro.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ro.json new file mode 100644 index 0000000000000000000000000000000000000000..5927d3a678182c9f429ebdc16f9ac08a781a26de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ro.json @@ -0,0 +1,80 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "arabă", + "Armn": "armeană", + "Bali": "balineză", + "Beng": "bengaleză", + "Bopo": "bopomofo", + "Brai": "braille", + "Cans": "silabică aborigenă canadiană unificată", + "Copt": "coptă", + "Cprt": "cipriotă", + "Cyrl": "chirilică", + "Cyrs": "chirilică slavonă bisericească veche", + "Deva": "devanagari", + "Dsrt": "mormonă", + "Egyd": "demotică egipteană", + "Egyh": "hieratică egipteană", + "Egyp": "hieroglife egiptene", + "Ethi": "etiopiană", + "Geok": "georgiană bisericească", + "Geor": "georgiană", + "Glag": "glagolitică", + "Goth": "gotică", + "Grek": "greacă", + "Gujr": "gujarati", + "Guru": "gurmukhi", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "han", + "Hans": "simplificată", + "Hant": "tradiÈ›ională", + "Hebr": "ebraică", + "Hira": "hiragana", + "Hrkt": "katakana sau hiragana", + "Hung": "maghiară veche", + "Inds": "indus", + "Ital": "italică veche", + "Jamo": "jamo", + "Java": "javaneză", + "Jpan": "japoneză", + "Kana": "katakana", + "Khmr": "khmeră", + "Knda": "kannada", + "Kore": "coreeană", + "Laoo": "laoÈ›iană", + "Latf": "latină Fraktur", + "Latg": "latină gaelică", + "Latn": "latină", + "Lina": "lineară A", + "Linb": "lineară B", + "Lydi": "lidiană", + "Maya": "hieroglife maya", + "Mlym": "malayalam", + "Mong": "mongolă", + "Mymr": "birmană", + "Orya": "oriya", + "Phnx": "feniciană", + "Runr": "runică", + "Sinh": "singaleză", + "Syrc": "siriacă", + "Syrj": "siriacă occidentală", + "Syrn": "siriacă orientală", + "Taml": "tamilă", + "Telu": "telugu", + "Tfng": "berberă", + "Thaa": "thaana", + "Thai": "thailandeză", + "Tibt": "tibetană", + "Xpeo": "persană veche", + "Xsux": "cuneiformă sumero-akkadiană", + "Zinh": "moÈ™tenită", + "Zmth": "notaÈ›ie matematică", + "Zsye": "emoji", + "Zsym": "simboluri", + "Zxxx": "nescrisă", + "Zyyy": "comună", + "Zzzz": "scriere necunoscută" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ru.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ru.json new file mode 100644 index 0000000000000000000000000000000000000000..0058c1ab7bfa64e774bdbe97bee57f8d2d1d94ec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ru.json @@ -0,0 +1,166 @@ +{ + "Version": "2.1.29.20", + "Names": { + "Afak": "афака", + "Arab": "арабица", + "Armi": "арамейÑкаÑ", + "Armn": "армÑнÑкаÑ", + "Avst": "авеÑтийÑкаÑ", + "Bali": "балийÑкаÑ", + "Bamu": "бамум", + "Bass": "баÑÑа (вах)", + "Batk": "батакÑкаÑ", + "Beng": "бенгальÑкаÑ", + "Blis": "блиÑÑимволика", + "Bopo": "бопомофо", + "Brah": "брахми", + "Brai": "БрайлÑ", + "Bugi": "бугинизийÑкаÑ", + "Buhd": "бухид", + "Cakm": "чакмийÑкаÑ", + "Cans": "канадÑкое Ñлоговое пиÑьмо", + "Cari": "карийÑкаÑ", + "Cham": "чамÑкаÑ", + "Cher": "чероки", + "Cirt": "кирт", + "Copt": "коптÑкаÑ", + "Cprt": "кипрÑкаÑ", + "Cyrl": "кириллица", + "Cyrs": "ÑтароÑлавÑнÑкаÑ", + "Deva": "деванагари", + "Dsrt": "дезерет", + "Dupl": "дуплоÑнÑÐºÐ°Ñ ÑкоропиÑÑŒ", + "Egyd": "египетÑÐºÐ°Ñ Ð´ÐµÐ¼Ð¾Ñ‚Ð¸Ñ‡ÐµÑкаÑ", + "Egyh": "египетÑÐºÐ°Ñ Ð¸ÐµÑ€Ð°Ñ‚Ð¸Ñ‡ÐµÑкаÑ", + "Egyp": "египетÑÐºÐ°Ñ Ð¸ÐµÑ€Ð¾Ð³Ð»Ð¸Ñ„Ð¸Ñ‡ÐµÑкаÑ", + "Ethi": "ÑфиопÑкаÑ", + "Geok": "грузинÑÐºÐ°Ñ Ñ…ÑƒÑ†ÑƒÑ€Ð¸", + "Geor": "грузинÑкаÑ", + "Glag": "глаголица", + "Goth": "готÑкаÑ", + "Gran": "грантха", + "Grek": "гречеÑкаÑ", + "Gujr": "гуджарати", + "Guru": "гурмукхи", + "Hanb": "ханьб", + "Hang": "хангыль", + "Hani": "китайÑкаÑ", + "Hano": "хануну", + "Hans": "ÑƒÐ¿Ñ€Ð¾Ñ‰ÐµÐ½Ð½Ð°Ñ ÐºÐ¸Ñ‚Ð°Ð¹ÑкаÑ", + "Hant": "Ñ‚Ñ€Ð°Ð´Ð¸Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ ÐºÐ¸Ñ‚Ð°Ð¹ÑкаÑ", + "Hebr": "еврейÑкаÑ", + "Hira": "хирагана", + "Hluw": "лувийÑкие иероглифы", + "Hmng": "пахау хмонг", + "Hrkt": "катакана или хирагана", + "Hung": "ÑтаровенгерÑкаÑ", + "Inds": "хараппÑÐºÐ°Ñ (пиÑьменноÑть долины Инда)", + "Ital": "ÑтароитальÑнÑкаÑ", + "Jamo": "джамо", + "Java": "ÑванÑкаÑ", + "Jpan": "ÑпонÑкаÑ", + "Jurc": "чжурчжÑньÑкаÑ", + "Kali": "кайа", + "Kana": "катакана", + "Khar": "кхароштхи", + "Khmr": "кхмерÑкаÑ", + "Khoj": "ходжики", + "Knda": "каннада", + "Kore": "корейÑкаÑ", + "Kpel": "кпелле", + "Kthi": "кайтхи", + "Lana": "ланна", + "Laoo": "лаоÑÑкаÑ", + "Latf": "латинÑÐºÐ°Ñ Ñ„Ñ€Ð°ÐºÑ‚ÑƒÑ€Ð°", + "Latg": "гÑльÑÐºÐ°Ñ Ð»Ð°Ñ‚Ð¸Ð½ÑкаÑ", + "Latn": "латиница", + "Lepc": "лепха", + "Limb": "лимбу", + "Lina": "линейное пиÑьмо Ð", + "Linb": "линейное пиÑьмо Б", + "Lisu": "лиÑу", + "Loma": "лома", + "Lyci": "лициан", + "Lydi": "лидийÑкаÑ", + "Mand": "мандейÑкаÑ", + "Mani": "манихейÑкаÑ", + "Maya": "майÑ", + "Mend": "менде", + "Merc": "мероитÑÐºÐ°Ñ ÐºÑƒÑ€ÑивнаÑ", + "Mero": "мероитÑкаÑ", + "Mlym": "малаÑлам", + "Mong": "монгольÑкаÑ", + "Moon": "азбука муна", + "Mroo": "мро", + "Mtei": "манипури", + "Mymr": "мьÑнманÑкаÑ", + "Narb": "ÑеверноаравийÑкое", + "Nbat": "набатейÑкаÑ", + "Nkgb": "наÑи геба", + "Nkoo": "нко", + "Nshu": "нюй-шу", + "Ogam": "огамичеÑкаÑ", + "Olck": "ол чики", + "Orkh": "орхоно-ениÑейÑкаÑ", + "Orya": "ориÑ", + "Osma": "оÑманÑкаÑ", + "Palm": "пальмиры", + "Perm": "древнепермÑкаÑ", + "Phag": "пагÑпа", + "Phli": "пехлевийÑкаÑ", + "Phlp": "пахлави пÑалтирнаÑ", + "Phlv": "пахлави книжнаÑ", + "Phnx": "финикийÑкаÑ", + "Plrd": "поллардовÑÐºÐ°Ñ Ñ„Ð¾Ð½ÐµÑ‚Ð¸ÐºÐ°", + "Prti": "парфÑнÑкаÑ", + "Rjng": "реджангÑкаÑ", + "Roro": "ронго-ронго", + "Runr": "руничеÑкаÑ", + "Samr": "ÑамаритÑнÑкаÑ", + "Sara": "Ñарати", + "Sarb": "ÑтароюжноарабÑкаÑ", + "Saur": "Ñаураштра", + "Sgnw": "Ñзык знаков", + "Shaw": "алфавит Шоу", + "Shrd": "шарада", + "Sind": "кхудавади", + "Sinh": "ÑингальÑкаÑ", + "Sora": "Ñора-Ñонпенг", + "Sund": "ÑунданÑкаÑ", + "Sylo": "Ñилоти нагри", + "Syrc": "ÑирийÑкаÑ", + "Syre": "ÑирийÑÐºÐ°Ñ ÑÑтрангело", + "Syrj": "западноÑирийÑкаÑ", + "Syrn": "воÑточно-ÑирийÑкаÑ", + "Tagb": "тагбанва", + "Takr": "такри", + "Tale": "тайÑкий ле", + "Talu": "новый тайÑкий ле", + "Taml": "тамильÑкаÑ", + "Tang": "тангутÑкое менÑ", + "Tavt": "тай-вьет", + "Telu": "телугу", + "Teng": "тенгварÑкаÑ", + "Tfng": "древнеливийÑкаÑ", + "Tglg": "тагалог", + "Thaa": "тана", + "Thai": "тайÑкаÑ", + "Tibt": "тибетÑкаÑ", + "Tirh": "тирхута", + "Ugar": "угаритÑкаÑ", + "Vaii": "вайÑкаÑ", + "Visp": "Ð²Ð¸Ð´Ð¸Ð¼Ð°Ñ Ñ€ÐµÑ‡ÑŒ", + "Wara": "варанг-кшити", + "Wole": "волеаи", + "Xpeo": "ÑтароперÑидÑкаÑ", + "Xsux": "шумеро-аккадÑÐºÐ°Ñ ÐºÐ»Ð¸Ð½Ð¾Ð¿Ð¸ÑÑŒ", + "Yiii": "и", + "Zinh": "унаÑледованнаÑ", + "Zmth": "математичеÑкие обозначениÑ", + "Zsye": "Ñмодзи", + "Zsym": "Ñимволы", + "Zxxx": "беÑпиÑьменный", + "Zyyy": "общепринÑтаÑ", + "Zzzz": "неизвеÑÑ‚Ð½Ð°Ñ Ð¿Ð¸ÑьменноÑть" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/se.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/se.json new file mode 100644 index 0000000000000000000000000000000000000000..8b4e1a1403156a901036744426c0ecca9ea4a324 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/se.json @@ -0,0 +1,17 @@ +{ + "Version": "2.1.27.98", + "Names": { + "Arab": "arába", + "Cyrl": "kyrillalaÅ¡", + "Grek": "greikkalaÅ¡", + "Hang": "hangul", + "Hani": "kiinnaÅ¡", + "Hans": "álki", + "Hant": "árbevirolaÅ¡", + "Hira": "hiragana", + "Kana": "katakana", + "Latn": "láhtenaÅ¡", + "Zxxx": "orrut chállojuvvot", + "Zzzz": "dovdameahttun chállin" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/se_FI.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/se_FI.json new file mode 100644 index 0000000000000000000000000000000000000000..4e23ee7e49c772d6b64cd0cc0aa77d761b794b82 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/se_FI.json @@ -0,0 +1,11 @@ +{ + "Version": "2.1.27.78", + "Names": { + "Arab": "arábalaÅ¡", + "Hani": "kiinnálaÅ¡", + "Hans": "álkes kiinnálaÅ¡", + "Hant": "árbevirolaÅ¡ kiinnálaÅ¡", + "Zxxx": "orrut Äállojuvvot", + "Zzzz": "dovdameahttun Äállin" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sh.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sh.json new file mode 100644 index 0000000000000000000000000000000000000000..a4aeecaeaf0f58712f256ec0ef7f844a4b765255 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sh.json @@ -0,0 +1,138 @@ +{ + "Version": "2.1.29.33", + "Names": { + "Arab": "arapsko pismo", + "Armi": "imperijsko aramejsko pismo", + "Armn": "jermensko pismo", + "Avst": "avestansko pismo", + "Bali": "balijsko pismo", + "Batk": "batak pismo", + "Beng": "bengalsko pismo", + "Blis": "blisimboliÄno pismo", + "Bopo": "bopomofo pismo", + "Brah": "bramansko pismo", + "Brai": "Brajevo pismo", + "Bugi": "buginsko pismo", + "Buhd": "buhidsko pismo", + "Cakm": "Äakmansko pismo", + "Cans": "ujedinjeni kanadski aboridžinski silabici", + "Cari": "karijsko pismo", + "Cham": "Äamsko pismo", + "Cher": "ÄŒeroki", + "Cirt": "cirt pismo", + "Copt": "koptiÄko pismo", + "Cprt": "kiparsko pismo", + "Cyrl": "ćirilica", + "Cyrs": "Staroslovenska crkvena ćirilica", + "Deva": "devanagari", + "Dsrt": "Dezeret", + "Egyd": "egipatsko narodno pismo", + "Egyh": "egipatsko hijeratsko pismo", + "Egyp": "egipatski hijeroglifi", + "Ethi": "etiopsko pismo", + "Geok": "gruzijsko khutsuri pismo", + "Geor": "gruzijsko pismo", + "Glag": "glagoljica", + "Goth": "Gotika", + "Grek": "grÄko pismo", + "Gujr": "gudžaratsko pismo", + "Guru": "gurmuki pismo", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanuno", + "Hans": "pojednostavljeno kinesko pismo", + "Hant": "tradicionalno kinesko pismo", + "Hebr": "hebrejsko pismo", + "Hira": "hiragana", + "Hmng": "pahav hmong pismo", + "Hrkt": "japanska slogovna pisma", + "Hung": "staromaÄ‘arsko pismo", + "Inds": "induÅ¡ko pismo", + "Ital": "stari italik", + "Jamo": "džamo", + "Java": "javansko pismo", + "Jpan": "japansko pismo", + "Kali": "kajah-li pismo", + "Kana": "katakana", + "Khar": "karoÅ¡ti pismo", + "Khmr": "kmersko pismo", + "Knda": "kanada pismo", + "Kore": "korejsko pismo", + "Kthi": "kaiti", + "Lana": "lanna pismo", + "Laoo": "laoÅ¡ko pismo", + "Latf": "latinica (fraktur varijanta)", + "Latg": "galska latinica", + "Latn": "latinica", + "Lepc": "lepÄa pismo", + "Limb": "limbu pismo", + "Lina": "linearno A pismo", + "Linb": "linearno B pismo", + "Lyci": "lisijsko pismo", + "Lydi": "lidijsko pismo", + "Mand": "mandeansko pismo", + "Mani": "manihejsko pismo", + "Maya": "majanski hijeroglifi", + "Mero": "meroitik pismo", + "Mlym": "malajalamsko pismo", + "Mong": "mongolsko pismo", + "Moon": "meseÄevo pismo", + "Mtei": "meitei majek pismo", + "Mymr": "mijanmarsko pismo", + "Nkoo": "n’ko pismo", + "Ogam": "ogamsko pismo", + "Olck": "ol Äiki pismo", + "Orkh": "orkonsko pismo", + "Orya": "orijansko pismo", + "Osma": "osmanjansko pismo", + "Perm": "staro permiksko pismo", + "Phag": "pags-pa pismo", + "Phli": "pisani pahlavi", + "Phlp": "psalter pahlavi", + "Phlv": "pahlavi pismo", + "Phnx": "FeniÄansko pismo", + "Plrd": "porald fonetsko pismo", + "Prti": "pisani partian", + "Rjng": "rejang pismo", + "Roro": "rongorongo pismo", + "Runr": "runsko pismo", + "Samr": "samaritansko pismo", + "Sara": "sarati pismo", + "Saur": "sauraÅ¡tra pismo", + "Sgnw": "znakovno pismo", + "Shaw": "Å¡avijansko pismo", + "Sinh": "sinhalsko pismo", + "Sund": "sundansko pismo", + "Sylo": "siloti nagri pismo", + "Syrc": "sirijsko pismo", + "Syre": "sirijsko estrangelo pismo", + "Syrj": "zapadnosirijsko pismo", + "Syrn": "pismo istoÄne Sirije", + "Tagb": "tagbanva pismo", + "Tale": "tai le pismo", + "Talu": "novi tai lue", + "Taml": "tamilsko pismo", + "Tavt": "tai viet pismo", + "Telu": "telugu pismo", + "Teng": "tengvar pismo", + "Tfng": "tifinag pismo", + "Tglg": "Tagalog", + "Thaa": "tana pismo", + "Thai": "tajlandsko pismo", + "Tibt": "tibetansko pismo", + "Ugar": "ugaritsko pismo", + "Vaii": "vai pismo", + "Visp": "vidljivi govor", + "Xpeo": "staropersijsko pismo", + "Xsux": "sumersko-akadsko kuneiform pismo", + "Yiii": "ji pismo", + "Zinh": "nasledno pismo", + "Zmth": "matematiÄka notacija", + "Zsye": "emodži", + "Zsym": "simboli", + "Zxxx": "nepisani jezik", + "Zyyy": "zajedniÄko pismo", + "Zzzz": "nepoznato pismo" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/si.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/si.json new file mode 100644 index 0000000000000000000000000000000000000000..5364ad7d1be34de82b307e46ba3054cf07e7d908 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/si.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "à¶…à¶»à·à¶¶à·’", + "Armn": "ආර්මේනියà·à¶±à·”", + "Beng": "බෙංගà·à¶½à·’", + "Bopo": "බොපොමොෆà·", + "Brai": "à¶¶à·Šâ€à¶»à·šà¶½à·Š", + "Cyrl": "සිරිලික්", + "Deva": "දේවනà·à¶œà¶»à·“", + "Ethi": "ඉතියà·à¶´à·’යà·à¶±à·”", + "Geor": "à¶¢à·à¶»à·Šà¶¢à·’යà·à¶±à·”", + "Grek": "ග්â€à¶»à·“à¶š", + "Gujr": "ගුජරà·à¶§à·’", + "Guru": "ගුර්මුඛි", + "Hanb": "à·„à·à¶±à·Šà¶©à·Šà¶¶à·Š", + "Hang": "à·„à·à¶±à·Šà¶œà·”ල්", + "Hani": "හන්", + "Hans": "සුළුකළ", + "Hant": "à·ƒà·à¶¸à·Šà¶´à·Šâ€à¶»à¶¯à·à¶ºà·’à¶š", + "Hebr": "à·„à·“à¶¶à·²", + "Hira": "හිරඟනà·", + "Hrkt": "ජෑපනීස් සිලබරීස්", + "Jamo": "à¶¢à·à¶¸à·œ", + "Jpan": "ජපන්", + "Kana": "à¶šà¶­à¶šà¶±à·", + "Khmr": "කමර්", + "Knda": "à¶šà¶«à·Šà¶«à¶©", + "Kore": "කොරියà·à¶±à·”", + "Laoo": "à¶½à·à¶•", + "Latn": "ලතින්", + "Mlym": "මලයà·à¶½à¶¸à·Š", + "Mong": "මොන්ගà·à¶½à·’යà·à¶±à·”", + "Mymr": "මියන්මà·à¶»", + "Orya": "ඔරියà·", + "Sinh": "සිංහල", + "Taml": "දෙමළ", + "Telu": "තෙළිඟු", + "Thaa": "à¶­à·à¶±", + "Thai": "à¶­à·à¶ºà·’", + "Tibt": "à¶§à·’â€à¶¶à·™à¶§à·Š", + "Zmth": "ගනිතමය සංකේත", + "Zsye": "ඉමොජි", + "Zsym": "සංකේත", + "Zxxx": "අලිඛිත", + "Zyyy": "පොදු.", + "Zzzz": "නොදත් à¶…à¶šà·Šà·‚à¶» මà·à¶½à·à·€" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sk.json new file mode 100644 index 0000000000000000000000000000000000000000..e8639cbe2ac8fbf8d7f4facd2c0041f612da180f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sk.json @@ -0,0 +1,58 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "arabské", + "Armn": "arménske", + "Bali": "balijský", + "Beng": "bengálske", + "Bopo": "bopomofo", + "Brai": "braillovo", + "Cyrl": "cyrilika", + "Deva": "dévanágarí", + "Egyp": "egyptské hieroglyfy", + "Ethi": "etiópske", + "Geor": "gruzínske", + "Glag": "hlaholika", + "Goth": "gotický", + "Grek": "grécke", + "Gujr": "gudžarátí", + "Guru": "gurmukhi", + "Hanb": "Äínske a bopomofo", + "Hang": "hangul", + "Hani": "Äínske", + "Hans": "zjednoduÅ¡ené", + "Hant": "tradiÄné", + "Hebr": "hebrejské", + "Hira": "hiragana", + "Hrkt": "kana", + "Jamo": "jamo", + "Jpan": "japonské", + "Kana": "katakana", + "Khmr": "khmérske", + "Knda": "kannadské", + "Kore": "kórejské", + "Laoo": "laoské", + "Latn": "latinka", + "Lina": "lineárna A", + "Linb": "lineárna B", + "Maya": "mayské hieroglyfy", + "Mlym": "malajálamske", + "Mong": "mongolské", + "Mymr": "barmské", + "Orya": "uríjske", + "Osma": "osmanský", + "Runr": "Runové písmo", + "Sinh": "sinhálske", + "Taml": "tamilské", + "Telu": "telugské", + "Thaa": "tána", + "Thai": "thajské", + "Tibt": "tibetské", + "Zmth": "matematický zápis", + "Zsye": "emodži", + "Zsym": "symboly", + "Zxxx": "bez zápisu", + "Zyyy": "vÅ¡eobecné", + "Zzzz": "neznáme písmo" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sl.json new file mode 100644 index 0000000000000000000000000000000000000000..eb8664fd4477364dc4357c7e0c2a865f8cc601a2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sl.json @@ -0,0 +1,127 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "arabski", + "Armi": "imperialno-aramejski", + "Armn": "armenski", + "Avst": "avestanski", + "Bali": "balijski", + "Batk": "bataÅ¡ki", + "Beng": "bengalski", + "Blis": "znakovna pisava Bliss", + "Bopo": "bopomofo", + "Brah": "bramanski", + "Brai": "braillova pisava", + "Bugi": "buginski", + "Buhd": "buhidski", + "Cans": "poenotena zlogovna pisava kanadskih staroselcev", + "Cham": "Cham", + "Cher": "ÄerokeÅ¡ki", + "Cirt": "kirt", + "Copt": "koptski", + "Cprt": "ciprski", + "Cyrl": "cirilica", + "Cyrs": "starocerkvenoslovanska cirilica", + "Deva": "devanagarÅ¡Äica", + "Dsrt": "fonetska pisava deseret", + "Egyd": "demotska egipÄanska pisava", + "Egyh": "hieratska egipÄanska pisava", + "Egyp": "egipÄanska slikovna pisava", + "Ethi": "etiopski", + "Geok": "cerkvenogruzijski", + "Geor": "gruzijski", + "Glag": "glagoliÅ¡ki", + "Goth": "gotski", + "Grek": "grÅ¡ki", + "Gujr": "gudžaratski", + "Guru": "gurmuki", + "Hanb": "Hanb", + "Hang": "hangul", + "Hani": "kanji", + "Hano": "hanunski", + "Hans": "poenostavljena pisava han", + "Hant": "tradicionalna pisava han", + "Hebr": "hebrejski", + "Hira": "hiragana", + "Hmng": "pahavhmonska zlogovna pisava", + "Hrkt": "katakana ali hiragana", + "Hung": "staroogrski", + "Inds": "induÅ¡ki", + "Ital": "staroitalski", + "Jamo": "Jamo", + "Java": "javanski", + "Jpan": "japonski", + "Kali": "karenski", + "Kana": "katakana", + "Khar": "gandarski", + "Khmr": "kmerski", + "Knda": "kanadski", + "Kore": "korejski", + "Kthi": "kajatski", + "Laoo": "laoÅ¡ki", + "Latf": "fraktura", + "Latg": "gelski latiniÄni", + "Latn": "latinica", + "Lepc": "lepÅ¡ki", + "Limb": "limbuÅ¡ki", + "Lina": "linearna pisava A", + "Linb": "linearna pisava B", + "Lyci": "licijski", + "Lydi": "lidijski", + "Mand": "mandanski", + "Mani": "manihejski", + "Maya": "majevska slikovna pisava", + "Mero": "meroitski", + "Mlym": "malajalamski", + "Mong": "mongolska", + "Moon": "Moonova pisava za slepe", + "Mtei": "manipurski", + "Mymr": "mjanmarski", + "Ogam": "ogamski", + "Olck": "santalski", + "Orkh": "orkonski", + "Orya": "orijski", + "Osma": "osmanski", + "Perm": "staropermijski", + "Phag": "pagpajski", + "Phli": "vrezani napisi pahlavi", + "Phlp": "psalmski pahlavi", + "Phlv": "knjižno palavanski", + "Phnx": "feniÄanski", + "Plrd": "Pollardova fonetska pisava", + "Roro": "rongorongo", + "Runr": "runski", + "Samr": "samaritanski", + "Sara": "saratski", + "Sgnw": "znakovna pisava", + "Shaw": "Å¡ojevski", + "Sinh": "sinhalski", + "Sund": "sundanski", + "Sylo": "siletsko-nagarijski", + "Syrc": "sirijski", + "Syre": "sirska abeceda estrangelo", + "Syrj": "zahodnosirijski", + "Syrn": "vzhodnosirijski", + "Tagb": "tagbanski", + "Taml": "tamilski", + "Tavt": "tajsko-vietnamski", + "Telu": "teluÅ¡ki", + "Teng": "tengvarski", + "Tfng": "tifinajski", + "Tglg": "tagaloÅ¡ki", + "Thaa": "tanajski", + "Thai": "tajski", + "Tibt": "tibetanski", + "Ugar": "ugaritski", + "Vaii": "zlogovna pisava vai", + "Visp": "vidni govor", + "Xpeo": "staroperzijski", + "Xsux": "sumersko-akadski klinopis", + "Zinh": "podedovan", + "Zmth": "matematiÄna znamenja", + "Zsym": "simboli", + "Zxxx": "nenapisano", + "Zyyy": "sploÅ¡no", + "Zzzz": "neznan ali neveljaven zapis" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/so.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/so.json new file mode 100644 index 0000000000000000000000000000000000000000..7ea667e8cb93e94022faf12721fdd0bbb6a5b672 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/so.json @@ -0,0 +1,7 @@ +{ + "Version": "2.1.27.78", + "Names": { + "Zxxx": "Aan la qorin", + "Zzzz": "Far aan la aqoon amase aan saxnayn" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sq.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sq.json new file mode 100644 index 0000000000000000000000000000000000000000..51f34cf730bf480feebe291bf6a9d51d65961def --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sq.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "arabik", + "Armn": "armen", + "Beng": "bengal", + "Bopo": "bopomof", + "Brai": "brailisht", + "Cyrl": "cirilik", + "Deva": "devanagar", + "Ethi": "etiopik", + "Geor": "gjeorgjian", + "Grek": "grek", + "Gujr": "guxharat", + "Guru": "gurmuk", + "Hanb": "hanbik", + "Hang": "hangul", + "Hani": "han", + "Hans": "i thjeshtuar", + "Hant": "tradicional", + "Hebr": "hebraik", + "Hira": "hiragan", + "Hrkt": "alfabet rrokjesor japonez", + "Jamo": "jamosisht", + "Jpan": "japonez", + "Kana": "katakan", + "Khmr": "kmer", + "Knda": "kanad", + "Kore": "korean", + "Laoo": "laosisht", + "Latn": "latin", + "Mlym": "malajalam", + "Mong": "mongol", + "Mymr": "birman", + "Orya": "orija", + "Sinh": "sinhal", + "Taml": "tamil", + "Telu": "telug", + "Thaa": "tanisht", + "Thai": "tajlandez", + "Tibt": "tibetisht", + "Zmth": "simbole matematikore", + "Zsye": "emoji", + "Zsym": "me simbole", + "Zxxx": "i pashkruar", + "Zyyy": "i zakonshëm", + "Zzzz": "i panjohur" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sr.json new file mode 100644 index 0000000000000000000000000000000000000000..fae62efcd8a3c0915ebdd1e38e3de58e76ea0cfb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sr.json @@ -0,0 +1,138 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "арапÑко пиÑмо", + "Armi": "империјÑко арамејÑко пиÑмо", + "Armn": "јерменÑко пиÑмо", + "Avst": "авеÑтанÑко пиÑмо", + "Bali": "балијÑко пиÑмо", + "Batk": "батак пиÑмо", + "Beng": "бенгалÑко пиÑмо", + "Blis": "блиÑимболично пиÑмо", + "Bopo": "бопомофо пиÑмо", + "Brah": "браманÑко пиÑмо", + "Brai": "Брајево пиÑмо", + "Bugi": "бугинÑко пиÑмо", + "Buhd": "бухидÑко пиÑмо", + "Cakm": "чакманÑко пиÑмо", + "Cans": "уједињени канадÑки абориџинÑки Ñилабици", + "Cari": "каријÑко пиÑмо", + "Cham": "чамÑко пиÑмо", + "Cher": "Чероки", + "Cirt": "цирт пиÑмо", + "Copt": "коптичко пиÑмо", + "Cprt": "кипарÑко пиÑмо", + "Cyrl": "ћирилица", + "Cyrs": "СтароÑловенÑка црквена ћирилица", + "Deva": "деванагари", + "Dsrt": "Дезерет", + "Egyd": "египатÑко народно пиÑмо", + "Egyh": "египатÑко хијератÑко пиÑмо", + "Egyp": "египатÑки хијероглифи", + "Ethi": "етиопÑко пиÑмо", + "Geok": "грузијÑко кхутÑури пиÑмо", + "Geor": "грузијÑко пиÑмо", + "Glag": "глагољица", + "Goth": "Готика", + "Grek": "грчко пиÑмо", + "Gujr": "гуџаратÑко пиÑмо", + "Guru": "гурмуки пиÑмо", + "Hanb": "ханб", + "Hang": "хангул", + "Hani": "хан", + "Hano": "хануно", + "Hans": "поједноÑтављено кинеÑко пиÑмо", + "Hant": "традиционално кинеÑко пиÑмо", + "Hebr": "хебрејÑко пиÑмо", + "Hira": "хирагана", + "Hmng": "пахав хмонг пиÑмо", + "Hrkt": "јапанÑка Ñлоговна пиÑма", + "Hung": "ÑтаромађарÑко пиÑмо", + "Inds": "индушко пиÑмо", + "Ital": "Ñтари италик", + "Jamo": "џамо", + "Java": "јаванÑко пиÑмо", + "Jpan": "јапанÑко пиÑмо", + "Kali": "кајах-ли пиÑмо", + "Kana": "катакана", + "Khar": "карошти пиÑмо", + "Khmr": "кмерÑко пиÑмо", + "Knda": "канада пиÑмо", + "Kore": "корејÑко пиÑмо", + "Kthi": "каити", + "Lana": "ланна пиÑмо", + "Laoo": "лаошко пиÑмо", + "Latf": "латиница (фрактур варијанта)", + "Latg": "галÑка латиница", + "Latn": "латиница", + "Lepc": "лепча пиÑмо", + "Limb": "лимбу пиÑмо", + "Lina": "линеарно РпиÑмо", + "Linb": "линеарно Б пиÑмо", + "Lyci": "лиÑијÑко пиÑмо", + "Lydi": "лидијÑко пиÑмо", + "Mand": "мандеанÑко пиÑмо", + "Mani": "манихејÑко пиÑмо", + "Maya": "мајанÑки хијероглифи", + "Mero": "мероитик пиÑмо", + "Mlym": "малајаламÑко пиÑмо", + "Mong": "монголÑко пиÑмо", + "Moon": "меÑечево пиÑмо", + "Mtei": "меитеи мајек пиÑмо", + "Mymr": "мијанмарÑко пиÑмо", + "Nkoo": "н’ко пиÑмо", + "Ogam": "огамÑко пиÑмо", + "Olck": "ол чики пиÑмо", + "Orkh": "орконÑко пиÑмо", + "Orya": "оријанÑко пиÑмо", + "Osma": "оÑмањанÑко пиÑмо", + "Perm": "Ñтаро пермикÑко пиÑмо", + "Phag": "пагÑ-па пиÑмо", + "Phli": "пиÑани пахлави", + "Phlp": "пÑалтер пахлави", + "Phlv": "пахлави пиÑмо", + "Phnx": "ФеничанÑко пиÑмо", + "Plrd": "поралд фонетÑко пиÑмо", + "Prti": "пиÑани партиан", + "Rjng": "рејанг пиÑмо", + "Roro": "ронгоронго пиÑмо", + "Runr": "рунÑко пиÑмо", + "Samr": "ÑамаританÑко пиÑмо", + "Sara": "Ñарати пиÑмо", + "Saur": "Ñаураштра пиÑмо", + "Sgnw": "знаковно пиÑмо", + "Shaw": "шавијанÑко пиÑмо", + "Sinh": "ÑинхалÑко пиÑмо", + "Sund": "ÑунданÑко пиÑмо", + "Sylo": "Ñилоти нагри пиÑмо", + "Syrc": "ÑиријÑко пиÑмо", + "Syre": "ÑиријÑко еÑтрангело пиÑмо", + "Syrj": "западноÑиријÑко пиÑмо", + "Syrn": "пиÑмо иÑточне Сирије", + "Tagb": "тагбанва пиÑмо", + "Tale": "таи ле пиÑмо", + "Talu": "нови таи луе", + "Taml": "тамилÑко пиÑмо", + "Tavt": "таи виет пиÑмо", + "Telu": "телугу пиÑмо", + "Teng": "тенгвар пиÑмо", + "Tfng": "тифинаг пиÑмо", + "Tglg": "Тагалог", + "Thaa": "тана пиÑмо", + "Thai": "тајландÑко пиÑмо", + "Tibt": "тибетанÑко пиÑмо", + "Ugar": "угаритÑко пиÑмо", + "Vaii": "ваи пиÑмо", + "Visp": "видљиви говор", + "Xpeo": "ÑтароперÑијÑко пиÑмо", + "Xsux": "ÑумерÑко-акадÑко кунеиформ пиÑмо", + "Yiii": "ји пиÑмо", + "Zinh": "наÑледно пиÑмо", + "Zmth": "математичка нотација", + "Zsye": "емоџи", + "Zsym": "Ñимболи", + "Zxxx": "непиÑани језик", + "Zyyy": "заједничко пиÑмо", + "Zzzz": "непознато пиÑмо" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sr_Latn.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sr_Latn.json new file mode 100644 index 0000000000000000000000000000000000000000..a4aeecaeaf0f58712f256ec0ef7f844a4b765255 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sr_Latn.json @@ -0,0 +1,138 @@ +{ + "Version": "2.1.29.33", + "Names": { + "Arab": "arapsko pismo", + "Armi": "imperijsko aramejsko pismo", + "Armn": "jermensko pismo", + "Avst": "avestansko pismo", + "Bali": "balijsko pismo", + "Batk": "batak pismo", + "Beng": "bengalsko pismo", + "Blis": "blisimboliÄno pismo", + "Bopo": "bopomofo pismo", + "Brah": "bramansko pismo", + "Brai": "Brajevo pismo", + "Bugi": "buginsko pismo", + "Buhd": "buhidsko pismo", + "Cakm": "Äakmansko pismo", + "Cans": "ujedinjeni kanadski aboridžinski silabici", + "Cari": "karijsko pismo", + "Cham": "Äamsko pismo", + "Cher": "ÄŒeroki", + "Cirt": "cirt pismo", + "Copt": "koptiÄko pismo", + "Cprt": "kiparsko pismo", + "Cyrl": "ćirilica", + "Cyrs": "Staroslovenska crkvena ćirilica", + "Deva": "devanagari", + "Dsrt": "Dezeret", + "Egyd": "egipatsko narodno pismo", + "Egyh": "egipatsko hijeratsko pismo", + "Egyp": "egipatski hijeroglifi", + "Ethi": "etiopsko pismo", + "Geok": "gruzijsko khutsuri pismo", + "Geor": "gruzijsko pismo", + "Glag": "glagoljica", + "Goth": "Gotika", + "Grek": "grÄko pismo", + "Gujr": "gudžaratsko pismo", + "Guru": "gurmuki pismo", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanuno", + "Hans": "pojednostavljeno kinesko pismo", + "Hant": "tradicionalno kinesko pismo", + "Hebr": "hebrejsko pismo", + "Hira": "hiragana", + "Hmng": "pahav hmong pismo", + "Hrkt": "japanska slogovna pisma", + "Hung": "staromaÄ‘arsko pismo", + "Inds": "induÅ¡ko pismo", + "Ital": "stari italik", + "Jamo": "džamo", + "Java": "javansko pismo", + "Jpan": "japansko pismo", + "Kali": "kajah-li pismo", + "Kana": "katakana", + "Khar": "karoÅ¡ti pismo", + "Khmr": "kmersko pismo", + "Knda": "kanada pismo", + "Kore": "korejsko pismo", + "Kthi": "kaiti", + "Lana": "lanna pismo", + "Laoo": "laoÅ¡ko pismo", + "Latf": "latinica (fraktur varijanta)", + "Latg": "galska latinica", + "Latn": "latinica", + "Lepc": "lepÄa pismo", + "Limb": "limbu pismo", + "Lina": "linearno A pismo", + "Linb": "linearno B pismo", + "Lyci": "lisijsko pismo", + "Lydi": "lidijsko pismo", + "Mand": "mandeansko pismo", + "Mani": "manihejsko pismo", + "Maya": "majanski hijeroglifi", + "Mero": "meroitik pismo", + "Mlym": "malajalamsko pismo", + "Mong": "mongolsko pismo", + "Moon": "meseÄevo pismo", + "Mtei": "meitei majek pismo", + "Mymr": "mijanmarsko pismo", + "Nkoo": "n’ko pismo", + "Ogam": "ogamsko pismo", + "Olck": "ol Äiki pismo", + "Orkh": "orkonsko pismo", + "Orya": "orijansko pismo", + "Osma": "osmanjansko pismo", + "Perm": "staro permiksko pismo", + "Phag": "pags-pa pismo", + "Phli": "pisani pahlavi", + "Phlp": "psalter pahlavi", + "Phlv": "pahlavi pismo", + "Phnx": "FeniÄansko pismo", + "Plrd": "porald fonetsko pismo", + "Prti": "pisani partian", + "Rjng": "rejang pismo", + "Roro": "rongorongo pismo", + "Runr": "runsko pismo", + "Samr": "samaritansko pismo", + "Sara": "sarati pismo", + "Saur": "sauraÅ¡tra pismo", + "Sgnw": "znakovno pismo", + "Shaw": "Å¡avijansko pismo", + "Sinh": "sinhalsko pismo", + "Sund": "sundansko pismo", + "Sylo": "siloti nagri pismo", + "Syrc": "sirijsko pismo", + "Syre": "sirijsko estrangelo pismo", + "Syrj": "zapadnosirijsko pismo", + "Syrn": "pismo istoÄne Sirije", + "Tagb": "tagbanva pismo", + "Tale": "tai le pismo", + "Talu": "novi tai lue", + "Taml": "tamilsko pismo", + "Tavt": "tai viet pismo", + "Telu": "telugu pismo", + "Teng": "tengvar pismo", + "Tfng": "tifinag pismo", + "Tglg": "Tagalog", + "Thaa": "tana pismo", + "Thai": "tajlandsko pismo", + "Tibt": "tibetansko pismo", + "Ugar": "ugaritsko pismo", + "Vaii": "vai pismo", + "Visp": "vidljivi govor", + "Xpeo": "staropersijsko pismo", + "Xsux": "sumersko-akadsko kuneiform pismo", + "Yiii": "ji pismo", + "Zinh": "nasledno pismo", + "Zmth": "matematiÄka notacija", + "Zsye": "emodži", + "Zsym": "simboli", + "Zxxx": "nepisani jezik", + "Zyyy": "zajedniÄko pismo", + "Zzzz": "nepoznato pismo" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sv.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sv.json new file mode 100644 index 0000000000000000000000000000000000000000..88aaa6d9b7612a788f39b82a9f7a3996e45d8055 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sv.json @@ -0,0 +1,178 @@ +{ + "Version": "2.1.30.7", + "Names": { + "Afak": "afakiska", + "Aghb": "kaukasiska albanska", + "Ahom": "ahom", + "Arab": "arabiska", + "Armi": "imperisk arameiska", + "Armn": "armeniska", + "Avst": "avestiska", + "Bali": "balinesiska", + "Bamu": "bamunska", + "Bass": "bassaiska vah", + "Batk": "batak", + "Beng": "bengaliska", + "Bhks": "bhaiksukiska", + "Blis": "blissymboler", + "Bopo": "bopomofo", + "Brah": "brami", + "Brai": "punktskrift", + "Bugi": "buginesiska", + "Buhd": "buhid", + "Cakm": "chakma", + "Cans": "kanadensiska stavelsetecken", + "Cari": "kariska", + "Cham": "cham", + "Cher": "cherokee", + "Cirt": "cirt", + "Copt": "koptiska", + "Cprt": "cypriotiska", + "Cyrl": "kyrilliska", + "Cyrs": "fornkyrkoslavisk kyrilliska", + "Deva": "devanagari", + "Dsrt": "deseret", + "Dupl": "Duployéstenografiska", + "Egyd": "demotiska", + "Egyh": "hieratiska", + "Egyp": "egyptiska hieroglyfer", + "Elba": "elbasiska", + "Ethi": "etiopiska", + "Geok": "kutsuri", + "Geor": "georgiska", + "Glag": "glagolitiska", + "Goth": "gotiska", + "Gran": "gammaltamilska", + "Grek": "grekiska", + "Gujr": "gujarati", + "Guru": "gurmukhi", + "Hanb": "han med bopomofo", + "Hang": "hangul", + "Hani": "han", + "Hano": "hanunó’o", + "Hans": "förenklade", + "Hant": "traditionella", + "Hatr": "hatran", + "Hebr": "hebreiska", + "Hira": "hiragana", + "Hluw": "hittitiska hieroglyfer", + "Hmng": "pahaw mong", + "Hrkt": "katakana\/hiragana", + "Hung": "fornungerska", + "Inds": "indus", + "Ital": "fornitaliska", + "Jamo": "jamo", + "Java": "javanska", + "Jpan": "japanska", + "Jurc": "jurchenska", + "Kali": "kaya li", + "Kana": "katakana", + "Khar": "kharoshti", + "Khmr": "khmeriska", + "Khoj": "khojkiska", + "Knda": "kanaresiska", + "Kore": "koreanska", + "Kpel": "kpellé", + "Kthi": "kaithiska", + "Lana": "lanna", + "Laoo": "laotiska", + "Latf": "frakturlatin", + "Latg": "gaeliskt latin", + "Latn": "latinska", + "Lepc": "rong", + "Limb": "limbu", + "Lina": "linjär A", + "Linb": "linjär B", + "Lisu": "Fraser", + "Loma": "loma", + "Lyci": "lykiska", + "Lydi": "lydiska", + "Mahj": "mahajaniska", + "Mand": "mandaéiska", + "Mani": "manikeanska", + "Marc": "marchenska", + "Maya": "mayahieroglyfer", + "Mend": "mende", + "Merc": "kursiv-meroitiska", + "Mero": "meroitiska", + "Mlym": "malayalam", + "Modi": "modiska", + "Mong": "mongoliska", + "Moon": "moon", + "Mroo": "mru", + "Mtei": "meitei-mayek", + "Mult": "multaniska", + "Mymr": "burmesiska", + "Narb": "fornnordarabiska", + "Nbat": "nabateiska", + "Newa": "newariska", + "Nkgb": "naxi geba", + "Nkoo": "n-kÃ¥", + "Nshu": "nüshu", + "Ogam": "ogham", + "Olck": "ol-chiki", + "Orkh": "orkon", + "Orya": "oriya", + "Osma": "osmanja", + "Palm": "palmyreniska", + "Pauc": "Pau Cin Hau-skrift", + "Perm": "fornpermiska", + "Phag": "phags-pa", + "Phli": "tidig pahlavi", + "Phlp": "psaltaren-pahlavi", + "Phlv": "bokpahlavi", + "Phnx": "feniciska", + "Plrd": "pollardtecken", + "Prti": "tidig parthianska", + "Rjng": "rejang", + "Roro": "rongo-rongo", + "Runr": "runor", + "Samr": "samaritiska", + "Sara": "sarati", + "Sarb": "fornsydarabiska", + "Saur": "saurashtra", + "Sgnw": "teckningsskrift", + "Shaw": "shawiska", + "Shrd": "sharada", + "Sidd": "siddhamska", + "Sind": "sindhiska", + "Sinh": "singalesiska", + "Sora": "sora sompeng", + "Sund": "sundanesiska", + "Sylo": "syloti nagri", + "Syrc": "syriska", + "Syre": "estrangelosyriska", + "Syrj": "västsyriska", + "Syrn": "östsyriska", + "Tagb": "tagbanwa", + "Takr": "takritiska", + "Tale": "tai le", + "Talu": "tai lue", + "Taml": "tamilska", + "Tang": "tangutiska", + "Tavt": "tai viet", + "Telu": "telugu", + "Teng": "tengwar", + "Tfng": "tifinaghiska", + "Tglg": "tagalog", + "Thaa": "taana", + "Thai": "thailändska", + "Tibt": "tibetanska", + "Tirh": "tirhuta", + "Ugar": "ugaritiska", + "Vaii": "vaj", + "Visp": "synligt tal", + "Wara": "varang kshiti", + "Wole": "woleai", + "Xpeo": "fornpersiska", + "Xsux": "sumero-akkadisk kilskrift", + "Yiii": "yi", + "Zinh": "ärvda", + "Zmth": "matematisk notation", + "Zsye": "emoji", + "Zsym": "symboler", + "Zxxx": "oskrivet sprÃ¥k", + "Zyyy": "gemensamma", + "Zzzz": "okänt skriftsystem" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sw.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sw.json new file mode 100644 index 0000000000000000000000000000000000000000..7c4f5c1f9c4bc9a55834e0553d9309885232c454 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/sw.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "Kiarabu", + "Armn": "Kiarmenia", + "Beng": "Kibengali", + "Bopo": "Kibopomofo", + "Brai": "Braille", + "Cyrl": "Kisiriliki", + "Deva": "Kidevanagari", + "Ethi": "Kiethiopia", + "Geor": "Kijojia", + "Grek": "Kigiriki", + "Gujr": "Kigujarati", + "Guru": "Kigurmukhi", + "Hanb": "Hanb", + "Hang": "Kihangul", + "Hani": "Kihan", + "Hans": "Rahisi", + "Hant": "Cha jadi", + "Hebr": "Kiebrania", + "Hira": "Hiragana", + "Hrkt": "Hati za Kijapani", + "Jamo": "Jamo", + "Jpan": "Kijapani", + "Kana": "Kikatakana", + "Khmr": "Kikambodia", + "Knda": "Kikannada", + "Kore": "Kikorea", + "Laoo": "Kilaosi", + "Latn": "Kilatini", + "Mlym": "Kimalayalam", + "Mong": "Kimongolia", + "Mymr": "Myama", + "Orya": "Kioriya", + "Sinh": "Kisinhala", + "Taml": "Kitamil", + "Telu": "Kitelugu", + "Thaa": "Kithaana", + "Thai": "Kithai", + "Tibt": "Kitibeti", + "Zmth": "Hati za kihisabati", + "Zsye": "Emoji", + "Zsym": "Alama", + "Zxxx": "Haijaandikwa", + "Zyyy": "Kawaida", + "Zzzz": "Hati isiyojulikana" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ta.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ta.json new file mode 100644 index 0000000000000000000000000000000000000000..527c38a31f2ac19a5845c5012d24698a3cc3060d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ta.json @@ -0,0 +1,138 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "அரபிகà¯", + "Armi": "இமà¯à®ªà¯‡à®°à®¿à®¯à®²à¯ அரமெயà¯à®•à¯", + "Armn": "à®…à®°à¯à®®à¯‡à®©à®¿à®¯à®©à¯", + "Avst": "அவெஸà¯à®¤à®¾à®©à¯", + "Bali": "பாலினீஸà¯", + "Batk": "பாடாகà¯", + "Beng": "வஙà¯à®•ாளமà¯", + "Blis": "பà¯à®²à®¿à®¸à¯à®¸à®¿à®®à®¿à®ªà®¾à®²à¯à®¸à¯", + "Bopo": "போபோமோஃபோ", + "Brah": "பிரமà¯à®®à®¿", + "Brai": "பிரெயிலà¯", + "Bugi": "பà¯à®•ினீஸà¯", + "Buhd": "பà¯à®•ிதà¯", + "Cakm": "சகà¯à®®à®¾", + "Cans": "யà¯à®©à®¿à®ƒà®ªà¯ˆà®Ÿà¯ கனடியன௠அபொரிஜினல௠சிலபிகà¯à®¸à¯", + "Cari": "கரியனà¯", + "Cham": "சாமà¯", + "Cher": "செரோகà¯à®•ி", + "Cirt": "கிரà¯à®¤à¯", + "Copt": "காபà¯à®Ÿà®¿à®•à¯", + "Cprt": "சைபà¯à®°à®¿à®¯à®¾à®Ÿà¯", + "Cyrl": "சிரிலிகà¯", + "Cyrs": "பழைய சரà¯à®šà¯ ஸà¯à®²à®µà¯‹à®©à®¿à®•௠சிரிலிகà¯", + "Deva": "தேவநாகரி", + "Dsrt": "டெசராடà¯", + "Egyd": "எகிபà¯à®¤à®¿à®¯à®©à¯ டெமோடà¯à®Ÿà®¿à®•à¯", + "Egyh": "எகிபà¯à®¤à®¿à®¯à®©à¯ ஹைரேடà¯à®Ÿà®¿à®•à¯", + "Egyp": "எகிபà¯à®¤à®¿à®¯à®©à¯ ஹைரோகிளிபà¯à®¸à¯", + "Ethi": "எதà¯à®¤à®¿à®¯à¯‹à®ªà®¿à®•à¯", + "Geok": "ஜியாரà¯à®œà®¿à®¯à®©à¯ கà¯à®Ÿà¯à®šà¯à®°à®¿", + "Geor": "ஜாரà¯à®œà®¿à®¯à®©à¯", + "Glag": "கà¯à®²à®¾à®•ோலிடிகà¯", + "Goth": "கோதிகà¯", + "Grek": "கிரேகà¯à®•à®®à¯", + "Gujr": "கà¯à®œà®°à®¾à®¤à¯à®¤à®¿", + "Guru": "கà¯à®°à¯à®®à¯à®•ி", + "Hanb": "ஹனà¯à®ªà¯", + "Hang": "ஹஙà¯à®•à¯à®²à¯", + "Hani": "ஹனà¯", + "Hano": "ஹனà¯à®©à¯‚", + "Hans": "எளிதாகà¯à®•பà¯à®ªà®Ÿà¯à®Ÿà®¤à¯", + "Hant": "பாரமà¯à®ªà®°à®¿à®¯à®®à¯", + "Hebr": "ஹீபà¯à®°à¯", + "Hira": "ஹிராகானா", + "Hmng": "பஹாவ௠மாஙà¯à®•à¯", + "Hrkt": "ஜபà¯à®ªà®¾à®©à®¿à®¯ எழà¯à®¤à¯à®¤à¯à®°à¯à®•à¯à®•ளà¯", + "Hung": "பழைய ஹஙà¯à®•ேரியனà¯", + "Inds": "சிநà¯à®¤à¯", + "Ital": "பழைய இதà¯à®¤à®¾à®²à®¿", + "Jamo": "ஜமோ", + "Java": "ஜாவனீஸà¯", + "Jpan": "ஜபà¯à®ªà®¾à®©à®¿à®¯à®®à¯", + "Kali": "கயாஹ௠லீ", + "Kana": "கதகானா", + "Khar": "கரோஷà¯à®Ÿà®¿", + "Khmr": "கமெரà¯", + "Knda": "கனà¯à®©à®Ÿà®®à¯", + "Kore": "கொரியனà¯", + "Kthi": "காயà¯à®¤à®¿", + "Lana": "லனà¯à®©à®¾", + "Laoo": "லாவோ", + "Latf": "ஃபà¯à®°à®•à¯à®Ÿà¯‚ர௠லெதà¯à®¤à®¿à®©à¯", + "Latg": "கேலிக௠லெதà¯à®¤à®¿à®©à¯", + "Latn": "லதà¯à®¤à®¿à®©à¯", + "Lepc": "லெபà¯à®šà®¾", + "Limb": "லிமà¯à®ªà¯", + "Lina": "லினியர௠à®", + "Linb": "லினியர௠பி", + "Lyci": "லிசியனà¯", + "Lydi": "லிடியனà¯", + "Mand": "மேனà¯à®Ÿà®¿à®¯à®©à¯", + "Mani": "மனிசெயà¯à®©à¯", + "Maya": "மயான௠ஹைரோகிளிபà¯", + "Mero": "மெராயà¯à®Ÿà®¿à®•à¯", + "Mlym": "மலையாளமà¯", + "Mong": "மஙà¯à®•ோலியனà¯", + "Moon": "மூனà¯", + "Mtei": "மெயà¯à®¤à¯†à®¯à¯ மயகà¯", + "Mymr": "மியானà¯à®®à®°à¯", + "Nkoo": "எனà¯â€˜à®•ோ", + "Ogam": "ஒகாமà¯", + "Olck": "ஒல௠சிகà¯à®•ி", + "Orkh": "ஆரà¯à®•ானà¯", + "Orya": "ஒடியா", + "Osma": "ஒஸà¯à®®à®¾à®©à¯à®¯à®¾", + "Perm": "பழைய பெரà¯à®®à®¿à®•à¯", + "Phag": "பகà¯à®¸à¯-பா", + "Phli": "இனà¯à®¸à¯à®•ிரிபà¯à®·à®©à®²à¯ பஹலவி", + "Phlp": "சாலà¯à®Ÿà®°à¯ பஹலவி", + "Phlv": "பà¯à®•௠பஹலவி", + "Phnx": "ஃபோனேஷியனà¯", + "Plrd": "போலாரà¯à®Ÿà¯ ஃபொனெடà¯à®Ÿà®¿à®•à¯", + "Prti": "இனà¯à®¸à¯à®•ிரிபà¯à®·à®©à®²à¯ பாரà¯à®¤à¯à®¤à®¿à®¯à®©à¯", + "Rjng": "ரெஜெயà¯à®©à¯", + "Roro": "ரொஙà¯à®•ோரொஙà¯à®•ோ", + "Runr": "à®°à¯à®©à®¿à®•à¯", + "Samr": "சமாரிடனà¯", + "Sara": "சாராதி", + "Saur": "சௌராஷà¯à®Ÿà¯à®°à®¾", + "Sgnw": "ஸைனà¯à®Žà®´à¯à®¤à¯à®¤à¯", + "Shaw": "ஷவியானà¯", + "Sinh": "சிஙà¯à®•ளமà¯", + "Sund": "சà¯à®¨à¯à®¤à®¾à®©à¯€à®¸à¯", + "Sylo": "சிலோடி நகà¯à®°à®¿", + "Syrc": "சிரியாகà¯", + "Syre": "எஸà¯à®Ÿà¯à®°à¯†à®™à¯à®•ெலோ சிரியாகà¯", + "Syrj": "மேறà¯à®•௠சிரியாகà¯", + "Syrn": "கிழகà¯à®•௠சிரியாகà¯", + "Tagb": "தகோவானா", + "Tale": "தாய௠லே", + "Talu": "பà¯à®¤à®¿à®¯ தை லூ", + "Taml": "தமிழà¯", + "Tavt": "தை வியதà¯", + "Telu": "தெலà¯à®™à¯à®•à¯", + "Teng": "தெஙà¯à®µà®¾à®°à¯", + "Tfng": "டிஃபினாகà¯", + "Tglg": "தகலாகà¯", + "Thaa": "தானா", + "Thai": "தாயà¯", + "Tibt": "திபெதà¯à®¤à®¿à®¯à®©à¯", + "Ugar": "உகாரதிகà¯", + "Vaii": "வை", + "Visp": "விசிபிள௠ஸà¯à®ªà¯€à®šà¯", + "Xpeo": "பழைய பெரà¯à®·à®¿à®¯à®©à¯", + "Xsux": "சà¯à®®à¯†à®°à¯‹-அகà¯à®•டியன௠கà¯à®¯à¯‚னிஃபாரà¯à®®à¯", + "Yiii": "யீ", + "Zinh": "பாரமà¯à®ªà®°à®¿à®¯à®®à®¾à®©", + "Zmth": "கணிதகà¯à®•à¯à®±à®¿à®¯à¯€à®Ÿà¯", + "Zsye": "எமோஜி", + "Zsym": "சினà¯à®©à®™à¯à®•ளà¯", + "Zxxx": "எழà¯à®¤à®ªà¯à®ªà®Ÿà®¾à®¤à®¤à¯", + "Zyyy": "பொதà¯", + "Zzzz": "அறியபà¯à®ªà®Ÿà®¾à®¤ ஸà¯à®•ிரிபà¯à®Ÿà¯" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/te.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/te.json new file mode 100644 index 0000000000000000000000000000000000000000..050cec11cfe6093a2ba4e1b86f5e11b15400095b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/te.json @@ -0,0 +1,138 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "అరబికà±", + "Armi": "ఇంపీరియలౠఅరామాకà±", + "Armn": "à°…à°°à±à°®à±‡à°¨à°¿à°¯à°¨à±", + "Avst": "అవేసà±à°Ÿà°¾à°¨à±", + "Bali": "బాలినీసà±", + "Batk": "బాటకà±", + "Beng": "బాంగà±à°²à°¾", + "Blis": "à°¬à±à°²à°¿à°¸à±à°¸à°¿à°‚బలà±à°¸à±", + "Bopo": "బోపోమోఫో", + "Brah": "à°¬à±à°°à°¾à°¹à±à°®à°¿", + "Brai": "à°¬à±à°°à±†à°¯à°¿à°²à±", + "Bugi": "à°¬à±à°¯à±à°—ినీసà±", + "Buhd": "à°¬à±à°¹à°¿à°¡à±", + "Cakm": "à°šà°•à±à°®à°¾", + "Cans": "à°¯à±à°¨à°¿à°«à±ˆà°¡à± కెనెడియనౠఅబొరిజినలౠసిలబికà±à°¸à±", + "Cari": "కారియనà±", + "Cham": "చామà±", + "Cher": "చిరోకి", + "Cirt": "సిరà±à°¥à±", + "Copt": "కోపà±à°Ÿà°¿à°•à±", + "Cprt": "సైపà±à°°à±‹à°Ÿà±", + "Cyrl": "సిరిలికà±", + "Cyrs": "à°ªà±à°°à°¾à°šà±€à°¨ à°šà°°à±à°š à°¸à±à°²à°¾à°µà±‹à°¨à°¿à°•ౠసిరిలికà±", + "Deva": "దేవనాగరి", + "Dsrt": "డేసెరెటà±", + "Egyd": "ఇజిపà±à°·à°¿à°¯à°¨à± డెమోటికà±", + "Egyh": "ఇజిపà±à°·à°¿à°¯à°¨à± హైరాటికà±", + "Egyp": "ఇజిపà±à°·à°¿à°¯à°¨à± హైరోగà±à°²à±ˆà°«à±à°¸à±", + "Ethi": "ఇథియోపికà±", + "Geok": "జారà±à°œà°¿à°¯à°¨à± à°–à°Ÿà±à°¸à±‚à°°à°¿", + "Geor": "జారà±à°œà°¿à°¯à°¨à±", + "Glag": "à°—à±à°²à°¾à°—ో లిటికà±", + "Goth": "గోతికà±", + "Grek": "à°—à±à°°à±€à°•à±", + "Gujr": "à°—à±à°œà°°à°¾à°¤à±€", + "Guru": "à°—à±à°°à±à°®à±à°–à°¿", + "Hanb": "హానà±à°¬à±", + "Hang": "హంగà±à°²à±", + "Hani": "హానà±", + "Hano": "హనà±à°¨à±‚", + "Hans": "సరళీకృతం", + "Hant": "సాంపà±à°°à°¦à°¾à°¯à°•", + "Hebr": "హీబà±à°°à±", + "Hira": "హిరాగాన", + "Hmng": "పాహవా à°¹à±à°®à±‹à°‚à°—à±", + "Hrkt": "జపనీసౠసిలబెరీసà±", + "Hung": "à°ªà±à°°à°¾à°šà±€à°¨ హంగేరియనà±", + "Inds": "సింధà±", + "Ital": "à°ªà±à°°à°¾à°šà°¿à°¨ à°à°Ÿà°¾à°²à°¿à°•à±", + "Jamo": "జమో", + "Java": "జావనీసà±", + "Jpan": "జాపనీసà±", + "Kali": "కాయాహౠలి", + "Kana": "కాటాకాన", + "Khar": "ఖరోషథి", + "Khmr": "à°–à±à°®à±‡à°°à±", + "Knda": "à°•à°¨à±à°¨à°¡", + "Kore": "కొరియనà±", + "Kthi": "కైథి", + "Lana": "లనà±à°¨à°¾", + "Laoo": "లావో", + "Latf": "à°«à±à°°à°¾à°•à±à°Ÿà±‚రౠలాటినà±", + "Latg": "గేలికౠలాటినà±", + "Latn": "లాటినà±", + "Lepc": "లేపà±à°šà°¾", + "Limb": "లింబà±", + "Lina": "లినియరౠఎ", + "Linb": "లినియరౠబి", + "Lyci": "లిసియనà±", + "Lydi": "లిడియనà±", + "Mand": "మానà±à°¡à°¿à°¯à°¨à±", + "Mani": "మానిచేనà±", + "Maya": "మాయనౠహైరోగà±à°²à±ˆà°«à±à°¸à±", + "Mero": "మెరోఇటికà±", + "Mlym": "మలయాళం", + "Mong": "మంగోలియనà±", + "Moon": "మూనà±", + "Mtei": "మీటి మయెకà±", + "Mymr": "మయానà±à°®à°¾à°°à±", + "Nkoo": "à°¨à±à°•ో", + "Ogam": "ఒఘమà±", + "Olck": "ఓలౠచికి", + "Orkh": "à°“à°°à±à°–ోనà±", + "Orya": "ఒడియా", + "Osma": "ఓసమానà±à°¯", + "Perm": "à°ªà±à°°à°¾à°šà±€à°¨ పెరà±à°®à°¿à°•à±", + "Phag": "ఫాగà±à°¸à±-పా", + "Phli": "ఇంసà±à°•à±à°°à°¿à°ªà±à°·à°¨à°¾à°²à± పహà±à°²à°¾à°µà°¿", + "Phlp": "సలà±à°Ÿà°¾à°°à± పహà±à°²à°¾à°µà°¿", + "Phlv": "à°ªà±à°¸à±à°¤à°• పహà±à°²à°¾à°µà°¿", + "Phnx": "ఫోనిశియనà±", + "Plrd": "పోలà±à°²à°°à±à°¡à± ఫోనెటికà±", + "Prti": "ఇంసà±à°•à±à°°à°¿à°ªà±à°·à°¨à°¾à°²à± పారà±à°¥à°¿à°¯à°¨à±", + "Rjng": "రేజాంగà±", + "Roro": "రోంగో రోంగో", + "Runr": "రూనికà±", + "Samr": "సమారిటనà±", + "Sara": "సరాటి", + "Saur": "సౌరాషà±à°Ÿà±à°°", + "Sgnw": "సంజà±à°ž లిపి", + "Shaw": "షవియానà±", + "Sinh": "సింహళం", + "Sund": "à°¸à±à°¡à°¾à°¨à±€à°¸à±", + "Sylo": "à°¸à±à°²à±‹à°Ÿà°¿ నాగà±à°°à°¿", + "Syrc": "సిరియాకà±", + "Syre": "à°Žà°¸à±à°Ÿà±à°°à°¾à°¨à°œà±€à°²à±‹ సిరియాకà±", + "Syrj": "పశà±à°šà°¿à°® సిరియాకà±", + "Syrn": "తూరà±à°ªà± సిరియాకà±", + "Tagb": "టాగà±à°¬à°¾à°¨à°µà°¾", + "Tale": "తై లీ", + "Talu": "à°•à±à°°à±Šà°¤à±à°¤ టై à°²à±à°‡", + "Taml": "తమిళమà±", + "Tavt": "టై వియటà±", + "Telu": "తెలà±à°—à±", + "Teng": "టేంగà±à°µà°¾à°°à±", + "Tfng": "టిఫీనాఘà±", + "Tglg": "టగలాగà±", + "Thaa": "థానా", + "Thai": "థాయà±", + "Tibt": "టిబెటనà±", + "Ugar": "à°¯à±à°—ారిటికà±", + "Vaii": "వాయి", + "Visp": "కనిపించే భాష", + "Xpeo": "à°ªà±à°°à°¾à°šà±€à°¨ పరà±à°·à°¿à°¯à°¨à±", + "Xsux": "à°¸à±à°®à±‡à°°à±‹- à°…à°•à±à°•డియనౠకà±à°¯à±à°¨à°¿à°«à°¾à°°à±à°®à±", + "Yiii": "యి", + "Zinh": "వారసతà±à°µà°‚", + "Zmth": "గణిత సంకేతలిపి", + "Zsye": "ఎమోజి", + "Zsym": "à°šà°¿à°¹à±à°¨à°¾à°²à±", + "Zxxx": "లిపి లేని", + "Zyyy": "సామానà±à°¯", + "Zzzz": "తెలియని లిపి" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/th.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/th.json new file mode 100644 index 0000000000000000000000000000000000000000..ddce6a378bbfdc305484d76145ea9601c0abeebd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/th.json @@ -0,0 +1,172 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "อะฟาคา", + "Aghb": "à¹à¸­à¸¥à¹€à¸šà¹€à¸™à¸µà¸¢ คอเคเซีย", + "Arab": "อาหรับ", + "Armi": "อิมพีเรียล อราเมอิà¸", + "Armn": "อาร์เมเนีย", + "Avst": "อเวสตะ", + "Bali": "บาหลี", + "Bamu": "บามุม", + "Bass": "บัสซา", + "Batk": "บาตัà¸", + "Beng": "เบงà¸à¸²à¸¥à¸µ", + "Blis": "บลิสซิมโบลส์", + "Bopo": "ปอพอมอฟอ", + "Brah": "พราหมี", + "Brai": "เบรลล์", + "Bugi": "บูà¸à¸´à¸ª", + "Buhd": "บูฮิด", + "Cakm": "ชาà¸à¸¡à¸²", + "Cans": "สัà¸à¸¥à¸±à¸à¸©à¸“์ชนเผ่าพื้นเมืองà¹à¸„นาดา", + "Cari": "คาเรีย", + "Cham": "จาม", + "Cher": "เชอโรà¸à¸µ", + "Cirt": "เซิร์ท", + "Copt": "คอปติà¸", + "Cprt": "ไซเปรียท", + "Cyrl": "ซีริลลิà¸", + "Cyrs": "เชอร์ชสลาโวนิà¸à¸‹à¸µà¸£à¸´à¸¥à¸¥à¸´à¸à¹‚บราณ", + "Deva": "เทวนาครี", + "Dsrt": "เดเซเรท", + "Dupl": "ชวเลขดัปโลยัน", + "Egyd": "ดีโมติà¸à¸­à¸µà¸¢à¸´à¸›à¸•์", + "Egyh": "เฮียราติà¸à¸­à¸µà¸¢à¸´à¸›à¸•์", + "Egyp": "เฮียโรà¸à¸¥à¸´à¸Ÿà¸ªà¹Œà¸­à¸µà¸¢à¸´à¸›à¸•์", + "Elba": "เอลบ์ซาน", + "Ethi": "เอธิโอปิà¸", + "Geok": "คัตซูรีจอร์เจีย", + "Geor": "จอร์เจีย", + "Glag": "à¸à¸¥à¸²à¹‚à¸à¸¥à¸´à¸•ิà¸", + "Goth": "โà¸à¸˜à¸´à¸", + "Gran": "คฤณห์", + "Grek": "à¸à¸£à¸µà¸", + "Gujr": "คุชราต", + "Guru": "à¸à¸¹à¸£à¹Œà¸¡à¸¹à¸„ี", + "Hanb": "จีนà¸à¸¥à¸²à¸‡", + "Hang": "ฮันà¸à¸¶à¸¥", + "Hani": "ฮั่น", + "Hano": "ฮานูโนโอ", + "Hans": "ตัวย่อ", + "Hant": "ตัวเต็ม", + "Hebr": "ฮีบรู", + "Hira": "ฮิระงะนะ", + "Hluw": "อัà¸à¸‚ระอานาโตเลีย", + "Hmng": "ปาเฮาห์ม้ง", + "Hrkt": "คะตะà¸à¸°à¸™à¸°à¸«à¸£à¸·à¸­à¸®à¸´à¸£à¸°à¸‡à¸°à¸™à¸°", + "Hung": "ฮังà¸à¸²à¸£à¸µà¹‚บราณ", + "Inds": "อินดัส", + "Ital": "อิตาลีโบราณ", + "Jamo": "จาโม", + "Java": "ชวา", + "Jpan": "à¸à¸µà¹ˆà¸›à¸¸à¹ˆà¸™", + "Jurc": "จูร์เชน", + "Kali": "คยาห์", + "Kana": "คะตะà¸à¸°à¸™à¸°", + "Khar": "ขโรษà¸à¸µ", + "Khmr": "เขมร", + "Khoj": "คอจคี", + "Knda": "à¸à¸±à¸™à¸™à¸²à¸”า", + "Kore": "เà¸à¸²à¸«à¸¥à¸µ", + "Kpel": "เปลเล", + "Kthi": "à¸à¸²à¸¢à¸•ิ", + "Lana": "ล้านนา", + "Laoo": "ลาว", + "Latf": "ลาติน - ฟรังเตอร์", + "Latg": "ลาติน - à¹à¸à¸¥à¸´à¸", + "Latn": "ละติน", + "Lepc": "เลปชา", + "Limb": "ลิมบู", + "Lina": "ลีเนียร์เอ", + "Linb": "ลีเนียร์บี", + "Lisu": "เฟรเซอร์", + "Loma": "โลมา", + "Lyci": "ไลเซีย", + "Lydi": "ลีเดีย", + "Mahj": "มหาชนี", + "Mand": "à¹à¸¡à¸™à¹€à¸”ียน", + "Mani": "มานิà¹à¸Šà¸™", + "Maya": "มายาไฮโรà¸à¸¥à¸´à¸Ÿà¸ªà¹Œ", + "Mend": "เมนเด", + "Merc": "เคอร์ซีฟ-เมโรอิติà¸", + "Mero": "เมโรติà¸", + "Mlym": "มาลายาลัม", + "Modi": "โมฑี", + "Mong": "มองโà¸à¹€à¸¥à¸µà¸¢", + "Moon": "มูน", + "Mroo": "มโร", + "Mtei": "เมเทมาเยà¸", + "Mymr": "พม่า", + "Narb": "อาระเบียเหนือโบราณ", + "Nbat": "นาบาทาเอียน", + "Nkgb": "à¸à¸µà¸šà¸²-นาซี", + "Nkoo": "เอ็นโà¸", + "Nshu": "นุซุ", + "Ogam": "โอคัม", + "Olck": "โอลชิà¸à¸´", + "Orkh": "ออร์คอน", + "Orya": "โอริยา", + "Osma": "ออสมันยา", + "Palm": "พาลไมรีน", + "Pauc": "ป่อจิ้งฮอ", + "Perm": "เปอร์มิà¸à¹‚บราณ", + "Phag": "ฟาà¸à¸ªà¹Œ-ปา", + "Phli": "ปะห์ลาวีอินสคริปชันà¹à¸™à¸¥", + "Phlp": "ปะห์ลาวีซอลเตอร์", + "Phlv": "ปะห์ลาวีบุ๊à¸", + "Phnx": "ฟินิเชีย", + "Plrd": "สัทศาสตร์พอลลาร์ด", + "Prti": "พาร์เทียอินสคริปชันà¹à¸™à¸¥", + "Rjng": "เรจัง", + "Roro": "รองโà¸à¸£à¸­à¸‡à¹‚à¸", + "Runr": "รูนิà¸", + "Samr": "ซามาเรีย", + "Sara": "ซาราติ", + "Sarb": "อาระเบียใต้โบราณ", + "Saur": "โสวรัสตระ", + "Sgnw": "ไซน์ไรติ้ง", + "Shaw": "ซอเวียน", + "Shrd": "ชาราดา", + "Sidd": "สิทธัม", + "Sind": "คุดาวาดี", + "Sinh": "สิงหล", + "Sora": "โสราสมเป็ง", + "Sund": "ซุนดา", + "Sylo": "ซิโลตินาà¸à¸£à¸µ", + "Syrc": "ซีเรีย", + "Syre": "ซีเรียเอสทรานจีโล", + "Syrj": "ซีเรียตะวันตà¸", + "Syrn": "ซีเรียตะวันออà¸", + "Tagb": "ตัà¸à¸šà¸±à¸™à¸§à¸²", + "Takr": "ทาครี", + "Tale": "ไทเล", + "Talu": "ไทลื้อใหม่", + "Taml": "ทมิฬ", + "Tang": "ตันà¸à¸±à¸—", + "Tavt": "ไทเวียต", + "Telu": "เตลูà¸à¸¹", + "Teng": "เทงà¸à¸§à¸²à¸£à¹Œ", + "Tfng": "ทิฟินาà¸", + "Tglg": "ตาà¸à¸²à¸¥à¹‡à¸­à¸", + "Thaa": "ทานา", + "Thai": "ไทย", + "Tibt": "ทิเบต", + "Tirh": "เทอฮุทา", + "Ugar": "ยูà¸à¸²à¸£à¸´à¸•", + "Vaii": "ไว", + "Visp": "คำพูดที่มองเห็นได้", + "Wara": "วารังà¸à¸ªà¸´à¸•ิ", + "Wole": "โอลีเอ", + "Xpeo": "เปอร์เซียโบราณ", + "Xsux": "อัà¸à¸©à¸£à¸£à¸¹à¸›à¸¥à¸´à¹ˆà¸¡à¸ªà¸¸à¹€à¸¡à¹€à¸£à¸µà¸¢-อัคคาเดีย", + "Yiii": "ยิ", + "Zinh": "อินเฮอริต", + "Zmth": "เครื่องหมายทางคณิตศาสตร์", + "Zsye": "อีโมจิ", + "Zsym": "ซิมโบลส์", + "Zxxx": "ไม่มีภาษาเขียน", + "Zyyy": "สามัà¸", + "Zzzz": "สคริปต์ที่ไม่รู้จัà¸" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ti.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ti.json new file mode 100644 index 0000000000000000000000000000000000000000..a0acc4e0978e696e51b94d6ac9c4c5ab5393b832 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ti.json @@ -0,0 +1,7 @@ +{ + "Version": "2.1.27.40", + "Names": { + "Ethi": "áŠá‹°áˆ", + "Latn": "ላቲን" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/tl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/tl.json new file mode 100644 index 0000000000000000000000000000000000000000..3015fb14ebc986849a05d804cf13d179b9011521 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/tl.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "Arabic", + "Armn": "Armenian", + "Beng": "Bangla", + "Bopo": "Bopomofo", + "Brai": "Braille", + "Cyrl": "Cyrillic", + "Deva": "Devanagari", + "Ethi": "Ethiopic", + "Geor": "Georgian", + "Grek": "Greek", + "Gujr": "Gujarati", + "Guru": "Gurmukhi", + "Hanb": "Hanb", + "Hang": "Hangul", + "Hani": "Han", + "Hans": "Pinasimple", + "Hant": "Tradisyonal", + "Hebr": "Hebrew", + "Hira": "Hiragana", + "Hrkt": "Japanese syllabaries", + "Jamo": "Jamo", + "Jpan": "Japanese", + "Kana": "Katakana", + "Khmr": "Khmer", + "Knda": "Kannada", + "Kore": "Korean", + "Laoo": "Lao", + "Latn": "Latin", + "Mlym": "Malayalam", + "Mong": "Mongolian", + "Mymr": "Myanmar", + "Orya": "Odia", + "Sinh": "Sinhala", + "Taml": "Tamil", + "Telu": "Telugu", + "Thaa": "Thaana", + "Thai": "Thai", + "Tibt": "Tibetan", + "Zmth": "Mathematical Notation", + "Zsye": "Emoji", + "Zsym": "Mga Simbolo", + "Zxxx": "Hindi Nakasulat", + "Zyyy": "Karaniwan", + "Zzzz": "Hindi Kilalang Script" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/to.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/to.json new file mode 100644 index 0000000000000000000000000000000000000000..efae34c5121869fbc3c78d26961aafd2ef1b3bd0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/to.json @@ -0,0 +1,172 @@ +{ + "Version": "2.1.27.98", + "Names": { + "Afak": "tohinima fakaÊ»afaka", + "Aghb": "tohinima fakaÊ»alapÄ“nia-kaukasia", + "Arab": "tohinima fakaÊ»alepea", + "Armi": "tohinima fakaÊ»alÄmiti-Ê»emipaea", + "Armn": "tohinima fakaÊ»Ämenia", + "Avst": "tohinima fakaÊ»avesitani", + "Bali": "tohinima fakapali", + "Bamu": "tohinima fakapamumi", + "Bass": "tohinima fakapasa-vÄ", + "Batk": "tohinima fakapÄtaki", + "Beng": "tohinima fakapengikali", + "Blis": "tohinima fakaÊ»ilonga-pilisi", + "Bopo": "tohinima fakapopomofo", + "Brah": "tohinima fakapalÄmÄ«", + "Brai": "tohinima laukonga ki he kui", + "Bugi": "tohinima fakapukisi", + "Buhd": "tohinima fakapuhiti", + "Cakm": "tohinima fakasakimÄ", + "Cans": "tohinima fakatupuÊ»i-kÄnata-fakatahataha", + "Cari": "tohinima fakakali", + "Cham": "tohinima fakasami", + "Cher": "tohinima fakaselokÄ«", + "Cirt": "tohinima fakakÄ«liti", + "Copt": "tohinima fakakopitika", + "Cprt": "tohinima fakasaipalesi", + "Cyrl": "tohinima fakalÅ«sia", + "Cyrs": "tohinima fakalÅ«sia-lotu-motuÊ»a", + "Deva": "tohinima fakaÊ»initia-tevanÄkalÄ«", + "Dsrt": "tohinima fakateseleti", + "Dupl": "tohinimanounou fakatupoloiÄ“", + "Egyd": "tohinima temotika-fakaÊ»isipite", + "Egyh": "tohinima hielatika-fakaÊ»isipite", + "Egyp": "tohinima tongitapu-fakaÊ»isipite", + "Elba": "tohinima fakaÊ»elepasani", + "Ethi": "tohinima fakaʻītiÅpia", + "Geok": "tohinima fakakutusuli-seÅsia", + "Geor": "tohinima fakaseÅsia", + "Glag": "tohinima fakakalakoliti", + "Goth": "tohinima fakakotika", + "Gran": "tohinima fakasilanitÄ", + "Grek": "tohinima fakakalisi", + "Gujr": "tohinima fakaÊ»initia-kutalati", + "Guru": "tohinima fakakÅ«muki", + "Hanb": "tohinima fakahÄnipi", + "Hang": "tohinima fakakÅlea-hÄngÅ«lu", + "Hani": "tohinima fakasiaina", + "Hano": "tohinima fakahanunÅÊ»o", + "Hans": "tohinima fakasiaina-fakafaingofua", + "Hant": "tohinima fakasiaina-tukufakaholo", + "Hebr": "tohinima fakahepelÅ«", + "Hira": "tohinima fakasiapani-hilakana", + "Hluw": "tohinima tongitapu-fakaÊ»anatolia", + "Hmng": "tohinima fakapahaumongi", + "Hrkt": "tohinima fakasilapa-siapani", + "Hung": "tohinima fakahungakalia-motuÊ»a", + "Inds": "tohinima fakaÊ»initusi", + "Ital": "tohinima fakaʻītali-motuÊ»a", + "Jamo": "tohinima fakasamo", + "Java": "tohinima fakasava", + "Jpan": "tohinima fakasiapani", + "Jurc": "tohinima fakaiÅ«keni", + "Kali": "tohinima fakakaialÄ«", + "Kana": "tohinima fakasiapani-katakana", + "Khar": "tohinima fakakalositÄ«", + "Khmr": "tohinima fakakamipÅtia", + "Khoj": "tohinima fakakosikÄ«", + "Knda": "tohinima fakaÊ»initia-kanata", + "Kore": "tohinima fakakÅlea", + "Kpel": "tohinima fakakepele", + "Kthi": "tohinima fakakaiatÄ«", + "Lana": "tohinima fakalana", + "Laoo": "tohinima fakalau", + "Latf": "tohinima fakalatina-falakituli", + "Latg": "tohinima fakalatina-kaeliki", + "Latn": "tohinima fakalatina", + "Lepc": "tohinima fakalepasÄ", + "Limb": "tohinima fakalimipÅ«", + "Lina": "tohinima fakalinea-A", + "Linb": "tohinima fakalinea-P", + "Lisu": "tohinima fakafalÄse", + "Loma": "tohinima fakaloma", + "Lyci": "tohinima fakalÄ«sia", + "Lydi": "tohinima fakalÄ«tia", + "Mahj": "tohinima fakamahasani", + "Mand": "tohinima fakamanitaea", + "Mani": "tohinima fakamanikaea", + "Maya": "tohinima tongitapu fakamaia", + "Mend": "tohinima fakamÄ“niti", + "Merc": "tohinima fakameloue-heihei", + "Mero": "tohinima fakameloue", + "Mlym": "tohinima fakaÊ»initia-malÄialami", + "Modi": "tohinima fakamotÄ«", + "Mong": "tohinima fakamongokÅlia", + "Moon": "tohinima laukonga ki he kui-mÄhina", + "Mroo": "tohinima fakamolÅ", + "Mtei": "tohinima fakametei-maieki", + "Mymr": "tohinima fakapema", + "Narb": "tohinima fakaÊ»alepea-tokelau-motuÊ»a", + "Nbat": "tohinima fakanapatea", + "Nkgb": "tohinima fakanati-sepa", + "Nkoo": "tohinima fakanikÅ", + "Nshu": "tohinima fakanasiÅ«", + "Ogam": "tohinima fakaÊ»okami", + "Olck": "tohinima fakaÊ»olisiki", + "Orkh": "tohinima fakaÊ»olikoni", + "Orya": "tohinima fakaÊ»otia", + "Osma": "tohinima fakaÊ»osimÄnia", + "Palm": "tohinima fakapalamilene", + "Pauc": "tohinima fakapausinihau", + "Perm": "tohinima fakapÄ“mi-motuÊ»a", + "Phag": "tohinima fakapÄkisipÄ", + "Phli": "tohinima fakapÄlavi-tongi", + "Phlp": "tohinima fakapÄlavi-saame", + "Phlv": "tohinima fakapÄlavi-tohi", + "Phnx": "tohinima fakafoinikia", + "Plrd": "tohinima fakafonÄ“tiki-polÄti", + "Prti": "tohinima fakapÄtia-tongi", + "Rjng": "tohinima fakalesiangi", + "Roro": "tohinima fakalongolongo", + "Runr": "tohinima fakaluniki", + "Samr": "tohinima fakasamalitane", + "Sara": "tohinima fakasalati", + "Sarb": "tohinima fakaÊ»alepea-tonga-motuÊ»a", + "Saur": "tohinima fakasaulasitÄ", + "Sgnw": "tohinima fakaÊ»ilonga-tohi", + "Shaw": "tohinima fakasiavi", + "Shrd": "tohinima fakasiÄlatÄ", + "Sidd": "tohinima fakasititami", + "Sind": "tohinima fakakutauÄti", + "Sinh": "tohinima fakasingihala", + "Sora": "tohinima fakasolasomipengi", + "Sund": "tohinima fakasunitÄ", + "Sylo": "tohinima fakasailoti-nakili", + "Syrc": "tohinima fakasuliÄiÄ", + "Syre": "tohinima fakasuliÄiÄ-Ê»esitelangelo", + "Syrj": "tohinima fakasuliÄiÄ-hihifo", + "Syrn": "tohinima fakasuliÄiÄ-hahake", + "Tagb": "tohinima fakatakipaneuÄ", + "Takr": "tohinima fakatakili", + "Tale": "tohinima fakatai-lue", + "Talu": "tohinima fakatai-lue-foÊ»ou", + "Taml": "tohinima fakatamili", + "Tang": "tohinima fakatanguti", + "Tavt": "tohinima fakatai-vieti", + "Telu": "tohinima fakaÊ»initia-teluku", + "Teng": "tohinima fakatengiuali", + "Tfng": "tohinima fakatifinÄki", + "Tglg": "tohinima fakatakaloka", + "Thaa": "tohinima fakatÄna", + "Thai": "tohinima fakatailani", + "Tibt": "tohinima fakataipeti", + "Tirh": "tohinima fakatÄ«huta", + "Ugar": "tohinima fakaʻūkaliti", + "Vaii": "tohinima fakavai", + "Visp": "tohinima fakafonÄ“tiki-hÄmai", + "Wara": "tohinima fakavalangi-kisitÄ«", + "Wole": "tohinima fakauoleai", + "Xpeo": "tohinima fakapÄ“siamuÊ»a", + "Xsux": "tohinima fakamataÊ»ingahau-sumelo-akatia", + "Yiii": "tohinima fakaīī", + "Zinh": "tohinima hokosi", + "Zmth": "tohinima fakamatematika", + "Zsye": "tohinima fakatÄtÄ", + "Zsym": "tohinima fakaÊ»ilonga", + "Zxxx": "tohinima taÊ»etohitohiÊ»i", + "Zyyy": "tohinima fakatatau", + "Zzzz": "tohinima taÊ»eÊ»iloa" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/tr.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/tr.json new file mode 100644 index 0000000000000000000000000000000000000000..cf0a74b87508c3410bc28b0594d7e4503756a403 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/tr.json @@ -0,0 +1,172 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "Afaka", + "Aghb": "Kafkas Albanyası", + "Arab": "Arap", + "Armi": "İmparatorluk Aramicesi", + "Armn": "Ermeni", + "Avst": "Avesta", + "Bali": "Bali Dili", + "Bamu": "Bamum", + "Bass": "Bassa Vah", + "Batk": "Batak", + "Beng": "Bengal", + "Blis": "Blis Sembolleri", + "Bopo": "Bopomofo", + "Brah": "Brahmi", + "Brai": "Braille", + "Bugi": "Bugis", + "Buhd": "Buhid", + "Cakm": "Chakma", + "Cans": "UCAS", + "Cari": "Karya", + "Cham": "Cham", + "Cher": "Çeroki", + "Cirt": "Cirth", + "Copt": "Kıpti", + "Cprt": "Kıbrıs", + "Cyrl": "Kiril", + "Cyrs": "Eski Kilise Slavcası Kiril", + "Deva": "Devanagari", + "Dsrt": "Deseret", + "Dupl": "Duployé Stenografi", + "Egyd": "Demotik Mısır", + "Egyh": "Hiyeratik Mısır", + "Egyp": "Mısır Hiyeroglifleri", + "Elba": "Elbasan", + "Ethi": "Etiyopya", + "Geok": "Hutsuri Gürcü", + "Geor": "Gürcü", + "Glag": "Glagolit", + "Goth": "Gotik", + "Gran": "Grantha", + "Grek": "Yunan", + "Gujr": "Gücerat", + "Guru": "Gurmukhi", + "Hanb": "Hanb", + "Hang": "Hangıl", + "Hani": "Han", + "Hano": "Hanunoo", + "Hans": "BasitleÅŸtirilmiÅŸ", + "Hant": "Geleneksel", + "Hebr": "İbrani", + "Hira": "Hiragana", + "Hluw": "Anadolu Hiyeroglifleri", + "Hmng": "Pahavh Hmong", + "Hrkt": "Katakana veya Hiragana", + "Hung": "Eski Macar", + "Inds": "Indus", + "Ital": "Eski İtalyan", + "Jamo": "Jamo", + "Java": "Cava Dili", + "Jpan": "Japon", + "Jurc": "Jurchen", + "Kali": "Kayah Li", + "Kana": "Katakana", + "Khar": "Kharoshthi", + "Khmr": "Kmer", + "Khoj": "Khojki", + "Knda": "Kannada", + "Kore": "Kore", + "Kpel": "Kpelle", + "Kthi": "Kaithi", + "Lana": "Lanna", + "Laoo": "Lao", + "Latf": "Fraktur Latin", + "Latg": "Gael Latin", + "Latn": "Latin", + "Lepc": "Lepcha", + "Limb": "Limbu", + "Lina": "Lineer A", + "Linb": "Lineer B", + "Lisu": "Fraser", + "Loma": "Loma", + "Lyci": "Likya", + "Lydi": "Lidya", + "Mahj": "Mahajani", + "Mand": "Manden", + "Mani": "Mani", + "Maya": "Maya Hiyeroglifleri", + "Mend": "Mende", + "Merc": "Meroitik El Yazısı", + "Mero": "Meroitik", + "Mlym": "Malayalam", + "Modi": "Modi", + "Mong": "MoÄŸol", + "Moon": "Moon", + "Mroo": "Mro", + "Mtei": "Meitei Mayek", + "Mymr": "Burma", + "Narb": "Eski Kuzey Arap", + "Nbat": "Nebati", + "Nkgb": "Naksi Geba", + "Nkoo": "N’Ko", + "Nshu": "Nüshu", + "Ogam": "Ogham", + "Olck": "Ol Chiki", + "Orkh": "Orhun", + "Orya": "Oriya", + "Osma": "Osmanya", + "Palm": "Palmira", + "Pauc": "Pau Cin Hau", + "Perm": "Eski Permik", + "Phag": "Phags-pa", + "Phli": "Pehlevi Kitabe Dili", + "Phlp": "Psalter Pehlevi", + "Phlv": "Kitap Pehlevi Dili", + "Phnx": "Fenike", + "Plrd": "Pollard Fonetik", + "Prti": "Partça Kitabe Dili", + "Rjng": "Rejang", + "Roro": "Rongorongo", + "Runr": "Runik", + "Samr": "Samarit", + "Sara": "Sarati", + "Sarb": "Eski Güney Arap", + "Saur": "Saurashtra", + "Sgnw": "İşaret Dili", + "Shaw": "Shavian", + "Shrd": "Sharada", + "Sidd": "Siddham", + "Sind": "Khudabadi", + "Sinh": "Seylan", + "Sora": "Sora Sompeng", + "Sund": "Sunda", + "Sylo": "Syloti Nagri", + "Syrc": "Süryani", + "Syre": "Estrangela Süryani", + "Syrj": "Batı Süryani", + "Syrn": "DoÄŸu Süryani", + "Tagb": "Tagbanva", + "Takr": "Takri", + "Tale": "Tai Le", + "Talu": "New Tai Lue", + "Taml": "Tamil", + "Tang": "Tangut", + "Tavt": "Tai Viet", + "Telu": "Telugu", + "Teng": "Tengvar", + "Tfng": "Tifinagh", + "Tglg": "Takalot", + "Thaa": "Thaana", + "Thai": "Tay", + "Tibt": "Tibet", + "Tirh": "Tirhuta", + "Ugar": "Ugarit Çivi Yazısı", + "Vaii": "Vai", + "Visp": "KonuÅŸma Sesleri Çizimlemesi", + "Wara": "Varang Kshiti", + "Wole": "Woleai", + "Xpeo": "Eski Fars", + "Xsux": "Sümer-Akad Çivi Yazısı", + "Yiii": "Yi", + "Zinh": "Kalıtsal", + "Zmth": "Matematiksel Gösterim", + "Zsye": "Emoji", + "Zsym": "Sembol", + "Zxxx": "Yazılı Olmayan", + "Zyyy": "Ortak", + "Zzzz": "Bilinmeyen Alfabe" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ug.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ug.json new file mode 100644 index 0000000000000000000000000000000000000000..5f4c86d7b4d81c0c7848252e6a1b2dd6740c1682 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ug.json @@ -0,0 +1,162 @@ +{ + "Version": "2.1.28.76", + "Names": { + "Afak": "Ø¦Ø§ÙØ§ÙƒØ§", + "Arab": "ئەرەب", + "Armi": "خان جەمەتى ئارامۇ", + "Armn": "ئەرمەن", + "Avst": "Ø¦Ø§Û‹ÛØ³ØªØ§", + "Bali": "بالى", + "Bamu": "بامۇم", + "Bass": "باسسا", + "Batk": "باتاك", + "Beng": "بÛنگال", + "Blis": "بىلىس بەلگىلىرى", + "Bopo": "خەنچە پىنيىن", + "Brah": "براخمى", + "Brai": "برائىل ئەمالار ÙŠÛØ²Ù‰Ù‚Ù‰", + "Bugi": "بۇگى", + "Buhd": "بۇخىت", + "Cakm": "چاكما", + "Cans": "بىرلىككە ÙƒÛ•Ù„Ú¯Û•Ù† كانادا يەرلىك بوغۇم جەدۋىلى", + "Cari": "كارىيا", + "Cham": "چام", + "Cher": "Ú†ÛØ±ÙˆÙƒÙ‰", + "Cirt": "كىرسچە", + "Copt": "كوپتىك", + "Cprt": "سىپرۇس", + "Cyrl": "كىرىل", + "Cyrs": "قەدىمكى چىركاۋ سىلاۋيانچە كىرىل", + "Deva": "دÛۋاناگارى", + "Dsrt": "Ø¯ÛØ²ÛØ±ÛØª", + "Dupl": "دۇپلويان ØªÛØ² خاتىرىلەش", + "Egyd": "دÛموتىكچە مىسىر", + "Egyh": "خىيەراتىكچە مىسىر", + "Egyp": "تەسۋىرىي ÙŠÛØ²Ù‰Ù‚ مىسىر", + "Ethi": "ئÛÙىيوپىيەچە", + "Geok": "خۇتسۇرى گىرۇزىنچە", + "Geor": "گىرۇزىنچە", + "Glag": "گىلاگوتچە", + "Goth": "گوتچە", + "Gran": "گىرانتاچە", + "Grek": "گىرÛÙƒÚ†Û•", + "Gujr": "گۇجاراتچە", + "Guru": "گۇرمۇكىچە", + "Hani": "خەنچە", + "Hano": "خانۇنۇچە", + "Hans": "ئاددىي خەنچە", + "Hant": "مۇرەككەپ خەنچە", + "Hebr": "ئىبرانىچە", + "Hira": "خىراگانا", + "Hluw": "ئاناتولىيە تەسۋىرىي ÙŠÛØ²Ù‰Ù‚", + "Hmng": "Ù…Û†Ú­Ú†Û•", + "Hrkt": "ياپونچە خىراگانا ياكى كاتاكانا", + "Hung": "قەدىمكى ماجارچە", + "Inds": "ئىندۇسچە", + "Ital": "قەدىمكى ئىتاليانچە", + "Java": "ياۋاچە", + "Jpan": "ياپونچە", + "Jurc": "جۇرچÛÙ†Ú†Û•", + "Kali": "كاياھچە", + "Kana": "كاتاكانا", + "Khar": "كاروشتىچە", + "Khmr": "ÙƒÛØ®Ù…ÛØ±Ú†Û•", + "Khoj": "خوجكىچە", + "Knda": "كانناداچە", + "Kore": "كورÛÙŠÛ•Ú†Û•", + "Kpel": "كپÛللÛÚ†Û•", + "Kthi": "كاياتىچە", + "Lana": "لانناچە", + "Laoo": "لائوسچە", + "Latf": "Ùىراكتۇر لاتىنچە", + "Latg": "سىكوت لاتىنچە", + "Latn": "لاتىنچە", + "Lepc": "لەپچاچە", + "Limb": "لىمبۇچە", + "Lina": "سىزىقلىق A", + "Linb": "سىزىقلىق B", + "Lisu": "ÙØ±Ø§Ø³Ûرچە", + "Loma": "لوماچە", + "Lyci": "لىسىيانچە", + "Lydi": "لىدىيەچە", + "Mand": "ماندائىكچە", + "Mani": "Ù…Ø§Ù†Û•ÙƒÛØ²Û•Ù…Ú†Û•", + "Maya": "ماياچە تەسۋىرىي ÙŠÛØ²Ù‰Ù‚", + "Mend": "Ù…ÛندÛÚ†Û•", + "Merc": "Ù…ÛØªØ±ÙˆØ¦Ù‰Øª يازمىچە", + "Mero": "Ù…ÛØªØ±ÙˆØ¦Ù‰Øª", + "Mlym": "مالايامچە", + "Mong": "موڭغۇلچە", + "Moon": "كورىيە", + "Mroo": "مروچە", + "Mtei": "مانىپۇرىچە", + "Mymr": "بىرماچە", + "Narb": "قەدىمكى شىمالىي ئەرەبچە", + "Nbat": "ئانباتچە", + "Nkgb": "ناشىچە", + "Nkoo": "نىكوچە", + "Nshu": "نۈشۇچە", + "Ogam": "ئوگەمچە", + "Olck": "ئول-چىكىچە", + "Orkh": "ئورخۇنچە", + "Orya": "ئورىياچە", + "Osma": "ئوسمانيە", + "Palm": "پالمىراچە", + "Perm": "قەدىمكى Ù¾ÛØ±Ù…ىكچە", + "Phag": "پاسپاچە", + "Phli": "پەھلىۋىچە ئويما خەت", + "Phlp": "پەھلىۋىچە Ø´ÛØ¦Ù‰Ø±Ù‰ÙŠ ØªÙ‰Ù„", + "Phlv": "پەھلىۋىچە كىتابى تىل", + "Phnx": "Ùىنىكچە", + "Plrd": "پوللارد تاۋۇشلىرى", + "Prti": "پارتىئانچە ئويما خەت", + "Rjng": "Ø±ÛØ¬Ø§Ú­Ú†Û•", + "Roro": "روڭگوروڭگو", + "Runr": "رۇنىكچە", + "Samr": "سامارىچە", + "Sara": "ساراتىچە", + "Sarb": "قەدىمكى جەنۇبى ئەرەبچە", + "Saur": "سائۇراشتىراچە", + "Sgnw": "ئىشارەت تىلى", + "Shaw": "شاۋىيانچە", + "Shrd": "شاراداچە", + "Sind": "كۇداۋادچە", + "Sinh": "سىنخالاچە", + "Sora": "سورا سامپىڭ", + "Sund": "سۇنداچە", + "Sylo": "سىيولوتى-ناگرىچە", + "Syrc": "سۈرىيەچە", + "Syre": "سۈرىيەچە ئەبجەت", + "Syrj": "غەربىي سۈرىيەچە", + "Syrn": "شەرقىي سۈرىيەچە", + "Tagb": "تاگبانۋاچە", + "Takr": "تاكرىچە", + "Tale": "تاي-Ù„Û•Ú†Û•", + "Talu": "ÙŠÛÚ­Ù‰ تاي-Ù„Û•Ú†Û•", + "Taml": "تامىلچە", + "Tang": "تاڭغۇتچە", + "Tavt": "تايلاندچە-Û‹Ù‰ÙŠÛØªÙ†Ø§Ù…Ú†Û•", + "Telu": "تÛÙ„Û‡Ú¯Û‡Ú†Û•", + "Teng": "تÛڭۋارچە", + "Tfng": "تىÙىناغچە", + "Tglg": "تاگالوگچە", + "Thaa": "تاناچە", + "Thai": "تايلاندچە", + "Tibt": "تىبەتچە", + "Tirh": "تىرخۇتاچە", + "Ugar": "ئۇگارىتىكچە", + "Vaii": "ۋايچە", + "Visp": "كۆرۈنۈشچان تاۋۇش", + "Wara": "ۋاراڭ كىشىتى", + "Wole": "ۋولىئاي", + "Xpeo": "قەدىمكى پارىسچە", + "Xsux": "Ø³Û‡Ù…ÛØ±-ئاككادىيان مىخ خەت", + "Yiii": "يىچە", + "Zinh": "ئىرسىيەت ئاتالغۇ", + "Zmth": "ماتÛماتىكىلىق بەلگە", + "Zsym": "بەلگە", + "Zxxx": "ÙŠÛØ²Ù‰Ù„مىغان", + "Zyyy": "ئورتاق", + "Zzzz": "يوچۇن ÙŠÛØ²Ù‰Ù‚" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/uk.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/uk.json new file mode 100644 index 0000000000000000000000000000000000000000..aa08cb1c5cffd325629e2323aa83cead348ee8cb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/uk.json @@ -0,0 +1,146 @@ +{ + "Version": "2.1.29.38", + "Names": { + "Afak": "афака", + "Aghb": "кавказька албанÑька", + "Ahom": "ахом", + "Arab": "арабицÑ", + "Armi": "армі", + "Armn": "вірменÑька", + "Avst": "авеÑтійÑький", + "Bali": "балійÑький", + "Bamu": "бамум", + "Bass": "баÑÑа", + "Batk": "батак", + "Beng": "бенгальÑька", + "Blis": "Ñимволи БліÑÑа", + "Bopo": "бопомофо", + "Brah": "брахмі", + "Brai": "шрифт БрайлÑ", + "Bugi": "бугійÑький", + "Buhd": "бухід", + "Cakm": "чакма", + "Cans": "уніфіковані Ñимволи канадÑьких тубільців", + "Cari": "каріанÑький", + "Cham": "хамітÑький", + "Cher": "черокі", + "Cirt": "кирт", + "Copt": "коптÑький", + "Cprt": "кіпрÑький", + "Cyrl": "кирилицÑ", + "Cyrs": "давньоцерковноÑловʼÑнÑький", + "Deva": "деванагарі", + "Dsrt": "дезерет", + "Egyd": "єгипетÑький демотичний", + "Egyh": "єгипетÑький ієратичний", + "Egyp": "єгипетÑький ієрогліфічний", + "Ethi": "ефіопÑька", + "Geok": "кхутÑурі", + "Geor": "грузинÑька", + "Glag": "глаголичний", + "Goth": "готичний", + "Grek": "грецька", + "Gujr": "гуджараті", + "Guru": "гурмухі", + "Hanb": "хань", + "Hang": "хангиль", + "Hani": "китайÑька", + "Hano": "хануну", + "Hans": "Ñпрощена", + "Hant": "традиційна", + "Hebr": "іврит", + "Hira": "хірагана", + "Hmng": "пахау хмонг", + "Hrkt": "ÑпонÑькі Ñилабарії", + "Hung": "давньоугорÑький", + "Inds": "харапÑький", + "Ital": "давньоіталійÑький", + "Jamo": "чамо", + "Java": "ÑванÑький", + "Jpan": "ÑпонÑька", + "Kali": "ÐºÐ°Ñ Ð»Ñ–", + "Kana": "катакана", + "Khar": "кхароштхі", + "Khmr": "кхмерÑька", + "Knda": "каннада", + "Kore": "корейÑька", + "Kthi": "каїті", + "Lana": "ланна", + "Laoo": "лаоÑька", + "Latf": "латинÑький фрактурний", + "Latg": "латинÑький гельÑький", + "Latn": "латиницÑ", + "Lepc": "лепча", + "Limb": "лімбу", + "Lina": "лінійний Ð", + "Linb": "лінійний Ð’", + "Lisu": "абетка Фрейзера", + "Loma": "лома", + "Lyci": "лікійÑький", + "Lydi": "лідійÑький", + "Mand": "мандейÑький", + "Mani": "маніхейÑький", + "Maya": "Ð¼Ð°Ð¹Ñ Ñ–Ñ”Ñ€Ð¾Ð³Ð»Ñ–Ñ„Ñ–Ñ‡Ð½Ð¸Ð¹", + "Mero": "мероїтÑький", + "Mlym": "малаÑламÑька", + "Mong": "монгольÑька", + "Moon": "мун", + "Mtei": "мейтей майєк", + "Mymr": "мʼÑнмÑька", + "Nkoo": "нко", + "Ogam": "огамічний", + "Olck": "ÑантальÑький", + "Orkh": "орхонÑький", + "Orya": "оріÑ", + "Osma": "оÑманÑький", + "Perm": "давньопермÑький", + "Phag": "пхагÑ-па", + "Phli": "пехлеві напиÑів", + "Phlp": "пехлеві релігійний", + "Phlv": "пехлеві літературний", + "Phnx": "фінікійÑький", + "Plrd": "пиÑемніÑть Полларда", + "Prti": "парфÑнÑький", + "Rjng": "реджанг", + "Roro": "ронго-ронго", + "Runr": "рунічний", + "Samr": "ÑамаритÑнÑький", + "Sara": "Ñараті", + "Saur": "Ñаураштра", + "Sgnw": "знаковий", + "Shaw": "шоу", + "Sinh": "ÑингальÑька", + "Sund": "ÑунданÑький", + "Sylo": "Ñілоті нагрі", + "Syrc": "ÑирійÑький", + "Syre": "давньоÑирійÑький еÑтрангело", + "Syrj": "давньоÑирійÑький західний", + "Syrn": "давньоÑирійÑький Ñхідний", + "Tagb": "тагбанва", + "Tale": "тай-лі", + "Talu": "новий тайÑький луе", + "Taml": "тамільÑька", + "Tang": "тангут", + "Tavt": "тай-вʼєт", + "Telu": "телугу", + "Teng": "тенгвар", + "Tfng": "тифінаг", + "Tglg": "тагальÑький", + "Thaa": "таана", + "Thai": "тайÑька", + "Tibt": "тибетÑька", + "Ugar": "угаритÑький", + "Vaii": "ваї", + "Visp": "видиме мовленнÑ", + "Xpeo": "давньоперÑький", + "Xsux": "шумеро-аккадÑький клінопиÑ", + "Yiii": "йї", + "Zinh": "уÑпадкована", + "Zmth": "математична", + "Zsye": "емодзі", + "Zsym": "Ñимвольна", + "Zxxx": "безпиÑемна", + "Zyyy": "звичайна", + "Zzzz": "невідома ÑиÑтема пиÑьма" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ur.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ur.json new file mode 100644 index 0000000000000000000000000000000000000000..899f7cf6627406a41c35015b418f2f016747f8ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/ur.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Arab": "عربی", + "Armn": "آرمینیائی", + "Beng": "بنگالی", + "Bopo": "بوپوموÙÙˆ", + "Brai": "بریل", + "Cyrl": "سیریلک", + "Deva": "دیوناگری", + "Ethi": "ایتھوپیائی", + "Geor": "جارجیائی", + "Grek": "یونانی", + "Gujr": "گجراتی", + "Guru": "گرمکھی", + "Hanb": "Ûینب", + "Hang": "Ûنگول", + "Hani": "ÛØ§Ù†", + "Hans": "آسان", + "Hant": "روایتی", + "Hebr": "عبرانی", + "Hira": "Ûیراگینا", + "Hrkt": "جاپانی سیلابریز", + "Jamo": "جامو", + "Jpan": "جاپانی", + "Kana": "کٹاکانا", + "Khmr": "خمیر", + "Knda": "Ú©Ù†Ú‘", + "Kore": "کوریائی", + "Laoo": "لاؤ", + "Latn": "لاطینی", + "Mlym": "ملیالم", + "Mong": "منگولیائی", + "Mymr": "میانمار", + "Orya": "اڑیÛ", + "Sinh": "Ø³Ù†ÛØ§Ù„ا", + "Taml": "تمل", + "Telu": "تیلگو", + "Thaa": "تھانا", + "Thai": "تھائی", + "Tibt": "تبتی", + "Zmth": "ریاضی Ú©ÛŒ علامتیں", + "Zsye": "ایموجی", + "Zsym": "علامات", + "Zxxx": "غیر تحریر شدÛ", + "Zyyy": "عام", + "Zzzz": "نامعلوم رسم الخط" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/uz.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/uz.json new file mode 100644 index 0000000000000000000000000000000000000000..e120d19590e2e2b43799c2278dc82898ebb91b41 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/uz.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.29.44", + "Names": { + "Arab": "arab", + "Armn": "arman", + "Beng": "bengal", + "Bopo": "bopomofo", + "Brai": "brayl", + "Cyrl": "kirill", + "Deva": "devanagari", + "Ethi": "habash", + "Geor": "gruzin", + "Grek": "grek", + "Gujr": "gujarot", + "Guru": "gurmukxi", + "Hanb": "hanb", + "Hang": "hangul", + "Hani": "xitoy", + "Hans": "soddalashgan xitoy", + "Hant": "an’anaviy xitoy", + "Hebr": "ivrit", + "Hira": "hiragana", + "Hrkt": "katakana yoki hiragana", + "Jamo": "jamo", + "Jpan": "yapon", + "Kana": "katakana", + "Khmr": "kxmer", + "Knda": "kannada", + "Kore": "koreys", + "Laoo": "laos", + "Latn": "lotin", + "Mlym": "malayalam", + "Mong": "mongol", + "Mymr": "myanma", + "Orya": "oriya", + "Sinh": "singal", + "Taml": "tamil", + "Telu": "telugu", + "Thaa": "taana", + "Thai": "tay", + "Tibt": "tibet", + "Zmth": "matematik ifodalar", + "Zsye": "emoji", + "Zsym": "belgilar", + "Zxxx": "yozuvsiz", + "Zyyy": "umumiy", + "Zzzz": "noma’lum yozuv" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/uz_Arab.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/uz_Arab.json new file mode 100644 index 0000000000000000000000000000000000000000..bf7fb812f7a6eedf004bdd32fbefeef60a7e6215 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/uz_Arab.json @@ -0,0 +1,6 @@ +{ + "Version": "2.1.27.40", + "Names": { + "Arab": "عربی" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/uz_Cyrl.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/uz_Cyrl.json new file mode 100644 index 0000000000000000000000000000000000000000..356577fa2dda805beb8b8436d0bb443c52678542 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/uz_Cyrl.json @@ -0,0 +1,44 @@ +{ + "Version": "2.1.27.98", + "Names": { + "Arab": "Ðраб", + "Armn": "Ðрман", + "Beng": "Бенгали", + "Bopo": "Бопомофо", + "Brai": "Браилле", + "Cyrl": "Кирил", + "Deva": "Девангари", + "Ethi": "Ҳабаш", + "Geor": "Грузин", + "Grek": "Юнон", + "Gujr": "Гужарати", + "Guru": "Гурмухи", + "Hang": "Хангул", + "Hani": "Хан", + "Hans": "Соддалаштирилган", + "Hant": "Ðнъанавий", + "Hebr": "Иброний", + "Hira": "Хирагана", + "Jpan": "Япон", + "Kana": "Катакана", + "Khmr": "Хмер", + "Knda": "Каннада", + "Kore": "КорейÑ", + "Laoo": "Лао", + "Latn": "Лотин", + "Mlym": "Малайалам", + "Mong": "Мўғулча", + "Mymr": "МьÑнма", + "Orya": "ОриÑ", + "Sinh": "Синхала", + "Taml": "Тамил", + "Telu": "Телугу", + "Thaa": "Таана", + "Thai": "Тай", + "Tibt": "Тибет", + "Zsym": "Рамзлар", + "Zxxx": "Ðзилмаган", + "Zyyy": "Умумий", + "Zzzz": "Ðомаълум шрифт" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/vi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/vi.json new file mode 100644 index 0000000000000000000000000000000000000000..edf646ad4fffa9fbd0eaefe1bfd3e7a37c82412c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/vi.json @@ -0,0 +1,166 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "Chữ Afaka", + "Arab": "Chữ Ả Rập", + "Armi": "Chữ Imperial Aramaic", + "Armn": "Chữ Armenia", + "Avst": "Chữ Avestan", + "Bali": "Chữ Bali", + "Bamu": "Chữ Bamum", + "Bass": "Chữ Bassa Vah", + "Batk": "Chữ Batak", + "Beng": "Chữ Bangladesh", + "Blis": "Chữ Blissymbols", + "Bopo": "Chữ Bopomofo", + "Brah": "Chữ Brahmi", + "Brai": "Chữ nổi Braille", + "Bugi": "Chữ Bugin", + "Buhd": "Chữ Buhid", + "Cakm": "Chữ Chakma", + "Cans": "Âm tiết Thổ dân Canada Hợp nhất", + "Cari": "Chữ Caria", + "Cham": "Chữ Chăm", + "Cher": "Chữ Cherokee", + "Cirt": "Chữ Cirth", + "Copt": "Chữ Coptic", + "Cprt": "Chứ Síp", + "Cyrl": "Chữ Kirin", + "Cyrs": "Chữ Kirin SlavÆ¡ Nhà thá» cổ", + "Deva": "Chữ Devanagari", + "Dsrt": "Chữ Deseret", + "Dupl": "Chữ tốc ký Duployan", + "Egyd": "Chữ Ai Cập bình dân", + "Egyh": "Chữ Ai Cập thày tu", + "Egyp": "Chữ tượng hình Ai Cập", + "Ethi": "Chữ Ethiopia", + "Geok": "Chữ Khutsuri Georgia", + "Geor": "Chữ Gruzia", + "Glag": "Chữ Glagolitic", + "Goth": "Chữ Gô-tích", + "Gran": "Chữ Grantha", + "Grek": "Chữ Hy Lạp", + "Gujr": "Chữ Gujarati", + "Guru": "Chữ Gurmukhi", + "Hanb": "Chữ Hanb", + "Hang": "Chữ Hangul", + "Hani": "Chữ Hán", + "Hano": "Chữ Hanunoo", + "Hans": "Giản thể", + "Hant": "Phồn thể", + "Hebr": "Chữ Do Thái", + "Hira": "Chữ Hiragana", + "Hluw": "Chữ tượng hình Anatolia", + "Hmng": "Chữ Pahawh Hmong", + "Hrkt": "Bảng ký hiệu âm tiết Tiếng Nhật", + "Hung": "Chữ Hungary cổ", + "Inds": "Chữ Indus", + "Ital": "Chữ Italic cổ", + "Jamo": "Chữ Jamo", + "Java": "Chữ Java", + "Jpan": "Chữ Nhật Bản", + "Jurc": "Chữ Jurchen", + "Kali": "Chữ Kayah Li", + "Kana": "Chữ Katakana", + "Khar": "Chữ Kharoshthi", + "Khmr": "Chữ KhÆ¡-me", + "Khoj": "Chữ Khojki", + "Knda": "Chữ Kannada", + "Kore": "Chữ Hàn Quốc", + "Kpel": "Chữ Kpelle", + "Kthi": "Chữ Kaithi", + "Lana": "Chữ Lanna", + "Laoo": "Chữ Lào", + "Latf": "Chữ La-tinh Fraktur", + "Latg": "Chữ La-tinh Xcốt-len", + "Latn": "Chữ La tinh", + "Lepc": "Chữ Lepcha", + "Limb": "Chữ Limbu", + "Lina": "Chữ Linear A", + "Linb": "Chữ Linear B", + "Lisu": "Chữ Fraser", + "Loma": "Chữ Loma", + "Lyci": "Chữ Lycia", + "Lydi": "Chữ Lydia", + "Mand": "Chữ Mandaean", + "Mani": "Chữ Manichaean", + "Maya": "Chữ tượng hình Maya", + "Mend": "Chữ Mende", + "Merc": "Chữ Meroitic Nét thảo", + "Mero": "Chữ Meroitic", + "Mlym": "Chữ Malayalam", + "Mong": "Chữ Mông Cổ", + "Moon": "Chữ nổi Moon", + "Mroo": "Chữ Mro", + "Mtei": "Chữ Meitei Mayek", + "Mymr": "Chữ Myanmar", + "Narb": "Chữ Bắc Ả Rập cổ", + "Nbat": "Chữ Nabataean", + "Nkgb": "Chữ Naxi Geba", + "Nkoo": "Chữ N’Ko", + "Nshu": "Chữ Nüshu", + "Ogam": "Chữ Ogham", + "Olck": "Chữ Ol Chiki", + "Orkh": "Chữ Orkhon", + "Orya": "Chữ Odia", + "Osma": "Chữ Osmanya", + "Palm": "Chữ Palmyrene", + "Perm": "Chữ Permic cổ", + "Phag": "Chữ Phags-pa", + "Phli": "Chữ Pahlavi Văn bia", + "Phlp": "Chữ Pahlavi Thánh ca", + "Phlv": "Chữ Pahlavi Sách", + "Phnx": "Chữ Phoenicia", + "Plrd": "Ngữ âm Pollard", + "Prti": "Chữ Parthia Văn bia", + "Rjng": "Chữ Rejang", + "Roro": "Chữ Rongorongo", + "Runr": "Chữ Runic", + "Samr": "Chữ Samaritan", + "Sara": "Chữ Sarati", + "Sarb": "Chữ Nam Ả Rập cổ", + "Saur": "Chữ Saurashtra", + "Sgnw": "Chữ viết Ký hiệu", + "Shaw": "Chữ Shavian", + "Shrd": "Chữ Sharada", + "Sind": "Chữ Khudawadi", + "Sinh": "Chữ Sinhala", + "Sora": "Chữ Sora Sompeng", + "Sund": "Chữ Xu-đăng", + "Sylo": "Chữ Syloti Nagri", + "Syrc": "Chữ Syria", + "Syre": "Chữ Estrangelo Syriac", + "Syrj": "Chữ Tây Syria", + "Syrn": "Chữ Äông Syria", + "Tagb": "Chữ Tagbanwa", + "Takr": "Chữ Takri", + "Tale": "Chữ Thái Na", + "Talu": "Chữ Thái Lặc má»›i", + "Taml": "Chữ Tamil", + "Tang": "Chữ Tangut", + "Tavt": "Chữ Thái Việt", + "Telu": "Chữ Telugu", + "Teng": "Chữ Tengwar", + "Tfng": "Chữ Tifinagh", + "Tglg": "Chữ Tagalog", + "Thaa": "Chữ Thaana", + "Thai": "Chữ Thái", + "Tibt": "Chữ Tây Tạng", + "Tirh": "Chữ Tirhuta", + "Ugar": "Chữ Ugarit", + "Vaii": "Chữ Vai", + "Visp": "Tiếng nói Nhìn thấy được", + "Wara": "Chữ Varang Kshiti", + "Wole": "Chữ Woleai", + "Xpeo": "Chữ Ba Tư cổ", + "Xsux": "Chữ hình nêm Sumero-Akkadian", + "Yiii": "Chữ Di", + "Zinh": "Chữ Kế thừa", + "Zmth": "Ký hiệu Toán há»c", + "Zsye": "Biểu tượng", + "Zsym": "Ký hiệu", + "Zxxx": "Chưa có chữ viết", + "Zyyy": "Chung", + "Zzzz": "Chữ viết không xác định" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/yi.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/yi.json new file mode 100644 index 0000000000000000000000000000000000000000..3821f37d0df861588ada425d9230b581778209b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/yi.json @@ -0,0 +1,11 @@ +{ + "Version": "2.1.27.97", + "Names": { + "Arab": "×ַר×ַביש", + "Cyrl": "ציריליש", + "Deva": "דעוו×Ö·× ×Ö·×’×ַרי", + "Grek": "גריכיש", + "Hebr": "Hebr", + "Latn": "גַלחיש" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zh.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zh.json new file mode 100644 index 0000000000000000000000000000000000000000..399e228bf30d192350f5ca6d50b628d15a0947a7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zh.json @@ -0,0 +1,180 @@ +{ + "Version": "2.1.29.84", + "Names": { + "Adlm": "Adlm", + "Afak": "é˜¿æ³•å¡æ–‡", + "Aghb": "Aghb", + "Ahom": "Ahom", + "Arab": "阿拉伯文", + "Armi": "皇室亚拉姆文", + "Armn": "亚美尼亚文", + "Avst": "阿维斯陀文", + "Bali": "巴厘文", + "Bamu": "巴姆穆文", + "Bass": "å·´è¨æ–‡", + "Batk": "巴塔克文", + "Beng": "孟加拉文", + "Bhks": "Bhks", + "Blis": "布列斯符å·", + "Bopo": "汉语拼音", + "Brah": "婆罗米文字", + "Brai": "布莱å¶ç›²æ–‡", + "Bugi": "å¸ƒå‰æ–‡", + "Buhd": "布希德文", + "Cakm": "查克马文", + "Cans": "加拿大土著统一音节", + "Cari": "å¡é‡Œäºšæ–‡", + "Cham": "å æ–‡", + "Cher": "切罗基文", + "Cirt": "色斯文", + "Copt": "克普特文", + "Cprt": "塞浦路斯文", + "Cyrl": "西里尔文", + "Cyrs": "è¥¿é‡Œå°”æ–‡å­—ï¼ˆå¤æ•™ä¼šæ–¯æ‹‰å¤«æ–‡çš„å˜ä½“)", + "Deva": "天城文", + "Dsrt": "德塞莱特文", + "Dupl": "æœæ™®æ´›ä¼Šé€Ÿè®°", + "Egyd": "åŽæœŸåŸƒåŠæ–‡", + "Egyh": "å¤åŸƒåŠåƒ§ä¾£ä¹¦å†™ä½“", + "Egyp": "å¤åŸƒåŠè±¡å½¢æ–‡", + "Elba": "厄尔巴", + "Ethi": "埃塞俄比亚文", + "Geok": "æ ¼é²å‰äºšæ–‡ï¼ˆæ•™å ‚体)", + "Geor": "æ ¼é²å‰äºšæ–‡", + "Glag": "格拉哥里文", + "Goth": "哥特文", + "Gran": "格兰塔文", + "Grek": "希腊文", + "Gujr": "å¤å‰æ‹‰ç‰¹æ–‡", + "Guru": "æžœé²ç©†å¥‡æ–‡", + "Hanb": "汉语注音", + "Hang": "è°šæ–‡", + "Hani": "汉字", + "Hano": "汉奴罗文", + "Hans": "简体", + "Hant": "ç¹ä½“", + "Hatr": "Hatr", + "Hebr": "å¸Œä¼¯æ¥æ–‡", + "Hira": "å¹³å‡å", + "Hluw": "安那托利亚象形文字", + "Hmng": "æ¨æ¾å½•è‹—æ–‡", + "Hrkt": "片å‡å或平å‡å", + "Hung": "å¤åŒˆç‰™åˆ©æ–‡", + "Inds": "å¤å¸Œè…Šå“ˆæ‹‰æ½˜", + "Ital": "夿„大利文", + "Jamo": "韩文字æ¯", + "Java": "爪哇文", + "Jpan": "日文", + "Jurc": "女真文", + "Kali": "å…‹è€¶æŽæ–‡å­—", + "Kana": "片å‡å", + "Khar": "å¡ç½—é¡»ææ–‡", + "Khmr": "高棉文", + "Khoj": "å…‹å‰å¥‡æ–‡å­—", + "Knda": "å¡çº³è¾¾æ–‡", + "Kore": "韩文", + "Kpel": "克佩列文", + "Kthi": "å‡¯ææ–‡", + "Lana": "å…°æ‹¿æ–‡", + "Laoo": "è€æŒæ–‡", + "Latf": "æ‹‰ä¸æ–‡ï¼ˆå“¥ç‰¹å¼å­—体å˜ä½“)", + "Latg": "æ‹‰ä¸æ–‡ï¼ˆç›–尔文å˜ä½“)", + "Latn": "æ‹‰ä¸æ–‡", + "Lepc": "雷布查文", + "Limb": "林布文", + "Lina": "线形文字(A)", + "Linb": "线形文字(B)", + "Lisu": "傈僳文", + "Loma": "洛马文", + "Lyci": "利西亚文", + "Lydi": "å•底亚文", + "Mahj": "Mahj", + "Mand": "阿拉米文", + "Mani": "摩尼教文", + "Marc": "Marc", + "Maya": "玛雅圣符文", + "Mend": "门迪文", + "Merc": "麦罗埃è‰ä¹¦", + "Mero": "麦若æå…‹æ–‡", + "Mlym": "马拉雅拉姆文", + "Modi": "Modi", + "Mong": "è’™å¤æ–‡", + "Moon": "韩文语系", + "Mroo": "谬文", + "Mtei": "曼尼普尔文", + "Mult": "Mult", + "Mymr": "缅甸文", + "Narb": "å¤åŒ—方阿拉伯文", + "Nbat": "纳巴泰文", + "Newa": "Newa", + "Nkgb": "纳西格巴文", + "Nkoo": "西éžä¹¦é¢æ–‡å­—(N’Ko)", + "Nshu": "女书", + "Ogam": "欧甘文", + "Olck": "桑塔利文", + "Orkh": "鄂尔浑文", + "Orya": "奥里亚文", + "Osge": "Osge", + "Osma": "奥斯曼亚文", + "Palm": "帕尔迈拉文", + "Pauc": "Pauc", + "Perm": "å¤å½¼å°”姆文", + "Phag": "å…«æ€å·´æ–‡", + "Phli": "巴列维文碑铭体", + "Phlp": "巴列维文(圣诗体)", + "Phlv": "巴列维文(书体)", + "Phnx": "腓尼基文", + "Plrd": "波拉德音标文字", + "Prti": "帕æäºšæ–‡ç¢‘铭体", + "Rjng": "拉让文", + "Roro": "朗格朗格文", + "Runr": "å¤ä»£åŒ—欧文", + "Samr": "撒马利亚文", + "Sara": "沙拉堤文", + "Sarb": "å¤å—阿拉伯文", + "Saur": "索拉什特拉文", + "Sgnw": "书写符å·", + "Shaw": "è§ä¼¯çº³å¼æ–‡", + "Shrd": "夿‹‰è¾¾æ–‡", + "Sidd": "悉昙", + "Sind": "ä¿¡å¾·æ–‡", + "Sinh": "僧伽罗文", + "Sora": "索朗桑朋文", + "Sund": "巽他文", + "Sylo": "锡尔赫特文", + "Syrc": "å™åˆ©äºšæ–‡", + "Syre": "ç¦éŸ³ä½“å™åˆ©äºšæ–‡", + "Syrj": "西å™åˆ©äºšæ–‡", + "Syrn": "东å™åˆ©äºšæ–‡", + "Tagb": "塔格ç­ç“¦æ–‡", + "Takr": "泰克里文", + "Tale": "æ³°ä¹æ–‡", + "Talu": "新傣文", + "Taml": "泰米尔文", + "Tang": "å”å¤ç‰¹æ–‡", + "Tavt": "è¶Šå—傣文", + "Telu": "æ³°å¢å›ºæ–‡", + "Teng": "腾格瓦文字", + "Tfng": "æéžçº³æ–‡", + "Tglg": "塔加路文", + "Thaa": "塔安那文", + "Thai": "æ³°æ–‡", + "Tibt": "è—æ–‡", + "Tirh": "迈蒂利文", + "Ugar": "乌加里特文", + "Vaii": "ç“¦ä¾æ–‡", + "Visp": "å¯è§è¯­è¨€", + "Wara": "瓦郎奇蒂文字", + "Wole": "沃莱艾文", + "Xpeo": "夿³¢æ–¯æ–‡", + "Xsux": "è‹ç¾Žå°”-阿å¡å¾·æ¥”形文字", + "Yiii": "彿–‡", + "Zinh": "é—传学术语", + "Zmth": "数学符å·", + "Zsye": "绘文字", + "Zsym": "符å·", + "Zxxx": "éžä¹¦é¢æ–‡å­—", + "Zyyy": "通用", + "Zzzz": "未知文字" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zh_HK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zh_HK.json new file mode 100644 index 0000000000000000000000000000000000000000..0e66fedac63be98a11443d4f99e1765815b0081d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zh_HK.json @@ -0,0 +1,21 @@ +{ + "Version": "2.1.27.99", + "Names": { + "Cyrl": "西里爾文", + "Deva": "梵文", + "Ethi": "埃塞俄比亞文", + "Geor": "格魯å‰äºžæ–‡", + "Guru": "夿œ¨åŸºæ–‡", + "Hans": "簡體字", + "Hant": "ç¹é«”å­—", + "Knda": "åŽç´é”æ–‡", + "Laoo": "è€æ’¾æ–‡", + "Latn": "拉ä¸å­—æ¯", + "Mlym": "馬拉雅拉姆文", + "Orya": "奧里雅文", + "Sinh": "僧伽羅文", + "Taml": "泰米爾文", + "Thaa": "它拿字æ¯", + "Tibt": "è—æ–‡" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zh_Hant.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zh_Hant.json new file mode 100644 index 0000000000000000000000000000000000000000..dec44172b36cadbcb070bb3ca259edf5d141da07 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zh_Hant.json @@ -0,0 +1,169 @@ +{ + "Version": "2.1.28.79", + "Names": { + "Afak": "é˜¿æ³•å¡æ–‡å­—", + "Aghb": "高加索阿爾巴尼亞文", + "Arab": "阿拉伯文", + "Armi": "皇室亞美尼亞文", + "Armn": "亞美尼亞文", + "Avst": "阿維斯陀文", + "Bali": "峇里文", + "Bamu": "巴姆穆文", + "Bass": "å·´è–©æ–‡", + "Batk": "巴塔克文", + "Beng": "孟加拉文", + "Blis": "布列斯文", + "Bopo": "注音符號", + "Brah": "婆羅米文", + "Brai": "盲人用點字", + "Bugi": "å¸ƒå‰æ–¯æ–‡", + "Buhd": "布希德文", + "Cakm": "查克馬文", + "Cans": "åŠ æ‹¿å¤§åŽŸä½æ°‘通用字符", + "Cari": "å¡é‡Œäºžæ–‡", + "Cham": "å æ–‡", + "Cher": "柴羅基文", + "Cirt": "色斯文", + "Copt": "科普特文", + "Cprt": "塞浦路斯文", + "Cyrl": "斯拉夫文", + "Cyrs": "è¥¿é‡Œçˆ¾æ–‡ï¼ˆå¤æ•™æœƒæ–¯æ‹‰å¤«æ–‡è®Šé«”)", + "Deva": "天城文", + "Dsrt": "德瑟雷特文", + "Dupl": "æœæ™®æ´›ä¼Šé€Ÿè¨˜", + "Egyd": "å¤åŸƒåŠä¸–ä¿—é«”", + "Egyh": "å¤åŸƒåŠåƒ§ä¾¶é«”", + "Egyp": "å¤åŸƒåŠè±¡å½¢æ–‡å­—", + "Elba": "愛爾巴桑文", + "Ethi": "衣索比亞文", + "Geok": "喬治亞語系(阿索他路里和努斯克胡里文)", + "Geor": "喬治亞文", + "Glag": "格拉哥里文", + "Goth": "歌德文", + "Gran": "格蘭他文字", + "Grek": "希臘文", + "Gujr": "å¤å‰æ‹‰ç‰¹æ–‡", + "Guru": "å¤é­¯ç©†å¥‡æ–‡", + "Hanb": "標上注音符號的漢字", + "Hang": "韓文字", + "Hani": "漢字", + "Hano": "哈努諾文", + "Hans": "ç°¡é«”", + "Hant": "ç¹é«”", + "Hebr": "希伯來文", + "Hira": "å¹³å‡å", + "Hluw": "安那托利亞象形文字", + "Hmng": "楊æ¾éŒ„è‹—æ–‡", + "Hrkt": "片å‡å或平å‡å", + "Hung": "å¤åŒˆç‰™åˆ©æ–‡", + "Inds": "å°åº¦æ²³æµåŸŸï¼ˆå“ˆæ‹‰å¸•文)", + "Ital": "夿„大利文", + "Jamo": "韓文字æ¯", + "Java": "爪哇文", + "Jpan": "日文", + "Jurc": "女真文字", + "Kali": "å…‹è€¶æŽæ–‡", + "Kana": "片å‡å", + "Khar": "å¡ç¾…é ˆææ–‡", + "Khmr": "高棉文", + "Khoj": "å…‹å‰å¥‡æ–‡å­—", + "Knda": "åŽé‚£é”æ–‡", + "Kore": "韓文", + "Kpel": "克培列文", + "Kthi": "å‡±ææ–‡", + "Lana": "è—æ‹¿æ–‡", + "Laoo": "寮國文", + "Latf": "æ‹‰ä¸æ–‡ï¼ˆå°–角體活字變體)", + "Latg": "æ‹‰ä¸æ–‡ï¼ˆè“‹çˆ¾èªžè®Šé«”)", + "Latn": "æ‹‰ä¸æ–‡", + "Lepc": "雷布查文", + "Limb": "林佈文", + "Lina": "線性文字(A)", + "Linb": "線性文字(B)", + "Lisu": "栗僳文", + "Loma": "洛馬文", + "Lyci": "呂西亞語", + "Lydi": "里底亞語", + "Mand": "曼底安文", + "Mani": "摩尼教文", + "Maya": "瑪雅象形文字", + "Mend": "門德文", + "Merc": "麥羅埃文(曲線字體)", + "Mero": "麥羅埃文", + "Mlym": "馬來亞拉姆文", + "Mong": "è’™å¤æ–‡", + "Moon": "è’™æ°é»žå­—", + "Mroo": "謬文", + "Mtei": "曼尼普爾文", + "Mymr": "緬甸文", + "Narb": "å¤åŒ—阿拉伯文", + "Nbat": "ç´å·´æ³°æ–‡å­—", + "Nkgb": "ç´è¥¿æ ¼å·´æ–‡", + "Nkoo": "è¥¿éžæ›¸é¢èªžè¨€ (N’Ko)", + "Nshu": "女書文字", + "Ogam": "æ­ç”˜æ–‡", + "Olck": "桑塔利文", + "Orkh": "鄂爾渾文", + "Orya": "æ­åˆ©äºžæ–‡", + "Osma": "æ­æ–¯æ›¼äºžæ–‡", + "Palm": "帕米瑞拉文字", + "Perm": "å¤å½¼çˆ¾å§†è«¸æ–‡", + "Phag": "å…«æ€å·´æ–‡", + "Phli": "巴列維文(碑銘體)", + "Phlp": "巴列維文(è–詩體)", + "Phlv": "巴列維文(書體)", + "Phnx": "腓尼基文", + "Plrd": "æŸæ ¼ç†æ‹¼éŸ³ç¬¦", + "Prti": "帕æäºžæ–‡ï¼ˆç¢‘銘體)", + "Rjng": "拉讓文", + "Roro": "朗格朗格象形文", + "Runr": "å¤åŒ—æ­æ–‡å­—", + "Samr": "撒馬利亞文", + "Sara": "沙拉堤文", + "Sarb": "å¤å—阿拉伯文", + "Saur": "索拉什特拉文", + "Sgnw": "手語書寫符號", + "Shaw": "ç°«æŸç´å­—符", + "Shrd": "夿‹‰é”æ–‡", + "Sidd": "悉曇文字", + "Sind": "ä¿¡å¾·æ–‡", + "Sinh": "錫蘭文", + "Sora": "索朗桑朋文字", + "Sund": "巽他文", + "Sylo": "å¸Œæ´›å¼Ÿç´æ ¼é‡Œæ–‡", + "Syrc": "æ•利亞文", + "Syre": "敘利亞文(ç¦éŸ³é«”文字變體)", + "Syrj": "敘利亞文(西方文字變體)", + "Syrn": "æ•˜åˆ©äºžæ–‡ï¼ˆæ±æ–¹æ–‡å­—變體)", + "Tagb": "å—å³¶æ–‡", + "Takr": "å¡”å¡é‡Œæ–‡å­—", + "Tale": "傣哪文", + "Talu": "è¥¿é›™ç‰ˆç´æ–°å‚£æ–‡", + "Taml": "å¦ç±³çˆ¾æ–‡", + "Tang": "è¥¿å¤æ–‡", + "Tavt": "傣擔文", + "Telu": "泰盧固文", + "Teng": "談格瓦文", + "Tfng": "æéžç´æ–‡", + "Tglg": "塔加拉文", + "Thaa": "塔安那文", + "Thai": "æ³°æ–‡", + "Tibt": "è¥¿è—æ–‡", + "Tirh": "é‚蒂利文", + "Ugar": "çƒåŠ åˆ—æ–‡", + "Vaii": "ç“¦ä¾æ–‡", + "Visp": "視覺語音文字", + "Wara": "瓦郎奇蒂文字", + "Wole": "沃雷艾文", + "Xpeo": "夿³¢æ–¯æ–‡", + "Xsux": "蘇米魯亞甲文楔形文字", + "Yiii": "彞文", + "Zinh": "繼承文字(Unicode)", + "Zmth": "數學符號", + "Zsye": "表情符號", + "Zsym": "符號", + "Zxxx": "éžæ›¸å¯«èªžè¨€", + "Zyyy": "一般文字", + "Zzzz": "未知文字" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zh_Hant_HK.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zh_Hant_HK.json new file mode 100644 index 0000000000000000000000000000000000000000..0e66fedac63be98a11443d4f99e1765815b0081d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zh_Hant_HK.json @@ -0,0 +1,21 @@ +{ + "Version": "2.1.27.99", + "Names": { + "Cyrl": "西里爾文", + "Deva": "梵文", + "Ethi": "埃塞俄比亞文", + "Geor": "格魯å‰äºžæ–‡", + "Guru": "夿œ¨åŸºæ–‡", + "Hans": "簡體字", + "Hant": "ç¹é«”å­—", + "Knda": "åŽç´é”æ–‡", + "Laoo": "è€æ’¾æ–‡", + "Latn": "拉ä¸å­—æ¯", + "Mlym": "馬拉雅拉姆文", + "Orya": "奧里雅文", + "Sinh": "僧伽羅文", + "Taml": "泰米爾文", + "Thaa": "它拿字æ¯", + "Tibt": "è—æ–‡" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zu.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zu.json new file mode 100644 index 0000000000000000000000000000000000000000..b104992cdb609785b80523e9a4866a1f945accf1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/scripts/zu.json @@ -0,0 +1,49 @@ +{ + "Version": "2.1.29.22", + "Names": { + "Arab": "isi-Arabic", + "Armn": "isi-Armenian", + "Beng": "isi-Bangla", + "Bopo": "isi-Bopomofo", + "Brai": "i-Braille", + "Cyrl": "isi-Cyrillic", + "Deva": "isi-Devanagari", + "Ethi": "isi-Ethiopic", + "Geor": "isi-Georgian", + "Grek": "isi-Greek", + "Gujr": "isi-Gujarati", + "Guru": "isi-Gurmukhi", + "Hanb": "isi-Hanb", + "Hang": "isi-Hangul", + "Hani": "isi-Han", + "Hans": "enziwe lula", + "Hant": "okosiko", + "Hebr": "isi-Hebrew", + "Hira": "isi-Hiragana", + "Hrkt": "i-Japanese syllabaries", + "Jamo": "isi-Jamo", + "Jpan": "isi-Japanese", + "Kana": "isi-Katakana", + "Khmr": "isi-Khmer", + "Knda": "isi-Kannada", + "Kore": "isi-Korean", + "Laoo": "isi-Lao", + "Latn": "isi-Latin", + "Mlym": "isi-Malayalam", + "Mong": "isi-Mongolian", + "Mymr": "isi-Myanmar", + "Orya": "isi-Odia", + "Sinh": "isi-Sinhala", + "Taml": "isi-Tamil", + "Telu": "isi-Telugu", + "Thaa": "isi-Thaana", + "Thai": "isi-Thai", + "Tibt": "i-Tibetan", + "Zmth": "i-Mathematical Notation", + "Zsye": "i-Emoji", + "Zsym": "amasimbuli", + "Zxxx": "okungabhaliwe", + "Zyyy": "jwayelekile", + "Zzzz": "iskripthi esingaziwa" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/svn-info.txt b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/svn-info.txt new file mode 100644 index 0000000000000000000000000000000000000000..466469b0a9a22c40a5ca040719aec2fa6960771c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/svn-info.txt @@ -0,0 +1,7 @@ +SVN information +=============== + +URL: http://source.icu-project.org/repos/icu/tags/release-58-2/icu4c/source +Revision: 39531 +Author: yoshito +Date: 2016-12-08T17:34:49.505743Z diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/version.txt b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/version.txt new file mode 100644 index 0000000000000000000000000000000000000000..5132e635a5f89d6ac8443e2cb0f4730452fd0b3e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/data/version.txt @@ -0,0 +1 @@ +58.2 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/Collator.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/Collator.php new file mode 100644 index 0000000000000000000000000000000000000000..1977fdf6173f919a3206af39c008a48c23b880d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/Collator.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Component\Intl\Collator\Collator as IntlCollator; + +/** + * Stub implementation for the Collator class of the intl extension. + * + * @author Bernhard Schussek + */ +class Collator extends IntlCollator +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/IntlDateFormatter.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/IntlDateFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..e5209b62cccd4003e95d71de67677f91efc6fdbe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/IntlDateFormatter.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Component\Intl\DateFormatter\IntlDateFormatter as BaseIntlDateFormatter; + +/** + * Stub implementation for the IntlDateFormatter class of the intl extension. + * + * @author Bernhard Schussek + * + * @see BaseIntlDateFormatter + */ +class IntlDateFormatter extends BaseIntlDateFormatter +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/Locale.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/Locale.php new file mode 100644 index 0000000000000000000000000000000000000000..8a3b89bc3efe71c99c863709cf8e9897d419a72f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/Locale.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Component\Intl\Locale\Locale as IntlLocale; + +/** + * Stub implementation for the Locale class of the intl extension. + * + * @author Bernhard Schussek + * + * @see IntlLocale + */ +class Locale extends IntlLocale +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/NumberFormatter.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/NumberFormatter.php new file mode 100644 index 0000000000000000000000000000000000000000..c8e689b3abbd67522ac54c1789391874743581b8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/NumberFormatter.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Component\Intl\NumberFormatter\NumberFormatter as IntlNumberFormatter; + +/** + * Stub implementation for the NumberFormatter class of the intl extension. + * + * @author Bernhard Schussek + * + * @see IntlNumberFormatter + */ +class NumberFormatter extends IntlNumberFormatter +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3465bb0c1d64e927e3ae5d346666a920342c6c34 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Collator; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Collator\Collator; + +/** + * Test case for Collator implementations. + * + * @author Bernhard Schussek + */ +abstract class AbstractCollatorTest extends TestCase +{ + /** + * @dataProvider asortProvider + */ + public function testAsort($array, $sortFlag, $expected) + { + $collator = $this->getCollator('en'); + $collator->asort($array, $sortFlag); + $this->assertSame($expected, $array); + } + + public function asortProvider() + { + return array( + /* array, sortFlag, expected */ + array( + array('a', 'b', 'c'), + Collator::SORT_REGULAR, + array('a', 'b', 'c'), + ), + array( + array('c', 'b', 'a'), + Collator::SORT_REGULAR, + array(2 => 'a', 1 => 'b', 0 => 'c'), + ), + array( + array('b', 'c', 'a'), + Collator::SORT_REGULAR, + array(2 => 'a', 0 => 'b', 1 => 'c'), + ), + ); + } + + /** + * @param string $locale + * + * @return \Collator + */ + abstract protected function getCollator($locale); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/CollatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/CollatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..840d97532f09cafe24d45f08fb7875a688a14766 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/CollatorTest.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Collator; + +use Symfony\Component\Intl\Collator\Collator; +use Symfony\Component\Intl\Globals\IntlGlobals; + +class CollatorTest extends AbstractCollatorTest +{ + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException + */ + public function testConstructorWithUnsupportedLocale() + { + new Collator('pt_BR'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testCompare() + { + $collator = $this->getCollator('en'); + $collator->compare('a', 'b'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetAttribute() + { + $collator = $this->getCollator('en'); + $collator->getAttribute(Collator::NUMERIC_COLLATION); + } + + public function testGetErrorCode() + { + $collator = $this->getCollator('en'); + $this->assertEquals(IntlGlobals::U_ZERO_ERROR, $collator->getErrorCode()); + } + + public function testGetErrorMessage() + { + $collator = $this->getCollator('en'); + $this->assertEquals('U_ZERO_ERROR', $collator->getErrorMessage()); + } + + public function testGetLocale() + { + $collator = $this->getCollator('en'); + $this->assertEquals('en', $collator->getLocale()); + } + + public function testConstructWithoutLocale() + { + $collator = $this->getCollator(null); + $this->assertInstanceOf('\Symfony\Component\Intl\Collator\Collator', $collator); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetSortKey() + { + $collator = $this->getCollator('en'); + $collator->getSortKey('Hello'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetStrength() + { + $collator = $this->getCollator('en'); + $collator->getStrength(); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testSetAttribute() + { + $collator = $this->getCollator('en'); + $collator->setAttribute(Collator::NUMERIC_COLLATION, Collator::ON); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testSetStrength() + { + $collator = $this->getCollator('en'); + $collator->setStrength(Collator::PRIMARY); + } + + public function testStaticCreate() + { + $collator = Collator::create('en'); + $this->assertInstanceOf('\Symfony\Component\Intl\Collator\Collator', $collator); + } + + protected function getCollator($locale) + { + return new Collator($locale); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/Verification/CollatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/Verification/CollatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..378463cac854e983246c516c0042cbad8ec2df73 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Collator/Verification/CollatorTest.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\Component\Intl\Tests\Collator\Verification; + +use Symfony\Component\Intl\Tests\Collator\AbstractCollatorTest; +use Symfony\Component\Intl\Util\IntlTestHelper; + +/** + * Verifies that {@link AbstractCollatorTest} matches the behavior of the + * {@link \Collator} class in a specific version of ICU. + * + * @author Bernhard Schussek + */ +class CollatorTest extends AbstractCollatorTest +{ + protected function setUp() + { + IntlTestHelper::requireFullIntl($this, false); + + parent::setUp(); + } + + protected function getCollator($locale) + { + return new \Collator($locale); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d76e2ab39af415083e01d689c47a7568b28a9dad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php @@ -0,0 +1,366 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Bundle\Reader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Exception\ResourceBundleNotFoundException; +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReader; + +/** + * @author Bernhard Schussek + */ +class BundleEntryReaderTest extends TestCase +{ + const RES_DIR = '/res/dir'; + + /** + * @var BundleEntryReader + */ + private $reader; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $readerImpl; + + private static $data = array( + 'Entries' => array( + 'Foo' => 'Bar', + 'Bar' => 'Baz', + ), + 'Foo' => 'Bar', + 'Version' => '2.0', + ); + + private static $fallbackData = array( + 'Entries' => array( + 'Foo' => 'Foo', + 'Bam' => 'Lah', + ), + 'Baz' => 'Foo', + 'Version' => '1.0', + ); + + private static $mergedData = array( + // no recursive merging -> too complicated + 'Entries' => array( + 'Foo' => 'Bar', + 'Bar' => 'Baz', + ), + 'Baz' => 'Foo', + 'Version' => '2.0', + 'Foo' => 'Bar', + ); + + protected function setUp() + { + $this->readerImpl = $this->getMockBuilder('Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface')->getMock(); + $this->reader = new BundleEntryReader($this->readerImpl); + } + + public function testForwardCallToRead() + { + $this->readerImpl->expects($this->once()) + ->method('read') + ->with(self::RES_DIR, 'root') + ->will($this->returnValue(self::$data)); + + $this->assertSame(self::$data, $this->reader->read(self::RES_DIR, 'root')); + } + + public function testReadEntireDataFileIfNoIndicesGiven() + { + $this->readerImpl->expects($this->at(0)) + ->method('read') + ->with(self::RES_DIR, 'en') + ->will($this->returnValue(self::$data)); + + $this->readerImpl->expects($this->at(1)) + ->method('read') + ->with(self::RES_DIR, 'root') + ->will($this->returnValue(self::$fallbackData)); + + $this->assertSame(self::$mergedData, $this->reader->readEntry(self::RES_DIR, 'en', array())); + } + + public function testReadExistingEntry() + { + $this->readerImpl->expects($this->once()) + ->method('read') + ->with(self::RES_DIR, 'root') + ->will($this->returnValue(self::$data)); + + $this->assertSame('Bar', $this->reader->readEntry(self::RES_DIR, 'root', array('Entries', 'Foo'))); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MissingResourceException + */ + public function testReadNonExistingEntry() + { + $this->readerImpl->expects($this->once()) + ->method('read') + ->with(self::RES_DIR, 'root') + ->will($this->returnValue(self::$data)); + + $this->reader->readEntry(self::RES_DIR, 'root', array('Entries', 'NonExisting')); + } + + public function testFallbackIfEntryDoesNotExist() + { + $this->readerImpl->expects($this->at(0)) + ->method('read') + ->with(self::RES_DIR, 'en_GB') + ->will($this->returnValue(self::$data)); + + $this->readerImpl->expects($this->at(1)) + ->method('read') + ->with(self::RES_DIR, 'en') + ->will($this->returnValue(self::$fallbackData)); + + $this->assertSame('Lah', $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Entries', 'Bam'))); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MissingResourceException + */ + public function testDontFallbackIfEntryDoesNotExistAndFallbackDisabled() + { + $this->readerImpl->expects($this->once()) + ->method('read') + ->with(self::RES_DIR, 'en_GB') + ->will($this->returnValue(self::$data)); + + $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Entries', 'Bam'), false); + } + + public function testFallbackIfLocaleDoesNotExist() + { + $this->readerImpl->expects($this->at(0)) + ->method('read') + ->with(self::RES_DIR, 'en_GB') + ->will($this->throwException(new ResourceBundleNotFoundException())); + + $this->readerImpl->expects($this->at(1)) + ->method('read') + ->with(self::RES_DIR, 'en') + ->will($this->returnValue(self::$fallbackData)); + + $this->assertSame('Lah', $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Entries', 'Bam'))); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MissingResourceException + */ + public function testDontFallbackIfLocaleDoesNotExistAndFallbackDisabled() + { + $this->readerImpl->expects($this->once()) + ->method('read') + ->with(self::RES_DIR, 'en_GB') + ->will($this->throwException(new ResourceBundleNotFoundException())); + + $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Entries', 'Bam'), false); + } + + public function provideMergeableValues() + { + return array( + array('foo', null, 'foo'), + array(null, 'foo', 'foo'), + array(array('foo', 'bar'), null, array('foo', 'bar')), + array(array('foo', 'bar'), array(), array('foo', 'bar')), + array(null, array('baz'), array('baz')), + array(array(), array('baz'), array('baz')), + array(array('foo', 'bar'), array('baz'), array('baz', 'foo', 'bar')), + ); + } + + /** + * @dataProvider provideMergeableValues + */ + public function testMergeDataWithFallbackData($childData, $parentData, $result) + { + if (null === $childData || is_array($childData)) { + $this->readerImpl->expects($this->at(0)) + ->method('read') + ->with(self::RES_DIR, 'en') + ->will($this->returnValue($childData)); + + $this->readerImpl->expects($this->at(1)) + ->method('read') + ->with(self::RES_DIR, 'root') + ->will($this->returnValue($parentData)); + } else { + $this->readerImpl->expects($this->once()) + ->method('read') + ->with(self::RES_DIR, 'en') + ->will($this->returnValue($childData)); + } + + $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en', array(), true)); + } + + /** + * @dataProvider provideMergeableValues + */ + public function testDontMergeDataIfFallbackDisabled($childData, $parentData, $result) + { + $this->readerImpl->expects($this->once()) + ->method('read') + ->with(self::RES_DIR, 'en_GB') + ->will($this->returnValue($childData)); + + $this->assertSame($childData, $this->reader->readEntry(self::RES_DIR, 'en_GB', array(), false)); + } + + /** + * @dataProvider provideMergeableValues + */ + public function testMergeExistingEntryWithExistingFallbackEntry($childData, $parentData, $result) + { + if (null === $childData || is_array($childData)) { + $this->readerImpl->expects($this->at(0)) + ->method('read') + ->with(self::RES_DIR, 'en') + ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + + $this->readerImpl->expects($this->at(1)) + ->method('read') + ->with(self::RES_DIR, 'root') + ->will($this->returnValue(array('Foo' => array('Bar' => $parentData)))); + } else { + $this->readerImpl->expects($this->once()) + ->method('read') + ->with(self::RES_DIR, 'en') + ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + } + + $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en', array('Foo', 'Bar'), true)); + } + + /** + * @dataProvider provideMergeableValues + */ + public function testMergeNonExistingEntryWithExistingFallbackEntry($childData, $parentData, $result) + { + $this->readerImpl->expects($this->at(0)) + ->method('read') + ->with(self::RES_DIR, 'en_GB') + ->will($this->returnValue(array('Foo' => 'Baz'))); + + $this->readerImpl->expects($this->at(1)) + ->method('read') + ->with(self::RES_DIR, 'en') + ->will($this->returnValue(array('Foo' => array('Bar' => $parentData)))); + + $this->assertSame($parentData, $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Foo', 'Bar'), true)); + } + + /** + * @dataProvider provideMergeableValues + */ + public function testMergeExistingEntryWithNonExistingFallbackEntry($childData, $parentData, $result) + { + if (null === $childData || is_array($childData)) { + $this->readerImpl->expects($this->at(0)) + ->method('read') + ->with(self::RES_DIR, 'en_GB') + ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + + $this->readerImpl->expects($this->at(1)) + ->method('read') + ->with(self::RES_DIR, 'en') + ->will($this->returnValue(array('Foo' => 'Bar'))); + } else { + $this->readerImpl->expects($this->once()) + ->method('read') + ->with(self::RES_DIR, 'en_GB') + ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + } + + $this->assertSame($childData, $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Foo', 'Bar'), true)); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MissingResourceException + */ + public function testFailIfEntryFoundNeitherInParentNorChild() + { + $this->readerImpl->expects($this->at(0)) + ->method('read') + ->with(self::RES_DIR, 'en_GB') + ->will($this->returnValue(array('Foo' => 'Baz'))); + + $this->readerImpl->expects($this->at(1)) + ->method('read') + ->with(self::RES_DIR, 'en') + ->will($this->returnValue(array('Foo' => 'Bar'))); + + $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Foo', 'Bar'), true); + } + + /** + * @dataProvider provideMergeableValues + */ + public function testMergeTraversables($childData, $parentData, $result) + { + $parentData = is_array($parentData) ? new \ArrayObject($parentData) : $parentData; + $childData = is_array($childData) ? new \ArrayObject($childData) : $childData; + + if (null === $childData || $childData instanceof \ArrayObject) { + $this->readerImpl->expects($this->at(0)) + ->method('read') + ->with(self::RES_DIR, 'en_GB') + ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + + $this->readerImpl->expects($this->at(1)) + ->method('read') + ->with(self::RES_DIR, 'en') + ->will($this->returnValue(array('Foo' => array('Bar' => $parentData)))); + } else { + $this->readerImpl->expects($this->once()) + ->method('read') + ->with(self::RES_DIR, 'en_GB') + ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + } + + $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en_GB', array('Foo', 'Bar'), true)); + } + + /** + * @dataProvider provideMergeableValues + */ + public function testFollowLocaleAliases($childData, $parentData, $result) + { + $this->reader->setLocaleAliases(array('mo' => 'ro_MD')); + + if (null === $childData || is_array($childData)) { + $this->readerImpl->expects($this->at(0)) + ->method('read') + ->with(self::RES_DIR, 'ro_MD') + ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + + // Read fallback locale of aliased locale ("ro_MD" -> "ro") + $this->readerImpl->expects($this->at(1)) + ->method('read') + ->with(self::RES_DIR, 'ro') + ->will($this->returnValue(array('Foo' => array('Bar' => $parentData)))); + } else { + $this->readerImpl->expects($this->once()) + ->method('read') + ->with(self::RES_DIR, 'ro_MD') + ->will($this->returnValue(array('Foo' => array('Bar' => $childData)))); + } + + $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'mo', array('Foo', 'Bar'), true)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/NotAFile/en.php/.gitkeep b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/NotAFile/en.php/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/build.sh b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/build.sh new file mode 100755 index 0000000000000000000000000000000000000000..50513e7a946c383439acd857c1c6ec4343444b84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -z "$ICU_BUILD_DIR" ]; then + echo "Please set the ICU_BUILD_DIR environment variable" + exit +fi + +if [ ! -d "$ICU_BUILD_DIR" ]; then + echo "The directory $ICU_BUILD_DIR pointed at by ICU_BUILD_DIR does not exist" + exit +fi + +DIR=`dirname $0` + +rm $DIR/res/*.res + +LD_LIBRARY_PATH=$ICU_BUILD_DIR/lib $ICU_BUILD_DIR/bin/genrb -d $DIR/res $DIR/txt/*.txt diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.php new file mode 100644 index 0000000000000000000000000000000000000000..f2b06a91ad32e8a33bfb9f7bf53eaa06ac14a32f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'Foo' => 'Bar', +); diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.res b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.res new file mode 100644 index 0000000000000000000000000000000000000000..c78e9045bf2b5a8a8cd8e71fad2c34c93d0581c3 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.res differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.txt b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.txt new file mode 100644 index 0000000000000000000000000000000000000000..c788e996acb1db13391552408cbc4fc1084596c8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.txt @@ -0,0 +1,3 @@ +en{ + Foo{"Bar"} +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/json/en.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/json/en.json new file mode 100644 index 0000000000000000000000000000000000000000..16ea32adf74ae4ba99a7f37ead33908e12fe347e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/json/en.json @@ -0,0 +1 @@ +{"Foo":"Bar"} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/json/en_Invalid.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/json/en_Invalid.json new file mode 100644 index 0000000000000000000000000000000000000000..d5f7e14098287937ea7878b48e3d0360af7fe9c8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/json/en_Invalid.json @@ -0,0 +1 @@ +{"Foobar"} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/php/en.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/php/en.php new file mode 100644 index 0000000000000000000000000000000000000000..f2b06a91ad32e8a33bfb9f7bf53eaa06ac14a32f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/php/en.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'Foo' => 'Bar', +); diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/alias.res b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/alias.res new file mode 100644 index 0000000000000000000000000000000000000000..4f0ab7eaa316685f0bf153446f37aeb0221fdd10 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/alias.res differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/mo.res b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/mo.res new file mode 100644 index 0000000000000000000000000000000000000000..3f8911a7317ed2f6e19b291c131ca68bb7f7cad1 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/mo.res differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/ro.res b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/ro.res new file mode 100644 index 0000000000000000000000000000000000000000..c78e9045bf2b5a8a8cd8e71fad2c34c93d0581c3 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/ro.res differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/ro_MD.res b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/ro_MD.res new file mode 100644 index 0000000000000000000000000000000000000000..c8b0810ec6b4890a593b52713aa4232cc3286d94 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/ro_MD.res differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/root.res b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/root.res new file mode 100644 index 0000000000000000000000000000000000000000..81ba7eaedb0f082b1de3b3f618fc112d7392acef Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/root.res differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/alias.txt b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/alias.txt new file mode 100644 index 0000000000000000000000000000000000000000..d6e216f4cbc08225af0d974c8c2ee4eb5553bd8a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/alias.txt @@ -0,0 +1,3 @@ +alias{ + "%%ALIAS"{"ro"} +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/mo.txt b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/mo.txt new file mode 100644 index 0000000000000000000000000000000000000000..3ce23bcc639d5c0d374dffad8b0ab89b8bf9fe37 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/mo.txt @@ -0,0 +1,3 @@ +mo{ + "%%ALIAS"{"ro_MD"} +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/ro.txt b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/ro.txt new file mode 100644 index 0000000000000000000000000000000000000000..80d28889cf39180563df50b6384956cef3b26863 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/ro.txt @@ -0,0 +1,3 @@ +ro{ + Foo{"Bar"} +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/ro_MD.txt b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/ro_MD.txt new file mode 100644 index 0000000000000000000000000000000000000000..fcbb3bc07d5385638d1182f8da547ca65e6aea18 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/ro_MD.txt @@ -0,0 +1,3 @@ +ro_MD{ + Baz{"Bam"} +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/root.txt b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/root.txt new file mode 100644 index 0000000000000000000000000000000000000000..4d8265997f712401a9edc8388e258513d51ec537 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/root.txt @@ -0,0 +1,6 @@ +root{ + /** + * so genrb doesn't issue warnings + */ + ___{""} +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cfffd2b7cc0d8a767512108dd01760bec76a9fc7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Bundle\Reader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Data\Bundle\Reader\IntlBundleReader; + +/** + * @author Bernhard Schussek + * @requires extension intl + */ +class IntlBundleReaderTest extends TestCase +{ + /** + * @var IntlBundleReader + */ + private $reader; + + protected function setUp() + { + $this->reader = new IntlBundleReader(); + } + + public function testReadReturnsArrayAccess() + { + $data = $this->reader->read(__DIR__.'/Fixtures/res', 'ro'); + + $this->assertInstanceOf('\ArrayAccess', $data); + $this->assertSame('Bar', $data['Foo']); + $this->assertFalse(isset($data['ExistsNot'])); + } + + public function testReadFollowsAlias() + { + // "alias" = "ro" + $data = $this->reader->read(__DIR__.'/Fixtures/res', 'alias'); + + $this->assertInstanceOf('\ArrayAccess', $data); + $this->assertSame('Bar', $data['Foo']); + $this->assertFalse(isset($data['ExistsNot'])); + } + + public function testReadDoesNotFollowFallback() + { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('ResourceBundle does not support disabling fallback properly on HHVM.'); + } + + // "ro_MD" -> "ro" + $data = $this->reader->read(__DIR__.'/Fixtures/res', 'ro_MD'); + + $this->assertInstanceOf('\ArrayAccess', $data); + $this->assertSame('Bam', $data['Baz']); + $this->assertFalse(isset($data['Foo'])); + $this->assertNull($data['Foo']); + $this->assertFalse(isset($data['ExistsNot'])); + } + + public function testReadDoesNotFollowFallbackAlias() + { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('ResourceBundle does not support disabling fallback properly on HHVM.'); + } + + // "mo" = "ro_MD" -> "ro" + $data = $this->reader->read(__DIR__.'/Fixtures/res', 'mo'); + + $this->assertInstanceOf('\ArrayAccess', $data); + $this->assertSame('Bam', $data['Baz'], 'data from the aliased locale can be accessed'); + $this->assertFalse(isset($data['Foo'])); + $this->assertNull($data['Foo']); + $this->assertFalse(isset($data['ExistsNot'])); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\ResourceBundleNotFoundException + */ + public function testReadFailsIfNonExistingLocale() + { + $this->reader->read(__DIR__.'/Fixtures/res', 'foo'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\ResourceBundleNotFoundException + */ + public function testReadFailsIfNonExistingFallbackLocale() + { + $this->reader->read(__DIR__.'/Fixtures/res', 'ro_AT'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\RuntimeException + */ + public function testReadFailsIfNonExistingDirectory() + { + $this->reader->read(__DIR__.'/foo', 'ro'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a8ccabe07bb75459b2942ba8d6a8015aa30e5d78 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Bundle\Reader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Data\Bundle\Reader\JsonBundleReader; + +/** + * @author Bernhard Schussek + */ +class JsonBundleReaderTest extends TestCase +{ + /** + * @var JsonBundleReader + */ + private $reader; + + protected function setUp() + { + $this->reader = new JsonBundleReader(); + } + + public function testReadReturnsArray() + { + $data = $this->reader->read(__DIR__.'/Fixtures/json', 'en'); + + $this->assertInternalType('array', $data); + $this->assertSame('Bar', $data['Foo']); + $this->assertFalse(isset($data['ExistsNot'])); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\ResourceBundleNotFoundException + */ + public function testReadFailsIfNonExistingLocale() + { + $this->reader->read(__DIR__.'/Fixtures/json', 'foo'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\RuntimeException + */ + public function testReadFailsIfNonExistingDirectory() + { + $this->reader->read(__DIR__.'/foo', 'en'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\RuntimeException + */ + public function testReadFailsIfNotAFile() + { + $this->reader->read(__DIR__.'/Fixtures/NotAFile', 'en'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\RuntimeException + */ + public function testReadFailsIfInvalidJson() + { + $this->reader->read(__DIR__.'/Fixtures/json', 'en_Invalid'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..51898cb2be5d0ebe1db094d375716223af5dda3e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Bundle\Reader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Data\Bundle\Reader\PhpBundleReader; + +/** + * @author Bernhard Schussek + */ +class PhpBundleReaderTest extends TestCase +{ + /** + * @var PhpBundleReader + */ + private $reader; + + protected function setUp() + { + $this->reader = new PhpBundleReader(); + } + + public function testReadReturnsArray() + { + $data = $this->reader->read(__DIR__.'/Fixtures/php', 'en'); + + $this->assertInternalType('array', $data); + $this->assertSame('Bar', $data['Foo']); + $this->assertFalse(isset($data['ExistsNot'])); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\ResourceBundleNotFoundException + */ + public function testReadFailsIfNonExistingLocale() + { + $this->reader->read(__DIR__.'/Fixtures/php', 'foo'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\RuntimeException + */ + public function testReadFailsIfNonExistingDirectory() + { + $this->reader->read(__DIR__.'/foo', 'en'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\RuntimeException + */ + public function testReadFailsIfNotAFile() + { + $this->reader->read(__DIR__.'/Fixtures/NotAFile', 'en'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.json new file mode 100644 index 0000000000000000000000000000000000000000..d949ba766847e537783cc2dc7f1314858140f383 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.json @@ -0,0 +1,15 @@ +{ + "Entry1": { + "Array": [ + "foo", + "bar" + ], + "Integer": 5, + "Boolean": false, + "Float": 1.23 + }, + "Entry2": "String", + "Traversable": { + "Foo": "Bar" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.php new file mode 100644 index 0000000000000000000000000000000000000000..b694a0780134250fa606616e995267f39922f657 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.php @@ -0,0 +1,17 @@ + array( + 'Array' => array( + 0 => 'foo', + 1 => 'bar', + ), + 'Integer' => 5, + 'Boolean' => false, + 'Float' => 1.23, + ), + 'Entry2' => 'String', + 'Traversable' => array( + 'Foo' => 'Bar', + ), +); diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.res b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.res new file mode 100644 index 0000000000000000000000000000000000000000..7c1f71eba1be16c117e695bce2cb820d1c587211 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.res differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.txt b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.txt new file mode 100644 index 0000000000000000000000000000000000000000..09c1275fa542171f125cdf2b3355ae91da41ab84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.txt @@ -0,0 +1,39 @@ +en{ + Entry1{ + Array{ + "foo", + "bar", + { + Key{"value"} + }, + } + Integer:int{5} + IntVector:intvector{ + 0, + 1, + 2, + 3, + } + NotAnIntVector{ + 0:int{0} + 2:int{1} + 1:int{2} + 3:int{3} + } + IntVectorWithStringKeys{ + a:int{0} + b:int{1} + c:int{2} + } + TableWithIntKeys{ + 0:int{0} + 1:int{1} + 3:int{3} + } + FalseBoolean{"false"} + TrueBoolean{"true"} + Null{""} + Float{"1.23"} + } + Entry2{"String"} +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en_nofallback.txt b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en_nofallback.txt new file mode 100644 index 0000000000000000000000000000000000000000..85386f2074dc24ae357a661c8d2c53ac2606ed04 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en_nofallback.txt @@ -0,0 +1,3 @@ +en_nofallback:table(nofallback){ + Entry{"Value"} +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/escaped.txt b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/escaped.txt new file mode 100644 index 0000000000000000000000000000000000000000..6669bfdd8306e63531e37fc76b93246d0e3c8c64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/escaped.txt @@ -0,0 +1,4 @@ +escaped{ + "EntryWith:Colon"{"Value"} + "Entry With Spaces"{"Value"} +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.json new file mode 100644 index 0000000000000000000000000000000000000000..4021c1ad90645b80052ba26d7b5d2d4f22a42868 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.json @@ -0,0 +1,5 @@ +{ + "Entry": { + "NestedEntry": "Value" + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.php new file mode 100644 index 0000000000000000000000000000000000000000..24e6465e2080b567133ad99de81aeee8f2fe7fa6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.php @@ -0,0 +1,7 @@ + array( + 'NestedEntry' => 'Value', + ), +); diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.res b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.res new file mode 100644 index 0000000000000000000000000000000000000000..dee03d8cfff6dd6f42dd2f14f2e966e39cb5d165 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.res differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.txt b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.txt new file mode 100644 index 0000000000000000000000000000000000000000..434cbebdb76081ec94c2cc3fde30d9b21689ac14 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.txt @@ -0,0 +1,5 @@ +rb{ + Entry{ + NestedEntry{"Value"} + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d13279c0d649c0fe9b96d207d19f920c53e7065b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Bundle\Writer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Intl\Data\Bundle\Writer\JsonBundleWriter; + +/** + * @author Bernhard Schussek + */ +class JsonBundleWriterTest extends TestCase +{ + /** + * @var JsonBundleWriter + */ + private $writer; + + private $directory; + + /** + * @var Filesystem + */ + private $filesystem; + + protected function setUp() + { + $this->writer = new JsonBundleWriter(); + $this->directory = sys_get_temp_dir().'/JsonBundleWriterTest/'.mt_rand(1000, 9999); + $this->filesystem = new Filesystem(); + + $this->filesystem->mkdir($this->directory); + } + + protected function tearDown() + { + $this->filesystem->remove($this->directory); + } + + public function testWrite() + { + $this->writer->write($this->directory, 'en', array( + 'Entry1' => array( + 'Array' => array('foo', 'bar'), + 'Integer' => 5, + 'Boolean' => false, + 'Float' => 1.23, + ), + 'Entry2' => 'String', + 'Traversable' => new \ArrayIterator(array( + 'Foo' => 'Bar', + )), + )); + + $this->assertFileEquals(__DIR__.'/Fixtures/en.json', $this->directory.'/en.json'); + } + + /** + * @requires extension intl + */ + public function testWriteResourceBundle() + { + $bundle = new \ResourceBundle('rb', __DIR__.'/Fixtures', false); + + $this->writer->write($this->directory, 'en', $bundle); + + $this->assertFileEquals(__DIR__.'/Fixtures/rb.json', $this->directory.'/en.json'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e1b8f6741382589d3bc2c7c3ffa6bb2a4ab96fe6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Bundle\Writer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Intl\Data\Bundle\Writer\PhpBundleWriter; + +/** + * @author Bernhard Schussek + */ +class PhpBundleWriterTest extends TestCase +{ + /** + * @var PhpBundleWriter + */ + private $writer; + + private $directory; + + /** + * @var Filesystem + */ + private $filesystem; + + protected function setUp() + { + $this->writer = new PhpBundleWriter(); + $this->directory = sys_get_temp_dir().'/PhpBundleWriterTest/'.mt_rand(1000, 9999); + $this->filesystem = new Filesystem(); + + $this->filesystem->mkdir($this->directory); + } + + protected function tearDown() + { + $this->filesystem->remove($this->directory); + } + + public function testWrite() + { + $this->writer->write($this->directory, 'en', array( + 'Entry1' => array( + 'Array' => array('foo', 'bar'), + 'Integer' => 5, + 'Boolean' => false, + 'Float' => 1.23, + ), + 'Entry2' => 'String', + 'Traversable' => new \ArrayIterator(array( + 'Foo' => 'Bar', + )), + )); + + $this->assertFileEquals(__DIR__.'/Fixtures/en.php', $this->directory.'/en.php'); + } + + /** + * @requires extension intl + */ + public function testWriteResourceBundle() + { + $bundle = new \ResourceBundle('rb', __DIR__.'/Fixtures', false); + + $this->writer->write($this->directory, 'en', $bundle); + + $this->assertFileEquals(__DIR__.'/Fixtures/rb.php', $this->directory.'/en.php'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/TextBundleWriterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/TextBundleWriterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4908f2837026e24efeb1d503404561190fd47771 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/TextBundleWriterTest.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Bundle\Writer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Intl\Data\Bundle\Writer\TextBundleWriter; + +/** + * @author Bernhard Schussek + * + * @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt + */ +class TextBundleWriterTest extends TestCase +{ + /** + * @var TextBundleWriter + */ + private $writer; + + private $directory; + + /** + * @var Filesystem + */ + private $filesystem; + + protected function setUp() + { + $this->writer = new TextBundleWriter(); + $this->directory = sys_get_temp_dir().'/TextBundleWriterTest/'.mt_rand(1000, 9999); + $this->filesystem = new Filesystem(); + + $this->filesystem->mkdir($this->directory); + } + + protected function tearDown() + { + $this->filesystem->remove($this->directory); + } + + public function testWrite() + { + $this->writer->write($this->directory, 'en', array( + 'Entry1' => array( + 'Array' => array('foo', 'bar', array('Key' => 'value')), + 'Integer' => 5, + 'IntVector' => array(0, 1, 2, 3), + 'NotAnIntVector' => array(0 => 0, 2 => 1, 1 => 2, 3 => 3), + 'IntVectorWithStringKeys' => array('a' => 0, 'b' => 1, 'c' => 2), + 'TableWithIntKeys' => array(0 => 0, 1 => 1, 3 => 3), + 'FalseBoolean' => false, + 'TrueBoolean' => true, + 'Null' => null, + 'Float' => 1.23, + ), + 'Entry2' => 'String', + )); + + $this->assertFileEquals(__DIR__.'/Fixtures/en.txt', $this->directory.'/en.txt'); + } + + public function testWriteTraversable() + { + $this->writer->write($this->directory, 'en', new \ArrayIterator(array( + 'Entry1' => new \ArrayIterator(array( + 'Array' => array('foo', 'bar', array('Key' => 'value')), + 'Integer' => 5, + 'IntVector' => array(0, 1, 2, 3), + 'NotAnIntVector' => array(0 => 0, 2 => 1, 1 => 2, 3 => 3), + 'IntVectorWithStringKeys' => array('a' => 0, 'b' => 1, 'c' => 2), + 'TableWithIntKeys' => array(0 => 0, 1 => 1, 3 => 3), + 'FalseBoolean' => false, + 'TrueBoolean' => true, + 'Null' => null, + 'Float' => 1.23, + )), + 'Entry2' => 'String', + ))); + + $this->assertFileEquals(__DIR__.'/Fixtures/en.txt', $this->directory.'/en.txt'); + } + + public function testWriteNoFallback() + { + $data = array( + 'Entry' => 'Value', + ); + + $this->writer->write($this->directory, 'en_nofallback', $data, $fallback = false); + + $this->assertFileEquals(__DIR__.'/Fixtures/en_nofallback.txt', $this->directory.'/en_nofallback.txt'); + } + + public function testEscapeKeysIfNecessary() + { + $this->writer->write($this->directory, 'escaped', array( + // Keys with colons must be escaped, otherwise the part after the + // colon is interpreted as resource type + 'EntryWith:Colon' => 'Value', + // Keys with spaces must be escaped + 'Entry With Spaces' => 'Value', + )); + + $this->assertFileEquals(__DIR__.'/Fixtures/escaped.txt', $this->directory.'/escaped.txt'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3e71ed78a4234021130f6f160d370370f402f0d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php @@ -0,0 +1,782 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Provider; + +use Symfony\Component\Intl\Data\Provider\CurrencyDataProvider; +use Symfony\Component\Intl\Intl; +use Symfony\Component\Intl\Locale; + +/** + * @author Bernhard Schussek + */ +abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest +{ + // The below arrays document the state of the ICU data bundled with this package. + + protected static $currencies = array( + 'ADP', + 'AED', + 'AFA', + 'AFN', + 'ALK', + 'ALL', + 'AMD', + 'ANG', + 'AOA', + 'AOK', + 'AON', + 'AOR', + 'ARA', + 'ARL', + 'ARM', + 'ARP', + 'ARS', + 'ATS', + 'AUD', + 'AWG', + 'AZM', + 'AZN', + 'BAD', + 'BAM', + 'BAN', + 'BBD', + 'BDT', + 'BEC', + 'BEF', + 'BEL', + 'BGL', + 'BGM', + 'BGN', + 'BGO', + 'BHD', + 'BIF', + 'BMD', + 'BND', + 'BOB', + 'BOL', + 'BOP', + 'BOV', + 'BRB', + 'BRC', + 'BRE', + 'BRL', + 'BRN', + 'BRR', + 'BRZ', + 'BSD', + 'BTN', + 'BUK', + 'BWP', + 'BYB', + 'BYR', + 'BZD', + 'CAD', + 'CDF', + 'CHE', + 'CHF', + 'CHW', + 'CLE', + 'CLF', + 'CLP', + 'CNX', + 'CNY', + 'COP', + 'COU', + 'CRC', + 'CSD', + 'CSK', + 'CUC', + 'CUP', + 'CVE', + 'CYP', + 'CZK', + 'DDM', + 'DEM', + 'DJF', + 'DKK', + 'DOP', + 'DZD', + 'ECS', + 'ECV', + 'EEK', + 'EGP', + 'ERN', + 'ESA', + 'ESB', + 'ESP', + 'ETB', + 'EUR', + 'FIM', + 'FJD', + 'FKP', + 'FRF', + 'GBP', + 'GEK', + 'GEL', + 'GHC', + 'GHS', + 'GIP', + 'GMD', + 'GNF', + 'GNS', + 'GQE', + 'GRD', + 'GTQ', + 'GWE', + 'GWP', + 'GYD', + 'HKD', + 'HNL', + 'HRD', + 'HRK', + 'HTG', + 'HUF', + 'IDR', + 'IEP', + 'ILP', + 'ILR', + 'ILS', + 'INR', + 'IQD', + 'IRR', + 'ISJ', + 'ISK', + 'ITL', + 'JMD', + 'JOD', + 'JPY', + 'KES', + 'KGS', + 'KHR', + 'KMF', + 'KPW', + 'KRH', + 'KRO', + 'KRW', + 'KWD', + 'KYD', + 'KZT', + 'LAK', + 'LBP', + 'LKR', + 'LRD', + 'LSL', + 'LTL', + 'LTT', + 'LUC', + 'LUF', + 'LUL', + 'LVL', + 'LVR', + 'LYD', + 'MAD', + 'MAF', + 'MCF', + 'MDC', + 'MDL', + 'MGA', + 'MGF', + 'MKD', + 'MKN', + 'MLF', + 'MMK', + 'MNT', + 'MOP', + 'MRO', + 'MTL', + 'MTP', + 'MUR', + 'MVP', + 'MVR', + 'MWK', + 'MXN', + 'MXP', + 'MXV', + 'MYR', + 'MZE', + 'MZM', + 'MZN', + 'NAD', + 'NGN', + 'NIC', + 'NIO', + 'NLG', + 'NOK', + 'NPR', + 'NZD', + 'OMR', + 'PAB', + 'PEI', + 'PEN', + 'PES', + 'PGK', + 'PHP', + 'PKR', + 'PLN', + 'PLZ', + 'PTE', + 'PYG', + 'QAR', + 'RHD', + 'ROL', + 'RON', + 'RSD', + 'RUB', + 'RUR', + 'RWF', + 'SAR', + 'SBD', + 'SCR', + 'SDD', + 'SDG', + 'SDP', + 'SEK', + 'SGD', + 'SHP', + 'SIT', + 'SKK', + 'SLL', + 'SOS', + 'SRD', + 'SRG', + 'SSP', + 'STD', + 'SUR', + 'SVC', + 'SYP', + 'SZL', + 'THB', + 'TJR', + 'TJS', + 'TMM', + 'TMT', + 'TND', + 'TOP', + 'TPE', + 'TRL', + 'TRY', + 'TTD', + 'TWD', + 'TZS', + 'UAH', + 'UAK', + 'UGS', + 'UGX', + 'USD', + 'USN', + 'USS', + 'UYI', + 'UYP', + 'UYU', + 'UZS', + 'VEB', + 'VEF', + 'VND', + 'VNN', + 'VUV', + 'WST', + 'XAF', + 'XCD', + 'XEU', + 'XFO', + 'XFU', + 'XOF', + 'XPF', + 'XRE', + 'YDD', + 'YER', + 'YUD', + 'YUM', + 'YUN', + 'YUR', + 'ZAL', + 'ZAR', + 'ZMK', + 'ZMW', + 'ZRN', + 'ZRZ', + 'ZWD', + 'ZWL', + 'ZWR', + ); + + protected static $alpha3ToNumeric = array( + 'ADP' => 20, + 'AED' => 784, + 'AFA' => 4, + 'AFN' => 971, + 'ALL' => 8, + 'AMD' => 51, + 'ANG' => 532, + 'AOA' => 973, + 'AON' => 24, + 'AOR' => 982, + 'ARA' => 32, + 'ARP' => 32, + 'ARS' => 32, + 'ATS' => 40, + 'AUD' => 36, + 'AWG' => 533, + 'AZM' => 31, + 'AZN' => 944, + 'BAD' => 70, + 'BAM' => 977, + 'BBD' => 52, + 'BDT' => 50, + 'BEC' => 993, + 'BEF' => 56, + 'BEL' => 992, + 'BGL' => 100, + 'BGN' => 975, + 'BHD' => 48, + 'BIF' => 108, + 'BMD' => 60, + 'BND' => 96, + 'BOB' => 68, + 'BOV' => 984, + 'BRC' => 76, + 'BRE' => 76, + 'BRL' => 986, + 'BRN' => 76, + 'BRR' => 987, + 'BSD' => 44, + 'BTN' => 64, + 'BWP' => 72, + 'BYB' => 112, + 'BYR' => 974, + 'BZD' => 84, + 'CAD' => 124, + 'CDF' => 976, + 'CHE' => 947, + 'CHF' => 756, + 'CHW' => 948, + 'CLF' => 990, + 'CLP' => 152, + 'CNY' => 156, + 'COP' => 170, + 'COU' => 970, + 'CRC' => 188, + 'CSD' => 891, + 'CSK' => 200, + 'CUC' => 931, + 'CUP' => 192, + 'CVE' => 132, + 'CYP' => 196, + 'CZK' => 203, + 'DDM' => 278, + 'DEM' => 276, + 'DJF' => 262, + 'DKK' => 208, + 'DOP' => 214, + 'DZD' => 12, + 'ECS' => 218, + 'ECV' => 983, + 'EEK' => 233, + 'EGP' => 818, + 'ERN' => 232, + 'ESA' => 996, + 'ESB' => 995, + 'ESP' => 724, + 'ETB' => 230, + 'EUR' => 978, + 'FIM' => 246, + 'FJD' => 242, + 'FKP' => 238, + 'FRF' => 250, + 'GBP' => 826, + 'GEK' => 268, + 'GEL' => 981, + 'GHC' => 288, + 'GHS' => 936, + 'GIP' => 292, + 'GMD' => 270, + 'GNF' => 324, + 'GQE' => 226, + 'GRD' => 300, + 'GTQ' => 320, + 'GWP' => 624, + 'GYD' => 328, + 'HKD' => 344, + 'HNL' => 340, + 'HRD' => 191, + 'HRK' => 191, + 'HTG' => 332, + 'HUF' => 348, + 'IDR' => 360, + 'IEP' => 372, + 'ILS' => 376, + 'INR' => 356, + 'IQD' => 368, + 'IRR' => 364, + 'ISK' => 352, + 'ITL' => 380, + 'JMD' => 388, + 'JOD' => 400, + 'JPY' => 392, + 'KES' => 404, + 'KGS' => 417, + 'KHR' => 116, + 'KMF' => 174, + 'KPW' => 408, + 'KRW' => 410, + 'KWD' => 414, + 'KYD' => 136, + 'KZT' => 398, + 'LAK' => 418, + 'LBP' => 422, + 'LKR' => 144, + 'LRD' => 430, + 'LSL' => 426, + 'LTL' => 440, + 'LTT' => 440, + 'LUC' => 989, + 'LUF' => 442, + 'LUL' => 988, + 'LVL' => 428, + 'LVR' => 428, + 'LYD' => 434, + 'MAD' => 504, + 'MDL' => 498, + 'MGA' => 969, + 'MGF' => 450, + 'MKD' => 807, + 'MLF' => 466, + 'MMK' => 104, + 'MNT' => 496, + 'MOP' => 446, + 'MRO' => 478, + 'MTL' => 470, + 'MUR' => 480, + 'MVR' => 462, + 'MWK' => 454, + 'MXN' => 484, + 'MXV' => 979, + 'MYR' => 458, + 'MZM' => 508, + 'MZN' => 943, + 'NAD' => 516, + 'NGN' => 566, + 'NIO' => 558, + 'NLG' => 528, + 'NOK' => 578, + 'NPR' => 524, + 'NZD' => 554, + 'OMR' => 512, + 'PAB' => 590, + 'PEI' => 604, + 'PEN' => 604, + 'PES' => 604, + 'PGK' => 598, + 'PHP' => 608, + 'PKR' => 586, + 'PLN' => 985, + 'PLZ' => 616, + 'PTE' => 620, + 'PYG' => 600, + 'QAR' => 634, + 'ROL' => 642, + 'RON' => 946, + 'RSD' => 941, + 'RUB' => 643, + 'RUR' => 810, + 'RWF' => 646, + 'SAR' => 682, + 'SBD' => 90, + 'SCR' => 690, + 'SDD' => 736, + 'SDG' => 938, + 'SEK' => 752, + 'SGD' => 702, + 'SHP' => 654, + 'SIT' => 705, + 'SKK' => 703, + 'SLL' => 694, + 'SOS' => 706, + 'SRD' => 968, + 'SRG' => 740, + 'SSP' => 728, + 'STD' => 678, + 'SVC' => 222, + 'SYP' => 760, + 'SZL' => 748, + 'THB' => 764, + 'TJR' => 762, + 'TJS' => 972, + 'TMM' => 795, + 'TMT' => 934, + 'TND' => 788, + 'TOP' => 776, + 'TPE' => 626, + 'TRL' => 792, + 'TRY' => 949, + 'TTD' => 780, + 'TWD' => 901, + 'TZS' => 834, + 'UAH' => 980, + 'UAK' => 804, + 'UGX' => 800, + 'USD' => 840, + 'USN' => 997, + 'USS' => 998, + 'UYI' => 940, + 'UYU' => 858, + 'UZS' => 860, + 'VEB' => 862, + 'VEF' => 937, + 'VND' => 704, + 'VUV' => 548, + 'WST' => 882, + 'XAF' => 950, + 'XCD' => 951, + 'XEU' => 954, + 'XOF' => 952, + 'XPF' => 953, + 'YDD' => 720, + 'YER' => 886, + 'YUM' => 891, + 'YUN' => 890, + 'ZAL' => 991, + 'ZAR' => 710, + 'ZMK' => 894, + 'ZMW' => 967, + 'ZRN' => 180, + 'ZRZ' => 180, + 'ZWD' => 716, + 'ZWL' => 932, + 'ZWR' => 935, + ); + + /** + * @var CurrencyDataProvider + */ + protected $dataProvider; + + protected function setUp() + { + parent::setUp(); + + $this->dataProvider = new CurrencyDataProvider( + $this->getDataDirectory().'/'.Intl::CURRENCY_DIR, + $this->createEntryReader() + ); + } + + abstract protected function getDataDirectory(); + + public function testGetCurrencies() + { + $this->assertSame(static::$currencies, $this->dataProvider->getCurrencies()); + } + + /** + * @dataProvider provideLocales + */ + public function testGetNames($displayLocale) + { + $names = $this->dataProvider->getNames($displayLocale); + + $keys = array_keys($names); + + sort($keys); + + $this->assertEquals(static::$currencies, $keys); + + // Names should be sorted + $sortedNames = $names; + $collator = new \Collator($displayLocale); + $collator->asort($names); + + $this->assertSame($sortedNames, $names); + } + + public function testGetNamesDefaultLocale() + { + Locale::setDefault('de_AT'); + + $this->assertSame( + $this->dataProvider->getNames('de_AT'), + $this->dataProvider->getNames() + ); + } + + /** + * @dataProvider provideLocaleAliases + */ + public function testGetNamesSupportsAliases($alias, $ofLocale) + { + // Can't use assertSame(), because some aliases contain scripts with + // different collation (=order of output) than their aliased locale + // e.g. sr_Latn_ME => sr_ME + $this->assertEquals( + $this->dataProvider->getNames($ofLocale), + $this->dataProvider->getNames($alias) + ); + } + + /** + * @dataProvider provideLocales + */ + public function testGetName($displayLocale) + { + $expected = $this->dataProvider->getNames($displayLocale); + $actual = array(); + + foreach ($expected as $currency => $name) { + $actual[$currency] = $this->dataProvider->getName($currency, $displayLocale); + } + + $this->assertSame($expected, $actual); + } + + public function testGetNameDefaultLocale() + { + Locale::setDefault('de_AT'); + + $expected = $this->dataProvider->getNames('de_AT'); + $actual = array(); + + foreach ($expected as $currency => $name) { + $actual[$currency] = $this->dataProvider->getName($currency); + } + + $this->assertSame($expected, $actual); + } + + /** + * @dataProvider provideLocales + */ + public function testGetSymbol($displayLocale) + { + $currencies = $this->dataProvider->getCurrencies(); + + foreach ($currencies as $currency) { + $this->assertGreaterThan(0, mb_strlen($this->dataProvider->getSymbol($currency, $displayLocale))); + } + } + + public function provideCurrencies() + { + return array_map( + function ($currency) { return array($currency); }, + static::$currencies + ); + } + + /** + * @dataProvider provideCurrencies + */ + public function testGetFractionDigits($currency) + { + $this->assertTrue(is_numeric($this->dataProvider->getFractionDigits($currency))); + } + + /** + * @dataProvider provideCurrencies + */ + public function testGetRoundingIncrement($currency) + { + $this->assertTrue(is_numeric($this->dataProvider->getRoundingIncrement($currency))); + } + + public function provideCurrenciesWithNumericEquivalent() + { + return array_map( + function ($value) { return array($value); }, + array_keys(static::$alpha3ToNumeric) + ); + } + + /** + * @dataProvider provideCurrenciesWithNumericEquivalent + */ + public function testGetNumericCode($currency) + { + $this->assertSame(static::$alpha3ToNumeric[$currency], $this->dataProvider->getNumericCode($currency)); + } + + public function provideCurrenciesWithoutNumericEquivalent() + { + return array_map( + function ($value) { return array($value); }, + array_diff(static::$currencies, array_keys(static::$alpha3ToNumeric)) + ); + } + + /** + * @dataProvider provideCurrenciesWithoutNumericEquivalent + * @expectedException \Symfony\Component\Intl\Exception\MissingResourceException + */ + public function testGetNumericCodeFailsIfNoNumericEquivalent($currency) + { + $this->dataProvider->getNumericCode($currency); + } + + public function provideValidNumericCodes() + { + $numericToAlpha3 = $this->getNumericToAlpha3Mapping(); + + return array_map( + function ($numeric, $alpha3) { return array($numeric, $alpha3); }, + array_keys($numericToAlpha3), + $numericToAlpha3 + ); + } + + /** + * @dataProvider provideValidNumericCodes + */ + public function testForNumericCode($numeric, $expected) + { + $actual = $this->dataProvider->forNumericCode($numeric); + + // Make sure that a different array order doesn't break the test + sort($actual); + sort($expected); + + $this->assertEquals($expected, $actual); + } + + public function provideInvalidNumericCodes() + { + $validNumericCodes = array_keys($this->getNumericToAlpha3Mapping()); + $invalidNumericCodes = array_diff(range(0, 1000), $validNumericCodes); + + return array_map( + function ($value) { return array($value); }, + $invalidNumericCodes + ); + } + + /** + * @dataProvider provideInvalidNumericCodes + * @expectedException \Symfony\Component\Intl\Exception\MissingResourceException + */ + public function testForNumericCodeFailsIfInvalidNumericCode($currency) + { + $this->dataProvider->forNumericCode($currency); + } + + private function getNumericToAlpha3Mapping() + { + $numericToAlpha3 = array(); + + foreach (static::$alpha3ToNumeric as $alpha3 => $numeric) { + if (!isset($numericToAlpha3[$numeric])) { + $numericToAlpha3[$numeric] = array(); + } + + $numericToAlpha3[$numeric][] = $alpha3; + } + + return $numericToAlpha3; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e852c1eb34e5760788f7001fc885bd3d478d95ba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php @@ -0,0 +1,854 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Provider; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReader; +use Symfony\Component\Intl\Data\Bundle\Reader\BundleReaderInterface; +use Symfony\Component\Intl\Locale; + +/** + * @author Bernhard Schussek + */ +abstract class AbstractDataProviderTest extends TestCase +{ + // Include the locales statically so that the data providers are decoupled + // from the Intl class. Otherwise tests will fail if the intl extension is + // not loaded, because it is NOT possible to skip the execution of data + // providers. + + private static $locales = array( + 'af', + 'af_NA', + 'af_ZA', + 'agq', + 'agq_CM', + 'ak', + 'ak_GH', + 'am', + 'am_ET', + 'ar', + 'ar_001', + 'ar_AE', + 'ar_BH', + 'ar_DJ', + 'ar_DZ', + 'ar_EG', + 'ar_EH', + 'ar_ER', + 'ar_IL', + 'ar_IQ', + 'ar_JO', + 'ar_KM', + 'ar_KW', + 'ar_LB', + 'ar_LY', + 'ar_MA', + 'ar_MR', + 'ar_OM', + 'ar_PS', + 'ar_QA', + 'ar_SA', + 'ar_SD', + 'ar_SO', + 'ar_SS', + 'ar_SY', + 'ar_TD', + 'ar_TN', + 'ar_YE', + 'as', + 'as_IN', + 'asa', + 'asa_TZ', + 'az', + 'az_AZ', + 'az_Cyrl', + 'az_Cyrl_AZ', + 'az_Latn', + 'az_Latn_AZ', + 'bas', + 'bas_CM', + 'be', + 'be_BY', + 'bem', + 'bem_ZM', + 'bez', + 'bez_TZ', + 'bg', + 'bg_BG', + 'bm', + 'bm_ML', + 'bn', + 'bn_BD', + 'bn_IN', + 'bo', + 'bo_CN', + 'bo_IN', + 'br', + 'br_FR', + 'brx', + 'brx_IN', + 'bs', + 'bs_BA', + 'bs_Cyrl', + 'bs_Cyrl_BA', + 'bs_Latn', + 'bs_Latn_BA', + 'ca', + 'ca_AD', + 'ca_ES', + 'ca_FR', + 'ca_IT', + 'cgg', + 'cgg_UG', + 'chr', + 'chr_US', + 'cs', + 'cs_CZ', + 'cy', + 'cy_GB', + 'da', + 'da_DK', + 'da_GL', + 'dav', + 'dav_KE', + 'de', + 'de_AT', + 'de_BE', + 'de_CH', + 'de_DE', + 'de_LI', + 'de_LU', + 'dje', + 'dje_NE', + 'dua', + 'dua_CM', + 'dyo', + 'dyo_SN', + 'dz', + 'dz_BT', + 'ebu', + 'ebu_KE', + 'ee', + 'ee_GH', + 'ee_TG', + 'el', + 'el_CY', + 'el_GR', + 'en', + 'en_001', + 'en_150', + 'en_AG', + 'en_AI', + 'en_AS', + 'en_AU', + 'en_BB', + 'en_BE', + 'en_BM', + 'en_BS', + 'en_BW', + 'en_BZ', + 'en_CA', + 'en_CC', + 'en_CK', + 'en_CM', + 'en_CX', + 'en_DG', + 'en_DM', + 'en_ER', + 'en_FJ', + 'en_FK', + 'en_FM', + 'en_GB', + 'en_GD', + 'en_GG', + 'en_GH', + 'en_GI', + 'en_GM', + 'en_GU', + 'en_GY', + 'en_HK', + 'en_IE', + 'en_IM', + 'en_IN', + 'en_IO', + 'en_JE', + 'en_JM', + 'en_KE', + 'en_KI', + 'en_KN', + 'en_KY', + 'en_LC', + 'en_LR', + 'en_LS', + 'en_MG', + 'en_MH', + 'en_MO', + 'en_MP', + 'en_MS', + 'en_MT', + 'en_MU', + 'en_MW', + 'en_NA', + 'en_NF', + 'en_NG', + 'en_NH', + 'en_NR', + 'en_NU', + 'en_NZ', + 'en_PG', + 'en_PH', + 'en_PK', + 'en_PN', + 'en_PR', + 'en_PW', + 'en_RH', + 'en_RW', + 'en_SB', + 'en_SC', + 'en_SD', + 'en_SG', + 'en_SH', + 'en_SL', + 'en_SS', + 'en_SX', + 'en_SZ', + 'en_TC', + 'en_TK', + 'en_TO', + 'en_TT', + 'en_TV', + 'en_TZ', + 'en_UG', + 'en_UM', + 'en_US', + 'en_US_POSIX', + 'en_VC', + 'en_VG', + 'en_VI', + 'en_VU', + 'en_WS', + 'en_ZA', + 'en_ZM', + 'en_ZW', + 'eo', + 'es', + 'es_419', + 'es_AR', + 'es_BO', + 'es_CL', + 'es_CO', + 'es_CR', + 'es_CU', + 'es_DO', + 'es_EA', + 'es_EC', + 'es_ES', + 'es_GQ', + 'es_GT', + 'es_HN', + 'es_IC', + 'es_MX', + 'es_NI', + 'es_PA', + 'es_PE', + 'es_PH', + 'es_PR', + 'es_PY', + 'es_SV', + 'es_US', + 'es_UY', + 'es_VE', + 'et', + 'et_EE', + 'eu', + 'eu_ES', + 'ewo', + 'ewo_CM', + 'fa', + 'fa_AF', + 'fa_IR', + 'ff', + 'ff_SN', + 'fi', + 'fi_FI', + 'fil', + 'fil_PH', + 'fo', + 'fo_FO', + 'fr', + 'fr_BE', + 'fr_BF', + 'fr_BI', + 'fr_BJ', + 'fr_BL', + 'fr_CA', + 'fr_CD', + 'fr_CF', + 'fr_CG', + 'fr_CH', + 'fr_CI', + 'fr_CM', + 'fr_DJ', + 'fr_DZ', + 'fr_FR', + 'fr_GA', + 'fr_GF', + 'fr_GN', + 'fr_GP', + 'fr_GQ', + 'fr_HT', + 'fr_KM', + 'fr_LU', + 'fr_MA', + 'fr_MC', + 'fr_MF', + 'fr_MG', + 'fr_ML', + 'fr_MQ', + 'fr_MR', + 'fr_MU', + 'fr_NC', + 'fr_NE', + 'fr_PF', + 'fr_PM', + 'fr_RE', + 'fr_RW', + 'fr_SC', + 'fr_SN', + 'fr_SY', + 'fr_TD', + 'fr_TG', + 'fr_TN', + 'fr_VU', + 'fr_WF', + 'fr_YT', + 'ga', + 'ga_IE', + 'gl', + 'gl_ES', + 'gsw', + 'gsw_CH', + 'gsw_LI', + 'gu', + 'gu_IN', + 'guz', + 'guz_KE', + 'gv', + 'gv_IM', + 'ha', + 'ha_GH', + 'ha_Latn', + 'ha_Latn_GH', + 'ha_Latn_NE', + 'ha_Latn_NG', + 'ha_NE', + 'ha_NG', + 'haw', + 'haw_US', + 'he', + 'he_IL', + 'hi', + 'hi_IN', + 'hr', + 'hr_BA', + 'hr_HR', + 'hu', + 'hu_HU', + 'hy', + 'hy_AM', + 'id', + 'id_ID', + 'ig', + 'ig_NG', + 'ii', + 'ii_CN', + 'in', + 'in_ID', + 'is', + 'is_IS', + 'it', + 'it_CH', + 'it_IT', + 'it_SM', + 'iw', + 'iw_IL', + 'ja', + 'ja_JP', + 'ja_JP_TRADITIONAL', + 'jgo', + 'jgo_CM', + 'jmc', + 'jmc_TZ', + 'ka', + 'ka_GE', + 'kab', + 'kab_DZ', + 'kam', + 'kam_KE', + 'kde', + 'kde_TZ', + 'kea', + 'kea_CV', + 'khq', + 'khq_ML', + 'ki', + 'ki_KE', + 'kk', + 'kk_Cyrl', + 'kk_Cyrl_KZ', + 'kk_KZ', + 'kkj', + 'kkj_CM', + 'kl', + 'kl_GL', + 'kln', + 'kln_KE', + 'km', + 'km_KH', + 'kn', + 'kn_IN', + 'ko', + 'ko_KP', + 'ko_KR', + 'kok', + 'kok_IN', + 'ks', + 'ks_Arab', + 'ks_Arab_IN', + 'ks_IN', + 'ksb', + 'ksb_TZ', + 'ksf', + 'ksf_CM', + 'kw', + 'kw_GB', + 'ky', + 'ky_Cyrl', + 'ky_Cyrl_KG', + 'ky_KG', + 'lag', + 'lag_TZ', + 'lg', + 'lg_UG', + 'lkt', + 'lkt_US', + 'ln', + 'ln_AO', + 'ln_CD', + 'ln_CF', + 'ln_CG', + 'lo', + 'lo_LA', + 'lt', + 'lt_LT', + 'lu', + 'lu_CD', + 'luo', + 'luo_KE', + 'luy', + 'luy_KE', + 'lv', + 'lv_LV', + 'mas', + 'mas_KE', + 'mas_TZ', + 'mer', + 'mer_KE', + 'mfe', + 'mfe_MU', + 'mg', + 'mg_MG', + 'mgh', + 'mgh_MZ', + 'mgo', + 'mgo_CM', + 'mk', + 'mk_MK', + 'ml', + 'ml_IN', + 'mn', + 'mn_Cyrl', + 'mn_Cyrl_MN', + 'mn_MN', + 'mo', + 'mr', + 'mr_IN', + 'ms', + 'ms_BN', + 'ms_Latn', + 'ms_Latn_BN', + 'ms_Latn_MY', + 'ms_Latn_SG', + 'ms_MY', + 'ms_SG', + 'mt', + 'mt_MT', + 'mua', + 'mua_CM', + 'my', + 'my_MM', + 'naq', + 'naq_NA', + 'nb', + 'nb_NO', + 'nb_SJ', + 'nd', + 'nd_ZW', + 'ne', + 'ne_IN', + 'ne_NP', + 'nl', + 'nl_AW', + 'nl_BE', + 'nl_BQ', + 'nl_CW', + 'nl_NL', + 'nl_SR', + 'nl_SX', + 'nmg', + 'nmg_CM', + 'nn', + 'nn_NO', + 'nnh', + 'nnh_CM', + 'no', + 'no_NO', + 'no_NO_NY', + 'nus', + 'nus_SD', + 'nyn', + 'nyn_UG', + 'om', + 'om_ET', + 'om_KE', + 'or', + 'or_IN', + 'pa', + 'pa_Arab', + 'pa_Arab_PK', + 'pa_Guru', + 'pa_Guru_IN', + 'pa_IN', + 'pa_PK', + 'pl', + 'pl_PL', + 'ps', + 'ps_AF', + 'pt', + 'pt_AO', + 'pt_BR', + 'pt_CV', + 'pt_GW', + 'pt_MO', + 'pt_MZ', + 'pt_PT', + 'pt_ST', + 'pt_TL', + 'rm', + 'rm_CH', + 'rn', + 'rn_BI', + 'ro', + 'ro_MD', + 'ro_RO', + 'rof', + 'rof_TZ', + 'ru', + 'ru_BY', + 'ru_KG', + 'ru_KZ', + 'ru_MD', + 'ru_RU', + 'ru_UA', + 'rw', + 'rw_RW', + 'rwk', + 'rwk_TZ', + 'saq', + 'saq_KE', + 'sbp', + 'sbp_TZ', + 'seh', + 'seh_MZ', + 'ses', + 'ses_ML', + 'sg', + 'sg_CF', + 'sh', + 'sh_BA', + 'sh_CS', + 'sh_YU', + 'shi', + 'shi_Latn', + 'shi_Latn_MA', + 'shi_MA', + 'shi_Tfng', + 'shi_Tfng_MA', + 'si', + 'si_LK', + 'sk', + 'sk_SK', + 'sl', + 'sl_SI', + 'sn', + 'sn_ZW', + 'so', + 'so_DJ', + 'so_ET', + 'so_KE', + 'so_SO', + 'sq', + 'sq_AL', + 'sq_MK', + 'sq_XK', + 'sr', + 'sr_BA', + 'sr_CS', + 'sr_Cyrl', + 'sr_Cyrl_BA', + 'sr_Cyrl_CS', + 'sr_Cyrl_ME', + 'sr_Cyrl_RS', + 'sr_Cyrl_XK', + 'sr_Cyrl_YU', + 'sr_Latn', + 'sr_Latn_BA', + 'sr_Latn_CS', + 'sr_Latn_ME', + 'sr_Latn_RS', + 'sr_Latn_XK', + 'sr_Latn_YU', + 'sr_ME', + 'sr_RS', + 'sr_XK', + 'sr_YU', + 'sv', + 'sv_AX', + 'sv_FI', + 'sv_SE', + 'sw', + 'sw_KE', + 'sw_TZ', + 'sw_UG', + 'swc', + 'swc_CD', + 'ta', + 'ta_IN', + 'ta_LK', + 'ta_MY', + 'ta_SG', + 'te', + 'te_IN', + 'teo', + 'teo_KE', + 'teo_UG', + 'th', + 'th_TH', + 'th_TH_TRADITIONAL', + 'ti', + 'ti_ER', + 'ti_ET', + 'tl', + 'tl_PH', + 'to', + 'to_TO', + 'tr', + 'tr_CY', + 'tr_TR', + 'twq', + 'twq_NE', + 'tzm', + 'tzm_Latn', + 'tzm_Latn_MA', + 'tzm_MA', + 'ug', + 'ug_Arab', + 'ug_Arab_CN', + 'ug_CN', + 'uk', + 'uk_UA', + 'ur', + 'ur_IN', + 'ur_PK', + 'uz', + 'uz_AF', + 'uz_Arab', + 'uz_Arab_AF', + 'uz_Cyrl', + 'uz_Cyrl_UZ', + 'uz_Latn', + 'uz_Latn_UZ', + 'uz_UZ', + 'vai', + 'vai_LR', + 'vai_Latn', + 'vai_Latn_LR', + 'vai_Vaii', + 'vai_Vaii_LR', + 'vi', + 'vi_VN', + 'vun', + 'vun_TZ', + 'xog', + 'xog_UG', + 'yav', + 'yav_CM', + 'yo', + 'yo_BJ', + 'yo_NG', + 'zgh', + 'zgh_MA', + 'zh', + 'zh_CN', + 'zh_HK', + 'zh_Hans', + 'zh_Hans_CN', + 'zh_Hans_HK', + 'zh_Hans_MO', + 'zh_Hans_SG', + 'zh_Hant', + 'zh_Hant_HK', + 'zh_Hant_MO', + 'zh_Hant_TW', + 'zh_MO', + 'zh_SG', + 'zh_TW', + 'zu', + 'zu_ZA', + ); + + private static $localeAliases = array( + 'az_AZ' => 'az_Latn_AZ', + 'bs_BA' => 'bs_Latn_BA', + 'en_NH' => 'en_VU', + 'en_RH' => 'en_ZW', + 'ha_GH' => 'ha_Latn_GH', + 'ha_NE' => 'ha_Latn_NE', + 'ha_NG' => 'ha_Latn_NG', + 'in' => 'id', + 'in_ID' => 'id_ID', + 'iw' => 'he', + 'iw_IL' => 'he_IL', + 'kk_KZ' => 'kk_Cyrl_KZ', + 'ks_IN' => 'ks_Arab_IN', + 'ky_KG' => 'ky_Cyrl_KG', + 'mn_MN' => 'mn_Cyrl_MN', + 'mo' => 'ro_MD', + 'ms_BN' => 'ms_Latn_BN', + 'ms_MY' => 'ms_Latn_MY', + 'ms_SG' => 'ms_Latn_SG', + 'no' => 'nb', + 'no_NO' => 'nb_NO', + 'no_NO_NY' => 'nn_NO', + 'pa_IN' => 'pa_Guru_IN', + 'pa_PK' => 'pa_Arab_PK', + 'sh' => 'sr_Latn', + 'sh_BA' => 'sr_Latn_BA', + 'sh_CS' => 'sr_Latn_RS', + 'sh_YU' => 'sr_Latn_RS', + 'shi_MA' => 'shi_Tfng_MA', + 'sr_BA' => 'sr_Cyrl_BA', + 'sr_CS' => 'sr_Cyrl_RS', + 'sr_Cyrl_CS' => 'sr_Cyrl_RS', + 'sr_Cyrl_YU' => 'sr_Cyrl_RS', + 'sr_Latn_CS' => 'sr_Latn_RS', + 'sr_Latn_YU' => 'sr_Latn_RS', + 'sr_ME' => 'sr_Latn_ME', + 'sr_RS' => 'sr_Cyrl_RS', + 'sr_XK' => 'sr_Cyrl_XK', + 'sr_YU' => 'sr_Cyrl_RS', + 'tl' => 'fil', + 'tl_PH' => 'fil_PH', + 'tzm_MA' => 'tzm_Latn_MA', + 'ug_CN' => 'ug_Arab_CN', + 'uz_AF' => 'uz_Arab_AF', + 'uz_UZ' => 'uz_Latn_UZ', + 'vai_LR' => 'vai_Vaii_LR', + 'zh_CN' => 'zh_Hans_CN', + 'zh_HK' => 'zh_Hant_HK', + 'zh_MO' => 'zh_Hant_MO', + 'zh_SG' => 'zh_Hans_SG', + 'zh_TW' => 'zh_Hant_TW', + ); + + private static $rootLocales; + + protected function setUp() + { + Locale::setDefault('en'); + Locale::setDefaultFallback('en'); + } + + public function provideLocales() + { + return array_map( + function ($locale) { return array($locale); }, + $this->getLocales() + ); + } + + public function provideLocaleAliases() + { + return array_map( + function ($alias, $ofLocale) { return array($alias, $ofLocale); }, + array_keys($this->getLocaleAliases()), + $this->getLocaleAliases() + ); + } + + public function provideRootLocales() + { + return array_map( + function ($locale) { return array($locale); }, + $this->getRootLocales() + ); + } + + protected function getLocales() + { + return self::$locales; + } + + protected function getLocaleAliases() + { + return self::$localeAliases; + } + + protected function getRootLocales() + { + if (null === self::$rootLocales) { + self::$rootLocales = array_filter(static::getLocales(), function ($locale) { + // no locales for which fallback is possible (e.g "en_GB") + return false === strpos($locale, '_'); + }); + } + + return self::$rootLocales; + } + + /** + * @return BundleEntryReader + */ + protected function createEntryReader() + { + $entryReader = new BundleEntryReader($this->createBundleReader()); + $entryReader->setLocaleAliases($this->getLocaleAliases()); + + return $entryReader; + } + + /** + * @return BundleReaderInterface + */ + abstract protected function createBundleReader(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b092ff6982abb79f58011dce2a7baee49d00c3d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php @@ -0,0 +1,933 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Provider; + +use Symfony\Component\Intl\Data\Provider\LanguageDataProvider; +use Symfony\Component\Intl\Intl; +use Symfony\Component\Intl\Locale; + +/** + * @author Bernhard Schussek + */ +abstract class AbstractLanguageDataProviderTest extends AbstractDataProviderTest +{ + // The below arrays document the state of the ICU data bundled with this package. + + protected static $languages = array( + 'aa', + 'ab', + 'ace', + 'ach', + 'ada', + 'ady', + 'ae', + 'aeb', + 'af', + 'afh', + 'agq', + 'ain', + 'ak', + 'akk', + 'akz', + 'ale', + 'aln', + 'alt', + 'am', + 'an', + 'ang', + 'anp', + 'ar', + 'ar_001', + 'arc', + 'arn', + 'aro', + 'arp', + 'arq', + 'arw', + 'ary', + 'arz', + 'as', + 'asa', + 'ase', + 'ast', + 'av', + 'avk', + 'awa', + 'ay', + 'az', + 'azb', + 'ba', + 'bal', + 'ban', + 'bar', + 'bas', + 'bax', + 'bbc', + 'bbj', + 'be', + 'bej', + 'bem', + 'bew', + 'bez', + 'bfd', + 'bfq', + 'bg', + 'bho', + 'bi', + 'bik', + 'bin', + 'bjn', + 'bkm', + 'bla', + 'bm', + 'bn', + 'bo', + 'bpy', + 'bqi', + 'br', + 'bra', + 'brh', + 'brx', + 'bs', + 'bss', + 'bua', + 'bug', + 'bum', + 'byn', + 'byv', + 'ca', + 'cad', + 'car', + 'cay', + 'cch', + 'ce', + 'ceb', + 'cgg', + 'ch', + 'chb', + 'chg', + 'chk', + 'chm', + 'chn', + 'cho', + 'chp', + 'chr', + 'chy', + 'ckb', + 'co', + 'cop', + 'cps', + 'cr', + 'crh', + 'cs', + 'csb', + 'cu', + 'cv', + 'cy', + 'da', + 'dak', + 'dar', + 'dav', + 'de', + 'de_AT', + 'de_CH', + 'del', + 'den', + 'dgr', + 'din', + 'dje', + 'doi', + 'dsb', + 'dtp', + 'dua', + 'dum', + 'dv', + 'dyo', + 'dyu', + 'dz', + 'dzg', + 'ebu', + 'ee', + 'efi', + 'egl', + 'egy', + 'eka', + 'el', + 'elx', + 'en', + 'en_AU', + 'en_CA', + 'en_GB', + 'en_US', + 'enm', + 'eo', + 'es', + 'es_419', + 'es_ES', + 'es_MX', + 'esu', + 'et', + 'eu', + 'ewo', + 'ext', + 'fa', + 'fan', + 'fat', + 'ff', + 'fi', + 'fil', + 'fit', + 'fj', + 'fo', + 'fon', + 'fr', + 'fr_CA', + 'fr_CH', + 'frc', + 'frm', + 'fro', + 'frp', + 'frr', + 'frs', + 'fur', + 'fy', + 'ga', + 'gaa', + 'gag', + 'gan', + 'gay', + 'gba', + 'gbz', + 'gd', + 'gez', + 'gil', + 'gl', + 'glk', + 'gmh', + 'gn', + 'goh', + 'gom', + 'gon', + 'gor', + 'got', + 'grb', + 'grc', + 'gsw', + 'gu', + 'guc', + 'gur', + 'guz', + 'gv', + 'gwi', + 'ha', + 'hai', + 'hak', + 'haw', + 'he', + 'hi', + 'hif', + 'hil', + 'hit', + 'hmn', + 'ho', + 'hr', + 'hsb', + 'hsn', + 'ht', + 'hu', + 'hup', + 'hy', + 'hz', + 'ia', + 'iba', + 'ibb', + 'id', + 'ie', + 'ig', + 'ii', + 'ik', + 'ilo', + 'inh', + 'io', + 'is', + 'it', + 'iu', + 'izh', + 'ja', + 'jam', + 'jbo', + 'jgo', + 'jmc', + 'jpr', + 'jrb', + 'jut', + 'jv', + 'ka', + 'kaa', + 'kab', + 'kac', + 'kaj', + 'kam', + 'kaw', + 'kbd', + 'kbl', + 'kcg', + 'kde', + 'kea', + 'ken', + 'kfo', + 'kg', + 'kgp', + 'kha', + 'kho', + 'khq', + 'khw', + 'ki', + 'kiu', + 'kj', + 'kk', + 'kkj', + 'kl', + 'kln', + 'km', + 'kmb', + 'kn', + 'ko', + 'koi', + 'kok', + 'kos', + 'kpe', + 'kr', + 'krc', + 'kri', + 'krj', + 'krl', + 'kru', + 'ks', + 'ksb', + 'ksf', + 'ksh', + 'ku', + 'kum', + 'kut', + 'kv', + 'kw', + 'ky', + 'la', + 'lad', + 'lag', + 'lah', + 'lam', + 'lb', + 'lez', + 'lfn', + 'lg', + 'li', + 'lij', + 'liv', + 'lkt', + 'lmo', + 'ln', + 'lo', + 'lol', + 'loz', + 'lt', + 'ltg', + 'lu', + 'lua', + 'lui', + 'lun', + 'luo', + 'lus', + 'luy', + 'lv', + 'lzh', + 'lzz', + 'mad', + 'maf', + 'mag', + 'mai', + 'mak', + 'man', + 'mas', + 'mde', + 'mdf', + 'mdr', + 'men', + 'mer', + 'mfe', + 'mg', + 'mga', + 'mgh', + 'mgo', + 'mh', + 'mi', + 'mic', + 'min', + 'mk', + 'ml', + 'mn', + 'mnc', + 'mni', + 'moh', + 'mos', + 'mr', + 'mrj', + 'ms', + 'mt', + 'mua', + 'mul', + 'mus', + 'mwl', + 'mwr', + 'mwv', + 'my', + 'mye', + 'myv', + 'mzn', + 'na', + 'nan', + 'nap', + 'naq', + 'nb', + 'nd', + 'nds', + 'ne', + 'new', + 'ng', + 'nia', + 'niu', + 'njo', + 'nl', + 'nl_BE', + 'nmg', + 'nn', + 'nnh', + 'no', + 'nog', + 'non', + 'nov', + 'nqo', + 'nr', + 'nso', + 'nus', + 'nv', + 'nwc', + 'ny', + 'nym', + 'nyn', + 'nyo', + 'nzi', + 'oc', + 'oj', + 'om', + 'or', + 'os', + 'osa', + 'ota', + 'pa', + 'pag', + 'pal', + 'pam', + 'pap', + 'pau', + 'pcd', + 'pdc', + 'pdt', + 'peo', + 'pfl', + 'phn', + 'pi', + 'pl', + 'pms', + 'pnt', + 'pon', + 'prg', + 'pro', + 'ps', + 'pt', + 'pt_BR', + 'pt_PT', + 'qu', + 'quc', + 'qug', + 'raj', + 'rap', + 'rar', + 'rgn', + 'rif', + 'rm', + 'rn', + 'ro', + 'ro_MD', + 'rof', + 'rom', + 'root', + 'rtm', + 'ru', + 'rue', + 'rug', + 'rup', + 'rw', + 'rwk', + 'sa', + 'sad', + 'sah', + 'sam', + 'saq', + 'sas', + 'sat', + 'saz', + 'sba', + 'sbp', + 'sc', + 'scn', + 'sco', + 'sd', + 'sdc', + 'se', + 'see', + 'seh', + 'sei', + 'sel', + 'ses', + 'sg', + 'sga', + 'sgs', + 'sh', + 'shi', + 'shn', + 'shu', + 'si', + 'sid', + 'sk', + 'sl', + 'sli', + 'sly', + 'sm', + 'sma', + 'smj', + 'smn', + 'sms', + 'sn', + 'snk', + 'so', + 'sog', + 'sq', + 'sr', + 'srn', + 'srr', + 'ss', + 'ssy', + 'st', + 'stq', + 'su', + 'suk', + 'sus', + 'sux', + 'sv', + 'sw', + 'swb', + 'swc', + 'syc', + 'syr', + 'szl', + 'ta', + 'tcy', + 'te', + 'tem', + 'teo', + 'ter', + 'tet', + 'tg', + 'th', + 'ti', + 'tig', + 'tiv', + 'tk', + 'tkl', + 'tkr', + 'tl', + 'tlh', + 'tli', + 'tly', + 'tmh', + 'tn', + 'to', + 'tog', + 'tpi', + 'tr', + 'tru', + 'trv', + 'ts', + 'tsd', + 'tsi', + 'tt', + 'ttt', + 'tum', + 'tvl', + 'tw', + 'twq', + 'ty', + 'tyv', + 'tzm', + 'udm', + 'ug', + 'uga', + 'uk', + 'umb', + 'und', + 'ur', + 'uz', + 'vai', + 've', + 'vec', + 'vep', + 'vi', + 'vls', + 'vmf', + 'vo', + 'vot', + 'vro', + 'vun', + 'wa', + 'wae', + 'wal', + 'war', + 'was', + 'wo', + 'wuu', + 'xal', + 'xh', + 'xmf', + 'xog', + 'yao', + 'yap', + 'yav', + 'ybb', + 'yi', + 'yo', + 'yrl', + 'yue', + 'za', + 'zap', + 'zbl', + 'zea', + 'zen', + 'zgh', + 'zh', + 'zh_Hans', + 'zh_Hant', + 'zu', + 'zun', + 'zxx', + 'zza', + ); + + protected static $alpha2ToAlpha3 = array( + 'aa' => 'aar', + 'ab' => 'abk', + 'ae' => 'ave', + 'af' => 'afr', + 'ak' => 'aka', + 'am' => 'amh', + 'an' => 'arg', + 'ar' => 'ara', + 'as' => 'asm', + 'av' => 'ava', + 'ay' => 'aym', + 'az' => 'aze', + 'ba' => 'bak', + 'be' => 'bel', + 'bg' => 'bul', + 'bh' => 'bih', + 'bi' => 'bis', + 'bm' => 'bam', + 'bn' => 'ben', + 'bo' => 'bod', + 'br' => 'bre', + 'bs' => 'bos', + 'ca' => 'cat', + 'ce' => 'che', + 'ch' => 'cha', + 'co' => 'cos', + 'cr' => 'cre', + 'cs' => 'ces', + 'cu' => 'chu', + 'cv' => 'chv', + 'cy' => 'cym', + 'da' => 'dan', + 'de' => 'deu', + 'dv' => 'div', + 'dz' => 'dzo', + 'ee' => 'ewe', + 'el' => 'ell', + 'en' => 'eng', + 'eo' => 'epo', + 'es' => 'spa', + 'et' => 'est', + 'eu' => 'eus', + 'fa' => 'fas', + 'ff' => 'ful', + 'fi' => 'fin', + 'fj' => 'fij', + 'fo' => 'fao', + 'fr' => 'fra', + 'fy' => 'fry', + 'ga' => 'gle', + 'gd' => 'gla', + 'gl' => 'glg', + 'gn' => 'grn', + 'gu' => 'guj', + 'gv' => 'glv', + 'ha' => 'hau', + 'he' => 'heb', + 'hi' => 'hin', + 'ho' => 'hmo', + 'hr' => 'hrv', + 'ht' => 'hat', + 'hu' => 'hun', + 'hy' => 'hye', + 'hz' => 'her', + 'ia' => 'ina', + 'id' => 'ind', + 'ie' => 'ile', + 'ig' => 'ibo', + 'ii' => 'iii', + 'ik' => 'ipk', + 'io' => 'ido', + 'is' => 'isl', + 'it' => 'ita', + 'iu' => 'iku', + 'ja' => 'jpn', + 'jv' => 'jav', + 'ka' => 'kat', + 'kg' => 'kon', + 'ki' => 'kik', + 'kj' => 'kua', + 'kk' => 'kaz', + 'kl' => 'kal', + 'km' => 'khm', + 'kn' => 'kan', + 'ko' => 'kor', + 'kr' => 'kau', + 'ks' => 'kas', + 'ku' => 'kur', + 'kv' => 'kom', + 'kw' => 'cor', + 'ky' => 'kir', + 'la' => 'lat', + 'lb' => 'ltz', + 'lg' => 'lug', + 'li' => 'lim', + 'ln' => 'lin', + 'lo' => 'lao', + 'lt' => 'lit', + 'lu' => 'lub', + 'lv' => 'lav', + 'mg' => 'mlg', + 'mh' => 'mah', + 'mi' => 'mri', + 'mk' => 'mkd', + 'ml' => 'mal', + 'mn' => 'mon', + 'mr' => 'mar', + 'ms' => 'msa', + 'mt' => 'mlt', + 'my' => 'mya', + 'na' => 'nau', + 'nb' => 'nob', + 'nd' => 'nde', + 'ne' => 'nep', + 'ng' => 'ndo', + 'nl' => 'nld', + 'nn' => 'nno', + 'nr' => 'nbl', + 'nv' => 'nav', + 'ny' => 'nya', + 'oc' => 'oci', + 'oj' => 'oji', + 'om' => 'orm', + 'or' => 'ori', + 'os' => 'oss', + 'pa' => 'pan', + 'pi' => 'pli', + 'pl' => 'pol', + 'ps' => 'pus', + 'pt' => 'por', + 'qu' => 'que', + 'rm' => 'roh', + 'rn' => 'run', + 'ro' => 'ron', + 'ru' => 'rus', + 'rw' => 'kin', + 'sa' => 'san', + 'sc' => 'srd', + 'sd' => 'snd', + 'se' => 'sme', + 'sg' => 'sag', + 'si' => 'sin', + 'sk' => 'slk', + 'sl' => 'slv', + 'sm' => 'smo', + 'sn' => 'sna', + 'so' => 'som', + 'sq' => 'sqi', + 'sr' => 'srp', + 'ss' => 'ssw', + 'st' => 'sot', + 'su' => 'sun', + 'sv' => 'swe', + 'sw' => 'swa', + 'ta' => 'tam', + 'te' => 'tel', + 'tg' => 'tgk', + 'th' => 'tha', + 'ti' => 'tir', + 'tk' => 'tuk', + 'tn' => 'tsn', + 'to' => 'ton', + 'tr' => 'tur', + 'ts' => 'tso', + 'tt' => 'tat', + 'ty' => 'tah', + 'ug' => 'uig', + 'uk' => 'ukr', + 'ur' => 'urd', + 'uz' => 'uzb', + 've' => 'ven', + 'vi' => 'vie', + 'vo' => 'vol', + 'wa' => 'wln', + 'wo' => 'wol', + 'xh' => 'xho', + 'yi' => 'yid', + 'yo' => 'yor', + 'za' => 'zha', + 'zh' => 'zho', + 'zu' => 'zul', + ); + + /** + * @var LanguageDataProvider + */ + protected $dataProvider; + + protected function setUp() + { + parent::setUp(); + + $this->dataProvider = new LanguageDataProvider( + $this->getDataDirectory().'/'.Intl::LANGUAGE_DIR, + $this->createEntryReader() + ); + } + + abstract protected function getDataDirectory(); + + public function testGetLanguages() + { + $this->assertEquals(static::$languages, $this->dataProvider->getLanguages()); + } + + /** + * @dataProvider provideLocales + */ + public function testGetNames($displayLocale) + { + $languages = array_keys($this->dataProvider->getNames($displayLocale)); + + sort($languages); + + $this->assertEquals(static::$languages, $languages); + } + + public function testGetNamesDefaultLocale() + { + Locale::setDefault('de_AT'); + + $this->assertSame( + $this->dataProvider->getNames('de_AT'), + $this->dataProvider->getNames() + ); + } + + /** + * @dataProvider provideLocaleAliases + */ + public function testGetNamesSupportsAliases($alias, $ofLocale) + { + // Can't use assertSame(), because some aliases contain scripts with + // different collation (=order of output) than their aliased locale + // e.g. sr_Latn_ME => sr_ME + $this->assertEquals( + $this->dataProvider->getNames($ofLocale), + $this->dataProvider->getNames($alias) + ); + } + + /** + * @dataProvider provideLocales + */ + public function testGetName($displayLocale) + { + $names = $this->dataProvider->getNames($displayLocale); + + foreach ($names as $language => $name) { + $this->assertSame($name, $this->dataProvider->getName($language, $displayLocale)); + } + } + + public function testGetNameDefaultLocale() + { + Locale::setDefault('de_AT'); + + $names = $this->dataProvider->getNames('de_AT'); + + foreach ($names as $language => $name) { + $this->assertSame($name, $this->dataProvider->getName($language)); + } + } + + public function provideLanguagesWithAlpha3Equivalent() + { + return array_map( + function ($value) { return array($value); }, + array_keys(static::$alpha2ToAlpha3) + ); + } + + /** + * @dataProvider provideLanguagesWithAlpha3Equivalent + */ + public function testGetAlpha3Code($language) + { + $this->assertSame(static::$alpha2ToAlpha3[$language], $this->dataProvider->getAlpha3Code($language)); + } + + public function provideLanguagesWithoutAlpha3Equivalent() + { + return array_map( + function ($value) { return array($value); }, + array_diff(static::$languages, array_keys(static::$alpha2ToAlpha3)) + ); + } + + /** + * @dataProvider provideLanguagesWithoutAlpha3Equivalent + * @expectedException \Symfony\Component\Intl\Exception\MissingResourceException + */ + public function testGetAlpha3CodeFailsIfNoAlpha3Equivalent($currency) + { + $this->dataProvider->getAlpha3Code($currency); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLocaleDataProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLocaleDataProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6386bba97d14126280c50150f7581c428b8f97a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLocaleDataProviderTest.php @@ -0,0 +1,108 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Provider; + +use Symfony\Component\Intl\Data\Provider\LocaleDataProvider; +use Symfony\Component\Intl\Intl; +use Symfony\Component\Intl\Locale; + +/** + * @author Bernhard Schussek + */ +abstract class AbstractLocaleDataProviderTest extends AbstractDataProviderTest +{ + /** + * @var LocaleDataProvider + */ + protected $dataProvider; + + protected function setUp() + { + parent::setUp(); + + $this->dataProvider = new LocaleDataProvider( + $this->getDataDirectory().'/'.Intl::LOCALE_DIR, + $this->createEntryReader() + ); + } + + abstract protected function getDataDirectory(); + + public function testGetLocales() + { + $this->assertSame($this->getLocales(), $this->dataProvider->getLocales()); + } + + public function testGetLocaleAliases() + { + $this->assertSame($this->getLocaleAliases(), $this->dataProvider->getAliases()); + } + + /** + * @dataProvider provideLocales + */ + public function testGetNames($displayLocale) + { + $locales = array_keys($this->dataProvider->getNames($displayLocale)); + + sort($locales); + + $this->assertSame($this->getLocales(), $locales); + } + + public function testGetNamesDefaultLocale() + { + Locale::setDefault('de_AT'); + + $this->assertSame( + $this->dataProvider->getNames('de_AT'), + $this->dataProvider->getNames() + ); + } + + /** + * @dataProvider provideLocaleAliases + */ + public function testGetNamesSupportsAliases($alias, $ofLocale) + { + // Can't use assertSame(), because some aliases contain scripts with + // different collation (=order of output) than their aliased locale + // e.g. sr_Latn_ME => sr_ME + $this->assertEquals( + $this->dataProvider->getNames($ofLocale), + $this->dataProvider->getNames($alias) + ); + } + + /** + * @dataProvider provideLocales + */ + public function testGetName($displayLocale) + { + $names = $this->dataProvider->getNames($displayLocale); + + foreach ($names as $locale => $name) { + $this->assertSame($name, $this->dataProvider->getName($locale, $displayLocale)); + } + } + + public function testGetNameDefaultLocale() + { + Locale::setDefault('de_AT'); + + $names = $this->dataProvider->getNames('de_AT'); + + foreach ($names as $locale => $name) { + $this->assertSame($name, $this->dataProvider->getName($locale)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..21cc1789d2b3468164f848cfe51578a193e87c43 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php @@ -0,0 +1,355 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Provider; + +use Symfony\Component\Intl\Data\Provider\RegionDataProvider; +use Symfony\Component\Intl\Intl; +use Symfony\Component\Intl\Locale; + +/** + * @author Bernhard Schussek + */ +abstract class AbstractRegionDataProviderTest extends AbstractDataProviderTest +{ + // The below arrays document the state of the ICU data bundled with this package. + + protected static $territories = array( + 'AC', + 'AD', + 'AE', + 'AF', + 'AG', + 'AI', + 'AL', + 'AM', + 'AN', + 'AO', + 'AQ', + 'AR', + 'AS', + 'AT', + 'AU', + 'AW', + 'AX', + 'AZ', + 'BA', + 'BB', + 'BD', + 'BE', + 'BF', + 'BG', + 'BH', + 'BI', + 'BJ', + 'BL', + 'BM', + 'BN', + 'BO', + 'BQ', + 'BR', + 'BS', + 'BT', + 'BV', + 'BW', + 'BY', + 'BZ', + 'CA', + 'CC', + 'CD', + 'CF', + 'CG', + 'CH', + 'CI', + 'CK', + 'CL', + 'CM', + 'CN', + 'CO', + 'CP', + 'CR', + 'CU', + 'CV', + 'CW', + 'CX', + 'CY', + 'CZ', + 'DE', + 'DG', + 'DJ', + 'DK', + 'DM', + 'DO', + 'DZ', + 'EA', + 'EC', + 'EE', + 'EG', + 'EH', + 'ER', + 'ES', + 'ET', + 'EU', + 'FI', + 'FJ', + 'FK', + 'FM', + 'FO', + 'FR', + 'GA', + 'GB', + 'GD', + 'GE', + 'GF', + 'GG', + 'GH', + 'GI', + 'GL', + 'GM', + 'GN', + 'GP', + 'GQ', + 'GR', + 'GS', + 'GT', + 'GU', + 'GW', + 'GY', + 'HK', + 'HM', + 'HN', + 'HR', + 'HT', + 'HU', + 'IC', + 'ID', + 'IE', + 'IL', + 'IM', + 'IN', + 'IO', + 'IQ', + 'IR', + 'IS', + 'IT', + 'JE', + 'JM', + 'JO', + 'JP', + 'KE', + 'KG', + 'KH', + 'KI', + 'KM', + 'KN', + 'KP', + 'KR', + 'KW', + 'KY', + 'KZ', + 'LA', + 'LB', + 'LC', + 'LI', + 'LK', + 'LR', + 'LS', + 'LT', + 'LU', + 'LV', + 'LY', + 'MA', + 'MC', + 'MD', + 'ME', + 'MF', + 'MG', + 'MH', + 'MK', + 'ML', + 'MM', + 'MN', + 'MO', + 'MP', + 'MQ', + 'MR', + 'MS', + 'MT', + 'MU', + 'MV', + 'MW', + 'MX', + 'MY', + 'MZ', + 'NA', + 'NC', + 'NE', + 'NF', + 'NG', + 'NI', + 'NL', + 'NO', + 'NP', + 'NR', + 'NU', + 'NZ', + 'OM', + 'PA', + 'PE', + 'PF', + 'PG', + 'PH', + 'PK', + 'PL', + 'PM', + 'PN', + 'PR', + 'PS', + 'PT', + 'PW', + 'PY', + 'QA', + 'RE', + 'RO', + 'RS', + 'RU', + 'RW', + 'SA', + 'SB', + 'SC', + 'SD', + 'SE', + 'SG', + 'SH', + 'SI', + 'SJ', + 'SK', + 'SL', + 'SM', + 'SN', + 'SO', + 'SR', + 'SS', + 'ST', + 'SV', + 'SX', + 'SY', + 'SZ', + 'TA', + 'TC', + 'TD', + 'TF', + 'TG', + 'TH', + 'TJ', + 'TK', + 'TL', + 'TM', + 'TN', + 'TO', + 'TR', + 'TT', + 'TV', + 'TW', + 'TZ', + 'UA', + 'UG', + 'UM', + 'US', + 'UY', + 'UZ', + 'VA', + 'VC', + 'VE', + 'VG', + 'VI', + 'VN', + 'VU', + 'WF', + 'WS', + 'XK', + 'YE', + 'YT', + 'ZA', + 'ZM', + 'ZW', + ); + + /** + * @var RegionDataProvider + */ + protected $dataProvider; + + protected function setUp() + { + parent::setUp(); + + $this->dataProvider = new RegionDataProvider( + $this->getDataDirectory().'/'.Intl::REGION_DIR, + $this->createEntryReader() + ); + } + + abstract protected function getDataDirectory(); + + public function testGetRegions() + { + $this->assertSame(static::$territories, $this->dataProvider->getRegions()); + } + + /** + * @dataProvider provideLocales + */ + public function testGetNames($displayLocale) + { + $countries = array_keys($this->dataProvider->getNames($displayLocale)); + + sort($countries); + + $this->assertSame(static::$territories, $countries); + } + + public function testGetNamesDefaultLocale() + { + Locale::setDefault('de_AT'); + + $this->assertSame( + $this->dataProvider->getNames('de_AT'), + $this->dataProvider->getNames() + ); + } + + /** + * @dataProvider provideLocaleAliases + */ + public function testGetNamesSupportsAliases($alias, $ofLocale) + { + // Can't use assertSame(), because some aliases contain scripts with + // different collation (=order of output) than their aliased locale + // e.g. sr_Latn_ME => sr_ME + $this->assertEquals( + $this->dataProvider->getNames($ofLocale), + $this->dataProvider->getNames($alias) + ); + } + + /** + * @dataProvider provideLocales + */ + public function testGetName($displayLocale) + { + $names = $this->dataProvider->getNames($displayLocale); + + foreach ($names as $country => $name) { + $this->assertSame($name, $this->dataProvider->getName($country, $displayLocale)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractScriptDataProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractScriptDataProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..68304434c7ffd2451d6fd0ecd199d3f9370a91aa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractScriptDataProviderTest.php @@ -0,0 +1,267 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Provider; + +use Symfony\Component\Intl\Data\Provider\ScriptDataProvider; +use Symfony\Component\Intl\Intl; +use Symfony\Component\Intl\Locale; + +/** + * @author Bernhard Schussek + * @group intl-data + */ +abstract class AbstractScriptDataProviderTest extends AbstractDataProviderTest +{ + // The below arrays document the state of the ICU data bundled with this package. + + protected static $scripts = array( + 'Afak', + 'Arab', + 'Armi', + 'Armn', + 'Avst', + 'Bali', + 'Bamu', + 'Bass', + 'Batk', + 'Beng', + 'Blis', + 'Bopo', + 'Brah', + 'Brai', + 'Bugi', + 'Buhd', + 'Cakm', + 'Cans', + 'Cari', + 'Cham', + 'Cher', + 'Cirt', + 'Copt', + 'Cprt', + 'Cyrl', + 'Cyrs', + 'Deva', + 'Dsrt', + 'Dupl', + 'Egyd', + 'Egyh', + 'Egyp', + 'Ethi', + 'Geok', + 'Geor', + 'Glag', + 'Goth', + 'Gran', + 'Grek', + 'Gujr', + 'Guru', + 'Hang', + 'Hani', + 'Hano', + 'Hans', + 'Hant', + 'Hebr', + 'Hira', + 'Hluw', + 'Hmng', + 'Hrkt', + 'Hung', + 'Inds', + 'Ital', + 'Java', + 'Jpan', + 'Jurc', + 'Kali', + 'Kana', + 'Khar', + 'Khmr', + 'Khoj', + 'Knda', + 'Kore', + 'Kpel', + 'Kthi', + 'Lana', + 'Laoo', + 'Latf', + 'Latg', + 'Latn', + 'Lepc', + 'Limb', + 'Lina', + 'Linb', + 'Lisu', + 'Loma', + 'Lyci', + 'Lydi', + 'Mand', + 'Mani', + 'Maya', + 'Mend', + 'Merc', + 'Mero', + 'Mlym', + 'Mong', + 'Moon', + 'Mroo', + 'Mtei', + 'Mymr', + 'Narb', + 'Nbat', + 'Nkgb', + 'Nkoo', + 'Nshu', + 'Ogam', + 'Olck', + 'Orkh', + 'Orya', + 'Osma', + 'Palm', + 'Perm', + 'Phag', + 'Phli', + 'Phlp', + 'Phlv', + 'Phnx', + 'Plrd', + 'Prti', + 'Rjng', + 'Roro', + 'Runr', + 'Samr', + 'Sara', + 'Sarb', + 'Saur', + 'Sgnw', + 'Shaw', + 'Shrd', + 'Sind', + 'Sinh', + 'Sora', + 'Sund', + 'Sylo', + 'Syrc', + 'Syre', + 'Syrj', + 'Syrn', + 'Tagb', + 'Takr', + 'Tale', + 'Talu', + 'Taml', + 'Tang', + 'Tavt', + 'Telu', + 'Teng', + 'Tfng', + 'Tglg', + 'Thaa', + 'Thai', + 'Tibt', + 'Tirh', + 'Ugar', + 'Vaii', + 'Visp', + 'Wara', + 'Wole', + 'Xpeo', + 'Xsux', + 'Yiii', + 'Zinh', + 'Zmth', + 'Zsym', + 'Zxxx', + 'Zyyy', + 'Zzzz', + ); + + /** + * @var ScriptDataProvider + */ + protected $dataProvider; + + protected function setUp() + { + parent::setUp(); + + $this->dataProvider = new ScriptDataProvider( + $this->getDataDirectory().'/'.Intl::SCRIPT_DIR, + $this->createEntryReader() + ); + } + + abstract protected function getDataDirectory(); + + public function testGetScripts() + { + $this->assertSame(static::$scripts, $this->dataProvider->getScripts()); + } + + /** + * @dataProvider provideLocales + */ + public function testGetNames($displayLocale) + { + $scripts = array_keys($this->dataProvider->getNames($displayLocale)); + + sort($scripts); + + $this->assertSame(static::$scripts, $scripts); + } + + public function testGetNamesDefaultLocale() + { + Locale::setDefault('de_AT'); + + $this->assertSame( + $this->dataProvider->getNames('de_AT'), + $this->dataProvider->getNames() + ); + } + + /** + * @dataProvider provideLocaleAliases + */ + public function testGetNamesSupportsAliases($alias, $ofLocale) + { + // Can't use assertSame(), because some aliases contain scripts with + // different collation (=order of output) than their aliased locale + // e.g. sr_Latn_ME => sr_ME + $this->assertEquals( + $this->dataProvider->getNames($ofLocale), + $this->dataProvider->getNames($alias) + ); + } + + /** + * @dataProvider provideLocales + */ + public function testGetName($displayLocale) + { + $names = $this->dataProvider->getNames($displayLocale); + + foreach ($names as $script => $name) { + $this->assertSame($name, $this->dataProvider->getName($script, $displayLocale)); + } + } + + public function testGetNameDefaultLocale() + { + Locale::setDefault('de_AT'); + + $names = $this->dataProvider->getNames('de_AT'); + + foreach ($names as $script => $name) { + $this->assertSame($name, $this->dataProvider->getName($script)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonCurrencyDataProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonCurrencyDataProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1baca128d687f8c17bfe0dfc4cb9d059615dde30 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonCurrencyDataProviderTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Provider\Json; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleReaderInterface; +use Symfony\Component\Intl\Data\Bundle\Reader\JsonBundleReader; +use Symfony\Component\Intl\Intl; +use Symfony\Component\Intl\Tests\Data\Provider\AbstractCurrencyDataProviderTest; + +/** + * @author Bernhard Schussek + * @group intl-data + */ +class JsonCurrencyDataProviderTest extends AbstractCurrencyDataProviderTest +{ + protected function getDataDirectory() + { + return Intl::getDataDirectory(); + } + + /** + * @return BundleReaderInterface + */ + protected function createBundleReader() + { + return new JsonBundleReader(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonLanguageDataProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonLanguageDataProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ba4c0ee08c143179a70024f7178adf123fa14a9b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonLanguageDataProviderTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Provider\Json; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleReaderInterface; +use Symfony\Component\Intl\Data\Bundle\Reader\JsonBundleReader; +use Symfony\Component\Intl\Intl; +use Symfony\Component\Intl\Tests\Data\Provider\AbstractLanguageDataProviderTest; + +/** + * @author Bernhard Schussek + * @group intl-data + */ +class JsonLanguageDataProviderTest extends AbstractLanguageDataProviderTest +{ + protected function getDataDirectory() + { + return Intl::getDataDirectory(); + } + + /** + * @return BundleReaderInterface + */ + protected function createBundleReader() + { + return new JsonBundleReader(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonLocaleDataProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonLocaleDataProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2e5e803b1d4431fb429b5be88955f8319ddef95a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonLocaleDataProviderTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Provider\Json; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleReaderInterface; +use Symfony\Component\Intl\Data\Bundle\Reader\JsonBundleReader; +use Symfony\Component\Intl\Intl; +use Symfony\Component\Intl\Tests\Data\Provider\AbstractLocaleDataProviderTest; + +/** + * @author Bernhard Schussek + * @group intl-data + */ +class JsonLocaleDataProviderTest extends AbstractLocaleDataProviderTest +{ + protected function getDataDirectory() + { + return Intl::getDataDirectory(); + } + + /** + * @return BundleReaderInterface + */ + protected function createBundleReader() + { + return new JsonBundleReader(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonRegionDataProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonRegionDataProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c3dba262475ca2dc080a1e75f85f2d061cb504bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonRegionDataProviderTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Provider\Json; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleReaderInterface; +use Symfony\Component\Intl\Data\Bundle\Reader\JsonBundleReader; +use Symfony\Component\Intl\Intl; +use Symfony\Component\Intl\Tests\Data\Provider\AbstractRegionDataProviderTest; + +/** + * @author Bernhard Schussek + * @group intl-data + */ +class JsonRegionDataProviderTest extends AbstractRegionDataProviderTest +{ + protected function getDataDirectory() + { + return Intl::getDataDirectory(); + } + + /** + * @return BundleReaderInterface + */ + protected function createBundleReader() + { + return new JsonBundleReader(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonScriptDataProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonScriptDataProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ec1eede660cd84ab15bbd3f155f5451c0ee45504 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonScriptDataProviderTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Provider\Json; + +use Symfony\Component\Intl\Data\Bundle\Reader\BundleReaderInterface; +use Symfony\Component\Intl\Data\Bundle\Reader\JsonBundleReader; +use Symfony\Component\Intl\Intl; +use Symfony\Component\Intl\Tests\Data\Provider\AbstractScriptDataProviderTest; + +/** + * @author Bernhard Schussek + * @group intl-data + */ +class JsonScriptDataProviderTest extends AbstractScriptDataProviderTest +{ + protected function getDataDirectory() + { + return Intl::getDataDirectory(); + } + + /** + * @return BundleReaderInterface + */ + protected function createBundleReader() + { + return new JsonBundleReader(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f76c71d8f7a4dc42bbf2b460042e418bdfdc72d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Intl\Data\Util\LocaleScanner; + +/** + * @author Bernhard Schussek + */ +class LocaleScannerTest extends TestCase +{ + private $directory; + + /** + * @var Filesystem + */ + private $filesystem; + + /** + * @var LocaleScanner + */ + private $scanner; + + protected function setUp() + { + $this->directory = sys_get_temp_dir().'/LocaleScannerTest/'.mt_rand(1000, 9999); + $this->filesystem = new Filesystem(); + $this->scanner = new LocaleScanner(); + + $this->filesystem->mkdir($this->directory); + + $this->filesystem->touch($this->directory.'/en.txt'); + $this->filesystem->touch($this->directory.'/en_alias.txt'); + $this->filesystem->touch($this->directory.'/de.txt'); + $this->filesystem->touch($this->directory.'/de_alias.txt'); + $this->filesystem->touch($this->directory.'/fr.txt'); + $this->filesystem->touch($this->directory.'/fr_alias.txt'); + $this->filesystem->touch($this->directory.'/root.txt'); + $this->filesystem->touch($this->directory.'/supplementalData.txt'); + $this->filesystem->touch($this->directory.'/supplementaldata.txt'); + $this->filesystem->touch($this->directory.'/meta.txt'); + + file_put_contents($this->directory.'/en_alias.txt', 'en_alias{"%%ALIAS"{"en"}}'); + file_put_contents($this->directory.'/de_alias.txt', 'de_alias{"%%ALIAS"{"de"}}'); + file_put_contents($this->directory.'/fr_alias.txt', 'fr_alias{"%%ALIAS"{"fr"}}'); + } + + protected function tearDown() + { + $this->filesystem->remove($this->directory); + } + + public function testScanLocales() + { + $sortedLocales = array('de', 'de_alias', 'en', 'en_alias', 'fr', 'fr_alias'); + + $this->assertSame($sortedLocales, $this->scanner->scanLocales($this->directory)); + } + + public function testScanAliases() + { + $sortedAliases = array('de_alias' => 'de', 'en_alias' => 'en', 'fr_alias' => 'fr'); + + $this->assertSame($sortedAliases, $this->scanner->scanAliases($this->directory)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Util/RingBufferTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Util/RingBufferTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bbaecfcbd668fa948063d8092eace27b55a64ef0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Util/RingBufferTest.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Data\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Data\Util\RingBuffer; + +/** + * @author Bernhard Schussek + */ +class RingBufferTest extends TestCase +{ + /** + * @var RingBuffer + */ + private $buffer; + + protected function setUp() + { + $this->buffer = new RingBuffer(2); + } + + public function testWriteWithinBuffer() + { + $this->buffer[0] = 'foo'; + $this->buffer['bar'] = 'baz'; + + $this->assertTrue(isset($this->buffer[0])); + $this->assertTrue(isset($this->buffer['bar'])); + $this->assertSame('foo', $this->buffer[0]); + $this->assertSame('baz', $this->buffer['bar']); + } + + public function testWritePastBuffer() + { + $this->buffer[0] = 'foo'; + $this->buffer['bar'] = 'baz'; + $this->buffer[2] = 'bam'; + + $this->assertTrue(isset($this->buffer['bar'])); + $this->assertTrue(isset($this->buffer[2])); + $this->assertSame('baz', $this->buffer['bar']); + $this->assertSame('bam', $this->buffer[2]); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\OutOfBoundsException + */ + public function testReadNonExistingFails() + { + $this->buffer['foo']; + } + + public function testQueryNonExisting() + { + $this->assertFalse(isset($this->buffer['foo'])); + } + + public function testUnsetNonExistingSucceeds() + { + unset($this->buffer['foo']); + + $this->assertFalse(isset($this->buffer['foo'])); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\OutOfBoundsException + */ + public function testReadOverwrittenFails() + { + $this->buffer[0] = 'foo'; + $this->buffer['bar'] = 'baz'; + $this->buffer[2] = 'bam'; + + $this->buffer[0]; + } + + public function testQueryOverwritten() + { + $this->assertFalse(isset($this->buffer[0])); + } + + public function testUnsetOverwrittenSucceeds() + { + $this->buffer[0] = 'foo'; + $this->buffer['bar'] = 'baz'; + $this->buffer[2] = 'bam'; + + unset($this->buffer[0]); + + $this->assertFalse(isset($this->buffer[0])); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..81a4d969644e2255d12cbd888f6f77c28ac76705 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php @@ -0,0 +1,890 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\DateFormatter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; +use Symfony\Component\Intl\Globals\IntlGlobals; + +/** + * Test case for IntlDateFormatter implementations. + * + * @author Bernhard Schussek + */ +abstract class AbstractIntlDateFormatterTest extends TestCase +{ + protected function setUp() + { + \Locale::setDefault('en'); + } + + /** + * When a time zone is not specified, it uses the system default however it returns null in the getter method. + * + * @see StubIntlDateFormatterTest::testDefaultTimeZoneIntl() + */ + public function testConstructorDefaultTimeZone() + { + $formatter = $this->getDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT); + + $this->assertEquals(date_default_timezone_get(), $formatter->getTimeZoneId()); + + $this->assertEquals( + $this->getDateTime(0, $formatter->getTimeZoneId())->format('M j, Y, g:i A'), + $formatter->format(0) + ); + } + + /** + * @dataProvider formatProvider + */ + public function testFormat($pattern, $timestamp, $expected) + { + $errorCode = IntlGlobals::U_ZERO_ERROR; + $errorMessage = 'U_ZERO_ERROR'; + + $formatter = $this->getDefaultDateFormatter($pattern); + $this->assertSame($expected, $formatter->format($timestamp)); + $this->assertIsIntlSuccess($formatter, $errorMessage, $errorCode); + } + + public function formatProvider() + { + $dateTime = new \DateTime('@0'); + + $formatData = array( + /* general */ + array('y-M-d', 0, '1970-1-1'), + array("EEE, MMM d, ''yy", 0, "Thu, Jan 1, '70"), + array('h:mm a', 0, '12:00 AM'), + array('yyyyy.MMMM.dd hh:mm aaa', 0, '01970.January.01 12:00 AM'), + + /* escaping */ + array("'M'", 0, 'M'), + array("'yy'", 0, 'yy'), + array("'''yy'", 0, "'yy"), + array("''y", 0, "'1970"), + array("''yy", 0, "'70"), + array("H 'o'' clock'", 0, "0 o' clock"), + + /* month */ + array('M', 0, '1'), + array('MM', 0, '01'), + array('MMM', 0, 'Jan'), + array('MMMM', 0, 'January'), + array('MMMMM', 0, 'J'), + array('MMMMMM', 0, '000001'), + + array('L', 0, '1'), + array('LL', 0, '01'), + array('LLL', 0, 'Jan'), + array('LLLL', 0, 'January'), + array('LLLLL', 0, 'J'), + array('LLLLLL', 0, '000001'), + + /* year */ + array('y', 0, '1970'), + array('yy', 0, '70'), + array('yyy', 0, '1970'), + array('yyyy', 0, '1970'), + array('yyyyy', 0, '01970'), + array('yyyyyy', 0, '001970'), + + /* day */ + array('d', 0, '1'), + array('dd', 0, '01'), + array('ddd', 0, '001'), + + /* quarter */ + array('Q', 0, '1'), + array('QQ', 0, '01'), + array('QQQ', 0, 'Q1'), + array('QQQQ', 0, '1st quarter'), + array('QQQQQ', 0, '1st quarter'), + + array('q', 0, '1'), + array('qq', 0, '01'), + array('qqq', 0, 'Q1'), + array('qqqq', 0, '1st quarter'), + array('qqqqq', 0, '1st quarter'), + + // 4 months + array('Q', 7776000, '2'), + array('QQ', 7776000, '02'), + array('QQQ', 7776000, 'Q2'), + array('QQQQ', 7776000, '2nd quarter'), + + // 7 months + array('QQQQ', 15638400, '3rd quarter'), + + // 10 months + array('QQQQ', 23587200, '4th quarter'), + + /* 12-hour (1-12) */ + array('h', 0, '12'), + array('hh', 0, '12'), + array('hhh', 0, '012'), + + array('h', 1, '12'), + array('h', 3600, '1'), + array('h', 43200, '12'), // 12 hours + + /* day of year */ + array('D', 0, '1'), + array('D', 86400, '2'), // 1 day + array('D', 31536000, '1'), // 1 year + array('D', 31622400, '2'), // 1 year + 1 day + + /* day of week */ + array('E', 0, 'Thu'), + array('EE', 0, 'Thu'), + array('EEE', 0, 'Thu'), + array('EEEE', 0, 'Thursday'), + array('EEEEE', 0, 'T'), + array('EEEEEE', 0, 'Th'), + + array('E', 1296540000, 'Tue'), // 2011-02-01 + array('E', 1296950400, 'Sun'), // 2011-02-06 + + /* am/pm marker */ + array('a', 0, 'AM'), + array('aa', 0, 'AM'), + array('aaa', 0, 'AM'), + array('aaaa', 0, 'AM'), + + // 12 hours + array('a', 43200, 'PM'), + array('aa', 43200, 'PM'), + array('aaa', 43200, 'PM'), + array('aaaa', 43200, 'PM'), + + /* 24-hour (0-23) */ + array('H', 0, '0'), + array('HH', 0, '00'), + array('HHH', 0, '000'), + + array('H', 1, '0'), + array('H', 3600, '1'), + array('H', 43200, '12'), + array('H', 46800, '13'), + + /* 24-hour (1-24) */ + array('k', 0, '24'), + array('kk', 0, '24'), + array('kkk', 0, '024'), + + array('k', 1, '24'), + array('k', 3600, '1'), + array('k', 43200, '12'), + array('k', 46800, '13'), + + /* 12-hour (0-11) */ + array('K', 0, '0'), + array('KK', 0, '00'), + array('KKK', 0, '000'), + + array('K', 1, '0'), + array('K', 3600, '1'), + array('K', 43200, '0'), // 12 hours + + /* minute */ + array('m', 0, '0'), + array('mm', 0, '00'), + array('mmm', 0, '000'), + + array('m', 1, '0'), + array('m', 60, '1'), + array('m', 120, '2'), + array('m', 180, '3'), + array('m', 3600, '0'), + array('m', 3660, '1'), + array('m', 43200, '0'), // 12 hours + + /* second */ + array('s', 0, '0'), + array('ss', 0, '00'), + array('sss', 0, '000'), + + array('s', 1, '1'), + array('s', 2, '2'), + array('s', 5, '5'), + array('s', 30, '30'), + array('s', 59, '59'), + array('s', 60, '0'), + array('s', 120, '0'), + array('s', 180, '0'), + array('s', 3600, '0'), + array('s', 3601, '1'), + array('s', 3630, '30'), + array('s', 43200, '0'), // 12 hours + + // general + array("yyyy.MM.dd 'at' HH:mm:ss zzz", 0, '1970.01.01 at 00:00:00 GMT'), + array('K:mm a, z', 0, '0:00 AM, GMT'), + + // timezone + array('z', 0, 'GMT'), + array('zz', 0, 'GMT'), + array('zzz', 0, 'GMT'), + array('zzzz', 0, 'GMT'), + array('zzzzz', 0, 'GMT'), + + // general, DateTime + array('y-M-d', $dateTime, '1970-1-1'), + array("EEE, MMM d, ''yy", $dateTime, "Thu, Jan 1, '70"), + array('h:mm a', $dateTime, '12:00 AM'), + array('yyyyy.MMMM.dd hh:mm aaa', $dateTime, '01970.January.01 12:00 AM'), + array("yyyy.MM.dd 'at' HH:mm:ss zzz", $dateTime, '1970.01.01 at 00:00:00 GMT'), + array('K:mm a, z', $dateTime, '0:00 AM, GMT'), + ); + + return $formatData; + } + + /** + * @dataProvider formatErrorProvider + */ + public function testFormatIllegalArgumentError($pattern, $timestamp, $errorMessage) + { + $errorCode = IntlGlobals::U_ILLEGAL_ARGUMENT_ERROR; + + $formatter = $this->getDefaultDateFormatter($pattern); + $this->assertFalse($formatter->format($timestamp)); + $this->assertIsIntlFailure($formatter, $errorMessage, $errorCode); + } + + public function formatErrorProvider() + { + return array( + array('y-M-d', 'foobar', 'datefmt_format: string \'foobar\' is not numeric, which would be required for it to be a valid date: U_ILLEGAL_ARGUMENT_ERROR'), + ); + } + + /** + * @dataProvider formatWithTimezoneProvider + */ + public function testFormatWithTimezone($timestamp, $timezone, $expected) + { + $pattern = 'yyyy-MM-dd HH:mm:ss'; + $formatter = $this->getDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, $timezone, IntlDateFormatter::GREGORIAN, $pattern); + $this->assertSame($expected, $formatter->format($timestamp)); + } + + public function formatWithTimezoneProvider() + { + $data = array( + array(0, 'UTC', '1970-01-01 00:00:00'), + array(0, 'GMT', '1970-01-01 00:00:00'), + array(0, 'GMT-03:00', '1969-12-31 21:00:00'), + array(0, 'GMT+03:00', '1970-01-01 03:00:00'), + array(0, 'Europe/Zurich', '1970-01-01 01:00:00'), + array(0, 'Europe/Paris', '1970-01-01 01:00:00'), + array(0, 'Africa/Cairo', '1970-01-01 02:00:00'), + array(0, 'Africa/Casablanca', '1970-01-01 00:00:00'), + array(0, 'Africa/Djibouti', '1970-01-01 03:00:00'), + array(0, 'Africa/Johannesburg', '1970-01-01 02:00:00'), + array(0, 'America/Antigua', '1969-12-31 20:00:00'), + array(0, 'America/Toronto', '1969-12-31 19:00:00'), + array(0, 'America/Vancouver', '1969-12-31 16:00:00'), + array(0, 'Asia/Aqtau', '1970-01-01 05:00:00'), + array(0, 'Asia/Bangkok', '1970-01-01 07:00:00'), + array(0, 'Asia/Dubai', '1970-01-01 04:00:00'), + array(0, 'Australia/Brisbane', '1970-01-01 10:00:00'), + array(0, 'Australia/Eucla', '1970-01-01 08:45:00'), + array(0, 'Australia/Melbourne', '1970-01-01 10:00:00'), + array(0, 'Europe/Berlin', '1970-01-01 01:00:00'), + array(0, 'Europe/Dublin', '1970-01-01 01:00:00'), + array(0, 'Europe/Warsaw', '1970-01-01 01:00:00'), + array(0, 'Pacific/Fiji', '1970-01-01 12:00:00'), + ); + + return $data; + } + + public function testFormatWithGmtTimezone() + { + $formatter = $this->getDefaultDateFormatter('zzzz'); + + $formatter->setTimeZone('GMT+03:00'); + + $this->assertEquals('GMT+03:00', $formatter->format(0)); + } + + public function testFormatWithGmtTimeZoneAndMinutesOffset() + { + $formatter = $this->getDefaultDateFormatter('zzzz'); + + $formatter->setTimeZone('GMT+00:30'); + + $this->assertEquals('GMT+00:30', $formatter->format(0)); + } + + public function testFormatWithNonStandardTimezone() + { + $formatter = $this->getDefaultDateFormatter('zzzz'); + + $formatter->setTimeZone('Pacific/Fiji'); + + $this->assertEquals('Fiji Standard Time', $formatter->format(0)); + } + + public function testFormatWithConstructorTimezone() + { + $formatter = $this->getDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, 'UTC'); + $formatter->setPattern('yyyy-MM-dd HH:mm:ss'); + + $this->assertEquals( + $this->getDateTime(0, 'UTC')->format('Y-m-d H:i:s'), + $formatter->format(0) + ); + } + + public function testFormatWithDateTimeZoneGmt() + { + $formatter = $this->getDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, new \DateTimeZone('GMT'), IntlDateFormatter::GREGORIAN, 'zzzz'); + + $this->assertEquals('GMT', $formatter->format(0)); + } + + public function testFormatWithDateTimeZoneGmtOffset() + { + if (defined('HHVM_VERSION_ID') || PHP_VERSION_ID <= 50509) { + $this->markTestSkipped('DateTimeZone GMT offsets are supported since 5.5.10. See https://github.com/facebook/hhvm/issues/5875 for HHVM.'); + } + + $formatter = $this->getDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, new \DateTimeZone('GMT+03:00'), IntlDateFormatter::GREGORIAN, 'zzzz'); + + $this->assertEquals('GMT+03:00', $formatter->format(0)); + } + + public function testFormatWithIntlTimeZone() + { + if (!extension_loaded('intl')) { + $this->markTestSkipped('Extension intl is required.'); + } + + $formatter = $this->getDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, \IntlTimeZone::createTimeZone('GMT+03:00'), IntlDateFormatter::GREGORIAN, 'zzzz'); + + $this->assertEquals('GMT+03:00', $formatter->format(0)); + } + + public function testFormatWithTimezoneFromPhp() + { + $tz = date_default_timezone_get(); + date_default_timezone_set('Europe/London'); + + $formatter = $this->getDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT); + $formatter->setPattern('yyyy-MM-dd HH:mm:ss'); + + $this->assertEquals( + $this->getDateTime(0, 'Europe/London')->format('Y-m-d H:i:s'), + $formatter->format(0) + ); + + $this->assertEquals('Europe/London', date_default_timezone_get()); + + // Restores TZ. + date_default_timezone_set($tz); + } + + /** + * @dataProvider dateAndTimeTypeProvider + */ + public function testDateAndTimeType($timestamp, $datetype, $timetype, $expected) + { + $formatter = $this->getDateFormatter('en', $datetype, $timetype, 'UTC'); + $this->assertSame($expected, $formatter->format($timestamp)); + } + + public function dateAndTimeTypeProvider() + { + return array( + array(0, IntlDateFormatter::FULL, IntlDateFormatter::NONE, 'Thursday, January 1, 1970'), + array(0, IntlDateFormatter::LONG, IntlDateFormatter::NONE, 'January 1, 1970'), + array(0, IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE, 'Jan 1, 1970'), + array(0, IntlDateFormatter::SHORT, IntlDateFormatter::NONE, '1/1/70'), + array(0, IntlDateFormatter::NONE, IntlDateFormatter::FULL, '12:00:00 AM GMT'), + array(0, IntlDateFormatter::NONE, IntlDateFormatter::LONG, '12:00:00 AM GMT'), + array(0, IntlDateFormatter::NONE, IntlDateFormatter::MEDIUM, '12:00:00 AM'), + array(0, IntlDateFormatter::NONE, IntlDateFormatter::SHORT, '12:00 AM'), + ); + } + + public function testGetCalendar() + { + $formatter = $this->getDefaultDateFormatter(); + $this->assertEquals(IntlDateFormatter::GREGORIAN, $formatter->getCalendar()); + } + + public function testGetDateType() + { + $formatter = $this->getDateFormatter('en', IntlDateFormatter::FULL, IntlDateFormatter::NONE); + $this->assertEquals(IntlDateFormatter::FULL, $formatter->getDateType()); + } + + public function testGetLocale() + { + $formatter = $this->getDefaultDateFormatter(); + $this->assertEquals('en', $formatter->getLocale()); + } + + public function testGetPattern() + { + $formatter = $this->getDateFormatter('en', IntlDateFormatter::FULL, IntlDateFormatter::NONE, 'UTC', IntlDateFormatter::GREGORIAN, 'yyyy-MM-dd'); + $this->assertEquals('yyyy-MM-dd', $formatter->getPattern()); + } + + public function testGetTimeType() + { + $formatter = $this->getDateFormatter('en', IntlDateFormatter::NONE, IntlDateFormatter::FULL); + $this->assertEquals(IntlDateFormatter::FULL, $formatter->getTimeType()); + } + + /** + * @dataProvider parseProvider + */ + public function testParse($pattern, $value, $expected) + { + $errorCode = IntlGlobals::U_ZERO_ERROR; + $errorMessage = 'U_ZERO_ERROR'; + + $formatter = $this->getDefaultDateFormatter($pattern); + $this->assertSame($expected, $formatter->parse($value)); + $this->assertIsIntlSuccess($formatter, $errorMessage, $errorCode); + } + + public function parseProvider() + { + return array_merge( + $this->parseYearProvider(), + $this->parseQuarterProvider(), + $this->parseMonthProvider(), + $this->parseStandaloneMonthProvider(), + $this->parseDayProvider(), + $this->parseDayOfWeekProvider(), + $this->parseDayOfYearProvider(), + $this->parseHour12ClockOneBasedProvider(), + $this->parseHour12ClockZeroBasedProvider(), + $this->parseHour24ClockOneBasedProvider(), + $this->parseHour24ClockZeroBasedProvider(), + $this->parseMinuteProvider(), + $this->parseSecondProvider(), + $this->parseTimezoneProvider(), + $this->parseAmPmProvider(), + $this->parseStandaloneAmPmProvider(), + $this->parseRegexMetaCharsProvider(), + $this->parseQuoteCharsProvider(), + $this->parseDashSlashProvider() + ); + } + + public function parseYearProvider() + { + return array( + array('y-M-d', '1970-1-1', 0), + array('yy-M-d', '70-1-1', 0), + ); + } + + public function parseQuarterProvider() + { + return array( + array('Q', '1', 0), + array('QQ', '01', 0), + array('QQQ', 'Q1', 0), + array('QQQQ', '1st quarter', 0), + array('QQQQQ', '1st quarter', 0), + + array('Q', '2', 7776000), + array('QQ', '02', 7776000), + array('QQQ', 'Q2', 7776000), + array('QQQQ', '2nd quarter', 7776000), + array('QQQQQ', '2nd quarter', 7776000), + + array('q', '1', 0), + array('qq', '01', 0), + array('qqq', 'Q1', 0), + array('qqqq', '1st quarter', 0), + array('qqqqq', '1st quarter', 0), + ); + } + + public function parseMonthProvider() + { + return array( + array('y-M-d', '1970-1-1', 0), + array('y-MMM-d', '1970-Jan-1', 0), + array('y-MMMM-d', '1970-January-1', 0), + ); + } + + public function parseStandaloneMonthProvider() + { + return array( + array('y-L-d', '1970-1-1', 0), + array('y-LLL-d', '1970-Jan-1', 0), + array('y-LLLL-d', '1970-January-1', 0), + ); + } + + public function parseDayProvider() + { + return array( + array('y-M-d', '1970-1-1', 0), + array('y-M-dd', '1970-1-01', 0), + array('y-M-ddd', '1970-1-001', 0), + ); + } + + public function parseDayOfWeekProvider() + { + return array( + array('E', 'Thu', 0), + array('EE', 'Thu', 0), + array('EEE', 'Thu', 0), + array('EEEE', 'Thursday', 0), + array('EEEEE', 'T', 432000), + array('EEEEEE', 'Th', 0), + ); + } + + public function parseDayOfYearProvider() + { + return array( + array('D', '1', 0), + array('D', '2', 86400), + ); + } + + public function parseHour12ClockOneBasedProvider() + { + return array( + // 12 hours (1-12) + array('y-M-d h', '1970-1-1 1', 3600), + array('y-M-d h', '1970-1-1 10', 36000), + array('y-M-d hh', '1970-1-1 11', 39600), + array('y-M-d hh', '1970-1-1 12', 0), + array('y-M-d hh a', '1970-1-1 0 AM', 0), + array('y-M-d hh a', '1970-1-1 1 AM', 3600), + array('y-M-d hh a', '1970-1-1 10 AM', 36000), + array('y-M-d hh a', '1970-1-1 11 AM', 39600), + array('y-M-d hh a', '1970-1-1 12 AM', 0), + array('y-M-d hh a', '1970-1-1 23 AM', 82800), + array('y-M-d hh a', '1970-1-1 24 AM', 86400), + array('y-M-d hh a', '1970-1-1 0 PM', 43200), + array('y-M-d hh a', '1970-1-1 1 PM', 46800), + array('y-M-d hh a', '1970-1-1 10 PM', 79200), + array('y-M-d hh a', '1970-1-1 11 PM', 82800), + array('y-M-d hh a', '1970-1-1 12 PM', 43200), + array('y-M-d hh a', '1970-1-1 23 PM', 126000), + array('y-M-d hh a', '1970-1-1 24 PM', 129600), + ); + } + + public function parseHour12ClockZeroBasedProvider() + { + return array( + // 12 hours (0-11) + array('y-M-d K', '1970-1-1 1', 3600), + array('y-M-d K', '1970-1-1 10', 36000), + array('y-M-d KK', '1970-1-1 11', 39600), + array('y-M-d KK', '1970-1-1 12', 43200), + array('y-M-d KK a', '1970-1-1 0 AM', 0), + array('y-M-d KK a', '1970-1-1 1 AM', 3600), + array('y-M-d KK a', '1970-1-1 10 AM', 36000), + array('y-M-d KK a', '1970-1-1 11 AM', 39600), + array('y-M-d KK a', '1970-1-1 12 AM', 43200), + array('y-M-d KK a', '1970-1-1 23 AM', 82800), + array('y-M-d KK a', '1970-1-1 24 AM', 86400), + array('y-M-d KK a', '1970-1-1 0 PM', 43200), + array('y-M-d KK a', '1970-1-1 1 PM', 46800), + array('y-M-d KK a', '1970-1-1 10 PM', 79200), + array('y-M-d KK a', '1970-1-1 11 PM', 82800), + array('y-M-d KK a', '1970-1-1 12 PM', 86400), + array('y-M-d KK a', '1970-1-1 23 PM', 126000), + array('y-M-d KK a', '1970-1-1 24 PM', 129600), + ); + } + + public function parseHour24ClockOneBasedProvider() + { + return array( + // 24 hours (1-24) + array('y-M-d k', '1970-1-1 1', 3600), + array('y-M-d k', '1970-1-1 10', 36000), + array('y-M-d kk', '1970-1-1 11', 39600), + array('y-M-d kk', '1970-1-1 12', 43200), + array('y-M-d kk', '1970-1-1 23', 82800), + array('y-M-d kk', '1970-1-1 24', 0), + array('y-M-d kk a', '1970-1-1 0 AM', 0), + array('y-M-d kk a', '1970-1-1 1 AM', 0), + array('y-M-d kk a', '1970-1-1 10 AM', 0), + array('y-M-d kk a', '1970-1-1 11 AM', 0), + array('y-M-d kk a', '1970-1-1 12 AM', 0), + array('y-M-d kk a', '1970-1-1 23 AM', 0), + array('y-M-d kk a', '1970-1-1 24 AM', 0), + array('y-M-d kk a', '1970-1-1 0 PM', 43200), + array('y-M-d kk a', '1970-1-1 1 PM', 43200), + array('y-M-d kk a', '1970-1-1 10 PM', 43200), + array('y-M-d kk a', '1970-1-1 11 PM', 43200), + array('y-M-d kk a', '1970-1-1 12 PM', 43200), + array('y-M-d kk a', '1970-1-1 23 PM', 43200), + array('y-M-d kk a', '1970-1-1 24 PM', 43200), + ); + } + + public function parseHour24ClockZeroBasedProvider() + { + return array( + // 24 hours (0-23) + array('y-M-d H', '1970-1-1 0', 0), + array('y-M-d H', '1970-1-1 1', 3600), + array('y-M-d H', '1970-1-1 10', 36000), + array('y-M-d HH', '1970-1-1 11', 39600), + array('y-M-d HH', '1970-1-1 12', 43200), + array('y-M-d HH', '1970-1-1 23', 82800), + array('y-M-d HH a', '1970-1-1 0 AM', 0), + array('y-M-d HH a', '1970-1-1 1 AM', 0), + array('y-M-d HH a', '1970-1-1 10 AM', 0), + array('y-M-d HH a', '1970-1-1 11 AM', 0), + array('y-M-d HH a', '1970-1-1 12 AM', 0), + array('y-M-d HH a', '1970-1-1 23 AM', 0), + array('y-M-d HH a', '1970-1-1 24 AM', 0), + array('y-M-d HH a', '1970-1-1 0 PM', 43200), + array('y-M-d HH a', '1970-1-1 1 PM', 43200), + array('y-M-d HH a', '1970-1-1 10 PM', 43200), + array('y-M-d HH a', '1970-1-1 11 PM', 43200), + array('y-M-d HH a', '1970-1-1 12 PM', 43200), + array('y-M-d HH a', '1970-1-1 23 PM', 43200), + array('y-M-d HH a', '1970-1-1 24 PM', 43200), + ); + } + + public function parseMinuteProvider() + { + return array( + array('y-M-d HH:m', '1970-1-1 0:1', 60), + array('y-M-d HH:mm', '1970-1-1 0:10', 600), + ); + } + + public function parseSecondProvider() + { + return array( + array('y-M-d HH:mm:s', '1970-1-1 00:01:1', 61), + array('y-M-d HH:mm:ss', '1970-1-1 00:01:10', 70), + ); + } + + public function parseTimezoneProvider() + { + return array( + array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-03:00', 10800), + array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-04:00', 14400), + array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-00:00', 0), + array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT+03:00', -10800), + array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT+04:00', -14400), + array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-0300', 10800), + array('y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT+0300', -10800), + + // a previous timezone parsing should not change the timezone for the next parsing + array('y-M-d HH:mm:ss', '1970-1-1 00:00:00', 0), + ); + } + + public function parseAmPmProvider() + { + return array( + // AM/PM (already covered by hours tests) + array('y-M-d HH:mm:ss a', '1970-1-1 00:00:00 AM', 0), + array('y-M-d HH:mm:ss a', '1970-1-1 00:00:00 PM', 43200), + ); + } + + public function parseStandaloneAmPmProvider() + { + return array( + array('a', 'AM', 0), + array('a', 'PM', 43200), + ); + } + + public function parseRegexMetaCharsProvider() + { + return array( + // regexp meta chars in the pattern string + array('y[M-d', '1970[1-1', 0), + array('y[M/d', '1970[1/1', 0), + ); + } + + public function parseQuoteCharsProvider() + { + return array( + array("'M'", 'M', 0), + array("'yy'", 'yy', 0), + array("'''yy'", "'yy", 0), + array("''y", "'1970", 0), + array("H 'o'' clock'", "0 o' clock", 0), + ); + } + + public function parseDashSlashProvider() + { + return array( + array('y-M-d', '1970/1/1', 0), + array('yy-M-d', '70/1/1', 0), + array('y/M/d', '1970-1-1', 0), + array('yy/M/d', '70-1-1', 0), + ); + } + + /** + * @dataProvider parseErrorProvider + */ + public function testParseError($pattern, $value) + { + $errorCode = IntlGlobals::U_PARSE_ERROR; + $errorMessage = 'Date parsing failed: U_PARSE_ERROR'; + + $formatter = $this->getDefaultDateFormatter($pattern); + $this->assertFalse($formatter->parse($value)); + $this->assertIsIntlFailure($formatter, $errorMessage, $errorCode); + } + + public function parseErrorProvider() + { + return array( + // 1 char month + array('y-MMMMM-d', '1970-J-1'), + array('y-MMMMM-d', '1970-S-1'), + + // standalone 1 char month + array('y-LLLLL-d', '1970-J-1'), + array('y-LLLLL-d', '1970-S-1'), + ); + } + + /* + * https://github.com/symfony/symfony/issues/4242 + */ + public function testParseAfterError() + { + $this->testParseError('y-MMMMM-d', '1970-J-1'); + $this->testParse('y-M-d', '1970-1-1', 0); + } + + public function testParseWithNullPositionValue() + { + $position = null; + $formatter = $this->getDefaultDateFormatter('y'); + $this->assertSame(0, $formatter->parse('1970', $position)); + $this->assertNull($position); + } + + public function testSetPattern() + { + $formatter = $this->getDefaultDateFormatter(); + $formatter->setPattern('yyyy-MM-dd'); + $this->assertEquals('yyyy-MM-dd', $formatter->getPattern()); + } + + /** + * @dataProvider setTimeZoneIdProvider + */ + public function testSetTimeZoneId($timeZoneId, $expectedTimeZoneId) + { + $formatter = $this->getDefaultDateFormatter(); + + $formatter->setTimeZone($timeZoneId); + + $this->assertEquals($expectedTimeZoneId, $formatter->getTimeZoneId()); + } + + public function setTimeZoneIdProvider() + { + return array( + array('UTC', 'UTC'), + array('GMT', 'GMT'), + array('GMT-03:00', 'GMT-03:00'), + array('Europe/Zurich', 'Europe/Zurich'), + array(null, date_default_timezone_get()), + array('Foo/Bar', 'UTC'), + array('GMT+00:AA', 'UTC'), + array('GMT+00AA', 'UTC'), + ); + } + + protected function getDefaultDateFormatter($pattern = null) + { + return $this->getDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, 'UTC', IntlDateFormatter::GREGORIAN, $pattern); + } + + protected function getDateTime($timestamp, $timeZone) + { + $dateTime = new \DateTime(); + $dateTime->setTimestamp(null === $timestamp ? time() : $timestamp); + $dateTime->setTimezone(new \DateTimeZone($timeZone ?: getenv('TZ') ?: 'UTC')); + + return $dateTime; + } + + protected function assertIsIntlFailure($formatter, $errorMessage, $errorCode) + { + $this->assertSame($errorMessage, $this->getIntlErrorMessage()); + $this->assertSame($errorCode, $this->getIntlErrorCode()); + $this->assertTrue($this->isIntlFailure($this->getIntlErrorCode())); + $this->assertSame($errorMessage, $formatter->getErrorMessage()); + $this->assertSame($errorCode, $formatter->getErrorCode()); + $this->assertTrue($this->isIntlFailure($formatter->getErrorCode())); + } + + protected function assertIsIntlSuccess($formatter, $errorMessage, $errorCode) + { + /* @var IntlDateFormatter $formatter */ + $this->assertSame($errorMessage, $this->getIntlErrorMessage()); + $this->assertSame($errorCode, $this->getIntlErrorCode()); + $this->assertFalse($this->isIntlFailure($this->getIntlErrorCode())); + $this->assertSame($errorMessage, $formatter->getErrorMessage()); + $this->assertSame($errorCode, $formatter->getErrorCode()); + $this->assertFalse($this->isIntlFailure($formatter->getErrorCode())); + } + + /** + * @param $locale + * @param $datetype + * @param $timetype + * @param null $timezone + * @param int $calendar + * @param null $pattern + * + * @return mixed + */ + abstract protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null); + + /** + * @return string + */ + abstract protected function getIntlErrorMessage(); + + /** + * @return int + */ + abstract protected function getIntlErrorCode(); + + /** + * @param int $errorCode + * + * @return bool + */ + abstract protected function isIntlFailure($errorCode); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1a2c35ffb7513fc0dd368786120c60b69a02c591 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php @@ -0,0 +1,228 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\DateFormatter; + +use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; +use Symfony\Component\Intl\Globals\IntlGlobals; + +class IntlDateFormatterTest extends AbstractIntlDateFormatterTest +{ + public function testConstructor() + { + $formatter = new IntlDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, 'UTC', IntlDateFormatter::GREGORIAN, 'y-M-d'); + $this->assertEquals('y-M-d', $formatter->getPattern()); + } + + public function testConstructorWithoutLocale() + { + $formatter = new IntlDateFormatter(null, IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, 'UTC', IntlDateFormatter::GREGORIAN, 'y-M-d'); + $this->assertEquals('y-M-d', $formatter->getPattern()); + } + + public function testConstructorWithoutCalendar() + { + $formatter = new IntlDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, 'UTC', null, 'y-M-d'); + $this->assertEquals('y-M-d', $formatter->getPattern()); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException + */ + public function testConstructorWithUnsupportedLocale() + { + new IntlDateFormatter('pt_BR', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT); + } + + public function testStaticCreate() + { + $formatter = IntlDateFormatter::create('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT); + $this->assertInstanceOf('\Symfony\Component\Intl\DateFormatter\IntlDateFormatter', $formatter); + } + + public function testFormatWithUnsupportedTimestampArgument() + { + $formatter = $this->getDefaultDateFormatter(); + + $localtime = array( + 'tm_sec' => 59, + 'tm_min' => 3, + 'tm_hour' => 15, + 'tm_mday' => 15, + 'tm_mon' => 3, + 'tm_year' => 112, + 'tm_wday' => 0, + 'tm_yday' => 105, + 'tm_isdst' => 0, + ); + + try { + $formatter->format($localtime); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException', $e); + + $this->assertStringEndsWith('Only integer Unix timestamps and DateTime objects are supported. Please install the "intl" extension for full localization capabilities.', $e->getMessage()); + } + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\NotImplementedException + */ + public function testFormatWithUnimplementedChars() + { + $pattern = 'Y'; + $formatter = new IntlDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, 'UTC', IntlDateFormatter::GREGORIAN, $pattern); + $formatter->format(0); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\NotImplementedException + */ + public function testFormatWithNonIntegerTimestamp() + { + $formatter = $this->getDefaultDateFormatter(); + $formatter->format(array()); + } + + public function testGetErrorCode() + { + $formatter = $this->getDefaultDateFormatter(); + $this->assertEquals(IntlGlobals::getErrorCode(), $formatter->getErrorCode()); + } + + public function testGetErrorMessage() + { + $formatter = $this->getDefaultDateFormatter(); + $this->assertEquals(IntlGlobals::getErrorMessage(), $formatter->getErrorMessage()); + } + + public function testIsLenient() + { + $formatter = $this->getDefaultDateFormatter(); + $this->assertFalse($formatter->isLenient()); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testLocaltime() + { + $formatter = $this->getDefaultDateFormatter(); + $formatter->localtime('Wednesday, December 31, 1969 4:00:00 PM PT'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException + */ + public function testParseWithNotNullPositionValue() + { + $position = 0; + $formatter = $this->getDefaultDateFormatter('y'); + $this->assertSame(0, $formatter->parse('1970', $position)); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testSetCalendar() + { + $formatter = $this->getDefaultDateFormatter(); + $formatter->setCalendar(IntlDateFormatter::GREGORIAN); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException + */ + public function testSetLenient() + { + $formatter = $this->getDefaultDateFormatter(); + $formatter->setLenient(true); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\NotImplementedException + */ + public function testFormatWithGmtTimeZoneAndMinutesOffset() + { + parent::testFormatWithGmtTimeZoneAndMinutesOffset(); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\NotImplementedException + */ + public function testFormatWithNonStandardTimezone() + { + parent::testFormatWithNonStandardTimezone(); + } + + public function parseStandaloneAmPmProvider() + { + return $this->notImplemented(parent::parseStandaloneAmPmProvider()); + } + + public function parseDayOfWeekProvider() + { + return $this->notImplemented(parent::parseDayOfWeekProvider()); + } + + public function parseDayOfYearProvider() + { + return $this->notImplemented(parent::parseDayOfYearProvider()); + } + + public function parseQuarterProvider() + { + return $this->notImplemented(parent::parseQuarterProvider()); + } + + protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null) + { + return new IntlDateFormatter($locale, $datetype, $timetype, $timezone, $calendar, $pattern); + } + + protected function getIntlErrorMessage() + { + return IntlGlobals::getErrorMessage(); + } + + protected function getIntlErrorCode() + { + return IntlGlobals::getErrorCode(); + } + + protected function isIntlFailure($errorCode) + { + return IntlGlobals::isFailure($errorCode); + } + + /** + * Just to document the differences between the stub and the intl + * implementations. The intl can parse any of the tested formats alone. The + * stub does not implement them as it would be needed to add more + * abstraction, passing more context to the transformers objects. Any of the + * formats are ignored alone or with date/time data (years, months, days, + * hours, minutes and seconds). + * + * Also in intl, format like 'ss E' for '10 2' (2nd day of year + * + 10 seconds) are added, then we have 86,400 seconds (24h * 60min * 60s) + * + 10 seconds + * + * @param array $dataSets + * + * @return array + */ + private function notImplemented(array $dataSets) + { + return array_map(function ($row) { + return array($row[0], $row[1], 0); + }, $dataSets); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/Verification/IntlDateFormatterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/Verification/IntlDateFormatterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a5d20638c1ebead2ca995644e043e5801b6dae01 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/DateFormatter/Verification/IntlDateFormatterTest.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\Component\Intl\Tests\DateFormatter\Verification; + +use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; +use Symfony\Component\Intl\Tests\DateFormatter\AbstractIntlDateFormatterTest; +use Symfony\Component\Intl\Util\IntlTestHelper; + +/** + * Verifies that {@link AbstractIntlDateFormatterTest} matches the behavior of + * the {@link \IntlDateFormatter} class in a specific version of ICU. + * + * @author Bernhard Schussek + */ +class IntlDateFormatterTest extends AbstractIntlDateFormatterTest +{ + protected function setUp() + { + IntlTestHelper::requireFullIntl($this, false); + + parent::setUp(); + } + + protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null) + { + IntlTestHelper::requireFullIntl($this, '55.1'); + + if (!$formatter = new \IntlDateFormatter($locale, $datetype, $timetype, $timezone, $calendar, $pattern)) { + throw new \InvalidArgumentException(intl_get_error_message()); + } + + return $formatter; + } + + protected function getIntlErrorMessage() + { + return intl_get_error_message(); + } + + protected function getIntlErrorCode() + { + return intl_get_error_code(); + } + + protected function isIntlFailure($errorCode) + { + return intl_is_failure($errorCode); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..57c75fb95494462759a23e7fbee8f9e0e802e6f9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.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\Component\Intl\Tests\Globals; + +use PHPUnit\Framework\TestCase; + +/** + * Test case for intl function implementations. + * + * @author Bernhard Schussek + */ +abstract class AbstractIntlGlobalsTest extends TestCase +{ + public function errorNameProvider() + { + return array( + array(-129, '[BOGUS UErrorCode]'), + array(0, 'U_ZERO_ERROR'), + array(1, 'U_ILLEGAL_ARGUMENT_ERROR'), + array(9, 'U_PARSE_ERROR'), + array(129, '[BOGUS UErrorCode]'), + ); + } + + /** + * @dataProvider errorNameProvider + */ + public function testGetErrorName($errorCode, $errorName) + { + $this->assertSame($errorName, $this->getIntlErrorName($errorCode)); + } + + abstract protected function getIntlErrorName($errorCode); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/IntlGlobalsTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/IntlGlobalsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..34e3a6a3a78752e08b0c794c28fc34668e4c0d08 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/IntlGlobalsTest.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Globals; + +use Symfony\Component\Intl\Globals\IntlGlobals; + +class IntlGlobalsTest extends AbstractIntlGlobalsTest +{ + protected function getIntlErrorName($errorCode) + { + return IntlGlobals::getErrorName($errorCode); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/Verification/IntlGlobalsTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/Verification/IntlGlobalsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b5cd1c13c32ff304347df5964e4eea3adb3f461f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Globals/Verification/IntlGlobalsTest.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\Component\Intl\Tests\Globals\Verification; + +use Symfony\Component\Intl\Tests\Globals\AbstractIntlGlobalsTest; +use Symfony\Component\Intl\Util\IntlTestHelper; + +/** + * Verifies that {@link AbstractIntlGlobalsTest} matches the behavior of the + * intl functions with a specific version of ICU. + * + * @author Bernhard Schussek + */ +class IntlGlobalsTest extends AbstractIntlGlobalsTest +{ + protected function setUp() + { + IntlTestHelper::requireFullIntl($this, false); + + parent::setUp(); + } + + protected function getIntlErrorName($errorCode) + { + return intl_error_name($errorCode); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/AbstractLocaleTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/AbstractLocaleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cf991c9bcc6d472687d19cb938b5007398c8ad7e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/AbstractLocaleTest.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Locale; + +use PHPUnit\Framework\TestCase; + +/** + * Test case for Locale implementations. + * + * @author Bernhard Schussek + */ +abstract class AbstractLocaleTest extends TestCase +{ + public function testSetDefault() + { + $this->call('setDefault', 'en_GB'); + + $this->assertSame('en_GB', $this->call('getDefault')); + } + + abstract protected function call($methodName); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..94572e6f2a60d88cf6f1cea0f10c2e1f1103501c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php @@ -0,0 +1,164 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Locale; + +class LocaleTest extends AbstractLocaleTest +{ + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testAcceptFromHttp() + { + $this->call('acceptFromHttp', 'pt-br,en-us;q=0.7,en;q=0.5'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testComposeLocale() + { + $subtags = array( + 'language' => 'pt', + 'script' => 'Latn', + 'region' => 'BR', + ); + $this->call('composeLocale', $subtags); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testFilterMatches() + { + $this->call('filterMatches', 'pt-BR', 'pt-BR'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetAllVariants() + { + $this->call('getAllVariants', 'pt_BR_Latn'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetDisplayLanguage() + { + $this->call('getDisplayLanguage', 'pt-Latn-BR', 'en'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetDisplayName() + { + $this->call('getDisplayName', 'pt-Latn-BR', 'en'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetDisplayRegion() + { + $this->call('getDisplayRegion', 'pt-Latn-BR', 'en'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetDisplayScript() + { + $this->call('getDisplayScript', 'pt-Latn-BR', 'en'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetDisplayVariant() + { + $this->call('getDisplayVariant', 'pt-Latn-BR', 'en'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetKeywords() + { + $this->call('getKeywords', 'pt-BR@currency=BRL'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetPrimaryLanguage() + { + $this->call('getPrimaryLanguage', 'pt-Latn-BR'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetRegion() + { + $this->call('getRegion', 'pt-Latn-BR'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetScript() + { + $this->call('getScript', 'pt-Latn-BR'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testLookup() + { + $langtag = array( + 'pt-Latn-BR', + 'pt-BR', + ); + $this->call('lookup', $langtag, 'pt-BR-x-priv1'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testParseLocale() + { + $this->call('parseLocale', 'pt-Latn-BR'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testSetDefault() + { + $this->call('setDefault', 'pt_BR'); + } + + public function testSetDefaultAcceptsEn() + { + $this->call('setDefault', 'en'); + } + + protected function call($methodName) + { + $args = array_slice(func_get_args(), 1); + + return call_user_func_array(array('Symfony\Component\Intl\Locale\Locale', $methodName), $args); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..adfec280a79974d0c430fb5e0d58c95dfb8ab2bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Locale\Verification; + +use Symfony\Component\Intl\Tests\Locale\AbstractLocaleTest; +use Symfony\Component\Intl\Util\IntlTestHelper; + +/** + * Verifies that {@link AbstractLocaleTest} matches the behavior of the + * {@link Locale} class with a specific version of ICU. + * + * @author Bernhard Schussek + */ +class LocaleTest extends AbstractLocaleTest +{ + protected function setUp() + { + IntlTestHelper::requireFullIntl($this, false); + + parent::setUp(); + } + + protected function call($methodName) + { + $args = array_slice(func_get_args(), 1); + + return call_user_func_array(array('Locale', $methodName), $args); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dfba0b180203b535882632e79274b3f427877c3a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php @@ -0,0 +1,826 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\NumberFormatter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Globals\IntlGlobals; +use Symfony\Component\Intl\NumberFormatter\NumberFormatter; +use Symfony\Component\Intl\Util\IntlTestHelper; + +/** + * Note that there are some values written like -2147483647 - 1. This is the lower 32bit int max and is a known + * behavior of PHP. + */ +abstract class AbstractNumberFormatterTest extends TestCase +{ + /** + * @dataProvider formatCurrencyWithDecimalStyleProvider + */ + public function testFormatCurrencyWithDecimalStyle($value, $currency, $expected) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $this->assertEquals($expected, $formatter->formatCurrency($value, $currency)); + } + + public function formatCurrencyWithDecimalStyleProvider() + { + return array( + array(100, 'ALL', '100'), + array(100, 'BRL', '100.00'), + array(100, 'CRC', '100'), + array(100, 'JPY', '100'), + array(100, 'CHF', '100'), + array(-100, 'ALL', '-100'), + array(-100, 'BRL', '-100'), + array(-100, 'CRC', '-100'), + array(-100, 'JPY', '-100'), + array(-100, 'CHF', '-100'), + array(1000.12, 'ALL', '1,000.12'), + array(1000.12, 'BRL', '1,000.12'), + array(1000.12, 'CRC', '1,000.12'), + array(1000.12, 'JPY', '1,000.12'), + array(1000.12, 'CHF', '1,000.12'), + ); + } + + /** + * @dataProvider formatCurrencyWithCurrencyStyleProvider + */ + public function testFormatCurrencyWithCurrencyStyle($value, $currency, $expected) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); + $this->assertEquals($expected, $formatter->formatCurrency($value, $currency)); + } + + public function formatCurrencyWithCurrencyStyleProvider() + { + return array( + array(100, 'ALL', 'ALL100'), + array(-100, 'ALL', '-ALL100'), + array(1000.12, 'ALL', 'ALL1,000'), + + array(100, 'JPY', 'Â¥100'), + array(-100, 'JPY', '-Â¥100'), + array(1000.12, 'JPY', 'Â¥1,000'), + + array(100, 'EUR', '€100.00'), + array(-100, 'EUR', '-€100.00'), + array(1000.12, 'EUR', '€1,000.12'), + ); + } + + /** + * @dataProvider formatCurrencyWithCurrencyStyleCostaRicanColonsRoundingProvider + */ + public function testFormatCurrencyWithCurrencyStyleCostaRicanColonsRounding($value, $currency, $symbol, $expected) + { + IntlTestHelper::requireIntl($this, '58.1'); + + $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); + $this->assertEquals(sprintf($expected, $symbol), $formatter->formatCurrency($value, $currency)); + } + + public function formatCurrencyWithCurrencyStyleCostaRicanColonsRoundingProvider() + { + return array( + array(100, 'CRC', 'CRC', '%s100.00'), + array(-100, 'CRC', 'CRC', '-%s100.00'), + array(1000.12, 'CRC', 'CRC', '%s1,000.12'), + ); + } + + /** + * @dataProvider formatCurrencyWithCurrencyStyleBrazilianRealRoundingProvider + */ + public function testFormatCurrencyWithCurrencyStyleBrazilianRealRounding($value, $currency, $symbol, $expected) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); + $this->assertEquals(sprintf($expected, $symbol), $formatter->formatCurrency($value, $currency)); + } + + public function formatCurrencyWithCurrencyStyleBrazilianRealRoundingProvider() + { + return array( + array(100, 'BRL', 'R', '%s$100.00'), + array(-100, 'BRL', 'R', '-%s$100.00'), + array(1000.12, 'BRL', 'R', '%s$1,000.12'), + + // Rounding checks + array(1000.121, 'BRL', 'R', '%s$1,000.12'), + array(1000.123, 'BRL', 'R', '%s$1,000.12'), + array(1000.125, 'BRL', 'R', '%s$1,000.12'), + array(1000.127, 'BRL', 'R', '%s$1,000.13'), + array(1000.129, 'BRL', 'R', '%s$1,000.13'), + array(11.50999, 'BRL', 'R', '%s$11.51'), + array(11.9999464, 'BRL', 'R', '%s$12.00'), + ); + } + + /** + * @dataProvider formatCurrencyWithCurrencyStyleSwissRoundingProvider + */ + public function testFormatCurrencyWithCurrencyStyleSwissRounding($value, $currency, $symbol, $expected) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); + $this->assertEquals(sprintf($expected, $symbol), $formatter->formatCurrency($value, $currency)); + } + + public function formatCurrencyWithCurrencyStyleSwissRoundingProvider() + { + return array( + array(100, 'CHF', 'CHF', '%s100.00'), + array(-100, 'CHF', 'CHF', '-%s100.00'), + array(1000.12, 'CHF', 'CHF', '%s1,000.12'), + array('1000.12', 'CHF', 'CHF', '%s1,000.12'), + + // Rounding checks + array(1000.121, 'CHF', 'CHF', '%s1,000.12'), + array(1000.123, 'CHF', 'CHF', '%s1,000.12'), + array(1000.125, 'CHF', 'CHF', '%s1,000.12'), + array(1000.127, 'CHF', 'CHF', '%s1,000.13'), + array(1000.129, 'CHF', 'CHF', '%s1,000.13'), + + array(1200000.00, 'CHF', 'CHF', '%s1,200,000.00'), + array(1200000.1, 'CHF', 'CHF', '%s1,200,000.10'), + array(1200000.10, 'CHF', 'CHF', '%s1,200,000.10'), + array(1200000.101, 'CHF', 'CHF', '%s1,200,000.10'), + ); + } + + public function testFormat() + { + $errorCode = IntlGlobals::U_ZERO_ERROR; + $errorMessage = 'U_ZERO_ERROR'; + + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $this->assertSame('9.555', $formatter->format(9.555)); + + $this->assertSame($errorMessage, $this->getIntlErrorMessage()); + $this->assertSame($errorCode, $this->getIntlErrorCode()); + $this->assertFalse($this->isIntlFailure($this->getIntlErrorCode())); + $this->assertSame($errorMessage, $formatter->getErrorMessage()); + $this->assertSame($errorCode, $formatter->getErrorCode()); + $this->assertFalse($this->isIntlFailure($formatter->getErrorCode())); + } + + public function testFormatWithCurrencyStyle() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); + $this->assertEquals('¤1.00', $formatter->format(1)); + } + + /** + * @dataProvider formatTypeInt32Provider + */ + public function testFormatTypeInt32($formatter, $value, $expected, $message = '') + { + $formattedValue = $formatter->format($value, NumberFormatter::TYPE_INT32); + $this->assertEquals($expected, $formattedValue, $message); + } + + public function formatTypeInt32Provider() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + + $message = '->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range.'; + + return array( + array($formatter, 1, '1'), + array($formatter, 1.1, '1'), + array($formatter, 2147483648, '-2,147,483,648', $message), + array($formatter, -2147483649, '2,147,483,647', $message), + ); + } + + /** + * @dataProvider formatTypeInt32WithCurrencyStyleProvider + */ + public function testFormatTypeInt32WithCurrencyStyle($formatter, $value, $expected, $message = '') + { + $formattedValue = $formatter->format($value, NumberFormatter::TYPE_INT32); + $this->assertEquals($expected, $formattedValue, $message); + } + + public function formatTypeInt32WithCurrencyStyleProvider() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); + + $message = '->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range.'; + + return array( + array($formatter, 1, '¤1.00'), + array($formatter, 1.1, '¤1.00'), + array($formatter, 2147483648, '-¤2,147,483,648.00', $message), + array($formatter, -2147483649, '¤2,147,483,647.00', $message), + ); + } + + /** + * The parse() method works differently with integer out of the 32 bit range. format() works fine. + * + * @dataProvider formatTypeInt64Provider + */ + public function testFormatTypeInt64($formatter, $value, $expected) + { + $formattedValue = $formatter->format($value, NumberFormatter::TYPE_INT64); + $this->assertEquals($expected, $formattedValue); + } + + public function formatTypeInt64Provider() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + + return array( + array($formatter, 1, '1'), + array($formatter, 1.1, '1'), + array($formatter, 2147483648, '2,147,483,648'), + array($formatter, -2147483649, '-2,147,483,649'), + ); + } + + /** + * @dataProvider formatTypeInt64WithCurrencyStyleProvider + */ + public function testFormatTypeInt64WithCurrencyStyle($formatter, $value, $expected) + { + $formattedValue = $formatter->format($value, NumberFormatter::TYPE_INT64); + $this->assertEquals($expected, $formattedValue); + } + + public function formatTypeInt64WithCurrencyStyleProvider() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); + + return array( + array($formatter, 1, '¤1.00'), + array($formatter, 1.1, '¤1.00'), + array($formatter, 2147483648, '¤2,147,483,648.00'), + array($formatter, -2147483649, '-¤2,147,483,649.00'), + ); + } + + /** + * @dataProvider formatTypeDoubleProvider + */ + public function testFormatTypeDouble($formatter, $value, $expected) + { + $formattedValue = $formatter->format($value, NumberFormatter::TYPE_DOUBLE); + $this->assertEquals($expected, $formattedValue); + } + + public function formatTypeDoubleProvider() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + + return array( + array($formatter, 1, '1'), + array($formatter, 1.1, '1.1'), + ); + } + + /** + * @dataProvider formatTypeDoubleWithCurrencyStyleProvider + */ + public function testFormatTypeDoubleWithCurrencyStyle($formatter, $value, $expected) + { + $formattedValue = $formatter->format($value, NumberFormatter::TYPE_DOUBLE); + $this->assertEquals($expected, $formattedValue); + } + + public function formatTypeDoubleWithCurrencyStyleProvider() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); + + return array( + array($formatter, 1, '¤1.00'), + array($formatter, 1.1, '¤1.10'), + ); + } + + /** + * @dataProvider formatTypeCurrencyProvider + */ + public function testFormatTypeCurrency($formatter, $value) + { + $exceptionCode = 'PHPUnit\Framework\Error\Warning'; + + if (class_exists('PHPUnit_Framework_Error_Warning')) { + $exceptionCode = 'PHPUnit_Framework_Error_Warning'; + } + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}($exceptionCode); + + $formatter->format($value, NumberFormatter::TYPE_CURRENCY); + } + + /** + * @dataProvider formatTypeCurrencyProvider + */ + public function testFormatTypeCurrencyReturn($formatter, $value) + { + $this->assertFalse(@$formatter->format($value, NumberFormatter::TYPE_CURRENCY)); + } + + public function formatTypeCurrencyProvider() + { + $df = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $cf = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); + + return array( + array($df, 1), + array($cf, 1), + ); + } + + /** + * @dataProvider formatFractionDigitsProvider + */ + public function testFormatFractionDigits($value, $expected, $fractionDigits = null, $expectedFractionDigits = 1) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + + $attributeRet = null; + if (null !== $fractionDigits) { + $attributeRet = $formatter->setAttribute(NumberFormatter::FRACTION_DIGITS, $fractionDigits); + } + + $formattedValue = $formatter->format($value); + $this->assertSame($expected, $formattedValue); + $this->assertSame($expectedFractionDigits, $formatter->getAttribute(NumberFormatter::FRACTION_DIGITS)); + + if (null !== $attributeRet) { + $this->assertTrue($attributeRet); + } + } + + public function formatFractionDigitsProvider() + { + return array( + array(1.123, '1.123', null, 0), + array(1.123, '1', 0, 0), + array(1.123, '1.1', 1, 1), + array(1.123, '1.12', 2, 2), + array(1.123, '1', -1, 0), + array(1.123, '1', 'abc', 0), + ); + } + + /** + * @dataProvider formatGroupingUsedProvider + */ + public function testFormatGroupingUsed($value, $expected, $groupingUsed = null, $expectedGroupingUsed = 1) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + + $attributeRet = null; + if (null !== $groupingUsed) { + $attributeRet = $formatter->setAttribute(NumberFormatter::GROUPING_USED, $groupingUsed); + } + + $formattedValue = $formatter->format($value); + $this->assertSame($expected, $formattedValue); + $this->assertSame($expectedGroupingUsed, $formatter->getAttribute(NumberFormatter::GROUPING_USED)); + + if (null !== $attributeRet) { + $this->assertTrue($attributeRet); + } + } + + public function formatGroupingUsedProvider() + { + return array( + array(1000, '1,000', null, 1), + array(1000, '1000', 0, 0), + array(1000, '1,000', 1, 1), + array(1000, '1,000', 2, 1), + array(1000, '1000', 'abc', 0), + array(1000, '1,000', -1, 1), + ); + } + + /** + * @dataProvider formatRoundingModeRoundHalfUpProvider + */ + public function testFormatRoundingModeHalfUp($value, $expected) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setAttribute(NumberFormatter::FRACTION_DIGITS, 2); + + $formatter->setAttribute(NumberFormatter::ROUNDING_MODE, NumberFormatter::ROUND_HALFUP); + $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_HALFUP rounding mode.'); + } + + public function formatRoundingModeRoundHalfUpProvider() + { + // The commented value is differently rounded by intl's NumberFormatter in 32 and 64 bit architectures + return array( + array(1.121, '1.12'), + array(1.123, '1.12'), + // array(1.125, '1.13'), + array(1.127, '1.13'), + array(1.129, '1.13'), + ); + } + + /** + * @dataProvider formatRoundingModeRoundHalfDownProvider + */ + public function testFormatRoundingModeHalfDown($value, $expected) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setAttribute(NumberFormatter::FRACTION_DIGITS, 2); + + $formatter->setAttribute(NumberFormatter::ROUNDING_MODE, NumberFormatter::ROUND_HALFDOWN); + $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_HALFDOWN rounding mode.'); + } + + public function formatRoundingModeRoundHalfDownProvider() + { + return array( + array(1.121, '1.12'), + array(1.123, '1.12'), + array(1.125, '1.12'), + array(1.127, '1.13'), + array(1.129, '1.13'), + ); + } + + /** + * @dataProvider formatRoundingModeRoundHalfEvenProvider + */ + public function testFormatRoundingModeHalfEven($value, $expected) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setAttribute(NumberFormatter::FRACTION_DIGITS, 2); + + $formatter->setAttribute(NumberFormatter::ROUNDING_MODE, NumberFormatter::ROUND_HALFEVEN); + $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_HALFEVEN rounding mode.'); + } + + public function formatRoundingModeRoundHalfEvenProvider() + { + return array( + array(1.121, '1.12'), + array(1.123, '1.12'), + array(1.125, '1.12'), + array(1.127, '1.13'), + array(1.129, '1.13'), + ); + } + + /** + * @dataProvider formatRoundingModeRoundCeilingProvider + */ + public function testFormatRoundingModeCeiling($value, $expected) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setAttribute(NumberFormatter::FRACTION_DIGITS, 2); + + $formatter->setAttribute(NumberFormatter::ROUNDING_MODE, NumberFormatter::ROUND_CEILING); + $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_CEILING rounding mode.'); + } + + public function formatRoundingModeRoundCeilingProvider() + { + return array( + array(1.123, '1.13'), + array(1.125, '1.13'), + array(1.127, '1.13'), + array(-1.123, '-1.12'), + array(-1.125, '-1.12'), + array(-1.127, '-1.12'), + ); + } + + /** + * @dataProvider formatRoundingModeRoundFloorProvider + */ + public function testFormatRoundingModeFloor($value, $expected) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setAttribute(NumberFormatter::FRACTION_DIGITS, 2); + + $formatter->setAttribute(NumberFormatter::ROUNDING_MODE, NumberFormatter::ROUND_FLOOR); + $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_FLOOR rounding mode.'); + } + + public function formatRoundingModeRoundFloorProvider() + { + return array( + array(1.123, '1.12'), + array(1.125, '1.12'), + array(1.127, '1.12'), + array(-1.123, '-1.13'), + array(-1.125, '-1.13'), + array(-1.127, '-1.13'), + ); + } + + /** + * @dataProvider formatRoundingModeRoundDownProvider + */ + public function testFormatRoundingModeDown($value, $expected) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setAttribute(NumberFormatter::FRACTION_DIGITS, 2); + + $formatter->setAttribute(NumberFormatter::ROUNDING_MODE, NumberFormatter::ROUND_DOWN); + $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_DOWN rounding mode.'); + } + + public function formatRoundingModeRoundDownProvider() + { + return array( + array(1.123, '1.12'), + array(1.125, '1.12'), + array(1.127, '1.12'), + array(-1.123, '-1.12'), + array(-1.125, '-1.12'), + array(-1.127, '-1.12'), + ); + } + + /** + * @dataProvider formatRoundingModeRoundUpProvider + */ + public function testFormatRoundingModeUp($value, $expected) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setAttribute(NumberFormatter::FRACTION_DIGITS, 2); + + $formatter->setAttribute(NumberFormatter::ROUNDING_MODE, NumberFormatter::ROUND_UP); + $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_UP rounding mode.'); + } + + public function formatRoundingModeRoundUpProvider() + { + return array( + array(1.123, '1.13'), + array(1.125, '1.13'), + array(1.127, '1.13'), + array(-1.123, '-1.13'), + array(-1.125, '-1.13'), + array(-1.127, '-1.13'), + ); + } + + public function testGetLocale() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $this->assertEquals('en', $formatter->getLocale()); + } + + public function testGetSymbol() + { + $decimalFormatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $currencyFormatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); + + $r = new \ReflectionProperty('Symfony\Component\Intl\NumberFormatter\NumberFormatter', 'enSymbols'); + $r->setAccessible(true); + $expected = $r->getValue('Symfony\Component\Intl\NumberFormatter\NumberFormatter'); + + for ($i = 0; $i <= 17; ++$i) { + $this->assertSame($expected[1][$i], $decimalFormatter->getSymbol($i)); + $this->assertSame($expected[2][$i], $currencyFormatter->getSymbol($i)); + } + } + + public function testGetTextAttribute() + { + $decimalFormatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $currencyFormatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); + + $r = new \ReflectionProperty('Symfony\Component\Intl\NumberFormatter\NumberFormatter', 'enTextAttributes'); + $r->setAccessible(true); + $expected = $r->getValue('Symfony\Component\Intl\NumberFormatter\NumberFormatter'); + + for ($i = 0; $i <= 5; ++$i) { + $this->assertSame($expected[1][$i], $decimalFormatter->getTextAttribute($i)); + $this->assertSame($expected[2][$i], $currencyFormatter->getTextAttribute($i)); + } + } + + /** + * @dataProvider parseProvider + */ + public function testParse($value, $expected, $message, $expectedPosition, $groupingUsed = true) + { + $position = 0; + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setAttribute(NumberFormatter::GROUPING_USED, $groupingUsed); + $parsedValue = $formatter->parse($value, NumberFormatter::TYPE_DOUBLE, $position); + $this->assertSame($expected, $parsedValue, $message); + $this->assertSame($expectedPosition, $position, $message); + + if ($expected === false) { + $errorCode = IntlGlobals::U_PARSE_ERROR; + $errorMessage = 'Number parsing failed: U_PARSE_ERROR'; + } else { + $errorCode = IntlGlobals::U_ZERO_ERROR; + $errorMessage = 'U_ZERO_ERROR'; + } + + $this->assertSame($errorMessage, $this->getIntlErrorMessage()); + $this->assertSame($errorCode, $this->getIntlErrorCode()); + $this->assertSame($errorCode !== 0, $this->isIntlFailure($this->getIntlErrorCode())); + $this->assertSame($errorMessage, $formatter->getErrorMessage()); + $this->assertSame($errorCode, $formatter->getErrorCode()); + $this->assertSame($errorCode !== 0, $this->isIntlFailure($formatter->getErrorCode())); + } + + public function parseProvider() + { + return array( + array('prefix1', false, '->parse() does not parse a number with a string prefix.', 0), + array('1.4suffix', (float) 1.4, '->parse() parses a number with a string suffix.', 3), + array('-.4suffix', (float) -0.4, '->parse() parses a negative dot float with suffix.', 3), + array('-123,4', false, '->parse() does not parse when invalid grouping used.', 6), + array('-1234,567', false, '->parse() does not parse when invalid grouping used.', 5), + array('-123,,456', false, '->parse() does not parse when invalid grouping used.', 4), + array('-123,,456', -123.0, '->parse() parses when grouping is disabled.', 4, false), + ); + } + + public function testParseTypeDefault() + { + $exceptionCode = 'PHPUnit\Framework\Error\Warning'; + + if (class_exists('PHPUnit_Framework_Error_Warning')) { + $exceptionCode = 'PHPUnit_Framework_Error_Warning'; + } + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}($exceptionCode); + + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->parse('1', NumberFormatter::TYPE_DEFAULT); + } + + /** + * @dataProvider parseTypeInt32Provider + */ + public function testParseTypeInt32($value, $expected, $message = '') + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $parsedValue = $formatter->parse($value, NumberFormatter::TYPE_INT32); + $this->assertSame($expected, $parsedValue, $message); + } + + public function parseTypeInt32Provider() + { + return array( + array('1', 1), + array('1.1', 1), + array('.1', 0), + array('2,147,483,647', 2147483647), + array('-2,147,483,648', -2147483647 - 1), + array('2,147,483,648', false, '->parse() TYPE_INT32 returns false when the number is greater than the integer positive range.'), + array('-2,147,483,649', false, '->parse() TYPE_INT32 returns false when the number is greater than the integer negative range.'), + ); + } + + public function testParseTypeInt64With32BitIntegerInPhp32Bit() + { + IntlTestHelper::require32Bit($this); + + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + + $parsedValue = $formatter->parse('2,147,483,647', NumberFormatter::TYPE_INT64); + $this->assertInternalType('integer', $parsedValue); + $this->assertEquals(2147483647, $parsedValue); + + $parsedValue = $formatter->parse('-2,147,483,648', NumberFormatter::TYPE_INT64); + $this->assertInternalType('int', $parsedValue); + $this->assertEquals(-2147483648, $parsedValue); + } + + public function testParseTypeInt64With32BitIntegerInPhp64Bit() + { + IntlTestHelper::require64Bit($this); + + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + + $parsedValue = $formatter->parse('2,147,483,647', NumberFormatter::TYPE_INT64); + $this->assertInternalType('integer', $parsedValue); + $this->assertEquals(2147483647, $parsedValue); + + $parsedValue = $formatter->parse('-2,147,483,648', NumberFormatter::TYPE_INT64); + $this->assertInternalType('integer', $parsedValue); + $this->assertEquals(-2147483647 - 1, $parsedValue); + } + + /** + * If PHP is compiled in 32bit mode, the returned value for a 64bit integer are float numbers. + */ + public function testParseTypeInt64With64BitIntegerInPhp32Bit() + { + IntlTestHelper::require32Bit($this); + + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + + // int 64 using only 32 bit range strangeness + $parsedValue = $formatter->parse('2,147,483,648', NumberFormatter::TYPE_INT64); + $this->assertInternalType('float', $parsedValue); + $this->assertEquals(2147483648, $parsedValue, '->parse() TYPE_INT64 does not use true 64 bit integers, using only the 32 bit range.'); + + $parsedValue = $formatter->parse('-2,147,483,649', NumberFormatter::TYPE_INT64); + $this->assertInternalType('float', $parsedValue); + $this->assertEquals(-2147483649, $parsedValue, '->parse() TYPE_INT64 does not use true 64 bit integers, using only the 32 bit range.'); + } + + /** + * If PHP is compiled in 64bit mode, the returned value for a 64bit integer are 32bit integer numbers. + */ + public function testParseTypeInt64With64BitIntegerInPhp64Bit() + { + IntlTestHelper::require64Bit($this); + + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + + $parsedValue = $formatter->parse('2,147,483,648', NumberFormatter::TYPE_INT64); + $this->assertInternalType('integer', $parsedValue); + + $this->assertEquals(2147483648, $parsedValue, '->parse() TYPE_INT64 uses true 64 bit integers (PHP >= 5.3.14 and PHP >= 5.4.4).'); + + $parsedValue = $formatter->parse('-2,147,483,649', NumberFormatter::TYPE_INT64); + $this->assertInternalType('integer', $parsedValue); + + $this->assertEquals(-2147483649, $parsedValue, '->parse() TYPE_INT64 uses true 64 bit integers (PHP >= 5.3.14 and PHP >= 5.4.4).'); + } + + /** + * @dataProvider parseTypeDoubleProvider + */ + public function testParseTypeDouble($value, $expectedValue) + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $parsedValue = $formatter->parse($value, NumberFormatter::TYPE_DOUBLE); + $this->assertEquals($expectedValue, $parsedValue, '', 0.001); + } + + public function parseTypeDoubleProvider() + { + return array( + array('1', (float) 1), + array('1.1', 1.1), + array('9,223,372,036,854,775,808', 9223372036854775808), + array('-9,223,372,036,854,775,809', -9223372036854775809), + ); + } + + public function testParseTypeCurrency() + { + $exceptionCode = 'PHPUnit\Framework\Error\Warning'; + + if (class_exists('PHPUnit_Framework_Error_Warning')) { + $exceptionCode = 'PHPUnit_Framework_Error_Warning'; + } + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}($exceptionCode); + + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->parse('1', NumberFormatter::TYPE_CURRENCY); + } + + public function testParseWithNotNullPositionValue() + { + $position = 1; + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->parse('123', NumberFormatter::TYPE_DOUBLE, $position); + $this->assertEquals(3, $position); + } + + /** + * @param string $locale + * @param null $style + * @param null $pattern + * + * @return \NumberFormatter + */ + abstract protected function getNumberFormatter($locale = 'en', $style = null, $pattern = null); + + /** + * @return string + */ + abstract protected function getIntlErrorMessage(); + + /** + * @return int + */ + abstract protected function getIntlErrorCode(); + + /** + * @param int $errorCode + * + * @return bool + */ + abstract protected function isIntlFailure($errorCode); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/NumberFormatterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/NumberFormatterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4a6fa9d3f7414b688919943bd524a1d3ed0a5bd5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/NumberFormatterTest.php @@ -0,0 +1,213 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\NumberFormatter; + +use Symfony\Component\Intl\Globals\IntlGlobals; +use Symfony\Component\Intl\NumberFormatter\NumberFormatter; + +/** + * Note that there are some values written like -2147483647 - 1. This is the lower 32bit int max and is a known + * behavior of PHP. + */ +class NumberFormatterTest extends AbstractNumberFormatterTest +{ + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException + */ + public function testConstructorWithUnsupportedLocale() + { + new NumberFormatter('pt_BR'); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException + */ + public function testConstructorWithUnsupportedStyle() + { + new NumberFormatter('en', NumberFormatter::PATTERN_DECIMAL); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException + */ + public function testConstructorWithPatternDifferentThanNull() + { + new NumberFormatter('en', NumberFormatter::DECIMAL, ''); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException + */ + public function testSetAttributeWithUnsupportedAttribute() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setAttribute(NumberFormatter::LENIENT_PARSE, null); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException + */ + public function testSetAttributeInvalidRoundingMode() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setAttribute(NumberFormatter::ROUNDING_MODE, null); + } + + public function testConstructWithoutLocale() + { + $this->assertInstanceOf( + '\Symfony\Component\Intl\NumberFormatter\NumberFormatter', + $this->getNumberFormatter(null, NumberFormatter::DECIMAL) + ); + } + + public function testCreate() + { + $this->assertInstanceOf( + '\Symfony\Component\Intl\NumberFormatter\NumberFormatter', + NumberFormatter::create('en', NumberFormatter::DECIMAL) + ); + } + + /** + * @expectedException \RuntimeException + */ + public function testFormatWithCurrencyStyle() + { + parent::testFormatWithCurrencyStyle(); + } + + /** + * @dataProvider formatTypeInt32Provider + * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException + */ + public function testFormatTypeInt32($formatter, $value, $expected, $message = '') + { + parent::testFormatTypeInt32($formatter, $value, $expected, $message); + } + + /** + * @dataProvider formatTypeInt32WithCurrencyStyleProvider + * @expectedException \Symfony\Component\Intl\Exception\NotImplementedException + */ + public function testFormatTypeInt32WithCurrencyStyle($formatter, $value, $expected, $message = '') + { + parent::testFormatTypeInt32WithCurrencyStyle($formatter, $value, $expected, $message); + } + + /** + * @dataProvider formatTypeInt64Provider + * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException + */ + public function testFormatTypeInt64($formatter, $value, $expected) + { + parent::testFormatTypeInt64($formatter, $value, $expected); + } + + /** + * @dataProvider formatTypeInt64WithCurrencyStyleProvider + * @expectedException \Symfony\Component\Intl\Exception\NotImplementedException + */ + public function testFormatTypeInt64WithCurrencyStyle($formatter, $value, $expected) + { + parent::testFormatTypeInt64WithCurrencyStyle($formatter, $value, $expected); + } + + /** + * @dataProvider formatTypeDoubleProvider + * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException + */ + public function testFormatTypeDouble($formatter, $value, $expected) + { + parent::testFormatTypeDouble($formatter, $value, $expected); + } + + /** + * @dataProvider formatTypeDoubleWithCurrencyStyleProvider + * @expectedException \Symfony\Component\Intl\Exception\NotImplementedException + */ + public function testFormatTypeDoubleWithCurrencyStyle($formatter, $value, $expected) + { + parent::testFormatTypeDoubleWithCurrencyStyle($formatter, $value, $expected); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testGetPattern() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->getPattern(); + } + + public function testGetErrorCode() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $this->assertEquals(IntlGlobals::U_ZERO_ERROR, $formatter->getErrorCode()); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testParseCurrency() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->parseCurrency(null, $currency); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testSetPattern() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setPattern(null); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testSetSymbol() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setSymbol(null, null); + } + + /** + * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException + */ + public function testSetTextAttribute() + { + $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); + $formatter->setTextAttribute(null, null); + } + + protected function getNumberFormatter($locale = 'en', $style = null, $pattern = null) + { + return new NumberFormatter($locale, $style, $pattern); + } + + protected function getIntlErrorMessage() + { + return IntlGlobals::getErrorMessage(); + } + + protected function getIntlErrorCode() + { + return IntlGlobals::getErrorCode(); + } + + protected function isIntlFailure($errorCode) + { + return IntlGlobals::isFailure($errorCode); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2e1e9e5bb60b49116d17ab6ea8f27f1824f3a46d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\NumberFormatter\Verification; + +use Symfony\Component\Intl\Tests\NumberFormatter\AbstractNumberFormatterTest; +use Symfony\Component\Intl\Util\IntlTestHelper; + +/** + * Note that there are some values written like -2147483647 - 1. This is the lower 32bit int max and is a known + * behavior of PHP. + */ +class NumberFormatterTest extends AbstractNumberFormatterTest +{ + protected function setUp() + { + IntlTestHelper::requireFullIntl($this, '55.1'); + + parent::setUp(); + } + + public function testCreate() + { + $this->assertInstanceOf('\NumberFormatter', \NumberFormatter::create('en', \NumberFormatter::DECIMAL)); + } + + public function testGetTextAttribute() + { + IntlTestHelper::requireFullIntl($this, '57.1'); + + parent::testGetTextAttribute(); + } + + protected function getNumberFormatter($locale = 'en', $style = null, $pattern = null) + { + return new \NumberFormatter($locale, $style, $pattern); + } + + protected function getIntlErrorMessage() + { + return intl_get_error_message(); + } + + protected function getIntlErrorCode() + { + return intl_get_error_code(); + } + + protected function isIntlFailure($errorCode) + { + return intl_is_failure($errorCode); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2fe7a0e4587b6c9f8716afa74309b111db701a59 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Util\IcuVersion; + +/** + * @author Bernhard Schussek + */ +class IcuVersionTest extends TestCase +{ + public function normalizeProvider() + { + return array( + array(null, '1', '10'), + array(null, '1.2', '12'), + array(null, '1.2.3', '12.3'), + array(null, '1.2.3.4', '12.3.4'), + array(1, '1', '10'), + array(1, '1.2', '12'), + array(1, '1.2.3', '12'), + array(1, '1.2.3.4', '12'), + array(2, '1', '10'), + array(2, '1.2', '12'), + array(2, '1.2.3', '12.3'), + array(2, '1.2.3.4', '12.3'), + array(3, '1', '10'), + array(3, '1.2', '12'), + array(3, '1.2.3', '12.3'), + array(3, '1.2.3.4', '12.3.4'), + ); + } + + /** + * @dataProvider normalizeProvider + */ + public function testNormalize($precision, $version, $result) + { + $this->assertSame($result, IcuVersion::normalize($version, $precision)); + } + + public function compareProvider() + { + return array( + array(null, '1', '==', '1', true), + array(null, '1.0', '==', '1.1', false), + array(null, '1.0.0', '==', '1.0.1', false), + array(null, '1.0.0.0', '==', '1.0.0.1', false), + array(null, '1.0.0.0.0', '==', '1.0.0.0.1', false), + + array(null, '1', '==', '10', true), + array(null, '1.0', '==', '11', false), + array(null, '1.0.0', '==', '10.1', false), + array(null, '1.0.0.0', '==', '10.0.1', false), + array(null, '1.0.0.0.0', '==', '10.0.0.1', false), + + array(1, '1', '==', '1', true), + array(1, '1.0', '==', '1.1', false), + array(1, '1.0.0', '==', '1.0.1', true), + array(1, '1.0.0.0', '==', '1.0.0.1', true), + array(1, '1.0.0.0.0', '==', '1.0.0.0.1', true), + + array(1, '1', '==', '10', true), + array(1, '1.0', '==', '11', false), + array(1, '1.0.0', '==', '10.1', true), + array(1, '1.0.0.0', '==', '10.0.1', true), + array(1, '1.0.0.0.0', '==', '10.0.0.1', true), + + array(2, '1', '==', '1', true), + array(2, '1.0', '==', '1.1', false), + array(2, '1.0.0', '==', '1.0.1', false), + array(2, '1.0.0.0', '==', '1.0.0.1', true), + array(2, '1.0.0.0.0', '==', '1.0.0.0.1', true), + + array(2, '1', '==', '10', true), + array(2, '1.0', '==', '11', false), + array(2, '1.0.0', '==', '10.1', false), + array(2, '1.0.0.0', '==', '10.0.1', true), + array(2, '1.0.0.0.0', '==', '10.0.0.1', true), + + array(3, '1', '==', '1', true), + array(3, '1.0', '==', '1.1', false), + array(3, '1.0.0', '==', '1.0.1', false), + array(3, '1.0.0.0', '==', '1.0.0.1', false), + array(3, '1.0.0.0.0', '==', '1.0.0.0.1', true), + + array(3, '1', '==', '10', true), + array(3, '1.0', '==', '11', false), + array(3, '1.0.0', '==', '10.1', false), + array(3, '1.0.0.0', '==', '10.0.1', false), + array(3, '1.0.0.0.0', '==', '10.0.0.1', true), + ); + } + + /** + * @dataProvider compareProvider + */ + public function testCompare($precision, $version1, $operator, $version2, $result) + { + $this->assertSame($result, IcuVersion::compare($version1, $version2, $operator, $precision)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/VersionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/VersionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b570b3ae96ae3921b65f66ab29b1e63fc6eec01a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Util/VersionTest.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Util\Version; + +/** + * @author Bernhard Schussek + */ +class VersionTest extends TestCase +{ + public function normalizeProvider() + { + return array( + array(null, '1', '1'), + array(null, '1.2', '1.2'), + array(null, '1.2.3', '1.2.3'), + array(null, '1.2.3.4', '1.2.3.4'), + array(1, '1', '1'), + array(1, '1.2', '1'), + array(1, '1.2.3', '1'), + array(1, '1.2.3.4', '1'), + array(2, '1', '1'), + array(2, '1.2', '1.2'), + array(2, '1.2.3', '1.2'), + array(2, '1.2.3.4', '1.2'), + array(3, '1', '1'), + array(3, '1.2', '1.2'), + array(3, '1.2.3', '1.2.3'), + array(3, '1.2.3.4', '1.2.3'), + array(4, '1', '1'), + array(4, '1.2', '1.2'), + array(4, '1.2.3', '1.2.3'), + array(4, '1.2.3.4', '1.2.3.4'), + ); + } + + /** + * @dataProvider normalizeProvider + */ + public function testNormalize($precision, $version, $result) + { + $this->assertSame($result, Version::normalize($version, $precision)); + } + + public function compareProvider() + { + return array( + array(null, '1', '==', '1', true), + array(null, '1.0', '==', '1.1', false), + array(null, '1.0.0', '==', '1.0.1', false), + array(null, '1.0.0.0', '==', '1.0.0.1', false), + + array(1, '1', '==', '1', true), + array(1, '1.0', '==', '1.1', true), + array(1, '1.0.0', '==', '1.0.1', true), + array(1, '1.0.0.0', '==', '1.0.0.1', true), + + array(2, '1', '==', '1', true), + array(2, '1.0', '==', '1.1', false), + array(2, '1.0.0', '==', '1.0.1', true), + array(2, '1.0.0.0', '==', '1.0.0.1', true), + + array(3, '1', '==', '1', true), + array(3, '1.0', '==', '1.1', false), + array(3, '1.0.0', '==', '1.0.1', false), + array(3, '1.0.0.0', '==', '1.0.0.1', true), + ); + } + + /** + * @dataProvider compareProvider + */ + public function testCompare($precision, $version1, $operator, $version2, $result) + { + $this->assertSame($result, Version::compare($version1, $version2, $operator, $precision)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/IcuVersion.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/IcuVersion.php new file mode 100644 index 0000000000000000000000000000000000000000..e7324e7fd381a29b4dea41301f46b11327ed641d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/IcuVersion.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Util; + +/** + * Facilitates the comparison of ICU version strings. + * + * @author Bernhard Schussek + */ +class IcuVersion +{ + /** + * Compares two ICU versions with an operator. + * + * This method is identical to {@link version_compare()}, except that you + * can pass the number of regarded version components in the last argument + * $precision. + * + * Also, a single digit release version and a single digit major version + * are contracted to a two digit release version. If no major version + * is given, it is substituted by zero. + * + * Examples: + * + * IcuVersion::compare('1.2.3', '1.2.4', '==') + * // => false + * + * IcuVersion::compare('1.2.3', '1.2.4', '==', 2) + * // => true + * + * IcuVersion::compare('1.2.3', '12.3', '==') + * // => true + * + * IcuVersion::compare('1', '10', '==') + * // => true + * + * @param string $version1 A version string + * @param string $version2 A version string to compare + * @param string $operator The comparison operator + * @param int|null $precision The number of components to compare. Pass + * NULL to compare the versions unchanged. + * + * @return bool Whether the comparison succeeded + * + * @see normalize() + */ + public static function compare($version1, $version2, $operator, $precision = null) + { + $version1 = self::normalize($version1, $precision); + $version2 = self::normalize($version2, $precision); + + return version_compare($version1, $version2, $operator); + } + + /** + * Normalizes a version string to the number of components given in the + * parameter $precision. + * + * A single digit release version and a single digit major version are + * contracted to a two digit release version. If no major version is given, + * it is substituted by zero. + * + * Examples: + * + * IcuVersion::normalize('1.2.3.4'); + * // => '12.3.4' + * + * IcuVersion::normalize('1.2.3.4', 1); + * // => '12' + * + * IcuVersion::normalize('1.2.3.4', 2); + * // => '12.3' + * + * @param string $version An ICU version string + * @param int|null $precision The number of components to include. Pass + * NULL to return the version unchanged. + * + * @return string|null The normalized ICU version or NULL if it couldn't be + * normalized. + */ + public static function normalize($version, $precision) + { + $version = preg_replace('/^(\d)\.(\d)/', '$1$2', $version); + + if (1 === strlen($version)) { + $version .= '0'; + } + + return Version::normalize($version, $precision); + } + + /** + * Must not be instantiated. + */ + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/IntlTestHelper.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/IntlTestHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..12c3ff05913c50a04bec98567cecc7f356865fcd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/IntlTestHelper.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Intl; + +/** + * Helper class for preparing test cases that rely on the Intl component. + * + * Any test that tests functionality relying on either the intl classes or + * the resource bundle data should call either of the methods + * {@link requireIntl()} or {@link requireFullIntl()}. Calling + * {@link requireFullIntl()} is only necessary if you use functionality in the + * test that is not provided by the stub intl implementation. + * + * @author Bernhard Schussek + */ +class IntlTestHelper +{ + /** + * Should be called before tests that work fine with the stub implementation. + */ + public static function requireIntl(TestCase $testCase, $minimumIcuVersion = null) + { + if (null === $minimumIcuVersion) { + $minimumIcuVersion = Intl::getIcuStubVersion(); + } + + // We only run tests if the version is *one specific version*. + // This condition is satisfied if + // + // * the intl extension is loaded with version Intl::getIcuStubVersion() + // * the intl extension is not loaded + + if (($minimumIcuVersion || defined('HHVM_VERSION_ID')) && IcuVersion::compare(Intl::getIcuVersion(), $minimumIcuVersion, '<', 1)) { + $testCase->markTestSkipped('ICU version '.$minimumIcuVersion.' is required.'); + } + + // Normalize the default locale in case this is not done explicitly + // in the test + \Locale::setDefault('en'); + + // Consequently, tests will + // + // * run only for one ICU version (see Intl::getIcuStubVersion()) + // there is no need to add control structures to your tests that + // change the test depending on the ICU version. + // + // Tests should only rely on functionality that is implemented in the + // stub classes. + } + + /** + * Should be called before tests that require a feature-complete intl + * implementation. + */ + public static function requireFullIntl(TestCase $testCase, $minimumIcuVersion = null) + { + // We only run tests if the intl extension is loaded... + if (!Intl::isExtensionLoaded()) { + $testCase->markTestSkipped('Extension intl is required.'); + } + + self::requireIntl($testCase, $minimumIcuVersion); + + // Consequently, tests will + // + // * run only for one ICU version (see Intl::getIcuStubVersion()) + // there is no need to add control structures to your tests that + // change the test depending on the ICU version. + // * always use the C intl classes + } + + /** + * Skips the test unless the current system has a 32bit architecture. + */ + public static function require32Bit(TestCase $testCase) + { + if (4 !== PHP_INT_SIZE) { + $testCase->markTestSkipped('PHP 32 bit is required.'); + } + } + + /** + * Skips the test unless the current system has a 64bit architecture. + */ + public static function require64Bit(TestCase $testCase) + { + if (8 !== PHP_INT_SIZE) { + $testCase->markTestSkipped('PHP 64 bit is required.'); + } + } + + /** + * Must not be instantiated. + */ + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/SvnCommit.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/SvnCommit.php new file mode 100644 index 0000000000000000000000000000000000000000..c5ae1f1d79fa7e624cafae92419c5af28e48f25b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/SvnCommit.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Util; + +/** + * An SVN commit. + * + * @author Bernhard Schussek + */ +class SvnCommit +{ + /** + * @var \SimpleXMLElement + */ + private $svnInfo; + + /** + * Creates a commit from the given "svn info" data. + * + * @param \SimpleXMLElement $svnInfo The XML result from the "svn info" + * command. + */ + public function __construct(\SimpleXMLElement $svnInfo) + { + $this->svnInfo = $svnInfo; + } + + /** + * Returns the revision of the commit. + * + * @return string The revision of the commit + */ + public function getRevision() + { + return (string) $this->svnInfo['revision']; + } + + /** + * Returns the author of the commit. + * + * @return string The author name + */ + public function getAuthor() + { + return (string) $this->svnInfo->author; + } + + /** + * Returns the date of the commit. + * + * @return string The commit date + */ + public function getDate() + { + return (string) $this->svnInfo->date; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/SvnRepository.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/SvnRepository.php new file mode 100644 index 0000000000000000000000000000000000000000..8b5e8f31f859ea3235bca89191a2d45f06105e81 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/SvnRepository.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Util; + +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Intl\Exception\RuntimeException; + +/** + * A SVN repository containing ICU data. + * + * @author Bernhard Schussek + */ +class SvnRepository +{ + /** + * @var string The path to the repository + */ + private $path; + + /** + * @var \SimpleXMLElement + */ + private $svnInfo; + + /** + * @var SvnCommit + */ + private $lastCommit; + + /** + * Downloads the ICU data for the given version. + * + * @param string $url The URL to download from + * @param string $targetDir The directory in which to store the repository + * + * @return static + * + * @throws RuntimeException If an error occurs during the download. + */ + public static function download($url, $targetDir) + { + exec('which svn', $output, $result); + + if ($result !== 0) { + throw new RuntimeException('The command "svn" is not installed.'); + } + + $filesystem = new Filesystem(); + + if (!$filesystem->exists($targetDir.'/.svn')) { + $filesystem->remove($targetDir); + $filesystem->mkdir($targetDir); + + exec('svn checkout '.$url.' '.$targetDir, $output, $result); + + if ($result !== 0) { + throw new RuntimeException('The SVN checkout of '.$url.'failed.'); + } + } + + return new static(realpath($targetDir)); + } + + /** + * Reads the SVN repository at the given path. + * + * @param string $path The path to the repository + */ + public function __construct($path) + { + $this->path = $path; + } + + /** + * Returns the path to the repository. + * + * @return string The path to the repository + */ + public function getPath() + { + return $this->path; + } + + /** + * Returns the URL of the repository. + * + * @return string The URL of the repository + */ + public function getUrl() + { + return (string) $this->getSvnInfo()->entry->url; + } + + /** + * Returns the last commit of the repository. + * + * @return SvnCommit The last commit + */ + public function getLastCommit() + { + if (null === $this->lastCommit) { + $this->lastCommit = new SvnCommit($this->getSvnInfo()->entry->commit); + } + + return $this->lastCommit; + } + + /** + * Returns information about the SVN repository. + * + * @return \SimpleXMLElement The XML result from the "svn info" command + * + * @throws RuntimeException If the "svn info" command failed. + */ + private function getSvnInfo() + { + if (null === $this->svnInfo) { + exec('svn info --xml '.$this->path, $output, $result); + + $svnInfo = simplexml_load_string(implode("\n", $output)); + + if ($result !== 0) { + throw new RuntimeException('svn info failed'); + } + + $this->svnInfo = $svnInfo; + } + + return $this->svnInfo; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/Version.php b/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/Version.php new file mode 100644 index 0000000000000000000000000000000000000000..11e97fe8bdd94c814d38aa781381546c0ab96ac3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/Util/Version.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Util; + +/** + * Facilitates the comparison of version strings. + * + * @author Bernhard Schussek + */ +class Version +{ + /** + * Compares two versions with an operator. + * + * This method is identical to {@link version_compare()}, except that you + * can pass the number of regarded version components in the last argument + * $precision. + * + * Examples: + * + * Version::compare('1.2.3', '1.2.4', '==') + * // => false + * + * Version::compare('1.2.3', '1.2.4', '==', 2) + * // => true + * + * @param string $version1 A version string + * @param string $version2 A version string to compare + * @param string $operator The comparison operator + * @param int|null $precision The number of components to compare. Pass + * NULL to compare the versions unchanged. + * + * @return bool Whether the comparison succeeded + * + * @see normalize() + */ + public static function compare($version1, $version2, $operator, $precision = null) + { + $version1 = self::normalize($version1, $precision); + $version2 = self::normalize($version2, $precision); + + return version_compare($version1, $version2, $operator); + } + + /** + * Normalizes a version string to the number of components given in the + * parameter $precision. + * + * Examples: + * + * Version::normalize('1.2.3', 1); + * // => '1' + * + * Version::normalize('1.2.3', 2); + * // => '1.2' + * + * @param string $version A version string + * @param int|null $precision The number of components to include. Pass + * NULL to return the version unchanged. + * + * @return string|null The normalized version or NULL if it couldn't be + * normalized. + */ + public static function normalize($version, $precision) + { + if (null === $precision) { + return $version; + } + + $pattern = '[^\.]+'; + + for ($i = 2; $i <= $precision; ++$i) { + $pattern = sprintf('[^\.]+(\.%s)?', $pattern); + } + + if (!preg_match('/^'.$pattern.'/', $version, $matches)) { + return; + } + + return $matches[0]; + } + + /** + * Must not be instantiated. + */ + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Intl/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..f8ee591bb91579fb66b9e34f3acff5c3839ac565 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/composer.json @@ -0,0 +1,49 @@ +{ + "name": "symfony/intl", + "type": "library", + "description": "A PHP replacement layer for the C intl extension that includes additional data from the ICU library.", + "keywords": ["intl", "icu", "internationalization", "localization", "i18n", "l10n"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Eriksen Costa", + "email": "eriksen.costa@infranology.com.br" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-intl-icu": "~1.0" + }, + "require-dev": { + "symfony/filesystem": "~2.8|~3.0" + }, + "suggest": { + "ext-intl": "to use the component with locales other than \"en\"" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Intl\\": "" }, + "classmap": [ "Resources/stubs" ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Intl/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Intl/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..9e7ce2f0b264223dc60241e803d1c2400f8d6035 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Intl/phpunit.xml.dist @@ -0,0 +1,35 @@ + + + + + + + + + + ./Tests/ + + + + + + intl-data + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractConnection.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractConnection.php new file mode 100644 index 0000000000000000000000000000000000000000..67529b62e53b6d11c25327ee1069290d6a8c7915 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractConnection.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\Component\Ldap\Adapter; + +use Symfony\Component\OptionsResolver\Options; +use Symfony\Component\OptionsResolver\OptionsResolver; + +/** + * @author Charles Sarrazin + */ +abstract class AbstractConnection implements ConnectionInterface +{ + protected $config; + + public function __construct(array $config = array()) + { + $resolver = new OptionsResolver(); + + $this->configureOptions($resolver); + + $this->config = $resolver->resolve($config); + } + + /** + * Configures the adapter's options. + * + * @param OptionsResolver $resolver An OptionsResolver instance + */ + protected function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults(array( + 'host' => 'localhost', + 'version' => 3, + 'connection_string' => null, + 'encryption' => 'none', + 'options' => array(), + )); + + $resolver->setDefault('port', function (Options $options) { + return 'ssl' === $options['encryption'] ? 636 : 389; + }); + + $resolver->setDefault('connection_string', function (Options $options) { + return sprintf('ldap%s://%s:%s', 'ssl' === $options['encryption'] ? 's' : '', $options['host'], $options['port']); + }); + + $resolver->setAllowedTypes('host', 'string'); + $resolver->setAllowedTypes('port', 'numeric'); + $resolver->setAllowedTypes('connection_string', 'string'); + $resolver->setAllowedTypes('version', 'numeric'); + $resolver->setAllowedValues('encryption', array('none', 'ssl', 'tls')); + $resolver->setAllowedTypes('options', 'array'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractQuery.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractQuery.php new file mode 100644 index 0000000000000000000000000000000000000000..41889da1333d47539e9e810d1ed49b36bea35c2c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AbstractQuery.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Adapter; + +use Symfony\Component\OptionsResolver\Options; +use Symfony\Component\OptionsResolver\OptionsResolver; + +/** + * @author Charles Sarrazin + */ +abstract class AbstractQuery implements QueryInterface +{ + protected $connection; + protected $dn; + protected $query; + protected $options; + + public function __construct(ConnectionInterface $connection, $dn, $query, array $options = array()) + { + $resolver = new OptionsResolver(); + $resolver->setDefaults(array( + 'filter' => '*', + 'maxItems' => 0, + 'sizeLimit' => 0, + 'timeout' => 0, + 'deref' => static::DEREF_NEVER, + 'attrsOnly' => 0, + )); + $resolver->setAllowedValues('deref', array(static::DEREF_ALWAYS, static::DEREF_NEVER, static::DEREF_FINDING, static::DEREF_SEARCHING)); + $resolver->setNormalizer('filter', function (Options $options, $value) { + return is_array($value) ? $value : array($value); + }); + + $this->connection = $connection; + $this->dn = $dn; + $this->query = $query; + $this->options = $resolver->resolve($options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AdapterInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AdapterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..f01e3528f8e19b3706f85f232f3d8170723b10d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/AdapterInterface.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Adapter; + +/** + * @author Charles Sarrazin + */ +interface AdapterInterface +{ + /** + * Returns the current connection. + * + * @return ConnectionInterface + */ + public function getConnection(); + + /** + * Creates a new Query. + * + * @param string $dn + * @param string $query + * @param array $options + * + * @return QueryInterface + */ + public function createQuery($dn, $query, array $options = array()); + + /** + * Fetches the entry manager instance. + * + * @return EntryManagerInterface + */ + public function getEntryManager(); + + /** + * Escape a string for use in an LDAP filter or DN. + * + * @param string $subject + * @param string $ignore + * @param int $flags + * + * @return string + */ + public function escape($subject, $ignore = '', $flags = 0); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/CollectionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/CollectionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..2db4d2bd4a29737e24195a530786f85ffe87305e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/CollectionInterface.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Adapter; + +use Symfony\Component\Ldap\Entry; + +/** + * @author Charles Sarrazin + */ +interface CollectionInterface extends \Countable, \IteratorAggregate, \ArrayAccess +{ + /** + * @return Entry[] + */ + public function toArray(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ConnectionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ConnectionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..347a852a82ea3cf93a9d1be3c88240a73618dea2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ConnectionInterface.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Adapter; + +/** + * @author Charles Sarrazin + */ +interface ConnectionInterface +{ + /** + * Checks whether the connection was already bound or not. + * + * @return bool + */ + public function isBound(); + + /** + * Binds the connection against a DN and password. + * + * @param string $dn The user's DN + * @param string $password The associated password + */ + public function bind($dn = null, $password = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/EntryManagerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/EntryManagerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..9538abfae2b255bfb1aa85508440bb02b54abe53 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/EntryManagerInterface.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Adapter; + +use Symfony\Component\Ldap\Entry; +use Symfony\Component\Ldap\Exception\LdapException; +use Symfony\Component\Ldap\Exception\NotBoundException; + +/** + * Entry manager interface. + * + * @author Charles Sarrazin + * @author Bob van de Vijver + */ +interface EntryManagerInterface +{ + /** + * Adds a new entry in the Ldap server. + * + * @param Entry $entry + * + * @throws NotBoundException + * @throws LdapException + */ + public function add(Entry $entry); + + /** + * Updates an entry from the Ldap server. + * + * @param Entry $entry + * + * @throws NotBoundException + * @throws LdapException + */ + public function update(Entry $entry); + + /** + * Removes an entry from the Ldap server. + * + * @param Entry $entry + * + * @throws NotBoundException + * @throws LdapException + */ + public function remove(Entry $entry); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Adapter.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Adapter.php new file mode 100644 index 0000000000000000000000000000000000000000..06dbc815242840389a0673713bd643714702aa35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Adapter.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Adapter\ExtLdap; + +use Symfony\Component\Ldap\Adapter\AdapterInterface; +use Symfony\Component\Ldap\Exception\LdapException; + +/** + * @author Charles Sarrazin + */ +class Adapter implements AdapterInterface +{ + private $config; + private $connection; + private $entryManager; + + public function __construct(array $config = array()) + { + if (!extension_loaded('ldap')) { + throw new LdapException('The LDAP PHP extension is not enabled.'); + } + + $this->config = $config; + } + + /** + * {@inheritdoc} + */ + public function getConnection() + { + if (null === $this->connection) { + $this->connection = new Connection($this->config); + } + + return $this->connection; + } + + /** + * {@inheritdoc} + */ + public function getEntryManager() + { + if (null === $this->entryManager) { + $this->entryManager = new EntryManager($this->getConnection()); + } + + return $this->entryManager; + } + + /** + * {@inheritdoc} + */ + public function createQuery($dn, $query, array $options = array()) + { + return new Query($this->getConnection(), $dn, $query, $options); + } + + /** + * {@inheritdoc} + */ + public function escape($subject, $ignore = '', $flags = 0) + { + $value = ldap_escape($subject, $ignore, $flags); + + // Per RFC 4514, leading/trailing spaces should be encoded in DNs, as well as carriage returns. + if ((int) $flags & LDAP_ESCAPE_DN) { + if (!empty($value) && $value[0] === ' ') { + $value = '\\20'.substr($value, 1); + } + if (!empty($value) && $value[strlen($value) - 1] === ' ') { + $value = substr($value, 0, -1).'\\20'; + } + $value = str_replace("\r", '\0d', $value); + } + + return $value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php new file mode 100644 index 0000000000000000000000000000000000000000..d9b2dd4f5d4eabaa2007183f40a77f68f2298ba3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php @@ -0,0 +1,134 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Adapter\ExtLdap; + +use Symfony\Component\Ldap\Adapter\CollectionInterface; +use Symfony\Component\Ldap\Entry; +use Symfony\Component\Ldap\Exception\LdapException; + +/** + * @author Charles Sarrazin + */ +class Collection implements CollectionInterface +{ + private $connection; + private $search; + private $entries; + + public function __construct(Connection $connection, Query $search) + { + $this->connection = $connection; + $this->search = $search; + } + + /** + * {@inheritdoc} + */ + public function toArray() + { + if (null === $this->entries) { + $this->entries = iterator_to_array($this->getIterator(), false); + } + + return $this->entries; + } + + public function count() + { + if (false !== $count = ldap_count_entries($this->connection->getResource(), $this->search->getResource())) { + return $count; + } + + throw new LdapException(sprintf('Error while retrieving entry count: %s', ldap_error($this->connection->getResource()))); + } + + public function getIterator() + { + $con = $this->connection->getResource(); + $search = $this->search->getResource(); + $current = ldap_first_entry($con, $search); + + if (0 === $this->count()) { + return; + } + + if (false === $current) { + throw new LdapException(sprintf('Could not rewind entries array: %s', ldap_error($con))); + } + + yield $this->getSingleEntry($con, $current); + + while (false !== $current = ldap_next_entry($con, $current)) { + yield $this->getSingleEntry($con, $current); + } + } + + public function offsetExists($offset) + { + $this->toArray(); + + return isset($this->entries[$offset]); + } + + public function offsetGet($offset) + { + $this->toArray(); + + return isset($this->entries[$offset]) ? $this->entries[$offset] : null; + } + + public function offsetSet($offset, $value) + { + $this->toArray(); + + $this->entries[$offset] = $value; + } + + public function offsetUnset($offset) + { + $this->toArray(); + + unset($this->entries[$offset]); + } + + private function getSingleEntry($con, $current) + { + $attributes = ldap_get_attributes($con, $current); + + if (false === $attributes) { + throw new LdapException(sprintf('Could not fetch attributes: %s', ldap_error($con))); + } + + $attributes = $this->cleanupAttributes($attributes); + + $dn = ldap_get_dn($con, $current); + + if (false === $dn) { + throw new LdapException(sprintf('Could not fetch DN: %s', ldap_error($con))); + } + + return new Entry($dn, $attributes); + } + + private function cleanupAttributes(array $entry) + { + $attributes = array_diff_key($entry, array_flip(range(0, $entry['count'] - 1)) + array( + 'count' => null, + 'dn' => null, + )); + array_walk($attributes, function (&$value) { + unset($value['count']); + }); + + return $attributes; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..d705b3bce9d133363c53268f0adf12ed217d5efa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php @@ -0,0 +1,154 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Adapter\ExtLdap; + +use Symfony\Component\Ldap\Adapter\AbstractConnection; +use Symfony\Component\Ldap\Exception\ConnectionException; +use Symfony\Component\Ldap\Exception\LdapException; +use Symfony\Component\OptionsResolver\Options; +use Symfony\Component\OptionsResolver\OptionsResolver; + +/** + * @author Charles Sarrazin + */ +class Connection extends AbstractConnection +{ + /** @var bool */ + private $bound = false; + + /** @var resource */ + private $connection; + + public function __destruct() + { + $this->disconnect(); + } + + /** + * {@inheritdoc} + */ + public function isBound() + { + return $this->bound; + } + + /** + * {@inheritdoc} + */ + public function bind($dn = null, $password = null) + { + if (!$this->connection) { + $this->connect(); + } + + if (false === @ldap_bind($this->connection, $dn, $password)) { + throw new ConnectionException(ldap_error($this->connection)); + } + + $this->bound = true; + } + + /** + * Returns a link resource. + * + * @return resource + * + * @internal + */ + public function getResource() + { + return $this->connection; + } + + public function setOption($name, $value) + { + if (!@ldap_set_option($this->connection, ConnectionOptions::getOption($name), $value)) { + throw new LdapException(sprintf('Could not set value "%s" for option "%s".', $value, $name)); + } + } + + public function getOption($name) + { + if (!@ldap_get_option($this->connection, ConnectionOptions::getOption($name), $ret)) { + throw new LdapException(sprintf('Could not retrieve value for option "%s".', $name)); + } + + return $ret; + } + + protected function configureOptions(OptionsResolver $resolver) + { + parent::configureOptions($resolver); + + $resolver->setDefault('debug', false); + $resolver->setAllowedTypes('debug', 'bool'); + $resolver->setDefault('referrals', false); + $resolver->setAllowedTypes('referrals', 'bool'); + + $resolver->setNormalizer('options', function (Options $options, $value) { + if (true === $options['debug']) { + $value['debug_level'] = 7; + } + + if (!isset($value['protocol_version'])) { + $value['protocol_version'] = $options['version']; + } + + if (!isset($value['referrals'])) { + $value['referrals'] = $options['referrals']; + } + + return $value; + }); + + $resolver->setAllowedValues('options', function (array $values) { + foreach ($values as $name => $value) { + if (!ConnectionOptions::isOption($name)) { + return false; + } + } + + return true; + }); + } + + private function connect() + { + if ($this->connection) { + return; + } + + $this->connection = ldap_connect($this->config['connection_string']); + + foreach ($this->config['options'] as $name => $value) { + $this->setOption($name, $value); + } + + if (false === $this->connection) { + throw new LdapException(sprintf('Could not connect to Ldap server: %s', ldap_error($this->connection))); + } + + if ('tls' === $this->config['encryption'] && false === ldap_start_tls($this->connection)) { + throw new LdapException(sprintf('Could not initiate TLS connection: %s', ldap_error($this->connection))); + } + } + + private function disconnect() + { + if ($this->connection && is_resource($this->connection)) { + ldap_close($this->connection); + } + + $this->connection = null; + $this->bound = false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/ConnectionOptions.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/ConnectionOptions.php new file mode 100644 index 0000000000000000000000000000000000000000..95d65e020a63f7fcb7643b3ea52fc54972e2d457 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/ConnectionOptions.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Adapter\ExtLdap; + +use Symfony\Component\Ldap\Exception\LdapException; + +/** + * A class representing the Ldap extension's options, which can be used with + * ldap_set_option or ldap_get_option. + * + * @author Charles Sarrazin + * + * @internal + */ +final class ConnectionOptions +{ + const API_INFO = 0x00; + const DEREF = 0x02; + const SIZELIMIT = 0x03; + const TIMELIMIT = 0x04; + const REFERRALS = 0x08; + const RESTART = 0x09; + const PROTOCOL_VERSION = 0x11; + const SERVER_CONTROLS = 0x12; + const CLIENT_CONTROLS = 0x13; + const API_FEATURE_INFO = 0x15; + const HOST_NAME = 0x30; + const ERROR_NUMBER = 0x31; + const ERROR_STRING = 0x32; + const MATCHED_DN = 0x33; + const DEBUG_LEVEL = 0x5001; + const NETWORK_TIMEOUT = 0x5005; + const X_SASL_MECH = 0x6100; + const X_SASL_REALM = 0x6101; + const X_SASL_AUTHCID = 0x6102; + const X_SASL_AUTHZID = 0x6103; + + public static function getOptionName($name) + { + return sprintf('%s::%s', self::class, strtoupper($name)); + } + + /** + * Fetches an option's corresponding constant value from an option name. + * The option name can either be in snake or camel case. + * + * @param string $name + * + * @return int + * + * @throws LdapException + */ + public static function getOption($name) + { + // Convert + $constantName = self::getOptionName($name); + + if (!defined($constantName)) { + throw new LdapException(sprintf('Unknown option "%s"', $name)); + } + + return constant($constantName); + } + + public static function isOption($name) + { + return defined(self::getOptionName($name)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php new file mode 100644 index 0000000000000000000000000000000000000000..455602c5afa2e40498790b76b80cdd94d9372a79 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Adapter\ExtLdap; + +use Symfony\Component\Ldap\Adapter\EntryManagerInterface; +use Symfony\Component\Ldap\Entry; +use Symfony\Component\Ldap\Exception\LdapException; +use Symfony\Component\Ldap\Exception\NotBoundException; + +/** + * @author Charles Sarrazin + * @author Bob van de Vijver + */ +class EntryManager implements EntryManagerInterface +{ + private $connection; + + public function __construct(Connection $connection) + { + $this->connection = $connection; + } + + /** + * {@inheritdoc} + */ + public function add(Entry $entry) + { + $con = $this->getConnectionResource(); + + if (!@ldap_add($con, $entry->getDn(), $entry->getAttributes())) { + throw new LdapException(sprintf('Could not add entry "%s": %s', $entry->getDn(), ldap_error($con))); + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function update(Entry $entry) + { + $con = $this->getConnectionResource(); + + if (!@ldap_modify($con, $entry->getDn(), $entry->getAttributes())) { + throw new LdapException(sprintf('Could not update entry "%s": %s', $entry->getDn(), ldap_error($con))); + } + } + + /** + * {@inheritdoc} + */ + public function remove(Entry $entry) + { + $con = $this->getConnectionResource(); + + if (!@ldap_delete($con, $entry->getDn())) { + throw new LdapException(sprintf('Could not remove entry "%s": %s', $entry->getDn(), ldap_error($con))); + } + } + + /** + * Get the connection resource, but first check if the connection is bound. + */ + private function getConnectionResource() + { + // If the connection is not bound, throw an exception. Users should use an explicit bind call first. + if (!$this->connection->isBound()) { + throw new NotBoundException('Query execution is not possible without binding the connection first.'); + } + + return $this->connection->getResource(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php new file mode 100644 index 0000000000000000000000000000000000000000..a268630529883bceda3d397ba109a73c23d1ac09 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Adapter\ExtLdap; + +use Symfony\Component\Ldap\Adapter\AbstractQuery; +use Symfony\Component\Ldap\Exception\LdapException; +use Symfony\Component\Ldap\Exception\NotBoundException; + +/** + * @author Charles Sarrazin + * @author Bob van de Vijver + */ +class Query extends AbstractQuery +{ + /** @var Connection */ + protected $connection; + + /** @var resource */ + private $search; + + public function __construct(Connection $connection, $dn, $query, array $options = array()) + { + parent::__construct($connection, $dn, $query, $options); + } + + public function __destruct() + { + $con = $this->connection->getResource(); + $this->connection = null; + + if (null === $this->search || false === $this->search) { + return; + } + + $success = ldap_free_result($this->search); + $this->search = null; + + if (!$success) { + throw new LdapException(sprintf('Could not free results: %s', ldap_error($con))); + } + } + + /** + * {@inheritdoc} + */ + public function execute() + { + if (null === $this->search) { + // If the connection is not bound, throw an exception. Users should use an explicit bind call first. + if (!$this->connection->isBound()) { + throw new NotBoundException('Query execution is not possible without binding the connection first.'); + } + + $con = $this->connection->getResource(); + + $this->search = @ldap_search( + $con, + $this->dn, + $this->query, + $this->options['filter'], + $this->options['attrsOnly'], + $this->options['maxItems'], + $this->options['timeout'], + $this->options['deref'] + ); + } + + if (false === $this->search) { + throw new LdapException(sprintf('Could not complete search with dn "%s", query "%s" and filters "%s"', $this->dn, $this->query, implode(',', $this->options['filter']))); + } + + return new Collection($this->connection, $this); + } + + /** + * Returns a LDAP search resource. + * + * @return resource + * + * @internal + */ + public function getResource() + { + return $this->search; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/QueryInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/QueryInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c4cd4329bbe70f378c7ee902422a9213eb3c1b8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Adapter/QueryInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Adapter; + +use Symfony\Component\Ldap\Entry; +use Symfony\Component\Ldap\Exception\LdapException; +use Symfony\Component\Ldap\Exception\NotBoundException; + +/** + * @author Charles Sarrazin + * @author Bob van de Vijver + */ +interface QueryInterface +{ + const DEREF_NEVER = 0x00; + const DEREF_SEARCHING = 0x01; + const DEREF_FINDING = 0x02; + const DEREF_ALWAYS = 0x03; + + /** + * Executes a query and returns the list of Ldap entries. + * + * @return CollectionInterface|Entry[] + * + * @throws NotBoundException + * @throws LdapException + */ + public function execute(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Entry.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Entry.php new file mode 100644 index 0000000000000000000000000000000000000000..42745c2b8928cb1f8b759ccc47c814ca8d38aba7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Entry.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap; + +/** + * @author Charles Sarrazin + */ +class Entry +{ + private $dn; + private $attributes; + + public function __construct($dn, array $attributes = array()) + { + $this->dn = $dn; + $this->attributes = $attributes; + } + + /** + * Returns the entry's DN. + * + * @return string + */ + public function getDn() + { + return $this->dn; + } + + /** + * Returns whether an attribute exists. + * + * @param $name string The name of the attribute + * + * @return bool + */ + public function hasAttribute($name) + { + return isset($this->attributes[$name]); + } + + /** + * Returns a specific attribute's value. + * + * As LDAP can return multiple values for a single attribute, + * this value is returned as an array. + * + * @param $name string The name of the attribute + * + * @return null|array + */ + public function getAttribute($name) + { + return isset($this->attributes[$name]) ? $this->attributes[$name] : null; + } + + /** + * Returns the complete list of attributes. + * + * @return array + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Sets a value for the given attribute. + * + * @param string $name + * @param array $value + */ + public function setAttribute($name, array $value) + { + $this->attributes[$name] = $value; + } + + /** + * Removes a given attribute. + * + * @param string $name + */ + public function removeAttribute($name) + { + unset($this->attributes[$name]); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/ConnectionException.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/ConnectionException.php new file mode 100644 index 0000000000000000000000000000000000000000..cded4cf2a389a53da7b0d3683b5f4bc591af0034 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/ConnectionException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Exception; + +/** + * ConnectionException is throw if binding to ldap can not be established. + * + * @author Grégoire Pineau + */ +class ConnectionException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/DriverNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/DriverNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..40258435bb6a7cef0d7777a4a584ca26377a6c77 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/DriverNotFoundException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Exception; + +/** + * LdapException is throw if php ldap module is not loaded. + * + * @author Charles Sarrazin + */ +class DriverNotFoundException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b861a3fe8d3caab3359eb026a1ae53e0774b3def --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Exception; + +/** + * Base ExceptionInterface for the Ldap component. + * + * @author Charles Sarrazin + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/LdapException.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/LdapException.php new file mode 100644 index 0000000000000000000000000000000000000000..4045f32cf44b52fefff796918a3df2e60e9d0d37 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/LdapException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Exception; + +/** + * LdapException is throw if php ldap module is not loaded. + * + * @author Grégoire Pineau + */ +class LdapException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/NotBoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/NotBoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..6eb904e8bbaaf67f22c63c9c8f79ed3c5244a226 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Exception/NotBoundException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Exception; + +/** + * NotBoundException is thrown if the connection with the LDAP server is not yet bound. + * + * @author Bob van de Vijver + */ +class NotBoundException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Ldap/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Ldap/Ldap.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Ldap.php new file mode 100644 index 0000000000000000000000000000000000000000..514f51d22c21afd14563ffbac6289d853415c3d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Ldap.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap; + +use Symfony\Component\Ldap\Adapter\AdapterInterface; +use Symfony\Component\Ldap\Exception\DriverNotFoundException; + +/** + * @author Charles Sarrazin + */ +final class Ldap implements LdapInterface +{ + private $adapter; + + private static $adapterMap = array( + 'ext_ldap' => 'Symfony\Component\Ldap\Adapter\ExtLdap\Adapter', + ); + + public function __construct(AdapterInterface $adapter) + { + $this->adapter = $adapter; + } + + /** + * {@inheritdoc} + */ + public function bind($dn = null, $password = null) + { + $this->adapter->getConnection()->bind($dn, $password); + } + + /** + * {@inheritdoc} + */ + public function query($dn, $query, array $options = array()) + { + return $this->adapter->createQuery($dn, $query, $options); + } + + /** + * {@inheritdoc} + */ + public function getEntryManager() + { + return $this->adapter->getEntryManager(); + } + + /** + * {@inheritdoc} + */ + public function escape($subject, $ignore = '', $flags = 0) + { + return $this->adapter->escape($subject, $ignore, $flags); + } + + /** + * Creates a new Ldap instance. + * + * @param string $adapter The adapter name + * @param array $config The adapter's configuration + * + * @return static + */ + public static function create($adapter, array $config = array()) + { + if (!isset(self::$adapterMap[$adapter])) { + throw new DriverNotFoundException(sprintf( + 'Adapter "%s" not found. You should use one of: %s', + $adapter, + implode(', ', self::$adapterMap) + )); + } + + $class = self::$adapterMap[$adapter]; + + return new self(new $class($config)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapClient.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapClient.php new file mode 100644 index 0000000000000000000000000000000000000000..0a68c05875b784b3bc6f0e8929b4e00081b1f01c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapClient.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap; + +@trigger_error('The '.__NAMESPACE__.'\LdapClient class is deprecated since version 3.1 and will be removed in 4.0. Use the Ldap class directly instead.', E_USER_DEPRECATED); + +/** + * @author Grégoire Pineau + * @author Francis Besset + * @author Charles Sarrazin + * + * @deprecated The LdapClient class will be removed in Symfony 4.0. You should use the Ldap class instead. + */ +final class LdapClient implements LdapClientInterface +{ + private $ldap; + + public function __construct($host = null, $port = 389, $version = 3, $useSsl = false, $useStartTls = false, $optReferrals = false, LdapInterface $ldap = null) + { + $config = $this->normalizeConfig($host, $port, $version, $useSsl, $useStartTls, $optReferrals); + + $this->ldap = null !== $ldap ? $ldap : Ldap::create('ext_ldap', $config); + } + + /** + * {@inheritdoc} + */ + public function bind($dn = null, $password = null) + { + $this->ldap->bind($dn, $password); + } + + /** + * {@inheritdoc} + */ + public function query($dn, $query, array $options = array()) + { + return $this->ldap->query($dn, $query, $options); + } + + /** + * {@inheritdoc} + */ + public function getEntryManager() + { + return $this->ldap->getEntryManager(); + } + + /** + * {@inheritdoc} + */ + public function find($dn, $query, $filter = '*') + { + @trigger_error('The "find" method is deprecated since version 3.1 and will be removed in 4.0. Use the "query" method instead.', E_USER_DEPRECATED); + + $query = $this->ldap->query($dn, $query, array('filter' => $filter)); + $entries = $query->execute(); + $result = array( + 'count' => 0, + ); + + foreach ($entries as $entry) { + $resultEntry = array(); + + foreach ($entry->getAttributes() as $attribute => $values) { + $resultAttribute = array( + 'count' => count($values), + ); + + foreach ($values as $val) { + $resultAttribute[] = $val; + } + $attributeName = strtolower($attribute); + + $resultAttribute['count'] = count($values); + $resultEntry[$attributeName] = $resultAttribute; + $resultEntry[] = $attributeName; + } + + $resultEntry['count'] = count($resultEntry) / 2; + $resultEntry['dn'] = $entry->getDn(); + $result[] = $resultEntry; + } + + $result['count'] = count($result) - 1; + + return $result; + } + + /** + * {@inheritdoc} + */ + public function escape($subject, $ignore = '', $flags = 0) + { + return $this->ldap->escape($subject, $ignore, $flags); + } + + private function normalizeConfig($host, $port, $version, $useSsl, $useStartTls, $optReferrals) + { + if ((bool) $useSsl) { + $encryption = 'ssl'; + } elseif ((bool) $useStartTls) { + $encryption = 'tls'; + } else { + $encryption = 'none'; + } + + return array( + 'host' => $host, + 'port' => $port, + 'encryption' => $encryption, + 'options' => array( + 'protocol_version' => $version, + 'referrals' => (bool) $optReferrals, + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapClientInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapClientInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..020e4b55896f5b175b4d9a81ea415492d4be025b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapClientInterface.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\Component\Ldap; + +/** + * Ldap interface. + * + * This interface is used for the BC layer with branch 2.8 and 3.0. + * + * @author Grégoire Pineau + * @author Charles Sarrazin + * + * @deprecated You should use LdapInterface instead + */ +interface LdapClientInterface extends LdapInterface +{ + /** + * Find a username into ldap connection. + * + * @param string $dn + * @param string $query + * @param mixed $filter + * + * @return array|null + */ + public function find($dn, $query, $filter = '*'); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..f71f7e04f81a31ca6e83b3a0f3ec97b885b8b28b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapInterface.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap; + +use Symfony\Component\Ldap\Adapter\EntryManagerInterface; +use Symfony\Component\Ldap\Adapter\QueryInterface; +use Symfony\Component\Ldap\Exception\ConnectionException; + +/** + * Ldap interface. + * + * @author Charles Sarrazin + */ +interface LdapInterface +{ + const ESCAPE_FILTER = 0x01; + const ESCAPE_DN = 0x02; + + /** + * Return a connection bound to the ldap. + * + * @param string $dn A LDAP dn + * @param string $password A password + * + * @throws ConnectionException If dn / password could not be bound. + */ + public function bind($dn = null, $password = null); + + /** + * Queries a ldap server for entries matching the given criteria. + * + * @param string $dn + * @param string $query + * @param array $options + * + * @return QueryInterface + */ + public function query($dn, $query, array $options = array()); + + /** + * @return EntryManagerInterface + */ + public function getEntryManager(); + + /** + * Escape a string for use in an LDAP filter or DN. + * + * @param string $subject + * @param string $ignore + * @param int $flags + * + * @return string + */ + public function escape($subject, $ignore = '', $flags = 0); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/README.md b/vendor/symfony/symfony/src/Symfony/Component/Ldap/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b79d60b0957960c4c7e70b98245600ecc8a0a357 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/README.md @@ -0,0 +1,21 @@ +Ldap Component +============== + +A Ldap client for PHP on top of PHP's ldap extension. + +Disclaimer +---------- + +This component is only stable since Symfony 3.1. Earlier versions +have been marked as internal as they still needed some work. +Breaking changes were introduced in Symfony 3.1, so code relying on +previous version of the component will break with this version. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/ldap) + * [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/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2abd21c8a9a45bc2a2a320190a2c4a13d8e6d682 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Tests; + +use Symfony\Component\Ldap\Adapter\ExtLdap\Adapter; +use Symfony\Component\Ldap\Adapter\ExtLdap\Collection; +use Symfony\Component\Ldap\Entry; +use Symfony\Component\Ldap\Exception\NotBoundException; +use Symfony\Component\Ldap\LdapInterface; + +/** + * @requires extension ldap + */ +class AdapterTest extends LdapTestCase +{ + public function testLdapEscape() + { + $ldap = new Adapter(); + + $this->assertEquals('\20foo\3dbar\0d(baz)*\20', $ldap->escape(" foo=bar\r(baz)* ", null, LdapInterface::ESCAPE_DN)); + } + + /** + * @group functional + */ + public function testLdapQuery() + { + $ldap = new Adapter($this->getLdapConfig()); + + $ldap->getConnection()->bind('cn=admin,dc=symfony,dc=com', 'symfony'); + $query = $ldap->createQuery('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', array()); + $result = $query->execute(); + + $this->assertInstanceOf(Collection::class, $result); + $this->assertCount(1, $result); + + $entry = $result[0]; + $this->assertInstanceOf(Entry::class, $entry); + $this->assertEquals(array('Fabien Potencier'), $entry->getAttribute('cn')); + $this->assertEquals(array('fabpot@symfony.com', 'fabien@potencier.com'), $entry->getAttribute('mail')); + } + + /** + * @group functional + */ + public function testLdapQueryIterator() + { + $ldap = new Adapter($this->getLdapConfig()); + + $ldap->getConnection()->bind('cn=admin,dc=symfony,dc=com', 'symfony'); + $query = $ldap->createQuery('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', array()); + $result = $query->execute(); + $iterator = $result->getIterator(); + $iterator->rewind(); + $entry = $iterator->current(); + $this->assertInstanceOf(Entry::class, $entry); + $this->assertEquals(array('Fabien Potencier'), $entry->getAttribute('cn')); + $this->assertEquals(array('fabpot@symfony.com', 'fabien@potencier.com'), $entry->getAttribute('mail')); + } + + /** + * @group functional + */ + public function testLdapQueryWithoutBind() + { + $ldap = new Adapter($this->getLdapConfig()); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(NotBoundException::class); + $query = $ldap->createQuery('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', array()); + $query->execute(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3f741cb5aee26dbc21b65f0bbd01c9180fd6d567 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php @@ -0,0 +1,150 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Tests; + +use Symfony\Component\Ldap\Adapter\ExtLdap\Adapter; +use Symfony\Component\Ldap\Adapter\ExtLdap\Collection; +use Symfony\Component\Ldap\Entry; +use Symfony\Component\Ldap\Exception\LdapException; +use Symfony\Component\Ldap\Exception\NotBoundException; + +/** + * @requires extension ldap + */ +class LdapManagerTest extends LdapTestCase +{ + /** @var Adapter */ + private $adapter; + + protected function setUp() + { + $this->adapter = new Adapter($this->getLdapConfig()); + $this->adapter->getConnection()->bind('cn=admin,dc=symfony,dc=com', 'symfony'); + } + + /** + * @group functional + */ + public function testLdapAddAndRemove() + { + $this->executeSearchQuery(1); + + $entry = new Entry('cn=Charles Sarrazin,dc=symfony,dc=com', array( + 'sn' => array('csarrazi'), + 'objectclass' => array( + 'inetOrgPerson', + ), + )); + + $em = $this->adapter->getEntryManager(); + $em->add($entry); + + $this->executeSearchQuery(2); + + $em->remove($entry); + $this->executeSearchQuery(1); + } + + /** + * @group functional + */ + public function testLdapAddInvalidEntry() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(LdapException::class); + $this->executeSearchQuery(1); + + // The entry is missing a subject name + $entry = new Entry('cn=Charles Sarrazin,dc=symfony,dc=com', array( + 'objectclass' => array( + 'inetOrgPerson', + ), + )); + + $em = $this->adapter->getEntryManager(); + $em->add($entry); + } + + /** + * @group functional + */ + public function testLdapUpdate() + { + $result = $this->executeSearchQuery(1); + + $entry = $result[0]; + $this->assertNull($entry->getAttribute('email')); + + $em = $this->adapter->getEntryManager(); + $em->update($entry); + + $result = $this->executeSearchQuery(1); + + $entry = $result[0]; + $this->assertNull($entry->getAttribute('email')); + + $entry->removeAttribute('email'); + $em->update($entry); + + $result = $this->executeSearchQuery(1); + $entry = $result[0]; + $this->assertNull($entry->getAttribute('email')); + } + + /** + * @group functional + */ + public function testLdapUnboundAdd() + { + $this->adapter = new Adapter($this->getLdapConfig()); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(NotBoundException::class); + $em = $this->adapter->getEntryManager(); + $em->add(new Entry('')); + } + + /** + * @group functional + */ + public function testLdapUnboundRemove() + { + $this->adapter = new Adapter($this->getLdapConfig()); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(NotBoundException::class); + $em = $this->adapter->getEntryManager(); + $em->remove(new Entry('')); + } + + /** + * @group functional + */ + public function testLdapUnboundUpdate() + { + $this->adapter = new Adapter($this->getLdapConfig()); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(NotBoundException::class); + $em = $this->adapter->getEntryManager(); + $em->update(new Entry('')); + } + + /** + * @return Collection|Entry[] + */ + private function executeSearchQuery($expectedResults = 1) + { + $results = $this + ->adapter + ->createQuery('dc=symfony,dc=com', '(objectclass=person)') + ->execute() + ; + + $this->assertCount($expectedResults, $results); + + return $results; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Fixtures/conf/slapd.conf b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Fixtures/conf/slapd.conf new file mode 100644 index 0000000000000000000000000000000000000000..35f7fe5652b3838f2cddd7beb5d2321d1576fe3d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Fixtures/conf/slapd.conf @@ -0,0 +1,17 @@ +# See slapd.conf(5) for details on configuration options. +include /etc/ldap/schema/core.schema +include /etc/ldap/schema/cosine.schema +include /etc/ldap/schema/inetorgperson.schema +include /etc/ldap/schema/nis.schema + +pidfile /tmp/slapd/slapd.pid +argsfile /tmp/slapd/slapd.args + +modulepath /usr/lib/openldap + +database ldif +directory /tmp/slapd + +suffix "dc=symfony,dc=com" +rootdn "cn=admin,dc=symfony,dc=com" +rootpw {SSHA}btWUi971ytYpVMbZLkaQ2A6ETh3VA0lL diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Fixtures/data/base.ldif b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Fixtures/data/base.ldif new file mode 100644 index 0000000000000000000000000000000000000000..25abb296c9a6c8b5ccbd4d99deb9734a5c921f17 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Fixtures/data/base.ldif @@ -0,0 +1,4 @@ +dn: dc=symfony,dc=com +objectClass: dcObject +objectClass: organizationalUnit +ou: Organization diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Fixtures/data/fixtures.ldif b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Fixtures/data/fixtures.ldif new file mode 100644 index 0000000000000000000000000000000000000000..21dc42d77edd44a133c0ea384f44622bbe4d3ee0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/Fixtures/data/fixtures.ldif @@ -0,0 +1,14 @@ +dn: cn=Fabien Potencier,dc=symfony,dc=com +objectClass: inetOrgPerson +objectClass: organizationalPerson +objectClass: person +objectClass: top +cn: Fabien Potencier +sn: fabpot +mail: fabpot@symfony.com +mail: fabien@potencier.com +ou: People +ou: Maintainers +ou: Founder +givenName: Fabien Potencier +description: Founder and project lead @Symfony diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapClientTest.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapClientTest.php new file mode 100644 index 0000000000000000000000000000000000000000..176c8f16f93209dc0ed79f476f2da3c89157698e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapClientTest.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\Component\Ldap\Tests; + +use Symfony\Component\Ldap\Adapter\CollectionInterface; +use Symfony\Component\Ldap\Adapter\QueryInterface; +use Symfony\Component\Ldap\Entry; +use Symfony\Component\Ldap\LdapClient; +use Symfony\Component\Ldap\LdapInterface; + +/** + * @group legacy + */ +class LdapClientTest extends LdapTestCase +{ + /** @var LdapClient */ + private $client; + /** @var \PHPUnit_Framework_MockObject_MockObject */ + private $ldap; + + protected function setUp() + { + $this->ldap = $this->getMockBuilder(LdapInterface::class)->getMock(); + + $this->client = new LdapClient(null, 389, 3, false, false, false, $this->ldap); + } + + public function testLdapBind() + { + $this->ldap + ->expects($this->once()) + ->method('bind') + ->with('foo', 'bar') + ; + $this->client->bind('foo', 'bar'); + } + + public function testLdapEscape() + { + $this->ldap + ->expects($this->once()) + ->method('escape') + ->with('foo', 'bar', 'baz') + ; + $this->client->escape('foo', 'bar', 'baz'); + } + + public function testLdapQuery() + { + $this->ldap + ->expects($this->once()) + ->method('query') + ->with('foo', 'bar', array('baz')) + ; + $this->client->query('foo', 'bar', array('baz')); + } + + public function testLdapFind() + { + $collection = $this->getMockBuilder(CollectionInterface::class)->getMock(); + $collection + ->expects($this->once()) + ->method('getIterator') + ->will($this->returnValue(new \ArrayIterator(array( + new Entry('cn=qux,dc=foo,dc=com', array( + 'cn' => array('qux'), + 'dc' => array('com', 'foo'), + 'givenName' => array('Qux'), + )), + new Entry('cn=baz,dc=foo,dc=com', array( + 'cn' => array('baz'), + 'dc' => array('com', 'foo'), + 'givenName' => array('Baz'), + )), + )))) + ; + $query = $this->getMockBuilder(QueryInterface::class)->getMock(); + $query + ->expects($this->once()) + ->method('execute') + ->will($this->returnValue($collection)) + ; + $this->ldap + ->expects($this->once()) + ->method('query') + ->with('dc=foo,dc=com', 'bar', array('filter' => 'baz')) + ->willReturn($query) + ; + + $expected = array( + 'count' => 2, + 0 => array( + 'count' => 3, + 0 => 'cn', + 'cn' => array( + 'count' => 1, + 0 => 'qux', + ), + 1 => 'dc', + 'dc' => array( + 'count' => 2, + 0 => 'com', + 1 => 'foo', + ), + 2 => 'givenname', + 'givenname' => array( + 'count' => 1, + 0 => 'Qux', + ), + 'dn' => 'cn=qux,dc=foo,dc=com', + ), + 1 => array( + 'count' => 3, + 0 => 'cn', + 'cn' => array( + 'count' => 1, + 0 => 'baz', + ), + 1 => 'dc', + 'dc' => array( + 'count' => 2, + 0 => 'com', + 1 => 'foo', + ), + 2 => 'givenname', + 'givenname' => array( + 'count' => 1, + 0 => 'Baz', + ), + 'dn' => 'cn=baz,dc=foo,dc=com', + ), + ); + $this->assertEquals($expected, $this->client->find('dc=foo,dc=com', 'bar', 'baz')); + } + + /** + * @dataProvider provideConfig + */ + public function testLdapClientConfig($args, $expected) + { + $reflObj = new \ReflectionObject($this->client); + $reflMethod = $reflObj->getMethod('normalizeConfig'); + $reflMethod->setAccessible(true); + array_unshift($args, $this->client); + $this->assertEquals($expected, call_user_func_array(array($reflMethod, 'invoke'), $args)); + } + + /** + * @group functional + * @requires extension ldap + */ + public function testLdapClientFunctional() + { + $config = $this->getLdapConfig(); + $ldap = new LdapClient($config['host'], $config['port']); + $ldap->bind('cn=admin,dc=symfony,dc=com', 'symfony'); + $result = $ldap->find('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))'); + + $con = @ldap_connect($config['host'], $config['port']); + @ldap_bind($con, 'cn=admin,dc=symfony,dc=com', 'symfony'); + $search = @ldap_search($con, 'dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', array('*')); + $expected = @ldap_get_entries($con, $search); + + $this->assertSame($expected, $result); + } + + public function provideConfig() + { + return array( + array( + array('localhost', 389, 3, true, false, false), + array( + 'host' => 'localhost', + 'port' => 389, + 'encryption' => 'ssl', + 'options' => array( + 'protocol_version' => 3, + 'referrals' => false, + ), + ), + ), + array( + array('localhost', 389, 3, false, true, false), + array( + 'host' => 'localhost', + 'port' => 389, + 'encryption' => 'tls', + 'options' => array( + 'protocol_version' => 3, + 'referrals' => false, + ), + ), + ), + array( + array('localhost', 389, 3, false, false, false), + array( + 'host' => 'localhost', + 'port' => 389, + 'encryption' => 'none', + 'options' => array( + 'protocol_version' => 3, + 'referrals' => false, + ), + ), + ), + array( + array('localhost', 389, 3, false, false, false), + array( + 'host' => 'localhost', + 'port' => 389, + 'encryption' => 'none', + 'options' => array( + 'protocol_version' => 3, + 'referrals' => false, + ), + ), + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTest.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTest.php new file mode 100644 index 0000000000000000000000000000000000000000..17184323f41ccef961a42a988f3c8d86cc43213b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTest.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Ldap\Adapter\AdapterInterface; +use Symfony\Component\Ldap\Adapter\ConnectionInterface; +use Symfony\Component\Ldap\Exception\DriverNotFoundException; +use Symfony\Component\Ldap\Ldap; + +class LdapTest extends TestCase +{ + /** @var \PHPUnit_Framework_MockObject_MockObject */ + private $adapter; + + /** @var Ldap */ + private $ldap; + + protected function setUp() + { + $this->adapter = $this->getMockBuilder(AdapterInterface::class)->getMock(); + $this->ldap = new Ldap($this->adapter); + } + + public function testLdapBind() + { + $connection = $this->getMockBuilder(ConnectionInterface::class)->getMock(); + $connection + ->expects($this->once()) + ->method('bind') + ->with('foo', 'bar') + ; + $this->adapter + ->expects($this->once()) + ->method('getConnection') + ->will($this->returnValue($connection)) + ; + $this->ldap->bind('foo', 'bar'); + } + + public function testLdapEscape() + { + $this->adapter + ->expects($this->once()) + ->method('escape') + ->with('foo', 'bar', 'baz') + ; + $this->ldap->escape('foo', 'bar', 'baz'); + } + + public function testLdapQuery() + { + $this->adapter + ->expects($this->once()) + ->method('createQuery') + ->with('foo', 'bar', array('baz')) + ; + $this->ldap->query('foo', 'bar', array('baz')); + } + + /** + * @requires extension ldap + */ + public function testLdapCreate() + { + $ldap = Ldap::create('ext_ldap'); + $this->assertInstanceOf(Ldap::class, $ldap); + } + + public function testCreateWithInvalidAdapterName() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(DriverNotFoundException::class); + Ldap::create('foo'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..33afd6d22d3890402bc31ac0869c081cd0648d53 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/Tests/LdapTestCase.php @@ -0,0 +1,16 @@ + getenv('LDAP_HOST'), + 'port' => getenv('LDAP_PORT'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Ldap/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..9c73c1e096c9a34c8a0e6d6353a33f50865b45e4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/composer.json @@ -0,0 +1,36 @@ +{ + "name": "symfony/ldap", + "type": "library", + "description": "An abstraction in front of PHP's LDAP functions, compatible with PHP 5.3.9 onwards.", + "keywords": ["ldap", "active directory"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Charles Sarrazin", + "email": "charles@sarraz.in" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-php56": "~1.0", + "symfony/options-resolver": "~2.8|~3.0", + "ext-ldap": "*" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Ldap\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Ldap/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Ldap/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..fc0f6984208bf63f5b3edc7075961b765e3e5d35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Ldap/phpunit.xml.dist @@ -0,0 +1,30 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..5f6d15b2c7ddc45f2d0f915bf1b8bab27f9a7d1d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/CHANGELOG.md @@ -0,0 +1,46 @@ +CHANGELOG +========= + +2.6.0 +----- + + * deprecated OptionsResolverInterface + * [BC BREAK] removed "array" type hint from OptionsResolverInterface methods + setRequired(), setAllowedValues(), addAllowedValues(), setAllowedTypes() and + addAllowedTypes() + * added OptionsResolver::setDefault() + * added OptionsResolver::hasDefault() + * added OptionsResolver::setNormalizer() + * added OptionsResolver::isRequired() + * added OptionsResolver::getRequiredOptions() + * added OptionsResolver::isMissing() + * added OptionsResolver::getMissingOptions() + * added OptionsResolver::setDefined() + * added OptionsResolver::isDefined() + * added OptionsResolver::getDefinedOptions() + * added OptionsResolver::remove() + * added OptionsResolver::clear() + * deprecated OptionsResolver::replaceDefaults() + * deprecated OptionsResolver::setOptional() in favor of setDefined() + * deprecated OptionsResolver::isKnown() in favor of isDefined() + * [BC BREAK] OptionsResolver::isRequired() returns true now if a required + option has a default value set + * [BC BREAK] merged Options into OptionsResolver and turned Options into an + interface + * deprecated Options::overload() (now in OptionsResolver) + * deprecated Options::set() (now in OptionsResolver) + * deprecated Options::get() (now in OptionsResolver) + * deprecated Options::has() (now in OptionsResolver) + * deprecated Options::replace() (now in OptionsResolver) + * [BC BREAK] Options::get() (now in OptionsResolver) can only be used within + lazy option/normalizer closures now + * [BC BREAK] removed Traversable interface from Options since using within + lazy option/normalizer closures resulted in exceptions + * [BC BREAK] removed Options::all() since using within lazy option/normalizer + closures resulted in exceptions + * [BC BREAK] OptionDefinitionException now extends LogicException instead of + RuntimeException + * [BC BREAK] normalizers are not executed anymore for unset options + * normalizers are executed after validating the options now + * [BC BREAK] an UndefinedOptionsException is now thrown instead of an + InvalidOptionsException when non-existing options are passed diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/AccessException.php b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/AccessException.php new file mode 100644 index 0000000000000000000000000000000000000000..c12b6806456f0ae3d51b19f99c73bb0bb0c50c48 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/AccessException.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\OptionsResolver\Exception; + +/** + * Thrown when trying to read an option outside of or write it inside of + * {@link \Symfony\Component\OptionsResolver\Options::resolve()}. + * + * @author Bernhard Schussek + */ +class AccessException extends \LogicException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b62bb51d465ba38aa7a2645abe9f5f2c984058d8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\OptionsResolver\Exception; + +/** + * Marker interface for all exceptions thrown by the OptionsResolver component. + * + * @author Bernhard Schussek + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..6d421d68b35cb0f3b40749ccde74ebb14c2a6422 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\OptionsResolver\Exception; + +/** + * Thrown when an argument is invalid. + * + * @author Bernhard Schussek + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/InvalidOptionsException.php b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/InvalidOptionsException.php new file mode 100644 index 0000000000000000000000000000000000000000..6fd4f125f4478b555847e28ede4a8c9cdbff5668 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/InvalidOptionsException.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\OptionsResolver\Exception; + +/** + * Thrown when the value of an option does not match its validation rules. + * + * You should make sure a valid value is passed to the option. + * + * @author Bernhard Schussek + */ +class InvalidOptionsException extends InvalidArgumentException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/MissingOptionsException.php b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/MissingOptionsException.php new file mode 100644 index 0000000000000000000000000000000000000000..faa487f16f003354de8c0f681f806d31b44f28c9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/MissingOptionsException.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\OptionsResolver\Exception; + +/** + * Exception thrown when a required option is missing. + * + * Add the option to the passed options array. + * + * @author Bernhard Schussek + */ +class MissingOptionsException extends InvalidArgumentException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/NoSuchOptionException.php b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/NoSuchOptionException.php new file mode 100644 index 0000000000000000000000000000000000000000..4c3280f4c7cac9a8069730ce19257b270a3de6a5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/NoSuchOptionException.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\OptionsResolver\Exception; + +/** + * Thrown when trying to read an option that has no value set. + * + * When accessing optional options from within a lazy option or normalizer you should first + * check whether the optional option is set. You can do this with `isset($options['optional'])`. + * In contrast to the {@link UndefinedOptionsException}, this is a runtime exception that can + * occur when evaluating lazy options. + * + * @author Tobias Schultze + */ +class NoSuchOptionException extends \OutOfBoundsException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/OptionDefinitionException.php b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/OptionDefinitionException.php new file mode 100644 index 0000000000000000000000000000000000000000..e8e339d446efa29e2e119af80f08624d1f49d8db --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/OptionDefinitionException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\OptionsResolver\Exception; + +/** + * Thrown when two lazy options have a cyclic dependency. + * + * @author Bernhard Schussek + */ +class OptionDefinitionException extends \LogicException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/UndefinedOptionsException.php b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/UndefinedOptionsException.php new file mode 100644 index 0000000000000000000000000000000000000000..6ca3fce470a609d98ad5acef72298ea7645cf0f3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Exception/UndefinedOptionsException.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\OptionsResolver\Exception; + +/** + * Exception thrown when an undefined option is passed. + * + * You should remove the options in question from your code or define them + * beforehand. + * + * @author Bernhard Schussek + */ +class UndefinedOptionsException extends InvalidArgumentException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Options.php b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Options.php new file mode 100644 index 0000000000000000000000000000000000000000..d444ec4230d51f9e672e5845b34355cc39b4146c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Options.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\OptionsResolver; + +/** + * Contains resolved option values. + * + * @author Bernhard Schussek + * @author Tobias Schultze + */ +interface Options extends \ArrayAccess, \Countable +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/OptionsResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..32ac5663fdcb1b1c5713b85e0ef8bda380ee3a1e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -0,0 +1,1039 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\OptionsResolver; + +use Symfony\Component\OptionsResolver\Exception\AccessException; +use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; +use Symfony\Component\OptionsResolver\Exception\MissingOptionsException; +use Symfony\Component\OptionsResolver\Exception\NoSuchOptionException; +use Symfony\Component\OptionsResolver\Exception\OptionDefinitionException; +use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException; + +/** + * Validates options and merges them with default values. + * + * @author Bernhard Schussek + * @author Tobias Schultze + */ +class OptionsResolver implements Options +{ + /** + * The names of all defined options. + * + * @var array + */ + private $defined = array(); + + /** + * The default option values. + * + * @var array + */ + private $defaults = array(); + + /** + * The names of required options. + * + * @var array + */ + private $required = array(); + + /** + * The resolved option values. + * + * @var array + */ + private $resolved = array(); + + /** + * A list of normalizer closures. + * + * @var \Closure[] + */ + private $normalizers = array(); + + /** + * A list of accepted values for each option. + * + * @var array + */ + private $allowedValues = array(); + + /** + * A list of accepted types for each option. + * + * @var array + */ + private $allowedTypes = array(); + + /** + * A list of closures for evaluating lazy options. + * + * @var array + */ + private $lazy = array(); + + /** + * A list of lazy options whose closure is currently being called. + * + * This list helps detecting circular dependencies between lazy options. + * + * @var array + */ + private $calling = array(); + + /** + * Whether the instance is locked for reading. + * + * Once locked, the options cannot be changed anymore. This is + * necessary in order to avoid inconsistencies during the resolving + * process. If any option is changed after being read, all evaluated + * lazy options that depend on this option would become invalid. + * + * @var bool + */ + private $locked = false; + + private static $typeAliases = array( + 'boolean' => 'bool', + 'integer' => 'int', + 'double' => 'float', + ); + + /** + * Sets the default value of a given option. + * + * If the default value should be set based on other options, you can pass + * a closure with the following signature: + * + * function (Options $options) { + * // ... + * } + * + * The closure will be evaluated when {@link resolve()} is called. The + * closure has access to the resolved values of other options through the + * passed {@link Options} instance: + * + * function (Options $options) { + * if (isset($options['port'])) { + * // ... + * } + * } + * + * If you want to access the previously set default value, add a second + * argument to the closure's signature: + * + * $options->setDefault('name', 'Default Name'); + * + * $options->setDefault('name', function (Options $options, $previousValue) { + * // 'Default Name' === $previousValue + * }); + * + * This is mostly useful if the configuration of the {@link Options} object + * is spread across different locations of your code, such as base and + * sub-classes. + * + * @param string $option The name of the option + * @param mixed $value The default value of the option + * + * @return $this + * + * @throws AccessException If called from a lazy option or normalizer + */ + public function setDefault($option, $value) + { + // Setting is not possible once resolving starts, because then lazy + // options could manipulate the state of the object, leading to + // inconsistent results. + if ($this->locked) { + throw new AccessException('Default values cannot be set from a lazy option or normalizer.'); + } + + // If an option is a closure that should be evaluated lazily, store it + // in the "lazy" property. + if ($value instanceof \Closure) { + $reflClosure = new \ReflectionFunction($value); + $params = $reflClosure->getParameters(); + + if (isset($params[0]) && null !== ($class = $params[0]->getClass()) && Options::class === $class->name) { + // Initialize the option if no previous value exists + if (!isset($this->defaults[$option])) { + $this->defaults[$option] = null; + } + + // Ignore previous lazy options if the closure has no second parameter + if (!isset($this->lazy[$option]) || !isset($params[1])) { + $this->lazy[$option] = array(); + } + + // Store closure for later evaluation + $this->lazy[$option][] = $value; + $this->defined[$option] = true; + + // Make sure the option is processed + unset($this->resolved[$option]); + + return $this; + } + } + + // This option is not lazy anymore + unset($this->lazy[$option]); + + // Yet undefined options can be marked as resolved, because we only need + // to resolve options with lazy closures, normalizers or validation + // rules, none of which can exist for undefined options + // If the option was resolved before, update the resolved value + if (!isset($this->defined[$option]) || array_key_exists($option, $this->resolved)) { + $this->resolved[$option] = $value; + } + + $this->defaults[$option] = $value; + $this->defined[$option] = true; + + return $this; + } + + /** + * Sets a list of default values. + * + * @param array $defaults The default values to set + * + * @return $this + * + * @throws AccessException If called from a lazy option or normalizer + */ + public function setDefaults(array $defaults) + { + foreach ($defaults as $option => $value) { + $this->setDefault($option, $value); + } + + return $this; + } + + /** + * Returns whether a default value is set for an option. + * + * Returns true if {@link setDefault()} was called for this option. + * An option is also considered set if it was set to null. + * + * @param string $option The option name + * + * @return bool Whether a default value is set + */ + public function hasDefault($option) + { + return array_key_exists($option, $this->defaults); + } + + /** + * Marks one or more options as required. + * + * @param string|string[] $optionNames One or more option names + * + * @return $this + * + * @throws AccessException If called from a lazy option or normalizer + */ + public function setRequired($optionNames) + { + if ($this->locked) { + throw new AccessException('Options cannot be made required from a lazy option or normalizer.'); + } + + foreach ((array) $optionNames as $option) { + $this->defined[$option] = true; + $this->required[$option] = true; + } + + return $this; + } + + /** + * Returns whether an option is required. + * + * An option is required if it was passed to {@link setRequired()}. + * + * @param string $option The name of the option + * + * @return bool Whether the option is required + */ + public function isRequired($option) + { + return isset($this->required[$option]); + } + + /** + * Returns the names of all required options. + * + * @return string[] The names of the required options + * + * @see isRequired() + */ + public function getRequiredOptions() + { + return array_keys($this->required); + } + + /** + * Returns whether an option is missing a default value. + * + * An option is missing if it was passed to {@link setRequired()}, but not + * to {@link setDefault()}. This option must be passed explicitly to + * {@link resolve()}, otherwise an exception will be thrown. + * + * @param string $option The name of the option + * + * @return bool Whether the option is missing + */ + public function isMissing($option) + { + return isset($this->required[$option]) && !array_key_exists($option, $this->defaults); + } + + /** + * Returns the names of all options missing a default value. + * + * @return string[] The names of the missing options + * + * @see isMissing() + */ + public function getMissingOptions() + { + return array_keys(array_diff_key($this->required, $this->defaults)); + } + + /** + * Defines a valid option name. + * + * Defines an option name without setting a default value. The option will + * be accepted when passed to {@link resolve()}. When not passed, the + * option will not be included in the resolved options. + * + * @param string|string[] $optionNames One or more option names + * + * @return $this + * + * @throws AccessException If called from a lazy option or normalizer + */ + public function setDefined($optionNames) + { + if ($this->locked) { + throw new AccessException('Options cannot be defined from a lazy option or normalizer.'); + } + + foreach ((array) $optionNames as $option) { + $this->defined[$option] = true; + } + + return $this; + } + + /** + * Returns whether an option is defined. + * + * Returns true for any option passed to {@link setDefault()}, + * {@link setRequired()} or {@link setDefined()}. + * + * @param string $option The option name + * + * @return bool Whether the option is defined + */ + public function isDefined($option) + { + return isset($this->defined[$option]); + } + + /** + * Returns the names of all defined options. + * + * @return string[] The names of the defined options + * + * @see isDefined() + */ + public function getDefinedOptions() + { + return array_keys($this->defined); + } + + /** + * Sets the normalizer for an option. + * + * The normalizer should be a closure with the following signature: + * + * ```php + * function (Options $options, $value) { + * // ... + * } + * ``` + * + * The closure is invoked when {@link resolve()} is called. The closure + * has access to the resolved values of other options through the passed + * {@link Options} instance. + * + * The second parameter passed to the closure is the value of + * the option. + * + * The resolved option value is set to the return value of the closure. + * + * @param string $option The option name + * @param \Closure $normalizer The normalizer + * + * @return $this + * + * @throws UndefinedOptionsException If the option is undefined + * @throws AccessException If called from a lazy option or normalizer + */ + public function setNormalizer($option, \Closure $normalizer) + { + if ($this->locked) { + throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.'); + } + + if (!isset($this->defined[$option])) { + throw new UndefinedOptionsException(sprintf( + 'The option "%s" does not exist. Defined options are: "%s".', + $option, + implode('", "', array_keys($this->defined)) + )); + } + + $this->normalizers[$option] = $normalizer; + + // Make sure the option is processed + unset($this->resolved[$option]); + + return $this; + } + + /** + * Sets allowed values for an option. + * + * Instead of passing values, you may also pass a closures with the + * following signature: + * + * function ($value) { + * // return true or false + * } + * + * The closure receives the value as argument and should return true to + * accept the value and false to reject the value. + * + * @param string $option The option name + * @param mixed $allowedValues One or more acceptable values/closures + * + * @return $this + * + * @throws UndefinedOptionsException If the option is undefined + * @throws AccessException If called from a lazy option or normalizer + */ + public function setAllowedValues($option, $allowedValues) + { + if ($this->locked) { + throw new AccessException('Allowed values cannot be set from a lazy option or normalizer.'); + } + + if (!isset($this->defined[$option])) { + throw new UndefinedOptionsException(sprintf( + 'The option "%s" does not exist. Defined options are: "%s".', + $option, + implode('", "', array_keys($this->defined)) + )); + } + + $this->allowedValues[$option] = is_array($allowedValues) ? $allowedValues : array($allowedValues); + + // Make sure the option is processed + unset($this->resolved[$option]); + + return $this; + } + + /** + * Adds allowed values for an option. + * + * The values are merged with the allowed values defined previously. + * + * Instead of passing values, you may also pass a closures with the + * following signature: + * + * function ($value) { + * // return true or false + * } + * + * The closure receives the value as argument and should return true to + * accept the value and false to reject the value. + * + * @param string $option The option name + * @param mixed $allowedValues One or more acceptable values/closures + * + * @return $this + * + * @throws UndefinedOptionsException If the option is undefined + * @throws AccessException If called from a lazy option or normalizer + */ + public function addAllowedValues($option, $allowedValues) + { + if ($this->locked) { + throw new AccessException('Allowed values cannot be added from a lazy option or normalizer.'); + } + + if (!isset($this->defined[$option])) { + throw new UndefinedOptionsException(sprintf( + 'The option "%s" does not exist. Defined options are: "%s".', + $option, + implode('", "', array_keys($this->defined)) + )); + } + + if (!is_array($allowedValues)) { + $allowedValues = array($allowedValues); + } + + if (!isset($this->allowedValues[$option])) { + $this->allowedValues[$option] = $allowedValues; + } else { + $this->allowedValues[$option] = array_merge($this->allowedValues[$option], $allowedValues); + } + + // Make sure the option is processed + unset($this->resolved[$option]); + + return $this; + } + + /** + * Sets allowed types for an option. + * + * Any type for which a corresponding is_() function exists is + * acceptable. Additionally, fully-qualified class or interface names may + * be passed. + * + * @param string $option The option name + * @param string|string[] $allowedTypes One or more accepted types + * + * @return $this + * + * @throws UndefinedOptionsException If the option is undefined + * @throws AccessException If called from a lazy option or normalizer + */ + public function setAllowedTypes($option, $allowedTypes) + { + if ($this->locked) { + throw new AccessException('Allowed types cannot be set from a lazy option or normalizer.'); + } + + if (!isset($this->defined[$option])) { + throw new UndefinedOptionsException(sprintf( + 'The option "%s" does not exist. Defined options are: "%s".', + $option, + implode('", "', array_keys($this->defined)) + )); + } + + $this->allowedTypes[$option] = (array) $allowedTypes; + + // Make sure the option is processed + unset($this->resolved[$option]); + + return $this; + } + + /** + * Adds allowed types for an option. + * + * The types are merged with the allowed types defined previously. + * + * Any type for which a corresponding is_() function exists is + * acceptable. Additionally, fully-qualified class or interface names may + * be passed. + * + * @param string $option The option name + * @param string|string[] $allowedTypes One or more accepted types + * + * @return $this + * + * @throws UndefinedOptionsException If the option is undefined + * @throws AccessException If called from a lazy option or normalizer + */ + public function addAllowedTypes($option, $allowedTypes) + { + if ($this->locked) { + throw new AccessException('Allowed types cannot be added from a lazy option or normalizer.'); + } + + if (!isset($this->defined[$option])) { + throw new UndefinedOptionsException(sprintf( + 'The option "%s" does not exist. Defined options are: "%s".', + $option, + implode('", "', array_keys($this->defined)) + )); + } + + if (!isset($this->allowedTypes[$option])) { + $this->allowedTypes[$option] = (array) $allowedTypes; + } else { + $this->allowedTypes[$option] = array_merge($this->allowedTypes[$option], (array) $allowedTypes); + } + + // Make sure the option is processed + unset($this->resolved[$option]); + + return $this; + } + + /** + * Removes the option with the given name. + * + * Undefined options are ignored. + * + * @param string|string[] $optionNames One or more option names + * + * @return $this + * + * @throws AccessException If called from a lazy option or normalizer + */ + public function remove($optionNames) + { + if ($this->locked) { + throw new AccessException('Options cannot be removed from a lazy option or normalizer.'); + } + + foreach ((array) $optionNames as $option) { + unset($this->defined[$option], $this->defaults[$option], $this->required[$option], $this->resolved[$option]); + unset($this->lazy[$option], $this->normalizers[$option], $this->allowedTypes[$option], $this->allowedValues[$option]); + } + + return $this; + } + + /** + * Removes all options. + * + * @return $this + * + * @throws AccessException If called from a lazy option or normalizer + */ + public function clear() + { + if ($this->locked) { + throw new AccessException('Options cannot be cleared from a lazy option or normalizer.'); + } + + $this->defined = array(); + $this->defaults = array(); + $this->required = array(); + $this->resolved = array(); + $this->lazy = array(); + $this->normalizers = array(); + $this->allowedTypes = array(); + $this->allowedValues = array(); + + return $this; + } + + /** + * Merges options with the default values stored in the container and + * validates them. + * + * Exceptions are thrown if: + * + * - Undefined options are passed; + * - Required options are missing; + * - Options have invalid types; + * - Options have invalid values. + * + * @param array $options A map of option names to values + * + * @return array The merged and validated options + * + * @throws UndefinedOptionsException If an option name is undefined + * @throws InvalidOptionsException If an option doesn't fulfill the + * specified validation rules + * @throws MissingOptionsException If a required option is missing + * @throws OptionDefinitionException If there is a cyclic dependency between + * lazy options and/or normalizers + * @throws NoSuchOptionException If a lazy option reads an unavailable option + * @throws AccessException If called from a lazy option or normalizer + */ + public function resolve(array $options = array()) + { + if ($this->locked) { + throw new AccessException('Options cannot be resolved from a lazy option or normalizer.'); + } + + // Allow this method to be called multiple times + $clone = clone $this; + + // Make sure that no unknown options are passed + $diff = array_diff_key($options, $clone->defined); + + if (count($diff) > 0) { + ksort($clone->defined); + ksort($diff); + + throw new UndefinedOptionsException(sprintf( + (count($diff) > 1 ? 'The options "%s" do not exist.' : 'The option "%s" does not exist.').' Defined options are: "%s".', + implode('", "', array_keys($diff)), + implode('", "', array_keys($clone->defined)) + )); + } + + // Override options set by the user + foreach ($options as $option => $value) { + $clone->defaults[$option] = $value; + unset($clone->resolved[$option], $clone->lazy[$option]); + } + + // Check whether any required option is missing + $diff = array_diff_key($clone->required, $clone->defaults); + + if (count($diff) > 0) { + ksort($diff); + + throw new MissingOptionsException(sprintf( + count($diff) > 1 ? 'The required options "%s" are missing.' : 'The required option "%s" is missing.', + implode('", "', array_keys($diff)) + )); + } + + // Lock the container + $clone->locked = true; + + // Now process the individual options. Use offsetGet(), which resolves + // the option itself and any options that the option depends on + foreach ($clone->defaults as $option => $_) { + $clone->offsetGet($option); + } + + return $clone->resolved; + } + + /** + * Returns the resolved value of an option. + * + * @param string $option The option name + * + * @return mixed The option value + * + * @throws AccessException If accessing this method outside of + * {@link resolve()} + * @throws NoSuchOptionException If the option is not set + * @throws InvalidOptionsException If the option doesn't fulfill the + * specified validation rules + * @throws OptionDefinitionException If there is a cyclic dependency between + * lazy options and/or normalizers + */ + public function offsetGet($option) + { + if (!$this->locked) { + throw new AccessException('Array access is only supported within closures of lazy options and normalizers.'); + } + + // Shortcut for resolved options + if (array_key_exists($option, $this->resolved)) { + return $this->resolved[$option]; + } + + // Check whether the option is set at all + if (!array_key_exists($option, $this->defaults)) { + if (!isset($this->defined[$option])) { + throw new NoSuchOptionException(sprintf( + 'The option "%s" does not exist. Defined options are: "%s".', + $option, + implode('", "', array_keys($this->defined)) + )); + } + + throw new NoSuchOptionException(sprintf( + 'The optional option "%s" has no value set. You should make sure it is set with "isset" before reading it.', + $option + )); + } + + $value = $this->defaults[$option]; + + // Resolve the option if the default value is lazily evaluated + if (isset($this->lazy[$option])) { + // If the closure is already being called, we have a cyclic + // dependency + if (isset($this->calling[$option])) { + throw new OptionDefinitionException(sprintf( + 'The options "%s" have a cyclic dependency.', + implode('", "', array_keys($this->calling)) + )); + } + + // The following section must be protected from cyclic + // calls. Set $calling for the current $option to detect a cyclic + // dependency + // BEGIN + $this->calling[$option] = true; + try { + foreach ($this->lazy[$option] as $closure) { + $value = $closure($this, $value); + } + } finally { + unset($this->calling[$option]); + } + // END + } + + // Validate the type of the resolved option + if (isset($this->allowedTypes[$option])) { + $valid = false; + + foreach ($this->allowedTypes[$option] as $type) { + $type = isset(self::$typeAliases[$type]) ? self::$typeAliases[$type] : $type; + + if (function_exists($isFunction = 'is_'.$type)) { + if ($isFunction($value)) { + $valid = true; + break; + } + + continue; + } + + if ($value instanceof $type) { + $valid = true; + break; + } + } + + if (!$valid) { + throw new InvalidOptionsException(sprintf( + 'The option "%s" with value %s is expected to be of type '. + '"%s", but is of type "%s".', + $option, + $this->formatValue($value), + implode('" or "', $this->allowedTypes[$option]), + $this->formatTypeOf($value) + )); + } + } + + // Validate the value of the resolved option + if (isset($this->allowedValues[$option])) { + $success = false; + $printableAllowedValues = array(); + + foreach ($this->allowedValues[$option] as $allowedValue) { + if ($allowedValue instanceof \Closure) { + if ($allowedValue($value)) { + $success = true; + break; + } + + // Don't include closures in the exception message + continue; + } elseif ($value === $allowedValue) { + $success = true; + break; + } + + $printableAllowedValues[] = $allowedValue; + } + + if (!$success) { + $message = sprintf( + 'The option "%s" with value %s is invalid.', + $option, + $this->formatValue($value) + ); + + if (count($printableAllowedValues) > 0) { + $message .= sprintf( + ' Accepted values are: %s.', + $this->formatValues($printableAllowedValues) + ); + } + + throw new InvalidOptionsException($message); + } + } + + // Normalize the validated option + if (isset($this->normalizers[$option])) { + // If the closure is already being called, we have a cyclic + // dependency + if (isset($this->calling[$option])) { + throw new OptionDefinitionException(sprintf( + 'The options "%s" have a cyclic dependency.', + implode('", "', array_keys($this->calling)) + )); + } + + $normalizer = $this->normalizers[$option]; + + // The following section must be protected from cyclic + // calls. Set $calling for the current $option to detect a cyclic + // dependency + // BEGIN + $this->calling[$option] = true; + try { + $value = $normalizer($this, $value); + } finally { + unset($this->calling[$option]); + } + // END + } + + // Mark as resolved + $this->resolved[$option] = $value; + + return $value; + } + + /** + * Returns whether a resolved option with the given name exists. + * + * @param string $option The option name + * + * @return bool Whether the option is set + * + * @throws AccessException If accessing this method outside of {@link resolve()} + * + * @see \ArrayAccess::offsetExists() + */ + public function offsetExists($option) + { + if (!$this->locked) { + throw new AccessException('Array access is only supported within closures of lazy options and normalizers.'); + } + + return array_key_exists($option, $this->defaults); + } + + /** + * Not supported. + * + * @throws AccessException + */ + public function offsetSet($option, $value) + { + throw new AccessException('Setting options via array access is not supported. Use setDefault() instead.'); + } + + /** + * Not supported. + * + * @throws AccessException + */ + public function offsetUnset($option) + { + throw new AccessException('Removing options via array access is not supported. Use remove() instead.'); + } + + /** + * Returns the number of set options. + * + * This may be only a subset of the defined options. + * + * @return int Number of options + * + * @throws AccessException If accessing this method outside of {@link resolve()} + * + * @see \Countable::count() + */ + public function count() + { + if (!$this->locked) { + throw new AccessException('Counting is only supported within closures of lazy options and normalizers.'); + } + + return count($this->defaults); + } + + /** + * Returns a string representation of the type of the value. + * + * This method should be used if you pass the type of a value as + * message parameter to a constraint violation. Note that such + * parameters should usually not be included in messages aimed at + * non-technical people. + * + * @param mixed $value The value to return the type of + * + * @return string The type of the value + */ + private function formatTypeOf($value) + { + return is_object($value) ? get_class($value) : gettype($value); + } + + /** + * Returns a string representation of the value. + * + * This method returns the equivalent PHP tokens for most scalar types + * (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped + * in double quotes ("). + * + * @param mixed $value The value to format as string + * + * @return string The string representation of the passed value + */ + private function formatValue($value) + { + if (is_object($value)) { + return get_class($value); + } + + if (is_array($value)) { + return 'array'; + } + + if (is_string($value)) { + return '"'.$value.'"'; + } + + if (is_resource($value)) { + return 'resource'; + } + + if (null === $value) { + return 'null'; + } + + if (false === $value) { + return 'false'; + } + + if (true === $value) { + return 'true'; + } + + return (string) $value; + } + + /** + * Returns a string representation of a list of values. + * + * Each of the values is converted to a string using + * {@link formatValue()}. The values are then concatenated with commas. + * + * @param array $values A list of values + * + * @return string The string representation of the value list + * + * @see formatValue() + */ + private function formatValues(array $values) + { + foreach ($values as $key => $value) { + $values[$key] = $this->formatValue($value); + } + + return implode(', ', $values); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/README.md b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/README.md new file mode 100644 index 0000000000000000000000000000000000000000..245e69b548d6d62251f075d51eab8e657c1ab054 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/README.md @@ -0,0 +1,15 @@ +OptionsResolver Component +========================= + +The OptionsResolver component is `array_replace` on steroids. It allows you to +create an options system with required options, defaults, validation (type, +value), normalization and more. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/options_resolver.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/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php new file mode 100644 index 0000000000000000000000000000000000000000..da223bd205fa6c895951b0015c29b1c0c9e735cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php @@ -0,0 +1,1559 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\OptionsResolver\Tests; + +use PHPUnit\Framework\Assert; +use PHPUnit\Framework\TestCase; +use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; +use Symfony\Component\OptionsResolver\Options; +use Symfony\Component\OptionsResolver\OptionsResolver; + +class OptionsResolverTest extends TestCase +{ + /** + * @var OptionsResolver + */ + private $resolver; + + protected function setUp() + { + $this->resolver = new OptionsResolver(); + } + + //////////////////////////////////////////////////////////////////////////// + // resolve() + //////////////////////////////////////////////////////////////////////////// + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException + * @expectedExceptionMessage The option "foo" does not exist. Defined options are: "a", "z". + */ + public function testResolveFailsIfNonExistingOption() + { + $this->resolver->setDefault('z', '1'); + $this->resolver->setDefault('a', '2'); + + $this->resolver->resolve(array('foo' => 'bar')); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException + * @expectedExceptionMessage The options "baz", "foo", "ping" do not exist. Defined options are: "a", "z". + */ + public function testResolveFailsIfMultipleNonExistingOptions() + { + $this->resolver->setDefault('z', '1'); + $this->resolver->setDefault('a', '2'); + + $this->resolver->resolve(array('ping' => 'pong', 'foo' => 'bar', 'baz' => 'bam')); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testResolveFailsFromLazyOption() + { + $this->resolver->setDefault('foo', function (Options $options) { + $options->resolve(array()); + }); + + $this->resolver->resolve(); + } + + //////////////////////////////////////////////////////////////////////////// + // setDefault()/hasDefault() + //////////////////////////////////////////////////////////////////////////// + + public function testSetDefaultReturnsThis() + { + $this->assertSame($this->resolver, $this->resolver->setDefault('foo', 'bar')); + } + + public function testSetDefault() + { + $this->resolver->setDefault('one', '1'); + $this->resolver->setDefault('two', '20'); + + $this->assertEquals(array( + 'one' => '1', + 'two' => '20', + ), $this->resolver->resolve()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testFailIfSetDefaultFromLazyOption() + { + $this->resolver->setDefault('lazy', function (Options $options) { + $options->setDefault('default', 42); + }); + + $this->resolver->resolve(); + } + + public function testHasDefault() + { + $this->assertFalse($this->resolver->hasDefault('foo')); + $this->resolver->setDefault('foo', 42); + $this->assertTrue($this->resolver->hasDefault('foo')); + } + + public function testHasDefaultWithNullValue() + { + $this->assertFalse($this->resolver->hasDefault('foo')); + $this->resolver->setDefault('foo', null); + $this->assertTrue($this->resolver->hasDefault('foo')); + } + + //////////////////////////////////////////////////////////////////////////// + // lazy setDefault() + //////////////////////////////////////////////////////////////////////////// + + public function testSetLazyReturnsThis() + { + $this->assertSame($this->resolver, $this->resolver->setDefault('foo', function (Options $options) {})); + } + + public function testSetLazyClosure() + { + $this->resolver->setDefault('foo', function (Options $options) { + return 'lazy'; + }); + + $this->assertEquals(array('foo' => 'lazy'), $this->resolver->resolve()); + } + + public function testClosureWithoutTypeHintNotInvoked() + { + $closure = function ($options) { + Assert::fail('Should not be called'); + }; + + $this->resolver->setDefault('foo', $closure); + + $this->assertSame(array('foo' => $closure), $this->resolver->resolve()); + } + + public function testClosureWithoutParametersNotInvoked() + { + $closure = function () { + Assert::fail('Should not be called'); + }; + + $this->resolver->setDefault('foo', $closure); + + $this->assertSame(array('foo' => $closure), $this->resolver->resolve()); + } + + public function testAccessPreviousDefaultValue() + { + // defined by superclass + $this->resolver->setDefault('foo', 'bar'); + + // defined by subclass + $this->resolver->setDefault('foo', function (Options $options, $previousValue) { + Assert::assertEquals('bar', $previousValue); + + return 'lazy'; + }); + + $this->assertEquals(array('foo' => 'lazy'), $this->resolver->resolve()); + } + + public function testAccessPreviousLazyDefaultValue() + { + // defined by superclass + $this->resolver->setDefault('foo', function (Options $options) { + return 'bar'; + }); + + // defined by subclass + $this->resolver->setDefault('foo', function (Options $options, $previousValue) { + Assert::assertEquals('bar', $previousValue); + + return 'lazy'; + }); + + $this->assertEquals(array('foo' => 'lazy'), $this->resolver->resolve()); + } + + public function testPreviousValueIsNotEvaluatedIfNoSecondArgument() + { + // defined by superclass + $this->resolver->setDefault('foo', function () { + Assert::fail('Should not be called'); + }); + + // defined by subclass, no $previousValue argument defined! + $this->resolver->setDefault('foo', function (Options $options) { + return 'lazy'; + }); + + $this->assertEquals(array('foo' => 'lazy'), $this->resolver->resolve()); + } + + public function testOverwrittenLazyOptionNotEvaluated() + { + $this->resolver->setDefault('foo', function (Options $options) { + Assert::fail('Should not be called'); + }); + + $this->resolver->setDefault('foo', 'bar'); + + $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + } + + public function testInvokeEachLazyOptionOnlyOnce() + { + $calls = 0; + + $this->resolver->setDefault('lazy1', function (Options $options) use (&$calls) { + Assert::assertSame(1, ++$calls); + + $options['lazy2']; + }); + + $this->resolver->setDefault('lazy2', function (Options $options) use (&$calls) { + Assert::assertSame(2, ++$calls); + }); + + $this->resolver->resolve(); + + $this->assertSame(2, $calls); + } + + //////////////////////////////////////////////////////////////////////////// + // setRequired()/isRequired()/getRequiredOptions() + //////////////////////////////////////////////////////////////////////////// + + public function testSetRequiredReturnsThis() + { + $this->assertSame($this->resolver, $this->resolver->setRequired('foo')); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testFailIfSetRequiredFromLazyOption() + { + $this->resolver->setDefault('foo', function (Options $options) { + $options->setRequired('bar'); + }); + + $this->resolver->resolve(); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\MissingOptionsException + */ + public function testResolveFailsIfRequiredOptionMissing() + { + $this->resolver->setRequired('foo'); + + $this->resolver->resolve(); + } + + public function testResolveSucceedsIfRequiredOptionSet() + { + $this->resolver->setRequired('foo'); + $this->resolver->setDefault('foo', 'bar'); + + $this->assertNotEmpty($this->resolver->resolve()); + } + + public function testResolveSucceedsIfRequiredOptionPassed() + { + $this->resolver->setRequired('foo'); + + $this->assertNotEmpty($this->resolver->resolve(array('foo' => 'bar'))); + } + + public function testIsRequired() + { + $this->assertFalse($this->resolver->isRequired('foo')); + $this->resolver->setRequired('foo'); + $this->assertTrue($this->resolver->isRequired('foo')); + } + + public function testRequiredIfSetBefore() + { + $this->assertFalse($this->resolver->isRequired('foo')); + + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setRequired('foo'); + + $this->assertTrue($this->resolver->isRequired('foo')); + } + + public function testStillRequiredAfterSet() + { + $this->assertFalse($this->resolver->isRequired('foo')); + + $this->resolver->setRequired('foo'); + $this->resolver->setDefault('foo', 'bar'); + + $this->assertTrue($this->resolver->isRequired('foo')); + } + + public function testIsNotRequiredAfterRemove() + { + $this->assertFalse($this->resolver->isRequired('foo')); + $this->resolver->setRequired('foo'); + $this->resolver->remove('foo'); + $this->assertFalse($this->resolver->isRequired('foo')); + } + + public function testIsNotRequiredAfterClear() + { + $this->assertFalse($this->resolver->isRequired('foo')); + $this->resolver->setRequired('foo'); + $this->resolver->clear(); + $this->assertFalse($this->resolver->isRequired('foo')); + } + + public function testGetRequiredOptions() + { + $this->resolver->setRequired(array('foo', 'bar')); + $this->resolver->setDefault('bam', 'baz'); + $this->resolver->setDefault('foo', 'boo'); + + $this->assertSame(array('foo', 'bar'), $this->resolver->getRequiredOptions()); + } + + //////////////////////////////////////////////////////////////////////////// + // isMissing()/getMissingOptions() + //////////////////////////////////////////////////////////////////////////// + + public function testIsMissingIfNotSet() + { + $this->assertFalse($this->resolver->isMissing('foo')); + $this->resolver->setRequired('foo'); + $this->assertTrue($this->resolver->isMissing('foo')); + } + + public function testIsNotMissingIfSet() + { + $this->resolver->setDefault('foo', 'bar'); + + $this->assertFalse($this->resolver->isMissing('foo')); + $this->resolver->setRequired('foo'); + $this->assertFalse($this->resolver->isMissing('foo')); + } + + public function testIsNotMissingAfterRemove() + { + $this->resolver->setRequired('foo'); + $this->resolver->remove('foo'); + $this->assertFalse($this->resolver->isMissing('foo')); + } + + public function testIsNotMissingAfterClear() + { + $this->resolver->setRequired('foo'); + $this->resolver->clear(); + $this->assertFalse($this->resolver->isRequired('foo')); + } + + public function testGetMissingOptions() + { + $this->resolver->setRequired(array('foo', 'bar')); + $this->resolver->setDefault('bam', 'baz'); + $this->resolver->setDefault('foo', 'boo'); + + $this->assertSame(array('bar'), $this->resolver->getMissingOptions()); + } + + //////////////////////////////////////////////////////////////////////////// + // setDefined()/isDefined()/getDefinedOptions() + //////////////////////////////////////////////////////////////////////////// + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testFailIfSetDefinedFromLazyOption() + { + $this->resolver->setDefault('foo', function (Options $options) { + $options->setDefined('bar'); + }); + + $this->resolver->resolve(); + } + + public function testDefinedOptionsNotIncludedInResolvedOptions() + { + $this->resolver->setDefined('foo'); + + $this->assertSame(array(), $this->resolver->resolve()); + } + + public function testDefinedOptionsIncludedIfDefaultSetBefore() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setDefined('foo'); + + $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + } + + public function testDefinedOptionsIncludedIfDefaultSetAfter() + { + $this->resolver->setDefined('foo'); + $this->resolver->setDefault('foo', 'bar'); + + $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + } + + public function testDefinedOptionsIncludedIfPassedToResolve() + { + $this->resolver->setDefined('foo'); + + $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve(array('foo' => 'bar'))); + } + + public function testIsDefined() + { + $this->assertFalse($this->resolver->isDefined('foo')); + $this->resolver->setDefined('foo'); + $this->assertTrue($this->resolver->isDefined('foo')); + } + + public function testLazyOptionsAreDefined() + { + $this->assertFalse($this->resolver->isDefined('foo')); + $this->resolver->setDefault('foo', function (Options $options) {}); + $this->assertTrue($this->resolver->isDefined('foo')); + } + + public function testRequiredOptionsAreDefined() + { + $this->assertFalse($this->resolver->isDefined('foo')); + $this->resolver->setRequired('foo'); + $this->assertTrue($this->resolver->isDefined('foo')); + } + + public function testSetOptionsAreDefined() + { + $this->assertFalse($this->resolver->isDefined('foo')); + $this->resolver->setDefault('foo', 'bar'); + $this->assertTrue($this->resolver->isDefined('foo')); + } + + public function testGetDefinedOptions() + { + $this->resolver->setDefined(array('foo', 'bar')); + $this->resolver->setDefault('baz', 'bam'); + $this->resolver->setRequired('boo'); + + $this->assertSame(array('foo', 'bar', 'baz', 'boo'), $this->resolver->getDefinedOptions()); + } + + public function testRemovedOptionsAreNotDefined() + { + $this->assertFalse($this->resolver->isDefined('foo')); + $this->resolver->setDefined('foo'); + $this->assertTrue($this->resolver->isDefined('foo')); + $this->resolver->remove('foo'); + $this->assertFalse($this->resolver->isDefined('foo')); + } + + public function testClearedOptionsAreNotDefined() + { + $this->assertFalse($this->resolver->isDefined('foo')); + $this->resolver->setDefined('foo'); + $this->assertTrue($this->resolver->isDefined('foo')); + $this->resolver->clear(); + $this->assertFalse($this->resolver->isDefined('foo')); + } + + //////////////////////////////////////////////////////////////////////////// + // setAllowedTypes() + //////////////////////////////////////////////////////////////////////////// + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException + */ + public function testSetAllowedTypesFailsIfUnknownOption() + { + $this->resolver->setAllowedTypes('foo', 'string'); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testFailIfSetAllowedTypesFromLazyOption() + { + $this->resolver->setDefault('foo', function (Options $options) { + $options->setAllowedTypes('bar', 'string'); + }); + + $this->resolver->setDefault('bar', 'baz'); + + $this->resolver->resolve(); + } + + /** + * @dataProvider provideInvalidTypes + */ + public function testResolveFailsIfInvalidType($actualType, $allowedType, $exceptionMessage) + { + $this->resolver->setDefined('option'); + $this->resolver->setAllowedTypes('option', $allowedType); + + if (method_exists($this, 'expectException')) { + $this->expectException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException'); + $this->expectExceptionMessage($exceptionMessage); + } else { + $this->setExpectedException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException', $exceptionMessage); + } + + $this->resolver->resolve(array('option' => $actualType)); + } + + public function provideInvalidTypes() + { + return array( + array(true, 'string', 'The option "option" with value true is expected to be of type "string", but is of type "boolean".'), + array(false, 'string', 'The option "option" with value false is expected to be of type "string", but is of type "boolean".'), + array(fopen(__FILE__, 'r'), 'string', 'The option "option" with value resource is expected to be of type "string", but is of type "resource".'), + array(array(), 'string', 'The option "option" with value array is expected to be of type "string", but is of type "array".'), + array(new OptionsResolver(), 'string', 'The option "option" with value Symfony\Component\OptionsResolver\OptionsResolver is expected to be of type "string", but is of type "Symfony\Component\OptionsResolver\OptionsResolver".'), + array(42, 'string', 'The option "option" with value 42 is expected to be of type "string", but is of type "integer".'), + array(null, 'string', 'The option "option" with value null is expected to be of type "string", but is of type "NULL".'), + array('bar', '\stdClass', 'The option "option" with value "bar" is expected to be of type "\stdClass", but is of type "string".'), + ); + } + + public function testResolveSucceedsIfValidType() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedTypes('foo', 'string'); + + $this->assertNotEmpty($this->resolver->resolve()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + * @expectedExceptionMessage The option "foo" with value 42 is expected to be of type "string" or "bool", but is of type "integer". + */ + public function testResolveFailsIfInvalidTypeMultiple() + { + $this->resolver->setDefault('foo', 42); + $this->resolver->setAllowedTypes('foo', array('string', 'bool')); + + $this->resolver->resolve(); + } + + public function testResolveSucceedsIfValidTypeMultiple() + { + $this->resolver->setDefault('foo', true); + $this->resolver->setAllowedTypes('foo', array('string', 'bool')); + + $this->assertNotEmpty($this->resolver->resolve()); + } + + public function testResolveSucceedsIfInstanceOfClass() + { + $this->resolver->setDefault('foo', new \stdClass()); + $this->resolver->setAllowedTypes('foo', '\stdClass'); + + $this->assertNotEmpty($this->resolver->resolve()); + } + + //////////////////////////////////////////////////////////////////////////// + // addAllowedTypes() + //////////////////////////////////////////////////////////////////////////// + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException + */ + public function testAddAllowedTypesFailsIfUnknownOption() + { + $this->resolver->addAllowedTypes('foo', 'string'); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testFailIfAddAllowedTypesFromLazyOption() + { + $this->resolver->setDefault('foo', function (Options $options) { + $options->addAllowedTypes('bar', 'string'); + }); + + $this->resolver->setDefault('bar', 'baz'); + + $this->resolver->resolve(); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testResolveFailsIfInvalidAddedType() + { + $this->resolver->setDefault('foo', 42); + $this->resolver->addAllowedTypes('foo', 'string'); + + $this->resolver->resolve(); + } + + public function testResolveSucceedsIfValidAddedType() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->addAllowedTypes('foo', 'string'); + + $this->assertNotEmpty($this->resolver->resolve()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testResolveFailsIfInvalidAddedTypeMultiple() + { + $this->resolver->setDefault('foo', 42); + $this->resolver->addAllowedTypes('foo', array('string', 'bool')); + + $this->resolver->resolve(); + } + + public function testResolveSucceedsIfValidAddedTypeMultiple() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->addAllowedTypes('foo', array('string', 'bool')); + + $this->assertNotEmpty($this->resolver->resolve()); + } + + public function testAddAllowedTypesDoesNotOverwrite() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedTypes('foo', 'string'); + $this->resolver->addAllowedTypes('foo', 'bool'); + + $this->resolver->setDefault('foo', 'bar'); + + $this->assertNotEmpty($this->resolver->resolve()); + } + + public function testAddAllowedTypesDoesNotOverwrite2() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedTypes('foo', 'string'); + $this->resolver->addAllowedTypes('foo', 'bool'); + + $this->resolver->setDefault('foo', false); + + $this->assertNotEmpty($this->resolver->resolve()); + } + + //////////////////////////////////////////////////////////////////////////// + // setAllowedValues() + //////////////////////////////////////////////////////////////////////////// + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException + */ + public function testSetAllowedValuesFailsIfUnknownOption() + { + $this->resolver->setAllowedValues('foo', 'bar'); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testFailIfSetAllowedValuesFromLazyOption() + { + $this->resolver->setDefault('foo', function (Options $options) { + $options->setAllowedValues('bar', 'baz'); + }); + + $this->resolver->setDefault('bar', 'baz'); + + $this->resolver->resolve(); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + * @expectedExceptionMessage The option "foo" with value 42 is invalid. Accepted values are: "bar". + */ + public function testResolveFailsIfInvalidValue() + { + $this->resolver->setDefined('foo'); + $this->resolver->setAllowedValues('foo', 'bar'); + + $this->resolver->resolve(array('foo' => 42)); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + * @expectedExceptionMessage The option "foo" with value null is invalid. Accepted values are: "bar". + */ + public function testResolveFailsIfInvalidValueIsNull() + { + $this->resolver->setDefault('foo', null); + $this->resolver->setAllowedValues('foo', 'bar'); + + $this->resolver->resolve(); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testResolveFailsIfInvalidValueStrict() + { + $this->resolver->setDefault('foo', 42); + $this->resolver->setAllowedValues('foo', '42'); + + $this->resolver->resolve(); + } + + public function testResolveSucceedsIfValidValue() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedValues('foo', 'bar'); + + $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + } + + public function testResolveSucceedsIfValidValueIsNull() + { + $this->resolver->setDefault('foo', null); + $this->resolver->setAllowedValues('foo', null); + + $this->assertEquals(array('foo' => null), $this->resolver->resolve()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + * @expectedExceptionMessage The option "foo" with value 42 is invalid. Accepted values are: "bar", false, null. + */ + public function testResolveFailsIfInvalidValueMultiple() + { + $this->resolver->setDefault('foo', 42); + $this->resolver->setAllowedValues('foo', array('bar', false, null)); + + $this->resolver->resolve(); + } + + public function testResolveSucceedsIfValidValueMultiple() + { + $this->resolver->setDefault('foo', 'baz'); + $this->resolver->setAllowedValues('foo', array('bar', 'baz')); + + $this->assertEquals(array('foo' => 'baz'), $this->resolver->resolve()); + } + + public function testResolveFailsIfClosureReturnsFalse() + { + $this->resolver->setDefault('foo', 42); + $this->resolver->setAllowedValues('foo', function ($value) use (&$passedValue) { + $passedValue = $value; + + return false; + }); + + try { + $this->resolver->resolve(); + $this->fail('Should fail'); + } catch (InvalidOptionsException $e) { + } + + $this->assertSame(42, $passedValue); + } + + public function testResolveSucceedsIfClosureReturnsTrue() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedValues('foo', function ($value) use (&$passedValue) { + $passedValue = $value; + + return true; + }); + + $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + $this->assertSame('bar', $passedValue); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testResolveFailsIfAllClosuresReturnFalse() + { + $this->resolver->setDefault('foo', 42); + $this->resolver->setAllowedValues('foo', array( + function () { return false; }, + function () { return false; }, + function () { return false; }, + )); + + $this->resolver->resolve(); + } + + public function testResolveSucceedsIfAnyClosureReturnsTrue() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedValues('foo', array( + function () { return false; }, + function () { return true; }, + function () { return false; }, + )); + + $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + } + + //////////////////////////////////////////////////////////////////////////// + // addAllowedValues() + //////////////////////////////////////////////////////////////////////////// + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException + */ + public function testAddAllowedValuesFailsIfUnknownOption() + { + $this->resolver->addAllowedValues('foo', 'bar'); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testFailIfAddAllowedValuesFromLazyOption() + { + $this->resolver->setDefault('foo', function (Options $options) { + $options->addAllowedValues('bar', 'baz'); + }); + + $this->resolver->setDefault('bar', 'baz'); + + $this->resolver->resolve(); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testResolveFailsIfInvalidAddedValue() + { + $this->resolver->setDefault('foo', 42); + $this->resolver->addAllowedValues('foo', 'bar'); + + $this->resolver->resolve(); + } + + public function testResolveSucceedsIfValidAddedValue() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->addAllowedValues('foo', 'bar'); + + $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + } + + public function testResolveSucceedsIfValidAddedValueIsNull() + { + $this->resolver->setDefault('foo', null); + $this->resolver->addAllowedValues('foo', null); + + $this->assertEquals(array('foo' => null), $this->resolver->resolve()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testResolveFailsIfInvalidAddedValueMultiple() + { + $this->resolver->setDefault('foo', 42); + $this->resolver->addAllowedValues('foo', array('bar', 'baz')); + + $this->resolver->resolve(); + } + + public function testResolveSucceedsIfValidAddedValueMultiple() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->addAllowedValues('foo', array('bar', 'baz')); + + $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + } + + public function testAddAllowedValuesDoesNotOverwrite() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedValues('foo', 'bar'); + $this->resolver->addAllowedValues('foo', 'baz'); + + $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + } + + public function testAddAllowedValuesDoesNotOverwrite2() + { + $this->resolver->setDefault('foo', 'baz'); + $this->resolver->setAllowedValues('foo', 'bar'); + $this->resolver->addAllowedValues('foo', 'baz'); + + $this->assertEquals(array('foo' => 'baz'), $this->resolver->resolve()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testResolveFailsIfAllAddedClosuresReturnFalse() + { + $this->resolver->setDefault('foo', 42); + $this->resolver->setAllowedValues('foo', function () { return false; }); + $this->resolver->addAllowedValues('foo', function () { return false; }); + + $this->resolver->resolve(); + } + + public function testResolveSucceedsIfAnyAddedClosureReturnsTrue() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedValues('foo', function () { return false; }); + $this->resolver->addAllowedValues('foo', function () { return true; }); + + $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + } + + public function testResolveSucceedsIfAnyAddedClosureReturnsTrue2() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedValues('foo', function () { return true; }); + $this->resolver->addAllowedValues('foo', function () { return false; }); + + $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); + } + + //////////////////////////////////////////////////////////////////////////// + // setNormalizer() + //////////////////////////////////////////////////////////////////////////// + + public function testSetNormalizerReturnsThis() + { + $this->resolver->setDefault('foo', 'bar'); + $this->assertSame($this->resolver, $this->resolver->setNormalizer('foo', function () {})); + } + + public function testSetNormalizerClosure() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setNormalizer('foo', function () { + return 'normalized'; + }); + + $this->assertEquals(array('foo' => 'normalized'), $this->resolver->resolve()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException + */ + public function testSetNormalizerFailsIfUnknownOption() + { + $this->resolver->setNormalizer('foo', function () {}); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testFailIfSetNormalizerFromLazyOption() + { + $this->resolver->setDefault('foo', function (Options $options) { + $options->setNormalizer('foo', function () {}); + }); + + $this->resolver->setDefault('bar', 'baz'); + + $this->resolver->resolve(); + } + + public function testNormalizerReceivesSetOption() + { + $this->resolver->setDefault('foo', 'bar'); + + $this->resolver->setNormalizer('foo', function (Options $options, $value) { + return 'normalized['.$value.']'; + }); + + $this->assertEquals(array('foo' => 'normalized[bar]'), $this->resolver->resolve()); + } + + public function testNormalizerReceivesPassedOption() + { + $this->resolver->setDefault('foo', 'bar'); + + $this->resolver->setNormalizer('foo', function (Options $options, $value) { + return 'normalized['.$value.']'; + }); + + $resolved = $this->resolver->resolve(array('foo' => 'baz')); + + $this->assertEquals(array('foo' => 'normalized[baz]'), $resolved); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testValidateTypeBeforeNormalization() + { + $this->resolver->setDefault('foo', 'bar'); + + $this->resolver->setAllowedTypes('foo', 'int'); + + $this->resolver->setNormalizer('foo', function () { + Assert::fail('Should not be called.'); + }); + + $this->resolver->resolve(); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException + */ + public function testValidateValueBeforeNormalization() + { + $this->resolver->setDefault('foo', 'bar'); + + $this->resolver->setAllowedValues('foo', 'baz'); + + $this->resolver->setNormalizer('foo', function () { + Assert::fail('Should not be called.'); + }); + + $this->resolver->resolve(); + } + + public function testNormalizerCanAccessOtherOptions() + { + $this->resolver->setDefault('default', 'bar'); + $this->resolver->setDefault('norm', 'baz'); + + $this->resolver->setNormalizer('norm', function (Options $options) { + /* @var TestCase $test */ + Assert::assertSame('bar', $options['default']); + + return 'normalized'; + }); + + $this->assertEquals(array( + 'default' => 'bar', + 'norm' => 'normalized', + ), $this->resolver->resolve()); + } + + public function testNormalizerCanAccessLazyOptions() + { + $this->resolver->setDefault('lazy', function (Options $options) { + return 'bar'; + }); + $this->resolver->setDefault('norm', 'baz'); + + $this->resolver->setNormalizer('norm', function (Options $options) { + /* @var TestCase $test */ + Assert::assertEquals('bar', $options['lazy']); + + return 'normalized'; + }); + + $this->assertEquals(array( + 'lazy' => 'bar', + 'norm' => 'normalized', + ), $this->resolver->resolve()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\OptionDefinitionException + */ + public function testFailIfCyclicDependencyBetweenNormalizers() + { + $this->resolver->setDefault('norm1', 'bar'); + $this->resolver->setDefault('norm2', 'baz'); + + $this->resolver->setNormalizer('norm1', function (Options $options) { + $options['norm2']; + }); + + $this->resolver->setNormalizer('norm2', function (Options $options) { + $options['norm1']; + }); + + $this->resolver->resolve(); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\OptionDefinitionException + */ + public function testFailIfCyclicDependencyBetweenNormalizerAndLazyOption() + { + $this->resolver->setDefault('lazy', function (Options $options) { + $options['norm']; + }); + + $this->resolver->setDefault('norm', 'baz'); + + $this->resolver->setNormalizer('norm', function (Options $options) { + $options['lazy']; + }); + + $this->resolver->resolve(); + } + + public function testCatchedExceptionFromNormalizerDoesNotCrashOptionResolver() + { + $throw = true; + + $this->resolver->setDefaults(array('catcher' => null, 'thrower' => null)); + + $this->resolver->setNormalizer('catcher', function (Options $options) { + try { + return $options['thrower']; + } catch (\Exception $e) { + return false; + } + }); + + $this->resolver->setNormalizer('thrower', function (Options $options) use (&$throw) { + if ($throw) { + $throw = false; + throw new \UnexpectedValueException('throwing'); + } + + return true; + }); + + $this->resolver->resolve(); + } + + public function testCatchedExceptionFromLazyDoesNotCrashOptionResolver() + { + $throw = true; + + $this->resolver->setDefault('catcher', function (Options $options) { + try { + return $options['thrower']; + } catch (\Exception $e) { + return false; + } + }); + + $this->resolver->setDefault('thrower', function (Options $options) use (&$throw) { + if ($throw) { + $throw = false; + throw new \UnexpectedValueException('throwing'); + } + + return true; + }); + + $this->resolver->resolve(); + } + + public function testInvokeEachNormalizerOnlyOnce() + { + $calls = 0; + + $this->resolver->setDefault('norm1', 'bar'); + $this->resolver->setDefault('norm2', 'baz'); + + $this->resolver->setNormalizer('norm1', function ($options) use (&$calls) { + Assert::assertSame(1, ++$calls); + + $options['norm2']; + }); + $this->resolver->setNormalizer('norm2', function () use (&$calls) { + Assert::assertSame(2, ++$calls); + }); + + $this->resolver->resolve(); + + $this->assertSame(2, $calls); + } + + public function testNormalizerNotCalledForUnsetOptions() + { + $this->resolver->setDefined('norm'); + + $this->resolver->setNormalizer('norm', function () { + Assert::fail('Should not be called.'); + }); + + $this->assertEmpty($this->resolver->resolve()); + } + + //////////////////////////////////////////////////////////////////////////// + // setDefaults() + //////////////////////////////////////////////////////////////////////////// + + public function testSetDefaultsReturnsThis() + { + $this->assertSame($this->resolver, $this->resolver->setDefaults(array('foo', 'bar'))); + } + + public function testSetDefaults() + { + $this->resolver->setDefault('one', '1'); + $this->resolver->setDefault('two', 'bar'); + + $this->resolver->setDefaults(array( + 'two' => '2', + 'three' => '3', + )); + + $this->assertEquals(array( + 'one' => '1', + 'two' => '2', + 'three' => '3', + ), $this->resolver->resolve()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testFailIfSetDefaultsFromLazyOption() + { + $this->resolver->setDefault('foo', function (Options $options) { + $options->setDefaults(array('two' => '2')); + }); + + $this->resolver->resolve(); + } + + //////////////////////////////////////////////////////////////////////////// + // remove() + //////////////////////////////////////////////////////////////////////////// + + public function testRemoveReturnsThis() + { + $this->resolver->setDefault('foo', 'bar'); + + $this->assertSame($this->resolver, $this->resolver->remove('foo')); + } + + public function testRemoveSingleOption() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setDefault('baz', 'boo'); + $this->resolver->remove('foo'); + + $this->assertSame(array('baz' => 'boo'), $this->resolver->resolve()); + } + + public function testRemoveMultipleOptions() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setDefault('baz', 'boo'); + $this->resolver->setDefault('doo', 'dam'); + + $this->resolver->remove(array('foo', 'doo')); + + $this->assertSame(array('baz' => 'boo'), $this->resolver->resolve()); + } + + public function testRemoveLazyOption() + { + $this->resolver->setDefault('foo', function (Options $options) { + return 'lazy'; + }); + $this->resolver->remove('foo'); + + $this->assertSame(array(), $this->resolver->resolve()); + } + + public function testRemoveNormalizer() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setNormalizer('foo', function (Options $options, $value) { + return 'normalized'; + }); + $this->resolver->remove('foo'); + $this->resolver->setDefault('foo', 'bar'); + + $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + } + + public function testRemoveAllowedTypes() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedTypes('foo', 'int'); + $this->resolver->remove('foo'); + $this->resolver->setDefault('foo', 'bar'); + + $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + } + + public function testRemoveAllowedValues() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedValues('foo', array('baz', 'boo')); + $this->resolver->remove('foo'); + $this->resolver->setDefault('foo', 'bar'); + + $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testFailIfRemoveFromLazyOption() + { + $this->resolver->setDefault('foo', function (Options $options) { + $options->remove('bar'); + }); + + $this->resolver->setDefault('bar', 'baz'); + + $this->resolver->resolve(); + } + + public function testRemoveUnknownOptionIgnored() + { + $this->assertNotNull($this->resolver->remove('foo')); + } + + //////////////////////////////////////////////////////////////////////////// + // clear() + //////////////////////////////////////////////////////////////////////////// + + public function testClearReturnsThis() + { + $this->assertSame($this->resolver, $this->resolver->clear()); + } + + public function testClearRemovesAllOptions() + { + $this->resolver->setDefault('one', 1); + $this->resolver->setDefault('two', 2); + + $this->resolver->clear(); + + $this->assertEmpty($this->resolver->resolve()); + } + + public function testClearLazyOption() + { + $this->resolver->setDefault('foo', function (Options $options) { + return 'lazy'; + }); + $this->resolver->clear(); + + $this->assertSame(array(), $this->resolver->resolve()); + } + + public function testClearNormalizer() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setNormalizer('foo', function (Options $options, $value) { + return 'normalized'; + }); + $this->resolver->clear(); + $this->resolver->setDefault('foo', 'bar'); + + $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + } + + public function testClearAllowedTypes() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedTypes('foo', 'int'); + $this->resolver->clear(); + $this->resolver->setDefault('foo', 'bar'); + + $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + } + + public function testClearAllowedValues() + { + $this->resolver->setDefault('foo', 'bar'); + $this->resolver->setAllowedValues('foo', 'baz'); + $this->resolver->clear(); + $this->resolver->setDefault('foo', 'bar'); + + $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testFailIfClearFromLazyption() + { + $this->resolver->setDefault('foo', function (Options $options) { + $options->clear(); + }); + + $this->resolver->setDefault('bar', 'baz'); + + $this->resolver->resolve(); + } + + public function testClearOptionAndNormalizer() + { + $this->resolver->setDefault('foo1', 'bar'); + $this->resolver->setNormalizer('foo1', function (Options $options) { + return ''; + }); + $this->resolver->setDefault('foo2', 'bar'); + $this->resolver->setNormalizer('foo2', function (Options $options) { + return ''; + }); + + $this->resolver->clear(); + $this->assertEmpty($this->resolver->resolve()); + } + + //////////////////////////////////////////////////////////////////////////// + // ArrayAccess + //////////////////////////////////////////////////////////////////////////// + + public function testArrayAccess() + { + $this->resolver->setDefault('default1', 0); + $this->resolver->setDefault('default2', 1); + $this->resolver->setRequired('required'); + $this->resolver->setDefined('defined'); + $this->resolver->setDefault('lazy1', function (Options $options) { + return 'lazy'; + }); + + $this->resolver->setDefault('lazy2', function (Options $options) { + Assert::assertTrue(isset($options['default1'])); + Assert::assertTrue(isset($options['default2'])); + Assert::assertTrue(isset($options['required'])); + Assert::assertTrue(isset($options['lazy1'])); + Assert::assertTrue(isset($options['lazy2'])); + Assert::assertFalse(isset($options['defined'])); + + Assert::assertSame(0, $options['default1']); + Assert::assertSame(42, $options['default2']); + Assert::assertSame('value', $options['required']); + Assert::assertSame('lazy', $options['lazy1']); + + // Obviously $options['lazy'] and $options['defined'] cannot be + // accessed + }); + + $this->resolver->resolve(array('default2' => 42, 'required' => 'value')); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testArrayAccessGetFailsOutsideResolve() + { + $this->resolver->setDefault('default', 0); + + $this->resolver['default']; + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testArrayAccessExistsFailsOutsideResolve() + { + $this->resolver->setDefault('default', 0); + + isset($this->resolver['default']); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testArrayAccessSetNotSupported() + { + $this->resolver['default'] = 0; + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testArrayAccessUnsetNotSupported() + { + $this->resolver->setDefault('default', 0); + + unset($this->resolver['default']); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\NoSuchOptionException + * @expectedExceptionMessage The option "undefined" does not exist. Defined options are: "foo", "lazy". + */ + public function testFailIfGetNonExisting() + { + $this->resolver->setDefault('foo', 'bar'); + + $this->resolver->setDefault('lazy', function (Options $options) { + $options['undefined']; + }); + + $this->resolver->resolve(); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\NoSuchOptionException + * @expectedExceptionMessage The optional option "defined" has no value set. You should make sure it is set with "isset" before reading it. + */ + public function testFailIfGetDefinedButUnset() + { + $this->resolver->setDefined('defined'); + + $this->resolver->setDefault('lazy', function (Options $options) { + $options['defined']; + }); + + $this->resolver->resolve(); + } + + /** + * @expectedException \Symfony\Component\OptionsResolver\Exception\OptionDefinitionException + */ + public function testFailIfCyclicDependency() + { + $this->resolver->setDefault('lazy1', function (Options $options) { + $options['lazy2']; + }); + + $this->resolver->setDefault('lazy2', function (Options $options) { + $options['lazy1']; + }); + + $this->resolver->resolve(); + } + + //////////////////////////////////////////////////////////////////////////// + // Countable + //////////////////////////////////////////////////////////////////////////// + + public function testCount() + { + $this->resolver->setDefault('default', 0); + $this->resolver->setRequired('required'); + $this->resolver->setDefined('defined'); + $this->resolver->setDefault('lazy1', function () {}); + + $this->resolver->setDefault('lazy2', function (Options $options) { + Assert::assertCount(4, $options); + }); + + $this->assertCount(4, $this->resolver->resolve(array('required' => 'value'))); + } + + /** + * In resolve() we count the options that are actually set (which may be + * only a subset of the defined options). Outside of resolve(), it's not + * clear what is counted. + * + * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException + */ + public function testCountFailsOutsideResolve() + { + $this->resolver->setDefault('foo', 0); + $this->resolver->setRequired('bar'); + $this->resolver->setDefined('bar'); + $this->resolver->setDefault('lazy1', function () {}); + + count($this->resolver); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/composer.json b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..28cb1d7bd25be7f81c5359711d14f2dbdacfd1e1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/composer.json @@ -0,0 +1,33 @@ +{ + "name": "symfony/options-resolver", + "type": "library", + "description": "Symfony OptionsResolver Component", + "keywords": ["options", "config", "configuration"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..abf84614bcf7676191b802f61711bd04c4e613d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Process/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..2f3c1beb74b7e819608c4f34c36b8122c329eb1f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/CHANGELOG.md @@ -0,0 +1,40 @@ +CHANGELOG +========= + +2.5.0 +----- + + * added support for PTY mode + * added the convenience method "mustRun" + * deprecation: Process::setStdin() is deprecated in favor of Process::setInput() + * deprecation: Process::getStdin() is deprecated in favor of Process::getInput() + * deprecation: Process::setInput() and ProcessBuilder::setInput() do not accept non-scalar types + +2.4.0 +----- + + * added the ability to define an idle timeout + +2.3.0 +----- + + * added ProcessUtils::escapeArgument() to fix the bug in escapeshellarg() function on Windows + * added Process::signal() + * added Process::getPid() + * added support for a TTY mode + +2.2.0 +----- + + * added ProcessBuilder::setArguments() to reset the arguments on a builder + * added a way to retrieve the standard and error output incrementally + * added Process:restart() + +2.1.0 +----- + + * added support for non-blocking processes (start(), wait(), isRunning(), stop()) + * enhanced Windows compatibility + * added Process::getExitCodeText() that returns a string representation for + the exit code returned by the process + * added ProcessBuilder diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..75c1c9e5d800500d07f2790f21eb45a26439f3cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Exception; + +/** + * Marker Interface for the Process Component. + * + * @author Johannes M. Schmitt + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..926ee2118b03703381fabcd80e01bda817c7fa67 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Exception; + +/** + * InvalidArgumentException for the Process Component. + * + * @author Romain Neutron + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/LogicException.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/LogicException.php new file mode 100644 index 0000000000000000000000000000000000000000..be3d490dde8cdea7e594b6e18bc4825a1e2eee13 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/LogicException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Exception; + +/** + * LogicException for the Process Component. + * + * @author Romain Neutron + */ +class LogicException extends \LogicException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/ProcessFailedException.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/ProcessFailedException.php new file mode 100644 index 0000000000000000000000000000000000000000..328acfde5e88358313c365de13738d70a66755f1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/ProcessFailedException.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Exception; + +use Symfony\Component\Process\Process; + +/** + * Exception for failed processes. + * + * @author Johannes M. Schmitt + */ +class ProcessFailedException extends RuntimeException +{ + private $process; + + public function __construct(Process $process) + { + if ($process->isSuccessful()) { + throw new InvalidArgumentException('Expected a failed process, but the given process was successful.'); + } + + $error = sprintf('The command "%s" failed.'."\n\nExit Code: %s(%s)\n\nWorking directory: %s", + $process->getCommandLine(), + $process->getExitCode(), + $process->getExitCodeText(), + $process->getWorkingDirectory() + ); + + if (!$process->isOutputDisabled()) { + $error .= sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", + $process->getOutput(), + $process->getErrorOutput() + ); + } + + parent::__construct($error); + + $this->process = $process; + } + + public function getProcess() + { + return $this->process; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/ProcessTimedOutException.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/ProcessTimedOutException.php new file mode 100644 index 0000000000000000000000000000000000000000..d45114696f640d9a05a4eea92ce1fa1b203d2a4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/ProcessTimedOutException.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Exception; + +use Symfony\Component\Process\Process; + +/** + * Exception that is thrown when a process times out. + * + * @author Johannes M. Schmitt + */ +class ProcessTimedOutException extends RuntimeException +{ + const TYPE_GENERAL = 1; + const TYPE_IDLE = 2; + + private $process; + private $timeoutType; + + public function __construct(Process $process, $timeoutType) + { + $this->process = $process; + $this->timeoutType = $timeoutType; + + parent::__construct(sprintf( + 'The process "%s" exceeded the timeout of %s seconds.', + $process->getCommandLine(), + $this->getExceededTimeout() + )); + } + + public function getProcess() + { + return $this->process; + } + + public function isGeneralTimeout() + { + return $this->timeoutType === self::TYPE_GENERAL; + } + + public function isIdleTimeout() + { + return $this->timeoutType === self::TYPE_IDLE; + } + + public function getExceededTimeout() + { + switch ($this->timeoutType) { + case self::TYPE_GENERAL: + return $this->process->getTimeout(); + + case self::TYPE_IDLE: + return $this->process->getIdleTimeout(); + + default: + throw new \LogicException(sprintf('Unknown timeout type "%d".', $this->timeoutType)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/RuntimeException.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/RuntimeException.php new file mode 100644 index 0000000000000000000000000000000000000000..adead2536b10362f3e2c499612ce0ffeea3f6a49 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Exception/RuntimeException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Exception; + +/** + * RuntimeException for the Process Component. + * + * @author Johannes M. Schmitt + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/ExecutableFinder.php b/vendor/symfony/symfony/src/Symfony/Component/Process/ExecutableFinder.php new file mode 100644 index 0000000000000000000000000000000000000000..d8e689622a537ebf3a386f7b005745629b6392f2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/ExecutableFinder.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process; + +/** + * Generic executable finder. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class ExecutableFinder +{ + private $suffixes = array('.exe', '.bat', '.cmd', '.com'); + + /** + * Replaces default suffixes of executable. + * + * @param array $suffixes + */ + public function setSuffixes(array $suffixes) + { + $this->suffixes = $suffixes; + } + + /** + * Adds new possible suffix to check for executable. + * + * @param string $suffix + */ + public function addSuffix($suffix) + { + $this->suffixes[] = $suffix; + } + + /** + * Finds an executable by name. + * + * @param string $name The executable name (without the extension) + * @param string $default The default to return if no executable is found + * @param array $extraDirs Additional dirs to check into + * + * @return string The executable path or default value + */ + public function find($name, $default = null, array $extraDirs = array()) + { + if (ini_get('open_basedir')) { + $searchPath = explode(PATH_SEPARATOR, ini_get('open_basedir')); + $dirs = array(); + foreach ($searchPath as $path) { + // Silencing against https://bugs.php.net/69240 + if (@is_dir($path)) { + $dirs[] = $path; + } else { + if (basename($path) == $name && @is_executable($path)) { + return $path; + } + } + } + } else { + $dirs = array_merge( + explode(PATH_SEPARATOR, getenv('PATH') ?: getenv('Path')), + $extraDirs + ); + } + + $suffixes = array(''); + if ('\\' === DIRECTORY_SEPARATOR) { + $pathExt = getenv('PATHEXT'); + $suffixes = array_merge($suffixes, $pathExt ? explode(PATH_SEPARATOR, $pathExt) : $this->suffixes); + } + foreach ($suffixes as $suffix) { + foreach ($dirs as $dir) { + if (@is_file($file = $dir.DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === DIRECTORY_SEPARATOR || is_executable($file))) { + return $file; + } + } + } + + return $default; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/InputStream.php b/vendor/symfony/symfony/src/Symfony/Component/Process/InputStream.php new file mode 100644 index 0000000000000000000000000000000000000000..831b10932599d4663e0dd157f6a5a3b261fdad8a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/InputStream.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process; + +use Symfony\Component\Process\Exception\RuntimeException; + +/** + * Provides a way to continuously write to the input of a Process until the InputStream is closed. + * + * @author Nicolas Grekas + */ +class InputStream implements \IteratorAggregate +{ + private $onEmpty = null; + private $input = array(); + private $open = true; + + /** + * Sets a callback that is called when the write buffer becomes empty. + */ + public function onEmpty(callable $onEmpty = null) + { + $this->onEmpty = $onEmpty; + } + + /** + * Appends an input to the write buffer. + * + * @param resource|scalar|\Traversable|null The input to append as stream resource, scalar or \Traversable + */ + public function write($input) + { + if (null === $input) { + return; + } + if ($this->isClosed()) { + throw new RuntimeException(sprintf('%s is closed', static::class)); + } + $this->input[] = ProcessUtils::validateInput(__METHOD__, $input); + } + + /** + * Closes the write buffer. + */ + public function close() + { + $this->open = false; + } + + /** + * Tells whether the write buffer is closed or not. + */ + public function isClosed() + { + return !$this->open; + } + + public function getIterator() + { + $this->open = true; + + while ($this->open || $this->input) { + if (!$this->input) { + yield ''; + continue; + } + $current = array_shift($this->input); + + if ($current instanceof \Iterator) { + foreach ($current as $cur) { + yield $cur; + } + } else { + yield $current; + } + if (!$this->input && $this->open && null !== $onEmpty = $this->onEmpty) { + $this->write($onEmpty($this)); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Process/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Process/PhpExecutableFinder.php b/vendor/symfony/symfony/src/Symfony/Component/Process/PhpExecutableFinder.php new file mode 100644 index 0000000000000000000000000000000000000000..db31cc1b3ce8b2c354ef975c45049f96279ee7c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/PhpExecutableFinder.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process; + +/** + * An executable finder specifically designed for the PHP executable. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class PhpExecutableFinder +{ + private $executableFinder; + + public function __construct() + { + $this->executableFinder = new ExecutableFinder(); + } + + /** + * Finds The PHP executable. + * + * @param bool $includeArgs Whether or not include command arguments + * + * @return string|false The PHP executable path or false if it cannot be found + */ + public function find($includeArgs = true) + { + $args = $this->findArguments(); + $args = $includeArgs && $args ? ' '.implode(' ', $args) : ''; + + // HHVM support + if (defined('HHVM_VERSION')) { + return (getenv('PHP_BINARY') ?: PHP_BINARY).$args; + } + + // PHP_BINARY return the current sapi executable + if (PHP_BINARY && in_array(PHP_SAPI, array('cli', 'cli-server', 'phpdbg')) && is_file(PHP_BINARY)) { + return PHP_BINARY.$args; + } + + if ($php = getenv('PHP_PATH')) { + if (!is_executable($php)) { + return false; + } + + return $php; + } + + if ($php = getenv('PHP_PEAR_PHP_BIN')) { + if (is_executable($php)) { + return $php; + } + } + + $dirs = array(PHP_BINDIR); + if ('\\' === DIRECTORY_SEPARATOR) { + $dirs[] = 'C:\xampp\php\\'; + } + + return $this->executableFinder->find('php', false, $dirs); + } + + /** + * Finds the PHP executable arguments. + * + * @return array The PHP executable arguments + */ + public function findArguments() + { + $arguments = array(); + + if (defined('HHVM_VERSION')) { + $arguments[] = '--php'; + } elseif ('phpdbg' === PHP_SAPI) { + $arguments[] = '-qrr'; + } + + return $arguments; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/PhpProcess.php b/vendor/symfony/symfony/src/Symfony/Component/Process/PhpProcess.php new file mode 100644 index 0000000000000000000000000000000000000000..76425ceb8cdd6ab44352ff482d5e8f28426bcc84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/PhpProcess.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process; + +use Symfony\Component\Process\Exception\RuntimeException; + +/** + * PhpProcess runs a PHP script in an independent process. + * + * $p = new PhpProcess(''); + * $p->run(); + * print $p->getOutput()."\n"; + * + * @author Fabien Potencier + */ +class PhpProcess extends Process +{ + /** + * Constructor. + * + * @param string $script The PHP script to run (as a string) + * @param string|null $cwd The working directory or null to use the working dir of the current PHP process + * @param array|null $env The environment variables or null to use the same environment as the current PHP process + * @param int $timeout The timeout in seconds + * @param array $options An array of options for proc_open + */ + public function __construct($script, $cwd = null, array $env = null, $timeout = 60, array $options = array()) + { + $executableFinder = new PhpExecutableFinder(); + if (false === $php = $executableFinder->find()) { + $php = null; + } + if ('phpdbg' === PHP_SAPI) { + $file = tempnam(sys_get_temp_dir(), 'dbg'); + file_put_contents($file, $script); + register_shutdown_function('unlink', $file); + $php .= ' '.ProcessUtils::escapeArgument($file); + $script = null; + } + if ('\\' !== DIRECTORY_SEPARATOR && null !== $php) { + // exec is mandatory to deal with sending a signal to the process + // see https://github.com/symfony/symfony/issues/5030 about prepending + // command with exec + $php = 'exec '.$php; + } + + parent::__construct($php, $cwd, $env, $script, $timeout, $options); + } + + /** + * Sets the path to the PHP binary to use. + */ + public function setPhpBinary($php) + { + $this->setCommandLine($php); + } + + /** + * {@inheritdoc} + */ + public function start(callable $callback = null) + { + if (null === $this->getCommandLine()) { + throw new RuntimeException('Unable to find the PHP executable.'); + } + + parent::start($callback); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/AbstractPipes.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/AbstractPipes.php new file mode 100644 index 0000000000000000000000000000000000000000..4c67d5b82c31a24113ef8a4223d9f12f1cc50d70 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/AbstractPipes.php @@ -0,0 +1,169 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Pipes; + +use Symfony\Component\Process\Exception\InvalidArgumentException; + +/** + * @author Romain Neutron + * + * @internal + */ +abstract class AbstractPipes implements PipesInterface +{ + /** @var array */ + public $pipes = array(); + + /** @var string */ + private $inputBuffer = ''; + /** @var resource|scalar|\Iterator|null */ + private $input; + /** @var bool */ + private $blocked = true; + + public function __construct($input) + { + if (is_resource($input) || $input instanceof \Iterator) { + $this->input = $input; + } elseif (is_string($input)) { + $this->inputBuffer = $input; + } else { + $this->inputBuffer = (string) $input; + } + } + + /** + * {@inheritdoc} + */ + public function close() + { + foreach ($this->pipes as $pipe) { + fclose($pipe); + } + $this->pipes = array(); + } + + /** + * Returns true if a system call has been interrupted. + * + * @return bool + */ + protected function hasSystemCallBeenInterrupted() + { + $lastError = error_get_last(); + + // stream_select returns false when the `select` system call is interrupted by an incoming signal + return isset($lastError['message']) && false !== stripos($lastError['message'], 'interrupted system call'); + } + + /** + * Unblocks streams. + */ + protected function unblock() + { + if (!$this->blocked) { + return; + } + + foreach ($this->pipes as $pipe) { + stream_set_blocking($pipe, 0); + } + if (is_resource($this->input)) { + stream_set_blocking($this->input, 0); + } + + $this->blocked = false; + } + + /** + * Writes input to stdin. + * + * @throws InvalidArgumentException When an input iterator yields a non supported value + */ + protected function write() + { + if (!isset($this->pipes[0])) { + return; + } + $input = $this->input; + + if ($input instanceof \Iterator) { + if (!$input->valid()) { + $input = null; + } elseif (is_resource($input = $input->current())) { + stream_set_blocking($input, 0); + } elseif (!isset($this->inputBuffer[0])) { + if (!is_string($input)) { + if (!is_scalar($input)) { + throw new InvalidArgumentException(sprintf('%s yielded a value of type "%s", but only scalars and stream resources are supported', get_class($this->input), gettype($input))); + } + $input = (string) $input; + } + $this->inputBuffer = $input; + $this->input->next(); + $input = null; + } else { + $input = null; + } + } + + $r = $e = array(); + $w = array($this->pipes[0]); + + // let's have a look if something changed in streams + if (false === $n = @stream_select($r, $w, $e, 0, 0)) { + return; + } + + foreach ($w as $stdin) { + if (isset($this->inputBuffer[0])) { + $written = fwrite($stdin, $this->inputBuffer); + $this->inputBuffer = substr($this->inputBuffer, $written); + if (isset($this->inputBuffer[0])) { + return array($this->pipes[0]); + } + } + + if ($input) { + for (;;) { + $data = fread($input, self::CHUNK_SIZE); + if (!isset($data[0])) { + break; + } + $written = fwrite($stdin, $data); + $data = substr($data, $written); + if (isset($data[0])) { + $this->inputBuffer = $data; + + return array($this->pipes[0]); + } + } + if (feof($input)) { + if ($this->input instanceof \Iterator) { + $this->input->next(); + } else { + $this->input = null; + } + } + } + } + + // no input to read on resource, buffer is empty + if (!isset($this->inputBuffer[0]) && !($this->input instanceof \Iterator ? $this->input->valid() : $this->input)) { + $this->input = null; + fclose($this->pipes[0]); + unset($this->pipes[0]); + } elseif (!$w) { + return array($this->pipes[0]); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/PipesInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/PipesInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..52bbe76b8f67b76ebd83fa5d1b82a7c7c26371e1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/PipesInterface.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Pipes; + +/** + * PipesInterface manages descriptors and pipes for the use of proc_open. + * + * @author Romain Neutron + * + * @internal + */ +interface PipesInterface +{ + const CHUNK_SIZE = 16384; + + /** + * Returns an array of descriptors for the use of proc_open. + * + * @return array + */ + public function getDescriptors(); + + /** + * Returns an array of filenames indexed by their related stream in case these pipes use temporary files. + * + * @return string[] + */ + public function getFiles(); + + /** + * Reads data in file handles and pipes. + * + * @param bool $blocking Whether to use blocking calls or not + * @param bool $close Whether to close pipes if they've reached EOF + * + * @return string[] An array of read data indexed by their fd + */ + public function readAndWrite($blocking, $close = false); + + /** + * Returns if the current state has open file handles or pipes. + * + * @return bool + */ + public function areOpen(); + + /** + * Returns if pipes are able to read output. + * + * @return bool + */ + public function haveReadSupport(); + + /** + * Closes file handles and pipes. + */ + public function close(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/UnixPipes.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/UnixPipes.php new file mode 100644 index 0000000000000000000000000000000000000000..3185fe76ee03fd165f48453de1e8e1ecf26d1faa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/UnixPipes.php @@ -0,0 +1,153 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Pipes; + +use Symfony\Component\Process\Process; + +/** + * UnixPipes implementation uses unix pipes as handles. + * + * @author Romain Neutron + * + * @internal + */ +class UnixPipes extends AbstractPipes +{ + /** @var bool */ + private $ttyMode; + /** @var bool */ + private $ptyMode; + /** @var bool */ + private $haveReadSupport; + + public function __construct($ttyMode, $ptyMode, $input, $haveReadSupport) + { + $this->ttyMode = (bool) $ttyMode; + $this->ptyMode = (bool) $ptyMode; + $this->haveReadSupport = (bool) $haveReadSupport; + + parent::__construct($input); + } + + public function __destruct() + { + $this->close(); + } + + /** + * {@inheritdoc} + */ + public function getDescriptors() + { + if (!$this->haveReadSupport) { + $nullstream = fopen('/dev/null', 'c'); + + return array( + array('pipe', 'r'), + $nullstream, + $nullstream, + ); + } + + if ($this->ttyMode) { + return array( + array('file', '/dev/tty', 'r'), + array('file', '/dev/tty', 'w'), + array('file', '/dev/tty', 'w'), + ); + } + + if ($this->ptyMode && Process::isPtySupported()) { + return array( + array('pty'), + array('pty'), + array('pty'), + ); + } + + return array( + array('pipe', 'r'), + array('pipe', 'w'), // stdout + array('pipe', 'w'), // stderr + ); + } + + /** + * {@inheritdoc} + */ + public function getFiles() + { + return array(); + } + + /** + * {@inheritdoc} + */ + public function readAndWrite($blocking, $close = false) + { + $this->unblock(); + $w = $this->write(); + + $read = $e = array(); + $r = $this->pipes; + unset($r[0]); + + // let's have a look if something changed in streams + if (($r || $w) && false === $n = @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { + // if a system call has been interrupted, forget about it, let's try again + // otherwise, an error occurred, let's reset pipes + if (!$this->hasSystemCallBeenInterrupted()) { + $this->pipes = array(); + } + + return $read; + } + + foreach ($r as $pipe) { + // prior PHP 5.4 the array passed to stream_select is modified and + // lose key association, we have to find back the key + $read[$type = array_search($pipe, $this->pipes, true)] = ''; + + do { + $data = fread($pipe, self::CHUNK_SIZE); + $read[$type] .= $data; + } while (isset($data[0]) && ($close || isset($data[self::CHUNK_SIZE - 1]))); + + if (!isset($read[$type][0])) { + unset($read[$type]); + } + + if ($close && feof($pipe)) { + fclose($pipe); + unset($this->pipes[$type]); + } + } + + return $read; + } + + /** + * {@inheritdoc} + */ + public function haveReadSupport() + { + return $this->haveReadSupport; + } + + /** + * {@inheritdoc} + */ + public function areOpen() + { + return (bool) $this->pipes; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/WindowsPipes.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/WindowsPipes.php new file mode 100644 index 0000000000000000000000000000000000000000..a1e3115519f35fe1ffc4f136e207f15e2304987f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Pipes/WindowsPipes.php @@ -0,0 +1,200 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Pipes; + +use Symfony\Component\Process\Process; +use Symfony\Component\Process\Exception\RuntimeException; + +/** + * WindowsPipes implementation uses temporary files as handles. + * + * @see https://bugs.php.net/bug.php?id=51800 + * @see https://bugs.php.net/bug.php?id=65650 + * + * @author Romain Neutron + * + * @internal + */ +class WindowsPipes extends AbstractPipes +{ + /** @var array */ + private $files = array(); + /** @var array */ + private $fileHandles = array(); + /** @var array */ + private $readBytes = array( + Process::STDOUT => 0, + Process::STDERR => 0, + ); + /** @var bool */ + private $haveReadSupport; + + public function __construct($input, $haveReadSupport) + { + $this->haveReadSupport = (bool) $haveReadSupport; + + if ($this->haveReadSupport) { + // Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big. + // Workaround for this problem is to use temporary files instead of pipes on Windows platform. + // + // @see https://bugs.php.net/bug.php?id=51800 + $pipes = array( + Process::STDOUT => Process::OUT, + Process::STDERR => Process::ERR, + ); + $tmpCheck = false; + $tmpDir = sys_get_temp_dir(); + $lastError = 'unknown reason'; + set_error_handler(function ($type, $msg) use (&$lastError) { $lastError = $msg; }); + for ($i = 0;; ++$i) { + foreach ($pipes as $pipe => $name) { + $file = sprintf('%s\\sf_proc_%02X.%s', $tmpDir, $i, $name); + if (file_exists($file) && !unlink($file)) { + continue 2; + } + $h = fopen($file, 'xb'); + if (!$h) { + $error = $lastError; + if ($tmpCheck || $tmpCheck = unlink(tempnam(false, 'sf_check_'))) { + continue; + } + restore_error_handler(); + throw new RuntimeException(sprintf('A temporary file could not be opened to write the process output: %s', $error)); + } + if (!$h || !$this->fileHandles[$pipe] = fopen($file, 'rb')) { + continue 2; + } + if (isset($this->files[$pipe])) { + unlink($this->files[$pipe]); + } + $this->files[$pipe] = $file; + } + break; + } + restore_error_handler(); + } + + parent::__construct($input); + } + + public function __destruct() + { + $this->close(); + $this->removeFiles(); + } + + /** + * {@inheritdoc} + */ + public function getDescriptors() + { + if (!$this->haveReadSupport) { + $nullstream = fopen('NUL', 'c'); + + return array( + array('pipe', 'r'), + $nullstream, + $nullstream, + ); + } + + // We're not using pipe on Windows platform as it hangs (https://bugs.php.net/bug.php?id=51800) + // We're not using file handles as it can produce corrupted output https://bugs.php.net/bug.php?id=65650 + // So we redirect output within the commandline and pass the nul device to the process + return array( + array('pipe', 'r'), + array('file', 'NUL', 'w'), + array('file', 'NUL', 'w'), + ); + } + + /** + * {@inheritdoc} + */ + public function getFiles() + { + return $this->files; + } + + /** + * {@inheritdoc} + */ + public function readAndWrite($blocking, $close = false) + { + $this->unblock(); + $w = $this->write(); + $read = $r = $e = array(); + + if ($blocking) { + if ($w) { + @stream_select($r, $w, $e, 0, Process::TIMEOUT_PRECISION * 1E6); + } elseif ($this->fileHandles) { + usleep(Process::TIMEOUT_PRECISION * 1E6); + } + } + foreach ($this->fileHandles as $type => $fileHandle) { + $data = stream_get_contents($fileHandle, -1, $this->readBytes[$type]); + + if (isset($data[0])) { + $this->readBytes[$type] += strlen($data); + $read[$type] = $data; + } + if ($close) { + fclose($fileHandle); + unset($this->fileHandles[$type]); + } + } + + return $read; + } + + /** + * {@inheritdoc} + */ + public function haveReadSupport() + { + return $this->haveReadSupport; + } + + /** + * {@inheritdoc} + */ + public function areOpen() + { + return $this->pipes && $this->fileHandles; + } + + /** + * {@inheritdoc} + */ + public function close() + { + parent::close(); + foreach ($this->fileHandles as $handle) { + fclose($handle); + } + $this->fileHandles = array(); + } + + /** + * Removes temporary files. + */ + private function removeFiles() + { + foreach ($this->files as $filename) { + if (file_exists($filename)) { + @unlink($filename); + } + } + $this->files = array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php new file mode 100644 index 0000000000000000000000000000000000000000..504b4c3bc567db44d19c4ec2c1bee3328cedc58d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php @@ -0,0 +1,1590 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process; + +use Symfony\Component\Process\Exception\InvalidArgumentException; +use Symfony\Component\Process\Exception\LogicException; +use Symfony\Component\Process\Exception\ProcessFailedException; +use Symfony\Component\Process\Exception\ProcessTimedOutException; +use Symfony\Component\Process\Exception\RuntimeException; +use Symfony\Component\Process\Pipes\PipesInterface; +use Symfony\Component\Process\Pipes\UnixPipes; +use Symfony\Component\Process\Pipes\WindowsPipes; + +/** + * Process is a thin wrapper around proc_* functions to easily + * start independent PHP processes. + * + * @author Fabien Potencier + * @author Romain Neutron + */ +class Process implements \IteratorAggregate +{ + const ERR = 'err'; + const OUT = 'out'; + + const STATUS_READY = 'ready'; + const STATUS_STARTED = 'started'; + const STATUS_TERMINATED = 'terminated'; + + const STDIN = 0; + const STDOUT = 1; + const STDERR = 2; + + // Timeout Precision in seconds. + const TIMEOUT_PRECISION = 0.2; + + const ITER_NON_BLOCKING = 1; // By default, iterating over outputs is a blocking call, use this flag to make it non-blocking + const ITER_KEEP_OUTPUT = 2; // By default, outputs are cleared while iterating, use this flag to keep them in memory + const ITER_SKIP_OUT = 4; // Use this flag to skip STDOUT while iterating + const ITER_SKIP_ERR = 8; // Use this flag to skip STDERR while iterating + + private $callback; + private $hasCallback = false; + private $commandline; + private $cwd; + private $env; + private $input; + private $starttime; + private $lastOutputTime; + private $timeout; + private $idleTimeout; + private $options; + private $exitcode; + private $fallbackStatus = array(); + private $processInformation; + private $outputDisabled = false; + private $stdout; + private $stderr; + private $enhanceWindowsCompatibility = true; + private $enhanceSigchildCompatibility; + private $process; + private $status = self::STATUS_READY; + private $incrementalOutputOffset = 0; + private $incrementalErrorOutputOffset = 0; + private $tty; + private $pty; + private $inheritEnv = false; + + private $useFileHandles = false; + /** @var PipesInterface */ + private $processPipes; + + private $latestSignal; + + private static $sigchild; + + /** + * Exit codes translation table. + * + * User-defined errors must use exit codes in the 64-113 range. + * + * @var array + */ + public static $exitCodes = array( + 0 => 'OK', + 1 => 'General error', + 2 => 'Misuse of shell builtins', + + 126 => 'Invoked command cannot execute', + 127 => 'Command not found', + 128 => 'Invalid exit argument', + + // signals + 129 => 'Hangup', + 130 => 'Interrupt', + 131 => 'Quit and dump core', + 132 => 'Illegal instruction', + 133 => 'Trace/breakpoint trap', + 134 => 'Process aborted', + 135 => 'Bus error: "access to undefined portion of memory object"', + 136 => 'Floating point exception: "erroneous arithmetic operation"', + 137 => 'Kill (terminate immediately)', + 138 => 'User-defined 1', + 139 => 'Segmentation violation', + 140 => 'User-defined 2', + 141 => 'Write to pipe with no one reading', + 142 => 'Signal raised by alarm', + 143 => 'Termination (request to terminate)', + // 144 - not defined + 145 => 'Child process terminated, stopped (or continued*)', + 146 => 'Continue if stopped', + 147 => 'Stop executing temporarily', + 148 => 'Terminal stop signal', + 149 => 'Background process attempting to read from tty ("in")', + 150 => 'Background process attempting to write to tty ("out")', + 151 => 'Urgent data available on socket', + 152 => 'CPU time limit exceeded', + 153 => 'File size limit exceeded', + 154 => 'Signal raised by timer counting virtual time: "virtual timer expired"', + 155 => 'Profiling timer expired', + // 156 - not defined + 157 => 'Pollable event', + // 158 - not defined + 159 => 'Bad syscall', + ); + + /** + * Constructor. + * + * @param string $commandline The command line to run + * @param string|null $cwd The working directory or null to use the working dir of the current PHP process + * @param array|null $env The environment variables or null to use the same environment as the current PHP process + * @param mixed|null $input The input as stream resource, scalar or \Traversable, or null for no input + * @param int|float|null $timeout The timeout in seconds or null to disable + * @param array $options An array of options for proc_open + * + * @throws RuntimeException When proc_open is not installed + */ + public function __construct($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) + { + if (!function_exists('proc_open')) { + throw new RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.'); + } + + $this->commandline = $commandline; + $this->cwd = $cwd; + + // on Windows, if the cwd changed via chdir(), proc_open defaults to the dir where PHP was started + // on Gnu/Linux, PHP builds with --enable-maintainer-zts are also affected + // @see : https://bugs.php.net/bug.php?id=51800 + // @see : https://bugs.php.net/bug.php?id=50524 + if (null === $this->cwd && (defined('ZEND_THREAD_SAFE') || '\\' === DIRECTORY_SEPARATOR)) { + $this->cwd = getcwd(); + } + if (null !== $env) { + $this->setEnv($env); + } + + $this->setInput($input); + $this->setTimeout($timeout); + $this->useFileHandles = '\\' === DIRECTORY_SEPARATOR; + $this->pty = false; + $this->enhanceSigchildCompatibility = '\\' !== DIRECTORY_SEPARATOR && $this->isSigchildEnabled(); + $this->options = array_replace(array('suppress_errors' => true, 'binary_pipes' => true), $options); + } + + public function __destruct() + { + $this->stop(0); + } + + public function __clone() + { + $this->resetProcessData(); + } + + /** + * Runs the process. + * + * The callback receives the type of output (out or err) and + * some bytes from the output in real-time. It allows to have feedback + * from the independent process during execution. + * + * The STDOUT and STDERR are also available after the process is finished + * via the getOutput() and getErrorOutput() methods. + * + * @param callable|null $callback A PHP callback to run whenever there is some + * output available on STDOUT or STDERR + * + * @return int The exit status code + * + * @throws RuntimeException When process can't be launched + * @throws RuntimeException When process stopped after receiving signal + * @throws LogicException In case a callback is provided and output has been disabled + */ + public function run($callback = null) + { + $this->start($callback); + + return $this->wait(); + } + + /** + * Runs the process. + * + * This is identical to run() except that an exception is thrown if the process + * exits with a non-zero exit code. + * + * @param callable|null $callback + * + * @return self + * + * @throws RuntimeException if PHP was compiled with --enable-sigchild and the enhanced sigchild compatibility mode is not enabled + * @throws ProcessFailedException if the process didn't terminate successfully + */ + public function mustRun(callable $callback = null) + { + if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { + throw new RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.'); + } + + if (0 !== $this->run($callback)) { + throw new ProcessFailedException($this); + } + + return $this; + } + + /** + * Starts the process and returns after writing the input to STDIN. + * + * This method blocks until all STDIN data is sent to the process then it + * returns while the process runs in the background. + * + * The termination of the process can be awaited with wait(). + * + * The callback receives the type of output (out or err) and some bytes from + * the output in real-time while writing the standard input to the process. + * It allows to have feedback from the independent process during execution. + * + * @param callable|null $callback A PHP callback to run whenever there is some + * output available on STDOUT or STDERR + * + * @throws RuntimeException When process can't be launched + * @throws RuntimeException When process is already running + * @throws LogicException In case a callback is provided and output has been disabled + */ + public function start(callable $callback = null) + { + if ($this->isRunning()) { + throw new RuntimeException('Process is already running'); + } + + $this->resetProcessData(); + $this->starttime = $this->lastOutputTime = microtime(true); + $this->callback = $this->buildCallback($callback); + $this->hasCallback = null !== $callback; + $descriptors = $this->getDescriptors(); + $inheritEnv = $this->inheritEnv; + + $commandline = $this->commandline; + + $env = $this->env; + $envBackup = array(); + if (null !== $env && $inheritEnv) { + if ('\\' === DIRECTORY_SEPARATOR && !empty($this->options['bypass_shell']) && !$this->enhanceWindowsCompatibility) { + throw new LogicException('The "bypass_shell" option must be false to inherit environment variables while enhanced Windows compatibility is off'); + } + + foreach ($env as $k => $v) { + $envBackup[$k] = getenv($v); + putenv(false === $v || null === $v ? $k : "$k=$v"); + } + $env = null; + } + if ('\\' === DIRECTORY_SEPARATOR && $this->enhanceWindowsCompatibility) { + $commandline = 'cmd /V:ON /E:ON /D /C "('.$commandline.')'; + foreach ($this->processPipes->getFiles() as $offset => $filename) { + $commandline .= ' '.$offset.'>'.ProcessUtils::escapeArgument($filename); + } + $commandline .= '"'; + + if (!isset($this->options['bypass_shell'])) { + $this->options['bypass_shell'] = true; + } + } elseif (!$this->useFileHandles && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { + // last exit code is output on the fourth pipe and caught to work around --enable-sigchild + $descriptors[3] = array('pipe', 'w'); + + // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input + $commandline = '{ ('.$this->commandline.') <&3 3<&- 3>/dev/null & } 3<&0;'; + $commandline .= 'pid=$!; echo $pid >&3; wait $pid; code=$?; echo $code >&3; exit $code'; + + // Workaround for the bug, when PTS functionality is enabled. + // @see : https://bugs.php.net/69442 + $ptsWorkaround = fopen(__FILE__, 'r'); + } + + $this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $env, $this->options); + + foreach ($envBackup as $k => $v) { + putenv(false === $v ? $k : "$k=$v"); + } + + if (!is_resource($this->process)) { + throw new RuntimeException('Unable to launch a new process.'); + } + $this->status = self::STATUS_STARTED; + + if (isset($descriptors[3])) { + $this->fallbackStatus['pid'] = (int) fgets($this->processPipes->pipes[3]); + } + + if ($this->tty) { + return; + } + + $this->updateStatus(false); + $this->checkTimeout(); + } + + /** + * Restarts the process. + * + * Be warned that the process is cloned before being started. + * + * @param callable|null $callback A PHP callback to run whenever there is some + * output available on STDOUT or STDERR + * + * @return $this + * + * @throws RuntimeException When process can't be launched + * @throws RuntimeException When process is already running + * + * @see start() + */ + public function restart(callable $callback = null) + { + if ($this->isRunning()) { + throw new RuntimeException('Process is already running'); + } + + $process = clone $this; + $process->start($callback); + + return $process; + } + + /** + * Waits for the process to terminate. + * + * The callback receives the type of output (out or err) and some bytes + * from the output in real-time while writing the standard input to the process. + * It allows to have feedback from the independent process during execution. + * + * @param callable|null $callback A valid PHP callback + * + * @return int The exitcode of the process + * + * @throws RuntimeException When process timed out + * @throws RuntimeException When process stopped after receiving signal + * @throws LogicException When process is not yet started + */ + public function wait(callable $callback = null) + { + $this->requireProcessIsStarted(__FUNCTION__); + + $this->updateStatus(false); + + if (null !== $callback) { + if (!$this->processPipes->haveReadSupport()) { + $this->stop(0); + throw new \LogicException('Pass the callback to the Process::start method or enableOutput to use a callback with Process::wait'); + } + $this->callback = $this->buildCallback($callback); + } + + do { + $this->checkTimeout(); + $running = '\\' === DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen(); + $this->readPipes($running, '\\' !== DIRECTORY_SEPARATOR || !$running); + } while ($running); + + while ($this->isRunning()) { + usleep(1000); + } + + if ($this->processInformation['signaled'] && $this->processInformation['termsig'] !== $this->latestSignal) { + throw new RuntimeException(sprintf('The process has been signaled with signal "%s".', $this->processInformation['termsig'])); + } + + return $this->exitcode; + } + + /** + * Returns the Pid (process identifier), if applicable. + * + * @return int|null The process id if running, null otherwise + */ + public function getPid() + { + return $this->isRunning() ? $this->processInformation['pid'] : null; + } + + /** + * Sends a POSIX signal to the process. + * + * @param int $signal A valid POSIX signal (see http://www.php.net/manual/en/pcntl.constants.php) + * + * @return $this + * + * @throws LogicException In case the process is not running + * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed + * @throws RuntimeException In case of failure + */ + public function signal($signal) + { + $this->doSignal($signal, true); + + return $this; + } + + /** + * Disables fetching output and error output from the underlying process. + * + * @return $this + * + * @throws RuntimeException In case the process is already running + * @throws LogicException if an idle timeout is set + */ + public function disableOutput() + { + if ($this->isRunning()) { + throw new RuntimeException('Disabling output while the process is running is not possible.'); + } + if (null !== $this->idleTimeout) { + throw new LogicException('Output can not be disabled while an idle timeout is set.'); + } + + $this->outputDisabled = true; + + return $this; + } + + /** + * Enables fetching output and error output from the underlying process. + * + * @return $this + * + * @throws RuntimeException In case the process is already running + */ + public function enableOutput() + { + if ($this->isRunning()) { + throw new RuntimeException('Enabling output while the process is running is not possible.'); + } + + $this->outputDisabled = false; + + return $this; + } + + /** + * Returns true in case the output is disabled, false otherwise. + * + * @return bool + */ + public function isOutputDisabled() + { + return $this->outputDisabled; + } + + /** + * Returns the current output of the process (STDOUT). + * + * @return string The process output + * + * @throws LogicException in case the output has been disabled + * @throws LogicException In case the process is not started + */ + public function getOutput() + { + $this->readPipesForOutput(__FUNCTION__); + + if (false === $ret = stream_get_contents($this->stdout, -1, 0)) { + return ''; + } + + return $ret; + } + + /** + * Returns the output incrementally. + * + * In comparison with the getOutput method which always return the whole + * output, this one returns the new output since the last call. + * + * @return string The process output since the last call + * + * @throws LogicException in case the output has been disabled + * @throws LogicException In case the process is not started + */ + public function getIncrementalOutput() + { + $this->readPipesForOutput(__FUNCTION__); + + $latest = stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset); + $this->incrementalOutputOffset = ftell($this->stdout); + + if (false === $latest) { + return ''; + } + + return $latest; + } + + /** + * Returns an iterator to the output of the process, with the output type as keys (Process::OUT/ERR). + * + * @param int $flags A bit field of Process::ITER_* flags + * + * @throws LogicException in case the output has been disabled + * @throws LogicException In case the process is not started + * + * @return \Generator + */ + public function getIterator($flags = 0) + { + $this->readPipesForOutput(__FUNCTION__, false); + + $clearOutput = !(self::ITER_KEEP_OUTPUT & $flags); + $blocking = !(self::ITER_NON_BLOCKING & $flags); + $yieldOut = !(self::ITER_SKIP_OUT & $flags); + $yieldErr = !(self::ITER_SKIP_ERR & $flags); + + while (null !== $this->callback || ($yieldOut && !feof($this->stdout)) || ($yieldErr && !feof($this->stderr))) { + if ($yieldOut) { + $out = stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset); + + if (isset($out[0])) { + if ($clearOutput) { + $this->clearOutput(); + } else { + $this->incrementalOutputOffset = ftell($this->stdout); + } + + yield self::OUT => $out; + } + } + + if ($yieldErr) { + $err = stream_get_contents($this->stderr, -1, $this->incrementalErrorOutputOffset); + + if (isset($err[0])) { + if ($clearOutput) { + $this->clearErrorOutput(); + } else { + $this->incrementalErrorOutputOffset = ftell($this->stderr); + } + + yield self::ERR => $err; + } + } + + if (!$blocking && !isset($out[0]) && !isset($err[0])) { + yield self::OUT => ''; + } + + $this->checkTimeout(); + $this->readPipesForOutput(__FUNCTION__, $blocking); + } + } + + /** + * Clears the process output. + * + * @return $this + */ + public function clearOutput() + { + ftruncate($this->stdout, 0); + fseek($this->stdout, 0); + $this->incrementalOutputOffset = 0; + + return $this; + } + + /** + * Returns the current error output of the process (STDERR). + * + * @return string The process error output + * + * @throws LogicException in case the output has been disabled + * @throws LogicException In case the process is not started + */ + public function getErrorOutput() + { + $this->readPipesForOutput(__FUNCTION__); + + if (false === $ret = stream_get_contents($this->stderr, -1, 0)) { + return ''; + } + + return $ret; + } + + /** + * Returns the errorOutput incrementally. + * + * In comparison with the getErrorOutput method which always return the + * whole error output, this one returns the new error output since the last + * call. + * + * @return string The process error output since the last call + * + * @throws LogicException in case the output has been disabled + * @throws LogicException In case the process is not started + */ + public function getIncrementalErrorOutput() + { + $this->readPipesForOutput(__FUNCTION__); + + $latest = stream_get_contents($this->stderr, -1, $this->incrementalErrorOutputOffset); + $this->incrementalErrorOutputOffset = ftell($this->stderr); + + if (false === $latest) { + return ''; + } + + return $latest; + } + + /** + * Clears the process output. + * + * @return $this + */ + public function clearErrorOutput() + { + ftruncate($this->stderr, 0); + fseek($this->stderr, 0); + $this->incrementalErrorOutputOffset = 0; + + return $this; + } + + /** + * Returns the exit code returned by the process. + * + * @return null|int The exit status code, null if the Process is not terminated + * + * @throws RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled + */ + public function getExitCode() + { + if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { + throw new RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.'); + } + + $this->updateStatus(false); + + return $this->exitcode; + } + + /** + * Returns a string representation for the exit code returned by the process. + * + * This method relies on the Unix exit code status standardization + * and might not be relevant for other operating systems. + * + * @return null|string A string representation for the exit status code, null if the Process is not terminated + * + * @see http://tldp.org/LDP/abs/html/exitcodes.html + * @see http://en.wikipedia.org/wiki/Unix_signal + */ + public function getExitCodeText() + { + if (null === $exitcode = $this->getExitCode()) { + return; + } + + return isset(self::$exitCodes[$exitcode]) ? self::$exitCodes[$exitcode] : 'Unknown error'; + } + + /** + * Checks if the process ended successfully. + * + * @return bool true if the process ended successfully, false otherwise + */ + public function isSuccessful() + { + return 0 === $this->getExitCode(); + } + + /** + * Returns true if the child process has been terminated by an uncaught signal. + * + * It always returns false on Windows. + * + * @return bool + * + * @throws RuntimeException In case --enable-sigchild is activated + * @throws LogicException In case the process is not terminated + */ + public function hasBeenSignaled() + { + $this->requireProcessIsTerminated(__FUNCTION__); + + if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { + throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved.'); + } + + return $this->processInformation['signaled']; + } + + /** + * Returns the number of the signal that caused the child process to terminate its execution. + * + * It is only meaningful if hasBeenSignaled() returns true. + * + * @return int + * + * @throws RuntimeException In case --enable-sigchild is activated + * @throws LogicException In case the process is not terminated + */ + public function getTermSignal() + { + $this->requireProcessIsTerminated(__FUNCTION__); + + if ($this->isSigchildEnabled() && (!$this->enhanceSigchildCompatibility || -1 === $this->processInformation['termsig'])) { + throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved.'); + } + + return $this->processInformation['termsig']; + } + + /** + * Returns true if the child process has been stopped by a signal. + * + * It always returns false on Windows. + * + * @return bool + * + * @throws LogicException In case the process is not terminated + */ + public function hasBeenStopped() + { + $this->requireProcessIsTerminated(__FUNCTION__); + + return $this->processInformation['stopped']; + } + + /** + * Returns the number of the signal that caused the child process to stop its execution. + * + * It is only meaningful if hasBeenStopped() returns true. + * + * @return int + * + * @throws LogicException In case the process is not terminated + */ + public function getStopSignal() + { + $this->requireProcessIsTerminated(__FUNCTION__); + + return $this->processInformation['stopsig']; + } + + /** + * Checks if the process is currently running. + * + * @return bool true if the process is currently running, false otherwise + */ + public function isRunning() + { + if (self::STATUS_STARTED !== $this->status) { + return false; + } + + $this->updateStatus(false); + + return $this->processInformation['running']; + } + + /** + * Checks if the process has been started with no regard to the current state. + * + * @return bool true if status is ready, false otherwise + */ + public function isStarted() + { + return $this->status != self::STATUS_READY; + } + + /** + * Checks if the process is terminated. + * + * @return bool true if process is terminated, false otherwise + */ + public function isTerminated() + { + $this->updateStatus(false); + + return $this->status == self::STATUS_TERMINATED; + } + + /** + * Gets the process status. + * + * The status is one of: ready, started, terminated. + * + * @return string The current process status + */ + public function getStatus() + { + $this->updateStatus(false); + + return $this->status; + } + + /** + * Stops the process. + * + * @param int|float $timeout The timeout in seconds + * @param int $signal A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL (9) + * + * @return int The exit-code of the process + */ + public function stop($timeout = 10, $signal = null) + { + $timeoutMicro = microtime(true) + $timeout; + if ($this->isRunning()) { + // given `SIGTERM` may not be defined and that `proc_terminate` uses the constant value and not the constant itself, we use the same here + $this->doSignal(15, false); + do { + usleep(1000); + } while ($this->isRunning() && microtime(true) < $timeoutMicro); + + if ($this->isRunning()) { + // Avoid exception here: process is supposed to be running, but it might have stopped just + // after this line. In any case, let's silently discard the error, we cannot do anything. + $this->doSignal($signal ?: 9, false); + } + } + + if ($this->isRunning()) { + if (isset($this->fallbackStatus['pid'])) { + unset($this->fallbackStatus['pid']); + + return $this->stop(0, $signal); + } + $this->close(); + } + + return $this->exitcode; + } + + /** + * Adds a line to the STDOUT stream. + * + * @internal + * + * @param string $line The line to append + */ + public function addOutput($line) + { + $this->lastOutputTime = microtime(true); + + fseek($this->stdout, 0, SEEK_END); + fwrite($this->stdout, $line); + fseek($this->stdout, $this->incrementalOutputOffset); + } + + /** + * Adds a line to the STDERR stream. + * + * @internal + * + * @param string $line The line to append + */ + public function addErrorOutput($line) + { + $this->lastOutputTime = microtime(true); + + fseek($this->stderr, 0, SEEK_END); + fwrite($this->stderr, $line); + fseek($this->stderr, $this->incrementalErrorOutputOffset); + } + + /** + * Gets the command line to be executed. + * + * @return string The command to execute + */ + public function getCommandLine() + { + return $this->commandline; + } + + /** + * Sets the command line to be executed. + * + * @param string $commandline The command to execute + * + * @return self The current Process instance + */ + public function setCommandLine($commandline) + { + $this->commandline = $commandline; + + return $this; + } + + /** + * Gets the process timeout (max. runtime). + * + * @return float|null The timeout in seconds or null if it's disabled + */ + public function getTimeout() + { + return $this->timeout; + } + + /** + * Gets the process idle timeout (max. time since last output). + * + * @return float|null The timeout in seconds or null if it's disabled + */ + public function getIdleTimeout() + { + return $this->idleTimeout; + } + + /** + * Sets the process timeout (max. runtime). + * + * To disable the timeout, set this value to null. + * + * @param int|float|null $timeout The timeout in seconds + * + * @return self The current Process instance + * + * @throws InvalidArgumentException if the timeout is negative + */ + public function setTimeout($timeout) + { + $this->timeout = $this->validateTimeout($timeout); + + return $this; + } + + /** + * Sets the process idle timeout (max. time since last output). + * + * To disable the timeout, set this value to null. + * + * @param int|float|null $timeout The timeout in seconds + * + * @return self The current Process instance + * + * @throws LogicException if the output is disabled + * @throws InvalidArgumentException if the timeout is negative + */ + public function setIdleTimeout($timeout) + { + if (null !== $timeout && $this->outputDisabled) { + throw new LogicException('Idle timeout can not be set while the output is disabled.'); + } + + $this->idleTimeout = $this->validateTimeout($timeout); + + return $this; + } + + /** + * Enables or disables the TTY mode. + * + * @param bool $tty True to enabled and false to disable + * + * @return self The current Process instance + * + * @throws RuntimeException In case the TTY mode is not supported + */ + public function setTty($tty) + { + if ('\\' === DIRECTORY_SEPARATOR && $tty) { + throw new RuntimeException('TTY mode is not supported on Windows platform.'); + } + if ($tty) { + static $isTtySupported; + + if (null === $isTtySupported) { + $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', array(array('file', '/dev/tty', 'r'), array('file', '/dev/tty', 'w'), array('file', '/dev/tty', 'w')), $pipes); + } + + if (!$isTtySupported) { + throw new RuntimeException('TTY mode requires /dev/tty to be read/writable.'); + } + } + + $this->tty = (bool) $tty; + + return $this; + } + + /** + * Checks if the TTY mode is enabled. + * + * @return bool true if the TTY mode is enabled, false otherwise + */ + public function isTty() + { + return $this->tty; + } + + /** + * Sets PTY mode. + * + * @param bool $bool + * + * @return self + */ + public function setPty($bool) + { + $this->pty = (bool) $bool; + + return $this; + } + + /** + * Returns PTY state. + * + * @return bool + */ + public function isPty() + { + return $this->pty; + } + + /** + * Gets the working directory. + * + * @return string|null The current working directory or null on failure + */ + public function getWorkingDirectory() + { + if (null === $this->cwd) { + // getcwd() will return false if any one of the parent directories does not have + // the readable or search mode set, even if the current directory does + return getcwd() ?: null; + } + + return $this->cwd; + } + + /** + * Sets the current working directory. + * + * @param string $cwd The new working directory + * + * @return self The current Process instance + */ + public function setWorkingDirectory($cwd) + { + $this->cwd = $cwd; + + return $this; + } + + /** + * Gets the environment variables. + * + * @return array The current environment variables + */ + public function getEnv() + { + return $this->env; + } + + /** + * Sets the environment variables. + * + * An environment variable value should be a string. + * If it is an array, the variable is ignored. + * + * That happens in PHP when 'argv' is registered into + * the $_ENV array for instance. + * + * @param array $env The new environment variables + * + * @return self The current Process instance + */ + public function setEnv(array $env) + { + // Process can not handle env values that are arrays + $env = array_filter($env, function ($value) { + return !is_array($value); + }); + + $this->env = $env; + + return $this; + } + + /** + * Gets the Process input. + * + * @return resource|string|\Iterator|null The Process input + */ + public function getInput() + { + return $this->input; + } + + /** + * Sets the input. + * + * This content will be passed to the underlying process standard input. + * + * @param resource|scalar|\Traversable|null $input The content + * + * @return self The current Process instance + * + * @throws LogicException In case the process is running + */ + public function setInput($input) + { + if ($this->isRunning()) { + throw new LogicException('Input can not be set while the process is running.'); + } + + $this->input = ProcessUtils::validateInput(__METHOD__, $input); + + return $this; + } + + /** + * Gets the options for proc_open. + * + * @return array The current options + */ + public function getOptions() + { + return $this->options; + } + + /** + * Sets the options for proc_open. + * + * @param array $options The new options + * + * @return self The current Process instance + */ + public function setOptions(array $options) + { + $this->options = $options; + + return $this; + } + + /** + * Gets whether or not Windows compatibility is enabled. + * + * This is true by default. + * + * @return bool + */ + public function getEnhanceWindowsCompatibility() + { + return $this->enhanceWindowsCompatibility; + } + + /** + * Sets whether or not Windows compatibility is enabled. + * + * @param bool $enhance + * + * @return self The current Process instance + */ + public function setEnhanceWindowsCompatibility($enhance) + { + $this->enhanceWindowsCompatibility = (bool) $enhance; + + return $this; + } + + /** + * Returns whether sigchild compatibility mode is activated or not. + * + * @return bool + */ + public function getEnhanceSigchildCompatibility() + { + return $this->enhanceSigchildCompatibility; + } + + /** + * Activates sigchild compatibility mode. + * + * Sigchild compatibility mode is required to get the exit code and + * determine the success of a process when PHP has been compiled with + * the --enable-sigchild option + * + * @param bool $enhance + * + * @return self The current Process instance + */ + public function setEnhanceSigchildCompatibility($enhance) + { + $this->enhanceSigchildCompatibility = (bool) $enhance; + + return $this; + } + + /** + * Sets whether environment variables will be inherited or not. + * + * @param bool $inheritEnv + * + * @return self The current Process instance + */ + public function inheritEnvironmentVariables($inheritEnv = true) + { + $this->inheritEnv = (bool) $inheritEnv; + + return $this; + } + + /** + * Returns whether environment variables will be inherited or not. + * + * @return bool + */ + public function areEnvironmentVariablesInherited() + { + return $this->inheritEnv; + } + + /** + * Performs a check between the timeout definition and the time the process started. + * + * In case you run a background process (with the start method), you should + * trigger this method regularly to ensure the process timeout + * + * @throws ProcessTimedOutException In case the timeout was reached + */ + public function checkTimeout() + { + if ($this->status !== self::STATUS_STARTED) { + return; + } + + if (null !== $this->timeout && $this->timeout < microtime(true) - $this->starttime) { + $this->stop(0); + + throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_GENERAL); + } + + if (null !== $this->idleTimeout && $this->idleTimeout < microtime(true) - $this->lastOutputTime) { + $this->stop(0); + + throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_IDLE); + } + } + + /** + * Returns whether PTY is supported on the current operating system. + * + * @return bool + */ + public static function isPtySupported() + { + static $result; + + if (null !== $result) { + return $result; + } + + if ('\\' === DIRECTORY_SEPARATOR) { + return $result = false; + } + + return $result = (bool) @proc_open('echo 1 >/dev/null', array(array('pty'), array('pty'), array('pty')), $pipes); + } + + /** + * Creates the descriptors needed by the proc_open. + * + * @return array + */ + private function getDescriptors() + { + if ($this->input instanceof \Iterator) { + $this->input->rewind(); + } + if ('\\' === DIRECTORY_SEPARATOR) { + $this->processPipes = new WindowsPipes($this->input, !$this->outputDisabled || $this->hasCallback); + } else { + $this->processPipes = new UnixPipes($this->isTty(), $this->isPty(), $this->input, !$this->outputDisabled || $this->hasCallback); + } + + return $this->processPipes->getDescriptors(); + } + + /** + * Builds up the callback used by wait(). + * + * The callbacks adds all occurred output to the specific buffer and calls + * the user callback (if present) with the received output. + * + * @param callable|null $callback The user defined PHP callback + * + * @return \Closure A PHP closure + */ + protected function buildCallback(callable $callback = null) + { + if ($this->outputDisabled) { + return function ($type, $data) use ($callback) { + if (null !== $callback) { + call_user_func($callback, $type, $data); + } + }; + } + + $out = self::OUT; + + return function ($type, $data) use ($callback, $out) { + if ($out == $type) { + $this->addOutput($data); + } else { + $this->addErrorOutput($data); + } + + if (null !== $callback) { + call_user_func($callback, $type, $data); + } + }; + } + + /** + * Updates the status of the process, reads pipes. + * + * @param bool $blocking Whether to use a blocking read call + */ + protected function updateStatus($blocking) + { + if (self::STATUS_STARTED !== $this->status) { + return; + } + + $this->processInformation = proc_get_status($this->process); + $running = $this->processInformation['running']; + + $this->readPipes($running && $blocking, '\\' !== DIRECTORY_SEPARATOR || !$running); + + if ($this->fallbackStatus && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { + $this->processInformation = $this->fallbackStatus + $this->processInformation; + } + + if (!$running) { + $this->close(); + } + } + + /** + * Returns whether PHP has been compiled with the '--enable-sigchild' option or not. + * + * @return bool + */ + protected function isSigchildEnabled() + { + if (null !== self::$sigchild) { + return self::$sigchild; + } + + if (!function_exists('phpinfo') || defined('HHVM_VERSION')) { + return self::$sigchild = false; + } + + ob_start(); + phpinfo(INFO_GENERAL); + + return self::$sigchild = false !== strpos(ob_get_clean(), '--enable-sigchild'); + } + + /** + * Reads pipes for the freshest output. + * + * @param string $caller The name of the method that needs fresh outputs + * @param bool $blocking Whether to use blocking calls or not + * + * @throws LogicException in case output has been disabled or process is not started + */ + private function readPipesForOutput($caller, $blocking = false) + { + if ($this->outputDisabled) { + throw new LogicException('Output has been disabled.'); + } + + $this->requireProcessIsStarted($caller); + + $this->updateStatus($blocking); + } + + /** + * Validates and returns the filtered timeout. + * + * @param int|float|null $timeout + * + * @return float|null + * + * @throws InvalidArgumentException if the given timeout is a negative number + */ + private function validateTimeout($timeout) + { + $timeout = (float) $timeout; + + if (0.0 === $timeout) { + $timeout = null; + } elseif ($timeout < 0) { + throw new InvalidArgumentException('The timeout value must be a valid positive integer or float number.'); + } + + return $timeout; + } + + /** + * Reads pipes, executes callback. + * + * @param bool $blocking Whether to use blocking calls or not + * @param bool $close Whether to close file handles or not + */ + private function readPipes($blocking, $close) + { + $result = $this->processPipes->readAndWrite($blocking, $close); + + $callback = $this->callback; + foreach ($result as $type => $data) { + if (3 !== $type) { + $callback($type === self::STDOUT ? self::OUT : self::ERR, $data); + } elseif (!isset($this->fallbackStatus['signaled'])) { + $this->fallbackStatus['exitcode'] = (int) $data; + } + } + } + + /** + * Closes process resource, closes file handles, sets the exitcode. + * + * @return int The exitcode + */ + private function close() + { + $this->processPipes->close(); + if (is_resource($this->process)) { + proc_close($this->process); + } + $this->exitcode = $this->processInformation['exitcode']; + $this->status = self::STATUS_TERMINATED; + + if (-1 === $this->exitcode) { + if ($this->processInformation['signaled'] && 0 < $this->processInformation['termsig']) { + // if process has been signaled, no exitcode but a valid termsig, apply Unix convention + $this->exitcode = 128 + $this->processInformation['termsig']; + } elseif ($this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { + $this->processInformation['signaled'] = true; + $this->processInformation['termsig'] = -1; + } + } + + // Free memory from self-reference callback created by buildCallback + // Doing so in other contexts like __destruct or by garbage collector is ineffective + // Now pipes are closed, so the callback is no longer necessary + $this->callback = null; + + return $this->exitcode; + } + + /** + * Resets data related to the latest run of the process. + */ + private function resetProcessData() + { + $this->starttime = null; + $this->callback = null; + $this->exitcode = null; + $this->fallbackStatus = array(); + $this->processInformation = null; + $this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), 'wb+'); + $this->stderr = fopen('php://temp/maxmemory:'.(1024 * 1024), 'wb+'); + $this->process = null; + $this->latestSignal = null; + $this->status = self::STATUS_READY; + $this->incrementalOutputOffset = 0; + $this->incrementalErrorOutputOffset = 0; + } + + /** + * Sends a POSIX signal to the process. + * + * @param int $signal A valid POSIX signal (see http://www.php.net/manual/en/pcntl.constants.php) + * @param bool $throwException Whether to throw exception in case signal failed + * + * @return bool True if the signal was sent successfully, false otherwise + * + * @throws LogicException In case the process is not running + * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed + * @throws RuntimeException In case of failure + */ + private function doSignal($signal, $throwException) + { + if (null === $pid = $this->getPid()) { + if ($throwException) { + throw new LogicException('Can not send signal on a non running process.'); + } + + return false; + } + + if ('\\' === DIRECTORY_SEPARATOR) { + exec(sprintf('taskkill /F /T /PID %d 2>&1', $pid), $output, $exitCode); + if ($exitCode && $this->isRunning()) { + if ($throwException) { + throw new RuntimeException(sprintf('Unable to kill the process (%s).', implode(' ', $output))); + } + + return false; + } + } else { + if (!$this->enhanceSigchildCompatibility || !$this->isSigchildEnabled()) { + $ok = @proc_terminate($this->process, $signal); + } elseif (function_exists('posix_kill')) { + $ok = @posix_kill($pid, $signal); + } elseif ($ok = proc_open(sprintf('kill -%d %d', $signal, $pid), array(2 => array('pipe', 'w')), $pipes)) { + $ok = false === fgets($pipes[2]); + } + if (!$ok) { + if ($throwException) { + throw new RuntimeException(sprintf('Error while sending signal `%s`.', $signal)); + } + + return false; + } + } + + $this->latestSignal = (int) $signal; + $this->fallbackStatus['signaled'] = true; + $this->fallbackStatus['exitcode'] = -1; + $this->fallbackStatus['termsig'] = $this->latestSignal; + + return true; + } + + /** + * Ensures the process is running or terminated, throws a LogicException if the process has a not started. + * + * @param string $functionName The function name that was called + * + * @throws LogicException If the process has not run. + */ + private function requireProcessIsStarted($functionName) + { + if (!$this->isStarted()) { + throw new LogicException(sprintf('Process must be started before calling %s.', $functionName)); + } + } + + /** + * Ensures the process is terminated, throws a LogicException if the process has a status different than `terminated`. + * + * @param string $functionName The function name that was called + * + * @throws LogicException If the process is not yet terminated. + */ + private function requireProcessIsTerminated($functionName) + { + if (!$this->isTerminated()) { + throw new LogicException(sprintf('Process must be terminated before calling %s.', $functionName)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/ProcessBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Process/ProcessBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..cc91371f4cba700752aa692b32889247ecc018ef --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/ProcessBuilder.php @@ -0,0 +1,281 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process; + +use Symfony\Component\Process\Exception\InvalidArgumentException; +use Symfony\Component\Process\Exception\LogicException; + +/** + * Process builder. + * + * @author Kris Wallsmith + */ +class ProcessBuilder +{ + private $arguments; + private $cwd; + private $env = array(); + private $input; + private $timeout = 60; + private $options = array(); + private $inheritEnv = true; + private $prefix = array(); + private $outputDisabled = false; + + /** + * Constructor. + * + * @param string[] $arguments An array of arguments + */ + public function __construct(array $arguments = array()) + { + $this->arguments = $arguments; + } + + /** + * Creates a process builder instance. + * + * @param string[] $arguments An array of arguments + * + * @return static + */ + public static function create(array $arguments = array()) + { + return new static($arguments); + } + + /** + * Adds an unescaped argument to the command string. + * + * @param string $argument A command argument + * + * @return $this + */ + public function add($argument) + { + $this->arguments[] = $argument; + + return $this; + } + + /** + * Adds a prefix to the command string. + * + * The prefix is preserved when resetting arguments. + * + * @param string|array $prefix A command prefix or an array of command prefixes + * + * @return $this + */ + public function setPrefix($prefix) + { + $this->prefix = is_array($prefix) ? $prefix : array($prefix); + + return $this; + } + + /** + * Sets the arguments of the process. + * + * Arguments must not be escaped. + * Previous arguments are removed. + * + * @param string[] $arguments + * + * @return $this + */ + public function setArguments(array $arguments) + { + $this->arguments = $arguments; + + return $this; + } + + /** + * Sets the working directory. + * + * @param null|string $cwd The working directory + * + * @return $this + */ + public function setWorkingDirectory($cwd) + { + $this->cwd = $cwd; + + return $this; + } + + /** + * Sets whether environment variables will be inherited or not. + * + * @param bool $inheritEnv + * + * @return $this + */ + public function inheritEnvironmentVariables($inheritEnv = true) + { + $this->inheritEnv = $inheritEnv; + + return $this; + } + + /** + * Sets an environment variable. + * + * Setting a variable overrides its previous value. Use `null` to unset a + * defined environment variable. + * + * @param string $name The variable name + * @param null|string $value The variable value + * + * @return $this + */ + public function setEnv($name, $value) + { + $this->env[$name] = $value; + + return $this; + } + + /** + * Adds a set of environment variables. + * + * Already existing environment variables with the same name will be + * overridden by the new values passed to this method. Pass `null` to unset + * a variable. + * + * @param array $variables The variables + * + * @return $this + */ + public function addEnvironmentVariables(array $variables) + { + $this->env = array_replace($this->env, $variables); + + return $this; + } + + /** + * Sets the input of the process. + * + * @param resource|scalar|\Traversable|null $input The input content + * + * @return $this + * + * @throws InvalidArgumentException In case the argument is invalid + */ + public function setInput($input) + { + $this->input = ProcessUtils::validateInput(__METHOD__, $input); + + return $this; + } + + /** + * Sets the process timeout. + * + * To disable the timeout, set this value to null. + * + * @param float|null $timeout + * + * @return $this + * + * @throws InvalidArgumentException + */ + public function setTimeout($timeout) + { + if (null === $timeout) { + $this->timeout = null; + + return $this; + } + + $timeout = (float) $timeout; + + if ($timeout < 0) { + throw new InvalidArgumentException('The timeout value must be a valid positive integer or float number.'); + } + + $this->timeout = $timeout; + + return $this; + } + + /** + * Adds a proc_open option. + * + * @param string $name The option name + * @param string $value The option value + * + * @return $this + */ + public function setOption($name, $value) + { + $this->options[$name] = $value; + + return $this; + } + + /** + * Disables fetching output and error output from the underlying process. + * + * @return $this + */ + public function disableOutput() + { + $this->outputDisabled = true; + + return $this; + } + + /** + * Enables fetching output and error output from the underlying process. + * + * @return $this + */ + public function enableOutput() + { + $this->outputDisabled = false; + + return $this; + } + + /** + * Creates a Process instance and returns it. + * + * @return Process + * + * @throws LogicException In case no arguments have been provided + */ + public function getProcess() + { + if (0 === count($this->prefix) && 0 === count($this->arguments)) { + throw new LogicException('You must add() command arguments before calling getProcess().'); + } + + $options = $this->options; + + $arguments = array_merge($this->prefix, $this->arguments); + $script = implode(' ', array_map(array(__NAMESPACE__.'\\ProcessUtils', 'escapeArgument'), $arguments)); + + $process = new Process($script, $this->cwd, $this->env, $this->input, $this->timeout, $options); + + if ($this->inheritEnv) { + $process->inheritEnvironmentVariables(); + } + if ($this->outputDisabled) { + $process->disableOutput(); + } + + return $process; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/ProcessUtils.php b/vendor/symfony/symfony/src/Symfony/Component/Process/ProcessUtils.php new file mode 100644 index 0000000000000000000000000000000000000000..cbc95708ed4a6c5d1cee56fa189704c29b0f96a9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/ProcessUtils.php @@ -0,0 +1,119 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process; + +use Symfony\Component\Process\Exception\InvalidArgumentException; + +/** + * ProcessUtils is a bunch of utility methods. + * + * This class contains static methods only and is not meant to be instantiated. + * + * @author Martin Hasoň + */ +class ProcessUtils +{ + /** + * This class should not be instantiated. + */ + private function __construct() + { + } + + /** + * Escapes a string to be used as a shell argument. + * + * @param string $argument The argument that will be escaped + * + * @return string The escaped argument + */ + public static function escapeArgument($argument) + { + //Fix for PHP bug #43784 escapeshellarg removes % from given string + //Fix for PHP bug #49446 escapeshellarg doesn't work on Windows + //@see https://bugs.php.net/bug.php?id=43784 + //@see https://bugs.php.net/bug.php?id=49446 + if ('\\' === DIRECTORY_SEPARATOR) { + if ('' === $argument) { + return escapeshellarg($argument); + } + + $escapedArgument = ''; + $quote = false; + foreach (preg_split('/(")/', $argument, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE) as $part) { + if ('"' === $part) { + $escapedArgument .= '\\"'; + } elseif (self::isSurroundedBy($part, '%')) { + // Avoid environment variable expansion + $escapedArgument .= '^%"'.substr($part, 1, -1).'"^%'; + } else { + // escape trailing backslash + if ('\\' === substr($part, -1)) { + $part .= '\\'; + } + $quote = true; + $escapedArgument .= $part; + } + } + if ($quote) { + $escapedArgument = '"'.$escapedArgument.'"'; + } + + return $escapedArgument; + } + + return "'".str_replace("'", "'\\''", $argument)."'"; + } + + /** + * Validates and normalizes a Process input. + * + * @param string $caller The name of method call that validates the input + * @param mixed $input The input to validate + * + * @return mixed The validated input + * + * @throws InvalidArgumentException In case the input is not valid + */ + public static function validateInput($caller, $input) + { + if (null !== $input) { + if (is_resource($input)) { + return $input; + } + if (is_string($input)) { + return $input; + } + if (is_scalar($input)) { + return (string) $input; + } + if ($input instanceof Process) { + return $input->getIterator($input::ITER_SKIP_ERR); + } + if ($input instanceof \Iterator) { + return $input; + } + if ($input instanceof \Traversable) { + return new \IteratorIterator($input); + } + + throw new InvalidArgumentException(sprintf('%s only accepts strings, Traversable objects or stream resources.', $caller)); + } + + return $input; + } + + private static function isSurroundedBy($arg, $char) + { + return 2 < strlen($arg) && $char === $arg[0] && $char === $arg[strlen($arg) - 1]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/README.md b/vendor/symfony/symfony/src/Symfony/Component/Process/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b7ca5b4254942c813ac60733057a47b1be072ec5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/README.md @@ -0,0 +1,13 @@ +Process Component +================= + +The Process component executes commands in sub-processes. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/process.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/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bc692f6a75df6a77a2ef1cf3dec8f4e9f3bde902 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Process\ExecutableFinder; + +/** + * @author Chris Smith + */ +class ExecutableFinderTest extends TestCase +{ + private $path; + + protected function tearDown() + { + if ($this->path) { + // Restore path if it was changed. + putenv('PATH='.$this->path); + } + } + + private function setPath($path) + { + $this->path = getenv('PATH'); + putenv('PATH='.$path); + } + + public function testFind() + { + if (ini_get('open_basedir')) { + $this->markTestSkipped('Cannot test when open_basedir is set'); + } + + $this->setPath(dirname(PHP_BINARY)); + + $finder = new ExecutableFinder(); + $result = $finder->find($this->getPhpBinaryName()); + + $this->assertSamePath(PHP_BINARY, $result); + } + + public function testFindWithDefault() + { + if (ini_get('open_basedir')) { + $this->markTestSkipped('Cannot test when open_basedir is set'); + } + + $expected = 'defaultValue'; + + $this->setPath(''); + + $finder = new ExecutableFinder(); + $result = $finder->find('foo', $expected); + + $this->assertEquals($expected, $result); + } + + public function testFindWithExtraDirs() + { + if (ini_get('open_basedir')) { + $this->markTestSkipped('Cannot test when open_basedir is set'); + } + + $this->setPath(''); + + $extraDirs = array(dirname(PHP_BINARY)); + + $finder = new ExecutableFinder(); + $result = $finder->find($this->getPhpBinaryName(), null, $extraDirs); + + $this->assertSamePath(PHP_BINARY, $result); + } + + public function testFindWithOpenBaseDir() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('Cannot run test on windows'); + } + + if (ini_get('open_basedir')) { + $this->markTestSkipped('Cannot test when open_basedir is set'); + } + + $this->iniSet('open_basedir', dirname(PHP_BINARY).(!defined('HHVM_VERSION') || HHVM_VERSION_ID >= 30800 ? PATH_SEPARATOR.'/' : '')); + + $finder = new ExecutableFinder(); + $result = $finder->find($this->getPhpBinaryName()); + + $this->assertSamePath(PHP_BINARY, $result); + } + + public function testFindProcessInOpenBasedir() + { + if (ini_get('open_basedir')) { + $this->markTestSkipped('Cannot test when open_basedir is set'); + } + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('Cannot run test on windows'); + } + + $this->setPath(''); + $this->iniSet('open_basedir', PHP_BINARY.(!defined('HHVM_VERSION') || HHVM_VERSION_ID >= 30800 ? PATH_SEPARATOR.'/' : '')); + + $finder = new ExecutableFinder(); + $result = $finder->find($this->getPhpBinaryName(), false); + + $this->assertSamePath(PHP_BINARY, $result); + } + + private function assertSamePath($expected, $tested) + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->assertEquals(strtolower($expected), strtolower($tested)); + } else { + $this->assertEquals($expected, $tested); + } + } + + private function getPhpBinaryName() + { + return basename(PHP_BINARY, '\\' === DIRECTORY_SEPARATOR ? '.exe' : ''); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/NonStopableProcess.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/NonStopableProcess.php new file mode 100644 index 0000000000000000000000000000000000000000..5643259657d50288a4e9bd811e93ea69eebc4666 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/NonStopableProcess.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Runs a PHP script that can be stopped only with a SIGKILL (9) signal for 3 seconds. + * + * @args duration Run this script with a custom duration + * + * @example `php NonStopableProcess.php 42` will run the script for 42 seconds + */ +function handleSignal($signal) +{ + switch ($signal) { + case SIGTERM: + $name = 'SIGTERM'; + break; + case SIGINT: + $name = 'SIGINT'; + break; + default: + $name = $signal.' (unknown)'; + break; + } + + echo "signal $name\n"; +} + +pcntl_signal(SIGTERM, 'handleSignal'); +pcntl_signal(SIGINT, 'handleSignal'); + +echo 'received '; + +$duration = isset($argv[1]) ? (int) $argv[1] : 3; +$start = microtime(true); + +while ($duration > (microtime(true) - $start)) { + usleep(10000); + pcntl_signal_dispatch(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b08ad5d3b734fc11c73ba8ddfd7d3792808f09ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Process\PhpExecutableFinder; + +/** + * @author Robert Schönthal + */ +class PhpExecutableFinderTest extends TestCase +{ + /** + * tests find() with the constant PHP_BINARY. + */ + public function testFind() + { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('Should not be executed in HHVM context.'); + } + + $f = new PhpExecutableFinder(); + + $current = PHP_BINARY; + $args = 'phpdbg' === PHP_SAPI ? ' -qrr' : ''; + + $this->assertEquals($current.$args, $f->find(), '::find() returns the executable PHP'); + $this->assertEquals($current, $f->find(false), '::find() returns the executable PHP'); + } + + /** + * tests find() with the env var / constant PHP_BINARY with HHVM. + */ + public function testFindWithHHVM() + { + if (!defined('HHVM_VERSION')) { + $this->markTestSkipped('Should be executed in HHVM context.'); + } + + $f = new PhpExecutableFinder(); + + $current = getenv('PHP_BINARY') ?: PHP_BINARY; + + $this->assertEquals($current.' --php', $f->find(), '::find() returns the executable PHP'); + $this->assertEquals($current, $f->find(false), '::find() returns the executable PHP'); + } + + /** + * tests find() with the env var PHP_PATH. + */ + public function testFindArguments() + { + $f = new PhpExecutableFinder(); + + if (defined('HHVM_VERSION')) { + $this->assertEquals($f->findArguments(), array('--php'), '::findArguments() returns HHVM arguments'); + } elseif ('phpdbg' === PHP_SAPI) { + $this->assertEquals($f->findArguments(), array('-qrr'), '::findArguments() returns phpdbg arguments'); + } else { + $this->assertEquals($f->findArguments(), array(), '::findArguments() returns no arguments'); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PhpProcessTest.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PhpProcessTest.php new file mode 100644 index 0000000000000000000000000000000000000000..79ab02717a58b5c2f6febf2ae5c3bf9b1fb460fa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PhpProcessTest.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Process\PhpExecutableFinder; +use Symfony\Component\Process\PhpProcess; + +class PhpProcessTest extends TestCase +{ + public function testNonBlockingWorks() + { + $expected = 'hello world!'; + $process = new PhpProcess(<<start(); + $process->wait(); + $this->assertEquals($expected, $process->getOutput()); + } + + public function testCommandLine() + { + $process = new PhpProcess(<<<'PHP' +getCommandLine(); + + $f = new PhpExecutableFinder(); + $this->assertContains($f->find(), $commandLine, '::getCommandLine() returns the command line of PHP before start'); + + $process->start(); + $this->assertContains($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after start'); + + $process->wait(); + $this->assertContains($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after wait'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php new file mode 100644 index 0000000000000000000000000000000000000000..bbd7ddfeb284e07c07ba195a7969e05268b0c06b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +define('ERR_SELECT_FAILED', 1); +define('ERR_TIMEOUT', 2); +define('ERR_READ_FAILED', 3); +define('ERR_WRITE_FAILED', 4); + +$read = array(STDIN); +$write = array(STDOUT, STDERR); + +stream_set_blocking(STDIN, 0); +stream_set_blocking(STDOUT, 0); +stream_set_blocking(STDERR, 0); + +$out = $err = ''; +while ($read || $write) { + $r = $read; + $w = $write; + $e = null; + $n = stream_select($r, $w, $e, 5); + + if (false === $n) { + die(ERR_SELECT_FAILED); + } elseif ($n < 1) { + die(ERR_TIMEOUT); + } + + if (in_array(STDOUT, $w) && strlen($out) > 0) { + $written = fwrite(STDOUT, (binary) $out, 32768); + if (false === $written) { + die(ERR_WRITE_FAILED); + } + $out = (binary) substr($out, $written); + } + if (null === $read && '' === $out) { + $write = array_diff($write, array(STDOUT)); + } + + if (in_array(STDERR, $w) && strlen($err) > 0) { + $written = fwrite(STDERR, (binary) $err, 32768); + if (false === $written) { + die(ERR_WRITE_FAILED); + } + $err = (binary) substr($err, $written); + } + if (null === $read && '' === $err) { + $write = array_diff($write, array(STDERR)); + } + + if ($r) { + $str = fread(STDIN, 32768); + if (false !== $str) { + $out .= $str; + $err .= $str; + } + if (false === $str || feof(STDIN)) { + $read = null; + if (!feof(STDIN)) { + die(ERR_READ_FAILED); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cd0933f3263aa9682fa8fcb47e6ee208cd7d9147 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessBuilderTest.php @@ -0,0 +1,205 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Process\ProcessBuilder; + +class ProcessBuilderTest extends TestCase +{ + public function testInheritEnvironmentVars() + { + $proc = ProcessBuilder::create() + ->add('foo') + ->getProcess(); + + $this->assertTrue($proc->areEnvironmentVariablesInherited()); + } + + public function testAddEnvironmentVariables() + { + $pb = new ProcessBuilder(); + $env = array( + 'foo' => 'bar', + 'foo2' => 'bar2', + ); + $proc = $pb + ->add('command') + ->setEnv('foo', 'bar2') + ->addEnvironmentVariables($env) + ->inheritEnvironmentVariables(false) + ->getProcess() + ; + + $this->assertSame($env, $proc->getEnv()); + $this->assertFalse($proc->areEnvironmentVariablesInherited()); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException + */ + public function testNegativeTimeoutFromSetter() + { + $pb = new ProcessBuilder(); + $pb->setTimeout(-1); + } + + public function testNullTimeout() + { + $pb = new ProcessBuilder(); + $pb->setTimeout(10); + $pb->setTimeout(null); + + $r = new \ReflectionObject($pb); + $p = $r->getProperty('timeout'); + $p->setAccessible(true); + + $this->assertNull($p->getValue($pb)); + } + + public function testShouldSetArguments() + { + $pb = new ProcessBuilder(array('initial')); + $pb->setArguments(array('second')); + + $proc = $pb->getProcess(); + + $this->assertContains('second', $proc->getCommandLine()); + } + + public function testPrefixIsPrependedToAllGeneratedProcess() + { + $pb = new ProcessBuilder(); + $pb->setPrefix('/usr/bin/php'); + + $proc = $pb->setArguments(array('-v'))->getProcess(); + if ('\\' === DIRECTORY_SEPARATOR) { + $this->assertEquals('"/usr/bin/php" "-v"', $proc->getCommandLine()); + } else { + $this->assertEquals("'/usr/bin/php' '-v'", $proc->getCommandLine()); + } + + $proc = $pb->setArguments(array('-i'))->getProcess(); + if ('\\' === DIRECTORY_SEPARATOR) { + $this->assertEquals('"/usr/bin/php" "-i"', $proc->getCommandLine()); + } else { + $this->assertEquals("'/usr/bin/php' '-i'", $proc->getCommandLine()); + } + } + + public function testArrayPrefixesArePrependedToAllGeneratedProcess() + { + $pb = new ProcessBuilder(); + $pb->setPrefix(array('/usr/bin/php', 'composer.phar')); + + $proc = $pb->setArguments(array('-v'))->getProcess(); + if ('\\' === DIRECTORY_SEPARATOR) { + $this->assertEquals('"/usr/bin/php" "composer.phar" "-v"', $proc->getCommandLine()); + } else { + $this->assertEquals("'/usr/bin/php' 'composer.phar' '-v'", $proc->getCommandLine()); + } + + $proc = $pb->setArguments(array('-i'))->getProcess(); + if ('\\' === DIRECTORY_SEPARATOR) { + $this->assertEquals('"/usr/bin/php" "composer.phar" "-i"', $proc->getCommandLine()); + } else { + $this->assertEquals("'/usr/bin/php' 'composer.phar' '-i'", $proc->getCommandLine()); + } + } + + public function testShouldEscapeArguments() + { + $pb = new ProcessBuilder(array('%path%', 'foo " bar', '%baz%baz')); + $proc = $pb->getProcess(); + + if ('\\' === DIRECTORY_SEPARATOR) { + $this->assertSame('^%"path"^% "foo \\" bar" "%baz%baz"', $proc->getCommandLine()); + } else { + $this->assertSame("'%path%' 'foo \" bar' '%baz%baz'", $proc->getCommandLine()); + } + } + + public function testShouldEscapeArgumentsAndPrefix() + { + $pb = new ProcessBuilder(array('arg')); + $pb->setPrefix('%prefix%'); + $proc = $pb->getProcess(); + + if ('\\' === DIRECTORY_SEPARATOR) { + $this->assertSame('^%"prefix"^% "arg"', $proc->getCommandLine()); + } else { + $this->assertSame("'%prefix%' 'arg'", $proc->getCommandLine()); + } + } + + /** + * @expectedException \Symfony\Component\Process\Exception\LogicException + */ + public function testShouldThrowALogicExceptionIfNoPrefixAndNoArgument() + { + ProcessBuilder::create()->getProcess(); + } + + public function testShouldNotThrowALogicExceptionIfNoArgument() + { + $process = ProcessBuilder::create() + ->setPrefix('/usr/bin/php') + ->getProcess(); + + if ('\\' === DIRECTORY_SEPARATOR) { + $this->assertEquals('"/usr/bin/php"', $process->getCommandLine()); + } else { + $this->assertEquals("'/usr/bin/php'", $process->getCommandLine()); + } + } + + public function testShouldNotThrowALogicExceptionIfNoPrefix() + { + $process = ProcessBuilder::create(array('/usr/bin/php')) + ->getProcess(); + + if ('\\' === DIRECTORY_SEPARATOR) { + $this->assertEquals('"/usr/bin/php"', $process->getCommandLine()); + } else { + $this->assertEquals("'/usr/bin/php'", $process->getCommandLine()); + } + } + + public function testShouldReturnProcessWithDisabledOutput() + { + $process = ProcessBuilder::create(array('/usr/bin/php')) + ->disableOutput() + ->getProcess(); + + $this->assertTrue($process->isOutputDisabled()); + } + + public function testShouldReturnProcessWithEnabledOutput() + { + $process = ProcessBuilder::create(array('/usr/bin/php')) + ->disableOutput() + ->enableOutput() + ->getProcess(); + + $this->assertFalse($process->isOutputDisabled()); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException + * @expectedExceptionMessage Symfony\Component\Process\ProcessBuilder::setInput only accepts strings, Traversable objects or stream resources. + */ + public function testInvalidInput() + { + $builder = ProcessBuilder::create(); + $builder->setInput(array()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5f739158c9b1467f635b24068c3f01020866a1d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.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\Component\Process\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Process\Exception\ProcessFailedException; + +/** + * @author Sebastian Marek + */ +class ProcessFailedExceptionTest extends TestCase +{ + /** + * tests ProcessFailedException throws exception if the process was successful. + */ + public function testProcessFailedExceptionThrowsException() + { + $process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful'))->setConstructorArgs(array('php'))->getMock(); + $process->expects($this->once()) + ->method('isSuccessful') + ->will($this->returnValue(true)); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}( + '\InvalidArgumentException', + 'Expected a failed process, but the given process was successful.' + ); + + new ProcessFailedException($process); + } + + /** + * tests ProcessFailedException uses information from process output + * to generate exception message. + */ + public function testProcessFailedExceptionPopulatesInformationFromProcessOutput() + { + $cmd = 'php'; + $exitCode = 1; + $exitText = 'General error'; + $output = 'Command output'; + $errorOutput = 'FATAL: Unexpected error'; + $workingDirectory = getcwd(); + + $process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled', 'getWorkingDirectory'))->setConstructorArgs(array($cmd))->getMock(); + $process->expects($this->once()) + ->method('isSuccessful') + ->will($this->returnValue(false)); + + $process->expects($this->once()) + ->method('getOutput') + ->will($this->returnValue($output)); + + $process->expects($this->once()) + ->method('getErrorOutput') + ->will($this->returnValue($errorOutput)); + + $process->expects($this->once()) + ->method('getExitCode') + ->will($this->returnValue($exitCode)); + + $process->expects($this->once()) + ->method('getExitCodeText') + ->will($this->returnValue($exitText)); + + $process->expects($this->once()) + ->method('isOutputDisabled') + ->will($this->returnValue(false)); + + $process->expects($this->once()) + ->method('getWorkingDirectory') + ->will($this->returnValue($workingDirectory)); + + $exception = new ProcessFailedException($process); + + $this->assertEquals( + "The command \"$cmd\" failed.\n\nExit Code: $exitCode($exitText)\n\nWorking directory: {$workingDirectory}\n\nOutput:\n================\n{$output}\n\nError Output:\n================\n{$errorOutput}", + $exception->getMessage() + ); + } + + /** + * Tests that ProcessFailedException does not extract information from + * process output if it was previously disabled. + */ + public function testDisabledOutputInFailedExceptionDoesNotPopulateOutput() + { + $cmd = 'php'; + $exitCode = 1; + $exitText = 'General error'; + $workingDirectory = getcwd(); + + $process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput', 'getWorkingDirectory'))->setConstructorArgs(array($cmd))->getMock(); + $process->expects($this->once()) + ->method('isSuccessful') + ->will($this->returnValue(false)); + + $process->expects($this->never()) + ->method('getOutput'); + + $process->expects($this->never()) + ->method('getErrorOutput'); + + $process->expects($this->once()) + ->method('getExitCode') + ->will($this->returnValue($exitCode)); + + $process->expects($this->once()) + ->method('getExitCodeText') + ->will($this->returnValue($exitText)); + + $process->expects($this->once()) + ->method('isOutputDisabled') + ->will($this->returnValue(true)); + + $process->expects($this->once()) + ->method('getWorkingDirectory') + ->will($this->returnValue($workingDirectory)); + + $exception = new ProcessFailedException($process); + + $this->assertEquals( + "The command \"$cmd\" failed.\n\nExit Code: $exitCode($exitText)\n\nWorking directory: {$workingDirectory}", + $exception->getMessage() + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessTest.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c51a116e7319fe77b401fbceab483922ec27700e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -0,0 +1,1495 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Process\Exception\LogicException; +use Symfony\Component\Process\Exception\ProcessTimedOutException; +use Symfony\Component\Process\Exception\RuntimeException; +use Symfony\Component\Process\InputStream; +use Symfony\Component\Process\PhpExecutableFinder; +use Symfony\Component\Process\Pipes\PipesInterface; +use Symfony\Component\Process\Process; + +/** + * @author Robert Schönthal + */ +class ProcessTest extends TestCase +{ + private static $phpBin; + private static $process; + private static $sigchild; + private static $notEnhancedSigchild = false; + + public static function setUpBeforeClass() + { + $phpBin = new PhpExecutableFinder(); + self::$phpBin = getenv('SYMFONY_PROCESS_PHP_TEST_BINARY') ?: ('phpdbg' === PHP_SAPI ? 'php' : $phpBin->find()); + if ('\\' !== DIRECTORY_SEPARATOR) { + // exec is mandatory to deal with sending a signal to the process + // see https://github.com/symfony/symfony/issues/5030 about prepending + // command with exec + self::$phpBin = 'exec '.self::$phpBin; + } + + ob_start(); + phpinfo(INFO_GENERAL); + self::$sigchild = false !== strpos(ob_get_clean(), '--enable-sigchild'); + } + + protected function tearDown() + { + if (self::$process) { + self::$process->stop(0); + self::$process = null; + } + } + + public function testThatProcessDoesNotThrowWarningDuringRun() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('This test is transient on Windows'); + } + @trigger_error('Test Error', E_USER_NOTICE); + $process = $this->getProcess(self::$phpBin." -r 'sleep(3)'"); + $process->run(); + $actualError = error_get_last(); + $this->assertEquals('Test Error', $actualError['message']); + $this->assertEquals(E_USER_NOTICE, $actualError['type']); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException + */ + public function testNegativeTimeoutFromConstructor() + { + $this->getProcess('', null, null, null, -1); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException + */ + public function testNegativeTimeoutFromSetter() + { + $p = $this->getProcess(''); + $p->setTimeout(-1); + } + + public function testFloatAndNullTimeout() + { + $p = $this->getProcess(''); + + $p->setTimeout(10); + $this->assertSame(10.0, $p->getTimeout()); + + $p->setTimeout(null); + $this->assertNull($p->getTimeout()); + + $p->setTimeout(0.0); + $this->assertNull($p->getTimeout()); + } + + /** + * @requires extension pcntl + */ + public function testStopWithTimeoutIsActuallyWorking() + { + $p = $this->getProcess(self::$phpBin.' '.__DIR__.'/NonStopableProcess.php 30'); + $p->start(); + + while (false === strpos($p->getOutput(), 'received')) { + usleep(1000); + } + $start = microtime(true); + $p->stop(0.1); + + $p->wait(); + + $this->assertLessThan(15, microtime(true) - $start); + } + + public function testAllOutputIsActuallyReadOnTermination() + { + // this code will result in a maximum of 2 reads of 8192 bytes by calling + // start() and isRunning(). by the time getOutput() is called the process + // has terminated so the internal pipes array is already empty. normally + // the call to start() will not read any data as the process will not have + // generated output, but this is non-deterministic so we must count it as + // a possibility. therefore we need 2 * PipesInterface::CHUNK_SIZE plus + // another byte which will never be read. + $expectedOutputSize = PipesInterface::CHUNK_SIZE * 2 + 2; + + $code = sprintf('echo str_repeat(\'*\', %d);', $expectedOutputSize); + $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg($code))); + + $p->start(); + + // Don't call Process::run nor Process::wait to avoid any read of pipes + $h = new \ReflectionProperty($p, 'process'); + $h->setAccessible(true); + $h = $h->getValue($p); + $s = @proc_get_status($h); + + while (!empty($s['running'])) { + usleep(1000); + $s = proc_get_status($h); + } + + $o = $p->getOutput(); + + $this->assertEquals($expectedOutputSize, strlen($o)); + } + + public function testCallbacksAreExecutedWithStart() + { + $process = $this->getProcess('echo foo'); + $process->start(function ($type, $buffer) use (&$data) { + $data .= $buffer; + }); + + $process->wait(); + + $this->assertSame('foo'.PHP_EOL, $data); + } + + /** + * tests results from sub processes. + * + * @dataProvider responsesCodeProvider + */ + public function testProcessResponses($expected, $getter, $code) + { + $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg($code))); + $p->run(); + + $this->assertSame($expected, $p->$getter()); + } + + /** + * tests results from sub processes. + * + * @dataProvider pipesCodeProvider + */ + public function testProcessPipes($code, $size) + { + $expected = str_repeat(str_repeat('*', 1024), $size).'!'; + $expectedLength = (1024 * $size) + 1; + + $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg($code))); + $p->setInput($expected); + $p->run(); + + $this->assertEquals($expectedLength, strlen($p->getOutput())); + $this->assertEquals($expectedLength, strlen($p->getErrorOutput())); + } + + /** + * @dataProvider pipesCodeProvider + */ + public function testSetStreamAsInput($code, $size) + { + $expected = str_repeat(str_repeat('*', 1024), $size).'!'; + $expectedLength = (1024 * $size) + 1; + + $stream = fopen('php://temporary', 'w+'); + fwrite($stream, $expected); + rewind($stream); + + $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg($code))); + $p->setInput($stream); + $p->run(); + + fclose($stream); + + $this->assertEquals($expectedLength, strlen($p->getOutput())); + $this->assertEquals($expectedLength, strlen($p->getErrorOutput())); + } + + public function testLiveStreamAsInput() + { + $stream = fopen('php://memory', 'r+'); + fwrite($stream, 'hello'); + rewind($stream); + + $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('stream_copy_to_stream(STDIN, STDOUT);'))); + $p->setInput($stream); + $p->start(function ($type, $data) use ($stream) { + if ('hello' === $data) { + fclose($stream); + } + }); + $p->wait(); + + $this->assertSame('hello', $p->getOutput()); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\LogicException + * @expectedExceptionMessage Input can not be set while the process is running. + */ + public function testSetInputWhileRunningThrowsAnException() + { + $process = $this->getProcess(self::$phpBin.' -r "sleep(30);"'); + $process->start(); + try { + $process->setInput('foobar'); + $process->stop(); + $this->fail('A LogicException should have been raised.'); + } catch (LogicException $e) { + } + $process->stop(); + + throw $e; + } + + /** + * @dataProvider provideInvalidInputValues + * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException + * @expectedExceptionMessage Symfony\Component\Process\Process::setInput only accepts strings, Traversable objects or stream resources. + */ + public function testInvalidInput($value) + { + $process = $this->getProcess('foo'); + $process->setInput($value); + } + + public function provideInvalidInputValues() + { + return array( + array(array()), + array(new NonStringifiable()), + ); + } + + /** + * @dataProvider provideInputValues + */ + public function testValidInput($expected, $value) + { + $process = $this->getProcess('foo'); + $process->setInput($value); + $this->assertSame($expected, $process->getInput()); + } + + public function provideInputValues() + { + return array( + array(null, null), + array('24.5', 24.5), + array('input data', 'input data'), + ); + } + + public function chainedCommandsOutputProvider() + { + if ('\\' === DIRECTORY_SEPARATOR) { + return array( + array("2 \r\n2\r\n", '&&', '2'), + ); + } + + return array( + array("1\n1\n", ';', '1'), + array("2\n2\n", '&&', '2'), + ); + } + + /** + * @dataProvider chainedCommandsOutputProvider + */ + public function testChainedCommandsOutput($expected, $operator, $input) + { + $process = $this->getProcess(sprintf('echo %s %s echo %s', $input, $operator, $input)); + $process->run(); + $this->assertEquals($expected, $process->getOutput()); + } + + public function testCallbackIsExecutedForOutput() + { + $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('echo \'foo\';'))); + + $called = false; + $p->run(function ($type, $buffer) use (&$called) { + $called = $buffer === 'foo'; + }); + + $this->assertTrue($called, 'The callback should be executed with the output'); + } + + public function testCallbackIsExecutedForOutputWheneverOutputIsDisabled() + { + $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('echo \'foo\';'))); + $p->disableOutput(); + + $called = false; + $p->run(function ($type, $buffer) use (&$called) { + $called = $buffer === 'foo'; + }); + + $this->assertTrue($called, 'The callback should be executed with the output'); + } + + public function testGetErrorOutput() + { + $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 0; while ($n < 3) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; }'))); + + $p->run(); + $this->assertEquals(3, preg_match_all('/ERROR/', $p->getErrorOutput(), $matches)); + } + + public function testFlushErrorOutput() + { + $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 0; while ($n < 3) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; }'))); + + $p->run(); + $p->clearErrorOutput(); + $this->assertEmpty($p->getErrorOutput()); + } + + /** + * @dataProvider provideIncrementalOutput + */ + public function testIncrementalOutput($getOutput, $getIncrementalOutput, $uri) + { + $lock = tempnam(sys_get_temp_dir(), __FUNCTION__); + + $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('file_put_contents($s = \''.$uri.'\', \'foo\'); flock(fopen('.var_export($lock, true).', \'r\'), LOCK_EX); file_put_contents($s, \'bar\');'))); + + $h = fopen($lock, 'w'); + flock($h, LOCK_EX); + + $p->start(); + + foreach (array('foo', 'bar') as $s) { + while (false === strpos($p->$getOutput(), $s)) { + usleep(1000); + } + + $this->assertSame($s, $p->$getIncrementalOutput()); + $this->assertSame('', $p->$getIncrementalOutput()); + + flock($h, LOCK_UN); + } + + fclose($h); + } + + public function provideIncrementalOutput() + { + return array( + array('getOutput', 'getIncrementalOutput', 'php://stdout'), + array('getErrorOutput', 'getIncrementalErrorOutput', 'php://stderr'), + ); + } + + public function testGetOutput() + { + $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 0; while ($n < 3) { echo \' foo \'; $n++; }'))); + + $p->run(); + $this->assertEquals(3, preg_match_all('/foo/', $p->getOutput(), $matches)); + } + + public function testFlushOutput() + { + $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n=0;while ($n<3) {echo \' foo \';$n++;}'))); + + $p->run(); + $p->clearOutput(); + $this->assertEmpty($p->getOutput()); + } + + public function testZeroAsOutput() + { + if ('\\' === DIRECTORY_SEPARATOR) { + // see http://stackoverflow.com/questions/7105433/windows-batch-echo-without-new-line + $p = $this->getProcess('echo | set /p dummyName=0'); + } else { + $p = $this->getProcess('printf 0'); + } + + $p->run(); + $this->assertSame('0', $p->getOutput()); + } + + public function testExitCodeCommandFailed() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('Windows does not support POSIX exit code'); + } + $this->skipIfNotEnhancedSigchild(); + + // such command run in bash return an exitcode 127 + $process = $this->getProcess('nonexistingcommandIhopeneversomeonewouldnameacommandlikethis'); + $process->run(); + + $this->assertGreaterThan(0, $process->getExitCode()); + } + + public function testTTYCommand() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('Windows does not have /dev/tty support'); + } + + $process = $this->getProcess('echo "foo" >> /dev/null && '.self::$phpBin.' -r "usleep(100000);"'); + $process->setTty(true); + $process->start(); + $this->assertTrue($process->isRunning()); + $process->wait(); + + $this->assertSame(Process::STATUS_TERMINATED, $process->getStatus()); + } + + public function testTTYCommandExitCode() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('Windows does have /dev/tty support'); + } + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess('echo "foo" >> /dev/null'); + $process->setTty(true); + $process->run(); + + $this->assertTrue($process->isSuccessful()); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\RuntimeException + * @expectedExceptionMessage TTY mode is not supported on Windows platform. + */ + public function testTTYInWindowsEnvironment() + { + if ('\\' !== DIRECTORY_SEPARATOR) { + $this->markTestSkipped('This test is for Windows platform only'); + } + + $process = $this->getProcess('echo "foo" >> /dev/null'); + $process->setTty(false); + $process->setTty(true); + } + + public function testExitCodeTextIsNullWhenExitCodeIsNull() + { + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess(''); + $this->assertNull($process->getExitCodeText()); + } + + public function testPTYCommand() + { + if (!Process::isPtySupported()) { + $this->markTestSkipped('PTY is not supported on this operating system.'); + } + + $process = $this->getProcess('echo "foo"'); + $process->setPty(true); + $process->run(); + + $this->assertSame(Process::STATUS_TERMINATED, $process->getStatus()); + $this->assertEquals("foo\r\n", $process->getOutput()); + } + + public function testMustRun() + { + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess('echo foo'); + + $this->assertSame($process, $process->mustRun()); + $this->assertEquals('foo'.PHP_EOL, $process->getOutput()); + } + + public function testSuccessfulMustRunHasCorrectExitCode() + { + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess('echo foo')->mustRun(); + $this->assertEquals(0, $process->getExitCode()); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\ProcessFailedException + */ + public function testMustRunThrowsException() + { + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess('exit 1'); + $process->mustRun(); + } + + public function testExitCodeText() + { + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess(''); + $r = new \ReflectionObject($process); + $p = $r->getProperty('exitcode'); + $p->setAccessible(true); + + $p->setValue($process, 2); + $this->assertEquals('Misuse of shell builtins', $process->getExitCodeText()); + } + + public function testStartIsNonBlocking() + { + $process = $this->getProcess(self::$phpBin.' -r "usleep(500000);"'); + $start = microtime(true); + $process->start(); + $end = microtime(true); + $this->assertLessThan(0.4, $end - $start); + $process->stop(); + } + + public function testUpdateStatus() + { + $process = $this->getProcess('echo foo'); + $process->run(); + $this->assertTrue(strlen($process->getOutput()) > 0); + } + + public function testGetExitCodeIsNullOnStart() + { + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess(self::$phpBin.' -r "usleep(100000);"'); + $this->assertNull($process->getExitCode()); + $process->start(); + $this->assertNull($process->getExitCode()); + $process->wait(); + $this->assertEquals(0, $process->getExitCode()); + } + + public function testGetExitCodeIsNullOnWhenStartingAgain() + { + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess(self::$phpBin.' -r "usleep(100000);"'); + $process->run(); + $this->assertEquals(0, $process->getExitCode()); + $process->start(); + $this->assertNull($process->getExitCode()); + $process->wait(); + $this->assertEquals(0, $process->getExitCode()); + } + + public function testGetExitCode() + { + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess('echo foo'); + $process->run(); + $this->assertSame(0, $process->getExitCode()); + } + + public function testStatus() + { + $process = $this->getProcess(self::$phpBin.' -r "usleep(100000);"'); + $this->assertFalse($process->isRunning()); + $this->assertFalse($process->isStarted()); + $this->assertFalse($process->isTerminated()); + $this->assertSame(Process::STATUS_READY, $process->getStatus()); + $process->start(); + $this->assertTrue($process->isRunning()); + $this->assertTrue($process->isStarted()); + $this->assertFalse($process->isTerminated()); + $this->assertSame(Process::STATUS_STARTED, $process->getStatus()); + $process->wait(); + $this->assertFalse($process->isRunning()); + $this->assertTrue($process->isStarted()); + $this->assertTrue($process->isTerminated()); + $this->assertSame(Process::STATUS_TERMINATED, $process->getStatus()); + } + + public function testStop() + { + $process = $this->getProcess(self::$phpBin.' -r "sleep(31);"'); + $process->start(); + $this->assertTrue($process->isRunning()); + $process->stop(); + $this->assertFalse($process->isRunning()); + } + + public function testIsSuccessful() + { + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess('echo foo'); + $process->run(); + $this->assertTrue($process->isSuccessful()); + } + + public function testIsSuccessfulOnlyAfterTerminated() + { + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess(self::$phpBin.' -r "usleep(100000);"'); + $process->start(); + + $this->assertFalse($process->isSuccessful()); + + $process->wait(); + + $this->assertTrue($process->isSuccessful()); + } + + public function testIsNotSuccessful() + { + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess(self::$phpBin.' -r "throw new \Exception(\'BOUM\');"'); + $process->run(); + $this->assertFalse($process->isSuccessful()); + } + + public function testProcessIsNotSignaled() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('Windows does not support POSIX signals'); + } + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess('echo foo'); + $process->run(); + $this->assertFalse($process->hasBeenSignaled()); + } + + public function testProcessWithoutTermSignal() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('Windows does not support POSIX signals'); + } + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess('echo foo'); + $process->run(); + $this->assertEquals(0, $process->getTermSignal()); + } + + public function testProcessIsSignaledIfStopped() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('Windows does not support POSIX signals'); + } + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess(self::$phpBin.' -r "sleep(32);"'); + $process->start(); + $process->stop(); + $this->assertTrue($process->hasBeenSignaled()); + $this->assertEquals(15, $process->getTermSignal()); // SIGTERM + } + + /** + * @expectedException \Symfony\Component\Process\Exception\RuntimeException + * @expectedExceptionMessage The process has been signaled + */ + public function testProcessThrowsExceptionWhenExternallySignaled() + { + if (!function_exists('posix_kill')) { + $this->markTestSkipped('Function posix_kill is required.'); + } + $this->skipIfNotEnhancedSigchild(false); + + $process = $this->getProcess(self::$phpBin.' -r "sleep(32.1)"'); + $process->start(); + posix_kill($process->getPid(), 9); // SIGKILL + + $process->wait(); + } + + public function testRestart() + { + $process1 = $this->getProcess(self::$phpBin.' -r "echo getmypid();"'); + $process1->run(); + $process2 = $process1->restart(); + + $process2->wait(); // wait for output + + // Ensure that both processed finished and the output is numeric + $this->assertFalse($process1->isRunning()); + $this->assertFalse($process2->isRunning()); + $this->assertTrue(is_numeric($process1->getOutput())); + $this->assertTrue(is_numeric($process2->getOutput())); + + // Ensure that restart returned a new process by check that the output is different + $this->assertNotEquals($process1->getOutput(), $process2->getOutput()); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\ProcessTimedOutException + * @expectedExceptionMessage exceeded the timeout of 0.1 seconds. + */ + public function testRunProcessWithTimeout() + { + $process = $this->getProcess(self::$phpBin.' -r "sleep(30);"'); + $process->setTimeout(0.1); + $start = microtime(true); + try { + $process->run(); + $this->fail('A RuntimeException should have been raised'); + } catch (RuntimeException $e) { + } + + $this->assertLessThan(15, microtime(true) - $start); + + throw $e; + } + + /** + * @expectedException \Symfony\Component\Process\Exception\ProcessTimedOutException + * @expectedExceptionMessage exceeded the timeout of 0.1 seconds. + */ + public function testIterateOverProcessWithTimeout() + { + $process = $this->getProcess(self::$phpBin.' -r "sleep(30);"'); + $process->setTimeout(0.1); + $start = microtime(true); + try { + $process->start(); + foreach ($process as $buffer); + $this->fail('A RuntimeException should have been raised'); + } catch (RuntimeException $e) { + } + + $this->assertLessThan(15, microtime(true) - $start); + + throw $e; + } + + public function testCheckTimeoutOnNonStartedProcess() + { + $process = $this->getProcess('echo foo'); + $this->assertNull($process->checkTimeout()); + } + + public function testCheckTimeoutOnTerminatedProcess() + { + $process = $this->getProcess('echo foo'); + $process->run(); + $this->assertNull($process->checkTimeout()); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\ProcessTimedOutException + * @expectedExceptionMessage exceeded the timeout of 0.1 seconds. + */ + public function testCheckTimeoutOnStartedProcess() + { + $process = $this->getProcess(self::$phpBin.' -r "sleep(33);"'); + $process->setTimeout(0.1); + + $process->start(); + $start = microtime(true); + + try { + while ($process->isRunning()) { + $process->checkTimeout(); + usleep(100000); + } + $this->fail('A ProcessTimedOutException should have been raised'); + } catch (ProcessTimedOutException $e) { + } + + $this->assertLessThan(15, microtime(true) - $start); + + throw $e; + } + + public function testIdleTimeout() + { + $process = $this->getProcess(self::$phpBin.' -r "sleep(34);"'); + $process->setTimeout(60); + $process->setIdleTimeout(0.1); + + try { + $process->run(); + + $this->fail('A timeout exception was expected.'); + } catch (ProcessTimedOutException $e) { + $this->assertTrue($e->isIdleTimeout()); + $this->assertFalse($e->isGeneralTimeout()); + $this->assertEquals(0.1, $e->getExceededTimeout()); + } + } + + public function testIdleTimeoutNotExceededWhenOutputIsSent() + { + $process = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('while (true) {echo \'foo \'; usleep(1000);}'))); + $process->setTimeout(1); + $process->start(); + + while (false === strpos($process->getOutput(), 'foo')) { + usleep(1000); + } + + $process->setIdleTimeout(0.5); + + try { + $process->wait(); + $this->fail('A timeout exception was expected.'); + } catch (ProcessTimedOutException $e) { + $this->assertTrue($e->isGeneralTimeout(), 'A general timeout is expected.'); + $this->assertFalse($e->isIdleTimeout(), 'No idle timeout is expected.'); + $this->assertEquals(1, $e->getExceededTimeout()); + } + } + + /** + * @expectedException \Symfony\Component\Process\Exception\ProcessTimedOutException + * @expectedExceptionMessage exceeded the timeout of 0.1 seconds. + */ + public function testStartAfterATimeout() + { + $process = $this->getProcess(self::$phpBin.' -r "sleep(35);"'); + $process->setTimeout(0.1); + + try { + $process->run(); + $this->fail('A ProcessTimedOutException should have been raised.'); + } catch (ProcessTimedOutException $e) { + } + $this->assertFalse($process->isRunning()); + $process->start(); + $this->assertTrue($process->isRunning()); + $process->stop(0); + + throw $e; + } + + public function testGetPid() + { + $process = $this->getProcess(self::$phpBin.' -r "sleep(36);"'); + $process->start(); + $this->assertGreaterThan(0, $process->getPid()); + $process->stop(0); + } + + public function testGetPidIsNullBeforeStart() + { + $process = $this->getProcess('foo'); + $this->assertNull($process->getPid()); + } + + public function testGetPidIsNullAfterRun() + { + $process = $this->getProcess('echo foo'); + $process->run(); + $this->assertNull($process->getPid()); + } + + /** + * @requires extension pcntl + */ + public function testSignal() + { + $process = $this->getProcess(self::$phpBin.' '.__DIR__.'/SignalListener.php'); + $process->start(); + + while (false === strpos($process->getOutput(), 'Caught')) { + usleep(1000); + } + $process->signal(SIGUSR1); + $process->wait(); + + $this->assertEquals('Caught SIGUSR1', $process->getOutput()); + } + + /** + * @requires extension pcntl + */ + public function testExitCodeIsAvailableAfterSignal() + { + $this->skipIfNotEnhancedSigchild(); + + $process = $this->getProcess('sleep 4'); + $process->start(); + $process->signal(SIGKILL); + + while ($process->isRunning()) { + usleep(10000); + } + + $this->assertFalse($process->isRunning()); + $this->assertTrue($process->hasBeenSignaled()); + $this->assertFalse($process->isSuccessful()); + $this->assertEquals(137, $process->getExitCode()); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\LogicException + * @expectedExceptionMessage Can not send signal on a non running process. + */ + public function testSignalProcessNotRunning() + { + $process = $this->getProcess('foo'); + $process->signal(1); // SIGHUP + } + + /** + * @dataProvider provideMethodsThatNeedARunningProcess + */ + public function testMethodsThatNeedARunningProcess($method) + { + $process = $this->getProcess('foo'); + + if (method_exists($this, 'expectException')) { + $this->expectException('Symfony\Component\Process\Exception\LogicException'); + $this->expectExceptionMessage(sprintf('Process must be started before calling %s.', $method)); + } else { + $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', sprintf('Process must be started before calling %s.', $method)); + } + + $process->{$method}(); + } + + public function provideMethodsThatNeedARunningProcess() + { + return array( + array('getOutput'), + array('getIncrementalOutput'), + array('getErrorOutput'), + array('getIncrementalErrorOutput'), + array('wait'), + ); + } + + /** + * @dataProvider provideMethodsThatNeedATerminatedProcess + * @expectedException \Symfony\Component\Process\Exception\LogicException + * @expectedExceptionMessage Process must be terminated before calling + */ + public function testMethodsThatNeedATerminatedProcess($method) + { + $process = $this->getProcess(self::$phpBin.' -r "sleep(37);"'); + $process->start(); + try { + $process->{$method}(); + $process->stop(0); + $this->fail('A LogicException must have been thrown'); + } catch (\Exception $e) { + } + $process->stop(0); + + throw $e; + } + + public function provideMethodsThatNeedATerminatedProcess() + { + return array( + array('hasBeenSignaled'), + array('getTermSignal'), + array('hasBeenStopped'), + array('getStopSignal'), + ); + } + + /** + * @dataProvider provideWrongSignal + * @expectedException \Symfony\Component\Process\Exception\RuntimeException + */ + public function testWrongSignal($signal) + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('POSIX signals do not work on Windows'); + } + + $process = $this->getProcess(self::$phpBin.' -r "sleep(38);"'); + $process->start(); + try { + $process->signal($signal); + $this->fail('A RuntimeException must have been thrown'); + } catch (RuntimeException $e) { + $process->stop(0); + } + + throw $e; + } + + public function provideWrongSignal() + { + return array( + array(-4), + array('Céphalopodes'), + ); + } + + public function testDisableOutputDisablesTheOutput() + { + $p = $this->getProcess('foo'); + $this->assertFalse($p->isOutputDisabled()); + $p->disableOutput(); + $this->assertTrue($p->isOutputDisabled()); + $p->enableOutput(); + $this->assertFalse($p->isOutputDisabled()); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\RuntimeException + * @expectedExceptionMessage Disabling output while the process is running is not possible. + */ + public function testDisableOutputWhileRunningThrowsException() + { + $p = $this->getProcess(self::$phpBin.' -r "sleep(39);"'); + $p->start(); + $p->disableOutput(); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\RuntimeException + * @expectedExceptionMessage Enabling output while the process is running is not possible. + */ + public function testEnableOutputWhileRunningThrowsException() + { + $p = $this->getProcess(self::$phpBin.' -r "sleep(40);"'); + $p->disableOutput(); + $p->start(); + $p->enableOutput(); + } + + public function testEnableOrDisableOutputAfterRunDoesNotThrowException() + { + $p = $this->getProcess('echo foo'); + $p->disableOutput(); + $p->run(); + $p->enableOutput(); + $p->disableOutput(); + $this->assertTrue($p->isOutputDisabled()); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\LogicException + * @expectedExceptionMessage Output can not be disabled while an idle timeout is set. + */ + public function testDisableOutputWhileIdleTimeoutIsSet() + { + $process = $this->getProcess('foo'); + $process->setIdleTimeout(1); + $process->disableOutput(); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\LogicException + * @expectedExceptionMessage timeout can not be set while the output is disabled. + */ + public function testSetIdleTimeoutWhileOutputIsDisabled() + { + $process = $this->getProcess('foo'); + $process->disableOutput(); + $process->setIdleTimeout(1); + } + + public function testSetNullIdleTimeoutWhileOutputIsDisabled() + { + $process = $this->getProcess('foo'); + $process->disableOutput(); + $this->assertSame($process, $process->setIdleTimeout(null)); + } + + /** + * @dataProvider provideOutputFetchingMethods + * @expectedException \Symfony\Component\Process\Exception\LogicException + * @expectedExceptionMessage Output has been disabled. + */ + public function testGetOutputWhileDisabled($fetchMethod) + { + $p = $this->getProcess(self::$phpBin.' -r "sleep(41);"'); + $p->disableOutput(); + $p->start(); + $p->{$fetchMethod}(); + } + + public function provideOutputFetchingMethods() + { + return array( + array('getOutput'), + array('getIncrementalOutput'), + array('getErrorOutput'), + array('getIncrementalErrorOutput'), + ); + } + + public function testStopTerminatesProcessCleanly() + { + $process = $this->getProcess(self::$phpBin.' -r "echo 123; sleep(42);"'); + $process->run(function () use ($process) { + $process->stop(); + }); + $this->assertTrue(true, 'A call to stop() is not expected to cause wait() to throw a RuntimeException'); + } + + public function testKillSignalTerminatesProcessCleanly() + { + $process = $this->getProcess(self::$phpBin.' -r "echo 123; sleep(43);"'); + $process->run(function () use ($process) { + $process->signal(9); // SIGKILL + }); + $this->assertTrue(true, 'A call to signal() is not expected to cause wait() to throw a RuntimeException'); + } + + public function testTermSignalTerminatesProcessCleanly() + { + $process = $this->getProcess(self::$phpBin.' -r "echo 123; sleep(44);"'); + $process->run(function () use ($process) { + $process->signal(15); // SIGTERM + }); + $this->assertTrue(true, 'A call to signal() is not expected to cause wait() to throw a RuntimeException'); + } + + public function responsesCodeProvider() + { + return array( + //expected output / getter / code to execute + //array(1,'getExitCode','exit(1);'), + //array(true,'isSuccessful','exit();'), + array('output', 'getOutput', 'echo \'output\';'), + ); + } + + public function pipesCodeProvider() + { + $variations = array( + 'fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);', + 'include \''.__DIR__.'/PipeStdinInStdoutStdErrStreamSelect.php\';', + ); + + if ('\\' === DIRECTORY_SEPARATOR) { + // Avoid XL buffers on Windows because of https://bugs.php.net/bug.php?id=65650 + $sizes = array(1, 2, 4, 8); + } else { + $sizes = array(1, 16, 64, 1024, 4096); + } + + $codes = array(); + foreach ($sizes as $size) { + foreach ($variations as $code) { + $codes[] = array($code, $size); + } + } + + return $codes; + } + + /** + * @dataProvider provideVariousIncrementals + */ + public function testIncrementalOutputDoesNotRequireAnotherCall($stream, $method) + { + $process = $this->getProcess(self::$phpBin.' -r '.escapeshellarg('$n = 0; while ($n < 3) { file_put_contents(\''.$stream.'\', $n, 1); $n++; usleep(1000); }'), null, null, null, null); + $process->start(); + $result = ''; + $limit = microtime(true) + 3; + $expected = '012'; + + while ($result !== $expected && microtime(true) < $limit) { + $result .= $process->$method(); + } + + $this->assertSame($expected, $result); + $process->stop(); + } + + public function provideVariousIncrementals() + { + return array( + array('php://stdout', 'getIncrementalOutput'), + array('php://stderr', 'getIncrementalErrorOutput'), + ); + } + + public function testIteratorInput() + { + $input = function () { + yield 'ping'; + yield 'pong'; + }; + + $process = $this->getProcess(self::$phpBin.' -r '.escapeshellarg('stream_copy_to_stream(STDIN, STDOUT);'), null, null, $input()); + $process->run(); + $this->assertSame('pingpong', $process->getOutput()); + } + + public function testSimpleInputStream() + { + $input = new InputStream(); + + $process = $this->getProcess(self::$phpBin.' -r '.escapeshellarg('echo \'ping\'; stream_copy_to_stream(STDIN, STDOUT);')); + $process->setInput($input); + + $process->start(function ($type, $data) use ($input) { + if ('ping' === $data) { + $input->write('pang'); + } elseif (!$input->isClosed()) { + $input->write('pong'); + $input->close(); + } + }); + + $process->wait(); + $this->assertSame('pingpangpong', $process->getOutput()); + } + + public function testInputStreamWithCallable() + { + $i = 0; + $stream = fopen('php://memory', 'w+'); + $stream = function () use ($stream, &$i) { + if ($i < 3) { + rewind($stream); + fwrite($stream, ++$i); + rewind($stream); + + return $stream; + } + }; + + $input = new InputStream(); + $input->onEmpty($stream); + $input->write($stream()); + + $process = $this->getProcess(self::$phpBin.' -r '.escapeshellarg('echo fread(STDIN, 3);')); + $process->setInput($input); + $process->start(function ($type, $data) use ($input) { + $input->close(); + }); + + $process->wait(); + $this->assertSame('123', $process->getOutput()); + } + + public function testInputStreamWithGenerator() + { + $input = new InputStream(); + $input->onEmpty(function ($input) { + yield 'pong'; + $input->close(); + }); + + $process = $this->getProcess(self::$phpBin.' -r '.escapeshellarg('stream_copy_to_stream(STDIN, STDOUT);')); + $process->setInput($input); + $process->start(); + $input->write('ping'); + $process->wait(); + $this->assertSame('pingpong', $process->getOutput()); + } + + public function testInputStreamOnEmpty() + { + $i = 0; + $input = new InputStream(); + $input->onEmpty(function () use (&$i) { ++$i; }); + + $process = $this->getProcess(self::$phpBin.' -r '.escapeshellarg('echo 123; echo fread(STDIN, 1); echo 456;')); + $process->setInput($input); + $process->start(function ($type, $data) use ($input) { + if ('123' === $data) { + $input->close(); + } + }); + $process->wait(); + + $this->assertSame(0, $i, 'InputStream->onEmpty callback should be called only when the input *becomes* empty'); + $this->assertSame('123456', $process->getOutput()); + } + + public function testIteratorOutput() + { + $input = new InputStream(); + + $process = $this->getProcess(self::$phpBin.' -r '.escapeshellarg('fwrite(STDOUT, 123); fwrite(STDERR, 234); flush(); usleep(10000); fwrite(STDOUT, fread(STDIN, 3)); fwrite(STDERR, 456);')); + $process->setInput($input); + $process->start(); + $output = array(); + + foreach ($process as $type => $data) { + $output[] = array($type, $data); + break; + } + $expectedOutput = array( + array($process::OUT, '123'), + ); + $this->assertSame($expectedOutput, $output); + + $input->write(345); + + foreach ($process as $type => $data) { + $output[] = array($type, $data); + } + + $this->assertSame('', $process->getOutput()); + $this->assertFalse($process->isRunning()); + + $expectedOutput = array( + array($process::OUT, '123'), + array($process::ERR, '234'), + array($process::OUT, '345'), + array($process::ERR, '456'), + ); + $this->assertSame($expectedOutput, $output); + } + + public function testNonBlockingNorClearingIteratorOutput() + { + $input = new InputStream(); + + $process = $this->getProcess(self::$phpBin.' -r '.escapeshellarg('fwrite(STDOUT, fread(STDIN, 3));')); + $process->setInput($input); + $process->start(); + $output = array(); + + foreach ($process->getIterator($process::ITER_NON_BLOCKING | $process::ITER_KEEP_OUTPUT) as $type => $data) { + $output[] = array($type, $data); + break; + } + $expectedOutput = array( + array($process::OUT, ''), + ); + $this->assertSame($expectedOutput, $output); + + $input->write(123); + + foreach ($process->getIterator($process::ITER_NON_BLOCKING | $process::ITER_KEEP_OUTPUT) as $type => $data) { + if ('' !== $data) { + $output[] = array($type, $data); + } + } + + $this->assertSame('123', $process->getOutput()); + $this->assertFalse($process->isRunning()); + + $expectedOutput = array( + array($process::OUT, ''), + array($process::OUT, '123'), + ); + $this->assertSame($expectedOutput, $output); + } + + public function testChainedProcesses() + { + $p1 = new Process(self::$phpBin.' -r '.escapeshellarg('fwrite(STDERR, 123); fwrite(STDOUT, 456);')); + $p2 = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('stream_copy_to_stream(STDIN, STDOUT);'))); + $p2->setInput($p1); + + $p1->start(); + $p2->run(); + + $this->assertSame('123', $p1->getErrorOutput()); + $this->assertSame('', $p1->getOutput()); + $this->assertSame('', $p2->getErrorOutput()); + $this->assertSame('456', $p2->getOutput()); + } + + public function testSetBadEnv() + { + $process = $this->getProcess('echo hello'); + $process->setEnv(array('bad%%' => '123')); + $process->inheritEnvironmentVariables(true); + + $process->run(); + + $this->assertSame('hello'.PHP_EOL, $process->getOutput()); + $this->assertSame('', $process->getErrorOutput()); + } + + public function testInheritEnvEnabled() + { + $process = $this->getProcess(self::$phpBin.' -r '.escapeshellarg('echo serialize($_SERVER);'), null, array('BAR' => 'BAZ')); + + putenv('FOO=BAR'); + + $this->assertSame($process, $process->inheritEnvironmentVariables(1)); + $this->assertTrue($process->areEnvironmentVariablesInherited()); + + $process->run(); + + $expected = array('BAR' => 'BAZ', 'FOO' => 'BAR'); + $env = array_intersect_key(unserialize($process->getOutput()), $expected); + + $this->assertEquals($expected, $env); + } + + public function testInheritEnvDisabled() + { + $process = $this->getProcess(self::$phpBin.' -r '.escapeshellarg('echo serialize($_SERVER);'), null, array('BAR' => 'BAZ')); + + putenv('FOO=BAR'); + + $this->assertFalse($process->areEnvironmentVariablesInherited()); + + $process->run(); + + $expected = array('BAR' => 'BAZ', 'FOO' => 'BAR'); + $env = array_intersect_key(unserialize($process->getOutput()), $expected); + unset($expected['FOO']); + + $this->assertSame($expected, $env); + } + + /** + * @param string $commandline + * @param null|string $cwd + * @param null|array $env + * @param null|string $input + * @param int $timeout + * @param array $options + * + * @return Process + */ + private function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) + { + $process = new Process($commandline, $cwd, $env, $input, $timeout, $options); + + if (false !== $enhance = getenv('ENHANCE_SIGCHLD')) { + try { + $process->setEnhanceSigchildCompatibility(false); + $process->getExitCode(); + $this->fail('ENHANCE_SIGCHLD must be used together with a sigchild-enabled PHP.'); + } catch (RuntimeException $e) { + $this->assertSame('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.', $e->getMessage()); + if ($enhance) { + $process->setEnhanceSigchildCompatibility(true); + } else { + self::$notEnhancedSigchild = true; + } + } + } + + if (self::$process) { + self::$process->stop(0); + } + + return self::$process = $process; + } + + private function skipIfNotEnhancedSigchild($expectException = true) + { + if (self::$sigchild) { + if (!$expectException) { + $this->markTestSkipped('PHP is compiled with --enable-sigchild.'); + } elseif (self::$notEnhancedSigchild) { + if (method_exists($this, 'expectException')) { + $this->expectException('Symfony\Component\Process\Exception\RuntimeException'); + $this->expectExceptionMessage('This PHP has been compiled with --enable-sigchild.'); + } else { + $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild.'); + } + } + } + } +} + +class NonStringifiable +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessUtilsTest.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessUtilsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cdcd3845caaa3c06b8703d0c19aa1f8eb51aad7d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessUtilsTest.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Process\ProcessUtils; + +class ProcessUtilsTest extends TestCase +{ + /** + * @dataProvider dataArguments + */ + public function testEscapeArgument($result, $argument) + { + $this->assertSame($result, ProcessUtils::escapeArgument($argument)); + } + + public function dataArguments() + { + if ('\\' === DIRECTORY_SEPARATOR) { + return array( + array('"\"php\" \"-v\""', '"php" "-v"'), + array('"foo bar"', 'foo bar'), + array('^%"path"^%', '%path%'), + array('"<|>\\" \\"\'f"', '<|>" "\'f'), + array('""', ''), + array('"with\trailingbs\\\\"', 'with\trailingbs\\'), + ); + } + + return array( + array("'\"php\" \"-v\"'", '"php" "-v"'), + array("'foo bar'", 'foo bar'), + array("'%path%'", '%path%'), + array("'<|>\" \"'\\''f'", '<|>" "\'f'), + array("''", ''), + array("'with\\trailingbs\\'", 'with\trailingbs\\'), + array("'withNonAsciiAccentLikeéÉèÈàÀöä'", 'withNonAsciiAccentLikeéÉèÈàÀöä'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/SignalListener.php b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/SignalListener.php new file mode 100644 index 0000000000000000000000000000000000000000..9e30ce3bbbbc657d1fccf1e101aa90bda9e40f98 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/Tests/SignalListener.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +pcntl_signal(SIGUSR1, function () { echo 'SIGUSR1'; exit; }); + +echo 'Caught '; + +$n = 0; + +while ($n++ < 400) { + usleep(10000); + pcntl_signal_dispatch(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Process/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..a9c4a51851593b1e53f0eca1dc1cd3450f7d6916 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/composer.json @@ -0,0 +1,33 @@ +{ + "name": "symfony/process", + "type": "library", + "description": "Symfony Process Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Process\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Process/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Process/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..788500084abf8474b65b4c16cbd7b141f0cd6253 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Process/phpunit.xml.dist @@ -0,0 +1,28 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..574106e521075efd76d36dac084523bb15d2837b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/CHANGELOG.md @@ -0,0 +1,29 @@ +CHANGELOG +========= + +2.7.0 +------ + + * `UnexpectedTypeException` now expects three constructor arguments: The invalid property value, + the `PropertyPathInterface` object and the current index of the property path. + +2.5.0 +------ + + * allowed non alpha numeric characters in second level and deeper object properties names + * [BC BREAK] when accessing an index on an object that does not implement + ArrayAccess, a NoSuchIndexException is now thrown instead of the + semantically wrong NoSuchPropertyException + * [BC BREAK] added isReadable() and isWritable() to PropertyAccessorInterface + +2.3.0 +------ + + * added PropertyAccessorBuilder, to enable or disable the support of "__call" + * added support for "__call" in the PropertyAccessor (disabled by default) + * [BC BREAK] changed PropertyAccessor to continue its search for a property or + method even if a non-public match was found. Before, a PropertyAccessDeniedException + was thrown in this case. Class PropertyAccessDeniedException was removed + now. + * deprecated PropertyAccess::getPropertyAccessor + * added PropertyAccess::createPropertyAccessor and PropertyAccess::createPropertyAccessorBuilder diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/AccessException.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/AccessException.php new file mode 100644 index 0000000000000000000000000000000000000000..b3a854646efce5d600db7b1cc5c65d38b31248ac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/AccessException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Exception; + +/** + * Thrown when a property path is not available. + * + * @author Stéphane Escandell + */ +class AccessException extends RuntimeException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d1fcdac94253c2f8fa45418798ce45ee3e0ac4ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Exception; + +/** + * Marker interface for the PropertyAccess component. + * + * @author Bernhard Schussek + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..47bc7e150dd1852e30a6690108e0c9375d2f0864 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Exception; + +/** + * Base InvalidArgumentException for the PropertyAccess component. + * + * @author Bernhard Schussek + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/InvalidPropertyPathException.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/InvalidPropertyPathException.php new file mode 100644 index 0000000000000000000000000000000000000000..69de31cee49763485f0438d400e57b74cafc55ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/InvalidPropertyPathException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Exception; + +/** + * Thrown when a property path is malformed. + * + * @author Bernhard Schussek + */ +class InvalidPropertyPathException extends RuntimeException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/NoSuchIndexException.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/NoSuchIndexException.php new file mode 100644 index 0000000000000000000000000000000000000000..597b9904a22a0c6dcb837a86de62526e411f2601 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/NoSuchIndexException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Exception; + +/** + * Thrown when an index cannot be found. + * + * @author Stéphane Escandell + */ +class NoSuchIndexException extends AccessException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/NoSuchPropertyException.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/NoSuchPropertyException.php new file mode 100644 index 0000000000000000000000000000000000000000..1c7eda5f83839b3e7eb0860e5698ce21602d013a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/NoSuchPropertyException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Exception; + +/** + * Thrown when a property cannot be found. + * + * @author Bernhard Schussek + */ +class NoSuchPropertyException extends AccessException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/OutOfBoundsException.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/OutOfBoundsException.php new file mode 100644 index 0000000000000000000000000000000000000000..a3c45597dabc19cac8bf51616eca6b2e6c45f991 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/OutOfBoundsException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Exception; + +/** + * Base OutOfBoundsException for the PropertyAccess component. + * + * @author Bernhard Schussek + */ +class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/RuntimeException.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/RuntimeException.php new file mode 100644 index 0000000000000000000000000000000000000000..9fe843e309d8c87765efff1b4297b2d000d3ac54 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/RuntimeException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Exception; + +/** + * Base RuntimeException for the PropertyAccess component. + * + * @author Bernhard Schussek + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/UnexpectedTypeException.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/UnexpectedTypeException.php new file mode 100644 index 0000000000000000000000000000000000000000..d238d3276d17ae258dd287128c46df5af3350862 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Exception/UnexpectedTypeException.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Exception; + +use Symfony\Component\PropertyAccess\PropertyPathInterface; + +/** + * Thrown when a value does not match an expected type. + * + * @author Bernhard Schussek + */ +class UnexpectedTypeException extends RuntimeException +{ + /** + * @param mixed $value The unexpected value found while traversing property path + * @param PropertyPathInterface $path The property path + * @param int $pathIndex The property path index when the unexpected value was found + */ + public function __construct($value, PropertyPathInterface $path, $pathIndex) + { + $message = sprintf( + 'PropertyAccessor requires a graph of objects or arrays to operate on, '. + 'but it found type "%s" while trying to traverse path "%s" at property "%s".', + gettype($value), + (string) $path, + $path->getElement($pathIndex) + ); + + parent::__construct($message); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccess.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccess.php new file mode 100644 index 0000000000000000000000000000000000000000..3c8dc1c56cc1800acf95824194d518c4454b692e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccess.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess; + +/** + * Entry point of the PropertyAccess component. + * + * @author Bernhard Schussek + */ +final class PropertyAccess +{ + /** + * Creates a property accessor with the default configuration. + * + * @return PropertyAccessor + */ + public static function createPropertyAccessor() + { + return self::createPropertyAccessorBuilder()->getPropertyAccessor(); + } + + /** + * Creates a property accessor builder. + * + * @return PropertyAccessorBuilder + */ + public static function createPropertyAccessorBuilder() + { + return new PropertyAccessorBuilder(); + } + + /** + * This class cannot be instantiated. + */ + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php new file mode 100644 index 0000000000000000000000000000000000000000..6019544a19e8c877dc489bbfaac66a06f6f9efc2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -0,0 +1,934 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess; + +use Psr\Cache\CacheItemPoolInterface; +use Psr\Log\LoggerInterface; +use Symfony\Component\Cache\Adapter\AdapterInterface; +use Symfony\Component\Cache\Adapter\ApcuAdapter; +use Symfony\Component\Cache\Adapter\NullAdapter; +use Symfony\Component\Inflector\Inflector; +use Symfony\Component\PropertyAccess\Exception\AccessException; +use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; +use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; +use Symfony\Component\PropertyAccess\Exception\NoSuchIndexException; +use Symfony\Component\PropertyAccess\Exception\UnexpectedTypeException; + +/** + * Default implementation of {@link PropertyAccessorInterface}. + * + * @author Bernhard Schussek + * @author Kévin Dunglas + * @author Nicolas Grekas + */ +class PropertyAccessor implements PropertyAccessorInterface +{ + /** + * @internal + */ + const VALUE = 0; + + /** + * @internal + */ + const REF = 1; + + /** + * @internal + */ + const IS_REF_CHAINED = 2; + + /** + * @internal + */ + const ACCESS_HAS_PROPERTY = 0; + + /** + * @internal + */ + const ACCESS_TYPE = 1; + + /** + * @internal + */ + const ACCESS_NAME = 2; + + /** + * @internal + */ + const ACCESS_REF = 3; + + /** + * @internal + */ + const ACCESS_ADDER = 4; + + /** + * @internal + */ + const ACCESS_REMOVER = 5; + + /** + * @internal + */ + const ACCESS_TYPE_METHOD = 0; + + /** + * @internal + */ + const ACCESS_TYPE_PROPERTY = 1; + + /** + * @internal + */ + const ACCESS_TYPE_MAGIC = 2; + + /** + * @internal + */ + const ACCESS_TYPE_ADDER_AND_REMOVER = 3; + + /** + * @internal + */ + const ACCESS_TYPE_NOT_FOUND = 4; + + /** + * @internal + */ + const CACHE_PREFIX_READ = 'r'; + + /** + * @internal + */ + const CACHE_PREFIX_WRITE = 'w'; + + /** + * @internal + */ + const CACHE_PREFIX_PROPERTY_PATH = 'p'; + + /** + * @var bool + */ + private $magicCall; + + /** + * @var bool + */ + private $ignoreInvalidIndices; + + /** + * @var CacheItemPoolInterface + */ + private $cacheItemPool; + + /** + * @var array + */ + private $readPropertyCache = array(); + + /** + * @var array + */ + private $writePropertyCache = array(); + private static $previousErrorHandler = false; + private static $errorHandler = array(__CLASS__, 'handleError'); + private static $resultProto = array(self::VALUE => null); + + /** + * @var array + */ + private $propertyPathCache = array(); + + /** + * Should not be used by application code. Use + * {@link PropertyAccess::createPropertyAccessor()} instead. + * + * @param bool $magicCall + * @param bool $throwExceptionOnInvalidIndex + * @param CacheItemPoolInterface $cacheItemPool + */ + public function __construct($magicCall = false, $throwExceptionOnInvalidIndex = false, CacheItemPoolInterface $cacheItemPool = null) + { + $this->magicCall = $magicCall; + $this->ignoreInvalidIndices = !$throwExceptionOnInvalidIndex; + $this->cacheItemPool = $cacheItemPool instanceof NullAdapter ? null : $cacheItemPool; // Replace the NullAdapter by the null value + } + + /** + * {@inheritdoc} + */ + public function getValue($objectOrArray, $propertyPath) + { + $propertyPath = $this->getPropertyPath($propertyPath); + + $zval = array( + self::VALUE => $objectOrArray, + ); + $propertyValues = $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength(), $this->ignoreInvalidIndices); + + return $propertyValues[count($propertyValues) - 1][self::VALUE]; + } + + /** + * {@inheritdoc} + */ + public function setValue(&$objectOrArray, $propertyPath, $value) + { + $propertyPath = $this->getPropertyPath($propertyPath); + + $zval = array( + self::VALUE => $objectOrArray, + self::REF => &$objectOrArray, + ); + $propertyValues = $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength() - 1); + $overwrite = true; + + try { + if (PHP_VERSION_ID < 70000 && false === self::$previousErrorHandler) { + self::$previousErrorHandler = set_error_handler(self::$errorHandler); + } + + for ($i = count($propertyValues) - 1; 0 <= $i; --$i) { + $zval = $propertyValues[$i]; + unset($propertyValues[$i]); + + // You only need set value for current element if: + // 1. it's the parent of the last index element + // OR + // 2. its child is not passed by reference + // + // This may avoid uncessary value setting process for array elements. + // For example: + // '[a][b][c]' => 'old-value' + // If you want to change its value to 'new-value', + // you only need set value for '[a][b][c]' and it's safe to ignore '[a][b]' and '[a]' + // + if ($overwrite) { + $property = $propertyPath->getElement($i); + + if ($propertyPath->isIndex($i)) { + if ($overwrite = !isset($zval[self::REF])) { + $ref = &$zval[self::REF]; + $ref = $zval[self::VALUE]; + } + $this->writeIndex($zval, $property, $value); + if ($overwrite) { + $zval[self::VALUE] = $zval[self::REF]; + } + } else { + $this->writeProperty($zval, $property, $value); + } + + // if current element is an object + // OR + // if current element's reference chain is not broken - current element + // as well as all its ancients in the property path are all passed by reference, + // then there is no need to continue the value setting process + if (is_object($zval[self::VALUE]) || isset($zval[self::IS_REF_CHAINED])) { + break; + } + } + + $value = $zval[self::VALUE]; + } + } catch (\TypeError $e) { + self::throwInvalidArgumentException($e->getMessage(), $e->getTrace(), 0); + } finally { + if (PHP_VERSION_ID < 70000 && false !== self::$previousErrorHandler) { + restore_error_handler(); + self::$previousErrorHandler = false; + } + } + } + + /** + * @internal + */ + public static function handleError($type, $message, $file, $line, $context) + { + if (E_RECOVERABLE_ERROR === $type) { + self::throwInvalidArgumentException($message, debug_backtrace(false), 1); + } + + return null !== self::$previousErrorHandler && false !== call_user_func(self::$previousErrorHandler, $type, $message, $file, $line, $context); + } + + private static function throwInvalidArgumentException($message, $trace, $i) + { + if (isset($trace[$i]['file']) && __FILE__ === $trace[$i]['file']) { + $pos = strpos($message, $delim = 'must be of the type ') ?: (strpos($message, $delim = 'must be an instance of ') ?: strpos($message, $delim = 'must implement interface ')); + $pos += strlen($delim); + $type = $trace[$i]['args'][0]; + $type = is_object($type) ? get_class($type) : gettype($type); + + throw new InvalidArgumentException(sprintf('Expected argument of type "%s", "%s" given', substr($message, $pos, strpos($message, ',', $pos) - $pos), $type)); + } + } + + /** + * {@inheritdoc} + */ + public function isReadable($objectOrArray, $propertyPath) + { + if (!$propertyPath instanceof PropertyPathInterface) { + $propertyPath = new PropertyPath($propertyPath); + } + + try { + $zval = array( + self::VALUE => $objectOrArray, + ); + $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength(), $this->ignoreInvalidIndices); + + return true; + } catch (AccessException $e) { + return false; + } catch (UnexpectedTypeException $e) { + return false; + } + } + + /** + * {@inheritdoc} + */ + public function isWritable($objectOrArray, $propertyPath) + { + $propertyPath = $this->getPropertyPath($propertyPath); + + try { + $zval = array( + self::VALUE => $objectOrArray, + ); + $propertyValues = $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength() - 1); + + for ($i = count($propertyValues) - 1; 0 <= $i; --$i) { + $zval = $propertyValues[$i]; + unset($propertyValues[$i]); + + if ($propertyPath->isIndex($i)) { + if (!$zval[self::VALUE] instanceof \ArrayAccess && !is_array($zval[self::VALUE])) { + return false; + } + } else { + if (!$this->isPropertyWritable($zval[self::VALUE], $propertyPath->getElement($i))) { + return false; + } + } + + if (is_object($zval[self::VALUE])) { + return true; + } + } + + return true; + } catch (AccessException $e) { + return false; + } catch (UnexpectedTypeException $e) { + return false; + } + } + + /** + * Reads the path from an object up to a given path index. + * + * @param array $zval The array containing the object or array to read from + * @param PropertyPathInterface $propertyPath The property path to read + * @param int $lastIndex The index up to which should be read + * @param bool $ignoreInvalidIndices Whether to ignore invalid indices or throw an exception + * + * @return array The values read in the path + * + * @throws UnexpectedTypeException If a value within the path is neither object nor array. + * @throws NoSuchIndexException If a non-existing index is accessed + */ + private function readPropertiesUntil($zval, PropertyPathInterface $propertyPath, $lastIndex, $ignoreInvalidIndices = true) + { + if (!is_object($zval[self::VALUE]) && !is_array($zval[self::VALUE])) { + throw new UnexpectedTypeException($zval[self::VALUE], $propertyPath, 0); + } + + // Add the root object to the list + $propertyValues = array($zval); + + for ($i = 0; $i < $lastIndex; ++$i) { + $property = $propertyPath->getElement($i); + $isIndex = $propertyPath->isIndex($i); + + if ($isIndex) { + // Create missing nested arrays on demand + if (($zval[self::VALUE] instanceof \ArrayAccess && !$zval[self::VALUE]->offsetExists($property)) || + (is_array($zval[self::VALUE]) && !isset($zval[self::VALUE][$property]) && !array_key_exists($property, $zval[self::VALUE])) + ) { + if (!$ignoreInvalidIndices) { + if (!is_array($zval[self::VALUE])) { + if (!$zval[self::VALUE] instanceof \Traversable) { + throw new NoSuchIndexException(sprintf( + 'Cannot read index "%s" while trying to traverse path "%s".', + $property, + (string) $propertyPath + )); + } + + $zval[self::VALUE] = iterator_to_array($zval[self::VALUE]); + } + + throw new NoSuchIndexException(sprintf( + 'Cannot read index "%s" while trying to traverse path "%s". Available indices are "%s".', + $property, + (string) $propertyPath, + print_r(array_keys($zval[self::VALUE]), true) + )); + } + + if ($i + 1 < $propertyPath->getLength()) { + if (isset($zval[self::REF])) { + $zval[self::VALUE][$property] = array(); + $zval[self::REF] = $zval[self::VALUE]; + } else { + $zval[self::VALUE] = array($property => array()); + } + } + } + + $zval = $this->readIndex($zval, $property); + } else { + $zval = $this->readProperty($zval, $property); + } + + // the final value of the path must not be validated + if ($i + 1 < $propertyPath->getLength() && !is_object($zval[self::VALUE]) && !is_array($zval[self::VALUE])) { + throw new UnexpectedTypeException($zval[self::VALUE], $propertyPath, $i + 1); + } + + if (isset($zval[self::REF]) && (0 === $i || isset($propertyValues[$i - 1][self::IS_REF_CHAINED]))) { + // Set the IS_REF_CHAINED flag to true if: + // current property is passed by reference and + // it is the first element in the property path or + // the IS_REF_CHAINED flag of its parent element is true + // Basically, this flag is true only when the reference chain from the top element to current element is not broken + $zval[self::IS_REF_CHAINED] = true; + } + + $propertyValues[] = $zval; + } + + return $propertyValues; + } + + /** + * Reads a key from an array-like structure. + * + * @param array $zval The array containing the array or \ArrayAccess object to read from + * @param string|int $index The key to read + * + * @return array The array containing the value of the key + * + * @throws NoSuchIndexException If the array does not implement \ArrayAccess or it is not an array + */ + private function readIndex($zval, $index) + { + if (!$zval[self::VALUE] instanceof \ArrayAccess && !is_array($zval[self::VALUE])) { + throw new NoSuchIndexException(sprintf('Cannot read index "%s" from object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, get_class($zval[self::VALUE]))); + } + + $result = self::$resultProto; + + if (isset($zval[self::VALUE][$index])) { + $result[self::VALUE] = $zval[self::VALUE][$index]; + + if (!isset($zval[self::REF])) { + // Save creating references when doing read-only lookups + } elseif (is_array($zval[self::VALUE])) { + $result[self::REF] = &$zval[self::REF][$index]; + } elseif (is_object($result[self::VALUE])) { + $result[self::REF] = $result[self::VALUE]; + } + } + + return $result; + } + + /** + * Reads the a property from an object. + * + * @param array $zval The array containing the object to read from + * @param string $property The property to read + * + * @return array The array containing the value of the property + * + * @throws NoSuchPropertyException If the property does not exist or is not public. + */ + private function readProperty($zval, $property) + { + if (!is_object($zval[self::VALUE])) { + throw new NoSuchPropertyException(sprintf('Cannot read property "%s" from an array. Maybe you intended to write the property path as "[%s]" instead.', $property, $property)); + } + + $result = self::$resultProto; + $object = $zval[self::VALUE]; + $access = $this->getReadAccessInfo(get_class($object), $property); + + if (self::ACCESS_TYPE_METHOD === $access[self::ACCESS_TYPE]) { + $result[self::VALUE] = $object->{$access[self::ACCESS_NAME]}(); + } elseif (self::ACCESS_TYPE_PROPERTY === $access[self::ACCESS_TYPE]) { + $result[self::VALUE] = $object->{$access[self::ACCESS_NAME]}; + + if ($access[self::ACCESS_REF] && isset($zval[self::REF])) { + $result[self::REF] = &$object->{$access[self::ACCESS_NAME]}; + } + } elseif (!$access[self::ACCESS_HAS_PROPERTY] && property_exists($object, $property)) { + // Needed to support \stdClass instances. We need to explicitly + // exclude $access[self::ACCESS_HAS_PROPERTY], otherwise if + // a *protected* property was found on the class, property_exists() + // returns true, consequently the following line will result in a + // fatal error. + + $result[self::VALUE] = $object->$property; + if (isset($zval[self::REF])) { + $result[self::REF] = &$object->$property; + } + } elseif (self::ACCESS_TYPE_MAGIC === $access[self::ACCESS_TYPE]) { + // we call the getter and hope the __call do the job + $result[self::VALUE] = $object->{$access[self::ACCESS_NAME]}(); + } else { + throw new NoSuchPropertyException($access[self::ACCESS_NAME]); + } + + // Objects are always passed around by reference + if (isset($zval[self::REF]) && is_object($result[self::VALUE])) { + $result[self::REF] = $result[self::VALUE]; + } + + return $result; + } + + /** + * Guesses how to read the property value. + * + * @param string $class + * @param string $property + * + * @return array + */ + private function getReadAccessInfo($class, $property) + { + $key = $class.'..'.$property; + + if (isset($this->readPropertyCache[$key])) { + return $this->readPropertyCache[$key]; + } + + if ($this->cacheItemPool) { + $item = $this->cacheItemPool->getItem(self::CACHE_PREFIX_READ.str_replace('\\', '.', $key)); + if ($item->isHit()) { + return $this->readPropertyCache[$key] = $item->get(); + } + } + + $access = array(); + + $reflClass = new \ReflectionClass($class); + $access[self::ACCESS_HAS_PROPERTY] = $reflClass->hasProperty($property); + $camelProp = $this->camelize($property); + $getter = 'get'.$camelProp; + $getsetter = lcfirst($camelProp); // jQuery style, e.g. read: last(), write: last($item) + $isser = 'is'.$camelProp; + $hasser = 'has'.$camelProp; + + if ($reflClass->hasMethod($getter) && $reflClass->getMethod($getter)->isPublic()) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_METHOD; + $access[self::ACCESS_NAME] = $getter; + } elseif ($reflClass->hasMethod($getsetter) && $reflClass->getMethod($getsetter)->isPublic()) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_METHOD; + $access[self::ACCESS_NAME] = $getsetter; + } elseif ($reflClass->hasMethod($isser) && $reflClass->getMethod($isser)->isPublic()) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_METHOD; + $access[self::ACCESS_NAME] = $isser; + } elseif ($reflClass->hasMethod($hasser) && $reflClass->getMethod($hasser)->isPublic()) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_METHOD; + $access[self::ACCESS_NAME] = $hasser; + } elseif ($reflClass->hasMethod('__get') && $reflClass->getMethod('__get')->isPublic()) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_PROPERTY; + $access[self::ACCESS_NAME] = $property; + $access[self::ACCESS_REF] = false; + } elseif ($access[self::ACCESS_HAS_PROPERTY] && $reflClass->getProperty($property)->isPublic()) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_PROPERTY; + $access[self::ACCESS_NAME] = $property; + $access[self::ACCESS_REF] = true; + } elseif ($this->magicCall && $reflClass->hasMethod('__call') && $reflClass->getMethod('__call')->isPublic()) { + // we call the getter and hope the __call do the job + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_MAGIC; + $access[self::ACCESS_NAME] = $getter; + } else { + $methods = array($getter, $getsetter, $isser, $hasser, '__get'); + if ($this->magicCall) { + $methods[] = '__call'; + } + + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_NOT_FOUND; + $access[self::ACCESS_NAME] = sprintf( + 'Neither the property "%s" nor one of the methods "%s()" '. + 'exist and have public access in class "%s".', + $property, + implode('()", "', $methods), + $reflClass->name + ); + } + + if (isset($item)) { + $this->cacheItemPool->save($item->set($access)); + } + + return $this->readPropertyCache[$key] = $access; + } + + /** + * Sets the value of an index in a given array-accessible value. + * + * @param array $zval The array containing the array or \ArrayAccess object to write to + * @param string|int $index The index to write at + * @param mixed $value The value to write + * + * @throws NoSuchIndexException If the array does not implement \ArrayAccess or it is not an array + */ + private function writeIndex($zval, $index, $value) + { + if (!$zval[self::VALUE] instanceof \ArrayAccess && !is_array($zval[self::VALUE])) { + throw new NoSuchIndexException(sprintf('Cannot modify index "%s" in object of type "%s" because it doesn\'t implement \ArrayAccess', $index, get_class($zval[self::VALUE]))); + } + + $zval[self::REF][$index] = $value; + } + + /** + * Sets the value of a property in the given object. + * + * @param array $zval The array containing the object to write to + * @param string $property The property to write + * @param mixed $value The value to write + * + * @throws NoSuchPropertyException If the property does not exist or is not public. + */ + private function writeProperty($zval, $property, $value) + { + if (!is_object($zval[self::VALUE])) { + throw new NoSuchPropertyException(sprintf('Cannot write property "%s" to an array. Maybe you should write the property path as "[%s]" instead?', $property, $property)); + } + + $object = $zval[self::VALUE]; + $access = $this->getWriteAccessInfo(get_class($object), $property, $value); + + if (self::ACCESS_TYPE_METHOD === $access[self::ACCESS_TYPE]) { + $object->{$access[self::ACCESS_NAME]}($value); + } elseif (self::ACCESS_TYPE_PROPERTY === $access[self::ACCESS_TYPE]) { + $object->{$access[self::ACCESS_NAME]} = $value; + } elseif (self::ACCESS_TYPE_ADDER_AND_REMOVER === $access[self::ACCESS_TYPE]) { + $this->writeCollection($zval, $property, $value, $access[self::ACCESS_ADDER], $access[self::ACCESS_REMOVER]); + } elseif (!$access[self::ACCESS_HAS_PROPERTY] && property_exists($object, $property)) { + // Needed to support \stdClass instances. We need to explicitly + // exclude $access[self::ACCESS_HAS_PROPERTY], otherwise if + // a *protected* property was found on the class, property_exists() + // returns true, consequently the following line will result in a + // fatal error. + + $object->$property = $value; + } elseif (self::ACCESS_TYPE_MAGIC === $access[self::ACCESS_TYPE]) { + $object->{$access[self::ACCESS_NAME]}($value); + } elseif (self::ACCESS_TYPE_NOT_FOUND === $access[self::ACCESS_TYPE]) { + throw new NoSuchPropertyException(sprintf('Could not determine access type for property "%s".', $property)); + } else { + throw new NoSuchPropertyException($access[self::ACCESS_NAME]); + } + } + + /** + * Adjusts a collection-valued property by calling add*() and remove*() methods. + * + * @param array $zval The array containing the object to write to + * @param string $property The property to write + * @param array|\Traversable $collection The collection to write + * @param string $addMethod The add*() method + * @param string $removeMethod The remove*() method + */ + private function writeCollection($zval, $property, $collection, $addMethod, $removeMethod) + { + // At this point the add and remove methods have been found + $previousValue = $this->readProperty($zval, $property); + $previousValue = $previousValue[self::VALUE]; + + if ($previousValue instanceof \Traversable) { + $previousValue = iterator_to_array($previousValue); + } + if ($previousValue && is_array($previousValue)) { + if (is_object($collection)) { + $collection = iterator_to_array($collection); + } + foreach ($previousValue as $key => $item) { + if (!in_array($item, $collection, true)) { + unset($previousValue[$key]); + $zval[self::VALUE]->{$removeMethod}($item); + } + } + } else { + $previousValue = false; + } + + foreach ($collection as $item) { + if (!$previousValue || !in_array($item, $previousValue, true)) { + $zval[self::VALUE]->{$addMethod}($item); + } + } + } + + /** + * Guesses how to write the property value. + * + * @param string $class + * @param string $property + * @param mixed $value + * + * @return array + */ + private function getWriteAccessInfo($class, $property, $value) + { + $key = $class.'..'.$property; + + if (isset($this->writePropertyCache[$key])) { + return $this->writePropertyCache[$key]; + } + + if ($this->cacheItemPool) { + $item = $this->cacheItemPool->getItem(self::CACHE_PREFIX_WRITE.str_replace('\\', '.', $key)); + if ($item->isHit()) { + return $this->writePropertyCache[$key] = $item->get(); + } + } + + $access = array(); + + $reflClass = new \ReflectionClass($class); + $access[self::ACCESS_HAS_PROPERTY] = $reflClass->hasProperty($property); + $camelized = $this->camelize($property); + $singulars = (array) Inflector::singularize($camelized); + + if (is_array($value) || $value instanceof \Traversable) { + $methods = $this->findAdderAndRemover($reflClass, $singulars); + + if (null !== $methods) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_ADDER_AND_REMOVER; + $access[self::ACCESS_ADDER] = $methods[0]; + $access[self::ACCESS_REMOVER] = $methods[1]; + } + } + + if (!isset($access[self::ACCESS_TYPE])) { + $setter = 'set'.$camelized; + $getsetter = lcfirst($camelized); // jQuery style, e.g. read: last(), write: last($item) + + if ($this->isMethodAccessible($reflClass, $setter, 1)) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_METHOD; + $access[self::ACCESS_NAME] = $setter; + } elseif ($this->isMethodAccessible($reflClass, $getsetter, 1)) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_METHOD; + $access[self::ACCESS_NAME] = $getsetter; + } elseif ($this->isMethodAccessible($reflClass, '__set', 2)) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_PROPERTY; + $access[self::ACCESS_NAME] = $property; + } elseif ($access[self::ACCESS_HAS_PROPERTY] && $reflClass->getProperty($property)->isPublic()) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_PROPERTY; + $access[self::ACCESS_NAME] = $property; + } elseif ($this->magicCall && $this->isMethodAccessible($reflClass, '__call', 2)) { + // we call the getter and hope the __call do the job + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_MAGIC; + $access[self::ACCESS_NAME] = $setter; + } elseif (null !== $methods = $this->findAdderAndRemover($reflClass, $singulars)) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_NOT_FOUND; + $access[self::ACCESS_NAME] = sprintf( + 'The property "%s" in class "%s" can be defined with the methods "%s()" but '. + 'the new value must be an array or an instance of \Traversable, '. + '"%s" given.', + $property, + $reflClass->name, + implode('()", "', $methods), + is_object($value) ? get_class($value) : gettype($value) + ); + } else { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_NOT_FOUND; + $access[self::ACCESS_NAME] = sprintf( + 'Neither the property "%s" nor one of the methods %s"%s()", "%s()", '. + '"__set()" or "__call()" exist and have public access in class "%s".', + $property, + implode('', array_map(function ($singular) { + return '"add'.$singular.'()"/"remove'.$singular.'()", '; + }, $singulars)), + $setter, + $getsetter, + $reflClass->name + ); + } + } + + if (isset($item)) { + $this->cacheItemPool->save($item->set($access)); + } + + return $this->writePropertyCache[$key] = $access; + } + + /** + * Returns whether a property is writable in the given object. + * + * @param object $object The object to write to + * @param string $property The property to write + * + * @return bool Whether the property is writable + */ + private function isPropertyWritable($object, $property) + { + if (!is_object($object)) { + return false; + } + + $access = $this->getWriteAccessInfo(get_class($object), $property, array()); + + return self::ACCESS_TYPE_METHOD === $access[self::ACCESS_TYPE] + || self::ACCESS_TYPE_PROPERTY === $access[self::ACCESS_TYPE] + || self::ACCESS_TYPE_ADDER_AND_REMOVER === $access[self::ACCESS_TYPE] + || (!$access[self::ACCESS_HAS_PROPERTY] && property_exists($object, $property)) + || self::ACCESS_TYPE_MAGIC === $access[self::ACCESS_TYPE]; + } + + /** + * Camelizes a given string. + * + * @param string $string Some string + * + * @return string The camelized version of the string + */ + private function camelize($string) + { + return str_replace(' ', '', ucwords(str_replace('_', ' ', $string))); + } + + /** + * Searches for add and remove methods. + * + * @param \ReflectionClass $reflClass The reflection class for the given object + * @param array $singulars The singular form of the property name or null + * + * @return array|null An array containing the adder and remover when found, null otherwise + */ + private function findAdderAndRemover(\ReflectionClass $reflClass, array $singulars) + { + foreach ($singulars as $singular) { + $addMethod = 'add'.$singular; + $removeMethod = 'remove'.$singular; + + $addMethodFound = $this->isMethodAccessible($reflClass, $addMethod, 1); + $removeMethodFound = $this->isMethodAccessible($reflClass, $removeMethod, 1); + + if ($addMethodFound && $removeMethodFound) { + return array($addMethod, $removeMethod); + } + } + } + + /** + * Returns whether a method is public and has the number of required parameters. + * + * @param \ReflectionClass $class The class of the method + * @param string $methodName The method name + * @param int $parameters The number of parameters + * + * @return bool Whether the method is public and has $parameters required parameters + */ + private function isMethodAccessible(\ReflectionClass $class, $methodName, $parameters) + { + if ($class->hasMethod($methodName)) { + $method = $class->getMethod($methodName); + + if ($method->isPublic() + && $method->getNumberOfRequiredParameters() <= $parameters + && $method->getNumberOfParameters() >= $parameters) { + return true; + } + } + + return false; + } + + /** + * Gets a PropertyPath instance and caches it. + * + * @param string|PropertyPath $propertyPath + * + * @return PropertyPath + */ + private function getPropertyPath($propertyPath) + { + if ($propertyPath instanceof PropertyPathInterface) { + // Don't call the copy constructor has it is not needed here + return $propertyPath; + } + + if (isset($this->propertyPathCache[$propertyPath])) { + return $this->propertyPathCache[$propertyPath]; + } + + if ($this->cacheItemPool) { + $item = $this->cacheItemPool->getItem(self::CACHE_PREFIX_PROPERTY_PATH.$propertyPath); + if ($item->isHit()) { + return $this->propertyPathCache[$propertyPath] = $item->get(); + } + } + + $propertyPathInstance = new PropertyPath($propertyPath); + if (isset($item)) { + $item->set($propertyPathInstance); + $this->cacheItemPool->save($item); + } + + return $this->propertyPathCache[$propertyPath] = $propertyPathInstance; + } + + /** + * Creates the APCu adapter if applicable. + * + * @param string $namespace + * @param int $defaultLifetime + * @param string $version + * @param LoggerInterface|null $logger + * + * @return AdapterInterface + * + * @throws RuntimeException When the Cache Component isn't available + */ + public static function createCache($namespace, $defaultLifetime, $version, LoggerInterface $logger = null) + { + if (!class_exists('Symfony\Component\Cache\Adapter\ApcuAdapter')) { + throw new \RuntimeException(sprintf('The Symfony Cache component must be installed to use %s().', __METHOD__)); + } + + if (!ApcuAdapter::isSupported()) { + return new NullAdapter(); + } + + $apcu = new ApcuAdapter($namespace, $defaultLifetime / 5, $version); + if (null !== $logger) { + $apcu->setLogger($logger); + } + + return $apcu; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..93fb0d917664820501bdf2eaa8645441796e7b7b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess; + +use Psr\Cache\CacheItemPoolInterface; + +/** + * A configurable builder to create a PropertyAccessor. + * + * @author Jérémie Augustin + */ +class PropertyAccessorBuilder +{ + /** + * @var bool + */ + private $magicCall = false; + + /** + * @var bool + */ + private $throwExceptionOnInvalidIndex = false; + + /** + * @var CacheItemPoolInterface|null + */ + private $cacheItemPool; + + /** + * Enables the use of "__call" by the PropertyAccessor. + * + * @return $this + */ + public function enableMagicCall() + { + $this->magicCall = true; + + return $this; + } + + /** + * Disables the use of "__call" by the PropertyAccessor. + * + * @return $this + */ + public function disableMagicCall() + { + $this->magicCall = false; + + return $this; + } + + /** + * @return bool whether the use of "__call" by the PropertyAccessor is enabled + */ + public function isMagicCallEnabled() + { + return $this->magicCall; + } + + /** + * Enables exceptions when reading a non-existing index. + * + * This has no influence on writing non-existing indices with PropertyAccessorInterface::setValue() + * which are always created on-the-fly. + * + * @return $this + */ + public function enableExceptionOnInvalidIndex() + { + $this->throwExceptionOnInvalidIndex = true; + + return $this; + } + + /** + * Disables exceptions when reading a non-existing index. + * + * Instead, null is returned when calling PropertyAccessorInterface::getValue() on a non-existing index. + * + * @return $this + */ + public function disableExceptionOnInvalidIndex() + { + $this->throwExceptionOnInvalidIndex = false; + + return $this; + } + + /** + * @return bool whether an exception is thrown or null is returned when reading a non-existing index + */ + public function isExceptionOnInvalidIndexEnabled() + { + return $this->throwExceptionOnInvalidIndex; + } + + /** + * Sets a cache system. + * + * @param CacheItemPoolInterface|null $cacheItemPool + * + * @return PropertyAccessorBuilder The builder object + */ + public function setCacheItemPool(CacheItemPoolInterface $cacheItemPool = null) + { + $this->cacheItemPool = $cacheItemPool; + + return $this; + } + + /** + * Gets the used cache system. + * + * @return CacheItemPoolInterface|null + */ + public function getCacheItemPool() + { + return $this->cacheItemPool; + } + + /** + * Builds and returns a new PropertyAccessor object. + * + * @return PropertyAccessorInterface The built PropertyAccessor + */ + public function getPropertyAccessor() + { + return new PropertyAccessor($this->magicCall, $this->throwExceptionOnInvalidIndex, $this->cacheItemPool); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..51fa0cc76f7db9fb43b79ac36652d53671572976 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.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\PropertyAccess; + +/** + * Writes and reads values to/from an object/array graph. + * + * @author Bernhard Schussek + */ +interface PropertyAccessorInterface +{ + /** + * Sets the value at the end of the property path of the object graph. + * + * Example: + * + * use Symfony\Component\PropertyAccess\PropertyAccess; + * + * $propertyAccessor = PropertyAccess::createPropertyAccessor(); + * + * echo $propertyAccessor->setValue($object, 'child.name', 'Fabien'); + * // equals echo $object->getChild()->setName('Fabien'); + * + * This method first tries to find a public setter for each property in the + * path. The name of the setter must be the camel-cased property name + * prefixed with "set". + * + * If the setter does not exist, this method tries to find a public + * property. The value of the property is then changed. + * + * If neither is found, an exception is thrown. + * + * @param object|array $objectOrArray The object or array to modify + * @param string|PropertyPathInterface $propertyPath The property path to modify + * @param mixed $value The value to set at the end of the property path + * + * @throws Exception\InvalidArgumentException If the property path is invalid + * @throws Exception\AccessException If a property/index does not exist or is not public + * @throws Exception\UnexpectedTypeException If a value within the path is neither object nor array + */ + public function setValue(&$objectOrArray, $propertyPath, $value); + + /** + * Returns the value at the end of the property path of the object graph. + * + * Example: + * + * use Symfony\Component\PropertyAccess\PropertyAccess; + * + * $propertyAccessor = PropertyAccess::createPropertyAccessor(); + * + * echo $propertyAccessor->getValue($object, 'child.name); + * // equals echo $object->getChild()->getName(); + * + * This method first tries to find a public getter for each property in the + * path. The name of the getter must be the camel-cased property name + * prefixed with "get", "is", or "has". + * + * If the getter does not exist, this method tries to find a public + * property. The value of the property is then returned. + * + * If none of them are found, an exception is thrown. + * + * @param object|array $objectOrArray The object or array to traverse + * @param string|PropertyPathInterface $propertyPath The property path to read + * + * @return mixed The value at the end of the property path + * + * @throws Exception\InvalidArgumentException If the property path is invalid + * @throws Exception\AccessException If a property/index does not exist or is not public + * @throws Exception\UnexpectedTypeException If a value within the path is neither object + * nor array + */ + public function getValue($objectOrArray, $propertyPath); + + /** + * Returns whether a value can be written at a given property path. + * + * Whenever this method returns true, {@link setValue()} is guaranteed not + * to throw an exception when called with the same arguments. + * + * @param object|array $objectOrArray The object or array to check + * @param string|PropertyPathInterface $propertyPath The property path to check + * + * @return bool Whether the value can be set + * + * @throws Exception\InvalidArgumentException If the property path is invalid + */ + public function isWritable($objectOrArray, $propertyPath); + + /** + * Returns whether a property path can be read from an object graph. + * + * Whenever this method returns true, {@link getValue()} is guaranteed not + * to throw an exception when called with the same arguments. + * + * @param object|array $objectOrArray The object or array to check + * @param string|PropertyPathInterface $propertyPath The property path to check + * + * @return bool Whether the property path can be read + * + * @throws Exception\InvalidArgumentException If the property path is invalid + */ + public function isReadable($objectOrArray, $propertyPath); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPath.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPath.php new file mode 100644 index 0000000000000000000000000000000000000000..e020182c3479d442af77f25f8d6a12a10bcdd493 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPath.php @@ -0,0 +1,217 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess; + +use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; +use Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException; +use Symfony\Component\PropertyAccess\Exception\OutOfBoundsException; + +/** + * Default implementation of {@link PropertyPathInterface}. + * + * @author Bernhard Schussek + */ +class PropertyPath implements \IteratorAggregate, PropertyPathInterface +{ + /** + * Character used for separating between plural and singular of an element. + * + * @var string + */ + const SINGULAR_SEPARATOR = '|'; + + /** + * The elements of the property path. + * + * @var array + */ + private $elements = array(); + + /** + * The number of elements in the property path. + * + * @var int + */ + private $length; + + /** + * Contains a Boolean for each property in $elements denoting whether this + * element is an index. It is a property otherwise. + * + * @var array + */ + private $isIndex = array(); + + /** + * String representation of the path. + * + * @var string + */ + private $pathAsString; + + /** + * Constructs a property path from a string. + * + * @param PropertyPath|string $propertyPath The property path as string or instance + * + * @throws InvalidArgumentException If the given path is not a string + * @throws InvalidPropertyPathException If the syntax of the property path is not valid + */ + public function __construct($propertyPath) + { + // Can be used as copy constructor + if ($propertyPath instanceof self) { + /* @var PropertyPath $propertyPath */ + $this->elements = $propertyPath->elements; + $this->length = $propertyPath->length; + $this->isIndex = $propertyPath->isIndex; + $this->pathAsString = $propertyPath->pathAsString; + + return; + } + if (!is_string($propertyPath)) { + throw new InvalidArgumentException(sprintf( + 'The property path constructor needs a string or an instance of '. + '"Symfony\Component\PropertyAccess\PropertyPath". '. + 'Got: "%s"', + is_object($propertyPath) ? get_class($propertyPath) : gettype($propertyPath) + )); + } + + if ('' === $propertyPath) { + throw new InvalidPropertyPathException('The property path should not be empty.'); + } + + $this->pathAsString = $propertyPath; + $position = 0; + $remaining = $propertyPath; + + // first element is evaluated differently - no leading dot for properties + $pattern = '/^(([^\.\[]++)|\[([^\]]++)\])(.*)/'; + + while (preg_match($pattern, $remaining, $matches)) { + if ('' !== $matches[2]) { + $element = $matches[2]; + $this->isIndex[] = false; + } else { + $element = $matches[3]; + $this->isIndex[] = true; + } + + $this->elements[] = $element; + + $position += strlen($matches[1]); + $remaining = $matches[4]; + $pattern = '/^(\.([^\.|\[]++)|\[([^\]]++)\])(.*)/'; + } + + if ('' !== $remaining) { + throw new InvalidPropertyPathException(sprintf( + 'Could not parse property path "%s". Unexpected token "%s" at position %d', + $propertyPath, + $remaining[0], + $position + )); + } + + $this->length = count($this->elements); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return $this->pathAsString; + } + + /** + * {@inheritdoc} + */ + public function getLength() + { + return $this->length; + } + + /** + * {@inheritdoc} + */ + public function getParent() + { + if ($this->length <= 1) { + return; + } + + $parent = clone $this; + + --$parent->length; + $parent->pathAsString = substr($parent->pathAsString, 0, max(strrpos($parent->pathAsString, '.'), strrpos($parent->pathAsString, '['))); + array_pop($parent->elements); + array_pop($parent->isIndex); + + return $parent; + } + + /** + * Returns a new iterator for this path. + * + * @return PropertyPathIteratorInterface + */ + public function getIterator() + { + return new PropertyPathIterator($this); + } + + /** + * {@inheritdoc} + */ + public function getElements() + { + return $this->elements; + } + + /** + * {@inheritdoc} + */ + public function getElement($index) + { + if (!isset($this->elements[$index])) { + throw new OutOfBoundsException(sprintf('The index %s is not within the property path', $index)); + } + + return $this->elements[$index]; + } + + /** + * {@inheritdoc} + */ + public function isProperty($index) + { + if (!isset($this->isIndex[$index])) { + throw new OutOfBoundsException(sprintf('The index %s is not within the property path', $index)); + } + + return !$this->isIndex[$index]; + } + + /** + * {@inheritdoc} + */ + public function isIndex($index) + { + if (!isset($this->isIndex[$index])) { + throw new OutOfBoundsException(sprintf('The index %s is not within the property path', $index)); + } + + return $this->isIndex[$index]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..57751bf13e7417a10ffa9b8372a79e32e9910e49 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php @@ -0,0 +1,306 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess; + +use Symfony\Component\PropertyAccess\Exception\OutOfBoundsException; + +/** + * @author Bernhard Schussek + */ +class PropertyPathBuilder +{ + /** + * @var array + */ + private $elements = array(); + + /** + * @var array + */ + private $isIndex = array(); + + /** + * Creates a new property path builder. + * + * @param null|PropertyPathInterface|string $path The path to initially store + * in the builder. Optional. + */ + public function __construct($path = null) + { + if (null !== $path) { + $this->append($path); + } + } + + /** + * Appends a (sub-) path to the current path. + * + * @param PropertyPathInterface|string $path The path to append + * @param int $offset The offset where the appended + * piece starts in $path. + * @param int $length The length of the appended piece + * If 0, the full path is appended. + */ + public function append($path, $offset = 0, $length = 0) + { + if (is_string($path)) { + $path = new PropertyPath($path); + } + + if (0 === $length) { + $end = $path->getLength(); + } else { + $end = $offset + $length; + } + + for (; $offset < $end; ++$offset) { + $this->elements[] = $path->getElement($offset); + $this->isIndex[] = $path->isIndex($offset); + } + } + + /** + * Appends an index element to the current path. + * + * @param string $name The name of the appended index + */ + public function appendIndex($name) + { + $this->elements[] = $name; + $this->isIndex[] = true; + } + + /** + * Appends a property element to the current path. + * + * @param string $name The name of the appended property + */ + public function appendProperty($name) + { + $this->elements[] = $name; + $this->isIndex[] = false; + } + + /** + * Removes elements from the current path. + * + * @param int $offset The offset at which to remove + * @param int $length The length of the removed piece + * + * @throws OutOfBoundsException if offset is invalid + */ + public function remove($offset, $length = 1) + { + if (!isset($this->elements[$offset])) { + throw new OutOfBoundsException(sprintf('The offset %s is not within the property path', $offset)); + } + + $this->resize($offset, $length, 0); + } + + /** + * Replaces a sub-path by a different (sub-) path. + * + * @param int $offset The offset at which to replace + * @param int $length The length of the piece to replace + * @param PropertyPathInterface|string $path The path to insert + * @param int $pathOffset The offset where the inserted piece + * starts in $path. + * @param int $pathLength The length of the inserted piece + * If 0, the full path is inserted. + * + * @throws OutOfBoundsException If the offset is invalid + */ + public function replace($offset, $length, $path, $pathOffset = 0, $pathLength = 0) + { + if (is_string($path)) { + $path = new PropertyPath($path); + } + + if ($offset < 0 && abs($offset) <= $this->getLength()) { + $offset = $this->getLength() + $offset; + } elseif (!isset($this->elements[$offset])) { + throw new OutOfBoundsException('The offset '.$offset.' is not within the property path'); + } + + if (0 === $pathLength) { + $pathLength = $path->getLength() - $pathOffset; + } + + $this->resize($offset, $length, $pathLength); + + for ($i = 0; $i < $pathLength; ++$i) { + $this->elements[$offset + $i] = $path->getElement($pathOffset + $i); + $this->isIndex[$offset + $i] = $path->isIndex($pathOffset + $i); + } + ksort($this->elements); + } + + /** + * Replaces a property element by an index element. + * + * @param int $offset The offset at which to replace + * @param string $name The new name of the element. Optional + * + * @throws OutOfBoundsException If the offset is invalid + */ + public function replaceByIndex($offset, $name = null) + { + if (!isset($this->elements[$offset])) { + throw new OutOfBoundsException(sprintf('The offset %s is not within the property path', $offset)); + } + + if (null !== $name) { + $this->elements[$offset] = $name; + } + + $this->isIndex[$offset] = true; + } + + /** + * Replaces an index element by a property element. + * + * @param int $offset The offset at which to replace + * @param string $name The new name of the element. Optional + * + * @throws OutOfBoundsException If the offset is invalid + */ + public function replaceByProperty($offset, $name = null) + { + if (!isset($this->elements[$offset])) { + throw new OutOfBoundsException(sprintf('The offset %s is not within the property path', $offset)); + } + + if (null !== $name) { + $this->elements[$offset] = $name; + } + + $this->isIndex[$offset] = false; + } + + /** + * Returns the length of the current path. + * + * @return int The path length + */ + public function getLength() + { + return count($this->elements); + } + + /** + * Returns the current property path. + * + * @return PropertyPathInterface The constructed property path + */ + public function getPropertyPath() + { + $pathAsString = $this->__toString(); + + return '' !== $pathAsString ? new PropertyPath($pathAsString) : null; + } + + /** + * Returns the current property path as string. + * + * @return string The property path as string + */ + public function __toString() + { + $string = ''; + + foreach ($this->elements as $offset => $element) { + if ($this->isIndex[$offset]) { + $element = '['.$element.']'; + } elseif ('' !== $string) { + $string .= '.'; + } + + $string .= $element; + } + + return $string; + } + + /** + * Resizes the path so that a chunk of length $cutLength is + * removed at $offset and another chunk of length $insertionLength + * can be inserted. + * + * @param int $offset The offset where the removed chunk starts + * @param int $cutLength The length of the removed chunk + * @param int $insertionLength The length of the inserted chunk + */ + private function resize($offset, $cutLength, $insertionLength) + { + // Nothing else to do in this case + if ($insertionLength === $cutLength) { + return; + } + + $length = count($this->elements); + + if ($cutLength > $insertionLength) { + // More elements should be removed than inserted + $diff = $cutLength - $insertionLength; + $newLength = $length - $diff; + + // Shift elements to the left (left-to-right until the new end) + // Max allowed offset to be shifted is such that + // $offset + $diff < $length (otherwise invalid index access) + // i.e. $offset < $length - $diff = $newLength + for ($i = $offset; $i < $newLength; ++$i) { + $this->elements[$i] = $this->elements[$i + $diff]; + $this->isIndex[$i] = $this->isIndex[$i + $diff]; + } + + // All remaining elements should be removed + for (; $i < $length; ++$i) { + unset($this->elements[$i], $this->isIndex[$i]); + } + } else { + $diff = $insertionLength - $cutLength; + + $newLength = $length + $diff; + $indexAfterInsertion = $offset + $insertionLength; + + // $diff <= $insertionLength + // $indexAfterInsertion >= $insertionLength + // => $diff <= $indexAfterInsertion + + // In each of the following loops, $i >= $diff must hold, + // otherwise ($i - $diff) becomes negative. + + // Shift old elements to the right to make up space for the + // inserted elements. This needs to be done left-to-right in + // order to preserve an ascending array index order + // Since $i = max($length, $indexAfterInsertion) and $indexAfterInsertion >= $diff, + // $i >= $diff is guaranteed. + for ($i = max($length, $indexAfterInsertion); $i < $newLength; ++$i) { + $this->elements[$i] = $this->elements[$i - $diff]; + $this->isIndex[$i] = $this->isIndex[$i - $diff]; + } + + // Shift remaining elements to the right. Do this right-to-left + // so we don't overwrite elements before copying them + // The last written index is the immediate index after the inserted + // string, because the indices before that will be overwritten + // anyway. + // Since $i >= $indexAfterInsertion and $indexAfterInsertion >= $diff, + // $i >= $diff is guaranteed. + for ($i = $length - 1; $i >= $indexAfterInsertion; --$i) { + $this->elements[$i] = $this->elements[$i - $diff]; + $this->isIndex[$i] = $this->isIndex[$i - $diff]; + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathInterface.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b627ebc41653ed2043205b920fd76ccb2a151dea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathInterface.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess; + +/** + * A sequence of property names or array indices. + * + * @author Bernhard Schussek + */ +interface PropertyPathInterface extends \Traversable +{ + /** + * Returns the string representation of the property path. + * + * @return string The path as string + */ + public function __toString(); + + /** + * Returns the length of the property path, i.e. the number of elements. + * + * @return int The path length + */ + public function getLength(); + + /** + * Returns the parent property path. + * + * The parent property path is the one that contains the same items as + * this one except for the last one. + * + * If this property path only contains one item, null is returned. + * + * @return PropertyPath The parent path or null + */ + public function getParent(); + + /** + * Returns the elements of the property path as array. + * + * @return array An array of property/index names + */ + public function getElements(); + + /** + * Returns the element at the given index in the property path. + * + * @param int $index The index key + * + * @return string A property or index name + * + * @throws Exception\OutOfBoundsException If the offset is invalid + */ + public function getElement($index); + + /** + * Returns whether the element at the given index is a property. + * + * @param int $index The index in the property path + * + * @return bool Whether the element at this index is a property + * + * @throws Exception\OutOfBoundsException If the offset is invalid + */ + public function isProperty($index); + + /** + * Returns whether the element at the given index is an array index. + * + * @param int $index The index in the property path + * + * @return bool Whether the element at this index is an array index + * + * @throws Exception\OutOfBoundsException If the offset is invalid + */ + public function isIndex($index); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathIterator.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathIterator.php new file mode 100644 index 0000000000000000000000000000000000000000..b49e77e271835694e53bf19d6c98ef2ad662b17e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathIterator.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess; + +/** + * Traverses a property path and provides additional methods to find out + * information about the current element. + * + * @author Bernhard Schussek + */ +class PropertyPathIterator extends \ArrayIterator implements PropertyPathIteratorInterface +{ + /** + * The traversed property path. + * + * @var PropertyPathInterface + */ + protected $path; + + /** + * Constructor. + * + * @param PropertyPathInterface $path The property path to traverse + */ + public function __construct(PropertyPathInterface $path) + { + parent::__construct($path->getElements()); + + $this->path = $path; + } + + /** + * {@inheritdoc} + */ + public function isIndex() + { + return $this->path->isIndex($this->key()); + } + + /** + * {@inheritdoc} + */ + public function isProperty() + { + return $this->path->isProperty($this->key()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathIteratorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathIteratorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..79b1bbfe828e4d993cc6edd3adb2ff28eb997e71 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyPathIteratorInterface.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess; + +/** + * @author Bernhard Schussek + */ +interface PropertyPathIteratorInterface extends \Iterator, \SeekableIterator +{ + /** + * Returns whether the current element in the property path is an array + * index. + * + * @return bool + */ + public function isIndex(); + + /** + * Returns whether the current element in the property path is a property + * name. + * + * @return bool + */ + public function isProperty(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/README.md b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1959fd9e934922e33f2c59dffe416a4af40438fa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/README.md @@ -0,0 +1,14 @@ +PropertyAccess Component +======================== + +The PropertyAccess component provides function to read and write from/to an +object or array using a simple string notation. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/property_access/index.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/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/StringUtil.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/StringUtil.php new file mode 100644 index 0000000000000000000000000000000000000000..2c5cc45e885509f6dbea2a5fb9a51f779d425f60 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/StringUtil.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess; + +use Symfony\Component\Inflector\Inflector; + +/** + * Creates singulars from plurals. + * + * @author Bernhard Schussek + * + * @deprecated Deprecated since version 3.1, to be removed in 4.0. Use {@see Symfony\Component\Inflector\Inflector} instead. + */ +class StringUtil +{ + /** + * This class should not be instantiated. + */ + private function __construct() + { + } + + /** + * Returns the singular form of a word. + * + * If the method can't determine the form with certainty, an array of the + * possible singulars is returned. + * + * @param string $plural A word in plural form + * + * @return string|array The singular form or an array of possible singular + * forms + * + * @deprecated Deprecated since version 3.1, to be removed in 4.0. Use {@see Symfony\Component\Inflector\Inflector::singularize} instead. + */ + public static function singularify($plural) + { + @trigger_error('StringUtil::singularify() is deprecated since version 3.1 and will be removed in 4.0. Use Symfony\Component\Inflector\Inflector::singularize instead.', E_USER_DEPRECATED); + + return Inflector::singularize($plural); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/NonTraversableArrayObject.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/NonTraversableArrayObject.php new file mode 100644 index 0000000000000000000000000000000000000000..fd00a730b831e292dd1cdfb222a41b04c8d7b037 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/NonTraversableArrayObject.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\Component\PropertyAccess\Tests\Fixtures; + +/** + * This class is a hand written simplified version of PHP native `ArrayObject` + * class, to show that it behaves differently than the PHP native implementation. + */ +class NonTraversableArrayObject implements \ArrayAccess, \Countable, \Serializable +{ + private $array; + + public function __construct(array $array = null) + { + $this->array = $array ?: array(); + } + + public function offsetExists($offset) + { + return array_key_exists($offset, $this->array); + } + + public function offsetGet($offset) + { + return $this->array[$offset]; + } + + public function offsetSet($offset, $value) + { + if (null === $offset) { + $this->array[] = $value; + } else { + $this->array[$offset] = $value; + } + } + + public function offsetUnset($offset) + { + unset($this->array[$offset]); + } + + public function count() + { + return count($this->array); + } + + public function serialize() + { + return serialize($this->array); + } + + public function unserialize($serialized) + { + $this->array = (array) unserialize((string) $serialized); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClass.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClass.php new file mode 100644 index 0000000000000000000000000000000000000000..e63af3a8bac5d6f16112fef963c0d427f394b8a8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClass.php @@ -0,0 +1,187 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests\Fixtures; + +class TestClass +{ + public $publicProperty; + protected $protectedProperty; + private $privateProperty; + + private $publicAccessor; + private $publicMethodAccessor; + private $publicGetSetter; + private $publicAccessorWithDefaultValue; + private $publicAccessorWithRequiredAndDefaultValue; + private $publicAccessorWithMoreRequiredParameters; + private $publicIsAccessor; + private $publicHasAccessor; + private $publicGetter; + private $date; + + public function __construct($value) + { + $this->publicProperty = $value; + $this->publicAccessor = $value; + $this->publicMethodAccessor = $value; + $this->publicGetSetter = $value; + $this->publicAccessorWithDefaultValue = $value; + $this->publicAccessorWithRequiredAndDefaultValue = $value; + $this->publicAccessorWithMoreRequiredParameters = $value; + $this->publicIsAccessor = $value; + $this->publicHasAccessor = $value; + $this->publicGetter = $value; + } + + public function setPublicAccessor($value) + { + $this->publicAccessor = $value; + } + + public function setPublicAccessorWithDefaultValue($value = null) + { + $this->publicAccessorWithDefaultValue = $value; + } + + public function setPublicAccessorWithRequiredAndDefaultValue($value, $optional = null) + { + $this->publicAccessorWithRequiredAndDefaultValue = $value; + } + + public function setPublicAccessorWithMoreRequiredParameters($value, $needed) + { + $this->publicAccessorWithMoreRequiredParameters = $value; + } + + public function getPublicAccessor() + { + return $this->publicAccessor; + } + + public function getPublicAccessorWithDefaultValue() + { + return $this->publicAccessorWithDefaultValue; + } + + public function getPublicAccessorWithRequiredAndDefaultValue() + { + return $this->publicAccessorWithRequiredAndDefaultValue; + } + + public function getPublicAccessorWithMoreRequiredParameters() + { + return $this->publicAccessorWithMoreRequiredParameters; + } + + public function setPublicIsAccessor($value) + { + $this->publicIsAccessor = $value; + } + + public function isPublicIsAccessor() + { + return $this->publicIsAccessor; + } + + public function setPublicHasAccessor($value) + { + $this->publicHasAccessor = $value; + } + + public function hasPublicHasAccessor() + { + return $this->publicHasAccessor; + } + + public function publicGetSetter($value = null) + { + if (null !== $value) { + $this->publicGetSetter = $value; + } + + return $this->publicGetSetter; + } + + public function getPublicMethodMutator() + { + return $this->publicGetSetter; + } + + protected function setProtectedAccessor($value) + { + } + + protected function getProtectedAccessor() + { + return 'foobar'; + } + + protected function setProtectedIsAccessor($value) + { + } + + protected function isProtectedIsAccessor() + { + return 'foobar'; + } + + protected function setProtectedHasAccessor($value) + { + } + + protected function hasProtectedHasAccessor() + { + return 'foobar'; + } + + private function setPrivateAccessor($value) + { + } + + private function getPrivateAccessor() + { + return 'foobar'; + } + + private function setPrivateIsAccessor($value) + { + } + + private function isPrivateIsAccessor() + { + return 'foobar'; + } + + private function setPrivateHasAccessor($value) + { + } + + private function hasPrivateHasAccessor() + { + return 'foobar'; + } + + public function getPublicGetter() + { + return $this->publicGetter; + } + + public function setDate(\DateTimeInterface $date) + { + $this->date = $date; + } + + public function getDate() + { + return $this->date; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassIsWritable.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassIsWritable.php new file mode 100644 index 0000000000000000000000000000000000000000..4e966cdacb39e808a24722526e1081277fad56cb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassIsWritable.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\PropertyAccess\Tests\Fixtures; + +class TestClassIsWritable +{ + protected $value; + + public function getValue() + { + return $this->value; + } + + public function __construct($value) + { + $this->value = $value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassMagicCall.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassMagicCall.php new file mode 100644 index 0000000000000000000000000000000000000000..0d6c1f0ba97d964763a3a5742c009bbadfa48e59 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassMagicCall.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests\Fixtures; + +class TestClassMagicCall +{ + private $magicCallProperty; + + public function __construct($value) + { + $this->magicCallProperty = $value; + } + + public function __call($method, array $args) + { + if ('getMagicCallProperty' === $method) { + return $this->magicCallProperty; + } + + if ('getConstantMagicCallProperty' === $method) { + return 'constant value'; + } + + if ('setMagicCallProperty' === $method) { + $this->magicCallProperty = reset($args); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassMagicGet.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassMagicGet.php new file mode 100644 index 0000000000000000000000000000000000000000..e4653253053b98c285c12188585e10ce91792213 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassMagicGet.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests\Fixtures; + +class TestClassMagicGet +{ + private $magicProperty; + + public $publicProperty; + + public function __construct($value) + { + $this->magicProperty = $value; + } + + public function __set($property, $value) + { + if ('magicProperty' === $property) { + $this->magicProperty = $value; + } + } + + public function __get($property) + { + if ('magicProperty' === $property) { + return $this->magicProperty; + } + + if ('constantMagicProperty' === $property) { + return 'constant value'; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassSetValue.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassSetValue.php new file mode 100644 index 0000000000000000000000000000000000000000..f0a7f1f47ca97035e5c7937e90f4cbaf73a78b26 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassSetValue.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\Component\PropertyAccess\Tests\Fixtures; + +class TestClassSetValue +{ + protected $value; + + public function getValue() + { + return $this->value; + } + + public function setValue($value) + { + $this->value = $value; + } + + public function __construct($value) + { + $this->value = $value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/Ticket5775Object.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/Ticket5775Object.php new file mode 100644 index 0000000000000000000000000000000000000000..5954dc37de92adb9ddf1b5aef8e2205cb7795af1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/Ticket5775Object.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests\Fixtures; + +class Ticket5775Object +{ + private $property; + + public function getProperty() + { + return $this->property; + } + + private function setProperty() + { + } + + public function __set($property, $value) + { + $this->$property = $value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TraversableArrayObject.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TraversableArrayObject.php new file mode 100644 index 0000000000000000000000000000000000000000..3bd9795e6b25605500586496e971e6b299515cf6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TraversableArrayObject.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests\Fixtures; + +/** + * This class is a hand written simplified version of PHP native `ArrayObject` + * class, to show that it behaves differently than the PHP native implementation. + */ +class TraversableArrayObject implements \ArrayAccess, \IteratorAggregate, \Countable, \Serializable +{ + private $array; + + public function __construct(array $array = null) + { + $this->array = $array ?: array(); + } + + public function offsetExists($offset) + { + return array_key_exists($offset, $this->array); + } + + public function offsetGet($offset) + { + return $this->array[$offset]; + } + + public function offsetSet($offset, $value) + { + if (null === $offset) { + $this->array[] = $value; + } else { + $this->array[$offset] = $value; + } + } + + public function offsetUnset($offset) + { + unset($this->array[$offset]); + } + + public function getIterator() + { + return new \ArrayIterator($this->array); + } + + public function count() + { + return count($this->array); + } + + public function serialize() + { + return serialize($this->array); + } + + public function unserialize($serialized) + { + $this->array = (array) unserialize((string) $serialized); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TypeHinted.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TypeHinted.php new file mode 100644 index 0000000000000000000000000000000000000000..ce0f3d89aaa30cd9fe91df33d615da7f589cb79f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TypeHinted.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests\Fixtures; + +/** + * @author Kévin Dunglas + */ +class TypeHinted +{ + private $date; + + /** + * @var \Countable + */ + private $countable; + + public function setDate(\DateTime $date) + { + $this->date = $date; + } + + public function getDate() + { + return $this->date; + } + + /** + * @return \Countable + */ + public function getCountable() + { + return $this->countable; + } + + /** + * @param \Countable $countable + */ + public function setCountable(\Countable $countable) + { + $this->countable = $countable; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b0ed69c85953e5e4feb388fe076615adb88db34b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\PropertyAccess\PropertyAccess; +use Symfony\Component\PropertyAccess\PropertyAccessor; + +abstract class PropertyAccessorArrayAccessTest extends TestCase +{ + /** + * @var PropertyAccessor + */ + protected $propertyAccessor; + + protected function setUp() + { + $this->propertyAccessor = new PropertyAccessor(); + } + + abstract protected function getContainer(array $array); + + public function getValidPropertyPaths() + { + return array( + array($this->getContainer(array('firstName' => 'Bernhard')), '[firstName]', 'Bernhard'), + array($this->getContainer(array('person' => $this->getContainer(array('firstName' => 'Bernhard')))), '[person][firstName]', 'Bernhard'), + ); + } + + /** + * @dataProvider getValidPropertyPaths + */ + public function testGetValue($collection, $path, $value) + { + $this->assertSame($value, $this->propertyAccessor->getValue($collection, $path)); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchIndexException + */ + public function testGetValueFailsIfNoSuchIndex() + { + $this->propertyAccessor = PropertyAccess::createPropertyAccessorBuilder() + ->enableExceptionOnInvalidIndex() + ->getPropertyAccessor(); + + $object = $this->getContainer(array('firstName' => 'Bernhard')); + + $this->propertyAccessor->getValue($object, '[lastName]'); + } + + /** + * @dataProvider getValidPropertyPaths + */ + public function testSetValue($collection, $path) + { + $this->propertyAccessor->setValue($collection, $path, 'Updated'); + + $this->assertSame('Updated', $this->propertyAccessor->getValue($collection, $path)); + } + + /** + * @dataProvider getValidPropertyPaths + */ + public function testIsReadable($collection, $path) + { + $this->assertTrue($this->propertyAccessor->isReadable($collection, $path)); + } + + /** + * @dataProvider getValidPropertyPaths + */ + public function testIsWritable($collection, $path) + { + $this->assertTrue($this->propertyAccessor->isWritable($collection, $path)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayObjectTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayObjectTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fb0b383789ba507287c1aeaf429e7a092ca1174e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayObjectTest.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\PropertyAccess\Tests; + +class PropertyAccessorArrayObjectTest extends PropertyAccessorCollectionTest +{ + protected function getContainer(array $array) + { + return new \ArrayObject($array); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c982826344cec819327c0b025822e017f075ee7f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayTest.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\PropertyAccess\Tests; + +class PropertyAccessorArrayTest extends PropertyAccessorCollectionTest +{ + protected function getContainer(array $array) + { + return $array; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..63bd64225039aab961cc41d66f044f3572e88afd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorBuilderTest.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\PropertyAccess\PropertyAccessor; +use Symfony\Component\PropertyAccess\PropertyAccessorBuilder; + +class PropertyAccessorBuilderTest extends TestCase +{ + /** + * @var PropertyAccessorBuilder + */ + protected $builder; + + protected function setUp() + { + $this->builder = new PropertyAccessorBuilder(); + } + + protected function tearDown() + { + $this->builder = null; + } + + public function testEnableMagicCall() + { + $this->assertSame($this->builder, $this->builder->enableMagicCall()); + } + + public function testDisableMagicCall() + { + $this->assertSame($this->builder, $this->builder->disableMagicCall()); + } + + public function testIsMagicCallEnable() + { + $this->assertFalse($this->builder->isMagicCallEnabled()); + $this->assertTrue($this->builder->enableMagicCall()->isMagicCallEnabled()); + $this->assertFalse($this->builder->disableMagicCall()->isMagicCallEnabled()); + } + + public function testGetPropertyAccessor() + { + $this->assertInstanceOf(PropertyAccessor::class, $this->builder->getPropertyAccessor()); + $this->assertInstanceOf(PropertyAccessor::class, $this->builder->enableMagicCall()->getPropertyAccessor()); + } + + public function testUseCache() + { + $cacheItemPool = new ArrayAdapter(); + $this->builder->setCacheItemPool($cacheItemPool); + $this->assertEquals($cacheItemPool, $this->builder->getCacheItemPool()); + $this->assertInstanceOf(PropertyAccessor::class, $this->builder->getPropertyAccessor()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b4dc05dac323f48dc68b2df3320b7fb0400c7a11 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php @@ -0,0 +1,200 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests; + +class PropertyAccessorCollectionTest_Car +{ + private $axes; + + public function __construct($axes = null) + { + $this->axes = $axes; + } + + // In the test, use a name that StringUtil can't uniquely singularify + public function addAxis($axis) + { + $this->axes[] = $axis; + } + + public function removeAxis($axis) + { + foreach ($this->axes as $key => $value) { + if ($value === $axis) { + unset($this->axes[$key]); + + return; + } + } + } + + public function getAxes() + { + return $this->axes; + } +} + +class PropertyAccessorCollectionTest_CarOnlyAdder +{ + public function addAxis($axis) + { + } + + public function getAxes() + { + } +} + +class PropertyAccessorCollectionTest_CarOnlyRemover +{ + public function removeAxis($axis) + { + } + + public function getAxes() + { + } +} + +class PropertyAccessorCollectionTest_CarNoAdderAndRemover +{ + public function getAxes() + { + } +} + +class PropertyAccessorCollectionTest_CompositeCar +{ + public function getStructure() + { + } + + public function setStructure($structure) + { + } +} + +class PropertyAccessorCollectionTest_CarStructure +{ + public function addAxis($axis) + { + } + + public function removeAxis($axis) + { + } + + public function getAxes() + { + } +} + +abstract class PropertyAccessorCollectionTest extends PropertyAccessorArrayAccessTest +{ + public function testSetValueCallsAdderAndRemoverForCollections() + { + $axesBefore = $this->getContainer(array(1 => 'second', 3 => 'fourth', 4 => 'fifth')); + $axesMerged = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third')); + $axesAfter = $this->getContainer(array(1 => 'second', 5 => 'first', 6 => 'third')); + $axesMergedCopy = is_object($axesMerged) ? clone $axesMerged : $axesMerged; + + // Don't use a mock in order to test whether the collections are + // modified while iterating them + $car = new PropertyAccessorCollectionTest_Car($axesBefore); + + $this->propertyAccessor->setValue($car, 'axes', $axesMerged); + + $this->assertEquals($axesAfter, $car->getAxes()); + + // The passed collection was not modified + $this->assertEquals($axesMergedCopy, $axesMerged); + } + + public function testSetValueCallsAdderAndRemoverForNestedCollections() + { + $car = $this->getMockBuilder(__CLASS__.'_CompositeCar')->getMock(); + $structure = $this->getMockBuilder(__CLASS__.'_CarStructure')->getMock(); + $axesBefore = $this->getContainer(array(1 => 'second', 3 => 'fourth')); + $axesAfter = $this->getContainer(array(0 => 'first', 1 => 'second', 2 => 'third')); + + $car->expects($this->any()) + ->method('getStructure') + ->will($this->returnValue($structure)); + + $structure->expects($this->at(0)) + ->method('getAxes') + ->will($this->returnValue($axesBefore)); + $structure->expects($this->at(1)) + ->method('removeAxis') + ->with('fourth'); + $structure->expects($this->at(2)) + ->method('addAxis') + ->with('first'); + $structure->expects($this->at(3)) + ->method('addAxis') + ->with('third'); + + $this->propertyAccessor->setValue($car, 'structure.axes', $axesAfter); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException + * @expectedExceptionMessage Could not determine access type for property "axes". + */ + public function testSetValueFailsIfNoAdderNorRemoverFound() + { + $car = $this->getMockBuilder(__CLASS__.'_CarNoAdderAndRemover')->getMock(); + $axesBefore = $this->getContainer(array(1 => 'second', 3 => 'fourth')); + $axesAfter = $this->getContainer(array(0 => 'first', 1 => 'second', 2 => 'third')); + + $car->expects($this->any()) + ->method('getAxes') + ->will($this->returnValue($axesBefore)); + + $this->propertyAccessor->setValue($car, 'axes', $axesAfter); + } + + public function testIsWritableReturnsTrueIfAdderAndRemoverExists() + { + $car = $this->getMockBuilder(__CLASS__.'_Car')->getMock(); + $this->assertTrue($this->propertyAccessor->isWritable($car, 'axes')); + } + + public function testIsWritableReturnsFalseIfOnlyAdderExists() + { + $car = $this->getMockBuilder(__CLASS__.'_CarOnlyAdder')->getMock(); + $this->assertFalse($this->propertyAccessor->isWritable($car, 'axes')); + } + + public function testIsWritableReturnsFalseIfOnlyRemoverExists() + { + $car = $this->getMockBuilder(__CLASS__.'_CarOnlyRemover')->getMock(); + $this->assertFalse($this->propertyAccessor->isWritable($car, 'axes')); + } + + public function testIsWritableReturnsFalseIfNoAdderNorRemoverExists() + { + $car = $this->getMockBuilder(__CLASS__.'_CarNoAdderAndRemover')->getMock(); + $this->assertFalse($this->propertyAccessor->isWritable($car, 'axes')); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException + * expectedExceptionMessageRegExp /The property "axes" in class "Mock_PropertyAccessorCollectionTest_Car[^"]*" can be defined with the methods "addAxis()", "removeAxis()" but the new value must be an array or an instance of \Traversable, "string" given./ + */ + public function testSetValueFailsIfAdderAndRemoverExistButValueIsNotTraversable() + { + $car = $this->getMockBuilder(__CLASS__.'_Car')->getMock(); + + $this->propertyAccessor->setValue($car, 'axes', 'Not an array or Traversable'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorNonTraversableArrayObjectTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorNonTraversableArrayObjectTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6910d8be7031b7349d89034dfef83b14f0e27f69 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorNonTraversableArrayObjectTest.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests; + +use Symfony\Component\PropertyAccess\Tests\Fixtures\NonTraversableArrayObject; + +class PropertyAccessorNonTraversableArrayObjectTest extends PropertyAccessorArrayAccessTest +{ + protected function getContainer(array $array) + { + return new NonTraversableArrayObject($array); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e2ef9296ed50fc8ad1a3cccfc302fa167c6822b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php @@ -0,0 +1,581 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\PropertyAccess\Exception\NoSuchIndexException; +use Symfony\Component\PropertyAccess\PropertyAccessor; +use Symfony\Component\PropertyAccess\Tests\Fixtures\TestClass; +use Symfony\Component\PropertyAccess\Tests\Fixtures\TestClassMagicCall; +use Symfony\Component\PropertyAccess\Tests\Fixtures\TestClassMagicGet; +use Symfony\Component\PropertyAccess\Tests\Fixtures\Ticket5775Object; +use Symfony\Component\PropertyAccess\Tests\Fixtures\TestClassSetValue; +use Symfony\Component\PropertyAccess\Tests\Fixtures\TestClassIsWritable; +use Symfony\Component\PropertyAccess\Tests\Fixtures\TypeHinted; + +class PropertyAccessorTest extends TestCase +{ + /** + * @var PropertyAccessor + */ + private $propertyAccessor; + + protected function setUp() + { + $this->propertyAccessor = new PropertyAccessor(); + } + + public function getPathsWithUnexpectedType() + { + return array( + array('', 'foobar'), + array('foo', 'foobar'), + array(null, 'foobar'), + array(123, 'foobar'), + array((object) array('prop' => null), 'prop.foobar'), + array((object) array('prop' => (object) array('subProp' => null)), 'prop.subProp.foobar'), + array(array('index' => null), '[index][foobar]'), + array(array('index' => array('subIndex' => null)), '[index][subIndex][foobar]'), + ); + } + + public function getPathsWithMissingProperty() + { + return array( + array((object) array('firstName' => 'Bernhard'), 'lastName'), + array((object) array('property' => (object) array('firstName' => 'Bernhard')), 'property.lastName'), + array(array('index' => (object) array('firstName' => 'Bernhard')), '[index].lastName'), + array(new TestClass('Bernhard'), 'protectedProperty'), + array(new TestClass('Bernhard'), 'privateProperty'), + array(new TestClass('Bernhard'), 'protectedAccessor'), + array(new TestClass('Bernhard'), 'protectedIsAccessor'), + array(new TestClass('Bernhard'), 'protectedHasAccessor'), + array(new TestClass('Bernhard'), 'privateAccessor'), + array(new TestClass('Bernhard'), 'privateIsAccessor'), + array(new TestClass('Bernhard'), 'privateHasAccessor'), + + // Properties are not camelized + array(new TestClass('Bernhard'), 'public_property'), + ); + } + + public function getPathsWithMissingIndex() + { + return array( + array(array('firstName' => 'Bernhard'), '[lastName]'), + array(array(), '[index][lastName]'), + array(array('index' => array()), '[index][lastName]'), + array(array('index' => array('firstName' => 'Bernhard')), '[index][lastName]'), + array((object) array('property' => array('firstName' => 'Bernhard')), 'property[lastName]'), + ); + } + + /** + * @dataProvider getValidPropertyPaths + */ + public function testGetValue($objectOrArray, $path, $value) + { + $this->assertSame($value, $this->propertyAccessor->getValue($objectOrArray, $path)); + } + + /** + * @dataProvider getPathsWithMissingProperty + * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException + */ + public function testGetValueThrowsExceptionIfPropertyNotFound($objectOrArray, $path) + { + $this->propertyAccessor->getValue($objectOrArray, $path); + } + + /** + * @dataProvider getPathsWithMissingIndex + */ + public function testGetValueThrowsNoExceptionIfIndexNotFound($objectOrArray, $path) + { + $this->assertNull($this->propertyAccessor->getValue($objectOrArray, $path)); + } + + /** + * @dataProvider getPathsWithMissingIndex + * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchIndexException + */ + public function testGetValueThrowsExceptionIfIndexNotFoundAndIndexExceptionsEnabled($objectOrArray, $path) + { + $this->propertyAccessor = new PropertyAccessor(false, true); + $this->propertyAccessor->getValue($objectOrArray, $path); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchIndexException + */ + public function testGetValueThrowsExceptionIfNotArrayAccess() + { + $this->propertyAccessor->getValue(new \stdClass(), '[index]'); + } + + public function testGetValueReadsMagicGet() + { + $this->assertSame('Bernhard', $this->propertyAccessor->getValue(new TestClassMagicGet('Bernhard'), 'magicProperty')); + } + + public function testGetValueReadsArrayWithMissingIndexForCustomPropertyPath() + { + $object = new \ArrayObject(); + $array = array('child' => array('index' => $object)); + + $this->assertNull($this->propertyAccessor->getValue($array, '[child][index][foo][bar]')); + $this->assertSame(array(), $object->getArrayCopy()); + } + + // https://github.com/symfony/symfony/pull/4450 + public function testGetValueReadsMagicGetThatReturnsConstant() + { + $this->assertSame('constant value', $this->propertyAccessor->getValue(new TestClassMagicGet('Bernhard'), 'constantMagicProperty')); + } + + public function testGetValueNotModifyObject() + { + $object = new \stdClass(); + $object->firstName = array('Bernhard'); + + $this->assertNull($this->propertyAccessor->getValue($object, 'firstName[1]')); + $this->assertSame(array('Bernhard'), $object->firstName); + } + + public function testGetValueNotModifyObjectException() + { + $propertyAccessor = new PropertyAccessor(false, true); + $object = new \stdClass(); + $object->firstName = array('Bernhard'); + + try { + $propertyAccessor->getValue($object, 'firstName[1]'); + } catch (NoSuchIndexException $e) { + } + + $this->assertSame(array('Bernhard'), $object->firstName); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException + */ + public function testGetValueDoesNotReadMagicCallByDefault() + { + $this->propertyAccessor->getValue(new TestClassMagicCall('Bernhard'), 'magicCallProperty'); + } + + public function testGetValueReadsMagicCallIfEnabled() + { + $this->propertyAccessor = new PropertyAccessor(true); + + $this->assertSame('Bernhard', $this->propertyAccessor->getValue(new TestClassMagicCall('Bernhard'), 'magicCallProperty')); + } + + // https://github.com/symfony/symfony/pull/4450 + public function testGetValueReadsMagicCallThatReturnsConstant() + { + $this->propertyAccessor = new PropertyAccessor(true); + + $this->assertSame('constant value', $this->propertyAccessor->getValue(new TestClassMagicCall('Bernhard'), 'constantMagicCallProperty')); + } + + /** + * @dataProvider getPathsWithUnexpectedType + * @expectedException \Symfony\Component\PropertyAccess\Exception\UnexpectedTypeException + * @expectedExceptionMessage PropertyAccessor requires a graph of objects or arrays to operate on + */ + public function testGetValueThrowsExceptionIfNotObjectOrArray($objectOrArray, $path) + { + $this->propertyAccessor->getValue($objectOrArray, $path); + } + + /** + * @dataProvider getValidPropertyPaths + */ + public function testSetValue($objectOrArray, $path) + { + $this->propertyAccessor->setValue($objectOrArray, $path, 'Updated'); + + $this->assertSame('Updated', $this->propertyAccessor->getValue($objectOrArray, $path)); + } + + /** + * @dataProvider getPathsWithMissingProperty + * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException + */ + public function testSetValueThrowsExceptionIfPropertyNotFound($objectOrArray, $path) + { + $this->propertyAccessor->setValue($objectOrArray, $path, 'Updated'); + } + + /** + * @dataProvider getPathsWithMissingIndex + */ + public function testSetValueThrowsNoExceptionIfIndexNotFound($objectOrArray, $path) + { + $this->propertyAccessor->setValue($objectOrArray, $path, 'Updated'); + + $this->assertSame('Updated', $this->propertyAccessor->getValue($objectOrArray, $path)); + } + + /** + * @dataProvider getPathsWithMissingIndex + */ + public function testSetValueThrowsNoExceptionIfIndexNotFoundAndIndexExceptionsEnabled($objectOrArray, $path) + { + $this->propertyAccessor = new PropertyAccessor(false, true); + $this->propertyAccessor->setValue($objectOrArray, $path, 'Updated'); + + $this->assertSame('Updated', $this->propertyAccessor->getValue($objectOrArray, $path)); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchIndexException + */ + public function testSetValueThrowsExceptionIfNotArrayAccess() + { + $object = new \stdClass(); + + $this->propertyAccessor->setValue($object, '[index]', 'Updated'); + } + + public function testSetValueUpdatesMagicSet() + { + $author = new TestClassMagicGet('Bernhard'); + + $this->propertyAccessor->setValue($author, 'magicProperty', 'Updated'); + + $this->assertEquals('Updated', $author->__get('magicProperty')); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException + */ + public function testSetValueThrowsExceptionIfThereAreMissingParameters() + { + $object = new TestClass('Bernhard'); + + $this->propertyAccessor->setValue($object, 'publicAccessorWithMoreRequiredParameters', 'Updated'); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException + */ + public function testSetValueDoesNotUpdateMagicCallByDefault() + { + $author = new TestClassMagicCall('Bernhard'); + + $this->propertyAccessor->setValue($author, 'magicCallProperty', 'Updated'); + } + + public function testSetValueUpdatesMagicCallIfEnabled() + { + $this->propertyAccessor = new PropertyAccessor(true); + + $author = new TestClassMagicCall('Bernhard'); + + $this->propertyAccessor->setValue($author, 'magicCallProperty', 'Updated'); + + $this->assertEquals('Updated', $author->__call('getMagicCallProperty', array())); + } + + /** + * @dataProvider getPathsWithUnexpectedType + * @expectedException \Symfony\Component\PropertyAccess\Exception\UnexpectedTypeException + * @expectedExceptionMessage PropertyAccessor requires a graph of objects or arrays to operate on + */ + public function testSetValueThrowsExceptionIfNotObjectOrArray($objectOrArray, $path) + { + $this->propertyAccessor->setValue($objectOrArray, $path, 'value'); + } + + public function testGetValueWhenArrayValueIsNull() + { + $this->propertyAccessor = new PropertyAccessor(false, true); + $this->assertNull($this->propertyAccessor->getValue(array('index' => array('nullable' => null)), '[index][nullable]')); + } + + /** + * @dataProvider getValidPropertyPaths + */ + public function testIsReadable($objectOrArray, $path) + { + $this->assertTrue($this->propertyAccessor->isReadable($objectOrArray, $path)); + } + + /** + * @dataProvider getPathsWithMissingProperty + */ + public function testIsReadableReturnsFalseIfPropertyNotFound($objectOrArray, $path) + { + $this->assertFalse($this->propertyAccessor->isReadable($objectOrArray, $path)); + } + + /** + * @dataProvider getPathsWithMissingIndex + */ + public function testIsReadableReturnsTrueIfIndexNotFound($objectOrArray, $path) + { + // Non-existing indices can be read. In this case, null is returned + $this->assertTrue($this->propertyAccessor->isReadable($objectOrArray, $path)); + } + + /** + * @dataProvider getPathsWithMissingIndex + */ + public function testIsReadableReturnsFalseIfIndexNotFoundAndIndexExceptionsEnabled($objectOrArray, $path) + { + $this->propertyAccessor = new PropertyAccessor(false, true); + + // When exceptions are enabled, non-existing indices cannot be read + $this->assertFalse($this->propertyAccessor->isReadable($objectOrArray, $path)); + } + + public function testIsReadableRecognizesMagicGet() + { + $this->assertTrue($this->propertyAccessor->isReadable(new TestClassMagicGet('Bernhard'), 'magicProperty')); + } + + public function testIsReadableDoesNotRecognizeMagicCallByDefault() + { + $this->assertFalse($this->propertyAccessor->isReadable(new TestClassMagicCall('Bernhard'), 'magicCallProperty')); + } + + public function testIsReadableRecognizesMagicCallIfEnabled() + { + $this->propertyAccessor = new PropertyAccessor(true); + + $this->assertTrue($this->propertyAccessor->isReadable(new TestClassMagicCall('Bernhard'), 'magicCallProperty')); + } + + /** + * @dataProvider getPathsWithUnexpectedType + */ + public function testIsReadableReturnsFalseIfNotObjectOrArray($objectOrArray, $path) + { + $this->assertFalse($this->propertyAccessor->isReadable($objectOrArray, $path)); + } + + /** + * @dataProvider getValidPropertyPaths + */ + public function testIsWritable($objectOrArray, $path) + { + $this->assertTrue($this->propertyAccessor->isWritable($objectOrArray, $path)); + } + + /** + * @dataProvider getPathsWithMissingProperty + */ + public function testIsWritableReturnsFalseIfPropertyNotFound($objectOrArray, $path) + { + $this->assertFalse($this->propertyAccessor->isWritable($objectOrArray, $path)); + } + + /** + * @dataProvider getPathsWithMissingIndex + */ + public function testIsWritableReturnsTrueIfIndexNotFound($objectOrArray, $path) + { + // Non-existing indices can be written. Arrays are created on-demand. + $this->assertTrue($this->propertyAccessor->isWritable($objectOrArray, $path)); + } + + /** + * @dataProvider getPathsWithMissingIndex + */ + public function testIsWritableReturnsTrueIfIndexNotFoundAndIndexExceptionsEnabled($objectOrArray, $path) + { + $this->propertyAccessor = new PropertyAccessor(false, true); + + // Non-existing indices can be written even if exceptions are enabled + $this->assertTrue($this->propertyAccessor->isWritable($objectOrArray, $path)); + } + + public function testIsWritableRecognizesMagicSet() + { + $this->assertTrue($this->propertyAccessor->isWritable(new TestClassMagicGet('Bernhard'), 'magicProperty')); + } + + public function testIsWritableDoesNotRecognizeMagicCallByDefault() + { + $this->assertFalse($this->propertyAccessor->isWritable(new TestClassMagicCall('Bernhard'), 'magicCallProperty')); + } + + public function testIsWritableRecognizesMagicCallIfEnabled() + { + $this->propertyAccessor = new PropertyAccessor(true); + + $this->assertTrue($this->propertyAccessor->isWritable(new TestClassMagicCall('Bernhard'), 'magicCallProperty')); + } + + /** + * @dataProvider getPathsWithUnexpectedType + */ + public function testIsWritableReturnsFalseIfNotObjectOrArray($objectOrArray, $path) + { + $this->assertFalse($this->propertyAccessor->isWritable($objectOrArray, $path)); + } + + public function getValidPropertyPaths() + { + return array( + array(array('Bernhard', 'Schussek'), '[0]', 'Bernhard'), + array(array('Bernhard', 'Schussek'), '[1]', 'Schussek'), + array(array('firstName' => 'Bernhard'), '[firstName]', 'Bernhard'), + array(array('index' => array('firstName' => 'Bernhard')), '[index][firstName]', 'Bernhard'), + array((object) array('firstName' => 'Bernhard'), 'firstName', 'Bernhard'), + array((object) array('property' => array('firstName' => 'Bernhard')), 'property[firstName]', 'Bernhard'), + array(array('index' => (object) array('firstName' => 'Bernhard')), '[index].firstName', 'Bernhard'), + array((object) array('property' => (object) array('firstName' => 'Bernhard')), 'property.firstName', 'Bernhard'), + + // Accessor methods + array(new TestClass('Bernhard'), 'publicProperty', 'Bernhard'), + array(new TestClass('Bernhard'), 'publicAccessor', 'Bernhard'), + array(new TestClass('Bernhard'), 'publicAccessorWithDefaultValue', 'Bernhard'), + array(new TestClass('Bernhard'), 'publicAccessorWithRequiredAndDefaultValue', 'Bernhard'), + array(new TestClass('Bernhard'), 'publicIsAccessor', 'Bernhard'), + array(new TestClass('Bernhard'), 'publicHasAccessor', 'Bernhard'), + array(new TestClass('Bernhard'), 'publicGetSetter', 'Bernhard'), + + // Methods are camelized + array(new TestClass('Bernhard'), 'public_accessor', 'Bernhard'), + array(new TestClass('Bernhard'), '_public_accessor', 'Bernhard'), + + // Missing indices + array(array('index' => array()), '[index][firstName]', null), + array(array('root' => array('index' => array())), '[root][index][firstName]', null), + + // Special chars + array(array('%!@$§.' => 'Bernhard'), '[%!@$§.]', 'Bernhard'), + array(array('index' => array('%!@$§.' => 'Bernhard')), '[index][%!@$§.]', 'Bernhard'), + array((object) array('%!@$§' => 'Bernhard'), '%!@$§', 'Bernhard'), + array((object) array('property' => (object) array('%!@$§' => 'Bernhard')), 'property.%!@$§', 'Bernhard'), + + // nested objects and arrays + array(array('foo' => new TestClass('bar')), '[foo].publicGetSetter', 'bar'), + array(new TestClass(array('foo' => 'bar')), 'publicGetSetter[foo]', 'bar'), + array(new TestClass(new TestClass('bar')), 'publicGetter.publicGetSetter', 'bar'), + array(new TestClass(array('foo' => new TestClass('bar'))), 'publicGetter[foo].publicGetSetter', 'bar'), + array(new TestClass(new TestClass(new TestClass('bar'))), 'publicGetter.publicGetter.publicGetSetter', 'bar'), + array(new TestClass(array('foo' => array('baz' => new TestClass('bar')))), 'publicGetter[foo][baz].publicGetSetter', 'bar'), + ); + } + + public function testTicket5755() + { + $object = new Ticket5775Object(); + + $this->propertyAccessor->setValue($object, 'property', 'foobar'); + + $this->assertEquals('foobar', $object->getProperty()); + } + + public function testSetValueDeepWithMagicGetter() + { + $obj = new TestClassMagicGet('foo'); + $obj->publicProperty = array('foo' => array('bar' => 'some_value')); + $this->propertyAccessor->setValue($obj, 'publicProperty[foo][bar]', 'Updated'); + $this->assertSame('Updated', $obj->publicProperty['foo']['bar']); + } + + public function getReferenceChainObjectsForSetValue() + { + return array( + array(array('a' => array('b' => array('c' => 'old-value'))), '[a][b][c]', 'new-value'), + array(new TestClassSetValue(new TestClassSetValue('old-value')), 'value.value', 'new-value'), + array(new TestClassSetValue(array('a' => array('b' => array('c' => new TestClassSetValue('old-value'))))), 'value[a][b][c].value', 'new-value'), + array(new TestClassSetValue(array('a' => array('b' => 'old-value'))), 'value[a][b]', 'new-value'), + array(new \ArrayIterator(array('a' => array('b' => array('c' => 'old-value')))), '[a][b][c]', 'new-value'), + ); + } + + /** + * @dataProvider getReferenceChainObjectsForSetValue + */ + public function testSetValueForReferenceChainIssue($object, $path, $value) + { + $this->propertyAccessor->setValue($object, $path, $value); + + $this->assertEquals($value, $this->propertyAccessor->getValue($object, $path)); + } + + public function getReferenceChainObjectsForIsWritable() + { + return array( + array(new TestClassIsWritable(array('a' => array('b' => 'old-value'))), 'value[a][b]', false), + array(new TestClassIsWritable(new \ArrayIterator(array('a' => array('b' => 'old-value')))), 'value[a][b]', true), + array(new TestClassIsWritable(array('a' => array('b' => array('c' => new TestClassSetValue('old-value'))))), 'value[a][b][c].value', true), + ); + } + + /** + * @dataProvider getReferenceChainObjectsForIsWritable + */ + public function testIsWritableForReferenceChainIssue($object, $path, $value) + { + $this->assertEquals($value, $this->propertyAccessor->isWritable($object, $path)); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidArgumentException + * @expectedExceptionMessage Expected argument of type "DateTime", "string" given + */ + public function testThrowTypeError() + { + $object = new TypeHinted(); + + $this->propertyAccessor->setValue($object, 'date', 'This is a string, \DateTime expected.'); + } + + public function testSetTypeHint() + { + $date = new \DateTime(); + $object = new TypeHinted(); + + $this->propertyAccessor->setValue($object, 'date', $date); + $this->assertSame($date, $object->getDate()); + } + + public function testArrayNotBeeingOverwritten() + { + $value = array('value1' => 'foo', 'value2' => 'bar'); + $object = new TestClass($value); + + $this->propertyAccessor->setValue($object, 'publicAccessor[value2]', 'baz'); + $this->assertSame('baz', $this->propertyAccessor->getValue($object, 'publicAccessor[value2]')); + $this->assertSame(array('value1' => 'foo', 'value2' => 'baz'), $object->getPublicAccessor()); + } + + public function testCacheReadAccess() + { + $obj = new TestClass('foo'); + + $propertyAccessor = new PropertyAccessor(false, false, new ArrayAdapter()); + $this->assertEquals('foo', $propertyAccessor->getValue($obj, 'publicGetSetter')); + $propertyAccessor->setValue($obj, 'publicGetSetter', 'bar'); + $propertyAccessor->setValue($obj, 'publicGetSetter', 'baz'); + $this->assertEquals('baz', $propertyAccessor->getValue($obj, 'publicGetSetter')); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidArgumentException + * @expectedExceptionMessage Expected argument of type "Countable", "string" given + */ + public function testThrowTypeErrorWithInterface() + { + $object = new TypeHinted(); + + $this->propertyAccessor->setValue($object, 'countable', 'This is a string, \Countable expected.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTraversableArrayObjectTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTraversableArrayObjectTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4e45001176d0344df8906bdf89d1fd0aa7cb0101 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTraversableArrayObjectTest.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests; + +use Symfony\Component\PropertyAccess\Tests\Fixtures\TraversableArrayObject; + +class PropertyAccessorTraversableArrayObjectTest extends PropertyAccessorCollectionTest +{ + protected function getContainer(array $array) + { + return new TraversableArrayObject($array); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..75e9834ae85c826d33bb8039246719173f079728 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php @@ -0,0 +1,291 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\PropertyAccess\PropertyPath; +use Symfony\Component\PropertyAccess\PropertyPathBuilder; + +/** + * @author Bernhard Schussek + */ +class PropertyPathBuilderTest extends TestCase +{ + /** + * @var string + */ + const PREFIX = 'old1[old2].old3[old4][old5].old6'; + + /** + * @var PropertyPathBuilder + */ + private $builder; + + protected function setUp() + { + $this->builder = new PropertyPathBuilder(new PropertyPath(self::PREFIX)); + } + + public function testCreateEmpty() + { + $builder = new PropertyPathBuilder(); + + $this->assertNull($builder->getPropertyPath()); + } + + public function testCreateCopyPath() + { + $this->assertEquals(new PropertyPath(self::PREFIX), $this->builder->getPropertyPath()); + } + + public function testAppendIndex() + { + $this->builder->appendIndex('new1'); + + $path = new PropertyPath(self::PREFIX.'[new1]'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + public function testAppendProperty() + { + $this->builder->appendProperty('new1'); + + $path = new PropertyPath(self::PREFIX.'.new1'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + public function testAppend() + { + $this->builder->append(new PropertyPath('new1[new2]')); + + $path = new PropertyPath(self::PREFIX.'.new1[new2]'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + public function testAppendUsingString() + { + $this->builder->append('new1[new2]'); + + $path = new PropertyPath(self::PREFIX.'.new1[new2]'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + public function testAppendWithOffset() + { + $this->builder->append(new PropertyPath('new1[new2].new3'), 1); + + $path = new PropertyPath(self::PREFIX.'[new2].new3'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + public function testAppendWithOffsetAndLength() + { + $this->builder->append(new PropertyPath('new1[new2].new3'), 1, 1); + + $path = new PropertyPath(self::PREFIX.'[new2]'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + public function testReplaceByIndex() + { + $this->builder->replaceByIndex(1, 'new1'); + + $path = new PropertyPath('old1[new1].old3[old4][old5].old6'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + public function testReplaceByIndexWithoutName() + { + $this->builder->replaceByIndex(0); + + $path = new PropertyPath('[old1][old2].old3[old4][old5].old6'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testReplaceByIndexDoesNotAllowInvalidOffsets() + { + $this->builder->replaceByIndex(6, 'new1'); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testReplaceByIndexDoesNotAllowNegativeOffsets() + { + $this->builder->replaceByIndex(-1, 'new1'); + } + + public function testReplaceByProperty() + { + $this->builder->replaceByProperty(1, 'new1'); + + $path = new PropertyPath('old1.new1.old3[old4][old5].old6'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + public function testReplaceByPropertyWithoutName() + { + $this->builder->replaceByProperty(1); + + $path = new PropertyPath('old1.old2.old3[old4][old5].old6'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testReplaceByPropertyDoesNotAllowInvalidOffsets() + { + $this->builder->replaceByProperty(6, 'new1'); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testReplaceByPropertyDoesNotAllowNegativeOffsets() + { + $this->builder->replaceByProperty(-1, 'new1'); + } + + public function testReplace() + { + $this->builder->replace(1, 1, new PropertyPath('new1[new2].new3')); + + $path = new PropertyPath('old1.new1[new2].new3.old3[old4][old5].old6'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + public function testReplaceUsingString() + { + $this->builder->replace(1, 1, 'new1[new2].new3'); + + $path = new PropertyPath('old1.new1[new2].new3.old3[old4][old5].old6'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + public function testReplaceNegative() + { + $this->builder->replace(-1, 1, new PropertyPath('new1[new2].new3')); + + $path = new PropertyPath('old1[old2].old3[old4][old5].new1[new2].new3'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + /** + * @dataProvider provideInvalidOffsets + * @expectedException \OutOfBoundsException + */ + public function testReplaceDoesNotAllowInvalidOffsets($offset) + { + $this->builder->replace($offset, 1, new PropertyPath('new1[new2].new3')); + } + + public function provideInvalidOffsets() + { + return array( + array(6), + array(-7), + ); + } + + public function testReplaceWithLengthGreaterOne() + { + $this->builder->replace(0, 2, new PropertyPath('new1[new2].new3')); + + $path = new PropertyPath('new1[new2].new3.old3[old4][old5].old6'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + public function testReplaceSubstring() + { + $this->builder->replace(1, 1, new PropertyPath('new1[new2].new3.new4[new5]'), 1, 3); + + $path = new PropertyPath('old1[new2].new3.new4.old3[old4][old5].old6'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + public function testReplaceSubstringWithLengthGreaterOne() + { + $this->builder->replace(1, 2, new PropertyPath('new1[new2].new3.new4[new5]'), 1, 3); + + $path = new PropertyPath('old1[new2].new3.new4[old4][old5].old6'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + // https://github.com/symfony/symfony/issues/5605 + public function testReplaceWithLongerPath() + { + // error occurs when path contains at least two more elements + // than the builder + $path = new PropertyPath('new1.new2.new3'); + + $builder = new PropertyPathBuilder(new PropertyPath('old1')); + $builder->replace(0, 1, $path); + + $this->assertEquals($path, $builder->getPropertyPath()); + } + + public function testReplaceWithLongerPathKeepsOrder() + { + $path = new PropertyPath('new1.new2.new3'); + $expected = new PropertyPath('new1.new2.new3.old2'); + + $builder = new PropertyPathBuilder(new PropertyPath('old1.old2')); + $builder->replace(0, 1, $path); + + $this->assertEquals($expected, $builder->getPropertyPath()); + } + + public function testRemove() + { + $this->builder->remove(3); + + $path = new PropertyPath('old1[old2].old3[old5].old6'); + + $this->assertEquals($path, $this->builder->getPropertyPath()); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testRemoveDoesNotAllowInvalidOffsets() + { + $this->builder->remove(6); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testRemoveDoesNotAllowNegativeOffsets() + { + $this->builder->remove(-1); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5e3a06a4b4d8537fe7af684f8cbd71cf5e313351 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php @@ -0,0 +1,204 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\PropertyAccess\PropertyPath; + +class PropertyPathTest extends TestCase +{ + public function testToString() + { + $path = new PropertyPath('reference.traversable[index].property'); + + $this->assertEquals('reference.traversable[index].property', $path->__toString()); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException + */ + public function testDotIsRequiredBeforeProperty() + { + new PropertyPath('[index]property'); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException + */ + public function testDotCannotBePresentAtTheBeginning() + { + new PropertyPath('.property'); + } + + public function providePathsContainingUnexpectedCharacters() + { + return array( + array('property.'), + array('property.['), + array('property..'), + array('property['), + array('property[['), + array('property[.'), + array('property[]'), + ); + } + + /** + * @dataProvider providePathsContainingUnexpectedCharacters + * @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException + */ + public function testUnexpectedCharacters($path) + { + new PropertyPath($path); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException + */ + public function testPathCannotBeEmpty() + { + new PropertyPath(''); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidArgumentException + */ + public function testPathCannotBeNull() + { + new PropertyPath(null); + } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidArgumentException + */ + public function testPathCannotBeFalse() + { + new PropertyPath(false); + } + + public function testZeroIsValidPropertyPath() + { + new PropertyPath('0'); + } + + public function testGetParentWithDot() + { + $propertyPath = new PropertyPath('grandpa.parent.child'); + + $this->assertEquals(new PropertyPath('grandpa.parent'), $propertyPath->getParent()); + } + + public function testGetParentWithIndex() + { + $propertyPath = new PropertyPath('grandpa.parent[child]'); + + $this->assertEquals(new PropertyPath('grandpa.parent'), $propertyPath->getParent()); + } + + public function testGetParentWhenThereIsNoParent() + { + $propertyPath = new PropertyPath('path'); + + $this->assertNull($propertyPath->getParent()); + } + + public function testCopyConstructor() + { + $propertyPath = new PropertyPath('grandpa.parent[child]'); + $copy = new PropertyPath($propertyPath); + + $this->assertEquals($propertyPath, $copy); + } + + public function testGetElement() + { + $propertyPath = new PropertyPath('grandpa.parent[child]'); + + $this->assertEquals('child', $propertyPath->getElement(2)); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testGetElementDoesNotAcceptInvalidIndices() + { + $propertyPath = new PropertyPath('grandpa.parent[child]'); + + $propertyPath->getElement(3); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testGetElementDoesNotAcceptNegativeIndices() + { + $propertyPath = new PropertyPath('grandpa.parent[child]'); + + $propertyPath->getElement(-1); + } + + public function testIsProperty() + { + $propertyPath = new PropertyPath('grandpa.parent[child]'); + + $this->assertTrue($propertyPath->isProperty(1)); + $this->assertFalse($propertyPath->isProperty(2)); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testIsPropertyDoesNotAcceptInvalidIndices() + { + $propertyPath = new PropertyPath('grandpa.parent[child]'); + + $propertyPath->isProperty(3); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testIsPropertyDoesNotAcceptNegativeIndices() + { + $propertyPath = new PropertyPath('grandpa.parent[child]'); + + $propertyPath->isProperty(-1); + } + + public function testIsIndex() + { + $propertyPath = new PropertyPath('grandpa.parent[child]'); + + $this->assertFalse($propertyPath->isIndex(1)); + $this->assertTrue($propertyPath->isIndex(2)); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testIsIndexDoesNotAcceptInvalidIndices() + { + $propertyPath = new PropertyPath('grandpa.parent[child]'); + + $propertyPath->isIndex(3); + } + + /** + * @expectedException \OutOfBoundsException + */ + public function testIsIndexDoesNotAcceptNegativeIndices() + { + $propertyPath = new PropertyPath('grandpa.parent[child]'); + + $propertyPath->isIndex(-1); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/StringUtilTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/StringUtilTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7728e15f834c829e1d2a8cd63018feedab26232e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/Tests/StringUtilTest.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\Component\PropertyAccess\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\PropertyAccess\StringUtil; + +/** + * @group legacy + */ +class StringUtilTest extends TestCase +{ + public function singularifyProvider() + { + // This is only a stub to make sure the BC layer works + // Actual tests are in the Symfony Inflector component + return array( + array('axes', array('ax', 'axe', 'axis')), + ); + } + + /** + * @dataProvider singularifyProvider + */ + public function testSingularify($plural, $singular) + { + $single = StringUtil::singularify($plural); + if (is_string($singular) && is_array($single)) { + $this->fail("--- Expected\n`string`: ".$singular."\n+++ Actual\n`array`: ".implode(', ', $single)); + } elseif (is_array($singular) && is_string($single)) { + $this->fail("--- Expected\n`array`: ".implode(', ', $singular)."\n+++ Actual\n`string`: ".$single); + } + + $this->assertEquals($singular, $single); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/composer.json b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..e095cbe35fe914744e4b8ba3098da2f407c275b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/composer.json @@ -0,0 +1,41 @@ +{ + "name": "symfony/property-access", + "type": "library", + "description": "Symfony PropertyAccess Component", + "keywords": ["property", "index", "access", "object", "array", "extraction", "injection", "reflection", "property path"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-php70": "~1.0", + "symfony/inflector": "~3.1" + }, + "require-dev": { + "symfony/cache": "~3.1" + }, + "suggest": { + "psr/cache-implementation": "To cache access methods." + }, + "autoload": { + "psr-4": { "Symfony\\Component\\PropertyAccess\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..b0b20c1bd9460239ceb1a291e43ea5cbd094635c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php new file mode 100644 index 0000000000000000000000000000000000000000..f7e4aa871e3cfbfc2cd18cc091a39e913a3cf597 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php @@ -0,0 +1,247 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Extractor; + +use phpDocumentor\Reflection\DocBlock; +use phpDocumentor\Reflection\DocBlockFactory; +use phpDocumentor\Reflection\DocBlockFactoryInterface; +use phpDocumentor\Reflection\Types\ContextFactory; +use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; +use Symfony\Component\PropertyInfo\Type; +use Symfony\Component\PropertyInfo\Util\PhpDocTypeHelper; + +/** + * Extracts data using a PHPDoc parser. + * + * @author Kévin Dunglas + */ +class PhpDocExtractor implements PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface +{ + const PROPERTY = 0; + const ACCESSOR = 1; + const MUTATOR = 2; + + /** + * @var DocBlock[] + */ + private $docBlocks = array(); + + /** + * @var DocBlockFactory + */ + private $docBlockFactory; + + /** + * @var ContextFactory + */ + private $contextFactory; + + /** + * @var PhpDocTypeHelper + */ + private $phpDocTypeHelper; + + public function __construct(DocBlockFactoryInterface $docBlockFactory = null) + { + $this->docBlockFactory = $docBlockFactory ?: DocBlockFactory::createInstance(); + $this->contextFactory = new ContextFactory(); + $this->phpDocTypeHelper = new PhpDocTypeHelper(); + } + + /** + * {@inheritdoc} + */ + public function getShortDescription($class, $property, array $context = array()) + { + /** @var $docBlock DocBlock */ + list($docBlock) = $this->getDocBlock($class, $property); + if (!$docBlock) { + return; + } + + $shortDescription = $docBlock->getSummary(); + + if (!empty($shortDescription)) { + return $shortDescription; + } + + foreach ($docBlock->getTagsByName('var') as $var) { + $varDescription = $var->getDescription()->render(); + + if (!empty($varDescription)) { + return $varDescription; + } + } + } + + /** + * {@inheritdoc} + */ + public function getLongDescription($class, $property, array $context = array()) + { + /** @var $docBlock DocBlock */ + list($docBlock) = $this->getDocBlock($class, $property); + if (!$docBlock) { + return; + } + + $contents = $docBlock->getDescription()->render(); + + return '' === $contents ? null : $contents; + } + + /** + * {@inheritdoc} + */ + public function getTypes($class, $property, array $context = array()) + { + /** @var $docBlock DocBlock */ + list($docBlock, $source, $prefix) = $this->getDocBlock($class, $property); + if (!$docBlock) { + return; + } + + switch ($source) { + case self::PROPERTY: + $tag = 'var'; + break; + + case self::ACCESSOR: + $tag = 'return'; + break; + + case self::MUTATOR: + $tag = 'param'; + break; + } + + $types = array(); + /** @var DocBlock\Tags\Var_|DocBlock\Tags\Return_|DocBlock\Tags\Param $tag */ + foreach ($docBlock->getTagsByName($tag) as $tag) { + $types = array_merge($types, $this->phpDocTypeHelper->getTypes($tag->getType())); + } + + if (!isset($types[0])) { + return; + } + + if (!in_array($prefix, ReflectionExtractor::$arrayMutatorPrefixes)) { + return $types; + } + + return array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $types[0])); + } + + /** + * Gets the DocBlock for this property. + * + * @param string $class + * @param string $property + * + * @return array + */ + private function getDocBlock($class, $property) + { + $propertyHash = sprintf('%s::%s', $class, $property); + + if (isset($this->docBlocks[$propertyHash])) { + return $this->docBlocks[$propertyHash]; + } + + $ucFirstProperty = ucfirst($property); + + try { + switch (true) { + case $docBlock = $this->getDocBlockFromProperty($class, $property): + $data = array($docBlock, self::PROPERTY, null); + break; + + case list($docBlock) = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::ACCESSOR): + $data = array($docBlock, self::ACCESSOR, null); + break; + + case list($docBlock, $prefix) = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::MUTATOR): + $data = array($docBlock, self::MUTATOR, $prefix); + break; + + default: + $data = array(null, null, null); + } + } catch (\InvalidArgumentException $e) { + $data = array(null, null, null); + } + + return $this->docBlocks[$propertyHash] = $data; + } + + /** + * Gets the DocBlock from a property. + * + * @param string $class + * @param string $property + * + * @return DocBlock|null + */ + private function getDocBlockFromProperty($class, $property) + { + // Use a ReflectionProperty instead of $class to get the parent class if applicable + try { + $reflectionProperty = new \ReflectionProperty($class, $property); + } catch (\ReflectionException $e) { + return; + } + + return $this->docBlockFactory->create($reflectionProperty, $this->contextFactory->createFromReflector($reflectionProperty)); + } + + /** + * Gets DocBlock from accessor or mutator method. + * + * @param string $class + * @param string $ucFirstProperty + * @param int $type + * + * @return array + */ + private function getDocBlockFromMethod($class, $ucFirstProperty, $type) + { + $prefixes = $type === self::ACCESSOR ? ReflectionExtractor::$accessorPrefixes : ReflectionExtractor::$mutatorPrefixes; + $prefix = null; + + foreach ($prefixes as $prefix) { + $methodName = $prefix.$ucFirstProperty; + + try { + $reflectionMethod = new \ReflectionMethod($class, $methodName); + if ($reflectionMethod->isStatic()) { + continue; + } + + if ( + (self::ACCESSOR === $type && 0 === $reflectionMethod->getNumberOfRequiredParameters()) || + (self::MUTATOR === $type && $reflectionMethod->getNumberOfParameters() >= 1) + ) { + break; + } + } catch (\ReflectionException $e) { + // Try the next prefix if the method doesn't exist + } + } + + if (!isset($reflectionMethod)) { + return; + } + + return array($this->docBlockFactory->create($reflectionMethod, $this->contextFactory->createFromReflector($reflectionMethod)), $prefix); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php new file mode 100644 index 0000000000000000000000000000000000000000..96c2e9b48ef5fda3a6709297c2849be9f630980b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php @@ -0,0 +1,351 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Extractor; + +use Symfony\Component\Inflector\Inflector; +use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; +use Symfony\Component\PropertyInfo\Type; + +/** + * Extracts data using the reflection API. + * + * @author Kévin Dunglas + */ +class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTypeExtractorInterface, PropertyAccessExtractorInterface +{ + /** + * @internal + * + * @var string[] + */ + public static $mutatorPrefixes = array('add', 'remove', 'set'); + + /** + * @internal + * + * @var string[] + */ + public static $accessorPrefixes = array('is', 'can', 'get'); + + /** + * @internal + * + * @var string[] + */ + public static $arrayMutatorPrefixes = array('add', 'remove'); + + private $supportsParameterType; + + public function __construct() + { + $this->supportsParameterType = method_exists('ReflectionParameter', 'getType'); + } + + /** + * {@inheritdoc} + */ + public function getProperties($class, array $context = array()) + { + try { + $reflectionClass = new \ReflectionClass($class); + } catch (\ReflectionException $e) { + return; + } + + $reflectionProperties = $reflectionClass->getProperties(); + + $properties = array(); + foreach ($reflectionProperties as $reflectionProperty) { + if ($reflectionProperty->isPublic()) { + $properties[$reflectionProperty->name] = true; + } + } + + foreach ($reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflectionMethod) { + if ($reflectionMethod->isStatic()) { + continue; + } + + $propertyName = $this->getPropertyName($reflectionMethod->name, $reflectionProperties); + if (!$propertyName || isset($properties[$propertyName])) { + continue; + } + if (!preg_match('/^[A-Z]{2,}/', $propertyName)) { + $propertyName = lcfirst($propertyName); + } + $properties[$propertyName] = true; + } + + return array_keys($properties); + } + + /** + * {@inheritdoc} + */ + public function getTypes($class, $property, array $context = array()) + { + if ($fromMutator = $this->extractFromMutator($class, $property)) { + return $fromMutator; + } + + if ($fromAccessor = $this->extractFromAccessor($class, $property)) { + return $fromAccessor; + } + } + + /** + * {@inheritdoc} + */ + public function isReadable($class, $property, array $context = array()) + { + if ($this->isPublicProperty($class, $property)) { + return true; + } + + list($reflectionMethod) = $this->getAccessorMethod($class, $property); + + return null !== $reflectionMethod; + } + + /** + * {@inheritdoc} + */ + public function isWritable($class, $property, array $context = array()) + { + if ($this->isPublicProperty($class, $property)) { + return true; + } + + list($reflectionMethod) = $this->getMutatorMethod($class, $property); + + return null !== $reflectionMethod; + } + + /** + * Tries to extract type information from mutators. + * + * @param string $class + * @param string $property + * + * @return Type[]|null + */ + private function extractFromMutator($class, $property) + { + list($reflectionMethod, $prefix) = $this->getMutatorMethod($class, $property); + if (null === $reflectionMethod) { + return; + } + + $reflectionParameters = $reflectionMethod->getParameters(); + $reflectionParameter = $reflectionParameters[0]; + + if ($this->supportsParameterType) { + if (!$reflectionType = $reflectionParameter->getType()) { + return; + } + $type = $this->extractFromReflectionType($reflectionType); + + // HHVM reports variadics with "array" but not builtin type hints + if (!$reflectionType->isBuiltin() && Type::BUILTIN_TYPE_ARRAY === $type->getBuiltinType()) { + return; + } + } elseif (preg_match('/^(?:[^ ]++ ){4}([a-zA-Z_\x7F-\xFF][^ ]++)/', $reflectionParameter, $info)) { + if (Type::BUILTIN_TYPE_ARRAY === $info[1]) { + $type = new Type(Type::BUILTIN_TYPE_ARRAY, $reflectionParameter->allowsNull(), null, true); + } elseif (Type::BUILTIN_TYPE_CALLABLE === $info[1]) { + $type = new Type(Type::BUILTIN_TYPE_CALLABLE, $reflectionParameter->allowsNull()); + } else { + $type = new Type(Type::BUILTIN_TYPE_OBJECT, $reflectionParameter->allowsNull(), $info[1]); + } + } else { + return; + } + + if (in_array($prefix, self::$arrayMutatorPrefixes)) { + $type = new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $type); + } + + return array($type); + } + + /** + * Tries to extract type information from accessors. + * + * @param string $class + * @param string $property + * + * @return Type[]|null + */ + private function extractFromAccessor($class, $property) + { + list($reflectionMethod, $prefix) = $this->getAccessorMethod($class, $property); + if (null === $reflectionMethod) { + return; + } + + if ($this->supportsParameterType && $reflectionType = $reflectionMethod->getReturnType()) { + return array($this->extractFromReflectionType($reflectionType)); + } + + if (in_array($prefix, array('is', 'can'))) { + return array(new Type(Type::BUILTIN_TYPE_BOOL)); + } + } + + /** + * Extracts data from the PHP 7 reflection type. + * + * @param \ReflectionType $reflectionType + * + * @return Type + */ + private function extractFromReflectionType(\ReflectionType $reflectionType) + { + $phpTypeOrClass = $reflectionType instanceof \ReflectionNamedType ? $reflectionType->getName() : $reflectionType->__toString(); + $nullable = $reflectionType->allowsNull(); + + if (Type::BUILTIN_TYPE_ARRAY === $phpTypeOrClass) { + $type = new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true); + } elseif ('void' === $phpTypeOrClass) { + $type = new Type(Type::BUILTIN_TYPE_NULL, $nullable); + } elseif ($reflectionType->isBuiltin()) { + $type = new Type($phpTypeOrClass, $nullable); + } else { + $type = new Type(Type::BUILTIN_TYPE_OBJECT, $nullable, $phpTypeOrClass); + } + + return $type; + } + + /** + * Does the class have the given public property? + * + * @param string $class + * @param string $property + * + * @return bool + */ + private function isPublicProperty($class, $property) + { + try { + $reflectionProperty = new \ReflectionProperty($class, $property); + + return $reflectionProperty->isPublic(); + } catch (\ReflectionException $e) { + // Return false if the property doesn't exist + } + + return false; + } + + /** + * Gets the accessor method. + * + * Returns an array with a the instance of \ReflectionMethod as first key + * and the prefix of the method as second or null if not found. + * + * @param string $class + * @param string $property + * + * @return array|null + */ + private function getAccessorMethod($class, $property) + { + $ucProperty = ucfirst($property); + + foreach (self::$accessorPrefixes as $prefix) { + try { + $reflectionMethod = new \ReflectionMethod($class, $prefix.$ucProperty); + if ($reflectionMethod->isStatic()) { + continue; + } + + if (0 === $reflectionMethod->getNumberOfRequiredParameters()) { + return array($reflectionMethod, $prefix); + } + } catch (\ReflectionException $e) { + // Return null if the property doesn't exist + } + } + } + + /** + * Gets the mutator method. + * + * Returns an array with a the instance of \ReflectionMethod as first key + * and the prefix of the method as second or null if not found. + * + * @param string $class + * @param string $property + * + * @return array + */ + private function getMutatorMethod($class, $property) + { + $ucProperty = ucfirst($property); + $ucSingulars = (array) Inflector::singularize($ucProperty); + + foreach (self::$mutatorPrefixes as $prefix) { + $names = array($ucProperty); + if (in_array($prefix, self::$arrayMutatorPrefixes)) { + $names = array_merge($names, $ucSingulars); + } + + foreach ($names as $name) { + try { + $reflectionMethod = new \ReflectionMethod($class, $prefix.$name); + if ($reflectionMethod->isStatic()) { + continue; + } + + // Parameter can be optional to allow things like: method(array $foo = null) + if ($reflectionMethod->getNumberOfParameters() >= 1) { + return array($reflectionMethod, $prefix); + } + } catch (\ReflectionException $e) { + // Try the next prefix if the method doesn't exist + } + } + } + } + + /** + * Extracts a property name from a method name. + * + * @param string $methodName + * @param \ReflectionProperty[] $reflectionProperties + * + * @return string + */ + private function getPropertyName($methodName, array $reflectionProperties) + { + $pattern = implode('|', array_merge(self::$accessorPrefixes, self::$mutatorPrefixes)); + + if (preg_match('/^('.$pattern.')(.+)$/i', $methodName, $matches)) { + if (!in_array($matches[1], self::$arrayMutatorPrefixes)) { + return $matches[2]; + } + + foreach ($reflectionProperties as $reflectionProperty) { + foreach ((array) Inflector::singularize($reflectionProperty->name) as $name) { + if (strtolower($name) === strtolower($matches[2])) { + return $reflectionProperty->name; + } + } + } + + return $matches[2]; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php new file mode 100644 index 0000000000000000000000000000000000000000..b7edb8fa246b06c1fd28f187df8d8eca18b94cba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.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\Component\PropertyInfo\Extractor; + +use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; + +/** + * Lists available properties using Symfony Serializer Component metadata. + * + * @author Kévin Dunglas + */ +class SerializerExtractor implements PropertyListExtractorInterface +{ + /** + * @var ClassMetadataFactoryInterface + */ + private $classMetadataFactory; + + public function __construct(ClassMetadataFactoryInterface $classMetadataFactory) + { + $this->classMetadataFactory = $classMetadataFactory; + } + + /** + * {@inheritdoc} + */ + public function getProperties($class, array $context = array()) + { + if (!isset($context['serializer_groups']) || !is_array($context['serializer_groups'])) { + return; + } + + if (!$this->classMetadataFactory->getMetadataFor($class)) { + return; + } + + $properties = array(); + $serializerClassMetadata = $this->classMetadataFactory->getMetadataFor($class); + + foreach ($serializerClassMetadata->getAttributesMetadata() as $serializerAttributeMetadata) { + if (count(array_intersect($context['serializer_groups'], $serializerAttributeMetadata->getGroups())) > 0) { + $properties[] = $serializerAttributeMetadata->getName(); + } + } + + return $properties; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..2ca4d6305bf2a722d2eae3d2f97a6fa69ec63172 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2017 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/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyAccessExtractorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyAccessExtractorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..ecf44d9d656c7f6b144b8fb48996d212b232bbca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyAccessExtractorInterface.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo; + +/** + * Guesses if the property can be accessed or mutated. + * + * @author Kévin Dunglas + */ +interface PropertyAccessExtractorInterface +{ + /** + * Is the property readable? + * + * @param string $class + * @param string $property + * @param array $context + * + * @return bool|null + */ + public function isReadable($class, $property, array $context = array()); + + /** + * Is the property writable? + * + * @param string $class + * @param string $property + * @param array $context + * + * @return bool|null + */ + public function isWritable($class, $property, array $context = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyDescriptionExtractorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyDescriptionExtractorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a2e98d0febb2915657caa2d356b73ea0a0ac38c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyDescriptionExtractorInterface.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo; + +/** + * Description extractor Interface. + * + * @author Kévin Dunglas + */ +interface PropertyDescriptionExtractorInterface +{ + /** + * Gets the short description of the property. + * + * @param string $class + * @param string $property + * @param array $context + * + * @return string|null + */ + public function getShortDescription($class, $property, array $context = array()); + + /** + * Gets the long description of the property. + * + * @param string $class + * @param string $property + * @param array $context + * + * @return string|null + */ + public function getLongDescription($class, $property, array $context = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php new file mode 100644 index 0000000000000000000000000000000000000000..69ade35dfeeea7c7e699375325a9f0aa6ab7a876 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php @@ -0,0 +1,152 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo; + +use Psr\Cache\CacheItemPoolInterface; + +/** + * Adds a PSR-6 cache layer on top of an extractor. + * + * @author Kévin Dunglas + */ +class PropertyInfoCacheExtractor implements PropertyInfoExtractorInterface +{ + /** + * @var PropertyInfoExtractorInterface + */ + private $propertyInfoExtractor; + + /** + * @var CacheItemPoolInterface + */ + private $cacheItemPool; + + /** + * @var array + */ + private $arrayCache = array(); + + public function __construct(PropertyInfoExtractorInterface $propertyInfoExtractor, CacheItemPoolInterface $cacheItemPool) + { + $this->propertyInfoExtractor = $propertyInfoExtractor; + $this->cacheItemPool = $cacheItemPool; + } + + /** + * {@inheritdoc} + */ + public function isReadable($class, $property, array $context = array()) + { + return $this->extract('isReadable', array($class, $property, $context)); + } + + /** + * {@inheritdoc} + */ + public function isWritable($class, $property, array $context = array()) + { + return $this->extract('isWritable', array($class, $property, $context)); + } + + /** + * {@inheritdoc} + */ + public function getShortDescription($class, $property, array $context = array()) + { + return $this->extract('getShortDescription', array($class, $property, $context)); + } + + /** + * {@inheritdoc} + */ + public function getLongDescription($class, $property, array $context = array()) + { + return $this->extract('getLongDescription', array($class, $property, $context)); + } + + /** + * {@inheritdoc} + */ + public function getProperties($class, array $context = array()) + { + return $this->extract('getProperties', array($class, $context)); + } + + /** + * {@inheritdoc} + */ + public function getTypes($class, $property, array $context = array()) + { + return $this->extract('getTypes', array($class, $property, $context)); + } + + /** + * Retrieves the cached data if applicable or delegates to the decorated extractor. + * + * @param string $method + * @param array $arguments + * + * @return mixed + */ + private function extract($method, array $arguments) + { + try { + $serializedArguments = serialize($arguments); + } catch (\Exception $exception) { + // If arguments are not serializable, skip the cache + return call_user_func_array(array($this->propertyInfoExtractor, $method), $arguments); + } + + $key = $this->escape($method.'.'.$serializedArguments); + + if (array_key_exists($key, $this->arrayCache)) { + return $this->arrayCache[$key]; + } + + $item = $this->cacheItemPool->getItem($key); + + if ($item->isHit()) { + return $this->arrayCache[$key] = $item->get(); + } + + $value = call_user_func_array(array($this->propertyInfoExtractor, $method), $arguments); + $item->set($value); + $this->cacheItemPool->save($item); + + return $this->arrayCache[$key] = $value; + } + + /** + * Escapes a key according to PSR-6. + * + * Replaces characters forbidden by PSR-6 and the _ char by the _ char followed by the ASCII + * code of the escaped char. + * + * @param string $key + * + * @return string + */ + private function escape($key) + { + return strtr($key, array( + '{' => '_123', + '}' => '_125', + '(' => '_40', + ')' => '_41', + '/' => '_47', + '\\' => '_92', + '@' => '_64', + ':' => '_58', + '_' => '_95', + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php new file mode 100644 index 0000000000000000000000000000000000000000..031c8ac05e26aec047ce70b44e236826f94ac047 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo; + +/** + * Default {@see PropertyInfoExtractorInterface} implementation. + * + * @author Kévin Dunglas + */ +class PropertyInfoExtractor implements PropertyInfoExtractorInterface +{ + /** + * @var PropertyListExtractorInterface[] + */ + private $listExtractors; + + /** + * @var PropertyTypeExtractorInterface[] + */ + private $typeExtractors; + + /** + * @var PropertyDescriptionExtractorInterface[] + */ + private $descriptionExtractors; + + /** + * @var PropertyAccessExtractorInterface[] + */ + private $accessExtractors; + + /** + * @param PropertyListExtractorInterface[] $listExtractors + * @param PropertyTypeExtractorInterface[] $typeExtractors + * @param PropertyDescriptionExtractorInterface[] $descriptionExtractors + * @param PropertyAccessExtractorInterface[] $accessExtractors + */ + public function __construct(array $listExtractors = array(), array $typeExtractors = array(), array $descriptionExtractors = array(), array $accessExtractors = array()) + { + $this->listExtractors = $listExtractors; + $this->typeExtractors = $typeExtractors; + $this->descriptionExtractors = $descriptionExtractors; + $this->accessExtractors = $accessExtractors; + } + + /** + * {@inheritdoc} + */ + public function getProperties($class, array $context = array()) + { + return $this->extract($this->listExtractors, 'getProperties', array($class, $context)); + } + + /** + * {@inheritdoc} + */ + public function getShortDescription($class, $property, array $context = array()) + { + return $this->extract($this->descriptionExtractors, 'getShortDescription', array($class, $property, $context)); + } + + /** + * {@inheritdoc} + */ + public function getLongDescription($class, $property, array $context = array()) + { + return $this->extract($this->descriptionExtractors, 'getLongDescription', array($class, $property, $context)); + } + + /** + * {@inheritdoc} + */ + public function getTypes($class, $property, array $context = array()) + { + return $this->extract($this->typeExtractors, 'getTypes', array($class, $property, $context)); + } + + /** + * {@inheritdoc} + */ + public function isReadable($class, $property, array $context = array()) + { + return $this->extract($this->accessExtractors, 'isReadable', array($class, $property, $context)); + } + + /** + * {@inheritdoc} + */ + public function isWritable($class, $property, array $context = array()) + { + return $this->extract($this->accessExtractors, 'isWritable', array($class, $property, $context)); + } + + /** + * Iterates over registered extractors and return the first value found. + * + * @param array $extractors + * @param string $method + * @param array $arguments + * + * @return mixed + */ + private function extract(array $extractors, $method, array $arguments) + { + foreach ($extractors as $extractor) { + $value = call_user_func_array(array($extractor, $method), $arguments); + if (null !== $value) { + return $value; + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoExtractorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoExtractorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..8893018653f365ff0cf023e9c1e031989d09decd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyInfoExtractorInterface.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo; + +/** + * Gets info about PHP class properties. + * + * A convenient interface inheriting all specific info interfaces. + * + * @author Kévin Dunglas + */ +interface PropertyInfoExtractorInterface extends PropertyTypeExtractorInterface, PropertyDescriptionExtractorInterface, PropertyAccessExtractorInterface, PropertyListExtractorInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyListExtractorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyListExtractorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..1faae33d025313d91784ba993eac856bafdb1f10 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyListExtractorInterface.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\PropertyInfo; + +/** + * Extracts the list of properties available for the given class. + * + * @author Kévin Dunglas + */ +interface PropertyListExtractorInterface +{ + /** + * Gets the list of properties available for the given class. + * + * @param string $class + * @param array $context + * + * @return string[]|null + */ + public function getProperties($class, array $context = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyTypeExtractorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyTypeExtractorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..8aa08b4e85e5ee688069e705bf68e6eebca8d5cb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/PropertyTypeExtractorInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo; + +/** + * Type Extractor Interface. + * + * @author Kévin Dunglas + */ +interface PropertyTypeExtractorInterface +{ + /** + * Gets types of a property. + * + * @param string $class + * @param string $property + * @param array $context + * + * @return Type[]|null + */ + public function getTypes($class, $property, array $context = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/README.md b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5ac21f384e59bb1eb1cda34a2718dd3543884bec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/README.md @@ -0,0 +1,13 @@ +PropertyInfo Component +====================== + +PropertyInfo extracts information about PHP class' properties using metadata +of popular sources. + +Resources +--------- + + * [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/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5b729c79e1e1fe38aaf472408d3b1fa13863587a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.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\PropertyInfo\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\PropertyInfo\PropertyInfoExtractor; +use Symfony\Component\PropertyInfo\Tests\Fixtures\DummyExtractor; +use Symfony\Component\PropertyInfo\Tests\Fixtures\NullExtractor; +use Symfony\Component\PropertyInfo\Type; + +/** + * @author Kévin Dunglas + */ +class AbstractPropertyInfoExtractorTest extends TestCase +{ + /** + * @var PropertyInfoExtractor + */ + protected $propertyInfo; + + protected function setUp() + { + $extractors = array(new NullExtractor(), new DummyExtractor()); + $this->propertyInfo = new PropertyInfoExtractor($extractors, $extractors, $extractors, $extractors); + } + + public function testInstanceOf() + { + $this->assertInstanceOf('Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface', $this->propertyInfo); + $this->assertInstanceOf('Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface', $this->propertyInfo); + $this->assertInstanceOf('Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface', $this->propertyInfo); + $this->assertInstanceOf('Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface', $this->propertyInfo); + } + + public function testGetShortDescription() + { + $this->assertSame('short', $this->propertyInfo->getShortDescription('Foo', 'bar', array())); + } + + public function testGetLongDescription() + { + $this->assertSame('long', $this->propertyInfo->getLongDescription('Foo', 'bar', array())); + } + + public function testGetTypes() + { + $this->assertEquals(array(new Type(Type::BUILTIN_TYPE_INT)), $this->propertyInfo->getTypes('Foo', 'bar', array())); + } + + public function testIsReadable() + { + $this->assertTrue($this->propertyInfo->isReadable('Foo', 'bar', array())); + } + + public function testIsWritable() + { + $this->assertTrue($this->propertyInfo->isWritable('Foo', 'bar', array())); + } + + public function testGetProperties() + { + $this->assertEquals(array('a', 'b'), $this->propertyInfo->getProperties('Foo')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractors/PhpDocExtractorTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractors/PhpDocExtractorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8aa508e3c252437568395dc0f7908f07a5e700ba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractors/PhpDocExtractorTest.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Tests\PhpDocExtractors; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor; +use Symfony\Component\PropertyInfo\Type; + +/** + * @author Kévin Dunglas + */ +class PhpDocExtractorTest extends TestCase +{ + /** + * @var PhpDocExtractor + */ + private $extractor; + + protected function setUp() + { + $this->extractor = new PhpDocExtractor(); + } + + /** + * @dataProvider typesProvider + */ + public function testExtract($property, array $type = null, $shortDescription, $longDescription) + { + $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property)); + $this->assertSame($shortDescription, $this->extractor->getShortDescription('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property)); + $this->assertSame($longDescription, $this->extractor->getLongDescription('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property)); + } + + public function typesProvider() + { + return array( + array('foo', null, 'Short description.', 'Long description.'), + array('bar', array(new Type(Type::BUILTIN_TYPE_STRING)), 'This is bar', null), + array('baz', array(new Type(Type::BUILTIN_TYPE_INT)), 'Should be used.', null), + array('foo2', array(new Type(Type::BUILTIN_TYPE_FLOAT)), null, null), + array('foo3', array(new Type(Type::BUILTIN_TYPE_CALLABLE)), null, null), + array('foo4', array(new Type(Type::BUILTIN_TYPE_NULL)), null, null), + array('foo5', null, null, null), + array( + 'files', + array( + new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'SplFileInfo')), + new Type(Type::BUILTIN_TYPE_RESOURCE), + ), + null, + null, + ), + array('bal', array(new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime')), null, null), + array('parent', array(new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy')), null, null), + array('collection', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))), null, null), + array('a', array(new Type(Type::BUILTIN_TYPE_INT)), 'A.', null), + array('b', array(new Type(Type::BUILTIN_TYPE_OBJECT, true, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy')), 'B.', null), + array('c', array(new Type(Type::BUILTIN_TYPE_BOOL, true)), null, null), + array('d', array(new Type(Type::BUILTIN_TYPE_BOOL)), null, null), + array('e', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_RESOURCE))), null, null), + array('f', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime'))), null, null), + array('donotexist', null, null, null), + array('staticGetter', null, null, null), + array('staticSetter', null, null, null), + ); + } + + public function testReturnNullOnEmptyDocBlock() + { + $this->assertNull($this->extractor->getShortDescription(EmptyDocBlock::class, 'foo')); + } +} + +class EmptyDocBlock +{ + public $foo; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f8a5e453601669da53019dacc45c5d75e857fc91 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php @@ -0,0 +1,153 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Tests\Extractor; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; +use Symfony\Component\PropertyInfo\Tests\Fixtures\AdderRemoverDummy; +use Symfony\Component\PropertyInfo\Type; + +/** + * @author Kévin Dunglas + */ +class ReflectionExtractorTest extends TestCase +{ + /** + * @var ReflectionExtractor + */ + private $extractor; + + protected function setUp() + { + $this->extractor = new ReflectionExtractor(); + } + + public function testGetProperties() + { + $this->assertEquals( + array( + 'bal', + 'parent', + 'collection', + 'B', + 'foo', + 'foo2', + 'foo3', + 'foo4', + 'foo5', + 'files', + 'a', + 'DOB', + 'c', + 'd', + 'e', + 'f', + ), + $this->extractor->getProperties('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy') + ); + } + + /** + * @dataProvider typesProvider + */ + public function testExtractors($property, array $type = null) + { + $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property, array())); + } + + public function typesProvider() + { + return array( + array('a', null), + array('b', array(new Type(Type::BUILTIN_TYPE_OBJECT, true, 'Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy'))), + array('c', array(new Type(Type::BUILTIN_TYPE_BOOL))), + array('d', array(new Type(Type::BUILTIN_TYPE_BOOL))), + array('e', null), + array('f', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime')))), + array('donotexist', null), + array('staticGetter', null), + array('staticSetter', null), + ); + } + + /** + * @dataProvider php7TypesProvider + * @requires PHP 7.0 + */ + public function testExtractPhp7Type($property, array $type = null) + { + $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php7Dummy', $property, array())); + } + + public function php7TypesProvider() + { + return array( + array('foo', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true))), + array('bar', array(new Type(Type::BUILTIN_TYPE_INT))), + array('baz', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING)))), + array('donotexist', null), + ); + } + + /** + * @dataProvider php71TypesProvider + * @requires PHP 7.1 + */ + public function testExtractPhp71Type($property, array $type = null) + { + $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php71Dummy', $property, array())); + } + + public function php71TypesProvider() + { + return array( + array('foo', array(new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true))), + array('buz', array(new Type(Type::BUILTIN_TYPE_NULL))), + array('bar', array(new Type(Type::BUILTIN_TYPE_INT, true))), + array('baz', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING)))), + array('donotexist', null), + ); + } + + public function testIsReadable() + { + $this->assertFalse($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'bar', array())); + $this->assertFalse($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'baz', array())); + $this->assertTrue($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'parent', array())); + $this->assertTrue($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'a', array())); + $this->assertFalse($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'b', array())); + $this->assertTrue($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'c', array())); + $this->assertTrue($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'd', array())); + $this->assertFalse($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'e', array())); + $this->assertFalse($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'f', array())); + } + + public function testIsWritable() + { + $this->assertFalse($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'bar', array())); + $this->assertFalse($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'baz', array())); + $this->assertTrue($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'parent', array())); + $this->assertFalse($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'a', array())); + $this->assertTrue($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'b', array())); + $this->assertFalse($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'c', array())); + $this->assertFalse($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'd', array())); + $this->assertTrue($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'e', array())); + $this->assertTrue($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'f', array())); + } + + public function testSingularize() + { + $this->assertTrue($this->extractor->isWritable(AdderRemoverDummy::class, 'analyses')); + $this->assertTrue($this->extractor->isWritable(AdderRemoverDummy::class, 'feet')); + $this->assertEquals(array('analyses', 'feet'), $this->extractor->getProperties(AdderRemoverDummy::class)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractors/SerializerExtractorTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractors/SerializerExtractorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b1be5ee11821e43fc0c01b22c6031af88ec45eb6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Extractors/SerializerExtractorTest.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\Component\PropertyInfo\Tests\Extractors; + +use Doctrine\Common\Annotations\AnnotationReader; +use PHPUnit\Framework\TestCase; +use Symfony\Component\PropertyInfo\Extractor\SerializerExtractor; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; +use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; + +/** + * @author Kévin Dunglas + */ +class SerializerExtractorTest extends TestCase +{ + /** + * @var SerializerExtractor + */ + private $extractor; + + protected function setUp() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->extractor = new SerializerExtractor($classMetadataFactory); + } + + public function testGetProperties() + { + $this->assertEquals( + array('collection'), + $this->extractor->getProperties('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', array('serializer_groups' => array('a'))) + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/AdderRemoverDummy.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/AdderRemoverDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..1c2822e5784ca697144f9cc83f17eca82b66df64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/AdderRemoverDummy.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\Component\PropertyInfo\Tests\Fixtures; + +/** + * @author Kévin Dunglas + */ +class AdderRemoverDummy +{ + private $analyses; + private $feet; + + public function addAnalyse(Dummy $analyse) + { + } + + public function removeFoot(Dummy $foot) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php new file mode 100644 index 0000000000000000000000000000000000000000..96cb87db4a8fa6d2de08d10aa4967179d9e12b1d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Tests\Fixtures; + +use Symfony\Component\Serializer\Annotation\Groups; + +/** + * @author Kévin Dunglas + */ +class Dummy extends ParentDummy +{ + /** + * @var string This is bar + */ + private $bar; + + /** + * Should be used. + * + * @var int Should be ignored + */ + protected $baz; + + /** + * @var \DateTime + */ + public $bal; + + /** + * @var ParentDummy + */ + public $parent; + + /** + * @var \DateTime[] + * @Groups({"a", "b"}) + */ + public $collection; + + /** + * @var ParentDummy + */ + public $B; + + public static function getStatic() + { + } + + /** + * @return string + */ + public static function staticGetter() + { + } + + public static function staticSetter(\DateTime $d) + { + } + + /** + * A. + * + * @return int + */ + public function getA() + { + } + + /** + * B. + * + * @param ParentDummy|null $parent + */ + public function setB(ParentDummy $parent = null) + { + } + + /** + * Date of Birth. + * + * @return \DateTime + */ + public function getDOB() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyExtractor.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyExtractor.php new file mode 100644 index 0000000000000000000000000000000000000000..cfabcf2a90219030bec62174c866a3f3eec04c70 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyExtractor.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Tests\Fixtures; + +use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; +use Symfony\Component\PropertyInfo\Type; + +/** + * @author Kévin Dunglas + */ +class DummyExtractor implements PropertyListExtractorInterface, PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface, PropertyAccessExtractorInterface +{ + /** + * {@inheritdoc} + */ + public function getShortDescription($class, $property, array $context = array()) + { + return 'short'; + } + + /** + * {@inheritdoc} + */ + public function getLongDescription($class, $property, array $context = array()) + { + return 'long'; + } + + /** + * {@inheritdoc} + */ + public function getTypes($class, $property, array $context = array()) + { + return array(new Type(Type::BUILTIN_TYPE_INT)); + } + + /** + * {@inheritdoc} + */ + public function isReadable($class, $property, array $context = array()) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function isWritable($class, $property, array $context = array()) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function getProperties($class, array $context = array()) + { + return array('a', 'b'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/NullExtractor.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/NullExtractor.php new file mode 100644 index 0000000000000000000000000000000000000000..4c2af411204556846aa061062b498f963cf2a18f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/NullExtractor.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Tests\Fixtures; + +use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; + +/** + * Not able to guess anything. + * + * @author Kévin Dunglas + */ +class NullExtractor implements PropertyListExtractorInterface, PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface, PropertyAccessExtractorInterface +{ + /** + * {@inheritdoc} + */ + public function getShortDescription($class, $property, array $context = array()) + { + $this->assertIsString($class); + $this->assertIsString($property); + } + + /** + * {@inheritdoc} + */ + public function getLongDescription($class, $property, array $context = array()) + { + $this->assertIsString($class); + $this->assertIsString($property); + } + + /** + * {@inheritdoc} + */ + public function getTypes($class, $property, array $context = array()) + { + $this->assertIsString($class); + $this->assertIsString($property); + } + + /** + * {@inheritdoc} + */ + public function isReadable($class, $property, array $context = array()) + { + $this->assertIsString($class); + $this->assertIsString($property); + } + + /** + * {@inheritdoc} + */ + public function isWritable($class, $property, array $context = array()) + { + $this->assertIsString($class); + $this->assertIsString($property); + } + + /** + * {@inheritdoc} + */ + public function getProperties($class, array $context = array()) + { + $this->assertIsString($class); + } + + private function assertIsString($string) + { + if (!is_string($string)) { + throw new \InvalidArgumentException(sprintf('"%s" expects strings, given "%s".', __CLASS__, gettype($string))); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/ParentDummy.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/ParentDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..330496827cfc4bb46caeb9f5d27887889214ffbb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/ParentDummy.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Tests\Fixtures; + +/** + * @author Kévin Dunglas + */ +class ParentDummy +{ + /** + * Short description. + * + * Long description. + */ + public $foo; + + /** + * @var float + */ + public $foo2; + + /** + * @var callback + */ + public $foo3; + + /** + * @var void + */ + public $foo4; + + /** + * @var mixed + */ + public $foo5; + + /** + * @var \SplFileInfo[]|resource + */ + public $files; + + /** + * @return bool|null + */ + public function isC() + { + } + + /** + * @return bool + */ + public function canD() + { + } + + /** + * @param resource $e + */ + public function addE($e) + { + } + + /** + * @param \DateTime $f + */ + public function removeF(\DateTime $f) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php71Dummy.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php71Dummy.php new file mode 100644 index 0000000000000000000000000000000000000000..e72d376c492fa319b48e0d2b8d1e7bf61212e887 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php71Dummy.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Tests\Fixtures; + +/** + * @author Teoh Han Hui + */ +class Php71Dummy +{ + public function getFoo(): ?array + { + } + + public function getBuz(): void + { + } + + public function setBar(?int $bar) + { + } + + public function addBaz(string $baz) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php7Dummy.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php7Dummy.php new file mode 100644 index 0000000000000000000000000000000000000000..cd5ba380d9d537a3e3e97cd9eb5e0359e2b0a4fb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php7Dummy.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\PropertyInfo\Tests\Fixtures; + +/** + * @author Kévin Dunglas + */ +class Php7Dummy +{ + public function getFoo(): array + { + } + + public function setBar(int $bar) + { + } + + public function addBaz(string $baz) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..455d39fa96c22896f74eec9201f4c33cc514f687 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Tests; + +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\PropertyInfo\PropertyInfoCacheExtractor; + +/** + * @author Kévin Dunglas + */ +class PropertyInfoCacheExtractorTest extends AbstractPropertyInfoExtractorTest +{ + protected function setUp() + { + parent::setUp(); + + $this->propertyInfo = new PropertyInfoCacheExtractor($this->propertyInfo, new ArrayAdapter()); + } + + public function testGetShortDescription() + { + parent::testGetShortDescription(); + parent::testGetShortDescription(); + } + + public function testGetLongDescription() + { + parent::testGetLongDescription(); + parent::testGetLongDescription(); + } + + public function testGetTypes() + { + parent::testGetTypes(); + parent::testGetTypes(); + } + + public function testIsReadable() + { + parent::testIsReadable(); + parent::testIsReadable(); + } + + public function testIsWritable() + { + parent::testIsWritable(); + parent::testIsWritable(); + } + + public function testGetProperties() + { + parent::testGetProperties(); + parent::testGetProperties(); + } + + /** + * @dataProvider escapeDataProvider + */ + public function testEscape($toEscape, $expected) + { + $reflectionMethod = new \ReflectionMethod($this->propertyInfo, 'escape'); + $reflectionMethod->setAccessible(true); + + $this->assertSame($expected, $reflectionMethod->invoke($this->propertyInfo, $toEscape)); + } + + public function escapeDataProvider() + { + return array( + array('foo_bar', 'foo_95bar'), + array('foo_95bar', 'foo_9595bar'), + array('foo{bar}', 'foo_123bar_125'), + array('foo(bar)', 'foo_40bar_41'), + array('foo/bar', 'foo_47bar'), + array('foo\bar', 'foo_92bar'), + array('foo@bar', 'foo_64bar'), + array('foo:bar', 'foo_58bar'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoExtractorTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoExtractorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..53c1b1d8a5c2228c5660330590587ef2890a03f2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoExtractorTest.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Tests; + +/** + * @author Kévin Dunglas + */ +class PropertyInfoExtractorTest extends AbstractPropertyInfoExtractorTest +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/TypeTest.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/TypeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9266f9808fb55dd3c4aed5e58c4c9ef4513c2423 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Tests/TypeTest.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\PropertyInfo\Type; + +/** + * @author Kévin Dunglas + */ +class TypeTest extends TestCase +{ + public function testConstruct() + { + $type = new Type('object', true, 'ArrayObject', true, new Type('int'), new Type('string')); + + $this->assertEquals(Type::BUILTIN_TYPE_OBJECT, $type->getBuiltinType()); + $this->assertTrue($type->isNullable()); + $this->assertEquals('ArrayObject', $type->getClassName()); + $this->assertTrue($type->isCollection()); + + $collectionKeyType = $type->getCollectionKeyType(); + $this->assertInstanceOf('Symfony\Component\PropertyInfo\Type', $collectionKeyType); + $this->assertEquals(Type::BUILTIN_TYPE_INT, $collectionKeyType->getBuiltinType()); + + $collectionValueType = $type->getCollectionValueType(); + $this->assertInstanceOf('Symfony\Component\PropertyInfo\Type', $collectionValueType); + $this->assertEquals(Type::BUILTIN_TYPE_STRING, $collectionValueType->getBuiltinType()); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage "foo" is not a valid PHP type. + */ + public function testInvalidType() + { + new Type('foo'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Type.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Type.php new file mode 100644 index 0000000000000000000000000000000000000000..ad21f917241f884dab30f9e4c72c1c71b607e22e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Type.php @@ -0,0 +1,169 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo; + +/** + * Type value object (immutable). + * + * @author Kévin Dunglas + */ +class Type +{ + const BUILTIN_TYPE_INT = 'int'; + const BUILTIN_TYPE_FLOAT = 'float'; + const BUILTIN_TYPE_STRING = 'string'; + const BUILTIN_TYPE_BOOL = 'bool'; + const BUILTIN_TYPE_RESOURCE = 'resource'; + const BUILTIN_TYPE_OBJECT = 'object'; + const BUILTIN_TYPE_ARRAY = 'array'; + const BUILTIN_TYPE_NULL = 'null'; + const BUILTIN_TYPE_CALLABLE = 'callable'; + + /** + * List of PHP builtin types. + * + * @var string[] + */ + public static $builtinTypes = array( + self::BUILTIN_TYPE_INT, + self::BUILTIN_TYPE_FLOAT, + self::BUILTIN_TYPE_STRING, + self::BUILTIN_TYPE_BOOL, + self::BUILTIN_TYPE_RESOURCE, + self::BUILTIN_TYPE_OBJECT, + self::BUILTIN_TYPE_ARRAY, + self::BUILTIN_TYPE_CALLABLE, + self::BUILTIN_TYPE_NULL, + ); + + /** + * @var string + */ + private $builtinType; + + /** + * @var bool + */ + private $nullable; + + /** + * @var string|null + */ + private $class; + + /** + * @var bool + */ + private $collection; + + /** + * @var Type|null + */ + private $collectionKeyType; + + /** + * @var Type|null + */ + private $collectionValueType; + + /** + * @param string $builtinType + * @param bool $nullable + * @param string|null $class + * @param bool $collection + * @param Type|null $collectionKeyType + * @param Type|null $collectionValueType + * + * @throws \InvalidArgumentException + */ + public function __construct($builtinType, $nullable = false, $class = null, $collection = false, Type $collectionKeyType = null, Type $collectionValueType = null) + { + if (!in_array($builtinType, self::$builtinTypes)) { + throw new \InvalidArgumentException(sprintf('"%s" is not a valid PHP type.', $builtinType)); + } + + $this->builtinType = $builtinType; + $this->nullable = $nullable; + $this->class = $class; + $this->collection = $collection; + $this->collectionKeyType = $collectionKeyType; + $this->collectionValueType = $collectionValueType; + } + + /** + * Gets built-in type. + * + * Can be bool, int, float, string, array, object, resource, null or callback. + * + * @return string + */ + public function getBuiltinType() + { + return $this->builtinType; + } + + /** + * Allows null value? + * + * @return bool + */ + public function isNullable() + { + return $this->nullable; + } + + /** + * Gets the class name. + * + * Only applicable if the built-in type is object. + * + * @return string|null + */ + public function getClassName() + { + return $this->class; + } + + /** + * Is collection? + * + * @return bool + */ + public function isCollection() + { + return $this->collection; + } + + /** + * Gets collection key type. + * + * Only applicable for a collection type. + * + * @return self|null + */ + public function getCollectionKeyType() + { + return $this->collectionKeyType; + } + + /** + * Gets collection value type. + * + * Only applicable for a collection type. + * + * @return self|null + */ + public function getCollectionValueType() + { + return $this->collectionValueType; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..b374a5dcba7eb40bd15551dd43a1393a68936b09 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php @@ -0,0 +1,159 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyInfo\Util; + +use phpDocumentor\Reflection\Type as DocType; +use phpDocumentor\Reflection\Types\Compound; +use phpDocumentor\Reflection\Types\Null_; +use Symfony\Component\PropertyInfo\Type; + +/** + * Transforms a php doc type to a {@link Type} instance. + * + * @author Kévin Dunglas + * @author Guilhem N. + */ +final class PhpDocTypeHelper +{ + /** + * Creates a {@see Type} from a PHPDoc type. + * + * @return Type + */ + public function getTypes(DocType $varType) + { + $types = array(); + $nullable = false; + + if (!$varType instanceof Compound) { + if ($varType instanceof Null_) { + $nullable = true; + } + + $type = $this->createType((string) $varType, $nullable); + if (null !== $type) { + $types[] = $type; + } + + return $types; + } + + $varTypes = array(); + for ($typeIndex = 0; $varType->has($typeIndex); ++$typeIndex) { + $varTypes[] = (string) $varType->get($typeIndex); + } + + // If null is present, all types are nullable + $nullKey = array_search(Type::BUILTIN_TYPE_NULL, $varTypes); + $nullable = false !== $nullKey; + + // Remove the null type from the type if other types are defined + if ($nullable && count($varTypes) > 1) { + unset($varTypes[$nullKey]); + } + + foreach ($varTypes as $varType) { + $type = $this->createType($varType, $nullable); + if (null !== $type) { + $types[] = $type; + } + } + + return $types; + } + + /** + * Creates a {@see Type} from a PHPDoc type. + * + * @param string $docType + * @param bool $nullable + * + * @return Type|null + */ + private function createType($docType, $nullable) + { + // Cannot guess + if (!$docType || 'mixed' === $docType) { + return; + } + + if ($collection = '[]' === substr($docType, -2)) { + $docType = substr($docType, 0, -2); + } + + $docType = $this->normalizeType($docType); + list($phpType, $class) = $this->getPhpTypeAndClass($docType); + + $array = 'array' === $docType; + + if ($collection || $array) { + if ($array || 'mixed' === $docType) { + $collectionKeyType = null; + $collectionValueType = null; + } else { + $collectionKeyType = new Type(Type::BUILTIN_TYPE_INT); + $collectionValueType = new Type($phpType, false, $class); + } + + return new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, $collectionKeyType, $collectionValueType); + } + + return new Type($phpType, $nullable, $class); + } + + /** + * Normalizes the type. + * + * @param string $docType + * + * @return string + */ + private function normalizeType($docType) + { + switch ($docType) { + case 'integer': + return 'int'; + + case 'boolean': + return 'bool'; + + // real is not part of the PHPDoc standard, so we ignore it + case 'double': + return 'float'; + + case 'callback': + return 'callable'; + + case 'void': + return 'null'; + + default: + return $docType; + } + } + + /** + * Gets an array containing the PHP type and the class. + * + * @param string $docType + * + * @return array + */ + private function getPhpTypeAndClass($docType) + { + if (in_array($docType, Type::$builtinTypes)) { + return array($docType, null); + } + + return array('object', substr($docType, 1)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/composer.json b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..23069a1e7987008d85d4a4078c9b941f717112f1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/composer.json @@ -0,0 +1,57 @@ +{ + "name": "symfony/property-info", + "type": "library", + "description": "Symfony Property Info Component", + "keywords": [ + "property", + "type", + "PHPDoc", + "symfony", + "validator", + "doctrine" + ], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Kévin Dunglas", + "email": "dunglas@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/inflector": "~3.1" + }, + "require-dev": { + "symfony/serializer": "~2.8|~3.0", + "symfony/cache": "~3.1", + "phpdocumentor/reflection-docblock": "^3.0", + "doctrine/annotations": "~1.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.0", + "phpdocumentor/type-resolver": "<0.2.0" + }, + "suggest": { + "psr/cache-implementation": "To cache results", + "symfony/doctrine-bridge": "To use Doctrine metadata", + "phpdocumentor/reflection-docblock": "To use the PHPDoc", + "symfony/serializer": "To use Serializer metadata" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\PropertyInfo\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..518e472db74888497b5683a8e4dc3d8747be1c35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Annotation/Route.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Annotation/Route.php new file mode 100644 index 0000000000000000000000000000000000000000..e3d515702c3d88943456c98d2104308aa372b1bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Annotation/Route.php @@ -0,0 +1,146 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Annotation; + +/** + * Annotation class for @Route(). + * + * @Annotation + * @Target({"CLASS", "METHOD"}) + * + * @author Fabien Potencier + */ +class Route +{ + private $path; + private $name; + private $requirements = array(); + private $options = array(); + private $defaults = array(); + private $host; + private $methods = array(); + private $schemes = array(); + private $condition; + + /** + * Constructor. + * + * @param array $data An array of key/value parameters + * + * @throws \BadMethodCallException + */ + public function __construct(array $data) + { + if (isset($data['value'])) { + $data['path'] = $data['value']; + unset($data['value']); + } + + foreach ($data as $key => $value) { + $method = 'set'.str_replace('_', '', $key); + if (!method_exists($this, $method)) { + throw new \BadMethodCallException(sprintf('Unknown property "%s" on annotation "%s".', $key, get_class($this))); + } + $this->$method($value); + } + } + + public function setPath($path) + { + $this->path = $path; + } + + public function getPath() + { + return $this->path; + } + + public function setHost($pattern) + { + $this->host = $pattern; + } + + public function getHost() + { + return $this->host; + } + + public function setName($name) + { + $this->name = $name; + } + + public function getName() + { + return $this->name; + } + + public function setRequirements($requirements) + { + $this->requirements = $requirements; + } + + public function getRequirements() + { + return $this->requirements; + } + + public function setOptions($options) + { + $this->options = $options; + } + + public function getOptions() + { + return $this->options; + } + + public function setDefaults($defaults) + { + $this->defaults = $defaults; + } + + public function getDefaults() + { + return $this->defaults; + } + + public function setSchemes($schemes) + { + $this->schemes = is_array($schemes) ? $schemes : array($schemes); + } + + public function getSchemes() + { + return $this->schemes; + } + + public function setMethods($methods) + { + $this->methods = is_array($methods) ? $methods : array($methods); + } + + public function getMethods() + { + return $this->methods; + } + + public function setCondition($condition) + { + $this->condition = $condition; + } + + public function getCondition() + { + return $this->condition; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Routing/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..5c21324c55821d5ecd82044b740b3956eca8ba28 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/CHANGELOG.md @@ -0,0 +1,206 @@ +CHANGELOG +========= + +3.2.0 +----- + + * Added support for `bool`, `int`, `float`, `string`, `list` and `map` defaults in XML configurations. + * Added support for UTF-8 requirements + +2.8.0 +----- + + * allowed specifying a directory to recursively load all routing configuration files it contains + * Added ObjectRouteLoader and ServiceRouteLoader that allow routes to be loaded + by calling a method on an object/service. + * [DEPRECATION] Deprecated the hardcoded value for the `$referenceType` argument of the `UrlGeneratorInterface::generate` method. + Use the constants defined in the `UrlGeneratorInterface` instead. + + Before: + + ```php + $router->generate('blog_show', array('slug' => 'my-blog-post'), true); + ``` + + After: + + ```php + use Symfony\Component\Routing\Generator\UrlGeneratorInterface; + + $router->generate('blog_show', array('slug' => 'my-blog-post'), UrlGeneratorInterface::ABSOLUTE_URL); + ``` + +2.5.0 +----- + + * [DEPRECATION] The `ApacheMatcherDumper` and `ApacheUrlMatcher` were deprecated and + will be removed in Symfony 3.0, since the performance gains were minimal and + it's hard to replicate the behaviour of PHP implementation. + +2.3.0 +----- + + * added RequestContext::getQueryString() + +2.2.0 +----- + + * [DEPRECATION] Several route settings have been renamed (the old ones will be removed in 3.0): + + * The `pattern` setting for a route has been deprecated in favor of `path` + * The `_scheme` and `_method` requirements have been moved to the `schemes` and `methods` settings + + Before: + + ```yaml + article_edit: + pattern: /article/{id} + requirements: { '_method': 'POST|PUT', '_scheme': 'https', 'id': '\d+' } + ``` + + ```xml + + POST|PUT + https + \d+ + + ``` + + ```php + $route = new Route(); + $route->setPattern('/article/{id}'); + $route->setRequirement('_method', 'POST|PUT'); + $route->setRequirement('_scheme', 'https'); + ``` + + After: + + ```yaml + article_edit: + path: /article/{id} + methods: [POST, PUT] + schemes: https + requirements: { 'id': '\d+' } + ``` + + ```xml + + \d+ + + ``` + + ```php + $route = new Route(); + $route->setPath('/article/{id}'); + $route->setMethods(array('POST', 'PUT')); + $route->setSchemes('https'); + ``` + + * [BC BREAK] RouteCollection does not behave like a tree structure anymore but as + a flat array of Routes. So when using PHP to build the RouteCollection, you must + make sure to add routes to the sub-collection before adding it to the parent + collection (this is not relevant when using YAML or XML for Route definitions). + + Before: + + ```php + $rootCollection = new RouteCollection(); + $subCollection = new RouteCollection(); + $rootCollection->addCollection($subCollection); + $subCollection->add('foo', new Route('/foo')); + ``` + + After: + + ```php + $rootCollection = new RouteCollection(); + $subCollection = new RouteCollection(); + $subCollection->add('foo', new Route('/foo')); + $rootCollection->addCollection($subCollection); + ``` + + Also one must call `addCollection` from the bottom to the top hierarchy. + So the correct sequence is the following (and not the reverse): + + ```php + $childCollection->addCollection($grandchildCollection); + $rootCollection->addCollection($childCollection); + ``` + + * [DEPRECATION] The methods `RouteCollection::getParent()` and `RouteCollection::getRoot()` + have been deprecated and will be removed in Symfony 2.3. + * [BC BREAK] Misusing the `RouteCollection::addPrefix` method to add defaults, requirements + or options without adding a prefix is not supported anymore. So if you called `addPrefix` + with an empty prefix or `/` only (both have no relevance), like + `addPrefix('', $defaultsArray, $requirementsArray, $optionsArray)` + you need to use the new dedicated methods `addDefaults($defaultsArray)`, + `addRequirements($requirementsArray)` or `addOptions($optionsArray)` instead. + * [DEPRECATION] The `$options` parameter to `RouteCollection::addPrefix()` has been deprecated + because adding options has nothing to do with adding a path prefix. If you want to add options + to all child routes of a RouteCollection, you can use `addOptions()`. + * [DEPRECATION] The method `RouteCollection::getPrefix()` has been deprecated + because it suggested that all routes in the collection would have this prefix, which is + not necessarily true. On top of that, since there is no tree structure anymore, this method + is also useless. Don't worry about performance, prefix optimization for matching is still done + in the dumper, which was also improved in 2.2.0 to find even more grouping possibilities. + * [DEPRECATION] `RouteCollection::addCollection(RouteCollection $collection)` should now only be + used with a single parameter. The other params `$prefix`, `$default`, `$requirements` and `$options` + will still work, but have been deprecated. The `addPrefix` method should be used for this + use-case instead. + Before: `$parentCollection->addCollection($collection, '/prefix', array(...), array(...))` + After: + ```php + $collection->addPrefix('/prefix', array(...), array(...)); + $parentCollection->addCollection($collection); + ``` + * added support for the method default argument values when defining a @Route + * Adjacent placeholders without separator work now, e.g. `/{x}{y}{z}.{_format}`. + * Characters that function as separator between placeholders are now whitelisted + to fix routes with normal text around a variable, e.g. `/prefix{var}suffix`. + * [BC BREAK] The default requirement of a variable has been changed slightly. + Previously it disallowed the previous and the next char around a variable. Now + it disallows the slash (`/`) and the next char. Using the previous char added + no value and was problematic because the route `/index.{_format}` would be + matched by `/index.ht/ml`. + * The default requirement now uses possessive quantifiers when possible which + improves matching performance by up to 20% because it prevents backtracking + when it's not needed. + * The ConfigurableRequirementsInterface can now also be used to disable the requirements + check on URL generation completely by calling `setStrictRequirements(null)`. It + improves performance in production environment as you should know that params always + pass the requirements (otherwise it would break your link anyway). + * There is no restriction on the route name anymore. So non-alphanumeric characters + are now also allowed. + * [BC BREAK] `RouteCompilerInterface::compile(Route $route)` was made static + (only relevant if you implemented your own RouteCompiler). + * Added possibility to generate relative paths and network paths in the UrlGenerator, e.g. + "../parent-file" and "//example.com/dir/file". The third parameter in + `UrlGeneratorInterface::generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)` + now accepts more values and you should use the constants defined in `UrlGeneratorInterface` for + claritiy. The old method calls with a Boolean parameter will continue to work because they + equal the signature using the constants. + +2.1.0 +----- + + * added RequestMatcherInterface + * added RequestContext::fromRequest() + * the UrlMatcher does not throw a \LogicException anymore when the required + scheme is not the current one + * added TraceableUrlMatcher + * added the possibility to define options, default values and requirements + for placeholders in prefix, including imported routes + * added RouterInterface::getRouteCollection + * [BC BREAK] the UrlMatcher urldecodes the route parameters only once, they + were decoded twice before. Note that the `urldecode()` calls have been + changed for a single `rawurldecode()` in order to support `+` for input + paths. + * added RouteCollection::getRoot method to retrieve the root of a + RouteCollection tree + * [BC BREAK] made RouteCollection::setParent private which could not have + been used anyway without creating inconsistencies + * [BC BREAK] RouteCollection::remove also removes a route from parent + collections (not only from its children) + * added ConfigurableRequirementsInterface that allows to disable exceptions + (and generate empty URLs instead) when generating a route with an invalid + parameter value diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/CompiledRoute.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/CompiledRoute.php new file mode 100644 index 0000000000000000000000000000000000000000..3eca9ecd8b010b0fac851d0f938631b042da1304 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/CompiledRoute.php @@ -0,0 +1,166 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing; + +/** + * CompiledRoutes are returned by the RouteCompiler class. + * + * @author Fabien Potencier + */ +class CompiledRoute implements \Serializable +{ + private $variables; + private $tokens; + private $staticPrefix; + private $regex; + private $pathVariables; + private $hostVariables; + private $hostRegex; + private $hostTokens; + + /** + * Constructor. + * + * @param string $staticPrefix The static prefix of the compiled route + * @param string $regex The regular expression to use to match this route + * @param array $tokens An array of tokens to use to generate URL for this route + * @param array $pathVariables An array of path variables + * @param string|null $hostRegex Host regex + * @param array $hostTokens Host tokens + * @param array $hostVariables An array of host variables + * @param array $variables An array of variables (variables defined in the path and in the host patterns) + */ + public function __construct($staticPrefix, $regex, array $tokens, array $pathVariables, $hostRegex = null, array $hostTokens = array(), array $hostVariables = array(), array $variables = array()) + { + $this->staticPrefix = (string) $staticPrefix; + $this->regex = $regex; + $this->tokens = $tokens; + $this->pathVariables = $pathVariables; + $this->hostRegex = $hostRegex; + $this->hostTokens = $hostTokens; + $this->hostVariables = $hostVariables; + $this->variables = $variables; + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize(array( + 'vars' => $this->variables, + 'path_prefix' => $this->staticPrefix, + 'path_regex' => $this->regex, + 'path_tokens' => $this->tokens, + 'path_vars' => $this->pathVariables, + 'host_regex' => $this->hostRegex, + 'host_tokens' => $this->hostTokens, + 'host_vars' => $this->hostVariables, + )); + } + + /** + * {@inheritdoc} + */ + public function unserialize($serialized) + { + $data = unserialize($serialized); + $this->variables = $data['vars']; + $this->staticPrefix = $data['path_prefix']; + $this->regex = $data['path_regex']; + $this->tokens = $data['path_tokens']; + $this->pathVariables = $data['path_vars']; + $this->hostRegex = $data['host_regex']; + $this->hostTokens = $data['host_tokens']; + $this->hostVariables = $data['host_vars']; + } + + /** + * Returns the static prefix. + * + * @return string The static prefix + */ + public function getStaticPrefix() + { + return $this->staticPrefix; + } + + /** + * Returns the regex. + * + * @return string The regex + */ + public function getRegex() + { + return $this->regex; + } + + /** + * Returns the host regex. + * + * @return string|null The host regex or null + */ + public function getHostRegex() + { + return $this->hostRegex; + } + + /** + * Returns the tokens. + * + * @return array The tokens + */ + public function getTokens() + { + return $this->tokens; + } + + /** + * Returns the host tokens. + * + * @return array The tokens + */ + public function getHostTokens() + { + return $this->hostTokens; + } + + /** + * Returns the variables. + * + * @return array The variables + */ + public function getVariables() + { + return $this->variables; + } + + /** + * Returns the path variables. + * + * @return array The variables + */ + public function getPathVariables() + { + return $this->pathVariables; + } + + /** + * Returns the host variables. + * + * @return array The variables + */ + public function getHostVariables() + { + return $this->hostVariables; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..db7636211fe42dd0948fc88bf684d8874e6efbcb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Exception; + +/** + * ExceptionInterface. + * + * @author Alexandre Salomé + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/InvalidParameterException.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/InvalidParameterException.php new file mode 100644 index 0000000000000000000000000000000000000000..94d841f4ce6c62db5a25b48fb939e8469f8df3dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/InvalidParameterException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Exception; + +/** + * Exception thrown when a parameter is not valid. + * + * @author Alexandre Salomé + */ +class InvalidParameterException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php new file mode 100644 index 0000000000000000000000000000000000000000..f684c74916c1598848144a392453227f2a9fb1d7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Exception; + +/** + * The resource was found but the request method is not allowed. + * + * This exception should trigger an HTTP 405 response in your application code. + * + * @author Kris Wallsmith + */ +class MethodNotAllowedException extends \RuntimeException implements ExceptionInterface +{ + /** + * @var array + */ + protected $allowedMethods = array(); + + public function __construct(array $allowedMethods, $message = null, $code = 0, \Exception $previous = null) + { + $this->allowedMethods = array_map('strtoupper', $allowedMethods); + + parent::__construct($message, $code, $previous); + } + + /** + * Gets the allowed HTTP methods. + * + * @return array + */ + public function getAllowedMethods() + { + return $this->allowedMethods; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/MissingMandatoryParametersException.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/MissingMandatoryParametersException.php new file mode 100644 index 0000000000000000000000000000000000000000..57f3a40dfa7ff77e28c3b5142b5627e0236118c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/MissingMandatoryParametersException.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Exception; + +/** + * Exception thrown when a route cannot be generated because of missing + * mandatory parameters. + * + * @author Alexandre Salomé + */ +class MissingMandatoryParametersException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/ResourceNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/ResourceNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..ccbca15270b459d2f6ce508fd58e328d7fa112de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/ResourceNotFoundException.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Exception; + +/** + * The resource was not found. + * + * This exception should trigger an HTTP 404 response in your application code. + * + * @author Kris Wallsmith + */ +class ResourceNotFoundException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/RouteNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/RouteNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..24ab0b44a913b5fbcfd5cab9c0ae013586b04feb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Exception/RouteNotFoundException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Exception; + +/** + * Exception thrown when a route does not exist. + * + * @author Alexandre Salomé + */ +class RouteNotFoundException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/ConfigurableRequirementsInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/ConfigurableRequirementsInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..dc97b7e724f7fe0df86b8354d7d2f3cdbfd57fa8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/ConfigurableRequirementsInterface.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Generator; + +/** + * ConfigurableRequirementsInterface must be implemented by URL generators that + * can be configured whether an exception should be generated when the parameters + * do not match the requirements. It is also possible to disable the requirements + * check for URL generation completely. + * + * The possible configurations and use-cases: + * - setStrictRequirements(true): Throw an exception for mismatching requirements. This + * is mostly useful in development environment. + * - setStrictRequirements(false): Don't throw an exception but return null as URL for + * mismatching requirements and log the problem. Useful when you cannot control all + * params because they come from third party libs but don't want to have a 404 in + * production environment. It should log the mismatch so one can review it. + * - setStrictRequirements(null): Return the URL with the given parameters without + * checking the requirements at all. When generating a URL you should either trust + * your params or you validated them beforehand because otherwise it would break your + * link anyway. So in production environment you should know that params always pass + * the requirements. Thus this option allows to disable the check on URL generation for + * performance reasons (saving a preg_match for each requirement every time a URL is + * generated). + * + * @author Fabien Potencier + * @author Tobias Schultze + */ +interface ConfigurableRequirementsInterface +{ + /** + * Enables or disables the exception on incorrect parameters. + * Passing null will deactivate the requirements check completely. + * + * @param bool|null $enabled + */ + public function setStrictRequirements($enabled); + + /** + * Returns whether to throw an exception on incorrect parameters. + * Null means the requirements check is deactivated completely. + * + * @return bool|null + */ + public function isStrictRequirements(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..4739bd8365cea4d2d94542ae76f5880771eb35f3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.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\Component\Routing\Generator\Dumper; + +use Symfony\Component\Routing\RouteCollection; + +/** + * GeneratorDumper is the base class for all built-in generator dumpers. + * + * @author Fabien Potencier + */ +abstract class GeneratorDumper implements GeneratorDumperInterface +{ + /** + * @var RouteCollection + */ + private $routes; + + /** + * Constructor. + * + * @param RouteCollection $routes The RouteCollection to dump + */ + public function __construct(RouteCollection $routes) + { + $this->routes = $routes; + } + + /** + * {@inheritdoc} + */ + public function getRoutes() + { + return $this->routes; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..fed34723927735b7ef9a3b902807dd71defdb830 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Generator\Dumper; + +use Symfony\Component\Routing\RouteCollection; + +/** + * GeneratorDumperInterface is the interface that all generator dumper classes must implement. + * + * @author Fabien Potencier + */ +interface GeneratorDumperInterface +{ + /** + * Dumps a set of routes to a string representation of executable code + * that can then be used to generate a URL of such a route. + * + * @param array $options An array of options + * + * @return string Executable code + */ + public function dump(array $options = array()); + + /** + * Gets the routes to dump. + * + * @return RouteCollection A RouteCollection instance + */ + public function getRoutes(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..9fd35ea112559499010eaf88f6a452fcdf172a19 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Generator\Dumper; + +/** + * PhpGeneratorDumper creates a PHP class able to generate URLs for a given set of routes. + * + * @author Fabien Potencier + * @author Tobias Schultze + */ +class PhpGeneratorDumper extends GeneratorDumper +{ + /** + * Dumps a set of routes to a PHP class. + * + * Available options: + * + * * class: The class name + * * base_class: The base class name + * + * @param array $options An array of options + * + * @return string A PHP class representing the generator class + */ + public function dump(array $options = array()) + { + $options = array_merge(array( + 'class' => 'ProjectUrlGenerator', + 'base_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', + ), $options); + + return <<context = \$context; + \$this->logger = \$logger; + if (null === self::\$declaredRoutes) { + self::\$declaredRoutes = {$this->generateDeclaredRoutes()}; + } + } + +{$this->generateGenerateMethod()} +} + +EOF; + } + + /** + * Generates PHP code representing an array of defined routes + * together with the routes properties (e.g. requirements). + * + * @return string PHP code + */ + private function generateDeclaredRoutes() + { + $routes = "array(\n"; + foreach ($this->getRoutes()->all() as $name => $route) { + $compiledRoute = $route->compile(); + + $properties = array(); + $properties[] = $compiledRoute->getVariables(); + $properties[] = $route->getDefaults(); + $properties[] = $route->getRequirements(); + $properties[] = $compiledRoute->getTokens(); + $properties[] = $compiledRoute->getHostTokens(); + $properties[] = $route->getSchemes(); + + $routes .= sprintf(" '%s' => %s,\n", $name, str_replace("\n", '', var_export($properties, true))); + } + $routes .= ' )'; + + return $routes; + } + + /** + * Generates PHP code representing the `generate` method that implements the UrlGeneratorInterface. + * + * @return string PHP code + */ + private function generateGenerateMethod() + { + return <<<'EOF' + public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) + { + if (!isset(self::$declaredRoutes[$name])) { + throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name)); + } + + list($variables, $defaults, $requirements, $tokens, $hostTokens, $requiredSchemes) = self::$declaredRoutes[$name]; + + return $this->doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, $requiredSchemes); + } +EOF; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGenerator.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..342161e1243a550cf4e19dece1b1a6e88ac2debb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGenerator.php @@ -0,0 +1,339 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Generator; + +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Routing\Exception\InvalidParameterException; +use Symfony\Component\Routing\Exception\RouteNotFoundException; +use Symfony\Component\Routing\Exception\MissingMandatoryParametersException; +use Psr\Log\LoggerInterface; + +/** + * UrlGenerator can generate a URL or a path for any route in the RouteCollection + * based on the passed parameters. + * + * @author Fabien Potencier + * @author Tobias Schultze + */ +class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInterface +{ + /** + * @var RouteCollection + */ + protected $routes; + + /** + * @var RequestContext + */ + protected $context; + + /** + * @var bool|null + */ + protected $strictRequirements = true; + + /** + * @var LoggerInterface|null + */ + protected $logger; + + /** + * This array defines the characters (besides alphanumeric ones) that will not be percent-encoded in the path segment of the generated URL. + * + * PHP's rawurlencode() encodes all chars except "a-zA-Z0-9-._~" according to RFC 3986. But we want to allow some chars + * to be used in their literal form (reasons below). Other chars inside the path must of course be encoded, e.g. + * "?" and "#" (would be interpreted wrongly as query and fragment identifier), + * "'" and """ (are used as delimiters in HTML). + */ + protected $decodedChars = array( + // the slash can be used to designate a hierarchical structure and we want allow using it with this meaning + // some webservers don't allow the slash in encoded form in the path for security reasons anyway + // see http://stackoverflow.com/questions/4069002/http-400-if-2f-part-of-get-url-in-jboss + '%2F' => '/', + // the following chars are general delimiters in the URI specification but have only special meaning in the authority component + // so they can safely be used in the path in unencoded form + '%40' => '@', + '%3A' => ':', + // these chars are only sub-delimiters that have no predefined meaning and can therefore be used literally + // so URI producing applications can use these chars to delimit subcomponents in a path segment without being encoded for better readability + '%3B' => ';', + '%2C' => ',', + '%3D' => '=', + '%2B' => '+', + '%21' => '!', + '%2A' => '*', + '%7C' => '|', + ); + + /** + * Constructor. + * + * @param RouteCollection $routes A RouteCollection instance + * @param RequestContext $context The context + * @param LoggerInterface|null $logger A logger instance + */ + public function __construct(RouteCollection $routes, RequestContext $context, LoggerInterface $logger = null) + { + $this->routes = $routes; + $this->context = $context; + $this->logger = $logger; + } + + /** + * {@inheritdoc} + */ + public function setContext(RequestContext $context) + { + $this->context = $context; + } + + /** + * {@inheritdoc} + */ + public function getContext() + { + return $this->context; + } + + /** + * {@inheritdoc} + */ + public function setStrictRequirements($enabled) + { + $this->strictRequirements = null === $enabled ? null : (bool) $enabled; + } + + /** + * {@inheritdoc} + */ + public function isStrictRequirements() + { + return $this->strictRequirements; + } + + /** + * {@inheritdoc} + */ + public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) + { + if (null === $route = $this->routes->get($name)) { + throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name)); + } + + // the Route has a cache of its own and is not recompiled as long as it does not get modified + $compiledRoute = $route->compile(); + + return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $name, $referenceType, $compiledRoute->getHostTokens(), $route->getSchemes()); + } + + /** + * @throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route + * @throws InvalidParameterException When a parameter value for a placeholder is not correct because + * it does not match the requirement + */ + protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, array $requiredSchemes = array()) + { + $variables = array_flip($variables); + $mergedParams = array_replace($defaults, $this->context->getParameters(), $parameters); + + // all params must be given + if ($diff = array_diff_key($variables, $mergedParams)) { + throw new MissingMandatoryParametersException(sprintf('Some mandatory parameters are missing ("%s") to generate a URL for route "%s".', implode('", "', array_keys($diff)), $name)); + } + + $url = ''; + $optional = true; + $message = 'Parameter "{parameter}" for route "{route}" must match "{expected}" ("{given}" given) to generate a corresponding URL.'; + foreach ($tokens as $token) { + if ('variable' === $token[0]) { + if (!$optional || !array_key_exists($token[3], $defaults) || null !== $mergedParams[$token[3]] && (string) $mergedParams[$token[3]] !== (string) $defaults[$token[3]]) { + // check requirement + if (null !== $this->strictRequirements && !preg_match('#^'.$token[2].'$#'.(empty($token[4]) ? '' : 'u'), $mergedParams[$token[3]])) { + if ($this->strictRequirements) { + throw new InvalidParameterException(strtr($message, array('{parameter}' => $token[3], '{route}' => $name, '{expected}' => $token[2], '{given}' => $mergedParams[$token[3]]))); + } + + if ($this->logger) { + $this->logger->error($message, array('parameter' => $token[3], 'route' => $name, 'expected' => $token[2], 'given' => $mergedParams[$token[3]])); + } + + return; + } + + $url = $token[1].$mergedParams[$token[3]].$url; + $optional = false; + } + } else { + // static text + $url = $token[1].$url; + $optional = false; + } + } + + if ('' === $url) { + $url = '/'; + } + + // the contexts base URL is already encoded (see Symfony\Component\HttpFoundation\Request) + $url = strtr(rawurlencode($url), $this->decodedChars); + + // the path segments "." and ".." are interpreted as relative reference when resolving a URI; see http://tools.ietf.org/html/rfc3986#section-3.3 + // so we need to encode them as they are not used for this purpose here + // otherwise we would generate a URI that, when followed by a user agent (e.g. browser), does not match this route + $url = strtr($url, array('/../' => '/%2E%2E/', '/./' => '/%2E/')); + if ('/..' === substr($url, -3)) { + $url = substr($url, 0, -2).'%2E%2E'; + } elseif ('/.' === substr($url, -2)) { + $url = substr($url, 0, -1).'%2E'; + } + + $schemeAuthority = ''; + if ($host = $this->context->getHost()) { + $scheme = $this->context->getScheme(); + + if ($requiredSchemes) { + if (!in_array($scheme, $requiredSchemes, true)) { + $referenceType = self::ABSOLUTE_URL; + $scheme = current($requiredSchemes); + } + } + + if ($hostTokens) { + $routeHost = ''; + foreach ($hostTokens as $token) { + if ('variable' === $token[0]) { + if (null !== $this->strictRequirements && !preg_match('#^'.$token[2].'$#i'.(empty($token[4]) ? '' : 'u'), $mergedParams[$token[3]])) { + if ($this->strictRequirements) { + throw new InvalidParameterException(strtr($message, array('{parameter}' => $token[3], '{route}' => $name, '{expected}' => $token[2], '{given}' => $mergedParams[$token[3]]))); + } + + if ($this->logger) { + $this->logger->error($message, array('parameter' => $token[3], 'route' => $name, 'expected' => $token[2], 'given' => $mergedParams[$token[3]])); + } + + return; + } + + $routeHost = $token[1].$mergedParams[$token[3]].$routeHost; + } else { + $routeHost = $token[1].$routeHost; + } + } + + if ($routeHost !== $host) { + $host = $routeHost; + if (self::ABSOLUTE_URL !== $referenceType) { + $referenceType = self::NETWORK_PATH; + } + } + } + + if (self::ABSOLUTE_URL === $referenceType || self::NETWORK_PATH === $referenceType) { + $port = ''; + if ('http' === $scheme && 80 != $this->context->getHttpPort()) { + $port = ':'.$this->context->getHttpPort(); + } elseif ('https' === $scheme && 443 != $this->context->getHttpsPort()) { + $port = ':'.$this->context->getHttpsPort(); + } + + $schemeAuthority = self::NETWORK_PATH === $referenceType ? '//' : "$scheme://"; + $schemeAuthority .= $host.$port; + } + } + + if (self::RELATIVE_PATH === $referenceType) { + $url = self::getRelativePath($this->context->getPathInfo(), $url); + } else { + $url = $schemeAuthority.$this->context->getBaseUrl().$url; + } + + // add a query string if needed + $extra = array_udiff_assoc(array_diff_key($parameters, $variables), $defaults, function ($a, $b) { + return $a == $b ? 0 : 1; + }); + + // extract fragment + $fragment = ''; + if (isset($defaults['_fragment'])) { + $fragment = $defaults['_fragment']; + } + + if (isset($extra['_fragment'])) { + $fragment = $extra['_fragment']; + unset($extra['_fragment']); + } + + if ($extra && $query = http_build_query($extra, '', '&', PHP_QUERY_RFC3986)) { + // "/" and "?" can be left decoded for better user experience, see + // http://tools.ietf.org/html/rfc3986#section-3.4 + $url .= '?'.strtr($query, array('%2F' => '/')); + } + + if ('' !== $fragment) { + $url .= '#'.strtr(rawurlencode($fragment), array('%2F' => '/', '%3F' => '?')); + } + + return $url; + } + + /** + * Returns the target path as relative reference from the base path. + * + * Only the URIs path component (no schema, host etc.) is relevant and must be given, starting with a slash. + * Both paths must be absolute and not contain relative parts. + * Relative URLs from one resource to another are useful when generating self-contained downloadable document archives. + * Furthermore, they can be used to reduce the link size in documents. + * + * Example target paths, given a base path of "/a/b/c/d": + * - "/a/b/c/d" -> "" + * - "/a/b/c/" -> "./" + * - "/a/b/" -> "../" + * - "/a/b/c/other" -> "other" + * - "/a/x/y" -> "../../x/y" + * + * @param string $basePath The base path + * @param string $targetPath The target path + * + * @return string The relative target path + */ + public static function getRelativePath($basePath, $targetPath) + { + if ($basePath === $targetPath) { + return ''; + } + + $sourceDirs = explode('/', isset($basePath[0]) && '/' === $basePath[0] ? substr($basePath, 1) : $basePath); + $targetDirs = explode('/', isset($targetPath[0]) && '/' === $targetPath[0] ? substr($targetPath, 1) : $targetPath); + array_pop($sourceDirs); + $targetFile = array_pop($targetDirs); + + foreach ($sourceDirs as $i => $dir) { + if (isset($targetDirs[$i]) && $dir === $targetDirs[$i]) { + unset($sourceDirs[$i], $targetDirs[$i]); + } else { + break; + } + } + + $targetDirs[] = $targetFile; + $path = str_repeat('../', count($sourceDirs)).implode('/', $targetDirs); + + // A reference to the same base directory or an empty subdirectory must be prefixed with "./". + // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used + // as the first segment of a relative-path reference, as it would be mistaken for a scheme name + // (see http://tools.ietf.org/html/rfc3986#section-4.2). + return '' === $path || '/' === $path[0] + || false !== ($colonPos = strpos($path, ':')) && ($colonPos < ($slashPos = strpos($path, '/')) || false === $slashPos) + ? "./$path" : $path; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d6e7938e5ba065f64718806f0522d9aafbc372c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Generator; + +use Symfony\Component\Routing\Exception\InvalidParameterException; +use Symfony\Component\Routing\Exception\MissingMandatoryParametersException; +use Symfony\Component\Routing\Exception\RouteNotFoundException; +use Symfony\Component\Routing\RequestContextAwareInterface; + +/** + * UrlGeneratorInterface is the interface that all URL generator classes must implement. + * + * The constants in this interface define the different types of resource references that + * are declared in RFC 3986: http://tools.ietf.org/html/rfc3986 + * We are using the term "URL" instead of "URI" as this is more common in web applications + * and we do not need to distinguish them as the difference is mostly semantical and + * less technical. Generating URIs, i.e. representation-independent resource identifiers, + * is also possible. + * + * @author Fabien Potencier + * @author Tobias Schultze + */ +interface UrlGeneratorInterface extends RequestContextAwareInterface +{ + /** + * Generates an absolute URL, e.g. "http://example.com/dir/file". + */ + const ABSOLUTE_URL = 0; + + /** + * Generates an absolute path, e.g. "/dir/file". + */ + const ABSOLUTE_PATH = 1; + + /** + * Generates a relative path based on the current request path, e.g. "../parent-file". + * + * @see UrlGenerator::getRelativePath() + */ + const RELATIVE_PATH = 2; + + /** + * Generates a network path, e.g. "//example.com/dir/file". + * Such reference reuses the current scheme but specifies the host. + */ + const NETWORK_PATH = 3; + + /** + * Generates a URL or path for a specific route based on the given parameters. + * + * Parameters that reference placeholders in the route pattern will substitute them in the + * path or host. Extra params are added as query string to the URL. + * + * When the passed reference type cannot be generated for the route because it requires a different + * host or scheme than the current one, the method will return a more comprehensive reference + * that includes the required params. For example, when you call this method with $referenceType = ABSOLUTE_PATH + * but the route requires the https scheme whereas the current scheme is http, it will instead return an + * ABSOLUTE_URL with the https scheme and the current host. This makes sure the generated URL matches + * the route in any case. + * + * If there is no route with the given name, the generator must throw the RouteNotFoundException. + * + * The special parameter _fragment will be used as the document fragment suffixed to the final URL. + * + * @param string $name The name of the route + * @param mixed $parameters An array of parameters + * @param int $referenceType The type of reference to be generated (one of the constants) + * + * @return string The generated URL + * + * @throws RouteNotFoundException If the named route doesn't exist + * @throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route + * @throws InvalidParameterException When a parameter value for a placeholder is not correct because + * it does not match the requirement + */ + public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Routing/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..8463673e2d1ac996705a1799867799639ff34588 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php @@ -0,0 +1,265 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Loader; + +use Doctrine\Common\Annotations\Reader; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\Config\Loader\LoaderResolverInterface; + +/** + * AnnotationClassLoader loads routing information from a PHP class and its methods. + * + * You need to define an implementation for the getRouteDefaults() method. Most of the + * time, this method should define some PHP callable to be called for the route + * (a controller in MVC speak). + * + * The @Route annotation can be set on the class (for global parameters), + * and on each method. + * + * The @Route annotation main value is the route path. The annotation also + * recognizes several parameters: requirements, options, defaults, schemes, + * methods, host, and name. The name parameter is mandatory. + * Here is an example of how you should be able to use it: + * + * /** + * * @Route("/Blog") + * * / + * class Blog + * { + * /** + * * @Route("/", name="blog_index") + * * / + * public function index() + * { + * } + * + * /** + * * @Route("/{id}", name="blog_post", requirements = {"id" = "\d+"}) + * * / + * public function show() + * { + * } + * } + * + * @author Fabien Potencier + */ +abstract class AnnotationClassLoader implements LoaderInterface +{ + /** + * @var Reader + */ + protected $reader; + + /** + * @var string + */ + protected $routeAnnotationClass = 'Symfony\\Component\\Routing\\Annotation\\Route'; + + /** + * @var int + */ + protected $defaultRouteIndex = 0; + + /** + * Constructor. + * + * @param Reader $reader + */ + public function __construct(Reader $reader) + { + $this->reader = $reader; + } + + /** + * Sets the annotation class to read route properties from. + * + * @param string $class A fully-qualified class name + */ + public function setRouteAnnotationClass($class) + { + $this->routeAnnotationClass = $class; + } + + /** + * Loads from annotations from a class. + * + * @param string $class A class name + * @param string|null $type The resource type + * + * @return RouteCollection A RouteCollection instance + * + * @throws \InvalidArgumentException When route can't be parsed + */ + public function load($class, $type = null) + { + if (!class_exists($class)) { + throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); + } + + $class = new \ReflectionClass($class); + if ($class->isAbstract()) { + throw new \InvalidArgumentException(sprintf('Annotations from class "%s" cannot be read as it is abstract.', $class->getName())); + } + + $globals = $this->getGlobals($class); + + $collection = new RouteCollection(); + $collection->addResource(new FileResource($class->getFileName())); + + foreach ($class->getMethods() as $method) { + $this->defaultRouteIndex = 0; + foreach ($this->reader->getMethodAnnotations($method) as $annot) { + if ($annot instanceof $this->routeAnnotationClass) { + $this->addRoute($collection, $annot, $globals, $class, $method); + } + } + } + + return $collection; + } + + protected function addRoute(RouteCollection $collection, $annot, $globals, \ReflectionClass $class, \ReflectionMethod $method) + { + $name = $annot->getName(); + if (null === $name) { + $name = $this->getDefaultRouteName($class, $method); + } + + $defaults = array_replace($globals['defaults'], $annot->getDefaults()); + foreach ($method->getParameters() as $param) { + if (false !== strpos($globals['path'].$annot->getPath(), sprintf('{%s}', $param->getName())) && !isset($defaults[$param->getName()]) && $param->isDefaultValueAvailable()) { + $defaults[$param->getName()] = $param->getDefaultValue(); + } + } + $requirements = array_replace($globals['requirements'], $annot->getRequirements()); + $options = array_replace($globals['options'], $annot->getOptions()); + $schemes = array_merge($globals['schemes'], $annot->getSchemes()); + $methods = array_merge($globals['methods'], $annot->getMethods()); + + $host = $annot->getHost(); + if (null === $host) { + $host = $globals['host']; + } + + $condition = $annot->getCondition(); + if (null === $condition) { + $condition = $globals['condition']; + } + + $route = $this->createRoute($globals['path'].$annot->getPath(), $defaults, $requirements, $options, $host, $schemes, $methods, $condition); + + $this->configureRoute($route, $class, $method, $annot); + + $collection->add($name, $route); + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return is_string($resource) && preg_match('/^(?:\\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/', $resource) && (!$type || 'annotation' === $type); + } + + /** + * {@inheritdoc} + */ + public function setResolver(LoaderResolverInterface $resolver) + { + } + + /** + * {@inheritdoc} + */ + public function getResolver() + { + } + + /** + * Gets the default route name for a class method. + * + * @param \ReflectionClass $class + * @param \ReflectionMethod $method + * + * @return string + */ + protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) + { + $name = strtolower(str_replace('\\', '_', $class->name).'_'.$method->name); + if ($this->defaultRouteIndex > 0) { + $name .= '_'.$this->defaultRouteIndex; + } + ++$this->defaultRouteIndex; + + return $name; + } + + protected function getGlobals(\ReflectionClass $class) + { + $globals = array( + 'path' => '', + 'requirements' => array(), + 'options' => array(), + 'defaults' => array(), + 'schemes' => array(), + 'methods' => array(), + 'host' => '', + 'condition' => '', + ); + + if ($annot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass)) { + if (null !== $annot->getPath()) { + $globals['path'] = $annot->getPath(); + } + + if (null !== $annot->getRequirements()) { + $globals['requirements'] = $annot->getRequirements(); + } + + if (null !== $annot->getOptions()) { + $globals['options'] = $annot->getOptions(); + } + + if (null !== $annot->getDefaults()) { + $globals['defaults'] = $annot->getDefaults(); + } + + if (null !== $annot->getSchemes()) { + $globals['schemes'] = $annot->getSchemes(); + } + + if (null !== $annot->getMethods()) { + $globals['methods'] = $annot->getMethods(); + } + + if (null !== $annot->getHost()) { + $globals['host'] = $annot->getHost(); + } + + if (null !== $annot->getCondition()) { + $globals['condition'] = $annot->getCondition(); + } + } + + return $globals; + } + + protected function createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition) + { + return new Route($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); + } + + abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..2e9e10d3447380937df5040eec3085e9df05cbd5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Loader; + +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Config\Resource\DirectoryResource; + +/** + * AnnotationDirectoryLoader loads routing information from annotations set + * on PHP classes and methods. + * + * @author Fabien Potencier + */ +class AnnotationDirectoryLoader extends AnnotationFileLoader +{ + /** + * Loads from annotations from a directory. + * + * @param string $path A directory path + * @param string|null $type The resource type + * + * @return RouteCollection A RouteCollection instance + * + * @throws \InvalidArgumentException When the directory does not exist or its routes cannot be parsed + */ + public function load($path, $type = null) + { + $dir = $this->locator->locate($path); + + $collection = new RouteCollection(); + $collection->addResource(new DirectoryResource($dir, '/\.php$/')); + $files = iterator_to_array(new \RecursiveIteratorIterator( + new \RecursiveCallbackFilterIterator( + new \RecursiveDirectoryIterator($dir), + function (\SplFileInfo $current) { + return '.' !== substr($current->getBasename(), 0, 1); + } + ), + \RecursiveIteratorIterator::LEAVES_ONLY + )); + usort($files, function (\SplFileInfo $a, \SplFileInfo $b) { + return (string) $a > (string) $b ? 1 : -1; + }); + + foreach ($files as $file) { + if (!$file->isFile() || '.php' !== substr($file->getFilename(), -4)) { + continue; + } + + if ($class = $this->findClass($file)) { + $refl = new \ReflectionClass($class); + if ($refl->isAbstract()) { + continue; + } + + $collection->addCollection($this->loader->load($class, $type)); + } + } + + return $collection; + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + if (!is_string($resource)) { + return false; + } + + try { + $path = $this->locator->locate($resource); + } catch (\Exception $e) { + return false; + } + + return is_dir($path) && (!$type || 'annotation' === $type); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..4dc41e16cd392837fdb76a1f00da6ebe3dbbff87 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php @@ -0,0 +1,147 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Loader; + +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Config\Loader\FileLoader; +use Symfony\Component\Config\FileLocatorInterface; + +/** + * AnnotationFileLoader loads routing information from annotations set + * on a PHP class and its methods. + * + * @author Fabien Potencier + */ +class AnnotationFileLoader extends FileLoader +{ + protected $loader; + + /** + * Constructor. + * + * @param FileLocatorInterface $locator A FileLocator instance + * @param AnnotationClassLoader $loader An AnnotationClassLoader instance + * + * @throws \RuntimeException + */ + public function __construct(FileLocatorInterface $locator, AnnotationClassLoader $loader) + { + if (!function_exists('token_get_all')) { + throw new \RuntimeException('The Tokenizer extension is required for the routing annotation loaders.'); + } + + parent::__construct($locator); + + $this->loader = $loader; + } + + /** + * Loads from annotations from a file. + * + * @param string $file A PHP file path + * @param string|null $type The resource type + * + * @return RouteCollection A RouteCollection instance + * + * @throws \InvalidArgumentException When the file does not exist or its routes cannot be parsed + */ + public function load($file, $type = null) + { + $path = $this->locator->locate($file); + + $collection = new RouteCollection(); + if ($class = $this->findClass($path)) { + $collection->addResource(new FileResource($path)); + $collection->addCollection($this->loader->load($class, $type)); + } + if (PHP_VERSION_ID >= 70000) { + // PHP 7 memory manager will not release after token_get_all(), see https://bugs.php.net/70098 + gc_mem_caches(); + } + + return $collection; + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'annotation' === $type); + } + + /** + * Returns the full class name for the first class in the file. + * + * @param string $file A PHP file path + * + * @return string|false Full class name if found, false otherwise + */ + protected function findClass($file) + { + $class = false; + $namespace = false; + $tokens = token_get_all(file_get_contents($file)); + + if (1 === count($tokens) && T_INLINE_HTML === $tokens[0][0]) { + throw new \InvalidArgumentException(sprintf('The file "%s" does not contain PHP code. Did you forgot to add the " 0; --$j) { + if (!isset($tokens[$j][1])) { + break; + } + + if (T_DOUBLE_COLON === $tokens[$j][0]) { + $isClassConstant = true; + break; + } elseif (!in_array($tokens[$j][0], array(T_WHITESPACE, T_DOC_COMMENT, T_COMMENT))) { + break; + } + } + + if (!$isClassConstant) { + $class = true; + } + } + + if (T_NAMESPACE === $token[0]) { + $namespace = true; + } + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/ClosureLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/ClosureLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..5df9f6ae8f172bc829f639a377bcc3de49719649 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/ClosureLoader.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Loader; + +use Symfony\Component\Config\Loader\Loader; +use Symfony\Component\Routing\RouteCollection; + +/** + * ClosureLoader loads routes from a PHP closure. + * + * The Closure must return a RouteCollection instance. + * + * @author Fabien Potencier + */ +class ClosureLoader extends Loader +{ + /** + * Loads a Closure. + * + * @param \Closure $closure A Closure + * @param string|null $type The resource type + * + * @return RouteCollection A RouteCollection instance + */ + public function load($closure, $type = null) + { + return $closure(); + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return $resource instanceof \Closure && (!$type || 'closure' === $type); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/DependencyInjection/ServiceRouterLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/DependencyInjection/ServiceRouterLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..69382571ceedf96fe03905f02743ca8aedbdf38b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/DependencyInjection/ServiceRouterLoader.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Loader\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\Routing\Loader\ObjectRouteLoader; + +/** + * A route loader that executes a service to load the routes. + * + * This depends on the DependencyInjection component. + * + * @author Ryan Weaver + */ +class ServiceRouterLoader extends ObjectRouteLoader +{ + /** + * @var ContainerInterface + */ + private $container; + + public function __construct(ContainerInterface $container) + { + $this->container = $container; + } + + protected function getServiceObject($id) + { + return $this->container->get($id); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/DirectoryLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/DirectoryLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..4bb5b31b60a824343abc54590699a92911af0f09 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/DirectoryLoader.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\Component\Routing\Loader; + +use Symfony\Component\Config\Loader\FileLoader; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Config\Resource\DirectoryResource; + +class DirectoryLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + public function load($file, $type = null) + { + $path = $this->locator->locate($file); + + $collection = new RouteCollection(); + $collection->addResource(new DirectoryResource($path)); + + foreach (scandir($path) as $dir) { + if ('.' !== $dir[0]) { + $this->setCurrentDir($path); + $subPath = $path.'/'.$dir; + $subType = null; + + if (is_dir($subPath)) { + $subPath .= '/'; + $subType = 'directory'; + } + + $subCollection = $this->import($subPath, $subType, false, $path); + $collection->addCollection($subCollection); + } + } + + return $collection; + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + // only when type is forced to directory, not to conflict with AnnotationLoader + + return 'directory' === $type; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..4d79b6cfc3640a03e91d4eca7efdad26e9b67ef2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Loader; + +use Symfony\Component\Config\Loader\Loader; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Routing\RouteCollection; + +/** + * A route loader that calls a method on an object to load the routes. + * + * @author Ryan Weaver + */ +abstract class ObjectRouteLoader extends Loader +{ + /** + * Returns the object that the method will be called on to load routes. + * + * For example, if your application uses a service container, + * the $id may be a service id. + * + * @param string $id + * + * @return object + */ + abstract protected function getServiceObject($id); + + /** + * Calls the service that will load the routes. + * + * @param mixed $resource Some value that will resolve to a callable + * @param string|null $type The resource type + * + * @return RouteCollection + */ + public function load($resource, $type = null) + { + $parts = explode(':', $resource); + if (count($parts) != 2) { + throw new \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the "service" route loader: use the format "service_name:methodName"', $resource)); + } + + $serviceString = $parts[0]; + $method = $parts[1]; + + $loaderObject = $this->getServiceObject($serviceString); + + if (!is_object($loaderObject)) { + throw new \LogicException(sprintf('%s:getServiceObject() must return an object: %s returned', get_class($this), gettype($loaderObject))); + } + + if (!method_exists($loaderObject, $method)) { + throw new \BadMethodCallException(sprintf('Method "%s" not found on "%s" when importing routing resource "%s"', $method, get_class($loaderObject), $resource)); + } + + $routeCollection = call_user_func(array($loaderObject, $method), $this); + + if (!$routeCollection instanceof RouteCollection) { + $type = is_object($routeCollection) ? get_class($routeCollection) : gettype($routeCollection); + + throw new \LogicException(sprintf('The %s::%s method must return a RouteCollection: %s returned', get_class($loaderObject), $method, $type)); + } + + // make the service file tracked so that if it changes, the cache rebuilds + $this->addClassResource(new \ReflectionClass($loaderObject), $routeCollection); + + return $routeCollection; + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return 'service' === $type; + } + + private function addClassResource(\ReflectionClass $class, RouteCollection $collection) + { + do { + if (is_file($class->getFileName())) { + $collection->addResource(new FileResource($class->getFileName())); + } + } while ($class = $class->getParentClass()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/PhpFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/PhpFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..b4ba5fbc7f8badedacc6eaa52c94a8d6fecf3071 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/PhpFileLoader.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Loader; + +use Symfony\Component\Config\Loader\FileLoader; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Routing\RouteCollection; + +/** + * PhpFileLoader loads routes from a PHP file. + * + * The file must return a RouteCollection instance. + * + * @author Fabien Potencier + */ +class PhpFileLoader extends FileLoader +{ + /** + * Loads a PHP file. + * + * @param string $file A PHP file path + * @param string|null $type The resource type + * + * @return RouteCollection A RouteCollection instance + */ + public function load($file, $type = null) + { + $path = $this->locator->locate($file); + $this->setCurrentDir(dirname($path)); + + $collection = self::includeFile($path, $this); + $collection->addResource(new FileResource($path)); + + return $collection; + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'php' === $type); + } + + /** + * Safe include. Used for scope isolation. + * + * @param string $file File to include + * @param PhpFileLoader $loader the loader variable is exposed to the included file below + * + * @return RouteCollection + */ + private static function includeFile($file, PhpFileLoader $loader) + { + return include $file; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/XmlFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/XmlFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..aff0ba27eecf8a4834e742ef97c91026761cf0e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/XmlFileLoader.php @@ -0,0 +1,342 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Loader; + +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\Route; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Config\Loader\FileLoader; +use Symfony\Component\Config\Util\XmlUtils; + +/** + * XmlFileLoader loads XML routing files. + * + * @author Fabien Potencier + * @author Tobias Schultze + */ +class XmlFileLoader extends FileLoader +{ + const NAMESPACE_URI = 'http://symfony.com/schema/routing'; + const SCHEME_PATH = '/schema/routing/routing-1.0.xsd'; + + /** + * Loads an XML file. + * + * @param string $file An XML file path + * @param string|null $type The resource type + * + * @return RouteCollection A RouteCollection instance + * + * @throws \InvalidArgumentException When the file cannot be loaded or when the XML cannot be + * parsed because it does not validate against the scheme. + */ + public function load($file, $type = null) + { + $path = $this->locator->locate($file); + + $xml = $this->loadFile($path); + + $collection = new RouteCollection(); + $collection->addResource(new FileResource($path)); + + // process routes and imports + foreach ($xml->documentElement->childNodes as $node) { + if (!$node instanceof \DOMElement) { + continue; + } + + $this->parseNode($collection, $node, $path, $file); + } + + return $collection; + } + + /** + * Parses a node from a loaded XML file. + * + * @param RouteCollection $collection Collection to associate with the node + * @param \DOMElement $node Element to parse + * @param string $path Full path of the XML file being processed + * @param string $file Loaded file name + * + * @throws \InvalidArgumentException When the XML is invalid + */ + protected function parseNode(RouteCollection $collection, \DOMElement $node, $path, $file) + { + if (self::NAMESPACE_URI !== $node->namespaceURI) { + return; + } + + switch ($node->localName) { + case 'route': + $this->parseRoute($collection, $node, $path); + break; + case 'import': + $this->parseImport($collection, $node, $path, $file); + break; + default: + throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "route" or "import".', $node->localName, $path)); + } + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return is_string($resource) && 'xml' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'xml' === $type); + } + + /** + * Parses a route and adds it to the RouteCollection. + * + * @param RouteCollection $collection RouteCollection instance + * @param \DOMElement $node Element to parse that represents a Route + * @param string $path Full path of the XML file being processed + * + * @throws \InvalidArgumentException When the XML is invalid + */ + protected function parseRoute(RouteCollection $collection, \DOMElement $node, $path) + { + if ('' === ($id = $node->getAttribute('id')) || !$node->hasAttribute('path')) { + throw new \InvalidArgumentException(sprintf('The element in file "%s" must have an "id" and a "path" attribute.', $path)); + } + + $schemes = preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, PREG_SPLIT_NO_EMPTY); + $methods = preg_split('/[\s,\|]++/', $node->getAttribute('methods'), -1, PREG_SPLIT_NO_EMPTY); + + list($defaults, $requirements, $options, $condition) = $this->parseConfigs($node, $path); + + $route = new Route($node->getAttribute('path'), $defaults, $requirements, $options, $node->getAttribute('host'), $schemes, $methods, $condition); + $collection->add($id, $route); + } + + /** + * Parses an import and adds the routes in the resource to the RouteCollection. + * + * @param RouteCollection $collection RouteCollection instance + * @param \DOMElement $node Element to parse that represents a Route + * @param string $path Full path of the XML file being processed + * @param string $file Loaded file name + * + * @throws \InvalidArgumentException When the XML is invalid + */ + protected function parseImport(RouteCollection $collection, \DOMElement $node, $path, $file) + { + if ('' === $resource = $node->getAttribute('resource')) { + throw new \InvalidArgumentException(sprintf('The element in file "%s" must have a "resource" attribute.', $path)); + } + + $type = $node->getAttribute('type'); + $prefix = $node->getAttribute('prefix'); + $host = $node->hasAttribute('host') ? $node->getAttribute('host') : null; + $schemes = $node->hasAttribute('schemes') ? preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, PREG_SPLIT_NO_EMPTY) : null; + $methods = $node->hasAttribute('methods') ? preg_split('/[\s,\|]++/', $node->getAttribute('methods'), -1, PREG_SPLIT_NO_EMPTY) : null; + + list($defaults, $requirements, $options, $condition) = $this->parseConfigs($node, $path); + + $this->setCurrentDir(dirname($path)); + + $subCollection = $this->import($resource, ('' !== $type ? $type : null), false, $file); + /* @var $subCollection RouteCollection */ + $subCollection->addPrefix($prefix); + if (null !== $host) { + $subCollection->setHost($host); + } + if (null !== $condition) { + $subCollection->setCondition($condition); + } + if (null !== $schemes) { + $subCollection->setSchemes($schemes); + } + if (null !== $methods) { + $subCollection->setMethods($methods); + } + $subCollection->addDefaults($defaults); + $subCollection->addRequirements($requirements); + $subCollection->addOptions($options); + + $collection->addCollection($subCollection); + } + + /** + * Loads an XML file. + * + * @param string $file An XML file path + * + * @return \DOMDocument + * + * @throws \InvalidArgumentException When loading of XML file fails because of syntax errors + * or when the XML structure is not as expected by the scheme - + * see validate() + */ + protected function loadFile($file) + { + return XmlUtils::loadFile($file, __DIR__.static::SCHEME_PATH); + } + + /** + * Parses the config elements (default, requirement, option). + * + * @param \DOMElement $node Element to parse that contains the configs + * @param string $path Full path of the XML file being processed + * + * @return array An array with the defaults as first item, requirements as second and options as third + * + * @throws \InvalidArgumentException When the XML is invalid + */ + private function parseConfigs(\DOMElement $node, $path) + { + $defaults = array(); + $requirements = array(); + $options = array(); + $condition = null; + + foreach ($node->getElementsByTagNameNS(self::NAMESPACE_URI, '*') as $n) { + if ($node !== $n->parentNode) { + continue; + } + + switch ($n->localName) { + case 'default': + if ($this->isElementValueNull($n)) { + $defaults[$n->getAttribute('key')] = null; + } else { + $defaults[$n->getAttribute('key')] = $this->parseDefaultsConfig($n, $path); + } + + break; + case 'requirement': + $requirements[$n->getAttribute('key')] = trim($n->textContent); + break; + case 'option': + $options[$n->getAttribute('key')] = trim($n->textContent); + break; + case 'condition': + $condition = trim($n->textContent); + break; + default: + throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "default", "requirement" or "option".', $n->localName, $path)); + } + } + + return array($defaults, $requirements, $options, $condition); + } + + /** + * Parses the "default" elements. + * + * @param \DOMElement $element The "default" element to parse + * @param string $path Full path of the XML file being processed + * + * @return array|bool|float|int|string|null The parsed value of the "default" element + */ + private function parseDefaultsConfig(\DOMElement $element, $path) + { + if ($this->isElementValueNull($element)) { + return; + } + + // Check for existing element nodes in the default element. There can + // only be a single element inside a default element. So this element + // (if one was found) can safely be returned. + foreach ($element->childNodes as $child) { + if (!$child instanceof \DOMElement) { + continue; + } + + if (self::NAMESPACE_URI !== $child->namespaceURI) { + continue; + } + + return $this->parseDefaultNode($child, $path); + } + + // If the default element doesn't contain a nested "bool", "int", "float", + // "string", "list", or "map" element, the element contents will be treated + // as the string value of the associated default option. + return trim($element->textContent); + } + + /** + * Recursively parses the value of a "default" element. + * + * @param \DOMElement $node The node value + * @param string $path Full path of the XML file being processed + * + * @return array|bool|float|int|string The parsed value + * + * @throws \InvalidArgumentException when the XML is invalid + */ + private function parseDefaultNode(\DOMElement $node, $path) + { + if ($this->isElementValueNull($node)) { + return; + } + + switch ($node->localName) { + case 'bool': + return 'true' === trim($node->nodeValue) || '1' === trim($node->nodeValue); + case 'int': + return (int) trim($node->nodeValue); + case 'float': + return (float) trim($node->nodeValue); + case 'string': + return trim($node->nodeValue); + case 'list': + $list = array(); + + foreach ($node->childNodes as $element) { + if (!$element instanceof \DOMElement) { + continue; + } + + if (self::NAMESPACE_URI !== $element->namespaceURI) { + continue; + } + + $list[] = $this->parseDefaultNode($element, $path); + } + + return $list; + case 'map': + $map = array(); + + foreach ($node->childNodes as $element) { + if (!$element instanceof \DOMElement) { + continue; + } + + if (self::NAMESPACE_URI !== $element->namespaceURI) { + continue; + } + + $map[$element->getAttribute('key')] = $this->parseDefaultNode($element, $path); + } + + return $map; + default: + throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "bool", "int", "float", "string", "list", or "map".', $node->localName, $path)); + } + } + + private function isElementValueNull(\DOMElement $element) + { + $namespaceUri = 'http://www.w3.org/2001/XMLSchema-instance'; + + if (!$element->hasAttributeNS($namespaceUri, 'nil')) { + return false; + } + + return 'true' === $element->getAttributeNS($namespaceUri, 'nil') || '1' === $element->getAttributeNS($namespaceUri, 'nil'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/YamlFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/YamlFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..31314011b95b4a4e09a8c9e877642f86b84c3502 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/YamlFileLoader.php @@ -0,0 +1,207 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Loader; + +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\Route; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Yaml\Exception\ParseException; +use Symfony\Component\Yaml\Parser as YamlParser; +use Symfony\Component\Config\Loader\FileLoader; + +/** + * YamlFileLoader loads Yaml routing files. + * + * @author Fabien Potencier + * @author Tobias Schultze + */ +class YamlFileLoader extends FileLoader +{ + private static $availableKeys = array( + 'resource', 'type', 'prefix', 'path', 'host', 'schemes', 'methods', 'defaults', 'requirements', 'options', 'condition', + ); + private $yamlParser; + + /** + * Loads a Yaml file. + * + * @param string $file A Yaml file path + * @param string|null $type The resource type + * + * @return RouteCollection A RouteCollection instance + * + * @throws \InvalidArgumentException When a route can't be parsed because YAML is invalid + */ + public function load($file, $type = null) + { + $path = $this->locator->locate($file); + + if (!stream_is_local($path)) { + throw new \InvalidArgumentException(sprintf('This is not a local file "%s".', $path)); + } + + if (!file_exists($path)) { + throw new \InvalidArgumentException(sprintf('File "%s" not found.', $path)); + } + + if (null === $this->yamlParser) { + $this->yamlParser = new YamlParser(); + } + + try { + $parsedConfig = $this->yamlParser->parse(file_get_contents($path)); + } catch (ParseException $e) { + throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e); + } + + $collection = new RouteCollection(); + $collection->addResource(new FileResource($path)); + + // empty file + if (null === $parsedConfig) { + return $collection; + } + + // not an array + if (!is_array($parsedConfig)) { + throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $path)); + } + + foreach ($parsedConfig as $name => $config) { + $this->validate($config, $name, $path); + + if (isset($config['resource'])) { + $this->parseImport($collection, $config, $path, $file); + } else { + $this->parseRoute($collection, $name, $config, $path); + } + } + + return $collection; + } + + /** + * {@inheritdoc} + */ + public function supports($resource, $type = null) + { + return is_string($resource) && in_array(pathinfo($resource, PATHINFO_EXTENSION), array('yml', 'yaml'), true) && (!$type || 'yaml' === $type); + } + + /** + * Parses a route and adds it to the RouteCollection. + * + * @param RouteCollection $collection A RouteCollection instance + * @param string $name Route name + * @param array $config Route definition + * @param string $path Full path of the YAML file being processed + */ + protected function parseRoute(RouteCollection $collection, $name, array $config, $path) + { + $defaults = isset($config['defaults']) ? $config['defaults'] : array(); + $requirements = isset($config['requirements']) ? $config['requirements'] : array(); + $options = isset($config['options']) ? $config['options'] : array(); + $host = isset($config['host']) ? $config['host'] : ''; + $schemes = isset($config['schemes']) ? $config['schemes'] : array(); + $methods = isset($config['methods']) ? $config['methods'] : array(); + $condition = isset($config['condition']) ? $config['condition'] : null; + + $route = new Route($config['path'], $defaults, $requirements, $options, $host, $schemes, $methods, $condition); + + $collection->add($name, $route); + } + + /** + * Parses an import and adds the routes in the resource to the RouteCollection. + * + * @param RouteCollection $collection A RouteCollection instance + * @param array $config Route definition + * @param string $path Full path of the YAML file being processed + * @param string $file Loaded file name + */ + protected function parseImport(RouteCollection $collection, array $config, $path, $file) + { + $type = isset($config['type']) ? $config['type'] : null; + $prefix = isset($config['prefix']) ? $config['prefix'] : ''; + $defaults = isset($config['defaults']) ? $config['defaults'] : array(); + $requirements = isset($config['requirements']) ? $config['requirements'] : array(); + $options = isset($config['options']) ? $config['options'] : array(); + $host = isset($config['host']) ? $config['host'] : null; + $condition = isset($config['condition']) ? $config['condition'] : null; + $schemes = isset($config['schemes']) ? $config['schemes'] : null; + $methods = isset($config['methods']) ? $config['methods'] : null; + + $this->setCurrentDir(dirname($path)); + + $subCollection = $this->import($config['resource'], $type, false, $file); + /* @var $subCollection RouteCollection */ + $subCollection->addPrefix($prefix); + if (null !== $host) { + $subCollection->setHost($host); + } + if (null !== $condition) { + $subCollection->setCondition($condition); + } + if (null !== $schemes) { + $subCollection->setSchemes($schemes); + } + if (null !== $methods) { + $subCollection->setMethods($methods); + } + $subCollection->addDefaults($defaults); + $subCollection->addRequirements($requirements); + $subCollection->addOptions($options); + + $collection->addCollection($subCollection); + } + + /** + * Validates the route configuration. + * + * @param array $config A resource config + * @param string $name The config key + * @param string $path The loaded file path + * + * @throws \InvalidArgumentException If one of the provided config keys is not supported, + * something is missing or the combination is nonsense + */ + protected function validate($config, $name, $path) + { + if (!is_array($config)) { + throw new \InvalidArgumentException(sprintf('The definition of "%s" in "%s" must be a YAML array.', $name, $path)); + } + if ($extraKeys = array_diff(array_keys($config), self::$availableKeys)) { + throw new \InvalidArgumentException(sprintf( + 'The routing file "%s" contains unsupported keys for "%s": "%s". Expected one of: "%s".', + $path, $name, implode('", "', $extraKeys), implode('", "', self::$availableKeys) + )); + } + if (isset($config['resource']) && isset($config['path'])) { + throw new \InvalidArgumentException(sprintf( + 'The routing file "%s" must not specify both the "resource" key and the "path" key for "%s". Choose between an import and a route definition.', + $path, $name + )); + } + if (!isset($config['resource']) && isset($config['type'])) { + throw new \InvalidArgumentException(sprintf( + 'The "type" key for the route definition "%s" in "%s" is unsupported. It is only available for imports in combination with the "resource" key.', + $name, $path + )); + } + if (!isset($config['resource']) && !isset($config['path'])) { + throw new \InvalidArgumentException(sprintf( + 'You must define a "path" for the route "%s" in file "%s".', + $name, $path + )); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..92d4ae20787776827e9d64d138e6b6115c205976 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php new file mode 100644 index 0000000000000000000000000000000000000000..b24c8512ce1c9dbd373b4175a81020f8ed3b00f6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php @@ -0,0 +1,161 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Matcher\Dumper; + +/** + * Collection of routes. + * + * @author Arnaud Le Blanc + * + * @internal + */ +class DumperCollection implements \IteratorAggregate +{ + /** + * @var DumperCollection|null + */ + private $parent; + + /** + * @var DumperCollection[]|DumperRoute[] + */ + private $children = array(); + + /** + * @var array + */ + private $attributes = array(); + + /** + * Returns the children routes and collections. + * + * @return self[]|DumperRoute[] + */ + public function all() + { + return $this->children; + } + + /** + * Adds a route or collection. + * + * @param DumperRoute|DumperCollection The route or collection + */ + public function add($child) + { + if ($child instanceof self) { + $child->setParent($this); + } + $this->children[] = $child; + } + + /** + * Sets children. + * + * @param array $children The children + */ + public function setAll(array $children) + { + foreach ($children as $child) { + if ($child instanceof self) { + $child->setParent($this); + } + } + $this->children = $children; + } + + /** + * Returns an iterator over the children. + * + * @return \Iterator|DumperCollection[]|DumperRoute[] The iterator + */ + public function getIterator() + { + return new \ArrayIterator($this->children); + } + + /** + * Returns the root of the collection. + * + * @return self The root collection + */ + public function getRoot() + { + return (null !== $this->parent) ? $this->parent->getRoot() : $this; + } + + /** + * Returns the parent collection. + * + * @return self|null The parent collection or null if the collection has no parent + */ + protected function getParent() + { + return $this->parent; + } + + /** + * Sets the parent collection. + * + * @param DumperCollection $parent The parent collection + */ + protected function setParent(DumperCollection $parent) + { + $this->parent = $parent; + } + + /** + * Returns true if the attribute is defined. + * + * @param string $name The attribute name + * + * @return bool true if the attribute is defined, false otherwise + */ + public function hasAttribute($name) + { + return array_key_exists($name, $this->attributes); + } + + /** + * Returns an attribute by name. + * + * @param string $name The attribute name + * @param mixed $default Default value is the attribute doesn't exist + * + * @return mixed The attribute value + */ + public function getAttribute($name, $default = null) + { + return $this->hasAttribute($name) ? $this->attributes[$name] : $default; + } + + /** + * Sets an attribute by name. + * + * @param string $name The attribute name + * @param mixed $value The attribute value + */ + public function setAttribute($name, $value) + { + $this->attributes[$name] = $value; + } + + /** + * Sets multiple attributes. + * + * @param array $attributes The attributes + */ + public function setAttributes($attributes) + { + $this->attributes = $attributes; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php new file mode 100644 index 0000000000000000000000000000000000000000..5ea622c7d49cabf96c79e3b0b1999cd61d68d03f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Matcher\Dumper; + +/** + * Prefix tree of routes preserving routes order. + * + * @author Arnaud Le Blanc + * + * @internal + */ +class DumperPrefixCollection extends DumperCollection +{ + /** + * @var string + */ + private $prefix = ''; + + /** + * Returns the prefix. + * + * @return string The prefix + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * Sets the prefix. + * + * @param string $prefix The prefix + */ + public function setPrefix($prefix) + { + $this->prefix = $prefix; + } + + /** + * Adds a route in the tree. + * + * @param DumperRoute $route The route + * + * @return self + * + * @throws \LogicException + */ + public function addPrefixRoute(DumperRoute $route) + { + $prefix = $route->getRoute()->compile()->getStaticPrefix(); + + for ($collection = $this; null !== $collection; $collection = $collection->getParent()) { + // Same prefix, add to current leave + if ($collection->prefix === $prefix) { + $collection->add($route); + + return $collection; + } + + // Prefix starts with route's prefix + if ('' === $collection->prefix || 0 === strpos($prefix, $collection->prefix)) { + $child = new self(); + $child->setPrefix(substr($prefix, 0, strlen($collection->prefix) + 1)); + $collection->add($child); + + return $child->addPrefixRoute($route); + } + } + + // Reached only if the root has a non empty prefix + throw new \LogicException('The collection root must not have a prefix'); + } + + /** + * Merges nodes whose prefix ends with a slash. + * + * Children of a node whose prefix ends with a slash are moved to the parent node + */ + public function mergeSlashNodes() + { + $children = array(); + + foreach ($this as $child) { + if ($child instanceof self) { + $child->mergeSlashNodes(); + if ('/' === substr($child->prefix, -1)) { + $children = array_merge($children, $child->all()); + } else { + $children[] = $child; + } + } else { + $children[] = $child; + } + } + + $this->setAll($children); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperRoute.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperRoute.php new file mode 100644 index 0000000000000000000000000000000000000000..3ad08c2006f24d221acad08e42bb018c5daaae36 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/DumperRoute.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Matcher\Dumper; + +use Symfony\Component\Routing\Route; + +/** + * Container for a Route. + * + * @author Arnaud Le Blanc + * + * @internal + */ +class DumperRoute +{ + /** + * @var string + */ + private $name; + + /** + * @var Route + */ + private $route; + + /** + * Constructor. + * + * @param string $name The route name + * @param Route $route The route + */ + public function __construct($name, Route $route) + { + $this->name = $name; + $this->route = $route; + } + + /** + * Returns the route name. + * + * @return string The route name + */ + public function getName() + { + return $this->name; + } + + /** + * Returns the route. + * + * @return Route The route + */ + public function getRoute() + { + return $this->route; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..52edc017e84732b22187c1995ca936faace3b957 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.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\Component\Routing\Matcher\Dumper; + +use Symfony\Component\Routing\RouteCollection; + +/** + * MatcherDumper is the abstract class for all built-in matcher dumpers. + * + * @author Fabien Potencier + */ +abstract class MatcherDumper implements MatcherDumperInterface +{ + /** + * @var RouteCollection + */ + private $routes; + + /** + * Constructor. + * + * @param RouteCollection $routes The RouteCollection to dump + */ + public function __construct(RouteCollection $routes) + { + $this->routes = $routes; + } + + /** + * {@inheritdoc} + */ + public function getRoutes() + { + return $this->routes; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5e7c134b9f394752d3c6d4dd4b1911f2c47db36b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Matcher\Dumper; + +use Symfony\Component\Routing\RouteCollection; + +/** + * MatcherDumperInterface is the interface that all matcher dumper classes must implement. + * + * @author Fabien Potencier + */ +interface MatcherDumperInterface +{ + /** + * Dumps a set of routes to a string representation of executable code + * that can then be used to match a request against these routes. + * + * @param array $options An array of options + * + * @return string Executable code + */ + public function dump(array $options = array()); + + /** + * Gets the routes to dump. + * + * @return RouteCollection A RouteCollection instance + */ + public function getRoutes(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..c04605c3f7fef2731a89bb3393752d26a46fe74f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -0,0 +1,409 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Matcher\Dumper; + +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\ExpressionLanguage\ExpressionLanguage; +use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; + +/** + * PhpMatcherDumper creates a PHP class able to match URLs for a given set of routes. + * + * @author Fabien Potencier + * @author Tobias Schultze + * @author Arnaud Le Blanc + */ +class PhpMatcherDumper extends MatcherDumper +{ + private $expressionLanguage; + + /** + * @var ExpressionFunctionProviderInterface[] + */ + private $expressionLanguageProviders = array(); + + /** + * Dumps a set of routes to a PHP class. + * + * Available options: + * + * * class: The class name + * * base_class: The base class name + * + * @param array $options An array of options + * + * @return string A PHP class representing the matcher class + */ + public function dump(array $options = array()) + { + $options = array_replace(array( + 'class' => 'ProjectUrlMatcher', + 'base_class' => 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher', + ), $options); + + // trailing slash support is only enabled if we know how to redirect the user + $interfaces = class_implements($options['base_class']); + $supportsRedirections = isset($interfaces['Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcherInterface']); + + return <<context = \$context; + } + +{$this->generateMatchMethod($supportsRedirections)} +} + +EOF; + } + + public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) + { + $this->expressionLanguageProviders[] = $provider; + } + + /** + * Generates the code for the match method implementing UrlMatcherInterface. + * + * @param bool $supportsRedirections Whether redirections are supported by the base class + * + * @return string Match method as PHP code + */ + private function generateMatchMethod($supportsRedirections) + { + $code = rtrim($this->compileRoutes($this->getRoutes(), $supportsRedirections), "\n"); + + return <<context; + \$request = \$this->request; + +$code + + throw 0 < count(\$allow) ? new MethodNotAllowedException(array_unique(\$allow)) : new ResourceNotFoundException(); + } +EOF; + } + + /** + * Generates PHP code to match a RouteCollection with all its routes. + * + * @param RouteCollection $routes A RouteCollection instance + * @param bool $supportsRedirections Whether redirections are supported by the base class + * + * @return string PHP code + */ + private function compileRoutes(RouteCollection $routes, $supportsRedirections) + { + $fetchedHost = false; + + $groups = $this->groupRoutesByHostRegex($routes); + $code = ''; + + foreach ($groups as $collection) { + if (null !== $regex = $collection->getAttribute('host_regex')) { + if (!$fetchedHost) { + $code .= " \$host = \$this->context->getHost();\n\n"; + $fetchedHost = true; + } + + $code .= sprintf(" if (preg_match(%s, \$host, \$hostMatches)) {\n", var_export($regex, true)); + } + + $tree = $this->buildPrefixTree($collection); + $groupCode = $this->compilePrefixRoutes($tree, $supportsRedirections); + + if (null !== $regex) { + // apply extra indention at each line (except empty ones) + $groupCode = preg_replace('/^.{2,}$/m', ' $0', $groupCode); + $code .= $groupCode; + $code .= " }\n\n"; + } else { + $code .= $groupCode; + } + } + + return $code; + } + + /** + * Generates PHP code recursively to match a tree of routes. + * + * @param DumperPrefixCollection $collection A DumperPrefixCollection instance + * @param bool $supportsRedirections Whether redirections are supported by the base class + * @param string $parentPrefix Prefix of the parent collection + * + * @return string PHP code + */ + private function compilePrefixRoutes(DumperPrefixCollection $collection, $supportsRedirections, $parentPrefix = '') + { + $code = ''; + $prefix = $collection->getPrefix(); + $optimizable = 1 < strlen($prefix) && 1 < count($collection->all()); + $optimizedPrefix = $parentPrefix; + + if ($optimizable) { + $optimizedPrefix = $prefix; + + $code .= sprintf(" if (0 === strpos(\$pathinfo, %s)) {\n", var_export($prefix, true)); + } + + foreach ($collection as $route) { + if ($route instanceof DumperCollection) { + $code .= $this->compilePrefixRoutes($route, $supportsRedirections, $optimizedPrefix); + } else { + $code .= $this->compileRoute($route->getRoute(), $route->getName(), $supportsRedirections, $optimizedPrefix)."\n"; + } + } + + if ($optimizable) { + $code .= " }\n\n"; + // apply extra indention at each line (except empty ones) + $code = preg_replace('/^.{2,}$/m', ' $0', $code); + } + + return $code; + } + + /** + * Compiles a single Route to PHP code used to match it against the path info. + * + * @param Route $route A Route instance + * @param string $name The name of the Route + * @param bool $supportsRedirections Whether redirections are supported by the base class + * @param string|null $parentPrefix The prefix of the parent collection used to optimize the code + * + * @return string PHP code + * + * @throws \LogicException + */ + private function compileRoute(Route $route, $name, $supportsRedirections, $parentPrefix = null) + { + $code = ''; + $compiledRoute = $route->compile(); + $conditions = array(); + $hasTrailingSlash = false; + $matches = false; + $hostMatches = false; + $methods = $route->getMethods(); + + // GET and HEAD are equivalent + if (in_array('GET', $methods) && !in_array('HEAD', $methods)) { + $methods[] = 'HEAD'; + } + + $supportsTrailingSlash = $supportsRedirections && (!$methods || in_array('HEAD', $methods)); + $regex = $compiledRoute->getRegex(); + + if (!count($compiledRoute->getPathVariables()) && false !== preg_match('#^(.)\^(?P.*?)\$\1#'.(substr($regex, -1) === 'u' ? 'u' : ''), $regex, $m)) { + if ($supportsTrailingSlash && substr($m['url'], -1) === '/') { + $conditions[] = sprintf("rtrim(\$pathinfo, '/') === %s", var_export(rtrim(str_replace('\\', '', $m['url']), '/'), true)); + $hasTrailingSlash = true; + } else { + $conditions[] = sprintf('$pathinfo === %s', var_export(str_replace('\\', '', $m['url']), true)); + } + } else { + if ($compiledRoute->getStaticPrefix() && $compiledRoute->getStaticPrefix() !== $parentPrefix) { + $conditions[] = sprintf('0 === strpos($pathinfo, %s)', var_export($compiledRoute->getStaticPrefix(), true)); + } + + if ($supportsTrailingSlash && $pos = strpos($regex, '/$')) { + $regex = substr($regex, 0, $pos).'/?$'.substr($regex, $pos + 2); + $hasTrailingSlash = true; + } + $conditions[] = sprintf('preg_match(%s, $pathinfo, $matches)', var_export($regex, true)); + + $matches = true; + } + + if ($compiledRoute->getHostVariables()) { + $hostMatches = true; + } + + if ($route->getCondition()) { + $conditions[] = $this->getExpressionLanguage()->compile($route->getCondition(), array('context', 'request')); + } + + $conditions = implode(' && ', $conditions); + + $code .= <<context->getMethod() != '$methods[0]') { + \$allow[] = '$methods[0]'; + goto $gotoname; + } + + +EOF; + } else { + $methods = implode("', '", $methods); + $code .= <<context->getMethod(), array('$methods'))) { + \$allow = array_merge(\$allow, array('$methods')); + goto $gotoname; + } + + +EOF; + } + } + + if ($hasTrailingSlash) { + $code .= <<redirect(\$pathinfo.'/', '$name'); + } + + +EOF; + } + + if ($schemes = $route->getSchemes()) { + if (!$supportsRedirections) { + throw new \LogicException('The "schemes" requirement is only supported for URL matchers that implement RedirectableUrlMatcherInterface.'); + } + $schemes = str_replace("\n", '', var_export(array_flip($schemes), true)); + $code .= <<context->getScheme()])) { + return \$this->redirect(\$pathinfo, '$name', key(\$requiredSchemes)); + } + + +EOF; + } + + // optimize parameters array + if ($matches || $hostMatches) { + $vars = array(); + if ($hostMatches) { + $vars[] = '$hostMatches'; + } + if ($matches) { + $vars[] = '$matches'; + } + $vars[] = "array('_route' => '$name')"; + + $code .= sprintf( + " return \$this->mergeDefaults(array_replace(%s), %s);\n", + implode(', ', $vars), + str_replace("\n", '', var_export($route->getDefaults(), true)) + ); + } elseif ($route->getDefaults()) { + $code .= sprintf(" return %s;\n", str_replace("\n", '', var_export(array_replace($route->getDefaults(), array('_route' => $name)), true))); + } else { + $code .= sprintf(" return array('_route' => '%s');\n", $name); + } + $code .= " }\n"; + + if ($methods) { + $code .= " $gotoname:\n"; + } + + return $code; + } + + /** + * Groups consecutive routes having the same host regex. + * + * The result is a collection of collections of routes having the same host regex. + * + * @param RouteCollection $routes A flat RouteCollection + * + * @return DumperCollection A collection with routes grouped by host regex in sub-collections + */ + private function groupRoutesByHostRegex(RouteCollection $routes) + { + $groups = new DumperCollection(); + + $currentGroup = new DumperCollection(); + $currentGroup->setAttribute('host_regex', null); + $groups->add($currentGroup); + + foreach ($routes as $name => $route) { + $hostRegex = $route->compile()->getHostRegex(); + if ($currentGroup->getAttribute('host_regex') !== $hostRegex) { + $currentGroup = new DumperCollection(); + $currentGroup->setAttribute('host_regex', $hostRegex); + $groups->add($currentGroup); + } + $currentGroup->add(new DumperRoute($name, $route)); + } + + return $groups; + } + + /** + * Organizes the routes into a prefix tree. + * + * Routes order is preserved such that traversing the tree will traverse the + * routes in the origin order. + * + * @param DumperCollection $collection A collection of routes + * + * @return DumperPrefixCollection + */ + private function buildPrefixTree(DumperCollection $collection) + { + $tree = new DumperPrefixCollection(); + $current = $tree; + + foreach ($collection as $route) { + $current = $current->addPrefixRoute($route); + } + + $tree->mergeSlashNodes(); + + return $tree; + } + + private function getExpressionLanguage() + { + if (null === $this->expressionLanguage) { + if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) { + throw new \RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); + } + $this->expressionLanguage = new ExpressionLanguage(null, $this->expressionLanguageProviders); + } + + return $this->expressionLanguage; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php new file mode 100644 index 0000000000000000000000000000000000000000..463bc0d056809ab0b556b84685494c4b887f127c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.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\Component\Routing\Matcher; + +use Symfony\Component\Routing\Exception\ResourceNotFoundException; +use Symfony\Component\Routing\Route; + +/** + * @author Fabien Potencier + */ +abstract class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface +{ + /** + * {@inheritdoc} + */ + public function match($pathinfo) + { + try { + $parameters = parent::match($pathinfo); + } catch (ResourceNotFoundException $e) { + if ('/' === substr($pathinfo, -1) || !in_array($this->context->getMethod(), array('HEAD', 'GET'))) { + throw $e; + } + + try { + parent::match($pathinfo.'/'); + + return $this->redirect($pathinfo.'/', null); + } catch (ResourceNotFoundException $e2) { + throw $e; + } + } + + return $parameters; + } + + /** + * {@inheritdoc} + */ + protected function handleRouteRequirements($pathinfo, $name, Route $route) + { + // expression condition + if ($route->getCondition() && !$this->getExpressionLanguage()->evaluate($route->getCondition(), array('context' => $this->context, 'request' => $this->request))) { + return array(self::REQUIREMENT_MISMATCH, null); + } + + // check HTTP scheme requirement + $scheme = $this->context->getScheme(); + $schemes = $route->getSchemes(); + if ($schemes && !$route->hasScheme($scheme)) { + return array(self::ROUTE_MATCH, $this->redirect($pathinfo, $name, current($schemes))); + } + + return array(self::REQUIREMENT_MATCH, null); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..7c27bc879653d6478c355ac33e6ba2a16d09a113 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Matcher; + +/** + * RedirectableUrlMatcherInterface knows how to redirect the user. + * + * @author Fabien Potencier + */ +interface RedirectableUrlMatcherInterface +{ + /** + * Redirects the user to another URL. + * + * @param string $path The path info to redirect to + * @param string $route The route name that matched + * @param string|null $scheme The URL scheme (null to keep the current one) + * + * @return array An array of parameters + */ + public function redirect($path, $route, $scheme = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b5def3d468ab3b32798e5686e5e866948db43068 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Matcher; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Exception\ResourceNotFoundException; +use Symfony\Component\Routing\Exception\MethodNotAllowedException; + +/** + * RequestMatcherInterface is the interface that all request matcher classes must implement. + * + * @author Fabien Potencier + */ +interface RequestMatcherInterface +{ + /** + * Tries to match a request with a set of routes. + * + * If the matcher can not find information, it must throw one of the exceptions documented + * below. + * + * @param Request $request The request to match + * + * @return array An array of parameters + * + * @throws ResourceNotFoundException If no matching resource could be found + * @throws MethodNotAllowedException If a matching resource was found but the request method is not allowed + */ + public function matchRequest(Request $request); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php new file mode 100644 index 0000000000000000000000000000000000000000..cb1a35f4d302316b6cc8708122cc0cd8e58cb21a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.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\Component\Routing\Matcher; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Exception\ExceptionInterface; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +/** + * TraceableUrlMatcher helps debug path info matching by tracing the match. + * + * @author Fabien Potencier + */ +class TraceableUrlMatcher extends UrlMatcher +{ + const ROUTE_DOES_NOT_MATCH = 0; + const ROUTE_ALMOST_MATCHES = 1; + const ROUTE_MATCHES = 2; + + protected $traces; + + public function getTraces($pathinfo) + { + $this->traces = array(); + + try { + $this->match($pathinfo); + } catch (ExceptionInterface $e) { + } + + return $this->traces; + } + + public function getTracesForRequest(Request $request) + { + $this->request = $request; + $traces = $this->getTraces($request->getPathInfo()); + $this->request = null; + + return $traces; + } + + protected function matchCollection($pathinfo, RouteCollection $routes) + { + foreach ($routes as $name => $route) { + $compiledRoute = $route->compile(); + + if (!preg_match($compiledRoute->getRegex(), $pathinfo, $matches)) { + // does it match without any requirements? + $r = new Route($route->getPath(), $route->getDefaults(), array(), $route->getOptions()); + $cr = $r->compile(); + if (!preg_match($cr->getRegex(), $pathinfo)) { + $this->addTrace(sprintf('Path "%s" does not match', $route->getPath()), self::ROUTE_DOES_NOT_MATCH, $name, $route); + + continue; + } + + foreach ($route->getRequirements() as $n => $regex) { + $r = new Route($route->getPath(), $route->getDefaults(), array($n => $regex), $route->getOptions()); + $cr = $r->compile(); + + if (in_array($n, $cr->getVariables()) && !preg_match($cr->getRegex(), $pathinfo)) { + $this->addTrace(sprintf('Requirement for "%s" does not match (%s)', $n, $regex), self::ROUTE_ALMOST_MATCHES, $name, $route); + + continue 2; + } + } + + continue; + } + + // check host requirement + $hostMatches = array(); + if ($compiledRoute->getHostRegex() && !preg_match($compiledRoute->getHostRegex(), $this->context->getHost(), $hostMatches)) { + $this->addTrace(sprintf('Host "%s" does not match the requirement ("%s")', $this->context->getHost(), $route->getHost()), self::ROUTE_ALMOST_MATCHES, $name, $route); + + continue; + } + + // check HTTP method requirement + if ($requiredMethods = $route->getMethods()) { + // HEAD and GET are equivalent as per RFC + if ('HEAD' === $method = $this->context->getMethod()) { + $method = 'GET'; + } + + if (!in_array($method, $requiredMethods)) { + $this->allow = array_merge($this->allow, $requiredMethods); + + $this->addTrace(sprintf('Method "%s" does not match any of the required methods (%s)', $this->context->getMethod(), implode(', ', $requiredMethods)), self::ROUTE_ALMOST_MATCHES, $name, $route); + + continue; + } + } + + // check condition + if ($condition = $route->getCondition()) { + if (!$this->getExpressionLanguage()->evaluate($condition, array('context' => $this->context, 'request' => $this->request))) { + $this->addTrace(sprintf('Condition "%s" does not evaluate to "true"', $condition), self::ROUTE_ALMOST_MATCHES, $name, $route); + + continue; + } + } + + // check HTTP scheme requirement + if ($requiredSchemes = $route->getSchemes()) { + $scheme = $this->context->getScheme(); + + if (!$route->hasScheme($scheme)) { + $this->addTrace(sprintf('Scheme "%s" does not match any of the required schemes (%s); the user will be redirected to first required scheme', $scheme, implode(', ', $requiredSchemes)), self::ROUTE_ALMOST_MATCHES, $name, $route); + + return true; + } + } + + $this->addTrace('Route matches!', self::ROUTE_MATCHES, $name, $route); + + return true; + } + } + + private function addTrace($log, $level = self::ROUTE_DOES_NOT_MATCH, $name = null, $route = null) + { + $this->traces[] = array( + 'log' => $log, + 'name' => $name, + 'level' => $level, + 'path' => null !== $route ? $route->getPath() : null, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcher.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcher.php new file mode 100644 index 0000000000000000000000000000000000000000..9786a9b42cc609918ec0bd50e8eecab6a250853d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcher.php @@ -0,0 +1,251 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Matcher; + +use Symfony\Component\Routing\Exception\MethodNotAllowedException; +use Symfony\Component\Routing\Exception\ResourceNotFoundException; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Routing\Route; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\ExpressionLanguage\ExpressionLanguage; +use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; + +/** + * UrlMatcher matches URL based on a set of routes. + * + * @author Fabien Potencier + */ +class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface +{ + const REQUIREMENT_MATCH = 0; + const REQUIREMENT_MISMATCH = 1; + const ROUTE_MATCH = 2; + + /** + * @var RequestContext + */ + protected $context; + + /** + * @var array + */ + protected $allow = array(); + + /** + * @var RouteCollection + */ + protected $routes; + + protected $request; + protected $expressionLanguage; + + /** + * @var ExpressionFunctionProviderInterface[] + */ + protected $expressionLanguageProviders = array(); + + /** + * Constructor. + * + * @param RouteCollection $routes A RouteCollection instance + * @param RequestContext $context The context + */ + public function __construct(RouteCollection $routes, RequestContext $context) + { + $this->routes = $routes; + $this->context = $context; + } + + /** + * {@inheritdoc} + */ + public function setContext(RequestContext $context) + { + $this->context = $context; + } + + /** + * {@inheritdoc} + */ + public function getContext() + { + return $this->context; + } + + /** + * {@inheritdoc} + */ + public function match($pathinfo) + { + $this->allow = array(); + + if ($ret = $this->matchCollection(rawurldecode($pathinfo), $this->routes)) { + return $ret; + } + + throw 0 < count($this->allow) + ? new MethodNotAllowedException(array_unique($this->allow)) + : new ResourceNotFoundException(sprintf('No routes found for "%s".', $pathinfo)); + } + + /** + * {@inheritdoc} + */ + public function matchRequest(Request $request) + { + $this->request = $request; + + $ret = $this->match($request->getPathInfo()); + + $this->request = null; + + return $ret; + } + + public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) + { + $this->expressionLanguageProviders[] = $provider; + } + + /** + * Tries to match a URL with a set of routes. + * + * @param string $pathinfo The path info to be parsed + * @param RouteCollection $routes The set of routes + * + * @return array An array of parameters + * + * @throws ResourceNotFoundException If the resource could not be found + * @throws MethodNotAllowedException If the resource was found but the request method is not allowed + */ + protected function matchCollection($pathinfo, RouteCollection $routes) + { + foreach ($routes as $name => $route) { + $compiledRoute = $route->compile(); + + // check the static prefix of the URL first. Only use the more expensive preg_match when it matches + if ('' !== $compiledRoute->getStaticPrefix() && 0 !== strpos($pathinfo, $compiledRoute->getStaticPrefix())) { + continue; + } + + if (!preg_match($compiledRoute->getRegex(), $pathinfo, $matches)) { + continue; + } + + $hostMatches = array(); + if ($compiledRoute->getHostRegex() && !preg_match($compiledRoute->getHostRegex(), $this->context->getHost(), $hostMatches)) { + continue; + } + + // check HTTP method requirement + if ($requiredMethods = $route->getMethods()) { + // HEAD and GET are equivalent as per RFC + if ('HEAD' === $method = $this->context->getMethod()) { + $method = 'GET'; + } + + if (!in_array($method, $requiredMethods)) { + $this->allow = array_merge($this->allow, $requiredMethods); + + continue; + } + } + + $status = $this->handleRouteRequirements($pathinfo, $name, $route); + + if (self::ROUTE_MATCH === $status[0]) { + return $status[1]; + } + + if (self::REQUIREMENT_MISMATCH === $status[0]) { + continue; + } + + return $this->getAttributes($route, $name, array_replace($matches, $hostMatches)); + } + } + + /** + * Returns an array of values to use as request attributes. + * + * As this method requires the Route object, it is not available + * in matchers that do not have access to the matched Route instance + * (like the PHP and Apache matcher dumpers). + * + * @param Route $route The route we are matching against + * @param string $name The name of the route + * @param array $attributes An array of attributes from the matcher + * + * @return array An array of parameters + */ + protected function getAttributes(Route $route, $name, array $attributes) + { + $attributes['_route'] = $name; + + return $this->mergeDefaults($attributes, $route->getDefaults()); + } + + /** + * Handles specific route requirements. + * + * @param string $pathinfo The path + * @param string $name The route name + * @param Route $route The route + * + * @return array The first element represents the status, the second contains additional information + */ + protected function handleRouteRequirements($pathinfo, $name, Route $route) + { + // expression condition + if ($route->getCondition() && !$this->getExpressionLanguage()->evaluate($route->getCondition(), array('context' => $this->context, 'request' => $this->request))) { + return array(self::REQUIREMENT_MISMATCH, null); + } + + // check HTTP scheme requirement + $scheme = $this->context->getScheme(); + $status = $route->getSchemes() && !$route->hasScheme($scheme) ? self::REQUIREMENT_MISMATCH : self::REQUIREMENT_MATCH; + + return array($status, null); + } + + /** + * Get merged default parameters. + * + * @param array $params The parameters + * @param array $defaults The defaults + * + * @return array Merged default parameters + */ + protected function mergeDefaults($params, $defaults) + { + foreach ($params as $key => $value) { + if (!is_int($key)) { + $defaults[$key] = $value; + } + } + + return $defaults; + } + + protected function getExpressionLanguage() + { + if (null === $this->expressionLanguage) { + if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) { + throw new \RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); + } + $this->expressionLanguage = new ExpressionLanguage(null, $this->expressionLanguageProviders); + } + + return $this->expressionLanguage; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..af38662fea930f33c4962519c05c2751a3afb925 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Matcher; + +use Symfony\Component\Routing\RequestContextAwareInterface; +use Symfony\Component\Routing\Exception\ResourceNotFoundException; +use Symfony\Component\Routing\Exception\MethodNotAllowedException; + +/** + * UrlMatcherInterface is the interface that all URL matcher classes must implement. + * + * @author Fabien Potencier + */ +interface UrlMatcherInterface extends RequestContextAwareInterface +{ + /** + * Tries to match a URL path with a set of routes. + * + * If the matcher can not find information, it must throw one of the exceptions documented + * below. + * + * @param string $pathinfo The path info to be parsed (raw format, i.e. not urldecoded) + * + * @return array An array of parameters + * + * @throws ResourceNotFoundException If the resource could not be found + * @throws MethodNotAllowedException If the resource was found but the request method is not allowed + */ + public function match($pathinfo); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/README.md b/vendor/symfony/symfony/src/Symfony/Component/Routing/README.md new file mode 100644 index 0000000000000000000000000000000000000000..88fb1fde5a7bdc716a76b150b189a64b3dd84cdd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/README.md @@ -0,0 +1,13 @@ +Routing Component +================= + +The Routing component maps an HTTP request to a set of configuration variables. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/routing/index.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/vendor/symfony/symfony/src/Symfony/Component/Routing/RequestContext.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/RequestContext.php new file mode 100644 index 0000000000000000000000000000000000000000..9b15cd07d54a3ee201baa57c858e8211e995c9ea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/RequestContext.php @@ -0,0 +1,344 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing; + +use Symfony\Component\HttpFoundation\Request; + +/** + * Holds information about the current request. + * + * This class implements a fluent interface. + * + * @author Fabien Potencier + * @author Tobias Schultze + */ +class RequestContext +{ + private $baseUrl; + private $pathInfo; + private $method; + private $host; + private $scheme; + private $httpPort; + private $httpsPort; + private $queryString; + + /** + * @var array + */ + private $parameters = array(); + + /** + * Constructor. + * + * @param string $baseUrl The base URL + * @param string $method The HTTP method + * @param string $host The HTTP host name + * @param string $scheme The HTTP scheme + * @param int $httpPort The HTTP port + * @param int $httpsPort The HTTPS port + * @param string $path The path + * @param string $queryString The query string + */ + public function __construct($baseUrl = '', $method = 'GET', $host = 'localhost', $scheme = 'http', $httpPort = 80, $httpsPort = 443, $path = '/', $queryString = '') + { + $this->setBaseUrl($baseUrl); + $this->setMethod($method); + $this->setHost($host); + $this->setScheme($scheme); + $this->setHttpPort($httpPort); + $this->setHttpsPort($httpsPort); + $this->setPathInfo($path); + $this->setQueryString($queryString); + } + + /** + * Updates the RequestContext information based on a HttpFoundation Request. + * + * @param Request $request A Request instance + * + * @return $this + */ + public function fromRequest(Request $request) + { + $this->setBaseUrl($request->getBaseUrl()); + $this->setPathInfo($request->getPathInfo()); + $this->setMethod($request->getMethod()); + $this->setHost($request->getHost()); + $this->setScheme($request->getScheme()); + $this->setHttpPort($request->isSecure() ? $this->httpPort : $request->getPort()); + $this->setHttpsPort($request->isSecure() ? $request->getPort() : $this->httpsPort); + $this->setQueryString($request->server->get('QUERY_STRING', '')); + + return $this; + } + + /** + * Gets the base URL. + * + * @return string The base URL + */ + public function getBaseUrl() + { + return $this->baseUrl; + } + + /** + * Sets the base URL. + * + * @param string $baseUrl The base URL + * + * @return $this + */ + public function setBaseUrl($baseUrl) + { + $this->baseUrl = $baseUrl; + + return $this; + } + + /** + * Gets the path info. + * + * @return string The path info + */ + public function getPathInfo() + { + return $this->pathInfo; + } + + /** + * Sets the path info. + * + * @param string $pathInfo The path info + * + * @return $this + */ + public function setPathInfo($pathInfo) + { + $this->pathInfo = $pathInfo; + + return $this; + } + + /** + * Gets the HTTP method. + * + * The method is always an uppercased string. + * + * @return string The HTTP method + */ + public function getMethod() + { + return $this->method; + } + + /** + * Sets the HTTP method. + * + * @param string $method The HTTP method + * + * @return $this + */ + public function setMethod($method) + { + $this->method = strtoupper($method); + + return $this; + } + + /** + * Gets the HTTP host. + * + * The host is always lowercased because it must be treated case-insensitive. + * + * @return string The HTTP host + */ + public function getHost() + { + return $this->host; + } + + /** + * Sets the HTTP host. + * + * @param string $host The HTTP host + * + * @return $this + */ + public function setHost($host) + { + $this->host = strtolower($host); + + return $this; + } + + /** + * Gets the HTTP scheme. + * + * @return string The HTTP scheme + */ + public function getScheme() + { + return $this->scheme; + } + + /** + * Sets the HTTP scheme. + * + * @param string $scheme The HTTP scheme + * + * @return $this + */ + public function setScheme($scheme) + { + $this->scheme = strtolower($scheme); + + return $this; + } + + /** + * Gets the HTTP port. + * + * @return int The HTTP port + */ + public function getHttpPort() + { + return $this->httpPort; + } + + /** + * Sets the HTTP port. + * + * @param int $httpPort The HTTP port + * + * @return $this + */ + public function setHttpPort($httpPort) + { + $this->httpPort = (int) $httpPort; + + return $this; + } + + /** + * Gets the HTTPS port. + * + * @return int The HTTPS port + */ + public function getHttpsPort() + { + return $this->httpsPort; + } + + /** + * Sets the HTTPS port. + * + * @param int $httpsPort The HTTPS port + * + * @return $this + */ + public function setHttpsPort($httpsPort) + { + $this->httpsPort = (int) $httpsPort; + + return $this; + } + + /** + * Gets the query string. + * + * @return string The query string without the "?" + */ + public function getQueryString() + { + return $this->queryString; + } + + /** + * Sets the query string. + * + * @param string $queryString The query string (after "?") + * + * @return $this + */ + public function setQueryString($queryString) + { + // string cast to be fault-tolerant, accepting null + $this->queryString = (string) $queryString; + + return $this; + } + + /** + * Returns the parameters. + * + * @return array The parameters + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Sets the parameters. + * + * @param array $parameters The parameters + * + * @return $this + */ + public function setParameters(array $parameters) + { + $this->parameters = $parameters; + + return $this; + } + + /** + * Gets a parameter value. + * + * @param string $name A parameter name + * + * @return mixed The parameter value or null if nonexistent + */ + public function getParameter($name) + { + return isset($this->parameters[$name]) ? $this->parameters[$name] : null; + } + + /** + * Checks if a parameter value is set for the given parameter. + * + * @param string $name A parameter name + * + * @return bool True if the parameter value is set, false otherwise + */ + public function hasParameter($name) + { + return array_key_exists($name, $this->parameters); + } + + /** + * Sets a parameter value. + * + * @param string $name A parameter name + * @param mixed $parameter The parameter value + * + * @return $this + */ + public function setParameter($name, $parameter) + { + $this->parameters[$name] = $parameter; + + return $this; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/RequestContextAwareInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/RequestContextAwareInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..ebb0ef46ede286480bc1efb4e7e680a9ae0d29bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/RequestContextAwareInterface.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\Component\Routing; + +interface RequestContextAwareInterface +{ + /** + * Sets the request context. + * + * @param RequestContext $context The context + */ + public function setContext(RequestContext $context); + + /** + * Gets the request context. + * + * @return RequestContext The context + */ + public function getContext(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Route.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Route.php new file mode 100644 index 0000000000000000000000000000000000000000..69a7cade10c334aad45e41bc4aad01284d06d900 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Route.php @@ -0,0 +1,589 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing; + +/** + * A Route describes a route and its parameters. + * + * @author Fabien Potencier + * @author Tobias Schultze + */ +class Route implements \Serializable +{ + /** + * @var string + */ + private $path = '/'; + + /** + * @var string + */ + private $host = ''; + + /** + * @var array + */ + private $schemes = array(); + + /** + * @var array + */ + private $methods = array(); + + /** + * @var array + */ + private $defaults = array(); + + /** + * @var array + */ + private $requirements = array(); + + /** + * @var array + */ + private $options = array(); + + /** + * @var null|CompiledRoute + */ + private $compiled; + + /** + * @var string + */ + private $condition = ''; + + /** + * Constructor. + * + * Available options: + * + * * compiler_class: A class name able to compile this route instance (RouteCompiler by default) + * * utf8: Whether UTF-8 matching is enforced ot not + * + * @param string $path The path pattern to match + * @param array $defaults An array of default parameter values + * @param array $requirements An array of requirements for parameters (regexes) + * @param array $options An array of options + * @param string $host The host pattern to match + * @param string|array $schemes A required URI scheme or an array of restricted schemes + * @param string|array $methods A required HTTP method or an array of restricted methods + * @param string $condition A condition that should evaluate to true for the route to match + */ + public function __construct($path, array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array(), $condition = '') + { + $this->setPath($path); + $this->setDefaults($defaults); + $this->setRequirements($requirements); + $this->setOptions($options); + $this->setHost($host); + $this->setSchemes($schemes); + $this->setMethods($methods); + $this->setCondition($condition); + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize(array( + 'path' => $this->path, + 'host' => $this->host, + 'defaults' => $this->defaults, + 'requirements' => $this->requirements, + 'options' => $this->options, + 'schemes' => $this->schemes, + 'methods' => $this->methods, + 'condition' => $this->condition, + 'compiled' => $this->compiled, + )); + } + + /** + * {@inheritdoc} + */ + public function unserialize($serialized) + { + $data = unserialize($serialized); + $this->path = $data['path']; + $this->host = $data['host']; + $this->defaults = $data['defaults']; + $this->requirements = $data['requirements']; + $this->options = $data['options']; + $this->schemes = $data['schemes']; + $this->methods = $data['methods']; + + if (isset($data['condition'])) { + $this->condition = $data['condition']; + } + if (isset($data['compiled'])) { + $this->compiled = $data['compiled']; + } + } + + /** + * Returns the pattern for the path. + * + * @return string The path pattern + */ + public function getPath() + { + return $this->path; + } + + /** + * Sets the pattern for the path. + * + * This method implements a fluent interface. + * + * @param string $pattern The path pattern + * + * @return $this + */ + public function setPath($pattern) + { + // A pattern must start with a slash and must not have multiple slashes at the beginning because the + // generated path for this route would be confused with a network path, e.g. '//domain.com/path'. + $this->path = '/'.ltrim(trim($pattern), '/'); + $this->compiled = null; + + return $this; + } + + /** + * Returns the pattern for the host. + * + * @return string The host pattern + */ + public function getHost() + { + return $this->host; + } + + /** + * Sets the pattern for the host. + * + * This method implements a fluent interface. + * + * @param string $pattern The host pattern + * + * @return $this + */ + public function setHost($pattern) + { + $this->host = (string) $pattern; + $this->compiled = null; + + return $this; + } + + /** + * Returns the lowercased schemes this route is restricted to. + * So an empty array means that any scheme is allowed. + * + * @return array The schemes + */ + public function getSchemes() + { + return $this->schemes; + } + + /** + * Sets the schemes (e.g. 'https') this route is restricted to. + * So an empty array means that any scheme is allowed. + * + * This method implements a fluent interface. + * + * @param string|array $schemes The scheme or an array of schemes + * + * @return $this + */ + public function setSchemes($schemes) + { + $this->schemes = array_map('strtolower', (array) $schemes); + $this->compiled = null; + + return $this; + } + + /** + * Checks if a scheme requirement has been set. + * + * @param string $scheme + * + * @return bool true if the scheme requirement exists, otherwise false + */ + public function hasScheme($scheme) + { + return in_array(strtolower($scheme), $this->schemes, true); + } + + /** + * Returns the uppercased HTTP methods this route is restricted to. + * So an empty array means that any method is allowed. + * + * @return array The methods + */ + public function getMethods() + { + return $this->methods; + } + + /** + * Sets the HTTP methods (e.g. 'POST') this route is restricted to. + * So an empty array means that any method is allowed. + * + * This method implements a fluent interface. + * + * @param string|array $methods The method or an array of methods + * + * @return $this + */ + public function setMethods($methods) + { + $this->methods = array_map('strtoupper', (array) $methods); + $this->compiled = null; + + return $this; + } + + /** + * Returns the options. + * + * @return array The options + */ + public function getOptions() + { + return $this->options; + } + + /** + * Sets the options. + * + * This method implements a fluent interface. + * + * @param array $options The options + * + * @return $this + */ + public function setOptions(array $options) + { + $this->options = array( + 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', + ); + + return $this->addOptions($options); + } + + /** + * Adds options. + * + * This method implements a fluent interface. + * + * @param array $options The options + * + * @return $this + */ + public function addOptions(array $options) + { + foreach ($options as $name => $option) { + $this->options[$name] = $option; + } + $this->compiled = null; + + return $this; + } + + /** + * Sets an option value. + * + * This method implements a fluent interface. + * + * @param string $name An option name + * @param mixed $value The option value + * + * @return $this + */ + public function setOption($name, $value) + { + $this->options[$name] = $value; + $this->compiled = null; + + return $this; + } + + /** + * Get an option value. + * + * @param string $name An option name + * + * @return mixed The option value or null when not given + */ + public function getOption($name) + { + return isset($this->options[$name]) ? $this->options[$name] : null; + } + + /** + * Checks if an option has been set. + * + * @param string $name An option name + * + * @return bool true if the option is set, false otherwise + */ + public function hasOption($name) + { + return array_key_exists($name, $this->options); + } + + /** + * Returns the defaults. + * + * @return array The defaults + */ + public function getDefaults() + { + return $this->defaults; + } + + /** + * Sets the defaults. + * + * This method implements a fluent interface. + * + * @param array $defaults The defaults + * + * @return $this + */ + public function setDefaults(array $defaults) + { + $this->defaults = array(); + + return $this->addDefaults($defaults); + } + + /** + * Adds defaults. + * + * This method implements a fluent interface. + * + * @param array $defaults The defaults + * + * @return $this + */ + public function addDefaults(array $defaults) + { + foreach ($defaults as $name => $default) { + $this->defaults[$name] = $default; + } + $this->compiled = null; + + return $this; + } + + /** + * Gets a default value. + * + * @param string $name A variable name + * + * @return mixed The default value or null when not given + */ + public function getDefault($name) + { + return isset($this->defaults[$name]) ? $this->defaults[$name] : null; + } + + /** + * Checks if a default value is set for the given variable. + * + * @param string $name A variable name + * + * @return bool true if the default value is set, false otherwise + */ + public function hasDefault($name) + { + return array_key_exists($name, $this->defaults); + } + + /** + * Sets a default value. + * + * @param string $name A variable name + * @param mixed $default The default value + * + * @return $this + */ + public function setDefault($name, $default) + { + $this->defaults[$name] = $default; + $this->compiled = null; + + return $this; + } + + /** + * Returns the requirements. + * + * @return array The requirements + */ + public function getRequirements() + { + return $this->requirements; + } + + /** + * Sets the requirements. + * + * This method implements a fluent interface. + * + * @param array $requirements The requirements + * + * @return $this + */ + public function setRequirements(array $requirements) + { + $this->requirements = array(); + + return $this->addRequirements($requirements); + } + + /** + * Adds requirements. + * + * This method implements a fluent interface. + * + * @param array $requirements The requirements + * + * @return $this + */ + public function addRequirements(array $requirements) + { + foreach ($requirements as $key => $regex) { + $this->requirements[$key] = $this->sanitizeRequirement($key, $regex); + } + $this->compiled = null; + + return $this; + } + + /** + * Returns the requirement for the given key. + * + * @param string $key The key + * + * @return string|null The regex or null when not given + */ + public function getRequirement($key) + { + return isset($this->requirements[$key]) ? $this->requirements[$key] : null; + } + + /** + * Checks if a requirement is set for the given key. + * + * @param string $key A variable name + * + * @return bool true if a requirement is specified, false otherwise + */ + public function hasRequirement($key) + { + return array_key_exists($key, $this->requirements); + } + + /** + * Sets a requirement for the given key. + * + * @param string $key The key + * @param string $regex The regex + * + * @return $this + */ + public function setRequirement($key, $regex) + { + $this->requirements[$key] = $this->sanitizeRequirement($key, $regex); + $this->compiled = null; + + return $this; + } + + /** + * Returns the condition. + * + * @return string The condition + */ + public function getCondition() + { + return $this->condition; + } + + /** + * Sets the condition. + * + * This method implements a fluent interface. + * + * @param string $condition The condition + * + * @return $this + */ + public function setCondition($condition) + { + $this->condition = (string) $condition; + $this->compiled = null; + + return $this; + } + + /** + * Compiles the route. + * + * @return CompiledRoute A CompiledRoute instance + * + * @throws \LogicException If the Route cannot be compiled because the + * path or host pattern is invalid + * + * @see RouteCompiler which is responsible for the compilation process + */ + public function compile() + { + if (null !== $this->compiled) { + return $this->compiled; + } + + $class = $this->getOption('compiler_class'); + + return $this->compiled = $class::compile($this); + } + + private function sanitizeRequirement($key, $regex) + { + if (!is_string($regex)) { + throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" must be a string.', $key)); + } + + if ('' !== $regex && '^' === $regex[0]) { + $regex = (string) substr($regex, 1); // returns false for a single character + } + + if ('$' === substr($regex, -1)) { + $regex = substr($regex, 0, -1); + } + + if ('' === $regex) { + throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" cannot be empty.', $key)); + } + + return $regex; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollection.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollection.php new file mode 100644 index 0000000000000000000000000000000000000000..2ccb90f3b096696963487f9a726cf83d63341a48 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollection.php @@ -0,0 +1,277 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing; + +use Symfony\Component\Config\Resource\ResourceInterface; + +/** + * A RouteCollection represents a set of Route instances. + * + * When adding a route at the end of the collection, an existing route + * with the same name is removed first. So there can only be one route + * with a given name. + * + * @author Fabien Potencier + * @author Tobias Schultze + */ +class RouteCollection implements \IteratorAggregate, \Countable +{ + /** + * @var Route[] + */ + private $routes = array(); + + /** + * @var array + */ + private $resources = array(); + + public function __clone() + { + foreach ($this->routes as $name => $route) { + $this->routes[$name] = clone $route; + } + } + + /** + * Gets the current RouteCollection as an Iterator that includes all routes. + * + * It implements \IteratorAggregate. + * + * @see all() + * + * @return \ArrayIterator|Route[] An \ArrayIterator object for iterating over routes + */ + public function getIterator() + { + return new \ArrayIterator($this->routes); + } + + /** + * Gets the number of Routes in this collection. + * + * @return int The number of routes + */ + public function count() + { + return count($this->routes); + } + + /** + * Adds a route. + * + * @param string $name The route name + * @param Route $route A Route instance + */ + public function add($name, Route $route) + { + unset($this->routes[$name]); + + $this->routes[$name] = $route; + } + + /** + * Returns all routes in this collection. + * + * @return Route[] An array of routes + */ + public function all() + { + return $this->routes; + } + + /** + * Gets a route by name. + * + * @param string $name The route name + * + * @return Route|null A Route instance or null when not found + */ + public function get($name) + { + return isset($this->routes[$name]) ? $this->routes[$name] : null; + } + + /** + * Removes a route or an array of routes by name from the collection. + * + * @param string|array $name The route name or an array of route names + */ + public function remove($name) + { + foreach ((array) $name as $n) { + unset($this->routes[$n]); + } + } + + /** + * Adds a route collection at the end of the current set by appending all + * routes of the added collection. + * + * @param RouteCollection $collection A RouteCollection instance + */ + public function addCollection(RouteCollection $collection) + { + // we need to remove all routes with the same names first because just replacing them + // would not place the new route at the end of the merged array + foreach ($collection->all() as $name => $route) { + unset($this->routes[$name]); + $this->routes[$name] = $route; + } + + $this->resources = array_merge($this->resources, $collection->getResources()); + } + + /** + * Adds a prefix to the path of all child routes. + * + * @param string $prefix An optional prefix to add before each pattern of the route collection + * @param array $defaults An array of default values + * @param array $requirements An array of requirements + */ + public function addPrefix($prefix, array $defaults = array(), array $requirements = array()) + { + $prefix = trim(trim($prefix), '/'); + + if ('' === $prefix) { + return; + } + + foreach ($this->routes as $route) { + $route->setPath('/'.$prefix.$route->getPath()); + $route->addDefaults($defaults); + $route->addRequirements($requirements); + } + } + + /** + * Sets the host pattern on all routes. + * + * @param string $pattern The pattern + * @param array $defaults An array of default values + * @param array $requirements An array of requirements + */ + public function setHost($pattern, array $defaults = array(), array $requirements = array()) + { + foreach ($this->routes as $route) { + $route->setHost($pattern); + $route->addDefaults($defaults); + $route->addRequirements($requirements); + } + } + + /** + * Sets a condition on all routes. + * + * Existing conditions will be overridden. + * + * @param string $condition The condition + */ + public function setCondition($condition) + { + foreach ($this->routes as $route) { + $route->setCondition($condition); + } + } + + /** + * Adds defaults to all routes. + * + * An existing default value under the same name in a route will be overridden. + * + * @param array $defaults An array of default values + */ + public function addDefaults(array $defaults) + { + if ($defaults) { + foreach ($this->routes as $route) { + $route->addDefaults($defaults); + } + } + } + + /** + * Adds requirements to all routes. + * + * An existing requirement under the same name in a route will be overridden. + * + * @param array $requirements An array of requirements + */ + public function addRequirements(array $requirements) + { + if ($requirements) { + foreach ($this->routes as $route) { + $route->addRequirements($requirements); + } + } + } + + /** + * Adds options to all routes. + * + * An existing option value under the same name in a route will be overridden. + * + * @param array $options An array of options + */ + public function addOptions(array $options) + { + if ($options) { + foreach ($this->routes as $route) { + $route->addOptions($options); + } + } + } + + /** + * Sets the schemes (e.g. 'https') all child routes are restricted to. + * + * @param string|array $schemes The scheme or an array of schemes + */ + public function setSchemes($schemes) + { + foreach ($this->routes as $route) { + $route->setSchemes($schemes); + } + } + + /** + * Sets the HTTP methods (e.g. 'POST') all child routes are restricted to. + * + * @param string|array $methods The method or an array of methods + */ + public function setMethods($methods) + { + foreach ($this->routes as $route) { + $route->setMethods($methods); + } + } + + /** + * Returns an array of resources loaded to build this collection. + * + * @return ResourceInterface[] An array of resources + */ + public function getResources() + { + return array_unique($this->resources); + } + + /** + * Adds a resource for this collection. + * + * @param ResourceInterface $resource A resource instance + */ + public function addResource(ResourceInterface $resource) + { + $this->resources[] = $resource; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollectionBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollectionBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..726dfa9022cfb6639732de2dceb9f22faaf6e727 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollectionBuilder.php @@ -0,0 +1,372 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing; + +use Symfony\Component\Config\Exception\FileLoaderLoadException; +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\Config\Resource\ResourceInterface; + +/** + * Helps add and import routes into a RouteCollection. + * + * @author Ryan Weaver + */ +class RouteCollectionBuilder +{ + /** + * @var Route[]|RouteCollectionBuilder[] + */ + private $routes = array(); + + private $loader; + private $defaults = array(); + private $prefix; + private $host; + private $condition; + private $requirements = array(); + private $options = array(); + private $schemes; + private $methods; + private $resources = array(); + + /** + * @param LoaderInterface $loader + */ + public function __construct(LoaderInterface $loader = null) + { + $this->loader = $loader; + } + + /** + * Import an external routing resource and returns the RouteCollectionBuilder. + * + * $routes->import('blog.yml', '/blog'); + * + * @param mixed $resource + * @param string|null $prefix + * @param string $type + * + * @return self + * + * @throws FileLoaderLoadException + */ + public function import($resource, $prefix = '/', $type = null) + { + /** @var RouteCollection $collection */ + $collection = $this->load($resource, $type); + + // create a builder from the RouteCollection + $builder = $this->createBuilder(); + foreach ($collection->all() as $name => $route) { + $builder->addRoute($route, $name); + } + + foreach ($collection->getResources() as $resource) { + $builder->addResource($resource); + } + + // mount into this builder + $this->mount($prefix, $builder); + + return $builder; + } + + /** + * Adds a route and returns it for future modification. + * + * @param string $path The route path + * @param string $controller The route's controller + * @param string|null $name The name to give this route + * + * @return Route + */ + public function add($path, $controller, $name = null) + { + $route = new Route($path); + $route->setDefault('_controller', $controller); + $this->addRoute($route, $name); + + return $route; + } + + /** + * Returns a RouteCollectionBuilder that can be configured and then added with mount(). + * + * @return self + */ + public function createBuilder() + { + return new self($this->loader); + } + + /** + * Add a RouteCollectionBuilder. + * + * @param string $prefix + * @param RouteCollectionBuilder $builder + */ + public function mount($prefix, RouteCollectionBuilder $builder) + { + $builder->prefix = trim(trim($prefix), '/'); + $this->routes[] = $builder; + } + + /** + * Adds a Route object to the builder. + * + * @param Route $route + * @param string|null $name + * + * @return $this + */ + public function addRoute(Route $route, $name = null) + { + if (null === $name) { + // used as a flag to know which routes will need a name later + $name = '_unnamed_route_'.spl_object_hash($route); + } + + $this->routes[$name] = $route; + + return $this; + } + + /** + * Sets the host on all embedded routes (unless already set). + * + * @param string $pattern + * + * @return $this + */ + public function setHost($pattern) + { + $this->host = $pattern; + + return $this; + } + + /** + * Sets a condition on all embedded routes (unless already set). + * + * @param string $condition + * + * @return $this + */ + public function setCondition($condition) + { + $this->condition = $condition; + + return $this; + } + + /** + * Sets a default value that will be added to all embedded routes (unless that + * default value is already set). + * + * @param string $key + * @param mixed $value + * + * @return $this + */ + public function setDefault($key, $value) + { + $this->defaults[$key] = $value; + + return $this; + } + + /** + * Sets a requirement that will be added to all embedded routes (unless that + * requirement is already set). + * + * @param string $key + * @param mixed $regex + * + * @return $this + */ + public function setRequirement($key, $regex) + { + $this->requirements[$key] = $regex; + + return $this; + } + + /** + * Sets an opiton that will be added to all embedded routes (unless that + * option is already set). + * + * @param string $key + * @param mixed $value + * + * @return $this + */ + public function setOption($key, $value) + { + $this->options[$key] = $value; + + return $this; + } + + /** + * Sets the schemes on all embedded routes (unless already set). + * + * @param array|string $schemes + * + * @return $this + */ + public function setSchemes($schemes) + { + $this->schemes = $schemes; + + return $this; + } + + /** + * Sets the methods on all embedded routes (unless already set). + * + * @param array|string $methods + * + * @return $this + */ + public function setMethods($methods) + { + $this->methods = $methods; + + return $this; + } + + /** + * Adds a resource for this collection. + * + * @param ResourceInterface $resource + * + * @return $this + */ + private function addResource(ResourceInterface $resource) + { + $this->resources[] = $resource; + + return $this; + } + + /** + * Creates the final RouteCollection and returns it. + * + * @return RouteCollection + */ + public function build() + { + $routeCollection = new RouteCollection(); + + foreach ($this->routes as $name => $route) { + if ($route instanceof Route) { + $route->setDefaults(array_merge($this->defaults, $route->getDefaults())); + $route->setOptions(array_merge($this->options, $route->getOptions())); + + foreach ($this->requirements as $key => $val) { + if (!$route->hasRequirement($key)) { + $route->setRequirement($key, $val); + } + } + + if (null !== $this->prefix) { + $route->setPath('/'.$this->prefix.$route->getPath()); + } + + if (!$route->getHost()) { + $route->setHost($this->host); + } + + if (!$route->getCondition()) { + $route->setCondition($this->condition); + } + + if (!$route->getSchemes()) { + $route->setSchemes($this->schemes); + } + + if (!$route->getMethods()) { + $route->setMethods($this->methods); + } + + // auto-generate the route name if it's been marked + if ('_unnamed_route_' === substr($name, 0, 15)) { + $name = $this->generateRouteName($route); + } + + $routeCollection->add($name, $route); + } else { + /* @var self $route */ + $subCollection = $route->build(); + $subCollection->addPrefix($this->prefix); + + $routeCollection->addCollection($subCollection); + } + + foreach ($this->resources as $resource) { + $routeCollection->addResource($resource); + } + } + + return $routeCollection; + } + + /** + * Generates a route name based on details of this route. + * + * @return string + */ + private function generateRouteName(Route $route) + { + $methods = implode('_', $route->getMethods()).'_'; + + $routeName = $methods.$route->getPath(); + $routeName = str_replace(array('/', ':', '|', '-'), '_', $routeName); + $routeName = preg_replace('/[^a-z0-9A-Z_.]+/', '', $routeName); + + // Collapse consecutive underscores down into a single underscore. + $routeName = preg_replace('/_+/', '_', $routeName); + + return $routeName; + } + + /** + * Finds a loader able to load an imported resource and loads it. + * + * @param mixed $resource A resource + * @param string|null $type The resource type or null if unknown + * + * @return RouteCollection + * + * @throws FileLoaderLoadException If no loader is found + */ + private function load($resource, $type = null) + { + if (null === $this->loader) { + throw new \BadMethodCallException('Cannot import other routing resources: you must pass a LoaderInterface when constructing RouteCollectionBuilder.'); + } + + if ($this->loader->supports($resource, $type)) { + return $this->loader->load($resource, $type); + } + + if (null === $resolver = $this->loader->getResolver()) { + throw new FileLoaderLoadException($resource); + } + + if (false === $loader = $resolver->resolve($resource, $type)) { + throw new FileLoaderLoadException($resource); + } + + return $loader->load($resource, $type); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCompiler.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCompiler.php new file mode 100644 index 0000000000000000000000000000000000000000..aa7a75e0b009bd01ec39063a8b3b8a459b18fb60 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCompiler.php @@ -0,0 +1,296 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing; + +/** + * RouteCompiler compiles Route instances to CompiledRoute instances. + * + * @author Fabien Potencier + * @author Tobias Schultze + */ +class RouteCompiler implements RouteCompilerInterface +{ + const REGEX_DELIMITER = '#'; + + /** + * This string defines the characters that are automatically considered separators in front of + * optional placeholders (with default and no static text following). Such a single separator + * can be left out together with the optional placeholder from matching and generating URLs. + */ + const SEPARATORS = '/,;.:-_~+*=@|'; + + /** + * The maximum supported length of a PCRE subpattern name + * http://pcre.org/current/doc/html/pcre2pattern.html#SEC16. + * + * @internal + */ + const VARIABLE_MAXIMUM_LENGTH = 32; + + /** + * {@inheritdoc} + * + * @throws \InvalidArgumentException If a path variable is named _fragment + * @throws \LogicException If a variable is referenced more than once + * @throws \DomainException If a variable name starts with a digit or if it is too long to be successfully used as + * a PCRE subpattern. + */ + public static function compile(Route $route) + { + $hostVariables = array(); + $variables = array(); + $hostRegex = null; + $hostTokens = array(); + + if ('' !== $host = $route->getHost()) { + $result = self::compilePattern($route, $host, true); + + $hostVariables = $result['variables']; + $variables = $hostVariables; + + $hostTokens = $result['tokens']; + $hostRegex = $result['regex']; + } + + $path = $route->getPath(); + + $result = self::compilePattern($route, $path, false); + + $staticPrefix = $result['staticPrefix']; + + $pathVariables = $result['variables']; + + foreach ($pathVariables as $pathParam) { + if ('_fragment' === $pathParam) { + throw new \InvalidArgumentException(sprintf('Route pattern "%s" cannot contain "_fragment" as a path parameter.', $route->getPath())); + } + } + + $variables = array_merge($variables, $pathVariables); + + $tokens = $result['tokens']; + $regex = $result['regex']; + + return new CompiledRoute( + $staticPrefix, + $regex, + $tokens, + $pathVariables, + $hostRegex, + $hostTokens, + $hostVariables, + array_unique($variables) + ); + } + + private static function compilePattern(Route $route, $pattern, $isHost) + { + $tokens = array(); + $variables = array(); + $matches = array(); + $pos = 0; + $defaultSeparator = $isHost ? '.' : '/'; + $useUtf8 = preg_match('//u', $pattern); + $needsUtf8 = $route->getOption('utf8'); + + if (!$needsUtf8 && $useUtf8 && preg_match('/[\x80-\xFF]/', $pattern)) { + $needsUtf8 = true; + @trigger_error(sprintf('Using UTF-8 route patterns without setting the "utf8" option is deprecated since Symfony 3.2 and will throw a LogicException in 4.0. Turn on the "utf8" route option for pattern "%s".', $pattern), E_USER_DEPRECATED); + } + if (!$useUtf8 && $needsUtf8) { + throw new \LogicException(sprintf('Cannot mix UTF-8 requirements with non-UTF-8 pattern "%s".', $pattern)); + } + + // Match all variables enclosed in "{}" and iterate over them. But we only want to match the innermost variable + // in case of nested "{}", e.g. {foo{bar}}. This in ensured because \w does not match "{" or "}" itself. + preg_match_all('#\{\w+\}#', $pattern, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); + foreach ($matches as $match) { + $varName = substr($match[0][0], 1, -1); + // get all static text preceding the current variable + $precedingText = substr($pattern, $pos, $match[0][1] - $pos); + $pos = $match[0][1] + strlen($match[0][0]); + + if (!strlen($precedingText)) { + $precedingChar = ''; + } elseif ($useUtf8) { + preg_match('/.$/u', $precedingText, $precedingChar); + $precedingChar = $precedingChar[0]; + } else { + $precedingChar = substr($precedingText, -1); + } + $isSeparator = '' !== $precedingChar && false !== strpos(static::SEPARATORS, $precedingChar); + + // A PCRE subpattern name must start with a non-digit. Also a PHP variable cannot start with a digit so the + // variable would not be usable as a Controller action argument. + if (preg_match('/^\d/', $varName)) { + throw new \DomainException(sprintf('Variable name "%s" cannot start with a digit in route pattern "%s". Please use a different name.', $varName, $pattern)); + } + if (in_array($varName, $variables)) { + throw new \LogicException(sprintf('Route pattern "%s" cannot reference variable name "%s" more than once.', $pattern, $varName)); + } + + if (strlen($varName) > self::VARIABLE_MAXIMUM_LENGTH) { + throw new \DomainException(sprintf('Variable name "%s" cannot be longer than %s characters in route pattern "%s". Please use a shorter name.', $varName, self::VARIABLE_MAXIMUM_LENGTH, $pattern)); + } + + if ($isSeparator && $precedingText !== $precedingChar) { + $tokens[] = array('text', substr($precedingText, 0, -strlen($precedingChar))); + } elseif (!$isSeparator && strlen($precedingText) > 0) { + $tokens[] = array('text', $precedingText); + } + + $regexp = $route->getRequirement($varName); + if (null === $regexp) { + $followingPattern = (string) substr($pattern, $pos); + // Find the next static character after the variable that functions as a separator. By default, this separator and '/' + // are disallowed for the variable. This default requirement makes sure that optional variables can be matched at all + // and that the generating-matching-combination of URLs unambiguous, i.e. the params used for generating the URL are + // the same that will be matched. Example: new Route('/{page}.{_format}', array('_format' => 'html')) + // If {page} would also match the separating dot, {_format} would never match as {page} will eagerly consume everything. + // Also even if {_format} was not optional the requirement prevents that {page} matches something that was originally + // part of {_format} when generating the URL, e.g. _format = 'mobile.html'. + $nextSeparator = self::findNextSeparator($followingPattern, $useUtf8); + $regexp = sprintf( + '[^%s%s]+', + preg_quote($defaultSeparator, self::REGEX_DELIMITER), + $defaultSeparator !== $nextSeparator && '' !== $nextSeparator ? preg_quote($nextSeparator, self::REGEX_DELIMITER) : '' + ); + if (('' !== $nextSeparator && !preg_match('#^\{\w+\}#', $followingPattern)) || '' === $followingPattern) { + // When we have a separator, which is disallowed for the variable, we can optimize the regex with a possessive + // quantifier. This prevents useless backtracking of PCRE and improves performance by 20% for matching those patterns. + // Given the above example, there is no point in backtracking into {page} (that forbids the dot) when a dot must follow + // after it. This optimization cannot be applied when the next char is no real separator or when the next variable is + // directly adjacent, e.g. '/{x}{y}'. + $regexp .= '+'; + } + } else { + if (!preg_match('//u', $regexp)) { + $useUtf8 = false; + } elseif (!$needsUtf8 && preg_match('/[\x80-\xFF]|(?= 0; --$i) { + $token = $tokens[$i]; + if ('variable' === $token[0] && $route->hasDefault($token[3])) { + $firstOptional = $i; + } else { + break; + } + } + } + + // compute the matching regexp + $regexp = ''; + for ($i = 0, $nbToken = count($tokens); $i < $nbToken; ++$i) { + $regexp .= self::computeRegexp($tokens, $i, $firstOptional); + } + $regexp = self::REGEX_DELIMITER.'^'.$regexp.'$'.self::REGEX_DELIMITER.'s'.($isHost ? 'i' : ''); + + // enable Utf8 matching if really required + if ($needsUtf8) { + $regexp .= 'u'; + for ($i = 0, $nbToken = count($tokens); $i < $nbToken; ++$i) { + if ('variable' === $tokens[$i][0]) { + $tokens[$i][] = true; + } + } + } + + return array( + 'staticPrefix' => 'text' === $tokens[0][0] ? $tokens[0][1] : '', + 'regex' => $regexp, + 'tokens' => array_reverse($tokens), + 'variables' => $variables, + ); + } + + /** + * Returns the next static character in the Route pattern that will serve as a separator. + * + * @param string $pattern The route pattern + * @param bool $useUtf8 Whether the character is encoded in UTF-8 or not + * + * @return string The next static character that functions as separator (or empty string when none available) + */ + private static function findNextSeparator($pattern, $useUtf8) + { + if ('' == $pattern) { + // return empty string if pattern is empty or false (false which can be returned by substr) + return ''; + } + // first remove all placeholders from the pattern so we can find the next real static character + if ('' === $pattern = preg_replace('#\{\w+\}#', '', $pattern)) { + return ''; + } + if ($useUtf8) { + preg_match('/^./u', $pattern, $pattern); + } + + return false !== strpos(static::SEPARATORS, $pattern[0]) ? $pattern[0] : ''; + } + + /** + * Computes the regexp used to match a specific token. It can be static text or a subpattern. + * + * @param array $tokens The route tokens + * @param int $index The index of the current token + * @param int $firstOptional The index of the first optional token + * + * @return string The regexp pattern for a single token + */ + private static function computeRegexp(array $tokens, $index, $firstOptional) + { + $token = $tokens[$index]; + if ('text' === $token[0]) { + // Text tokens + return preg_quote($token[1], self::REGEX_DELIMITER); + } else { + // Variable tokens + if (0 === $index && 0 === $firstOptional) { + // When the only token is an optional variable token, the separator is required + return sprintf('%s(?P<%s>%s)?', preg_quote($token[1], self::REGEX_DELIMITER), $token[3], $token[2]); + } else { + $regexp = sprintf('%s(?P<%s>%s)', preg_quote($token[1], self::REGEX_DELIMITER), $token[3], $token[2]); + if ($index >= $firstOptional) { + // Enclose each optional token in a subpattern to make it optional. + // "?:" means it is non-capturing, i.e. the portion of the subject string that + // matched the optional subpattern is not passed back. + $regexp = "(?:$regexp"; + $nbTokens = count($tokens); + if ($nbTokens - 1 == $index) { + // Close the optional subpatterns + $regexp .= str_repeat(')?', $nbTokens - $firstOptional - (0 === $firstOptional ? 1 : 0)); + } + } + + return $regexp; + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCompilerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCompilerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e6f8ee6deacc91fc18c1c019a25d8f832181f529 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCompilerInterface.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\Component\Routing; + +/** + * RouteCompilerInterface is the interface that all RouteCompiler classes must implement. + * + * @author Fabien Potencier + */ +interface RouteCompilerInterface +{ + /** + * Compiles the current route instance. + * + * @param Route $route A Route instance + * + * @return CompiledRoute A CompiledRoute instance + * + * @throws \LogicException If the Route cannot be compiled because the + * path or host pattern is invalid + */ + public static function compile(Route $route); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php new file mode 100644 index 0000000000000000000000000000000000000000..6ac4205a598fcaf46611fb48353c90a7ebad9717 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php @@ -0,0 +1,388 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing; + +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\Config\ConfigCacheInterface; +use Symfony\Component\Config\ConfigCacheFactoryInterface; +use Symfony\Component\Config\ConfigCacheFactory; +use Psr\Log\LoggerInterface; +use Symfony\Component\Routing\Generator\ConfigurableRequirementsInterface; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Routing\Generator\Dumper\GeneratorDumperInterface; +use Symfony\Component\Routing\Matcher\RequestMatcherInterface; +use Symfony\Component\Routing\Matcher\UrlMatcherInterface; +use Symfony\Component\Routing\Matcher\Dumper\MatcherDumperInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; + +/** + * The Router class is an example of the integration of all pieces of the + * routing system for easier use. + * + * @author Fabien Potencier + */ +class Router implements RouterInterface, RequestMatcherInterface +{ + /** + * @var UrlMatcherInterface|null + */ + protected $matcher; + + /** + * @var UrlGeneratorInterface|null + */ + protected $generator; + + /** + * @var RequestContext + */ + protected $context; + + /** + * @var LoaderInterface + */ + protected $loader; + + /** + * @var RouteCollection|null + */ + protected $collection; + + /** + * @var mixed + */ + protected $resource; + + /** + * @var array + */ + protected $options = array(); + + /** + * @var LoggerInterface|null + */ + protected $logger; + + /** + * @var ConfigCacheFactoryInterface|null + */ + private $configCacheFactory; + + /** + * @var ExpressionFunctionProviderInterface[] + */ + private $expressionLanguageProviders = array(); + + /** + * Constructor. + * + * @param LoaderInterface $loader A LoaderInterface instance + * @param mixed $resource The main resource to load + * @param array $options An array of options + * @param RequestContext $context The context + * @param LoggerInterface $logger A logger instance + */ + public function __construct(LoaderInterface $loader, $resource, array $options = array(), RequestContext $context = null, LoggerInterface $logger = null) + { + $this->loader = $loader; + $this->resource = $resource; + $this->logger = $logger; + $this->context = $context ?: new RequestContext(); + $this->setOptions($options); + } + + /** + * Sets options. + * + * Available options: + * + * * cache_dir: The cache directory (or null to disable caching) + * * debug: Whether to enable debugging or not (false by default) + * * generator_class: The name of a UrlGeneratorInterface implementation + * * generator_base_class: The base class for the dumped generator class + * * generator_cache_class: The class name for the dumped generator class + * * generator_dumper_class: The name of a GeneratorDumperInterface implementation + * * matcher_class: The name of a UrlMatcherInterface implementation + * * matcher_base_class: The base class for the dumped matcher class + * * matcher_dumper_class: The class name for the dumped matcher class + * * matcher_cache_class: The name of a MatcherDumperInterface implementation + * * resource_type: Type hint for the main resource (optional) + * * strict_requirements: Configure strict requirement checking for generators + * implementing ConfigurableRequirementsInterface (default is true) + * + * @param array $options An array of options + * + * @throws \InvalidArgumentException When unsupported option is provided + */ + public function setOptions(array $options) + { + $this->options = array( + 'cache_dir' => null, + 'debug' => false, + 'generator_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', + 'generator_base_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', + 'generator_dumper_class' => 'Symfony\\Component\\Routing\\Generator\\Dumper\\PhpGeneratorDumper', + 'generator_cache_class' => 'ProjectUrlGenerator', + 'matcher_class' => 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher', + 'matcher_base_class' => 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher', + 'matcher_dumper_class' => 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherDumper', + 'matcher_cache_class' => 'ProjectUrlMatcher', + 'resource_type' => null, + 'strict_requirements' => true, + ); + + // check option names and live merge, if errors are encountered Exception will be thrown + $invalid = array(); + foreach ($options as $key => $value) { + if (array_key_exists($key, $this->options)) { + $this->options[$key] = $value; + } else { + $invalid[] = $key; + } + } + + if ($invalid) { + throw new \InvalidArgumentException(sprintf('The Router does not support the following options: "%s".', implode('", "', $invalid))); + } + } + + /** + * Sets an option. + * + * @param string $key The key + * @param mixed $value The value + * + * @throws \InvalidArgumentException + */ + public function setOption($key, $value) + { + if (!array_key_exists($key, $this->options)) { + throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key)); + } + + $this->options[$key] = $value; + } + + /** + * Gets an option value. + * + * @param string $key The key + * + * @return mixed The value + * + * @throws \InvalidArgumentException + */ + public function getOption($key) + { + if (!array_key_exists($key, $this->options)) { + throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key)); + } + + return $this->options[$key]; + } + + /** + * {@inheritdoc} + */ + public function getRouteCollection() + { + if (null === $this->collection) { + $this->collection = $this->loader->load($this->resource, $this->options['resource_type']); + } + + return $this->collection; + } + + /** + * {@inheritdoc} + */ + public function setContext(RequestContext $context) + { + $this->context = $context; + + if (null !== $this->matcher) { + $this->getMatcher()->setContext($context); + } + if (null !== $this->generator) { + $this->getGenerator()->setContext($context); + } + } + + /** + * {@inheritdoc} + */ + public function getContext() + { + return $this->context; + } + + /** + * Sets the ConfigCache factory to use. + * + * @param ConfigCacheFactoryInterface $configCacheFactory The factory to use + */ + public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) + { + $this->configCacheFactory = $configCacheFactory; + } + + /** + * {@inheritdoc} + */ + public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) + { + return $this->getGenerator()->generate($name, $parameters, $referenceType); + } + + /** + * {@inheritdoc} + */ + public function match($pathinfo) + { + return $this->getMatcher()->match($pathinfo); + } + + /** + * {@inheritdoc} + */ + public function matchRequest(Request $request) + { + $matcher = $this->getMatcher(); + if (!$matcher instanceof RequestMatcherInterface) { + // fallback to the default UrlMatcherInterface + return $matcher->match($request->getPathInfo()); + } + + return $matcher->matchRequest($request); + } + + /** + * Gets the UrlMatcher instance associated with this Router. + * + * @return UrlMatcherInterface A UrlMatcherInterface instance + */ + public function getMatcher() + { + if (null !== $this->matcher) { + return $this->matcher; + } + + if (null === $this->options['cache_dir'] || null === $this->options['matcher_cache_class']) { + $this->matcher = new $this->options['matcher_class']($this->getRouteCollection(), $this->context); + if (method_exists($this->matcher, 'addExpressionLanguageProvider')) { + foreach ($this->expressionLanguageProviders as $provider) { + $this->matcher->addExpressionLanguageProvider($provider); + } + } + + return $this->matcher; + } + + $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/'.$this->options['matcher_cache_class'].'.php', + function (ConfigCacheInterface $cache) { + $dumper = $this->getMatcherDumperInstance(); + if (method_exists($dumper, 'addExpressionLanguageProvider')) { + foreach ($this->expressionLanguageProviders as $provider) { + $dumper->addExpressionLanguageProvider($provider); + } + } + + $options = array( + 'class' => $this->options['matcher_cache_class'], + 'base_class' => $this->options['matcher_base_class'], + ); + + $cache->write($dumper->dump($options), $this->getRouteCollection()->getResources()); + } + ); + + require_once $cache->getPath(); + + return $this->matcher = new $this->options['matcher_cache_class']($this->context); + } + + /** + * Gets the UrlGenerator instance associated with this Router. + * + * @return UrlGeneratorInterface A UrlGeneratorInterface instance + */ + public function getGenerator() + { + if (null !== $this->generator) { + return $this->generator; + } + + if (null === $this->options['cache_dir'] || null === $this->options['generator_cache_class']) { + $this->generator = new $this->options['generator_class']($this->getRouteCollection(), $this->context, $this->logger); + } else { + $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/'.$this->options['generator_cache_class'].'.php', + function (ConfigCacheInterface $cache) { + $dumper = $this->getGeneratorDumperInstance(); + + $options = array( + 'class' => $this->options['generator_cache_class'], + 'base_class' => $this->options['generator_base_class'], + ); + + $cache->write($dumper->dump($options), $this->getRouteCollection()->getResources()); + } + ); + + require_once $cache->getPath(); + + $this->generator = new $this->options['generator_cache_class']($this->context, $this->logger); + } + + if ($this->generator instanceof ConfigurableRequirementsInterface) { + $this->generator->setStrictRequirements($this->options['strict_requirements']); + } + + return $this->generator; + } + + public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) + { + $this->expressionLanguageProviders[] = $provider; + } + + /** + * @return GeneratorDumperInterface + */ + protected function getGeneratorDumperInstance() + { + return new $this->options['generator_dumper_class']($this->getRouteCollection()); + } + + /** + * @return MatcherDumperInterface + */ + protected function getMatcherDumperInstance() + { + return new $this->options['matcher_dumper_class']($this->getRouteCollection()); + } + + /** + * Provides the ConfigCache factory implementation, falling back to a + * default implementation if necessary. + * + * @return ConfigCacheFactoryInterface $configCacheFactory + */ + private function getConfigCacheFactory() + { + if (null === $this->configCacheFactory) { + $this->configCacheFactory = new ConfigCacheFactory($this->options['debug']); + } + + return $this->configCacheFactory; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/RouterInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/RouterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a10ae34e07451b6a16949e030922c8ff005cd741 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/RouterInterface.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\Component\Routing; + +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Routing\Matcher\UrlMatcherInterface; + +/** + * RouterInterface is the interface that all Router classes must implement. + * + * This interface is the concatenation of UrlMatcherInterface and UrlGeneratorInterface. + * + * @author Fabien Potencier + */ +interface RouterInterface extends UrlMatcherInterface, UrlGeneratorInterface +{ + /** + * Gets the RouteCollection instance associated with this Router. + * + * @return RouteCollection A RouteCollection instance + */ + public function getRouteCollection(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9af22f29f802f354607e7a5663839199d998c881 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Annotation; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Annotation\Route; + +class RouteTest extends TestCase +{ + /** + * @expectedException \BadMethodCallException + */ + public function testInvalidRouteParameter() + { + $route = new Route(array('foo' => 'bar')); + } + + /** + * @dataProvider getValidParameters + */ + public function testRouteParameters($parameter, $value, $getter) + { + $route = new Route(array($parameter => $value)); + $this->assertEquals($route->$getter(), $value); + } + + public function getValidParameters() + { + return array( + array('value', '/Blog', 'getPath'), + array('requirements', array('locale' => 'en'), 'getRequirements'), + array('options', array('compiler_class' => 'RouteCompiler'), 'getOptions'), + array('name', 'blog_index', 'getName'), + array('defaults', array('_controller' => 'MyBlogBundle:Blog:index'), 'getDefaults'), + array('schemes', array('https'), 'getSchemes'), + array('methods', array('GET', 'POST'), 'getMethods'), + array('host', '{locale}.example.com', 'getHost'), + array('condition', 'context.getMethod() == "GET"', 'getCondition'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/CompiledRouteTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/CompiledRouteTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c55317958487679613825b90c222cc7c3283bc4c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/CompiledRouteTest.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\Routing\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\CompiledRoute; + +class CompiledRouteTest extends TestCase +{ + public function testAccessors() + { + $compiled = new CompiledRoute('prefix', 'regex', array('tokens'), array(), array(), array(), array(), array('variables')); + $this->assertEquals('prefix', $compiled->getStaticPrefix(), '__construct() takes a static prefix as its second argument'); + $this->assertEquals('regex', $compiled->getRegex(), '__construct() takes a regexp as its third argument'); + $this->assertEquals(array('tokens'), $compiled->getTokens(), '__construct() takes an array of tokens as its fourth argument'); + $this->assertEquals(array('variables'), $compiled->getVariables(), '__construct() takes an array of variables as its ninth argument'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/AbstractClass.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/AbstractClass.php new file mode 100644 index 0000000000000000000000000000000000000000..56bcab2a91d4fb565b5af5ea0d4c9c9d2dbbcc30 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/AbstractClass.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\Routing\Tests\Fixtures\AnnotatedClasses; + +abstract class AbstractClass +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/BarClass.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/BarClass.php new file mode 100644 index 0000000000000000000000000000000000000000..a3882773c4d29ce5dc63cd2ae521020d18f341c3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/BarClass.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses; + +class BarClass +{ + public function routeAction($arg1, $arg2 = 'defaultValue2', $arg3 = 'defaultValue3') + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooClass.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooClass.php new file mode 100644 index 0000000000000000000000000000000000000000..320dc350037ae3ae93d11efffec092919f1c5152 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooClass.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\Routing\Tests\Fixtures\AnnotatedClasses; + +class FooClass +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooTrait.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..ee8f4b071a368c8752ce1618d3b30f6f8fe309df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooTrait.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Fixtures; + +use Symfony\Component\Routing\Loader\XmlFileLoader; +use Symfony\Component\Config\Util\XmlUtils; + +/** + * XmlFileLoader with schema validation turned off. + */ +class CustomXmlFileLoader extends XmlFileLoader +{ + protected function loadFile($file) + { + return XmlUtils::loadFile($file, function () { return true; }); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/OtherAnnotatedClasses/NoStartTagClass.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/OtherAnnotatedClasses/NoStartTagClass.php new file mode 100644 index 0000000000000000000000000000000000000000..8900d34e59c806372d2b0b3f2df8d498594fc726 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/OtherAnnotatedClasses/NoStartTagClass.php @@ -0,0 +1,3 @@ +class NoStartTagClass +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/OtherAnnotatedClasses/VariadicClass.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/OtherAnnotatedClasses/VariadicClass.php new file mode 100644 index 0000000000000000000000000000000000000000..729c9b4d07b38c385a1af04589c457e9aec77eb8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/OtherAnnotatedClasses/VariadicClass.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Fixtures\OtherAnnotatedClasses; + +class VariadicClass +{ + public function routeAction(...$params) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php new file mode 100644 index 0000000000000000000000000000000000000000..15937bcf02d16ebe7041163e2d8fd40b7efd7835 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.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\Routing\Tests\Fixtures; + +use Symfony\Component\Routing\Matcher\UrlMatcher; +use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface; + +/** + * @author Fabien Potencier + */ +class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface +{ + public function redirect($path, $route, $scheme = null) + { + return array( + '_controller' => 'Some controller reference...', + 'path' => $path, + 'scheme' => $scheme, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/annotated.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/annotated.php new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/bad_format.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/bad_format.yml new file mode 100644 index 0000000000000000000000000000000000000000..8ba50e2e4281619d4c5671c7799a19f62b995c8b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/bad_format.yml @@ -0,0 +1,3 @@ +blog_show: + path: /blog/{slug} + defaults: { _controller: "MyBundle:Blog:show" } diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/bar.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/bar.xml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/directory/recurse/routes1.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/directory/recurse/routes1.yml new file mode 100644 index 0000000000000000000000000000000000000000..d078836625c6bd36aa1769e4b52b0fca7f575bc3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/directory/recurse/routes1.yml @@ -0,0 +1,2 @@ +route1: + path: /route/1 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/directory/recurse/routes2.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/directory/recurse/routes2.yml new file mode 100644 index 0000000000000000000000000000000000000000..938fb2457e9a3c5492c170b85d0f3ce4ac99ce6a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/directory/recurse/routes2.yml @@ -0,0 +1,2 @@ +route2: + path: /route/2 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/directory/routes3.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/directory/routes3.yml new file mode 100644 index 0000000000000000000000000000000000000000..088cfb4d4315eafca04b9c22c0b6349555bbe79f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/directory/routes3.yml @@ -0,0 +1,2 @@ +route3: + path: /route/3 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/directory_import/import.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/directory_import/import.yml new file mode 100644 index 0000000000000000000000000000000000000000..af829e58c7ffdc785245f92bd9a98135eb7d442d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/directory_import/import.yml @@ -0,0 +1,3 @@ +_directory: + resource: "../directory" + type: directory diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.apache b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.apache new file mode 100644 index 0000000000000000000000000000000000000000..26a561cc911807fa65c5a62b08b9c21d2153348d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.apache @@ -0,0 +1,163 @@ +# skip "real" requests +RewriteCond %{REQUEST_FILENAME} -f +RewriteRule .* - [QSA,L] + +# foo +RewriteCond %{REQUEST_URI} ^/foo/(baz|symfony)$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:foo,E=_ROUTING_param_bar:%1,E=_ROUTING_default_def:test] + +# foobar +RewriteCond %{REQUEST_URI} ^/foo(?:/([^/]++))?$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:foobar,E=_ROUTING_param_bar:%1,E=_ROUTING_default_bar:toto] + +# bar +RewriteCond %{REQUEST_URI} ^/bar/([^/]++)$ +RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [NC] +RewriteRule .* - [S=1,E=_ROUTING_allow_GET:1,E=_ROUTING_allow_HEAD:1] +RewriteCond %{REQUEST_URI} ^/bar/([^/]++)$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:bar,E=_ROUTING_param_foo:%1] + +# baragain +RewriteCond %{REQUEST_URI} ^/baragain/([^/]++)$ +RewriteCond %{REQUEST_METHOD} !^(GET|POST|HEAD)$ [NC] +RewriteRule .* - [S=1,E=_ROUTING_allow_GET:1,E=_ROUTING_allow_POST:1,E=_ROUTING_allow_HEAD:1] +RewriteCond %{REQUEST_URI} ^/baragain/([^/]++)$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baragain,E=_ROUTING_param_foo:%1] + +# baz +RewriteCond %{REQUEST_URI} ^/test/baz$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz] + +# baz2 +RewriteCond %{REQUEST_URI} ^/test/baz\.html$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz2] + +# baz3 +RewriteCond %{REQUEST_URI} ^/test/baz3$ +RewriteRule .* $0/ [QSA,L,R=301] +RewriteCond %{REQUEST_URI} ^/test/baz3/$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz3] + +# baz4 +RewriteCond %{REQUEST_URI} ^/test/([^/]++)$ +RewriteRule .* $0/ [QSA,L,R=301] +RewriteCond %{REQUEST_URI} ^/test/([^/]++)/$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz4,E=_ROUTING_param_foo:%1] + +# baz5 +RewriteCond %{REQUEST_URI} ^/test/([^/]++)/$ +RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [NC] +RewriteRule .* - [S=2,E=_ROUTING_allow_GET:1,E=_ROUTING_allow_HEAD:1] +RewriteCond %{REQUEST_URI} ^/test/([^/]++)$ +RewriteRule .* $0/ [QSA,L,R=301] +RewriteCond %{REQUEST_URI} ^/test/([^/]++)/$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz5,E=_ROUTING_param_foo:%1] + +# baz5unsafe +RewriteCond %{REQUEST_URI} ^/testunsafe/([^/]++)/$ +RewriteCond %{REQUEST_METHOD} !^(POST)$ [NC] +RewriteRule .* - [S=1,E=_ROUTING_allow_POST:1] +RewriteCond %{REQUEST_URI} ^/testunsafe/([^/]++)/$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz5unsafe,E=_ROUTING_param_foo:%1] + +# baz6 +RewriteCond %{REQUEST_URI} ^/test/baz$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz6,E=_ROUTING_default_foo:bar\ baz] + +# baz7 +RewriteCond %{REQUEST_URI} ^/te\ st/baz$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz7] + +# baz8 +RewriteCond %{REQUEST_URI} ^/te\\\ st/baz$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz8] + +# baz9 +RewriteCond %{REQUEST_URI} ^/test/(te\\\ st)$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz9,E=_ROUTING_param_baz:%1] + +RewriteCond %{HTTP:Host} ^a\.example\.com$ +RewriteRule .? - [E=__ROUTING_host_1:1] + +# route1 +RewriteCond %{ENV:__ROUTING_host_1} =1 +RewriteCond %{REQUEST_URI} ^/route1$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route1] + +# route2 +RewriteCond %{ENV:__ROUTING_host_1} =1 +RewriteCond %{REQUEST_URI} ^/c2/route2$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route2] + +RewriteCond %{HTTP:Host} ^b\.example\.com$ +RewriteRule .? - [E=__ROUTING_host_2:1] + +# route3 +RewriteCond %{ENV:__ROUTING_host_2} =1 +RewriteCond %{REQUEST_URI} ^/c2/route3$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route3] + +RewriteCond %{HTTP:Host} ^a\.example\.com$ +RewriteRule .? - [E=__ROUTING_host_3:1] + +# route4 +RewriteCond %{ENV:__ROUTING_host_3} =1 +RewriteCond %{REQUEST_URI} ^/route4$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route4] + +RewriteCond %{HTTP:Host} ^c\.example\.com$ +RewriteRule .? - [E=__ROUTING_host_4:1] + +# route5 +RewriteCond %{ENV:__ROUTING_host_4} =1 +RewriteCond %{REQUEST_URI} ^/route5$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route5] + +# route6 +RewriteCond %{REQUEST_URI} ^/route6$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route6] + +RewriteCond %{HTTP:Host} ^([^\.]++)\.example\.com$ +RewriteRule .? - [E=__ROUTING_host_5:1,E=__ROUTING_host_5_var1:%1] + +# route11 +RewriteCond %{ENV:__ROUTING_host_5} =1 +RewriteCond %{REQUEST_URI} ^/route11$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route11,E=_ROUTING_param_var1:%{ENV:__ROUTING_host_5_var1}] + +# route12 +RewriteCond %{ENV:__ROUTING_host_5} =1 +RewriteCond %{REQUEST_URI} ^/route12$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route12,E=_ROUTING_param_var1:%{ENV:__ROUTING_host_5_var1},E=_ROUTING_default_var1:val] + +# route13 +RewriteCond %{ENV:__ROUTING_host_5} =1 +RewriteCond %{REQUEST_URI} ^/route13/([^/]++)$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route13,E=_ROUTING_param_var1:%{ENV:__ROUTING_host_5_var1},E=_ROUTING_param_name:%1] + +# route14 +RewriteCond %{ENV:__ROUTING_host_5} =1 +RewriteCond %{REQUEST_URI} ^/route14/([^/]++)$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route14,E=_ROUTING_param_var1:%{ENV:__ROUTING_host_5_var1},E=_ROUTING_param_name:%1,E=_ROUTING_default_var1:val] + +RewriteCond %{HTTP:Host} ^c\.example\.com$ +RewriteRule .? - [E=__ROUTING_host_6:1] + +# route15 +RewriteCond %{ENV:__ROUTING_host_6} =1 +RewriteCond %{REQUEST_URI} ^/route15/([^/]++)$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route15,E=_ROUTING_param_name:%1] + +# route16 +RewriteCond %{REQUEST_URI} ^/route16/([^/]++)$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route16,E=_ROUTING_param_name:%1,E=_ROUTING_default_var1:val] + +# route17 +RewriteCond %{REQUEST_URI} ^/route17$ +RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route17] + +# 405 Method Not Allowed +RewriteCond %{ENV:_ROUTING__allow_GET} =1 [OR] +RewriteCond %{ENV:_ROUTING__allow_HEAD} =1 [OR] +RewriteCond %{ENV:_ROUTING__allow_POST} =1 +RewriteRule .* app.php [QSA,L] diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php new file mode 100644 index 0000000000000000000000000000000000000000..4ea0b8a1a3e7c5ae65f57d5c9c165f9741cfdbe3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php @@ -0,0 +1,312 @@ +context = $context; + } + + public function match($pathinfo) + { + $allow = array(); + $pathinfo = rawurldecode($pathinfo); + $context = $this->context; + $request = $this->request; + + // foo + if (0 === strpos($pathinfo, '/foo') && preg_match('#^/foo/(?Pbaz|symfony)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo')), array ( 'def' => 'test',)); + } + + if (0 === strpos($pathinfo, '/bar')) { + // bar + if (preg_match('#^/bar/(?P[^/]++)$#s', $pathinfo, $matches)) { + if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) { + $allow = array_merge($allow, array('GET', 'HEAD')); + goto not_bar; + } + + return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar')), array ()); + } + not_bar: + + // barhead + if (0 === strpos($pathinfo, '/barhead') && preg_match('#^/barhead/(?P[^/]++)$#s', $pathinfo, $matches)) { + if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) { + $allow = array_merge($allow, array('GET', 'HEAD')); + goto not_barhead; + } + + return $this->mergeDefaults(array_replace($matches, array('_route' => 'barhead')), array ()); + } + not_barhead: + + } + + if (0 === strpos($pathinfo, '/test')) { + if (0 === strpos($pathinfo, '/test/baz')) { + // baz + if ($pathinfo === '/test/baz') { + return array('_route' => 'baz'); + } + + // baz2 + if ($pathinfo === '/test/baz.html') { + return array('_route' => 'baz2'); + } + + // baz3 + if ($pathinfo === '/test/baz3/') { + return array('_route' => 'baz3'); + } + + } + + // baz4 + if (preg_match('#^/test/(?P[^/]++)/$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz4')), array ()); + } + + // baz5 + if (preg_match('#^/test/(?P[^/]++)/$#s', $pathinfo, $matches)) { + if ($this->context->getMethod() != 'POST') { + $allow[] = 'POST'; + goto not_baz5; + } + + return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz5')), array ()); + } + not_baz5: + + // baz.baz6 + if (preg_match('#^/test/(?P[^/]++)/$#s', $pathinfo, $matches)) { + if ($this->context->getMethod() != 'PUT') { + $allow[] = 'PUT'; + goto not_bazbaz6; + } + + return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz.baz6')), array ()); + } + not_bazbaz6: + + } + + // foofoo + if ($pathinfo === '/foofoo') { + return array ( 'def' => 'test', '_route' => 'foofoo',); + } + + // quoter + if (preg_match('#^/(?P[\']+)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'quoter')), array ()); + } + + // space + if ($pathinfo === '/spa ce') { + return array('_route' => 'space'); + } + + if (0 === strpos($pathinfo, '/a')) { + if (0 === strpos($pathinfo, '/a/b\'b')) { + // foo1 + if (preg_match('#^/a/b\'b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo1')), array ()); + } + + // bar1 + if (preg_match('#^/a/b\'b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar1')), array ()); + } + + } + + // overridden + if (preg_match('#^/a/(?P.*)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'overridden')), array ()); + } + + if (0 === strpos($pathinfo, '/a/b\'b')) { + // foo2 + if (preg_match('#^/a/b\'b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo2')), array ()); + } + + // bar2 + if (preg_match('#^/a/b\'b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar2')), array ()); + } + + } + + } + + if (0 === strpos($pathinfo, '/multi')) { + // helloWorld + if (0 === strpos($pathinfo, '/multi/hello') && preg_match('#^/multi/hello(?:/(?P[^/]++))?$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'helloWorld')), array ( 'who' => 'World!',)); + } + + // overridden2 + if ($pathinfo === '/multi/new') { + return array('_route' => 'overridden2'); + } + + // hey + if ($pathinfo === '/multi/hey/') { + return array('_route' => 'hey'); + } + + } + + // foo3 + if (preg_match('#^/(?P<_locale>[^/]++)/b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo3')), array ()); + } + + // bar3 + if (preg_match('#^/(?P<_locale>[^/]++)/b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar3')), array ()); + } + + if (0 === strpos($pathinfo, '/aba')) { + // ababa + if ($pathinfo === '/ababa') { + return array('_route' => 'ababa'); + } + + // foo4 + if (preg_match('#^/aba/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo4')), array ()); + } + + } + + $host = $this->context->getHost(); + + if (preg_match('#^a\\.example\\.com$#si', $host, $hostMatches)) { + // route1 + if ($pathinfo === '/route1') { + return array('_route' => 'route1'); + } + + // route2 + if ($pathinfo === '/c2/route2') { + return array('_route' => 'route2'); + } + + } + + if (preg_match('#^b\\.example\\.com$#si', $host, $hostMatches)) { + // route3 + if ($pathinfo === '/c2/route3') { + return array('_route' => 'route3'); + } + + } + + if (preg_match('#^a\\.example\\.com$#si', $host, $hostMatches)) { + // route4 + if ($pathinfo === '/route4') { + return array('_route' => 'route4'); + } + + } + + if (preg_match('#^c\\.example\\.com$#si', $host, $hostMatches)) { + // route5 + if ($pathinfo === '/route5') { + return array('_route' => 'route5'); + } + + } + + // route6 + if ($pathinfo === '/route6') { + return array('_route' => 'route6'); + } + + if (preg_match('#^(?P[^\\.]++)\\.example\\.com$#si', $host, $hostMatches)) { + if (0 === strpos($pathinfo, '/route1')) { + // route11 + if ($pathinfo === '/route11') { + return $this->mergeDefaults(array_replace($hostMatches, array('_route' => 'route11')), array ()); + } + + // route12 + if ($pathinfo === '/route12') { + return $this->mergeDefaults(array_replace($hostMatches, array('_route' => 'route12')), array ( 'var1' => 'val',)); + } + + // route13 + if (0 === strpos($pathinfo, '/route13') && preg_match('#^/route13/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($hostMatches, $matches, array('_route' => 'route13')), array ()); + } + + // route14 + if (0 === strpos($pathinfo, '/route14') && preg_match('#^/route14/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($hostMatches, $matches, array('_route' => 'route14')), array ( 'var1' => 'val',)); + } + + } + + } + + if (preg_match('#^c\\.example\\.com$#si', $host, $hostMatches)) { + // route15 + if (0 === strpos($pathinfo, '/route15') && preg_match('#^/route15/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'route15')), array ()); + } + + } + + if (0 === strpos($pathinfo, '/route1')) { + // route16 + if (0 === strpos($pathinfo, '/route16') && preg_match('#^/route16/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'route16')), array ( 'var1' => 'val',)); + } + + // route17 + if ($pathinfo === '/route17') { + return array('_route' => 'route17'); + } + + } + + if (0 === strpos($pathinfo, '/a')) { + // a + if ($pathinfo === '/a/a...') { + return array('_route' => 'a'); + } + + if (0 === strpos($pathinfo, '/a/b')) { + // b + if (preg_match('#^/a/b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'b')), array ()); + } + + // c + if (0 === strpos($pathinfo, '/a/b/c') && preg_match('#^/a/b/c/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'c')), array ()); + } + + } + + } + + throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.apache b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.apache new file mode 100644 index 0000000000000000000000000000000000000000..309f2ff0e53947cb307306547aa9ccd999101844 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.apache @@ -0,0 +1,7 @@ +# skip "real" requests +RewriteCond %{REQUEST_FILENAME} -f +RewriteRule .* - [QSA,L] + +# foo +RewriteCond %{REQUEST_URI} ^/foo$ +RewriteRule .* ap\ p_d\ ev.php [QSA,L,E=_ROUTING_route:foo] diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php new file mode 100644 index 0000000000000000000000000000000000000000..f9d3fa2d8257bca93da928e21a8507fef0e719fa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php @@ -0,0 +1,344 @@ +context = $context; + } + + public function match($pathinfo) + { + $allow = array(); + $pathinfo = rawurldecode($pathinfo); + $context = $this->context; + $request = $this->request; + + // foo + if (0 === strpos($pathinfo, '/foo') && preg_match('#^/foo/(?Pbaz|symfony)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo')), array ( 'def' => 'test',)); + } + + if (0 === strpos($pathinfo, '/bar')) { + // bar + if (preg_match('#^/bar/(?P[^/]++)$#s', $pathinfo, $matches)) { + if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) { + $allow = array_merge($allow, array('GET', 'HEAD')); + goto not_bar; + } + + return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar')), array ()); + } + not_bar: + + // barhead + if (0 === strpos($pathinfo, '/barhead') && preg_match('#^/barhead/(?P[^/]++)$#s', $pathinfo, $matches)) { + if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) { + $allow = array_merge($allow, array('GET', 'HEAD')); + goto not_barhead; + } + + return $this->mergeDefaults(array_replace($matches, array('_route' => 'barhead')), array ()); + } + not_barhead: + + } + + if (0 === strpos($pathinfo, '/test')) { + if (0 === strpos($pathinfo, '/test/baz')) { + // baz + if ($pathinfo === '/test/baz') { + return array('_route' => 'baz'); + } + + // baz2 + if ($pathinfo === '/test/baz.html') { + return array('_route' => 'baz2'); + } + + // baz3 + if (rtrim($pathinfo, '/') === '/test/baz3') { + if (substr($pathinfo, -1) !== '/') { + return $this->redirect($pathinfo.'/', 'baz3'); + } + + return array('_route' => 'baz3'); + } + + } + + // baz4 + if (preg_match('#^/test/(?P[^/]++)/?$#s', $pathinfo, $matches)) { + if (substr($pathinfo, -1) !== '/') { + return $this->redirect($pathinfo.'/', 'baz4'); + } + + return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz4')), array ()); + } + + // baz5 + if (preg_match('#^/test/(?P[^/]++)/$#s', $pathinfo, $matches)) { + if ($this->context->getMethod() != 'POST') { + $allow[] = 'POST'; + goto not_baz5; + } + + return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz5')), array ()); + } + not_baz5: + + // baz.baz6 + if (preg_match('#^/test/(?P[^/]++)/$#s', $pathinfo, $matches)) { + if ($this->context->getMethod() != 'PUT') { + $allow[] = 'PUT'; + goto not_bazbaz6; + } + + return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz.baz6')), array ()); + } + not_bazbaz6: + + } + + // foofoo + if ($pathinfo === '/foofoo') { + return array ( 'def' => 'test', '_route' => 'foofoo',); + } + + // quoter + if (preg_match('#^/(?P[\']+)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'quoter')), array ()); + } + + // space + if ($pathinfo === '/spa ce') { + return array('_route' => 'space'); + } + + if (0 === strpos($pathinfo, '/a')) { + if (0 === strpos($pathinfo, '/a/b\'b')) { + // foo1 + if (preg_match('#^/a/b\'b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo1')), array ()); + } + + // bar1 + if (preg_match('#^/a/b\'b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar1')), array ()); + } + + } + + // overridden + if (preg_match('#^/a/(?P.*)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'overridden')), array ()); + } + + if (0 === strpos($pathinfo, '/a/b\'b')) { + // foo2 + if (preg_match('#^/a/b\'b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo2')), array ()); + } + + // bar2 + if (preg_match('#^/a/b\'b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar2')), array ()); + } + + } + + } + + if (0 === strpos($pathinfo, '/multi')) { + // helloWorld + if (0 === strpos($pathinfo, '/multi/hello') && preg_match('#^/multi/hello(?:/(?P[^/]++))?$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'helloWorld')), array ( 'who' => 'World!',)); + } + + // overridden2 + if ($pathinfo === '/multi/new') { + return array('_route' => 'overridden2'); + } + + // hey + if (rtrim($pathinfo, '/') === '/multi/hey') { + if (substr($pathinfo, -1) !== '/') { + return $this->redirect($pathinfo.'/', 'hey'); + } + + return array('_route' => 'hey'); + } + + } + + // foo3 + if (preg_match('#^/(?P<_locale>[^/]++)/b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo3')), array ()); + } + + // bar3 + if (preg_match('#^/(?P<_locale>[^/]++)/b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'bar3')), array ()); + } + + if (0 === strpos($pathinfo, '/aba')) { + // ababa + if ($pathinfo === '/ababa') { + return array('_route' => 'ababa'); + } + + // foo4 + if (preg_match('#^/aba/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'foo4')), array ()); + } + + } + + $host = $this->context->getHost(); + + if (preg_match('#^a\\.example\\.com$#si', $host, $hostMatches)) { + // route1 + if ($pathinfo === '/route1') { + return array('_route' => 'route1'); + } + + // route2 + if ($pathinfo === '/c2/route2') { + return array('_route' => 'route2'); + } + + } + + if (preg_match('#^b\\.example\\.com$#si', $host, $hostMatches)) { + // route3 + if ($pathinfo === '/c2/route3') { + return array('_route' => 'route3'); + } + + } + + if (preg_match('#^a\\.example\\.com$#si', $host, $hostMatches)) { + // route4 + if ($pathinfo === '/route4') { + return array('_route' => 'route4'); + } + + } + + if (preg_match('#^c\\.example\\.com$#si', $host, $hostMatches)) { + // route5 + if ($pathinfo === '/route5') { + return array('_route' => 'route5'); + } + + } + + // route6 + if ($pathinfo === '/route6') { + return array('_route' => 'route6'); + } + + if (preg_match('#^(?P[^\\.]++)\\.example\\.com$#si', $host, $hostMatches)) { + if (0 === strpos($pathinfo, '/route1')) { + // route11 + if ($pathinfo === '/route11') { + return $this->mergeDefaults(array_replace($hostMatches, array('_route' => 'route11')), array ()); + } + + // route12 + if ($pathinfo === '/route12') { + return $this->mergeDefaults(array_replace($hostMatches, array('_route' => 'route12')), array ( 'var1' => 'val',)); + } + + // route13 + if (0 === strpos($pathinfo, '/route13') && preg_match('#^/route13/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($hostMatches, $matches, array('_route' => 'route13')), array ()); + } + + // route14 + if (0 === strpos($pathinfo, '/route14') && preg_match('#^/route14/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($hostMatches, $matches, array('_route' => 'route14')), array ( 'var1' => 'val',)); + } + + } + + } + + if (preg_match('#^c\\.example\\.com$#si', $host, $hostMatches)) { + // route15 + if (0 === strpos($pathinfo, '/route15') && preg_match('#^/route15/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'route15')), array ()); + } + + } + + if (0 === strpos($pathinfo, '/route1')) { + // route16 + if (0 === strpos($pathinfo, '/route16') && preg_match('#^/route16/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'route16')), array ( 'var1' => 'val',)); + } + + // route17 + if ($pathinfo === '/route17') { + return array('_route' => 'route17'); + } + + } + + if (0 === strpos($pathinfo, '/a')) { + // a + if ($pathinfo === '/a/a...') { + return array('_route' => 'a'); + } + + if (0 === strpos($pathinfo, '/a/b')) { + // b + if (preg_match('#^/a/b/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'b')), array ()); + } + + // c + if (0 === strpos($pathinfo, '/a/b/c') && preg_match('#^/a/b/c/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'c')), array ()); + } + + } + + } + + // secure + if ($pathinfo === '/secure') { + $requiredSchemes = array ( 'https' => 0,); + if (!isset($requiredSchemes[$this->context->getScheme()])) { + return $this->redirect($pathinfo, 'secure', key($requiredSchemes)); + } + + return array('_route' => 'secure'); + } + + // nonsecure + if ($pathinfo === '/nonsecure') { + $requiredSchemes = array ( 'http' => 0,); + if (!isset($requiredSchemes[$this->context->getScheme()])) { + return $this->redirect($pathinfo, 'nonsecure', key($requiredSchemes)); + } + + return array('_route' => 'nonsecure'); + } + + throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php new file mode 100644 index 0000000000000000000000000000000000000000..d9da7b02d4b43eadcd66434d7fa7c767b709d18a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php @@ -0,0 +1,50 @@ +context = $context; + } + + public function match($pathinfo) + { + $allow = array(); + $pathinfo = rawurldecode($pathinfo); + $context = $this->context; + $request = $this->request; + + if (0 === strpos($pathinfo, '/rootprefix')) { + // static + if ($pathinfo === '/rootprefix/test') { + return array('_route' => 'static'); + } + + // dynamic + if (preg_match('#^/rootprefix/(?P[^/]++)$#s', $pathinfo, $matches)) { + return $this->mergeDefaults(array_replace($matches, array('_route' => 'dynamic')), array ()); + } + + } + + // with-condition + if ($pathinfo === '/with-condition' && ($context->getMethod() == "GET")) { + return array('_route' => 'with-condition'); + } + + throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/empty.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/empty.yml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/file_resource.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/file_resource.yml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/foo.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/foo.xml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/foo1.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/foo1.xml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/incomplete.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/incomplete.yml new file mode 100644 index 0000000000000000000000000000000000000000..df64d324f9638456021aafc461680efa0cc45723 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/incomplete.yml @@ -0,0 +1,2 @@ +blog_show: + defaults: { _controller: MyBlogBundle:Blog:show } diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/list_defaults.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/list_defaults.xml new file mode 100644 index 0000000000000000000000000000000000000000..f93bf9c6aef32aa1d8c7a5fe0c8e76c98eacd566 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/list_defaults.xml @@ -0,0 +1,20 @@ + + + + + + AcmeBlogBundle:Blog:index + + + + true + 1 + 3.5 + foo + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/list_in_list_defaults.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/list_in_list_defaults.xml new file mode 100644 index 0000000000000000000000000000000000000000..987086dbdf21a3328f54d6d55c64cef2e30b6a4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/list_in_list_defaults.xml @@ -0,0 +1,22 @@ + + + + + + AcmeBlogBundle:Blog:index + + + + + true + 1 + 3.5 + foo + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/list_in_map_defaults.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/list_in_map_defaults.xml new file mode 100644 index 0000000000000000000000000000000000000000..32d393c56ffc3aae3fde306c0bab555e1a3d80a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/list_in_map_defaults.xml @@ -0,0 +1,22 @@ + + + + + + AcmeBlogBundle:Blog:index + + + + + true + 1 + 3.5 + foo + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/list_null_values.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/list_null_values.xml new file mode 100644 index 0000000000000000000000000000000000000000..c70e03ccc6815bb49584d15acefd6d485446c6da --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/list_null_values.xml @@ -0,0 +1,22 @@ + + + + + + AcmeBlogBundle:Blog:index + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/map_defaults.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/map_defaults.xml new file mode 100644 index 0000000000000000000000000000000000000000..47feb29b9a3d79850755a0e2aaac5e4ab73f5bae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/map_defaults.xml @@ -0,0 +1,20 @@ + + + + + + AcmeBlogBundle:Blog:index + + + + true + 1 + 3.5 + foo + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/map_in_list_defaults.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/map_in_list_defaults.xml new file mode 100644 index 0000000000000000000000000000000000000000..6d770653bbb721d53cc91a51dbfac6b31ab38a23 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/map_in_list_defaults.xml @@ -0,0 +1,22 @@ + + + + + + AcmeBlogBundle:Blog:index + + + + + true + 1 + 3.5 + foo + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/map_in_map_defaults.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/map_in_map_defaults.xml new file mode 100644 index 0000000000000000000000000000000000000000..2beee6143357f2dd95b20ede5ff99552590e7f49 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/map_in_map_defaults.xml @@ -0,0 +1,22 @@ + + + + + + AcmeBlogBundle:Blog:index + + + + + true + 1 + 3.5 + foo + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/map_null_values.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/map_null_values.xml new file mode 100644 index 0000000000000000000000000000000000000000..8fd8954e02f30a6f72807ea398c4423dd3da993c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/map_null_values.xml @@ -0,0 +1,22 @@ + + + + + + AcmeBlogBundle:Blog:index + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/missing_id.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/missing_id.xml new file mode 100644 index 0000000000000000000000000000000000000000..4ea4115f281a1d40fda70ce51cae0952111fb4cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/missing_id.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/missing_path.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/missing_path.xml new file mode 100644 index 0000000000000000000000000000000000000000..ef5bc088dd003522eaa50dfa8edb0c1d9b0a9792 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/missing_path.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/namespaceprefix.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/namespaceprefix.xml new file mode 100644 index 0000000000000000000000000000000000000000..e33955ae47857ff82f44a8bfcd077579ec253e28 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/namespaceprefix.xml @@ -0,0 +1,16 @@ + + + + + + MyBundle:Blog:show + \w+ + en|fr|de + RouteCompiler + + 1 + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonesense_resource_plus_path.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonesense_resource_plus_path.yml new file mode 100644 index 0000000000000000000000000000000000000000..a3e9473727000a25cdab880f40e6c294c1fddf29 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonesense_resource_plus_path.yml @@ -0,0 +1,3 @@ +blog_show: + resource: validpattern.yml + path: /test diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonesense_type_without_resource.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonesense_type_without_resource.yml new file mode 100644 index 0000000000000000000000000000000000000000..547cda3b618f4ff45afcdee855b5aa7652be0116 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonesense_type_without_resource.yml @@ -0,0 +1,3 @@ +blog_show: + path: /blog/{slug} + type: custom diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalid.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalid.xml new file mode 100644 index 0000000000000000000000000000000000000000..dc147d2e67a25ca21f2b391370e5d4030a4667ff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalid.xml @@ -0,0 +1,10 @@ + + + + + + MyBundle:Blog:show + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalid.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalid.yml new file mode 100644 index 0000000000000000000000000000000000000000..257cc5642cb1a054f08cc83f2d943e56fd3ebe99 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalid.yml @@ -0,0 +1 @@ +foo diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalid2.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalid2.yml new file mode 100644 index 0000000000000000000000000000000000000000..cfa9992bbc95e2f6c4400f535366e41d6ab10987 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalid2.yml @@ -0,0 +1 @@ +route: string diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalidkeys.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalidkeys.yml new file mode 100644 index 0000000000000000000000000000000000000000..015e270fb187b0e4e615e617e4f5fd4cb84ae302 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalidkeys.yml @@ -0,0 +1,3 @@ +someroute: + resource: path/to/some.yml + name_prefix: test_ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalidnode.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalidnode.xml new file mode 100644 index 0000000000000000000000000000000000000000..863ef03b90cebfa57b2c5bc9d51edc87f16db331 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalidnode.xml @@ -0,0 +1,8 @@ + + + + + bar + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalidroute.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalidroute.xml new file mode 100644 index 0000000000000000000000000000000000000000..908958c032d38024ec73093a3a79ebf9658afacf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/nonvalidroute.xml @@ -0,0 +1,12 @@ + + + + + + MyBundle:Blog:show + + baz + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/null_values.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/null_values.xml new file mode 100644 index 0000000000000000000000000000000000000000..f9e2aa24df804f6ab8c09b20f54fc05c813b6903 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/null_values.xml @@ -0,0 +1,12 @@ + + + + + + + foo + bar + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/scalar_defaults.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/scalar_defaults.xml new file mode 100644 index 0000000000000000000000000000000000000000..ecfde2801e851b1c7ec39c4e59d6a5977f1c7591 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/scalar_defaults.xml @@ -0,0 +1,33 @@ + + + + + + AcmeBlogBundle:Blog:index + + + + true + + + 1 + + + 3.5 + + + false + + + 1 + + + 0 + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/special_route_name.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/special_route_name.yml new file mode 100644 index 0000000000000000000000000000000000000000..78be239aa4a58c5a25f568ad1a5edda2c000b766 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/special_route_name.yml @@ -0,0 +1,2 @@ +"#$péß^a|": + path: "true" diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.php new file mode 100644 index 0000000000000000000000000000000000000000..edc16d8c2cb284eec5a570327009b4f6221f1016 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.php @@ -0,0 +1,18 @@ +add('blog_show', new Route( + '/blog/{slug}', + array('_controller' => 'MyBlogBundle:Blog:show'), + array('locale' => '\w+'), + array('compiler_class' => 'RouteCompiler'), + '{locale}.example.com', + array('https'), + array('GET', 'POST', 'put', 'OpTiOnS'), + 'context.getMethod() == "GET"' +)); + +return $collection; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.xml new file mode 100644 index 0000000000000000000000000000000000000000..e8d07350b7a425a9d4fecf84bbae37f89f5b480d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.xml @@ -0,0 +1,24 @@ + + + + + + MyBundle:Blog:show + \w+ + + context.getMethod() == "GET" + + + + MyBundle:Blog:show + GET|POST|put|OpTiOnS + hTTps + \w+ + + context.getMethod() == "GET" + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml new file mode 100644 index 0000000000000000000000000000000000000000..565abaaa2c4678eaeb65b237cb83c8ba44690b23 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml @@ -0,0 +1,13 @@ +blog_show: + path: /blog/{slug} + defaults: { _controller: "MyBundle:Blog:show" } + host: "{locale}.example.com" + requirements: { 'locale': '\w+' } + methods: ['GET','POST','put','OpTiOnS'] + schemes: ['https'] + condition: 'context.getMethod() == "GET"' + options: + compiler_class: RouteCompiler + +blog_show_inherited: + path: /blog/{slug} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.php new file mode 100644 index 0000000000000000000000000000000000000000..482c80b29e919e0d06c4ef62e7e65e376b955302 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.php @@ -0,0 +1,18 @@ +import('validpattern.php'); +$collection->addDefaults(array( + 'foo' => 123, +)); +$collection->addRequirements(array( + 'foo' => '\d+', +)); +$collection->addOptions(array( + 'foo' => 'bar', +)); +$collection->setCondition('context.getMethod() == "POST"'); +$collection->addPrefix('/prefix'); + +return $collection; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.xml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.xml new file mode 100644 index 0000000000000000000000000000000000000000..b7a15ddc7ee1fc008d3f80ee566b5359a83eb6ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.xml @@ -0,0 +1,13 @@ + + + + + + 123 + \d+ + + context.getMethod() == "POST" + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.yml b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.yml new file mode 100644 index 0000000000000000000000000000000000000000..faf2263ae52f4f56aacfc3765081e763d60ebbfc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/validresource.yml @@ -0,0 +1,8 @@ +_blog: + resource: validpattern.yml + prefix: /{foo} + defaults: { 'foo': '123' } + requirements: { 'foo': '\d+' } + options: { 'foo': 'bar' } + host: "" + condition: 'context.getMethod() == "POST"' diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/with_define_path_variable.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/with_define_path_variable.php new file mode 100644 index 0000000000000000000000000000000000000000..5871420b154678c2d64c43c7e6fe7b55ce5f7a40 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Fixtures/with_define_path_variable.php @@ -0,0 +1,5 @@ + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f84802b35b255d6ce1867ca46adb52bc83075bb8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php @@ -0,0 +1,181 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Generator\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\Generator\Dumper\PhpGeneratorDumper; +use Symfony\Component\Routing\RequestContext; + +class PhpGeneratorDumperTest extends TestCase +{ + /** + * @var RouteCollection + */ + private $routeCollection; + + /** + * @var PhpGeneratorDumper + */ + private $generatorDumper; + + /** + * @var string + */ + private $testTmpFilepath; + + /** + * @var string + */ + private $largeTestTmpFilepath; + + protected function setUp() + { + parent::setUp(); + + $this->routeCollection = new RouteCollection(); + $this->generatorDumper = new PhpGeneratorDumper($this->routeCollection); + $this->testTmpFilepath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'php_generator.'.$this->getName().'.php'; + $this->largeTestTmpFilepath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'php_generator.'.$this->getName().'.large.php'; + @unlink($this->testTmpFilepath); + @unlink($this->largeTestTmpFilepath); + } + + protected function tearDown() + { + parent::tearDown(); + + @unlink($this->testTmpFilepath); + + $this->routeCollection = null; + $this->generatorDumper = null; + $this->testTmpFilepath = null; + } + + public function testDumpWithRoutes() + { + $this->routeCollection->add('Test', new Route('/testing/{foo}')); + $this->routeCollection->add('Test2', new Route('/testing2')); + + file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump()); + include $this->testTmpFilepath; + + $projectUrlGenerator = new \ProjectUrlGenerator(new RequestContext('/app.php')); + + $absoluteUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL); + $absoluteUrlWithoutParameter = $projectUrlGenerator->generate('Test2', array(), UrlGeneratorInterface::ABSOLUTE_URL); + $relativeUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_PATH); + $relativeUrlWithoutParameter = $projectUrlGenerator->generate('Test2', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + + $this->assertEquals('http://localhost/app.php/testing/bar', $absoluteUrlWithParameter); + $this->assertEquals('http://localhost/app.php/testing2', $absoluteUrlWithoutParameter); + $this->assertEquals('/app.php/testing/bar', $relativeUrlWithParameter); + $this->assertEquals('/app.php/testing2', $relativeUrlWithoutParameter); + } + + public function testDumpWithTooManyRoutes() + { + if (defined('HHVM_VERSION_ID')) { + $this->markTestSkipped('HHVM consumes too much memory on this test.'); + } + + $this->routeCollection->add('Test', new Route('/testing/{foo}')); + for ($i = 0; $i < 32769; ++$i) { + $this->routeCollection->add('route_'.$i, new Route('/route_'.$i)); + } + $this->routeCollection->add('Test2', new Route('/testing2')); + + file_put_contents($this->largeTestTmpFilepath, $this->generatorDumper->dump(array( + 'class' => 'ProjectLargeUrlGenerator', + ))); + $this->routeCollection = $this->generatorDumper = null; + include $this->largeTestTmpFilepath; + + $projectUrlGenerator = new \ProjectLargeUrlGenerator(new RequestContext('/app.php')); + + $absoluteUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL); + $absoluteUrlWithoutParameter = $projectUrlGenerator->generate('Test2', array(), UrlGeneratorInterface::ABSOLUTE_URL); + $relativeUrlWithParameter = $projectUrlGenerator->generate('Test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_PATH); + $relativeUrlWithoutParameter = $projectUrlGenerator->generate('Test2', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + + $this->assertEquals('http://localhost/app.php/testing/bar', $absoluteUrlWithParameter); + $this->assertEquals('http://localhost/app.php/testing2', $absoluteUrlWithoutParameter); + $this->assertEquals('/app.php/testing/bar', $relativeUrlWithParameter); + $this->assertEquals('/app.php/testing2', $relativeUrlWithoutParameter); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testDumpWithoutRoutes() + { + file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'WithoutRoutesUrlGenerator'))); + include $this->testTmpFilepath; + + $projectUrlGenerator = new \WithoutRoutesUrlGenerator(new RequestContext('/app.php')); + + $projectUrlGenerator->generate('Test', array()); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\RouteNotFoundException + */ + public function testGenerateNonExistingRoute() + { + $this->routeCollection->add('Test', new Route('/test')); + + file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'NonExistingRoutesUrlGenerator'))); + include $this->testTmpFilepath; + + $projectUrlGenerator = new \NonExistingRoutesUrlGenerator(new RequestContext()); + $url = $projectUrlGenerator->generate('NonExisting', array()); + } + + public function testDumpForRouteWithDefaults() + { + $this->routeCollection->add('Test', new Route('/testing/{foo}', array('foo' => 'bar'))); + + file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'DefaultRoutesUrlGenerator'))); + include $this->testTmpFilepath; + + $projectUrlGenerator = new \DefaultRoutesUrlGenerator(new RequestContext()); + $url = $projectUrlGenerator->generate('Test', array()); + + $this->assertEquals('/testing', $url); + } + + public function testDumpWithSchemeRequirement() + { + $this->routeCollection->add('Test1', new Route('/testing', array(), array(), array(), '', array('ftp', 'https'))); + + file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'SchemeUrlGenerator'))); + include $this->testTmpFilepath; + + $projectUrlGenerator = new \SchemeUrlGenerator(new RequestContext('/app.php')); + + $absoluteUrl = $projectUrlGenerator->generate('Test1', array(), UrlGeneratorInterface::ABSOLUTE_URL); + $relativeUrl = $projectUrlGenerator->generate('Test1', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + + $this->assertEquals('ftp://localhost/app.php/testing', $absoluteUrl); + $this->assertEquals('ftp://localhost/app.php/testing', $relativeUrl); + + $projectUrlGenerator = new \SchemeUrlGenerator(new RequestContext('/app.php', 'GET', 'localhost', 'https')); + + $absoluteUrl = $projectUrlGenerator->generate('Test1', array(), UrlGeneratorInterface::ABSOLUTE_URL); + $relativeUrl = $projectUrlGenerator->generate('Test1', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + + $this->assertEquals('https://localhost/app.php/testing', $absoluteUrl); + $this->assertEquals('/app.php/testing', $relativeUrl); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e334e437e1eede393e9ed38c8a2b4483052d7ab7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php @@ -0,0 +1,692 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Generator; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\Generator\UrlGenerator; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Routing\RequestContext; + +class UrlGeneratorTest extends TestCase +{ + public function testAbsoluteUrlWithPort80() + { + $routes = $this->getRoutes('test', new Route('/testing')); + $url = $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL); + + $this->assertEquals('http://localhost/app.php/testing', $url); + } + + public function testAbsoluteSecureUrlWithPort443() + { + $routes = $this->getRoutes('test', new Route('/testing')); + $url = $this->getGenerator($routes, array('scheme' => 'https'))->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL); + + $this->assertEquals('https://localhost/app.php/testing', $url); + } + + public function testAbsoluteUrlWithNonStandardPort() + { + $routes = $this->getRoutes('test', new Route('/testing')); + $url = $this->getGenerator($routes, array('httpPort' => 8080))->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL); + + $this->assertEquals('http://localhost:8080/app.php/testing', $url); + } + + public function testAbsoluteSecureUrlWithNonStandardPort() + { + $routes = $this->getRoutes('test', new Route('/testing')); + $url = $this->getGenerator($routes, array('httpsPort' => 8080, 'scheme' => 'https'))->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL); + + $this->assertEquals('https://localhost:8080/app.php/testing', $url); + } + + public function testRelativeUrlWithoutParameters() + { + $routes = $this->getRoutes('test', new Route('/testing')); + $url = $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + + $this->assertEquals('/app.php/testing', $url); + } + + public function testRelativeUrlWithParameter() + { + $routes = $this->getRoutes('test', new Route('/testing/{foo}')); + $url = $this->getGenerator($routes)->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_PATH); + + $this->assertEquals('/app.php/testing/bar', $url); + } + + public function testRelativeUrlWithNullParameter() + { + $routes = $this->getRoutes('test', new Route('/testing.{format}', array('format' => null))); + $url = $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + + $this->assertEquals('/app.php/testing', $url); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\InvalidParameterException + */ + public function testRelativeUrlWithNullParameterButNotOptional() + { + $routes = $this->getRoutes('test', new Route('/testing/{foo}/bar', array('foo' => null))); + // This must raise an exception because the default requirement for "foo" is "[^/]+" which is not met with these params. + // Generating path "/testing//bar" would be wrong as matching this route would fail. + $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + } + + public function testRelativeUrlWithOptionalZeroParameter() + { + $routes = $this->getRoutes('test', new Route('/testing/{page}')); + $url = $this->getGenerator($routes)->generate('test', array('page' => 0), UrlGeneratorInterface::ABSOLUTE_PATH); + + $this->assertEquals('/app.php/testing/0', $url); + } + + public function testNotPassedOptionalParameterInBetween() + { + $routes = $this->getRoutes('test', new Route('/{slug}/{page}', array('slug' => 'index', 'page' => 0))); + $this->assertSame('/app.php/index/1', $this->getGenerator($routes)->generate('test', array('page' => 1))); + $this->assertSame('/app.php/', $this->getGenerator($routes)->generate('test')); + } + + public function testRelativeUrlWithExtraParameters() + { + $routes = $this->getRoutes('test', new Route('/testing')); + $url = $this->getGenerator($routes)->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_PATH); + + $this->assertEquals('/app.php/testing?foo=bar', $url); + } + + public function testAbsoluteUrlWithExtraParameters() + { + $routes = $this->getRoutes('test', new Route('/testing')); + $url = $this->getGenerator($routes)->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL); + + $this->assertEquals('http://localhost/app.php/testing?foo=bar', $url); + } + + public function testUrlWithNullExtraParameters() + { + $routes = $this->getRoutes('test', new Route('/testing')); + $url = $this->getGenerator($routes)->generate('test', array('foo' => null), UrlGeneratorInterface::ABSOLUTE_URL); + + $this->assertEquals('http://localhost/app.php/testing', $url); + } + + public function testUrlWithExtraParametersFromGlobals() + { + $routes = $this->getRoutes('test', new Route('/testing')); + $generator = $this->getGenerator($routes); + $context = new RequestContext('/app.php'); + $context->setParameter('bar', 'bar'); + $generator->setContext($context); + $url = $generator->generate('test', array('foo' => 'bar')); + + $this->assertEquals('/app.php/testing?foo=bar', $url); + } + + public function testUrlWithGlobalParameter() + { + $routes = $this->getRoutes('test', new Route('/testing/{foo}')); + $generator = $this->getGenerator($routes); + $context = new RequestContext('/app.php'); + $context->setParameter('foo', 'bar'); + $generator->setContext($context); + $url = $generator->generate('test', array()); + + $this->assertEquals('/app.php/testing/bar', $url); + } + + public function testGlobalParameterHasHigherPriorityThanDefault() + { + $routes = $this->getRoutes('test', new Route('/{_locale}', array('_locale' => 'en'))); + $generator = $this->getGenerator($routes); + $context = new RequestContext('/app.php'); + $context->setParameter('_locale', 'de'); + $generator->setContext($context); + $url = $generator->generate('test', array()); + + $this->assertSame('/app.php/de', $url); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\RouteNotFoundException + */ + public function testGenerateWithoutRoutes() + { + $routes = $this->getRoutes('foo', new Route('/testing/{foo}')); + $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\MissingMandatoryParametersException + */ + public function testGenerateForRouteWithoutMandatoryParameter() + { + $routes = $this->getRoutes('test', new Route('/testing/{foo}')); + $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\InvalidParameterException + */ + public function testGenerateForRouteWithInvalidOptionalParameter() + { + $routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+'))); + $this->getGenerator($routes)->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\InvalidParameterException + */ + public function testGenerateForRouteWithInvalidParameter() + { + $routes = $this->getRoutes('test', new Route('/testing/{foo}', array(), array('foo' => '1|2'))); + $this->getGenerator($routes)->generate('test', array('foo' => '0'), UrlGeneratorInterface::ABSOLUTE_URL); + } + + public function testGenerateForRouteWithInvalidOptionalParameterNonStrict() + { + $routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+'))); + $generator = $this->getGenerator($routes); + $generator->setStrictRequirements(false); + $this->assertNull($generator->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL)); + } + + public function testGenerateForRouteWithInvalidOptionalParameterNonStrictWithLogger() + { + $routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+'))); + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger->expects($this->once()) + ->method('error'); + $generator = $this->getGenerator($routes, array(), $logger); + $generator->setStrictRequirements(false); + $this->assertNull($generator->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL)); + } + + public function testGenerateForRouteWithInvalidParameterButDisabledRequirementsCheck() + { + $routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+'))); + $generator = $this->getGenerator($routes); + $generator->setStrictRequirements(null); + $this->assertSame('/app.php/testing/bar', $generator->generate('test', array('foo' => 'bar'))); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\InvalidParameterException + */ + public function testGenerateForRouteWithInvalidMandatoryParameter() + { + $routes = $this->getRoutes('test', new Route('/testing/{foo}', array(), array('foo' => 'd+'))); + $this->getGenerator($routes)->generate('test', array('foo' => 'bar'), UrlGeneratorInterface::ABSOLUTE_URL); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\InvalidParameterException + */ + public function testGenerateForRouteWithInvalidUtf8Parameter() + { + $routes = $this->getRoutes('test', new Route('/testing/{foo}', array(), array('foo' => '\pL+'), array('utf8' => true))); + $this->getGenerator($routes)->generate('test', array('foo' => 'abc123'), UrlGeneratorInterface::ABSOLUTE_URL); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\InvalidParameterException + */ + public function testRequiredParamAndEmptyPassed() + { + $routes = $this->getRoutes('test', new Route('/{slug}', array(), array('slug' => '.+'))); + $this->getGenerator($routes)->generate('test', array('slug' => '')); + } + + public function testSchemeRequirementDoesNothingIfSameCurrentScheme() + { + $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('http'))); + $this->assertEquals('/app.php/', $this->getGenerator($routes)->generate('test')); + + $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('https'))); + $this->assertEquals('/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test')); + } + + public function testSchemeRequirementForcesAbsoluteUrl() + { + $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('https'))); + $this->assertEquals('https://localhost/app.php/', $this->getGenerator($routes)->generate('test')); + + $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('http'))); + $this->assertEquals('http://localhost/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test')); + } + + public function testSchemeRequirementCreatesUrlForFirstRequiredScheme() + { + $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('Ftp', 'https'))); + $this->assertEquals('ftp://localhost/app.php/', $this->getGenerator($routes)->generate('test')); + } + + public function testPathWithTwoStartingSlashes() + { + $routes = $this->getRoutes('test', new Route('//path-and-not-domain')); + + // this must not generate '//path-and-not-domain' because that would be a network path + $this->assertSame('/path-and-not-domain', $this->getGenerator($routes, array('BaseUrl' => ''))->generate('test')); + } + + public function testNoTrailingSlashForMultipleOptionalParameters() + { + $routes = $this->getRoutes('test', new Route('/category/{slug1}/{slug2}/{slug3}', array('slug2' => null, 'slug3' => null))); + + $this->assertEquals('/app.php/category/foo', $this->getGenerator($routes)->generate('test', array('slug1' => 'foo'))); + } + + public function testWithAnIntegerAsADefaultValue() + { + $routes = $this->getRoutes('test', new Route('/{default}', array('default' => 0))); + + $this->assertEquals('/app.php/foo', $this->getGenerator($routes)->generate('test', array('default' => 'foo'))); + } + + public function testNullForOptionalParameterIsIgnored() + { + $routes = $this->getRoutes('test', new Route('/test/{default}', array('default' => 0))); + + $this->assertEquals('/app.php/test', $this->getGenerator($routes)->generate('test', array('default' => null))); + } + + public function testQueryParamSameAsDefault() + { + $routes = $this->getRoutes('test', new Route('/test', array('page' => 1))); + + $this->assertSame('/app.php/test?page=2', $this->getGenerator($routes)->generate('test', array('page' => 2))); + $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('page' => 1))); + $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('page' => '1'))); + $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test')); + } + + public function testArrayQueryParamSameAsDefault() + { + $routes = $this->getRoutes('test', new Route('/test', array('array' => array('foo', 'bar')))); + + $this->assertSame('/app.php/test?array%5B0%5D=bar&array%5B1%5D=foo', $this->getGenerator($routes)->generate('test', array('array' => array('bar', 'foo')))); + $this->assertSame('/app.php/test?array%5Ba%5D=foo&array%5Bb%5D=bar', $this->getGenerator($routes)->generate('test', array('array' => array('a' => 'foo', 'b' => 'bar')))); + $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('array' => array('foo', 'bar')))); + $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('array' => array(1 => 'bar', 0 => 'foo')))); + $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test')); + } + + public function testGenerateWithSpecialRouteName() + { + $routes = $this->getRoutes('$péß^a|', new Route('/bar')); + + $this->assertSame('/app.php/bar', $this->getGenerator($routes)->generate('$péß^a|')); + } + + public function testUrlEncoding() + { + $expectedPath = '/app.php/@:%5B%5D/%28%29*%27%22%20+,;-._~%26%24%3C%3E|%7B%7D%25%5C%5E%60!%3Ffoo=bar%23id' + .'/@:%5B%5D/%28%29*%27%22%20+,;-._~%26%24%3C%3E|%7B%7D%25%5C%5E%60!%3Ffoo=bar%23id' + .'?query=%40%3A%5B%5D/%28%29%2A%27%22%20%2B%2C%3B-._~%26%24%3C%3E%7C%7B%7D%25%5C%5E%60%21%3Ffoo%3Dbar%23id'; + + // This tests the encoding of reserved characters that are used for delimiting of URI components (defined in RFC 3986) + // and other special ASCII chars. These chars are tested as static text path, variable path and query param. + $chars = '@:[]/()*\'" +,;-._~&$<>|{}%\\^`!?foo=bar#id'; + $routes = $this->getRoutes('test', new Route("/$chars/{varpath}", array(), array('varpath' => '.+'))); + $this->assertSame($expectedPath, $this->getGenerator($routes)->generate('test', array( + 'varpath' => $chars, + 'query' => $chars, + ))); + } + + public function testEncodingOfRelativePathSegments() + { + $routes = $this->getRoutes('test', new Route('/dir/../dir/..')); + $this->assertSame('/app.php/dir/%2E%2E/dir/%2E%2E', $this->getGenerator($routes)->generate('test')); + $routes = $this->getRoutes('test', new Route('/dir/./dir/.')); + $this->assertSame('/app.php/dir/%2E/dir/%2E', $this->getGenerator($routes)->generate('test')); + $routes = $this->getRoutes('test', new Route('/a./.a/a../..a/...')); + $this->assertSame('/app.php/a./.a/a../..a/...', $this->getGenerator($routes)->generate('test')); + } + + public function testAdjacentVariables() + { + $routes = $this->getRoutes('test', new Route('/{x}{y}{z}.{_format}', array('z' => 'default-z', '_format' => 'html'), array('y' => '\d+'))); + $generator = $this->getGenerator($routes); + $this->assertSame('/app.php/foo123', $generator->generate('test', array('x' => 'foo', 'y' => '123'))); + $this->assertSame('/app.php/foo123bar.xml', $generator->generate('test', array('x' => 'foo', 'y' => '123', 'z' => 'bar', '_format' => 'xml'))); + + // The default requirement for 'x' should not allow the separator '.' in this case because it would otherwise match everything + // and following optional variables like _format could never match. + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Routing\Exception\InvalidParameterException'); + $generator->generate('test', array('x' => 'do.t', 'y' => '123', 'z' => 'bar', '_format' => 'xml')); + } + + public function testOptionalVariableWithNoRealSeparator() + { + $routes = $this->getRoutes('test', new Route('/get{what}', array('what' => 'All'))); + $generator = $this->getGenerator($routes); + + $this->assertSame('/app.php/get', $generator->generate('test')); + $this->assertSame('/app.php/getSites', $generator->generate('test', array('what' => 'Sites'))); + } + + public function testRequiredVariableWithNoRealSeparator() + { + $routes = $this->getRoutes('test', new Route('/get{what}Suffix')); + $generator = $this->getGenerator($routes); + + $this->assertSame('/app.php/getSitesSuffix', $generator->generate('test', array('what' => 'Sites'))); + } + + public function testDefaultRequirementOfVariable() + { + $routes = $this->getRoutes('test', new Route('/{page}.{_format}')); + $generator = $this->getGenerator($routes); + + $this->assertSame('/app.php/index.mobile.html', $generator->generate('test', array('page' => 'index', '_format' => 'mobile.html'))); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\InvalidParameterException + */ + public function testDefaultRequirementOfVariableDisallowsSlash() + { + $routes = $this->getRoutes('test', new Route('/{page}.{_format}')); + $this->getGenerator($routes)->generate('test', array('page' => 'index', '_format' => 'sl/ash')); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\InvalidParameterException + */ + public function testDefaultRequirementOfVariableDisallowsNextSeparator() + { + $routes = $this->getRoutes('test', new Route('/{page}.{_format}')); + $this->getGenerator($routes)->generate('test', array('page' => 'do.t', '_format' => 'html')); + } + + public function testWithHostDifferentFromContext() + { + $routes = $this->getRoutes('test', new Route('/{name}', array(), array(), array(), '{locale}.example.com')); + + $this->assertEquals('//fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test', array('name' => 'Fabien', 'locale' => 'fr'))); + } + + public function testWithHostSameAsContext() + { + $routes = $this->getRoutes('test', new Route('/{name}', array(), array(), array(), '{locale}.example.com')); + + $this->assertEquals('/app.php/Fabien', $this->getGenerator($routes, array('host' => 'fr.example.com'))->generate('test', array('name' => 'Fabien', 'locale' => 'fr'))); + } + + public function testWithHostSameAsContextAndAbsolute() + { + $routes = $this->getRoutes('test', new Route('/{name}', array(), array(), array(), '{locale}.example.com')); + + $this->assertEquals('http://fr.example.com/app.php/Fabien', $this->getGenerator($routes, array('host' => 'fr.example.com'))->generate('test', array('name' => 'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::ABSOLUTE_URL)); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\InvalidParameterException + */ + public function testUrlWithInvalidParameterInHost() + { + $routes = $this->getRoutes('test', new Route('/', array(), array('foo' => 'bar'), array(), '{foo}.example.com')); + $this->getGenerator($routes)->generate('test', array('foo' => 'baz'), UrlGeneratorInterface::ABSOLUTE_PATH); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\InvalidParameterException + */ + public function testUrlWithInvalidParameterInHostWhenParamHasADefaultValue() + { + $routes = $this->getRoutes('test', new Route('/', array('foo' => 'bar'), array('foo' => 'bar'), array(), '{foo}.example.com')); + $this->getGenerator($routes)->generate('test', array('foo' => 'baz'), UrlGeneratorInterface::ABSOLUTE_PATH); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\InvalidParameterException + */ + public function testUrlWithInvalidParameterEqualsDefaultValueInHost() + { + $routes = $this->getRoutes('test', new Route('/', array('foo' => 'baz'), array('foo' => 'bar'), array(), '{foo}.example.com')); + $this->getGenerator($routes)->generate('test', array('foo' => 'baz'), UrlGeneratorInterface::ABSOLUTE_PATH); + } + + public function testUrlWithInvalidParameterInHostInNonStrictMode() + { + $routes = $this->getRoutes('test', new Route('/', array(), array('foo' => 'bar'), array(), '{foo}.example.com')); + $generator = $this->getGenerator($routes); + $generator->setStrictRequirements(false); + $this->assertNull($generator->generate('test', array('foo' => 'baz'), UrlGeneratorInterface::ABSOLUTE_PATH)); + } + + public function testHostIsCaseInsensitive() + { + $routes = $this->getRoutes('test', new Route('/', array(), array('locale' => 'en|de|fr'), array(), '{locale}.FooBar.com')); + $generator = $this->getGenerator($routes); + $this->assertSame('//EN.FooBar.com/app.php/', $generator->generate('test', array('locale' => 'EN'), UrlGeneratorInterface::NETWORK_PATH)); + } + + public function testGenerateNetworkPath() + { + $routes = $this->getRoutes('test', new Route('/{name}', array(), array(), array(), '{locale}.example.com', array('http'))); + + $this->assertSame('//fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test', + array('name' => 'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::NETWORK_PATH), 'network path with different host' + ); + $this->assertSame('//fr.example.com/app.php/Fabien?query=string', $this->getGenerator($routes, array('host' => 'fr.example.com'))->generate('test', + array('name' => 'Fabien', 'locale' => 'fr', 'query' => 'string'), UrlGeneratorInterface::NETWORK_PATH), 'network path although host same as context' + ); + $this->assertSame('http://fr.example.com/app.php/Fabien', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test', + array('name' => 'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::NETWORK_PATH), 'absolute URL because scheme requirement does not match context' + ); + $this->assertSame('http://fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test', + array('name' => 'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::ABSOLUTE_URL), 'absolute URL with same scheme because it is requested' + ); + } + + public function testGenerateRelativePath() + { + $routes = new RouteCollection(); + $routes->add('article', new Route('/{author}/{article}/')); + $routes->add('comments', new Route('/{author}/{article}/comments')); + $routes->add('host', new Route('/{article}', array(), array(), array(), '{author}.example.com')); + $routes->add('scheme', new Route('/{author}/blog', array(), array(), array(), '', array('https'))); + $routes->add('unrelated', new Route('/about')); + + $generator = $this->getGenerator($routes, array('host' => 'example.com', 'pathInfo' => '/fabien/symfony-is-great/')); + + $this->assertSame('comments', $generator->generate('comments', + array('author' => 'fabien', 'article' => 'symfony-is-great'), UrlGeneratorInterface::RELATIVE_PATH) + ); + $this->assertSame('comments?page=2', $generator->generate('comments', + array('author' => 'fabien', 'article' => 'symfony-is-great', 'page' => 2), UrlGeneratorInterface::RELATIVE_PATH) + ); + $this->assertSame('../twig-is-great/', $generator->generate('article', + array('author' => 'fabien', 'article' => 'twig-is-great'), UrlGeneratorInterface::RELATIVE_PATH) + ); + $this->assertSame('../../bernhard/forms-are-great/', $generator->generate('article', + array('author' => 'bernhard', 'article' => 'forms-are-great'), UrlGeneratorInterface::RELATIVE_PATH) + ); + $this->assertSame('//bernhard.example.com/app.php/forms-are-great', $generator->generate('host', + array('author' => 'bernhard', 'article' => 'forms-are-great'), UrlGeneratorInterface::RELATIVE_PATH) + ); + $this->assertSame('https://example.com/app.php/bernhard/blog', $generator->generate('scheme', + array('author' => 'bernhard'), UrlGeneratorInterface::RELATIVE_PATH) + ); + $this->assertSame('../../about', $generator->generate('unrelated', + array(), UrlGeneratorInterface::RELATIVE_PATH) + ); + } + + /** + * @dataProvider provideRelativePaths + */ + public function testGetRelativePath($sourcePath, $targetPath, $expectedPath) + { + $this->assertSame($expectedPath, UrlGenerator::getRelativePath($sourcePath, $targetPath)); + } + + public function provideRelativePaths() + { + return array( + array( + '/same/dir/', + '/same/dir/', + '', + ), + array( + '/same/file', + '/same/file', + '', + ), + array( + '/', + '/file', + 'file', + ), + array( + '/', + '/dir/file', + 'dir/file', + ), + array( + '/dir/file.html', + '/dir/different-file.html', + 'different-file.html', + ), + array( + '/same/dir/extra-file', + '/same/dir/', + './', + ), + array( + '/parent/dir/', + '/parent/', + '../', + ), + array( + '/parent/dir/extra-file', + '/parent/', + '../', + ), + array( + '/a/b/', + '/x/y/z/', + '../../x/y/z/', + ), + array( + '/a/b/c/d/e', + '/a/c/d', + '../../../c/d', + ), + array( + '/a/b/c//', + '/a/b/c/', + '../', + ), + array( + '/a/b/c/', + '/a/b/c//', + './/', + ), + array( + '/root/a/b/c/', + '/root/x/b/c/', + '../../../x/b/c/', + ), + array( + '/a/b/c/d/', + '/a', + '../../../../a', + ), + array( + '/special-chars/sp%20ce/1€/mäh/e=mc²', + '/special-chars/sp%20ce/1€/<µ>/e=mc²', + '../<µ>/e=mc²', + ), + array( + 'not-rooted', + 'dir/file', + 'dir/file', + ), + array( + '//dir/', + '', + '../../', + ), + array( + '/dir/', + '/dir/file:with-colon', + './file:with-colon', + ), + array( + '/dir/', + '/dir/subdir/file:with-colon', + 'subdir/file:with-colon', + ), + array( + '/dir/', + '/dir/:subdir/', + './:subdir/', + ), + ); + } + + public function testFragmentsCanBeAppendedToUrls() + { + $routes = $this->getRoutes('test', new Route('/testing')); + + $url = $this->getGenerator($routes)->generate('test', array('_fragment' => 'frag ment'), UrlGeneratorInterface::ABSOLUTE_PATH); + $this->assertEquals('/app.php/testing#frag%20ment', $url); + + $url = $this->getGenerator($routes)->generate('test', array('_fragment' => '0'), UrlGeneratorInterface::ABSOLUTE_PATH); + $this->assertEquals('/app.php/testing#0', $url); + } + + public function testFragmentsDoNotEscapeValidCharacters() + { + $routes = $this->getRoutes('test', new Route('/testing')); + $url = $this->getGenerator($routes)->generate('test', array('_fragment' => '?/'), UrlGeneratorInterface::ABSOLUTE_PATH); + + $this->assertEquals('/app.php/testing#?/', $url); + } + + public function testFragmentsCanBeDefinedAsDefaults() + { + $routes = $this->getRoutes('test', new Route('/testing', array('_fragment' => 'fragment'))); + $url = $this->getGenerator($routes)->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_PATH); + + $this->assertEquals('/app.php/testing#fragment', $url); + } + + protected function getGenerator(RouteCollection $routes, array $parameters = array(), $logger = null) + { + $context = new RequestContext('/app.php'); + foreach ($parameters as $key => $value) { + $method = 'set'.$key; + $context->$method($value); + } + + return new UrlGenerator($routes, $context, $logger); + } + + protected function getRoutes($name, Route $route) + { + $routes = new RouteCollection(); + $routes->add($name, $route); + + return $routes; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e8bbe8fcf43e1f774c3398732281e80c468320ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Loader; + +use PHPUnit\Framework\TestCase; + +abstract class AbstractAnnotationLoaderTest extends TestCase +{ + public function getReader() + { + return $this->getMockBuilder('Doctrine\Common\Annotations\Reader') + ->disableOriginalConstructor() + ->getMock() + ; + } + + public function getClassLoader($reader) + { + return $this->getMockBuilder('Symfony\Component\Routing\Loader\AnnotationClassLoader') + ->setConstructorArgs(array($reader)) + ->getMockForAbstractClass() + ; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..44229633b5cbc98cf568a64c8429da9e133446db --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php @@ -0,0 +1,187 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Loader; + +use Symfony\Component\Routing\Annotation\Route; + +class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest +{ + protected $loader; + private $reader; + + protected function setUp() + { + parent::setUp(); + + $this->reader = $this->getReader(); + $this->loader = $this->getClassLoader($this->reader); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testLoadMissingClass() + { + $this->loader->load('MissingClass'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testLoadAbstractClass() + { + $this->loader->load('Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\AbstractClass'); + } + + /** + * @dataProvider provideTestSupportsChecksResource + */ + public function testSupportsChecksResource($resource, $expectedSupports) + { + $this->assertSame($expectedSupports, $this->loader->supports($resource), '->supports() returns true if the resource is loadable'); + } + + public function provideTestSupportsChecksResource() + { + return array( + array('class', true), + array('\fully\qualified\class\name', true), + array('namespaced\class\without\leading\slash', true), + array('ÿClassWithLegalSpecialCharacters', true), + array('5', false), + array('foo.foo', false), + array(null, false), + ); + } + + public function testSupportsChecksTypeIfSpecified() + { + $this->assertTrue($this->loader->supports('class', 'annotation'), '->supports() checks the resource type if specified'); + $this->assertFalse($this->loader->supports('class', 'foo'), '->supports() checks the resource type if specified'); + } + + public function getLoadTests() + { + return array( + array( + 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass', + array('name' => 'route1', 'path' => '/path'), + array('arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'), + ), + array( + 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass', + array('defaults' => array('arg2' => 'foo'), 'requirements' => array('arg3' => '\w+')), + array('arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'), + ), + array( + 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass', + array('options' => array('foo' => 'bar')), + array('arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'), + ), + array( + 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass', + array('schemes' => array('https'), 'methods' => array('GET')), + array('arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'), + ), + array( + 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass', + array('condition' => 'context.getMethod() == "GET"'), + array('arg2' => 'defaultValue2', 'arg3' => 'defaultValue3'), + ), + ); + } + + /** + * @dataProvider getLoadTests + */ + public function testLoad($className, $routeData = array(), $methodArgs = array()) + { + $routeData = array_replace(array( + 'name' => 'route', + 'path' => '/', + 'requirements' => array(), + 'options' => array(), + 'defaults' => array(), + 'schemes' => array(), + 'methods' => array(), + 'condition' => '', + ), $routeData); + + $this->reader + ->expects($this->once()) + ->method('getMethodAnnotations') + ->will($this->returnValue(array($this->getAnnotatedRoute($routeData)))) + ; + + $routeCollection = $this->loader->load($className); + $route = $routeCollection->get($routeData['name']); + + $this->assertSame($routeData['path'], $route->getPath(), '->load preserves path annotation'); + $this->assertCount( + count($routeData['requirements']), + array_intersect_assoc($routeData['requirements'], $route->getRequirements()), + '->load preserves requirements annotation' + ); + $this->assertCount( + count($routeData['options']), + array_intersect_assoc($routeData['options'], $route->getOptions()), + '->load preserves options annotation' + ); + $this->assertCount( + count($routeData['defaults']), + $route->getDefaults(), + '->load preserves defaults annotation' + ); + $this->assertEquals($routeData['schemes'], $route->getSchemes(), '->load preserves schemes annotation'); + $this->assertEquals($routeData['methods'], $route->getMethods(), '->load preserves methods annotation'); + $this->assertSame($routeData['condition'], $route->getCondition(), '->load preserves condition annotation'); + } + + public function testClassRouteLoad() + { + $classRouteData = array( + 'path' => '/prefix', + 'schemes' => array('https'), + 'methods' => array('GET'), + ); + + $methodRouteData = array( + 'name' => 'route1', + 'path' => '/path', + 'schemes' => array('http'), + 'methods' => array('POST', 'PUT'), + ); + + $this->reader + ->expects($this->once()) + ->method('getClassAnnotation') + ->will($this->returnValue($this->getAnnotatedRoute($classRouteData))) + ; + $this->reader + ->expects($this->once()) + ->method('getMethodAnnotations') + ->will($this->returnValue(array($this->getAnnotatedRoute($methodRouteData)))) + ; + + $routeCollection = $this->loader->load('Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass'); + $route = $routeCollection->get($methodRouteData['name']); + + $this->assertSame($classRouteData['path'].$methodRouteData['path'], $route->getPath(), '->load concatenates class and method route path'); + $this->assertEquals(array_merge($classRouteData['schemes'], $methodRouteData['schemes']), $route->getSchemes(), '->load merges class and method route schemes'); + $this->assertEquals(array_merge($classRouteData['methods'], $methodRouteData['methods']), $route->getMethods(), '->load merges class and method route methods'); + } + + private function getAnnotatedRoute($data) + { + return new Route($data); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8d832f0c1c03d9fb5435b643a8550e460a1ec7d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Loader; + +use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader; +use Symfony\Component\Config\FileLocator; + +class AnnotationDirectoryLoaderTest extends AbstractAnnotationLoaderTest +{ + protected $loader; + protected $reader; + + protected function setUp() + { + parent::setUp(); + + $this->reader = $this->getReader(); + $this->loader = new AnnotationDirectoryLoader(new FileLocator(), $this->getClassLoader($this->reader)); + } + + public function testLoad() + { + $this->reader->expects($this->exactly(2))->method('getClassAnnotation'); + + $this->reader + ->expects($this->any()) + ->method('getMethodAnnotations') + ->will($this->returnValue(array())) + ; + + $this->loader->load(__DIR__.'/../Fixtures/AnnotatedClasses'); + } + + public function testLoadIgnoresHiddenDirectories() + { + $this->expectAnnotationsToBeReadFrom(array( + 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass', + 'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\FooClass', + )); + + $this->reader + ->expects($this->any()) + ->method('getMethodAnnotations') + ->will($this->returnValue(array())) + ; + + $this->loader->load(__DIR__.'/../Fixtures/AnnotatedClasses'); + } + + public function testSupports() + { + $fixturesDir = __DIR__.'/../Fixtures'; + + $this->assertTrue($this->loader->supports($fixturesDir), '->supports() returns true if the resource is loadable'); + $this->assertFalse($this->loader->supports('foo.foo'), '->supports() returns true if the resource is loadable'); + + $this->assertTrue($this->loader->supports($fixturesDir, 'annotation'), '->supports() checks the resource type if specified'); + $this->assertFalse($this->loader->supports($fixturesDir, 'foo'), '->supports() checks the resource type if specified'); + } + + private function expectAnnotationsToBeReadFrom(array $classes) + { + $this->reader->expects($this->exactly(count($classes))) + ->method('getClassAnnotation') + ->with($this->callback(function (\ReflectionClass $class) use ($classes) { + return in_array($class->getName(), $classes); + })); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5d54f9f99f665505f202a096dfadea640787eed6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Loader; + +use Symfony\Component\Routing\Loader\AnnotationFileLoader; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\Routing\Annotation\Route; + +class AnnotationFileLoaderTest extends AbstractAnnotationLoaderTest +{ + protected $loader; + protected $reader; + + protected function setUp() + { + parent::setUp(); + + $this->reader = $this->getReader(); + $this->loader = new AnnotationFileLoader(new FileLocator(), $this->getClassLoader($this->reader)); + } + + public function testLoad() + { + $this->reader->expects($this->once())->method('getClassAnnotation'); + + $this->loader->load(__DIR__.'/../Fixtures/AnnotatedClasses/FooClass.php'); + } + + /** + * @requires PHP 5.4 + */ + public function testLoadTraitWithClassConstant() + { + $this->reader->expects($this->never())->method('getClassAnnotation'); + + $this->loader->load(__DIR__.'/../Fixtures/AnnotatedClasses/FooTrait.php'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Did you forgot to add the "loader->load(__DIR__.'/../Fixtures/OtherAnnotatedClasses/NoStartTagClass.php'); + } + + /** + * @requires PHP 5.6 + */ + public function testLoadVariadic() + { + $route = new Route(array('path' => '/path/to/{id}')); + $this->reader->expects($this->once())->method('getClassAnnotation'); + $this->reader->expects($this->once())->method('getMethodAnnotations') + ->will($this->returnValue(array($route))); + + $this->loader->load(__DIR__.'/../Fixtures/OtherAnnotatedClasses/VariadicClass.php'); + } + + public function testSupports() + { + $fixture = __DIR__.'/../Fixtures/annotated.php'; + + $this->assertTrue($this->loader->supports($fixture), '->supports() returns true if the resource is loadable'); + $this->assertFalse($this->loader->supports('foo.foo'), '->supports() returns true if the resource is loadable'); + + $this->assertTrue($this->loader->supports($fixture, 'annotation'), '->supports() checks the resource type if specified'); + $this->assertFalse($this->loader->supports($fixture, 'foo'), '->supports() checks the resource type if specified'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/ClosureLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/ClosureLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5d963f86fb01b5ddc0a67e635b7a3699cbeb2c49 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/ClosureLoaderTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Loader\ClosureLoader; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +class ClosureLoaderTest extends TestCase +{ + public function testSupports() + { + $loader = new ClosureLoader(); + + $closure = function () {}; + + $this->assertTrue($loader->supports($closure), '->supports() returns true if the resource is loadable'); + $this->assertFalse($loader->supports('foo.foo'), '->supports() returns true if the resource is loadable'); + + $this->assertTrue($loader->supports($closure, 'closure'), '->supports() checks the resource type if specified'); + $this->assertFalse($loader->supports($closure, 'foo'), '->supports() checks the resource type if specified'); + } + + public function testLoad() + { + $loader = new ClosureLoader(); + + $route = new Route('/'); + $routes = $loader->load(function () use ($route) { + $routes = new RouteCollection(); + + $routes->add('foo', $route); + + return $routes; + }); + + $this->assertEquals($route, $routes->get('foo'), '->load() loads a \Closure resource'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fc29d371ed15d85b8616db08fff335d9ca8dcfe7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Loader; + +use Symfony\Component\Routing\Loader\DirectoryLoader; +use Symfony\Component\Routing\Loader\YamlFileLoader; +use Symfony\Component\Routing\Loader\AnnotationFileLoader; +use Symfony\Component\Config\Loader\LoaderResolver; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\Routing\RouteCollection; + +class DirectoryLoaderTest extends AbstractAnnotationLoaderTest +{ + private $loader; + private $reader; + + protected function setUp() + { + parent::setUp(); + + $locator = new FileLocator(); + $this->reader = $this->getReader(); + $this->loader = new DirectoryLoader($locator); + $resolver = new LoaderResolver(array( + new YamlFileLoader($locator), + new AnnotationFileLoader($locator, $this->getClassLoader($this->reader)), + $this->loader, + )); + $this->loader->setResolver($resolver); + } + + public function testLoadDirectory() + { + $collection = $this->loader->load(__DIR__.'/../Fixtures/directory', 'directory'); + $this->verifyCollection($collection); + } + + public function testImportDirectory() + { + $collection = $this->loader->load(__DIR__.'/../Fixtures/directory_import', 'directory'); + $this->verifyCollection($collection); + } + + private function verifyCollection(RouteCollection $collection) + { + $routes = $collection->all(); + + $this->assertCount(3, $routes, 'Three routes are loaded'); + $this->assertContainsOnly('Symfony\Component\Routing\Route', $routes); + + for ($i = 1; $i <= 3; ++$i) { + $this->assertSame('/route/'.$i, $routes['route'.$i]->getPath()); + } + } + + public function testSupports() + { + $fixturesDir = __DIR__.'/../Fixtures'; + + $this->assertFalse($this->loader->supports($fixturesDir), '->supports(*) returns false'); + + $this->assertTrue($this->loader->supports($fixturesDir, 'directory'), '->supports(*, "directory") returns true'); + $this->assertFalse($this->loader->supports($fixturesDir, 'foo'), '->supports(*, "foo") returns false'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/ObjectRouteLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/ObjectRouteLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..408fa0b45c48c349c9be70aea5b1747c5d0815b8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/ObjectRouteLoaderTest.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Loader\ObjectRouteLoader; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +class ObjectRouteLoaderTest extends TestCase +{ + public function testLoadCallsServiceAndReturnsCollection() + { + $loader = new ObjectRouteLoaderForTest(); + + // create a basic collection that will be returned + $collection = new RouteCollection(); + $collection->add('foo', new Route('/foo')); + + $loader->loaderMap = array( + 'my_route_provider_service' => new RouteService($collection), + ); + + $actualRoutes = $loader->load( + 'my_route_provider_service:loadRoutes', + 'service' + ); + + $this->assertSame($collection, $actualRoutes); + // the service file should be listed as a resource + $this->assertNotEmpty($actualRoutes->getResources()); + } + + /** + * @expectedException \InvalidArgumentException + * @dataProvider getBadResourceStrings + */ + public function testExceptionWithoutSyntax($resourceString) + { + $loader = new ObjectRouteLoaderForTest(); + $loader->load($resourceString); + } + + public function getBadResourceStrings() + { + return array( + array('Foo'), + array('Bar::baz'), + array('Foo:Bar:baz'), + ); + } + + /** + * @expectedException \LogicException + */ + public function testExceptionOnNoObjectReturned() + { + $loader = new ObjectRouteLoaderForTest(); + $loader->loaderMap = array('my_service' => 'NOT_AN_OBJECT'); + $loader->load('my_service:method'); + } + + /** + * @expectedException \BadMethodCallException + */ + public function testExceptionOnBadMethod() + { + $loader = new ObjectRouteLoaderForTest(); + $loader->loaderMap = array('my_service' => new \stdClass()); + $loader->load('my_service:method'); + } + + /** + * @expectedException \LogicException + */ + public function testExceptionOnMethodNotReturningCollection() + { + $service = $this->getMockBuilder('stdClass') + ->setMethods(array('loadRoutes')) + ->getMock(); + $service->expects($this->once()) + ->method('loadRoutes') + ->will($this->returnValue('NOT_A_COLLECTION')); + + $loader = new ObjectRouteLoaderForTest(); + $loader->loaderMap = array('my_service' => $service); + $loader->load('my_service:loadRoutes'); + } +} + +class ObjectRouteLoaderForTest extends ObjectRouteLoader +{ + public $loaderMap = array(); + + protected function getServiceObject($id) + { + return isset($this->loaderMap[$id]) ? $this->loaderMap[$id] : null; + } +} + +class RouteService +{ + private $collection; + + public function __construct($collection) + { + $this->collection = $collection; + } + + public function loadRoutes() + { + return $this->collection; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bda64236f6022da4c79935c25718460ed58eb8ef --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\Routing\Loader\PhpFileLoader; + +class PhpFileLoaderTest extends TestCase +{ + public function testSupports() + { + $loader = new PhpFileLoader($this->getMockBuilder('Symfony\Component\Config\FileLocator')->getMock()); + + $this->assertTrue($loader->supports('foo.php'), '->supports() returns true if the resource is loadable'); + $this->assertFalse($loader->supports('foo.foo'), '->supports() returns true if the resource is loadable'); + + $this->assertTrue($loader->supports('foo.php', 'php'), '->supports() checks the resource type if specified'); + $this->assertFalse($loader->supports('foo.php', 'foo'), '->supports() checks the resource type if specified'); + } + + public function testLoadWithRoute() + { + $loader = new PhpFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('validpattern.php'); + $routes = $routeCollection->all(); + + $this->assertCount(1, $routes, 'One route is loaded'); + $this->assertContainsOnly('Symfony\Component\Routing\Route', $routes); + + foreach ($routes as $route) { + $this->assertSame('/blog/{slug}', $route->getPath()); + $this->assertSame('MyBlogBundle:Blog:show', $route->getDefault('_controller')); + $this->assertSame('{locale}.example.com', $route->getHost()); + $this->assertSame('RouteCompiler', $route->getOption('compiler_class')); + $this->assertEquals(array('GET', 'POST', 'PUT', 'OPTIONS'), $route->getMethods()); + $this->assertEquals(array('https'), $route->getSchemes()); + } + } + + public function testLoadWithImport() + { + $loader = new PhpFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('validresource.php'); + $routes = $routeCollection->all(); + + $this->assertCount(1, $routes, 'One route is loaded'); + $this->assertContainsOnly('Symfony\Component\Routing\Route', $routes); + + foreach ($routes as $route) { + $this->assertSame('/prefix/blog/{slug}', $route->getPath()); + $this->assertSame('MyBlogBundle:Blog:show', $route->getDefault('_controller')); + $this->assertSame('{locale}.example.com', $route->getHost()); + $this->assertSame('RouteCompiler', $route->getOption('compiler_class')); + $this->assertEquals(array('GET', 'POST', 'PUT', 'OPTIONS'), $route->getMethods()); + $this->assertEquals(array('https'), $route->getSchemes()); + } + } + + public function testThatDefiningVariableInConfigFileHasNoSideEffects() + { + $locator = new FileLocator(array(__DIR__.'/../Fixtures')); + $loader = new PhpFileLoader($locator); + $routeCollection = $loader->load('with_define_path_variable.php'); + $resources = $routeCollection->getResources(); + $this->assertCount(1, $resources); + $this->assertContainsOnly('Symfony\Component\Config\Resource\ResourceInterface', $resources); + $fileResource = reset($resources); + $this->assertSame( + realpath($locator->locate('with_define_path_variable.php')), + (string) $fileResource + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e8e24fde5869800b616829517401d7ad24e9c1f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php @@ -0,0 +1,290 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\Routing\Loader\XmlFileLoader; +use Symfony\Component\Routing\Tests\Fixtures\CustomXmlFileLoader; + +class XmlFileLoaderTest extends TestCase +{ + public function testSupports() + { + $loader = new XmlFileLoader($this->getMockBuilder('Symfony\Component\Config\FileLocator')->getMock()); + + $this->assertTrue($loader->supports('foo.xml'), '->supports() returns true if the resource is loadable'); + $this->assertFalse($loader->supports('foo.foo'), '->supports() returns true if the resource is loadable'); + + $this->assertTrue($loader->supports('foo.xml', 'xml'), '->supports() checks the resource type if specified'); + $this->assertFalse($loader->supports('foo.xml', 'foo'), '->supports() checks the resource type if specified'); + } + + public function testLoadWithRoute() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('validpattern.xml'); + $route = $routeCollection->get('blog_show'); + + $this->assertInstanceOf('Symfony\Component\Routing\Route', $route); + $this->assertSame('/blog/{slug}', $route->getPath()); + $this->assertSame('{locale}.example.com', $route->getHost()); + $this->assertSame('MyBundle:Blog:show', $route->getDefault('_controller')); + $this->assertSame('\w+', $route->getRequirement('locale')); + $this->assertSame('RouteCompiler', $route->getOption('compiler_class')); + $this->assertEquals(array('GET', 'POST', 'PUT', 'OPTIONS'), $route->getMethods()); + $this->assertEquals(array('https'), $route->getSchemes()); + $this->assertEquals('context.getMethod() == "GET"', $route->getCondition()); + } + + public function testLoadWithNamespacePrefix() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('namespaceprefix.xml'); + + $this->assertCount(1, $routeCollection->all(), 'One route is loaded'); + + $route = $routeCollection->get('blog_show'); + $this->assertSame('/blog/{slug}', $route->getPath()); + $this->assertSame('{_locale}.example.com', $route->getHost()); + $this->assertSame('MyBundle:Blog:show', $route->getDefault('_controller')); + $this->assertSame('\w+', $route->getRequirement('slug')); + $this->assertSame('en|fr|de', $route->getRequirement('_locale')); + $this->assertNull($route->getDefault('slug')); + $this->assertSame('RouteCompiler', $route->getOption('compiler_class')); + $this->assertSame(1, $route->getDefault('page')); + } + + public function testLoadWithImport() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('validresource.xml'); + $routes = $routeCollection->all(); + + $this->assertCount(3, $routes, 'Two routes are loaded'); + $this->assertContainsOnly('Symfony\Component\Routing\Route', $routes); + + foreach ($routes as $route) { + $this->assertSame('/{foo}/blog/{slug}', $route->getPath()); + $this->assertSame('123', $route->getDefault('foo')); + $this->assertSame('\d+', $route->getRequirement('foo')); + $this->assertSame('bar', $route->getOption('foo')); + $this->assertSame('', $route->getHost()); + $this->assertSame('context.getMethod() == "POST"', $route->getCondition()); + } + } + + /** + * @expectedException \InvalidArgumentException + * @dataProvider getPathsToInvalidFiles + */ + public function testLoadThrowsExceptionWithInvalidFile($filePath) + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader->load($filePath); + } + + /** + * @expectedException \InvalidArgumentException + * @dataProvider getPathsToInvalidFiles + */ + public function testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidation($filePath) + { + $loader = new CustomXmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader->load($filePath); + } + + public function getPathsToInvalidFiles() + { + return array(array('nonvalidnode.xml'), array('nonvalidroute.xml'), array('nonvalid.xml'), array('missing_id.xml'), array('missing_path.xml')); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Document types are not allowed. + */ + public function testDocTypeIsNotAllowed() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader->load('withdoctype.xml'); + } + + public function testNullValues() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('null_values.xml'); + $route = $routeCollection->get('blog_show'); + + $this->assertTrue($route->hasDefault('foo')); + $this->assertNull($route->getDefault('foo')); + $this->assertTrue($route->hasDefault('bar')); + $this->assertNull($route->getDefault('bar')); + $this->assertEquals('foo', $route->getDefault('foobar')); + $this->assertEquals('bar', $route->getDefault('baz')); + } + + public function testScalarDataTypeDefaults() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('scalar_defaults.xml'); + $route = $routeCollection->get('blog'); + + $this->assertSame( + array( + '_controller' => 'AcmeBlogBundle:Blog:index', + 'slug' => null, + 'published' => true, + 'page' => 1, + 'price' => 3.5, + 'archived' => false, + 'free' => true, + 'locked' => false, + 'foo' => null, + 'bar' => null, + ), + $route->getDefaults() + ); + } + + public function testListDefaults() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('list_defaults.xml'); + $route = $routeCollection->get('blog'); + + $this->assertSame( + array( + '_controller' => 'AcmeBlogBundle:Blog:index', + 'values' => array(true, 1, 3.5, 'foo'), + ), + $route->getDefaults() + ); + } + + public function testListInListDefaults() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('list_in_list_defaults.xml'); + $route = $routeCollection->get('blog'); + + $this->assertSame( + array( + '_controller' => 'AcmeBlogBundle:Blog:index', + 'values' => array(array(true, 1, 3.5, 'foo')), + ), + $route->getDefaults() + ); + } + + public function testListInMapDefaults() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('list_in_map_defaults.xml'); + $route = $routeCollection->get('blog'); + + $this->assertSame( + array( + '_controller' => 'AcmeBlogBundle:Blog:index', + 'values' => array('list' => array(true, 1, 3.5, 'foo')), + ), + $route->getDefaults() + ); + } + + public function testMapDefaults() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('map_defaults.xml'); + $route = $routeCollection->get('blog'); + + $this->assertSame( + array( + '_controller' => 'AcmeBlogBundle:Blog:index', + 'values' => array( + 'public' => true, + 'page' => 1, + 'price' => 3.5, + 'title' => 'foo', + ), + ), + $route->getDefaults() + ); + } + + public function testMapInListDefaults() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('map_in_list_defaults.xml'); + $route = $routeCollection->get('blog'); + + $this->assertSame( + array( + '_controller' => 'AcmeBlogBundle:Blog:index', + 'values' => array(array( + 'public' => true, + 'page' => 1, + 'price' => 3.5, + 'title' => 'foo', + )), + ), + $route->getDefaults() + ); + } + + public function testMapInMapDefaults() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('map_in_map_defaults.xml'); + $route = $routeCollection->get('blog'); + + $this->assertSame( + array( + '_controller' => 'AcmeBlogBundle:Blog:index', + 'values' => array('map' => array( + 'public' => true, + 'page' => 1, + 'price' => 3.5, + 'title' => 'foo', + )), + ), + $route->getDefaults() + ); + } + + public function testNullValuesInList() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('list_null_values.xml'); + $route = $routeCollection->get('blog'); + + $this->assertSame(array(null, null, null, null, null, null), $route->getDefault('list')); + } + + public function testNullValuesInMap() + { + $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('map_null_values.xml'); + $route = $routeCollection->get('blog'); + + $this->assertSame( + array( + 'boolean' => null, + 'integer' => null, + 'float' => null, + 'string' => null, + 'list' => null, + 'map' => null, + ), + $route->getDefault('map') + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8342c266dfa181fdaf8d490a706eed1b854904fd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php @@ -0,0 +1,111 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\Routing\Loader\YamlFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class YamlFileLoaderTest extends TestCase +{ + public function testSupports() + { + $loader = new YamlFileLoader($this->getMockBuilder('Symfony\Component\Config\FileLocator')->getMock()); + + $this->assertTrue($loader->supports('foo.yml'), '->supports() returns true if the resource is loadable'); + $this->assertTrue($loader->supports('foo.yaml'), '->supports() returns true if the resource is loadable'); + $this->assertFalse($loader->supports('foo.foo'), '->supports() returns true if the resource is loadable'); + + $this->assertTrue($loader->supports('foo.yml', 'yaml'), '->supports() checks the resource type if specified'); + $this->assertTrue($loader->supports('foo.yaml', 'yaml'), '->supports() checks the resource type if specified'); + $this->assertFalse($loader->supports('foo.yml', 'foo'), '->supports() checks the resource type if specified'); + } + + public function testLoadDoesNothingIfEmpty() + { + $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $collection = $loader->load('empty.yml'); + + $this->assertEquals(array(), $collection->all()); + $this->assertEquals(array(new FileResource(realpath(__DIR__.'/../Fixtures/empty.yml'))), $collection->getResources()); + } + + /** + * @expectedException \InvalidArgumentException + * @dataProvider getPathsToInvalidFiles + */ + public function testLoadThrowsExceptionWithInvalidFile($filePath) + { + $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $loader->load($filePath); + } + + public function getPathsToInvalidFiles() + { + return array( + array('nonvalid.yml'), + array('nonvalid2.yml'), + array('incomplete.yml'), + array('nonvalidkeys.yml'), + array('nonesense_resource_plus_path.yml'), + array('nonesense_type_without_resource.yml'), + array('bad_format.yml'), + ); + } + + public function testLoadSpecialRouteName() + { + $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('special_route_name.yml'); + $route = $routeCollection->get('#$péß^a|'); + + $this->assertInstanceOf('Symfony\Component\Routing\Route', $route); + $this->assertSame('/true', $route->getPath()); + } + + public function testLoadWithRoute() + { + $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('validpattern.yml'); + $route = $routeCollection->get('blog_show'); + + $this->assertInstanceOf('Symfony\Component\Routing\Route', $route); + $this->assertSame('/blog/{slug}', $route->getPath()); + $this->assertSame('{locale}.example.com', $route->getHost()); + $this->assertSame('MyBundle:Blog:show', $route->getDefault('_controller')); + $this->assertSame('\w+', $route->getRequirement('locale')); + $this->assertSame('RouteCompiler', $route->getOption('compiler_class')); + $this->assertEquals(array('GET', 'POST', 'PUT', 'OPTIONS'), $route->getMethods()); + $this->assertEquals(array('https'), $route->getSchemes()); + $this->assertEquals('context.getMethod() == "GET"', $route->getCondition()); + } + + public function testLoadWithResource() + { + $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); + $routeCollection = $loader->load('validresource.yml'); + $routes = $routeCollection->all(); + + $this->assertCount(2, $routes, 'Two routes are loaded'); + $this->assertContainsOnly('Symfony\Component\Routing\Route', $routes); + + foreach ($routes as $route) { + $this->assertSame('/{foo}/blog/{slug}', $route->getPath()); + $this->assertSame('123', $route->getDefault('foo')); + $this->assertSame('\d+', $route->getRequirement('foo')); + $this->assertSame('bar', $route->getOption('foo')); + $this->assertSame('', $route->getHost()); + $this->assertSame('context.getMethod() == "POST"', $route->getCondition()); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperCollectionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperCollectionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..823efdb840022eba9f394c829b93714488427e11 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperCollectionTest.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Matcher\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Matcher\Dumper\DumperCollection; + +class DumperCollectionTest extends TestCase +{ + public function testGetRoot() + { + $a = new DumperCollection(); + + $b = new DumperCollection(); + $a->add($b); + + $c = new DumperCollection(); + $b->add($c); + + $d = new DumperCollection(); + $c->add($d); + + $this->assertSame($a, $c->getRoot()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperPrefixCollectionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperPrefixCollectionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e687b8a67d042538c8bd2a08ab38ba479a82f234 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperPrefixCollectionTest.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Matcher\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\Matcher\Dumper\DumperPrefixCollection; +use Symfony\Component\Routing\Matcher\Dumper\DumperRoute; +use Symfony\Component\Routing\Matcher\Dumper\DumperCollection; + +class DumperPrefixCollectionTest extends TestCase +{ + public function testAddPrefixRoute() + { + $coll = new DumperPrefixCollection(); + $coll->setPrefix(''); + + $route = new DumperRoute('bar', new Route('/foo/bar')); + $coll = $coll->addPrefixRoute($route); + + $route = new DumperRoute('bar2', new Route('/foo/bar')); + $coll = $coll->addPrefixRoute($route); + + $route = new DumperRoute('qux', new Route('/foo/qux')); + $coll = $coll->addPrefixRoute($route); + + $route = new DumperRoute('bar3', new Route('/foo/bar')); + $coll = $coll->addPrefixRoute($route); + + $route = new DumperRoute('bar4', new Route('')); + $result = $coll->addPrefixRoute($route); + + $expect = <<<'EOF' + |-coll / + | |-coll /f + | | |-coll /fo + | | | |-coll /foo + | | | | |-coll /foo/ + | | | | | |-coll /foo/b + | | | | | | |-coll /foo/ba + | | | | | | | |-coll /foo/bar + | | | | | | | | |-route bar /foo/bar + | | | | | | | | |-route bar2 /foo/bar + | | | | | |-coll /foo/q + | | | | | | |-coll /foo/qu + | | | | | | | |-coll /foo/qux + | | | | | | | | |-route qux /foo/qux + | | | | | |-coll /foo/b + | | | | | | |-coll /foo/ba + | | | | | | | |-coll /foo/bar + | | | | | | | | |-route bar3 /foo/bar + | |-route bar4 / + +EOF; + + $this->assertSame($expect, $this->collectionToString($result->getRoot(), ' ')); + } + + public function testMergeSlashNodes() + { + $coll = new DumperPrefixCollection(); + $coll->setPrefix(''); + + $route = new DumperRoute('bar', new Route('/foo/bar')); + $coll = $coll->addPrefixRoute($route); + + $route = new DumperRoute('bar2', new Route('/foo/bar')); + $coll = $coll->addPrefixRoute($route); + + $route = new DumperRoute('qux', new Route('/foo/qux')); + $coll = $coll->addPrefixRoute($route); + + $route = new DumperRoute('bar3', new Route('/foo/bar')); + $result = $coll->addPrefixRoute($route); + + $result->getRoot()->mergeSlashNodes(); + + $expect = <<<'EOF' + |-coll /f + | |-coll /fo + | | |-coll /foo + | | | |-coll /foo/b + | | | | |-coll /foo/ba + | | | | | |-coll /foo/bar + | | | | | | |-route bar /foo/bar + | | | | | | |-route bar2 /foo/bar + | | | |-coll /foo/q + | | | | |-coll /foo/qu + | | | | | |-coll /foo/qux + | | | | | | |-route qux /foo/qux + | | | |-coll /foo/b + | | | | |-coll /foo/ba + | | | | | |-coll /foo/bar + | | | | | | |-route bar3 /foo/bar + +EOF; + + $this->assertSame($expect, $this->collectionToString($result->getRoot(), ' ')); + } + + private function collectionToString(DumperCollection $collection, $prefix) + { + $string = ''; + foreach ($collection as $route) { + if ($route instanceof DumperCollection) { + $string .= sprintf("%s|-coll %s\n", $prefix, $route->getPrefix()); + $string .= $this->collectionToString($route, $prefix.'| '); + } else { + $string .= sprintf("%s|-route %s %s\n", $prefix, $route->getName(), $route->getRoute()->getPath()); + } + } + + return $string; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cb3a1441656e4835dc9f1f5e44799d003bafaab4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php @@ -0,0 +1,288 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Matcher\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; + +class PhpMatcherDumperTest extends TestCase +{ + /** + * @expectedException \LogicException + */ + public function testDumpWhenSchemeIsUsedWithoutAProperDumper() + { + $collection = new RouteCollection(); + $collection->add('secure', new Route( + '/secure', + array(), + array(), + array(), + '', + array('https') + )); + $dumper = new PhpMatcherDumper($collection); + $dumper->dump(); + } + + /** + * @dataProvider getRouteCollections + */ + public function testDump(RouteCollection $collection, $fixture, $options = array()) + { + $basePath = __DIR__.'/../../Fixtures/dumper/'; + + $dumper = new PhpMatcherDumper($collection); + $this->assertStringEqualsFile($basePath.$fixture, $dumper->dump($options), '->dump() correctly dumps routes as optimized PHP code.'); + } + + public function getRouteCollections() + { + /* test case 1 */ + + $collection = new RouteCollection(); + + $collection->add('overridden', new Route('/overridden')); + + // defaults and requirements + $collection->add('foo', new Route( + '/foo/{bar}', + array('def' => 'test'), + array('bar' => 'baz|symfony') + )); + // method requirement + $collection->add('bar', new Route( + '/bar/{foo}', + array(), + array(), + array(), + '', + array(), + array('GET', 'head') + )); + // GET method requirement automatically adds HEAD as valid + $collection->add('barhead', new Route( + '/barhead/{foo}', + array(), + array(), + array(), + '', + array(), + array('GET') + )); + // simple + $collection->add('baz', new Route( + '/test/baz' + )); + // simple with extension + $collection->add('baz2', new Route( + '/test/baz.html' + )); + // trailing slash + $collection->add('baz3', new Route( + '/test/baz3/' + )); + // trailing slash with variable + $collection->add('baz4', new Route( + '/test/{foo}/' + )); + // trailing slash and method + $collection->add('baz5', new Route( + '/test/{foo}/', + array(), + array(), + array(), + '', + array(), + array('post') + )); + // complex name + $collection->add('baz.baz6', new Route( + '/test/{foo}/', + array(), + array(), + array(), + '', + array(), + array('put') + )); + // defaults without variable + $collection->add('foofoo', new Route( + '/foofoo', + array('def' => 'test') + )); + // pattern with quotes + $collection->add('quoter', new Route( + '/{quoter}', + array(), + array('quoter' => '[\']+') + )); + // space in pattern + $collection->add('space', new Route( + '/spa ce' + )); + + // prefixes + $collection1 = new RouteCollection(); + $collection1->add('overridden', new Route('/overridden1')); + $collection1->add('foo1', new Route('/{foo}')); + $collection1->add('bar1', new Route('/{bar}')); + $collection1->addPrefix('/b\'b'); + $collection2 = new RouteCollection(); + $collection2->addCollection($collection1); + $collection2->add('overridden', new Route('/{var}', array(), array('var' => '.*'))); + $collection1 = new RouteCollection(); + $collection1->add('foo2', new Route('/{foo1}')); + $collection1->add('bar2', new Route('/{bar1}')); + $collection1->addPrefix('/b\'b'); + $collection2->addCollection($collection1); + $collection2->addPrefix('/a'); + $collection->addCollection($collection2); + + // overridden through addCollection() and multiple sub-collections with no own prefix + $collection1 = new RouteCollection(); + $collection1->add('overridden2', new Route('/old')); + $collection1->add('helloWorld', new Route('/hello/{who}', array('who' => 'World!'))); + $collection2 = new RouteCollection(); + $collection3 = new RouteCollection(); + $collection3->add('overridden2', new Route('/new')); + $collection3->add('hey', new Route('/hey/')); + $collection2->addCollection($collection3); + $collection1->addCollection($collection2); + $collection1->addPrefix('/multi'); + $collection->addCollection($collection1); + + // "dynamic" prefix + $collection1 = new RouteCollection(); + $collection1->add('foo3', new Route('/{foo}')); + $collection1->add('bar3', new Route('/{bar}')); + $collection1->addPrefix('/b'); + $collection1->addPrefix('{_locale}'); + $collection->addCollection($collection1); + + // route between collections + $collection->add('ababa', new Route('/ababa')); + + // collection with static prefix but only one route + $collection1 = new RouteCollection(); + $collection1->add('foo4', new Route('/{foo}')); + $collection1->addPrefix('/aba'); + $collection->addCollection($collection1); + + // prefix and host + + $collection1 = new RouteCollection(); + + $route1 = new Route('/route1', array(), array(), array(), 'a.example.com'); + $collection1->add('route1', $route1); + + $route2 = new Route('/c2/route2', array(), array(), array(), 'a.example.com'); + $collection1->add('route2', $route2); + + $route3 = new Route('/c2/route3', array(), array(), array(), 'b.example.com'); + $collection1->add('route3', $route3); + + $route4 = new Route('/route4', array(), array(), array(), 'a.example.com'); + $collection1->add('route4', $route4); + + $route5 = new Route('/route5', array(), array(), array(), 'c.example.com'); + $collection1->add('route5', $route5); + + $route6 = new Route('/route6', array(), array(), array(), null); + $collection1->add('route6', $route6); + + $collection->addCollection($collection1); + + // host and variables + + $collection1 = new RouteCollection(); + + $route11 = new Route('/route11', array(), array(), array(), '{var1}.example.com'); + $collection1->add('route11', $route11); + + $route12 = new Route('/route12', array('var1' => 'val'), array(), array(), '{var1}.example.com'); + $collection1->add('route12', $route12); + + $route13 = new Route('/route13/{name}', array(), array(), array(), '{var1}.example.com'); + $collection1->add('route13', $route13); + + $route14 = new Route('/route14/{name}', array('var1' => 'val'), array(), array(), '{var1}.example.com'); + $collection1->add('route14', $route14); + + $route15 = new Route('/route15/{name}', array(), array(), array(), 'c.example.com'); + $collection1->add('route15', $route15); + + $route16 = new Route('/route16/{name}', array('var1' => 'val'), array(), array(), null); + $collection1->add('route16', $route16); + + $route17 = new Route('/route17', array(), array(), array(), null); + $collection1->add('route17', $route17); + + $collection->addCollection($collection1); + + // multiple sub-collections with a single route and a prefix each + $collection1 = new RouteCollection(); + $collection1->add('a', new Route('/a...')); + $collection2 = new RouteCollection(); + $collection2->add('b', new Route('/{var}')); + $collection3 = new RouteCollection(); + $collection3->add('c', new Route('/{var}')); + $collection3->addPrefix('/c'); + $collection2->addCollection($collection3); + $collection2->addPrefix('/b'); + $collection1->addCollection($collection2); + $collection1->addPrefix('/a'); + $collection->addCollection($collection1); + + /* test case 2 */ + + $redirectCollection = clone $collection; + + // force HTTPS redirection + $redirectCollection->add('secure', new Route( + '/secure', + array(), + array(), + array(), + '', + array('https') + )); + + // force HTTP redirection + $redirectCollection->add('nonsecure', new Route( + '/nonsecure', + array(), + array(), + array(), + '', + array('http') + )); + + /* test case 3 */ + + $rootprefixCollection = new RouteCollection(); + $rootprefixCollection->add('static', new Route('/test')); + $rootprefixCollection->add('dynamic', new Route('/{var}')); + $rootprefixCollection->addPrefix('rootprefix'); + $route = new Route('/with-condition'); + $route->setCondition('context.getMethod() == "GET"'); + $rootprefixCollection->add('with-condition', $route); + + return array( + array($collection, 'url_matcher1.php', array()), + array($redirectCollection, 'url_matcher2.php', array('base_class' => 'Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher')), + array($rootprefixCollection, 'url_matcher3.php', array()), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ba4c6e972f19c136ae83455f572cc7735a4d931a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Matcher; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\RequestContext; + +class RedirectableUrlMatcherTest extends TestCase +{ + public function testRedirectWhenNoSlash() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo/')); + + $matcher = $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', array($coll, new RequestContext())); + $matcher->expects($this->once())->method('redirect'); + $matcher->match('/foo'); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException + */ + public function testRedirectWhenNoSlashForNonSafeMethod() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo/')); + + $context = new RequestContext(); + $context->setMethod('POST'); + $matcher = $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', array($coll, $context)); + $matcher->match('/foo'); + } + + public function testSchemeRedirectRedirectsToFirstScheme() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('FTP', 'HTTPS'))); + + $matcher = $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', array($coll, new RequestContext())); + $matcher + ->expects($this->once()) + ->method('redirect') + ->with('/foo', 'foo', 'ftp') + ->will($this->returnValue(array('_route' => 'foo'))) + ; + $matcher->match('/foo'); + } + + public function testNoSchemaRedirectIfOnOfMultipleSchemesMatches() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('https', 'http'))); + + $matcher = $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', array($coll, new RequestContext())); + $matcher + ->expects($this->never()) + ->method('redirect') + ; + $matcher->match('/foo'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/TraceableUrlMatcherTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/TraceableUrlMatcherTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9f0529e2de5d618bcff679a5e4953cb5b56930c8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/TraceableUrlMatcherTest.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\Component\Routing\Tests\Matcher; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Routing\Matcher\TraceableUrlMatcher; + +class TraceableUrlMatcherTest extends TestCase +{ + public function test() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo', array(), array(), array(), '', array(), array('POST'))); + $coll->add('bar', new Route('/bar/{id}', array(), array('id' => '\d+'))); + $coll->add('bar1', new Route('/bar/{name}', array(), array('id' => '\w+'), array(), '', array(), array('POST'))); + $coll->add('bar2', new Route('/foo', array(), array(), array(), 'baz')); + $coll->add('bar3', new Route('/foo1', array(), array(), array(), 'baz')); + $coll->add('bar4', new Route('/foo2', array(), array(), array(), 'baz', array(), array(), 'context.getMethod() == "GET"')); + + $context = new RequestContext(); + $context->setHost('baz'); + + $matcher = new TraceableUrlMatcher($coll, $context); + $traces = $matcher->getTraces('/babar'); + $this->assertSame(array(0, 0, 0, 0, 0, 0), $this->getLevels($traces)); + + $traces = $matcher->getTraces('/foo'); + $this->assertSame(array(1, 0, 0, 2), $this->getLevels($traces)); + + $traces = $matcher->getTraces('/bar/12'); + $this->assertSame(array(0, 2), $this->getLevels($traces)); + + $traces = $matcher->getTraces('/bar/dd'); + $this->assertSame(array(0, 1, 1, 0, 0, 0), $this->getLevels($traces)); + + $traces = $matcher->getTraces('/foo1'); + $this->assertSame(array(0, 0, 0, 0, 2), $this->getLevels($traces)); + + $context->setMethod('POST'); + $traces = $matcher->getTraces('/foo'); + $this->assertSame(array(2), $this->getLevels($traces)); + + $traces = $matcher->getTraces('/bar/dd'); + $this->assertSame(array(0, 1, 2), $this->getLevels($traces)); + + $traces = $matcher->getTraces('/foo2'); + $this->assertSame(array(0, 0, 0, 0, 0, 1), $this->getLevels($traces)); + } + + public function testMatchRouteOnMultipleHosts() + { + $routes = new RouteCollection(); + $routes->add('first', new Route( + '/mypath/', + array('_controller' => 'MainBundle:Info:first'), + array(), + array(), + 'some.example.com' + )); + + $routes->add('second', new Route( + '/mypath/', + array('_controller' => 'MainBundle:Info:second'), + array(), + array(), + 'another.example.com' + )); + + $context = new RequestContext(); + $context->setHost('baz'); + + $matcher = new TraceableUrlMatcher($routes, $context); + + $traces = $matcher->getTraces('/mypath/'); + $this->assertSame( + array(TraceableUrlMatcher::ROUTE_ALMOST_MATCHES, TraceableUrlMatcher::ROUTE_ALMOST_MATCHES), + $this->getLevels($traces) + ); + } + + public function getLevels($traces) + { + $levels = array(); + foreach ($traces as $trace) { + $levels[] = $trace['level']; + } + + return $levels; + } + + public function testRoutesWithConditions() + { + $routes = new RouteCollection(); + $routes->add('foo', new Route('/foo', array(), array(), array(), 'baz', array(), array(), "request.headers.get('User-Agent') matches '/firefox/i'")); + + $context = new RequestContext(); + $context->setHost('baz'); + + $matcher = new TraceableUrlMatcher($routes, $context); + + $notMatchingRequest = Request::create('/foo', 'GET'); + $traces = $matcher->getTracesForRequest($notMatchingRequest); + $this->assertEquals("Condition \"request.headers.get('User-Agent') matches '/firefox/i'\" does not evaluate to \"true\"", $traces[0]['log']); + + $matchingRequest = Request::create('/foo', 'GET', array(), array(), array(), array('HTTP_USER_AGENT' => 'Firefox')); + $traces = $matcher->getTracesForRequest($matchingRequest); + $this->assertEquals('Route matches!', $traces[0]['log']); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php new file mode 100644 index 0000000000000000000000000000000000000000..06a7779a0201288f02ebaee7f031ec4be3deaa3b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php @@ -0,0 +1,420 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests\Matcher; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Exception\MethodNotAllowedException; +use Symfony\Component\Routing\Exception\ResourceNotFoundException; +use Symfony\Component\Routing\Matcher\UrlMatcher; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\RequestContext; + +class UrlMatcherTest extends TestCase +{ + public function testNoMethodSoAllowed() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo')); + + $matcher = new UrlMatcher($coll, new RequestContext()); + $this->assertInternalType('array', $matcher->match('/foo')); + } + + public function testMethodNotAllowed() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo', array(), array(), array(), '', array(), array('post'))); + + $matcher = new UrlMatcher($coll, new RequestContext()); + + try { + $matcher->match('/foo'); + $this->fail(); + } catch (MethodNotAllowedException $e) { + $this->assertEquals(array('POST'), $e->getAllowedMethods()); + } + } + + public function testHeadAllowedWhenRequirementContainsGet() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo', array(), array(), array(), '', array(), array('get'))); + + $matcher = new UrlMatcher($coll, new RequestContext('', 'head')); + $this->assertInternalType('array', $matcher->match('/foo')); + } + + public function testMethodNotAllowedAggregatesAllowedMethods() + { + $coll = new RouteCollection(); + $coll->add('foo1', new Route('/foo', array(), array(), array(), '', array(), array('post'))); + $coll->add('foo2', new Route('/foo', array(), array(), array(), '', array(), array('put', 'delete'))); + + $matcher = new UrlMatcher($coll, new RequestContext()); + + try { + $matcher->match('/foo'); + $this->fail(); + } catch (MethodNotAllowedException $e) { + $this->assertEquals(array('POST', 'PUT', 'DELETE'), $e->getAllowedMethods()); + } + } + + public function testMatch() + { + // test the patterns are matched and parameters are returned + $collection = new RouteCollection(); + $collection->add('foo', new Route('/foo/{bar}')); + $matcher = new UrlMatcher($collection, new RequestContext()); + try { + $matcher->match('/no-match'); + $this->fail(); + } catch (ResourceNotFoundException $e) { + } + $this->assertEquals(array('_route' => 'foo', 'bar' => 'baz'), $matcher->match('/foo/baz')); + + // test that defaults are merged + $collection = new RouteCollection(); + $collection->add('foo', new Route('/foo/{bar}', array('def' => 'test'))); + $matcher = new UrlMatcher($collection, new RequestContext()); + $this->assertEquals(array('_route' => 'foo', 'bar' => 'baz', 'def' => 'test'), $matcher->match('/foo/baz')); + + // test that route "method" is ignored if no method is given in the context + $collection = new RouteCollection(); + $collection->add('foo', new Route('/foo', array(), array(), array(), '', array(), array('get', 'head'))); + $matcher = new UrlMatcher($collection, new RequestContext()); + $this->assertInternalType('array', $matcher->match('/foo')); + + // route does not match with POST method context + $matcher = new UrlMatcher($collection, new RequestContext('', 'post')); + try { + $matcher->match('/foo'); + $this->fail(); + } catch (MethodNotAllowedException $e) { + } + + // route does match with GET or HEAD method context + $matcher = new UrlMatcher($collection, new RequestContext()); + $this->assertInternalType('array', $matcher->match('/foo')); + $matcher = new UrlMatcher($collection, new RequestContext('', 'head')); + $this->assertInternalType('array', $matcher->match('/foo')); + + // route with an optional variable as the first segment + $collection = new RouteCollection(); + $collection->add('bar', new Route('/{bar}/foo', array('bar' => 'bar'), array('bar' => 'foo|bar'))); + $matcher = new UrlMatcher($collection, new RequestContext()); + $this->assertEquals(array('_route' => 'bar', 'bar' => 'bar'), $matcher->match('/bar/foo')); + $this->assertEquals(array('_route' => 'bar', 'bar' => 'foo'), $matcher->match('/foo/foo')); + + $collection = new RouteCollection(); + $collection->add('bar', new Route('/{bar}', array('bar' => 'bar'), array('bar' => 'foo|bar'))); + $matcher = new UrlMatcher($collection, new RequestContext()); + $this->assertEquals(array('_route' => 'bar', 'bar' => 'foo'), $matcher->match('/foo')); + $this->assertEquals(array('_route' => 'bar', 'bar' => 'bar'), $matcher->match('/')); + + // route with only optional variables + $collection = new RouteCollection(); + $collection->add('bar', new Route('/{foo}/{bar}', array('foo' => 'foo', 'bar' => 'bar'), array())); + $matcher = new UrlMatcher($collection, new RequestContext()); + $this->assertEquals(array('_route' => 'bar', 'foo' => 'foo', 'bar' => 'bar'), $matcher->match('/')); + $this->assertEquals(array('_route' => 'bar', 'foo' => 'a', 'bar' => 'bar'), $matcher->match('/a')); + $this->assertEquals(array('_route' => 'bar', 'foo' => 'a', 'bar' => 'b'), $matcher->match('/a/b')); + } + + public function testMatchWithPrefixes() + { + $collection = new RouteCollection(); + $collection->add('foo', new Route('/{foo}')); + $collection->addPrefix('/b'); + $collection->addPrefix('/a'); + + $matcher = new UrlMatcher($collection, new RequestContext()); + $this->assertEquals(array('_route' => 'foo', 'foo' => 'foo'), $matcher->match('/a/b/foo')); + } + + public function testMatchWithDynamicPrefix() + { + $collection = new RouteCollection(); + $collection->add('foo', new Route('/{foo}')); + $collection->addPrefix('/b'); + $collection->addPrefix('/{_locale}'); + + $matcher = new UrlMatcher($collection, new RequestContext()); + $this->assertEquals(array('_locale' => 'fr', '_route' => 'foo', 'foo' => 'foo'), $matcher->match('/fr/b/foo')); + } + + public function testMatchSpecialRouteName() + { + $collection = new RouteCollection(); + $collection->add('$péß^a|', new Route('/bar')); + + $matcher = new UrlMatcher($collection, new RequestContext()); + $this->assertEquals(array('_route' => '$péß^a|'), $matcher->match('/bar')); + } + + public function testMatchNonAlpha() + { + $collection = new RouteCollection(); + $chars = '!"$%éà &\'()*+,./:;<=>@ABCDEFGHIJKLMNOPQRSTUVWXYZ\\[]^_`abcdefghijklmnopqrstuvwxyz{|}~-'; + $collection->add('foo', new Route('/{foo}/bar', array(), array('foo' => '['.preg_quote($chars).']+'), array('utf8' => true))); + + $matcher = new UrlMatcher($collection, new RequestContext()); + $this->assertEquals(array('_route' => 'foo', 'foo' => $chars), $matcher->match('/'.rawurlencode($chars).'/bar')); + $this->assertEquals(array('_route' => 'foo', 'foo' => $chars), $matcher->match('/'.strtr($chars, array('%' => '%25')).'/bar')); + } + + public function testMatchWithDotMetacharacterInRequirements() + { + $collection = new RouteCollection(); + $collection->add('foo', new Route('/{foo}/bar', array(), array('foo' => '.+'))); + + $matcher = new UrlMatcher($collection, new RequestContext()); + $this->assertEquals(array('_route' => 'foo', 'foo' => "\n"), $matcher->match('/'.urlencode("\n").'/bar'), 'linefeed character is matched'); + } + + public function testMatchOverriddenRoute() + { + $collection = new RouteCollection(); + $collection->add('foo', new Route('/foo')); + + $collection1 = new RouteCollection(); + $collection1->add('foo', new Route('/foo1')); + + $collection->addCollection($collection1); + + $matcher = new UrlMatcher($collection, new RequestContext()); + + $this->assertEquals(array('_route' => 'foo'), $matcher->match('/foo1')); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Routing\Exception\ResourceNotFoundException'); + $this->assertEquals(array(), $matcher->match('/foo')); + } + + public function testMatchRegression() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo/{foo}')); + $coll->add('bar', new Route('/foo/bar/{foo}')); + + $matcher = new UrlMatcher($coll, new RequestContext()); + $this->assertEquals(array('foo' => 'bar', '_route' => 'bar'), $matcher->match('/foo/bar/bar')); + + $collection = new RouteCollection(); + $collection->add('foo', new Route('/{bar}')); + $matcher = new UrlMatcher($collection, new RequestContext()); + try { + $matcher->match('/'); + $this->fail(); + } catch (ResourceNotFoundException $e) { + } + } + + public function testDefaultRequirementForOptionalVariables() + { + $coll = new RouteCollection(); + $coll->add('test', new Route('/{page}.{_format}', array('page' => 'index', '_format' => 'html'))); + + $matcher = new UrlMatcher($coll, new RequestContext()); + $this->assertEquals(array('page' => 'my-page', '_format' => 'xml', '_route' => 'test'), $matcher->match('/my-page.xml')); + } + + public function testMatchingIsEager() + { + $coll = new RouteCollection(); + $coll->add('test', new Route('/{foo}-{bar}-', array(), array('foo' => '.+', 'bar' => '.+'))); + + $matcher = new UrlMatcher($coll, new RequestContext()); + $this->assertEquals(array('foo' => 'text1-text2-text3', 'bar' => 'text4', '_route' => 'test'), $matcher->match('/text1-text2-text3-text4-')); + } + + public function testAdjacentVariables() + { + $coll = new RouteCollection(); + $coll->add('test', new Route('/{w}{x}{y}{z}.{_format}', array('z' => 'default-z', '_format' => 'html'), array('y' => 'y|Y'))); + + $matcher = new UrlMatcher($coll, new RequestContext()); + // 'w' eagerly matches as much as possible and the other variables match the remaining chars. + // This also shows that the variables w-z must all exclude the separating char (the dot '.' in this case) by default requirement. + // Otherwise they would also consume '.xml' and _format would never match as it's an optional variable. + $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'Y', 'z' => 'Z', '_format' => 'xml', '_route' => 'test'), $matcher->match('/wwwwwxYZ.xml')); + // As 'y' has custom requirement and can only be of value 'y|Y', it will leave 'ZZZ' to variable z. + // So with carefully chosen requirements adjacent variables, can be useful. + $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'y', 'z' => 'ZZZ', '_format' => 'html', '_route' => 'test'), $matcher->match('/wwwwwxyZZZ')); + // z and _format are optional. + $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'y', 'z' => 'default-z', '_format' => 'html', '_route' => 'test'), $matcher->match('/wwwwwxy')); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Routing\Exception\ResourceNotFoundException'); + $matcher->match('/wxy.html'); + } + + public function testOptionalVariableWithNoRealSeparator() + { + $coll = new RouteCollection(); + $coll->add('test', new Route('/get{what}', array('what' => 'All'))); + $matcher = new UrlMatcher($coll, new RequestContext()); + + $this->assertEquals(array('what' => 'All', '_route' => 'test'), $matcher->match('/get')); + $this->assertEquals(array('what' => 'Sites', '_route' => 'test'), $matcher->match('/getSites')); + + // Usually the character in front of an optional parameter can be left out, e.g. with pattern '/get/{what}' just '/get' would match. + // But here the 't' in 'get' is not a separating character, so it makes no sense to match without it. + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Routing\Exception\ResourceNotFoundException'); + $matcher->match('/ge'); + } + + public function testRequiredVariableWithNoRealSeparator() + { + $coll = new RouteCollection(); + $coll->add('test', new Route('/get{what}Suffix')); + $matcher = new UrlMatcher($coll, new RequestContext()); + + $this->assertEquals(array('what' => 'Sites', '_route' => 'test'), $matcher->match('/getSitesSuffix')); + } + + public function testDefaultRequirementOfVariable() + { + $coll = new RouteCollection(); + $coll->add('test', new Route('/{page}.{_format}')); + $matcher = new UrlMatcher($coll, new RequestContext()); + + $this->assertEquals(array('page' => 'index', '_format' => 'mobile.html', '_route' => 'test'), $matcher->match('/index.mobile.html')); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException + */ + public function testDefaultRequirementOfVariableDisallowsSlash() + { + $coll = new RouteCollection(); + $coll->add('test', new Route('/{page}.{_format}')); + $matcher = new UrlMatcher($coll, new RequestContext()); + + $matcher->match('/index.sl/ash'); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException + */ + public function testDefaultRequirementOfVariableDisallowsNextSeparator() + { + $coll = new RouteCollection(); + $coll->add('test', new Route('/{page}.{_format}', array(), array('_format' => 'html|xml'))); + $matcher = new UrlMatcher($coll, new RequestContext()); + + $matcher->match('/do.t.html'); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException + */ + public function testSchemeRequirement() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('https'))); + $matcher = new UrlMatcher($coll, new RequestContext()); + $matcher->match('/foo'); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException + */ + public function testCondition() + { + $coll = new RouteCollection(); + $route = new Route('/foo'); + $route->setCondition('context.getMethod() == "POST"'); + $coll->add('foo', $route); + $matcher = new UrlMatcher($coll, new RequestContext()); + $matcher->match('/foo'); + } + + public function testDecodeOnce() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo/{foo}')); + + $matcher = new UrlMatcher($coll, new RequestContext()); + $this->assertEquals(array('foo' => 'bar%23', '_route' => 'foo'), $matcher->match('/foo/bar%2523')); + } + + public function testCannotRelyOnPrefix() + { + $coll = new RouteCollection(); + + $subColl = new RouteCollection(); + $subColl->add('bar', new Route('/bar')); + $subColl->addPrefix('/prefix'); + // overwrite the pattern, so the prefix is not valid anymore for this route in the collection + $subColl->get('bar')->setPath('/new'); + + $coll->addCollection($subColl); + + $matcher = new UrlMatcher($coll, new RequestContext()); + $this->assertEquals(array('_route' => 'bar'), $matcher->match('/new')); + } + + public function testWithHost() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo/{foo}', array(), array(), array(), '{locale}.example.com')); + + $matcher = new UrlMatcher($coll, new RequestContext('', 'GET', 'en.example.com')); + $this->assertEquals(array('foo' => 'bar', '_route' => 'foo', 'locale' => 'en'), $matcher->match('/foo/bar')); + } + + public function testWithHostOnRouteCollection() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo/{foo}')); + $coll->add('bar', new Route('/bar/{foo}', array(), array(), array(), '{locale}.example.net')); + $coll->setHost('{locale}.example.com'); + + $matcher = new UrlMatcher($coll, new RequestContext('', 'GET', 'en.example.com')); + $this->assertEquals(array('foo' => 'bar', '_route' => 'foo', 'locale' => 'en'), $matcher->match('/foo/bar')); + + $matcher = new UrlMatcher($coll, new RequestContext('', 'GET', 'en.example.com')); + $this->assertEquals(array('foo' => 'bar', '_route' => 'bar', 'locale' => 'en'), $matcher->match('/bar/bar')); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException + */ + public function testWithOutHostHostDoesNotMatch() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo/{foo}', array(), array(), array(), '{locale}.example.com')); + + $matcher = new UrlMatcher($coll, new RequestContext('', 'GET', 'example.com')); + $matcher->match('/foo/bar'); + } + + /** + * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException + */ + public function testPathIsCaseSensitive() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/locale', array(), array('locale' => 'EN|FR|DE'))); + + $matcher = new UrlMatcher($coll, new RequestContext()); + $matcher->match('/en'); + } + + public function testHostIsCaseInsensitive() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/', array(), array('locale' => 'EN|FR|DE'), array(), '{locale}.example.com')); + + $matcher = new UrlMatcher($coll, new RequestContext('', 'GET', 'en.example.com')); + $this->assertEquals(array('_route' => 'foo', 'locale' => 'en'), $matcher->match('/')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RequestContextTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RequestContextTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ffe29d1a747c9fdad60e741e14553f2774003a33 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RequestContextTest.php @@ -0,0 +1,160 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\RequestContext; + +class RequestContextTest extends TestCase +{ + public function testConstruct() + { + $requestContext = new RequestContext( + 'foo', + 'post', + 'foo.bar', + 'HTTPS', + 8080, + 444, + '/baz', + 'bar=foobar' + ); + + $this->assertEquals('foo', $requestContext->getBaseUrl()); + $this->assertEquals('POST', $requestContext->getMethod()); + $this->assertEquals('foo.bar', $requestContext->getHost()); + $this->assertEquals('https', $requestContext->getScheme()); + $this->assertSame(8080, $requestContext->getHttpPort()); + $this->assertSame(444, $requestContext->getHttpsPort()); + $this->assertEquals('/baz', $requestContext->getPathInfo()); + $this->assertEquals('bar=foobar', $requestContext->getQueryString()); + } + + public function testFromRequest() + { + $request = Request::create('https://test.com:444/foo?bar=baz'); + $requestContext = new RequestContext(); + $requestContext->setHttpPort(123); + $requestContext->fromRequest($request); + + $this->assertEquals('', $requestContext->getBaseUrl()); + $this->assertEquals('GET', $requestContext->getMethod()); + $this->assertEquals('test.com', $requestContext->getHost()); + $this->assertEquals('https', $requestContext->getScheme()); + $this->assertEquals('/foo', $requestContext->getPathInfo()); + $this->assertEquals('bar=baz', $requestContext->getQueryString()); + $this->assertSame(123, $requestContext->getHttpPort()); + $this->assertSame(444, $requestContext->getHttpsPort()); + + $request = Request::create('http://test.com:8080/foo?bar=baz'); + $requestContext = new RequestContext(); + $requestContext->setHttpsPort(567); + $requestContext->fromRequest($request); + + $this->assertSame(8080, $requestContext->getHttpPort()); + $this->assertSame(567, $requestContext->getHttpsPort()); + } + + public function testGetParameters() + { + $requestContext = new RequestContext(); + $this->assertEquals(array(), $requestContext->getParameters()); + + $requestContext->setParameters(array('foo' => 'bar')); + $this->assertEquals(array('foo' => 'bar'), $requestContext->getParameters()); + } + + public function testHasParameter() + { + $requestContext = new RequestContext(); + $requestContext->setParameters(array('foo' => 'bar')); + + $this->assertTrue($requestContext->hasParameter('foo')); + $this->assertFalse($requestContext->hasParameter('baz')); + } + + public function testGetParameter() + { + $requestContext = new RequestContext(); + $requestContext->setParameters(array('foo' => 'bar')); + + $this->assertEquals('bar', $requestContext->getParameter('foo')); + $this->assertNull($requestContext->getParameter('baz')); + } + + public function testSetParameter() + { + $requestContext = new RequestContext(); + $requestContext->setParameter('foo', 'bar'); + + $this->assertEquals('bar', $requestContext->getParameter('foo')); + } + + public function testMethod() + { + $requestContext = new RequestContext(); + $requestContext->setMethod('post'); + + $this->assertSame('POST', $requestContext->getMethod()); + } + + public function testScheme() + { + $requestContext = new RequestContext(); + $requestContext->setScheme('HTTPS'); + + $this->assertSame('https', $requestContext->getScheme()); + } + + public function testHost() + { + $requestContext = new RequestContext(); + $requestContext->setHost('eXampLe.com'); + + $this->assertSame('example.com', $requestContext->getHost()); + } + + public function testQueryString() + { + $requestContext = new RequestContext(); + $requestContext->setQueryString(null); + + $this->assertSame('', $requestContext->getQueryString()); + } + + public function testPort() + { + $requestContext = new RequestContext(); + $requestContext->setHttpPort('123'); + $requestContext->setHttpsPort('456'); + + $this->assertSame(123, $requestContext->getHttpPort()); + $this->assertSame(456, $requestContext->getHttpsPort()); + } + + public function testFluentInterface() + { + $requestContext = new RequestContext(); + + $this->assertSame($requestContext, $requestContext->setBaseUrl('/app.php')); + $this->assertSame($requestContext, $requestContext->setPathInfo('/index')); + $this->assertSame($requestContext, $requestContext->setMethod('POST')); + $this->assertSame($requestContext, $requestContext->setScheme('https')); + $this->assertSame($requestContext, $requestContext->setHost('example.com')); + $this->assertSame($requestContext, $requestContext->setQueryString('foo=bar')); + $this->assertSame($requestContext, $requestContext->setHttpPort(80)); + $this->assertSame($requestContext, $requestContext->setHttpsPort(443)); + $this->assertSame($requestContext, $requestContext->setParameters(array())); + $this->assertSame($requestContext, $requestContext->setParameter('foo', 'bar')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..058a100d1f689044b095a640c079f3a7fac66b34 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php @@ -0,0 +1,325 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\RouteCollectionBuilder; + +class RouteCollectionBuilderTest extends TestCase +{ + public function testImport() + { + $resolvedLoader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock(); + $resolver->expects($this->once()) + ->method('resolve') + ->with('admin_routing.yml', 'yaml') + ->will($this->returnValue($resolvedLoader)); + + $originalRoute = new Route('/foo/path'); + $expectedCollection = new RouteCollection(); + $expectedCollection->add('one_test_route', $originalRoute); + $expectedCollection->addResource(new FileResource(__DIR__.'/Fixtures/file_resource.yml')); + + $resolvedLoader + ->expects($this->once()) + ->method('load') + ->with('admin_routing.yml', 'yaml') + ->will($this->returnValue($expectedCollection)); + + $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + $loader->expects($this->any()) + ->method('getResolver') + ->will($this->returnValue($resolver)); + + // import the file! + $routes = new RouteCollectionBuilder($loader); + $importedRoutes = $routes->import('admin_routing.yml', '/', 'yaml'); + + // we should get back a RouteCollectionBuilder + $this->assertInstanceOf('Symfony\Component\Routing\RouteCollectionBuilder', $importedRoutes); + + // get the collection back so we can look at it + $addedCollection = $importedRoutes->build(); + $route = $addedCollection->get('one_test_route'); + $this->assertSame($originalRoute, $route); + // should return file_resource.yml, which is in the original collection + $this->assertCount(1, $addedCollection->getResources()); + + // make sure the routes were imported into the top-level builder + $this->assertCount(1, $routes->build()); + } + + /** + * @expectedException \BadMethodCallException + */ + public function testImportWithoutLoaderThrowsException() + { + $collectionBuilder = new RouteCollectionBuilder(); + $collectionBuilder->import('routing.yml'); + } + + public function testAdd() + { + $collectionBuilder = new RouteCollectionBuilder(); + + $addedRoute = $collectionBuilder->add('/checkout', 'AppBundle:Order:checkout'); + $addedRoute2 = $collectionBuilder->add('/blogs', 'AppBundle:Blog:list', 'blog_list'); + $this->assertInstanceOf('Symfony\Component\Routing\Route', $addedRoute); + $this->assertEquals('AppBundle:Order:checkout', $addedRoute->getDefault('_controller')); + + $finalCollection = $collectionBuilder->build(); + $this->assertSame($addedRoute2, $finalCollection->get('blog_list')); + } + + public function testFlushOrdering() + { + $importedCollection = new RouteCollection(); + $importedCollection->add('imported_route1', new Route('/imported/foo1')); + $importedCollection->add('imported_route2', new Route('/imported/foo2')); + + $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + // make this loader able to do the import - keeps mocking simple + $loader->expects($this->any()) + ->method('supports') + ->will($this->returnValue(true)); + $loader + ->expects($this->once()) + ->method('load') + ->will($this->returnValue($importedCollection)); + + $routes = new RouteCollectionBuilder($loader); + + // 1) Add a route + $routes->add('/checkout', 'AppBundle:Order:checkout', 'checkout_route'); + // 2) Import from a file + $routes->mount('/', $routes->import('admin_routing.yml')); + // 3) Add another route + $routes->add('/', 'AppBundle:Default:homepage', 'homepage'); + // 4) Add another route + $routes->add('/admin', 'AppBundle:Admin:dashboard', 'admin_dashboard'); + + // set a default value + $routes->setDefault('_locale', 'fr'); + + $actualCollection = $routes->build(); + + $this->assertCount(5, $actualCollection); + $actualRouteNames = array_keys($actualCollection->all()); + $this->assertEquals(array( + 'checkout_route', + 'imported_route1', + 'imported_route2', + 'homepage', + 'admin_dashboard', + ), $actualRouteNames); + + // make sure the defaults were set + $checkoutRoute = $actualCollection->get('checkout_route'); + $defaults = $checkoutRoute->getDefaults(); + $this->assertArrayHasKey('_locale', $defaults); + $this->assertEquals('fr', $defaults['_locale']); + } + + public function testFlushSetsRouteNames() + { + $collectionBuilder = new RouteCollectionBuilder(); + + // add a "named" route + $collectionBuilder->add('/admin', 'AppBundle:Admin:dashboard', 'admin_dashboard'); + // add an unnamed route + $collectionBuilder->add('/blogs', 'AppBundle:Blog:list') + ->setMethods(array('GET')); + + // integer route names are allowed - they don't confuse things + $collectionBuilder->add('/products', 'AppBundle:Product:list', 100); + + $actualCollection = $collectionBuilder->build(); + $actualRouteNames = array_keys($actualCollection->all()); + $this->assertEquals(array( + 'admin_dashboard', + 'GET_blogs', + '100', + ), $actualRouteNames); + } + + public function testFlushSetsDetailsOnChildrenRoutes() + { + $routes = new RouteCollectionBuilder(); + + $routes->add('/blogs/{page}', 'listAction', 'blog_list') + // unique things for the route + ->setDefault('page', 1) + ->setRequirement('id', '\d+') + ->setOption('expose', true) + // things that the collection will try to override (but won't) + ->setDefault('_format', 'html') + ->setRequirement('_format', 'json|xml') + ->setOption('fooBar', true) + ->setHost('example.com') + ->setCondition('request.isSecure()') + ->setSchemes(array('https')) + ->setMethods(array('POST')); + + // a simple route, nothing added to it + $routes->add('/blogs/{id}', 'editAction', 'blog_edit'); + + // configure the collection itself + $routes + // things that will not override the child route + ->setDefault('_format', 'json') + ->setRequirement('_format', 'xml') + ->setOption('fooBar', false) + ->setHost('symfony.com') + ->setCondition('request.query.get("page")==1') + // some unique things that should be set on the child + ->setDefault('_locale', 'fr') + ->setRequirement('_locale', 'fr|en') + ->setOption('niceRoute', true) + ->setSchemes(array('http')) + ->setMethods(array('GET', 'POST')); + + $collection = $routes->build(); + $actualListRoute = $collection->get('blog_list'); + + $this->assertEquals(1, $actualListRoute->getDefault('page')); + $this->assertEquals('\d+', $actualListRoute->getRequirement('id')); + $this->assertTrue($actualListRoute->getOption('expose')); + // none of these should be overridden + $this->assertEquals('html', $actualListRoute->getDefault('_format')); + $this->assertEquals('json|xml', $actualListRoute->getRequirement('_format')); + $this->assertTrue($actualListRoute->getOption('fooBar')); + $this->assertEquals('example.com', $actualListRoute->getHost()); + $this->assertEquals('request.isSecure()', $actualListRoute->getCondition()); + $this->assertEquals(array('https'), $actualListRoute->getSchemes()); + $this->assertEquals(array('POST'), $actualListRoute->getMethods()); + // inherited from the main collection + $this->assertEquals('fr', $actualListRoute->getDefault('_locale')); + $this->assertEquals('fr|en', $actualListRoute->getRequirement('_locale')); + $this->assertTrue($actualListRoute->getOption('niceRoute')); + + $actualEditRoute = $collection->get('blog_edit'); + // inherited from the collection + $this->assertEquals('symfony.com', $actualEditRoute->getHost()); + $this->assertEquals('request.query.get("page")==1', $actualEditRoute->getCondition()); + $this->assertEquals(array('http'), $actualEditRoute->getSchemes()); + $this->assertEquals(array('GET', 'POST'), $actualEditRoute->getMethods()); + } + + /** + * @dataProvider providePrefixTests + */ + public function testFlushPrefixesPaths($collectionPrefix, $routePath, $expectedPath) + { + $routes = new RouteCollectionBuilder(); + + $routes->add($routePath, 'someController', 'test_route'); + + $outerRoutes = new RouteCollectionBuilder(); + $outerRoutes->mount($collectionPrefix, $routes); + + $collection = $outerRoutes->build(); + + $this->assertEquals($expectedPath, $collection->get('test_route')->getPath()); + } + + public function providePrefixTests() + { + $tests = array(); + // empty prefix is of course ok + $tests[] = array('', '/foo', '/foo'); + // normal prefix - does not matter if it's a wildcard + $tests[] = array('/{admin}', '/foo', '/{admin}/foo'); + // shows that a prefix will always be given the starting slash + $tests[] = array('0', '/foo', '/0/foo'); + + // spaces are ok, and double slahses at the end are cleaned + $tests[] = array('/ /', '/foo', '/ /foo'); + + return $tests; + } + + public function testFlushSetsPrefixedWithMultipleLevels() + { + $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + $routes = new RouteCollectionBuilder($loader); + + $routes->add('homepage', 'MainController::homepageAction', 'homepage'); + + $adminRoutes = $routes->createBuilder(); + $adminRoutes->add('/dashboard', 'AdminController::dashboardAction', 'admin_dashboard'); + + // embedded collection under /admin + $adminBlogRoutes = $routes->createBuilder(); + $adminBlogRoutes->add('/new', 'BlogController::newAction', 'admin_blog_new'); + // mount into admin, but before the parent collection has been mounted + $adminRoutes->mount('/blog', $adminBlogRoutes); + + // now mount the /admin routes, above should all still be /blog/admin + $routes->mount('/admin', $adminRoutes); + // add a route after mounting + $adminRoutes->add('/users', 'AdminController::userAction', 'admin_users'); + + // add another sub-collection after the mount + $otherAdminRoutes = $routes->createBuilder(); + $otherAdminRoutes->add('/sales', 'StatsController::indexAction', 'admin_stats_sales'); + $adminRoutes->mount('/stats', $otherAdminRoutes); + + // add a normal collection and see that it is also prefixed + $importedCollection = new RouteCollection(); + $importedCollection->add('imported_route', new Route('/foo')); + // make this loader able to do the import - keeps mocking simple + $loader->expects($this->any()) + ->method('supports') + ->will($this->returnValue(true)); + $loader + ->expects($this->any()) + ->method('load') + ->will($this->returnValue($importedCollection)); + // import this from the /admin route builder + $adminRoutes->import('admin.yml', '/imported'); + + $collection = $routes->build(); + $this->assertEquals('/admin/dashboard', $collection->get('admin_dashboard')->getPath(), 'Routes before mounting have the prefix'); + $this->assertEquals('/admin/users', $collection->get('admin_users')->getPath(), 'Routes after mounting have the prefix'); + $this->assertEquals('/admin/blog/new', $collection->get('admin_blog_new')->getPath(), 'Sub-collections receive prefix even if mounted before parent prefix'); + $this->assertEquals('/admin/stats/sales', $collection->get('admin_stats_sales')->getPath(), 'Sub-collections receive prefix if mounted after parent prefix'); + $this->assertEquals('/admin/imported/foo', $collection->get('imported_route')->getPath(), 'Normal RouteCollections are also prefixed properly'); + } + + public function testAutomaticRouteNamesDoNotConflict() + { + $routes = new RouteCollectionBuilder(); + + $adminRoutes = $routes->createBuilder(); + // route 1 + $adminRoutes->add('/dashboard', ''); + + $accountRoutes = $routes->createBuilder(); + // route 2 + $accountRoutes->add('/dashboard', '') + ->setMethods(array('GET')); + // route 3 + $accountRoutes->add('/dashboard', '') + ->setMethods(array('POST')); + + $routes->mount('/admin', $adminRoutes); + $routes->mount('/account', $accountRoutes); + + $collection = $routes->build(); + // there are 2 routes (i.e. with non-conflicting names) + $this->assertCount(3, $collection->all()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..83457ff14a7bfee791a243e612f5778abe9961a7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php @@ -0,0 +1,305 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\Routing\Route; +use Symfony\Component\Config\Resource\FileResource; + +class RouteCollectionTest extends TestCase +{ + public function testRoute() + { + $collection = new RouteCollection(); + $route = new Route('/foo'); + $collection->add('foo', $route); + $this->assertEquals(array('foo' => $route), $collection->all(), '->add() adds a route'); + $this->assertEquals($route, $collection->get('foo'), '->get() returns a route by name'); + $this->assertNull($collection->get('bar'), '->get() returns null if a route does not exist'); + } + + public function testOverriddenRoute() + { + $collection = new RouteCollection(); + $collection->add('foo', new Route('/foo')); + $collection->add('foo', new Route('/foo1')); + + $this->assertEquals('/foo1', $collection->get('foo')->getPath()); + } + + public function testDeepOverriddenRoute() + { + $collection = new RouteCollection(); + $collection->add('foo', new Route('/foo')); + + $collection1 = new RouteCollection(); + $collection1->add('foo', new Route('/foo1')); + + $collection2 = new RouteCollection(); + $collection2->add('foo', new Route('/foo2')); + + $collection1->addCollection($collection2); + $collection->addCollection($collection1); + + $this->assertEquals('/foo2', $collection1->get('foo')->getPath()); + $this->assertEquals('/foo2', $collection->get('foo')->getPath()); + } + + public function testIterator() + { + $collection = new RouteCollection(); + $collection->add('foo', new Route('/foo')); + + $collection1 = new RouteCollection(); + $collection1->add('bar', $bar = new Route('/bar')); + $collection1->add('foo', $foo = new Route('/foo-new')); + $collection->addCollection($collection1); + $collection->add('last', $last = new Route('/last')); + + $this->assertInstanceOf('\ArrayIterator', $collection->getIterator()); + $this->assertSame(array('bar' => $bar, 'foo' => $foo, 'last' => $last), $collection->getIterator()->getArrayCopy()); + } + + public function testCount() + { + $collection = new RouteCollection(); + $collection->add('foo', new Route('/foo')); + + $collection1 = new RouteCollection(); + $collection1->add('bar', new Route('/bar')); + $collection->addCollection($collection1); + + $this->assertCount(2, $collection); + } + + public function testAddCollection() + { + $collection = new RouteCollection(); + $collection->add('foo', new Route('/foo')); + + $collection1 = new RouteCollection(); + $collection1->add('bar', $bar = new Route('/bar')); + $collection1->add('foo', $foo = new Route('/foo-new')); + + $collection2 = new RouteCollection(); + $collection2->add('grandchild', $grandchild = new Route('/grandchild')); + + $collection1->addCollection($collection2); + $collection->addCollection($collection1); + $collection->add('last', $last = new Route('/last')); + + $this->assertSame(array('bar' => $bar, 'foo' => $foo, 'grandchild' => $grandchild, 'last' => $last), $collection->all(), + '->addCollection() imports routes of another collection, overrides if necessary and adds them at the end'); + } + + public function testAddCollectionWithResources() + { + $collection = new RouteCollection(); + $collection->addResource($foo = new FileResource(__DIR__.'/Fixtures/foo.xml')); + $collection1 = new RouteCollection(); + $collection1->addResource($foo1 = new FileResource(__DIR__.'/Fixtures/foo1.xml')); + $collection->addCollection($collection1); + $this->assertEquals(array($foo, $foo1), $collection->getResources(), '->addCollection() merges resources'); + } + + public function testAddDefaultsAndRequirementsAndOptions() + { + $collection = new RouteCollection(); + $collection->add('foo', new Route('/{placeholder}')); + $collection1 = new RouteCollection(); + $collection1->add('bar', new Route('/{placeholder}', + array('_controller' => 'fixed', 'placeholder' => 'default'), array('placeholder' => '.+'), array('option' => 'value')) + ); + $collection->addCollection($collection1); + + $collection->addDefaults(array('placeholder' => 'new-default')); + $this->assertEquals(array('placeholder' => 'new-default'), $collection->get('foo')->getDefaults(), '->addDefaults() adds defaults to all routes'); + $this->assertEquals(array('_controller' => 'fixed', 'placeholder' => 'new-default'), $collection->get('bar')->getDefaults(), + '->addDefaults() adds defaults to all routes and overwrites existing ones'); + + $collection->addRequirements(array('placeholder' => '\d+')); + $this->assertEquals(array('placeholder' => '\d+'), $collection->get('foo')->getRequirements(), '->addRequirements() adds requirements to all routes'); + $this->assertEquals(array('placeholder' => '\d+'), $collection->get('bar')->getRequirements(), + '->addRequirements() adds requirements to all routes and overwrites existing ones'); + + $collection->addOptions(array('option' => 'new-value')); + $this->assertEquals( + array('option' => 'new-value', 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler'), + $collection->get('bar')->getOptions(), '->addOptions() adds options to all routes and overwrites existing ones' + ); + } + + public function testAddPrefix() + { + $collection = new RouteCollection(); + $collection->add('foo', $foo = new Route('/foo')); + $collection2 = new RouteCollection(); + $collection2->add('bar', $bar = new Route('/bar')); + $collection->addCollection($collection2); + $collection->addPrefix(' / '); + $this->assertSame('/foo', $collection->get('foo')->getPath(), '->addPrefix() trims the prefix and a single slash has no effect'); + $collection->addPrefix('/{admin}', array('admin' => 'admin'), array('admin' => '\d+')); + $this->assertEquals('/{admin}/foo', $collection->get('foo')->getPath(), '->addPrefix() adds a prefix to all routes'); + $this->assertEquals('/{admin}/bar', $collection->get('bar')->getPath(), '->addPrefix() adds a prefix to all routes'); + $this->assertEquals(array('admin' => 'admin'), $collection->get('foo')->getDefaults(), '->addPrefix() adds defaults to all routes'); + $this->assertEquals(array('admin' => 'admin'), $collection->get('bar')->getDefaults(), '->addPrefix() adds defaults to all routes'); + $this->assertEquals(array('admin' => '\d+'), $collection->get('foo')->getRequirements(), '->addPrefix() adds requirements to all routes'); + $this->assertEquals(array('admin' => '\d+'), $collection->get('bar')->getRequirements(), '->addPrefix() adds requirements to all routes'); + $collection->addPrefix('0'); + $this->assertEquals('/0/{admin}/foo', $collection->get('foo')->getPath(), '->addPrefix() ensures a prefix must start with a slash and must not end with a slash'); + $collection->addPrefix('/ /'); + $this->assertSame('/ /0/{admin}/foo', $collection->get('foo')->getPath(), '->addPrefix() can handle spaces if desired'); + $this->assertSame('/ /0/{admin}/bar', $collection->get('bar')->getPath(), 'the route pattern of an added collection is in synch with the added prefix'); + } + + public function testAddPrefixOverridesDefaultsAndRequirements() + { + $collection = new RouteCollection(); + $collection->add('foo', $foo = new Route('/foo.{_format}')); + $collection->add('bar', $bar = new Route('/bar.{_format}', array(), array('_format' => 'json'))); + $collection->addPrefix('/admin', array(), array('_format' => 'html')); + + $this->assertEquals('html', $collection->get('foo')->getRequirement('_format'), '->addPrefix() overrides existing requirements'); + $this->assertEquals('html', $collection->get('bar')->getRequirement('_format'), '->addPrefix() overrides existing requirements'); + } + + public function testResource() + { + $collection = new RouteCollection(); + $collection->addResource($foo = new FileResource(__DIR__.'/Fixtures/foo.xml')); + $collection->addResource($bar = new FileResource(__DIR__.'/Fixtures/bar.xml')); + $collection->addResource(new FileResource(__DIR__.'/Fixtures/foo.xml')); + + $this->assertEquals(array($foo, $bar), $collection->getResources(), + '->addResource() adds a resource and getResources() only returns unique ones by comparing the string representation'); + } + + public function testUniqueRouteWithGivenName() + { + $collection1 = new RouteCollection(); + $collection1->add('foo', new Route('/old')); + $collection2 = new RouteCollection(); + $collection3 = new RouteCollection(); + $collection3->add('foo', $new = new Route('/new')); + + $collection2->addCollection($collection3); + $collection1->addCollection($collection2); + + $this->assertSame($new, $collection1->get('foo'), '->get() returns new route that overrode previous one'); + // size of 1 because collection1 contains /new but not /old anymore + $this->assertCount(1, $collection1->getIterator(), '->addCollection() removes previous routes when adding new routes with the same name'); + } + + public function testGet() + { + $collection1 = new RouteCollection(); + $collection1->add('a', $a = new Route('/a')); + $collection2 = new RouteCollection(); + $collection2->add('b', $b = new Route('/b')); + $collection1->addCollection($collection2); + $collection1->add('$péß^a|', $c = new Route('/special')); + + $this->assertSame($b, $collection1->get('b'), '->get() returns correct route in child collection'); + $this->assertSame($c, $collection1->get('$péß^a|'), '->get() can handle special characters'); + $this->assertNull($collection2->get('a'), '->get() does not return the route defined in parent collection'); + $this->assertNull($collection1->get('non-existent'), '->get() returns null when route does not exist'); + $this->assertNull($collection1->get(0), '->get() does not disclose internal child RouteCollection'); + } + + public function testRemove() + { + $collection = new RouteCollection(); + $collection->add('foo', $foo = new Route('/foo')); + + $collection1 = new RouteCollection(); + $collection1->add('bar', $bar = new Route('/bar')); + $collection->addCollection($collection1); + $collection->add('last', $last = new Route('/last')); + + $collection->remove('foo'); + $this->assertSame(array('bar' => $bar, 'last' => $last), $collection->all(), '->remove() can remove a single route'); + $collection->remove(array('bar', 'last')); + $this->assertSame(array(), $collection->all(), '->remove() accepts an array and can remove multiple routes at once'); + } + + public function testSetHost() + { + $collection = new RouteCollection(); + $routea = new Route('/a'); + $routeb = new Route('/b', array(), array(), array(), '{locale}.example.net'); + $collection->add('a', $routea); + $collection->add('b', $routeb); + + $collection->setHost('{locale}.example.com'); + + $this->assertEquals('{locale}.example.com', $routea->getHost()); + $this->assertEquals('{locale}.example.com', $routeb->getHost()); + } + + public function testSetCondition() + { + $collection = new RouteCollection(); + $routea = new Route('/a'); + $routeb = new Route('/b', array(), array(), array(), '{locale}.example.net', array(), array(), 'context.getMethod() == "GET"'); + $collection->add('a', $routea); + $collection->add('b', $routeb); + + $collection->setCondition('context.getMethod() == "POST"'); + + $this->assertEquals('context.getMethod() == "POST"', $routea->getCondition()); + $this->assertEquals('context.getMethod() == "POST"', $routeb->getCondition()); + } + + public function testClone() + { + $collection = new RouteCollection(); + $collection->add('a', new Route('/a')); + $collection->add('b', new Route('/b', array('placeholder' => 'default'), array('placeholder' => '.+'))); + + $clonedCollection = clone $collection; + + $this->assertCount(2, $clonedCollection); + $this->assertEquals($collection->get('a'), $clonedCollection->get('a')); + $this->assertNotSame($collection->get('a'), $clonedCollection->get('a')); + $this->assertEquals($collection->get('b'), $clonedCollection->get('b')); + $this->assertNotSame($collection->get('b'), $clonedCollection->get('b')); + } + + public function testSetSchemes() + { + $collection = new RouteCollection(); + $routea = new Route('/a', array(), array(), array(), '', 'http'); + $routeb = new Route('/b'); + $collection->add('a', $routea); + $collection->add('b', $routeb); + + $collection->setSchemes(array('http', 'https')); + + $this->assertEquals(array('http', 'https'), $routea->getSchemes()); + $this->assertEquals(array('http', 'https'), $routeb->getSchemes()); + } + + public function testSetMethods() + { + $collection = new RouteCollection(); + $routea = new Route('/a', array(), array(), array(), '', array(), array('GET', 'POST')); + $routeb = new Route('/b'); + $collection->add('a', $routea); + $collection->add('b', $routeb); + + $collection->setMethods('PUT'); + + $this->assertEquals(array('PUT'), $routea->getMethods()); + $this->assertEquals(array('PUT'), $routeb->getMethods()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f2dbe8f412313b368315f216754bf1c92589ccdb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php @@ -0,0 +1,389 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCompiler; + +class RouteCompilerTest extends TestCase +{ + /** + * @dataProvider provideCompileData + */ + public function testCompile($name, $arguments, $prefix, $regex, $variables, $tokens) + { + $r = new \ReflectionClass('Symfony\\Component\\Routing\\Route'); + $route = $r->newInstanceArgs($arguments); + + $compiled = $route->compile(); + $this->assertEquals($prefix, $compiled->getStaticPrefix(), $name.' (static prefix)'); + $this->assertEquals($regex, $compiled->getRegex(), $name.' (regex)'); + $this->assertEquals($variables, $compiled->getVariables(), $name.' (variables)'); + $this->assertEquals($tokens, $compiled->getTokens(), $name.' (tokens)'); + } + + public function provideCompileData() + { + return array( + array( + 'Static route', + array('/foo'), + '/foo', '#^/foo$#s', array(), array( + array('text', '/foo'), + ), + ), + + array( + 'Route with a variable', + array('/foo/{bar}'), + '/foo', '#^/foo/(?P[^/]++)$#s', array('bar'), array( + array('variable', '/', '[^/]++', 'bar'), + array('text', '/foo'), + ), + ), + + array( + 'Route with a variable that has a default value', + array('/foo/{bar}', array('bar' => 'bar')), + '/foo', '#^/foo(?:/(?P[^/]++))?$#s', array('bar'), array( + array('variable', '/', '[^/]++', 'bar'), + array('text', '/foo'), + ), + ), + + array( + 'Route with several variables', + array('/foo/{bar}/{foobar}'), + '/foo', '#^/foo/(?P[^/]++)/(?P[^/]++)$#s', array('bar', 'foobar'), array( + array('variable', '/', '[^/]++', 'foobar'), + array('variable', '/', '[^/]++', 'bar'), + array('text', '/foo'), + ), + ), + + array( + 'Route with several variables that have default values', + array('/foo/{bar}/{foobar}', array('bar' => 'bar', 'foobar' => '')), + '/foo', '#^/foo(?:/(?P[^/]++)(?:/(?P[^/]++))?)?$#s', array('bar', 'foobar'), array( + array('variable', '/', '[^/]++', 'foobar'), + array('variable', '/', '[^/]++', 'bar'), + array('text', '/foo'), + ), + ), + + array( + 'Route with several variables but some of them have no default values', + array('/foo/{bar}/{foobar}', array('bar' => 'bar')), + '/foo', '#^/foo/(?P[^/]++)/(?P[^/]++)$#s', array('bar', 'foobar'), array( + array('variable', '/', '[^/]++', 'foobar'), + array('variable', '/', '[^/]++', 'bar'), + array('text', '/foo'), + ), + ), + + array( + 'Route with an optional variable as the first segment', + array('/{bar}', array('bar' => 'bar')), + '', '#^/(?P[^/]++)?$#s', array('bar'), array( + array('variable', '/', '[^/]++', 'bar'), + ), + ), + + array( + 'Route with a requirement of 0', + array('/{bar}', array('bar' => null), array('bar' => '0')), + '', '#^/(?P0)?$#s', array('bar'), array( + array('variable', '/', '0', 'bar'), + ), + ), + + array( + 'Route with an optional variable as the first segment with requirements', + array('/{bar}', array('bar' => 'bar'), array('bar' => '(foo|bar)')), + '', '#^/(?P(foo|bar))?$#s', array('bar'), array( + array('variable', '/', '(foo|bar)', 'bar'), + ), + ), + + array( + 'Route with only optional variables', + array('/{foo}/{bar}', array('foo' => 'foo', 'bar' => 'bar')), + '', '#^/(?P[^/]++)?(?:/(?P[^/]++))?$#s', array('foo', 'bar'), array( + array('variable', '/', '[^/]++', 'bar'), + array('variable', '/', '[^/]++', 'foo'), + ), + ), + + array( + 'Route with a variable in last position', + array('/foo-{bar}'), + '/foo', '#^/foo\-(?P[^/]++)$#s', array('bar'), array( + array('variable', '-', '[^/]++', 'bar'), + array('text', '/foo'), + ), + ), + + array( + 'Route with nested placeholders', + array('/{static{var}static}'), + '/{static', '#^/\{static(?P[^/]+)static\}$#s', array('var'), array( + array('text', 'static}'), + array('variable', '', '[^/]+', 'var'), + array('text', '/{static'), + ), + ), + + array( + 'Route without separator between variables', + array('/{w}{x}{y}{z}.{_format}', array('z' => 'default-z', '_format' => 'html'), array('y' => '(y|Y)')), + '', '#^/(?P[^/\.]+)(?P[^/\.]+)(?P(y|Y))(?:(?P[^/\.]++)(?:\.(?P<_format>[^/]++))?)?$#s', array('w', 'x', 'y', 'z', '_format'), array( + array('variable', '.', '[^/]++', '_format'), + array('variable', '', '[^/\.]++', 'z'), + array('variable', '', '(y|Y)', 'y'), + array('variable', '', '[^/\.]+', 'x'), + array('variable', '/', '[^/\.]+', 'w'), + ), + ), + + array( + 'Route with a format', + array('/foo/{bar}.{_format}'), + '/foo', '#^/foo/(?P[^/\.]++)\.(?P<_format>[^/]++)$#s', array('bar', '_format'), array( + array('variable', '.', '[^/]++', '_format'), + array('variable', '/', '[^/\.]++', 'bar'), + array('text', '/foo'), + ), + ), + + array( + 'Static non UTF-8 route', + array("/fo\xE9"), + "/fo\xE9", "#^/fo\xE9$#s", array(), array( + array('text', "/fo\xE9"), + ), + ), + + array( + 'Route with an explicit UTF-8 requirement', + array('/{bar}', array('bar' => null), array('bar' => '.'), array('utf8' => true)), + '', '#^/(?P.)?$#su', array('bar'), array( + array('variable', '/', '.', 'bar', true), + ), + ), + ); + } + + /** + * @group legacy + * @dataProvider provideCompileImplicitUtf8Data + * @expectedDeprecation Using UTF-8 route %s without setting the "utf8" option is deprecated %s. + */ + public function testCompileImplicitUtf8Data($name, $arguments, $prefix, $regex, $variables, $tokens, $deprecationType) + { + $r = new \ReflectionClass('Symfony\\Component\\Routing\\Route'); + $route = $r->newInstanceArgs($arguments); + + $compiled = $route->compile(); + $this->assertEquals($prefix, $compiled->getStaticPrefix(), $name.' (static prefix)'); + $this->assertEquals($regex, $compiled->getRegex(), $name.' (regex)'); + $this->assertEquals($variables, $compiled->getVariables(), $name.' (variables)'); + $this->assertEquals($tokens, $compiled->getTokens(), $name.' (tokens)'); + } + + public function provideCompileImplicitUtf8Data() + { + return array( + array( + 'Static UTF-8 route', + array('/foé'), + '/foé', '#^/foé$#su', array(), array( + array('text', '/foé'), + ), + 'patterns', + ), + + array( + 'Route with an implicit UTF-8 requirement', + array('/{bar}', array('bar' => null), array('bar' => 'é')), + '', '#^/(?Pé)?$#su', array('bar'), array( + array('variable', '/', 'é', 'bar', true), + ), + 'requirements', + ), + + array( + 'Route with a UTF-8 class requirement', + array('/{bar}', array('bar' => null), array('bar' => '\pM')), + '', '#^/(?P\pM)?$#su', array('bar'), array( + array('variable', '/', '\pM', 'bar', true), + ), + 'requirements', + ), + + array( + 'Route with a UTF-8 separator', + array('/foo/{bar}§{_format}', array(), array(), array('compiler_class' => Utf8RouteCompiler::class)), + '/foo', '#^/foo/(?P[^/§]++)§(?P<_format>[^/]++)$#su', array('bar', '_format'), array( + array('variable', '§', '[^/]++', '_format', true), + array('variable', '/', '[^/§]++', 'bar', true), + array('text', '/foo'), + ), + 'patterns', + ), + ); + } + + /** + * @expectedException \LogicException + */ + public function testRouteWithSameVariableTwice() + { + $route = new Route('/{name}/{name}'); + + $compiled = $route->compile(); + } + + /** + * @expectedException \LogicException + */ + public function testRouteCharsetMismatch() + { + $route = new Route("/\xE9/{bar}", array(), array('bar' => '.'), array('utf8' => true)); + + $compiled = $route->compile(); + } + + /** + * @expectedException \LogicException + */ + public function testRequirementCharsetMismatch() + { + $route = new Route('/foo/{bar}', array(), array('bar' => "\xE9"), array('utf8' => true)); + + $compiled = $route->compile(); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testRouteWithFragmentAsPathParameter() + { + $route = new Route('/{_fragment}'); + + $compiled = $route->compile(); + } + + /** + * @dataProvider getVariableNamesStartingWithADigit + * @expectedException \DomainException + */ + public function testRouteWithVariableNameStartingWithADigit($name) + { + $route = new Route('/{'.$name.'}'); + $route->compile(); + } + + public function getVariableNamesStartingWithADigit() + { + return array( + array('09'), + array('123'), + array('1e2'), + ); + } + + /** + * @dataProvider provideCompileWithHostData + */ + public function testCompileWithHost($name, $arguments, $prefix, $regex, $variables, $pathVariables, $tokens, $hostRegex, $hostVariables, $hostTokens) + { + $r = new \ReflectionClass('Symfony\\Component\\Routing\\Route'); + $route = $r->newInstanceArgs($arguments); + + $compiled = $route->compile(); + $this->assertEquals($prefix, $compiled->getStaticPrefix(), $name.' (static prefix)'); + $this->assertEquals($regex, str_replace(array("\n", ' '), '', $compiled->getRegex()), $name.' (regex)'); + $this->assertEquals($variables, $compiled->getVariables(), $name.' (variables)'); + $this->assertEquals($pathVariables, $compiled->getPathVariables(), $name.' (path variables)'); + $this->assertEquals($tokens, $compiled->getTokens(), $name.' (tokens)'); + $this->assertEquals($hostRegex, str_replace(array("\n", ' '), '', $compiled->getHostRegex()), $name.' (host regex)'); + $this->assertEquals($hostVariables, $compiled->getHostVariables(), $name.' (host variables)'); + $this->assertEquals($hostTokens, $compiled->getHostTokens(), $name.' (host tokens)'); + } + + public function provideCompileWithHostData() + { + return array( + array( + 'Route with host pattern', + array('/hello', array(), array(), array(), 'www.example.com'), + '/hello', '#^/hello$#s', array(), array(), array( + array('text', '/hello'), + ), + '#^www\.example\.com$#si', array(), array( + array('text', 'www.example.com'), + ), + ), + array( + 'Route with host pattern and some variables', + array('/hello/{name}', array(), array(), array(), 'www.example.{tld}'), + '/hello', '#^/hello/(?P[^/]++)$#s', array('tld', 'name'), array('name'), array( + array('variable', '/', '[^/]++', 'name'), + array('text', '/hello'), + ), + '#^www\.example\.(?P[^\.]++)$#si', array('tld'), array( + array('variable', '.', '[^\.]++', 'tld'), + array('text', 'www.example'), + ), + ), + array( + 'Route with variable at beginning of host', + array('/hello', array(), array(), array(), '{locale}.example.{tld}'), + '/hello', '#^/hello$#s', array('locale', 'tld'), array(), array( + array('text', '/hello'), + ), + '#^(?P[^\.]++)\.example\.(?P[^\.]++)$#si', array('locale', 'tld'), array( + array('variable', '.', '[^\.]++', 'tld'), + array('text', '.example'), + array('variable', '', '[^\.]++', 'locale'), + ), + ), + array( + 'Route with host variables that has a default value', + array('/hello', array('locale' => 'a', 'tld' => 'b'), array(), array(), '{locale}.example.{tld}'), + '/hello', '#^/hello$#s', array('locale', 'tld'), array(), array( + array('text', '/hello'), + ), + '#^(?P[^\.]++)\.example\.(?P[^\.]++)$#si', array('locale', 'tld'), array( + array('variable', '.', '[^\.]++', 'tld'), + array('text', '.example'), + array('variable', '', '[^\.]++', 'locale'), + ), + ), + ); + } + + /** + * @expectedException \DomainException + */ + public function testRouteWithTooLongVariableName() + { + $route = new Route(sprintf('/{%s}', str_repeat('a', RouteCompiler::VARIABLE_MAXIMUM_LENGTH + 1))); + $route->compile(); + } +} + +class Utf8RouteCompiler extends RouteCompiler +{ + const SEPARATORS = '/§'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b65dfb54085c14caa03a54df6202da29eeb2dd97 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouteTest.php @@ -0,0 +1,240 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Route; + +class RouteTest extends TestCase +{ + public function testConstructor() + { + $route = new Route('/{foo}', array('foo' => 'bar'), array('foo' => '\d+'), array('foo' => 'bar'), '{locale}.example.com'); + $this->assertEquals('/{foo}', $route->getPath(), '__construct() takes a path as its first argument'); + $this->assertEquals(array('foo' => 'bar'), $route->getDefaults(), '__construct() takes defaults as its second argument'); + $this->assertEquals(array('foo' => '\d+'), $route->getRequirements(), '__construct() takes requirements as its third argument'); + $this->assertEquals('bar', $route->getOption('foo'), '__construct() takes options as its fourth argument'); + $this->assertEquals('{locale}.example.com', $route->getHost(), '__construct() takes a host pattern as its fifth argument'); + + $route = new Route('/', array(), array(), array(), '', array('Https'), array('POST', 'put'), 'context.getMethod() == "GET"'); + $this->assertEquals(array('https'), $route->getSchemes(), '__construct() takes schemes as its sixth argument and lowercases it'); + $this->assertEquals(array('POST', 'PUT'), $route->getMethods(), '__construct() takes methods as its seventh argument and uppercases it'); + $this->assertEquals('context.getMethod() == "GET"', $route->getCondition(), '__construct() takes a condition as its eight argument'); + + $route = new Route('/', array(), array(), array(), '', 'Https', 'Post'); + $this->assertEquals(array('https'), $route->getSchemes(), '__construct() takes a single scheme as its sixth argument'); + $this->assertEquals(array('POST'), $route->getMethods(), '__construct() takes a single method as its seventh argument'); + } + + public function testPath() + { + $route = new Route('/{foo}'); + $route->setPath('/{bar}'); + $this->assertEquals('/{bar}', $route->getPath(), '->setPath() sets the path'); + $route->setPath(''); + $this->assertEquals('/', $route->getPath(), '->setPath() adds a / at the beginning of the path if needed'); + $route->setPath('bar'); + $this->assertEquals('/bar', $route->getPath(), '->setPath() adds a / at the beginning of the path if needed'); + $this->assertEquals($route, $route->setPath(''), '->setPath() implements a fluent interface'); + $route->setPath('//path'); + $this->assertEquals('/path', $route->getPath(), '->setPath() does not allow two slashes "//" at the beginning of the path as it would be confused with a network path when generating the path from the route'); + } + + public function testOptions() + { + $route = new Route('/{foo}'); + $route->setOptions(array('foo' => 'bar')); + $this->assertEquals(array_merge(array( + 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', + ), array('foo' => 'bar')), $route->getOptions(), '->setOptions() sets the options'); + $this->assertEquals($route, $route->setOptions(array()), '->setOptions() implements a fluent interface'); + + $route->setOptions(array('foo' => 'foo')); + $route->addOptions(array('bar' => 'bar')); + $this->assertEquals($route, $route->addOptions(array()), '->addOptions() implements a fluent interface'); + $this->assertEquals(array('foo' => 'foo', 'bar' => 'bar', 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler'), $route->getOptions(), '->addDefaults() keep previous defaults'); + } + + public function testOption() + { + $route = new Route('/{foo}'); + $this->assertFalse($route->hasOption('foo'), '->hasOption() return false if option is not set'); + $this->assertEquals($route, $route->setOption('foo', 'bar'), '->setOption() implements a fluent interface'); + $this->assertEquals('bar', $route->getOption('foo'), '->setOption() sets the option'); + $this->assertTrue($route->hasOption('foo'), '->hasOption() return true if option is set'); + } + + public function testDefaults() + { + $route = new Route('/{foo}'); + $route->setDefaults(array('foo' => 'bar')); + $this->assertEquals(array('foo' => 'bar'), $route->getDefaults(), '->setDefaults() sets the defaults'); + $this->assertEquals($route, $route->setDefaults(array()), '->setDefaults() implements a fluent interface'); + + $route->setDefault('foo', 'bar'); + $this->assertEquals('bar', $route->getDefault('foo'), '->setDefault() sets a default value'); + + $route->setDefault('foo2', 'bar2'); + $this->assertEquals('bar2', $route->getDefault('foo2'), '->getDefault() return the default value'); + $this->assertNull($route->getDefault('not_defined'), '->getDefault() return null if default value is not set'); + + $route->setDefault('_controller', $closure = function () { return 'Hello'; }); + $this->assertEquals($closure, $route->getDefault('_controller'), '->setDefault() sets a default value'); + + $route->setDefaults(array('foo' => 'foo')); + $route->addDefaults(array('bar' => 'bar')); + $this->assertEquals($route, $route->addDefaults(array()), '->addDefaults() implements a fluent interface'); + $this->assertEquals(array('foo' => 'foo', 'bar' => 'bar'), $route->getDefaults(), '->addDefaults() keep previous defaults'); + } + + public function testRequirements() + { + $route = new Route('/{foo}'); + $route->setRequirements(array('foo' => '\d+')); + $this->assertEquals(array('foo' => '\d+'), $route->getRequirements(), '->setRequirements() sets the requirements'); + $this->assertEquals('\d+', $route->getRequirement('foo'), '->getRequirement() returns a requirement'); + $this->assertNull($route->getRequirement('bar'), '->getRequirement() returns null if a requirement is not defined'); + $route->setRequirements(array('foo' => '^\d+$')); + $this->assertEquals('\d+', $route->getRequirement('foo'), '->getRequirement() removes ^ and $ from the path'); + $this->assertEquals($route, $route->setRequirements(array()), '->setRequirements() implements a fluent interface'); + + $route->setRequirements(array('foo' => '\d+')); + $route->addRequirements(array('bar' => '\d+')); + $this->assertEquals($route, $route->addRequirements(array()), '->addRequirements() implements a fluent interface'); + $this->assertEquals(array('foo' => '\d+', 'bar' => '\d+'), $route->getRequirements(), '->addRequirement() keep previous requirements'); + } + + public function testRequirement() + { + $route = new Route('/{foo}'); + $this->assertFalse($route->hasRequirement('foo'), '->hasRequirement() return false if requirement is not set'); + $route->setRequirement('foo', '^\d+$'); + $this->assertEquals('\d+', $route->getRequirement('foo'), '->setRequirement() removes ^ and $ from the path'); + $this->assertTrue($route->hasRequirement('foo'), '->hasRequirement() return true if requirement is set'); + } + + /** + * @dataProvider getInvalidRequirements + * @expectedException \InvalidArgumentException + */ + public function testSetInvalidRequirement($req) + { + $route = new Route('/{foo}'); + $route->setRequirement('foo', $req); + } + + public function getInvalidRequirements() + { + return array( + array(''), + array(array()), + array('^$'), + array('^'), + array('$'), + ); + } + + public function testHost() + { + $route = new Route('/'); + $route->setHost('{locale}.example.net'); + $this->assertEquals('{locale}.example.net', $route->getHost(), '->setHost() sets the host pattern'); + } + + public function testScheme() + { + $route = new Route('/'); + $this->assertEquals(array(), $route->getSchemes(), 'schemes is initialized with array()'); + $this->assertFalse($route->hasScheme('http')); + $route->setSchemes('hTTp'); + $this->assertEquals(array('http'), $route->getSchemes(), '->setSchemes() accepts a single scheme string and lowercases it'); + $this->assertTrue($route->hasScheme('htTp')); + $this->assertFalse($route->hasScheme('httpS')); + $route->setSchemes(array('HttpS', 'hTTp')); + $this->assertEquals(array('https', 'http'), $route->getSchemes(), '->setSchemes() accepts an array of schemes and lowercases them'); + $this->assertTrue($route->hasScheme('htTp')); + $this->assertTrue($route->hasScheme('httpS')); + } + + public function testMethod() + { + $route = new Route('/'); + $this->assertEquals(array(), $route->getMethods(), 'methods is initialized with array()'); + $route->setMethods('gEt'); + $this->assertEquals(array('GET'), $route->getMethods(), '->setMethods() accepts a single method string and uppercases it'); + $route->setMethods(array('gEt', 'PosT')); + $this->assertEquals(array('GET', 'POST'), $route->getMethods(), '->setMethods() accepts an array of methods and uppercases them'); + } + + public function testCondition() + { + $route = new Route('/'); + $this->assertSame('', $route->getCondition()); + $route->setCondition('context.getMethod() == "GET"'); + $this->assertSame('context.getMethod() == "GET"', $route->getCondition()); + } + + public function testCompile() + { + $route = new Route('/{foo}'); + $this->assertInstanceOf('Symfony\Component\Routing\CompiledRoute', $compiled = $route->compile(), '->compile() returns a compiled route'); + $this->assertSame($compiled, $route->compile(), '->compile() only compiled the route once if unchanged'); + $route->setRequirement('foo', '.*'); + $this->assertNotSame($compiled, $route->compile(), '->compile() recompiles if the route was modified'); + } + + public function testSerialize() + { + $route = new Route('/prefix/{foo}', array('foo' => 'default'), array('foo' => '\d+')); + + $serialized = serialize($route); + $unserialized = unserialize($serialized); + + $this->assertEquals($route, $unserialized); + $this->assertNotSame($route, $unserialized); + } + + /** + * Tests that the compiled version is also serialized to prevent the overhead + * of compiling it again after unserialize. + */ + public function testSerializeWhenCompiled() + { + $route = new Route('/prefix/{foo}', array('foo' => 'default'), array('foo' => '\d+')); + $route->setHost('{locale}.example.net'); + $route->compile(); + + $serialized = serialize($route); + $unserialized = unserialize($serialized); + + $this->assertEquals($route, $unserialized); + $this->assertNotSame($route, $unserialized); + } + + /** + * Tests that the serialized representation of a route in one symfony version + * also works in later symfony versions, i.e. the unserialized route is in the + * same state as another, semantically equivalent, route. + */ + public function testSerializedRepresentationKeepsWorking() + { + $serialized = 'C:31:"Symfony\Component\Routing\Route":934:{a:8:{s:4:"path";s:13:"/prefix/{foo}";s:4:"host";s:20:"{locale}.example.net";s:8:"defaults";a:1:{s:3:"foo";s:7:"default";}s:12:"requirements";a:1:{s:3:"foo";s:3:"\d+";}s:7:"options";a:1:{s:14:"compiler_class";s:39:"Symfony\Component\Routing\RouteCompiler";}s:7:"schemes";a:0:{}s:7:"methods";a:0:{}s:8:"compiled";C:39:"Symfony\Component\Routing\CompiledRoute":569:{a:8:{s:4:"vars";a:2:{i:0;s:6:"locale";i:1;s:3:"foo";}s:11:"path_prefix";s:7:"/prefix";s:10:"path_regex";s:30:"#^/prefix(?:/(?P\d+))?$#s";s:11:"path_tokens";a:2:{i:0;a:4:{i:0;s:8:"variable";i:1;s:1:"/";i:2;s:3:"\d+";i:3;s:3:"foo";}i:1;a:2:{i:0;s:4:"text";i:1;s:7:"/prefix";}}s:9:"path_vars";a:1:{i:0;s:3:"foo";}s:10:"host_regex";s:39:"#^(?P[^\.]++)\.example\.net$#si";s:11:"host_tokens";a:2:{i:0;a:2:{i:0;s:4:"text";i:1;s:12:".example.net";}i:1;a:4:{i:0;s:8:"variable";i:1;s:0:"";i:2;s:7:"[^\.]++";i:3;s:6:"locale";}}s:9:"host_vars";a:1:{i:0;s:6:"locale";}}}}}'; + $unserialized = unserialize($serialized); + + $route = new Route('/prefix/{foo}', array('foo' => 'default'), array('foo' => '\d+')); + $route->setHost('{locale}.example.net'); + $route->compile(); + + $this->assertEquals($route, $unserialized); + $this->assertNotSame($route, $unserialized); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..409959eec07dc7e6b4f7e69be6a78701772f9056 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/RouterTest.php @@ -0,0 +1,162 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Routing\Router; +use Symfony\Component\HttpFoundation\Request; + +class RouterTest extends TestCase +{ + private $router = null; + + private $loader = null; + + protected function setUp() + { + $this->loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); + $this->router = new Router($this->loader, 'routing.yml'); + } + + public function testSetOptionsWithSupportedOptions() + { + $this->router->setOptions(array( + 'cache_dir' => './cache', + 'debug' => true, + 'resource_type' => 'ResourceType', + )); + + $this->assertSame('./cache', $this->router->getOption('cache_dir')); + $this->assertTrue($this->router->getOption('debug')); + $this->assertSame('ResourceType', $this->router->getOption('resource_type')); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The Router does not support the following options: "option_foo", "option_bar" + */ + public function testSetOptionsWithUnsupportedOptions() + { + $this->router->setOptions(array( + 'cache_dir' => './cache', + 'option_foo' => true, + 'option_bar' => 'baz', + 'resource_type' => 'ResourceType', + )); + } + + public function testSetOptionWithSupportedOption() + { + $this->router->setOption('cache_dir', './cache'); + + $this->assertSame('./cache', $this->router->getOption('cache_dir')); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The Router does not support the "option_foo" option + */ + public function testSetOptionWithUnsupportedOption() + { + $this->router->setOption('option_foo', true); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The Router does not support the "option_foo" option + */ + public function testGetOptionWithUnsupportedOption() + { + $this->router->getOption('option_foo', true); + } + + public function testThatRouteCollectionIsLoaded() + { + $this->router->setOption('resource_type', 'ResourceType'); + + $routeCollection = $this->getMockBuilder('Symfony\Component\Routing\RouteCollection')->getMock(); + + $this->loader->expects($this->once()) + ->method('load')->with('routing.yml', 'ResourceType') + ->will($this->returnValue($routeCollection)); + + $this->assertSame($routeCollection, $this->router->getRouteCollection()); + } + + /** + * @dataProvider provideMatcherOptionsPreventingCaching + */ + public function testMatcherIsCreatedIfCacheIsNotConfigured($option) + { + $this->router->setOption($option, null); + + $this->loader->expects($this->once()) + ->method('load')->with('routing.yml', null) + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Routing\RouteCollection')->getMock())); + + $this->assertInstanceOf('Symfony\\Component\\Routing\\Matcher\\UrlMatcher', $this->router->getMatcher()); + } + + public function provideMatcherOptionsPreventingCaching() + { + return array( + array('cache_dir'), + array('matcher_cache_class'), + ); + } + + /** + * @dataProvider provideGeneratorOptionsPreventingCaching + */ + public function testGeneratorIsCreatedIfCacheIsNotConfigured($option) + { + $this->router->setOption($option, null); + + $this->loader->expects($this->once()) + ->method('load')->with('routing.yml', null) + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Routing\RouteCollection')->getMock())); + + $this->assertInstanceOf('Symfony\\Component\\Routing\\Generator\\UrlGenerator', $this->router->getGenerator()); + } + + public function provideGeneratorOptionsPreventingCaching() + { + return array( + array('cache_dir'), + array('generator_cache_class'), + ); + } + + public function testMatchRequestWithUrlMatcherInterface() + { + $matcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\UrlMatcherInterface')->getMock(); + $matcher->expects($this->once())->method('match'); + + $p = new \ReflectionProperty($this->router, 'matcher'); + $p->setAccessible(true); + $p->setValue($this->router, $matcher); + + $this->router->matchRequest(Request::create('/')); + } + + public function testMatchRequestWithRequestMatcherInterface() + { + $matcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\RequestMatcherInterface')->getMock(); + $matcher->expects($this->once())->method('matchRequest'); + + $p = new \ReflectionProperty($this->router, 'matcher'); + $p->setAccessible(true); + $p->setValue($this->router, $matcher); + + $this->router->matchRequest(Request::create('/')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Routing/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..156bbecb2a3bd992cdce6fbbf36f422b2f2b5ce1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/composer.json @@ -0,0 +1,53 @@ +{ + "name": "symfony/routing", + "type": "library", + "description": "Symfony Routing Component", + "keywords": ["routing", "router", "URL", "URI"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/config": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "suggest": { + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/yaml": "For using the YAML loader", + "symfony/expression-language": "For using expression matching", + "doctrine/annotations": "For using the annotation loader", + "symfony/dependency-injection": "For loading routes from a service" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Routing\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Routing/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Routing/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..b69f066ac1b2f256e2b6d013ac3356eff30b20f5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Routing/phpunit.xml.dist @@ -0,0 +1,28 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Security/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..6bebfba400ca2897d83f30edd1dbd6e28b8f3d50 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/CHANGELOG.md @@ -0,0 +1,106 @@ +CHANGELOG +========= + +3.2.0 +----- + + * added `$attributes` and `$subject` with getters/setters to `Symfony\Component\Security\Core\Exception\AccessDeniedException` + +3.0.0 +----- + + * removed all deprecated code + +2.8.0 +----- + + * deprecated `getKey()` of the `AnonymousToken`, `RememberMeToken`, + `AbstractRememberMeServices` and `DigestAuthenticationEntryPoint` classes in favor of `getSecret()`. + * deprecated `Symfony\Component\Security\Core\Authentication\SimplePreAuthenticatorInterface`, use + `Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface` instead + * deprecated `Symfony\Component\Security\Core\Authentication\SimpleFormAuthenticatorInterface`, use + `Symfony\Component\Security\Http\Authentication\SimpleFormAuthenticatorInterface` instead + * deprecated `Symfony\Component\Security\Core\Util\ClassUtils`, use + `Symfony\Component\Security\Acl\Util\ClassUtils` instead + * deprecated the `Symfony\Component\Security\Core\Util\SecureRandom` class in favor of the `random_bytes()` function + * deprecated `supportsAttribute()` and `supportsClass()` methods of + `Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface` and + `Symfony\Component\Security\Core\Authorization\Voter\VoterInterface`. + * deprecated `getSupportedAttributes()` and `getSupportedClasses()` methods of + `Symfony\Component\Security\Core\Authorization\Voter\AbstractVoter`, use `supports()` instead. + * deprecated the `intention` option for all the authentication listeners, + use the `csrf_token_id` option instead. + +2.7.0 +----- + + * added LogoutUrlGenerator + * added the triggering of the `Symfony\Component\Security\Http\SecurityEvents::INTERACTIVE_LOGIN` in `Symfony\Component\Security\Http\Firewall\SimplePreAuthenticationListener` + * The MaskBuilder logic has been abstracted in the `Symfony\Component\Security\Acl\Permission\AbstractMaskBuilder` + and described in the `Symfony\Component\Security\Acl\Permission\MaskBuilderInterface` + * added interface `Symfony\Component\Security\Acl\Permission\MaskBuilderRetrievalInterface` + +2.6.0 +----- + + * added Symfony\Component\Security\Http\Authentication\AuthenticationUtils + * Deprecated the `SecurityContext` class in favor of the `AuthorizationChecker` and `TokenStorage` classes + +2.4.0 +----- + + * Translations in the `src/Symfony/Component/Security/Resources/translations/` directory are deprecated, ones in `src/Symfony/Component/Security/Core/Resources/translations/` must be used instead. + * The switch user listener now preserves the query string when switching a user + * The remember-me cookie hashes now use HMAC, which means that current cookies will be invalidated + * added simpler customization options + * structured component into three sub-components Acl, Core and Http + * added Csrf sub-component + * changed Http sub-component to depend on Csrf sub-component instead of the Form component + +2.3.0 +----- + + * [BC BREAK] the BCrypt encoder constructor signature has changed (the first argument was removed) + To use the BCrypt encoder, you now need PHP 5.5 or "ircmaxell/password-compat" as a composer dependency + * [BC BREAK] return 401 instead of 500 when using use_forward during for form authentication + * added a `require_previous_session` option to `AbstractAuthenticationListener` + +2.2.0 +----- + + * `Symfony\Component\Security\Http\Firewall` and + `Symfony\Component\Security\Http\RememberMe\ResponseListener` now + implements EventSubscriberInterface + * added secure random number generator + * added PBKDF2 Password encoder + * added BCrypt password encoder + +2.1.0 +----- + + * [BC BREAK] The signature of ExceptionListener has changed + * changed the HttpUtils constructor signature to take a UrlGenerator and a UrlMatcher instead of a Router + * EncoderFactoryInterface::getEncoder() can now also take a class name as an argument + * allow switching to the user that is already impersonated + * added support for the remember_me parameter in the query + * added AccessMapInterface + * [BC BREAK] moved user comparison logic out of UserInterface + * made the logout path check configurable + * after login, the user is now redirected to `default_target_path` if + `use_referer` is true and the referrer is the `login_path`. + * added a way to remove a token from a session + * [BC BREAK] changed `MutableAclInterface::setParentAcl` to accept `null`, + review your implementation to reflect this change. + * `ObjectIdentity::fromDomainObject`, `UserSecurityIdentity::fromAccount` and + `UserSecurityIdentity::fromToken` now return correct identities for proxies + objects (e.g. Doctrine proxies) + * [BC BREAK] moved the default authentication success and failure handling to + separate classes. The order of arguments in the constructor of the + `AbstractAuthenticationListener` has changed. + * [BC BREAK] moved the default logout success handling to a separate class. The + order of arguments in the constructor of `LogoutListener` has changed. + * [BC BREAK] The constructor of `AuthenticationException` and all child + classes now matches the constructor of `\Exception`. The extra information + getters and setters are removed. There are now dedicated getters/setters for + token (`AuthenticationException'), user (`AccountStatusException`) and + username (`UsernameNotFoundException`). diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c97d747d4261002120a7c802d20709ad6d1d4488 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; + +/** + * AuthenticationManagerInterface is the interface for authentication managers, + * which process Token authentication. + * + * @author Fabien Potencier + */ +interface AuthenticationManagerInterface +{ + /** + * Attempts to authenticate a TokenInterface object. + * + * @param TokenInterface $token The TokenInterface instance to authenticate + * + * @return TokenInterface An authenticated TokenInterface instance, never null + * + * @throws AuthenticationException if the authentication fails + */ + public function authenticate(TokenInterface $token); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.php new file mode 100644 index 0000000000000000000000000000000000000000..16de8daaeda935a4dcf4b9434097889bc4b80176 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication; + +use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent; +use Symfony\Component\Security\Core\Event\AuthenticationEvent; +use Symfony\Component\Security\Core\AuthenticationEvents; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Security\Core\Exception\AccountStatusException; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Exception\ProviderNotFoundException; +use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * AuthenticationProviderManager uses a list of AuthenticationProviderInterface + * instances to authenticate a Token. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class AuthenticationProviderManager implements AuthenticationManagerInterface +{ + private $providers; + private $eraseCredentials; + private $eventDispatcher; + + /** + * Constructor. + * + * @param AuthenticationProviderInterface[] $providers An array of AuthenticationProviderInterface instances + * @param bool $eraseCredentials Whether to erase credentials after authentication or not + * + * @throws \InvalidArgumentException + */ + public function __construct(array $providers, $eraseCredentials = true) + { + if (!$providers) { + throw new \InvalidArgumentException('You must at least add one authentication provider.'); + } + + foreach ($providers as $provider) { + if (!$provider instanceof AuthenticationProviderInterface) { + throw new \InvalidArgumentException(sprintf('Provider "%s" must implement the AuthenticationProviderInterface.', get_class($provider))); + } + } + + $this->providers = $providers; + $this->eraseCredentials = (bool) $eraseCredentials; + } + + public function setEventDispatcher(EventDispatcherInterface $dispatcher) + { + $this->eventDispatcher = $dispatcher; + } + + /** + * {@inheritdoc} + */ + public function authenticate(TokenInterface $token) + { + $lastException = null; + $result = null; + + foreach ($this->providers as $provider) { + if (!$provider->supports($token)) { + continue; + } + + try { + $result = $provider->authenticate($token); + + if (null !== $result) { + break; + } + } catch (AccountStatusException $e) { + $e->setToken($token); + + throw $e; + } catch (AuthenticationException $e) { + $lastException = $e; + } + } + + if (null !== $result) { + if (true === $this->eraseCredentials) { + $result->eraseCredentials(); + } + + if (null !== $this->eventDispatcher) { + $this->eventDispatcher->dispatch(AuthenticationEvents::AUTHENTICATION_SUCCESS, new AuthenticationEvent($result)); + } + + return $result; + } + + if (null === $lastException) { + $lastException = new ProviderNotFoundException(sprintf('No Authentication Provider found for token of class "%s".', get_class($token))); + } + + if (null !== $this->eventDispatcher) { + $this->eventDispatcher->dispatch(AuthenticationEvents::AUTHENTICATION_FAILURE, new AuthenticationFailureEvent($token, $lastException)); + } + + $lastException->setToken($token); + + throw $lastException; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..c66661a1a32d13710313b73141ddf6883f64254c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.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\Security\Core\Authentication; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * The default implementation of the authentication trust resolver. + * + * @author Johannes M. Schmitt + */ +class AuthenticationTrustResolver implements AuthenticationTrustResolverInterface +{ + private $anonymousClass; + private $rememberMeClass; + + /** + * Constructor. + * + * @param string $anonymousClass + * @param string $rememberMeClass + */ + public function __construct($anonymousClass, $rememberMeClass) + { + $this->anonymousClass = $anonymousClass; + $this->rememberMeClass = $rememberMeClass; + } + + /** + * {@inheritdoc} + */ + public function isAnonymous(TokenInterface $token = null) + { + if (null === $token) { + return false; + } + + return $token instanceof $this->anonymousClass; + } + + /** + * {@inheritdoc} + */ + public function isRememberMe(TokenInterface $token = null) + { + if (null === $token) { + return false; + } + + return $token instanceof $this->rememberMeClass; + } + + /** + * {@inheritdoc} + */ + public function isFullFledged(TokenInterface $token = null) + { + if (null === $token) { + return false; + } + + return !$this->isAnonymous($token) && !$this->isRememberMe($token); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..03b48e9eb6dde606b73a03412946c70762bcd852 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.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\Component\Security\Core\Authentication; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * Interface for resolving the authentication status of a given token. + * + * @author Johannes M. Schmitt + */ +interface AuthenticationTrustResolverInterface +{ + /** + * Resolves whether the passed token implementation is authenticated + * anonymously. + * + * If null is passed, the method must return false. + * + * @param TokenInterface $token + * + * @return bool + */ + public function isAnonymous(TokenInterface $token = null); + + /** + * Resolves whether the passed token implementation is authenticated + * using remember-me capabilities. + * + * @param TokenInterface $token + * + * @return bool + */ + public function isRememberMe(TokenInterface $token = null); + + /** + * Resolves whether the passed token implementation is fully authenticated. + * + * @param TokenInterface $token + * + * @return bool + */ + public function isFullFledged(TokenInterface $token = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/AnonymousAuthenticationProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/AnonymousAuthenticationProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..ff3d15fc59308eba2a423f26c0ba8baf89551407 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/AnonymousAuthenticationProvider.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\Provider; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; + +/** + * AnonymousAuthenticationProvider validates AnonymousToken instances. + * + * @author Fabien Potencier + */ +class AnonymousAuthenticationProvider implements AuthenticationProviderInterface +{ + /** + * Used to determine if the token is created by the application + * instead of a malicious client. + * + * @var string + */ + private $secret; + + /** + * Constructor. + * + * @param string $secret The secret shared with the AnonymousToken + */ + public function __construct($secret) + { + $this->secret = $secret; + } + + /** + * {@inheritdoc} + */ + public function authenticate(TokenInterface $token) + { + if (!$this->supports($token)) { + return; + } + + if ($this->secret !== $token->getSecret()) { + throw new BadCredentialsException('The Token does not contain the expected key.'); + } + + return $token; + } + + /** + * {@inheritdoc} + */ + public function supports(TokenInterface $token) + { + return $token instanceof AnonymousToken; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..f3e1590bd4381c13734329c394f6e1e5d1f361d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\Provider; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; + +/** + * AuthenticationProviderInterface is the interface for all authentication + * providers. + * + * Concrete implementations processes specific Token instances. + * + * @author Fabien Potencier + */ +interface AuthenticationProviderInterface extends AuthenticationManagerInterface +{ + /** + * Use this constant for not provided username. + * + * @var string + */ + const USERNAME_NONE_PROVIDED = 'NONE_PROVIDED'; + + /** + * Checks whether this provider supports the given token. + * + * @param TokenInterface $token A TokenInterface instance + * + * @return bool true if the implementation supports the Token, false otherwise + */ + public function supports(TokenInterface $token); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/DaoAuthenticationProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/DaoAuthenticationProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..90cba25d64382ffcdb568d69d746a20bfeb49207 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/DaoAuthenticationProvider.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\Component\Security\Core\Authentication\Provider; + +use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; +use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Component\Security\Core\User\UserCheckerInterface; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Exception\AuthenticationServiceException; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; + +/** + * DaoAuthenticationProvider uses a UserProviderInterface to retrieve the user + * for a UsernamePasswordToken. + * + * @author Fabien Potencier + */ +class DaoAuthenticationProvider extends UserAuthenticationProvider +{ + private $encoderFactory; + private $userProvider; + + /** + * Constructor. + * + * @param UserProviderInterface $userProvider An UserProviderInterface instance + * @param UserCheckerInterface $userChecker An UserCheckerInterface instance + * @param string $providerKey The provider key + * @param EncoderFactoryInterface $encoderFactory An EncoderFactoryInterface instance + * @param bool $hideUserNotFoundExceptions Whether to hide user not found exception or not + */ + public function __construct(UserProviderInterface $userProvider, UserCheckerInterface $userChecker, $providerKey, EncoderFactoryInterface $encoderFactory, $hideUserNotFoundExceptions = true) + { + parent::__construct($userChecker, $providerKey, $hideUserNotFoundExceptions); + + $this->encoderFactory = $encoderFactory; + $this->userProvider = $userProvider; + } + + /** + * {@inheritdoc} + */ + protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token) + { + $currentUser = $token->getUser(); + if ($currentUser instanceof UserInterface) { + if ($currentUser->getPassword() !== $user->getPassword()) { + throw new BadCredentialsException('The credentials were changed from another session.'); + } + } else { + if ('' === ($presentedPassword = $token->getCredentials())) { + throw new BadCredentialsException('The presented password cannot be empty.'); + } + + if (!$this->encoderFactory->getEncoder($user)->isPasswordValid($user->getPassword(), $presentedPassword, $user->getSalt())) { + throw new BadCredentialsException('The presented password is invalid.'); + } + } + } + + /** + * {@inheritdoc} + */ + protected function retrieveUser($username, UsernamePasswordToken $token) + { + $user = $token->getUser(); + if ($user instanceof UserInterface) { + return $user; + } + + try { + $user = $this->userProvider->loadUserByUsername($username); + + if (!$user instanceof UserInterface) { + throw new AuthenticationServiceException('The user provider must return a UserInterface object.'); + } + + return $user; + } catch (UsernameNotFoundException $e) { + $e->setUsername($username); + throw $e; + } catch (\Exception $e) { + $e = new AuthenticationServiceException($e->getMessage(), 0, $e); + $e->setToken($token); + throw $e; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..5ebb09ab3dad4c9a31bb86e496e910c8612ca9d1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\Provider; + +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\User\UserCheckerInterface; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Component\Ldap\LdapInterface; +use Symfony\Component\Ldap\Exception\ConnectionException; + +/** + * LdapBindAuthenticationProvider authenticates a user against an LDAP server. + * + * The only way to check user credentials is to try to connect the user with its + * credentials to the ldap. + * + * @author Charles Sarrazin + */ +class LdapBindAuthenticationProvider extends UserAuthenticationProvider +{ + private $userProvider; + private $ldap; + private $dnString; + + /** + * Constructor. + * + * @param UserProviderInterface $userProvider A UserProvider + * @param UserCheckerInterface $userChecker A UserChecker + * @param string $providerKey The provider key + * @param LdapInterface $ldap A Ldap client + * @param string $dnString A string used to create the bind DN + * @param bool $hideUserNotFoundExceptions Whether to hide user not found exception or not + */ + public function __construct(UserProviderInterface $userProvider, UserCheckerInterface $userChecker, $providerKey, LdapInterface $ldap, $dnString = '{username}', $hideUserNotFoundExceptions = true) + { + parent::__construct($userChecker, $providerKey, $hideUserNotFoundExceptions); + + $this->userProvider = $userProvider; + $this->ldap = $ldap; + $this->dnString = $dnString; + } + + /** + * {@inheritdoc} + */ + protected function retrieveUser($username, UsernamePasswordToken $token) + { + if (AuthenticationProviderInterface::USERNAME_NONE_PROVIDED === $username) { + throw new UsernameNotFoundException('Username can not be null'); + } + + return $this->userProvider->loadUserByUsername($username); + } + + /** + * {@inheritdoc} + */ + protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token) + { + $username = $token->getUsername(); + $password = $token->getCredentials(); + + if ('' === $password) { + throw new BadCredentialsException('The presented password must not be empty.'); + } + + try { + $username = $this->ldap->escape($username, '', LdapInterface::ESCAPE_DN); + $dn = str_replace('{username}', $username, $this->dnString); + + $this->ldap->bind($dn, $password); + } catch (ConnectionException $e) { + throw new BadCredentialsException('The presented password is invalid.'); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..4f732542ea94f0030c918b57c76dd0162a33970e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\Provider; + +use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Component\Security\Core\User\UserCheckerInterface; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * Processes a pre-authenticated authentication request. + * + * This authentication provider will not perform any checks on authentication + * requests, as they should already be pre-authenticated. However, the + * UserProviderInterface implementation may still throw a + * UsernameNotFoundException, for example. + * + * @author Fabien Potencier + */ +class PreAuthenticatedAuthenticationProvider implements AuthenticationProviderInterface +{ + private $userProvider; + private $userChecker; + private $providerKey; + + /** + * Constructor. + * + * @param UserProviderInterface $userProvider An UserProviderInterface instance + * @param UserCheckerInterface $userChecker An UserCheckerInterface instance + * @param string $providerKey The provider key + */ + public function __construct(UserProviderInterface $userProvider, UserCheckerInterface $userChecker, $providerKey) + { + $this->userProvider = $userProvider; + $this->userChecker = $userChecker; + $this->providerKey = $providerKey; + } + + /** + * {@inheritdoc} + */ + public function authenticate(TokenInterface $token) + { + if (!$this->supports($token)) { + return; + } + + if (!$user = $token->getUser()) { + throw new BadCredentialsException('No pre-authenticated principal found in request.'); + } + + $user = $this->userProvider->loadUserByUsername($user); + + $this->userChecker->checkPostAuth($user); + + $authenticatedToken = new PreAuthenticatedToken($user, $token->getCredentials(), $this->providerKey, $user->getRoles()); + $authenticatedToken->setAttributes($token->getAttributes()); + + return $authenticatedToken; + } + + /** + * {@inheritdoc} + */ + public function supports(TokenInterface $token) + { + return $token instanceof PreAuthenticatedToken && $this->providerKey === $token->getProviderKey(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..f0a74eb9d2bbe1b65a486eaa0fe0392ccc136313 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\Provider; + +use Symfony\Component\Security\Core\User\UserCheckerInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; + +class RememberMeAuthenticationProvider implements AuthenticationProviderInterface +{ + private $userChecker; + private $secret; + private $providerKey; + + /** + * Constructor. + * + * @param UserCheckerInterface $userChecker An UserCheckerInterface interface + * @param string $secret A secret + * @param string $providerKey A provider secret + */ + public function __construct(UserCheckerInterface $userChecker, $secret, $providerKey) + { + $this->userChecker = $userChecker; + $this->secret = $secret; + $this->providerKey = $providerKey; + } + + /** + * {@inheritdoc} + */ + public function authenticate(TokenInterface $token) + { + if (!$this->supports($token)) { + return; + } + + if ($this->secret !== $token->getSecret()) { + throw new BadCredentialsException('The presented secret does not match.'); + } + + $user = $token->getUser(); + $this->userChecker->checkPreAuth($user); + + $authenticatedToken = new RememberMeToken($user, $this->providerKey, $this->secret); + $authenticatedToken->setAttributes($token->getAttributes()); + + return $authenticatedToken; + } + + /** + * {@inheritdoc} + */ + public function supports(TokenInterface $token) + { + return $token instanceof RememberMeToken && $token->getProviderKey() === $this->providerKey; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/SimpleAuthenticationProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/SimpleAuthenticationProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..ffbc72c055a0f3e0171e910b85f721c0b506d77e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/SimpleAuthenticationProvider.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\Provider; + +use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; + +/** + * @author Jordi Boggiano + */ +class SimpleAuthenticationProvider implements AuthenticationProviderInterface +{ + private $simpleAuthenticator; + private $userProvider; + private $providerKey; + + public function __construct(SimpleAuthenticatorInterface $simpleAuthenticator, UserProviderInterface $userProvider, $providerKey) + { + $this->simpleAuthenticator = $simpleAuthenticator; + $this->userProvider = $userProvider; + $this->providerKey = $providerKey; + } + + public function authenticate(TokenInterface $token) + { + $authToken = $this->simpleAuthenticator->authenticateToken($token, $this->userProvider, $this->providerKey); + + if ($authToken instanceof TokenInterface) { + return $authToken; + } + + throw new AuthenticationException('Simple authenticator failed to return an authenticated token.'); + } + + public function supports(TokenInterface $token) + { + return $this->simpleAuthenticator->supportsToken($token, $this->providerKey); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..9dc47516d5145e0fde074c861a2aef828fc8c29b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php @@ -0,0 +1,155 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\Provider; + +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Core\User\UserCheckerInterface; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\Security\Core\Exception\AuthenticationServiceException; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Role\SwitchUserRole; + +/** + * UserProviderInterface retrieves users for UsernamePasswordToken tokens. + * + * @author Fabien Potencier + */ +abstract class UserAuthenticationProvider implements AuthenticationProviderInterface +{ + private $hideUserNotFoundExceptions; + private $userChecker; + private $providerKey; + + /** + * Constructor. + * + * @param UserCheckerInterface $userChecker An UserCheckerInterface interface + * @param string $providerKey A provider key + * @param bool $hideUserNotFoundExceptions Whether to hide user not found exception or not + * + * @throws \InvalidArgumentException + */ + public function __construct(UserCheckerInterface $userChecker, $providerKey, $hideUserNotFoundExceptions = true) + { + if (empty($providerKey)) { + throw new \InvalidArgumentException('$providerKey must not be empty.'); + } + + $this->userChecker = $userChecker; + $this->providerKey = $providerKey; + $this->hideUserNotFoundExceptions = $hideUserNotFoundExceptions; + } + + /** + * {@inheritdoc} + */ + public function authenticate(TokenInterface $token) + { + if (!$this->supports($token)) { + return; + } + + $username = $token->getUsername(); + if ('' === $username || null === $username) { + $username = AuthenticationProviderInterface::USERNAME_NONE_PROVIDED; + } + + try { + $user = $this->retrieveUser($username, $token); + } catch (UsernameNotFoundException $e) { + if ($this->hideUserNotFoundExceptions) { + throw new BadCredentialsException('Bad credentials.', 0, $e); + } + $e->setUsername($username); + + throw $e; + } + + if (!$user instanceof UserInterface) { + throw new AuthenticationServiceException('retrieveUser() must return a UserInterface.'); + } + + try { + $this->userChecker->checkPreAuth($user); + $this->checkAuthentication($user, $token); + $this->userChecker->checkPostAuth($user); + } catch (BadCredentialsException $e) { + if ($this->hideUserNotFoundExceptions) { + throw new BadCredentialsException('Bad credentials.', 0, $e); + } + + throw $e; + } + + $authenticatedToken = new UsernamePasswordToken($user, $token->getCredentials(), $this->providerKey, $this->getRoles($user, $token)); + $authenticatedToken->setAttributes($token->getAttributes()); + + return $authenticatedToken; + } + + /** + * {@inheritdoc} + */ + public function supports(TokenInterface $token) + { + return $token instanceof UsernamePasswordToken && $this->providerKey === $token->getProviderKey(); + } + + /** + * Retrieves roles from user and appends SwitchUserRole if original token contained one. + * + * @param UserInterface $user The user + * @param TokenInterface $token The token + * + * @return array The user roles + */ + private function getRoles(UserInterface $user, TokenInterface $token) + { + $roles = $user->getRoles(); + + foreach ($token->getRoles() as $role) { + if ($role instanceof SwitchUserRole) { + $roles[] = $role; + + break; + } + } + + return $roles; + } + + /** + * Retrieves the user from an implementation-specific location. + * + * @param string $username The username to retrieve + * @param UsernamePasswordToken $token The Token + * + * @return UserInterface The user + * + * @throws AuthenticationException if the credentials could not be validated + */ + abstract protected function retrieveUser($username, UsernamePasswordToken $token); + + /** + * Does additional checks on the user and token (like validating the + * credentials). + * + * @param UserInterface $user The retrieved UserInterface instance + * @param UsernamePasswordToken $token The UsernamePasswordToken token to be authenticated + * + * @throws AuthenticationException if the credentials could not be validated + */ + abstract protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..719d7a16d81df5abf8c648f0f87513307cc3a2a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\RememberMe; + +use Symfony\Component\Security\Core\Exception\TokenNotFoundException; + +/** + * This class is used for testing purposes, and is not really suited for production. + * + * @author Johannes M. Schmitt + */ +class InMemoryTokenProvider implements TokenProviderInterface +{ + private $tokens = array(); + + /** + * {@inheritdoc} + */ + public function loadTokenBySeries($series) + { + if (!isset($this->tokens[$series])) { + throw new TokenNotFoundException('No token found.'); + } + + return $this->tokens[$series]; + } + + /** + * {@inheritdoc} + */ + public function updateToken($series, $tokenValue, \DateTime $lastUsed) + { + if (!isset($this->tokens[$series])) { + throw new TokenNotFoundException('No token found.'); + } + + $token = new PersistentToken( + $this->tokens[$series]->getClass(), + $this->tokens[$series]->getUsername(), + $series, + $tokenValue, + $lastUsed + ); + $this->tokens[$series] = $token; + } + + /** + * {@inheritdoc} + */ + public function deleteTokenBySeries($series) + { + unset($this->tokens[$series]); + } + + /** + * {@inheritdoc} + */ + public function createNewToken(PersistentTokenInterface $token) + { + $this->tokens[$token->getSeries()] = $token; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php new file mode 100644 index 0000000000000000000000000000000000000000..76873fc603cd7f5255395a339074b6bfbb9a851c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.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\Component\Security\Core\Authentication\RememberMe; + +/** + * @author Johannes M. Schmitt + * + * @internal + */ +final class PersistentToken implements PersistentTokenInterface +{ + private $class; + private $username; + private $series; + private $tokenValue; + private $lastUsed; + + /** + * Constructor. + * + * @param string $class + * @param string $username + * @param string $series + * @param string $tokenValue + * @param \DateTime $lastUsed + * + * @throws \InvalidArgumentException + */ + public function __construct($class, $username, $series, $tokenValue, \DateTime $lastUsed) + { + if (empty($class)) { + throw new \InvalidArgumentException('$class must not be empty.'); + } + if ('' === $username || null === $username) { + throw new \InvalidArgumentException('$username must not be empty.'); + } + if (empty($series)) { + throw new \InvalidArgumentException('$series must not be empty.'); + } + if (empty($tokenValue)) { + throw new \InvalidArgumentException('$tokenValue must not be empty.'); + } + + $this->class = $class; + $this->username = $username; + $this->series = $series; + $this->tokenValue = $tokenValue; + $this->lastUsed = $lastUsed; + } + + /** + * {@inheritdoc} + */ + public function getClass() + { + return $this->class; + } + + /** + * {@inheritdoc} + */ + public function getUsername() + { + return $this->username; + } + + /** + * {@inheritdoc} + */ + public function getSeries() + { + return $this->series; + } + + /** + * {@inheritdoc} + */ + public function getTokenValue() + { + return $this->tokenValue; + } + + /** + * {@inheritdoc} + */ + public function getLastUsed() + { + return $this->lastUsed; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentTokenInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentTokenInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..ba31ffa6d022e7bf02b7fe8d7d05a33e5ce2133a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentTokenInterface.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\RememberMe; + +/** + * Interface to be implemented by persistent token classes (such as + * Doctrine entities representing a remember-me token). + * + * @author Johannes M. Schmitt + */ +interface PersistentTokenInterface +{ + /** + * Returns the class of the user. + * + * @return string + */ + public function getClass(); + + /** + * Returns the username. + * + * @return string + */ + public function getUsername(); + + /** + * Returns the series. + * + * @return string + */ + public function getSeries(); + + /** + * Returns the token value. + * + * @return string + */ + public function getTokenValue(); + + /** + * Returns the time the token was last used. + * + * @return \DateTime + */ + public function getLastUsed(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c2d860e905a2487145947aa6a293ff1d25aa8b6c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.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\Component\Security\Core\Authentication\RememberMe; + +use Symfony\Component\Security\Core\Exception\TokenNotFoundException; + +/** + * Interface for TokenProviders. + * + * @author Johannes M. Schmitt + */ +interface TokenProviderInterface +{ + /** + * Loads the active token for the given series. + * + * @param string $series + * + * @return PersistentTokenInterface + * + * @throws TokenNotFoundException if the token is not found + */ + public function loadTokenBySeries($series); + + /** + * Deletes all tokens belonging to series. + * + * @param string $series + */ + public function deleteTokenBySeries($series); + + /** + * Updates the token according to this data. + * + * @param string $series + * @param string $tokenValue + * @param \DateTime $lastUsed + * + * @throws TokenNotFoundException if the token is not found + */ + public function updateToken($series, $tokenValue, \DateTime $lastUsed); + + /** + * Creates a new token. + * + * @param PersistentTokenInterface $token + */ + public function createNewToken(PersistentTokenInterface $token); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/SimpleAuthenticatorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/SimpleAuthenticatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..868d0727148343cc0192bcc0982eb39b0e26215a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/SimpleAuthenticatorInterface.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\User\UserProviderInterface; + +/** + * @author Jordi Boggiano + */ +interface SimpleAuthenticatorInterface +{ + public function authenticateToken(TokenInterface $token, UserProviderInterface $userProvider, $providerKey); + + public function supportsToken(TokenInterface $token, $providerKey); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php new file mode 100644 index 0000000000000000000000000000000000000000..2e9c0f34b4b5dd8414c8885dd22828719752929e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php @@ -0,0 +1,288 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\Token; + +use Symfony\Component\Security\Core\Role\RoleInterface; +use Symfony\Component\Security\Core\Role\Role; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Core\User\AdvancedUserInterface; +use Symfony\Component\Security\Core\User\EquatableInterface; + +/** + * Base class for Token instances. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +abstract class AbstractToken implements TokenInterface +{ + private $user; + private $roles = array(); + private $authenticated = false; + private $attributes = array(); + + /** + * Constructor. + * + * @param (RoleInterface|string)[] $roles An array of roles + * + * @throws \InvalidArgumentException + */ + public function __construct(array $roles = array()) + { + foreach ($roles as $role) { + if (is_string($role)) { + $role = new Role($role); + } elseif (!$role instanceof RoleInterface) { + throw new \InvalidArgumentException(sprintf('$roles must be an array of strings, or RoleInterface instances, but got %s.', gettype($role))); + } + + $this->roles[] = $role; + } + } + + /** + * {@inheritdoc} + */ + public function getRoles() + { + return $this->roles; + } + + /** + * {@inheritdoc} + */ + public function getUsername() + { + if ($this->user instanceof UserInterface) { + return $this->user->getUsername(); + } + + return (string) $this->user; + } + + /** + * {@inheritdoc} + */ + public function getUser() + { + return $this->user; + } + + /** + * Sets the user in the token. + * + * The user can be a UserInterface instance, or an object implementing + * a __toString method or the username as a regular string. + * + * @param string|object $user The user + * + * @throws \InvalidArgumentException + */ + public function setUser($user) + { + if (!($user instanceof UserInterface || (is_object($user) && method_exists($user, '__toString')) || is_string($user))) { + throw new \InvalidArgumentException('$user must be an instanceof UserInterface, an object implementing a __toString method, or a primitive string.'); + } + + if (null === $this->user) { + $changed = false; + } elseif ($this->user instanceof UserInterface) { + if (!$user instanceof UserInterface) { + $changed = true; + } else { + $changed = $this->hasUserChanged($user); + } + } elseif ($user instanceof UserInterface) { + $changed = true; + } else { + $changed = (string) $this->user !== (string) $user; + } + + if ($changed) { + $this->setAuthenticated(false); + } + + $this->user = $user; + } + + /** + * {@inheritdoc} + */ + public function isAuthenticated() + { + return $this->authenticated; + } + + /** + * {@inheritdoc} + */ + public function setAuthenticated($authenticated) + { + $this->authenticated = (bool) $authenticated; + } + + /** + * {@inheritdoc} + */ + public function eraseCredentials() + { + if ($this->getUser() instanceof UserInterface) { + $this->getUser()->eraseCredentials(); + } + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize( + array( + is_object($this->user) ? clone $this->user : $this->user, + $this->authenticated, + $this->roles, + $this->attributes, + ) + ); + } + + /** + * {@inheritdoc} + */ + public function unserialize($serialized) + { + list($this->user, $this->authenticated, $this->roles, $this->attributes) = unserialize($serialized); + } + + /** + * Returns the token attributes. + * + * @return array The token attributes + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Sets the token attributes. + * + * @param array $attributes The token attributes + */ + public function setAttributes(array $attributes) + { + $this->attributes = $attributes; + } + + /** + * Returns true if the attribute exists. + * + * @param string $name The attribute name + * + * @return bool true if the attribute exists, false otherwise + */ + public function hasAttribute($name) + { + return array_key_exists($name, $this->attributes); + } + + /** + * Returns an attribute value. + * + * @param string $name The attribute name + * + * @return mixed The attribute value + * + * @throws \InvalidArgumentException When attribute doesn't exist for this token + */ + public function getAttribute($name) + { + if (!array_key_exists($name, $this->attributes)) { + throw new \InvalidArgumentException(sprintf('This token has no "%s" attribute.', $name)); + } + + return $this->attributes[$name]; + } + + /** + * Sets an attribute. + * + * @param string $name The attribute name + * @param mixed $value The attribute value + */ + public function setAttribute($name, $value) + { + $this->attributes[$name] = $value; + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + $class = get_class($this); + $class = substr($class, strrpos($class, '\\') + 1); + + $roles = array(); + foreach ($this->roles as $role) { + $roles[] = $role->getRole(); + } + + return sprintf('%s(user="%s", authenticated=%s, roles="%s")', $class, $this->getUsername(), json_encode($this->authenticated), implode(', ', $roles)); + } + + private function hasUserChanged(UserInterface $user) + { + if (!($this->user instanceof UserInterface)) { + throw new \BadMethodCallException('Method "hasUserChanged" should be called when current user class is instance of "UserInterface".'); + } + + if ($this->user instanceof EquatableInterface) { + return !(bool) $this->user->isEqualTo($user); + } + + if ($this->user->getPassword() !== $user->getPassword()) { + return true; + } + + if ($this->user->getSalt() !== $user->getSalt()) { + return true; + } + + if ($this->user->getUsername() !== $user->getUsername()) { + return true; + } + + if ($this->user instanceof AdvancedUserInterface && $user instanceof AdvancedUserInterface) { + if ($this->user->isAccountNonExpired() !== $user->isAccountNonExpired()) { + return true; + } + + if ($this->user->isAccountNonLocked() !== $user->isAccountNonLocked()) { + return true; + } + + if ($this->user->isCredentialsNonExpired() !== $user->isCredentialsNonExpired()) { + return true; + } + + if ($this->user->isEnabled() !== $user->isEnabled()) { + return true; + } + } elseif ($this->user instanceof AdvancedUserInterface xor $user instanceof AdvancedUserInterface) { + return true; + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php new file mode 100644 index 0000000000000000000000000000000000000000..76c88ba4ac0da2f2aea1b41a21349db00610dff3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\Token; + +use Symfony\Component\Security\Core\Role\RoleInterface; + +/** + * AnonymousToken represents an anonymous token. + * + * @author Fabien Potencier + */ +class AnonymousToken extends AbstractToken +{ + private $secret; + + /** + * Constructor. + * + * @param string $secret A secret used to make sure the token is created by the app and not by a malicious client + * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string + * @param RoleInterface[] $roles An array of roles + */ + public function __construct($secret, $user, array $roles = array()) + { + parent::__construct($roles); + + $this->secret = $secret; + $this->setUser($user); + $this->setAuthenticated(true); + } + + /** + * {@inheritdoc} + */ + public function getCredentials() + { + return ''; + } + + /** + * Returns the secret. + * + * @return string + */ + public function getSecret() + { + return $this->secret; + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize(array($this->secret, parent::serialize())); + } + + /** + * {@inheritdoc} + */ + public function unserialize($serialized) + { + list($this->secret, $parentStr) = unserialize($serialized); + parent::unserialize($parentStr); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php new file mode 100644 index 0000000000000000000000000000000000000000..a5460f50839eea47604ea192a75919f6a8043b39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\Token; + +use Symfony\Component\Security\Core\Role\RoleInterface; + +/** + * PreAuthenticatedToken implements a pre-authenticated token. + * + * @author Fabien Potencier + */ +class PreAuthenticatedToken extends AbstractToken +{ + private $credentials; + private $providerKey; + + /** + * Constructor. + * + * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string + * @param mixed $credentials The user credentials + * @param string $providerKey The provider key + * @param (RoleInterface|string)[] $roles An array of roles + */ + public function __construct($user, $credentials, $providerKey, array $roles = array()) + { + parent::__construct($roles); + + if (empty($providerKey)) { + throw new \InvalidArgumentException('$providerKey must not be empty.'); + } + + $this->setUser($user); + $this->credentials = $credentials; + $this->providerKey = $providerKey; + + if ($roles) { + $this->setAuthenticated(true); + } + } + + /** + * Returns the provider key. + * + * @return string The provider key + */ + public function getProviderKey() + { + return $this->providerKey; + } + + /** + * {@inheritdoc} + */ + public function getCredentials() + { + return $this->credentials; + } + + /** + * {@inheritdoc} + */ + public function eraseCredentials() + { + parent::eraseCredentials(); + + $this->credentials = null; + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize(array($this->credentials, $this->providerKey, parent::serialize())); + } + + /** + * {@inheritdoc} + */ + public function unserialize($str) + { + list($this->credentials, $this->providerKey, $parentStr) = unserialize($str); + parent::unserialize($parentStr); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php new file mode 100644 index 0000000000000000000000000000000000000000..edd77abbb1025ee90aafd5a2c9f02e9a3474a2f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.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\Security\Core\Authentication\Token; + +use Symfony\Component\Security\Core\User\UserInterface; + +/** + * Authentication Token for "Remember-Me". + * + * @author Johannes M. Schmitt + */ +class RememberMeToken extends AbstractToken +{ + private $secret; + private $providerKey; + + /** + * Constructor. + * + * @param UserInterface $user + * @param string $providerKey + * @param string $secret A secret used to make sure the token is created by the app and not by a malicious client + * + * @throws \InvalidArgumentException + */ + public function __construct(UserInterface $user, $providerKey, $secret) + { + parent::__construct($user->getRoles()); + + if (empty($secret)) { + throw new \InvalidArgumentException('$secret must not be empty.'); + } + + if (empty($providerKey)) { + throw new \InvalidArgumentException('$providerKey must not be empty.'); + } + + $this->providerKey = $providerKey; + $this->secret = $secret; + + $this->setUser($user); + parent::setAuthenticated(true); + } + + /** + * {@inheritdoc} + */ + public function setAuthenticated($authenticated) + { + if ($authenticated) { + throw new \LogicException('You cannot set this token to authenticated after creation.'); + } + + parent::setAuthenticated(false); + } + + /** + * Returns the provider secret. + * + * @return string The provider secret + */ + public function getProviderKey() + { + return $this->providerKey; + } + + /** + * Returns the secret. + * + * @return string + */ + public function getSecret() + { + return $this->secret; + } + + /** + * {@inheritdoc} + */ + public function getCredentials() + { + return ''; + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize(array( + $this->secret, + $this->providerKey, + parent::serialize(), + )); + } + + /** + * {@inheritdoc} + */ + public function unserialize($serialized) + { + list($this->secret, $this->providerKey, $parentStr) = unserialize($serialized); + parent::unserialize($parentStr); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php new file mode 100644 index 0000000000000000000000000000000000000000..b4930813f50c8ad599b5bcdaa496260797160afc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.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\Component\Security\Core\Authentication\Token\Storage; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * TokenStorage contains a TokenInterface. + * + * It gives access to the token representing the current user authentication. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class TokenStorage implements TokenStorageInterface +{ + private $token; + + /** + * {@inheritdoc} + */ + public function getToken() + { + return $this->token; + } + + /** + * {@inheritdoc} + */ + public function setToken(TokenInterface $token = null) + { + $this->token = $token; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorageInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorageInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..218d750b8e09748fabe0cca26f5761e801a51c1c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorageInterface.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\Component\Security\Core\Authentication\Token\Storage; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * The TokenStorageInterface. + * + * @author Johannes M. Schmitt + */ +interface TokenStorageInterface +{ + /** + * Returns the current security token. + * + * @return TokenInterface|null A TokenInterface instance or null if no authentication information is available + */ + public function getToken(); + + /** + * Sets the authentication token. + * + * @param TokenInterface $token A TokenInterface token, or null if no further authentication information should be stored + */ + public function setToken(TokenInterface $token = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..4e1dd7b2fc46b081dd2b3ff76689504401393b00 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\Token; + +use Symfony\Component\Security\Core\Role\RoleInterface; + +/** + * TokenInterface is the interface for the user authentication information. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +interface TokenInterface extends \Serializable +{ + /** + * Returns a string representation of the Token. + * + * This is only to be used for debugging purposes. + * + * @return string + */ + public function __toString(); + + /** + * Returns the user roles. + * + * @return RoleInterface[] An array of RoleInterface instances + */ + public function getRoles(); + + /** + * Returns the user credentials. + * + * @return mixed The user credentials + */ + public function getCredentials(); + + /** + * Returns a user representation. + * + * @return mixed Can be a UserInterface instance, an object implementing a __toString method, + * or the username as a regular string + * + * @see AbstractToken::setUser() + */ + public function getUser(); + + /** + * Sets a user. + * + * @param mixed $user + */ + public function setUser($user); + + /** + * Returns the username. + * + * @return string + */ + public function getUsername(); + + /** + * Returns whether the user is authenticated or not. + * + * @return bool true if the token has been authenticated, false otherwise + */ + public function isAuthenticated(); + + /** + * Sets the authenticated flag. + * + * @param bool $isAuthenticated The authenticated flag + */ + public function setAuthenticated($isAuthenticated); + + /** + * Removes sensitive information from the token. + */ + public function eraseCredentials(); + + /** + * Returns the token attributes. + * + * @return array The token attributes + */ + public function getAttributes(); + + /** + * Sets the token attributes. + * + * @param array $attributes The token attributes + */ + public function setAttributes(array $attributes); + + /** + * Returns true if the attribute exists. + * + * @param string $name The attribute name + * + * @return bool true if the attribute exists, false otherwise + */ + public function hasAttribute($name); + + /** + * Returns an attribute value. + * + * @param string $name The attribute name + * + * @return mixed The attribute value + * + * @throws \InvalidArgumentException When attribute doesn't exist for this token + */ + public function getAttribute($name); + + /** + * Sets an attribute. + * + * @param string $name The attribute name + * @param mixed $value The attribute value + */ + public function setAttribute($name, $value); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php new file mode 100644 index 0000000000000000000000000000000000000000..71d19adc14f2b1b8c6ee11da449cc67fb9bd702a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authentication\Token; + +use Symfony\Component\Security\Core\Role\RoleInterface; + +/** + * UsernamePasswordToken implements a username and password token. + * + * @author Fabien Potencier + */ +class UsernamePasswordToken extends AbstractToken +{ + private $credentials; + private $providerKey; + + /** + * Constructor. + * + * @param string|object $user The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method + * @param string $credentials This usually is the password of the user + * @param string $providerKey The provider key + * @param (RoleInterface|string)[] $roles An array of roles + * + * @throws \InvalidArgumentException + */ + public function __construct($user, $credentials, $providerKey, array $roles = array()) + { + parent::__construct($roles); + + if (empty($providerKey)) { + throw new \InvalidArgumentException('$providerKey must not be empty.'); + } + + $this->setUser($user); + $this->credentials = $credentials; + $this->providerKey = $providerKey; + + parent::setAuthenticated(count($roles) > 0); + } + + /** + * {@inheritdoc} + */ + public function setAuthenticated($isAuthenticated) + { + if ($isAuthenticated) { + throw new \LogicException('Cannot set this token to trusted after instantiation.'); + } + + parent::setAuthenticated(false); + } + + /** + * {@inheritdoc} + */ + public function getCredentials() + { + return $this->credentials; + } + + /** + * Returns the provider key. + * + * @return string The provider key + */ + public function getProviderKey() + { + return $this->providerKey; + } + + /** + * {@inheritdoc} + */ + public function eraseCredentials() + { + parent::eraseCredentials(); + + $this->credentials = null; + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize(array($this->credentials, $this->providerKey, parent::serialize())); + } + + /** + * {@inheritdoc} + */ + public function unserialize($serialized) + { + list($this->credentials, $this->providerKey, $parentStr) = unserialize($serialized); + parent::unserialize($parentStr); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/AuthenticationEvents.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/AuthenticationEvents.php new file mode 100644 index 0000000000000000000000000000000000000000..dfbd903fe323b71ffa1e95ddd60479cde163ec57 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/AuthenticationEvents.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core; + +final class AuthenticationEvents +{ + /** + * The AUTHENTICATION_SUCCESS event occurs after a user is authenticated + * by one provider. + * + * @Event("Symfony\Component\Security\Core\Event\AuthenticationEvent") + * + * @var string + */ + const AUTHENTICATION_SUCCESS = 'security.authentication.success'; + + /** + * The AUTHENTICATION_FAILURE event occurs after a user cannot be + * authenticated by any of the providers. + * + * @Event("Symfony\Component\Security\Core\Event\AuthenticationFailureEvent") + * + * @var string + */ + const AUTHENTICATION_FAILURE = 'security.authentication.failure'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php new file mode 100644 index 0000000000000000000000000000000000000000..e40d90664c736b56d1b055db1cf521eef311afd0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php @@ -0,0 +1,191 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authorization; + +use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * AccessDecisionManager is the base class for all access decision managers + * that use decision voters. + * + * @author Fabien Potencier + */ +class AccessDecisionManager implements AccessDecisionManagerInterface +{ + const STRATEGY_AFFIRMATIVE = 'affirmative'; + const STRATEGY_CONSENSUS = 'consensus'; + const STRATEGY_UNANIMOUS = 'unanimous'; + + private $voters; + private $strategy; + private $allowIfAllAbstainDecisions; + private $allowIfEqualGrantedDeniedDecisions; + + /** + * Constructor. + * + * @param VoterInterface[] $voters An array of VoterInterface instances + * @param string $strategy The vote strategy + * @param bool $allowIfAllAbstainDecisions Whether to grant access if all voters abstained or not + * @param bool $allowIfEqualGrantedDeniedDecisions Whether to grant access if result are equals + * + * @throws \InvalidArgumentException + */ + public function __construct(array $voters = array(), $strategy = self::STRATEGY_AFFIRMATIVE, $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true) + { + $strategyMethod = 'decide'.ucfirst($strategy); + if (!is_callable(array($this, $strategyMethod))) { + throw new \InvalidArgumentException(sprintf('The strategy "%s" is not supported.', $strategy)); + } + + $this->voters = $voters; + $this->strategy = $strategyMethod; + $this->allowIfAllAbstainDecisions = (bool) $allowIfAllAbstainDecisions; + $this->allowIfEqualGrantedDeniedDecisions = (bool) $allowIfEqualGrantedDeniedDecisions; + } + + /** + * Configures the voters. + * + * @param VoterInterface[] $voters An array of VoterInterface instances + */ + public function setVoters(array $voters) + { + $this->voters = $voters; + } + + /** + * {@inheritdoc} + */ + public function decide(TokenInterface $token, array $attributes, $object = null) + { + return $this->{$this->strategy}($token, $attributes, $object); + } + + /** + * Grants access if any voter returns an affirmative response. + * + * If all voters abstained from voting, the decision will be based on the + * allowIfAllAbstainDecisions property value (defaults to false). + */ + private function decideAffirmative(TokenInterface $token, array $attributes, $object = null) + { + $deny = 0; + foreach ($this->voters as $voter) { + $result = $voter->vote($token, $object, $attributes); + switch ($result) { + case VoterInterface::ACCESS_GRANTED: + return true; + + case VoterInterface::ACCESS_DENIED: + ++$deny; + + break; + + default: + break; + } + } + + if ($deny > 0) { + return false; + } + + return $this->allowIfAllAbstainDecisions; + } + + /** + * Grants access if there is consensus of granted against denied responses. + * + * Consensus means majority-rule (ignoring abstains) rather than unanimous + * agreement (ignoring abstains). If you require unanimity, see + * UnanimousBased. + * + * If there were an equal number of grant and deny votes, the decision will + * be based on the allowIfEqualGrantedDeniedDecisions property value + * (defaults to true). + * + * If all voters abstained from voting, the decision will be based on the + * allowIfAllAbstainDecisions property value (defaults to false). + */ + private function decideConsensus(TokenInterface $token, array $attributes, $object = null) + { + $grant = 0; + $deny = 0; + foreach ($this->voters as $voter) { + $result = $voter->vote($token, $object, $attributes); + + switch ($result) { + case VoterInterface::ACCESS_GRANTED: + ++$grant; + + break; + + case VoterInterface::ACCESS_DENIED: + ++$deny; + + break; + } + } + + if ($grant > $deny) { + return true; + } + + if ($deny > $grant) { + return false; + } + + if ($grant > 0) { + return $this->allowIfEqualGrantedDeniedDecisions; + } + + return $this->allowIfAllAbstainDecisions; + } + + /** + * Grants access if only grant (or abstain) votes were received. + * + * If all voters abstained from voting, the decision will be based on the + * allowIfAllAbstainDecisions property value (defaults to false). + */ + private function decideUnanimous(TokenInterface $token, array $attributes, $object = null) + { + $grant = 0; + foreach ($attributes as $attribute) { + foreach ($this->voters as $voter) { + $result = $voter->vote($token, $object, array($attribute)); + + switch ($result) { + case VoterInterface::ACCESS_GRANTED: + ++$grant; + + break; + + case VoterInterface::ACCESS_DENIED: + return false; + + default: + break; + } + } + } + + // no deny votes + if ($grant > 0) { + return true; + } + + return $this->allowIfAllAbstainDecisions; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManagerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManagerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..723ef19c4111d2aa7a690e647e31d311df023f62 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManagerInterface.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authorization; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * AccessDecisionManagerInterface makes authorization decisions. + * + * @author Fabien Potencier + */ +interface AccessDecisionManagerInterface +{ + /** + * Decides whether the access is possible or not. + * + * @param TokenInterface $token A TokenInterface instance + * @param array $attributes An array of attributes associated with the method being invoked + * @param object $object The object to secure + * + * @return bool true if the access is granted, false otherwise + */ + public function decide(TokenInterface $token, array $attributes, $object = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php new file mode 100644 index 0000000000000000000000000000000000000000..23c190cb563d01777115a3db11582c19b4ea6982 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authorization; + +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException; + +/** + * AuthorizationChecker is the main authorization point of the Security component. + * + * It gives access to the token representing the current user authentication. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class AuthorizationChecker implements AuthorizationCheckerInterface +{ + private $tokenStorage; + private $accessDecisionManager; + private $authenticationManager; + private $alwaysAuthenticate; + + /** + * Constructor. + * + * @param TokenStorageInterface $tokenStorage + * @param AuthenticationManagerInterface $authenticationManager An AuthenticationManager instance + * @param AccessDecisionManagerInterface $accessDecisionManager An AccessDecisionManager instance + * @param bool $alwaysAuthenticate + */ + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, AccessDecisionManagerInterface $accessDecisionManager, $alwaysAuthenticate = false) + { + $this->tokenStorage = $tokenStorage; + $this->authenticationManager = $authenticationManager; + $this->accessDecisionManager = $accessDecisionManager; + $this->alwaysAuthenticate = $alwaysAuthenticate; + } + + /** + * {@inheritdoc} + * + * @throws AuthenticationCredentialsNotFoundException when the token storage has no authentication token. + */ + final public function isGranted($attributes, $object = null) + { + if (null === ($token = $this->tokenStorage->getToken())) { + throw new AuthenticationCredentialsNotFoundException('The token storage contains no authentication token. One possible reason may be that there is no firewall configured for this URL.'); + } + + if ($this->alwaysAuthenticate || !$token->isAuthenticated()) { + $this->tokenStorage->setToken($token = $this->authenticationManager->authenticate($token)); + } + + if (!is_array($attributes)) { + $attributes = array($attributes); + } + + return $this->accessDecisionManager->decide($token, $attributes, $object); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AuthorizationCheckerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AuthorizationCheckerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..bd24d6f1c297dcb3c518475e1b803cb9e9fa0b68 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AuthorizationCheckerInterface.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\Security\Core\Authorization; + +/** + * The AuthorizationCheckerInterface. + * + * @author Johannes M. Schmitt + */ +interface AuthorizationCheckerInterface +{ + /** + * Checks if the attributes are granted against the current authentication token and optionally supplied object. + * + * @param mixed $attributes + * @param mixed $object + * + * @return bool + */ + public function isGranted($attributes, $object = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/DebugAccessDecisionManager.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/DebugAccessDecisionManager.php new file mode 100644 index 0000000000000000000000000000000000000000..219ca7621a852a882b950f549a430433cbcd113e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/DebugAccessDecisionManager.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authorization; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * Decorates the original AccessDecisionManager class to log information + * about the security voters and the decisions made by them. + * + * @author Javier Eguiluz + * + * @internal + */ +class DebugAccessDecisionManager implements AccessDecisionManagerInterface +{ + private $manager; + private $strategy; + private $voters = array(); + private $decisionLog = array(); + + public function __construct(AccessDecisionManagerInterface $manager) + { + $this->manager = $manager; + + if ($this->manager instanceof AccessDecisionManager) { + // The strategy is stored in a private property of the decorated service + $reflection = new \ReflectionProperty(AccessDecisionManager::class, 'strategy'); + $reflection->setAccessible(true); + $this->strategy = $reflection->getValue($manager); + } + } + + /** + * {@inheritdoc} + */ + public function decide(TokenInterface $token, array $attributes, $object = null) + { + $result = $this->manager->decide($token, $attributes, $object); + + $this->decisionLog[] = array( + 'attributes' => $attributes, + 'object' => $object, + 'result' => $result, + ); + + return $result; + } + + /** + * {@inheritdoc} + */ + public function setVoters(array $voters) + { + if (!method_exists($this->manager, 'setVoters')) { + return; + } + + $this->voters = $voters; + $this->manager->setVoters($voters); + } + + /** + * @return string + */ + public function getStrategy() + { + // The $strategy property is misleading because it stores the name of its + // method (e.g. 'decideAffirmative') instead of the original strategy name + // (e.g. 'affirmative') + return null === $this->strategy ? '-' : strtolower(substr($this->strategy, 6)); + } + + /** + * @return array + */ + public function getVoters() + { + return $this->voters; + } + + /** + * @return array + */ + public function getDecisionLog() + { + return $this->decisionLog; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php new file mode 100644 index 0000000000000000000000000000000000000000..c2925af87121aaecc1a023900426567a8673667e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authorization; + +use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage; +use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface; + +/** + * Adds some function to the default ExpressionLanguage. + * + * @author Fabien Potencier + * + * @see ExpressionLanguageProvider + */ +class ExpressionLanguage extends BaseExpressionLanguage +{ + public function __construct(ParserCacheInterface $cache = null, array $providers = array()) + { + // prepend the default provider to let users override it easily + array_unshift($providers, new ExpressionLanguageProvider()); + + parent::__construct($cache, $providers); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguageProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguageProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..9293ba7e39d4ee4a04cb31cc3ccc244392bcefb4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguageProvider.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\Component\Security\Core\Authorization; + +use Symfony\Component\ExpressionLanguage\ExpressionFunction; +use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; + +/** + * Define some ExpressionLanguage functions. + * + * @author Fabien Potencier + */ +class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface +{ + public function getFunctions() + { + return array( + new ExpressionFunction('is_anonymous', function () { + return '$trust_resolver->isAnonymous($token)'; + }, function (array $variables) { + return $variables['trust_resolver']->isAnonymous($variables['token']); + }), + + new ExpressionFunction('is_authenticated', function () { + return '$token && !$trust_resolver->isAnonymous($token)'; + }, function (array $variables) { + return $variables['token'] && !$variables['trust_resolver']->isAnonymous($variables['token']); + }), + + new ExpressionFunction('is_fully_authenticated', function () { + return '$trust_resolver->isFullFledged($token)'; + }, function (array $variables) { + return $variables['trust_resolver']->isFullFledged($variables['token']); + }), + + new ExpressionFunction('is_remember_me', function () { + return '$trust_resolver->isRememberMe($token)'; + }, function (array $variables) { + return $variables['trust_resolver']->isRememberMe($variables['token']); + }), + + new ExpressionFunction('has_role', function ($role) { + return sprintf('in_array(%s, $roles)', $role); + }, function (array $variables, $role) { + return in_array($role, $variables['roles']); + }), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php new file mode 100644 index 0000000000000000000000000000000000000000..dc1407b9435dbd37db4a527e63d838354b0432dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authorization\Voter; + +use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * AuthenticatedVoter votes if an attribute like IS_AUTHENTICATED_FULLY, + * IS_AUTHENTICATED_REMEMBERED, or IS_AUTHENTICATED_ANONYMOUSLY is present. + * + * This list is most restrictive to least restrictive checking. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class AuthenticatedVoter implements VoterInterface +{ + const IS_AUTHENTICATED_FULLY = 'IS_AUTHENTICATED_FULLY'; + const IS_AUTHENTICATED_REMEMBERED = 'IS_AUTHENTICATED_REMEMBERED'; + const IS_AUTHENTICATED_ANONYMOUSLY = 'IS_AUTHENTICATED_ANONYMOUSLY'; + + private $authenticationTrustResolver; + + /** + * Constructor. + * + * @param AuthenticationTrustResolverInterface $authenticationTrustResolver + */ + public function __construct(AuthenticationTrustResolverInterface $authenticationTrustResolver) + { + $this->authenticationTrustResolver = $authenticationTrustResolver; + } + + /** + * {@inheritdoc} + */ + public function vote(TokenInterface $token, $subject, array $attributes) + { + $result = VoterInterface::ACCESS_ABSTAIN; + foreach ($attributes as $attribute) { + if (null === $attribute || (self::IS_AUTHENTICATED_FULLY !== $attribute + && self::IS_AUTHENTICATED_REMEMBERED !== $attribute + && self::IS_AUTHENTICATED_ANONYMOUSLY !== $attribute)) { + continue; + } + + $result = VoterInterface::ACCESS_DENIED; + + if (self::IS_AUTHENTICATED_FULLY === $attribute + && $this->authenticationTrustResolver->isFullFledged($token)) { + return VoterInterface::ACCESS_GRANTED; + } + + if (self::IS_AUTHENTICATED_REMEMBERED === $attribute + && ($this->authenticationTrustResolver->isRememberMe($token) + || $this->authenticationTrustResolver->isFullFledged($token))) { + return VoterInterface::ACCESS_GRANTED; + } + + if (self::IS_AUTHENTICATED_ANONYMOUSLY === $attribute + && ($this->authenticationTrustResolver->isAnonymous($token) + || $this->authenticationTrustResolver->isRememberMe($token) + || $this->authenticationTrustResolver->isFullFledged($token))) { + return VoterInterface::ACCESS_GRANTED; + } + } + + return $result; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php new file mode 100644 index 0000000000000000000000000000000000000000..5fd8b83cf3077f61fdd375df293876197a761557 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authorization\Voter; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; +use Symfony\Component\Security\Core\Authorization\ExpressionLanguage; +use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; +use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; +use Symfony\Component\ExpressionLanguage\Expression; +use Symfony\Component\HttpFoundation\Request; + +/** + * ExpressionVoter votes based on the evaluation of an expression. + * + * @author Fabien Potencier + */ +class ExpressionVoter implements VoterInterface +{ + private $expressionLanguage; + private $trustResolver; + private $roleHierarchy; + + /** + * Constructor. + * + * @param ExpressionLanguage $expressionLanguage + * @param AuthenticationTrustResolverInterface $trustResolver + * @param RoleHierarchyInterface|null $roleHierarchy + */ + public function __construct(ExpressionLanguage $expressionLanguage, AuthenticationTrustResolverInterface $trustResolver, RoleHierarchyInterface $roleHierarchy = null) + { + $this->expressionLanguage = $expressionLanguage; + $this->trustResolver = $trustResolver; + $this->roleHierarchy = $roleHierarchy; + } + + public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) + { + $this->expressionLanguage->registerProvider($provider); + } + + /** + * {@inheritdoc} + */ + public function vote(TokenInterface $token, $subject, array $attributes) + { + $result = VoterInterface::ACCESS_ABSTAIN; + $variables = null; + foreach ($attributes as $attribute) { + if (!$attribute instanceof Expression) { + continue; + } + + if (null === $variables) { + $variables = $this->getVariables($token, $subject); + } + + $result = VoterInterface::ACCESS_DENIED; + if ($this->expressionLanguage->evaluate($attribute, $variables)) { + return VoterInterface::ACCESS_GRANTED; + } + } + + return $result; + } + + private function getVariables(TokenInterface $token, $subject) + { + if (null !== $this->roleHierarchy) { + $roles = $this->roleHierarchy->getReachableRoles($token->getRoles()); + } else { + $roles = $token->getRoles(); + } + + $variables = array( + 'token' => $token, + 'user' => $token->getUser(), + 'object' => $subject, + 'subject' => $subject, + 'roles' => array_map(function ($role) { return $role->getRole(); }, $roles), + 'trust_resolver' => $this->trustResolver, + ); + + // this is mainly to propose a better experience when the expression is used + // in an access control rule, as the developer does not know that it's going + // to be handled by this voter + if ($subject instanceof Request) { + $variables['request'] = $subject; + } + + return $variables; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php new file mode 100644 index 0000000000000000000000000000000000000000..c8f9b7ec8e8a9b65e32b8f090244003b69d3ea2e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authorization\Voter; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; + +/** + * RoleHierarchyVoter uses a RoleHierarchy to determine the roles granted to + * the user before voting. + * + * @author Fabien Potencier + */ +class RoleHierarchyVoter extends RoleVoter +{ + private $roleHierarchy; + + public function __construct(RoleHierarchyInterface $roleHierarchy, $prefix = 'ROLE_') + { + $this->roleHierarchy = $roleHierarchy; + + parent::__construct($prefix); + } + + /** + * {@inheritdoc} + */ + protected function extractRoles(TokenInterface $token) + { + return $this->roleHierarchy->getReachableRoles($token->getRoles()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php new file mode 100644 index 0000000000000000000000000000000000000000..d5f31760793d802e9c13a4f6552726c842927d7e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authorization\Voter; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Role\RoleInterface; + +/** + * RoleVoter votes if any attribute starts with a given prefix. + * + * @author Fabien Potencier + */ +class RoleVoter implements VoterInterface +{ + private $prefix; + + /** + * Constructor. + * + * @param string $prefix The role prefix + */ + public function __construct($prefix = 'ROLE_') + { + $this->prefix = $prefix; + } + + /** + * {@inheritdoc} + */ + public function vote(TokenInterface $token, $subject, array $attributes) + { + $result = VoterInterface::ACCESS_ABSTAIN; + $roles = $this->extractRoles($token); + + foreach ($attributes as $attribute) { + if ($attribute instanceof RoleInterface) { + $attribute = $attribute->getRole(); + } + + if (!is_string($attribute) || 0 !== strpos($attribute, $this->prefix)) { + continue; + } + + $result = VoterInterface::ACCESS_DENIED; + foreach ($roles as $role) { + if ($attribute === $role->getRole()) { + return VoterInterface::ACCESS_GRANTED; + } + } + } + + return $result; + } + + protected function extractRoles(TokenInterface $token) + { + return $token->getRoles(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php new file mode 100644 index 0000000000000000000000000000000000000000..0641486b7a13ba4f27cbadb7260ecbd4db2069bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authorization\Voter; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * Voter is an abstract default implementation of a voter. + * + * @author Roman MarintÅ¡enko + * @author Grégoire Pineau + */ +abstract class Voter implements VoterInterface +{ + /** + * {@inheritdoc} + */ + public function vote(TokenInterface $token, $subject, array $attributes) + { + // abstain vote by default in case none of the attributes are supported + $vote = self::ACCESS_ABSTAIN; + + foreach ($attributes as $attribute) { + if (!$this->supports($attribute, $subject)) { + continue; + } + + // as soon as at least one attribute is supported, default is to deny access + $vote = self::ACCESS_DENIED; + + if ($this->voteOnAttribute($attribute, $subject, $token)) { + // grant access as soon as at least one attribute returns a positive response + return self::ACCESS_GRANTED; + } + } + + return $vote; + } + + /** + * Determines if the attribute and subject are supported by this voter. + * + * @param string $attribute An attribute + * @param mixed $subject The subject to secure, e.g. an object the user wants to access or any other PHP type + * + * @return bool True if the attribute and subject are supported, false otherwise + */ + abstract protected function supports($attribute, $subject); + + /** + * Perform a single access check operation on a given attribute, subject and token. + * It is safe to assume that $attribute and $subject already passed the "supports()" method check. + * + * @param string $attribute + * @param mixed $subject + * @param TokenInterface $token + * + * @return bool + */ + abstract protected function voteOnAttribute($attribute, $subject, TokenInterface $token); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..4bb73672c069d56c97105c35311355a805476711 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Authorization\Voter; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * VoterInterface is the interface implemented by all voters. + * + * @author Fabien Potencier + */ +interface VoterInterface +{ + const ACCESS_GRANTED = 1; + const ACCESS_ABSTAIN = 0; + const ACCESS_DENIED = -1; + + /** + * Returns the vote for the given parameters. + * + * This method must return one of the following constants: + * ACCESS_GRANTED, ACCESS_DENIED, or ACCESS_ABSTAIN. + * + * @param TokenInterface $token A TokenInterface instance + * @param mixed $subject The subject to secure + * @param array $attributes An array of attributes associated with the method being invoked + * + * @return int either ACCESS_GRANTED, ACCESS_ABSTAIN, or ACCESS_DENIED + */ + public function vote(TokenInterface $token, $subject, array $attributes); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..8278ef34fa625b3c9c7987362cb77f4f7be6037a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Encoder; + +use Symfony\Component\Security\Core\Exception\BadCredentialsException; + +/** + * @author Elnur Abdurrakhimov + * @author Terje BrÃ¥ten + */ +class BCryptPasswordEncoder extends BasePasswordEncoder +{ + const MAX_PASSWORD_LENGTH = 72; + + /** + * @var string + */ + private $cost; + + /** + * Constructor. + * + * @param int $cost The algorithmic cost that should be used + * + * @throws \RuntimeException When no BCrypt encoder is available + * @throws \InvalidArgumentException if cost is out of range + */ + public function __construct($cost) + { + $cost = (int) $cost; + if ($cost < 4 || $cost > 31) { + throw new \InvalidArgumentException('Cost must be in the range of 4-31.'); + } + + $this->cost = $cost; + } + + /** + * Encodes the raw password. + * + * It doesn't work with PHP versions lower than 5.3.7, since + * the password compat library uses CRYPT_BLOWFISH hash type with + * the "$2y$" salt prefix (which is not available in the early PHP versions). + * + * @see https://github.com/ircmaxell/password_compat/issues/10#issuecomment-11203833 + * + * It is almost best to **not** pass a salt and let PHP generate one for you. + * + * @param string $raw The password to encode + * @param string $salt The salt + * + * @return string The encoded password + * + * @throws BadCredentialsException when the given password is too long + * + * @see http://lxr.php.net/xref/PHP_5_5/ext/standard/password.c#111 + */ + public function encodePassword($raw, $salt) + { + if ($this->isPasswordTooLong($raw)) { + throw new BadCredentialsException('Invalid password.'); + } + + $options = array('cost' => $this->cost); + + if ($salt) { + // Ignore $salt, the auto-generated one is always the best + } + + return password_hash($raw, PASSWORD_BCRYPT, $options); + } + + /** + * {@inheritdoc} + */ + public function isPasswordValid($encoded, $raw, $salt) + { + return !$this->isPasswordTooLong($raw) && password_verify($raw, $encoded); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..d86f26039a283642fab94256a960f7842e4304f1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Encoder; + +/** + * BasePasswordEncoder is the base class for all password encoders. + * + * @author Fabien Potencier + */ +abstract class BasePasswordEncoder implements PasswordEncoderInterface +{ + const MAX_PASSWORD_LENGTH = 4096; + + /** + * Demerges a merge password and salt string. + * + * @param string $mergedPasswordSalt The merged password and salt string + * + * @return array An array where the first element is the password and the second the salt + */ + protected function demergePasswordAndSalt($mergedPasswordSalt) + { + if (empty($mergedPasswordSalt)) { + return array('', ''); + } + + $password = $mergedPasswordSalt; + $salt = ''; + $saltBegins = strrpos($mergedPasswordSalt, '{'); + + if (false !== $saltBegins && $saltBegins + 1 < strlen($mergedPasswordSalt)) { + $salt = substr($mergedPasswordSalt, $saltBegins + 1, -1); + $password = substr($mergedPasswordSalt, 0, $saltBegins); + } + + return array($password, $salt); + } + + /** + * Merges a password and a salt. + * + * @param string $password the password to be used + * @param string $salt the salt to be used + * + * @return string a merged password and salt + * + * @throws \InvalidArgumentException + */ + protected function mergePasswordAndSalt($password, $salt) + { + if (empty($salt)) { + return $password; + } + + if (false !== strrpos($salt, '{') || false !== strrpos($salt, '}')) { + throw new \InvalidArgumentException('Cannot use { or } in salt.'); + } + + return $password.'{'.$salt.'}'; + } + + /** + * Compares two passwords. + * + * This method implements a constant-time algorithm to compare passwords to + * avoid (remote) timing attacks. + * + * @param string $password1 The first password + * @param string $password2 The second password + * + * @return bool true if the two passwords are the same, false otherwise + */ + protected function comparePasswords($password1, $password2) + { + return hash_equals($password1, $password2); + } + + /** + * Checks if the password is too long. + * + * @param string $password The password to check + * + * @return bool true if the password is too long, false otherwise + */ + protected function isPasswordTooLong($password) + { + return strlen($password) > static::MAX_PASSWORD_LENGTH; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderAwareInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderAwareInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..22ae820cce394c8f8c53c2f8ff9ea1e82668470b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderAwareInterface.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Encoder; + +/** + * @author Christophe Coevoet + */ +interface EncoderAwareInterface +{ + /** + * Gets the name of the encoder used to encode the password. + * + * If the method returns null, the standard way to retrieve the encoder + * will be used instead. + * + * @return string + */ + public function getEncoderName(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..7794b2f4dbcc15722ddaa1496e2c5db86f56fafa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Encoder; + +/** + * A generic encoder factory implementation. + * + * @author Johannes M. Schmitt + */ +class EncoderFactory implements EncoderFactoryInterface +{ + private $encoders; + + public function __construct(array $encoders) + { + $this->encoders = $encoders; + } + + /** + * {@inheritdoc} + */ + public function getEncoder($user) + { + $encoderKey = null; + + if ($user instanceof EncoderAwareInterface && (null !== $encoderName = $user->getEncoderName())) { + if (!array_key_exists($encoderName, $this->encoders)) { + throw new \RuntimeException(sprintf('The encoder "%s" was not configured.', $encoderName)); + } + + $encoderKey = $encoderName; + } else { + foreach ($this->encoders as $class => $encoder) { + if ((is_object($user) && $user instanceof $class) || (!is_object($user) && (is_subclass_of($user, $class) || $user == $class))) { + $encoderKey = $class; + break; + } + } + } + + if (null === $encoderKey) { + throw new \RuntimeException(sprintf('No encoder has been configured for account "%s".', is_object($user) ? get_class($user) : $user)); + } + + if (!$this->encoders[$encoderKey] instanceof PasswordEncoderInterface) { + $this->encoders[$encoderKey] = $this->createEncoder($this->encoders[$encoderKey]); + } + + return $this->encoders[$encoderKey]; + } + + /** + * Creates the actual encoder instance. + * + * @param array $config + * + * @return PasswordEncoderInterface + * + * @throws \InvalidArgumentException + */ + private function createEncoder(array $config) + { + if (isset($config['algorithm'])) { + $config = $this->getEncoderConfigFromAlgorithm($config); + } + if (!isset($config['class'])) { + throw new \InvalidArgumentException(sprintf('"class" must be set in %s.', json_encode($config))); + } + if (!isset($config['arguments'])) { + throw new \InvalidArgumentException(sprintf('"arguments" must be set in %s.', json_encode($config))); + } + + $reflection = new \ReflectionClass($config['class']); + + return $reflection->newInstanceArgs($config['arguments']); + } + + private function getEncoderConfigFromAlgorithm($config) + { + switch ($config['algorithm']) { + case 'plaintext': + return array( + 'class' => PlaintextPasswordEncoder::class, + 'arguments' => array($config['ignore_case']), + ); + + case 'pbkdf2': + return array( + 'class' => Pbkdf2PasswordEncoder::class, + 'arguments' => array( + $config['hash_algorithm'], + $config['encode_as_base64'], + $config['iterations'], + $config['key_length'], + ), + ); + + case 'bcrypt': + return array( + 'class' => BCryptPasswordEncoder::class, + 'arguments' => array($config['cost']), + ); + } + + return array( + 'class' => MessageDigestPasswordEncoder::class, + 'arguments' => array( + $config['algorithm'], + $config['encode_as_base64'], + $config['iterations'], + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..2b9834b6a041c70837ea2b481337805a6400b39f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Encoder; + +use Symfony\Component\Security\Core\User\UserInterface; + +/** + * EncoderFactoryInterface to support different encoders for different accounts. + * + * @author Johannes M. Schmitt + */ +interface EncoderFactoryInterface +{ + /** + * Returns the password encoder to use for the given account. + * + * @param UserInterface|string $user A UserInterface instance or a class name + * + * @return PasswordEncoderInterface + * + * @throws \RuntimeException when no password encoder could be found for the user + */ + public function getEncoder($user); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..1706fc86a8eb7acd71a5c2a1e494bc88246c72b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Encoder; + +use Symfony\Component\Security\Core\Exception\BadCredentialsException; + +/** + * MessageDigestPasswordEncoder uses a message digest algorithm. + * + * @author Fabien Potencier + */ +class MessageDigestPasswordEncoder extends BasePasswordEncoder +{ + private $algorithm; + private $encodeHashAsBase64; + private $iterations; + + /** + * Constructor. + * + * @param string $algorithm The digest algorithm to use + * @param bool $encodeHashAsBase64 Whether to base64 encode the password hash + * @param int $iterations The number of iterations to use to stretch the password hash + */ + public function __construct($algorithm = 'sha512', $encodeHashAsBase64 = true, $iterations = 5000) + { + $this->algorithm = $algorithm; + $this->encodeHashAsBase64 = $encodeHashAsBase64; + $this->iterations = $iterations; + } + + /** + * {@inheritdoc} + */ + public function encodePassword($raw, $salt) + { + if ($this->isPasswordTooLong($raw)) { + throw new BadCredentialsException('Invalid password.'); + } + + if (!in_array($this->algorithm, hash_algos(), true)) { + throw new \LogicException(sprintf('The algorithm "%s" is not supported.', $this->algorithm)); + } + + $salted = $this->mergePasswordAndSalt($raw, $salt); + $digest = hash($this->algorithm, $salted, true); + + // "stretch" hash + for ($i = 1; $i < $this->iterations; ++$i) { + $digest = hash($this->algorithm, $digest.$salted, true); + } + + return $this->encodeHashAsBase64 ? base64_encode($digest) : bin2hex($digest); + } + + /** + * {@inheritdoc} + */ + public function isPasswordValid($encoded, $raw, $salt) + { + return !$this->isPasswordTooLong($raw) && $this->comparePasswords($encoded, $this->encodePassword($raw, $salt)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..8c018be201bb86a56ceccd89e9ee2cc54447ac83 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Encoder; + +/** + * PasswordEncoderInterface is the interface for all encoders. + * + * @author Fabien Potencier + */ +interface PasswordEncoderInterface +{ + /** + * Encodes the raw password. + * + * @param string $raw The password to encode + * @param string $salt The salt + * + * @return string The encoded password + */ + public function encodePassword($raw, $salt); + + /** + * Checks a raw password against an encoded password. + * + * @param string $encoded An encoded password + * @param string $raw A raw password + * @param string $salt The salt + * + * @return bool true if the password is valid, false otherwise + */ + public function isPasswordValid($encoded, $raw, $salt); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..8422a4baaea026be38a058d0ae0747e9c7bd3fb3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Encoder; + +use Symfony\Component\Security\Core\Exception\BadCredentialsException; + +/** + * Pbkdf2PasswordEncoder uses the PBKDF2 (Password-Based Key Derivation Function 2). + * + * Providing a high level of Cryptographic security, + * PBKDF2 is recommended by the National Institute of Standards and Technology (NIST). + * + * But also warrants a warning, using PBKDF2 (with a high number of iterations) slows down the process. + * PBKDF2 should be used with caution and care. + * + * @author Sebastiaan Stok + * @author Andrew Johnson + * @author Fabien Potencier + */ +class Pbkdf2PasswordEncoder extends BasePasswordEncoder +{ + private $algorithm; + private $encodeHashAsBase64; + private $iterations; + private $length; + + /** + * Constructor. + * + * @param string $algorithm The digest algorithm to use + * @param bool $encodeHashAsBase64 Whether to base64 encode the password hash + * @param int $iterations The number of iterations to use to stretch the password hash + * @param int $length Length of derived key to create + */ + public function __construct($algorithm = 'sha512', $encodeHashAsBase64 = true, $iterations = 1000, $length = 40) + { + $this->algorithm = $algorithm; + $this->encodeHashAsBase64 = $encodeHashAsBase64; + $this->iterations = $iterations; + $this->length = $length; + } + + /** + * {@inheritdoc} + * + * @throws \LogicException when the algorithm is not supported + */ + public function encodePassword($raw, $salt) + { + if ($this->isPasswordTooLong($raw)) { + throw new BadCredentialsException('Invalid password.'); + } + + if (!in_array($this->algorithm, hash_algos(), true)) { + throw new \LogicException(sprintf('The algorithm "%s" is not supported.', $this->algorithm)); + } + + $digest = hash_pbkdf2($this->algorithm, $raw, $salt, $this->iterations, $this->length, true); + + return $this->encodeHashAsBase64 ? base64_encode($digest) : bin2hex($digest); + } + + /** + * {@inheritdoc} + */ + public function isPasswordValid($encoded, $raw, $salt) + { + return !$this->isPasswordTooLong($raw) && $this->comparePasswords($encoded, $this->encodePassword($raw, $salt)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/PlaintextPasswordEncoder.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/PlaintextPasswordEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..09059f667a35a8fc10ac05f5cf893032c3d8a6ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/PlaintextPasswordEncoder.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Encoder; + +use Symfony\Component\Security\Core\Exception\BadCredentialsException; + +/** + * PlaintextPasswordEncoder does not do any encoding. + * + * @author Fabien Potencier + */ +class PlaintextPasswordEncoder extends BasePasswordEncoder +{ + private $ignorePasswordCase; + + /** + * Constructor. + * + * @param bool $ignorePasswordCase Compare password case-insensitive + */ + public function __construct($ignorePasswordCase = false) + { + $this->ignorePasswordCase = $ignorePasswordCase; + } + + /** + * {@inheritdoc} + */ + public function encodePassword($raw, $salt) + { + if ($this->isPasswordTooLong($raw)) { + throw new BadCredentialsException('Invalid password.'); + } + + return $this->mergePasswordAndSalt($raw, $salt); + } + + /** + * {@inheritdoc} + */ + public function isPasswordValid($encoded, $raw, $salt) + { + if ($this->isPasswordTooLong($raw)) { + return false; + } + + $pass2 = $this->mergePasswordAndSalt($raw, $salt); + + if (!$this->ignorePasswordCase) { + return $this->comparePasswords($encoded, $pass2); + } + + return $this->comparePasswords(strtolower($encoded), strtolower($pass2)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoder.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..b09604952e0ef92de48bf9775aeaf3c2f18acbfe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoder.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Encoder; + +use Symfony\Component\Security\Core\User\UserInterface; + +/** + * A generic password encoder. + * + * @author Ariel Ferrandini + */ +class UserPasswordEncoder implements UserPasswordEncoderInterface +{ + /** + * @var EncoderFactoryInterface + */ + private $encoderFactory; + + /** + * @param EncoderFactoryInterface $encoderFactory The encoder factory + */ + public function __construct(EncoderFactoryInterface $encoderFactory) + { + $this->encoderFactory = $encoderFactory; + } + + /** + * {@inheritdoc} + */ + public function encodePassword(UserInterface $user, $plainPassword) + { + $encoder = $this->encoderFactory->getEncoder($user); + + return $encoder->encodePassword($plainPassword, $user->getSalt()); + } + + /** + * {@inheritdoc} + */ + public function isPasswordValid(UserInterface $user, $raw) + { + $encoder = $this->encoderFactory->getEncoder($user); + + return $encoder->isPasswordValid($user->getPassword(), $raw, $user->getSalt()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..7861caab20ca6007d09c9ebb1318cc3d00d355ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoderInterface.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Encoder; + +use Symfony\Component\Security\Core\User\UserInterface; + +/** + * UserPasswordEncoderInterface is the interface for the password encoder service. + * + * @author Ariel Ferrandini + */ +interface UserPasswordEncoderInterface +{ + /** + * Encodes the plain password. + * + * @param UserInterface $user The user + * @param string $plainPassword The password to encode + * + * @return string The encoded password + */ + public function encodePassword(UserInterface $user, $plainPassword); + + /** + * @param UserInterface $user The user + * @param string $raw A raw password + * + * @return bool true if the password is valid, false otherwise + */ + public function isPasswordValid(UserInterface $user, $raw); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Event/AuthenticationEvent.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Event/AuthenticationEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..132cea99c327d4e5b668cef6d2f9f830ea95abba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Event/AuthenticationEvent.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Event; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\EventDispatcher\Event; + +/** + * This is a general purpose authentication event. + * + * @author Johannes M. Schmitt + */ +class AuthenticationEvent extends Event +{ + private $authenticationToken; + + public function __construct(TokenInterface $token) + { + $this->authenticationToken = $token; + } + + public function getAuthenticationToken() + { + return $this->authenticationToken; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Event/AuthenticationFailureEvent.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Event/AuthenticationFailureEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..6705fc9d64d7b1cf786e0f17b09600ba0a6d3f12 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Event/AuthenticationFailureEvent.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Event; + +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * This event is dispatched on authentication failure. + * + * @author Johannes M. Schmitt + */ +class AuthenticationFailureEvent extends AuthenticationEvent +{ + private $authenticationException; + + public function __construct(TokenInterface $token, AuthenticationException $ex) + { + parent::__construct($token); + + $this->authenticationException = $ex; + } + + public function getAuthenticationException() + { + return $this->authenticationException; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccessDeniedException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccessDeniedException.php new file mode 100644 index 0000000000000000000000000000000000000000..a16044ff000a79148c65b09b096bca862a631f3c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccessDeniedException.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +/** + * AccessDeniedException is thrown when the account has not the required role. + * + * @author Fabien Potencier + */ +class AccessDeniedException extends \RuntimeException +{ + private $attributes = array(); + private $subject; + + public function __construct($message = 'Access Denied.', \Exception $previous = null) + { + parent::__construct($message, 403, $previous); + } + + /** + * @return array + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * @param array|string $attributes + */ + public function setAttributes($attributes) + { + $this->attributes = (array) $attributes; + } + + /** + * @return mixed + */ + public function getSubject() + { + return $this->subject; + } + + /** + * @param mixed $subject + */ + public function setSubject($subject) + { + $this->subject = $subject; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccountExpiredException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccountExpiredException.php new file mode 100644 index 0000000000000000000000000000000000000000..4a712637b0e244b9efe2ac52ac5e6a0b4880a5b4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccountExpiredException.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\Component\Security\Core\Exception; + +/** + * AccountExpiredException is thrown when the user account has expired. + * + * @author Fabien Potencier + * @author Alexander + */ +class AccountExpiredException extends AccountStatusException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Account has expired.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php new file mode 100644 index 0000000000000000000000000000000000000000..9b29f634b4c8a9feaef7793b52121fc87124b90c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +use Symfony\Component\Security\Core\User\UserInterface; + +/** + * AccountStatusException is the base class for authentication exceptions + * caused by the user account status. + * + * @author Fabien Potencier + * @author Alexander + */ +abstract class AccountStatusException extends AuthenticationException +{ + private $user; + + /** + * Get the user. + * + * @return UserInterface + */ + public function getUser() + { + return $this->user; + } + + /** + * Set the user. + * + * @param UserInterface $user + */ + public function setUser(UserInterface $user) + { + $this->user = $user; + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize(array( + $this->user, + parent::serialize(), + )); + } + + /** + * {@inheritdoc} + */ + public function unserialize($str) + { + list($this->user, $parentData) = unserialize($str); + + parent::unserialize($parentData); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationCredentialsNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationCredentialsNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..8595bed81237cea054d0d53706db2c9765eda413 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationCredentialsNotFoundException.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\Security\Core\Exception; + +/** + * AuthenticationCredentialsNotFoundException is thrown when an authentication is rejected + * because no Token is available. + * + * @author Fabien Potencier + * @author Alexander + */ +class AuthenticationCredentialsNotFoundException extends AuthenticationException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Authentication credentials could not be found.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php new file mode 100644 index 0000000000000000000000000000000000000000..2b897c251302c63bbb5cefdc9464d5f6b1eafdea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * AuthenticationException is the base class for all authentication exceptions. + * + * @author Fabien Potencier + * @author Alexander + */ +class AuthenticationException extends \RuntimeException implements \Serializable +{ + private $token; + + /** + * Get the token. + * + * @return TokenInterface + */ + public function getToken() + { + return $this->token; + } + + /** + * Set the token. + * + * @param TokenInterface $token + */ + public function setToken(TokenInterface $token) + { + $this->token = $token; + } + + public function serialize() + { + return serialize(array( + $this->token, + $this->code, + $this->message, + $this->file, + $this->line, + )); + } + + public function unserialize($str) + { + list( + $this->token, + $this->code, + $this->message, + $this->file, + $this->line + ) = unserialize($str); + } + + /** + * Message key to be used by the translation component. + * + * @return string + */ + public function getMessageKey() + { + return 'An authentication exception occurred.'; + } + + /** + * Message data to be used by the translation component. + * + * @return array + */ + public function getMessageData() + { + return array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationExpiredException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationExpiredException.php new file mode 100644 index 0000000000000000000000000000000000000000..caf2e6cc38601e7f2a300e1818116053c5613066 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationExpiredException.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +/** + * AuthenticationServiceException is thrown when an authenticated token becomes un-authentcated between requests. + * + * In practice, this is due to the User changing between requests (e.g. password changes), + * causes the token to become un-authenticated. + * + * @author Ryan Weaver + */ +class AuthenticationExpiredException extends AccountStatusException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Authentication expired because your account information has changed.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationServiceException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationServiceException.php new file mode 100644 index 0000000000000000000000000000000000000000..66f051d0042052c70fc88012d3ba4f8b49b6ab9e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/AuthenticationServiceException.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\Component\Security\Core\Exception; + +/** + * AuthenticationServiceException is thrown when an authentication request could not be processed due to a system problem. + * + * @author Fabien Potencier + * @author Alexander + */ +class AuthenticationServiceException extends AuthenticationException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Authentication request could not be processed due to a system problem.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/BadCredentialsException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/BadCredentialsException.php new file mode 100644 index 0000000000000000000000000000000000000000..be061c7baa9bdaeade7c839fdaf7aa3765daed93 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/BadCredentialsException.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\Component\Security\Core\Exception; + +/** + * BadCredentialsException is thrown when the user credentials are invalid. + * + * @author Fabien Potencier + * @author Alexander + */ +class BadCredentialsException extends AuthenticationException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Invalid credentials.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CookieTheftException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CookieTheftException.php new file mode 100644 index 0000000000000000000000000000000000000000..af971684956a3997932c635de7c74d1ec9b8d86b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CookieTheftException.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\Security\Core\Exception; + +/** + * This exception is thrown when the RememberMeServices implementation + * detects that a presented cookie has already been used by someone else. + * + * @author Johannes M. Schmitt + * @author Alexander + */ +class CookieTheftException extends AuthenticationException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Cookie has already been used by someone else.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CredentialsExpiredException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CredentialsExpiredException.php new file mode 100644 index 0000000000000000000000000000000000000000..bcc1267a5f4e76ff1b5c4d9789df840b313ea731 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CredentialsExpiredException.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\Component\Security\Core\Exception; + +/** + * CredentialsExpiredException is thrown when the user account credentials have expired. + * + * @author Fabien Potencier + * @author Alexander + */ +class CredentialsExpiredException extends AccountStatusException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Credentials have expired.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAuthenticationException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAuthenticationException.php new file mode 100644 index 0000000000000000000000000000000000000000..9f5071f4307db9f857a08ea0e79d5db90a3af572 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/CustomUserMessageAuthenticationException.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +/** + * An authentication exception where you can control the message shown to the user. + * + * Be sure that the message passed to this exception is something that + * can be shown safely to your user. In other words, avoid catching + * other exceptions and passing their message directly to this class. + * + * @author Ryan Weaver + */ +class CustomUserMessageAuthenticationException extends AuthenticationException +{ + private $messageKey; + + private $messageData = array(); + + public function __construct($message = '', array $messageData = array(), $code = 0, \Exception $previous = null) + { + parent::__construct($message, $code, $previous); + + $this->setSafeMessage($message, $messageData); + } + + /** + * Set a message that will be shown to the user. + * + * @param string $messageKey The message or message key + * @param array $messageData Data to be passed into the translator + */ + public function setSafeMessage($messageKey, array $messageData = array()) + { + $this->messageKey = $messageKey; + $this->messageData = $messageData; + } + + public function getMessageKey() + { + return $this->messageKey; + } + + public function getMessageData() + { + return $this->messageData; + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize(array( + parent::serialize(), + $this->messageKey, + $this->messageData, + )); + } + + /** + * {@inheritdoc} + */ + public function unserialize($str) + { + list($parentData, $this->messageKey, $this->messageData) = unserialize($str); + + parent::unserialize($parentData); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/DisabledException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/DisabledException.php new file mode 100644 index 0000000000000000000000000000000000000000..e9b784fbd49792959b551260659fc143fdfedfa7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/DisabledException.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\Component\Security\Core\Exception; + +/** + * DisabledException is thrown when the user account is disabled. + * + * @author Fabien Potencier + * @author Alexander + */ +class DisabledException extends AccountStatusException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Account is disabled.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5000d0278083b834be28aa5a3c0a3b62bf8b1e77 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +/** + * Base ExceptionInterface for the Security component. + * + * @author Bernhard Schussek + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/InsufficientAuthenticationException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/InsufficientAuthenticationException.php new file mode 100644 index 0000000000000000000000000000000000000000..e33ef6ac933b358cd5d65a6bfb03d0083fb5220e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/InsufficientAuthenticationException.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +/** + * InsufficientAuthenticationException is thrown if the user credentials are not sufficiently trusted. + * + * This is the case when a user is anonymous and the resource to be displayed has an access role. + * + * @author Fabien Potencier + * @author Alexander + */ +class InsufficientAuthenticationException extends AuthenticationException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Not privileged to request the resource.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..6f85e9500f19d44b070f8683b188e7b97b9b43cc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +/** + * Base InvalidArgumentException for the Security component. + * + * @author Bernhard Schussek + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/InvalidCsrfTokenException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/InvalidCsrfTokenException.php new file mode 100644 index 0000000000000000000000000000000000000000..84be85561d6efc1a40e708ba553c242861e589a0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/InvalidCsrfTokenException.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\Component\Security\Core\Exception; + +/** + * This exception is thrown when the csrf token is invalid. + * + * @author Johannes M. Schmitt + * @author Alexander + */ +class InvalidCsrfTokenException extends AuthenticationException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Invalid CSRF token.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/LockedException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/LockedException.php new file mode 100644 index 0000000000000000000000000000000000000000..fffae74df876e98713bea4378f6a26edb547b4c7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/LockedException.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\Component\Security\Core\Exception; + +/** + * LockedException is thrown if the user account is locked. + * + * @author Fabien Potencier + * @author Alexander + */ +class LockedException extends AccountStatusException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Account is locked.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/LogoutException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/LogoutException.php new file mode 100644 index 0000000000000000000000000000000000000000..2bb954fa7875d5bcfe75f74f4e11fc5028f37b0a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/LogoutException.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +/** + * LogoutException is thrown when the account cannot be logged out. + * + * @author Jeremy Mikola + */ +class LogoutException extends \RuntimeException +{ + public function __construct($message = 'Logout Exception', \Exception $previous = null) + { + parent::__construct($message, 403, $previous); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/NonceExpiredException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/NonceExpiredException.php new file mode 100644 index 0000000000000000000000000000000000000000..998e987e403debd85491fcd4342d8329fcf72ffe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/NonceExpiredException.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\Security\Core\Exception; + +/** + * NonceExpiredException is thrown when an authentication is rejected because + * the digest nonce has expired. + * + * @author Fabien Potencier + * @author Alexander + */ +class NonceExpiredException extends AuthenticationException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Digest nonce has expired.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/ProviderNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/ProviderNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..af2e1b57b01c45b9b2aad786f5c2e4a90dab8a25 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/ProviderNotFoundException.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\Security\Core\Exception; + +/** + * ProviderNotFoundException is thrown when no AuthenticationProviderInterface instance + * supports an authentication Token. + * + * @author Fabien Potencier + * @author Alexander + */ +class ProviderNotFoundException extends AuthenticationException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'No authentication provider found to support the authentication token.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/RuntimeException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/RuntimeException.php new file mode 100644 index 0000000000000000000000000000000000000000..95edec8ee9dd365cdd8f587b1dde2fad0db39ec3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/RuntimeException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +/** + * Base RuntimeException for the Security component. + * + * @author Bernhard Schussek + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/SessionUnavailableException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/SessionUnavailableException.php new file mode 100644 index 0000000000000000000000000000000000000000..90b858a721f81205573ed2212e4f209538a3688e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/SessionUnavailableException.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +/** + * This exception is thrown when no session is available. + * + * Possible reasons for this are: + * + * a) The session timed out because the user waited too long. + * b) The user has disabled cookies, and a new session is started on each + * request. + * + * @author Johannes M. Schmitt + * @author Alexander + */ +class SessionUnavailableException extends AuthenticationException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'No session available, it either timed out or cookies are not enabled.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/TokenNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/TokenNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..b050302a4a0d5c7ee32e85d6358eec878eb34f9c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/TokenNotFoundException.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\Component\Security\Core\Exception; + +/** + * TokenNotFoundException is thrown if a Token cannot be found. + * + * @author Johannes M. Schmitt + * @author Alexander + */ +class TokenNotFoundException extends AuthenticationException +{ + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'No token could be found.'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/UnsupportedUserException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/UnsupportedUserException.php new file mode 100644 index 0000000000000000000000000000000000000000..6529fa9f0b04e114142465c943d7f506ad8904f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/UnsupportedUserException.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +/** + * This exception is thrown when an account is reloaded from a provider which + * doesn't support the passed implementation of UserInterface. + * + * @author Johannes M. Schmitt + */ +class UnsupportedUserException extends AuthenticationServiceException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/UsernameNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/UsernameNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..6979389a05987115b4af839ce79b744478827d48 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Exception/UsernameNotFoundException.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Exception; + +/** + * UsernameNotFoundException is thrown if a User cannot be found by its username. + * + * @author Fabien Potencier + * @author Alexander + */ +class UsernameNotFoundException extends AuthenticationException +{ + private $username; + + /** + * {@inheritdoc} + */ + public function getMessageKey() + { + return 'Username could not be found.'; + } + + /** + * Get the username. + * + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Set the username. + * + * @param string $username + */ + public function setUsername($username) + { + $this->username = $username; + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize(array( + $this->username, + parent::serialize(), + )); + } + + /** + * {@inheritdoc} + */ + public function unserialize($str) + { + list($this->username, $parentData) = unserialize($str); + + parent::unserialize($parentData); + } + + /** + * {@inheritdoc} + */ + public function getMessageData() + { + return array('{{ username }}' => $this->username); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Security/Core/README.md b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ede185bd3b3f59ffd4e38e926f945bf30fe73f1b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/README.md @@ -0,0 +1,16 @@ +Security Component - Core +========================= + +Security provides an infrastructure for sophisticated authorization systems, +which makes it possible to easily separate the actual authorization logic from +so called user providers that hold the users credentials. It is inspired by +the Java Spring framework. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/security/index.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/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf new file mode 100644 index 0000000000000000000000000000000000000000..fd18ee6ad9faf0b6d7f382c5ec8ec2464531c8c9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + حدث خطأ اثناء الدخول. + + + Authentication credentials could not be found. + لم استطع العثور على معلومات الدخول. + + + Authentication request could not be processed due to a system problem. + لم يكتمل طلب الدخول نتيجه عطل ÙÙ‰ النظام. + + + Invalid credentials. + معلومات الدخول خاطئة. + + + Cookie has already been used by someone else. + Ù…Ù„ÙØ§Øª تعري٠الارتباط(cookies) تم استخدامها من قبل شخص اخر. + + + Not privileged to request the resource. + ليست لديك الصلاحيات الكاÙية لهذا الطلب. + + + Invalid CSRF token. + رمز الموقع غير صحيح. + + + Digest nonce has expired. + انتهت صلاحية(digest nonce). + + + No authentication provider found to support the authentication token. + لا يوجد معر٠للدخول يدعم الرمز المستخدم للدخول. + + + No session available, it either timed out or cookies are not enabled. + لا يوجد صلة بينك Ùˆ بين الموقع اما انها انتهت او ان Ù…ØªØµÙØ­Ùƒ لا يدعم خاصية Ù…Ù„ÙØ§Øª تعري٠الارتباط (cookies). + + + No token could be found. + لم استطع العثور على الرمز. + + + Username could not be found. + لم استطع العثور على اسم الدخول. + + + Account has expired. + انتهت صلاحية الحساب. + + + Credentials have expired. + انتهت صلاحية معلومات الدخول. + + + Account is disabled. + الحساب موقوÙ. + + + Account is locked. + الحساب مغلق. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf new file mode 100644 index 0000000000000000000000000000000000000000..a974ed0f024c8158f221553f08c14a54d69bd3e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + DoÄŸrulama istisnası baÅŸ verdi. + + + Authentication credentials could not be found. + DoÄŸrulama mÉ™lumatları tapılmadı. + + + Authentication request could not be processed due to a system problem. + Sistem xÉ™tası sÉ™bÉ™bilÉ™ doÄŸrulama istÉ™yi emal edilÉ™ bilmÉ™di. + + + Invalid credentials. + Yanlış mÉ™lumat. + + + Cookie has already been used by someone else. + Kuki baÅŸqası tÉ™rÉ™findÉ™n istifadÉ™ edilib. + + + Not privileged to request the resource. + Resurs istÉ™yi üçün imtiyaz yoxdur. + + + Invalid CSRF token. + Yanlış CSRF niÅŸanı. + + + Digest nonce has expired. + DÉ™rlÉ™mÉ™ istifadÉ™ müddÉ™ti bitib. + + + No authentication provider found to support the authentication token. + DoÄŸrulama niÅŸanını dÉ™stÉ™klÉ™yÉ™cÉ™k provayder tapılmadı. + + + No session available, it either timed out or cookies are not enabled. + UyÄŸun seans yoxdur, vaxtı keçib vÉ™ ya kuki aktiv deyil. + + + No token could be found. + NiÅŸan tapılmadı. + + + Username could not be found. + İstifadəçi adı tapılmadı. + + + Account has expired. + Hesabın istifadÉ™ müddÉ™ti bitib. + + + Credentials have expired. + MÉ™lumatların istifadÉ™ müddÉ™ti bitib. + + + Account is disabled. + Hesab qeyri-aktiv edilib. + + + Account is locked. + Hesab kilitlÉ™nib. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf new file mode 100644 index 0000000000000000000000000000000000000000..06692ea66a84377382e74a127e72e098fca4de6d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Грешка при автентикациÑ. + + + Authentication credentials could not be found. + УдоÑтоверението за Ð°Ð²Ñ‚ÐµÐ½Ñ‚Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð½Ðµ е открито. + + + Authentication request could not be processed due to a system problem. + ЗаÑвката за Ð°Ð²Ñ‚ÐµÐ½Ñ‚Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð½Ðµ може да бъде обработената поради ÑиÑтемна грешка. + + + Invalid credentials. + Ðевалидно удоÑтоверение за автентикациÑ. + + + Cookie has already been used by someone else. + Това cookie вече Ñе ползва от нÑкой друг. + + + Not privileged to request the resource. + ÐÑмате права за доÑтъп до този реÑурÑ. + + + Invalid CSRF token. + Ðевалиден CSRF токен. + + + Digest nonce has expired. + Digest nonce е изтекъл. + + + No authentication provider found to support the authentication token. + Ðе е открит провайдър, който да поддържа този токен за автентикациÑ. + + + No session available, it either timed out or cookies are not enabled. + СеÑиÑта не е доÑтъпна, или времето за доÑтъп е изтекло, или кукитата не Ñа разрешени. + + + No token could be found. + Токена не е открит. + + + Username could not be found. + ПотребителÑкото име не е открито. + + + Account has expired. + Ðкаунта е изтекъл. + + + Credentials have expired. + УдоÑтоверението за Ð°Ð²Ñ‚ÐµÐ½Ñ‚Ð¸ÐºÐ°Ñ†Ð¸Ñ Ðµ изтекло. + + + Account is disabled. + Ðкаунта е деактивиран. + + + Account is locked. + Ðкаунта е заключен. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ca.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ca.xlf new file mode 100644 index 0000000000000000000000000000000000000000..7ece2603ae47783741149e0464ea18f6db90d7d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ca.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Ha succeït un error d'autenticació. + + + Authentication credentials could not be found. + No s'han trobat les credencials d'autenticació. + + + Authentication request could not be processed due to a system problem. + La solicitud d'autenticació no s'ha pogut processar per un problema del sistema. + + + Invalid credentials. + Credencials no vàlides. + + + Cookie has already been used by someone else. + La cookie ja ha estat utilitzada per una altra persona. + + + Not privileged to request the resource. + No té privilegis per solicitar el recurs. + + + Invalid CSRF token. + Token CSRF no vàlid. + + + Digest nonce has expired. + El vector d'inicialització (digest nonce) ha expirat. + + + No authentication provider found to support the authentication token. + No s'ha trobat un proveïdor d'autenticació que suporti el token d'autenticació. + + + No session available, it either timed out or cookies are not enabled. + No hi ha sessió disponible, ha expirat o les cookies no estan habilitades. + + + No token could be found. + No s'ha trobat cap token. + + + Username could not be found. + No s'ha trobat el nom d'usuari. + + + Account has expired. + El compte ha expirat. + + + Credentials have expired. + Les credencials han expirat. + + + Account is disabled. + El compte està deshabilitat. + + + Account is locked. + El compte està bloquejat. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf new file mode 100644 index 0000000000000000000000000000000000000000..bd146c68049cb8870fc41c1c5057b6cde105d10c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + PÅ™i ověřování doÅ¡lo k chybÄ›. + + + Authentication credentials could not be found. + Ověřovací údaje nebyly nalezeny. + + + Authentication request could not be processed due to a system problem. + Požadavek na ověření nemohl být zpracován kvůli systémové chybÄ›. + + + Invalid credentials. + Neplatné pÅ™ihlaÅ¡ovací údaje. + + + Cookie has already been used by someone else. + Cookie již bylo použité nÄ›kým jiným. + + + Not privileged to request the resource. + Nemáte oprávnÄ›ní pÅ™istupovat k prostÅ™edku. + + + Invalid CSRF token. + Neplatný CSRF token. + + + Digest nonce has expired. + Platnost inicializaÄního vektoru (digest nonce) vyprÅ¡ela. + + + No authentication provider found to support the authentication token. + Poskytovatel pro ověřovací token nebyl nalezen. + + + No session available, it either timed out or cookies are not enabled. + Session není k dispozici, vyprÅ¡ela její platnost, nebo jsou zakázané cookies. + + + No token could be found. + Token nebyl nalezen. + + + Username could not be found. + PÅ™ihlaÅ¡ovací jméno nebylo nalezeno. + + + Account has expired. + Platnost úÄtu vyprÅ¡ela. + + + Credentials have expired. + Platnost pÅ™ihlaÅ¡ovacích údajů vyprÅ¡ela. + + + Account is disabled. + ÚÄet je zakázaný. + + + Account is locked. + ÚÄet je zablokovaný. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf new file mode 100644 index 0000000000000000000000000000000000000000..2ac41502d2c7ff7a795254de4698e8e49d3b07d1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + En fejl indtraf ved godkendelse. + + + Authentication credentials could not be found. + Loginoplysninger kan findes. + + + Authentication request could not be processed due to a system problem. + Godkendelsesanmodning kan ikke behandles pÃ¥ grund af et systemfejl. + + + Invalid credentials. + Ugyldige loginoplysninger. + + + Cookie has already been used by someone else. + Cookie er allerede brugt af en anden. + + + Not privileged to request the resource. + Ingen tilladselese at anvende kilden. + + + Invalid CSRF token. + Ugyldigt CSRF token. + + + Digest nonce has expired. + Digest nonce er udløbet. + + + No authentication provider found to support the authentication token. + Ingen godkendelsesudbyder er fundet til understøttelsen af godkendelsestoken. + + + No session available, it either timed out or cookies are not enabled. + Ingen session tilgængelig, sessionen er enten udløbet eller cookies er ikke aktiveret. + + + No token could be found. + Ingen token kan findes. + + + Username could not be found. + Brugernavn kan ikke findes. + + + Account has expired. + Brugerkonto er udløbet. + + + Credentials have expired. + Loginoplysninger er udløbet. + + + Account is disabled. + Brugerkonto er deaktiveret. + + + Account is locked. + Brugerkonto er lÃ¥st. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf new file mode 100644 index 0000000000000000000000000000000000000000..e5946ed4aa42dbf4da94e9f96e37f69781099cbf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Es ist ein Fehler bei der Authentifikation aufgetreten. + + + Authentication credentials could not be found. + Es konnten keine Zugangsdaten gefunden werden. + + + Authentication request could not be processed due to a system problem. + Die Authentifikation konnte wegen eines Systemproblems nicht bearbeitet werden. + + + Invalid credentials. + Fehlerhafte Zugangsdaten. + + + Cookie has already been used by someone else. + Cookie wurde bereits von jemand anderem verwendet. + + + Not privileged to request the resource. + Keine Rechte, um die Ressource anzufragen. + + + Invalid CSRF token. + Ungültiges CSRF-Token. + + + Digest nonce has expired. + Digest nonce ist abgelaufen. + + + No authentication provider found to support the authentication token. + Es wurde kein Authentifizierungs-Provider gefunden, der das Authentifizierungs-Token unterstützt. + + + No session available, it either timed out or cookies are not enabled. + Keine Session verfügbar, entweder ist diese abgelaufen oder Cookies sind nicht aktiviert. + + + No token could be found. + Es wurde kein Token gefunden. + + + Username could not be found. + Der Benutzername wurde nicht gefunden. + + + Account has expired. + Der Account ist abgelaufen. + + + Credentials have expired. + Die Zugangsdaten sind abgelaufen. + + + Account is disabled. + Der Account ist deaktiviert. + + + Account is locked. + Der Account ist gesperrt. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.el.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.el.xlf new file mode 100644 index 0000000000000000000000000000000000000000..07eabe7ed29e277c40982160ed215df1e075d210 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.el.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Συνέβη ένα σφάλμα πιστοποίησης. + + + Authentication credentials could not be found. + Τα στοιχεία πιστοποίησης δε βÏέθηκαν. + + + Authentication request could not be processed due to a system problem. + Το αίτημα πιστοποίησης δε μποÏεί να επεξεÏγαστεί λόγω σφάλματος του συστήματος. + + + Invalid credentials. + Λανθασμένα στοιχεία σÏνδεσης. + + + Cookie has already been used by someone else. + Το Cookie έχει ήδη χÏησιμοποιηθεί από κάποιον άλλο. + + + Not privileged to request the resource. + Δεν είστε εξουσιοδοτημένος για Ï€Ïόσβαση στο συγκεκÏιμένο πεÏιεχόμενο. + + + Invalid CSRF token. + Μη έγκυÏο CSRF token. + + + Digest nonce has expired. + Το digest nonce έχει λήξει. + + + No authentication provider found to support the authentication token. + Δε βÏέθηκε κάποιος πάÏοχος πιστοποίησης που να υποστηÏίζει το token πιστοποίησης. + + + No session available, it either timed out or cookies are not enabled. + Δεν υπάÏχει ενεÏγή σÏνοδος (session), είτε έχει λήξει ή τα cookies δεν είναι ενεÏγοποιημένα. + + + No token could be found. + Δεν ήταν δυνατόν να βÏεθεί κάποιο token. + + + Username could not be found. + Το Username δε βÏέθηκε. + + + Account has expired. + Ο λογαÏιασμός έχει λήξει. + + + Credentials have expired. + Τα στοιχεία σÏνδεσης έχουν λήξει. + + + Account is disabled. + Ο λογαÏιασμός είναι απενεÏγοποιημένος. + + + Account is locked. + Ο λογαÏιασμός είναι κλειδωμένος. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf new file mode 100644 index 0000000000000000000000000000000000000000..3640698ce9fb3c09d7fac65550cd40cd8e2e8bfb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + An authentication exception occurred. + + + Authentication credentials could not be found. + Authentication credentials could not be found. + + + Authentication request could not be processed due to a system problem. + Authentication request could not be processed due to a system problem. + + + Invalid credentials. + Invalid credentials. + + + Cookie has already been used by someone else. + Cookie has already been used by someone else. + + + Not privileged to request the resource. + Not privileged to request the resource. + + + Invalid CSRF token. + Invalid CSRF token. + + + Digest nonce has expired. + Digest nonce has expired. + + + No authentication provider found to support the authentication token. + No authentication provider found to support the authentication token. + + + No session available, it either timed out or cookies are not enabled. + No session available, it either timed out or cookies are not enabled. + + + No token could be found. + No token could be found. + + + Username could not be found. + Username could not be found. + + + Account has expired. + Account has expired. + + + Credentials have expired. + Credentials have expired. + + + Account is disabled. + Account is disabled. + + + Account is locked. + Account is locked. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf new file mode 100644 index 0000000000000000000000000000000000000000..00cefbb2dad67abe5059d3edfad098894ffdb96d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Ocurrió un error de autenticación. + + + Authentication credentials could not be found. + No se encontraron las credenciales de autenticación. + + + Authentication request could not be processed due to a system problem. + La solicitud de autenticación no se pudo procesar debido a un problema del sistema. + + + Invalid credentials. + Credenciales no válidas. + + + Cookie has already been used by someone else. + La cookie ya ha sido usada por otra persona. + + + Not privileged to request the resource. + No tiene privilegios para solicitar el recurso. + + + Invalid CSRF token. + Token CSRF no válido. + + + Digest nonce has expired. + El vector de inicialización (digest nonce) ha expirado. + + + No authentication provider found to support the authentication token. + No se encontró un proveedor de autenticación que soporte el token de autenticación. + + + No session available, it either timed out or cookies are not enabled. + No hay ninguna sesión disponible, ha expirado o las cookies no están habilitados. + + + No token could be found. + No se encontró ningún token. + + + Username could not be found. + No se encontró el nombre de usuario. + + + Account has expired. + La cuenta ha expirado. + + + Credentials have expired. + Las credenciales han expirado. + + + Account is disabled. + La cuenta está deshabilitada. + + + Account is locked. + La cuenta está bloqueada. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf new file mode 100644 index 0000000000000000000000000000000000000000..0b7629078063cf34be3d7f7375bec8d64e2acb89 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + خطایی هنگام تعیین اعتبار Ø§ØªÙØ§Ù‚ Ø§ÙØªØ§Ø¯. + + + Authentication credentials could not be found. + شرایط تعیین اعتبار پیدا نشد. + + + Authentication request could not be processed due to a system problem. + درخواست تعیین اعتبار به دلیل مشکل سیستم قابل بررسی نیست. + + + Invalid credentials. + شرایط نامعتبر. + + + Cookie has already been used by someone else. + Ú©ÙˆÚ©ÛŒ قبلا برای شخص دیگری Ø§Ø³ØªÙØ§Ø¯Ù‡ شده است. + + + Not privileged to request the resource. + دسترسی لازم برای درخواست این منبع را ندارید. + + + Invalid CSRF token. + توکن CSRF معتبر نیست. + + + Digest nonce has expired. + Digest nonce منقضی شده است. + + + No authentication provider found to support the authentication token. + هیچ ارایه کننده تعیین اعتباری برای ساپورت توکن تعیین اعتبار پیدا نشد. + + + No session available, it either timed out or cookies are not enabled. + جلسه‌ای در دسترس نیست. این میتواند یا به دلیل پایان ÛŒØ§ÙØªÙ† زمان باشد یا اینکه Ú©ÙˆÚ©ÛŒ ها ÙØ¹Ø§Ù„ نیستند. + + + No token could be found. + هیچ توکنی پیدا نشد. + + + Username could not be found. + نام ‌کاربری پیدا نشد. + + + Account has expired. + حساب کاربری منقضی شده است. + + + Credentials have expired. + پارامترهای تعیین اعتبار منقضی شده‌اند. + + + Account is disabled. + حساب کاربری ØºÛŒØ±ÙØ¹Ø§Ù„ است. + + + Account is locked. + حساب کاربری Ù‚ÙÙ„ شده است. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf new file mode 100644 index 0000000000000000000000000000000000000000..5a77c6e9ff795208e0b56e538f29225662c664a1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Une exception d'authentification s'est produite. + + + Authentication credentials could not be found. + Les identifiants d'authentification n'ont pas pu être trouvés. + + + Authentication request could not be processed due to a system problem. + La requête d'authentification n'a pas pu être executée à cause d'un problème système. + + + Invalid credentials. + Identifiants invalides. + + + Cookie has already been used by someone else. + Le cookie a déjà été utilisé par quelqu'un d'autre. + + + Not privileged to request the resource. + Privilèges insuffisants pour accéder à la ressource. + + + Invalid CSRF token. + Jeton CSRF invalide. + + + Digest nonce has expired. + Le digest nonce a expiré. + + + No authentication provider found to support the authentication token. + Aucun fournisseur d'authentification n'a été trouvé pour supporter le jeton d'authentification. + + + No session available, it either timed out or cookies are not enabled. + Aucune session disponible, celle-ci a expiré ou les cookies ne sont pas activés. + + + No token could be found. + Aucun jeton n'a pu être trouvé. + + + Username could not be found. + Le nom d'utilisateur n'a pas pu être trouvé. + + + Account has expired. + Le compte a expiré. + + + Credentials have expired. + Les identifiants ont expiré. + + + Account is disabled. + Le compte est désactivé. + + + Account is locked. + Le compte est bloqué. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.gl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.gl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..ed6491f7ef97aa0026f14a3712e8a1f0246c3b39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.gl.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Ocorreu un erro de autenticación. + + + Authentication credentials could not be found. + Non se atoparon as credenciais de autenticación. + + + Authentication request could not be processed due to a system problem. + A solicitude de autenticación no puido ser procesada debido a un problema do sistema. + + + Invalid credentials. + Credenciais non válidas. + + + Cookie has already been used by someone else. + A cookie xa foi empregado por outro usuario. + + + Not privileged to request the resource. + Non ten privilexios para solicitar o recurso. + + + Invalid CSRF token. + Token CSRF non válido. + + + Digest nonce has expired. + O vector de inicialización (digest nonce) expirou. + + + No authentication provider found to support the authentication token. + Non se atopou un provedor de autenticación que soporte o token de autenticación. + + + No session available, it either timed out or cookies are not enabled. + Non hai ningunha sesión dispoñible, expirou ou as cookies non están habilitadas. + + + No token could be found. + Non se atopou ningún token. + + + Username could not be found. + Non se atopou o nome de usuario. + + + Account has expired. + A conta expirou. + + + Credentials have expired. + As credenciais expiraron. + + + Account is disabled. + A conta está deshabilitada. + + + Account is locked. + A conta está bloqueada. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf new file mode 100644 index 0000000000000000000000000000000000000000..3640698ce9fb3c09d7fac65550cd40cd8e2e8bfb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + An authentication exception occurred. + + + Authentication credentials could not be found. + Authentication credentials could not be found. + + + Authentication request could not be processed due to a system problem. + Authentication request could not be processed due to a system problem. + + + Invalid credentials. + Invalid credentials. + + + Cookie has already been used by someone else. + Cookie has already been used by someone else. + + + Not privileged to request the resource. + Not privileged to request the resource. + + + Invalid CSRF token. + Invalid CSRF token. + + + Digest nonce has expired. + Digest nonce has expired. + + + No authentication provider found to support the authentication token. + No authentication provider found to support the authentication token. + + + No session available, it either timed out or cookies are not enabled. + No session available, it either timed out or cookies are not enabled. + + + No token could be found. + No token could be found. + + + Username could not be found. + Username could not be found. + + + Account has expired. + Account has expired. + + + Credentials have expired. + Credentials have expired. + + + Account is disabled. + Account is disabled. + + + Account is locked. + Account is locked. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hr.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hr.xlf new file mode 100644 index 0000000000000000000000000000000000000000..147b6e311a22f6d6d0d6b78a5bfe75d5a8d271ce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hr.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Dogodila se autentifikacijske iznimka. + + + Authentication credentials could not be found. + Autentifikacijski podaci nisu pronaÄ‘eni. + + + Authentication request could not be processed due to a system problem. + Autentifikacijski zahtjev nije moguće provesti uslijed sistemskog problema. + + + Invalid credentials. + Neispravni akreditacijski podaci. + + + Cookie has already been used by someone else. + Cookie je već netko drugi iskoristio. + + + Not privileged to request the resource. + Nemate privilegije zahtijevati resurs. + + + Invalid CSRF token. + Neispravan CSRF token. + + + Digest nonce has expired. + Digest nonce je isteko. + + + No authentication provider found to support the authentication token. + Nije pronaÄ‘en autentifikacijski provider koji bi podržao autentifikacijski token. + + + No session available, it either timed out or cookies are not enabled. + Sesija nije dostupna, ili je istekla ili cookies nisu omogućeni. + + + No token could be found. + Token nije pronaÄ‘en. + + + Username could not be found. + KorisniÄko ime nije pronaÄ‘eno. + + + Account has expired. + RaÄun je isteko. + + + Credentials have expired. + Akreditacijski podaci su istekli. + + + Account is disabled. + RaÄun je onemogućen. + + + Account is locked. + RaÄun je zakljuÄan. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hu.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hu.xlf new file mode 100644 index 0000000000000000000000000000000000000000..724397038cb66f4393ce838131d7b5baec2c09d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hu.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Hitelesítési hiba lépett fel. + + + Authentication credentials could not be found. + Nem találhatók hitelesítési információk. + + + Authentication request could not be processed due to a system problem. + A hitelesítési kérést rendszerhiba miatt nem lehet feldolgozni. + + + Invalid credentials. + Érvénytelen hitelesítési információk. + + + Cookie has already been used by someone else. + Ezt a sütit valaki más már felhasználta. + + + Not privileged to request the resource. + Nem rendelkezik az erÅ‘forrás eléréséhez szükséges jogosultsággal. + + + Invalid CSRF token. + Érvénytelen CSRF token. + + + Digest nonce has expired. + A kivonat bélyege (nonce) lejárt. + + + No authentication provider found to support the authentication token. + Nem található a hitelesítési tokent támogató hitelesítési szolgáltatás. + + + No session available, it either timed out or cookies are not enabled. + Munkamenet nem áll rendelkezésre, túllépte az idÅ‘keretet vagy a sütik le vannak tiltva. + + + No token could be found. + Nem található token. + + + Username could not be found. + A felhasználónév nem található. + + + Account has expired. + A fiók lejárt. + + + Credentials have expired. + A hitelesítési információk lejártak. + + + Account is disabled. + Felfüggesztett fiók. + + + Account is locked. + Zárolt fiók. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf new file mode 100644 index 0000000000000000000000000000000000000000..ab1153b8a27ffaffa6f5de902f2d023107f4f065 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Terjadi sebuah pengecualian otentikasi. + + + Authentication credentials could not be found. + Kredensial otentikasi tidak bisa ditemukan. + + + Authentication request could not be processed due to a system problem. + Permintaan otentikasi tidak bisa diproses karena masalah sistem. + + + Invalid credentials. + Kredensial salah. + + + Cookie has already been used by someone else. + Cookie sudah digunakan oleh orang lain. + + + Not privileged to request the resource. + Tidak berhak untuk meminta sumber daya. + + + Invalid CSRF token. + Token CSRF salah. + + + Digest nonce has expired. + Digest nonce telah berakhir. + + + No authentication provider found to support the authentication token. + Tidak ditemukan penyedia otentikasi untuk mendukung token otentikasi. + + + No session available, it either timed out or cookies are not enabled. + Tidak ada sesi yang tersedia, mungkin waktu sudah habis atau cookie tidak diaktifkan + + + No token could be found. + Tidak ada token yang bisa ditemukan. + + + Username could not be found. + Username tidak bisa ditemukan. + + + Account has expired. + Akun telah berakhir. + + + Credentials have expired. + Kredensial telah berakhir. + + + Account is disabled. + Akun dinonaktifkan. + + + Account is locked. + Akun terkunci. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf new file mode 100644 index 0000000000000000000000000000000000000000..75d81cc8d9312d15c1727599b3287f7882604f3d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Si è verificato un errore di autenticazione. + + + Authentication credentials could not be found. + Impossibile trovare le credenziali di autenticazione. + + + Authentication request could not be processed due to a system problem. + La richiesta di autenticazione non può essere processata a causa di un errore di sistema. + + + Invalid credentials. + Credenziali non valide. + + + Cookie has already been used by someone else. + Il cookie è già stato usato da qualcun altro. + + + Not privileged to request the resource. + Non hai i privilegi per richiedere questa risorsa. + + + Invalid CSRF token. + CSRF token non valido. + + + Digest nonce has expired. + Il numero di autenticazione è scaduto. + + + No authentication provider found to support the authentication token. + Non è stato trovato un valido fornitore di autenticazione per supportare il token. + + + No session available, it either timed out or cookies are not enabled. + Nessuna sessione disponibile, può essere scaduta o i cookie non sono abilitati. + + + No token could be found. + Nessun token trovato. + + + Username could not be found. + Username non trovato. + + + Account has expired. + Account scaduto. + + + Credentials have expired. + Credenziali scadute. + + + Account is disabled. + L'account è disabilitato. + + + Account is locked. + L'account è bloccato. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf new file mode 100644 index 0000000000000000000000000000000000000000..6a6b062d946c3a966ff35fe7341cf730dd2d936b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + èªè¨¼ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ + + + Authentication credentials could not be found. + èªè¨¼è³‡æ ¼ãŒã‚りã¾ã›ã‚“。 + + + Authentication request could not be processed due to a system problem. + システムã®å•題ã«ã‚ˆã‚Šèªè¨¼è¦æ±‚を処ç†ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ + + + Invalid credentials. + 資格ãŒç„¡åйã§ã™ã€‚ + + + Cookie has already been used by someone else. + Cookie ãŒåˆ¥ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚ + + + Not privileged to request the resource. + リソースをリクエストã™ã‚‹æ¨©é™ãŒã‚りã¾ã›ã‚“。 + + + Invalid CSRF token. + CSRF トークンãŒç„¡åйã§ã™ã€‚ + + + Digest nonce has expired. + Digest ã® nonce å€¤ãŒæœŸé™åˆ‡ã‚Œã§ã™ã€‚ + + + No authentication provider found to support the authentication token. + èªè¨¼ãƒˆãƒ¼ã‚¯ãƒ³ã‚’サãƒãƒ¼ãƒˆã™ã‚‹èªè¨¼ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 + + + No session available, it either timed out or cookies are not enabled. + 利用å¯èƒ½ãªã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒã‚りã¾ã›ã‚“。タイムアウトã—ãŸã‹ã€Cookie ãŒç„¡åйã«ãªã£ã¦ã„ã¾ã™ã€‚ + + + No token could be found. + トークンãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 + + + Username could not be found. + ユーザーåãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 + + + Account has expired. + ã‚¢ã‚«ã‚¦ãƒ³ãƒˆãŒæœ‰åŠ¹æœŸé™åˆ‡ã‚Œã§ã™ã€‚ + + + Credentials have expired. + è³‡æ ¼ãŒæœ‰åŠ¹æœŸé™åˆ‡ã‚Œã§ã™ã€‚ + + + Account is disabled. + アカウントãŒç„¡åйã§ã™ã€‚ + + + Account is locked. + アカウントã¯ãƒ­ãƒƒã‚¯ã•れã¦ã„ã¾ã™ã€‚ + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lb.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lb.xlf new file mode 100644 index 0000000000000000000000000000000000000000..3dc76d5486883c3b4c4be82fca0aa8c94e100262 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lb.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Bei der Authentifikatioun ass e Feeler opgetrueden. + + + Authentication credentials could not be found. + Et konnte keng Zouganksdate fonnt ginn. + + + Authentication request could not be processed due to a system problem. + D'Ufro fir eng Authentifikatioun konnt wéinst engem Problem vum System net beaarbecht ginn. + + + Invalid credentials. + Ongëlteg Zouganksdaten. + + + Cookie has already been used by someone else. + De Cookie gouf scho vun engem anere benotzt. + + + Not privileged to request the resource. + Keng Rechter fir d'Ressource unzefroen. + + + Invalid CSRF token. + Ongëltegen CSRF-Token. + + + Digest nonce has expired. + Den eemolege Schlëssel ass ofgelaf. + + + No authentication provider found to support the authentication token. + Et gouf keen Authentifizéierungs-Provider fonnt deen den Authentifizéierungs-Token ënnerstëtzt. + + + No session available, it either timed out or cookies are not enabled. + Keng Sëtzung disponibel. Entweder ass se ofgelaf oder Cookies sinn net aktivéiert. + + + No token could be found. + Et konnt keen Token fonnt ginn. + + + Username could not be found. + De Benotzernumm konnt net fonnt ginn. + + + Account has expired. + Den Account ass ofgelaf. + + + Credentials have expired. + D'Zouganksdate sinn ofgelaf. + + + Account is disabled. + De Konto ass deaktivéiert. + + + Account is locked. + De Konto ass gespaart. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lt.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lt.xlf new file mode 100644 index 0000000000000000000000000000000000000000..da6c332b438296d411cda37607f917dca74cc1d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lt.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Ä®vyko autentifikacijos klaida. + + + Authentication credentials could not be found. + Nepavyko rasti autentifikacijos duomneų. + + + Authentication request could not be processed due to a system problem. + Autentifikacijos užklausos nepavyko įvykdyti dÄ—l sistemos klaidų. + + + Invalid credentials. + Klaidingi duomenys. + + + Cookie has already been used by someone else. + Slapukas buvo panaudotas kažkam kitam. + + + Not privileged to request the resource. + Neturite teisių pasiektį resursÄ…. + + + Invalid CSRF token. + Neteisingas CSRF raktas. + + + Digest nonce has expired. + Prieigos kodas yra pasibaigÄ™s. + + + No authentication provider found to support the authentication token. + Nerastas autentifikacijos tiekÄ—jas, kuris palaikytų autentifikacijos raktÄ…. + + + No session available, it either timed out or cookies are not enabled. + Sesija yra nepasiekiama, pasibaigÄ— galiojimo laikas arba slapukai yra iÅ¡jungti. + + + No token could be found. + Nepavyko rasti rakto. + + + Username could not be found. + Tokio naudotojo vardo nepavyko rasti. + + + Account has expired. + Paskyros galiojimo laikas baigÄ—si. + + + Credentials have expired. + Autentifikacijos duomenų galiojimo laikas baigÄ—si. + + + Account is disabled. + Paskyra yra iÅ¡jungta. + + + Account is locked. + Paskyra yra užblokuota. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf new file mode 100644 index 0000000000000000000000000000000000000000..33c48c617461c71a4fb0fb1606110b351c8b34e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + RadÄs autentifikÄcijas kļūda. + + + Authentication credentials could not be found. + AutentifikÄcijas dati nav atrasti. + + + Authentication request could not be processed due to a system problem. + AutentifikÄcijas pieprasÄ«jums nevar tikt apstrÄdÄts sistÄ“mas problÄ“mas dēļ. + + + Invalid credentials. + NederÄ«gi autentifikÄcijas dati. + + + Cookie has already been used by someone else. + KÄds cits jau izmantoja sÄ«kdatni. + + + Not privileged to request the resource. + Nav tiesÄ«bu Å¡i resursa izsaukÅ¡anai. + + + Invalid CSRF token. + NederÄ«gs CSRF talons. + + + Digest nonce has expired. + Vienreiz lietojamÄs atslÄ“gas darbÄ«bas laiks ir beidzies. + + + No authentication provider found to support the authentication token. + Nav atrasts, autentifikÄcijas talonu atbalstoÅ¡s, autentifikÄcijas sniedzÄ“js. + + + No session available, it either timed out or cookies are not enabled. + Sesija nav pieejama - vai nu tÄ beidzÄs, vai nu sÄ«kdatnes nav iespÄ“jotas. + + + No token could be found. + Nevar atrast nevienu talonu. + + + Username could not be found. + Nevar atrast lietotÄjvÄrdu. + + + Account has expired. + Konta derÄ«guma termiņš ir beidzies. + + + Credentials have expired. + AutentifikÄcijas datu derÄ«guma termiņš ir beidzies. + + + Account is disabled. + Konts ir atspÄ“jots. + + + Account is locked. + Konts ir slÄ“gts. + + + + \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..8969e9ef8ca692af37e24348c645da2e1065e7d4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Er heeft zich een authenticatieprobleem voorgedaan. + + + Authentication credentials could not be found. + Authenticatiegegevens konden niet worden gevonden. + + + Authentication request could not be processed due to a system problem. + Authenticatieaanvraag kon niet worden verwerkt door een technisch probleem. + + + Invalid credentials. + Ongeldige inloggegevens. + + + Cookie has already been used by someone else. + Cookie is al door een ander persoon gebruikt. + + + Not privileged to request the resource. + Onvoldoende rechten om de aanvraag te verwerken. + + + Invalid CSRF token. + CSRF-code is ongeldig. + + + Digest nonce has expired. + Serverauthenticatiesleutel (digest nonce) is verlopen. + + + No authentication provider found to support the authentication token. + Geen authenticatieprovider gevonden die de authenticatietoken ondersteunt. + + + No session available, it either timed out or cookies are not enabled. + Geen sessie beschikbaar, mogelijk is deze verlopen of cookies zijn uitgeschakeld. + + + No token could be found. + Er kon geen authenticatietoken worden gevonden. + + + Username could not be found. + Gebruikersnaam kon niet worden gevonden. + + + Account has expired. + Account is verlopen. + + + Credentials have expired. + Authenticatiegegevens zijn verlopen. + + + Account is disabled. + Account is gedeactiveerd. + + + Account is locked. + Account is geblokkeerd. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf new file mode 100644 index 0000000000000000000000000000000000000000..3635916971476142266564571aeb831b344c545f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + En autentiseringsfeil har skjedd. + + + Authentication credentials could not be found. + PÃ¥loggingsinformasjonen kunne ikke bli funnet. + + + Authentication request could not be processed due to a system problem. + Autentiserings forespørselen kunne ikke bli prosessert grunnet en system feil. + + + Invalid credentials. + Ugyldig pÃ¥loggingsinformasjonen. + + + Cookie has already been used by someone else. + Cookie har allerede blitt brukt av noen andre. + + + Not privileged to request the resource. + Ingen tilgang til Ã¥ be om gitt ressurs. + + + Invalid CSRF token. + Ugyldig CSRF token. + + + Digest nonce has expired. + Digest nonce er utløpt. + + + No authentication provider found to support the authentication token. + Ingen autentiserings tilbyder funnet som støtter gitt autentiserings token. + + + No session available, it either timed out or cookies are not enabled. + Ingen sesjon tilgjengelig, sesjonen er enten utløpt eller cookies ikke skrudd pÃ¥. + + + No token could be found. + Ingen token kunne bli funnet. + + + Username could not be found. + Brukernavn kunne ikke bli funnet. + + + Account has expired. + Brukerkonto har utgÃ¥tt. + + + Credentials have expired. + PÃ¥loggingsinformasjon har utløpt. + + + Account is disabled. + Brukerkonto er deaktivert. + + + Account is locked. + Brukerkonto er sperret. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..8d563d21206a99da709b44a09ef93b4ffece1f27 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + WystÄ…piÅ‚ błąd uwierzytelniania. + + + Authentication credentials could not be found. + Dane uwierzytelniania nie zostaÅ‚y znalezione. + + + Authentication request could not be processed due to a system problem. + Żądanie uwierzytelniania nie mogÅ‚o zostać pomyÅ›lnie zakoÅ„czone z powodu problemu z systemem. + + + Invalid credentials. + NieprawidÅ‚owe dane. + + + Cookie has already been used by someone else. + To ciasteczko jest używane przez kogoÅ› innego. + + + Not privileged to request the resource. + Brak uprawnieÅ„ dla żądania wskazanego zasobu. + + + Invalid CSRF token. + NieprawidÅ‚owy token CSRF. + + + Digest nonce has expired. + Kod dostÄ™pu wygasÅ‚. + + + No authentication provider found to support the authentication token. + Nie znaleziono mechanizmu uwierzytelniania zdolnego do obsÅ‚ugi przesÅ‚anego tokenu. + + + No session available, it either timed out or cookies are not enabled. + Brak danych sesji, sesja wygasÅ‚a lub ciasteczka nie sÄ… włączone. + + + No token could be found. + Nie znaleziono tokenu. + + + Username could not be found. + Użytkownik o podanej nazwie nie istnieje. + + + Account has expired. + Konto wygasÅ‚o. + + + Credentials have expired. + Dane uwierzytelniania wygasÅ‚y. + + + Account is disabled. + Konto jest wyłączone. + + + Account is locked. + Konto jest zablokowane. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf new file mode 100644 index 0000000000000000000000000000000000000000..61685d9f052eafd3ab6b10bfd10866796a68d7a7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Uma exceção ocorreu durante a autenticação. + + + Authentication credentials could not be found. + As credenciais de autenticação não foram encontradas. + + + Authentication request could not be processed due to a system problem. + A autenticação não pôde ser concluída devido a um problema no sistema. + + + Invalid credentials. + Credenciais inválidas. + + + Cookie has already been used by someone else. + Este cookie já está em uso. + + + Not privileged to request the resource. + Não possui privilégios o bastante para requisitar este recurso. + + + Invalid CSRF token. + Token CSRF inválido. + + + Digest nonce has expired. + Digest nonce expirado. + + + No authentication provider found to support the authentication token. + Nenhum provedor de autenticação encontrado para suportar o token de autenticação. + + + No session available, it either timed out or cookies are not enabled. + Nenhuma sessão disponível, ela expirou ou os cookies estão desativados. + + + No token could be found. + Nenhum token foi encontrado. + + + Username could not be found. + Nome de usuário não encontrado. + + + Account has expired. + A conta está expirada. + + + Credentials have expired. + As credenciais estão expiradas. + + + Account is disabled. + Conta desativada. + + + Account is locked. + A conta está travada. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_PT.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_PT.xlf new file mode 100644 index 0000000000000000000000000000000000000000..f2af13ea3d0825d2ba67299587e26866bba9e589 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_PT.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Ocorreu uma excepção durante a autenticação. + + + Authentication credentials could not be found. + As credenciais de autenticação não foram encontradas. + + + Authentication request could not be processed due to a system problem. + O pedido de autenticação não foi concluído devido a um problema no sistema. + + + Invalid credentials. + Credenciais inválidas. + + + Cookie has already been used by someone else. + Este cookie já está em uso. + + + Not privileged to request the resource. + Não possui privilégios para aceder a este recurso. + + + Invalid CSRF token. + Token CSRF inválido. + + + Digest nonce has expired. + Digest nonce expirado. + + + No authentication provider found to support the authentication token. + Nenhum fornecedor de autenticação encontrado para suportar o token de autenticação. + + + No session available, it either timed out or cookies are not enabled. + Não existe sessão disponível, esta expirou ou os cookies estão desativados. + + + No token could be found. + O token não foi encontrado. + + + Username could not be found. + Nome de utilizador não encontrado. + + + Account has expired. + A conta expirou. + + + Credentials have expired. + As credenciais expiraram. + + + Account is disabled. + Conta desativada. + + + Account is locked. + A conta está trancada. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ro.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ro.xlf new file mode 100644 index 0000000000000000000000000000000000000000..440f11036770d6f8388723f3e1495df88a69c903 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ro.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + A apărut o eroare de autentificare. + + + Authentication credentials could not be found. + InformaÈ›iile de autentificare nu au fost găsite. + + + Authentication request could not be processed due to a system problem. + Sistemul nu a putut procesa cererea de autentificare din cauza unei erori. + + + Invalid credentials. + Date de autentificare invalide. + + + Cookie has already been used by someone else. + Cookieul este folosit deja de altcineva. + + + Not privileged to request the resource. + Permisiuni insuficiente pentru resursa cerută. + + + Invalid CSRF token. + Tokenul CSRF este invalid. + + + Digest nonce has expired. + Tokenul temporar a expirat. + + + No authentication provider found to support the authentication token. + Nu a fost găsit nici un agent de autentificare pentru tokenul specificat. + + + No session available, it either timed out or cookies are not enabled. + Sesiunea nu mai este disponibilă, a expirat sau suportul pentru cookieuri nu este activat. + + + No token could be found. + Tokenul nu a putut fi găsit. + + + Username could not be found. + Numele de utilizator nu a fost găsit. + + + Account has expired. + Contul a expirat. + + + Credentials have expired. + Datele de autentificare au expirat. + + + Account is disabled. + Contul este dezactivat. + + + Account is locked. + Contul este blocat. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf new file mode 100644 index 0000000000000000000000000000000000000000..1964f95e09a647c9f9cb6803a1d4c44cf8e4914e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Ошибка аутентификации. + + + Authentication credentials could not be found. + Ðутентификационные данные не найдены. + + + Authentication request could not be processed due to a system problem. + Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð°ÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ð¸ не может быть обработан в ÑвÑзи Ñ Ð¿Ñ€Ð¾Ð±Ð»ÐµÐ¼Ð¾Ð¹ в ÑиÑтеме. + + + Invalid credentials. + ÐедейÑтвительные аутентификационные данные. + + + Cookie has already been used by someone else. + Cookie уже был иÑпользован кем-то другим. + + + Not privileged to request the resource. + ОтÑутÑтвуют права на Ð·Ð°Ð¿Ñ€Ð¾Ñ Ñтого реÑурÑа. + + + Invalid CSRF token. + ÐедейÑтвительный токен CSRF. + + + Digest nonce has expired. + Ð’Ñ€ÐµÐ¼Ñ Ð´ÐµÐ¹ÑÑ‚Ð²Ð¸Ñ Ð¾Ð´Ð½Ð¾Ñ€Ð°Ð·Ð¾Ð²Ð¾Ð³Ð¾ ключа дайджеÑта иÑтекло. + + + No authentication provider found to support the authentication token. + Ðе найден провайдер аутентификации, поддерживающий токен аутентификации. + + + No session available, it either timed out or cookies are not enabled. + СеÑÑÐ¸Ñ Ð½Ðµ найдена, ее Ð²Ñ€ÐµÐ¼Ñ Ð¸Ñтекло, либо cookies не включены. + + + No token could be found. + Токен не найден. + + + Username could not be found. + Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð½Ðµ найдено. + + + Account has expired. + Ð’Ñ€ÐµÐ¼Ñ Ð´ÐµÐ¹ÑÑ‚Ð²Ð¸Ñ ÑƒÑ‡ÐµÑ‚Ð½Ð¾Ð¹ запиÑи иÑтекло. + + + Credentials have expired. + Ð’Ñ€ÐµÐ¼Ñ Ð´ÐµÐ¹ÑÑ‚Ð²Ð¸Ñ Ð°ÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ð¾Ð½Ð½Ñ‹Ñ… данных иÑтекло. + + + Account is disabled. + Ð£Ñ‡ÐµÑ‚Ð½Ð°Ñ Ð·Ð°Ð¿Ð¸ÑÑŒ отключена. + + + Account is locked. + Ð£Ñ‡ÐµÑ‚Ð½Ð°Ñ Ð·Ð°Ð¿Ð¸ÑÑŒ заблокирована. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf new file mode 100644 index 0000000000000000000000000000000000000000..e6552a6a0914e7694c05b3c41057b0c8440be97a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Pri overovaní doÅ¡lo k chybe. + + + Authentication credentials could not be found. + Overovacie údaje neboli nájdené. + + + Authentication request could not be processed due to a system problem. + Požiadavok na overenie nemohol byÅ¥ spracovaný kvôli systémovej chybe. + + + Invalid credentials. + Neplatné prihlasovacie údaje. + + + Cookie has already been used by someone else. + Cookie už bolo použité niekým iným. + + + Not privileged to request the resource. + Nemáte oprávnenie pristupovaÅ¥ k prostriedku. + + + Invalid CSRF token. + Neplatný CSRF token. + + + Digest nonce has expired. + PlatnosÅ¥ inicializaÄného vektoru (digest nonce) skonÄila. + + + No authentication provider found to support the authentication token. + Poskytovateľ pre overovací token nebol nájdený. + + + No session available, it either timed out or cookies are not enabled. + Session nie je k dispozíci, vyprÅ¡ala jej platnosÅ¥, alebo sú zakázané cookies. + + + No token could be found. + Token nebol nájdený. + + + Username could not be found. + Prihlasovacie meno nebolo nájdené. + + + Account has expired. + PlatnosÅ¥ úÄtu skonÄila. + + + Credentials have expired. + PlatnosÅ¥ prihlasovacích údajov skonÄila. + + + Account is disabled. + ÚÄet je zakázaný. + + + Account is locked. + ÚÄet je zablokovaný. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..ee70c9aaa4af0ecd9470d8887112dbfd2ab1b953 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sl.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + PriÅ¡lo je do izjeme pri preverjanju avtentikacije. + + + Authentication credentials could not be found. + Poverilnic za avtentikacijo ni bilo mogoÄe najti. + + + Authentication request could not be processed due to a system problem. + Zahteve za avtentikacijo ni bilo mogoÄe izvesti zaradi sistemske težave. + + + Invalid credentials. + Neveljavne pravice. + + + Cookie has already been used by someone else. + PiÅ¡kotek je uporabil že nekdo drug. + + + Not privileged to request the resource. + Nimate privilegijev za zahtevani vir. + + + Invalid CSRF token. + Neveljaven CSRF žeton. + + + Digest nonce has expired. + ZaÄasni žeton je potekel. + + + No authentication provider found to support the authentication token. + Ponudnika avtentikacije za podporo prijavnega žetona ni bilo mogoÄe najti. + + + No session available, it either timed out or cookies are not enabled. + Seja ni na voljo, ali je potekla ali pa piÅ¡kotki niso omogoÄeni. + + + No token could be found. + Žetona ni bilo mogoÄe najti. + + + Username could not be found. + UporabniÅ¡kega imena ni bilo mogoÄe najti. + + + Account has expired. + RaÄun je potekel. + + + Credentials have expired. + Poverilnice so potekle. + + + Account is disabled. + RaÄun je onemogoÄen. + + + Account is locked. + RaÄun je zaklenjen. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Cyrl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Cyrl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..35e4ddf29b28c4e87dde7f0c6d935396a11cf16e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Cyrl.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Изузетак при аутентификацији. + + + Authentication credentials could not be found. + Ðутентификациони подаци ниÑу пронађени. + + + Authentication request could not be processed due to a system problem. + Захтев за аутентификацију не може бити обрађен због ÑиÑтемÑких проблема. + + + Invalid credentials. + Ðевалидни подаци за аутентификацију. + + + Cookie has already been used by someone else. + Колачић је већ иÑкоришћен од Ñтране неког другог. + + + Not privileged to request the resource. + Ðемате права приÑтупа овом реÑурÑу. + + + Invalid CSRF token. + Ðевалидан CSRF токен. + + + Digest nonce has expired. + Време криптографÑког кључа је иÑтекло. + + + No authentication provider found to support the authentication token. + Ðутентификациони провајдер за подршку токена није пронађен. + + + No session available, it either timed out or cookies are not enabled. + СеÑија није доÑтупна, иÑтекла је или Ñу колачићи иÑкључени. + + + No token could be found. + Токен не може бити пронађен. + + + Username could not be found. + КориÑничко име не може бити пронађено. + + + Account has expired. + Ðалог је иÑтекао. + + + Credentials have expired. + Подаци за аутентификацију Ñу иÑтекли. + + + Account is disabled. + Ðалог је онемогућен. + + + Account is locked. + Ðалог је закључан. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Latn.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Latn.xlf new file mode 100644 index 0000000000000000000000000000000000000000..ddc48076a2a6e2d9b0fc5f0fe5b5f4a75983155d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Latn.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Izuzetak pri autentifikaciji. + + + Authentication credentials could not be found. + Autentifikacioni podaci nisu pronaÄ‘eni. + + + Authentication request could not be processed due to a system problem. + Zahtev za autentifikaciju ne može biti obraÄ‘en zbog sistemskih problema. + + + Invalid credentials. + Nevalidni podaci za autentifikaciju. + + + Cookie has already been used by someone else. + KolaÄić je već iskorišćen od strane nekog drugog. + + + Not privileged to request the resource. + Nemate prava pristupa ovom resursu. + + + Invalid CSRF token. + Nevalidan CSRF token. + + + Digest nonce has expired. + Vreme kriptografskog kljuÄa je isteklo. + + + No authentication provider found to support the authentication token. + Autentifikacioni provajder za podrÅ¡ku tokena nije pronaÄ‘en. + + + No session available, it either timed out or cookies are not enabled. + Sesija nije dostupna, istekla je ili su kolaÄići iskljuÄeni. + + + No token could be found. + Token ne može biti pronaÄ‘en. + + + Username could not be found. + KorisniÄko ime ne može biti pronaÄ‘eno. + + + Account has expired. + Nalog je istekao. + + + Credentials have expired. + Podaci za autentifikaciju su istekli. + + + Account is disabled. + Nalog je onemogućen. + + + Account is locked. + Nalog je zakljuÄan. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf new file mode 100644 index 0000000000000000000000000000000000000000..b5f62092365fa1f4f93ae6ec7a52a53e460c6dba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Ett autentiseringsfel har inträffat. + + + Authentication credentials could not be found. + Uppgifterna för autentisering kunde inte hittas. + + + Authentication request could not be processed due to a system problem. + Autentiseringen kunde inte genomföras pÃ¥ grund av systemfel. + + + Invalid credentials. + Felaktiga uppgifter. + + + Cookie has already been used by someone else. + Cookien har redan använts av nÃ¥gon annan. + + + Not privileged to request the resource. + Saknar rättigheter för resursen. + + + Invalid CSRF token. + Ogiltig CSRF-token. + + + Digest nonce has expired. + Förfallen digest nonce. + + + No authentication provider found to support the authentication token. + Ingen leverantör för autentisering hittades för angiven autentiseringstoken. + + + No session available, it either timed out or cookies are not enabled. + Ingen session finns tillgänglig, antingen har den förfallit eller är cookies inte aktiverat. + + + No token could be found. + Ingen token kunde hittas. + + + Username could not be found. + Användarnamnet kunde inte hittas. + + + Account has expired. + Kontot har förfallit. + + + Credentials have expired. + Uppgifterna har förfallit. + + + Account is disabled. + Kontot är inaktiverat. + + + Account is locked. + Kontot är lÃ¥st. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.th.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.th.xlf new file mode 100644 index 0000000000000000000000000000000000000000..a8cb8d5ce7e3bb6a24267224e8f2404e937784c9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.th.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + พบความผิดพลาดในà¸à¸²à¸£à¸£à¸±à¸šà¸£à¸­à¸‡à¸•ัวตน + + + Authentication credentials could not be found. + ไม่พบข้อมูลในà¸à¸²à¸£à¸£à¸±à¸šà¸£à¸­à¸‡à¸•ัวตน (credentials) + + + Authentication request could not be processed due to a system problem. + คำร้องในà¸à¸²à¸£à¸£à¸±à¸šà¸£à¸­à¸‡à¸•ัวตนไม่สามารถดำเนินà¸à¸²à¸£à¹„ด้ เนื่องมาจาà¸à¸›à¸±à¸à¸«à¸²à¸‚องระบบ + + + Invalid credentials. + ข้อมูลà¸à¸²à¸£à¸£à¸±à¸šà¸£à¸­à¸‡à¸•ัวตนไม่ถูà¸à¸•้อง + + + Cookie has already been used by someone else. + Cookie ถูà¸à¹ƒà¸Šà¹‰à¸‡à¸²à¸™à¹„ปà¹à¸¥à¹‰à¸§à¸”้วยผู้อื่น + + + Not privileged to request the resource. + ไม่ได้รับสิทธิ์ให้ใช้งานส่วนนี้ได้ + + + Invalid CSRF token. + CSRF token ไม่ถูà¸à¸•้อง + + + Digest nonce has expired. + Digest nonce หมดอายุ + + + No authentication provider found to support the authentication token. + ไม่พบ authentication provider ที่รองรับสำหรับ authentication token + + + No session available, it either timed out or cookies are not enabled. + ไม่มี session ที่พร้อมใช้งาน, Session หมดอายุไปà¹à¸¥à¹‰à¸§à¸«à¸£à¸·à¸­ cookies ไม่ถูà¸à¹€à¸›à¸´à¸”ใช้งาน + + + No token could be found. + ไม่พบ token + + + Username could not be found. + ไม่พบ Username + + + Account has expired. + บัà¸à¸Šà¸µà¸«à¸¡à¸”อายุไปà¹à¸¥à¹‰à¸§ + + + Credentials have expired. + ข้อมูลà¸à¸²à¸£à¸£à¸°à¸šà¸¸à¸•ัวตนหมดอายุà¹à¸¥à¹‰à¸§ + + + Account is disabled. + บัà¸à¸Šà¸µà¸–ูà¸à¸£à¸°à¸‡à¸±à¸šà¹à¸¥à¹‰à¸§ + + + Account is locked. + บัà¸à¸Šà¸µà¸–ูà¸à¸¥à¹‡à¸­à¸à¹à¸¥à¹‰à¸§ + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf new file mode 100644 index 0000000000000000000000000000000000000000..68c44213d18c3051206381427259fdd8ef3412fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Bir yetkilendirme istisnası oluÅŸtu. + + + Authentication credentials could not be found. + Kimlik bilgileri bulunamadı. + + + Authentication request could not be processed due to a system problem. + Bir sistem hatası nedeniyle yetkilendirme isteÄŸi iÅŸleme alınamıyor. + + + Invalid credentials. + Geçersiz kimlik bilgileri. + + + Cookie has already been used by someone else. + Çerez bir baÅŸkası tarafından zaten kullanılmıştı. + + + Not privileged to request the resource. + Kaynak talebi için imtiyaz bulunamadı. + + + Invalid CSRF token. + Geçersiz CSRF fiÅŸi. + + + Digest nonce has expired. + Derleme zaman aşımına uÄŸradı. + + + No authentication provider found to support the authentication token. + Yetkilendirme fiÅŸini destekleyecek yetkilendirme saÄŸlayıcısı bulunamadı. + + + No session available, it either timed out or cookies are not enabled. + Oturum bulunamadı, zaman aşımına uÄŸradı veya çerezler etkin deÄŸil. + + + No token could be found. + FiÅŸ bulunamadı. + + + Username could not be found. + Kullanıcı adı bulunamadı. + + + Account has expired. + Hesap zaman aşımına uÄŸradı. + + + Credentials have expired. + Kimlik bilgileri zaman aşımına uÄŸradı. + + + Account is disabled. + Hesap engellenmiÅŸ. + + + Account is locked. + Hesap kilitlenmiÅŸ. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ua.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ua.xlf new file mode 100644 index 0000000000000000000000000000000000000000..79721212068db2b13f408ce70c0006b6a37f9390 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ua.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Помилка автентифікації. + + + Authentication credentials could not be found. + Ðвтентифікаційні дані не знайдено. + + + Authentication request could not be processed due to a system problem. + Запит на автентифікацію не може бути опрацьовано у зв’Ñзку з проблемою в ÑиÑтемі. + + + Invalid credentials. + Ðевірні автентифікаційні дані. + + + Cookie has already been used by someone else. + ХтоÑÑŒ інший вже викориÑтав цей Ñookie. + + + Not privileged to request the resource. + ВідÑутні права на запит цього реÑурÑу. + + + Invalid CSRF token. + Ðевірний токен CSRF. + + + Digest nonce has expired. + ЗакінчивÑÑ Ñ‚ÐµÑ€Ð¼Ñ–Ð½ дії одноразового ключа дайджеÑту. + + + No authentication provider found to support the authentication token. + Ðе знайдено провайдера автентифікації, що підтримує токен автентифікаціії. + + + No session available, it either timed out or cookies are not enabled. + СеÑÑ–Ñ Ð½ÐµÐ´Ð¾Ñтупна, Ñ—Ñ— Ñ‡Ð°Ñ Ð²Ð¸Ð¹ÑˆÐ¾Ð², або cookies вимкнено. + + + No token could be found. + Токен не знайдено. + + + Username could not be found. + Ð†Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача не знайдено. + + + Account has expired. + Термін дії облікового запиÑу вичерпано. + + + Credentials have expired. + Термін дії автентифікаційних даних вичерпано. + + + Account is disabled. + Обліковий Ð·Ð°Ð¿Ð¸Ñ Ð²Ñ–Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¾. + + + Account is locked. + Обліковий Ð·Ð°Ð¿Ð¸Ñ Ð·Ð°Ð±Ð»Ð¾ÐºÐ¾Ð²Ð°Ð½Ð¾. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf new file mode 100644 index 0000000000000000000000000000000000000000..b85a43995fc0a699d45f3264f8e093e190053fee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + Có lá»—i trong quá trình xác thá»±c. + + + Authentication credentials could not be found. + Thông tin dùng để xác thá»±c không tìm thấy. + + + Authentication request could not be processed due to a system problem. + Yêu cầu xác thá»±c không thể thá»±c hiện do lá»—i cá»§a hệ thống. + + + Invalid credentials. + Thông tin dùng để xác thá»±c không hợp lệ. + + + Cookie has already been used by someone else. + Cookie đã được dùng bởi ngưá»i dùng khác. + + + Not privileged to request the resource. + Không được phép yêu cầu tài nguyên. + + + Invalid CSRF token. + Mã CSRF không hợp lệ. + + + Digest nonce has expired. + Mã dùng má»™t lần đã hết hạn. + + + No authentication provider found to support the authentication token. + Không tìm thấy nhà cung cấp dịch vụ xác thá»±c nào cho mã xác thá»±c mà bạn sá»­ dụng. + + + No session available, it either timed out or cookies are not enabled. + Không tìm thấy phiên làm việc. Phiên làm việc hoặc cookie có thể bị tắt. + + + No token could be found. + Không tìm thấy mã token. + + + Username could not be found. + Không tìm thấy tên ngưá»i dùng username. + + + Account has expired. + Tài khoản đã hết hạn. + + + Credentials have expired. + Thông tin xác thá»±c đã hết hạn. + + + Account is disabled. + Tài khoản bị tạm ngừng. + + + Account is locked. + Tài khoản bị khóa. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf new file mode 100644 index 0000000000000000000000000000000000000000..2d6affecec2cce7d1432ba00bca83c1040f2bec8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf @@ -0,0 +1,71 @@ + + + + + + An authentication exception occurred. + 身份验è¯å‘生异常。 + + + Authentication credentials could not be found. + 没有找到身份验è¯çš„凭è¯ã€‚ + + + Authentication request could not be processed due to a system problem. + 由于系统故障,身份验è¯çš„请求无法被处ç†ã€‚ + + + Invalid credentials. + 无效的凭è¯ã€‚ + + + Cookie has already been used by someone else. + Cookie å·²ç»è¢«å…¶ä»–人使用。 + + + Not privileged to request the resource. + 没有æƒé™è¯·æ±‚此资æºã€‚ + + + Invalid CSRF token. + 无效的 CSRF token 。 + + + Digest nonce has expired. + 摘è¦éšæœºä¸²ï¼ˆdigest nonce)已过期。 + + + No authentication provider found to support the authentication token. + æ²¡æœ‰æ‰¾åˆ°æ”¯æŒæ­¤ token çš„èº«ä»½éªŒè¯æœåŠ¡æä¾›æ–¹ã€‚ + + + No session available, it either timed out or cookies are not enabled. + Session ä¸å¯ç”¨ã€‚会è¯è¶…时或没有å¯ç”¨ cookies 。 + + + No token could be found. + 找ä¸åˆ° token 。 + + + Username could not be found. + 找ä¸åˆ°ç”¨æˆ·å。 + + + Account has expired. + å¸å·å·²è¿‡æœŸã€‚ + + + Credentials have expired. + 凭è¯å·²è¿‡æœŸã€‚ + + + Account is disabled. + å¸å·å·²è¢«ç¦ç”¨ã€‚ + + + Account is locked. + å¸å·å·²è¢«é”定。 + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/Role.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/Role.php new file mode 100644 index 0000000000000000000000000000000000000000..5b50981fe1a78520786cfd2c4d8a7ba90fdc8e85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/Role.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Role; + +/** + * Role is a simple implementation of a RoleInterface where the role is a + * string. + * + * @author Fabien Potencier + */ +class Role implements RoleInterface +{ + private $role; + + /** + * Constructor. + * + * @param string $role The role name + */ + public function __construct($role) + { + $this->role = (string) $role; + } + + /** + * {@inheritdoc} + */ + public function getRole() + { + return $this->role; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php new file mode 100644 index 0000000000000000000000000000000000000000..95e76ee279316b675d9cfc06d0c8c66ca23c2dc2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Role; + +/** + * RoleHierarchy defines a role hierarchy. + * + * @author Fabien Potencier + */ +class RoleHierarchy implements RoleHierarchyInterface +{ + private $hierarchy; + protected $map; + + /** + * Constructor. + * + * @param array $hierarchy An array defining the hierarchy + */ + public function __construct(array $hierarchy) + { + $this->hierarchy = $hierarchy; + + $this->buildRoleMap(); + } + + /** + * {@inheritdoc} + */ + public function getReachableRoles(array $roles) + { + $reachableRoles = $roles; + foreach ($roles as $role) { + if (!isset($this->map[$role->getRole()])) { + continue; + } + + foreach ($this->map[$role->getRole()] as $r) { + $reachableRoles[] = new Role($r); + } + } + + return $reachableRoles; + } + + protected function buildRoleMap() + { + $this->map = array(); + foreach ($this->hierarchy as $main => $roles) { + $this->map[$main] = $roles; + $visited = array(); + $additionalRoles = $roles; + while ($role = array_shift($additionalRoles)) { + if (!isset($this->hierarchy[$role])) { + continue; + } + + $visited[] = $role; + + foreach ($this->hierarchy[$role] as $roleToAdd) { + $this->map[$main][] = $roleToAdd; + } + + foreach (array_diff($this->hierarchy[$role], $visited) as $additionalRole) { + $additionalRoles[] = $additionalRole; + } + } + + $this->map[$main] = array_unique($this->map[$main]); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleHierarchyInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleHierarchyInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c994009cb4b4006e8ac91eb9e9407c7d7b310129 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleHierarchyInterface.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\Component\Security\Core\Role; + +/** + * RoleHierarchyInterface is the interface for a role hierarchy. + * + * @author Fabien Potencier + */ +interface RoleHierarchyInterface +{ + /** + * Returns an array of all reachable roles by the given ones. + * + * Reachable roles are the roles directly assigned but also all roles that + * are transitively reachable from them in the role hierarchy. + * + * @param RoleInterface[] $roles An array of directly assigned roles + * + * @return RoleInterface[] An array of all reachable roles + */ + public function getReachableRoles(array $roles); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..3d4cbeab567ddf740266fc87c80e3bb17b9aad21 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/RoleInterface.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Role; + +/** + * RoleInterface represents a role granted to a user. + * + * A role must either have a string representation or it needs to be explicitly + * supported by at least one AccessDecisionManager. + * + * @author Fabien Potencier + */ +interface RoleInterface +{ + /** + * Returns the role. + * + * This method returns a string representation whenever possible. + * + * When the role cannot be represented with sufficient precision by a + * string, it should return null. + * + * @return string|null A string representation of the role, or null + */ + public function getRole(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/SwitchUserRole.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/SwitchUserRole.php new file mode 100644 index 0000000000000000000000000000000000000000..c6795841beabaeee9b52a1eacb66049ac5e89bb7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Role/SwitchUserRole.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Role; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * SwitchUserRole is used when the current user temporarily impersonates + * another one. + * + * @author Fabien Potencier + */ +class SwitchUserRole extends Role +{ + private $source; + + /** + * Constructor. + * + * @param string $role The role as a string + * @param TokenInterface $source The original token + */ + public function __construct($role, TokenInterface $source) + { + parent::__construct($role); + + $this->source = $source; + } + + /** + * Returns the original Token. + * + * @return TokenInterface The original TokenInterface instance + */ + public function getSource() + { + return $this->source; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Security.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Security.php new file mode 100644 index 0000000000000000000000000000000000000000..84cc77dcf7f324953618d2e9132c754b9a51453b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Security.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core; + +/** + * This class holds security information. + * + * @author Johannes M. Schmitt + */ +final class Security +{ + const ACCESS_DENIED_ERROR = '_security.403_error'; + const AUTHENTICATION_ERROR = '_security.last_error'; + const LAST_USERNAME = '_security.last_username'; + const MAX_USERNAME_LENGTH = 4096; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9b8105012c3d86954c2ad26ea1b205e4722d9eb8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php @@ -0,0 +1,149 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager; +use Symfony\Component\Security\Core\Exception\ProviderNotFoundException; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Exception\AccountStatusException; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; + +class AuthenticationProviderManagerTest extends TestCase +{ + /** + * @expectedException \InvalidArgumentException + */ + public function testAuthenticateWithoutProviders() + { + new AuthenticationProviderManager(array()); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testAuthenticateWithProvidersWithIncorrectInterface() + { + new AuthenticationProviderManager(array( + new \stdClass(), + )); + } + + public function testAuthenticateWhenNoProviderSupportsToken() + { + $manager = new AuthenticationProviderManager(array( + $this->getAuthenticationProvider(false), + )); + + try { + $manager->authenticate($token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); + $this->fail(); + } catch (ProviderNotFoundException $e) { + $this->assertSame($token, $e->getToken()); + } + } + + public function testAuthenticateWhenProviderReturnsAccountStatusException() + { + $manager = new AuthenticationProviderManager(array( + $this->getAuthenticationProvider(true, null, 'Symfony\Component\Security\Core\Exception\AccountStatusException'), + )); + + try { + $manager->authenticate($token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); + $this->fail(); + } catch (AccountStatusException $e) { + $this->assertSame($token, $e->getToken()); + } + } + + public function testAuthenticateWhenProviderReturnsAuthenticationException() + { + $manager = new AuthenticationProviderManager(array( + $this->getAuthenticationProvider(true, null, 'Symfony\Component\Security\Core\Exception\AuthenticationException'), + )); + + try { + $manager->authenticate($token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); + $this->fail(); + } catch (AuthenticationException $e) { + $this->assertSame($token, $e->getToken()); + } + } + + public function testAuthenticateWhenOneReturnsAuthenticationExceptionButNotAll() + { + $manager = new AuthenticationProviderManager(array( + $this->getAuthenticationProvider(true, null, 'Symfony\Component\Security\Core\Exception\AuthenticationException'), + $this->getAuthenticationProvider(true, $expected = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()), + )); + + $token = $manager->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); + $this->assertSame($expected, $token); + } + + public function testAuthenticateReturnsTokenOfTheFirstMatchingProvider() + { + $second = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface')->getMock(); + $second + ->expects($this->never()) + ->method('supports') + ; + $manager = new AuthenticationProviderManager(array( + $this->getAuthenticationProvider(true, $expected = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()), + $second, + )); + + $token = $manager->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); + $this->assertSame($expected, $token); + } + + public function testEraseCredentialFlag() + { + $manager = new AuthenticationProviderManager(array( + $this->getAuthenticationProvider(true, $token = new UsernamePasswordToken('foo', 'bar', 'key')), + )); + + $token = $manager->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); + $this->assertEquals('', $token->getCredentials()); + + $manager = new AuthenticationProviderManager(array( + $this->getAuthenticationProvider(true, $token = new UsernamePasswordToken('foo', 'bar', 'key')), + ), false); + + $token = $manager->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); + $this->assertEquals('bar', $token->getCredentials()); + } + + protected function getAuthenticationProvider($supports, $token = null, $exception = null) + { + $provider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface')->getMock(); + $provider->expects($this->once()) + ->method('supports') + ->will($this->returnValue($supports)) + ; + + if (null !== $token) { + $provider->expects($this->once()) + ->method('authenticate') + ->will($this->returnValue($token)) + ; + } elseif (null !== $exception) { + $provider->expects($this->once()) + ->method('authenticate') + ->will($this->throwException($this->getMockBuilder($exception)->setMethods(null)->getMock())) + ; + } + + return $provider; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php new file mode 100644 index 0000000000000000000000000000000000000000..55ca05b43b5fb05001f1e622411c41e9a527f58d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver; + +class AuthenticationTrustResolverTest extends TestCase +{ + public function testIsAnonymous() + { + $resolver = $this->getResolver(); + + $this->assertFalse($resolver->isAnonymous(null)); + $this->assertFalse($resolver->isAnonymous($this->getToken())); + $this->assertFalse($resolver->isAnonymous($this->getRememberMeToken())); + $this->assertTrue($resolver->isAnonymous($this->getAnonymousToken())); + } + + public function testIsRememberMe() + { + $resolver = $this->getResolver(); + + $this->assertFalse($resolver->isRememberMe(null)); + $this->assertFalse($resolver->isRememberMe($this->getToken())); + $this->assertFalse($resolver->isRememberMe($this->getAnonymousToken())); + $this->assertTrue($resolver->isRememberMe($this->getRememberMeToken())); + } + + public function testisFullFledged() + { + $resolver = $this->getResolver(); + + $this->assertFalse($resolver->isFullFledged(null)); + $this->assertFalse($resolver->isFullFledged($this->getAnonymousToken())); + $this->assertFalse($resolver->isFullFledged($this->getRememberMeToken())); + $this->assertTrue($resolver->isFullFledged($this->getToken())); + } + + protected function getToken() + { + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + } + + protected function getAnonymousToken() + { + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken')->setConstructorArgs(array('', ''))->getMock(); + } + + protected function getRememberMeToken() + { + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken')->setMethods(array('setPersistent'))->disableOriginalConstructor()->getMock(); + } + + protected function getResolver() + { + return new AuthenticationTrustResolver( + 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AnonymousToken', + 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\RememberMeToken' + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5ded85b073566812f2e2a7cbda62b8283630afb1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider; + +class AnonymousAuthenticationProviderTest extends TestCase +{ + public function testSupports() + { + $provider = $this->getProvider('foo'); + + $this->assertTrue($provider->supports($this->getSupportedToken('foo'))); + $this->assertFalse($provider->supports($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); + } + + public function testAuthenticateWhenTokenIsNotSupported() + { + $provider = $this->getProvider('foo'); + + $this->assertNull($provider->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testAuthenticateWhenSecretIsNotValid() + { + $provider = $this->getProvider('foo'); + + $provider->authenticate($this->getSupportedToken('bar')); + } + + public function testAuthenticate() + { + $provider = $this->getProvider('foo'); + $token = $this->getSupportedToken('foo'); + + $this->assertSame($token, $provider->authenticate($token)); + } + + protected function getSupportedToken($secret) + { + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken')->setMethods(array('getSecret'))->disableOriginalConstructor()->getMock(); + $token->expects($this->any()) + ->method('getSecret') + ->will($this->returnValue($secret)) + ; + + return $token; + } + + protected function getProvider($secret) + { + return new AnonymousAuthenticationProvider($secret); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..85dafc1e9f8be377c3967f3e0af97b20fd398aa0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php @@ -0,0 +1,301 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder; +use Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; + +class DaoAuthenticationProviderTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationServiceException + */ + public function testRetrieveUserWhenProviderDoesNotReturnAnUserInterface() + { + $provider = $this->getProvider('fabien'); + $method = new \ReflectionMethod($provider, 'retrieveUser'); + $method->setAccessible(true); + + $method->invoke($provider, 'fabien', $this->getSupportedToken()); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\UsernameNotFoundException + */ + public function testRetrieveUserWhenUsernameIsNotFound() + { + $userProvider = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface')->getMock(); + $userProvider->expects($this->once()) + ->method('loadUserByUsername') + ->will($this->throwException(new UsernameNotFoundException())) + ; + + $provider = new DaoAuthenticationProvider($userProvider, $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface')->getMock(), 'key', $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')->getMock()); + $method = new \ReflectionMethod($provider, 'retrieveUser'); + $method->setAccessible(true); + + $method->invoke($provider, 'fabien', $this->getSupportedToken()); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationServiceException + */ + public function testRetrieveUserWhenAnExceptionOccurs() + { + $userProvider = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface')->getMock(); + $userProvider->expects($this->once()) + ->method('loadUserByUsername') + ->will($this->throwException(new \RuntimeException())) + ; + + $provider = new DaoAuthenticationProvider($userProvider, $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface')->getMock(), 'key', $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')->getMock()); + $method = new \ReflectionMethod($provider, 'retrieveUser'); + $method->setAccessible(true); + + $method->invoke($provider, 'fabien', $this->getSupportedToken()); + } + + public function testRetrieveUserReturnsUserFromTokenOnReauthentication() + { + $userProvider = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface')->getMock(); + $userProvider->expects($this->never()) + ->method('loadUserByUsername') + ; + + $user = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserInterface')->getMock(); + $token = $this->getSupportedToken(); + $token->expects($this->once()) + ->method('getUser') + ->will($this->returnValue($user)) + ; + + $provider = new DaoAuthenticationProvider($userProvider, $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface')->getMock(), 'key', $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')->getMock()); + $reflection = new \ReflectionMethod($provider, 'retrieveUser'); + $reflection->setAccessible(true); + $result = $reflection->invoke($provider, null, $token); + + $this->assertSame($user, $result); + } + + public function testRetrieveUser() + { + $user = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserInterface')->getMock(); + + $userProvider = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface')->getMock(); + $userProvider->expects($this->once()) + ->method('loadUserByUsername') + ->will($this->returnValue($user)) + ; + + $provider = new DaoAuthenticationProvider($userProvider, $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface')->getMock(), 'key', $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')->getMock()); + $method = new \ReflectionMethod($provider, 'retrieveUser'); + $method->setAccessible(true); + + $this->assertSame($user, $method->invoke($provider, 'fabien', $this->getSupportedToken())); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testCheckAuthenticationWhenCredentialsAreEmpty() + { + $encoder = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface')->getMock(); + $encoder + ->expects($this->never()) + ->method('isPasswordValid') + ; + + $provider = $this->getProvider(null, null, $encoder); + $method = new \ReflectionMethod($provider, 'checkAuthentication'); + $method->setAccessible(true); + + $token = $this->getSupportedToken(); + $token + ->expects($this->once()) + ->method('getCredentials') + ->will($this->returnValue('')) + ; + + $method->invoke( + $provider, + $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserInterface')->getMock(), + $token + ); + } + + public function testCheckAuthenticationWhenCredentialsAre0() + { + $encoder = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface')->getMock(); + $encoder + ->expects($this->once()) + ->method('isPasswordValid') + ->will($this->returnValue(true)) + ; + + $provider = $this->getProvider(null, null, $encoder); + $method = new \ReflectionMethod($provider, 'checkAuthentication'); + $method->setAccessible(true); + + $token = $this->getSupportedToken(); + $token + ->expects($this->once()) + ->method('getCredentials') + ->will($this->returnValue('0')) + ; + + $method->invoke( + $provider, + $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserInterface')->getMock(), + $token + ); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testCheckAuthenticationWhenCredentialsAreNotValid() + { + $encoder = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface')->getMock(); + $encoder->expects($this->once()) + ->method('isPasswordValid') + ->will($this->returnValue(false)) + ; + + $provider = $this->getProvider(null, null, $encoder); + $method = new \ReflectionMethod($provider, 'checkAuthentication'); + $method->setAccessible(true); + + $token = $this->getSupportedToken(); + $token->expects($this->once()) + ->method('getCredentials') + ->will($this->returnValue('foo')) + ; + + $method->invoke($provider, $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserInterface')->getMock(), $token); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testCheckAuthenticationDoesNotReauthenticateWhenPasswordHasChanged() + { + $user = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserInterface')->getMock(); + $user->expects($this->once()) + ->method('getPassword') + ->will($this->returnValue('foo')) + ; + + $token = $this->getSupportedToken(); + $token->expects($this->once()) + ->method('getUser') + ->will($this->returnValue($user)); + + $dbUser = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserInterface')->getMock(); + $dbUser->expects($this->once()) + ->method('getPassword') + ->will($this->returnValue('newFoo')) + ; + + $provider = $this->getProvider(); + $reflection = new \ReflectionMethod($provider, 'checkAuthentication'); + $reflection->setAccessible(true); + $reflection->invoke($provider, $dbUser, $token); + } + + public function testCheckAuthenticationWhenTokenNeedsReauthenticationWorksWithoutOriginalCredentials() + { + $user = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserInterface')->getMock(); + $user->expects($this->once()) + ->method('getPassword') + ->will($this->returnValue('foo')) + ; + + $token = $this->getSupportedToken(); + $token->expects($this->once()) + ->method('getUser') + ->will($this->returnValue($user)); + + $dbUser = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserInterface')->getMock(); + $dbUser->expects($this->once()) + ->method('getPassword') + ->will($this->returnValue('foo')) + ; + + $provider = $this->getProvider(); + $reflection = new \ReflectionMethod($provider, 'checkAuthentication'); + $reflection->setAccessible(true); + $reflection->invoke($provider, $dbUser, $token); + } + + public function testCheckAuthentication() + { + $encoder = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface')->getMock(); + $encoder->expects($this->once()) + ->method('isPasswordValid') + ->will($this->returnValue(true)) + ; + + $provider = $this->getProvider(null, null, $encoder); + $method = new \ReflectionMethod($provider, 'checkAuthentication'); + $method->setAccessible(true); + + $token = $this->getSupportedToken(); + $token->expects($this->once()) + ->method('getCredentials') + ->will($this->returnValue('foo')) + ; + + $method->invoke($provider, $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserInterface')->getMock(), $token); + } + + protected function getSupportedToken() + { + $mock = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken')->setMethods(array('getCredentials', 'getUser', 'getProviderKey'))->disableOriginalConstructor()->getMock(); + $mock + ->expects($this->any()) + ->method('getProviderKey') + ->will($this->returnValue('key')) + ; + + return $mock; + } + + protected function getProvider($user = null, $userChecker = null, $passwordEncoder = null) + { + $userProvider = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface')->getMock(); + if (null !== $user) { + $userProvider->expects($this->once()) + ->method('loadUserByUsername') + ->will($this->returnValue($user)) + ; + } + + if (null === $userChecker) { + $userChecker = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface')->getMock(); + } + + if (null === $passwordEncoder) { + $passwordEncoder = new PlaintextPasswordEncoder(); + } + + $encoderFactory = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')->getMock(); + $encoderFactory + ->expects($this->any()) + ->method('getEncoder') + ->will($this->returnValue($passwordEncoder)) + ; + + return new DaoAuthenticationProvider($userProvider, $userChecker, 'key', $encoderFactory); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8c86f66494a5df566f881a204e91daf3259ee6d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Ldap\LdapInterface; +use Symfony\Component\Security\Core\Authentication\Provider\LdapBindAuthenticationProvider; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\User\User; +use Symfony\Component\Ldap\Exception\ConnectionException; +use Symfony\Component\Security\Core\User\UserCheckerInterface; +use Symfony\Component\Security\Core\User\UserProviderInterface; + +/** + * @requires extension ldap + */ +class LdapBindAuthenticationProviderTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + * @expectedExceptionMessage The presented password must not be empty. + */ + public function testEmptyPasswordShouldThrowAnException() + { + $userProvider = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserProviderInterface')->getMock(); + $ldap = $this->getMockBuilder('Symfony\Component\Ldap\LdapClientInterface')->getMock(); + $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); + + $provider = new LdapBindAuthenticationProvider($userProvider, $userChecker, 'key', $ldap); + $reflection = new \ReflectionMethod($provider, 'checkAuthentication'); + $reflection->setAccessible(true); + + $reflection->invoke($provider, new User('foo', null), new UsernamePasswordToken('foo', '', 'key')); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + * @expectedExceptionMessage The presented password is invalid. + */ + public function testBindFailureShouldThrowAnException() + { + $userProvider = $this->getMockBuilder(UserProviderInterface::class)->getMock(); + $ldap = $this->getMockBuilder(LdapInterface::class)->getMock(); + $ldap + ->expects($this->once()) + ->method('bind') + ->will($this->throwException(new ConnectionException())) + ; + $userChecker = $this->getMockBuilder(UserCheckerInterface::class)->getMock(); + + $provider = new LdapBindAuthenticationProvider($userProvider, $userChecker, 'key', $ldap); + $reflection = new \ReflectionMethod($provider, 'checkAuthentication'); + $reflection->setAccessible(true); + + $reflection->invoke($provider, new User('foo', null), new UsernamePasswordToken('foo', 'bar', 'key')); + } + + public function testRetrieveUser() + { + $userProvider = $this->getMockBuilder(UserProviderInterface::class)->getMock(); + $userProvider + ->expects($this->once()) + ->method('loadUserByUsername') + ->with('foo') + ; + $ldap = $this->getMockBuilder(LdapInterface::class)->getMock(); + + $userChecker = $this->getMockBuilder(UserCheckerInterface::class)->getMock(); + + $provider = new LdapBindAuthenticationProvider($userProvider, $userChecker, 'key', $ldap); + $reflection = new \ReflectionMethod($provider, 'retrieveUser'); + $reflection->setAccessible(true); + + $reflection->invoke($provider, 'foo', new UsernamePasswordToken('foo', 'bar', 'key')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5a78d0ebb9119b13d11acaa36c9e8b1a7cc6f03e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.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\Component\Security\Core\Tests\Authentication\Provider; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider; +use Symfony\Component\Security\Core\Exception\LockedException; + +class PreAuthenticatedAuthenticationProviderTest extends TestCase +{ + public function testSupports() + { + $provider = $this->getProvider(); + + $this->assertTrue($provider->supports($this->getSupportedToken())); + $this->assertFalse($provider->supports($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken') + ->disableOriginalConstructor() + ->getMock() + ; + $token + ->expects($this->once()) + ->method('getProviderKey') + ->will($this->returnValue('foo')) + ; + $this->assertFalse($provider->supports($token)); + } + + public function testAuthenticateWhenTokenIsNotSupported() + { + $provider = $this->getProvider(); + + $this->assertNull($provider->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testAuthenticateWhenNoUserIsSet() + { + $provider = $this->getProvider(); + $provider->authenticate($this->getSupportedToken('')); + } + + public function testAuthenticate() + { + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user + ->expects($this->once()) + ->method('getRoles') + ->will($this->returnValue(array())) + ; + $provider = $this->getProvider($user); + + $token = $provider->authenticate($this->getSupportedToken('fabien', 'pass')); + $this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken', $token); + $this->assertEquals('pass', $token->getCredentials()); + $this->assertEquals('key', $token->getProviderKey()); + $this->assertEquals(array(), $token->getRoles()); + $this->assertEquals(array('foo' => 'bar'), $token->getAttributes(), '->authenticate() copies token attributes'); + $this->assertSame($user, $token->getUser()); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\LockedException + */ + public function testAuthenticateWhenUserCheckerThrowsException() + { + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + + $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); + $userChecker->expects($this->once()) + ->method('checkPostAuth') + ->will($this->throwException(new LockedException())) + ; + + $provider = $this->getProvider($user, $userChecker); + + $provider->authenticate($this->getSupportedToken('fabien')); + } + + protected function getSupportedToken($user = false, $credentials = false) + { + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken')->setMethods(array('getUser', 'getCredentials', 'getProviderKey'))->disableOriginalConstructor()->getMock(); + if (false !== $user) { + $token->expects($this->once()) + ->method('getUser') + ->will($this->returnValue($user)) + ; + } + if (false !== $credentials) { + $token->expects($this->once()) + ->method('getCredentials') + ->will($this->returnValue($credentials)) + ; + } + + $token + ->expects($this->any()) + ->method('getProviderKey') + ->will($this->returnValue('key')) + ; + + $token->setAttributes(array('foo' => 'bar')); + + return $token; + } + + protected function getProvider($user = null, $userChecker = null) + { + $userProvider = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserProviderInterface')->getMock(); + if (null !== $user) { + $userProvider->expects($this->once()) + ->method('loadUserByUsername') + ->will($this->returnValue($user)) + ; + } + + if (null === $userChecker) { + $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); + } + + return new PreAuthenticatedAuthenticationProvider($userProvider, $userChecker, 'key'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4865cb177d3bf827d726adbb41c1f8b4d2ef14fb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php @@ -0,0 +1,108 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider; +use Symfony\Component\Security\Core\Exception\DisabledException; +use Symfony\Component\Security\Core\Role\Role; + +class RememberMeAuthenticationProviderTest extends TestCase +{ + public function testSupports() + { + $provider = $this->getProvider(); + + $this->assertTrue($provider->supports($this->getSupportedToken())); + $this->assertFalse($provider->supports($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); + } + + public function testAuthenticateWhenTokenIsNotSupported() + { + $provider = $this->getProvider(); + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $this->assertNull($provider->authenticate($token)); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testAuthenticateWhenSecretsDoNotMatch() + { + $provider = $this->getProvider(null, 'secret1'); + $token = $this->getSupportedToken(null, 'secret2'); + + $provider->authenticate($token); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\DisabledException + */ + public function testAuthenticateWhenPreChecksFails() + { + $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); + $userChecker->expects($this->once()) + ->method('checkPreAuth') + ->will($this->throwException(new DisabledException())); + + $provider = $this->getProvider($userChecker); + + $provider->authenticate($this->getSupportedToken()); + } + + public function testAuthenticate() + { + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user->expects($this->exactly(2)) + ->method('getRoles') + ->will($this->returnValue(array('ROLE_FOO'))); + + $provider = $this->getProvider(); + + $token = $this->getSupportedToken($user); + $authToken = $provider->authenticate($token); + + $this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken', $authToken); + $this->assertSame($user, $authToken->getUser()); + $this->assertEquals(array(new Role('ROLE_FOO')), $authToken->getRoles()); + $this->assertEquals('', $authToken->getCredentials()); + } + + protected function getSupportedToken($user = null, $secret = 'test') + { + if (null === $user) { + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user + ->expects($this->any()) + ->method('getRoles') + ->will($this->returnValue(array())); + } + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken')->setMethods(array('getProviderKey'))->setConstructorArgs(array($user, 'foo', $secret))->getMock(); + $token + ->expects($this->once()) + ->method('getProviderKey') + ->will($this->returnValue('foo')); + + return $token; + } + + protected function getProvider($userChecker = null, $key = 'test') + { + if (null === $userChecker) { + $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); + } + + return new RememberMeAuthenticationProvider($userChecker, $key, 'foo'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..50990b7e465fd8cc1d86f898c491538ee022551e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php @@ -0,0 +1,251 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Exception\AccountExpiredException; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\Security\Core\Exception\CredentialsExpiredException; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Role\Role; +use Symfony\Component\Security\Core\Role\SwitchUserRole; + +class UserAuthenticationProviderTest extends TestCase +{ + public function testSupports() + { + $provider = $this->getProvider(); + + $this->assertTrue($provider->supports($this->getSupportedToken())); + $this->assertFalse($provider->supports($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); + } + + public function testAuthenticateWhenTokenIsNotSupported() + { + $provider = $this->getProvider(); + + $this->assertNull($provider->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\UsernameNotFoundException + */ + public function testAuthenticateWhenUsernameIsNotFound() + { + $provider = $this->getProvider(false, false); + $provider->expects($this->once()) + ->method('retrieveUser') + ->will($this->throwException(new UsernameNotFoundException())) + ; + + $provider->authenticate($this->getSupportedToken()); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testAuthenticateWhenUsernameIsNotFoundAndHideIsTrue() + { + $provider = $this->getProvider(false, true); + $provider->expects($this->once()) + ->method('retrieveUser') + ->will($this->throwException(new UsernameNotFoundException())) + ; + + $provider->authenticate($this->getSupportedToken()); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationServiceException + */ + public function testAuthenticateWhenProviderDoesNotReturnAnUserInterface() + { + $provider = $this->getProvider(false, true); + $provider->expects($this->once()) + ->method('retrieveUser') + ->will($this->returnValue(null)) + ; + + $provider->authenticate($this->getSupportedToken()); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\CredentialsExpiredException + */ + public function testAuthenticateWhenPreChecksFails() + { + $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); + $userChecker->expects($this->once()) + ->method('checkPreAuth') + ->will($this->throwException(new CredentialsExpiredException())) + ; + + $provider = $this->getProvider($userChecker); + $provider->expects($this->once()) + ->method('retrieveUser') + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock())) + ; + + $provider->authenticate($this->getSupportedToken()); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AccountExpiredException + */ + public function testAuthenticateWhenPostChecksFails() + { + $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); + $userChecker->expects($this->once()) + ->method('checkPostAuth') + ->will($this->throwException(new AccountExpiredException())) + ; + + $provider = $this->getProvider($userChecker); + $provider->expects($this->once()) + ->method('retrieveUser') + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock())) + ; + + $provider->authenticate($this->getSupportedToken()); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + * @expectedExceptionMessage Bad credentials + */ + public function testAuthenticateWhenPostCheckAuthenticationFails() + { + $provider = $this->getProvider(); + $provider->expects($this->once()) + ->method('retrieveUser') + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock())) + ; + $provider->expects($this->once()) + ->method('checkAuthentication') + ->will($this->throwException(new BadCredentialsException())) + ; + + $provider->authenticate($this->getSupportedToken()); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + * @expectedExceptionMessage Foo + */ + public function testAuthenticateWhenPostCheckAuthenticationFailsWithHideFalse() + { + $provider = $this->getProvider(false, false); + $provider->expects($this->once()) + ->method('retrieveUser') + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock())) + ; + $provider->expects($this->once()) + ->method('checkAuthentication') + ->will($this->throwException(new BadCredentialsException('Foo'))) + ; + + $provider->authenticate($this->getSupportedToken()); + } + + public function testAuthenticate() + { + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user->expects($this->once()) + ->method('getRoles') + ->will($this->returnValue(array('ROLE_FOO'))) + ; + + $provider = $this->getProvider(); + $provider->expects($this->once()) + ->method('retrieveUser') + ->will($this->returnValue($user)) + ; + + $token = $this->getSupportedToken(); + $token->expects($this->once()) + ->method('getCredentials') + ->will($this->returnValue('foo')) + ; + + $token->expects($this->once()) + ->method('getRoles') + ->will($this->returnValue(array())) + ; + + $authToken = $provider->authenticate($token); + + $this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', $authToken); + $this->assertSame($user, $authToken->getUser()); + $this->assertEquals(array(new Role('ROLE_FOO')), $authToken->getRoles()); + $this->assertEquals('foo', $authToken->getCredentials()); + $this->assertEquals(array('foo' => 'bar'), $authToken->getAttributes(), '->authenticate() copies token attributes'); + } + + public function testAuthenticateWithPreservingRoleSwitchUserRole() + { + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user->expects($this->once()) + ->method('getRoles') + ->will($this->returnValue(array('ROLE_FOO'))) + ; + + $provider = $this->getProvider(); + $provider->expects($this->once()) + ->method('retrieveUser') + ->will($this->returnValue($user)) + ; + + $token = $this->getSupportedToken(); + $token->expects($this->once()) + ->method('getCredentials') + ->will($this->returnValue('foo')) + ; + + $switchUserRole = new SwitchUserRole('foo', $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); + $token->expects($this->once()) + ->method('getRoles') + ->will($this->returnValue(array($switchUserRole))) + ; + + $authToken = $provider->authenticate($token); + + $this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', $authToken); + $this->assertSame($user, $authToken->getUser()); + $this->assertContains(new Role('ROLE_FOO'), $authToken->getRoles(), '', false, false); + $this->assertContains($switchUserRole, $authToken->getRoles()); + $this->assertEquals('foo', $authToken->getCredentials()); + $this->assertEquals(array('foo' => 'bar'), $authToken->getAttributes(), '->authenticate() copies token attributes'); + } + + protected function getSupportedToken() + { + $mock = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken')->setMethods(array('getCredentials', 'getProviderKey', 'getRoles'))->disableOriginalConstructor()->getMock(); + $mock + ->expects($this->any()) + ->method('getProviderKey') + ->will($this->returnValue('key')) + ; + + $mock->setAttributes(array('foo' => 'bar')); + + return $mock; + } + + protected function getProvider($userChecker = false, $hide = true) + { + if (false === $userChecker) { + $userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); + } + + return $this->getMockForAbstractClass('Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider', array($userChecker, 'key', $hide)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/InMemoryTokenProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/InMemoryTokenProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..55905844681cf8b2100d970be1d66cad1488049a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/InMemoryTokenProviderTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication\RememberMe; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken; +use Symfony\Component\Security\Core\Authentication\RememberMe\InMemoryTokenProvider; + +class InMemoryTokenProviderTest extends TestCase +{ + public function testCreateNewToken() + { + $provider = new InMemoryTokenProvider(); + + $token = new PersistentToken('foo', 'foo', 'foo', 'foo', new \DateTime()); + $provider->createNewToken($token); + + $this->assertSame($provider->loadTokenBySeries('foo'), $token); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\TokenNotFoundException + */ + public function testLoadTokenBySeriesThrowsNotFoundException() + { + $provider = new InMemoryTokenProvider(); + $provider->loadTokenBySeries('foo'); + } + + public function testUpdateToken() + { + $provider = new InMemoryTokenProvider(); + + $token = new PersistentToken('foo', 'foo', 'foo', 'foo', new \DateTime()); + $provider->createNewToken($token); + $provider->updateToken('foo', 'newFoo', $lastUsed = new \DateTime()); + $token = $provider->loadTokenBySeries('foo'); + + $this->assertEquals('newFoo', $token->getTokenValue()); + $this->assertSame($token->getLastUsed(), $lastUsed); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\TokenNotFoundException + */ + public function testDeleteToken() + { + $provider = new InMemoryTokenProvider(); + + $token = new PersistentToken('foo', 'foo', 'foo', 'foo', new \DateTime()); + $provider->createNewToken($token); + $provider->deleteTokenBySeries('foo'); + $provider->loadTokenBySeries('foo'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/PersistentTokenTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/PersistentTokenTest.php new file mode 100644 index 0000000000000000000000000000000000000000..12c133f52df570d8f0c35e35fb8b9702a6df824c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/PersistentTokenTest.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\Security\Core\Tests\Authentication\RememberMe; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken; + +class PersistentTokenTest extends TestCase +{ + public function testConstructor() + { + $lastUsed = new \DateTime(); + $token = new PersistentToken('fooclass', 'fooname', 'fooseries', 'footokenvalue', $lastUsed); + + $this->assertEquals('fooclass', $token->getClass()); + $this->assertEquals('fooname', $token->getUsername()); + $this->assertEquals('fooseries', $token->getSeries()); + $this->assertEquals('footokenvalue', $token->getTokenValue()); + $this->assertSame($lastUsed, $token->getLastUsed()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php new file mode 100644 index 0000000000000000000000000000000000000000..57ebf184f2df6b29a2b65816cfb3cc31fb811a35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php @@ -0,0 +1,271 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication\Token; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Token\AbstractToken; +use Symfony\Component\Security\Core\Role\Role; +use Symfony\Component\Security\Core\Role\SwitchUserRole; + +class TestUser +{ + protected $name; + + public function __construct($name) + { + $this->name = $name; + } + + public function __toString() + { + return $this->name; + } +} + +class ConcreteToken extends AbstractToken +{ + private $credentials = 'credentials_value'; + + public function __construct($user, array $roles = array()) + { + parent::__construct($roles); + + $this->setUser($user); + } + + public function serialize() + { + return serialize(array($this->credentials, parent::serialize())); + } + + public function unserialize($serialized) + { + list($this->credentials, $parentStr) = unserialize($serialized); + parent::unserialize($parentStr); + } + + public function getCredentials() + { + } +} + +/** @noinspection PhpUndefinedClassInspection */ +class AbstractTokenTest extends TestCase +{ + public function testGetUsername() + { + $token = $this->getToken(array('ROLE_FOO')); + $token->setUser('fabien'); + $this->assertEquals('fabien', $token->getUsername()); + + $token->setUser(new TestUser('fabien')); + $this->assertEquals('fabien', $token->getUsername()); + + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user->expects($this->once())->method('getUsername')->will($this->returnValue('fabien')); + $token->setUser($user); + $this->assertEquals('fabien', $token->getUsername()); + } + + public function testEraseCredentials() + { + $token = $this->getToken(array('ROLE_FOO')); + + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user->expects($this->once())->method('eraseCredentials'); + $token->setUser($user); + + $token->eraseCredentials(); + } + + public function testSerialize() + { + $token = $this->getToken(array('ROLE_FOO')); + $token->setAttributes(array('foo' => 'bar')); + + $uToken = unserialize(serialize($token)); + + $this->assertEquals($token->getRoles(), $uToken->getRoles()); + $this->assertEquals($token->getAttributes(), $uToken->getAttributes()); + } + + public function testSerializeParent() + { + $user = new TestUser('fabien'); + $token = new ConcreteToken($user, array('ROLE_FOO')); + + $parentToken = new ConcreteToken($user, array(new SwitchUserRole('ROLE_PREVIOUS', $token))); + $uToken = unserialize(serialize($parentToken)); + + $this->assertEquals( + current($parentToken->getRoles())->getSource()->getUser(), + current($uToken->getRoles())->getSource()->getUser() + ); + } + + public function testConstructor() + { + $token = $this->getToken(array('ROLE_FOO')); + $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); + + $token = $this->getToken(array(new Role('ROLE_FOO'))); + $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); + + $token = $this->getToken(array(new Role('ROLE_FOO'), 'ROLE_BAR')); + $this->assertEquals(array(new Role('ROLE_FOO'), new Role('ROLE_BAR')), $token->getRoles()); + } + + public function testAuthenticatedFlag() + { + $token = $this->getToken(); + $this->assertFalse($token->isAuthenticated()); + + $token->setAuthenticated(true); + $this->assertTrue($token->isAuthenticated()); + + $token->setAuthenticated(false); + $this->assertFalse($token->isAuthenticated()); + } + + public function testAttributes() + { + $attributes = array('foo' => 'bar'); + $token = $this->getToken(); + $token->setAttributes($attributes); + + $this->assertEquals($attributes, $token->getAttributes(), '->getAttributes() returns the token attributes'); + $this->assertEquals('bar', $token->getAttribute('foo'), '->getAttribute() returns the value of an attribute'); + $token->setAttribute('foo', 'foo'); + $this->assertEquals('foo', $token->getAttribute('foo'), '->setAttribute() changes the value of an attribute'); + $this->assertTrue($token->hasAttribute('foo'), '->hasAttribute() returns true if the attribute is defined'); + $this->assertFalse($token->hasAttribute('oof'), '->hasAttribute() returns false if the attribute is not defined'); + + try { + $token->getAttribute('foobar'); + $this->fail('->getAttribute() throws an \InvalidArgumentException exception when the attribute does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->getAttribute() throws an \InvalidArgumentException exception when the attribute does not exist'); + $this->assertEquals('This token has no "foobar" attribute.', $e->getMessage(), '->getAttribute() throws an \InvalidArgumentException exception when the attribute does not exist'); + } + } + + /** + * @dataProvider getUsers + */ + public function testSetUser($user) + { + $token = $this->getToken(); + $token->setUser($user); + $this->assertSame($user, $token->getUser()); + } + + public function getUsers() + { + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $advancedUser = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); + + return array( + array($advancedUser), + array($user), + array(new TestUser('foo')), + array('foo'), + ); + } + + /** + * @dataProvider getUserChanges + */ + public function testSetUserSetsAuthenticatedToFalseWhenUserChanges($firstUser, $secondUser) + { + $token = $this->getToken(); + $token->setAuthenticated(true); + $this->assertTrue($token->isAuthenticated()); + + $token->setUser($firstUser); + $this->assertTrue($token->isAuthenticated()); + + $token->setUser($secondUser); + $this->assertFalse($token->isAuthenticated()); + } + + public function getUserChanges() + { + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $advancedUser = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); + + return array( + array( + 'foo', 'bar', + ), + array( + 'foo', new TestUser('bar'), + ), + array( + 'foo', $user, + ), + array( + 'foo', $advancedUser, + ), + array( + $user, 'foo', + ), + array( + $advancedUser, 'foo', + ), + array( + $user, new TestUser('foo'), + ), + array( + $advancedUser, new TestUser('foo'), + ), + array( + new TestUser('foo'), new TestUser('bar'), + ), + array( + new TestUser('foo'), 'bar', + ), + array( + new TestUser('foo'), $user, + ), + array( + new TestUser('foo'), $advancedUser, + ), + array( + $user, $advancedUser, + ), + array( + $advancedUser, $user, + ), + ); + } + + /** + * @dataProvider getUsers + */ + public function testSetUserDoesNotSetAuthenticatedToFalseWhenUserDoesNotChange($user) + { + $token = $this->getToken(); + $token->setAuthenticated(true); + $this->assertTrue($token->isAuthenticated()); + + $token->setUser($user); + $this->assertTrue($token->isAuthenticated()); + + $token->setUser($user); + $this->assertTrue($token->isAuthenticated()); + } + + protected function getToken(array $roles = array()) + { + return $this->getMockForAbstractClass('Symfony\Component\Security\Core\Authentication\Token\AbstractToken', array($roles)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AnonymousTokenTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AnonymousTokenTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1409752ac6456f2e1e45603ede2ca46371798d20 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AnonymousTokenTest.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication\Token; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; +use Symfony\Component\Security\Core\Role\Role; + +class AnonymousTokenTest extends TestCase +{ + public function testConstructor() + { + $token = new AnonymousToken('foo', 'bar'); + $this->assertTrue($token->isAuthenticated()); + + $token = new AnonymousToken('foo', 'bar', array('ROLE_FOO')); + $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); + } + + public function testGetKey() + { + $token = new AnonymousToken('foo', 'bar'); + $this->assertEquals('foo', $token->getSecret()); + } + + public function testGetCredentials() + { + $token = new AnonymousToken('foo', 'bar'); + $this->assertEquals('', $token->getCredentials()); + } + + public function testGetUser() + { + $token = new AnonymousToken('foo', 'bar'); + $this->assertEquals('bar', $token->getUser()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/PreAuthenticatedTokenTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/PreAuthenticatedTokenTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5b2b1c07e664302d418227dfce651f13ca65c1a8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/PreAuthenticatedTokenTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication\Token; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken; +use Symfony\Component\Security\Core\Role\Role; + +class PreAuthenticatedTokenTest extends TestCase +{ + public function testConstructor() + { + $token = new PreAuthenticatedToken('foo', 'bar', 'key'); + $this->assertFalse($token->isAuthenticated()); + + $token = new PreAuthenticatedToken('foo', 'bar', 'key', array('ROLE_FOO')); + $this->assertTrue($token->isAuthenticated()); + $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); + $this->assertEquals('key', $token->getProviderKey()); + } + + public function testGetCredentials() + { + $token = new PreAuthenticatedToken('foo', 'bar', 'key'); + $this->assertEquals('bar', $token->getCredentials()); + } + + public function testGetUser() + { + $token = new PreAuthenticatedToken('foo', 'bar', 'key'); + $this->assertEquals('foo', $token->getUser()); + } + + public function testEraseCredentials() + { + $token = new PreAuthenticatedToken('foo', 'bar', 'key'); + $token->eraseCredentials(); + $this->assertEquals('', $token->getCredentials()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememberMeTokenTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememberMeTokenTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1b233cd9daa433d8fe428a5efb1f1b84adc4ac97 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememberMeTokenTest.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication\Token; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; +use Symfony\Component\Security\Core\Role\Role; + +class RememberMeTokenTest extends TestCase +{ + public function testConstructor() + { + $user = $this->getUser(); + $token = new RememberMeToken($user, 'fookey', 'foo'); + + $this->assertEquals('fookey', $token->getProviderKey()); + $this->assertEquals('foo', $token->getSecret()); + $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); + $this->assertSame($user, $token->getUser()); + $this->assertTrue($token->isAuthenticated()); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testConstructorSecretCannotBeNull() + { + new RememberMeToken( + $this->getUser(), + null, + null + ); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testConstructorSecretCannotBeEmptyString() + { + new RememberMeToken( + $this->getUser(), + '', + '' + ); + } + + protected function getUser($roles = array('ROLE_FOO')) + { + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user + ->expects($this->once()) + ->method('getRoles') + ->will($this->returnValue($roles)) + ; + + return $user; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fd30eea3c57c734a1fea2ce047d933d169f51e07 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.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\Security\Core\Tests\Authentication\Token\Storage; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; + +class TokenStorageTest extends TestCase +{ + public function testGetSetToken() + { + $tokenStorage = new TokenStorage(); + $this->assertNull($tokenStorage->getToken()); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $tokenStorage->setToken($token); + $this->assertSame($token, $tokenStorage->getToken()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/UsernamePasswordTokenTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/UsernamePasswordTokenTest.php new file mode 100644 index 0000000000000000000000000000000000000000..12897ab1d11498ccb73c972bb0661ccdb56eba19 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authentication/Token/UsernamePasswordTokenTest.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authentication\Token; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\Role\Role; + +class UsernamePasswordTokenTest extends TestCase +{ + public function testConstructor() + { + $token = new UsernamePasswordToken('foo', 'bar', 'key'); + $this->assertFalse($token->isAuthenticated()); + + $token = new UsernamePasswordToken('foo', 'bar', 'key', array('ROLE_FOO')); + $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); + $this->assertTrue($token->isAuthenticated()); + $this->assertEquals('key', $token->getProviderKey()); + } + + /** + * @expectedException \LogicException + */ + public function testSetAuthenticatedToTrue() + { + $token = new UsernamePasswordToken('foo', 'bar', 'key'); + $token->setAuthenticated(true); + } + + public function testSetAuthenticatedToFalse() + { + $token = new UsernamePasswordToken('foo', 'bar', 'key'); + $token->setAuthenticated(false); + $this->assertFalse($token->isAuthenticated()); + } + + public function testEraseCredentials() + { + $token = new UsernamePasswordToken('foo', 'bar', 'key'); + $token->eraseCredentials(); + $this->assertEquals('', $token->getCredentials()); + } + + public function testToString() + { + $token = new UsernamePasswordToken('foo', '', 'foo', array('A', 'B')); + $this->assertEquals('UsernamePasswordToken(user="foo", authenticated=true, roles="A, B")', (string) $token); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..192fe87e2ad93e56e5af5d3742625dfe3018fe22 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.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\Component\Security\Core\Tests\Authorization; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authorization\AccessDecisionManager; +use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; + +class AccessDecisionManagerTest extends TestCase +{ + /** + * @expectedException \InvalidArgumentException + */ + public function testSetUnsupportedStrategy() + { + new AccessDecisionManager(array($this->getVoter(VoterInterface::ACCESS_GRANTED)), 'fooBar'); + } + + /** + * @dataProvider getStrategyTests + */ + public function testStrategies($strategy, $voters, $allowIfAllAbstainDecisions, $allowIfEqualGrantedDeniedDecisions, $expected) + { + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $manager = new AccessDecisionManager($voters, $strategy, $allowIfAllAbstainDecisions, $allowIfEqualGrantedDeniedDecisions); + + $this->assertSame($expected, $manager->decide($token, array('ROLE_FOO'))); + } + + /** + * @dataProvider getStrategiesWith2RolesTests + */ + public function testStrategiesWith2Roles($token, $strategy, $voter, $expected) + { + $manager = new AccessDecisionManager(array($voter), $strategy); + + $this->assertSame($expected, $manager->decide($token, array('ROLE_FOO', 'ROLE_BAR'))); + } + + public function getStrategiesWith2RolesTests() + { + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + return array( + array($token, 'affirmative', $this->getVoter(VoterInterface::ACCESS_DENIED), false), + array($token, 'affirmative', $this->getVoter(VoterInterface::ACCESS_GRANTED), true), + + array($token, 'consensus', $this->getVoter(VoterInterface::ACCESS_DENIED), false), + array($token, 'consensus', $this->getVoter(VoterInterface::ACCESS_GRANTED), true), + + array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_DENIED, VoterInterface::ACCESS_DENIED), false), + array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_DENIED, VoterInterface::ACCESS_GRANTED), false), + array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_GRANTED, VoterInterface::ACCESS_DENIED), false), + array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_GRANTED, VoterInterface::ACCESS_GRANTED), true), + ); + } + + protected function getVoterFor2Roles($token, $vote1, $vote2) + { + $voter = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface')->getMock(); + $voter->expects($this->any()) + ->method('vote') + ->will($this->returnValueMap(array( + array($token, null, array('ROLE_FOO'), $vote1), + array($token, null, array('ROLE_BAR'), $vote2), + ))) + ; + + return $voter; + } + + public function getStrategyTests() + { + return array( + // affirmative + array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(1, 0, 0), false, true, true), + array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(1, 2, 0), false, true, true), + array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 1, 0), false, true, false), + array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 0, 1), false, true, false), + array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 0, 1), true, true, true), + + // consensus + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(1, 0, 0), false, true, true), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(1, 2, 0), false, true, false), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 1, 0), false, true, true), + + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(0, 0, 1), false, true, false), + + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(0, 0, 1), true, true, true), + + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 0), false, true, true), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 1), false, true, true), + + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 0), false, false, false), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 1), false, false, false), + + // unanimous + array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 0, 0), false, true, true), + array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 0, 1), false, true, true), + array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 1, 0), false, true, false), + + array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(0, 0, 2), false, true, false), + array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(0, 0, 2), true, true, true), + ); + } + + protected function getVoters($grants, $denies, $abstains) + { + $voters = array(); + for ($i = 0; $i < $grants; ++$i) { + $voters[] = $this->getVoter(VoterInterface::ACCESS_GRANTED); + } + for ($i = 0; $i < $denies; ++$i) { + $voters[] = $this->getVoter(VoterInterface::ACCESS_DENIED); + } + for ($i = 0; $i < $abstains; ++$i) { + $voters[] = $this->getVoter(VoterInterface::ACCESS_ABSTAIN); + } + + return $voters; + } + + protected function getVoter($vote) + { + $voter = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface')->getMock(); + $voter->expects($this->any()) + ->method('vote') + ->will($this->returnValue($vote)); + + return $voter; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ca28d53c5cc420a5275331a734df7899bc387ca4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authorization; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; +use Symfony\Component\Security\Core\Authorization\AuthorizationChecker; + +class AuthorizationCheckerTest extends TestCase +{ + private $authenticationManager; + private $accessDecisionManager; + private $authorizationChecker; + private $tokenStorage; + + protected function setUp() + { + $this->authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $this->accessDecisionManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')->getMock(); + $this->tokenStorage = new TokenStorage(); + + $this->authorizationChecker = new AuthorizationChecker( + $this->tokenStorage, + $this->authenticationManager, + $this->accessDecisionManager + ); + } + + public function testVoteAuthenticatesTokenIfNecessary() + { + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $this->tokenStorage->setToken($token); + + $newToken = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + $this->authenticationManager + ->expects($this->once()) + ->method('authenticate') + ->with($this->equalTo($token)) + ->will($this->returnValue($newToken)); + + // default with() isn't a strict check + $tokenComparison = function ($value) use ($newToken) { + // make sure that the new token is used in "decide()" and not the old one + return $value === $newToken; + }; + + $this->accessDecisionManager + ->expects($this->once()) + ->method('decide') + ->with($this->callback($tokenComparison)) + ->will($this->returnValue(true)); + + // first run the token has not been re-authenticated yet, after isGranted is called, it should be equal + $this->assertFalse($newToken === $this->tokenStorage->getToken()); + $this->assertTrue($this->authorizationChecker->isGranted('foo')); + $this->assertTrue($newToken === $this->tokenStorage->getToken()); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException + */ + public function testVoteWithoutAuthenticationToken() + { + $this->authorizationChecker->isGranted('ROLE_FOO'); + } + + /** + * @dataProvider isGrantedProvider + */ + public function testIsGranted($decide) + { + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $token + ->expects($this->once()) + ->method('isAuthenticated') + ->will($this->returnValue(true)); + + $this->accessDecisionManager + ->expects($this->once()) + ->method('decide') + ->will($this->returnValue($decide)); + $this->tokenStorage->setToken($token); + $this->assertTrue($decide === $this->authorizationChecker->isGranted('ROLE_FOO')); + } + + public function isGrantedProvider() + { + return array(array(true), array(false)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/DebugAccessDecisionManagerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/DebugAccessDecisionManagerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5078689b1f854664dad99d5b43f41986cb8c6449 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/DebugAccessDecisionManagerTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authorization; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authorization\AccessDecisionManager; +use Symfony\Component\Security\Core\Authorization\DebugAccessDecisionManager; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +class DebugAccessDecisionManagerTest extends TestCase +{ + /** + * @dataProvider provideObjectsAndLogs + */ + public function testDecideLog($expectedLog, $object) + { + $adm = new DebugAccessDecisionManager(new AccessDecisionManager()); + $adm->decide($this->getMockBuilder(TokenInterface::class)->getMock(), array('ATTRIBUTE_1'), $object); + + $this->assertSame($expectedLog, $adm->getDecisionLog()); + } + + public function provideObjectsAndLogs() + { + $object = new \stdClass(); + + yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => null, 'result' => false)), null); + yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => true, 'result' => false)), true); + yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => 'jolie string', 'result' => false)), 'jolie string'); + yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => 12345, 'result' => false)), 12345); + yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => $x = fopen(__FILE__, 'r'), 'result' => false)), $x); + yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => $x = array(), 'result' => false)), $x); + yield array(array(array('attributes' => array('ATTRIBUTE_1'), 'object' => $object, 'result' => false)), $object); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1565d1c8652561e2a30e18cef19fb7521e4db87b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authorization; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authorization\ExpressionLanguage; +use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver; +use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; +use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\User\User; + +class ExpressionLanguageTest extends TestCase +{ + /** + * @dataProvider provider + */ + public function testIsAuthenticated($token, $expression, $result, array $roles = array()) + { + $anonymousTokenClass = 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AnonymousToken'; + $rememberMeTokenClass = 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\RememberMeToken'; + $expressionLanguage = new ExpressionLanguage(); + $trustResolver = new AuthenticationTrustResolver($anonymousTokenClass, $rememberMeTokenClass); + + $context = array(); + $context['trust_resolver'] = $trustResolver; + $context['token'] = $token; + $context['roles'] = $roles; + + $this->assertEquals($result, $expressionLanguage->evaluate($expression, $context)); + } + + public function provider() + { + $roles = array('ROLE_USER', 'ROLE_ADMIN'); + $user = new User('username', 'password', $roles); + + $noToken = null; + $anonymousToken = new AnonymousToken('firewall', 'anon.'); + $rememberMeToken = new RememberMeToken($user, 'providerkey', 'firewall'); + $usernamePasswordToken = new UsernamePasswordToken('username', 'password', 'providerkey', $roles); + + return array( + array($noToken, 'is_anonymous()', false), + array($noToken, 'is_authenticated()', false), + array($noToken, 'is_fully_authenticated()', false), + array($noToken, 'is_remember_me()', false), + array($noToken, "has_role('ROLE_USER')", false), + + array($anonymousToken, 'is_anonymous()', true), + array($anonymousToken, 'is_authenticated()', false), + array($anonymousToken, 'is_fully_authenticated()', false), + array($anonymousToken, 'is_remember_me()', false), + array($anonymousToken, "has_role('ROLE_USER')", false), + + array($rememberMeToken, 'is_anonymous()', false), + array($rememberMeToken, 'is_authenticated()', true), + array($rememberMeToken, 'is_fully_authenticated()', false), + array($rememberMeToken, 'is_remember_me()', true), + array($rememberMeToken, "has_role('ROLE_FOO')", false, $roles), + array($rememberMeToken, "has_role('ROLE_USER')", true, $roles), + + array($usernamePasswordToken, 'is_anonymous()', false), + array($usernamePasswordToken, 'is_authenticated()', true), + array($usernamePasswordToken, 'is_fully_authenticated()', true), + array($usernamePasswordToken, 'is_remember_me()', false), + array($usernamePasswordToken, "has_role('ROLE_FOO')", false, $roles), + array($usernamePasswordToken, "has_role('ROLE_USER')", true, $roles), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1ba7e39163ad144d61a705434ce994c28ab7df3e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.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\Security\Core\Tests\Authorization\Voter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver; +use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter; +use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; + +class AuthenticatedVoterTest extends TestCase +{ + /** + * @dataProvider getVoteTests + */ + public function testVote($authenticated, $attributes, $expected) + { + $voter = new AuthenticatedVoter($this->getResolver()); + + $this->assertSame($expected, $voter->vote($this->getToken($authenticated), null, $attributes)); + } + + public function getVoteTests() + { + return array( + array('fully', array(), VoterInterface::ACCESS_ABSTAIN), + array('fully', array('FOO'), VoterInterface::ACCESS_ABSTAIN), + array('remembered', array(), VoterInterface::ACCESS_ABSTAIN), + array('remembered', array('FOO'), VoterInterface::ACCESS_ABSTAIN), + array('anonymously', array(), VoterInterface::ACCESS_ABSTAIN), + array('anonymously', array('FOO'), VoterInterface::ACCESS_ABSTAIN), + + array('fully', array('IS_AUTHENTICATED_ANONYMOUSLY'), VoterInterface::ACCESS_GRANTED), + array('remembered', array('IS_AUTHENTICATED_ANONYMOUSLY'), VoterInterface::ACCESS_GRANTED), + array('anonymously', array('IS_AUTHENTICATED_ANONYMOUSLY'), VoterInterface::ACCESS_GRANTED), + + array('fully', array('IS_AUTHENTICATED_REMEMBERED'), VoterInterface::ACCESS_GRANTED), + array('remembered', array('IS_AUTHENTICATED_REMEMBERED'), VoterInterface::ACCESS_GRANTED), + array('anonymously', array('IS_AUTHENTICATED_REMEMBERED'), VoterInterface::ACCESS_DENIED), + + array('fully', array('IS_AUTHENTICATED_FULLY'), VoterInterface::ACCESS_GRANTED), + array('remembered', array('IS_AUTHENTICATED_FULLY'), VoterInterface::ACCESS_DENIED), + array('anonymously', array('IS_AUTHENTICATED_FULLY'), VoterInterface::ACCESS_DENIED), + ); + } + + protected function getResolver() + { + return new AuthenticationTrustResolver( + 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AnonymousToken', + 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\RememberMeToken' + ); + } + + protected function getToken($authenticated) + { + if ('fully' === $authenticated) { + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + } elseif ('remembered' === $authenticated) { + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken')->setMethods(array('setPersistent'))->disableOriginalConstructor()->getMock(); + } else { + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken')->setConstructorArgs(array('', ''))->getMock(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..79626835264abf612e66a260be47bae850eb1904 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authorization\Voter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authorization\Voter\ExpressionVoter; +use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; +use Symfony\Component\Security\Core\Role\Role; + +class ExpressionVoterTest extends TestCase +{ + /** + * @dataProvider getVoteTests + */ + public function testVote($roles, $attributes, $expected, $tokenExpectsGetRoles = true, $expressionLanguageExpectsEvaluate = true) + { + $voter = new ExpressionVoter($this->createExpressionLanguage($expressionLanguageExpectsEvaluate), $this->createTrustResolver()); + + $this->assertSame($expected, $voter->vote($this->getToken($roles, $tokenExpectsGetRoles), null, $attributes)); + } + + public function getVoteTests() + { + return array( + array(array(), array(), VoterInterface::ACCESS_ABSTAIN, false, false), + array(array(), array('FOO'), VoterInterface::ACCESS_ABSTAIN, false, false), + + array(array(), array($this->createExpression()), VoterInterface::ACCESS_DENIED, true, false), + + array(array('ROLE_FOO'), array($this->createExpression(), $this->createExpression()), VoterInterface::ACCESS_GRANTED), + array(array('ROLE_BAR', 'ROLE_FOO'), array($this->createExpression()), VoterInterface::ACCESS_GRANTED), + ); + } + + protected function getToken(array $roles, $tokenExpectsGetRoles = true) + { + foreach ($roles as $i => $role) { + $roles[$i] = new Role($role); + } + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + if ($tokenExpectsGetRoles) { + $token->expects($this->once()) + ->method('getRoles') + ->will($this->returnValue($roles)); + } + + return $token; + } + + protected function createExpressionLanguage($expressionLanguageExpectsEvaluate = true) + { + $mock = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\ExpressionLanguage')->getMock(); + + if ($expressionLanguageExpectsEvaluate) { + $mock->expects($this->once()) + ->method('evaluate') + ->will($this->returnValue(true)); + } + + return $mock; + } + + protected function createTrustResolver() + { + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface')->getMock(); + } + + protected function createRoleHierarchy() + { + return $this->getMockBuilder('Symfony\Component\Security\Core\Role\RoleHierarchyInterface')->getMock(); + } + + protected function createExpression() + { + return $this->getMockBuilder('Symfony\Component\ExpressionLanguage\Expression') + ->disableOriginalConstructor() + ->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4b03bacd784a5019738d45a277982390f34c0f8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authorization\Voter; + +use Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter; +use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; +use Symfony\Component\Security\Core\Role\RoleHierarchy; + +class RoleHierarchyVoterTest extends RoleVoterTest +{ + /** + * @dataProvider getVoteTests + */ + public function testVote($roles, $attributes, $expected) + { + $voter = new RoleHierarchyVoter(new RoleHierarchy(array('ROLE_FOO' => array('ROLE_FOOBAR')))); + + $this->assertSame($expected, $voter->vote($this->getToken($roles), null, $attributes)); + } + + public function getVoteTests() + { + return array_merge(parent::getVoteTests(), array( + array(array('ROLE_FOO'), array('ROLE_FOOBAR'), VoterInterface::ACCESS_GRANTED), + )); + } + + /** + * @dataProvider getVoteWithEmptyHierarchyTests + */ + public function testVoteWithEmptyHierarchy($roles, $attributes, $expected) + { + $voter = new RoleHierarchyVoter(new RoleHierarchy(array())); + + $this->assertSame($expected, $voter->vote($this->getToken($roles), null, $attributes)); + } + + public function getVoteWithEmptyHierarchyTests() + { + return parent::getVoteTests(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..242a2f5814f8e8f395ea84ae781bc9c1b4827b23 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authorization\Voter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authorization\Voter\RoleVoter; +use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; +use Symfony\Component\Security\Core\Role\Role; + +class RoleVoterTest extends TestCase +{ + /** + * @dataProvider getVoteTests + */ + public function testVote($roles, $attributes, $expected) + { + $voter = new RoleVoter(); + + $this->assertSame($expected, $voter->vote($this->getToken($roles), null, $attributes)); + } + + public function getVoteTests() + { + return array( + array(array(), array(), VoterInterface::ACCESS_ABSTAIN), + array(array(), array('FOO'), VoterInterface::ACCESS_ABSTAIN), + array(array(), array('ROLE_FOO'), VoterInterface::ACCESS_DENIED), + array(array('ROLE_FOO'), array('ROLE_FOO'), VoterInterface::ACCESS_GRANTED), + array(array('ROLE_FOO'), array('FOO', 'ROLE_FOO'), VoterInterface::ACCESS_GRANTED), + array(array('ROLE_BAR', 'ROLE_FOO'), array('ROLE_FOO'), VoterInterface::ACCESS_GRANTED), + + // Test mixed Types + array(array(), array(array()), VoterInterface::ACCESS_ABSTAIN), + array(array(), array(new \stdClass()), VoterInterface::ACCESS_ABSTAIN), + array(array('ROLE_BAR'), array(new Role('ROLE_BAR')), VoterInterface::ACCESS_GRANTED), + array(array('ROLE_BAR'), array(new Role('ROLE_FOO')), VoterInterface::ACCESS_DENIED), + ); + } + + protected function getToken(array $roles) + { + foreach ($roles as $i => $role) { + $roles[$i] = new Role($role); + } + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $token->expects($this->once()) + ->method('getRoles') + ->will($this->returnValue($roles)); + + return $token; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..70e3226ece44900016e9947e75e41c590f35e17d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Authorization\Voter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Authorization\Voter\Voter; +use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; + +class VoterTest extends TestCase +{ + protected $token; + + protected function setUp() + { + $this->token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + } + + public function getTests() + { + return array( + array(array('EDIT'), VoterInterface::ACCESS_GRANTED, new \stdClass(), 'ACCESS_GRANTED if attribute and class are supported and attribute grants access'), + array(array('CREATE'), VoterInterface::ACCESS_DENIED, new \stdClass(), 'ACCESS_DENIED if attribute and class are supported and attribute does not grant access'), + + array(array('DELETE', 'EDIT'), VoterInterface::ACCESS_GRANTED, new \stdClass(), 'ACCESS_GRANTED if one attribute is supported and grants access'), + array(array('DELETE', 'CREATE'), VoterInterface::ACCESS_DENIED, new \stdClass(), 'ACCESS_DENIED if one attribute is supported and denies access'), + + array(array('CREATE', 'EDIT'), VoterInterface::ACCESS_GRANTED, new \stdClass(), 'ACCESS_GRANTED if one attribute grants access'), + + array(array('DELETE'), VoterInterface::ACCESS_ABSTAIN, new \stdClass(), 'ACCESS_ABSTAIN if no attribute is supported'), + + array(array('EDIT'), VoterInterface::ACCESS_ABSTAIN, $this, 'ACCESS_ABSTAIN if class is not supported'), + + array(array('EDIT'), VoterInterface::ACCESS_ABSTAIN, null, 'ACCESS_ABSTAIN if object is null'), + + array(array(), VoterInterface::ACCESS_ABSTAIN, new \stdClass(), 'ACCESS_ABSTAIN if no attributes were provided'), + ); + } + + /** + * @dataProvider getTests + */ + public function testVote(array $attributes, $expectedVote, $object, $message) + { + $voter = new VoterTest_Voter(); + + $this->assertEquals($expectedVote, $voter->vote($this->token, $object, $attributes), $message); + } +} + +class VoterTest_Voter extends Voter +{ + protected function voteOnAttribute($attribute, $object, TokenInterface $token) + { + return 'EDIT' === $attribute; + } + + protected function supports($attribute, $object) + { + return $object instanceof \stdClass && in_array($attribute, array('EDIT', 'CREATE')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..10c8da692a6fd639331b3f72746810bbfbce342b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder; + +/** + * @author Elnur Abdurrakhimov + */ +class BCryptPasswordEncoderTest extends TestCase +{ + const PASSWORD = 'password'; + const BYTES = '0123456789abcdef'; + const VALID_COST = '04'; + + /** + * @expectedException \InvalidArgumentException + */ + public function testCostBelowRange() + { + new BCryptPasswordEncoder(3); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testCostAboveRange() + { + new BCryptPasswordEncoder(32); + } + + public function testCostInRange() + { + for ($cost = 4; $cost <= 31; ++$cost) { + new BCryptPasswordEncoder($cost); + } + } + + public function testResultLength() + { + $encoder = new BCryptPasswordEncoder(self::VALID_COST); + $result = $encoder->encodePassword(self::PASSWORD, null); + $this->assertEquals(60, strlen($result)); + } + + public function testValidation() + { + $encoder = new BCryptPasswordEncoder(self::VALID_COST); + $result = $encoder->encodePassword(self::PASSWORD, null); + $this->assertTrue($encoder->isPasswordValid($result, self::PASSWORD, null)); + $this->assertFalse($encoder->isPasswordValid($result, 'anotherPassword', null)); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testEncodePasswordLength() + { + $encoder = new BCryptPasswordEncoder(self::VALID_COST); + + $encoder->encodePassword(str_repeat('a', 73), 'salt'); + } + + public function testCheckPasswordLength() + { + $encoder = new BCryptPasswordEncoder(self::VALID_COST); + $result = $encoder->encodePassword(str_repeat('a', 72), null); + + $this->assertFalse($encoder->isPasswordValid($result, str_repeat('a', 73), 'salt')); + $this->assertTrue($encoder->isPasswordValid($result, str_repeat('a', 72), 'salt')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BasePasswordEncoderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BasePasswordEncoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0742f421df564b2487e480f4c3f80c125f759547 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/BasePasswordEncoderTest.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Encoder\BasePasswordEncoder; + +class PasswordEncoder extends BasePasswordEncoder +{ + public function encodePassword($raw, $salt) + { + } + + public function isPasswordValid($encoded, $raw, $salt) + { + } +} + +class BasePasswordEncoderTest extends TestCase +{ + public function testComparePassword() + { + $this->assertTrue($this->invokeComparePasswords('password', 'password')); + $this->assertFalse($this->invokeComparePasswords('password', 'foo')); + } + + public function testDemergePasswordAndSalt() + { + $this->assertEquals(array('password', 'salt'), $this->invokeDemergePasswordAndSalt('password{salt}')); + $this->assertEquals(array('password', ''), $this->invokeDemergePasswordAndSalt('password')); + $this->assertEquals(array('', ''), $this->invokeDemergePasswordAndSalt('')); + } + + public function testMergePasswordAndSalt() + { + $this->assertEquals('password{salt}', $this->invokeMergePasswordAndSalt('password', 'salt')); + $this->assertEquals('password', $this->invokeMergePasswordAndSalt('password', '')); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testMergePasswordAndSaltWithException() + { + $this->invokeMergePasswordAndSalt('password', '{foo}'); + } + + public function testIsPasswordTooLong() + { + $this->assertTrue($this->invokeIsPasswordTooLong(str_repeat('a', 10000))); + $this->assertFalse($this->invokeIsPasswordTooLong(str_repeat('a', 10))); + } + + protected function invokeDemergePasswordAndSalt($password) + { + $encoder = new PasswordEncoder(); + $r = new \ReflectionObject($encoder); + $m = $r->getMethod('demergePasswordAndSalt'); + $m->setAccessible(true); + + return $m->invoke($encoder, $password); + } + + protected function invokeMergePasswordAndSalt($password, $salt) + { + $encoder = new PasswordEncoder(); + $r = new \ReflectionObject($encoder); + $m = $r->getMethod('mergePasswordAndSalt'); + $m->setAccessible(true); + + return $m->invoke($encoder, $password, $salt); + } + + protected function invokeComparePasswords($p1, $p2) + { + $encoder = new PasswordEncoder(); + $r = new \ReflectionObject($encoder); + $m = $r->getMethod('comparePasswords'); + $m->setAccessible(true); + + return $m->invoke($encoder, $p1, $p2); + } + + protected function invokeIsPasswordTooLong($p) + { + $encoder = new PasswordEncoder(); + $r = new \ReflectionObject($encoder); + $m = $r->getMethod('isPasswordTooLong'); + $m->setAccessible(true); + + return $m->invoke($encoder, $p); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..926b1cc58eda26d3c691ee2aebcd94acd537d12c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php @@ -0,0 +1,173 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder; +use Symfony\Component\Security\Core\Encoder\EncoderFactory; +use Symfony\Component\Security\Core\Encoder\EncoderAwareInterface; +use Symfony\Component\Security\Core\User\User; +use Symfony\Component\Security\Core\User\UserInterface; + +class EncoderFactoryTest extends TestCase +{ + public function testGetEncoderWithMessageDigestEncoder() + { + $factory = new EncoderFactory(array('Symfony\Component\Security\Core\User\UserInterface' => array( + 'class' => 'Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder', + 'arguments' => array('sha512', true, 5), + ))); + + $encoder = $factory->getEncoder($this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock()); + $expectedEncoder = new MessageDigestPasswordEncoder('sha512', true, 5); + + $this->assertEquals($expectedEncoder->encodePassword('foo', 'moo'), $encoder->encodePassword('foo', 'moo')); + } + + public function testGetEncoderWithService() + { + $factory = new EncoderFactory(array( + 'Symfony\Component\Security\Core\User\UserInterface' => new MessageDigestPasswordEncoder('sha1'), + )); + + $encoder = $factory->getEncoder($this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock()); + $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); + $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); + + $encoder = $factory->getEncoder(new User('user', 'pass')); + $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); + $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); + } + + public function testGetEncoderWithClassName() + { + $factory = new EncoderFactory(array( + 'Symfony\Component\Security\Core\User\UserInterface' => new MessageDigestPasswordEncoder('sha1'), + )); + + $encoder = $factory->getEncoder('Symfony\Component\Security\Core\Tests\Encoder\SomeChildUser'); + $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); + $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); + } + + public function testGetEncoderConfiguredForConcreteClassWithService() + { + $factory = new EncoderFactory(array( + 'Symfony\Component\Security\Core\User\User' => new MessageDigestPasswordEncoder('sha1'), + )); + + $encoder = $factory->getEncoder(new User('user', 'pass')); + $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); + $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); + } + + public function testGetEncoderConfiguredForConcreteClassWithClassName() + { + $factory = new EncoderFactory(array( + 'Symfony\Component\Security\Core\Tests\Encoder\SomeUser' => new MessageDigestPasswordEncoder('sha1'), + )); + + $encoder = $factory->getEncoder('Symfony\Component\Security\Core\Tests\Encoder\SomeChildUser'); + $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); + $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); + } + + public function testGetNamedEncoderForEncoderAware() + { + $factory = new EncoderFactory(array( + 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha256'), + 'encoder_name' => new MessageDigestPasswordEncoder('sha1'), + )); + + $encoder = $factory->getEncoder(new EncAwareUser('user', 'pass')); + $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); + $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); + } + + public function testGetNullNamedEncoderForEncoderAware() + { + $factory = new EncoderFactory(array( + 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'), + 'encoder_name' => new MessageDigestPasswordEncoder('sha256'), + )); + + $user = new EncAwareUser('user', 'pass'); + $user->encoderName = null; + $encoder = $factory->getEncoder($user); + $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); + $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); + } + + /** + * @expectedException \RuntimeException + */ + public function testGetInvalidNamedEncoderForEncoderAware() + { + $factory = new EncoderFactory(array( + 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'), + 'encoder_name' => new MessageDigestPasswordEncoder('sha256'), + )); + + $user = new EncAwareUser('user', 'pass'); + $user->encoderName = 'invalid_encoder_name'; + $encoder = $factory->getEncoder($user); + } + + public function testGetEncoderForEncoderAwareWithClassName() + { + $factory = new EncoderFactory(array( + 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'), + 'encoder_name' => new MessageDigestPasswordEncoder('sha256'), + )); + + $encoder = $factory->getEncoder('Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser'); + $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); + $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); + } +} + +class SomeUser implements UserInterface +{ + public function getRoles() + { + } + + public function getPassword() + { + } + + public function getSalt() + { + } + + public function getUsername() + { + } + + public function eraseCredentials() + { + } +} + +class SomeChildUser extends SomeUser +{ +} + +class EncAwareUser extends SomeUser implements EncoderAwareInterface +{ + public $encoderName = 'encoder_name'; + + public function getEncoderName() + { + return $this->encoderName; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/MessageDigestPasswordEncoderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/MessageDigestPasswordEncoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c449194f8dda5f4be96cca98123e819becc86164 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/MessageDigestPasswordEncoderTest.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\Component\Security\Core\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder; + +class MessageDigestPasswordEncoderTest extends TestCase +{ + public function testIsPasswordValid() + { + $encoder = new MessageDigestPasswordEncoder('sha256', false, 1); + + $this->assertTrue($encoder->isPasswordValid(hash('sha256', 'password'), 'password', '')); + } + + public function testEncodePassword() + { + $encoder = new MessageDigestPasswordEncoder('sha256', false, 1); + $this->assertSame(hash('sha256', 'password'), $encoder->encodePassword('password', '')); + + $encoder = new MessageDigestPasswordEncoder('sha256', true, 1); + $this->assertSame(base64_encode(hash('sha256', 'password', true)), $encoder->encodePassword('password', '')); + + $encoder = new MessageDigestPasswordEncoder('sha256', false, 2); + $this->assertSame(hash('sha256', hash('sha256', 'password', true).'password'), $encoder->encodePassword('password', '')); + } + + /** + * @expectedException \LogicException + */ + public function testEncodePasswordAlgorithmDoesNotExist() + { + $encoder = new MessageDigestPasswordEncoder('foobar'); + $encoder->encodePassword('password', ''); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testEncodePasswordLength() + { + $encoder = new MessageDigestPasswordEncoder(); + + $encoder->encodePassword(str_repeat('a', 5000), 'salt'); + } + + public function testCheckPasswordLength() + { + $encoder = new MessageDigestPasswordEncoder(); + + $this->assertFalse($encoder->isPasswordValid('encoded', str_repeat('a', 5000), 'salt')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/Pbkdf2PasswordEncoderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/Pbkdf2PasswordEncoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e65eef5bba4e4e1bb7dce996914ad23d620f5ee4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/Pbkdf2PasswordEncoderTest.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\Component\Security\Core\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder; + +class Pbkdf2PasswordEncoderTest extends TestCase +{ + public function testIsPasswordValid() + { + $encoder = new Pbkdf2PasswordEncoder('sha256', false, 1, 40); + + $this->assertTrue($encoder->isPasswordValid('c1232f10f62715fda06ae7c0a2037ca19b33cf103b727ba56d870c11f290a2ab106974c75607c8a3', 'password', '')); + } + + public function testEncodePassword() + { + $encoder = new Pbkdf2PasswordEncoder('sha256', false, 1, 40); + $this->assertSame('c1232f10f62715fda06ae7c0a2037ca19b33cf103b727ba56d870c11f290a2ab106974c75607c8a3', $encoder->encodePassword('password', '')); + + $encoder = new Pbkdf2PasswordEncoder('sha256', true, 1, 40); + $this->assertSame('wSMvEPYnFf2gaufAogN8oZszzxA7cnulbYcMEfKQoqsQaXTHVgfIow==', $encoder->encodePassword('password', '')); + + $encoder = new Pbkdf2PasswordEncoder('sha256', false, 2, 40); + $this->assertSame('8bc2f9167a81cdcfad1235cd9047f1136271c1f978fcfcb35e22dbeafa4634f6fd2214218ed63ebb', $encoder->encodePassword('password', '')); + } + + /** + * @expectedException \LogicException + */ + public function testEncodePasswordAlgorithmDoesNotExist() + { + $encoder = new Pbkdf2PasswordEncoder('foobar'); + $encoder->encodePassword('password', ''); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testEncodePasswordLength() + { + $encoder = new Pbkdf2PasswordEncoder('foobar'); + + $encoder->encodePassword(str_repeat('a', 5000), 'salt'); + } + + public function testCheckPasswordLength() + { + $encoder = new Pbkdf2PasswordEncoder('foobar'); + + $this->assertFalse($encoder->isPasswordValid('encoded', str_repeat('a', 5000), 'salt')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/PlaintextPasswordEncoderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/PlaintextPasswordEncoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1196651a86317b9380807b7300ec19b187e27cb2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/PlaintextPasswordEncoderTest.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder; + +class PlaintextPasswordEncoderTest extends TestCase +{ + public function testIsPasswordValid() + { + $encoder = new PlaintextPasswordEncoder(); + + $this->assertTrue($encoder->isPasswordValid('foo', 'foo', '')); + $this->assertFalse($encoder->isPasswordValid('bar', 'foo', '')); + $this->assertFalse($encoder->isPasswordValid('FOO', 'foo', '')); + + $encoder = new PlaintextPasswordEncoder(true); + + $this->assertTrue($encoder->isPasswordValid('foo', 'foo', '')); + $this->assertFalse($encoder->isPasswordValid('bar', 'foo', '')); + $this->assertTrue($encoder->isPasswordValid('FOO', 'foo', '')); + } + + public function testEncodePassword() + { + $encoder = new PlaintextPasswordEncoder(); + + $this->assertSame('foo', $encoder->encodePassword('foo', '')); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testEncodePasswordLength() + { + $encoder = new PlaintextPasswordEncoder(); + + $encoder->encodePassword(str_repeat('a', 5000), 'salt'); + } + + public function testCheckPasswordLength() + { + $encoder = new PlaintextPasswordEncoder(); + + $this->assertFalse($encoder->isPasswordValid('encoded', str_repeat('a', 5000), 'salt')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/UserPasswordEncoderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/UserPasswordEncoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3328837ef1f74e7a56e2b69b8d4afbaec2e5c8d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/UserPasswordEncoderTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Encoder\UserPasswordEncoder; + +class UserPasswordEncoderTest extends TestCase +{ + public function testEncodePassword() + { + $userMock = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $userMock->expects($this->any()) + ->method('getSalt') + ->will($this->returnValue('userSalt')); + + $mockEncoder = $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface')->getMock(); + $mockEncoder->expects($this->any()) + ->method('encodePassword') + ->with($this->equalTo('plainPassword'), $this->equalTo('userSalt')) + ->will($this->returnValue('encodedPassword')); + + $mockEncoderFactory = $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface')->getMock(); + $mockEncoderFactory->expects($this->any()) + ->method('getEncoder') + ->with($this->equalTo($userMock)) + ->will($this->returnValue($mockEncoder)); + + $passwordEncoder = new UserPasswordEncoder($mockEncoderFactory); + + $encoded = $passwordEncoder->encodePassword($userMock, 'plainPassword'); + $this->assertEquals('encodedPassword', $encoded); + } + + public function testIsPasswordValid() + { + $userMock = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $userMock->expects($this->any()) + ->method('getSalt') + ->will($this->returnValue('userSalt')); + $userMock->expects($this->any()) + ->method('getPassword') + ->will($this->returnValue('encodedPassword')); + + $mockEncoder = $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface')->getMock(); + $mockEncoder->expects($this->any()) + ->method('isPasswordValid') + ->with($this->equalTo('encodedPassword'), $this->equalTo('plainPassword'), $this->equalTo('userSalt')) + ->will($this->returnValue(true)); + + $mockEncoderFactory = $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface')->getMock(); + $mockEncoderFactory->expects($this->any()) + ->method('getEncoder') + ->with($this->equalTo($userMock)) + ->will($this->returnValue($mockEncoder)); + + $passwordEncoder = new UserPasswordEncoder($mockEncoderFactory); + + $isValid = $passwordEncoder->isPasswordValid($userMock, 'plainPassword'); + $this->assertTrue($isValid); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/CustomUserMessageAuthenticationExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/CustomUserMessageAuthenticationExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5776a991011a07239c2cb1f2d8fec931fdf62820 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/CustomUserMessageAuthenticationExceptionTest.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\Security\Core\Tests\Exception; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException; + +class CustomUserMessageAuthenticationExceptionTest extends TestCase +{ + public function testConstructWithSAfeMessage() + { + $e = new CustomUserMessageAuthenticationException('SAFE MESSAGE', array('foo' => true)); + + $this->assertEquals('SAFE MESSAGE', $e->getMessageKey()); + $this->assertEquals(array('foo' => true), $e->getMessageData()); + $this->assertEquals('SAFE MESSAGE', $e->getMessage()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/UsernameNotFoundExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/UsernameNotFoundExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b7e5c556d75ae25068528fe7e68853bc71a8a219 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Exception/UsernameNotFoundExceptionTest.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Exception; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; + +class UsernameNotFoundExceptionTest extends TestCase +{ + public function testGetMessageData() + { + $exception = new UsernameNotFoundException('Username could not be found.'); + $this->assertEquals(array('{{ username }}' => null), $exception->getMessageData()); + $exception->setUsername('username'); + $this->assertEquals(array('{{ username }}' => 'username'), $exception->getMessageData()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6588c32fdfa3c9adedb8b6fb94589935479079c0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Resources; + +use PHPUnit\Framework\TestCase; + +class TranslationFilesTest extends TestCase +{ + /** + * @dataProvider provideTranslationFiles + */ + public function testTranslationFileIsValid($filePath) + { + if (class_exists('PHPUnit_Util_XML')) { + \PHPUnit_Util_XML::loadfile($filePath, false, false, true); + } else { + \PHPUnit\Util\XML::loadfile($filePath, false, false, true); + } + } + + public function provideTranslationFiles() + { + return array_map( + function ($filePath) { return (array) $filePath; }, + glob(dirname(dirname(__DIR__)).'/Resources/translations/*.xlf') + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/RoleHierarchyTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/RoleHierarchyTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4d190cfc94823bf254003d98803d950a15772c45 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/RoleHierarchyTest.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Role; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Role\RoleHierarchy; +use Symfony\Component\Security\Core\Role\Role; + +class RoleHierarchyTest extends TestCase +{ + public function testGetReachableRoles() + { + $role = new RoleHierarchy(array( + 'ROLE_ADMIN' => array('ROLE_USER'), + 'ROLE_SUPER_ADMIN' => array('ROLE_ADMIN', 'ROLE_FOO'), + )); + + $this->assertEquals(array(new Role('ROLE_USER')), $role->getReachableRoles(array(new Role('ROLE_USER')))); + $this->assertEquals(array(new Role('ROLE_FOO')), $role->getReachableRoles(array(new Role('ROLE_FOO')))); + $this->assertEquals(array(new Role('ROLE_ADMIN'), new Role('ROLE_USER')), $role->getReachableRoles(array(new Role('ROLE_ADMIN')))); + $this->assertEquals(array(new Role('ROLE_FOO'), new Role('ROLE_ADMIN'), new Role('ROLE_USER')), $role->getReachableRoles(array(new Role('ROLE_FOO'), new Role('ROLE_ADMIN')))); + $this->assertEquals(array(new Role('ROLE_SUPER_ADMIN'), new Role('ROLE_ADMIN'), new Role('ROLE_FOO'), new Role('ROLE_USER')), $role->getReachableRoles(array(new Role('ROLE_SUPER_ADMIN')))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/RoleTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/RoleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..edf779413b636738064ff847166a52a84227defe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/RoleTest.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Role; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Role\Role; + +class RoleTest extends TestCase +{ + public function testGetRole() + { + $role = new Role('FOO'); + + $this->assertEquals('FOO', $role->getRole()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/SwitchUserRoleTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/SwitchUserRoleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e40471733ce113398f433e672e1b42dbc71d3756 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Role/SwitchUserRoleTest.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\Component\Security\Core\Tests\Role; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Role\SwitchUserRole; + +class SwitchUserRoleTest extends TestCase +{ + public function testGetSource() + { + $role = new SwitchUserRole('FOO', $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); + + $this->assertSame($token, $role->getSource()); + } + + public function testGetRole() + { + $role = new SwitchUserRole('FOO', $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); + + $this->assertEquals('FOO', $role->getRole()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/ChainUserProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/ChainUserProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2f53cf924ca0aa42be40cb8c8b93e6b3ff70bf76 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/ChainUserProviderTest.php @@ -0,0 +1,184 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\User; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Exception\UnsupportedUserException; +use Symfony\Component\Security\Core\User\ChainUserProvider; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; + +class ChainUserProviderTest extends TestCase +{ + public function testLoadUserByUsername() + { + $provider1 = $this->getProvider(); + $provider1 + ->expects($this->once()) + ->method('loadUserByUsername') + ->with($this->equalTo('foo')) + ->will($this->throwException(new UsernameNotFoundException('not found'))) + ; + + $provider2 = $this->getProvider(); + $provider2 + ->expects($this->once()) + ->method('loadUserByUsername') + ->with($this->equalTo('foo')) + ->will($this->returnValue($account = $this->getAccount())) + ; + + $provider = new ChainUserProvider(array($provider1, $provider2)); + $this->assertSame($account, $provider->loadUserByUsername('foo')); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\UsernameNotFoundException + */ + public function testLoadUserByUsernameThrowsUsernameNotFoundException() + { + $provider1 = $this->getProvider(); + $provider1 + ->expects($this->once()) + ->method('loadUserByUsername') + ->with($this->equalTo('foo')) + ->will($this->throwException(new UsernameNotFoundException('not found'))) + ; + + $provider2 = $this->getProvider(); + $provider2 + ->expects($this->once()) + ->method('loadUserByUsername') + ->with($this->equalTo('foo')) + ->will($this->throwException(new UsernameNotFoundException('not found'))) + ; + + $provider = new ChainUserProvider(array($provider1, $provider2)); + $provider->loadUserByUsername('foo'); + } + + public function testRefreshUser() + { + $provider1 = $this->getProvider(); + $provider1 + ->expects($this->once()) + ->method('refreshUser') + ->will($this->throwException(new UnsupportedUserException('unsupported'))) + ; + + $provider2 = $this->getProvider(); + $provider2 + ->expects($this->once()) + ->method('refreshUser') + ->will($this->returnValue($account = $this->getAccount())) + ; + + $provider = new ChainUserProvider(array($provider1, $provider2)); + $this->assertSame($account, $provider->refreshUser($this->getAccount())); + } + + public function testRefreshUserAgain() + { + $provider1 = $this->getProvider(); + $provider1 + ->expects($this->once()) + ->method('refreshUser') + ->will($this->throwException(new UsernameNotFoundException('not found'))) + ; + + $provider2 = $this->getProvider(); + $provider2 + ->expects($this->once()) + ->method('refreshUser') + ->will($this->returnValue($account = $this->getAccount())) + ; + + $provider = new ChainUserProvider(array($provider1, $provider2)); + $this->assertSame($account, $provider->refreshUser($this->getAccount())); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\UnsupportedUserException + */ + public function testRefreshUserThrowsUnsupportedUserException() + { + $provider1 = $this->getProvider(); + $provider1 + ->expects($this->once()) + ->method('refreshUser') + ->will($this->throwException(new UnsupportedUserException('unsupported'))) + ; + + $provider2 = $this->getProvider(); + $provider2 + ->expects($this->once()) + ->method('refreshUser') + ->will($this->throwException(new UnsupportedUserException('unsupported'))) + ; + + $provider = new ChainUserProvider(array($provider1, $provider2)); + $provider->refreshUser($this->getAccount()); + } + + public function testSupportsClass() + { + $provider1 = $this->getProvider(); + $provider1 + ->expects($this->once()) + ->method('supportsClass') + ->with($this->equalTo('foo')) + ->will($this->returnValue(false)) + ; + + $provider2 = $this->getProvider(); + $provider2 + ->expects($this->once()) + ->method('supportsClass') + ->with($this->equalTo('foo')) + ->will($this->returnValue(true)) + ; + + $provider = new ChainUserProvider(array($provider1, $provider2)); + $this->assertTrue($provider->supportsClass('foo')); + } + + public function testSupportsClassWhenNotSupported() + { + $provider1 = $this->getProvider(); + $provider1 + ->expects($this->once()) + ->method('supportsClass') + ->with($this->equalTo('foo')) + ->will($this->returnValue(false)) + ; + + $provider2 = $this->getProvider(); + $provider2 + ->expects($this->once()) + ->method('supportsClass') + ->with($this->equalTo('foo')) + ->will($this->returnValue(false)) + ; + + $provider = new ChainUserProvider(array($provider1, $provider2)); + $this->assertFalse($provider->supportsClass('foo')); + } + + protected function getAccount() + { + return $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + } + + protected function getProvider() + { + return $this->getMockBuilder('Symfony\Component\Security\Core\User\UserProviderInterface')->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6647a76a1286c69510f9939bb1ae5b3fa2afa828 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserProviderTest.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\User; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\User\InMemoryUserProvider; +use Symfony\Component\Security\Core\User\User; + +class InMemoryUserProviderTest extends TestCase +{ + public function testConstructor() + { + $provider = $this->createProvider(); + + $user = $provider->loadUserByUsername('fabien'); + $this->assertEquals('foo', $user->getPassword()); + $this->assertEquals(array('ROLE_USER'), $user->getRoles()); + $this->assertFalse($user->isEnabled()); + } + + public function testRefresh() + { + $user = new User('fabien', 'bar'); + + $provider = $this->createProvider(); + + $refreshedUser = $provider->refreshUser($user); + $this->assertEquals('foo', $refreshedUser->getPassword()); + $this->assertEquals(array('ROLE_USER'), $refreshedUser->getRoles()); + $this->assertFalse($refreshedUser->isEnabled()); + $this->assertFalse($refreshedUser->isCredentialsNonExpired()); + } + + /** + * @return InMemoryUserProvider + */ + protected function createProvider() + { + return new InMemoryUserProvider(array( + 'fabien' => array( + 'password' => 'foo', + 'enabled' => false, + 'roles' => array('ROLE_USER'), + ), + )); + } + + public function testCreateUser() + { + $provider = new InMemoryUserProvider(); + $provider->createUser(new User('fabien', 'foo')); + + $user = $provider->loadUserByUsername('fabien'); + $this->assertEquals('foo', $user->getPassword()); + } + + /** + * @expectedException \LogicException + */ + public function testCreateUserAlreadyExist() + { + $provider = new InMemoryUserProvider(); + $provider->createUser(new User('fabien', 'foo')); + $provider->createUser(new User('fabien', 'foo')); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\UsernameNotFoundException + */ + public function testLoadUserByUsernameDoesNotExist() + { + $provider = new InMemoryUserProvider(); + $provider->loadUserByUsername('fabien'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/LdapUserProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/LdapUserProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b728df1ae1532e51cb192ba7f67f8fa0dddb1711 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/LdapUserProviderTest.php @@ -0,0 +1,362 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\User; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Ldap\Adapter\CollectionInterface; +use Symfony\Component\Ldap\Adapter\QueryInterface; +use Symfony\Component\Ldap\Entry; +use Symfony\Component\Ldap\LdapInterface; +use Symfony\Component\Security\Core\User\LdapUserProvider; +use Symfony\Component\Ldap\Exception\ConnectionException; + +/** + * @requires extension ldap + */ +class LdapUserProviderTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Security\Core\Exception\UsernameNotFoundException + */ + public function testLoadUserByUsernameFailsIfCantConnectToLdap() + { + $ldap = $this->getMockBuilder(LdapInterface::class)->getMock(); + $ldap + ->expects($this->once()) + ->method('bind') + ->will($this->throwException(new ConnectionException())) + ; + + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com'); + $provider->loadUserByUsername('foo'); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\UsernameNotFoundException + */ + public function testLoadUserByUsernameFailsIfNoLdapEntries() + { + $result = $this->getMockBuilder(CollectionInterface::class)->getMock(); + $query = $this->getMockBuilder(QueryInterface::class)->getMock(); + $query + ->expects($this->once()) + ->method('execute') + ->will($this->returnValue($result)) + ; + $result + ->expects($this->once()) + ->method('count') + ->will($this->returnValue(0)) + ; + $ldap = $this->getMockBuilder(LdapInterface::class)->getMock(); + $ldap + ->expects($this->once()) + ->method('escape') + ->will($this->returnValue('foo')) + ; + $ldap + ->expects($this->once()) + ->method('query') + ->will($this->returnValue($query)) + ; + + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com'); + $provider->loadUserByUsername('foo'); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\UsernameNotFoundException + */ + public function testLoadUserByUsernameFailsIfMoreThanOneLdapEntry() + { + $result = $this->getMockBuilder(CollectionInterface::class)->getMock(); + $query = $this->getMockBuilder(QueryInterface::class)->getMock(); + $query + ->expects($this->once()) + ->method('execute') + ->will($this->returnValue($result)) + ; + $result + ->expects($this->once()) + ->method('count') + ->will($this->returnValue(2)) + ; + $ldap = $this->getMockBuilder(LdapInterface::class)->getMock(); + $ldap + ->expects($this->once()) + ->method('escape') + ->will($this->returnValue('foo')) + ; + $ldap + ->expects($this->once()) + ->method('query') + ->will($this->returnValue($query)) + ; + + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com'); + $provider->loadUserByUsername('foo'); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\InvalidArgumentException + */ + public function testLoadUserByUsernameFailsIfMoreThanOneLdapPasswordsInEntry() + { + $result = $this->getMockBuilder(CollectionInterface::class)->getMock(); + $query = $this->getMockBuilder(QueryInterface::class)->getMock(); + $query + ->expects($this->once()) + ->method('execute') + ->will($this->returnValue($result)) + ; + $ldap = $this->getMockBuilder(LdapInterface::class)->getMock(); + $result + ->expects($this->once()) + ->method('offsetGet') + ->with(0) + ->will($this->returnValue(new Entry('foo', array( + 'sAMAccountName' => array('foo'), + 'userpassword' => array('bar', 'baz'), + ) + ))) + ; + $result + ->expects($this->once()) + ->method('count') + ->will($this->returnValue(1)) + ; + $ldap + ->expects($this->once()) + ->method('escape') + ->will($this->returnValue('foo')) + ; + $ldap + ->expects($this->once()) + ->method('query') + ->will($this->returnValue($query)) + ; + + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com', null, null, array(), 'sAMAccountName', '({uid_key}={username})', 'userpassword'); + $this->assertInstanceOf( + 'Symfony\Component\Security\Core\User\User', + $provider->loadUserByUsername('foo') + ); + } + + public function testLoadUserByUsernameShouldNotFailIfEntryHasNoUidKeyAttribute() + { + $result = $this->getMockBuilder(CollectionInterface::class)->getMock(); + $query = $this->getMockBuilder(QueryInterface::class)->getMock(); + $query + ->expects($this->once()) + ->method('execute') + ->will($this->returnValue($result)) + ; + $ldap = $this->getMockBuilder(LdapInterface::class)->getMock(); + $result + ->expects($this->once()) + ->method('offsetGet') + ->with(0) + ->will($this->returnValue(new Entry('foo', array()))) + ; + $result + ->expects($this->once()) + ->method('count') + ->will($this->returnValue(1)) + ; + $ldap + ->expects($this->once()) + ->method('escape') + ->will($this->returnValue('foo')) + ; + $ldap + ->expects($this->once()) + ->method('query') + ->will($this->returnValue($query)) + ; + + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com', null, null, array(), 'sAMAccountName', '({uid_key}={username})'); + $this->assertInstanceOf( + 'Symfony\Component\Security\Core\User\User', + $provider->loadUserByUsername('foo') + ); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\InvalidArgumentException + */ + public function testLoadUserByUsernameFailsIfEntryHasNoPasswordAttribute() + { + $result = $this->getMockBuilder(CollectionInterface::class)->getMock(); + $query = $this->getMockBuilder(QueryInterface::class)->getMock(); + $query + ->expects($this->once()) + ->method('execute') + ->will($this->returnValue($result)) + ; + $ldap = $this->getMockBuilder(LdapInterface::class)->getMock(); + $result + ->expects($this->once()) + ->method('offsetGet') + ->with(0) + ->will($this->returnValue(new Entry('foo', array( + 'sAMAccountName' => array('foo'), + ) + ))) + ; + $result + ->expects($this->once()) + ->method('count') + ->will($this->returnValue(1)) + ; + $ldap + ->expects($this->once()) + ->method('escape') + ->will($this->returnValue('foo')) + ; + $ldap + ->expects($this->once()) + ->method('query') + ->will($this->returnValue($query)) + ; + + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com', null, null, array(), 'sAMAccountName', '({uid_key}={username})', 'userpassword'); + $this->assertInstanceOf( + 'Symfony\Component\Security\Core\User\User', + $provider->loadUserByUsername('foo') + ); + } + + public function testLoadUserByUsernameIsSuccessfulWithoutPasswordAttribute() + { + $result = $this->getMockBuilder(CollectionInterface::class)->getMock(); + $query = $this->getMockBuilder(QueryInterface::class)->getMock(); + $query + ->expects($this->once()) + ->method('execute') + ->will($this->returnValue($result)) + ; + $ldap = $this->getMockBuilder(LdapInterface::class)->getMock(); + $result + ->expects($this->once()) + ->method('offsetGet') + ->with(0) + ->will($this->returnValue(new Entry('foo', array( + 'sAMAccountName' => array('foo'), + ) + ))) + ; + $result + ->expects($this->once()) + ->method('count') + ->will($this->returnValue(1)) + ; + $ldap + ->expects($this->once()) + ->method('escape') + ->will($this->returnValue('foo')) + ; + $ldap + ->expects($this->once()) + ->method('query') + ->will($this->returnValue($query)) + ; + + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com'); + $this->assertInstanceOf( + 'Symfony\Component\Security\Core\User\User', + $provider->loadUserByUsername('foo') + ); + } + + public function testLoadUserByUsernameIsSuccessfulWithoutPasswordAttributeAndWrongCase() + { + $result = $this->getMockBuilder(CollectionInterface::class)->getMock(); + $query = $this->getMockBuilder(QueryInterface::class)->getMock(); + $query + ->expects($this->once()) + ->method('execute') + ->will($this->returnValue($result)) + ; + $ldap = $this->getMockBuilder(LdapInterface::class)->getMock(); + $result + ->expects($this->once()) + ->method('offsetGet') + ->with(0) + ->will($this->returnValue(new Entry('foo', array( + 'sAMAccountName' => array('foo'), + ) + ))) + ; + $result + ->expects($this->once()) + ->method('count') + ->will($this->returnValue(1)) + ; + $ldap + ->expects($this->once()) + ->method('escape') + ->will($this->returnValue('Foo')) + ; + $ldap + ->expects($this->once()) + ->method('query') + ->will($this->returnValue($query)) + ; + + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com'); + $this->assertSame('foo', $provider->loadUserByUsername('Foo')->getUsername()); + } + + public function testLoadUserByUsernameIsSuccessfulWithPasswordAttribute() + { + $result = $this->getMockBuilder(CollectionInterface::class)->getMock(); + $query = $this->getMockBuilder(QueryInterface::class)->getMock(); + $query + ->expects($this->once()) + ->method('execute') + ->will($this->returnValue($result)) + ; + $ldap = $this->getMockBuilder(LdapInterface::class)->getMock(); + $result + ->expects($this->once()) + ->method('offsetGet') + ->with(0) + ->will($this->returnValue(new Entry('foo', array( + 'sAMAccountName' => array('foo'), + 'userpassword' => array('bar'), + ) + ))) + ; + $result + ->expects($this->once()) + ->method('count') + ->will($this->returnValue(1)) + ; + $ldap + ->expects($this->once()) + ->method('escape') + ->will($this->returnValue('foo')) + ; + $ldap + ->expects($this->once()) + ->method('query') + ->will($this->returnValue($query)) + ; + + $provider = new LdapUserProvider($ldap, 'ou=MyBusiness,dc=symfony,dc=com', null, null, array(), 'sAMAccountName', '({uid_key}={username})', 'userpassword'); + $this->assertInstanceOf( + 'Symfony\Component\Security\Core\User\User', + $provider->loadUserByUsername('foo') + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/UserCheckerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/UserCheckerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8ec34843eaae0ecaed2b1088208d6a67dd5a90d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/UserCheckerTest.php @@ -0,0 +1,109 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\User; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\User\UserChecker; + +class UserCheckerTest extends TestCase +{ + public function testCheckPostAuthNotAdvancedUserInterface() + { + $checker = new UserChecker(); + + $this->assertNull($checker->checkPostAuth($this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock())); + } + + public function testCheckPostAuthPass() + { + $checker = new UserChecker(); + + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); + $account->expects($this->once())->method('isCredentialsNonExpired')->will($this->returnValue(true)); + + $this->assertNull($checker->checkPostAuth($account)); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\CredentialsExpiredException + */ + public function testCheckPostAuthCredentialsExpired() + { + $checker = new UserChecker(); + + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); + $account->expects($this->once())->method('isCredentialsNonExpired')->will($this->returnValue(false)); + + $checker->checkPostAuth($account); + } + + public function testCheckPreAuthNotAdvancedUserInterface() + { + $checker = new UserChecker(); + + $this->assertNull($checker->checkPreAuth($this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock())); + } + + public function testCheckPreAuthPass() + { + $checker = new UserChecker(); + + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); + $account->expects($this->once())->method('isAccountNonLocked')->will($this->returnValue(true)); + $account->expects($this->once())->method('isEnabled')->will($this->returnValue(true)); + $account->expects($this->once())->method('isAccountNonExpired')->will($this->returnValue(true)); + + $this->assertNull($checker->checkPreAuth($account)); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\LockedException + */ + public function testCheckPreAuthAccountLocked() + { + $checker = new UserChecker(); + + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); + $account->expects($this->once())->method('isAccountNonLocked')->will($this->returnValue(false)); + + $checker->checkPreAuth($account); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\DisabledException + */ + public function testCheckPreAuthDisabled() + { + $checker = new UserChecker(); + + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); + $account->expects($this->once())->method('isAccountNonLocked')->will($this->returnValue(true)); + $account->expects($this->once())->method('isEnabled')->will($this->returnValue(false)); + + $checker->checkPreAuth($account); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AccountExpiredException + */ + public function testCheckPreAuthAccountExpired() + { + $checker = new UserChecker(); + + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); + $account->expects($this->once())->method('isAccountNonLocked')->will($this->returnValue(true)); + $account->expects($this->once())->method('isEnabled')->will($this->returnValue(true)); + $account->expects($this->once())->method('isAccountNonExpired')->will($this->returnValue(false)); + + $checker->checkPreAuth($account); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/UserTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/UserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fa9f33107d90cccb66443a6050d23b84f753b5f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/User/UserTest.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\User; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\User\User; + +class UserTest extends TestCase +{ + /** + * @expectedException \InvalidArgumentException + */ + public function testConstructorException() + { + new User('', 'superpass'); + } + + public function testGetRoles() + { + $user = new User('fabien', 'superpass'); + $this->assertEquals(array(), $user->getRoles()); + + $user = new User('fabien', 'superpass', array('ROLE_ADMIN')); + $this->assertEquals(array('ROLE_ADMIN'), $user->getRoles()); + } + + public function testGetPassword() + { + $user = new User('fabien', 'superpass'); + $this->assertEquals('superpass', $user->getPassword()); + } + + public function testGetUsername() + { + $user = new User('fabien', 'superpass'); + $this->assertEquals('fabien', $user->getUsername()); + } + + public function testGetSalt() + { + $user = new User('fabien', 'superpass'); + $this->assertEquals('', $user->getSalt()); + } + + public function testIsAccountNonExpired() + { + $user = new User('fabien', 'superpass'); + $this->assertTrue($user->isAccountNonExpired()); + + $user = new User('fabien', 'superpass', array(), true, false); + $this->assertFalse($user->isAccountNonExpired()); + } + + public function testIsCredentialsNonExpired() + { + $user = new User('fabien', 'superpass'); + $this->assertTrue($user->isCredentialsNonExpired()); + + $user = new User('fabien', 'superpass', array(), true, true, false); + $this->assertFalse($user->isCredentialsNonExpired()); + } + + public function testIsAccountNonLocked() + { + $user = new User('fabien', 'superpass'); + $this->assertTrue($user->isAccountNonLocked()); + + $user = new User('fabien', 'superpass', array(), true, true, true, false); + $this->assertFalse($user->isAccountNonLocked()); + } + + public function testIsEnabled() + { + $user = new User('fabien', 'superpass'); + $this->assertTrue($user->isEnabled()); + + $user = new User('fabien', 'superpass', array(), false); + $this->assertFalse($user->isEnabled()); + } + + public function testEraseCredentials() + { + $user = new User('fabien', 'superpass'); + $user->eraseCredentials(); + $this->assertEquals('superpass', $user->getPassword()); + } + + public function testToString() + { + $user = new User('fabien', 'superpass'); + $this->assertEquals('fabien', (string) $user); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7ebe65c647d9949e80183a650b8f7a7227bfd58f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php @@ -0,0 +1,169 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Tests\Validator\Constraints; + +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; +use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; +use Symfony\Component\Security\Core\Validator\Constraints\UserPassword; +use Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator; +use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest; + +/** + * @author Bernhard Schussek + */ +abstract class UserPasswordValidatorTest extends AbstractConstraintValidatorTest +{ + const PASSWORD = 's3Cr3t'; + + const SALT = '^S4lt$'; + + /** + * @var TokenStorageInterface + */ + protected $tokenStorage; + + /** + * @var PasswordEncoderInterface + */ + protected $encoder; + + /** + * @var EncoderFactoryInterface + */ + protected $encoderFactory; + + protected function createValidator() + { + return new UserPasswordValidator($this->tokenStorage, $this->encoderFactory); + } + + protected function setUp() + { + $user = $this->createUser(); + $this->tokenStorage = $this->createTokenStorage($user); + $this->encoder = $this->createPasswordEncoder(); + $this->encoderFactory = $this->createEncoderFactory($this->encoder); + + parent::setUp(); + } + + public function testPasswordIsValid() + { + $constraint = new UserPassword(array( + 'message' => 'myMessage', + )); + + $this->encoder->expects($this->once()) + ->method('isPasswordValid') + ->with(static::PASSWORD, 'secret', static::SALT) + ->will($this->returnValue(true)); + + $this->validator->validate('secret', $constraint); + + $this->assertNoViolation(); + } + + public function testPasswordIsNotValid() + { + $constraint = new UserPassword(array( + 'message' => 'myMessage', + )); + + $this->encoder->expects($this->once()) + ->method('isPasswordValid') + ->with(static::PASSWORD, 'secret', static::SALT) + ->will($this->returnValue(false)); + + $this->validator->validate('secret', $constraint); + + $this->buildViolation('myMessage') + ->assertRaised(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testUserIsNotValid() + { + $user = $this->getMockBuilder('Foo\Bar\User')->getMock(); + + $this->tokenStorage = $this->createTokenStorage($user); + $this->validator = $this->createValidator(); + $this->validator->initialize($this->context); + + $this->validator->validate('secret', new UserPassword()); + } + + protected function createUser() + { + $mock = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + + $mock + ->expects($this->any()) + ->method('getPassword') + ->will($this->returnValue(static::PASSWORD)) + ; + + $mock + ->expects($this->any()) + ->method('getSalt') + ->will($this->returnValue(static::SALT)) + ; + + return $mock; + } + + protected function createPasswordEncoder($isPasswordValid = true) + { + return $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface')->getMock(); + } + + protected function createEncoderFactory($encoder = null) + { + $mock = $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface')->getMock(); + + $mock + ->expects($this->any()) + ->method('getEncoder') + ->will($this->returnValue($encoder)) + ; + + return $mock; + } + + protected function createTokenStorage($user = null) + { + $token = $this->createAuthenticationToken($user); + + $mock = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $mock + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue($token)) + ; + + return $mock; + } + + protected function createAuthenticationToken($user = null) + { + $mock = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $mock + ->expects($this->any()) + ->method('getUser') + ->will($this->returnValue($user)) + ; + + return $mock; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/AdvancedUserInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/AdvancedUserInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..087c3c6e2695e26e4d9209beb8690e1b32b78b80 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/AdvancedUserInterface.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\User; + +use Symfony\Component\Security\Core\Exception\AccountStatusException; +use Symfony\Component\Security\Core\Exception\AccountExpiredException; +use Symfony\Component\Security\Core\Exception\LockedException; +use Symfony\Component\Security\Core\Exception\CredentialsExpiredException; +use Symfony\Component\Security\Core\Exception\DisabledException; + +/** + * Adds extra features to a user class related to account status flags. + * + * This interface can be implemented in place of UserInterface if you'd like + * the authentication system to consider different account status flags + * during authentication. If any of the methods in this interface return + * false, authentication will fail. + * + * If you need to perform custom logic for any of these situations, then + * you will need to register an exception listener and watch for the specific + * exception instances thrown in each case. All exceptions are a subclass + * of AccountStatusException + * + * @see UserInterface + * @see AccountStatusException + * + * @author Fabien Potencier + */ +interface AdvancedUserInterface extends UserInterface +{ + /** + * Checks whether the user's account has expired. + * + * Internally, if this method returns false, the authentication system + * will throw an AccountExpiredException and prevent login. + * + * @return bool true if the user's account is non expired, false otherwise + * + * @see AccountExpiredException + */ + public function isAccountNonExpired(); + + /** + * Checks whether the user is locked. + * + * Internally, if this method returns false, the authentication system + * will throw a LockedException and prevent login. + * + * @return bool true if the user is not locked, false otherwise + * + * @see LockedException + */ + public function isAccountNonLocked(); + + /** + * Checks whether the user's credentials (password) has expired. + * + * Internally, if this method returns false, the authentication system + * will throw a CredentialsExpiredException and prevent login. + * + * @return bool true if the user's credentials are non expired, false otherwise + * + * @see CredentialsExpiredException + */ + public function isCredentialsNonExpired(); + + /** + * Checks whether the user is enabled. + * + * Internally, if this method returns false, the authentication system + * will throw a DisabledException and prevent login. + * + * @return bool true if the user is enabled, false otherwise + * + * @see DisabledException + */ + public function isEnabled(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/ChainUserProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/ChainUserProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..8604ddc4a7391153b63c29d006fa262d8776caf2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/ChainUserProvider.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\User; + +use Symfony\Component\Security\Core\Exception\UnsupportedUserException; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; + +/** + * Chain User Provider. + * + * This provider calls several leaf providers in a chain until one is able to + * handle the request. + * + * @author Johannes M. Schmitt + */ +class ChainUserProvider implements UserProviderInterface +{ + private $providers; + + public function __construct(array $providers) + { + $this->providers = $providers; + } + + /** + * @return array + */ + public function getProviders() + { + return $this->providers; + } + + /** + * {@inheritdoc} + */ + public function loadUserByUsername($username) + { + foreach ($this->providers as $provider) { + try { + return $provider->loadUserByUsername($username); + } catch (UsernameNotFoundException $e) { + // try next one + } + } + + $ex = new UsernameNotFoundException(sprintf('There is no user with name "%s".', $username)); + $ex->setUsername($username); + throw $ex; + } + + /** + * {@inheritdoc} + */ + public function refreshUser(UserInterface $user) + { + $supportedUserFound = false; + + foreach ($this->providers as $provider) { + try { + return $provider->refreshUser($user); + } catch (UnsupportedUserException $e) { + // try next one + } catch (UsernameNotFoundException $e) { + $supportedUserFound = true; + // try next one + } + } + + if ($supportedUserFound) { + $e = new UsernameNotFoundException(sprintf('There is no user with name "%s".', $user->getUsername())); + $e->setUsername($user->getUsername()); + throw $e; + } else { + throw new UnsupportedUserException(sprintf('The account "%s" is not supported.', get_class($user))); + } + } + + /** + * {@inheritdoc} + */ + public function supportsClass($class) + { + foreach ($this->providers as $provider) { + if ($provider->supportsClass($class)) { + return true; + } + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/EquatableInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/EquatableInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c6082ce5019aa005574d4147fb4ac7d916f786e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/EquatableInterface.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\User; + +/** + * EquatableInterface used to test if two objects are equal in security + * and re-authentication context. + * + * @author Dariusz Górecki + */ +interface EquatableInterface +{ + /** + * The equality comparison should neither be done by referential equality + * nor by comparing identities (i.e. getId() === getId()). + * + * However, you do not need to compare every attribute, but only those that + * are relevant for assessing whether re-authentication is required. + * + * Also implementation should consider that $user instance may implement + * the extended user interface `AdvancedUserInterface`. + * + * @param UserInterface $user + * + * @return bool + */ + public function isEqualTo(UserInterface $user); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..e09d72e564f12d83cfa4dbce338259ecb80af053 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\User; + +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Exception\UnsupportedUserException; + +/** + * InMemoryUserProvider is a simple non persistent user provider. + * + * Useful for testing, demonstration, prototyping, and for simple needs + * (a backend with a unique admin for instance) + * + * @author Fabien Potencier + */ +class InMemoryUserProvider implements UserProviderInterface +{ + private $users; + + /** + * Constructor. + * + * The user array is a hash where the keys are usernames and the values are + * an array of attributes: 'password', 'enabled', and 'roles'. + * + * @param array $users An array of users + */ + public function __construct(array $users = array()) + { + foreach ($users as $username => $attributes) { + $password = isset($attributes['password']) ? $attributes['password'] : null; + $enabled = isset($attributes['enabled']) ? $attributes['enabled'] : true; + $roles = isset($attributes['roles']) ? $attributes['roles'] : array(); + $user = new User($username, $password, $roles, $enabled, true, true, true); + + $this->createUser($user); + } + } + + /** + * Adds a new User to the provider. + * + * @param UserInterface $user A UserInterface instance + * + * @throws \LogicException + */ + public function createUser(UserInterface $user) + { + if (isset($this->users[strtolower($user->getUsername())])) { + throw new \LogicException('Another user with the same username already exists.'); + } + + $this->users[strtolower($user->getUsername())] = $user; + } + + /** + * {@inheritdoc} + */ + public function loadUserByUsername($username) + { + $user = $this->getUser($username); + + return new User($user->getUsername(), $user->getPassword(), $user->getRoles(), $user->isEnabled(), $user->isAccountNonExpired(), $user->isCredentialsNonExpired(), $user->isAccountNonLocked()); + } + + /** + * {@inheritdoc} + */ + public function refreshUser(UserInterface $user) + { + if (!$user instanceof User) { + throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user))); + } + + $storedUser = $this->getUser($user->getUsername()); + + return new User($storedUser->getUsername(), $storedUser->getPassword(), $storedUser->getRoles(), $storedUser->isEnabled(), $storedUser->isAccountNonExpired(), $storedUser->isCredentialsNonExpired() && $storedUser->getPassword() === $user->getPassword(), $storedUser->isAccountNonLocked()); + } + + /** + * {@inheritdoc} + */ + public function supportsClass($class) + { + return $class === 'Symfony\Component\Security\Core\User\User'; + } + + /** + * Returns the user by given username. + * + * @param string $username The username + * + * @return User + * + * @throws UsernameNotFoundException If user whose given username does not exist. + */ + private function getUser($username) + { + if (!isset($this->users[strtolower($username)])) { + $ex = new UsernameNotFoundException(sprintf('Username "%s" does not exist.', $username)); + $ex->setUsername($username); + + throw $ex; + } + + return $this->users[strtolower($username)]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/LdapUserProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/LdapUserProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..ffcd148b5f63b66a60613c7517e9568dc2bc4898 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/LdapUserProvider.php @@ -0,0 +1,160 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\User; + +use Symfony\Component\Ldap\Entry; +use Symfony\Component\Security\Core\Exception\InvalidArgumentException; +use Symfony\Component\Security\Core\Exception\UnsupportedUserException; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Ldap\Exception\ConnectionException; +use Symfony\Component\Ldap\LdapInterface; + +/** + * LdapUserProvider is a simple user provider on top of ldap. + * + * @author Grégoire Pineau + * @author Charles Sarrazin + */ +class LdapUserProvider implements UserProviderInterface +{ + private $ldap; + private $baseDn; + private $searchDn; + private $searchPassword; + private $defaultRoles; + private $uidKey; + private $defaultSearch; + private $passwordAttribute; + + /** + * @param LdapInterface $ldap + * @param string $baseDn + * @param string $searchDn + * @param string $searchPassword + * @param array $defaultRoles + * @param string $uidKey + * @param string $filter + * @param string $passwordAttribute + */ + public function __construct(LdapInterface $ldap, $baseDn, $searchDn = null, $searchPassword = null, array $defaultRoles = array(), $uidKey = 'sAMAccountName', $filter = '({uid_key}={username})', $passwordAttribute = null) + { + if (null === $uidKey) { + $uidKey = 'sAMAccountName'; + } + + $this->ldap = $ldap; + $this->baseDn = $baseDn; + $this->searchDn = $searchDn; + $this->searchPassword = $searchPassword; + $this->defaultRoles = $defaultRoles; + $this->uidKey = $uidKey; + $this->defaultSearch = str_replace('{uid_key}', $uidKey, $filter); + $this->passwordAttribute = $passwordAttribute; + } + + /** + * {@inheritdoc} + */ + public function loadUserByUsername($username) + { + try { + $this->ldap->bind($this->searchDn, $this->searchPassword); + $username = $this->ldap->escape($username, '', LdapInterface::ESCAPE_FILTER); + $query = str_replace('{username}', $username, $this->defaultSearch); + $search = $this->ldap->query($this->baseDn, $query); + } catch (ConnectionException $e) { + throw new UsernameNotFoundException(sprintf('User "%s" not found.', $username), 0, $e); + } + + $entries = $search->execute(); + $count = count($entries); + + if (!$count) { + throw new UsernameNotFoundException(sprintf('User "%s" not found.', $username)); + } + + if ($count > 1) { + throw new UsernameNotFoundException('More than one user found'); + } + + $entry = $entries[0]; + + try { + if (null !== $this->uidKey) { + $username = $this->getAttributeValue($entry, $this->uidKey); + } + } catch (InvalidArgumentException $e) { + } + + return $this->loadUser($username, $entry); + } + + /** + * {@inheritdoc} + */ + public function refreshUser(UserInterface $user) + { + if (!$user instanceof User) { + throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user))); + } + + return new User($user->getUsername(), null, $user->getRoles()); + } + + /** + * {@inheritdoc} + */ + public function supportsClass($class) + { + return $class === 'Symfony\Component\Security\Core\User\User'; + } + + /** + * Loads a user from an LDAP entry. + * + * @param string $username + * @param Entry $entry + * + * @return User + */ + protected function loadUser($username, Entry $entry) + { + $password = null; + + if (null !== $this->passwordAttribute) { + $password = $this->getAttributeValue($entry, $this->passwordAttribute); + } + + return new User($username, $password, $this->defaultRoles); + } + + /** + * Fetches a required unique attribute value from an LDAP entry. + * + * @param null|Entry $entry + * @param string $attribute + */ + private function getAttributeValue(Entry $entry, $attribute) + { + if (!$entry->hasAttribute($attribute)) { + throw new InvalidArgumentException(sprintf('Missing attribute "%s" for user "%s".', $attribute, $entry->getDn())); + } + + $values = $entry->getAttribute($attribute); + + if (1 !== count($values)) { + throw new InvalidArgumentException(sprintf('Attribute "%s" has multiple values.', $attribute)); + } + + return $values[0]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/User.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/User.php new file mode 100644 index 0000000000000000000000000000000000000000..bc81f7ffa795a54e12b8b22c15665502e3271238 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/User.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\User; + +/** + * User is the user implementation used by the in-memory user provider. + * + * This should not be used for anything else. + * + * @author Fabien Potencier + */ +final class User implements AdvancedUserInterface +{ + private $username; + private $password; + private $enabled; + private $accountNonExpired; + private $credentialsNonExpired; + private $accountNonLocked; + private $roles; + + public function __construct($username, $password, array $roles = array(), $enabled = true, $userNonExpired = true, $credentialsNonExpired = true, $userNonLocked = true) + { + if ('' === $username || null === $username) { + throw new \InvalidArgumentException('The username cannot be empty.'); + } + + $this->username = $username; + $this->password = $password; + $this->enabled = $enabled; + $this->accountNonExpired = $userNonExpired; + $this->credentialsNonExpired = $credentialsNonExpired; + $this->accountNonLocked = $userNonLocked; + $this->roles = $roles; + } + + public function __toString() + { + return $this->getUsername(); + } + + /** + * {@inheritdoc} + */ + public function getRoles() + { + return $this->roles; + } + + /** + * {@inheritdoc} + */ + public function getPassword() + { + return $this->password; + } + + /** + * {@inheritdoc} + */ + public function getSalt() + { + } + + /** + * {@inheritdoc} + */ + public function getUsername() + { + return $this->username; + } + + /** + * {@inheritdoc} + */ + public function isAccountNonExpired() + { + return $this->accountNonExpired; + } + + /** + * {@inheritdoc} + */ + public function isAccountNonLocked() + { + return $this->accountNonLocked; + } + + /** + * {@inheritdoc} + */ + public function isCredentialsNonExpired() + { + return $this->credentialsNonExpired; + } + + /** + * {@inheritdoc} + */ + public function isEnabled() + { + return $this->enabled; + } + + /** + * {@inheritdoc} + */ + public function eraseCredentials() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserChecker.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserChecker.php new file mode 100644 index 0000000000000000000000000000000000000000..ac577a37ba0cafd8d68294b7957dd37417cfbbbb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserChecker.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\User; + +use Symfony\Component\Security\Core\Exception\CredentialsExpiredException; +use Symfony\Component\Security\Core\Exception\LockedException; +use Symfony\Component\Security\Core\Exception\DisabledException; +use Symfony\Component\Security\Core\Exception\AccountExpiredException; + +/** + * UserChecker checks the user account flags. + * + * @author Fabien Potencier + */ +class UserChecker implements UserCheckerInterface +{ + /** + * {@inheritdoc} + */ + public function checkPreAuth(UserInterface $user) + { + if (!$user instanceof AdvancedUserInterface) { + return; + } + + if (!$user->isAccountNonLocked()) { + $ex = new LockedException('User account is locked.'); + $ex->setUser($user); + throw $ex; + } + + if (!$user->isEnabled()) { + $ex = new DisabledException('User account is disabled.'); + $ex->setUser($user); + throw $ex; + } + + if (!$user->isAccountNonExpired()) { + $ex = new AccountExpiredException('User account has expired.'); + $ex->setUser($user); + throw $ex; + } + } + + /** + * {@inheritdoc} + */ + public function checkPostAuth(UserInterface $user) + { + if (!$user instanceof AdvancedUserInterface) { + return; + } + + if (!$user->isCredentialsNonExpired()) { + $ex = new CredentialsExpiredException('User credentials have expired.'); + $ex->setUser($user); + throw $ex; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserCheckerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserCheckerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..62ea9f0b05e8fd641b1a66c3516e3748226b3ad7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserCheckerInterface.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\Component\Security\Core\User; + +use Symfony\Component\Security\Core\Exception\AccountStatusException; + +/** + * Implement to throw AccountStatusException during the authentication process. + * + * Can be used when you want to check the account status, e.g when the account is + * disabled or blocked. This should not be used to make authentication decisions. + * + * @author Fabien Potencier + */ +interface UserCheckerInterface +{ + /** + * Checks the user account before authentication. + * + * @param UserInterface $user a UserInterface instance + * + * @throws AccountStatusException + */ + public function checkPreAuth(UserInterface $user); + + /** + * Checks the user account after authentication. + * + * @param UserInterface $user a UserInterface instance + * + * @throws AccountStatusException + */ + public function checkPostAuth(UserInterface $user); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..747884282dcaaf3045cc5812480da6614f1cd2db --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserInterface.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\User; + +use Symfony\Component\Security\Core\Role\Role; + +/** + * Represents the interface that all user classes must implement. + * + * This interface is useful because the authentication layer can deal with + * the object through its lifecycle, using the object to get the encoded + * password (for checking against a submitted password), assigning roles + * and so on. + * + * Regardless of how your user are loaded or where they come from (a database, + * configuration, web service, etc), you will have a class that implements + * this interface. Objects that implement this interface are created and + * loaded by different objects that implement UserProviderInterface + * + * @see UserProviderInterface + * @see AdvancedUserInterface + * + * @author Fabien Potencier + */ +interface UserInterface +{ + /** + * Returns the roles granted to the user. + * + * + * public function getRoles() + * { + * return array('ROLE_USER'); + * } + * + * + * Alternatively, the roles might be stored on a ``roles`` property, + * and populated in any number of different ways when the user object + * is created. + * + * @return (Role|string)[] The user roles + */ + public function getRoles(); + + /** + * Returns the password used to authenticate the user. + * + * This should be the encoded password. On authentication, a plain-text + * password will be salted, encoded, and then compared to this value. + * + * @return string The password + */ + public function getPassword(); + + /** + * Returns the salt that was originally used to encode the password. + * + * This can return null if the password was not encoded using a salt. + * + * @return string|null The salt + */ + public function getSalt(); + + /** + * Returns the username used to authenticate the user. + * + * @return string The username + */ + public function getUsername(); + + /** + * Removes sensitive data from the user. + * + * This is important if, at any given point, sensitive information like + * the plain-text password is stored on this object. + */ + public function eraseCredentials(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserProviderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserProviderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..146ed65ad303d772aeb4f7e7060f1eb1e72e4060 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/UserProviderInterface.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\User; + +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Exception\UnsupportedUserException; + +/** + * Represents a class that loads UserInterface objects from some source for the authentication system. + * + * In a typical authentication configuration, a username (i.e. some unique + * user identifier) credential enters the system (via form login, or any + * method). The user provider that is configured with that authentication + * method is asked to load the UserInterface object for the given username + * (via loadUserByUsername) so that the rest of the process can continue. + * + * Internally, a user provider can load users from any source (databases, + * configuration, web service). This is totally independent of how the authentication + * information is submitted or what the UserInterface object looks like. + * + * @see UserInterface + * + * @author Fabien Potencier + */ +interface UserProviderInterface +{ + /** + * Loads the user for the given username. + * + * This method must throw UsernameNotFoundException if the user is not + * found. + * + * @param string $username The username + * + * @return UserInterface + * + * @throws UsernameNotFoundException if the user is not found + */ + public function loadUserByUsername($username); + + /** + * Refreshes the user for the account interface. + * + * It is up to the implementation to decide if the user data should be + * totally reloaded (e.g. from the database), or if the UserInterface + * object can just be merged into some internal array of users / identity + * map. + * + * @param UserInterface $user + * + * @return UserInterface + * + * @throws UnsupportedUserException if the account is not supported + */ + public function refreshUser(UserInterface $user); + + /** + * Whether this provider supports the given user class. + * + * @param string $class + * + * @return bool + */ + public function supportsClass($class); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php new file mode 100644 index 0000000000000000000000000000000000000000..35537b338ad49f3389ea1a281671f3a93ee10ce7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.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\Component\Security\Core\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + */ +class UserPassword extends Constraint +{ + public $message = 'This value should be the user\'s current password.'; + public $service = 'security.validator.user_password'; + + /** + * {@inheritdoc} + */ + public function validatedBy() + { + return $this->service; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..2dc7fee49992e451666845ae53dae68e8cfac107 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Validator\Constraints; + +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +class UserPasswordValidator extends ConstraintValidator +{ + private $tokenStorage; + private $encoderFactory; + + public function __construct(TokenStorageInterface $tokenStorage, EncoderFactoryInterface $encoderFactory) + { + $this->tokenStorage = $tokenStorage; + $this->encoderFactory = $encoderFactory; + } + + /** + * {@inheritdoc} + */ + public function validate($password, Constraint $constraint) + { + if (!$constraint instanceof UserPassword) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\UserPassword'); + } + + $user = $this->tokenStorage->getToken()->getUser(); + + if (!$user instanceof UserInterface) { + throw new ConstraintDefinitionException('The User object must implement the UserInterface interface.'); + } + + $encoder = $this->encoderFactory->getEncoder($user); + + if (!$encoder->isPasswordValid($user->getPassword(), $password, $user->getSalt())) { + $this->context->addViolation($constraint->message); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..06f56ce074ddc988edfcf4f4c73e5ae0ceb9375f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/composer.json @@ -0,0 +1,50 @@ +{ + "name": "symfony/security-core", + "type": "library", + "description": "Symfony Security Component - Core Library", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-php56": "~1.0", + "symfony/polyfill-util": "~1.0" + }, + "require-dev": { + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/ldap": "~3.1", + "symfony/validator": "^2.8.18|^3.2.5", + "psr/log": "~1.0" + }, + "suggest": { + "symfony/event-dispatcher": "", + "symfony/http-foundation": "", + "symfony/validator": "For using the user password constraint", + "symfony/expression-language": "For using the expression voter", + "symfony/ldap": "For using LDAP integration" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Security\\Core\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Core/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..2dc341abcba028552692d7394bbe2ea3db79ce72 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Core/phpunit.xml.dist @@ -0,0 +1,34 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/CsrfToken.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/CsrfToken.php new file mode 100644 index 0000000000000000000000000000000000000000..9ccaaebf2df1e096e35fff1d7cc052a1d2a6e85b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/CsrfToken.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Csrf; + +/** + * A CSRF token. + * + * @author Bernhard Schussek + */ +class CsrfToken +{ + /** + * @var string + */ + private $id; + + /** + * @var string + */ + private $value; + + /** + * Constructor. + * + * @param string $id The token ID + * @param string $value The actual token value + */ + public function __construct($id, $value) + { + $this->id = (string) $id; + $this->value = (string) $value; + } + + /** + * Returns the ID of the CSRF token. + * + * @return string The token ID + */ + public function getId() + { + return $this->id; + } + + /** + * Returns the value of the CSRF token. + * + * @return string The token value + */ + public function getValue() + { + return $this->value; + } + + /** + * Returns the value of the CSRF token. + * + * @return string The token value + */ + public function __toString() + { + return $this->value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php new file mode 100644 index 0000000000000000000000000000000000000000..cdda543cc0aeda73d05e7f8ee4bc363c2ebebcc4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/CsrfTokenManager.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\Component\Security\Csrf; + +use Symfony\Component\Security\Csrf\TokenGenerator\UriSafeTokenGenerator; +use Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface; +use Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage; +use Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface; + +/** + * Default implementation of {@link CsrfTokenManagerInterface}. + * + * @author Bernhard Schussek + */ +class CsrfTokenManager implements CsrfTokenManagerInterface +{ + /** + * @var TokenGeneratorInterface + */ + private $generator; + + /** + * @var TokenStorageInterface + */ + private $storage; + + /** + * Creates a new CSRF provider using PHP's native session storage. + * + * @param TokenGeneratorInterface|null $generator The token generator + * @param TokenStorageInterface|null $storage The storage for storing + * generated CSRF tokens + */ + public function __construct(TokenGeneratorInterface $generator = null, TokenStorageInterface $storage = null) + { + $this->generator = $generator ?: new UriSafeTokenGenerator(); + $this->storage = $storage ?: new NativeSessionTokenStorage(); + } + + /** + * {@inheritdoc} + */ + public function getToken($tokenId) + { + if ($this->storage->hasToken($tokenId)) { + $value = $this->storage->getToken($tokenId); + } else { + $value = $this->generator->generateToken(); + + $this->storage->setToken($tokenId, $value); + } + + return new CsrfToken($tokenId, $value); + } + + /** + * {@inheritdoc} + */ + public function refreshToken($tokenId) + { + $value = $this->generator->generateToken(); + + $this->storage->setToken($tokenId, $value); + + return new CsrfToken($tokenId, $value); + } + + /** + * {@inheritdoc} + */ + public function removeToken($tokenId) + { + return $this->storage->removeToken($tokenId); + } + + /** + * {@inheritdoc} + */ + public function isTokenValid(CsrfToken $token) + { + if (!$this->storage->hasToken($token->getId())) { + return false; + } + + return hash_equals($this->storage->getToken($token->getId()), $token->getValue()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5936b6440e4d0400d70d647bf9a25ba14d81c96e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Csrf; + +/** + * Manages CSRF tokens. + * + * @author Bernhard Schussek + */ +interface CsrfTokenManagerInterface +{ + /** + * Returns a CSRF token for the given ID. + * + * If previously no token existed for the given ID, a new token is + * generated. Otherwise the existing token is returned (with the same value, + * not the same instance). + * + * @param string $tokenId The token ID. You may choose an arbitrary value + * for the ID + * + * @return CsrfToken The CSRF token + */ + public function getToken($tokenId); + + /** + * Generates a new token value for the given ID. + * + * This method will generate a new token for the given token ID, independent + * of whether a token value previously existed or not. It can be used to + * enforce once-only tokens in environments with high security needs. + * + * @param string $tokenId The token ID. You may choose an arbitrary value + * for the ID + * + * @return CsrfToken The CSRF token + */ + public function refreshToken($tokenId); + + /** + * Invalidates the CSRF token with the given ID, if one exists. + * + * @param string $tokenId The token ID + * + * @return string|null Returns the removed token value if one existed, NULL + * otherwise + */ + public function removeToken($tokenId); + + /** + * Returns whether the given CSRF token is valid. + * + * @param CsrfToken $token A CSRF token + * + * @return bool Returns true if the token is valid, false otherwise + */ + public function isTokenValid(CsrfToken $token); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Exception/TokenNotFoundException.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Exception/TokenNotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..936afdeb113e4422f652468fd5a74dbc62c73d69 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Exception/TokenNotFoundException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Csrf\Exception; + +use Symfony\Component\Security\Core\Exception\RuntimeException; + +/** + * @author Bernhard Schussek + */ +class TokenNotFoundException extends RuntimeException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/README.md b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/README.md new file mode 100644 index 0000000000000000000000000000000000000000..aff72a0c32240ac9c8f6acf06dc701a5a2228ec6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/README.md @@ -0,0 +1,14 @@ +Security Component - CSRF +========================= + +The Security CSRF (cross-site request forgery) component provides a class +`CsrfTokenManager` for generating and validating CSRF tokens. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/security/index.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/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9ce35f4dea1237d27b622ca97c04724750597a72 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php @@ -0,0 +1,165 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Csrf\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Csrf\CsrfToken; +use Symfony\Component\Security\Csrf\CsrfTokenManager; + +/** + * @author Bernhard Schussek + */ +class CsrfTokenManagerTest extends TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $generator; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $storage; + + /** + * @var CsrfTokenManager + */ + private $manager; + + protected function setUp() + { + $this->generator = $this->getMockBuilder('Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface')->getMock(); + $this->storage = $this->getMockBuilder('Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface')->getMock(); + $this->manager = new CsrfTokenManager($this->generator, $this->storage); + } + + protected function tearDown() + { + $this->generator = null; + $this->storage = null; + $this->manager = null; + } + + public function testGetNonExistingToken() + { + $this->storage->expects($this->once()) + ->method('hasToken') + ->with('token_id') + ->will($this->returnValue(false)); + + $this->generator->expects($this->once()) + ->method('generateToken') + ->will($this->returnValue('TOKEN')); + + $this->storage->expects($this->once()) + ->method('setToken') + ->with('token_id', 'TOKEN'); + + $token = $this->manager->getToken('token_id'); + + $this->assertInstanceOf('Symfony\Component\Security\Csrf\CsrfToken', $token); + $this->assertSame('token_id', $token->getId()); + $this->assertSame('TOKEN', $token->getValue()); + } + + public function testUseExistingTokenIfAvailable() + { + $this->storage->expects($this->once()) + ->method('hasToken') + ->with('token_id') + ->will($this->returnValue(true)); + + $this->storage->expects($this->once()) + ->method('getToken') + ->with('token_id') + ->will($this->returnValue('TOKEN')); + + $token = $this->manager->getToken('token_id'); + + $this->assertInstanceOf('Symfony\Component\Security\Csrf\CsrfToken', $token); + $this->assertSame('token_id', $token->getId()); + $this->assertSame('TOKEN', $token->getValue()); + } + + public function testRefreshTokenAlwaysReturnsNewToken() + { + $this->storage->expects($this->never()) + ->method('hasToken'); + + $this->generator->expects($this->once()) + ->method('generateToken') + ->will($this->returnValue('TOKEN')); + + $this->storage->expects($this->once()) + ->method('setToken') + ->with('token_id', 'TOKEN'); + + $token = $this->manager->refreshToken('token_id'); + + $this->assertInstanceOf('Symfony\Component\Security\Csrf\CsrfToken', $token); + $this->assertSame('token_id', $token->getId()); + $this->assertSame('TOKEN', $token->getValue()); + } + + public function testMatchingTokenIsValid() + { + $this->storage->expects($this->once()) + ->method('hasToken') + ->with('token_id') + ->will($this->returnValue(true)); + + $this->storage->expects($this->once()) + ->method('getToken') + ->with('token_id') + ->will($this->returnValue('TOKEN')); + + $this->assertTrue($this->manager->isTokenValid(new CsrfToken('token_id', 'TOKEN'))); + } + + public function testNonMatchingTokenIsNotValid() + { + $this->storage->expects($this->once()) + ->method('hasToken') + ->with('token_id') + ->will($this->returnValue(true)); + + $this->storage->expects($this->once()) + ->method('getToken') + ->with('token_id') + ->will($this->returnValue('TOKEN')); + + $this->assertFalse($this->manager->isTokenValid(new CsrfToken('token_id', 'FOOBAR'))); + } + + public function testNonExistingTokenIsNotValid() + { + $this->storage->expects($this->once()) + ->method('hasToken') + ->with('token_id') + ->will($this->returnValue(false)); + + $this->storage->expects($this->never()) + ->method('getToken'); + + $this->assertFalse($this->manager->isTokenValid(new CsrfToken('token_id', 'FOOBAR'))); + } + + public function testRemoveToken() + { + $this->storage->expects($this->once()) + ->method('removeToken') + ->with('token_id') + ->will($this->returnValue('REMOVED_TOKEN')); + + $this->assertSame('REMOVED_TOKEN', $this->manager->removeToken('token_id')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..07f85c221432dba9389c78ac9788c1bf4105acc2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Csrf\Tests\TokenGenerator; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Csrf\TokenGenerator\UriSafeTokenGenerator; + +/** + * @author Bernhard Schussek + */ +class UriSafeTokenGeneratorTest extends TestCase +{ + const ENTROPY = 1000; + + /** + * A non alpha-numeric byte string. + * + * @var string + */ + private static $bytes; + + /** + * @var UriSafeTokenGenerator + */ + private $generator; + + public static function setUpBeforeClass() + { + self::$bytes = base64_decode('aMf+Tct/RLn2WQ=='); + } + + protected function setUp() + { + $this->generator = new UriSafeTokenGenerator(self::ENTROPY); + } + + protected function tearDown() + { + $this->generator = null; + } + + public function testGenerateToken() + { + $token = $this->generator->generateToken(); + + $this->assertTrue(ctype_print($token), 'is printable'); + $this->assertStringNotMatchesFormat('%S+%S', $token, 'is URI safe'); + $this->assertStringNotMatchesFormat('%S/%S', $token, 'is URI safe'); + $this->assertStringNotMatchesFormat('%S=%S', $token, 'is URI safe'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8347585a463c5dd8ba9eeeaa7f7b547186e7c318 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Csrf\Tests\TokenStorage; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage; + +/** + * @author Bernhard Schussek + * + * @runTestsInSeparateProcesses + * @preserveGlobalState disabled + */ +class NativeSessionTokenStorageTest extends TestCase +{ + const SESSION_NAMESPACE = 'foobar'; + + /** + * @var NativeSessionTokenStorage + */ + private $storage; + + public static function setUpBeforeClass() + { + ini_set('session.save_handler', 'files'); + ini_set('session.save_path', sys_get_temp_dir()); + + parent::setUpBeforeClass(); + } + + protected function setUp() + { + $_SESSION = array(); + + $this->storage = new NativeSessionTokenStorage(self::SESSION_NAMESPACE); + } + + public function testStoreTokenInClosedSession() + { + $this->storage->setToken('token_id', 'TOKEN'); + + $this->assertSame(array(self::SESSION_NAMESPACE => array('token_id' => 'TOKEN')), $_SESSION); + } + + public function testStoreTokenInClosedSessionWithExistingSessionId() + { + session_id('foobar'); + + $this->assertSame(PHP_SESSION_NONE, session_status()); + + $this->storage->setToken('token_id', 'TOKEN'); + + $this->assertSame(PHP_SESSION_ACTIVE, session_status()); + $this->assertSame(array(self::SESSION_NAMESPACE => array('token_id' => 'TOKEN')), $_SESSION); + } + + public function testStoreTokenInActiveSession() + { + session_start(); + + $this->storage->setToken('token_id', 'TOKEN'); + + $this->assertSame(array(self::SESSION_NAMESPACE => array('token_id' => 'TOKEN')), $_SESSION); + } + + /** + * @depends testStoreTokenInClosedSession + */ + public function testCheckToken() + { + $this->assertFalse($this->storage->hasToken('token_id')); + + $this->storage->setToken('token_id', 'TOKEN'); + + $this->assertTrue($this->storage->hasToken('token_id')); + } + + /** + * @depends testStoreTokenInClosedSession + */ + public function testGetExistingToken() + { + $this->storage->setToken('token_id', 'TOKEN'); + + $this->assertSame('TOKEN', $this->storage->getToken('token_id')); + } + + /** + * @expectedException \Symfony\Component\Security\Csrf\Exception\TokenNotFoundException + */ + public function testGetNonExistingToken() + { + $this->storage->getToken('token_id'); + } + + /** + * @depends testCheckToken + */ + public function testRemoveNonExistingToken() + { + $this->assertNull($this->storage->removeToken('token_id')); + $this->assertFalse($this->storage->hasToken('token_id')); + } + + /** + * @depends testCheckToken + */ + public function testRemoveExistingToken() + { + $this->storage->setToken('token_id', 'TOKEN'); + + $this->assertSame('TOKEN', $this->storage->removeToken('token_id')); + $this->assertFalse($this->storage->hasToken('token_id')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c629ca15255ffe210a7bbd604ed5d918b88871f6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php @@ -0,0 +1,259 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Csrf\Tests\TokenStorage; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage; + +/** + * @author Bernhard Schussek + */ +class SessionTokenStorageTest extends TestCase +{ + const SESSION_NAMESPACE = 'foobar'; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $session; + + /** + * @var SessionTokenStorage + */ + private $storage; + + protected function setUp() + { + $this->session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface') + ->disableOriginalConstructor() + ->getMock(); + $this->storage = new SessionTokenStorage($this->session, self::SESSION_NAMESPACE); + } + + public function testStoreTokenInClosedSession() + { + $this->session->expects($this->any()) + ->method('isStarted') + ->will($this->returnValue(false)); + + $this->session->expects($this->once()) + ->method('start'); + + $this->session->expects($this->once()) + ->method('set') + ->with(self::SESSION_NAMESPACE.'/token_id', 'TOKEN'); + + $this->storage->setToken('token_id', 'TOKEN'); + } + + public function testStoreTokenInActiveSession() + { + $this->session->expects($this->any()) + ->method('isStarted') + ->will($this->returnValue(true)); + + $this->session->expects($this->never()) + ->method('start'); + + $this->session->expects($this->once()) + ->method('set') + ->with(self::SESSION_NAMESPACE.'/token_id', 'TOKEN'); + + $this->storage->setToken('token_id', 'TOKEN'); + } + + public function testCheckTokenInClosedSession() + { + $this->session->expects($this->any()) + ->method('isStarted') + ->will($this->returnValue(false)); + + $this->session->expects($this->once()) + ->method('start'); + + $this->session->expects($this->once()) + ->method('has') + ->with(self::SESSION_NAMESPACE.'/token_id') + ->will($this->returnValue('RESULT')); + + $this->assertSame('RESULT', $this->storage->hasToken('token_id')); + } + + public function testCheckTokenInActiveSession() + { + $this->session->expects($this->any()) + ->method('isStarted') + ->will($this->returnValue(true)); + + $this->session->expects($this->never()) + ->method('start'); + + $this->session->expects($this->once()) + ->method('has') + ->with(self::SESSION_NAMESPACE.'/token_id') + ->will($this->returnValue('RESULT')); + + $this->assertSame('RESULT', $this->storage->hasToken('token_id')); + } + + public function testGetExistingTokenFromClosedSession() + { + $this->session->expects($this->any()) + ->method('isStarted') + ->will($this->returnValue(false)); + + $this->session->expects($this->once()) + ->method('start'); + + $this->session->expects($this->once()) + ->method('has') + ->with(self::SESSION_NAMESPACE.'/token_id') + ->will($this->returnValue(true)); + + $this->session->expects($this->once()) + ->method('get') + ->with(self::SESSION_NAMESPACE.'/token_id') + ->will($this->returnValue('RESULT')); + + $this->assertSame('RESULT', $this->storage->getToken('token_id')); + } + + public function testGetExistingTokenFromActiveSession() + { + $this->session->expects($this->any()) + ->method('isStarted') + ->will($this->returnValue(true)); + + $this->session->expects($this->never()) + ->method('start'); + + $this->session->expects($this->once()) + ->method('has') + ->with(self::SESSION_NAMESPACE.'/token_id') + ->will($this->returnValue(true)); + + $this->session->expects($this->once()) + ->method('get') + ->with(self::SESSION_NAMESPACE.'/token_id') + ->will($this->returnValue('RESULT')); + + $this->assertSame('RESULT', $this->storage->getToken('token_id')); + } + + /** + * @expectedException \Symfony\Component\Security\Csrf\Exception\TokenNotFoundException + */ + public function testGetNonExistingTokenFromClosedSession() + { + $this->session->expects($this->any()) + ->method('isStarted') + ->will($this->returnValue(false)); + + $this->session->expects($this->once()) + ->method('start'); + + $this->session->expects($this->once()) + ->method('has') + ->with(self::SESSION_NAMESPACE.'/token_id') + ->will($this->returnValue(false)); + + $this->storage->getToken('token_id'); + } + + /** + * @expectedException \Symfony\Component\Security\Csrf\Exception\TokenNotFoundException + */ + public function testGetNonExistingTokenFromActiveSession() + { + $this->session->expects($this->any()) + ->method('isStarted') + ->will($this->returnValue(true)); + + $this->session->expects($this->never()) + ->method('start'); + + $this->session->expects($this->once()) + ->method('has') + ->with(self::SESSION_NAMESPACE.'/token_id') + ->will($this->returnValue(false)); + + $this->storage->getToken('token_id'); + } + + public function testRemoveNonExistingTokenFromClosedSession() + { + $this->session->expects($this->any()) + ->method('isStarted') + ->will($this->returnValue(false)); + + $this->session->expects($this->once()) + ->method('start'); + + $this->session->expects($this->once()) + ->method('remove') + ->with(self::SESSION_NAMESPACE.'/token_id') + ->will($this->returnValue(null)); + + $this->assertNull($this->storage->removeToken('token_id')); + } + + public function testRemoveNonExistingTokenFromActiveSession() + { + $this->session->expects($this->any()) + ->method('isStarted') + ->will($this->returnValue(true)); + + $this->session->expects($this->never()) + ->method('start'); + + $this->session->expects($this->once()) + ->method('remove') + ->with(self::SESSION_NAMESPACE.'/token_id') + ->will($this->returnValue(null)); + + $this->assertNull($this->storage->removeToken('token_id')); + } + + public function testRemoveExistingTokenFromClosedSession() + { + $this->session->expects($this->any()) + ->method('isStarted') + ->will($this->returnValue(false)); + + $this->session->expects($this->once()) + ->method('start'); + + $this->session->expects($this->once()) + ->method('remove') + ->with(self::SESSION_NAMESPACE.'/token_id') + ->will($this->returnValue('TOKEN')); + + $this->assertSame('TOKEN', $this->storage->removeToken('token_id')); + } + + public function testRemoveExistingTokenFromActiveSession() + { + $this->session->expects($this->any()) + ->method('isStarted') + ->will($this->returnValue(true)); + + $this->session->expects($this->never()) + ->method('start'); + + $this->session->expects($this->once()) + ->method('remove') + ->with(self::SESSION_NAMESPACE.'/token_id') + ->will($this->returnValue('TOKEN')); + + $this->assertSame('TOKEN', $this->storage->removeToken('token_id')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenGenerator/TokenGeneratorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenGenerator/TokenGeneratorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..0ec2881774b93775be75e2e9fb3482a70bae4741 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenGenerator/TokenGeneratorInterface.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\Security\Csrf\TokenGenerator; + +/** + * Generates CSRF tokens. + * + * @author Bernhard Schussek + */ +interface TokenGeneratorInterface +{ + /** + * Generates a CSRF token. + * + * @return string The generated CSRF token + */ + public function generateToken(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenGenerator/UriSafeTokenGenerator.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenGenerator/UriSafeTokenGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..fb3f7e8339dcf38feca0dd8ff76b795b0bf5bcfc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenGenerator/UriSafeTokenGenerator.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Csrf\TokenGenerator; + +/** + * Generates CSRF tokens. + * + * @author Bernhard Schussek + */ +class UriSafeTokenGenerator implements TokenGeneratorInterface +{ + /** + * The amount of entropy collected for each token (in bits). + * + * @var int + */ + private $entropy; + + /** + * Generates URI-safe CSRF tokens. + * + * @param int $entropy The amount of entropy collected for each token (in bits) + */ + public function __construct($entropy = 256) + { + $this->entropy = $entropy; + } + + /** + * {@inheritdoc} + */ + public function generateToken() + { + // Generate an URI safe base64 encoded string that does not contain "+", + // "/" or "=" which need to be URL encoded and make URLs unnecessarily + // longer. + $bytes = random_bytes($this->entropy / 8); + + return rtrim(strtr(base64_encode($bytes), '+/', '-_'), '='); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php new file mode 100644 index 0000000000000000000000000000000000000000..5ce2774114737e2a6481d02cfa73339dcf22a3a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Csrf\TokenStorage; + +use Symfony\Component\Security\Csrf\Exception\TokenNotFoundException; + +/** + * Token storage that uses PHP's native session handling. + * + * @author Bernhard Schussek + */ +class NativeSessionTokenStorage implements TokenStorageInterface +{ + /** + * The namespace used to store values in the session. + * + * @var string + */ + const SESSION_NAMESPACE = '_csrf'; + + /** + * @var bool + */ + private $sessionStarted = false; + + /** + * @var string + */ + private $namespace; + + /** + * Initializes the storage with a session namespace. + * + * @param string $namespace The namespace under which the token is stored + * in the session + */ + public function __construct($namespace = self::SESSION_NAMESPACE) + { + $this->namespace = $namespace; + } + + /** + * {@inheritdoc} + */ + public function getToken($tokenId) + { + if (!$this->sessionStarted) { + $this->startSession(); + } + + if (!isset($_SESSION[$this->namespace][$tokenId])) { + throw new TokenNotFoundException('The CSRF token with ID '.$tokenId.' does not exist.'); + } + + return (string) $_SESSION[$this->namespace][$tokenId]; + } + + /** + * {@inheritdoc} + */ + public function setToken($tokenId, $token) + { + if (!$this->sessionStarted) { + $this->startSession(); + } + + $_SESSION[$this->namespace][$tokenId] = (string) $token; + } + + /** + * {@inheritdoc} + */ + public function hasToken($tokenId) + { + if (!$this->sessionStarted) { + $this->startSession(); + } + + return isset($_SESSION[$this->namespace][$tokenId]); + } + + /** + * {@inheritdoc} + */ + public function removeToken($tokenId) + { + if (!$this->sessionStarted) { + $this->startSession(); + } + + $token = isset($_SESSION[$this->namespace][$tokenId]) + ? (string) $_SESSION[$this->namespace][$tokenId] + : null; + + unset($_SESSION[$this->namespace][$tokenId]); + + return $token; + } + + private function startSession() + { + if (PHP_SESSION_NONE === session_status()) { + session_start(); + } + + $this->sessionStarted = true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php new file mode 100644 index 0000000000000000000000000000000000000000..37b33e6f2161b086ecf9f0e9963b53fe1be51978 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Csrf\TokenStorage; + +use Symfony\Component\HttpFoundation\Session\SessionInterface; +use Symfony\Component\Security\Csrf\Exception\TokenNotFoundException; + +/** + * Token storage that uses a Symfony Session object. + * + * @author Bernhard Schussek + */ +class SessionTokenStorage implements TokenStorageInterface +{ + /** + * The namespace used to store values in the session. + * + * @var string + */ + const SESSION_NAMESPACE = '_csrf'; + + /** + * The user session from which the session ID is returned. + * + * @var SessionInterface + */ + private $session; + + /** + * @var string + */ + private $namespace; + + /** + * Initializes the storage with a Session object and a session namespace. + * + * @param SessionInterface $session The user session + * @param string $namespace The namespace under which the token + * is stored in the session + */ + public function __construct(SessionInterface $session, $namespace = self::SESSION_NAMESPACE) + { + $this->session = $session; + $this->namespace = $namespace; + } + + /** + * {@inheritdoc} + */ + public function getToken($tokenId) + { + if (!$this->session->isStarted()) { + $this->session->start(); + } + + if (!$this->session->has($this->namespace.'/'.$tokenId)) { + throw new TokenNotFoundException('The CSRF token with ID '.$tokenId.' does not exist.'); + } + + return (string) $this->session->get($this->namespace.'/'.$tokenId); + } + + /** + * {@inheritdoc} + */ + public function setToken($tokenId, $token) + { + if (!$this->session->isStarted()) { + $this->session->start(); + } + + $this->session->set($this->namespace.'/'.$tokenId, (string) $token); + } + + /** + * {@inheritdoc} + */ + public function hasToken($tokenId) + { + if (!$this->session->isStarted()) { + $this->session->start(); + } + + return $this->session->has($this->namespace.'/'.$tokenId); + } + + /** + * {@inheritdoc} + */ + public function removeToken($tokenId) + { + if (!$this->session->isStarted()) { + $this->session->start(); + } + + return $this->session->remove($this->namespace.'/'.$tokenId); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenStorage/TokenStorageInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenStorage/TokenStorageInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..92386fbbda34f2f02a91422b2ab755d2b65a8ba9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenStorage/TokenStorageInterface.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\Component\Security\Csrf\TokenStorage; + +/** + * Stores CSRF tokens. + * + * @author Bernhard Schussek + */ +interface TokenStorageInterface +{ + /** + * Reads a stored CSRF token. + * + * @param string $tokenId The token ID + * + * @return string The stored token + * + * @throws \Symfony\Component\Security\Csrf\Exception\TokenNotFoundException If the token ID does not exist + */ + public function getToken($tokenId); + + /** + * Stores a CSRF token. + * + * @param string $tokenId The token ID + * @param string $token The CSRF token + */ + public function setToken($tokenId, $token); + + /** + * Removes a CSRF token. + * + * @param string $tokenId The token ID + * + * @return string|null Returns the removed token if one existed, NULL + * otherwise + */ + public function removeToken($tokenId); + + /** + * Checks whether a token with the given token ID exists. + * + * @param string $tokenId The token ID + * + * @return bool Whether a token exists with the given ID + */ + public function hasToken($tokenId); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..4047fd5435a879475369a1274003e3da59a9c007 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/composer.json @@ -0,0 +1,42 @@ +{ + "name": "symfony/security-csrf", + "type": "library", + "description": "Symfony Security Component - CSRF Library", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-php56": "~1.0", + "symfony/polyfill-php70": "~1.0", + "symfony/security-core": "~2.8|~3.0" + }, + "require-dev": { + "symfony/http-foundation": "~2.8|~3.0" + }, + "suggest": { + "symfony/http-foundation": "For using the class SessionTokenStorage." + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Security\\Csrf\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..f5b1e65c7192ae030b2ff76c934808c632f39da9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/phpunit.xml.dist @@ -0,0 +1,33 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/AbstractGuardAuthenticator.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/AbstractGuardAuthenticator.php new file mode 100644 index 0000000000000000000000000000000000000000..609d772e194b4214672c70aa59bc48ef1541e4e2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/AbstractGuardAuthenticator.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Guard; + +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken; + +/** + * An optional base class that creates a PostAuthenticationGuardToken for you. + * + * @author Ryan Weaver + */ +abstract class AbstractGuardAuthenticator implements GuardAuthenticatorInterface +{ + /** + * Shortcut to create a PostAuthenticationGuardToken for you, if you don't really + * care about which authenticated token you're using. + * + * @param UserInterface $user + * @param string $providerKey + * + * @return PostAuthenticationGuardToken + */ + public function createAuthenticatedToken(UserInterface $user, $providerKey) + { + return new PostAuthenticationGuardToken( + $user, + $providerKey, + $user->getRoles() + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Authenticator/AbstractFormLoginAuthenticator.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Authenticator/AbstractFormLoginAuthenticator.php new file mode 100644 index 0000000000000000000000000000000000000000..f99900b175ef47029deb6bbb46a821ce567c2220 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Authenticator/AbstractFormLoginAuthenticator.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Guard\Authenticator; + +use Symfony\Component\HttpFoundation\Session\SessionInterface; +use Symfony\Component\Security\Guard\AbstractGuardAuthenticator; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Security; +use Symfony\Component\Security\Http\Util\TargetPathTrait; + +/** + * A base class to make form login authentication easier! + * + * @author Ryan Weaver + */ +abstract class AbstractFormLoginAuthenticator extends AbstractGuardAuthenticator +{ + use TargetPathTrait; + + /** + * Return the URL to the login page. + * + * @return string + */ + abstract protected function getLoginUrl(); + + /** + * Override to change what happens after a bad username/password is submitted. + * + * @param Request $request + * @param AuthenticationException $exception + * + * @return RedirectResponse + */ + public function onAuthenticationFailure(Request $request, AuthenticationException $exception) + { + if ($request->getSession() instanceof SessionInterface) { + $request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception); + } + + $url = $this->getLoginUrl(); + + return new RedirectResponse($url); + } + + /** + * Override to change what happens after successful authentication. + * + * @param Request $request + * @param TokenInterface $token + * @param string $providerKey + * + * @return RedirectResponse + */ + public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey) + { + @trigger_error(sprintf('The AbstractFormLoginAuthenticator::onAuthenticationSuccess() implementation was deprecated in Symfony 3.1 and will be removed in Symfony 4.0. You should implement this method yourself in %s and remove getDefaultSuccessRedirectUrl().', get_class($this)), E_USER_DEPRECATED); + + if (!method_exists($this, 'getDefaultSuccessRedirectUrl')) { + throw new \Exception(sprintf('You must implement onAuthenticationSuccess() or getDefaultSuccessRedirectUrl() in %s.', get_class($this))); + } + + $targetPath = null; + + // if the user hit a secure page and start() was called, this was + // the URL they were on, and probably where you want to redirect to + if ($request->getSession() instanceof SessionInterface) { + $targetPath = $this->getTargetPath($request->getSession(), $providerKey); + } + + if (!$targetPath) { + $targetPath = $this->getDefaultSuccessRedirectUrl(); + } + + return new RedirectResponse($targetPath); + } + + public function supportsRememberMe() + { + return true; + } + + /** + * Override to control what happens when the user hits a secure page + * but isn't logged in yet. + * + * @param Request $request + * @param AuthenticationException|null $authException + * + * @return RedirectResponse + */ + public function start(Request $request, AuthenticationException $authException = null) + { + $url = $this->getLoginUrl(); + + return new RedirectResponse($url); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php new file mode 100644 index 0000000000000000000000000000000000000000..59d5d29c275e1faf818afc7db99447f3eaff1c3d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php @@ -0,0 +1,201 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Guard\Firewall; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\Security\Guard\GuardAuthenticatorHandler; +use Symfony\Component\Security\Guard\Token\PreAuthenticationGuardToken; +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Guard\GuardAuthenticatorInterface; +use Psr\Log\LoggerInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Http\Firewall\ListenerInterface; +use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; + +/** + * Authentication listener for the "guard" system. + * + * @author Ryan Weaver + */ +class GuardAuthenticationListener implements ListenerInterface +{ + private $guardHandler; + private $authenticationManager; + private $providerKey; + private $guardAuthenticators; + private $logger; + private $rememberMeServices; + + /** + * @param GuardAuthenticatorHandler $guardHandler The Guard handler + * @param AuthenticationManagerInterface $authenticationManager An AuthenticationManagerInterface instance + * @param string $providerKey The provider (i.e. firewall) key + * @param GuardAuthenticatorInterface[] $guardAuthenticators The authenticators, with keys that match what's passed to GuardAuthenticationProvider + * @param LoggerInterface $logger A LoggerInterface instance + */ + public function __construct(GuardAuthenticatorHandler $guardHandler, AuthenticationManagerInterface $authenticationManager, $providerKey, array $guardAuthenticators, LoggerInterface $logger = null) + { + if (empty($providerKey)) { + throw new \InvalidArgumentException('$providerKey must not be empty.'); + } + + $this->guardHandler = $guardHandler; + $this->authenticationManager = $authenticationManager; + $this->providerKey = $providerKey; + $this->guardAuthenticators = $guardAuthenticators; + $this->logger = $logger; + } + + /** + * Iterates over each authenticator to see if each wants to authenticate the request. + * + * @param GetResponseEvent $event + */ + public function handle(GetResponseEvent $event) + { + if (null !== $this->logger) { + $this->logger->debug('Checking for guard authentication credentials.', array('firewall_key' => $this->providerKey, 'authenticators' => count($this->guardAuthenticators))); + } + + foreach ($this->guardAuthenticators as $key => $guardAuthenticator) { + // get a key that's unique to *this* guard authenticator + // this MUST be the same as GuardAuthenticationProvider + $uniqueGuardKey = $this->providerKey.'_'.$key; + + $this->executeGuardAuthenticator($uniqueGuardKey, $guardAuthenticator, $event); + + if ($event->hasResponse()) { + if (null !== $this->logger) { + $this->logger->debug('The "{authenticator}" authenticator set the response. Any later authenticator will not be called', array('authenticator' => get_class($guardAuthenticator))); + } + + break; + } + } + } + + private function executeGuardAuthenticator($uniqueGuardKey, GuardAuthenticatorInterface $guardAuthenticator, GetResponseEvent $event) + { + $request = $event->getRequest(); + try { + if (null !== $this->logger) { + $this->logger->debug('Calling getCredentials() on guard configurator.', array('firewall_key' => $this->providerKey, 'authenticator' => get_class($guardAuthenticator))); + } + + // allow the authenticator to fetch authentication info from the request + $credentials = $guardAuthenticator->getCredentials($request); + + // allow null to be returned to skip authentication + if (null === $credentials) { + return; + } + + // create a token with the unique key, so that the provider knows which authenticator to use + $token = new PreAuthenticationGuardToken($credentials, $uniqueGuardKey); + + if (null !== $this->logger) { + $this->logger->debug('Passing guard token information to the GuardAuthenticationProvider', array('firewall_key' => $this->providerKey, 'authenticator' => get_class($guardAuthenticator))); + } + // pass the token into the AuthenticationManager system + // this indirectly calls GuardAuthenticationProvider::authenticate() + $token = $this->authenticationManager->authenticate($token); + + if (null !== $this->logger) { + $this->logger->info('Guard authentication successful!', array('token' => $token, 'authenticator' => get_class($guardAuthenticator))); + } + + // sets the token on the token storage, etc + $this->guardHandler->authenticateWithToken($token, $request); + } catch (AuthenticationException $e) { + // oh no! Authentication failed! + + if (null !== $this->logger) { + $this->logger->info('Guard authentication failed.', array('exception' => $e, 'authenticator' => get_class($guardAuthenticator))); + } + + $response = $this->guardHandler->handleAuthenticationFailure($e, $request, $guardAuthenticator, $this->providerKey); + + if ($response instanceof Response) { + $event->setResponse($response); + } + + return; + } + + // success! + $response = $this->guardHandler->handleAuthenticationSuccess($token, $request, $guardAuthenticator, $this->providerKey); + if ($response instanceof Response) { + if (null !== $this->logger) { + $this->logger->debug('Guard authenticator set success response.', array('response' => $response, 'authenticator' => get_class($guardAuthenticator))); + } + + $event->setResponse($response); + } else { + if (null !== $this->logger) { + $this->logger->debug('Guard authenticator set no success response: request continues.', array('authenticator' => get_class($guardAuthenticator))); + } + } + + // attempt to trigger the remember me functionality + $this->triggerRememberMe($guardAuthenticator, $request, $token, $response); + } + + /** + * Should be called if this listener will support remember me. + * + * @param RememberMeServicesInterface $rememberMeServices + */ + public function setRememberMeServices(RememberMeServicesInterface $rememberMeServices) + { + $this->rememberMeServices = $rememberMeServices; + } + + /** + * Checks to see if remember me is supported in the authenticator and + * on the firewall. If it is, the RememberMeServicesInterface is notified. + * + * @param GuardAuthenticatorInterface $guardAuthenticator + * @param Request $request + * @param TokenInterface $token + * @param Response $response + */ + private function triggerRememberMe(GuardAuthenticatorInterface $guardAuthenticator, Request $request, TokenInterface $token, Response $response = null) + { + if (null === $this->rememberMeServices) { + if (null !== $this->logger) { + $this->logger->debug('Remember me skipped: it is not configured for the firewall.', array('authenticator' => get_class($guardAuthenticator))); + } + + return; + } + + if (!$guardAuthenticator->supportsRememberMe()) { + if (null !== $this->logger) { + $this->logger->debug('Remember me skipped: your authenticator does not support it.', array('authenticator' => get_class($guardAuthenticator))); + } + + return; + } + + if (!$response instanceof Response) { + throw new \LogicException(sprintf( + '%s::onAuthenticationSuccess *must* return a Response if you want to use the remember me functionality. Return a Response, or set remember_me to false under the guard configuration.', + get_class($guardAuthenticator) + )); + } + + $this->rememberMeServices->loginSuccess($request, $response, $token); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..5e1351dcc25eefba1511a274170abe6272285d07 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Guard; + +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken; +use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; +use Symfony\Component\Security\Http\SecurityEvents; + +/** + * A utility class that does much of the *work* during the guard authentication process. + * + * By having the logic here instead of the listener, more of the process + * can be called directly (e.g. for manual authentication) or overridden. + * + * @author Ryan Weaver + */ +class GuardAuthenticatorHandler +{ + private $tokenStorage; + + private $dispatcher; + + public function __construct(TokenStorageInterface $tokenStorage, EventDispatcherInterface $eventDispatcher = null) + { + $this->tokenStorage = $tokenStorage; + $this->dispatcher = $eventDispatcher; + } + + /** + * Authenticates the given token in the system. + * + * @param TokenInterface $token + * @param Request $request + */ + public function authenticateWithToken(TokenInterface $token, Request $request) + { + $this->tokenStorage->setToken($token); + + if (null !== $this->dispatcher) { + $loginEvent = new InteractiveLoginEvent($request, $token); + $this->dispatcher->dispatch(SecurityEvents::INTERACTIVE_LOGIN, $loginEvent); + } + } + + /** + * Returns the "on success" response for the given GuardAuthenticator. + * + * @param TokenInterface $token + * @param Request $request + * @param GuardAuthenticatorInterface $guardAuthenticator + * @param string $providerKey The provider (i.e. firewall) key + * + * @return null|Response + */ + public function handleAuthenticationSuccess(TokenInterface $token, Request $request, GuardAuthenticatorInterface $guardAuthenticator, $providerKey) + { + $response = $guardAuthenticator->onAuthenticationSuccess($request, $token, $providerKey); + + // check that it's a Response or null + if ($response instanceof Response || null === $response) { + return $response; + } + + throw new \UnexpectedValueException(sprintf( + 'The %s::onAuthenticationSuccess method must return null or a Response object. You returned %s.', + get_class($guardAuthenticator), + is_object($response) ? get_class($response) : gettype($response) + )); + } + + /** + * Convenience method for authenticating the user and returning the + * Response *if any* for success. + * + * @param UserInterface $user + * @param Request $request + * @param GuardAuthenticatorInterface $authenticator + * @param string $providerKey The provider (i.e. firewall) key + * + * @return Response|null + */ + public function authenticateUserAndHandleSuccess(UserInterface $user, Request $request, GuardAuthenticatorInterface $authenticator, $providerKey) + { + // create an authenticated token for the User + $token = $authenticator->createAuthenticatedToken($user, $providerKey); + // authenticate this in the system + $this->authenticateWithToken($token, $request); + + // return the success metric + return $this->handleAuthenticationSuccess($token, $request, $authenticator, $providerKey); + } + + /** + * Handles an authentication failure and returns the Response for the + * GuardAuthenticator. + * + * @param AuthenticationException $authenticationException + * @param Request $request + * @param GuardAuthenticatorInterface $guardAuthenticator + * @param string $providerKey The key of the firewall + * + * @return null|Response + */ + public function handleAuthenticationFailure(AuthenticationException $authenticationException, Request $request, GuardAuthenticatorInterface $guardAuthenticator, $providerKey) + { + $token = $this->tokenStorage->getToken(); + if ($token instanceof PostAuthenticationGuardToken && $providerKey === $token->getProviderKey()) { + $this->tokenStorage->setToken(null); + } + + $response = $guardAuthenticator->onAuthenticationFailure($request, $authenticationException); + if ($response instanceof Response || null === $response) { + // returning null is ok, it means they want the request to continue + return $response; + } + + throw new \UnexpectedValueException(sprintf( + 'The %s::onAuthenticationFailure method must return null or a Response object. You returned %s.', + get_class($guardAuthenticator), + is_object($response) ? get_class($response) : gettype($response) + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..fef4a04fb970213117c8e26a75701ba9eab7f386 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php @@ -0,0 +1,160 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Guard; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Component\Security\Guard\Token\GuardTokenInterface; +use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; + +/** + * The interface for all "guard" authenticators. + * + * The methods on this interface are called throughout the guard authentication + * process to give you the power to control most parts of the process from + * one location. + * + * @author Ryan Weaver + */ +interface GuardAuthenticatorInterface extends AuthenticationEntryPointInterface +{ + /** + * Get the authentication credentials from the request and return them + * as any type (e.g. an associate array). If you return null, authentication + * will be skipped. + * + * Whatever value you return here will be passed to getUser() and checkCredentials() + * + * For example, for a form login, you might: + * + * if ($request->request->has('_username')) { + * return array( + * 'username' => $request->request->get('_username'), + * 'password' => $request->request->get('_password'), + * ); + * } else { + * return; + * } + * + * Or for an API token that's on a header, you might use: + * + * return array('api_key' => $request->headers->get('X-API-TOKEN')); + * + * @param Request $request + * + * @return mixed|null + */ + public function getCredentials(Request $request); + + /** + * Return a UserInterface object based on the credentials. + * + * The *credentials* are the return value from getCredentials() + * + * You may throw an AuthenticationException if you wish. If you return + * null, then a UsernameNotFoundException is thrown for you. + * + * @param mixed $credentials + * @param UserProviderInterface $userProvider + * + * @throws AuthenticationException + * + * @return UserInterface|null + */ + public function getUser($credentials, UserProviderInterface $userProvider); + + /** + * Returns true if the credentials are valid. + * + * If any value other than true is returned, authentication will + * fail. You may also throw an AuthenticationException if you wish + * to cause authentication to fail. + * + * The *credentials* are the return value from getCredentials() + * + * @param mixed $credentials + * @param UserInterface $user + * + * @return bool + * + * @throws AuthenticationException + */ + public function checkCredentials($credentials, UserInterface $user); + + /** + * Create an authenticated token for the given user. + * + * If you don't care about which token class is used or don't really + * understand what a "token" is, you can skip this method by extending + * the AbstractGuardAuthenticator class from your authenticator. + * + * @see AbstractGuardAuthenticator + * + * @param UserInterface $user + * @param string $providerKey The provider (i.e. firewall) key + * + * @return GuardTokenInterface + */ + public function createAuthenticatedToken(UserInterface $user, $providerKey); + + /** + * Called when authentication executed, but failed (e.g. wrong username password). + * + * This should return the Response sent back to the user, like a + * RedirectResponse to the login page or a 403 response. + * + * If you return null, the request will continue, but the user will + * not be authenticated. This is probably not what you want to do. + * + * @param Request $request + * @param AuthenticationException $exception + * + * @return Response|null + */ + public function onAuthenticationFailure(Request $request, AuthenticationException $exception); + + /** + * Called when authentication executed and was successful! + * + * This should return the Response sent back to the user, like a + * RedirectResponse to the last page they visited. + * + * If you return null, the current request will continue, and the user + * will be authenticated. This makes sense, for example, with an API. + * + * @param Request $request + * @param TokenInterface $token + * @param string $providerKey The provider (i.e. firewall) key + * + * @return Response|null + */ + public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey); + + /** + * Does this method support remember me cookies? + * + * Remember me cookie will be set if *all* of the following are met: + * A) This method returns true + * B) The remember_me key under your firewall is configured + * C) The "remember me" functionality is activated. This is usually + * done by having a _remember_me checkbox in your form, but + * can be configured by the "always_remember_me" and "remember_me_parameter" + * parameters under the "remember_me" firewall key + * + * @return bool + */ + public function supportsRememberMe(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Provider/GuardAuthenticationProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Provider/GuardAuthenticationProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..2793674dc72e4423dc76e793f398033b0a5ba20d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Provider/GuardAuthenticationProvider.php @@ -0,0 +1,147 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Guard\Provider; + +use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Guard\GuardAuthenticatorInterface; +use Symfony\Component\Security\Guard\Token\GuardTokenInterface; +use Symfony\Component\Security\Guard\Token\PreAuthenticationGuardToken; +use Symfony\Component\Security\Core\User\UserCheckerInterface; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationExpiredException; + +/** + * Responsible for accepting the PreAuthenticationGuardToken and calling + * the correct authenticator to retrieve the authenticated token. + * + * @author Ryan Weaver + */ +class GuardAuthenticationProvider implements AuthenticationProviderInterface +{ + /** + * @var GuardAuthenticatorInterface[] + */ + private $guardAuthenticators; + private $userProvider; + private $providerKey; + private $userChecker; + + /** + * @param GuardAuthenticatorInterface[] $guardAuthenticators The authenticators, with keys that match what's passed to GuardAuthenticationListener + * @param UserProviderInterface $userProvider The user provider + * @param string $providerKey The provider (i.e. firewall) key + * @param UserCheckerInterface $userChecker + */ + public function __construct(array $guardAuthenticators, UserProviderInterface $userProvider, $providerKey, UserCheckerInterface $userChecker) + { + $this->guardAuthenticators = $guardAuthenticators; + $this->userProvider = $userProvider; + $this->providerKey = $providerKey; + $this->userChecker = $userChecker; + } + + /** + * Finds the correct authenticator for the token and calls it. + * + * @param GuardTokenInterface $token + * + * @return TokenInterface + */ + public function authenticate(TokenInterface $token) + { + if (!$this->supports($token)) { + throw new \InvalidArgumentException('GuardAuthenticationProvider only supports GuardTokenInterface.'); + } + + if (!$token instanceof PreAuthenticationGuardToken) { + /* + * The listener *only* passes PreAuthenticationGuardToken instances. + * This means that an authenticated token (e.g. PostAuthenticationGuardToken) + * is being passed here, which happens if that token becomes + * "not authenticated" (e.g. happens if the user changes between + * requests). In this case, the user should be logged out, so + * we will return an AnonymousToken to accomplish that. + */ + + // this should never happen - but technically, the token is + // authenticated... so it could just be returned + if ($token->isAuthenticated()) { + return $token; + } + + // this AccountStatusException causes the user to be logged out + throw new AuthenticationExpiredException(); + } + + // find the *one* GuardAuthenticator that this token originated from + foreach ($this->guardAuthenticators as $key => $guardAuthenticator) { + // get a key that's unique to *this* guard authenticator + // this MUST be the same as GuardAuthenticationListener + $uniqueGuardKey = $this->providerKey.'_'.$key; + + if ($uniqueGuardKey == $token->getGuardProviderKey()) { + return $this->authenticateViaGuard($guardAuthenticator, $token); + } + } + + // no matching authenticator found - but there will be multiple GuardAuthenticationProvider + // instances that will be checked if you have multiple firewalls. + } + + private function authenticateViaGuard(GuardAuthenticatorInterface $guardAuthenticator, PreAuthenticationGuardToken $token) + { + // get the user from the GuardAuthenticator + $user = $guardAuthenticator->getUser($token->getCredentials(), $this->userProvider); + + if (null === $user) { + throw new UsernameNotFoundException(sprintf( + 'Null returned from %s::getUser()', + get_class($guardAuthenticator) + )); + } + + if (!$user instanceof UserInterface) { + throw new \UnexpectedValueException(sprintf( + 'The %s::getUser() method must return a UserInterface. You returned %s.', + get_class($guardAuthenticator), + is_object($user) ? get_class($user) : gettype($user) + )); + } + + $this->userChecker->checkPreAuth($user); + if (true !== $guardAuthenticator->checkCredentials($token->getCredentials(), $user)) { + throw new BadCredentialsException(sprintf('Authentication failed because %s::checkCredentials() did not return true.', get_class($guardAuthenticator))); + } + $this->userChecker->checkPostAuth($user); + + // turn the UserInterface into a TokenInterface + $authenticatedToken = $guardAuthenticator->createAuthenticatedToken($user, $this->providerKey); + if (!$authenticatedToken instanceof TokenInterface) { + throw new \UnexpectedValueException(sprintf( + 'The %s::createAuthenticatedToken() method must return a TokenInterface. You returned %s.', + get_class($guardAuthenticator), + is_object($authenticatedToken) ? get_class($authenticatedToken) : gettype($authenticatedToken) + )); + } + + return $authenticatedToken; + } + + public function supports(TokenInterface $token) + { + return $token instanceof GuardTokenInterface; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/README.md b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ce706223901b3c129466a7b647401fc31898894b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/README.md @@ -0,0 +1,15 @@ +Security Component - Guard +========================== + +The Guard component brings many layers of authentication together, making +it much easier to create complex authentication systems where you have +total control. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/security/index.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/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..77d7194280c1b452337ea23ba93c311cbb5632bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php @@ -0,0 +1,222 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Guard\Tests\Authenticator; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Component\Security\Guard\Authenticator\AbstractFormLoginAuthenticator; + +/** + * @author Jean Pasdeloup + */ +class FormLoginAuthenticatorTest extends TestCase +{ + private $requestWithoutSession; + private $requestWithSession; + private $authenticator; + + const LOGIN_URL = 'http://login'; + const DEFAULT_SUCCESS_URL = 'http://defaultsuccess'; + const CUSTOM_SUCCESS_URL = 'http://customsuccess'; + + public function testAuthenticationFailureWithoutSession() + { + $failureResponse = $this->authenticator->onAuthenticationFailure($this->requestWithoutSession, new AuthenticationException()); + + $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\RedirectResponse', $failureResponse); + $this->assertEquals(self::LOGIN_URL, $failureResponse->getTargetUrl()); + } + + public function testAuthenticationFailureWithSession() + { + $this->requestWithSession->getSession() + ->expects($this->once()) + ->method('set'); + + $failureResponse = $this->authenticator->onAuthenticationFailure($this->requestWithSession, new AuthenticationException()); + + $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\RedirectResponse', $failureResponse); + $this->assertEquals(self::LOGIN_URL, $failureResponse->getTargetUrl()); + } + + /** + * @group legacy + */ + public function testAuthenticationSuccessWithoutSession() + { + $token = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface') + ->disableOriginalConstructor() + ->getMock(); + + $redirectResponse = $this->authenticator->onAuthenticationSuccess($this->requestWithoutSession, $token, 'providerkey'); + + $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\RedirectResponse', $redirectResponse); + $this->assertEquals(self::DEFAULT_SUCCESS_URL, $redirectResponse->getTargetUrl()); + } + + /** + * @group legacy + */ + public function testAuthenticationSuccessWithSessionButEmpty() + { + $token = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface') + ->disableOriginalConstructor() + ->getMock(); + $this->requestWithSession->getSession() + ->expects($this->once()) + ->method('get') + ->will($this->returnValue(null)); + + $redirectResponse = $this->authenticator->onAuthenticationSuccess($this->requestWithSession, $token, 'providerkey'); + + $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\RedirectResponse', $redirectResponse); + $this->assertEquals(self::DEFAULT_SUCCESS_URL, $redirectResponse->getTargetUrl()); + } + + /** + * @group legacy + */ + public function testAuthenticationSuccessWithSessionAndTarget() + { + $token = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface') + ->disableOriginalConstructor() + ->getMock(); + $this->requestWithSession->getSession() + ->expects($this->once()) + ->method('get') + ->will($this->returnValue(self::CUSTOM_SUCCESS_URL)); + + $redirectResponse = $this->authenticator->onAuthenticationSuccess($this->requestWithSession, $token, 'providerkey'); + + $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\RedirectResponse', $redirectResponse); + $this->assertEquals(self::CUSTOM_SUCCESS_URL, $redirectResponse->getTargetUrl()); + } + + public function testRememberMe() + { + $doSupport = $this->authenticator->supportsRememberMe(); + + $this->assertTrue($doSupport); + } + + public function testStartWithoutSession() + { + $failureResponse = $this->authenticator->start($this->requestWithoutSession, new AuthenticationException()); + + $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\RedirectResponse', $failureResponse); + $this->assertEquals(self::LOGIN_URL, $failureResponse->getTargetUrl()); + } + + public function testStartWithSession() + { + $failureResponse = $this->authenticator->start($this->requestWithSession, new AuthenticationException()); + + $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\RedirectResponse', $failureResponse); + $this->assertEquals(self::LOGIN_URL, $failureResponse->getTargetUrl()); + } + + protected function setUp() + { + $this->requestWithoutSession = new Request(array(), array(), array(), array(), array(), array()); + $this->requestWithSession = new Request(array(), array(), array(), array(), array(), array()); + + $session = $this->getMockBuilder('Symfony\\Component\\HttpFoundation\\Session\\SessionInterface') + ->disableOriginalConstructor() + ->getMock(); + $this->requestWithSession->setSession($session); + + $this->authenticator = new TestFormLoginAuthenticator(); + $this->authenticator + ->setLoginUrl(self::LOGIN_URL) + ->setDefaultSuccessRedirectUrl(self::DEFAULT_SUCCESS_URL) + ; + } + + protected function tearDown() + { + $this->request = null; + $this->requestWithSession = null; + } +} + +class TestFormLoginAuthenticator extends AbstractFormLoginAuthenticator +{ + private $loginUrl; + private $defaultSuccessRedirectUrl; + + /** + * @param mixed $defaultSuccessRedirectUrl + * + * @return TestFormLoginAuthenticator + */ + public function setDefaultSuccessRedirectUrl($defaultSuccessRedirectUrl) + { + $this->defaultSuccessRedirectUrl = $defaultSuccessRedirectUrl; + + return $this; + } + + /** + * @param mixed $loginUrl + * + * @return TestFormLoginAuthenticator + */ + public function setLoginUrl($loginUrl) + { + $this->loginUrl = $loginUrl; + + return $this; + } + + /** + * {@inheritdoc} + */ + protected function getLoginUrl() + { + return $this->loginUrl; + } + + /** + * {@inheritdoc} + */ + protected function getDefaultSuccessRedirectUrl() + { + return $this->defaultSuccessRedirectUrl; + } + + /** + * {@inheritdoc} + */ + public function getCredentials(Request $request) + { + return 'credentials'; + } + + /** + * {@inheritdoc} + */ + public function getUser($credentials, UserProviderInterface $userProvider) + { + return $userProvider->loadUserByUsername($credentials); + } + + /** + * {@inheritdoc} + */ + public function checkCredentials($credentials, UserInterface $user) + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..943ca49247574e1134d8e49b78dbe9ad710353b4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php @@ -0,0 +1,257 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Guard\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener; +use Symfony\Component\Security\Guard\Token\PreAuthenticationGuardToken; +use Symfony\Component\Security\Core\Exception\AuthenticationException; + +/** + * @author Ryan Weaver + */ +class GuardAuthenticationListenerTest extends TestCase +{ + private $authenticationManager; + private $guardAuthenticatorHandler; + private $event; + private $logger; + private $request; + private $rememberMeServices; + + public function testHandleSuccess() + { + $authenticator = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); + $authenticateToken = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $providerKey = 'my_firewall'; + + $credentials = array('username' => 'weaverryan', 'password' => 'all_your_base'); + $authenticator + ->expects($this->once()) + ->method('getCredentials') + ->with($this->equalTo($this->request)) + ->will($this->returnValue($credentials)); + + // a clone of the token that should be created internally + $uniqueGuardKey = 'my_firewall_0'; + $nonAuthedToken = new PreAuthenticationGuardToken($credentials, $uniqueGuardKey); + + $this->authenticationManager + ->expects($this->once()) + ->method('authenticate') + ->with($this->equalTo($nonAuthedToken)) + ->will($this->returnValue($authenticateToken)); + + $this->guardAuthenticatorHandler + ->expects($this->once()) + ->method('authenticateWithToken') + ->with($authenticateToken, $this->request); + + $this->guardAuthenticatorHandler + ->expects($this->once()) + ->method('handleAuthenticationSuccess') + ->with($authenticateToken, $this->request, $authenticator, $providerKey); + + $listener = new GuardAuthenticationListener( + $this->guardAuthenticatorHandler, + $this->authenticationManager, + $providerKey, + array($authenticator), + $this->logger + ); + + $listener->setRememberMeServices($this->rememberMeServices); + // should never be called - our handleAuthenticationSuccess() does not return a Response + $this->rememberMeServices + ->expects($this->never()) + ->method('loginSuccess'); + + $listener->handle($this->event); + } + + public function testHandleSuccessStopsAfterResponseIsSet() + { + $authenticator1 = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); + $authenticator2 = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); + + // mock the first authenticator to fail, and set a Response + $authenticator1 + ->expects($this->once()) + ->method('getCredentials') + ->willThrowException(new AuthenticationException()); + $this->guardAuthenticatorHandler + ->expects($this->once()) + ->method('handleAuthenticationFailure') + ->willReturn(new Response()); + // the second authenticator should *never* be called + $authenticator2 + ->expects($this->never()) + ->method('getCredentials'); + + $listener = new GuardAuthenticationListener( + $this->guardAuthenticatorHandler, + $this->authenticationManager, + 'my_firewall', + array($authenticator1, $authenticator2), + $this->logger + ); + + $listener->handle($this->event); + } + + public function testHandleSuccessWithRememberMe() + { + $authenticator = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); + $authenticateToken = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $providerKey = 'my_firewall_with_rememberme'; + + $authenticator + ->expects($this->once()) + ->method('getCredentials') + ->with($this->equalTo($this->request)) + ->will($this->returnValue(array('username' => 'anything_not_empty'))); + + $this->authenticationManager + ->expects($this->once()) + ->method('authenticate') + ->will($this->returnValue($authenticateToken)); + + $successResponse = new Response('Success!'); + $this->guardAuthenticatorHandler + ->expects($this->once()) + ->method('handleAuthenticationSuccess') + ->will($this->returnValue($successResponse)); + + $listener = new GuardAuthenticationListener( + $this->guardAuthenticatorHandler, + $this->authenticationManager, + $providerKey, + array($authenticator), + $this->logger + ); + + $listener->setRememberMeServices($this->rememberMeServices); + $authenticator->expects($this->once()) + ->method('supportsRememberMe') + ->will($this->returnValue(true)); + // should be called - we do have a success Response + $this->rememberMeServices + ->expects($this->once()) + ->method('loginSuccess'); + + $listener->handle($this->event); + } + + public function testHandleCatchesAuthenticationException() + { + $authenticator = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); + $providerKey = 'my_firewall2'; + + $authException = new AuthenticationException('Get outta here crazy user with a bad password!'); + $authenticator + ->expects($this->once()) + ->method('getCredentials') + ->will($this->throwException($authException)); + + // this is not called + $this->authenticationManager + ->expects($this->never()) + ->method('authenticate'); + + $this->guardAuthenticatorHandler + ->expects($this->once()) + ->method('handleAuthenticationFailure') + ->with($authException, $this->request, $authenticator, $providerKey); + + $listener = new GuardAuthenticationListener( + $this->guardAuthenticatorHandler, + $this->authenticationManager, + $providerKey, + array($authenticator), + $this->logger + ); + + $listener->handle($this->event); + } + + public function testReturnNullToSkipAuth() + { + $authenticatorA = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); + $authenticatorB = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); + $providerKey = 'my_firewall3'; + + $authenticatorA + ->expects($this->once()) + ->method('getCredentials') + ->will($this->returnValue(null)); + $authenticatorB + ->expects($this->once()) + ->method('getCredentials') + ->will($this->returnValue(null)); + + // this is not called + $this->authenticationManager + ->expects($this->never()) + ->method('authenticate'); + + $this->guardAuthenticatorHandler + ->expects($this->never()) + ->method('handleAuthenticationSuccess'); + + $listener = new GuardAuthenticationListener( + $this->guardAuthenticatorHandler, + $this->authenticationManager, + $providerKey, + array($authenticatorA, $authenticatorB), + $this->logger + ); + + $listener->handle($this->event); + } + + protected function setUp() + { + $this->authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager') + ->disableOriginalConstructor() + ->getMock(); + + $this->guardAuthenticatorHandler = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorHandler') + ->disableOriginalConstructor() + ->getMock(); + + $this->request = new Request(array(), array(), array(), array(), array(), array()); + + $this->event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') + ->disableOriginalConstructor() + ->setMethods(array('getRequest')) + ->getMock(); + $this->event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($this->request)); + + $this->logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $this->rememberMeServices = $this->getMockBuilder('Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface')->getMock(); + } + + protected function tearDown() + { + $this->authenticationManager = null; + $this->guardAuthenticatorHandler = null; + $this->event = null; + $this->logger = null; + $this->request = null; + $this->rememberMeServices = null; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b46bc4a78d4f17cddea185fe7f2c9f64dcfd17bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php @@ -0,0 +1,142 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Guard\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Guard\GuardAuthenticatorHandler; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; +use Symfony\Component\Security\Http\SecurityEvents; + +class GuardAuthenticatorHandlerTest extends TestCase +{ + private $tokenStorage; + private $dispatcher; + private $token; + private $request; + private $guardAuthenticator; + + public function testAuthenticateWithToken() + { + $this->tokenStorage->expects($this->once()) + ->method('setToken') + ->with($this->token); + + $loginEvent = new InteractiveLoginEvent($this->request, $this->token); + + $this->dispatcher + ->expects($this->once()) + ->method('dispatch') + ->with($this->equalTo(SecurityEvents::INTERACTIVE_LOGIN), $this->equalTo($loginEvent)) + ; + + $handler = new GuardAuthenticatorHandler($this->tokenStorage, $this->dispatcher); + $handler->authenticateWithToken($this->token, $this->request); + } + + public function testHandleAuthenticationSuccess() + { + $providerKey = 'my_handleable_firewall'; + $response = new Response('Guard all the things!'); + $this->guardAuthenticator->expects($this->once()) + ->method('onAuthenticationSuccess') + ->with($this->request, $this->token, $providerKey) + ->will($this->returnValue($response)); + + $handler = new GuardAuthenticatorHandler($this->tokenStorage, $this->dispatcher); + $actualResponse = $handler->handleAuthenticationSuccess($this->token, $this->request, $this->guardAuthenticator, $providerKey); + $this->assertSame($response, $actualResponse); + } + + public function testHandleAuthenticationFailure() + { + // setToken() not called - getToken() will return null, so there's nothing to clear + $this->tokenStorage->expects($this->never()) + ->method('setToken') + ->with(null); + $authException = new AuthenticationException('Bad password!'); + + $response = new Response('Try again, but with the right password!'); + $this->guardAuthenticator->expects($this->once()) + ->method('onAuthenticationFailure') + ->with($this->request, $authException) + ->will($this->returnValue($response)); + + $handler = new GuardAuthenticatorHandler($this->tokenStorage, $this->dispatcher); + $actualResponse = $handler->handleAuthenticationFailure($authException, $this->request, $this->guardAuthenticator, 'firewall_provider_key'); + $this->assertSame($response, $actualResponse); + } + + /** + * @dataProvider getTokenClearingTests + */ + public function testHandleAuthenticationClearsToken($tokenClass, $tokenProviderKey, $actualProviderKey, $shouldTokenBeCleared) + { + $token = $this->getMockBuilder($tokenClass) + ->disableOriginalConstructor() + ->getMock(); + $token->expects($this->any()) + ->method('getProviderKey') + ->will($this->returnValue($tokenProviderKey)); + + // make the $token be the current token + $this->tokenStorage->expects($this->once()) + ->method('getToken') + ->will($this->returnValue($token)); + + $this->tokenStorage->expects($shouldTokenBeCleared ? $this->once() : $this->never()) + ->method('setToken') + ->with(null); + $authException = new AuthenticationException('Bad password!'); + + $response = new Response('Try again, but with the right password!'); + $this->guardAuthenticator->expects($this->once()) + ->method('onAuthenticationFailure') + ->with($this->request, $authException) + ->will($this->returnValue($response)); + + $handler = new GuardAuthenticatorHandler($this->tokenStorage, $this->dispatcher); + $actualResponse = $handler->handleAuthenticationFailure($authException, $this->request, $this->guardAuthenticator, $actualProviderKey); + $this->assertSame($response, $actualResponse); + } + + public function getTokenClearingTests() + { + $tests = array(); + // correct token class and matching firewall => clear the token + $tests[] = array('Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken', 'the_firewall_key', 'the_firewall_key', true); + $tests[] = array('Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken', 'the_firewall_key', 'different_key', false); + $tests[] = array('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', 'the_firewall_key', 'the_firewall_key', false); + + return $tests; + } + + protected function setUp() + { + $this->tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $this->token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $this->request = new Request(array(), array(), array(), array(), array(), array()); + $this->guardAuthenticator = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); + } + + protected function tearDown() + { + $this->tokenStorage = null; + $this->dispatcher = null; + $this->token = null; + $this->request = null; + $this->guardAuthenticator = null; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ed3920533fe923302e0ddab3100ebd0bcad71a91 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.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\Security\Guard\Tests\Provider; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider; +use Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken; + +/** + * @author Ryan Weaver + */ +class GuardAuthenticationProviderTest extends TestCase +{ + private $userProvider; + private $userChecker; + private $preAuthenticationToken; + + public function testAuthenticate() + { + $providerKey = 'my_cool_firewall'; + + $authenticatorA = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); + $authenticatorB = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); + $authenticatorC = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); + $authenticators = array($authenticatorA, $authenticatorB, $authenticatorC); + + // called 2 times - for authenticator A and B (stops on B because of match) + $this->preAuthenticationToken->expects($this->exactly(2)) + ->method('getGuardProviderKey') + // it will return the "1" index, which will match authenticatorB + ->will($this->returnValue('my_cool_firewall_1')); + + $enteredCredentials = array( + 'username' => '_weaverryan_test_user', + 'password' => 'guard_auth_ftw', + ); + $this->preAuthenticationToken->expects($this->atLeastOnce()) + ->method('getCredentials') + ->will($this->returnValue($enteredCredentials)); + + // authenticators A and C are never called + $authenticatorA->expects($this->never()) + ->method('getUser'); + $authenticatorC->expects($this->never()) + ->method('getUser'); + + $mockedUser = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $authenticatorB->expects($this->once()) + ->method('getUser') + ->with($enteredCredentials, $this->userProvider) + ->will($this->returnValue($mockedUser)); + // checkCredentials is called + $authenticatorB->expects($this->once()) + ->method('checkCredentials') + ->with($enteredCredentials, $mockedUser) + // authentication works! + ->will($this->returnValue(true)); + $authedToken = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $authenticatorB->expects($this->once()) + ->method('createAuthenticatedToken') + ->with($mockedUser, $providerKey) + ->will($this->returnValue($authedToken)); + + // user checker should be called + $this->userChecker->expects($this->once()) + ->method('checkPreAuth') + ->with($mockedUser); + $this->userChecker->expects($this->once()) + ->method('checkPostAuth') + ->with($mockedUser); + + $provider = new GuardAuthenticationProvider($authenticators, $this->userProvider, $providerKey, $this->userChecker); + $actualAuthedToken = $provider->authenticate($this->preAuthenticationToken); + $this->assertSame($authedToken, $actualAuthedToken); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testCheckCredentialsReturningNonTrueFailsAuthentication() + { + $providerKey = 'my_uncool_firewall'; + + $authenticator = $this->getMockBuilder('Symfony\Component\Security\Guard\GuardAuthenticatorInterface')->getMock(); + + // make sure the authenticator is used + $this->preAuthenticationToken->expects($this->any()) + ->method('getGuardProviderKey') + // the 0 index, to match the only authenticator + ->will($this->returnValue('my_uncool_firewall_0')); + + $this->preAuthenticationToken->expects($this->atLeastOnce()) + ->method('getCredentials') + ->will($this->returnValue('non-null-value')); + + $mockedUser = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $authenticator->expects($this->once()) + ->method('getUser') + ->will($this->returnValue($mockedUser)); + // checkCredentials is called + $authenticator->expects($this->once()) + ->method('checkCredentials') + // authentication fails :( + ->will($this->returnValue(null)); + + $provider = new GuardAuthenticationProvider(array($authenticator), $this->userProvider, $providerKey, $this->userChecker); + $provider->authenticate($this->preAuthenticationToken); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationExpiredException + */ + public function testGuardWithNoLongerAuthenticatedTriggersLogout() + { + $providerKey = 'my_firewall_abc'; + + // create a token and mark it as NOT authenticated anymore + // this mimics what would happen if a user "changed" between request + $mockedUser = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $token = new PostAuthenticationGuardToken($mockedUser, $providerKey, array('ROLE_USER')); + $token->setAuthenticated(false); + + $provider = new GuardAuthenticationProvider(array(), $this->userProvider, $providerKey, $this->userChecker); + $actualToken = $provider->authenticate($token); + } + + protected function setUp() + { + $this->userProvider = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserProviderInterface')->getMock(); + $this->userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); + $this->preAuthenticationToken = $this->getMockBuilder('Symfony\Component\Security\Guard\Token\PreAuthenticationGuardToken') + ->disableOriginalConstructor() + ->getMock(); + } + + protected function tearDown() + { + $this->userProvider = null; + $this->userChecker = null; + $this->preAuthenticationToken = null; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/GuardTokenInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/GuardTokenInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..063ffd3ba7e32dd7ff8e48f4690c5f7dfd8333eb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/GuardTokenInterface.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\Security\Guard\Token; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * A marker interface that both guard tokens implement. + * + * Any tokens passed to GuardAuthenticationProvider (i.e. any tokens that + * are handled by the guard auth system) must implement this + * interface. + * + * @author Ryan Weaver + */ +interface GuardTokenInterface extends TokenInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PostAuthenticationGuardToken.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PostAuthenticationGuardToken.php new file mode 100644 index 0000000000000000000000000000000000000000..5b353d97a6dd6f01bb5a8311926967ef0bced067 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PostAuthenticationGuardToken.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Guard\Token; + +use Symfony\Component\Security\Core\Authentication\Token\AbstractToken; +use Symfony\Component\Security\Core\Role\RoleInterface; +use Symfony\Component\Security\Core\User\UserInterface; + +/** + * Used as an "authenticated" token, though it could be set to not-authenticated later. + * + * If you're using Guard authentication, you *must* use a class that implements + * GuardTokenInterface as your authenticated token (like this class). + * + * @author Ryan Weaver + */ +class PostAuthenticationGuardToken extends AbstractToken implements GuardTokenInterface +{ + private $providerKey; + + /** + * @param UserInterface $user The user! + * @param string $providerKey The provider (firewall) key + * @param RoleInterface[]|string[] $roles An array of roles + * + * @throws \InvalidArgumentException + */ + public function __construct(UserInterface $user, $providerKey, array $roles) + { + parent::__construct($roles); + + if (empty($providerKey)) { + throw new \InvalidArgumentException('$providerKey (i.e. firewall key) must not be empty.'); + } + + $this->setUser($user); + $this->providerKey = $providerKey; + + // this token is meant to be used after authentication success, so it is always authenticated + // you could set it as non authenticated later if you need to + parent::setAuthenticated(true); + } + + /** + * This is meant to be only an authenticated token, where credentials + * have already been used and are thus cleared. + * + * {@inheritdoc} + */ + public function getCredentials() + { + return array(); + } + + /** + * Returns the provider (firewall) key. + * + * @return string + */ + public function getProviderKey() + { + return $this->providerKey; + } + + /** + * {@inheritdoc} + */ + public function serialize() + { + return serialize(array($this->providerKey, parent::serialize())); + } + + /** + * {@inheritdoc} + */ + public function unserialize($serialized) + { + list($this->providerKey, $parentStr) = unserialize($serialized); + parent::unserialize($parentStr); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PreAuthenticationGuardToken.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PreAuthenticationGuardToken.php new file mode 100644 index 0000000000000000000000000000000000000000..abbe985c9e0b206190f58567c0b0f78ba69311ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/Token/PreAuthenticationGuardToken.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\Component\Security\Guard\Token; + +use Symfony\Component\Security\Core\Authentication\Token\AbstractToken; + +/** + * The token used by the guard auth system before authentication. + * + * The GuardAuthenticationListener creates this, which is then consumed + * immediately by the GuardAuthenticationProvider. If authentication is + * successful, a different authenticated token is returned + * + * @author Ryan Weaver + */ +class PreAuthenticationGuardToken extends AbstractToken implements GuardTokenInterface +{ + private $credentials; + private $guardProviderKey; + + /** + * @param mixed $credentials + * @param string $guardProviderKey Unique key that bind this token to a specific GuardAuthenticatorInterface + */ + public function __construct($credentials, $guardProviderKey) + { + $this->credentials = $credentials; + $this->guardProviderKey = $guardProviderKey; + + parent::__construct(array()); + + // never authenticated + parent::setAuthenticated(false); + } + + public function getGuardProviderKey() + { + return $this->guardProviderKey; + } + + /** + * Returns the user credentials, which might be an array of anything you + * wanted to put in there (e.g. username, password, favoriteColor). + * + * @return mixed The user credentials + */ + public function getCredentials() + { + return $this->credentials; + } + + public function setAuthenticated($authenticated) + { + throw new \LogicException('The PreAuthenticationGuardToken is *never* authenticated.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..4980923075926af8e2ad5e310cf03af6b1831318 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/composer.json @@ -0,0 +1,38 @@ +{ + "name": "symfony/security-guard", + "type": "library", + "description": "Symfony Security Component - Guard", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/security-core": "~2.8|~3.0", + "symfony/security-http": "~3.1" + }, + "require-dev": { + "psr/log": "~1.0" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Security\\Guard\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..da5a3826f26834ca90dc04ae1e7e0f2ffe7bfdf7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Guard/phpunit.xml.dist @@ -0,0 +1,34 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/AccessMap.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/AccessMap.php new file mode 100644 index 0000000000000000000000000000000000000000..116874a3198ba5b30c724cc793375c85685bb915 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/AccessMap.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http; + +use Symfony\Component\HttpFoundation\RequestMatcherInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * AccessMap allows configuration of different access control rules for + * specific parts of the website. + * + * @author Fabien Potencier + */ +class AccessMap implements AccessMapInterface +{ + private $map = array(); + + /** + * Constructor. + * + * @param RequestMatcherInterface $requestMatcher A RequestMatcherInterface instance + * @param array $attributes An array of attributes to pass to the access decision manager (like roles) + * @param string|null $channel The channel to enforce (http, https, or null) + */ + public function add(RequestMatcherInterface $requestMatcher, array $attributes = array(), $channel = null) + { + $this->map[] = array($requestMatcher, $attributes, $channel); + } + + /** + * {@inheritdoc} + */ + public function getPatterns(Request $request) + { + foreach ($this->map as $elements) { + if (null === $elements[0] || $elements[0]->matches($request)) { + return array($elements[1], $elements[2]); + } + } + + return array(null, null); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/AccessMapInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/AccessMapInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..7d15feeb0c6530b93ffd7ef5ab68ec29dac885bd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/AccessMapInterface.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http; + +use Symfony\Component\HttpFoundation\Request; + +/** + * AccessMap allows configuration of different access control rules for + * specific parts of the website. + * + * @author Fabien Potencier + * @author Kris Wallsmith + */ +interface AccessMapInterface +{ + /** + * Returns security attributes and required channel for the supplied request. + * + * @param Request $request The current request + * + * @return array A tuple of security attributes and the required channel + */ + public function getPatterns(Request $request); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e2d375e7540e707347e2ef18c7632fec287c893e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Authentication; + +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Interface for custom authentication failure handlers. + * + * If you want to customize the failure handling process, instead of + * overwriting the respective listener globally, you can set a custom failure + * handler which implements this interface. + * + * @author Johannes M. Schmitt + */ +interface AuthenticationFailureHandlerInterface +{ + /** + * This is called when an interactive authentication attempt fails. This is + * called by authentication listeners inheriting from + * AbstractAuthenticationListener. + * + * @param Request $request + * @param AuthenticationException $exception + * + * @return Response The response to return, never null + */ + public function onAuthenticationFailure(Request $request, AuthenticationException $exception); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d0b3cb6f216ea920d647f2a58e7699797f2c3d7b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Authentication; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Interface for a custom authentication success handler. + * + * If you want to customize the success handling process, instead of + * overwriting the respective listener globally, you can set a custom success + * handler which implements this interface. + * + * @author Johannes M. Schmitt + */ +interface AuthenticationSuccessHandlerInterface +{ + /** + * This is called when an interactive authentication attempt succeeds. This + * is called by authentication listeners inheriting from + * AbstractAuthenticationListener. + * + * @param Request $request + * @param TokenInterface $token + * + * @return Response never null + */ + public function onAuthenticationSuccess(Request $request, TokenInterface $token); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php new file mode 100644 index 0000000000000000000000000000000000000000..c6397e8ca1e3b30e4c6cfc9b42baf2a3c3852a1e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.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\Security\Http\Authentication; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Security; + +/** + * Extracts Security Errors from Request. + * + * @author Boris Vujicic + */ +class AuthenticationUtils +{ + /** + * @var RequestStack + */ + private $requestStack; + + /** + * @param RequestStack $requestStack + */ + public function __construct(RequestStack $requestStack) + { + $this->requestStack = $requestStack; + } + + /** + * @param bool $clearSession + * + * @return AuthenticationException|null + */ + public function getLastAuthenticationError($clearSession = true) + { + $request = $this->getRequest(); + $session = $request->getSession(); + $authenticationException = null; + + if ($request->attributes->has(Security::AUTHENTICATION_ERROR)) { + $authenticationException = $request->attributes->get(Security::AUTHENTICATION_ERROR); + } elseif ($session !== null && $session->has(Security::AUTHENTICATION_ERROR)) { + $authenticationException = $session->get(Security::AUTHENTICATION_ERROR); + + if ($clearSession) { + $session->remove(Security::AUTHENTICATION_ERROR); + } + } + + return $authenticationException; + } + + /** + * @return string + */ + public function getLastUsername() + { + $request = $this->getRequest(); + + if ($request->attributes->has(Security::LAST_USERNAME)) { + return $request->attributes->get(Security::LAST_USERNAME); + } + + $session = $request->getSession(); + + return null === $session ? '' : $session->get(Security::LAST_USERNAME); + } + + /** + * @return Request + * + * @throws \LogicException + */ + private function getRequest() + { + $request = $this->requestStack->getCurrentRequest(); + + if (null === $request) { + throw new \LogicException('Request should exist so it can be processed for error.'); + } + + return $request; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationFailureHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationFailureHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..36d4a78d6dc8e6b8b1334ee06ab1b6d02e29e271 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationFailureHandler.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\Component\Security\Http\Authentication; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Exception\AuthenticationException; + +/** + * @author Fabien Potencier + */ +class CustomAuthenticationFailureHandler implements AuthenticationFailureHandlerInterface +{ + private $handler; + + /** + * Constructor. + * + * @param AuthenticationFailureHandlerInterface $handler An AuthenticationFailureHandlerInterface instance + * @param array $options Options for processing a successful authentication attempt + */ + public function __construct(AuthenticationFailureHandlerInterface $handler, array $options) + { + $this->handler = $handler; + if (method_exists($handler, 'setOptions')) { + $this->handler->setOptions($options); + } + } + + /** + * {@inheritdoc} + */ + public function onAuthenticationFailure(Request $request, AuthenticationException $exception) + { + return $this->handler->onAuthenticationFailure($request, $exception); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationSuccessHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationSuccessHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..2d1b26ebb91792aa4b8c10225e0521ee55b11ba8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationSuccessHandler.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Authentication; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * @author Fabien Potencier + */ +class CustomAuthenticationSuccessHandler implements AuthenticationSuccessHandlerInterface +{ + private $handler; + + /** + * Constructor. + * + * @param AuthenticationSuccessHandlerInterface $handler An AuthenticationSuccessHandlerInterface instance + * @param array $options Options for processing a successful authentication attempt + * @param string $providerKey The provider key + */ + public function __construct(AuthenticationSuccessHandlerInterface $handler, array $options, $providerKey) + { + $this->handler = $handler; + if (method_exists($handler, 'setOptions')) { + $this->handler->setOptions($options); + } + if (method_exists($handler, 'setProviderKey')) { + $this->handler->setProviderKey($providerKey); + } + } + + /** + * {@inheritdoc} + */ + public function onAuthenticationSuccess(Request $request, TokenInterface $token) + { + return $this->handler->onAuthenticationSuccess($request, $token); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..ea5c356c33c0b5b43c8853f44d439f39c529da4d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Authentication; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Psr\Log\LoggerInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Security; +use Symfony\Component\Security\Http\HttpUtils; +use Symfony\Component\Security\Http\ParameterBagUtils; + +/** + * Class with the default authentication failure handling logic. + * + * Can be optionally be extended from by the developer to alter the behaviour + * while keeping the default behaviour. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + * @author Alexander + */ +class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandlerInterface +{ + protected $httpKernel; + protected $httpUtils; + protected $logger; + protected $options; + protected $defaultOptions = array( + 'failure_path' => null, + 'failure_forward' => false, + 'login_path' => '/login', + 'failure_path_parameter' => '_failure_path', + ); + + /** + * Constructor. + * + * @param HttpKernelInterface $httpKernel + * @param HttpUtils $httpUtils + * @param array $options Options for processing a failed authentication attempt + * @param LoggerInterface $logger Optional logger + */ + public function __construct(HttpKernelInterface $httpKernel, HttpUtils $httpUtils, array $options = array(), LoggerInterface $logger = null) + { + $this->httpKernel = $httpKernel; + $this->httpUtils = $httpUtils; + $this->logger = $logger; + $this->setOptions($options); + } + + /** + * Gets the options. + * + * @return array An array of options + */ + public function getOptions() + { + return $this->options; + } + + /** + * Sets the options. + * + * @param array $options An array of options + */ + public function setOptions(array $options) + { + $this->options = array_merge($this->defaultOptions, $options); + } + + /** + * {@inheritdoc} + */ + public function onAuthenticationFailure(Request $request, AuthenticationException $exception) + { + if ($failureUrl = ParameterBagUtils::getRequestParameterValue($request, $this->options['failure_path_parameter'])) { + $this->options['failure_path'] = $failureUrl; + } + + if (null === $this->options['failure_path']) { + $this->options['failure_path'] = $this->options['login_path']; + } + + if ($this->options['failure_forward']) { + if (null !== $this->logger) { + $this->logger->debug('Authentication failure, forward triggered.', array('failure_path' => $this->options['failure_path'])); + } + + $subRequest = $this->httpUtils->createRequest($request, $this->options['failure_path']); + $subRequest->attributes->set(Security::AUTHENTICATION_ERROR, $exception); + + return $this->httpKernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST); + } + + if (null !== $this->logger) { + $this->logger->debug('Authentication failure, redirect triggered.', array('failure_path' => $this->options['failure_path'])); + } + + $request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception); + + return $this->httpUtils->createRedirectResponse($request, $this->options['failure_path']); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..4cb4bb68287fa9b94d3142dd564e057f2c7986a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Authentication; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Http\Util\TargetPathTrait; +use Symfony\Component\Security\Http\HttpUtils; +use Symfony\Component\Security\Http\ParameterBagUtils; + +/** + * Class with the default authentication success handling logic. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + * @author Alexander + */ +class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandlerInterface +{ + use TargetPathTrait; + + protected $httpUtils; + protected $options; + protected $providerKey; + protected $defaultOptions = array( + 'always_use_default_target_path' => false, + 'default_target_path' => '/', + 'login_path' => '/login', + 'target_path_parameter' => '_target_path', + 'use_referer' => false, + ); + + /** + * Constructor. + * + * @param HttpUtils $httpUtils + * @param array $options Options for processing a successful authentication attempt + */ + public function __construct(HttpUtils $httpUtils, array $options = array()) + { + $this->httpUtils = $httpUtils; + $this->setOptions($options); + } + + /** + * {@inheritdoc} + */ + public function onAuthenticationSuccess(Request $request, TokenInterface $token) + { + return $this->httpUtils->createRedirectResponse($request, $this->determineTargetUrl($request)); + } + + /** + * Gets the options. + * + * @return array An array of options + */ + public function getOptions() + { + return $this->options; + } + + /** + * Sets the options. + * + * @param array $options An array of options + */ + public function setOptions(array $options) + { + $this->options = array_merge($this->defaultOptions, $options); + } + + /** + * Get the provider key. + * + * @return string + */ + public function getProviderKey() + { + return $this->providerKey; + } + + /** + * Set the provider key. + * + * @param string $providerKey + */ + public function setProviderKey($providerKey) + { + $this->providerKey = $providerKey; + } + + /** + * Builds the target URL according to the defined options. + * + * @param Request $request + * + * @return string + */ + protected function determineTargetUrl(Request $request) + { + if ($this->options['always_use_default_target_path']) { + return $this->options['default_target_path']; + } + + if ($targetUrl = ParameterBagUtils::getRequestParameterValue($request, $this->options['target_path_parameter'])) { + return $targetUrl; + } + + if (null !== $this->providerKey && $targetUrl = $this->getTargetPath($request->getSession(), $this->providerKey)) { + $this->removeTargetPath($request->getSession(), $this->providerKey); + + return $targetUrl; + } + + if ($this->options['use_referer'] && ($targetUrl = $request->headers->get('Referer')) && $targetUrl !== $this->httpUtils->generateUri($request, $this->options['login_path'])) { + return $targetUrl; + } + + return $this->options['default_target_path']; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..c5c43f2895734b39ba94459f5f3ee36e21d43f62 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Authentication; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Psr\Log\LoggerInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface; + +/** + * Class to proxy authentication success/failure handlers. + * + * Events are sent to the SimpleAuthenticatorInterface if it implements + * the right interface, otherwise (or if it fails to return a Response) + * the default handlers are triggered. + * + * @author Jordi Boggiano + */ +class SimpleAuthenticationHandler implements AuthenticationFailureHandlerInterface, AuthenticationSuccessHandlerInterface +{ + protected $successHandler; + protected $failureHandler; + protected $simpleAuthenticator; + protected $logger; + + /** + * Constructor. + * + * @param SimpleAuthenticatorInterface $authenticator SimpleAuthenticatorInterface instance + * @param AuthenticationSuccessHandlerInterface $successHandler Default success handler + * @param AuthenticationFailureHandlerInterface $failureHandler Default failure handler + * @param LoggerInterface $logger Optional logger + */ + public function __construct(SimpleAuthenticatorInterface $authenticator, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, LoggerInterface $logger = null) + { + $this->simpleAuthenticator = $authenticator; + $this->successHandler = $successHandler; + $this->failureHandler = $failureHandler; + $this->logger = $logger; + } + + /** + * {@inheritdoc} + */ + public function onAuthenticationSuccess(Request $request, TokenInterface $token) + { + if ($this->simpleAuthenticator instanceof AuthenticationSuccessHandlerInterface) { + if ($this->logger) { + $this->logger->debug('Selected an authentication success handler.', array('handler' => get_class($this->simpleAuthenticator))); + } + + $response = $this->simpleAuthenticator->onAuthenticationSuccess($request, $token); + if ($response instanceof Response) { + return $response; + } + + if (null !== $response) { + throw new \UnexpectedValueException(sprintf('The %s::onAuthenticationSuccess method must return null to use the default success handler, or a Response object', get_class($this->simpleAuthenticator))); + } + } + + if ($this->logger) { + $this->logger->debug('Fallback to the default authentication success handler.'); + } + + return $this->successHandler->onAuthenticationSuccess($request, $token); + } + + /** + * {@inheritdoc} + */ + public function onAuthenticationFailure(Request $request, AuthenticationException $exception) + { + if ($this->simpleAuthenticator instanceof AuthenticationFailureHandlerInterface) { + if ($this->logger) { + $this->logger->debug('Selected an authentication failure handler.', array('handler' => get_class($this->simpleAuthenticator))); + } + + $response = $this->simpleAuthenticator->onAuthenticationFailure($request, $exception); + if ($response instanceof Response) { + return $response; + } + + if (null !== $response) { + throw new \UnexpectedValueException(sprintf('The %s::onAuthenticationFailure method must return null to use the default failure handler, or a Response object', get_class($this->simpleAuthenticator))); + } + } + + if ($this->logger) { + $this->logger->debug('Fallback to the default authentication failure handler.'); + } + + return $this->failureHandler->onAuthenticationFailure($request, $exception); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimpleFormAuthenticatorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimpleFormAuthenticatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..39c31334874537b7caf52dc1fb2a744166d2ecfd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimpleFormAuthenticatorInterface.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Authentication; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface; + +/** + * @author Jordi Boggiano + */ +interface SimpleFormAuthenticatorInterface extends SimpleAuthenticatorInterface +{ + public function createToken(Request $request, $username, $password, $providerKey); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimplePreAuthenticatorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimplePreAuthenticatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..63abb15c9acf68b520a5ff50a715e2e5105f6623 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authentication/SimplePreAuthenticatorInterface.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Authentication; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface; + +/** + * @author Jordi Boggiano + */ +interface SimplePreAuthenticatorInterface extends SimpleAuthenticatorInterface +{ + public function createToken(Request $request, $providerKey); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a5ea9db6313bddc71d36b939483347fbf53fb197 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Authorization; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Core\Exception\AccessDeniedException; + +/** + * This is used by the ExceptionListener to translate an AccessDeniedException + * to a Response object. + * + * @author Johannes M. Schmitt + */ +interface AccessDeniedHandlerInterface +{ + /** + * Handles an access denied failure. + * + * @param Request $request + * @param AccessDeniedException $accessDeniedException + * + * @return Response may return null + */ + public function handle(Request $request, AccessDeniedException $accessDeniedException); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..9bade0cb699dbf73111b3d5faa5719bdf9182667 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.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\Component\Security\Http\EntryPoint; + +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * Implement this interface for any classes that will be called to "start" + * the authentication process (see method for more details). + * + * @author Fabien Potencier + */ +interface AuthenticationEntryPointInterface +{ + /** + * Returns a response that directs the user to authenticate. + * + * This is called when an anonymous request accesses a resource that + * requires authentication. The job of this method is to return some + * response that "helps" the user start into the authentication process. + * + * Examples: + * A) For a form login, you might redirect to the login page + * return new RedirectResponse('/login'); + * B) For an API token authentication system, you return a 401 response + * return new Response('Auth header required', 401); + * + * @param Request $request The request that resulted in an AuthenticationException + * @param AuthenticationException $authException The exception that started the authentication process + * + * @return Response + */ + public function start(Request $request, AuthenticationException $authException = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/BasicAuthenticationEntryPoint.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/BasicAuthenticationEntryPoint.php new file mode 100644 index 0000000000000000000000000000000000000000..2dc3d1196d154c6faac42f8aeb3d65a03cceb775 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/BasicAuthenticationEntryPoint.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\Component\Security\Http\EntryPoint; + +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Request; + +/** + * BasicAuthenticationEntryPoint starts an HTTP Basic authentication. + * + * @author Fabien Potencier + */ +class BasicAuthenticationEntryPoint implements AuthenticationEntryPointInterface +{ + private $realmName; + + public function __construct($realmName) + { + $this->realmName = $realmName; + } + + /** + * {@inheritdoc} + */ + public function start(Request $request, AuthenticationException $authException = null) + { + $response = new Response(); + $response->headers->set('WWW-Authenticate', sprintf('Basic realm="%s"', $this->realmName)); + $response->setStatusCode(401); + + return $response; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php new file mode 100644 index 0000000000000000000000000000000000000000..9dfd5929459fbc5fa3e3c903bf33cedb50f49c29 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\EntryPoint; + +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Exception\NonceExpiredException; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Request; +use Psr\Log\LoggerInterface; + +/** + * DigestAuthenticationEntryPoint starts an HTTP Digest authentication. + * + * @author Fabien Potencier + */ +class DigestAuthenticationEntryPoint implements AuthenticationEntryPointInterface +{ + private $secret; + private $realmName; + private $nonceValiditySeconds; + private $logger; + + public function __construct($realmName, $secret, $nonceValiditySeconds = 300, LoggerInterface $logger = null) + { + $this->realmName = $realmName; + $this->secret = $secret; + $this->nonceValiditySeconds = $nonceValiditySeconds; + $this->logger = $logger; + } + + /** + * {@inheritdoc} + */ + public function start(Request $request, AuthenticationException $authException = null) + { + $expiryTime = microtime(true) + $this->nonceValiditySeconds * 1000; + $signatureValue = md5($expiryTime.':'.$this->secret); + $nonceValue = $expiryTime.':'.$signatureValue; + $nonceValueBase64 = base64_encode($nonceValue); + + $authenticateHeader = sprintf('Digest realm="%s", qop="auth", nonce="%s"', $this->realmName, $nonceValueBase64); + + if ($authException instanceof NonceExpiredException) { + $authenticateHeader .= ', stale="true"'; + } + + if (null !== $this->logger) { + $this->logger->debug('WWW-Authenticate header sent.', array('header' => $authenticateHeader)); + } + + $response = new Response(); + $response->headers->set('WWW-Authenticate', $authenticateHeader); + $response->setStatusCode(401); + + return $response; + } + + /** + * @return string + */ + public function getSecret() + { + return $this->secret; + } + + /** + * @return string + */ + public function getRealmName() + { + return $this->realmName; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/FormAuthenticationEntryPoint.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/FormAuthenticationEntryPoint.php new file mode 100644 index 0000000000000000000000000000000000000000..c734db065e16f44ee26b4edae30fdfee5f2b520a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/FormAuthenticationEntryPoint.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\Component\Security\Http\EntryPoint; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Http\HttpUtils; +use Symfony\Component\HttpKernel\HttpKernelInterface; + +/** + * FormAuthenticationEntryPoint starts an authentication via a login form. + * + * @author Fabien Potencier + */ +class FormAuthenticationEntryPoint implements AuthenticationEntryPointInterface +{ + private $loginPath; + private $useForward; + private $httpKernel; + private $httpUtils; + + /** + * Constructor. + * + * @param HttpKernelInterface $kernel + * @param HttpUtils $httpUtils An HttpUtils instance + * @param string $loginPath The path to the login form + * @param bool $useForward Whether to forward or redirect to the login form + */ + public function __construct(HttpKernelInterface $kernel, HttpUtils $httpUtils, $loginPath, $useForward = false) + { + $this->httpKernel = $kernel; + $this->httpUtils = $httpUtils; + $this->loginPath = $loginPath; + $this->useForward = (bool) $useForward; + } + + /** + * {@inheritdoc} + */ + public function start(Request $request, AuthenticationException $authException = null) + { + if ($this->useForward) { + $subRequest = $this->httpUtils->createRequest($request, $this->loginPath); + + $response = $this->httpKernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST); + if (200 === $response->getStatusCode()) { + $response->headers->set('X-Status-Code', 401); + } + + return $response; + } + + return $this->httpUtils->createRedirectResponse($request, $this->loginPath); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/RetryAuthenticationEntryPoint.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/RetryAuthenticationEntryPoint.php new file mode 100644 index 0000000000000000000000000000000000000000..d1a0a2880652f1c827c047d461f8311279758bc1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/EntryPoint/RetryAuthenticationEntryPoint.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\EntryPoint; + +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; + +/** + * RetryAuthenticationEntryPoint redirects URL based on the configured scheme. + * + * This entry point is not intended to work with HTTP post requests. + * + * @author Fabien Potencier + */ +class RetryAuthenticationEntryPoint implements AuthenticationEntryPointInterface +{ + private $httpPort; + private $httpsPort; + + public function __construct($httpPort = 80, $httpsPort = 443) + { + $this->httpPort = $httpPort; + $this->httpsPort = $httpsPort; + } + + /** + * {@inheritdoc} + */ + public function start(Request $request, AuthenticationException $authException = null) + { + $scheme = $request->isSecure() ? 'http' : 'https'; + if ('http' === $scheme && 80 != $this->httpPort) { + $port = ':'.$this->httpPort; + } elseif ('https' === $scheme && 443 != $this->httpsPort) { + $port = ':'.$this->httpsPort; + } else { + $port = ''; + } + + $qs = $request->getQueryString(); + if (null !== $qs) { + $qs = '?'.$qs; + } + + $url = $scheme.'://'.$request->getHost().$port.$request->getBaseUrl().$request->getPathInfo().$qs; + + return new RedirectResponse($url, 301); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Event/InteractiveLoginEvent.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Event/InteractiveLoginEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..b5ac242d41502075a7ec29355479058289131ae6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Event/InteractiveLoginEvent.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Event; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\EventDispatcher\Event; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * InteractiveLoginEvent. + * + * @author Fabien Potencier + */ +class InteractiveLoginEvent extends Event +{ + private $request; + private $authenticationToken; + + /** + * Constructor. + * + * @param Request $request A Request instance + * @param TokenInterface $authenticationToken A TokenInterface instance + */ + public function __construct(Request $request, TokenInterface $authenticationToken) + { + $this->request = $request; + $this->authenticationToken = $authenticationToken; + } + + /** + * Gets the request. + * + * @return Request A Request instance + */ + public function getRequest() + { + return $this->request; + } + + /** + * Gets the authentication token. + * + * @return TokenInterface A TokenInterface instance + */ + public function getAuthenticationToken() + { + return $this->authenticationToken; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Event/SwitchUserEvent.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Event/SwitchUserEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..7cf94a70d3136e864f80552c8e18294e85505691 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Event/SwitchUserEvent.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Event; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\EventDispatcher\Event; + +/** + * SwitchUserEvent. + * + * @author Fabien Potencier + */ +class SwitchUserEvent extends Event +{ + private $request; + private $targetUser; + + public function __construct(Request $request, UserInterface $targetUser) + { + $this->request = $request; + $this->targetUser = $targetUser; + } + + /** + * @return Request + */ + public function getRequest() + { + return $this->request; + } + + /** + * @return UserInterface + */ + public function getTargetUser() + { + return $this->targetUser; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall.php new file mode 100644 index 0000000000000000000000000000000000000000..7bad47a5bed018c87f4281b7c5f3da0cb5533395 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http; + +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\Event\FinishRequestEvent; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Firewall uses a FirewallMap to register security listeners for the given + * request. + * + * It allows for different security strategies within the same application + * (a Basic authentication for the /api, and a web based authentication for + * everything else for instance). + * + * @author Fabien Potencier + */ +class Firewall implements EventSubscriberInterface +{ + private $map; + private $dispatcher; + private $exceptionListeners; + + /** + * Constructor. + * + * @param FirewallMapInterface $map A FirewallMapInterface instance + * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance + */ + public function __construct(FirewallMapInterface $map, EventDispatcherInterface $dispatcher) + { + $this->map = $map; + $this->dispatcher = $dispatcher; + $this->exceptionListeners = new \SplObjectStorage(); + } + + /** + * Handles security. + * + * @param GetResponseEvent $event An GetResponseEvent instance + */ + public function onKernelRequest(GetResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + + // register listeners for this firewall + list($listeners, $exceptionListener) = $this->map->getListeners($event->getRequest()); + if (null !== $exceptionListener) { + $this->exceptionListeners[$event->getRequest()] = $exceptionListener; + $exceptionListener->register($this->dispatcher); + } + + // initiate the listener chain + foreach ($listeners as $listener) { + $listener->handle($event); + + if ($event->hasResponse()) { + break; + } + } + } + + public function onKernelFinishRequest(FinishRequestEvent $event) + { + $request = $event->getRequest(); + + if (isset($this->exceptionListeners[$request])) { + $this->exceptionListeners[$request]->unregister($this->dispatcher); + unset($this->exceptionListeners[$request]); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents() + { + return array( + KernelEvents::REQUEST => array('onKernelRequest', 8), + KernelEvents::FINISH_REQUEST => 'onKernelFinishRequest', + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php new file mode 100644 index 0000000000000000000000000000000000000000..09a4f558fe749d39f9cd7483ad7e075141736660 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php @@ -0,0 +1,242 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; +use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; +use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; +use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; +use Symfony\Component\Security\Core\Security; +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Exception\SessionUnavailableException; +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; +use Symfony\Component\Security\Http\SecurityEvents; +use Symfony\Component\Security\Http\HttpUtils; + +/** + * The AbstractAuthenticationListener is the preferred base class for all + * browser-/HTTP-based authentication requests. + * + * Subclasses likely have to implement the following: + * - an TokenInterface to hold authentication related data + * - an AuthenticationProvider to perform the actual authentication of the + * token, retrieve the UserInterface implementation from a database, and + * perform the specific account checks using the UserChecker + * + * By default, this listener only is active for a specific path, e.g. + * /login_check. If you want to change this behavior, you can overwrite the + * requiresAuthentication() method. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +abstract class AbstractAuthenticationListener implements ListenerInterface +{ + protected $options; + protected $logger; + protected $authenticationManager; + protected $providerKey; + protected $httpUtils; + + private $tokenStorage; + private $sessionStrategy; + private $dispatcher; + private $successHandler; + private $failureHandler; + private $rememberMeServices; + + /** + * Constructor. + * + * @param TokenStorageInterface $tokenStorage A TokenStorageInterface instance + * @param AuthenticationManagerInterface $authenticationManager An AuthenticationManagerInterface instance + * @param SessionAuthenticationStrategyInterface $sessionStrategy + * @param HttpUtils $httpUtils An HttpUtilsInterface instance + * @param string $providerKey + * @param AuthenticationSuccessHandlerInterface $successHandler + * @param AuthenticationFailureHandlerInterface $failureHandler + * @param array $options An array of options for the processing of a + * successful, or failed authentication attempt + * @param LoggerInterface $logger A LoggerInterface instance + * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance + * + * @throws \InvalidArgumentException + */ + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = array(), LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) + { + if (empty($providerKey)) { + throw new \InvalidArgumentException('$providerKey must not be empty.'); + } + + $this->tokenStorage = $tokenStorage; + $this->authenticationManager = $authenticationManager; + $this->sessionStrategy = $sessionStrategy; + $this->providerKey = $providerKey; + $this->successHandler = $successHandler; + $this->failureHandler = $failureHandler; + $this->options = array_merge(array( + 'check_path' => '/login_check', + 'login_path' => '/login', + 'always_use_default_target_path' => false, + 'default_target_path' => '/', + 'target_path_parameter' => '_target_path', + 'use_referer' => false, + 'failure_path' => null, + 'failure_forward' => false, + 'require_previous_session' => true, + ), $options); + $this->logger = $logger; + $this->dispatcher = $dispatcher; + $this->httpUtils = $httpUtils; + } + + /** + * Sets the RememberMeServices implementation to use. + * + * @param RememberMeServicesInterface $rememberMeServices + */ + public function setRememberMeServices(RememberMeServicesInterface $rememberMeServices) + { + $this->rememberMeServices = $rememberMeServices; + } + + /** + * Handles form based authentication. + * + * @param GetResponseEvent $event A GetResponseEvent instance + * + * @throws \RuntimeException + * @throws SessionUnavailableException + */ + final public function handle(GetResponseEvent $event) + { + $request = $event->getRequest(); + + if (!$this->requiresAuthentication($request)) { + return; + } + + if (!$request->hasSession()) { + throw new \RuntimeException('This authentication method requires a session.'); + } + + try { + if ($this->options['require_previous_session'] && !$request->hasPreviousSession()) { + throw new SessionUnavailableException('Your session has timed out, or you have disabled cookies.'); + } + + if (null === $returnValue = $this->attemptAuthentication($request)) { + return; + } + + if ($returnValue instanceof TokenInterface) { + $this->sessionStrategy->onAuthentication($request, $returnValue); + + $response = $this->onSuccess($request, $returnValue); + } elseif ($returnValue instanceof Response) { + $response = $returnValue; + } else { + throw new \RuntimeException('attemptAuthentication() must either return a Response, an implementation of TokenInterface, or null.'); + } + } catch (AuthenticationException $e) { + $response = $this->onFailure($request, $e); + } + + $event->setResponse($response); + } + + /** + * Whether this request requires authentication. + * + * The default implementation only processes requests to a specific path, + * but a subclass could change this to only authenticate requests where a + * certain parameters is present. + * + * @param Request $request + * + * @return bool + */ + protected function requiresAuthentication(Request $request) + { + return $this->httpUtils->checkRequestPath($request, $this->options['check_path']); + } + + /** + * Performs authentication. + * + * @param Request $request A Request instance + * + * @return TokenInterface|Response|null The authenticated token, null if full authentication is not possible, or a Response + * + * @throws AuthenticationException if the authentication fails + */ + abstract protected function attemptAuthentication(Request $request); + + private function onFailure(Request $request, AuthenticationException $failed) + { + if (null !== $this->logger) { + $this->logger->info('Authentication request failed.', array('exception' => $failed)); + } + + $token = $this->tokenStorage->getToken(); + if ($token instanceof UsernamePasswordToken && $this->providerKey === $token->getProviderKey()) { + $this->tokenStorage->setToken(null); + } + + $response = $this->failureHandler->onAuthenticationFailure($request, $failed); + + if (!$response instanceof Response) { + throw new \RuntimeException('Authentication Failure Handler did not return a Response.'); + } + + return $response; + } + + private function onSuccess(Request $request, TokenInterface $token) + { + if (null !== $this->logger) { + $this->logger->info('User has been authenticated successfully.', array('username' => $token->getUsername())); + } + + $this->tokenStorage->setToken($token); + + $session = $request->getSession(); + $session->remove(Security::AUTHENTICATION_ERROR); + $session->remove(Security::LAST_USERNAME); + + if (null !== $this->dispatcher) { + $loginEvent = new InteractiveLoginEvent($request, $token); + $this->dispatcher->dispatch(SecurityEvents::INTERACTIVE_LOGIN, $loginEvent); + } + + $response = $this->successHandler->onAuthenticationSuccess($request, $token); + + if (!$response instanceof Response) { + throw new \RuntimeException('Authentication Success Handler did not return a Response.'); + } + + if (null !== $this->rememberMeServices) { + $this->rememberMeServices->loginSuccess($request, $response, $token); + } + + return $response; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php new file mode 100644 index 0000000000000000000000000000000000000000..b793310d9b33636fa830dc283f9cd8f3774985b8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; +use Symfony\Component\Security\Http\SecurityEvents; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; + +/** + * AbstractPreAuthenticatedListener is the base class for all listener that + * authenticates users based on a pre-authenticated request (like a certificate + * for instance). + * + * @author Fabien Potencier + */ +abstract class AbstractPreAuthenticatedListener implements ListenerInterface +{ + protected $logger; + private $tokenStorage; + private $authenticationManager; + private $providerKey; + private $dispatcher; + + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, $providerKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) + { + $this->tokenStorage = $tokenStorage; + $this->authenticationManager = $authenticationManager; + $this->providerKey = $providerKey; + $this->logger = $logger; + $this->dispatcher = $dispatcher; + } + + /** + * Handles pre-authentication. + * + * @param GetResponseEvent $event A GetResponseEvent instance + */ + final public function handle(GetResponseEvent $event) + { + $request = $event->getRequest(); + + try { + list($user, $credentials) = $this->getPreAuthenticatedData($request); + } catch (BadCredentialsException $e) { + $this->clearToken($e); + + return; + } + + if (null !== $this->logger) { + $this->logger->debug('Checking current security token.', array('token' => (string) $this->tokenStorage->getToken())); + } + + if (null !== $token = $this->tokenStorage->getToken()) { + if ($token instanceof PreAuthenticatedToken && $this->providerKey == $token->getProviderKey() && $token->isAuthenticated() && $token->getUsername() === $user) { + return; + } + } + + if (null !== $this->logger) { + $this->logger->debug('Trying to pre-authenticate user.', array('username' => (string) $user)); + } + + try { + $token = $this->authenticationManager->authenticate(new PreAuthenticatedToken($user, $credentials, $this->providerKey)); + + if (null !== $this->logger) { + $this->logger->info('Pre-authentication successful.', array('token' => (string) $token)); + } + $this->tokenStorage->setToken($token); + + if (null !== $this->dispatcher) { + $loginEvent = new InteractiveLoginEvent($request, $token); + $this->dispatcher->dispatch(SecurityEvents::INTERACTIVE_LOGIN, $loginEvent); + } + } catch (AuthenticationException $e) { + $this->clearToken($e); + } + } + + /** + * Clears a PreAuthenticatedToken for this provider (if present). + * + * @param AuthenticationException $exception + */ + private function clearToken(AuthenticationException $exception) + { + $token = $this->tokenStorage->getToken(); + if ($token instanceof PreAuthenticatedToken && $this->providerKey === $token->getProviderKey()) { + $this->tokenStorage->setToken(null); + + if (null !== $this->logger) { + $this->logger->info('Cleared security token due to an exception.', array('exception' => $exception)); + } + } + } + + /** + * Gets the user and credentials from the Request. + * + * @param Request $request A Request instance + * + * @return array An array composed of the user and the credentials + */ + abstract protected function getPreAuthenticatedData(Request $request); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AccessListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AccessListener.php new file mode 100644 index 0000000000000000000000000000000000000000..75798b9dd3b2e839986306e8e04728c291432e59 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AccessListener.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface; +use Symfony\Component\Security\Http\AccessMapInterface; +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException; +use Symfony\Component\Security\Core\Exception\AccessDeniedException; + +/** + * AccessListener enforces access control rules. + * + * @author Fabien Potencier + */ +class AccessListener implements ListenerInterface +{ + private $tokenStorage; + private $accessDecisionManager; + private $map; + private $authManager; + + public function __construct(TokenStorageInterface $tokenStorage, AccessDecisionManagerInterface $accessDecisionManager, AccessMapInterface $map, AuthenticationManagerInterface $authManager) + { + $this->tokenStorage = $tokenStorage; + $this->accessDecisionManager = $accessDecisionManager; + $this->map = $map; + $this->authManager = $authManager; + } + + /** + * Handles access authorization. + * + * @param GetResponseEvent $event A GetResponseEvent instance + * + * @throws AccessDeniedException + * @throws AuthenticationCredentialsNotFoundException + */ + public function handle(GetResponseEvent $event) + { + if (null === $token = $this->tokenStorage->getToken()) { + throw new AuthenticationCredentialsNotFoundException('A Token was not found in the TokenStorage.'); + } + + $request = $event->getRequest(); + + list($attributes) = $this->map->getPatterns($request); + + if (null === $attributes) { + return; + } + + if (!$token->isAuthenticated()) { + $token = $this->authManager->authenticate($token); + $this->tokenStorage->setToken($token); + } + + if (!$this->accessDecisionManager->decide($token, $attributes, $request)) { + $exception = new AccessDeniedException(); + $exception->setAttributes($attributes); + $exception->setSubject($request); + + throw $exception; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php new file mode 100644 index 0000000000000000000000000000000000000000..0d60673a49c503c5c158ea665ef27964338014d4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; + +/** + * AnonymousAuthenticationListener automatically adds a Token if none is + * already present. + * + * @author Fabien Potencier + */ +class AnonymousAuthenticationListener implements ListenerInterface +{ + private $tokenStorage; + private $secret; + private $authenticationManager; + private $logger; + + public function __construct(TokenStorageInterface $tokenStorage, $secret, LoggerInterface $logger = null, AuthenticationManagerInterface $authenticationManager = null) + { + $this->tokenStorage = $tokenStorage; + $this->secret = $secret; + $this->authenticationManager = $authenticationManager; + $this->logger = $logger; + } + + /** + * Handles anonymous authentication. + * + * @param GetResponseEvent $event A GetResponseEvent instance + */ + public function handle(GetResponseEvent $event) + { + if (null !== $this->tokenStorage->getToken()) { + return; + } + + try { + $token = new AnonymousToken($this->secret, 'anon.', array()); + if (null !== $this->authenticationManager) { + $token = $this->authenticationManager->authenticate($token); + } + + $this->tokenStorage->setToken($token); + + if (null !== $this->logger) { + $this->logger->info('Populated the TokenStorage with an anonymous Token.'); + } + } catch (AuthenticationException $failed) { + if (null !== $this->logger) { + $this->logger->info('Anonymous authentication failed.', array('exception' => $failed)); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php new file mode 100644 index 0000000000000000000000000000000000000000..5bbf13d9b8434c7bb5ca9f8bb176b93c2ffea98a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.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\Component\Security\Http\Firewall; + +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\Exception\AuthenticationException; + +/** + * BasicAuthenticationListener implements Basic HTTP authentication. + * + * @author Fabien Potencier + */ +class BasicAuthenticationListener implements ListenerInterface +{ + private $tokenStorage; + private $authenticationManager; + private $providerKey; + private $authenticationEntryPoint; + private $logger; + private $ignoreFailure; + + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint, LoggerInterface $logger = null) + { + if (empty($providerKey)) { + throw new \InvalidArgumentException('$providerKey must not be empty.'); + } + + $this->tokenStorage = $tokenStorage; + $this->authenticationManager = $authenticationManager; + $this->providerKey = $providerKey; + $this->authenticationEntryPoint = $authenticationEntryPoint; + $this->logger = $logger; + $this->ignoreFailure = false; + } + + /** + * Handles basic authentication. + * + * @param GetResponseEvent $event A GetResponseEvent instance + */ + public function handle(GetResponseEvent $event) + { + $request = $event->getRequest(); + + if (null === $username = $request->headers->get('PHP_AUTH_USER')) { + return; + } + + if (null !== $token = $this->tokenStorage->getToken()) { + if ($token instanceof UsernamePasswordToken && $token->isAuthenticated() && $token->getUsername() === $username) { + return; + } + } + + if (null !== $this->logger) { + $this->logger->info('Basic authentication Authorization header found for user.', array('username' => $username)); + } + + try { + $token = $this->authenticationManager->authenticate(new UsernamePasswordToken($username, $request->headers->get('PHP_AUTH_PW'), $this->providerKey)); + $this->tokenStorage->setToken($token); + } catch (AuthenticationException $e) { + $token = $this->tokenStorage->getToken(); + if ($token instanceof UsernamePasswordToken && $this->providerKey === $token->getProviderKey()) { + $this->tokenStorage->setToken(null); + } + + if (null !== $this->logger) { + $this->logger->info('Basic authentication failed for user.', array('username' => $username, 'exception' => $e)); + } + + if ($this->ignoreFailure) { + return; + } + + $event->setResponse($this->authenticationEntryPoint->start($request, $e)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ChannelListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ChannelListener.php new file mode 100644 index 0000000000000000000000000000000000000000..637a7f5492e5f166288bab1898952463d69449df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ChannelListener.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\Security\Http\AccessMapInterface; +use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; + +/** + * ChannelListener switches the HTTP protocol based on the access control + * configuration. + * + * @author Fabien Potencier + */ +class ChannelListener implements ListenerInterface +{ + private $map; + private $authenticationEntryPoint; + private $logger; + + public function __construct(AccessMapInterface $map, AuthenticationEntryPointInterface $authenticationEntryPoint, LoggerInterface $logger = null) + { + $this->map = $map; + $this->authenticationEntryPoint = $authenticationEntryPoint; + $this->logger = $logger; + } + + /** + * Handles channel management. + * + * @param GetResponseEvent $event A GetResponseEvent instance + */ + public function handle(GetResponseEvent $event) + { + $request = $event->getRequest(); + + list(, $channel) = $this->map->getPatterns($request); + + if ('https' === $channel && !$request->isSecure()) { + if (null !== $this->logger) { + $this->logger->info('Redirecting to HTTPS.'); + } + + $response = $this->authenticationEntryPoint->start($request); + + $event->setResponse($response); + + return; + } + + if ('http' === $channel && $request->isSecure()) { + if (null !== $this->logger) { + $this->logger->info('Redirecting to HTTP.'); + } + + $response = $this->authenticationEntryPoint->start($request); + + $event->setResponse($response); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ContextListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ContextListener.php new file mode 100644 index 0000000000000000000000000000000000000000..e1e5161a1d52b6e6de1d81f0dd93c5723d0b5bff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ContextListener.php @@ -0,0 +1,187 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver; +use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; +use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; +use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Exception\UnsupportedUserException; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * ContextListener manages the SecurityContext persistence through a session. + * + * @author Fabien Potencier + * @author Johannes M. Schmitt + */ +class ContextListener implements ListenerInterface +{ + private $tokenStorage; + private $contextKey; + private $sessionKey; + private $logger; + private $userProviders; + private $dispatcher; + private $registered; + private $trustResolver; + + public function __construct(TokenStorageInterface $tokenStorage, array $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, AuthenticationTrustResolverInterface $trustResolver = null) + { + if (empty($contextKey)) { + throw new \InvalidArgumentException('$contextKey must not be empty.'); + } + + foreach ($userProviders as $userProvider) { + if (!$userProvider instanceof UserProviderInterface) { + throw new \InvalidArgumentException(sprintf('User provider "%s" must implement "Symfony\Component\Security\Core\User\UserProviderInterface".', get_class($userProvider))); + } + } + + $this->tokenStorage = $tokenStorage; + $this->userProviders = $userProviders; + $this->contextKey = $contextKey; + $this->sessionKey = '_security_'.$contextKey; + $this->logger = $logger; + $this->dispatcher = $dispatcher; + $this->trustResolver = $trustResolver ?: new AuthenticationTrustResolver(AnonymousToken::class, RememberMeToken::class); + } + + /** + * Reads the Security Token from the session. + * + * @param GetResponseEvent $event A GetResponseEvent instance + */ + public function handle(GetResponseEvent $event) + { + if (!$this->registered && null !== $this->dispatcher && $event->isMasterRequest()) { + $this->dispatcher->addListener(KernelEvents::RESPONSE, array($this, 'onKernelResponse')); + $this->registered = true; + } + + $request = $event->getRequest(); + $session = $request->hasPreviousSession() ? $request->getSession() : null; + + if (null === $session || null === $token = $session->get($this->sessionKey)) { + $this->tokenStorage->setToken(null); + + return; + } + + $token = unserialize($token); + + if (null !== $this->logger) { + $this->logger->debug('Read existing security token from the session.', array('key' => $this->sessionKey)); + } + + if ($token instanceof TokenInterface) { + $token = $this->refreshUser($token); + } elseif (null !== $token) { + if (null !== $this->logger) { + $this->logger->warning('Expected a security token from the session, got something else.', array('key' => $this->sessionKey, 'received' => $token)); + } + + $token = null; + } + + $this->tokenStorage->setToken($token); + } + + /** + * Writes the security token into the session. + * + * @param FilterResponseEvent $event A FilterResponseEvent instance + */ + public function onKernelResponse(FilterResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + + if (!$event->getRequest()->hasSession()) { + return; + } + + $this->dispatcher->removeListener(KernelEvents::RESPONSE, array($this, 'onKernelResponse')); + $this->registered = false; + + $request = $event->getRequest(); + $session = $request->getSession(); + + if ((null === $token = $this->tokenStorage->getToken()) || $this->trustResolver->isAnonymous($token)) { + if ($request->hasPreviousSession()) { + $session->remove($this->sessionKey); + } + } else { + $session->set($this->sessionKey, serialize($token)); + + if (null !== $this->logger) { + $this->logger->debug('Stored the security token in the session.', array('key' => $this->sessionKey)); + } + } + } + + /** + * Refreshes the user by reloading it from the user provider. + * + * @param TokenInterface $token + * + * @return TokenInterface|null + * + * @throws \RuntimeException + */ + protected function refreshUser(TokenInterface $token) + { + $user = $token->getUser(); + if (!$user instanceof UserInterface) { + return $token; + } + + $userNotFoundByProvider = false; + + foreach ($this->userProviders as $provider) { + try { + $refreshedUser = $provider->refreshUser($user); + $token->setUser($refreshedUser); + + if (null !== $this->logger) { + $this->logger->debug('User was reloaded from a user provider.', array('username' => $refreshedUser->getUsername(), 'provider' => get_class($provider))); + } + + return $token; + } catch (UnsupportedUserException $e) { + // let's try the next user provider + } catch (UsernameNotFoundException $e) { + if (null !== $this->logger) { + $this->logger->warning('Username could not be found in the selected user provider.', array('username' => $e->getUsername(), 'provider' => get_class($provider))); + } + + $userNotFoundByProvider = true; + } + } + + if ($userNotFoundByProvider) { + return; + } + + throw new \RuntimeException(sprintf('There is no user provider for user "%s".', get_class($user))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php new file mode 100644 index 0000000000000000000000000000000000000000..4479a5cae9dc1a3d75ee9fa68791cd6f7363c3ab --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php @@ -0,0 +1,219 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Component\Security\Http\EntryPoint\DigestAuthenticationEntryPoint; +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\Security\Core\Exception\AuthenticationServiceException; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Exception\NonceExpiredException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Exception\AuthenticationException; + +/** + * DigestAuthenticationListener implements Digest HTTP authentication. + * + * @author Fabien Potencier + */ +class DigestAuthenticationListener implements ListenerInterface +{ + private $tokenStorage; + private $provider; + private $providerKey; + private $authenticationEntryPoint; + private $logger; + + public function __construct(TokenStorageInterface $tokenStorage, UserProviderInterface $provider, $providerKey, DigestAuthenticationEntryPoint $authenticationEntryPoint, LoggerInterface $logger = null) + { + if (empty($providerKey)) { + throw new \InvalidArgumentException('$providerKey must not be empty.'); + } + + $this->tokenStorage = $tokenStorage; + $this->provider = $provider; + $this->providerKey = $providerKey; + $this->authenticationEntryPoint = $authenticationEntryPoint; + $this->logger = $logger; + } + + /** + * Handles digest authentication. + * + * @param GetResponseEvent $event A GetResponseEvent instance + * + * @throws AuthenticationServiceException + */ + public function handle(GetResponseEvent $event) + { + $request = $event->getRequest(); + + if (!$header = $request->server->get('PHP_AUTH_DIGEST')) { + return; + } + + $digestAuth = new DigestData($header); + + if (null !== $token = $this->tokenStorage->getToken()) { + if ($token instanceof UsernamePasswordToken && $token->isAuthenticated() && $token->getUsername() === $digestAuth->getUsername()) { + return; + } + } + + if (null !== $this->logger) { + $this->logger->debug('Digest Authorization header received from user agent.', array('header' => $header)); + } + + try { + $digestAuth->validateAndDecode($this->authenticationEntryPoint->getSecret(), $this->authenticationEntryPoint->getRealmName()); + } catch (BadCredentialsException $e) { + $this->fail($event, $request, $e); + + return; + } + + try { + $user = $this->provider->loadUserByUsername($digestAuth->getUsername()); + + if (null === $user) { + throw new AuthenticationServiceException('Digest User provider returned null, which is an interface contract violation'); + } + + $serverDigestMd5 = $digestAuth->calculateServerDigest($user->getPassword(), $request->getMethod()); + } catch (UsernameNotFoundException $e) { + $this->fail($event, $request, new BadCredentialsException(sprintf('Username %s not found.', $digestAuth->getUsername()))); + + return; + } + + if (!hash_equals($serverDigestMd5, $digestAuth->getResponse())) { + if (null !== $this->logger) { + $this->logger->debug('Unexpected response from the DigestAuth received; is the header returning a clear text passwords?', array('expected' => $serverDigestMd5, 'received' => $digestAuth->getResponse())); + } + + $this->fail($event, $request, new BadCredentialsException('Incorrect response')); + + return; + } + + if ($digestAuth->isNonceExpired()) { + $this->fail($event, $request, new NonceExpiredException('Nonce has expired/timed out.')); + + return; + } + + if (null !== $this->logger) { + $this->logger->info('Digest authentication successful.', array('username' => $digestAuth->getUsername(), 'received' => $digestAuth->getResponse())); + } + + $this->tokenStorage->setToken(new UsernamePasswordToken($user, $user->getPassword(), $this->providerKey)); + } + + private function fail(GetResponseEvent $event, Request $request, AuthenticationException $authException) + { + $token = $this->tokenStorage->getToken(); + if ($token instanceof UsernamePasswordToken && $this->providerKey === $token->getProviderKey()) { + $this->tokenStorage->setToken(null); + } + + if (null !== $this->logger) { + $this->logger->info('Digest authentication failed.', array('exception' => $authException)); + } + + $event->setResponse($this->authenticationEntryPoint->start($request, $authException)); + } +} + +class DigestData +{ + private $elements = array(); + private $header; + private $nonceExpiryTime; + + public function __construct($header) + { + $this->header = $header; + preg_match_all('/(\w+)=("((?:[^"\\\\]|\\\\.)+)"|([^\s,$]+))/', $header, $matches, PREG_SET_ORDER); + foreach ($matches as $match) { + if (isset($match[1]) && isset($match[3])) { + $this->elements[$match[1]] = isset($match[4]) ? $match[4] : $match[3]; + } + } + } + + public function getResponse() + { + return $this->elements['response']; + } + + public function getUsername() + { + return strtr($this->elements['username'], array('\\"' => '"', '\\\\' => '\\')); + } + + public function validateAndDecode($entryPointKey, $expectedRealm) + { + if ($keys = array_diff(array('username', 'realm', 'nonce', 'uri', 'response'), array_keys($this->elements))) { + throw new BadCredentialsException(sprintf('Missing mandatory digest value; received header "%s" (%s)', $this->header, implode(', ', $keys))); + } + + if ('auth' === $this->elements['qop'] && !isset($this->elements['nc'], $this->elements['cnonce'])) { + throw new BadCredentialsException(sprintf('Missing mandatory digest value; received header "%s"', $this->header)); + } + + if ($expectedRealm !== $this->elements['realm']) { + throw new BadCredentialsException(sprintf('Response realm name "%s" does not match system realm name of "%s".', $this->elements['realm'], $expectedRealm)); + } + + if (false === $nonceAsPlainText = base64_decode($this->elements['nonce'])) { + throw new BadCredentialsException(sprintf('Nonce is not encoded in Base64; received nonce "%s".', $this->elements['nonce'])); + } + + $nonceTokens = explode(':', $nonceAsPlainText); + + if (2 !== count($nonceTokens)) { + throw new BadCredentialsException(sprintf('Nonce should have yielded two tokens but was "%s".', $nonceAsPlainText)); + } + + $this->nonceExpiryTime = $nonceTokens[0]; + + if (md5($this->nonceExpiryTime.':'.$entryPointKey) !== $nonceTokens[1]) { + throw new BadCredentialsException(sprintf('Nonce token compromised "%s".', $nonceAsPlainText)); + } + } + + public function calculateServerDigest($password, $httpMethod) + { + $a2Md5 = md5(strtoupper($httpMethod).':'.$this->elements['uri']); + $a1Md5 = md5($this->elements['username'].':'.$this->elements['realm'].':'.$password); + + $digest = $a1Md5.':'.$this->elements['nonce']; + if (!isset($this->elements['qop'])) { + } elseif ('auth' === $this->elements['qop']) { + $digest .= ':'.$this->elements['nc'].':'.$this->elements['cnonce'].':'.$this->elements['qop']; + } else { + throw new \InvalidArgumentException(sprintf('This method does not support a qop: "%s".', $this->elements['qop'])); + } + $digest .= ':'.$a2Md5; + + return md5($digest); + } + + public function isNonceExpired() + { + return $this->nonceExpiryTime < microtime(true); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php new file mode 100644 index 0000000000000000000000000000000000000000..3c9604ea7436b19edadde26fd0e0a9951cfe3267 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php @@ -0,0 +1,227 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Http\Authorization\AccessDeniedHandlerInterface; +use Symfony\Component\Security\Core\Security; +use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; +use Symfony\Component\Security\Core\Exception\AccountStatusException; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Exception\AccessDeniedException; +use Symfony\Component\Security\Core\Exception\InsufficientAuthenticationException; +use Symfony\Component\Security\Core\Exception\LogoutException; +use Symfony\Component\Security\Http\Util\TargetPathTrait; +use Symfony\Component\Security\Http\HttpUtils; +use Symfony\Component\HttpFoundation\Request; +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * ExceptionListener catches authentication exception and converts them to + * Response instances. + * + * @author Fabien Potencier + */ +class ExceptionListener +{ + use TargetPathTrait; + + private $tokenStorage; + private $providerKey; + private $accessDeniedHandler; + private $authenticationEntryPoint; + private $authenticationTrustResolver; + private $errorPage; + private $logger; + private $httpUtils; + private $stateless; + + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null, LoggerInterface $logger = null, $stateless = false) + { + $this->tokenStorage = $tokenStorage; + $this->accessDeniedHandler = $accessDeniedHandler; + $this->httpUtils = $httpUtils; + $this->providerKey = $providerKey; + $this->authenticationEntryPoint = $authenticationEntryPoint; + $this->authenticationTrustResolver = $trustResolver; + $this->errorPage = $errorPage; + $this->logger = $logger; + $this->stateless = $stateless; + } + + /** + * Registers a onKernelException listener to take care of security exceptions. + * + * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance + */ + public function register(EventDispatcherInterface $dispatcher) + { + $dispatcher->addListener(KernelEvents::EXCEPTION, array($this, 'onKernelException')); + } + + /** + * Unregisters the dispatcher. + * + * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance + */ + public function unregister(EventDispatcherInterface $dispatcher) + { + $dispatcher->removeListener(KernelEvents::EXCEPTION, array($this, 'onKernelException')); + } + + /** + * Handles security related exceptions. + * + * @param GetResponseForExceptionEvent $event An GetResponseForExceptionEvent instance + */ + public function onKernelException(GetResponseForExceptionEvent $event) + { + $exception = $event->getException(); + do { + if ($exception instanceof AuthenticationException) { + return $this->handleAuthenticationException($event, $exception); + } elseif ($exception instanceof AccessDeniedException) { + return $this->handleAccessDeniedException($event, $exception); + } elseif ($exception instanceof LogoutException) { + return $this->handleLogoutException($exception); + } + } while (null !== $exception = $exception->getPrevious()); + } + + private function handleAuthenticationException(GetResponseForExceptionEvent $event, AuthenticationException $exception) + { + if (null !== $this->logger) { + $this->logger->info('An AuthenticationException was thrown; redirecting to authentication entry point.', array('exception' => $exception)); + } + + try { + $event->setResponse($this->startAuthentication($event->getRequest(), $exception)); + } catch (\Exception $e) { + $event->setException($e); + } + } + + private function handleAccessDeniedException(GetResponseForExceptionEvent $event, AccessDeniedException $exception) + { + $event->setException(new AccessDeniedHttpException($exception->getMessage(), $exception)); + + $token = $this->tokenStorage->getToken(); + if (!$this->authenticationTrustResolver->isFullFledged($token)) { + if (null !== $this->logger) { + $this->logger->debug('Access denied, the user is not fully authenticated; redirecting to authentication entry point.', array('exception' => $exception)); + } + + try { + $insufficientAuthenticationException = new InsufficientAuthenticationException('Full authentication is required to access this resource.', 0, $exception); + $insufficientAuthenticationException->setToken($token); + + $event->setResponse($this->startAuthentication($event->getRequest(), $insufficientAuthenticationException)); + } catch (\Exception $e) { + $event->setException($e); + } + + return; + } + + if (null !== $this->logger) { + $this->logger->debug('Access denied, the user is neither anonymous, nor remember-me.', array('exception' => $exception)); + } + + try { + if (null !== $this->accessDeniedHandler) { + $response = $this->accessDeniedHandler->handle($event->getRequest(), $exception); + + if ($response instanceof Response) { + $event->setResponse($response); + } + } elseif (null !== $this->errorPage) { + $subRequest = $this->httpUtils->createRequest($event->getRequest(), $this->errorPage); + $subRequest->attributes->set(Security::ACCESS_DENIED_ERROR, $exception); + + $event->setResponse($event->getKernel()->handle($subRequest, HttpKernelInterface::SUB_REQUEST, true)); + } + } catch (\Exception $e) { + if (null !== $this->logger) { + $this->logger->error('An exception was thrown when handling an AccessDeniedException.', array('exception' => $e)); + } + + $event->setException(new \RuntimeException('Exception thrown when handling an exception.', 0, $e)); + } + } + + private function handleLogoutException(LogoutException $exception) + { + if (null !== $this->logger) { + $this->logger->info('A LogoutException was thrown.', array('exception' => $exception)); + } + } + + /** + * @param Request $request + * @param AuthenticationException $authException + * + * @return Response + * + * @throws AuthenticationException + */ + private function startAuthentication(Request $request, AuthenticationException $authException) + { + if (null === $this->authenticationEntryPoint) { + throw $authException; + } + + if (null !== $this->logger) { + $this->logger->debug('Calling Authentication entry point.'); + } + + if (!$this->stateless) { + $this->setTargetPath($request); + } + + if ($authException instanceof AccountStatusException) { + // remove the security token to prevent infinite redirect loops + $this->tokenStorage->setToken(null); + + if (null !== $this->logger) { + $this->logger->info('The security token was removed due to an AccountStatusException.', array('exception' => $authException)); + } + } + + $response = $this->authenticationEntryPoint->start($request, $authException); + + if (!$response instanceof Response) { + $given = is_object($response) ? get_class($response) : gettype($response); + + throw new \LogicException(sprintf('The %s::start() method must return a Response object (%s returned)', get_class($this->authenticationEntryPoint), $given)); + } + + return $response; + } + + /** + * @param Request $request + */ + protected function setTargetPath(Request $request) + { + // session isn't required when using HTTP basic authentication mechanism for example + if ($request->hasSession() && $request->isMethodSafe(false) && !$request->isXmlHttpRequest()) { + $this->saveTargetPath($request->getSession(), $this->providerKey, $request->getUri()); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..0fc8d11c3aee5f893c404dff9690caa55f3cecb8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ListenerInterface.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\Component\Security\Http\Firewall; + +use Symfony\Component\HttpKernel\Event\GetResponseEvent; + +/** + * Interface that must be implemented by firewall listeners. + * + * @author Johannes M. Schmitt + */ +interface ListenerInterface +{ + /** + * This interface must be implemented by firewall listeners. + * + * @param GetResponseEvent $event + */ + public function handle(GetResponseEvent $event); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php new file mode 100644 index 0000000000000000000000000000000000000000..47583bebf56e5473b17ea1d00818f2dfd34dd186 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php @@ -0,0 +1,132 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Exception\LogoutException; +use Symfony\Component\Security\Csrf\CsrfToken; +use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; +use Symfony\Component\Security\Http\HttpUtils; +use Symfony\Component\Security\Http\Logout\LogoutHandlerInterface; +use Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface; +use Symfony\Component\Security\Http\ParameterBagUtils; + +/** + * LogoutListener logout users. + * + * @author Fabien Potencier + */ +class LogoutListener implements ListenerInterface +{ + private $tokenStorage; + private $options; + private $handlers; + private $successHandler; + private $httpUtils; + private $csrfTokenManager; + + /** + * Constructor. + * + * @param TokenStorageInterface $tokenStorage + * @param HttpUtils $httpUtils An HttpUtilsInterface instance + * @param LogoutSuccessHandlerInterface $successHandler A LogoutSuccessHandlerInterface instance + * @param array $options An array of options to process a logout attempt + * @param CsrfTokenManagerInterface $csrfTokenManager A CsrfTokenManagerInterface instance + */ + public function __construct(TokenStorageInterface $tokenStorage, HttpUtils $httpUtils, LogoutSuccessHandlerInterface $successHandler, array $options = array(), CsrfTokenManagerInterface $csrfTokenManager = null) + { + $this->tokenStorage = $tokenStorage; + $this->httpUtils = $httpUtils; + $this->options = array_merge(array( + 'csrf_parameter' => '_csrf_token', + 'csrf_token_id' => 'logout', + 'logout_path' => '/logout', + ), $options); + $this->successHandler = $successHandler; + $this->csrfTokenManager = $csrfTokenManager; + $this->handlers = array(); + } + + /** + * Adds a logout handler. + * + * @param LogoutHandlerInterface $handler + */ + public function addHandler(LogoutHandlerInterface $handler) + { + $this->handlers[] = $handler; + } + + /** + * Performs the logout if requested. + * + * If a CsrfTokenManagerInterface instance is available, it will be used to + * validate the request. + * + * @param GetResponseEvent $event A GetResponseEvent instance + * + * @throws LogoutException if the CSRF token is invalid + * @throws \RuntimeException if the LogoutSuccessHandlerInterface instance does not return a response + */ + public function handle(GetResponseEvent $event) + { + $request = $event->getRequest(); + + if (!$this->requiresLogout($request)) { + return; + } + + if (null !== $this->csrfTokenManager) { + $csrfToken = ParameterBagUtils::getRequestParameterValue($request, $this->options['csrf_parameter']); + + if (false === $this->csrfTokenManager->isTokenValid(new CsrfToken($this->options['csrf_token_id'], $csrfToken))) { + throw new LogoutException('Invalid CSRF token.'); + } + } + + $response = $this->successHandler->onLogoutSuccess($request); + if (!$response instanceof Response) { + throw new \RuntimeException('Logout Success Handler did not return a Response.'); + } + + // handle multiple logout attempts gracefully + if ($token = $this->tokenStorage->getToken()) { + foreach ($this->handlers as $handler) { + $handler->logout($request, $response, $token); + } + } + + $this->tokenStorage->setToken(null); + + $event->setResponse($response); + } + + /** + * Whether this request is asking for logout. + * + * The default implementation only processed requests to a specific path, + * but a subclass could change this to logout requests where + * certain parameters is present. + * + * @param Request $request + * + * @return bool + */ + protected function requiresLogout(Request $request) + { + return $this->httpUtils->checkRequestPath($request, $this->options['logout_path']); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php new file mode 100644 index 0000000000000000000000000000000000000000..41864307089108efd3e73325596e83e8cfc27767 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; +use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; +use Symfony\Component\Security\Http\SecurityEvents; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; +use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy; + +/** + * RememberMeListener implements authentication capabilities via a cookie. + * + * @author Johannes M. Schmitt + */ +class RememberMeListener implements ListenerInterface +{ + private $tokenStorage; + private $rememberMeServices; + private $authenticationManager; + private $logger; + private $dispatcher; + private $catchExceptions = true; + private $sessionStrategy; + + /** + * Constructor. + * + * @param TokenStorageInterface $tokenStorage + * @param RememberMeServicesInterface $rememberMeServices + * @param AuthenticationManagerInterface $authenticationManager + * @param LoggerInterface $logger + * @param EventDispatcherInterface $dispatcher + * @param bool $catchExceptions + * @param SessionAuthenticationStrategyInterface $sessionStrategy + */ + public function __construct(TokenStorageInterface $tokenStorage, RememberMeServicesInterface $rememberMeServices, AuthenticationManagerInterface $authenticationManager, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, $catchExceptions = true, SessionAuthenticationStrategyInterface $sessionStrategy = null) + { + $this->tokenStorage = $tokenStorage; + $this->rememberMeServices = $rememberMeServices; + $this->authenticationManager = $authenticationManager; + $this->logger = $logger; + $this->dispatcher = $dispatcher; + $this->catchExceptions = $catchExceptions; + $this->sessionStrategy = null === $sessionStrategy ? new SessionAuthenticationStrategy(SessionAuthenticationStrategy::MIGRATE) : $sessionStrategy; + } + + /** + * Handles remember-me cookie based authentication. + * + * @param GetResponseEvent $event A GetResponseEvent instance + */ + public function handle(GetResponseEvent $event) + { + if (null !== $this->tokenStorage->getToken()) { + return; + } + + $request = $event->getRequest(); + if (null === $token = $this->rememberMeServices->autoLogin($request)) { + return; + } + + try { + $token = $this->authenticationManager->authenticate($token); + if ($request->hasSession() && $request->getSession()->isStarted()) { + $this->sessionStrategy->onAuthentication($request, $token); + } + $this->tokenStorage->setToken($token); + + if (null !== $this->dispatcher) { + $loginEvent = new InteractiveLoginEvent($request, $token); + $this->dispatcher->dispatch(SecurityEvents::INTERACTIVE_LOGIN, $loginEvent); + } + + if (null !== $this->logger) { + $this->logger->debug('Populated the token storage with a remember-me token.'); + } + } catch (AuthenticationException $e) { + if (null !== $this->logger) { + $this->logger->warning( + 'The token storage was not populated with remember-me token as the' + .' AuthenticationManager rejected the AuthenticationToken returned' + .' by the RememberMeServices.', array('exception' => $e) + ); + } + + $this->rememberMeServices->loginFail($request); + + if (!$this->catchExceptions) { + throw $e; + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RemoteUserAuthenticationListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RemoteUserAuthenticationListener.php new file mode 100644 index 0000000000000000000000000000000000000000..c42badff26a7d4e9ee5d53e3cf759fd02daaf685 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/RemoteUserAuthenticationListener.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * REMOTE_USER authentication listener. + * + * @author Fabien Potencier + * @author Maxime Douailin + */ +class RemoteUserAuthenticationListener extends AbstractPreAuthenticatedListener +{ + private $userKey; + + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, $providerKey, $userKey = 'REMOTE_USER', LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) + { + parent::__construct($tokenStorage, $authenticationManager, $providerKey, $logger, $dispatcher); + + $this->userKey = $userKey; + } + + /** + * {@inheritdoc} + */ + protected function getPreAuthenticatedData(Request $request) + { + if (!$request->server->has($this->userKey)) { + throw new BadCredentialsException(sprintf('User key was not found: %s', $this->userKey)); + } + + return array($request->server->get($this->userKey), null); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimpleFormAuthenticationListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimpleFormAuthenticationListener.php new file mode 100644 index 0000000000000000000000000000000000000000..7c940c36acdbea15c7088cf78aad81201e02ef8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimpleFormAuthenticationListener.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException; +use Symfony\Component\Security\Csrf\CsrfToken; +use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; +use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; +use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Http\Authentication\SimpleFormAuthenticatorInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\Security\Core\Security; +use Symfony\Component\Security\Http\HttpUtils; +use Symfony\Component\Security\Http\ParameterBagUtils; +use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; +use Psr\Log\LoggerInterface; + +/** + * @author Jordi Boggiano + */ +class SimpleFormAuthenticationListener extends AbstractAuthenticationListener +{ + private $simpleAuthenticator; + private $csrfTokenManager; + + /** + * Constructor. + * + * @param TokenStorageInterface $tokenStorage A TokenStorageInterface instance + * @param AuthenticationManagerInterface $authenticationManager An AuthenticationManagerInterface instance + * @param SessionAuthenticationStrategyInterface $sessionStrategy + * @param HttpUtils $httpUtils An HttpUtilsInterface instance + * @param string $providerKey + * @param AuthenticationSuccessHandlerInterface $successHandler + * @param AuthenticationFailureHandlerInterface $failureHandler + * @param array $options An array of options for the processing of a + * successful, or failed authentication attempt + * @param LoggerInterface $logger A LoggerInterface instance + * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance + * @param CsrfTokenManagerInterface $csrfTokenManager A CsrfTokenManagerInterface instance + * @param SimpleFormAuthenticatorInterface $simpleAuthenticator A SimpleFormAuthenticatorInterface instance + * + * @throws \InvalidArgumentException In case no simple authenticator is provided + */ + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = array(), LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, CsrfTokenManagerInterface $csrfTokenManager = null, SimpleFormAuthenticatorInterface $simpleAuthenticator = null) + { + if (!$simpleAuthenticator) { + throw new \InvalidArgumentException('Missing simple authenticator'); + } + + $this->simpleAuthenticator = $simpleAuthenticator; + $this->csrfTokenManager = $csrfTokenManager; + + $options = array_merge(array( + 'username_parameter' => '_username', + 'password_parameter' => '_password', + 'csrf_parameter' => '_csrf_token', + 'csrf_token_id' => 'authenticate', + 'post_only' => true, + ), $options); + + parent::__construct($tokenStorage, $authenticationManager, $sessionStrategy, $httpUtils, $providerKey, $successHandler, $failureHandler, $options, $logger, $dispatcher); + } + + /** + * {@inheritdoc} + */ + protected function requiresAuthentication(Request $request) + { + if ($this->options['post_only'] && !$request->isMethod('POST')) { + return false; + } + + return parent::requiresAuthentication($request); + } + + /** + * {@inheritdoc} + */ + protected function attemptAuthentication(Request $request) + { + if (null !== $this->csrfTokenManager) { + $csrfToken = ParameterBagUtils::getRequestParameterValue($request, $this->options['csrf_parameter']); + + if (false === $this->csrfTokenManager->isTokenValid(new CsrfToken($this->options['csrf_token_id'], $csrfToken))) { + throw new InvalidCsrfTokenException('Invalid CSRF token.'); + } + } + + if ($this->options['post_only']) { + $username = trim(ParameterBagUtils::getParameterBagValue($request->request, $this->options['username_parameter'])); + $password = ParameterBagUtils::getParameterBagValue($request->request, $this->options['password_parameter']); + } else { + $username = trim(ParameterBagUtils::getRequestParameterValue($request, $this->options['username_parameter'])); + $password = ParameterBagUtils::getRequestParameterValue($request, $this->options['password_parameter']); + } + + if (strlen($username) > Security::MAX_USERNAME_LENGTH) { + throw new BadCredentialsException('Invalid username.'); + } + + $request->getSession()->set(Security::LAST_USERNAME, $username); + + $token = $this->simpleAuthenticator->createToken($request, $username, $password, $this->providerKey); + + return $this->authenticationManager->authenticate($token); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimplePreAuthenticationListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimplePreAuthenticationListener.php new file mode 100644 index 0000000000000000000000000000000000000000..2b4b59350a0d67f812427b03f577d89430e7a3a8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SimplePreAuthenticationListener.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface; +use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; +use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; +use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; +use Symfony\Component\Security\Http\SecurityEvents; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * SimplePreAuthenticationListener implements simple proxying to an authenticator. + * + * @author Jordi Boggiano + */ +class SimplePreAuthenticationListener implements ListenerInterface +{ + private $tokenStorage; + private $authenticationManager; + private $providerKey; + private $simpleAuthenticator; + private $logger; + private $dispatcher; + + /** + * Constructor. + * + * @param TokenStorageInterface $tokenStorage A TokenStorageInterface instance + * @param AuthenticationManagerInterface $authenticationManager An AuthenticationManagerInterface instance + * @param string $providerKey + * @param SimplePreAuthenticatorInterface $simpleAuthenticator A SimplePreAuthenticatorInterface instance + * @param LoggerInterface $logger A LoggerInterface instance + * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance + */ + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, $providerKey, SimplePreAuthenticatorInterface $simpleAuthenticator, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) + { + if (empty($providerKey)) { + throw new \InvalidArgumentException('$providerKey must not be empty.'); + } + + $this->tokenStorage = $tokenStorage; + $this->authenticationManager = $authenticationManager; + $this->providerKey = $providerKey; + $this->simpleAuthenticator = $simpleAuthenticator; + $this->logger = $logger; + $this->dispatcher = $dispatcher; + } + + /** + * Handles basic authentication. + * + * @param GetResponseEvent $event A GetResponseEvent instance + */ + public function handle(GetResponseEvent $event) + { + $request = $event->getRequest(); + + if (null !== $this->logger) { + $this->logger->info('Attempting SimplePreAuthentication.', array('key' => $this->providerKey, 'authenticator' => get_class($this->simpleAuthenticator))); + } + + if (null !== $this->tokenStorage->getToken() && !$this->tokenStorage->getToken() instanceof AnonymousToken) { + return; + } + + try { + $token = $this->simpleAuthenticator->createToken($request, $this->providerKey); + + // allow null to be returned to skip authentication + if (null === $token) { + return; + } + + $token = $this->authenticationManager->authenticate($token); + $this->tokenStorage->setToken($token); + + if (null !== $this->dispatcher) { + $loginEvent = new InteractiveLoginEvent($request, $token); + $this->dispatcher->dispatch(SecurityEvents::INTERACTIVE_LOGIN, $loginEvent); + } + } catch (AuthenticationException $e) { + $this->tokenStorage->setToken(null); + + if (null !== $this->logger) { + $this->logger->info('SimplePreAuthentication request failed.', array('exception' => $e, 'authenticator' => get_class($this->simpleAuthenticator))); + } + + if ($this->simpleAuthenticator instanceof AuthenticationFailureHandlerInterface) { + $response = $this->simpleAuthenticator->onAuthenticationFailure($request, $e); + if ($response instanceof Response) { + $event->setResponse($response); + } elseif (null !== $response) { + throw new \UnexpectedValueException(sprintf('The %s::onAuthenticationFailure method must return null or a Response object', get_class($this->simpleAuthenticator))); + } + } + + return; + } + + if ($this->simpleAuthenticator instanceof AuthenticationSuccessHandlerInterface) { + $response = $this->simpleAuthenticator->onAuthenticationSuccess($request, $token); + if ($response instanceof Response) { + $event->setResponse($response); + } elseif (null !== $response) { + throw new \UnexpectedValueException(sprintf('The %s::onAuthenticationSuccess method must return null or a Response object', get_class($this->simpleAuthenticator))); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php new file mode 100644 index 0000000000000000000000000000000000000000..e9c3e4068d5309dd90d51a084d14e15447df229e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php @@ -0,0 +1,194 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\Security\Core\Exception\AccessDeniedException; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Component\Security\Core\User\UserCheckerInterface; +use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface; +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Role\SwitchUserRole; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Http\Event\SwitchUserEvent; +use Symfony\Component\Security\Http\SecurityEvents; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * SwitchUserListener allows a user to impersonate another one temporarily + * (like the Unix su command). + * + * @author Fabien Potencier + */ +class SwitchUserListener implements ListenerInterface +{ + private $tokenStorage; + private $provider; + private $userChecker; + private $providerKey; + private $accessDecisionManager; + private $usernameParameter; + private $role; + private $logger; + private $dispatcher; + + public function __construct(TokenStorageInterface $tokenStorage, UserProviderInterface $provider, UserCheckerInterface $userChecker, $providerKey, AccessDecisionManagerInterface $accessDecisionManager, LoggerInterface $logger = null, $usernameParameter = '_switch_user', $role = 'ROLE_ALLOWED_TO_SWITCH', EventDispatcherInterface $dispatcher = null) + { + if (empty($providerKey)) { + throw new \InvalidArgumentException('$providerKey must not be empty.'); + } + + $this->tokenStorage = $tokenStorage; + $this->provider = $provider; + $this->userChecker = $userChecker; + $this->providerKey = $providerKey; + $this->accessDecisionManager = $accessDecisionManager; + $this->usernameParameter = $usernameParameter; + $this->role = $role; + $this->logger = $logger; + $this->dispatcher = $dispatcher; + } + + /** + * Handles the switch to another user. + * + * @param GetResponseEvent $event A GetResponseEvent instance + * + * @throws \LogicException if switching to a user failed + */ + public function handle(GetResponseEvent $event) + { + $request = $event->getRequest(); + + if (!$request->get($this->usernameParameter)) { + return; + } + + if ('_exit' === $request->get($this->usernameParameter)) { + $this->tokenStorage->setToken($this->attemptExitUser($request)); + } else { + try { + $this->tokenStorage->setToken($this->attemptSwitchUser($request)); + } catch (AuthenticationException $e) { + throw new \LogicException(sprintf('Switch User failed: "%s"', $e->getMessage())); + } + } + + $request->query->remove($this->usernameParameter); + $request->server->set('QUERY_STRING', http_build_query($request->query->all())); + + $response = new RedirectResponse($request->getUri(), 302); + + $event->setResponse($response); + } + + /** + * Attempts to switch to another user. + * + * @param Request $request A Request instance + * + * @return TokenInterface|null The new TokenInterface if successfully switched, null otherwise + * + * @throws \LogicException + * @throws AccessDeniedException + */ + private function attemptSwitchUser(Request $request) + { + $token = $this->tokenStorage->getToken(); + $originalToken = $this->getOriginalToken($token); + + if (false !== $originalToken) { + if ($token->getUsername() === $request->get($this->usernameParameter)) { + return $token; + } + + throw new \LogicException(sprintf('You are already switched to "%s" user.', $token->getUsername())); + } + + if (false === $this->accessDecisionManager->decide($token, array($this->role))) { + $exception = new AccessDeniedException(); + $exception->setAttributes($this->role); + + throw $exception; + } + + $username = $request->get($this->usernameParameter); + + if (null !== $this->logger) { + $this->logger->info('Attempting to switch to user.', array('username' => $username)); + } + + $user = $this->provider->loadUserByUsername($username); + $this->userChecker->checkPostAuth($user); + + $roles = $user->getRoles(); + $roles[] = new SwitchUserRole('ROLE_PREVIOUS_ADMIN', $this->tokenStorage->getToken()); + + $token = new UsernamePasswordToken($user, $user->getPassword(), $this->providerKey, $roles); + + if (null !== $this->dispatcher) { + $switchEvent = new SwitchUserEvent($request, $token->getUser()); + $this->dispatcher->dispatch(SecurityEvents::SWITCH_USER, $switchEvent); + } + + return $token; + } + + /** + * Attempts to exit from an already switched user. + * + * @param Request $request A Request instance + * + * @return TokenInterface The original TokenInterface instance + * + * @throws AuthenticationCredentialsNotFoundException + */ + private function attemptExitUser(Request $request) + { + if (false === $original = $this->getOriginalToken($this->tokenStorage->getToken())) { + throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.'); + } + + if (null !== $this->dispatcher && $original->getUser() instanceof UserInterface) { + $user = $this->provider->refreshUser($original->getUser()); + $switchEvent = new SwitchUserEvent($request, $user); + $this->dispatcher->dispatch(SecurityEvents::SWITCH_USER, $switchEvent); + } + + return $original; + } + + /** + * Gets the original Token from a switched one. + * + * @param TokenInterface $token A switched TokenInterface instance + * + * @return TokenInterface|false The original TokenInterface instance, false if the current TokenInterface is not switched + */ + private function getOriginalToken(TokenInterface $token) + { + foreach ($token->getRoles() as $role) { + if ($role instanceof SwitchUserRole) { + return $role->getSource(); + } + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php new file mode 100644 index 0000000000000000000000000000000000000000..426457d18267a62ee55213562ab4870113750eb5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\HttpFoundation\Request; +use Psr\Log\LoggerInterface; +use Symfony\Component\Security\Csrf\CsrfToken; +use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; +use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; +use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; +use Symfony\Component\Security\Http\ParameterBagUtils; +use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; +use Symfony\Component\Security\Http\HttpUtils; +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException; +use Symfony\Component\Security\Core\Security; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * UsernamePasswordFormAuthenticationListener is the default implementation of + * an authentication via a simple form composed of a username and a password. + * + * @author Fabien Potencier + */ +class UsernamePasswordFormAuthenticationListener extends AbstractAuthenticationListener +{ + private $csrfTokenManager; + + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = array(), LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, CsrfTokenManagerInterface $csrfTokenManager = null) + { + parent::__construct($tokenStorage, $authenticationManager, $sessionStrategy, $httpUtils, $providerKey, $successHandler, $failureHandler, array_merge(array( + 'username_parameter' => '_username', + 'password_parameter' => '_password', + 'csrf_parameter' => '_csrf_token', + 'csrf_token_id' => 'authenticate', + 'post_only' => true, + ), $options), $logger, $dispatcher); + + $this->csrfTokenManager = $csrfTokenManager; + } + + /** + * {@inheritdoc} + */ + protected function requiresAuthentication(Request $request) + { + if ($this->options['post_only'] && !$request->isMethod('POST')) { + return false; + } + + return parent::requiresAuthentication($request); + } + + /** + * {@inheritdoc} + */ + protected function attemptAuthentication(Request $request) + { + if (null !== $this->csrfTokenManager) { + $csrfToken = ParameterBagUtils::getRequestParameterValue($request, $this->options['csrf_parameter']); + + if (false === $this->csrfTokenManager->isTokenValid(new CsrfToken($this->options['csrf_token_id'], $csrfToken))) { + throw new InvalidCsrfTokenException('Invalid CSRF token.'); + } + } + + if ($this->options['post_only']) { + $username = trim(ParameterBagUtils::getParameterBagValue($request->request, $this->options['username_parameter'])); + $password = ParameterBagUtils::getParameterBagValue($request->request, $this->options['password_parameter']); + } else { + $username = trim(ParameterBagUtils::getRequestParameterValue($request, $this->options['username_parameter'])); + $password = ParameterBagUtils::getRequestParameterValue($request, $this->options['password_parameter']); + } + + if (strlen($username) > Security::MAX_USERNAME_LENGTH) { + throw new BadCredentialsException('Invalid username.'); + } + + $request->getSession()->set(Security::LAST_USERNAME, $username); + + return $this->authenticationManager->authenticate(new UsernamePasswordToken($username, $password, $this->providerKey)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/X509AuthenticationListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/X509AuthenticationListener.php new file mode 100644 index 0000000000000000000000000000000000000000..326c9af3ba962dc4f5a87931cb8c58040ca1959b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/X509AuthenticationListener.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Firewall; + +use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Psr\Log\LoggerInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * X509 authentication listener. + * + * @author Fabien Potencier + */ +class X509AuthenticationListener extends AbstractPreAuthenticatedListener +{ + private $userKey; + private $credentialKey; + + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, $providerKey, $userKey = 'SSL_CLIENT_S_DN_Email', $credentialKey = 'SSL_CLIENT_S_DN', LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) + { + parent::__construct($tokenStorage, $authenticationManager, $providerKey, $logger, $dispatcher); + + $this->userKey = $userKey; + $this->credentialKey = $credentialKey; + } + + /** + * {@inheritdoc} + */ + protected function getPreAuthenticatedData(Request $request) + { + $user = null; + if ($request->server->has($this->userKey)) { + $user = $request->server->get($this->userKey); + } elseif ($request->server->has($this->credentialKey) && preg_match('#/emailAddress=(.+\@.+\..+)(/|$)#', $request->server->get($this->credentialKey), $matches)) { + $user = $matches[1]; + } + + if (null === $user) { + throw new BadCredentialsException(sprintf('SSL credentials not found: %s, %s', $this->userKey, $this->credentialKey)); + } + + return array($user, $request->server->get($this->credentialKey, '')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMap.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMap.php new file mode 100644 index 0000000000000000000000000000000000000000..1bb73bd2932b44bfaa130a082366c638faec2e35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMap.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http; + +use Symfony\Component\HttpFoundation\RequestMatcherInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Http\Firewall\ExceptionListener; + +/** + * FirewallMap allows configuration of different firewalls for specific parts + * of the website. + * + * @author Fabien Potencier + */ +class FirewallMap implements FirewallMapInterface +{ + private $map = array(); + + /** + * @param RequestMatcherInterface $requestMatcher + * @param array $listeners + * @param ExceptionListener $exceptionListener + */ + public function add(RequestMatcherInterface $requestMatcher = null, array $listeners = array(), ExceptionListener $exceptionListener = null) + { + $this->map[] = array($requestMatcher, $listeners, $exceptionListener); + } + + /** + * {@inheritdoc} + */ + public function getListeners(Request $request) + { + foreach ($this->map as $elements) { + if (null === $elements[0] || $elements[0]->matches($request)) { + return array($elements[1], $elements[2]); + } + } + + return array(array(), null); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMapInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMapInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..1627ab5956d0d5ca55a01d8d668c2ab291948005 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/FirewallMapInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http; + +use Symfony\Component\HttpFoundation\Request; + +/** + * This interface must be implemented by firewall maps. + * + * @author Johannes M. Schmitt + */ +interface FirewallMapInterface +{ + /** + * Returns the authentication listeners, and the exception listener to use + * for the given request. + * + * If there are no authentication listeners, the first inner array must be + * empty. + * + * If there is no exception listener, the second element of the outer array + * must be null. + * + * @param Request $request + * + * @return array of the format array(array(AuthenticationListener), ExceptionListener) + */ + public function getListeners(Request $request); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/HttpUtils.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/HttpUtils.php new file mode 100644 index 0000000000000000000000000000000000000000..ed737a2f6169536e9eae5bb3b30d46139457cdb2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/HttpUtils.php @@ -0,0 +1,158 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\Routing\Matcher\UrlMatcherInterface; +use Symfony\Component\Routing\Matcher\RequestMatcherInterface; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Routing\Exception\MethodNotAllowedException; +use Symfony\Component\Routing\Exception\ResourceNotFoundException; +use Symfony\Component\Security\Core\Security; + +/** + * Encapsulates the logic needed to create sub-requests, redirect the user, and match URLs. + * + * @author Fabien Potencier + */ +class HttpUtils +{ + private $urlGenerator; + private $urlMatcher; + + /** + * Constructor. + * + * @param UrlGeneratorInterface $urlGenerator A UrlGeneratorInterface instance + * @param UrlMatcherInterface|RequestMatcherInterface $urlMatcher The URL or Request matcher + * + * @throws \InvalidArgumentException + */ + public function __construct(UrlGeneratorInterface $urlGenerator = null, $urlMatcher = null) + { + $this->urlGenerator = $urlGenerator; + if ($urlMatcher !== null && !$urlMatcher instanceof UrlMatcherInterface && !$urlMatcher instanceof RequestMatcherInterface) { + throw new \InvalidArgumentException('Matcher must either implement UrlMatcherInterface or RequestMatcherInterface.'); + } + $this->urlMatcher = $urlMatcher; + } + + /** + * Creates a redirect Response. + * + * @param Request $request A Request instance + * @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo)) + * @param int $status The status code + * + * @return RedirectResponse A RedirectResponse instance + */ + public function createRedirectResponse(Request $request, $path, $status = 302) + { + return new RedirectResponse($this->generateUri($request, $path), $status); + } + + /** + * Creates a Request. + * + * @param Request $request The current Request instance + * @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo)) + * + * @return Request A Request instance + */ + public function createRequest(Request $request, $path) + { + $newRequest = Request::create($this->generateUri($request, $path), 'get', array(), $request->cookies->all(), array(), $request->server->all()); + if ($request->hasSession()) { + $newRequest->setSession($request->getSession()); + } + + if ($request->attributes->has(Security::AUTHENTICATION_ERROR)) { + $newRequest->attributes->set(Security::AUTHENTICATION_ERROR, $request->attributes->get(Security::AUTHENTICATION_ERROR)); + } + if ($request->attributes->has(Security::ACCESS_DENIED_ERROR)) { + $newRequest->attributes->set(Security::ACCESS_DENIED_ERROR, $request->attributes->get(Security::ACCESS_DENIED_ERROR)); + } + if ($request->attributes->has(Security::LAST_USERNAME)) { + $newRequest->attributes->set(Security::LAST_USERNAME, $request->attributes->get(Security::LAST_USERNAME)); + } + + return $newRequest; + } + + /** + * Checks that a given path matches the Request. + * + * @param Request $request A Request instance + * @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo)) + * + * @return bool true if the path is the same as the one from the Request, false otherwise + */ + public function checkRequestPath(Request $request, $path) + { + if ('/' !== $path[0]) { + try { + // matching a request is more powerful than matching a URL path + context, so try that first + if ($this->urlMatcher instanceof RequestMatcherInterface) { + $parameters = $this->urlMatcher->matchRequest($request); + } else { + $parameters = $this->urlMatcher->match($request->getPathInfo()); + } + + return $path === $parameters['_route']; + } catch (MethodNotAllowedException $e) { + return false; + } catch (ResourceNotFoundException $e) { + return false; + } + } + + return $path === rawurldecode($request->getPathInfo()); + } + + /** + * Generates a URI, based on the given path or absolute URL. + * + * @param Request $request A Request instance + * @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo)) + * + * @return string An absolute URL + * + * @throws \LogicException + */ + public function generateUri($request, $path) + { + if (0 === strpos($path, 'http') || !$path) { + return $path; + } + + if ('/' === $path[0]) { + return $request->getUriForPath($path); + } + + if (null === $this->urlGenerator) { + throw new \LogicException('You must provide a UrlGeneratorInterface instance to be able to use routes.'); + } + + $url = $this->urlGenerator->generate($path, $request->attributes->all(), UrlGeneratorInterface::ABSOLUTE_URL); + + // unnecessary query string parameters must be removed from URL + // (ie. query parameters that are presents in $attributes) + // fortunately, they all are, so we have to remove entire query string + $position = strpos($url, '?'); + if (false !== $position) { + $url = substr($url, 0, $position); + } + + return $url; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/CookieClearingLogoutHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/CookieClearingLogoutHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..6838be57e1ee849408b98420484641f657027392 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/CookieClearingLogoutHandler.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Logout; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Request; + +/** + * This handler clears the passed cookies when a user logs out. + * + * @author Johannes M. Schmitt + */ +class CookieClearingLogoutHandler implements LogoutHandlerInterface +{ + private $cookies; + + /** + * Constructor. + * + * @param array $cookies An array of cookie names to unset + */ + public function __construct(array $cookies) + { + $this->cookies = $cookies; + } + + /** + * Implementation for the LogoutHandlerInterface. Deletes all requested cookies. + * + * @param Request $request + * @param Response $response + * @param TokenInterface $token + */ + public function logout(Request $request, Response $response, TokenInterface $token) + { + foreach ($this->cookies as $cookieName => $cookieData) { + $response->headers->clearCookie($cookieName, $cookieData['path'], $cookieData['domain']); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/DefaultLogoutSuccessHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/DefaultLogoutSuccessHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..48626b069035609d964c07e4c1c7d00d04d89bb3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/DefaultLogoutSuccessHandler.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Logout; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Http\HttpUtils; + +/** + * Default logout success handler will redirect users to a configured path. + * + * @author Fabien Potencier + * @author Alexander + */ +class DefaultLogoutSuccessHandler implements LogoutSuccessHandlerInterface +{ + protected $httpUtils; + protected $targetUrl; + + /** + * @param HttpUtils $httpUtils + * @param string $targetUrl + */ + public function __construct(HttpUtils $httpUtils, $targetUrl = '/') + { + $this->httpUtils = $httpUtils; + + $this->targetUrl = $targetUrl; + } + + /** + * {@inheritdoc} + */ + public function onLogoutSuccess(Request $request) + { + return $this->httpUtils->createRedirectResponse($request, $this->targetUrl); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutHandlerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutHandlerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5e1cea81df9915a9e89489c1e7089118394b6f39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutHandlerInterface.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Logout; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Request; + +/** + * Interface that needs to be implemented by LogoutHandlers. + * + * @author Johannes M. Schmitt + */ +interface LogoutHandlerInterface +{ + /** + * This method is called by the LogoutListener when a user has requested + * to be logged out. Usually, you would unset session variables, or remove + * cookies, etc. + * + * @param Request $request + * @param Response $response + * @param TokenInterface $token + */ + public function logout(Request $request, Response $response, TokenInterface $token); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..4246fa441454354849e6ba1b87587cfd63dffe27 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Logout; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +/** + * LogoutSuccesshandlerInterface. + * + * In contrast to the LogoutHandlerInterface, this interface can return a response + * which is then used instead of the default behavior. + * + * If you want to only perform some logout related clean-up task, use the + * LogoutHandlerInterface instead. + * + * @author Johannes M. Schmitt + */ +interface LogoutSuccessHandlerInterface +{ + /** + * Creates a Response object to send upon a successful logout. + * + * @param Request $request + * + * @return Response never null + */ + public function onLogoutSuccess(Request $request); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..ada733be6b34409d7170a2f09287a5fc41b64348 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Logout; + +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; + +/** + * Provides generator functions for the logout URL. + * + * @author Fabien Potencier + * @author Jeremy Mikola + */ +class LogoutUrlGenerator +{ + private $requestStack; + private $router; + private $tokenStorage; + private $listeners = array(); + + public function __construct(RequestStack $requestStack = null, UrlGeneratorInterface $router = null, TokenStorageInterface $tokenStorage = null) + { + $this->requestStack = $requestStack; + $this->router = $router; + $this->tokenStorage = $tokenStorage; + } + + /** + * Registers a firewall's LogoutListener, allowing its URL to be generated. + * + * @param string $key The firewall key + * @param string $logoutPath The path that starts the logout process + * @param string $csrfTokenId The ID of the CSRF token + * @param string $csrfParameter The CSRF token parameter name + * @param CsrfTokenManagerInterface $csrfTokenManager A CsrfTokenManagerInterface instance + */ + public function registerListener($key, $logoutPath, $csrfTokenId, $csrfParameter, CsrfTokenManagerInterface $csrfTokenManager = null) + { + $this->listeners[$key] = array($logoutPath, $csrfTokenId, $csrfParameter, $csrfTokenManager); + } + + /** + * Generates the absolute logout path for the firewall. + * + * @param string|null $key The firewall key or null to use the current firewall key + * + * @return string The logout path + */ + public function getLogoutPath($key = null) + { + return $this->generateLogoutUrl($key, UrlGeneratorInterface::ABSOLUTE_PATH); + } + + /** + * Generates the absolute logout URL for the firewall. + * + * @param string|null $key The firewall key or null to use the current firewall key + * + * @return string The logout URL + */ + public function getLogoutUrl($key = null) + { + return $this->generateLogoutUrl($key, UrlGeneratorInterface::ABSOLUTE_URL); + } + + /** + * Generates the logout URL for the firewall. + * + * @param string|null $key The firewall key or null to use the current firewall key + * @param int $referenceType The type of reference (one of the constants in UrlGeneratorInterface) + * + * @return string The logout URL + * + * @throws \InvalidArgumentException if no LogoutListener is registered for the key or the key could not be found automatically. + */ + private function generateLogoutUrl($key, $referenceType) + { + // Fetch the current provider key from token, if possible + if (null === $key && null !== $this->tokenStorage) { + $token = $this->tokenStorage->getToken(); + if (null !== $token && method_exists($token, 'getProviderKey')) { + $key = $token->getProviderKey(); + } + } + + if (null === $key) { + throw new \InvalidArgumentException('Unable to find the current firewall LogoutListener, please provide the provider key manually.'); + } + + if (!array_key_exists($key, $this->listeners)) { + throw new \InvalidArgumentException(sprintf('No LogoutListener found for firewall key "%s".', $key)); + } + + list($logoutPath, $csrfTokenId, $csrfParameter, $csrfTokenManager) = $this->listeners[$key]; + + $parameters = null !== $csrfTokenManager ? array($csrfParameter => (string) $csrfTokenManager->getToken($csrfTokenId)) : array(); + + if ('/' === $logoutPath[0]) { + if (!$this->requestStack) { + throw new \LogicException('Unable to generate the logout URL without a RequestStack.'); + } + + $request = $this->requestStack->getCurrentRequest(); + + $url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBaseUrl().$logoutPath; + + if (!empty($parameters)) { + $url .= '?'.http_build_query($parameters); + } + } else { + if (!$this->router) { + throw new \LogicException('Unable to generate the logout URL without a Router.'); + } + + $url = $this->router->generate($logoutPath, $parameters, $referenceType); + } + + return $url; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/SessionLogoutHandler.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/SessionLogoutHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..e036c5fa6b62f2348172ad298f990f8a5ba4e69c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Logout/SessionLogoutHandler.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\Component\Security\Http\Logout; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Request; + +/** + * Handler for clearing invalidating the current session. + * + * @author Johannes M. Schmitt + */ +class SessionLogoutHandler implements LogoutHandlerInterface +{ + /** + * Invalidate the current session. + * + * @param Request $request + * @param Response $response + * @param TokenInterface $token + */ + public function logout(Request $request, Response $response, TokenInterface $token) + { + $request->getSession()->invalidate(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/ParameterBagUtils.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/ParameterBagUtils.php new file mode 100644 index 0000000000000000000000000000000000000000..eed5421f8f609bba29c9e3f0278cad2b6a18cb39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/ParameterBagUtils.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\Component\Security\Http; + +use Symfony\Component\HttpFoundation\ParameterBag; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\PropertyAccess\Exception\AccessException; +use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; +use Symfony\Component\PropertyAccess\PropertyAccess; + +/** + * @internal + */ +final class ParameterBagUtils +{ + private static $propertyAccessor; + + /** + * Returns a "parameter" value. + * + * Paths like foo[bar] will be evaluated to find deeper items in nested data structures. + * + * @param ParameterBag $parameters The parameter bag + * @param string $path The key + * + * @return mixed + * + * @throws InvalidArgumentException when the given path is malformed + */ + public static function getParameterBagValue(ParameterBag $parameters, $path) + { + if (false === $pos = strpos($path, '[')) { + return $parameters->get($path); + } + + $root = substr($path, 0, $pos); + + if (null === $value = $parameters->get($root)) { + return; + } + + if (null === self::$propertyAccessor) { + self::$propertyAccessor = PropertyAccess::createPropertyAccessor(); + } + + try { + return self::$propertyAccessor->getValue($value, substr($path, $pos)); + } catch (AccessException $e) { + return; + } + } + + /** + * Returns a request "parameter" value. + * + * Paths like foo[bar] will be evaluated to find deeper items in nested data structures. + * + * @param Request $request The request + * @param string $path The key + * + * @return mixed + * + * @throws InvalidArgumentException when the given path is malformed + */ + public static function getRequestParameterValue(Request $request, $path) + { + if (false === $pos = strpos($path, '[')) { + return $request->get($path); + } + + $root = substr($path, 0, $pos); + + if (null === $value = $request->get($root)) { + return; + } + + if (null === self::$propertyAccessor) { + self::$propertyAccessor = PropertyAccess::createPropertyAccessor(); + } + + try { + return self::$propertyAccessor->getValue($value, substr($path, $pos)); + } catch (AccessException $e) { + return; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/README.md b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5be21118301167d1ab4baac8f1346c2fdd623bbe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/README.md @@ -0,0 +1,16 @@ +Security Component - HTTP Integration +===================================== + +Security provides an infrastructure for sophisticated authorization systems, +which makes it possible to easily separate the actual authorization logic from +so called user providers that hold the users credentials. It is inspired by +the Java Spring framework. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/security/index.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/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php new file mode 100644 index 0000000000000000000000000000000000000000..c22105b97ef8ac46e74e9cfdafece2b3a3fe934b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php @@ -0,0 +1,324 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\RememberMe; + +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; +use Symfony\Component\Security\Http\Logout\LogoutHandlerInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Exception\UnsupportedUserException; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Exception\CookieTheftException; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Cookie; +use Psr\Log\LoggerInterface; +use Symfony\Component\Security\Http\ParameterBagUtils; + +/** + * Base class implementing the RememberMeServicesInterface. + * + * @author Johannes M. Schmitt + */ +abstract class AbstractRememberMeServices implements RememberMeServicesInterface, LogoutHandlerInterface +{ + const COOKIE_DELIMITER = ':'; + + protected $logger; + protected $options = array( + 'secure' => false, + 'httponly' => true, + ); + private $providerKey; + private $secret; + private $userProviders; + + /** + * Constructor. + * + * @param array $userProviders + * @param string $secret + * @param string $providerKey + * @param array $options + * @param LoggerInterface $logger + * + * @throws \InvalidArgumentException + */ + public function __construct(array $userProviders, $secret, $providerKey, array $options = array(), LoggerInterface $logger = null) + { + if (empty($secret)) { + throw new \InvalidArgumentException('$secret must not be empty.'); + } + if (empty($providerKey)) { + throw new \InvalidArgumentException('$providerKey must not be empty.'); + } + if (0 === count($userProviders)) { + throw new \InvalidArgumentException('You must provide at least one user provider.'); + } + + $this->userProviders = $userProviders; + $this->secret = $secret; + $this->providerKey = $providerKey; + $this->options = array_merge($this->options, $options); + $this->logger = $logger; + } + + /** + * Returns the parameter that is used for checking whether remember-me + * services have been requested. + * + * @return string + */ + public function getRememberMeParameter() + { + return $this->options['remember_me_parameter']; + } + + /** + * @return string + */ + public function getSecret() + { + return $this->secret; + } + + /** + * Implementation of RememberMeServicesInterface. Detects whether a remember-me + * cookie was set, decodes it, and hands it to subclasses for further processing. + * + * @param Request $request + * + * @return TokenInterface|null + * + * @throws CookieTheftException + * @throws \RuntimeException + */ + final public function autoLogin(Request $request) + { + if (null === $cookie = $request->cookies->get($this->options['name'])) { + return; + } + + if (null !== $this->logger) { + $this->logger->debug('Remember-me cookie detected.'); + } + + $cookieParts = $this->decodeCookie($cookie); + + try { + $user = $this->processAutoLoginCookie($cookieParts, $request); + + if (!$user instanceof UserInterface) { + throw new \RuntimeException('processAutoLoginCookie() must return a UserInterface implementation.'); + } + + if (null !== $this->logger) { + $this->logger->info('Remember-me cookie accepted.'); + } + + return new RememberMeToken($user, $this->providerKey, $this->secret); + } catch (CookieTheftException $e) { + $this->cancelCookie($request); + + throw $e; + } catch (UsernameNotFoundException $e) { + if (null !== $this->logger) { + $this->logger->info('User for remember-me cookie not found.'); + } + } catch (UnsupportedUserException $e) { + if (null !== $this->logger) { + $this->logger->warning('User class for remember-me cookie not supported.'); + } + } catch (AuthenticationException $e) { + if (null !== $this->logger) { + $this->logger->debug('Remember-Me authentication failed.', array('exception' => $e)); + } + } + + $this->cancelCookie($request); + } + + /** + * Implementation for LogoutHandlerInterface. Deletes the cookie. + * + * @param Request $request + * @param Response $response + * @param TokenInterface $token + */ + public function logout(Request $request, Response $response, TokenInterface $token) + { + $this->cancelCookie($request); + } + + /** + * Implementation for RememberMeServicesInterface. Deletes the cookie when + * an attempted authentication fails. + * + * @param Request $request + */ + final public function loginFail(Request $request) + { + $this->cancelCookie($request); + $this->onLoginFail($request); + } + + /** + * Implementation for RememberMeServicesInterface. This is called when an + * authentication is successful. + * + * @param Request $request + * @param Response $response + * @param TokenInterface $token The token that resulted in a successful authentication + */ + final public function loginSuccess(Request $request, Response $response, TokenInterface $token) + { + // Make sure any old remember-me cookies are cancelled + $this->cancelCookie($request); + + if (!$token->getUser() instanceof UserInterface) { + if (null !== $this->logger) { + $this->logger->debug('Remember-me ignores token since it does not contain a UserInterface implementation.'); + } + + return; + } + + if (!$this->isRememberMeRequested($request)) { + if (null !== $this->logger) { + $this->logger->debug('Remember-me was not requested.'); + } + + return; + } + + if (null !== $this->logger) { + $this->logger->debug('Remember-me was requested; setting cookie.'); + } + + // Remove attribute from request that sets a NULL cookie. + // It was set by $this->cancelCookie() + // (cancelCookie does other things too for some RememberMeServices + // so we should still call it at the start of this method) + $request->attributes->remove(self::COOKIE_ATTR_NAME); + + $this->onLoginSuccess($request, $response, $token); + } + + /** + * Subclasses should validate the cookie and do any additional processing + * that is required. This is called from autoLogin(). + * + * @param array $cookieParts + * @param Request $request + * + * @return UserInterface + */ + abstract protected function processAutoLoginCookie(array $cookieParts, Request $request); + + /** + * @param Request $request + */ + protected function onLoginFail(Request $request) + { + } + + /** + * This is called after a user has been logged in successfully, and has + * requested remember-me capabilities. The implementation usually sets a + * cookie and possibly stores a persistent record of it. + * + * @param Request $request + * @param Response $response + * @param TokenInterface $token + */ + abstract protected function onLoginSuccess(Request $request, Response $response, TokenInterface $token); + + final protected function getUserProvider($class) + { + foreach ($this->userProviders as $provider) { + if ($provider->supportsClass($class)) { + return $provider; + } + } + + throw new UnsupportedUserException(sprintf('There is no user provider that supports class "%s".', $class)); + } + + /** + * Decodes the raw cookie value. + * + * @param string $rawCookie + * + * @return array + */ + protected function decodeCookie($rawCookie) + { + return explode(self::COOKIE_DELIMITER, base64_decode($rawCookie)); + } + + /** + * Encodes the cookie parts. + * + * @param array $cookieParts + * + * @return string + * + * @throws \InvalidArgumentException When $cookieParts contain the cookie delimiter. Extending class should either remove or escape it. + */ + protected function encodeCookie(array $cookieParts) + { + foreach ($cookieParts as $cookiePart) { + if (false !== strpos($cookiePart, self::COOKIE_DELIMITER)) { + throw new \InvalidArgumentException(sprintf('$cookieParts should not contain the cookie delimiter "%s"', self::COOKIE_DELIMITER)); + } + } + + return base64_encode(implode(self::COOKIE_DELIMITER, $cookieParts)); + } + + /** + * Deletes the remember-me cookie. + * + * @param Request $request + */ + protected function cancelCookie(Request $request) + { + if (null !== $this->logger) { + $this->logger->debug('Clearing remember-me cookie.', array('name' => $this->options['name'])); + } + + $request->attributes->set(self::COOKIE_ATTR_NAME, new Cookie($this->options['name'], null, 1, $this->options['path'], $this->options['domain'], $this->options['secure'], $this->options['httponly'])); + } + + /** + * Checks whether remember-me capabilities were requested. + * + * @param Request $request + * + * @return bool + */ + protected function isRememberMeRequested(Request $request) + { + if (true === $this->options['always_remember_me']) { + return true; + } + + $parameter = ParameterBagUtils::getRequestParameterValue($request, $this->options['remember_me_parameter']); + + if (null === $parameter && null !== $this->logger) { + $this->logger->debug('Did not send remember-me cookie.', array('parameter' => $this->options['remember_me_parameter'])); + } + + return $parameter === 'true' || $parameter === 'on' || $parameter === '1' || $parameter === 'yes'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php new file mode 100644 index 0000000000000000000000000000000000000000..edfa208c40dc0bbc5c32a9f20e722d2856de23a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php @@ -0,0 +1,128 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\RememberMe; + +use Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Exception\CookieTheftException; +use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + +/** + * Concrete implementation of the RememberMeServicesInterface which needs + * an implementation of TokenProviderInterface for providing remember-me + * capabilities. + * + * @author Johannes M. Schmitt + */ +class PersistentTokenBasedRememberMeServices extends AbstractRememberMeServices +{ + private $tokenProvider; + + /** + * Sets the token provider. + * + * @param TokenProviderInterface $tokenProvider + */ + public function setTokenProvider(TokenProviderInterface $tokenProvider) + { + $this->tokenProvider = $tokenProvider; + } + + /** + * {@inheritdoc} + */ + protected function cancelCookie(Request $request) + { + // Delete cookie on the client + parent::cancelCookie($request); + + // Delete cookie from the tokenProvider + if (null !== ($cookie = $request->cookies->get($this->options['name'])) + && count($parts = $this->decodeCookie($cookie)) === 2 + ) { + list($series) = $parts; + $this->tokenProvider->deleteTokenBySeries($series); + } + } + + /** + * {@inheritdoc} + */ + protected function processAutoLoginCookie(array $cookieParts, Request $request) + { + if (count($cookieParts) !== 2) { + throw new AuthenticationException('The cookie is invalid.'); + } + + list($series, $tokenValue) = $cookieParts; + $persistentToken = $this->tokenProvider->loadTokenBySeries($series); + + if (!hash_equals($persistentToken->getTokenValue(), $tokenValue)) { + throw new CookieTheftException('This token was already used. The account is possibly compromised.'); + } + + if ($persistentToken->getLastUsed()->getTimestamp() + $this->options['lifetime'] < time()) { + throw new AuthenticationException('The cookie has expired.'); + } + + $tokenValue = base64_encode(random_bytes(64)); + $this->tokenProvider->updateToken($series, $tokenValue, new \DateTime()); + $request->attributes->set(self::COOKIE_ATTR_NAME, + new Cookie( + $this->options['name'], + $this->encodeCookie(array($series, $tokenValue)), + time() + $this->options['lifetime'], + $this->options['path'], + $this->options['domain'], + $this->options['secure'], + $this->options['httponly'] + ) + ); + + return $this->getUserProvider($persistentToken->getClass())->loadUserByUsername($persistentToken->getUsername()); + } + + /** + * {@inheritdoc} + */ + protected function onLoginSuccess(Request $request, Response $response, TokenInterface $token) + { + $series = base64_encode(random_bytes(64)); + $tokenValue = base64_encode(random_bytes(64)); + + $this->tokenProvider->createNewToken( + new PersistentToken( + get_class($user = $token->getUser()), + $user->getUsername(), + $series, + $tokenValue, + new \DateTime() + ) + ); + + $response->headers->setCookie( + new Cookie( + $this->options['name'], + $this->encodeCookie(array($series, $tokenValue)), + time() + $this->options['lifetime'], + $this->options['path'], + $this->options['domain'], + $this->options['secure'], + $this->options['httponly'] + ) + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5750a8c9d4804d63315cd8fdd87fa98354c22942 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\RememberMe; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Request; + +/** + * Interface that needs to be implemented by classes which provide remember-me + * capabilities. + * + * We provide two implementations out-of-the-box: + * - TokenBasedRememberMeServices (does not require a TokenProvider) + * - PersistentTokenBasedRememberMeServices (requires a TokenProvider) + * + * @author Johannes M. Schmitt + */ +interface RememberMeServicesInterface +{ + /** + * This attribute name can be used by the implementation if it needs to set + * a cookie on the Request when there is no actual Response, yet. + * + * @var string + */ + const COOKIE_ATTR_NAME = '_security_remember_me_cookie'; + + /** + * This method will be called whenever the TokenStorage does not contain + * a TokenInterface object and the framework wishes to provide an implementation + * with an opportunity to authenticate the request using remember-me capabilities. + * + * No attempt whatsoever is made to determine whether the browser has requested + * remember-me services or presented a valid cookie. Any and all such determinations + * are left to the implementation of this method. + * + * If a browser has presented an unauthorised cookie for whatever reason, + * make sure to throw an AuthenticationException as this will consequentially + * result in a call to loginFail() and therefore an invalidation of the cookie. + * + * @param Request $request + * + * @return TokenInterface + */ + public function autoLogin(Request $request); + + /** + * Called whenever an interactive authentication attempt was made, but the + * credentials supplied by the user were missing or otherwise invalid. + * + * This method needs to take care of invalidating the cookie. + * + * @param Request $request + */ + public function loginFail(Request $request); + + /** + * Called whenever an interactive authentication attempt is successful + * (e.g. a form login). + * + * An implementation may always set a remember-me cookie in the Response, + * although this is not recommended. + * + * Instead, implementations should typically look for a request parameter + * (such as a HTTP POST parameter) that indicates the browser has explicitly + * requested for the authentication to be remembered. + * + * @param Request $request + * @param Response $response + * @param TokenInterface $token + */ + public function loginSuccess(Request $request, Response $response, TokenInterface $token); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php new file mode 100644 index 0000000000000000000000000000000000000000..4149fb6d85d85d9cac23fa87da1701bda19e7da0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\RememberMe; + +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Adds remember-me cookies to the Response. + * + * @author Johannes M. Schmitt + */ +class ResponseListener implements EventSubscriberInterface +{ + /** + * @param FilterResponseEvent $event + */ + public function onKernelResponse(FilterResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + + $request = $event->getRequest(); + $response = $event->getResponse(); + + if ($request->attributes->has(RememberMeServicesInterface::COOKIE_ATTR_NAME)) { + $response->headers->setCookie($request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME)); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents() + { + return array(KernelEvents::RESPONSE => 'onKernelResponse'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php new file mode 100644 index 0000000000000000000000000000000000000000..a4437027d0426bec562e5e4e3e31e1584d32ec45 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php @@ -0,0 +1,125 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\RememberMe; + +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\User\UserInterface; + +/** + * Concrete implementation of the RememberMeServicesInterface providing + * remember-me capabilities without requiring a TokenProvider. + * + * @author Johannes M. Schmitt + */ +class TokenBasedRememberMeServices extends AbstractRememberMeServices +{ + /** + * {@inheritdoc} + */ + protected function processAutoLoginCookie(array $cookieParts, Request $request) + { + if (count($cookieParts) !== 4) { + throw new AuthenticationException('The cookie is invalid.'); + } + + list($class, $username, $expires, $hash) = $cookieParts; + if (false === $username = base64_decode($username, true)) { + throw new AuthenticationException('$username contains a character from outside the base64 alphabet.'); + } + try { + $user = $this->getUserProvider($class)->loadUserByUsername($username); + } catch (\Exception $e) { + if (!$e instanceof AuthenticationException) { + $e = new AuthenticationException($e->getMessage(), $e->getCode(), $e); + } + + throw $e; + } + + if (!$user instanceof UserInterface) { + throw new \RuntimeException(sprintf('The UserProviderInterface implementation must return an instance of UserInterface, but returned "%s".', get_class($user))); + } + + if (true !== hash_equals($this->generateCookieHash($class, $username, $expires, $user->getPassword()), $hash)) { + throw new AuthenticationException('The cookie\'s hash is invalid.'); + } + + if ($expires < time()) { + throw new AuthenticationException('The cookie has expired.'); + } + + return $user; + } + + /** + * {@inheritdoc} + */ + protected function onLoginSuccess(Request $request, Response $response, TokenInterface $token) + { + $user = $token->getUser(); + $expires = time() + $this->options['lifetime']; + $value = $this->generateCookieValue(get_class($user), $user->getUsername(), $expires, $user->getPassword()); + + $response->headers->setCookie( + new Cookie( + $this->options['name'], + $value, + $expires, + $this->options['path'], + $this->options['domain'], + $this->options['secure'], + $this->options['httponly'] + ) + ); + } + + /** + * Generates the cookie value. + * + * @param string $class + * @param string $username The username + * @param int $expires The Unix timestamp when the cookie expires + * @param string $password The encoded password + * + * @return string + */ + protected function generateCookieValue($class, $username, $expires, $password) + { + // $username is encoded because it might contain COOKIE_DELIMITER, + // we assume other values don't + return $this->encodeCookie(array( + $class, + base64_encode($username), + $expires, + $this->generateCookieHash($class, $username, $expires, $password), + )); + } + + /** + * Generates a hash for the cookie to ensure it is not being tempered with. + * + * @param string $class + * @param string $username The username + * @param int $expires The Unix timestamp when the cookie expires + * @param string $password The encoded password + * + * @return string + */ + protected function generateCookieHash($class, $username, $expires, $password) + { + return hash_hmac('sha256', $class.$username.$expires.$password, $this->getSecret()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/SecurityEvents.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/SecurityEvents.php new file mode 100644 index 0000000000000000000000000000000000000000..550acb4246eeed20d9a2371bdc4a7425bc4e8eaf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/SecurityEvents.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http; + +final class SecurityEvents +{ + /** + * The INTERACTIVE_LOGIN event occurs after a user is logged in + * interactively for authentication based on http, cookies or X509. + * + * @Event("Symfony\Component\Security\Http\Event\InteractiveLoginEvent") + * + * @var string + */ + const INTERACTIVE_LOGIN = 'security.interactive_login'; + + /** + * The SWITCH_USER event occurs before switch to another user and + * before exit from an already switched user. + * + * @Event("Symfony\Component\Security\Http\Event\SwitchUserEvent") + * + * @var string + */ + const SWITCH_USER = 'security.switch_user'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..dd258a086f1f0401eaeba0e17268ff5e97274c42 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.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\Component\Security\Http\Session; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * The default session strategy implementation. + * + * Supports the following strategies: + * NONE: the session is not changed + * MIGRATE: the session id is updated, attributes are kept + * INVALIDATE: the session id is updated, attributes are lost + * + * @author Johannes M. Schmitt + */ +class SessionAuthenticationStrategy implements SessionAuthenticationStrategyInterface +{ + const NONE = 'none'; + const MIGRATE = 'migrate'; + const INVALIDATE = 'invalidate'; + + private $strategy; + + public function __construct($strategy) + { + $this->strategy = $strategy; + } + + /** + * {@inheritdoc} + */ + public function onAuthentication(Request $request, TokenInterface $token) + { + switch ($this->strategy) { + case self::NONE: + return; + + case self::MIGRATE: + $request->getSession()->migrate(true); + + return; + + case self::INVALIDATE: + $request->getSession()->invalidate(); + + return; + + default: + throw new \RuntimeException(sprintf('Invalid session authentication strategy "%s"', $this->strategy)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategyInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategyInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..dd0c38184e6cd26435c695e93d2d2b199eb4864d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategyInterface.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Session; + +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * SessionAuthenticationStrategyInterface. + * + * Implementation are responsible for updating the session after an interactive + * authentication attempt was successful. + * + * @author Johannes M. Schmitt + */ +interface SessionAuthenticationStrategyInterface +{ + /** + * This performs any necessary changes to the session. + * + * This method is called before the TokenStorage is populated with a + * Token, and only by classes inheriting from AbstractAuthenticationListener. + * + * @param Request $request + * @param TokenInterface $token + */ + public function onAuthentication(Request $request, TokenInterface $token); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/AccessMapTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/AccessMapTest.php new file mode 100644 index 0000000000000000000000000000000000000000..822043d63c8c3b59b43f057323768141bca13cd1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/AccessMapTest.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\AccessMap; + +class AccessMapTest extends TestCase +{ + public function testReturnsFirstMatchedPattern() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $requestMatcher1 = $this->getRequestMatcher($request, false); + $requestMatcher2 = $this->getRequestMatcher($request, true); + + $map = new AccessMap(); + $map->add($requestMatcher1, array('ROLE_ADMIN'), 'http'); + $map->add($requestMatcher2, array('ROLE_USER'), 'https'); + + $this->assertSame(array(array('ROLE_USER'), 'https'), $map->getPatterns($request)); + } + + public function testReturnsEmptyPatternIfNoneMatched() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $requestMatcher = $this->getRequestMatcher($request, false); + + $map = new AccessMap(); + $map->add($requestMatcher, array('ROLE_USER'), 'https'); + + $this->assertSame(array(null, null), $map->getPatterns($request)); + } + + private function getRequestMatcher($request, $matches) + { + $requestMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcherInterface')->getMock(); + $requestMatcher->expects($this->once()) + ->method('matches')->with($request) + ->will($this->returnValue($matches)); + + return $requestMatcher; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..56e5390ef5a60a6907a99168ce2bac174af0f96c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php @@ -0,0 +1,190 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Authentication; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler; +use Symfony\Component\Security\Core\Security; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpKernelInterface; + +class DefaultAuthenticationFailureHandlerTest extends TestCase +{ + private $httpKernel; + private $httpUtils; + private $logger; + private $request; + private $session; + private $exception; + + protected function setUp() + { + $this->httpKernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $this->httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); + $this->logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + + $this->session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock(); + $this->request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $this->request->expects($this->any())->method('getSession')->will($this->returnValue($this->session)); + $this->exception = $this->getMockBuilder('Symfony\Component\Security\Core\Exception\AuthenticationException')->setMethods(array('getMessage'))->getMock(); + } + + public function testForward() + { + $options = array('failure_forward' => true); + + $subRequest = $this->getRequest(); + $subRequest->attributes->expects($this->once()) + ->method('set')->with(Security::AUTHENTICATION_ERROR, $this->exception); + $this->httpUtils->expects($this->once()) + ->method('createRequest')->with($this->request, '/login') + ->will($this->returnValue($subRequest)); + + $response = new Response(); + $this->httpKernel->expects($this->once()) + ->method('handle')->with($subRequest, HttpKernelInterface::SUB_REQUEST) + ->will($this->returnValue($response)); + + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, $options, $this->logger); + $result = $handler->onAuthenticationFailure($this->request, $this->exception); + + $this->assertSame($response, $result); + } + + public function testRedirect() + { + $response = new Response(); + $this->httpUtils->expects($this->once()) + ->method('createRedirectResponse')->with($this->request, '/login') + ->will($this->returnValue($response)); + + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, array(), $this->logger); + $result = $handler->onAuthenticationFailure($this->request, $this->exception); + + $this->assertSame($response, $result); + } + + public function testExceptionIsPersistedInSession() + { + $this->session->expects($this->once()) + ->method('set')->with(Security::AUTHENTICATION_ERROR, $this->exception); + + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, array(), $this->logger); + $handler->onAuthenticationFailure($this->request, $this->exception); + } + + public function testExceptionIsPassedInRequestOnForward() + { + $options = array('failure_forward' => true); + + $subRequest = $this->getRequest(); + $subRequest->attributes->expects($this->once()) + ->method('set')->with(Security::AUTHENTICATION_ERROR, $this->exception); + + $this->httpUtils->expects($this->once()) + ->method('createRequest')->with($this->request, '/login') + ->will($this->returnValue($subRequest)); + + $this->session->expects($this->never())->method('set'); + + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, $options, $this->logger); + $handler->onAuthenticationFailure($this->request, $this->exception); + } + + public function testRedirectIsLogged() + { + $this->logger + ->expects($this->once()) + ->method('debug') + ->with('Authentication failure, redirect triggered.', array('failure_path' => '/login')); + + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, array(), $this->logger); + $handler->onAuthenticationFailure($this->request, $this->exception); + } + + public function testForwardIsLogged() + { + $options = array('failure_forward' => true); + + $this->httpUtils->expects($this->once()) + ->method('createRequest')->with($this->request, '/login') + ->will($this->returnValue($this->getRequest())); + + $this->logger + ->expects($this->once()) + ->method('debug') + ->with('Authentication failure, forward triggered.', array('failure_path' => '/login')); + + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, $options, $this->logger); + $handler->onAuthenticationFailure($this->request, $this->exception); + } + + public function testFailurePathCanBeOverwritten() + { + $options = array('failure_path' => '/auth/login'); + + $this->httpUtils->expects($this->once()) + ->method('createRedirectResponse')->with($this->request, '/auth/login'); + + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, $options, $this->logger); + $handler->onAuthenticationFailure($this->request, $this->exception); + } + + public function testFailurePathCanBeOverwrittenWithRequest() + { + $this->request->expects($this->once()) + ->method('get')->with('_failure_path') + ->will($this->returnValue('/auth/login')); + + $this->httpUtils->expects($this->once()) + ->method('createRedirectResponse')->with($this->request, '/auth/login'); + + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, array(), $this->logger); + $handler->onAuthenticationFailure($this->request, $this->exception); + } + + public function testFailurePathCanBeOverwrittenWithNestedAttributeInRequest() + { + $this->request->expects($this->once()) + ->method('get')->with('_failure_path') + ->will($this->returnValue(array('value' => '/auth/login'))); + + $this->httpUtils->expects($this->once()) + ->method('createRedirectResponse')->with($this->request, '/auth/login'); + + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, array('failure_path_parameter' => '_failure_path[value]'), $this->logger); + $handler->onAuthenticationFailure($this->request, $this->exception); + } + + public function testFailurePathParameterCanBeOverwritten() + { + $options = array('failure_path_parameter' => '_my_failure_path'); + + $this->request->expects($this->once()) + ->method('get')->with('_my_failure_path') + ->will($this->returnValue('/auth/login')); + + $this->httpUtils->expects($this->once()) + ->method('createRedirectResponse')->with($this->request, '/auth/login'); + + $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, $options, $this->logger); + $handler->onAuthenticationFailure($this->request, $this->exception); + } + + private function getRequest() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $request->attributes = $this->getMockBuilder('Symfony\Component\HttpFoundation\ParameterBag')->getMock(); + + return $request; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..52cd00432dc469fab0de7764677b0536b2b20906 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php @@ -0,0 +1,184 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Authentication; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler; + +class DefaultAuthenticationSuccessHandlerTest extends TestCase +{ + private $httpUtils = null; + + private $request = null; + + private $token = null; + + protected function setUp() + { + $this->httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); + $this->request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $this->request->headers = $this->getMockBuilder('Symfony\Component\HttpFoundation\HeaderBag')->getMock(); + $this->token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + } + + public function testRequestIsRedirected() + { + $response = $this->expectRedirectResponse('/'); + + $handler = new DefaultAuthenticationSuccessHandler($this->httpUtils, array()); + $result = $handler->onAuthenticationSuccess($this->request, $this->token); + + $this->assertSame($response, $result); + } + + public function testDefaultTargetPathCanBeForced() + { + $options = array( + 'always_use_default_target_path' => true, + 'default_target_path' => '/dashboard', + ); + + $response = $this->expectRedirectResponse('/dashboard'); + + $handler = new DefaultAuthenticationSuccessHandler($this->httpUtils, $options); + $result = $handler->onAuthenticationSuccess($this->request, $this->token); + + $this->assertSame($response, $result); + } + + public function testTargetPathIsPassedWithRequest() + { + $this->request->expects($this->once()) + ->method('get')->with('_target_path') + ->will($this->returnValue('/dashboard')); + + $response = $this->expectRedirectResponse('/dashboard'); + + $handler = new DefaultAuthenticationSuccessHandler($this->httpUtils, array()); + $result = $handler->onAuthenticationSuccess($this->request, $this->token); + + $this->assertSame($response, $result); + } + + public function testTargetPathIsPassedAsNestedParameterWithRequest() + { + $this->request->expects($this->once()) + ->method('get')->with('_target_path') + ->will($this->returnValue(array('value' => '/dashboard'))); + + $response = $this->expectRedirectResponse('/dashboard'); + + $handler = new DefaultAuthenticationSuccessHandler($this->httpUtils, array('target_path_parameter' => '_target_path[value]')); + $result = $handler->onAuthenticationSuccess($this->request, $this->token); + + $this->assertSame($response, $result); + } + + public function testTargetPathParameterIsCustomised() + { + $options = array('target_path_parameter' => '_my_target_path'); + + $this->request->expects($this->once()) + ->method('get')->with('_my_target_path') + ->will($this->returnValue('/dashboard')); + + $response = $this->expectRedirectResponse('/dashboard'); + + $handler = new DefaultAuthenticationSuccessHandler($this->httpUtils, $options); + $result = $handler->onAuthenticationSuccess($this->request, $this->token); + + $this->assertSame($response, $result); + } + + public function testTargetPathIsTakenFromTheSession() + { + $session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock(); + $session->expects($this->once()) + ->method('get')->with('_security.admin.target_path') + ->will($this->returnValue('/admin/dashboard')); + $session->expects($this->once()) + ->method('remove')->with('_security.admin.target_path'); + + $this->request->expects($this->any()) + ->method('getSession') + ->will($this->returnValue($session)); + + $response = $this->expectRedirectResponse('/admin/dashboard'); + + $handler = new DefaultAuthenticationSuccessHandler($this->httpUtils, array()); + $handler->setProviderKey('admin'); + + $result = $handler->onAuthenticationSuccess($this->request, $this->token); + + $this->assertSame($response, $result); + } + + public function testTargetPathIsPassedAsReferer() + { + $options = array('use_referer' => true); + + $this->request->headers->expects($this->once()) + ->method('get')->with('Referer') + ->will($this->returnValue('/dashboard')); + + $response = $this->expectRedirectResponse('/dashboard'); + + $handler = new DefaultAuthenticationSuccessHandler($this->httpUtils, $options); + $result = $handler->onAuthenticationSuccess($this->request, $this->token); + + $this->assertSame($response, $result); + } + + public function testRefererHasToBeDifferentThatLoginUrl() + { + $options = array('use_referer' => true); + + $this->request->headers->expects($this->any()) + ->method('get')->with('Referer') + ->will($this->returnValue('/login')); + + $this->httpUtils->expects($this->once()) + ->method('generateUri')->with($this->request, '/login') + ->will($this->returnValue('/login')); + + $response = $this->expectRedirectResponse('/'); + + $handler = new DefaultAuthenticationSuccessHandler($this->httpUtils, $options); + $result = $handler->onAuthenticationSuccess($this->request, $this->token); + + $this->assertSame($response, $result); + } + + public function testRefererTargetPathIsIgnoredByDefault() + { + $this->request->headers->expects($this->never())->method('get'); + + $response = $this->expectRedirectResponse('/'); + + $handler = new DefaultAuthenticationSuccessHandler($this->httpUtils, array()); + $result = $handler->onAuthenticationSuccess($this->request, $this->token); + + $this->assertSame($response, $result); + } + + private function expectRedirectResponse($path) + { + $response = new Response(); + $this->httpUtils->expects($this->once()) + ->method('createRedirectResponse') + ->with($this->request, $path) + ->will($this->returnValue($response)); + + return $response; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4f73e5f44cdfaaa261d26ab17e22c73d2a9c0e7d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php @@ -0,0 +1,196 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; +use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; +use Symfony\Component\Security\Http\Authentication\SimpleAuthenticationHandler; + +class SimpleAuthenticationHandlerTest extends TestCase +{ + private $successHandler; + + private $failureHandler; + + private $request; + + private $token; + + private $authenticationException; + + private $response; + + protected function setUp() + { + $this->successHandler = $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface')->getMock(); + $this->failureHandler = $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface')->getMock(); + + $this->request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $this->token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + // No methods are invoked on the exception; we just assert on its class + $this->authenticationException = new AuthenticationException(); + + $this->response = new Response(); + } + + public function testOnAuthenticationSuccessFallsBackToDefaultHandlerIfSimpleIsNotASuccessHandler() + { + $authenticator = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface')->getMock(); + + $this->successHandler->expects($this->once()) + ->method('onAuthenticationSuccess') + ->with($this->request, $this->token) + ->will($this->returnValue($this->response)); + + $handler = new SimpleAuthenticationHandler($authenticator, $this->successHandler, $this->failureHandler); + $result = $handler->onAuthenticationSuccess($this->request, $this->token); + + $this->assertSame($this->response, $result); + } + + public function testOnAuthenticationSuccessCallsSimpleAuthenticator() + { + $this->successHandler->expects($this->never()) + ->method('onAuthenticationSuccess'); + + $authenticator = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Tests\TestSuccessHandlerInterface'); + $authenticator->expects($this->once()) + ->method('onAuthenticationSuccess') + ->with($this->request, $this->token) + ->will($this->returnValue($this->response)); + + $handler = new SimpleAuthenticationHandler($authenticator, $this->successHandler, $this->failureHandler); + $result = $handler->onAuthenticationSuccess($this->request, $this->token); + + $this->assertSame($this->response, $result); + } + + /** + * @expectedException \UnexpectedValueException + * @expectedExceptionMessage onAuthenticationSuccess method must return null to use the default success handler, or a Response object + */ + public function testOnAuthenticationSuccessThrowsAnExceptionIfNonResponseIsReturned() + { + $this->successHandler->expects($this->never()) + ->method('onAuthenticationSuccess'); + + $authenticator = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Tests\TestSuccessHandlerInterface'); + $authenticator->expects($this->once()) + ->method('onAuthenticationSuccess') + ->with($this->request, $this->token) + ->will($this->returnValue(new \stdClass())); + + $handler = new SimpleAuthenticationHandler($authenticator, $this->successHandler, $this->failureHandler); + $handler->onAuthenticationSuccess($this->request, $this->token); + } + + public function testOnAuthenticationSuccessFallsBackToDefaultHandlerIfNullIsReturned() + { + $this->successHandler->expects($this->once()) + ->method('onAuthenticationSuccess') + ->with($this->request, $this->token) + ->will($this->returnValue($this->response)); + + $authenticator = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Tests\TestSuccessHandlerInterface'); + $authenticator->expects($this->once()) + ->method('onAuthenticationSuccess') + ->with($this->request, $this->token) + ->will($this->returnValue(null)); + + $handler = new SimpleAuthenticationHandler($authenticator, $this->successHandler, $this->failureHandler); + $result = $handler->onAuthenticationSuccess($this->request, $this->token); + + $this->assertSame($this->response, $result); + } + + public function testOnAuthenticationFailureFallsBackToDefaultHandlerIfSimpleIsNotAFailureHandler() + { + $authenticator = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface')->getMock(); + + $this->failureHandler->expects($this->once()) + ->method('onAuthenticationFailure') + ->with($this->request, $this->authenticationException) + ->will($this->returnValue($this->response)); + + $handler = new SimpleAuthenticationHandler($authenticator, $this->successHandler, $this->failureHandler); + $result = $handler->onAuthenticationFailure($this->request, $this->authenticationException); + + $this->assertSame($this->response, $result); + } + + public function testOnAuthenticationFailureCallsSimpleAuthenticator() + { + $this->failureHandler->expects($this->never()) + ->method('onAuthenticationFailure'); + + $authenticator = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Tests\TestFailureHandlerInterface'); + $authenticator->expects($this->once()) + ->method('onAuthenticationFailure') + ->with($this->request, $this->authenticationException) + ->will($this->returnValue($this->response)); + + $handler = new SimpleAuthenticationHandler($authenticator, $this->successHandler, $this->failureHandler); + $result = $handler->onAuthenticationFailure($this->request, $this->authenticationException); + + $this->assertSame($this->response, $result); + } + + /** + * @expectedException \UnexpectedValueException + * @expectedExceptionMessage onAuthenticationFailure method must return null to use the default failure handler, or a Response object + */ + public function testOnAuthenticationFailureThrowsAnExceptionIfNonResponseIsReturned() + { + $this->failureHandler->expects($this->never()) + ->method('onAuthenticationFailure'); + + $authenticator = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Tests\TestFailureHandlerInterface'); + $authenticator->expects($this->once()) + ->method('onAuthenticationFailure') + ->with($this->request, $this->authenticationException) + ->will($this->returnValue(new \stdClass())); + + $handler = new SimpleAuthenticationHandler($authenticator, $this->successHandler, $this->failureHandler); + $handler->onAuthenticationFailure($this->request, $this->authenticationException); + } + + public function testOnAuthenticationFailureFallsBackToDefaultHandlerIfNullIsReturned() + { + $this->failureHandler->expects($this->once()) + ->method('onAuthenticationFailure') + ->with($this->request, $this->authenticationException) + ->will($this->returnValue($this->response)); + + $authenticator = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Tests\TestFailureHandlerInterface'); + $authenticator->expects($this->once()) + ->method('onAuthenticationFailure') + ->with($this->request, $this->authenticationException) + ->will($this->returnValue(null)); + + $handler = new SimpleAuthenticationHandler($authenticator, $this->successHandler, $this->failureHandler); + $result = $handler->onAuthenticationFailure($this->request, $this->authenticationException); + + $this->assertSame($this->response, $result); + } +} + +interface TestSuccessHandlerInterface extends AuthenticationSuccessHandlerInterface, SimpleAuthenticatorInterface +{ +} + +interface TestFailureHandlerInterface extends AuthenticationFailureHandlerInterface, SimpleAuthenticatorInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/BasicAuthenticationEntryPointTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/BasicAuthenticationEntryPointTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a089e90cc5584e41eb6b6bea610fedf1b2c76294 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/BasicAuthenticationEntryPointTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\EntryPoint; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\EntryPoint\BasicAuthenticationEntryPoint; +use Symfony\Component\Security\Core\Exception\AuthenticationException; + +class BasicAuthenticationEntryPointTest extends TestCase +{ + public function testStart() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + + $authException = new AuthenticationException('The exception message'); + + $entryPoint = new BasicAuthenticationEntryPoint('TheRealmName'); + $response = $entryPoint->start($request, $authException); + + $this->assertEquals('Basic realm="TheRealmName"', $response->headers->get('WWW-Authenticate')); + $this->assertEquals(401, $response->getStatusCode()); + } + + public function testStartWithoutAuthException() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + + $entryPoint = new BasicAuthenticationEntryPoint('TheRealmName'); + + $response = $entryPoint->start($request); + + $this->assertEquals('Basic realm="TheRealmName"', $response->headers->get('WWW-Authenticate')); + $this->assertEquals(401, $response->getStatusCode()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/DigestAuthenticationEntryPointTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/DigestAuthenticationEntryPointTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e08570dbbd9fc7d7707ed8eaa0ad01d70aa9a2b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/DigestAuthenticationEntryPointTest.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\EntryPoint; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\EntryPoint\DigestAuthenticationEntryPoint; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Core\Exception\NonceExpiredException; + +class DigestAuthenticationEntryPointTest extends TestCase +{ + public function testStart() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + + $authenticationException = new AuthenticationException('TheAuthenticationExceptionMessage'); + + $entryPoint = new DigestAuthenticationEntryPoint('TheRealmName', 'TheSecret'); + $response = $entryPoint->start($request, $authenticationException); + + $this->assertEquals(401, $response->getStatusCode()); + $this->assertRegExp('/^Digest realm="TheRealmName", qop="auth", nonce="[a-zA-Z0-9\/+]+={0,2}"$/', $response->headers->get('WWW-Authenticate')); + } + + public function testStartWithNoException() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + + $entryPoint = new DigestAuthenticationEntryPoint('TheRealmName', 'TheSecret'); + $response = $entryPoint->start($request); + + $this->assertEquals(401, $response->getStatusCode()); + $this->assertRegExp('/^Digest realm="TheRealmName", qop="auth", nonce="[a-zA-Z0-9\/+]+={0,2}"$/', $response->headers->get('WWW-Authenticate')); + } + + public function testStartWithNonceExpiredException() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + + $nonceExpiredException = new NonceExpiredException('TheNonceExpiredExceptionMessage'); + + $entryPoint = new DigestAuthenticationEntryPoint('TheRealmName', 'TheSecret'); + $response = $entryPoint->start($request, $nonceExpiredException); + + $this->assertEquals(401, $response->getStatusCode()); + $this->assertRegExp('/^Digest realm="TheRealmName", qop="auth", nonce="[a-zA-Z0-9\/+]+={0,2}", stale="true"$/', $response->headers->get('WWW-Authenticate')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/FormAuthenticationEntryPointTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/FormAuthenticationEntryPointTest.php new file mode 100644 index 0000000000000000000000000000000000000000..75bbd978f24c7b2d7672c510e4db84b789e8cad0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/FormAuthenticationEntryPointTest.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\EntryPoint; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Http\EntryPoint\FormAuthenticationEntryPoint; +use Symfony\Component\HttpKernel\HttpKernelInterface; + +class FormAuthenticationEntryPointTest extends TestCase +{ + public function testStart() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); + $response = new Response(); + + $httpKernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); + $httpUtils + ->expects($this->once()) + ->method('createRedirectResponse') + ->with($this->equalTo($request), $this->equalTo('/the/login/path')) + ->will($this->returnValue($response)) + ; + + $entryPoint = new FormAuthenticationEntryPoint($httpKernel, $httpUtils, '/the/login/path', false); + + $this->assertEquals($response, $entryPoint->start($request)); + } + + public function testStartWithUseForward() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); + $subRequest = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); + $response = new Response('', 200); + + $httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); + $httpUtils + ->expects($this->once()) + ->method('createRequest') + ->with($this->equalTo($request), $this->equalTo('/the/login/path')) + ->will($this->returnValue($subRequest)) + ; + + $httpKernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $httpKernel + ->expects($this->once()) + ->method('handle') + ->with($this->equalTo($subRequest), $this->equalTo(HttpKernelInterface::SUB_REQUEST)) + ->will($this->returnValue($response)) + ; + + $entryPoint = new FormAuthenticationEntryPoint($httpKernel, $httpUtils, '/the/login/path', true); + + $entryPointResponse = $entryPoint->start($request); + + $this->assertEquals($response, $entryPointResponse); + $this->assertEquals(401, $entryPointResponse->headers->get('X-Status-Code')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f2fa5bcf191acb4e56376517864d254f3e81777e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.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\Component\Security\Http\Tests\EntryPoint; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint; +use Symfony\Component\HttpFoundation\Request; + +class RetryAuthenticationEntryPointTest extends TestCase +{ + /** + * @dataProvider dataForStart + */ + public function testStart($httpPort, $httpsPort, $request, $expectedUrl) + { + $entryPoint = new RetryAuthenticationEntryPoint($httpPort, $httpsPort); + $response = $entryPoint->start($request); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $response); + $this->assertEquals($expectedUrl, $response->headers->get('Location')); + } + + public function dataForStart() + { + if (!class_exists('Symfony\Component\HttpFoundation\Request')) { + return array(array()); + } + + return array( + array( + 80, + 443, + Request::create('http://localhost/foo/bar?baz=bat'), + 'https://localhost/foo/bar?baz=bat', + ), + array( + 80, + 443, + Request::create('https://localhost/foo/bar?baz=bat'), + 'http://localhost/foo/bar?baz=bat', + ), + array( + 80, + 123, + Request::create('http://localhost/foo/bar?baz=bat'), + 'https://localhost:123/foo/bar?baz=bat', + ), + array( + 8080, + 443, + Request::create('https://localhost/foo/bar?baz=bat'), + 'http://localhost:8080/foo/bar?baz=bat', + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dd7f75e67e2218e9802abcdefed4ae65052cb12d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php @@ -0,0 +1,253 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\Exception\AuthenticationException; + +class AbstractPreAuthenticatedListenerTest extends TestCase +{ + public function testHandleWithValidValues() + { + $userCredentials = array('TheUser', 'TheCredentials'); + + $request = new Request(array(), array(), array(), array(), array(), array()); + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + $tokenStorage + ->expects($this->once()) + ->method('setToken') + ->with($this->equalTo($token)) + ; + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $authenticationManager + ->expects($this->once()) + ->method('authenticate') + ->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken')) + ->will($this->returnValue($token)) + ; + + $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array( + $tokenStorage, + $authenticationManager, + 'TheProviderKey', + )); + $listener + ->expects($this->once()) + ->method('getPreAuthenticatedData') + ->will($this->returnValue($userCredentials)); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + public function testHandleWhenAuthenticationFails() + { + $userCredentials = array('TheUser', 'TheCredentials'); + + $request = new Request(array(), array(), array(), array(), array(), array()); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + $tokenStorage + ->expects($this->never()) + ->method('setToken') + ; + + $exception = new AuthenticationException('Authentication failed.'); + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $authenticationManager + ->expects($this->once()) + ->method('authenticate') + ->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken')) + ->will($this->throwException($exception)) + ; + + $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array( + $tokenStorage, + $authenticationManager, + 'TheProviderKey', + )); + $listener + ->expects($this->once()) + ->method('getPreAuthenticatedData') + ->will($this->returnValue($userCredentials)); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + public function testHandleWhenAuthenticationFailsWithDifferentToken() + { + $userCredentials = array('TheUser', 'TheCredentials'); + + $token = new UsernamePasswordToken('TheUsername', 'ThePassword', 'TheProviderKey', array('ROLE_FOO')); + + $request = new Request(array(), array(), array(), array(), array(), array()); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue($token)) + ; + $tokenStorage + ->expects($this->never()) + ->method('setToken') + ; + + $exception = new AuthenticationException('Authentication failed.'); + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $authenticationManager + ->expects($this->once()) + ->method('authenticate') + ->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken')) + ->will($this->throwException($exception)) + ; + + $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array( + $tokenStorage, + $authenticationManager, + 'TheProviderKey', + )); + $listener + ->expects($this->once()) + ->method('getPreAuthenticatedData') + ->will($this->returnValue($userCredentials)); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + public function testHandleWithASimilarAuthenticatedToken() + { + $userCredentials = array('TheUser', 'TheCredentials'); + + $request = new Request(array(), array(), array(), array(), array(), array()); + + $token = new PreAuthenticatedToken('TheUser', 'TheCredentials', 'TheProviderKey', array('ROLE_FOO')); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue($token)) + ; + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $authenticationManager + ->expects($this->never()) + ->method('authenticate') + ; + + $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array( + $tokenStorage, + $authenticationManager, + 'TheProviderKey', + )); + $listener + ->expects($this->once()) + ->method('getPreAuthenticatedData') + ->will($this->returnValue($userCredentials)); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + public function testHandleWithAnInvalidSimilarToken() + { + $userCredentials = array('TheUser', 'TheCredentials'); + + $request = new Request(array(), array(), array(), array(), array(), array()); + + $token = new PreAuthenticatedToken('AnotherUser', 'TheCredentials', 'TheProviderKey', array('ROLE_FOO')); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue($token)) + ; + $tokenStorage + ->expects($this->once()) + ->method('setToken') + ->with($this->equalTo(null)) + ; + + $exception = new AuthenticationException('Authentication failed.'); + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $authenticationManager + ->expects($this->once()) + ->method('authenticate') + ->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken')) + ->will($this->throwException($exception)) + ; + + $listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array( + $tokenStorage, + $authenticationManager, + 'TheProviderKey', + )); + $listener + ->expects($this->once()) + ->method('getPreAuthenticatedData') + ->will($this->returnValue($userCredentials)); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c49527bc14d66069f549c4c751f35d9cb8286073 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php @@ -0,0 +1,209 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\Firewall\AccessListener; + +class AccessListenerTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AccessDeniedException + */ + public function testHandleWhenTheAccessDecisionManagerDecidesToRefuseAccess() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); + + $accessMap = $this->getMockBuilder('Symfony\Component\Security\Http\AccessMapInterface')->getMock(); + $accessMap + ->expects($this->any()) + ->method('getPatterns') + ->with($this->equalTo($request)) + ->will($this->returnValue(array(array('foo' => 'bar'), null))) + ; + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $token + ->expects($this->any()) + ->method('isAuthenticated') + ->will($this->returnValue(true)) + ; + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue($token)) + ; + + $accessDecisionManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')->getMock(); + $accessDecisionManager + ->expects($this->once()) + ->method('decide') + ->with($this->equalTo($token), $this->equalTo(array('foo' => 'bar')), $this->equalTo($request)) + ->will($this->returnValue(false)) + ; + + $listener = new AccessListener( + $tokenStorage, + $accessDecisionManager, + $accessMap, + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock() + ); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + public function testHandleWhenTheTokenIsNotAuthenticated() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); + + $accessMap = $this->getMockBuilder('Symfony\Component\Security\Http\AccessMapInterface')->getMock(); + $accessMap + ->expects($this->any()) + ->method('getPatterns') + ->with($this->equalTo($request)) + ->will($this->returnValue(array(array('foo' => 'bar'), null))) + ; + + $notAuthenticatedToken = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $notAuthenticatedToken + ->expects($this->any()) + ->method('isAuthenticated') + ->will($this->returnValue(false)) + ; + + $authenticatedToken = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $authenticatedToken + ->expects($this->any()) + ->method('isAuthenticated') + ->will($this->returnValue(true)) + ; + + $authManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $authManager + ->expects($this->once()) + ->method('authenticate') + ->with($this->equalTo($notAuthenticatedToken)) + ->will($this->returnValue($authenticatedToken)) + ; + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue($notAuthenticatedToken)) + ; + $tokenStorage + ->expects($this->once()) + ->method('setToken') + ->with($this->equalTo($authenticatedToken)) + ; + + $accessDecisionManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')->getMock(); + $accessDecisionManager + ->expects($this->once()) + ->method('decide') + ->with($this->equalTo($authenticatedToken), $this->equalTo(array('foo' => 'bar')), $this->equalTo($request)) + ->will($this->returnValue(true)) + ; + + $listener = new AccessListener( + $tokenStorage, + $accessDecisionManager, + $accessMap, + $authManager + ); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + public function testHandleWhenThereIsNoAccessMapEntryMatchingTheRequest() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); + + $accessMap = $this->getMockBuilder('Symfony\Component\Security\Http\AccessMapInterface')->getMock(); + $accessMap + ->expects($this->any()) + ->method('getPatterns') + ->with($this->equalTo($request)) + ->will($this->returnValue(array(null, null))) + ; + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $token + ->expects($this->never()) + ->method('isAuthenticated') + ; + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue($token)) + ; + + $listener = new AccessListener( + $tokenStorage, + $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')->getMock(), + $accessMap, + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock() + ); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException + */ + public function testHandleWhenTheSecurityTokenStorageHasNoToken() + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + + $listener = new AccessListener( + $tokenStorage, + $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')->getMock(), + $this->getMockBuilder('Symfony\Component\Security\Http\AccessMapInterface')->getMock(), + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock() + ); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + + $listener->handle($event); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5bd0c80829664483f1664feab9cce884a7f793db --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; +use Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener; + +class AnonymousAuthenticationListenerTest extends TestCase +{ + public function testHandleWithTokenStorageHavingAToken() + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())) + ; + $tokenStorage + ->expects($this->never()) + ->method('setToken') + ; + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $authenticationManager + ->expects($this->never()) + ->method('authenticate') + ; + + $listener = new AnonymousAuthenticationListener($tokenStorage, 'TheSecret', null, $authenticationManager); + $listener->handle($this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock()); + } + + public function testHandleWithTokenStorageHavingNoToken() + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + + $anonymousToken = new AnonymousToken('TheSecret', 'anon.', array()); + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $authenticationManager + ->expects($this->once()) + ->method('authenticate') + ->with($this->callback(function ($token) { + return 'TheSecret' === $token->getSecret(); + })) + ->will($this->returnValue($anonymousToken)) + ; + + $tokenStorage + ->expects($this->once()) + ->method('setToken') + ->with($anonymousToken) + ; + + $listener = new AnonymousAuthenticationListener($tokenStorage, 'TheSecret', null, $authenticationManager); + $listener->handle($this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock()); + } + + public function testHandledEventIsLogged() + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger->expects($this->once()) + ->method('info') + ->with('Populated the TokenStorage with an anonymous Token.') + ; + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + + $listener = new AnonymousAuthenticationListener($tokenStorage, 'TheSecret', $logger, $authenticationManager); + $listener->handle($this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/BasicAuthenticationListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/BasicAuthenticationListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e71715f705a8863a381d848e12c700905bde0b25 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/BasicAuthenticationListenerTest.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\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Http\Firewall\BasicAuthenticationListener; +use Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager; + +class BasicAuthenticationListenerTest extends TestCase +{ + public function testHandleWithValidUsernameAndPasswordServerParameters() + { + $request = new Request(array(), array(), array(), array(), array(), array( + 'PHP_AUTH_USER' => 'TheUsername', + 'PHP_AUTH_PW' => 'ThePassword', + )); + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + $tokenStorage + ->expects($this->once()) + ->method('setToken') + ->with($this->equalTo($token)) + ; + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $authenticationManager + ->expects($this->once()) + ->method('authenticate') + ->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken')) + ->will($this->returnValue($token)) + ; + + $listener = new BasicAuthenticationListener( + $tokenStorage, + $authenticationManager, + 'TheProviderKey', + $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock() + ); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + public function testHandleWhenAuthenticationFails() + { + $request = new Request(array(), array(), array(), array(), array(), array( + 'PHP_AUTH_USER' => 'TheUsername', + 'PHP_AUTH_PW' => 'ThePassword', + )); + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + $tokenStorage + ->expects($this->never()) + ->method('setToken') + ; + + $response = new Response(); + + $authenticationEntryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); + $authenticationEntryPoint + ->expects($this->any()) + ->method('start') + ->with($this->equalTo($request), $this->isInstanceOf('Symfony\Component\Security\Core\Exception\AuthenticationException')) + ->will($this->returnValue($response)) + ; + + $listener = new BasicAuthenticationListener( + $tokenStorage, + new AuthenticationProviderManager(array($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface')->getMock())), + 'TheProviderKey', + $authenticationEntryPoint + ); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + $event + ->expects($this->once()) + ->method('setResponse') + ->with($this->equalTo($response)) + ; + + $listener->handle($event); + } + + public function testHandleWithNoUsernameServerParameter() + { + $request = new Request(); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->never()) + ->method('getToken') + ; + + $listener = new BasicAuthenticationListener( + $tokenStorage, + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(), + 'TheProviderKey', + $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock() + ); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + public function testHandleWithASimilarAuthenticatedToken() + { + $request = new Request(array(), array(), array(), array(), array(), array('PHP_AUTH_USER' => 'TheUsername')); + + $token = new UsernamePasswordToken('TheUsername', 'ThePassword', 'TheProviderKey', array('ROLE_FOO')); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue($token)) + ; + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $authenticationManager + ->expects($this->never()) + ->method('authenticate') + ; + + $listener = new BasicAuthenticationListener( + $tokenStorage, + $authenticationManager, + 'TheProviderKey', + $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock() + ); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage $providerKey must not be empty + */ + public function testItRequiresProviderKey() + { + new BasicAuthenticationListener( + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(), + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(), + '', + $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock() + ); + } + + public function testHandleWithADifferentAuthenticatedToken() + { + $request = new Request(array(), array(), array(), array(), array(), array( + 'PHP_AUTH_USER' => 'TheUsername', + 'PHP_AUTH_PW' => 'ThePassword', + )); + + $token = new PreAuthenticatedToken('TheUser', 'TheCredentials', 'TheProviderKey', array('ROLE_FOO')); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->any()) + ->method('getToken') + ->will($this->returnValue($token)) + ; + $tokenStorage + ->expects($this->never()) + ->method('setToken') + ; + + $response = new Response(); + + $authenticationEntryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); + $authenticationEntryPoint + ->expects($this->any()) + ->method('start') + ->with($this->equalTo($request), $this->isInstanceOf('Symfony\Component\Security\Core\Exception\AuthenticationException')) + ->will($this->returnValue($response)) + ; + + $listener = new BasicAuthenticationListener( + $tokenStorage, + new AuthenticationProviderManager(array($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface')->getMock())), + 'TheProviderKey', + $authenticationEntryPoint + ); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + $event + ->expects($this->once()) + ->method('setResponse') + ->with($this->equalTo($response)) + ; + + $listener->handle($event); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ChannelListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ChannelListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..53ff1dcf0e8e0881f9cc22c09d03f92f05d11b57 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ChannelListenerTest.php @@ -0,0 +1,181 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\Firewall\ChannelListener; +use Symfony\Component\HttpFoundation\Response; + +class ChannelListenerTest extends TestCase +{ + public function testHandleWithNotSecuredRequestAndHttpChannel() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); + $request + ->expects($this->any()) + ->method('isSecure') + ->will($this->returnValue(false)) + ; + + $accessMap = $this->getMockBuilder('Symfony\Component\Security\Http\AccessMapInterface')->getMock(); + $accessMap + ->expects($this->any()) + ->method('getPatterns') + ->with($this->equalTo($request)) + ->will($this->returnValue(array(array(), 'http'))) + ; + + $entryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); + $entryPoint + ->expects($this->never()) + ->method('start') + ; + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + $event + ->expects($this->never()) + ->method('setResponse') + ; + + $listener = new ChannelListener($accessMap, $entryPoint); + $listener->handle($event); + } + + public function testHandleWithSecuredRequestAndHttpsChannel() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); + $request + ->expects($this->any()) + ->method('isSecure') + ->will($this->returnValue(true)) + ; + + $accessMap = $this->getMockBuilder('Symfony\Component\Security\Http\AccessMapInterface')->getMock(); + $accessMap + ->expects($this->any()) + ->method('getPatterns') + ->with($this->equalTo($request)) + ->will($this->returnValue(array(array(), 'https'))) + ; + + $entryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); + $entryPoint + ->expects($this->never()) + ->method('start') + ; + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + $event + ->expects($this->never()) + ->method('setResponse') + ; + + $listener = new ChannelListener($accessMap, $entryPoint); + $listener->handle($event); + } + + public function testHandleWithNotSecuredRequestAndHttpsChannel() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); + $request + ->expects($this->any()) + ->method('isSecure') + ->will($this->returnValue(false)) + ; + + $response = new Response(); + + $accessMap = $this->getMockBuilder('Symfony\Component\Security\Http\AccessMapInterface')->getMock(); + $accessMap + ->expects($this->any()) + ->method('getPatterns') + ->with($this->equalTo($request)) + ->will($this->returnValue(array(array(), 'https'))) + ; + + $entryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); + $entryPoint + ->expects($this->once()) + ->method('start') + ->with($this->equalTo($request)) + ->will($this->returnValue($response)) + ; + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + $event + ->expects($this->once()) + ->method('setResponse') + ->with($this->equalTo($response)) + ; + + $listener = new ChannelListener($accessMap, $entryPoint); + $listener->handle($event); + } + + public function testHandleWithSecuredRequestAndHttpChannel() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); + $request + ->expects($this->any()) + ->method('isSecure') + ->will($this->returnValue(true)) + ; + + $response = new Response(); + + $accessMap = $this->getMockBuilder('Symfony\Component\Security\Http\AccessMapInterface')->getMock(); + $accessMap + ->expects($this->any()) + ->method('getPatterns') + ->with($this->equalTo($request)) + ->will($this->returnValue(array(array(), 'http'))) + ; + + $entryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); + $entryPoint + ->expects($this->once()) + ->method('start') + ->with($this->equalTo($request)) + ->will($this->returnValue($response)) + ; + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + $event + ->expects($this->once()) + ->method('setResponse') + ->with($this->equalTo($response)) + ; + + $listener = new ChannelListener($accessMap, $entryPoint); + $listener->handle($event); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8a0a9361ad4e2a5a38e7044dda5c9a36bf25ffcb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php @@ -0,0 +1,380 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Core\Exception\UnsupportedUserException; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\User\User; +use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Component\Security\Http\Firewall\ContextListener; +use Symfony\Component\EventDispatcher\EventDispatcher; + +class ContextListenerTest extends TestCase +{ + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage $contextKey must not be empty + */ + public function testItRequiresContextKey() + { + new ContextListener( + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(), + array(), + '' + ); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage User provider "stdClass" must implement "Symfony\Component\Security\Core\User\UserProviderInterface + */ + public function testUserProvidersNeedToImplementAnInterface() + { + new ContextListener( + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(), + array(new \stdClass()), + 'key123' + ); + } + + public function testOnKernelResponseWillAddSession() + { + $session = $this->runSessionOnKernelResponse( + new UsernamePasswordToken('test1', 'pass1', 'phpunit'), + null + ); + + $token = unserialize($session->get('_security_session')); + $this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', $token); + $this->assertEquals('test1', $token->getUsername()); + } + + public function testOnKernelResponseWillReplaceSession() + { + $session = $this->runSessionOnKernelResponse( + new UsernamePasswordToken('test1', 'pass1', 'phpunit'), + 'C:10:"serialized"' + ); + + $token = unserialize($session->get('_security_session')); + $this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', $token); + $this->assertEquals('test1', $token->getUsername()); + } + + public function testOnKernelResponseWillRemoveSession() + { + $session = $this->runSessionOnKernelResponse( + null, + 'C:10:"serialized"' + ); + + $this->assertFalse($session->has('_security_session')); + } + + public function testOnKernelResponseWillRemoveSessionOnAnonymousToken() + { + $session = $this->runSessionOnKernelResponse(new AnonymousToken('secret', 'anon.'), 'C:10:"serialized"'); + + $this->assertFalse($session->has('_security_session')); + } + + public function testOnKernelResponseWithoutSession() + { + $tokenStorage = new TokenStorage(); + $tokenStorage->setToken(new UsernamePasswordToken('test1', 'pass1', 'phpunit')); + $request = new Request(); + $session = new Session(new MockArraySessionStorage()); + $request->setSession($session); + + $event = new FilterResponseEvent( + $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), + $request, + HttpKernelInterface::MASTER_REQUEST, + new Response() + ); + + $listener = new ContextListener($tokenStorage, array(), 'session', null, new EventDispatcher()); + $listener->onKernelResponse($event); + + $this->assertTrue($session->isStarted()); + } + + public function testOnKernelResponseWithoutSessionNorToken() + { + $request = new Request(); + $session = new Session(new MockArraySessionStorage()); + $request->setSession($session); + + $event = new FilterResponseEvent( + $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), + $request, + HttpKernelInterface::MASTER_REQUEST, + new Response() + ); + + $listener = new ContextListener(new TokenStorage(), array(), 'session', null, new EventDispatcher()); + $listener->onKernelResponse($event); + + $this->assertFalse($session->isStarted()); + } + + /** + * @dataProvider provideInvalidToken + */ + public function testInvalidTokenInSession($token) + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') + ->disableOriginalConstructor() + ->getMock(); + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock(); + + $event->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)); + $request->expects($this->any()) + ->method('hasPreviousSession') + ->will($this->returnValue(true)); + $request->expects($this->any()) + ->method('getSession') + ->will($this->returnValue($session)); + $session->expects($this->any()) + ->method('get') + ->with('_security_key123') + ->will($this->returnValue($token)); + $tokenStorage->expects($this->once()) + ->method('setToken') + ->with(null); + + $listener = new ContextListener($tokenStorage, array(), 'key123'); + $listener->handle($event); + } + + public function provideInvalidToken() + { + return array( + array(serialize(new \__PHP_Incomplete_Class())), + array(serialize(null)), + array(null), + ); + } + + public function testHandleAddsKernelResponseListener() + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') + ->disableOriginalConstructor() + ->getMock(); + + $listener = new ContextListener($tokenStorage, array(), 'key123', null, $dispatcher); + + $event->expects($this->any()) + ->method('isMasterRequest') + ->will($this->returnValue(true)); + $event->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock())); + + $dispatcher->expects($this->once()) + ->method('addListener') + ->with(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + + $listener->handle($event); + } + + public function testOnKernelResponseListenerRemovesItself() + { + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\FilterResponseEvent') + ->disableOriginalConstructor() + ->getMock(); + + $listener = new ContextListener($tokenStorage, array(), 'key123', null, $dispatcher); + + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $request->expects($this->any()) + ->method('hasSession') + ->will($this->returnValue(true)); + + $event->expects($this->any()) + ->method('isMasterRequest') + ->will($this->returnValue(true)); + $event->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)); + + $dispatcher->expects($this->once()) + ->method('removeListener') + ->with(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + + $listener->onKernelResponse($event); + } + + public function testHandleRemovesTokenIfNoPreviousSessionWasFound() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $request->expects($this->any())->method('hasPreviousSession')->will($this->returnValue(false)); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') + ->disableOriginalConstructor() + ->getMock(); + $event->expects($this->any())->method('getRequest')->will($this->returnValue($request)); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage->expects($this->once())->method('setToken')->with(null); + + $listener = new ContextListener($tokenStorage, array(), 'key123'); + $listener->handle($event); + } + + public function testTryAllUserProvidersUntilASupportingUserProviderIsFound() + { + $tokenStorage = new TokenStorage(); + $refreshedUser = new User('foobar', 'baz'); + $this->handleEventWithPreviousSession($tokenStorage, array(new NotSupportingUserProvider(), new SupportingUserProvider($refreshedUser))); + + $this->assertSame($refreshedUser, $tokenStorage->getToken()->getUser()); + } + + public function testNextSupportingUserProviderIsTriedIfPreviousSupportingUserProviderDidNotLoadTheUser() + { + $tokenStorage = new TokenStorage(); + $refreshedUser = new User('foobar', 'baz'); + $this->handleEventWithPreviousSession($tokenStorage, array(new SupportingUserProvider(), new SupportingUserProvider($refreshedUser))); + + $this->assertSame($refreshedUser, $tokenStorage->getToken()->getUser()); + } + + public function testTokenIsSetToNullIfNoUserWasLoadedByTheRegisteredUserProviders() + { + $tokenStorage = new TokenStorage(); + $this->handleEventWithPreviousSession($tokenStorage, array(new NotSupportingUserProvider(), new SupportingUserProvider())); + + $this->assertNull($tokenStorage->getToken()); + } + + /** + * @expectedException \RuntimeException + */ + public function testRuntimeExceptionIsThrownIfNoSupportingUserProviderWasRegistered() + { + $this->handleEventWithPreviousSession(new TokenStorage(), array(new NotSupportingUserProvider(), new NotSupportingUserProvider())); + } + + protected function runSessionOnKernelResponse($newToken, $original = null) + { + $session = new Session(new MockArraySessionStorage()); + + if ($original !== null) { + $session->set('_security_session', $original); + } + + $tokenStorage = new TokenStorage(); + $tokenStorage->setToken($newToken); + + $request = new Request(); + $request->setSession($session); + $request->cookies->set('MOCKSESSID', true); + + $event = new FilterResponseEvent( + $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), + $request, + HttpKernelInterface::MASTER_REQUEST, + new Response() + ); + + $listener = new ContextListener($tokenStorage, array(), 'session', null, new EventDispatcher()); + $listener->onKernelResponse($event); + + return $session; + } + + private function handleEventWithPreviousSession(TokenStorageInterface $tokenStorage, array $userProviders) + { + $session = new Session(new MockArraySessionStorage()); + $session->set('_security_context_key', serialize(new UsernamePasswordToken(new User('foo', 'bar'), '', 'context_key'))); + + $request = new Request(); + $request->setSession($session); + $request->cookies->set('MOCKSESSID', true); + + $listener = new ContextListener($tokenStorage, $userProviders, 'context_key'); + $listener->handle(new GetResponseEvent($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $request, HttpKernelInterface::MASTER_REQUEST)); + } +} + +class NotSupportingUserProvider implements UserProviderInterface +{ + public function loadUserByUsername($username) + { + throw new UsernameNotFoundException(); + } + + public function refreshUser(UserInterface $user) + { + throw new UnsupportedUserException(); + } + + public function supportsClass($class) + { + return false; + } +} + +class SupportingUserProvider implements UserProviderInterface +{ + private $refreshedUser; + + public function __construct(User $refreshedUser = null) + { + $this->refreshedUser = $refreshedUser; + } + + public function loadUserByUsername($username) + { + } + + public function refreshUser(UserInterface $user) + { + if (!$user instanceof User) { + throw new UnsupportedUserException(); + } + + if (null === $this->refreshedUser) { + throw new UsernameNotFoundException(); + } + + return $this->refreshedUser; + } + + public function supportsClass($class) + { + return 'Symfony\Component\Security\Core\User\User' === $class; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/DigestAuthenticationListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/DigestAuthenticationListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..495dae4262162f00a845023544ef908ffea38717 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/DigestAuthenticationListenerTest.php @@ -0,0 +1,80 @@ +calculateServerDigest($username, $realm, $password, $nc, $nonce, $cnonce, $qop, 'GET', $uri); + + $digestData = + 'username="'.$username.'", realm="'.$realm.'", nonce="'.$nonce.'", '. + 'uri="'.$uri.'", cnonce="'.$cnonce.'", nc='.$nc.', qop="'.$qop.'", '. + 'response="'.$serverDigest.'"' + ; + + $request = new Request(array(), array(), array(), array(), array(), array('PHP_AUTH_DIGEST' => $digestData)); + + $entryPoint = new DigestAuthenticationEntryPoint($realm, $secret); + + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user->method('getPassword')->willReturn($password); + + $providerKey = 'TheProviderKey'; + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage + ->expects($this->once()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + $tokenStorage + ->expects($this->once()) + ->method('setToken') + ->with($this->equalTo(new UsernamePasswordToken($user, $password, $providerKey))) + ; + + $userProvider = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserProviderInterface')->getMock(); + $userProvider->method('loadUserByUsername')->willReturn($user); + + $listener = new DigestAuthenticationListener($tokenStorage, $userProvider, $providerKey, $entryPoint); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + private function calculateServerDigest($username, $realm, $password, $nc, $nonce, $cnonce, $qop, $method, $uri) + { + $response = md5( + md5($username.':'.$realm.':'.$password).':'.$nonce.':'.$nc.':'.$cnonce.':'.$qop.':'.md5($method.':'.$uri) + ); + + return sprintf('username="%s", realm="%s", nonce="%s", uri="%s", cnonce="%s", nc=%s, qop="%s", response="%s"', + $username, $realm, $nonce, $uri, $cnonce, $nc, $qop, $response + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/DigestDataTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/DigestDataTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2238a741888538f89807316c9587d0f8e3833b90 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/DigestDataTest.php @@ -0,0 +1,182 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\Firewall\DigestData; + +class DigestDataTest extends TestCase +{ + public function testGetResponse() + { + $digestAuth = new DigestData( + 'username="user", realm="Welcome, robot!", '. + 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '. + 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '. + 'response="b52938fc9e6d7c01be7702ece9031b42"' + ); + + $this->assertEquals('b52938fc9e6d7c01be7702ece9031b42', $digestAuth->getResponse()); + } + + public function testGetUsername() + { + $digestAuth = new DigestData( + 'username="user", realm="Welcome, robot!", '. + 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '. + 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '. + 'response="b52938fc9e6d7c01be7702ece9031b42"' + ); + + $this->assertEquals('user', $digestAuth->getUsername()); + } + + public function testGetUsernameWithQuote() + { + $digestAuth = new DigestData( + 'username="\"user\"", realm="Welcome, robot!", '. + 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '. + 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '. + 'response="b52938fc9e6d7c01be7702ece9031b42"' + ); + + $this->assertEquals('"user"', $digestAuth->getUsername()); + } + + public function testGetUsernameWithQuoteAndEscape() + { + $digestAuth = new DigestData( + 'username="\"u\\\\\"ser\"", realm="Welcome, robot!", '. + 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '. + 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '. + 'response="b52938fc9e6d7c01be7702ece9031b42"' + ); + + $this->assertEquals('"u\\"ser"', $digestAuth->getUsername()); + } + + public function testGetUsernameWithSingleQuote() + { + $digestAuth = new DigestData( + 'username="\"u\'ser\"", realm="Welcome, robot!", '. + 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '. + 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '. + 'response="b52938fc9e6d7c01be7702ece9031b42"' + ); + + $this->assertEquals('"u\'ser"', $digestAuth->getUsername()); + } + + public function testGetUsernameWithSingleQuoteAndEscape() + { + $digestAuth = new DigestData( + 'username="\"u\\\'ser\"", realm="Welcome, robot!", '. + 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '. + 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '. + 'response="b52938fc9e6d7c01be7702ece9031b42"' + ); + + $this->assertEquals('"u\\\'ser"', $digestAuth->getUsername()); + } + + public function testGetUsernameWithEscape() + { + $digestAuth = new DigestData( + 'username="\"u\\ser\"", realm="Welcome, robot!", '. + 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '. + 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '. + 'response="b52938fc9e6d7c01be7702ece9031b42"' + ); + + $this->assertEquals('"u\\ser"', $digestAuth->getUsername()); + } + + public function testValidateAndDecode() + { + $time = microtime(true); + $key = 'ThisIsAKey'; + $nonce = base64_encode($time.':'.md5($time.':'.$key)); + + $digestAuth = new DigestData( + 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", '. + 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '. + 'response="b52938fc9e6d7c01be7702ece9031b42"' + ); + + try { + $digestAuth->validateAndDecode($key, 'Welcome, robot!'); + } catch (\Exception $e) { + $this->fail(sprintf('testValidateAndDecode fail with message: %s', $e->getMessage())); + } + } + + public function testCalculateServerDigest() + { + $this->calculateServerDigest('user', 'Welcome, robot!', 'pass,word=password', 'ThisIsAKey', '00000001', 'MDIwODkz', 'auth', 'GET', '/path/info?p1=5&p2=5'); + } + + public function testCalculateServerDigestWithQuote() + { + $this->calculateServerDigest('\"user\"', 'Welcome, \"robot\"!', 'pass,word=password', 'ThisIsAKey', '00000001', 'MDIwODkz', 'auth', 'GET', '/path/info?p1=5&p2=5'); + } + + public function testCalculateServerDigestWithQuoteAndEscape() + { + $this->calculateServerDigest('\"u\\\\\"ser\"', 'Welcome, \"robot\"!', 'pass,word=password', 'ThisIsAKey', '00000001', 'MDIwODkz', 'auth', 'GET', '/path/info?p1=5&p2=5'); + } + + public function testCalculateServerDigestEscape() + { + $this->calculateServerDigest('\"u\\ser\"', 'Welcome, \"robot\"!', 'pass,word=password', 'ThisIsAKey', '00000001', 'MDIwODkz', 'auth', 'GET', '/path/info?p1=5&p2=5'); + $this->calculateServerDigest('\"u\\ser\\\\\"', 'Welcome, \"robot\"!', 'pass,word=password', 'ThisIsAKey', '00000001', 'MDIwODkz', 'auth', 'GET', '/path/info?p1=5&p2=5'); + } + + public function testIsNonceExpired() + { + $time = microtime(true) + 10; + $key = 'ThisIsAKey'; + $nonce = base64_encode($time.':'.md5($time.':'.$key)); + + $digestAuth = new DigestData( + 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", '. + 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '. + 'response="b52938fc9e6d7c01be7702ece9031b42"' + ); + + $digestAuth->validateAndDecode($key, 'Welcome, robot!'); + + $this->assertFalse($digestAuth->isNonceExpired()); + } + + protected function setUp() + { + class_exists('Symfony\Component\Security\Http\Firewall\DigestAuthenticationListener', true); + } + + private function calculateServerDigest($username, $realm, $password, $key, $nc, $cnonce, $qop, $method, $uri) + { + $time = microtime(true); + $nonce = base64_encode($time.':'.md5($time.':'.$key)); + + $response = md5( + md5($username.':'.$realm.':'.$password).':'.$nonce.':'.$nc.':'.$cnonce.':'.$qop.':'.md5($method.':'.$uri) + ); + + $digest = sprintf('username="%s", realm="%s", nonce="%s", uri="%s", cnonce="%s", nc=%s, qop="%s", response="%s"', + $username, $realm, $nonce, $uri, $cnonce, $nc, $qop, $response + ); + + $digestAuth = new DigestData($digest); + + $this->assertEquals($digestAuth->getResponse(), $digestAuth->calculateServerDigest($password, $method)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a5be022452129abcae77caa6c48f88a80af4cfb1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php @@ -0,0 +1,199 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Exception\AccessDeniedException; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Http\Authorization\AccessDeniedHandlerInterface; +use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; +use Symfony\Component\Security\Http\Firewall\ExceptionListener; +use Symfony\Component\Security\Http\HttpUtils; + +class ExceptionListenerTest extends TestCase +{ + /** + * @dataProvider getAuthenticationExceptionProvider + */ + public function testAuthenticationExceptionWithoutEntryPoint(\Exception $exception, \Exception $eventException = null) + { + $event = $this->createEvent($exception); + + $listener = $this->createExceptionListener(); + $listener->onKernelException($event); + + $this->assertNull($event->getResponse()); + $this->assertSame(null === $eventException ? $exception : $eventException, $event->getException()); + } + + /** + * @dataProvider getAuthenticationExceptionProvider + */ + public function testAuthenticationExceptionWithEntryPoint(\Exception $exception, \Exception $eventException = null) + { + $event = $this->createEvent($exception = new AuthenticationException()); + + $listener = $this->createExceptionListener(null, null, null, $this->createEntryPoint()); + $listener->onKernelException($event); + + $this->assertEquals('OK', $event->getResponse()->getContent()); + $this->assertSame($exception, $event->getException()); + } + + public function getAuthenticationExceptionProvider() + { + return array( + array(new AuthenticationException()), + array(new \LogicException('random', 0, $e = new AuthenticationException()), $e), + array(new \LogicException('random', 0, $e = new AuthenticationException('embed', 0, new AuthenticationException())), $e), + array(new \LogicException('random', 0, $e = new AuthenticationException('embed', 0, new AccessDeniedException())), $e), + array(new AuthenticationException('random', 0, new \LogicException())), + ); + } + + public function testExceptionWhenEntryPointReturnsBadValue() + { + $event = $this->createEvent(new AuthenticationException()); + + $entryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); + $entryPoint->expects($this->once())->method('start')->will($this->returnValue('NOT A RESPONSE')); + + $listener = $this->createExceptionListener(null, null, null, $entryPoint); + $listener->onKernelException($event); + // the exception has been replaced by our LogicException + $this->assertInstanceOf('LogicException', $event->getException()); + $this->assertStringEndsWith('start() method must return a Response object (string returned)', $event->getException()->getMessage()); + } + + /** + * @dataProvider getAccessDeniedExceptionProvider + */ + public function testAccessDeniedExceptionFullFledgedAndWithoutAccessDeniedHandlerAndWithoutErrorPage(\Exception $exception, \Exception $eventException = null) + { + $event = $this->createEvent($exception); + + $listener = $this->createExceptionListener(null, $this->createTrustResolver(true)); + $listener->onKernelException($event); + + $this->assertNull($event->getResponse()); + $this->assertSame(null === $eventException ? $exception : $eventException, $event->getException()->getPrevious()); + } + + /** + * @dataProvider getAccessDeniedExceptionProvider + */ + public function testAccessDeniedExceptionFullFledgedAndWithoutAccessDeniedHandlerAndWithErrorPage(\Exception $exception, \Exception $eventException = null) + { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $kernel->expects($this->once())->method('handle')->will($this->returnValue(new Response('error'))); + + $event = $this->createEvent($exception, $kernel); + + $httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); + $httpUtils->expects($this->once())->method('createRequest')->will($this->returnValue(Request::create('/error'))); + + $listener = $this->createExceptionListener(null, $this->createTrustResolver(true), $httpUtils, null, '/error'); + $listener->onKernelException($event); + + $this->assertEquals('error', $event->getResponse()->getContent()); + $this->assertSame(null === $eventException ? $exception : $eventException, $event->getException()->getPrevious()); + } + + /** + * @dataProvider getAccessDeniedExceptionProvider + */ + public function testAccessDeniedExceptionFullFledgedAndWithAccessDeniedHandlerAndWithoutErrorPage(\Exception $exception, \Exception $eventException = null) + { + $event = $this->createEvent($exception); + + $accessDeniedHandler = $this->getMockBuilder('Symfony\Component\Security\Http\Authorization\AccessDeniedHandlerInterface')->getMock(); + $accessDeniedHandler->expects($this->once())->method('handle')->will($this->returnValue(new Response('error'))); + + $listener = $this->createExceptionListener(null, $this->createTrustResolver(true), null, null, null, $accessDeniedHandler); + $listener->onKernelException($event); + + $this->assertEquals('error', $event->getResponse()->getContent()); + $this->assertSame(null === $eventException ? $exception : $eventException, $event->getException()->getPrevious()); + } + + /** + * @dataProvider getAccessDeniedExceptionProvider + */ + public function testAccessDeniedExceptionNotFullFledged(\Exception $exception, \Exception $eventException = null) + { + $event = $this->createEvent($exception); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $tokenStorage->expects($this->once())->method('getToken')->will($this->returnValue($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); + + $listener = $this->createExceptionListener($tokenStorage, $this->createTrustResolver(false), null, $this->createEntryPoint()); + $listener->onKernelException($event); + + $this->assertEquals('OK', $event->getResponse()->getContent()); + $this->assertSame(null === $eventException ? $exception : $eventException, $event->getException()->getPrevious()); + } + + public function getAccessDeniedExceptionProvider() + { + return array( + array(new AccessDeniedException()), + array(new \LogicException('random', 0, $e = new AccessDeniedException()), $e), + array(new \LogicException('random', 0, $e = new AccessDeniedException('embed', new AccessDeniedException())), $e), + array(new \LogicException('random', 0, $e = new AccessDeniedException('embed', new AuthenticationException())), $e), + array(new AccessDeniedException('random', new \LogicException())), + ); + } + + private function createEntryPoint() + { + $entryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); + $entryPoint->expects($this->once())->method('start')->will($this->returnValue(new Response('OK'))); + + return $entryPoint; + } + + private function createTrustResolver($fullFledged) + { + $trustResolver = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface')->getMock(); + $trustResolver->expects($this->once())->method('isFullFledged')->will($this->returnValue($fullFledged)); + + return $trustResolver; + } + + private function createEvent(\Exception $exception, $kernel = null) + { + if (null === $kernel) { + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + } + + return new GetResponseForExceptionEvent($kernel, Request::create('/'), HttpKernelInterface::MASTER_REQUEST, $exception); + } + + private function createExceptionListener(TokenStorageInterface $tokenStorage = null, AuthenticationTrustResolverInterface $trustResolver = null, HttpUtils $httpUtils = null, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null) + { + return new ExceptionListener( + $tokenStorage ?: $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(), + $trustResolver ?: $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface')->getMock(), + $httpUtils ?: $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(), + 'key', + $authenticationEntryPoint, + $errorPage, + $accessDeniedHandler + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c909c58eb4e2fc7f68480379c94d77006fd01018 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php @@ -0,0 +1,236 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Http\Firewall\LogoutListener; + +class LogoutListenerTest extends TestCase +{ + public function testHandleUnmatchedPath() + { + list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener(); + + list($event, $request) = $this->getGetResponseEvent(); + + $event->expects($this->never()) + ->method('setResponse'); + + $httpUtils->expects($this->once()) + ->method('checkRequestPath') + ->with($request, $options['logout_path']) + ->will($this->returnValue(false)); + + $listener->handle($event); + } + + public function testHandleMatchedPathWithSuccessHandlerAndCsrfValidation() + { + $successHandler = $this->getSuccessHandler(); + $tokenManager = $this->getTokenManager(); + + list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener($successHandler, $tokenManager); + + list($event, $request) = $this->getGetResponseEvent(); + + $request->query->set('_csrf_token', 'token'); + + $httpUtils->expects($this->once()) + ->method('checkRequestPath') + ->with($request, $options['logout_path']) + ->will($this->returnValue(true)); + + $tokenManager->expects($this->once()) + ->method('isTokenValid') + ->will($this->returnValue(true)); + + $successHandler->expects($this->once()) + ->method('onLogoutSuccess') + ->with($request) + ->will($this->returnValue($response = new Response())); + + $tokenStorage->expects($this->once()) + ->method('getToken') + ->will($this->returnValue($token = $this->getToken())); + + $handler = $this->getHandler(); + $handler->expects($this->once()) + ->method('logout') + ->with($request, $response, $token); + + $tokenStorage->expects($this->once()) + ->method('setToken') + ->with(null); + + $event->expects($this->once()) + ->method('setResponse') + ->with($response); + + $listener->addHandler($handler); + + $listener->handle($event); + } + + public function testHandleMatchedPathWithoutSuccessHandlerAndCsrfValidation() + { + $successHandler = $this->getSuccessHandler(); + + list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener($successHandler); + + list($event, $request) = $this->getGetResponseEvent(); + + $httpUtils->expects($this->once()) + ->method('checkRequestPath') + ->with($request, $options['logout_path']) + ->will($this->returnValue(true)); + + $successHandler->expects($this->once()) + ->method('onLogoutSuccess') + ->with($request) + ->will($this->returnValue($response = new Response())); + + $tokenStorage->expects($this->once()) + ->method('getToken') + ->will($this->returnValue($token = $this->getToken())); + + $handler = $this->getHandler(); + $handler->expects($this->once()) + ->method('logout') + ->with($request, $response, $token); + + $tokenStorage->expects($this->once()) + ->method('setToken') + ->with(null); + + $event->expects($this->once()) + ->method('setResponse') + ->with($response); + + $listener->addHandler($handler); + + $listener->handle($event); + } + + /** + * @expectedException \RuntimeException + */ + public function testSuccessHandlerReturnsNonResponse() + { + $successHandler = $this->getSuccessHandler(); + + list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener($successHandler); + + list($event, $request) = $this->getGetResponseEvent(); + + $httpUtils->expects($this->once()) + ->method('checkRequestPath') + ->with($request, $options['logout_path']) + ->will($this->returnValue(true)); + + $successHandler->expects($this->once()) + ->method('onLogoutSuccess') + ->with($request) + ->will($this->returnValue(null)); + + $listener->handle($event); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\LogoutException + */ + public function testCsrfValidationFails() + { + $tokenManager = $this->getTokenManager(); + + list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener(null, $tokenManager); + + list($event, $request) = $this->getGetResponseEvent(); + + $request->query->set('_csrf_token', 'token'); + + $httpUtils->expects($this->once()) + ->method('checkRequestPath') + ->with($request, $options['logout_path']) + ->will($this->returnValue(true)); + + $tokenManager->expects($this->once()) + ->method('isTokenValid') + ->will($this->returnValue(false)); + + $listener->handle($event); + } + + private function getTokenManager() + { + return $this->getMockBuilder('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')->getMock(); + } + + private function getTokenStorage() + { + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + } + + private function getGetResponseEvent() + { + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') + ->disableOriginalConstructor() + ->getMock(); + + $event->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request = new Request())); + + return array($event, $request); + } + + private function getHandler() + { + return $this->getMockBuilder('Symfony\Component\Security\Http\Logout\LogoutHandlerInterface')->getMock(); + } + + private function getHttpUtils() + { + return $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils') + ->disableOriginalConstructor() + ->getMock(); + } + + private function getListener($successHandler = null, $tokenManager = null) + { + $listener = new LogoutListener( + $tokenStorage = $this->getTokenStorage(), + $httpUtils = $this->getHttpUtils(), + $successHandler ?: $this->getSuccessHandler(), + $options = array( + 'csrf_parameter' => '_csrf_token', + 'csrf_token_id' => 'logout', + 'logout_path' => '/logout', + 'target_url' => '/', + ), + $tokenManager + ); + + return array($listener, $tokenStorage, $httpUtils, $options); + } + + private function getSuccessHandler() + { + return $this->getMockBuilder('Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface')->getMock(); + } + + private function getToken() + { + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2249dcbd2059d6f910e4e4d9b371b20ab7da211d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php @@ -0,0 +1,416 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Http\Firewall\RememberMeListener; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Http\SecurityEvents; + +class RememberMeListenerTest extends TestCase +{ + public function testOnCoreSecurityDoesNotTryToPopulateNonEmptyTokenStorage() + { + list($listener, $tokenStorage) = $this->getListener(); + + $tokenStorage + ->expects($this->once()) + ->method('getToken') + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())) + ; + + $tokenStorage + ->expects($this->never()) + ->method('setToken') + ; + + $this->assertNull($listener->handle($this->getGetResponseEvent())); + } + + public function testOnCoreSecurityDoesNothingWhenNoCookieIsSet() + { + list($listener, $tokenStorage, $service) = $this->getListener(); + + $tokenStorage + ->expects($this->once()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + + $service + ->expects($this->once()) + ->method('autoLogin') + ->will($this->returnValue(null)) + ; + + $event = $this->getGetResponseEvent(); + $event + ->expects($this->once()) + ->method('getRequest') + ->will($this->returnValue(new Request())) + ; + + $this->assertNull($listener->handle($event)); + } + + public function testOnCoreSecurityIgnoresAuthenticationExceptionThrownByAuthenticationManagerImplementation() + { + list($listener, $tokenStorage, $service, $manager) = $this->getListener(); + + $tokenStorage + ->expects($this->once()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + + $service + ->expects($this->once()) + ->method('autoLogin') + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())) + ; + + $service + ->expects($this->once()) + ->method('loginFail') + ; + + $exception = new AuthenticationException('Authentication failed.'); + $manager + ->expects($this->once()) + ->method('authenticate') + ->will($this->throwException($exception)) + ; + + $event = $this->getGetResponseEvent(); + $event + ->expects($this->once()) + ->method('getRequest') + ->will($this->returnValue(new Request())) + ; + + $listener->handle($event); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationException + * @expectedExceptionMessage Authentication failed. + */ + public function testOnCoreSecurityIgnoresAuthenticationOptionallyRethrowsExceptionThrownAuthenticationManagerImplementation() + { + list($listener, $tokenStorage, $service, $manager) = $this->getListener(false, false); + + $tokenStorage + ->expects($this->once()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + + $service + ->expects($this->once()) + ->method('autoLogin') + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())) + ; + + $service + ->expects($this->once()) + ->method('loginFail') + ; + + $exception = new AuthenticationException('Authentication failed.'); + $manager + ->expects($this->once()) + ->method('authenticate') + ->will($this->throwException($exception)) + ; + + $event = $this->getGetResponseEvent(); + $event + ->expects($this->once()) + ->method('getRequest') + ->will($this->returnValue(new Request())) + ; + + $listener->handle($event); + } + + public function testOnCoreSecurity() + { + list($listener, $tokenStorage, $service, $manager) = $this->getListener(); + + $tokenStorage + ->expects($this->once()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $service + ->expects($this->once()) + ->method('autoLogin') + ->will($this->returnValue($token)) + ; + + $tokenStorage + ->expects($this->once()) + ->method('setToken') + ->with($this->equalTo($token)) + ; + + $manager + ->expects($this->once()) + ->method('authenticate') + ->will($this->returnValue($token)) + ; + + $event = $this->getGetResponseEvent(); + $event + ->expects($this->once()) + ->method('getRequest') + ->will($this->returnValue(new Request())) + ; + + $listener->handle($event); + } + + public function testSessionStrategy() + { + list($listener, $tokenStorage, $service, $manager, , $dispatcher, $sessionStrategy) = $this->getListener(false, true, true); + + $tokenStorage + ->expects($this->once()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $service + ->expects($this->once()) + ->method('autoLogin') + ->will($this->returnValue($token)) + ; + + $tokenStorage + ->expects($this->once()) + ->method('setToken') + ->with($this->equalTo($token)) + ; + + $manager + ->expects($this->once()) + ->method('authenticate') + ->will($this->returnValue($token)) + ; + + $session = $this->getMockBuilder('\Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock(); + $session + ->expects($this->once()) + ->method('isStarted') + ->will($this->returnValue(true)) + ; + + $request = $this->getMockBuilder('\Symfony\Component\HttpFoundation\Request')->getMock(); + $request + ->expects($this->once()) + ->method('hasSession') + ->will($this->returnValue(true)) + ; + + $request + ->expects($this->once()) + ->method('getSession') + ->will($this->returnValue($session)) + ; + + $event = $this->getGetResponseEvent(); + $event + ->expects($this->once()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $sessionStrategy + ->expects($this->once()) + ->method('onAuthentication') + ->will($this->returnValue(null)) + ; + + $listener->handle($event); + } + + public function testSessionIsMigratedByDefault() + { + list($listener, $tokenStorage, $service, $manager, , $dispatcher, $sessionStrategy) = $this->getListener(false, true, false); + + $tokenStorage + ->expects($this->once()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $service + ->expects($this->once()) + ->method('autoLogin') + ->will($this->returnValue($token)) + ; + + $tokenStorage + ->expects($this->once()) + ->method('setToken') + ->with($this->equalTo($token)) + ; + + $manager + ->expects($this->once()) + ->method('authenticate') + ->will($this->returnValue($token)) + ; + + $session = $this->getMockBuilder('\Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock(); + $session + ->expects($this->once()) + ->method('isStarted') + ->will($this->returnValue(true)) + ; + $session + ->expects($this->once()) + ->method('migrate') + ; + + $request = $this->getMockBuilder('\Symfony\Component\HttpFoundation\Request')->getMock(); + $request + ->expects($this->any()) + ->method('hasSession') + ->will($this->returnValue(true)) + ; + + $request + ->expects($this->any()) + ->method('getSession') + ->will($this->returnValue($session)) + ; + + $event = $this->getGetResponseEvent(); + $event + ->expects($this->once()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + public function testOnCoreSecurityInteractiveLoginEventIsDispatchedIfDispatcherIsPresent() + { + list($listener, $tokenStorage, $service, $manager, , $dispatcher) = $this->getListener(true); + + $tokenStorage + ->expects($this->once()) + ->method('getToken') + ->will($this->returnValue(null)) + ; + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $service + ->expects($this->once()) + ->method('autoLogin') + ->will($this->returnValue($token)) + ; + + $tokenStorage + ->expects($this->once()) + ->method('setToken') + ->with($this->equalTo($token)) + ; + + $manager + ->expects($this->once()) + ->method('authenticate') + ->will($this->returnValue($token)) + ; + + $event = $this->getGetResponseEvent(); + $request = new Request(); + $event + ->expects($this->once()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $dispatcher + ->expects($this->once()) + ->method('dispatch') + ->with( + SecurityEvents::INTERACTIVE_LOGIN, + $this->isInstanceOf('Symfony\Component\Security\Http\Event\InteractiveLoginEvent') + ) + ; + + $listener->handle($event); + } + + protected function getGetResponseEvent() + { + return $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + } + + protected function getFilterResponseEvent() + { + return $this->getMockBuilder('Symfony\Component\HttpKernel\Event\FilterResponseEvent')->disableOriginalConstructor()->getMock(); + } + + protected function getListener($withDispatcher = false, $catchExceptions = true, $withSessionStrategy = false) + { + $listener = new RememberMeListener( + $tokenStorage = $this->getTokenStorage(), + $service = $this->getService(), + $manager = $this->getManager(), + $logger = $this->getLogger(), + $dispatcher = ($withDispatcher ? $this->getDispatcher() : null), + $catchExceptions, + $sessionStrategy = ($withSessionStrategy ? $this->getSessionStrategy() : null) + ); + + return array($listener, $tokenStorage, $service, $manager, $logger, $dispatcher, $sessionStrategy); + } + + protected function getLogger() + { + return $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + } + + protected function getManager() + { + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + } + + protected function getService() + { + return $this->getMockBuilder('Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface')->getMock(); + } + + protected function getTokenStorage() + { + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + } + + protected function getDispatcher() + { + return $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + } + + private function getSessionStrategy() + { + return $this->getMockBuilder('\Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface')->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c02812f6ce5c29917407f9aa1312a735a8161390 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.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\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Http\Firewall\RemoteUserAuthenticationListener; + +class RemoteUserAuthenticationListenerTest extends TestCase +{ + public function testGetPreAuthenticatedData() + { + $serverVars = array( + 'REMOTE_USER' => 'TheUser', + ); + + $request = new Request(array(), array(), array(), array(), array(), $serverVars); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + + $listener = new RemoteUserAuthenticationListener( + $tokenStorage, + $authenticationManager, + 'TheProviderKey' + ); + + $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); + $method->setAccessible(true); + + $result = $method->invokeArgs($listener, array($request)); + $this->assertSame($result, array('TheUser', null)); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testGetPreAuthenticatedDataNoUser() + { + $request = new Request(array(), array(), array(), array(), array(), array()); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + + $listener = new RemoteUserAuthenticationListener( + $tokenStorage, + $authenticationManager, + 'TheProviderKey' + ); + + $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); + $method->setAccessible(true); + + $result = $method->invokeArgs($listener, array($request)); + } + + public function testGetPreAuthenticatedDataWithDifferentKeys() + { + $userCredentials = array('TheUser', null); + + $request = new Request(array(), array(), array(), array(), array(), array( + 'TheUserKey' => 'TheUser', + )); + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + + $listener = new RemoteUserAuthenticationListener( + $tokenStorage, + $authenticationManager, + 'TheProviderKey', + 'TheUserKey' + ); + + $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); + $method->setAccessible(true); + + $result = $method->invokeArgs($listener, array($request)); + $this->assertSame($result, $userCredentials); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0c4229856b4f51e8dd7b963b84f4f53d97031b0e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Exception\AuthenticationException; +use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; +use Symfony\Component\Security\Http\Firewall\SimplePreAuthenticationListener; +use Symfony\Component\Security\Http\SecurityEvents; + +class SimplePreAuthenticationListenerTest extends TestCase +{ + private $authenticationManager; + private $dispatcher; + private $event; + private $logger; + private $request; + private $tokenStorage; + private $token; + + public function testHandle() + { + $this->tokenStorage + ->expects($this->once()) + ->method('setToken') + ->with($this->equalTo($this->token)) + ; + + $this->authenticationManager + ->expects($this->once()) + ->method('authenticate') + ->with($this->equalTo($this->token)) + ->will($this->returnValue($this->token)) + ; + + $simpleAuthenticator = $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface')->getMock(); + $simpleAuthenticator + ->expects($this->once()) + ->method('createToken') + ->with($this->equalTo($this->request), $this->equalTo('secured_area')) + ->will($this->returnValue($this->token)) + ; + + $loginEvent = new InteractiveLoginEvent($this->request, $this->token); + + $this->dispatcher + ->expects($this->once()) + ->method('dispatch') + ->with($this->equalTo(SecurityEvents::INTERACTIVE_LOGIN), $this->equalTo($loginEvent)) + ; + + $listener = new SimplePreAuthenticationListener($this->tokenStorage, $this->authenticationManager, 'secured_area', $simpleAuthenticator, $this->logger, $this->dispatcher); + + $listener->handle($this->event); + } + + public function testHandlecatchAuthenticationException() + { + $exception = new AuthenticationException('Authentication failed.'); + + $this->authenticationManager + ->expects($this->once()) + ->method('authenticate') + ->with($this->equalTo($this->token)) + ->will($this->throwException($exception)) + ; + + $this->tokenStorage->expects($this->once()) + ->method('setToken') + ->with($this->equalTo(null)) + ; + + $simpleAuthenticator = $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface')->getMock(); + $simpleAuthenticator + ->expects($this->once()) + ->method('createToken') + ->with($this->equalTo($this->request), $this->equalTo('secured_area')) + ->will($this->returnValue($this->token)) + ; + + $listener = new SimplePreAuthenticationListener($this->tokenStorage, $this->authenticationManager, 'secured_area', $simpleAuthenticator, $this->logger, $this->dispatcher); + + $listener->handle($this->event); + } + + protected function setUp() + { + $this->authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager') + ->disableOriginalConstructor() + ->getMock() + ; + + $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + + $this->request = new Request(array(), array(), array(), array(), array(), array()); + + $this->event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $this->event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($this->request)) + ; + + $this->logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $this->tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $this->token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + } + + protected function tearDown() + { + $this->authenticationManager = null; + $this->dispatcher = null; + $this->event = null; + $this->logger = null; + $this->request = null; + $this->tokenStorage = null; + $this->token = null; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2c05ef75cab254a5bfae5a01224cb326a7d1a212 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php @@ -0,0 +1,314 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\Event\SwitchUserEvent; +use Symfony\Component\Security\Http\Firewall\SwitchUserListener; +use Symfony\Component\Security\Http\SecurityEvents; + +class SwitchUserListenerTest extends TestCase +{ + private $tokenStorage; + + private $userProvider; + + private $userChecker; + + private $accessDecisionManager; + + private $request; + + private $event; + + protected function setUp() + { + $this->tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $this->userProvider = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserProviderInterface')->getMock(); + $this->userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); + $this->accessDecisionManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')->getMock(); + $this->request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $this->request->query = $this->getMockBuilder('Symfony\Component\HttpFoundation\ParameterBag')->getMock(); + $this->request->server = $this->getMockBuilder('Symfony\Component\HttpFoundation\ServerBag')->getMock(); + $this->event = $this->getEvent($this->request); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage $providerKey must not be empty + */ + public function testProviderKeyIsRequired() + { + new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, '', $this->accessDecisionManager); + } + + public function testEventIsIgnoredIfUsernameIsNotPassedWithTheRequest() + { + $this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue(null)); + + $this->event->expects($this->never())->method('setResponse'); + $this->tokenStorage->expects($this->never())->method('setToken'); + + $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager); + $listener->handle($this->event); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException + */ + public function testExitUserThrowsAuthenticationExceptionIfOriginalTokenCannotBeFound() + { + $token = $this->getToken(array($this->getMockBuilder('Symfony\Component\Security\Core\Role\RoleInterface')->getMock())); + + $this->tokenStorage->expects($this->any())->method('getToken')->will($this->returnValue($token)); + $this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue('_exit')); + + $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager); + $listener->handle($this->event); + } + + public function testExitUserUpdatesToken() + { + $originalToken = $this->getToken(); + $role = $this->getMockBuilder('Symfony\Component\Security\Core\Role\SwitchUserRole') + ->disableOriginalConstructor() + ->getMock(); + $role->expects($this->any())->method('getSource')->will($this->returnValue($originalToken)); + + $this->tokenStorage->expects($this->any()) + ->method('getToken') + ->will($this->returnValue($this->getToken(array($role)))); + + $this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue('_exit')); + $this->request->expects($this->any())->method('getUri')->will($this->returnValue('/')); + $this->request->query->expects($this->once())->method('remove', '_switch_user'); + $this->request->query->expects($this->any())->method('all')->will($this->returnValue(array())); + $this->request->server->expects($this->once())->method('set')->with('QUERY_STRING', ''); + + $this->tokenStorage->expects($this->once()) + ->method('setToken')->with($originalToken); + $this->event->expects($this->once()) + ->method('setResponse')->with($this->isInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse')); + + $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager); + $listener->handle($this->event); + } + + public function testExitUserDispatchesEventWithRefreshedUser() + { + $originalUser = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $refreshedUser = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $this + ->userProvider + ->expects($this->any()) + ->method('refreshUser') + ->with($originalUser) + ->willReturn($refreshedUser); + $originalToken = $this->getToken(); + $originalToken + ->expects($this->any()) + ->method('getUser') + ->willReturn($originalUser); + $role = $this + ->getMockBuilder('Symfony\Component\Security\Core\Role\SwitchUserRole') + ->disableOriginalConstructor() + ->getMock(); + $role->expects($this->any())->method('getSource')->willReturn($originalToken); + $this + ->tokenStorage + ->expects($this->any()) + ->method('getToken') + ->willReturn($this->getToken(array($role))); + $this + ->request + ->expects($this->any()) + ->method('get') + ->with('_switch_user') + ->willReturn('_exit'); + $this + ->request + ->expects($this->any()) + ->method('getUri') + ->willReturn('/'); + $this + ->request + ->query + ->expects($this->any()) + ->method('all') + ->will($this->returnValue(array())); + + $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $dispatcher + ->expects($this->once()) + ->method('dispatch') + ->with(SecurityEvents::SWITCH_USER, $this->callback(function (SwitchUserEvent $event) use ($refreshedUser) { + return $event->getTargetUser() === $refreshedUser; + })) + ; + + $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager, null, '_switch_user', 'ROLE_ALLOWED_TO_SWITCH', $dispatcher); + $listener->handle($this->event); + } + + public function testExitUserDoesNotDispatchEventWithStringUser() + { + $originalUser = 'anon.'; + $this + ->userProvider + ->expects($this->never()) + ->method('refreshUser'); + $originalToken = $this->getToken(); + $originalToken + ->expects($this->any()) + ->method('getUser') + ->willReturn($originalUser); + $role = $this + ->getMockBuilder('Symfony\Component\Security\Core\Role\SwitchUserRole') + ->disableOriginalConstructor() + ->getMock(); + $role + ->expects($this->any()) + ->method('getSource') + ->willReturn($originalToken); + $this + ->tokenStorage + ->expects($this->any()) + ->method('getToken') + ->willReturn($this->getToken(array($role))); + $this + ->request + ->expects($this->any()) + ->method('get') + ->with('_switch_user') + ->willReturn('_exit'); + $this + ->request + ->query + ->expects($this->any()) + ->method('all') + ->will($this->returnValue(array())); + $this + ->request + ->expects($this->any()) + ->method('getUri') + ->willReturn('/'); + + $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $dispatcher + ->expects($this->never()) + ->method('dispatch') + ; + + $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager, null, '_switch_user', 'ROLE_ALLOWED_TO_SWITCH', $dispatcher); + $listener->handle($this->event); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AccessDeniedException + */ + public function testSwitchUserIsDisallowed() + { + $token = $this->getToken(array($this->getMockBuilder('Symfony\Component\Security\Core\Role\RoleInterface')->getMock())); + + $this->tokenStorage->expects($this->any())->method('getToken')->will($this->returnValue($token)); + $this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue('kuba')); + + $this->accessDecisionManager->expects($this->once()) + ->method('decide')->with($token, array('ROLE_ALLOWED_TO_SWITCH')) + ->will($this->returnValue(false)); + + $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager); + $listener->handle($this->event); + } + + public function testSwitchUser() + { + $token = $this->getToken(array($this->getMockBuilder('Symfony\Component\Security\Core\Role\RoleInterface')->getMock())); + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user->expects($this->any())->method('getRoles')->will($this->returnValue(array())); + + $this->tokenStorage->expects($this->any())->method('getToken')->will($this->returnValue($token)); + $this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue('kuba')); + $this->request->query->expects($this->once())->method('remove', '_switch_user'); + $this->request->query->expects($this->any())->method('all')->will($this->returnValue(array())); + + $this->request->expects($this->any())->method('getUri')->will($this->returnValue('/')); + $this->request->server->expects($this->once())->method('set')->with('QUERY_STRING', ''); + + $this->accessDecisionManager->expects($this->once()) + ->method('decide')->with($token, array('ROLE_ALLOWED_TO_SWITCH')) + ->will($this->returnValue(true)); + + $this->userProvider->expects($this->once()) + ->method('loadUserByUsername')->with('kuba') + ->will($this->returnValue($user)); + $this->userChecker->expects($this->once()) + ->method('checkPostAuth')->with($user); + $this->tokenStorage->expects($this->once()) + ->method('setToken')->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken')); + + $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager); + $listener->handle($this->event); + } + + public function testSwitchUserKeepsOtherQueryStringParameters() + { + $token = $this->getToken(array($this->getMockBuilder('Symfony\Component\Security\Core\Role\RoleInterface')->getMock())); + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user->expects($this->any())->method('getRoles')->will($this->returnValue(array())); + + $this->tokenStorage->expects($this->any())->method('getToken')->will($this->returnValue($token)); + $this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue('kuba')); + $this->request->query->expects($this->once())->method('remove', '_switch_user'); + $this->request->query->expects($this->any())->method('all')->will($this->returnValue(array('page' => 3, 'section' => 2))); + $this->request->expects($this->any())->method('getUri')->will($this->returnValue('/')); + $this->request->server->expects($this->once())->method('set')->with('QUERY_STRING', 'page=3§ion=2'); + + $this->accessDecisionManager->expects($this->once()) + ->method('decide')->with($token, array('ROLE_ALLOWED_TO_SWITCH')) + ->will($this->returnValue(true)); + + $this->userProvider->expects($this->once()) + ->method('loadUserByUsername')->with('kuba') + ->will($this->returnValue($user)); + $this->userChecker->expects($this->once()) + ->method('checkPostAuth')->with($user); + $this->tokenStorage->expects($this->once()) + ->method('setToken')->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken')); + + $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager); + $listener->handle($this->event); + } + + private function getEvent($request) + { + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') + ->disableOriginalConstructor() + ->getMock(); + + $event->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)); + + return $event; + } + + private function getToken(array $roles = array()) + { + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $token->expects($this->any()) + ->method('getRoles') + ->will($this->returnValue($roles)); + + return $token; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1e7649db970660cf7e8f135c372d70f91c84c8b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Tests\Http\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener; +use Symfony\Component\Security\Core\Security; + +class UsernamePasswordFormAuthenticationListenerTest extends TestCase +{ + /** + * @dataProvider getUsernameForLength + */ + public function testHandleWhenUsernameLength($username, $ok) + { + $request = Request::create('/login_check', 'POST', array('_username' => $username)); + $request->setSession($this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock()); + + $httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); + $httpUtils + ->expects($this->any()) + ->method('checkRequestPath') + ->will($this->returnValue(true)) + ; + + $failureHandler = $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface')->getMock(); + $failureHandler + ->expects($ok ? $this->never() : $this->once()) + ->method('onAuthenticationFailure') + ->will($this->returnValue(new Response())) + ; + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager')->disableOriginalConstructor()->getMock(); + $authenticationManager + ->expects($ok ? $this->once() : $this->never()) + ->method('authenticate') + ->will($this->returnValue(new Response())) + ; + + $listener = new UsernamePasswordFormAuthenticationListener( + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(), + $authenticationManager, + $this->getMockBuilder('Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface')->getMock(), + $httpUtils, + 'TheProviderKey', + $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface')->getMock(), + $failureHandler, + array('require_previous_session' => false) + ); + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); + $event + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)) + ; + + $listener->handle($event); + } + + public function getUsernameForLength() + { + return array( + array(str_repeat('x', Security::MAX_USERNAME_LENGTH + 1), false), + array(str_repeat('x', Security::MAX_USERNAME_LENGTH - 1), true), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..07206202ab2c6461b298225174dfea77c949c7e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Firewall; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Http\Firewall\X509AuthenticationListener; + +class X509AuthenticationListenerTest extends TestCase +{ + /** + * @dataProvider dataProviderGetPreAuthenticatedData + */ + public function testGetPreAuthenticatedData($user, $credentials) + { + $serverVars = array(); + if ('' !== $user) { + $serverVars['SSL_CLIENT_S_DN_Email'] = $user; + } + if ('' !== $credentials) { + $serverVars['SSL_CLIENT_S_DN'] = $credentials; + } + + $request = new Request(array(), array(), array(), array(), array(), $serverVars); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + + $listener = new X509AuthenticationListener($tokenStorage, $authenticationManager, 'TheProviderKey'); + + $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); + $method->setAccessible(true); + + $result = $method->invokeArgs($listener, array($request)); + $this->assertSame($result, array($user, $credentials)); + } + + public static function dataProviderGetPreAuthenticatedData() + { + return array( + 'validValues' => array('TheUser', 'TheCredentials'), + 'noCredentials' => array('TheUser', ''), + ); + } + + /** + * @dataProvider dataProviderGetPreAuthenticatedDataNoUser + */ + public function testGetPreAuthenticatedDataNoUser($emailAddress) + { + $credentials = 'CN=Sample certificate DN/emailAddress='.$emailAddress; + $request = new Request(array(), array(), array(), array(), array(), array('SSL_CLIENT_S_DN' => $credentials)); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + + $listener = new X509AuthenticationListener($tokenStorage, $authenticationManager, 'TheProviderKey'); + + $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); + $method->setAccessible(true); + + $result = $method->invokeArgs($listener, array($request)); + $this->assertSame($result, array($emailAddress, $credentials)); + } + + public static function dataProviderGetPreAuthenticatedDataNoUser() + { + return array( + 'basicEmailAddress' => array('cert@example.com'), + 'emailAddressWithPlusSign' => array('cert+something@example.com'), + ); + } + + /** + * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException + */ + public function testGetPreAuthenticatedDataNoData() + { + $request = new Request(array(), array(), array(), array(), array(), array()); + + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + + $listener = new X509AuthenticationListener($tokenStorage, $authenticationManager, 'TheProviderKey'); + + $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); + $method->setAccessible(true); + + $result = $method->invokeArgs($listener, array($request)); + } + + public function testGetPreAuthenticatedDataWithDifferentKeys() + { + $userCredentials = array('TheUser', 'TheCredentials'); + + $request = new Request(array(), array(), array(), array(), array(), array( + 'TheUserKey' => 'TheUser', + 'TheCredentialsKey' => 'TheCredentials', + )); + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + + $listener = new X509AuthenticationListener($tokenStorage, $authenticationManager, 'TheProviderKey', 'TheUserKey', 'TheCredentialsKey'); + + $method = new \ReflectionMethod($listener, 'getPreAuthenticatedData'); + $method->setAccessible(true); + + $result = $method->invokeArgs($listener, array($request)); + $this->assertSame($result, $userCredentials); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallMapTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallMapTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2a62f21d33ad0d59dcd80073a14c60e0b4d98298 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallMapTest.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\FirewallMap; +use Symfony\Component\HttpFoundation\Request; + +class FirewallMapTest extends TestCase +{ + public function testGetListeners() + { + $map = new FirewallMap(); + + $request = new Request(); + + $notMatchingMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); + $notMatchingMatcher + ->expects($this->once()) + ->method('matches') + ->with($this->equalTo($request)) + ->will($this->returnValue(false)) + ; + + $map->add($notMatchingMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); + + $matchingMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); + $matchingMatcher + ->expects($this->once()) + ->method('matches') + ->with($this->equalTo($request)) + ->will($this->returnValue(true)) + ; + $theListener = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock(); + $theException = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ExceptionListener')->disableOriginalConstructor()->getMock(); + + $map->add($matchingMatcher, array($theListener), $theException); + + $tooLateMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); + $tooLateMatcher + ->expects($this->never()) + ->method('matches') + ; + + $map->add($tooLateMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); + + list($listeners, $exception) = $map->getListeners($request); + + $this->assertEquals(array($theListener), $listeners); + $this->assertEquals($theException, $exception); + } + + public function testGetListenersWithAnEntryHavingNoRequestMatcher() + { + $map = new FirewallMap(); + + $request = new Request(); + + $notMatchingMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); + $notMatchingMatcher + ->expects($this->once()) + ->method('matches') + ->with($this->equalTo($request)) + ->will($this->returnValue(false)) + ; + + $map->add($notMatchingMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); + + $theListener = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock(); + $theException = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ExceptionListener')->disableOriginalConstructor()->getMock(); + + $map->add(null, array($theListener), $theException); + + $tooLateMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); + $tooLateMatcher + ->expects($this->never()) + ->method('matches') + ; + + $map->add($tooLateMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); + + list($listeners, $exception) = $map->getListeners($request); + + $this->assertEquals(array($theListener), $listeners); + $this->assertEquals($theException, $exception); + } + + public function testGetListenersWithNoMatchingEntry() + { + $map = new FirewallMap(); + + $request = new Request(); + + $notMatchingMatcher = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock(); + $notMatchingMatcher + ->expects($this->once()) + ->method('matches') + ->with($this->equalTo($request)) + ->will($this->returnValue(false)) + ; + + $map->add($notMatchingMatcher, array($this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock())); + + list($listeners, $exception) = $map->getListeners($request); + + $this->assertEquals(array(), $listeners); + $this->assertNull($exception); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bd475bb4e5b1f9e697f4a0fa878b1612a2e5c902 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/FirewallTest.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\Security\Http\Firewall; + +class FirewallTest extends TestCase +{ + public function testOnKernelRequestRegistersExceptionListener() + { + $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + + $listener = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ExceptionListener')->disableOriginalConstructor()->getMock(); + $listener + ->expects($this->once()) + ->method('register') + ->with($this->equalTo($dispatcher)) + ; + + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); + + $map = $this->getMockBuilder('Symfony\Component\Security\Http\FirewallMapInterface')->getMock(); + $map + ->expects($this->once()) + ->method('getListeners') + ->with($this->equalTo($request)) + ->will($this->returnValue(array(array(), $listener))) + ; + + $event = new GetResponseEvent($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $request, HttpKernelInterface::MASTER_REQUEST); + + $firewall = new Firewall($map, $dispatcher); + $firewall->onKernelRequest($event); + } + + public function testOnKernelRequestStopsWhenThereIsAResponse() + { + $response = new Response(); + + $first = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock(); + $first + ->expects($this->once()) + ->method('handle') + ; + + $second = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock(); + $second + ->expects($this->never()) + ->method('handle') + ; + + $map = $this->getMockBuilder('Symfony\Component\Security\Http\FirewallMapInterface')->getMock(); + $map + ->expects($this->once()) + ->method('getListeners') + ->will($this->returnValue(array(array($first, $second), null))) + ; + + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') + ->setMethods(array('hasResponse')) + ->setConstructorArgs(array( + $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), + $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(), + HttpKernelInterface::MASTER_REQUEST, + )) + ->getMock() + ; + $event + ->expects($this->once()) + ->method('hasResponse') + ->will($this->returnValue(true)) + ; + + $firewall = new Firewall($map, $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock()); + $firewall->onKernelRequest($event); + } + + public function testOnKernelRequestWithSubRequest() + { + $map = $this->getMockBuilder('Symfony\Component\Security\Http\FirewallMapInterface')->getMock(); + $map + ->expects($this->never()) + ->method('getListeners') + ; + + $event = new GetResponseEvent( + $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), + $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(), + HttpKernelInterface::SUB_REQUEST + ); + + $firewall = new Firewall($map, $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock()); + $firewall->onKernelRequest($event); + + $this->assertFalse($event->hasResponse()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..eb0379f97b4f56511edb64660166700289822e1d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php @@ -0,0 +1,268 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Exception\MethodNotAllowedException; +use Symfony\Component\Routing\Exception\ResourceNotFoundException; +use Symfony\Component\Security\Core\Security; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Security\Http\HttpUtils; + +class HttpUtilsTest extends TestCase +{ + public function testCreateRedirectResponseWithPath() + { + $utils = new HttpUtils($this->getUrlGenerator()); + $response = $utils->createRedirectResponse($this->getRequest(), '/foobar'); + + $this->assertTrue($response->isRedirect('http://localhost/foobar')); + $this->assertEquals(302, $response->getStatusCode()); + } + + public function testCreateRedirectResponseWithAbsoluteUrl() + { + $utils = new HttpUtils($this->getUrlGenerator()); + $response = $utils->createRedirectResponse($this->getRequest(), 'http://symfony.com/'); + + $this->assertTrue($response->isRedirect('http://symfony.com/')); + } + + public function testCreateRedirectResponseWithRouteName() + { + $utils = new HttpUtils($urlGenerator = $this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->getMock()); + + $urlGenerator + ->expects($this->any()) + ->method('generate') + ->with('foobar', array(), UrlGeneratorInterface::ABSOLUTE_URL) + ->will($this->returnValue('http://localhost/foo/bar')) + ; + $urlGenerator + ->expects($this->any()) + ->method('getContext') + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Routing\RequestContext')->getMock())) + ; + + $response = $utils->createRedirectResponse($this->getRequest(), 'foobar'); + + $this->assertTrue($response->isRedirect('http://localhost/foo/bar')); + } + + public function testCreateRequestWithPath() + { + $request = $this->getRequest(); + $request->server->set('Foo', 'bar'); + + $utils = new HttpUtils($this->getUrlGenerator()); + $subRequest = $utils->createRequest($request, '/foobar'); + + $this->assertEquals('GET', $subRequest->getMethod()); + $this->assertEquals('/foobar', $subRequest->getPathInfo()); + $this->assertEquals('bar', $subRequest->server->get('Foo')); + } + + public function testCreateRequestWithRouteName() + { + $utils = new HttpUtils($urlGenerator = $this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->getMock()); + + $urlGenerator + ->expects($this->once()) + ->method('generate') + ->will($this->returnValue('/foo/bar')) + ; + $urlGenerator + ->expects($this->any()) + ->method('getContext') + ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Routing\RequestContext')->getMock())) + ; + + $subRequest = $utils->createRequest($this->getRequest(), 'foobar'); + + $this->assertEquals('/foo/bar', $subRequest->getPathInfo()); + } + + public function testCreateRequestWithAbsoluteUrl() + { + $utils = new HttpUtils($this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->getMock()); + $subRequest = $utils->createRequest($this->getRequest(), 'http://symfony.com/'); + + $this->assertEquals('/', $subRequest->getPathInfo()); + } + + public function testCreateRequestPassesSessionToTheNewRequest() + { + $request = $this->getRequest(); + $request->setSession($session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock()); + + $utils = new HttpUtils($this->getUrlGenerator()); + $subRequest = $utils->createRequest($request, '/foobar'); + + $this->assertSame($session, $subRequest->getSession()); + } + + /** + * @dataProvider provideSecurityContextAttributes + */ + public function testCreateRequestPassesSecurityContextAttributesToTheNewRequest($attribute) + { + $request = $this->getRequest(); + $request->attributes->set($attribute, 'foo'); + + $utils = new HttpUtils($this->getUrlGenerator()); + $subRequest = $utils->createRequest($request, '/foobar'); + + $this->assertSame('foo', $subRequest->attributes->get($attribute)); + } + + public function provideSecurityContextAttributes() + { + return array( + array(Security::AUTHENTICATION_ERROR), + array(Security::ACCESS_DENIED_ERROR), + array(Security::LAST_USERNAME), + ); + } + + public function testCheckRequestPath() + { + $utils = new HttpUtils($this->getUrlGenerator()); + + $this->assertTrue($utils->checkRequestPath($this->getRequest(), '/')); + $this->assertFalse($utils->checkRequestPath($this->getRequest(), '/foo')); + $this->assertTrue($utils->checkRequestPath($this->getRequest('/foo%20bar'), '/foo bar')); + // Plus must not decoded to space + $this->assertTrue($utils->checkRequestPath($this->getRequest('/foo+bar'), '/foo+bar')); + // Checking unicode + $this->assertTrue($utils->checkRequestPath($this->getRequest(urlencode('/вход')), '/вход')); + } + + public function testCheckRequestPathWithUrlMatcherAndResourceNotFound() + { + $urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\UrlMatcherInterface')->getMock(); + $urlMatcher + ->expects($this->any()) + ->method('match') + ->with('/') + ->will($this->throwException(new ResourceNotFoundException())) + ; + + $utils = new HttpUtils(null, $urlMatcher); + $this->assertFalse($utils->checkRequestPath($this->getRequest(), 'foobar')); + } + + public function testCheckRequestPathWithUrlMatcherAndMethodNotAllowed() + { + $request = $this->getRequest(); + $urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\RequestMatcherInterface')->getMock(); + $urlMatcher + ->expects($this->any()) + ->method('matchRequest') + ->with($request) + ->will($this->throwException(new MethodNotAllowedException(array()))) + ; + + $utils = new HttpUtils(null, $urlMatcher); + $this->assertFalse($utils->checkRequestPath($request, 'foobar')); + } + + public function testCheckRequestPathWithUrlMatcherAndResourceFoundByUrl() + { + $urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\UrlMatcherInterface')->getMock(); + $urlMatcher + ->expects($this->any()) + ->method('match') + ->with('/foo/bar') + ->will($this->returnValue(array('_route' => 'foobar'))) + ; + + $utils = new HttpUtils(null, $urlMatcher); + $this->assertTrue($utils->checkRequestPath($this->getRequest('/foo/bar'), 'foobar')); + } + + public function testCheckRequestPathWithUrlMatcherAndResourceFoundByRequest() + { + $request = $this->getRequest(); + $urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\RequestMatcherInterface')->getMock(); + $urlMatcher + ->expects($this->any()) + ->method('matchRequest') + ->with($request) + ->will($this->returnValue(array('_route' => 'foobar'))) + ; + + $utils = new HttpUtils(null, $urlMatcher); + $this->assertTrue($utils->checkRequestPath($request, 'foobar')); + } + + /** + * @expectedException \RuntimeException + */ + public function testCheckRequestPathWithUrlMatcherLoadingException() + { + $urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\UrlMatcherInterface')->getMock(); + $urlMatcher + ->expects($this->any()) + ->method('match') + ->will($this->throwException(new \RuntimeException())) + ; + + $utils = new HttpUtils(null, $urlMatcher); + $utils->checkRequestPath($this->getRequest(), 'foobar'); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Matcher must either implement UrlMatcherInterface or RequestMatcherInterface + */ + public function testUrlMatcher() + { + new HttpUtils($this->getUrlGenerator(), new \stdClass()); + } + + public function testGenerateUriRemovesQueryString() + { + $utils = new HttpUtils($this->getUrlGenerator('/foo/bar')); + $this->assertEquals('/foo/bar', $utils->generateUri(new Request(), 'route_name')); + + $utils = new HttpUtils($this->getUrlGenerator('/foo/bar?param=value')); + $this->assertEquals('/foo/bar', $utils->generateUri(new Request(), 'route_name')); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage You must provide a UrlGeneratorInterface instance to be able to use routes. + */ + public function testUrlGeneratorIsRequiredToGenerateUrl() + { + $utils = new HttpUtils(); + $utils->generateUri(new Request(), 'route_name'); + } + + private function getUrlGenerator($generatedUrl = '/foo/bar') + { + $urlGenerator = $this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->getMock(); + $urlGenerator + ->expects($this->any()) + ->method('generate') + ->will($this->returnValue($generatedUrl)) + ; + + return $urlGenerator; + } + + private function getRequest($path = '/') + { + return Request::create($path, 'get'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/CookieClearingLogoutHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/CookieClearingLogoutHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0cc241b74a0a34f13d2815f77b6cddc31dc1c2ba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/CookieClearingLogoutHandlerTest.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Logout; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\ResponseHeaderBag; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Http\Logout\CookieClearingLogoutHandler; + +class CookieClearingLogoutHandlerTest extends TestCase +{ + public function testLogout() + { + $request = new Request(); + $response = new Response(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + $handler = new CookieClearingLogoutHandler(array('foo' => array('path' => '/foo', 'domain' => 'foo.foo'), 'foo2' => array('path' => null, 'domain' => null))); + + $cookies = $response->headers->getCookies(); + $this->assertCount(0, $cookies); + + $handler->logout($request, $response, $token); + + $cookies = $response->headers->getCookies(ResponseHeaderBag::COOKIES_ARRAY); + $this->assertCount(2, $cookies); + + $cookie = $cookies['foo.foo']['/foo']['foo']; + $this->assertEquals('foo', $cookie->getName()); + $this->assertEquals('/foo', $cookie->getPath()); + $this->assertEquals('foo.foo', $cookie->getDomain()); + $this->assertTrue($cookie->isCleared()); + + $cookie = $cookies['']['/']['foo2']; + $this->assertStringStartsWith('foo2', $cookie->getName()); + $this->assertEquals('/', $cookie->getPath()); + $this->assertNull($cookie->getDomain()); + $this->assertTrue($cookie->isCleared()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/DefaultLogoutSuccessHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/DefaultLogoutSuccessHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9936fc933957b7ed531371c972ddff23fc2af0ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/DefaultLogoutSuccessHandlerTest.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\Component\Security\Http\Tests\Logout; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Http\Logout\DefaultLogoutSuccessHandler; + +class DefaultLogoutSuccessHandlerTest extends TestCase +{ + public function testLogout() + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $response = new Response(); + + $httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); + $httpUtils->expects($this->once()) + ->method('createRedirectResponse') + ->with($request, '/dashboard') + ->will($this->returnValue($response)); + + $handler = new DefaultLogoutSuccessHandler($httpUtils, '/dashboard'); + $result = $handler->onLogoutSuccess($request); + + $this->assertSame($response, $result); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/SessionLogoutHandlerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/SessionLogoutHandlerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e32d46e3e577e88e8fcd8760bc1447765ecaf2bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Logout/SessionLogoutHandlerTest.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Logout; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Http\Logout\SessionLogoutHandler; + +class SessionLogoutHandlerTest extends TestCase +{ + public function testLogout() + { + $handler = new SessionLogoutHandler(); + + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $response = new Response(); + $session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\Session')->disableOriginalConstructor()->getMock(); + + $request + ->expects($this->once()) + ->method('getSession') + ->will($this->returnValue($session)) + ; + + $session + ->expects($this->once()) + ->method('invalidate') + ; + + $handler->logout($request, $response, $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c480435b02b40833e1edba403f7b96c9733c0498 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php @@ -0,0 +1,312 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\RememberMe; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Http\RememberMe\AbstractRememberMeServices; + +class AbstractRememberMeServicesTest extends TestCase +{ + public function testGetRememberMeParameter() + { + $service = $this->getService(null, array('remember_me_parameter' => 'foo')); + + $this->assertEquals('foo', $service->getRememberMeParameter()); + } + + public function testGetSecret() + { + $service = $this->getService(); + $this->assertEquals('foosecret', $service->getSecret()); + } + + public function testAutoLoginReturnsNullWhenNoCookie() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + + $this->assertNull($service->autoLogin(new Request())); + } + + /** + * @expectedException \RuntimeException + */ + public function testAutoLoginThrowsExceptionWhenImplementationDoesNotReturnUserInterface() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $request = new Request(); + $request->cookies->set('foo', 'foo'); + + $service + ->expects($this->once()) + ->method('processAutoLoginCookie') + ->will($this->returnValue(null)) + ; + + $service->autoLogin($request); + } + + public function testAutoLogin() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $request = new Request(); + $request->cookies->set('foo', 'foo'); + + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user + ->expects($this->once()) + ->method('getRoles') + ->will($this->returnValue(array())) + ; + + $service + ->expects($this->once()) + ->method('processAutoLoginCookie') + ->will($this->returnValue($user)) + ; + + $returnedToken = $service->autoLogin($request); + + $this->assertSame($user, $returnedToken->getUser()); + $this->assertSame('foosecret', $returnedToken->getSecret()); + $this->assertSame('fookey', $returnedToken->getProviderKey()); + } + + /** + * @dataProvider provideOptionsForLogout + */ + public function testLogout(array $options) + { + $service = $this->getService(null, $options); + $request = new Request(); + $response = new Response(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $service->logout($request, $response, $token); + $cookie = $request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\Cookie', $cookie); + $this->assertTrue($cookie->isCleared()); + $this->assertSame($options['name'], $cookie->getName()); + $this->assertSame($options['path'], $cookie->getPath()); + $this->assertSame($options['domain'], $cookie->getDomain()); + $this->assertSame($options['secure'], $cookie->isSecure()); + $this->assertSame($options['httponly'], $cookie->isHttpOnly()); + } + + public function provideOptionsForLogout() + { + return array( + array(array('name' => 'foo', 'path' => '/', 'domain' => null, 'secure' => false, 'httponly' => true)), + array(array('name' => 'foo', 'path' => '/bar', 'domain' => 'baz.com', 'secure' => true, 'httponly' => false)), + ); + } + + public function testLoginFail() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $request = new Request(); + + $service->loginFail($request); + + $this->assertTrue($request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME)->isCleared()); + } + + public function testLoginSuccessIsNotProcessedWhenTokenDoesNotContainUserInterfaceImplementation() + { + $service = $this->getService(null, array('name' => 'foo', 'always_remember_me' => true, 'path' => null, 'domain' => null)); + $request = new Request(); + $response = new Response(); + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $token + ->expects($this->once()) + ->method('getUser') + ->will($this->returnValue('foo')) + ; + + $service + ->expects($this->never()) + ->method('onLoginSuccess') + ; + + $this->assertFalse($request->request->has('foo')); + + $service->loginSuccess($request, $response, $token); + } + + public function testLoginSuccessIsNotProcessedWhenRememberMeIsNotRequested() + { + $service = $this->getService(null, array('name' => 'foo', 'always_remember_me' => false, 'remember_me_parameter' => 'foo', 'path' => null, 'domain' => null)); + $request = new Request(); + $response = new Response(); + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $token + ->expects($this->once()) + ->method('getUser') + ->will($this->returnValue($account)) + ; + + $service + ->expects($this->never()) + ->method('onLoginSuccess') + ->will($this->returnValue(null)) + ; + + $this->assertFalse($request->request->has('foo')); + + $service->loginSuccess($request, $response, $token); + } + + public function testLoginSuccessWhenRememberMeAlwaysIsTrue() + { + $service = $this->getService(null, array('name' => 'foo', 'always_remember_me' => true, 'path' => null, 'domain' => null)); + $request = new Request(); + $response = new Response(); + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $token + ->expects($this->once()) + ->method('getUser') + ->will($this->returnValue($account)) + ; + + $service + ->expects($this->once()) + ->method('onLoginSuccess') + ->will($this->returnValue(null)) + ; + + $service->loginSuccess($request, $response, $token); + } + + /** + * @dataProvider getPositiveRememberMeParameterValues + */ + public function testLoginSuccessWhenRememberMeParameterWithPathIsPositive($value) + { + $service = $this->getService(null, array('name' => 'foo', 'always_remember_me' => false, 'remember_me_parameter' => 'foo[bar]', 'path' => null, 'domain' => null)); + + $request = new Request(); + $request->request->set('foo', array('bar' => $value)); + $response = new Response(); + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $token + ->expects($this->once()) + ->method('getUser') + ->will($this->returnValue($account)) + ; + + $service + ->expects($this->once()) + ->method('onLoginSuccess') + ->will($this->returnValue(true)) + ; + + $service->loginSuccess($request, $response, $token); + } + + /** + * @dataProvider getPositiveRememberMeParameterValues + */ + public function testLoginSuccessWhenRememberMeParameterIsPositive($value) + { + $service = $this->getService(null, array('name' => 'foo', 'always_remember_me' => false, 'remember_me_parameter' => 'foo', 'path' => null, 'domain' => null)); + + $request = new Request(); + $request->request->set('foo', $value); + $response = new Response(); + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $token + ->expects($this->once()) + ->method('getUser') + ->will($this->returnValue($account)) + ; + + $service + ->expects($this->once()) + ->method('onLoginSuccess') + ->will($this->returnValue(true)) + ; + + $service->loginSuccess($request, $response, $token); + } + + public function getPositiveRememberMeParameterValues() + { + return array( + array('true'), + array('1'), + array('on'), + array('yes'), + ); + } + + public function testEncodeCookieAndDecodeCookieAreInvertible() + { + $cookieParts = array('aa', 'bb', 'cc'); + $service = $this->getService(); + + $encoded = $this->callProtected($service, 'encodeCookie', array($cookieParts)); + $this->assertInternalType('string', $encoded); + + $decoded = $this->callProtected($service, 'decodeCookie', array($encoded)); + $this->assertSame($cookieParts, $decoded); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage cookie delimiter + */ + public function testThereShouldBeNoCookieDelimiterInCookieParts() + { + $cookieParts = array('aa', 'b'.AbstractRememberMeServices::COOKIE_DELIMITER.'b', 'cc'); + $service = $this->getService(); + + $this->callProtected($service, 'encodeCookie', array($cookieParts)); + } + + protected function getService($userProvider = null, $options = array(), $logger = null) + { + if (null === $userProvider) { + $userProvider = $this->getProvider(); + } + + return $this->getMockForAbstractClass('Symfony\Component\Security\Http\RememberMe\AbstractRememberMeServices', array( + array($userProvider), 'foosecret', 'fookey', $options, $logger, + )); + } + + protected function getProvider() + { + $provider = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserProviderInterface')->getMock(); + $provider + ->expects($this->any()) + ->method('supportsClass') + ->will($this->returnValue(true)) + ; + + return $provider; + } + + private function callProtected($object, $method, array $args) + { + $reflection = new \ReflectionClass(get_class($object)); + $reflectionMethod = $reflection->getMethod($method); + $reflectionMethod->setAccessible(true); + + return $reflectionMethod->invokeArgs($object, $args); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b35215229f5633ab2607fc097fb73284554f021c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php @@ -0,0 +1,339 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\RememberMe; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\ResponseHeaderBag; +use Symfony\Component\Security\Http\RememberMe\PersistentTokenBasedRememberMeServices; +use Symfony\Component\Security\Core\Exception\TokenNotFoundException; +use Symfony\Component\Security\Core\Exception\CookieTheftException; + +class PersistentTokenBasedRememberMeServicesTest extends TestCase +{ + public static function setUpBeforeClass() + { + try { + random_bytes(1); + } catch (\Exception $e) { + self::markTestSkipped($e->getMessage()); + } + } + + public function testAutoLoginReturnsNullWhenNoCookie() + { + $service = $this->getService(null, array('name' => 'foo')); + + $this->assertNull($service->autoLogin(new Request())); + } + + public function testAutoLoginThrowsExceptionOnInvalidCookie() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => false, 'remember_me_parameter' => 'foo')); + $request = new Request(); + $request->request->set('foo', 'true'); + $request->cookies->set('foo', 'foo'); + + $this->assertNull($service->autoLogin($request)); + $this->assertTrue($request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME)->isCleared()); + } + + public function testAutoLoginThrowsExceptionOnNonExistentToken() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => false, 'remember_me_parameter' => 'foo')); + $request = new Request(); + $request->request->set('foo', 'true'); + $request->cookies->set('foo', $this->encodeCookie(array( + $series = 'fooseries', + $tokenValue = 'foovalue', + ))); + + $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); + $tokenProvider + ->expects($this->once()) + ->method('loadTokenBySeries') + ->will($this->throwException(new TokenNotFoundException('Token not found.'))) + ; + $service->setTokenProvider($tokenProvider); + + $this->assertNull($service->autoLogin($request)); + $this->assertTrue($request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME)->isCleared()); + } + + public function testAutoLoginReturnsNullOnNonExistentUser() + { + $userProvider = $this->getProvider(); + $service = $this->getService($userProvider, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600, 'secure' => false, 'httponly' => false)); + $request = new Request(); + $request->cookies->set('foo', $this->encodeCookie(array('fooseries', 'foovalue'))); + + $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); + $tokenProvider + ->expects($this->once()) + ->method('loadTokenBySeries') + ->will($this->returnValue(new PersistentToken('fooclass', 'fooname', 'fooseries', 'foovalue', new \DateTime()))) + ; + $service->setTokenProvider($tokenProvider); + + $userProvider + ->expects($this->once()) + ->method('loadUserByUsername') + ->will($this->throwException(new UsernameNotFoundException('user not found'))) + ; + + $this->assertNull($service->autoLogin($request)); + $this->assertTrue($request->attributes->has(RememberMeServicesInterface::COOKIE_ATTR_NAME)); + } + + public function testAutoLoginThrowsExceptionOnStolenCookieAndRemovesItFromThePersistentBackend() + { + $userProvider = $this->getProvider(); + $service = $this->getService($userProvider, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true)); + $request = new Request(); + $request->cookies->set('foo', $this->encodeCookie(array('fooseries', 'foovalue'))); + + $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); + $service->setTokenProvider($tokenProvider); + + $tokenProvider + ->expects($this->once()) + ->method('loadTokenBySeries') + ->will($this->returnValue(new PersistentToken('fooclass', 'foouser', 'fooseries', 'anotherFooValue', new \DateTime()))) + ; + + $tokenProvider + ->expects($this->once()) + ->method('deleteTokenBySeries') + ->with($this->equalTo('fooseries')) + ->will($this->returnValue(null)) + ; + + try { + $service->autoLogin($request); + $this->fail('Expected CookieTheftException was not thrown.'); + } catch (CookieTheftException $e) { + } + + $this->assertTrue($request->attributes->has(RememberMeServicesInterface::COOKIE_ATTR_NAME)); + } + + public function testAutoLoginDoesNotAcceptAnExpiredCookie() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600)); + $request = new Request(); + $request->cookies->set('foo', $this->encodeCookie(array('fooseries', 'foovalue'))); + + $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); + $tokenProvider + ->expects($this->once()) + ->method('loadTokenBySeries') + ->with($this->equalTo('fooseries')) + ->will($this->returnValue(new PersistentToken('fooclass', 'username', 'fooseries', 'foovalue', new \DateTime('yesterday')))) + ; + $service->setTokenProvider($tokenProvider); + + $this->assertNull($service->autoLogin($request)); + $this->assertTrue($request->attributes->has(RememberMeServicesInterface::COOKIE_ATTR_NAME)); + } + + public function testAutoLogin() + { + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user + ->expects($this->once()) + ->method('getRoles') + ->will($this->returnValue(array('ROLE_FOO'))) + ; + + $userProvider = $this->getProvider(); + $userProvider + ->expects($this->once()) + ->method('loadUserByUsername') + ->with($this->equalTo('foouser')) + ->will($this->returnValue($user)) + ; + + $service = $this->getService($userProvider, array('name' => 'foo', 'path' => null, 'domain' => null, 'secure' => false, 'httponly' => false, 'always_remember_me' => true, 'lifetime' => 3600)); + $request = new Request(); + $request->cookies->set('foo', $this->encodeCookie(array('fooseries', 'foovalue'))); + + $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); + $tokenProvider + ->expects($this->once()) + ->method('loadTokenBySeries') + ->with($this->equalTo('fooseries')) + ->will($this->returnValue(new PersistentToken('fooclass', 'foouser', 'fooseries', 'foovalue', new \DateTime()))) + ; + $service->setTokenProvider($tokenProvider); + + $returnedToken = $service->autoLogin($request); + + $this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken', $returnedToken); + $this->assertSame($user, $returnedToken->getUser()); + $this->assertEquals('foosecret', $returnedToken->getSecret()); + $this->assertTrue($request->attributes->has(RememberMeServicesInterface::COOKIE_ATTR_NAME)); + } + + public function testLogout() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => '/foo', 'domain' => 'foodomain.foo', 'secure' => true, 'httponly' => false)); + $request = new Request(); + $request->cookies->set('foo', $this->encodeCookie(array('fooseries', 'foovalue'))); + $response = new Response(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); + $tokenProvider + ->expects($this->once()) + ->method('deleteTokenBySeries') + ->with($this->equalTo('fooseries')) + ->will($this->returnValue(null)) + ; + $service->setTokenProvider($tokenProvider); + + $service->logout($request, $response, $token); + + $cookie = $request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME); + $this->assertTrue($cookie->isCleared()); + $this->assertEquals('/foo', $cookie->getPath()); + $this->assertEquals('foodomain.foo', $cookie->getDomain()); + $this->assertTrue($cookie->isSecure()); + $this->assertFalse($cookie->isHttpOnly()); + } + + public function testLogoutSimplyIgnoresNonSetRequestCookie() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $request = new Request(); + $response = new Response(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); + $tokenProvider + ->expects($this->never()) + ->method('deleteTokenBySeries') + ; + $service->setTokenProvider($tokenProvider); + + $service->logout($request, $response, $token); + + $cookie = $request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME); + $this->assertTrue($cookie->isCleared()); + $this->assertEquals('/', $cookie->getPath()); + $this->assertNull($cookie->getDomain()); + } + + public function testLogoutSimplyIgnoresInvalidCookie() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $request = new Request(); + $request->cookies->set('foo', 'somefoovalue'); + $response = new Response(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); + $tokenProvider + ->expects($this->never()) + ->method('deleteTokenBySeries') + ; + $service->setTokenProvider($tokenProvider); + + $service->logout($request, $response, $token); + + $this->assertTrue($request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME)->isCleared()); + } + + public function testLoginFail() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null)); + $request = new Request(); + + $this->assertFalse($request->attributes->has(RememberMeServicesInterface::COOKIE_ATTR_NAME)); + $service->loginFail($request); + $this->assertTrue($request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME)->isCleared()); + } + + public function testLoginSuccessSetsCookieWhenLoggedInWithNonRememberMeTokenInterfaceImplementation() + { + $service = $this->getService(null, array('name' => 'foo', 'domain' => 'myfoodomain.foo', 'path' => '/foo/path', 'secure' => true, 'httponly' => true, 'lifetime' => 3600, 'always_remember_me' => true)); + $request = new Request(); + $response = new Response(); + + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $account + ->expects($this->once()) + ->method('getUsername') + ->will($this->returnValue('foo')) + ; + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $token + ->expects($this->any()) + ->method('getUser') + ->will($this->returnValue($account)) + ; + + $tokenProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface')->getMock(); + $tokenProvider + ->expects($this->once()) + ->method('createNewToken') + ; + $service->setTokenProvider($tokenProvider); + + $cookies = $response->headers->getCookies(); + $this->assertCount(0, $cookies); + + $service->loginSuccess($request, $response, $token); + + $cookies = $response->headers->getCookies(ResponseHeaderBag::COOKIES_ARRAY); + $cookie = $cookies['myfoodomain.foo']['/foo/path']['foo']; + $this->assertFalse($cookie->isCleared()); + $this->assertTrue($cookie->isSecure()); + $this->assertTrue($cookie->isHttpOnly()); + $this->assertTrue($cookie->getExpiresTime() > time() + 3590 && $cookie->getExpiresTime() < time() + 3610); + $this->assertEquals('myfoodomain.foo', $cookie->getDomain()); + $this->assertEquals('/foo/path', $cookie->getPath()); + } + + protected function encodeCookie(array $parts) + { + $service = $this->getService(); + $r = new \ReflectionMethod($service, 'encodeCookie'); + $r->setAccessible(true); + + return $r->invoke($service, $parts); + } + + protected function getService($userProvider = null, $options = array(), $logger = null) + { + if (null === $userProvider) { + $userProvider = $this->getProvider(); + } + + return new PersistentTokenBasedRememberMeServices(array($userProvider), 'foosecret', 'fookey', $options, $logger); + } + + protected function getProvider() + { + $provider = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserProviderInterface')->getMock(); + $provider + ->expects($this->any()) + ->method('supportsClass') + ->will($this->returnValue(true)) + ; + + return $provider; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..42649ef5f65777519b97789e082ce70bc899973a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\RememberMe; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\Security\Http\RememberMe\ResponseListener; +use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpKernel\KernelEvents; + +class ResponseListenerTest extends TestCase +{ + public function testRememberMeCookieIsSentWithResponse() + { + $cookie = new Cookie('rememberme'); + + $request = $this->getRequest(array( + RememberMeServicesInterface::COOKIE_ATTR_NAME => $cookie, + )); + + $response = $this->getResponse(); + $response->headers->expects($this->once())->method('setCookie')->with($cookie); + + $listener = new ResponseListener(); + $listener->onKernelResponse($this->getEvent($request, $response)); + } + + public function testRememberMeCookieIsNotSendWithResponseForSubRequests() + { + $cookie = new Cookie('rememberme'); + + $request = $this->getRequest(array( + RememberMeServicesInterface::COOKIE_ATTR_NAME => $cookie, + )); + + $response = $this->getResponse(); + $response->headers->expects($this->never())->method('setCookie'); + + $listener = new ResponseListener(); + $listener->onKernelResponse($this->getEvent($request, $response, HttpKernelInterface::SUB_REQUEST)); + } + + public function testRememberMeCookieIsNotSendWithResponse() + { + $request = $this->getRequest(); + + $response = $this->getResponse(); + $response->headers->expects($this->never())->method('setCookie'); + + $listener = new ResponseListener(); + $listener->onKernelResponse($this->getEvent($request, $response)); + } + + public function testItSubscribesToTheOnKernelResponseEvent() + { + $listener = new ResponseListener(); + + $this->assertSame(array(KernelEvents::RESPONSE => 'onKernelResponse'), ResponseListener::getSubscribedEvents()); + } + + private function getRequest(array $attributes = array()) + { + $request = new Request(); + + foreach ($attributes as $name => $value) { + $request->attributes->set($name, $value); + } + + return $request; + } + + private function getResponse() + { + $response = new Response(); + $response->headers = $this->getMockBuilder('Symfony\Component\HttpFoundation\ResponseHeaderBag')->getMock(); + + return $response; + } + + private function getEvent($request, $response, $type = HttpKernelInterface::MASTER_REQUEST) + { + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\FilterResponseEvent') + ->disableOriginalConstructor() + ->getMock(); + + $event->expects($this->any())->method('getRequest')->will($this->returnValue($request)); + $event->expects($this->any())->method('isMasterRequest')->will($this->returnValue($type === HttpKernelInterface::MASTER_REQUEST)); + $event->expects($this->any())->method('getResponse')->will($this->returnValue($response)); + + return $event; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7405519964cd42bf73d7f830650dcc0697f9613d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php @@ -0,0 +1,285 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\RememberMe; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\ResponseHeaderBag; +use Symfony\Component\Security\Http\RememberMe\TokenBasedRememberMeServices; + +class TokenBasedRememberMeServicesTest extends TestCase +{ + public function testAutoLoginReturnsNullWhenNoCookie() + { + $service = $this->getService(null, array('name' => 'foo')); + + $this->assertNull($service->autoLogin(new Request())); + } + + public function testAutoLoginThrowsExceptionOnInvalidCookie() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => false, 'remember_me_parameter' => 'foo')); + $request = new Request(); + $request->request->set('foo', 'true'); + $request->cookies->set('foo', 'foo'); + + $this->assertNull($service->autoLogin($request)); + $this->assertTrue($request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME)->isCleared()); + } + + public function testAutoLoginThrowsExceptionOnNonExistentUser() + { + $userProvider = $this->getProvider(); + $service = $this->getService($userProvider, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600)); + $request = new Request(); + $request->cookies->set('foo', $this->getCookie('fooclass', 'foouser', time() + 3600, 'foopass')); + + $userProvider + ->expects($this->once()) + ->method('loadUserByUsername') + ->will($this->throwException(new UsernameNotFoundException('user not found'))) + ; + + $this->assertNull($service->autoLogin($request)); + $this->assertTrue($request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME)->isCleared()); + } + + public function testAutoLoginDoesNotAcceptCookieWithInvalidHash() + { + $userProvider = $this->getProvider(); + $service = $this->getService($userProvider, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600)); + $request = new Request(); + $request->cookies->set('foo', base64_encode('class:'.base64_encode('foouser').':123456789:fooHash')); + + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user + ->expects($this->once()) + ->method('getPassword') + ->will($this->returnValue('foopass')) + ; + + $userProvider + ->expects($this->once()) + ->method('loadUserByUsername') + ->with($this->equalTo('foouser')) + ->will($this->returnValue($user)) + ; + + $this->assertNull($service->autoLogin($request)); + $this->assertTrue($request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME)->isCleared()); + } + + public function testAutoLoginDoesNotAcceptAnExpiredCookie() + { + $userProvider = $this->getProvider(); + $service = $this->getService($userProvider, array('name' => 'foo', 'path' => null, 'domain' => null, 'always_remember_me' => true, 'lifetime' => 3600)); + $request = new Request(); + $request->cookies->set('foo', $this->getCookie('fooclass', 'foouser', time() - 1, 'foopass')); + + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user + ->expects($this->once()) + ->method('getPassword') + ->will($this->returnValue('foopass')) + ; + + $userProvider + ->expects($this->once()) + ->method('loadUserByUsername') + ->with($this->equalTo('foouser')) + ->will($this->returnValue($user)) + ; + + $this->assertNull($service->autoLogin($request)); + $this->assertTrue($request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME)->isCleared()); + } + + /** + * @dataProvider provideUsernamesForAutoLogin + * + * @param string $username + */ + public function testAutoLogin($username) + { + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user + ->expects($this->once()) + ->method('getRoles') + ->will($this->returnValue(array('ROLE_FOO'))) + ; + $user + ->expects($this->once()) + ->method('getPassword') + ->will($this->returnValue('foopass')) + ; + + $userProvider = $this->getProvider(); + $userProvider + ->expects($this->once()) + ->method('loadUserByUsername') + ->with($this->equalTo($username)) + ->will($this->returnValue($user)) + ; + + $service = $this->getService($userProvider, array('name' => 'foo', 'always_remember_me' => true, 'lifetime' => 3600)); + $request = new Request(); + $request->cookies->set('foo', $this->getCookie('fooclass', $username, time() + 3600, 'foopass')); + + $returnedToken = $service->autoLogin($request); + + $this->assertInstanceOf('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken', $returnedToken); + $this->assertSame($user, $returnedToken->getUser()); + $this->assertEquals('foosecret', $returnedToken->getSecret()); + } + + public function provideUsernamesForAutoLogin() + { + return array( + array('foouser', 'Simple username'), + array('foo'.TokenBasedRememberMeServices::COOKIE_DELIMITER.'user', 'Username might contain the delimiter'), + ); + } + + public function testLogout() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => null, 'domain' => null, 'secure' => true, 'httponly' => false)); + $request = new Request(); + $response = new Response(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + + $service->logout($request, $response, $token); + + $cookie = $request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME); + $this->assertTrue($cookie->isCleared()); + $this->assertEquals('/', $cookie->getPath()); + $this->assertNull($cookie->getDomain()); + $this->assertTrue($cookie->isSecure()); + $this->assertFalse($cookie->isHttpOnly()); + } + + public function testLoginFail() + { + $service = $this->getService(null, array('name' => 'foo', 'path' => '/foo', 'domain' => 'foodomain.foo')); + $request = new Request(); + + $service->loginFail($request); + + $cookie = $request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME); + $this->assertTrue($cookie->isCleared()); + $this->assertEquals('/foo', $cookie->getPath()); + $this->assertEquals('foodomain.foo', $cookie->getDomain()); + } + + public function testLoginSuccessIgnoresTokensWhichDoNotContainAnUserInterfaceImplementation() + { + $service = $this->getService(null, array('name' => 'foo', 'always_remember_me' => true, 'path' => null, 'domain' => null)); + $request = new Request(); + $response = new Response(); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $token + ->expects($this->once()) + ->method('getUser') + ->will($this->returnValue('foo')) + ; + + $cookies = $response->headers->getCookies(); + $this->assertCount(0, $cookies); + + $service->loginSuccess($request, $response, $token); + + $cookies = $response->headers->getCookies(); + $this->assertCount(0, $cookies); + } + + public function testLoginSuccess() + { + $service = $this->getService(null, array('name' => 'foo', 'domain' => 'myfoodomain.foo', 'path' => '/foo/path', 'secure' => true, 'httponly' => true, 'lifetime' => 3600, 'always_remember_me' => true)); + $request = new Request(); + $response = new Response(); + + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + $user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); + $user + ->expects($this->once()) + ->method('getPassword') + ->will($this->returnValue('foopass')) + ; + $user + ->expects($this->once()) + ->method('getUsername') + ->will($this->returnValue('foouser')) + ; + $token + ->expects($this->atLeastOnce()) + ->method('getUser') + ->will($this->returnValue($user)) + ; + + $cookies = $response->headers->getCookies(); + $this->assertCount(0, $cookies); + + $service->loginSuccess($request, $response, $token); + + $cookies = $response->headers->getCookies(ResponseHeaderBag::COOKIES_ARRAY); + $cookie = $cookies['myfoodomain.foo']['/foo/path']['foo']; + $this->assertFalse($cookie->isCleared()); + $this->assertTrue($cookie->isSecure()); + $this->assertTrue($cookie->isHttpOnly()); + $this->assertTrue($cookie->getExpiresTime() > time() + 3590 && $cookie->getExpiresTime() < time() + 3610); + $this->assertEquals('myfoodomain.foo', $cookie->getDomain()); + $this->assertEquals('/foo/path', $cookie->getPath()); + } + + protected function getCookie($class, $username, $expires, $password) + { + $service = $this->getService(); + $r = new \ReflectionMethod($service, 'generateCookieValue'); + $r->setAccessible(true); + + return $r->invoke($service, $class, $username, $expires, $password); + } + + protected function encodeCookie(array $parts) + { + $service = $this->getService(); + $r = new \ReflectionMethod($service, 'encodeCookie'); + $r->setAccessible(true); + + return $r->invoke($service, $parts); + } + + protected function getService($userProvider = null, $options = array(), $logger = null) + { + if (null === $userProvider) { + $userProvider = $this->getProvider(); + } + + $service = new TokenBasedRememberMeServices(array($userProvider), 'foosecret', 'fookey', $options, $logger); + + return $service; + } + + protected function getProvider() + { + $provider = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserProviderInterface')->getMock(); + $provider + ->expects($this->any()) + ->method('supportsClass') + ->will($this->returnValue(true)) + ; + + return $provider; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Session/SessionAuthenticationStrategyTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Session/SessionAuthenticationStrategyTest.php new file mode 100644 index 0000000000000000000000000000000000000000..271bc99cc5ba3112076d7a9094a49ea677cd3270 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Session/SessionAuthenticationStrategyTest.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Http\Tests\Session; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy; + +class SessionAuthenticationStrategyTest extends TestCase +{ + public function testSessionIsNotChanged() + { + $request = $this->getRequest(); + $request->expects($this->never())->method('getSession'); + + $strategy = new SessionAuthenticationStrategy(SessionAuthenticationStrategy::NONE); + $strategy->onAuthentication($request, $this->getToken()); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage Invalid session authentication strategy "foo" + */ + public function testUnsupportedStrategy() + { + $request = $this->getRequest(); + $request->expects($this->never())->method('getSession'); + + $strategy = new SessionAuthenticationStrategy('foo'); + $strategy->onAuthentication($request, $this->getToken()); + } + + public function testSessionIsMigrated() + { + $session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock(); + $session->expects($this->once())->method('migrate')->with($this->equalTo(true)); + + $strategy = new SessionAuthenticationStrategy(SessionAuthenticationStrategy::MIGRATE); + $strategy->onAuthentication($this->getRequest($session), $this->getToken()); + } + + public function testSessionIsInvalidated() + { + $session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock(); + $session->expects($this->once())->method('invalidate'); + + $strategy = new SessionAuthenticationStrategy(SessionAuthenticationStrategy::INVALIDATE); + $strategy->onAuthentication($this->getRequest($session), $this->getToken()); + } + + private function getRequest($session = null) + { + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + + if (null !== $session) { + $request->expects($this->any())->method('getSession')->will($this->returnValue($session)); + } + + return $request; + } + + private function getToken() + { + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Util/TargetPathTraitTest.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Util/TargetPathTraitTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9ef79f89a32a248730c98bb7abf453a9607d2c46 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Util/TargetPathTraitTest.php @@ -0,0 +1,77 @@ +getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface') + ->getMock(); + + $session->expects($this->once()) + ->method('set') + ->with('_security.firewall_name.target_path', '/foo'); + + $obj->doSetTargetPath($session, 'firewall_name', '/foo'); + } + + public function testGetTargetPath() + { + $obj = new TestClassWithTargetPathTrait(); + + $session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface') + ->getMock(); + + $session->expects($this->once()) + ->method('get') + ->with('_security.cool_firewall.target_path') + ->willReturn('/bar'); + + $actualUri = $obj->doGetTargetPath($session, 'cool_firewall'); + $this->assertEquals( + '/bar', + $actualUri + ); + } + + public function testRemoveTargetPath() + { + $obj = new TestClassWithTargetPathTrait(); + + $session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface') + ->getMock(); + + $session->expects($this->once()) + ->method('remove') + ->with('_security.best_firewall.target_path'); + + $obj->doRemoveTargetPath($session, 'best_firewall'); + } +} + +class TestClassWithTargetPathTrait +{ + use TargetPathTrait; + + public function doSetTargetPath(SessionInterface $session, $providerKey, $uri) + { + $this->saveTargetPath($session, $providerKey, $uri); + } + + public function doGetTargetPath(SessionInterface $session, $providerKey) + { + return $this->getTargetPath($session, $providerKey); + } + + public function doRemoveTargetPath(SessionInterface $session, $providerKey) + { + $this->removeTargetPath($session, $providerKey); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Util/TargetPathTrait.php b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Util/TargetPathTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..986adb0c58309fe3c002b9c11aecb843121a492e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Util/TargetPathTrait.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\Component\Security\Http\Util; + +use Symfony\Component\HttpFoundation\Session\SessionInterface; + +/** + * Trait to get (and set) the URL the user last visited before being forced to authenticate. + */ +trait TargetPathTrait +{ + /** + * Sets the target path the user should be redirected to after authentication. + * + * Usually, you do not need to set this directly. + * + * @param SessionInterface $session + * @param string $providerKey The name of your firewall + * @param string $uri The URI to set as the target path + */ + private function saveTargetPath(SessionInterface $session, $providerKey, $uri) + { + $session->set('_security.'.$providerKey.'.target_path', $uri); + } + + /** + * Returns the URL (if any) the user visited that forced them to login. + * + * @param SessionInterface $session + * @param string $providerKey The name of your firewall + * + * @return string + */ + private function getTargetPath(SessionInterface $session, $providerKey) + { + return $session->get('_security.'.$providerKey.'.target_path'); + } + + /** + * Removes the target path from the session. + * + * @param SessionInterface $session + * @param string $providerKey The name of your firewall + */ + private function removeTargetPath(SessionInterface $session, $providerKey) + { + $session->remove('_security.'.$providerKey.'.target_path'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..add5d3aabe43f6e9a1eaa918006a3e448783ecbe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/composer.json @@ -0,0 +1,49 @@ +{ + "name": "symfony/security-http", + "type": "library", + "description": "Symfony Security Component - HTTP Integration", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/security-core": "~3.2", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0", + "symfony/polyfill-php56": "~1.0", + "symfony/polyfill-php70": "~1.0", + "symfony/property-access": "~2.8|~3.0" + }, + "require-dev": { + "symfony/routing": "~2.8|~3.0", + "symfony/security-csrf": "~2.8|~3.0", + "psr/log": "~1.0" + }, + "suggest": { + "symfony/security-csrf": "For using tokens to protect authentication/logout attempts", + "symfony/routing": "For using the HttpUtils class to create sub-requests, redirect the user, and match URLs" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Security\\Http\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/Http/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..8d636e93f1be6ebe1aad6a0c7adb890f04630227 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/Http/phpunit.xml.dist @@ -0,0 +1,33 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Security/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Security/README.md b/vendor/symfony/symfony/src/Symfony/Component/Security/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b8bba12f203622e9794a041f268b99334c841b5f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/README.md @@ -0,0 +1,18 @@ +Security Component +================== + +The Security component provides a complete security system for your web +application. It ships with facilities for authenticating using HTTP basic or +digest authentication, interactive form login or X.509 certificate login, but +also allows you to implement your own authentication strategies. Furthermore, +the component provides ways to authorize authenticated users based on their +roles, and it contains an advanced ACL system. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/security/index.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/vendor/symfony/symfony/src/Symfony/Component/Security/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Security/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..20325adc186357b9e19314471e971ce8f69cda43 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/composer.json @@ -0,0 +1,62 @@ +{ + "name": "symfony/security", + "type": "library", + "description": "Symfony Security Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0", + "symfony/polyfill-php56": "~1.0", + "symfony/polyfill-php70": "~1.0", + "symfony/polyfill-util": "~1.0", + "symfony/property-access": "~2.8|~3.0" + }, + "replace": { + "symfony/security-core": "self.version", + "symfony/security-csrf": "self.version", + "symfony/security-guard": "self.version", + "symfony/security-http": "self.version" + }, + "require-dev": { + "symfony/finder": "~2.8|~3.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/routing": "~2.8|~3.0", + "symfony/validator": "^2.8.18|^3.2.5", + "symfony/expression-language": "~2.8|~3.0", + "symfony/ldap": "~3.1", + "psr/log": "~1.0" + }, + "suggest": { + "symfony/form": "", + "symfony/validator": "For using the user password constraint", + "symfony/routing": "For using the HttpUtils class to create sub-requests, redirect the user, and match URLs", + "symfony/expression-language": "For using the expression voter", + "symfony/ldap": "For using the LDAP user and authentication providers" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Security\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Security/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Security/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..6b56bf247124c3de6995bd41f120f2fc02e9b770 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Security/phpunit.xml.dist @@ -0,0 +1,33 @@ + + + + + + + + + + ./Tests/ + ./*/Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + ./*/Resources + ./*/Tests + ./*/vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Annotation/Groups.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Annotation/Groups.php new file mode 100644 index 0000000000000000000000000000000000000000..519837a55b73ea44992ce0371b1cc9fb18cc3c44 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Annotation/Groups.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Annotation; + +use Symfony\Component\Serializer\Exception\InvalidArgumentException; + +/** + * Annotation class for @Groups(). + * + * @Annotation + * @Target({"PROPERTY", "METHOD"}) + * + * @author Kévin Dunglas + */ +class Groups +{ + /** + * @var array + */ + private $groups; + + /** + * @param array $data + * + * @throws InvalidArgumentException + */ + public function __construct(array $data) + { + if (!isset($data['value']) || !$data['value']) { + throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" cannot be empty.', get_class($this))); + } + + if (!is_array($data['value'])) { + throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" must be an array of strings.', get_class($this))); + } + + foreach ($data['value'] as $group) { + if (!is_string($group)) { + throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" must be an array of strings.', get_class($this))); + } + } + + $this->groups = $data['value']; + } + + /** + * Gets groups. + * + * @return array + */ + public function getGroups() + { + return $this->groups; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Annotation/MaxDepth.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Annotation/MaxDepth.php new file mode 100644 index 0000000000000000000000000000000000000000..1f41948d6da25996e12821322fee63a0a11d95bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Annotation/MaxDepth.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Annotation; + +use Symfony\Component\Serializer\Exception\InvalidArgumentException; + +/** + * Annotation class for @MaxDepth(). + * + * @Annotation + * @Target({"PROPERTY", "METHOD"}) + * + * @author Kévin Dunglas + */ +class MaxDepth +{ + /** + * @var int + */ + private $maxDepth; + + public function __construct(array $data) + { + if (!isset($data['value'])) { + throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" should be set.', get_class($this))); + } + + if (!is_int($data['value']) || $data['value'] <= 0) { + throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" must be a positive integer.', get_class($this))); + } + + $this->maxDepth = $data['value']; + } + + public function getMaxDepth() + { + return $this->maxDepth; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Serializer/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..de24d9ed74b7e6637cc875e48034b04780d60cbb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/CHANGELOG.md @@ -0,0 +1,113 @@ +CHANGELOG +========= + +3.1.0 +----- + + * added support for serializing objects that implement `JsonSerializable` + * added the `DenormalizerAwareTrait` and `NormalizerAwareTrait` traits to + support normalizer/denormalizer awareness + * added the `DenormalizerAwareInterface` and `NormalizerAwareInterface` + interfaces to support normalizer/denormalizer awareness + * added a PSR-6 compatible adapter for caching metadata + * added a `MaxDepth` option to limit the depth of the object graph when + serializing objects + * added support for serializing `SplFileInfo` objects + * added support for serializing objects that implement `DateTimeInterface` + * added `AbstractObjectNormalizer` as a base class for normalizers that deal + with objects + * added support to relation deserialization + +2.7.0 +----- + + * added support for serialization and deserialization groups including + annotations, XML and YAML mapping. + * added `AbstractNormalizer` to factorise code and ease normalizers development + * added circular references handling for `PropertyNormalizer` + * added support for a context key called `object_to_populate` in `AbstractNormalizer` + to reuse existing objects in the deserialization process + * added `NameConverterInterface` and `CamelCaseToSnakeCaseNameConverter` + * [DEPRECATION] `GetSetMethodNormalizer::setCamelizedAttributes()` and + `PropertyNormalizer::setCamelizedAttributes()` are replaced by + `CamelCaseToSnakeCaseNameConverter` + * [DEPRECATION] the `Exception` interface has been renamed to `ExceptionInterface` + * added `ObjectNormalizer` leveraging the `PropertyAccess` component to normalize + objects containing both properties and getters / setters / issers / hassers methods. + +2.6.0 +----- + + * added a new serializer: `PropertyNormalizer`. Like `GetSetMethodNormalizer`, + this normalizer will map an object's properties to an array. + * added circular references handling for `GetSetMethodNormalizer` + +2.5.0 +----- + + * added support for `is.*` getters in `GetSetMethodNormalizer` + +2.4.0 +----- + + * added `$context` support for XMLEncoder. + * [DEPRECATION] JsonEncode and JsonDecode where modified to throw + an exception if error found. No need for get*Error() functions + +2.3.0 +----- + + * added `GetSetMethodNormalizer::setCamelizedAttributes` to allow calling + camel cased methods for underscored properties + +2.2.0 +----- + + * [BC BREAK] All Serializer, Normalizer and Encoder interfaces have been + modified to include an optional `$context` array parameter. + * The XML Root name can now be configured with the `xml_root_name` + parameter in the context option to the `XmlEncoder`. + * Options to `json_encode` and `json_decode` can be passed through + the context options of `JsonEncode` and `JsonDecode` encoder/decoders. + +2.1.0 +----- + + * added DecoderInterface::supportsDecoding(), + EncoderInterface::supportsEncoding() + * removed NormalizableInterface::denormalize(), + NormalizerInterface::denormalize(), + NormalizerInterface::supportsDenormalization() + * removed normalize() denormalize() encode() decode() supportsSerialization() + supportsDeserialization() supportsEncoding() supportsDecoding() + getEncoder() from SerializerInterface + * Serializer now implements NormalizerInterface, DenormalizerInterface, + EncoderInterface, DecoderInterface in addition to SerializerInterface + * added DenormalizableInterface and DenormalizerInterface + * [BC BREAK] changed `GetSetMethodNormalizer`'s key names from all lowercased + to camelCased (e.g. `mypropertyvalue` to `myPropertyValue`) + * [BC BREAK] convert the `item` XML tag to an array + + ``` xml + + + <![CDATA[title1]]><![CDATA[title2]]> + + ``` + + Before: + + Array() + + After: + + Array( + [item] => Array( + [0] => Array( + [title] => title1 + ) + [1] => Array( + [title] => title2 + ) + ) + ) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php new file mode 100644 index 0000000000000000000000000000000000000000..352ba584a7638f7178c3db77afec4746e3b349a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Encoder; + +use Symfony\Component\Serializer\Exception\RuntimeException; + +/** + * Decoder delegating the decoding to a chain of decoders. + * + * @author Jordi Boggiano + * @author Johannes M. Schmitt + * @author Lukas Kahwe Smith + */ +class ChainDecoder implements DecoderInterface +{ + protected $decoders = array(); + protected $decoderByFormat = array(); + + public function __construct(array $decoders = array()) + { + $this->decoders = $decoders; + } + + /** + * {@inheritdoc} + */ + final public function decode($data, $format, array $context = array()) + { + return $this->getDecoder($format)->decode($data, $format, $context); + } + + /** + * {@inheritdoc} + */ + public function supportsDecoding($format) + { + try { + $this->getDecoder($format); + } catch (RuntimeException $e) { + return false; + } + + return true; + } + + /** + * Gets the decoder supporting the format. + * + * @param string $format + * + * @return DecoderInterface + * + * @throws RuntimeException If no decoder is found. + */ + private function getDecoder($format) + { + if (isset($this->decoderByFormat[$format]) + && isset($this->decoders[$this->decoderByFormat[$format]]) + ) { + return $this->decoders[$this->decoderByFormat[$format]]; + } + + foreach ($this->decoders as $i => $decoder) { + if ($decoder->supportsDecoding($format)) { + $this->decoderByFormat[$format] = $i; + + return $decoder; + } + } + + throw new RuntimeException(sprintf('No decoder found for format "%s".', $format)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..5ee352ab27932546b89aaf54802576cbecda4fec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Encoder; + +use Symfony\Component\Serializer\Exception\RuntimeException; + +/** + * Encoder delegating the decoding to a chain of encoders. + * + * @author Jordi Boggiano + * @author Johannes M. Schmitt + * @author Lukas Kahwe Smith + */ +class ChainEncoder implements EncoderInterface +{ + protected $encoders = array(); + protected $encoderByFormat = array(); + + public function __construct(array $encoders = array()) + { + $this->encoders = $encoders; + } + + /** + * {@inheritdoc} + */ + final public function encode($data, $format, array $context = array()) + { + return $this->getEncoder($format)->encode($data, $format, $context); + } + + /** + * {@inheritdoc} + */ + public function supportsEncoding($format) + { + try { + $this->getEncoder($format); + } catch (RuntimeException $e) { + return false; + } + + return true; + } + + /** + * Checks whether the normalization is needed for the given format. + * + * @param string $format + * + * @return bool + */ + public function needsNormalization($format) + { + $encoder = $this->getEncoder($format); + + if (!$encoder instanceof NormalizationAwareInterface) { + return true; + } + + if ($encoder instanceof self) { + return $encoder->needsNormalization($format); + } + + return false; + } + + /** + * Gets the encoder supporting the format. + * + * @param string $format + * + * @return EncoderInterface + * + * @throws RuntimeException if no encoder is found + */ + private function getEncoder($format) + { + if (isset($this->encoderByFormat[$format]) + && isset($this->encoders[$this->encoderByFormat[$format]]) + ) { + return $this->encoders[$this->encoderByFormat[$format]]; + } + + foreach ($this->encoders as $i => $encoder) { + if ($encoder->supportsEncoding($format)) { + $this->encoderByFormat[$format] = $i; + + return $encoder; + } + } + + throw new RuntimeException(sprintf('No encoder found for format "%s".', $format)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..f30d08f941da7cf69850f69296116d9902207b1e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php @@ -0,0 +1,181 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Encoder; + +use Symfony\Component\Serializer\Exception\InvalidArgumentException; + +/** + * Encodes CSV data. + * + * @author Kévin Dunglas + */ +class CsvEncoder implements EncoderInterface, DecoderInterface +{ + const FORMAT = 'csv'; + + private $delimiter; + private $enclosure; + private $escapeChar; + private $keySeparator; + + /** + * @param string $delimiter + * @param string $enclosure + * @param string $escapeChar + * @param string $keySeparator + */ + public function __construct($delimiter = ',', $enclosure = '"', $escapeChar = '\\', $keySeparator = '.') + { + $this->delimiter = $delimiter; + $this->enclosure = $enclosure; + $this->escapeChar = $escapeChar; + $this->keySeparator = $keySeparator; + } + + /** + * {@inheritdoc} + */ + public function encode($data, $format, array $context = array()) + { + $handle = fopen('php://temp,', 'w+'); + + if (!is_array($data)) { + $data = array(array($data)); + } elseif (empty($data)) { + $data = array(array()); + } else { + // Sequential arrays of arrays are considered as collections + $i = 0; + foreach ($data as $key => $value) { + if ($i !== $key || !is_array($value)) { + $data = array($data); + break; + } + + ++$i; + } + } + + $headers = null; + foreach ($data as $value) { + $result = array(); + $this->flatten($value, $result); + + if (null === $headers) { + $headers = array_keys($result); + fputcsv($handle, $headers, $this->delimiter, $this->enclosure, $this->escapeChar); + } elseif (array_keys($result) !== $headers) { + throw new InvalidArgumentException('To use the CSV encoder, each line in the data array must have the same structure. You may want to use a custom normalizer class to normalize the data format before passing it to the CSV encoder.'); + } + + fputcsv($handle, $result, $this->delimiter, $this->enclosure, $this->escapeChar); + } + + rewind($handle); + $value = stream_get_contents($handle); + fclose($handle); + + return $value; + } + + /** + * {@inheritdoc} + */ + public function supportsEncoding($format) + { + return self::FORMAT === $format; + } + + /** + * {@inheritdoc} + */ + public function decode($data, $format, array $context = array()) + { + $handle = fopen('php://temp', 'r+'); + fwrite($handle, $data); + rewind($handle); + + $headers = null; + $nbHeaders = 0; + $result = array(); + + while (false !== ($cols = fgetcsv($handle, 0, $this->delimiter, $this->enclosure, $this->escapeChar))) { + $nbCols = count($cols); + + if (null === $headers) { + $nbHeaders = $nbCols; + + foreach ($cols as $col) { + $headers[] = explode($this->keySeparator, $col); + } + + continue; + } + + $item = array(); + for ($i = 0; ($i < $nbCols) && ($i < $nbHeaders); ++$i) { + $depth = count($headers[$i]); + $arr = &$item; + for ($j = 0; $j < $depth; ++$j) { + // Handle nested arrays + if ($j === ($depth - 1)) { + $arr[$headers[$i][$j]] = $cols[$i]; + + continue; + } + + if (!isset($arr[$headers[$i][$j]])) { + $arr[$headers[$i][$j]] = array(); + } + + $arr = &$arr[$headers[$i][$j]]; + } + } + + $result[] = $item; + } + fclose($handle); + + if (empty($result) || isset($result[1])) { + return $result; + } + + // If there is only one data line in the document, return it (the line), the result is not considered as a collection + return $result[0]; + } + + /** + * {@inheritdoc} + */ + public function supportsDecoding($format) + { + return self::FORMAT === $format; + } + + /** + * Flattens an array and generates keys including the path. + * + * @param array $array + * @param array $result + * @param string $parentKey + */ + private function flatten(array $array, array &$result, $parentKey = '') + { + foreach ($array as $key => $value) { + if (is_array($value)) { + $this->flatten($value, $result, $parentKey.$key.$this->keySeparator); + } else { + $result[$parentKey.$key] = $value; + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..dd89e0faacd939b178d1c033897efe17b35348b3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Encoder; + +use Symfony\Component\Serializer\Exception\UnexpectedValueException; + +/** + * Defines the interface of decoders. + * + * @author Jordi Boggiano + */ +interface DecoderInterface +{ + /** + * Decodes a string into PHP data. + * + * @param string $data Data to decode + * @param string $format Format name + * @param array $context options that decoders have access to + * + * The format parameter specifies which format the data is in; valid values + * depend on the specific implementation. Authors implementing this interface + * are encouraged to document which formats they support in a non-inherited + * phpdoc comment. + * + * @return mixed + * + * @throws UnexpectedValueException + */ + public function decode($data, $format, array $context = array()); + + /** + * Checks whether the deserializer can decode from given format. + * + * @param string $format format name + * + * @return bool + */ + public function supportsDecoding($format); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..05e9b2789b170103dabbabead7803263621ca1fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Encoder; + +use Symfony\Component\Serializer\Exception\UnexpectedValueException; + +/** + * Defines the interface of encoders. + * + * @author Jordi Boggiano + */ +interface EncoderInterface +{ + /** + * Encodes data into the given format. + * + * @param mixed $data Data to encode + * @param string $format Format name + * @param array $context options that normalizers/encoders have access to + * + * @return scalar + * + * @throws UnexpectedValueException + */ + public function encode($data, $format, array $context = array()); + + /** + * Checks whether the serializer can encode to given format. + * + * @param string $format format name + * + * @return bool + */ + public function supportsEncoding($format); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonDecode.php new file mode 100644 index 0000000000000000000000000000000000000000..e9ca7ce570e5987b18e625b1cee49f01868149c0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonDecode.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\Component\Serializer\Encoder; + +use Symfony\Component\Serializer\Exception\UnexpectedValueException; + +/** + * Decodes JSON data. + * + * @author Sander Coolen + */ +class JsonDecode implements DecoderInterface +{ + /** + * Specifies if the returned result should be an associative array or a nested stdClass object hierarchy. + * + * @var bool + */ + private $associative; + + /** + * Specifies the recursion depth. + * + * @var int + */ + private $recursionDepth; + + private $lastError = JSON_ERROR_NONE; + + protected $serializer; + + /** + * Constructs a new JsonDecode instance. + * + * @param bool $associative True to return the result associative array, false for a nested stdClass hierarchy + * @param int $depth Specifies the recursion depth + */ + public function __construct($associative = false, $depth = 512) + { + $this->associative = $associative; + $this->recursionDepth = (int) $depth; + } + + /** + * Decodes data. + * + * @param string $data The encoded JSON string to decode + * @param string $format Must be set to JsonEncoder::FORMAT + * @param array $context An optional set of options for the JSON decoder; see below + * + * The $context array is a simple key=>value array, with the following supported keys: + * + * json_decode_associative: boolean + * If true, returns the object as associative array. + * If false, returns the object as nested stdClass + * If not specified, this method will use the default set in JsonDecode::__construct + * + * json_decode_recursion_depth: integer + * Specifies the maximum recursion depth + * If not specified, this method will use the default set in JsonDecode::__construct + * + * json_decode_options: integer + * Specifies additional options as per documentation for json_decode. Only supported with PHP 5.4.0 and higher + * + * @return mixed + * + * @throws UnexpectedValueException + * + * @see http://php.net/json_decode json_decode + */ + public function decode($data, $format, array $context = array()) + { + $context = $this->resolveContext($context); + + $associative = $context['json_decode_associative']; + $recursionDepth = $context['json_decode_recursion_depth']; + $options = $context['json_decode_options']; + + $decodedData = json_decode($data, $associative, $recursionDepth, $options); + + if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) { + throw new UnexpectedValueException(json_last_error_msg()); + } + + return $decodedData; + } + + /** + * {@inheritdoc} + */ + public function supportsDecoding($format) + { + return JsonEncoder::FORMAT === $format; + } + + /** + * Merges the default options of the Json Decoder with the passed context. + * + * @param array $context + * + * @return array + */ + private function resolveContext(array $context) + { + $defaultOptions = array( + 'json_decode_associative' => $this->associative, + 'json_decode_recursion_depth' => $this->recursionDepth, + 'json_decode_options' => 0, + ); + + return array_merge($defaultOptions, $context); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncode.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncode.php new file mode 100644 index 0000000000000000000000000000000000000000..14cd2c949a9913ed2a2fa5f3ef12c7660692e029 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Encoder; + +use Symfony\Component\Serializer\Exception\UnexpectedValueException; + +/** + * Encodes JSON data. + * + * @author Sander Coolen + */ +class JsonEncode implements EncoderInterface +{ + private $options; + private $lastError = JSON_ERROR_NONE; + + public function __construct($bitmask = 0) + { + $this->options = $bitmask; + } + + /** + * Encodes PHP data to a JSON string. + * + * {@inheritdoc} + */ + public function encode($data, $format, array $context = array()) + { + $context = $this->resolveContext($context); + + $encodedJson = json_encode($data, $context['json_encode_options']); + + if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) { + throw new UnexpectedValueException(json_last_error_msg()); + } + + return $encodedJson; + } + + /** + * {@inheritdoc} + */ + public function supportsEncoding($format) + { + return JsonEncoder::FORMAT === $format; + } + + /** + * Merge default json encode options with context. + * + * @param array $context + * + * @return array + */ + private function resolveContext(array $context = array()) + { + return array_merge(array('json_encode_options' => $this->options), $context); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..44a086d60212f611dc82755b12beacc72373cdfb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Encoder; + +/** + * Encodes JSON data. + * + * @author Jordi Boggiano + */ +class JsonEncoder implements EncoderInterface, DecoderInterface +{ + const FORMAT = 'json'; + + /** + * @var JsonEncode + */ + protected $encodingImpl; + + /** + * @var JsonDecode + */ + protected $decodingImpl; + + public function __construct(JsonEncode $encodingImpl = null, JsonDecode $decodingImpl = null) + { + $this->encodingImpl = $encodingImpl ?: new JsonEncode(); + $this->decodingImpl = $decodingImpl ?: new JsonDecode(true); + } + + /** + * {@inheritdoc} + */ + public function encode($data, $format, array $context = array()) + { + return $this->encodingImpl->encode($data, self::FORMAT, $context); + } + + /** + * {@inheritdoc} + */ + public function decode($data, $format, array $context = array()) + { + return $this->decodingImpl->decode($data, self::FORMAT, $context); + } + + /** + * {@inheritdoc} + */ + public function supportsEncoding($format) + { + return self::FORMAT === $format; + } + + /** + * {@inheritdoc} + */ + public function supportsDecoding($format) + { + return self::FORMAT === $format; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/NormalizationAwareInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/NormalizationAwareInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c066bd7cdd1bb73d28467cd5d53a6f764a0afeaf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/NormalizationAwareInterface.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Encoder; + +/** + * Defines the interface of encoders that will normalize data themselves. + * + * Implementing this interface essentially just tells the Serializer that the + * data should not be pre-normalized before being passed to this Encoder. + * + * @author Jordi Boggiano + */ +interface NormalizationAwareInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/SerializerAwareEncoder.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/SerializerAwareEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..873af922ef204da17b5bc556502695539feda255 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/SerializerAwareEncoder.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\Serializer\Encoder; + +use Symfony\Component\Serializer\SerializerAwareInterface; +use Symfony\Component\Serializer\SerializerAwareTrait; + +/** + * SerializerAware Encoder implementation. + * + * @author Jordi Boggiano + * + * @deprecated since version 3.2, to be removed in 4.0. Use the SerializerAwareTrait instead. + */ +abstract class SerializerAwareEncoder implements SerializerAwareInterface +{ + use SerializerAwareTrait; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..8145b32c525068a1d1e58701b44c3b9f6da80387 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -0,0 +1,544 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Encoder; + +use Symfony\Component\Serializer\Exception\UnexpectedValueException; + +/** + * Encodes XML data. + * + * @author Jordi Boggiano + * @author John Wards + * @author Fabian Vogler + * @author Kévin Dunglas + */ +class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, DecoderInterface, NormalizationAwareInterface +{ + /** + * @var \DOMDocument + */ + private $dom; + private $format; + private $context; + private $rootNodeName = 'response'; + private $loadOptions; + + /** + * Construct new XmlEncoder and allow to change the root node element name. + * + * @param string $rootNodeName + * @param int|null $loadOptions A bit field of LIBXML_* constants + */ + public function __construct($rootNodeName = 'response', $loadOptions = null) + { + $this->rootNodeName = $rootNodeName; + $this->loadOptions = null !== $loadOptions ? $loadOptions : LIBXML_NONET | LIBXML_NOBLANKS; + } + + /** + * {@inheritdoc} + */ + public function encode($data, $format, array $context = array()) + { + if ($data instanceof \DOMDocument) { + return $data->saveXML(); + } + + $xmlRootNodeName = $this->resolveXmlRootName($context); + + $this->dom = $this->createDomDocument($context); + $this->format = $format; + $this->context = $context; + + if (null !== $data && !is_scalar($data)) { + $root = $this->dom->createElement($xmlRootNodeName); + $this->dom->appendChild($root); + $this->buildXml($root, $data, $xmlRootNodeName); + } else { + $this->appendNode($this->dom, $data, $xmlRootNodeName); + } + + return $this->dom->saveXML(); + } + + /** + * {@inheritdoc} + */ + public function decode($data, $format, array $context = array()) + { + if ('' === trim($data)) { + throw new UnexpectedValueException('Invalid XML data, it can not be empty.'); + } + + $internalErrors = libxml_use_internal_errors(true); + $disableEntities = libxml_disable_entity_loader(true); + libxml_clear_errors(); + + $dom = new \DOMDocument(); + $dom->loadXML($data, $this->loadOptions); + + libxml_use_internal_errors($internalErrors); + libxml_disable_entity_loader($disableEntities); + + if ($error = libxml_get_last_error()) { + libxml_clear_errors(); + + throw new UnexpectedValueException($error->message); + } + + foreach ($dom->childNodes as $child) { + if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) { + throw new UnexpectedValueException('Document types are not allowed.'); + } + } + + $rootNode = $dom->firstChild; + + // todo: throw an exception if the root node name is not correctly configured (bc) + + if ($rootNode->hasChildNodes()) { + $xpath = new \DOMXPath($dom); + $data = array(); + foreach ($xpath->query('namespace::*', $dom->documentElement) as $nsNode) { + $data['@'.$nsNode->nodeName] = $nsNode->nodeValue; + } + + unset($data['@xmlns:xml']); + + if (empty($data)) { + return $this->parseXml($rootNode); + } + + return array_merge($data, (array) $this->parseXml($rootNode)); + } + + if (!$rootNode->hasAttributes()) { + return $rootNode->nodeValue; + } + + $data = array(); + + foreach ($rootNode->attributes as $attrKey => $attr) { + $data['@'.$attrKey] = $attr->nodeValue; + } + + $data['#'] = $rootNode->nodeValue; + + return $data; + } + + /** + * {@inheritdoc} + */ + public function supportsEncoding($format) + { + return 'xml' === $format; + } + + /** + * {@inheritdoc} + */ + public function supportsDecoding($format) + { + return 'xml' === $format; + } + + /** + * Sets the root node name. + * + * @param string $name root node name + */ + public function setRootNodeName($name) + { + $this->rootNodeName = $name; + } + + /** + * Returns the root node name. + * + * @return string + */ + public function getRootNodeName() + { + return $this->rootNodeName; + } + + /** + * @param \DOMNode $node + * @param string $val + * + * @return bool + */ + final protected function appendXMLString(\DOMNode $node, $val) + { + if (strlen($val) > 0) { + $frag = $this->dom->createDocumentFragment(); + $frag->appendXML($val); + $node->appendChild($frag); + + return true; + } + + return false; + } + + /** + * @param \DOMNode $node + * @param string $val + * + * @return bool + */ + final protected function appendText(\DOMNode $node, $val) + { + $nodeText = $this->dom->createTextNode($val); + $node->appendChild($nodeText); + + return true; + } + + /** + * @param \DOMNode $node + * @param string $val + * + * @return bool + */ + final protected function appendCData(\DOMNode $node, $val) + { + $nodeText = $this->dom->createCDATASection($val); + $node->appendChild($nodeText); + + return true; + } + + /** + * @param \DOMNode $node + * @param \DOMDocumentFragment $fragment + * + * @return bool + */ + final protected function appendDocumentFragment(\DOMNode $node, $fragment) + { + if ($fragment instanceof \DOMDocumentFragment) { + $node->appendChild($fragment); + + return true; + } + + return false; + } + + /** + * Checks the name is a valid xml element name. + * + * @param string $name + * + * @return bool + */ + final protected function isElementNameValid($name) + { + return $name && + false === strpos($name, ' ') && + preg_match('#^[\pL_][\pL0-9._:-]*$#ui', $name); + } + + /** + * Parse the input DOMNode into an array or a string. + * + * @param \DOMNode $node xml to parse + * + * @return array|string + */ + private function parseXml(\DOMNode $node) + { + $data = $this->parseXmlAttributes($node); + + $value = $this->parseXmlValue($node); + + if (!count($data)) { + return $value; + } + + if (!is_array($value)) { + $data['#'] = $value; + + return $data; + } + + if (1 === count($value) && key($value)) { + $data[key($value)] = current($value); + + return $data; + } + + foreach ($value as $key => $val) { + $data[$key] = $val; + } + + return $data; + } + + /** + * Parse the input DOMNode attributes into an array. + * + * @param \DOMNode $node xml to parse + * + * @return array + */ + private function parseXmlAttributes(\DOMNode $node) + { + if (!$node->hasAttributes()) { + return array(); + } + + $data = array(); + + foreach ($node->attributes as $attr) { + if (ctype_digit($attr->nodeValue)) { + $data['@'.$attr->nodeName] = (int) $attr->nodeValue; + } else { + $data['@'.$attr->nodeName] = $attr->nodeValue; + } + } + + return $data; + } + + /** + * Parse the input DOMNode value (content and children) into an array or a string. + * + * @param \DOMNode $node xml to parse + * + * @return array|string + */ + private function parseXmlValue(\DOMNode $node) + { + if (!$node->hasChildNodes()) { + return $node->nodeValue; + } + + if (1 === $node->childNodes->length && in_array($node->firstChild->nodeType, array(XML_TEXT_NODE, XML_CDATA_SECTION_NODE))) { + return $node->firstChild->nodeValue; + } + + $value = array(); + + foreach ($node->childNodes as $subnode) { + $val = $this->parseXml($subnode); + + if ('item' === $subnode->nodeName && isset($val['@key'])) { + if (isset($val['#'])) { + $value[$val['@key']] = $val['#']; + } else { + $value[$val['@key']] = $val; + } + } else { + $value[$subnode->nodeName][] = $val; + } + } + + foreach ($value as $key => $val) { + if (is_array($val) && 1 === count($val)) { + $value[$key] = current($val); + } + } + + return $value; + } + + /** + * Parse the data and convert it to DOMElements. + * + * @param \DOMNode $parentNode + * @param array|object $data + * @param string|null $xmlRootNodeName + * + * @return bool + * + * @throws UnexpectedValueException + */ + private function buildXml(\DOMNode $parentNode, $data, $xmlRootNodeName = null) + { + $append = true; + + if (is_array($data) || ($data instanceof \Traversable && !$this->serializer->supportsNormalization($data, $this->format))) { + foreach ($data as $key => $data) { + //Ah this is the magic @ attribute types. + if (0 === strpos($key, '@') && $this->isElementNameValid($attributeName = substr($key, 1))) { + if (!is_scalar($data)) { + $data = $this->serializer->normalize($data, $this->format, $this->context); + } + $parentNode->setAttribute($attributeName, $data); + } elseif ($key === '#') { + $append = $this->selectNodeType($parentNode, $data); + } elseif (is_array($data) && false === is_numeric($key)) { + // Is this array fully numeric keys? + if (ctype_digit(implode('', array_keys($data)))) { + /* + * Create nodes to append to $parentNode based on the $key of this array + * Produces 01 + * From array("item" => array(0,1));. + */ + foreach ($data as $subData) { + $append = $this->appendNode($parentNode, $subData, $key); + } + } else { + $append = $this->appendNode($parentNode, $data, $key); + } + } elseif (is_numeric($key) || !$this->isElementNameValid($key)) { + $append = $this->appendNode($parentNode, $data, 'item', $key); + } else { + $append = $this->appendNode($parentNode, $data, $key); + } + } + + return $append; + } + + if (is_object($data)) { + $data = $this->serializer->normalize($data, $this->format, $this->context); + if (null !== $data && !is_scalar($data)) { + return $this->buildXml($parentNode, $data, $xmlRootNodeName); + } + + // top level data object was normalized into a scalar + if (!$parentNode->parentNode->parentNode) { + $root = $parentNode->parentNode; + $root->removeChild($parentNode); + + return $this->appendNode($root, $data, $xmlRootNodeName); + } + + return $this->appendNode($parentNode, $data, 'data'); + } + + throw new UnexpectedValueException(sprintf('An unexpected value could not be serialized: %s', var_export($data, true))); + } + + /** + * Selects the type of node to create and appends it to the parent. + * + * @param \DOMNode $parentNode + * @param array|object $data + * @param string $nodeName + * @param string $key + * + * @return bool + */ + private function appendNode(\DOMNode $parentNode, $data, $nodeName, $key = null) + { + $node = $this->dom->createElement($nodeName); + if (null !== $key) { + $node->setAttribute('key', $key); + } + $appendNode = $this->selectNodeType($node, $data); + // we may have decided not to append this node, either in error or if its $nodeName is not valid + if ($appendNode) { + $parentNode->appendChild($node); + } + + return $appendNode; + } + + /** + * Checks if a value contains any characters which would require CDATA wrapping. + * + * @param string $val + * + * @return bool + */ + private function needsCdataWrapping($val) + { + return preg_match('/[<>&]/', $val); + } + + /** + * Tests the value being passed and decide what sort of element to create. + * + * @param \DOMNode $node + * @param mixed $val + * + * @return bool + * + * @throws UnexpectedValueException + */ + private function selectNodeType(\DOMNode $node, $val) + { + if (is_array($val)) { + return $this->buildXml($node, $val); + } elseif ($val instanceof \SimpleXMLElement) { + $child = $this->dom->importNode(dom_import_simplexml($val), true); + $node->appendChild($child); + } elseif ($val instanceof \Traversable) { + $this->buildXml($node, $val); + } elseif (is_object($val)) { + return $this->selectNodeType($node, $this->serializer->normalize($val, $this->format, $this->context)); + } elseif (is_numeric($val)) { + return $this->appendText($node, (string) $val); + } elseif (is_string($val) && $this->needsCdataWrapping($val)) { + return $this->appendCData($node, $val); + } elseif (is_string($val)) { + return $this->appendText($node, $val); + } elseif (is_bool($val)) { + return $this->appendText($node, (int) $val); + } elseif ($val instanceof \DOMNode) { + $child = $this->dom->importNode($val, true); + $node->appendChild($child); + } + + return true; + } + + /** + * Get real XML root node name, taking serializer options into account. + * + * @param array $context + * + * @return string + */ + private function resolveXmlRootName(array $context = array()) + { + return isset($context['xml_root_node_name']) + ? $context['xml_root_node_name'] + : $this->rootNodeName; + } + + /** + * Create a DOM document, taking serializer options into account. + * + * @param array $context options that the encoder has access to + * + * @return \DOMDocument + */ + private function createDomDocument(array $context) + { + $document = new \DOMDocument(); + + // Set an attribute on the DOM document specifying, as part of the XML declaration, + $xmlOptions = array( + // nicely formats output with indentation and extra space + 'xml_format_output' => 'formatOutput', + // the version number of the document + 'xml_version' => 'xmlVersion', + // the encoding of the document + 'xml_encoding' => 'encoding', + // whether the document is standalone + 'xml_standalone' => 'xmlStandalone', + ); + foreach ($xmlOptions as $xmlOption => $documentProperty) { + if (isset($context[$xmlOption])) { + $document->$documentProperty = $context[$xmlOption]; + } + } + + return $document; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php new file mode 100644 index 0000000000000000000000000000000000000000..41ac04f2091057ed19bb5250ded52e96155b1717 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Encoder; + +use Symfony\Component\Yaml\Dumper; +use Symfony\Component\Yaml\Parser; + +/** + * Encodes YAML data. + * + * @author Kévin Dunglas + */ +class YamlEncoder implements EncoderInterface, DecoderInterface +{ + const FORMAT = 'yaml'; + + private $dumper; + private $parser; + private $defaultContext = array('yaml_inline' => 0, 'yaml_indent' => 0, 'yaml_flags' => 0); + + public function __construct(Dumper $dumper = null, Parser $parser = null, array $defaultContext = array()) + { + $this->dumper = $dumper ?: new Dumper(); + $this->parser = $parser ?: new Parser(); + $this->defaultContext = array_merge($this->defaultContext, $defaultContext); + } + + /** + * {@inheritdoc} + */ + public function encode($data, $format, array $context = array()) + { + $context = array_merge($this->defaultContext, $context); + + return $this->dumper->dump($data, $context['yaml_inline'], $context['yaml_indent'], $context['yaml_flags']); + } + + /** + * {@inheritdoc} + */ + public function supportsEncoding($format) + { + return self::FORMAT === $format; + } + + /** + * {@inheritdoc} + */ + public function decode($data, $format, array $context = array()) + { + $context = array_merge($this->defaultContext, $context); + + return $this->parser->parse($data, $context['yaml_flags']); + } + + /** + * {@inheritdoc} + */ + public function supportsDecoding($format) + { + return self::FORMAT === $format; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/BadMethodCallException.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/BadMethodCallException.php new file mode 100644 index 0000000000000000000000000000000000000000..b2f3d61a8c96343086662babb701ffbab1ad64bd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/BadMethodCallException.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\Serializer\Exception; + +class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/CircularReferenceException.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/CircularReferenceException.php new file mode 100644 index 0000000000000000000000000000000000000000..dc84183fc7d95f67f09706d51819bbd832441090 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/CircularReferenceException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Exception; + +/** + * CircularReferenceException. + * + * @author Kévin Dunglas + */ +class CircularReferenceException extends RuntimeException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..99ed63246c5d3b8b79fb3aea747a3e87cd60b090 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Exception; + +/** + * Base exception interface. + * + * @author Johannes M. Schmitt + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..f4e645c4487ff34dc1e22d943a3e2d978f706bbd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Exception; + +/** + * InvalidArgumentException. + * + * @author Johannes M. Schmitt + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/LogicException.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/LogicException.php new file mode 100644 index 0000000000000000000000000000000000000000..08c53e0ff7a45749514567a743d9a84cf5575c31 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/LogicException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Exception; + +/** + * LogicException. + * + * @author Lukas Kahwe Smith + */ +class LogicException extends \LogicException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/MappingException.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/MappingException.php new file mode 100644 index 0000000000000000000000000000000000000000..4df4eec3903ac9be8d4dbf398e15f371567fdcf8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/MappingException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Exception; + +/** + * MappingException. + * + * @author Kévin Dunglas + */ +class MappingException extends RuntimeException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/RuntimeException.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/RuntimeException.php new file mode 100644 index 0000000000000000000000000000000000000000..a287d97ad4779e58498db697bcc2d5cef8ff539b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/RuntimeException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Exception; + +/** + * RuntimeException. + * + * @author Johannes M. Schmitt + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/UnexpectedValueException.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/UnexpectedValueException.php new file mode 100644 index 0000000000000000000000000000000000000000..2a63c5bd3f25f249ee52f9729654277d84497a87 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/UnexpectedValueException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Exception; + +/** + * UnexpectedValueException. + * + * @author Lukas Kahwe Smith + */ +class UnexpectedValueException extends \UnexpectedValueException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/UnsupportedException.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/UnsupportedException.php new file mode 100644 index 0000000000000000000000000000000000000000..7dc44ee0e7df7e56f70595ce06eaddae18380589 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Exception/UnsupportedException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Exception; + +/** + * UnsupportedException. + * + * @author Johannes M. Schmitt + */ +class UnsupportedException extends InvalidArgumentException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Serializer/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..b9daf5d25b82996f3ba3d129da73e4c083fee515 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping; + +/** + * {@inheritdoc} + * + * @author Kévin Dunglas + */ +class AttributeMetadata implements AttributeMetadataInterface +{ + /** + * @var string + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getName()} instead. + */ + public $name; + + /** + * @var array + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getGroups()} instead. + */ + public $groups = array(); + + /** + * @var int|null + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getMaxDepth()} instead. + */ + public $maxDepth; + + /** + * Constructs a metadata for the given attribute. + * + * @param string $name + */ + public function __construct($name) + { + $this->name = $name; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->name; + } + + /** + * {@inheritdoc} + */ + public function addGroup($group) + { + if (!in_array($group, $this->groups)) { + $this->groups[] = $group; + } + } + + /** + * {@inheritdoc} + */ + public function getGroups() + { + return $this->groups; + } + + /** + * {@inheritdoc} + */ + public function setMaxDepth($maxDepth) + { + $this->maxDepth = $maxDepth; + } + + /** + * {@inheritdoc} + */ + public function getMaxDepth() + { + return $this->maxDepth; + } + + /** + * {@inheritdoc} + */ + public function merge(AttributeMetadataInterface $attributeMetadata) + { + foreach ($attributeMetadata->getGroups() as $group) { + $this->addGroup($group); + } + + // Overwrite only if not defined + if (null === $this->maxDepth) { + $this->maxDepth = $attributeMetadata->getMaxDepth(); + } + } + + /** + * Returns the names of the properties that should be serialized. + * + * @return string[] + */ + public function __sleep() + { + return array('name', 'groups', 'maxDepth'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..abba8c1969799e9fe768d500b1261550971ddcd4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping; + +/** + * Stores metadata needed for serializing and deserializing attributes. + * + * Primarily, the metadata stores serialization groups. + * + * @internal + * + * @author Kévin Dunglas + */ +interface AttributeMetadataInterface +{ + /** + * Gets the attribute name. + * + * @return string + */ + public function getName(); + + /** + * Adds this attribute to the given group. + * + * @param string $group + */ + public function addGroup($group); + + /** + * Gets groups of this attribute. + * + * @return string[] + */ + public function getGroups(); + + /** + * Sets the serialization max depth for this attribute. + * + * @param int|null $maxDepth + */ + public function setMaxDepth($maxDepth); + + /** + * Gets the serialization max depth for this attribute. + * + * @return int|null + */ + public function getMaxDepth(); + + /** + * Merges an {@see AttributeMetadataInterface} with in the current one. + * + * @param AttributeMetadataInterface $attributeMetadata + */ + public function merge(AttributeMetadataInterface $attributeMetadata); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..55ddf52a64bb524d64edaeb59ce5f64f915cd298 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/ClassMetadata.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping; + +/** + * {@inheritdoc} + * + * @author Kévin Dunglas + */ +class ClassMetadata implements ClassMetadataInterface +{ + /** + * @var string + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getName()} instead. + */ + public $name; + + /** + * @var AttributeMetadataInterface[] + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getAttributesMetadata()} instead. + */ + public $attributesMetadata = array(); + + /** + * @var \ReflectionClass + */ + private $reflClass; + + /** + * Constructs a metadata for the given class. + * + * @param string $class + */ + public function __construct($class) + { + $this->name = $class; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->name; + } + + /** + * {@inheritdoc} + */ + public function addAttributeMetadata(AttributeMetadataInterface $attributeMetadata) + { + $this->attributesMetadata[$attributeMetadata->getName()] = $attributeMetadata; + } + + /** + * {@inheritdoc} + */ + public function getAttributesMetadata() + { + return $this->attributesMetadata; + } + + /** + * {@inheritdoc} + */ + public function merge(ClassMetadataInterface $classMetadata) + { + foreach ($classMetadata->getAttributesMetadata() as $attributeMetadata) { + if (isset($this->attributesMetadata[$attributeMetadata->getName()])) { + $this->attributesMetadata[$attributeMetadata->getName()]->merge($attributeMetadata); + } else { + $this->addAttributeMetadata($attributeMetadata); + } + } + } + + /** + * {@inheritdoc} + */ + public function getReflectionClass() + { + if (!$this->reflClass) { + $this->reflClass = new \ReflectionClass($this->getName()); + } + + return $this->reflClass; + } + + /** + * Returns the names of the properties that should be serialized. + * + * @return string[] + */ + public function __sleep() + { + return array( + 'name', + 'attributesMetadata', + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c00981b64f069676090a57d090f16be7bf71e1d7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping; + +/** + * Stores metadata needed for serializing and deserializing objects of specific class. + * + * Primarily, the metadata stores the set of attributes to serialize or deserialize. + * + * There may only exist one metadata for each attribute according to its name. + * + * @internal + * + * @author Kévin Dunglas + */ +interface ClassMetadataInterface +{ + /** + * Returns the name of the backing PHP class. + * + * @return string The name of the backing class + */ + public function getName(); + + /** + * Adds an {@link AttributeMetadataInterface}. + * + * @param AttributeMetadataInterface $attributeMetadata + */ + public function addAttributeMetadata(AttributeMetadataInterface $attributeMetadata); + + /** + * Gets the list of {@link AttributeMetadataInterface}. + * + * @return AttributeMetadataInterface[] + */ + public function getAttributesMetadata(); + + /** + * Merges a {@link ClassMetadataInterface} in the current one. + * + * @param ClassMetadataInterface $classMetadata + */ + public function merge(ClassMetadataInterface $classMetadata); + + /** + * Returns a {@link \ReflectionClass} instance for this class. + * + * @return \ReflectionClass + */ + public function getReflectionClass(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Factory/CacheClassMetadataFactory.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Factory/CacheClassMetadataFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..0b904c14400d019774ccc20988c1202bdbf6a6f5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Factory/CacheClassMetadataFactory.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping\Factory; + +use Psr\Cache\CacheItemPoolInterface; + +/** + * Caches metadata using a PSR-6 implementation. + * + * @author Kévin Dunglas + */ +class CacheClassMetadataFactory implements ClassMetadataFactoryInterface +{ + use ClassResolverTrait; + + /** + * @var ClassMetadataFactoryInterface + */ + private $decorated; + + /** + * @var CacheItemPoolInterface + */ + private $cacheItemPool; + + public function __construct(ClassMetadataFactoryInterface $decorated, CacheItemPoolInterface $cacheItemPool) + { + $this->decorated = $decorated; + $this->cacheItemPool = $cacheItemPool; + } + + /** + * {@inheritdoc} + */ + public function getMetadataFor($value) + { + $class = $this->getClass($value); + // Key cannot contain backslashes according to PSR-6 + $key = strtr($class, '\\', '_'); + + $item = $this->cacheItemPool->getItem($key); + if ($item->isHit()) { + return $item->get(); + } + + $metadata = $this->decorated->getMetadataFor($value); + $this->cacheItemPool->save($item->set($metadata)); + + return $metadata; + } + + /** + * {@inheritdoc} + */ + public function hasMetadataFor($value) + { + return $this->decorated->hasMetadataFor($value); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..6604430d190b88852ad0f0f39e28370ed732c55e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php @@ -0,0 +1,109 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping\Factory; + +use Doctrine\Common\Cache\Cache; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; +use Symfony\Component\Serializer\Mapping\ClassMetadata; +use Symfony\Component\Serializer\Mapping\Loader\LoaderInterface; + +/** + * Returns a {@link ClassMetadata}. + * + * @author Kévin Dunglas + */ +class ClassMetadataFactory implements ClassMetadataFactoryInterface +{ + use ClassResolverTrait; + + /** + * @var LoaderInterface + */ + private $loader; + + /** + * @var Cache + */ + private $cache; + + /** + * @var array + */ + private $loadedClasses; + + /** + * @param LoaderInterface $loader + * @param Cache|null $cache + */ + public function __construct(LoaderInterface $loader, Cache $cache = null) + { + $this->loader = $loader; + $this->cache = $cache; + + if (null !== $cache) { + @trigger_error(sprintf('Passing a Doctrine Cache instance as 2nd parameter of the "%s" constructor is deprecated since version 3.1. This parameter will be removed in Symfony 4.0. Use the "%s" class instead.', __CLASS__, CacheClassMetadataFactory::class), E_USER_DEPRECATED); + } + } + + /** + * {@inheritdoc} + */ + public function getMetadataFor($value) + { + $class = $this->getClass($value); + + if (isset($this->loadedClasses[$class])) { + return $this->loadedClasses[$class]; + } + + if ($this->cache && ($this->loadedClasses[$class] = $this->cache->fetch($class))) { + return $this->loadedClasses[$class]; + } + + $classMetadata = new ClassMetadata($class); + $this->loader->loadClassMetadata($classMetadata); + + $reflectionClass = $classMetadata->getReflectionClass(); + + // Include metadata from the parent class + if ($parent = $reflectionClass->getParentClass()) { + $classMetadata->merge($this->getMetadataFor($parent->name)); + } + + // Include metadata from all implemented interfaces + foreach ($reflectionClass->getInterfaces() as $interface) { + $classMetadata->merge($this->getMetadataFor($interface->name)); + } + + if ($this->cache) { + $this->cache->save($class, $classMetadata); + } + + return $this->loadedClasses[$class] = $classMetadata; + } + + /** + * {@inheritdoc} + */ + public function hasMetadataFor($value) + { + try { + $this->getClass($value); + + return true; + } catch (InvalidArgumentException $invalidArgumentException) { + // Return false in case of exception + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactoryInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactoryInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..7ef91a82318c6c84f3192eece22404f776d471ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactoryInterface.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\Component\Serializer\Mapping\Factory; + +use Symfony\Component\Serializer\Exception\InvalidArgumentException; +use Symfony\Component\Serializer\Mapping\ClassMetadataInterface; + +/** + * Returns a {@see ClassMetadataInterface}. + * + * @author Kévin Dunglas + */ +interface ClassMetadataFactoryInterface +{ + /** + * If the method was called with the same class name (or an object of that + * class) before, the same metadata instance is returned. + * + * If the factory was configured with a cache, this method will first look + * for an existing metadata instance in the cache. If an existing instance + * is found, it will be returned without further ado. + * + * Otherwise, a new metadata instance is created. If the factory was + * configured with a loader, the metadata is passed to the + * {@link \Symfony\Component\Serializer\Mapping\Loader\LoaderInterface::loadClassMetadata()} method for further + * configuration. At last, the new object is returned. + * + * @param string|object $value + * + * @return ClassMetadataInterface + * + * @throws InvalidArgumentException + */ + public function getMetadataFor($value); + + /** + * Checks if class has metadata. + * + * @param mixed $value + * + * @return bool + */ + public function hasMetadataFor($value); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Factory/ClassResolverTrait.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Factory/ClassResolverTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..e93277a6be7652fd295c37126f49af7297262bb8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Factory/ClassResolverTrait.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping\Factory; + +use Symfony\Component\Serializer\Exception\InvalidArgumentException; + +/** + * Resolves a class name. + * + * @internal + * + * @author Kévin Dunglas + */ +trait ClassResolverTrait +{ + /** + * Gets a class name for a given class or instance. + * + * @param mixed $value + * + * @return string + * + * @throws InvalidArgumentException If the class does not exists + */ + private function getClass($value) + { + if (is_string($value)) { + if (!class_exists($value) && !interface_exists($value)) { + throw new InvalidArgumentException(sprintf('The class or interface "%s" does not exist.', $value)); + } + + return ltrim($value, '\\'); + } + + if (!is_object($value)) { + throw new InvalidArgumentException(sprintf('Cannot create metadata for non-objects. Got: "%s"', gettype($value))); + } + + return get_class($value); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..4495f0d56c3bf8225d59c77768b3d444aba642d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping\Loader; + +use Doctrine\Common\Annotations\Reader; +use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Annotation\MaxDepth; +use Symfony\Component\Serializer\Exception\MappingException; +use Symfony\Component\Serializer\Mapping\AttributeMetadata; +use Symfony\Component\Serializer\Mapping\ClassMetadataInterface; + +/** + * Annotation loader. + * + * @author Kévin Dunglas + */ +class AnnotationLoader implements LoaderInterface +{ + /** + * @var Reader + */ + private $reader; + + /** + * @param Reader $reader + */ + public function __construct(Reader $reader) + { + $this->reader = $reader; + } + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadataInterface $classMetadata) + { + $reflectionClass = $classMetadata->getReflectionClass(); + $className = $reflectionClass->name; + $loaded = false; + + $attributesMetadata = $classMetadata->getAttributesMetadata(); + + foreach ($reflectionClass->getProperties() as $property) { + if (!isset($attributesMetadata[$property->name])) { + $attributesMetadata[$property->name] = new AttributeMetadata($property->name); + $classMetadata->addAttributeMetadata($attributesMetadata[$property->name]); + } + + if ($property->getDeclaringClass()->name === $className) { + foreach ($this->reader->getPropertyAnnotations($property) as $annotation) { + if ($annotation instanceof Groups) { + foreach ($annotation->getGroups() as $group) { + $attributesMetadata[$property->name]->addGroup($group); + } + } elseif ($annotation instanceof MaxDepth) { + $attributesMetadata[$property->name]->setMaxDepth($annotation->getMaxDepth()); + } + + $loaded = true; + } + } + } + + foreach ($reflectionClass->getMethods() as $method) { + if ($method->getDeclaringClass()->name !== $className) { + continue; + } + + $accessorOrMutator = preg_match('/^(get|is|has|set)(.+)$/i', $method->name, $matches); + if ($accessorOrMutator) { + $attributeName = lcfirst($matches[2]); + + if (isset($attributesMetadata[$attributeName])) { + $attributeMetadata = $attributesMetadata[$attributeName]; + } else { + $attributesMetadata[$attributeName] = $attributeMetadata = new AttributeMetadata($attributeName); + $classMetadata->addAttributeMetadata($attributeMetadata); + } + } + + foreach ($this->reader->getMethodAnnotations($method) as $annotation) { + if ($annotation instanceof Groups) { + if (!$accessorOrMutator) { + throw new MappingException(sprintf('Groups on "%s::%s" cannot be added. Groups can only be added on methods beginning with "get", "is", "has" or "set".', $className, $method->name)); + } + + foreach ($annotation->getGroups() as $group) { + $attributeMetadata->addGroup($group); + } + } elseif ($annotation instanceof MaxDepth) { + if (!$accessorOrMutator) { + throw new MappingException(sprintf('MaxDepth on "%s::%s" cannot be added. MaxDepth can only be added on methods beginning with "get", "is", "has" or "set".', $className, $method->name)); + } + + $attributeMetadata->setMaxDepth($annotation->getMaxDepth()); + } + + $loaded = true; + } + } + + return $loaded; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/FileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/FileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..38bb59389a6dd9dea13247ec3d04aa595521df57 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/FileLoader.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping\Loader; + +use Symfony\Component\Serializer\Exception\MappingException; + +/** + * Base class for all file based loaders. + * + * @author Kévin Dunglas + */ +abstract class FileLoader implements LoaderInterface +{ + /** + * @var string + */ + protected $file; + + /** + * Constructor. + * + * @param string $file The mapping file to load + * + * @throws MappingException if the mapping file does not exist or is not readable + */ + public function __construct($file) + { + if (!is_file($file)) { + throw new MappingException(sprintf('The mapping file %s does not exist', $file)); + } + + if (!is_readable($file)) { + throw new MappingException(sprintf('The mapping file %s is not readable', $file)); + } + + $this->file = $file; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/LoaderChain.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/LoaderChain.php new file mode 100644 index 0000000000000000000000000000000000000000..8bf1c17da9d92ed98992657cc759caaa79e5fc87 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/LoaderChain.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping\Loader; + +use Symfony\Component\Serializer\Exception\MappingException; +use Symfony\Component\Serializer\Mapping\ClassMetadataInterface; + +/** + * Calls multiple {@link LoaderInterface} instances in a chain. + * + * This class accepts multiple instances of LoaderInterface to be passed to the + * constructor. When {@link loadClassMetadata()} is called, the same method is called + * in all of these loaders, regardless of whether any of them was + * successful or not. + * + * @author Bernhard Schussek + * @author Kévin Dunglas + */ +class LoaderChain implements LoaderInterface +{ + /** + * @var LoaderInterface[] + */ + private $loaders; + + /** + * Accepts a list of LoaderInterface instances. + * + * @param LoaderInterface[] $loaders An array of LoaderInterface instances + * + * @throws MappingException If any of the loaders does not implement LoaderInterface + */ + public function __construct(array $loaders) + { + foreach ($loaders as $loader) { + if (!$loader instanceof LoaderInterface) { + throw new MappingException(sprintf('Class %s is expected to implement LoaderInterface', get_class($loader))); + } + } + + $this->loaders = $loaders; + } + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadataInterface $metadata) + { + $success = false; + + foreach ($this->loaders as $loader) { + $success = $loader->loadClassMetadata($metadata) || $success; + } + + return $success; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/LoaderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/LoaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..ebf84b6a961303390211463a157944a69299522a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/LoaderInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping\Loader; + +use Symfony\Component\Serializer\Mapping\ClassMetadataInterface; + +/** + * Loads {@link ClassMetadataInterface}. + * + * @author Kévin Dunglas + */ +interface LoaderInterface +{ + /** + * Load class metadata. + * + * @param ClassMetadataInterface $classMetadata A metadata + * + * @return bool + */ + public function loadClassMetadata(ClassMetadataInterface $classMetadata); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/XmlFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/XmlFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..76d064326f168b59197d96da802d9ccca9203bb8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/XmlFileLoader.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping\Loader; + +use Symfony\Component\Config\Util\XmlUtils; +use Symfony\Component\Serializer\Exception\MappingException; +use Symfony\Component\Serializer\Mapping\AttributeMetadata; +use Symfony\Component\Serializer\Mapping\ClassMetadataInterface; + +/** + * Loads XML mapping files. + * + * @author Kévin Dunglas + */ +class XmlFileLoader extends FileLoader +{ + /** + * An array of {@class \SimpleXMLElement} instances. + * + * @var \SimpleXMLElement[]|null + */ + private $classes; + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadataInterface $classMetadata) + { + if (null === $this->classes) { + $this->classes = $this->getClassesFromXml(); + } + + if (!$this->classes) { + return false; + } + + $attributesMetadata = $classMetadata->getAttributesMetadata(); + + if (isset($this->classes[$classMetadata->getName()])) { + $xml = $this->classes[$classMetadata->getName()]; + + foreach ($xml->attribute as $attribute) { + $attributeName = (string) $attribute['name']; + + if (isset($attributesMetadata[$attributeName])) { + $attributeMetadata = $attributesMetadata[$attributeName]; + } else { + $attributeMetadata = new AttributeMetadata($attributeName); + $classMetadata->addAttributeMetadata($attributeMetadata); + } + + foreach ($attribute->group as $group) { + $attributeMetadata->addGroup((string) $group); + } + + if (isset($attribute['max-depth'])) { + $attributeMetadata->setMaxDepth((int) $attribute['max-depth']); + } + } + + return true; + } + + return false; + } + + /** + * Return the names of the classes mapped in this file. + * + * @return string[] The classes names + */ + public function getMappedClasses() + { + if (null === $this->classes) { + $this->classes = $this->getClassesFromXml(); + } + + return array_keys($this->classes); + } + + /** + * Parses a XML File. + * + * @param string $file Path of file + * + * @return \SimpleXMLElement + * + * @throws MappingException + */ + private function parseFile($file) + { + try { + $dom = XmlUtils::loadFile($file, __DIR__.'/schema/dic/serializer-mapping/serializer-mapping-1.0.xsd'); + } catch (\Exception $e) { + throw new MappingException($e->getMessage(), $e->getCode(), $e); + } + + return simplexml_import_dom($dom); + } + + private function getClassesFromXml() + { + $xml = $this->parseFile($this->file); + $classes = array(); + + foreach ($xml->class as $class) { + $classes[(string) $class['name']] = $class; + } + + return $classes; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..e3afa4763271e693081947af0b4937b493a22c30 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php @@ -0,0 +1,128 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Mapping\Loader; + +use Symfony\Component\Serializer\Exception\MappingException; +use Symfony\Component\Serializer\Mapping\AttributeMetadata; +use Symfony\Component\Serializer\Mapping\ClassMetadataInterface; +use Symfony\Component\Yaml\Parser; + +/** + * YAML File Loader. + * + * @author Kévin Dunglas + */ +class YamlFileLoader extends FileLoader +{ + private $yamlParser; + + /** + * An array of YAML class descriptions. + * + * @var array + */ + private $classes = null; + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadataInterface $classMetadata) + { + if (null === $this->classes) { + $this->classes = $this->getClassesFromYaml(); + } + + if (!$this->classes) { + return false; + } + + if (!isset($this->classes[$classMetadata->getName()])) { + return false; + } + + $yaml = $this->classes[$classMetadata->getName()]; + + if (isset($yaml['attributes']) && is_array($yaml['attributes'])) { + $attributesMetadata = $classMetadata->getAttributesMetadata(); + + foreach ($yaml['attributes'] as $attribute => $data) { + if (isset($attributesMetadata[$attribute])) { + $attributeMetadata = $attributesMetadata[$attribute]; + } else { + $attributeMetadata = new AttributeMetadata($attribute); + $classMetadata->addAttributeMetadata($attributeMetadata); + } + + if (isset($data['groups'])) { + if (!is_array($data['groups'])) { + throw new MappingException(sprintf('The "groups" key must be an array of strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName())); + } + + foreach ($data['groups'] as $group) { + if (!is_string($group)) { + throw new MappingException(sprintf('Group names must be strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName())); + } + + $attributeMetadata->addGroup($group); + } + } + + if (isset($data['max_depth'])) { + if (!is_int($data['max_depth'])) { + throw new MappingException(sprintf('The "max_depth" value must be an integer in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName())); + } + + $attributeMetadata->setMaxDepth($data['max_depth']); + } + } + } + + return true; + } + + /** + * Return the names of the classes mapped in this file. + * + * @return string[] The classes names + */ + public function getMappedClasses() + { + if (null === $this->classes) { + $this->classes = $this->getClassesFromYaml(); + } + + return array_keys($this->classes); + } + + private function getClassesFromYaml() + { + if (!stream_is_local($this->file)) { + throw new MappingException(sprintf('This is not a local file "%s".', $this->file)); + } + + if (null === $this->yamlParser) { + $this->yamlParser = new Parser(); + } + + $classes = $this->yamlParser->parse(file_get_contents($this->file)); + + if (empty($classes)) { + return array(); + } + + if (!is_array($classes)) { + throw new MappingException(sprintf('The file "%s" must contain a YAML array.', $this->file)); + } + + return $classes; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/schema/dic/serializer-mapping/serializer-mapping-1.0.xsd b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/schema/dic/serializer-mapping/serializer-mapping-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..afa8b92191362cd940bc70e3b314d9bfe2d9920f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Mapping/Loader/schema/dic/serializer-mapping/serializer-mapping-1.0.xsd @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php new file mode 100644 index 0000000000000000000000000000000000000000..508881e84c2a75f59efe45b7ceefca8dc0ac054f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\NameConverter; + +/** + * CamelCase to Underscore name converter. + * + * @author Kévin Dunglas + */ +class CamelCaseToSnakeCaseNameConverter implements NameConverterInterface +{ + /** + * @var array|null + */ + private $attributes; + + /** + * @var bool + */ + private $lowerCamelCase; + + /** + * @param null|array $attributes The list of attributes to rename or null for all attributes + * @param bool $lowerCamelCase Use lowerCamelCase style + */ + public function __construct(array $attributes = null, $lowerCamelCase = true) + { + $this->attributes = $attributes; + $this->lowerCamelCase = $lowerCamelCase; + } + + /** + * {@inheritdoc} + */ + public function normalize($propertyName) + { + if (null === $this->attributes || in_array($propertyName, $this->attributes)) { + $lcPropertyName = lcfirst($propertyName); + $snakeCasedName = ''; + + $len = strlen($lcPropertyName); + for ($i = 0; $i < $len; ++$i) { + if (ctype_upper($lcPropertyName[$i])) { + $snakeCasedName .= '_'.strtolower($lcPropertyName[$i]); + } else { + $snakeCasedName .= strtolower($lcPropertyName[$i]); + } + } + + return $snakeCasedName; + } + + return $propertyName; + } + + /** + * {@inheritdoc} + */ + public function denormalize($propertyName) + { + $camelCasedName = preg_replace_callback('/(^|_|\.)+(.)/', function ($match) { + return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); + }, $propertyName); + + if ($this->lowerCamelCase) { + $camelCasedName = lcfirst($camelCasedName); + } + + if (null === $this->attributes || in_array($camelCasedName, $this->attributes)) { + return $camelCasedName; + } + + return $propertyName; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/NameConverter/NameConverterInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/NameConverter/NameConverterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c9f66b029a9e97cdcbe147a410eb25caf017452d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/NameConverter/NameConverterInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\NameConverter; + +/** + * Defines the interface for property name converters. + * + * @author Kévin Dunglas + */ +interface NameConverterInterface +{ + /** + * Converts a property name to its normalized value. + * + * @param string $propertyName + * + * @return string + */ + public function normalize($propertyName); + + /** + * Converts a property name to its denormalized value. + * + * @param string $propertyName + * + * @return string + */ + public function denormalize($propertyName); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..8f5d2099291bc66259f54590ff9eface65155f93 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -0,0 +1,375 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +use Symfony\Component\Serializer\Exception\CircularReferenceException; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; +use Symfony\Component\Serializer\Exception\LogicException; +use Symfony\Component\Serializer\Exception\RuntimeException; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; +use Symfony\Component\Serializer\Mapping\AttributeMetadataInterface; +use Symfony\Component\Serializer\NameConverter\NameConverterInterface; +use Symfony\Component\Serializer\SerializerAwareInterface; + +/** + * Normalizer implementation. + * + * @author Kévin Dunglas + */ +abstract class AbstractNormalizer extends SerializerAwareNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface +{ + const CIRCULAR_REFERENCE_LIMIT = 'circular_reference_limit'; + const OBJECT_TO_POPULATE = 'object_to_populate'; + const GROUPS = 'groups'; + + /** + * @var int + */ + protected $circularReferenceLimit = 1; + + /** + * @var callable + */ + protected $circularReferenceHandler; + + /** + * @var ClassMetadataFactoryInterface|null + */ + protected $classMetadataFactory; + + /** + * @var NameConverterInterface|null + */ + protected $nameConverter; + + /** + * @var array + */ + protected $callbacks = array(); + + /** + * @var array + */ + protected $ignoredAttributes = array(); + + /** + * @var array + */ + protected $camelizedAttributes = array(); + + /** + * Sets the {@link ClassMetadataFactoryInterface} to use. + * + * @param ClassMetadataFactoryInterface|null $classMetadataFactory + * @param NameConverterInterface|null $nameConverter + */ + public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null) + { + $this->classMetadataFactory = $classMetadataFactory; + $this->nameConverter = $nameConverter; + } + + /** + * Set circular reference limit. + * + * @param int $circularReferenceLimit limit of iterations for the same object + * + * @return self + */ + public function setCircularReferenceLimit($circularReferenceLimit) + { + $this->circularReferenceLimit = $circularReferenceLimit; + + return $this; + } + + /** + * Set circular reference handler. + * + * @param callable $circularReferenceHandler + * + * @return self + */ + public function setCircularReferenceHandler(callable $circularReferenceHandler) + { + $this->circularReferenceHandler = $circularReferenceHandler; + + return $this; + } + + /** + * Set normalization callbacks. + * + * @param callable[] $callbacks help normalize the result + * + * @return self + * + * @throws InvalidArgumentException if a non-callable callback is set + */ + public function setCallbacks(array $callbacks) + { + foreach ($callbacks as $attribute => $callback) { + if (!is_callable($callback)) { + throw new InvalidArgumentException(sprintf( + 'The given callback for attribute "%s" is not callable.', + $attribute + )); + } + } + $this->callbacks = $callbacks; + + return $this; + } + + /** + * Set ignored attributes for normalization and denormalization. + * + * @param array $ignoredAttributes + * + * @return self + */ + public function setIgnoredAttributes(array $ignoredAttributes) + { + $this->ignoredAttributes = $ignoredAttributes; + + return $this; + } + + /** + * Detects if the configured circular reference limit is reached. + * + * @param object $object + * @param array $context + * + * @return bool + * + * @throws CircularReferenceException + */ + protected function isCircularReference($object, &$context) + { + $objectHash = spl_object_hash($object); + + if (isset($context[static::CIRCULAR_REFERENCE_LIMIT][$objectHash])) { + if ($context[static::CIRCULAR_REFERENCE_LIMIT][$objectHash] >= $this->circularReferenceLimit) { + unset($context[static::CIRCULAR_REFERENCE_LIMIT][$objectHash]); + + return true; + } + + ++$context[static::CIRCULAR_REFERENCE_LIMIT][$objectHash]; + } else { + $context[static::CIRCULAR_REFERENCE_LIMIT][$objectHash] = 1; + } + + return false; + } + + /** + * Handles a circular reference. + * + * If a circular reference handler is set, it will be called. Otherwise, a + * {@class CircularReferenceException} will be thrown. + * + * @param object $object + * + * @return mixed + * + * @throws CircularReferenceException + */ + protected function handleCircularReference($object) + { + if ($this->circularReferenceHandler) { + return call_user_func($this->circularReferenceHandler, $object); + } + + throw new CircularReferenceException(sprintf('A circular reference has been detected (configured limit: %d).', $this->circularReferenceLimit)); + } + + /** + * Gets attributes to normalize using groups. + * + * @param string|object $classOrObject + * @param array $context + * @param bool $attributesAsString If false, return an array of {@link AttributeMetadataInterface} + * + * @return string[]|AttributeMetadataInterface[]|bool + */ + protected function getAllowedAttributes($classOrObject, array $context, $attributesAsString = false) + { + if (!$this->classMetadataFactory || !isset($context[static::GROUPS]) || !is_array($context[static::GROUPS])) { + return false; + } + + $allowedAttributes = array(); + foreach ($this->classMetadataFactory->getMetadataFor($classOrObject)->getAttributesMetadata() as $attributeMetadata) { + $name = $attributeMetadata->getName(); + + if ( + count(array_intersect($attributeMetadata->getGroups(), $context[static::GROUPS])) && + $this->isAllowedAttribute($classOrObject, $name, null, $context) + ) { + $allowedAttributes[] = $attributesAsString ? $name : $attributeMetadata; + } + } + + return $allowedAttributes; + } + + /** + * Is this attribute allowed? + * + * @param object|string $classOrObject + * @param string $attribute + * @param string|null $format + * @param array $context + * + * @return bool + */ + protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = array()) + { + return !in_array($attribute, $this->ignoredAttributes); + } + + /** + * Normalizes the given data to an array. It's particularly useful during + * the denormalization process. + * + * @param object|array $data + * + * @return array + */ + protected function prepareForDenormalization($data) + { + return (array) $data; + } + + /** + * Returns the method to use to construct an object. This method must be either + * the object constructor or static. + * + * @param array $data + * @param string $class + * @param array $context + * @param \ReflectionClass $reflectionClass + * @param array|bool $allowedAttributes + * + * @return \ReflectionMethod|null + */ + protected function getConstructor(array &$data, $class, array &$context, \ReflectionClass $reflectionClass, $allowedAttributes) + { + return $reflectionClass->getConstructor(); + } + + /** + * Instantiates an object using constructor parameters when needed. + * + * This method also allows to denormalize data into an existing object if + * it is present in the context with the object_to_populate. This object + * is removed from the context before being returned to avoid side effects + * when recursively normalizing an object graph. + * + * @param array $data + * @param string $class + * @param array $context + * @param \ReflectionClass $reflectionClass + * @param array|bool $allowedAttributes + * @param string|null $format + * + * @return object + * + * @throws RuntimeException + */ + protected function instantiateObject(array &$data, $class, array &$context, \ReflectionClass $reflectionClass, $allowedAttributes/*, $format = null*/) + { + if (func_num_args() >= 6) { + $format = func_get_arg(5); + } else { + if (__CLASS__ !== get_class($this)) { + $r = new \ReflectionMethod($this, __FUNCTION__); + if (__CLASS__ !== $r->getDeclaringClass()->getName()) { + @trigger_error(sprintf('Method %s::%s() will have a 6th `$format = null` argument in version 4.0. Not defining it is deprecated since 3.2.', get_class($this), __FUNCTION__), E_USER_DEPRECATED); + } + } + + $format = null; + } + + if ( + isset($context[static::OBJECT_TO_POPULATE]) && + is_object($context[static::OBJECT_TO_POPULATE]) && + $context[static::OBJECT_TO_POPULATE] instanceof $class + ) { + $object = $context[static::OBJECT_TO_POPULATE]; + unset($context[static::OBJECT_TO_POPULATE]); + + return $object; + } + + $constructor = $this->getConstructor($data, $class, $context, $reflectionClass, $allowedAttributes); + if ($constructor) { + $constructorParameters = $constructor->getParameters(); + + $params = array(); + foreach ($constructorParameters as $constructorParameter) { + $paramName = $constructorParameter->name; + $key = $this->nameConverter ? $this->nameConverter->normalize($paramName) : $paramName; + + $allowed = $allowedAttributes === false || in_array($paramName, $allowedAttributes); + $ignored = in_array($paramName, $this->ignoredAttributes); + if (method_exists($constructorParameter, 'isVariadic') && $constructorParameter->isVariadic()) { + if ($allowed && !$ignored && (isset($data[$key]) || array_key_exists($key, $data))) { + if (!is_array($data[$paramName])) { + throw new RuntimeException(sprintf('Cannot create an instance of %s from serialized data because the variadic parameter %s can only accept an array.', $class, $constructorParameter->name)); + } + + $params = array_merge($params, $data[$paramName]); + } + } elseif ($allowed && !$ignored && (isset($data[$key]) || array_key_exists($key, $data))) { + $parameterData = $data[$key]; + try { + if (null !== $constructorParameter->getClass()) { + if (!$this->serializer instanceof DenormalizerInterface) { + throw new LogicException(sprintf('Cannot create an instance of %s from serialized data because the serializer inject in "%s" is not a denormalizer', $constructorParameter->getClass(), static::class)); + } + $parameterClass = $constructorParameter->getClass()->getName(); + $parameterData = $this->serializer->denormalize($parameterData, $parameterClass, $format, $context); + } + } catch (\ReflectionException $e) { + throw new RuntimeException(sprintf('Could not determine the class of the parameter "%s".', $key), 0, $e); + } + + // Don't run set for a parameter passed to the constructor + $params[] = $parameterData; + unset($data[$key]); + } elseif ($constructorParameter->isDefaultValueAvailable()) { + $params[] = $constructorParameter->getDefaultValue(); + } else { + throw new RuntimeException( + sprintf( + 'Cannot create an instance of %s from serialized data because its constructor requires parameter "%s" to be present.', + $class, + $constructorParameter->name + ) + ); + } + } + + if ($constructor->isConstructor()) { + return $reflectionClass->newInstanceArgs($params); + } else { + return $constructor->invokeArgs(null, $params); + } + } + + return new $class(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..2b3433c567d4aeece69ce890ee63f32ec1249a1f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -0,0 +1,355 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; +use Symfony\Component\Serializer\Encoder\JsonEncoder; +use Symfony\Component\Serializer\Exception\CircularReferenceException; +use Symfony\Component\Serializer\Exception\LogicException; +use Symfony\Component\Serializer\Exception\UnexpectedValueException; +use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; +use Symfony\Component\PropertyInfo\Type; +use Symfony\Component\Serializer\Mapping\AttributeMetadataInterface; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; +use Symfony\Component\Serializer\NameConverter\NameConverterInterface; + +/** + * Base class for a normalizer dealing with objects. + * + * @author Kévin Dunglas + */ +abstract class AbstractObjectNormalizer extends AbstractNormalizer +{ + const ENABLE_MAX_DEPTH = 'enable_max_depth'; + const DEPTH_KEY_PATTERN = 'depth_%s::%s'; + + private $propertyTypeExtractor; + private $attributesCache = array(); + + public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null, PropertyTypeExtractorInterface $propertyTypeExtractor = null) + { + parent::__construct($classMetadataFactory, $nameConverter); + + $this->propertyTypeExtractor = $propertyTypeExtractor; + } + + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null) + { + return is_object($data) && !$data instanceof \Traversable; + } + + /** + * {@inheritdoc} + * + * @throws CircularReferenceException + */ + public function normalize($object, $format = null, array $context = array()) + { + if (!isset($context['cache_key'])) { + $context['cache_key'] = $this->getCacheKey($format, $context); + } + + if ($this->isCircularReference($object, $context)) { + return $this->handleCircularReference($object); + } + + $data = array(); + $stack = array(); + $attributes = $this->getAttributes($object, $format, $context); + $class = get_class($object); + $attributesMetadata = $this->classMetadataFactory ? $this->classMetadataFactory->getMetadataFor($class)->getAttributesMetadata() : null; + + foreach ($attributes as $attribute) { + if (null !== $attributesMetadata && $this->isMaxDepthReached($attributesMetadata, $class, $attribute, $context)) { + continue; + } + + $attributeValue = $this->getAttributeValue($object, $attribute, $format, $context); + + if (isset($this->callbacks[$attribute])) { + $attributeValue = call_user_func($this->callbacks[$attribute], $attributeValue); + } + + if (null !== $attributeValue && !is_scalar($attributeValue)) { + $stack[$attribute] = $attributeValue; + } + + $data = $this->updateData($data, $attribute, $attributeValue); + } + + foreach ($stack as $attribute => $attributeValue) { + if (!$this->serializer instanceof NormalizerInterface) { + throw new LogicException(sprintf('Cannot normalize attribute "%s" because the injected serializer is not a normalizer', $attribute)); + } + + $data = $this->updateData($data, $attribute, $this->serializer->normalize($attributeValue, $format, $context)); + } + + return $data; + } + + /** + * Gets and caches attributes for the given object, format and context. + * + * @param object $object + * @param string|null $format + * @param array $context + * + * @return string[] + */ + protected function getAttributes($object, $format = null, array $context) + { + $class = get_class($object); + $key = $class.'-'.$context['cache_key']; + + if (isset($this->attributesCache[$key])) { + return $this->attributesCache[$key]; + } + + $allowedAttributes = $this->getAllowedAttributes($object, $context, true); + + if (false !== $allowedAttributes) { + if ($context['cache_key']) { + $this->attributesCache[$key] = $allowedAttributes; + } + + return $allowedAttributes; + } + + if (isset($this->attributesCache[$class])) { + return $this->attributesCache[$class]; + } + + return $this->attributesCache[$class] = $this->extractAttributes($object, $format, $context); + } + + /** + * Extracts attributes to normalize from the class of the given object, format and context. + * + * @param object $object + * @param string|null $format + * @param array $context + * + * @return string[] + */ + abstract protected function extractAttributes($object, $format = null, array $context = array()); + + /** + * Gets the attribute value. + * + * @param object $object + * @param string $attribute + * @param string|null $format + * @param array $context + * + * @return mixed + */ + abstract protected function getAttributeValue($object, $attribute, $format = null, array $context = array()); + + /** + * {@inheritdoc} + */ + public function supportsDenormalization($data, $type, $format = null) + { + return class_exists($type); + } + + /** + * {@inheritdoc} + */ + public function denormalize($data, $class, $format = null, array $context = array()) + { + if (!isset($context['cache_key'])) { + $context['cache_key'] = $this->getCacheKey($format, $context); + } + $allowedAttributes = $this->getAllowedAttributes($class, $context, true); + $normalizedData = $this->prepareForDenormalization($data); + + $reflectionClass = new \ReflectionClass($class); + $object = $this->instantiateObject($normalizedData, $class, $context, $reflectionClass, $allowedAttributes, $format); + + foreach ($normalizedData as $attribute => $value) { + if ($this->nameConverter) { + $attribute = $this->nameConverter->denormalize($attribute); + } + + if (($allowedAttributes !== false && !in_array($attribute, $allowedAttributes)) || !$this->isAllowedAttribute($class, $attribute, $format, $context)) { + continue; + } + + $value = $this->validateAndDenormalize($class, $attribute, $value, $format, $context); + try { + $this->setAttributeValue($object, $attribute, $value, $format, $context); + } catch (InvalidArgumentException $e) { + throw new UnexpectedValueException($e->getMessage(), $e->getCode(), $e); + } + } + + return $object; + } + + /** + * Sets attribute value. + * + * @param object $object + * @param string $attribute + * @param mixed $value + * @param string|null $format + * @param array $context + */ + abstract protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()); + + /** + * Validates the submitted data and denormalizes it. + * + * @param string $currentClass + * @param string $attribute + * @param mixed $data + * @param string|null $format + * @param array $context + * + * @return mixed + * + * @throws UnexpectedValueException + * @throws LogicException + */ + private function validateAndDenormalize($currentClass, $attribute, $data, $format, array $context) + { + if (null === $this->propertyTypeExtractor || null === $types = $this->propertyTypeExtractor->getTypes($currentClass, $attribute)) { + return $data; + } + + $expectedTypes = array(); + foreach ($types as $type) { + if (null === $data && $type->isNullable()) { + return; + } + + if ($type->isCollection() && null !== ($collectionValueType = $type->getCollectionValueType()) && Type::BUILTIN_TYPE_OBJECT === $collectionValueType->getBuiltinType()) { + $builtinType = Type::BUILTIN_TYPE_OBJECT; + $class = $collectionValueType->getClassName().'[]'; + + if (null !== $collectionKeyType = $type->getCollectionKeyType()) { + $context['key_type'] = $collectionKeyType; + } + } else { + $builtinType = $type->getBuiltinType(); + $class = $type->getClassName(); + } + + $expectedTypes[Type::BUILTIN_TYPE_OBJECT === $builtinType && $class ? $class : $builtinType] = true; + + if (Type::BUILTIN_TYPE_OBJECT === $builtinType) { + if (!$this->serializer instanceof DenormalizerInterface) { + throw new LogicException(sprintf('Cannot denormalize attribute "%s" for class "%s" because injected serializer is not a denormalizer', $attribute, $class)); + } + + if ($this->serializer->supportsDenormalization($data, $class, $format)) { + return $this->serializer->denormalize($data, $class, $format, $context); + } + } + + // JSON only has a Number type corresponding to both int and float PHP types. + // PHP's json_encode, JavaScript's JSON.stringify, Go's json.Marshal as well as most other JSON encoders convert + // floating-point numbers like 12.0 to 12 (the decimal part is dropped when possible). + // PHP's json_decode automatically converts Numbers without a decimal part to integers. + // To circumvent this behavior, integers are converted to floats when denormalizing JSON based formats and when + // a float is expected. + if (Type::BUILTIN_TYPE_FLOAT === $builtinType && is_int($data) && false !== strpos($format, JsonEncoder::FORMAT)) { + return (float) $data; + } + + if (call_user_func('is_'.$builtinType, $data)) { + return $data; + } + } + + throw new UnexpectedValueException(sprintf('The type of the "%s" attribute for class "%s" must be one of "%s" ("%s" given).', $attribute, $currentClass, implode('", "', array_keys($expectedTypes)), gettype($data))); + } + + /** + * Sets an attribute and apply the name converter if necessary. + * + * @param array $data + * @param string $attribute + * @param mixed $attributeValue + * + * @return array + */ + private function updateData(array $data, $attribute, $attributeValue) + { + if ($this->nameConverter) { + $attribute = $this->nameConverter->normalize($attribute); + } + + $data[$attribute] = $attributeValue; + + return $data; + } + + /** + * Is the max depth reached for the given attribute? + * + * @param AttributeMetadataInterface[] $attributesMetadata + * @param string $class + * @param string $attribute + * @param array $context + * + * @return bool + */ + private function isMaxDepthReached(array $attributesMetadata, $class, $attribute, array &$context) + { + if ( + !isset($context[static::ENABLE_MAX_DEPTH]) || + !isset($attributesMetadata[$attribute]) || + null === $maxDepth = $attributesMetadata[$attribute]->getMaxDepth() + ) { + return false; + } + + $key = sprintf(static::DEPTH_KEY_PATTERN, $class, $attribute); + if (!isset($context[$key])) { + $context[$key] = 1; + + return false; + } + + if ($context[$key] === $maxDepth) { + return true; + } + + ++$context[$key]; + + return false; + } + + /** + * Gets the cache key to use. + * + * @param string|null $format + * @param array $context + * + * @return bool|string + */ + private function getCacheKey($format, array $context) + { + try { + return md5($format.serialize($context)); + } catch (\Exception $exception) { + // The context cannot be serialized, skip the cache + return false; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..7d3d87c510c5536c2ee9620147edacf6d9e300c7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +use Symfony\Component\Serializer\Exception\BadMethodCallException; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; +use Symfony\Component\Serializer\Exception\UnexpectedValueException; +use Symfony\Component\Serializer\SerializerAwareInterface; +use Symfony\Component\Serializer\SerializerInterface; + +/** + * Denormalizes arrays of objects. + * + * @author Alexander M. Turek + */ +class ArrayDenormalizer implements DenormalizerInterface, SerializerAwareInterface +{ + /** + * @var SerializerInterface|DenormalizerInterface + */ + private $serializer; + + /** + * {@inheritdoc} + * + * @throws UnexpectedValueException + */ + public function denormalize($data, $class, $format = null, array $context = array()) + { + if ($this->serializer === null) { + throw new BadMethodCallException('Please set a serializer before calling denormalize()!'); + } + if (!is_array($data)) { + throw new InvalidArgumentException('Data expected to be an array, '.gettype($data).' given.'); + } + if (substr($class, -2) !== '[]') { + throw new InvalidArgumentException('Unsupported class: '.$class); + } + + $serializer = $this->serializer; + $class = substr($class, 0, -2); + + $builtinType = isset($context['key_type']) ? $context['key_type']->getBuiltinType() : null; + foreach ($data as $key => $value) { + if (null !== $builtinType && !call_user_func('is_'.$builtinType, $key)) { + throw new UnexpectedValueException(sprintf('The type of the key "%s" must be "%s" ("%s" given).', $key, $builtinType, gettype($key))); + } + + $data[$key] = $serializer->denormalize($value, $class, $format, $context); + } + + return $data; + } + + /** + * {@inheritdoc} + */ + public function supportsDenormalization($data, $type, $format = null) + { + return substr($type, -2) === '[]' + && $this->serializer->supportsDenormalization($data, substr($type, 0, -2), $format); + } + + /** + * {@inheritdoc} + */ + public function setSerializer(SerializerInterface $serializer) + { + if (!$serializer instanceof DenormalizerInterface) { + throw new InvalidArgumentException('Expected a serializer that also implements DenormalizerInterface.'); + } + + $this->serializer = $serializer; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..688590ef02a101e8dc06d88cbb181a3ab2d86071 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.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\Serializer\Normalizer; + +use Symfony\Component\Serializer\SerializerAwareInterface; +use Symfony\Component\Serializer\SerializerAwareTrait; + +/** + * @author Jordi Boggiano + */ +class CustomNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface +{ + use SerializerAwareTrait; + + /** + * {@inheritdoc} + */ + public function normalize($object, $format = null, array $context = array()) + { + return $object->normalize($this->serializer, $format, $context); + } + + /** + * {@inheritdoc} + */ + public function denormalize($data, $class, $format = null, array $context = array()) + { + $object = new $class(); + $object->denormalize($this->serializer, $data, $format, $context); + + return $object; + } + + /** + * Checks if the given class implements the NormalizableInterface. + * + * @param mixed $data Data to normalize + * @param string $format The format being (de-)serialized from or into + * + * @return bool + */ + public function supportsNormalization($data, $format = null) + { + return $data instanceof NormalizableInterface; + } + + /** + * Checks if the given class implements the NormalizableInterface. + * + * @param mixed $data Data to denormalize from + * @param string $type The class to which the data should be denormalized + * @param string $format The format being deserialized from + * + * @return bool + */ + public function supportsDenormalization($data, $type, $format = null) + { + if (!class_exists($type)) { + return false; + } + + return is_subclass_of($type, 'Symfony\Component\Serializer\Normalizer\DenormalizableInterface'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..988a491b7c800b8cca538df16bd8e144ae25ed93 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php @@ -0,0 +1,157 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +use Symfony\Component\HttpFoundation\File\File; +use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; +use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; +use Symfony\Component\Serializer\Exception\UnexpectedValueException; + +/** + * Normalizes an {@see \SplFileInfo} object to a data URI. + * Denormalizes a data URI to a {@see \SplFileObject} object. + * + * @author Kévin Dunglas + */ +class DataUriNormalizer implements NormalizerInterface, DenormalizerInterface +{ + /** + * @var MimeTypeGuesserInterface + */ + private $mimeTypeGuesser; + + public function __construct(MimeTypeGuesserInterface $mimeTypeGuesser = null) + { + if (null === $mimeTypeGuesser && class_exists('Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser')) { + $mimeTypeGuesser = MimeTypeGuesser::getInstance(); + } + + $this->mimeTypeGuesser = $mimeTypeGuesser; + } + + /** + * {@inheritdoc} + */ + public function normalize($object, $format = null, array $context = array()) + { + if (!$object instanceof \SplFileInfo) { + throw new InvalidArgumentException('The object must be an instance of "\SplFileInfo".'); + } + + $mimeType = $this->getMimeType($object); + $splFileObject = $this->extractSplFileObject($object); + + $data = ''; + + $splFileObject->rewind(); + while (!$splFileObject->eof()) { + $data .= $splFileObject->fgets(); + } + + if ('text' === explode('/', $mimeType, 2)[0]) { + return sprintf('data:%s,%s', $mimeType, rawurlencode($data)); + } + + return sprintf('data:%s;base64,%s', $mimeType, base64_encode($data)); + } + + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null) + { + return $data instanceof \SplFileInfo; + } + + /** + * {@inheritdoc} + * + * Regex adapted from Brian Grinstead code. + * + * @see https://gist.github.com/bgrins/6194623 + * + * @throws InvalidArgumentException + * @throws UnexpectedValueException + */ + public function denormalize($data, $class, $format = null, array $context = array()) + { + if (!preg_match('/^data:([a-z0-9][a-z0-9\!\#\$\&\-\^\_\+\.]{0,126}\/[a-z0-9][a-z0-9\!\#\$\&\-\^\_\+\.]{0,126}(;[a-z0-9\-]+\=[a-z0-9\-]+)?)?(;base64)?,[a-z0-9\!\$\&\\\'\,\(\)\*\+\,\;\=\-\.\_\~\:\@\/\?\%\s]*\s*$/i', $data)) { + throw new UnexpectedValueException('The provided "data:" URI is not valid.'); + } + + try { + switch ($class) { + case 'Symfony\Component\HttpFoundation\File\File': + return new File($data, false); + + case 'SplFileObject': + case 'SplFileInfo': + return new \SplFileObject($data); + } + } catch (\RuntimeException $exception) { + throw new UnexpectedValueException($exception->getMessage(), $exception->getCode(), $exception); + } + + throw new InvalidArgumentException(sprintf('The class parameter "%s" is not supported. It must be one of "SplFileInfo", "SplFileObject" or "Symfony\Component\HttpFoundation\File\File".', $class)); + } + + /** + * {@inheritdoc} + */ + public function supportsDenormalization($data, $type, $format = null) + { + $supportedTypes = array( + \SplFileInfo::class => true, + \SplFileObject::class => true, + 'Symfony\Component\HttpFoundation\File\File' => true, + ); + + return isset($supportedTypes[$type]); + } + + /** + * Gets the mime type of the object. Defaults to application/octet-stream. + * + * @param \SplFileInfo $object + * + * @return string + */ + private function getMimeType(\SplFileInfo $object) + { + if ($object instanceof File) { + return $object->getMimeType(); + } + + if ($this->mimeTypeGuesser && $mimeType = $this->mimeTypeGuesser->guess($object->getPathname())) { + return $mimeType; + } + + return 'application/octet-stream'; + } + + /** + * Returns the \SplFileObject instance associated with the given \SplFileInfo instance. + * + * @param \SplFileInfo $object + * + * @return \SplFileObject + */ + private function extractSplFileObject(\SplFileInfo $object) + { + if ($object instanceof \SplFileObject) { + return $object; + } + + return $object->openFile(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..5958aab0679bdc63b3a171e353141c413f7bc548 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +use Symfony\Component\Serializer\Exception\InvalidArgumentException; +use Symfony\Component\Serializer\Exception\UnexpectedValueException; + +/** + * Normalizes an object implementing the {@see \DateTimeInterface} to a date string. + * Denormalizes a date string to an instance of {@see \DateTime} or {@see \DateTimeImmutable}. + * + * @author Kévin Dunglas + */ +class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface +{ + const FORMAT_KEY = 'datetime_format'; + + /** + * @var string + */ + private $format; + + /** + * @param string $format + */ + public function __construct($format = \DateTime::RFC3339) + { + $this->format = $format; + } + + /** + * {@inheritdoc} + * + * @throws InvalidArgumentException + */ + public function normalize($object, $format = null, array $context = array()) + { + if (!$object instanceof \DateTimeInterface) { + throw new InvalidArgumentException('The object must implement the "\DateTimeInterface".'); + } + + $format = isset($context[self::FORMAT_KEY]) ? $context[self::FORMAT_KEY] : $this->format; + + return $object->format($format); + } + + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null) + { + return $data instanceof \DateTimeInterface; + } + + /** + * {@inheritdoc} + * + * @throws UnexpectedValueException + */ + public function denormalize($data, $class, $format = null, array $context = array()) + { + $dateTimeFormat = isset($context[self::FORMAT_KEY]) ? $context[self::FORMAT_KEY] : null; + + if (null !== $dateTimeFormat) { + $object = \DateTime::class === $class ? \DateTime::createFromFormat($dateTimeFormat, $data) : \DateTimeImmutable::createFromFormat($dateTimeFormat, $data); + + if (false !== $object) { + return $object; + } + + $dateTimeErrors = \DateTime::class === $class ? \DateTime::getLastErrors() : \DateTimeImmutable::getLastErrors(); + + throw new UnexpectedValueException(sprintf( + 'Parsing datetime string "%s" using format "%s" resulted in %d errors:'."\n".'%s', + $data, + $dateTimeFormat, + $dateTimeErrors['error_count'], + implode("\n", $this->formatDateTimeErrors($dateTimeErrors['errors'])) + )); + } + + try { + return \DateTime::class === $class ? new \DateTime($data) : new \DateTimeImmutable($data); + } catch (\Exception $e) { + throw new UnexpectedValueException($e->getMessage(), $e->getCode(), $e); + } + } + + /** + * {@inheritdoc} + */ + public function supportsDenormalization($data, $type, $format = null) + { + $supportedTypes = array( + \DateTimeInterface::class => true, + \DateTimeImmutable::class => true, + \DateTime::class => true, + ); + + return isset($supportedTypes[$type]); + } + + /** + * Formats datetime errors. + * + * @param array $errors + * + * @return string[] + */ + private function formatDateTimeErrors(array $errors) + { + $formattedErrors = array(); + + foreach ($errors as $pos => $message) { + $formattedErrors[] = sprintf('at position %d: %s', $pos, $message); + } + + return $formattedErrors; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..4fe7a313a17556fcdd030132724a581996adceed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +/** + * Defines the most basic interface a class must implement to be denormalizable. + * + * If a denormalizer is registered for the class and it doesn't implement + * the Denormalizable interfaces, the normalizer will be used instead + * + * @author Jordi Boggiano + */ +interface DenormalizableInterface +{ + /** + * Denormalizes the object back from an array of scalars|arrays. + * + * It is important to understand that the denormalize() call should denormalize + * recursively all child objects of the implementor. + * + * @param DenormalizerInterface $denormalizer The denormalizer is given so that you + * can use it to denormalize objects contained within this object + * @param array|scalar $data The data from which to re-create the object + * @param string|null $format The format is optionally given to be able to denormalize differently + * based on different input formats + * @param array $context options for denormalizing + * + * @return object + */ + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..4a6a4e26e92da01e387e9a7661d4277094be71d4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareInterface.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\Serializer\Normalizer; + +/** + * Class accepting a denormalizer. + * + * @author Joel Wurtz + */ +interface DenormalizerAwareInterface +{ + /** + * Sets the owning Denormalizer object. + * + * @param DenormalizerInterface $denormalizer + */ + public function setDenormalizer(DenormalizerInterface $denormalizer); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareTrait.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..ff8528bff93cea81b294b48dfda0567a987ffd51 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareTrait.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +/** + * DenormalizerAware trait. + * + * @author Joel Wurtz + */ +trait DenormalizerAwareTrait +{ + /** + * @var DenormalizerInterface + */ + protected $denormalizer; + + /** + * Sets the Denormalizer. + * + * @param DenormalizerInterface $denormalizer A DenormalizerInterface instance + */ + public function setDenormalizer(DenormalizerInterface $denormalizer) + { + $this->denormalizer = $denormalizer; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..23df4829a8cbd63312209265009fbb075ed0de33 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.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\Component\Serializer\Normalizer; + +/** + * Defines the interface of denormalizers. + * + * @author Jordi Boggiano + */ +interface DenormalizerInterface +{ + /** + * Denormalizes data back into an object of the given class. + * + * @param mixed $data data to restore + * @param string $class the expected class to instantiate + * @param string $format format the given data was extracted from + * @param array $context options available to the denormalizer + * + * @return object + */ + public function denormalize($data, $class, $format = null, array $context = array()); + + /** + * Checks whether the given class is supported for denormalization by this normalizer. + * + * @param mixed $data Data to denormalize from + * @param string $type The class to which the data should be denormalized + * @param string $format The format being deserialized from + * + * @return bool + */ + public function supportsDenormalization($data, $type, $format = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..2a15d46d63b103ec18ae0fb95010fef01b4b9342 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -0,0 +1,154 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +/** + * Converts between objects with getter and setter methods and arrays. + * + * The normalization process looks at all public methods and calls the ones + * which have a name starting with get and take no parameters. The result is a + * map from property names (method name stripped of the get prefix and converted + * to lower case) to property values. Property values are normalized through the + * serializer. + * + * The denormalization first looks at the constructor of the given class to see + * if any of the parameters have the same name as one of the properties. The + * constructor is then called with all parameters or an exception is thrown if + * any required parameters were not present as properties. Then the denormalizer + * walks through the given map of property names to property values to see if a + * setter method exists for any of the properties. If a setter exists it is + * called with the property value. No automatic denormalization of the value + * takes place. + * + * @author Nils Adermann + * @author Kévin Dunglas + */ +class GetSetMethodNormalizer extends AbstractObjectNormalizer +{ + private static $setterAccessibleCache = array(); + + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null) + { + return parent::supportsNormalization($data, $format) && $this->supports(get_class($data)); + } + + /** + * {@inheritdoc} + */ + public function supportsDenormalization($data, $type, $format = null) + { + return parent::supportsDenormalization($data, $type, $format) && $this->supports($type); + } + + /** + * Checks if the given class has any get{Property} method. + * + * @param string $class + * + * @return bool + */ + private function supports($class) + { + $class = new \ReflectionClass($class); + $methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC); + foreach ($methods as $method) { + if ($this->isGetMethod($method)) { + return true; + } + } + + return false; + } + + /** + * Checks if a method's name is get.* or is.*, and can be called without parameters. + * + * @param \ReflectionMethod $method the method to check + * + * @return bool whether the method is a getter or boolean getter + */ + private function isGetMethod(\ReflectionMethod $method) + { + $methodLength = strlen($method->name); + + return + !$method->isStatic() && + ( + ((0 === strpos($method->name, 'get') && 3 < $methodLength) || + (0 === strpos($method->name, 'is') && 2 < $methodLength)) && + 0 === $method->getNumberOfRequiredParameters() + ) + ; + } + + /** + * {@inheritdoc} + */ + protected function extractAttributes($object, $format = null, array $context = array()) + { + $reflectionObject = new \ReflectionObject($object); + $reflectionMethods = $reflectionObject->getMethods(\ReflectionMethod::IS_PUBLIC); + + $attributes = array(); + foreach ($reflectionMethods as $method) { + if (!$this->isGetMethod($method)) { + continue; + } + + $attributeName = lcfirst(substr($method->name, 0 === strpos($method->name, 'is') ? 2 : 3)); + + if ($this->isAllowedAttribute($object, $attributeName)) { + $attributes[] = $attributeName; + } + } + + return $attributes; + } + + /** + * {@inheritdoc} + */ + protected function getAttributeValue($object, $attribute, $format = null, array $context = array()) + { + $ucfirsted = ucfirst($attribute); + + $getter = 'get'.$ucfirsted; + if (is_callable(array($object, $getter))) { + return $object->$getter(); + } + + $isser = 'is'.$ucfirsted; + if (is_callable(array($object, $isser))) { + return $object->$isser(); + } + } + + /** + * {@inheritdoc} + */ + protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()) + { + $setter = 'set'.ucfirst($attribute); + $key = get_class($object).':'.$setter; + + if (!isset(self::$setterAccessibleCache[$key])) { + self::$setterAccessibleCache[$key] = is_callable(array($object, $setter)) && !(new \ReflectionMethod($object, $setter))->isStatic(); + } + + if (self::$setterAccessibleCache[$key]) { + $object->$setter($value); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..27ccf8023cba36c269eeb83b5e8c57f846bd5c3d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +use Symfony\Component\Serializer\Exception\InvalidArgumentException; +use Symfony\Component\Serializer\Exception\LogicException; + +/** + * A normalizer that uses an objects own JsonSerializable implementation. + * + * @author Fred Cox + */ +class JsonSerializableNormalizer extends AbstractNormalizer +{ + /** + * {@inheritdoc} + */ + public function normalize($object, $format = null, array $context = array()) + { + if ($this->isCircularReference($object, $context)) { + return $this->handleCircularReference($object); + } + + if (!$object instanceof \JsonSerializable) { + throw new InvalidArgumentException(sprintf('The object must implement "%s".', \JsonSerializable::class)); + } + + if (!$this->serializer instanceof NormalizerInterface) { + throw new LogicException('Cannot normalize object because injected serializer is not a normalizer'); + } + + return $this->serializer->normalize($object->jsonSerialize(), $format, $context); + } + + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null) + { + return $data instanceof \JsonSerializable; + } + + /** + * {@inheritdoc} + */ + public function supportsDenormalization($data, $type, $format = null) + { + return false; + } + + /** + * {@inheritdoc} + */ + public function denormalize($data, $class, $format = null, array $context = array()) + { + throw new LogicException(sprintf('Cannot denormalize with "%s".', \JsonSerializable::class)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e19fe5ce58576cb2c2829d6667344fb411ff18dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +/** + * Defines the most basic interface a class must implement to be normalizable. + * + * If a normalizer is registered for the class and it doesn't implement + * the Normalizable interfaces, the normalizer will be used instead. + * + * @author Jordi Boggiano + */ +interface NormalizableInterface +{ + /** + * Normalizes the object into an array of scalars|arrays. + * + * It is important to understand that the normalize() call should normalize + * recursively all child objects of the implementor. + * + * @param NormalizerInterface $normalizer The normalizer is given so that you + * can use it to normalize objects contained within this object. + * @param string|null $format The format is optionally given to be able to normalize differently + * based on different output formats. + * @param array $context Options for normalizing this object + * + * @return array|scalar + */ + public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..55015fe6658b349fd48e9b39ca5921901d9bd03c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareInterface.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\Serializer\Normalizer; + +/** + * Class accepting a normalizer. + * + * @author Joel Wurtz + */ +interface NormalizerAwareInterface +{ + /** + * Sets the owning Normalizer object. + * + * @param NormalizerInterface $normalizer + */ + public function setNormalizer(NormalizerInterface $normalizer); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareTrait.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..7d60587550cb9ade0ed48850e56d4f76df739e44 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareTrait.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +/** + * NormalizerAware trait. + * + * @author Joel Wurtz + */ +trait NormalizerAwareTrait +{ + /** + * @var NormalizerInterface + */ + protected $normalizer; + + /** + * Sets the normalizer. + * + * @param NormalizerInterface $normalizer A NormalizerInterface instance + */ + public function setNormalizer(NormalizerInterface $normalizer) + { + $this->normalizer = $normalizer; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..f7007840da1f4107b4deffceaffc1472a3fc7b7b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +/** + * Defines the interface of normalizers. + * + * @author Jordi Boggiano + */ +interface NormalizerInterface +{ + /** + * Normalizes an object into a set of arrays/scalars. + * + * @param object $object object to normalize + * @param string $format format the normalization result will be encoded as + * @param array $context Context options for the normalizer + * + * @return array|scalar + */ + public function normalize($object, $format = null, array $context = array()); + + /** + * Checks whether the given class is supported for normalization by this normalizer. + * + * @param mixed $data Data to normalize + * @param string $format The format being (de-)serialized from or into + * + * @return bool + */ + public function supportsNormalization($data, $format = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..2c2457b8ac81f8cea7edb7af7cb1013c2cef3708 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Normalizer; + +use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; +use Symfony\Component\PropertyAccess\PropertyAccess; +use Symfony\Component\PropertyAccess\PropertyAccessorInterface; +use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; +use Symfony\Component\Serializer\NameConverter\NameConverterInterface; + +/** + * Converts between objects and arrays using the PropertyAccess component. + * + * @author Kévin Dunglas + */ +class ObjectNormalizer extends AbstractObjectNormalizer +{ + /** + * @var PropertyAccessorInterface + */ + protected $propertyAccessor; + + public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null, PropertyAccessorInterface $propertyAccessor = null, PropertyTypeExtractorInterface $propertyTypeExtractor = null) + { + parent::__construct($classMetadataFactory, $nameConverter, $propertyTypeExtractor); + + $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); + } + + /** + * {@inheritdoc} + */ + protected function extractAttributes($object, $format = null, array $context = array()) + { + // If not using groups, detect manually + $attributes = array(); + + // methods + $reflClass = new \ReflectionClass($object); + foreach ($reflClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflMethod) { + if ( + $reflMethod->getNumberOfRequiredParameters() !== 0 || + $reflMethod->isStatic() || + $reflMethod->isConstructor() || + $reflMethod->isDestructor() + ) { + continue; + } + + $name = $reflMethod->name; + $attributeName = null; + + if (0 === strpos($name, 'get') || 0 === strpos($name, 'has')) { + // getters and hassers + $attributeName = lcfirst(substr($name, 3)); + } elseif (strpos($name, 'is') === 0) { + // issers + $attributeName = lcfirst(substr($name, 2)); + } + + if (null !== $attributeName && $this->isAllowedAttribute($object, $attributeName, $format, $context)) { + $attributes[$attributeName] = true; + } + } + + // properties + foreach ($reflClass->getProperties(\ReflectionProperty::IS_PUBLIC) as $reflProperty) { + if ($reflProperty->isStatic() || !$this->isAllowedAttribute($object, $reflProperty->name, $format, $context)) { + continue; + } + + $attributes[$reflProperty->name] = true; + } + + return array_keys($attributes); + } + + /** + * {@inheritdoc} + */ + protected function getAttributeValue($object, $attribute, $format = null, array $context = array()) + { + return $this->propertyAccessor->getValue($object, $attribute); + } + + /** + * {@inheritdoc} + */ + protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()) + { + try { + $this->propertyAccessor->setValue($object, $attribute, $value); + } catch (NoSuchPropertyException $exception) { + // Properties not found are ignored + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..9795ec4bc85e983a78b4c1083576e7f8340077ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.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\Serializer\Normalizer; + +/** + * Converts between objects and arrays by mapping properties. + * + * The normalization process looks for all the object's properties (public and private). + * The result is a map from property names to property values. Property values + * are normalized through the serializer. + * + * The denormalization first looks at the constructor of the given class to see + * if any of the parameters have the same name as one of the properties. The + * constructor is then called with all parameters or an exception is thrown if + * any required parameters were not present as properties. Then the denormalizer + * walks through the given map of property names to property values to see if a + * property with the corresponding name exists. If found, the property gets the value. + * + * @author Matthieu Napoli + * @author Kévin Dunglas + */ +class PropertyNormalizer extends AbstractObjectNormalizer +{ + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null) + { + return parent::supportsNormalization($data, $format) && $this->supports(get_class($data)); + } + + /** + * {@inheritdoc} + */ + public function supportsDenormalization($data, $type, $format = null) + { + return parent::supportsDenormalization($data, $type, $format) && $this->supports($type); + } + + /** + * Checks if the given class has any non-static property. + * + * @param string $class + * + * @return bool + */ + private function supports($class) + { + $class = new \ReflectionClass($class); + + // We look for at least one non-static property + foreach ($class->getProperties() as $property) { + if (!$property->isStatic()) { + return true; + } + } + + return false; + } + + /** + * {@inheritdoc} + */ + protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = array()) + { + if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { + return false; + } + + try { + $reflectionProperty = new \ReflectionProperty(is_string($classOrObject) ? $classOrObject : get_class($classOrObject), $attribute); + if ($reflectionProperty->isStatic()) { + return false; + } + } catch (\ReflectionException $reflectionException) { + return false; + } + + return true; + } + + /** + * {@inheritdoc} + */ + protected function extractAttributes($object, $format = null, array $context = array()) + { + $reflectionObject = new \ReflectionObject($object); + $attributes = array(); + + foreach ($reflectionObject->getProperties() as $property) { + if (!$this->isAllowedAttribute($object, $property->name)) { + continue; + } + + $attributes[] = $property->name; + } + + return $attributes; + } + + /** + * {@inheritdoc} + */ + protected function getAttributeValue($object, $attribute, $format = null, array $context = array()) + { + try { + $reflectionProperty = new \ReflectionProperty(get_class($object), $attribute); + } catch (\ReflectionException $reflectionException) { + return; + } + + // Override visibility + if (!$reflectionProperty->isPublic()) { + $reflectionProperty->setAccessible(true); + } + + return $reflectionProperty->getValue($object); + } + + /** + * {@inheritdoc} + */ + protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()) + { + try { + $reflectionProperty = new \ReflectionProperty(get_class($object), $attribute); + } catch (\ReflectionException $reflectionException) { + return; + } + + if ($reflectionProperty->isStatic()) { + return; + } + + // Override visibility + if (!$reflectionProperty->isPublic()) { + $reflectionProperty->setAccessible(true); + } + + $reflectionProperty->setValue($object, $value); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/SerializerAwareNormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/SerializerAwareNormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..0480d9ffba98b559c7c741d6bac7017cd27b2650 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Normalizer/SerializerAwareNormalizer.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\Serializer\Normalizer; + +use Symfony\Component\Serializer\SerializerAwareTrait; +use Symfony\Component\Serializer\SerializerAwareInterface; + +/** + * SerializerAware Normalizer implementation. + * + * @author Jordi Boggiano + * + * @deprecated since version 3.1, to be removed in 4.0. Use the SerializerAwareTrait instead. + */ +abstract class SerializerAwareNormalizer implements SerializerAwareInterface +{ + use SerializerAwareTrait; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/README.md b/vendor/symfony/symfony/src/Symfony/Component/Serializer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..14270b5363afb03179ad5708897246ae5548ca19 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/README.md @@ -0,0 +1,16 @@ +Serializer Component +==================== + +With the Serializer component it's possible to handle serializing data +structures, including object graphs, into array structures or other formats like +XML and JSON. It can also handle deserializing XML and JSON back to object +graphs. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/serializer.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/vendor/symfony/symfony/src/Symfony/Component/Serializer/Serializer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Serializer.php new file mode 100644 index 0000000000000000000000000000000000000000..c3e35bb0267cc2288de4c941c09440a649bc8fed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Serializer.php @@ -0,0 +1,285 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer; + +use Symfony\Component\Serializer\Encoder\ChainDecoder; +use Symfony\Component\Serializer\Encoder\ChainEncoder; +use Symfony\Component\Serializer\Encoder\EncoderInterface; +use Symfony\Component\Serializer\Encoder\DecoderInterface; +use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Exception\LogicException; +use Symfony\Component\Serializer\Exception\UnexpectedValueException; + +/** + * Serializer serializes and deserializes data. + * + * objects are turned into arrays by normalizers. + * arrays are turned into various output formats by encoders. + * + * $serializer->serialize($obj, 'xml') + * $serializer->decode($data, 'xml') + * $serializer->denormalize($data, 'Class', 'xml') + * + * @author Jordi Boggiano + * @author Johannes M. Schmitt + * @author Lukas Kahwe Smith + * @author Kévin Dunglas + */ +class Serializer implements SerializerInterface, NormalizerInterface, DenormalizerInterface, EncoderInterface, DecoderInterface +{ + /** + * @var Encoder\ChainEncoder + */ + protected $encoder; + + /** + * @var Encoder\ChainDecoder + */ + protected $decoder; + + /** + * @var array + */ + protected $normalizers = array(); + + /** + * @var array + * + * @deprecated since 3.1 will be removed in 4.0 + */ + protected $normalizerCache = array(); + + /** + * @var array + * + * @deprecated since 3.1 will be removed in 4.0 + */ + protected $denormalizerCache = array(); + + public function __construct(array $normalizers = array(), array $encoders = array()) + { + foreach ($normalizers as $normalizer) { + if ($normalizer instanceof SerializerAwareInterface) { + $normalizer->setSerializer($this); + } + + if ($normalizer instanceof DenormalizerAwareInterface) { + $normalizer->setDenormalizer($this); + } + + if ($normalizer instanceof NormalizerAwareInterface) { + $normalizer->setNormalizer($this); + } + } + $this->normalizers = $normalizers; + + $decoders = array(); + $realEncoders = array(); + foreach ($encoders as $encoder) { + if ($encoder instanceof SerializerAwareInterface) { + $encoder->setSerializer($this); + } + if ($encoder instanceof DecoderInterface) { + $decoders[] = $encoder; + } + if ($encoder instanceof EncoderInterface) { + $realEncoders[] = $encoder; + } + } + $this->encoder = new ChainEncoder($realEncoders); + $this->decoder = new ChainDecoder($decoders); + } + + /** + * {@inheritdoc} + */ + final public function serialize($data, $format, array $context = array()) + { + if (!$this->supportsEncoding($format)) { + throw new UnexpectedValueException(sprintf('Serialization for the format %s is not supported', $format)); + } + + if ($this->encoder->needsNormalization($format)) { + $data = $this->normalize($data, $format, $context); + } + + return $this->encode($data, $format, $context); + } + + /** + * {@inheritdoc} + */ + final public function deserialize($data, $type, $format, array $context = array()) + { + if (!$this->supportsDecoding($format)) { + throw new UnexpectedValueException(sprintf('Deserialization for the format %s is not supported', $format)); + } + + $data = $this->decode($data, $format, $context); + + return $this->denormalize($data, $type, $format, $context); + } + + /** + * {@inheritdoc} + */ + public function normalize($data, $format = null, array $context = array()) + { + // If a normalizer supports the given data, use it + if ($normalizer = $this->getNormalizer($data, $format)) { + return $normalizer->normalize($data, $format, $context); + } + + if (null === $data || is_scalar($data)) { + return $data; + } + + if (is_array($data) || $data instanceof \Traversable) { + $normalized = array(); + foreach ($data as $key => $val) { + $normalized[$key] = $this->normalize($val, $format, $context); + } + + return $normalized; + } + + if (is_object($data)) { + if (!$this->normalizers) { + throw new LogicException('You must register at least one normalizer to be able to normalize objects.'); + } + + throw new UnexpectedValueException(sprintf('Could not normalize object of type %s, no supporting normalizer found.', get_class($data))); + } + + throw new UnexpectedValueException(sprintf('An unexpected value could not be normalized: %s', var_export($data, true))); + } + + /** + * {@inheritdoc} + */ + public function denormalize($data, $type, $format = null, array $context = array()) + { + return $this->denormalizeObject($data, $type, $format, $context); + } + + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null) + { + return null !== $this->getNormalizer($data, $format); + } + + /** + * {@inheritdoc} + */ + public function supportsDenormalization($data, $type, $format = null) + { + return null !== $this->getDenormalizer($data, $type, $format); + } + + /** + * Returns a matching normalizer. + * + * @param mixed $data Data to get the serializer for + * @param string $format format name, present to give the option to normalizers to act differently based on formats + * + * @return NormalizerInterface|null + */ + private function getNormalizer($data, $format) + { + foreach ($this->normalizers as $normalizer) { + if ($normalizer instanceof NormalizerInterface && $normalizer->supportsNormalization($data, $format)) { + return $normalizer; + } + } + } + + /** + * Returns a matching denormalizer. + * + * @param mixed $data data to restore + * @param string $class the expected class to instantiate + * @param string $format format name, present to give the option to normalizers to act differently based on formats + * + * @return DenormalizerInterface|null + */ + private function getDenormalizer($data, $class, $format) + { + foreach ($this->normalizers as $normalizer) { + if ($normalizer instanceof DenormalizerInterface && $normalizer->supportsDenormalization($data, $class, $format)) { + return $normalizer; + } + } + } + + /** + * {@inheritdoc} + */ + final public function encode($data, $format, array $context = array()) + { + return $this->encoder->encode($data, $format, $context); + } + + /** + * {@inheritdoc} + */ + final public function decode($data, $format, array $context = array()) + { + return $this->decoder->decode($data, $format, $context); + } + + /** + * Denormalizes data back into an object of the given class. + * + * @param mixed $data data to restore + * @param string $class the expected class to instantiate + * @param string $format format name, present to give the option to normalizers to act differently based on formats + * @param array $context The context data for this particular denormalization + * + * @return object + * + * @throws LogicException + * @throws UnexpectedValueException + */ + private function denormalizeObject($data, $class, $format, array $context = array()) + { + if (!$this->normalizers) { + throw new LogicException('You must register at least one normalizer to be able to denormalize objects.'); + } + + if ($normalizer = $this->getDenormalizer($data, $class, $format)) { + return $normalizer->denormalize($data, $class, $format, $context); + } + + throw new UnexpectedValueException(sprintf('Could not denormalize object of type %s, no supporting normalizer found.', $class)); + } + + /** + * {@inheritdoc} + */ + public function supportsEncoding($format) + { + return $this->encoder->supportsEncoding($format); + } + + /** + * {@inheritdoc} + */ + public function supportsDecoding($format) + { + return $this->decoder->supportsDecoding($format); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerAwareInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerAwareInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..dd0a62e7fa88735bd2b4f0ebecff67aeb640bb48 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerAwareInterface.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\Serializer; + +/** + * Defines the interface of encoders. + * + * @author Jordi Boggiano + */ +interface SerializerAwareInterface +{ + /** + * Sets the owning Serializer object. + * + * @param SerializerInterface $serializer + */ + public function setSerializer(SerializerInterface $serializer); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerAwareTrait.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerAwareTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..7f5839eef3e6d163dcaddb41351cc3e07a35fded --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerAwareTrait.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer; + +/** + * SerializerAware trait. + * + * @author Joel Wurtz + */ +trait SerializerAwareTrait +{ + /** + * @var SerializerInterface + */ + protected $serializer; + + /** + * Sets the serializer. + * + * @param SerializerInterface $serializer A SerializerInterface instance + */ + public function setSerializer(SerializerInterface $serializer) + { + $this->serializer = $serializer; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c79db91892075068a5d75ea69b6e191f86ab78d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/SerializerInterface.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\Component\Serializer; + +/** + * Defines the interface of the Serializer. + * + * @author Jordi Boggiano + */ +interface SerializerInterface +{ + /** + * Serializes data in the appropriate format. + * + * @param mixed $data any data + * @param string $format format name + * @param array $context options normalizers/encoders have access to + * + * @return string + */ + public function serialize($data, $format, array $context = array()); + + /** + * Deserializes data into the given type. + * + * @param mixed $data + * @param string $type + * @param string $format + * @param array $context + * + * @return object + */ + public function deserialize($data, $type, $format, array $context = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/GroupsTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/GroupsTest.php new file mode 100644 index 0000000000000000000000000000000000000000..348ad14619148de3b1fd2b984518c2b88b746872 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/GroupsTest.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\Component\Serializer\Tests\Annotation; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Annotation\Groups; + +/** + * @author Kévin Dunglas + */ +class GroupsTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException + */ + public function testEmptyGroupsParameter() + { + new Groups(array('value' => array())); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException + */ + public function testNotAnArrayGroupsParameter() + { + new Groups(array('value' => 'coopTilleuls')); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException + */ + public function testInvalidGroupsParameter() + { + new Groups(array('value' => array('a', 1, new \stdClass()))); + } + + public function testGroupsParameters() + { + $validData = array('a', 'b'); + + $groups = new Groups(array('value' => $validData)); + $this->assertEquals($validData, $groups->getGroups()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4554fc9905ca674a6f609ebdd9e2ab3be206a402 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Annotation; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Annotation\MaxDepth; + +/** + * @author Kévin Dunglas + */ +class MaxDepthTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException + * @expectedExceptionMessage Parameter of annotation "Symfony\Component\Serializer\Annotation\MaxDepth" should be set. + */ + public function testNotSetMaxDepthParameter() + { + new MaxDepth(array()); + } + + public function provideInvalidValues() + { + return array( + array(''), + array('foo'), + array('1'), + array(0), + ); + } + + /** + * @dataProvider provideInvalidValues + * + * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException + * @expectedExceptionMessage Parameter of annotation "Symfony\Component\Serializer\Annotation\MaxDepth" must be a positive integer. + */ + public function testNotAnIntMaxDepthParameter($value) + { + new MaxDepth(array('value' => $value)); + } + + public function testMaxDepthParameters() + { + $maxDepth = new MaxDepth(array('value' => 3)); + $this->assertEquals(3, $maxDepth->getMaxDepth()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f4fb882ef47927ca18cff95f9c7d07c05aa82dd2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Encoder\ChainDecoder; + +class ChainDecoderTest extends TestCase +{ + const FORMAT_1 = 'format1'; + const FORMAT_2 = 'format2'; + const FORMAT_3 = 'format3'; + + private $chainDecoder; + private $decoder1; + private $decoder2; + + protected function setUp() + { + $this->decoder1 = $this + ->getMockBuilder('Symfony\Component\Serializer\Encoder\DecoderInterface') + ->getMock(); + + $this->decoder1 + ->method('supportsDecoding') + ->will($this->returnValueMap(array( + array(self::FORMAT_1, true), + array(self::FORMAT_2, false), + array(self::FORMAT_3, false), + ))); + + $this->decoder2 = $this + ->getMockBuilder('Symfony\Component\Serializer\Encoder\DecoderInterface') + ->getMock(); + + $this->decoder2 + ->method('supportsDecoding') + ->will($this->returnValueMap(array( + array(self::FORMAT_1, false), + array(self::FORMAT_2, true), + array(self::FORMAT_3, false), + ))); + + $this->chainDecoder = new ChainDecoder(array($this->decoder1, $this->decoder2)); + } + + public function testSupportsDecoding() + { + $this->assertTrue($this->chainDecoder->supportsDecoding(self::FORMAT_1)); + $this->assertTrue($this->chainDecoder->supportsDecoding(self::FORMAT_2)); + $this->assertFalse($this->chainDecoder->supportsDecoding(self::FORMAT_3)); + } + + public function testDecode() + { + $this->decoder1->expects($this->never())->method('decode'); + $this->decoder2->expects($this->once())->method('decode'); + + $this->chainDecoder->decode('string_to_decode', self::FORMAT_2); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\RuntimeException + */ + public function testDecodeUnsupportedFormat() + { + $this->chainDecoder->decode('string_to_decode', self::FORMAT_3); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2bdce84080fe18f9ee16de3e0a6aa65b11fe0102 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php @@ -0,0 +1,130 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Encoder\ChainEncoder; +use Symfony\Component\Serializer\Encoder\NormalizationAwareInterface; + +class ChainEncoderTest extends TestCase +{ + const FORMAT_1 = 'format1'; + const FORMAT_2 = 'format2'; + const FORMAT_3 = 'format3'; + + private $chainEncoder; + private $encoder1; + private $encoder2; + + protected function setUp() + { + $this->encoder1 = $this + ->getMockBuilder('Symfony\Component\Serializer\Encoder\EncoderInterface') + ->getMock(); + + $this->encoder1 + ->method('supportsEncoding') + ->will($this->returnValueMap(array( + array(self::FORMAT_1, true), + array(self::FORMAT_2, false), + array(self::FORMAT_3, false), + ))); + + $this->encoder2 = $this + ->getMockBuilder('Symfony\Component\Serializer\Encoder\EncoderInterface') + ->getMock(); + + $this->encoder2 + ->method('supportsEncoding') + ->will($this->returnValueMap(array( + array(self::FORMAT_1, false), + array(self::FORMAT_2, true), + array(self::FORMAT_3, false), + ))); + + $this->chainEncoder = new ChainEncoder(array($this->encoder1, $this->encoder2)); + } + + public function testSupportsEncoding() + { + $this->assertTrue($this->chainEncoder->supportsEncoding(self::FORMAT_1)); + $this->assertTrue($this->chainEncoder->supportsEncoding(self::FORMAT_2)); + $this->assertFalse($this->chainEncoder->supportsEncoding(self::FORMAT_3)); + } + + public function testEncode() + { + $this->encoder1->expects($this->never())->method('encode'); + $this->encoder2->expects($this->once())->method('encode'); + + $this->chainEncoder->encode(array('foo' => 123), self::FORMAT_2); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\RuntimeException + */ + public function testEncodeUnsupportedFormat() + { + $this->chainEncoder->encode(array('foo' => 123), self::FORMAT_3); + } + + public function testNeedsNormalizationBasic() + { + $this->assertTrue($this->chainEncoder->needsNormalization(self::FORMAT_1)); + $this->assertTrue($this->chainEncoder->needsNormalization(self::FORMAT_2)); + } + + /** + * @dataProvider booleanProvider + */ + public function testNeedsNormalizationChainNormalizationAware($bool) + { + $chainEncoder = $this + ->getMockBuilder('Symfony\Component\Serializer\Tests\Encoder\ChainNormalizationAwareEncoder') + ->getMock(); + + $chainEncoder->method('supportsEncoding')->willReturn(true); + $chainEncoder->method('needsNormalization')->willReturn($bool); + + $sut = new ChainEncoder(array($chainEncoder)); + + $this->assertEquals($bool, $sut->needsNormalization(self::FORMAT_1)); + } + + public function testNeedsNormalizationNormalizationAware() + { + $encoder = new NormalizationAwareEncoder(); + $sut = new ChainEncoder(array($encoder)); + + $this->assertFalse($sut->needsNormalization(self::FORMAT_1)); + } + + public function booleanProvider() + { + return array( + array(true), + array(false), + ); + } +} + +class ChainNormalizationAwareEncoder extends ChainEncoder implements NormalizationAwareInterface +{ +} + +class NormalizationAwareEncoder implements NormalizationAwareInterface +{ + public function supportsEncoding($format) + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e4663ce8dddd4d05daaa57b90e4e01ed1368f64e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php @@ -0,0 +1,232 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Encoder\CsvEncoder; + +/** + * @author Kévin Dunglas + */ +class CsvEncoderTest extends TestCase +{ + /** + * @var CsvEncoder + */ + private $encoder; + + protected function setUp() + { + $this->encoder = new CsvEncoder(); + } + + public function testSupportEncoding() + { + $this->assertTrue($this->encoder->supportsEncoding('csv')); + $this->assertFalse($this->encoder->supportsEncoding('foo')); + } + + public function testEncode() + { + $value = array('foo' => 'hello', 'bar' => 'hey ho'); + + $this->assertEquals(<<<'CSV' +foo,bar +hello,"hey ho" + +CSV + , $this->encoder->encode($value, 'csv')); + } + + public function testEncodeCollection() + { + $value = array( + array('foo' => 'hello', 'bar' => 'hey ho'), + array('foo' => 'hi', 'bar' => 'let\'s go'), + ); + + $this->assertEquals(<<<'CSV' +foo,bar +hello,"hey ho" +hi,"let's go" + +CSV + , $this->encoder->encode($value, 'csv')); + } + + public function testEncodePlainIndexedArray() + { + $this->assertEquals(<<<'CSV' +0,1,2 +a,b,c + +CSV + , $this->encoder->encode(array('a', 'b', 'c'), 'csv')); + } + + public function testEncodeNonArray() + { + $this->assertEquals(<<<'CSV' +0 +foo + +CSV + , $this->encoder->encode('foo', 'csv')); + } + + public function testEncodeNestedArrays() + { + $value = array('foo' => 'hello', 'bar' => array( + array('id' => 'yo', 1 => 'wesh'), + array('baz' => 'Halo', 'foo' => 'olá'), + )); + + $this->assertEquals(<<<'CSV' +foo,bar.0.id,bar.0.1,bar.1.baz,bar.1.foo +hello,yo,wesh,Halo,olá + +CSV + , $this->encoder->encode($value, 'csv')); + } + + public function testEncodeCustomSettings() + { + $this->encoder = new CsvEncoder(';', "'", '|', '-'); + + $value = array('a' => 'he\'llo', 'c' => array('d' => 'foo')); + + $this->assertEquals(<<<'CSV' +a;c-d +'he''llo';foo + +CSV + , $this->encoder->encode($value, 'csv')); + } + + public function testEncodeEmptyArray() + { + $this->assertEquals("\n\n", $this->encoder->encode(array(), 'csv')); + $this->assertEquals("\n\n", $this->encoder->encode(array(array()), 'csv')); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException + */ + public function testEncodeNonFlattenableStructure() + { + $this->encoder->encode(array(array('a' => array('foo', 'bar')), array('a' => array())), 'csv'); + } + + public function testSupportsDecoding() + { + $this->assertTrue($this->encoder->supportsDecoding('csv')); + $this->assertFalse($this->encoder->supportsDecoding('foo')); + } + + public function testDecode() + { + $expected = array('foo' => 'a', 'bar' => 'b'); + + $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' +foo,bar +a,b +CSV + , 'csv')); + } + + public function testDecodeCollection() + { + $expected = array( + array('foo' => 'a', 'bar' => 'b'), + array('foo' => 'c', 'bar' => 'd'), + array('foo' => 'f'), + ); + + $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' +foo,bar +a,b +c,d +f + +CSV + , 'csv')); + } + + public function testDecodeToManyRelation() + { + $expected = array( + array('foo' => 'bar', 'relations' => array(array('a' => 'b'), array('a' => 'b'))), + array('foo' => 'bat', 'relations' => array(array('a' => 'b'), array('a' => ''))), + array('foo' => 'bat', 'relations' => array(array('a' => 'b'))), + array('foo' => 'baz', 'relations' => array(array('a' => 'c'), array('a' => 'c'))), + ); + + $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' +foo,relations.0.a,relations.1.a +bar,b,b +bat,b, +bat,b +baz,c,c +CSV + , 'csv')); + } + + public function testDecodeNestedArrays() + { + $expected = array( + array('foo' => 'a', 'bar' => array('baz' => array('bat' => 'b'))), + array('foo' => 'c', 'bar' => array('baz' => array('bat' => 'd'))), + ); + + $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' +foo,bar.baz.bat +a,b +c,d +CSV + , 'csv')); + } + + public function testDecodeCustomSettings() + { + $this->encoder = new CsvEncoder(';', "'", '|', '-'); + + $expected = array('a' => 'hell\'o', 'bar' => array('baz' => 'b')); + $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' +a;bar-baz +'hell''o';b;c +CSV + , 'csv')); + } + + public function testDecodeMalformedCollection() + { + $expected = array( + array('foo' => 'a', 'bar' => 'b'), + array('foo' => 'c', 'bar' => 'd'), + array('foo' => 'f'), + ); + + $this->assertEquals($expected, $this->encoder->decode(<<<'CSV' +foo,bar +a,b,e +c,d,g,h +f + +CSV + , 'csv')); + } + + public function testDecodeEmptyArray() + { + $this->assertEquals(array(), $this->encoder->decode('', 'csv')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..774064d43a8537ed85b8fcf4b27197d0bb3e2150 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Encoder\JsonDecode; +use Symfony\Component\Serializer\Encoder\JsonEncoder; + +class JsonDecodeTest extends TestCase +{ + /** @var \Symfony\Component\Serializer\Encoder\JsonDecode */ + private $decode; + + protected function setUp() + { + $this->decode = new JsonDecode(); + } + + public function testSupportsDecoding() + { + $this->assertTrue($this->decode->supportsDecoding(JsonEncoder::FORMAT)); + $this->assertFalse($this->decode->supportsDecoding('foobar')); + } + + /** + * @dataProvider decodeProvider + */ + public function testDecode($toDecode, $expected, $context) + { + $this->assertEquals( + $expected, + $this->decode->decode($toDecode, JsonEncoder::FORMAT, $context) + ); + } + + public function decodeProvider() + { + $stdClass = new \stdClass(); + $stdClass->foo = 'bar'; + + $assoc = array('foo' => 'bar'); + + return array( + array('{"foo": "bar"}', $stdClass, array()), + array('{"foo": "bar"}', $assoc, array('json_decode_associative' => true)), + ); + } + + /** + * @requires function json_last_error_msg + * @dataProvider decodeProviderException + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testDecodeWithException($value) + { + $this->decode->decode($value, JsonEncoder::FORMAT); + } + + public function decodeProviderException() + { + return array( + array("{'foo': 'bar'}"), + array('kaboom!'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ed33233fb47ea4686212e534eab7d65fef389740 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Encoder\JsonEncode; +use Symfony\Component\Serializer\Encoder\JsonEncoder; + +class JsonEncodeTest extends TestCase +{ + private $encoder; + + protected function setUp() + { + $this->encode = new JsonEncode(); + } + + public function testSupportsEncoding() + { + $this->assertTrue($this->encode->supportsEncoding(JsonEncoder::FORMAT)); + $this->assertFalse($this->encode->supportsEncoding('foobar')); + } + + /** + * @dataProvider encodeProvider + */ + public function testEncode($toEncode, $expected, $context) + { + $this->assertEquals( + $expected, + $this->encode->encode($toEncode, JsonEncoder::FORMAT, $context) + ); + } + + public function encodeProvider() + { + return array( + array(array(), '[]', array()), + array(array(), '{}', array('json_encode_options' => JSON_FORCE_OBJECT)), + ); + } + + /** + * @requires function json_last_error_msg + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testEncodeWithError() + { + $this->encode->encode("\xB1\x31", JsonEncoder::FORMAT); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ad8d57065f7213796bc79f33f9c10e081d40c9af --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Encoder\JsonEncoder; +use Symfony\Component\Serializer\Serializer; +use Symfony\Component\Serializer\Normalizer\CustomNormalizer; + +class JsonEncoderTest extends TestCase +{ + private $encoder; + private $serializer; + + protected function setUp() + { + $this->encoder = new JsonEncoder(); + $this->serializer = new Serializer(array(new CustomNormalizer()), array('json' => new JsonEncoder())); + } + + public function testEncodeScalar() + { + $obj = new \stdClass(); + $obj->foo = 'foo'; + + $expected = '{"foo":"foo"}'; + + $this->assertEquals($expected, $this->encoder->encode($obj, 'json')); + } + + public function testComplexObject() + { + $obj = $this->getObject(); + + $expected = $this->getJsonSource(); + + $this->assertEquals($expected, $this->encoder->encode($obj, 'json')); + } + + public function testOptions() + { + $context = array('json_encode_options' => JSON_NUMERIC_CHECK); + + $arr = array(); + $arr['foo'] = '3'; + + $expected = '{"foo":3}'; + + $this->assertEquals($expected, $this->serializer->serialize($arr, 'json', $context)); + + $arr = array(); + $arr['foo'] = '3'; + + $expected = '{"foo":"3"}'; + + $this->assertEquals($expected, $this->serializer->serialize($arr, 'json'), 'Context should not be persistent'); + } + + protected function getJsonSource() + { + return '{"foo":"foo","bar":["a","b"],"baz":{"key":"val","key2":"val","A B":"bar","item":[{"title":"title1"},{"title":"title2"}],"Barry":{"FooBar":{"Baz":"Ed","@id":1}}},"qux":"1"}'; + } + + protected function getObject() + { + $obj = new \stdClass(); + $obj->foo = 'foo'; + $obj->bar = array('a', 'b'); + $obj->baz = array('key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => array(array('title' => 'title1'), array('title' => 'title2')), 'Barry' => array('FooBar' => array('Baz' => 'Ed', '@id' => 1))); + $obj->qux = '1'; + + return $obj; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4e83f3464f2006e9eea5ad2ffb66f1ed116a6144 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php @@ -0,0 +1,623 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Tests\Fixtures\Dummy; +use Symfony\Component\Serializer\Tests\Fixtures\NormalizableTraversableDummy; +use Symfony\Component\Serializer\Tests\Fixtures\ScalarDummy; +use Symfony\Component\Serializer\Encoder\XmlEncoder; +use Symfony\Component\Serializer\Serializer; +use Symfony\Component\Serializer\Exception\UnexpectedValueException; +use Symfony\Component\Serializer\Normalizer\CustomNormalizer; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; + +class XmlEncoderTest extends TestCase +{ + /** + * @var XmlEncoder + */ + private $encoder; + + private $exampleDateTimeString = '2017-02-19T15:16:08+0300'; + + protected function setUp() + { + $this->encoder = new XmlEncoder(); + $serializer = new Serializer(array(new CustomNormalizer()), array('xml' => new XmlEncoder())); + $this->encoder->setSerializer($serializer); + } + + public function testEncodeScalar() + { + $obj = new ScalarDummy(); + $obj->xmlFoo = 'foo'; + + $expected = ''."\n". + 'foo'."\n"; + + $this->assertEquals($expected, $this->encoder->encode($obj, 'xml')); + } + + public function testSetRootNodeName() + { + $obj = new ScalarDummy(); + $obj->xmlFoo = 'foo'; + + $this->encoder->setRootNodeName('test'); + $expected = ''."\n". + 'foo'."\n"; + + $this->assertEquals($expected, $this->encoder->encode($obj, 'xml')); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + * @expectedExceptionMessage Document types are not allowed. + */ + public function testDocTypeIsNotAllowed() + { + $this->encoder->decode('', 'foo'); + } + + public function testAttributes() + { + $obj = new ScalarDummy(); + $obj->xmlFoo = array( + 'foo-bar' => array( + '@id' => 1, + '@name' => 'Bar', + ), + 'Foo' => array( + 'Bar' => 'Test', + '@Type' => 'test', + ), + 'föo_bär' => 'a', + 'Bar' => array(1, 2, 3), + 'a' => 'b', + ); + $expected = ''."\n". + ''. + ''. + 'Test'. + 'a'. + '1'. + '2'. + '3'. + 'b'. + ''."\n"; + $this->assertEquals($expected, $this->encoder->encode($obj, 'xml')); + } + + public function testElementNameValid() + { + $obj = new ScalarDummy(); + $obj->xmlFoo = array( + 'foo-bar' => 'a', + 'foo_bar' => 'a', + 'föo_bär' => 'a', + ); + + $expected = ''."\n". + ''. + 'a'. + 'a'. + 'a'. + ''."\n"; + + $this->assertEquals($expected, $this->encoder->encode($obj, 'xml')); + } + + public function testEncodeSimpleXML() + { + $xml = simplexml_load_string('Peter'); + $array = array('person' => $xml); + + $expected = ''."\n". + 'Peter'."\n"; + + $this->assertEquals($expected, $this->encoder->encode($array, 'xml')); + } + + public function testEncodeXmlAttributes() + { + $xml = simplexml_load_string('Peter'); + $array = array('person' => $xml); + + $expected = ''."\n". + 'Peter'."\n"; + + $context = array( + 'xml_version' => '1.1', + 'xml_encoding' => 'utf-8', + 'xml_standalone' => true, + ); + + $this->assertSame($expected, $this->encoder->encode($array, 'xml', $context)); + } + + public function testContext() + { + $array = array('person' => array('name' => 'George Abitbol')); + $expected = <<<'XML' + + + + George Abitbol + + + +XML; + + $context = array( + 'xml_format_output' => true, + ); + + $this->assertSame($expected, $this->encoder->encode($array, 'xml', $context)); + } + + public function testEncodeScalarRootAttributes() + { + $array = array( + '#' => 'Paul', + '@gender' => 'm', + ); + + $expected = ''."\n". + 'Paul'."\n"; + + $this->assertEquals($expected, $this->encoder->encode($array, 'xml')); + } + + public function testEncodeRootAttributes() + { + $array = array( + 'firstname' => 'Paul', + '@gender' => 'm', + ); + + $expected = ''."\n". + 'Paul'."\n"; + + $this->assertEquals($expected, $this->encoder->encode($array, 'xml')); + } + + public function testEncodeCdataWrapping() + { + $array = array( + 'firstname' => 'Paul ', + ); + + $expected = ''."\n". + ']]>'."\n"; + + $this->assertEquals($expected, $this->encoder->encode($array, 'xml')); + } + + public function testEncodeScalarWithAttribute() + { + $array = array( + 'person' => array('@gender' => 'M', '#' => 'Peter'), + ); + + $expected = ''."\n". + 'Peter'."\n"; + + $this->assertEquals($expected, $this->encoder->encode($array, 'xml')); + } + + public function testDecodeScalar() + { + $source = ''."\n". + 'foo'."\n"; + + $this->assertEquals('foo', $this->encoder->decode($source, 'xml')); + } + + public function testEncode() + { + $source = $this->getXmlSource(); + $obj = $this->getObject(); + + $this->assertEquals($source, $this->encoder->encode($obj, 'xml')); + } + + public function testEncodeWithNamespace() + { + $source = $this->getNamespacedXmlSource(); + $array = $this->getNamespacedArray(); + + $this->assertEquals($source, $this->encoder->encode($array, 'xml')); + } + + public function testEncodeSerializerXmlRootNodeNameOption() + { + $options = array('xml_root_node_name' => 'test'); + $this->encoder = new XmlEncoder(); + $serializer = new Serializer(array(), array('xml' => new XmlEncoder())); + $this->encoder->setSerializer($serializer); + + $array = array( + 'person' => array('@gender' => 'M', '#' => 'Peter'), + ); + + $expected = ''."\n". + 'Peter'."\n"; + + $this->assertEquals($expected, $serializer->serialize($array, 'xml', $options)); + } + + public function testEncodeTraversableWhenNormalizable() + { + $this->encoder = new XmlEncoder(); + $serializer = new Serializer(array(new CustomNormalizer()), array('xml' => new XmlEncoder())); + $this->encoder->setSerializer($serializer); + + $expected = <<<'XML' + +normalizedFoonormalizedBar + +XML; + + $this->assertEquals($expected, $serializer->serialize(new NormalizableTraversableDummy(), 'xml')); + } + + public function testDecode() + { + $source = $this->getXmlSource(); + $obj = $this->getObject(); + + $this->assertEquals(get_object_vars($obj), $this->encoder->decode($source, 'xml')); + } + + public function testDecodeCdataWrapping() + { + $expected = array( + 'firstname' => 'Paul ', + ); + + $xml = ''."\n". + ']]>'."\n"; + + $this->assertEquals($expected, $this->encoder->decode($xml, 'xml')); + } + + public function testDecodeCdataWrappingAndWhitespace() + { + $expected = array( + 'firstname' => 'Paul ', + ); + + $xml = ''."\n". + ''."\n". + ']]>'."\n"; + + $this->assertEquals($expected, $this->encoder->decode($xml, 'xml')); + } + + public function testDecodeWithNamespace() + { + $source = $this->getNamespacedXmlSource(); + $array = $this->getNamespacedArray(); + + $this->assertEquals($array, $this->encoder->decode($source, 'xml')); + } + + public function testDecodeScalarWithAttribute() + { + $source = ''."\n". + 'Peter'."\n"; + + $expected = array( + 'person' => array('@gender' => 'M', '#' => 'Peter'), + ); + + $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); + } + + public function testDecodeScalarRootAttributes() + { + $source = ''."\n". + 'Peter'."\n"; + + $expected = array( + '#' => 'Peter', + '@gender' => 'M', + ); + + $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); + } + + public function testDecodeRootAttributes() + { + $source = ''."\n". + 'PeterMac Calloway'."\n"; + + $expected = array( + 'firstname' => 'Peter', + 'lastname' => 'Mac Calloway', + '@gender' => 'M', + ); + + $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); + } + + public function testDecodeArray() + { + $source = ''."\n". + ''. + ''. + 'BenjaminAlexandre'. + 'DamienClay'. + ''. + ''."\n"; + + $expected = array( + 'people' => array('person' => array( + array('firstname' => 'Benjamin', 'lastname' => 'Alexandre'), + array('firstname' => 'Damien', 'lastname' => 'Clay'), + )), + ); + + $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); + } + + public function testDecodeIgnoreWhiteSpace() + { + $source = <<<'XML' + + + + Benjamin + Alexandre + + + Damien + Clay + + +XML; + $expected = array('person' => array( + array('firstname' => 'Benjamin', 'lastname' => 'Alexandre'), + array('firstname' => 'Damien', 'lastname' => 'Clay'), + )); + + $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); + } + + public function testDecodeWithoutItemHash() + { + $obj = new ScalarDummy(); + $obj->xmlFoo = array( + 'foo-bar' => array( + '@key' => 'value', + 'item' => array('@key' => 'key', 'key-val' => 'val'), + ), + 'Foo' => array( + 'Bar' => 'Test', + '@Type' => 'test', + ), + 'föo_bär' => 'a', + 'Bar' => array(1, 2, 3), + 'a' => 'b', + ); + $expected = array( + 'foo-bar' => array( + '@key' => 'value', + 'key' => array('@key' => 'key', 'key-val' => 'val'), + ), + 'Foo' => array( + 'Bar' => 'Test', + '@Type' => 'test', + ), + 'föo_bär' => 'a', + 'Bar' => array(1, 2, 3), + 'a' => 'b', + ); + $xml = $this->encoder->encode($obj, 'xml'); + $this->assertEquals($expected, $this->encoder->decode($xml, 'xml')); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testDecodeInvalidXml() + { + $this->encoder->decode('', 'xml'); + } + + public function testPreventsComplexExternalEntities() + { + $oldCwd = getcwd(); + chdir(__DIR__); + + try { + $this->encoder->decode(']>&test;', 'xml'); + chdir($oldCwd); + + $this->fail('No exception was thrown.'); + } catch (\Exception $e) { + chdir($oldCwd); + + if (!$e instanceof UnexpectedValueException) { + $this->fail('Expected UnexpectedValueException'); + } + } + } + + public function testDecodeEmptyXml() + { + if (method_exists($this, 'expectException')) { + $this->expectException('Symfony\Component\Serializer\Exception\UnexpectedValueException'); + $this->expectExceptionMessage('Invalid XML data, it can not be empty.'); + } else { + $this->setExpectedException('Symfony\Component\Serializer\Exception\UnexpectedValueException', 'Invalid XML data, it can not be empty.'); + } + $this->encoder->decode(' ', 'xml'); + } + + protected function getXmlSource() + { + return ''."\n". + ''. + 'foo'. + 'ab'. + 'valvalbar'. + 'title1title2'. + 'Ed'. + '1'. + ''."\n"; + } + + protected function getNamespacedXmlSource() + { + return ''."\n". + ''. + '1'. + 'foo'. + 'ab'. + 'valvalbar'. + 'title1title2'. + 'Ed'. + ''."\n"; + } + + protected function getNamespacedArray() + { + return array( + '@xmlns' => 'http://www.w3.org/2005/Atom', + '@xmlns:app' => 'http://www.w3.org/2007/app', + '@xmlns:media' => 'http://search.yahoo.com/mrss/', + '@xmlns:gd' => 'http://schemas.google.com/g/2005', + '@xmlns:yt' => 'http://gdata.youtube.com/schemas/2007', + 'qux' => '1', + 'app:foo' => 'foo', + 'yt:bar' => array('a', 'b'), + 'media:baz' => array( + 'media:key' => 'val', + 'media:key2' => 'val', + 'A B' => 'bar', + 'item' => array( + array( + 'title' => 'title1', + ), + array( + 'title' => 'title2', + ), + ), + 'Barry' => array( + '@size' => 'large', + 'FooBar' => array( + 'Baz' => 'Ed', + '@gd:id' => 1, + ), + ), + ), + ); + } + + protected function getObject() + { + $obj = new Dummy(); + $obj->foo = 'foo'; + $obj->bar = array('a', 'b'); + $obj->baz = array('key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => array(array('title' => 'title1'), array('title' => 'title2')), 'Barry' => array('FooBar' => array('Baz' => 'Ed', '@id' => 1))); + $obj->qux = '1'; + + return $obj; + } + + public function testEncodeXmlWithBoolValue() + { + $expectedXml = <<<'XML' + +10 + +XML; + + $actualXml = $this->encoder->encode(array('foo' => true, 'bar' => false), 'xml'); + + $this->assertEquals($expectedXml, $actualXml); + } + + public function testEncodeXmlWithDateTimeObjectValue() + { + $xmlEncoder = $this->createXmlEncoderWithDateTimeNormalizer(); + + $actualXml = $xmlEncoder->encode(array('dateTime' => new \DateTime($this->exampleDateTimeString)), 'xml'); + + $this->assertEquals($this->createXmlWithDateTime(), $actualXml); + } + + public function testEncodeXmlWithDateTimeObjectField() + { + $xmlEncoder = $this->createXmlEncoderWithDateTimeNormalizer(); + + $actualXml = $xmlEncoder->encode(array('foo' => array('@dateTime' => new \DateTime($this->exampleDateTimeString))), 'xml'); + + $this->assertEquals($this->createXmlWithDateTimeField(), $actualXml); + } + + /** + * @return XmlEncoder + */ + private function createXmlEncoderWithDateTimeNormalizer() + { + $encoder = new XmlEncoder(); + $serializer = new Serializer(array($this->createMockDateTimeNormalizer()), array('xml' => new XmlEncoder())); + $encoder->setSerializer($serializer); + + return $encoder; + } + + /** + * @return \PHPUnit_Framework_MockObject_MockObject|NormalizerInterface + */ + private function createMockDateTimeNormalizer() + { + $mock = $this->getMockBuilder('\Symfony\Component\Serializer\Normalizer\CustomNormalizer')->getMock(); + + $mock + ->expects($this->once()) + ->method('normalize') + ->with(new \DateTime($this->exampleDateTimeString), 'xml', array()) + ->willReturn($this->exampleDateTimeString); + + $mock + ->expects($this->once()) + ->method('supportsNormalization') + ->with(new \DateTime($this->exampleDateTimeString), 'xml') + ->willReturn(true); + + return $mock; + } + + /** + * @return string + */ + private function createXmlWithDateTime() + { + return sprintf(' +%s +', $this->exampleDateTimeString); + } + + /** + * @return string + */ + private function createXmlWithDateTimeField() + { + return sprintf(' + +', $this->exampleDateTimeString); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/YamlEncoderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/YamlEncoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c60203966739495ab380845e611f8395942f4d5f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Encoder/YamlEncoderTest.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Encoder; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Encoder\YamlEncoder; +use Symfony\Component\Yaml\Dumper; +use Symfony\Component\Yaml\Parser; +use Symfony\Component\Yaml\Yaml; + +/** + * @author Kévin Dunglas + */ +class YamlEncoderTest extends TestCase +{ + public function testEncode() + { + $encoder = new YamlEncoder(); + + $this->assertEquals('foo', $encoder->encode('foo', 'yaml')); + $this->assertEquals('{ foo: 1 }', $encoder->encode(array('foo' => 1), 'yaml')); + } + + public function testSupportsEncoding() + { + $encoder = new YamlEncoder(); + + $this->assertTrue($encoder->supportsEncoding('yaml')); + $this->assertFalse($encoder->supportsEncoding('json')); + } + + public function testDecode() + { + $encoder = new YamlEncoder(); + + $this->assertEquals('foo', $encoder->decode('foo', 'yaml')); + $this->assertEquals(array('foo' => 1), $encoder->decode('{ foo: 1 }', 'yaml')); + } + + public function testSupportsDecoding() + { + $encoder = new YamlEncoder(); + + $this->assertTrue($encoder->supportsDecoding('yaml')); + $this->assertFalse($encoder->supportsDecoding('json')); + } + + public function testContext() + { + $encoder = new YamlEncoder(new Dumper(), new Parser(), array('yaml_inline' => 1, 'yaml_indent' => 4, 'yaml_flags' => Yaml::DUMP_OBJECT | Yaml::PARSE_OBJECT)); + + $obj = new \stdClass(); + $obj->bar = 2; + + $this->assertEquals(" foo: !php/object:O:8:\"stdClass\":1:{s:3:\"bar\";i:2;}\n", $encoder->encode(array('foo' => $obj), 'yaml')); + $this->assertEquals(' { foo: null }', $encoder->encode(array('foo' => $obj), 'yaml', array('yaml_inline' => 0, 'yaml_indent' => 2, 'yaml_flags' => 0))); + $this->assertEquals(array('foo' => $obj), $encoder->decode('foo: !php/object:O:8:"stdClass":1:{s:3:"bar";i:2;}', 'yaml')); + $this->assertEquals(array('foo' => null), $encoder->decode('foo: !php/object:O:8:"stdClass":1:{s:3:"bar";i:2;}', 'yaml', array('yaml_flags' => 0))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..27b2f24f53fb1127dc277047433245ed1814d208 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; + +/** + * Provides a dummy Normalizer which extends the AbstractNormalizer. + * + * @author Konstantin S. M. Möllers + */ +class AbstractNormalizerDummy extends AbstractNormalizer +{ + /** + * {@inheritdoc} + */ + public function getAllowedAttributes($classOrObject, array $context, $attributesAsString = false) + { + return parent::getAllowedAttributes($classOrObject, $context, $attributesAsString); + } + + /** + * {@inheritdoc} + */ + public function normalize($object, $format = null, array $context = array()) + { + } + + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function denormalize($data, $class, $format = null, array $context = array()) + { + } + + /** + * {@inheritdoc} + */ + public function supportsDenormalization($data, $type, $format = null) + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/CircularReferenceDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/CircularReferenceDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..cc07015c34052bbf3b803799ec5d457e46bd1f8a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/CircularReferenceDummy.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +/** + * @author Kévin Dunglas + */ +class CircularReferenceDummy +{ + public function getMe() + { + return $this; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..d78f34a3cde71d95038d29d2ad1390d6284bb096 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +use Symfony\Component\Serializer\Normalizer\DenormalizableInterface; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; + +class DenormalizableDummy implements DenormalizableInterface +{ + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php new file mode 100644 index 0000000000000000000000000000000000000000..6b33e84374405bf2337b377abce7a38ba37af88e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/Dummy.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\Component\Serializer\Tests\Fixtures; + +use Symfony\Component\Serializer\Normalizer\NormalizableInterface; +use Symfony\Component\Serializer\Normalizer\DenormalizableInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; + +class Dummy implements NormalizableInterface, DenormalizableInterface +{ + public $foo; + public $bar; + public $baz; + public $qux; + + public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()) + { + return array( + 'foo' => $this->foo, + 'bar' => $this->bar, + 'baz' => $this->baz, + 'qux' => $this->qux, + ); + } + + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) + { + $this->foo = $data['foo']; + $this->bar = $data['bar']; + $this->baz = $data['baz']; + $this->qux = $data['qux']; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/GroupDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/GroupDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..37bfa7eb3f07550709624bb43a4665e73d36044f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/GroupDummy.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +use Symfony\Component\Serializer\Annotation\Groups; + +/** + * @author Kévin Dunglas + */ +class GroupDummy extends GroupDummyParent implements GroupDummyInterface +{ + /** + * @Groups({"a"}) + */ + private $foo; + /** + * @Groups({"b", "c", "name_converter"}) + */ + protected $bar; + private $fooBar; + private $symfony; + + /** + * @Groups({"b"}) + */ + public function setBar($bar) + { + $this->bar = $bar; + } + + /** + * @Groups({"c"}) + */ + public function getBar() + { + return $this->bar; + } + + public function setFoo($foo) + { + $this->foo = $foo; + } + + public function getFoo() + { + return $this->foo; + } + + public function setFooBar($fooBar) + { + $this->fooBar = $fooBar; + } + + /** + * @Groups({"a", "b", "name_converter"}) + */ + public function isFooBar() + { + return $this->fooBar; + } + + public function setSymfony($symfony) + { + $this->symfony = $symfony; + } + + public function getSymfony() + { + return $this->symfony; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/GroupDummyInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/GroupDummyInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a60629e6dd50911b205ed50f667d7c3778a6e0d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/GroupDummyInterface.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +use Symfony\Component\Serializer\Annotation\Groups; + +/** + * @author Kévin Dunglas + */ +interface GroupDummyInterface +{ + /** + * @Groups({"a", "name_converter"}) + */ + public function getSymfony(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/GroupDummyParent.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/GroupDummyParent.php new file mode 100644 index 0000000000000000000000000000000000000000..dd24233993b9b7c0101cda591278baa80c92174b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/GroupDummyParent.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +use Symfony\Component\Serializer\Annotation\Groups; + +/** + * @author Kévin Dunglas + */ +class GroupDummyParent +{ + /** + * @Groups({"a"}) + */ + private $kevin; + private $coopTilleuls; + + public function setKevin($kevin) + { + $this->kevin = $kevin; + } + + public function getKevin() + { + return $this->kevin; + } + + public function setCoopTilleuls($coopTilleuls) + { + $this->coopTilleuls = $coopTilleuls; + } + + /** + * @Groups({"a", "b"}) + */ + public function getCoopTilleuls() + { + return $this->coopTilleuls; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/JsonSerializableDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/JsonSerializableDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..6d89890b8f4c64d16d5def8dd44f455d31c6131f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/JsonSerializableDummy.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +class JsonSerializableDummy implements \JsonSerializable +{ + public function jsonSerialize() + { + return array( + 'foo' => 'a', + 'bar' => 'b', + 'baz' => 'c', + 'qux' => $this, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/MaxDepthDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/MaxDepthDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..aef6dda2966ebf39fa86d890eb17fe0ac8dddbfc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/MaxDepthDummy.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\Component\Serializer\Tests\Fixtures; + +use Symfony\Component\Serializer\Annotation\MaxDepth; + +/** + * @author Kévin Dunglas + */ +class MaxDepthDummy +{ + /** + * @MaxDepth(2) + */ + public $foo; + + public $bar; + + /** + * @var self + */ + public $child; + + /** + * @MaxDepth(3) + */ + public function getBar() + { + return $this->bar; + } + + public function getChild() + { + return $this->child; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..3ac2fe364f9a636c52020cf47137325b3aaa3944 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.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\Component\Serializer\Tests\Fixtures; + +use Symfony\Component\Serializer\Normalizer\NormalizableInterface; +use Symfony\Component\Serializer\Normalizer\DenormalizableInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; + +class NormalizableTraversableDummy extends TraversableDummy implements NormalizableInterface, DenormalizableInterface +{ + public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()) + { + return array( + 'foo' => 'normalizedFoo', + 'bar' => 'normalizedBar', + ); + } + + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) + { + return array( + 'foo' => 'denormalizedFoo', + 'bar' => 'denormalizedBar', + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/PropertyCircularReferenceDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/PropertyCircularReferenceDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..8a1d9d8cfe152f0e74455dfa7ad86e9fde71050a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/PropertyCircularReferenceDummy.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +/** + * @author Kévin Dunglas + */ +class PropertyCircularReferenceDummy +{ + public $me; + + public function __construct() + { + $this->me = $this; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/PropertySiblingHolder.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/PropertySiblingHolder.php new file mode 100644 index 0000000000000000000000000000000000000000..af993e697d2c9cfc5d5b5ab857d3455245be7d54 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/PropertySiblingHolder.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +/** + * @author Kévin Dunglas + */ +class PropertySiblingHolder +{ + public $sibling0; + public $sibling1; + public $sibling2; + + public function __construct() + { + $sibling = new PropertySibling(); + + $this->sibling0 = $sibling; + $this->sibling1 = $sibling; + $this->sibling2 = $sibling; + } +} + +/** + * @author Kévin Dunglas + */ +class PropertySibling +{ + public $coopTilleuls = 'Les-Tilleuls.coop'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ProxyDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ProxyDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..040d376d12bd4ffe3f072df1cf78fde42d01b870 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ProxyDummy.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +/** + * @author Kévin Dunglas + */ +class ProxyDummy extends ToBeProxyfiedDummy +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..e9db23882b58f5975a6447dc25fa93e9017aeb6b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +use Symfony\Component\Serializer\Normalizer\NormalizableInterface; +use Symfony\Component\Serializer\Normalizer\DenormalizableInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; + +class ScalarDummy implements NormalizableInterface, DenormalizableInterface +{ + public $foo; + public $xmlFoo; + + public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()) + { + return $format === 'xml' ? $this->xmlFoo : $this->foo; + } + + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) + { + if ($format === 'xml') { + $this->xmlFoo = $data; + } else { + $this->foo = $data; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/SiblingHolder.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/SiblingHolder.php new file mode 100644 index 0000000000000000000000000000000000000000..acd4fe9474f71c431e87eeeb0cd1da1336b77378 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/SiblingHolder.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +/** + * @author Kévin Dunglas + */ +class SiblingHolder +{ + private $sibling0; + private $sibling1; + private $sibling2; + + public function __construct() + { + $sibling = new Sibling(); + + $this->sibling0 = $sibling; + $this->sibling1 = $sibling; + $this->sibling2 = $sibling; + } + + public function getSibling0() + { + return $this->sibling0; + } + + public function getSibling1() + { + return $this->sibling1; + } + + public function getSibling2() + { + return $this->sibling2; + } +} + +/** + * @author Kévin Dunglas + */ +class Sibling +{ + public function getCoopTilleuls() + { + return 'Les-Tilleuls.coop'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/StaticConstructorDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/StaticConstructorDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..78d39ce9cc8cca5e4456997d2b1dd16dbf42e858 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/StaticConstructorDummy.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +class StaticConstructorDummy +{ + public $foo; + public $bar; + public $quz; + + public static function create($foo) + { + $dummy = new self(); + $dummy->quz = $foo; + + return $dummy; + } + + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/StaticConstructorNormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/StaticConstructorNormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..67304831f892287fc9ffa30ac7b6a52e3234ff85 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/StaticConstructorNormalizer.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\Component\Serializer\Tests\Fixtures; + +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; + +/** + * @author Guilhem N. + */ +class StaticConstructorNormalizer extends ObjectNormalizer +{ + /** + * {@inheritdoc} + */ + protected function getConstructor(array &$data, $class, array &$context, \ReflectionClass $reflectionClass, $allowedAttributes) + { + if (is_a($class, StaticConstructorDummy::class, true)) { + return new \ReflectionMethod($class, 'create'); + } + + return parent::getConstructor($data, $class, $context, $reflectionClass, $allowedAttributes); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ToBeProxyfiedDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ToBeProxyfiedDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..0279493b01fa8de83836aee1178891a1c192035f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/ToBeProxyfiedDummy.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\Serializer\Tests\Fixtures; + +/** + * @author Kévin Dunglas + */ +class ToBeProxyfiedDummy +{ + private $foo; + + public function setFoo($foo) + { + $this->foo = $foo; + } + + public function getFoo() + { + return $this->foo; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/TraversableDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/TraversableDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..bcf46e512e26a94c1a444cf3eedc28fc32579699 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/TraversableDummy.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Fixtures; + +class TraversableDummy implements \IteratorAggregate +{ + public $foo = 'foo'; + public $bar = 'bar'; + + public function getIterator() + { + return new \ArrayIterator(get_object_vars($this)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/VariadicConstructorArgsDummy.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/VariadicConstructorArgsDummy.php new file mode 100644 index 0000000000000000000000000000000000000000..c04aeba0c45d1780e4ebea9af361262a4c3468ed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/VariadicConstructorArgsDummy.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\Serializer\Tests\Fixtures; + +class VariadicConstructorArgsDummy +{ + private $foo; + + public function __construct(...$foo) + { + $this->foo = $foo; + } + + public function getFoo() + { + return $this->foo; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/empty-mapping.yml b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/empty-mapping.yml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/invalid-mapping.yml b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/invalid-mapping.yml new file mode 100644 index 0000000000000000000000000000000000000000..19102815663d23f8b75a47e7a01965dcdc96468c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/invalid-mapping.yml @@ -0,0 +1 @@ +foo \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/serialization.xml b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/serialization.xml new file mode 100644 index 0000000000000000000000000000000000000000..9ba51cbfdf6d4c7faeb13cece54568bf920c5b28 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/serialization.xml @@ -0,0 +1,23 @@ + + + + + + + group1 + group2 + + + + group2 + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/serialization.yml b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/serialization.yml new file mode 100644 index 0000000000000000000000000000000000000000..c4038704a50de6a56660216b8ffbd7195a189553 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/serialization.yml @@ -0,0 +1,12 @@ +'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy': + attributes: + foo: + groups: ['group1', 'group2'] + bar: + groups: ['group2'] +'Symfony\Component\Serializer\Tests\Fixtures\MaxDepthDummy': + attributes: + foo: + max_depth: 2 + bar: + max_depth: 3 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/test.gif b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/test.gif new file mode 100644 index 0000000000000000000000000000000000000000..b636f4b8df536b0a85e7cea1a6cf3f0bd3179b96 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/test.gif differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/test.txt b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/test.txt new file mode 100644 index 0000000000000000000000000000000000000000..a0b5e663d72da79125b22f1e3670dd6371147a7d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Fixtures/test.txt @@ -0,0 +1 @@ +Kévin Dunglas diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/AttributeMetadataTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/AttributeMetadataTest.php new file mode 100644 index 0000000000000000000000000000000000000000..16ebcb1aac8dc02eef162d9bb74a2ae56c7ccd41 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/AttributeMetadataTest.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Mapping\AttributeMetadata; + +/** + * @author Kévin Dunglas + */ +class AttributeMetadataTest extends TestCase +{ + public function testInterface() + { + $attributeMetadata = new AttributeMetadata('name'); + $this->assertInstanceOf('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface', $attributeMetadata); + } + + public function testGetName() + { + $attributeMetadata = new AttributeMetadata('name'); + $this->assertEquals('name', $attributeMetadata->getName()); + } + + public function testGroups() + { + $attributeMetadata = new AttributeMetadata('group'); + $attributeMetadata->addGroup('a'); + $attributeMetadata->addGroup('a'); + $attributeMetadata->addGroup('b'); + + $this->assertEquals(array('a', 'b'), $attributeMetadata->getGroups()); + } + + public function testMaxDepth() + { + $attributeMetadata = new AttributeMetadata('name'); + $attributeMetadata->setMaxDepth(69); + + $this->assertEquals(69, $attributeMetadata->getMaxDepth()); + } + + public function testMerge() + { + $attributeMetadata1 = new AttributeMetadata('a1'); + $attributeMetadata1->addGroup('a'); + $attributeMetadata1->addGroup('b'); + + $attributeMetadata2 = new AttributeMetadata('a2'); + $attributeMetadata2->addGroup('a'); + $attributeMetadata2->addGroup('c'); + $attributeMetadata2->setMaxDepth(2); + + $attributeMetadata1->merge($attributeMetadata2); + + $this->assertEquals(array('a', 'b', 'c'), $attributeMetadata1->getGroups()); + $this->assertEquals(2, $attributeMetadata1->getMaxDepth()); + } + + public function testSerialize() + { + $attributeMetadata = new AttributeMetadata('attribute'); + $attributeMetadata->addGroup('a'); + $attributeMetadata->addGroup('b'); + $attributeMetadata->setMaxDepth(3); + + $serialized = serialize($attributeMetadata); + $this->assertEquals($attributeMetadata, unserialize($serialized)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/ClassMetadataTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/ClassMetadataTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f2db1c51f6fcd50e3f6a0800abf9244269290430 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/ClassMetadataTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Mapping\ClassMetadata; + +/** + * @author Kévin Dunglas + */ +class ClassMetadataTest extends TestCase +{ + public function testInterface() + { + $classMetadata = new ClassMetadata('name'); + $this->assertInstanceOf('Symfony\Component\Serializer\Mapping\ClassMetadataInterface', $classMetadata); + } + + public function testAttributeMetadata() + { + $classMetadata = new ClassMetadata('c'); + + $a1 = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface')->getMock(); + $a1->method('getName')->willReturn('a1'); + + $a2 = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface')->getMock(); + $a2->method('getName')->willReturn('a2'); + + $classMetadata->addAttributeMetadata($a1); + $classMetadata->addAttributeMetadata($a2); + + $this->assertEquals(array('a1' => $a1, 'a2' => $a2), $classMetadata->getAttributesMetadata()); + } + + public function testMerge() + { + $classMetadata1 = new ClassMetadata('c1'); + $classMetadata2 = new ClassMetadata('c2'); + + $ac1 = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface')->getMock(); + $ac1->method('getName')->willReturn('a1'); + $ac1->method('getGroups')->willReturn(array('a', 'b')); + + $ac2 = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface')->getMock(); + $ac2->method('getName')->willReturn('a1'); + $ac2->method('getGroups')->willReturn(array('b', 'c')); + + $classMetadata1->addAttributeMetadata($ac1); + $classMetadata2->addAttributeMetadata($ac2); + + $classMetadata1->merge($classMetadata2); + + $ac1->method('getGroups')->willReturn('a', 'b', 'c'); + + $this->assertEquals(array('a1' => $ac1), $classMetadata2->getAttributesMetadata()); + } + + public function testSerialize() + { + $classMetadata = new ClassMetadata('a'); + + $a1 = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface')->getMock(); + $a1->method('getName')->willReturn('b1'); + + $a2 = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface')->getMock(); + $a2->method('getName')->willReturn('b2'); + + $classMetadata->addAttributeMetadata($a1); + $classMetadata->addAttributeMetadata($a2); + + $serialized = serialize($classMetadata); + $this->assertEquals($classMetadata, unserialize($serialized)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CacheMetadataFactoryTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CacheMetadataFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dc392581c5b8f586244ab52e6f47fdb5a02dd53c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CacheMetadataFactoryTest.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Mapping\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Cache\Adapter\ArrayAdapter; +use Symfony\Component\Serializer\Mapping\ClassMetadata; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; +use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; +use Symfony\Component\Serializer\Tests\Fixtures\Dummy; + +/** + * @author Kévin Dunglas + */ +class CacheMetadataFactoryTest extends TestCase +{ + public function testGetMetadataFor() + { + $metadata = new ClassMetadata(Dummy::class); + + $decorated = $this->getMockBuilder(ClassMetadataFactoryInterface::class)->getMock(); + $decorated + ->expects($this->once()) + ->method('getMetadataFor') + ->will($this->returnValue($metadata)) + ; + + $factory = new CacheClassMetadataFactory($decorated, new ArrayAdapter()); + + $this->assertEquals($metadata, $factory->getMetadataFor(Dummy::class)); + // The second call should retrieve the value from the cache + $this->assertEquals($metadata, $factory->getMetadataFor(Dummy::class)); + } + + public function testHasMetadataFor() + { + $decorated = $this->getMockBuilder(ClassMetadataFactoryInterface::class)->getMock(); + $decorated + ->expects($this->once()) + ->method('hasMetadataFor') + ->will($this->returnValue(true)) + ; + + $factory = new CacheClassMetadataFactory($decorated, new ArrayAdapter()); + + $this->assertTrue($factory->hasMetadataFor(Dummy::class)); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException + */ + public function testInvalidClassThrowsException() + { + $decorated = $this->getMockBuilder(ClassMetadataFactoryInterface::class)->getMock(); + $factory = new CacheClassMetadataFactory($decorated, new ArrayAdapter()); + + $factory->getMetadataFor('Not\Exist'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Factory/ClassMetadataFactoryTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Factory/ClassMetadataFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..903cc04d1f49fe8d572a7daf1785c40003e88b00 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Factory/ClassMetadataFactoryTest.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Mapping\Factory; + +use Doctrine\Common\Annotations\AnnotationReader; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; +use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Serializer\Mapping\Loader\LoaderChain; +use Symfony\Component\Serializer\Tests\Mapping\TestClassMetadataFactory; + +/** + * @author Kévin Dunglas + */ +class ClassMetadataFactoryTest extends TestCase +{ + public function testInterface() + { + $classMetadata = new ClassMetadataFactory(new LoaderChain(array())); + $this->assertInstanceOf('Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface', $classMetadata); + } + + public function testGetMetadataFor() + { + $factory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $classMetadata = $factory->getMetadataFor('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'); + + $this->assertEquals(TestClassMetadataFactory::createClassMetadata(true, true), $classMetadata); + } + + public function testHasMetadataFor() + { + $factory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->assertTrue($factory->hasMetadataFor('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy')); + $this->assertTrue($factory->hasMetadataFor('Symfony\Component\Serializer\Tests\Fixtures\GroupDummyParent')); + $this->assertTrue($factory->hasMetadataFor('Symfony\Component\Serializer\Tests\Fixtures\GroupDummyInterface')); + $this->assertFalse($factory->hasMetadataFor('Dunglas\Entity')); + } + + /** + * @group legacy + */ + public function testCacheExists() + { + $cache = $this->getMockBuilder('Doctrine\Common\Cache\Cache')->getMock(); + $cache + ->expects($this->once()) + ->method('fetch') + ->will($this->returnValue('foo')) + ; + + $factory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()), $cache); + $this->assertEquals('foo', $factory->getMetadataFor('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy')); + } + + /** + * @group legacy + */ + public function testCacheNotExists() + { + $cache = $this->getMockBuilder('Doctrine\Common\Cache\Cache')->getMock(); + $cache->method('fetch')->will($this->returnValue(false)); + $cache->method('save'); + + $factory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()), $cache); + $metadata = $factory->getMetadataFor('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'); + + $this->assertEquals(TestClassMetadataFactory::createClassMetadata(true, true), $metadata); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b2e5c69211227442e469122cbfa71ecfc5288bad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Mapping\Loader; + +use Doctrine\Common\Annotations\AnnotationReader; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Mapping\ClassMetadata; +use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Serializer\Tests\Mapping\TestClassMetadataFactory; + +/** + * @author Kévin Dunglas + */ +class AnnotationLoaderTest extends TestCase +{ + /** + * @var AnnotationLoader + */ + private $loader; + + protected function setUp() + { + $this->loader = new AnnotationLoader(new AnnotationReader()); + } + + public function testInterface() + { + $this->assertInstanceOf('Symfony\Component\Serializer\Mapping\Loader\LoaderInterface', $this->loader); + } + + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $classMetadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'); + + $this->assertTrue($this->loader->loadClassMetadata($classMetadata)); + } + + public function testLoadGroups() + { + $classMetadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'); + $this->loader->loadClassMetadata($classMetadata); + + $this->assertEquals(TestClassMetadataFactory::createClassMetadata(), $classMetadata); + } + + public function testLoadMaxDepth() + { + $classMetadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\MaxDepthDummy'); + $this->loader->loadClassMetadata($classMetadata); + + $attributesMetadata = $classMetadata->getAttributesMetadata(); + $this->assertEquals(2, $attributesMetadata['foo']->getMaxDepth()); + $this->assertEquals(3, $attributesMetadata['bar']->getMaxDepth()); + } + + public function testLoadClassMetadataAndMerge() + { + $classMetadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'); + $parentClassMetadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummyParent'); + + $this->loader->loadClassMetadata($parentClassMetadata); + $classMetadata->merge($parentClassMetadata); + + $this->loader->loadClassMetadata($classMetadata); + + $this->assertEquals(TestClassMetadataFactory::createClassMetadata(true), $classMetadata); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Loader/XmlFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Loader/XmlFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..974d42ee559266c91c61230f1e5d9f101aca0dec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Loader/XmlFileLoaderTest.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\Component\Serializer\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader; +use Symfony\Component\Serializer\Mapping\ClassMetadata; +use Symfony\Component\Serializer\Tests\Mapping\TestClassMetadataFactory; + +/** + * @author Kévin Dunglas + */ +class XmlFileLoaderTest extends TestCase +{ + /** + * @var XmlFileLoader + */ + private $loader; + /** + * @var ClassMetadata + */ + private $metadata; + + protected function setUp() + { + $this->loader = new XmlFileLoader(__DIR__.'/../../Fixtures/serialization.xml'); + $this->metadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'); + } + + public function testInterface() + { + $this->assertInstanceOf('Symfony\Component\Serializer\Mapping\Loader\LoaderInterface', $this->loader); + } + + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $this->assertTrue($this->loader->loadClassMetadata($this->metadata)); + } + + public function testLoadClassMetadata() + { + $this->loader->loadClassMetadata($this->metadata); + + $this->assertEquals(TestClassMetadataFactory::createXmlCLassMetadata(), $this->metadata); + } + + public function testMaxDepth() + { + $classMetadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\MaxDepthDummy'); + $this->loader->loadClassMetadata($classMetadata); + + $attributesMetadata = $classMetadata->getAttributesMetadata(); + $this->assertEquals(2, $attributesMetadata['foo']->getMaxDepth()); + $this->assertEquals(3, $attributesMetadata['bar']->getMaxDepth()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Loader/YamlFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Loader/YamlFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..918af73b14d8f77feaba8cbf4e4bed0b80200309 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/Loader/YamlFileLoaderTest.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader; +use Symfony\Component\Serializer\Mapping\ClassMetadata; +use Symfony\Component\Serializer\Tests\Mapping\TestClassMetadataFactory; + +/** + * @author Kévin Dunglas + */ +class YamlFileLoaderTest extends TestCase +{ + /** + * @var YamlFileLoader + */ + private $loader; + /** + * @var ClassMetadata + */ + private $metadata; + + protected function setUp() + { + $this->loader = new YamlFileLoader(__DIR__.'/../../Fixtures/serialization.yml'); + $this->metadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'); + } + + public function testInterface() + { + $this->assertInstanceOf('Symfony\Component\Serializer\Mapping\Loader\LoaderInterface', $this->loader); + } + + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $this->assertTrue($this->loader->loadClassMetadata($this->metadata)); + } + + public function testLoadClassMetadataReturnsFalseWhenEmpty() + { + $loader = new YamlFileLoader(__DIR__.'/../../Fixtures/empty-mapping.yml'); + $this->assertFalse($loader->loadClassMetadata($this->metadata)); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\MappingException + */ + public function testLoadClassMetadataReturnsThrowsInvalidMapping() + { + $loader = new YamlFileLoader(__DIR__.'/../../Fixtures/invalid-mapping.yml'); + $loader->loadClassMetadata($this->metadata); + } + + public function testLoadClassMetadata() + { + $this->loader->loadClassMetadata($this->metadata); + + $this->assertEquals(TestClassMetadataFactory::createXmlCLassMetadata(), $this->metadata); + } + + public function testMaxDepth() + { + $classMetadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\MaxDepthDummy'); + $this->loader->loadClassMetadata($classMetadata); + + $attributesMetadata = $classMetadata->getAttributesMetadata(); + $this->assertEquals(2, $attributesMetadata['foo']->getMaxDepth()); + $this->assertEquals(3, $attributesMetadata['bar']->getMaxDepth()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/TestClassMetadataFactory.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/TestClassMetadataFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..f435d36f744d25a45bdeac51c378837a96d19186 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Mapping/TestClassMetadataFactory.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Mapping; + +use Symfony\Component\Serializer\Mapping\AttributeMetadata; +use Symfony\Component\Serializer\Mapping\ClassMetadata; + +/** + * @author Kévin Dunglas + */ +class TestClassMetadataFactory +{ + public static function createClassMetadata($withParent = false, $withInterface = false) + { + $expected = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'); + + $foo = new AttributeMetadata('foo'); + $foo->addGroup('a'); + $expected->addAttributeMetadata($foo); + + $bar = new AttributeMetadata('bar'); + $bar->addGroup('b'); + $bar->addGroup('c'); + $bar->addGroup('name_converter'); + $expected->addAttributeMetadata($bar); + + $fooBar = new AttributeMetadata('fooBar'); + $fooBar->addGroup('a'); + $fooBar->addGroup('b'); + $fooBar->addGroup('name_converter'); + $expected->addAttributeMetadata($fooBar); + + $symfony = new AttributeMetadata('symfony'); + $expected->addAttributeMetadata($symfony); + + if ($withParent) { + $kevin = new AttributeMetadata('kevin'); + $kevin->addGroup('a'); + $expected->addAttributeMetadata($kevin); + + $coopTilleuls = new AttributeMetadata('coopTilleuls'); + $coopTilleuls->addGroup('a'); + $coopTilleuls->addGroup('b'); + $expected->addAttributeMetadata($coopTilleuls); + } + + if ($withInterface) { + $symfony->addGroup('a'); + $symfony->addGroup('name_converter'); + } + + // load reflection class so that the comparison passes + $expected->getReflectionClass(); + + return $expected; + } + + public static function createXmlCLassMetadata() + { + $expected = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'); + + $foo = new AttributeMetadata('foo'); + $foo->addGroup('group1'); + $foo->addGroup('group2'); + $expected->addAttributeMetadata($foo); + + $bar = new AttributeMetadata('bar'); + $bar->addGroup('group2'); + $expected->addAttributeMetadata($bar); + + return $expected; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b0dec5183976ae7f8167da737eefcd39b76eae98 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\NameConverter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter; + +/** + * @author Kévin Dunglas + */ +class CamelCaseToSnakeCaseNameConverterTest extends TestCase +{ + public function testInterface() + { + $attributeMetadata = new CamelCaseToSnakeCaseNameConverter(); + $this->assertInstanceOf('Symfony\Component\Serializer\NameConverter\NameConverterInterface', $attributeMetadata); + } + + /** + * @dataProvider attributeProvider + */ + public function testNormalize($underscored, $camelCased, $useLowerCamelCase) + { + $nameConverter = new CamelCaseToSnakeCaseNameConverter(null, $useLowerCamelCase); + $this->assertEquals($nameConverter->normalize($camelCased), $underscored); + } + + /** + * @dataProvider attributeProvider + */ + public function testDenormalize($underscored, $camelCased, $useLowerCamelCase) + { + $nameConverter = new CamelCaseToSnakeCaseNameConverter(null, $useLowerCamelCase); + $this->assertEquals($nameConverter->denormalize($underscored), $camelCased); + } + + public function attributeProvider() + { + return array( + array('coop_tilleuls', 'coopTilleuls', true), + array('_kevin_dunglas', '_kevinDunglas', true), + array('this_is_a_test', 'thisIsATest', true), + array('coop_tilleuls', 'CoopTilleuls', false), + array('_kevin_dunglas', '_kevinDunglas', false), + array('this_is_a_test', 'ThisIsATest', false), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e07fb56bf5b7fc30fc35dc2c2b749c9234d8883d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php @@ -0,0 +1,119 @@ + + */ +class AbstractNormalizerTest extends TestCase +{ + /** + * @var AbstractNormalizerDummy + */ + private $normalizer; + + /** + * @var ClassMetadataFactoryInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $classMetadata; + + protected function setUp() + { + $loader = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\Loader\LoaderChain')->setConstructorArgs(array(array()))->getMock(); + $this->classMetadata = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory')->setConstructorArgs(array($loader))->getMock(); + $this->normalizer = new AbstractNormalizerDummy($this->classMetadata); + } + + public function testGetAllowedAttributesAsString() + { + $classMetadata = new ClassMetadata('c'); + + $a1 = new AttributeMetadata('a1'); + $classMetadata->addAttributeMetadata($a1); + + $a2 = new AttributeMetadata('a2'); + $a2->addGroup('test'); + $classMetadata->addAttributeMetadata($a2); + + $a3 = new AttributeMetadata('a3'); + $a3->addGroup('other'); + $classMetadata->addAttributeMetadata($a3); + + $a4 = new AttributeMetadata('a4'); + $a4->addGroup('test'); + $a4->addGroup('other'); + $classMetadata->addAttributeMetadata($a4); + + $this->classMetadata->method('getMetadataFor')->willReturn($classMetadata); + + $result = $this->normalizer->getAllowedAttributes('c', array(AbstractNormalizer::GROUPS => array('test')), true); + $this->assertEquals(array('a2', 'a4'), $result); + + $result = $this->normalizer->getAllowedAttributes('c', array(AbstractNormalizer::GROUPS => array('other')), true); + $this->assertEquals(array('a3', 'a4'), $result); + } + + public function testGetAllowedAttributesAsObjects() + { + $classMetadata = new ClassMetadata('c'); + + $a1 = new AttributeMetadata('a1'); + $classMetadata->addAttributeMetadata($a1); + + $a2 = new AttributeMetadata('a2'); + $a2->addGroup('test'); + $classMetadata->addAttributeMetadata($a2); + + $a3 = new AttributeMetadata('a3'); + $a3->addGroup('other'); + $classMetadata->addAttributeMetadata($a3); + + $a4 = new AttributeMetadata('a4'); + $a4->addGroup('test'); + $a4->addGroup('other'); + $classMetadata->addAttributeMetadata($a4); + + $this->classMetadata->method('getMetadataFor')->willReturn($classMetadata); + + $result = $this->normalizer->getAllowedAttributes('c', array(AbstractNormalizer::GROUPS => array('test')), false); + $this->assertEquals(array($a2, $a4), $result); + + $result = $this->normalizer->getAllowedAttributes('c', array(AbstractNormalizer::GROUPS => array('other')), false); + $this->assertEquals(array($a3, $a4), $result); + } + + public function testObjectToPopulateWithProxy() + { + $proxyDummy = new ProxyDummy(); + + $context = array(AbstractNormalizer::OBJECT_TO_POPULATE => $proxyDummy); + + $normalizer = new ObjectNormalizer(); + $normalizer->denormalize(array('foo' => 'bar'), 'Symfony\Component\Serializer\Tests\Fixtures\ToBeProxyfiedDummy', null, $context); + + $this->assertSame('bar', $proxyDummy->getFoo()); + } + + public function testObjectWithStaticConstructor() + { + $normalizer = new StaticConstructorNormalizer(); + $dummy = $normalizer->denormalize(array('foo' => 'baz'), StaticConstructorDummy::class); + + $this->assertInstanceOf(StaticConstructorDummy::class, $dummy); + $this->assertEquals('baz', $dummy->quz); + $this->assertNull($dummy->foo); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e7d61e9e83619700d568813bc9838bcfa0d99338 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Normalizer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer; + +class AbstractObjectNormalizerTest extends TestCase +{ + public function testDenormalize() + { + $normalizer = new AbstractObjectNormalizerDummy(); + $normalizedData = $normalizer->denormalize(array('foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'), __NAMESPACE__.'\Dummy'); + + $this->assertSame('foo', $normalizedData->foo); + $this->assertNull($normalizedData->bar); + $this->assertSame('baz', $normalizedData->baz); + } + + /** + * @group legacy + */ + public function testInstantiateObjectDenormalizer() + { + $data = array('foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'); + $class = __NAMESPACE__.'\Dummy'; + $context = array(); + + $normalizer = new AbstractObjectNormalizerDummy(); + $normalizer->instantiateObject($data, $class, $context, new \ReflectionClass($class), array()); + } +} + +class AbstractObjectNormalizerDummy extends AbstractObjectNormalizer +{ + protected function extractAttributes($object, $format = null, array $context = array()) + { + } + + protected function getAttributeValue($object, $attribute, $format = null, array $context = array()) + { + } + + protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()) + { + $object->$attribute = $value; + } + + protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = array()) + { + return in_array($attribute, array('foo', 'baz')); + } + + public function instantiateObject(array &$data, $class, array &$context, \ReflectionClass $reflectionClass, $allowedAttributes, $format = null) + { + return parent::instantiateObject($data, $class, $context, $reflectionClass, $allowedAttributes, $format); + } +} + +class Dummy +{ + public $foo; + public $bar; + public $baz; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e5876a04e1e56e192fd9c3122299f1829ba90ade --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.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\Component\Serializer\Tests\Normalizer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer; +use Symfony\Component\Serializer\SerializerInterface; + +class ArrayDenormalizerTest extends TestCase +{ + /** + * @var ArrayDenormalizer + */ + private $denormalizer; + + /** + * @var SerializerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $serializer; + + protected function setUp() + { + $this->serializer = $this->getMockBuilder('Symfony\Component\Serializer\Serializer')->getMock(); + $this->denormalizer = new ArrayDenormalizer(); + $this->denormalizer->setSerializer($this->serializer); + } + + public function testDenormalize() + { + $this->serializer->expects($this->at(0)) + ->method('denormalize') + ->with(array('foo' => 'one', 'bar' => 'two')) + ->will($this->returnValue(new ArrayDummy('one', 'two'))); + + $this->serializer->expects($this->at(1)) + ->method('denormalize') + ->with(array('foo' => 'three', 'bar' => 'four')) + ->will($this->returnValue(new ArrayDummy('three', 'four'))); + + $result = $this->denormalizer->denormalize( + array( + array('foo' => 'one', 'bar' => 'two'), + array('foo' => 'three', 'bar' => 'four'), + ), + __NAMESPACE__.'\ArrayDummy[]' + ); + + $this->assertEquals( + array( + new ArrayDummy('one', 'two'), + new ArrayDummy('three', 'four'), + ), + $result + ); + } + + public function testSupportsValidArray() + { + $this->serializer->expects($this->once()) + ->method('supportsDenormalization') + ->with($this->anything(), __NAMESPACE__.'\ArrayDummy', $this->anything()) + ->will($this->returnValue(true)); + + $this->assertTrue( + $this->denormalizer->supportsDenormalization( + array( + array('foo' => 'one', 'bar' => 'two'), + array('foo' => 'three', 'bar' => 'four'), + ), + __NAMESPACE__.'\ArrayDummy[]' + ) + ); + } + + public function testSupportsInvalidArray() + { + $this->serializer->expects($this->any()) + ->method('supportsDenormalization') + ->will($this->returnValue(false)); + + $this->assertFalse( + $this->denormalizer->supportsDenormalization( + array( + array('foo' => 'one', 'bar' => 'two'), + array('foo' => 'three', 'bar' => 'four'), + ), + __NAMESPACE__.'\InvalidClass[]' + ) + ); + } + + public function testSupportsNoArray() + { + $this->assertFalse( + $this->denormalizer->supportsDenormalization( + array('foo' => 'one', 'bar' => 'two'), + __NAMESPACE__.'\ArrayDummy' + ) + ); + } +} + +class ArrayDummy +{ + public $foo; + public $bar; + + public function __construct($foo, $bar) + { + $this->foo = $foo; + $this->bar = $bar; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a3c3c1a0e62eca516c9c67ff3ef907b46dc9878f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Normalizer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Tests\Fixtures\ScalarDummy; +use Symfony\Component\Serializer\Normalizer\CustomNormalizer; +use Symfony\Component\Serializer\Serializer; + +class CustomNormalizerTest extends TestCase +{ + /** + * @var CustomNormalizer + */ + private $normalizer; + + protected function setUp() + { + $this->normalizer = new CustomNormalizer(); + $this->normalizer->setSerializer(new Serializer()); + } + + public function testInterface() + { + $this->assertInstanceOf('Symfony\Component\Serializer\Normalizer\NormalizerInterface', $this->normalizer); + $this->assertInstanceOf('Symfony\Component\Serializer\Normalizer\DenormalizerInterface', $this->normalizer); + $this->assertInstanceOf('Symfony\Component\Serializer\SerializerAwareInterface', $this->normalizer); + } + + public function testSerialize() + { + $obj = new ScalarDummy(); + $obj->foo = 'foo'; + $obj->xmlFoo = 'xml'; + $this->assertEquals('foo', $this->normalizer->normalize($obj, 'json')); + $this->assertEquals('xml', $this->normalizer->normalize($obj, 'xml')); + } + + public function testDeserialize() + { + $obj = $this->normalizer->denormalize('foo', get_class(new ScalarDummy()), 'xml'); + $this->assertEquals('foo', $obj->xmlFoo); + $this->assertNull($obj->foo); + + $obj = $this->normalizer->denormalize('foo', get_class(new ScalarDummy()), 'json'); + $this->assertEquals('foo', $obj->foo); + $this->assertNull($obj->xmlFoo); + } + + public function testSupportsNormalization() + { + $this->assertTrue($this->normalizer->supportsNormalization(new ScalarDummy())); + $this->assertFalse($this->normalizer->supportsNormalization(new \stdClass())); + } + + public function testSupportsDenormalization() + { + $this->assertTrue($this->normalizer->supportsDenormalization(array(), 'Symfony\Component\Serializer\Tests\Fixtures\ScalarDummy')); + $this->assertFalse($this->normalizer->supportsDenormalization(array(), 'stdClass')); + $this->assertTrue($this->normalizer->supportsDenormalization(array(), 'Symfony\Component\Serializer\Tests\Fixtures\DenormalizableDummy')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4bc94435992f86a4ce668d36b0b21020e55fe348 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php @@ -0,0 +1,189 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Normalizer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\File\File; +use Symfony\Component\Serializer\Normalizer\DataUriNormalizer; + +/** + * @author Kévin Dunglas + */ +class DataUriNormalizerTest extends TestCase +{ + const TEST_GIF_DATA = 'data:image/gif;base64,R0lGODdhAQABAIAAAP///////ywAAAAAAQABAAACAkQBADs='; + const TEST_TXT_DATA = 'data:text/plain,K%C3%A9vin%20Dunglas%0A'; + const TEST_TXT_CONTENT = "Kévin Dunglas\n"; + + /** + * @var DataUriNormalizer + */ + private $normalizer; + + protected function setUp() + { + $this->normalizer = new DataUriNormalizer(); + } + + public function testInterface() + { + $this->assertInstanceOf('Symfony\Component\Serializer\Normalizer\NormalizerInterface', $this->normalizer); + $this->assertInstanceOf('Symfony\Component\Serializer\Normalizer\DenormalizerInterface', $this->normalizer); + } + + public function testSupportNormalization() + { + $this->assertFalse($this->normalizer->supportsNormalization(new \stdClass())); + $this->assertTrue($this->normalizer->supportsNormalization(new \SplFileObject('data:,Hello%2C%20World!'))); + } + + /** + * @requires extension fileinfo + */ + public function testNormalizeHttpFoundationFile() + { + $file = new File(__DIR__.'/../Fixtures/test.gif'); + + $this->assertSame(self::TEST_GIF_DATA, $this->normalizer->normalize($file)); + } + + /** + * @requires extension fileinfo + */ + public function testNormalizeSplFileInfo() + { + $file = new \SplFileInfo(__DIR__.'/../Fixtures/test.gif'); + + $this->assertSame(self::TEST_GIF_DATA, $this->normalizer->normalize($file)); + } + + /** + * @requires extension fileinfo + */ + public function testNormalizeText() + { + $file = new \SplFileObject(__DIR__.'/../Fixtures/test.txt'); + + $data = $this->normalizer->normalize($file); + + $this->assertSame(self::TEST_TXT_DATA, $data); + $this->assertSame(self::TEST_TXT_CONTENT, file_get_contents($data)); + } + + public function testSupportsDenormalization() + { + $this->assertFalse($this->normalizer->supportsDenormalization('foo', 'Bar')); + $this->assertTrue($this->normalizer->supportsDenormalization(self::TEST_GIF_DATA, 'SplFileInfo')); + $this->assertTrue($this->normalizer->supportsDenormalization(self::TEST_GIF_DATA, 'SplFileObject')); + $this->assertTrue($this->normalizer->supportsDenormalization(self::TEST_TXT_DATA, 'Symfony\Component\HttpFoundation\File\File')); + } + + public function testDenormalizeSplFileInfo() + { + $file = $this->normalizer->denormalize(self::TEST_TXT_DATA, 'SplFileInfo'); + + $this->assertInstanceOf('SplFileInfo', $file); + $this->assertSame(file_get_contents(self::TEST_TXT_DATA), $this->getContent($file)); + } + + public function testDenormalizeSplFileObject() + { + $file = $this->normalizer->denormalize(self::TEST_TXT_DATA, 'SplFileObject'); + + $this->assertInstanceOf('SplFileObject', $file); + $this->assertEquals(file_get_contents(self::TEST_TXT_DATA), $this->getContent($file)); + } + + public function testDenormalizeHttpFoundationFile() + { + $file = $this->normalizer->denormalize(self::TEST_GIF_DATA, 'Symfony\Component\HttpFoundation\File\File'); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $file); + $this->assertSame(file_get_contents(self::TEST_GIF_DATA), $this->getContent($file->openFile())); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + * @expectedExceptionMessage The provided "data:" URI is not valid. + */ + public function testGiveNotAccessToLocalFiles() + { + $this->normalizer->denormalize('/etc/shadow', 'SplFileObject'); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + * @dataProvider invalidUriProvider + */ + public function testInvalidData($uri) + { + $this->normalizer->denormalize($uri, 'SplFileObject'); + } + + public function invalidUriProvider() + { + return array( + array('dataxbase64'), + array('data:HelloWorld'), + array('data:text/html;charset=,%3Ch1%3EHello!%3C%2Fh1%3E'), + array('data:text/html;charset,%3Ch1%3EHello!%3C%2Fh1%3E'), + array('data:base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC'), + array(''), + array('http://wikipedia.org'), + array('base64'), + array('iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC'), + array(' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAFVBMVEXk5OTn5+ft7e319fX29vb5+fn///++GUmVAAAALUlEQVQIHWNICnYLZnALTgpmMGYIFWYIZTA2ZFAzTTFlSDFVMwVyQhmAwsYMAKDaBy0axX/iAAAAAElFTkSuQmCC'), + array(' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAFVBMVEXk5OTn5+ft7e319fX29vb5+fn///++GUmVAAAALUlEQVQIHWNICnYLZnALTgpmMGYIFWYIZTA2ZFAzTTFlSDFVMwVyQhmAwsYMAKDaBy0axX/iAAAAAElFTkSuQmCC'), + ); + } + + /** + * @dataProvider validUriProvider + */ + public function testValidData($uri) + { + $this->assertInstanceOf('SplFileObject', $this->normalizer->denormalize($uri, 'SplFileObject')); + } + + public function validUriProvider() + { + $data = array( + array('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC'), + array('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAFVBMVEXk5OTn5+ft7e319fX29vb5+fn///++GUmVAAAALUlEQVQIHWNICnYLZnALTgpmMGYIFWYIZTA2ZFAzTTFlSDFVMwVyQhmAwsYMAKDaBy0axX/iAAAAAElFTkSuQmCC'), + array('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAFVBMVEXk5OTn5+ft7e319fX29vb5+fn///++GUmVAAAALUlEQVQIHWNICnYLZnALTgpmMGYIFWYIZTA2ZFAzTTFlSDFVMwVyQhmAwsYMAKDaBy0axX/iAAAAAElFTkSuQmCC '), + array('data:,Hello%2C%20World!'), + array('data:text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E'), + array('data:,A%20brief%20note'), + array('data:text/html;charset=US-ASCII,%3Ch1%3EHello!%3C%2Fh1%3E'), + array('data:application/ld+json;base64,eyJAaWQiOiAiL2ZvbyJ9'), + array('data:application/vnd.ms-word.document.macroenabled.12;base64,UEsDBBQABgAIAAAAIQBnzQ+udAEAADoFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0lMtOwzAQRfdI/EPkLUrcskAINe0CyhIqUT7AtSepIX7Idl9/zzhpI1TRBFG6iZTM3HvPOJmMJltVJWtwXhqdk2E2IAloboTUZU7e58/pPUl8YFqwymjIyQ48mYyvr0bznQWfoFr7nCxDsA+Uer4ExXxmLGisFMYpFvDWldQy/slKoLeDwR3lRgfQIQ3Rg4xHT1CwVRWS6RYfNyQoJ8lj0xejcsKsrSRnAcs0VumPOgeV7xCutTiiS/dkGSrrHr+U1t+cTviwUB4lSBVHqwuoecXjdFJAMmMuvDCFDXRjnKDC8JVCUdY9XGRUPo2SrJUoxp2ZaraoAKtM6gPhyTQfdhX4X2QdnYcpCsmhDY5e1hkO3uM3oaqs8e2PhxBQcAmAvXMvwgYWbxej+GbeC1Jg7jy+uv/HaK17IQLuJjTX4dkctU1XJHbOnLEed939YezDUkZ1igNbcEF2f3VtIlqfPR/EfRcgfsim9Z9v/AUAAP//AwBQSwMEFAAGAAgAAAAhAMfCJ7z/AAAA3wIAAAsACAJfcmVscy8ucmVscyCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsks1KAzEQgO+C7xDm3s22iog024sIvYmsDzAm093o5odkqu3bG0XUhWUR7HH+Pr5JZr05uEG8Uso2eAXLqgZBXgdjfafgsb1bXIPIjN7gEDwpOFKGTXN+tn6gAbkM5d7GLArFZwU9c7yRMuueHOYqRPKlsgvJIZcwdTKifsGO5Kqur2T6zYBmxBRboyBtzQWI9hjpf2zpiNEgo9Qh0SKmMp3Yll1Ei6kjVmCCvi/p/NlRFTLIaaHLvwuF3c5qug1678jzlBcdmLwhM6+EMc4ZLU9pNO74kXkLyUjzlZ6zWZ32w7jfuyePdph4l+9a9Ryp+xCSo7Ns3gEAAP//AwBQSwMEFAAGAAgAAAAhABOqPof2AAAAMQMAABwACAF3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzIKIEASigAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArJLLasMwEEX3hf6DmH0tO31QQuRsSiHb1v0ARR4/qCwJzfThv69oSOvQYLrw8l4x955Bs9l+Dla8Y6TeOwVFloNAZ3zdu1bBS/V4dQ+CWLtaW+9QwYgE2/LyYvOEVnMaoq4PJFKKIwUdc1hLSabDQVPmA7r00vg4aE4ytjJo86pblKs8v5NxmgHlSabY1Qrirr4GUY0B/5Ptm6Y3+ODN24COz1TID9w/I3NajlKsji2ygomZpUSQ50FulgRpvONK7y3+YvxYcxC3S0Jwmp0AfMuDWcwxFEsyEI8WJ59x0HP1q0Xr/1zD0TkiyJNDL78AAAD//wMAUEsDBBQABgAIAAAAIQAz6gHKYAIAAAIHAAARAAAAd29yZC9kb2N1bWVudC54bWykld1u2jAUx+8n7R2Q70sSCpRGQKVBh9A0qRrb9WQcJ7GIfSzbQLs32nPsxXacL7JNQ7QgFPt8+Of/sWNn+vAsi96BGytAzUjUD0mPKwaJUNmMfPv68WZCetZRldACFJ+RF27Jw/z9u+kxToDtJVeuhwhl46NmM5I7p+MgsCznktq+FMyAhdT1GcgA0lQwHhzBJMEgjMKypw0wbi3Ot6DqQC2pcRIuo0nKmu4gDCdoC9Uy/lUEmisMpmAkdWiaDEeY3V7fIFNTJ7aiEO7Fs8Yt5jAje6PimnHT6vBjYhQQH2TRJMO53Epo3TQjzCUiqyHLeslLeYHhBQoGZXOhT+v2VhoG8wZytuBOsUcdDa/b9KWhR2xOwEvkJ9UgWVTKzxOj8IId8Yh2xCUS/pyzUdJ9+Y5vW5rO4kaj1wEGfwN0dt3mrAzs9YkmrqOt1a5l+avkFax6k7ul2evEbHKq8QRKFq8zBYZuC1SEW9bDVe/515rM8YrbQvLiW43uYaypoetkRsLB8hb/Q1J6HX923ntX/9Ab43WafMHEcHQXLUaD1rXkKd0Xzkduw9FitChnMf7h5p9+/TwINQ183z9L9xZg5y+ojaPGIUb4+T1PUYmKv6/gA2U7EnRzH1XSZgYlSvuw5cw9mf+r22Dcex+j0eQ+LJXpbPMDo3gioug+LOfNsT+eDEuyT/hMPdIBHtxoGFXViyx3J3MLzoE82QVPO9Gc04TjFXgXTryZAriOme1dadbTMSgseq2mjFc5pRu/RCsjfNGFUPxJOIYqb8dN9VXhZbfa0OD08Zr/BgAA//8DAFBLAwQUAAYACAAAACEAJyDgAjMGAACMGgAAFQAAAHdvcmQvdGhlbWUvdGhlbWUxLnhtbOxZTYvbRhi+F/ofhO6OZVvyxxJvsGU7abObhOwmJcexNJYmO9KYmdHumhAoybFQKE1LDw301kJpG0igl/TUn7JtSptC/kJHI8uesccsaTawhNhgzcfzvvPM+848I1kXLx0n2DqElCGSdu3aBce2YBqQEKVR1761P6q0bYtxkIYAkxR27Rlk9qXtDz+4CLZ4DBNoCfuUbYGuHXM+3apWWSCaAbtApjAVfRNCE8BFlUbVkIIj4TfB1brjNKsJQKltpSARbvfj338Qzq5PJiiA9nbpfYjFT8pZ3hBgupf7hnOTfkYhyCQ2PKjlFzZjPqbWIcBdWwwUkqN9eMxtCwPGRUfXduTHrm5frC6MMN9gq9iN5GduNzcID+rSjkbjhaHrem6zt/AvAZiv44atYXPYXPiTABAEYqYFFxXr9Tv9gTfHKqCiaPA9aA0aNQ2v+G+s4Xte/tXwElQU3TX8aOQvY6iAiqJniEmr7rsaXoKKYnMN33J6A7el4SUoxig9WEM7XrPhl7NdQCYEXzHCO547atXn8CWqqqyuwj7lm9ZaAu4SOhIAmVzAUWrx2RROQCBwPsBoTJG1g6JYLLwpSAkTzU7dGTkN8Zt/XVmSEQFbECjWRVPA1ppyPhYLKJryrv2x8GorkFfPf3r1/Kl18uDZyYNfTx4+PHnwi8HqCkgj1erl91/8+/hT65+n37189JUZz1T8nz9/9sdvX5qBXAW++PrJX8+evPjm879/fGSA9ygYq/B9lEBmXYNH1k2SiIkZBoBj+noW+zFAqkUvjRhIQW5jQA95rKGvzQAGBlwf6hG8TYVMmICXs7sa4b2YZhwZgFfjRAPuEoL7hBrndDUfS41ClkbmwWmm4m4CcGga21/J7zCbivWOTC79GGo0b2CRchDBFHIr7yMHEBrM7iCkxXUXBZQwMuHWHWT1ATKGZB+NtdW0NLqCEpGXmYmgyLcWm93bVp9gk/sBPNSRYlcAbHIJsRbGyyDjIDEyBglWkTuAxyaSezMaaAFnXGQ6gphYwxAyZrK5Tmca3atCXsxp38WzREdSjg5MyB1AiIockAM/BsnUyBmlsYr9iB2IJQqsG4QbSRB9h+R1kQeQbkz3bQS1dJ++t28JZTUvkLwno6YtAYm+H2d4AqB0Xl3R8wSlp4r7iqx7b1fWhZC++PaxWXfPpaD3KDLuqFUZ34RbFW+f0BCdf+0egCy9AcV2MUDfS/d76X7npXvTfj57wV5qtLyJL2/VpZtk4337BGG8x2cY7jCp7kxMLxyJRlmRRovHhGksivPhNFxEgSxblPBPEI/3YjAVw9TkCBGbu46YNSVMnA+y2eg778BZskvCorVWK59MhQHgy3ZxvpTt4jTiRWuztXwEW7iXtUg+KpcEctvXIaEMppNoGEi0ysZTSMiZnQmLjoFFO3e/kYW8zLMi9p8F8n81PLdgJNYbwDDM81TYl9k980xvCqY+7bphep2c69lkWiOhLDedhLIMYxDC1eYzznVnmVKNXh6KdRqt9tvIdS4iK9qAU71mHYk91/CEmwBMu/ZE3BmKYjIV/liumwBHadcO+DzQ/0dZppTxAWBxAZNdxfwTxCG1MErEWlfTgNMlt1q9lc/xnJLrOOcvcvKiJhlOJjDgG1qWVdFXODH2viE4r5BMkN6LwyNrjDN6E4hAea1aHsAQMb6IZoiosriXUVyRq/lW1P4xW25RgKcxmJ8oqpgXcFle0FHmIZmuzkqvzyczjvIkvfGpe7pR3qGI5oYDJD81zfrx9g55hdVS9zVWhXSval2n1LpNp8SbHwgKteVgGrWcsYHaslWndoY3BMpwi6W56Yw469NgddXmB0R5Xylra68myPiuWPkDcbuaYc4kVXgsnhH88k/lQglka6kux9zKKOra9xyv5/p1z684bW9YcRuuU2l7vUal53mN2tCrOYN+/b4ICo+TmleMPRLPM3g2f/Ui29devyTlbfaFgCRVIt+rVKWxfP1Sq2uvX4r3LtZ+3m9bSETmXrM+6jQ6/Wal0+iNKu6g3650/Ga/Mmj6rcFo4Hvtzui+bR1KsNtr+G5z2K40a75fcZtOTr/dqbTcer3ntnrtodu7P4+1mHl5LcMreW3/BwAA//8DAFBLAwQKAAAAAAAAACEAahPYDYwlAACMJQAAFwAAAGRvY1Byb3BzL3RodW1ibmFpbC5qcGVn/9j/4AAQSkZJRgABAQAASABIAAD/4QCARXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAWmgAwAEAAAAAQAAAgAAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAgABaQMBEQACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/3QAEAC7/2gAMAwEAAhEDEQA/AP7Yfgx8GPg9N8HvhRLL8KPhrLLL8NfAskkkngTws8kkj+F9LZ3d200s7uxLMzHczEk5JNAHpX/ClPg3/wBEl+GX/hBeFf8A5W0AH/ClPg3/ANEl+GX/AIQXhX/5W0AH/ClPg3/0SX4Zf+EF4V/+VtAB/wAKU+Df/RJfhl/4QXhX/wCVtAB/wpT4N/8ARJfhl/4QXhX/AOVtAB/wpT4N/wDRJfhl/wCEF4V/+VtAB/wpT4N/9El+GX/hBeFf/lbQAf8AClPg3/0SX4Zf+EF4V/8AlbQAf8KU+Df/AESX4Zf+EF4V/wDlbQAf8KU+Df8A0SX4Zf8AhBeFf/lbQAf8KU+Df/RJfhl/4QXhX/5W0AH/AApT4N/9El+GX/hBeFf/AJW0AH/ClPg3/wBEl+GX/hBeFf8A5W0AH/ClPg3/ANEl+GX/AIQXhX/5W0AH/ClPg3/0SX4Zf+EF4V/+VtAB/wAKU+Df/RJfhl/4QXhX/wCVtAB/wpT4N/8ARJfhl/4QXhX/AOVtAB/wpT4N/wDRJfhl/wCEF4V/+VtAB/wpT4N/9El+GX/hBeFf/lbQAf8AClPg3/0SX4Zf+EF4V/8AlbQAf8KU+Df/AESX4Zf+EF4V/wDlbQAf8KU+Df8A0SX4Zf8AhBeFf/lbQAf8KU+Df/RJfhl/4QXhX/5W0AH/AApT4N/9El+GX/hBeFf/AJW0AH/ClPg3/wBEl+GX/hBeFf8A5W0AH/ClPg3/ANEl+GX/AIQXhX/5W0AH/ClPg3/0SX4Zf+EF4V/+VtAB/wAKU+Df/RJfhl/4QXhX/wCVtAB/wpT4N/8ARJfhl/4QXhX/AOVtAB/wpT4N/wDRJfhl/wCEF4V/+VtAB/wpT4N/9El+GX/hBeFf/lbQAf8AClPg3/0SX4Zf+EF4V/8AlbQAf8KU+Df/AESX4Zf+EF4V/wDlbQAf8KU+Df8A0SX4Zf8AhBeFf/lbQAf8KU+Df/RJfhl/4QXhX/5W0AH/AApT4N/9El+GX/hBeFf/AJW0AH/ClPg3/wBEl+GX/hBeFf8A5W0AH/ClPg3/ANEl+GX/AIQXhX/5W0AH/ClPg3/0SX4Zf+EF4V/+VtAB/wAKU+Df/RJfhl/4QXhX/wCVtAB/wpT4N/8ARJfhl/4QXhX/AOVtAB/wpT4N/wDRJfhl/wCEF4V/+VtAB/wpT4N/9El+GX/hBeFf/lbQAf8AClPg3/0SX4Zf+EF4V/8AlbQB/Nd/wrT4c/8ARP8AwT/4Sug//INAH//Q/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9H+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/T/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9T+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAfP3j79pv4T/DT4n6P8IvFmr3Vj4w1jwRqvxN2GC3TSNH+G3hs6v/AMJj8QPEmsXV5a2Xh3wZ4JTSB/wlPiPVnttK0+81vwpokdxc+IPFfh/SdQAMPQ/2v/gXr2heH9WtvFlrZ6n4g8X6B4Gi8GatfaFpnjPS/Eev+N2+HyafrmjXWsxx6bdaV4lg1DTtasZbxtUstX0rUvCS6fP45gXwu4B6v8L/AIufDX40+GR4x+FfjDSPG3hk3ENqNW0eSZoPNu9I0rxFp7GO5ht7hbfV/DevaD4m0O7aL7LrnhjXtC8SaRPe6JrOmX10AejUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/1f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQB4L8Vv2YvgX8b9UbWvij4Ct/FWqP4Yv/BbXsut+JtKlPhTV9K8WaFrWgf8SPWdMT+zNd0Lx14t0TXrbAXW9H1y70zVftliILeIA4/Rv2Jv2Y9AvvDuqaX8Mkg1Pwr4a8O+D9Dv5PF3ju6u7Xw74T+M9h+0J4e06aW68TzG/GnfGDTLTxglzqH2q7mKS6FczzeGbm50eUA9j+Gfwk+Hvwd0e80D4c+H/wDhHdJv5PDUl3a/2rrerec/hD4eeCvhT4dbz9c1LU7lP7O8A/DvwdoOI5lF3/Y/9qX32nWdQ1PUb0A9HoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoA/mXoA/9b+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/Q/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9H+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/T/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9T+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/W/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9f+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0P7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/R/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9L+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/U/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9X+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/X/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9D+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/S/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9P+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1P7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/V/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9b+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/Q/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9H+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/T/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9T+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/W/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9f+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0P7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/R/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9L+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/U/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9X+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/X/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9D+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/S/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9P+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1P7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/V/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9b+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1/7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/Q/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9H+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/0v7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/T/ur+Cn/JGvhJ/wBky8B/+orpVAHptABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB/MvQB/9T+6v4Kf8ka+En/AGTLwH/6iulUAem0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH8y9AH/1f7q/gp/yRr4Sf8AZMvAf/qK6VQB6bQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfzL0Af/W/th+DHxn+D0Pwe+FEUvxX+GsUsXw18CxyRyeO/CySRyJ4X0tXR0bUgyOjAqysNysCDgg0Aelf8Lr+Df/AEVr4Zf+F74V/wDllQAf8Lr+Df8A0Vr4Zf8Ahe+Ff/llQAf8Lr+Df/RWvhl/4XvhX/5ZUAH/AAuv4N/9Fa+GX/he+Ff/AJZUAH/C6/g3/wBFa+GX/he+Ff8A5ZUAH/C6/g3/ANFa+GX/AIXvhX/5ZUAH/C6/g3/0Vr4Zf+F74V/+WVAB/wALr+Df/RWvhl/4XvhX/wCWVAB/wuv4N/8ARWvhl/4XvhX/AOWVAB/wuv4N/wDRWvhl/wCF74V/+WVAB/wuv4N/9Fa+GX/he+Ff/llQAf8AC6/g3/0Vr4Zf+F74V/8AllQAf8Lr+Df/AEVr4Zf+F74V/wDllQAf8Lr+Df8A0Vr4Zf8Ahe+Ff/llQAf8Lr+Df/RWvhl/4XvhX/5ZUAH/AAuv4N/9Fa+GX/he+Ff/AJZUAH/C6/g3/wBFa+GX/he+Ff8A5ZUAH/C6/g3/ANFa+GX/AIXvhX/5ZUAH/C6/g3/0Vr4Zf+F74V/+WVAB/wALr+Df/RWvhl/4XvhX/wCWVAB/wuv4N/8ARWvhl/4XvhX/AOWVAB/wuv4N/wDRWvhl/wCF74V/+WVAB/wuv4N/9Fa+GX/he+Ff/llQAf8AC6/g3/0Vr4Zf+F74V/8AllQAf8Lr+Df/AEVr4Zf+F74V/wDllQAf8Lr+Df8A0Vr4Zf8Ahe+Ff/llQAf8Lr+Df/RWvhl/4XvhX/5ZUAH/AAuv4N/9Fa+GX/he+Ff/AJZUAH/C6/g3/wBFa+GX/he+Ff8A5ZUAH/C6/g3/ANFa+GX/AIXvhX/5ZUAH/C6/g3/0Vr4Zf+F74V/+WVAB/wALr+Df/RWvhl/4XvhX/wCWVAB/wuv4N/8ARWvhl/4XvhX/AOWVAB/wuv4N/wDRWvhl/wCF74V/+WVAB/wuv4N/9Fa+GX/he+Ff/llQAf8AC6/g3/0Vr4Zf+F74V/8AllQAf8Lr+Df/AEVr4Zf+F74V/wDllQAf8Lr+Df8A0Vr4Zf8Ahe+Ff/llQAf8Lr+Df/RWvhl/4XvhX/5ZUAH/AAuv4N/9Fa+GX/he+Ff/AJZUAH/C6/g3/wBFa+GX/he+Ff8A5ZUAH/C6/g3/ANFa+GX/AIXvhX/5ZUAH/C6/g3/0Vr4Zf+F74V/+WVAB/wALr+Df/RWvhl/4XvhX/wCWVAH813/Cy/hz/wBFA8E/+FVoP/ydQB//2QAAUEsDBBQABgAIAAAAIQDSXhXfgQMAAEwJAAARAAAAd29yZC9zZXR0aW5ncy54bWy0Vltv2zYUfh/Q/2DouYolxXJdrU4RO/GaIl6D2H3ZGyVRNhFehEPKmjvsv++IFCNvDQp3Rf1i8nznzu8c+937PwUfHShopuQ8iC+iYERloUomd/Pg83YVzoKRNkSWhCtJ58GR6uD91atf3rWZpsagmh6hC6kzUcyDvTF1Nh7rYk8F0ReqphLBSoEgBq+wGwsCT00dFkrUxLCccWaO4ySKpkHvRs2DBmTWuwgFK0BpVZnOJFNVxQraf3kLOCeuM7lRRSOoNDbiGCjHHJTUe1Zr7038X28I7r2Tw7eKOAju9do4OqPcVkH5bHFOep1BDaqgWuMDCe4TZHIIPPnK0XPsC4zdl2hdoXkc2dNp5un3OUj+40Dzcypx0D3LgYDjSV+GKLK7nVRAco6sxHJGmFFwhbT8opQYtVlNocC3QU5PomDcASWtSMPNluQbo2pUORDM4U00c/D+WO+ptIT4A6nu8UmSOrzYEyCFobCpSYFtXSppQHGvV6rflVkirQG77iw0OdAHoAdG2wdWmAaoc2S5P5w2bo7QkSQCi/nXbKxViURvswbY+f3uDGxSsc/9xUAK5x5YSbddEzfmyOkKa9qwL/Ralh8bbRh6tA35gQy+lQC2GyN/wmffHmu6oqTrkf5JwewDrTir1wxAwZ0skR4/LRirKgoYgBFD18g6Bqq1ff5ASYnr9gfjjk9phMu71P7wqJTxqlF0GaXLdOky7dBzkPRNvEyTl5DbOJ29tdM0fo4qsm7xPYA/dRQaCWexJCIHRkbrbjWOO40cnhZMejynOOv0FNk0uQfD0AFaEM5XOHoesAmIrGS6vqGVPfM1gd3gt9eAF6W4Bj4+++pWBIXfQDW1Q1sgtaOGV4knboGIjElzz4SX6ybfeCuJ2+kEamT56QC2T0N72szgE9sRuyeWKla3gnD12FOJw6ajAV2TunZsynfxPOBstzdxRwCDtxJ/Qe0l3yU9llgscZi9kKKrDLX7wyBLvOxE79LLLgfZxMsmgyz1snSQTb1s2slwiVLgTD4hsf2xk1eKc9XS8sOAfyXyW7pg+OKbo8iH5fraYZxpnLQa97BR4LFfLRZPslIVd0hWPLl3i5LbWZIsHJza/W22yKMnbO0jrRZE07LHvGnqTP9adZ9Zsgiv45sknEzTRThLlrfhYpVcx8vrt9N0mfzdz4H/G3T1DwAAAP//AwBQSwMEFAAGAAgAAAAhAPC8NQHcAQAA8QUAABIAAAB3b3JkL2ZvbnRUYWJsZS54bWy8k9tq4zAQhu8LfQej+8ay4vRg6pQ0bWBh6cXSfQBFkW2xOhhJiTdvvyPZcQMhbJallUHI/4x+jT40j0+/lUx23DphdImyCUYJ18xshK5L9PN9dXOPEuep3lBpNC/Rnjv0NL++euyKymjvEtivXaFYiRrv2yJNHWu4om5iWq4hWBmrqIdfW6eK2l/b9oYZ1VIv1kIKv08JxrdosLGXuJiqEoy/GLZVXPu4P7VcgqPRrhGtO7h1l7h1xm5aaxh3Du6sZO+nqNCjTZafGCnBrHGm8hO4zFBRtILtGY4rJT8MZv9mQEYDxYpvtTaWriXAh0oSMEPzgX7SFZoqCCypFGsrYqCl2jieQWxHZYkwwSs8gzl8OZ6GGaUhkTXUOh5M+kTcyxVVQu4PKt160+ut8Kw5yDtqRaipDzlRQ2Dr1rhErxgGWa1Qr2QlykFYLEeFhKPiyAZlOio4KCz69BkPcReLPmMOnJn2AE5AvAvFXfLGu+SHUVSfAULwLYCYAY4AZvr5QMji9QjIEpS7+/xw/Q8gD38H0mO8HMgCypJnMDwDhnx4GfF1fD6G43cxYJh+BYahQZLvom782TYJzfFFbbIIFZPjVxHahOC75xMc8fL/2SbDws3/AAAA//8DAFBLAwQUAAYACAAAACEA4IvKVR8BAAARAgAAFAAAAHdvcmQvd2ViU2V0dGluZ3MueG1slNFRS8MwEAfwd8HvUPK+pRs6tKwbgkz2MgbVD5Cl1zWY5EIua7dv71nnRHyZbzku9+P+3Hx5dDbrIJJBX4rJOBcZeI218ftSvL2uRg8io6R8rSx6KMUJSCwXtzfzvuhhV0FK/JMyVjwVTpeiTSkUUpJuwSkaYwDPzQajU4nLuJdOxfdDGGl0QSWzM9akk5zm+UycmXiNgk1jNDyjPjjwaZiXESyL6Kk1gb61/hqtx1iHiBqIOI+zX55Txl+Yyd0fyBkdkbBJYw5z3migeHySDy9nf4D7/wHTC+B0sd57jGpn+QS8ScaYWPANlLXYbzcv8rOocYOpUh08UcUpLKyMhaETzBEsbSGuvW6zvuiULcXjTHBT/jrk4gMAAP//AwBQSwMEFAAGAAgAAAAhAJ/qVV97AQAAFQMAABEACAFkb2NQcm9wcy9jb3JlLnhtbCCiBAEooAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJySUU/CMBCA3038D0vfRzdQgssYiRqeJJoI0fhW2xtUtrZpDwb/3m6DIZHExLfe7ruvt7umk11ZBFuwTmo1JnEvIgEoroVUyzFZzKfhiAQOmRKs0ArGZA+OTLLrq5SbhGsLL1YbsCjBBd6kXMLNmKwQTUKp4ysomet5Qvlkrm3J0Id2SQ3ja7YE2o+iIS0BmWDIaC0MTWckB6XgndJsbNEIBKdQQAkKHY17MT2xCLZ0FwuazA+ylLg3cBE9Jjt652QHVlXVqwYN6vuP6fvs6bX51VCqelYcSJYKnqDEArKUno7+5DafX8Cx/dwF/swtMNQ2W6AspGMIGxsICGaSW+10jsFznksOTd2Rrbewhn2lrXDeeBZ5TIDjVhr0u23vO/vg6YI5nPll5xLE/f7vq3+X1BYLW1m/nyxuiC5MD8to2wUR+CEm7ciPmbfBw+N8SrJ+FA/DOAr7N/NolNzeJVH0UXd8Vn8SlocG/m08CtqhnT/k7BsAAP//AwBQSwMEFAAGAAgAAAAhAIGW/TkyCwAAZHIAAA8AAAB3b3JkL3N0eWxlcy54bWy8ndty27oVhu8703fg6Kq9cHyMnXi2s8d24tpTO9s7cppriIQk1CCh8uBDn74gSEmQF0FxAau+siVqfQDx4wewQFL67feXVEZPPC+Eys5G+x/2RhHPYpWIbHY2+vlwtfNpFBUlyxImVcbPRq+8GP3+5a9/+e35tChfJS8iDciK0zQ+G83LcnG6u1vEc56y4oNa8EwfnKo8ZaV+mc92U5Y/VoudWKULVoqJkKJ83T3Y2zsetZh8CEVNpyLmX1VcpTwrTfxuzqUmqqyYi0WxpD0PoT2rPFnkKuZFoU86lQ0vZSJbYfaPACgVca4KNS0/6JNpa2RQOnx/z/yXyjXgIw5wsAKk8enNLFM5m0jd+romkYaNvujmT1T8lU9ZJcuifpnf5+3L9pX5c6WysoieT1kRC/GgS9aQVGje9XlWiJE+wllRnheCdR6c1/90HomL0nr7QiRitFuXWPxXH3xi8mx0cLR857KuwcZ7kmWz5XvTfOfqh12TsxHPdn6O67cmmns2YvnO+LwO3G1PrPlrne5i9ar51Ju20V1Dd5Rx01/1UT69VfEjT8alPnA22quL0m/+vLnPhcp1nzwbff7cvjnmqbgWScIz64PZXCT815xnPwuerN//88r0q/aNWFWZ/v/w057RSxbJt5eYL+peqo9mrG6973WArD9diXXhJvw/S9h+22Zd8XPOaqtG+28RpvooxEEdUVhn282s3py7+RSqoMP3KujovQr6+F4FHb9XQSfvVdCn9yrIYP6fBYks4S+NEWExgLqN43AjmuMwG5rj8BKa47AKmuNwAprj6OhojqMfozmOborglCp29UKrsx86ens/d/sc4cfdPiX4cbfPAH7c7QO+H3f7+O7H3T6c+3G3j95+3O2DNZ7bLLWiG22zrAx22VSpMlMlj0r+Ek5jmWaZ/IWGV096PCc5SQJMM7K1E3EwLWbm9fYeYkzqP5+XdcoVqWk0FbMq12lvaMV59sSlTkAjliSaRwjMeVnljhbx6dM5n/KcZzGn7Nh0UCkyHmVVOiHomws2I2PxLCFuviWRZFBYdWhWlfPaJIKgU6cszlV41RQjGx9uRRHeVjUkuqik5ESs7zRdzLDCcwODCU8NDCY8MzCY8MTA0oyqiVoaUUu1NKIGa2lE7db0T6p2a2lE7dbSiNqtpYW324MopRni7VXH/vC9u0up6h3n4HqMxSxjegEQPt20e6bRPcvZLGeLeVTvH3dj7XPGlnOhktfogWJOW5Go1vWmi1zqsxZZFd6gGzQqc614RPZa8YgMtuKFW+xOL5PrBdo1TT4zriZlp2kNaZBpx0xWzYI23G2sDO9hawNcibwgs0E3lqAHf6+Xs7WcFCPfupbhFVuzwm31dlQirV6LJKilVPEjzTB8/brguU7LHoNJV0pK9cwTOuK4zFXT12zLHxhJBln+W7qYs0KYXGkDMXyqX16rju7YIviE7iUTGY1u33ZSJmREt4K4fri7jR7Uok4z64ahAV6oslQpGbPdCfzbLz75O00Fz3USnL0Sne050faQgV0KgkmmIamEiKSXmSITJHOo4f2Tv04UyxMa2n3Om9tDSk5EHLN00Sw6CLylx8VnPf4QrIYM718sF/W+EJWpHkhg1rZhUU3+zePwoe67ikh2hv6oSrP/aJa6JpoOF75M2MCFLxGMmnp6qPsvwclu4MJPdgNHdbKXkhWFcF5C9eZRne6SR32+4clfy1NS5dNK0jXgEkjWgksgWRMqWaVZQXnGhkd4woZHfb6EXcbwCLbkDO8fuUjIxDAwKiUMjEoGA6PSwMBIBQi/Q8eChd+mY8HC79VpYERLAAtG1c9Ip3+iqzwWjKqfGRhVPzMwqn5mYFT97PBrxKdTvQimm2IsJFWfs5B0E01W8nShcpa/EiG/ST5jBBukDe0+V9P6uQGVNTdxEyDrPWpJuNhucFQi/+ITsqrVLMp6EeyIMimVItpbW084JnLz3rVtYeaZi+AqmM32W/7EKVbjFozoMkADC5fNgoVPUxYsfJqyYOHTlAULn6YsWPg0ZcHC71++lyzmcyUTnjuM2FeRaLxgcXttCVyjHrRXfytm8zIaz1eXqGzM8d7WyOUu00bY9gK7Borjg56wO56IKl1WFD4BdHw4PNgYeiN4+aBWT/B6+bsR+XFgJCzzeHvkOrXbiDwZGAnL/DQw0oxSG5F9g/hXlj92doSTvv6z2phwdL6Tvl60Cu4stq8jrSK7uuBJXy/asEp0Hsf1JS6ozjDPuOOHmccdj3GRm4Kxk5sy2FduRJ/BfvAnUS9HMYOmKW91y8/b4g7NlDpo5PyzUs3Fpo2rpMOfRLzRq/2s4FEn53D41daNUcbdjoOHGzdi8LjjRgwegNyIQSORMxw1JLkpg8cmN2LwIOVGoEcrOCPgRisYjxutYLzPaAUpPqNVwCrAjRi8HHAj0EaFCLRRA1YKbgTKqCDcy6iQgjYqRKCNChFoo8IFGM6oMB5nVBjvY1RI8TEqpKCNChFoo0IE2qgQgTYqRKCN6rm2d4Z7GRVS0EaFCLRRIQJtVLNeDDAqjMcZFcb7GBVSfIwKKWijQgTaqBCBNipEoI0KEWijQgTKqCDcy6iQgjYqRKCNChFoozbPx/obFcbjjArjfYwKKT5GhRS0USECbVSIQBsVItBGhQi0USECZVQQ7mVUSEEbFSLQRoUItFHNpYMAo8J4nFFhvI9RIcXHqJCCNipEoI0KEWijQgTaqBCBNipEoIwKwr2MCiloo0IE2qgQ0dc/2+vqrmdD9vG7ns7HTIZfumor9cP+/gEbdTgctayVmzX8AZoLpR6jzqdlD02+MQwiJlIos0XtuBfE5poLpKir9X9c9j+WZtMDvymsfYDHXOgH8KOhkWBP5aivy9uRIMk76uvpdiRYdR71jb52JJgGj/oGXePL5Z1UejoCwX3DjBW87wjvG62tcNjEfWO0FQhbuG9ktgJhA/eNx1bgx6genN9GfxzYTserm6IBoa87WoQTN6GvW0KtlsMxNMZQ0dyEoeq5CUNldBNQejoxeGHdKLTCbpSf1NBmWKn9jeomYKWGBC+pAcZfaojylhqi/KSGAyNWakjASu0/OLsJXlIDjL/UEOUtNUT5SQ2nMqzUkICVGhKwUgdOyE6Mv9QQ5S01RPlJDRd3WKkhASs1JGClhgQvqQHGX2qI8pYaovykBlkyWmpIwEoNCVipIcFLaoDxlxqivKWGqD6pzS7KhtQoha1w3CLMCsRNyFYgbnC2Aj2yJSvaM1uyCJ7ZEtRqqTkuW7JFcxOGqucmDJXRTUDp6cTghXWj0Aq7UX5S47KlLqn9jeomYKXGZUtOqXHZUq/UuGypV2pctuSWGpctdUmNy5a6pPYfnN0EL6lx2VKv1LhsqVdqXLbklhqXLXVJjcuWuqTGZUtdUgdOyE6Mv9S4bKlXaly25JYaly11SY3LlrqkxmVLXVLjsiWn1LhsqVdqXLbUKzUuW3JLjcuWuqTGZUtdUuOypS6pcdmSU2pcttQrNS5b6pXakS3tPm/8aljNNr93pz9cvi54/cXx1gMzSfPFue1FQPPBm2T16151cF2TqP3Fs/ZtU+H2gmFTogmERcVzXVbcfuWXo6h7JYU+b5Yn+nAJinR8s6+pwvrkl59uG3N9EbT53MYFz94al3Vj99TWiMGq3vZpFHNV8XPbBbfVUddoIpsfw9P/3GSJBjy3v7DW1DV5YQ1KH7/kUt6x5tNq4f6o5NOyObq/Zx6ffXN80nxhoTM+N4OEE7C7WZnmZfvDd44Wb37CoL167Wj18yquMi61G3hHm5v7KUKbe13B5X/Fl/8BAAD//wMAUEsDBBQABgAIAAAAIQDtJ+K6ZQEAALUCAAAQAAgBZG9jUHJvcHMvYXBwLnhtbCCiBAEooAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJxSwUrFMBC8C/5D6d2XPkER2RcRRTyoCK/qOSTbNpgmIVnF9/durNaqN3Pand1MZobA2dvoqldM2Qa/qderpq7Q62Cs7zf1Q3t1cFJXmZQ3ygWPm3qHuT6T+3twn0LERBZzxRQ+b+qBKJ4KkfWAo8orHnuedCGNirhNvQhdZzVeBv0yoidx2DTHAt8IvUFzEGfCemI8faX/kpqgi7782O4i80locYxOEcq7ctOtTKARxIxCG0i51o4oG4bnBu5Vj1muQUwFPIVkctmZCrgYVFKaOD95BGLRwXmMzmpFnKu8tTqFHDqqbpW2nkIeqkIAYrkF7GGL+iVZ2pUnli3cWD8JmQoWllSfVBw+1c0dbLVyeMHuZadcRhDfQGF5zg+xDZfF9ef8J7iw9GRp2Eal8Ze5BQ5bRtGw1Pm1GYBrDj+5ws53fY/ma+fvoMT1OP1CuT5aNXw+wvnC2OL8PeQ7AAAA//8DAFBLAQItABQABgAIAAAAIQBnzQ+udAEAADoFAAATAAAAAAAAAAAAAAAAAAAAAABbQ29udGVudF9UeXBlc10ueG1sUEsBAi0AFAAGAAgAAAAhAMfCJ7z/AAAA3wIAAAsAAAAAAAAAAAAAAAAArQMAAF9yZWxzLy5yZWxzUEsBAi0AFAAGAAgAAAAhABOqPof2AAAAMQMAABwAAAAAAAAAAAAAAAAA3QYAAHdvcmQvX3JlbHMvZG9jdW1lbnQueG1sLnJlbHNQSwECLQAUAAYACAAAACEAM+oBymACAAACBwAAEQAAAAAAAAAAAAAAAAAVCQAAd29yZC9kb2N1bWVudC54bWxQSwECLQAUAAYACAAAACEAJyDgAjMGAACMGgAAFQAAAAAAAAAAAAAAAACkCwAAd29yZC90aGVtZS90aGVtZTEueG1sUEsBAi0ACgAAAAAAAAAhAGoT2A2MJQAAjCUAABcAAAAAAAAAAAAAAAAAChIAAGRvY1Byb3BzL3RodW1ibmFpbC5qcGVnUEsBAi0AFAAGAAgAAAAhANJeFd+BAwAATAkAABEAAAAAAAAAAAAAAAAAyzcAAHdvcmQvc2V0dGluZ3MueG1sUEsBAi0AFAAGAAgAAAAhAPC8NQHcAQAA8QUAABIAAAAAAAAAAAAAAAAAezsAAHdvcmQvZm9udFRhYmxlLnhtbFBLAQItABQABgAIAAAAIQDgi8pVHwEAABECAAAUAAAAAAAAAAAAAAAAAIc9AAB3b3JkL3dlYlNldHRpbmdzLnhtbFBLAQItABQABgAIAAAAIQCf6lVfewEAABUDAAARAAAAAAAAAAAAAAAAANg+AABkb2NQcm9wcy9jb3JlLnhtbFBLAQItABQABgAIAAAAIQCBlv05MgsAAGRyAAAPAAAAAAAAAAAAAAAAAIpBAAB3b3JkL3N0eWxlcy54bWxQSwECLQAUAAYACAAAACEA7SfiumUBAAC1AgAAEAAAAAAAAAAAAAAAAADpTAAAZG9jUHJvcHMvYXBwLnhtbFBLBQYAAAAADAAMAAYDAACETwAAAAA='), + array('data:a!b#c&d-e^f_g+h.i/a!b#c&d-e^f_g+h.i;base64,foobar'), + ); + + if (!defined('HHVM_VERSION')) { + // See https://github.com/facebook/hhvm/issues/6354 + $data[] = array('data:text/plain;charset=utf-8;base64,SGVsbG8gV29ybGQh'); + } + + return $data; + } + + private function getContent(\SplFileObject $file) + { + $buffer = ''; + while (!$file->eof()) { + $buffer .= $file->fgets(); + } + + return $buffer; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6d622bbcc0e05021b9e127aaed2eba738834e589 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Normalizer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; + +/** + * @author Kévin Dunglas + */ +class DateTimeNormalizerTest extends TestCase +{ + /** + * @var DateTimeNormalizer + */ + private $normalizer; + + protected function setUp() + { + $this->normalizer = new DateTimeNormalizer(); + } + + public function testSupportsNormalization() + { + $this->assertTrue($this->normalizer->supportsNormalization(new \DateTime())); + $this->assertTrue($this->normalizer->supportsNormalization(new \DateTimeImmutable())); + $this->assertFalse($this->normalizer->supportsNormalization(new \stdClass())); + } + + public function testNormalize() + { + $this->assertEquals('2016-01-01T00:00:00+00:00', $this->normalizer->normalize(new \DateTime('2016/01/01', new \DateTimeZone('UTC')))); + $this->assertEquals('2016-01-01T00:00:00+00:00', $this->normalizer->normalize(new \DateTimeImmutable('2016/01/01', new \DateTimeZone('UTC')))); + } + + public function testNormalizeUsingFormatPassedInContext() + { + $this->assertEquals('2016', $this->normalizer->normalize(new \DateTime('2016/01/01'), null, array(DateTimeNormalizer::FORMAT_KEY => 'Y'))); + } + + public function testNormalizeUsingFormatPassedInConstructor() + { + $this->assertEquals('16', (new DateTimeNormalizer('y'))->normalize(new \DateTime('2016/01/01', new \DateTimeZone('UTC')))); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException + * @expectedExceptionMessage The object must implement the "\DateTimeInterface". + */ + public function testNormalizeInvalidObjectThrowsException() + { + $this->normalizer->normalize(new \stdClass()); + } + + public function testSupportsDenormalization() + { + $this->assertTrue($this->normalizer->supportsDenormalization('2016-01-01T00:00:00+00:00', \DateTimeInterface::class)); + $this->assertTrue($this->normalizer->supportsDenormalization('2016-01-01T00:00:00+00:00', \DateTime::class)); + $this->assertTrue($this->normalizer->supportsDenormalization('2016-01-01T00:00:00+00:00', \DateTimeImmutable::class)); + $this->assertFalse($this->normalizer->supportsDenormalization('foo', 'Bar')); + } + + public function testDenormalize() + { + $this->assertEquals(new \DateTimeImmutable('2016/01/01', new \DateTimeZone('UTC')), $this->normalizer->denormalize('2016-01-01T00:00:00+00:00', \DateTimeInterface::class)); + $this->assertEquals(new \DateTimeImmutable('2016/01/01', new \DateTimeZone('UTC')), $this->normalizer->denormalize('2016-01-01T00:00:00+00:00', \DateTimeImmutable::class)); + $this->assertEquals(new \DateTime('2016/01/01', new \DateTimeZone('UTC')), $this->normalizer->denormalize('2016-01-01T00:00:00+00:00', \DateTime::class)); + } + + public function testDenormalizeUsingFormatPassedInContext() + { + $this->assertEquals(new \DateTimeImmutable('2016/01/01'), $this->normalizer->denormalize('2016.01.01', \DateTimeInterface::class, null, array(DateTimeNormalizer::FORMAT_KEY => 'Y.m.d|'))); + $this->assertEquals(new \DateTimeImmutable('2016/01/01'), $this->normalizer->denormalize('2016.01.01', \DateTimeImmutable::class, null, array(DateTimeNormalizer::FORMAT_KEY => 'Y.m.d|'))); + $this->assertEquals(new \DateTime('2016/01/01'), $this->normalizer->denormalize('2016.01.01', \DateTime::class, null, array(DateTimeNormalizer::FORMAT_KEY => 'Y.m.d|'))); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testDenormalizeInvalidDataThrowsException() + { + $this->normalizer->denormalize('invalid date', \DateTimeInterface::class); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testDenormalizeFormatMismatchThrowsException() + { + $this->normalizer->denormalize('2016-01-01T00:00:00+00:00', \DateTimeInterface::class, null, array(DateTimeNormalizer::FORMAT_KEY => 'Y-m-d|')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ee0a159f06f8a3c7e372b6dfd9c9d25b943b3de0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php @@ -0,0 +1,809 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Normalizer; + +use Doctrine\Common\Annotations\AnnotationReader; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter; +use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer; +use Symfony\Component\Serializer\Serializer; +use Symfony\Component\Serializer\SerializerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\Serializer\Tests\Fixtures\CircularReferenceDummy; +use Symfony\Component\Serializer\Tests\Fixtures\MaxDepthDummy; +use Symfony\Component\Serializer\Tests\Fixtures\SiblingHolder; +use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; +use Symfony\Component\Serializer\Tests\Fixtures\GroupDummy; + +class GetSetMethodNormalizerTest extends TestCase +{ + /** + * @var GetSetMethodNormalizer + */ + private $normalizer; + /** + * @var SerializerInterface + */ + private $serializer; + + protected function setUp() + { + $this->serializer = $this->getMockBuilder(__NAMESPACE__.'\SerializerNormalizer')->getMock(); + $this->normalizer = new GetSetMethodNormalizer(); + $this->normalizer->setSerializer($this->serializer); + } + + public function testInterface() + { + $this->assertInstanceOf('Symfony\Component\Serializer\Normalizer\NormalizerInterface', $this->normalizer); + $this->assertInstanceOf('Symfony\Component\Serializer\Normalizer\DenormalizerInterface', $this->normalizer); + } + + public function testNormalize() + { + $obj = new GetSetDummy(); + $object = new \stdClass(); + $obj->setFoo('foo'); + $obj->setBar('bar'); + $obj->setBaz(true); + $obj->setCamelCase('camelcase'); + $obj->setObject($object); + + $this->serializer + ->expects($this->once()) + ->method('normalize') + ->with($object, 'any') + ->will($this->returnValue('string_object')) + ; + + $this->assertEquals( + array( + 'foo' => 'foo', + 'bar' => 'bar', + 'baz' => true, + 'fooBar' => 'foobar', + 'camelCase' => 'camelcase', + 'object' => 'string_object', + ), + $this->normalizer->normalize($obj, 'any') + ); + } + + public function testDenormalize() + { + $obj = $this->normalizer->denormalize( + array('foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar'), + __NAMESPACE__.'\GetSetDummy', + 'any' + ); + $this->assertEquals('foo', $obj->getFoo()); + $this->assertEquals('bar', $obj->getBar()); + $this->assertTrue($obj->isBaz()); + } + + public function testDenormalizeWithObject() + { + $data = new \stdClass(); + $data->foo = 'foo'; + $data->bar = 'bar'; + $data->fooBar = 'foobar'; + $obj = $this->normalizer->denormalize($data, __NAMESPACE__.'\GetSetDummy', 'any'); + $this->assertEquals('foo', $obj->getFoo()); + $this->assertEquals('bar', $obj->getBar()); + } + + public function testDenormalizeNull() + { + $this->assertEquals(new GetSetDummy(), $this->normalizer->denormalize(null, __NAMESPACE__.'\GetSetDummy')); + } + + public function testConstructorDenormalize() + { + $obj = $this->normalizer->denormalize( + array('foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar'), + __NAMESPACE__.'\GetConstructorDummy', 'any'); + $this->assertEquals('foo', $obj->getFoo()); + $this->assertEquals('bar', $obj->getBar()); + $this->assertTrue($obj->isBaz()); + } + + public function testConstructorDenormalizeWithNullArgument() + { + $obj = $this->normalizer->denormalize( + array('foo' => 'foo', 'bar' => null, 'baz' => true), + __NAMESPACE__.'\GetConstructorDummy', 'any'); + $this->assertEquals('foo', $obj->getFoo()); + $this->assertNull($obj->getBar()); + $this->assertTrue($obj->isBaz()); + } + + public function testConstructorDenormalizeWithMissingOptionalArgument() + { + $obj = $this->normalizer->denormalize( + array('foo' => 'test', 'baz' => array(1, 2, 3)), + __NAMESPACE__.'\GetConstructorOptionalArgsDummy', 'any'); + $this->assertEquals('test', $obj->getFoo()); + $this->assertEquals(array(), $obj->getBar()); + $this->assertEquals(array(1, 2, 3), $obj->getBaz()); + } + + public function testConstructorDenormalizeWithOptionalDefaultArgument() + { + $obj = $this->normalizer->denormalize( + array('bar' => 'test'), + __NAMESPACE__.'\GetConstructorArgsWithDefaultValueDummy', 'any'); + $this->assertEquals(array(), $obj->getFoo()); + $this->assertEquals('test', $obj->getBar()); + } + + /** + * @requires PHP 5.6 + */ + public function testConstructorDenormalizeWithVariadicArgument() + { + $obj = $this->normalizer->denormalize( + array('foo' => array(1, 2, 3)), + 'Symfony\Component\Serializer\Tests\Fixtures\VariadicConstructorArgsDummy', 'any'); + $this->assertEquals(array(1, 2, 3), $obj->getFoo()); + } + + /** + * @requires PHP 5.6 + */ + public function testConstructorDenormalizeWithMissingVariadicArgument() + { + $obj = $this->normalizer->denormalize( + array(), + 'Symfony\Component\Serializer\Tests\Fixtures\VariadicConstructorArgsDummy', 'any'); + $this->assertEquals(array(), $obj->getFoo()); + } + + public function testConstructorWithObjectDenormalize() + { + $data = new \stdClass(); + $data->foo = 'foo'; + $data->bar = 'bar'; + $data->baz = true; + $data->fooBar = 'foobar'; + $obj = $this->normalizer->denormalize($data, __NAMESPACE__.'\GetConstructorDummy', 'any'); + $this->assertEquals('foo', $obj->getFoo()); + $this->assertEquals('bar', $obj->getBar()); + } + + public function testConstructorWArgWithPrivateMutator() + { + $obj = $this->normalizer->denormalize(array('foo' => 'bar'), __NAMESPACE__.'\ObjectConstructorArgsWithPrivateMutatorDummy', 'any'); + $this->assertEquals('bar', $obj->getFoo()); + } + + public function testGroupsNormalize() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new GetSetMethodNormalizer($classMetadataFactory); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFoo('foo'); + $obj->setBar('bar'); + $obj->setFooBar('fooBar'); + $obj->setSymfony('symfony'); + $obj->setKevin('kevin'); + $obj->setCoopTilleuls('coopTilleuls'); + + $this->assertEquals(array( + 'bar' => 'bar', + ), $this->normalizer->normalize($obj, null, array(GetSetMethodNormalizer::GROUPS => array('c')))); + + $this->assertEquals(array( + 'symfony' => 'symfony', + 'foo' => 'foo', + 'fooBar' => 'fooBar', + 'bar' => 'bar', + 'kevin' => 'kevin', + 'coopTilleuls' => 'coopTilleuls', + ), $this->normalizer->normalize($obj, null, array(GetSetMethodNormalizer::GROUPS => array('a', 'c')))); + } + + public function testGroupsDenormalize() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new GetSetMethodNormalizer($classMetadataFactory); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFoo('foo'); + + $toNormalize = array('foo' => 'foo', 'bar' => 'bar'); + + $normalized = $this->normalizer->denormalize( + $toNormalize, + 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', + null, + array(GetSetMethodNormalizer::GROUPS => array('a')) + ); + $this->assertEquals($obj, $normalized); + + $obj->setBar('bar'); + + $normalized = $this->normalizer->denormalize( + $toNormalize, + 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', + null, + array(GetSetMethodNormalizer::GROUPS => array('a', 'b')) + ); + $this->assertEquals($obj, $normalized); + } + + public function testGroupsNormalizeWithNameConverter() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new GetSetMethodNormalizer($classMetadataFactory, new CamelCaseToSnakeCaseNameConverter()); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFooBar('@dunglas'); + $obj->setSymfony('@coopTilleuls'); + $obj->setCoopTilleuls('les-tilleuls.coop'); + + $this->assertEquals( + array( + 'bar' => null, + 'foo_bar' => '@dunglas', + 'symfony' => '@coopTilleuls', + ), + $this->normalizer->normalize($obj, null, array(GetSetMethodNormalizer::GROUPS => array('name_converter'))) + ); + } + + public function testGroupsDenormalizeWithNameConverter() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new GetSetMethodNormalizer($classMetadataFactory, new CamelCaseToSnakeCaseNameConverter()); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFooBar('@dunglas'); + $obj->setSymfony('@coopTilleuls'); + + $this->assertEquals( + $obj, + $this->normalizer->denormalize(array( + 'bar' => null, + 'foo_bar' => '@dunglas', + 'symfony' => '@coopTilleuls', + 'coop_tilleuls' => 'les-tilleuls.coop', + ), 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, array(GetSetMethodNormalizer::GROUPS => array('name_converter'))) + ); + } + + /** + * @dataProvider provideCallbacks + */ + public function testCallbacks($callbacks, $value, $result, $message) + { + $this->normalizer->setCallbacks($callbacks); + + $obj = new GetConstructorDummy('', $value, true); + + $this->assertEquals( + $result, + $this->normalizer->normalize($obj, 'any'), + $message + ); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testUncallableCallbacks() + { + $this->normalizer->setCallbacks(array('bar' => null)); + + $obj = new GetConstructorDummy('baz', 'quux', true); + + $this->normalizer->normalize($obj, 'any'); + } + + public function testIgnoredAttributes() + { + $this->normalizer->setIgnoredAttributes(array('foo', 'bar', 'baz', 'camelCase', 'object')); + + $obj = new GetSetDummy(); + $obj->setFoo('foo'); + $obj->setBar('bar'); + $obj->setBaz(true); + + $this->assertEquals( + array('fooBar' => 'foobar'), + $this->normalizer->normalize($obj, 'any') + ); + } + + public function provideCallbacks() + { + return array( + array( + array( + 'bar' => function ($bar) { + return 'baz'; + }, + ), + 'baz', + array('foo' => '', 'bar' => 'baz', 'baz' => true), + 'Change a string', + ), + array( + array( + 'bar' => function ($bar) { + }, + ), + 'baz', + array('foo' => '', 'bar' => null, 'baz' => true), + 'Null an item', + ), + array( + array( + 'bar' => function ($bar) { + return $bar->format('d-m-Y H:i:s'); + }, + ), + new \DateTime('2011-09-10 06:30:00'), + array('foo' => '', 'bar' => '10-09-2011 06:30:00', 'baz' => true), + 'Format a date', + ), + array( + array( + 'bar' => function ($bars) { + $foos = ''; + foreach ($bars as $bar) { + $foos .= $bar->getFoo(); + } + + return $foos; + }, + ), + array(new GetConstructorDummy('baz', '', false), new GetConstructorDummy('quux', '', false)), + array('foo' => '', 'bar' => 'bazquux', 'baz' => true), + 'Collect a property', + ), + array( + array( + 'bar' => function ($bars) { + return count($bars); + }, + ), + array(new GetConstructorDummy('baz', '', false), new GetConstructorDummy('quux', '', false)), + array('foo' => '', 'bar' => 2, 'baz' => true), + 'Count a property', + ), + ); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\LogicException + * @expectedExceptionMessage Cannot normalize attribute "object" because the injected serializer is not a normalizer + */ + public function testUnableToNormalizeObjectAttribute() + { + $serializer = $this->getMockBuilder('Symfony\Component\Serializer\SerializerInterface')->getMock(); + $this->normalizer->setSerializer($serializer); + + $obj = new GetSetDummy(); + $object = new \stdClass(); + $obj->setObject($object); + + $this->normalizer->normalize($obj, 'any'); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\CircularReferenceException + */ + public function testUnableToNormalizeCircularReference() + { + $serializer = new Serializer(array($this->normalizer)); + $this->normalizer->setSerializer($serializer); + $this->normalizer->setCircularReferenceLimit(2); + + $obj = new CircularReferenceDummy(); + + $this->normalizer->normalize($obj); + } + + public function testSiblingReference() + { + $serializer = new Serializer(array($this->normalizer)); + $this->normalizer->setSerializer($serializer); + + $siblingHolder = new SiblingHolder(); + + $expected = array( + 'sibling0' => array('coopTilleuls' => 'Les-Tilleuls.coop'), + 'sibling1' => array('coopTilleuls' => 'Les-Tilleuls.coop'), + 'sibling2' => array('coopTilleuls' => 'Les-Tilleuls.coop'), + ); + $this->assertEquals($expected, $this->normalizer->normalize($siblingHolder)); + } + + public function testCircularReferenceHandler() + { + $serializer = new Serializer(array($this->normalizer)); + $this->normalizer->setSerializer($serializer); + $this->normalizer->setCircularReferenceHandler(function ($obj) { + return get_class($obj); + }); + + $obj = new CircularReferenceDummy(); + + $expected = array('me' => 'Symfony\Component\Serializer\Tests\Fixtures\CircularReferenceDummy'); + $this->assertEquals($expected, $this->normalizer->normalize($obj)); + } + + public function testObjectToPopulate() + { + $dummy = new GetSetDummy(); + $dummy->setFoo('foo'); + + $obj = $this->normalizer->denormalize( + array('bar' => 'bar'), + __NAMESPACE__.'\GetSetDummy', + null, + array(GetSetMethodNormalizer::OBJECT_TO_POPULATE => $dummy) + ); + + $this->assertEquals($dummy, $obj); + $this->assertEquals('foo', $obj->getFoo()); + $this->assertEquals('bar', $obj->getBar()); + } + + public function testDenormalizeNonExistingAttribute() + { + $this->assertEquals( + new GetSetDummy(), + $this->normalizer->denormalize(array('non_existing' => true), __NAMESPACE__.'\GetSetDummy') + ); + } + + public function testDenormalizeShouldNotSetStaticAttribute() + { + $obj = $this->normalizer->denormalize(array('staticObject' => true), __NAMESPACE__.'\GetSetDummy'); + + $this->assertEquals(new GetSetDummy(), $obj); + $this->assertNull(GetSetDummy::getStaticObject()); + } + + public function testNoTraversableSupport() + { + $this->assertFalse($this->normalizer->supportsNormalization(new \ArrayObject())); + } + + public function testNoStaticGetSetSupport() + { + $this->assertFalse($this->normalizer->supportsNormalization(new ObjectWithJustStaticSetterDummy())); + } + + public function testPrivateSetter() + { + $obj = $this->normalizer->denormalize(array('foo' => 'foobar'), __NAMESPACE__.'\ObjectWithPrivateSetterDummy'); + $this->assertEquals('bar', $obj->getFoo()); + } + + public function testMaxDepth() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new GetSetMethodNormalizer($classMetadataFactory); + $serializer = new Serializer(array($this->normalizer)); + $this->normalizer->setSerializer($serializer); + + $level1 = new MaxDepthDummy(); + $level1->bar = 'level1'; + + $level2 = new MaxDepthDummy(); + $level2->bar = 'level2'; + $level1->child = $level2; + + $level3 = new MaxDepthDummy(); + $level3->bar = 'level3'; + $level2->child = $level3; + + $level4 = new MaxDepthDummy(); + $level4->bar = 'level4'; + $level3->child = $level4; + + $result = $serializer->normalize($level1, null, array(GetSetMethodNormalizer::ENABLE_MAX_DEPTH => true)); + + $expected = array( + 'bar' => 'level1', + 'child' => array( + 'bar' => 'level2', + 'child' => array( + 'bar' => 'level3', + 'child' => array( + 'child' => null, + ), + ), + ), + ); + + $this->assertEquals($expected, $result); + } +} + +class GetSetDummy +{ + protected $foo; + private $bar; + private $baz; + protected $camelCase; + protected $object; + private static $staticObject; + + public function getFoo() + { + return $this->foo; + } + + public function setFoo($foo) + { + $this->foo = $foo; + } + + public function getBar() + { + return $this->bar; + } + + public function setBar($bar) + { + $this->bar = $bar; + } + + public function isBaz() + { + return $this->baz; + } + + public function setBaz($baz) + { + $this->baz = $baz; + } + + public function getFooBar() + { + return $this->foo.$this->bar; + } + + public function getCamelCase() + { + return $this->camelCase; + } + + public function setCamelCase($camelCase) + { + $this->camelCase = $camelCase; + } + + public function otherMethod() + { + throw new \RuntimeException('Dummy::otherMethod() should not be called'); + } + + public function setObject($object) + { + $this->object = $object; + } + + public function getObject() + { + return $this->object; + } + + public static function getStaticObject() + { + return self::$staticObject; + } + + public static function setStaticObject($object) + { + self::$staticObject = $object; + } + + protected function getPrivate() + { + throw new \RuntimeException('Dummy::getPrivate() should not be called'); + } +} + +class GetConstructorDummy +{ + protected $foo; + private $bar; + private $baz; + + public function __construct($foo, $bar, $baz) + { + $this->foo = $foo; + $this->bar = $bar; + $this->baz = $baz; + } + + public function getFoo() + { + return $this->foo; + } + + public function getBar() + { + return $this->bar; + } + + public function isBaz() + { + return $this->baz; + } + + public function otherMethod() + { + throw new \RuntimeException('Dummy::otherMethod() should not be called'); + } +} + +abstract class SerializerNormalizer implements SerializerInterface, NormalizerInterface +{ +} + +class GetConstructorOptionalArgsDummy +{ + protected $foo; + private $bar; + private $baz; + + public function __construct($foo, $bar = array(), $baz = array()) + { + $this->foo = $foo; + $this->bar = $bar; + $this->baz = $baz; + } + + public function getFoo() + { + return $this->foo; + } + + public function getBar() + { + return $this->bar; + } + + public function getBaz() + { + return $this->baz; + } + + public function otherMethod() + { + throw new \RuntimeException('Dummy::otherMethod() should not be called'); + } +} + +class GetConstructorArgsWithDefaultValueDummy +{ + protected $foo; + protected $bar; + + public function __construct($foo = array(), $bar) + { + $this->foo = $foo; + $this->bar = $bar; + } + + public function getFoo() + { + return $this->foo; + } + + public function getBar() + { + return $this->bar; + } + + public function otherMethod() + { + throw new \RuntimeException('Dummy::otherMethod() should not be called'); + } +} + +class GetCamelizedDummy +{ + private $kevinDunglas; + private $fooBar; + private $bar_foo; + + public function __construct($kevinDunglas = null) + { + $this->kevinDunglas = $kevinDunglas; + } + + public function getKevinDunglas() + { + return $this->kevinDunglas; + } + + public function setFooBar($fooBar) + { + $this->fooBar = $fooBar; + } + + public function getFooBar() + { + return $this->fooBar; + } + + public function setBar_foo($bar_foo) + { + $this->bar_foo = $bar_foo; + } + + public function getBar_foo() + { + return $this->bar_foo; + } +} + +class ObjectConstructorArgsWithPrivateMutatorDummy +{ + private $foo; + + public function __construct($foo) + { + $this->setFoo($foo); + } + + public function getFoo() + { + return $this->foo; + } + + private function setFoo($foo) + { + $this->foo = $foo; + } +} + +class ObjectWithPrivateSetterDummy +{ + private $foo = 'bar'; + + public function getFoo() + { + return $this->foo; + } + + private function setFoo($foo) + { + } +} + +class ObjectWithJustStaticSetterDummy +{ + private static $foo = 'bar'; + + public static function getFoo() + { + return self::$foo; + } + + public static function setFoo($foo) + { + self::$foo = $foo; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/JsonSerializableNormalizerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/JsonSerializableNormalizerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..065d92b99f05e05a3ce7a75c540b3f5411c7b2ed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/JsonSerializableNormalizerTest.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Normalizer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\Serializer\SerializerInterface; +use Symfony\Component\Serializer\Tests\Fixtures\JsonSerializableDummy; + +/** + * @author Fred Cox + */ +class JsonSerializableNormalizerTest extends TestCase +{ + /** + * @var JsonSerializableNormalizer + */ + private $normalizer; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject|SerializerInterface + */ + private $serializer; + + protected function setUp() + { + $this->serializer = $this->getMockBuilder(JsonSerializerNormalizer::class)->getMock(); + $this->normalizer = new JsonSerializableNormalizer(); + $this->normalizer->setSerializer($this->serializer); + } + + public function testSupportNormalization() + { + $this->assertTrue($this->normalizer->supportsNormalization(new JsonSerializableDummy())); + $this->assertFalse($this->normalizer->supportsNormalization(new \stdClass())); + } + + public function testNormalize() + { + $this->serializer + ->expects($this->once()) + ->method('normalize') + ->will($this->returnCallback(function ($data) { + $this->assertArraySubset(array('foo' => 'a', 'bar' => 'b', 'baz' => 'c'), $data); + + return 'string_object'; + })) + ; + + $this->assertEquals('string_object', $this->normalizer->normalize(new JsonSerializableDummy())); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\CircularReferenceException + */ + public function testCircularNormalize() + { + $this->normalizer->setCircularReferenceLimit(1); + + $this->serializer + ->expects($this->once()) + ->method('normalize') + ->will($this->returnCallback(function ($data, $format, $context) { + $this->normalizer->normalize($data['qux'], $format, $context); + + return 'string_object'; + })) + ; + + $this->assertEquals('string_object', $this->normalizer->normalize(new JsonSerializableDummy())); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException + * @expectedExceptionMessage The object must implement "JsonSerializable". + */ + public function testInvalidDataThrowException() + { + $this->normalizer->normalize(new \stdClass()); + } +} + +abstract class JsonSerializerNormalizer implements SerializerInterface, NormalizerInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..eae22b26ab7559aa510b41709f0b51e924f1572e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php @@ -0,0 +1,913 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Normalizer; + +use Doctrine\Common\Annotations\AnnotationReader; +use PHPUnit\Framework\TestCase; +use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor; +use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; +use Symfony\Component\PropertyInfo\PropertyInfoExtractor; +use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter; +use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer; +use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; +use Symfony\Component\Serializer\Serializer; +use Symfony\Component\Serializer\SerializerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\Serializer\Tests\Fixtures\CircularReferenceDummy; +use Symfony\Component\Serializer\Tests\Fixtures\MaxDepthDummy; +use Symfony\Component\Serializer\Tests\Fixtures\SiblingHolder; +use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; +use Symfony\Component\Serializer\Tests\Fixtures\GroupDummy; + +/** + * @author Kévin Dunglas + */ +class ObjectNormalizerTest extends TestCase +{ + /** + * @var ObjectNormalizer + */ + private $normalizer; + /** + * @var SerializerInterface + */ + private $serializer; + + protected function setUp() + { + $this->serializer = $this->getMockBuilder(__NAMESPACE__.'\ObjectSerializerNormalizer')->getMock(); + $this->normalizer = new ObjectNormalizer(); + $this->normalizer->setSerializer($this->serializer); + } + + public function testNormalize() + { + $obj = new ObjectDummy(); + $object = new \stdClass(); + $obj->setFoo('foo'); + $obj->bar = 'bar'; + $obj->setBaz(true); + $obj->setCamelCase('camelcase'); + $obj->setObject($object); + + $this->serializer + ->expects($this->once()) + ->method('normalize') + ->with($object, 'any') + ->will($this->returnValue('string_object')) + ; + + $this->assertEquals( + array( + 'foo' => 'foo', + 'bar' => 'bar', + 'baz' => true, + 'fooBar' => 'foobar', + 'camelCase' => 'camelcase', + 'object' => 'string_object', + ), + $this->normalizer->normalize($obj, 'any') + ); + } + + public function testDenormalize() + { + $obj = $this->normalizer->denormalize( + array('foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar'), + __NAMESPACE__.'\ObjectDummy', + 'any' + ); + $this->assertEquals('foo', $obj->getFoo()); + $this->assertEquals('bar', $obj->bar); + $this->assertTrue($obj->isBaz()); + } + + public function testDenormalizeWithObject() + { + $data = new \stdClass(); + $data->foo = 'foo'; + $data->bar = 'bar'; + $data->fooBar = 'foobar'; + $obj = $this->normalizer->denormalize($data, __NAMESPACE__.'\ObjectDummy', 'any'); + $this->assertEquals('foo', $obj->getFoo()); + $this->assertEquals('bar', $obj->bar); + } + + public function testDenormalizeNull() + { + $this->assertEquals(new ObjectDummy(), $this->normalizer->denormalize(null, __NAMESPACE__.'\ObjectDummy')); + } + + public function testConstructorDenormalize() + { + $obj = $this->normalizer->denormalize( + array('foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar'), + __NAMESPACE__.'\ObjectConstructorDummy', 'any'); + $this->assertEquals('foo', $obj->getFoo()); + $this->assertEquals('bar', $obj->bar); + $this->assertTrue($obj->isBaz()); + } + + public function testConstructorDenormalizeWithNullArgument() + { + $obj = $this->normalizer->denormalize( + array('foo' => 'foo', 'bar' => null, 'baz' => true), + __NAMESPACE__.'\ObjectConstructorDummy', 'any'); + $this->assertEquals('foo', $obj->getFoo()); + $this->assertNull($obj->bar); + $this->assertTrue($obj->isBaz()); + } + + public function testConstructorDenormalizeWithMissingOptionalArgument() + { + $obj = $this->normalizer->denormalize( + array('foo' => 'test', 'baz' => array(1, 2, 3)), + __NAMESPACE__.'\ObjectConstructorOptionalArgsDummy', 'any'); + $this->assertEquals('test', $obj->getFoo()); + $this->assertEquals(array(), $obj->bar); + $this->assertEquals(array(1, 2, 3), $obj->getBaz()); + } + + public function testConstructorDenormalizeWithOptionalDefaultArgument() + { + $obj = $this->normalizer->denormalize( + array('bar' => 'test'), + __NAMESPACE__.'\ObjectConstructorArgsWithDefaultValueDummy', 'any'); + $this->assertEquals(array(), $obj->getFoo()); + $this->assertEquals('test', $obj->getBar()); + } + + public function testConstructorWithObjectDenormalize() + { + $data = new \stdClass(); + $data->foo = 'foo'; + $data->bar = 'bar'; + $data->baz = true; + $data->fooBar = 'foobar'; + $obj = $this->normalizer->denormalize($data, __NAMESPACE__.'\ObjectConstructorDummy', 'any'); + $this->assertEquals('foo', $obj->getFoo()); + $this->assertEquals('bar', $obj->bar); + } + + public function testConstructorWithObjectTypeHintDenormalize() + { + $data = array( + 'id' => 10, + 'inner' => array( + 'foo' => 'oof', + 'bar' => 'rab', + ), + ); + + $normalizer = new ObjectNormalizer(); + $serializer = new Serializer(array($normalizer)); + $normalizer->setSerializer($serializer); + + $obj = $normalizer->denormalize($data, DummyWithConstructorObject::class); + $this->assertInstanceOf(DummyWithConstructorObject::class, $obj); + $this->assertEquals(10, $obj->getId()); + $this->assertInstanceOf(ObjectInner::class, $obj->getInner()); + $this->assertEquals('oof', $obj->getInner()->foo); + $this->assertEquals('rab', $obj->getInner()->bar); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\RuntimeException + * @expectedExceptionMessage Could not determine the class of the parameter "unknown". + */ + public function testConstructorWithUnknownObjectTypeHintDenormalize() + { + $data = array( + 'id' => 10, + 'unknown' => array( + 'foo' => 'oof', + 'bar' => 'rab', + ), + ); + + $normalizer = new ObjectNormalizer(); + $serializer = new Serializer(array($normalizer)); + $normalizer->setSerializer($serializer); + + $normalizer->denormalize($data, DummyWithConstructorInexistingObject::class); + } + + public function testGroupsNormalize() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new ObjectNormalizer($classMetadataFactory); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFoo('foo'); + $obj->setBar('bar'); + $obj->setFooBar('fooBar'); + $obj->setSymfony('symfony'); + $obj->setKevin('kevin'); + $obj->setCoopTilleuls('coopTilleuls'); + + $this->assertEquals(array( + 'bar' => 'bar', + ), $this->normalizer->normalize($obj, null, array(ObjectNormalizer::GROUPS => array('c')))); + + $this->assertEquals(array( + 'symfony' => 'symfony', + 'foo' => 'foo', + 'fooBar' => 'fooBar', + 'bar' => 'bar', + 'kevin' => 'kevin', + 'coopTilleuls' => 'coopTilleuls', + ), $this->normalizer->normalize($obj, null, array(ObjectNormalizer::GROUPS => array('a', 'c')))); + } + + public function testGroupsDenormalize() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new ObjectNormalizer($classMetadataFactory); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFoo('foo'); + + $toNormalize = array('foo' => 'foo', 'bar' => 'bar'); + + $normalized = $this->normalizer->denormalize( + $toNormalize, + 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', + null, + array(ObjectNormalizer::GROUPS => array('a')) + ); + $this->assertEquals($obj, $normalized); + + $obj->setBar('bar'); + + $normalized = $this->normalizer->denormalize( + $toNormalize, + 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', + null, + array(ObjectNormalizer::GROUPS => array('a', 'b')) + ); + $this->assertEquals($obj, $normalized); + } + + public function testNormalizeNoPropertyInGroup() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new ObjectNormalizer($classMetadataFactory); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFoo('foo'); + + $this->assertEquals(array(), $this->normalizer->normalize($obj, null, array('groups' => array('notExist')))); + } + + public function testGroupsNormalizeWithNameConverter() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new ObjectNormalizer($classMetadataFactory, new CamelCaseToSnakeCaseNameConverter()); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFooBar('@dunglas'); + $obj->setSymfony('@coopTilleuls'); + $obj->setCoopTilleuls('les-tilleuls.coop'); + + $this->assertEquals( + array( + 'bar' => null, + 'foo_bar' => '@dunglas', + 'symfony' => '@coopTilleuls', + ), + $this->normalizer->normalize($obj, null, array(ObjectNormalizer::GROUPS => array('name_converter'))) + ); + } + + public function testGroupsDenormalizeWithNameConverter() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new ObjectNormalizer($classMetadataFactory, new CamelCaseToSnakeCaseNameConverter()); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFooBar('@dunglas'); + $obj->setSymfony('@coopTilleuls'); + + $this->assertEquals( + $obj, + $this->normalizer->denormalize(array( + 'bar' => null, + 'foo_bar' => '@dunglas', + 'symfony' => '@coopTilleuls', + 'coop_tilleuls' => 'les-tilleuls.coop', + ), 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, array(ObjectNormalizer::GROUPS => array('name_converter'))) + ); + } + + /** + * @dataProvider provideCallbacks + */ + public function testCallbacks($callbacks, $value, $result, $message) + { + $this->normalizer->setCallbacks($callbacks); + + $obj = new ObjectConstructorDummy('', $value, true); + + $this->assertEquals( + $result, + $this->normalizer->normalize($obj, 'any'), + $message + ); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testUncallableCallbacks() + { + $this->normalizer->setCallbacks(array('bar' => null)); + + $obj = new ObjectConstructorDummy('baz', 'quux', true); + + $this->normalizer->normalize($obj, 'any'); + } + + public function testIgnoredAttributes() + { + $this->normalizer->setIgnoredAttributes(array('foo', 'bar', 'baz', 'camelCase', 'object')); + + $obj = new ObjectDummy(); + $obj->setFoo('foo'); + $obj->bar = 'bar'; + $obj->setBaz(true); + + $this->assertEquals( + array('fooBar' => 'foobar'), + $this->normalizer->normalize($obj, 'any') + ); + } + + public function testIgnoredAttributesDenormalize() + { + $this->normalizer->setIgnoredAttributes(array('fooBar', 'bar', 'baz')); + + $obj = new ObjectDummy(); + $obj->setFoo('foo'); + + $this->assertEquals( + $obj, + $this->normalizer->denormalize(array('fooBar' => 'fooBar', 'foo' => 'foo', 'baz' => 'baz'), __NAMESPACE__.'\ObjectDummy') + ); + } + + public function provideCallbacks() + { + return array( + array( + array( + 'bar' => function ($bar) { + return 'baz'; + }, + ), + 'baz', + array('foo' => '', 'bar' => 'baz', 'baz' => true), + 'Change a string', + ), + array( + array( + 'bar' => function ($bar) { + return; + }, + ), + 'baz', + array('foo' => '', 'bar' => null, 'baz' => true), + 'Null an item', + ), + array( + array( + 'bar' => function ($bar) { + return $bar->format('d-m-Y H:i:s'); + }, + ), + new \DateTime('2011-09-10 06:30:00'), + array('foo' => '', 'bar' => '10-09-2011 06:30:00', 'baz' => true), + 'Format a date', + ), + array( + array( + 'bar' => function ($bars) { + $foos = ''; + foreach ($bars as $bar) { + $foos .= $bar->getFoo(); + } + + return $foos; + }, + ), + array(new ObjectConstructorDummy('baz', '', false), new ObjectConstructorDummy('quux', '', false)), + array('foo' => '', 'bar' => 'bazquux', 'baz' => true), + 'Collect a property', + ), + array( + array( + 'bar' => function ($bars) { + return count($bars); + }, + ), + array(new ObjectConstructorDummy('baz', '', false), new ObjectConstructorDummy('quux', '', false)), + array('foo' => '', 'bar' => 2, 'baz' => true), + 'Count a property', + ), + ); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\LogicException + * @expectedExceptionMessage Cannot normalize attribute "object" because the injected serializer is not a normalizer + */ + public function testUnableToNormalizeObjectAttribute() + { + $serializer = $this->getMockBuilder('Symfony\Component\Serializer\SerializerInterface')->getMock(); + $this->normalizer->setSerializer($serializer); + + $obj = new ObjectDummy(); + $object = new \stdClass(); + $obj->setObject($object); + + $this->normalizer->normalize($obj, 'any'); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\CircularReferenceException + */ + public function testUnableToNormalizeCircularReference() + { + $serializer = new Serializer(array($this->normalizer)); + $this->normalizer->setSerializer($serializer); + $this->normalizer->setCircularReferenceLimit(2); + + $obj = new CircularReferenceDummy(); + + $this->normalizer->normalize($obj); + } + + public function testSiblingReference() + { + $serializer = new Serializer(array($this->normalizer)); + $this->normalizer->setSerializer($serializer); + + $siblingHolder = new SiblingHolder(); + + $expected = array( + 'sibling0' => array('coopTilleuls' => 'Les-Tilleuls.coop'), + 'sibling1' => array('coopTilleuls' => 'Les-Tilleuls.coop'), + 'sibling2' => array('coopTilleuls' => 'Les-Tilleuls.coop'), + ); + $this->assertEquals($expected, $this->normalizer->normalize($siblingHolder)); + } + + public function testCircularReferenceHandler() + { + $serializer = new Serializer(array($this->normalizer)); + $this->normalizer->setSerializer($serializer); + $this->normalizer->setCircularReferenceHandler(function ($obj) { + return get_class($obj); + }); + + $obj = new CircularReferenceDummy(); + + $expected = array('me' => 'Symfony\Component\Serializer\Tests\Fixtures\CircularReferenceDummy'); + $this->assertEquals($expected, $this->normalizer->normalize($obj)); + } + + public function testDenormalizeNonExistingAttribute() + { + $this->assertEquals( + new ObjectDummy(), + $this->normalizer->denormalize(array('non_existing' => true), __NAMESPACE__.'\ObjectDummy') + ); + } + + public function testNoTraversableSupport() + { + $this->assertFalse($this->normalizer->supportsNormalization(new \ArrayObject())); + } + + public function testNormalizeStatic() + { + $this->assertEquals(array('foo' => 'K'), $this->normalizer->normalize(new ObjectWithStaticPropertiesAndMethods())); + } + + public function testNormalizeNotSerializableContext() + { + $objectDummy = new ObjectDummy(); + $expected = array( + 'foo' => null, + 'baz' => null, + 'fooBar' => '', + 'camelCase' => null, + 'object' => null, + 'bar' => null, + ); + + $this->assertEquals($expected, $this->normalizer->normalize($objectDummy, null, array('not_serializable' => function () { + }))); + } + + public function testMaxDepth() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new ObjectNormalizer($classMetadataFactory); + $serializer = new Serializer(array($this->normalizer)); + $this->normalizer->setSerializer($serializer); + + $level1 = new MaxDepthDummy(); + $level1->foo = 'level1'; + + $level2 = new MaxDepthDummy(); + $level2->foo = 'level2'; + $level1->child = $level2; + + $level3 = new MaxDepthDummy(); + $level3->foo = 'level3'; + $level2->child = $level3; + + $result = $serializer->normalize($level1, null, array(ObjectNormalizer::ENABLE_MAX_DEPTH => true)); + + $expected = array( + 'bar' => null, + 'foo' => 'level1', + 'child' => array( + 'bar' => null, + 'foo' => 'level2', + 'child' => array( + 'bar' => null, + 'child' => null, + ), + ), + ); + + $this->assertEquals($expected, $result); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testThrowUnexpectedValueException() + { + $this->normalizer->denormalize(array('foo' => 'bar'), ObjectTypeHinted::class); + } + + public function testDenomalizeRecursive() + { + $extractor = new PropertyInfoExtractor(array(), array(new PhpDocExtractor(), new ReflectionExtractor())); + $normalizer = new ObjectNormalizer(null, null, null, $extractor); + $serializer = new Serializer(array(new ArrayDenormalizer(), new DateTimeNormalizer(), $normalizer)); + + $obj = $serializer->denormalize(array( + 'inner' => array('foo' => 'foo', 'bar' => 'bar'), + 'date' => '1988/01/21', + 'inners' => array(array('foo' => 1), array('foo' => 2)), + ), ObjectOuter::class); + + $this->assertSame('foo', $obj->getInner()->foo); + $this->assertSame('bar', $obj->getInner()->bar); + $this->assertSame('1988-01-21', $obj->getDate()->format('Y-m-d')); + $this->assertSame(1, $obj->getInners()[0]->foo); + $this->assertSame(2, $obj->getInners()[1]->foo); + } + + public function testAcceptJsonNumber() + { + $extractor = new PropertyInfoExtractor(array(), array(new PhpDocExtractor(), new ReflectionExtractor())); + $normalizer = new ObjectNormalizer(null, null, null, $extractor); + $serializer = new Serializer(array(new ArrayDenormalizer(), new DateTimeNormalizer(), $normalizer)); + + $this->assertSame(10.0, $serializer->denormalize(array('number' => 10), JsonNumber::class, 'json')->number); + $this->assertSame(10.0, $serializer->denormalize(array('number' => 10), JsonNumber::class, 'jsonld')->number); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + * @expectedExceptionMessage The type of the "date" attribute for class "Symfony\Component\Serializer\Tests\Normalizer\ObjectOuter" must be one of "DateTimeInterface" ("string" given). + */ + public function testRejectInvalidType() + { + $normalizer = new ObjectNormalizer(null, null, null, new ReflectionExtractor()); + $serializer = new Serializer(array($normalizer)); + + $serializer->denormalize(array('date' => 'foo'), ObjectOuter::class); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + * @expectedExceptionMessage The type of the key "a" must be "int" ("string" given). + */ + public function testRejectInvalidKey() + { + $extractor = new PropertyInfoExtractor(array(), array(new PhpDocExtractor(), new ReflectionExtractor())); + $normalizer = new ObjectNormalizer(null, null, null, $extractor); + $serializer = new Serializer(array(new ArrayDenormalizer(), new DateTimeNormalizer(), $normalizer)); + + $serializer->denormalize(array('inners' => array('a' => array('foo' => 1))), ObjectOuter::class); + } + + public function testExtractAttributesRespectsFormat() + { + $normalizer = new FormatAndContextAwareNormalizer(); + + $data = new ObjectDummy(); + $data->setFoo('bar'); + $data->bar = 'foo'; + + $this->assertSame(array('foo' => 'bar', 'bar' => 'foo'), $normalizer->normalize($data, 'foo_and_bar_included')); + } + + public function testExtractAttributesRespectsContext() + { + $normalizer = new FormatAndContextAwareNormalizer(); + + $data = new ObjectDummy(); + $data->setFoo('bar'); + $data->bar = 'foo'; + + $this->assertSame(array('foo' => 'bar', 'bar' => 'foo'), $normalizer->normalize($data, null, array('include_foo_and_bar' => true))); + } +} + +class ObjectDummy +{ + protected $foo; + public $bar; + private $baz; + protected $camelCase; + protected $object; + + public function getFoo() + { + return $this->foo; + } + + public function setFoo($foo) + { + $this->foo = $foo; + } + + public function isBaz() + { + return $this->baz; + } + + public function setBaz($baz) + { + $this->baz = $baz; + } + + public function getFooBar() + { + return $this->foo.$this->bar; + } + + public function getCamelCase() + { + return $this->camelCase; + } + + public function setCamelCase($camelCase) + { + $this->camelCase = $camelCase; + } + + public function otherMethod() + { + throw new \RuntimeException('Dummy::otherMethod() should not be called'); + } + + public function setObject($object) + { + $this->object = $object; + } + + public function getObject() + { + return $this->object; + } +} + +class ObjectConstructorDummy +{ + protected $foo; + public $bar; + private $baz; + + public function __construct($foo, $bar, $baz) + { + $this->foo = $foo; + $this->bar = $bar; + $this->baz = $baz; + } + + public function getFoo() + { + return $this->foo; + } + + public function isBaz() + { + return $this->baz; + } + + public function otherMethod() + { + throw new \RuntimeException('Dummy::otherMethod() should not be called'); + } +} + +abstract class ObjectSerializerNormalizer implements SerializerInterface, NormalizerInterface +{ +} + +class ObjectConstructorOptionalArgsDummy +{ + protected $foo; + public $bar; + private $baz; + + public function __construct($foo, $bar = array(), $baz = array()) + { + $this->foo = $foo; + $this->bar = $bar; + $this->baz = $baz; + } + + public function getFoo() + { + return $this->foo; + } + + public function getBaz() + { + return $this->baz; + } + + public function otherMethod() + { + throw new \RuntimeException('Dummy::otherMethod() should not be called'); + } +} + +class ObjectConstructorArgsWithDefaultValueDummy +{ + protected $foo; + protected $bar; + + public function __construct($foo = array(), $bar) + { + $this->foo = $foo; + $this->bar = $bar; + } + + public function getFoo() + { + return $this->foo; + } + + public function getBar() + { + return $this->bar; + } + + public function otherMethod() + { + throw new \RuntimeException('Dummy::otherMethod() should not be called'); + } +} + +class ObjectWithStaticPropertiesAndMethods +{ + public $foo = 'K'; + public static $bar = 'A'; + + public static function getBaz() + { + return 'L'; + } +} + +class ObjectTypeHinted +{ + public function setFoo(array $f) + { + } +} + +class ObjectOuter +{ + private $inner; + private $date; + + /** + * @var ObjectInner[] + */ + private $inners; + + public function getInner() + { + return $this->inner; + } + + public function setInner(ObjectInner $inner) + { + $this->inner = $inner; + } + + public function setDate(\DateTimeInterface $date) + { + $this->date = $date; + } + + public function getDate() + { + return $this->date; + } + + public function setInners(array $inners) + { + $this->inners = $inners; + } + + public function getInners() + { + return $this->inners; + } +} + +class ObjectInner +{ + public $foo; + public $bar; +} + +class FormatAndContextAwareNormalizer extends ObjectNormalizer +{ + protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = array()) + { + if (in_array($attribute, array('foo', 'bar')) && 'foo_and_bar_included' === $format) { + return true; + } + + if (in_array($attribute, array('foo', 'bar')) && isset($context['include_foo_and_bar']) && true === $context['include_foo_and_bar']) { + return true; + } + + return false; + } +} + +class DummyWithConstructorObject +{ + private $id; + private $inner; + + public function __construct($id, ObjectInner $inner) + { + $this->id = $id; + $this->inner = $inner; + } + + public function getId() + { + return $this->id; + } + + public function getInner() + { + return $this->inner; + } +} + +class DummyWithConstructorInexistingObject +{ + public function __construct($id, Unknown $unknown) + { + } +} + +class JsonNumber +{ + /** + * @var float + */ + public $number; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..73b5f689c1d901d5e8f0daf0bcbeefb2b8a7f45a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php @@ -0,0 +1,479 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Normalizer; + +use Doctrine\Common\Annotations\AnnotationReader; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; +use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter; +use Symfony\Component\Serializer\Normalizer\PropertyNormalizer; +use Symfony\Component\Serializer\Serializer; +use Symfony\Component\Serializer\SerializerInterface; +use Symfony\Component\Serializer\Tests\Fixtures\GroupDummy; +use Symfony\Component\Serializer\Tests\Fixtures\MaxDepthDummy; +use Symfony\Component\Serializer\Tests\Fixtures\PropertyCircularReferenceDummy; +use Symfony\Component\Serializer\Tests\Fixtures\PropertySiblingHolder; + +class PropertyNormalizerTest extends TestCase +{ + /** + * @var PropertyNormalizer + */ + private $normalizer; + /** + * @var SerializerInterface + */ + private $serializer; + + protected function setUp() + { + $this->serializer = $this->getMockBuilder('Symfony\Component\Serializer\SerializerInterface')->getMock(); + $this->normalizer = new PropertyNormalizer(); + $this->normalizer->setSerializer($this->serializer); + } + + public function testNormalize() + { + $obj = new PropertyDummy(); + $obj->foo = 'foo'; + $obj->setBar('bar'); + $obj->setCamelCase('camelcase'); + $this->assertEquals( + array('foo' => 'foo', 'bar' => 'bar', 'camelCase' => 'camelcase'), + $this->normalizer->normalize($obj, 'any') + ); + } + + public function testDenormalize() + { + $obj = $this->normalizer->denormalize( + array('foo' => 'foo', 'bar' => 'bar'), + __NAMESPACE__.'\PropertyDummy', + 'any' + ); + $this->assertEquals('foo', $obj->foo); + $this->assertEquals('bar', $obj->getBar()); + } + + public function testConstructorDenormalize() + { + $obj = $this->normalizer->denormalize( + array('foo' => 'foo', 'bar' => 'bar'), + __NAMESPACE__.'\PropertyConstructorDummy', + 'any' + ); + $this->assertEquals('foo', $obj->getFoo()); + $this->assertEquals('bar', $obj->getBar()); + } + + public function testConstructorDenormalizeWithNullArgument() + { + $obj = $this->normalizer->denormalize( + array('foo' => null, 'bar' => 'bar'), + __NAMESPACE__.'\PropertyConstructorDummy', ' + any' + ); + $this->assertNull($obj->getFoo()); + $this->assertEquals('bar', $obj->getBar()); + } + + /** + * @dataProvider provideCallbacks + */ + public function testCallbacks($callbacks, $value, $result, $message) + { + $this->normalizer->setCallbacks($callbacks); + + $obj = new PropertyConstructorDummy('', $value); + + $this->assertEquals( + $result, + $this->normalizer->normalize($obj, 'any'), + $message + ); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testUncallableCallbacks() + { + $this->normalizer->setCallbacks(array('bar' => null)); + + $obj = new PropertyConstructorDummy('baz', 'quux'); + + $this->normalizer->normalize($obj, 'any'); + } + + public function testIgnoredAttributes() + { + $this->normalizer->setIgnoredAttributes(array('foo', 'bar', 'camelCase')); + + $obj = new PropertyDummy(); + $obj->foo = 'foo'; + $obj->setBar('bar'); + + $this->assertEquals( + array(), + $this->normalizer->normalize($obj, 'any') + ); + } + + public function testGroupsNormalize() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new PropertyNormalizer($classMetadataFactory); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFoo('foo'); + $obj->setBar('bar'); + $obj->setFooBar('fooBar'); + $obj->setSymfony('symfony'); + $obj->setKevin('kevin'); + $obj->setCoopTilleuls('coopTilleuls'); + + $this->assertEquals(array( + 'bar' => 'bar', + ), $this->normalizer->normalize($obj, null, array(PropertyNormalizer::GROUPS => array('c')))); + + // The PropertyNormalizer is not able to hydrate properties from parent classes + $this->assertEquals(array( + 'symfony' => 'symfony', + 'foo' => 'foo', + 'fooBar' => 'fooBar', + 'bar' => 'bar', + ), $this->normalizer->normalize($obj, null, array(PropertyNormalizer::GROUPS => array('a', 'c')))); + } + + public function testGroupsDenormalize() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new PropertyNormalizer($classMetadataFactory); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFoo('foo'); + + $toNormalize = array('foo' => 'foo', 'bar' => 'bar'); + + $normalized = $this->normalizer->denormalize( + $toNormalize, + 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', + null, + array(PropertyNormalizer::GROUPS => array('a')) + ); + $this->assertEquals($obj, $normalized); + + $obj->setBar('bar'); + + $normalized = $this->normalizer->denormalize( + $toNormalize, + 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', + null, + array(PropertyNormalizer::GROUPS => array('a', 'b')) + ); + $this->assertEquals($obj, $normalized); + } + + public function testGroupsNormalizeWithNameConverter() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new PropertyNormalizer($classMetadataFactory, new CamelCaseToSnakeCaseNameConverter()); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFooBar('@dunglas'); + $obj->setSymfony('@coopTilleuls'); + $obj->setCoopTilleuls('les-tilleuls.coop'); + + $this->assertEquals( + array( + 'bar' => null, + 'foo_bar' => '@dunglas', + 'symfony' => '@coopTilleuls', + ), + $this->normalizer->normalize($obj, null, array(PropertyNormalizer::GROUPS => array('name_converter'))) + ); + } + + public function testGroupsDenormalizeWithNameConverter() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new PropertyNormalizer($classMetadataFactory, new CamelCaseToSnakeCaseNameConverter()); + $this->normalizer->setSerializer($this->serializer); + + $obj = new GroupDummy(); + $obj->setFooBar('@dunglas'); + $obj->setSymfony('@coopTilleuls'); + + $this->assertEquals( + $obj, + $this->normalizer->denormalize(array( + 'bar' => null, + 'foo_bar' => '@dunglas', + 'symfony' => '@coopTilleuls', + 'coop_tilleuls' => 'les-tilleuls.coop', + ), 'Symfony\Component\Serializer\Tests\Fixtures\GroupDummy', null, array(PropertyNormalizer::GROUPS => array('name_converter'))) + ); + } + + public function provideCallbacks() + { + return array( + array( + array( + 'bar' => function ($bar) { + return 'baz'; + }, + ), + 'baz', + array('foo' => '', 'bar' => 'baz'), + 'Change a string', + ), + array( + array( + 'bar' => function ($bar) { + return; + }, + ), + 'baz', + array('foo' => '', 'bar' => null), + 'Null an item', + ), + array( + array( + 'bar' => function ($bar) { + return $bar->format('d-m-Y H:i:s'); + }, + ), + new \DateTime('2011-09-10 06:30:00'), + array('foo' => '', 'bar' => '10-09-2011 06:30:00'), + 'Format a date', + ), + array( + array( + 'bar' => function ($bars) { + $foos = ''; + foreach ($bars as $bar) { + $foos .= $bar->getFoo(); + } + + return $foos; + }, + ), + array(new PropertyConstructorDummy('baz', ''), new PropertyConstructorDummy('quux', '')), + array('foo' => '', 'bar' => 'bazquux'), + 'Collect a property', + ), + array( + array( + 'bar' => function ($bars) { + return count($bars); + }, + ), + array(new PropertyConstructorDummy('baz', ''), new PropertyConstructorDummy('quux', '')), + array('foo' => '', 'bar' => 2), + 'Count a property', + ), + ); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\CircularReferenceException + */ + public function testUnableToNormalizeCircularReference() + { + $serializer = new Serializer(array($this->normalizer)); + $this->normalizer->setSerializer($serializer); + $this->normalizer->setCircularReferenceLimit(2); + + $obj = new PropertyCircularReferenceDummy(); + + $this->normalizer->normalize($obj); + } + + public function testSiblingReference() + { + $serializer = new Serializer(array($this->normalizer)); + $this->normalizer->setSerializer($serializer); + + $siblingHolder = new PropertySiblingHolder(); + + $expected = array( + 'sibling0' => array('coopTilleuls' => 'Les-Tilleuls.coop'), + 'sibling1' => array('coopTilleuls' => 'Les-Tilleuls.coop'), + 'sibling2' => array('coopTilleuls' => 'Les-Tilleuls.coop'), + ); + $this->assertEquals($expected, $this->normalizer->normalize($siblingHolder)); + } + + public function testCircularReferenceHandler() + { + $serializer = new Serializer(array($this->normalizer)); + $this->normalizer->setSerializer($serializer); + $this->normalizer->setCircularReferenceHandler(function ($obj) { + return get_class($obj); + }); + + $obj = new PropertyCircularReferenceDummy(); + + $expected = array('me' => 'Symfony\Component\Serializer\Tests\Fixtures\PropertyCircularReferenceDummy'); + $this->assertEquals($expected, $this->normalizer->normalize($obj)); + } + + public function testDenormalizeNonExistingAttribute() + { + $this->assertEquals( + new PropertyDummy(), + $this->normalizer->denormalize(array('non_existing' => true), __NAMESPACE__.'\PropertyDummy') + ); + } + + public function testDenormalizeShouldIgnoreStaticProperty() + { + $obj = $this->normalizer->denormalize(array('outOfScope' => true), __NAMESPACE__.'\PropertyDummy'); + + $this->assertEquals(new PropertyDummy(), $obj); + $this->assertEquals('out_of_scope', PropertyDummy::$outOfScope); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\LogicException + * @expectedExceptionMessage Cannot normalize attribute "bar" because the injected serializer is not a normalizer + */ + public function testUnableToNormalizeObjectAttribute() + { + $serializer = $this->getMockBuilder('Symfony\Component\Serializer\SerializerInterface')->getMock(); + $this->normalizer->setSerializer($serializer); + + $obj = new PropertyDummy(); + $object = new \stdClass(); + $obj->setBar($object); + + $this->normalizer->normalize($obj, 'any'); + } + + public function testNoTraversableSupport() + { + $this->assertFalse($this->normalizer->supportsNormalization(new \ArrayObject())); + } + + public function testNoStaticPropertySupport() + { + $this->assertFalse($this->normalizer->supportsNormalization(new StaticPropertyDummy())); + } + + public function testMaxDepth() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $this->normalizer = new PropertyNormalizer($classMetadataFactory); + $serializer = new Serializer(array($this->normalizer)); + $this->normalizer->setSerializer($serializer); + + $level1 = new MaxDepthDummy(); + $level1->foo = 'level1'; + + $level2 = new MaxDepthDummy(); + $level2->foo = 'level2'; + $level1->child = $level2; + + $level3 = new MaxDepthDummy(); + $level3->foo = 'level3'; + $level2->child = $level3; + + $result = $serializer->normalize($level1, null, array(PropertyNormalizer::ENABLE_MAX_DEPTH => true)); + + $expected = array( + 'foo' => 'level1', + 'child' => array( + 'foo' => 'level2', + 'child' => array( + 'child' => null, + 'bar' => null, + ), + 'bar' => null, + ), + 'bar' => null, + ); + + $this->assertEquals($expected, $result); + } +} + +class PropertyDummy +{ + public static $outOfScope = 'out_of_scope'; + public $foo; + private $bar; + protected $camelCase; + + public function getBar() + { + return $this->bar; + } + + public function setBar($bar) + { + $this->bar = $bar; + } + + public function getCamelCase() + { + return $this->camelCase; + } + + public function setCamelCase($camelCase) + { + $this->camelCase = $camelCase; + } +} + +class PropertyConstructorDummy +{ + protected $foo; + private $bar; + + public function __construct($foo, $bar) + { + $this->foo = $foo; + $this->bar = $bar; + } + + public function getFoo() + { + return $this->foo; + } + + public function getBar() + { + return $this->bar; + } +} + +class PropertyCamelizedDummy +{ + private $kevinDunglas; + public $fooBar; + public $bar_foo; + + public function __construct($kevinDunglas = null) + { + $this->kevinDunglas = $kevinDunglas; + } +} + +class StaticPropertyDummy +{ + private static $property = 'value'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestDenormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestDenormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..7525d5c92888edaf90f9ae98cdcef1e1d7551c26 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestDenormalizer.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Normalizer; + +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; + +/** + * Provides a test Normalizer which only implements the DenormalizerInterface. + * + * @author Lin Clark + */ +class TestDenormalizer implements DenormalizerInterface +{ + /** + * {@inheritdoc} + */ + public function denormalize($data, $class, $format = null, array $context = array()) + { + } + + /** + * {@inheritdoc} + */ + public function supportsDenormalization($data, $type, $format = null) + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php new file mode 100644 index 0000000000000000000000000000000000000000..4b29e8fa5d10c5d268349eb605ddaa02f49b8237 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests\Normalizer; + +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; + +/** + * Provides a test Normalizer which only implements the NormalizerInterface. + * + * @author Lin Clark + */ +class TestNormalizer implements NormalizerInterface +{ + /** + * {@inheritdoc} + */ + public function normalize($object, $format = null, array $context = array()) + { + } + + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null) + { + return true; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/SerializerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/SerializerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f7f8594cb12bcc166829ac8d566bbc37b171df0e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/Tests/SerializerTest.php @@ -0,0 +1,413 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer; +use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; +use Symfony\Component\Serializer\Normalizer\PropertyNormalizer; +use Symfony\Component\Serializer\Serializer; +use Symfony\Component\Serializer\Encoder\JsonEncoder; +use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer; +use Symfony\Component\Serializer\Normalizer\CustomNormalizer; +use Symfony\Component\Serializer\Tests\Fixtures\TraversableDummy; +use Symfony\Component\Serializer\Tests\Fixtures\NormalizableTraversableDummy; +use Symfony\Component\Serializer\Tests\Normalizer\TestNormalizer; +use Symfony\Component\Serializer\Tests\Normalizer\TestDenormalizer; + +class SerializerTest extends TestCase +{ + public function testInterface() + { + $serializer = new Serializer(); + + $this->assertInstanceOf('Symfony\Component\Serializer\SerializerInterface', $serializer); + $this->assertInstanceOf('Symfony\Component\Serializer\Normalizer\NormalizerInterface', $serializer); + $this->assertInstanceOf('Symfony\Component\Serializer\Normalizer\DenormalizerInterface', $serializer); + $this->assertInstanceOf('Symfony\Component\Serializer\Encoder\EncoderInterface', $serializer); + $this->assertInstanceOf('Symfony\Component\Serializer\Encoder\DecoderInterface', $serializer); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testNormalizeNoMatch() + { + $serializer = new Serializer(array($this->getMockBuilder('Symfony\Component\Serializer\Normalizer\CustomNormalizer')->getMock())); + $serializer->normalize(new \stdClass(), 'xml'); + } + + public function testNormalizeTraversable() + { + $serializer = new Serializer(array(), array('json' => new JsonEncoder())); + $result = $serializer->serialize(new TraversableDummy(), 'json'); + $this->assertEquals('{"foo":"foo","bar":"bar"}', $result); + } + + public function testNormalizeGivesPriorityToInterfaceOverTraversable() + { + $serializer = new Serializer(array(new CustomNormalizer()), array('json' => new JsonEncoder())); + $result = $serializer->serialize(new NormalizableTraversableDummy(), 'json'); + $this->assertEquals('{"foo":"normalizedFoo","bar":"normalizedBar"}', $result); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testNormalizeOnDenormalizer() + { + $serializer = new Serializer(array(new TestDenormalizer()), array()); + $this->assertTrue($serializer->normalize(new \stdClass(), 'json')); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testDenormalizeNoMatch() + { + $serializer = new Serializer(array($this->getMockBuilder('Symfony\Component\Serializer\Normalizer\CustomNormalizer')->getMock())); + $serializer->denormalize('foo', 'stdClass'); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testDenormalizeOnNormalizer() + { + $serializer = new Serializer(array(new TestNormalizer()), array()); + $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $this->assertTrue($serializer->denormalize(json_encode($data), 'stdClass', 'json')); + } + + public function testCustomNormalizerCanNormalizeCollectionsAndScalar() + { + $serializer = new Serializer(array(new TestNormalizer()), array()); + $this->assertNull($serializer->normalize(array('a', 'b'))); + $this->assertNull($serializer->normalize(new \ArrayObject(array('c', 'd')))); + $this->assertNull($serializer->normalize(array())); + $this->assertNull($serializer->normalize('test')); + } + + public function testNormalizeWithSupportOnData() + { + $normalizer1 = $this->getMockBuilder('Symfony\Component\Serializer\Normalizer\NormalizerInterface')->getMock(); + $normalizer1->method('supportsNormalization') + ->willReturnCallback(function ($data, $format) { + return isset($data->test); + }); + $normalizer1->method('normalize')->willReturn('test1'); + + $normalizer2 = $this->getMockBuilder('Symfony\Component\Serializer\Normalizer\NormalizerInterface')->getMock(); + $normalizer2->method('supportsNormalization') + ->willReturn(true); + $normalizer2->method('normalize')->willReturn('test2'); + + $serializer = new Serializer(array($normalizer1, $normalizer2)); + + $data = new \stdClass(); + $data->test = true; + $this->assertEquals('test1', $serializer->normalize($data)); + + $this->assertEquals('test2', $serializer->normalize(new \stdClass())); + } + + public function testDenormalizeWithSupportOnData() + { + $denormalizer1 = $this->getMockBuilder('Symfony\Component\Serializer\Normalizer\DenormalizerInterface')->getMock(); + $denormalizer1->method('supportsDenormalization') + ->willReturnCallback(function ($data, $type, $format) { + return isset($data['test1']); + }); + $denormalizer1->method('denormalize')->willReturn('test1'); + + $denormalizer2 = $this->getMockBuilder('Symfony\Component\Serializer\Normalizer\DenormalizerInterface')->getMock(); + $denormalizer2->method('supportsDenormalization') + ->willReturn(true); + $denormalizer2->method('denormalize')->willReturn('test2'); + + $serializer = new Serializer(array($denormalizer1, $denormalizer2)); + + $this->assertEquals('test1', $serializer->denormalize(array('test1' => true), 'test')); + + $this->assertEquals('test2', $serializer->denormalize(array(), 'test')); + } + + public function testSerialize() + { + $serializer = new Serializer(array(new GetSetMethodNormalizer()), array('json' => new JsonEncoder())); + $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $result = $serializer->serialize(Model::fromArray($data), 'json'); + $this->assertEquals(json_encode($data), $result); + } + + public function testSerializeScalar() + { + $serializer = new Serializer(array(), array('json' => new JsonEncoder())); + $result = $serializer->serialize('foo', 'json'); + $this->assertEquals('"foo"', $result); + } + + public function testSerializeArrayOfScalars() + { + $serializer = new Serializer(array(), array('json' => new JsonEncoder())); + $data = array('foo', array(5, 3)); + $result = $serializer->serialize($data, 'json'); + $this->assertEquals(json_encode($data), $result); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testSerializeNoEncoder() + { + $serializer = new Serializer(array(), array()); + $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer->serialize($data, 'json'); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\LogicException + */ + public function testSerializeNoNormalizer() + { + $serializer = new Serializer(array(), array('json' => new JsonEncoder())); + $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer->serialize(Model::fromArray($data), 'json'); + } + + public function testDeserialize() + { + $serializer = new Serializer(array(new GetSetMethodNormalizer()), array('json' => new JsonEncoder())); + $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $result = $serializer->deserialize(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json'); + $this->assertEquals($data, $result->toArray()); + } + + public function testDeserializeUseCache() + { + $serializer = new Serializer(array(new GetSetMethodNormalizer()), array('json' => new JsonEncoder())); + $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer->deserialize(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json'); + $data = array('title' => 'bar', 'numbers' => array(2, 8)); + $result = $serializer->deserialize(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json'); + $this->assertEquals($data, $result->toArray()); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\LogicException + */ + public function testDeserializeNoNormalizer() + { + $serializer = new Serializer(array(), array('json' => new JsonEncoder())); + $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer->deserialize(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json'); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testDeserializeWrongNormalizer() + { + $serializer = new Serializer(array(new CustomNormalizer()), array('json' => new JsonEncoder())); + $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer->deserialize(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json'); + } + + /** + * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException + */ + public function testDeserializeNoEncoder() + { + $serializer = new Serializer(array(), array()); + $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $serializer->deserialize(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json'); + } + + public function testDeserializeSupported() + { + $serializer = new Serializer(array(new GetSetMethodNormalizer()), array()); + $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $this->assertTrue($serializer->supportsDenormalization(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json')); + } + + public function testDeserializeNotSupported() + { + $serializer = new Serializer(array(new GetSetMethodNormalizer()), array()); + $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $this->assertFalse($serializer->supportsDenormalization(json_encode($data), 'stdClass', 'json')); + } + + public function testDeserializeNotSupportedMissing() + { + $serializer = new Serializer(array(), array()); + $data = array('title' => 'foo', 'numbers' => array(5, 3)); + $this->assertFalse($serializer->supportsDenormalization(json_encode($data), '\Symfony\Component\Serializer\Tests\Model', 'json')); + } + + public function testEncode() + { + $serializer = new Serializer(array(), array('json' => new JsonEncoder())); + $data = array('foo', array(5, 3)); + $result = $serializer->encode($data, 'json'); + $this->assertEquals(json_encode($data), $result); + } + + public function testDecode() + { + $serializer = new Serializer(array(), array('json' => new JsonEncoder())); + $data = array('foo', array(5, 3)); + $result = $serializer->decode(json_encode($data), 'json'); + $this->assertEquals($data, $result); + } + + public function testSupportsArrayDeserialization() + { + $serializer = new Serializer( + array( + new GetSetMethodNormalizer(), + new PropertyNormalizer(), + new ObjectNormalizer(), + new CustomNormalizer(), + new ArrayDenormalizer(), + ), + array( + 'json' => new JsonEncoder(), + ) + ); + + $this->assertTrue( + $serializer->supportsDenormalization(array(), __NAMESPACE__.'\Model[]', 'json') + ); + } + + public function testDeserializeArray() + { + $jsonData = '[{"title":"foo","numbers":[5,3]},{"title":"bar","numbers":[2,8]}]'; + + $expectedData = array( + Model::fromArray(array('title' => 'foo', 'numbers' => array(5, 3))), + Model::fromArray(array('title' => 'bar', 'numbers' => array(2, 8))), + ); + + $serializer = new Serializer( + array( + new GetSetMethodNormalizer(), + new ArrayDenormalizer(), + ), + array( + 'json' => new JsonEncoder(), + ) + ); + + $this->assertEquals( + $expectedData, + $serializer->deserialize($jsonData, __NAMESPACE__.'\Model[]', 'json') + ); + } + + public function testNormalizerAware() + { + $normalizerAware = $this->getMockBuilder(NormalizerAwareInterface::class)->getMock(); + $normalizerAware->expects($this->once()) + ->method('setNormalizer') + ->with($this->isInstanceOf(NormalizerInterface::class)); + + new Serializer(array($normalizerAware)); + } + + public function testDenormalizerAware() + { + $denormalizerAware = $this->getMockBuilder(DenormalizerAwareInterface::class)->getMock(); + $denormalizerAware->expects($this->once()) + ->method('setDenormalizer') + ->with($this->isInstanceOf(DenormalizerInterface::class)); + + new Serializer(array($denormalizerAware)); + } + + public function testDeserializeObjectConstructorWithObjectTypeHint() + { + $jsonData = '{"bar":{"value":"baz"}}'; + + $serializer = new Serializer(array(new ObjectNormalizer()), array('json' => new JsonEncoder())); + + $this->assertEquals(new Foo(new Bar('baz')), $serializer->deserialize($jsonData, Foo::class, 'json')); + } +} + +class Model +{ + private $title; + private $numbers; + + public static function fromArray($array) + { + $model = new self(); + if (isset($array['title'])) { + $model->setTitle($array['title']); + } + if (isset($array['numbers'])) { + $model->setNumbers($array['numbers']); + } + + return $model; + } + + public function getTitle() + { + return $this->title; + } + + public function setTitle($title) + { + $this->title = $title; + } + + public function getNumbers() + { + return $this->numbers; + } + + public function setNumbers($numbers) + { + $this->numbers = $numbers; + } + + public function toArray() + { + return array('title' => $this->title, 'numbers' => $this->numbers); + } +} + +class Foo +{ + private $bar; + + public function __construct(Bar $bar) + { + $this->bar = $bar; + } +} + +class Bar +{ + private $value; + + public function __construct($value) + { + $this->value = $value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Serializer/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..d7dbfc6509c092b351e0f771bbe539ea886629dd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/composer.json @@ -0,0 +1,59 @@ +{ + "name": "symfony/serializer", + "type": "library", + "description": "Symfony Serializer Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/yaml": "~3.1", + "symfony/config": "~2.8|~3.0", + "symfony/property-access": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/cache": "~3.1", + "symfony/property-info": "~3.1", + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", + "phpdocumentor/reflection-docblock": "~3.0" + }, + "conflict": { + "symfony/property-access": ">=3.0,<3.0.4|>=2.8,<2.8.4", + "symfony/property-info": "<3.1", + "symfony/yaml": "<3.1" + }, + "suggest": { + "psr/cache-implementation": "For using the metadata cache.", + "symfony/property-info": "To deserialize relations.", + "symfony/yaml": "For using the default YAML mapping loader.", + "symfony/config": "For using the XML mapping loader.", + "symfony/property-access": "For using the ObjectNormalizer.", + "symfony/http-foundation": "To use the DataUriNormalizer.", + "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", + "doctrine/cache": "For using the default cached annotation reader and metadata cache." + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Serializer\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Serializer/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Serializer/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..4799e3cf2f1dd7e13962d0e3823c1b252362e6fa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Serializer/phpunit.xml.dist @@ -0,0 +1,28 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/README.md b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/README.md new file mode 100644 index 0000000000000000000000000000000000000000..eb0ebb3fa8ab0a8fddf4104fac43ae5360970319 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/README.md @@ -0,0 +1,13 @@ +Stopwatch Component +=================== + +The Stopwatch component provides a way to profile code. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/stopwatch.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/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Section.php b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Section.php new file mode 100644 index 0000000000000000000000000000000000000000..2337e03140c7f28234a9040f2cac87f3c271e43f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Section.php @@ -0,0 +1,193 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Stopwatch; + +/** + * Stopwatch section. + * + * @author Fabien Potencier + */ +class Section +{ + /** + * @var StopwatchEvent[] + */ + private $events = array(); + + /** + * @var null|float + */ + private $origin; + + /** + * @var string + */ + private $id; + + /** + * @var Section[] + */ + private $children = array(); + + /** + * Constructor. + * + * @param float|null $origin Set the origin of the events in this section, use null to set their origin to their start time + */ + public function __construct($origin = null) + { + $this->origin = is_numeric($origin) ? $origin : null; + } + + /** + * Returns the child section. + * + * @param string $id The child section identifier + * + * @return self|null The child section or null when none found + */ + public function get($id) + { + foreach ($this->children as $child) { + if ($id === $child->getId()) { + return $child; + } + } + } + + /** + * Creates or re-opens a child section. + * + * @param string|null $id null to create a new section, the identifier to re-open an existing one + * + * @return self + */ + public function open($id) + { + if (null === $session = $this->get($id)) { + $session = $this->children[] = new self(microtime(true) * 1000); + } + + return $session; + } + + /** + * @return string The identifier of the section + */ + public function getId() + { + return $this->id; + } + + /** + * Sets the session identifier. + * + * @param string $id The session identifier + * + * @return $this + */ + public function setId($id) + { + $this->id = $id; + + return $this; + } + + /** + * Starts an event. + * + * @param string $name The event name + * @param string $category The event category + * + * @return StopwatchEvent The event + */ + public function startEvent($name, $category) + { + if (!isset($this->events[$name])) { + $this->events[$name] = new StopwatchEvent($this->origin ?: microtime(true) * 1000, $category); + } + + return $this->events[$name]->start(); + } + + /** + * Checks if the event was started. + * + * @param string $name The event name + * + * @return bool + */ + public function isEventStarted($name) + { + return isset($this->events[$name]) && $this->events[$name]->isStarted(); + } + + /** + * Stops an event. + * + * @param string $name The event name + * + * @return StopwatchEvent The event + * + * @throws \LogicException When the event has not been started + */ + public function stopEvent($name) + { + if (!isset($this->events[$name])) { + throw new \LogicException(sprintf('Event "%s" is not started.', $name)); + } + + return $this->events[$name]->stop(); + } + + /** + * Stops then restarts an event. + * + * @param string $name The event name + * + * @return StopwatchEvent The event + * + * @throws \LogicException When the event has not been started + */ + public function lap($name) + { + return $this->stopEvent($name)->start(); + } + + /** + * Returns a specific event by name. + * + * @param string $name The event name + * + * @return StopwatchEvent The event + * + * @throws \LogicException When the event is not known + */ + public function getEvent($name) + { + if (!isset($this->events[$name])) { + throw new \LogicException(sprintf('Event "%s" is not known.', $name)); + } + + return $this->events[$name]; + } + + /** + * Returns the events from this section. + * + * @return StopwatchEvent[] An array of StopwatchEvent instances + */ + public function getEvents() + { + return $this->events; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Stopwatch.php b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Stopwatch.php new file mode 100644 index 0000000000000000000000000000000000000000..8ad93165bfd74d9aaaa482fe27a8eaa9435155f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Stopwatch.php @@ -0,0 +1,159 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Stopwatch; + +/** + * Stopwatch provides a way to profile code. + * + * @author Fabien Potencier + */ +class Stopwatch +{ + /** + * @var Section[] + */ + private $sections; + + /** + * @var Section[] + */ + private $activeSections; + + public function __construct() + { + $this->sections = $this->activeSections = array('__root__' => new Section('__root__')); + } + + /** + * @return Section[] + */ + public function getSections() + { + return $this->sections; + } + + /** + * Creates a new section or re-opens an existing section. + * + * @param string|null $id The id of the session to re-open, null to create a new one + * + * @throws \LogicException When the section to re-open is not reachable + */ + public function openSection($id = null) + { + $current = end($this->activeSections); + + if (null !== $id && null === $current->get($id)) { + throw new \LogicException(sprintf('The section "%s" has been started at an other level and can not be opened.', $id)); + } + + $this->start('__section__.child', 'section'); + $this->activeSections[] = $current->open($id); + $this->start('__section__'); + } + + /** + * Stops the last started section. + * + * The id parameter is used to retrieve the events from this section. + * + * @see getSectionEvents() + * + * @param string $id The identifier of the section + * + * @throws \LogicException When there's no started section to be stopped + */ + public function stopSection($id) + { + $this->stop('__section__'); + + if (1 == count($this->activeSections)) { + throw new \LogicException('There is no started section to stop.'); + } + + $this->sections[$id] = array_pop($this->activeSections)->setId($id); + $this->stop('__section__.child'); + } + + /** + * Starts an event. + * + * @param string $name The event name + * @param string $category The event category + * + * @return StopwatchEvent + */ + public function start($name, $category = null) + { + return end($this->activeSections)->startEvent($name, $category); + } + + /** + * Checks if the event was started. + * + * @param string $name The event name + * + * @return bool + */ + public function isStarted($name) + { + return end($this->activeSections)->isEventStarted($name); + } + + /** + * Stops an event. + * + * @param string $name The event name + * + * @return StopwatchEvent + */ + public function stop($name) + { + return end($this->activeSections)->stopEvent($name); + } + + /** + * Stops then restarts an event. + * + * @param string $name The event name + * + * @return StopwatchEvent + */ + public function lap($name) + { + return end($this->activeSections)->stopEvent($name)->start(); + } + + /** + * Returns a specific event by name. + * + * @param string $name The event name + * + * @return StopwatchEvent + */ + public function getEvent($name) + { + return end($this->activeSections)->getEvent($name); + } + + /** + * Gets all events for a given section. + * + * @param string $id A section identifier + * + * @return StopwatchEvent[] + */ + public function getSectionEvents($id) + { + return isset($this->sections[$id]) ? $this->sections[$id]->getEvents() : array(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/StopwatchEvent.php b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/StopwatchEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..16a30db2aa50ee6114321edb458370fbf9be5f80 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/StopwatchEvent.php @@ -0,0 +1,243 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Stopwatch; + +/** + * Represents an Event managed by Stopwatch. + * + * @author Fabien Potencier + */ +class StopwatchEvent +{ + /** + * @var StopwatchPeriod[] + */ + private $periods = array(); + + /** + * @var float + */ + private $origin; + + /** + * @var string + */ + private $category; + + /** + * @var float[] + */ + private $started = array(); + + /** + * Constructor. + * + * @param float $origin The origin time in milliseconds + * @param string|null $category The event category or null to use the default + * + * @throws \InvalidArgumentException When the raw time is not valid + */ + public function __construct($origin, $category = null) + { + $this->origin = $this->formatTime($origin); + $this->category = is_string($category) ? $category : 'default'; + } + + /** + * Gets the category. + * + * @return string The category + */ + public function getCategory() + { + return $this->category; + } + + /** + * Gets the origin. + * + * @return float The origin in milliseconds + */ + public function getOrigin() + { + return $this->origin; + } + + /** + * Starts a new event period. + * + * @return $this + */ + public function start() + { + $this->started[] = $this->getNow(); + + return $this; + } + + /** + * Stops the last started event period. + * + * @return $this + * + * @throws \LogicException When stop() is called without a matching call to start() + */ + public function stop() + { + if (!count($this->started)) { + throw new \LogicException('stop() called but start() has not been called before.'); + } + + $this->periods[] = new StopwatchPeriod(array_pop($this->started), $this->getNow()); + + return $this; + } + + /** + * Checks if the event was started. + * + * @return bool + */ + public function isStarted() + { + return !empty($this->started); + } + + /** + * Stops the current period and then starts a new one. + * + * @return $this + */ + public function lap() + { + return $this->stop()->start(); + } + + /** + * Stops all non already stopped periods. + */ + public function ensureStopped() + { + while (count($this->started)) { + $this->stop(); + } + } + + /** + * Gets all event periods. + * + * @return StopwatchPeriod[] An array of StopwatchPeriod instances + */ + public function getPeriods() + { + return $this->periods; + } + + /** + * Gets the relative time of the start of the first period. + * + * @return int The time (in milliseconds) + */ + public function getStartTime() + { + return isset($this->periods[0]) ? $this->periods[0]->getStartTime() : 0; + } + + /** + * Gets the relative time of the end of the last period. + * + * @return int The time (in milliseconds) + */ + public function getEndTime() + { + $count = count($this->periods); + + return $count ? $this->periods[$count - 1]->getEndTime() : 0; + } + + /** + * Gets the duration of the events (including all periods). + * + * @return int The duration (in milliseconds) + */ + public function getDuration() + { + $periods = $this->periods; + $stopped = count($periods); + $left = count($this->started) - $stopped; + + for ($i = 0; $i < $left; ++$i) { + $index = $stopped + $i; + $periods[] = new StopwatchPeriod($this->started[$index], $this->getNow()); + } + + $total = 0; + foreach ($periods as $period) { + $total += $period->getDuration(); + } + + return $total; + } + + /** + * Gets the max memory usage of all periods. + * + * @return int The memory usage (in bytes) + */ + public function getMemory() + { + $memory = 0; + foreach ($this->periods as $period) { + if ($period->getMemory() > $memory) { + $memory = $period->getMemory(); + } + } + + return $memory; + } + + /** + * Return the current time relative to origin. + * + * @return float Time in ms + */ + protected function getNow() + { + return $this->formatTime(microtime(true) * 1000 - $this->origin); + } + + /** + * Formats a time. + * + * @param int|float $time A raw time + * + * @return float The formatted time + * + * @throws \InvalidArgumentException When the raw time is not valid + */ + private function formatTime($time) + { + if (!is_numeric($time)) { + throw new \InvalidArgumentException('The time must be a numerical value'); + } + + return round($time, 1); + } + + /** + * @return string + */ + public function __toString() + { + return sprintf('%s: %.2F MiB - %d ms', $this->getCategory(), $this->getMemory() / 1024 / 1024, $this->getDuration()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/StopwatchPeriod.php b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/StopwatchPeriod.php new file mode 100644 index 0000000000000000000000000000000000000000..9876f179aadb6f79dd0601e5f147710ac8e25975 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/StopwatchPeriod.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Stopwatch; + +/** + * Represents an Period for an Event. + * + * @author Fabien Potencier + */ +class StopwatchPeriod +{ + private $start; + private $end; + private $memory; + + /** + * Constructor. + * + * @param int $start The relative time of the start of the period (in milliseconds) + * @param int $end The relative time of the end of the period (in milliseconds) + */ + public function __construct($start, $end) + { + $this->start = (int) $start; + $this->end = (int) $end; + $this->memory = memory_get_usage(true); + } + + /** + * Gets the relative time of the start of the period. + * + * @return int The time (in milliseconds) + */ + public function getStartTime() + { + return $this->start; + } + + /** + * Gets the relative time of the end of the period. + * + * @return int The time (in milliseconds) + */ + public function getEndTime() + { + return $this->end; + } + + /** + * Gets the time spent in this period. + * + * @return int The period duration (in milliseconds) + */ + public function getDuration() + { + return $this->end - $this->start; + } + + /** + * Gets the memory usage. + * + * @return int The memory usage (in bytes) + */ + public function getMemory() + { + return $this->memory; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f2ee03979775347ac0b143a246166133faa98adf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php @@ -0,0 +1,176 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Stopwatch\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Stopwatch\StopwatchEvent; + +/** + * StopwatchEventTest. + * + * @author Fabien Potencier + * + * @group time-sensitive + */ +class StopwatchEventTest extends TestCase +{ + const DELTA = 37; + + public function testGetOrigin() + { + $event = new StopwatchEvent(12); + $this->assertEquals(12, $event->getOrigin()); + } + + public function testGetCategory() + { + $event = new StopwatchEvent(microtime(true) * 1000); + $this->assertEquals('default', $event->getCategory()); + + $event = new StopwatchEvent(microtime(true) * 1000, 'cat'); + $this->assertEquals('cat', $event->getCategory()); + } + + public function testGetPeriods() + { + $event = new StopwatchEvent(microtime(true) * 1000); + $this->assertEquals(array(), $event->getPeriods()); + + $event = new StopwatchEvent(microtime(true) * 1000); + $event->start(); + $event->stop(); + $this->assertCount(1, $event->getPeriods()); + + $event = new StopwatchEvent(microtime(true) * 1000); + $event->start(); + $event->stop(); + $event->start(); + $event->stop(); + $this->assertCount(2, $event->getPeriods()); + } + + public function testLap() + { + $event = new StopwatchEvent(microtime(true) * 1000); + $event->start(); + $event->lap(); + $event->stop(); + $this->assertCount(2, $event->getPeriods()); + } + + public function testDuration() + { + $event = new StopwatchEvent(microtime(true) * 1000); + $event->start(); + usleep(200000); + $event->stop(); + $this->assertEquals(200, $event->getDuration(), null, self::DELTA); + + $event = new StopwatchEvent(microtime(true) * 1000); + $event->start(); + usleep(100000); + $event->stop(); + usleep(50000); + $event->start(); + usleep(100000); + $event->stop(); + $this->assertEquals(200, $event->getDuration(), null, self::DELTA); + } + + public function testDurationBeforeStop() + { + $event = new StopwatchEvent(microtime(true) * 1000); + $event->start(); + usleep(200000); + $this->assertEquals(200, $event->getDuration(), null, self::DELTA); + + $event = new StopwatchEvent(microtime(true) * 1000); + $event->start(); + usleep(100000); + $event->stop(); + usleep(50000); + $event->start(); + usleep(100000); + $this->assertEquals(100, $event->getDuration(), null, self::DELTA); + } + + /** + * @expectedException \LogicException + */ + public function testStopWithoutStart() + { + $event = new StopwatchEvent(microtime(true) * 1000); + $event->stop(); + } + + public function testIsStarted() + { + $event = new StopwatchEvent(microtime(true) * 1000); + $event->start(); + $this->assertTrue($event->isStarted()); + } + + public function testIsNotStarted() + { + $event = new StopwatchEvent(microtime(true) * 1000); + $this->assertFalse($event->isStarted()); + } + + public function testEnsureStopped() + { + // this also test overlap between two periods + $event = new StopwatchEvent(microtime(true) * 1000); + $event->start(); + usleep(100000); + $event->start(); + usleep(100000); + $event->ensureStopped(); + $this->assertEquals(300, $event->getDuration(), null, self::DELTA); + } + + public function testStartTime() + { + $event = new StopwatchEvent(microtime(true) * 1000); + $this->assertLessThanOrEqual(0.5, $event->getStartTime()); + + $event = new StopwatchEvent(microtime(true) * 1000); + $event->start(); + $event->stop(); + $this->assertLessThanOrEqual(1, $event->getStartTime()); + + $event = new StopwatchEvent(microtime(true) * 1000); + $event->start(); + usleep(100000); + $event->stop(); + $this->assertEquals(0, $event->getStartTime(), null, self::DELTA); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testInvalidOriginThrowsAnException() + { + new StopwatchEvent('abc'); + } + + public function testHumanRepresentation() + { + $event = new StopwatchEvent(microtime(true) * 1000); + $this->assertEquals('default: 0.00 MiB - 0 ms', (string) $event); + $event->start(); + $event->stop(); + $this->assertEquals(1, preg_match('/default: [0-9\.]+ MiB - [0-9]+ ms/', (string) $event)); + + $event = new StopwatchEvent(microtime(true) * 1000, 'foo'); + $this->assertEquals('foo: 0.00 MiB - 0 ms', (string) $event); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f7d9171d8bc04b48c4e4be850b2df0b448f31a08 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php @@ -0,0 +1,156 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Stopwatch\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Stopwatch\Stopwatch; + +/** + * StopwatchTest. + * + * @author Fabien Potencier + * + * @group time-sensitive + */ +class StopwatchTest extends TestCase +{ + const DELTA = 20; + + public function testStart() + { + $stopwatch = new Stopwatch(); + $event = $stopwatch->start('foo', 'cat'); + + $this->assertInstanceOf('Symfony\Component\Stopwatch\StopwatchEvent', $event); + $this->assertEquals('cat', $event->getCategory()); + $this->assertSame($event, $stopwatch->getEvent('foo')); + } + + public function testIsStarted() + { + $stopwatch = new Stopwatch(); + $stopwatch->start('foo', 'cat'); + + $this->assertTrue($stopwatch->isStarted('foo')); + } + + public function testIsNotStarted() + { + $stopwatch = new Stopwatch(); + + $this->assertFalse($stopwatch->isStarted('foo')); + } + + public function testIsNotStartedEvent() + { + $stopwatch = new Stopwatch(); + + $sections = new \ReflectionProperty('Symfony\Component\Stopwatch\Stopwatch', 'sections'); + $sections->setAccessible(true); + $section = $sections->getValue($stopwatch); + + $events = new \ReflectionProperty('Symfony\Component\Stopwatch\Section', 'events'); + $events->setAccessible(true); + + $stopwatchMockEvent = $this->getMockBuilder('Symfony\Component\Stopwatch\StopwatchEvent') + ->setConstructorArgs(array(microtime(true) * 1000)) + ->getMock() + ; + + $events->setValue(end($section), array('foo' => $stopwatchMockEvent)); + + $this->assertFalse($stopwatch->isStarted('foo')); + } + + public function testStop() + { + $stopwatch = new Stopwatch(); + $stopwatch->start('foo', 'cat'); + usleep(200000); + $event = $stopwatch->stop('foo'); + + $this->assertInstanceOf('Symfony\Component\Stopwatch\StopwatchEvent', $event); + $this->assertEquals(200, $event->getDuration(), null, self::DELTA); + } + + /** + * @expectedException \LogicException + */ + public function testUnknownEvent() + { + $stopwatch = new Stopwatch(); + $stopwatch->getEvent('foo'); + } + + /** + * @expectedException \LogicException + */ + public function testStopWithoutStart() + { + $stopwatch = new Stopwatch(); + $stopwatch->stop('foo'); + } + + public function testSection() + { + $stopwatch = new Stopwatch(); + + $stopwatch->openSection(); + $stopwatch->start('foo', 'cat'); + $stopwatch->stop('foo'); + $stopwatch->start('bar', 'cat'); + $stopwatch->stop('bar'); + $stopwatch->stopSection('1'); + + $stopwatch->openSection(); + $stopwatch->start('foobar', 'cat'); + $stopwatch->stop('foobar'); + $stopwatch->stopSection('2'); + + $stopwatch->openSection(); + $stopwatch->start('foobar', 'cat'); + $stopwatch->stop('foobar'); + $stopwatch->stopSection('0'); + + // the section is an event by itself + $this->assertCount(3, $stopwatch->getSectionEvents('1')); + $this->assertCount(2, $stopwatch->getSectionEvents('2')); + $this->assertCount(2, $stopwatch->getSectionEvents('0')); + } + + public function testReopenASection() + { + $stopwatch = new Stopwatch(); + + $stopwatch->openSection(); + $stopwatch->start('foo', 'cat'); + $stopwatch->stopSection('section'); + + $stopwatch->openSection('section'); + $stopwatch->start('bar', 'cat'); + $stopwatch->stopSection('section'); + + $events = $stopwatch->getSectionEvents('section'); + + $this->assertCount(3, $events); + $this->assertCount(2, $events['__section__']->getPeriods()); + } + + /** + * @expectedException \LogicException + */ + public function testReopenANewSectionShouldThrowAnException() + { + $stopwatch = new Stopwatch(); + $stopwatch->openSection('section'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..c326f692b190142548ba5cd14c271a6cc5b19983 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/composer.json @@ -0,0 +1,33 @@ +{ + "name": "symfony/stopwatch", + "type": "library", + "description": "Symfony Stopwatch Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Stopwatch\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..b16dcaebf9a476fca292d520c1a1e5f6925f0e3d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Stopwatch/phpunit.xml.dist @@ -0,0 +1,28 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Templating/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..c627e669f25d67e79a396896fb40160c37c46401 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/CHANGELOG.md @@ -0,0 +1,14 @@ +CHANGELOG +========= + +2.5.0 +----- + + * added ability to generate versioned URLs + * added ability to generate absolute URLs + +2.1.0 +----- + + * added StreamingEngineInterface + * added ENT_SUBSTITUTE for the HTML escaper diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/DelegatingEngine.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/DelegatingEngine.php new file mode 100644 index 0000000000000000000000000000000000000000..4006ea5d92f9a475959c2f4088018d1624f20438 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/DelegatingEngine.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating; + +/** + * DelegatingEngine selects an engine for a given template. + * + * @author Fabien Potencier + */ +class DelegatingEngine implements EngineInterface, StreamingEngineInterface +{ + /** + * @var EngineInterface[] + */ + protected $engines = array(); + + /** + * Constructor. + * + * @param EngineInterface[] $engines An array of EngineInterface instances to add + */ + public function __construct(array $engines = array()) + { + foreach ($engines as $engine) { + $this->addEngine($engine); + } + } + + /** + * {@inheritdoc} + */ + public function render($name, array $parameters = array()) + { + return $this->getEngine($name)->render($name, $parameters); + } + + /** + * {@inheritdoc} + */ + public function stream($name, array $parameters = array()) + { + $engine = $this->getEngine($name); + if (!$engine instanceof StreamingEngineInterface) { + throw new \LogicException(sprintf('Template "%s" cannot be streamed as the engine supporting it does not implement StreamingEngineInterface.', $name)); + } + + $engine->stream($name, $parameters); + } + + /** + * {@inheritdoc} + */ + public function exists($name) + { + return $this->getEngine($name)->exists($name); + } + + /** + * Adds an engine. + * + * @param EngineInterface $engine An EngineInterface instance + */ + public function addEngine(EngineInterface $engine) + { + $this->engines[] = $engine; + } + + /** + * {@inheritdoc} + */ + public function supports($name) + { + try { + $this->getEngine($name); + } catch (\RuntimeException $e) { + return false; + } + + return true; + } + + /** + * Get an engine able to render the given template. + * + * @param string|TemplateReferenceInterface $name A template name or a TemplateReferenceInterface instance + * + * @return EngineInterface The engine + * + * @throws \RuntimeException if no engine able to work with the template is found + */ + public function getEngine($name) + { + foreach ($this->engines as $engine) { + if ($engine->supports($name)) { + return $engine; + } + } + + throw new \RuntimeException(sprintf('No engine is able to work with the template "%s".', $name)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/EngineInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/EngineInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..fb02c80dafe65f7c0bd2cd15b46028bf9af313aa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/EngineInterface.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating; + +/** + * EngineInterface is the interface each engine must implement. + * + * All methods rely on a template name. A template name is a + * "logical" name for the template, and as such it does not refer to + * a path on the filesystem (in fact, the template can be stored + * anywhere, like in a database). + * + * The methods should accept any name. If the name is not an instance of + * TemplateReferenceInterface, a TemplateNameParserInterface should be used to + * convert the name to a TemplateReferenceInterface instance. + * + * Each template loader uses the logical template name to look for + * the template. + * + * @author Fabien Potencier + */ +interface EngineInterface +{ + /** + * Renders a template. + * + * @param string|TemplateReferenceInterface $name A template name or a TemplateReferenceInterface instance + * @param array $parameters An array of parameters to pass to the template + * + * @return string The evaluated template as a string + * + * @throws \RuntimeException if the template cannot be rendered + */ + public function render($name, array $parameters = array()); + + /** + * Returns true if the template exists. + * + * @param string|TemplateReferenceInterface $name A template name or a TemplateReferenceInterface instance + * + * @return bool true if the template exists, false otherwise + * + * @throws \RuntimeException if the engine cannot handle the template name + */ + public function exists($name); + + /** + * Returns true if this class is able to render the given template. + * + * @param string|TemplateReferenceInterface $name A template name or a TemplateReferenceInterface instance + * + * @return bool true if this class supports the given template, false otherwise + */ + public function supports($name); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/Helper.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/Helper.php new file mode 100644 index 0000000000000000000000000000000000000000..2f34fb22d233f0c7df1af1d9d870b87290733cc5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/Helper.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\Component\Templating\Helper; + +/** + * Helper is the base class for all helper classes. + * + * Most of the time, a Helper is an adapter around an existing + * class that exposes a read-only interface for templates. + * + * @author Fabien Potencier + */ +abstract class Helper implements HelperInterface +{ + protected $charset = 'UTF-8'; + + /** + * Sets the default charset. + * + * @param string $charset The charset + */ + public function setCharset($charset) + { + $this->charset = $charset; + } + + /** + * Gets the default charset. + * + * @return string The default charset + */ + public function getCharset() + { + return $this->charset; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/HelperInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/HelperInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..ce67c4ac70b23a3ab2399100ec422950a4891c42 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/HelperInterface.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Helper; + +/** + * HelperInterface is the interface all helpers must implement. + * + * @author Fabien Potencier + */ +interface HelperInterface +{ + /** + * Returns the canonical name of this helper. + * + * @return string The canonical name + */ + public function getName(); + + /** + * Sets the default charset. + * + * @param string $charset The charset + */ + public function setCharset($charset); + + /** + * Gets the default charset. + * + * @return string The default charset + */ + public function getCharset(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/SlotsHelper.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/SlotsHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..8fa5ff5ff2a746847e2bfd3d4d5d9297fba7da0c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Helper/SlotsHelper.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Helper; + +/** + * SlotsHelper manages template slots. + * + * @author Fabien Potencier + */ +class SlotsHelper extends Helper +{ + protected $slots = array(); + protected $openSlots = array(); + + /** + * Starts a new slot. + * + * This method starts an output buffer that will be + * closed when the stop() method is called. + * + * @param string $name The slot name + * + * @throws \InvalidArgumentException if a slot with the same name is already started + */ + public function start($name) + { + if (in_array($name, $this->openSlots)) { + throw new \InvalidArgumentException(sprintf('A slot named "%s" is already started.', $name)); + } + + $this->openSlots[] = $name; + $this->slots[$name] = ''; + + ob_start(); + ob_implicit_flush(0); + } + + /** + * Stops a slot. + * + * @throws \LogicException if no slot has been started + */ + public function stop() + { + if (!$this->openSlots) { + throw new \LogicException('No slot started.'); + } + + $name = array_pop($this->openSlots); + + $this->slots[$name] = ob_get_clean(); + } + + /** + * Returns true if the slot exists. + * + * @param string $name The slot name + * + * @return bool + */ + public function has($name) + { + return isset($this->slots[$name]); + } + + /** + * Gets the slot value. + * + * @param string $name The slot name + * @param bool|string $default The default slot content + * + * @return string The slot content + */ + public function get($name, $default = false) + { + return isset($this->slots[$name]) ? $this->slots[$name] : $default; + } + + /** + * Sets a slot value. + * + * @param string $name The slot name + * @param string $content The slot content + */ + public function set($name, $content) + { + $this->slots[$name] = $content; + } + + /** + * Outputs a slot. + * + * @param string $name The slot name + * @param bool|string $default The default slot content + * + * @return bool true if the slot is defined or if a default content has been provided, false otherwise + */ + public function output($name, $default = false) + { + if (!isset($this->slots[$name])) { + if (false !== $default) { + echo $default; + + return true; + } + + return false; + } + + echo $this->slots[$name]; + + return true; + } + + /** + * Returns the canonical name of this helper. + * + * @return string The canonical name + */ + public function getName() + { + return 'slots'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Templating/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/CacheLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/CacheLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..45ee3c359c7d7af28ae2fe74a9f68e6a07286eda --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/CacheLoader.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Loader; + +use Symfony\Component\Templating\Storage\Storage; +use Symfony\Component\Templating\Storage\FileStorage; +use Symfony\Component\Templating\TemplateReferenceInterface; + +/** + * CacheLoader is a loader that caches other loaders responses + * on the filesystem. + * + * This cache only caches on disk to allow PHP accelerators to cache the opcodes. + * All other mechanism would imply the use of `eval()`. + * + * @author Fabien Potencier + */ +class CacheLoader extends Loader +{ + protected $loader; + protected $dir; + + /** + * Constructor. + * + * @param LoaderInterface $loader A Loader instance + * @param string $dir The directory where to store the cache files + */ + public function __construct(LoaderInterface $loader, $dir) + { + $this->loader = $loader; + $this->dir = $dir; + } + + /** + * Loads a template. + * + * @param TemplateReferenceInterface $template A template + * + * @return Storage|bool false if the template cannot be loaded, a Storage instance otherwise + */ + public function load(TemplateReferenceInterface $template) + { + $key = hash('sha256', $template->getLogicalName()); + $dir = $this->dir.DIRECTORY_SEPARATOR.substr($key, 0, 2); + $file = substr($key, 2).'.tpl'; + $path = $dir.DIRECTORY_SEPARATOR.$file; + + if (is_file($path)) { + if (null !== $this->logger) { + $this->logger->debug('Fetching template from cache.', array('name' => $template->get('name'))); + } + + return new FileStorage($path); + } + + if (false === $storage = $this->loader->load($template)) { + return false; + } + + $content = $storage->getContent(); + + if (!is_dir($dir) && !@mkdir($dir, 0777, true) && !is_dir($dir)) { + throw new \RuntimeException(sprintf('Cache Loader was not able to create directory "%s"', $dir)); + } + + file_put_contents($path, $content); + + if (null !== $this->logger) { + $this->logger->debug('Storing template in cache.', array('name' => $template->get('name'))); + } + + return new FileStorage($path); + } + + /** + * Returns true if the template is still fresh. + * + * @param TemplateReferenceInterface $template A template + * @param int $time The last modification time of the cached template (timestamp) + * + * @return bool + */ + public function isFresh(TemplateReferenceInterface $template, $time) + { + return $this->loader->isFresh($template, $time); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/ChainLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/ChainLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..9a9d15792101fd676aafb7788d66cc5e5913c107 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/ChainLoader.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Loader; + +use Symfony\Component\Templating\Storage\Storage; +use Symfony\Component\Templating\TemplateReferenceInterface; + +/** + * ChainLoader is a loader that calls other loaders to load templates. + * + * @author Fabien Potencier + */ +class ChainLoader extends Loader +{ + protected $loaders = array(); + + /** + * Constructor. + * + * @param LoaderInterface[] $loaders An array of loader instances + */ + public function __construct(array $loaders = array()) + { + foreach ($loaders as $loader) { + $this->addLoader($loader); + } + } + + /** + * Adds a loader instance. + * + * @param LoaderInterface $loader A Loader instance + */ + public function addLoader(LoaderInterface $loader) + { + $this->loaders[] = $loader; + } + + /** + * Loads a template. + * + * @param TemplateReferenceInterface $template A template + * + * @return Storage|bool false if the template cannot be loaded, a Storage instance otherwise + */ + public function load(TemplateReferenceInterface $template) + { + foreach ($this->loaders as $loader) { + if (false !== $storage = $loader->load($template)) { + return $storage; + } + } + + return false; + } + + /** + * Returns true if the template is still fresh. + * + * @param TemplateReferenceInterface $template A template + * @param int $time The last modification time of the cached template (timestamp) + * + * @return bool + */ + public function isFresh(TemplateReferenceInterface $template, $time) + { + foreach ($this->loaders as $loader) { + return $loader->isFresh($template, $time); + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/FilesystemLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/FilesystemLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..1476802be876b90c9504d45a56c9e92237d0d67e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/FilesystemLoader.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Loader; + +use Symfony\Component\Templating\Storage\Storage; +use Symfony\Component\Templating\Storage\FileStorage; +use Symfony\Component\Templating\TemplateReferenceInterface; + +/** + * FilesystemLoader is a loader that read templates from the filesystem. + * + * @author Fabien Potencier + */ +class FilesystemLoader extends Loader +{ + protected $templatePathPatterns; + + /** + * Constructor. + * + * @param array $templatePathPatterns An array of path patterns to look for templates + */ + public function __construct($templatePathPatterns) + { + $this->templatePathPatterns = (array) $templatePathPatterns; + } + + /** + * Loads a template. + * + * @param TemplateReferenceInterface $template A template + * + * @return Storage|bool false if the template cannot be loaded, a Storage instance otherwise + */ + public function load(TemplateReferenceInterface $template) + { + $file = $template->get('name'); + + if (self::isAbsolutePath($file) && is_file($file)) { + return new FileStorage($file); + } + + $replacements = array(); + foreach ($template->all() as $key => $value) { + $replacements['%'.$key.'%'] = $value; + } + + $fileFailures = array(); + foreach ($this->templatePathPatterns as $templatePathPattern) { + if (is_file($file = strtr($templatePathPattern, $replacements)) && is_readable($file)) { + if (null !== $this->logger) { + $this->logger->debug('Loaded template file.', array('file' => $file)); + } + + return new FileStorage($file); + } + + if (null !== $this->logger) { + $fileFailures[] = $file; + } + } + + // only log failures if no template could be loaded at all + foreach ($fileFailures as $file) { + if (null !== $this->logger) { + $this->logger->debug('Failed loading template file.', array('file' => $file)); + } + } + + return false; + } + + /** + * Returns true if the template is still fresh. + * + * @param TemplateReferenceInterface $template A template + * @param int $time The last modification time of the cached template (timestamp) + * + * @return bool true if the template is still fresh, false otherwise + */ + public function isFresh(TemplateReferenceInterface $template, $time) + { + if (false === $storage = $this->load($template)) { + return false; + } + + return filemtime((string) $storage) < $time; + } + + /** + * Returns true if the file is an existing absolute path. + * + * @param string $file A path + * + * @return bool true if the path exists and is absolute, false otherwise + */ + protected static function isAbsolutePath($file) + { + if ($file[0] == '/' || $file[0] == '\\' + || (strlen($file) > 3 && ctype_alpha($file[0]) + && $file[1] == ':' + && ($file[2] == '\\' || $file[2] == '/') + ) + || null !== parse_url($file, PHP_URL_SCHEME) + ) { + return true; + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/Loader.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/Loader.php new file mode 100644 index 0000000000000000000000000000000000000000..7820444fca33c5181e5e8cd02840f61d3f0d5ff3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/Loader.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Loader; + +use Psr\Log\LoggerInterface; + +/** + * Loader is the base class for all template loader classes. + * + * @author Fabien Potencier + */ +abstract class Loader implements LoaderInterface +{ + /** + * @var LoggerInterface|null + */ + protected $logger; + + /** + * Sets the debug logger to use for this loader. + * + * @param LoggerInterface $logger A logger instance + */ + public function setLogger(LoggerInterface $logger) + { + $this->logger = $logger; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/LoaderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/LoaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..0795dcbd19392965e9ce2bb6f4254fcb8f91654b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Loader/LoaderInterface.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Loader; + +use Symfony\Component\Templating\TemplateReferenceInterface; +use Symfony\Component\Templating\Storage\Storage; + +/** + * LoaderInterface is the interface all loaders must implement. + * + * @author Fabien Potencier + */ +interface LoaderInterface +{ + /** + * Loads a template. + * + * @param TemplateReferenceInterface $template A template + * + * @return Storage|bool false if the template cannot be loaded, a Storage instance otherwise + */ + public function load(TemplateReferenceInterface $template); + + /** + * Returns true if the template is still fresh. + * + * @param TemplateReferenceInterface $template A template + * @param int $time The last modification time of the cached template (timestamp) + * + * @return bool + */ + public function isFresh(TemplateReferenceInterface $template, $time); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/PhpEngine.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/PhpEngine.php new file mode 100644 index 0000000000000000000000000000000000000000..41b7daef4e18dfd7525e67a726bd28f8cea74fac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/PhpEngine.php @@ -0,0 +1,518 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating; + +use Symfony\Component\Templating\Storage\Storage; +use Symfony\Component\Templating\Storage\FileStorage; +use Symfony\Component\Templating\Storage\StringStorage; +use Symfony\Component\Templating\Helper\HelperInterface; +use Symfony\Component\Templating\Loader\LoaderInterface; + +/** + * PhpEngine is an engine able to render PHP templates. + * + * @author Fabien Potencier + */ +class PhpEngine implements EngineInterface, \ArrayAccess +{ + protected $loader; + protected $current; + /** + * @var HelperInterface[] + */ + protected $helpers = array(); + protected $parents = array(); + protected $stack = array(); + protected $charset = 'UTF-8'; + protected $cache = array(); + protected $escapers = array(); + protected static $escaperCache = array(); + protected $globals = array(); + protected $parser; + + private $evalTemplate; + private $evalParameters; + + /** + * Constructor. + * + * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance + * @param LoaderInterface $loader A loader instance + * @param HelperInterface[] $helpers An array of helper instances + */ + public function __construct(TemplateNameParserInterface $parser, LoaderInterface $loader, array $helpers = array()) + { + $this->parser = $parser; + $this->loader = $loader; + + $this->addHelpers($helpers); + + $this->initializeEscapers(); + foreach ($this->escapers as $context => $escaper) { + $this->setEscaper($context, $escaper); + } + } + + /** + * {@inheritdoc} + * + * @throws \InvalidArgumentException if the template does not exist + */ + public function render($name, array $parameters = array()) + { + $storage = $this->load($name); + $key = hash('sha256', serialize($storage)); + $this->current = $key; + $this->parents[$key] = null; + + // attach the global variables + $parameters = array_replace($this->getGlobals(), $parameters); + // render + if (false === $content = $this->evaluate($storage, $parameters)) { + throw new \RuntimeException(sprintf('The template "%s" cannot be rendered.', $this->parser->parse($name))); + } + + // decorator + if ($this->parents[$key]) { + $slots = $this->get('slots'); + $this->stack[] = $slots->get('_content'); + $slots->set('_content', $content); + + $content = $this->render($this->parents[$key], $parameters); + + $slots->set('_content', array_pop($this->stack)); + } + + return $content; + } + + /** + * {@inheritdoc} + */ + public function exists($name) + { + try { + $this->load($name); + } catch (\InvalidArgumentException $e) { + return false; + } + + return true; + } + + /** + * {@inheritdoc} + */ + public function supports($name) + { + $template = $this->parser->parse($name); + + return 'php' === $template->get('engine'); + } + + /** + * Evaluates a template. + * + * @param Storage $template The template to render + * @param array $parameters An array of parameters to pass to the template + * + * @return string|false The evaluated template, or false if the engine is unable to render the template + * + * @throws \InvalidArgumentException + */ + protected function evaluate(Storage $template, array $parameters = array()) + { + $this->evalTemplate = $template; + $this->evalParameters = $parameters; + unset($template, $parameters); + + if (isset($this->evalParameters['this'])) { + throw new \InvalidArgumentException('Invalid parameter (this)'); + } + if (isset($this->evalParameters['view'])) { + throw new \InvalidArgumentException('Invalid parameter (view)'); + } + + // the view variable is exposed to the require file below + $view = $this; + if ($this->evalTemplate instanceof FileStorage) { + extract($this->evalParameters, EXTR_SKIP); + $this->evalParameters = null; + + ob_start(); + require $this->evalTemplate; + + $this->evalTemplate = null; + + return ob_get_clean(); + } elseif ($this->evalTemplate instanceof StringStorage) { + extract($this->evalParameters, EXTR_SKIP); + $this->evalParameters = null; + + ob_start(); + eval('; ?>'.$this->evalTemplate.'evalTemplate = null; + + return ob_get_clean(); + } + + return false; + } + + /** + * Gets a helper value. + * + * @param string $name The helper name + * + * @return HelperInterface The helper value + * + * @throws \InvalidArgumentException if the helper is not defined + */ + public function offsetGet($name) + { + return $this->get($name); + } + + /** + * Returns true if the helper is defined. + * + * @param string $name The helper name + * + * @return bool true if the helper is defined, false otherwise + */ + public function offsetExists($name) + { + return isset($this->helpers[$name]); + } + + /** + * Sets a helper. + * + * @param HelperInterface $name The helper instance + * @param string $value An alias + */ + public function offsetSet($name, $value) + { + $this->set($name, $value); + } + + /** + * Removes a helper. + * + * @param string $name The helper name + * + * @throws \LogicException + */ + public function offsetUnset($name) + { + throw new \LogicException(sprintf('You can\'t unset a helper (%s).', $name)); + } + + /** + * Adds some helpers. + * + * @param HelperInterface[] $helpers An array of helper + */ + public function addHelpers(array $helpers) + { + foreach ($helpers as $alias => $helper) { + $this->set($helper, is_int($alias) ? null : $alias); + } + } + + /** + * Sets the helpers. + * + * @param HelperInterface[] $helpers An array of helper + */ + public function setHelpers(array $helpers) + { + $this->helpers = array(); + $this->addHelpers($helpers); + } + + /** + * Sets a helper. + * + * @param HelperInterface $helper The helper instance + * @param string $alias An alias + */ + public function set(HelperInterface $helper, $alias = null) + { + $this->helpers[$helper->getName()] = $helper; + if (null !== $alias) { + $this->helpers[$alias] = $helper; + } + + $helper->setCharset($this->charset); + } + + /** + * Returns true if the helper if defined. + * + * @param string $name The helper name + * + * @return bool true if the helper is defined, false otherwise + */ + public function has($name) + { + return isset($this->helpers[$name]); + } + + /** + * Gets a helper value. + * + * @param string $name The helper name + * + * @return HelperInterface The helper instance + * + * @throws \InvalidArgumentException if the helper is not defined + */ + public function get($name) + { + if (!isset($this->helpers[$name])) { + throw new \InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name)); + } + + return $this->helpers[$name]; + } + + /** + * Decorates the current template with another one. + * + * @param string $template The decorator logical name + */ + public function extend($template) + { + $this->parents[$this->current] = $template; + } + + /** + * Escapes a string by using the current charset. + * + * @param mixed $value A variable to escape + * @param string $context The context name + * + * @return string The escaped value + */ + public function escape($value, $context = 'html') + { + if (is_numeric($value)) { + return $value; + } + + // If we deal with a scalar value, we can cache the result to increase + // the performance when the same value is escaped multiple times (e.g. loops) + if (is_scalar($value)) { + if (!isset(self::$escaperCache[$context][$value])) { + self::$escaperCache[$context][$value] = call_user_func($this->getEscaper($context), $value); + } + + return self::$escaperCache[$context][$value]; + } + + return call_user_func($this->getEscaper($context), $value); + } + + /** + * Sets the charset to use. + * + * @param string $charset The charset + */ + public function setCharset($charset) + { + if ('UTF8' === $charset = strtoupper($charset)) { + $charset = 'UTF-8'; // iconv on Windows requires "UTF-8" instead of "UTF8" + } + $this->charset = $charset; + + foreach ($this->helpers as $helper) { + $helper->setCharset($this->charset); + } + } + + /** + * Gets the current charset. + * + * @return string The current charset + */ + public function getCharset() + { + return $this->charset; + } + + /** + * Adds an escaper for the given context. + * + * @param string $context The escaper context (html, js, ...) + * @param callable $escaper A PHP callable + */ + public function setEscaper($context, callable $escaper) + { + $this->escapers[$context] = $escaper; + self::$escaperCache[$context] = array(); + } + + /** + * Gets an escaper for a given context. + * + * @param string $context The context name + * + * @return callable $escaper A PHP callable + * + * @throws \InvalidArgumentException + */ + public function getEscaper($context) + { + if (!isset($this->escapers[$context])) { + throw new \InvalidArgumentException(sprintf('No registered escaper for context "%s".', $context)); + } + + return $this->escapers[$context]; + } + + /** + * @param string $name + * @param mixed $value + */ + public function addGlobal($name, $value) + { + $this->globals[$name] = $value; + } + + /** + * Returns the assigned globals. + * + * @return array + */ + public function getGlobals() + { + return $this->globals; + } + + /** + * Initializes the built-in escapers. + * + * Each function specifies a way for applying a transformation to a string + * passed to it. The purpose is for the string to be "escaped" so it is + * suitable for the format it is being displayed in. + * + * For example, the string: "It's required that you enter a username & password.\n" + * If this were to be displayed as HTML it would be sensible to turn the + * ampersand into '&' and the apostrophe into '&aps;'. However if it were + * going to be used as a string in JavaScript to be displayed in an alert box + * it would be right to leave the string as-is, but c-escape the apostrophe and + * the new line. + * + * For each function there is a define to avoid problems with strings being + * incorrectly specified. + */ + protected function initializeEscapers() + { + $flags = ENT_QUOTES | ENT_SUBSTITUTE; + + $this->escapers = array( + 'html' => + /** + * Runs the PHP function htmlspecialchars on the value passed. + * + * @param string $value the value to escape + * + * @return string the escaped value + */ + function ($value) use ($flags) { + // Numbers and Boolean values get turned into strings which can cause problems + // with type comparisons (e.g. === or is_int() etc). + return is_string($value) ? htmlspecialchars($value, $flags, $this->getCharset(), false) : $value; + }, + + 'js' => + /** + * A function that escape all non-alphanumeric characters + * into their \xHH or \uHHHH representations. + * + * @param string $value the value to escape + * + * @return string the escaped value + */ + function ($value) { + if ('UTF-8' != $this->getCharset()) { + $value = iconv($this->getCharset(), 'UTF-8', $value); + } + + $callback = function ($matches) { + $char = $matches[0]; + + // \xHH + if (!isset($char[1])) { + return '\\x'.substr('00'.bin2hex($char), -2); + } + + // \uHHHH + $char = iconv('UTF-8', 'UTF-16BE', $char); + + return '\\u'.substr('0000'.bin2hex($char), -4); + }; + + if (null === $value = preg_replace_callback('#[^\p{L}\p{N} ]#u', $callback, $value)) { + throw new \InvalidArgumentException('The string to escape is not a valid UTF-8 string.'); + } + + if ('UTF-8' != $this->getCharset()) { + $value = iconv('UTF-8', $this->getCharset(), $value); + } + + return $value; + }, + ); + + self::$escaperCache = array(); + } + + /** + * Gets the loader associated with this engine. + * + * @return LoaderInterface A LoaderInterface instance + */ + public function getLoader() + { + return $this->loader; + } + + /** + * Loads the given template. + * + * @param string|TemplateReferenceInterface $name A template name or a TemplateReferenceInterface instance + * + * @return Storage A Storage instance + * + * @throws \InvalidArgumentException if the template cannot be found + */ + protected function load($name) + { + $template = $this->parser->parse($name); + + $key = $template->getLogicalName(); + if (isset($this->cache[$key])) { + return $this->cache[$key]; + } + + $storage = $this->loader->load($template); + + if (false === $storage) { + throw new \InvalidArgumentException(sprintf('The template "%s" does not exist.', $template)); + } + + return $this->cache[$key] = $storage; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/README.md b/vendor/symfony/symfony/src/Symfony/Component/Templating/README.md new file mode 100644 index 0000000000000000000000000000000000000000..58e2a0a5c6b832436075568d4015d3b9e039098e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/README.md @@ -0,0 +1,19 @@ +Templating Component +==================== + +The Templating component provides all the tools needed to build any kind of +template system. + +It provides an infrastructure to load template files and optionally monitor them +for changes. It also provides a concrete template engine implementation using +PHP with additional tools for escaping and separating templates into blocks and +layouts. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/templating/index.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/vendor/symfony/symfony/src/Symfony/Component/Templating/Storage/FileStorage.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Storage/FileStorage.php new file mode 100644 index 0000000000000000000000000000000000000000..9d3183adc07f39398486e947cfd10f1d469105c1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Storage/FileStorage.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\Templating\Storage; + +/** + * FileStorage represents a template stored on the filesystem. + * + * @author Fabien Potencier + */ +class FileStorage extends Storage +{ + /** + * Returns the content of the template. + * + * @return string The template content + */ + public function getContent() + { + return file_get_contents($this->template); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Storage/Storage.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Storage/Storage.php new file mode 100644 index 0000000000000000000000000000000000000000..e5ad2c48189fe04ad48cade369ee72a755c0dca6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Storage/Storage.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Storage; + +/** + * Storage is the base class for all storage classes. + * + * @author Fabien Potencier + */ +abstract class Storage +{ + protected $template; + + /** + * Constructor. + * + * @param string $template The template name + */ + public function __construct($template) + { + $this->template = $template; + } + + /** + * Returns the object string representation. + * + * @return string The template name + */ + public function __toString() + { + return (string) $this->template; + } + + /** + * Returns the content of the template. + * + * @return string The template content + */ + abstract public function getContent(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Storage/StringStorage.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Storage/StringStorage.php new file mode 100644 index 0000000000000000000000000000000000000000..ce3f51ebebd825cecc743f2a37fd20cebacb0931 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Storage/StringStorage.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\Templating\Storage; + +/** + * StringStorage represents a template stored in a string. + * + * @author Fabien Potencier + */ +class StringStorage extends Storage +{ + /** + * Returns the content of the template. + * + * @return string The template content + */ + public function getContent() + { + return $this->template; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/StreamingEngineInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/StreamingEngineInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..f8815f85f19b6082aff423bfa3bb55c926aad75d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/StreamingEngineInterface.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating; + +/** + * StreamingEngineInterface provides a method that knows how to stream a template. + * + * @author Fabien Potencier + */ +interface StreamingEngineInterface +{ + /** + * Streams a template. + * + * The implementation should output the content directly to the client. + * + * @param string|TemplateReferenceInterface $name A template name or a TemplateReferenceInterface instance + * @param array $parameters An array of parameters to pass to the template + * + * @throws \RuntimeException if the template cannot be rendered + * @throws \LogicException if the template cannot be streamed + */ + public function stream($name, array $parameters = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateNameParser.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateNameParser.php new file mode 100644 index 0000000000000000000000000000000000000000..d2cbb0c8123b2d3ef151af47f873a563e530d0b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateNameParser.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating; + +/** + * TemplateNameParser is the default implementation of TemplateNameParserInterface. + * + * This implementation takes everything as the template name + * and the extension for the engine. + * + * @author Fabien Potencier + */ +class TemplateNameParser implements TemplateNameParserInterface +{ + /** + * {@inheritdoc} + */ + public function parse($name) + { + if ($name instanceof TemplateReferenceInterface) { + return $name; + } + + $engine = null; + if (false !== $pos = strrpos($name, '.')) { + $engine = substr($name, $pos + 1); + } + + return new TemplateReference($name, $engine); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateNameParserInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateNameParserInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..07f08af00a0d8b0a2c66afa056ce17334fa392e4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateNameParserInterface.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\Templating; + +/** + * TemplateNameParserInterface converts template names to TemplateReferenceInterface + * instances. + * + * @author Fabien Potencier + */ +interface TemplateNameParserInterface +{ + /** + * Convert a template name to a TemplateReferenceInterface instance. + * + * @param string|TemplateReferenceInterface $name A template name or a TemplateReferenceInterface instance + * + * @return TemplateReferenceInterface A template + */ + public function parse($name); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateReference.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateReference.php new file mode 100644 index 0000000000000000000000000000000000000000..3477f088ff2459d95eece7fdd20d76a40275402e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateReference.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating; + +/** + * Internal representation of a template. + * + * @author Victor Berchet + */ +class TemplateReference implements TemplateReferenceInterface +{ + protected $parameters; + + public function __construct($name = null, $engine = null) + { + $this->parameters = array( + 'name' => $name, + 'engine' => $engine, + ); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return $this->getLogicalName(); + } + + /** + * {@inheritdoc} + */ + public function set($name, $value) + { + if (array_key_exists($name, $this->parameters)) { + $this->parameters[$name] = $value; + } else { + throw new \InvalidArgumentException(sprintf('The template does not support the "%s" parameter.', $name)); + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function get($name) + { + if (array_key_exists($name, $this->parameters)) { + return $this->parameters[$name]; + } + + throw new \InvalidArgumentException(sprintf('The template does not support the "%s" parameter.', $name)); + } + + /** + * {@inheritdoc} + */ + public function all() + { + return $this->parameters; + } + + /** + * {@inheritdoc} + */ + public function getPath() + { + return $this->parameters['name']; + } + + /** + * {@inheritdoc} + */ + public function getLogicalName() + { + return $this->parameters['name']; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateReferenceInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateReferenceInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..45d9421f6b4069bf51c5b619b564184728676afb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/TemplateReferenceInterface.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating; + +/** + * Interface to be implemented by all templates. + * + * @author Victor Berchet + */ +interface TemplateReferenceInterface +{ + /** + * Gets the template parameters. + * + * @return array An array of parameters + */ + public function all(); + + /** + * Sets a template parameter. + * + * @param string $name The parameter name + * @param string $value The parameter value + * + * @return $this + * + * @throws \InvalidArgumentException if the parameter name is not supported + */ + public function set($name, $value); + + /** + * Gets a template parameter. + * + * @param string $name The parameter name + * + * @return string The parameter value + * + * @throws \InvalidArgumentException if the parameter name is not supported + */ + public function get($name); + + /** + * Returns the path to the template. + * + * By default, it just returns the template name. + * + * @return string A path to the template or a resource + */ + public function getPath(); + + /** + * Returns the "logical" template name. + * + * The template name acts as a unique identifier for the template. + * + * @return string The template name + */ + public function getLogicalName(); + + /** + * Returns the string representation as shortcut for getLogicalName(). + * + * Alias of getLogicalName(). + * + * @return string The template name + */ + public function __toString(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php new file mode 100644 index 0000000000000000000000000000000000000000..19db0caef77c78193b70dbe3e497c0a002ef2ba2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.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\Component\Templating\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Templating\DelegatingEngine; +use Symfony\Component\Templating\StreamingEngineInterface; +use Symfony\Component\Templating\EngineInterface; + +class DelegatingEngineTest extends TestCase +{ + public function testRenderDelegatesToSupportedEngine() + { + $firstEngine = $this->getEngineMock('template.php', false); + $secondEngine = $this->getEngineMock('template.php', true); + + $secondEngine->expects($this->once()) + ->method('render') + ->with('template.php', array('foo' => 'bar')) + ->will($this->returnValue('')); + + $delegatingEngine = new DelegatingEngine(array($firstEngine, $secondEngine)); + $result = $delegatingEngine->render('template.php', array('foo' => 'bar')); + + $this->assertSame('', $result); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage No engine is able to work with the template "template.php" + */ + public function testRenderWithNoSupportedEngine() + { + $firstEngine = $this->getEngineMock('template.php', false); + $secondEngine = $this->getEngineMock('template.php', false); + + $delegatingEngine = new DelegatingEngine(array($firstEngine, $secondEngine)); + $delegatingEngine->render('template.php', array('foo' => 'bar')); + } + + public function testStreamDelegatesToSupportedEngine() + { + $streamingEngine = $this->getStreamingEngineMock('template.php', true); + $streamingEngine->expects($this->once()) + ->method('stream') + ->with('template.php', array('foo' => 'bar')) + ->will($this->returnValue('')); + + $delegatingEngine = new DelegatingEngine(array($streamingEngine)); + $result = $delegatingEngine->stream('template.php', array('foo' => 'bar')); + + $this->assertNull($result); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Template "template.php" cannot be streamed as the engine supporting it does not implement StreamingEngineInterface + */ + public function testStreamRequiresStreamingEngine() + { + $delegatingEngine = new DelegatingEngine(array(new TestEngine())); + $delegatingEngine->stream('template.php', array('foo' => 'bar')); + } + + public function testExists() + { + $engine = $this->getEngineMock('template.php', true); + $engine->expects($this->once()) + ->method('exists') + ->with('template.php') + ->will($this->returnValue(true)); + + $delegatingEngine = new DelegatingEngine(array($engine)); + + $this->assertTrue($delegatingEngine->exists('template.php')); + } + + public function testSupports() + { + $engine = $this->getEngineMock('template.php', true); + + $delegatingEngine = new DelegatingEngine(array($engine)); + + $this->assertTrue($delegatingEngine->supports('template.php')); + } + + public function testSupportsWithNoSupportedEngine() + { + $engine = $this->getEngineMock('template.php', false); + + $delegatingEngine = new DelegatingEngine(array($engine)); + + $this->assertFalse($delegatingEngine->supports('template.php')); + } + + public function testGetExistingEngine() + { + $firstEngine = $this->getEngineMock('template.php', false); + $secondEngine = $this->getEngineMock('template.php', true); + + $delegatingEngine = new DelegatingEngine(array($firstEngine, $secondEngine)); + + $this->assertSame($secondEngine, $delegatingEngine->getEngine('template.php')); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage No engine is able to work with the template "template.php" + */ + public function testGetInvalidEngine() + { + $firstEngine = $this->getEngineMock('template.php', false); + $secondEngine = $this->getEngineMock('template.php', false); + + $delegatingEngine = new DelegatingEngine(array($firstEngine, $secondEngine)); + $delegatingEngine->getEngine('template.php'); + } + + private function getEngineMock($template, $supports) + { + $engine = $this->getMockBuilder('Symfony\Component\Templating\EngineInterface')->getMock(); + + $engine->expects($this->once()) + ->method('supports') + ->with($template) + ->will($this->returnValue($supports)); + + return $engine; + } + + private function getStreamingEngineMock($template, $supports) + { + $engine = $this->getMockForAbstractClass('Symfony\Component\Templating\Tests\MyStreamingEngine'); + + $engine->expects($this->once()) + ->method('supports') + ->with($template) + ->will($this->returnValue($supports)); + + return $engine; + } +} + +interface MyStreamingEngine extends StreamingEngineInterface, EngineInterface +{ +} + +class TestEngine implements EngineInterface +{ + public function render($name, array $parameters = array()) + { + } + + public function exists($name) + { + } + + public function supports($name) + { + return true; + } + + public function stream() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Fixtures/SimpleHelper.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Fixtures/SimpleHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..06efe71b2740812ef9a3dcaa27014726c419a404 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Fixtures/SimpleHelper.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Tests\Fixtures; + +use Symfony\Component\Templating\Helper\Helper; + +class SimpleHelper extends Helper +{ + protected $value = ''; + + public function __construct($value) + { + $this->value = $value; + } + + public function __toString() + { + return $this->value; + } + + public function getName() + { + return 'foo'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Fixtures/templates/foo.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Fixtures/templates/foo.php new file mode 100644 index 0000000000000000000000000000000000000000..7561c34f1a21147aa39e20af5adbc33055a22827 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Fixtures/templates/foo.php @@ -0,0 +1 @@ + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Helper/HelperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Helper/HelperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8921ff19c81fc266b198dca49a39a934dd9f3986 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Helper/HelperTest.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Tests\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Templating\Helper\Helper; + +class HelperTest extends TestCase +{ + public function testGetSetCharset() + { + $helper = new ProjectTemplateHelper(); + $helper->setCharset('ISO-8859-1'); + $this->assertTrue('ISO-8859-1' === $helper->getCharset(), '->setCharset() sets the charset set related to this helper'); + } +} + +class ProjectTemplateHelper extends Helper +{ + public function getName() + { + return 'foo'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Helper/SlotsHelperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Helper/SlotsHelperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c747072c606ac7cb1da8bfb6d19a709f41053781 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Helper/SlotsHelperTest.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Tests\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Templating\Helper\SlotsHelper; + +class SlotsHelperTest extends TestCase +{ + public function testHasGetSet() + { + $helper = new SlotsHelper(); + $helper->set('foo', 'bar'); + $this->assertEquals('bar', $helper->get('foo'), '->set() sets a slot value'); + $this->assertEquals('bar', $helper->get('bar', 'bar'), '->get() takes a default value to return if the slot does not exist'); + + $this->assertTrue($helper->has('foo'), '->has() returns true if the slot exists'); + $this->assertFalse($helper->has('bar'), '->has() returns false if the slot does not exist'); + } + + public function testOutput() + { + $helper = new SlotsHelper(); + $helper->set('foo', 'bar'); + ob_start(); + $ret = $helper->output('foo'); + $output = ob_get_clean(); + $this->assertEquals('bar', $output, '->output() outputs the content of a slot'); + $this->assertTrue($ret, '->output() returns true if the slot exists'); + + ob_start(); + $ret = $helper->output('bar', 'bar'); + $output = ob_get_clean(); + $this->assertEquals('bar', $output, '->output() takes a default value to return if the slot does not exist'); + $this->assertTrue($ret, '->output() returns true if the slot does not exist but a default value is provided'); + + ob_start(); + $ret = $helper->output('bar'); + $output = ob_get_clean(); + $this->assertEquals('', $output, '->output() outputs nothing if the slot does not exist'); + $this->assertFalse($ret, '->output() returns false if the slot does not exist'); + } + + public function testStartStop() + { + $helper = new SlotsHelper(); + $helper->start('bar'); + echo 'foo'; + $helper->stop(); + $this->assertEquals('foo', $helper->get('bar'), '->start() starts a slot'); + $this->assertTrue($helper->has('bar'), '->starts() starts a slot'); + + $helper->start('bar'); + try { + $helper->start('bar'); + $helper->stop(); + $this->fail('->start() throws an InvalidArgumentException if a slot with the same name is already started'); + } catch (\Exception $e) { + $helper->stop(); + $this->assertInstanceOf('\InvalidArgumentException', $e, '->start() throws an InvalidArgumentException if a slot with the same name is already started'); + $this->assertEquals('A slot named "bar" is already started.', $e->getMessage(), '->start() throws an InvalidArgumentException if a slot with the same name is already started'); + } + + try { + $helper->stop(); + $this->fail('->stop() throws an LogicException if no slot is started'); + } catch (\Exception $e) { + $this->assertInstanceOf('\LogicException', $e, '->stop() throws an LogicException if no slot is started'); + $this->assertEquals('No slot started.', $e->getMessage(), '->stop() throws an LogicException if no slot is started'); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b4bf42b57240a79a1277ce7f2cb4514f77283eb8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.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\Templating\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Templating\Loader\Loader; +use Symfony\Component\Templating\Loader\CacheLoader; +use Symfony\Component\Templating\Storage\StringStorage; +use Symfony\Component\Templating\TemplateReferenceInterface; +use Symfony\Component\Templating\TemplateReference; + +class CacheLoaderTest extends TestCase +{ + public function testConstructor() + { + $loader = new ProjectTemplateLoader($varLoader = new ProjectTemplateLoaderVar(), sys_get_temp_dir()); + $this->assertTrue($loader->getLoader() === $varLoader, '__construct() takes a template loader as its first argument'); + $this->assertEquals(sys_get_temp_dir(), $loader->getDir(), '__construct() takes a directory where to store the cache as its second argument'); + } + + public function testLoad() + { + $dir = sys_get_temp_dir().DIRECTORY_SEPARATOR.mt_rand(111111, 999999); + mkdir($dir, 0777, true); + + $loader = new ProjectTemplateLoader($varLoader = new ProjectTemplateLoaderVar(), $dir); + $this->assertFalse($loader->load(new TemplateReference('foo', 'php')), '->load() returns false if the embed loader is not able to load the template'); + + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger + ->expects($this->once()) + ->method('debug') + ->with('Storing template in cache.', array('name' => 'index')); + $loader->setLogger($logger); + $loader->load(new TemplateReference('index')); + + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger + ->expects($this->once()) + ->method('debug') + ->with('Fetching template from cache.', array('name' => 'index')); + $loader->setLogger($logger); + $loader->load(new TemplateReference('index')); + } +} + +class ProjectTemplateLoader extends CacheLoader +{ + public function getDir() + { + return $this->dir; + } + + public function getLoader() + { + return $this->loader; + } +} + +class ProjectTemplateLoaderVar extends Loader +{ + public function getIndexTemplate() + { + return 'Hello World'; + } + + public function getSpecialTemplate() + { + return 'Hello {{ name }}'; + } + + public function load(TemplateReferenceInterface $template) + { + if (method_exists($this, $method = 'get'.ucfirst($template->get('name')).'Template')) { + return new StringStorage($this->$method()); + } + + return false; + } + + public function isFresh(TemplateReferenceInterface $template, $time) + { + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7e403995a07593b146479a87ba74e623af5e5303 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.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\Component\Templating\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Templating\Loader\ChainLoader; +use Symfony\Component\Templating\Loader\FilesystemLoader; +use Symfony\Component\Templating\TemplateReference; + +class ChainLoaderTest extends TestCase +{ + protected $loader1; + protected $loader2; + + protected function setUp() + { + $fixturesPath = realpath(__DIR__.'/../Fixtures/'); + $this->loader1 = new FilesystemLoader($fixturesPath.'/null/%name%'); + $this->loader2 = new FilesystemLoader($fixturesPath.'/templates/%name%'); + } + + public function testConstructor() + { + $loader = new ProjectTemplateLoader1(array($this->loader1, $this->loader2)); + $this->assertEquals(array($this->loader1, $this->loader2), $loader->getLoaders(), '__construct() takes an array of template loaders as its second argument'); + } + + public function testAddLoader() + { + $loader = new ProjectTemplateLoader1(array($this->loader1)); + $loader->addLoader($this->loader2); + $this->assertEquals(array($this->loader1, $this->loader2), $loader->getLoaders(), '->addLoader() adds a template loader at the end of the loaders'); + } + + public function testLoad() + { + $loader = new ProjectTemplateLoader1(array($this->loader1, $this->loader2)); + $this->assertFalse($loader->load(new TemplateReference('bar', 'php')), '->load() returns false if the template is not found'); + $this->assertFalse($loader->load(new TemplateReference('foo', 'php')), '->load() returns false if the template does not exist for the given renderer'); + $this->assertInstanceOf( + 'Symfony\Component\Templating\Storage\FileStorage', + $loader->load(new TemplateReference('foo.php', 'php')), + '->load() returns a FileStorage if the template exists' + ); + } +} + +class ProjectTemplateLoader1 extends ChainLoader +{ + public function getLoaders() + { + return $this->loaders; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..04b93fb1c575d3df985766486b133f1660dc35d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Templating\Loader\FilesystemLoader; +use Symfony\Component\Templating\TemplateReference; + +class FilesystemLoaderTest extends TestCase +{ + protected static $fixturesPath; + + public static function setUpBeforeClass() + { + self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); + } + + public function testConstructor() + { + $pathPattern = self::$fixturesPath.'/templates/%name%.%engine%'; + $path = self::$fixturesPath.'/templates'; + $loader = new ProjectTemplateLoader2($pathPattern); + $this->assertEquals(array($pathPattern), $loader->getTemplatePathPatterns(), '__construct() takes a path as its second argument'); + $loader = new ProjectTemplateLoader2(array($pathPattern)); + $this->assertEquals(array($pathPattern), $loader->getTemplatePathPatterns(), '__construct() takes an array of paths as its second argument'); + } + + public function testIsAbsolutePath() + { + $this->assertTrue(ProjectTemplateLoader2::isAbsolutePath('/foo.xml'), '->isAbsolutePath() returns true if the path is an absolute path'); + $this->assertTrue(ProjectTemplateLoader2::isAbsolutePath('c:\\\\foo.xml'), '->isAbsolutePath() returns true if the path is an absolute path'); + $this->assertTrue(ProjectTemplateLoader2::isAbsolutePath('c:/foo.xml'), '->isAbsolutePath() returns true if the path is an absolute path'); + $this->assertTrue(ProjectTemplateLoader2::isAbsolutePath('\\server\\foo.xml'), '->isAbsolutePath() returns true if the path is an absolute path'); + $this->assertTrue(ProjectTemplateLoader2::isAbsolutePath('https://server/foo.xml'), '->isAbsolutePath() returns true if the path is an absolute path'); + $this->assertTrue(ProjectTemplateLoader2::isAbsolutePath('phar://server/foo.xml'), '->isAbsolutePath() returns true if the path is an absolute path'); + } + + public function testLoad() + { + $pathPattern = self::$fixturesPath.'/templates/%name%'; + $path = self::$fixturesPath.'/templates'; + $loader = new ProjectTemplateLoader2($pathPattern); + $storage = $loader->load(new TemplateReference($path.'/foo.php', 'php')); + $this->assertInstanceOf('Symfony\Component\Templating\Storage\FileStorage', $storage, '->load() returns a FileStorage if you pass an absolute path'); + $this->assertEquals($path.'/foo.php', (string) $storage, '->load() returns a FileStorage pointing to the passed absolute path'); + + $this->assertFalse($loader->load(new TemplateReference('bar', 'php')), '->load() returns false if the template is not found'); + + $storage = $loader->load(new TemplateReference('foo.php', 'php')); + $this->assertInstanceOf('Symfony\Component\Templating\Storage\FileStorage', $storage, '->load() returns a FileStorage if you pass a relative template that exists'); + $this->assertEquals($path.'/foo.php', (string) $storage, '->load() returns a FileStorage pointing to the absolute path of the template'); + + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger->expects($this->exactly(2))->method('debug'); + + $loader = new ProjectTemplateLoader2($pathPattern); + $loader->setLogger($logger); + $this->assertFalse($loader->load(new TemplateReference('foo.xml', 'php')), '->load() returns false if the template does not exist for the given engine'); + + $loader = new ProjectTemplateLoader2(array(self::$fixturesPath.'/null/%name%', $pathPattern)); + $loader->setLogger($logger); + $loader->load(new TemplateReference('foo.php', 'php')); + } +} + +class ProjectTemplateLoader2 extends FilesystemLoader +{ + public function getTemplatePathPatterns() + { + return $this->templatePathPatterns; + } + + public static function isAbsolutePath($path) + { + return parent::isAbsolutePath($path); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..da8c04caa4c975ce48bfc29e5929916c19ed0c18 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Templating\Loader\Loader; +use Symfony\Component\Templating\TemplateReferenceInterface; + +class LoaderTest extends TestCase +{ + public function testGetSetLogger() + { + $loader = new ProjectTemplateLoader4(); + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $loader->setLogger($logger); + $this->assertSame($logger, $loader->getLogger(), '->setLogger() sets the logger instance'); + } +} + +class ProjectTemplateLoader4 extends Loader +{ + public function load(TemplateReferenceInterface $template) + { + } + + public function getLogger() + { + return $this->logger; + } + + public function getDebugger() + { + return $this->debugger; + } + + public function isFresh(TemplateReferenceInterface $template, $time) + { + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/PhpEngineTest.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/PhpEngineTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c7418d392f9fcd68d62af432edb61f5c586368f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/PhpEngineTest.php @@ -0,0 +1,226 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Templating\PhpEngine; +use Symfony\Component\Templating\Loader\Loader; +use Symfony\Component\Templating\Storage\StringStorage; +use Symfony\Component\Templating\Helper\SlotsHelper; +use Symfony\Component\Templating\TemplateNameParser; +use Symfony\Component\Templating\TemplateReferenceInterface; +use Symfony\Component\Templating\TemplateReference; + +class PhpEngineTest extends TestCase +{ + protected $loader; + + protected function setUp() + { + $this->loader = new ProjectTemplateLoader(); + } + + protected function tearDown() + { + $this->loader = null; + } + + public function testConstructor() + { + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); + $this->assertEquals($this->loader, $engine->getLoader(), '__construct() takes a loader instance as its second first argument'); + } + + public function testOffsetGet() + { + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); + $engine->set($helper = new \Symfony\Component\Templating\Tests\Fixtures\SimpleHelper('bar'), 'foo'); + $this->assertEquals($helper, $engine['foo'], '->offsetGet() returns the value of a helper'); + + try { + $engine['bar']; + $this->fail('->offsetGet() throws an InvalidArgumentException if the helper is not defined'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->offsetGet() throws an InvalidArgumentException if the helper is not defined'); + $this->assertEquals('The helper "bar" is not defined.', $e->getMessage(), '->offsetGet() throws an InvalidArgumentException if the helper is not defined'); + } + } + + public function testGetSetHas() + { + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); + $foo = new \Symfony\Component\Templating\Tests\Fixtures\SimpleHelper('foo'); + $engine->set($foo); + $this->assertEquals($foo, $engine->get('foo'), '->set() sets a helper'); + + $engine[$foo] = 'bar'; + $this->assertEquals($foo, $engine->get('bar'), '->set() takes an alias as a second argument'); + + $this->assertTrue(isset($engine['bar'])); + + try { + $engine->get('foobar'); + $this->fail('->get() throws an InvalidArgumentException if the helper is not defined'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->get() throws an InvalidArgumentException if the helper is not defined'); + $this->assertEquals('The helper "foobar" is not defined.', $e->getMessage(), '->get() throws an InvalidArgumentException if the helper is not defined'); + } + + $this->assertTrue(isset($engine['bar'])); + $this->assertTrue($engine->has('foo'), '->has() returns true if the helper exists'); + $this->assertFalse($engine->has('foobar'), '->has() returns false if the helper does not exist'); + } + + public function testUnsetHelper() + { + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); + $foo = new \Symfony\Component\Templating\Tests\Fixtures\SimpleHelper('foo'); + $engine->set($foo); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('\LogicException'); + + unset($engine['foo']); + } + + public function testExtendRender() + { + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, array(), array(new SlotsHelper())); + try { + $engine->render('name'); + $this->fail('->render() throws an InvalidArgumentException if the template does not exist'); + } catch (\Exception $e) { + $this->assertInstanceOf('\InvalidArgumentException', $e, '->render() throws an InvalidArgumentException if the template does not exist'); + $this->assertEquals('The template "name" does not exist.', $e->getMessage(), '->render() throws an InvalidArgumentException if the template does not exist'); + } + + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, array(new SlotsHelper())); + $engine->set(new \Symfony\Component\Templating\Tests\Fixtures\SimpleHelper('bar')); + $this->loader->setTemplate('foo.php', 'extend("layout.php"); echo $this[\'foo\'].$foo ?>'); + $this->loader->setTemplate('layout.php', '-get("_content") ?>-'); + $this->assertEquals('-barfoo-', $engine->render('foo.php', array('foo' => 'foo')), '->render() uses the decorator to decorate the template'); + + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, array(new SlotsHelper())); + $engine->set(new \Symfony\Component\Templating\Tests\Fixtures\SimpleHelper('bar')); + $this->loader->setTemplate('bar.php', 'bar'); + $this->loader->setTemplate('foo.php', 'extend("layout.php"); echo $foo ?>'); + $this->loader->setTemplate('layout.php', 'render("bar.php") ?>-get("_content") ?>-'); + $this->assertEquals('bar-foo-', $engine->render('foo.php', array('foo' => 'foo', 'bar' => 'bar')), '->render() supports render() calls in templates'); + } + + public function testRenderParameter() + { + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); + $this->loader->setTemplate('foo.php', ''); + $this->assertEquals('foobar', $engine->render('foo.php', array('template' => 'foo', 'parameters' => 'bar')), '->render() extract variables'); + } + + /** + * @expectedException \InvalidArgumentException + * @dataProvider forbiddenParameterNames + */ + public function testRenderForbiddenParameter($name) + { + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); + $this->loader->setTemplate('foo.php', 'bar'); + $engine->render('foo.php', array($name => 'foo')); + } + + public function forbiddenParameterNames() + { + return array( + array('this'), + array('view'), + ); + } + + public function testEscape() + { + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); + $this->assertEquals('<br />', $engine->escape('
    '), '->escape() escapes strings'); + $foo = new \stdClass(); + $this->assertEquals($foo, $engine->escape($foo), '->escape() does nothing on non strings'); + } + + public function testGetSetCharset() + { + $helper = new SlotsHelper(); + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader, array($helper)); + $this->assertEquals('UTF-8', $engine->getCharset(), 'EngineInterface::getCharset() returns UTF-8 by default'); + $this->assertEquals('UTF-8', $helper->getCharset(), 'HelperInterface::getCharset() returns UTF-8 by default'); + + $engine->setCharset('ISO-8859-1'); + $this->assertEquals('ISO-8859-1', $engine->getCharset(), 'EngineInterface::setCharset() changes the default charset to use'); + $this->assertEquals('ISO-8859-1', $helper->getCharset(), 'EngineInterface::setCharset() changes the default charset of helper'); + } + + public function testGlobalVariables() + { + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); + $engine->addGlobal('global_variable', 'lorem ipsum'); + + $this->assertEquals(array( + 'global_variable' => 'lorem ipsum', + ), $engine->getGlobals()); + } + + public function testGlobalsGetPassedToTemplate() + { + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); + $engine->addGlobal('global', 'global variable'); + + $this->loader->setTemplate('global.php', ''); + + $this->assertEquals($engine->render('global.php'), 'global variable'); + + $this->assertEquals($engine->render('global.php', array('global' => 'overwritten')), 'overwritten'); + } + + public function testGetLoader() + { + $engine = new ProjectTemplateEngine(new TemplateNameParser(), $this->loader); + + $this->assertSame($this->loader, $engine->getLoader()); + } +} + +class ProjectTemplateEngine extends PhpEngine +{ + public function getLoader() + { + return $this->loader; + } +} + +class ProjectTemplateLoader extends Loader +{ + public $templates = array(); + + public function setTemplate($name, $content) + { + $template = new TemplateReference($name, 'php'); + $this->templates[$template->getLogicalName()] = $content; + } + + public function load(TemplateReferenceInterface $template) + { + if (isset($this->templates[$template->getLogicalName()])) { + return new StringStorage($this->templates[$template->getLogicalName()]); + } + + return false; + } + + public function isFresh(TemplateReferenceInterface $template, $time) + { + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Storage/FileStorageTest.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Storage/FileStorageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ed3ca51d9dfa6bdacd513b867b44c29c1209aa88 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Storage/FileStorageTest.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Tests\Storage; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Templating\Storage\FileStorage; + +class FileStorageTest extends TestCase +{ + public function testGetContent() + { + $storage = new FileStorage('foo'); + $this->assertInstanceOf('Symfony\Component\Templating\Storage\Storage', $storage, 'FileStorage is an instance of Storage'); + $storage = new FileStorage(__DIR__.'/../Fixtures/templates/foo.php'); + $this->assertEquals(''."\n", $storage->getContent(), '->getContent() returns the content of the template'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Storage/StorageTest.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Storage/StorageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3aac21dd7b6651738c80da7cdf0e44aa05b30bad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Storage/StorageTest.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Tests\Storage; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Templating\Storage\Storage; + +class StorageTest extends TestCase +{ + public function testMagicToString() + { + $storage = new TestStorage('foo'); + $this->assertEquals('foo', (string) $storage, '__toString() returns the template name'); + } +} + +class TestStorage extends Storage +{ + public function getContent() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Storage/StringStorageTest.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Storage/StringStorageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ecfeb800c858f5dcf6b9019113f2bfc7c1c81a0c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/Storage/StringStorageTest.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Tests\Storage; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Templating\Storage\StringStorage; + +class StringStorageTest extends TestCase +{ + public function testGetContent() + { + $storage = new StringStorage('foo'); + $this->assertInstanceOf('Symfony\Component\Templating\Storage\Storage', $storage, 'StringStorage is an instance of Storage'); + $storage = new StringStorage('foo'); + $this->assertEquals('foo', $storage->getContent(), '->getContent() returns the content of the template'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..14a019402fd3417ff2a4f4b870965947d56c6521 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Templating\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Templating\TemplateNameParser; +use Symfony\Component\Templating\TemplateReference; + +class TemplateNameParserTest extends TestCase +{ + protected $parser; + + protected function setUp() + { + $this->parser = new TemplateNameParser(); + } + + protected function tearDown() + { + $this->parser = null; + } + + /** + * @dataProvider getLogicalNameToTemplateProvider + */ + public function testParse($name, $ref) + { + $template = $this->parser->parse($name); + + $this->assertEquals($template->getLogicalName(), $ref->getLogicalName()); + $this->assertEquals($template->getLogicalName(), $name); + } + + public function getLogicalNameToTemplateProvider() + { + return array( + array('/path/to/section/name.engine', new TemplateReference('/path/to/section/name.engine', 'engine')), + array('name.engine', new TemplateReference('name.engine', 'engine')), + array('name', new TemplateReference('name')), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Templating/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..49c6e4732a43f7e27bad705fc2ccb009c039d7e4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/composer.json @@ -0,0 +1,39 @@ +{ + "name": "symfony/templating", + "type": "library", + "description": "Symfony Templating Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "psr/log": "~1.0" + }, + "suggest": { + "psr/log": "For using debug logging in loaders" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Templating\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Templating/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Templating/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..109584e805db242e2ef345023fcb3fdf7fed1c9f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Templating/phpunit.xml.dist @@ -0,0 +1,28 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Translation/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..349faceb0c8f0e3066a80e51af021a13282050f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/CHANGELOG.md @@ -0,0 +1,79 @@ +CHANGELOG +========= + +3.2.0 +----- + + * Added support for escaping `|` in plural translations with double pipe. + +3.1.0 +----- + + * Deprecated the backup feature of the file dumper classes. + +3.0.0 +----- + + * removed `FileDumper::format()` method. + * Changed the visibility of the locale property in `Translator` from protected to private. + +2.8.0 +----- + + * deprecated FileDumper::format(), overwrite FileDumper::formatCatalogue() instead. + * deprecated Translator::getMessages(), rely on TranslatorBagInterface::getCatalogue() instead. + * added `FileDumper::formatCatalogue` which allows format the catalogue without dumping it into file. + * added option `json_encoding` to JsonFileDumper + * added options `as_tree`, `inline` to YamlFileDumper + * added support for XLIFF 2.0. + * added support for XLIFF target and tool attributes. + * added message parameters to DataCollectorTranslator. + * [DEPRECATION] The `DiffOperation` class has been deprecated and + will be removed in Symfony 3.0, since its operation has nothing to do with 'diff', + so the class name is misleading. The `TargetOperation` class should be used for + this use-case instead. + +2.7.0 +----- + + * added DataCollectorTranslator for collecting the translated messages. + +2.6.0 +----- + + * added possibility to cache catalogues + * added TranslatorBagInterface + * added LoggingTranslator + * added Translator::getMessages() for retrieving the message catalogue as an array + +2.5.0 +----- + + * added relative file path template to the file dumpers + * added optional backup to the file dumpers + * changed IcuResFileDumper to extend FileDumper + +2.3.0 +----- + + * added classes to make operations on catalogues (like making a diff or a merge on 2 catalogues) + * added Translator::getFallbackLocales() + * deprecated Translator::setFallbackLocale() in favor of the new Translator::setFallbackLocales() method + +2.2.0 +----- + + * QtTranslationsLoader class renamed to QtFileLoader. QtTranslationsLoader is deprecated and will be removed in 2.3. + * [BC BREAK] uniformized the exception thrown by the load() method when an error occurs. The load() method now + throws Symfony\Component\Translation\Exception\NotFoundResourceException when a resource cannot be found + and Symfony\Component\Translation\Exception\InvalidResourceException when a resource is invalid. + * changed the exception class thrown by some load() methods from \RuntimeException to \InvalidArgumentException + (IcuDatFileLoader, IcuResFileLoader and QtFileLoader) + +2.1.0 +----- + + * added support for more than one fallback locale + * added support for extracting translation messages from templates (Twig and PHP) + * added dumpers for translation catalogs + * added support for QT, gettext, and ResourceBundles diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php new file mode 100644 index 0000000000000000000000000000000000000000..bb501c14a465c3965b789264573058ab47ee09f2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/AbstractOperation.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\Component\Translation\Catalogue; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\MessageCatalogueInterface; +use Symfony\Component\Translation\Exception\InvalidArgumentException; +use Symfony\Component\Translation\Exception\LogicException; + +/** + * Base catalogues binary operation class. + * + * A catalogue binary operation performs operation on + * source (the left argument) and target (the right argument) catalogues. + * + * @author Jean-François Simon + */ +abstract class AbstractOperation implements OperationInterface +{ + /** + * @var MessageCatalogueInterface The source catalogue + */ + protected $source; + + /** + * @var MessageCatalogueInterface The target catalogue + */ + protected $target; + + /** + * @var MessageCatalogue The result catalogue + */ + protected $result; + + /** + * @var null|array The domains affected by this operation + */ + private $domains; + + /** + * This array stores 'all', 'new' and 'obsolete' messages for all valid domains. + * + * The data structure of this array is as follows: + * ```php + * array( + * 'domain 1' => array( + * 'all' => array(...), + * 'new' => array(...), + * 'obsolete' => array(...) + * ), + * 'domain 2' => array( + * 'all' => array(...), + * 'new' => array(...), + * 'obsolete' => array(...) + * ), + * ... + * ) + * ``` + * + * @var array The array that stores 'all', 'new' and 'obsolete' messages + */ + protected $messages; + + /** + * @param MessageCatalogueInterface $source The source catalogue + * @param MessageCatalogueInterface $target The target catalogue + * + * @throws LogicException + */ + public function __construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target) + { + if ($source->getLocale() !== $target->getLocale()) { + throw new LogicException('Operated catalogues must belong to the same locale.'); + } + + $this->source = $source; + $this->target = $target; + $this->result = new MessageCatalogue($source->getLocale()); + $this->messages = array(); + } + + /** + * {@inheritdoc} + */ + public function getDomains() + { + if (null === $this->domains) { + $this->domains = array_values(array_unique(array_merge($this->source->getDomains(), $this->target->getDomains()))); + } + + return $this->domains; + } + + /** + * {@inheritdoc} + */ + public function getMessages($domain) + { + if (!in_array($domain, $this->getDomains())) { + throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain)); + } + + if (!isset($this->messages[$domain]['all'])) { + $this->processDomain($domain); + } + + return $this->messages[$domain]['all']; + } + + /** + * {@inheritdoc} + */ + public function getNewMessages($domain) + { + if (!in_array($domain, $this->getDomains())) { + throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain)); + } + + if (!isset($this->messages[$domain]['new'])) { + $this->processDomain($domain); + } + + return $this->messages[$domain]['new']; + } + + /** + * {@inheritdoc} + */ + public function getObsoleteMessages($domain) + { + if (!in_array($domain, $this->getDomains())) { + throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain)); + } + + if (!isset($this->messages[$domain]['obsolete'])) { + $this->processDomain($domain); + } + + return $this->messages[$domain]['obsolete']; + } + + /** + * {@inheritdoc} + */ + public function getResult() + { + foreach ($this->getDomains() as $domain) { + if (!isset($this->messages[$domain])) { + $this->processDomain($domain); + } + } + + return $this->result; + } + + /** + * Performs operation on source and target catalogues for the given domain and + * stores the results. + * + * @param string $domain The domain which the operation will be performed for + */ + abstract protected function processDomain($domain); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/MergeOperation.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/MergeOperation.php new file mode 100644 index 0000000000000000000000000000000000000000..6db3f801f3b2b19a804a0246e52336517d674d59 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/MergeOperation.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Catalogue; + +/** + * Merge operation between two catalogues as follows: + * all = source ∪ target = {x: x ∈ source ∨ x ∈ target} + * new = all ∖ source = {x: x ∈ target ∧ x ∉ source} + * obsolete = source ∖ all = {x: x ∈ source ∧ x ∉ source ∧ x ∉ target} = ∅ + * Basically, the result contains messages from both catalogues. + * + * @author Jean-François Simon + */ +class MergeOperation extends AbstractOperation +{ + /** + * {@inheritdoc} + */ + protected function processDomain($domain) + { + $this->messages[$domain] = array( + 'all' => array(), + 'new' => array(), + 'obsolete' => array(), + ); + + foreach ($this->source->all($domain) as $id => $message) { + $this->messages[$domain]['all'][$id] = $message; + $this->result->add(array($id => $message), $domain); + if (null !== $keyMetadata = $this->source->getMetadata($id, $domain)) { + $this->result->setMetadata($id, $keyMetadata, $domain); + } + } + + foreach ($this->target->all($domain) as $id => $message) { + if (!$this->source->has($id, $domain)) { + $this->messages[$domain]['all'][$id] = $message; + $this->messages[$domain]['new'][$id] = $message; + $this->result->add(array($id => $message), $domain); + if (null !== $keyMetadata = $this->target->getMetadata($id, $domain)) { + $this->result->setMetadata($id, $keyMetadata, $domain); + } + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/OperationInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/OperationInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..87d888efb76ec3d3d9a7c5e8e72329d756056213 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/OperationInterface.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Catalogue; + +use Symfony\Component\Translation\MessageCatalogueInterface; + +/** + * Represents an operation on catalogue(s). + * + * An instance of this interface performs an operation on one or more catalogues and + * stores intermediate and final results of the operation. + * + * The first catalogue in its argument(s) is called the 'source catalogue' or 'source' and + * the following results are stored: + * + * Messages: also called 'all', are valid messages for the given domain after the operation is performed. + * + * New Messages: also called 'new' (new = all ∖ source = {x: x ∈ all ∧ x ∉ source}). + * + * Obsolete Messages: also called 'obsolete' (obsolete = source ∖ all = {x: x ∈ source ∧ x ∉ all}). + * + * Result: also called 'result', is the resulting catalogue for the given domain that holds the same messages as 'all'. + * + * @author Jean-François Simon + */ +interface OperationInterface +{ + /** + * Returns domains affected by operation. + * + * @return array + */ + public function getDomains(); + + /** + * Returns all valid messages ('all') after operation. + * + * @param string $domain + * + * @return array + */ + public function getMessages($domain); + + /** + * Returns new messages ('new') after operation. + * + * @param string $domain + * + * @return array + */ + public function getNewMessages($domain); + + /** + * Returns obsolete messages ('obsolete') after operation. + * + * @param string $domain + * + * @return array + */ + public function getObsoleteMessages($domain); + + /** + * Returns resulting catalogue ('result'). + * + * @return MessageCatalogueInterface + */ + public function getResult(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/TargetOperation.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/TargetOperation.php new file mode 100644 index 0000000000000000000000000000000000000000..f3b0a29dfb99685261862d8e5c44b38516e22a0b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Catalogue/TargetOperation.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Catalogue; + +/** + * Target operation between two catalogues: + * intersection = source ∩ target = {x: x ∈ source ∧ x ∈ target} + * all = intersection ∪ (target ∖ intersection) = target + * new = all ∖ source = {x: x ∈ target ∧ x ∉ source} + * obsolete = source ∖ all = source ∖ target = {x: x ∈ source ∧ x ∉ target} + * Basically, the result contains messages from the target catalogue. + * + * @author Michael Lee + */ +class TargetOperation extends AbstractOperation +{ + /** + * {@inheritdoc} + */ + protected function processDomain($domain) + { + $this->messages[$domain] = array( + 'all' => array(), + 'new' => array(), + 'obsolete' => array(), + ); + + // For 'all' messages, the code can't be simplified as ``$this->messages[$domain]['all'] = $target->all($domain);``, + // because doing so will drop messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} + // + // For 'new' messages, the code can't be simplied as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));`` + // because doing so will not exclude messages like {x: x ∈ target ∧ x ∉ source.all ∧ x ∈ source.fallback} + // + // For 'obsolete' messages, the code can't be simplifed as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))`` + // because doing so will not exclude messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} + + foreach ($this->source->all($domain) as $id => $message) { + if ($this->target->has($id, $domain)) { + $this->messages[$domain]['all'][$id] = $message; + $this->result->add(array($id => $message), $domain); + if (null !== $keyMetadata = $this->source->getMetadata($id, $domain)) { + $this->result->setMetadata($id, $keyMetadata, $domain); + } + } else { + $this->messages[$domain]['obsolete'][$id] = $message; + } + } + + foreach ($this->target->all($domain) as $id => $message) { + if (!$this->source->has($id, $domain)) { + $this->messages[$domain]['all'][$id] = $message; + $this->messages[$domain]['new'][$id] = $message; + $this->result->add(array($id => $message), $domain); + if (null !== $keyMetadata = $this->target->getMetadata($id, $domain)) { + $this->result->setMetadata($id, $keyMetadata, $domain); + } + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..6b5e165aad9a7bf8a1e771c808adedde7d4f4243 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php @@ -0,0 +1,150 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\DataCollector; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\DataCollector\DataCollector; +use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; +use Symfony\Component\Translation\DataCollectorTranslator; + +/** + * @author Abdellatif Ait boudad + */ +class TranslationDataCollector extends DataCollector implements LateDataCollectorInterface +{ + /** + * @var DataCollectorTranslator + */ + private $translator; + + /** + * @param DataCollectorTranslator $translator + */ + public function __construct(DataCollectorTranslator $translator) + { + $this->translator = $translator; + } + + /** + * {@inheritdoc} + */ + public function lateCollect() + { + $messages = $this->sanitizeCollectedMessages($this->translator->getCollectedMessages()); + + $this->data = $this->computeCount($messages); + $this->data['messages'] = $messages; + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + } + + /** + * @return array + */ + public function getMessages() + { + return isset($this->data['messages']) ? $this->data['messages'] : array(); + } + + /** + * @return int + */ + public function getCountMissings() + { + return isset($this->data[DataCollectorTranslator::MESSAGE_MISSING]) ? $this->data[DataCollectorTranslator::MESSAGE_MISSING] : 0; + } + + /** + * @return int + */ + public function getCountFallbacks() + { + return isset($this->data[DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK]) ? $this->data[DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK] : 0; + } + + /** + * @return int + */ + public function getCountDefines() + { + return isset($this->data[DataCollectorTranslator::MESSAGE_DEFINED]) ? $this->data[DataCollectorTranslator::MESSAGE_DEFINED] : 0; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'translation'; + } + + private function sanitizeCollectedMessages($messages) + { + $result = array(); + foreach ($messages as $key => $message) { + $messageId = $message['locale'].$message['domain'].$message['id']; + + if (!isset($result[$messageId])) { + $message['count'] = 1; + $message['parameters'] = !empty($message['parameters']) ? array($this->cloneVar($message['parameters'])) : array(); + $messages[$key]['translation'] = $this->sanitizeString($message['translation']); + $result[$messageId] = $message; + } else { + if (!empty($message['parameters'])) { + $result[$messageId]['parameters'][] = $this->cloneVar($message['parameters']); + } + + ++$result[$messageId]['count']; + } + + unset($messages[$key]); + } + + return $result; + } + + private function computeCount($messages) + { + $count = array( + DataCollectorTranslator::MESSAGE_DEFINED => 0, + DataCollectorTranslator::MESSAGE_MISSING => 0, + DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK => 0, + ); + + foreach ($messages as $message) { + ++$count[$message['state']]; + } + + return $count; + } + + private function sanitizeString($string, $length = 80) + { + $string = trim(preg_replace('/\s+/', ' ', $string)); + + if (false !== $encoding = mb_detect_encoding($string, null, true)) { + if (mb_strlen($string, $encoding) > $length) { + return mb_substr($string, 0, $length - 3, $encoding).'...'; + } + } elseif (strlen($string) > $length) { + return substr($string, 0, $length - 3).'...'; + } + + return $string; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollectorTranslator.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollectorTranslator.php new file mode 100644 index 0000000000000000000000000000000000000000..cdfde100b8f9df4e31cf079808a5b23316c82053 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/DataCollectorTranslator.php @@ -0,0 +1,168 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Symfony\Component\Translation\Exception\InvalidArgumentException; + +/** + * @author Abdellatif Ait boudad + */ +class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInterface +{ + const MESSAGE_DEFINED = 0; + const MESSAGE_MISSING = 1; + const MESSAGE_EQUALS_FALLBACK = 2; + + /** + * @var TranslatorInterface|TranslatorBagInterface + */ + private $translator; + + /** + * @var array + */ + private $messages = array(); + + /** + * @param TranslatorInterface $translator The translator must implement TranslatorBagInterface + */ + public function __construct(TranslatorInterface $translator) + { + if (!$translator instanceof TranslatorBagInterface) { + throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', get_class($translator))); + } + + $this->translator = $translator; + } + + /** + * {@inheritdoc} + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + $trans = $this->translator->trans($id, $parameters, $domain, $locale); + $this->collectMessage($locale, $domain, $id, $trans, $parameters); + + return $trans; + } + + /** + * {@inheritdoc} + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + $trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale); + $this->collectMessage($locale, $domain, $id, $trans, $parameters, $number); + + return $trans; + } + + /** + * {@inheritdoc} + */ + public function setLocale($locale) + { + $this->translator->setLocale($locale); + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->translator->getLocale(); + } + + /** + * {@inheritdoc} + */ + public function getCatalogue($locale = null) + { + return $this->translator->getCatalogue($locale); + } + + /** + * Gets the fallback locales. + * + * @return array $locales The fallback locales + */ + public function getFallbackLocales() + { + if ($this->translator instanceof Translator) { + return $this->translator->getFallbackLocales(); + } + + return array(); + } + + /** + * Passes through all unknown calls onto the translator object. + */ + public function __call($method, $args) + { + return call_user_func_array(array($this->translator, $method), $args); + } + + /** + * @return array + */ + public function getCollectedMessages() + { + return $this->messages; + } + + /** + * @param string|null $locale + * @param string|null $domain + * @param string $id + * @param string $translation + * @param array|null $parameters + * @param int|null $number + */ + private function collectMessage($locale, $domain, $id, $translation, $parameters = array(), $number = null) + { + if (null === $domain) { + $domain = 'messages'; + } + + $id = (string) $id; + $catalogue = $this->translator->getCatalogue($locale); + $locale = $catalogue->getLocale(); + if ($catalogue->defines($id, $domain)) { + $state = self::MESSAGE_DEFINED; + } elseif ($catalogue->has($id, $domain)) { + $state = self::MESSAGE_EQUALS_FALLBACK; + + $fallbackCatalogue = $catalogue->getFallbackCatalogue(); + while ($fallbackCatalogue) { + if ($fallbackCatalogue->defines($id, $domain)) { + $locale = $fallbackCatalogue->getLocale(); + break; + } + + $fallbackCatalogue = $fallbackCatalogue->getFallbackCatalogue(); + } + } else { + $state = self::MESSAGE_MISSING; + } + + $this->messages[] = array( + 'locale' => $locale, + 'domain' => $domain, + 'id' => $id, + 'translation' => $translation, + 'parameters' => $parameters, + 'transChoiceNumber' => $number, + 'state' => $state, + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..fe5dccb42a3546b2ed4ec2ce4eb19649e3ad5631 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/CsvFileDumper.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\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * CsvFileDumper generates a csv formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class CsvFileDumper extends FileDumper +{ + private $delimiter = ';'; + private $enclosure = '"'; + + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $handle = fopen('php://memory', 'rb+'); + + foreach ($messages->all($domain) as $source => $target) { + fputcsv($handle, array($source, $target), $this->delimiter, $this->enclosure); + } + + rewind($handle); + $output = stream_get_contents($handle); + fclose($handle); + + return $output; + } + + /** + * Sets the delimiter and escape character for CSV. + * + * @param string $delimiter delimiter character + * @param string $enclosure enclosure character + */ + public function setCsvControl($delimiter = ';', $enclosure = '"') + { + $this->delimiter = $delimiter; + $this->enclosure = $enclosure; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'csv'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/DumperInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/DumperInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..cebc65ed89d90f6b1a2c7e5f627d5b6afce60353 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/DumperInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * DumperInterface is the interface implemented by all translation dumpers. + * There is no common option. + * + * @author Michel Salib + */ +interface DumperInterface +{ + /** + * Dumps the message catalogue. + * + * @param MessageCatalogue $messages The message catalogue + * @param array $options Options that are used by the dumper + */ + public function dump(MessageCatalogue $messages, $options = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/FileDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/FileDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..b2b50cfc9470d3fdc3e67571cb1975cc1f076b6d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/FileDumper.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidArgumentException; +use Symfony\Component\Translation\Exception\RuntimeException; + +/** + * FileDumper is an implementation of DumperInterface that dump a message catalogue to file(s). + * Performs backup of already existing files. + * + * Options: + * - path (mandatory): the directory where the files should be saved + * + * @author Michel Salib + */ +abstract class FileDumper implements DumperInterface +{ + /** + * A template for the relative paths to files. + * + * @var string + */ + protected $relativePathTemplate = '%domain%.%locale%.%extension%'; + + /** + * Make file backup before the dump. + * + * @var bool + */ + private $backup = true; + + /** + * Sets the template for the relative paths to files. + * + * @param string $relativePathTemplate A template for the relative paths to files + */ + public function setRelativePathTemplate($relativePathTemplate) + { + $this->relativePathTemplate = $relativePathTemplate; + } + + /** + * Sets backup flag. + * + * @param bool + */ + public function setBackup($backup) + { + $this->backup = $backup; + } + + /** + * {@inheritdoc} + */ + public function dump(MessageCatalogue $messages, $options = array()) + { + if (!array_key_exists('path', $options)) { + throw new InvalidArgumentException('The file dumper needs a path option.'); + } + + // save a file for each domain + foreach ($messages->getDomains() as $domain) { + // backup + $fullpath = $options['path'].'/'.$this->getRelativePath($domain, $messages->getLocale()); + if (file_exists($fullpath)) { + if ($this->backup) { + @trigger_error('Creating a backup while dumping a message catalogue is deprecated since version 3.1 and will be removed in 4.0. Use TranslationWriter::disableBackup() to disable the backup.', E_USER_DEPRECATED); + copy($fullpath, $fullpath.'~'); + } + } else { + $directory = dirname($fullpath); + if (!file_exists($directory) && !@mkdir($directory, 0777, true)) { + throw new RuntimeException(sprintf('Unable to create directory "%s".', $directory)); + } + } + // save file + file_put_contents($fullpath, $this->formatCatalogue($messages, $domain, $options)); + } + } + + /** + * Transforms a domain of a message catalogue to its string representation. + * + * @param MessageCatalogue $messages + * @param string $domain + * @param array $options + * + * @return string representation + */ + abstract public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()); + + /** + * Gets the file extension of the dumper. + * + * @return string file extension + */ + abstract protected function getExtension(); + + /** + * Gets the relative file path using the template. + * + * @param string $domain The domain + * @param string $locale The locale + * + * @return string The relative file path + */ + private function getRelativePath($domain, $locale) + { + return strtr($this->relativePathTemplate, array( + '%domain%' => $domain, + '%locale%' => $locale, + '%extension%' => $this->getExtension(), + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..77ce27b2aa4ca09fa185b5e3e3416407e416fc3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * IcuResDumper generates an ICU ResourceBundle formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class IcuResFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + protected $relativePathTemplate = '%domain%/%locale%.%extension%'; + + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $data = $indexes = $resources = ''; + + foreach ($messages->all($domain) as $source => $target) { + $indexes .= pack('v', strlen($data) + 28); + $data .= $source."\0"; + } + + $data .= $this->writePadding($data); + + $keyTop = $this->getPosition($data); + + foreach ($messages->all($domain) as $source => $target) { + $resources .= pack('V', $this->getPosition($data)); + + $data .= pack('V', strlen($target)) + .mb_convert_encoding($target."\0", 'UTF-16LE', 'UTF-8') + .$this->writePadding($data) + ; + } + + $resOffset = $this->getPosition($data); + + $data .= pack('v', count($messages)) + .$indexes + .$this->writePadding($data) + .$resources + ; + + $bundleTop = $this->getPosition($data); + + $root = pack('V7', + $resOffset + (2 << 28), // Resource Offset + Resource Type + 6, // Index length + $keyTop, // Index keys top + $bundleTop, // Index resources top + $bundleTop, // Index bundle top + count($messages), // Index max table length + 0 // Index attributes + ); + + $header = pack('vC2v4C12@32', + 32, // Header size + 0xDA, 0x27, // Magic number 1 and 2 + 20, 0, 0, 2, // Rest of the header, ..., Size of a char + 0x52, 0x65, 0x73, 0x42, // Data format identifier + 1, 2, 0, 0, // Data version + 1, 4, 0, 0 // Unicode version + ); + + return $header.$root.$data; + } + + private function writePadding($data) + { + $padding = strlen($data) % 4; + + if ($padding) { + return str_repeat("\xAA", 4 - $padding); + } + } + + private function getPosition($data) + { + return (strlen($data) + 28) / 4; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'res'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IniFileDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IniFileDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..9ed3754037fb534431feb7baf32286e2100f1348 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/IniFileDumper.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\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * IniFileDumper generates an ini formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class IniFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $output = ''; + + foreach ($messages->all($domain) as $source => $target) { + $escapeTarget = str_replace('"', '\"', $target); + $output .= $source.'="'.$escapeTarget."\"\n"; + } + + return $output; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'ini'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..08b538e1fec835b2ef0a05e18854cf25498bf14a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * JsonFileDumper generates an json formatted string representation of a message catalogue. + * + * @author singles + */ +class JsonFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + if (isset($options['json_encoding'])) { + $flags = $options['json_encoding']; + } else { + $flags = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0; + } + + return json_encode($messages->all($domain), $flags); + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'json'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/MoFileDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/MoFileDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..00a33d253a9a9861ecd950bc487824a53750666b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/MoFileDumper.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Loader\MoFileLoader; + +/** + * MoFileDumper generates a gettext formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class MoFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $sources = $targets = $sourceOffsets = $targetOffsets = ''; + $offsets = array(); + $size = 0; + + foreach ($messages->all($domain) as $source => $target) { + $offsets[] = array_map('strlen', array($sources, $source, $targets, $target)); + $sources .= "\0".$source; + $targets .= "\0".$target; + ++$size; + } + + $header = array( + 'magicNumber' => MoFileLoader::MO_LITTLE_ENDIAN_MAGIC, + 'formatRevision' => 0, + 'count' => $size, + 'offsetId' => MoFileLoader::MO_HEADER_SIZE, + 'offsetTranslated' => MoFileLoader::MO_HEADER_SIZE + (8 * $size), + 'sizeHashes' => 0, + 'offsetHashes' => MoFileLoader::MO_HEADER_SIZE + (16 * $size), + ); + + $sourcesSize = strlen($sources); + $sourcesStart = $header['offsetHashes'] + 1; + + foreach ($offsets as $offset) { + $sourceOffsets .= $this->writeLong($offset[1]) + .$this->writeLong($offset[0] + $sourcesStart); + $targetOffsets .= $this->writeLong($offset[3]) + .$this->writeLong($offset[2] + $sourcesStart + $sourcesSize); + } + + $output = implode(array_map(array($this, 'writeLong'), $header)) + .$sourceOffsets + .$targetOffsets + .$sources + .$targets + ; + + return $output; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'mo'; + } + + private function writeLong($str) + { + return pack('V*', $str); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..c7c37aac9232b25b0298fa2e82447dc1a23edf0f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * PhpFileDumper generates PHP files from a message catalogue. + * + * @author Michel Salib + */ +class PhpFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + return "all($domain), true).";\n"; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'php'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PoFileDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PoFileDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..ed4418b1489eab83e9146e5fc617e00f413775a7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/PoFileDumper.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * PoFileDumper generates a gettext formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class PoFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $output = 'msgid ""'."\n"; + $output .= 'msgstr ""'."\n"; + $output .= '"Content-Type: text/plain; charset=UTF-8\n"'."\n"; + $output .= '"Content-Transfer-Encoding: 8bit\n"'."\n"; + $output .= '"Language: '.$messages->getLocale().'\n"'."\n"; + $output .= "\n"; + + $newLine = false; + foreach ($messages->all($domain) as $source => $target) { + if ($newLine) { + $output .= "\n"; + } else { + $newLine = true; + } + $output .= sprintf('msgid "%s"'."\n", $this->escape($source)); + $output .= sprintf('msgstr "%s"', $this->escape($target)); + } + + return $output; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'po'; + } + + private function escape($str) + { + return addcslashes($str, "\0..\37\42\134"); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/QtFileDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/QtFileDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..a9073f26df479d032099f28fcb70a0eaa0b0a8d7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/QtFileDumper.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * QtFileDumper generates ts files from a message catalogue. + * + * @author Benjamin Eberlei + */ +class QtFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $dom = new \DOMDocument('1.0', 'utf-8'); + $dom->formatOutput = true; + $ts = $dom->appendChild($dom->createElement('TS')); + $context = $ts->appendChild($dom->createElement('context')); + $context->appendChild($dom->createElement('name', $domain)); + + foreach ($messages->all($domain) as $source => $target) { + $message = $context->appendChild($dom->createElement('message')); + $message->appendChild($dom->createElement('source', $source)); + $message->appendChild($dom->createElement('translation', $target)); + } + + return $dom->saveXML(); + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'ts'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..47b05c81b12dbdfc38d59453a4fc8dea1d8d743e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php @@ -0,0 +1,184 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidArgumentException; + +/** + * XliffFileDumper generates xliff files from a message catalogue. + * + * @author Michel Salib + */ +class XliffFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $xliffVersion = '1.2'; + if (array_key_exists('xliff_version', $options)) { + $xliffVersion = $options['xliff_version']; + } + + if (array_key_exists('default_locale', $options)) { + $defaultLocale = $options['default_locale']; + } else { + $defaultLocale = \Locale::getDefault(); + } + + if ('1.2' === $xliffVersion) { + return $this->dumpXliff1($defaultLocale, $messages, $domain, $options); + } + if ('2.0' === $xliffVersion) { + return $this->dumpXliff2($defaultLocale, $messages, $domain, $options); + } + + throw new InvalidArgumentException(sprintf('No support implemented for dumping XLIFF version "%s".', $xliffVersion)); + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'xlf'; + } + + private function dumpXliff1($defaultLocale, MessageCatalogue $messages, $domain, array $options = array()) + { + $toolInfo = array('tool-id' => 'symfony', 'tool-name' => 'Symfony'); + if (array_key_exists('tool_info', $options)) { + $toolInfo = array_merge($toolInfo, $options['tool_info']); + } + + $dom = new \DOMDocument('1.0', 'utf-8'); + $dom->formatOutput = true; + + $xliff = $dom->appendChild($dom->createElement('xliff')); + $xliff->setAttribute('version', '1.2'); + $xliff->setAttribute('xmlns', 'urn:oasis:names:tc:xliff:document:1.2'); + + $xliffFile = $xliff->appendChild($dom->createElement('file')); + $xliffFile->setAttribute('source-language', str_replace('_', '-', $defaultLocale)); + $xliffFile->setAttribute('target-language', str_replace('_', '-', $messages->getLocale())); + $xliffFile->setAttribute('datatype', 'plaintext'); + $xliffFile->setAttribute('original', 'file.ext'); + + $xliffHead = $xliffFile->appendChild($dom->createElement('header')); + $xliffTool = $xliffHead->appendChild($dom->createElement('tool')); + foreach ($toolInfo as $id => $value) { + $xliffTool->setAttribute($id, $value); + } + + $xliffBody = $xliffFile->appendChild($dom->createElement('body')); + foreach ($messages->all($domain) as $source => $target) { + $translation = $dom->createElement('trans-unit'); + + $translation->setAttribute('id', md5($source)); + $translation->setAttribute('resname', $source); + + $s = $translation->appendChild($dom->createElement('source')); + $s->appendChild($dom->createTextNode($source)); + + // Does the target contain characters requiring a CDATA section? + $text = 1 === preg_match('/[&<>]/', $target) ? $dom->createCDATASection($target) : $dom->createTextNode($target); + + $targetElement = $dom->createElement('target'); + $metadata = $messages->getMetadata($source, $domain); + if ($this->hasMetadataArrayInfo('target-attributes', $metadata)) { + foreach ($metadata['target-attributes'] as $name => $value) { + $targetElement->setAttribute($name, $value); + } + } + $t = $translation->appendChild($targetElement); + $t->appendChild($text); + + if ($this->hasMetadataArrayInfo('notes', $metadata)) { + foreach ($metadata['notes'] as $note) { + if (!isset($note['content'])) { + continue; + } + + $n = $translation->appendChild($dom->createElement('note')); + $n->appendChild($dom->createTextNode($note['content'])); + + if (isset($note['priority'])) { + $n->setAttribute('priority', $note['priority']); + } + + if (isset($note['from'])) { + $n->setAttribute('from', $note['from']); + } + } + } + + $xliffBody->appendChild($translation); + } + + return $dom->saveXML(); + } + + private function dumpXliff2($defaultLocale, MessageCatalogue $messages, $domain, array $options = array()) + { + $dom = new \DOMDocument('1.0', 'utf-8'); + $dom->formatOutput = true; + + $xliff = $dom->appendChild($dom->createElement('xliff')); + $xliff->setAttribute('xmlns', 'urn:oasis:names:tc:xliff:document:2.0'); + $xliff->setAttribute('version', '2.0'); + $xliff->setAttribute('srcLang', str_replace('_', '-', $defaultLocale)); + $xliff->setAttribute('trgLang', str_replace('_', '-', $messages->getLocale())); + + $xliffFile = $xliff->appendChild($dom->createElement('file')); + $xliffFile->setAttribute('id', $domain.'.'.$messages->getLocale()); + + foreach ($messages->all($domain) as $source => $target) { + $translation = $dom->createElement('unit'); + $translation->setAttribute('id', md5($source)); + + $segment = $translation->appendChild($dom->createElement('segment')); + + $s = $segment->appendChild($dom->createElement('source')); + $s->appendChild($dom->createTextNode($source)); + + // Does the target contain characters requiring a CDATA section? + $text = 1 === preg_match('/[&<>]/', $target) ? $dom->createCDATASection($target) : $dom->createTextNode($target); + + $targetElement = $dom->createElement('target'); + $metadata = $messages->getMetadata($source, $domain); + if ($this->hasMetadataArrayInfo('target-attributes', $metadata)) { + foreach ($metadata['target-attributes'] as $name => $value) { + $targetElement->setAttribute($name, $value); + } + } + $t = $segment->appendChild($targetElement); + $t->appendChild($text); + + $xliffFile->appendChild($translation); + } + + return $dom->saveXML(); + } + + /** + * @param string $key + * @param array|null $metadata + * + * @return bool + */ + private function hasMetadataArrayInfo($key, $metadata = null) + { + return null !== $metadata && array_key_exists($key, $metadata) && ($metadata[$key] instanceof \Traversable || is_array($metadata[$key])); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..fdd113b103654adcc9e7a90fe7fb1af60a381259 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Util\ArrayConverter; +use Symfony\Component\Yaml\Yaml; +use Symfony\Component\Translation\Exception\LogicException; + +/** + * YamlFileDumper generates yaml files from a message catalogue. + * + * @author Michel Salib + */ +class YamlFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + if (!class_exists('Symfony\Component\Yaml\Yaml')) { + throw new LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.'); + } + + $data = $messages->all($domain); + + if (isset($options['as_tree']) && $options['as_tree']) { + $data = ArrayConverter::expandToTree($data); + } + + if (isset($options['inline']) && ($inline = (int) $options['inline']) > 0) { + return Yaml::dump($data, $inline); + } + + return Yaml::dump($data); + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'yml'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c85fb93ca82d7cd4cf7776f0d452fb744af0a0de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Exception; + +/** + * Exception interface for all exceptions thrown by the component. + * + * @author Fabien Potencier + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..90d06690f1824b7f02fa12ca7612d9e94e6d6b5f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Exception; + +/** + * Base InvalidArgumentException for the Translation component. + * + * @author Abdellatif Ait boudad + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/InvalidResourceException.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/InvalidResourceException.php new file mode 100644 index 0000000000000000000000000000000000000000..cf079432c99a423d307364938546102aa77b8134 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/InvalidResourceException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Exception; + +/** + * Thrown when a resource cannot be loaded. + * + * @author Fabien Potencier + */ +class InvalidResourceException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/LogicException.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/LogicException.php new file mode 100644 index 0000000000000000000000000000000000000000..9019c7e7be78b8fc9e7212d06c21c6c2a674b4a1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/LogicException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Exception; + +/** + * Base LogicException for Translation component. + * + * @author Abdellatif Ait boudad + */ +class LogicException extends \LogicException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/NotFoundResourceException.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/NotFoundResourceException.php new file mode 100644 index 0000000000000000000000000000000000000000..cff73ae30bbfb8f9764cbd7fd7f944fca4fd47f4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/NotFoundResourceException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Exception; + +/** + * Thrown when a resource does not exist. + * + * @author Fabien Potencier + */ +class NotFoundResourceException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/RuntimeException.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/RuntimeException.php new file mode 100644 index 0000000000000000000000000000000000000000..dcd79408296055994c71939c1dad240cf2212109 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Exception/RuntimeException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Exception; + +/** + * Base RuntimeException for the Translation component. + * + * @author Abdellatif Ait boudad + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.php new file mode 100644 index 0000000000000000000000000000000000000000..4b6b155df60a63a95f433476dc68d6f4d044bab1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Extractor; + +use Symfony\Component\Translation\Exception\InvalidArgumentException; + +/** + * Base class used by classes that extract translation messages from files. + * + * @author Marcos D. Sánchez + */ +abstract class AbstractFileExtractor +{ + /** + * @param string|array $resource files, a file or a directory + * + * @return array + */ + protected function extractFiles($resource) + { + if (is_array($resource) || $resource instanceof \Traversable) { + $files = array(); + foreach ($resource as $file) { + if ($this->canBeExtracted($file)) { + $files[] = $this->toSplFileInfo($file); + } + } + } elseif (is_file($resource)) { + $files = $this->canBeExtracted($resource) ? array($this->toSplFileInfo($resource)) : array(); + } else { + $files = $this->extractFromDirectory($resource); + } + + return $files; + } + + /** + * @param string $file + * + * @return \SplFileInfo + */ + private function toSplFileInfo($file) + { + return ($file instanceof \SplFileInfo) ? $file : new \SplFileInfo($file); + } + + /** + * @param string $file + * + * @return bool + * + * @throws InvalidArgumentException + */ + protected function isFile($file) + { + if (!is_file($file)) { + throw new InvalidArgumentException(sprintf('The "%s" file does not exist.', $file)); + } + + return true; + } + + /** + * @param string $file + * + * @return bool + */ + abstract protected function canBeExtracted($file); + + /** + * @param string|array $resource files, a file or a directory + * + * @return array files to be extracted + */ + abstract protected function extractFromDirectory($resource); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/ChainExtractor.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/ChainExtractor.php new file mode 100644 index 0000000000000000000000000000000000000000..50e3c84579f2bcbcd1174cf9de019904e7c1d6fc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/ChainExtractor.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Extractor; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * ChainExtractor extracts translation messages from template files. + * + * @author Michel Salib + */ +class ChainExtractor implements ExtractorInterface +{ + /** + * The extractors. + * + * @var ExtractorInterface[] + */ + private $extractors = array(); + + /** + * Adds a loader to the translation extractor. + * + * @param string $format The format of the loader + * @param ExtractorInterface $extractor The loader + */ + public function addExtractor($format, ExtractorInterface $extractor) + { + $this->extractors[$format] = $extractor; + } + + /** + * {@inheritdoc} + */ + public function setPrefix($prefix) + { + foreach ($this->extractors as $extractor) { + $extractor->setPrefix($prefix); + } + } + + /** + * {@inheritdoc} + */ + public function extract($directory, MessageCatalogue $catalogue) + { + foreach ($this->extractors as $extractor) { + $extractor->extract($directory, $catalogue); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..438f80b32f053a026ca3cecb640dd9e5c34c0626 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Extractor; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * Extracts translation messages from a directory or files to the catalogue. + * New found messages are injected to the catalogue using the prefix. + * + * @author Michel Salib + */ +interface ExtractorInterface +{ + /** + * Extracts translation messages from files, a file or a directory to the catalogue. + * + * @param string|array $resource files, a file or a directory + * @param MessageCatalogue $catalogue The catalogue + */ + public function extract($resource, MessageCatalogue $catalogue); + + /** + * Sets the prefix that should be used for new found messages. + * + * @param string $prefix The prefix + */ + public function setPrefix($prefix); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/IdentityTranslator.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/IdentityTranslator.php new file mode 100644 index 0000000000000000000000000000000000000000..46a046365b3241d56bf3eed64e180c097ab21334 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/IdentityTranslator.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\Component\Translation; + +/** + * IdentityTranslator does not translate anything. + * + * @author Fabien Potencier + */ +class IdentityTranslator implements TranslatorInterface +{ + private $selector; + private $locale; + + /** + * Constructor. + * + * @param MessageSelector|null $selector The message selector for pluralization + */ + public function __construct(MessageSelector $selector = null) + { + $this->selector = $selector ?: new MessageSelector(); + } + + /** + * {@inheritdoc} + */ + public function setLocale($locale) + { + $this->locale = $locale; + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->locale ?: \Locale::getDefault(); + } + + /** + * {@inheritdoc} + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + return strtr((string) $id, $parameters); + } + + /** + * {@inheritdoc} + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + return strtr($this->selector->choose((string) $id, (int) $number, $locale ?: $this->getLocale()), $parameters); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Interval.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Interval.php new file mode 100644 index 0000000000000000000000000000000000000000..9e2cae648c6dde54e9cb7a987a71e87d34629e36 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Interval.php @@ -0,0 +1,109 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Symfony\Component\Translation\Exception\InvalidArgumentException; + +/** + * Tests if a given number belongs to a given math interval. + * + * An interval can represent a finite set of numbers: + * + * {1,2,3,4} + * + * An interval can represent numbers between two numbers: + * + * [1, +Inf] + * ]-1,2[ + * + * The left delimiter can be [ (inclusive) or ] (exclusive). + * The right delimiter can be [ (exclusive) or ] (inclusive). + * Beside numbers, you can use -Inf and +Inf for the infinite. + * + * @author Fabien Potencier + * + * @see http://en.wikipedia.org/wiki/Interval_%28mathematics%29#The_ISO_notation + */ +class Interval +{ + /** + * Tests if the given number is in the math interval. + * + * @param int $number A number + * @param string $interval An interval + * + * @return bool + * + * @throws InvalidArgumentException + */ + public static function test($number, $interval) + { + $interval = trim($interval); + + if (!preg_match('/^'.self::getIntervalRegexp().'$/x', $interval, $matches)) { + throw new InvalidArgumentException(sprintf('"%s" is not a valid interval.', $interval)); + } + + if ($matches[1]) { + foreach (explode(',', $matches[2]) as $n) { + if ($number == $n) { + return true; + } + } + } else { + $leftNumber = self::convertNumber($matches['left']); + $rightNumber = self::convertNumber($matches['right']); + + return + ('[' === $matches['left_delimiter'] ? $number >= $leftNumber : $number > $leftNumber) + && (']' === $matches['right_delimiter'] ? $number <= $rightNumber : $number < $rightNumber) + ; + } + + return false; + } + + /** + * Returns a Regexp that matches valid intervals. + * + * @return string A Regexp (without the delimiters) + */ + public static function getIntervalRegexp() + { + return <<[\[\]]) + \s* + (?P-Inf|\-?\d+(\.\d+)?) + \s*,\s* + (?P\+?Inf|\-?\d+(\.\d+)?) + \s* + (?P[\[\]]) +EOF; + } + + private static function convertNumber($number) + { + if ('-Inf' === $number) { + return log(0); + } elseif ('+Inf' === $number || 'Inf' === $number) { + return -log(0); + } + + return (float) $number; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Translation/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/ArrayLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/ArrayLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..9a595b7dadab39fb3ed7bc61bb1337832f9ec122 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/ArrayLoader.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * ArrayLoader loads translations from a PHP array. + * + * @author Fabien Potencier + */ +class ArrayLoader implements LoaderInterface +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + $this->flatten($resource); + $catalogue = new MessageCatalogue($locale); + $catalogue->add($resource, $domain); + + return $catalogue; + } + + /** + * Flattens an nested array of translations. + * + * The scheme used is: + * 'key' => array('key2' => array('key3' => 'value')) + * Becomes: + * 'key.key2.key3' => 'value' + * + * This function takes an array by reference and will modify it + * + * @param array &$messages The array that will be flattened + * @param array $subnode Current subnode being parsed, used internally for recursive calls + * @param string $path Current path being parsed, used internally for recursive calls + */ + private function flatten(array &$messages, array $subnode = null, $path = null) + { + if (null === $subnode) { + $subnode = &$messages; + } + foreach ($subnode as $key => $value) { + if (is_array($value)) { + $nodePath = $path ? $path.'.'.$key : $key; + $this->flatten($messages, $value, $nodePath); + if (null === $path) { + unset($messages[$key]); + } + } elseif (null !== $path) { + $messages[$path.'.'.$key] = $value; + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/CsvFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/CsvFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..f1d3443f4c7ea56bc9571a1568762da4ae79103f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/CsvFileLoader.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\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\NotFoundResourceException; + +/** + * CsvFileLoader loads translations from CSV files. + * + * @author Saša Stamenković + */ +class CsvFileLoader extends FileLoader +{ + private $delimiter = ';'; + private $enclosure = '"'; + private $escape = '\\'; + + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + $messages = array(); + + try { + $file = new \SplFileObject($resource, 'rb'); + } catch (\RuntimeException $e) { + throw new NotFoundResourceException(sprintf('Error opening file "%s".', $resource), 0, $e); + } + + $file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::SKIP_EMPTY); + $file->setCsvControl($this->delimiter, $this->enclosure, $this->escape); + + foreach ($file as $data) { + if ('#' !== substr($data[0], 0, 1) && isset($data[1]) && 2 === count($data)) { + $messages[$data[0]] = $data[1]; + } + } + + return $messages; + } + + /** + * Sets the delimiter, enclosure, and escape character for CSV. + * + * @param string $delimiter delimiter character + * @param string $enclosure enclosure character + * @param string $escape escape character + */ + public function setCsvControl($delimiter = ';', $enclosure = '"', $escape = '\\') + { + $this->delimiter = $delimiter; + $this->enclosure = $enclosure; + $this->escape = $escape; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/FileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/FileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..a7f24f41a65359e9dfb8807d08c9c539bd766c4b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/FileLoader.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\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\FileResource; + +/** + * @author Abdellatif Ait boudad + */ +abstract class FileLoader extends ArrayLoader +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource)) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!file_exists($resource)) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + $messages = $this->loadResource($resource); + + // empty resource + if (null === $messages) { + $messages = array(); + } + + // not an array + if (!is_array($messages)) { + throw new InvalidResourceException(sprintf('Unable to load file "%s".', $resource)); + } + + $catalogue = parent::load($messages, $locale, $domain); + + if (class_exists('Symfony\Component\Config\Resource\FileResource')) { + $catalogue->addResource(new FileResource($resource)); + } + + return $catalogue; + } + + /* + * @param string $resource + * + * @return array + * + * @throws InvalidResourceException If stream content has an invalid format. + */ + abstract protected function loadResource($resource); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IcuDatFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IcuDatFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..71ba90a39d9cc118f6ee9622029632b193c35eff --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IcuDatFileLoader.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\FileResource; + +/** + * IcuResFileLoader loads translations from a resource bundle. + * + * @author stealth35 + */ +class IcuDatFileLoader extends IcuResFileLoader +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource.'.dat')) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!file_exists($resource.'.dat')) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + try { + $rb = new \ResourceBundle($locale, $resource); + } catch (\Exception $e) { + // HHVM compatibility: constructor throws on invalid resource + $rb = null; + } + + if (!$rb) { + throw new InvalidResourceException(sprintf('Cannot load resource "%s"', $resource)); + } elseif (intl_is_failure($rb->getErrorCode())) { + throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode()); + } + + $messages = $this->flatten($rb); + $catalogue = new MessageCatalogue($locale); + $catalogue->add($messages, $domain); + + if (class_exists('Symfony\Component\Config\Resource\FileResource')) { + $catalogue->addResource(new FileResource($resource.'.dat')); + } + + return $catalogue; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IcuResFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IcuResFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..2f8037fb164d8a70ad2210f4e21130f92d1039fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IcuResFileLoader.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\Component\Translation\Loader; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\DirectoryResource; + +/** + * IcuResFileLoader loads translations from a resource bundle. + * + * @author stealth35 + */ +class IcuResFileLoader implements LoaderInterface +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource)) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!is_dir($resource)) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + try { + $rb = new \ResourceBundle($locale, $resource); + } catch (\Exception $e) { + // HHVM compatibility: constructor throws on invalid resource + $rb = null; + } + + if (!$rb) { + throw new InvalidResourceException(sprintf('Cannot load resource "%s"', $resource)); + } elseif (intl_is_failure($rb->getErrorCode())) { + throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode()); + } + + $messages = $this->flatten($rb); + $catalogue = new MessageCatalogue($locale); + $catalogue->add($messages, $domain); + + if (class_exists('Symfony\Component\Config\Resource\DirectoryResource')) { + $catalogue->addResource(new DirectoryResource($resource)); + } + + return $catalogue; + } + + /** + * Flattens an ResourceBundle. + * + * The scheme used is: + * key { key2 { key3 { "value" } } } + * Becomes: + * 'key.key2.key3' => 'value' + * + * This function takes an array by reference and will modify it + * + * @param \ResourceBundle $rb the ResourceBundle that will be flattened + * @param array $messages used internally for recursive calls + * @param string $path current path being parsed, used internally for recursive calls + * + * @return array the flattened ResourceBundle + */ + protected function flatten(\ResourceBundle $rb, array &$messages = array(), $path = null) + { + foreach ($rb as $key => $value) { + $nodePath = $path ? $path.'.'.$key : $key; + if ($value instanceof \ResourceBundle) { + $this->flatten($value, $messages, $nodePath); + } else { + $messages[$nodePath] = $value; + } + } + + return $messages; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IniFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IniFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..11d9b272e0a39fa25ce0660166bc80fc0e89ed5a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/IniFileLoader.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +/** + * IniFileLoader loads translations from an ini file. + * + * @author stealth35 + */ +class IniFileLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + return parse_ini_file($resource, true); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/JsonFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/JsonFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..ce4e91ff4fbee75f3f58048d744425c4836763b3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/JsonFileLoader.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; + +/** + * JsonFileLoader loads translations from an json file. + * + * @author singles + */ +class JsonFileLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + $messages = array(); + if ($data = file_get_contents($resource)) { + $messages = json_decode($data, true); + + if (0 < $errorCode = json_last_error()) { + throw new InvalidResourceException(sprintf('Error parsing JSON - %s', $this->getJSONErrorMessage($errorCode))); + } + } + + return $messages; + } + + /** + * Translates JSON_ERROR_* constant into meaningful message. + * + * @param int $errorCode Error code returned by json_last_error() call + * + * @return string Message string + */ + private function getJSONErrorMessage($errorCode) + { + switch ($errorCode) { + case JSON_ERROR_DEPTH: + return 'Maximum stack depth exceeded'; + case JSON_ERROR_STATE_MISMATCH: + return 'Underflow or the modes mismatch'; + case JSON_ERROR_CTRL_CHAR: + return 'Unexpected control character found'; + case JSON_ERROR_SYNTAX: + return 'Syntax error, malformed JSON'; + case JSON_ERROR_UTF8: + return 'Malformed UTF-8 characters, possibly incorrectly encoded'; + default: + return 'Unknown error'; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/LoaderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/LoaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..6b65fe380bc9e6cf73b243a90400a5b6a7300186 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/LoaderInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; + +/** + * LoaderInterface is the interface implemented by all translation loaders. + * + * @author Fabien Potencier + */ +interface LoaderInterface +{ + /** + * Loads a locale. + * + * @param mixed $resource A resource + * @param string $locale A locale + * @param string $domain The domain + * + * @return MessageCatalogue A MessageCatalogue instance + * + * @throws NotFoundResourceException when the resource cannot be found + * @throws InvalidResourceException when the resource cannot be loaded + */ + public function load($resource, $locale, $domain = 'messages'); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/MoFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/MoFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..928cc9dfd592cde1d76acb8c4f492f7a2a7332c6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/MoFileLoader.php @@ -0,0 +1,154 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; + +/** + * @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/) + */ +class MoFileLoader extends FileLoader +{ + /** + * Magic used for validating the format of a MO file as well as + * detecting if the machine used to create that file was little endian. + * + * @var float + */ + const MO_LITTLE_ENDIAN_MAGIC = 0x950412de; + + /** + * Magic used for validating the format of a MO file as well as + * detecting if the machine used to create that file was big endian. + * + * @var float + */ + const MO_BIG_ENDIAN_MAGIC = 0xde120495; + + /** + * The size of the header of a MO file in bytes. + * + * @var int Number of bytes + */ + const MO_HEADER_SIZE = 28; + + /** + * Parses machine object (MO) format, independent of the machine's endian it + * was created on. Both 32bit and 64bit systems are supported. + * + * {@inheritdoc} + */ + protected function loadResource($resource) + { + $stream = fopen($resource, 'r'); + + $stat = fstat($stream); + + if ($stat['size'] < self::MO_HEADER_SIZE) { + throw new InvalidResourceException('MO stream content has an invalid format.'); + } + $magic = unpack('V1', fread($stream, 4)); + $magic = hexdec(substr(dechex(current($magic)), -8)); + + if ($magic == self::MO_LITTLE_ENDIAN_MAGIC) { + $isBigEndian = false; + } elseif ($magic == self::MO_BIG_ENDIAN_MAGIC) { + $isBigEndian = true; + } else { + throw new InvalidResourceException('MO stream content has an invalid format.'); + } + + // formatRevision + $this->readLong($stream, $isBigEndian); + $count = $this->readLong($stream, $isBigEndian); + $offsetId = $this->readLong($stream, $isBigEndian); + $offsetTranslated = $this->readLong($stream, $isBigEndian); + // sizeHashes + $this->readLong($stream, $isBigEndian); + // offsetHashes + $this->readLong($stream, $isBigEndian); + + $messages = array(); + + for ($i = 0; $i < $count; ++$i) { + $pluralId = null; + $translated = null; + + fseek($stream, $offsetId + $i * 8); + + $length = $this->readLong($stream, $isBigEndian); + $offset = $this->readLong($stream, $isBigEndian); + + if ($length < 1) { + continue; + } + + fseek($stream, $offset); + $singularId = fread($stream, $length); + + if (strpos($singularId, "\000") !== false) { + list($singularId, $pluralId) = explode("\000", $singularId); + } + + fseek($stream, $offsetTranslated + $i * 8); + $length = $this->readLong($stream, $isBigEndian); + $offset = $this->readLong($stream, $isBigEndian); + + if ($length < 1) { + continue; + } + + fseek($stream, $offset); + $translated = fread($stream, $length); + + if (strpos($translated, "\000") !== false) { + $translated = explode("\000", $translated); + } + + $ids = array('singular' => $singularId, 'plural' => $pluralId); + $item = compact('ids', 'translated'); + + if (is_array($item['translated'])) { + $messages[$item['ids']['singular']] = stripcslashes($item['translated'][0]); + if (isset($item['ids']['plural'])) { + $plurals = array(); + foreach ($item['translated'] as $plural => $translated) { + $plurals[] = sprintf('{%d} %s', $plural, $translated); + } + $messages[$item['ids']['plural']] = stripcslashes(implode('|', $plurals)); + } + } elseif (!empty($item['ids']['singular'])) { + $messages[$item['ids']['singular']] = stripcslashes($item['translated']); + } + } + + fclose($stream); + + return array_filter($messages); + } + + /** + * Reads an unsigned long from stream respecting endianness. + * + * @param resource $stream + * @param bool $isBigEndian + * + * @return int + */ + private function readLong($stream, $isBigEndian) + { + $result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4)); + $result = current($result); + + return (int) substr($result, -8); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/PhpFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/PhpFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..a0050e8db1e19679417fcbd3d5746516aa2b3efe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/PhpFileLoader.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +/** + * PhpFileLoader loads translations from PHP files returning an array of translations. + * + * @author Fabien Potencier + */ +class PhpFileLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + return require $resource; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/PoFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/PoFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..40f5464bf2f70a36c8f263e269f61f8d705b7374 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/PoFileLoader.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\Translation\Loader; + +/** + * @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/) + * @copyright Copyright (c) 2012, Clemens Tolboom + */ +class PoFileLoader extends FileLoader +{ + /** + * Parses portable object (PO) format. + * + * From http://www.gnu.org/software/gettext/manual/gettext.html#PO-Files + * we should be able to parse files having: + * + * white-space + * # translator-comments + * #. extracted-comments + * #: reference... + * #, flag... + * #| msgid previous-untranslated-string + * msgid untranslated-string + * msgstr translated-string + * + * extra or different lines are: + * + * #| msgctxt previous-context + * #| msgid previous-untranslated-string + * msgctxt context + * + * #| msgid previous-untranslated-string-singular + * #| msgid_plural previous-untranslated-string-plural + * msgid untranslated-string-singular + * msgid_plural untranslated-string-plural + * msgstr[0] translated-string-case-0 + * ... + * msgstr[N] translated-string-case-n + * + * The definition states: + * - white-space and comments are optional. + * - msgid "" that an empty singleline defines a header. + * + * This parser sacrifices some features of the reference implementation the + * differences to that implementation are as follows. + * - No support for comments spanning multiple lines. + * - Translator and extracted comments are treated as being the same type. + * - Message IDs are allowed to have other encodings as just US-ASCII. + * + * Items with an empty id are ignored. + * + * {@inheritdoc} + */ + protected function loadResource($resource) + { + $stream = fopen($resource, 'r'); + + $defaults = array( + 'ids' => array(), + 'translated' => null, + ); + + $messages = array(); + $item = $defaults; + $flags = array(); + + while ($line = fgets($stream)) { + $line = trim($line); + + if ($line === '') { + // Whitespace indicated current item is done + if (!in_array('fuzzy', $flags)) { + $this->addMessage($messages, $item); + } + $item = $defaults; + $flags = array(); + } elseif (substr($line, 0, 2) === '#,') { + $flags = array_map('trim', explode(',', substr($line, 2))); + } elseif (substr($line, 0, 7) === 'msgid "') { + // We start a new msg so save previous + // TODO: this fails when comments or contexts are added + $this->addMessage($messages, $item); + $item = $defaults; + $item['ids']['singular'] = substr($line, 7, -1); + } elseif (substr($line, 0, 8) === 'msgstr "') { + $item['translated'] = substr($line, 8, -1); + } elseif ($line[0] === '"') { + $continues = isset($item['translated']) ? 'translated' : 'ids'; + + if (is_array($item[$continues])) { + end($item[$continues]); + $item[$continues][key($item[$continues])] .= substr($line, 1, -1); + } else { + $item[$continues] .= substr($line, 1, -1); + } + } elseif (substr($line, 0, 14) === 'msgid_plural "') { + $item['ids']['plural'] = substr($line, 14, -1); + } elseif (substr($line, 0, 7) === 'msgstr[') { + $size = strpos($line, ']'); + $item['translated'][(int) substr($line, 7, 1)] = substr($line, $size + 3, -1); + } + } + // save last item + if (!in_array('fuzzy', $flags)) { + $this->addMessage($messages, $item); + } + fclose($stream); + + return $messages; + } + + /** + * Save a translation item to the messages. + * + * A .po file could contain by error missing plural indexes. We need to + * fix these before saving them. + * + * @param array $messages + * @param array $item + */ + private function addMessage(array &$messages, array $item) + { + if (is_array($item['translated'])) { + $messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated'][0]); + if (isset($item['ids']['plural'])) { + $plurals = $item['translated']; + // PO are by definition indexed so sort by index. + ksort($plurals); + // Make sure every index is filled. + end($plurals); + $count = key($plurals); + // Fill missing spots with '-'. + $empties = array_fill(0, $count + 1, '-'); + $plurals += $empties; + ksort($plurals); + $messages[stripcslashes($item['ids']['plural'])] = stripcslashes(implode('|', $plurals)); + } + } elseif (!empty($item['ids']['singular'])) { + $messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated']); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/QtFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/QtFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..657bd6eb53ce5d8b7ab7f0eccc01be03a6ed3caf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/QtFileLoader.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Config\Util\XmlUtils; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\FileResource; + +/** + * QtFileLoader loads translations from QT Translations XML files. + * + * @author Benjamin Eberlei + */ +class QtFileLoader implements LoaderInterface +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource)) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!file_exists($resource)) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + try { + $dom = XmlUtils::loadFile($resource); + } catch (\InvalidArgumentException $e) { + throw new InvalidResourceException(sprintf('Unable to load "%s".', $resource), $e->getCode(), $e); + } + + $internalErrors = libxml_use_internal_errors(true); + libxml_clear_errors(); + + $xpath = new \DOMXPath($dom); + $nodes = $xpath->evaluate('//TS/context/name[text()="'.$domain.'"]'); + + $catalogue = new MessageCatalogue($locale); + if ($nodes->length == 1) { + $translations = $nodes->item(0)->nextSibling->parentNode->parentNode->getElementsByTagName('message'); + foreach ($translations as $translation) { + $translationValue = (string) $translation->getElementsByTagName('translation')->item(0)->nodeValue; + + if (!empty($translationValue)) { + $catalogue->set( + (string) $translation->getElementsByTagName('source')->item(0)->nodeValue, + $translationValue, + $domain + ); + } + $translation = $translation->nextSibling; + } + + if (class_exists('Symfony\Component\Config\Resource\FileResource')) { + $catalogue->addResource(new FileResource($resource)); + } + } + + libxml_use_internal_errors($internalErrors); + + return $catalogue; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/XliffFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/XliffFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..e3cab6543744539fc27caee6be8db3b226011661 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/XliffFileLoader.php @@ -0,0 +1,329 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Config\Util\XmlUtils; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Translation\Exception\InvalidArgumentException; +use Symfony\Component\Config\Resource\FileResource; + +/** + * XliffFileLoader loads translations from XLIFF files. + * + * @author Fabien Potencier + */ +class XliffFileLoader implements LoaderInterface +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource)) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!file_exists($resource)) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + $catalogue = new MessageCatalogue($locale); + $this->extract($resource, $catalogue, $domain); + + if (class_exists('Symfony\Component\Config\Resource\FileResource')) { + $catalogue->addResource(new FileResource($resource)); + } + + return $catalogue; + } + + private function extract($resource, MessageCatalogue $catalogue, $domain) + { + try { + $dom = XmlUtils::loadFile($resource); + } catch (\InvalidArgumentException $e) { + throw new InvalidResourceException(sprintf('Unable to load "%s": %s', $resource, $e->getMessage()), $e->getCode(), $e); + } + + $xliffVersion = $this->getVersionNumber($dom); + $this->validateSchema($xliffVersion, $dom, $this->getSchema($xliffVersion)); + + if ('1.2' === $xliffVersion) { + $this->extractXliff1($dom, $catalogue, $domain); + } + + if ('2.0' === $xliffVersion) { + $this->extractXliff2($dom, $catalogue, $domain); + } + } + + /** + * Extract messages and metadata from DOMDocument into a MessageCatalogue. + * + * @param \DOMDocument $dom Source to extract messages and metadata + * @param MessageCatalogue $catalogue Catalogue where we'll collect messages and metadata + * @param string $domain The domain + */ + private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, $domain) + { + $xml = simplexml_import_dom($dom); + $encoding = strtoupper($dom->encoding); + + $xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:1.2'); + foreach ($xml->xpath('//xliff:trans-unit') as $translation) { + $attributes = $translation->attributes(); + + if (!(isset($attributes['resname']) || isset($translation->source))) { + continue; + } + + $source = isset($attributes['resname']) && $attributes['resname'] ? $attributes['resname'] : $translation->source; + // If the xlf file has another encoding specified, try to convert it because + // simple_xml will always return utf-8 encoded values + $target = $this->utf8ToCharset((string) (isset($translation->target) ? $translation->target : $source), $encoding); + + $catalogue->set((string) $source, $target, $domain); + + $metadata = array(); + if ($notes = $this->parseNotesMetadata($translation->note, $encoding)) { + $metadata['notes'] = $notes; + } + + if (isset($translation->target) && $translation->target->attributes()) { + $metadata['target-attributes'] = array(); + foreach ($translation->target->attributes() as $key => $value) { + $metadata['target-attributes'][$key] = (string) $value; + } + } + + if (isset($attributes['id'])) { + $metadata['id'] = (string) $attributes['id']; + } + + $catalogue->setMetadata((string) $source, $metadata, $domain); + } + } + + /** + * @param \DOMDocument $dom + * @param MessageCatalogue $catalogue + * @param string $domain + */ + private function extractXliff2(\DOMDocument $dom, MessageCatalogue $catalogue, $domain) + { + $xml = simplexml_import_dom($dom); + $encoding = strtoupper($dom->encoding); + + $xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:2.0'); + + foreach ($xml->xpath('//xliff:unit/xliff:segment') as $segment) { + $source = $segment->source; + + // If the xlf file has another encoding specified, try to convert it because + // simple_xml will always return utf-8 encoded values + $target = $this->utf8ToCharset((string) (isset($segment->target) ? $segment->target : $source), $encoding); + + $catalogue->set((string) $source, $target, $domain); + + $metadata = array(); + if (isset($segment->target) && $segment->target->attributes()) { + $metadata['target-attributes'] = array(); + foreach ($segment->target->attributes() as $key => $value) { + $metadata['target-attributes'][$key] = (string) $value; + } + } + + $catalogue->setMetadata((string) $source, $metadata, $domain); + } + } + + /** + * Convert a UTF8 string to the specified encoding. + * + * @param string $content String to decode + * @param string $encoding Target encoding + * + * @return string + */ + private function utf8ToCharset($content, $encoding = null) + { + if ('UTF-8' !== $encoding && !empty($encoding)) { + return mb_convert_encoding($content, $encoding, 'UTF-8'); + } + + return $content; + } + + /** + * Validates and parses the given file into a DOMDocument. + * + * @param string $file + * @param \DOMDocument $dom + * @param string $schema source of the schema + * + * @throws InvalidResourceException + */ + private function validateSchema($file, \DOMDocument $dom, $schema) + { + $internalErrors = libxml_use_internal_errors(true); + + $disableEntities = libxml_disable_entity_loader(false); + + if (!@$dom->schemaValidateSource($schema)) { + libxml_disable_entity_loader($disableEntities); + + throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: %s', $file, implode("\n", $this->getXmlErrors($internalErrors)))); + } + + libxml_disable_entity_loader($disableEntities); + + $dom->normalizeDocument(); + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + } + + private function getSchema($xliffVersion) + { + if ('1.2' === $xliffVersion) { + $schemaSource = file_get_contents(__DIR__.'/schema/dic/xliff-core/xliff-core-1.2-strict.xsd'); + $xmlUri = 'http://www.w3.org/2001/xml.xsd'; + } elseif ('2.0' === $xliffVersion) { + $schemaSource = file_get_contents(__DIR__.'/schema/dic/xliff-core/xliff-core-2.0.xsd'); + $xmlUri = 'informativeCopiesOf3rdPartySchemas/w3c/xml.xsd'; + } else { + throw new InvalidArgumentException(sprintf('No support implemented for loading XLIFF version "%s".', $xliffVersion)); + } + + return $this->fixXmlLocation($schemaSource, $xmlUri); + } + + /** + * Internally changes the URI of a dependent xsd to be loaded locally. + * + * @param string $schemaSource Current content of schema file + * @param string $xmlUri External URI of XML to convert to local + * + * @return string + */ + private function fixXmlLocation($schemaSource, $xmlUri) + { + $newPath = str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd'; + $parts = explode('/', $newPath); + if (0 === stripos($newPath, 'phar://')) { + $tmpfile = tempnam(sys_get_temp_dir(), 'sf2'); + if ($tmpfile) { + copy($newPath, $tmpfile); + $parts = explode('/', str_replace('\\', '/', $tmpfile)); + } + } + + $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : ''; + $newPath = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts)); + + return str_replace($xmlUri, $newPath, $schemaSource); + } + + /** + * Returns the XML errors of the internal XML parser. + * + * @param bool $internalErrors + * + * @return array An array of errors + */ + private function getXmlErrors($internalErrors) + { + $errors = array(); + foreach (libxml_get_errors() as $error) { + $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)', + LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', + $error->code, + trim($error->message), + $error->file ?: 'n/a', + $error->line, + $error->column + ); + } + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + + return $errors; + } + + /** + * Gets xliff file version based on the root "version" attribute. + * Defaults to 1.2 for backwards compatibility. + * + * @param \DOMDocument $dom + * + * @throws InvalidArgumentException + * + * @return string + */ + private function getVersionNumber(\DOMDocument $dom) + { + /** @var \DOMNode $xliff */ + foreach ($dom->getElementsByTagName('xliff') as $xliff) { + $version = $xliff->attributes->getNamedItem('version'); + if ($version) { + return $version->nodeValue; + } + + $namespace = $xliff->attributes->getNamedItem('xmlns'); + if ($namespace) { + if (substr_compare('urn:oasis:names:tc:xliff:document:', $namespace->nodeValue, 0, 34) !== 0) { + throw new InvalidArgumentException(sprintf('Not a valid XLIFF namespace "%s"', $namespace)); + } + + return substr($namespace, 34); + } + } + + // Falls back to v1.2 + return '1.2'; + } + + /** + * @param \SimpleXMLElement|null $noteElement + * @param string|null $encoding + * + * @return array + */ + private function parseNotesMetadata(\SimpleXMLElement $noteElement = null, $encoding = null) + { + $notes = array(); + + if (null === $noteElement) { + return $notes; + } + + /** @var \SimpleXMLElement $xmlNote */ + foreach ($noteElement as $xmlNote) { + $noteAttributes = $xmlNote->attributes(); + $note = array('content' => $this->utf8ToCharset((string) $xmlNote, $encoding)); + if (isset($noteAttributes['priority'])) { + $note['priority'] = (int) $noteAttributes['priority']; + } + + if (isset($noteAttributes['from'])) { + $note['from'] = (string) $noteAttributes['from']; + } + + $notes[] = $note; + } + + return $notes; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/YamlFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/YamlFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..41e390d0e967d92d9f63c9d996d3d1dc9c02c7a2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/YamlFileLoader.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\LogicException; +use Symfony\Component\Yaml\Parser as YamlParser; +use Symfony\Component\Yaml\Exception\ParseException; + +/** + * YamlFileLoader loads translations from Yaml files. + * + * @author Fabien Potencier + */ +class YamlFileLoader extends FileLoader +{ + private $yamlParser; + + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + if (null === $this->yamlParser) { + if (!class_exists('Symfony\Component\Yaml\Parser')) { + throw new LogicException('Loading translations from the YAML format requires the Symfony Yaml component.'); + } + + $this->yamlParser = new YamlParser(); + } + + try { + $messages = $this->yamlParser->parse(file_get_contents($resource)); + } catch (ParseException $e) { + throw new InvalidResourceException(sprintf('Error parsing YAML, invalid file "%s"', $resource), 0, $e); + } + + return $messages; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3ce2a8e8ab73fbf27bd55bde01579962bc3060f5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd @@ -0,0 +1,2223 @@ + + + + + + + + + + + + + + + Values for the attribute 'context-type'. + + + + + Indicates a database content. + + + + + Indicates the content of an element within an XML document. + + + + + Indicates the name of an element within an XML document. + + + + + Indicates the line number from the sourcefile (see context-type="sourcefile") where the <source> is found. + + + + + Indicates a the number of parameters contained within the <source>. + + + + + Indicates notes pertaining to the parameters in the <source>. + + + + + Indicates the content of a record within a database. + + + + + Indicates the name of a record within a database. + + + + + Indicates the original source file in the case that multiple files are merged to form the original file from which the XLIFF file is created. This differs from the original <file> attribute in that this sourcefile is one of many that make up that file. + + + + + + + Values for the attribute 'count-type'. + + + + + Indicates the count units are items that are used X times in a certain context; example: this is a reusable text unit which is used 42 times in other texts. + + + + + Indicates the count units are translation units existing already in the same document. + + + + + Indicates a total count. + + + + + + + Values for the attribute 'ctype' when used other elements than <ph> or <x>. + + + + + Indicates a run of bolded text. + + + + + Indicates a run of text in italics. + + + + + Indicates a run of underlined text. + + + + + Indicates a run of hyper-text. + + + + + + + Values for the attribute 'ctype' when used with <ph> or <x>. + + + + + Indicates a inline image. + + + + + Indicates a page break. + + + + + Indicates a line break. + + + + + + + + + + + + Values for the attribute 'datatype'. + + + + + Indicates Active Server Page data. + + + + + Indicates C source file data. + + + + + Indicates Channel Definition Format (CDF) data. + + + + + Indicates ColdFusion data. + + + + + Indicates C++ source file data. + + + + + Indicates C-Sharp data. + + + + + Indicates strings from C, ASM, and driver files data. + + + + + Indicates comma-separated values data. + + + + + Indicates database data. + + + + + Indicates portions of document that follows data and contains metadata. + + + + + Indicates portions of document that precedes data and contains metadata. + + + + + Indicates data from standard UI file operations dialogs (e.g., Open, Save, Save As, Export, Import). + + + + + Indicates standard user input screen data. + + + + + Indicates HyperText Markup Language (HTML) data - document instance. + + + + + Indicates content within an HTML document’s <body> element. + + + + + Indicates Windows INI file data. + + + + + Indicates Interleaf data. + + + + + Indicates Java source file data (extension '.java'). + + + + + Indicates Java property resource bundle data. + + + + + Indicates Java list resource bundle data. + + + + + Indicates JavaScript source file data. + + + + + Indicates JScript source file data. + + + + + Indicates information relating to formatting. + + + + + Indicates LISP source file data. + + + + + Indicates information relating to margin formats. + + + + + Indicates a file containing menu. + + + + + Indicates numerically identified string table. + + + + + Indicates Maker Interchange Format (MIF) data. + + + + + Indicates that the datatype attribute value is a MIME Type value and is defined in the mime-type attribute. + + + + + Indicates GNU Machine Object data. + + + + + Indicates Message Librarian strings created by Novell's Message Librarian Tool. + + + + + Indicates information to be displayed at the bottom of each page of a document. + + + + + Indicates information to be displayed at the top of each page of a document. + + + + + Indicates a list of property values (e.g., settings within INI files or preferences dialog). + + + + + Indicates Pascal source file data. + + + + + Indicates Hypertext Preprocessor data. + + + + + Indicates plain text file (no formatting other than, possibly, wrapping). + + + + + Indicates GNU Portable Object file. + + + + + Indicates dynamically generated user defined document. e.g. Oracle Report, Crystal Report, etc. + + + + + Indicates Windows .NET binary resources. + + + + + Indicates Windows .NET Resources. + + + + + Indicates Rich Text Format (RTF) data. + + + + + Indicates Standard Generalized Markup Language (SGML) data - document instance. + + + + + Indicates Standard Generalized Markup Language (SGML) data - Document Type Definition (DTD). + + + + + Indicates Scalable Vector Graphic (SVG) data. + + + + + Indicates VisualBasic Script source file. + + + + + Indicates warning message. + + + + + Indicates Windows (Win32) resources (i.e. resources extracted from an RC script, a message file, or a compiled file). + + + + + Indicates Extensible HyperText Markup Language (XHTML) data - document instance. + + + + + Indicates Extensible Markup Language (XML) data - document instance. + + + + + Indicates Extensible Markup Language (XML) data - Document Type Definition (DTD). + + + + + Indicates Extensible Stylesheet Language (XSL) data. + + + + + Indicates XUL elements. + + + + + + + Values for the attribute 'mtype'. + + + + + Indicates the marked text is an abbreviation. + + + + + ISO-12620 2.1.8: A term resulting from the omission of any part of the full term while designating the same concept. + + + + + ISO-12620 2.1.8.1: An abbreviated form of a simple term resulting from the omission of some of its letters (e.g. 'adj.' for 'adjective'). + + + + + ISO-12620 2.1.8.4: An abbreviated form of a term made up of letters from the full form of a multiword term strung together into a sequence pronounced only syllabically (e.g. 'radar' for 'radio detecting and ranging'). + + + + + ISO-12620: A proper-name term, such as the name of an agency or other proper entity. + + + + + ISO-12620 2.1.18.1: A recurrent word combination characterized by cohesion in that the components of the collocation must co-occur within an utterance or series of utterances, even though they do not necessarily have to maintain immediate proximity to one another. + + + + + ISO-12620 2.1.5: A synonym for an international scientific term that is used in general discourse in a given language. + + + + + Indicates the marked text is a date and/or time. + + + + + ISO-12620 2.1.15: An expression used to represent a concept based on a statement that two mathematical expressions are, for instance, equal as identified by the equal sign (=), or assigned to one another by a similar sign. + + + + + ISO-12620 2.1.7: The complete representation of a term for which there is an abbreviated form. + + + + + ISO-12620 2.1.14: Figures, symbols or the like used to express a concept briefly, such as a mathematical or chemical formula. + + + + + ISO-12620 2.1.1: The concept designation that has been chosen to head a terminological record. + + + + + ISO-12620 2.1.8.3: An abbreviated form of a term consisting of some of the initial letters of the words making up a multiword term or the term elements making up a compound term when these letters are pronounced individually (e.g. 'BSE' for 'bovine spongiform encephalopathy'). + + + + + ISO-12620 2.1.4: A term that is part of an international scientific nomenclature as adopted by an appropriate scientific body. + + + + + ISO-12620 2.1.6: A term that has the same or nearly identical orthographic or phonemic form in many languages. + + + + + ISO-12620 2.1.16: An expression used to represent a concept based on mathematical or logical relations, such as statements of inequality, set relationships, Boolean operations, and the like. + + + + + ISO-12620 2.1.17: A unit to track object. + + + + + Indicates the marked text is a name. + + + + + ISO-12620 2.1.3: A term that represents the same or a very similar concept as another term in the same language, but for which interchangeability is limited to some contexts and inapplicable in others. + + + + + ISO-12620 2.1.17.2: A unique alphanumeric designation assigned to an object in a manufacturing system. + + + + + Indicates the marked text is a phrase. + + + + + ISO-12620 2.1.18: Any group of two or more words that form a unit, the meaning of which frequently cannot be deduced based on the combined sense of the words making up the phrase. + + + + + Indicates the marked text should not be translated. + + + + + ISO-12620 2.1.12: A form of a term resulting from an operation whereby non-Latin writing systems are converted to the Latin alphabet. + + + + + Indicates that the marked text represents a segment. + + + + + ISO-12620 2.1.18.2: A fixed, lexicalized phrase. + + + + + ISO-12620 2.1.8.2: A variant of a multiword term that includes fewer words than the full form of the term (e.g. 'Group of Twenty-four' for 'Intergovernmental Group of Twenty-four on International Monetary Affairs'). + + + + + ISO-12620 2.1.17.1: Stock keeping unit, an inventory item identified by a unique alphanumeric designation assigned to an object in an inventory control system. + + + + + ISO-12620 2.1.19: A fixed chunk of recurring text. + + + + + ISO-12620 2.1.13: A designation of a concept by letters, numerals, pictograms or any combination thereof. + + + + + ISO-12620 2.1.2: Any term that represents the same or a very similar concept as the main entry term in a term entry. + + + + + ISO-12620 2.1.18.3: Phraseological unit in a language that expresses the same semantic content as another phrase in that same language. + + + + + Indicates the marked text is a term. + + + + + ISO-12620 2.1.11: A form of a term resulting from an operation whereby the characters of one writing system are represented by characters from another writing system, taking into account the pronunciation of the characters converted. + + + + + ISO-12620 2.1.10: A form of a term resulting from an operation whereby the characters of an alphabetic writing system are represented by characters from another alphabetic writing system. + + + + + ISO-12620 2.1.8.5: An abbreviated form of a term resulting from the omission of one or more term elements or syllables (e.g. 'flu' for 'influenza'). + + + + + ISO-12620 2.1.9: One of the alternate forms of a term. + + + + + + + Values for the attribute 'restype'. + + + + + Indicates a Windows RC AUTO3STATE control. + + + + + Indicates a Windows RC AUTOCHECKBOX control. + + + + + Indicates a Windows RC AUTORADIOBUTTON control. + + + + + Indicates a Windows RC BEDIT control. + + + + + Indicates a bitmap, for example a BITMAP resource in Windows. + + + + + Indicates a button object, for example a BUTTON control Windows. + + + + + Indicates a caption, such as the caption of a dialog box. + + + + + Indicates the cell in a table, for example the content of the <td> element in HTML. + + + + + Indicates check box object, for example a CHECKBOX control in Windows. + + + + + Indicates a menu item with an associated checkbox. + + + + + Indicates a list box, but with a check-box for each item. + + + + + Indicates a color selection dialog. + + + + + Indicates a combination of edit box and listbox object, for example a COMBOBOX control in Windows. + + + + + Indicates an initialization entry of an extended combobox DLGINIT resource block. (code 0x1234). + + + + + Indicates an initialization entry of a combobox DLGINIT resource block (code 0x0403). + + + + + Indicates a UI base class element that cannot be represented by any other element. + + + + + Indicates a context menu. + + + + + Indicates a Windows RC CTEXT control. + + + + + Indicates a cursor, for example a CURSOR resource in Windows. + + + + + Indicates a date/time picker. + + + + + Indicates a Windows RC DEFPUSHBUTTON control. + + + + + Indicates a dialog box. + + + + + Indicates a Windows RC DLGINIT resource block. + + + + + Indicates an edit box object, for example an EDIT control in Windows. + + + + + Indicates a filename. + + + + + Indicates a file dialog. + + + + + Indicates a footnote. + + + + + Indicates a font name. + + + + + Indicates a footer. + + + + + Indicates a frame object. + + + + + Indicates a XUL grid element. + + + + + Indicates a groupbox object, for example a GROUPBOX control in Windows. + + + + + Indicates a header item. + + + + + Indicates a heading, such has the content of <h1>, <h2>, etc. in HTML. + + + + + Indicates a Windows RC HEDIT control. + + + + + Indicates a horizontal scrollbar. + + + + + Indicates an icon, for example an ICON resource in Windows. + + + + + Indicates a Windows RC IEDIT control. + + + + + Indicates keyword list, such as the content of the Keywords meta-data in HTML, or a K footnote in WinHelp RTF. + + + + + Indicates a label object. + + + + + Indicates a label that is also a HTML link (not necessarily a URL). + + + + + Indicates a list (a group of list-items, for example an <ol> or <ul> element in HTML). + + + + + Indicates a listbox object, for example an LISTBOX control in Windows. + + + + + Indicates an list item (an entry in a list). + + + + + Indicates a Windows RC LTEXT control. + + + + + Indicates a menu (a group of menu-items). + + + + + Indicates a toolbar containing one or more tope level menus. + + + + + Indicates a menu item (an entry in a menu). + + + + + Indicates a XUL menuseparator element. + + + + + Indicates a message, for example an entry in a MESSAGETABLE resource in Windows. + + + + + Indicates a calendar control. + + + + + Indicates an edit box beside a spin control. + + + + + Indicates a catch all for rectangular areas. + + + + + Indicates a standalone menu not necessarily associated with a menubar. + + + + + Indicates a pushbox object, for example a PUSHBOX control in Windows. + + + + + Indicates a Windows RC PUSHBUTTON control. + + + + + Indicates a radio button object. + + + + + Indicates a menuitem with associated radio button. + + + + + Indicates raw data resources for an application. + + + + + Indicates a row in a table. + + + + + Indicates a Windows RC RTEXT control. + + + + + Indicates a user navigable container used to show a portion of a document. + + + + + Indicates a generic divider object (e.g. menu group separator). + + + + + Windows accelerators, shortcuts in resource or property files. + + + + + Indicates a UI control to indicate process activity but not progress. + + + + + Indicates a splitter bar. + + + + + Indicates a Windows RC STATE3 control. + + + + + Indicates a window for providing feedback to the users, like 'read-only', etc. + + + + + Indicates a string, for example an entry in a STRINGTABLE resource in Windows. + + + + + Indicates a layers of controls with a tab to select layers. + + + + + Indicates a display and edits regular two-dimensional tables of cells. + + + + + Indicates a XUL textbox element. + + + + + Indicates a UI button that can be toggled to on or off state. + + + + + Indicates an array of controls, usually buttons. + + + + + Indicates a pop up tool tip text. + + + + + Indicates a bar with a pointer indicating a position within a certain range. + + + + + Indicates a control that displays a set of hierarchical data. + + + + + Indicates a URI (URN or URL). + + + + + Indicates a Windows RC USERBUTTON control. + + + + + Indicates a user-defined control like CONTROL control in Windows. + + + + + Indicates the text of a variable. + + + + + Indicates version information about a resource like VERSIONINFO in Windows. + + + + + Indicates a vertical scrollbar. + + + + + Indicates a graphical window. + + + + + + + Values for the attribute 'size-unit'. + + + + + Indicates a size in 8-bit bytes. + + + + + Indicates a size in Unicode characters. + + + + + Indicates a size in columns. Used for HTML text area. + + + + + Indicates a size in centimeters. + + + + + Indicates a size in dialog units, as defined in Windows resources. + + + + + Indicates a size in 'font-size' units (as defined in CSS). + + + + + Indicates a size in 'x-height' units (as defined in CSS). + + + + + Indicates a size in glyphs. A glyph is considered to be one or more combined Unicode characters that represent a single displayable text character. Sometimes referred to as a 'grapheme cluster' + + + + + Indicates a size in inches. + + + + + Indicates a size in millimeters. + + + + + Indicates a size in percentage. + + + + + Indicates a size in pixels. + + + + + Indicates a size in point. + + + + + Indicates a size in rows. Used for HTML text area. + + + + + + + Values for the attribute 'state'. + + + + + Indicates the terminating state. + + + + + Indicates only non-textual information needs adaptation. + + + + + Indicates both text and non-textual information needs adaptation. + + + + + Indicates only non-textual information needs review. + + + + + Indicates both text and non-textual information needs review. + + + + + Indicates that only the text of the item needs to be reviewed. + + + + + Indicates that the item needs to be translated. + + + + + Indicates that the item is new. For example, translation units that were not in a previous version of the document. + + + + + Indicates that changes are reviewed and approved. + + + + + Indicates that the item has been translated. + + + + + + + Values for the attribute 'state-qualifier'. + + + + + Indicates an exact match. An exact match occurs when a source text of a segment is exactly the same as the source text of a segment that was translated previously. + + + + + Indicates a fuzzy match. A fuzzy match occurs when a source text of a segment is very similar to the source text of a segment that was translated previously (e.g. when the difference is casing, a few changed words, white-space discripancy, etc.). + + + + + Indicates a match based on matching IDs (in addition to matching text). + + + + + Indicates a translation derived from a glossary. + + + + + Indicates a translation derived from existing translation. + + + + + Indicates a translation derived from machine translation. + + + + + Indicates a translation derived from a translation repository. + + + + + Indicates a translation derived from a translation memory. + + + + + Indicates the translation is suggested by machine translation. + + + + + Indicates that the item has been rejected because of incorrect grammar. + + + + + Indicates that the item has been rejected because it is incorrect. + + + + + Indicates that the item has been rejected because it is too long or too short. + + + + + Indicates that the item has been rejected because of incorrect spelling. + + + + + Indicates the translation is suggested by translation memory. + + + + + + + Values for the attribute 'unit'. + + + + + Refers to words. + + + + + Refers to pages. + + + + + Refers to <trans-unit> elements. + + + + + Refers to <bin-unit> elements. + + + + + Refers to glyphs. + + + + + Refers to <trans-unit> and/or <bin-unit> elements. + + + + + Refers to the occurrences of instances defined by the count-type value. + + + + + Refers to characters. + + + + + Refers to lines. + + + + + Refers to sentences. + + + + + Refers to paragraphs. + + + + + Refers to segments. + + + + + Refers to placeables (inline elements). + + + + + + + Values for the attribute 'priority'. + + + + + Highest priority. + + + + + High priority. + + + + + High priority, but not as important as 2. + + + + + High priority, but not as important as 3. + + + + + Medium priority, but more important than 6. + + + + + Medium priority, but less important than 5. + + + + + Low priority, but more important than 8. + + + + + Low priority, but more important than 9. + + + + + Low priority. + + + + + Lowest priority. + + + + + + + + + This value indicates that all properties can be reformatted. This value must be used alone. + + + + + This value indicates that no properties should be reformatted. This value must be used alone. + + + + + + + + + + + + + This value indicates that all information in the coord attribute can be modified. + + + + + This value indicates that the x information in the coord attribute can be modified. + + + + + This value indicates that the y information in the coord attribute can be modified. + + + + + This value indicates that the cx information in the coord attribute can be modified. + + + + + This value indicates that the cy information in the coord attribute can be modified. + + + + + This value indicates that all the information in the font attribute can be modified. + + + + + This value indicates that the name information in the font attribute can be modified. + + + + + This value indicates that the size information in the font attribute can be modified. + + + + + This value indicates that the weight information in the font attribute can be modified. + + + + + This value indicates that the information in the css-style attribute can be modified. + + + + + This value indicates that the information in the style attribute can be modified. + + + + + This value indicates that the information in the exstyle attribute can be modified. + + + + + + + + + + + + + Indicates that the context is informational in nature, specifying for example, how a term should be translated. Thus, should be displayed to anyone editing the XLIFF document. + + + + + Indicates that the context-group is used to specify where the term was found in the translatable source. Thus, it is not displayed. + + + + + Indicates that the context information should be used during translation memory lookups. Thus, it is not displayed. + + + + + + + + + Represents a translation proposal from a translation memory or other resource. + + + + + Represents a previous version of the target element. + + + + + Represents a rejected version of the target element. + + + + + Represents a translation to be used for reference purposes only, for example from a related product or a different language. + + + + + Represents a proposed translation that was used for the translation of the trans-unit, possibly modified. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Values for the attribute 'coord'. + + + + + + + + Version values: 1.0 and 1.1 are allowed for backward compatibility. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xliff-core-2.0.xsd b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xliff-core-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..963232f97215468374b4c4f08af8aa72b78d7269 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xliff-core-2.0.xsd @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a46162a7a7a647cd1b0c90f30783c6d0b9c27aa7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd @@ -0,0 +1,309 @@ + + + + + + +
    +

    About the XML namespace

    + +
    +

    + + This schema document describes the XML namespace, in a form + suitable for import by other schema documents. +

    +

    + See + http://www.w3.org/XML/1998/namespace.html and + + http://www.w3.org/TR/REC-xml for information + about this namespace. +

    + +

    + Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. +

    +

    + See further below in this document for more information about how to refer to this schema document from your own + XSD schema documents and about the + namespace-versioning policy governing this schema document. +

    +
    +
    + +
    +
    + + + + +
    + +

    lang (as an attribute name)

    +

    + + denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.

    + +
    +
    +

    Notes

    +

    + Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. +

    +

    + + See BCP 47 at + http://www.rfc-editor.org/rfc/bcp/bcp47.txt + and the IANA language subtag registry at + + http://www.iana.org/assignments/language-subtag-registry + for further information. +

    +

    + + The union allows for the 'un-declaration' of xml:lang with + the empty string. +

    +
    +
    +
    + + + + + + + + + + +
    + + + + + +
    + +

    space (as an attribute name)

    +

    + denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.

    + +
    +
    +
    + + + + + + + +
    + + + + +
    + +

    base (as an attribute name)

    +

    + denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.

    + +

    + See http://www.w3.org/TR/xmlbase/ + for information about this attribute. +

    + +
    +
    +
    +
    + + + + +
    + +

    id (as an attribute name)

    +

    + + denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.

    + +

    + See http://www.w3.org/TR/xml-id/ + for information about this attribute. +

    +
    +
    +
    + +
    + + + + + + + + + + + +
    + +

    Father (in any context at all)

    + +
    +

    + denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: +

    +
    +

    + + In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". +

    +
    +
    +
    +
    +
    + + + + +
    +

    About this schema document

    + +
    +

    + This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow xml:base, + xml:lang, xml:space or + xml:id attributes on elements they define. +

    + +

    + To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: +

    +
    +          <schema.. .>
    +          .. .
    +           <import namespace="http://www.w3.org/XML/1998/namespace"
    +                      schemaLocation="http://www.w3.org/2001/xml.xsd"/>
    +     
    +

    + or +

    +
    +
    +           <import namespace="http://www.w3.org/XML/1998/namespace"
    +                      schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
    +     
    +

    + Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. +

    +
    +          <type.. .>
    +          .. .
    +           <attributeGroup ref="xml:specialAttrs"/>
    +     
    +

    + will define a type which will schema-validate an instance element + with any of those attributes. +

    + +
    +
    +
    +
    + + + +
    +

    Versioning policy for this schema document

    + +
    +

    + In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + + http://www.w3.org/2009/01/xml.xsd. +

    +

    + At the date of issue it can also be found at + + http://www.w3.org/2001/xml.xsd. +

    + +

    + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at + http://www.w3.org/2001/xml.xsd + + will change accordingly; the version at + + http://www.w3.org/2009/01/xml.xsd + + will not change. +

    +

    + + Previous dated (and unchanging) versions of this schema + document are at: +

    + +
    +
    +
    +
    + +
    diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/LoggingTranslator.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/LoggingTranslator.php new file mode 100644 index 0000000000000000000000000000000000000000..469b3d133b9f7745fb0094b696eea40ed71b4911 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/LoggingTranslator.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Psr\Log\LoggerInterface; +use Symfony\Component\Translation\Exception\InvalidArgumentException; + +/** + * @author Abdellatif Ait boudad + */ +class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface +{ + /** + * @var TranslatorInterface|TranslatorBagInterface + */ + private $translator; + + /** + * @var LoggerInterface + */ + private $logger; + + /** + * @param TranslatorInterface $translator The translator must implement TranslatorBagInterface + * @param LoggerInterface $logger + */ + public function __construct(TranslatorInterface $translator, LoggerInterface $logger) + { + if (!$translator instanceof TranslatorBagInterface) { + throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', get_class($translator))); + } + + $this->translator = $translator; + $this->logger = $logger; + } + + /** + * {@inheritdoc} + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + $trans = $this->translator->trans($id, $parameters, $domain, $locale); + $this->log($id, $domain, $locale); + + return $trans; + } + + /** + * {@inheritdoc} + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + $trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale); + $this->log($id, $domain, $locale); + + return $trans; + } + + /** + * {@inheritdoc} + */ + public function setLocale($locale) + { + $this->translator->setLocale($locale); + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->translator->getLocale(); + } + + /** + * {@inheritdoc} + */ + public function getCatalogue($locale = null) + { + return $this->translator->getCatalogue($locale); + } + + /** + * Gets the fallback locales. + * + * @return array $locales The fallback locales + */ + public function getFallbackLocales() + { + if ($this->translator instanceof Translator) { + return $this->translator->getFallbackLocales(); + } + + return array(); + } + + /** + * Passes through all unknown calls onto the translator object. + */ + public function __call($method, $args) + { + return call_user_func_array(array($this->translator, $method), $args); + } + + /** + * Logs for missing translations. + * + * @param string $id + * @param string|null $domain + * @param string|null $locale + */ + private function log($id, $domain, $locale) + { + if (null === $domain) { + $domain = 'messages'; + } + + $id = (string) $id; + $catalogue = $this->translator->getCatalogue($locale); + if ($catalogue->defines($id, $domain)) { + return; + } + + if ($catalogue->has($id, $domain)) { + $this->logger->debug('Translation use fallback catalogue.', array('id' => $id, 'domain' => $domain, 'locale' => $catalogue->getLocale())); + } else { + $this->logger->warning('Translation not found.', array('id' => $id, 'domain' => $domain, 'locale' => $catalogue->getLocale())); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageCatalogue.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageCatalogue.php new file mode 100644 index 0000000000000000000000000000000000000000..c82b73e19903990be3ad24f34ef01c657330bcfb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageCatalogue.php @@ -0,0 +1,275 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Symfony\Component\Config\Resource\ResourceInterface; +use Symfony\Component\Translation\Exception\LogicException; + +/** + * MessageCatalogue. + * + * @author Fabien Potencier + */ +class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterface +{ + private $messages = array(); + private $metadata = array(); + private $resources = array(); + private $locale; + private $fallbackCatalogue; + private $parent; + + /** + * Constructor. + * + * @param string $locale The locale + * @param array $messages An array of messages classified by domain + */ + public function __construct($locale, array $messages = array()) + { + $this->locale = $locale; + $this->messages = $messages; + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->locale; + } + + /** + * {@inheritdoc} + */ + public function getDomains() + { + return array_keys($this->messages); + } + + /** + * {@inheritdoc} + */ + public function all($domain = null) + { + if (null === $domain) { + return $this->messages; + } + + return isset($this->messages[$domain]) ? $this->messages[$domain] : array(); + } + + /** + * {@inheritdoc} + */ + public function set($id, $translation, $domain = 'messages') + { + $this->add(array($id => $translation), $domain); + } + + /** + * {@inheritdoc} + */ + public function has($id, $domain = 'messages') + { + if (isset($this->messages[$domain][$id])) { + return true; + } + + if (null !== $this->fallbackCatalogue) { + return $this->fallbackCatalogue->has($id, $domain); + } + + return false; + } + + /** + * {@inheritdoc} + */ + public function defines($id, $domain = 'messages') + { + return isset($this->messages[$domain][$id]); + } + + /** + * {@inheritdoc} + */ + public function get($id, $domain = 'messages') + { + if (isset($this->messages[$domain][$id])) { + return $this->messages[$domain][$id]; + } + + if (null !== $this->fallbackCatalogue) { + return $this->fallbackCatalogue->get($id, $domain); + } + + return $id; + } + + /** + * {@inheritdoc} + */ + public function replace($messages, $domain = 'messages') + { + $this->messages[$domain] = array(); + + $this->add($messages, $domain); + } + + /** + * {@inheritdoc} + */ + public function add($messages, $domain = 'messages') + { + if (!isset($this->messages[$domain])) { + $this->messages[$domain] = $messages; + } else { + $this->messages[$domain] = array_replace($this->messages[$domain], $messages); + } + } + + /** + * {@inheritdoc} + */ + public function addCatalogue(MessageCatalogueInterface $catalogue) + { + if ($catalogue->getLocale() !== $this->locale) { + throw new LogicException(sprintf('Cannot add a catalogue for locale "%s" as the current locale for this catalogue is "%s"', $catalogue->getLocale(), $this->locale)); + } + + foreach ($catalogue->all() as $domain => $messages) { + $this->add($messages, $domain); + } + + foreach ($catalogue->getResources() as $resource) { + $this->addResource($resource); + } + + if ($catalogue instanceof MetadataAwareInterface) { + $metadata = $catalogue->getMetadata('', ''); + $this->addMetadata($metadata); + } + } + + /** + * {@inheritdoc} + */ + public function addFallbackCatalogue(MessageCatalogueInterface $catalogue) + { + // detect circular references + $c = $catalogue; + while ($c = $c->getFallbackCatalogue()) { + if ($c->getLocale() === $this->getLocale()) { + throw new LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); + } + } + + $c = $this; + do { + if ($c->getLocale() === $catalogue->getLocale()) { + throw new LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); + } + + foreach ($catalogue->getResources() as $resource) { + $c->addResource($resource); + } + } while ($c = $c->parent); + + $catalogue->parent = $this; + $this->fallbackCatalogue = $catalogue; + + foreach ($catalogue->getResources() as $resource) { + $this->addResource($resource); + } + } + + /** + * {@inheritdoc} + */ + public function getFallbackCatalogue() + { + return $this->fallbackCatalogue; + } + + /** + * {@inheritdoc} + */ + public function getResources() + { + return array_values($this->resources); + } + + /** + * {@inheritdoc} + */ + public function addResource(ResourceInterface $resource) + { + $this->resources[$resource->__toString()] = $resource; + } + + /** + * {@inheritdoc} + */ + public function getMetadata($key = '', $domain = 'messages') + { + if ('' == $domain) { + return $this->metadata; + } + + if (isset($this->metadata[$domain])) { + if ('' == $key) { + return $this->metadata[$domain]; + } + + if (isset($this->metadata[$domain][$key])) { + return $this->metadata[$domain][$key]; + } + } + } + + /** + * {@inheritdoc} + */ + public function setMetadata($key, $value, $domain = 'messages') + { + $this->metadata[$domain][$key] = $value; + } + + /** + * {@inheritdoc} + */ + public function deleteMetadata($key = '', $domain = 'messages') + { + if ('' == $domain) { + $this->metadata = array(); + } elseif ('' == $key) { + unset($this->metadata[$domain]); + } else { + unset($this->metadata[$domain][$key]); + } + } + + /** + * Adds current values with the new values. + * + * @param array $values Values to add + */ + private function addMetadata(array $values) + { + foreach ($values as $domain => $keys) { + foreach ($keys as $key => $value) { + $this->setMetadata($key, $value, $domain); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageCatalogueInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageCatalogueInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..40054f05c4c18520502ee154eb6be7243ecfec4d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageCatalogueInterface.php @@ -0,0 +1,142 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Symfony\Component\Config\Resource\ResourceInterface; + +/** + * MessageCatalogueInterface. + * + * @author Fabien Potencier + */ +interface MessageCatalogueInterface +{ + /** + * Gets the catalogue locale. + * + * @return string The locale + */ + public function getLocale(); + + /** + * Gets the domains. + * + * @return array An array of domains + */ + public function getDomains(); + + /** + * Gets the messages within a given domain. + * + * If $domain is null, it returns all messages. + * + * @param string $domain The domain name + * + * @return array An array of messages + */ + public function all($domain = null); + + /** + * Sets a message translation. + * + * @param string $id The message id + * @param string $translation The messages translation + * @param string $domain The domain name + */ + public function set($id, $translation, $domain = 'messages'); + + /** + * Checks if a message has a translation. + * + * @param string $id The message id + * @param string $domain The domain name + * + * @return bool true if the message has a translation, false otherwise + */ + public function has($id, $domain = 'messages'); + + /** + * Checks if a message has a translation (it does not take into account the fallback mechanism). + * + * @param string $id The message id + * @param string $domain The domain name + * + * @return bool true if the message has a translation, false otherwise + */ + public function defines($id, $domain = 'messages'); + + /** + * Gets a message translation. + * + * @param string $id The message id + * @param string $domain The domain name + * + * @return string The message translation + */ + public function get($id, $domain = 'messages'); + + /** + * Sets translations for a given domain. + * + * @param array $messages An array of translations + * @param string $domain The domain name + */ + public function replace($messages, $domain = 'messages'); + + /** + * Adds translations for a given domain. + * + * @param array $messages An array of translations + * @param string $domain The domain name + */ + public function add($messages, $domain = 'messages'); + + /** + * Merges translations from the given Catalogue into the current one. + * + * The two catalogues must have the same locale. + * + * @param self $catalogue + */ + public function addCatalogue(MessageCatalogueInterface $catalogue); + + /** + * Merges translations from the given Catalogue into the current one + * only when the translation does not exist. + * + * This is used to provide default translations when they do not exist for the current locale. + * + * @param self $catalogue + */ + public function addFallbackCatalogue(MessageCatalogueInterface $catalogue); + + /** + * Gets the fallback catalogue. + * + * @return self|null A MessageCatalogueInterface instance or null when no fallback has been set + */ + public function getFallbackCatalogue(); + + /** + * Returns an array of resources loaded to build this collection. + * + * @return ResourceInterface[] An array of resources + */ + public function getResources(); + + /** + * Adds a resource for this collection. + * + * @param ResourceInterface $resource A resource instance + */ + public function addResource(ResourceInterface $resource); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageSelector.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageSelector.php new file mode 100644 index 0000000000000000000000000000000000000000..c6134191bce084acaea696f2037a6018bd0e0c72 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/MessageSelector.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Symfony\Component\Translation\Exception\InvalidArgumentException; + +/** + * MessageSelector. + * + * @author Fabien Potencier + * @author Bernhard Schussek + */ +class MessageSelector +{ + /** + * Given a message with different plural translations separated by a + * pipe (|), this method returns the correct portion of the message based + * on the given number, locale and the pluralization rules in the message + * itself. + * + * The message supports two different types of pluralization rules: + * + * interval: {0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples + * indexed: There is one apple|There are %count% apples + * + * The indexed solution can also contain labels (e.g. one: There is one apple). + * This is purely for making the translations more clear - it does not + * affect the functionality. + * + * The two methods can also be mixed: + * {0} There are no apples|one: There is one apple|more: There are %count% apples + * + * @param string $message The message being translated + * @param int $number The number of items represented for the message + * @param string $locale The locale to use for choosing + * + * @return string + * + * @throws InvalidArgumentException + */ + public function choose($message, $number, $locale) + { + preg_match_all('/(?:\|\||[^\|])++/', $message, $parts); + $explicitRules = array(); + $standardRules = array(); + foreach ($parts[0] as $part) { + $part = trim(str_replace('||', '|', $part)); + + if (preg_match('/^(?P'.Interval::getIntervalRegexp().')\s*(?P.*?)$/xs', $part, $matches)) { + $explicitRules[$matches['interval']] = $matches['message']; + } elseif (preg_match('/^\w+\:\s*(.*?)$/', $part, $matches)) { + $standardRules[] = $matches[1]; + } else { + $standardRules[] = $part; + } + } + + // try to match an explicit rule, then fallback to the standard ones + foreach ($explicitRules as $interval => $m) { + if (Interval::test($number, $interval)) { + return $m; + } + } + + $position = PluralizationRules::get($number, $locale); + + if (!isset($standardRules[$position])) { + // when there's exactly one rule given, and that rule is a standard + // rule, use this rule + if (1 === count($parts[0]) && isset($standardRules[0])) { + return $standardRules[0]; + } + + throw new InvalidArgumentException(sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $message, $locale, $number)); + } + + return $standardRules[$position]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/MetadataAwareInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/MetadataAwareInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e93c6fbc713114d79dfa40f653b6878c5f3a3bc0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/MetadataAwareInterface.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * MetadataAwareInterface. + * + * @author Fabien Potencier + */ +interface MetadataAwareInterface +{ + /** + * Gets metadata for the given domain and key. + * + * Passing an empty domain will return an array with all metadata indexed by + * domain and then by key. Passing an empty key will return an array with all + * metadata for the given domain. + * + * @param string $key The key + * @param string $domain The domain name + * + * @return mixed The value that was set or an array with the domains/keys or null + */ + public function getMetadata($key = '', $domain = 'messages'); + + /** + * Adds metadata to a message domain. + * + * @param string $key The key + * @param mixed $value The value + * @param string $domain The domain name + */ + public function setMetadata($key, $value, $domain = 'messages'); + + /** + * Deletes metadata for the given key and domain. + * + * Passing an empty domain will delete all metadata. Passing an empty key will + * delete all metadata for the given domain. + * + * @param string $key The key + * @param string $domain The domain name + */ + public function deleteMetadata($key = '', $domain = 'messages'); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/PluralizationRules.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/PluralizationRules.php new file mode 100644 index 0000000000000000000000000000000000000000..ef2be7097718ba4b10fa4912f2f14c8a8f252679 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/PluralizationRules.php @@ -0,0 +1,209 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * Returns the plural rules for a given locale. + * + * @author Fabien Potencier + */ +class PluralizationRules +{ + private static $rules = array(); + + /** + * Returns the plural position to use for the given locale and number. + * + * @param int $number The number + * @param string $locale The locale + * + * @return int The plural position + */ + public static function get($number, $locale) + { + if ('pt_BR' === $locale) { + // temporary set a locale for brazilian + $locale = 'xbr'; + } + + if (strlen($locale) > 3) { + $locale = substr($locale, 0, -strlen(strrchr($locale, '_'))); + } + + if (isset(self::$rules[$locale])) { + $return = call_user_func(self::$rules[$locale], $number); + + if (!is_int($return) || $return < 0) { + return 0; + } + + return $return; + } + + /* + * The plural rules are derived from code of the Zend Framework (2010-09-25), + * which is subject to the new BSD license (http://framework.zend.com/license/new-bsd). + * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + */ + switch ($locale) { + case 'az': + case 'bo': + case 'dz': + case 'id': + case 'ja': + case 'jv': + case 'ka': + case 'km': + case 'kn': + case 'ko': + case 'ms': + case 'th': + case 'tr': + case 'vi': + case 'zh': + return 0; + break; + + case 'af': + case 'bn': + case 'bg': + case 'ca': + case 'da': + case 'de': + case 'el': + case 'en': + case 'eo': + case 'es': + case 'et': + case 'eu': + case 'fa': + case 'fi': + case 'fo': + case 'fur': + case 'fy': + case 'gl': + case 'gu': + case 'ha': + case 'he': + case 'hu': + case 'is': + case 'it': + case 'ku': + case 'lb': + case 'ml': + case 'mn': + case 'mr': + case 'nah': + case 'nb': + case 'ne': + case 'nl': + case 'nn': + case 'no': + case 'om': + case 'or': + case 'pa': + case 'pap': + case 'ps': + case 'pt': + case 'so': + case 'sq': + case 'sv': + case 'sw': + case 'ta': + case 'te': + case 'tk': + case 'ur': + case 'zu': + return ($number == 1) ? 0 : 1; + + case 'am': + case 'bh': + case 'fil': + case 'fr': + case 'gun': + case 'hi': + case 'hy': + case 'ln': + case 'mg': + case 'nso': + case 'xbr': + case 'ti': + case 'wa': + return (($number == 0) || ($number == 1)) ? 0 : 1; + + case 'be': + case 'bs': + case 'hr': + case 'ru': + case 'sr': + case 'uk': + return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); + + case 'cs': + case 'sk': + return ($number == 1) ? 0 : ((($number >= 2) && ($number <= 4)) ? 1 : 2); + + case 'ga': + return ($number == 1) ? 0 : (($number == 2) ? 1 : 2); + + case 'lt': + return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); + + case 'sl': + return ($number % 100 == 1) ? 0 : (($number % 100 == 2) ? 1 : ((($number % 100 == 3) || ($number % 100 == 4)) ? 2 : 3)); + + case 'mk': + return ($number % 10 == 1) ? 0 : 1; + + case 'mt': + return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3)); + + case 'lv': + return ($number == 0) ? 0 : ((($number % 10 == 1) && ($number % 100 != 11)) ? 1 : 2); + + case 'pl': + return ($number == 1) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 1 : 2); + + case 'cy': + return ($number == 1) ? 0 : (($number == 2) ? 1 : ((($number == 8) || ($number == 11)) ? 2 : 3)); + + case 'ro': + return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2); + + case 'ar': + return ($number == 0) ? 0 : (($number == 1) ? 1 : (($number == 2) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : 5)))); + + default: + return 0; + } + } + + /** + * Overrides the default plural rule for a given locale. + * + * @param callable $rule A PHP callable + * @param string $locale The locale + */ + public static function set(callable $rule, $locale) + { + if ('pt_BR' === $locale) { + // temporary set a locale for brazilian + $locale = 'xbr'; + } + + if (strlen($locale) > 3) { + $locale = substr($locale, 0, -strlen(strrchr($locale, '_'))); + } + + self::$rules[$locale] = $rule; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/README.md b/vendor/symfony/symfony/src/Symfony/Component/Translation/README.md new file mode 100644 index 0000000000000000000000000000000000000000..46f3d1f2f25e6ee24e4e531546065c677f48511f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/README.md @@ -0,0 +1,13 @@ +Translation Component +===================== + +The Translation component provides tools to internationalize your application. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/translation/index.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/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..90cf4a5dc381ed7203daa71dded03bade0a5f50b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Catalogue; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\MessageCatalogueInterface; + +abstract class AbstractOperationTest extends TestCase +{ + public function testGetEmptyDomains() + { + $this->assertEquals( + array(), + $this->createOperation( + new MessageCatalogue('en'), + new MessageCatalogue('en') + )->getDomains() + ); + } + + public function testGetMergedDomains() + { + $this->assertEquals( + array('a', 'b', 'c'), + $this->createOperation( + new MessageCatalogue('en', array('a' => array(), 'b' => array())), + new MessageCatalogue('en', array('b' => array(), 'c' => array())) + )->getDomains() + ); + } + + public function testGetMessagesFromUnknownDomain() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException'); + $this->createOperation( + new MessageCatalogue('en'), + new MessageCatalogue('en') + )->getMessages('domain'); + } + + public function testGetEmptyMessages() + { + $this->assertEquals( + array(), + $this->createOperation( + new MessageCatalogue('en', array('a' => array())), + new MessageCatalogue('en') + )->getMessages('a') + ); + } + + public function testGetEmptyResult() + { + $this->assertEquals( + new MessageCatalogue('en'), + $this->createOperation( + new MessageCatalogue('en'), + new MessageCatalogue('en') + )->getResult() + ); + } + + abstract protected function createOperation(MessageCatalogueInterface $source, MessageCatalogueInterface $target); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8b51c15daec9210788f1e6d7ba5754664401bd63 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Catalogue; + +use Symfony\Component\Translation\Catalogue\MergeOperation; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\MessageCatalogueInterface; + +class MergeOperationTest extends AbstractOperationTest +{ + public function testGetMessagesFromSingleDomain() + { + $operation = $this->createOperation( + new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), + new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + ); + + $this->assertEquals( + array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'), + $operation->getMessages('messages') + ); + + $this->assertEquals( + array('c' => 'new_c'), + $operation->getNewMessages('messages') + ); + + $this->assertEquals( + array(), + $operation->getObsoleteMessages('messages') + ); + } + + public function testGetResultFromSingleDomain() + { + $this->assertEquals( + new MessageCatalogue('en', array( + 'messages' => array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'), + )), + $this->createOperation( + new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), + new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + )->getResult() + ); + } + + public function testGetResultWithMetadata() + { + $leftCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))); + $leftCatalogue->setMetadata('a', 'foo', 'messages'); + $leftCatalogue->setMetadata('b', 'bar', 'messages'); + $rightCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'new_b', 'c' => 'new_c'))); + $rightCatalogue->setMetadata('b', 'baz', 'messages'); + $rightCatalogue->setMetadata('c', 'qux', 'messages'); + + $mergedCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'))); + $mergedCatalogue->setMetadata('a', 'foo', 'messages'); + $mergedCatalogue->setMetadata('b', 'bar', 'messages'); + $mergedCatalogue->setMetadata('c', 'qux', 'messages'); + + $this->assertEquals( + $mergedCatalogue, + $this->createOperation( + $leftCatalogue, + $rightCatalogue + )->getResult() + ); + } + + protected function createOperation(MessageCatalogueInterface $source, MessageCatalogueInterface $target) + { + return new MergeOperation($source, $target); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/TargetOperationTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/TargetOperationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..271d17fb8f311bc347ca7c52a488f8758389eb5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Catalogue/TargetOperationTest.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Catalogue; + +use Symfony\Component\Translation\Catalogue\TargetOperation; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\MessageCatalogueInterface; + +class TargetOperationTest extends AbstractOperationTest +{ + public function testGetMessagesFromSingleDomain() + { + $operation = $this->createOperation( + new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), + new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + ); + + $this->assertEquals( + array('a' => 'old_a', 'c' => 'new_c'), + $operation->getMessages('messages') + ); + + $this->assertEquals( + array('c' => 'new_c'), + $operation->getNewMessages('messages') + ); + + $this->assertEquals( + array('b' => 'old_b'), + $operation->getObsoleteMessages('messages') + ); + } + + public function testGetResultFromSingleDomain() + { + $this->assertEquals( + new MessageCatalogue('en', array( + 'messages' => array('a' => 'old_a', 'c' => 'new_c'), + )), + $this->createOperation( + new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), + new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + )->getResult() + ); + } + + public function testGetResultWithMetadata() + { + $leftCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))); + $leftCatalogue->setMetadata('a', 'foo', 'messages'); + $leftCatalogue->setMetadata('b', 'bar', 'messages'); + $rightCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'new_b', 'c' => 'new_c'))); + $rightCatalogue->setMetadata('b', 'baz', 'messages'); + $rightCatalogue->setMetadata('c', 'qux', 'messages'); + + $diffCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'old_b', 'c' => 'new_c'))); + $diffCatalogue->setMetadata('b', 'bar', 'messages'); + $diffCatalogue->setMetadata('c', 'qux', 'messages'); + + $this->assertEquals( + $diffCatalogue, + $this->createOperation( + $leftCatalogue, + $rightCatalogue + )->getResult() + ); + } + + protected function createOperation(MessageCatalogueInterface $source, MessageCatalogueInterface $target) + { + return new TargetOperation($source, $target); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8dea492153897de4a137ea17a213566f40bacc30 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php @@ -0,0 +1,152 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\DataCollector; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\DataCollectorTranslator; +use Symfony\Component\Translation\DataCollector\TranslationDataCollector; +use Symfony\Component\VarDumper\Cloner\VarCloner; + +class TranslationDataCollectorTest extends TestCase +{ + protected function setUp() + { + if (!class_exists('Symfony\Component\HttpKernel\DataCollector\DataCollector')) { + $this->markTestSkipped('The "DataCollector" is not available'); + } + } + + public function testCollectEmptyMessages() + { + $translator = $this->getTranslator(); + $translator->expects($this->any())->method('getCollectedMessages')->will($this->returnValue(array())); + + $dataCollector = new TranslationDataCollector($translator); + $dataCollector->lateCollect(); + + $this->assertEquals(0, $dataCollector->getCountMissings()); + $this->assertEquals(0, $dataCollector->getCountFallbacks()); + $this->assertEquals(0, $dataCollector->getCountDefines()); + $this->assertEquals(array(), $dataCollector->getMessages()); + } + + public function testCollect() + { + $cloner = new VarCloner(); + + $collectedMessages = array( + array( + 'id' => 'foo', + 'translation' => 'foo (en)', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_DEFINED, + 'parameters' => array(), + 'transChoiceNumber' => null, + ), + array( + 'id' => 'bar', + 'translation' => 'bar (fr)', + 'locale' => 'fr', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array(), + 'transChoiceNumber' => null, + ), + array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array('%count%' => 3), + 'transChoiceNumber' => 3, + ), + array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array('%count%' => 3), + 'transChoiceNumber' => 3, + ), + array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array('%count%' => 4, '%foo%' => 'bar'), + 'transChoiceNumber' => 4, + ), + ); + $expectedMessages = array( + array( + 'id' => 'foo', + 'translation' => 'foo (en)', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_DEFINED, + 'count' => 1, + 'parameters' => array(), + 'transChoiceNumber' => null, + ), + array( + 'id' => 'bar', + 'translation' => 'bar (fr)', + 'locale' => 'fr', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'count' => 1, + 'parameters' => array(), + 'transChoiceNumber' => null, + ), + array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'count' => 3, + 'parameters' => array( + $cloner->cloneVar(array('%count%' => 3)), + $cloner->cloneVar(array('%count%' => 3)), + $cloner->cloneVar(array('%count%' => 4, '%foo%' => 'bar')), + ), + 'transChoiceNumber' => 3, + ), + ); + + $translator = $this->getTranslator(); + $translator->expects($this->any())->method('getCollectedMessages')->will($this->returnValue($collectedMessages)); + + $dataCollector = new TranslationDataCollector($translator); + $dataCollector->lateCollect(); + + $this->assertEquals(1, $dataCollector->getCountMissings()); + $this->assertEquals(1, $dataCollector->getCountFallbacks()); + $this->assertEquals(1, $dataCollector->getCountDefines()); + $this->assertEquals($expectedMessages, array_values($dataCollector->getMessages())); + } + + private function getTranslator() + { + $translator = $this + ->getMockBuilder('Symfony\Component\Translation\DataCollectorTranslator') + ->disableOriginalConstructor() + ->getMock() + ; + + return $translator; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1b417379c87ae0b53513f86255a4e29f7707778e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.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\Component\Translation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\DataCollectorTranslator; +use Symfony\Component\Translation\Loader\ArrayLoader; + +class DataCollectorTranslatorTest extends TestCase +{ + public function testCollectMessages() + { + $collector = $this->createCollector(); + $collector->setFallbackLocales(array('fr', 'ru')); + + $collector->trans('foo'); + $collector->trans('bar'); + $collector->transChoice('choice', 0); + $collector->trans('bar_ru'); + $collector->trans('bar_ru', array('foo' => 'bar')); + + $expectedMessages = array(); + $expectedMessages[] = array( + 'id' => 'foo', + 'translation' => 'foo (en)', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_DEFINED, + 'parameters' => array(), + 'transChoiceNumber' => null, + ); + $expectedMessages[] = array( + 'id' => 'bar', + 'translation' => 'bar (fr)', + 'locale' => 'fr', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array(), + 'transChoiceNumber' => null, + ); + $expectedMessages[] = array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array(), + 'transChoiceNumber' => 0, + ); + $expectedMessages[] = array( + 'id' => 'bar_ru', + 'translation' => 'bar (ru)', + 'locale' => 'ru', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array(), + 'transChoiceNumber' => null, + ); + $expectedMessages[] = array( + 'id' => 'bar_ru', + 'translation' => 'bar (ru)', + 'locale' => 'ru', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array('foo' => 'bar'), + 'transChoiceNumber' => null, + ); + + $this->assertEquals($expectedMessages, $collector->getCollectedMessages()); + } + + private function createCollector() + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (en)'), 'en'); + $translator->addResource('array', array('bar' => 'bar (fr)'), 'fr'); + $translator->addResource('array', array('bar_ru' => 'bar (ru)'), 'ru'); + + return new DataCollectorTranslator($translator); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..73fe922df0f8a5ed955ba9671c9c3939c167f711 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.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\Translation\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\CsvFileDumper; + +class CsvFileDumperTest extends TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar', 'bar' => 'foo +foo', 'foo;foo' => 'bar')); + + $dumper = new CsvFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/valid.csv', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9ed4c91eca4ccef68fb87bcdeb9387fbcb767fe2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\FileDumper; + +class FileDumperTest extends TestCase +{ + public function testDump() + { + $tempDir = sys_get_temp_dir(); + + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new ConcreteFileDumper(); + $dumper->dump($catalogue, array('path' => $tempDir)); + + $this->assertFileExists($tempDir.'/messages.en.concrete'); + } + + /** + * @group legacy + */ + public function testDumpBackupsFileIfExisting() + { + $tempDir = sys_get_temp_dir(); + $file = $tempDir.'/messages.en.concrete'; + $backupFile = $file.'~'; + + @touch($file); + + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new ConcreteFileDumper(); + $dumper->dump($catalogue, array('path' => $tempDir)); + + $this->assertFileExists($backupFile); + + @unlink($file); + @unlink($backupFile); + } + + public function testDumpCreatesNestedDirectoriesAndFile() + { + $tempDir = sys_get_temp_dir(); + $translationsDir = $tempDir.'/test/translations'; + $file = $translationsDir.'/messages.en.concrete'; + + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new ConcreteFileDumper(); + $dumper->setRelativePathTemplate('test/translations/%domain%.%locale%.%extension%'); + $dumper->dump($catalogue, array('path' => $tempDir)); + + $this->assertFileExists($file); + + @unlink($file); + @rmdir($translationsDir); + } +} + +class ConcreteFileDumper extends FileDumper +{ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + return ''; + } + + protected function getExtension() + { + return 'concrete'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2f19d08dbba74f9c603476d7db0f6d04ce9a7615 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.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\Component\Translation\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\IcuResFileDumper; + +class IcuResFileDumperTest extends TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new IcuResFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resourcebundle/res/en.res', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..72bd9166fa8eaaabde6b149bb79eb062693afc16 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.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\Component\Translation\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\IniFileDumper; + +class IniFileDumperTest extends TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new IniFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.ini', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5e66f718d17eb24436d29ac495c01274505ba8e2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\JsonFileDumper; + +class JsonFileDumperTest extends TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new JsonFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.json', $dumper->formatCatalogue($catalogue, 'messages')); + } + + public function testDumpWithCustomEncoding() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => '"bar"')); + + $dumper = new JsonFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.dump.json', $dumper->formatCatalogue($catalogue, 'messages', array('json_encoding' => JSON_HEX_QUOT))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3a2054f349886710b0db785e88a52fe4a7046f7d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.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\Component\Translation\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\MoFileDumper; + +class MoFileDumperTest extends TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new MoFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.mo', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c2f703542be950a9ad4c3a5e6fa472f5e1b10d07 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.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\Component\Translation\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\PhpFileDumper; + +class PhpFileDumperTest extends TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new PhpFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.php', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b00c5d136894f165405aa3f08f088541ea70aa21 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.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\Component\Translation\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\PoFileDumper; + +class PoFileDumperTest extends TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new PoFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.po', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9213bbaec1a49042ebd211033ceaa2348dc3705c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.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\Component\Translation\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\QtFileDumper; + +class QtFileDumperTest extends TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar'), 'resources'); + + $dumper = new QtFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.ts', $dumper->formatCatalogue($catalogue, 'resources')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5764dff540692aec2b9c411511eb009b6742dea8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\XliffFileDumper; + +class XliffFileDumperTest extends TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array( + 'foo' => 'bar', + 'key' => '', + 'key.with.cdata' => ' & ', + )); + $catalogue->setMetadata('foo', array('notes' => array(array('priority' => 1, 'from' => 'bar', 'content' => 'baz')))); + $catalogue->setMetadata('key', array('notes' => array(array('content' => 'baz'), array('content' => 'qux')))); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-clean.xlf', + $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR')) + ); + } + + public function testFormatCatalogueXliff2() + { + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array( + 'foo' => 'bar', + 'key' => '', + 'key.with.cdata' => ' & ', + )); + $catalogue->setMetadata('key', array('target-attributes' => array('order' => 1))); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-2.0-clean.xlf', + $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR', 'xliff_version' => '2.0')) + ); + } + + public function testFormatCatalogueWithCustomToolInfo() + { + $options = array( + 'default_locale' => 'en_US', + 'tool_info' => array('tool-id' => 'foo', 'tool-name' => 'foo', 'tool-version' => '0.0', 'tool-company' => 'Foo'), + ); + + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-tool-info.xlf', + $dumper->formatCatalogue($catalogue, 'messages', $options) + ); + } + + public function testFormatCatalogueWithTargetAttributesMetadata() + { + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array( + 'foo' => 'bar', + )); + $catalogue->setMetadata('foo', array('target-attributes' => array('state' => 'needs-translation'))); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-target-attributes.xlf', + $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR')) + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0541ac1072fc304f8c073c5bd7922e4156a7a2d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\YamlFileDumper; + +class YamlFileDumperTest extends TestCase +{ + public function testTreeFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add( + array( + 'foo.bar1' => 'value1', + 'foo.bar2' => 'value2', + )); + + $dumper = new YamlFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/messages.yml', $dumper->formatCatalogue($catalogue, 'messages', array('as_tree' => true, 'inline' => 999))); + } + + public function testLinearFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add( + array( + 'foo.bar1' => 'value1', + 'foo.bar2' => 'value2', + )); + + $dumper = new YamlFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/messages_linear.yml', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..78288da40e150b964d5c7a3ce6a370af824fa073 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.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\Component\Translation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Util\IntlTestHelper; +use Symfony\Component\Translation\IdentityTranslator; + +class IdentityTranslatorTest extends TestCase +{ + /** + * @dataProvider getTransTests + */ + public function testTrans($expected, $id, $parameters) + { + $translator = new IdentityTranslator(); + + $this->assertEquals($expected, $translator->trans($id, $parameters)); + } + + /** + * @dataProvider getTransChoiceTests + */ + public function testTransChoiceWithExplicitLocale($expected, $id, $number, $parameters) + { + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + $this->assertEquals($expected, $translator->transChoice($id, $number, $parameters)); + } + + /** + * @dataProvider getTransChoiceTests + */ + public function testTransChoiceWithDefaultLocale($expected, $id, $number, $parameters) + { + \Locale::setDefault('en'); + + $translator = new IdentityTranslator(); + + $this->assertEquals($expected, $translator->transChoice($id, $number, $parameters)); + } + + public function testGetSetLocale() + { + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + $this->assertEquals('en', $translator->getLocale()); + } + + public function testGetLocaleReturnsDefaultLocaleIfNotSet() + { + // in order to test with "pt_BR" + IntlTestHelper::requireFullIntl($this, false); + + $translator = new IdentityTranslator(); + + \Locale::setDefault('en'); + $this->assertEquals('en', $translator->getLocale()); + + \Locale::setDefault('pt_BR'); + $this->assertEquals('pt_BR', $translator->getLocale()); + } + + public function getTransTests() + { + return array( + array('Symfony is great!', 'Symfony is great!', array()), + array('Symfony is awesome!', 'Symfony is %what%!', array('%what%' => 'awesome')), + ); + } + + public function getTransChoiceTests() + { + return array( + array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0, array('%count%' => 0)), + array('There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1, array('%count%' => 1)), + array('There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10, array('%count%' => 10)), + array('There are 0 apples', 'There is 1 apple|There are %count% apples', 0, array('%count%' => 0)), + array('There is 1 apple', 'There is 1 apple|There are %count% apples', 1, array('%count%' => 1)), + array('There are 10 apples', 'There is 1 apple|There are %count% apples', 10, array('%count%' => 10)), + // custom validation messages may be coded with a fixed value + array('There are 2 apples', 'There are 2 apples', 2, array('%count%' => 2)), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IntervalTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IntervalTest.php new file mode 100644 index 0000000000000000000000000000000000000000..99b209a70825d2cac55eb415a88d4499e0a42e4c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/IntervalTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Interval; + +class IntervalTest extends TestCase +{ + /** + * @dataProvider getTests + */ + public function testTest($expected, $number, $interval) + { + $this->assertEquals($expected, Interval::test($number, $interval)); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidArgumentException + */ + public function testTestException() + { + Interval::test(1, 'foobar'); + } + + public function getTests() + { + return array( + array(true, 3, '{1,2, 3 ,4}'), + array(false, 10, '{1,2, 3 ,4}'), + array(false, 3, '[1,2]'), + array(true, 1, '[1,2]'), + array(true, 2, '[1,2]'), + array(false, 1, ']1,2['), + array(false, 2, ']1,2['), + array(true, log(0), '[-Inf,2['), + array(true, -log(0), '[-2,+Inf]'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..27a4456e601fc805f929818c84127c6c9f9b0756 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Loader\CsvFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class CsvFileLoaderTest extends TestCase +{ + public function testLoad() + { + $loader = new CsvFileLoader(); + $resource = __DIR__.'/../fixtures/resources.csv'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadDoesNothingIfEmpty() + { + $loader = new CsvFileLoader(); + $resource = __DIR__.'/../fixtures/empty.csv'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new CsvFileLoader(); + $resource = __DIR__.'/../fixtures/not-exists.csv'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadNonLocalResource() + { + $loader = new CsvFileLoader(); + $resource = 'http://example.com/resources.csv'; + $loader->load($resource, 'en', 'domain1'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..888fb615744efe53e1c56a618d66caceda808d4f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\IcuDatFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +/** + * @requires extension intl + */ +class IcuDatFileLoaderTest extends LocalizedTestCase +{ + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new IcuDatFileLoader(); + $loader->load(__DIR__.'/../fixtures/resourcebundle/corrupted/resources', 'es', 'domain2'); + } + + public function testDatEnglishLoad() + { + // bundled resource is build using pkgdata command which at least in ICU 4.2 comes in extremely! buggy form + // you must specify an temporary build directory which is not the same as current directory and + // MUST reside on the same partition. pkgdata -p resources -T /srv -d.packagelist.txt + $loader = new IcuDatFileLoader(); + $resource = __DIR__.'/../fixtures/resourcebundle/dat/resources'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('symfony' => 'Symfony 2 is great'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource.'.dat')), $catalogue->getResources()); + } + + public function testDatFrenchLoad() + { + $loader = new IcuDatFileLoader(); + $resource = __DIR__.'/../fixtures/resourcebundle/dat/resources'; + $catalogue = $loader->load($resource, 'fr', 'domain1'); + + $this->assertEquals(array('symfony' => 'Symfony 2 est génial'), $catalogue->all('domain1')); + $this->assertEquals('fr', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource.'.dat')), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new IcuDatFileLoader(); + $loader->load(__DIR__.'/../fixtures/non-existing.txt', 'en', 'domain1'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8d9ed19914478302486004861ad049eb161f0bd7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\IcuResFileLoader; +use Symfony\Component\Config\Resource\DirectoryResource; + +/** + * @requires extension intl + */ +class IcuResFileLoaderTest extends LocalizedTestCase +{ + public function testLoad() + { + // resource is build using genrb command + $loader = new IcuResFileLoader(); + $resource = __DIR__.'/../fixtures/resourcebundle/res'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new DirectoryResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new IcuResFileLoader(); + $loader->load(__DIR__.'/../fixtures/non-existing.txt', 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new IcuResFileLoader(); + $loader->load(__DIR__.'/../fixtures/resourcebundle/corrupted', 'en', 'domain1'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dbf22d10347a5bde5374c08a3a8ac3f10817ed86 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Loader\IniFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class IniFileLoaderTest extends TestCase +{ + public function testLoad() + { + $loader = new IniFileLoader(); + $resource = __DIR__.'/../fixtures/resources.ini'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadDoesNothingIfEmpty() + { + $loader = new IniFileLoader(); + $resource = __DIR__.'/../fixtures/empty.ini'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new IniFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.ini'; + $loader->load($resource, 'en', 'domain1'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..46261b666fbba96d5dcd859ffac9273ff938e68c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Loader\JsonFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class JsonFileLoaderTest extends TestCase +{ + public function testLoad() + { + $loader = new JsonFileLoader(); + $resource = __DIR__.'/../fixtures/resources.json'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadDoesNothingIfEmpty() + { + $loader = new JsonFileLoader(); + $resource = __DIR__.'/../fixtures/empty.json'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new JsonFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.json'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + * @expectedExceptionMessage Error parsing JSON - Syntax error, malformed JSON + */ + public function testParseException() + { + $loader = new JsonFileLoader(); + $resource = __DIR__.'/../fixtures/malformed.json'; + $loader->load($resource, 'en', 'domain1'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..a655c69d2e72366415866fce28ea3eaa4fcc55f8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use PHPUnit\Framework\TestCase; + +abstract class LocalizedTestCase extends TestCase +{ + protected function setUp() + { + if (!extension_loaded('intl')) { + $this->markTestSkipped('Extension intl is required.'); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b9f754fcf0da2663a259f63fec11545e2b0a1bb5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Loader\MoFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class MoFileLoaderTest extends TestCase +{ + public function testLoad() + { + $loader = new MoFileLoader(); + $resource = __DIR__.'/../fixtures/resources.mo'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadPlurals() + { + $loader = new MoFileLoader(); + $resource = __DIR__.'/../fixtures/plurals.mo'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar', 'foos' => '{0} bar|{1} bars'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new MoFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.mo'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new MoFileLoader(); + $resource = __DIR__.'/../fixtures/empty.mo'; + $loader->load($resource, 'en', 'domain1'); + } + + public function testLoadEmptyTranslation() + { + $loader = new MoFileLoader(); + $resource = __DIR__.'/../fixtures/empty-translation.mo'; + $catalogue = $loader->load($resource, 'en', 'message'); + + $this->assertEquals(array(), $catalogue->all('message')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9fc83e34f99ada62b7df2ef93e37201ef5df589c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Loader\PhpFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class PhpFileLoaderTest extends TestCase +{ + public function testLoad() + { + $loader = new PhpFileLoader(); + $resource = __DIR__.'/../fixtures/resources.php'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new PhpFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.php'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadThrowsAnExceptionIfFileNotLocal() + { + $loader = new PhpFileLoader(); + $resource = 'http://example.com/resources.php'; + $loader->load($resource, 'en', 'domain1'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..884dec9a65f6651e36c95988f87cc3a5c16a09bc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php @@ -0,0 +1,109 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Loader\PoFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class PoFileLoaderTest extends TestCase +{ + public function testLoad() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/resources.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadPlurals() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/plurals.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar', 'foos' => 'bar|bars'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadDoesNothingIfEmpty() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/empty.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.po'; + $loader->load($resource, 'en', 'domain1'); + } + + public function testLoadEmptyTranslation() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/empty-translation.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => ''), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testEscapedId() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/escaped-id.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $messages = $catalogue->all('domain1'); + $this->assertArrayHasKey('escaped "foo"', $messages); + $this->assertEquals('escaped "bar"', $messages['escaped "foo"']); + } + + public function testEscapedIdPlurals() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/escaped-id-plurals.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $messages = $catalogue->all('domain1'); + $this->assertArrayHasKey('escaped "foo"', $messages); + $this->assertArrayHasKey('escaped "foos"', $messages); + $this->assertEquals('escaped "bar"', $messages['escaped "foo"']); + $this->assertEquals('escaped "bar"|escaped "bars"', $messages['escaped "foos"']); + } + + public function testSkipFuzzyTranslations() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/fuzzy-translations.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $messages = $catalogue->all('domain1'); + $this->assertArrayHasKey('foo1', $messages); + $this->assertArrayNotHasKey('foo2', $messages); + $this->assertArrayHasKey('foo3', $messages); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7ee62b06cbc6acf0085d40455eded8a0bddd8680 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Loader\QtFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class QtFileLoaderTest extends TestCase +{ + public function testLoad() + { + $loader = new QtFileLoader(); + $resource = __DIR__.'/../fixtures/resources.ts'; + $catalogue = $loader->load($resource, 'en', 'resources'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('resources')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new QtFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.ts'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadNonLocalResource() + { + $loader = new QtFileLoader(); + $resource = 'http://domain1.com/resources.ts'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new QtFileLoader(); + $resource = __DIR__.'/../fixtures/invalid-xml-resources.xlf'; + $loader->load($resource, 'en', 'domain1'); + } + + public function testLoadEmptyResource() + { + $loader = new QtFileLoader(); + $resource = __DIR__.'/../fixtures/empty.xlf'; + + if (method_exists($this, 'expectException')) { + $this->expectException('Symfony\Component\Translation\Exception\InvalidResourceException'); + $this->expectExceptionMessage(sprintf('Unable to load "%s".', $resource)); + } else { + $this->setExpectedException('Symfony\Component\Translation\Exception\InvalidResourceException', sprintf('Unable to load "%s".', $resource)); + } + + $loader->load($resource, 'en', 'domain1'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..32351d34e192459752449abdab0cddd882178ecb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php @@ -0,0 +1,191 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Loader\XliffFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class XliffFileLoaderTest extends TestCase +{ + public function testLoad() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/resources.xlf'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertSame(array(), libxml_get_errors()); + $this->assertContainsOnly('string', $catalogue->all('domain1')); + } + + public function testLoadWithInternalErrorsEnabled() + { + $internalErrors = libxml_use_internal_errors(true); + + $this->assertSame(array(), libxml_get_errors()); + + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/resources.xlf'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertSame(array(), libxml_get_errors()); + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + } + + public function testLoadWithExternalEntitiesDisabled() + { + $disableEntities = libxml_disable_entity_loader(true); + + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/resources.xlf'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + libxml_disable_entity_loader($disableEntities); + + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadWithResname() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/resname.xlf', 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar', 'bar' => 'baz', 'baz' => 'foo'), $catalogue->all('domain1')); + } + + public function testIncompleteResource() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/resources.xlf', 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar', 'extra' => 'extra', 'key' => '', 'test' => 'with'), $catalogue->all('domain1')); + } + + public function testEncoding() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/encoding.xlf', 'en', 'domain1'); + + $this->assertEquals(utf8_decode('föö'), $catalogue->get('bar', 'domain1')); + $this->assertEquals(utf8_decode('bär'), $catalogue->get('foo', 'domain1')); + $this->assertEquals(array('notes' => array(array('content' => utf8_decode('bäz'))), 'id' => '1'), $catalogue->getMetadata('foo', 'domain1')); + } + + public function testTargetAttributesAreStoredCorrectly() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/with-attributes.xlf', 'en', 'domain1'); + + $metadata = $catalogue->getMetadata('foo', 'domain1'); + $this->assertEquals('translated', $metadata['target-attributes']['state']); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new XliffFileLoader(); + $loader->load(__DIR__.'/../fixtures/resources.php', 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadResourceDoesNotValidate() + { + $loader = new XliffFileLoader(); + $loader->load(__DIR__.'/../fixtures/non-valid.xlf', 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.xlf'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadThrowsAnExceptionIfFileNotLocal() + { + $loader = new XliffFileLoader(); + $resource = 'http://example.com/resources.xlf'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + * @expectedExceptionMessage Document types are not allowed. + */ + public function testDocTypeIsNotAllowed() + { + $loader = new XliffFileLoader(); + $loader->load(__DIR__.'/../fixtures/withdoctype.xlf', 'en', 'domain1'); + } + + public function testParseEmptyFile() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/empty.xlf'; + + if (method_exists($this, 'expectException')) { + $this->expectException('Symfony\Component\Translation\Exception\InvalidResourceException'); + $this->expectExceptionMessage(sprintf('Unable to load "%s":', $resource)); + } else { + $this->setExpectedException('Symfony\Component\Translation\Exception\InvalidResourceException', sprintf('Unable to load "%s":', $resource)); + } + + $loader->load($resource, 'en', 'domain1'); + } + + public function testLoadNotes() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/withnote.xlf', 'en', 'domain1'); + + $this->assertEquals(array('notes' => array(array('priority' => 1, 'content' => 'foo')), 'id' => '1'), $catalogue->getMetadata('foo', 'domain1')); + // message without target + $this->assertEquals(array('notes' => array(array('content' => 'bar', 'from' => 'foo')), 'id' => '2'), $catalogue->getMetadata('extra', 'domain1')); + // message with empty target + $this->assertEquals(array('notes' => array(array('content' => 'baz'), array('priority' => 2, 'from' => 'bar', 'content' => 'qux')), 'id' => '123'), $catalogue->getMetadata('key', 'domain1')); + } + + public function testLoadVersion2() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/resources-2.0.xlf'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertSame(array(), libxml_get_errors()); + + $domains = $catalogue->all(); + $this->assertCount(3, $domains['domain1']); + $this->assertContainsOnly('string', $catalogue->all('domain1')); + + // target attributes + $this->assertEquals(array('target-attributes' => array('order' => 1)), $catalogue->getMetadata('bar', 'domain1')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e1ba514b3f7517673cb2ace00098b0e8c09302e1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Loader\YamlFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +class YamlFileLoaderTest extends TestCase +{ + public function testLoad() + { + $loader = new YamlFileLoader(); + $resource = __DIR__.'/../fixtures/resources.yml'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadDoesNothingIfEmpty() + { + $loader = new YamlFileLoader(); + $resource = __DIR__.'/../fixtures/empty.yml'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array(), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new YamlFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.yml'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadThrowsAnExceptionIfFileNotLocal() + { + $loader = new YamlFileLoader(); + $resource = 'http://example.com/resources.yml'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadThrowsAnExceptionIfNotAnArray() + { + $loader = new YamlFileLoader(); + $resource = __DIR__.'/../fixtures/non-valid.yml'; + $loader->load($resource, 'en', 'domain1'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..891230a2ded21c7f0a821c41454816bbcdb9f239 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\LoggingTranslator; +use Symfony\Component\Translation\Loader\ArrayLoader; + +class LoggingTranslatorTest extends TestCase +{ + public function testTransWithNoTranslationIsLogged() + { + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger->expects($this->exactly(2)) + ->method('warning') + ->with('Translation not found.') + ; + + $translator = new Translator('ar'); + $loggableTranslator = new LoggingTranslator($translator, $logger); + $loggableTranslator->transChoice('some_message2', 10, array('%count%' => 10)); + $loggableTranslator->trans('bar'); + } + + public function testTransChoiceFallbackIsLogged() + { + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger->expects($this->once()) + ->method('debug') + ->with('Translation use fallback catalogue.') + ; + + $translator = new Translator('ar'); + $translator->setFallbackLocales(array('en')); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en'); + $loggableTranslator = new LoggingTranslator($translator, $logger); + $loggableTranslator->transChoice('some_message2', 10, array('%count%' => 10)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageCatalogueTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageCatalogueTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1ab8246969ca56229bd1d0940621f01332606856 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageCatalogueTest.php @@ -0,0 +1,222 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageCatalogue; + +class MessageCatalogueTest extends TestCase +{ + public function testGetLocale() + { + $catalogue = new MessageCatalogue('en'); + + $this->assertEquals('en', $catalogue->getLocale()); + } + + public function testGetDomains() + { + $catalogue = new MessageCatalogue('en', array('domain1' => array(), 'domain2' => array())); + + $this->assertEquals(array('domain1', 'domain2'), $catalogue->getDomains()); + } + + public function testAll() + { + $catalogue = new MessageCatalogue('en', $messages = array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + + $this->assertEquals(array('foo' => 'foo'), $catalogue->all('domain1')); + $this->assertEquals(array(), $catalogue->all('domain88')); + $this->assertEquals($messages, $catalogue->all()); + } + + public function testHas() + { + $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + + $this->assertTrue($catalogue->has('foo', 'domain1')); + $this->assertFalse($catalogue->has('bar', 'domain1')); + $this->assertFalse($catalogue->has('foo', 'domain88')); + } + + public function testGetSet() + { + $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue->set('foo1', 'foo1', 'domain1'); + + $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); + $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); + } + + public function testAdd() + { + $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue->add(array('foo1' => 'foo1'), 'domain1'); + + $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); + $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); + + $catalogue->add(array('foo' => 'bar'), 'domain1'); + $this->assertEquals('bar', $catalogue->get('foo', 'domain1')); + $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); + + $catalogue->add(array('foo' => 'bar'), 'domain88'); + $this->assertEquals('bar', $catalogue->get('foo', 'domain88')); + } + + public function testReplace() + { + $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue->replace($messages = array('foo1' => 'foo1'), 'domain1'); + + $this->assertEquals($messages, $catalogue->all('domain1')); + } + + public function testAddCatalogue() + { + $r = $this->getMockBuilder('Symfony\Component\Config\Resource\ResourceInterface')->getMock(); + $r->expects($this->any())->method('__toString')->will($this->returnValue('r')); + + $r1 = $this->getMockBuilder('Symfony\Component\Config\Resource\ResourceInterface')->getMock(); + $r1->expects($this->any())->method('__toString')->will($this->returnValue('r1')); + + $catalogue = new MessageCatalogue('en', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue->addResource($r); + + $catalogue1 = new MessageCatalogue('en', array('domain1' => array('foo1' => 'foo1'))); + $catalogue1->addResource($r1); + + $catalogue->addCatalogue($catalogue1); + + $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); + $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); + + $this->assertEquals(array($r, $r1), $catalogue->getResources()); + } + + public function testAddFallbackCatalogue() + { + $r = $this->getMockBuilder('Symfony\Component\Config\Resource\ResourceInterface')->getMock(); + $r->expects($this->any())->method('__toString')->will($this->returnValue('r')); + + $r1 = $this->getMockBuilder('Symfony\Component\Config\Resource\ResourceInterface')->getMock(); + $r1->expects($this->any())->method('__toString')->will($this->returnValue('r1')); + + $r2 = $this->getMockBuilder('Symfony\Component\Config\Resource\ResourceInterface')->getMock(); + $r2->expects($this->any())->method('__toString')->will($this->returnValue('r2')); + + $catalogue = new MessageCatalogue('fr_FR', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); + $catalogue->addResource($r); + + $catalogue1 = new MessageCatalogue('fr', array('domain1' => array('foo' => 'bar', 'foo1' => 'foo1'))); + $catalogue1->addResource($r1); + + $catalogue2 = new MessageCatalogue('en'); + $catalogue2->addResource($r2); + + $catalogue->addFallbackCatalogue($catalogue1); + $catalogue1->addFallbackCatalogue($catalogue2); + + $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); + $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); + + $this->assertEquals(array($r, $r1, $r2), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\LogicException + */ + public function testAddFallbackCatalogueWithParentCircularReference() + { + $main = new MessageCatalogue('en_US'); + $fallback = new MessageCatalogue('fr_FR'); + + $fallback->addFallbackCatalogue($main); + $main->addFallbackCatalogue($fallback); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\LogicException + */ + public function testAddFallbackCatalogueWithFallbackCircularReference() + { + $fr = new MessageCatalogue('fr'); + $en = new MessageCatalogue('en'); + $es = new MessageCatalogue('es'); + + $fr->addFallbackCatalogue($en); + $es->addFallbackCatalogue($en); + $en->addFallbackCatalogue($fr); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\LogicException + */ + public function testAddCatalogueWhenLocaleIsNotTheSameAsTheCurrentOne() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->addCatalogue(new MessageCatalogue('fr', array())); + } + + public function testGetAddResource() + { + $catalogue = new MessageCatalogue('en'); + $r = $this->getMockBuilder('Symfony\Component\Config\Resource\ResourceInterface')->getMock(); + $r->expects($this->any())->method('__toString')->will($this->returnValue('r')); + $catalogue->addResource($r); + $catalogue->addResource($r); + $r1 = $this->getMockBuilder('Symfony\Component\Config\Resource\ResourceInterface')->getMock(); + $r1->expects($this->any())->method('__toString')->will($this->returnValue('r1')); + $catalogue->addResource($r1); + + $this->assertEquals(array($r, $r1), $catalogue->getResources()); + } + + public function testMetadataDelete() + { + $catalogue = new MessageCatalogue('en'); + $this->assertEquals(array(), $catalogue->getMetadata('', ''), 'Metadata is empty'); + $catalogue->deleteMetadata('key', 'messages'); + $catalogue->deleteMetadata('', 'messages'); + $catalogue->deleteMetadata(); + } + + public function testMetadataSetGetDelete() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->setMetadata('key', 'value'); + $this->assertEquals('value', $catalogue->getMetadata('key', 'messages'), "Metadata 'key' = 'value'"); + + $catalogue->setMetadata('key2', array()); + $this->assertEquals(array(), $catalogue->getMetadata('key2', 'messages'), 'Metadata key2 is array'); + + $catalogue->deleteMetadata('key2', 'messages'); + $this->assertNull($catalogue->getMetadata('key2', 'messages'), 'Metadata key2 should is deleted.'); + + $catalogue->deleteMetadata('key2', 'domain'); + $this->assertNull($catalogue->getMetadata('key2', 'domain'), 'Metadata key2 should is deleted.'); + } + + public function testMetadataMerge() + { + $cat1 = new MessageCatalogue('en'); + $cat1->setMetadata('a', 'b'); + $this->assertEquals(array('messages' => array('a' => 'b')), $cat1->getMetadata('', ''), 'Cat1 contains messages metadata.'); + + $cat2 = new MessageCatalogue('en'); + $cat2->setMetadata('b', 'c', 'domain'); + $this->assertEquals(array('domain' => array('b' => 'c')), $cat2->getMetadata('', ''), 'Cat2 contains domain metadata.'); + + $cat1->addCatalogue($cat2); + $this->assertEquals(array('messages' => array('a' => 'b'), 'domain' => array('b' => 'c')), $cat1->getMetadata('', ''), 'Cat1 contains merged metadata.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageSelectorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageSelectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a9b92c5cee5fc1e8aa50e995af37829341df93ee --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/MessageSelectorTest.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\MessageSelector; + +class MessageSelectorTest extends TestCase +{ + /** + * @dataProvider getChooseTests + */ + public function testChoose($expected, $id, $number) + { + $selector = new MessageSelector(); + + $this->assertEquals($expected, $selector->choose($id, $number, 'en')); + } + + public function testReturnMessageIfExactlyOneStandardRuleIsGiven() + { + $selector = new MessageSelector(); + + $this->assertEquals('There are two apples', $selector->choose('There are two apples', 2, 'en')); + } + + /** + * @dataProvider getNonMatchingMessages + * @expectedException \Symfony\Component\Translation\Exception\InvalidArgumentException + */ + public function testThrowExceptionIfMatchingMessageCannotBeFound($id, $number) + { + $selector = new MessageSelector(); + + $selector->choose($id, $number, 'en'); + } + + public function getNonMatchingMessages() + { + return array( + array('{0} There are no apples|{1} There is one apple', 2), + array('{1} There is one apple|]1,Inf] There are %count% apples', 0), + array('{1} There is one apple|]2,Inf] There are %count% apples', 2), + array('{0} There are no apples|There is one apple', 2), + ); + } + + public function getChooseTests() + { + return array( + array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), + array('There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), + array('There are no apples', '{0}There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0), + + array('There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1), + + array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10), + array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf]There are %count% apples', 10), + array('There are %count% apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10), + + array('There are %count% apples', 'There is one apple|There are %count% apples', 0), + array('There is one apple', 'There is one apple|There are %count% apples', 1), + array('There are %count% apples', 'There is one apple|There are %count% apples', 10), + + array('There are %count% apples', 'one: There is one apple|more: There are %count% apples', 0), + array('There is one apple', 'one: There is one apple|more: There are %count% apples', 1), + array('There are %count% apples', 'one: There is one apple|more: There are %count% apples', 10), + + array('There are no apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 0), + array('There is one apple', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 1), + array('There are %count% apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 10), + + array('', '{0}|{1} There is one apple|]1,Inf] There are %count% apples', 0), + array('', '{0} There are no apples|{1}|]1,Inf] There are %count% apples', 1), + + // Indexed only tests which are Gettext PoFile* compatible strings. + array('There are %count% apples', 'There is one apple|There are %count% apples', 0), + array('There is one apple', 'There is one apple|There are %count% apples', 1), + array('There are %count% apples', 'There is one apple|There are %count% apples', 2), + + // Tests for float numbers + array('There is almost one apple', '{0} There are no apples|]0,1[ There is almost one apple|{1} There is one apple|[1,Inf] There is more than one apple', 0.7), + array('There is one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1), + array('There is more than one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1.7), + array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0), + array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0.0), + array('There are no apples', '{0.0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0), + + // Test texts with new-lines + // with double-quotes and \n in id & double-quotes and actual newlines in text + array("This is a text with a\n new-line in it. Selector = 0.", '{0}This is a text with a + new-line in it. Selector = 0.|{1}This is a text with a + new-line in it. Selector = 1.|[1,Inf]This is a text with a + new-line in it. Selector > 1.', 0), + // with double-quotes and \n in id and single-quotes and actual newlines in text + array("This is a text with a\n new-line in it. Selector = 1.", '{0}This is a text with a + new-line in it. Selector = 0.|{1}This is a text with a + new-line in it. Selector = 1.|[1,Inf]This is a text with a + new-line in it. Selector > 1.', 1), + array("This is a text with a\n new-line in it. Selector > 1.", '{0}This is a text with a + new-line in it. Selector = 0.|{1}This is a text with a + new-line in it. Selector = 1.|[1,Inf]This is a text with a + new-line in it. Selector > 1.', 5), + // with double-quotes and id split accros lines + array('This is a text with a + new-line in it. Selector = 1.', '{0}This is a text with a + new-line in it. Selector = 0.|{1}This is a text with a + new-line in it. Selector = 1.|[1,Inf]This is a text with a + new-line in it. Selector > 1.', 1), + // with single-quotes and id split accros lines + array('This is a text with a + new-line in it. Selector > 1.', '{0}This is a text with a + new-line in it. Selector = 0.|{1}This is a text with a + new-line in it. Selector = 1.|[1,Inf]This is a text with a + new-line in it. Selector > 1.', 5), + // with single-quotes and \n in text + array('This is a text with a\nnew-line in it. Selector = 0.', '{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.', 0), + // with double-quotes and id split accros lines + array("This is a text with a\nnew-line in it. Selector = 1.", "{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.", 1), + // esacape pipe + array('This is a text with | in it. Selector = 0.', '{0}This is a text with || in it. Selector = 0.|{1}This is a text with || in it. Selector = 1.', 0), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8e499fd6edace5eb106f53f54d486178d3df98cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\PluralizationRules; + +/** + * Test should cover all languages mentioned on http://translate.sourceforge.net/wiki/l10n/pluralforms + * and Plural forms mentioned on http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms. + * + * See also https://developer.mozilla.org/en/Localization_and_Plurals which mentions 15 rules having a maximum of 6 forms. + * The mozilla code is also interesting to check for. + * + * As mentioned by chx http://drupal.org/node/1273968 we can cover all by testing number from 0 to 199 + * + * The goal to cover all languages is to far fetched so this test case is smaller. + * + * @author Clemens Tolboom clemens@build2be.nl + */ +class PluralizationRulesTest extends TestCase +{ + /** + * We test failed langcode here. + * + * TODO: The languages mentioned in the data provide need to get fixed somehow within PluralizationRules. + * + * @dataProvider failingLangcodes + */ + public function testFailedLangcodes($nplural, $langCodes) + { + $matrix = $this->generateTestData($langCodes); + $this->validateMatrix($nplural, $matrix, false); + } + + /** + * @dataProvider successLangcodes + */ + public function testLangcodes($nplural, $langCodes) + { + $matrix = $this->generateTestData($langCodes); + $this->validateMatrix($nplural, $matrix); + } + + /** + * This array should contain all currently known langcodes. + * + * As it is impossible to have this ever complete we should try as hard as possible to have it almost complete. + * + * @return array + */ + public function successLangcodes() + { + return array( + array('1', array('ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky')), + array('2', array('nl', 'fr', 'en', 'de', 'de_GE', 'hy', 'hy_AM')), + array('3', array('be', 'bs', 'cs', 'hr')), + array('4', array('cy', 'mt', 'sl')), + array('5', array()), + array('6', array('ar')), + ); + } + + /** + * This array should be at least empty within the near future. + * + * This both depends on a complete list trying to add above as understanding + * the plural rules of the current failing languages. + * + * @return array with nplural together with langcodes + */ + public function failingLangcodes() + { + return array( + array('1', array('fa')), + array('2', array('jbo')), + array('3', array('cbs')), + array('4', array('gd', 'kw')), + array('5', array('ga')), + array('6', array()), + ); + } + + /** + * We validate only on the plural coverage. Thus the real rules is not tested. + * + * @param string $nplural plural expected + * @param array $matrix containing langcodes and their plural index values + * @param bool $expectSuccess + */ + protected function validateMatrix($nplural, $matrix, $expectSuccess = true) + { + foreach ($matrix as $langCode => $data) { + $indexes = array_flip($data); + if ($expectSuccess) { + $this->assertEquals($nplural, count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); + } else { + $this->assertNotEquals((int) $nplural, count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); + } + } + } + + protected function generateTestData($langCodes) + { + $matrix = array(); + foreach ($langCodes as $langCode) { + for ($count = 0; $count < 200; ++$count) { + $plural = PluralizationRules::get($count, $langCode); + $matrix[$langCode][$count] = $plural; + } + } + + return $matrix; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5bd0d34e64a639fe9baf310f5058f09c056b25d5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php @@ -0,0 +1,300 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\Resource\SelfCheckingResourceInterface; +use Symfony\Component\Translation\Loader\ArrayLoader; +use Symfony\Component\Translation\Loader\LoaderInterface; +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\MessageCatalogue; + +class TranslatorCacheTest extends TestCase +{ + protected $tmpDir; + + protected function setUp() + { + $this->tmpDir = sys_get_temp_dir().'/sf2_translation'; + $this->deleteTmpDir(); + } + + protected function tearDown() + { + $this->deleteTmpDir(); + } + + protected function deleteTmpDir() + { + if (!file_exists($dir = $this->tmpDir)) { + return; + } + + $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->tmpDir), \RecursiveIteratorIterator::CHILD_FIRST); + foreach ($iterator as $path) { + if (preg_match('#[/\\\\]\.\.?$#', $path->__toString())) { + continue; + } + if ($path->isDir()) { + rmdir($path->__toString()); + } else { + unlink($path->__toString()); + } + } + rmdir($this->tmpDir); + } + + /** + * @dataProvider runForDebugAndProduction + */ + public function testThatACacheIsUsed($debug) + { + $locale = 'any_locale'; + $format = 'some_format'; + $msgid = 'test'; + + // Prime the cache + $translator = new Translator($locale, null, $this->tmpDir, $debug); + $translator->addLoader($format, new ArrayLoader()); + $translator->addResource($format, array($msgid => 'OK'), $locale); + $translator->trans($msgid); + + // Try again and see we get a valid result whilst no loader can be used + $translator = new Translator($locale, null, $this->tmpDir, $debug); + $translator->addLoader($format, $this->createFailingLoader()); + $translator->addResource($format, array($msgid => 'OK'), $locale); + $this->assertEquals('OK', $translator->trans($msgid), '-> caching does not work in '.($debug ? 'debug' : 'production')); + } + + public function testCatalogueIsReloadedWhenResourcesAreNoLongerFresh() + { + /* + * The testThatACacheIsUsed() test showed that we don't need the loader as long as the cache + * is fresh. + * + * Now we add a Resource that is never fresh and make sure that the + * cache is discarded (the loader is called twice). + * + * We need to run this for debug=true only because in production the cache + * will never be revalidated. + */ + + $locale = 'any_locale'; + $format = 'some_format'; + $msgid = 'test'; + + $catalogue = new MessageCatalogue($locale, array()); + $catalogue->addResource(new StaleResource()); // better use a helper class than a mock, because it gets serialized in the cache and re-loaded + + /** @var LoaderInterface|\PHPUnit_Framework_MockObject_MockObject $loader */ + $loader = $this->getMockBuilder('Symfony\Component\Translation\Loader\LoaderInterface')->getMock(); + $loader + ->expects($this->exactly(2)) + ->method('load') + ->will($this->returnValue($catalogue)) + ; + + // 1st pass + $translator = new Translator($locale, null, $this->tmpDir, true); + $translator->addLoader($format, $loader); + $translator->addResource($format, null, $locale); + $translator->trans($msgid); + + // 2nd pass + $translator = new Translator($locale, null, $this->tmpDir, true); + $translator->addLoader($format, $loader); + $translator->addResource($format, null, $locale); + $translator->trans($msgid); + } + + /** + * @dataProvider runForDebugAndProduction + */ + public function testDifferentTranslatorsForSameLocaleDoNotOverwriteEachOthersCache($debug) + { + /* + * Similar to the previous test. After we used the second translator, make + * sure there's still a useable cache for the first one. + */ + + $locale = 'any_locale'; + $format = 'some_format'; + $msgid = 'test'; + + // Create a Translator and prime its cache + $translator = new Translator($locale, null, $this->tmpDir, $debug); + $translator->addLoader($format, new ArrayLoader()); + $translator->addResource($format, array($msgid => 'OK'), $locale); + $translator->trans($msgid); + + // Create another Translator with a different catalogue for the same locale + $translator = new Translator($locale, null, $this->tmpDir, $debug); + $translator->addLoader($format, new ArrayLoader()); + $translator->addResource($format, array($msgid => 'FAIL'), $locale); + $translator->trans($msgid); + + // Now the first translator must still have a useable cache. + $translator = new Translator($locale, null, $this->tmpDir, $debug); + $translator->addLoader($format, $this->createFailingLoader()); + $translator->addResource($format, array($msgid => 'OK'), $locale); + $this->assertEquals('OK', $translator->trans($msgid), '-> the cache was overwritten by another translator instance in '.($debug ? 'debug' : 'production')); + } + + public function testDifferentCacheFilesAreUsedForDifferentSetsOfFallbackLocales() + { + /* + * Because the cache file contains a catalogue including all of its fallback + * catalogues, we must take the set of fallback locales into consideration when + * loading a catalogue from the cache. + */ + $translator = new Translator('a', null, $this->tmpDir); + $translator->setFallbackLocales(array('b')); + + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (a)'), 'a'); + $translator->addResource('array', array('bar' => 'bar (b)'), 'b'); + + $this->assertEquals('bar (b)', $translator->trans('bar')); + + // Remove fallback locale + $translator->setFallbackLocales(array()); + $this->assertEquals('bar', $translator->trans('bar')); + + // Use a fresh translator with no fallback locales, result should be the same + $translator = new Translator('a', null, $this->tmpDir); + + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (a)'), 'a'); + $translator->addResource('array', array('bar' => 'bar (b)'), 'b'); + + $this->assertEquals('bar', $translator->trans('bar')); + } + + public function testPrimaryAndFallbackCataloguesContainTheSameMessagesRegardlessOfCaching() + { + /* + * As a safeguard against potential BC breaks, make sure that primary and fallback + * catalogues (reachable via getFallbackCatalogue()) always contain the full set of + * messages provided by the loader. This must also be the case when these catalogues + * are (internally) read from a cache. + * + * Optimizations inside the translator must not change this behaviour. + */ + + /* + * Create a translator that loads two catalogues for two different locales. + * The catalogues contain distinct sets of messages. + */ + $translator = new Translator('a', null, $this->tmpDir); + $translator->setFallbackLocales(array('b')); + + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (a)'), 'a'); + $translator->addResource('array', array('foo' => 'foo (b)'), 'b'); + $translator->addResource('array', array('bar' => 'bar (b)'), 'b'); + + $catalogue = $translator->getCatalogue('a'); + $this->assertFalse($catalogue->defines('bar')); // Sure, the "a" catalogue does not contain that message. + + $fallback = $catalogue->getFallbackCatalogue(); + $this->assertTrue($fallback->defines('foo')); // "foo" is present in "a" and "b" + + /* + * Now, repeat the same test. + * Behind the scenes, the cache is used. But that should not matter, right? + */ + $translator = new Translator('a', null, $this->tmpDir); + $translator->setFallbackLocales(array('b')); + + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (a)'), 'a'); + $translator->addResource('array', array('foo' => 'foo (b)'), 'b'); + $translator->addResource('array', array('bar' => 'bar (b)'), 'b'); + + $catalogue = $translator->getCatalogue('a'); + $this->assertFalse($catalogue->defines('bar')); + + $fallback = $catalogue->getFallbackCatalogue(); + $this->assertTrue($fallback->defines('foo')); + } + + public function testRefreshCacheWhenResourcesAreNoLongerFresh() + { + $resource = $this->getMockBuilder('Symfony\Component\Config\Resource\SelfCheckingResourceInterface')->getMock(); + $loader = $this->getMockBuilder('Symfony\Component\Translation\Loader\LoaderInterface')->getMock(); + $resource->method('isFresh')->will($this->returnValue(false)); + $loader + ->expects($this->exactly(2)) + ->method('load') + ->will($this->returnValue($this->getCatalogue('fr', array(), array($resource)))); + + // prime the cache + $translator = new Translator('fr', null, $this->tmpDir, true); + $translator->addLoader('loader', $loader); + $translator->addResource('loader', 'foo', 'fr'); + $translator->trans('foo'); + + // prime the cache second time + $translator = new Translator('fr', null, $this->tmpDir, true); + $translator->addLoader('loader', $loader); + $translator->addResource('loader', 'foo', 'fr'); + $translator->trans('foo'); + } + + protected function getCatalogue($locale, $messages, $resources = array()) + { + $catalogue = new MessageCatalogue($locale); + foreach ($messages as $key => $translation) { + $catalogue->set($key, $translation); + } + foreach ($resources as $resource) { + $catalogue->addResource($resource); + } + + return $catalogue; + } + + public function runForDebugAndProduction() + { + return array(array(true), array(false)); + } + + /** + * @return LoaderInterface + */ + private function createFailingLoader() + { + $loader = $this->getMockBuilder('Symfony\Component\Translation\Loader\LoaderInterface')->getMock(); + $loader + ->expects($this->never()) + ->method('load'); + + return $loader; + } +} + +class StaleResource implements SelfCheckingResourceInterface +{ + public function isFresh($timestamp) + { + return false; + } + + public function getResource() + { + } + + public function __toString() + { + return ''; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..25db5752c0e71392814c0fdcaac35409c95aa901 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/TranslatorTest.php @@ -0,0 +1,547 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\MessageSelector; +use Symfony\Component\Translation\Loader\ArrayLoader; +use Symfony\Component\Translation\MessageCatalogue; + +class TranslatorTest extends TestCase +{ + /** + * @dataProvider getInvalidLocalesTests + * @expectedException \Symfony\Component\Translation\Exception\InvalidArgumentException + */ + public function testConstructorInvalidLocale($locale) + { + $translator = new Translator($locale, new MessageSelector()); + } + + /** + * @dataProvider getValidLocalesTests + */ + public function testConstructorValidLocale($locale) + { + $translator = new Translator($locale, new MessageSelector()); + + $this->assertEquals($locale, $translator->getLocale()); + } + + public function testConstructorWithoutLocale() + { + $translator = new Translator(null, new MessageSelector()); + + $this->assertNull($translator->getLocale()); + } + + public function testSetGetLocale() + { + $translator = new Translator('en'); + + $this->assertEquals('en', $translator->getLocale()); + + $translator->setLocale('fr'); + $this->assertEquals('fr', $translator->getLocale()); + } + + /** + * @dataProvider getInvalidLocalesTests + * @expectedException \Symfony\Component\Translation\Exception\InvalidArgumentException + */ + public function testSetInvalidLocale($locale) + { + $translator = new Translator('fr', new MessageSelector()); + $translator->setLocale($locale); + } + + /** + * @dataProvider getValidLocalesTests + */ + public function testSetValidLocale($locale) + { + $translator = new Translator($locale, new MessageSelector()); + $translator->setLocale($locale); + + $this->assertEquals($locale, $translator->getLocale()); + } + + public function testGetCatalogue() + { + $translator = new Translator('en'); + + $this->assertEquals(new MessageCatalogue('en'), $translator->getCatalogue()); + + $translator->setLocale('fr'); + $this->assertEquals(new MessageCatalogue('fr'), $translator->getCatalogue('fr')); + } + + public function testGetCatalogueReturnsConsolidatedCatalogue() + { + /* + * This will be useful once we refactor so that different domains will be loaded lazily (on-demand). + * In that case, getCatalogue() will probably have to load all missing domains in order to return + * one complete catalogue. + */ + + $locale = 'whatever'; + $translator = new Translator($locale); + $translator->addLoader('loader-a', new ArrayLoader()); + $translator->addLoader('loader-b', new ArrayLoader()); + $translator->addResource('loader-a', array('foo' => 'foofoo'), $locale, 'domain-a'); + $translator->addResource('loader-b', array('bar' => 'foobar'), $locale, 'domain-b'); + + /* + * Test that we get a single catalogue comprising messages + * from different loaders and different domains + */ + $catalogue = $translator->getCatalogue($locale); + $this->assertTrue($catalogue->defines('foo', 'domain-a')); + $this->assertTrue($catalogue->defines('bar', 'domain-b')); + } + + public function testSetFallbackLocales() + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + $translator->addResource('array', array('bar' => 'foobar'), 'fr'); + + // force catalogue loading + $translator->trans('bar'); + + $translator->setFallbackLocales(array('fr')); + $this->assertEquals('foobar', $translator->trans('bar')); + } + + public function testSetFallbackLocalesMultiple() + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (en)'), 'en'); + $translator->addResource('array', array('bar' => 'bar (fr)'), 'fr'); + + // force catalogue loading + $translator->trans('bar'); + + $translator->setFallbackLocales(array('fr_FR', 'fr')); + $this->assertEquals('bar (fr)', $translator->trans('bar')); + } + + /** + * @dataProvider getInvalidLocalesTests + * @expectedException \Symfony\Component\Translation\Exception\InvalidArgumentException + */ + public function testSetFallbackInvalidLocales($locale) + { + $translator = new Translator('fr', new MessageSelector()); + $translator->setFallbackLocales(array('fr', $locale)); + } + + /** + * @dataProvider getValidLocalesTests + */ + public function testSetFallbackValidLocales($locale) + { + $translator = new Translator($locale, new MessageSelector()); + $translator->setFallbackLocales(array('fr', $locale)); + // no assertion. this method just asserts that no exception is thrown + } + + public function testTransWithFallbackLocale() + { + $translator = new Translator('fr_FR'); + $translator->setFallbackLocales(array('en')); + + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('bar' => 'foobar'), 'en'); + + $this->assertEquals('foobar', $translator->trans('bar')); + } + + /** + * @dataProvider getInvalidLocalesTests + * @expectedException \Symfony\Component\Translation\Exception\InvalidArgumentException + */ + public function testAddResourceInvalidLocales($locale) + { + $translator = new Translator('fr', new MessageSelector()); + $translator->addResource('array', array('foo' => 'foofoo'), $locale); + } + + /** + * @dataProvider getValidLocalesTests + */ + public function testAddResourceValidLocales($locale) + { + $translator = new Translator('fr', new MessageSelector()); + $translator->addResource('array', array('foo' => 'foofoo'), $locale); + // no assertion. this method just asserts that no exception is thrown + } + + public function testAddResourceAfterTrans() + { + $translator = new Translator('fr'); + $translator->addLoader('array', new ArrayLoader()); + + $translator->setFallbackLocales(array('en')); + + $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + $this->assertEquals('foofoo', $translator->trans('foo')); + + $translator->addResource('array', array('bar' => 'foobar'), 'en'); + $this->assertEquals('foobar', $translator->trans('bar')); + } + + /** + * @dataProvider getTransFileTests + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testTransWithoutFallbackLocaleFile($format, $loader) + { + $loaderClass = 'Symfony\\Component\\Translation\\Loader\\'.$loader; + $translator = new Translator('en'); + $translator->addLoader($format, new $loaderClass()); + $translator->addResource($format, __DIR__.'/fixtures/non-existing', 'en'); + $translator->addResource($format, __DIR__.'/fixtures/resources.'.$format, 'en'); + + // force catalogue loading + $translator->trans('foo'); + } + + /** + * @dataProvider getTransFileTests + */ + public function testTransWithFallbackLocaleFile($format, $loader) + { + $loaderClass = 'Symfony\\Component\\Translation\\Loader\\'.$loader; + $translator = new Translator('en_GB'); + $translator->addLoader($format, new $loaderClass()); + $translator->addResource($format, __DIR__.'/fixtures/non-existing', 'en_GB'); + $translator->addResource($format, __DIR__.'/fixtures/resources.'.$format, 'en', 'resources'); + + $this->assertEquals('bar', $translator->trans('foo', array(), 'resources')); + } + + public function testTransWithFallbackLocaleBis() + { + $translator = new Translator('en_US'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foofoo'), 'en_US'); + $translator->addResource('array', array('bar' => 'foobar'), 'en'); + $this->assertEquals('foobar', $translator->trans('bar')); + } + + public function testTransWithFallbackLocaleTer() + { + $translator = new Translator('fr_FR'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (en_US)'), 'en_US'); + $translator->addResource('array', array('bar' => 'bar (en)'), 'en'); + + $translator->setFallbackLocales(array('en_US', 'en')); + + $this->assertEquals('foo (en_US)', $translator->trans('foo')); + $this->assertEquals('bar (en)', $translator->trans('bar')); + } + + public function testTransNonExistentWithFallback() + { + $translator = new Translator('fr'); + $translator->setFallbackLocales(array('en')); + $translator->addLoader('array', new ArrayLoader()); + $this->assertEquals('non-existent', $translator->trans('non-existent')); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\RuntimeException + */ + public function testWhenAResourceHasNoRegisteredLoader() + { + $translator = new Translator('en'); + $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + + $translator->trans('foo'); + } + + public function testNestedFallbackCatalogueWhenUsingMultipleLocales() + { + $translator = new Translator('fr'); + $translator->setFallbackLocales(array('ru', 'en')); + + $translator->getCatalogue('fr'); + + $this->assertNotNull($translator->getCatalogue('ru')->getFallbackCatalogue()); + } + + public function testFallbackCatalogueResources() + { + $translator = new Translator('en_GB', new MessageSelector()); + $translator->addLoader('yml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); + $translator->addResource('yml', __DIR__.'/fixtures/empty.yml', 'en_GB'); + $translator->addResource('yml', __DIR__.'/fixtures/resources.yml', 'en'); + + // force catalogue loading + $this->assertEquals('bar', $translator->trans('foo', array())); + + $resources = $translator->getCatalogue('en')->getResources(); + $this->assertCount(1, $resources); + $this->assertContains(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'resources.yml', $resources); + + $resources = $translator->getCatalogue('en_GB')->getResources(); + $this->assertCount(2, $resources); + $this->assertContains(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'empty.yml', $resources); + $this->assertContains(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'resources.yml', $resources); + } + + /** + * @dataProvider getTransTests + */ + public function testTrans($expected, $id, $translation, $parameters, $locale, $domain) + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array((string) $id => $translation), $locale, $domain); + + $this->assertEquals($expected, $translator->trans($id, $parameters, $domain, $locale)); + } + + /** + * @dataProvider getInvalidLocalesTests + * @expectedException \Symfony\Component\Translation\Exception\InvalidArgumentException + */ + public function testTransInvalidLocale($locale) + { + $translator = new Translator('en', new MessageSelector()); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + + $translator->trans('foo', array(), '', $locale); + } + + /** + * @dataProvider getValidLocalesTests + */ + public function testTransValidLocale($locale) + { + $translator = new Translator($locale, new MessageSelector()); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('test' => 'OK'), $locale); + + $this->assertEquals('OK', $translator->trans('test')); + $this->assertEquals('OK', $translator->trans('test', array(), null, $locale)); + } + + /** + * @dataProvider getFlattenedTransTests + */ + public function testFlattenedTrans($expected, $messages, $id) + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', $messages, 'fr', ''); + + $this->assertEquals($expected, $translator->trans($id, array(), '', 'fr')); + } + + /** + * @dataProvider getTransChoiceTests + */ + public function testTransChoice($expected, $id, $translation, $number, $parameters, $locale, $domain) + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array((string) $id => $translation), $locale, $domain); + + $this->assertEquals($expected, $translator->transChoice($id, $number, $parameters, $domain, $locale)); + } + + /** + * @dataProvider getInvalidLocalesTests + * @expectedException \Symfony\Component\Translation\Exception\InvalidArgumentException + */ + public function testTransChoiceInvalidLocale($locale) + { + $translator = new Translator('en', new MessageSelector()); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + + $translator->transChoice('foo', 1, array(), '', $locale); + } + + /** + * @dataProvider getValidLocalesTests + */ + public function testTransChoiceValidLocale($locale) + { + $translator = new Translator('en', new MessageSelector()); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foofoo'), 'en'); + + $translator->transChoice('foo', 1, array(), '', $locale); + // no assertion. this method just asserts that no exception is thrown + } + + public function getTransFileTests() + { + return array( + array('csv', 'CsvFileLoader'), + array('ini', 'IniFileLoader'), + array('mo', 'MoFileLoader'), + array('po', 'PoFileLoader'), + array('php', 'PhpFileLoader'), + array('ts', 'QtFileLoader'), + array('xlf', 'XliffFileLoader'), + array('yml', 'YamlFileLoader'), + array('json', 'JsonFileLoader'), + ); + } + + public function getTransTests() + { + return array( + array('Symfony est super !', 'Symfony is great!', 'Symfony est super !', array(), 'fr', ''), + array('Symfony est awesome !', 'Symfony is %what%!', 'Symfony est %what% !', array('%what%' => 'awesome'), 'fr', ''), + array('Symfony est super !', new StringClass('Symfony is great!'), 'Symfony est super !', array(), 'fr', ''), + ); + } + + public function getFlattenedTransTests() + { + $messages = array( + 'symfony' => array( + 'is' => array( + 'great' => 'Symfony est super!', + ), + ), + 'foo' => array( + 'bar' => array( + 'baz' => 'Foo Bar Baz', + ), + 'baz' => 'Foo Baz', + ), + ); + + return array( + array('Symfony est super!', $messages, 'symfony.is.great'), + array('Foo Bar Baz', $messages, 'foo.bar.baz'), + array('Foo Baz', $messages, 'foo.baz'), + ); + } + + public function getTransChoiceTests() + { + return array( + array('Il y a 0 pomme', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array(), 'fr', ''), + array('Il y a 1 pomme', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 1, array(), 'fr', ''), + array('Il y a 10 pommes', '{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 10, array(), 'fr', ''), + + array('Il y a 0 pomme', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 0, array(), 'fr', ''), + array('Il y a 1 pomme', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 1, array(), 'fr', ''), + array('Il y a 10 pommes', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 10, array(), 'fr', ''), + + array('Il y a 0 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array(), 'fr', ''), + array('Il y a 1 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array(), 'fr', ''), + array('Il y a 10 pommes', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array(), 'fr', ''), + + array('Il n\'y a aucune pomme', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array(), 'fr', ''), + array('Il y a 1 pomme', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array(), 'fr', ''), + array('Il y a 10 pommes', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array(), 'fr', ''), + + array('Il y a 0 pomme', new StringClass('{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples'), '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array(), 'fr', ''), + + // Override %count% with a custom value + array('Il y a quelques pommes', 'one: There is one apple|more: There are %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 2, array('%count%' => 'quelques'), 'fr', ''), + ); + } + + public function getInvalidLocalesTests() + { + return array( + array('fr FR'), + array('français'), + array('fr+en'), + array('utf#8'), + array('fr&en'), + array('fr~FR'), + array(' fr'), + array('fr '), + array('fr*'), + array('fr/FR'), + array('fr\\FR'), + ); + } + + public function getValidLocalesTests() + { + return array( + array(''), + array(null), + array('fr'), + array('francais'), + array('FR'), + array('frFR'), + array('fr-FR'), + array('fr_FR'), + array('fr.FR'), + array('fr-FR.UTF8'), + array('sr@latin'), + ); + } + + public function testTransChoiceFallback() + { + $translator = new Translator('ru'); + $translator->setFallbackLocales(array('en')); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en'); + + $this->assertEquals('10 things', $translator->transChoice('some_message2', 10, array('%count%' => 10))); + } + + public function testTransChoiceFallbackBis() + { + $translator = new Translator('ru'); + $translator->setFallbackLocales(array('en_US', 'en')); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('some_message2' => 'one thing|%count% things'), 'en_US'); + + $this->assertEquals('10 things', $translator->transChoice('some_message2', 10, array('%count%' => 10))); + } + + public function testTransChoiceFallbackWithNoTranslation() + { + $translator = new Translator('ru'); + $translator->setFallbackLocales(array('en')); + $translator->addLoader('array', new ArrayLoader()); + + // consistent behavior with Translator::trans(), which returns the string + // unchanged if it can't be found + $this->assertEquals('some_message2', $translator->transChoice('some_message2', 10, array('%count%' => 10))); + } +} + +class StringClass +{ + protected $str; + + public function __construct($str) + { + $this->str = $str; + } + + public function __toString() + { + return $this->str; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dbb5424f1c69c078c78c4f092223a437f67c1813 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Util\ArrayConverter; + +class ArrayConverterTest extends TestCase +{ + /** + * @dataProvider messagesData + */ + public function testDump($input, $expectedOutput) + { + $this->assertEquals($expectedOutput, ArrayConverter::expandToTree($input)); + } + + public function messagesData() + { + return array( + array( + // input + array( + 'foo1' => 'bar', + 'foo.bar' => 'value', + ), + // expected output + array( + 'foo1' => 'bar', + 'foo' => array('bar' => 'value'), + ), + ), + array( + // input + array( + 'foo.bar' => 'value1', + 'foo.bar.test' => 'value2', + ), + // expected output + array( + 'foo' => array( + 'bar' => 'value1', + 'bar.test' => 'value2', + ), + ), + ), + array( + // input + array( + 'foo.level2.level3.level4' => 'value1', + 'foo.level2' => 'value2', + 'foo.bar' => 'value3', + ), + // expected output + array( + 'foo' => array( + 'level2' => 'value2', + 'level2.level3.level4' => 'value1', + 'bar' => 'value3', + ), + ), + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2d2aec7c8a054cb623a37e271acc756c3474cf47 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Writer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Dumper\DumperInterface; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Writer\TranslationWriter; + +class TranslationWriterTest extends TestCase +{ + public function testWriteTranslations() + { + $dumper = $this->getMockBuilder('Symfony\Component\Translation\Dumper\DumperInterface')->getMock(); + $dumper + ->expects($this->once()) + ->method('dump'); + + $writer = new TranslationWriter(); + $writer->addDumper('test', $dumper); + $writer->writeTranslations(new MessageCatalogue(array()), 'test'); + } + + public function testDisableBackup() + { + $nonBackupDumper = new NonBackupDumper(); + $backupDumper = new BackupDumper(); + + $writer = new TranslationWriter(); + $writer->addDumper('non_backup', $nonBackupDumper); + $writer->addDumper('backup', $backupDumper); + $writer->disableBackup(); + + $this->assertFalse($backupDumper->backup, 'backup can be disabled if setBackup() method does exist'); + } +} + +class NonBackupDumper implements DumperInterface +{ + public function dump(MessageCatalogue $messages, $options = array()) + { + } +} + +class BackupDumper implements DumperInterface +{ + public $backup = true; + + public function dump(MessageCatalogue $messages, $options = array()) + { + } + + public function setBackup($backup) + { + $this->backup = $backup; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty-translation.mo b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty-translation.mo new file mode 100644 index 0000000000000000000000000000000000000000..ed01000c9b1b3fdf40fc2369a7799e72e41a1edf Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty-translation.mo differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty-translation.po b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty-translation.po new file mode 100644 index 0000000000000000000000000000000000000000..ff6f22afb1c98ce736da5876cdb7dcbbb3219417 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty-translation.po @@ -0,0 +1,3 @@ +msgid "foo" +msgstr "" + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.csv b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.csv new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.ini b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.ini new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.json b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.json new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.mo b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.mo new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.po b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.po new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.xlf new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.yml b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/empty.yml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/encoding.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/encoding.xlf new file mode 100644 index 0000000000000000000000000000000000000000..0a88f9265052e53c6cc080ce040660e8e20b331a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/encoding.xlf @@ -0,0 +1,16 @@ + + + + + + foo + bär + bäz + + + bar + föö + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/escaped-id-plurals.po b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/escaped-id-plurals.po new file mode 100644 index 0000000000000000000000000000000000000000..c412aa26ec89c9a7a5cc5da72e10d68158c9145d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/escaped-id-plurals.po @@ -0,0 +1,10 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" + +msgid "escaped \"foo\"" +msgid_plural "escaped \"foos\"" +msgstr[0] "escaped \"bar\"" +msgstr[1] "escaped \"bars\"" diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/escaped-id.po b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/escaped-id.po new file mode 100644 index 0000000000000000000000000000000000000000..308eadd92659e0faad84c40cf3e254e48ad77538 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/escaped-id.po @@ -0,0 +1,8 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" + +msgid "escaped \"foo\"" +msgstr "escaped \"bar\"" diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/fuzzy-translations.po b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/fuzzy-translations.po new file mode 100644 index 0000000000000000000000000000000000000000..04d4047aa4d1eebc1c2de89e70052640fe9d7905 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/fuzzy-translations.po @@ -0,0 +1,10 @@ +#, php-format +msgid "foo1" +msgstr "bar1" + +#, fuzzy, php-format +msgid "foo2" +msgstr "fuzzy bar2" + +msgid "foo3" +msgstr "bar3" diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/invalid-xml-resources.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/invalid-xml-resources.xlf new file mode 100644 index 0000000000000000000000000000000000000000..7bf6c98ba3309950f94204558750a1ac27dc83fe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/invalid-xml-resources.xlf @@ -0,0 +1,23 @@ + + + + + + foo + bar + + + extra + + + key + + + + test + with + note + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/malformed.json b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/malformed.json new file mode 100644 index 0000000000000000000000000000000000000000..4563ec6da8d9fe2357bd7cf6a3d9524ec629ff8f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/malformed.json @@ -0,0 +1,3 @@ +{ + "foo" "bar" +} \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/messages.yml b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/messages.yml new file mode 100644 index 0000000000000000000000000000000000000000..d4f82d78106a96d3250fbd35fa477754660d5333 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/messages.yml @@ -0,0 +1,3 @@ +foo: + bar1: value1 + bar2: value2 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/messages_linear.yml b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/messages_linear.yml new file mode 100644 index 0000000000000000000000000000000000000000..6c1687d0a36987a69800c9ad72256c0a35bb400a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/messages_linear.yml @@ -0,0 +1,2 @@ +foo.bar1: value1 +foo.bar2: value2 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/non-valid.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/non-valid.xlf new file mode 100644 index 0000000000000000000000000000000000000000..734fc97e413c736c14f2dca3aed47ad780fde20e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/non-valid.xlf @@ -0,0 +1,11 @@ + + + + + + foo + bar + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/non-valid.yml b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/non-valid.yml new file mode 100644 index 0000000000000000000000000000000000000000..257cc5642cb1a054f08cc83f2d943e56fd3ebe99 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/non-valid.yml @@ -0,0 +1 @@ +foo diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/plurals.mo b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/plurals.mo new file mode 100644 index 0000000000000000000000000000000000000000..6445e77beab595289cd154ea253c4e49dfd6af47 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/plurals.mo differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/plurals.po b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/plurals.po new file mode 100644 index 0000000000000000000000000000000000000000..439c41ad7fef4bc29f09cb011c01e15e54b1c778 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/plurals.po @@ -0,0 +1,5 @@ +msgid "foo" +msgid_plural "foos" +msgstr[0] "bar" +msgstr[1] "bars" + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resname.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resname.xlf new file mode 100644 index 0000000000000000000000000000000000000000..2df16af942f4348158a46090268b9b8a4631413d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resname.xlf @@ -0,0 +1,19 @@ + + + + + + + bar + + + bar source + baz + + + baz + foo + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/corrupted/resources.dat b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/corrupted/resources.dat new file mode 100644 index 0000000000000000000000000000000000000000..391250caa0ad639a4ff3420607b7cef8241a15ae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/corrupted/resources.dat @@ -0,0 +1 @@ +XXX \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.res b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.res new file mode 100644 index 0000000000000000000000000000000000000000..1fc1436d6641b7290ad5d9f4d331111e4a0419dd Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.res differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt new file mode 100644 index 0000000000000000000000000000000000000000..3d9e9eae1c95686295064d6859ffbfd9b84fd49e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt @@ -0,0 +1,3 @@ +en{ + symfony{"Symfony is great"} +} \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.res b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.res new file mode 100644 index 0000000000000000000000000000000000000000..f58416094be89f5fb64f78f6c3b873c6458696d0 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.res differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt new file mode 100644 index 0000000000000000000000000000000000000000..182d0a0de3f7e6e9c6a0561d640d013f2d3b8502 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt @@ -0,0 +1,3 @@ +fr{ + symfony{"Symfony est génial"} +} \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/packagelist.txt b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/packagelist.txt new file mode 100644 index 0000000000000000000000000000000000000000..c5783ed4315abfd9186c4c5c4459c283de0b5f07 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/packagelist.txt @@ -0,0 +1,2 @@ +en.res +fr.res diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/resources.dat b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/resources.dat new file mode 100644 index 0000000000000000000000000000000000000000..563b0eaef2e5a0a6e9623bf7b93b44beb0a7dc27 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/resources.dat differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/res/en.res b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/res/en.res new file mode 100644 index 0000000000000000000000000000000000000000..ad894a92be2d5392136de413bc2cb5ea8a94bfb1 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/res/en.res differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-2.0-clean.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-2.0-clean.xlf new file mode 100644 index 0000000000000000000000000000000000000000..2efa155e6561fc30701042b1995ca966ab8aaa56 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-2.0-clean.xlf @@ -0,0 +1,23 @@ + + + + + + foo + bar + + + + + key + + + + + + key.with.cdata + & ]]> + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-2.0.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-2.0.xlf new file mode 100644 index 0000000000000000000000000000000000000000..166172a84d184ccb931119f5126c839e9e54468b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-2.0.xlf @@ -0,0 +1,25 @@ + + + + + + Quetzal + Quetzal + + + + + + foo + XLIFF 文書を編集ã€ã¾ãŸã¯å‡¦ç† ã™ã‚‹ã‚¢ãƒ—リケーションã§ã™ã€‚ + + + + + bar + XLIFF データ・マãƒãƒ¼ã‚¸ãƒ£ + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-clean.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-clean.xlf new file mode 100644 index 0000000000000000000000000000000000000000..436e19ec98bebbd895b8e1f3bc2a75465efb17a4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-clean.xlf @@ -0,0 +1,25 @@ + + + +
    + +
    + + + foo + bar + baz + + + key + + baz + qux + + + key.with.cdata + & ]]> + + +
    +
    diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-target-attributes.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-target-attributes.xlf new file mode 100644 index 0000000000000000000000000000000000000000..e3afb498b76b4d8ae3d164139c2599364e6316c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-target-attributes.xlf @@ -0,0 +1,14 @@ + + + +
    + +
    + + + foo + bar + + +
    +
    diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-tool-info.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-tool-info.xlf new file mode 100644 index 0000000000000000000000000000000000000000..1ed06d2ac427befd755ed2c6d0fb1a0a338a73e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources-tool-info.xlf @@ -0,0 +1,14 @@ + + + +
    + +
    + + + foo + bar + + +
    +
    diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.csv b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.csv new file mode 100644 index 0000000000000000000000000000000000000000..374b9eb5eb68e8f20ee26def7ea8bbf9c18ebd0f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.csv @@ -0,0 +1,4 @@ +"foo"; "bar" +#"bar"; "foo" +"incorrect"; "number"; "columns"; "will"; "be"; "ignored" +"incorrect" \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.dump.json b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.dump.json new file mode 100644 index 0000000000000000000000000000000000000000..335965d592cab2b7ab96bb140610736aedb13fe7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.dump.json @@ -0,0 +1 @@ +{"foo":"\u0022bar\u0022"} \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.ini b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.ini new file mode 100644 index 0000000000000000000000000000000000000000..4953062e69e5d3ba43f30765783621197fa45529 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.ini @@ -0,0 +1 @@ +foo="bar" diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.json b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.json new file mode 100644 index 0000000000000000000000000000000000000000..8a79687628fe86b467ec0e87e7e155c4661caa4f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.json @@ -0,0 +1,3 @@ +{ + "foo": "bar" +} \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.mo b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.mo new file mode 100644 index 0000000000000000000000000000000000000000..0a9660257c07afef243a011d9806d6217e4f1379 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.mo differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.php new file mode 100644 index 0000000000000000000000000000000000000000..c2913985391cb6d33df2ccadc187876b516d310d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.php @@ -0,0 +1,5 @@ + 'bar', +); diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.po b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.po new file mode 100644 index 0000000000000000000000000000000000000000..ccfce6bb98d466a78252d2d0b420213d213c495c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.po @@ -0,0 +1,8 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" + +msgid "foo" +msgstr "bar" \ No newline at end of file diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.ts b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.ts new file mode 100644 index 0000000000000000000000000000000000000000..40e18522c85b61912b25b052d061c957b8cc2336 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.ts @@ -0,0 +1,10 @@ + + + + resources + + foo + bar + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.xlf new file mode 100644 index 0000000000000000000000000000000000000000..b0e59880f889414f3734de99c19d5abbc6c67ecd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.xlf @@ -0,0 +1,23 @@ + + + + + + foo + bar + + + extra + + + key + + + + test + with + note + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.yml b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.yml new file mode 100644 index 0000000000000000000000000000000000000000..20e9ff3feaa8ede30f707e5f1b4356e3c02bb7ec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/resources.yml @@ -0,0 +1 @@ +foo: bar diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/valid.csv b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/valid.csv new file mode 100644 index 0000000000000000000000000000000000000000..59882e5da4d94c9643a3d8680154ce6981c9a977 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/valid.csv @@ -0,0 +1,4 @@ +foo;bar +bar;"foo +foo" +"foo;foo";bar diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/with-attributes.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/with-attributes.xlf new file mode 100644 index 0000000000000000000000000000000000000000..78730629cdc4743d58a395417c2c46a3a885e85c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/with-attributes.xlf @@ -0,0 +1,21 @@ + + + + + + foo + bar + + + extra + bar + + + key + + baz + qux + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/withdoctype.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/withdoctype.xlf new file mode 100644 index 0000000000000000000000000000000000000000..f83e834ddc4772f66498c0cb44262708f683d2b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/withdoctype.xlf @@ -0,0 +1,12 @@ + + + + + + + foo + bar + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/withnote.xlf b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/withnote.xlf new file mode 100644 index 0000000000000000000000000000000000000000..c045e21e232a2e49c5d776aa170e53a61ac2f9a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Tests/fixtures/withnote.xlf @@ -0,0 +1,22 @@ + + + + + + foo + bar + foo + + + extra + bar + + + key + + baz + qux + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Translator.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Translator.php new file mode 100644 index 0000000000000000000000000000000000000000..a2af7fb44ecc9c55f4831922e6054f27452eb5d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Translator.php @@ -0,0 +1,447 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Symfony\Component\Translation\Loader\LoaderInterface; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Translation\Exception\InvalidArgumentException; +use Symfony\Component\Translation\Exception\RuntimeException; +use Symfony\Component\Config\ConfigCacheInterface; +use Symfony\Component\Config\ConfigCacheFactoryInterface; +use Symfony\Component\Config\ConfigCacheFactory; + +/** + * Translator. + * + * @author Fabien Potencier + */ +class Translator implements TranslatorInterface, TranslatorBagInterface +{ + /** + * @var MessageCatalogueInterface[] + */ + protected $catalogues = array(); + + /** + * @var string + */ + private $locale; + + /** + * @var array + */ + private $fallbackLocales = array(); + + /** + * @var LoaderInterface[] + */ + private $loaders = array(); + + /** + * @var array + */ + private $resources = array(); + + /** + * @var MessageSelector + */ + private $selector; + + /** + * @var string + */ + private $cacheDir; + + /** + * @var bool + */ + private $debug; + + /** + * @var ConfigCacheFactoryInterface|null + */ + private $configCacheFactory; + + /** + * Constructor. + * + * @param string $locale The locale + * @param MessageSelector|null $selector The message selector for pluralization + * @param string|null $cacheDir The directory to use for the cache + * @param bool $debug Use cache in debug mode ? + * + * @throws InvalidArgumentException If a locale contains invalid characters + */ + public function __construct($locale, MessageSelector $selector = null, $cacheDir = null, $debug = false) + { + $this->setLocale($locale); + $this->selector = $selector ?: new MessageSelector(); + $this->cacheDir = $cacheDir; + $this->debug = $debug; + } + + /** + * Sets the ConfigCache factory to use. + * + * @param ConfigCacheFactoryInterface $configCacheFactory + */ + public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) + { + $this->configCacheFactory = $configCacheFactory; + } + + /** + * Adds a Loader. + * + * @param string $format The name of the loader (@see addResource()) + * @param LoaderInterface $loader A LoaderInterface instance + */ + public function addLoader($format, LoaderInterface $loader) + { + $this->loaders[$format] = $loader; + } + + /** + * Adds a Resource. + * + * @param string $format The name of the loader (@see addLoader()) + * @param mixed $resource The resource name + * @param string $locale The locale + * @param string $domain The domain + * + * @throws InvalidArgumentException If the locale contains invalid characters + */ + public function addResource($format, $resource, $locale, $domain = null) + { + if (null === $domain) { + $domain = 'messages'; + } + + $this->assertValidLocale($locale); + + $this->resources[$locale][] = array($format, $resource, $domain); + + if (in_array($locale, $this->fallbackLocales)) { + $this->catalogues = array(); + } else { + unset($this->catalogues[$locale]); + } + } + + /** + * {@inheritdoc} + */ + public function setLocale($locale) + { + $this->assertValidLocale($locale); + $this->locale = $locale; + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->locale; + } + + /** + * Sets the fallback locales. + * + * @param array $locales The fallback locales + * + * @throws InvalidArgumentException If a locale contains invalid characters + */ + public function setFallbackLocales(array $locales) + { + // needed as the fallback locales are linked to the already loaded catalogues + $this->catalogues = array(); + + foreach ($locales as $locale) { + $this->assertValidLocale($locale); + } + + $this->fallbackLocales = $locales; + } + + /** + * Gets the fallback locales. + * + * @return array $locales The fallback locales + */ + public function getFallbackLocales() + { + return $this->fallbackLocales; + } + + /** + * {@inheritdoc} + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + if (null === $domain) { + $domain = 'messages'; + } + + return strtr($this->getCatalogue($locale)->get((string) $id, $domain), $parameters); + } + + /** + * {@inheritdoc} + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + $parameters = array_merge(array( + '%count%' => $number, + ), $parameters); + + if (null === $domain) { + $domain = 'messages'; + } + + $id = (string) $id; + $catalogue = $this->getCatalogue($locale); + $locale = $catalogue->getLocale(); + while (!$catalogue->defines($id, $domain)) { + if ($cat = $catalogue->getFallbackCatalogue()) { + $catalogue = $cat; + $locale = $catalogue->getLocale(); + } else { + break; + } + } + + return strtr($this->selector->choose($catalogue->get($id, $domain), (int) $number, $locale), $parameters); + } + + /** + * {@inheritdoc} + */ + public function getCatalogue($locale = null) + { + if (null === $locale) { + $locale = $this->getLocale(); + } else { + $this->assertValidLocale($locale); + } + + if (!isset($this->catalogues[$locale])) { + $this->loadCatalogue($locale); + } + + return $this->catalogues[$locale]; + } + + /** + * Gets the loaders. + * + * @return array LoaderInterface[] + */ + protected function getLoaders() + { + return $this->loaders; + } + + /** + * @param string $locale + */ + protected function loadCatalogue($locale) + { + if (null === $this->cacheDir) { + $this->initializeCatalogue($locale); + } else { + $this->initializeCacheCatalogue($locale); + } + } + + /** + * @param string $locale + */ + protected function initializeCatalogue($locale) + { + $this->assertValidLocale($locale); + + try { + $this->doLoadCatalogue($locale); + } catch (NotFoundResourceException $e) { + if (!$this->computeFallbackLocales($locale)) { + throw $e; + } + } + $this->loadFallbackCatalogues($locale); + } + + /** + * @param string $locale + */ + private function initializeCacheCatalogue($locale) + { + if (isset($this->catalogues[$locale])) { + /* Catalogue already initialized. */ + return; + } + + $this->assertValidLocale($locale); + $cache = $this->getConfigCacheFactory()->cache($this->getCatalogueCachePath($locale), + function (ConfigCacheInterface $cache) use ($locale) { + $this->dumpCatalogue($locale, $cache); + } + ); + + if (isset($this->catalogues[$locale])) { + /* Catalogue has been initialized as it was written out to cache. */ + return; + } + + /* Read catalogue from cache. */ + $this->catalogues[$locale] = include $cache->getPath(); + } + + private function dumpCatalogue($locale, ConfigCacheInterface $cache) + { + $this->initializeCatalogue($locale); + $fallbackContent = $this->getFallbackContent($this->catalogues[$locale]); + + $content = sprintf(<<catalogues[$locale]->all(), true), + $fallbackContent + ); + + $cache->write($content, $this->catalogues[$locale]->getResources()); + } + + private function getFallbackContent(MessageCatalogue $catalogue) + { + $fallbackContent = ''; + $current = ''; + $replacementPattern = '/[^a-z0-9_]/i'; + $fallbackCatalogue = $catalogue->getFallbackCatalogue(); + while ($fallbackCatalogue) { + $fallback = $fallbackCatalogue->getLocale(); + $fallbackSuffix = ucfirst(preg_replace($replacementPattern, '_', $fallback)); + $currentSuffix = ucfirst(preg_replace($replacementPattern, '_', $current)); + + $fallbackContent .= sprintf(<<<'EOF' +$catalogue%s = new MessageCatalogue('%s', %s); +$catalogue%s->addFallbackCatalogue($catalogue%s); + +EOF + , + $fallbackSuffix, + $fallback, + var_export($fallbackCatalogue->all(), true), + $currentSuffix, + $fallbackSuffix + ); + $current = $fallbackCatalogue->getLocale(); + $fallbackCatalogue = $fallbackCatalogue->getFallbackCatalogue(); + } + + return $fallbackContent; + } + + private function getCatalogueCachePath($locale) + { + return $this->cacheDir.'/catalogue.'.$locale.'.'.sha1(serialize($this->fallbackLocales)).'.php'; + } + + private function doLoadCatalogue($locale) + { + $this->catalogues[$locale] = new MessageCatalogue($locale); + + if (isset($this->resources[$locale])) { + foreach ($this->resources[$locale] as $resource) { + if (!isset($this->loaders[$resource[0]])) { + throw new RuntimeException(sprintf('The "%s" translation loader is not registered.', $resource[0])); + } + $this->catalogues[$locale]->addCatalogue($this->loaders[$resource[0]]->load($resource[1], $locale, $resource[2])); + } + } + } + + private function loadFallbackCatalogues($locale) + { + $current = $this->catalogues[$locale]; + + foreach ($this->computeFallbackLocales($locale) as $fallback) { + if (!isset($this->catalogues[$fallback])) { + $this->loadCatalogue($fallback); + } + + $fallbackCatalogue = new MessageCatalogue($fallback, $this->catalogues[$fallback]->all()); + foreach ($this->catalogues[$fallback]->getResources() as $resource) { + $fallbackCatalogue->addResource($resource); + } + $current->addFallbackCatalogue($fallbackCatalogue); + $current = $fallbackCatalogue; + } + } + + protected function computeFallbackLocales($locale) + { + $locales = array(); + foreach ($this->fallbackLocales as $fallback) { + if ($fallback === $locale) { + continue; + } + + $locales[] = $fallback; + } + + if (strrchr($locale, '_') !== false) { + array_unshift($locales, substr($locale, 0, -strlen(strrchr($locale, '_')))); + } + + return array_unique($locales); + } + + /** + * Asserts that the locale is valid, throws an Exception if not. + * + * @param string $locale Locale to tests + * + * @throws InvalidArgumentException If the locale contains invalid characters + */ + protected function assertValidLocale($locale) + { + if (1 !== preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) { + throw new InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale)); + } + } + + /** + * Provides the ConfigCache factory implementation, falling back to a + * default implementation if necessary. + * + * @return ConfigCacheFactoryInterface $configCacheFactory + */ + private function getConfigCacheFactory() + { + if (!$this->configCacheFactory) { + $this->configCacheFactory = new ConfigCacheFactory($this->debug); + } + + return $this->configCacheFactory; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/TranslatorBagInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/TranslatorBagInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5e49e2ddc545526dad43331416179eae0b2c1a4b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/TranslatorBagInterface.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Symfony\Component\Translation\Exception\InvalidArgumentException; + +/** + * TranslatorBagInterface. + * + * @author Abdellatif Ait boudad + */ +interface TranslatorBagInterface +{ + /** + * Gets the catalogue by locale. + * + * @param string|null $locale The locale or null to use the default + * + * @return MessageCatalogueInterface + * + * @throws InvalidArgumentException If the locale contains invalid characters + */ + public function getCatalogue($locale = null); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/TranslatorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/TranslatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..9fcfd5bcf40510d8c22cc6d6375541e0ec32a189 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/TranslatorInterface.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Symfony\Component\Translation\Exception\InvalidArgumentException; + +/** + * TranslatorInterface. + * + * @author Fabien Potencier + */ +interface TranslatorInterface +{ + /** + * Translates the given message. + * + * @param string $id The message id (may also be an object that can be cast to string) + * @param array $parameters An array of parameters for the message + * @param string|null $domain The domain for the message or null to use the default + * @param string|null $locale The locale or null to use the default + * + * @return string The translated string + * + * @throws InvalidArgumentException If the locale contains invalid characters + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null); + + /** + * Translates the given choice message by choosing a translation according to a number. + * + * @param string $id The message id (may also be an object that can be cast to string) + * @param int $number The number to use to find the indice of the message + * @param array $parameters An array of parameters for the message + * @param string|null $domain The domain for the message or null to use the default + * @param string|null $locale The locale or null to use the default + * + * @return string The translated string + * + * @throws InvalidArgumentException If the locale contains invalid characters + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null); + + /** + * Sets the current locale. + * + * @param string $locale The locale + * + * @throws InvalidArgumentException If the locale contains invalid characters + */ + public function setLocale($locale); + + /** + * Returns the current locale. + * + * @return string The locale + */ + public function getLocale(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Util/ArrayConverter.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Util/ArrayConverter.php new file mode 100644 index 0000000000000000000000000000000000000000..9c0a420a8592f365306e731aa2f165530cb241b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Util/ArrayConverter.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\Component\Translation\Util; + +/** + * ArrayConverter generates tree like structure from a message catalogue. + * e.g. this + * 'foo.bar1' => 'test1', + * 'foo.bar2' => 'test2' + * converts to follows: + * foo: + * bar1: test1 + * bar2: test2. + * + * @author Gennady Telegin + */ +class ArrayConverter +{ + /** + * Converts linear messages array to tree-like array. + * For example this rray('foo.bar' => 'value') will be converted to array('foo' => array('bar' => 'value')). + * + * @param array $messages Linear messages array + * + * @return array Tree-like messages array + */ + public static function expandToTree(array $messages) + { + $tree = array(); + + foreach ($messages as $id => $value) { + $referenceToElement = &self::getElementByPath($tree, explode('.', $id)); + + $referenceToElement = $value; + + unset($referenceToElement); + } + + return $tree; + } + + private static function &getElementByPath(array &$tree, array $parts) + { + $elem = &$tree; + $parentOfElem = null; + + foreach ($parts as $i => $part) { + if (isset($elem[$part]) && is_string($elem[$part])) { + /* Process next case: + * 'foo': 'test1', + * 'foo.bar': 'test2' + * + * $tree['foo'] was string before we found array {bar: test2}. + * Treat new element as string too, e.g. add $tree['foo.bar'] = 'test2'; + */ + $elem = &$elem[implode('.', array_slice($parts, $i))]; + break; + } + $parentOfElem = &$elem; + $elem = &$elem[$part]; + } + + if (is_array($elem) && count($elem) > 0 && $parentOfElem) { + /* Process next case: + * 'foo.bar': 'test1' + * 'foo': 'test2' + * + * $tree['foo'] was array = {bar: 'test1'} before we found string constant `foo`. + * Cancel treating $tree['foo'] as array and cancel back it expansion, + * e.g. make it $tree['foo.bar'] = 'test1' again. + */ + self::cancelExpand($parentOfElem, $part, $elem); + } + + return $elem; + } + + private static function cancelExpand(array &$tree, $prefix, array $node) + { + $prefix .= '.'; + + foreach ($node as $id => $value) { + if (is_string($value)) { + $tree[$prefix.$id] = $value; + } else { + self::cancelExpand($tree, $prefix.$id, $value); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/Writer/TranslationWriter.php b/vendor/symfony/symfony/src/Symfony/Component/Translation/Writer/TranslationWriter.php new file mode 100644 index 0000000000000000000000000000000000000000..901a8894e1c4cf7dfbf2b0a8c1f498b32d53da97 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/Writer/TranslationWriter.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Writer; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\DumperInterface; +use Symfony\Component\Translation\Exception\InvalidArgumentException; +use Symfony\Component\Translation\Exception\RuntimeException; + +/** + * TranslationWriter writes translation messages. + * + * @author Michel Salib + */ +class TranslationWriter +{ + /** + * Dumpers used for export. + * + * @var array + */ + private $dumpers = array(); + + /** + * Adds a dumper to the writer. + * + * @param string $format The format of the dumper + * @param DumperInterface $dumper The dumper + */ + public function addDumper($format, DumperInterface $dumper) + { + $this->dumpers[$format] = $dumper; + } + + /** + * Disables dumper backup. + */ + public function disableBackup() + { + foreach ($this->dumpers as $dumper) { + if (method_exists($dumper, 'setBackup')) { + $dumper->setBackup(false); + } + } + } + + /** + * Obtains the list of supported formats. + * + * @return array + */ + public function getFormats() + { + return array_keys($this->dumpers); + } + + /** + * Writes translation from the catalogue according to the selected format. + * + * @param MessageCatalogue $catalogue The message catalogue to dump + * @param string $format The format to use to dump the messages + * @param array $options Options that are passed to the dumper + * + * @throws InvalidArgumentException + */ + public function writeTranslations(MessageCatalogue $catalogue, $format, $options = array()) + { + if (!isset($this->dumpers[$format])) { + throw new InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format)); + } + + // get the right dumper + $dumper = $this->dumpers[$format]; + + if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0777, true) && !is_dir($options['path'])) { + throw new RuntimeException(sprintf('Translation Writer was not able to create directory "%s"', $options['path'])); + } + + // save + $dumper->dump($catalogue, $options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Translation/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..d1aed828d42b200929e5b32e4102f1d4ddffcaba --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/composer.json @@ -0,0 +1,48 @@ +{ + "name": "symfony/translation", + "type": "library", + "description": "Symfony Translation Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/config": "~2.8|~3.0", + "symfony/intl": "^2.8.18|^3.2.5", + "symfony/yaml": "~2.8|~3.0", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "suggest": { + "symfony/config": "", + "symfony/yaml": "", + "psr/log": "To use logging capability in translator" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Translation\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Translation/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Translation/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..c25ec5eda69408a87ca97aaa7b3273c9fea512e2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Translation/phpunit.xml.dist @@ -0,0 +1,28 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Validator/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..78a5ad150be3cb8481d35ae75a49a25bceeb3080 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/CHANGELOG.md @@ -0,0 +1,186 @@ +CHANGELOG +========= + +3.2.0 +----- + + * deprecated `Tests\Constraints\AbstractContraintValidatorTest` in favor of `Test\ConstraintValidatorTestCase` + +3.1.0 +----- + + * deprecated `DateTimeValidator::PATTERN` constant + * added a `format` option to the `DateTime` constraint + +2.8.0 +----- + + * added the BIC (SWIFT-Code) validator + +2.7.0 +----- + + * deprecated `DefaultTranslator` in favor of `Symfony\Component\Translation\IdentityTranslator` + * deprecated PHP7-incompatible constraints (Null, True, False) and related validators (NullValidator, TrueValidator, FalseValidator) in favor of their `Is`-prefixed equivalent + +2.6.0 +----- + + * [BC BREAK] `FileValidator` disallow empty files + * [BC BREAK] `UserPasswordValidator` source message change + * [BC BREAK] added internal `ExecutionContextInterface::setConstraint()` + * added `ConstraintViolation::getConstraint()` + * [BC BREAK] The `ExpressionValidator` will now evaluate the Expression even when the property value is null or an empty string + * deprecated `ClassMetadata::hasMemberMetadatas()` + * deprecated `ClassMetadata::getMemberMetadatas()` + * deprecated `ClassMetadata::addMemberMetadata()` + * [BC BREAK] added `Mapping\MetadataInterface::getConstraints()` + * added generic "payload" option to all constraints for attaching domain-specific data + * [BC BREAK] added `ConstraintViolationBuilderInterface::setCause()` + +2.5.0 +----- + + * deprecated `ApcCache` in favor of `DoctrineCache` + * added `DoctrineCache` to adapt any Doctrine cache + * `GroupSequence` now implements `ArrayAccess`, `Countable` and `Traversable` + * [BC BREAK] changed `ClassMetadata::getGroupSequence()` to return a `GroupSequence` instance instead of an array + * `Callback` can now be put onto properties (useful when you pass a closure to the constraint) + * deprecated `ClassBasedInterface` + * deprecated `MetadataInterface` + * deprecated `PropertyMetadataInterface` + * deprecated `PropertyMetadataContainerInterface` + * deprecated `Mapping\ElementMetadata` + * added `Mapping\MetadataInterface` + * added `Mapping\ClassMetadataInterface` + * added `Mapping\PropertyMetadataInterface` + * added `Mapping\GenericMetadata` + * added `Mapping\CascadingStrategy` + * added `Mapping\TraversalStrategy` + * deprecated `Mapping\ClassMetadata::accept()` + * deprecated `Mapping\MemberMetadata::accept()` + * removed array type hint of `Mapping\ClassMetadata::setGroupSequence()` + * deprecated `MetadataFactoryInterface` + * deprecated `Mapping\BlackholeMetadataFactory` + * deprecated `Mapping\ClassMetadataFactory` + * added `Mapping\Factory\MetadataFactoryInterface` + * added `Mapping\Factory\BlackHoleMetadataFactory` + * added `Mapping\Factory\LazyLoadingMetadataFactory` + * deprecated `ExecutionContextInterface` + * deprecated `ExecutionContext` + * deprecated `GlobalExecutionContextInterface` + * added `Context\ExecutionContextInterface` + * added `Context\ExecutionContext` + * added `Context\ExecutionContextFactoryInterface` + * added `Context\ExecutionContextFactory` + * deprecated `ValidatorInterface` + * deprecated `Validator` + * deprecated `ValidationVisitorInterface` + * deprecated `ValidationVisitor` + * added `Validator\ValidatorInterface` + * added `Validator\RecursiveValidator` + * added `Validator\ContextualValidatorInterface` + * added `Validator\RecursiveContextualValidator` + * added `Violation\ConstraintViolationBuilderInterface` + * added `Violation\ConstraintViolationBuilder` + * added `ConstraintViolation::getParameters()` + * added `ConstraintViolation::getPlural()` + * added `Constraints\Traverse` + * deprecated `$deep` property in `Constraints\Valid` + * added `ValidatorBuilderInterface::setApiVersion()` + * added `Validation::API_VERSION_2_4` + * added `Validation::API_VERSION_2_5` + * added `Exception\OutOfBoundsException` + * added `Exception\UnsupportedMetadataException` + * made `Exception\ValidatorException` extend `Exception\RuntimeException` + * added `Util\PropertyPath` + * made the PropertyAccess component an optional dependency + * deprecated `ValidatorBuilder::setPropertyAccessor()` + * deprecated `validate` and `validateValue` on `Validator\Context\ExecutionContext` use `getValidator()` together with `inContext()` instead + +2.4.0 +----- + + * added a constraint the uses the expression language + * added `minRatio`, `maxRatio`, `allowSquare`, `allowLandscape`, and `allowPortrait` to Image validator + +2.3.29 +------ + + * fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator) + +2.3.0 +----- + + * added the ISBN, ISSN, and IBAN validators + * copied the constraints `Optional` and `Required` to the + `Symfony\Component\Validator\Constraints\` namespace and deprecated the original + classes. + * added comparison validators (EqualTo, NotEqualTo, LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, IdenticalTo, NotIdenticalTo) + +2.2.0 +----- + + * added a CardScheme validator + * added a Luhn validator + * moved @api-tags from `Validator` to `ValidatorInterface` + * moved @api-tags from `ConstraintViolation` to the new `ConstraintViolationInterface` + * moved @api-tags from `ConstraintViolationList` to the new `ConstraintViolationListInterface` + * moved @api-tags from `ExecutionContext` to the new `ExecutionContextInterface` + * [BC BREAK] `ConstraintValidatorInterface::initialize` is now type hinted against `ExecutionContextInterface` instead of `ExecutionContext` + * [BC BREAK] changed the visibility of the properties in `Validator` from protected to private + * deprecated `ClassMetadataFactoryInterface` in favor of the new `MetadataFactoryInterface` + * deprecated `ClassMetadataFactory::getClassMetadata` in favor of `getMetadataFor` + * created `MetadataInterface`, `PropertyMetadataInterface`, `ClassBasedInterface` and `PropertyMetadataContainerInterface` + * deprecated `GraphWalker` in favor of the new `ValidationVisitorInterface` + * deprecated `ExecutionContext::addViolationAtPath` + * deprecated `ExecutionContext::addViolationAtSubPath` in favor of `ExecutionContextInterface::addViolationAt` + * deprecated `ExecutionContext::getCurrentClass` in favor of `ExecutionContextInterface::getClassName` + * deprecated `ExecutionContext::getCurrentProperty` in favor of `ExecutionContextInterface::getPropertyName` + * deprecated `ExecutionContext::getCurrentValue` in favor of `ExecutionContextInterface::getValue` + * deprecated `ExecutionContext::getGraphWalker` in favor of `ExecutionContextInterface::validate` and `ExecutionContextInterface::validateValue` + * improved `ValidatorInterface::validateValue` to accept arrays of constraints + * changed `ValidatorInterface::getMetadataFactory` to return a `MetadataFactoryInterface` instead of a `ClassMetadataFactoryInterface` + * removed `ClassMetadataFactoryInterface` type hint from `ValidatorBuilderInterface::setMetadataFactory`. + As of Symfony 2.3, this method will be typed against `MetadataFactoryInterface` instead. + * [BC BREAK] the switches `traverse` and `deep` in the `Valid` constraint and in `GraphWalker::walkReference` + are ignored for arrays now. Arrays are always traversed recursively. + * added dependency to Translation component + * violation messages are now translated with a TranslatorInterface implementation + * [BC BREAK] inserted argument `$message` in the constructor of `ConstraintViolation` + * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `ExecutionContext` + * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `GraphWalker` + * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `ValidationVisitor` + * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `Validator` + * [BC BREAK] added `setTranslator()` and `setTranslationDomain()` to `ValidatorBuilderInterface` + * improved the Validator to support pluralized messages by default + * [BC BREAK] changed the source of all pluralized messages in the translation files to the pluralized version + * added ExceptionInterface, BadMethodCallException and InvalidArgumentException + +2.1.0 +----- + + * added support for `ctype_*` assertions in `TypeValidator` + * improved the ImageValidator with min width, max width, min height, and max height constraints + * added support for MIME with wildcard in FileValidator + * changed Collection validator to add "missing" and "extra" errors to + individual fields + * changed default value for `extraFieldsMessage` and `missingFieldsMessage` + in Collection constraint + * made ExecutionContext immutable + * deprecated Constraint methods `setMessage`, `getMessageTemplate` and + `getMessageParameters` + * added support for dynamic group sequences with the GroupSequenceProvider pattern + * [BC BREAK] ConstraintValidatorInterface method `isValid` has been renamed to + `validate`, its return value was dropped. ConstraintValidator still contains + `isValid` for BC + * [BC BREAK] collections in fields annotated with `Valid` are not traversed + recursively anymore by default. `Valid` contains a new property `deep` + which enables the BC behavior. + * added Count constraint + * added Length constraint + * added Range constraint + * deprecated the Min and Max constraints + * deprecated the MinLength and MaxLength constraints + * added Validation and ValidatorBuilderInterface + * deprecated ValidatorContext, ValidatorContextInterface and ValidatorFactory diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraint.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraint.php new file mode 100644 index 0000000000000000000000000000000000000000..fc5288d13bee7f2ec053720d91ee323db853b5b5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraint.php @@ -0,0 +1,308 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\InvalidArgumentException; +use Symfony\Component\Validator\Exception\InvalidOptionsException; +use Symfony\Component\Validator\Exception\MissingOptionsException; + +/** + * Contains the properties of a constraint definition. + * + * A constraint can be defined on a class, a property or a getter method. + * The Constraint class encapsulates all the configuration required for + * validating this class, property or getter result successfully. + * + * Constraint instances are immutable and serializable. + * + * @property array $groups The groups that the constraint belongs to + * + * @author Bernhard Schussek + */ +abstract class Constraint +{ + /** + * The name of the group given to all constraints with no explicit group. + * + * @var string + */ + const DEFAULT_GROUP = 'Default'; + + /** + * Marks a constraint that can be put onto classes. + * + * @var string + */ + const CLASS_CONSTRAINT = 'class'; + + /** + * Marks a constraint that can be put onto properties. + * + * @var string + */ + const PROPERTY_CONSTRAINT = 'property'; + + /** + * Maps error codes to the names of their constants. + * + * @var array + */ + protected static $errorNames = array(); + + /** + * Domain-specific data attached to a constraint. + * + * @var mixed + */ + public $payload; + + /** + * Returns the name of the given error code. + * + * @param string $errorCode The error code + * + * @return string The name of the error code + * + * @throws InvalidArgumentException If the error code does not exist + */ + public static function getErrorName($errorCode) + { + if (!isset(static::$errorNames[$errorCode])) { + throw new InvalidArgumentException(sprintf( + 'The error code "%s" does not exist for constraint of type "%s".', + $errorCode, + get_called_class() + )); + } + + return static::$errorNames[$errorCode]; + } + + /** + * Initializes the constraint with options. + * + * You should pass an associative array. The keys should be the names of + * existing properties in this class. The values should be the value for these + * properties. + * + * Alternatively you can override the method getDefaultOption() to return the + * name of an existing property. If no associative array is passed, this + * property is set instead. + * + * You can force that certain options are set by overriding + * getRequiredOptions() to return the names of these options. If any + * option is not set here, an exception is thrown. + * + * @param mixed $options The options (as associative array) + * or the value for the default + * option (any other type) + * + * @throws InvalidOptionsException When you pass the names of non-existing + * options + * @throws MissingOptionsException When you don't pass any of the options + * returned by getRequiredOptions() + * @throws ConstraintDefinitionException When you don't pass an associative + * array, but getDefaultOption() returns + * null + */ + public function __construct($options = null) + { + $invalidOptions = array(); + $missingOptions = array_flip((array) $this->getRequiredOptions()); + $knownOptions = get_object_vars($this); + + // The "groups" option is added to the object lazily + $knownOptions['groups'] = true; + + if (is_array($options) && count($options) >= 1 && isset($options['value']) && !property_exists($this, 'value')) { + $options[$this->getDefaultOption()] = $options['value']; + unset($options['value']); + } + + if (is_array($options)) { + reset($options); + } + if (is_array($options) && count($options) > 0 && is_string(key($options))) { + foreach ($options as $option => $value) { + if (array_key_exists($option, $knownOptions)) { + $this->$option = $value; + unset($missingOptions[$option]); + } else { + $invalidOptions[] = $option; + } + } + } elseif (null !== $options && !(is_array($options) && count($options) === 0)) { + $option = $this->getDefaultOption(); + + if (null === $option) { + throw new ConstraintDefinitionException( + sprintf('No default option is configured for constraint %s', get_class($this)) + ); + } + + if (array_key_exists($option, $knownOptions)) { + $this->$option = $options; + unset($missingOptions[$option]); + } else { + $invalidOptions[] = $option; + } + } + + if (count($invalidOptions) > 0) { + throw new InvalidOptionsException( + sprintf('The options "%s" do not exist in constraint %s', implode('", "', $invalidOptions), get_class($this)), + $invalidOptions + ); + } + + if (count($missingOptions) > 0) { + throw new MissingOptionsException( + sprintf('The options "%s" must be set for constraint %s', implode('", "', array_keys($missingOptions)), get_class($this)), + array_keys($missingOptions) + ); + } + } + + /** + * Sets the value of a lazily initialized option. + * + * Corresponding properties are added to the object on first access. Hence + * this method will be called at most once per constraint instance and + * option name. + * + * @param string $option The option name + * @param mixed $value The value to set + * + * @throws InvalidOptionsException If an invalid option name is given + */ + public function __set($option, $value) + { + if ('groups' === $option) { + $this->groups = (array) $value; + + return; + } + + throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, get_class($this)), array($option)); + } + + /** + * Returns the value of a lazily initialized option. + * + * Corresponding properties are added to the object on first access. Hence + * this method will be called at most once per constraint instance and + * option name. + * + * @param string $option The option name + * + * @return mixed The value of the option + * + * @throws InvalidOptionsException If an invalid option name is given + * + * @internal This method should not be used or overwritten in userland code. + */ + public function __get($option) + { + if ('groups' === $option) { + $this->groups = array(self::DEFAULT_GROUP); + + return $this->groups; + } + + throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, get_class($this)), array($option)); + } + + /** + * Adds the given group if this constraint is in the Default group. + * + * @param string $group + */ + public function addImplicitGroupName($group) + { + if (in_array(self::DEFAULT_GROUP, $this->groups) && !in_array($group, $this->groups)) { + $this->groups[] = $group; + } + } + + /** + * Returns the name of the default option. + * + * Override this method to define a default option. + * + * @return string + * + * @see __construct() + */ + public function getDefaultOption() + { + } + + /** + * Returns the name of the required options. + * + * Override this method if you want to define required options. + * + * @return array + * + * @see __construct() + */ + public function getRequiredOptions() + { + return array(); + } + + /** + * Returns the name of the class that validates this constraint. + * + * By default, this is the fully qualified name of the constraint class + * suffixed with "Validator". You can override this method to change that + * behaviour. + * + * @return string + */ + public function validatedBy() + { + return get_class($this).'Validator'; + } + + /** + * Returns whether the constraint can be put onto classes, properties or + * both. + * + * This method should return one or more of the constants + * Constraint::CLASS_CONSTRAINT and Constraint::PROPERTY_CONSTRAINT. + * + * @return string|array One or more constant values + */ + public function getTargets() + { + return self::PROPERTY_CONSTRAINT; + } + + /** + * Optimizes the serialized value to minimize storage space. + * + * @return array The properties to serialize + * + * @internal This method may be replaced by an implementation of + * {@link \Serializable} in the future. Please don't use or + * overwrite it. + */ + public function __sleep() + { + // Initialize "groups" option if it is not set + $this->groups; + + return array_keys(get_object_vars($this)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..ece4400065c6a424a57835006e05fa231c97a939 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidator.php @@ -0,0 +1,171 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Symfony\Component\Validator\Context\ExecutionContextInterface; + +/** + * Base class for constraint validators. + * + * @author Bernhard Schussek + */ +abstract class ConstraintValidator implements ConstraintValidatorInterface +{ + /** + * Whether to format {@link \DateTime} objects as RFC-3339 dates + * ("Y-m-d H:i:s"). + * + * @var int + */ + const PRETTY_DATE = 1; + + /** + * Whether to cast objects with a "__toString()" method to strings. + * + * @var int + */ + const OBJECT_TO_STRING = 2; + + /** + * @var ExecutionContextInterface + */ + protected $context; + + /** + * {@inheritdoc} + */ + public function initialize(ExecutionContextInterface $context) + { + $this->context = $context; + } + + /** + * Returns a string representation of the type of the value. + * + * This method should be used if you pass the type of a value as + * message parameter to a constraint violation. Note that such + * parameters should usually not be included in messages aimed at + * non-technical people. + * + * @param mixed $value The value to return the type of + * + * @return string The type of the value + */ + protected function formatTypeOf($value) + { + return is_object($value) ? get_class($value) : gettype($value); + } + + /** + * Returns a string representation of the value. + * + * This method returns the equivalent PHP tokens for most scalar types + * (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped + * in double quotes ("). Objects, arrays and resources are formatted as + * "object", "array" and "resource". If the $format bitmask contains + * the PRETTY_DATE bit, then {@link \DateTime} objects will be formatted + * as RFC-3339 dates ("Y-m-d H:i:s"). + * + * Be careful when passing message parameters to a constraint violation + * that (may) contain objects, arrays or resources. These parameters + * should only be displayed for technical users. Non-technical users + * won't know what an "object", "array" or "resource" is and will be + * confused by the violation message. + * + * @param mixed $value The value to format as string + * @param int $format A bitwise combination of the format + * constants in this class + * + * @return string The string representation of the passed value + */ + protected function formatValue($value, $format = 0) + { + $isDateTime = $value instanceof \DateTimeInterface; + + if (($format & self::PRETTY_DATE) && $isDateTime) { + if (class_exists('IntlDateFormatter')) { + $locale = \Locale::getDefault(); + $formatter = new \IntlDateFormatter($locale, \IntlDateFormatter::MEDIUM, \IntlDateFormatter::SHORT); + + // neither the native nor the stub IntlDateFormatter support + // DateTimeImmutable as of yet + if (!$value instanceof \DateTime) { + $value = new \DateTime( + $value->format('Y-m-d H:i:s.u e'), + $value->getTimezone() + ); + } + + return $formatter->format($value); + } + + return $value->format('Y-m-d H:i:s'); + } + + if (is_object($value)) { + if (($format & self::OBJECT_TO_STRING) && method_exists($value, '__toString')) { + return $value->__toString(); + } + + return 'object'; + } + + if (is_array($value)) { + return 'array'; + } + + if (is_string($value)) { + return '"'.$value.'"'; + } + + if (is_resource($value)) { + return 'resource'; + } + + if (null === $value) { + return 'null'; + } + + if (false === $value) { + return 'false'; + } + + if (true === $value) { + return 'true'; + } + + return (string) $value; + } + + /** + * Returns a string representation of a list of values. + * + * Each of the values is converted to a string using + * {@link formatValue()}. The values are then concatenated with commas. + * + * @param array $values A list of values + * @param int $format A bitwise combination of the format + * constants in this class + * + * @return string The string representation of the value list + * + * @see formatValue() + */ + protected function formatValues(array $values, $format = 0) + { + foreach ($values as $key => $value) { + $values[$key] = $this->formatValue($value, $format); + } + + return implode(', ', $values); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorFactory.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..86e44e2a5580fc16cf6ca71490594df05f5eb405 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorFactory.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Symfony\Component\Validator\Constraints\ExpressionValidator; + +/** + * Default implementation of the ConstraintValidatorFactoryInterface. + * + * This enforces the convention that the validatedBy() method on any + * Constraint will return the class name of the ConstraintValidator that + * should validate the Constraint. + * + * @author Bernhard Schussek + */ +class ConstraintValidatorFactory implements ConstraintValidatorFactoryInterface +{ + protected $validators = array(); + + public function __construct() + { + } + + /** + * {@inheritdoc} + */ + public function getInstance(Constraint $constraint) + { + $className = $constraint->validatedBy(); + + if (!isset($this->validators[$className])) { + $this->validators[$className] = 'validator.expression' === $className + ? new ExpressionValidator() + : new $className(); + } + + return $this->validators[$className]; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorFactoryInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorFactoryInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5e216275b493382d0df0bb04d60625bbb26cdcce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorFactoryInterface.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\Component\Validator; + +/** + * Specifies an object able to return the correct ConstraintValidatorInterface + * instance given a Constraint object. + */ +interface ConstraintValidatorFactoryInterface +{ + /** + * Given a Constraint, this returns the ConstraintValidatorInterface + * object that should be used to verify its validity. + * + * @param Constraint $constraint The source constraint + * + * @return ConstraintValidatorInterface + */ + public function getInstance(Constraint $constraint); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b215346a48885bce428803f415440f078d111d15 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintValidatorInterface.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Symfony\Component\Validator\Context\ExecutionContextInterface; + +/** + * @author Bernhard Schussek + */ +interface ConstraintValidatorInterface +{ + /** + * Initializes the constraint validator. + * + * @param ExecutionContextInterface $context The current validation context + */ + public function initialize(ExecutionContextInterface $context); + + /** + * Checks if the passed value is valid. + * + * @param mixed $value The value that should be validated + * @param Constraint $constraint The constraint for the validation + */ + public function validate($value, Constraint $constraint); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolation.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolation.php new file mode 100644 index 0000000000000000000000000000000000000000..015aa741dd9e428308cd771f1c1f1e7010f618bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolation.php @@ -0,0 +1,217 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Default implementation of {@ConstraintViolationInterface}. + * + * @author Bernhard Schussek + */ +class ConstraintViolation implements ConstraintViolationInterface +{ + /** + * @var string + */ + private $message; + + /** + * @var string + */ + private $messageTemplate; + + /** + * @var array + */ + private $parameters; + + /** + * @var int|null + */ + private $plural; + + /** + * @var mixed + */ + private $root; + + /** + * @var string + */ + private $propertyPath; + + /** + * @var mixed + */ + private $invalidValue; + + /** + * @var Constraint|null + */ + private $constraint; + + /** + * @var mixed + */ + private $code; + + /** + * @var mixed + */ + private $cause; + + /** + * Creates a new constraint violation. + * + * @param string $message The violation message + * @param string $messageTemplate The raw violation message + * @param array $parameters The parameters to substitute in the + * raw violation message + * @param mixed $root The value originally passed to the + * validator + * @param string $propertyPath The property path from the root + * value to the invalid value + * @param mixed $invalidValue The invalid value that caused this + * violation + * @param int|null $plural The number for determining the plural + * form when translating the message + * @param mixed $code The error code of the violation + * @param Constraint|null $constraint The constraint whose validation + * caused the violation + * @param mixed $cause The cause of the violation + */ + public function __construct($message, $messageTemplate, array $parameters, $root, $propertyPath, $invalidValue, $plural = null, $code = null, Constraint $constraint = null, $cause = null) + { + $this->message = $message; + $this->messageTemplate = $messageTemplate; + $this->parameters = $parameters; + $this->plural = $plural; + $this->root = $root; + $this->propertyPath = $propertyPath; + $this->invalidValue = $invalidValue; + $this->constraint = $constraint; + $this->code = $code; + $this->cause = $cause; + } + + /** + * Converts the violation into a string for debugging purposes. + * + * @return string The violation as string + */ + public function __toString() + { + if (is_object($this->root)) { + $class = 'Object('.get_class($this->root).')'; + } elseif (is_array($this->root)) { + $class = 'Array'; + } else { + $class = (string) $this->root; + } + + $propertyPath = (string) $this->propertyPath; + $code = $this->code; + + if ('' !== $propertyPath && '[' !== $propertyPath[0] && '' !== $class) { + $class .= '.'; + } + + if (!empty($code)) { + $code = ' (code '.$code.')'; + } + + return $class.$propertyPath.":\n ".$this->getMessage().$code; + } + + /** + * {@inheritdoc} + */ + public function getMessageTemplate() + { + return $this->messageTemplate; + } + + /** + * {@inheritdoc} + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * {@inheritdoc} + */ + public function getPlural() + { + return $this->plural; + } + + /** + * {@inheritdoc} + */ + public function getMessage() + { + return $this->message; + } + + /** + * {@inheritdoc} + */ + public function getRoot() + { + return $this->root; + } + + /** + * {@inheritdoc} + */ + public function getPropertyPath() + { + return $this->propertyPath; + } + + /** + * {@inheritdoc} + */ + public function getInvalidValue() + { + return $this->invalidValue; + } + + /** + * Returns the constraint whose validation caused the violation. + * + * @return Constraint|null The constraint or null if it is not known + */ + public function getConstraint() + { + return $this->constraint; + } + + /** + * Returns the cause of the violation. + * + * @return mixed + */ + public function getCause() + { + return $this->cause; + } + + /** + * {@inheritdoc} + */ + public function getCode() + { + return $this->code; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..7499d890ff6b018d14952a9b85bf1da592c32403 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationInterface.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\Component\Validator; + +/** + * A violation of a constraint that happened during validation. + * + * For each constraint that fails during validation one or more violations are + * created. The violations store the violation message, the path to the failing + * element in the validation graph and the root element that was originally + * passed to the validator. For example, take the following graph: + * + *
    + * (Person)---(firstName: string)
    + *      \
    + *   (address: Address)---(street: string)
    + * 
    + * + * If the Person object is validated and validation fails for the + * "firstName" property, the generated violation has the Person + * instance as root and the property path "firstName". If validation fails + * for the "street" property of the related Address instance, the root + * element is still the person, but the property path is "address.street". + * + * @author Bernhard Schussek + */ +interface ConstraintViolationInterface +{ + /** + * Returns the violation message. + * + * @return string The violation message + */ + public function getMessage(); + + /** + * Returns the raw violation message. + * + * The raw violation message contains placeholders for the parameters + * returned by {@link getParameters}. Typically you'll pass the + * message template and parameters to a translation engine. + * + * @return string The raw violation message + */ + public function getMessageTemplate(); + + /** + * Returns the parameters to be inserted into the raw violation message. + * + * @return array A possibly empty list of parameters indexed by the names + * that appear in the message template. + * + * @see getMessageTemplate() + */ + public function getParameters(); + + /** + * Returns a number for pluralizing the violation message. + * + * For example, the message template could have different translation based + * on a parameter "choices": + * + *
      + *
    • Please select exactly one entry. (choices=1)
    • + *
    • Please select two entries. (choices=2)
    • + *
    + * + * This method returns the value of the parameter for choosing the right + * pluralization form (in this case "choices"). + * + * @return int|null The number to use to pluralize of the message + */ + public function getPlural(); + + /** + * Returns the root element of the validation. + * + * @return mixed The value that was passed originally to the validator when + * the validation was started. Because the validator traverses + * the object graph, the value at which the violation occurs + * is not necessarily the value that was originally validated. + */ + public function getRoot(); + + /** + * Returns the property path from the root element to the violation. + * + * @return string The property path indicates how the validator reached + * the invalid value from the root element. If the root + * element is a Person instance with a property + * "address" that contains an Address instance + * with an invalid property "street", the generated property + * path is "address.street". Property access is denoted by + * dots, while array access is denoted by square brackets, + * for example "addresses[1].street". + */ + public function getPropertyPath(); + + /** + * Returns the value that caused the violation. + * + * @return mixed The invalid value that caused the validated constraint to + * fail. + */ + public function getInvalidValue(); + + /** + * Returns a machine-digestible error code for the violation. + * + * @return string|null The error code + */ + public function getCode(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationList.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationList.php new file mode 100644 index 0000000000000000000000000000000000000000..3490237bc2d6b443fde05c4979e1e75839ab4b62 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationList.php @@ -0,0 +1,161 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Default implementation of {@ConstraintViolationListInterface}. + * + * @author Bernhard Schussek + */ +class ConstraintViolationList implements \IteratorAggregate, ConstraintViolationListInterface +{ + /** + * @var ConstraintViolationInterface[] + */ + private $violations = array(); + + /** + * Creates a new constraint violation list. + * + * @param ConstraintViolationInterface[] $violations The constraint violations to add to the list + */ + public function __construct(array $violations = array()) + { + foreach ($violations as $violation) { + $this->add($violation); + } + } + + /** + * Converts the violation into a string for debugging purposes. + * + * @return string The violation as string + */ + public function __toString() + { + $string = ''; + + foreach ($this->violations as $violation) { + $string .= $violation."\n"; + } + + return $string; + } + + /** + * {@inheritdoc} + */ + public function add(ConstraintViolationInterface $violation) + { + $this->violations[] = $violation; + } + + /** + * {@inheritdoc} + */ + public function addAll(ConstraintViolationListInterface $otherList) + { + foreach ($otherList as $violation) { + $this->violations[] = $violation; + } + } + + /** + * {@inheritdoc} + */ + public function get($offset) + { + if (!isset($this->violations[$offset])) { + throw new \OutOfBoundsException(sprintf('The offset "%s" does not exist.', $offset)); + } + + return $this->violations[$offset]; + } + + /** + * {@inheritdoc} + */ + public function has($offset) + { + return isset($this->violations[$offset]); + } + + /** + * {@inheritdoc} + */ + public function set($offset, ConstraintViolationInterface $violation) + { + $this->violations[$offset] = $violation; + } + + /** + * {@inheritdoc} + */ + public function remove($offset) + { + unset($this->violations[$offset]); + } + + /** + * {@inheritdoc} + * + * @return \ArrayIterator|ConstraintViolationInterface[] + */ + public function getIterator() + { + return new \ArrayIterator($this->violations); + } + + /** + * {@inheritdoc} + */ + public function count() + { + return count($this->violations); + } + + /** + * {@inheritdoc} + */ + public function offsetExists($offset) + { + return $this->has($offset); + } + + /** + * {@inheritdoc} + */ + public function offsetGet($offset) + { + return $this->get($offset); + } + + /** + * {@inheritdoc} + */ + public function offsetSet($offset, $violation) + { + if (null === $offset) { + $this->add($violation); + } else { + $this->set($offset, $violation); + } + } + + /** + * {@inheritdoc} + */ + public function offsetUnset($offset) + { + $this->remove($offset); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationListInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationListInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d96755c9a277e60e7b523fecf3e869d440804190 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/ConstraintViolationListInterface.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * A list of constraint violations. + * + * @author Bernhard Schussek + */ +interface ConstraintViolationListInterface extends \Traversable, \Countable, \ArrayAccess +{ + /** + * Adds a constraint violation to this list. + * + * @param ConstraintViolationInterface $violation The violation to add + */ + public function add(ConstraintViolationInterface $violation); + + /** + * Merges an existing violation list into this list. + * + * @param ConstraintViolationListInterface $otherList The list to merge + */ + public function addAll(ConstraintViolationListInterface $otherList); + + /** + * Returns the violation at a given offset. + * + * @param int $offset The offset of the violation + * + * @return ConstraintViolationInterface The violation + * + * @throws \OutOfBoundsException If the offset does not exist. + */ + public function get($offset); + + /** + * Returns whether the given offset exists. + * + * @param int $offset The violation offset + * + * @return bool Whether the offset exists + */ + public function has($offset); + + /** + * Sets a violation at a given offset. + * + * @param int $offset The violation offset + * @param ConstraintViolationInterface $violation The violation + */ + public function set($offset, ConstraintViolationInterface $violation); + + /** + * Removes a violation at a given offset. + * + * @param int $offset The offset to remove + */ + public function remove($offset); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparison.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparison.php new file mode 100644 index 0000000000000000000000000000000000000000..78db943f74f14260870ca7a477a9b9c0b5fd0912 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparison.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * Used for the comparison of values. + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +abstract class AbstractComparison extends Constraint +{ + public $message; + public $value; + + /** + * {@inheritdoc} + */ + public function __construct($options = null) + { + if (is_array($options) && !isset($options['value'])) { + throw new ConstraintDefinitionException(sprintf( + 'The %s constraint requires the "value" option to be set.', + get_class($this) + )); + } + + parent::__construct($options); + } + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'value'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..dbaa5cd0b22d0907d512b940d4783f7e693d2fc0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Provides a base class for the validation of property comparisons. + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +abstract class AbstractComparisonValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof AbstractComparison) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\AbstractComparison'); + } + + if (null === $value) { + return; + } + + $comparedValue = $constraint->value; + + // Convert strings to DateTimes if comparing another DateTime + // This allows to compare with any date/time value supported by + // the DateTime constructor: + // http://php.net/manual/en/datetime.formats.php + if (is_string($comparedValue)) { + if ($value instanceof \DateTimeImmutable) { + // If $value is immutable, convert the compared value to a + // DateTimeImmutable too + $comparedValue = new \DatetimeImmutable($comparedValue); + } elseif ($value instanceof \DateTimeInterface) { + // Otherwise use DateTime + $comparedValue = new \DateTime($comparedValue); + } + } + + if (!$this->compareValues($value, $comparedValue)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value, self::OBJECT_TO_STRING | self::PRETTY_DATE)) + ->setParameter('{{ compared_value }}', $this->formatValue($comparedValue, self::OBJECT_TO_STRING | self::PRETTY_DATE)) + ->setParameter('{{ compared_value_type }}', $this->formatTypeOf($comparedValue)) + ->setCode($this->getErrorCode()) + ->addViolation(); + } + } + + /** + * Compares the two given values to find if their relationship is valid. + * + * @param mixed $value1 The first value to compare + * @param mixed $value2 The second value to compare + * + * @return bool true if the relationship is valid, false otherwise + */ + abstract protected function compareValues($value1, $value2); + + /** + * Returns the error code used if the comparison fails. + * + * @return string|null The error code or `null` if no code should be set + */ + protected function getErrorCode() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/All.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/All.php new file mode 100644 index 0000000000000000000000000000000000000000..b531a1d645af3cb6dd821b848a76063524a4833b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/All.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class All extends Composite +{ + public $constraints = array(); + + public function getDefaultOption() + { + return 'constraints'; + } + + public function getRequiredOptions() + { + return array('constraints'); + } + + protected function getCompositeOption() + { + return 'constraints'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AllValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AllValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..a5eb32bbd97968a8a3a187683696aa95f63ab883 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AllValidator.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class AllValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof All) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\All'); + } + + if (null === $value) { + return; + } + + if (!is_array($value) && !$value instanceof \Traversable) { + throw new UnexpectedTypeException($value, 'array or Traversable'); + } + + $context = $this->context; + + $validator = $context->getValidator()->inContext($context); + + foreach ($value as $key => $element) { + $validator->atPath('['.$key.']')->validate($element, $constraint->constraints); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Bic.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Bic.php new file mode 100644 index 0000000000000000000000000000000000000000..dee5d526938e9a94f92fab7a18e76f6f60262348 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Bic.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Michael Hirschler + */ +class Bic extends Constraint +{ + const INVALID_LENGTH_ERROR = '66dad313-af0b-4214-8566-6c799be9789c'; + const INVALID_CHARACTERS_ERROR = 'f424c529-7add-4417-8f2d-4b656e4833e2'; + const INVALID_BANK_CODE_ERROR = '00559357-6170-4f29-aebd-d19330aa19cf'; + const INVALID_COUNTRY_CODE_ERROR = '1ce76f8d-3c1f-451c-9e62-fe9c3ed486ae'; + const INVALID_CASE_ERROR = '11884038-3312-4ae5-9d04-699f782130c7'; + + protected static $errorNames = array( + self::INVALID_LENGTH_ERROR => 'INVALID_LENGTH_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::INVALID_BANK_CODE_ERROR => 'INVALID_BANK_CODE_ERROR', + self::INVALID_COUNTRY_CODE_ERROR => 'INVALID_COUNTRY_CODE_ERROR', + self::INVALID_CASE_ERROR => 'INVALID_CASE_ERROR', + ); + + public $message = 'This is not a valid Business Identifier Code (BIC).'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/BicValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/BicValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..d2188071fabf144aaa3952d952830ea0fac098cb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/BicValidator.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; + +/** + * @author Michael Hirschler + * + * @see https://en.wikipedia.org/wiki/ISO_9362#Structure + */ +class BicValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (null === $value || '' === $value) { + return; + } + + $canonicalize = str_replace(' ', '', $value); + + // the bic must be either 8 or 11 characters long + if (!in_array(strlen($canonicalize), array(8, 11))) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_LENGTH_ERROR) + ->addViolation(); + + return; + } + + // must contain alphanumeric values only + if (!ctype_alnum($canonicalize)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_CHARACTERS_ERROR) + ->addViolation(); + + return; + } + + // first 4 letters must be alphabetic (bank code) + if (!ctype_alpha(substr($canonicalize, 0, 4))) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_BANK_CODE_ERROR) + ->addViolation(); + + return; + } + + // next 2 letters must be alphabetic (country code) + if (!ctype_alpha(substr($canonicalize, 4, 2))) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_COUNTRY_CODE_ERROR) + ->addViolation(); + + return; + } + + // should contain uppercase characters only + if (strtoupper($canonicalize) !== $canonicalize) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_CASE_ERROR) + ->addViolation(); + + return; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Blank.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Blank.php new file mode 100644 index 0000000000000000000000000000000000000000..030b21f959d97ae4c7ffac37b0e53687f58d0951 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Blank.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Blank extends Constraint +{ + const NOT_BLANK_ERROR = '183ad2de-533d-4796-a439-6d3c3852b549'; + + protected static $errorNames = array( + self::NOT_BLANK_ERROR => 'NOT_BLANK_ERROR', + ); + + public $message = 'This value should be blank.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/BlankValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/BlankValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..ca999b5aa39618ba874b1f7adede7b19a0b63e60 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/BlankValidator.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class BlankValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Blank) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Blank'); + } + + if ('' !== $value && null !== $value) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Blank::NOT_BLANK_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Callback.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Callback.php new file mode 100644 index 0000000000000000000000000000000000000000..4a43665b0db8b9d9528ba83ac7d72e64daa1e1ac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Callback.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Callback extends Constraint +{ + /** + * @var string|callable + */ + public $callback; + + /** + * {@inheritdoc} + */ + public function __construct($options = null) + { + // Invocation through annotations with an array parameter only + if (is_array($options) && 1 === count($options) && isset($options['value'])) { + $options = $options['value']; + } + + if (is_array($options) && !isset($options['callback']) && !isset($options['groups']) && !isset($options['payload'])) { + $options = array('callback' => $options); + } + + parent::__construct($options); + } + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'callback'; + } + + /** + * {@inheritdoc} + */ + public function getTargets() + { + return array(self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CallbackValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CallbackValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..733ee43ba75e333e8b7e96e84d71c9237261aef9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CallbackValidator.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validator for Callback constraint. + * + * @author Bernhard Schussek + */ +class CallbackValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($object, Constraint $constraint) + { + if (!$constraint instanceof Callback) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Callback'); + } + + $method = $constraint->callback; + if ($method instanceof \Closure) { + $method($object, $this->context, $constraint->payload); + } elseif (is_array($method)) { + if (!is_callable($method)) { + if (isset($method[0]) && is_object($method[0])) { + $method[0] = get_class($method[0]); + } + throw new ConstraintDefinitionException(sprintf('%s targeted by Callback constraint is not a valid callable', json_encode($method))); + } + + call_user_func($method, $object, $this->context, $constraint->payload); + } elseif (null !== $object) { + if (!method_exists($object, $method)) { + throw new ConstraintDefinitionException(sprintf('Method "%s" targeted by Callback constraint does not exist in class %s', $method, get_class($object))); + } + + $reflMethod = new \ReflectionMethod($object, $method); + + if ($reflMethod->isStatic()) { + $reflMethod->invoke(null, $object, $this->context, $constraint->payload); + } else { + $reflMethod->invoke($object, $this->context, $constraint->payload); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardScheme.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardScheme.php new file mode 100644 index 0000000000000000000000000000000000000000..40c32e879e83fbaa16a4a9f397a68b599a5dada9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardScheme.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * Metadata for the CardSchemeValidator. + * + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Tim Nagel + * @author Bernhard Schussek + */ +class CardScheme extends Constraint +{ + const NOT_NUMERIC_ERROR = 'a2ad9231-e827-485f-8a1e-ef4d9a6d5c2e'; + const INVALID_FORMAT_ERROR = 'a8faedbf-1c2f-4695-8d22-55783be8efed'; + + protected static $errorNames = array( + self::NOT_NUMERIC_ERROR => 'NOT_NUMERIC_ERROR', + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + ); + + public $message = 'Unsupported card type or invalid card number.'; + public $schemes; + + public function getDefaultOption() + { + return 'schemes'; + } + + public function getRequiredOptions() + { + return array('schemes'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardSchemeValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardSchemeValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..36a9d8ad276d7d04f549a6f1c8fdd83b97cd5767 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CardSchemeValidator.php @@ -0,0 +1,128 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates that a card number belongs to a specified scheme. + * + * @author Tim Nagel + * @author Bernhard Schussek + * + * @see http://en.wikipedia.org/wiki/Bank_card_number + * @see http://www.regular-expressions.info/creditcard.html + * @see http://www.barclaycard.co.uk/business/files/Ranges_and_Rules_September_2014.pdf + */ +class CardSchemeValidator extends ConstraintValidator +{ + protected $schemes = array( + // American Express card numbers start with 34 or 37 and have 15 digits. + 'AMEX' => array( + '/^3[47][0-9]{13}$/', + ), + // China UnionPay cards start with 62 and have between 16 and 19 digits. + // Please note that these cards do not follow Luhn Algorithm as a checksum. + 'CHINA_UNIONPAY' => array( + '/^62[0-9]{14,17}$/', + ), + // Diners Club card numbers begin with 300 through 305, 36 or 38. All have 14 digits. + // There are Diners Club cards that begin with 5 and have 16 digits. + // These are a joint venture between Diners Club and MasterCard, and should be processed like a MasterCard. + 'DINERS' => array( + '/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/', + ), + // Discover card numbers begin with 6011, 622126 through 622925, 644 through 649 or 65. + // All have 16 digits. + 'DISCOVER' => array( + '/^6011[0-9]{12}$/', + '/^64[4-9][0-9]{13}$/', + '/^65[0-9]{14}$/', + '/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/', + ), + // InstaPayment cards begin with 637 through 639 and have 16 digits. + 'INSTAPAYMENT' => array( + '/^63[7-9][0-9]{13}$/', + ), + // JCB cards beginning with 2131 or 1800 have 15 digits. + // JCB cards beginning with 35 have 16 digits. + 'JCB' => array( + '/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/', + ), + // Laser cards begin with either 6304, 6706, 6709 or 6771 and have between 16 and 19 digits. + 'LASER' => array( + '/^(6304|670[69]|6771)[0-9]{12,15}$/', + ), + // Maestro international cards begin with 675900..675999 and have between 12 and 19 digits. + // Maestro UK cards begin with either 500000..509999 or 560000..699999 and have between 12 and 19 digits. + 'MAESTRO' => array( + '/^(6759[0-9]{2})[0-9]{6,13}$/', + '/^(50[0-9]{4})[0-9]{6,13}$/', + '/^5[6-9][0-9]{10,17}$/', + '/^6[0-9]{11,18}$/', + ), + // All MasterCard numbers start with the numbers 51 through 55. All have 16 digits. + // October 2016 MasterCard numbers can also start with 222100 through 272099. + 'MASTERCARD' => array( + '/^5[1-5][0-9]{14}$/', + '/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/', + ), + // All Visa card numbers start with a 4. New cards have 16 digits. Old cards have 13. + 'VISA' => array( + '/^4([0-9]{12}|[0-9]{15})$/', + ), + ); + + /** + * Validates a creditcard belongs to a specified scheme. + * + * @param mixed $value + * @param Constraint $constraint + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof CardScheme) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\CardScheme'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_numeric($value)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(CardScheme::NOT_NUMERIC_ERROR) + ->addViolation(); + + return; + } + + $schemes = array_flip((array) $constraint->schemes); + $schemeRegexes = array_intersect_key($this->schemes, $schemes); + + foreach ($schemeRegexes as $regexes) { + foreach ($regexes as $regex) { + if (preg_match($regex, $value)) { + return; + } + } + } + + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(CardScheme::INVALID_FORMAT_ERROR) + ->addViolation(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Choice.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Choice.php new file mode 100644 index 0000000000000000000000000000000000000000..4b93c70e4a5f4088b5c98901d7507443eff99d50 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Choice.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Choice extends Constraint +{ + const NO_SUCH_CHOICE_ERROR = '8e179f1b-97aa-4560-a02f-2a8b42e49df7'; + const TOO_FEW_ERROR = '11edd7eb-5872-4b6e-9f12-89923999fd0e'; + const TOO_MANY_ERROR = '9bd98e49-211c-433f-8630-fd1c2d0f08c3'; + + protected static $errorNames = array( + self::NO_SUCH_CHOICE_ERROR => 'NO_SUCH_CHOICE_ERROR', + self::TOO_FEW_ERROR => 'TOO_FEW_ERROR', + self::TOO_MANY_ERROR => 'TOO_MANY_ERROR', + ); + + public $choices; + public $callback; + public $multiple = false; + public $strict = false; + public $min; + public $max; + public $message = 'The value you selected is not a valid choice.'; + public $multipleMessage = 'One or more of the given values is invalid.'; + public $minMessage = 'You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.'; + public $maxMessage = 'You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.'; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'choices'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ChoiceValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ChoiceValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..6c81b3b4e0b22a1906668dd4bba63aba3caec22b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ChoiceValidator.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * ChoiceValidator validates that the value is one of the expected values. + * + * @author Fabien Potencier + * @author Florian Eckerstorfer + * @author Bernhard Schussek + */ +class ChoiceValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Choice) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Choice'); + } + + if (!is_array($constraint->choices) && !$constraint->callback) { + throw new ConstraintDefinitionException('Either "choices" or "callback" must be specified on constraint Choice'); + } + + if (null === $value) { + return; + } + + if ($constraint->multiple && !is_array($value)) { + throw new UnexpectedTypeException($value, 'array'); + } + + if ($constraint->callback) { + if (!is_callable($choices = array($this->context->getObject(), $constraint->callback)) + && !is_callable($choices = array($this->context->getClassName(), $constraint->callback)) + && !is_callable($choices = $constraint->callback) + ) { + throw new ConstraintDefinitionException('The Choice constraint expects a valid callback'); + } + $choices = call_user_func($choices); + } else { + $choices = $constraint->choices; + } + + if (false === $constraint->strict) { + @trigger_error('Setting the strict option of the Choice constraint to false is deprecated since version 3.2 and will be removed in 4.0.', E_USER_DEPRECATED); + } + + if ($constraint->multiple) { + foreach ($value as $_value) { + if (!in_array($_value, $choices, $constraint->strict)) { + $this->context->buildViolation($constraint->multipleMessage) + ->setParameter('{{ value }}', $this->formatValue($_value)) + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->setInvalidValue($_value) + ->addViolation(); + + return; + } + } + + $count = count($value); + + if ($constraint->min !== null && $count < $constraint->min) { + $this->context->buildViolation($constraint->minMessage) + ->setParameter('{{ limit }}', $constraint->min) + ->setPlural((int) $constraint->min) + ->setCode(Choice::TOO_FEW_ERROR) + ->addViolation(); + + return; + } + + if ($constraint->max !== null && $count > $constraint->max) { + $this->context->buildViolation($constraint->maxMessage) + ->setParameter('{{ limit }}', $constraint->max) + ->setPlural((int) $constraint->max) + ->setCode(Choice::TOO_MANY_ERROR) + ->addViolation(); + + return; + } + } elseif (!in_array($value, $choices, $constraint->strict)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Collection.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Collection.php new file mode 100644 index 0000000000000000000000000000000000000000..ac1edd3b5927229f138312de866debd892163688 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Collection.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Collection extends Composite +{ + const MISSING_FIELD_ERROR = '2fa2158c-2a7f-484b-98aa-975522539ff8'; + const NO_SUCH_FIELD_ERROR = '7703c766-b5d5-4cef-ace7-ae0dd82304e9'; + + protected static $errorNames = array( + self::MISSING_FIELD_ERROR => 'MISSING_FIELD_ERROR', + self::NO_SUCH_FIELD_ERROR => 'NO_SUCH_FIELD_ERROR', + ); + + public $fields = array(); + public $allowExtraFields = false; + public $allowMissingFields = false; + public $extraFieldsMessage = 'This field was not expected.'; + public $missingFieldsMessage = 'This field is missing.'; + + /** + * {@inheritdoc} + */ + public function __construct($options = null) + { + // no known options set? $options is the fields array + if (is_array($options) + && !array_intersect(array_keys($options), array('groups', 'fields', 'allowExtraFields', 'allowMissingFields', 'extraFieldsMessage', 'missingFieldsMessage'))) { + $options = array('fields' => $options); + } + + parent::__construct($options); + } + + /** + * {@inheritdoc} + */ + protected function initializeNestedConstraints() + { + parent::initializeNestedConstraints(); + + if (!is_array($this->fields)) { + throw new ConstraintDefinitionException(sprintf('The option "fields" is expected to be an array in constraint %s', __CLASS__)); + } + + foreach ($this->fields as $fieldName => $field) { + // the XmlFileLoader and YamlFileLoader pass the field Optional + // and Required constraint as an array with exactly one element + if (is_array($field) && count($field) == 1) { + $this->fields[$fieldName] = $field = $field[0]; + } + + if (!$field instanceof Optional && !$field instanceof Required) { + $this->fields[$fieldName] = $field = new Required($field); + } + } + } + + public function getRequiredOptions() + { + return array('fields'); + } + + protected function getCompositeOption() + { + return 'fields'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CollectionValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CollectionValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..f4a6d19ec75714e22110f72b46ce051bffcacc36 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CollectionValidator.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class CollectionValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Collection) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Collection'); + } + + if (null === $value) { + return; + } + + if (!is_array($value) && !($value instanceof \Traversable && $value instanceof \ArrayAccess)) { + throw new UnexpectedTypeException($value, 'array or Traversable and ArrayAccess'); + } + + // We need to keep the initialized context when CollectionValidator + // calls itself recursively (Collection constraints can be nested). + // Since the context of the validator is overwritten when initialize() + // is called for the nested constraint, the outer validator is + // acting on the wrong context when the nested validation terminates. + // + // A better solution - which should be approached in Symfony 3.0 - is to + // remove the initialize() method and pass the context as last argument + // to validate() instead. + $context = $this->context; + + foreach ($constraint->fields as $field => $fieldConstraint) { + // bug fix issue #2779 + $existsInArray = is_array($value) && array_key_exists($field, $value); + $existsInArrayAccess = $value instanceof \ArrayAccess && $value->offsetExists($field); + + if ($existsInArray || $existsInArrayAccess) { + if (count($fieldConstraint->constraints) > 0) { + $context->getValidator() + ->inContext($context) + ->atPath('['.$field.']') + ->validate($value[$field], $fieldConstraint->constraints); + } + } elseif (!$fieldConstraint instanceof Optional && !$constraint->allowMissingFields) { + $context->buildViolation($constraint->missingFieldsMessage) + ->atPath('['.$field.']') + ->setParameter('{{ field }}', $this->formatValue($field)) + ->setInvalidValue(null) + ->setCode(Collection::MISSING_FIELD_ERROR) + ->addViolation(); + } + } + + if (!$constraint->allowExtraFields) { + foreach ($value as $field => $fieldValue) { + if (!isset($constraint->fields[$field])) { + $context->buildViolation($constraint->extraFieldsMessage) + ->atPath('['.$field.']') + ->setParameter('{{ field }}', $this->formatValue($field)) + ->setInvalidValue($fieldValue) + ->setCode(Collection::NO_SUCH_FIELD_ERROR) + ->addViolation(); + } + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Composite.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Composite.php new file mode 100644 index 0000000000000000000000000000000000000000..ab8466bcfcbc4745a83f77739bff3973c0f93c0b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Composite.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\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * A constraint that is composed of other constraints. + * + * You should never use the nested constraint instances anywhere else, because + * their groups are adapted when passed to the constructor of this class. + * + * If you want to create your own composite constraint, extend this class and + * let {@link getCompositeOption()} return the name of the property which + * contains the nested constraints. + * + * @author Bernhard Schussek + */ +abstract class Composite extends Constraint +{ + /** + * {@inheritdoc} + * + * The groups of the composite and its nested constraints are made + * consistent using the following strategy: + * + * - If groups are passed explicitly to the composite constraint, but + * not to the nested constraints, the options of the composite + * constraint are copied to the nested constraints; + * + * - If groups are passed explicitly to the nested constraints, but not + * to the composite constraint, the groups of all nested constraints + * are merged and used as groups for the composite constraint; + * + * - If groups are passed explicitly to both the composite and its nested + * constraints, the groups of the nested constraints must be a subset + * of the groups of the composite constraint. If not, a + * {@link ConstraintDefinitionException} is thrown. + * + * All this is done in the constructor, because constraints can then be + * cached. When constraints are loaded from the cache, no more group + * checks need to be done. + */ + public function __construct($options = null) + { + parent::__construct($options); + + $this->initializeNestedConstraints(); + + /* @var Constraint[] $nestedConstraints */ + $compositeOption = $this->getCompositeOption(); + $nestedConstraints = $this->$compositeOption; + + if (!is_array($nestedConstraints)) { + $nestedConstraints = array($nestedConstraints); + } + + foreach ($nestedConstraints as $constraint) { + if (!$constraint instanceof Constraint) { + throw new ConstraintDefinitionException(sprintf('The value %s is not an instance of Constraint in constraint %s', $constraint, get_class($this))); + } + + if ($constraint instanceof Valid) { + throw new ConstraintDefinitionException(sprintf('The constraint Valid cannot be nested inside constraint %s. You can only declare the Valid constraint directly on a field or method.', get_class($this))); + } + } + + if (!property_exists($this, 'groups')) { + $mergedGroups = array(); + + foreach ($nestedConstraints as $constraint) { + foreach ($constraint->groups as $group) { + $mergedGroups[$group] = true; + } + } + + $this->groups = array_keys($mergedGroups); + $this->$compositeOption = $nestedConstraints; + + return; + } + + foreach ($nestedConstraints as $constraint) { + if (property_exists($constraint, 'groups')) { + $excessGroups = array_diff($constraint->groups, $this->groups); + + if (count($excessGroups) > 0) { + throw new ConstraintDefinitionException(sprintf( + 'The group(s) "%s" passed to the constraint %s '. + 'should also be passed to its containing constraint %s', + implode('", "', $excessGroups), + get_class($constraint), + get_class($this) + )); + } + } else { + $constraint->groups = $this->groups; + } + } + + $this->$compositeOption = $nestedConstraints; + } + + /** + * {@inheritdoc} + * + * Implicit group names are forwarded to nested constraints. + * + * @param string $group + */ + public function addImplicitGroupName($group) + { + parent::addImplicitGroupName($group); + + /** @var Constraint[] $nestedConstraints */ + $nestedConstraints = $this->{$this->getCompositeOption()}; + + foreach ($nestedConstraints as $constraint) { + $constraint->addImplicitGroupName($group); + } + } + + /** + * Returns the name of the property that contains the nested constraints. + * + * @return string The property name + */ + abstract protected function getCompositeOption(); + + /** + * Initializes the nested constraints. + * + * This method can be overwritten in subclasses to clean up the nested + * constraints passed to the constructor. + * + * @see Collection::initializeNestedConstraints() + */ + protected function initializeNestedConstraints() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Count.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Count.php new file mode 100644 index 0000000000000000000000000000000000000000..53870fb5973193a6c354495adc9a7e42ebd3de5c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Count.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\MissingOptionsException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Count extends Constraint +{ + const TOO_FEW_ERROR = 'bef8e338-6ae5-4caf-b8e2-50e7b0579e69'; + const TOO_MANY_ERROR = '756b1212-697c-468d-a9ad-50dd783bb169'; + + protected static $errorNames = array( + self::TOO_FEW_ERROR => 'TOO_FEW_ERROR', + self::TOO_MANY_ERROR => 'TOO_MANY_ERROR', + ); + + public $minMessage = 'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.'; + public $maxMessage = 'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.'; + public $exactMessage = 'This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.'; + public $min; + public $max; + + public function __construct($options = null) + { + if (null !== $options && !is_array($options)) { + $options = array( + 'min' => $options, + 'max' => $options, + ); + } + + parent::__construct($options); + + if (null === $this->min && null === $this->max) { + throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CountValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CountValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..69c8257206b56349b7c04c6594f6101a96c61904 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CountValidator.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class CountValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (null === $value) { + return; + } + + if (!is_array($value) && !$value instanceof \Countable) { + throw new UnexpectedTypeException($value, 'array or \Countable'); + } + + $count = count($value); + + if (null !== $constraint->max && $count > $constraint->max) { + $this->context->buildViolation($constraint->min == $constraint->max ? $constraint->exactMessage : $constraint->maxMessage) + ->setParameter('{{ count }}', $count) + ->setParameter('{{ limit }}', $constraint->max) + ->setInvalidValue($value) + ->setPlural((int) $constraint->max) + ->setCode(Count::TOO_MANY_ERROR) + ->addViolation(); + + return; + } + + if (null !== $constraint->min && $count < $constraint->min) { + $this->context->buildViolation($constraint->min == $constraint->max ? $constraint->exactMessage : $constraint->minMessage) + ->setParameter('{{ count }}', $count) + ->setParameter('{{ limit }}', $constraint->min) + ->setInvalidValue($value) + ->setPlural((int) $constraint->min) + ->setCode(Count::TOO_FEW_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Country.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Country.php new file mode 100644 index 0000000000000000000000000000000000000000..1b76570a8c5fdda480e6e4473a29322867fa1cad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Country.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Country extends Constraint +{ + const NO_SUCH_COUNTRY_ERROR = '8f900c12-61bd-455d-9398-996cd040f7f0'; + + protected static $errorNames = array( + self::NO_SUCH_COUNTRY_ERROR => 'NO_SUCH_COUNTRY_ERROR', + ); + + public $message = 'This value is not a valid country.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CountryValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CountryValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..3cea3b738467867a6eca3d23670df0e397dcf778 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CountryValidator.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\Component\Validator\Constraints; + +use Symfony\Component\Intl\Intl; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid country code. + * + * @author Bernhard Schussek + */ +class CountryValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Country) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Country'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $countries = Intl::getRegionBundle()->getCountryNames(); + + if (!isset($countries[$value])) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Country::NO_SUCH_COUNTRY_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Currency.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Currency.php new file mode 100644 index 0000000000000000000000000000000000000000..d28f94cb66a74c036b65e5b2be6036415ae3357d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Currency.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\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Miha Vrhovnik + * @author Bernhard Schussek + */ +class Currency extends Constraint +{ + const NO_SUCH_CURRENCY_ERROR = '69945ac1-2db4-405f-bec7-d2772f73df52'; + + protected static $errorNames = array( + self::NO_SUCH_CURRENCY_ERROR => 'NO_SUCH_CURRENCY_ERROR', + ); + + public $message = 'This value is not a valid currency.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CurrencyValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CurrencyValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..a110bec6054fec93d0e348e50fc55f60b345df6f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/CurrencyValidator.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Intl\Intl; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid currency. + * + * @author Miha Vrhovnik + * @author Bernhard Schussek + */ +class CurrencyValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Currency) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Currency'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $currencies = Intl::getCurrencyBundle()->getCurrencyNames(); + + if (!isset($currencies[$value])) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Currency::NO_SUCH_CURRENCY_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Date.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Date.php new file mode 100644 index 0000000000000000000000000000000000000000..256341312246cb971895aed18a7c3f311cfb1b8d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Date.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Date extends Constraint +{ + const INVALID_FORMAT_ERROR = '69819696-02ac-4a99-9ff0-14e127c4d1bc'; + const INVALID_DATE_ERROR = '3c184ce5-b31d-4de7-8b76-326da7b2be93'; + + protected static $errorNames = array( + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + self::INVALID_DATE_ERROR => 'INVALID_DATE_ERROR', + ); + + public $message = 'This value is not a valid date.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateTime.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateTime.php new file mode 100644 index 0000000000000000000000000000000000000000..c65f185ae428ce4b1a65aadc437ee45b77bd0da0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateTime.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\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class DateTime extends Constraint +{ + const INVALID_FORMAT_ERROR = '1a9da513-2640-4f84-9b6a-4d99dcddc628'; + const INVALID_DATE_ERROR = 'd52afa47-620d-4d99-9f08-f4d85b36e33c'; + const INVALID_TIME_ERROR = '5e797c9d-74f7-4098-baa3-94390c447b27'; + + protected static $errorNames = array( + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + self::INVALID_DATE_ERROR => 'INVALID_DATE_ERROR', + self::INVALID_TIME_ERROR => 'INVALID_TIME_ERROR', + ); + + public $format = 'Y-m-d H:i:s'; + public $message = 'This value is not a valid datetime.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateTimeValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateTimeValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..af956ee06b583fae9e8f466d9ece8881768babe4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateTimeValidator.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + * @author Diego Saint Esteben + */ +class DateTimeValidator extends DateValidator +{ + /** + * @deprecated since version 3.1, to be removed in 4.0. + */ + const PATTERN = '/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/'; + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof DateTime) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\DateTime'); + } + + if (null === $value || '' === $value || $value instanceof \DateTimeInterface) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + \DateTime::createFromFormat($constraint->format, $value); + + $errors = \DateTime::getLastErrors(); + + if (0 < $errors['error_count']) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(DateTime::INVALID_FORMAT_ERROR) + ->addViolation(); + + return; + } + + foreach ($errors['warnings'] as $warning) { + if ('The parsed date was invalid' === $warning) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(DateTime::INVALID_DATE_ERROR) + ->addViolation(); + } elseif ('The parsed time was invalid' === $warning) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(DateTime::INVALID_TIME_ERROR) + ->addViolation(); + } else { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(DateTime::INVALID_FORMAT_ERROR) + ->addViolation(); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..ed836de9aced2e9564efb6473f859079d7770eed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/DateValidator.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class DateValidator extends ConstraintValidator +{ + const PATTERN = '/^(\d{4})-(\d{2})-(\d{2})$/'; + + /** + * Checks whether a date is valid. + * + * @param int $year The year + * @param int $month The month + * @param int $day The day + * + * @return bool Whether the date is valid + * + * @internal + */ + public static function checkDate($year, $month, $day) + { + return checkdate($month, $day, $year); + } + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Date) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Date'); + } + + if (null === $value || '' === $value || $value instanceof \DateTimeInterface) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if (!preg_match(static::PATTERN, $value, $matches)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Date::INVALID_FORMAT_ERROR) + ->addViolation(); + + return; + } + + if (!self::checkDate($matches[1], $matches[2], $matches[3])) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Date::INVALID_DATE_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Email.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Email.php new file mode 100644 index 0000000000000000000000000000000000000000..a9d9ab15391fa2da7bfb9402c0daebfcb9559713 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Email.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Email extends Constraint +{ + const INVALID_FORMAT_ERROR = 'bd79c0ab-ddba-46cc-a703-a7a4b08de310'; + const MX_CHECK_FAILED_ERROR = 'bf447c1c-0266-4e10-9c6c-573df282e413'; + const HOST_CHECK_FAILED_ERROR = '7da53a8b-56f3-4288-bb3e-ee9ede4ef9a1'; + + protected static $errorNames = array( + self::INVALID_FORMAT_ERROR => 'STRICT_CHECK_FAILED_ERROR', + self::MX_CHECK_FAILED_ERROR => 'MX_CHECK_FAILED_ERROR', + self::HOST_CHECK_FAILED_ERROR => 'HOST_CHECK_FAILED_ERROR', + ); + + public $message = 'This value is not a valid email address.'; + public $checkMX = false; + public $checkHost = false; + public $strict; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EmailValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EmailValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..2d779e68809b2fb0c932652b49be2cd43787f7da --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EmailValidator.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\Component\Validator\Constraints; + +use Egulias\EmailValidator\Validation\EmailValidation; +use Egulias\EmailValidator\Validation\NoRFCWarningsValidation; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\RuntimeException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class EmailValidator extends ConstraintValidator +{ + /** + * @var bool + */ + private $isStrict; + + public function __construct($strict = false) + { + $this->isStrict = $strict; + } + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Email) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Email'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if (null === $constraint->strict) { + $constraint->strict = $this->isStrict; + } + + if ($constraint->strict) { + if (!class_exists('\Egulias\EmailValidator\EmailValidator')) { + throw new RuntimeException('Strict email validation requires egulias/email-validator ~1.2|~2.0'); + } + + $strictValidator = new \Egulias\EmailValidator\EmailValidator(); + + if (interface_exists(EmailValidation::class) && !$strictValidator->isValid($value, new NoRFCWarningsValidation())) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::INVALID_FORMAT_ERROR) + ->addViolation(); + + return; + } elseif (!interface_exists(EmailValidation::class) && !$strictValidator->isValid($value, false, true)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::INVALID_FORMAT_ERROR) + ->addViolation(); + + return; + } + } elseif (!preg_match('/^.+\@\S+\.\S+$/', $value)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::INVALID_FORMAT_ERROR) + ->addViolation(); + + return; + } + + $host = substr($value, strrpos($value, '@') + 1); + + // Check for host DNS resource records + if ($constraint->checkMX) { + if (!$this->checkMX($host)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::MX_CHECK_FAILED_ERROR) + ->addViolation(); + } + + return; + } + + if ($constraint->checkHost && !$this->checkHost($host)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Email::HOST_CHECK_FAILED_ERROR) + ->addViolation(); + } + } + + /** + * Check DNS Records for MX type. + * + * @param string $host Host + * + * @return bool + */ + private function checkMX($host) + { + return checkdnsrr($host, 'MX'); + } + + /** + * Check if one of MX, A or AAAA DNS RR exists. + * + * @param string $host Host + * + * @return bool + */ + private function checkHost($host) + { + return $this->checkMX($host) || (checkdnsrr($host, 'A') || checkdnsrr($host, 'AAAA')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EqualTo.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EqualTo.php new file mode 100644 index 0000000000000000000000000000000000000000..4b22c6dcca3e1d3f8f92ce434d7f5c77655e3632 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EqualTo.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\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class EqualTo extends AbstractComparison +{ + const NOT_EQUAL_ERROR = '478618a7-95ba-473d-9101-cabd45e49115'; + + protected static $errorNames = array( + self::NOT_EQUAL_ERROR => 'NOT_EQUAL_ERROR', + ); + + public $message = 'This value should be equal to {{ compared_value }}.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EqualToValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EqualToValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..fe1f3620fff2970018df9e312a3517bda6729982 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/EqualToValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are equal (==). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class EqualToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 == $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return EqualTo::NOT_EQUAL_ERROR; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Existence.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Existence.php new file mode 100644 index 0000000000000000000000000000000000000000..5ea6ffe643eecf97450bb2da2005a58f19248b42 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Existence.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\Validator\Constraints; + +/** + * @author Bernhard Schussek + */ +abstract class Existence extends Composite +{ + public $constraints = array(); + + public function getDefaultOption() + { + return 'constraints'; + } + + protected function getCompositeOption() + { + return 'constraints'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Expression.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Expression.php new file mode 100644 index 0000000000000000000000000000000000000000..3329bd249402882f5ec3f721296e8261c8bfc207 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Expression.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\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Fabien Potencier + * @author Bernhard Schussek + */ +class Expression extends Constraint +{ + const EXPRESSION_FAILED_ERROR = '6b3befbc-2f01-4ddf-be21-b57898905284'; + + protected static $errorNames = array( + self::EXPRESSION_FAILED_ERROR => 'EXPRESSION_FAILED_ERROR', + ); + + public $message = 'This value is not valid.'; + public $expression; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'expression'; + } + + /** + * {@inheritdoc} + */ + public function getRequiredOptions() + { + return array('expression'); + } + + /** + * {@inheritdoc} + */ + public function getTargets() + { + return array(self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT); + } + + /** + * {@inheritdoc} + */ + public function validatedBy() + { + return 'validator.expression'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..e2f3139af73b85652904c5ea7bb53d85c26e38c2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\ExpressionLanguage\ExpressionLanguage; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\RuntimeException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Fabien Potencier + * @author Bernhard Schussek + */ +class ExpressionValidator extends ConstraintValidator +{ + /** + * @var ExpressionLanguage + */ + private $expressionLanguage; + + public function __construct($propertyAccessor = null, ExpressionLanguage $expressionLanguage = null) + { + $this->expressionLanguage = $expressionLanguage; + } + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Expression) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Expression'); + } + + $variables = array(); + $variables['value'] = $value; + $variables['this'] = $this->context->getObject(); + + if (!$this->getExpressionLanguage()->evaluate($constraint->expression, $variables)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->addViolation(); + } + } + + private function getExpressionLanguage() + { + if (null === $this->expressionLanguage) { + if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) { + throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); + } + $this->expressionLanguage = new ExpressionLanguage(); + } + + return $this->expressionLanguage; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/File.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/File.php new file mode 100644 index 0000000000000000000000000000000000000000..341fbaf4407757920e9af04f33e32c3845d19fae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/File.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class File extends Constraint +{ + // Check the Image constraint for clashes if adding new constants here + + const NOT_FOUND_ERROR = 'd2a3fb6e-7ddc-4210-8fbf-2ab345ce1998'; + const NOT_READABLE_ERROR = 'c20c92a4-5bfa-4202-9477-28e800e0f6ff'; + const EMPTY_ERROR = '5d743385-9775-4aa5-8ff5-495fb1e60137'; + const TOO_LARGE_ERROR = 'df8637af-d466-48c6-a59d-e7126250a654'; + const INVALID_MIME_TYPE_ERROR = '744f00bc-4389-4c74-92de-9a43cde55534'; + + protected static $errorNames = array( + self::NOT_FOUND_ERROR => 'NOT_FOUND_ERROR', + self::NOT_READABLE_ERROR => 'NOT_READABLE_ERROR', + self::EMPTY_ERROR => 'EMPTY_ERROR', + self::TOO_LARGE_ERROR => 'TOO_LARGE_ERROR', + self::INVALID_MIME_TYPE_ERROR => 'INVALID_MIME_TYPE_ERROR', + ); + + public $binaryFormat; + public $mimeTypes = array(); + public $notFoundMessage = 'The file could not be found.'; + public $notReadableMessage = 'The file is not readable.'; + public $maxSizeMessage = 'The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.'; + public $mimeTypesMessage = 'The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.'; + public $disallowEmptyMessage = 'An empty file is not allowed.'; + + public $uploadIniSizeErrorMessage = 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.'; + public $uploadFormSizeErrorMessage = 'The file is too large.'; + public $uploadPartialErrorMessage = 'The file was only partially uploaded.'; + public $uploadNoFileErrorMessage = 'No file was uploaded.'; + public $uploadNoTmpDirErrorMessage = 'No temporary folder was configured in php.ini.'; + public $uploadCantWriteErrorMessage = 'Cannot write temporary file to disk.'; + public $uploadExtensionErrorMessage = 'A PHP extension caused the upload to fail.'; + public $uploadErrorMessage = 'The file could not be uploaded.'; + + protected $maxSize; + + public function __construct($options = null) + { + parent::__construct($options); + + if (null !== $this->maxSize) { + $this->normalizeBinaryFormat($this->maxSize); + } + } + + public function __set($option, $value) + { + if ('maxSize' === $option) { + $this->normalizeBinaryFormat($value); + + return; + } + + parent::__set($option, $value); + } + + public function __get($option) + { + if ('maxSize' === $option) { + return $this->maxSize; + } + + return parent::__get($option); + } + + private function normalizeBinaryFormat($maxSize) + { + $sizeInt = (int) $maxSize; + + if (ctype_digit((string) $maxSize)) { + $this->maxSize = $sizeInt; + $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; + } elseif (preg_match('/^\d++k$/i', $maxSize)) { + $this->maxSize = $sizeInt * 1000; + $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; + } elseif (preg_match('/^\d++M$/i', $maxSize)) { + $this->maxSize = $sizeInt * 1000000; + $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; + } elseif (preg_match('/^\d++Ki$/i', $maxSize)) { + $this->maxSize = $sizeInt << 10; + $this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat; + } elseif (preg_match('/^\d++Mi$/i', $maxSize)) { + $this->maxSize = $sizeInt << 20; + $this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat; + } else { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum size', $this->maxSize)); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/FileValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/FileValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..e752f2a1e6502951295ce54481a17a219094c986 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/FileValidator.php @@ -0,0 +1,238 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\HttpFoundation\File\File as FileObject; +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class FileValidator extends ConstraintValidator +{ + const KB_BYTES = 1000; + const MB_BYTES = 1000000; + const KIB_BYTES = 1024; + const MIB_BYTES = 1048576; + + private static $suffices = array( + 1 => 'bytes', + self::KB_BYTES => 'kB', + self::MB_BYTES => 'MB', + self::KIB_BYTES => 'KiB', + self::MIB_BYTES => 'MiB', + ); + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof File) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\File'); + } + + if (null === $value || '' === $value) { + return; + } + + if ($value instanceof UploadedFile && !$value->isValid()) { + switch ($value->getError()) { + case UPLOAD_ERR_INI_SIZE: + $iniLimitSize = UploadedFile::getMaxFilesize(); + if ($constraint->maxSize && $constraint->maxSize < $iniLimitSize) { + $limitInBytes = $constraint->maxSize; + $binaryFormat = $constraint->binaryFormat; + } else { + $limitInBytes = $iniLimitSize; + $binaryFormat = true; + } + + list($sizeAsString, $limitAsString, $suffix) = $this->factorizeSizes(0, $limitInBytes, $binaryFormat); + $this->context->buildViolation($constraint->uploadIniSizeErrorMessage) + ->setParameter('{{ limit }}', $limitAsString) + ->setParameter('{{ suffix }}', $suffix) + ->setCode(UPLOAD_ERR_INI_SIZE) + ->addViolation(); + + return; + case UPLOAD_ERR_FORM_SIZE: + $this->context->buildViolation($constraint->uploadFormSizeErrorMessage) + ->setCode(UPLOAD_ERR_FORM_SIZE) + ->addViolation(); + + return; + case UPLOAD_ERR_PARTIAL: + $this->context->buildViolation($constraint->uploadPartialErrorMessage) + ->setCode(UPLOAD_ERR_PARTIAL) + ->addViolation(); + + return; + case UPLOAD_ERR_NO_FILE: + $this->context->buildViolation($constraint->uploadNoFileErrorMessage) + ->setCode(UPLOAD_ERR_NO_FILE) + ->addViolation(); + + return; + case UPLOAD_ERR_NO_TMP_DIR: + $this->context->buildViolation($constraint->uploadNoTmpDirErrorMessage) + ->setCode(UPLOAD_ERR_NO_TMP_DIR) + ->addViolation(); + + return; + case UPLOAD_ERR_CANT_WRITE: + $this->context->buildViolation($constraint->uploadCantWriteErrorMessage) + ->setCode(UPLOAD_ERR_CANT_WRITE) + ->addViolation(); + + return; + case UPLOAD_ERR_EXTENSION: + $this->context->buildViolation($constraint->uploadExtensionErrorMessage) + ->setCode(UPLOAD_ERR_EXTENSION) + ->addViolation(); + + return; + default: + $this->context->buildViolation($constraint->uploadErrorMessage) + ->setCode($value->getError()) + ->addViolation(); + + return; + } + } + + if (!is_scalar($value) && !$value instanceof FileObject && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $path = $value instanceof FileObject ? $value->getPathname() : (string) $value; + + if (!is_file($path)) { + $this->context->buildViolation($constraint->notFoundMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setCode(File::NOT_FOUND_ERROR) + ->addViolation(); + + return; + } + + if (!is_readable($path)) { + $this->context->buildViolation($constraint->notReadableMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setCode(File::NOT_READABLE_ERROR) + ->addViolation(); + + return; + } + + $sizeInBytes = filesize($path); + + if (0 === $sizeInBytes) { + $this->context->buildViolation($constraint->disallowEmptyMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setCode(File::EMPTY_ERROR) + ->addViolation(); + + return; + } + + if ($constraint->maxSize) { + $limitInBytes = $constraint->maxSize; + + if ($sizeInBytes > $limitInBytes) { + list($sizeAsString, $limitAsString, $suffix) = $this->factorizeSizes($sizeInBytes, $limitInBytes, $constraint->binaryFormat); + $this->context->buildViolation($constraint->maxSizeMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setParameter('{{ size }}', $sizeAsString) + ->setParameter('{{ limit }}', $limitAsString) + ->setParameter('{{ suffix }}', $suffix) + ->setCode(File::TOO_LARGE_ERROR) + ->addViolation(); + + return; + } + } + + if ($constraint->mimeTypes) { + if (!$value instanceof FileObject) { + $value = new FileObject($value); + } + + $mimeTypes = (array) $constraint->mimeTypes; + $mime = $value->getMimeType(); + + foreach ($mimeTypes as $mimeType) { + if ($mimeType === $mime) { + return; + } + + if ($discrete = strstr($mimeType, '/*', true)) { + if (strstr($mime, '/', true) === $discrete) { + return; + } + } + } + + $this->context->buildViolation($constraint->mimeTypesMessage) + ->setParameter('{{ file }}', $this->formatValue($path)) + ->setParameter('{{ type }}', $this->formatValue($mime)) + ->setParameter('{{ types }}', $this->formatValues($mimeTypes)) + ->setCode(File::INVALID_MIME_TYPE_ERROR) + ->addViolation(); + } + } + + private static function moreDecimalsThan($double, $numberOfDecimals) + { + return strlen((string) $double) > strlen(round($double, $numberOfDecimals)); + } + + /** + * Convert the limit to the smallest possible number + * (i.e. try "MB", then "kB", then "bytes"). + */ + private function factorizeSizes($size, $limit, $binaryFormat) + { + if ($binaryFormat) { + $coef = self::MIB_BYTES; + $coefFactor = self::KIB_BYTES; + } else { + $coef = self::MB_BYTES; + $coefFactor = self::KB_BYTES; + } + + $limitAsString = (string) ($limit / $coef); + + // Restrict the limit to 2 decimals (without rounding! we + // need the precise value) + while (self::moreDecimalsThan($limitAsString, 2)) { + $coef /= $coefFactor; + $limitAsString = (string) ($limit / $coef); + } + + // Convert size to the same measure, but round to 2 decimals + $sizeAsString = (string) round($size / $coef, 2); + + // If the size and limit produce the same string output + // (due to rounding), reduce the coefficient + while ($sizeAsString === $limitAsString) { + $coef /= $coefFactor; + $limitAsString = (string) ($limit / $coef); + $sizeAsString = (string) round($size / $coef, 2); + } + + return array($sizeAsString, $limitAsString, self::$suffices[$coef]); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThan.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThan.php new file mode 100644 index 0000000000000000000000000000000000000000..c2ca2dcb82f2369521bd889630290d21fed4a85e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThan.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\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class GreaterThan extends AbstractComparison +{ + const TOO_LOW_ERROR = '778b7ae0-84d3-481a-9dec-35fdb64b1d78'; + + protected static $errorNames = array( + self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', + ); + + public $message = 'This value should be greater than {{ compared_value }}.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php new file mode 100644 index 0000000000000000000000000000000000000000..9b3743d07321935256bcf1241baac8e75ef06b41 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.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\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class GreaterThanOrEqual extends AbstractComparison +{ + const TOO_LOW_ERROR = 'ea4e51d1-3342-48bd-87f1-9e672cd90cad'; + + protected static $errorNames = array( + self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', + ); + + public $message = 'This value should be greater than or equal to {{ compared_value }}.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqualValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqualValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..e196e688f3476347ba08b427531bf92fa96916a2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqualValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are greater than or equal to the previous (>=). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class GreaterThanOrEqualValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 >= $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return GreaterThanOrEqual::TOO_LOW_ERROR; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..9029e8fc46a80a4d9c7cde1b4b59d736ba4a119f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GreaterThanValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are greater than the previous (>). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class GreaterThanValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 > $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return GreaterThan::TOO_LOW_ERROR; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GroupSequence.php new file mode 100644 index 0000000000000000000000000000000000000000..1f6f512811ec78178f013d4207791a22778d8020 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * A sequence of validation groups. + * + * When validating a group sequence, each group will only be validated if all + * of the previous groups in the sequence succeeded. For example: + * + * $validator->validate($address, null, new GroupSequence(array('Basic', 'Strict'))); + * + * In the first step, all constraints that belong to the group "Basic" will be + * validated. If none of the constraints fail, the validator will then validate + * the constraints in group "Strict". This is useful, for example, if "Strict" + * contains expensive checks that require a lot of CPU or slow, external + * services. You usually don't want to run expensive checks if any of the cheap + * checks fail. + * + * When adding metadata to a class, you can override the "Default" group of + * that class with a group sequence: + * + * /** + * * @GroupSequence({"Address", "Strict"}) + * *\/ + * class Address + * { + * // ... + * } + * + * Whenever you validate that object in the "Default" group, the group sequence + * will be validated: + * + * $validator->validate($address); + * + * If you want to execute the constraints of the "Default" group for a class + * with an overridden default group, pass the class name as group name instead: + * + * $validator->validate($address, null, "Address") + * + * @Annotation + * @Target({"CLASS", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class GroupSequence +{ + /** + * The groups in the sequence. + * + * @var string[]|array[]|GroupSequence[] + */ + public $groups; + + /** + * The group in which cascaded objects are validated when validating + * this sequence. + * + * By default, cascaded objects are validated in each of the groups of + * the sequence. + * + * If a class has a group sequence attached, that sequence replaces the + * "Default" group. When validating that class in the "Default" group, the + * group sequence is used instead, but still the "Default" group should be + * cascaded to other objects. + * + * @var string|GroupSequence + */ + public $cascadedGroup; + + /** + * Creates a new group sequence. + * + * @param string[] $groups The groups in the sequence + */ + public function __construct(array $groups) + { + // Support for Doctrine annotations + $this->groups = isset($groups['value']) ? $groups['value'] : $groups; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GroupSequenceProvider.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GroupSequenceProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..8a3fe6300f6eb9621526d0170c394c12c7cb20a9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/GroupSequenceProvider.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Annotation to define a group sequence provider. + * + * @Annotation + * @Target({"CLASS", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class GroupSequenceProvider +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Iban.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Iban.php new file mode 100644 index 0000000000000000000000000000000000000000..bcb30655aa44b041f1ce89179331716ab18ccccc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Iban.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Manuel Reinhard + * @author Michael Schummel + * @author Bernhard Schussek + */ +class Iban extends Constraint +{ + const INVALID_COUNTRY_CODE_ERROR = 'de78ee2c-bd50-44e2-aec8-3d8228aeadb9'; + const INVALID_CHARACTERS_ERROR = '8d3d85e4-784f-4719-a5bc-d9e40d45a3a5'; + const CHECKSUM_FAILED_ERROR = 'b9401321-f9bf-4dcb-83c1-f31094440795'; + const INVALID_FORMAT_ERROR = 'c8d318f1-2ecc-41ba-b983-df70d225cf5a'; + const NOT_SUPPORTED_COUNTRY_CODE_ERROR = 'e2c259f3-4b46-48e6-b72e-891658158ec8'; + + protected static $errorNames = array( + self::INVALID_COUNTRY_CODE_ERROR => 'INVALID_COUNTRY_CODE_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + self::NOT_SUPPORTED_COUNTRY_CODE_ERROR => 'NOT_SUPPORTED_COUNTRY_CODE_ERROR', + ); + + public $message = 'This is not a valid International Bank Account Number (IBAN).'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IbanValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IbanValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..541c7161bccd0b42058bfc936a0761d7fbe55543 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IbanValidator.php @@ -0,0 +1,258 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Manuel Reinhard + * @author Michael Schummel + * @author Bernhard Schussek + * + * @see http://www.michael-schummel.de/2007/10/05/iban-prufung-mit-php/ + */ +class IbanValidator extends ConstraintValidator +{ + /** + * IBAN country specific formats. + * + * The first 2 characters from an IBAN format are the two-character ISO country code. + * The following 2 characters represent the check digits calculated from the rest of the IBAN characters. + * The rest are up to thirty alphanumeric characters for + * a BBAN (Basic Bank Account Number) which has a fixed length per country and, + * included within it, a bank identifier with a fixed position and a fixed length per country + * + * @see http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf + * + * @var array + */ + private static $formats = array( + 'AD' => 'AD\d{2}\d{4}\d{4}[\dA-Z]{12}', // Andorra + 'AE' => 'AE\d{2}\d{3}\d{16}', // United Arab Emirates + 'AL' => 'AL\d{2}\d{8}[\dA-Z]{16}', // Albania + 'AO' => 'AO\d{2}\d{21}', // Angola + 'AT' => 'AT\d{2}\d{5}\d{11}', // Austria + 'AX' => 'FI\d{2}\d{6}\d{7}\d{1}', // Aland Islands + 'AZ' => 'AZ\d{2}[A-Z]{4}[\dA-Z]{20}', // Azerbaijan + 'BA' => 'BA\d{2}\d{3}\d{3}\d{8}\d{2}', // Bosnia and Herzegovina + 'BE' => 'BE\d{2}\d{3}\d{7}\d{2}', // Belgium + 'BF' => 'BF\d{2}\d{23}', // Burkina Faso + 'BG' => 'BG\d{2}[A-Z]{4}\d{4}\d{2}[\dA-Z]{8}', // Bulgaria + 'BH' => 'BH\d{2}[A-Z]{4}[\dA-Z]{14}', // Bahrain + 'BI' => 'BI\d{2}\d{12}', // Burundi + 'BJ' => 'BJ\d{2}[A-Z]{1}\d{23}', // Benin + 'BL' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Saint Barthelemy + 'BR' => 'BR\d{2}\d{8}\d{5}\d{10}[A-Z][\dA-Z]', // Brazil + 'CG' => 'CG\d{2}\d{23}', // Congo + 'CH' => 'CH\d{2}\d{5}[\dA-Z]{12}', // Switzerland + 'CI' => 'CI\d{2}[A-Z]{1}\d{23}', // Ivory Coast + 'CM' => 'CM\d{2}\d{23}', // Cameron + 'CR' => 'CR\d{2}\d{3}\d{14}', // Costa Rica + 'CV' => 'CV\d{2}\d{21}', // Cape Verde + 'CY' => 'CY\d{2}\d{3}\d{5}[\dA-Z]{16}', // Cyprus + 'CZ' => 'CZ\d{2}\d{20}', // Czech Republic + 'DE' => 'DE\d{2}\d{8}\d{10}', // Germany + 'DO' => 'DO\d{2}[\dA-Z]{4}\d{20}', // Dominican Republic + 'DK' => 'DK\d{2}\d{4}\d{10}', // Denmark + 'DZ' => 'DZ\d{2}\d{20}', // Algeria + 'EE' => 'EE\d{2}\d{2}\d{2}\d{11}\d{1}', // Estonia + 'ES' => 'ES\d{2}\d{4}\d{4}\d{1}\d{1}\d{10}', // Spain (also includes Canary Islands, Ceuta and Melilla) + 'FI' => 'FI\d{2}\d{6}\d{7}\d{1}', // Finland + 'FO' => 'FO\d{2}\d{4}\d{9}\d{1}', // Faroe Islands + 'FR' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // France + 'GF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // French Guyana + 'GB' => 'GB\d{2}[A-Z]{4}\d{6}\d{8}', // United Kingdom of Great Britain and Northern Ireland + 'GE' => 'GE\d{2}[A-Z]{2}\d{16}', // Georgia + 'GI' => 'GI\d{2}[A-Z]{4}[\dA-Z]{15}', // Gibraltar + 'GL' => 'GL\d{2}\d{4}\d{9}\d{1}', // Greenland + 'GP' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Guadeloupe + 'GR' => 'GR\d{2}\d{3}\d{4}[\dA-Z]{16}', // Greece + 'GT' => 'GT\d{2}[\dA-Z]{4}[\dA-Z]{20}', // Guatemala + 'HR' => 'HR\d{2}\d{7}\d{10}', // Croatia + 'HU' => 'HU\d{2}\d{3}\d{4}\d{1}\d{15}\d{1}', // Hungary + 'IE' => 'IE\d{2}[A-Z]{4}\d{6}\d{8}', // Ireland + 'IL' => 'IL\d{2}\d{3}\d{3}\d{13}', // Israel + 'IR' => 'IR\d{2}\d{22}', // Iran + 'IS' => 'IS\d{2}\d{4}\d{2}\d{6}\d{10}', // Iceland + 'IT' => 'IT\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}', // Italy + 'JO' => 'JO\d{2}[A-Z]{4}\d{4}[\dA-Z]{18}', // Jordan + 'KW' => 'KW\d{2}[A-Z]{4}\d{22}', // KUWAIT + 'KZ' => 'KZ\d{2}\d{3}[\dA-Z]{13}', // Kazakhstan + 'LB' => 'LB\d{2}\d{4}[\dA-Z]{20}', // LEBANON + 'LI' => 'LI\d{2}\d{5}[\dA-Z]{12}', // Liechtenstein (Principality of) + 'LT' => 'LT\d{2}\d{5}\d{11}', // Lithuania + 'LU' => 'LU\d{2}\d{3}[\dA-Z]{13}', // Luxembourg + 'LV' => 'LV\d{2}[A-Z]{4}[\dA-Z]{13}', // Latvia + 'MC' => 'MC\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Monaco + 'MD' => 'MD\d{2}[\dA-Z]{2}[\dA-Z]{18}', // Moldova + 'ME' => 'ME\d{2}\d{3}\d{13}\d{2}', // Montenegro + 'MF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Saint Martin (French part) + 'MG' => 'MG\d{2}\d{23}', // Madagascar + 'MK' => 'MK\d{2}\d{3}[\dA-Z]{10}\d{2}', // Macedonia, Former Yugoslav Republic of + 'ML' => 'ML\d{2}[A-Z]{1}\d{23}', // Mali + 'MQ' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Martinique + 'MR' => 'MR13\d{5}\d{5}\d{11}\d{2}', // Mauritania + 'MT' => 'MT\d{2}[A-Z]{4}\d{5}[\dA-Z]{18}', // Malta + 'MU' => 'MU\d{2}[A-Z]{4}\d{2}\d{2}\d{12}\d{3}[A-Z]{3}', // Mauritius + 'MZ' => 'MZ\d{2}\d{21}', // Mozambique + 'NC' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // New Caledonia + 'NL' => 'NL\d{2}[A-Z]{4}\d{10}', // The Netherlands + 'NO' => 'NO\d{2}\d{4}\d{6}\d{1}', // Norway + 'PF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // French Polynesia + 'PK' => 'PK\d{2}[A-Z]{4}[\dA-Z]{16}', // Pakistan + 'PL' => 'PL\d{2}\d{8}\d{16}', // Poland + 'PM' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Saint Pierre et Miquelon + 'PS' => 'PS\d{2}[A-Z]{4}[\dA-Z]{21}', // Palestine, State of + 'PT' => 'PT\d{2}\d{4}\d{4}\d{11}\d{2}', // Portugal (plus Azores and Madeira) + 'QA' => 'QA\d{2}[A-Z]{4}[\dA-Z]{21}', // Qatar + 'RE' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Reunion + 'RO' => 'RO\d{2}[A-Z]{4}[\dA-Z]{16}', // Romania + 'RS' => 'RS\d{2}\d{3}\d{13}\d{2}', // Serbia + 'SA' => 'SA\d{2}\d{2}[\dA-Z]{18}', // Saudi Arabia + 'SE' => 'SE\d{2}\d{3}\d{16}\d{1}', // Sweden + 'SI' => 'SI\d{2}\d{5}\d{8}\d{2}', // Slovenia + 'SK' => 'SK\d{2}\d{4}\d{6}\d{10}', // Slovak Republic + 'SM' => 'SM\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}', // San Marino + 'SN' => 'SN\d{2}[A-Z]{1}\d{23}', // Senegal + 'TF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // French Southern Territories + 'TL' => 'TL\d{2}\d{3}\d{14}\d{2}', // Timor-Leste + 'TN' => 'TN59\d{2}\d{3}\d{13}\d{2}', // Tunisia + 'TR' => 'TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}', // Turkey + 'UA' => 'UA\d{2}[A-Z]{6}[\dA-Z]{19}', // Ukraine + 'VG' => 'VG\d{2}[A-Z]{4}\d{16}', // Virgin Islands, British + 'WF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Wallis and Futuna Islands + 'XK' => 'XK\d{2}\d{4}\d{10}\d{2}', // Republic of Kosovo + 'YT' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Mayotte + ); + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Iban) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Iban'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + // Remove spaces and convert to uppercase + $canonicalized = str_replace(' ', '', strtoupper($value)); + + // The IBAN must contain only digits and characters... + if (!ctype_alnum($canonicalized)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::INVALID_CHARACTERS_ERROR) + ->addViolation(); + + return; + } + + // ...start with a two-letter country code + $countryCode = substr($canonicalized, 0, 2); + + if (!ctype_alpha($countryCode)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::INVALID_COUNTRY_CODE_ERROR) + ->addViolation(); + + return; + } + + // ...have a format available + if (!array_key_exists($countryCode, self::$formats)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::NOT_SUPPORTED_COUNTRY_CODE_ERROR) + ->addViolation(); + + return; + } + + // ...and have a valid format + if (!preg_match('/^'.self::$formats[$countryCode].'$/', $canonicalized) + ) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::INVALID_FORMAT_ERROR) + ->addViolation(); + + return; + } + + // Move the first four characters to the end + // e.g. CH93 0076 2011 6238 5295 7 + // -> 0076 2011 6238 5295 7 CH93 + $canonicalized = substr($canonicalized, 4).substr($canonicalized, 0, 4); + + // Convert all remaining letters to their ordinals + // The result is an integer, which is too large for PHP's int + // data type, so we store it in a string instead. + // e.g. 0076 2011 6238 5295 7 CH93 + // -> 0076 2011 6238 5295 7 121893 + $checkSum = self::toBigInt($canonicalized); + + // Do a modulo-97 operation on the large integer + // We cannot use PHP's modulo operator, so we calculate the + // modulo step-wisely instead + if (1 !== self::bigModulo97($checkSum)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Iban::CHECKSUM_FAILED_ERROR) + ->addViolation(); + } + } + + private static function toBigInt($string) + { + $chars = str_split($string); + $bigInt = ''; + + foreach ($chars as $char) { + // Convert uppercase characters to ordinals, starting with 10 for "A" + if (ctype_upper($char)) { + $bigInt .= (ord($char) - 55); + + continue; + } + + // Simply append digits + $bigInt .= $char; + } + + return $bigInt; + } + + private static function bigModulo97($bigInt) + { + $parts = str_split($bigInt, 7); + $rest = 0; + + foreach ($parts as $part) { + $rest = ($rest.$part) % 97; + } + + return $rest; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IdenticalTo.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IdenticalTo.php new file mode 100644 index 0000000000000000000000000000000000000000..a7dadff833c5a83ecfdb3364513a641db5ea5b67 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IdenticalTo.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\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class IdenticalTo extends AbstractComparison +{ + const NOT_IDENTICAL_ERROR = '2a8cc50f-58a2-4536-875e-060a2ce69ed5'; + + protected static $errorNames = array( + self::NOT_IDENTICAL_ERROR => 'NOT_IDENTICAL_ERROR', + ); + + public $message = 'This value should be identical to {{ compared_value_type }} {{ compared_value }}.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IdenticalToValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IdenticalToValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..304f71f19129de86654bbe3fd91c5b50672c3eed --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IdenticalToValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are identical (===). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class IdenticalToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 === $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return IdenticalTo::NOT_IDENTICAL_ERROR; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Image.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Image.php new file mode 100644 index 0000000000000000000000000000000000000000..a3957f2379567edecee428bf1199e82952ed5aa0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Image.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Benjamin Dulau + * @author Bernhard Schussek + */ +class Image extends File +{ + const SIZE_NOT_DETECTED_ERROR = '6d55c3f4-e58e-4fe3-91ee-74b492199956'; + const TOO_WIDE_ERROR = '7f87163d-878f-47f5-99ba-a8eb723a1ab2'; + const TOO_NARROW_ERROR = '9afbd561-4f90-4a27-be62-1780fc43604a'; + const TOO_HIGH_ERROR = '7efae81c-4877-47ba-aa65-d01ccb0d4645'; + const TOO_LOW_ERROR = 'aef0cb6a-c07f-4894-bc08-1781420d7b4c'; + const RATIO_TOO_BIG_ERROR = '70cafca6-168f-41c9-8c8c-4e47a52be643'; + const RATIO_TOO_SMALL_ERROR = '59b8c6ef-bcf2-4ceb-afff-4642ed92f12e'; + const SQUARE_NOT_ALLOWED_ERROR = '5d41425b-facb-47f7-a55a-de9fbe45cb46'; + const LANDSCAPE_NOT_ALLOWED_ERROR = '6f895685-7cf2-4d65-b3da-9029c5581d88'; + const PORTRAIT_NOT_ALLOWED_ERROR = '65608156-77da-4c79-a88c-02ef6d18c782'; + const CORRUPTED_IMAGE_ERROR = '5d4163f3-648f-4e39-87fd-cc5ea7aad2d1'; + + // Include the mapping from the base class + + protected static $errorNames = array( + self::NOT_FOUND_ERROR => 'NOT_FOUND_ERROR', + self::NOT_READABLE_ERROR => 'NOT_READABLE_ERROR', + self::EMPTY_ERROR => 'EMPTY_ERROR', + self::TOO_LARGE_ERROR => 'TOO_LARGE_ERROR', + self::INVALID_MIME_TYPE_ERROR => 'INVALID_MIME_TYPE_ERROR', + self::SIZE_NOT_DETECTED_ERROR => 'SIZE_NOT_DETECTED_ERROR', + self::TOO_WIDE_ERROR => 'TOO_WIDE_ERROR', + self::TOO_NARROW_ERROR => 'TOO_NARROW_ERROR', + self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', + self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', + self::RATIO_TOO_BIG_ERROR => 'RATIO_TOO_BIG_ERROR', + self::RATIO_TOO_SMALL_ERROR => 'RATIO_TOO_SMALL_ERROR', + self::SQUARE_NOT_ALLOWED_ERROR => 'SQUARE_NOT_ALLOWED_ERROR', + self::LANDSCAPE_NOT_ALLOWED_ERROR => 'LANDSCAPE_NOT_ALLOWED_ERROR', + self::PORTRAIT_NOT_ALLOWED_ERROR => 'PORTRAIT_NOT_ALLOWED_ERROR', + self::CORRUPTED_IMAGE_ERROR => 'CORRUPTED_IMAGE_ERROR', + ); + + public $mimeTypes = 'image/*'; + public $minWidth; + public $maxWidth; + public $maxHeight; + public $minHeight; + public $maxRatio; + public $minRatio; + public $allowSquare = true; + public $allowLandscape = true; + public $allowPortrait = true; + public $detectCorrupted = false; + + // The constant for a wrong MIME type is taken from the parent class. + public $mimeTypesMessage = 'This file is not a valid image.'; + public $sizeNotDetectedMessage = 'The size of the image could not be detected.'; + public $maxWidthMessage = 'The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.'; + public $minWidthMessage = 'The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.'; + public $maxHeightMessage = 'The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.'; + public $minHeightMessage = 'The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.'; + public $maxRatioMessage = 'The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.'; + public $minRatioMessage = 'The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.'; + public $allowSquareMessage = 'The image is square ({{ width }}x{{ height }}px). Square images are not allowed.'; + public $allowLandscapeMessage = 'The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.'; + public $allowPortraitMessage = 'The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.'; + public $corruptedMessage = 'The image file is corrupted.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ImageValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ImageValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..0ed0d417822279397155e46427520496ca42f514 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/ImageValidator.php @@ -0,0 +1,202 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\RuntimeException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid image file and is valid + * against minWidth, maxWidth, minHeight and maxHeight constraints. + * + * @author Benjamin Dulau + * @author Bernhard Schussek + */ +class ImageValidator extends FileValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Image) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Image'); + } + + $violations = count($this->context->getViolations()); + + parent::validate($value, $constraint); + + $failed = count($this->context->getViolations()) !== $violations; + + if ($failed || null === $value || '' === $value) { + return; + } + + if (null === $constraint->minWidth && null === $constraint->maxWidth + && null === $constraint->minHeight && null === $constraint->maxHeight + && null === $constraint->minRatio && null === $constraint->maxRatio + && $constraint->allowSquare && $constraint->allowLandscape && $constraint->allowPortrait + && !$constraint->detectCorrupted) { + return; + } + + $size = @getimagesize($value); + + if (empty($size) || ($size[0] === 0) || ($size[1] === 0)) { + $this->context->buildViolation($constraint->sizeNotDetectedMessage) + ->setCode(Image::SIZE_NOT_DETECTED_ERROR) + ->addViolation(); + + return; + } + + $width = $size[0]; + $height = $size[1]; + + if ($constraint->minWidth) { + if (!ctype_digit((string) $constraint->minWidth)) { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid minimum width', $constraint->minWidth)); + } + + if ($width < $constraint->minWidth) { + $this->context->buildViolation($constraint->minWidthMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ min_width }}', $constraint->minWidth) + ->setCode(Image::TOO_NARROW_ERROR) + ->addViolation(); + + return; + } + } + + if ($constraint->maxWidth) { + if (!ctype_digit((string) $constraint->maxWidth)) { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum width', $constraint->maxWidth)); + } + + if ($width > $constraint->maxWidth) { + $this->context->buildViolation($constraint->maxWidthMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ max_width }}', $constraint->maxWidth) + ->setCode(Image::TOO_WIDE_ERROR) + ->addViolation(); + + return; + } + } + + if ($constraint->minHeight) { + if (!ctype_digit((string) $constraint->minHeight)) { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid minimum height', $constraint->minHeight)); + } + + if ($height < $constraint->minHeight) { + $this->context->buildViolation($constraint->minHeightMessage) + ->setParameter('{{ height }}', $height) + ->setParameter('{{ min_height }}', $constraint->minHeight) + ->setCode(Image::TOO_LOW_ERROR) + ->addViolation(); + + return; + } + } + + if ($constraint->maxHeight) { + if (!ctype_digit((string) $constraint->maxHeight)) { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum height', $constraint->maxHeight)); + } + + if ($height > $constraint->maxHeight) { + $this->context->buildViolation($constraint->maxHeightMessage) + ->setParameter('{{ height }}', $height) + ->setParameter('{{ max_height }}', $constraint->maxHeight) + ->setCode(Image::TOO_HIGH_ERROR) + ->addViolation(); + } + } + + $ratio = round($width / $height, 2); + + if (null !== $constraint->minRatio) { + if (!is_numeric((string) $constraint->minRatio)) { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid minimum ratio', $constraint->minRatio)); + } + + if ($ratio < $constraint->minRatio) { + $this->context->buildViolation($constraint->minRatioMessage) + ->setParameter('{{ ratio }}', $ratio) + ->setParameter('{{ min_ratio }}', $constraint->minRatio) + ->setCode(Image::RATIO_TOO_SMALL_ERROR) + ->addViolation(); + } + } + + if (null !== $constraint->maxRatio) { + if (!is_numeric((string) $constraint->maxRatio)) { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum ratio', $constraint->maxRatio)); + } + + if ($ratio > $constraint->maxRatio) { + $this->context->buildViolation($constraint->maxRatioMessage) + ->setParameter('{{ ratio }}', $ratio) + ->setParameter('{{ max_ratio }}', $constraint->maxRatio) + ->setCode(Image::RATIO_TOO_BIG_ERROR) + ->addViolation(); + } + } + + if (!$constraint->allowSquare && $width == $height) { + $this->context->buildViolation($constraint->allowSquareMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ height }}', $height) + ->setCode(Image::SQUARE_NOT_ALLOWED_ERROR) + ->addViolation(); + } + + if (!$constraint->allowLandscape && $width > $height) { + $this->context->buildViolation($constraint->allowLandscapeMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ height }}', $height) + ->setCode(Image::LANDSCAPE_NOT_ALLOWED_ERROR) + ->addViolation(); + } + + if (!$constraint->allowPortrait && $width < $height) { + $this->context->buildViolation($constraint->allowPortraitMessage) + ->setParameter('{{ width }}', $width) + ->setParameter('{{ height }}', $height) + ->setCode(Image::PORTRAIT_NOT_ALLOWED_ERROR) + ->addViolation(); + } + + if ($constraint->detectCorrupted) { + if (!function_exists('imagecreatefromstring')) { + throw new RuntimeException('Corrupted images detection requires installed and enabled GD extension'); + } + + $resource = @imagecreatefromstring(file_get_contents($value)); + + if (false === $resource) { + $this->context->buildViolation($constraint->corruptedMessage) + ->setCode(Image::CORRUPTED_IMAGE_ERROR) + ->addViolation(); + + return; + } + + imagedestroy($resource); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Ip.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Ip.php new file mode 100644 index 0000000000000000000000000000000000000000..36772c62aa52ba933e5914db670c42a09c40c29e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Ip.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * Validates that a value is a valid IP address. + * + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + * @author Joseph Bielawski + */ +class Ip extends Constraint +{ + const V4 = '4'; + const V6 = '6'; + const ALL = 'all'; + + // adds FILTER_FLAG_NO_PRIV_RANGE flag (skip private ranges) + const V4_NO_PRIV = '4_no_priv'; + const V6_NO_PRIV = '6_no_priv'; + const ALL_NO_PRIV = 'all_no_priv'; + + // adds FILTER_FLAG_NO_RES_RANGE flag (skip reserved ranges) + const V4_NO_RES = '4_no_res'; + const V6_NO_RES = '6_no_res'; + const ALL_NO_RES = 'all_no_res'; + + // adds FILTER_FLAG_NO_PRIV_RANGE and FILTER_FLAG_NO_RES_RANGE flags (skip both) + const V4_ONLY_PUBLIC = '4_public'; + const V6_ONLY_PUBLIC = '6_public'; + const ALL_ONLY_PUBLIC = 'all_public'; + + const INVALID_IP_ERROR = 'b1b427ae-9f6f-41b0-aa9b-84511fbb3c5b'; + + protected static $versions = array( + self::V4, + self::V6, + self::ALL, + + self::V4_NO_PRIV, + self::V6_NO_PRIV, + self::ALL_NO_PRIV, + + self::V4_NO_RES, + self::V6_NO_RES, + self::ALL_NO_RES, + + self::V4_ONLY_PUBLIC, + self::V6_ONLY_PUBLIC, + self::ALL_ONLY_PUBLIC, + ); + + protected static $errorNames = array( + self::INVALID_IP_ERROR => 'INVALID_IP_ERROR', + ); + + public $version = self::V4; + + public $message = 'This is not a valid IP address.'; + + /** + * {@inheritdoc} + */ + public function __construct($options = null) + { + parent::__construct($options); + + if (!in_array($this->version, self::$versions)) { + throw new ConstraintDefinitionException(sprintf('The option "version" must be one of "%s"', implode('", "', self::$versions))); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IpValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IpValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..7f806bf7fcf249641a30497bc600bd052c56f2f6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IpValidator.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid IP address. + * + * @author Bernhard Schussek + * @author Joseph Bielawski + */ +class IpValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Ip) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Ip'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + switch ($constraint->version) { + case Ip::V4: + $flag = FILTER_FLAG_IPV4; + break; + + case Ip::V6: + $flag = FILTER_FLAG_IPV6; + break; + + case Ip::V4_NO_PRIV: + $flag = FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE; + break; + + case Ip::V6_NO_PRIV: + $flag = FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE; + break; + + case Ip::ALL_NO_PRIV: + $flag = FILTER_FLAG_NO_PRIV_RANGE; + break; + + case Ip::V4_NO_RES: + $flag = FILTER_FLAG_IPV4 | FILTER_FLAG_NO_RES_RANGE; + break; + + case Ip::V6_NO_RES: + $flag = FILTER_FLAG_IPV6 | FILTER_FLAG_NO_RES_RANGE; + break; + + case Ip::ALL_NO_RES: + $flag = FILTER_FLAG_NO_RES_RANGE; + break; + + case Ip::V4_ONLY_PUBLIC: + $flag = FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE; + break; + + case Ip::V6_ONLY_PUBLIC: + $flag = FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE; + break; + + case Ip::ALL_ONLY_PUBLIC: + $flag = FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE; + break; + + default: + $flag = null; + break; + } + + if (!filter_var($value, FILTER_VALIDATE_IP, $flag)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Ip::INVALID_IP_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsFalse.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsFalse.php new file mode 100644 index 0000000000000000000000000000000000000000..8332e1874f5c7cfa6987ed0779a38ddee8ab005f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsFalse.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class IsFalse extends Constraint +{ + const NOT_FALSE_ERROR = 'd53a91b0-def3-426a-83d7-269da7ab4200'; + + protected static $errorNames = array( + self::NOT_FALSE_ERROR => 'NOT_FALSE_ERROR', + ); + + public $message = 'This value should be false.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsFalseValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsFalseValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..95245fb97bd9d7b7d02dda756efd23196f175f35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsFalseValidator.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class IsFalseValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof IsFalse) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\IsFalse'); + } + + if (null === $value || false === $value || 0 === $value || '0' === $value) { + return; + } + + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsFalse::NOT_FALSE_ERROR) + ->addViolation(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsNull.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsNull.php new file mode 100644 index 0000000000000000000000000000000000000000..fdd2930916ec857c09976fa353fd6084843a62f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsNull.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class IsNull extends Constraint +{ + const NOT_NULL_ERROR = '60d2f30b-8cfa-4372-b155-9656634de120'; + + protected static $errorNames = array( + self::NOT_NULL_ERROR => 'NOT_NULL_ERROR', + ); + + public $message = 'This value should be null.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsNullValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsNullValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..01b9d1e40a05e7a2dda01ea9cb082476760ce619 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsNullValidator.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class IsNullValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof IsNull) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\IsNull'); + } + + if (null !== $value) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsNull::NOT_NULL_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsTrue.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsTrue.php new file mode 100644 index 0000000000000000000000000000000000000000..405a96a422d17b9d7160cb9c0274326c3909a869 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsTrue.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class IsTrue extends Constraint +{ + const NOT_TRUE_ERROR = '2beabf1c-54c0-4882-a928-05249b26e23b'; + + protected static $errorNames = array( + self::NOT_TRUE_ERROR => 'NOT_TRUE_ERROR', + ); + + public $message = 'This value should be true.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsTrueValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsTrueValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..89aa337d2c054375aeb73c1aa98c81c361d35882 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsTrueValidator.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\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class IsTrueValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof IsTrue) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\IsTrue'); + } + + if (null === $value) { + return; + } + + if (true !== $value && 1 !== $value && '1' !== $value) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsTrue::NOT_TRUE_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Isbn.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Isbn.php new file mode 100644 index 0000000000000000000000000000000000000000..615feb66416d457d5bc1538ef4362ef994952882 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Isbn.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\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author The Whole Life To Learn + * @author Manuel Reinhard + * @author Bernhard Schussek + */ +class Isbn extends Constraint +{ + const TOO_SHORT_ERROR = '949acbb0-8ef5-43ed-a0e9-032dfd08ae45'; + const TOO_LONG_ERROR = '3171387d-f80a-47b3-bd6e-60598545316a'; + const INVALID_CHARACTERS_ERROR = '23d21cea-da99-453d-98b1-a7d916fbb339'; + const CHECKSUM_FAILED_ERROR = '2881c032-660f-46b6-8153-d352d9706640'; + const TYPE_NOT_RECOGNIZED_ERROR = 'fa54a457-f042-441f-89c4-066ee5bdd3e1'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', + self::TYPE_NOT_RECOGNIZED_ERROR => 'TYPE_NOT_RECOGNIZED_ERROR', + ); + + public $isbn10Message = 'This value is not a valid ISBN-10.'; + public $isbn13Message = 'This value is not a valid ISBN-13.'; + public $bothIsbnMessage = 'This value is neither a valid ISBN-10 nor a valid ISBN-13.'; + public $type; + public $message; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'type'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsbnValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsbnValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..2e342673d37c8b8edea791ae47c06f0257a64293 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IsbnValidator.php @@ -0,0 +1,184 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether the value is a valid ISBN-10 or ISBN-13. + * + * @author The Whole Life To Learn + * @author Manuel Reinhard + * @author Bernhard Schussek + * + * @see https://en.wikipedia.org/wiki/Isbn + */ +class IsbnValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Isbn) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Isbn'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $canonical = str_replace('-', '', $value); + + // Explicitly validate against ISBN-10 + if ('isbn10' === $constraint->type) { + if (true !== ($code = $this->validateIsbn10($canonical))) { + $this->context->buildViolation($this->getMessage($constraint, $constraint->type)) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode($code) + ->addViolation(); + } + + return; + } + + // Explicitly validate against ISBN-13 + if ('isbn13' === $constraint->type) { + if (true !== ($code = $this->validateIsbn13($canonical))) { + $this->context->buildViolation($this->getMessage($constraint, $constraint->type)) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode($code) + ->addViolation(); + } + + return; + } + + // Try both ISBNs + + // First, try ISBN-10 + $code = $this->validateIsbn10($canonical); + + // The ISBN can only be an ISBN-13 if the value was too long for ISBN-10 + if (Isbn::TOO_LONG_ERROR === $code) { + // Try ISBN-13 now + $code = $this->validateIsbn13($canonical); + + // If too short, this means we have 11 or 12 digits + if (Isbn::TOO_SHORT_ERROR === $code) { + $code = Isbn::TYPE_NOT_RECOGNIZED_ERROR; + } + } + + if (true !== $code) { + $this->context->buildViolation($this->getMessage($constraint)) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode($code) + ->addViolation(); + } + } + + protected function validateIsbn10($isbn) + { + // Choose an algorithm so that ERROR_INVALID_CHARACTERS is preferred + // over ERROR_TOO_SHORT/ERROR_TOO_LONG + // Otherwise "0-45122-5244" passes, but "0-45122_5244" reports + // "too long" + + // Error priority: + // 1. ERROR_INVALID_CHARACTERS + // 2. ERROR_TOO_SHORT/ERROR_TOO_LONG + // 3. ERROR_CHECKSUM_FAILED + + $checkSum = 0; + + for ($i = 0; $i < 10; ++$i) { + // If we test the length before the loop, we get an ERROR_TOO_SHORT + // when actually an ERROR_INVALID_CHARACTERS is wanted, e.g. for + // "0-45122_5244" (typo) + if (!isset($isbn[$i])) { + return Isbn::TOO_SHORT_ERROR; + } + + if ('X' === $isbn[$i]) { + $digit = 10; + } elseif (ctype_digit($isbn[$i])) { + $digit = $isbn[$i]; + } else { + return Isbn::INVALID_CHARACTERS_ERROR; + } + + $checkSum += $digit * (10 - $i); + } + + if (isset($isbn[$i])) { + return Isbn::TOO_LONG_ERROR; + } + + return 0 === $checkSum % 11 ? true : Isbn::CHECKSUM_FAILED_ERROR; + } + + protected function validateIsbn13($isbn) + { + // Error priority: + // 1. ERROR_INVALID_CHARACTERS + // 2. ERROR_TOO_SHORT/ERROR_TOO_LONG + // 3. ERROR_CHECKSUM_FAILED + + if (!ctype_digit($isbn)) { + return Isbn::INVALID_CHARACTERS_ERROR; + } + + $length = strlen($isbn); + + if ($length < 13) { + return Isbn::TOO_SHORT_ERROR; + } + + if ($length > 13) { + return Isbn::TOO_LONG_ERROR; + } + + $checkSum = 0; + + for ($i = 0; $i < 13; $i += 2) { + $checkSum += $isbn[$i]; + } + + for ($i = 1; $i < 12; $i += 2) { + $checkSum += $isbn[$i] + * 3; + } + + return 0 === $checkSum % 10 ? true : Isbn::CHECKSUM_FAILED_ERROR; + } + + protected function getMessage($constraint, $type = null) + { + if (null !== $constraint->message) { + return $constraint->message; + } elseif ('isbn10' === $type) { + return $constraint->isbn10Message; + } elseif ('isbn13' === $type) { + return $constraint->isbn13Message; + } + + return $constraint->bothIsbnMessage; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Issn.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Issn.php new file mode 100644 index 0000000000000000000000000000000000000000..a2fecdd35c386d77fa8c388616def6f36ded10c6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Issn.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Antonio J. García Lagar + * @author Bernhard Schussek + */ +class Issn extends Constraint +{ + const TOO_SHORT_ERROR = '6a20dd3d-f463-4460-8e7b-18a1b98abbfb'; + const TOO_LONG_ERROR = '37cef893-5871-464e-8b12-7fb79324833c'; + const MISSING_HYPHEN_ERROR = '2983286f-8134-4693-957a-1ec4ef887b15'; + const INVALID_CHARACTERS_ERROR = 'a663d266-37c2-4ece-a914-ae891940c588'; + const INVALID_CASE_ERROR = '7b6dd393-7523-4a6c-b84d-72b91bba5e1a'; + const CHECKSUM_FAILED_ERROR = 'b0f92dbc-667c-48de-b526-ad9586d43e85'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', + self::MISSING_HYPHEN_ERROR => 'MISSING_HYPHEN_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::INVALID_CASE_ERROR => 'INVALID_CASE_ERROR', + self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', + ); + + public $message = 'This value is not a valid ISSN.'; + public $caseSensitive = false; + public $requireHyphen = false; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IssnValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IssnValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..ae1bb6fa3481a4a859269d30a4d8e461228f829b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/IssnValidator.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether the value is a valid ISSN. + * + * @author Antonio J. García Lagar + * @author Bernhard Schussek + * + * @see https://en.wikipedia.org/wiki/Issn + */ +class IssnValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Issn) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Issn'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $canonical = $value; + + // 1234-567X + // ^ + if (isset($canonical[4]) && '-' === $canonical[4]) { + // remove hyphen + $canonical = substr($canonical, 0, 4).substr($canonical, 5); + } elseif ($constraint->requireHyphen) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::MISSING_HYPHEN_ERROR) + ->addViolation(); + + return; + } + + $length = strlen($canonical); + + if ($length < 8) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::TOO_SHORT_ERROR) + ->addViolation(); + + return; + } + + if ($length > 8) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::TOO_LONG_ERROR) + ->addViolation(); + + return; + } + + // 1234567X + // ^^^^^^^ digits only + if (!ctype_digit(substr($canonical, 0, 7))) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::INVALID_CHARACTERS_ERROR) + ->addViolation(); + + return; + } + + // 1234567X + // ^ digit, x or X + if (!ctype_digit($canonical[7]) && 'x' !== $canonical[7] && 'X' !== $canonical[7]) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::INVALID_CHARACTERS_ERROR) + ->addViolation(); + + return; + } + + // 1234567X + // ^ case-sensitive? + if ($constraint->caseSensitive && 'x' === $canonical[7]) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::INVALID_CASE_ERROR) + ->addViolation(); + + return; + } + + // Calculate a checksum. "X" equals 10. + $checkSum = 'X' === $canonical[7] + || 'x' === $canonical[7] + ? 10 + : $canonical[7]; + + for ($i = 0; $i < 7; ++$i) { + // Multiply the first digit by 8, the second by 7, etc. + $checkSum += (8 - $i) * $canonical[$i]; + } + + if (0 !== $checkSum % 11) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Issn::CHECKSUM_FAILED_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Language.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Language.php new file mode 100644 index 0000000000000000000000000000000000000000..0e676b7aabcda4b85940a5abccf8363a29184a3a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Language.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Language extends Constraint +{ + const NO_SUCH_LANGUAGE_ERROR = 'ee65fec4-9a20-4202-9f39-ca558cd7bdf7'; + + protected static $errorNames = array( + self::NO_SUCH_LANGUAGE_ERROR => 'NO_SUCH_LANGUAGE_ERROR', + ); + + public $message = 'This value is not a valid language.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LanguageValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LanguageValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..c0bc08fdd77abd48ad9ad02c7ecb6862d3c7c37c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LanguageValidator.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\Component\Validator\Constraints; + +use Symfony\Component\Intl\Intl; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid language code. + * + * @author Bernhard Schussek + */ +class LanguageValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Language) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Language'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $languages = Intl::getLanguageBundle()->getLanguageNames(); + + if (!isset($languages[$value])) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Language::NO_SUCH_LANGUAGE_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Length.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Length.php new file mode 100644 index 0000000000000000000000000000000000000000..0f965089b5cd6685d70917fbd950d61771debb86 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Length.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\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\MissingOptionsException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Length extends Constraint +{ + const TOO_SHORT_ERROR = '9ff3fdc4-b214-49db-8718-39c315e33d45'; + const TOO_LONG_ERROR = 'd94b19cc-114f-4f44-9cc4-4138e80a87b9'; + const INVALID_CHARACTERS_ERROR = '35e6a710-aa2e-4719-b58e-24b35749b767'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + ); + + public $maxMessage = 'This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.'; + public $minMessage = 'This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.'; + public $exactMessage = 'This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.'; + public $charsetMessage = 'This value does not match the expected {{ charset }} charset.'; + public $max; + public $min; + public $charset = 'UTF-8'; + + public function __construct($options = null) + { + if (null !== $options && !is_array($options)) { + $options = array( + 'min' => $options, + 'max' => $options, + ); + } + + parent::__construct($options); + + if (null === $this->min && null === $this->max) { + throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LengthValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LengthValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..490f5a36aa48c04db0f6a1c0b023d61f2585a216 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LengthValidator.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class LengthValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Length) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Length'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $stringValue = (string) $value; + + if (!$invalidCharset = !@mb_check_encoding($stringValue, $constraint->charset)) { + $length = mb_strlen($stringValue, $constraint->charset); + } + + if ($invalidCharset) { + $this->context->buildViolation($constraint->charsetMessage) + ->setParameter('{{ value }}', $this->formatValue($stringValue)) + ->setParameter('{{ charset }}', $constraint->charset) + ->setInvalidValue($value) + ->setCode(Length::INVALID_CHARACTERS_ERROR) + ->addViolation(); + + return; + } + + if (null !== $constraint->max && $length > $constraint->max) { + $this->context->buildViolation($constraint->min == $constraint->max ? $constraint->exactMessage : $constraint->maxMessage) + ->setParameter('{{ value }}', $this->formatValue($stringValue)) + ->setParameter('{{ limit }}', $constraint->max) + ->setInvalidValue($value) + ->setPlural((int) $constraint->max) + ->setCode(Length::TOO_LONG_ERROR) + ->addViolation(); + + return; + } + + if (null !== $constraint->min && $length < $constraint->min) { + $this->context->buildViolation($constraint->min == $constraint->max ? $constraint->exactMessage : $constraint->minMessage) + ->setParameter('{{ value }}', $this->formatValue($stringValue)) + ->setParameter('{{ limit }}', $constraint->min) + ->setInvalidValue($value) + ->setPlural((int) $constraint->min) + ->setCode(Length::TOO_SHORT_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThan.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThan.php new file mode 100644 index 0000000000000000000000000000000000000000..1bbb50878b1a6ca0c3428af783bf50d3f7434b55 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThan.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\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class LessThan extends AbstractComparison +{ + const TOO_HIGH_ERROR = '079d7420-2d13-460c-8756-de810eeb37d2'; + + protected static $errorNames = array( + self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', + ); + + public $message = 'This value should be less than {{ compared_value }}.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php new file mode 100644 index 0000000000000000000000000000000000000000..d118942385c57a2d41c2b60fc9435025c9df6b69 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.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\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class LessThanOrEqual extends AbstractComparison +{ + const TOO_HIGH_ERROR = '079d7420-2d13-460c-8756-de810eeb37d2'; + + protected static $errorNames = array( + self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', + ); + + public $message = 'This value should be less than or equal to {{ compared_value }}.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanOrEqualValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanOrEqualValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..54281eef5a673230ea53470dc81a1781e8c2ad42 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanOrEqualValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are less than or equal to the previous (<=). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class LessThanOrEqualValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 <= $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return LessThanOrEqual::TOO_HIGH_ERROR; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..ef7535fc9914316ceab5488eca62f11d2ca01177 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LessThanValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are less than the previous (<). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class LessThanValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 < $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return LessThan::TOO_HIGH_ERROR; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Locale.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Locale.php new file mode 100644 index 0000000000000000000000000000000000000000..5aa7070402e2ac7b2eb33dcfaf61912c45424396 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Locale.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Locale extends Constraint +{ + const NO_SUCH_LOCALE_ERROR = 'a0af4293-1f1a-4a1c-a328-979cba6182a2'; + + protected static $errorNames = array( + self::NO_SUCH_LOCALE_ERROR => 'NO_SUCH_LOCALE_ERROR', + ); + + public $message = 'This value is not a valid locale.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LocaleValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LocaleValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..93eab8cb7e757c92f41e31df6ccbf41aaf121ff1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LocaleValidator.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Intl\Intl; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid locale code. + * + * @author Bernhard Schussek + */ +class LocaleValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Locale) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Locale'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $locales = Intl::getLocaleBundle()->getLocaleNames(); + $aliases = Intl::getLocaleBundle()->getAliases(); + + if (!isset($locales[$value]) && !in_array($value, $aliases)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Locale::NO_SUCH_LOCALE_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Luhn.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Luhn.php new file mode 100644 index 0000000000000000000000000000000000000000..67f152d29dc5398c31eb2aee98d26d02847ee504 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Luhn.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * Metadata for the LuhnValidator. + * + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Tim Nagel + * @author Greg Knapp http://gregk.me/2011/php-implementation-of-bank-card-luhn-algorithm/ + * @author Bernhard Schussek + */ +class Luhn extends Constraint +{ + const INVALID_CHARACTERS_ERROR = 'dfad6d23-1b74-4374-929b-5cbb56fc0d9e'; + const CHECKSUM_FAILED_ERROR = '4d760774-3f50-4cd5-a6d5-b10a3299d8d3'; + + protected static $errorNames = array( + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', + ); + + public $message = 'Invalid card number.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LuhnValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LuhnValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..85e4d7621500245917fd2fb65734796559a525f0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/LuhnValidator.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\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates a PAN using the LUHN Algorithm. + * + * For a list of example card numbers that are used to test this + * class, please see the LuhnValidatorTest class. + * + * @see http://en.wikipedia.org/wiki/Luhn_algorithm + * + * @author Tim Nagel + * @author Greg Knapp http://gregk.me/2011/php-implementation-of-bank-card-luhn-algorithm/ + * @author Bernhard Schussek + */ +class LuhnValidator extends ConstraintValidator +{ + /** + * Validates a credit card number with the Luhn algorithm. + * + * @param mixed $value + * @param Constraint $constraint + * + * @throws UnexpectedTypeException when the given credit card number is no string + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Luhn) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Luhn'); + } + + if (null === $value || '' === $value) { + return; + } + + // Work with strings only, because long numbers are represented as floats + // internally and don't work with strlen() + if (!is_string($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if (!ctype_digit($value)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Luhn::INVALID_CHARACTERS_ERROR) + ->addViolation(); + + return; + } + + $checkSum = 0; + $length = strlen($value); + + // Starting with the last digit and walking left, add every second + // digit to the check sum + // e.g. 7 9 9 2 7 3 9 8 7 1 3 + // ^ ^ ^ ^ ^ ^ + // = 7 + 9 + 7 + 9 + 7 + 3 + for ($i = $length - 1; $i >= 0; $i -= 2) { + $checkSum += $value[$i]; + } + + // Starting with the second last digit and walking left, double every + // second digit and add it to the check sum + // For doubles greater than 9, sum the individual digits + // e.g. 7 9 9 2 7 3 9 8 7 1 3 + // ^ ^ ^ ^ ^ + // = 1+8 + 4 + 6 + 1+6 + 2 + for ($i = $length - 2; $i >= 0; $i -= 2) { + $checkSum += array_sum(str_split($value[$i] * 2)); + } + + if (0 === $checkSum || 0 !== $checkSum % 10) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Luhn::CHECKSUM_FAILED_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotBlank.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotBlank.php new file mode 100644 index 0000000000000000000000000000000000000000..e059f1028a2cb5b3f71b3c86df0234c7d7317219 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotBlank.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class NotBlank extends Constraint +{ + const IS_BLANK_ERROR = 'c1051bb4-d103-4f74-8988-acbcafc7fdc3'; + + protected static $errorNames = array( + self::IS_BLANK_ERROR => 'IS_BLANK_ERROR', + ); + + public $message = 'This value should not be blank.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotBlankValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotBlankValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..1d6c5bc983a373f94e2c3708f3d121f117fd9aca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotBlankValidator.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class NotBlankValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof NotBlank) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\NotBlank'); + } + + if (false === $value || (empty($value) && '0' != $value)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(NotBlank::IS_BLANK_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotEqualTo.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotEqualTo.php new file mode 100644 index 0000000000000000000000000000000000000000..8c5abddaee4221e5ebd4e2a0156e8e0b22b576d8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotEqualTo.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\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class NotEqualTo extends AbstractComparison +{ + const IS_EQUAL_ERROR = 'aa2e33da-25c8-4d76-8c6c-812f02ea89dd'; + + protected static $errorNames = array( + self::IS_EQUAL_ERROR => 'IS_EQUAL_ERROR', + ); + + public $message = 'This value should not be equal to {{ compared_value }}.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotEqualToValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotEqualToValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..b80c5eaedab296350076cfb70312e011fd3d7af2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotEqualToValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are all unequal (!=). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class NotEqualToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 != $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return NotEqualTo::IS_EQUAL_ERROR; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php new file mode 100644 index 0000000000000000000000000000000000000000..4c9c63ea61e4917b02eaa1534592198d05a6912a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.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\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class NotIdenticalTo extends AbstractComparison +{ + const IS_IDENTICAL_ERROR = '4aaac518-0dda-4129-a6d9-e216b9b454a0'; + + protected static $errorNames = array( + self::IS_IDENTICAL_ERROR => 'IS_IDENTICAL_ERROR', + ); + + public $message = 'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotIdenticalToValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotIdenticalToValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..3ea8b5ac25ea4b9be0e621bcd8bdd4a4d4ae4dce --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotIdenticalToValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values aren't identical (!==). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class NotIdenticalToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 !== $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return NotIdenticalTo::IS_IDENTICAL_ERROR; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotNull.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotNull.php new file mode 100644 index 0000000000000000000000000000000000000000..1cfc1c80ecc0794a678ac25387498b37f1a28443 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotNull.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class NotNull extends Constraint +{ + const IS_NULL_ERROR = 'ad32d13f-c3d4-423b-909a-857b961eb720'; + + protected static $errorNames = array( + self::IS_NULL_ERROR => 'IS_NULL_ERROR', + ); + + public $message = 'This value should not be null.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotNullValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotNullValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..d6f620713e6a606807eff2ebc186ea3cb7989d86 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/NotNullValidator.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class NotNullValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof NotNull) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\NotNull'); + } + + if (null === $value) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(NotNull::IS_NULL_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Optional.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Optional.php new file mode 100644 index 0000000000000000000000000000000000000000..dab8b4371f2c7ef6adaa3a793362efbf34f36039 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Optional.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Optional extends Existence +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Range.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Range.php new file mode 100644 index 0000000000000000000000000000000000000000..dcaf9db95524646c223c241c98f5647e23750ceb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Range.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\MissingOptionsException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Range extends Constraint +{ + const INVALID_CHARACTERS_ERROR = 'ad9a9798-7a99-4df7-8ce9-46e416a1e60b'; + const TOO_HIGH_ERROR = '2d28afcb-e32e-45fb-a815-01c431a86a69'; + const TOO_LOW_ERROR = '76454e69-502c-46c5-9643-f447d837c4d5'; + + protected static $errorNames = array( + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', + self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', + ); + + public $minMessage = 'This value should be {{ limit }} or more.'; + public $maxMessage = 'This value should be {{ limit }} or less.'; + public $invalidMessage = 'This value should be a valid number.'; + public $min; + public $max; + + public function __construct($options = null) + { + parent::__construct($options); + + if (null === $this->min && null === $this->max) { + throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/RangeValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/RangeValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..ac140dbbf34e2c1b915fc41969903f49aa95d547 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/RangeValidator.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class RangeValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Range) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Range'); + } + + if (null === $value) { + return; + } + + if (!is_numeric($value) && !$value instanceof \DateTimeInterface) { + $this->context->buildViolation($constraint->invalidMessage) + ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) + ->setCode(Range::INVALID_CHARACTERS_ERROR) + ->addViolation(); + + return; + } + + $min = $constraint->min; + $max = $constraint->max; + + // Convert strings to DateTimes if comparing another DateTime + // This allows to compare with any date/time value supported by + // the DateTime constructor: + // http://php.net/manual/en/datetime.formats.php + if ($value instanceof \DateTimeInterface) { + if (is_string($min)) { + $min = new \DateTime($min); + } + + if (is_string($max)) { + $max = new \DateTime($max); + } + } + + if (null !== $constraint->max && $value > $max) { + $this->context->buildViolation($constraint->maxMessage) + ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) + ->setParameter('{{ limit }}', $this->formatValue($max, self::PRETTY_DATE)) + ->setCode(Range::TOO_HIGH_ERROR) + ->addViolation(); + + return; + } + + if (null !== $constraint->min && $value < $min) { + $this->context->buildViolation($constraint->minMessage) + ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) + ->setParameter('{{ limit }}', $this->formatValue($min, self::PRETTY_DATE)) + ->setCode(Range::TOO_LOW_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Regex.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Regex.php new file mode 100644 index 0000000000000000000000000000000000000000..7a43667fef638fb983b19a25897be751ef06d3e3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Regex.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Regex extends Constraint +{ + const REGEX_FAILED_ERROR = 'de1e3db3-5ed4-4941-aae4-59f3667cc3a3'; + + protected static $errorNames = array( + self::REGEX_FAILED_ERROR => 'REGEX_FAILED_ERROR', + ); + + public $message = 'This value is not valid.'; + public $pattern; + public $htmlPattern; + public $match = true; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'pattern'; + } + + /** + * {@inheritdoc} + */ + public function getRequiredOptions() + { + return array('pattern'); + } + + /** + * Converts the htmlPattern to a suitable format for HTML5 pattern. + * Example: /^[a-z]+$/ would be converted to [a-z]+ + * However, if options are specified, it cannot be converted. + * + * Pattern is also ignored if match=false since the pattern should + * then be reversed before application. + * + * @see http://dev.w3.org/html5/spec/single-page.html#the-pattern-attribute + * + * @return string|null + */ + public function getHtmlPattern() + { + // If htmlPattern is specified, use it + if (null !== $this->htmlPattern) { + return empty($this->htmlPattern) + ? null + : $this->htmlPattern; + } + + // Quit if delimiters not at very beginning/end (e.g. when options are passed) + if ($this->pattern[0] !== $this->pattern[strlen($this->pattern) - 1]) { + return; + } + + $delimiter = $this->pattern[0]; + + // Unescape the delimiter + $pattern = str_replace('\\'.$delimiter, $delimiter, substr($this->pattern, 1, -1)); + + // If the pattern is inverted, we can simply wrap it in + // ((?!pattern).)* + if (!$this->match) { + return '((?!'.$pattern.').)*'; + } + + // If the pattern contains an or statement, wrap the pattern in + // .*(pattern).* and quit. Otherwise we'd need to parse the pattern + if (false !== strpos($pattern, '|')) { + return '.*('.$pattern.').*'; + } + + // Trim leading ^, otherwise prepend .* + $pattern = '^' === $pattern[0] ? substr($pattern, 1) : '.*'.$pattern; + + // Trim trailing $, otherwise append .* + $pattern = '$' === $pattern[strlen($pattern) - 1] ? substr($pattern, 0, -1) : $pattern.'.*'; + + return $pattern; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/RegexValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/RegexValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..48ee61a74edcb38d0a95640fdd4e1175372033b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/RegexValidator.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value match or not given regexp pattern. + * + * @author Bernhard Schussek + * @author Joseph Bielawski + */ +class RegexValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Regex) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Regex'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if ($constraint->match xor preg_match($constraint->pattern, $value)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Regex::REGEX_FAILED_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Required.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Required.php new file mode 100644 index 0000000000000000000000000000000000000000..bd77a909f97fbadca4cf9bbc798d396988dc536c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Required.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Required extends Existence +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Time.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Time.php new file mode 100644 index 0000000000000000000000000000000000000000..6bd8dbda2e2aa9504eea7be1b950b126afd2b5d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Time.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Time extends Constraint +{ + const INVALID_FORMAT_ERROR = '9d27b2bb-f755-4fbf-b725-39b1edbdebdf'; + const INVALID_TIME_ERROR = '8532f9e1-84b2-4d67-8989-0818bc38533b'; + + protected static $errorNames = array( + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + self::INVALID_TIME_ERROR => 'INVALID_TIME_ERROR', + ); + + public $message = 'This value is not a valid time.'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/TimeValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/TimeValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..e398c10a2600206337879f083361f79a4b0abb46 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/TimeValidator.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class TimeValidator extends ConstraintValidator +{ + const PATTERN = '/^(\d{2}):(\d{2}):(\d{2})$/'; + + /** + * Checks whether a time is valid. + * + * @param int $hour The hour + * @param int $minute The minute + * @param int $second The second + * + * @return bool Whether the time is valid + * + * @internal + */ + public static function checkTime($hour, $minute, $second) + { + return $hour >= 0 && $hour < 24 && $minute >= 0 && $minute < 60 && $second >= 0 && $second < 60; + } + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Time) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Time'); + } + + if (null === $value || '' === $value || $value instanceof \DateTime) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if (!preg_match(static::PATTERN, $value, $matches)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Time::INVALID_FORMAT_ERROR) + ->addViolation(); + + return; + } + + if (!self::checkTime($matches[1], $matches[2], $matches[3])) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Time::INVALID_TIME_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Traverse.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Traverse.php new file mode 100644 index 0000000000000000000000000000000000000000..9d8bc126d1888ef64264013ec0af9e603bc492a1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Traverse.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\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * @Annotation + * + * @author Bernhard Schussek + */ +class Traverse extends Constraint +{ + public $traverse = true; + + public function __construct($options = null) + { + if (is_array($options) && array_key_exists('groups', $options)) { + throw new ConstraintDefinitionException(sprintf( + 'The option "groups" is not supported by the constraint %s', + __CLASS__ + )); + } + + parent::__construct($options); + } + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'traverse'; + } + + /** + * {@inheritdoc} + */ + public function getTargets() + { + return self::CLASS_CONSTRAINT; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Type.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Type.php new file mode 100644 index 0000000000000000000000000000000000000000..e40b47820d6bbe861585181dc561c8e7e9d57b46 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Type.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Type extends Constraint +{ + const INVALID_TYPE_ERROR = 'ba785a8c-82cb-4283-967c-3cf342181b40'; + + protected static $errorNames = array( + self::INVALID_TYPE_ERROR => 'INVALID_TYPE_ERROR', + ); + + public $message = 'This value should be of type {{ type }}.'; + public $type; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'type'; + } + + /** + * {@inheritdoc} + */ + public function getRequiredOptions() + { + return array('type'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/TypeValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/TypeValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..5c31e3b38a1b1517ba3607e4e1f2e3d59942ceac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/TypeValidator.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class TypeValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Type) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Type'); + } + + if (null === $value) { + return; + } + + $type = strtolower($constraint->type); + $type = $type == 'boolean' ? 'bool' : $constraint->type; + $isFunction = 'is_'.$type; + $ctypeFunction = 'ctype_'.$type; + + if (function_exists($isFunction) && $isFunction($value)) { + return; + } elseif (function_exists($ctypeFunction) && $ctypeFunction($value)) { + return; + } elseif ($value instanceof $constraint->type) { + return; + } + + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setParameter('{{ type }}', $constraint->type) + ->setCode(Type::INVALID_TYPE_ERROR) + ->addViolation(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Url.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Url.php new file mode 100644 index 0000000000000000000000000000000000000000..8453a902081b2f6e10cd268bf997733b1ab9986e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Url.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Url extends Constraint +{ + const INVALID_URL_ERROR = '57c2f299-1154-4870-89bb-ef3b1f5ad229'; + + protected static $errorNames = array( + self::INVALID_URL_ERROR => 'INVALID_URL_ERROR', + ); + + public $message = 'This value is not a valid URL.'; + public $dnsMessage = 'The host could not be resolved.'; + public $protocols = array('http', 'https'); + public $checkDNS = false; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/UrlValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/UrlValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..7c998f530dab291b9c9c75e9e75de4f12f6d9125 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/UrlValidator.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class UrlValidator extends ConstraintValidator +{ + const PATTERN = '~^ + (%s):// # protocol + (([\pL\pN-]+:)?([\pL\pN-]+)@)? # basic auth + ( + ([\pL\pN\pS-\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name + | # or + \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address + | # or + \[ + (?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::)))) + \] # an IPv6 address + ) + (:[0-9]+)? # a port (optional) + (/?|/\S+|\?\S*|\#\S*) # a /, nothing, a / with something, a query or a fragment + $~ixu'; + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Url) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Url'); + } + + if (null === $value) { + return; + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + if ('' === $value) { + return; + } + + $pattern = sprintf(static::PATTERN, implode('|', $constraint->protocols)); + + if (!preg_match($pattern, $value)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Url::INVALID_URL_ERROR) + ->addViolation(); + + return; + } + + if ($constraint->checkDNS) { + $host = parse_url($value, PHP_URL_HOST); + + if (!checkdnsrr($host, 'ANY')) { + $this->context->buildViolation($constraint->dnsMessage) + ->setParameter('{{ value }}', $this->formatValue($host)) + ->setCode(Url::INVALID_URL_ERROR) + ->addViolation(); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Uuid.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Uuid.php new file mode 100644 index 0000000000000000000000000000000000000000..2deecbadd61c976b7c4c035320c71ce2eb070e27 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Uuid.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * + * @author Colin O'Dell + * @author Bernhard Schussek + */ +class Uuid extends Constraint +{ + const TOO_SHORT_ERROR = 'aa314679-dac9-4f54-bf97-b2049df8f2a3'; + const TOO_LONG_ERROR = '494897dd-36f8-4d31-8923-71a8d5f3000d'; + const INVALID_CHARACTERS_ERROR = '51120b12-a2bc-41bf-aa53-cd73daf330d0'; + const INVALID_HYPHEN_PLACEMENT_ERROR = '98469c83-0309-4f5d-bf95-a496dcaa869c'; + const INVALID_VERSION_ERROR = '21ba13b4-b185-4882-ac6f-d147355987eb'; + const INVALID_VARIANT_ERROR = '164ef693-2b9d-46de-ad7f-836201f0c2db'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::INVALID_HYPHEN_PLACEMENT_ERROR => 'INVALID_HYPHEN_PLACEMENT_ERROR', + self::INVALID_VERSION_ERROR => 'INVALID_VERSION_ERROR', + self::INVALID_VARIANT_ERROR => 'INVALID_VARIANT_ERROR', + ); + + // Possible versions defined by RFC 4122 + const V1_MAC = 1; + const V2_DCE = 2; + const V3_MD5 = 3; + const V4_RANDOM = 4; + const V5_SHA1 = 5; + + /** + * Message to display when validation fails. + * + * @var string + */ + public $message = 'This is not a valid UUID.'; + + /** + * Strict mode only allows UUIDs that meet the formal definition and formatting per RFC 4122. + * + * Set this to `false` to allow legacy formats with different dash positioning or wrapping characters + * + * @var bool + */ + public $strict = true; + + /** + * Array of allowed versions (see version constants above). + * + * All UUID versions are allowed by default + * + * @var int[] + */ + public $versions = array( + self::V1_MAC, + self::V2_DCE, + self::V3_MD5, + self::V4_RANDOM, + self::V5_SHA1, + ); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/UuidValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/UuidValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..b0b4e8a7d8ec028161d68f2f6933e5091f940d5f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/UuidValidator.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\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether the value is a valid UUID per RFC 4122. + * + * @author Colin O'Dell + * @author Bernhard Schussek + * + * @see http://tools.ietf.org/html/rfc4122 + * @see https://en.wikipedia.org/wiki/Universally_unique_identifier + */ +class UuidValidator extends ConstraintValidator +{ + // The strict pattern matches UUIDs like this: + // xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx + + // Roughly speaking: + // x = any hexadecimal character + // M = any allowed version {1..5} + // N = any allowed variant {8, 9, a, b} + + const STRICT_LENGTH = 36; + const STRICT_FIRST_HYPHEN_POSITION = 8; + const STRICT_LAST_HYPHEN_POSITION = 23; + const STRICT_VERSION_POSITION = 14; + const STRICT_VARIANT_POSITION = 19; + + // The loose pattern validates similar yet non-compliant UUIDs. + // Hyphens are completely optional. If present, they should only appear + // between every fourth character: + // xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx + // xxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxx + // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + + // The value can also be wrapped with characters like []{}: + // {xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx} + + // Neither the version nor the variant is validated by this pattern. + + const LOOSE_MAX_LENGTH = 39; + const LOOSE_FIRST_HYPHEN_POSITION = 4; + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (null === $value || '' === $value) { + return; + } + + if (!$constraint instanceof Uuid) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Uuid'); + } + + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + + if ($constraint->strict) { + $this->validateStrict($value, $constraint); + + return; + } + + $this->validateLoose($value, $constraint); + } + + private function validateLoose($value, Uuid $constraint) + { + // Error priority: + // 1. ERROR_INVALID_CHARACTERS + // 2. ERROR_INVALID_HYPHEN_PLACEMENT + // 3. ERROR_TOO_SHORT/ERROR_TOO_LONG + + // Trim any wrapping characters like [] or {} used by some legacy systems + $trimmed = trim($value, '[]{}'); + + // Position of the next expected hyphen + $h = self::LOOSE_FIRST_HYPHEN_POSITION; + + // Expected length + $l = self::LOOSE_MAX_LENGTH; + + for ($i = 0; $i < $l; ++$i) { + // Check length + if (!isset($trimmed[$i])) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::TOO_SHORT_ERROR) + ->addViolation(); + + return; + } + + // Hyphens must occur every fifth position + // xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx + // ^ ^ ^ ^ ^ ^ ^ + if ('-' === $trimmed[$i]) { + if ($i !== $h) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) + ->addViolation(); + + return; + } + + $h += 5; + + continue; + } + + // Missing hyphens are ignored + if ($i === $h) { + $h += 4; + --$l; + } + + // Check characters + if (!ctype_xdigit($trimmed[$i])) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_CHARACTERS_ERROR) + ->addViolation(); + + return; + } + } + + // Check length again + if (isset($trimmed[$i])) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::TOO_LONG_ERROR) + ->addViolation(); + } + } + + private function validateStrict($value, Uuid $constraint) + { + // Error priority: + // 1. ERROR_INVALID_CHARACTERS + // 2. ERROR_INVALID_HYPHEN_PLACEMENT + // 3. ERROR_TOO_SHORT/ERROR_TOO_LONG + // 4. ERROR_INVALID_VERSION + // 5. ERROR_INVALID_VARIANT + + // Position of the next expected hyphen + $h = self::STRICT_FIRST_HYPHEN_POSITION; + + for ($i = 0; $i < self::STRICT_LENGTH; ++$i) { + // Check length + if (!isset($value[$i])) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::TOO_SHORT_ERROR) + ->addViolation(); + + return; + } + + // Check hyphen placement + // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + // ^ ^ ^ ^ + if ('-' === $value[$i]) { + if ($i !== $h) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) + ->addViolation(); + + return; + } + + // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + // ^ + if ($h < self::STRICT_LAST_HYPHEN_POSITION) { + $h += 5; + } + + continue; + } + + // Check characters + if (!ctype_xdigit($value[$i])) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_CHARACTERS_ERROR) + ->addViolation(); + + return; + } + + // Missing hyphen + if ($i === $h) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) + ->addViolation(); + + return; + } + } + + // Check length again + if (isset($value[$i])) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::TOO_LONG_ERROR) + ->addViolation(); + } + + // Check version + if (!in_array($value[self::STRICT_VERSION_POSITION], $constraint->versions)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_VERSION_ERROR) + ->addViolation(); + } + + // Check variant - first two bits must equal "10" + // 0b10xx + // & 0b1100 (12) + // = 0b1000 (8) + if ((hexdec($value[self::STRICT_VARIANT_POSITION]) & 12) !== 8) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_VARIANT_ERROR) + ->addViolation(); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Valid.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Valid.php new file mode 100644 index 0000000000000000000000000000000000000000..439da3ae0056a4177fb8da765ad7fefa014e968f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Valid.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Valid extends Constraint +{ + public $traverse = true; + + public function __construct($options = null) + { + if (is_array($options) && array_key_exists('groups', $options)) { + throw new ConstraintDefinitionException(sprintf( + 'The option "groups" is not supported by the constraint %s', + __CLASS__ + )); + } + + parent::__construct($options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContext.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContext.php new file mode 100644 index 0000000000000000000000000000000000000000..1dc982c2719ffb3e50eae4f4129486332b68b1ef --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -0,0 +1,352 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Context; + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationList; +use Symfony\Component\Validator\Mapping\ClassMetadataInterface; +use Symfony\Component\Validator\Mapping\MetadataInterface; +use Symfony\Component\Validator\Mapping\MemberMetadata; +use Symfony\Component\Validator\Mapping\PropertyMetadataInterface; +use Symfony\Component\Validator\Util\PropertyPath; +use Symfony\Component\Validator\Validator\ValidatorInterface; +use Symfony\Component\Validator\Violation\ConstraintViolationBuilder; + +/** + * The context used and created by {@link ExecutionContextFactory}. + * + * @author Bernhard Schussek + * + * @see ExecutionContextInterface + * + * @internal You should not instantiate or use this class. Code against + * {@link ExecutionContextInterface} instead. + */ +class ExecutionContext implements ExecutionContextInterface +{ + /** + * @var ValidatorInterface + */ + private $validator; + + /** + * The root value of the validated object graph. + * + * @var mixed + */ + private $root; + + /** + * @var TranslatorInterface + */ + private $translator; + + /** + * @var string + */ + private $translationDomain; + + /** + * The violations generated in the current context. + * + * @var ConstraintViolationList + */ + private $violations; + + /** + * The currently validated value. + * + * @var mixed + */ + private $value; + + /** + * The currently validated object. + * + * @var object|null + */ + private $object; + + /** + * The property path leading to the current value. + * + * @var string + */ + private $propertyPath = ''; + + /** + * The current validation metadata. + * + * @var MetadataInterface|null + */ + private $metadata; + + /** + * The currently validated group. + * + * @var string|null + */ + private $group; + + /** + * The currently validated constraint. + * + * @var Constraint|null + */ + private $constraint; + + /** + * Stores which objects have been validated in which group. + * + * @var array + */ + private $validatedObjects = array(); + + /** + * Stores which class constraint has been validated for which object. + * + * @var array + */ + private $validatedConstraints = array(); + + /** + * Stores which objects have been initialized. + * + * @var array + */ + private $initializedObjects; + + /** + * Creates a new execution context. + * + * @param ValidatorInterface $validator The validator + * @param mixed $root The root value of the + * validated object graph + * @param TranslatorInterface $translator The translator + * @param string|null $translationDomain The translation domain to + * use for translating + * violation messages + * + * @internal Called by {@link ExecutionContextFactory}. Should not be used + * in user code. + */ + public function __construct(ValidatorInterface $validator, $root, TranslatorInterface $translator, $translationDomain = null) + { + $this->validator = $validator; + $this->root = $root; + $this->translator = $translator; + $this->translationDomain = $translationDomain; + $this->violations = new ConstraintViolationList(); + } + + /** + * {@inheritdoc} + */ + public function setNode($value, $object, MetadataInterface $metadata = null, $propertyPath) + { + $this->value = $value; + $this->object = $object; + $this->metadata = $metadata; + $this->propertyPath = (string) $propertyPath; + } + + /** + * {@inheritdoc} + */ + public function setGroup($group) + { + $this->group = $group; + } + + /** + * {@inheritdoc} + */ + public function setConstraint(Constraint $constraint) + { + $this->constraint = $constraint; + } + + /** + * {@inheritdoc} + */ + public function addViolation($message, array $parameters = array()) + { + $this->violations->add(new ConstraintViolation( + $this->translator->trans($message, $parameters, $this->translationDomain), + $message, + $parameters, + $this->root, + $this->propertyPath, + $this->value, + null, + null, + $this->constraint + )); + } + + /** + * {@inheritdoc} + */ + public function buildViolation($message, array $parameters = array()) + { + return new ConstraintViolationBuilder( + $this->violations, + $this->constraint, + $message, + $parameters, + $this->root, + $this->propertyPath, + $this->value, + $this->translator, + $this->translationDomain + ); + } + + /** + * {@inheritdoc} + */ + public function getViolations() + { + return $this->violations; + } + + /** + * {@inheritdoc} + */ + public function getValidator() + { + return $this->validator; + } + + /** + * {@inheritdoc} + */ + public function getRoot() + { + return $this->root; + } + + /** + * {@inheritdoc} + */ + public function getValue() + { + return $this->value; + } + + /** + * {@inheritdoc} + */ + public function getObject() + { + return $this->object; + } + + /** + * {@inheritdoc} + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * {@inheritdoc} + */ + public function getGroup() + { + return $this->group; + } + + public function getConstraint() + { + return $this->constraint; + } + + /** + * {@inheritdoc} + */ + public function getClassName() + { + return $this->metadata instanceof MemberMetadata || $this->metadata instanceof ClassMetadataInterface ? $this->metadata->getClassName() : null; + } + + /** + * {@inheritdoc} + */ + public function getPropertyName() + { + return $this->metadata instanceof PropertyMetadataInterface ? $this->metadata->getPropertyName() : null; + } + + /** + * {@inheritdoc} + */ + public function getPropertyPath($subPath = '') + { + return PropertyPath::append($this->propertyPath, $subPath); + } + + /** + * {@inheritdoc} + */ + public function markGroupAsValidated($cacheKey, $groupHash) + { + if (!isset($this->validatedObjects[$cacheKey])) { + $this->validatedObjects[$cacheKey] = array(); + } + + $this->validatedObjects[$cacheKey][$groupHash] = true; + } + + /** + * {@inheritdoc} + */ + public function isGroupValidated($cacheKey, $groupHash) + { + return isset($this->validatedObjects[$cacheKey][$groupHash]); + } + + /** + * {@inheritdoc} + */ + public function markConstraintAsValidated($cacheKey, $constraintHash) + { + $this->validatedConstraints[$cacheKey.':'.$constraintHash] = true; + } + + /** + * {@inheritdoc} + */ + public function isConstraintValidated($cacheKey, $constraintHash) + { + return isset($this->validatedConstraints[$cacheKey.':'.$constraintHash]); + } + + /** + * {@inheritdoc} + */ + public function markObjectAsInitialized($cacheKey) + { + $this->initializedObjects[$cacheKey] = true; + } + + /** + * {@inheritdoc} + */ + public function isObjectInitialized($cacheKey) + { + return isset($this->initializedObjects[$cacheKey]); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextFactory.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..8182c41f8c1ca82ae8a165ad950d52344e5cb38d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextFactory.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\Component\Validator\Context; + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Validator\ValidatorInterface; + +/** + * Creates new {@link ExecutionContext} instances. + * + * @author Bernhard Schussek + * + * @internal You should not instantiate or use this class. Code against + * {@link ExecutionContextFactoryInterface} instead. + */ +class ExecutionContextFactory implements ExecutionContextFactoryInterface +{ + /** + * @var TranslatorInterface + */ + private $translator; + + /** + * @var string|null + */ + private $translationDomain; + + /** + * Creates a new context factory. + * + * @param TranslatorInterface $translator The translator + * @param string|null $translationDomain The translation domain to + * use for translating + * violation messages + */ + public function __construct(TranslatorInterface $translator, $translationDomain = null) + { + $this->translator = $translator; + $this->translationDomain = $translationDomain; + } + + /** + * {@inheritdoc} + */ + public function createContext(ValidatorInterface $validator, $root) + { + return new ExecutionContext( + $validator, + $root, + $this->translator, + $this->translationDomain + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextFactoryInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextFactoryInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..f3ab3dd68a740744cc286873ad10db9341fdd644 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextFactoryInterface.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\Component\Validator\Context; + +use Symfony\Component\Validator\Validator\ValidatorInterface; + +/** + * Creates instances of {@link ExecutionContextInterface}. + * + * You can use a custom factory if you want to customize the execution context + * that is passed through the validation run. + * + * @author Bernhard Schussek + */ +interface ExecutionContextFactoryInterface +{ + /** + * Creates a new execution context. + * + * @param ValidatorInterface $validator The validator + * @param mixed $root The root value of the validated + * object graph + * + * @return ExecutionContextInterface The new execution context + */ + public function createContext(ValidatorInterface $validator, $root); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..1b1452582dff454e0177cfd737a3fae7c9a6c7cc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php @@ -0,0 +1,344 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Context; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Mapping; +use Symfony\Component\Validator\Mapping\MetadataInterface; +use Symfony\Component\Validator\Validator\ValidatorInterface; +use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; +use Symfony\Component\Validator\ConstraintViolationListInterface; + +/** + * The context of a validation run. + * + * The context collects all violations generated during the validation. By + * default, validators execute all validations in a new context: + * + * $violations = $validator->validate($object); + * + * When you make another call to the validator, while the validation is in + * progress, the violations will be isolated from each other: + * + * public function validate($value, Constraint $constraint) + * { + * $validator = $this->context->getValidator(); + * + * // The violations are not added to $this->context + * $violations = $validator->validate($value); + * } + * + * However, if you want to add the violations to the current context, use the + * {@link ValidatorInterface::inContext()} method: + * + * public function validate($value, Constraint $constraint) + * { + * $validator = $this->context->getValidator(); + * + * // The violations are added to $this->context + * $validator + * ->inContext($this->context) + * ->validate($value) + * ; + * } + * + * Additionally, the context provides information about the current state of + * the validator, such as the currently validated class, the name of the + * currently validated property and more. These values change over time, so you + * cannot store a context and expect that the methods still return the same + * results later on. + * + * @author Bernhard Schussek + */ +interface ExecutionContextInterface +{ + /** + * Adds a violation at the current node of the validation graph. + * + * @param string $message The error message + * @param array $params The parameters substituted in the error message + */ + public function addViolation($message, array $params = array()); + + /** + * Returns a builder for adding a violation with extended information. + * + * Call {@link ConstraintViolationBuilderInterface::addViolation()} to + * add the violation when you're done with the configuration: + * + * $context->buildViolation('Please enter a number between %min% and %max%.') + * ->setParameter('%min%', 3) + * ->setParameter('%max%', 10) + * ->setTranslationDomain('number_validation') + * ->addViolation(); + * + * @param string $message The error message + * @param array $parameters The parameters substituted in the error message + * + * @return ConstraintViolationBuilderInterface The violation builder + */ + public function buildViolation($message, array $parameters = array()); + + /** + * Returns the validator. + * + * Useful if you want to validate additional constraints: + * + * public function validate($value, Constraint $constraint) + * { + * $validator = $this->context->getValidator(); + * + * $violations = $validator->validateValue($value, new Length(array('min' => 3))); + * + * if (count($violations) > 0) { + * // ... + * } + * } + * + * @return ValidatorInterface + */ + public function getValidator(); + + /** + * Returns the currently validated object. + * + * If the validator is currently validating a class constraint, the + * object of that class is returned. If it is a validating a property or + * getter constraint, the object that the property/getter belongs to is + * returned. + * + * In other cases, null is returned. + * + * @return object|null The currently validated object or null + */ + public function getObject(); + + /** + * Sets the currently validated value. + * + * @param mixed $value The validated value + * @param object|null $object The currently validated object + * @param MetadataInterface|null $metadata The validation metadata + * @param string $propertyPath The property path to the current value + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function setNode($value, $object, MetadataInterface $metadata = null, $propertyPath); + + /** + * Sets the currently validated group. + * + * @param string|null $group The validated group + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function setGroup($group); + + /** + * Sets the currently validated constraint. + * + * @param Constraint $constraint The validated constraint + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function setConstraint(Constraint $constraint); + + /** + * Marks an object as validated in a specific validation group. + * + * @param string $cacheKey The hash of the object + * @param string $groupHash The group's name or hash, if it is group + * sequence + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function markGroupAsValidated($cacheKey, $groupHash); + + /** + * Returns whether an object was validated in a specific validation group. + * + * @param string $cacheKey The hash of the object + * @param string $groupHash The group's name or hash, if it is group + * sequence + * + * @return bool Whether the object was already validated for that + * group + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function isGroupValidated($cacheKey, $groupHash); + + /** + * Marks a constraint as validated for an object. + * + * @param string $cacheKey The hash of the object + * @param string $constraintHash The hash of the constraint + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function markConstraintAsValidated($cacheKey, $constraintHash); + + /** + * Returns whether a constraint was validated for an object. + * + * @param string $cacheKey The hash of the object + * @param string $constraintHash The hash of the constraint + * + * @return bool Whether the constraint was already validated + * + * @internal Used by the validator engine. Should not be called by user + * code. + */ + public function isConstraintValidated($cacheKey, $constraintHash); + + /** + * Marks that an object was initialized. + * + * @param string $cacheKey The hash of the object + * + * @internal Used by the validator engine. Should not be called by user + * code. + * + * @see ObjectInitializerInterface + */ + public function markObjectAsInitialized($cacheKey); + + /** + * Returns whether an object was initialized. + * + * @param string $cacheKey The hash of the object + * + * @return bool Whether the object was already initialized + * + * @internal Used by the validator engine. Should not be called by user + * code. + * + * @see ObjectInitializerInterface + */ + public function isObjectInitialized($cacheKey); + + /** + * Returns the violations generated by the validator so far. + * + * @return ConstraintViolationListInterface The constraint violation list + */ + public function getViolations(); + + /** + * Returns the value at which validation was started in the object graph. + * + * The validator, when given an object, traverses the properties and + * related objects and their properties. The root of the validation is the + * object from which the traversal started. + * + * The current value is returned by {@link getValue}. + * + * @return mixed The root value of the validation + */ + public function getRoot(); + + /** + * Returns the value that the validator is currently validating. + * + * If you want to retrieve the object that was originally passed to the + * validator, use {@link getRoot}. + * + * @return mixed The currently validated value + */ + public function getValue(); + + /** + * Returns the metadata for the currently validated value. + * + * With the core implementation, this method returns a + * {@link Mapping\ClassMetadataInterface} instance if the current value is an object, + * a {@link Mapping\PropertyMetadata} instance if the current value is + * the value of a property and a {@link Mapping\GetterMetadata} instance if + * the validated value is the result of a getter method. + * + * If the validated value is neither of these, for example if the validator + * has been called with a plain value and constraint, this method returns + * null. + * + * @return MetadataInterface|null The metadata of the currently validated + * value. + */ + public function getMetadata(); + + /** + * Returns the validation group that is currently being validated. + * + * @return string The current validation group + */ + public function getGroup(); + + /** + * Returns the class name of the current node. + * + * If the metadata of the current node does not implement + * {@link Mapping\ClassMetadataInterface} or if no metadata is available for the + * current node, this method returns null. + * + * @return string|null The class name or null, if no class name could be found + */ + public function getClassName(); + + /** + * Returns the property name of the current node. + * + * If the metadata of the current node does not implement + * {@link PropertyMetadataInterface} or if no metadata is available for the + * current node, this method returns null. + * + * @return string|null The property name or null, if no property name could be found + */ + public function getPropertyName(); + + /** + * Returns the property path to the value that the validator is currently + * validating. + * + * For example, take the following object graph: + * + *
    +     * (Person)---($address: Address)---($street: string)
    +     * 
    + * + * When the Person instance is passed to the validator, the + * property path is initially empty. When the $address property + * of that person is validated, the property path is "address". When + * the $street property of the related Address instance + * is validated, the property path is "address.street". + * + * Properties of objects are prefixed with a dot in the property path. + * Indices of arrays or objects implementing the {@link \ArrayAccess} + * interface are enclosed in brackets. For example, if the property in + * the previous example is $addresses and contains an array + * of Address instance, the property path generated for the + * $street property of one of these addresses is for example + * "addresses[0].street". + * + * @param string $subPath Optional. The suffix appended to the current + * property path. + * + * @return string The current property path. The result may be an empty + * string if the validator is currently validating the + * root value of the validation graph. + */ + public function getPropertyPath($subPath = ''); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/BadMethodCallException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/BadMethodCallException.php new file mode 100644 index 0000000000000000000000000000000000000000..939161bff3f080995e984555e23862969550df35 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/BadMethodCallException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base BadMethodCallException for the Validator component. + * + * @author Bernhard Schussek + */ +class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/ConstraintDefinitionException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/ConstraintDefinitionException.php new file mode 100644 index 0000000000000000000000000000000000000000..b24fdd68d29054b52caacc2ac6449351dc13139b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/ConstraintDefinitionException.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\Validator\Exception; + +class ConstraintDefinitionException extends ValidatorException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..77d09b9029c26cdc7dca756304b260d3da8a59d4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base ExceptionInterface for the Validator component. + * + * @author Bernhard Schussek + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/GroupDefinitionException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/GroupDefinitionException.php new file mode 100644 index 0000000000000000000000000000000000000000..ab7e91d9e6eafc38af51e0c613f0a7e762942197 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/GroupDefinitionException.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\Validator\Exception; + +class GroupDefinitionException extends ValidatorException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..22da39bb262c028f61c5627d3bca7cee464888b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base InvalidArgumentException for the Validator component. + * + * @author Bernhard Schussek + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/InvalidOptionsException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/InvalidOptionsException.php new file mode 100644 index 0000000000000000000000000000000000000000..ce87c42ef4988e6dc7a93351d1747f8d0d1ad2b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/InvalidOptionsException.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\Component\Validator\Exception; + +class InvalidOptionsException extends ValidatorException +{ + private $options; + + public function __construct($message, array $options) + { + parent::__construct($message); + + $this->options = $options; + } + + public function getOptions() + { + return $this->options; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/MappingException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/MappingException.php new file mode 100644 index 0000000000000000000000000000000000000000..4c8c057b9f4da3f18cd341e28126da24dbde17e5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/MappingException.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\Validator\Exception; + +class MappingException extends ValidatorException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/MissingOptionsException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/MissingOptionsException.php new file mode 100644 index 0000000000000000000000000000000000000000..07c5d9ecda23ea8b5347e54cc6e6503d7d910b75 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/MissingOptionsException.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\Component\Validator\Exception; + +class MissingOptionsException extends ValidatorException +{ + private $options; + + public function __construct($message, array $options) + { + parent::__construct($message); + + $this->options = $options; + } + + public function getOptions() + { + return $this->options; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/NoSuchMetadataException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/NoSuchMetadataException.php new file mode 100644 index 0000000000000000000000000000000000000000..4cac74cf306016b2ba7264d6dfd1e61442dce299 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/NoSuchMetadataException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * @author Bernhard Schussek + */ +class NoSuchMetadataException extends ValidatorException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/OutOfBoundsException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/OutOfBoundsException.php new file mode 100644 index 0000000000000000000000000000000000000000..30906e8a82ca06bf3b05bdf52c5fef8b30edd62e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/OutOfBoundsException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base OutOfBoundsException for the Validator component. + * + * @author Bernhard Schussek + */ +class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/RuntimeException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/RuntimeException.php new file mode 100644 index 0000000000000000000000000000000000000000..df4a50c474338389fd5da6c34f2a0e5a3429a4c7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/RuntimeException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base RuntimeException for the Validator component. + * + * @author Bernhard Schussek + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/UnexpectedTypeException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/UnexpectedTypeException.php new file mode 100644 index 0000000000000000000000000000000000000000..49d8cc2082234fdead7612d65968cc321879ca3a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/UnexpectedTypeException.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\Validator\Exception; + +class UnexpectedTypeException extends ValidatorException +{ + public function __construct($value, $expectedType) + { + parent::__construct(sprintf('Expected argument of type "%s", "%s" given', $expectedType, is_object($value) ? get_class($value) : gettype($value))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/UnsupportedMetadataException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/UnsupportedMetadataException.php new file mode 100644 index 0000000000000000000000000000000000000000..aff569b957502338656c35fff6347ff6f24a7d7c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/UnsupportedMetadataException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * @author Bernhard Schussek + */ +class UnsupportedMetadataException extends InvalidArgumentException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/ValidatorException.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/ValidatorException.php new file mode 100644 index 0000000000000000000000000000000000000000..28bd4704e8fdb732734e1cad622503a94dba2a05 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Exception/ValidatorException.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\Validator\Exception; + +class ValidatorException extends RuntimeException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/GroupSequenceProviderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/GroupSequenceProviderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..62e8a5ed0d4f7a93ed67da2f553f92605d926ec4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/GroupSequenceProviderInterface.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Defines the interface for a group sequence provider. + */ +interface GroupSequenceProviderInterface +{ + /** + * Returns which validation groups should be used for a certain state + * of the object. + * + * @return array An array of validation groups + */ + public function getGroupSequence(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Validator/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Cache/CacheInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Cache/CacheInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e8047c60ca8bc72c73069e62b3c8dcdd71e6e414 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Cache/CacheInterface.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\Component\Validator\Mapping\Cache; + +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Persists ClassMetadata instances in a cache. + * + * @author Bernhard Schussek + */ +interface CacheInterface +{ + /** + * Returns whether metadata for the given class exists in the cache. + * + * @param string $class + */ + public function has($class); + + /** + * Returns the metadata for the given class from the cache. + * + * @param string $class Class Name + * + * @return ClassMetadata|false A ClassMetadata instance or false on miss + */ + public function read($class); + + /** + * Stores a class metadata in the cache. + * + * @param ClassMetadata $metadata A Class Metadata + */ + public function write(ClassMetadata $metadata); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Cache/DoctrineCache.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Cache/DoctrineCache.php new file mode 100644 index 0000000000000000000000000000000000000000..6dd5447fedc88a98d44b935ac99ee278bc4464cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Cache/DoctrineCache.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Cache; + +use Doctrine\Common\Cache\Cache; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Adapts a Doctrine cache to a CacheInterface. + * + * @author Florian Voutzinos + */ +final class DoctrineCache implements CacheInterface +{ + private $cache; + + /** + * Creates a new Doctrine cache. + * + * @param Cache $cache The cache to adapt + */ + public function __construct(Cache $cache) + { + $this->cache = $cache; + } + + /** + * Sets the cache to adapt. + * + * @param Cache $cache The cache to adapt + */ + public function setCache(Cache $cache) + { + $this->cache = $cache; + } + + /** + * {@inheritdoc} + */ + public function has($class) + { + return $this->cache->contains($class); + } + + /** + * {@inheritdoc} + */ + public function read($class) + { + return $this->cache->fetch($class); + } + + /** + * {@inheritdoc} + */ + public function write(ClassMetadata $metadata) + { + $this->cache->save($metadata->getClassName(), $metadata); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Cache/Psr6Cache.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Cache/Psr6Cache.php new file mode 100644 index 0000000000000000000000000000000000000000..15badb056ac601df9112b285650b9bf22b8312bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Cache/Psr6Cache.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Cache; + +use Psr\Cache\CacheItemPoolInterface; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * PSR-6 adapter. + * + * @author Kévin Dunglas + */ +class Psr6Cache implements CacheInterface +{ + /** + * @var CacheItemPoolInterface + */ + private $cacheItemPool; + + public function __construct(CacheItemPoolInterface $cacheItemPool) + { + $this->cacheItemPool = $cacheItemPool; + } + + /** + * {@inheritdoc} + */ + public function has($class) + { + return $this->cacheItemPool->hasItem($this->escapeClassName($class)); + } + + /** + * {@inheritdoc} + */ + public function read($class) + { + $item = $this->cacheItemPool->getItem($this->escapeClassName($class)); + + if (!$item->isHit()) { + return false; + } + + return $item->get(); + } + + /** + * {@inheritdoc} + */ + public function write(ClassMetadata $metadata) + { + $item = $this->cacheItemPool->getItem($this->escapeClassName($metadata->getClassName())); + $item->set($metadata); + + $this->cacheItemPool->save($item); + } + + /** + * Replaces backslashes by dots in a class name. + * + * @param string $class + * + * @return string + */ + private function escapeClassName($class) + { + return str_replace('\\', '.', $class); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/CascadingStrategy.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/CascadingStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..c78fb42ad46cb7c2c8891bf7a15b784b7afe41e1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/CascadingStrategy.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +/** + * Specifies whether an object should be cascaded. + * + * Cascading is relevant for any node type but class nodes. If such a node + * contains an object of value, and if cascading is enabled, then the node + * traverser will try to find class metadata for that object and validate the + * object against that metadata. + * + * If no metadata is found for a cascaded object, and if that object implements + * {@link \Traversable}, the node traverser will iterate over the object and + * cascade each object or collection contained within, unless iteration is + * prohibited by the specified {@link TraversalStrategy}. + * + * Although the constants currently represent a boolean switch, they are + * implemented as bit mask in order to allow future extensions. + * + * @author Bernhard Schussek + * + * @see TraversalStrategy + */ +class CascadingStrategy +{ + /** + * Specifies that a node should not be cascaded. + */ + const NONE = 1; + + /** + * Specifies that a node should be cascaded. + */ + const CASCADE = 2; + + /** + * Not instantiable. + */ + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..b392bbd31ec8ea2c8e4d156badadd8021ebf7f64 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -0,0 +1,513 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\Constraints\Traverse; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\GroupDefinitionException; + +/** + * Default implementation of {@link ClassMetadataInterface}. + * + * This class supports serialization and cloning. + * + * @author Bernhard Schussek + * @author Fabien Potencier + */ +class ClassMetadata extends GenericMetadata implements ClassMetadataInterface +{ + /** + * @var string + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getClassName()} instead. + */ + public $name; + + /** + * @var string + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getDefaultGroup()} instead. + */ + public $defaultGroup; + + /** + * @var MemberMetadata[] + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getPropertyMetadata()} instead. + */ + public $members = array(); + + /** + * @var PropertyMetadata[] + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getPropertyMetadata()} instead. + */ + public $properties = array(); + + /** + * @var GetterMetadata[] + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getPropertyMetadata()} instead. + */ + public $getters = array(); + + /** + * @var array + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getGroupSequence()} instead. + */ + public $groupSequence = array(); + + /** + * @var bool + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link isGroupSequenceProvider()} instead. + */ + public $groupSequenceProvider = false; + + /** + * The strategy for traversing traversable objects. + * + * By default, only instances of {@link \Traversable} are traversed. + * + * @var int + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getTraversalStrategy()} instead. + */ + public $traversalStrategy = TraversalStrategy::IMPLICIT; + + /** + * @var \ReflectionClass + */ + private $reflClass; + + /** + * Constructs a metadata for the given class. + * + * @param string $class + */ + public function __construct($class) + { + $this->name = $class; + // class name without namespace + if (false !== $nsSep = strrpos($class, '\\')) { + $this->defaultGroup = substr($class, $nsSep + 1); + } else { + $this->defaultGroup = $class; + } + } + + /** + * {@inheritdoc} + */ + public function __sleep() + { + $parentProperties = parent::__sleep(); + + // Don't store the cascading strategy. Classes never cascade. + unset($parentProperties[array_search('cascadingStrategy', $parentProperties)]); + + return array_merge($parentProperties, array( + 'getters', + 'groupSequence', + 'groupSequenceProvider', + 'members', + 'name', + 'properties', + 'defaultGroup', + )); + } + + /** + * {@inheritdoc} + */ + public function getClassName() + { + return $this->name; + } + + /** + * Returns the name of the default group for this class. + * + * For each class, the group "Default" is an alias for the group + * "", where is the non-namespaced name of the + * class. All constraints implicitly or explicitly assigned to group + * "Default" belong to both of these groups, unless the class defines + * a group sequence. + * + * If a class defines a group sequence, validating the class in "Default" + * will validate the group sequence. The constraints assigned to "Default" + * can still be validated by validating the class in "". + * + * @return string The name of the default group + */ + public function getDefaultGroup() + { + return $this->defaultGroup; + } + + /** + * {@inheritdoc} + */ + public function addConstraint(Constraint $constraint) + { + if (!in_array(Constraint::CLASS_CONSTRAINT, (array) $constraint->getTargets())) { + throw new ConstraintDefinitionException(sprintf( + 'The constraint "%s" cannot be put on classes.', + get_class($constraint) + )); + } + + if ($constraint instanceof Valid) { + throw new ConstraintDefinitionException(sprintf( + 'The constraint "%s" cannot be put on classes.', + get_class($constraint) + )); + } + + if ($constraint instanceof Traverse) { + if ($constraint->traverse) { + // If traverse is true, traversal should be explicitly enabled + $this->traversalStrategy = TraversalStrategy::TRAVERSE; + } else { + // If traverse is false, traversal should be explicitly disabled + $this->traversalStrategy = TraversalStrategy::NONE; + } + + // The constraint is not added + return $this; + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + + parent::addConstraint($constraint); + + return $this; + } + + /** + * Adds a constraint to the given property. + * + * @param string $property The name of the property + * @param Constraint $constraint The constraint + * + * @return $this + */ + public function addPropertyConstraint($property, Constraint $constraint) + { + if (!isset($this->properties[$property])) { + $this->properties[$property] = new PropertyMetadata($this->getClassName(), $property); + + $this->addPropertyMetadata($this->properties[$property]); + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + + $this->properties[$property]->addConstraint($constraint); + + return $this; + } + + /** + * @param string $property + * @param Constraint[] $constraints + * + * @return $this + */ + public function addPropertyConstraints($property, array $constraints) + { + foreach ($constraints as $constraint) { + $this->addPropertyConstraint($property, $constraint); + } + + return $this; + } + + /** + * Adds a constraint to the getter of the given property. + * + * The name of the getter is assumed to be the name of the property with an + * uppercased first letter and either the prefix "get" or "is". + * + * @param string $property The name of the property + * @param Constraint $constraint The constraint + * @param string|null $method The method that is called to retrieve the value being validated (null for auto-detection) + * + * @return $this + */ + public function addGetterConstraint($property, Constraint $constraint) + { + if (!isset($this->getters[$property])) { + $this->getters[$property] = new GetterMetadata($this->getClassName(), $property); + + $this->addPropertyMetadata($this->getters[$property]); + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + + $this->getters[$property]->addConstraint($constraint); + + return $this; + } + + /** + * Adds a constraint to the getter of the given property. + * + * @param string $property The name of the property + * @param string $method The name of the getter method + * @param Constraint $constraint The constraint + * + * @return $this + */ + public function addGetterMethodConstraint($property, $method, Constraint $constraint) + { + if (!isset($this->getters[$property])) { + $this->getters[$property] = new GetterMetadata($this->getClassName(), $property, $method); + + $this->addPropertyMetadata($this->getters[$property]); + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + + $this->getters[$property]->addConstraint($constraint); + + return $this; + } + + /** + * @param string $property + * @param Constraint[] $constraints + * + * @return $this + */ + public function addGetterConstraints($property, array $constraints) + { + foreach ($constraints as $constraint) { + $this->addGetterConstraint($property, $constraint); + } + + return $this; + } + + /** + * @param string $property + * @param string $method + * @param Constraint[] $constraints + * + * @return $this + */ + public function addGetterMethodConstraints($property, $method, array $constraints) + { + foreach ($constraints as $constraint) { + $this->addGetterMethodConstraint($property, $method, $constraint); + } + + return $this; + } + + /** + * Merges the constraints of the given metadata into this object. + * + * @param ClassMetadata $source The source metadata + */ + public function mergeConstraints(ClassMetadata $source) + { + foreach ($source->getConstraints() as $constraint) { + $this->addConstraint(clone $constraint); + } + + foreach ($source->getConstrainedProperties() as $property) { + foreach ($source->getPropertyMetadata($property) as $member) { + $member = clone $member; + + foreach ($member->getConstraints() as $constraint) { + if (in_array($constraint::DEFAULT_GROUP, $constraint->groups, true)) { + $member->constraintsByGroup[$this->getDefaultGroup()][] = $constraint; + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + } + + $this->addPropertyMetadata($member); + + if ($member instanceof MemberMetadata && !$member->isPrivate($this->name)) { + $property = $member->getPropertyName(); + + if ($member instanceof PropertyMetadata && !isset($this->properties[$property])) { + $this->properties[$property] = $member; + } elseif ($member instanceof GetterMetadata && !isset($this->getters[$property])) { + $this->getters[$property] = $member; + } + } + } + } + } + + /** + * {@inheritdoc} + */ + public function hasPropertyMetadata($property) + { + return array_key_exists($property, $this->members); + } + + /** + * {@inheritdoc} + */ + public function getPropertyMetadata($property) + { + if (!isset($this->members[$property])) { + return array(); + } + + return $this->members[$property]; + } + + /** + * {@inheritdoc} + */ + public function getConstrainedProperties() + { + return array_keys($this->members); + } + + /** + * Sets the default group sequence for this class. + * + * @param array $groupSequence An array of group names + * + * @return $this + * + * @throws GroupDefinitionException + */ + public function setGroupSequence($groupSequence) + { + if ($this->isGroupSequenceProvider()) { + throw new GroupDefinitionException('Defining a static group sequence is not allowed with a group sequence provider'); + } + + if (is_array($groupSequence)) { + $groupSequence = new GroupSequence($groupSequence); + } + + if (in_array(Constraint::DEFAULT_GROUP, $groupSequence->groups, true)) { + throw new GroupDefinitionException(sprintf('The group "%s" is not allowed in group sequences', Constraint::DEFAULT_GROUP)); + } + + if (!in_array($this->getDefaultGroup(), $groupSequence->groups, true)) { + throw new GroupDefinitionException(sprintf('The group "%s" is missing in the group sequence', $this->getDefaultGroup())); + } + + $this->groupSequence = $groupSequence; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function hasGroupSequence() + { + return $this->groupSequence && count($this->groupSequence->groups) > 0; + } + + /** + * {@inheritdoc} + */ + public function getGroupSequence() + { + return $this->groupSequence; + } + + /** + * Returns a ReflectionClass instance for this class. + * + * @return \ReflectionClass + */ + public function getReflectionClass() + { + if (!$this->reflClass) { + $this->reflClass = new \ReflectionClass($this->getClassName()); + } + + return $this->reflClass; + } + + /** + * Sets whether a group sequence provider should be used. + * + * @param bool $active + * + * @throws GroupDefinitionException + */ + public function setGroupSequenceProvider($active) + { + if ($this->hasGroupSequence()) { + throw new GroupDefinitionException('Defining a group sequence provider is not allowed with a static group sequence'); + } + + if (!$this->getReflectionClass()->implementsInterface('Symfony\Component\Validator\GroupSequenceProviderInterface')) { + throw new GroupDefinitionException(sprintf('Class "%s" must implement GroupSequenceProviderInterface', $this->name)); + } + + $this->groupSequenceProvider = $active; + } + + /** + * {@inheritdoc} + */ + public function isGroupSequenceProvider() + { + return $this->groupSequenceProvider; + } + + /** + * Class nodes are never cascaded. + * + * {@inheritdoc} + */ + public function getCascadingStrategy() + { + return CascadingStrategy::NONE; + } + + /** + * Adds a property metadata. + * + * @param PropertyMetadataInterface $metadata + */ + private function addPropertyMetadata(PropertyMetadataInterface $metadata) + { + $property = $metadata->getPropertyName(); + + $this->members[$property][] = $metadata; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e48e241ab8d5f023c0bedde6242bf4dc97da4ebe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php @@ -0,0 +1,105 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +/** + * Stores all metadata needed for validating objects of specific class. + * + * Most importantly, the metadata stores the constraints against which an object + * and its properties should be validated. + * + * Additionally, the metadata stores whether the "Default" group is overridden + * by a group sequence for that class and whether instances of that class + * should be traversed or not. + * + * @author Bernhard Schussek + * + * @see MetadataInterface + * @see \Symfony\Component\Validator\Constraints\GroupSequence + * @see \Symfony\Component\Validator\GroupSequenceProviderInterface + * @see TraversalStrategy + */ +interface ClassMetadataInterface extends MetadataInterface +{ + /** + * Returns the names of all constrained properties. + * + * @return string[] A list of property names + */ + public function getConstrainedProperties(); + + /** + * Returns whether the "Default" group is overridden by a group sequence. + * + * If it is, you can access the group sequence with {@link getGroupSequence()}. + * + * @return bool Returns true if the "Default" group is overridden + * + * @see \Symfony\Component\Validator\Constraints\GroupSequence + */ + public function hasGroupSequence(); + + /** + * Returns the group sequence that overrides the "Default" group for this + * class. + * + * @return \Symfony\Component\Validator\Constraints\GroupSequence|null The group sequence or null + * + * @see \Symfony\Component\Validator\Constraints\GroupSequence + */ + public function getGroupSequence(); + + /** + * Returns whether the "Default" group is overridden by a dynamic group + * sequence obtained by the validated objects. + * + * If this method returns true, the class must implement + * {@link \Symfony\Component\Validator\GroupSequenceProviderInterface}. + * This interface will be used to obtain the group sequence when an object + * of this class is validated. + * + * @return bool Returns true if the "Default" group is overridden by + * a dynamic group sequence + * + * @see \Symfony\Component\Validator\GroupSequenceProviderInterface + */ + public function isGroupSequenceProvider(); + + /** + * Check if there's any metadata attached to the given named property. + * + * @param string $property The property name + * + * @return bool + */ + public function hasPropertyMetadata($property); + + /** + * Returns all metadata instances for the given named property. + * + * If your implementation does not support properties, simply throw an + * exception in this method (for example a BadMethodCallException). + * + * @param string $property The property name + * + * @return PropertyMetadataInterface[] A list of metadata instances. Empty if + * no metadata exists for the property. + */ + public function getPropertyMetadata($property); + + /** + * Returns the name of the backing PHP class. + * + * @return string The name of the backing class + */ + public function getClassName(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/BlackHoleMetadataFactory.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/BlackHoleMetadataFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..5b38d0c98a775d65d4b5a6b515f3b5f9da767d40 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/BlackHoleMetadataFactory.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Factory; + +/** + * Metadata factory that does not store metadata. + * + * This implementation is useful if you want to validate values against + * constraints only and you don't need to add constraints to classes and + * properties. + * + * @author Fabien Potencier + */ +class BlackHoleMetadataFactory implements MetadataFactoryInterface +{ + /** + * {@inheritdoc} + */ + public function getMetadataFor($value) + { + throw new \LogicException('This class does not support metadata.'); + } + + /** + * {@inheritdoc} + */ + public function hasMetadataFor($value) + { + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..79ad1f228b79f6030f67dc81cb51f1007eb3ef91 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php @@ -0,0 +1,180 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Factory; + +use Symfony\Component\Validator\Exception\NoSuchMetadataException; +use Symfony\Component\Validator\Mapping\Cache\CacheInterface; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; + +/** + * Creates new {@link ClassMetadataInterface} instances. + * + * Whenever {@link getMetadataFor()} is called for the first time with a given + * class name or object of that class, a new metadata instance is created and + * returned. On subsequent requests for the same class, the same metadata + * instance will be returned. + * + * You can optionally pass a {@link LoaderInterface} instance to the constructor. + * Whenever a new metadata instance is created, it is passed to the loader, + * which can configure the metadata based on configuration loaded from the + * filesystem or a database. If you want to use multiple loaders, wrap them in a + * {@link LoaderChain}. + * + * You can also optionally pass a {@link CacheInterface} instance to the + * constructor. This cache will be used for persisting the generated metadata + * between multiple PHP requests. + * + * @author Bernhard Schussek + */ +class LazyLoadingMetadataFactory implements MetadataFactoryInterface +{ + /** + * The loader for loading the class metadata. + * + * @var LoaderInterface|null + */ + protected $loader; + + /** + * The cache for caching class metadata. + * + * @var CacheInterface|null + */ + protected $cache; + + /** + * The loaded metadata, indexed by class name. + * + * @var ClassMetadata[] + */ + protected $loadedClasses = array(); + + /** + * Creates a new metadata factory. + * + * @param LoaderInterface|null $loader The loader for configuring new metadata + * @param CacheInterface|null $cache The cache for persisting metadata + * between multiple PHP requests + */ + public function __construct(LoaderInterface $loader = null, CacheInterface $cache = null) + { + $this->loader = $loader; + $this->cache = $cache; + } + + /** + * {@inheritdoc} + * + * If the method was called with the same class name (or an object of that + * class) before, the same metadata instance is returned. + * + * If the factory was configured with a cache, this method will first look + * for an existing metadata instance in the cache. If an existing instance + * is found, it will be returned without further ado. + * + * Otherwise, a new metadata instance is created. If the factory was + * configured with a loader, the metadata is passed to the + * {@link LoaderInterface::loadClassMetadata()} method for further + * configuration. At last, the new object is returned. + */ + public function getMetadataFor($value) + { + if (!is_object($value) && !is_string($value)) { + throw new NoSuchMetadataException(sprintf('Cannot create metadata for non-objects. Got: %s', gettype($value))); + } + + $class = ltrim(is_object($value) ? get_class($value) : $value, '\\'); + + if (isset($this->loadedClasses[$class])) { + return $this->loadedClasses[$class]; + } + + if (null !== $this->cache && false !== ($metadata = $this->cache->read($class))) { + // Include constraints from the parent class + $this->mergeConstraints($metadata); + + return $this->loadedClasses[$class] = $metadata; + } + + if (!class_exists($class) && !interface_exists($class)) { + throw new NoSuchMetadataException(sprintf('The class or interface "%s" does not exist.', $class)); + } + + $metadata = new ClassMetadata($class); + + if (null !== $this->loader) { + $this->loader->loadClassMetadata($metadata); + } + + if (null !== $this->cache) { + $this->cache->write($metadata); + } + + // Include constraints from the parent class + $this->mergeConstraints($metadata); + + return $this->loadedClasses[$class] = $metadata; + } + + private function mergeConstraints(ClassMetadata $metadata) + { + // Include constraints from the parent class + if ($parent = $metadata->getReflectionClass()->getParentClass()) { + $metadata->mergeConstraints($this->getMetadataFor($parent->name)); + } + + $interfaces = $metadata->getReflectionClass()->getInterfaces(); + + $interfaces = array_filter($interfaces, function ($interface) use ($parent, $interfaces) { + $interfaceName = $interface->getName(); + + if ($parent && $parent->implementsInterface($interfaceName)) { + return false; + } + + foreach ($interfaces as $i) { + if ($i !== $interface && $i->implementsInterface($interfaceName)) { + return false; + } + } + + return true; + }); + + // Include constraints from all directly implemented interfaces + foreach ($interfaces as $interface) { + if ('Symfony\Component\Validator\GroupSequenceProviderInterface' === $interface->name) { + continue; + } + $metadata->mergeConstraints($this->getMetadataFor($interface->name)); + } + } + + /** + * {@inheritdoc} + */ + public function hasMetadataFor($value) + { + if (!is_object($value) && !is_string($value)) { + return false; + } + + $class = ltrim(is_object($value) ? get_class($value) : $value, '\\'); + + if (class_exists($class) || interface_exists($class)) { + return true; + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/MetadataFactoryInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/MetadataFactoryInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a70b94b93aa35693281a767418f4c150460da8d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Factory/MetadataFactoryInterface.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\Component\Validator\Mapping\Factory; + +use Symfony\Component\Validator\Exception\NoSuchMetadataException; +use Symfony\Component\Validator\Mapping\MetadataInterface; + +/** + * Returns {@link \Symfony\Component\Validator\Mapping\MetadataInterface} instances for values. + * + * @author Bernhard Schussek + */ +interface MetadataFactoryInterface +{ + /** + * Returns the metadata for the given value. + * + * @param mixed $value Some value + * + * @return MetadataInterface The metadata for the value + * + * @throws NoSuchMetadataException If no metadata exists for the given value + */ + public function getMetadataFor($value); + + /** + * Returns whether the class is able to return metadata for the given value. + * + * @param mixed $value Some value + * + * @return bool Whether metadata can be returned for that value + */ + public function hasMetadataFor($value); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/GenericMetadata.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/GenericMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..ff1cb6d37f89e20d667bd011236f71771dd9e852 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/GenericMetadata.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\Component\Validator\Mapping; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Traverse; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * A generic container of {@link Constraint} objects. + * + * This class supports serialization and cloning. + * + * @author Bernhard Schussek + */ +class GenericMetadata implements MetadataInterface +{ + /** + * @var Constraint[] + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getConstraints()} and {@link findConstraints()} instead. + */ + public $constraints = array(); + + /** + * @var array + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link findConstraints()} instead. + */ + public $constraintsByGroup = array(); + + /** + * The strategy for cascading objects. + * + * By default, objects are not cascaded. + * + * @var int + * + * @see CascadingStrategy + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getCascadingStrategy()} instead. + */ + public $cascadingStrategy = CascadingStrategy::NONE; + + /** + * The strategy for traversing traversable objects. + * + * By default, traversable objects are not traversed. + * + * @var int + * + * @see TraversalStrategy + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getTraversalStrategy()} instead. + */ + public $traversalStrategy = TraversalStrategy::NONE; + + /** + * Returns the names of the properties that should be serialized. + * + * @return string[] + */ + public function __sleep() + { + return array( + 'constraints', + 'constraintsByGroup', + 'cascadingStrategy', + 'traversalStrategy', + ); + } + + /** + * Clones this object. + */ + public function __clone() + { + $constraints = $this->constraints; + + $this->constraints = array(); + $this->constraintsByGroup = array(); + + foreach ($constraints as $constraint) { + $this->addConstraint(clone $constraint); + } + } + + /** + * Adds a constraint. + * + * If the constraint {@link Valid} is added, the cascading strategy will be + * changed to {@link CascadingStrategy::CASCADE}. Depending on the + * $traverse property of that constraint, the traversal strategy + * will be set to one of the following: + * + * - {@link TraversalStrategy::IMPLICIT} if $traverse is enabled + * - {@link TraversalStrategy::NONE} if $traverse is disabled + * + * @param Constraint $constraint The constraint to add + * + * @return $this + * + * @throws ConstraintDefinitionException When trying to add the + * {@link Traverse} constraint + */ + public function addConstraint(Constraint $constraint) + { + if ($constraint instanceof Traverse) { + throw new ConstraintDefinitionException(sprintf( + 'The constraint "%s" can only be put on classes. Please use '. + '"Symfony\Component\Validator\Constraints\Valid" instead.', + get_class($constraint) + )); + } + + if ($constraint instanceof Valid) { + $this->cascadingStrategy = CascadingStrategy::CASCADE; + + if ($constraint->traverse) { + $this->traversalStrategy = TraversalStrategy::IMPLICIT; + } else { + $this->traversalStrategy = TraversalStrategy::NONE; + } + + return $this; + } + + $this->constraints[] = $constraint; + + foreach ($constraint->groups as $group) { + $this->constraintsByGroup[$group][] = $constraint; + } + + return $this; + } + + /** + * Adds an list of constraints. + * + * @param Constraint[] $constraints The constraints to add + * + * @return $this + */ + public function addConstraints(array $constraints) + { + foreach ($constraints as $constraint) { + $this->addConstraint($constraint); + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getConstraints() + { + return $this->constraints; + } + + /** + * Returns whether this element has any constraints. + * + * @return bool + */ + public function hasConstraints() + { + return count($this->constraints) > 0; + } + + /** + * {@inheritdoc} + * + * Aware of the global group (* group). + */ + public function findConstraints($group) + { + return isset($this->constraintsByGroup[$group]) + ? $this->constraintsByGroup[$group] + : array(); + } + + /** + * {@inheritdoc} + */ + public function getCascadingStrategy() + { + return $this->cascadingStrategy; + } + + /** + * {@inheritdoc} + */ + public function getTraversalStrategy() + { + return $this->traversalStrategy; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/GetterMetadata.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/GetterMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..cd42c4338cbb56d981062eb6bf82d590682075ec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/GetterMetadata.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\Exception\ValidatorException; + +/** + * Stores all metadata needed for validating a class property via its getter + * method. + * + * A property getter is any method that is equal to the property's name, + * prefixed with either "get" or "is". That method will be used to access the + * property's value. + * + * The getter will be invoked by reflection, so the access of private and + * protected getters is supported. + * + * This class supports serialization and cloning. + * + * @author Bernhard Schussek + * + * @see PropertyMetadataInterface + */ +class GetterMetadata extends MemberMetadata +{ + /** + * Constructor. + * + * @param string $class The class the getter is defined on + * @param string $property The property which the getter returns + * @param string|null $method The method that is called to retrieve the value being validated (null for auto-detection) + * + * @throws ValidatorException + */ + public function __construct($class, $property, $method = null) + { + if (null === $method) { + $getMethod = 'get'.ucfirst($property); + $isMethod = 'is'.ucfirst($property); + $hasMethod = 'has'.ucfirst($property); + + if (method_exists($class, $getMethod)) { + $method = $getMethod; + } elseif (method_exists($class, $isMethod)) { + $method = $isMethod; + } elseif (method_exists($class, $hasMethod)) { + $method = $hasMethod; + } else { + throw new ValidatorException(sprintf('Neither of these methods exist in class %s: %s, %s, %s', $class, $getMethod, $isMethod, $hasMethod)); + } + } elseif (!method_exists($class, $method)) { + throw new ValidatorException(sprintf('The %s() method does not exist in class %s.', $method, $class)); + } + + parent::__construct($class, $method, $property); + } + + /** + * {@inheritdoc} + */ + public function getPropertyValue($object) + { + return $this->newReflectionMember($object)->invoke($object); + } + + /** + * {@inheritdoc} + */ + protected function newReflectionMember($objectOrClassName) + { + return new \ReflectionMethod($objectOrClassName, $this->getName()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..2ae89886c8d0967211651a451cbbe08dd459b007 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\MappingException; + +/** + * Base loader for validation metadata. + * + * This loader supports the loading of constraints from Symfony's default + * namespace (see {@link DEFAULT_NAMESPACE}) using the short class names of + * those constraints. Constraints can also be loaded using their fully + * qualified class names. At last, namespace aliases can be defined to load + * constraints with the syntax "alias:ShortName". + * + * @author Bernhard Schussek + */ +abstract class AbstractLoader implements LoaderInterface +{ + /** + * The namespace to load constraints from by default. + */ + const DEFAULT_NAMESPACE = '\\Symfony\\Component\\Validator\\Constraints\\'; + + /** + * @var array + */ + protected $namespaces = array(); + + /** + * Adds a namespace alias. + * + * The namespace alias can be used to reference constraints from specific + * namespaces in {@link newConstraint()}: + * + * $this->addNamespaceAlias('mynamespace', '\\Acme\\Package\\Constraints\\'); + * + * $constraint = $this->newConstraint('mynamespace:NotNull'); + * + * @param string $alias The alias + * @param string $namespace The PHP namespace + */ + protected function addNamespaceAlias($alias, $namespace) + { + $this->namespaces[$alias] = $namespace; + } + + /** + * Creates a new constraint instance for the given constraint name. + * + * @param string $name The constraint name. Either a constraint relative + * to the default constraint namespace, or a fully + * qualified class name. Alternatively, the constraint + * may be preceded by a namespace alias and a colon. + * The namespace alias must have been defined using + * {@link addNamespaceAlias()}. + * @param mixed $options The constraint options + * + * @return Constraint + * + * @throws MappingException If the namespace prefix is undefined + */ + protected function newConstraint($name, $options = null) + { + if (strpos($name, '\\') !== false && class_exists($name)) { + $className = (string) $name; + } elseif (strpos($name, ':') !== false) { + list($prefix, $className) = explode(':', $name, 2); + + if (!isset($this->namespaces[$prefix])) { + throw new MappingException(sprintf('Undefined namespace prefix "%s"', $prefix)); + } + + $className = $this->namespaces[$prefix].$className; + } else { + $className = self::DEFAULT_NAMESPACE.$name; + } + + return new $className($options); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..b09f5a669bac07a8ede309810f2aea459582d8da --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.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\Validator\Mapping\Loader; + +use Doctrine\Common\Annotations\Reader; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\Constraints\GroupSequenceProvider; +use Symfony\Component\Validator\Exception\MappingException; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Loads validation metadata using a Doctrine annotation {@link Reader}. + * + * @author Bernhard Schussek + */ +class AnnotationLoader implements LoaderInterface +{ + /** + * @var Reader + */ + protected $reader; + + public function __construct(Reader $reader) + { + $this->reader = $reader; + } + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadata $metadata) + { + $reflClass = $metadata->getReflectionClass(); + $className = $reflClass->name; + $success = false; + + foreach ($this->reader->getClassAnnotations($reflClass) as $constraint) { + if ($constraint instanceof GroupSequence) { + $metadata->setGroupSequence($constraint->groups); + } elseif ($constraint instanceof GroupSequenceProvider) { + $metadata->setGroupSequenceProvider(true); + } elseif ($constraint instanceof Constraint) { + $metadata->addConstraint($constraint); + } + + $success = true; + } + + foreach ($reflClass->getProperties() as $property) { + if ($property->getDeclaringClass()->name === $className) { + foreach ($this->reader->getPropertyAnnotations($property) as $constraint) { + if ($constraint instanceof Constraint) { + $metadata->addPropertyConstraint($property->name, $constraint); + } + + $success = true; + } + } + } + + foreach ($reflClass->getMethods() as $method) { + if ($method->getDeclaringClass()->name === $className) { + foreach ($this->reader->getMethodAnnotations($method) as $constraint) { + if ($constraint instanceof Callback) { + $constraint->callback = $method->getName(); + + $metadata->addConstraint($constraint); + } elseif ($constraint instanceof Constraint) { + if (preg_match('/^(get|is|has)(.+)$/i', $method->name, $matches)) { + $metadata->addGetterMethodConstraint(lcfirst($matches[2]), $matches[0], $constraint); + } else { + throw new MappingException(sprintf('The constraint on "%s::%s" cannot be added. Constraints can only be added on methods beginning with "get", "is" or "has".', $className, $method->name)); + } + } + + $success = true; + } + } + } + + return $success; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..326bbdfe75c725fc6cce67d1a6beda5f2507d531 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FileLoader.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Validator\Exception\MappingException; + +/** + * Base loader for loading validation metadata from a file. + * + * @author Bernhard Schussek + * + * @see YamlFileLoader + * @see XmlFileLoader + */ +abstract class FileLoader extends AbstractLoader +{ + /** + * The file to load. + * + * @var string + */ + protected $file; + + /** + * Creates a new loader. + * + * @param string $file The mapping file to load + * + * @throws MappingException If the file does not exist or is not readable + */ + public function __construct($file) + { + if (!is_file($file)) { + throw new MappingException(sprintf('The mapping file "%s" does not exist', $file)); + } + + if (!is_readable($file)) { + throw new MappingException(sprintf('The mapping file "%s" is not readable', $file)); + } + + if (!stream_is_local($this->file)) { + throw new MappingException(sprintf('The mapping file "%s" is not a local file', $file)); + } + + $this->file = $file; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..571c7e7abb24f27ac8124941a148b24c8f4ce500 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +/** + * Base loader for loading validation metadata from a list of files. + * + * @author Bulat Shakirzyanov + * @author Bernhard Schussek + * + * @see YamlFilesLoader + * @see XmlFilesLoader + */ +abstract class FilesLoader extends LoaderChain +{ + /** + * Creates a new loader. + * + * @param array $paths An array of file paths + */ + public function __construct(array $paths) + { + parent::__construct($this->getFileLoaders($paths)); + } + + /** + * Returns an array of file loaders for the given file paths. + * + * @param array $paths An array of file paths + * + * @return LoaderInterface[] The metadata loaders + */ + protected function getFileLoaders($paths) + { + $loaders = array(); + + foreach ($paths as $path) { + $loaders[] = $this->getFileLoaderInstance($path); + } + + return $loaders; + } + + /** + * Creates a loader for the given file path. + * + * @param string $path The file path + * + * @return LoaderInterface The created loader + */ + abstract protected function getFileLoaderInstance($path); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/LoaderChain.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/LoaderChain.php new file mode 100644 index 0000000000000000000000000000000000000000..970d9068d8ff4b8caf3ce904c3abb24aa8e7c3ac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/LoaderChain.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Validator\Exception\MappingException; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Loads validation metadata from multiple {@link LoaderInterface} instances. + * + * Pass the loaders when constructing the chain. Once + * {@link loadClassMetadata()} is called, that method will be called on all + * loaders in the chain. + * + * @author Bernhard Schussek + */ +class LoaderChain implements LoaderInterface +{ + /** + * @var LoaderInterface[] + */ + protected $loaders; + + /** + * @param LoaderInterface[] $loaders The metadata loaders to use + * + * @throws MappingException If any of the loaders has an invalid type + */ + public function __construct(array $loaders) + { + foreach ($loaders as $loader) { + if (!$loader instanceof LoaderInterface) { + throw new MappingException(sprintf('Class %s is expected to implement LoaderInterface', get_class($loader))); + } + } + + $this->loaders = $loaders; + } + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadata $metadata) + { + $success = false; + + foreach ($this->loaders as $loader) { + $success = $loader->loadClassMetadata($metadata) || $success; + } + + return $success; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/LoaderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/LoaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5dadc82eb80949d3b0cd43acd17586706e70408b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/LoaderInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Loads validation metadata into {@link ClassMetadata} instances. + * + * @author Bernhard Schussek + */ +interface LoaderInterface +{ + /** + * Loads validation metadata into a {@link ClassMetadata} instance. + * + * @param ClassMetadata $metadata The metadata to load + * + * @return bool Whether the loader succeeded + */ + public function loadClassMetadata(ClassMetadata $metadata); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/StaticMethodLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/StaticMethodLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..4ff22573acc3714daca1db351ccdfa000d57543d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/StaticMethodLoader.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Validator\Exception\MappingException; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Loads validation metadata by calling a static method on the loaded class. + * + * @author Bernhard Schussek + */ +class StaticMethodLoader implements LoaderInterface +{ + /** + * The name of the method to call. + * + * @var string + */ + protected $methodName; + + /** + * Creates a new loader. + * + * @param string $methodName The name of the static method to call + */ + public function __construct($methodName = 'loadValidatorMetadata') + { + $this->methodName = $methodName; + } + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadata $metadata) + { + /** @var \ReflectionClass $reflClass */ + $reflClass = $metadata->getReflectionClass(); + + if (!$reflClass->isInterface() && $reflClass->hasMethod($this->methodName)) { + $reflMethod = $reflClass->getMethod($this->methodName); + + if ($reflMethod->isAbstract()) { + return false; + } + + if (!$reflMethod->isStatic()) { + throw new MappingException(sprintf('The method %s::%s should be static', $reflClass->name, $this->methodName)); + } + + if ($reflMethod->getDeclaringClass()->name != $reflClass->name) { + return false; + } + + $reflMethod->invoke(null, $metadata); + + return true; + } + + return false; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..6548c5aecea485c53c71278c63f403ad23e6a692 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php @@ -0,0 +1,232 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Config\Util\XmlUtils; +use Symfony\Component\Validator\Exception\MappingException; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +/** + * Loads validation metadata from an XML file. + * + * @author Bernhard Schussek + */ +class XmlFileLoader extends FileLoader +{ + /** + * The XML nodes of the mapping file. + * + * @var \SimpleXMLElement[]|null + */ + protected $classes; + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadata $metadata) + { + if (null === $this->classes) { + $this->loadClassesFromXml(); + } + + if (isset($this->classes[$metadata->getClassName()])) { + $classDescription = $this->classes[$metadata->getClassName()]; + + $this->loadClassMetadataFromXml($metadata, $classDescription); + + return true; + } + + return false; + } + + /** + * Return the names of the classes mapped in this file. + * + * @return string[] The classes names + */ + public function getMappedClasses() + { + if (null === $this->classes) { + $this->loadClassesFromXml(); + } + + return array_keys($this->classes); + } + + /** + * Parses a collection of "constraint" XML nodes. + * + * @param \SimpleXMLElement $nodes The XML nodes + * + * @return array The Constraint instances + */ + protected function parseConstraints(\SimpleXMLElement $nodes) + { + $constraints = array(); + + foreach ($nodes as $node) { + if (count($node) > 0) { + if (count($node->value) > 0) { + $options = $this->parseValues($node->value); + } elseif (count($node->constraint) > 0) { + $options = $this->parseConstraints($node->constraint); + } elseif (count($node->option) > 0) { + $options = $this->parseOptions($node->option); + } else { + $options = array(); + } + } elseif (strlen((string) $node) > 0) { + $options = XmlUtils::phpize(trim($node)); + } else { + $options = null; + } + + $constraints[] = $this->newConstraint((string) $node['name'], $options); + } + + return $constraints; + } + + /** + * Parses a collection of "value" XML nodes. + * + * @param \SimpleXMLElement $nodes The XML nodes + * + * @return array The values + */ + protected function parseValues(\SimpleXMLElement $nodes) + { + $values = array(); + + foreach ($nodes as $node) { + if (count($node) > 0) { + if (count($node->value) > 0) { + $value = $this->parseValues($node->value); + } elseif (count($node->constraint) > 0) { + $value = $this->parseConstraints($node->constraint); + } else { + $value = array(); + } + } else { + $value = trim($node); + } + + if (isset($node['key'])) { + $values[(string) $node['key']] = $value; + } else { + $values[] = $value; + } + } + + return $values; + } + + /** + * Parses a collection of "option" XML nodes. + * + * @param \SimpleXMLElement $nodes The XML nodes + * + * @return array The options + */ + protected function parseOptions(\SimpleXMLElement $nodes) + { + $options = array(); + + foreach ($nodes as $node) { + if (count($node) > 0) { + if (count($node->value) > 0) { + $value = $this->parseValues($node->value); + } elseif (count($node->constraint) > 0) { + $value = $this->parseConstraints($node->constraint); + } else { + $value = array(); + } + } else { + $value = XmlUtils::phpize($node); + if (is_string($value)) { + $value = trim($value); + } + } + + $options[(string) $node['name']] = $value; + } + + return $options; + } + + /** + * Loads the XML class descriptions from the given file. + * + * @param string $path The path of the XML file + * + * @return \SimpleXMLElement The class descriptions + * + * @throws MappingException If the file could not be loaded + */ + protected function parseFile($path) + { + try { + $dom = XmlUtils::loadFile($path, __DIR__.'/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd'); + } catch (\Exception $e) { + throw new MappingException($e->getMessage(), $e->getCode(), $e); + } + + return simplexml_import_dom($dom); + } + + private function loadClassesFromXml() + { + // This method may throw an exception. Do not modify the class' + // state before it completes + $xml = $this->parseFile($this->file); + + $this->classes = array(); + + foreach ($xml->namespace as $namespace) { + $this->addNamespaceAlias((string) $namespace['prefix'], trim((string) $namespace)); + } + + foreach ($xml->class as $class) { + $this->classes[(string) $class['name']] = $class; + } + } + + private function loadClassMetadataFromXml(ClassMetadata $metadata, \SimpleXMLElement $classDescription) + { + if (count($classDescription->{'group-sequence-provider'}) > 0) { + $metadata->setGroupSequenceProvider(true); + } + + foreach ($classDescription->{'group-sequence'} as $groupSequence) { + if (count($groupSequence->value) > 0) { + $metadata->setGroupSequence($this->parseValues($groupSequence[0]->value)); + } + } + + foreach ($this->parseConstraints($classDescription->constraint) as $constraint) { + $metadata->addConstraint($constraint); + } + + foreach ($classDescription->property as $property) { + foreach ($this->parseConstraints($property->constraint) as $constraint) { + $metadata->addPropertyConstraint((string) $property['name'], $constraint); + } + } + + foreach ($classDescription->getter as $getter) { + foreach ($this->parseConstraints($getter->constraint) as $constraint) { + $metadata->addGetterConstraint((string) $getter['property'], $constraint); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..6017c3f44d23b4cea50b17bee5bdef4bb5697066 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +/** + * Loads validation metadata from a list of XML files. + * + * @author Bulat Shakirzyanov + * @author Bernhard Schussek + * + * @see FilesLoader + */ +class XmlFilesLoader extends FilesLoader +{ + /** + * {@inheritdoc} + */ + public function getFileLoaderInstance($file) + { + return new XmlFileLoader($file); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..1eabd1885fd1bb6be64b617d0f2746a09d975b73 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php @@ -0,0 +1,191 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Yaml\Exception\ParseException; +use Symfony\Component\Yaml\Parser as YamlParser; + +/** + * Loads validation metadata from a YAML file. + * + * @author Bernhard Schussek + */ +class YamlFileLoader extends FileLoader +{ + /** + * An array of YAML class descriptions. + * + * @var array + */ + protected $classes = null; + + /** + * Caches the used YAML parser. + * + * @var YamlParser + */ + private $yamlParser; + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadata $metadata) + { + if (null === $this->classes) { + $this->loadClassesFromYaml(); + } + + if (isset($this->classes[$metadata->getClassName()])) { + $classDescription = $this->classes[$metadata->getClassName()]; + + $this->loadClassMetadataFromYaml($metadata, $classDescription); + + return true; + } + + return false; + } + + /** + * Return the names of the classes mapped in this file. + * + * @return string[] The classes names + */ + public function getMappedClasses() + { + if (null === $this->classes) { + $this->loadClassesFromYaml(); + } + + return array_keys($this->classes); + } + + /** + * Parses a collection of YAML nodes. + * + * @param array $nodes The YAML nodes + * + * @return array An array of values or Constraint instances + */ + protected function parseNodes(array $nodes) + { + $values = array(); + + foreach ($nodes as $name => $childNodes) { + if (is_numeric($name) && is_array($childNodes) && 1 === count($childNodes)) { + $options = current($childNodes); + + if (is_array($options)) { + $options = $this->parseNodes($options); + } + + $values[] = $this->newConstraint(key($childNodes), $options); + } else { + if (is_array($childNodes)) { + $childNodes = $this->parseNodes($childNodes); + } + + $values[$name] = $childNodes; + } + } + + return $values; + } + + /** + * Loads the YAML class descriptions from the given file. + * + * @param string $path The path of the YAML file + * + * @return array The class descriptions + * + * @throws \InvalidArgumentException If the file could not be loaded or did + * not contain a YAML array + */ + private function parseFile($path) + { + try { + $classes = $this->yamlParser->parse(file_get_contents($path)); + } catch (ParseException $e) { + throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e); + } + + // empty file + if (null === $classes) { + return array(); + } + + // not an array + if (!is_array($classes)) { + throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $this->file)); + } + + return $classes; + } + + private function loadClassesFromYaml() + { + if (null === $this->yamlParser) { + $this->yamlParser = new YamlParser(); + } + + $this->classes = $this->parseFile($this->file); + + if (isset($this->classes['namespaces'])) { + foreach ($this->classes['namespaces'] as $alias => $namespace) { + $this->addNamespaceAlias($alias, $namespace); + } + + unset($this->classes['namespaces']); + } + } + + private function loadClassMetadataFromYaml(ClassMetadata $metadata, array $classDescription) + { + if (isset($classDescription['group_sequence_provider'])) { + $metadata->setGroupSequenceProvider( + (bool) $classDescription['group_sequence_provider'] + ); + } + + if (isset($classDescription['group_sequence'])) { + $metadata->setGroupSequence($classDescription['group_sequence']); + } + + if (isset($classDescription['constraints']) && is_array($classDescription['constraints'])) { + foreach ($this->parseNodes($classDescription['constraints']) as $constraint) { + $metadata->addConstraint($constraint); + } + } + + if (isset($classDescription['properties']) && is_array($classDescription['properties'])) { + foreach ($classDescription['properties'] as $property => $constraints) { + if (null !== $constraints) { + foreach ($this->parseNodes($constraints) as $constraint) { + $metadata->addPropertyConstraint($property, $constraint); + } + } + } + } + + if (isset($classDescription['getters']) && is_array($classDescription['getters'])) { + foreach ($classDescription['getters'] as $getter => $constraints) { + if (null !== $constraints) { + foreach ($this->parseNodes($constraints) as $constraint) { + $metadata->addGetterConstraint($getter, $constraint); + } + } + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/YamlFilesLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/YamlFilesLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..235856f5b980c959048a94dd72496dbe636fb884 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/YamlFilesLoader.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +/** + * Loads validation metadata from a list of YAML files. + * + * @author Bulat Shakirzyanov + * @author Bernhard Schussek + * + * @see FilesLoader + */ +class YamlFilesLoader extends FilesLoader +{ + /** + * {@inheritdoc} + */ + public function getFileLoaderInstance($file) + { + return new YamlFileLoader($file); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1ca840b05db2e1f4c428426c8947f9dd9c3d3947 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/MemberMetadata.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/MemberMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..edeed3749ee94ade1a937f5175b582866e2da210 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/MemberMetadata.php @@ -0,0 +1,195 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * Stores all metadata needed for validating a class property. + * + * The method of accessing the property's value must be specified by subclasses + * by implementing the {@link newReflectionMember()} method. + * + * This class supports serialization and cloning. + * + * @author Bernhard Schussek + * + * @see PropertyMetadataInterface + */ +abstract class MemberMetadata extends GenericMetadata implements PropertyMetadataInterface +{ + /** + * @var string + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getClassName()} instead. + */ + public $class; + + /** + * @var string + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getName()} instead. + */ + public $name; + + /** + * @var string + * + * @internal This property is public in order to reduce the size of the + * class' serialized representation. Do not access it. Use + * {@link getPropertyName()} instead. + */ + public $property; + + /** + * @var \ReflectionMethod[]|\ReflectionProperty[] + */ + private $reflMember = array(); + + /** + * Constructor. + * + * @param string $class The name of the class this member is defined on + * @param string $name The name of the member + * @param string $property The property the member belongs to + */ + public function __construct($class, $name, $property) + { + $this->class = $class; + $this->name = $name; + $this->property = $property; + } + + /** + * {@inheritdoc} + */ + public function addConstraint(Constraint $constraint) + { + if (!in_array(Constraint::PROPERTY_CONSTRAINT, (array) $constraint->getTargets())) { + throw new ConstraintDefinitionException(sprintf( + 'The constraint %s cannot be put on properties or getters', + get_class($constraint) + )); + } + + parent::addConstraint($constraint); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function __sleep() + { + return array_merge(parent::__sleep(), array( + 'class', + 'name', + 'property', + )); + } + + /** + * Returns the name of the member. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * {@inheritdoc} + */ + public function getClassName() + { + return $this->class; + } + + /** + * {@inheritdoc} + */ + public function getPropertyName() + { + return $this->property; + } + + /** + * Returns whether this member is public. + * + * @param object|string $objectOrClassName The object or the class name + * + * @return bool + */ + public function isPublic($objectOrClassName) + { + return $this->getReflectionMember($objectOrClassName)->isPublic(); + } + + /** + * Returns whether this member is protected. + * + * @param object|string $objectOrClassName The object or the class name + * + * @return bool + */ + public function isProtected($objectOrClassName) + { + return $this->getReflectionMember($objectOrClassName)->isProtected(); + } + + /** + * Returns whether this member is private. + * + * @param object|string $objectOrClassName The object or the class name + * + * @return bool + */ + public function isPrivate($objectOrClassName) + { + return $this->getReflectionMember($objectOrClassName)->isPrivate(); + } + + /** + * Returns the reflection instance for accessing the member's value. + * + * @param object|string $objectOrClassName The object or the class name + * + * @return \ReflectionMethod|\ReflectionProperty The reflection instance + */ + public function getReflectionMember($objectOrClassName) + { + $className = is_string($objectOrClassName) ? $objectOrClassName : get_class($objectOrClassName); + if (!isset($this->reflMember[$className])) { + $this->reflMember[$className] = $this->newReflectionMember($objectOrClassName); + } + + return $this->reflMember[$className]; + } + + /** + * Creates a new reflection instance for accessing the member's value. + * + * Must be implemented by subclasses. + * + * @param object|string $objectOrClassName The object or the class name + * + * @return \ReflectionMethod|\ReflectionProperty The reflection instance + */ + abstract protected function newReflectionMember($objectOrClassName); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/MetadataInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/MetadataInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..514beb94926ec14b7ac3cedd5eaf9f06c317e74d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/MetadataInterface.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\Constraint; + +/** + * A container for validation metadata. + * + * Most importantly, the metadata stores the constraints against which an object + * and its properties should be validated. + * + * Additionally, the metadata stores whether objects should be validated + * against their class' metadata and whether traversable objects should be + * traversed or not. + * + * @author Bernhard Schussek + * + * @see CascadingStrategy + * @see TraversalStrategy + */ +interface MetadataInterface +{ + /** + * Returns the strategy for cascading objects. + * + * @return int The cascading strategy + * + * @see CascadingStrategy + */ + public function getCascadingStrategy(); + + /** + * Returns the strategy for traversing traversable objects. + * + * @return int The traversal strategy + * + * @see TraversalStrategy + */ + public function getTraversalStrategy(); + + /** + * Returns all constraints of this element. + * + * @return Constraint[] A list of Constraint instances + */ + public function getConstraints(); + + /** + * Returns all constraints for a given validation group. + * + * @param string $group The validation group + * + * @return Constraint[] A list of constraint instances + */ + public function findConstraints($group); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/PropertyMetadata.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/PropertyMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..d12701cb44aba94505011a9b88a51c0ff37f963f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/PropertyMetadata.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +use Symfony\Component\Validator\Exception\ValidatorException; + +/** + * Stores all metadata needed for validating a class property. + * + * The value of the property is obtained by directly accessing the property. + * The property will be accessed by reflection, so the access of private and + * protected properties is supported. + * + * This class supports serialization and cloning. + * + * @author Bernhard Schussek + * + * @see PropertyMetadataInterface + */ +class PropertyMetadata extends MemberMetadata +{ + /** + * Constructor. + * + * @param string $class The class this property is defined on + * @param string $name The name of this property + * + * @throws ValidatorException + */ + public function __construct($class, $name) + { + if (!property_exists($class, $name)) { + throw new ValidatorException(sprintf('Property "%s" does not exist in class "%s"', $name, $class)); + } + + parent::__construct($class, $name, $name); + } + + /** + * {@inheritdoc} + */ + public function getPropertyValue($object) + { + return $this->getReflectionMember($object)->getValue($object); + } + + /** + * {@inheritdoc} + */ + protected function newReflectionMember($objectOrClassName) + { + $originalClass = is_string($objectOrClassName) ? $objectOrClassName : get_class($objectOrClassName); + + while (!property_exists($objectOrClassName, $this->getName())) { + $objectOrClassName = get_parent_class($objectOrClassName); + + if (false === $objectOrClassName) { + throw new ValidatorException(sprintf('Property "%s" does not exist in class "%s".', $this->getName(), $originalClass)); + } + } + + $member = new \ReflectionProperty($objectOrClassName, $this->getName()); + $member->setAccessible(true); + + return $member; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/PropertyMetadataInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/PropertyMetadataInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..059b142eda3b2bbb2fec98e5233d9a4cde52f06d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/PropertyMetadataInterface.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +/** + * Stores all metadata needed for validating the value of a class property. + * + * Most importantly, the metadata stores the constraints against which the + * property's value should be validated. + * + * Additionally, the metadata stores whether objects stored in the property + * should be validated against their class' metadata and whether traversable + * objects should be traversed or not. + * + * @author Bernhard Schussek + * + * @see MetadataInterface + * @see CascadingStrategy + * @see TraversalStrategy + */ +interface PropertyMetadataInterface extends MetadataInterface +{ + /** + * Returns the name of the property. + * + * @return string The property name + */ + public function getPropertyName(); + + /** + * Extracts the value of the property from the given container. + * + * @param mixed $containingValue The container to extract the property value from + * + * @return mixed The value of the property + */ + public function getPropertyValue($containingValue); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..c22469b1f2c85127f785c1b6eb9ee218857f957e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +/** + * Specifies whether and how a traversable object should be traversed. + * + * If the node traverser traverses a node whose value is an instance of + * {@link \Traversable}, and if that node is either a class node or if + * cascading is enabled, then the node's traversal strategy will be checked. + * Depending on the requested traversal strategy, the node traverser will + * iterate over the object and cascade each object or collection returned by + * the iterator. + * + * The traversal strategy is ignored for arrays. Arrays are always iterated. + * + * @author Bernhard Schussek + * + * @see CascadingStrategy + */ +class TraversalStrategy +{ + /** + * Specifies that a node's value should be iterated only if it is an + * instance of {@link \Traversable}. + */ + const IMPLICIT = 1; + + /** + * Specifies that a node's value should never be iterated. + */ + const NONE = 2; + + /** + * Specifies that a node's value should always be iterated. If the value is + * not an instance of {@link \Traversable}, an exception should be thrown. + */ + const TRAVERSE = 4; + + /** + * Not instantiable. + */ + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/ObjectInitializerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/ObjectInitializerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..dcbc2cd11dbdd3200c798beae024a6f93ea639df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/ObjectInitializerInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Prepares an object for validation. + * + * Concrete implementations of this interface are used by {@link ValidationVisitorInterface} + * to initialize objects just before validating them. + * + * @author Fabien Potencier + * @author Bernhard Schussek + */ +interface ObjectInitializerInterface +{ + /** + * Initializes an object just before validation. + * + * @param object $object The object to validate + */ + public function initialize($object); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/README.md b/vendor/symfony/symfony/src/Symfony/Component/Validator/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3ccb2901adeacf5ba28df3bfa09edf7cd66d85a6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/README.md @@ -0,0 +1,16 @@ +Validator Component +=================== + +The Validator component provides tools to validate values following the +[JSR-303 Bean Validation specification][1]. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/validator.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) + +[1]: http://jcp.org/en/jsr/detail?id=303 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf new file mode 100644 index 0000000000000000000000000000000000000000..177bb0038f5236ed6fa4756f10e46fd6624184d3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf @@ -0,0 +1,227 @@ + + + + + + This value should be false. + Hierdie waarde moet vals wees. + + + This value should be true. + Hierdie waarde moet waar wees. + + + This value should be of type {{ type }}. + Hierdie waarde moet van die soort {{type}} wees. + + + This value should be blank. + Hierdie waarde moet leeg wees. + + + The value you selected is not a valid choice. + Die waarde wat jy gekies het is nie 'n geldige keuse nie. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Jy moet ten minste {{ limit }} kies.|Jy moet ten minste {{ limit }} keuses kies. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Jy moet by die meeste {{ limit }} keuse kies.|Jy moet by die meeste {{ limit }} keuses kies. + + + One or more of the given values is invalid. + Een of meer van die gegewe waardes is ongeldig. + + + This field was not expected. + Die veld is nie verwag nie. + + + This field is missing. + Hierdie veld ontbreek. + + + This value is not a valid date. + Hierdie waarde is nie 'n geldige datum nie. + + + This value is not a valid datetime. + Hierdie waarde is nie 'n geldige datum en tyd nie. + + + This value is not a valid email address. + Hierdie waarde is nie 'n geldige e-pos adres nie. + + + The file could not be found. + Die lêer kon nie gevind word nie. + + + The file is not readable. + Die lêer kan nie gelees word nie. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Die lêer is te groot ({{ size }} {{ suffix }}). Toegelaat maksimum grootte is {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Die MIME-tipe van die lêer is ongeldig ({{ type }}). Toegelaat MIME-tipes is {{ types }}. + + + This value should be {{ limit }} or less. + Hierdie waarde moet {{ limit }} of minder wees. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Hierdie waarde is te lank. Dit moet {{ limit }} karakter of minder wees.|Hierdie waarde is te lank. Dit moet {{ limit }} karakters of minder wees. + + + This value should be {{ limit }} or more. + Hierdie waarde moet {{ limit }} of meer wees. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Hierdie waarde is te kort. Dit moet {{ limit }} karakter of meer wees.|Hierdie waarde is te kort. Dit moet {{ limit }} karakters of meer wees. + + + This value should not be blank. + Hierdie waarde moet nie leeg wees nie. + + + This value should not be null. + Hierdie waarde moet nie nul wees nie. + + + This value should be null. + Hierdie waarde moet nul wees. + + + This value is not valid. + Hierdie waarde is nie geldig nie. + + + This value is not a valid time. + Hierdie waarde is nie 'n geldige tyd nie. + + + This value is not a valid URL. + Hierdie waarde is nie 'n geldige URL nie. + + + The two values should be equal. + Die twee waardes moet gelyk wees. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Die lêer is te groot. Toegelaat maksimum grootte is {{ limit }} {{ suffix }}. + + + The file is too large. + Die lêer is te groot. + + + The file could not be uploaded. + Die lêer kan nie opgelaai word nie. + + + This value should be a valid number. + Hierdie waarde moet 'n geldige nommer wees. + + + This file is not a valid image. + Hierdie lêer is nie 'n geldige beeld nie. + + + This is not a valid IP address. + Hierdie is nie 'n geldige IP-adres nie. + + + This value is not a valid language. + Hierdie waarde is nie 'n geldige taal nie. + + + This value is not a valid locale. + Hierdie waarde is nie 'n geldige land instelling nie. + + + This value is not a valid country. + Hierdie waarde is nie 'n geldige land nie. + + + This value is already used. + Hierdie waarde word reeds gebruik. + + + The size of the image could not be detected. + Die grootte van die beeld kon nie opgespoor word nie. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Die beeld breedte is te groot ({{ width }}px). Toegelaat maksimum breedte is {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Die beeld breedte is te klein ({{ width }}px). Minimum breedte verwag is {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Die beeld hoogte is te groot ({{ height }}px). Toegelaat maksimum hoogte is {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Die beeld hoogte is te klein ({{ height }}px). Minimum hoogte verwag is {{ min_height }}px. + + + This value should be the user's current password. + Hierdie waarde moet die huidige wagwoord van die gebruiker wees. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Hierdie waarde moet presies {{ limit }} karakter wees.|Hierdie waarde moet presies {{ limit }} karakters wees. + + + The file was only partially uploaded. + Die lêer is slegs gedeeltelik opgelaai. + + + No file was uploaded. + Geen lêer is opgelaai nie. + + + No temporary folder was configured in php.ini. + Geen tydelike lêer is ingestel in php.ini nie. + + + Cannot write temporary file to disk. + Kan nie tydelike lêer skryf op skyf nie. + + + A PHP extension caused the upload to fail. + 'n PHP-uitbreiding veroorsaak die oplaai van die lêer om te misluk. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Hierdie versameling moet {{ limit }} element of meer bevat.|Hierdie versameling moet {{ limit }} elemente of meer bevat. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Hierdie versameling moet {{ limit }} element of minder bevat.|Hierdie versameling moet {{ limit }} elemente of meer bevat. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Hierdie versameling moet presies {{ limit }} element bevat.|Hierdie versameling moet presies {{ limit }} elemente bevat. + + + Invalid card number. + Ongeldige kredietkaart nommer. + + + Unsupported card type or invalid card number. + Nie-ondersteunde tipe kaart of ongeldige kredietkaart nommer. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf new file mode 100644 index 0000000000000000000000000000000000000000..4950e0ccd1183b3b715a167812dee1d86fcb1f03 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf @@ -0,0 +1,315 @@ + + + + + + This value should be false. + هذه القيمة يجب أن تكون خاطئة. + + + This value should be true. + هذه القيمة يجب أن تكون حقيقية. + + + This value should be of type {{ type }}. + هذه القيمة يجب ان تكون من نوع {{ type }}. + + + This value should be blank. + هذه القيمة يجب ان تكون ÙØ§Ø±ØºØ©. + + + The value you selected is not a valid choice. + القيمة المختارة ليست خيارا صحيحا. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيارات على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيارات على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر. + + + One or more of the given values is invalid. + واحد أو أكثر من القيم المعطاه خاطئ. + + + This field was not expected. + لم يكن من المتوقع هذا المجال. + + + This field is missing. + هذا المجال Ù…Ùقود. + + + This value is not a valid date. + هذه القيمة ليست تاريخا صالحا. + + + This value is not a valid datetime. + هذه القيمة ليست تاريخا Ùˆ وقتا صالحا. + + + This value is not a valid email address. + هذه القيمة ليست عنوان بريد إلكتروني صحيح. + + + The file could not be found. + لا يمكن العثور على الملÙ. + + + The file is not readable. + المل٠غير قابل للقراءة. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + المل٠كبير جدا ({{ size }} {{ suffix }}).اقصى مساحه مسموح بها ({{ limit }} {{ suffix }}). + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + نوع المل٠غير صحيح ({{ type }}). الانواع المسموح بها هى {{ types }}. + + + This value should be {{ limit }} or less. + هذه القيمة يجب ان تكون {{ limit }} او اقل. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حر٠او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حر٠او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حرو٠او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حر٠او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حر٠او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حر٠او اقل. + + + This value should be {{ limit }} or more. + هذه القيمة يجب ان تكون {{ limit }} او اكثر. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حر٠او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حر٠او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حرو٠او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حر٠او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حر٠او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حر٠او اكثر. + + + This value should not be blank. + هذه القيمة يجب الا تكون ÙØ§Ø±ØºØ©. + + + This value should not be null. + هذه القيمة يجب الا تكون ÙØ§Ø±ØºØ©. + + + This value should be null. + هذه القيمة يجب ان تكون ÙØ§Ø±ØºØ©. + + + This value is not valid. + هذه القيمة غير صحيحة. + + + This value is not a valid time. + هذه القيمة ليست وقت صحيح. + + + This value is not a valid URL. + هذه القيمة ليست رابط الكترونى صحيح. + + + The two values should be equal. + القيمتان يجب ان تكونا متساويتان. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + المل٠كبير جدا. اقصى مساحه مسموح بها {{ limit }} {{ suffix }}. + + + The file is too large. + المل٠كبير جدا. + + + The file could not be uploaded. + لم استطع استقبال الملÙ. + + + This value should be a valid number. + هذه القيمة يجب ان تكون رقم. + + + This file is not a valid image. + هذا المل٠ليس صورة صحيحة. + + + This is not a valid IP address. + هذه القيمة ليست عنوان رقمى صحيح. + + + This value is not a valid language. + هذه القيمة ليست لغة صحيحة. + + + This value is not a valid locale. + هذه القيمة ليست موقع صحيح. + + + This value is not a valid country. + هذه القيمة ليست بلدا صالحا. + + + This value is already used. + هذه القيمة مستخدمة Ø¨Ø§Ù„ÙØ¹Ù„. + + + The size of the image could not be detected. + لم استطع Ù…Ø¹Ø±ÙØ© حجم الصورة. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + عرض الصورة كبير جدا ({{ width }}px). اقصى عرض مسموح به هو{{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + عرض الصورة صغير جدا ({{ width }}px). اقل عرض مسموح به هو{{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + طول الصورة كبير جدا ({{ height }}px). اقصى طول مسموح به هو{{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + طول الصورة صغير جدا ({{ height }}px). اقل طول مسموح به هو{{ min_height }}px. + + + This value should be the user's current password. + هذه القيمة يجب ان تكون كلمة سر المستخدم الحالية. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + هذه القيمة يجب ان تحتوى على {{ limit }} حر٠Ùقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حر٠Ùقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حرو٠Ùقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حر٠Ùقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حر٠Ùقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حر٠Ùقط. + + + The file was only partially uploaded. + تم استقبال جزء من المل٠Ùقط. + + + No file was uploaded. + لم يتم ارسال اى ملÙ. + + + No temporary folder was configured in php.ini. + لم يتم تهيئة Ø­Ø§ÙØ¸Ø© مؤقتة ÙÙ‰ مل٠php.ini. + + + Cannot write temporary file to disk. + لم استطع كتابة المل٠المؤقت. + + + A PHP extension caused the upload to fail. + احد Ø§Ø¶Ø§ÙØ§Øª PHP تسببت ÙÙ‰ ÙØ´Ù„ استقبال الملÙ. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عناصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عناصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر Ùقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر Ùقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عناصر Ùقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر Ùقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر Ùقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر Ùقط. + + + Invalid card number. + رقم البطاقه غير صحيح. + + + Unsupported card type or invalid card number. + نوع البطاقه غير مدعوم او الرقم غير صحيح. + + + This is not a valid International Bank Account Number (IBAN). + الرقم IBAN (رقم الحساب المصرÙÙŠ الدولي) الذي تم إدخاله غير صالح. + + + This value is not a valid ISBN-10. + هذه القيمة ليست ISBN-10 صالحة. + + + This value is not a valid ISBN-13. + هذه القيمة ليست ISBN-13 صالحة. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + هذه القيمة ليست ISBN-10 صالحة ولا ISBN-13 صالحة. + + + This value is not a valid ISSN. + هذه القيمة ليست ISSN صالحة. + + + This value is not a valid currency. + العÙملة غير صحيحة. + + + This value should be equal to {{ compared_value }}. + القيمة يجب ان تساوي {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + القيمة يجب ان تكون اعلي من {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + القيمة يجب ان تكون مساوية او اعلي من {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + القيمة يجب ان تطابق {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + القيمة يجب ان تكون اقل من {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + القيمة يجب ان تساوي او تقل عن {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + القيمة يجب ان لا تساوي {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + القيمة يجب ان لا تطابق {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + نسبة العرض على Ø§Ù„Ø§Ø±ØªÙØ§Ø¹ للصورة كبيرة جدا ({{ ratio }}). الحد الأقصى للنسبة المسموح به هو {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + نسبة العرض على Ø§Ù„Ø§Ø±ØªÙØ§Ø¹ للصورة صغيرة جدا ({{ ratio }}). الحد الأدنى للنسبة المسموح به هو {{ max_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + الصورة مربعة ({{ width }}x{{ height }}px). الصور المربعة غير مسموح بها. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + الصورة ÙÙŠ وضع Ø£Ùقي ({{ width }}x{{ height }}px). الصور ÙÙŠ وضع Ø£Ùقي غير مسموح بها. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + الصورة ÙÙŠ وضع عمودي ({{ width }}x{{ height }}px). الصور ÙÙŠ وضع عمودي غير مسموح بها. + + + An empty file is not allowed. + Ù…Ù„Ù ÙØ§Ø±Øº غير مسموح به. + + + The host could not be resolved. + يتعذر الإتصال بالنطاق. + + + This value does not match the expected {{ charset }} charset. + هذه القيمة غير متطابقة مع صيغة التحويل {{ charset }}. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf new file mode 100644 index 0000000000000000000000000000000000000000..add868cd42b40e3fb3f3ca65089bb1e2c524af2b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf @@ -0,0 +1,227 @@ + + + + + + This value should be false. + Bu dÉ™yÉ™r false olmalıdır. + + + This value should be true. + Bu dÉ™yÉ™r true olmalıdır. + + + This value should be of type {{ type }}. + Bu dÉ™yÉ™rin tipi {{ type }} olmalıdır. + + + This value should be blank. + Bu dÉ™yÉ™r boÅŸ olmalıdır. + + + The value you selected is not a valid choice. + Seçdiyiniz dÉ™yÉ™r düzgün bir seçim deÄŸil. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Æn az {{ limit }} seçim qeyd edilmÉ™lidir. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Æn çox {{ limit }} seçim qeyd edilmÉ™lidir. + + + One or more of the given values is invalid. + TÉ™qdim edilÉ™n dÉ™yÉ™rlÉ™rdÉ™n bir vÉ™ ya bir neçəsi yanlışdır. + + + This field was not expected. + Bu sahÉ™ gözlÉ™nilmirdi. + + + This field is missing. + Bu sahÉ™ É™ksikdir. + + + This value is not a valid date. + Bu dÉ™yÉ™r düzgün bir tarix deyil. + + + This value is not a valid datetime. + Bu dÉ™yÉ™r düzgün bir tarixsaat deyil. + + + This value is not a valid email address. + Bu dÉ™yÉ™r düzgün bir e-poçt adresi deyil. + + + The file could not be found. + Fayl tapılmadı. + + + The file is not readable. + Fayl oxunabilÉ™n deyil. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Fayl çox böyükdür ({{ size }} {{ suffix }}). İcazÉ™ verilÉ™n maksimum fayl ölçüsü {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Faylın mime tipi yanlışdr ({{ type }}). İcazÉ™ verilÉ™n mime tiplÉ™ri {{ types }}. + + + This value should be {{ limit }} or less. + Bu dÉ™yÉ™r {{ limit }} vÉ™ ya altında olmalıdır. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Bu dÉ™yÉ™r çox uzundur. {{ limit }} vÉ™ ya daha az simvol olmalıdır. + + + This value should be {{ limit }} or more. + Bu dÉ™yÉ™r {{ limit }} veya daha fazla olmalıdır. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Bu dÉ™yÉ™r çox qısadır. {{ limit }} vÉ™ ya daha çox simvol olmalıdır. + + + This value should not be blank. + Bu dÉ™yÉ™r boÅŸ olmamalıdır. + + + This value should not be null. + Bu dÉ™yÉ™r boÅŸ olmamalıdır. + + + This value should be null. + Bu dÉ™yÉ™r boÅŸ olmamalıdır. + + + This value is not valid. + Bu dÉ™yÉ™r doÄŸru deyil. + + + This value is not a valid time. + Bu dÉ™yÉ™r doÄŸru bir saat deyil. + + + This value is not a valid URL. + Bu dÉ™yÉ™r doÄŸru bir URL deÄŸil. + + + The two values should be equal. + İki dÉ™yÉ™r eyni olmalıdır. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Fayl çox böyükdür. İcazÉ™ verilÉ™n É™n böyük fayl ölçüsü {{ limit }} {{ suffix }}. + + + The file is too large. + Fayl çox böyükdür. + + + The file could not be uploaded. + Fayl yüklÉ™nÉ™bilmir. + + + This value should be a valid number. + Bu dÉ™yÉ™r rÉ™qÉ™m olmalıdır. + + + This file is not a valid image. + Bu fayl düzgün bir ÅŸÉ™kil deyil. + + + This is not a valid IP address. + Bu düzgün bir IP adresi deyil. + + + This value is not a valid language. + Bu dÉ™yÉ™r düzgün bir dil deyil. + + + This value is not a valid locale. + Bu dÉ™yÉ™r düzgün bir dil deyil. + + + This value is not a valid country. + Bu dÉ™yÉ™r düzgün bir ölkÉ™ deyil. + + + This value is already used. + Bu dÉ™yÉ™r hal-hazırda istifadÉ™dÉ™dir. + + + The size of the image could not be detected. + Şəklin ölçüsü hesablana bilmir. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Şəklin geniÅŸliyi çox böyükdür ({{ width }}px). İcazÉ™ verilÉ™n É™n böyük geniÅŸlik {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Şəklin geniÅŸliyi çox kiçikdir ({{ width }}px). Æn az {{ min_width }}px olmalıdır. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Şəklin yüksÉ™kliyi çox böyükdür ({{ height }}px). İcazÉ™ verilÉ™n É™n böyük yüksÉ™klik {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Şəklin yüksÉ™kliyi çox kiçikdir ({{ height }}px). Æn az {{ min_height }}px olmalıdır. + + + This value should be the user's current password. + Bu dÉ™yÉ™r istifadəçinin hazırkı parolu olmalıdır. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Bu dÉ™yÉ™r tam olaraq {{ limit }} simvol olmaldır. + + + The file was only partially uploaded. + Fayl qismÉ™n yüklÉ™ndi. + + + No file was uploaded. + Fayl yüklÉ™nmÉ™di. + + + No temporary folder was configured in php.ini. + php.ini'dÉ™ müvÉ™qqÉ™ti qovluq quraÅŸdırılmayıb. + + + Cannot write temporary file to disk. + MüvÉ™qqÉ™ti fayl diskÉ™ yazıla bilmir. + + + A PHP extension caused the upload to fail. + Bir PHP É™lavÉ™si faylın yüklÉ™nmÉ™sinÉ™ mane oldu. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Bu kolleksiyada {{ limit }} vÉ™ ya daha çox element olmalıdır. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Bu kolleksiyada {{ limit }} vÉ™ ya daha az element olmalıdır. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Bu kolleksiyada tam olaraq {{ limit }} element olmalıdır. + + + Invalid card number. + Yanlış kart nömrÉ™si. + + + Unsupported card type or invalid card number. + DÉ™stÉ™klÉ™nmÉ™yÉ™n kart tipi vÉ™ ya yanlış kart nömrÉ™si. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf new file mode 100644 index 0000000000000000000000000000000000000000..a33eb8239153b388acc1b59816176ff3bc7572ac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + СтойноÑтта трÑбва да бъде лъжа (false). + + + This value should be true. + СтойноÑтта трÑбва да бъде иÑтина (true). + + + This value should be of type {{ type }}. + СтойноÑтта трÑбва да бъде от тип {{ type }}. + + + This value should be blank. + СтойноÑтта трÑбва да бъде празна. + + + The value you selected is not a valid choice. + Избраната ÑтойноÑÑ‚ е невалидна. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + ТрÑбва да изберете поне {{ limit }} опциÑ.|ТрÑбва да изберете поне {{ limit }} опции. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + ТрÑбва да изберете най-много {{ limit }} опциÑ.|ТрÑбва да изберете най-много {{ limit }} опции. + + + One or more of the given values is invalid. + Една или повече от зададените ÑтойноÑти е невалидна. + + + This field was not expected. + Това поле не Ñе е очаквало. + + + This field is missing. + Това поле липÑва. + + + This value is not a valid date. + СтойноÑтта не е валидна дата (date). + + + This value is not a valid datetime. + СтойноÑтта не е валидна дата (datetime). + + + This value is not a valid email address. + СтойноÑтта не е валиден email адреÑ. + + + The file could not be found. + Файлът не беше открит. + + + The file is not readable. + Файлът не може да бъде прочетен. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Файлът е твърде голÑм ({{ size }} {{ suffix }}). МакÑималниÑÑ‚ размер е {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Майм типа на файла е невалиден ({{ type }}). Разрешени майм типове Ñа {{ types }}. + + + This value should be {{ limit }} or less. + СтойноÑтта трÑбва да бъде {{ limit }} или по-малко. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + СтойноÑтта е твърде дълга. ТрÑбва да Ñъдържа най-много {{ limit }} Ñимвол.|СтойноÑтта е твърде дълга. ТрÑбва да Ñъдържа най-много {{ limit }} Ñимвола. + + + This value should be {{ limit }} or more. + СтойноÑтта трÑбва да бъде {{ limit }} или повече. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + СтойноÑтта е твърде кратка. ТрÑбва да Ñъдържа поне {{ limit }} Ñимвол.|СтойноÑтта е твърде кратка. ТрÑбва да Ñъдържа поне {{ limit }} Ñимвола. + + + This value should not be blank. + СтойноÑтта не трÑбва да бъде празна. + + + This value should not be null. + СтойноÑтта не трÑбва да бъде null. + + + This value should be null. + СтойноÑтта трÑбва да бъде null. + + + This value is not valid. + СтойноÑтта не е валидна. + + + This value is not a valid time. + СтойноÑтта не е валидно време (time). + + + This value is not a valid URL. + СтойноÑтта не е валиден URL. + + + The two values should be equal. + Двете ÑтойноÑти трÑбва да бъдат равни. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Файлът е твърде голÑм. РазрешениÑÑ‚ макÑимален размер е {{ limit }} {{ suffix }}. + + + The file is too large. + Файлът е твърде голÑм. + + + The file could not be uploaded. + Файлът не може да бъде качен. + + + This value should be a valid number. + СтойноÑтта трÑбва да бъде валиден номер. + + + This file is not a valid image. + Файлът не е валидно изображение. + + + This is not a valid IP address. + Това не е валиден IP адреÑ. + + + This value is not a valid language. + СтойноÑтта не е валиден език. + + + This value is not a valid locale. + СтойноÑтта не е валидна локализациÑ. + + + This value is not a valid country. + СтойноÑтта не е валидна държава. + + + This value is already used. + СтойноÑтта вече е в употреба. + + + The size of the image could not be detected. + Размера на изображението не може да бъде определен. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Изображението е твърде широко ({{ width }}px). Широчината трÑбва да бъде макÑимум {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Изображението е Ñ Ñ‚Ð²ÑŠÑ€Ð´Ðµ малка широчина ({{ width }}px). Широчината трÑбва да бъде минимум {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Изображението е Ñ Ñ‚Ð²ÑŠÑ€Ð´Ðµ голÑма виÑочина ({{ height }}px). ВиÑочината трÑбва да бъде макÑимум {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Изображението е Ñ Ñ‚Ð²ÑŠÑ€Ð´Ðµ малка виÑочина ({{ height }}px). ВиÑочина трÑбва да бъде минимум {{ min_height }}px. + + + This value should be the user's current password. + СтойноÑтта трÑбва да бъде текущата потребителÑка парола. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + СтойноÑтта трÑбва да бъде точно {{ limit }} Ñимвол.|СтойноÑтта трÑбва да бъде точно {{ limit }} Ñимвола. + + + The file was only partially uploaded. + Файлът е качен чаÑтично. + + + No file was uploaded. + Файлът не беше качен. + + + No temporary folder was configured in php.ini. + Ðе е поÑочена Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð·Ð° временни файлове в php.ini. + + + Cannot write temporary file to disk. + Ðе може да запише временен файл на диÑка. + + + A PHP extension caused the upload to fail. + PHP разширение предизвика прекъÑване на качването. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + КолекциÑта трÑбва да Ñъдържа поне {{ limit }} елемент.|КолекциÑта трÑбва да Ñъдържа поне {{ limit }} елемента. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + КолекциÑта трÑбва да Ñъдържа най-много {{ limit }} елемент.|КолекциÑта трÑбва да Ñъдържа най-много {{ limit }} елемента. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + КолекциÑта трÑбва да Ñъдържа точно {{ limit }} елемент.|КолекциÑта трÑбва да Ñъдържа точно {{ limit }} елемента. + + + Invalid card number. + Ðевалиден номер на картата. + + + Unsupported card type or invalid card number. + Ðеподдържан тип карта или невалиден номер на картата. + + + This is not a valid International Bank Account Number (IBAN). + Ðевалиден Международен номер на банкова Ñметка (IBAN). + + + This value is not a valid ISBN-10. + Ðевалиден ISBN-10. + + + This value is not a valid ISBN-13. + Ðевалиден ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ðевалидна ÑтойноÑÑ‚ както за ISBN-10, така и за ISBN-13 . + + + This value is not a valid ISSN. + Ðевалиден Международен Ñтандартен Ñериен номер (ISSN). + + + This value is not a valid currency. + Ðевалидна валута. + + + This value should be equal to {{ compared_value }}. + СтойноÑтта трÑбва да бъде равна на {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + СтойноÑтта трÑбва да бъде по-голÑма от {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + СтойноÑтта трÑбва да бъде по-голÑма или равна на {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + СтойноÑтта трÑбва да бъде идентична Ñ {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + СтойноÑтта трÑбва да бъде по-малка {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + СтойноÑтта трÑбва да бъде по-малка или равна на {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + СтойноÑтта не трÑбва да бъде равна на {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + СтойноÑтта не трÑбва да бъде идентична Ñ {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Изображението е Ñ Ñ‚Ð²ÑŠÑ€Ð´Ðµ голÑма Ð¿Ñ€Ð¾Ð¿Ð¾Ñ€Ñ†Ð¸Ñ ({{ ratio }}). МакÑималната Ð¿Ñ€Ð¾Ð¿Ð¾Ñ€Ñ†Ð¸Ñ Ñ‚Ñ€Ñбва да е {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Изображението е Ñ Ñ‚Ð²ÑŠÑ€Ð´Ðµ малка Ð¿Ñ€Ð¾Ð¿Ð¾Ñ€Ñ†Ð¸Ñ ({{ ratio }}). Минималната Ð¿Ñ€Ð¾Ð¿Ð¾Ñ€Ñ†Ð¸Ñ Ñ‚Ñ€Ñбва да е {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Изображението е квадрат ({{ width }}x{{ height }}px). Такива Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð½Ðµ Ñа разрешени. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Изображението е Ñ Ð¿ÐµÐ¹Ð·Ð°Ð¶Ð½Ð° Ð¾Ñ€Ð¸ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ ({{ width }}x{{ height }}px). Ð˜Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ Ñ‚Ð°ÐºÐ°Ð²Ð° Ð¾Ñ€Ð¸ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ Ð½Ðµ Ñа разрешени. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Изображението е Ñ Ð¿Ð¾Ñ€Ñ‚Ñ€ÐµÑ‚Ð½Ð° Ð¾Ñ€Ð¸ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ ({{ width }}x{{ height }}px). Ð˜Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ Ñ‚Ð°ÐºÐ°Ð²Ð° Ð¾Ñ€Ð¸ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ Ð½Ðµ Ñа разрешени. + + + An empty file is not allowed. + Празни файлове не Ñа разрешени. + + + The host could not be resolved. + ХоÑтът е недоÑтъпен. + + + This value does not match the expected {{ charset }} charset. + СтойноÑтта не Ñъвпада Ñ {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Ðевалиден Ð±Ð¸Ð·Ð½ÐµÑ Ð¸Ð´ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ð¾Ð½ÐµÐ½ код (BIC). + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf new file mode 100644 index 0000000000000000000000000000000000000000..85b6970fc31cf14b47c4a544d85521ad1d5275fb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf @@ -0,0 +1,307 @@ + + + + + + This value should be false. + Aquest valor hauria de ser fals. + + + This value should be true. + Aquest valor hauria de ser cert. + + + This value should be of type {{ type }}. + Aquest valor hauria de ser del tipus {{ type }}. + + + This value should be blank. + Aquest valor hauria d'estar buit. + + + The value you selected is not a valid choice. + El valor seleccionat no és una opció vàlida. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Ha de seleccionar almenys {{ limit }} opció.|Ha de seleccionar almenys {{ limit }} opcions. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Ha de seleccionar com a màxim {{ limit }} opció.|Ha de seleccionar com a màxim {{ limit }} opcions. + + + One or more of the given values is invalid. + Un o més dels valors facilitats són incorrectes. + + + This field was not expected. + Aquest camp no s'esperava. + + + This field is missing. + Aquest camp està desaparegut. + + + This value is not a valid date. + Aquest valor no és una data vàlida. + + + This value is not a valid datetime. + Aquest valor no és una data i hora vàlida. + + + This value is not a valid email address. + Aquest valor no és una adreça d'email vàlida. + + + The file could not be found. + No s'ha pogut trobar l'arxiu. + + + The file is not readable. + No es pot llegir l'arxiu. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + L'arxiu és massa gran ({{ size }} {{ suffix }}). La grandària màxima permesa és {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + El tipus mime de l'arxiu no és vàlid ({{ type }}). Els tipus mime vàlids són {{ types }}. + + + This value should be {{ limit }} or less. + Aquest valor hauria de ser {{ limit }} o menys. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Aquest valor és massa llarg. Hauria de tenir {{ limit }} caràcter o menys.|Aquest valor és massa llarg. Hauria de tenir {{ limit }} caràcters o menys. + + + This value should be {{ limit }} or more. + Aquest valor hauria de ser {{ limit }} o més. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Aquest valor és massa curt. Hauria de tenir {{ limit }} caràcters o més. + + + This value should not be blank. + Aquest valor no hauria d'estar buit. + + + This value should not be null. + Aquest valor no hauria de ser null. + + + This value should be null. + Aquest valor hauria de ser null. + + + This value is not valid. + Aquest valor no és vàlid. + + + This value is not a valid time. + Aquest valor no és una hora vàlida. + + + This value is not a valid URL. + Aquest valor no és una URL vàlida. + + + The two values should be equal. + Els dos valors haurien de ser iguals. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + L'arxiu és massa gran. El tamany màxim permés és {{ limit }} {{ suffix }}. + + + The file is too large. + L'arxiu és massa gran. + + + The file could not be uploaded. + No es pot pujar l'arxiu. + + + This value should be a valid number. + Aquest valor hauria de ser un nombre vàlid. + + + This file is not a valid image. + L'arxiu no és una imatge vàlida. + + + This is not a valid IP address. + Això no és una adreça IP vàlida. + + + This value is not a valid language. + Aquest valor no és un idioma vàlid. + + + This value is not a valid locale. + Aquest valor no és una localització vàlida. + + + This value is not a valid country. + Aquest valor no és un país vàlid. + + + This value is already used. + Aquest valor ja s'ha utilitzat. + + + The size of the image could not be detected. + No s'ha pogut determinar la grandària de la imatge. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + L'amplària de la imatge és massa gran ({{ width }}px). L'amplària màxima permesa són {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + L'amplària de la imatge és massa petita ({{ width }}px). L'amplària mínima requerida són {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + L'altura de la imatge és massa gran ({{ height }}px). L'altura màxima permesa són {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + L'altura de la imatge és massa petita ({{ height }}px). L'altura mínima requerida són {{ min_height }}px. + + + This value should be the user's current password. + Aquest valor hauria de ser la contrasenya actual de l'usuari. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Aquest valor hauria de tenir exactament {{ limit }} caràcter.|Aquest valor hauria de tenir exactament {{ limit }} caràcters. + + + The file was only partially uploaded. + L'arxiu va ser només pujat parcialment. + + + No file was uploaded. + Cap arxiu va ser pujat. + + + No temporary folder was configured in php.ini. + Cap carpeta temporal va ser configurada en php.ini. + + + Cannot write temporary file to disk. + No es va poder escriure l'arxiu temporal en el disc. + + + A PHP extension caused the upload to fail. + Una extensió de PHP va fer que la pujada fallara. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Aquesta col·lecció ha de contenir {{ limit }} element o més.|Aquesta col·lecció ha de contenir {{ limit }} elements o més. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Aquesta col·lecció ha de contenir {{ limit }} element o menys.|Aquesta col·lecció ha de contenir {{ limit }} elements o menys. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Aquesta col·lecció ha de contenir exactament {{ limit }} element.|Aquesta col·lecció ha de contenir exactament {{ limit }} elements. + + + Invalid card number. + Número de targeta invàlid. + + + Unsupported card type or invalid card number. + Tipus de targeta no suportada o número de targeta invàlid. + + + This is not a valid International Bank Account Number (IBAN). + Això no és un nombre de compte bancari internacional (IBAN) vàlid. + + + This value is not a valid ISBN-10. + Aquest valor no és un ISBN-10 vàlid. + + + This value is not a valid ISBN-13. + Aquest valor no és un ISBN-13 vàlid. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Aquest valor no és ni un ISBN-10 vàlid ni un ISBN-13 vàlid. + + + This value is not a valid ISSN. + Aquest valor no és un ISSN vàlid. + + + This value is not a valid currency. + Aquest valor no és una divisa vàlida. + + + This value should be equal to {{ compared_value }}. + Aquest valor hauria de ser igual a {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Aquest valor hauria de ser més gran a {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Aquest valor hauria de ser major o igual a {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Aquest valor hauria de ser idèntic a {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Aquest valor hauria de ser menor a {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Aquest valor hauria de ser menor o igual a {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Aquest valor no hauria de ser igual a {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Aquest valor no hauria de idèntic a {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + La proporció de l'imatge és massa gran ({{ ratio }}). La màxima proporció permesa és {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + La proporció de l'imatge és massa petita ({{ ratio }}). La mínima proporció permesa és {{ max_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + L'imatge és quadrada({{ width }}x{{ height }}px). Les imatges quadrades no estan permeses. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + L'imatge està orientada horitzontalment ({{ width }}x{{ height }}px). Les imatges orientades horitzontalment no estan permeses. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + L'imatge està orientada verticalment ({{ width }}x{{ height }}px). Les imatges orientades verticalment no estan permeses. + + + An empty file is not allowed. + No està permès un fixter buit. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf new file mode 100644 index 0000000000000000000000000000000000000000..62779e19df9785fedfabce5bac09f8e57e6b701f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Tato hodnota musí být nepravdivá (false). + + + This value should be true. + Tato hodnota musí být pravdivá (true). + + + This value should be of type {{ type }}. + Tato hodnota musí být typu {{ type }}. + + + This value should be blank. + Tato hodnota musí být prázdná. + + + The value you selected is not a valid choice. + Vybraná hodnota není platnou možností. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Musí být vybrána nejménÄ› {{ limit }} možnost.|Musí být vybrány nejménÄ› {{ limit }} možnosti.|Musí být vybráno nejménÄ› {{ limit }} možností. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Musí být vybrána maximálnÄ› {{ limit }} možnost.|Musí být vybrány maximálnÄ› {{ limit }} možnosti.|Musí být vybráno maximálnÄ› {{ limit }} možností. + + + One or more of the given values is invalid. + NÄ›které z uvedených hodnot jsou neplatné. + + + This field was not expected. + Toto pole nebyla oÄekávána. + + + This field is missing. + Toto pole chybí. + + + This value is not a valid date. + Tato hodnota není platné datum. + + + This value is not a valid datetime. + Tato hodnota není platné datum s Äasovým údajem. + + + This value is not a valid email address. + Tato hodnota není platná e-mailová adresa. + + + The file could not be found. + Soubor nebyl nalezen. + + + The file is not readable. + Soubor je neÄitelný. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Soubor je příliÅ¡ velký ({{ size }} {{ suffix }}). Maximální povolená velikost souboru je {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Neplatný mime typ souboru ({{ type }}). Povolené mime typy souborů jsou {{ types }}. + + + This value should be {{ limit }} or less. + Tato hodnota musí být {{ limit }} nebo ménÄ›. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Tato hodnota je příliÅ¡ dlouhá. Musí obsahovat maximálnÄ› {{ limit }} znak.|Tato hodnota je příliÅ¡ dlouhá. Musí obsahovat maximálnÄ› {{ limit }} znaky.|Tato hodnota je příliÅ¡ dlouhá. Musí obsahovat maximálnÄ› {{ limit }} znaků. + + + This value should be {{ limit }} or more. + Tato hodnota musí být {{ limit }} nebo více. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Tato hodnota je příliÅ¡ krátká. Musí obsahovat minimálnÄ› {{ limit }} znak.|Tato hodnota je příliÅ¡ krátká. Musí obsahovat minimálnÄ› {{ limit }} znaky.|Tato hodnota je příliÅ¡ krátká. Musí obsahovat minimálnÄ› {{ limit }} znaků. + + + This value should not be blank. + Tato hodnota nesmí být prázdná. + + + This value should not be null. + Tato hodnota nesmí být null. + + + This value should be null. + Tato hodnota musí být null. + + + This value is not valid. + Tato hodnota není platná. + + + This value is not a valid time. + Tato hodnota není platný Äasový údaj. + + + This value is not a valid URL. + Tato hodnota není platná URL adresa. + + + The two values should be equal. + Tyto dvÄ› hodnoty musí být stejné. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Soubor je příliÅ¡ velký. Maximální povolená velikost souboru je {{ limit }} {{ suffix }}. + + + The file is too large. + Soubor je příliÅ¡ velký. + + + The file could not be uploaded. + Soubor se nepodaÅ™ilo nahrát. + + + This value should be a valid number. + Tato hodnota musí být Äíslo. + + + This file is not a valid image. + Tento soubor není obrázek. + + + This is not a valid IP address. + Toto není platná IP adresa. + + + This value is not a valid language. + Tento jazyk neexistuje. + + + This value is not a valid locale. + Tato lokalizace neexistuje. + + + This value is not a valid country. + Tato zemÄ› neexistuje. + + + This value is already used. + Tato hodnota je již používána. + + + The size of the image could not be detected. + NepodaÅ™ily se zjistit rozmÄ›ry obrázku. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Obrázek je příliÅ¡ Å¡iroký ({{ width }}px). Maximální povolená šířka obrázku je {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Obrázek je příliÅ¡ úzký ({{ width }}px). Minimální šířka musí být {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Obrázek je příliÅ¡ vysoký ({{ height }}px). Maximální povolená výška obrázku je {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Obrázek je příliÅ¡ nízký ({{ height }}px). Minimální výška obrázku musí být {{ min_height }}px. + + + This value should be the user's current password. + Tato hodnota musí být aktuální heslo uživatele. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Tato hodnota musí mít pÅ™esnÄ› {{ limit }} znak.|Tato hodnota musí mít pÅ™esnÄ› {{ limit }} znaky.|Tato hodnota musí mít pÅ™esnÄ› {{ limit }} znaků. + + + The file was only partially uploaded. + Byla nahrána jen Äást souboru. + + + No file was uploaded. + Žádný soubor nebyl nahrán. + + + No temporary folder was configured in php.ini. + V php.ini není nastavena cesta k adresáři pro doÄasné soubory. + + + Cannot write temporary file to disk. + DoÄasný soubor se nepodaÅ™ilo zapsat na disk. + + + A PHP extension caused the upload to fail. + Rozšíření PHP zabránilo nahrání souboru. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Tato kolekce musí obsahovat minimálnÄ› {{ limit }} prvek.|Tato kolekce musí obsahovat minimálnÄ› {{ limit }} prvky.|Tato kolekce musí obsahovat minimálnÄ› {{ limit }} prvků. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Tato kolekce musí obsahovat maximálnÄ› {{ limit }} prvek.|Tato kolekce musí obsahovat maximálnÄ› {{ limit }} prvky.|Tato kolekce musí obsahovat maximálnÄ› {{ limit }} prvků. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Tato kolekce musí obsahovat pÅ™esnÄ› {{ limit }} prvek.|Tato kolekce musí obsahovat pÅ™esnÄ› {{ limit }} prvky.|Tato kolekce musí obsahovat pÅ™esnÄ› {{ limit }} prvků. + + + Invalid card number. + Neplatné Äíslo karty. + + + Unsupported card type or invalid card number. + Nepodporovaný typ karty nebo neplatné Äíslo karty. + + + This is not a valid International Bank Account Number (IBAN). + Toto je neplatný IBAN. + + + This value is not a valid ISBN-10. + Tato hodnota není platné ISBN-10. + + + This value is not a valid ISBN-13. + Tato hodnota není platné ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Tato hodnota není platné ISBN-10 ani ISBN-13. + + + This value is not a valid ISSN. + Tato hodnota není platné ISSN. + + + This value is not a valid currency. + Tato mÄ›na neexistuje. + + + This value should be equal to {{ compared_value }}. + Tato hodnota musí být rovna {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Tato hodnota musí být vÄ›tší než {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Tato hodnota musí být vÄ›tší nebo rovna {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Tato hodnota musí být typu {{ compared_value_type }} a zároveň musí být rovna {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Tato hodnota musí být menší než {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Tato hodnota musí být menší nebo rovna {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Tato hodnota nesmí být rovna {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Tato hodnota nesmí být typu {{ compared_value_type }} a zároveň nesmí být rovna {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + PomÄ›r stran obrázku je příliÅ¡ velký ({{ ratio }}). Maximální povolený pomÄ›r stran obrázku je {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + PomÄ›r stran obrázku je příliÅ¡ malý ({{ ratio }}). Minimální povolený pomÄ›r stran obrázku je {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Strany obrázku jsou Ätvercové ({{ width }}x{{ height }}px). ÄŒtvercové obrázky nejsou povolené. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Obrázek je orientovaný na šířku ({{ width }}x{{ height }}px). Obrázky orientované na šířku nejsou povolené. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Obrázek je orientovaný na výšku ({{ width }}x{{ height }}px). Obrázky orientované na výšku nejsou povolené. + + + An empty file is not allowed. + Soubor nesmí být prázdný. + + + The host could not be resolved. + Hostitele nebylo možné rozpoznat. + + + This value does not match the expected {{ charset }} charset. + Tato hodnota neodpovídá oÄekávané znakové sadÄ› {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Tato hodnota není platný identifikaÄní kód podniku (BIC). + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf new file mode 100644 index 0000000000000000000000000000000000000000..da7cb9aab2986d8133ef0a76cf47095ddb8c1563 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf @@ -0,0 +1,227 @@ + + + + + + This value should be false. + Dylid bod y gwerth hwn yn ffug. + + + This value should be true. + Dylid bod y gwerth hwn yn wir. + + + This value should be of type {{ type }}. + Dylid bod y gwerth hwn bod o fath {{ type }}. + + + This value should be blank. + Dylid bod y gwerth hwn yn wag. + + + The value you selected is not a valid choice. + Nid yw'r gwerth â ddewiswyd yn ddilys. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Rhaid dewis o leiaf {{ limit }} opsiwn. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Rhaid dewis dim mwy na {{ limit }} opsiwn. + + + One or more of the given values is invalid. + Mae un neu fwy o'r gwerthoedd a roddwyd yn annilys. + + + This field was not expected. + Nid oedd disgwyl y maes hwn. + + + This field is missing. + Mae'r maes hwn ar goll. + + + This value is not a valid date. + Nid yw'r gwerth yn ddyddiad dilys. + + + This value is not a valid datetime. + Nid yw'r gwerth yn datetime dilys. + + + This value is not a valid email address. + Nid yw'r gwerth yn gyfeiriad ebost dilys. + + + The file could not be found. + Ni ddarganfyddwyd y ffeil. + + + The file is not readable. + Ni ellir darllen y ffeil. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Mae'r ffeil yn rhy fawr ({{ size }} {{ suffix }}). Yr uchafswm â ganiateir yw {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Nid yw math mime y ffeil yn ddilys ({{ type }}). Dyma'r mathau â ganiateir {{ types }}. + + + This value should be {{ limit }} or less. + Dylai'r gwerth hwn fod yn {{ limit }} neu lai. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Mae'r gwerth hwn rhy hir. Dylai gynnwys {{ limit }} nodyn cyfrifiadurol neu lai. + + + This value should be {{ limit }} or more. + Dylai'r gwerth hwn fod yn {{ limit }} neu fwy. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Mae'r gwerth hwn yn rhy fyr. Dylai gynnwys {{ limit }} nodyn cyfrifiadurol neu fwy. + + + This value should not be blank. + Ni ddylai'r gwerth hwn fod yn wag. + + + This value should not be null. + Ni ddylai'r gwerth hwn fod yn null. + + + This value should be null. + Dylai'r gwerth fod yn null. + + + This value is not valid. + Nid yw'r gwerth hwn yn ddilys. + + + This value is not a valid time. + Nid yw'r gwerth hwn yn amser dilys. + + + This value is not a valid URL. + Nid yw'r gwerth hwn yn URL dilys. + + + The two values should be equal. + Rhaid i'r ddau werth fod yn gyfystyr a'u gilydd. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Mae'r ffeil yn rhy fawr. Yr uchafswm â ganiateir yw {{ limit }} {{ suffix }}. + + + The file is too large. + Mae'r ffeil yn rhy fawr. + + + The file could not be uploaded. + Methwyd ag uwchlwytho'r ffeil. + + + This value should be a valid number. + Dylai'r gwerth hwn fod yn rif dilys. + + + This file is not a valid image. + Nid yw'r ffeil hon yn ddelwedd dilys. + + + This is not a valid IP address. + Nid yw hwn yn gyfeiriad IP dilys. + + + This value is not a valid language. + Nid yw'r gwerth hwn yn iaith ddilys. + + + This value is not a valid locale. + Nid yw'r gwerth hwn yn locale dilys. + + + This value is not a valid country. + Nid yw'r gwerth hwn yn wlad dilys. + + + This value is already used. + Mae'r gwerth hwn eisoes yn cael ei ddefnyddio. + + + The size of the image could not be detected. + Methwyd â darganfod maint y ddelwedd. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Mae lled y ddelwedd yn rhy fawr ({{ width }}px). Y lled mwyaf â ganiateir yw {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Mae lled y ddelwedd yn rhy fach ({{ width }}px). Y lled lleiaf â ganiateir yw {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Mae uchder y ddelwedd yn rhy fawr ({{ width }}px). Yr uchder mwyaf â ganiateir yw {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Mae uchder y ddelwedd yn rhy fach ({{ width }}px). Yr uchder lleiaf â ganiateir yw {{ min_height }}px. + + + This value should be the user's current password. + Dylaid bod y gwerth hwn yn gyfrinair presenol y defnyddiwr. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Dylai'r gwerth hwn fod yn union {{ limit }} nodyn cyfrifiadurol o hyd. + + + The file was only partially uploaded. + Dim ond rhan o'r ffeil ag uwchlwythwyd. + + + No file was uploaded. + Ni uwchlwythwyd unrhyw ffeil. + + + No temporary folder was configured in php.ini. + Nid oes ffolder dros-dro wedi'i gosod yn php.ini. + + + Cannot write temporary file to disk. + Methwyd ag ysgrifennu'r ffeil dros-dro ar ddisg. + + + A PHP extension caused the upload to fail. + Methwyd ag uwchlwytho oherwydd ategyn PHP. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Dylai'r casgliad hwn gynnwys {{ limit }} elfen neu fwy. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Dylai'r casgliad hwn gynnwys {{ limit }} elfen neu lai. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Dylai'r casgliad hwn gynnwys union {{ limit }} elfen. + + + Invalid card number. + Nid oedd rhif y cerdyn yn ddilys. + + + Unsupported card type or invalid card number. + Unai ni dderbynir y math yna o gerdyn, neu nid yw rhif y cerdyn yn ddilys. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf new file mode 100644 index 0000000000000000000000000000000000000000..14e479a59ad0773329f62149b1722324a90a8047 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf @@ -0,0 +1,247 @@ + + + + + + This value should be false. + Værdien skal være falsk. + + + This value should be true. + Værdien skal være sand. + + + This value should be of type {{ type }}. + Værdien skal være af typen {{ type }}. + + + This value should be blank. + Værdien skal være blank. + + + The value you selected is not a valid choice. + Værdien skal være en af de givne muligheder. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Du skal vælge mindst {{ limit }} muligheder. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Du kan højest vælge {{ limit }} muligheder. + + + One or more of the given values is invalid. + En eller flere af de oplyste værdier er ugyldige. + + + This field was not expected. + Feltet blev ikke forventet. + + + This field is missing. + Dette felt er mangler. + + + This value is not a valid date. + Værdien er ikke en gyldig dato. + + + This value is not a valid datetime. + Værdien er ikke en gyldig dato og tid. + + + This value is not a valid email address. + Værdien er ikke en gyldig e-mail adresse. + + + The file could not be found. + Filen kunne ikke findes. + + + The file is not readable. + Filen kan ikke læses. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Filen er for stor ({{ size }} {{ suffix }}). Tilladte maksimale størrelse {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mimetypen af filen er ugyldig ({{ type }}). Tilladte mimetyper er {{ types }}. + + + This value should be {{ limit }} or less. + Værdien skal være {{ limit }} eller mindre. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Værdien er for lang. Den skal have {{ limit }} bogstaver eller mindre. + + + This value should be {{ limit }} or more. + Værdien skal være {{ limit }} eller mere. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Værdien er for kort. Den skal have {{ limit }} tegn eller flere. + + + This value should not be blank. + Værdien mÃ¥ ikke være blank. + + + This value should not be null. + Værdien mÃ¥ ikke være tom (null). + + + This value should be null. + Værdien skal være tom (null). + + + This value is not valid. + Værdien er ikke gyldig. + + + This value is not a valid time. + Værdien er ikke en gyldig tid. + + + This value is not a valid URL. + Værdien er ikke en gyldig URL. + + + The two values should be equal. + De to værdier skal være ens. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Filen er for stor. Den maksimale størrelse er {{ limit }} {{ suffix }}. + + + The file is too large. + Filen er for stor. + + + The file could not be uploaded. + Filen kunne ikke blive uploadet. + + + This value should be a valid number. + Værdien skal være et gyldigt tal. + + + This file is not a valid image. + Filen er ikke gyldigt billede. + + + This is not a valid IP address. + Dette er ikke en gyldig IP adresse. + + + This value is not a valid language. + Værdien er ikke et gyldigt sprog. + + + This value is not a valid locale. + Værdien er ikke en gyldig lokalitet. + + + This value is not a valid country. + Værdien er ikke et gyldigt land. + + + This value is already used. + Værdien er allerede i brug. + + + The size of the image could not be detected. + Størrelsen pÃ¥ billedet kunne ikke detekteres. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Billedbredden er for stor ({{ width }}px). Tilladt maksimumsbredde er {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Billedebredden er for lille ({{ width }}px). Forventet minimumshøjde er {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Billedhøjden er for stor ({{ height }}px). Tilladt maksimumshøjde er {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Billedhøjden er for lille ({{ height }}px). Forventet minimumshøjde er {{ min_height }}px. + + + This value should be the user's current password. + Værdien skal være brugerens nuværende password. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Værdien skal have præcis {{ limit }} tegn. + + + The file was only partially uploaded. + Filen var kun delvis uploadet. + + + No file was uploaded. + Ingen fil blev uploadet. + + + No temporary folder was configured in php.ini. + Ingen midlertidig mappe er konfigureret i php.ini. + + + Cannot write temporary file to disk. + Kan ikke skrive midlertidig fil til disk. + + + A PHP extension caused the upload to fail. + En PHP udvidelse forÃ¥rsagede fejl i upload. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Denne samling skal indeholde {{ limit }} element eller flere.|Denne samling skal indeholde {{ limit }} elementer eller flere. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Denne samling skal indeholde {{ limit }} element eller mindre.|Denne samling skal indeholde {{ limit }} elementer eller mindre. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Denne samling skal indeholde præcis {{ limit }} element.|Denne samling skal indeholde præcis {{ limit }} elementer. + + + Invalid card number. + Ugyldigt kortnummer. + + + Unsupported card type or invalid card number. + Ikke-understøttet korttype eller ugyldigt kortnummer. + + + This is not a valid International Bank Account Number (IBAN). + Det er ikke en gyldig International Bank Account Number (IBAN). + + + This value is not a valid ISBN-10. + Værdien er ikke en gyldig ISBN-10. + + + This value is not a valid ISBN-13. + Værdien er ikke en gyldig ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Værdien er hverken en gyldig ISBN-10 eller en gyldig ISBN-13. + + + This value is not a valid ISSN. + Værdien er ikke en gyldig ISSN. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf new file mode 100644 index 0000000000000000000000000000000000000000..192b992f8f3ba47e1fcaece0e7e5e500105505e2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Dieser Wert sollte false sein. + + + This value should be true. + Dieser Wert sollte true sein. + + + This value should be of type {{ type }}. + Dieser Wert sollte vom Typ {{ type }} sein. + + + This value should be blank. + Dieser Wert sollte leer sein. + + + The value you selected is not a valid choice. + Sie haben einen ungültigen Wert ausgewählt. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Sie müssen mindestens {{ limit }} Möglichkeit wählen.|Sie müssen mindestens {{ limit }} Möglichkeiten wählen. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Sie dürfen höchstens {{ limit }} Möglichkeit wählen.|Sie dürfen höchstens {{ limit }} Möglichkeiten wählen. + + + One or more of the given values is invalid. + Einer oder mehrere der angegebenen Werte sind ungültig. + + + This field was not expected. + Dieses Feld wurde nicht erwartet. + + + This field is missing. + Dieses Feld fehlt. + + + This value is not a valid date. + Dieser Wert entspricht keiner gültigen Datumsangabe. + + + This value is not a valid datetime. + Dieser Wert entspricht keiner gültigen Datums- und Zeitangabe. + + + This value is not a valid email address. + Dieser Wert ist keine gültige E-Mail-Adresse. + + + The file could not be found. + Die Datei wurde nicht gefunden. + + + The file is not readable. + Die Datei ist nicht lesbar. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Die Datei ist zu groß ({{ size }} {{ suffix }}). Die maximal zulässige Größe beträgt {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Der Dateityp ist ungültig ({{ type }}). Erlaubte Dateitypen sind {{ types }}. + + + This value should be {{ limit }} or less. + Dieser Wert sollte kleiner oder gleich {{ limit }} sein. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Diese Zeichenkette ist zu lang. Sie sollte höchstens {{ limit }} Zeichen haben.|Diese Zeichenkette ist zu lang. Sie sollte höchstens {{ limit }} Zeichen haben. + + + This value should be {{ limit }} or more. + Dieser Wert sollte größer oder gleich {{ limit }} sein. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Diese Zeichenkette ist zu kurz. Sie sollte mindestens {{ limit }} Zeichen haben.|Diese Zeichenkette ist zu kurz. Sie sollte mindestens {{ limit }} Zeichen haben. + + + This value should not be blank. + Dieser Wert sollte nicht leer sein. + + + This value should not be null. + Dieser Wert sollte nicht null sein. + + + This value should be null. + Dieser Wert sollte null sein. + + + This value is not valid. + Dieser Wert ist nicht gültig. + + + This value is not a valid time. + Dieser Wert entspricht keiner gültigen Zeitangabe. + + + This value is not a valid URL. + Dieser Wert ist keine gültige URL. + + + The two values should be equal. + Die beiden Werte sollten identisch sein. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Die Datei ist zu groß. Die maximal zulässige Größe beträgt {{ limit }} {{ suffix }}. + + + The file is too large. + Die Datei ist zu groß. + + + The file could not be uploaded. + Die Datei konnte nicht hochgeladen werden. + + + This value should be a valid number. + Dieser Wert sollte eine gültige Zahl sein. + + + This file is not a valid image. + Diese Datei ist kein gültiges Bild. + + + This is not a valid IP address. + Dies ist keine gültige IP-Adresse. + + + This value is not a valid language. + Dieser Wert entspricht keiner gültigen Sprache. + + + This value is not a valid locale. + Dieser Wert entspricht keinem gültigen Gebietsschema. + + + This value is not a valid country. + Dieser Wert entspricht keinem gültigen Land. + + + This value is already used. + Dieser Wert wird bereits verwendet. + + + The size of the image could not be detected. + Die Größe des Bildes konnte nicht ermittelt werden. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Die Bildbreite ist zu groß ({{ width }}px). Die maximal zulässige Breite beträgt {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Die Bildbreite ist zu gering ({{ width }}px). Die erwartete Mindestbreite beträgt {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Die Bildhöhe ist zu groß ({{ height }}px). Die maximal zulässige Höhe beträgt {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Die Bildhöhe ist zu gering ({{ height }}px). Die erwartete Mindesthöhe beträgt {{ min_height }}px. + + + This value should be the user's current password. + Dieser Wert sollte dem aktuellen Benutzerpasswort entsprechen. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Dieser Wert sollte genau {{ limit }} Zeichen lang sein.|Dieser Wert sollte genau {{ limit }} Zeichen lang sein. + + + The file was only partially uploaded. + Die Datei wurde nur teilweise hochgeladen. + + + No file was uploaded. + Es wurde keine Datei hochgeladen. + + + No temporary folder was configured in php.ini. + Es wurde kein temporärer Ordner in der php.ini konfiguriert oder der temporäre Ordner existiert nicht. + + + Cannot write temporary file to disk. + Kann die temporäre Datei nicht speichern. + + + A PHP extension caused the upload to fail. + Eine PHP-Erweiterung verhinderte den Upload. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Diese Sammlung sollte {{ limit }} oder mehr Elemente beinhalten.|Diese Sammlung sollte {{ limit }} oder mehr Elemente beinhalten. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Diese Sammlung sollte {{ limit }} oder weniger Elemente beinhalten.|Diese Sammlung sollte {{ limit }} oder weniger Elemente beinhalten. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Diese Sammlung sollte genau {{ limit }} Element beinhalten.|Diese Sammlung sollte genau {{ limit }} Elemente beinhalten. + + + Invalid card number. + Ungültige Kartennummer. + + + Unsupported card type or invalid card number. + Nicht unterstützer Kartentyp oder ungültige Kartennummer. + + + This is not a valid International Bank Account Number (IBAN). + Dieser Wert ist keine gültige internationale Bankkontonummer (IBAN). + + + This value is not a valid ISBN-10. + Dieser Wert entspricht keiner gültigen ISBN-10. + + + This value is not a valid ISBN-13. + Dieser Wert entspricht keiner gültigen ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Dieser Wert ist weder eine gültige ISBN-10 noch eine gültige ISBN-13. + + + This value is not a valid ISSN. + Dieser Wert ist keine gültige ISSN. + + + This value is not a valid currency. + Dieser Wert ist keine gültige Währung. + + + This value should be equal to {{ compared_value }}. + Dieser Wert sollte gleich {{ compared_value }} sein. + + + This value should be greater than {{ compared_value }}. + Dieser Wert sollte größer als {{ compared_value }} sein. + + + This value should be greater than or equal to {{ compared_value }}. + Dieser Wert sollte größer oder gleich {{ compared_value }} sein. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Dieser Wert sollte identisch sein mit {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Dieser Wert sollte kleiner als {{ compared_value }} sein. + + + This value should be less than or equal to {{ compared_value }}. + Dieser Wert sollte kleiner oder gleich {{ compared_value }} sein. + + + This value should not be equal to {{ compared_value }}. + Dieser Wert sollte nicht {{ compared_value }} sein. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Dieser Wert sollte nicht identisch sein mit {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Das Seitenverhältnis des Bildes ist zu groß ({{ ratio }}). Der erlaubte Maximalwert ist {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Das Seitenverhältnis des Bildes ist zu klein ({{ ratio }}). Der erwartete Minimalwert ist {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Das Bild ist quadratisch ({{ width }}x{{ height }}px). Quadratische Bilder sind nicht erlaubt. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Das Bild ist im Querformat ({{ width }}x{{ height }}px). Bilder im Querformat sind nicht erlaubt. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Das Bild ist im Hochformat ({{ width }}x{{ height }}px). Bilder im Hochformat sind nicht erlaubt. + + + An empty file is not allowed. + Eine leere Datei ist nicht erlaubt. + + + The host could not be resolved. + Der Hostname konnte nicht aufgelöst werden. + + + This value does not match the expected {{ charset }} charset. + Dieser Wert entspricht nicht dem erwarteten Zeichensatz {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Dieser Wert ist kein gültiger BIC. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf new file mode 100644 index 0000000000000000000000000000000000000000..4fa0d422205007b99b5c2c1bd993ffad00647b50 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + Αυτή η τιμή Ï€Ïέπει να είναι ψευδής. + + + This value should be true. + Αυτή η τιμή Ï€Ïέπει να είναι αληθής. + + + This value should be of type {{ type }}. + Αυτή η τιμή Ï€Ïέπει να είναι Ï„Ïπου {{ type }}. + + + This value should be blank. + Αυτή η τιμή Ï€Ïέπει να είναι κενή. + + + The value you selected is not a valid choice. + Η τιμή που επιλέχθηκε δεν αντιστοιχεί σε έγκυÏη επιλογή. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + ΠÏέπει να επιλέξετε τουλάχιστον {{ limit }} επιλογή.|ΠÏέπει να επιλέξετε τουλάχιστον {{ limit }} επιλογές. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + ΠÏέπει να επιλέξετε το Ï€Î¿Î»Ï {{ limit }} επιλογή.|ΠÏέπει να επιλέξετε το Ï€Î¿Î»Ï {{ limit }} επιλογές. + + + One or more of the given values is invalid. + Μια ή πεÏισσότεÏες τιμές δεν είναι έγκυÏες. + + + This field was not expected. + Αυτό το πεδίο δεν ήταν αναμενόμενο. + + + This field is missing. + Λείπει αυτό το πεδίο. + + + This value is not a valid date. + Η τιμή δεν αντιστοιχεί σε έγκυÏη ημεÏομηνία. + + + This value is not a valid datetime. + Η τιμή δεν αντιστοιχεί σε έγκυÏη ημεÏομηνία και ÏŽÏα. + + + This value is not a valid email address. + Η τιμή δεν αντιστοιχεί σε έγκυÏο email. + + + The file could not be found. + Το αÏχείο δε μποÏεί να βÏεθεί. + + + The file is not readable. + Το αÏχείο δεν είναι αναγνώσιμο. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Το αÏχείο είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿ ({{ size }} {{ suffix }}). Το μέγιστο επιτÏεπτό μέγεθος είναι {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Ο Ï„Ïπος mime του αÏχείου δεν είναι έγκυÏος ({{ type }}). Οι έγκÏυοι Ï„Ïποι mime είναι {{ types }}. + + + This value should be {{ limit }} or less. + Αυτή η τιμή θα έπÏεπε να είναι {{ limit }} ή λιγότεÏο. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Αυτή η τιμή είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î·. Θα έπÏεπε να έχει {{ limit }} χαÏακτήÏα ή λιγότεÏο.|Αυτή η τιμή είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î·. Θα έπÏεπε να έχει {{ limit }} χαÏακτήÏες ή λιγότεÏο. + + + This value should be {{ limit }} or more. + Αυτή η τιμή θα έπÏεπε να είναι {{ limit }} ή πεÏισσότεÏο. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Αυτή η τιμή είναι Ï€Î¿Î»Ï Î¼Î¹ÎºÏή. Θα έπÏεπε να έχει {{ limit }} χαÏακτήÏα ή πεÏισσότεÏο.|Αυτή η τιμή είναι Ï€Î¿Î»Ï Î¼Î¹ÎºÏή. Θα έπÏεπε να έχει {{ limit }} χαÏακτήÏες ή πεÏισσότεÏο. + + + This value should not be blank. + Αυτή η τιμή δεν Ï€Ïέπει να είναι κενή. + + + This value should not be null. + Αυτή η τιμή δεν Ï€Ïέπει να είναι μηδενική. + + + This value should be null. + Αυτή η τιμή Ï€Ïέπει να είναι μηδενική. + + + This value is not valid. + Αυτή η τιμή δεν είναι έκγυÏη. + + + This value is not a valid time. + Αυτή η τιμή δεν αντιστοιχεί σε έγκυÏη ÏŽÏα. + + + This value is not a valid URL. + Αυτή η τιμή δεν αντιστοιχεί σε έγκυÏο URL. + + + The two values should be equal. + Οι δÏο τιμές θα Ï€Ïέπει να είναι ίδιες. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Το αÏχείο είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿. Το μέγιστο επιτÏεπτό μέγεθος είναι {{ limit }} {{ suffix }}. + + + The file is too large. + Το αÏχείο είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿. + + + The file could not be uploaded. + Το αÏχείο δε μποÏεί να ανέβει. + + + This value should be a valid number. + Αυτή η τιμή θα Ï€Ïέπει να είναι ένας έγκυÏος αÏιθμός. + + + This file is not a valid image. + Το αÏχείο δεν αποτελεί έγκυÏη εικόνα. + + + This is not a valid IP address. + Αυτό δεν είναι μια έκγυÏη διεÏθυνση IP. + + + This value is not a valid language. + Αυτή η τιμή δεν αντιστοιχεί σε μια έκγυÏη γλώσσα. + + + This value is not a valid locale. + Αυτή η τιμή δεν αντιστοιχεί σε έκγυÏο κωδικό τοποθεσίας. + + + This value is not a valid country. + Αυτή η τιμή δεν αντιστοιχεί σε μια έκγυÏη χώÏα. + + + This value is already used. + Αυτή η τιμή χÏησιμοποιείται ήδη. + + + The size of the image could not be detected. + Το μέγεθος της εικόνας δεν ήταν δυνατό να ανιχνευθεί. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Το πλάτος της εικόνας είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿ ({{ width }}px). Το μέγιστο επιτÏεπτό πλάτος είναι {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Το πλάτος της εικόνας είναι Ï€Î¿Î»Ï Î¼Î¹ÎºÏÏŒ ({{ width }}px). Το ελάχιστο επιτÏεπτό πλάτος είναι {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Το Ïψος της εικόνας είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿ ({{ height }}px). Το μέγιστο επιτÏεπτό Ïψος είναι {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Το Ïψος της εικόνας είναι Ï€Î¿Î»Ï Î¼Î¹ÎºÏÏŒ ({{ height }}px). Το ελάχιστο επιτÏεπτό Ïψος είναι {{ min_height }}px. + + + This value should be the user's current password. + Αυτή η τιμή θα έπÏεπε να είναι ο Ï„Ïέχων κωδικός. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Αυτή η τιμή θα έπÏεπε να έχει ακÏιβώς {{ limit }} χαÏακτήÏα.|Αυτή η τιμή θα έπÏεπε να έχει ακÏιβώς {{ limit }} χαÏακτήÏες. + + + The file was only partially uploaded. + Το αÏχείο δεν ανέβηκε ολόκληÏο. + + + No file was uploaded. + Δεν ανέβηκε κανένα αÏχείο. + + + No temporary folder was configured in php.ini. + Κανένας Ï€ÏοσωÏινός φάκελος δεν έχει Ïυθμιστεί στο php.ini. + + + Cannot write temporary file to disk. + Αδυναμία εγγÏαφής Ï€ÏοσωÏÎ¹Î½Î¿Ï Î±Ïχείου στο δίσκο. + + + A PHP extension caused the upload to fail. + Μια επέκταση PHP Ï€Ïοκάλεσε αδυναμία ανεβάσματος. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Αυτή η συλλογή θα Ï€Ïέπει να πεÏιέχει {{ limit }} στοιχείο ή πεÏισσότεÏα.|Αυτή η συλλογή θα Ï€Ïέπει να πεÏιέχει {{ limit }} στοιχεία ή πεÏισσότεÏα. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Αυτή η συλλογή θα Ï€Ïέπει να πεÏιέχει {{ limit }} στοιχείo ή λιγότεÏα.|Αυτή η συλλογή θα Ï€Ïέπει να πεÏιέχει {{ limit }} στοιχεία ή λιγότεÏα. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Αυτή η συλλογή θα Ï€Ïέπει να πεÏιέχει ακÏιβώς {{ limit }} στοιχείo.|Αυτή η συλλογή θα Ï€Ïέπει να πεÏιέχει ακÏιβώς {{ limit }} στοιχεία. + + + Invalid card number. + Μη έγκυÏος αÏιθμός κάÏτας. + + + Unsupported card type or invalid card number. + Μη υποστηÏιζόμενος Ï„Ïπος κάÏτας ή μη έγκυÏος αÏιθμός κάÏτας. + + + This is not a valid International Bank Account Number (IBAN). + Αυτό δεν αντιστοιχεί σε έκγυÏο διεθνή αÏιθμό Ï„ÏÎ±Ï€ÎµÎ¶Î¹ÎºÎ¿Ï Î»Î¿Î³Î±ÏÎ¹Î±ÏƒÎ¼Î¿Ï (IBAN). + + + This value is not a valid ISBN-10. + Αυτό δεν είναι έγκυÏος κωδικός ISBN-10. + + + This value is not a valid ISBN-13. + Αυτό δεν είναι έγκυÏος κωδικός ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Αυτό δεν είναι οÏτε έγκυÏος κωδικός ISBN-10 οÏτε έγκυÏος κωδικός ISBN-13. + + + This value is not a valid ISSN. + Αυτό δεν είναι έγκυÏος κωδικός ISSN. + + + This value is not a valid currency. + Αυτό δεν αντιστοιχεί σε έγκυÏο νόμισμα. + + + This value should be equal to {{ compared_value }}. + Αυτή η τιμή θα Ï€Ïέπει να είναι ίση με {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Αυτή η τιμή θα Ï€Ïέπει να είναι μεγαλÏτεÏη από {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Αυτή η τιμή θα Ï€Ïέπει να είναι μεγαλÏτεÏη ή ίση με {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Αυτή η τιμή θα Ï€Ïέπει να είναι πανομοιότυπη με {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Αυτή η τιμή θα Ï€Ïέπει να είναι μικÏότεÏη από {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Αυτή η τιμή θα Ï€Ïέπει να είναι μικÏότεÏη ή ίση με {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Αυτή η τιμή δεν θα Ï€Ïέπει να είναι ίση με {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Αυτή η τιμή δεν Ï€Ïέπει να είναι πανομοιότυπη με {{ compared_value_type }} {{ compared_value }}. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf new file mode 100644 index 0000000000000000000000000000000000000000..2a5c97d8cf2d00a8a2b8dd8d86845995adc1f88f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + This value should be false. + + + This value should be true. + This value should be true. + + + This value should be of type {{ type }}. + This value should be of type {{ type }}. + + + This value should be blank. + This value should be blank. + + + The value you selected is not a valid choice. + The value you selected is not a valid choice. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + + + One or more of the given values is invalid. + One or more of the given values is invalid. + + + This field was not expected. + This field was not expected. + + + This field is missing. + This field is missing. + + + This value is not a valid date. + This value is not a valid date. + + + This value is not a valid datetime. + This value is not a valid datetime. + + + This value is not a valid email address. + This value is not a valid email address. + + + The file could not be found. + The file could not be found. + + + The file is not readable. + The file is not readable. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + + + This value should be {{ limit }} or less. + This value should be {{ limit }} or less. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + + + This value should be {{ limit }} or more. + This value should be {{ limit }} or more. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + + + This value should not be blank. + This value should not be blank. + + + This value should not be null. + This value should not be null. + + + This value should be null. + This value should be null. + + + This value is not valid. + This value is not valid. + + + This value is not a valid time. + This value is not a valid time. + + + This value is not a valid URL. + This value is not a valid URL. + + + The two values should be equal. + The two values should be equal. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + + + The file is too large. + The file is too large. + + + The file could not be uploaded. + The file could not be uploaded. + + + This value should be a valid number. + This value should be a valid number. + + + This file is not a valid image. + This file is not a valid image. + + + This is not a valid IP address. + This is not a valid IP address. + + + This value is not a valid language. + This value is not a valid language. + + + This value is not a valid locale. + This value is not a valid locale. + + + This value is not a valid country. + This value is not a valid country. + + + This value is already used. + This value is already used. + + + The size of the image could not be detected. + The size of the image could not be detected. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + + + This value should be the user's current password. + This value should be the user's current password. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + + + The file was only partially uploaded. + The file was only partially uploaded. + + + No file was uploaded. + No file was uploaded. + + + No temporary folder was configured in php.ini. + No temporary folder was configured in php.ini, or the configured folder does not exist. + + + Cannot write temporary file to disk. + Cannot write temporary file to disk. + + + A PHP extension caused the upload to fail. + A PHP extension caused the upload to fail. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + + + Invalid card number. + Invalid card number. + + + Unsupported card type or invalid card number. + Unsupported card type or invalid card number. + + + This is not a valid International Bank Account Number (IBAN). + This is not a valid International Bank Account Number (IBAN). + + + This value is not a valid ISBN-10. + This value is not a valid ISBN-10. + + + This value is not a valid ISBN-13. + This value is not a valid ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + This value is neither a valid ISBN-10 nor a valid ISBN-13. + + + This value is not a valid ISSN. + This value is not a valid ISSN. + + + This value is not a valid currency. + This value is not a valid currency. + + + This value should be equal to {{ compared_value }}. + This value should be equal to {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + This value should be greater than {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + This value should be greater than or equal to {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + This value should be less than {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + This value should be less than or equal to {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + This value should not be equal to {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + + + An empty file is not allowed. + An empty file is not allowed. + + + The host could not be resolved. + The host could not be resolved. + + + This value does not match the expected {{ charset }} charset. + This value does not match the expected {{ charset }} charset. + + + This is not a valid Business Identifier Code (BIC). + This is not a valid Business Identifier Code (BIC). + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf new file mode 100644 index 0000000000000000000000000000000000000000..1fa59dda6ad4626a69d718a709a6ababe9c1f44e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Este valor debería ser falso. + + + This value should be true. + Este valor debería ser verdadero. + + + This value should be of type {{ type }}. + Este valor debería ser de tipo {{ type }}. + + + This value should be blank. + Este valor debería estar vacío. + + + The value you selected is not a valid choice. + El valor seleccionado no es una opción válida. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Debe seleccionar al menos {{ limit }} opción.|Debe seleccionar al menos {{ limit }} opciones. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Debe seleccionar como máximo {{ limit }} opción.|Debe seleccionar como máximo {{ limit }} opciones. + + + One or more of the given values is invalid. + Uno o más de los valores indicados no son válidos. + + + This field was not expected. + Este campo no se esperaba. + + + This field is missing. + Este campo está desaparecido. + + + This value is not a valid date. + Este valor no es una fecha válida. + + + This value is not a valid datetime. + Este valor no es una fecha y hora válidas. + + + This value is not a valid email address. + Este valor no es una dirección de email válida. + + + The file could not be found. + No se pudo encontrar el archivo. + + + The file is not readable. + No se puede leer el archivo. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + El archivo es demasiado grande ({{ size }} {{ suffix }}). El tamaño máximo permitido es {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + El tipo mime del archivo no es válido ({{ type }}). Los tipos mime válidos son {{ types }}. + + + This value should be {{ limit }} or less. + Este valor debería ser {{ limit }} o menos. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Este valor es demasiado largo. Debería tener {{ limit }} carácter o menos.|Este valor es demasiado largo. Debería tener {{ limit }} caracteres o menos. + + + This value should be {{ limit }} or more. + Este valor debería ser {{ limit }} o más. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Este valor es demasiado corto. Debería tener {{ limit }} carácter o más.|Este valor es demasiado corto. Debería tener {{ limit }} caracteres o más. + + + This value should not be blank. + Este valor no debería estar vacío. + + + This value should not be null. + Este valor no debería ser nulo. + + + This value should be null. + Este valor debería ser nulo. + + + This value is not valid. + Este valor no es válido. + + + This value is not a valid time. + Este valor no es una hora válida. + + + This value is not a valid URL. + Este valor no es una URL válida. + + + The two values should be equal. + Los dos valores deberían ser iguales. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + El archivo es demasiado grande. El tamaño máximo permitido es {{ limit }} {{ suffix }}. + + + The file is too large. + El archivo es demasiado grande. + + + The file could not be uploaded. + No se pudo subir el archivo. + + + This value should be a valid number. + Este valor debería ser un número válido. + + + This file is not a valid image. + El archivo no es una imagen válida. + + + This is not a valid IP address. + Esto no es una dirección IP válida. + + + This value is not a valid language. + Este valor no es un idioma válido. + + + This value is not a valid locale. + Este valor no es una localización válida. + + + This value is not a valid country. + Este valor no es un país válido. + + + This value is already used. + Este valor ya se ha utilizado. + + + The size of the image could not be detected. + No se pudo determinar el tamaño de la imagen. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + El ancho de la imagen es demasiado grande ({{ width }}px). El ancho máximo permitido es de {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + El ancho de la imagen es demasiado pequeño ({{ width }}px). El ancho mínimo requerido es {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + La altura de la imagen es demasiado grande ({{ height }}px). La altura máxima permitida es de {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + La altura de la imagen es demasiado pequeña ({{ height }}px). La altura mínima requerida es de {{ min_height }}px. + + + This value should be the user's current password. + Este valor debería ser la contraseña actual del usuario. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Este valor debería tener exactamente {{ limit }} carácter.|Este valor debería tener exactamente {{ limit }} caracteres. + + + The file was only partially uploaded. + El archivo fue sólo subido parcialmente. + + + No file was uploaded. + Ningún archivo fue subido. + + + No temporary folder was configured in php.ini. + Ninguna carpeta temporal fue configurada en php.ini. + + + Cannot write temporary file to disk. + No se pudo escribir el archivo temporal en el disco. + + + A PHP extension caused the upload to fail. + Una extensión de PHP hizo que la subida fallara. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Esta colección debe contener {{ limit }} elemento o más.|Esta colección debe contener {{ limit }} elementos o más. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Esta colección debe contener {{ limit }} elemento o menos.|Esta colección debe contener {{ limit }} elementos o menos. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Esta colección debe contener exactamente {{ limit }} elemento.|Esta colección debe contener exactamente {{ limit }} elementos. + + + Invalid card number. + Número de tarjeta inválido. + + + Unsupported card type or invalid card number. + Tipo de tarjeta no soportado o número de tarjeta inválido. + + + This is not a valid International Bank Account Number (IBAN). + Esto no es un International Bank Account Number (IBAN) válido. + + + This value is not a valid ISBN-10. + Este valor no es un ISBN-10 válido. + + + This value is not a valid ISBN-13. + Este valor no es un ISBN-13 válido. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Este valor no es ni un ISBN-10 válido ni un ISBN-13 válido. + + + This value is not a valid ISSN. + Este valor no es un ISSN válido. + + + This value is not a valid currency. + Este valor no es una divisa válida. + + + This value should be equal to {{ compared_value }}. + Este valor debería ser igual que {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Este valor debería ser mayor que {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Este valor debería ser mayor o igual que {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Este valor debería ser idéntico a {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Este valor debería ser menor que {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Este valor debería ser menor o igual que {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Este valor debería ser distinto de {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Este valor no debería ser idéntico a {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + La proporción de la imagen es demasiado grande ({{ ratio }}). La máxima proporción permitida es {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + La proporción de la imagen es demasiado pequeña ({{ ratio }}). La mínima proporción permitida es {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + La imagen es cuadrada ({{ width }}x{{ height }}px). Las imágenes cuadradas no están permitidas. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + La imagen está orientada horizontalmente ({{ width }}x{{ height }}px). Las imágenes orientadas horizontalmente no están permitidas. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + La imagen está orientada verticalmente ({{ width }}x{{ height }}px). Las imágenes orientadas verticalmente no están permitidas. + + + An empty file is not allowed. + No está permitido un archivo vacío. + + + The host could not be resolved. + No se puede resolver el host. + + + This value does not match the expected {{ charset }} charset. + La codificación de caracteres para este valor debería ser {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + No es un Código de Identificación Bancaria (BIC) válido. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf new file mode 100644 index 0000000000000000000000000000000000000000..d047c8bb9ef82215709bcb8ad0dca42d01a36c88 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + Väärtus peaks olema väär. + + + This value should be true. + Väärtus peaks oleme tõene. + + + This value should be of type {{ type }}. + Väärtus peaks olema {{ type }}-tüüpi. + + + This value should be blank. + Väärtus peaks olema tühi. + + + The value you selected is not a valid choice. + Väärtus peaks olema üks etteantud valikutest. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Valima peaks vähemalt {{ limit }} valikut. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Valima peaks mitte rohkem kui {{ limit }} valikut. + + + One or more of the given values is invalid. + One or more of the given values is invalid. + + + This field was not expected. + See väli ei oodatud. + + + This field is missing. + See väli on puudu. + + + This value is not a valid date. + Väärtus pole korrektne kuupäev. + + + This value is not a valid datetime. + Väärtus pole korrektne kuupäev ja kellaeg. + + + This value is not a valid email address. + Väärtus pole korrektne e-maili aadress. + + + The file could not be found. + Faili ei leita. + + + The file is not readable. + Fail ei ole loetav. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Fail on liiga suur ({{ size }} {{ suffix }}). Suurim lubatud suurus on {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Faili sisutüüp on vigane ({{ type }}). Lubatud sisutüübid on {{ types }}. + + + This value should be {{ limit }} or less. + Väärtus peaks olema {{ limit }} või vähem. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Väärtus on liiga pikk. Pikkus peaks olema {{ limit }} tähemärki või vähem. + + + This value should be {{ limit }} or more. + Väärtus peaks olema {{ limit }} või rohkem. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Väärtus on liiga lühike. Pikkus peaks olema {{ limit }} tähemärki või rohkem. + + + This value should not be blank. + Väärtus ei tohiks olla tühi. + + + This value should not be null. + Väärtus ei tohiks olla 'null'. + + + This value should be null. + Väärtus peaks olema 'null'. + + + This value is not valid. + Väärtus on vigane. + + + This value is not a valid time. + Väärtus pole korrektne aeg. + + + This value is not a valid URL. + Väärtus pole korrektne URL. + + + The two values should be equal. + Väärtused peaksid olema võrdsed. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Fail on liiga suur. Maksimaalne lubatud suurus on {{ limit }} {{ suffix }}. + + + The file is too large. + Fail on liiga suur. + + + The file could not be uploaded. + Faili ei saa üles laadida. + + + This value should be a valid number. + Väärtus peaks olema korrektne number. + + + This file is not a valid image. + Fail ei ole korrektne pilt. + + + This is not a valid IP address. + IP aadress pole korrektne. + + + This value is not a valid language. + Väärtus pole korrektne keel. + + + This value is not a valid locale. + Väärtus pole korrektne asukohakeel. + + + This value is not a valid country. + Väärtus pole olemasolev riik. + + + This value is already used. + Väärtust on juba kasutatud. + + + The size of the image could not be detected. + Pildi suurust polnud võimalik tuvastada. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Pilt on liiga lai ({{ width }}px). Suurim lubatud laius on {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Pilt on liiga kitsas ({{ width }}px). Vähim lubatud laius on {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Pilt on liiga pikk ({{ height }}px). Lubatud suurim pikkus on {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Pilt pole piisavalt pikk ({{ height }}px). Lubatud vähim pikkus on {{ min_height }}px. + + + This value should be the user's current password. + Väärtus peaks olema kasutaja kehtiv salasõna. + + + This value should have exactly {{ limit }} characters. + Väärtus peaks olema täpselt {{ limit }} tähemärk pikk.|Väärtus peaks olema täpselt {{ limit }} tähemärki pikk. + + + The file was only partially uploaded. + Fail ei laetud täielikult üles. + + + No file was uploaded. + Ühtegi faili ei laetud üles. + + + No temporary folder was configured in php.ini. + Ühtegi ajutist kausta polnud php.ini-s seadistatud. + + + Cannot write temporary file to disk. + Ajutist faili ei saa kettale kirjutada. + + + A PHP extension caused the upload to fail. + PHP laiendi tõttu ebaõnnestus faili üleslaadimine. + + + This collection should contain {{ limit }} elements or more. + Kogumikus peaks olema vähemalt {{ limit }} element.|Kogumikus peaks olema vähemalt {{ limit }} elementi. + + + This collection should contain {{ limit }} elements or less. + Kogumikus peaks olema ülimalt {{ limit }} element.|Kogumikus peaks olema ülimalt {{ limit }} elementi. + + + This collection should contain exactly {{ limit }} elements. + Kogumikus peaks olema täpselt {{ limit }} element.|Kogumikus peaks olema täpselt {{ limit }}|elementi. + + + Invalid card number. + Vigane kaardi number. + + + Unsupported card type or invalid card number. + Kaardi tüüpi ei toetata või kaardi number on vigane. + + + This is not a valid International Bank Account Number (IBAN). + Väärtus pole korrektne IBAN-number. + + + This value is not a valid ISBN-10. + Väärtus pole korrektne ISBN-10. + + + This value is not a valid ISBN-13. + Väärtus pole korrektne ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Väärtus pole korrektne ISBN-10 ega ISBN-13. + + + This value is not a valid ISSN. + Väärtus pole korrektne ISSN. + + + This value is not a valid currency. + Väärtus pole korrektne valuuta. + + + This value should be equal to {{ compared_value }}. + Väärtus peaks olema võrdne {{ compared_value }}-ga. + + + This value should be greater than {{ compared_value }}. + Väärtus peaks olema suurem kui {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Väärtus peaks olema suurem kui või võrduma {{ compared_value }}-ga. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Väärtus peaks olema identne väärtusega {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Väärtus peaks olema väiksem kui {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Väärtus peaks olema väiksem kui või võrduma {{ compared_value }}-ga. + + + This value should not be equal to {{ compared_value }}. + Väärtus ei tohiks võrduda {{ compared_value }}-ga. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Väärtus ei tohiks olla identne väärtusega {{ compared_value_type }} {{ compared_value }}. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf new file mode 100644 index 0000000000000000000000000000000000000000..b2edefd30398bedb9e8459d7bd529ec09a08ac02 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + Balio hau faltsua izan beharko litzateke. + + + This value should be true. + Balio hau egia izan beharko litzateke. + + + This value should be of type {{ type }}. + Balio hau {{ type }} motakoa izan beharko litzateke. + + + This value should be blank. + Balio hau hutsik egon beharko litzateke. + + + The value you selected is not a valid choice. + Hautatu duzun balioa ez da aukera egoki bat. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Gutxienez aukera {{ limit }} hautatu behar duzu.|Gutxienez {{ limit }} aukera hautatu behar dituzu. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Gehienez aukera {{ limit }} hautatu behar duzu.|Gehienez {{ limit }} aukera hautatu behar dituzu. + + + One or more of the given values is invalid. + Emandako balioetatik gutxienez bat ez da egokia. + + + This field was not expected. + Eremu hau ez zen espero. + + + This field is missing. + Eremu hau falta da. + + + This value is not a valid date. + Balio hau ez da data egoki bat. + + + This value is not a valid datetime. + Balio hau ez da data-ordu egoki bat. + + + This value is not a valid email address. + Balio hau ez da posta elektroniko egoki bat. + + + The file could not be found. + Ezin izan da fitxategia aurkitu. + + + The file is not readable. + Fitxategia ez da irakurgarria. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Fitxategia handiegia da ({{ size }} {{ suffix }}). Baimendutako tamaina handiena {{ limit }} {{ suffix }} da. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Fitxategiaren mime mota ez da egokia ({{ type }}). Hauek dira baimendutako mime motak: {{ types }}. + + + This value should be {{ limit }} or less. + Balio hau gehienez {{ limit }} izan beharko litzateke. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Balio hau luzeegia da. Gehienez karaktere {{ limit }} eduki beharko luke.|Balio hau luzeegia da. Gehienez {{ limit }} karaktere eduki beharko lituzke. + + + This value should be {{ limit }} or more. + Balio hau gutxienez {{ limit }} izan beharko litzateke. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Balio hau motzegia da. Karaktere {{ limit }} gutxienez eduki beharko luke.|Balio hau motzegia da. Gutxienez {{ limit }} karaktere eduki beharko lituzke. + + + This value should not be blank. + Balio hau ez litzateke hutsik egon behar. + + + This value should not be null. + Balio hau ez litzateke nulua izan behar. + + + This value should be null. + Balio hau nulua izan beharko litzateke. + + + This value is not valid. + Balio hau ez da egokia. + + + This value is not a valid time. + Balio hau ez da ordu egoki bat. + + + This value is not a valid URL. + Balio hau ez da baliabideen kokatzaile uniforme (URL) egoki bat. + + + The two values should be equal. + Bi balioak berdinak izan beharko lirateke. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Fitxategia handiegia da. Baimendutako tamaina handiena {{ limit }} {{ suffix }} da. + + + The file is too large. + Fitxategia handiegia da. + + + The file could not be uploaded. + Ezin izan da fitxategia igo. + + + This value should be a valid number. + Balio hau zenbaki egoki bat izan beharko litzateke. + + + This file is not a valid image. + Fitxategi hau ez da irudi egoki bat. + + + This is not a valid IP address. + Honako hau ez da IP helbide egoki bat. + + + This value is not a valid language. + Balio hau ez da hizkuntza egoki bat. + + + This value is not a valid locale. + Balio hau ez da kokapen egoki bat. + + + This value is not a valid country. + Balio hau ez da herrialde egoki bat. + + + This value is already used. + Balio hau jadanik erabilia izan da. + + + The size of the image could not be detected. + Ezin izan da irudiaren tamaina detektatu. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Irudiaren zabalera handiegia da ({{ width }}px). Onartutako gehienezko zabalera {{ max_width }}px dira. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Irudiaren zabalera txikiegia da ({{ width }}px). Onartutako gutxieneko zabalera {{ min_width }}px dira. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Irudiaren altuera handiegia da ({{ height }}px). Onartutako gehienezko altuera {{ max_height }}px dira. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Irudiaren altuera txikiegia da ({{ height }}px). Onartutako gutxieneko altuera {{ min_height }}px dira. + + + This value should be the user's current password. + Balio hau uneko erabiltzailearen pasahitza izan beharko litzateke. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Balio honek zehazki karaktere {{ limit }} izan beharko luke.|Balio honek zehazki {{ limit }} karaktere izan beharko lituzke. + + + The file was only partially uploaded. + Fitxategiaren zati bat bakarrik igo da. + + + No file was uploaded. + Ez da fitxategirik igo. + + + No temporary folder was configured in php.ini. + Ez da aldi baterako karpetarik konfiguratu php.ini fitxategian. + + + Cannot write temporary file to disk. + Ezin izan da aldi baterako fitxategia diskoan idatzi. + + + A PHP extension caused the upload to fail. + PHP luzapen batek igoeraren hutsa eragin du. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Bilduma honek gutxienez elementu {{ limit }} eduki beharko luke.|Bilduma honek gutxienez {{ limit }} elementu eduki beharko lituzke. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Bilduma honek gehienez elementu {{ limit }} eduki beharko luke.|Bilduma honek gehienez {{ limit }} elementu eduki beharko lituzke. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Bilduma honek zehazki elementu {{ limit }} eduki beharko luke.|Bilduma honek zehazki {{ limit }} elementu eduki beharko lituzke. + + + Invalid card number. + Txartel zenbaki baliogabea. + + + Unsupported card type or invalid card number. + Txartel mota onartezina edo txartel zenbaki baliogabea. + + + This is not a valid International Bank Account Number (IBAN). + Hau ez da baliozko banku internazionaleko kontu zenbaki (IBAN) bat. + + + This value is not a valid ISBN-10. + Balio hau ez da onartutako ISBN-10 bat. + + + This value is not a valid ISBN-13. + Balio hau ez da onartutako ISBN-13 bat. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Balio hau ez da onartutako ISBN-10 edo ISBN-13 bat. + + + This value is not a valid ISSN. + Balio hau ez da onartutako ISSN bat. + + + This value is not a valid currency. + Balio hau ez da baliozko moneta bat. + + + This value should be equal to {{ compared_value }}. + Balio hau {{ compared_value }}-(r)en berbera izan beharko litzateke. + + + This value should be greater than {{ compared_value }}. + Balio hau {{ compared_value }} baino handiagoa izan beharko litzateke. + + + This value should be greater than or equal to {{ compared_value }}. + Balio hau {{ compared_value }}-(r)en berdina edota handiagoa izan beharko litzateke. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Balio hau {{ compared_value_type }} {{ compared_value }}-(r)en berbera izan beharko litzateke. + + + This value should be less than {{ compared_value }}. + Balio hau {{ compared_value }} baino txikiagoa izan beharko litzateke. + + + This value should be less than or equal to {{ compared_value }}. + Balio hau {{ compared_value }}-(r)en berdina edota txikiagoa izan beharko litzateke. + + + This value should not be equal to {{ compared_value }}. + Balio hau ez litzateke {{ compared_value }}-(r)en berdina izan behar. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Balio hau ez litzateke {{ compared_value_type }} {{ compared_value }}-(r)en berbera izan behar. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf new file mode 100644 index 0000000000000000000000000000000000000000..98b4bd66f08e8f00137427cc03223d92fbf81ce8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + این مقدار باید نادرست(False) باشد. + + + This value should be true. + این مقدار باید درست(True) باشد. + + + This value should be of type {{ type }}. + این مقدار باید از نوع {{ type }} باشد. + + + This value should be blank. + این Ùیلد باید خالی باشد. + + + The value you selected is not a valid choice. + گزینه انتخابی معتبر نیست. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + باید حداقل {{ limit }} گزینه انتخاب کنید.|باید حداقل {{ limit }} گزینه انتخاب کنید. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + حداکثر {{ limit }} گزینه Ù…ÛŒ توانید انتخاب کنید.|حداکثر {{ limit }} گزینه Ù…ÛŒ توانید انتخاب کنید. + + + One or more of the given values is invalid. + یک یا چند مقدار نامعتبر وجود دارد. + + + The fields {{ fields }} were not expected. + Ùیلدهای {{ fields }} اضاÙÛŒ هستند. + + + The fields {{ fields }} are missing. + Ùیلدهای {{ fields }} Ú©Ù… هستند. + + + This value is not a valid date. + این مقدار یک تاریخ معتبر نیست. + + + This value is not a valid datetime. + این مقدار یک تاریخ Ùˆ زمان معتبر نیست. + + + This value is not a valid email address. + این یک رایانامه معتبر نیست. + + + The file could not be found. + ÙØ§ÛŒÙ„ پیدا نشد. + + + The file is not readable. + ÙØ§ÛŒÙ„ قابلیت خواندن ندارد. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + ÙØ§ÛŒÙ„ بیش از اندازه بزرگ است({{ size }} {{ suffix }}). حداکثر اندازه مجاز برابر {{ limit }} {{ suffix }} است. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + این نوع ÙØ§ÛŒÙ„ مجاز نیست({{ type }}). نوع های مجاز {{ types }} هستند. + + + This value should be {{ limit }} or less. + این مقدار باید کوچکتر یا مساوی {{ limit }} باشد. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + بسیار طولانی است.حداکثر تعداد حرو٠مجاز برابر {{ limit }} است.|بسیار طولانی است.حداکثر تعداد حرو٠مجاز برابر {{ limit }} است. + + + This value should be {{ limit }} or more. + این مقدار باید برابر Ùˆ یا بیشتر از {{ limit }} باشد. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + بسیار کوتاه است.تعداد حرو٠باید حداقل {{ limit }} باشد.|بسیار کوتاه است.تعداد حرو٠باید حداقل {{ limit }} باشد. + + + This value should not be blank. + این مقدار نباید تهی باشد. + + + This value should not be null. + باید مقداری داشته باشد.. + + + This value should be null. + نباید مقداری داشته باشد. + + + This value is not valid. + این مقدار معتبر نیست. + + + This value is not a valid time. + این مقدار یک زمان صحیح نیست. + + + This value is not a valid URL. + این یک URL معتبر نیست. + + + The two values should be equal. + دو مقدار باید برابر باشند. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + ÙØ§ÛŒÙ„ بیش از اندازه بزرگ است. حداکثر اندازه مجاز برابر {{ limit }} {{ suffix }} است. + + + The file is too large. + ÙØ§ÛŒÙ„ بیش از اندازه بزرگ است. + + + The file could not be uploaded. + بارگذاری ÙØ§ÛŒÙ„ با شکست مواجه شد. + + + This value should be a valid number. + این مقدار باید یک عدد معتبر باشد. + + + This file is not a valid image. + این ÙØ§ÛŒÙ„ یک تصویر نیست. + + + This is not a valid IP address. + این مقدار یک IP معتبر نیست. + + + This value is not a valid language. + این مقدار یک زبان صحیح نیست. + + + This value is not a valid locale. + این مقدار یک محل صحیح نیست. + + + This value is not a valid country. + این مقدار یک کشور صحیح نیست. + + + This value is already used. + این مقدار قبلا مورد Ø§Ø³ØªÙØ§Ø¯Ù‡ قرار Ú¯Ø±ÙØªÙ‡ است. + + + The size of the image could not be detected. + اندازه تصویر قابل شناسایی نیست. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + طول تصویر بسیار بزرگ است ({{ width }}px). بشینه طول مجاز {{ max_width }}px است. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + طول تصویر بسیار Ú©ÙˆÚ†Ú© است ({{ width }}px). کمینه طول موردنظر {{ min_width }}px است. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Ø§Ø±ØªÙØ§Ø¹ تصویر بسیار بزرگ است ({{ height }}px). بشینه Ø§Ø±ØªÙØ§Ø¹ مجاز {{ max_height }}px است. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Ø§Ø±ØªÙØ§Ø¹ تصویر بسیار Ú©ÙˆÚ†Ú© است ({{ height }}px). کمینه Ø§Ø±ØªÙØ§Ø¹ موردنظر {{ min_height }}px است. + + + This value should be the user's current password. + این مقدار Ù…ÛŒ بایست کلمه عبور کنونی کاربر باشد. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + این مقدار Ù…ÛŒ بایست دقیقا {{ limit }} کاراکتر داشته باشد.| این مقدار Ù…ÛŒ بایست دقیقا {{ limit }} کاراکتر داشته باشد. + + + The file was only partially uploaded. + ÙØ§ÛŒÙ„ به صورت جزیی بارگذاری شده است. + + + No file was uploaded. + هیچ ÙØ§ÛŒÙ„ÛŒ بارگذاری نشد. + + + No temporary folder was configured in php.ini. + Ùولدر موقت در php.ini پیکربندی نشده است. + + + Cannot write temporary file to disk. + ÙØ§ÛŒÙ„ موقت را نمی توان در دیسک نوشت. + + + A PHP extension caused the upload to fail. + اکستنشن PHP موجب شد Ú©Ù‡ بارگذاری ÙØ§ÛŒÙ„ با شکست مواجه شود. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + این مجموعه Ù…ÛŒ بایست دارای {{ limit }} عنصر یا بیشتر باشد.|این مجموعه Ù…ÛŒ بایست دارای {{ limit }} عنصر یا بیشتر باشد. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + این مجموعه Ù…ÛŒ بایست دارای حداقل {{ limit }} عنصر یا کمتر باشد.|این مجموعه Ù…ÛŒ بایست دارای {{ limit }} عنصر یا کمتر باشد. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + این مجموعه Ù…ÛŒ بایست به طور دقیق دارا {{ limit }} عنصر باشد.|این مجموعه Ù…ÛŒ بایست به طور دقیق دارای {{ limit }} قلم باشد. + + + Invalid card number. + شماره کارت نامعتبر است. + + + Unsupported card type or invalid card number. + نوع کارت پشتیبانی نمی شود یا شماره کارت نامعتبر است. + + + This is not a valid International Bank Account Number (IBAN). + این یک شماره حساب بین المللی بانک (IBAN) درست نیست. + + + This value is not a valid ISBN-10. + این مقدار یک ISBN-10 درست نیست. + + + This value is not a valid ISBN-13. + این مقدار یک ISBN-13 درست نیست. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + این مقدار یک ISBN-10 درست یا ISBN-13 درست نیست. + + + This value is not a valid ISSN. + این مقدار یک ISSN درست نیست. + + + This value is not a valid currency. + این مقدار یک یکای پول درست نیست. + + + This value should be equal to {{ compared_value }}. + این مقدار باید برابر با {{ compared_value }} باشد. + + + This value should be greater than {{ compared_value }}. + این مقدار باید از {{ compared_value }} بیشتر باشد. + + + This value should be greater than or equal to {{ compared_value }}. + این مقدار باید بزرگتر یا مساوی با {{ compared_value }} باشد. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + این مقدار باید با {{ compared_value_type }} {{ compared_value }} یکی باشد. + + + This value should be less than {{ compared_value }}. + این مقدار باید کمتر از {{ compared_value }} باشد. + + + This value should be less than or equal to {{ compared_value }}. + این مقدار باید کمتر یا مساوی با {{ compared_value }} باشد. + + + This value should not be equal to {{ compared_value }}. + این مقدار نباید با {{ compared_value }} برابر باشد. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + این مقدار نباید {{ compared_value_type }} {{ compared_value }} یکی باشد. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf new file mode 100644 index 0000000000000000000000000000000000000000..3f5a07e0921ae8eca05830a0c0cac384c912b609 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf @@ -0,0 +1,227 @@ + + + + + + This value should be false. + Arvon tulee olla epätosi. + + + This value should be true. + Arvon tulee olla tosi. + + + This value should be of type {{ type }}. + Arvon tulee olla tyyppiä {{ type }}. + + + This value should be blank. + Arvon tulee olla tyhjä. + + + The value you selected is not a valid choice. + Arvon tulee olla yksi annetuista vaihtoehdoista. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Sinun tulee valita vähintään {{ limit }} vaihtoehtoa. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Sinun tulee valitan enintään {{ limit }} vaihtoehtoa. + + + One or more of the given values is invalid. + Yksi tai useampi annetuista arvoista on virheellinen. + + + This field was not expected. + Tässä kentässä ei odotettu. + + + This field is missing. + Tämä kenttä puuttuu. + + + This value is not a valid date. + Annettu arvo ei ole kelvollinen päivämäärä. + + + This value is not a valid datetime. + Annettu arvo ei ole kelvollinen päivämäärä ja kellonaika. + + + This value is not a valid email address. + Annettu arvo ei ole kelvollinen sähköpostiosoite. + + + The file could not be found. + Tiedostoa ei löydy. + + + The file is not readable. + Tiedostoa ei voida lukea. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Tiedostonkoko ({{ size }} {{ suffix }}) on liian iso. Suurin sallittu tiedostonkoko on {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Tiedostotyyppi ({{ type }}) on virheellinen. Sallittuja tiedostotyyppejä ovat {{ types }}. + + + This value should be {{ limit }} or less. + Arvon tulee olla {{ limit }} tai vähemmän. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Liian pitkä syöte. Syöte saa olla enintään {{ limit }} merkkiä. + + + This value should be {{ limit }} or more. + Arvon tulee olla {{ limit }} tai enemmän. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Liian lyhyt syöte. Syötteen tulee olla vähintään {{ limit }} merkkiä. + + + This value should not be blank. + Kenttä ei voi olla tyhjä. + + + This value should not be null. + Syöte ei voi olla null. + + + This value should be null. + Syötteen tulee olla null. + + + This value is not valid. + Virheellinen arvo. + + + This value is not a valid time. + Annettu arvo ei ole kelvollinen kellonaika. + + + This value is not a valid URL. + Annettu arvo ei ole kelvollinen URL-osoite. + + + The two values should be equal. + Kahden annetun arvon tulee olla samat. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Annettu tiedosto on liian iso. Suurin sallittu tiedostokoko on {{ limit }} {{ suffix }}. + + + The file is too large. + Tiedosto on liian iso. + + + The file could not be uploaded. + Tiedoston siirto epäonnistui. + + + This value should be a valid number. + Tämän arvon tulee olla numero. + + + This file is not a valid image. + Tämä tiedosto ei ole kelvollinen kuva. + + + This is not a valid IP address. + Tämä ei ole kelvollinen IP-osoite. + + + This value is not a valid language. + Tämä arvo ei ole kelvollinen kieli. + + + This value is not a valid locale. + Tämä arvo ei ole kelvollinen kieli- ja alueasetus (locale). + + + This value is not a valid country. + Tämä arvo ei ole kelvollinen maa. + + + This value is already used. + Tämä arvo on jo käytetty. + + + The size of the image could not be detected. + Kuvan kokoa ei voitu tunnistaa. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Kuva on liian leveä ({{ width }}px). Sallittu maksimileveys on {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Kuva on liian kapea ({{ width }}px). Leveyden tulisi olla vähintään {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Kuva on liian korkea ({{ width }}px). Sallittu maksimikorkeus on {{ max_width }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Kuva on liian matala ({{ height }}px). Korkeuden tulisi olla vähintään {{ min_height }}px. + + + This value should be the user's current password. + Tämän arvon tulisi olla käyttäjän tämänhetkinen salasana. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Tämän arvon tulisi olla tasan yhden merkin pituinen.|Tämän arvon tulisi olla tasan {{ limit }} merkkiä pitkä. + + + The file was only partially uploaded. + Tiedosto ladattiin vain osittain. + + + No file was uploaded. + Tiedostoa ei ladattu. + + + No temporary folder was configured in php.ini. + Väliaikaishakemistoa ei ole asetettu php.ini -tiedostoon. + + + Cannot write temporary file to disk. + Väliaikaistiedostoa ei voitu kirjoittaa levylle. + + + A PHP extension caused the upload to fail. + PHP-laajennoksen vuoksi tiedoston lataus epäonnistui. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Tässä ryhmässä tulisi olla yksi tai useampi elementti.|Tässä ryhmässä tulisi olla vähintään {{ limit }} elementtiä. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Tässä ryhmässä tulisi olla enintään yksi elementti.|Tässä ryhmässä tulisi olla enintään {{ limit }} elementtiä. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Tässä ryhmässä tulisi olla tasan yksi elementti.|Tässä ryhmässä tulisi olla enintään {{ limit }} elementtiä. + + + Invalid card number. + Virheellinen korttinumero. + + + Unsupported card type or invalid card number. + Tätä korttityyppiä ei tueta tai korttinumero on virheellinen. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf new file mode 100644 index 0000000000000000000000000000000000000000..72d4d92973fdc8bc15c7b70f4ee8131c8ef73f50 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Cette valeur doit être fausse. + + + This value should be true. + Cette valeur doit être vraie. + + + This value should be of type {{ type }}. + Cette valeur doit être de type {{ type }}. + + + This value should be blank. + Cette valeur doit être vide. + + + The value you selected is not a valid choice. + Cette valeur doit être l'un des choix proposés. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Vous devez sélectionner au moins {{ limit }} choix.|Vous devez sélectionner au moins {{ limit }} choix. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Vous devez sélectionner au maximum {{ limit }} choix.|Vous devez sélectionner au maximum {{ limit }} choix. + + + One or more of the given values is invalid. + Une ou plusieurs des valeurs soumises sont invalides. + + + This field was not expected. + Ce champ n'a pas été prévu. + + + This field is missing. + Ce champ est manquant. + + + This value is not a valid date. + Cette valeur n'est pas une date valide. + + + This value is not a valid datetime. + Cette valeur n'est pas une date valide. + + + This value is not a valid email address. + Cette valeur n'est pas une adresse email valide. + + + The file could not be found. + Le fichier n'a pas été trouvé. + + + The file is not readable. + Le fichier n'est pas lisible. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Le fichier est trop volumineux ({{ size }} {{ suffix }}). Sa taille ne doit pas dépasser {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Le type du fichier est invalide ({{ type }}). Les types autorisés sont {{ types }}. + + + This value should be {{ limit }} or less. + Cette valeur doit être inférieure ou égale à {{ limit }}. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Cette chaine est trop longue. Elle doit avoir au maximum {{ limit }} caractère.|Cette chaine est trop longue. Elle doit avoir au maximum {{ limit }} caractères. + + + This value should be {{ limit }} or more. + Cette valeur doit être supérieure ou égale à {{ limit }}. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Cette chaine est trop courte. Elle doit avoir au minimum {{ limit }} caractère.|Cette chaine est trop courte. Elle doit avoir au minimum {{ limit }} caractères. + + + This value should not be blank. + Cette valeur ne doit pas être vide. + + + This value should not be null. + Cette valeur ne doit pas être nulle. + + + This value should be null. + Cette valeur doit être nulle. + + + This value is not valid. + Cette valeur n'est pas valide. + + + This value is not a valid time. + Cette valeur n'est pas une heure valide. + + + This value is not a valid URL. + Cette valeur n'est pas une URL valide. + + + The two values should be equal. + Les deux valeurs doivent être identiques. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Le fichier est trop volumineux. Sa taille ne doit pas dépasser {{ limit }} {{ suffix }}. + + + The file is too large. + Le fichier est trop volumineux. + + + The file could not be uploaded. + Le téléchargement de ce fichier est impossible. + + + This value should be a valid number. + Cette valeur doit être un nombre. + + + This file is not a valid image. + Ce fichier n'est pas une image valide. + + + This is not a valid IP address. + Cette adresse IP n'est pas valide. + + + This value is not a valid language. + Cette langue n'est pas valide. + + + This value is not a valid locale. + Ce paramètre régional n'est pas valide. + + + This value is not a valid country. + Ce pays n'est pas valide. + + + This value is already used. + Cette valeur est déjà utilisée. + + + The size of the image could not be detected. + La taille de l'image n'a pas pu être détectée. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + La largeur de l'image est trop grande ({{ width }}px). La largeur maximale autorisée est de {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + La largeur de l'image est trop petite ({{ width }}px). La largeur minimale attendue est de {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + La hauteur de l'image est trop grande ({{ height }}px). La hauteur maximale autorisée est de {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + La hauteur de l'image est trop petite ({{ height }}px). La hauteur minimale attendue est de {{ min_height }}px. + + + This value should be the user's current password. + Cette valeur doit être le mot de passe actuel de l'utilisateur. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Cette chaine doit avoir exactement {{ limit }} caractère.|Cette chaine doit avoir exactement {{ limit }} caractères. + + + The file was only partially uploaded. + Le fichier a été partiellement transféré. + + + No file was uploaded. + Aucun fichier n'a été transféré. + + + No temporary folder was configured in php.ini. + Aucun répertoire temporaire n'a été configuré dans le php.ini. + + + Cannot write temporary file to disk. + Impossible d'écrire le fichier temporaire sur le disque. + + + A PHP extension caused the upload to fail. + Une extension PHP a empêché le transfert du fichier. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Cette collection doit contenir {{ limit }} élément ou plus.|Cette collection doit contenir {{ limit }} éléments ou plus. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Cette collection doit contenir {{ limit }} élément ou moins.|Cette collection doit contenir {{ limit }} éléments ou moins. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Cette collection doit contenir exactement {{ limit }} élément.|Cette collection doit contenir exactement {{ limit }} éléments. + + + Invalid card number. + Numéro de carte invalide. + + + Unsupported card type or invalid card number. + Type de carte non supporté ou numéro invalide. + + + This is not a valid International Bank Account Number (IBAN). + Le numéro IBAN (International Bank Account Number) saisi n'est pas valide. + + + This value is not a valid ISBN-10. + Cette valeur n'est pas un code ISBN-10 valide. + + + This value is not a valid ISBN-13. + Cette valeur n'est pas un code ISBN-13 valide. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Cette valeur n'est ni un code ISBN-10, ni un code ISBN-13 valide. + + + This value is not a valid ISSN. + Cette valeur n'est pas un code ISSN valide. + + + This value is not a valid currency. + Cette valeur n'est pas une devise valide. + + + This value should be equal to {{ compared_value }}. + Cette valeur doit être égale à {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Cette valeur doit être supérieure à {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Cette valeur doit être supérieure ou égale à {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Cette valeur doit être identique à {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Cette valeur doit être inférieure à {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Cette valeur doit être inférieure ou égale à {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Cette valeur ne doit pas être égale à {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Cette valeur ne doit pas être identique à {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Le rapport largeur/hauteur de l'image est trop grand ({{ ratio }}). Le rapport maximal autorisé est {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Le rapport largeur/hauteur de l'image est trop petit ({{ ratio }}). Le rapport minimal attendu est {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + L'image est carrée ({{ width }}x{{ height }}px). Les images carrées ne sont pas autorisées. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + L'image est au format paysage ({{ width }}x{{ height }}px). Les images au format paysage ne sont pas autorisées. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + L'image est au format portrait ({{ width }}x{{ height }}px). Les images au format portrait ne sont pas autorisées. + + + An empty file is not allowed. + Un fichier vide n'est pas autorisé. + + + The host could not be resolved. + Le nom de domaine n'a pas pu être résolu. + + + This value does not match the expected {{ charset }} charset. + Cette valeur ne correspond pas au jeu de caractères {{ charset }} attendu. + + + This is not a valid Business Identifier Code (BIC). + Ce n'est pas un code universel d'identification des banques (BIC) valide. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..1d0cc13c865c118d5292760835f8c4605b6de022 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf @@ -0,0 +1,315 @@ + + + + + + This value should be false. + Este valor debería ser falso. + + + This value should be true. + Este valor debería ser verdadeiro. + + + This value should be of type {{ type }}. + Este valor debería ser de tipo {{ type }}. + + + This value should be blank. + Este valor debería estar baleiro. + + + The value you selected is not a valid choice. + O valor seleccionado non é unha opción válida. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Debe seleccionar polo menos {{ limit }} opción.|Debe seleccionar polo menos {{ limit }} opcions. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Debe seleccionar como máximo {{ limit }} opción.|Debe seleccionar como máximo {{ limit }} opcions. + + + One or more of the given values is invalid. + Un ou máis dos valores indicados non son válidos. + + + This field was not expected. + Este campo non era esperado. + + + This field is missing. + Este campo falta. + + + This value is not a valid date. + Este valor non é unha data válida. + + + This value is not a valid datetime. + Este valor non é unha data e hora válidas. + + + This value is not a valid email address. + Este valor non é unha dirección de correo electrónico válida. + + + The file could not be found. + Non se puido atopar o arquivo. + + + The file is not readable. + O arquivo non se pode ler. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + O arquivo é demasiado grande ({{ size }} {{ suffix }}). O tamaño máximo permitido é {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + O tipo mime do arquivo non é válido ({{ type }}). Os tipos mime válidos son {{ types }}. + + + This value should be {{ limit }} or less. + Este valor debería ser {{ limit }} ou menos. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Este valor é demasiado longo. Debería ter {{ limit }} carácter ou menos.|Este valor é demasiado longo. Debería ter {{ limit }} caracteres ou menos. + + + This value should be {{ limit }} or more. + Este valor debería ser {{ limit }} ou máis. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Este valor é demasiado curto. Debería ter {{ limit }} carácter ou máis.|Este valor é demasiado corto. Debería ter {{ limit }} caracteres ou máis. + + + This value should not be blank. + Este valor non debería estar baleiro. + + + This value should not be null. + Este valor non debería ser null. + + + This value should be null. + Este valor debería ser null. + + + This value is not valid. + Este valor non é válido. + + + This value is not a valid time. + Este valor non é unha hora válida. + + + This value is not a valid URL. + Este valor non é unha URL válida. + + + The two values should be equal. + Os dous valores deberían ser iguais. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + O arquivo é demasiado grande. O tamaño máximo permitido é {{ limit }} {{ suffix }}. + + + The file is too large. + O arquivo é demasiado grande. + + + The file could not be uploaded. + No se puido cargar o arquivo. + + + This value should be a valid number. + Este valor debería ser un número válido. + + + This file is not a valid image. + O arquivo non é unha imaxe válida. + + + This is not a valid IP address. + Isto non é unha dirección IP válida. + + + This value is not a valid language. + Este valor non é un idioma válido. + + + This value is not a valid locale. + Este valor non é unha localización válida. + + + This value is not a valid country. + Este valor non é un país válido. + + + This value is already used. + Este valor xa está a ser empregado. + + + The size of the image could not be detected. + Non se puido determinar o tamaño da imaxe. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + A largura da imaxe é demasiado grande ({{ width }}px). A largura máxima permitida son {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + A largura da imaxe é demasiado pequena ({{ width }}px). A largura mínima requerida son {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + A altura da imaxe é demasiado grande ({{ height }}px). A altura máxima permitida son {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + A altura da imaxe é demasiado pequena ({{ height }}px). A altura mínima requerida son {{ min_height }}px. + + + This value should be the user's current password. + Este valor debería ser a contrasinal actual do usuario. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Este valor debería ter exactamente {{ limit }} carácter.|Este valor debería ter exactamente {{ limit }} caracteres. + + + The file was only partially uploaded. + O arquivo foi só subido parcialmente. + + + No file was uploaded. + Non se subiu ningún arquivo. + + + No temporary folder was configured in php.ini. + Ningunha carpeta temporal foi configurada en php.ini. + + + Cannot write temporary file to disk. + Non se puido escribir o arquivo temporal no disco. + + + A PHP extension caused the upload to fail. + Unha extensión de PHP provocou que a subida fallara. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Esta colección debe conter {{ limit }} elemento ou máis.|Esta colección debe conter {{ limit }} elementos ou máis. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Esta colección debe conter {{ limit }} elemento ou menos.|Esta colección debe conter {{ limit }} elementos ou menos. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Esta colección debe conter exactamente {{ limit }} elemento.|Esta colección debe conter exactamente {{ limit }} elementos. + + + Invalid card number. + Número de tarxeta non válido. + + + Unsupported card type or invalid card number. + Tipo de tarxeta non soportado ou número de tarxeta non válido. + + + This is not a valid International Bank Account Number (IBAN). + Este valor non é un International Bank Account Number (IBAN) válido. + + + This value is not a valid ISBN-10. + Este valor non é un ISBN-10 válido. + + + This value is not a valid ISBN-13. + Este valor non é un ISBN-13 válido. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Este valor non é nin un ISBN-10 válido nin un ISBN-13 válido. + + + This value is not a valid ISSN. + Este valor non é un ISSN válido. + + + This value is not a valid currency. + Este valor non é unha moeda válida. + + + This value should be equal to {{ compared_value }}. + Este valor debería ser igual a {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Este valor debería ser maior que {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Este valor debería ser maior ou igual que {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Este valor debería ser identico a {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Este valor debería ser menor que {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Este valor debería ser menor ou igual que {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Este valor non debería ser igual a {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Este valor non debería ser identico a {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + A proporción da imaxe é demasiado grande ({{ ratio }}). A proporción máxima permitida é {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + A proporción da é demasiado pequena ({{ ratio }}). A proporción mínima permitida é {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + A imaxe é cadrada ({{ width }}x{{ height }}px). As imáxenes cadradas non están permitidas. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + A imaxe está orientada horizontalmente ({{ width }}x{{ height }}px). As imáxenes orientadas horizontalmente non están permitidas. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + A imaxe está orientada verticalmente ({{ width }}x{{ height }}px). As imáxenes orientadas verticalmente non están permitidas. + + + An empty file is not allowed. + Non está permitido un arquivo baleiro. + + + The host could not be resolved. + Non se puido resolver o host. + + + This value does not match the expected {{ charset }} charset. + A codificación de caracteres para este valor debería ser {{ charset }}. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf new file mode 100644 index 0000000000000000000000000000000000000000..65105149005838dc0372d8feb943a055b0979ce9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf @@ -0,0 +1,307 @@ + + + + + + This value should be false. + הערך צריך להיות שקר. + + + This value should be true. + הערך צריך להיות ×מת. + + + This value should be of type {{ type }}. + הערך צריך להיות מסוג {{ type }}. + + + This value should be blank. + הערך צריך להיות ריק. + + + The value you selected is not a valid choice. + הערך שבחרת ×ינו חוקי. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + ×תה צריך לבחור לפחות {{ limit }} ×פשרויות.|×תה צריך לבחור לפחות {{ limit }} ×פשרויות. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + ×תה צריך לבחור לכל היותר {{ limit }} ×פשרויות.|×תה צריך לבחור לכל היותר {{ limit }} ×פשרויות. + + + One or more of the given values is invalid. + ×חד ×ו יותר ×ž×”×¢×¨×›×™× ×ינו חוקי. + + + This field was not expected. + שדה ×–×” ×œ× ×”×™×” צפוי + + + This field is missing. + שדה ×–×” חסר. + + + This value is not a valid date. + הערך ×ינו ת×ריך חוקי. + + + This value is not a valid datetime. + הערך ×ינו ת×ריך ושעה חוקיי×. + + + This value is not a valid email address. + כתובת המייל ××™× ×” תקינה. + + + The file could not be found. + הקובץ ×œ× × ×ž×¦×. + + + The file is not readable. + ×œ× × ×™×ª×Ÿ ×œ×§×¨×•× ×ת הקובץ. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + הקובץ גדול מדי ({{ size }} {{ suffix }}). הגודל המרבי המותר ×”×•× {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + סוג MIME של הקובץ ×ינו חוקי ({{ type }}). ×ž×•×ª×¨×™× ×¡×•×’×™ MIME {{ types }}. + + + This value should be {{ limit }} or less. + הערך צריל להכיל {{ limit }} ×ª×•×•×™× ×œ×›×œ היותר. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + הערך ×רוך מידי. ×”×•× ×¦×¨×™×š להכיל {{ limit }} ×ª×•×•×™× ×œ×›×œ היותר.|הערך ×רוך מידי. ×”×•× ×¦×¨×™×š להכיל {{ limit }} ×ª×•×•×™× ×œ×›×œ היותר. + + + This value should be {{ limit }} or more. + הערך צריך להכיל {{ limit }} ×ª×•×•×™× ×œ×¤×—×•×ª. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + הערך קצר מידיץ ×”×•× ×¦×¨×™×š להכיל {{ limit }} ×ª×•×•×™× ×œ×¤×—×•×ª.|הערך קצר מידיץ ×”×•× ×¦×¨×™×š להכיל {{ limit }} ×ª×•×•×™× ×œ×¤×—×•×ª. + + + This value should not be blank. + הערך ×œ× ×מור להיות ריק. + + + This value should not be null. + הערך ×œ× ×מור להיות ריק. + + + This value should be null. + הערך צריך להיות ריק. + + + This value is not valid. + הערך ×ינו חוקי. + + + This value is not a valid time. + הערך ×ינו זמן תקין. + + + This value is not a valid URL. + ×–×ת ××™× ×” כתובת ×תר תקינה. + + + The two values should be equal. + שני ×”×¢×¨×›×™× ×¦×¨×™×›×™× ×œ×”×™×•×ª שווי×. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + הקובץ גדול מדי. הגודל המרבי המותר ×”×•× {{ limit }} {{ suffix }}. + + + The file is too large. + הקובץ גדול מדי. + + + The file could not be uploaded. + ×œ× × ×™×ª×Ÿ לעלות ×ת הקובץ. + + + This value should be a valid number. + הערך צריך להיות מספר חוקי. + + + This file is not a valid image. + הקובץ ×”×–×” ×ינו תמונה תקינה. + + + This is not a valid IP address. + זו ××™× ×” כתובת IP חוקית. + + + This value is not a valid language. + הערך ×ינו שפה חוקית. + + + This value is not a valid locale. + הערך ×ינו ×זור תקף. + + + This value is not a valid country. + הערך ×ינו ×רץ חוקית. + + + This value is already used. + הערך כבר בשימוש. + + + The size of the image could not be detected. + ×œ× × ×™×ª×Ÿ לקבוע ×ת גודל התמונה. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + רוחב התמונה גדול מדי ({{ width }}px). הרוחב המקסימלי ×”×•× {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + רוחב התמונה קטן מדי ({{ width }}px). הרוחב המינימלי ×”×•× {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + גובה התמונה גדול מדי ({{ height }}px). הגובה המקסימלי ×”×•× {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + גובה התמונה קטן מדי ({{ height }}px). הגובה המינימלי ×”×•× {{ min_height }}px. + + + This value should be the user's current password. + הערך צריך להיות סיסמת המשתמש הנוכחי. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + הערך צריך להיות בדיוק {{ limit }} תווי×.|הערך צריך להיות בדיוק {{ limit }} תווי×. + + + The file was only partially uploaded. + הקובץ הועלה ב×ופן חלקי. + + + No file was uploaded. + הקובץ ×œ× ×”×•×¢×œ×”. + + + No temporary folder was configured in php.ini. + ×œ× ×”×•×’×“×¨×” תיקייה זמנית ב php.ini. + + + Cannot write temporary file to disk. + ×œ× × ×™×ª×Ÿ לכתוב קובץ זמני לדיסק. + + + A PHP extension caused the upload to fail. + סיומת PHP ×’×¨× ×œ×”×¢×œ××” להיכשל. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + ×”×וסף ×מור להכיל {{ limit }} ××œ×ž× ×˜×™× ×ו יותר.|×”×וסף ×מור להכיל {{ limit }} ××œ×ž× ×˜×™× ×ו יותר. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + ×”×וסף ×מור להכיל {{ limit }} ××œ×ž× ×˜×™× ×ו פחות.|×”×וסף ×מור להכיל {{ limit }} ××œ×ž× ×˜×™× ×ו פחות. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + ×”×וסף צריך להכיל בדיוק {{ limit }} ×למנטי×.|×”×וסף צריך להכיל בדיוק {{ limit }} ×למנטי×. + + + Invalid card number. + מספר הכרטיס ×ינו חוקי. + + + Unsupported card type or invalid card number. + סוג הכרטיס ×ינו נתמך ×ו ×œ× ×—×•×§×™. + + + This is not a valid International Bank Account Number (IBAN). + This is not a valid International Bank Account Number (IBAN). + + + This value is not a valid ISBN-10. + This value is not a valid ISBN-10. + + + This value is not a valid ISBN-13. + This value is not a valid ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + This value is neither a valid ISBN-10 nor a valid ISBN-13. + + + This value is not a valid ISSN. + This value is not a valid ISSN. + + + This value is not a valid currency. + This value is not a valid currency. + + + This value should be equal to {{ compared_value }}. + This value should be equal to {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + This value should be greater than {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + This value should be greater than or equal to {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + This value should be less than {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + This value should be less than or equal to {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + This value should not be equal to {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + + + An empty file is not allowed. + An empty file is not allowed. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf new file mode 100644 index 0000000000000000000000000000000000000000..8c62d899fdaec64051db386b03dd4b60f0fb3c1e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Ova vrijednost treba biti netoÄna (false). + + + This value should be true. + Ova vrijednost treba biti toÄna (true). + + + This value should be of type {{ type }}. + Ova vrijednost treba biti tipa {{ type }}. + + + This value should be blank. + Ova vrijednost treba biti prazna. + + + The value you selected is not a valid choice. + Ova vrijednost treba biti jedna od ponuÄ‘enih. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Izaberite barem {{ limit }} mogućnosti. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Izaberite najviÅ¡e {{ limit }} mogućnosti. + + + One or more of the given values is invalid. + Jedna ili viÅ¡e danih vrijednosti nije ispravna. + + + This field was not expected. + Ovo polje nije oÄekivalo. + + + This field is missing. + Ovo polje nedostaje. + + + This value is not a valid date. + Ova vrijednost nije ispravan datum. + + + This value is not a valid datetime. + Ova vrijednost nije ispravan datum-vrijeme. + + + This value is not a valid email address. + Ova vrijednost nije ispravna e-mail adresa. + + + The file could not be found. + Datoteka ne može biti pronaÄ‘ena. + + + The file is not readable. + Datoteka nije Äitljiva. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Datoteka je prevelika ({{ size }} {{ suffix }}). Najveća dozvoljena veliÄina je {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mime tip datoteke nije ispravan ({{ type }}). Dozvoljeni mime tipovi su {{ types }}. + + + This value should be {{ limit }} or less. + Ova vrijednost treba biti {{ limit }} ili manje. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ova vrijednost je predugaÄka. Treba imati {{ limit }} znakova ili manje. + + + This value should be {{ limit }} or more. + Ova vrijednost treba biti {{ limit }} ili viÅ¡e. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ova vrijednost je prekratka. Treba imati {{ limit }} znakova ili viÅ¡e. + + + This value should not be blank. + Ova vrijednost ne smije biti prazna. + + + This value should not be null. + Ova vrijednost ne smije biti null. + + + This value should be null. + Ova vrijednost treba biti null. + + + This value is not valid. + Ova vrijednost nije ispravna. + + + This value is not a valid time. + Ova vrijednost nije ispravno vrijeme. + + + This value is not a valid URL. + Ova vrijednost nije ispravan URL. + + + The two values should be equal. + Obje vrijednosti trebaju biti jednake. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Ova datoteka je prevelika. Najveća dozvoljena veliÄina je {{ limit }} {{ suffix }}. + + + The file is too large. + Ova datoteka je prevelika. + + + The file could not be uploaded. + Ova datoteka ne može biti prenesena. + + + This value should be a valid number. + Ova vrijednost treba biti ispravan broj. + + + This file is not a valid image. + Ova datoteka nije ispravna slika. + + + This is not a valid IP address. + Ovo nije ispravna IP adresa. + + + This value is not a valid language. + Ova vrijednost nije ispravan jezik. + + + This value is not a valid locale. + Ova vrijednost nije ispravana regionalna oznaka. + + + This value is not a valid country. + Ova vrijednost nije ispravna zemlja. + + + This value is already used. + Ova vrijednost je već iskoriÅ¡tena. + + + The size of the image could not be detected. + VeliÄina slike se ne može odrediti. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Å irina slike je prevelika ({{ width }}px). Najveća dozvoljena Å¡irina je {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Å irina slike je premala ({{ width }}px). Najmanja dozvoljena Å¡irina je {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Visina slike je prevelika ({{ height }}px). Najveća dozvoljena visina je {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Visina slike je premala ({{ height }}px). Najmanja dozvoljena visina je {{ min_height }}px. + + + This value should be the user's current password. + Ova vrijednost treba biti trenutna korisniÄka lozinka. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Ova vrijednost treba imati toÄno {{ limit }} znakova. + + + The file was only partially uploaded. + Datoteka je samo djelomiÄno prenesena. + + + No file was uploaded. + Niti jedna datoteka nije prenesena. + + + No temporary folder was configured in php.ini. + U php.ini datoteci nije konfiguriran privremeni folder. + + + Cannot write temporary file to disk. + Ne mogu zapisati privremenu datoteku na disk. + + + A PHP extension caused the upload to fail. + Prijenos datoteke nije uspio zbog PHP ekstenzije. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ova kolekcija treba sadržavati {{ limit }} ili viÅ¡e elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili viÅ¡e elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili viÅ¡e elemenata. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ova kolekcija treba sadržavati {{ limit }} ili manje elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili manje elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili manje elemenata. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ova kolekcija treba sadržavati toÄno {{ limit }} element.|Ova kolekcija treba sadržavati toÄno {{ limit }} elementa.|Ova kolekcija treba sadržavati toÄno {{ limit }} elemenata. + + + Invalid card number. + Neispravan broj kartice. + + + Unsupported card type or invalid card number. + Neispravan broj kartice ili tip kartice nije podržan. + + + This is not a valid International Bank Account Number (IBAN). + Ova vrijednost nije ispravan meÄ‘unarodni broj bankovnog raÄuna (IBAN). + + + This value is not a valid ISBN-10. + Ova vrijednost nije ispravan ISBN-10. + + + This value is not a valid ISBN-13. + Ova vrijednost nije ispravan ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ova vrijednost nije ispravan ISBN-10 niti ISBN-13. + + + This value is not a valid ISSN. + Ova vrijednost nije ispravan ISSN. + + + This value is not a valid currency. + Ova vrijednost nije ispravna valuta. + + + This value should be equal to {{ compared_value }}. + Ova vrijednost bi trebala biti jednaka {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ova vrijednost bi trebala biti veća od {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ova vrijednost bi trebala biti veća ili jednaka od {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ova vrijednost bi trebala biti {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ova vrijednost bi trebala biti manja od {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ova vrijednost bi trebala biti manja ili jednaka {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ova vrijednost ne bi trebala biti {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ova vrijednost ne bi trebala biti {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Omjer slike je prevelik ({{ ratio }}). Dozvoljeni maksimalni omjer je {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Omjer slike je premali ({{ ratio }}). Minimalni oÄekivani omjer je {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Slika je kvadratnog oblika ({{ width }}x{{ height }}px). Kvadratne slike nisu dozvoljene. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Slika je orijentirana horizontalno ({{ width }}x{{ height }}px). Horizontalno orijentirane slike nisu dozvoljene. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Slika je orijentirana vertikalno ({{ width }}x{{ height }}px). Vertikalno orijentirane slike nisu dozvoljene. + + + An empty file is not allowed. + Prazna datoteka nije dozvoljena. + + + The host could not be resolved. + Poslužitelj nije mogao biti razrijeÅ¡en. + + + This value does not match the expected {{ charset }} charset. + Znakovne oznake vrijednosti ne odgovaraju oÄekivanom {{ charset }} skupu. + + + This is not a valid Business Identifier Code (BIC). + Ovo nije validan poslovni identifikacijski broj (BIC). + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf new file mode 100644 index 0000000000000000000000000000000000000000..a113a7241bc689d892408921f12deb48464c1b26 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Ennek az értéknek hamisnak kell lennie. + + + This value should be true. + Ennek az értéknek igaznak kell lennie. + + + This value should be of type {{ type }}. + Ennek az értéknek {{ type }} típusúnak kell lennie. + + + This value should be blank. + Ennek az értéknek üresnek kell lennie. + + + The value you selected is not a valid choice. + A választott érték érvénytelen. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Legalább {{ limit }} értéket kell kiválasztani.|Legalább {{ limit }} értéket kell kiválasztani. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Legfeljebb {{ limit }} értéket lehet kiválasztani.|Legfeljebb {{ limit }} értéket lehet kiválasztani. + + + One or more of the given values is invalid. + A megadott értékek közül legalább egy érvénytelen. + + + This field was not expected. + Nem várt mezÅ‘. + + + This field is missing. + Ez a mezÅ‘ hiányzik. + + + This value is not a valid date. + Ez az érték nem egy érvényes dátum. + + + This value is not a valid datetime. + Ez az érték nem egy érvényes idÅ‘pont. + + + This value is not a valid email address. + Ez az érték nem egy érvényes e-mail cím. + + + The file could not be found. + A fájl nem található. + + + The file is not readable. + A fájl nem olvasható. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + A fájl túl nagy ({{ size }} {{ suffix }}). A legnagyobb megengedett méret {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + A fájl MIME típusa érvénytelen ({{ type }}). Az engedélyezett MIME típusok: {{ types }}. + + + This value should be {{ limit }} or less. + Ez az érték legfeljebb {{ limit }} lehet. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ez az érték túl hosszú. Legfeljebb {{ limit }} karaktert tartalmazhat.|Ez az érték túl hosszú. Legfeljebb {{ limit }} karaktert tartalmazhat. + + + This value should be {{ limit }} or more. + Ez az érték legalább {{ limit }} kell, hogy legyen. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ez az érték túl rövid. Legalább {{ limit }} karaktert kell tartalmaznia.|Ez az érték túl rövid. Legalább {{ limit }} karaktert kell tartalmaznia. + + + This value should not be blank. + Ez az érték nem lehet üres. + + + This value should not be null. + Ez az érték nem lehet null. + + + This value should be null. + Ennek az értéknek nullnak kell lennie. + + + This value is not valid. + Ez az érték nem érvényes. + + + This value is not a valid time. + Ez az érték nem egy érvényes idÅ‘pont. + + + This value is not a valid URL. + Ez az érték nem egy érvényes URL. + + + The two values should be equal. + A két értéknek azonosnak kell lennie. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + A fájl túl nagy. A megengedett maximális méret: {{ limit }} {{ suffix }}. + + + The file is too large. + A fájl túl nagy. + + + The file could not be uploaded. + A fájl nem tölthetÅ‘ fel. + + + This value should be a valid number. + Ennek az értéknek érvényes számnak kell lennie. + + + This file is not a valid image. + Ez a fájl nem egy érvényes kép. + + + This is not a valid IP address. + Ez az érték nem egy érvényes IP cím. + + + This value is not a valid language. + Ez az érték nem egy érvényes nyelv. + + + This value is not a valid locale. + Ez az érték nem egy érvényes területi beállítás. + + + This value is not a valid country. + Ez az érték nem egy érvényes ország. + + + This value is already used. + Ez az érték már használatban van. + + + The size of the image could not be detected. + A kép méretét nem lehet megállapítani. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + A kép szélessége túl nagy ({{ width }}px). A megengedett legnagyobb szélesség {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + A kép szélessége túl kicsi ({{ width }}px). Az elvárt legkisebb szélesség {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + A kép magassága túl nagy ({{ height }}px). A megengedett legnagyobb magasság {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + A kép magassága túl kicsi ({{ height }}px). Az elvárt legkisebb magasság {{ min_height }}px. + + + This value should be the user's current password. + Ez az érték a felhasználó jelenlegi jelszavával kell megegyezzen. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Ennek az értéknek pontosan {{ limit }} karaktert kell tartalmaznia.|Ennek az értéknek pontosan {{ limit }} karaktert kell tartalmaznia. + + + The file was only partially uploaded. + A fájl csak részben lett feltöltve. + + + No file was uploaded. + Nem lett fájl feltöltve. + + + No temporary folder was configured in php.ini. + Nincs ideiglenes könyvtár beállítva a php.ini-ben. + + + Cannot write temporary file to disk. + Az ideiglenes fájl nem írható a lemezre. + + + A PHP extension caused the upload to fail. + Egy PHP bÅ‘vítmény miatt a feltöltés nem sikerült. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ennek a gyűjteménynek legalább {{ limit }} elemet kell tartalmaznia.|Ennek a gyűjteménynek legalább {{ limit }} elemet kell tartalmaznia. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ez a gyűjtemény legfeljebb {{ limit }} elemet tartalmazhat.|Ez a gyűjtemény legfeljebb {{ limit }} elemet tartalmazhat. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ennek a gyűjteménynek pontosan {{ limit }} elemet kell tartalmaznia.|Ennek a gyűjteménynek pontosan {{ limit }} elemet kell tartalmaznia. + + + Invalid card number. + Érvénytelen kártyaszám. + + + Unsupported card type or invalid card number. + Nem támogatott kártyatípus vagy érvénytelen kártyaszám. + + + This is not a valid International Bank Account Number (IBAN). + Érvénytelen nemzetközi bankszámlaszám (IBAN). + + + This value is not a valid ISBN-10. + Ez az érték nem egy érvényes ISBN-10. + + + This value is not a valid ISBN-13. + Ez az érték nem egy érvényes ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ez az érték nem egy érvényes ISBN-10 vagy ISBN-13. + + + This value is not a valid ISSN. + Ez az érték nem egy érvényes ISSN. + + + This value is not a valid currency. + Ez az érték nem egy érvényes pénznem. + + + This value should be equal to {{ compared_value }}. + Ez az érték legyen {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ez az érték nagyobb legyen, mint {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ez az érték nagyobb vagy egyenlÅ‘ legyen, mint {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ez az érték ugyanolyan legyen, mint {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ez az érték kisebb legyen, mint {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ez az érték kisebb vagy egyenlÅ‘ legyen, mint {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ez az érték ne legyen {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ez az érték ne legyen ugyanolyan, mint {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + A képarány túl nagy ({{ ratio }}). A megengedett legnagyobb képarány {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + A képarány túl kicsi ({{ ratio }}). A megengedett legkisebb képarány {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + A kép négyzet alakú ({{ width }}x{{ height }}px). A négyzet alakú képek nem engedélyezettek. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + A kép fekvÅ‘ tájolású ({{ width }}x{{ height }}px). A fekvÅ‘ tájolású képek nem engedélyezettek. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + A kép álló tájolású ({{ width }}x{{ height }}px). Az álló tájolású képek nem engedélyezettek. + + + An empty file is not allowed. + Üres fájl nem megengedett. + + + The host could not be resolved. + Az állomásnevet nem lehet feloldani. + + + This value does not match the expected {{ charset }} charset. + Ez az érték nem az elvárt {{ charset }} karakterkódolást használja. + + + This is not a valid Business Identifier Code (BIC). + Érvénytelen nemzetközi bankazonosító kód (BIC/SWIFT). + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf new file mode 100644 index 0000000000000000000000000000000000000000..bc0daced86de27f3136a4f9ff68318e133f9602d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ½Õ­Õ¡Õ¬Ö‰ + + + This value should be true. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ³Õ«Õ·Õ¿Ö‰ + + + This value should be of type {{ type }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« {{ type }} Õ¿Õ¥Õ½Õ¡Õ¯Õ«Ö‰ + + + This value should be blank. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ¤Õ¡Õ¿Õ¡Ö€Õ¯Ö‰ + + + The value you selected is not a valid choice. + ÕÕ¥Ö€ Õ¨Õ¶Õ¿Ö€Õ¡Õ® Õ¡Ö€ÕªÕ¥Ö„Õ¨ Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ¨Õ¶Õ¿Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶ Õ§Ö‰ + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Ô´Õ¸Ö‚Ö„ ÕºÕ¥Õ¿Ö„ Õ§ Õ¨Õ¶Õ¿Ö€Õ¥Ö„ Õ¡Õ´Õ¥Õ¶Õ¡Ö„Õ«Õ¹Õ¨ {{ limit }} Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¶Õ¥Ö€Ö‰ + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Ô´Õ¸Ö‚Ö„ ÕºÕ¥Õ¿Ö„ Õ§ Õ¨Õ¶Õ¿Ö€Õ¥Ö„ Õ¸Õ¹ Õ¡Õ¾Õ¥Õ¬Õ« Ö„Õ¡Õ¶ {{ limit }} Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¶Õ¥Ö€Ö‰ + + + One or more of the given values is invalid. + Õ„Õ¥Õ¯ Õ¯Õ¡Õ´ Õ¡Õ¾Õ¥Õ¬Õ« Õ¿Ö€Õ¾Õ¡Õ® Õ¡Ö€ÕªÕ¥Ö„Õ¶Õ¥Ö€Õ¨ Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ¥Õ¶Ö‰ + + + This field was not expected. + Ô±ÕµÕ½ Õ¤Õ¡Õ·Õ¿Õ¨ Õ¹Õ« Õ½ÕºÕ¡Õ½Õ¾Õ¸Ö‚Õ´Ö‰ + + + This field is missing. + Ô±ÕµÕ½ Õ¤Õ¡Õ·Õ¿Õ¨ Õ¢Õ¡ÖÕ¡Õ¯Õ¡ÕµÕ¸Ö‚Õ´ Õ§Ö‰ + + + This value is not a valid date. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ½Õ­Õ¡Õ¬ Õ¡Õ´Õ½Õ¡Õ©Õ«Õ¾ Õ§Ö‰ + + + This value is not a valid datetime. + Ô±Õ´Õ½Õ¡Õ©Õ¾Õ« Ö‡ ÕªÕ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ« Õ¡Ö€ÕªÕ¥Ö„Õ¨ Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ§Ö‰ + + + This value is not a valid email address. + Ô±Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ§Õ¬ÖŠÖƒÕ¸Õ½Õ¿Õ« Õ¡Ö€ÕªÕ¥Ö„Ö‰ + + + The file could not be found. + Õ†Õ«Õ·Ö„Õ¨ Õ¹Õ« Õ£Õ¿Õ¶Õ¾Õ¥Õ¬Ö‰ + + + The file is not readable. + Õ†Õ«Õ·Ö„Õ¨ Õ¡Õ¶Õ¨Õ¶Õ©Õ¥Õ¼Õ¶Õ¥Õ¬Õ« Õ§Ö‰ + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Õ†Õ«Õ·Ö„Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ´Õ¥Õ® Õ§ ({{ size }} {{ suffix }}): Õ„Õ¡Ö„Õ½Õ«Õ´Õ¡Õ¬ Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¥Õ¬Õ« Õ¹Õ¡ÖƒÕ½Õ¨Õ {{ limit }} {{ suffix }}Ö‰ + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + MIME-Õ¿Õ¥Õ½Õ¡Õ¯Õ¨ Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ§ Õ§({{ type }}): Õ†Õ«Õ·Ö„Õ¥Ö€Õ« Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¥Õ¬Õ« MIME-Õ¿Õ¥Õ½Õ¡Õ¯Õ¶Õ¥Ö€Õ¶ Õ¥Õ¶: {{ types }}Ö‰ + + + This value should be {{ limit }} or less. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« {{ limit }} Õ¯Õ¡Õ´ ÖƒÕ¸Ö„Ö€Ö‰ + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ¥Ö€Õ¯Õ¡Ö€ Õ§: ÕŠÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« {{ limit }} Õ¯Õ¡Õ´ Õ¡Õ¾Õ¥Õ¬ Õ½Õ«Õ´Õ¾Õ¸Õ¬Õ¶Õ¥Ö€Ö‰ + + + This value should be {{ limit }} or more. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿ Õ§ Õ¬Õ«Õ¶Õ« {{ limit }} Õ¯Õ¡Õ´ Õ·Õ¡Õ¿Ö‰ + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ¯Õ¡Ö€Õ³ Õ§: ÕŠÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« {{ limit }} Õ¯Õ¡Õ´ Õ¡Õ¾Õ¥Õ¬Õ« Õ½Õ«Õ´Õ¾Õ¸Õ¬Õ¶Õ¥Ö€Ö‰ + + + This value should not be blank. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹ÕºÕ¥Õ¿Ö„ Õ§ Õ¤Õ¡Õ¿Õ¡Ö€Õ¯ Õ¬Õ«Õ¶Õ«Ö‰ + + + This value should not be null. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« nullÖ‰ + + + This value should be null. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« nullÖ‰ + + + This value is not valid. + Ô±Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ¡Ö€ÕªÕ¥Ö„Ö‰ + + + This value is not a valid time. + ÔºÕ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ« Õ¡Ö€ÕªÕ¥Ö„Õ¨ Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ§Ö‰ + + + This value is not a valid URL. + Ô±Ö€ÕªÕ¥Ö„Õ¨ URL Õ¹Õ§Ö‰ + + + The two values should be equal. + ÔµÖ€Õ¯Õ¸Ö‚ Õ¡Ö€ÕªÕ¥Ö„Õ¶Õ¥Ö€Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¶Õ¸Ö‚ÕµÕ¶Õ¨ Õ¬Õ«Õ¶Õ¥Õ¶Ö‰ + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Õ†Õ«Õ·Ö„Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ´Õ¥Õ® Õ§: Õ„Õ¡Ö„Õ½Õ«Õ´Õ¡Õ¬ Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¥Õ¬Õ« Õ¹Õ¡ÖƒÕ½Õ¨ {{ limit }} {{ suffix }} Õ§Ö‰ + + + The file is too large. + Õ†Õ«Õ·Ö„Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ´Õ¥Õ® Õ§Ö‰ + + + The file could not be uploaded. + Õ†Õ«Õ·Ö„Õ¨ Õ¹Õ« Õ¯Õ¡Ö€Õ¸Õ² Õ¢Õ¥Õ¼Õ¶Õ¾Õ¥Õ¬Ö‰ + + + This value should be a valid number. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ©Õ«Õ¾Ö‰ + + + This value is not a valid country. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ¥Ö€Õ¯Õ«Ö€Ö‰ + + + This file is not a valid image. + Õ†Õ«Õ·Ö„Õ¨ Õ¶Õ¯Õ¡Ö€Õ« Õ¾Õ¡Õ¾Õ¥Ö€ Ö†Õ¸Ö€Õ´Õ¡Õ¿ Õ¹Õ§Ö‰ + + + This is not a valid IP address. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¾Õ¡Õ¾Õ¥Ö€ IP Õ°Õ¡Õ½ÖÕ¥ Õ¹Õ§Ö‰ + + + This value is not a valid language. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¾Õ¡Õ¾Õ¥Ö€ Õ¬Õ¥Õ¦Õ¸Ö‚ Õ¹Õ§Ö‰ + + + This value is not a valid locale. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹Õ« Õ°Õ¡Õ¶Õ¤Õ«Õ½Õ¡Õ¶Õ¸Ö‚Õ´ Õ¾Õ¡Õ¾Õ¥Ö€ Õ¿Õ¥Õ²Õ¡ÕµÕ¶Õ¡ÖÕ¸Ö‚Õ´Ö‰ + + + This value is already used. + Ô±ÕµÕ¤ Õ¡Ö€ÕªÕ¥Ö„Õ¶ Õ¡Ö€Õ¤Õ¥Õ¶ Ö…Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¾Õ¸Ö‚Õ´ Õ§Ö‰ + + + The size of the image could not be detected. + Õ†Õ¯Õ¡Ö€Õ« Õ¹Õ¡ÖƒÕ½Õ¥Ö€Õ¨ Õ¹Õ½Õ¿Õ¡ÖÕ¾Õ¥Ö Õ¸Ö€Õ¸Õ·Õ¥Õ¬Ö‰ + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Õ†Õ¯Õ¡Ö€Õ« Õ¬Õ¡ÕµÕ¶Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ´Õ¥Õ® Õ§({{ width }}px). Õ„Õ¡Ö„Õ½Õ«Õ´Õ¡Õ¬ Õ¹Õ¡ÖƒÕ¶ Õ§ {{ max_width }}pxÖ‰ + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Õ†Õ¯Õ¡Ö€Õ« Õ¬Õ¡ÕµÕ¶Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö ÖƒÕ¸Ö„Ö€ Õ§ ({{ width }}px). Õ„Õ«Õ¶Õ«Õ´Õ¡Õ¬ Õ¹Õ¡ÖƒÕ¶ Õ§ {{ min_ width }}pxÖ‰ + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Õ†Õ¯Õ¡Ö€Õ« Õ¢Õ¡Ö€Õ±Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ´Õ¥Õ® Õ§ ({{ height }}px). Õ„Õ¡Ö„Õ½Õ«Õ´Õ¡Õ¬ Õ¹Õ¡ÖƒÕ¶ Õ§ {{ max_height }}pxÖ‰ + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Õ†Õ¯Õ¡Ö€Õ« Õ¢Õ¡Ö€Õ±Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö ÖƒÕ¸Ö„Ö€ Õ§ ({{ height }}px). Õ„Õ«Õ¶Õ«Õ´Õ¡Õ¬ Õ¹Õ¡ÖƒÕ¶ Õ§ {{ min_height }}pxÖ‰ + + + This value should be the user's current password. + Ô±ÕµÕ½ Õ¡Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Ö…Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¸Õ²Õ« Õ¶Õ¥Ö€Õ¯Õ¡ Õ®Õ¡Õ®Õ¯Õ¡Õ£Õ«Ö€Õ¨Ö‰ + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Ô±ÕµÕ½ Õ¡Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¸Ö‚Õ¶Õ¥Õ¶Õ¡ Õ³Õ«Õ·Õ¿ {{ limit }} Õ½Õ«Õ´Õ¾Õ¸Õ¬Õ¶Õ¥Ö€Ö‰ + + + The file was only partially uploaded. + Õ†Õ«Õ·Ö„Õ« Õ´Õ¡Õ½Õ¶Õ¡Õ¯Õ« Õ¢Õ¥Õ¼Õ¶Õ´Õ¡Õ¶ Õ½Õ­Õ¡Õ¬Ö‰ + + + No file was uploaded. + Õ†Õ«Õ·Ö„Õ¨ Õ¹Õ« Õ¢Õ¥Õ¼Õ¶Õ¾Õ¥Õ¬Ö‰ + + + No temporary folder was configured in php.ini. + php.ini Õ¶Õ«Õ·Ö„Õ¸Ö‚Õ´ ÕªÕ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ¡Õ¾Õ¸Ö€ ÕºÕ¡Õ¶Õ¡Õ¯ Õ¶Õ·Õ¾Õ¡Õ® Õ¹Õ§Ö‰ + + + Cannot write temporary file to disk. + ÔºÕ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ¡Õ¾Õ¸Ö€ Õ¶Õ«Õ·Ö„Õ¨ Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Õ£Ö€Õ¥Õ¬ Õ½Õ¯Õ¡Õ¾Õ¡Õ¼Õ¡Õ¯Õ« Õ¾Ö€Õ¡Ö‰ + + + A PHP extension caused the upload to fail. + PHP Ö†Õ¸Ö€Õ´Õ¡Õ¿Õ¨ Õ¤Õ¡Ö€Õ±Õ¥Õ¬ Õ§ Õ¢Õ¥Õ¼Õ¶Õ´Õ¡Õ¶ Õ¹Õ°Õ¡Õ»Õ¸Õ²Õ´Õ¡Õ¶ ÕºÕ¡Õ¿Õ³Õ¡Õ¼Ö‰ + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« {{ limit }} Õ¯Õ¡Õ´ Õ¡Õ¾Õ¥Õ¬Õ« Õ¿Õ¡Ö€Ö€Õ¥Ö€Ö‰|Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¥Õ¬Õ¾Õ¡Õ®Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ« limit }} Õ¿Õ¡Ö€Ö€ Õ¯Õ¡Õ´ Õ¡Õ¾Õ¥Õ¬Õ«Õ¶Ö‰|Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ« {{ limit }} Õ¿Õ¡Ö€Ö€Õ¥Ö€Õ«Õ¶ Õ¯Õ¡Õ´ Õ¡Õ¾Õ¥Õ¬Õ«Ö‰ + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« {{ limit }} Õ¿Õ¡Ö€Ö€Õ¥Ö€ Õ¯Õ¡Õ´ Ö„Õ«Õ¹Ö‰|Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« {{ limit }} Õ¿Õ¡Ö€Ö€ Õ¯Õ¡Õ´ Ö„Õ«Õ¹Ö‰|Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« {{ limit }} Õ¿Õ¡Ö€Ö€Õ¥Ö€ Õ¯Õ¡Õ´ Ö„Õ«Õ¹Ö‰ + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« Õ¸Ö‚Õ²Õ«Õ² {{ limit }} Õ¿Õ¡Ö€Ö€Ö‰|Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« Õ¸Ö‚Õ²Õ«Õ² {{ limit }} Õ¿Õ¡Ö€Ö€Õ¥Ö€Ö‰|Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« {{ limit }} Õ¿Õ¡Ö€Ö€Õ¥Ö€Ö‰ + + + Invalid card number. + Õ”Õ¡Ö€Õ¿Õ« Õ½Õ­Õ¡Õ¬ Õ°Õ¡Õ´Õ¡Ö€: + + + Unsupported card type or invalid card number. + Õ‰Õ½ÕºÕ¡Õ½Õ¡Ö€Õ¯Õ¾Õ¸Õ² Õ¯Õ¡Õ´ Õ½Õ­Õ¡Õ¬ Ö„Õ¡Ö€Õ¿Õ« Õ°Õ¡Õ´Õ¡Ö€: + + + This is not a valid International Bank Account Number (IBAN). + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¾Õ¡Õ¾Õ¥Ö€ Õ´Õ«Õ»Õ¡Õ¦Õ¡ÕµÕ«Õ¶ Õ¢Õ¡Õ¶Õ¯Õ¡ÕµÕ«Õ¶ Õ°Õ¡Õ·Õ¾Õ« Õ°Õ¡Õ´Õ¡Ö€ Õ¹Õ§ (IBAN)Ö‰ + + + This value is not a valid ISBN-10. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¸Ö‚Õ¶Õ« Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ ISBN-10 Õ±Ö‡Õ¡Õ¹Õ¡ÖƒÖ‰ + + + This value is not a valid ISBN-13. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¸Ö‚Õ¶Õ« Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ ISBN-13 Õ±Ö‡Õ¡Õ¹Õ¡ÖƒÖ‰ + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹Õ« Õ°Õ¡Õ´Õ¡ÕºÕ¡Õ¿Õ¡Õ½Õ­Õ¡Õ¶Õ¸Ö‚Õ´ ISBN-10 Ö‡ ISBN-13 Õ±Ö‡Õ¡Õ¹Õ¡ÖƒÕ¥Ö€Õ«Õ¶Ö‰ + + + This value is not a valid ISSN. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹Õ« Õ°Õ¡Õ´Õ¡ÕºÕ¡Õ½Õ¿Õ¡Õ½Õ­Õ¡Õ¶Õ¸Ö‚Õ´ ISSN Õ±Ö‡Õ¡Õ¹Õ¡ÖƒÕ«Õ¶Ö‰ + + + This value is not a valid currency. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¾Õ¡Õ¾Õ¥Ö€ Õ¿Õ¡Ö€Õ¡Õ¤Ö€Õ¡Õ´ Õ¹Õ§Ö‰ + + + This value should be equal to {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« {{ compared_value }}Ö‰ + + + This value should be greater than {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ´Õ¥Õ® Õ¬Õ«Õ¶Õ«, Ö„Õ¡Õ¶ {{ compared_value }}Ö‰ + + + This value should be greater than or equal to {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ°Õ¡Õ¾Õ¡Õ½Õ¡Ö€ Õ¯Õ¡Õ´ Õ´Õ¥Õ® Ö„Õ¡Õ¶ {{ compared_value }}Ö‰ + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ«Õ¶Õ¹ÕºÕ¥Õ½ {{ compared_value_type }} {{ compared_value }}Ö‰ + + + This value should be less than {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« ÖƒÕ¸Ö„Ö€ Ö„Õ¡Õ¶ {{ compared_value }}Ö‰ + + + This value should be less than or equal to {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« ÖƒÕ¸Ö„Ö€ Õ¯Õ¡Õ´ Õ°Õ¡Õ¾Õ¡Õ½Õ¡Ö€ {{ compared_value }}Ö‰ + + + This value should not be equal to {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ°Õ¡Õ¾Õ¡Õ½Õ¡Ö€ {{ compared_value }}Ö‰ + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ¶Õ¸Ö‚Õ¶Õ¨ {{ compared_value_type }} {{ compared_value }}: + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ« Õ¯Õ¸Õ²Õ´Õ¥Ö€Õ« Õ°Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¡Õ¯ÖÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ­Õ«Õ½Õ¿ Õ´Õ¥Õ® Õ§ ({{ ratio }}). Õ„Õ¡Ö„Õ½Õ«Õ´Õ¡Õ¬ Õ°Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¡Õ¯ÖÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨Õ {{ max_ratio }}Ö‰ + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ« Õ¯Õ¸Õ²Õ´Õ¥Ö€Õ« Õ°Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¡Õ¯ÖÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ­Õ«Õ½Õ¿ ÖƒÕ¸Ö„Ö€ Õ§ ({{ ratio }}). Õ„Õ«Õ¶Õ«Õ´Õ¡Õ¬ Õ°Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¡Õ¯ÖÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨Õ {{ min_ratio }}Ö‰ + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ¨ Ö„Õ¡Õ¼Õ¡Õ¯Õ¸Ö‚Õ½Õ« Õ§({{ width }}x{{ height }}px)Ö‰ Õ”Õ¡Õ¼Õ¡Õ¯Õ¸Ö‚Õ½Õ« Õ¶Õ¯Õ¡Ö€Õ¶Õ¥Ö€ Õ¹Õ¥Õ¶ Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¸Ö‚Õ´Ö‰ + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ¨ Õ¡Õ¬Õ¢Õ¸Õ´Õ¡ÕµÕ«Õ¶ Õ¸Ö‚Õ²Õ²Õ¾Õ¡Õ®Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ§({{ width }}x{{ height }}px)․ Õ¤Õ¡ Õ¹Õ« Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¸Ö‚Õ´Ö‰ + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ¨ ÕºÕ¸Ö€Õ¿Ö€Õ¥Õ¿Õ¡ÕµÕ«Õ¶ Õ¸Ö‚Õ²Õ²Õ¾Õ¡Õ®Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ§ ({{ width }}x{{ height }}px)․ Õ¤Õ¡ Õ¹Õ« Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¸Ö‚Õ´Ö‰ + + + An empty file is not allowed. + Ô´Õ¡Õ¿Õ¡Ö€Õ¯ Õ¶Õ«Õ·Ö„ Õ¹Õ« Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¸Ö‚Õ´Ö‰ + + + The host could not be resolved. + Õ€Õ¸Õ½Õ©Õ« Õ¡Õ¶Õ¸Ö‚Õ¶Õ¨ Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ« ÕºÕ¡Ö€Õ¦Õ¥Õ¬: + + + This value does not match the expected {{ charset }} charset. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹Õ« Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´ {{ charset }} Õ¯Õ¸Õ¤Õ¡Õ¾Õ¸Ö€Õ´Õ¡Õ¶ Õ°Õ¥Õ¿: + + + This is not a valid Business Identifier Code (BIC). + ÕÕ¡ Õ¾Õ¡Õ¾Õ¥Ö€ Business Identifier Code (BIC) Õ¹Õ§Ö‰ + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf new file mode 100644 index 0000000000000000000000000000000000000000..ce8db48639efc2ba1dc21965c08356e015da70d8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Nilai ini harus bernilai salah. + + + This value should be true. + Nilai ini harus bernilai benar. + + + This value should be of type {{ type }}. + Nilai ini harus bertipe {{ type }}. + + + This value should be blank. + Nilai ini harus kosong. + + + The value you selected is not a valid choice. + Nilai yang dipilih tidak tepat. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Anda harus memilih paling tidak {{ limit }} pilihan. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Anda harus memilih paling banyak {{ limit }} pilihan. + + + One or more of the given values is invalid. + Satu atau lebih nilai yang diberikan tidak sah. + + + This field was not expected. + Ruas ini tidak diharapkan. + + + This field is missing. + Ruas ini hilang. + + + This value is not a valid date. + Nilai ini bukan merupakan tanggal yang sah. + + + This value is not a valid datetime. + Nilai ini bukan merupakan tanggal dan waktu yang sah. + + + This value is not a valid email address. + Nilai ini bukan alamat surel yang sah. + + + The file could not be found. + Berkas tidak dapat ditemukan. + + + The file is not readable. + Berkas tidak dapat dibaca. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Ukuran berkas terlalu besar ({{ size }} {{ suffix }}). Ukuran maksimum yang diizinkan adalah {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Jenis berkas ({{ type }}) tidak sah. Jenis berkas yang diizinkan adalah {{ types }}. + + + This value should be {{ limit }} or less. + Nilai ini harus {{ limit }} atau kurang. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Nilai ini terlalu panjang. Seharusnya {{ limit }} karakter atau kurang. + + + This value should be {{ limit }} or more. + Nilai ini harus {{ limit }} atau lebih. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Nilai ini terlalu pendek. Seharusnya {{ limit }} karakter atau lebih. + + + This value should not be blank. + Nilai ini tidak boleh kosong. + + + This value should not be null. + Nilai ini tidak boleh 'null'. + + + This value should be null. + Nilai ini harus 'null'. + + + This value is not valid. + Nilai ini tidak sah. + + + This value is not a valid time. + Nilai ini bukan merupakan waktu yang sah. + + + This value is not a valid URL. + Nilai ini bukan URL yang sah. + + + The two values should be equal. + Isi keduanya harus sama. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Ukuran berkas terlalu besar. Ukuran maksimum yang diizinkan adalah {{ limit }} {{ suffix }}. + + + The file is too large. + Ukuran berkas terlalu besar. + + + The file could not be uploaded. + Berkas tidak dapat diunggah. + + + This value should be a valid number. + Nilai ini harus angka yang sah. + + + This file is not a valid image. + Berkas ini tidak termasuk citra. + + + This is not a valid IP address. + Ini bukan alamat IP yang sah. + + + This value is not a valid language. + Nilai ini bukan bahasa yang sah. + + + This value is not a valid locale. + Nilai ini bukan lokal yang sah. + + + This value is not a valid country. + Nilai ini bukan negara yang sah. + + + This value is already used. + Nilai ini sudah digunakan. + + + The size of the image could not be detected. + Ukuran dari citra tidak bisa dideteksi. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Lebar citra terlalu besar ({{ width }}px). Ukuran lebar maksimum adalah {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Lebar citra terlalu kecil ({{ width }}px). Ukuran lebar minimum yang diharapkan adalah {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Tinggi citra terlalu besar ({{ height }}px). Ukuran tinggi maksimum adalah {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Tinggi citra terlalu kecil ({{ height }}px). Ukuran tinggi minimum yang diharapkan adalah {{ min_height }}px. + + + This value should be the user's current password. + Nilai ini harus kata sandi pengguna saat ini. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Nilai ini harus memiliki tepat {{ limit }} karakter. + + + The file was only partially uploaded. + Berkas hanya terunggah sebagian. + + + No file was uploaded. + Tidak ada berkas terunggah. + + + No temporary folder was configured in php.ini. + Direktori sementara tidak dikonfiguasi pada php.ini. + + + Cannot write temporary file to disk. + Tidak dapat menuliskan berkas sementara ke dalam media penyimpanan. + + + A PHP extension caused the upload to fail. + Sebuah ekstensi PHP menyebabkan kegagalan unggah. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Kumpulan ini harus memiliki {{ limit }} elemen atau lebih. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Kumpulan ini harus memiliki kurang dari {{ limit }} elemen. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Kumpulan ini harus memiliki tepat {{ limit }} elemen. + + + Invalid card number. + Nomor kartu tidak sah. + + + Unsupported card type or invalid card number. + Jenis kartu tidak didukung atau nomor kartu tidak sah. + + + This is not a valid International Bank Account Number (IBAN). + Ini bukan Nomor Rekening Bank Internasional (IBAN) yang sah. + + + This value is not a valid ISBN-10. + Nilai ini bukan ISBN-10 yang sah. + + + This value is not a valid ISBN-13. + Nilai ini bukan ISBN-13 yang sah. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Nilai ini bukan ISBN-10 maupun ISBN-13 yang sah. + + + This value is not a valid ISSN. + Nilai ini bukan ISSN yang sah. + + + This value is not a valid currency. + Nilai ini bukan mata uang yang sah. + + + This value should be equal to {{ compared_value }}. + Nilai ini seharusnya sama dengan {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Nilai ini seharusnya lebih dari {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Nilai ini seharusnya lebih dari atau sama dengan {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Nilai ini seharusnya identik dengan {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Nilai ini seharusnya kurang dari {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Nilai ini seharusnya kurang dari atau sama dengan {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Nilai ini seharusnya tidak sama dengan {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Nilai ini seharusnya tidak identik dengan {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Rasio citra terlalu besar ({{ ratio }}). Rasio maksimum yang diizinkan adalah {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Rasio citra terlalu kecil ({{ ratio }}). Rasio minimum yang diharapkan adalah {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Citra persegi ({{ width }}x{{ height }}px). Citra persegi tidak diizinkan. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Citra berorientasi lanskap ({{ width }}x{{ height }}px). Citra berorientasi lanskap tidak diizinkan. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Citra berorientasi potret ({{ width }}x{{ height }}px). Citra berorientasi potret tidak diizinkan. + + + An empty file is not allowed. + Berkas kosong tidak diizinkan. + + + The host could not be resolved. + Host tidak dapat diselesaikan. + + + This value does not match the expected {{ charset }} charset. + Nilai ini tidak memenuhi set karakter {{ charset }} yang diharapkan. + + + This is not a valid Business Identifier Code (BIC). + Ini bukan Business Identifier Code (BIC) yang sah. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf new file mode 100644 index 0000000000000000000000000000000000000000..38e437d6cf978934d318d567ea3b493ae1b0f867 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Questo valore dovrebbe essere falso. + + + This value should be true. + Questo valore dovrebbe essere vero. + + + This value should be of type {{ type }}. + Questo valore dovrebbe essere di tipo {{ type }}. + + + This value should be blank. + Questo valore dovrebbe essere vuoto. + + + The value you selected is not a valid choice. + Questo valore dovrebbe essere una delle opzioni disponibili. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Si dovrebbe selezionare almeno {{ limit }} opzione.|Si dovrebbero selezionare almeno {{ limit }} opzioni. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Si dovrebbe selezionare al massimo {{ limit }} opzione.|Si dovrebbero selezionare al massimo {{ limit }} opzioni. + + + One or more of the given values is invalid. + Uno o più valori inseriti non sono validi. + + + This field was not expected. + Questo campo non è stato previsto. + + + This field is missing. + Questo campo è mancante. + + + This value is not a valid date. + Questo valore non è una data valida. + + + This value is not a valid datetime. + Questo valore non è una data e ora valida. + + + This value is not a valid email address. + Questo valore non è un indirizzo email valido. + + + The file could not be found. + Non è stato possibile trovare il file. + + + The file is not readable. + Il file non è leggibile. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Il file è troppo grande ({{ size }} {{ suffix }}). La dimensione massima consentita è {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Il mime type del file non è valido ({{ type }}). I tipi permessi sono {{ types }}. + + + This value should be {{ limit }} or less. + Questo valore dovrebbe essere {{ limit }} o inferiore. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Questo valore è troppo lungo. Dovrebbe essere al massimo di {{ limit }} carattere.|Questo valore è troppo lungo. Dovrebbe essere al massimo di {{ limit }} caratteri. + + + This value should be {{ limit }} or more. + Questo valore dovrebbe essere {{ limit }} o superiore. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Questo valore è troppo corto. Dovrebbe essere almeno di {{ limit }} carattere.|Questo valore è troppo corto. Dovrebbe essere almeno di {{ limit }} caratteri. + + + This value should not be blank. + Questo valore non dovrebbe essere vuoto. + + + This value should not be null. + Questo valore non dovrebbe essere nullo. + + + This value should be null. + Questo valore dovrebbe essere nullo. + + + This value is not valid. + Questo valore non è valido. + + + This value is not a valid time. + Questo valore non è un'ora valida. + + + This value is not a valid URL. + Questo valore non è un URL valido. + + + The two values should be equal. + I due valori dovrebbero essere uguali. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Il file è troppo grande. La dimensione massima è {{ limit }} {{ suffix }}. + + + The file is too large. + Il file è troppo grande. + + + The file could not be uploaded. + Il file non può essere caricato. + + + This value should be a valid number. + Questo valore dovrebbe essere un numero. + + + This file is not a valid image. + Questo file non è una immagine valida. + + + This is not a valid IP address. + Questo valore non è un indirizzo IP valido. + + + This value is not a valid language. + Questo valore non è una lingua valida. + + + This value is not a valid locale. + Questo valore non è una impostazione regionale valida. + + + This value is not a valid country. + Questo valore non è una nazione valida. + + + This value is already used. + Questo valore è già stato utilizzato. + + + The size of the image could not be detected. + La dimensione dell'immagine non può essere determinata. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + La larghezza dell'immagine è troppo grande ({{ width }}px). La larghezza massima è di {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + La larghezza dell'immagine è troppo piccola ({{ width }}px). La larghezza minima è di {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + L'altezza dell'immagine è troppo grande ({{ height }}px). L'altezza massima è di {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + L'altezza dell'immagine è troppo piccola ({{ height }}px). L'altezza minima è di {{ min_height }}px. + + + This value should be the user's current password. + Questo valore dovrebbe essere la password attuale dell'utente. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Questo valore dovrebbe contenere esattamente {{ limit }} carattere.|Questo valore dovrebbe contenere esattamente {{ limit }} caratteri. + + + The file was only partially uploaded. + Il file è stato caricato solo parzialmente. + + + No file was uploaded. + Nessun file è stato caricato. + + + No temporary folder was configured in php.ini. + Nessuna cartella temporanea è stata configurata nel php.ini. + + + Cannot write temporary file to disk. + Impossibile scrivere il file temporaneo sul disco. + + + A PHP extension caused the upload to fail. + Un'estensione PHP ha causato il fallimento del caricamento. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Questa collezione dovrebbe contenere almeno {{ limit }} elemento.|Questa collezione dovrebbe contenere almeno {{ limit }} elementi. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Questa collezione dovrebbe contenere massimo {{ limit }} elemento.|Questa collezione dovrebbe contenere massimo {{ limit }} elementi. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Questa collezione dovrebbe contenere esattamente {{ limit }} elemento.|Questa collezione dovrebbe contenere esattamente {{ limit }} elementi. + + + Invalid card number. + Numero di carta non valido. + + + Unsupported card type or invalid card number. + Tipo di carta non supportato o numero non valido. + + + This is not a valid International Bank Account Number (IBAN). + Questo valore non è un IBAN (International Bank Account Number) valido. + + + This value is not a valid ISBN-10. + Questo valore non è un codice ISBN-10 valido. + + + This value is not a valid ISBN-13. + Questo valore non è un codice ISBN-13 valido. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Questo valore non è un codice ISBN-10 o ISBN-13 valido. + + + This value is not a valid ISSN. + Questo valore non è un codice ISSN valido. + + + This value is not a valid currency. + Questo valore non è una valuta valida. + + + This value should be equal to {{ compared_value }}. + Questo valore dovrebbe essere uguale a {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Questo valore dovrebbe essere maggiore di {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Questo valore dovrebbe essere maggiore o uguale a {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Questo valore dovrebbe essere identico a {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Questo valore dovrebbe essere minore di {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Questo valore dovrebbe essere minore o uguale a {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Questo valore dovrebbe essere diverso da {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Questo valore dovrebbe essere diverso da {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Il rapporto di aspetto dell'immagine è troppo grande ({{ ratio }}). Il rapporto massimo consentito è {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Il rapporto di aspetto dell'immagine è troppo piccolo ({{ ratio }}). Il rapporto minimo consentito è {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + L'immagine è quadrata ({{ width }}x{{ height }}px). Le immagini quadrate non sono consentite. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + L'immagine è orizzontale ({{ width }}x{{ height }}px). Le immagini orizzontali non sono consentite. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + L'immagine è verticale ({{ width }}x{{ height }}px). Le immagini verticali non sono consentite. + + + An empty file is not allowed. + Un file vuoto non è consentito. + + + The host could not be resolved. + L'host non può essere risolto. + + + This value does not match the expected {{ charset }} charset. + Questo valore non corrisponde al charset {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Questo valore non è un codice BIC valido. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf new file mode 100644 index 0000000000000000000000000000000000000000..4af93fa5668b0d57abeed7fdae09b7a47669d55d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + falseã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be true. + trueã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be of type {{ type }}. + åž‹ã¯{{ type }}ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be blank. + 空ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + The value you selected is not a valid choice. + 有効ãªé¸æŠžè‚¢ã§ã¯ã‚りã¾ã›ã‚“。 + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + {{ limit }}å€‹ä»¥ä¸Šé¸æŠžã—ã¦ãã ã•ã„。 + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + {{ limit }}個以内ã§é¸æŠžã—ã¦ãã ã•ã„。 + + + One or more of the given values is invalid. + 無効ãªé¸æŠžè‚¢ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + + + This field was not expected. + ã“ã®ãƒ•ィールドã¯äºˆæœŸã•れã¦ã„ã¾ã›ã‚“ã§ã—ãŸã€‚ + + + This field is missing. + ã“ã®ãƒ•ィールドã¯ã€æ¬ è½ã—ã¦ã„ã¾ã™ã€‚ + + + This value is not a valid date. + æœ‰åŠ¹ãªæ—¥ä»˜ã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid datetime. + æœ‰åŠ¹ãªæ—¥æ™‚ã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid email address. + 有効ãªãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã¯ã‚りã¾ã›ã‚“。 + + + The file could not be found. + ファイルãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 + + + The file is not readable. + ファイルを読ã¿è¾¼ã‚ã¾ã›ã‚“。 + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + ファイルã®ã‚µã‚¤ã‚ºãŒå¤§ãã™ãŽã¾ã™({{ size }} {{ suffix }})ã€‚æœ‰åŠ¹ãªæœ€å¤§ã‚µã‚¤ã‚ºã¯{{ limit }} {{ suffix }}ã§ã™ã€‚ + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + ファイルã®MIMEタイプãŒç„¡åйã§ã™({{ type }})。有効ãªMIMEタイプã¯{{ types }}ã§ã™ã€‚ + + + This value should be {{ limit }} or less. + {{ limit }}以下ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + 値ãŒé•·ã™ãŽã¾ã™ã€‚{{ limit }}文字以内ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be {{ limit }} or more. + {{ limit }}以上ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + 値ãŒçŸ­ã™ãŽã¾ã™ã€‚{{ limit }}文字以上ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should not be blank. + 空ã§ã‚ã£ã¦ã¯ãªã‚Šã¾ã›ã‚“。 + + + This value should not be null. + nullã§ã‚ã£ã¦ã¯ãªã‚Šã¾ã›ã‚“。 + + + This value should be null. + nullã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value is not valid. + 有効ãªå€¤ã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid time. + æœ‰åŠ¹ãªæ™‚刻ã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid URL. + 有効ãªURLã§ã¯ã‚りã¾ã›ã‚“。 + + + The two values should be equal. + 2ã¤ã®å€¤ãŒåŒã˜ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + ファイルã®ã‚µã‚¤ã‚ºãŒå¤§ãã™ãŽã¾ã™ã€‚æœ‰åŠ¹ãªæœ€å¤§ã‚µã‚¤ã‚ºã¯{{ limit }} {{ suffix }}ã§ã™ã€‚ + + + The file is too large. + ファイルã®ã‚µã‚¤ã‚ºãŒå¤§ãã™ãŽã¾ã™ã€‚ + + + The file could not be uploaded. + ファイルをアップロードã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ + + + This value should be a valid number. + æœ‰åŠ¹ãªæ•°å­—ã§ã¯ã‚りã¾ã›ã‚“。 + + + This file is not a valid image. + ファイルãŒç”»åƒã§ã¯ã‚りã¾ã›ã‚“。 + + + This is not a valid IP address. + 有効ãªIPアドレスã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid language. + 有効ãªè¨€èªžåã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid locale. + 有効ãªãƒ­ã‚±ãƒ¼ãƒ«ã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid country. + 有効ãªå›½åã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is already used. + æ—¢ã«ä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚ + + + The size of the image could not be detected. + ç”»åƒã®ã‚µã‚¤ã‚ºãŒæ¤œå‡ºã§ãã¾ã›ã‚“。 + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + ç”»åƒã®å¹…ãŒå¤§ãã™ãŽã¾ã™({{ width }}ピクセル)。{{ max_width }}ピクセルã¾ã§ã«ã—ã¦ãã ã•ã„。 + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + ç”»åƒã®å¹…ãŒå°ã•ã™ãŽã¾ã™({{ width }}ピクセル)。{{ min_width }}ピクセル以上ã«ã—ã¦ãã ã•ã„。 + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + ç”»åƒã®é«˜ã•ãŒå¤§ãã™ãŽã¾ã™({{ height }}ピクセル)。{{ max_height }}ピクセルã¾ã§ã«ã—ã¦ãã ã•ã„。 + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + ç”»åƒã®é«˜ã•ãŒå°ã•ã™ãŽã¾ã™({{ height }}ピクセル)。{{ min_height }}ピクセル以上ã«ã—ã¦ãã ã•ã„。 + + + This value should be the user's current password. + ユーザーã®ç¾åœ¨ã®ãƒ‘スワードã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + ã¡ã‚‡ã†ã©{{ limit }}文字ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + The file was only partially uploaded. + ファイルã®ã‚¢ãƒƒãƒ—ロードã¯å®Œå…¨ã§ã¯ã‚りã¾ã›ã‚“。 + + + No file was uploaded. + ファイルãŒã‚¢ãƒƒãƒ—ロードã•れã¦ã„ã¾ã›ã‚“。 + + + No temporary folder was configured in php.ini. + php.iniã§ä¸€æ™‚フォルダãŒè¨­å®šã•れã¦ã„ã¾ã›ã‚“。 + + + Cannot write temporary file to disk. + ä¸€æ™‚ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ã込むã“ã¨ãŒã§ãã¾ã›ã‚“。 + + + A PHP extension caused the upload to fail. + PHPæ‹¡å¼µã«ã‚ˆã£ã¦ã‚¢ãƒƒãƒ—ロードã«å¤±æ•—ã—ã¾ã—ãŸã€‚ + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + {{ limit }}個以上ã®è¦ç´ ã‚’å«ã‚“ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + è¦ç´ ã¯{{ limit }}個ã¾ã§ã§ã™ã€‚ + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + è¦ç´ ã¯ã¡ã‚‡ã†ã©{{ limit }}個ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + Invalid card number. + 無効ãªã‚«ãƒ¼ãƒ‰ç•ªå·ã§ã™ã€‚ + + + Unsupported card type or invalid card number. + 未対応ã®ã‚«ãƒ¼ãƒ‰ç¨®é¡žåˆã¯ç„¡åйãªã‚«ãƒ¼ãƒ‰ç•ªå·ã§ã™ã€‚ + + + This is not a valid International Bank Account Number (IBAN). + 有効ãªIBANコードã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid ISBN-10. + 有効ãªISBN-10コードã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid ISBN-13. + 有効ãªISBN-13コードã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + 有効ãªISBN-10コードåˆã¯ISBN-13コードã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid ISSN. + 有効ãªISSNコードã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid currency. + 有効ãªè²¨å¹£ã§ã¯ã‚りã¾ã›ã‚“。 + + + This value should be equal to {{ compared_value }}. + {{ compared_value }}ã¨ç­‰ã—ããªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be greater than {{ compared_value }}. + {{ compared_value }}より大ãããªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be greater than or equal to {{ compared_value }}. + {{ compared_value }}以上ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + {{ compared_value_type }}ã¨ã—ã¦ã®{{ compared_value }}ã¨ç­‰ã—ããªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be less than {{ compared_value }}. + {{ compared_value }}未満ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be less than or equal to {{ compared_value }}. + {{ compared_value }}以下ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should not be equal to {{ compared_value }}. + {{ compared_value }}ã¨ç­‰ã—ãã¦ã¯ã„ã‘ã¾ã›ã‚“。 + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + {{ compared_value_type }}ã¨ã—ã¦ã®{{ compared_value }}ã¨ç­‰ã—ãã¦ã¯ã„ã‘ã¾ã›ã‚“。 + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + ç”»åƒã®ã‚¢ã‚¹ãƒšã‚¯ãƒˆæ¯”ãŒå¤§ãã™ãŽã¾ã™({{ ratio }})。{{ max_ratio }}ã¾ã§ã«ã—ã¦ãã ã•ã„。 + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + ç”»åƒã®ã‚¢ã‚¹ãƒšã‚¯ãƒˆæ¯”ãŒå°ã•ã™ãŽã¾ã™({{ ratio }})。{{ min_ratio }}以上ã«ã—ã¦ãã ã•ã„。 + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + ç”»åƒãŒæ­£æ–¹å½¢ã«ãªã£ã¦ã„ã¾ã™({{ width }}x{{ height }}ピクセル)。正方形ã®ç”»åƒã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“。 + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + ç”»åƒãŒæ¨ªå‘ãã«ãªã£ã¦ã„ã¾ã™({{ width }}x{{ height }}ピクセル)。横å‘ãã®ç”»åƒã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“。 + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + ç”»åƒãŒç¸¦å‘ãã«ãªã£ã¦ã„ã¾ã™({{ width }}x{{ height }}ピクセル)。縦å‘ãã®ç”»åƒã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“。 + + + An empty file is not allowed. + 空ã®ãƒ•ァイルã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“。 + + + The host could not be resolved. + ホストを解決ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ + + + This value does not match the expected {{ charset }} charset. + ã“ã®å€¤ã¯äºˆæœŸã•れる文字コード({{ charset }})ã¨ç•°ãªã‚Šã¾ã™ã€‚ + + + This is not a valid Business Identifier Code (BIC). + 有効ãªSWIFTコードã§ã¯ã‚りã¾ã›ã‚“。 + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf new file mode 100644 index 0000000000000000000000000000000000000000..d631797018bb8b659a514bfefe12b67aa1a3343f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Dëse Wäert sollt falsch sinn. + + + This value should be true. + Dëse Wäert sollt wouer sinn. + + + This value should be of type {{ type }}. + Dëse Wäert sollt vum Typ {{ type }} sinn. + + + This value should be blank. + Dëse Wäert sollt eidel sinn. + + + The value you selected is not a valid choice. + Dëse Wäert sollt enger vun de Wielméiglechkeeten entspriechen. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Et muss mindestens {{ limit }} Méiglechkeet ausgewielt ginn.|Et musse mindestens {{ limit }} Méiglechkeeten ausgewielt ginn. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Et dierf héchstens {{ limit }} Méiglechkeet ausgewielt ginn.|Et dierfen héchstens {{ limit }} Méiglechkeeten ausgewielt ginn. + + + One or more of the given values is invalid. + Een oder méi vun de Wäerter ass ongëlteg. + + + The fields {{ fields }} were not expected. + D'Felder {{ fields }} goufen net erwaart. + + + The fields {{ fields }} are missing. + D'Felder {{ fields }} feelen. + + + This value is not a valid date. + Dëse Wäert entsprécht kenger gëlteger Datumsangab. + + + This value is not a valid datetime. + Dëse Wäert entsprécht kenger gëlteger Datums- an Zäitangab. + + + This value is not a valid email address. + Dëse Wäert ass keng gëlteg Email-Adress. + + + The file could not be found. + De Fichier gouf net fonnt. + + + The file is not readable. + De Fichier ass net liesbar. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + De Fichier ass ze grouss ({{ size }} {{ suffix }}). Déi zougeloosse Maximalgréisst bedréit {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Den Typ vum Fichier ass ongëlteg ({{ type }}). Erlaabten Type sinn {{ types }}. + + + This value should be {{ limit }} or less. + Dëse Wäert soll méi kleng oder gläich {{ limit }} sinn. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Dës Zeecheketten ass ze laang. Se sollt héchstens {{ limit }} Zeechen hunn. + + + This value should be {{ limit }} or more. + Dëse Wäert sollt méi grouss oder gläich {{ limit }} sinn. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Dës Zeecheketten ass ze kuerz. Se sollt mindestens {{ limit }} Zeechen hunn. + + + This value should not be blank. + Dëse Wäert sollt net eidel sinn. + + + This value should not be null. + Dëst sollt keen Null-Wäert sinn. + + + This value should be null. + Dëst sollt keen Null-Wäert sinn. + + + This value is not valid. + Dëse Wäert ass net gëlteg. + + + This value is not a valid time. + Dëse Wäert entsprécht kenger gëlteger Zäitangab. + + + This value is not a valid URL. + Dëse Wäert ass keng gëlteg URL. + + + The two values should be equal. + Béid Wäerter sollten identesch sinn. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + De fichier ass ze grouss. Déi maximal Gréisst dierf {{ limit }} {{ suffix }} net depasséieren. + + + The file is too large. + De Fichier ass ze grouss. + + + The file could not be uploaded. + De Fichier konnt net eropgeluede ginn. + + + This value should be a valid number. + Dëse Wäert sollt eng gëlteg Zuel sinn. + + + This file is not a valid image. + Dëse Fichier ass kee gëltegt Bild. + + + This is not a valid IP address. + Dëst ass keng gëlteg IP-Adress. + + + This value is not a valid language. + Dëse Wäert aentsprécht kenger gëlteger Sprooch. + + + This value is not a valid locale. + Dëse Wäert entsprécht kengem gëltege Gebittsschema. + + + This value is not a valid country. + Dëse Wäert entsprécht kengem gëltege Land. + + + This value is already used. + Dëse Wäert gëtt scho benotzt. + + + The size of the image could not be detected. + D'Gréisst vum Bild konnt net detektéiert ginn. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + D'Breet vum Bild ass ze grouss ({{ width }}px). Déi erlaabte maximal Breet ass {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + D'Breet vum Bild ass ze kleng ({{ width }}px). Déi minimal Breet ass {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + D'Héicht vum Bild ass ze grouss ({{ height }}px). Déi erlaabte maximal Héicht ass {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + D'Héicht vum Bild ass ze kleng ({{ height }}px). Déi minimal Héicht ass {{ min_height }}px. + + + This value should be the user's current password. + Dëse Wäert sollt dem aktuelle Benotzerpasswuert entspriechen. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Dëse Wäert sollt exactly {{ limit }} Buschtaf hunn.|Dëse Wäert sollt exakt {{ limit }} Buschtawen hunn. + + + The file was only partially uploaded. + De Fichier gouf just deelweis eropgelueden. + + + No file was uploaded. + Et gouf kee Fichier eropgelueden. + + + No temporary folder was configured in php.ini. + Et gouf keen temporären Dossier an der php.ini konfiguréiert. + + + Cannot write temporary file to disk. + Den temporäre Fichier kann net gespäichert ginn. + + + A PHP extension caused the upload to fail. + Eng PHP-Erweiderung huet den Upload verhënnert. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Dës Sammlung sollt {{ limit }} oder méi Elementer hunn. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Dës Sammlung sollt {{ limit }} oder manner Elementer hunn. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Dës Sammlung sollt exakt {{ limit }} Element hunn.|Dës Sammlung sollt exakt {{ limit }} Elementer hunn. + + + Invalid card number. + Ongëlteg Kaartennummer. + + + Unsupported card type or invalid card number. + Net ënnerstëtzte Kaartentyp oder ongëlteg Kaartennummer. + + + This is not a valid International Bank Account Number (IBAN). + Dëst ass keng gëlteg IBAN-Kontonummer. + + + This value is not a valid ISBN-10. + Dëse Wäert ass keng gëlteg ISBN-10. + + + This value is not a valid ISBN-13. + Dëse Wäert ass keng gëlteg ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Dëse Wäert ass weder eng gëlteg ISBN-10 nach eng gëlteg ISBN-13. + + + This value is not a valid ISSN. + Dëse Wäert ass keng gëlteg ISSN. + + + This value is not a valid currency. + Dëse Wäert ass keng gëlteg Währung. + + + This value should be equal to {{ compared_value }}. + Dëse Wäert sollt {{ compared_value }} sinn. + + + This value should be greater than {{ compared_value }}. + Dëse Wäert sollt méi grouss wéi {{ compared_value }} sinn. + + + This value should be greater than or equal to {{ compared_value }}. + Dëse Wäert sollt méi grouss wéi oder gläich {{ compared_value }} sinn. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Dëse Wäert sollt identesch si mat {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Dëse Wäert sollt méi kleng wéi {{ compared_value }} sinn. + + + This value should be less than or equal to {{ compared_value }}. + Dëse Wäert sollt méi kleng wéi oder gläich {{ compared_value }} sinn. + + + This value should not be equal to {{ compared_value }}. + Dëse Wäert sollt net {{ compared_value }} sinn. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Dëse Wäert sollt net identesch si mat {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + D'Säiteverhältnis vum Bild ass ze grouss ({{ ratio }}). Den erlaabte Maximalwäert ass {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + D'Säiteverhältnis vum Bild ass ze kleng ({{ ratio }}). Den erwaarte Minimalwäert ass {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + D'Bild ass quadratesch ({{ width }}x{{ height }}px). Quadratesch Biller sinn net erlaabt. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + D'Bild ass am Queeschformat ({{ width }}x{{ height }}px). Biller am Queeschformat sinn net erlaabt. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + D'Bild ass am Héichformat ({{ width }}x{{ height }}px). Biller am Héichformat sinn net erlaabt. + + + An empty file is not allowed. + En eidele Fichier ass net erlaabt. + + + The host could not be resolved. + Den Domain-Numm konnt net opgeléist ginn. + + + This value does not match the expected {{ charset }} charset. + Dëse Wäert entsprécht net dem erwaarten Zeechesaz {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Dëst ass kee gëltege "Business Identifier Code" (BIC). + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf new file mode 100644 index 0000000000000000000000000000000000000000..a556c45f0c42f528a50f33b6742f2aebe7b50475 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf @@ -0,0 +1,307 @@ + + + + + + This value should be false. + ReikÅ¡mÄ— turi bÅ«ti neigiama. + + + This value should be true. + ReikÅ¡mÄ— turi bÅ«ti teigiama. + + + This value should be of type {{ type }}. + Å ios reikÅ¡mÄ—s tipas turi bÅ«ti {{ type }}. + + + This value should be blank. + Å i reikÅ¡mÄ— turi bÅ«ti tuÅ¡Äia. + + + The value you selected is not a valid choice. + Neteisingas pasirinkimas. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Turite pasirinkti bent {{ limit }} variantÄ….|Turite pasirinkti bent {{ limit }} variantus.|Turite pasirinkti bent {{ limit }} variantų. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Turite pasirinkti ne daugiau kaip {{ limit }} variantÄ….|Turite pasirinkti ne daugiau kaip {{ limit }} variantus.|Turite pasirinkti ne daugiau kaip {{ limit }} variantų. + + + One or more of the given values is invalid. + Viena ar daugiau įvestų reikÅ¡mių yra netinkamos. + + + This field was not expected. + Nebuvo tikimasi Å is laukas. + + + This field is missing. + Å iame lauke yra dingÄ™s. + + + This value is not a valid date. + Å i reikÅ¡mÄ— nÄ—ra data. + + + This value is not a valid datetime. + Å i reikÅ¡mÄ— nera data ir laikas. + + + This value is not a valid email address. + Å i reikÅ¡mÄ— nÄ—ra tinkamas el. paÅ¡to adresas. + + + The file could not be found. + Byla nerasta. + + + The file is not readable. + Negalima nuskaityti bylos. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Byla yra per didelÄ— ({{ size }} {{ suffix }}). Maksimalus dydis {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Netinkamas bylos tipas (mime type) ({{ type }}). Galimi bylų tipai {{ types }}. + + + This value should be {{ limit }} or less. + ReikÅ¡mÄ— turi bÅ«ti {{ limit }} arba mažiau. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Per didelis simbolių skaiÄius. Turi susidaryti iÅ¡ {{ limit }} arba mažiau simbolių.|Per didelis simbolių skaiÄius. Turi susidaryti iÅ¡ {{ limit }} arba mažiau simbolių.|Per didelis simbolių skaiÄius. Turi susidaryti iÅ¡ {{ limit }} arba mažiau simbolių. + + + This value should be {{ limit }} or more. + ReikÅ¡mÄ— turi bÅ«ti {{ limit }} arba daugiau. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Per mažas simbolių skaiÄius. Turi susidaryti iÅ¡ {{ limit }} arba daugiau simbolių.|Per mažas simbolių skaiÄius. Turi susidaryti iÅ¡ {{ limit }} arba daugiau simbolių.|Per mažas simbolių skaiÄius. Turi susidaryti iÅ¡ {{ limit }} arba daugiau simbolių. + + + This value should not be blank. + Å i reikÅ¡mÄ— negali bÅ«ti tuÅ¡Äia. + + + This value should not be null. + Å i reikÅ¡mÄ— negali bÅ«ti null. + + + This value should be null. + Å i reikÅ¡mÄ— turi bÅ«ti null. + + + This value is not valid. + Netinkama reikÅ¡mÄ—. + + + This value is not a valid time. + Å i reikÅ¡mÄ— nÄ—ra laikas. + + + This value is not a valid URL. + Å i reikÅ¡mÄ— nÄ—ra tinkamas interneto adresas. + + + The two values should be equal. + Abi reikÅ¡mÄ—s turi bÅ«ti identiÅ¡kos. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Byla yra per didelÄ—. Maksimalus dydis yra {{ limit }} {{ suffix }}. + + + The file is too large. + Byla per didelÄ—. + + + The file could not be uploaded. + Byla negali bÅ«ti įkelta. + + + This value should be a valid number. + Å i reikÅ¡mÄ— turi bÅ«ti skaiÄius. + + + This value is not a valid country. + Å i reikÅ¡mÄ— nÄ—ra tinkama Å¡alis. + + + This file is not a valid image. + Byla nÄ—ra paveikslÄ—lis. + + + This is not a valid IP address. + Å i reikÅ¡mÄ— nÄ—ra tinkamas IP adresas. + + + This value is not a valid language. + Å i reikÅ¡mÄ— nÄ—ra tinkama kalba. + + + This value is not a valid locale. + Å i reikÅ¡mÄ— nÄ—ra tinkama lokalÄ—. + + + This value is already used. + Å i reikÅ¡mÄ— jau yra naudojama. + + + The size of the image could not be detected. + Nepavyko nustatyti nuotraukos dydžio. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Nuotraukos plotis per didelis ({{ width }}px). Maksimalus leidžiamas plotis yra {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Nuotraukos plotis per mažas ({{ width }}px). Minimalus leidžiamas plotis yra {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Nuotraukos aukÅ¡tis per didelis ({{ height }}px). Maksimalus leidžiamas aukÅ¡tis yra {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Nuotraukos aukÅ¡tis per mažas ({{ height }}px). Minimalus leidžiamas aukÅ¡tis yra {{ min_height }}px. + + + This value should be the user's current password. + Å i reikÅ¡mÄ— turi sutapti su dabartiniu naudotojo slaptažodžiu. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Å i reikÅ¡mÄ— turi turÄ—ti lygiai {{ limit }} simbolį.|Å i reikÅ¡mÄ— turi turÄ—ti lygiai {{ limit }} simbolius.|Å i reikÅ¡mÄ— turi turÄ—ti lygiai {{ limit }} simbolių. + + + The file was only partially uploaded. + Failas buvo tik dalinai įkeltas. + + + No file was uploaded. + Nebuvo įkelta jokių failų. + + + No temporary folder was configured in php.ini. + NÄ—ra sukonfiguruoto jokio laikino katalogo php.ini faile. + + + Cannot write temporary file to disk. + Nepavyko iÅ¡saugoti laikino failo. + + + A PHP extension caused the upload to fail. + PHP plÄ—tinys sutrukdÄ— failo įkÄ—limÄ… ir jis nepavyko. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + SÄ…raÅ¡e turi bÅ«ti {{ limit }} arba daugiau įrašų.|SÄ…raÅ¡e turi bÅ«ti {{ limit }} arba daugiau įrašų.|SÄ…raÅ¡e turi bÅ«ti {{ limit }} arba daugiau įrašų. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + SÄ…raÅ¡e turi bÅ«ti {{ limit }} arba mažiau įrašų.|SÄ…raÅ¡e turi bÅ«ti {{ limit }} arba mažiau įrašų.|SÄ…raÅ¡e turi bÅ«ti {{ limit }} arba mažiau įrašų. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + SÄ…raÅ¡e turi bÅ«ti lygiai {{ limit }} įraÅ¡as.|SÄ…raÅ¡e turi bÅ«ti lygiai {{ limit }} įraÅ¡ai.|SÄ…raÅ¡e turi bÅ«ti lygiai {{ limit }} įrašų. + + + Invalid card number. + Klaidingas kortelÄ—s numeris. + + + Unsupported card type or invalid card number. + KortelÄ—s tipas nepalaikomas arba klaidingas kortelÄ—s numeris. + + + This is not a valid International Bank Account Number (IBAN). + Å i reiÅ¡mÄ— neatitinka tarptautinio banko sÄ…skaitos numerio formato (IBAN). + + + This value is not a valid ISBN-10. + Å i reikÅ¡mÄ— neatitinka ISBN-10 formato. + + + This value is not a valid ISBN-13. + Å i reikÅ¡mÄ— neatitinka ISBN-13 formato. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Å i reikÅ¡mÄ— neatitinka nei ISBN-10, nei ISBN-13 formato. + + + This value is not a valid ISSN. + Å i reiÅ¡mÄ— neatitinka ISSN formato. + + + This value is not a valid currency. + Netinkamas valiutos formatas. + + + This value should be equal to {{ compared_value }}. + Å i reikÅ¡mÄ— turi bÅ«ti lygi {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Å i reikÅ¡mÄ— turi bÅ«ti didesnÄ— už {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Å i reikÅ¡mÄ— turi bÅ«ti didesnÄ— už arba lygi {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Å i reikÅ¡mÄ— turi bÅ«ti identiÅ¡ka {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Å i reikÅ¡mÄ— turi bÅ«ti mažesnÄ— už {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Å i reikÅ¡mÄ— turi bÅ«ti mažesnÄ— už arba lygi {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Å i reikÅ¡mÄ— neturi bÅ«ti lygi {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Å i reikÅ¡mÄ— neturi bÅ«ti identiÅ¡ka {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Nuotraukos santykis yra per didelis ({{ ratio }}). Didžiausias leistinas santykis yra {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Nuotraukos santykis yra per mažas ({{ ratio }}). Mažiausias leistinas santykis yra {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Nuotrauka yra kvadratinÄ— ({{ width }}x{{ height }}px). KvadratinÄ—s nuotraukos nÄ—ra leistinos. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Nuotrauka orientuota į plotį ({{ width }}x{{ height }}px). Nuotraukos orientuotos į plotį nÄ—ra leistinos. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Nuotrauka orientuota į aukÅ¡tį ({{ width }}x{{ height }}px). Nuotraukos orientuotos į aukÅ¡tį nÄ—ra leistinos. + + + An empty file is not allowed. + Failas negali bÅ«ti tuÅ¡Äias. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf new file mode 100644 index 0000000000000000000000000000000000000000..2ad19cd283c1885dad1e6afe0f2c47ed0f3a18ae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf @@ -0,0 +1,315 @@ + + + + + + This value should be false. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t nepatiesai. + + + This value should be true. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t patiesai. + + + This value should be of type {{ type }}. + Å Ä«s vÄ“rtÄ«bas tipam ir jÄbÅ«t {{ type }}. + + + This value should be blank. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t tukÅ¡ai. + + + The value you selected is not a valid choice. + VÄ“rtÄ«ba, kuru jÅ«s izvÄ“lÄ“jÄties nav derÄ«ga izvÄ“le. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Jums nav jÄveic izvÄ“le.|Jums ir jÄveic vismaz {{ limit }} izvÄ“le.|Jums ir jÄveic vismaz {{ limit }} izvÄ“les. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Jums nav jÄveic izvÄ“le.|Jums ir jÄveic ne vairÄk kÄ {{ limit }} izvÄ“le.|Jums ir jÄveic ne vairÄk kÄ {{ limit }} izvÄ“les. + + + One or more of the given values is invalid. + Viena vai vairÄkas no dotajÄm vÄ“rtÄ«bÄm ir nederÄ«gas. + + + This field was not expected. + Å is lauks netika gaidÄ«ts. + + + This field is missing. + Å is lauks ir pazudis. + + + This value is not a valid date. + Å Ä« vÄ“rtÄ«ba ir nederÄ«gs datums. + + + This value is not a valid datetime. + Å Ä« vÄ“rtÄ«ba ir nederÄ«gs datums un laiks + + + This value is not a valid email address. + Å Ä« vÄ“rtÄ«ba ir nederÄ«ga e-pasta adrese. + + + The file could not be found. + Fails nav atrasts. + + + The file is not readable. + Fails nav lasÄms. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Fails ir pÄrÄk liels ({{ size }} {{ suffix }}). Atļautais maksimÄlais izmÄ“rs ir {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Faila mime tips nav derÄ«gs ({{ type }}). Atļautie mime tipi ir {{ types }}. + + + This value should be {{ limit }} or less. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t ne vairÄk kÄ {{ limit }}. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Å Ä«s vÄ“rtÄ«bas garums ir 0 rakstzÄ«mju.|Å Ä« vÄ“rtÄ«ba ir pÄrÄk gara. Tai bÅ«tu jÄbÅ«t ne vairÄk kÄ {{ limit }} rakstzÄ«mei.|Å Ä« vÄ“rtÄ«ba ir pÄrÄk gara. Tai bÅ«tu jÄbÅ«t ne vairÄk kÄ {{ limit }} rakstzÄ«mÄ“m. + + + This value should be {{ limit }} or more. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t ne mazÄk kÄ {{ limit }}. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Å Ä«s vÄ“rtÄ«bas garums ir 0 rakstzÄ«mju.|Å Ä« vÄ“rtÄ«ba ir pÄrÄk Ä«sa. Tai bÅ«tu jÄbÅ«t ne mazÄk kÄ {{ limit }} rakstzÄ«mei.|Å Ä« vÄ“rtÄ«ba ir pÄrÄk Ä«sa. Tai bÅ«tu jÄbÅ«t ne mazÄk kÄ {{ limit }} rakstzÄ«mÄ“m. + + + This value should not be blank. + Å ai vÄ“rtÄ«bai nav jÄbÅ«t tukÅ¡ai. + + + This value should not be null. + Å ai vÄ“rtÄ«bai nav jÄbÅ«t null. + + + This value should be null. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t null. + + + This value is not valid. + Å Ä« vÄ“rtÄ«ba ir nederÄ«ga. + + + This value is not a valid time. + Å Ä« vÄ“rtÄ«ba ir nederÄ«gs laiks. + + + This value is not a valid URL. + Å Ä« vÄ“rtÄ«ba ir nederÄ«gs URL. + + + The two values should be equal. + AbÄm vÄ“rtÄ«bÄm jÄbÅ«t vienÄdam. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Fails ir pÄrÄk liels. Atļautais maksimÄlais izmÄ“rs ir {{ limit }} {{ suffix }}. + + + The file is too large. + Fails ir pÄrÄk liels. + + + The file could not be uploaded. + Failu nevarÄ“ja augÅ¡upielÄdÄ“t. + + + This value should be a valid number. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t derÄ«gam skaitlim. + + + This file is not a valid image. + Å is fails nav derÄ«gs attÄ“ls. + + + This is not a valid IP address. + Å Ä« nav derÄ«ga IP adrese. + + + This value is not a valid language. + Å Ä« vÄ“rtÄ«ba nav derÄ«ga valoda. + + + This value is not a valid locale. + Å Ä« vÄ“rtÄ«ba nav derÄ«ga lokalizÄcija. + + + This value is not a valid country. + Å Ä« vÄ“rtÄ«ba nav derÄ«ga valsts. + + + This value is already used. + Å Ä« vÄ“rtÄ«ba jau tiek izmantota. + + + The size of the image could not be detected. + Nevar noteikt attÄ“la izmÄ“ru. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + AttÄ“la platums ir pÄrÄk liels ({{ width }}px). Atļautais maksimÄlais platums ir {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + AttÄ“la platums ir pÄrÄk mazs ({{ width }}px). MinimÄlais sagaidÄmais platums ir {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + AttÄ“la augstums ir pÄrÄk liels ({{ height }}px). Atļautais maksimÄlais augstums ir {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + AttÄ“la augstums ir pÄrÄk mazs ({{ height }}px). MinimÄlais sagaidÄmais augstums ir {{ min_height }}px. + + + This value should be the user's current password. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t lietotÄja paÅ¡reizÄ“jai parolei. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Å Ä«s vÄ“rtÄ«bas garums ir 0 rakstzÄ«mju.|Å ai vÄ“rtÄ«bai ir jÄbÅ«t tieÅ¡i {{ limit }} rakstzÄ«mei.|Å ai vÄ“rtÄ«bai ir jÄbÅ«t tieÅ¡i {{ limit }} rakstzÄ«mÄ“m. + + + The file was only partially uploaded. + Fails bija tikai daļēji augÅ¡upielÄdÄ“ts. + + + No file was uploaded. + Fails netika augÅ¡upielÄdÄ“ts. + + + No temporary folder was configured in php.ini. + Pagaidu mape php.ini failÄ nav nokonfigurÄ“ta. + + + Cannot write temporary file to disk. + Nevar ierakstÄ«t pagaidu failu uz diska. + + + A PHP extension caused the upload to fail. + PHP paplaÅ¡inÄjums izraisÄ«ja augÅ¡upielÄdes neizdoÅ¡anos. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Å is krÄjums satur 0 elementu.|Å im krÄjumam jÄsatur vismaz {{ limit }} elementu.|Å im krÄjumam jÄsatur vismaz {{ limit }} elementus. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Å is krÄjums satur 0 elementu.|Å im krÄjumam jÄsatur ne vairÄk kÄ {{ limit }} elementu.|Å im krÄjumam jÄsatur ne vairÄk kÄ {{ limit }} elementus. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Å is krÄjums satur 0 elementu.|Å im krÄjumam jÄsatur tieÅ¡i {{ limit }} elementu.|Å im krÄjumam jÄsatur tieÅ¡i {{ limit }} elementus. + + + Invalid card number. + NederÄ«gs kartes numurs. + + + Unsupported card type or invalid card number. + NeatbalstÄ«ts kartes tips vai nederÄ«gs kartes numurs. + + + This is not a valid International Bank Account Number (IBAN). + Å is nav derÄ«gs starptautisks banku konta numurs (IBAN). + + + This value is not a valid ISBN-10. + Å Ä« vÄ“rtÄ«ba nav derÄ«gs ISBN-10 numurs. + + + This value is not a valid ISBN-13. + Å Ä« vÄ“rtÄ«ba nav derÄ«gs ISBN-13 numurs + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Å Ä« vÄ“rtÄ«ba neatbilst ne derÄ«gam ISBN-10 numuram, ne derÄ«gm ISBN-13 numuram. + + + This value is not a valid ISSN. + Å Ä« vÄ“rtÄ«ba nav derÄ«gs ISSN numurs + + + This value is not a valid currency. + Å Ä« vÄ“rtÄ«ba nav derÄ«ga valÅ«ta + + + This value should be equal to {{ compared_value }}. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t vienÄdai ar {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t lielÄkai par {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t lielÄkai vai vienÄdai ar {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t identiskai ar {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t mazÄkai par {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + TÅ ai vÄ“rtÄ«bai ir jÄbÅ«t mazÄkai vai vienÄdai ar {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t vienÄdai ar {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Å ai vÄ“rtÄ«bai nav jÄbÅ«t identiskai ar {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + AttÄ“la attiecÄ«ba ir pÄrÄk liela ({{ ratio }}). AtļautÄ maksimÄlÄ attiecÄ«ba ir {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + AttÄ“la attiecÄ«ba ir pÄrÄk maza ({{ ratio }}). MinimÄlÄ sagaidÄmÄ attiecÄ«ba ir {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Å is attÄ“ls ir kvadrÄts ({{ width }}x{{ height }}px). KvadrÄtveida attÄ“li nav atļauti. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + AttÄ“ls ir orientÄ“ts kÄ ainava ({{ width }}x{{ height }}px). AttÄ“li, kas ir orientÄ“ti kÄ ainavas nav atļauti. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + AttÄ“ls ir orientÄ“ts kÄ portrets ({{ width }}x{{ height }}px). AttÄ“li, kas ir orientÄ“ti kÄ portreti nav atļauti. + + + An empty file is not allowed. + TukÅ¡s fails nav atļauts. + + + The host could not be resolved. + Resursdatora nosaukumu nevar atrisinÄt. + + + This value does not match the expected {{ charset }} charset. + Å Ä« vÄ“rtÄ«ba neatbilst sagaidÄmajai rakstzÄ«mju kopai {{ charset }}. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf new file mode 100644 index 0000000000000000000000000000000000000000..dfe7eebf6d53e63c7299a3041987f58616a1d665 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf @@ -0,0 +1,151 @@ + + + + + + This value should be false. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° буруу байх Ñ‘Ñтой. + + + This value should be true. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° үнÑн байх Ñ‘Ñтой. + + + This value should be of type {{ type }}. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° {{ type }} -н төрөл байх Ñ‘Ñтой. + + + This value should be blank. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° хооÑон байх Ñ‘Ñтой. + + + The value you selected is not a valid choice. + СонгоÑон утга буруу байна. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Хамгийн багадаа {{ limit }} утга ÑонгогдÑон байх Ñ‘Ñтой. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Хамгийн ихдÑÑ {{ limit }} утга Ñонгогдох боломжтой. + + + One or more of the given values is invalid. + ӨгөгдÑөн нÑг ÑÑвÑл нÑгÑÑÑ Ð¾Ð»Ð¾Ð½ утга буруу байна. + + + This field was not expected. + Ð­Ð½Ñ Ñ‚Ð°Ð»Ð±Ð°Ñ€ нь хүлÑÑгдÑж байÑан юм. + + + This field is missing. + Ð­Ð½Ñ Ñ‚Ð°Ð»Ð±Ð°Ñ€ нь алга болÑон байна. + + + This value is not a valid date. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° буруу date төрөл байна . + + + This value is not a valid datetime. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° буруу цаг төрөл байна. + + + This value is not a valid email address. + И-майл хаÑг буруу байна. + + + The file could not be found. + Файл олдÑонгүй. + + + The file is not readable. + Файл уншигдахуйц биш байна. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Файл Ñ…ÑÑ‚Ñрхий том байна ({{ size }} {{ suffix }}). Зөвшөөрөгдөх дÑÑд Ñ…ÑмжÑÑ {{ limit }} {{ suffix }} байна. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Файлын MIME-төрөл нь буруу байна ({{ type }}). Зөвшөөрөгдөх MIME-төрлүүд {{ types }}. + + + This value should be {{ limit }} or less. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° {{ limit }} юмуу ÑÑвÑл бага байна. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° Ñ…ÑÑ‚Ñрхий урт байна. {{ limit }} Ñ‚ÑмдÑгтийн урттай юмуу ÑÑвÑл бага байна. + + + This value should be {{ limit }} or more. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° {{ limit }} юмуу ÑÑвÑл их байна. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° Ñ…ÑÑ‚Ñрхий богино байна. {{ limit }} Ñ‚ÑмдÑгт ÑÑвÑл их байна. + + + This value should not be blank. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° хооÑон байж болохгүй. + + + This value should not be null. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° null байж болохгүй. + + + This value should be null. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° null байна. + + + This value is not valid. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° буруу байна. + + + This value is not a valid time. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° буруу цаг төрөл байна. + + + This value is not a valid URL. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° буруу URL байна . + + + The two values should be equal. + Хоёр утгууд ижил байх Ñ‘Ñтой. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Файл Ñ…ÑÑ‚Ñрхий том байна. Зөвшөөрөгдөх дÑÑд Ñ…ÑмжÑÑ Ð½ÑŒ {{ limit }} {{ suffix }} байна. + + + The file is too large. + Файл Ñ…ÑÑ‚Ñрхий том байна. + + + The file could not be uploaded. + Файл upload хийгдÑÑнгүй. + + + This value should be a valid number. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° зөвхөн тоо байна. + + + This value is not a valid country. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° үнÑн бодит ÑƒÐ»Ñ Ð±Ð¸Ñˆ байна. + + + This file is not a valid image. + Файл зураг биш байна. + + + This is not a valid IP address. + IP хаÑг зөв биш байна. + + + This value is not a valid language. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° үнÑн зөв Ñ…Ñл биш байна . + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..e81141f0eed8123d2bcccec397f7c208fe71f969 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf @@ -0,0 +1,315 @@ + + + + + + This value should be false. + Deze waarde moet onwaar zijn. + + + This value should be true. + Deze waarde moet waar zijn. + + + This value should be of type {{ type }}. + Deze waarde moet van het type {{ type }} zijn. + + + This value should be blank. + Deze waarde moet leeg zijn. + + + The value you selected is not a valid choice. + De geselecteerde waarde is geen geldige optie. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Selecteer ten minste {{ limit }} optie.|Selecteer ten minste {{ limit }} opties. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Selecteer maximaal {{ limit }} optie.|Selecteer maximaal {{ limit }} opties. + + + One or more of the given values is invalid. + Eén of meer van de ingegeven waarden zijn ongeldig. + + + This field was not expected. + Dit veld werd niet verwacht. + + + This field is missing. + Dit veld ontbreekt. + + + This value is not a valid date. + Deze waarde is geen geldige datum. + + + This value is not a valid datetime. + Deze waarde is geen geldige datum en tijd. + + + This value is not a valid email address. + Deze waarde is geen geldig e-mailadres. + + + The file could not be found. + Het bestand kon niet gevonden worden. + + + The file is not readable. + Het bestand is niet leesbaar. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Het bestand is te groot ({{ size }} {{ suffix }}). Toegestane maximum grootte is {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Het mime type van het bestand is ongeldig ({{ type }}). Toegestane mime types zijn {{ types }}. + + + This value should be {{ limit }} or less. + Deze waarde moet {{ limit }} of minder zijn. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Deze waarde is te lang. Hij mag maximaal {{ limit }} teken bevatten.|Deze waarde is te lang. Hij mag maximaal {{ limit }} tekens bevatten. + + + This value should be {{ limit }} or more. + Deze waarde moet {{ limit }} of meer zijn. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Deze waarde is te kort. Hij moet tenminste {{ limit }} teken bevatten.|Deze waarde is te kort. Hij moet tenminste {{ limit }} tekens bevatten. + + + This value should not be blank. + Deze waarde mag niet leeg zijn. + + + This value should not be null. + Deze waarde mag niet null zijn. + + + This value should be null. + Deze waarde moet null zijn. + + + This value is not valid. + Deze waarde is niet geldig. + + + This value is not a valid time. + Deze waarde is geen geldige tijd. + + + This value is not a valid URL. + Deze waarde is geen geldige URL. + + + The two values should be equal. + De twee waarden moeten gelijk zijn. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Het bestand is te groot. Toegestane maximum grootte is {{ limit }} {{ suffix }}. + + + The file is too large. + Het bestand is te groot. + + + The file could not be uploaded. + Het bestand kon niet worden geüpload. + + + This value should be a valid number. + Deze waarde moet een geldig getal zijn. + + + This file is not a valid image. + Dit bestand is geen geldige afbeelding. + + + This is not a valid IP address. + Dit is geen geldig IP-adres. + + + This value is not a valid language. + Deze waarde is geen geldige taal. + + + This value is not a valid locale. + Deze waarde is geen geldige locale. + + + This value is not a valid country. + Deze waarde is geen geldig land. + + + This value is already used. + Deze waarde wordt al gebruikt. + + + The size of the image could not be detected. + De grootte van de afbeelding kon niet bepaald worden. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + De afbeelding is te breed ({{ width }}px). De maximaal toegestane breedte is {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + De afbeelding is niet breed genoeg ({{ width }}px). De minimaal verwachte breedte is {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + De afbeelding is te hoog ({{ height }}px). De maximaal toegestane hoogte is {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + De afbeelding is niet hoog genoeg ({{ height }}px). De minimaal verwachte hoogte is {{ min_height }}px. + + + This value should be the user's current password. + Deze waarde moet het huidige wachtwoord van de gebruiker zijn. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Deze waarde moet exact {{ limit }} teken lang zijn.|Deze waarde moet exact {{ limit }} tekens lang zijn. + + + The file was only partially uploaded. + Het bestand is slechts gedeeltelijk geüpload. + + + No file was uploaded. + Er is geen bestand geüpload. + + + No temporary folder was configured in php.ini. + Er is geen tijdelijke map geconfigureerd in php.ini, of de gespecificeerde map bestaat niet. + + + Cannot write temporary file to disk. + Kan het tijdelijke bestand niet wegschrijven op disk. + + + A PHP extension caused the upload to fail. + De upload is mislukt vanwege een PHP-extensie. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Deze collectie moet {{ limit }} element of meer bevatten.|Deze collectie moet {{ limit }} elementen of meer bevatten. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Deze collectie moet {{ limit }} element of minder bevatten.|Deze collectie moet {{ limit }} elementen of minder bevatten. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Deze collectie moet exact {{ limit }} element bevatten.|Deze collectie moet exact {{ limit }} elementen bevatten. + + + Invalid card number. + Ongeldig creditcardnummer. + + + Unsupported card type or invalid card number. + Niet-ondersteund type creditcard of ongeldig nummer. + + + This is not a valid International Bank Account Number (IBAN). + Dit is geen geldig internationaal bankrekeningnummer (IBAN). + + + This value is not a valid ISBN-10. + Deze waarde is geen geldige ISBN-10. + + + This value is not a valid ISBN-13. + Deze waarde is geen geldige ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Deze waarde is geen geldige ISBN-10 of ISBN-13 waarde. + + + This value is not a valid ISSN. + Deze waarde is geen geldige ISSN waarde. + + + This value is not a valid currency. + Deze waarde is geen geldige valuta. + + + This value should be equal to {{ compared_value }}. + Deze waarde moet gelijk zijn aan {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Deze waarde moet groter zijn dan {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Deze waarde moet groter dan of gelijk aan {{ compared_value }} zijn. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Deze waarde moet identiek zijn aan {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Deze waarde moet minder zijn dan {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Deze waarde moet minder dan of gelijk aan {{ compared_value }} zijn. + + + This value should not be equal to {{ compared_value }}. + Deze waarde mag niet gelijk zijn aan {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Deze waarde mag niet identiek zijn aan {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + De afbeeldingsverhouding is te groot ({{ ratio }}). Maximale verhouding is {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + De afbeeldingsverhouding is te klein ({{ ratio }}). Minimale verhouding is {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + De afbeelding is vierkant ({{ width }}x{{ height }}px). Vierkante afbeeldingen zijn niet toegestaan. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + De afbeelding is liggend ({{ width }}x{{ height }}px). Liggende afbeeldingen zijn niet toegestaan. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + De afbeelding is staand ({{ width }}x{{ height }}px). Staande afbeeldingen zijn niet toegestaan. + + + An empty file is not allowed. + Lege bestanden zijn niet toegestaan. + + + This value does not match the expected {{ charset }} charset. + Deze waarde is niet in de verwachte tekencodering {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Dit is geen geldige bedrijfsidentificatiecode (BIC/SWIFT). + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf new file mode 100644 index 0000000000000000000000000000000000000000..ea01c63ee4aa40dfa381f3bb27fb909de8202a2a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf @@ -0,0 +1,227 @@ + + + + + + This value should be false. + Verdien skulle ha vore tom/nei. + + + This value should be true. + Verdien skulla ha vore satt/ja. + + + This value should be of type {{ type }}. + Verdien mÃ¥ vere av typen {{ type }}. + + + This value should be blank. + Verdien skal vere blank. + + + The value you selected is not a valid choice. + Verdien du valgte er ikkje gyldig. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Du mÃ¥ velge minst {{ limit }} valg. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Du kan maksimalt gjere {{ limit }} valg. + + + One or more of the given values is invalid. + Ein eller fleire av dei opplyste verdiane er ugyldige. + + + This field was not expected. + Dette feltet var ikke forventet. + + + This field is missing. + Dette feltet mangler. + + + This value is not a valid date. + Verdien er ikkje ein gyldig dato. + + + This value is not a valid datetime. + Verdien er ikkje ein gyldig dato og tid. + + + This value is not a valid email address. + Verdien er ikkje ei gyldig e-postadresse. + + + The file could not be found. + Fila kunne ikkje finnes. + + + The file is not readable. + Fila kan ikkje lesast. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Fila er for stor ({{ size }} {{ suffix }}). Tillatt maksimal størrelse er {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mime-typen av fila er ugyldig ({{ type }}). Tillatte mime-typar er {{ types }}. + + + This value should be {{ limit }} or less. + Verdien mÃ¥ vere {{ limit }} eller mindre. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Verdien er for lang. Den mÃ¥ vere {{ limit }} bokstavar eller mindre. + + + This value should be {{ limit }} or more. + Verdien mÃ¥ vere {{ limit }} eller meir. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Verdien er for kort. Den mÃ¥ ha {{ limit }} teikn eller fleire. + + + This value should not be blank. + Verdien mÃ¥ ikkje vere blank. + + + This value should not be null. + Verdien mÃ¥ ikkje vere tom (null). + + + This value should be null. + Verdien mÃ¥ vere tom (null). + + + This value is not valid. + Verdien er ikkje gyldig. + + + This value is not a valid time. + Verdien er ikkje gyldig tidseining. + + + This value is not a valid URL. + Verdien er ikkje ein gyldig URL. + + + The two values should be equal. + Dei to verdiane mÃ¥ vere like. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Fila er for stor. Den maksimale storleik er {{ limit }} {{ suffix }}. + + + The file is too large. + Fila er for stor. + + + The file could not be uploaded. + Fila kunne ikkje bli lasta opp. + + + This value should be a valid number. + Verdien mÃ¥ vere eit gyldig tal. + + + This file is not a valid image. + Fila er ikkje eit gyldig bilete. + + + This is not a valid IP address. + Dette er ikkje ei gyldig IP-adresse. + + + This value is not a valid language. + Verdien er ikkje eit gyldig sprÃ¥k. + + + This value is not a valid locale. + Verdien er ikkje ein gyldig lokalitet (sprÃ¥k/region). + + + This value is not a valid country. + Verdien er ikkje eit gyldig land. + + + This value is already used. + Verdien er allereie i bruk. + + + The size of the image could not be detected. + Storleiken pÃ¥ biletet kunne ikkje oppdagast. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Biletbreidda er for stor, ({{ width }} pikslar). Tillatt maksimumsbreidde er {{ max_width }} pikslar. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Biletbreidda er for liten, ({{ width }} pikslar). Forventa minimumsbreidde er {{ min_width }} pikslar. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Bilethøgda er for stor, ({{ height }} pikslar). Tillatt maksimumshøgde er {{ max_height }} pikslar. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Billethøgda er for lÃ¥g, ({{ height }} pikslar). Forventa minimumshøgde er {{ min_height }} pikslar. + + + This value should be the user's current password. + Verdien mÃ¥ vere brukaren sitt noverande passord. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Verdien mÃ¥ vere nøyaktig {{ limit }} teikn. + + + The file was only partially uploaded. + Fila vart kun delvis opplasta. + + + No file was uploaded. + Inga fil vart lasta opp. + + + No temporary folder was configured in php.ini. + Førebels mappe (tmp) er ikkje konfigurert i php.ini. + + + Cannot write temporary file to disk. + Kan ikkje skrive førebels fil til disk. + + + A PHP extension caused the upload to fail. + Ei PHP-udviding forÃ¥rsaka feil under opplasting. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Denne samlinga mÃ¥ innehalde {{ limit }} element eller meir.|Denne samlinga mÃ¥ innehalde {{ limit }} element eller meir. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Denne samlinga mÃ¥ innehalde {{ limit }} element eller færre.|Denne samlinga mÃ¥ innehalde {{ limit }} element eller færre. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Denne samlinga mÃ¥ innehalde nøyaktig {{ limit }} element.|Denne samlinga mÃ¥ innehalde nøyaktig {{ limit }} element. + + + Invalid card number. + Ugyldig kortnummer. + + + Unsupported card type or invalid card number. + Korttypen er ikkje støtta eller ugyldig kortnummer. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf new file mode 100644 index 0000000000000000000000000000000000000000..250576531cfe4b7c8855649f7c5784edafdd8ffa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Verdien mÃ¥ være usann. + + + This value should be true. + Verdien mÃ¥ være sann. + + + This value should be of type {{ type }}. + Verdien skal ha typen {{ type }}. + + + This value should be blank. + Verdien skal være blank. + + + The value you selected is not a valid choice. + Den valgte verdien er ikke gyldig. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Du mÃ¥ velge minst {{ limit }} valg. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Du kan maks velge {{ limit }} valg. + + + One or more of the given values is invalid. + En eller flere av de oppgitte verdiene er ugyldige. + + + This field was not expected. + Dette feltet var ikke forventet. + + + This field is missing. + Dette feltet mangler. + + + This value is not a valid date. + Verdien er ikke en gyldig dato. + + + This value is not a valid datetime. + Verdien er ikke en gyldig dato/tid. + + + This value is not a valid email address. + Verdien er ikke en gyldig e-postadresse. + + + The file could not be found. + Filen kunne ikke finnes. + + + The file is not readable. + Filen er ikke lesbar. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Filen er for stor ({{ size }} {{ suffix }}). Tilatte maksimale størrelse {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mimetypen av filen er ugyldig ({{ type }}). Tilatte mimetyper er {{ types }}. + + + This value should be {{ limit }} or less. + Verdien mÃ¥ være {{ limit }} tegn lang eller mindre. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Verdien er for lang. Den mÃ¥ ha {{ limit }} tegn eller mindre. + + + This value should be {{ limit }} or more. + Verdien mÃ¥ være {{ limit }} eller mer. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Verdien er for kort. Den mÃ¥ ha {{ limit }} tegn eller flere. + + + This value should not be blank. + Verdien kan ikke være blank. + + + This value should not be null. + Verdien kan ikke være tom (null). + + + This value should be null. + Verdien skal være tom (null). + + + This value is not valid. + Verdien er ugyldig. + + + This value is not a valid time. + Verdien er ikke en gyldig tid. + + + This value is not a valid URL. + Verdien er ikke en gyldig URL. + + + The two values should be equal. + Verdiene skal være identiske. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Filen er for stor. Den maksimale størrelsen er {{ limit }} {{ suffix }}. + + + The file is too large. + Filen er for stor. + + + The file could not be uploaded. + Filen kunne ikke lastes opp. + + + This value should be a valid number. + Verdien skal være et gyldig tall. + + + This file is not a valid image. + Denne filen er ikke et gyldig bilde. + + + This is not a valid IP address. + Dette er ikke en gyldig IP adresse. + + + This value is not a valid language. + Verdien er ikke et gyldig sprÃ¥k. + + + This value is not a valid locale. + Verdien er ikke en gyldig lokalitet. + + + This value is not a valid country. + Verdien er ikke et gyldig navn pÃ¥ land. + + + This value is already used. + Verdien er allerede brukt. + + + The size of the image could not be detected. + Bildestørrelsen kunne ikke oppdages. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Bildebredden er for stor ({{ width }} piksler). Tillatt maksimumsbredde er {{ max_width }} piksler. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Bildebredden er for liten ({{ width }} piksler). Forventet minimumsbredde er {{ min_width }} piksler. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Bildehøyden er for stor ({{ height }} piksler). Tillatt maksimumshøyde er {{ max_height }} piksler. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Bildehøyden er for liten ({{ height }} piksler). Forventet minimumshøyde er {{ min_height }} piksler. + + + This value should be the user's current password. + Verdien skal være brukerens sitt nÃ¥værende passord. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Verdien skal være nøyaktig {{ limit }} tegn. + + + The file was only partially uploaded. + Filen var kun delvis opplastet. + + + No file was uploaded. + Ingen fil var lastet opp. + + + No temporary folder was configured in php.ini. + Den midlertidige mappen (tmp) er ikke konfigurert i php.ini. + + + Cannot write temporary file to disk. + Kan ikke skrive midlertidig fil til disk. + + + A PHP extension caused the upload to fail. + En PHP-utvidelse forÃ¥rsaket en feil under opplasting. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Denne samlingen mÃ¥ inneholde {{ limit }} element eller flere.|Denne samlingen mÃ¥ inneholde {{ limit }} elementer eller flere. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Denne samlingen mÃ¥ inneholde {{ limit }} element eller færre.|Denne samlingen mÃ¥ inneholde {{ limit }} elementer eller færre. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Denne samlingen mÃ¥ inneholde nøyaktig {{ limit }} element.|Denne samlingen mÃ¥ inneholde nøyaktig {{ limit }} elementer. + + + Invalid card number. + Ugyldig kortnummer. + + + Unsupported card type or invalid card number. + Korttypen er ikke støttet eller kortnummeret er ugyldig. + + + This is not a valid International Bank Account Number (IBAN). + Dette er ikke et gyldig IBAN-nummer. + + + This value is not a valid ISBN-10. + Verdien er ikke en gyldig ISBN-10. + + + This value is not a valid ISBN-13. + Verdien er ikke en gyldig ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Verdien er hverken en gyldig ISBN-10 eller ISBN-13. + + + This value is not a valid ISSN. + Verdien er ikke en gyldig ISSN. + + + This value is not a valid currency. + Verdien er ikke gyldig valuta. + + + This value should be equal to {{ compared_value }}. + Verdien skal være lik {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Verdien skal være større enn {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Verdien skal være større enn eller lik {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Verdien skal være identisk med {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Verdien skal være mindre enn {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Verdien skal være mindre enn eller lik {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Verdien skal ikke være lik {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Verdien skal ikke være identisk med {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Bildeforholdet er for stort ({{ ratio }}). Tillatt bildeforhold er maks {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Bildeforholdet er for lite ({{ ratio }}). Forventet bildeforhold er minst {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Bildet er en kvadrat ({{ width }}x{{ height }}px). Kvadratiske bilder er ikke tillatt. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Bildet er i liggende retning ({{ width }}x{{ height }}px). Bilder i liggende retning er ikke tillatt. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Bildet er i stÃ¥ende retning ({{ width }}x{{ height }}px). Bilder i stÃ¥ende retning er ikke tillatt. + + + An empty file is not allowed. + Tomme filer er ikke tilatt. + + + The host could not be resolved. + Vertsnavn kunne ikke løses. + + + This value does not match the expected {{ charset }} charset. + Verdien samsvarer ikke med forventet tegnsett {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Dette er ikke en gyldig BIC. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..d364eba937e8d4c30054a7e89b8ab6b5b987811f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Ta wartość powinna być faÅ‚szem. + + + This value should be true. + Ta wartość powinna być prawdÄ…. + + + This value should be of type {{ type }}. + Ta wartość powinna być typu {{ type }}. + + + This value should be blank. + Ta wartość powinna być pusta. + + + The value you selected is not a valid choice. + Ta wartość powinna być jednÄ… z podanych opcji. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + PowinieneÅ› wybrać co najmniej {{ limit }} opcjÄ™.|PowinieneÅ› wybrać co najmniej {{ limit }} opcje.|PowinieneÅ› wybrać co najmniej {{ limit }} opcji. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + PowinieneÅ› wybrać maksymalnie {{ limit }} opcjÄ™.|PowinieneÅ› wybrać maksymalnie {{ limit }} opcje.|PowinieneÅ› wybrać maksymalnie {{ limit }} opcji. + + + One or more of the given values is invalid. + Jedna lub wiÄ™cej z podanych wartoÅ›ci jest nieprawidÅ‚owa. + + + This field was not expected. + Tego pola siÄ™ nie spodziewano. + + + This field is missing. + Tego pola brakuje. + + + This value is not a valid date. + Ta wartość nie jest prawidÅ‚owÄ… datÄ…. + + + This value is not a valid datetime. + Ta wartość nie jest prawidÅ‚owÄ… datÄ… i czasem. + + + This value is not a valid email address. + Ta wartość nie jest prawidÅ‚owym adresem email. + + + The file could not be found. + Plik nie mógÅ‚ zostać odnaleziony. + + + The file is not readable. + Nie można odczytać pliku. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Plik jest za duży ({{ size }} {{ suffix }}). Maksymalny dozwolony rozmiar to {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + NieprawidÅ‚owy typ mime pliku ({{ type }}). Dozwolone typy mime to {{ types }}. + + + This value should be {{ limit }} or less. + Ta wartość powinna wynosić {{ limit }} lub mniej. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ta wartość jest zbyt dÅ‚uga. Powinna mieć {{ limit }} lub mniej znaków.|Ta wartość jest zbyt dÅ‚uga. Powinna mieć {{ limit }} lub mniej znaków.|Ta wartość jest zbyt dÅ‚uga. Powinna mieć {{ limit }} lub mniej znaków. + + + This value should be {{ limit }} or more. + Ta wartość powinna wynosić {{ limit }} lub wiÄ™cej. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ta wartość jest zbyt krótka. Powinna mieć {{ limit }} lub wiÄ™cej znaków.|Ta wartość jest zbyt krótka. Powinna mieć {{ limit }} lub wiÄ™cej znaków.|Ta wartość jest zbyt krótka. Powinna mieć {{ limit }} lub wiÄ™cej znaków. + + + This value should not be blank. + Ta wartość nie powinna być pusta. + + + This value should not be null. + Ta wartość nie powinna być nullem. + + + This value should be null. + Ta wartość powinna być nullem. + + + This value is not valid. + Ta wartość jest nieprawidÅ‚owa. + + + This value is not a valid time. + Ta wartość nie jest prawidÅ‚owym czasem. + + + This value is not a valid URL. + Ta wartość nie jest prawidÅ‚owym adresem URL. + + + The two values should be equal. + Obie wartoÅ›ci powinny być równe. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Plik jest za duży. Maksymalny dozwolony rozmiar to {{ limit }} {{ suffix }}. + + + The file is too large. + Plik jest za duży. + + + The file could not be uploaded. + Plik nie mógÅ‚ być wgrany. + + + This value should be a valid number. + Ta wartość powinna być prawidÅ‚owÄ… liczbÄ…. + + + This file is not a valid image. + Ten plik nie jest obrazem. + + + This is not a valid IP address. + To nie jest prawidÅ‚owy adres IP. + + + This value is not a valid language. + Ta wartość nie jest prawidÅ‚owym jÄ™zykiem. + + + This value is not a valid locale. + Ta wartość nie jest prawidÅ‚owÄ… lokalizacjÄ…. + + + This value is not a valid country. + Ta wartość nie jest prawidÅ‚owÄ… nazwÄ… kraju. + + + This value is already used. + Ta wartość jest już wykorzystywana. + + + The size of the image could not be detected. + Nie można wykryć rozmiaru obrazka. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Szerokość obrazka jest zbyt duża ({{ width }}px). Maksymalna dopuszczalna szerokość to {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Szerokość obrazka jest zbyt maÅ‚a ({{ width }}px). Oczekiwana minimalna szerokość to {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Wysokość obrazka jest zbyt duża ({{ height }}px). Maksymalna dopuszczalna wysokość to {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Wysokość obrazka jest zbyt maÅ‚a ({{ height }}px). Oczekiwana minimalna wysokość to {{ min_height }}px. + + + This value should be the user's current password. + Ta wartość powinna być aktualnym hasÅ‚em użytkownika. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Ta wartość powinna mieć dokÅ‚adnie {{ limit }} znak.|Ta wartość powinna mieć dokÅ‚adnie {{ limit }} znaki.|Ta wartość powinna mieć dokÅ‚adnie {{ limit }} znaków. + + + The file was only partially uploaded. + Plik zostaÅ‚ wgrany tylko częściowo. + + + No file was uploaded. + Å»aden plik nie zostaÅ‚ wgrany. + + + No temporary folder was configured in php.ini. + Nie skonfigurowano folderu tymczasowego w php.ini, lub skonfigurowany folder nie istnieje. + + + Cannot write temporary file to disk. + Nie można zapisać pliku tymczasowego na dysku. + + + A PHP extension caused the upload to fail. + Rozszerzenie PHP spowodowaÅ‚o błąd podczas wgrywania. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ten zbiór powinien zawierać {{ limit }} lub wiÄ™cej elementów. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ten zbiór powinien zawierać {{ limit }} lub mniej elementów. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ten zbiór powinien zawierać dokÅ‚adnie {{ limit }} element.|Ten zbiór powinien zawierać dokÅ‚adnie {{ limit }} elementy.|Ten zbiór powinien zawierać dokÅ‚adnie {{ limit }} elementów. + + + Invalid card number. + NieprawidÅ‚owy numer karty. + + + Unsupported card type or invalid card number. + NieobsÅ‚ugiwany rodzaj karty lub nieprawidÅ‚owy numer karty. + + + This is not a valid International Bank Account Number (IBAN). + NieprawidÅ‚owy miÄ™dzynarodowy numer rachunku bankowego (IBAN). + + + This value is not a valid ISBN-10. + Ta wartość nie jest prawidÅ‚owym numerem ISBN-10. + + + This value is not a valid ISBN-13. + Ta wartość nie jest prawidÅ‚owym numerem ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ta wartość nie jest prawidÅ‚owym numerem ISBN-10 ani ISBN-13. + + + This value is not a valid ISSN. + Ta wartość nie jest prawidÅ‚owym numerem ISSN. + + + This value is not a valid currency. + Ta wartość nie jest prawidÅ‚owÄ… walutÄ…. + + + This value should be equal to {{ compared_value }}. + Ta wartość powinna być równa {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ta wartość powinna być wiÄ™ksza niż {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ta wartość powinna być wiÄ™ksza bÄ…dź równa {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ta wartość powinna być identycznego typu {{ compared_value_type }} oraz wartoÅ›ci {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ta wartość powinna być mniejsza niż {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ta wartość powinna być mniejsza bÄ…dź równa {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ta wartość nie powinna być równa {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ta wartość nie powinna być identycznego typu {{ compared_value_type }} oraz wartoÅ›ci {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Proporcje obrazu sÄ… zbyt duże ({{ ratio }}). Maksymalne proporcje to {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Proporcje obrazu sÄ… zbyt maÅ‚e ({{ ratio }}). Minimalne proporcje to {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Obraz jest kwadratem ({{ width }}x{{ height }}px). Kwadratowe obrazy nie sÄ… akceptowane. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Obraz jest panoramiczny ({{ width }}x{{ height }}px). Panoramiczne zdjÄ™cia nie sÄ… akceptowane. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Obraz jest portretowy ({{ width }}x{{ height }}px). Portretowe zdjÄ™cia nie sÄ… akceptowane. + + + An empty file is not allowed. + Plik nie może być pusty. + + + The host could not be resolved. + Nazwa hosta nie zostaÅ‚a rozpoznana. + + + This value does not match the expected {{ charset }} charset. + Ta wartość nie pasuje do oczekiwanego zestawu znaków {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Ta wartość nie jest poprawnym kodem BIC (Business Identifier Code). + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf new file mode 100644 index 0000000000000000000000000000000000000000..d563c921cb90b87ec557809a09fe517e8882b6ec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf @@ -0,0 +1,307 @@ + + + + + + This value should be false. + Este valor deveria ser falso. + + + This value should be true. + Este valor deveria ser verdadeiro. + + + This value should be of type {{ type }}. + Este valor deveria ser do tipo {{ type }}. + + + This value should be blank. + Este valor deveria ser vazio. + + + The value you selected is not a valid choice. + O valor selecionado não é uma opção válida. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Você deveria selecionar {{ limit }} opção no mínimo.|Você deveria selecionar {{ limit }} opções no mínimo. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Você deve selecionar, no máximo {{ limit }} opção.|Você deve selecionar, no máximo {{ limit }} opções. + + + One or more of the given values is invalid. + Um ou mais dos valores introduzidos não são válidos. + + + This field was not expected. + Este campo não era esperado. + + + This field is missing. + Este campo está faltando. + + + This value is not a valid date. + Este valor não é uma data válida. + + + This value is not a valid datetime. + Este valor não é uma data-hora válida. + + + This value is not a valid email address. + Este valor não é um endereço de e-mail válido. + + + The file could not be found. + O arquivo não pôde ser encontrado. + + + The file is not readable. + O arquivo não pôde ser lido. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + O arquivo é muito grande ({{ size }} {{ suffix }}). O tamanho máximo permitido é de {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + O tipo mime do arquivo é inválido ({{ type }}). Os tipos mime permitidos são {{ types }}. + + + This value should be {{ limit }} or less. + Este valor deveria ser {{ limit }} ou menor. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + O valor é muito longo. Deveria ter {{ limit }} caracteres ou menos. + + + This value should be {{ limit }} or more. + Este valor deveria ser {{ limit }} ou mais. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + O valor é muito curto. Deveria de ter {{ limit }} caractere ou mais.|O valor é muito curto. Deveria de ter {{ limit }} caracteres ou mais. + + + This value should not be blank. + Este valor não deveria ser branco/vazio. + + + This value should not be null. + Este valor não deveria ser nulo. + + + This value should be null. + Este valor deveria ser nulo. + + + This value is not valid. + Este valor não é válido. + + + This value is not a valid time. + Este valor não é uma hora válida. + + + This value is not a valid URL. + Este valor não é um URL válido. + + + The two values should be equal. + Os dois valores deveriam ser iguais. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + O arquivo é muito grande. O tamanho máximo permitido é de {{ limit }} {{ suffix }}. + + + The file is too large. + O ficheiro é muito grande. + + + The file could not be uploaded. + Não foi possível carregar o ficheiro. + + + This value should be a valid number. + Este valor deveria de ser um número válido. + + + This file is not a valid image. + Este ficheiro não é uma imagem. + + + This is not a valid IP address. + Este endereço de IP não é válido. + + + This value is not a valid language. + Este valor não é uma linguagem válida. + + + This value is not a valid locale. + Este valor não é um 'locale' válido. + + + This value is not a valid country. + Este valor não é um País válido. + + + This value is already used. + Este valor já está a ser usado. + + + The size of the image could not be detected. + O tamanho da imagem não foi detetado. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + A largura da imagem ({{ width }}px) é muito grande. A largura máxima da imagem é: {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + A largura da imagem ({{ width }}px) é muito pequena. A largura miníma da imagem é de: {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + A altura da imagem ({{ height }}px) é muito grande. A altura máxima da imagem é de: {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + A altura da imagem ({{ height }}px) é muito pequena. A altura miníma da imagem é de: {{ min_height }}px. + + + This value should be the user's current password. + Este valor deveria de ser a password atual do utilizador. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Este valor tem de ter exatamente {{ limit }} carateres. + + + The file was only partially uploaded. + Só foi enviado parte do ficheiro. + + + No file was uploaded. + Nenhum ficheiro foi enviado. + + + No temporary folder was configured in php.ini. + Não existe nenhum directório temporária configurado no ficheiro php.ini. + + + Cannot write temporary file to disk. + Não foi possível escrever ficheiros temporários no disco. + + + A PHP extension caused the upload to fail. + Uma extensão PHP causou a falha no envio. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Esta coleção deve conter {{ limit }} elemento ou mais.|Esta coleção deve conter {{ limit }} elementos ou mais. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Esta coleção deve conter {{ limit }} elemento ou menos.|Esta coleção deve conter {{ limit }} elementos ou menos. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Esta coleção deve conter exatamente {{ limit }} elemento.|Esta coleção deve conter exatamente {{ limit }} elementos. + + + Invalid card number. + Número de cartão inválido. + + + Unsupported card type or invalid card number. + Tipo de cartão não suportado ou número de cartão inválido. + + + This is not a valid International Bank Account Number (IBAN). + Este não é um Número Internacional de Conta Bancária (IBAN) válido. + + + This value is not a valid ISBN-10. + Este valor não é um ISBN-10 válido. + + + This value is not a valid ISBN-13. + Este valor não é um ISBN-13 válido. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Este valor não é um ISBN-10 ou ISBN-13 válido. + + + This value is not a valid ISSN. + Este valor não é um ISSN válido. + + + This value is not a valid currency. + Este não é um valor monetário válido. + + + This value should be equal to {{ compared_value }}. + Este valor deve ser igual a {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Este valor deve ser superior a {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Este valor deve ser igual ou superior a {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Este valor deve ser idêntico a {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Este valor deve ser inferior a {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Este valor deve ser igual ou inferior a {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Este valor não deve ser igual a {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Este valor não deve ser idêntico a {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + O formato da imagem é muito grande ({{ ratio }}). O formato máximo é {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + O formato da imagem é muito pequeno ({{ ratio }}). O formato mínimo esperado é {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + A imagem é um quadrado ({{ width }}x{{ height }}px). Imagens quadradas não são permitidas. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + A imagem está orientada à paisagem ({{ width }}x{{ height }}px). Imagens orientadas à paisagem não são permitidas. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + A imagem está orientada ao retrato ({{ width }}x{{ height }}px). Imagens orientadas ao retrato não são permitidas. + + + An empty file is not allowed. + Ficheiro vazio não é permitido. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf new file mode 100644 index 0000000000000000000000000000000000000000..b61706231887f27c0641a963f257aa7a30eedf19 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Este valor deve ser falso. + + + This value should be true. + Este valor deve ser verdadeiro. + + + This value should be of type {{ type }}. + Este valor deve ser do tipo {{ type }}. + + + This value should be blank. + Este valor deve ser vazio. + + + The value you selected is not a valid choice. + O valor selecionado não é uma opção válida. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Você deve selecionar, no mínimo, {{ limit }} opção.|Você deve selecionar, no mínimo, {{ limit }} opções. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Você deve selecionar, no máximo, {{ limit }} opção.|Você deve selecionar, no máximo, {{ limit }} opções. + + + One or more of the given values is invalid. + Um ou mais valores informados são inválidos. + + + This field was not expected. + Este campo não era esperado. + + + This field is missing. + Este campo está ausente. + + + This value is not a valid date. + Este valor não é uma data válida. + + + This value is not a valid datetime. + Este valor não é uma data e hora válida. + + + This value is not a valid email address. + Este valor não é um endereço de e-mail válido. + + + The file could not be found. + O arquivo não foi encontrado. + + + The file is not readable. + O arquivo não pode ser lido. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + O arquivo é muito grande ({{ size }} {{ suffix }}). O tamanho máximo permitido é {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + O tipo mime do arquivo é inválido ({{ type }}). Os tipos mime permitidos são {{ types }}. + + + This value should be {{ limit }} or less. + Este valor deve ser {{ limit }} ou menos. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Este valor é muito longo. Deve ter {{ limit }} caractere ou menos.|Este valor é muito longo. Deve ter {{ limit }} caracteres ou menos. + + + This value should be {{ limit }} or more. + Este valor deve ser {{ limit }} ou mais. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Este valor é muito curto. Deve ter {{ limit }} caractere ou mais.|Este valor é muito curto. Deve ter {{ limit }} caracteres ou mais. + + + This value should not be blank. + Este valor não deve ser vazio. + + + This value should not be null. + Este valor não deve ser nulo. + + + This value should be null. + Este valor deve ser nulo. + + + This value is not valid. + Este valor não é válido. + + + This value is not a valid time. + Este valor não é uma hora válida. + + + This value is not a valid URL. + Este valor não é uma URL válida. + + + The two values should be equal. + Os dois valores devem ser iguais. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + O arquivo é muito grande. O tamanho máximo permitido é de {{ limit }} {{ suffix }}. + + + The file is too large. + O arquivo é muito grande. + + + The file could not be uploaded. + O arquivo não pode ser enviado. + + + This value should be a valid number. + Este valor deve ser um número válido. + + + This file is not a valid image. + Este arquivo não é uma imagem válida. + + + This is not a valid IP address. + Este não é um endereço de IP válido. + + + This value is not a valid language. + Este valor não é um idioma válido. + + + This value is not a valid locale. + Este valor não é uma localidade válida. + + + This value is not a valid country. + Este valor não é um país válido. + + + This value is already used. + Este valor já está sendo usado. + + + The size of the image could not be detected. + O tamanho da imagem não pode ser detectado. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + A largura da imagem é muito grande ({{ width }}px). A largura máxima permitida é de {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + A largura da imagem é muito pequena ({{ width }}px). A largura mínima esperada é de {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + A altura da imagem é muito grande ({{ height }}px). A altura máxima permitida é de {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + A altura da imagem é muito pequena ({{ height }}px). A altura mínima esperada é de {{ min_height }}px. + + + This value should be the user's current password. + Este valor deve ser a senha atual do usuário. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Este valor deve ter exatamente {{ limit }} caractere.|Este valor deve ter exatamente {{ limit }} caracteres. + + + The file was only partially uploaded. + O arquivo foi enviado apenas parcialmente. + + + No file was uploaded. + Nenhum arquivo foi enviado. + + + No temporary folder was configured in php.ini. + Nenhum diretório temporário foi configurado no php.ini. + + + Cannot write temporary file to disk. + Não foi possível escrever o arquivo temporário no disco. + + + A PHP extension caused the upload to fail. + Uma extensão PHP fez com que o envio falhasse. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Esta coleção deve conter {{ limit }} elemento ou mais.|Esta coleção deve conter {{ limit }} elementos ou mais. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Esta coleção deve conter {{ limit }} elemento ou menos.|Esta coleção deve conter {{ limit }} elementos ou menos. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Esta coleção deve conter exatamente {{ limit }} elemento.|Esta coleção deve conter exatamente {{ limit }} elementos. + + + Invalid card number. + Número de cartão inválido. + + + Unsupported card type or invalid card number. + Tipo de cartão não suportado ou número de cartão inválido. + + + This is not a valid International Bank Account Number (IBAN). + Este não é um Número Internacional de Conta Bancária (IBAN) válido. + + + This value is not a valid ISBN-10. + Este valor não é um ISBN-10 válido. + + + This value is not a valid ISBN-13. + Este valor não é um ISBN-13 válido. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Este valor não é um ISBN-10 e nem um ISBN-13 válido. + + + This value is not a valid ISSN. + Este valor não é um ISSN válido. + + + This value is not a valid currency. + Este não é um valor monetário válido. + + + This value should be equal to {{ compared_value }}. + Este valor deve ser igual a {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Este valor deve ser maior que {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Este valor deve ser maior ou igual a {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Este valor deve ser idêntico a {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Este valor deve ser menor que {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Este valor deve ser menor ou igual a {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Este valor não deve ser igual a {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Este valor não deve ser idêntico a {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + A proporção da imagem é muito grande ({{ ratio }}). A proporção máxima permitida é {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + A proporção da imagem é muito pequena ({{ ratio }}). A proporção mínima esperada é {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + A imagem está num formato quadrado ({{ width }}x{{ height }}px). Imagens com formato quadrado não são permitidas. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + A imagem está orientada à paisagem ({{ width }}x{{ height }}px). Imagens orientadas à paisagem não são permitidas. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + A imagem está orientada ao retrato ({{ width }}x{{ height }}px). Imagens orientadas ao retrato não são permitidas. + + + An empty file is not allowed. + Arquivo vazio não é permitido. + + + The host could not be resolved. + O host não pôde ser resolvido. + + + This value does not match the expected {{ charset }} charset. + Este valor não corresponde ao charset {{ charset }} esperado. + + + This is not a valid Business Identifier Code (BIC). + Este não é um Código Identificador Bancário (BIC) válido. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf new file mode 100644 index 0000000000000000000000000000000000000000..27346a9f17718e4f03999a2499bbd697d7bbe850 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + Această valoare ar trebui să fie falsă (false). + + + This value should be true. + Această valoare ar trebui să fie adevărată (true). + + + This value should be of type {{ type }}. + Această valoare ar trebui să fie de tipul {{ type }}. + + + This value should be blank. + Această valoare ar trebui sa fie goală. + + + The value you selected is not a valid choice. + Valoarea selectată nu este o opÈ›iune validă. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Trebuie să selectaÈ›i cel puÈ›in {{ limit }} opÈ›iune.|Trebuie să selectaÈ›i cel puÈ›in {{ limit }} opÈ›iuni.|Trebuie să selectaÈ›i cel puÈ›in {{ limit }} de opÈ›iuni + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Trebuie să selectaÈ›i cel mult {{ limit }} opÈ›iune.|Trebuie să selectaÈ›i cel mult {{ limit }} opÈ›iuni.|Trebuie să selectaÈ›i cel mult {{ limit }} de opÈ›iuni. + + + One or more of the given values is invalid. + Una sau mai multe dintre valorile furnizate sunt invalide. + + + This field was not expected. + Acest câmp nu era de aÅŸteptat. + + + This field is missing. + Acest câmp este lipsă. + + + This value is not a valid date. + Această valoare nu reprezintă o dată validă. + + + This value is not a valid datetime. + Această valoare nu reprezintă o dată È™i oră validă. + + + This value is not a valid email address. + Această valoare nu reprezintă o adresă de e-mail validă. + + + The file could not be found. + FiÈ™ierul nu a putut fi găsit. + + + The file is not readable. + FiÈ™ierul nu poate fi citit. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + FiÈ™ierul este prea mare ({{ size }} {{ suffix }}). Dimensiunea maximă permisă este {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Tipul fiÈ™ierului este invalid ({{ type }}). Tipurile permise de fiÈ™iere sunt ({{ types }}). + + + This value should be {{ limit }} or less. + Această valoare ar trebui să fie cel mult {{ limit }}. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Această valoare este prea lungă. Ar trebui să aibă maxim {{ limit }} caracter.|Această valoare este prea lungă. Ar trebui să aibă maxim {{ limit }} caractere.|Această valoare este prea lungă. Ar trebui să aibă maxim {{ limit }} de caractere. + + + This value should be {{ limit }} or more. + Această valoare ar trebui să fie cel puÈ›in {{ limit }}. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Această valoare este prea scurtă. Ar trebui să aibă minim {{ limit }} caracter.|Această valoare este prea scurtă. Ar trebui să aibă minim {{ limit }} caractere.|Această valoare este prea scurtă. Ar trebui să aibă minim {{ limit }} de caractere. + + + This value should not be blank. + Această valoare nu ar trebui să fie goală. + + + This value should not be null. + Această valoare nu ar trebui să fie nulă (null). + + + This value should be null. + Această valoare ar trebui să fie nulă (null). + + + This value is not valid. + Această valoare nu este validă. + + + This value is not a valid time. + Această valoare nu reprezintă o oră validă. + + + This value is not a valid URL. + Această valoare nu reprezintă un URL (link) valid. + + + The two values should be equal. + Cele două valori ar trebui să fie egale. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + FiÈ™ierul este prea mare. Mărimea maximă permisă este {{ limit }} {{ suffix }}. + + + The file is too large. + FiÈ™ierul este prea mare. + + + The file could not be uploaded. + FiÈ™ierul nu a putut fi încărcat. + + + This value should be a valid number. + Această valoare nu reprezintă un număr valid. + + + This file is not a valid image. + Acest fiÈ™ier nu este o imagine validă. + + + This is not a valid IP address. + Această valoare nu este o adresă IP validă. + + + This value is not a valid language. + Această valoare nu reprezintă o limbă corectă. + + + This value is not a valid locale. + Această valoare nu reprezintă un dialect (o limbă) corect. + + + This value is not a valid country. + Această valoare nu este o È›ară validă. + + + This value is already used. + Această valoare este folosită deja. + + + The size of the image could not be detected. + Mărimea imaginii nu a putut fi detectată. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Lățimea imaginii este prea mare ({{ width }}px). Lățimea maximă permisă este de {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Lățimea imaginii este prea mică ({{ width }}px). Lățimea minimă permisă este de {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + ÃŽnălÈ›imea imaginii este prea mare ({{ height }}px). ÃŽnălÈ›imea maximă permisă este de {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + ÃŽnălÈ›imea imaginii este prea mică ({{ height }}px). ÃŽnălÈ›imea minimă permisă este de {{ min_height }}px. + + + This value should be the user's current password. + Această valoare trebuie să fie parola curentă a utilizatorului. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Această valoare trebuie să conÈ›ină exact {{ limit }} caracter.|Această valoare trebuie să conÈ›ină exact {{ limit }} caractere.|Această valoare trebuie să conÈ›ină exact {{ limit }} de caractere. + + + The file was only partially uploaded. + FiÈ™ierul a fost încărcat parÈ›ial. + + + No file was uploaded. + Nu a fost încărcat nici un fiÈ™ier. + + + No temporary folder was configured in php.ini. + Nu este configurat nici un director temporar in php.ini. + + + Cannot write temporary file to disk. + Nu a fost posibilă scrierea fiÈ™ierului temporar pe disk. + + + A PHP extension caused the upload to fail. + O extensie PHP a prevenit încărcarea cu succes a fiÈ™ierului. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Această colecÈ›ie trebuie să conÈ›ină cel puÈ›in {{ limit }} element.|Această colecÈ›ie trebuie să conÈ›ină cel puÈ›in {{ limit }} elemente.|Această colecÈ›ie trebuie să conÈ›ină cel puÈ›in {{ limit }} de elemente. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Această colecÈ›ie trebuie să conÈ›ină cel mult {{ limit }} element.|Această colecÈ›ie trebuie să conÈ›ină cel mult {{ limit }} elemente.|Această colecÈ›ie trebuie să conÈ›ină cel mult {{ limit }} de elemente. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Această colecÈ›ie trebuie să conÈ›ină {{ limit }} element.|Această colecÈ›ie trebuie să conÈ›ină {{ limit }} elemente.|Această colecÈ›ie trebuie să conÈ›ină {{ limit }} de elemente. + + + Invalid card number. + Numărul card invalid. + + + Unsupported card type or invalid card number. + Tipul sau numărul cardului nu sunt valide. + + + This is not a valid International Bank Account Number (IBAN). + Acesta nu este un cod IBAN (International Bank Account Number) valid. + + + This value is not a valid ISBN-10. + Această valoare nu este un cod ISBN-10 valid. + + + This value is not a valid ISBN-13. + Această valoare nu este un cod ISBN-13 valid. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Această valoare nu este un cod ISBN-10 sau ISBN-13 valid. + + + This value is not a valid ISSN. + Această valoare nu este un cod ISSN valid. + + + This value is not a valid currency. + Această valoare nu este o monedă validă. + + + This value should be equal to {{ compared_value }}. + Această valoare trebuie să fie egală cu {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Această valoare trebuie să fie mai mare de {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Această valoare trebuie să fie mai mare sau egală cu {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Această valoare trebuie identică cu {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Această valoare trebuie să fie mai mică de {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Această valoare trebuie să fie mai mică sau egală cu {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Această valoare nu trebuie să fie egală cu {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Această valoare nu trebuie să fie identică cu {{ compared_value_type }} {{ compared_value }}. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf new file mode 100644 index 0000000000000000000000000000000000000000..d7a90c907ed08fdcda4315becec6abc7ca669c23 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf @@ -0,0 +1,315 @@ + + + + + + This value should be false. + Значение должно быть ложным. + + + This value should be true. + Значение должно быть иÑтинным. + + + This value should be of type {{ type }}. + Тип Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð´Ð¾Ð»Ð¶ÐµÐ½ быть {{ type }}. + + + This value should be blank. + Значение должно быть пуÑтым. + + + The value you selected is not a valid choice. + Выбранное Вами значение недопуÑтимо. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Ð’Ñ‹ должны выбрать Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ {{ limit }} вариант.|Ð’Ñ‹ должны выбрать Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ {{ limit }} варианта.|Ð’Ñ‹ должны выбрать Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ {{ limit }} вариантов. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Ð’Ñ‹ должны выбрать не более чем {{ limit }} вариант.|Ð’Ñ‹ должны выбрать не более чем {{ limit }} варианта.|Ð’Ñ‹ должны выбрать не более чем {{ limit }} вариантов. + + + One or more of the given values is invalid. + Одно или неÑколько заданных значений недопуÑтимо. + + + This field was not expected. + Это поле не ожидалоÑÑŒ. + + + This field is missing. + Это поле отÑутÑтвует. + + + This value is not a valid date. + Значение не ÑвлÑетÑÑ Ð¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð¾Ð¹ датой. + + + This value is not a valid datetime. + Значение даты и времени недопуÑтимо. + + + This value is not a valid email address. + Значение адреÑа Ñлектронной почты недопуÑтимо. + + + The file could not be found. + Файл не может быть найден. + + + The file is not readable. + Файл не может быть прочитан. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Файл Ñлишком большой ({{ size }} {{ suffix }}). МакÑимально допуÑтимый размер {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + MIME-тип файла недопуÑтим ({{ type }}). ДопуÑтимы MIME-типы файлов {{ types }}. + + + This value should be {{ limit }} or less. + Значение должно быть {{ limit }} или меньше. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Значение Ñлишком длинное. Должно быть равно {{ limit }} Ñимволу или меньше.|Значение Ñлишком длинное. Должно быть равно {{ limit }} Ñимволам или меньше.|Значение Ñлишком длинное. Должно быть равно {{ limit }} Ñимволам или меньше. + + + This value should be {{ limit }} or more. + Значение должно быть {{ limit }} или больше. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Значение Ñлишком короткое. Должно быть равно {{ limit }} Ñимволу или больше.|Значение Ñлишком короткое. Должно быть равно {{ limit }} Ñимволам или больше.|Значение Ñлишком короткое. Должно быть равно {{ limit }} Ñимволам или больше. + + + This value should not be blank. + Значение не должно быть пуÑтым. + + + This value should not be null. + Значение не должно быть null. + + + This value should be null. + Значение должно быть null. + + + This value is not valid. + Значение недопуÑтимо. + + + This value is not a valid time. + Значение времени недопуÑтимо. + + + This value is not a valid URL. + Значение не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым URL. + + + The two values should be equal. + Оба Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ñ‹ быть одинаковыми. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Файл Ñлишком большой. МакÑимально допуÑтимый размер {{ limit }} {{ suffix }}. + + + The file is too large. + Файл Ñлишком большой. + + + The file could not be uploaded. + Файл не может быть загружен. + + + This value should be a valid number. + Значение должно быть чиÑлом. + + + This value is not a valid country. + Значение не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимой Ñтраной. + + + This file is not a valid image. + Файл не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым форматом изображениÑ. + + + This is not a valid IP address. + Значение не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым IP адреÑом. + + + This value is not a valid language. + Значение не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым Ñзыком. + + + This value is not a valid locale. + Значение не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимой локалью. + + + This value is already used. + Это значение уже иÑпользуетÑÑ. + + + The size of the image could not be detected. + Ðе удалоÑÑŒ определить размер изображениÑ. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Ширина Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñлишком велика ({{ width }}px). МакÑимально допуÑÑ‚Ð¸Ð¼Ð°Ñ ÑˆÐ¸Ñ€Ð¸Ð½Ð° {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Ширина Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñлишком мала ({{ width }}px). Минимально допуÑÑ‚Ð¸Ð¼Ð°Ñ ÑˆÐ¸Ñ€Ð¸Ð½Ð° {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Ð’Ñ‹Ñота Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñлишком велика ({{ height }}px). МакÑимально допуÑÑ‚Ð¸Ð¼Ð°Ñ Ð²Ñ‹Ñота {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Ð’Ñ‹Ñота Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñлишком мала ({{ height }}px). Минимально допуÑÑ‚Ð¸Ð¼Ð°Ñ Ð²Ñ‹Ñота {{ min_height }}px. + + + This value should be the user's current password. + Значение должно быть текущим паролем пользователÑ. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Значение должно быть равно {{ limit }} Ñимволу.|Значение должно быть равно {{ limit }} Ñимволам.|Значение должно быть равно {{ limit }} Ñимволам. + + + The file was only partially uploaded. + Файл был загружен только чаÑтично. + + + No file was uploaded. + Файл не был загружен. + + + No temporary folder was configured in php.ini. + Ðе наÑтроена Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð² php.ini. + + + Cannot write temporary file to disk. + Ðевозможно запиÑать временный файл на диÑк. + + + A PHP extension caused the upload to fail. + РаÑширение PHP вызвало ошибку при загрузке. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Эта ÐºÐ¾Ð»Ð»ÐµÐºÑ†Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° Ñодержать {{ limit }} Ñлемент или больше.|Эта ÐºÐ¾Ð»Ð»ÐµÐºÑ†Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° Ñодержать {{ limit }} Ñлемента или больше.|Эта ÐºÐ¾Ð»Ð»ÐµÐºÑ†Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° Ñодержать {{ limit }} Ñлементов или больше. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Эта ÐºÐ¾Ð»Ð»ÐµÐºÑ†Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° Ñодержать {{ limit }} Ñлемент или меньше.|Эта ÐºÐ¾Ð»Ð»ÐµÐºÑ†Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° Ñодержать {{ limit }} Ñлемента или меньше.|Эта ÐºÐ¾Ð»Ð»ÐµÐºÑ†Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° Ñодержать {{ limit }} Ñлементов или меньше. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Эта ÐºÐ¾Ð»Ð»ÐµÐºÑ†Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° Ñодержать ровно {{ limit }} Ñлемент.|Эта ÐºÐ¾Ð»Ð»ÐµÐºÑ†Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° Ñодержать ровно {{ limit }} Ñлемента.|Эта ÐºÐ¾Ð»Ð»ÐµÐºÑ†Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° Ñодержать ровно {{ limit }} Ñлементов. + + + Invalid card number. + Ðеверный номер карты. + + + Unsupported card type or invalid card number. + Ðеподдерживаемый тип или неверный номер карты. + + + This is not a valid International Bank Account Number (IBAN). + Значение не ÑвлÑетÑÑ Ð´Ð¾Ð¿ÑƒÑтимым международным номером банковÑкого Ñчета (IBAN). + + + This value is not a valid ISBN-10. + Значение имеет неверный формат ISBN-10. + + + This value is not a valid ISBN-13. + Значение имеет неверный формат ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Значение не ÑоответÑтвует форматам ISBN-10 и ISBN-13. + + + This value is not a valid ISSN. + Значение не ÑоответÑтвует формату ISSN. + + + This value is not a valid currency. + Ðекорректный формат валюты. + + + This value should be equal to {{ compared_value }}. + Значение должно быть равно {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Значение должно быть больше чем {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Значение должно быть больше или равно {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Значение должно быть идентичным {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Значение должно быть меньше чем {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Значение должно быть меньше или равно {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Значение не должно быть равно {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Значение не должно быть идентичным {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Соотношение Ñторон Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñлишком велико ({{ ratio }}). МакÑимальное Ñоотношение Ñторон {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Соотношение Ñторон Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñлишком мало ({{ ratio }}). Минимальное Ñоотношение Ñторон {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Изображение квадратное ({{ width }}x{{ height }}px). Квадратные Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð½Ðµ разрешены. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Изображение в альбомной ориентации ({{ width }}x{{ height }}px). Ð˜Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð² альбомной ориентации не разрешены. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Изображение в портретной ориентации ({{ width }}x{{ height }}px). Ð˜Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð² портретной ориентации не разрешены. + + + An empty file is not allowed. + ПуÑтые файлы не разрешены. + + + The host could not be resolved. + Ð˜Ð¼Ñ Ñ…Ð¾Ñта не может быть разрешено. + + + This value does not match the expected {{ charset }} charset. + Значение не Ñовпадает Ñ Ð¾Ð¶Ð¸Ð´Ð°ÐµÐ¼Ð¾Ð¹ {{ charset }} кодировкой. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf new file mode 100644 index 0000000000000000000000000000000000000000..8ddb66d9c0b6f5c4655b97d92caed7a8bdb0cb6d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Táto hodnota by mala byÅ¥ nastavená na false. + + + This value should be true. + Táto hodnota by mala byÅ¥ nastavená na true. + + + This value should be of type {{ type }}. + Táto hodnota by mala byÅ¥ typu {{ type }}. + + + This value should be blank. + Táto hodnota by mala byÅ¥ prázdna. + + + The value you selected is not a valid choice. + Táto hodnota by mala byÅ¥ jednou z poskytnutých možností. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Mali by ste vybraÅ¥ minimálne {{ limit }} možnosÅ¥.|Mali by ste vybraÅ¥ minimálne {{ limit }} možnosti.|Mali by ste vybraÅ¥ minimálne {{ limit }} možností. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Mali by ste vybraÅ¥ najviac {{ limit }} možnosÅ¥.|Mali by ste vybraÅ¥ najviac {{ limit }} možnosti.|Mali by ste vybraÅ¥ najviac {{ limit }} možností. + + + One or more of the given values is invalid. + Niektoré z uvedených hodnôt sú neplatné. + + + This field was not expected. + Toto pole sa neoÄakáva. + + + This field is missing. + Toto pole chýba. + + + This value is not a valid date. + Tato hodnota nemá platný formát dátumu. + + + This value is not a valid datetime. + Táto hodnota nemá platný formát dátumu a Äasu. + + + This value is not a valid email address. + Táto hodnota nie je platná emailová adresa. + + + The file could not be found. + Súbor sa nenaÅ¡iel. + + + The file is not readable. + Súbor nie je Äitateľný. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Súbor je príliÅ¡ veľký ({{ size }} {{ suffix }}). Maximálna povolená veľkosÅ¥ je {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Súbor typu ({{ type }}) nie je podporovaný. Podporované typy sú {{ types }}. + + + This value should be {{ limit }} or less. + Táto hodnota by mala byÅ¥ {{ limit }} alebo menej. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovaÅ¥ najviac {{ limit }} znak.|Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovaÅ¥ najviac {{ limit }} znaky.|Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovaÅ¥ najviac {{ limit }} znakov. + + + This value should be {{ limit }} or more. + Táto hodnota by mala byÅ¥ viac ako {{ limit }}. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Táto hodnota je príliÅ¡ krátka. Musí obsahovaÅ¥ minimálne {{ limit }} znak.|Táto hodnota je príliÅ¡ krátka. Musí obsahovaÅ¥ minimálne {{ limit }} znaky.|Táto hodnota je príliÅ¡ krátka. Minimálny poÄet znakov je {{ limit }}. + + + This value should not be blank. + Táto hodnota by mala byÅ¥ vyplnená. + + + This value should not be null. + Táto hodnota by nemala byÅ¥ null. + + + This value should be null. + Táto hodnota by mala byÅ¥ null. + + + This value is not valid. + Táto hodnota nie je platná. + + + This value is not a valid time. + Tato hodnota nemá správny formát Äasu. + + + This value is not a valid URL. + Táto hodnota nie je platnou URL adresou. + + + The two values should be equal. + Tieto dve hodnoty by mali byÅ¥ rovnaké. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Súbor je príliÅ¡ veľký. Maximálna povolená veľkosÅ¥ je {{ limit }} {{ suffix }}. + + + The file is too large. + Súbor je príliÅ¡ veľký. + + + The file could not be uploaded. + Súbor sa nepodarilo nahraÅ¥. + + + This value should be a valid number. + Táto hodnota by mala byÅ¥ Äíslo. + + + This file is not a valid image. + Tento súbor nie je obrázok. + + + This is not a valid IP address. + Toto nie je platná IP adresa. + + + This value is not a valid language. + Tento jazyk neexistuje. + + + This value is not a valid locale. + Táto lokalizácia neexistuje. + + + This value is not a valid country. + Táto krajina neexistuje. + + + This value is already used. + Táto hodnota sa už používa. + + + The size of the image could not be detected. + Nepodarilo sa zistiÅ¥ rozmery obrázku. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Obrázok je príliÅ¡ Å¡iroký ({{ width }}px). Maximálna povolená šírka obrázku je {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Obrázok je príliÅ¡ úzky ({{ width }}px). Minimálna šírka obrázku by mala byÅ¥ {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + >Obrázok je príliÅ¡ vysoký ({{ height }}px). Maximálna povolená výška obrázku je {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Obrázok je príliÅ¡ nízky ({{ height }}px). Minimálna výška obrázku by mala byÅ¥ {{ min_height }}px. + + + This value should be the user's current password. + Táto hodnota by mala byÅ¥ aktuálne heslo používateľa. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Táto hodnota by mala maÅ¥ presne {{ limit }} znak.|Táto hodnota by mala maÅ¥ presne {{ limit }} znaky.|Táto hodnota by mala maÅ¥ presne {{ limit }} znakov. + + + The file was only partially uploaded. + Bola nahraná len ÄasÅ¥ súboru. + + + No file was uploaded. + Žiadny súbor nebol nahraný. + + + No temporary folder was configured in php.ini. + V php.ini nie je nastavená cesta k adresáru pre doÄasné súbory. + + + Cannot write temporary file to disk. + DoÄasný súbor sa nepodarilo zapísaÅ¥ na disk. + + + A PHP extension caused the upload to fail. + Rozšírenie PHP zabránilo nahraniu súboru. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Táto kolekcia by mala obsahovaÅ¥ aspoň {{ limit }} prvok alebo viac.|Táto kolekcia by mala obsahovaÅ¥ aspoň {{ limit }} prvky alebo viac.|Táto kolekcia by mala obsahovaÅ¥ aspoň {{ limit }} prvkov alebo viac. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Táto kolekcia by mala maximálne {{ limit }} prvok.|Táto kolekcia by mala obsahovaÅ¥ maximálne {{ limit }} prvky.|Táto kolekcia by mala obsahovaÅ¥ maximálne {{ limit }} prvkov. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Táto kolekcia by mala obsahovaÅ¥ presne {{ limit }} prvok.|Táto kolekcia by mala obsahovaÅ¥ presne {{ limit }} prvky.|Táto kolekcia by mala obsahovaÅ¥ presne {{ limit }} prvkov. + + + Invalid card number. + Neplatné Äíslo karty. + + + Unsupported card type or invalid card number. + Nepodporovaný typ karty alebo neplatné Äíslo karty. + + + This is not a valid International Bank Account Number (IBAN). + Toto je neplatný IBAN. + + + This value is not a valid ISBN-10. + Táto hodnota je neplatné ISBN-10. + + + This value is not a valid ISBN-13. + Táto hodnota je neplatné ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Táto hodnota nie je platné ISBN-10 ani ISBN-13. + + + This value is not a valid ISSN. + Táto hodnota nie je platné ISSN. + + + This value is not a valid currency. + Táto hodnota nie je platná mena. + + + This value should be equal to {{ compared_value }}. + Táto hodnota by mala byÅ¥ rovná {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Táto hodnota by mala byÅ¥ väÄÅ¡ia ako {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Táto hodnota by mala byÅ¥ väÄÅ¡ia alebo rovná {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Táto hodnota by mala byÅ¥ typu {{ compared_value_type }} a zároveň by mala byÅ¥ rovná {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Táto hodnota by mala byÅ¥ menÅ¡ia ako {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Táto hodnota by mala byÅ¥ menÅ¡ia alebo rovná {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Táto hodnota by nemala byÅ¥ rovná {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Táto hodnota by nemala byÅ¥ typu {{ compared_value_type }} a zároveň by nemala byÅ¥ rovná {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Pomer strán obrázku je príliÅ¡ veľký ({{ ratio }}). Maximálny povolený pomer strán obrázku je {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Pomer strán obrázku je príliÅ¡ malý ({{ ratio }}). Minimálny povolený pomer strán obrázku je {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Strany obrázku sú Å¡tvorcové ({{ width }}x{{ height }}px). Å tvorcové obrázky nie sú povolené. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Obrázok je orientovaný na šírku ({{ width }}x{{ height }}px). Obrázky orientované na šírku nie sú povolené. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Obrázok je orientovaný na výšku ({{ width }}x{{ height }}px). Obrázky orientované na výšku nie sú povolené. + + + An empty file is not allowed. + Súbor nesmie byÅ¥ prázdny. + + + The host could not be resolved. + Hostiteľa nebolo možné rozpoznaÅ¥. + + + This value does not match the expected {{ charset }} charset. + Táto hodnota nezodpovedá oÄakávanej znakovej sade {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Táto hodnota nie je platný identifikaÄný kód podniku (BIC). + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..834db4015e8e4c143a2a5c5e200fa859aa7bd272 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Vrednost bi morala biti nepravilna (false). + + + This value should be true. + Vrednost bi morala biti pravilna (true). + + + This value should be of type {{ type }}. + Vrednost mora biti naslednjega tipa {{ type }}. + + + This value should be blank. + Vrednost mora biti prazna. + + + The value you selected is not a valid choice. + Vrednost, ki ste jo izbrali, ni veljavna možnost. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Izbrati morate vsaj {{ limit }} možnost.|Izbrati morate vsaj {{ limit }} možnosti.|Izbrati morate vsaj {{ limit }} možnosti.|Izbrati morate vsaj {{ limit }} možnosti. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Izberete lahko najveÄ {{ limit }} možnost.|Izberete lahko najveÄ {{ limit }} možnosti.|Izberete lahko najveÄ {{ limit }} možnosti.|Izberete lahko najveÄ {{ limit }} možnosti. + + + One or more of the given values is invalid. + Ena ali veÄ podanih vrednosti ni veljavnih. + + + This field was not expected. + To polje ni bilo priÄakovati. + + + This field is missing. + To polje manjka. + + + This value is not a valid date. + Ta vrednost ni veljaven datum. + + + This value is not a valid datetime. + Ta vrednost ni veljaven datum in Äas. + + + This value is not a valid email address. + Ta vrednost ni veljaven e-poÅ¡tni naslov. + + + The file could not be found. + Datoteke ni mogoÄe najti. + + + The file is not readable. + Datoteke ni mogoÄe prebrati. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Datoteka je prevelika ({{ size }} {{ suffix }}). NajveÄja dovoljena velikost je {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mime tip datoteke je neveljaven ({{ type }}). Dovoljeni mime tipi so {{ types }}. + + + This value should be {{ limit }} or less. + Ta vrednost bi morala biti {{ limit }} ali manj. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ta vrednost je predolga. Morala bi imeti {{ limit }} znak ali manj.|Ta vrednost je predolga. Morala bi imeti {{ limit }} znaka ali manj.|Ta vrednost je predolga. Morala bi imeti {{ limit }} znake ali manj.|Ta vrednost je predolga. Morala bi imeti {{ limit }} znakov ali manj. + + + This value should be {{ limit }} or more. + Ta vrednost bi morala biti {{ limit }} ali veÄ. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ta vrednost je prekratka. Morala bi imeti {{ limit }} znak ali veÄ.|Ta vrednost je prekratka. Morala bi imeti {{ limit }} znaka ali veÄ.|Ta vrednost je prekratka. Morala bi imeti {{ limit }} znake ali veÄ.|Ta vrednost je prekratka. Morala bi imeti {{ limit }} znakov ali veÄ. + + + This value should not be blank. + Ta vrednost ne bi smela biti prazna. + + + This value should not be null. + Ta vrednost ne bi smela biti nedefinirana (null). + + + This value should be null. + Ta vrednost bi morala biti nedefinirana (null). + + + This value is not valid. + Ta vrednost ni veljavna. + + + This value is not a valid time. + Ta vrednost ni veljaven Äas. + + + This value is not a valid URL. + Ta vrednost ni veljaven URL. + + + The two values should be equal. + Ti dve vrednosti bi morali biti enaki. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Datoteka je prevelika. NajveÄja dovoljena velikost je {{ limit }} {{ suffix }}. + + + The file is too large. + Datoteka je prevelika. + + + The file could not be uploaded. + Datoteke ni bilo mogoÄe naložiti. + + + This value should be a valid number. + Ta vrednost bi morala biti veljavna Å¡tevilka. + + + This file is not a valid image. + Ta datoteka ni veljavna slika. + + + This is not a valid IP address. + To ni veljaven IP naslov. + + + This value is not a valid language. + Ta vrednost ni veljaven jezik. + + + This value is not a valid locale. + Ta vrednost ni veljavna lokalnost. + + + This value is not a valid country. + Ta vrednost ni veljavna država. + + + This value is already used. + Ta vrednost je že uporabljena. + + + The size of the image could not be detected. + Velikosti slike ni bilo mogoÄe zaznati. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Å irina slike je preÅ¡iroka ({{ width }}px). NajveÄja dovoljena Å¡irina je {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Å irina slike je premajhna ({{ width }}px). NajmanjÅ¡a predvidena Å¡irina je {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + ViÅ¡ina slike je prevelika ({{ height }}px). NajveÄja dovoljena viÅ¡ina je {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + ViÅ¡ina slike je premajhna ({{ height }}px). NajmanjÅ¡a predvidena viÅ¡ina je {{ min_height }}px. + + + This value should be the user's current password. + Ta vrednost bi morala biti trenutno uporabnikovo geslo. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Ta vrednost bi morala imeti toÄno {{ limit }} znak.|Ta vrednost bi morala imeti toÄno {{ limit }} znaka.|Ta vrednost bi morala imeti toÄno {{ limit }} znake.|Ta vrednost bi morala imeti toÄno {{ limit }} znakov. + + + The file was only partially uploaded. + Datoteka je bila le delno naložena. + + + No file was uploaded. + Nobena datoteka ni bila naložena. + + + No temporary folder was configured in php.ini. + ZaÄasna mapa ni nastavljena v php.ini. + + + Cannot write temporary file to disk. + ZaÄasne datoteke ni bilo mogoÄe zapisati na disk. + + + A PHP extension caused the upload to fail. + PHP razÅ¡iritev je vzrok, da nalaganje ni uspelo. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ta zbirka bi morala vsebovati {{ limit }} element ali veÄ.|Ta zbirka bi morala vsebovati {{ limit }} elementa ali veÄ.|Ta zbirka bi morala vsebovati {{ limit }} elemente ali veÄ.|Ta zbirka bi morala vsebovati {{ limit }} elementov ali veÄ. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ta zbirka bi morala vsebovati {{ limit }} element ali manj.|Ta zbirka bi morala vsebovati {{ limit }} elementa ali manj.|Ta zbirka bi morala vsebovati {{ limit }} elemente ali manj.|Ta zbirka bi morala vsebovati {{ limit }} elementov ali manj. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ta zbirka bi morala vsebovati toÄno {{ limit }} element.|Ta zbirka bi morala vsebovati toÄno {{ limit }} elementa.|Ta zbirka bi morala vsebovati toÄno {{ limit }} elemente.|Ta zbirka bi morala vsebovati toÄno {{ limit }} elementov. + + + Invalid card number. + Neveljavna Å¡tevilka kartice. + + + Unsupported card type or invalid card number. + Nepodprti tip kartice ali neveljavna Å¡tevilka kartice. + + + This is not a valid International Bank Account Number (IBAN). + To ni veljavna mednarodna Å¡tevilka banÄnega raÄuna (IBAN). + + + This value is not a valid ISBN-10. + Neveljavna vrednost po ISBN-10. + + + This value is not a valid ISBN-13. + Neveljavna vrednost po ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Neveljavna vrednost po ISBN-10 ali po ISBN-13. + + + This value is not a valid ISSN. + Neveljavna vrednost ISSN. + + + This value is not a valid currency. + Ta vrednost ni veljavna valuta. + + + This value should be equal to {{ compared_value }}. + Ta vrednost bi morala biti enaka {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ta vrednost bi morala biti veÄja od {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ta vrednost bi morala biti veÄja ali enaka {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ta vrednost bi morala biti identiÄna {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ta vrednost bi morala biti manjÅ¡a od {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ta vrednost bi morala biti manjÅ¡a ali enaka {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ta vrednost ne bi smela biti enaka {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ta vrednost ne bi smela biti identiÄna {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Razmerje slike je preveliko ({{ ratio }}). NajveÄje dovoljeno razmerje je {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Razmerje slike je premajhno ({{ ratio }}). NajmanjÅ¡e priÄakovano razmerje je {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Slika je kvadrat ({{ width }}x{{ height }}px). Kvadratne slike niso dovoljene. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Slika je ležeÄe usmerjena ({{ width }}x{{ height }}px). LežeÄe usmerjene slike niso dovoljene. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Slika je pokonÄno usmerjena ({{ width }}x{{ height }}px). PokonÄno usmerjene slike niso dovoljene. + + + An empty file is not allowed. + Prazna datoteka ni dovoljena. + + + The host could not be resolved. + Gostitelja ni bilo mogoÄe prepoznati. + + + This value does not match the expected {{ charset }} charset. + Ta vrednost se ne ujema s priÄakovanim naborom znakov {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + To ni veljavna identifikacijska koda podjetja (BIC). + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf new file mode 100644 index 0000000000000000000000000000000000000000..ffc8ccf2f9831daadd85ac8f5b954e7872fd9d22 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf @@ -0,0 +1,227 @@ + + + + + + This value should be false. + Kjo vlerë duhet të jetë e pavërtetë (false). + + + This value should be true. + Kjo vlerë duhet të jetë e vërtetë (true). + + + This value should be of type {{ type }}. + Kjo vlerë duhet të jetë e llojit {{ type }}. + + + This value should be blank. + Kjo vlerë duhet të jetë e zbrazët. + + + The value you selected is not a valid choice. + Vlera që keni zgjedhur nuk është alternativë e vlefshme. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Duhet të zgjedhni së paku {{ limit }} alternativa.|Duhet të zgjedhni së paku {{ limit }} alternativa. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Duhet të zgjedhni më së shumti {{ limit }} alternativa.|Duhet të zgjedhni më së shumti {{ limit }} alternativa. + + + One or more of the given values is invalid. + Një apo më shumë nga vlerat e dhëna nuk janë të sakta. + + + This field was not expected. + Kjo fushë nuk pritej. + + + This field is missing. + Kjo fushë është zhdukur. + + + This value is not a valid date. + Kjo vlerë nuk është datë e vlefshme. + + + This value is not a valid datetime. + Kjo vlerë nuk është datë-kohë e vlefshme. + + + This value is not a valid email address. + Kjo vlerë nuk është e-mail adresë e vlefshme. + + + The file could not be found. + File nuk mund të gjindej. + + + The file is not readable. + File nuk është i lexueshëm. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + File është shumë i madh ({{ size }} {{ suffix }}). Madhësia më e madhe e lejuar është {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Lloji mime i files nuk është i vlefshëm ({{ type }}). Llojet mime të lejuara janë {{ types }}. + + + This value should be {{ limit }} or less. + Kjo vlerë duhet të jetë {{ limit }} ose më pak. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Kjo vlerë është shumë e gjatë. Duhet t'i ketë {{ limit }} ose më pak karaktere.|Kjo vlerë është shumë e gjatë. Duhet t'i ketë {{ limit }} ose më pak karaktere. + + + This value should be {{ limit }} or more. + Kjo vlerë duhet të jetë {{ limit }} ose më shumë. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Kjo vlerë është shumë e shkurtër. Duhet t'i ketë {{ limit }} ose më shumë karaktere.|Kjo vlerë është shumë e shkurtër. Duhet t'i ketë {{ limit }} ose më shumë karaktere. + + + This value should not be blank. + Kjo vlerë nuk duhet të jetë e zbrazët. + + + This value should not be null. + Kjo vlerë nuk duhet të jetë null. + + + This value should be null. + Kjo vlerë duhet të jetë null. + + + This value is not valid. + Kjo vlerë nuk është e vlefshme. + + + This value is not a valid time. + Kjo vlerë nuk është kohë e vlefshme. + + + This value is not a valid URL. + Kjo vlerë nuk është URL e vlefshme. + + + The two values should be equal. + Këto dy vlera duhet të jenë të barabarta. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Ky file është shumë i madh. Madhësia maksimale e lejuar është {{ limit }} {{ suffix }}. + + + The file is too large. + Ky file është shumë i madh. + + + The file could not be uploaded. + Ky file nuk mund të ngarkohet. + + + This value should be a valid number. + Kjo vlerë duhet të jetë numër i vlefshëm. + + + This file is not a valid image. + Ky file nuk është imazh i vlefshëm. + + + This is not a valid IP address. + Kjo vlerë nuk është IP adresë e vlefshme. + + + This value is not a valid language. + Kjo vlerë nuk është gjuhë e vlefshme. + + + This value is not a valid locale. + Kjo vlerë nuk është përcaktim rajonal i vlefshëm. + + + This value is not a valid country. + Kjo vlerë nuk është shtet i vlefshëm. + + + This value is already used. + Kjo vlerë është tashmë në përdorim. + + + The size of the image could not be detected. + Madhësia e këtij imazhi nuk mund të zbulohet. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Gjerësia e imazhit është shumë e madhe ({{ width }}px). Gjerësia maksimale e lejuar është {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Gjerësia e imazhit është shumë e vogël ({{ width }}px). Gjerësia minimale e pritur është {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Gjatësia e imazhit është shumë e madhe ({{ height }}px). Gjatësia maksimale e lejuar është {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Gjatësia e imazhit është shumë e vogël ({{ height }}px). Gjatësia minimale e pritur është {{ min_height }}px. + + + This value should be the user's current password. + Kjo vlerë duhet të jetë fjalëkalimi aktual i përdoruesit. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Kjo vlerë duhet të ketë saktësisht {{ limit }} karaktere.|Kjo vlerë duhet të ketë saktësisht {{ limit }} karaktere. + + + The file was only partially uploaded. + Ky file është ngarkuar pjesërisht. + + + No file was uploaded. + Nuk është ngarkuar ndonjë file. + + + No temporary folder was configured in php.ini. + Asnjë folder i përkohshëm nuk është konfiguruar në php.ini. + + + Cannot write temporary file to disk. + Nuk mund të shkruhet file i përkohshëm në disk. + + + A PHP extension caused the upload to fail. + Një ekstenzion i PHP-së bëri të dështojë ngarkimi i files. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente.|Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente.|Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ky kolekcion duhet të përmbajë saktësisht {{ limit }} elemente.|Ky kolekcion duhet të përmbajë saktësisht {{ limit }} elemente. + + + Invalid card number. + Numër kartele i pavlefshëm. + + + Unsupported card type or invalid card number. + Lloj kartele i pambështetur ose numër kartele i pavlefshëm. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf new file mode 100644 index 0000000000000000000000000000000000000000..81f5210f6fb334b8ed5e156deffd2d14ba9ea960 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf @@ -0,0 +1,303 @@ + + + + + + This value should be false. + ВредноÑÑ‚ треба да буде нетачна. + + + This value should be true. + ВредноÑÑ‚ треба да буде тачна. + + + This value should be of type {{ type }}. + ВредноÑÑ‚ треба да буде типа {{ type }}. + + + This value should be blank. + ВредноÑÑ‚ треба да буде празна. + + + The value you selected is not a valid choice. + ВредноÑÑ‚ треба да буде једна од понуђених. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Изаберите бар {{ limit }} могућноÑÑ‚.|Изаберите бар {{ limit }} могућноÑти.|Изаберите бар {{ limit }} могућноÑти. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Изаберите највише {{ limit }} могућноÑÑ‚.|Изаберите највише {{ limit }} могућноÑти.|Изаберите највише {{ limit }} могућноÑти. + + + One or more of the given values is invalid. + Једна или више вредноÑти је невалидна. + + + This field was not expected. + Ово поље не очекује. + + + This field is missing. + Ово поље недоÑтаје. + + + This value is not a valid date. + ВредноÑÑ‚ није валидан датум. + + + This value is not a valid datetime. + ВредноÑÑ‚ није валидан датум-време. + + + This value is not a valid email address. + ВредноÑÑ‚ није валидна адреÑа електронÑке поште. + + + The file could not be found. + Датотека не може бити пронађена. + + + The file is not readable. + Датотека није читљива. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Датотека је превелика ({{ size }} {{ suffix }}). Ðајвећа дозвољена величина је {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Миме тип датотеке није валидан ({{ type }}). Дозвољени миме типови Ñу {{ types }}. + + + This value should be {{ limit }} or less. + ВредноÑÑ‚ треба да буде {{ limit }} или мање. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + ВредноÑÑ‚ је предугачка. Треба да има {{ limit }} карактер или мање.|ВредноÑÑ‚ је предугачка. Треба да има {{ limit }} карактера или мање.|ВредноÑÑ‚ је предугачка. Треба да има {{ limit }} карактера или мање. + + + This value should be {{ limit }} or more. + ВредноÑÑ‚ треба да буде {{ limit }} или више. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + ВредноÑÑ‚ је прекратка. Треба да има {{ limit }} карактер или више.|ВредноÑÑ‚ је прекратка. Треба да има {{ limit }} карактера или више.|ВредноÑÑ‚ је прекратка. Треба да има {{ limit }} карактера или више. + + + This value should not be blank. + ВредноÑÑ‚ не треба да буде празна. + + + This value should not be null. + ВредноÑÑ‚ не треба да буде null. + + + This value should be null. + ВредноÑÑ‚ треба да буде null. + + + This value is not valid. + ВредноÑÑ‚ је невалидна. + + + This value is not a valid time. + ВредноÑÑ‚ није валидно време. + + + This value is not a valid URL. + ВредноÑÑ‚ није валидан URL. + + + The two values should be equal. + Обе вредноÑти треба да буду једнаке. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Датотека је превелика. Ðајвећа дозвољена величина је {{ limit }} {{ suffix }}. + + + The file is too large. + Датотека је превелика. + + + The file could not be uploaded. + Датотека не може бити отпремљена. + + + This value should be a valid number. + ВредноÑÑ‚ треба да буде валидан број. + + + This file is not a valid image. + Ова датотека није валидна Ñлика. + + + This is not a valid IP address. + Ово није валидна ИП адреÑа. + + + This value is not a valid language. + ВредноÑÑ‚ није валидан језик. + + + This value is not a valid locale. + ВредноÑÑ‚ није валидан локал. + + + This value is not a valid country. + ВредноÑÑ‚ није валидна земља. + + + This value is already used. + ВредноÑÑ‚ је већ иÑкоришћена. + + + The size of the image could not be detected. + Величина Ñлике не може бити одређена. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Ширина Ñлике је превелика ({{ width }}px). Ðајећа дозвољена ширина је {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Ширина Ñлике је премала ({{ width }}px). Ðајмања дозвољена ширина је {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + ВиÑина Ñлике је превелика ({{ height }}px). Ðајећа дозвољена виÑина је {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + ВиÑина Ñлике је премала ({{ height }}px). Ðајмања дозвољена виÑина је {{ min_height }}px. + + + This value should be the user's current password. + ВредноÑÑ‚ треба да буде тренутна кориÑничка лозинка. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + ВредноÑÑ‚ треба да има тачно {{ limit }} карактер.|ВредноÑÑ‚ треба да има тачно {{ limit }} карактера.|ВредноÑÑ‚ треба да има тачно {{ limit }} карактера. + + + The file was only partially uploaded. + Датотека је Ñамо парцијално отпремљена. + + + No file was uploaded. + Датотека није отпремљена. + + + No temporary folder was configured in php.ini. + Привремени директоријум није конфигуриÑан у php.ini. + + + Cannot write temporary file to disk. + Ðемогуће пиÑање привремене датотеке на диÑк. + + + A PHP extension caused the upload to fail. + PHP екÑтензија је проузроковала неуÑпех отпремања датотеке. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ова колекција треба да Ñадржи {{ limit }} или више елемената.|Ова колекција треба да Ñадржи {{ limit }} или више елемената.|Ова колекција треба да Ñадржи {{ limit }} или више елемената. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ова колекција треба да Ñадржи {{ limit }} или мање елемената.|Ова колекција треба да Ñадржи {{ limit }} или мање елемената.|Ова колекција треба да Ñадржи {{ limit }} или мање елемената. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ова колекција треба да Ñадржи тачно {{ limit }} елемент.|Ова колекција треба да Ñадржи тачно {{ limit }} елемента.|Ова колекција треба да Ñадржи тачно {{ limit }} елемената. + + + Invalid card number. + Ðевалидан број картице. + + + Unsupported card type or invalid card number. + Ðевалидан број картице или тип картице није подржан. + + + This is not a valid International Bank Account Number (IBAN). + Ово није валидан међународни број банковног рачуна (IBAN). + + + This value is not a valid ISBN-10. + Ово није валидан ISBN-10. + + + This value is not a valid ISBN-13. + Ово није валидан ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ово није валидан ISBN-10 или ISBN-13. + + + This value is not a valid ISSN. + Ово није валидан ISSN. + + + This value is not a valid currency. + Ово није валидна валута. + + + This value should be equal to {{ compared_value }}. + Ова вредноÑÑ‚ треба да буде {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ова вредноÑÑ‚ треба да буде већа од {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ова вредноÑÑ‚ треба да буде већа или једнака {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ова вредноÑÑ‚ треба да буде идентична Ñа {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ова вредноÑÑ‚ треба да буде мања од {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ова вредноÑÑ‚ треба да буде мања или једнака {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ова вредноÑÑ‚ не треба да буде једнака {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ова вредноÑÑ‚ не треба да буде идентична Ñа {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Размера ове Ñлике је превелика ({{ ratio }}). МакÑимална дозвољена размера је {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Размера ове Ñлике је премала ({{ ratio }}). Минимална очекивана размера је {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Слика је квадратна ({{ width }}x{{ height }}px). Квадратне Ñлике ниÑу дозвољене. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Слика је оријентације пејзажа ({{ width }}x{{ height }}px). Пејзажна оријентација Ñлика није дозвољена. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Слика је оријантације портрета ({{ width }}x{{ height }}px). Портретна оријентација Ñлика није дозвољена. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf new file mode 100644 index 0000000000000000000000000000000000000000..60c093aebf7950d2ff23913f53b0526a15047855 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf @@ -0,0 +1,303 @@ + + + + + + This value should be false. + Vrednost treba da bude netaÄna. + + + This value should be true. + Vrednost treba da bude taÄna. + + + This value should be of type {{ type }}. + Vrednost treba da bude tipa {{ type }}. + + + This value should be blank. + Vrednost treba da bude prazna. + + + The value you selected is not a valid choice. + Vrednost treba da bude jedna od ponuÄ‘enih. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Izaberite bar {{ limit }} mogućnost.|Izaberite bar {{ limit }} mogućnosti.|Izaberite bar {{ limit }} mogućnosti. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Izaberite najviÅ¡e {{ limit }} mogućnost.|Izaberite najviÅ¡e {{ limit }} mogućnosti.|Izaberite najviÅ¡e {{ limit }} mogućnosti. + + + One or more of the given values is invalid. + Jedna ili viÅ¡e vrednosti je nevalidna. + + + This field was not expected. + Ovo polje ne oÄekuje. + + + This field is missing. + Ovo polje nedostaje. + + + This value is not a valid date. + Vrednost nije validan datum. + + + This value is not a valid datetime. + Vrednost nije validan datum-vreme. + + + This value is not a valid email address. + Vrednost nije validna adresa elektronske poÅ¡te. + + + The file could not be found. + Datoteka ne može biti pronaÄ‘ena. + + + The file is not readable. + Datoteka nije Äitljiva. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Datoteka je prevelika ({{ size }} {{ suffix }}). Najveća dozvoljena veliÄina je {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mime tip datoteke nije validan ({{ type }}). Dozvoljeni mime tipovi su {{ types }}. + + + This value should be {{ limit }} or less. + Vrednost treba da bude {{ limit }} ili manje. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Vrednost je predugaÄka. Treba da ima {{ limit }} karakter ili manje.|Vrednost je predugaÄka. Treba da ima {{ limit }} karaktera ili manje.|Vrednost je predugaÄka. Treba da ima {{ limit }} karaktera ili manje. + + + This value should be {{ limit }} or more. + Vrednost treba da bude {{ limit }} ili viÅ¡e. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Vrednost je prekratka. Treba da ima {{ limit }} karakter ili viÅ¡e.|Vrednost je prekratka. Treba da ima {{ limit }} karaktera ili viÅ¡e.|Vrednost je prekratka. Treba da ima {{ limit }} karaktera ili viÅ¡e. + + + This value should not be blank. + Vrednost ne treba da bude prazna. + + + This value should not be null. + Vrednost ne treba da bude null. + + + This value should be null. + Vrednost treba da bude null. + + + This value is not valid. + Vrednost je nevalidna. + + + This value is not a valid time. + Vrednost nije validno vreme. + + + This value is not a valid URL. + Vrednost nije validan URL. + + + The two values should be equal. + Obe vrednosti treba da budu jednake. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Datoteka je prevelika. Najveća dozvoljena veliÄina je {{ limit }} {{ suffix }}. + + + The file is too large. + Datoteka je prevelika. + + + The file could not be uploaded. + Datoteka ne može biti otpremljena. + + + This value should be a valid number. + Vrednost treba da bude validan broj. + + + This file is not a valid image. + Ova datoteka nije validna slika. + + + This is not a valid IP address. + Ovo nije validna IP adresa. + + + This value is not a valid language. + Vrednost nije validan jezik. + + + This value is not a valid locale. + Vrednost nije validan lokal. + + + This value is not a valid country. + Vrednost nije validna zemlja. + + + This value is already used. + Vrednost je već iskorišćena. + + + The size of the image could not be detected. + VeliÄina slike ne može biti odreÄ‘ena. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Å irina slike je prevelika ({{ width }}px). Najeća dozvoljena Å¡irina je {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Å irina slike je premala ({{ width }}px). Najmanja dozvoljena Å¡irina je {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Visina slike je prevelika ({{ height }}px). Najeća dozvoljena visina je {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Visina slike je premala ({{ height }}px). Najmanja dozvoljena visina je {{ min_height }}px. + + + This value should be the user's current password. + Vrednost treba da bude trenutna korisniÄka lozinka. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Vrednost treba da ima taÄno {{ limit }} karakter.|Vrednost treba da ima taÄno {{ limit }} karaktera.|Vrednost treba da ima taÄno {{ limit }} karaktera. + + + The file was only partially uploaded. + Datoteka je samo parcijalno otpremljena. + + + No file was uploaded. + Datoteka nije otpremljena. + + + No temporary folder was configured in php.ini. + Privremeni direktorijum nije konfigurisan u php.ini. + + + Cannot write temporary file to disk. + Nemoguće pisanje privremene datoteke na disk. + + + A PHP extension caused the upload to fail. + PHP ekstenzija je prouzrokovala neuspeh otpremanja datoteke. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ova kolekcija treba da sadrži {{ limit }} ili viÅ¡e elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili viÅ¡e elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili viÅ¡e elemenata. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ova kolekcija treba da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili manje elemenata. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ova kolekcija treba da sadrži taÄno {{ limit }} element.|Ova kolekcija treba da sadrži taÄno {{ limit }} elementa.|Ova kolekcija treba da sadrži taÄno {{ limit }} elemenata. + + + Invalid card number. + Nevalidan broj kartice. + + + Unsupported card type or invalid card number. + Nevalidan broj kartice ili tip kartice nije podržan. + + + This is not a valid International Bank Account Number (IBAN). + Ovo nije validan meÄ‘unarodni broj bankovnog raÄuna (IBAN). + + + This value is not a valid ISBN-10. + Ovo nije validan ISBN-10. + + + This value is not a valid ISBN-13. + Ovo nije validan ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ovo nije validan ISBN-10 ili ISBN-13. + + + This value is not a valid ISSN. + Ovo nije validan ISSN. + + + This value is not a valid currency. + Ovo nije validna valuta. + + + This value should be equal to {{ compared_value }}. + Ova vrednost treba da bude {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ova vrednost treba da bude veća od {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ova vrednost treba da bude veća ili jednaka {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ova vrednost treba da bude identiÄna sa {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ova vrednost treba da bude manja od {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ova vrednost treba da bude manja ili jednaka {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ova vrednost ne treba da bude jednaka {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ova vrednost ne treba da bude identiÄna sa {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Razmera ove slike je prevelika ({{ ratio }}). Maksimalna dozvoljena razmera je {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Razmera ove slike je premala ({{ ratio }}). Minimalna oÄekivana razmera je {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Slika je kvadratna ({{ width }}x{{ height }}px). Kvadratne slike nisu dozvoljene. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Slika je orijentacije pejzaža ({{ width }}x{{ height }}px). Pejzažna orijentacija slika nije dozvoljena. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Slika je orijantacije portreta ({{ width }}x{{ height }}px). Portretna orijentacija slika nije dozvoljena. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf new file mode 100644 index 0000000000000000000000000000000000000000..879c0a5c559d0d3c43f4657e815d9b2aedfa49ac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Värdet ska vara falskt. + + + This value should be true. + Värdet ska vara sant. + + + This value should be of type {{ type }}. + Värdet ska vara av typen {{ type }}. + + + This value should be blank. + Värdet ska vara tomt. + + + The value you selected is not a valid choice. + Värdet ska vara ett av de givna valen. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Du mÃ¥ste välja minst {{ limit }} val.|Du mÃ¥ste välja minst {{ limit }} val. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Du kan som mest välja {{ limit }} val.|Du kan som mest välja {{ limit }} val. + + + One or more of the given values is invalid. + Ett eller fler av de angivna värdena är ogiltigt. + + + This field was not expected. + Det här fältet förväntades inte. + + + This field is missing. + Det här fältet saknas. + + + This value is not a valid date. + Värdet är inte ett giltigt datum. + + + This value is not a valid datetime. + Värdet är inte ett giltigt datum med tid. + + + This value is not a valid email address. + Värdet är inte en giltig epost-adress. + + + The file could not be found. + Filen kunde inte hittas. + + + The file is not readable. + Filen är inte läsbar. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Filen är för stor ({{ size }} {{ suffix }}). Största tillÃ¥tna storlek är {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Filens MIME-typ ({{ type }}) är ogiltig. De tillÃ¥tna typerna är {{ types }}. + + + This value should be {{ limit }} or less. + Värdet ska vara {{ limit }} eller mindre. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Värdet är för lÃ¥ngt. Det ska ha {{ limit }} tecken eller färre.|Värdet är för lÃ¥ngt. Det ska ha {{ limit }} tecken eller färre. + + + This value should be {{ limit }} or more. + Värdet ska vara {{ limit }} eller mer. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Värdet är för kort. Det ska ha {{ limit }} tecken eller mer.|Värdet är för kort. Det ska ha {{ limit }} tecken eller mer. + + + This value should not be blank. + Värdet kan inte vara tomt. + + + This value should not be null. + Värdet kan inte vara null. + + + This value should be null. + Värdet ska vara null. + + + This value is not valid. + Värdet är inte giltigt. + + + This value is not a valid time. + Värdet är inte en giltig tid. + + + This value is not a valid URL. + Värdet är inte en giltig URL. + + + The two values should be equal. + De tvÃ¥ värdena mÃ¥ste vara lika. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Filen är för stor. TillÃ¥ten maximal storlek är {{ limit }} {{ suffix }}. + + + The file is too large. + Filen är för stor. + + + The file could not be uploaded. + Filen kunde inte laddas upp. + + + This value should be a valid number. + Värdet ska vara ett giltigt nummer. + + + This file is not a valid image. + Filen är ingen giltig bild. + + + This is not a valid IP address. + Det här är inte en giltig IP-adress. + + + This value is not a valid language. + Värdet är inte ett giltigt sprÃ¥k. + + + This value is not a valid locale. + Värdet är inte en giltig plats. + + + This value is not a valid country. + Värdet är inte ett giltigt land. + + + This value is already used. + Värdet används redan. + + + The size of the image could not be detected. + Det gick inte att fastställa storleken pÃ¥ bilden. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Bildens bredd är för stor ({{ width }}px). TillÃ¥ten maximal bredd är {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Bildens bredd är för liten ({{ width }}px). Minsta förväntade bredd är {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Bildens höjd är för stor ({{ height }}px). TillÃ¥ten maximal bredd är {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Bildens höjd är för liten ({{ height }}px). Minsta förväntade höjd är {{ min_height }}px. + + + This value should be the user's current password. + Värdet ska vara användarens nuvarande lösenord. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Värdet ska ha exakt {{ limit }} tecken.|Värdet ska ha exakt {{ limit }} tecken. + + + The file was only partially uploaded. + Filen laddades bara upp delvis. + + + No file was uploaded. + Ingen fil laddades upp. + + + No temporary folder was configured in php.ini. + Det finns ingen temporär mapp konfigurerad i php.ini. + + + Cannot write temporary file to disk. + Kan inte skriva temporär fil till disken. + + + A PHP extension caused the upload to fail. + En PHP extension gjorde att uppladdningen misslyckades. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Den här samlingen ska innehÃ¥lla {{ limit }} element eller mer.|Den här samlingen ska innehÃ¥lla {{ limit }} element eller mer. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Den här samlingen ska innehÃ¥lla {{ limit }} element eller mindre.|Den här samlingen ska innehÃ¥lla {{ limit }} element eller mindre. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Den här samlingen ska innehÃ¥lla exakt {{ limit }} element.|Den här samlingen ska innehÃ¥lla exakt {{ limit }} element. + + + Invalid card number. + Ogiltigt kortnummer. + + + Unsupported card type or invalid card number. + Okänd korttyp eller ogiltigt kortnummer. + + + This is not a valid International Bank Account Number (IBAN). + Det här är inte en giltig International Bank Account Number (IBANK). + + + This value is not a valid ISBN-10. + Värdet är inte en giltig ISBN-10. + + + This value is not a valid ISBN-13. + Värdet är inte en giltig ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Värdet är varken en giltig ISBN-10 eller en giltig ISBN-13. + + + This value is not a valid ISSN. + Värdet är inte en giltig ISSN. + + + This value is not a valid currency. + Värdet är inte en giltig valuta. + + + This value should be equal to {{ compared_value }}. + Värdet ska vara detsamma som {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Värdet ska vara större än {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Värdet ska bara större än eller detsamma som {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Värdet ska vara identiskt till {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Värdet ska vara mindre än {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Värdet ska vara mindre än eller detsamma som {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Värdet ska inte vara detsamma som {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Värdet ska inte vara identiskt med {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + FörhÃ¥llandet mellan bildens bredd och höjd är för stort ({{ ratio }}). Högsta tillÃ¥tna förhÃ¥llande är {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + FörhÃ¥llandet mellan bildens bredd och höjd är för litet ({{ ratio }}). Minsta tillÃ¥tna förhÃ¥llande är {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Bilden är kvadratisk ({{ width }}x{{ height }}px). Kvadratiska bilder tillÃ¥ts inte. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Bilden är landskapsorienterad ({{ width }}x{{ height }}px). Landskapsorienterade bilder tillÃ¥ts inte. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Bilden är porträttsorienterad ({{ width }}x{{ height }}px). Porträttsorienterade bilder tillÃ¥ts inte. + + + An empty file is not allowed. + En tom fil är inte tillÃ¥ten. + + + The host could not be resolved. + Värddatorn kunde inte hittas. + + + This value does not match the expected {{ charset }} charset. + Detta värde har inte den förväntade teckenkodningen {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Detta är inte en giltig BIC-kod. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf new file mode 100644 index 0000000000000000000000000000000000000000..d5b57031b9f69101c6f73e43fe5e63e6fea82373 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf @@ -0,0 +1,303 @@ + + + + + + This value should be false. + ค่านี้ควรจะเป็น false + + + This value should be true. + ค่านี้ควรจะเป็น true + + + This value should be of type {{ type }}. + ค่านี้ควรจะเป็นชนิด {{ type }} + + + This value should be blank. + ควรจะเป็นค่าว่าง + + + The value you selected is not a valid choice. + คุณเลือà¸à¸„่าที่ไม่ตรงà¸à¸±à¸šà¸•ัวเลือภ+ + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + คุณต้องเลือà¸à¸­à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸­à¸¢ {{ limit }} ตัวเลือภ+ + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + คุณเลือà¸à¹„ด้มาà¸à¸—ี่สุด {{ limit }} ตัวเลือภ+ + + One or more of the given values is invalid. + มีบางค่าที่ส่งมาไม่ถูà¸à¸•้อง + + + This field was not expected. + ฟิลด์นี้ที่ไม่ได้คาดหวัง + + + This field is missing. + ฟิลด์นี้จะหายไป + + + This value is not a valid date. + ค่าของวันที่ไม่ถูà¸à¸•้อง + + + This value is not a valid datetime. + ค่าของวันที่à¹à¸¥à¸°à¹€à¸§à¸¥à¸²à¹„ม่ถูà¸à¸•้อง + + + This value is not a valid email address. + ค่าของอีเมล์ไม่ถูà¸à¸•้อง + + + The file could not be found. + ไม่พบไฟล์ + + + The file is not readable. + ไฟล์ไม่อยู่ในสถานะที่สามารถอ่านได้ + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + ไฟล์ใหà¸à¹ˆà¹€à¸à¸´à¸™ ({{ size }} {{ suffix }}) อนุà¸à¸²à¸•ให้ใหà¸à¹ˆà¸—ี่สุดได้ไม่เà¸à¸´à¸™ {{ limit }} {{ suffix }} + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mime type ของไฟล์ไม่ถูà¸à¸•้อง ({{ type }}) Mime types ที่อนุà¸à¸²à¸•คือ {{ types }} + + + This value should be {{ limit }} or less. + ค่านี้ควรจะเป็น {{ limit }} หรือน้อยà¸à¸§à¹ˆà¸²à¸™à¸±à¹‰à¸™ + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + ค่านี้ยาวเà¸à¸´à¸™à¹„ป ควรจะมีà¹à¸„่ {{ limit }} ตัวอัà¸à¸©à¸£à¸«à¸£à¸·à¸­à¸™à¹‰à¸­à¸¢à¸à¸§à¹ˆà¸²à¸™à¸±à¹‰à¸™ + + + This value should be {{ limit }} or more. + ค่านี้ควรจะมี {{ limit }} หรือมาà¸à¸à¸§à¹ˆà¸²à¸™à¸±à¹‰à¸™ + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + ค่านี้สั้นเà¸à¸´à¸™à¹„ป ควรจะมี {{ limit }} ตัวอัà¸à¸©à¸£à¸«à¸£à¸·à¸­à¸¡à¸²à¸à¸à¸§à¹ˆà¸²à¸™à¸±à¹‰à¸™ + + + This value should not be blank. + ค่านี้ไม่ควรเป็นค่าว่าง + + + This value should not be null. + ค่านี้ไม่ควรเป็นค่า null + + + This value should be null. + ค่านี้ควรเป็นค่า null + + + This value is not valid. + ค่านี้ไม่ถูà¸à¸•้อง + + + This value is not a valid time. + ค่าของเวลาไม่ถูà¸à¸•้อง + + + This value is not a valid URL. + ค่าของ URL ไม่ถูà¸à¸•้อง + + + The two values should be equal. + ค่าทั้งสองค่าควรจะเหมือนà¸à¸±à¸™ + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + ขนาดไฟล์ใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป อนุà¸à¸²à¸•ให้ไฟล์ขนาดใหà¸à¹ˆà¹„ด้ไม่เà¸à¸´à¸™ {{ limit }} {{ suffix }} + + + The file is too large. + ขนาดไฟล์ใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป + + + The file could not be uploaded. + ไม่สามารถอัปโหลดไฟล์ได้ + + + This value should be a valid number. + ค่าของตัวเลขไม่ถูà¸à¸•้อง + + + This file is not a valid image. + ไฟล์นี้ไม่ใช่ไฟล์รูปภาพ + + + This is not a valid IP address. + ค่าของ IP ไม่ถูà¸à¸•้อง + + + This value is not a valid language. + ค่าของภาษาไม่ถูà¸à¸•้อง + + + This value is not a valid locale. + ค่าของภูมิภาค (Locale) ไม่ถูà¸à¸•้อง + + + This value is not a valid country. + ค่าของประเทศไม่ถูà¸à¸•้อง + + + This value is already used. + Tค่านี้ถูà¸à¹ƒà¸Šà¹‰à¸‡à¸²à¸™à¹„ปà¹à¸¥à¹‰à¸§ + + + The size of the image could not be detected. + ไม่สามารถตรวจสอบขนาดไฟล์ของภาพได้ + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + ความà¸à¸§à¹‰à¸²à¸‡à¸‚องภาพเà¸à¸´à¸™à¸‚นาด ({{ width }}px) อนุà¸à¸²à¸•ให้à¸à¸§à¹‰à¸²à¸‡à¹„ด้มาà¸à¸—ี่สุด {{ max_width }}px + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + ความà¸à¸§à¹‰à¸²à¸‡à¸‚องภาพไม่ได้ขนาด ({{ width }}px) อนุà¸à¸²à¸•ให้สั้นที่สุด {{ min_width }}px + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + ความสูงของภาพเà¸à¸´à¸™à¸‚นาด ({{ height }}px) อนุà¸à¸²à¸•ให้สูงได้มาà¸à¸—ี่สุด {{ max_height }}px + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + ความสูงของภาพไม่ได้ขนาด ({{ height }}px) อนุà¸à¸²à¸•ให้สูงอย่างน้อยที่สุด {{ min_height }}px + + + This value should be the user's current password. + ค่านี้ควรจะเป็นรหัสผ่านปัจจุบันของผู้ใช้ + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + ค่านี้ควรจะมีความยาว {{ limit }} ตัวอัà¸à¸©à¸£ + + + The file was only partially uploaded. + อัปโหลดไฟล์ได้เพียงบางส่วนเท่านั้น + + + No file was uploaded. + ไม่มีไฟล์ใดถูà¸à¸­à¸±à¸›à¹‚หลด + + + No temporary folder was configured in php.ini. + ไม่พบไฟล์ temp ควรจะà¸à¸³à¸«à¸™à¸”ใน php.ini + + + Cannot write temporary file to disk. + ไม่สามารถเขียน temp ไฟล์ลงดิสà¸à¹Œà¹„ด้ + + + A PHP extension caused the upload to fail. + PHP extension เà¸à¸µà¹ˆà¸¢à¸§à¸à¸±à¸šà¸à¸²à¸£à¸­à¸±à¸›à¹‚หลดมีปัà¸à¸«à¸² + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + คอเล็à¸à¸Šà¸±à¹ˆà¸™à¸™à¸µà¹‰à¸„วรจะประà¸à¸­à¸šà¹„ปด้วยอ่างน้อย {{ limit }} สมาชิภ+ + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + คอเล็à¸à¸Šà¸±à¹ˆà¸™à¸™à¸µà¹‰à¹„ม่ควรมีสมาชิà¸à¹€à¸à¸´à¸™ {{ limit }} + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + คอเล็à¸à¸Šà¸±à¹ˆà¸™à¸™à¸µà¹‰à¸„วรจะมีสมาชิภ{{ limit }} เท่านั้น + + + Invalid card number. + หมายเลขบัตรไม่ถูà¸à¸•้อง + + + Unsupported card type or invalid card number. + ไม่รู้จัà¸à¸›à¸£à¸°à¹€à¸ à¸—ของบัตร หรือหมายเลขบัตรไม่ถูà¸à¸•้อง + + + This is not a valid International Bank Account Number (IBAN). + นี่ไม่ถูà¸à¸•้องตาม International Bank Account Number (IBAN) + + + This value is not a valid ISBN-10. + ค่านี้ไม่ถูà¸à¸•้องตาม ISBN-10 + + + This value is not a valid ISBN-13. + ค่านี้ไม่ถูà¸à¸•้องตาม ISBN-13 + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + ค่านี้ไม่ถูà¸à¸•้องตามทั้ง ISBN-10 à¹à¸¥à¸° ISBN-13 + + + This value is not a valid ISSN. + ค่านี้ไม่ถุà¸à¸•้องตาม ISSN + + + This value is not a valid currency. + ค่านี้ไม่ถูà¸à¸•้องตามสà¸à¸¸à¸¥à¹€à¸‡à¸´à¸™ + + + This value should be equal to {{ compared_value }}. + ค่านี้ไม่ตรงà¸à¸±à¸š {{ compared_value }} + + + This value should be greater than {{ compared_value }}. + ค่านี้ควรจะมาà¸à¸à¸§à¹ˆà¸² {{ compared_value }} + + + This value should be greater than or equal to {{ compared_value }}. + ค่านี้ควรจะมาà¸à¸à¸§à¹ˆà¸²à¸«à¸£à¸·à¸­à¸•รงà¸à¸±à¸š {{ compared_value }} + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + ค่านี้ควรจะเหมือนà¸à¸±à¸™à¸à¸±à¸š {{ compared_value_type }} {{ compared_value }} + + + This value should be less than {{ compared_value }}. + ค่านี้ควรจะน้อยà¸à¸§à¹ˆà¸² {{ compared_value }} + + + This value should be less than or equal to {{ compared_value }}. + ค่านี้ควรจะน้อยà¸à¸§à¹ˆà¸²à¸«à¸£à¸·à¸­à¹€à¸—่าà¸à¸±à¸š {{ compared_value }} + + + This value should not be equal to {{ compared_value }}. + ค่านี้ไม่ควรเท่าà¸à¸±à¸™à¸à¸±à¸š {{ compared_value }} + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + ค่านี้ไม่ควรเหมือนà¸à¸±à¸™à¸à¸±à¸š {{ compared_value_type }} {{ compared_value }} + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + สัดส่วนของภาพใหà¸à¹ˆà¹€à¸à¸´à¸™ ({{ ratio }}) สามารถมีขนาดใหà¸à¹ˆà¸—ี่สุดได้ {{ max_ratio }} + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + สัดส่วนของภาพเล็à¸à¹€à¸à¸´à¸™ ({{ ratio }}) สามารถมีขนาดเล็à¸à¸—ี่สุดได้ {{ min_ratio }} + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + รูปภาพเป็นจุตรัส ({{ width }}x{{ height }}px) ไม่อนุà¸à¸²à¸•ภาพที่เป็นสี่เหลี่ยมจตุรัส + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + ภาพนี้เป็นà¹à¸™à¸§à¸™à¸­à¸™ ({{ width }}x{{ height }}px) ไม่อนุà¸à¸²à¸•ภาพที่เป็นà¹à¸™à¸§à¸™à¸­à¸™ + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + ภาพนี้เป็นà¹à¸™à¸§à¸•ั้ง ({{ width }}x{{ height }}px) ไม่อนุà¸à¸²à¸•ภาพที่เป็นà¹à¸™à¸§à¸•ั้ง + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf new file mode 100644 index 0000000000000000000000000000000000000000..a7906eaae25af8bcf6970ffa43993190d44de7d1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf @@ -0,0 +1,227 @@ + + + + + + This value should be false. + Bu deÄŸer olumsuz olmalıdır. + + + This value should be true. + Bu deÄŸer olumlu olmalıdır. + + + This value should be of type {{ type }}. + Bu deÄŸerin tipi {{ type }} olmalıdır. + + + This value should be blank. + Bu deÄŸer boÅŸ olmalıdır. + + + The value you selected is not a valid choice. + SeçtiÄŸiniz deÄŸer geçerli bir seçenek deÄŸil. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + En az {{ limit }} seçenek belirtmelisiniz. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + En çok {{ limit }} seçenek belirtmelisiniz. + + + One or more of the given values is invalid. + Verilen deÄŸerlerden bir veya daha fazlası geçersiz. + + + This field was not expected. + Bu alan beklenen olmadı. + + + This field is missing. + Bu alan, eksik + + + This value is not a valid date. + Bu deÄŸer doÄŸru bir tarih biçimi deÄŸildir. + + + This value is not a valid datetime. + Bu deÄŸer doÄŸru bir tarihsaat biçimi deÄŸildir. + + + This value is not a valid email address. + Bu deÄŸer doÄŸru bir e-mail adresi deÄŸildir. + + + The file could not be found. + Dosya bulunamadı. + + + The file is not readable. + Dosya okunabilir deÄŸil. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Dosya çok büyük ({{ size }} {{ suffix }}). İzin verilen en büyük dosya boyutu {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Dosyanın mime tipi geçersiz ({{ type }}). İzin verilen mime tipleri {{ types }}. + + + This value should be {{ limit }} or less. + Bu deÄŸer {{ limit }} ve altında olmalıdır. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Bu deÄŸer çok uzun. {{ limit }} karakter veya daha az olmalıdır. + + + This value should be {{ limit }} or more. + Bu deÄŸer {{ limit }} veya daha fazla olmalıdır. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Bu deÄŸer çok kısa. {{ limit }} karakter veya daha fazla olmaldır. + + + This value should not be blank. + Bu deÄŸer boÅŸ bırakılmamalıdır. + + + This value should not be null. + Bu deÄŸer boÅŸ bırakılmamalıdır. + + + This value should be null. + Bu deÄŸer boÅŸ bırakılmalıdır. + + + This value is not valid. + Bu deÄŸer geçerli deÄŸil. + + + This value is not a valid time. + Bu deÄŸer doÄŸru bir saat deÄŸil. + + + This value is not a valid URL. + Bu deÄŸer doÄŸru bir URL deÄŸil. + + + The two values should be equal. + İki deÄŸer eÅŸit olmalıdır. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Dosya çok büyük. İzin verilen en büyük dosya boyutu {{ limit }} {{ suffix }}. + + + The file is too large. + Dosya çok büyük. + + + The file could not be uploaded. + Dosya yüklenemiyor. + + + This value should be a valid number. + Bu deÄŸer geçerli bir rakam olmalıdır. + + + This file is not a valid image. + Bu dosya geçerli bir resim deÄŸildir. + + + This is not a valid IP address. + Bu geçerli bir IP adresi deÄŸildir. + + + This value is not a valid language. + Bu deÄŸer geçerli bir lisan deÄŸil. + + + This value is not a valid locale. + Bu deÄŸer geçerli bir yer deÄŸildir. + + + This value is not a valid country. + Bu deÄŸer geçerli bir ülke deÄŸildir. + + + This value is already used. + Bu deÄŸer ÅŸu anda kullanımda. + + + The size of the image could not be detected. + Resmin boyutu saptanamıyor. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Resmin geniÅŸliÄŸi çok büyük ({{ width }}px). İzin verilen en büyük geniÅŸlik {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Resmin geniÅŸliÄŸi çok küçük ({{ width }}px). En az {{ min_width }}px olmalıdır. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Resmin yüksekliÄŸi çok büyük ({{ height }}px). İzin verilen en büyük yükseklik {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Resmin yüksekliÄŸi çok küçük ({{ height }}px). En az {{ min_height }}px olmalıdır. + + + This value should be the user's current password. + Bu deÄŸer kullanıcının ÅŸu anki ÅŸifresi olmalıdır. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Bu deÄŸer tam olarak {{ limit }} karakter olmaldır. + + + The file was only partially uploaded. + Dosya sadece kısmen yüklendi. + + + No file was uploaded. + Hiçbir dosya yüklenmedi. + + + No temporary folder was configured in php.ini. + php.ini içerisinde geçici dizin tanımlanmadı. + + + Cannot write temporary file to disk. + Geçici dosya diske yazılamıyor. + + + A PHP extension caused the upload to fail. + Bir PHP eklentisi dosyanın yüklemesini baÅŸarısız kıldı. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Bu derlem {{ limit }} veya daha çok eleman içermelidir. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Bu derlem {{ limit }} veya daha az eleman içermelidir. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Bu derlem {{ limit }} eleman içermelidir. + + + Invalid card number. + Geçersiz kart numarası. + + + Unsupported card type or invalid card number. + Desteklenmeyen kart tipi veya geçersiz kart numarası. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf new file mode 100644 index 0000000000000000000000000000000000000000..02ecd5a687c9383ec8e30b5b0c52e74014957cd3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð¾ бути ÐÑ–. + + + This value should be true. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð¾ бути Так. + + + This value should be of type {{ type }}. + Тип Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð½ÐµÐ½ бути {{ type }}. + + + This value should be blank. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð¾ бути пуÑтим. + + + The value you selected is not a valid choice. + Обране вами Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½ÐµÐ´Ð¾Ð¿ÑƒÑтиме. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Ви повинні обрати хоча б {{ limit }} варіант.|Ви повинні обрати хоча б {{ limit }} варіанти.|Ви повинні обрати хоча б {{ limit }} варіантів. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Ви повинні обрати не більше ніж {{ limit }} варіантів. + + + One or more of the given values is invalid. + Одне або кілька заданих значень Ñ” недопуÑтимі. + + + This field was not expected. + Це поле не очікуєтьÑÑ. + + + This field is missing. + Це поле не виÑтачає. + + + This value is not a valid date. + Дане Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ Ñ” вірною датою. + + + This value is not a valid datetime. + Дане Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð°Ñ‚Ð¸ та чаÑу недопуÑтиме. + + + This value is not a valid email address. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑи Ñлектронної пошти недопуÑтиме. + + + The file could not be found. + Файл не знайдено. + + + The file is not readable. + Файл не читаєтьÑÑ. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Файл занадто великий ({{ size }} {{ suffix }}). Дозволений макÑимальний розмір {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + MIME-тип файлу недопуÑтимий ({{ type }}). ДопуÑтимі MIME-типи файлів {{ types }}. + + + This value should be {{ limit }} or less. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð¾ бути {{ limit }} або менше. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð°Ð½Ð°Ð´Ñ‚Ð¾ довге. Повинно бути рівне {{ limit }} Ñимволу або менше.|Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð°Ð½Ð°Ð´Ñ‚Ð¾ довге. Повинно бути рівне {{ limit }} Ñимволам або менше.|Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð°Ð½Ð°Ð´Ñ‚Ð¾ довге. Повинно бути рівне {{ limit }} Ñимволам або менше. + + + This value should be {{ limit }} or more. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð¾ бути {{ limit }} або більше. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð°Ð½Ð°Ð´Ñ‚Ð¾ коротке. Повинно бути рівне {{ limit }} Ñимволу або більше.|Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð°Ð½Ð°Ð´Ñ‚Ð¾ коротке. Повинно бути рівне {{ limit }} Ñимволам або більше.|Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð°Ð½Ð°Ð´Ñ‚Ð¾ коротке. Повинно бути рівне {{ limit }} Ñимволам або більше. + + + This value should not be blank. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ повинно бути пуÑтим. + + + This value should not be null. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ повинно бути null. + + + This value should be null. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð¾ бути null. + + + This value is not valid. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½ÐµÐ´Ð¾Ð¿ÑƒÑтиме. + + + This value is not a valid time. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ‡Ð°Ñу недопуÑтиме. + + + This value is not a valid URL. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ URL недопуÑтиме. + + + The two values should be equal. + Обидва Ð·Ð°Ð½Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ñ– бути одинаковими. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Файл занадто великий. МакÑимальний допуÑтимий розмір {{ limit }} {{ suffix }}. + + + The file is too large. + Файл занадто великий. + + + The file could not be uploaded. + Файл не можливо завантажити. + + + This value should be a valid number. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ñ” бути допуÑтимим чиÑлом. + + + This file is not a valid image. + Цей файл не Ñ” допуÑтимим форматом зображеннÑ. + + + This is not a valid IP address. + Це некоректна IP адреÑа. + + + This value is not a valid language. + Це некоректна мова. + + + This value is not a valid locale. + Це некоректна локалізаціÑ. + + + This value is not a valid country. + Це некоректна країна. + + + This value is already used. + Це Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð¶Ðµ викориÑтовуєтьÑÑ. + + + The size of the image could not be detected. + Ðе вдалоÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð¸Ñ‚Ð¸ розмір зображеннÑ. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Ширина Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð·Ð°Ð½Ð°Ð´Ñ‚Ð¾ велика ({{ width }}px). МакÑимально допуÑтима ширина {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Ширина Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð·Ð°Ð½Ð°Ð´Ñ‚Ð¾ мала ({{ width }}px). Мінімально допуÑтима ширина {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + ВиÑота Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð·Ð°Ð½Ð°Ð´Ñ‚Ð¾ велика ({{ height }}px). МакÑимально допуÑтима виÑота {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + ВиÑота Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð·Ð°Ð½Ð°Ð´Ñ‚Ð¾ мала ({{ height }}px). Мінімально допуÑтима виÑота {{ min_height }}px. + + + This value should be the user's current password. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ñ” бути поточним паролем кориÑтувача. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð¸Ð½Ð¾ бути рівним {{ limit }} Ñимволу.|Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð¸Ð½Ð¾ бути рівним {{ limit }} Ñимволам.|Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð¸Ð½Ð¾ бути рівним {{ limit }} Ñимволам. + + + The file was only partially uploaded. + Файл був завантажений лише чаÑтково. + + + No file was uploaded. + Файл не був завантажений. + + + No temporary folder was configured in php.ini. + Ðе налаштована тимчаÑова Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ñ–Ñ Ð² php.ini. + + + Cannot write temporary file to disk. + Ðеможливо запиÑати тимчаÑовий файл на диÑк. + + + A PHP extension caused the upload to fail. + Ð Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ PHP викликало помилку при завантаженні. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ð¦Ñ ÐºÐ¾Ð»ÐµÐºÑ†Ñ–Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð° міÑтити {{ limit }} елемент чи більше.|Ð¦Ñ ÐºÐ¾Ð»ÐµÐºÑ†Ñ–Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð° міÑтити {{ limit }} елемента чи більше.|Ð¦Ñ ÐºÐ¾Ð»ÐµÐºÑ†Ñ–Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð° міÑтити {{ limit }} елементів чи більше. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ð¦Ñ ÐºÐ¾Ð»ÐµÐºÑ†Ñ–Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð° міÑтити {{ limit }} елемент чи менше.|Ð¦Ñ ÐºÐ¾Ð»ÐµÐºÑ†Ñ–Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð° міÑтити {{ limit }} елемента чи менше.|Ð¦Ñ ÐºÐ¾Ð»ÐµÐºÑ†Ñ–Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð° міÑтити {{ limit }} елементов чи менше. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ð¦Ñ ÐºÐ¾Ð»ÐµÐºÑ†Ñ–Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð° міÑтити рівно {{ limit }} елемент.|Ð¦Ñ ÐºÐ¾Ð»ÐµÐºÑ†Ñ–Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð° міÑтити рівно {{ limit }} елемента.|Ð¦Ñ ÐºÐ¾Ð»ÐµÐºÑ†Ñ–Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð° міÑтити рівно {{ limit }} елементів. + + + Invalid card number. + Ðевірний номер карти. + + + Unsupported card type or invalid card number. + Ðепідтримуваний тип карти або невірний номер карти. + + + This is not a valid International Bank Account Number (IBAN). + Це не дійÑний міжнародний номер банківÑького рахунку (IBAN). + + + This value is not a valid ISBN-10. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ у форматі ISBN-10. + + + This value is not a valid ISBN-13. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ у форматі ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ відповідає форматам ISBN-10 та ISBN-13. + + + This value is not a valid ISSN. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ñ” невірний формат ISSN. + + + This value is not a valid currency. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ñ” невірний формат валюти. + + + This value should be equal to {{ compared_value }}. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð¾ дорівнювати {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ñ” бути більше ніж {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ñ” бути більше або дорівнювати {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ñ” бути ідентичним {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð¾ бути менше ніж {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð¾ бути менше або дорівнювати {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ повинно дорівнювати {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ повинно бути ідентичним {{ compared_value_type }} {{ compared_value }}. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf new file mode 100644 index 0000000000000000000000000000000000000000..e1833c79cb470a20f7df7d68802b5824da9d2932 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + Giá trị này phải là sai. + + + This value should be true. + Giá trị này phải là đúng. + + + This value should be of type {{ type }}. + Giá trị này phải là kiểu {{ type }}. + + + This value should be blank. + Giá trị này phải rá»—ng. + + + The value you selected is not a valid choice. + Giá trị bạn vừa chá»n không hợp lệ. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Bạn phải chá»n ít nhất {{ limit }} lá»±a chá»n.|Bạn phải chá»n ít nhất {{ limit }} lá»±a chá»n. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Bạn phải chá»n nhiá»u nhất {{ limit }} lá»±a chá»n.|Bạn phải chá»n nhiá»u nhất {{ limit }} lá»±a chá»n. + + + One or more of the given values is invalid. + Má»™t hoặc nhiá»u giá trị được chá»n không hợp lệ. + + + This field was not expected. + LÄ©nh vá»±c này không được dá»± kiến. + + + This field is missing. + LÄ©nh vá»±c này là mất tích. + + + This value is not a valid date. + Giá trị không phải là ngày hợp lệ. + + + This value is not a valid datetime. + Giá trị không phải là ngày tháng hợp lệ. + + + This value is not a valid email address. + Giá trị này không phải là email hợp lệ. + + + The file could not be found. + Tập tin không tìm thấy. + + + The file is not readable. + Tập tin không thể Ä‘á»c được. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Tập tin quá lá»›n ({{ size }} {{ suffix }}). Kích thước tối Ä‘a cho phép {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Kiểu mime cá»§a tập tin không hợp lệ ({{ type }}). Kiểu hợp lệ là {{ types }}. + + + This value should be {{ limit }} or less. + Giá trị phải bằng hoặc nhá» hÆ¡n {{ limit }}. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Giá trị quá dài. Phải bằng hoặc ít hÆ¡n {{ limit }} kí tá»±.|Giá trị quá dài. Phải bằng hoặc ít hÆ¡n {{ limit }} kí tá»±. + + + This value should be {{ limit }} or more. + Giá trị phải lá»›n hÆ¡n hoặc bằng {{ limit }}. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Giá trị quá ngắn. Phải hÆ¡n hoặc bằng {{ limit }} kí tá»±.|Giá trị quá ngắn. Phải hÆ¡n hoặc bằng {{ limit }} kí tá»±. + + + This value should not be blank. + Giá trị không được phép để trống. + + + This value should not be null. + Giá trị không được phép rá»—ng. + + + This value should be null. + Giá trị phải rá»—ng. + + + This value is not valid. + Giá trị không hợp lệ. + + + This value is not a valid time. + Giá trị không phải là thá»i gian hợp lệ. + + + This value is not a valid URL. + Giá trị không phải là địa chỉ URL hợp lệ. + + + The two values should be equal. + Hai giá trị phải bằng nhau. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Tập tin quá lá»›n. Kích thước tối Ä‘a cho phép là {{ limit }} {{ suffix }}. + + + The file is too large. + Tập tin quá lá»›n. + + + The file could not be uploaded. + Tập tin không thể tải lên. + + + This value should be a valid number. + Giá trị phải là con số. + + + This file is not a valid image. + Tập tin không phải là hình ảnh. + + + This is not a valid IP address. + Äịa chỉ IP không hợp lệ. + + + This value is not a valid language. + Giá trị không phải là ngôn ngữ hợp lệ. + + + This value is not a valid locale. + Giá trị không phải là má»™t bản địa địa phương hợp lệ. + + + This value is not a valid country. + Giá trị không phải là nước hợp lệ. + + + This value is already used. + Giá trị đã được sá»­ dụng. + + + The size of the image could not be detected. + Kích thước cá»§a hình ảnh không thể xác định. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Chiá»u rá»™ng cá»§a hình quá lá»›n ({{ width }}px). Chiá»u rá»™ng tối Ä‘a phải là {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Chiá»u rá»™ng cá»§a hình quá thấp ({{ width }}px). Chiá»u rá»™ng tối thiểu phải là {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Chiá»u cao cá»§a hình quá cao ({{ height }}px). Chiá»u cao tối Ä‘a phải là {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Chiá»u cao cá»§a hình quá thấp ({{ height }}px). Chiá»u cao tối thiểu phải là {{ min_height }}px. + + + This value should be the user's current password. + Giá trị này phải là mật khẩu hiện tại cá»§a ngưá»i dùng. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Giá trị phải có chính xác {{ limit }} kí tá»±.|Giá trị phải có chính xác {{ limit }} kí tá»±. + + + The file was only partially uploaded. + Tập tin chỉ được tải lên má»™t phần. + + + No file was uploaded. + Tập tin không được tải lên. + + + No temporary folder was configured in php.ini. + Thư mục tạm không được định nghÄ©a trong php.ini. + + + Cannot write temporary file to disk. + Không thể ghi tập tin tạm ra đĩa. + + + A PHP extension caused the upload to fail. + Má»™t PHP extension đã phá há»ng quá trình tải lên cá»§a tập tin. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Danh sách phải chứa {{ limit }} hoặc nhiá»u hÆ¡n thành phần.|Danh sách phải chứa {{ limit }} hoặc nhiá»u hÆ¡n thành phần. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Danh sách phải chứa {{ limit }} hoặc ít hÆ¡n thành phần.|Danh sách phải chứa {{ limit }} hoặc ít hÆ¡n thành phần. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Danh sách phải chứa chính xác {{ limit }} thành phần.|Danh sách phải chứa chính xác {{ limit }} thành phần. + + + Invalid card number. + Số thẻ không hợp lệ. + + + Unsupported card type or invalid card number. + Thẻ không được há»— trợ hoặc số thẻ không hợp lệ. + + + This is not a valid International Bank Account Number (IBAN). + Giá trị không phải là International Bank Account Number (IBAN) hợp lệ. + + + This value is not a valid ISBN-10. + Giá trị không phải là ISBN-10 hợp lệ. + + + This value is not a valid ISBN-13. + Giá trị không phải là ISBN-13 hợp lệ. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Giá trị không phải là ISBN-10 hoặc ISBN-13 hợp lệ. + + + This value is not a valid ISSN. + Giá trị không là ISSN hợp lệ. + + + This value is not a valid currency. + Giá trị không phải là đơn vi tiá»n tệ hợp lệ. + + + This value should be equal to {{ compared_value }}. + Giá trị phải bằng {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Giá trị phải lá»›n hÆ¡n {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Giá trị phải lá»›n hÆ¡n hoặc bằng {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Giá trị phải giống {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Giá trị phải bé hÆ¡n {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Giá trị không được phép nhá» hÆ¡n hoặc bằng {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Giá trị không được phép bằng {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Giá trị không được phép giống như {{ compared_value_type }} {{ compared_value }}. + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf new file mode 100644 index 0000000000000000000000000000000000000000..6c95ef1a20ddaa28f33135bfc51c89614571bc66 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf @@ -0,0 +1,315 @@ + + + + + + This value should be false. + 该å˜é‡çš„值应为 false 。 + + + This value should be true. + 该å˜é‡çš„值应为 true 。 + + + This value should be of type {{ type }}. + 该å˜é‡çš„类型应为 {{ type }} 。 + + + This value should be blank. + 该å˜é‡å€¼åº”为空。 + + + The value you selected is not a valid choice. + 选定å˜é‡çš„值䏿˜¯æœ‰æ•ˆçš„选项。 + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + 您至少è¦é€‰æ‹© {{ limit }} 个选项。 + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + 您最多能选择 {{ limit }} 个选项。 + + + One or more of the given values is invalid. + 一个或者多个给定的值无效。 + + + This field was not expected. + 此字段是多余的。 + + + This field is missing. + 此字段缺失。 + + + This value is not a valid date. + è¯¥å€¼ä¸æ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„æ—¥æœŸï¼ˆdate)。 + + + This value is not a valid datetime. + è¯¥å€¼ä¸æ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„æ—¥æœŸæ—¶é—´ï¼ˆdatetime)。 + + + This value is not a valid email address. + è¯¥å€¼ä¸æ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„邮件地å€ã€‚ + + + The file could not be found. + 文件未找到。 + + + The file is not readable. + 文件ä¸å¯è¯»ã€‚ + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + 文件太大 ({{ size }} {{ suffix }})。文件大å°ä¸å¯ä»¥è¶…过 {{ limit }} {{ suffix }} 。 + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + 无效的文件类型 ({{ type }}) 。å…许的文件类型有 {{ types }} 。 + + + This value should be {{ limit }} or less. + 这个å˜é‡çš„值应该å°äºŽæˆ–等于 {{ limit }}。 + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + 字符串太长,长度ä¸å¯è¶…过 {{ limit }} 个字符。 + + + This value should be {{ limit }} or more. + 该å˜é‡çš„值应该大于或等于 {{ limit }}。 + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + 字符串太短,长度ä¸å¯å°‘于 {{ limit }} 个字符。 + + + This value should not be blank. + 该å˜é‡ä¸åº”为空。 + + + This value should not be null. + 该å˜é‡ä¸åº”为 null 。 + + + This value should be null. + 该å˜é‡åº”为空 null 。 + + + This value is not valid. + 该å˜é‡å€¼æ— æ•ˆ 。 + + + This value is not a valid time. + è¯¥å€¼ä¸æ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„æ—¶é—´ã€‚ + + + This value is not a valid URL. + è¯¥å€¼ä¸æ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„ URL 。 + + + The two values should be equal. + 这两个å˜é‡çš„值应该相等。 + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + 文件太大,文件大å°ä¸å¯ä»¥è¶…过 {{ limit }} {{ suffix }}。 + + + The file is too large. + 文件太大。 + + + The file could not be uploaded. + 无法上传此文件。 + + + This value should be a valid number. + 该值应该为有效的数字。 + + + This value is not a valid country. + è¯¥å€¼ä¸æ˜¯æœ‰æ•ˆçš„国家å。 + + + This file is not a valid image. + è¯¥æ–‡ä»¶ä¸æ˜¯æœ‰æ•ˆçš„图片。 + + + This is not a valid IP address. + è¯¥å€¼ä¸æ˜¯æœ‰æ•ˆçš„IP地å€ã€‚ + + + This value is not a valid language. + è¯¥å€¼ä¸æ˜¯æœ‰æ•ˆçš„语言å。 + + + This value is not a valid locale. + è¯¥å€¼ä¸æ˜¯æœ‰æ•ˆçš„区域值(locale)。 + + + This value is already used. + 该值已ç»è¢«ä½¿ç”¨ã€‚ + + + The size of the image could not be detected. + ä¸èƒ½è§£æžå›¾ç‰‡å¤§å°ã€‚ + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + 图片太宽 ({{ width }}px),最大宽度为 {{ max_width }}px 。 + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + 图片宽度ä¸å¤Ÿ ({{ width }}px),最å°å®½åº¦ä¸º {{ min_width }}px 。 + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + 图片太高 ({{ height }}px),最大高度为 {{ max_height }}px 。 + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + 图片高度ä¸å¤Ÿ ({{ height }}px),最å°é«˜åº¦ä¸º {{ min_height }}px 。 + + + This value should be the user's current password. + 该å˜é‡çš„值应为用户当å‰çš„密ç ã€‚ + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + 该å˜é‡åº”为 {{ limit }} 个字符。 + + + The file was only partially uploaded. + 该文件的上传ä¸å®Œæ•´ã€‚ + + + No file was uploaded. + 没有上传任何文件。 + + + No temporary folder was configured in php.ini. + php.ini 里没有é…置临时文件目录。 + + + Cannot write temporary file to disk. + 临时文件写入ç£ç›˜å¤±è´¥ã€‚ + + + A PHP extension caused the upload to fail. + æŸä¸ª PHP 扩展造æˆä¸Šä¼ å¤±è´¥ã€‚ + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + è¯¥é›†åˆæœ€å°‘åº”åŒ…å« {{ limit }} 个元素。 + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + è¯¥é›†åˆæœ€å¤šåŒ…å« {{ limit }} 个元素。 + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + 该集åˆåº”åŒ…å« {{ limit }} 个元素 element 。 + + + Invalid card number. + 无效的信用å¡å·ã€‚ + + + Unsupported card type or invalid card number. + 䏿”¯æŒçš„信用å¡ç±»åž‹æˆ–无效的信用å¡å·ã€‚ + + + This is not a valid International Bank Account Number (IBAN). + è¯¥å€¼ä¸æ˜¯æœ‰æ•ˆçš„国际银行å¸å·ï¼ˆIBAN)。 + + + This value is not a valid ISBN-10. + è¯¥å€¼ä¸æ˜¯æœ‰æ•ˆçš„10ä½å›½é™…标准书å·ï¼ˆISBN-10)。 + + + This value is not a valid ISBN-13. + è¯¥å€¼ä¸æ˜¯æœ‰æ•ˆçš„13ä½å›½é™…标准书å·ï¼ˆISBN-13)。 + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + è¯¥å€¼ä¸æ˜¯æœ‰æ•ˆçš„国际标准书å·ï¼ˆISBN-10 或 ISBN-13)。 + + + This value is not a valid ISSN. + è¯¥å€¼ä¸æ˜¯æœ‰æ•ˆçš„国际标准期刊å·ï¼ˆISSN)。 + + + This value is not a valid currency. + è¯¥å€¼ä¸æ˜¯æœ‰æ•ˆçš„è´§å¸å(currency)。 + + + This value should be equal to {{ compared_value }}. + 该值应等于 {{ compared_value }} 。 + + + This value should be greater than {{ compared_value }}. + 该值应大于 {{ compared_value }} 。 + + + This value should be greater than or equal to {{ compared_value }}. + 该值应大于或等于 {{ compared_value }} 。 + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + 该值应与 {{ compared_value_type }} {{ compared_value }} 相åŒã€‚ + + + This value should be less than {{ compared_value }}. + 该值应å°äºŽ {{ compared_value }} 。 + + + This value should be less than or equal to {{ compared_value }}. + 该值应å°äºŽæˆ–等于 {{ compared_value }} 。 + + + This value should not be equal to {{ compared_value }}. + 该值ä¸åº”先等于 {{ compared_value }} 。 + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + 该值ä¸åº”与 {{ compared_value_type }} {{ compared_value }} 相åŒã€‚ + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + 图片宽高比太大 ({{ ratio }})。å…许的最大宽高比为 {{ max_ratio }}。 + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + å›¾ç‰‡å®½é«˜æ¯”å¤ªå° ({{ ratio }})。å…许的最大宽高比为 {{ min_ratio }}。 + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + 图片是方形的 ({{ width }}x{{ height }}px)。ä¸å…许使用方形的图片。 + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + 图片是横å‘çš„ ({{ width }}x{{ height }}px)。ä¸å…许使用横å‘的图片。 + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + 图片是纵å‘çš„ ({{ width }}x{{ height }}px)。ä¸å…许使用纵å‘的图片。 + + + An empty file is not allowed. + ä¸å…许使用空文件。 + + + The host could not be resolved. + ä¸»æœºåæ— æ³•è§£æžã€‚ + + + This value does not match the expected {{ charset }} charset. + 该值ä¸ç¬¦åˆ {{ charset }} ç¼–ç ã€‚ + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf new file mode 100644 index 0000000000000000000000000000000000000000..d9d5f2f622b43fc5c155e0a08e781807f30e58e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + 該變數的值應為 false 。 + + + This value should be true. + 該變數的值應為 true 。 + + + This value should be of type {{ type }}. + 該變數的類型應為 {{ type }} 。 + + + This value should be blank. + 該變數應為空。 + + + The value you selected is not a valid choice. + é¸å®šè®Šæ•¸çš„值䏿˜¯æœ‰æ•ˆçš„é¸é …。 + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + 您至少è¦é¸æ“‡ {{ limit }} 個é¸é …。 + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + æ‚¨æœ€å¤šèƒ½é¸æ“‡ {{ limit }} 個é¸é …。 + + + One or more of the given values is invalid. + 一個或者多個給定的值無效。 + + + This field was not expected. + æ­¤å­—æ®µæ˜¯æ²’æœ‰é æ–™åˆ°ã€‚ + + + This field is missing. + 此字段缺失。 + + + This value is not a valid date. + è©²å€¼ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„æ—¥æœŸï¼ˆdate)。 + + + This value is not a valid datetime. + è©²å€¼ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„æ—¥æœŸæ™‚間(datetime)。 + + + This value is not a valid email address. + è©²å€¼ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„郵件地å€ã€‚ + + + The file could not be found. + 找ä¸åˆ°æª”案。 + + + The file is not readable. + ç„¡æ³•è®€å–æª”案。 + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + 檔案太大 ({{ size }} {{ suffix }})。檔案大å°ä¸å¯ä»¥è¶…éŽ {{ limit }} {{ suffix }} 。 + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + 無效的檔案類型 ({{ type }}) 。å…許的檔案類型有 {{ types }} 。 + + + This value should be {{ limit }} or less. + é€™å€‹è®Šæ•¸çš„å€¼æ‡‰è©²å°æ–¼æˆ–等於 {{ limit }}。 + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + 字串太長,長度ä¸å¯è¶…éŽ {{ limit }} 個字元。 + + + This value should be {{ limit }} or more. + 該變數的值應該大於或等於 {{ limit }}。 + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + 字串太短,長度ä¸å¯å°‘æ–¼ {{ limit }} 個字元。 + + + This value should not be blank. + è©²è®Šæ•¸ä¸æ‡‰ç‚ºç©ºç™½ã€‚ + + + This value should not be null. + è©²å€¼ä¸æ‡‰ç‚º null 。 + + + This value should be null. + 該值應為 null 。 + + + This value is not valid. + 無效的數值 。 + + + This value is not a valid time. + è©²å€¼ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„æ™‚間。 + + + This value is not a valid URL. + è©²å€¼ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„ URL 。 + + + The two values should be equal. + 這兩個變數的值應該相等。 + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + 檔案太大,檔案大å°ä¸å¯ä»¥è¶…éŽ {{ limit }} {{ suffix }}。 + + + The file is too large. + 檔案太大。 + + + The file could not be uploaded. + 無法上傳此檔案。 + + + This value should be a valid number. + 該值應該為有效的數字。 + + + This value is not a valid country. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„國家å。 + + + This file is not a valid image. + è©²æª”æ¡ˆä¸æ˜¯æœ‰æ•ˆçš„圖片。 + + + This is not a valid IP address. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„IP地å€ã€‚ + + + This value is not a valid language. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„語言å。 + + + This value is not a valid locale. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„å€åŸŸå€¼ï¼ˆlocale)。 + + + This value is already used. + 該值已經被使用。 + + + The size of the image could not be detected. + ä¸èƒ½è§£æžåœ–片大å°ã€‚ + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + 圖片太寬 ({{ width }}px),最大寬度為 {{ max_width }}px 。 + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + 圖片寬度ä¸å¤  ({{ width }}px),最å°å¯¬åº¦ç‚º {{ min_width }}px 。 + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + 圖片太高 ({{ height }}px),最大高度為 {{ max_height }}px 。 + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + 圖片高度ä¸å¤  ({{ height }}px),最å°é«˜åº¦ç‚º {{ min_height }}px 。 + + + This value should be the user's current password. + 該變數的值應為用戶目å‰çš„密碼。 + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + 該變數應為 {{ limit }} 個字元。 + + + The file was only partially uploaded. + 該檔案的上傳ä¸å®Œæ•´ã€‚ + + + No file was uploaded. + 沒有上傳任何檔案。 + + + No temporary folder was configured in php.ini. + php.ini 裡沒有é…置臨時目錄。 + + + Cannot write temporary file to disk. + 暫存檔寫入ç£ç¢Ÿå¤±æ•—。 + + + A PHP extension caused the upload to fail. + æŸå€‹ PHP 擴展造æˆä¸Šå‚³å¤±æ•—。 + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + è©²é›†åˆæœ€å°‘æ‡‰åŒ…å« {{ limit }} 個元素。 + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + è©²é›†åˆæœ€å¤šåŒ…å« {{ limit }} 個元素。 + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + è©²é›†åˆæ‡‰åŒ…å« {{ limit }} 個元素 element 。 + + + Invalid card number. + 無效的信用å¡è™Ÿã€‚ + + + Unsupported card type or invalid card number. + 䏿”¯æ´çš„信用å¡é¡žåž‹æˆ–無效的信用å¡è™Ÿã€‚ + + + This is not a valid International Bank Account Number (IBAN). + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„國際銀行帳號(IBAN)。 + + + This value is not a valid ISBN-10. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„10ä½åœ‹é𛿍™æº–書號(ISBN-10)。 + + + This value is not a valid ISBN-13. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„13ä½åœ‹é𛿍™æº–書號(ISBN-13)。 + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„國際標準書號(ISBN-10 或 ISBN-13)。 + + + This value is not a valid ISSN. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„國際標準期刊號(ISSN)。 + + + This value is not a valid currency. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„貨幣å(currency)。 + + + This value should be equal to {{ compared_value }}. + 該值應等於 {{ compared_value }} 。 + + + This value should be greater than {{ compared_value }}. + 該值應大於 {{ compared_value }} 。 + + + This value should be greater than or equal to {{ compared_value }}. + 該值應大於或等於 {{ compared_value }} 。 + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + 該值應與 {{ compared_value_type }} {{ compared_value }} 相åŒã€‚ + + + This value should be less than {{ compared_value }}. + è©²å€¼æ‡‰å°æ–¼ {{ compared_value }} 。 + + + This value should be less than or equal to {{ compared_value }}. + è©²å€¼æ‡‰å°æ–¼æˆ–等於 {{ compared_value }} 。 + + + This value should not be equal to {{ compared_value }}. + 該值應ä¸ç­‰æ–¼ {{ compared_value }} 。 + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + è©²å€¼ä¸æ‡‰èˆ‡ {{ compared_value_type }} {{ compared_value }} 相åŒã€‚ + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..c2932f81e8b1f54acf3477fa6cce9180f051ff42 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php @@ -0,0 +1,343 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Test; + +use PHPUnit\Framework\Assert; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\ConstraintValidatorInterface; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\Context\ExecutionContext; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\PropertyMetadata; + +/** + * A test case to ease testing Constraint Validators. + * + * @author Bernhard Schussek + */ +abstract class ConstraintValidatorTestCase extends TestCase +{ + /** + * @var ExecutionContextInterface + */ + protected $context; + + /** + * @var ConstraintValidatorInterface + */ + protected $validator; + + protected $group; + protected $metadata; + protected $object; + protected $value; + protected $root; + protected $propertyPath; + protected $constraint; + protected $defaultTimezone; + + protected function setUp() + { + $this->group = 'MyGroup'; + $this->metadata = null; + $this->object = null; + $this->value = 'InvalidValue'; + $this->root = 'root'; + $this->propertyPath = 'property.path'; + + // Initialize the context with some constraint so that we can + // successfully build a violation. + $this->constraint = new NotNull(); + + $this->context = $this->createContext(); + $this->validator = $this->createValidator(); + $this->validator->initialize($this->context); + + \Locale::setDefault('en'); + + $this->setDefaultTimezone('UTC'); + } + + protected function tearDown() + { + $this->restoreDefaultTimezone(); + } + + protected function setDefaultTimezone($defaultTimezone) + { + // Make sure this method can not be called twice before calling + // also restoreDefaultTimezone() + if (null === $this->defaultTimezone) { + $this->defaultTimezone = date_default_timezone_get(); + date_default_timezone_set($defaultTimezone); + } + } + + protected function restoreDefaultTimezone() + { + if (null !== $this->defaultTimezone) { + date_default_timezone_set($this->defaultTimezone); + $this->defaultTimezone = null; + } + } + + protected function createContext() + { + $translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock(); + $validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); + $contextualValidator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ContextualValidatorInterface')->getMock(); + + $context = new ExecutionContext($validator, $this->root, $translator); + $context->setGroup($this->group); + $context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); + $context->setConstraint($this->constraint); + + $validator->expects($this->any()) + ->method('inContext') + ->with($context) + ->will($this->returnValue($contextualValidator)); + + return $context; + } + + protected function setGroup($group) + { + $this->group = $group; + $this->context->setGroup($group); + } + + protected function setObject($object) + { + $this->object = $object; + $this->metadata = is_object($object) + ? new ClassMetadata(get_class($object)) + : null; + + $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); + } + + protected function setProperty($object, $property) + { + $this->object = $object; + $this->metadata = is_object($object) + ? new PropertyMetadata(get_class($object), $property) + : null; + + $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); + } + + protected function setValue($value) + { + $this->value = $value; + $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); + } + + protected function setRoot($root) + { + $this->root = $root; + $this->context = $this->createContext(); + $this->validator->initialize($this->context); + } + + protected function setPropertyPath($propertyPath) + { + $this->propertyPath = $propertyPath; + $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); + } + + protected function expectNoValidate() + { + $validator = $this->context->getValidator()->inContext($this->context); + $validator->expects($this->never()) + ->method('atPath'); + $validator->expects($this->never()) + ->method('validate'); + } + + protected function expectValidateAt($i, $propertyPath, $value, $group) + { + $validator = $this->context->getValidator()->inContext($this->context); + $validator->expects($this->at(2 * $i)) + ->method('atPath') + ->with($propertyPath) + ->will($this->returnValue($validator)); + $validator->expects($this->at(2 * $i + 1)) + ->method('validate') + ->with($value, $this->logicalOr(null, array(), $this->isInstanceOf('\Symfony\Component\Validator\Constraints\Valid')), $group); + } + + protected function expectValidateValueAt($i, $propertyPath, $value, $constraints, $group = null) + { + $contextualValidator = $this->context->getValidator()->inContext($this->context); + $contextualValidator->expects($this->at(2 * $i)) + ->method('atPath') + ->with($propertyPath) + ->will($this->returnValue($contextualValidator)); + $contextualValidator->expects($this->at(2 * $i + 1)) + ->method('validate') + ->with($value, $constraints, $group); + } + + protected function assertNoViolation() + { + $this->assertSame(0, $violationsCount = count($this->context->getViolations()), sprintf('0 violation expected. Got %u.', $violationsCount)); + } + + /** + * @param $message + * + * @return ConstraintViolationAssertion + */ + protected function buildViolation($message) + { + return new ConstraintViolationAssertion($this->context, $message, $this->constraint); + } + + abstract protected function createValidator(); +} + +/** + * @internal + */ +class ConstraintViolationAssertion +{ + /** + * @var ExecutionContextInterface + */ + private $context; + + /** + * @var ConstraintViolationAssertion[] + */ + private $assertions; + + private $message; + private $parameters = array(); + private $invalidValue = 'InvalidValue'; + private $propertyPath = 'property.path'; + private $translationDomain; + private $plural; + private $code; + private $constraint; + private $cause; + + public function __construct(ExecutionContextInterface $context, $message, Constraint $constraint = null, array $assertions = array()) + { + $this->context = $context; + $this->message = $message; + $this->constraint = $constraint; + $this->assertions = $assertions; + } + + public function atPath($path) + { + $this->propertyPath = $path; + + return $this; + } + + public function setParameter($key, $value) + { + $this->parameters[$key] = $value; + + return $this; + } + + public function setParameters(array $parameters) + { + $this->parameters = $parameters; + + return $this; + } + + public function setTranslationDomain($translationDomain) + { + $this->translationDomain = $translationDomain; + + return $this; + } + + public function setInvalidValue($invalidValue) + { + $this->invalidValue = $invalidValue; + + return $this; + } + + public function setPlural($number) + { + $this->plural = $number; + + return $this; + } + + public function setCode($code) + { + $this->code = $code; + + return $this; + } + + public function setCause($cause) + { + $this->cause = $cause; + + return $this; + } + + public function buildNextViolation($message) + { + $assertions = $this->assertions; + $assertions[] = $this; + + return new self($this->context, $message, $this->constraint, $assertions); + } + + public function assertRaised() + { + $expected = array(); + foreach ($this->assertions as $assertion) { + $expected[] = $assertion->getViolation(); + } + $expected[] = $this->getViolation(); + + $violations = iterator_to_array($this->context->getViolations()); + + Assert::assertSame($expectedCount = count($expected), $violationsCount = count($violations), sprintf('%u violation(s) expected. Got %u.', $expectedCount, $violationsCount)); + + reset($violations); + + foreach ($expected as $violation) { + Assert::assertEquals($violation, current($violations)); + next($violations); + } + } + + private function getViolation() + { + return new ConstraintViolation( + null, + $this->message, + $this->parameters, + $this->context->getRoot(), + $this->propertyPath, + $this->invalidValue, + $this->plural, + $this->code, + $this->constraint, + $this->cause + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1b1219664402b85b4b54396e6bbbc1a9c510f4e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintTest.php @@ -0,0 +1,241 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Tests\Fixtures\ClassConstraint; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintC; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintWithValue; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintWithValueAsDefault; + +class ConstraintTest extends TestCase +{ + public function testSetProperties() + { + $constraint = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + )); + + $this->assertEquals('foo', $constraint->property1); + $this->assertEquals('bar', $constraint->property2); + } + + public function testSetNotExistingPropertyThrowsException() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\InvalidOptionsException'); + + new ConstraintA(array( + 'foo' => 'bar', + )); + } + + public function testMagicPropertiesAreNotAllowed() + { + $constraint = new ConstraintA(); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\InvalidOptionsException'); + + $constraint->foo = 'bar'; + } + + public function testInvalidAndRequiredOptionsPassed() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\InvalidOptionsException'); + + new ConstraintC(array( + 'option1' => 'default', + 'foo' => 'bar', + )); + } + + public function testSetDefaultProperty() + { + $constraint = new ConstraintA('foo'); + + $this->assertEquals('foo', $constraint->property2); + } + + public function testSetDefaultPropertyDoctrineStyle() + { + $constraint = new ConstraintA(array('value' => 'foo')); + + $this->assertEquals('foo', $constraint->property2); + } + + public function testSetDefaultPropertyDoctrineStylePlusOtherProperty() + { + $constraint = new ConstraintA(array('value' => 'foo', 'property1' => 'bar')); + + $this->assertEquals('foo', $constraint->property2); + $this->assertEquals('bar', $constraint->property1); + } + + public function testSetDefaultPropertyDoctrineStyleWhenDefaultPropertyIsNamedValue() + { + $constraint = new ConstraintWithValueAsDefault(array('value' => 'foo')); + + $this->assertEquals('foo', $constraint->value); + $this->assertNull($constraint->property); + } + + public function testDontSetDefaultPropertyIfValuePropertyExists() + { + $constraint = new ConstraintWithValue(array('value' => 'foo')); + + $this->assertEquals('foo', $constraint->value); + $this->assertNull($constraint->property); + } + + public function testSetUndefinedDefaultProperty() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); + + new ConstraintB('foo'); + } + + public function testRequiredOptionsMustBeDefined() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\MissingOptionsException'); + + new ConstraintC(); + } + + public function testRequiredOptionsPassed() + { + new ConstraintC(array('option1' => 'default')); + } + + public function testGroupsAreConvertedToArray() + { + $constraint = new ConstraintA(array('groups' => 'Foo')); + + $this->assertEquals(array('Foo'), $constraint->groups); + } + + public function testAddDefaultGroupAddsGroup() + { + $constraint = new ConstraintA(array('groups' => 'Default')); + $constraint->addImplicitGroupName('Foo'); + $this->assertEquals(array('Default', 'Foo'), $constraint->groups); + } + + public function testAllowsSettingZeroRequiredPropertyValue() + { + $constraint = new ConstraintA(0); + $this->assertEquals(0, $constraint->property2); + } + + public function testCanCreateConstraintWithNoDefaultOptionAndEmptyArray() + { + new ConstraintB(array()); + } + + public function testGetTargetsCanBeString() + { + $constraint = new ClassConstraint(); + + $this->assertEquals('class', $constraint->getTargets()); + } + + public function testGetTargetsCanBeArray() + { + $constraint = new ConstraintA(); + + $this->assertEquals(array('property', 'class'), $constraint->getTargets()); + } + + public function testSerialize() + { + $constraint = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + )); + + $restoredConstraint = unserialize(serialize($constraint)); + + $this->assertEquals($constraint, $restoredConstraint); + } + + public function testSerializeInitializesGroupsOptionToDefault() + { + $constraint = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + )); + + $constraint = unserialize(serialize($constraint)); + + $expected = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + 'groups' => 'Default', + )); + + $this->assertEquals($expected, $constraint); + } + + public function testSerializeKeepsCustomGroups() + { + $constraint = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + 'groups' => 'MyGroup', + )); + + $constraint = unserialize(serialize($constraint)); + + $this->assertSame(array('MyGroup'), $constraint->groups); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\InvalidArgumentException + */ + public function testGetErrorNameForUnknownCode() + { + Constraint::getErrorName(1); + } + + public function testOptionsAsDefaultOption() + { + $constraint = new ConstraintA($options = array('value1')); + + $this->assertEquals($options, $constraint->property2); + + $constraint = new ConstraintA($options = array('value1', 'property1' => 'value2')); + + $this->assertEquals($options, $constraint->property2); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\InvalidOptionsException + * @expectedExceptionMessage The options "0", "5" do not exist + */ + public function testInvalidOptions() + { + new ConstraintA(array('property2' => 'foo', 'bar', 5 => 'baz')); + } + + public function testOptionsWithInvalidInternalPointer() + { + $options = array('property1' => 'foo'); + next($options); + next($options); + + $constraint = new ConstraintA($options); + + $this->assertEquals('foo', $constraint->property1); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6f4518cab39e45373c37d9b3ac4a5ac5605fa119 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.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\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationList; + +class ConstraintViolationListTest extends TestCase +{ + protected $list; + + protected function setUp() + { + $this->list = new ConstraintViolationList(); + } + + protected function tearDown() + { + $this->list = null; + } + + public function testInit() + { + $this->assertCount(0, $this->list); + } + + public function testInitWithViolations() + { + $violation = $this->getViolation('Error'); + $this->list = new ConstraintViolationList(array($violation)); + + $this->assertCount(1, $this->list); + $this->assertSame($violation, $this->list[0]); + } + + public function testAdd() + { + $violation = $this->getViolation('Error'); + $this->list->add($violation); + + $this->assertCount(1, $this->list); + $this->assertSame($violation, $this->list[0]); + } + + public function testAddAll() + { + $violations = array( + 10 => $this->getViolation('Error 1'), + 20 => $this->getViolation('Error 2'), + 30 => $this->getViolation('Error 3'), + ); + $otherList = new ConstraintViolationList($violations); + $this->list->addAll($otherList); + + $this->assertCount(3, $this->list); + + $this->assertSame($violations[10], $this->list[0]); + $this->assertSame($violations[20], $this->list[1]); + $this->assertSame($violations[30], $this->list[2]); + } + + public function testIterator() + { + $violations = array( + 10 => $this->getViolation('Error 1'), + 20 => $this->getViolation('Error 2'), + 30 => $this->getViolation('Error 3'), + ); + + $this->list = new ConstraintViolationList($violations); + + // indices are reset upon adding -> array_values() + $this->assertSame(array_values($violations), iterator_to_array($this->list)); + } + + public function testArrayAccess() + { + $violation = $this->getViolation('Error'); + $this->list[] = $violation; + + $this->assertSame($violation, $this->list[0]); + $this->assertTrue(isset($this->list[0])); + + unset($this->list[0]); + + $this->assertFalse(isset($this->list[0])); + + $this->list[10] = $violation; + + $this->assertSame($violation, $this->list[10]); + $this->assertTrue(isset($this->list[10])); + } + + public function testToString() + { + $this->list = new ConstraintViolationList(array( + $this->getViolation('Error 1', 'Root'), + $this->getViolation('Error 2', 'Root', 'foo.bar'), + $this->getViolation('Error 3', 'Root', '[baz]'), + $this->getViolation('Error 4', '', 'foo.bar'), + $this->getViolation('Error 5', '', '[baz]'), + )); + + $expected = <<<'EOF' +Root: + Error 1 +Root.foo.bar: + Error 2 +Root[baz]: + Error 3 +foo.bar: + Error 4 +[baz]: + Error 5 + +EOF; + + $this->assertEquals($expected, (string) $this->list); + } + + protected function getViolation($message, $root = null, $propertyPath = null) + { + return new ConstraintViolation($message, $message, array(), $root, $propertyPath, null); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cef4782e0f82d4382bb1c5982b73d7d116ab34bb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\ConstraintViolation; + +class ConstraintViolationTest extends TestCase +{ + public function testToStringHandlesArrays() + { + $violation = new ConstraintViolation( + 'Array', + '{{ value }}', + array('{{ value }}' => array(1, 2, 3)), + 'Root', + 'property.path', + null + ); + + $expected = <<<'EOF' +Root.property.path: + Array +EOF; + + $this->assertSame($expected, (string) $violation); + } + + public function testToStringHandlesArrayRoots() + { + $violation = new ConstraintViolation( + '42 cannot be used here', + 'this is the message template', + array(), + array('some_value' => 42), + 'some_value', + null + ); + + $expected = <<<'EOF' +Array.some_value: + 42 cannot be used here +EOF; + + $this->assertSame($expected, (string) $violation); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..437c7453cfe835d538b1441ec842a55a325b2a33 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php @@ -0,0 +1,178 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Intl\Util\IntlTestHelper; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class ComparisonTest_Class +{ + protected $value; + + public function __construct($value) + { + $this->value = $value; + } + + public function __toString() + { + return (string) $this->value; + } +} + +/** + * @author Daniel Holmes + */ +abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTestCase +{ + protected static function addPhp5Dot5Comparisons(array $comparisons) + { + $result = $comparisons; + + // Duplicate all tests involving DateTime objects to be tested with + // DateTimeImmutable objects as well + foreach ($comparisons as $comparison) { + $add = false; + + foreach ($comparison as $i => $value) { + if ($value instanceof \DateTime) { + $comparison[$i] = new \DateTimeImmutable( + $value->format('Y-m-d H:i:s.u e'), + $value->getTimezone() + ); + $add = true; + } elseif ('DateTime' === $value) { + $comparison[$i] = 'DateTimeImmutable'; + $add = true; + } + } + + if ($add) { + $result[] = $comparison; + } + } + + return $result; + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testThrowsConstraintExceptionIfNoValueOrProperty() + { + $comparison = $this->createConstraint(array()); + + $this->validator->validate('some value', $comparison); + } + + /** + * @dataProvider provideAllValidComparisons + * + * @param mixed $dirtyValue + * @param mixed $comparisonValue + */ + public function testValidComparisonToValue($dirtyValue, $comparisonValue) + { + $constraint = $this->createConstraint(array('value' => $comparisonValue)); + + $this->validator->validate($dirtyValue, $constraint); + + $this->assertNoViolation(); + } + + /** + * @return array + */ + public function provideAllValidComparisons() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $comparisons = self::addPhp5Dot5Comparisons($this->provideValidComparisons()); + + $this->restoreDefaultTimezone(); + + return $comparisons; + } + + /** + * @return array + */ + abstract public function provideValidComparisons(); + + /** + * @dataProvider provideAllInvalidComparisons + * + * @param mixed $dirtyValue + * @param mixed $dirtyValueAsString + * @param mixed $comparedValue + * @param mixed $comparedValueString + * @param string $comparedValueType + */ + public function testInvalidComparisonToValue($dirtyValue, $dirtyValueAsString, $comparedValue, $comparedValueString, $comparedValueType) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + if ($dirtyValue instanceof \DateTime || $dirtyValue instanceof \DateTimeInterface) { + IntlTestHelper::requireIntl($this, '57.1'); + } + + $constraint = $this->createConstraint(array('value' => $comparedValue)); + $constraint->message = 'Constraint Message'; + + $this->validator->validate($dirtyValue, $constraint); + + $this->buildViolation('Constraint Message') + ->setParameter('{{ value }}', $dirtyValueAsString) + ->setParameter('{{ compared_value }}', $comparedValueString) + ->setParameter('{{ compared_value_type }}', $comparedValueType) + ->setCode($this->getErrorCode()) + ->assertRaised(); + } + + /** + * @return array + */ + public function provideAllInvalidComparisons() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $comparisons = self::addPhp5Dot5Comparisons($this->provideInvalidComparisons()); + + $this->restoreDefaultTimezone(); + + return $comparisons; + } + + /** + * @return array + */ + abstract public function provideInvalidComparisons(); + + /** + * @param array $options Options for the constraint + * + * @return Constraint + */ + abstract protected function createConstraint(array $options); + + /** + * @return string|null + */ + protected function getErrorCode() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..52af8991fe0fc8a247cca697d7baca102c0fc61a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +/** + * @deprecated Since Symfony 3.2, use ConstraintValidatorTestCase instead. + */ +abstract class AbstractConstraintValidatorTest extends ConstraintValidatorTestCase +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllTest.php new file mode 100644 index 0000000000000000000000000000000000000000..25e71a1b44dc4a5ca5fc9a873eb2824f059ccf2c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllTest.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Valid; + +/** + * @author Bernhard Schussek + */ +class AllTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectNonConstraints() + { + new All(array( + 'foo', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraint() + { + new All(array( + new Valid(), + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2792dc4014a7338e28477e0b853d291739ae222d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\AllValidator; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class AllValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new AllValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new All(new Range(array('min' => 4)))); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testThrowsExceptionIfNotTraversable() + { + $this->validator->validate('foo.barbar', new All(new Range(array('min' => 4)))); + } + + /** + * @dataProvider getValidArguments + */ + public function testWalkSingleConstraint($array) + { + $constraint = new Range(array('min' => 4)); + + $i = 0; + + foreach ($array as $key => $value) { + $this->expectValidateValueAt($i++, '['.$key.']', $value, array($constraint)); + } + + $this->validator->validate($array, new All($constraint)); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidArguments + */ + public function testWalkMultipleConstraints($array) + { + $constraint1 = new Range(array('min' => 4)); + $constraint2 = new NotNull(); + + $constraints = array($constraint1, $constraint2); + + $i = 0; + + foreach ($array as $key => $value) { + $this->expectValidateValueAt($i++, '['.$key.']', $value, array($constraint1, $constraint2)); + } + + $this->validator->validate($array, new All($constraints)); + + $this->assertNoViolation(); + } + + public function getValidArguments() + { + return array( + array(array(5, 6, 7)), + array(new \ArrayObject(array(5, 6, 7))), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..52f27ddac615cb146050f2631318b18f15753695 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\BicValidator; +use Symfony\Component\Validator\Constraints\Bic; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class BicValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new BicValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Bic()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Bic()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidBics + */ + public function testValidBics($bic) + { + $this->validator->validate($bic, new Bic()); + + $this->assertNoViolation(); + } + + public function getValidBics() + { + // http://formvalidation.io/validators/bic/ + return array( + array('ASPKAT2LXXX'), + array('ASPKAT2L'), + array('DSBACNBXSHA'), + array('UNCRIT2B912'), + array('DABADKKK'), + array('RZOOAT2L303'), + ); + } + + /** + * @dataProvider getInvalidBics + */ + public function testInvalidBics($bic, $code) + { + $constraint = new Bic(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($bic, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$bic.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidBics() + { + return array( + array('DEUTD', Bic::INVALID_LENGTH_ERROR), + array('ASPKAT2LXX', Bic::INVALID_LENGTH_ERROR), + array('ASPKAT2LX', Bic::INVALID_LENGTH_ERROR), + array('ASPKAT2LXXX1', Bic::INVALID_LENGTH_ERROR), + array('DABADKK', Bic::INVALID_LENGTH_ERROR), + array('1SBACNBXSHA', Bic::INVALID_BANK_CODE_ERROR), + array('RZ00AT2L303', Bic::INVALID_BANK_CODE_ERROR), + array('D2BACNBXSHA', Bic::INVALID_BANK_CODE_ERROR), + array('DS3ACNBXSHA', Bic::INVALID_BANK_CODE_ERROR), + array('DSB4CNBXSHA', Bic::INVALID_BANK_CODE_ERROR), + array('DEUT12HH', Bic::INVALID_COUNTRY_CODE_ERROR), + array('DSBAC6BXSHA', Bic::INVALID_COUNTRY_CODE_ERROR), + array('DSBA5NBXSHA', Bic::INVALID_COUNTRY_CODE_ERROR), + + // branch code error + array('THISSVAL1D]', Bic::INVALID_CHARACTERS_ERROR), + + // location code error + array('DEUTDEF]', Bic::INVALID_CHARACTERS_ERROR), + + // lower case values are invalid + array('DeutAT2LXXX', Bic::INVALID_CASE_ERROR), + array('DEUTAT2lxxx', Bic::INVALID_CASE_ERROR), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..94c653b105a92848d48808ea38e62f0a2017e2dc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.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\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Blank; +use Symfony\Component\Validator\Constraints\BlankValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class BlankValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new BlankValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Blank()); + + $this->assertNoViolation(); + } + + public function testBlankIsValid() + { + $this->validator->validate('', new Blank()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidValues + */ + public function testInvalidValues($value, $valueAsString) + { + $constraint = new Blank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $valueAsString) + ->setCode(Blank::NOT_BLANK_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + return array( + array('foobar', '"foobar"'), + array(0, '0'), + array(false, 'false'), + array(1234, '1234'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..200c69071fe886004b51dcfac92fb398bf8b1b34 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php @@ -0,0 +1,254 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\CallbackValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class CallbackValidatorTest_Class +{ + public static function validateCallback($object, ExecutionContextInterface $context) + { + $context->addViolation('Callback message', array('{{ value }}' => 'foobar')); + + return false; + } +} + +class CallbackValidatorTest_Object +{ + public function validate(ExecutionContextInterface $context) + { + $context->addViolation('My message', array('{{ value }}' => 'foobar')); + + return false; + } + + public static function validateStatic($object, ExecutionContextInterface $context) + { + $context->addViolation('Static message', array('{{ value }}' => 'baz')); + + return false; + } +} + +class CallbackValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new CallbackValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Callback()); + + $this->assertNoViolation(); + } + + public function testSingleMethod() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback('validate'); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testSingleMethodExplicitName() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array('callback' => 'validate')); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testSingleStaticMethod() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback('validateStatic'); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('Static message') + ->setParameter('{{ value }}', 'baz') + ->assertRaised(); + } + + public function testClosure() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(function ($object, ExecutionContextInterface $context) { + $context->addViolation('My message', array('{{ value }}' => 'foobar')); + + return false; + }); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testClosureNullObject() + { + $constraint = new Callback(function ($object, ExecutionContextInterface $context) { + $context->addViolation('My message', array('{{ value }}' => 'foobar')); + + return false; + }); + + $this->validator->validate(null, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testClosureExplicitName() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array( + 'callback' => function ($object, ExecutionContextInterface $context) { + $context->addViolation('My message', array('{{ value }}' => 'foobar')); + + return false; + }, + )); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('My message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testArrayCallable() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array(__CLASS__.'_Class', 'validateCallback')); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('Callback message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testArrayCallableNullObject() + { + $constraint = new Callback(array(__CLASS__.'_Class', 'validateCallback')); + + $this->validator->validate(null, $constraint); + + $this->buildViolation('Callback message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + public function testArrayCallableExplicitName() + { + $object = new CallbackValidatorTest_Object(); + $constraint = new Callback(array( + 'callback' => array(__CLASS__.'_Class', 'validateCallback'), + )); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('Callback message') + ->setParameter('{{ value }}', 'foobar') + ->assertRaised(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testExpectValidMethods() + { + $object = new CallbackValidatorTest_Object(); + + $this->validator->validate($object, new Callback(array('callback' => array('foobar')))); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testExpectValidCallbacks() + { + $object = new CallbackValidatorTest_Object(); + + $this->validator->validate($object, new Callback(array('callback' => array('foo', 'bar')))); + } + + public function testConstraintGetTargets() + { + $constraint = new Callback(array()); + $targets = array(Constraint::CLASS_CONSTRAINT, Constraint::PROPERTY_CONSTRAINT); + + $this->assertEquals($targets, $constraint->getTargets()); + } + + // Should succeed. Needed when defining constraints as annotations. + public function testNoConstructorArguments() + { + new Callback(); + } + + public function testAnnotationInvocationSingleValued() + { + $constraint = new Callback(array('value' => 'validateStatic')); + + $this->assertEquals(new Callback('validateStatic'), $constraint); + } + + public function testAnnotationInvocationMultiValued() + { + $constraint = new Callback(array('value' => array(__CLASS__.'_Class', 'validateCallback'))); + + $this->assertEquals(new Callback(array(__CLASS__.'_Class', 'validateCallback')), $constraint); + } + + public function testPayloadIsPassedToCallback() + { + $object = new \stdClass(); + $payloadCopy = null; + + $constraint = new Callback(array( + 'callback' => function ($object, ExecutionContextInterface $constraint, $payload) use (&$payloadCopy) { + $payloadCopy = $payload; + }, + 'payload' => 'Hello world!', + )); + $this->validator->validate($object, $constraint); + $this->assertEquals('Hello world!', $payloadCopy); + + $payloadCopy = null; + $constraint = new Callback(array( + 'callback' => function ($object, ExecutionContextInterface $constraint, $payload) use (&$payloadCopy) { + $payloadCopy = $payload; + }, + )); + $this->validator->validate($object, $constraint); + $this->assertNull($payloadCopy); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f83fc71da959dce3cac3041118a6f2d6426e999c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php @@ -0,0 +1,137 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\CardScheme; +use Symfony\Component\Validator\Constraints\CardSchemeValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class CardSchemeValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new CardSchemeValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new CardScheme(array('schemes' => array()))); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new CardScheme(array('schemes' => array()))); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidNumbers + */ + public function testValidNumbers($scheme, $number) + { + $this->validator->validate($number, new CardScheme(array('schemes' => $scheme))); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidNumbers + */ + public function testInvalidNumbers($scheme, $number, $code) + { + $constraint = new CardScheme(array( + 'schemes' => $scheme, + 'message' => 'myMessage', + )); + + $this->validator->validate($number, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', is_string($number) ? '"'.$number.'"' : $number) + ->setCode($code) + ->assertRaised(); + } + + public function getValidNumbers() + { + return array( + array('AMEX', '378282246310005'), + array('AMEX', '371449635398431'), + array('AMEX', '378734493671000'), + array('AMEX', '347298508610146'), + array('CHINA_UNIONPAY', '6228888888888888'), + array('CHINA_UNIONPAY', '62288888888888888'), + array('CHINA_UNIONPAY', '622888888888888888'), + array('CHINA_UNIONPAY', '6228888888888888888'), + array('DINERS', '30569309025904'), + array('DINERS', '36088894118515'), + array('DINERS', '38520000023237'), + array('DISCOVER', '6011111111111117'), + array('DISCOVER', '6011000990139424'), + array('INSTAPAYMENT', '6372476031350068'), + array('INSTAPAYMENT', '6385537775789749'), + array('INSTAPAYMENT', '6393440808445746'), + array('JCB', '3530111333300000'), + array('JCB', '3566002020360505'), + array('JCB', '213112345678901'), + array('JCB', '180012345678901'), + array('LASER', '6304678107004080'), + array('LASER', '6706440607428128629'), + array('LASER', '6771656738314582216'), + array('MAESTRO', '6759744069209'), + array('MAESTRO', '5020507657408074712'), + array('MAESTRO', '5612559223580173965'), + array('MAESTRO', '6759744069209'), + array('MAESTRO', '6594371785970435599'), + array('MASTERCARD', '5555555555554444'), + array('MASTERCARD', '5105105105105100'), + array('MASTERCARD', '2221005555554444'), + array('MASTERCARD', '2230000000000000'), + array('MASTERCARD', '2300000000000000'), + array('MASTERCARD', '2699999999999999'), + array('MASTERCARD', '2709999999999999'), + array('MASTERCARD', '2720995105105100'), + array('VISA', '4111111111111111'), + array('VISA', '4012888888881881'), + array('VISA', '4222222222222'), + array(array('AMEX', 'VISA'), '4111111111111111'), + array(array('AMEX', 'VISA'), '378282246310005'), + array(array('JCB', 'MASTERCARD'), '5105105105105100'), + array(array('VISA', 'MASTERCARD'), '5105105105105100'), + ); + } + + public function getInvalidNumbers() + { + return array( + array('VISA', '42424242424242424242', CardScheme::INVALID_FORMAT_ERROR), + array('AMEX', '357298508610146', CardScheme::INVALID_FORMAT_ERROR), + array('DINERS', '31569309025904', CardScheme::INVALID_FORMAT_ERROR), + array('DINERS', '37088894118515', CardScheme::INVALID_FORMAT_ERROR), + array('INSTAPAYMENT', '6313440808445746', CardScheme::INVALID_FORMAT_ERROR), + array('CHINA_UNIONPAY', '622888888888888', CardScheme::INVALID_FORMAT_ERROR), + array('CHINA_UNIONPAY', '62288888888888888888', CardScheme::INVALID_FORMAT_ERROR), + array('AMEX', '30569309025904', CardScheme::INVALID_FORMAT_ERROR), // DINERS number + array('AMEX', 'invalid', CardScheme::NOT_NUMERIC_ERROR), // A string + array('AMEX', 0, CardScheme::INVALID_FORMAT_ERROR), // a lone number + array('AMEX', '0', CardScheme::INVALID_FORMAT_ERROR), // a lone number + array('AMEX', '000000000000', CardScheme::INVALID_FORMAT_ERROR), // a lone number + array('DINERS', '3056930', CardScheme::INVALID_FORMAT_ERROR), // only first part of the number + array('DISCOVER', '1117', CardScheme::INVALID_FORMAT_ERROR), // only last 4 digits + array('MASTERCARD', '2721001234567890', CardScheme::INVALID_FORMAT_ERROR), // Not assigned yet + array('MASTERCARD', '2220991234567890', CardScheme::INVALID_FORMAT_ERROR), // Not assigned yet + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..01483161c9fc486117829bb8b2153dd55640188e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php @@ -0,0 +1,342 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Choice; +use Symfony\Component\Validator\Constraints\ChoiceValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +function choice_callback() +{ + return array('foo', 'bar'); +} + +class ChoiceValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new ChoiceValidator(); + } + + public static function staticCallback() + { + return array('foo', 'bar'); + } + + public function objectMethodCallback() + { + return array('foo', 'bar'); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectArrayIfMultipleIsTrue() + { + $constraint = new Choice(array( + 'choices' => array('foo', 'bar'), + 'multiple' => true, + 'strict' => true, + )); + + $this->validator->validate('asdf', $constraint); + } + + public function testNullIsValid() + { + $this->validator->validate( + null, + new Choice( + array( + 'choices' => array('foo', 'bar'), + 'strict' => true, + ) + ) + ); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testChoicesOrCallbackExpected() + { + $this->validator->validate('foobar', new Choice(array('strict' => true))); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testValidCallbackExpected() + { + $this->validator->validate('foobar', new Choice(array('callback' => 'abcd', 'strict' => true))); + } + + public function testValidChoiceArray() + { + $constraint = new Choice(array('choices' => array('foo', 'bar'), 'strict' => true)); + + $this->validator->validate('bar', $constraint); + + $this->assertNoViolation(); + } + + public function testValidChoiceCallbackFunction() + { + $constraint = new Choice(array('callback' => __NAMESPACE__.'\choice_callback', 'strict' => true)); + + $this->validator->validate('bar', $constraint); + + $this->assertNoViolation(); + } + + public function testValidChoiceCallbackClosure() + { + $constraint = new Choice( + array( + 'strict' => true, + 'callback' => function () { + return array('foo', 'bar'); + }, + ) + ); + + $this->validator->validate('bar', $constraint); + + $this->assertNoViolation(); + } + + public function testValidChoiceCallbackStaticMethod() + { + $constraint = new Choice(array('callback' => array(__CLASS__, 'staticCallback'), 'strict' => true)); + + $this->validator->validate('bar', $constraint); + + $this->assertNoViolation(); + } + + public function testValidChoiceCallbackContextMethod() + { + // search $this for "staticCallback" + $this->setObject($this); + + $constraint = new Choice(array('callback' => 'staticCallback', 'strict' => true)); + + $this->validator->validate('bar', $constraint); + + $this->assertNoViolation(); + } + + public function testValidChoiceCallbackContextObjectMethod() + { + // search $this for "objectMethodCallback" + $this->setObject($this); + + $constraint = new Choice(array('callback' => 'objectMethodCallback', 'strict' => true)); + + $this->validator->validate('bar', $constraint); + + $this->assertNoViolation(); + } + + public function testMultipleChoices() + { + $constraint = new Choice(array( + 'choices' => array('foo', 'bar', 'baz'), + 'multiple' => true, + 'strict' => true, + )); + + $this->validator->validate(array('baz', 'bar'), $constraint); + + $this->assertNoViolation(); + } + + public function testInvalidChoice() + { + $constraint = new Choice(array( + 'choices' => array('foo', 'bar'), + 'message' => 'myMessage', + 'strict' => true, + )); + + $this->validator->validate('baz', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"baz"') + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->assertRaised(); + } + + public function testInvalidChoiceEmptyChoices() + { + $constraint = new Choice(array( + // May happen when the choices are provided dynamically, e.g. from + // the DB or the model + 'choices' => array(), + 'message' => 'myMessage', + 'strict' => true, + )); + + $this->validator->validate('baz', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"baz"') + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->assertRaised(); + } + + public function testInvalidChoiceMultiple() + { + $constraint = new Choice(array( + 'choices' => array('foo', 'bar'), + 'multipleMessage' => 'myMessage', + 'multiple' => true, + 'strict' => true, + )); + + $this->validator->validate(array('foo', 'baz'), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"baz"') + ->setInvalidValue('baz') + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->assertRaised(); + } + + public function testTooFewChoices() + { + $constraint = new Choice(array( + 'choices' => array('foo', 'bar', 'moo', 'maa'), + 'multiple' => true, + 'min' => 2, + 'minMessage' => 'myMessage', + 'strict' => true, + )); + + $value = array('foo'); + + $this->setValue($value); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ limit }}', 2) + ->setInvalidValue($value) + ->setPlural(2) + ->setCode(Choice::TOO_FEW_ERROR) + ->assertRaised(); + } + + public function testTooManyChoices() + { + $constraint = new Choice(array( + 'choices' => array('foo', 'bar', 'moo', 'maa'), + 'multiple' => true, + 'max' => 2, + 'maxMessage' => 'myMessage', + 'strict' => true, + )); + + $value = array('foo', 'bar', 'moo'); + + $this->setValue($value); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ limit }}', 2) + ->setInvalidValue($value) + ->setPlural(2) + ->setCode(Choice::TOO_MANY_ERROR) + ->assertRaised(); + } + + /** + * @group legacy + */ + public function testNonStrict() + { + $constraint = new Choice(array( + 'choices' => array(1, 2), + 'strict' => false, + )); + + $this->validator->validate('2', $constraint); + $this->validator->validate(2, $constraint); + + $this->assertNoViolation(); + } + + public function testStrictAllowsExactValue() + { + $constraint = new Choice(array( + 'choices' => array(1, 2), + 'strict' => true, + )); + + $this->validator->validate(2, $constraint); + + $this->assertNoViolation(); + } + + public function testStrictDisallowsDifferentType() + { + $constraint = new Choice(array( + 'choices' => array(1, 2), + 'strict' => true, + 'message' => 'myMessage', + )); + + $this->validator->validate('2', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"2"') + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->assertRaised(); + } + + /** + * @group legacy + */ + public function testNonStrictWithMultipleChoices() + { + $constraint = new Choice(array( + 'choices' => array(1, 2, 3), + 'multiple' => true, + 'strict' => false, + )); + + $this->validator->validate(array('2', 3), $constraint); + + $this->assertNoViolation(); + } + + public function testStrictWithMultipleChoices() + { + $constraint = new Choice(array( + 'choices' => array(1, 2, 3), + 'multiple' => true, + 'strict' => true, + 'multipleMessage' => 'myMessage', + )); + + $this->validator->validate(array(2, '3'), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"3"') + ->setInvalidValue('3') + ->setCode(Choice::NO_SUCH_CHOICE_ERROR) + ->assertRaised(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b5fbf6c0b09718e98d3f8c80b2928a07902dffa9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\Email; +use Symfony\Component\Validator\Constraints\Optional; +use Symfony\Component\Validator\Constraints\Required; +use Symfony\Component\Validator\Constraints\Valid; + +/** + * @author Bernhard Schussek + */ +class CollectionTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectInvalidFieldsOption() + { + new Collection(array( + 'fields' => 'foo', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectNonConstraints() + { + new Collection(array( + 'foo' => 'bar', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraint() + { + new Collection(array( + 'foo' => new Valid(), + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraintWithinOptional() + { + new Collection(array( + 'foo' => new Optional(new Valid()), + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraintWithinRequired() + { + new Collection(array( + 'foo' => new Required(new Valid()), + )); + } + + public function testAcceptOptionalConstraintAsOneElementArray() + { + $collection1 = new Collection(array( + 'fields' => array( + 'alternate_email' => array( + new Optional(new Email()), + ), + ), + )); + + $collection2 = new Collection(array( + 'fields' => array( + 'alternate_email' => new Optional(new Email()), + ), + )); + + $this->assertEquals($collection1, $collection2); + } + + public function testAcceptRequiredConstraintAsOneElementArray() + { + $collection1 = new Collection(array( + 'fields' => array( + 'alternate_email' => array( + new Required(new Email()), + ), + ), + )); + + $collection2 = new Collection(array( + 'fields' => array( + 'alternate_email' => new Required(new Email()), + ), + )); + + $this->assertEquals($collection1, $collection2); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorArrayObjectTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorArrayObjectTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a3c4b3340ec707199bc0297bd0ff1fe8d85f07cf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorArrayObjectTest.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\Validator\Tests\Constraints; + +class CollectionValidatorArrayObjectTest extends CollectionValidatorTest +{ + public function prepareTestData(array $contents) + { + return new \ArrayObject($contents); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorArrayTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorArrayTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7517d0ce340e4aea3b0d94b0596dac46fa4713cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorArrayTest.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\Validator\Tests\Constraints; + +class CollectionValidatorArrayTest extends CollectionValidatorTest +{ + public function prepareTestData(array $contents) + { + return $contents; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorCustomArrayObjectTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorCustomArrayObjectTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3d4c29681bf4725f3ce32bbc57ea0f6cd6c56560 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorCustomArrayObjectTest.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Tests\Fixtures\CustomArrayObject; + +class CollectionValidatorCustomArrayObjectTest extends CollectionValidatorTest +{ + public function prepareTestData(array $contents) + { + return new CustomArrayObject($contents); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..32aa8e359e771d33bd09f0aa375c3491f3b824c4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php @@ -0,0 +1,384 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\CollectionValidator; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Optional; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Constraints\Required; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +abstract class CollectionValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new CollectionValidator(); + } + + abstract protected function prepareTestData(array $contents); + + public function testNullIsValid() + { + $this->validator->validate(null, new Collection(array('fields' => array( + 'foo' => new Range(array('min' => 4)), + )))); + + $this->assertNoViolation(); + } + + public function testFieldsAsDefaultOption() + { + $constraint = new Range(array('min' => 4)); + + $data = $this->prepareTestData(array('foo' => 'foobar')); + + $this->expectValidateValueAt(0, '[foo]', $data['foo'], array($constraint)); + + $this->validator->validate($data, new Collection(array( + 'foo' => $constraint, + ))); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testThrowsExceptionIfNotTraversable() + { + $this->validator->validate('foobar', new Collection(array('fields' => array( + 'foo' => new Range(array('min' => 4)), + )))); + } + + public function testWalkSingleConstraint() + { + $constraint = new Range(array('min' => 4)); + + $array = array( + 'foo' => 3, + 'bar' => 5, + ); + + $i = 0; + + foreach ($array as $key => $value) { + $this->expectValidateValueAt($i++, '['.$key.']', $value, array($constraint)); + } + + $data = $this->prepareTestData($array); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + 'bar' => $constraint, + ), + ))); + + $this->assertNoViolation(); + } + + public function testWalkMultipleConstraints() + { + $constraints = array( + new Range(array('min' => 4)), + new NotNull(), + ); + + $array = array( + 'foo' => 3, + 'bar' => 5, + ); + + $i = 0; + + foreach ($array as $key => $value) { + $this->expectValidateValueAt($i++, '['.$key.']', $value, $constraints); + } + + $data = $this->prepareTestData($array); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraints, + 'bar' => $constraints, + ), + ))); + + $this->assertNoViolation(); + } + + public function testExtraFieldsDisallowed() + { + $constraint = new Range(array('min' => 4)); + + $data = $this->prepareTestData(array( + 'foo' => 5, + 'baz' => 6, + )); + + $this->expectValidateValueAt(0, '[foo]', $data['foo'], array($constraint)); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + ), + 'extraFieldsMessage' => 'myMessage', + ))); + + $this->buildViolation('myMessage') + ->setParameter('{{ field }}', '"baz"') + ->atPath('property.path[baz]') + ->setInvalidValue(6) + ->setCode(Collection::NO_SUCH_FIELD_ERROR) + ->assertRaised(); + } + + // bug fix + public function testNullNotConsideredExtraField() + { + $data = $this->prepareTestData(array( + 'foo' => null, + )); + + $constraint = new Range(array('min' => 4)); + + $this->expectValidateValueAt(0, '[foo]', $data['foo'], array($constraint)); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + ), + ))); + + $this->assertNoViolation(); + } + + public function testExtraFieldsAllowed() + { + $data = $this->prepareTestData(array( + 'foo' => 5, + 'bar' => 6, + )); + + $constraint = new Range(array('min' => 4)); + + $this->expectValidateValueAt(0, '[foo]', $data['foo'], array($constraint)); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + ), + 'allowExtraFields' => true, + ))); + + $this->assertNoViolation(); + } + + public function testMissingFieldsDisallowed() + { + $data = $this->prepareTestData(array()); + + $constraint = new Range(array('min' => 4)); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + ), + 'missingFieldsMessage' => 'myMessage', + ))); + + $this->buildViolation('myMessage') + ->setParameter('{{ field }}', '"foo"') + ->atPath('property.path[foo]') + ->setInvalidValue(null) + ->setCode(Collection::MISSING_FIELD_ERROR) + ->assertRaised(); + } + + public function testMissingFieldsAllowed() + { + $data = $this->prepareTestData(array()); + + $constraint = new Range(array('min' => 4)); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + ), + 'allowMissingFields' => true, + ))); + + $this->assertNoViolation(); + } + + public function testOptionalFieldPresent() + { + $data = $this->prepareTestData(array( + 'foo' => null, + )); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Optional(), + ))); + + $this->assertNoViolation(); + } + + public function testOptionalFieldNotPresent() + { + $data = $this->prepareTestData(array()); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Optional(), + ))); + + $this->assertNoViolation(); + } + + public function testOptionalFieldSingleConstraint() + { + $array = array( + 'foo' => 5, + ); + + $constraint = new Range(array('min' => 4)); + + $this->expectValidateValueAt(0, '[foo]', $array['foo'], array($constraint)); + + $data = $this->prepareTestData($array); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Optional($constraint), + ))); + + $this->assertNoViolation(); + } + + public function testOptionalFieldMultipleConstraints() + { + $array = array( + 'foo' => 5, + ); + + $constraints = array( + new NotNull(), + new Range(array('min' => 4)), + ); + + $this->expectValidateValueAt(0, '[foo]', $array['foo'], $constraints); + + $data = $this->prepareTestData($array); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Optional($constraints), + ))); + + $this->assertNoViolation(); + } + + public function testRequiredFieldPresent() + { + $data = $this->prepareTestData(array( + 'foo' => null, + )); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Required(), + ))); + + $this->assertNoViolation(); + } + + public function testRequiredFieldNotPresent() + { + $data = $this->prepareTestData(array()); + + $this->validator->validate($data, new Collection(array( + 'fields' => array( + 'foo' => new Required(), + ), + 'missingFieldsMessage' => 'myMessage', + ))); + + $this->buildViolation('myMessage') + ->setParameter('{{ field }}', '"foo"') + ->atPath('property.path[foo]') + ->setInvalidValue(null) + ->setCode(Collection::MISSING_FIELD_ERROR) + ->assertRaised(); + } + + public function testRequiredFieldSingleConstraint() + { + $array = array( + 'foo' => 5, + ); + + $constraint = new Range(array('min' => 4)); + + $this->expectValidateValueAt(0, '[foo]', $array['foo'], array($constraint)); + + $data = $this->prepareTestData($array); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Required($constraint), + ))); + + $this->assertNoViolation(); + } + + public function testRequiredFieldMultipleConstraints() + { + $array = array( + 'foo' => 5, + ); + + $constraints = array( + new NotNull(), + new Range(array('min' => 4)), + ); + + $this->expectValidateValueAt(0, '[foo]', $array['foo'], $constraints); + + $data = $this->prepareTestData($array); + + $this->validator->validate($data, new Collection(array( + 'foo' => new Required($constraints), + ))); + + $this->assertNoViolation(); + } + + public function testObjectShouldBeLeftUnchanged() + { + $value = new \ArrayObject(array( + 'foo' => 3, + )); + + $constraint = new Range(array('min' => 2)); + + $this->expectValidateValueAt(0, '[foo]', $value['foo'], array($constraint)); + + $this->validator->validate($value, new Collection(array( + 'fields' => array( + 'foo' => $constraint, + ), + ))); + + $this->assertEquals(array( + 'foo' => 3, + ), (array) $value); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CompositeTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CompositeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6a8530723fb0590f69f1a443c04eeb74d6323139 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CompositeTest.php @@ -0,0 +1,137 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Composite; +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Valid; + +class ConcreteComposite extends Composite +{ + public $constraints; + + protected function getCompositeOption() + { + return 'constraints'; + } + + public function getDefaultOption() + { + return 'constraints'; + } +} + +/** + * @author Bernhard Schussek + */ +class CompositeTest extends TestCase +{ + public function testMergeNestedGroupsIfNoExplicitParentGroup() + { + $constraint = new ConcreteComposite(array( + new NotNull(array('groups' => 'Default')), + new NotBlank(array('groups' => array('Default', 'Strict'))), + )); + + $this->assertEquals(array('Default', 'Strict'), $constraint->groups); + $this->assertEquals(array('Default'), $constraint->constraints[0]->groups); + $this->assertEquals(array('Default', 'Strict'), $constraint->constraints[1]->groups); + } + + public function testSetImplicitNestedGroupsIfExplicitParentGroup() + { + $constraint = new ConcreteComposite(array( + 'constraints' => array( + new NotNull(), + new NotBlank(), + ), + 'groups' => array('Default', 'Strict'), + )); + + $this->assertEquals(array('Default', 'Strict'), $constraint->groups); + $this->assertEquals(array('Default', 'Strict'), $constraint->constraints[0]->groups); + $this->assertEquals(array('Default', 'Strict'), $constraint->constraints[1]->groups); + } + + public function testExplicitNestedGroupsMustBeSubsetOfExplicitParentGroups() + { + $constraint = new ConcreteComposite(array( + 'constraints' => array( + new NotNull(array('groups' => 'Default')), + new NotBlank(array('groups' => 'Strict')), + ), + 'groups' => array('Default', 'Strict'), + )); + + $this->assertEquals(array('Default', 'Strict'), $constraint->groups); + $this->assertEquals(array('Default'), $constraint->constraints[0]->groups); + $this->assertEquals(array('Strict'), $constraint->constraints[1]->groups); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testFailIfExplicitNestedGroupsNotSubsetOfExplicitParentGroups() + { + new ConcreteComposite(array( + 'constraints' => array( + new NotNull(array('groups' => array('Default', 'Foobar'))), + ), + 'groups' => array('Default', 'Strict'), + )); + } + + public function testImplicitGroupNamesAreForwarded() + { + $constraint = new ConcreteComposite(array( + new NotNull(array('groups' => 'Default')), + new NotBlank(array('groups' => 'Strict')), + )); + + $constraint->addImplicitGroupName('ImplicitGroup'); + + $this->assertEquals(array('Default', 'Strict', 'ImplicitGroup'), $constraint->groups); + $this->assertEquals(array('Default', 'ImplicitGroup'), $constraint->constraints[0]->groups); + $this->assertEquals(array('Strict'), $constraint->constraints[1]->groups); + } + + public function testSingleConstraintsAccepted() + { + $nestedConstraint = new NotNull(); + $constraint = new ConcreteComposite($nestedConstraint); + + $this->assertEquals(array($nestedConstraint), $constraint->constraints); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testFailIfNoConstraint() + { + new ConcreteComposite(array( + new NotNull(array('groups' => 'Default')), + 'NotBlank', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testValidCantBeNested() + { + new ConcreteComposite(array( + new Valid(), + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorArrayTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorArrayTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5f562e7445f8f58e9371b1d2dd10384922f63319 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorArrayTest.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +/** + * @author Bernhard Schussek + */ +class CountValidatorArrayTest extends CountValidatorTest +{ + protected function createCollection(array $content) + { + return $content; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorCountableTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorCountableTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7d46967bde483075d5ecb4f73238838860715629 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorCountableTest.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Tests\Fixtures\Countable; + +/** + * @author Bernhard Schussek + */ +class CountValidatorCountableTest extends CountValidatorTest +{ + protected function createCollection(array $content) + { + return new Countable($content); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c9d68ee3130ee70f037f021db029b8d8c262ac14 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTest.php @@ -0,0 +1,198 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Count; +use Symfony\Component\Validator\Constraints\CountValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +/** + * @author Bernhard Schussek + */ +abstract class CountValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new CountValidator(); + } + + abstract protected function createCollection(array $content); + + public function testNullIsValid() + { + $this->validator->validate(null, new Count(6)); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsCountableType() + { + $this->validator->validate(new \stdClass(), new Count(5)); + } + + public function getThreeOrLessElements() + { + return array( + array($this->createCollection(array(1))), + array($this->createCollection(array(1, 2))), + array($this->createCollection(array(1, 2, 3))), + array($this->createCollection(array('a' => 1, 'b' => 2, 'c' => 3))), + ); + } + + public function getFourElements() + { + return array( + array($this->createCollection(array(1, 2, 3, 4))), + array($this->createCollection(array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4))), + ); + } + + public function getFiveOrMoreElements() + { + return array( + array($this->createCollection(array(1, 2, 3, 4, 5))), + array($this->createCollection(array(1, 2, 3, 4, 5, 6))), + array($this->createCollection(array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5))), + ); + } + + /** + * @dataProvider getThreeOrLessElements + */ + public function testValidValuesMax($value) + { + $constraint = new Count(array('max' => 3)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getFiveOrMoreElements + */ + public function testValidValuesMin($value) + { + $constraint = new Count(array('min' => 5)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getFourElements + */ + public function testValidValuesExact($value) + { + $constraint = new Count(4); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getFiveOrMoreElements + */ + public function testTooManyValues($value) + { + $constraint = new Count(array( + 'max' => 4, + 'maxMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ count }}', count($value)) + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Count::TOO_MANY_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getThreeOrLessElements + */ + public function testTooFewValues($value) + { + $constraint = new Count(array( + 'min' => 4, + 'minMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ count }}', count($value)) + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Count::TOO_FEW_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getFiveOrMoreElements + */ + public function testTooManyValuesExact($value) + { + $constraint = new Count(array( + 'min' => 4, + 'max' => 4, + 'exactMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ count }}', count($value)) + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Count::TOO_MANY_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getThreeOrLessElements + */ + public function testTooFewValuesExact($value) + { + $constraint = new Count(array( + 'min' => 4, + 'max' => 4, + 'exactMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ count }}', count($value)) + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Count::TOO_FEW_ERROR) + ->assertRaised(); + } + + public function testDefaultOption() + { + $constraint = new Count(5); + + $this->assertEquals(5, $constraint->min); + $this->assertEquals(5, $constraint->max); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..044a742db630a3e11513bfdb0e9664710238e825 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php @@ -0,0 +1,105 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Intl\Util\IntlTestHelper; +use Symfony\Component\Validator\Constraints\Country; +use Symfony\Component\Validator\Constraints\CountryValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class CountryValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new CountryValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Country()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Country()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Country()); + } + + /** + * @dataProvider getValidCountries + */ + public function testValidCountries($country) + { + $this->validator->validate($country, new Country()); + + $this->assertNoViolation(); + } + + public function getValidCountries() + { + return array( + array('GB'), + array('AT'), + array('MY'), + ); + } + + /** + * @dataProvider getInvalidCountries + */ + public function testInvalidCountries($country) + { + $constraint = new Country(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($country, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$country.'"') + ->setCode(Country::NO_SUCH_COUNTRY_ERROR) + ->assertRaised(); + } + + public function getInvalidCountries() + { + return array( + array('foobar'), + array('EN'), + ); + } + + public function testValidateUsingCountrySpecificLocale() + { + // in order to test with "en_GB" + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('en_GB'); + + $existingCountry = 'GB'; + + $this->validator->validate($existingCountry, new Country()); + + $this->assertNoViolation(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1286ff31f89f317e5c4450104f50a5b6aebce16b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Intl\Util\IntlTestHelper; +use Symfony\Component\Validator\Constraints\Currency; +use Symfony\Component\Validator\Constraints\CurrencyValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class CurrencyValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new CurrencyValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Currency()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Currency()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Currency()); + } + + /** + * @dataProvider getValidCurrencies + */ + public function testValidCurrencies($currency) + { + $this->validator->validate($currency, new Currency()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidCurrencies + **/ + public function testValidCurrenciesWithCountrySpecificLocale($currency) + { + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('en_GB'); + + $this->validator->validate($currency, new Currency()); + + $this->assertNoViolation(); + } + + public function getValidCurrencies() + { + return array( + array('EUR'), + array('USD'), + array('SIT'), + array('AUD'), + array('CAD'), + ); + } + + /** + * @dataProvider getInvalidCurrencies + */ + public function testInvalidCurrencies($currency) + { + $constraint = new Currency(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($currency, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$currency.'"') + ->setCode(Currency::NO_SUCH_CURRENCY_ERROR) + ->assertRaised(); + } + + public function getInvalidCurrencies() + { + return array( + array('EN'), + array('foobar'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fe553100339f838d9202197b5546642976223643 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\DateTime; +use Symfony\Component\Validator\Constraints\DateTimeValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class DateTimeValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new DateTimeValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new DateTime()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new DateTime()); + + $this->assertNoViolation(); + } + + public function testDateTimeClassIsValid() + { + $this->validator->validate(new \DateTime(), new DateTime()); + + $this->assertNoViolation(); + } + + public function testDateTimeImmutableClassIsValid() + { + $this->validator->validate(new \DateTimeImmutable(), new DateTime()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new DateTime()); + } + + public function testDateTimeWithDefaultFormat() + { + $this->validator->validate('1995-05-10 19:33:00', new DateTime()); + + $this->assertNoViolation(); + + $this->validator->validate('1995-03-24', new DateTime()); + + $this->buildViolation('This value is not a valid datetime.') + ->setParameter('{{ value }}', '"1995-03-24"') + ->setCode(DateTime::INVALID_FORMAT_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getValidDateTimes + */ + public function testValidDateTimes($format, $dateTime) + { + $constraint = new DateTime(array( + 'format' => $format, + )); + + $this->validator->validate($dateTime, $constraint); + + $this->assertNoViolation(); + } + + public function getValidDateTimes() + { + return array( + array('Y-m-d H:i:s e', '1995-03-24 00:00:00 UTC'), + array('Y-m-d H:i:s', '2010-01-01 01:02:03'), + array('Y/m/d H:i', '2010/01/01 01:02'), + array('F d, Y', 'December 31, 1999'), + array('d-m-Y', '10-05-1995'), + ); + } + + /** + * @dataProvider getInvalidDateTimes + */ + public function testInvalidDateTimes($format, $dateTime, $code) + { + $constraint = new DateTime(array( + 'message' => 'myMessage', + 'format' => $format, + )); + + $this->validator->validate($dateTime, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$dateTime.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidDateTimes() + { + return array( + array('Y-m-d', 'foobar', DateTime::INVALID_FORMAT_ERROR), + array('H:i', '00:00:00', DateTime::INVALID_FORMAT_ERROR), + array('Y-m-d', '2010-01-01 00:00', DateTime::INVALID_FORMAT_ERROR), + array('Y-m-d e', '2010-01-01 TCU', DateTime::INVALID_FORMAT_ERROR), + array('Y-m-d H:i:s', '2010-13-01 00:00:00', DateTime::INVALID_DATE_ERROR), + array('Y-m-d H:i:s', '2010-04-32 00:00:00', DateTime::INVALID_DATE_ERROR), + array('Y-m-d H:i:s', '2010-02-29 00:00:00', DateTime::INVALID_DATE_ERROR), + array('Y-m-d H:i:s', '2010-01-01 24:00:00', DateTime::INVALID_TIME_ERROR), + array('Y-m-d H:i:s', '2010-01-01 00:60:00', DateTime::INVALID_TIME_ERROR), + array('Y-m-d H:i:s', '2010-01-01 00:00:60', DateTime::INVALID_TIME_ERROR), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3b2b189a5521524de8fb699f9980686974617c02 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php @@ -0,0 +1,108 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Date; +use Symfony\Component\Validator\Constraints\DateValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class DateValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new DateValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Date()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Date()); + + $this->assertNoViolation(); + } + + public function testDateTimeClassIsValid() + { + $this->validator->validate(new \DateTime(), new Date()); + + $this->assertNoViolation(); + } + + public function testDateTimeImmutableClassIsValid() + { + $this->validator->validate(new \DateTimeImmutable(), new Date()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Date()); + } + + /** + * @dataProvider getValidDates + */ + public function testValidDates($date) + { + $this->validator->validate($date, new Date()); + + $this->assertNoViolation(); + } + + public function getValidDates() + { + return array( + array('2010-01-01'), + array('1955-12-12'), + array('2030-05-31'), + ); + } + + /** + * @dataProvider getInvalidDates + */ + public function testInvalidDates($date, $code) + { + $constraint = new Date(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($date, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$date.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidDates() + { + return array( + array('foobar', Date::INVALID_FORMAT_ERROR), + array('foobar 2010-13-01', Date::INVALID_FORMAT_ERROR), + array('2010-13-01 foobar', Date::INVALID_FORMAT_ERROR), + array('2010-13-01', Date::INVALID_DATE_ERROR), + array('2010-04-32', Date::INVALID_DATE_ERROR), + array('2010-02-29', Date::INVALID_DATE_ERROR), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..30ec8f22a1e8c671d328b37cfaa34920dd65cc3b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php @@ -0,0 +1,232 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Bridge\PhpUnit\DnsMock; +use Symfony\Component\Validator\Constraints\Email; +use Symfony\Component\Validator\Constraints\EmailValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +/** + * @group dns-sensitive + */ +class EmailValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new EmailValidator(false); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Email()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Email()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Email()); + } + + /** + * @dataProvider getValidEmails + */ + public function testValidEmails($email) + { + $this->validator->validate($email, new Email()); + + $this->assertNoViolation(); + } + + public function getValidEmails() + { + return array( + array('fabien@symfony.com'), + array('example@example.co.uk'), + array('fabien_potencier@example.fr'), + ); + } + + /** + * @dataProvider getInvalidEmails + */ + public function testInvalidEmails($email) + { + $constraint = new Email(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($email, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$email.'"') + ->setCode(Email::INVALID_FORMAT_ERROR) + ->assertRaised(); + } + + public function getInvalidEmails() + { + return array( + array('example'), + array('example@'), + array('example@localhost'), + array('foo@example.com bar'), + ); + } + + public function testStrict() + { + $constraint = new Email(array('strict' => true)); + + $this->validator->validate('example@localhost', $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidEmailsForStrictChecks + */ + public function testStrictWithInvalidEmails($email) + { + $constraint = new Email(array( + 'message' => 'myMessage', + 'strict' => true, + )); + + $this->validator->validate($email, $constraint); + + $this + ->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$email.'"') + ->setCode(Email::INVALID_FORMAT_ERROR) + ->assertRaised(); + } + + /** + * @see https://github.com/egulias/EmailValidator/blob/1.2.8/tests/egulias/Tests/EmailValidator/EmailValidatorTest.php + */ + public function getInvalidEmailsForStrictChecks() + { + return array( + array('test@example.com test'), + array('user name@example.com'), + array('user name@example.com'), + array('example.@example.co.uk'), + array('example@example@example.co.uk'), + array('(test_exampel@example.fr)'), + array('example(example)example@example.co.uk'), + array('.example@localhost'), + array('ex\ample@localhost'), + array('example@local\host'), + array('example@localhost.'), + array('user name@example.com'), + array('username@ example . com'), + array('example@(fake).com'), + array('example@(fake.com'), + array('username@example,com'), + array('usern,ame@example.com'), + array('user[na]me@example.com'), + array('"""@iana.org'), + array('"\"@iana.org'), + array('"test"test@iana.org'), + array('"test""test"@iana.org'), + array('"test"."test"@iana.org'), + array('"test".test@iana.org'), + array('"test"'.chr(0).'@iana.org'), + array('"test\"@iana.org'), + array(chr(226).'@iana.org'), + array('test@'.chr(226).'.org'), + array('\r\ntest@iana.org'), + array('\r\n test@iana.org'), + array('\r\n \r\ntest@iana.org'), + array('\r\n \r\ntest@iana.org'), + array('\r\n \r\n test@iana.org'), + array('test@iana.org \r\n'), + array('test@iana.org \r\n '), + array('test@iana.org \r\n \r\n'), + array('test@iana.org \r\n\r\n'), + array('test@iana.org \r\n\r\n '), + array('test@iana/icann.org'), + array('test@foo;bar.com'), + array('test;123@foobar.com'), + array('test@example..com'), + array('email.email@email."'), + array('test@email>'), + array('test@email<'), + array('test@email{'), + array(str_repeat('x', 254).'@example.com'), //email with warnings + ); + } + + /** + * @dataProvider getDnsChecks + * @requires function Symfony\Bridge\PhpUnit\DnsMock::withMockedHosts + */ + public function testDnsChecks($type, $violation) + { + DnsMock::withMockedHosts(array('example.com' => array(array('type' => $violation ? false : $type)))); + + $constraint = new Email(array( + 'message' => 'myMessage', + 'MX' === $type ? 'checkMX' : 'checkHost' => true, + )); + + $this->validator->validate('foo@example.com', $constraint); + + if (!$violation) { + $this->assertNoViolation(); + } else { + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"foo@example.com"') + ->setCode($violation) + ->assertRaised(); + } + } + + public function getDnsChecks() + { + return array( + array('MX', false), + array('MX', Email::MX_CHECK_FAILED_ERROR), + array('A', false), + array('A', Email::HOST_CHECK_FAILED_ERROR), + array('AAAA', false), + array('AAAA', Email::HOST_CHECK_FAILED_ERROR), + ); + } + + /** + * @requires function Symfony\Bridge\PhpUnit\DnsMock::withMockedHosts + */ + public function testHostnameIsProperlyParsed() + { + DnsMock::withMockedHosts(array('baz.com' => array(array('type' => 'MX')))); + + $this->validator->validate( + '"foo@bar"@baz.com', + new Email(array('checkMX' => true)) + ); + + $this->assertNoViolation(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ad3f0d7737f30a91355a8898d1ee41b5a676f1b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\EqualTo; +use Symfony\Component\Validator\Constraints\EqualToValidator; + +/** + * @author Daniel Holmes + */ +class EqualToValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function createValidator() + { + return new EqualToValidator(); + } + + protected function createConstraint(array $options) + { + return new EqualTo($options); + } + + protected function getErrorCode() + { + return EqualTo::NOT_EQUAL_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(3, 3), + array(3, '3'), + array('a', 'a'), + array(new \DateTime('2000-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2000-01-01'), '2000-01-01'), + array(new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'), + array(new ComparisonTest_Class(5), new ComparisonTest_Class(5)), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(1, '1', 2, '2', 'integer'), + array('22', '"22"', '333', '"333"', 'string'), + array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2001-01-01 UTC'), 'Jan 1, 2001, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e4316243e558081930ad4f1c200e961f672a413b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php @@ -0,0 +1,238 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Expression; +use Symfony\Component\Validator\Constraints\ExpressionValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; +use Symfony\Component\Validator\Tests\Fixtures\Entity; + +class ExpressionValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new ExpressionValidator(); + } + + public function testExpressionIsEvaluatedWithNullValue() + { + $constraint = new Expression(array( + 'expression' => 'false', + 'message' => 'myMessage', + )); + + $this->validator->validate(null, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'null') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testExpressionIsEvaluatedWithEmptyStringValue() + { + $constraint = new Expression(array( + 'expression' => 'false', + 'message' => 'myMessage', + )); + + $this->validator->validate('', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '""') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testSucceedingExpressionAtObjectLevel() + { + $constraint = new Expression('this.data == 1'); + + $object = new Entity(); + $object->data = '1'; + + $this->setObject($object); + + $this->validator->validate($object, $constraint); + + $this->assertNoViolation(); + } + + public function testFailingExpressionAtObjectLevel() + { + $constraint = new Expression(array( + 'expression' => 'this.data == 1', + 'message' => 'myMessage', + )); + + $object = new Entity(); + $object->data = '2'; + + $this->setObject($object); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'object') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testSucceedingExpressionAtPropertyLevel() + { + $constraint = new Expression('value == this.data'); + + $object = new Entity(); + $object->data = '1'; + + $this->setRoot($object); + $this->setPropertyPath('data'); + $this->setProperty($object, 'data'); + + $this->validator->validate('1', $constraint); + + $this->assertNoViolation(); + } + + public function testFailingExpressionAtPropertyLevel() + { + $constraint = new Expression(array( + 'expression' => 'value == this.data', + 'message' => 'myMessage', + )); + + $object = new Entity(); + $object->data = '1'; + + $this->setRoot($object); + $this->setPropertyPath('data'); + $this->setProperty($object, 'data'); + + $this->validator->validate('2', $constraint); + + $this->buildViolation('myMessage') + ->atPath('data') + ->setParameter('{{ value }}', '"2"') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testSucceedingExpressionAtNestedPropertyLevel() + { + $constraint = new Expression('value == this.data'); + + $object = new Entity(); + $object->data = '1'; + + $root = new Entity(); + $root->reference = $object; + + $this->setRoot($root); + $this->setPropertyPath('reference.data'); + $this->setProperty($object, 'data'); + + $this->validator->validate('1', $constraint); + + $this->assertNoViolation(); + } + + public function testFailingExpressionAtNestedPropertyLevel() + { + $constraint = new Expression(array( + 'expression' => 'value == this.data', + 'message' => 'myMessage', + )); + + $object = new Entity(); + $object->data = '1'; + + $root = new Entity(); + $root->reference = $object; + + $this->setRoot($root); + $this->setPropertyPath('reference.data'); + $this->setProperty($object, 'data'); + + $this->validator->validate('2', $constraint); + + $this->buildViolation('myMessage') + ->atPath('reference.data') + ->setParameter('{{ value }}', '"2"') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + /** + * When validatePropertyValue() is called with a class name + * https://github.com/symfony/symfony/pull/11498. + */ + public function testSucceedingExpressionAtPropertyLevelWithoutRoot() + { + $constraint = new Expression('value == "1"'); + + $this->setRoot('1'); + $this->setPropertyPath(''); + $this->setProperty(null, 'property'); + + $this->validator->validate('1', $constraint); + + $this->assertNoViolation(); + } + + /** + * When validatePropertyValue() is called with a class name + * https://github.com/symfony/symfony/pull/11498. + */ + public function testFailingExpressionAtPropertyLevelWithoutRoot() + { + $constraint = new Expression(array( + 'expression' => 'value == "1"', + 'message' => 'myMessage', + )); + + $this->setRoot('2'); + $this->setPropertyPath(''); + $this->setProperty(null, 'property'); + + $this->validator->validate('2', $constraint); + + $this->buildViolation('myMessage') + ->atPath('') + ->setParameter('{{ value }}', '"2"') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testExpressionLanguageUsage() + { + $constraint = new Expression(array( + 'expression' => 'false', + )); + + $expressionLanguage = $this->getMockBuilder('Symfony\Component\ExpressionLanguage\ExpressionLanguage')->getMock(); + + $used = false; + + $expressionLanguage->method('evaluate') + ->will($this->returnCallback(function () use (&$used) { + $used = true; + + return true; + })); + + $validator = new ExpressionValidator(null, $expressionLanguage); + $validator->initialize($this->createContext()); + $validator->validate(null, $constraint); + + $this->assertTrue($used, 'Failed asserting that custom ExpressionLanguage instance is used.'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fdecdc7cc1f45d4bc254dc840a72d64224ab29d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php @@ -0,0 +1,153 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\File; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +class FileTest extends TestCase +{ + /** + * @param mixed $maxSize + * @param int $bytes + * @param bool $binaryFormat + * @dataProvider provideValidSizes + */ + public function testMaxSize($maxSize, $bytes, $binaryFormat) + { + $file = new File(array('maxSize' => $maxSize)); + + $this->assertSame($bytes, $file->maxSize); + $this->assertSame($binaryFormat, $file->binaryFormat); + } + + /** + * @dataProvider provideValidSizes + * + * @param int|string $maxSize + * @param int $bytes + * @param string $binaryFormat + */ + public function testMaxSizeCanBeSetAfterInitialization($maxSize, $bytes, $binaryFormat) + { + $file = new File(); + $file->maxSize = $maxSize; + + $this->assertSame($bytes, $file->maxSize); + $this->assertSame($binaryFormat, $file->binaryFormat); + } + + /** + * @dataProvider provideInvalidSizes + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + * + * @param int|string $maxSize + */ + public function testInvalidValueForMaxSizeThrowsExceptionAfterInitialization($maxSize) + { + $file = new File(array('maxSize' => 1000)); + $file->maxSize = $maxSize; + } + + /** + * @dataProvider provideInvalidSizes + * + * @param int|string $maxSize + */ + public function testMaxSizeCannotBeSetToInvalidValueAfterInitialization($maxSize) + { + $file = new File(array('maxSize' => 1000)); + + try { + $file->maxSize = $maxSize; + } catch (ConstraintDefinitionException $e) { + } + + $this->assertSame(1000, $file->maxSize); + } + + /** + * @param mixed $maxSize + * @dataProvider provideInValidSizes + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMaxSize($maxSize) + { + new File(array('maxSize' => $maxSize)); + } + + /** + * @return array + */ + public function provideValidSizes() + { + return array( + array('500', 500, false), + array(12300, 12300, false), + array('1ki', 1024, true), + array('1KI', 1024, true), + array('2k', 2000, false), + array('2K', 2000, false), + array('1mi', 1048576, true), + array('1MI', 1048576, true), + array('3m', 3000000, false), + array('3M', 3000000, false), + ); + } + + /** + * @return array + */ + public function provideInvalidSizes() + { + return array( + array('+100'), + array('foo'), + array('1Ko'), + array('1kio'), + array('1G'), + array('1Gi'), + ); + } + + /** + * @param mixed $maxSize + * @param bool $guessedFormat + * @param bool $binaryFormat + * @dataProvider provideFormats + */ + public function testBinaryFormat($maxSize, $guessedFormat, $binaryFormat) + { + $file = new File(array('maxSize' => $maxSize, 'binaryFormat' => $guessedFormat)); + + $this->assertSame($binaryFormat, $file->binaryFormat); + } + + /** + * @return array + */ + public function provideFormats() + { + return array( + array(100, null, false), + array(100, true, true), + array(100, false, false), + array('100K', null, false), + array('100K', true, true), + array('100K', false, false), + array('100Ki', null, true), + array('100Ki', true, true), + array('100Ki', false, false), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorObjectTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorObjectTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f35f93b1797d62670acde44c64d7cd9e6092831f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorObjectTest.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\HttpFoundation\File\File; + +class FileValidatorObjectTest extends FileValidatorTest +{ + protected function getFile($filename) + { + return new File($filename); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorPathTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorPathTest.php new file mode 100644 index 0000000000000000000000000000000000000000..11b8d4cb7987ce347d25f384c9e2ddf3e7bfd84a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorPathTest.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\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\File; + +class FileValidatorPathTest extends FileValidatorTest +{ + protected function getFile($filename) + { + return $filename; + } + + public function testFileNotFound() + { + $constraint = new File(array( + 'notFoundMessage' => 'myMessage', + )); + + $this->validator->validate('foobar', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ file }}', '"foobar"') + ->setCode(File::NOT_FOUND_ERROR) + ->assertRaised(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4cf62a6215507721d30ee1b300e7aa1c60a61ccf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php @@ -0,0 +1,472 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\Validator\Constraints\File; +use Symfony\Component\Validator\Constraints\FileValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +abstract class FileValidatorTest extends ConstraintValidatorTestCase +{ + protected $path; + + protected $file; + + protected function createValidator() + { + return new FileValidator(); + } + + protected function setUp() + { + parent::setUp(); + + $this->path = sys_get_temp_dir().DIRECTORY_SEPARATOR.'FileValidatorTest'; + $this->file = fopen($this->path, 'w'); + fwrite($this->file, ' ', 1); + } + + protected function tearDown() + { + parent::tearDown(); + + if (is_resource($this->file)) { + fclose($this->file); + } + + if (file_exists($this->path)) { + unlink($this->path); + } + + $this->path = null; + $this->file = null; + } + + public function testNullIsValid() + { + $this->validator->validate(null, new File()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new File()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleTypeOrFile() + { + $this->validator->validate(new \stdClass(), new File()); + } + + public function testValidFile() + { + $this->validator->validate($this->path, new File()); + + $this->assertNoViolation(); + } + + public function testValidUploadedfile() + { + $file = new UploadedFile($this->path, 'originalName', null, null, null, true); + $this->validator->validate($file, new File()); + + $this->assertNoViolation(); + } + + public function provideMaxSizeExceededTests() + { + // We have various interesting limit - size combinations to test. + // Assume a limit of 1000 bytes (1 kB). Then the following table + // lists the violation messages for different file sizes: + // -----------+-------------------------------------------------------- + // Size | Violation Message + // -----------+-------------------------------------------------------- + // 1000 bytes | No violation + // 1001 bytes | "Size of 1001 bytes exceeded limit of 1000 bytes" + // 1004 bytes | "Size of 1004 bytes exceeded limit of 1000 bytes" + // | NOT: "Size of 1 kB exceeded limit of 1 kB" + // 1005 bytes | "Size of 1.01 kB exceeded limit of 1 kB" + // -----------+-------------------------------------------------------- + + // As you see, we have two interesting borders: + + // 1000/1001 - The border as of which a violation occurs + // 1004/1005 - The border as of which the message can be rounded to kB + + // Analogous for kB/MB. + + // Prior to Symfony 2.5, violation messages are always displayed in the + // same unit used to specify the limit. + + // As of Symfony 2.5, the above logic is implemented. + return array( + // limit in bytes + array(1001, 1000, '1001', '1000', 'bytes'), + array(1004, 1000, '1004', '1000', 'bytes'), + array(1005, 1000, '1.01', '1', 'kB'), + + array(1000001, 1000000, '1000001', '1000000', 'bytes'), + array(1004999, 1000000, '1005', '1000', 'kB'), + array(1005000, 1000000, '1.01', '1', 'MB'), + + // limit in kB + array(1001, '1k', '1001', '1000', 'bytes'), + array(1004, '1k', '1004', '1000', 'bytes'), + array(1005, '1k', '1.01', '1', 'kB'), + + array(1000001, '1000k', '1000001', '1000000', 'bytes'), + array(1004999, '1000k', '1005', '1000', 'kB'), + array(1005000, '1000k', '1.01', '1', 'MB'), + + // limit in MB + array(1000001, '1M', '1000001', '1000000', 'bytes'), + array(1004999, '1M', '1005', '1000', 'kB'), + array(1005000, '1M', '1.01', '1', 'MB'), + + // limit in KiB + array(1025, '1Ki', '1025', '1024', 'bytes'), + array(1029, '1Ki', '1029', '1024', 'bytes'), + array(1030, '1Ki', '1.01', '1', 'KiB'), + + array(1048577, '1024Ki', '1048577', '1048576', 'bytes'), + array(1053818, '1024Ki', '1029.12', '1024', 'KiB'), + array(1053819, '1024Ki', '1.01', '1', 'MiB'), + + // limit in MiB + array(1048577, '1Mi', '1048577', '1048576', 'bytes'), + array(1053818, '1Mi', '1029.12', '1024', 'KiB'), + array(1053819, '1Mi', '1.01', '1', 'MiB'), + ); + } + + /** + * @dataProvider provideMaxSizeExceededTests + */ + public function testMaxSizeExceeded($bytesWritten, $limit, $sizeAsString, $limitAsString, $suffix) + { + fseek($this->file, $bytesWritten - 1, SEEK_SET); + fwrite($this->file, '0'); + fclose($this->file); + + $constraint = new File(array( + 'maxSize' => $limit, + 'maxSizeMessage' => 'myMessage', + )); + + $this->validator->validate($this->getFile($this->path), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ limit }}', $limitAsString) + ->setParameter('{{ size }}', $sizeAsString) + ->setParameter('{{ suffix }}', $suffix) + ->setParameter('{{ file }}', '"'.$this->path.'"') + ->setCode(File::TOO_LARGE_ERROR) + ->assertRaised(); + } + + public function provideMaxSizeNotExceededTests() + { + return array( + // limit in bytes + array(1000, 1000), + array(1000000, 1000000), + + // limit in kB + array(1000, '1k'), + array(1000000, '1000k'), + + // limit in MB + array(1000000, '1M'), + + // limit in KiB + array(1024, '1Ki'), + array(1048576, '1024Ki'), + + // limit in MiB + array(1048576, '1Mi'), + ); + } + + /** + * @dataProvider provideMaxSizeNotExceededTests + */ + public function testMaxSizeNotExceeded($bytesWritten, $limit) + { + fseek($this->file, $bytesWritten - 1, SEEK_SET); + fwrite($this->file, '0'); + fclose($this->file); + + $constraint = new File(array( + 'maxSize' => $limit, + 'maxSizeMessage' => 'myMessage', + )); + + $this->validator->validate($this->getFile($this->path), $constraint); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMaxSize() + { + $constraint = new File(array( + 'maxSize' => '1abc', + )); + + $this->validator->validate($this->path, $constraint); + } + + public function provideBinaryFormatTests() + { + return array( + array(11, 10, null, '11', '10', 'bytes'), + array(11, 10, true, '11', '10', 'bytes'), + array(11, 10, false, '11', '10', 'bytes'), + + // round(size) == 1.01kB, limit == 1kB + array(ceil(1000 * 1.01), 1000, null, '1.01', '1', 'kB'), + array(ceil(1000 * 1.01), '1k', null, '1.01', '1', 'kB'), + array(ceil(1024 * 1.01), '1Ki', null, '1.01', '1', 'KiB'), + + array(ceil(1024 * 1.01), 1024, true, '1.01', '1', 'KiB'), + array(ceil(1024 * 1.01 * 1000), '1024k', true, '1010', '1000', 'KiB'), + array(ceil(1024 * 1.01), '1Ki', true, '1.01', '1', 'KiB'), + + array(ceil(1000 * 1.01), 1000, false, '1.01', '1', 'kB'), + array(ceil(1000 * 1.01), '1k', false, '1.01', '1', 'kB'), + array(ceil(1024 * 1.01 * 10), '10Ki', false, '10.34', '10.24', 'kB'), + ); + } + + /** + * @dataProvider provideBinaryFormatTests + */ + public function testBinaryFormat($bytesWritten, $limit, $binaryFormat, $sizeAsString, $limitAsString, $suffix) + { + fseek($this->file, $bytesWritten - 1, SEEK_SET); + fwrite($this->file, '0'); + fclose($this->file); + + $constraint = new File(array( + 'maxSize' => $limit, + 'binaryFormat' => $binaryFormat, + 'maxSizeMessage' => 'myMessage', + )); + + $this->validator->validate($this->getFile($this->path), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ limit }}', $limitAsString) + ->setParameter('{{ size }}', $sizeAsString) + ->setParameter('{{ suffix }}', $suffix) + ->setParameter('{{ file }}', '"'.$this->path.'"') + ->setCode(File::TOO_LARGE_ERROR) + ->assertRaised(); + } + + public function testValidMimeType() + { + $file = $this + ->getMockBuilder('Symfony\Component\HttpFoundation\File\File') + ->setConstructorArgs(array(__DIR__.'/Fixtures/foo')) + ->getMock(); + $file + ->expects($this->once()) + ->method('getPathname') + ->will($this->returnValue($this->path)); + $file + ->expects($this->once()) + ->method('getMimeType') + ->will($this->returnValue('image/jpg')); + + $constraint = new File(array( + 'mimeTypes' => array('image/png', 'image/jpg'), + )); + + $this->validator->validate($file, $constraint); + + $this->assertNoViolation(); + } + + public function testValidWildcardMimeType() + { + $file = $this + ->getMockBuilder('Symfony\Component\HttpFoundation\File\File') + ->setConstructorArgs(array(__DIR__.'/Fixtures/foo')) + ->getMock(); + $file + ->expects($this->once()) + ->method('getPathname') + ->will($this->returnValue($this->path)); + $file + ->expects($this->once()) + ->method('getMimeType') + ->will($this->returnValue('image/jpg')); + + $constraint = new File(array( + 'mimeTypes' => array('image/*'), + )); + + $this->validator->validate($file, $constraint); + + $this->assertNoViolation(); + } + + public function testInvalidMimeType() + { + $file = $this + ->getMockBuilder('Symfony\Component\HttpFoundation\File\File') + ->setConstructorArgs(array(__DIR__.'/Fixtures/foo')) + ->getMock(); + $file + ->expects($this->once()) + ->method('getPathname') + ->will($this->returnValue($this->path)); + $file + ->expects($this->once()) + ->method('getMimeType') + ->will($this->returnValue('application/pdf')); + + $constraint = new File(array( + 'mimeTypes' => array('image/png', 'image/jpg'), + 'mimeTypesMessage' => 'myMessage', + )); + + $this->validator->validate($file, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ type }}', '"application/pdf"') + ->setParameter('{{ types }}', '"image/png", "image/jpg"') + ->setParameter('{{ file }}', '"'.$this->path.'"') + ->setCode(File::INVALID_MIME_TYPE_ERROR) + ->assertRaised(); + } + + public function testInvalidWildcardMimeType() + { + $file = $this + ->getMockBuilder('Symfony\Component\HttpFoundation\File\File') + ->setConstructorArgs(array(__DIR__.'/Fixtures/foo')) + ->getMock(); + $file + ->expects($this->once()) + ->method('getPathname') + ->will($this->returnValue($this->path)); + $file + ->expects($this->once()) + ->method('getMimeType') + ->will($this->returnValue('application/pdf')); + + $constraint = new File(array( + 'mimeTypes' => array('image/*', 'image/jpg'), + 'mimeTypesMessage' => 'myMessage', + )); + + $this->validator->validate($file, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ type }}', '"application/pdf"') + ->setParameter('{{ types }}', '"image/*", "image/jpg"') + ->setParameter('{{ file }}', '"'.$this->path.'"') + ->setCode(File::INVALID_MIME_TYPE_ERROR) + ->assertRaised(); + } + + public function testDisallowEmpty() + { + ftruncate($this->file, 0); + + $constraint = new File(array( + 'disallowEmptyMessage' => 'myMessage', + )); + + $this->validator->validate($this->getFile($this->path), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ file }}', '"'.$this->path.'"') + ->setCode(File::EMPTY_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider uploadedFileErrorProvider + */ + public function testUploadedFileError($error, $message, array $params = array(), $maxSize = null) + { + $file = new UploadedFile('/path/to/file', 'originalName', 'mime', 0, $error); + + $constraint = new File(array( + $message => 'myMessage', + 'maxSize' => $maxSize, + )); + + $this->validator->validate($file, $constraint); + + $this->buildViolation('myMessage') + ->setParameters($params) + ->setCode($error) + ->assertRaised(); + } + + public function uploadedFileErrorProvider() + { + $tests = array( + array(UPLOAD_ERR_FORM_SIZE, 'uploadFormSizeErrorMessage'), + array(UPLOAD_ERR_PARTIAL, 'uploadPartialErrorMessage'), + array(UPLOAD_ERR_NO_FILE, 'uploadNoFileErrorMessage'), + array(UPLOAD_ERR_NO_TMP_DIR, 'uploadNoTmpDirErrorMessage'), + array(UPLOAD_ERR_CANT_WRITE, 'uploadCantWriteErrorMessage'), + array(UPLOAD_ERR_EXTENSION, 'uploadExtensionErrorMessage'), + ); + + if (class_exists('Symfony\Component\HttpFoundation\File\UploadedFile')) { + // when no maxSize is specified on constraint, it should use the ini value + $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + '{{ limit }}' => UploadedFile::getMaxFilesize() / 1048576, + '{{ suffix }}' => 'MiB', + )); + + // it should use the smaller limitation (maxSize option in this case) + $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + '{{ limit }}' => 1, + '{{ suffix }}' => 'bytes', + ), '1'); + + // it correctly parses the maxSize option and not only uses simple string comparison + // 1000M should be bigger than the ini value + $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + '{{ limit }}' => UploadedFile::getMaxFilesize() / 1048576, + '{{ suffix }}' => 'MiB', + ), '1000M'); + + // it correctly parses the maxSize option and not only uses simple string comparison + // 1000M should be bigger than the ini value + $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + '{{ limit }}' => '0.1', + '{{ suffix }}' => 'MB', + ), '100K'); + } + + return $tests; + } + + abstract protected function getFile($filename); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/ChildA.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/ChildA.php new file mode 100644 index 0000000000000000000000000000000000000000..2234ecda28e88fc3a4443d7faee45f9a65795644 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/ChildA.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\Validator\Tests\Constraints\Fixtures; + +use Symfony\Component\Validator\Constraints as Assert; + +class ChildA +{ + /** + * @Assert\Valid + * @Assert\NotNull + * @Assert\NotBlank + */ + public $name; + /** + * @var ChildB + * @Assert\Valid + * @Assert\NotNull + */ + public $childB; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/ChildB.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/ChildB.php new file mode 100644 index 0000000000000000000000000000000000000000..1b02d889f2f6252e49dee4b550c6809b38f86769 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/ChildB.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\Component\Validator\Tests\Constraints\Fixtures; + +use Symfony\Component\Validator\Constraints as Assert; + +class ChildB +{ + /** + * @Assert\Valid + * @Assert\NotBlank + */ + public $name; + /** + * @var ChildA + * @Assert\Valid + * @Assert\NotBlank + */ + public $childA; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/foo b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/foo new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test.gif b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test.gif new file mode 100644 index 0000000000000000000000000000000000000000..6b44fc7dfb859cbcfd1b5cc72b1fa68ddd5b4328 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test.gif differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_4by3.gif b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_4by3.gif new file mode 100644 index 0000000000000000000000000000000000000000..64dd3ff96a22b811751dba118c240d0ccd4165f7 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_4by3.gif differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_corrupted.gif b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_corrupted.gif new file mode 100644 index 0000000000000000000000000000000000000000..5fe3b946e93b240b4625808815abb4af48b22ba4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_corrupted.gif @@ -0,0 +1,86 @@ +GIF89ad d ÷ Ro«(DHÏÓÔm/t8f†j’üÿÿ2W[ #V–¥nkwLPQ&9C’³É!49†)u)3²êꮳ´15%ITEtx8Wc65jCiw +e§«¦±Ôtœ¼KFCE‡UŠ˜;djè÷ø2FXx·¹–ÆÆˆº¼"'7to‚E2k±,ÑÜîÏLºèêêW‡ˆ8$G¾ËèL…Šg8€fs¯Hx‡e˜¥36G†—)5:GzHY–Ú÷÷7)XU”›ËæëE&V8B©ÈÖ#$Z£©ˆ“º‹ÄǨÖ×%#EoH˜FYažÀÀGceÃ3¡4juv¥«gVu(RW49Ugª²)*x©¹T+ek³¶He™7A7JdI+aB9F7s”0„†–—SJ–¶R¶S0jØèé + (Ug"*óþüh‚½6VuU[¦W{–W7vFDdDw”¬ÌC K—S³iS¥—˜š(6X»vÆEj‰AQˆ¶ØÛw–µ VJj¦ËÎN€|"*æìöiVBLaЦÙìò‘œÄóôôXxz™Ö×14IQz‡K”›(Kb777pµ7s}y‰W"W"*€‡ˆÉöõC0Hh›´RDEi[#"%3#;¼ÇÆV£žE;VœÈѸe¹& $Xj˜™§ª !$v°®,[s‡„“)ah/,gri#^”½» rš¦PT…«»WWd ô÷úX‘‹.GMEXt„Jž³ÊÞIvm _ers޳’‹—()  *)Og BA}Š¢¤}ÃÈKM‘VefÉíðXZo7^^m¶¯p‹­¸áâ$?>íñðQgŠ‚µ±=‚ˆ¸=§ Ã`¼0,¡œ££ÐÏÝßßÈáá0 *œ®°£Fœû÷üöûúòïô  +$1PR¶½àH0/,1[[ˆJBO ($($-.-RMÌÐ+NO_/o:2y!d¿¾Ãðëïóóï¤áá¡¢¢ ÿÿÿ!ÿ NETSCAPE2.0 !ù + ÿ , d d ¡ û H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª\ɲ¥Ë—0cÊœI³¦Í›8sêÜɳ§ÏŸ@ƒ +J´¨Ñ£H“*]Ê´©Ó§P£JJµªÕ«X³jÝʵ«×¯`ÊK¶¬Ù³hÓª]˶­Û·pãÊK·®Ý»xóêÝË·¯ß¿€ L¸°áÈ+^ÌXp@ !ù + ÿ , d d ÿ 7H° Áƒ*\Ȱ¡C#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª\ɲ¥Ë—0cÊœI³¦Í›8sêÜɳ§ÏŸ@ƒ +J´¨Ñ£H“*]Ê´©Ó§P£JJµªÕ«X³jÝʵ«×¯`ÊK¶lÆe´š¶©›Yw’$¤ƒPn*YjÛê7 †d€1H„â®;!¿{ÕUžˆ Šd¼˜|ÇÖàˆseìøE0 ]-ÄFƒ`Ì™·.hœ‹–ëÏzD‹&}oꬾ:Þ-ÛÕî µo_åæ@ÄkÞ¾“auÚ½T%¼ºr6jÛ~^uµqP¬‡ñ¯!€óáÅi…_?¾€{òæÎCš À…`¥Ø¿oZÑ–$ lgU}5à§ß û%XC|†q]q†— k!PÈÜ`:øà}ù%‡`… †x òuWÁw~8ÙŠ"NÑ †SIW`Š*²Ys¦ÙƒÉxÖß{6Vf^ŽÂmhã‘”‘Hd‘BÆÆ“G§ŽLVU…_¶<™ˆ"0¸äŽÃýá h p ùå|X1„_d^ö"Œ]¡—\ÌY%_Tîù›ný)è „j衈&ªè¢Œ6êè£F*餔Vj饘fªé¦œvêé§ †úШ !ù + ÿ , ! & % ÿ ÿ H°`· *\Èa·‡­"J„ذ¢@ˆã2.ÐÈq¢Eƒ5’I’dÇ%ê*©®BË—&3¢tˆ€¥ ›8qºŒ‰2âH—9¥ªSÝJ™}¶Äi¦)ª§P‰î<ÊpÒ 7¡>Ùúˆ«ª¨7êB +2ãR¡_»F[˶ëצaG’øp%V´Ø¢ÛË·íÛ¸=Ò¬U-_‹+ÆÁö©Abç"´káéZÅ2kÎÜ×íãÈ)ÍV~rs‘Ó¨O3^»õ³¯±•2R•×ôf¸q/öä5‚Ø”IÛ¾[÷jp%Àž¨‹°™ÚÄS/’ø ï©Ì_žÎ}zuäŒ KÙZ^+íÄÿJ©§Ò½øw5á!(ïHаðÓÐÖ·7μøÀÕ7Zbûq‡X¦Ä7R¢¡]tÝXƒØ¨Ž Ïía„ï)Hžl÷mè‚É}XÞ€ŠHÝq º&Sv†¨b$º8—ljauÖµXF YhÞƒÃñx‰t5è u«ÖY‹½-(X’ܜŕ^~ùè vSRéË]–ååÖVŽý(YYõ£Vešy¦Bu¥y×ctºùæB*÷V.q äLŹK1ý hhôýd—‡EA2 !ù + ÿ ,  / - ÿ ÿ H°àÀn[)\h°¡Ã‡Ž›H±¢Eˆ#þ*ƒ c] Cz¼˜cB‘’RJPÉR$Ã’=’bY¡¦Í•8gŽ„YP"Í @ƒ +½™r'Ï +Cª»9´)Q$!&U)TÕ«Xí˜Ð丙K«bµ@¶lÖ [£ö”Ô,£·pãšÕªöàD_aÝÊÝ+whÚ®kÁŽ5×°a¾uкŒ™7®©Ã#K><·&TÀH7JZòdÏŸá:P•ãÒ·ªž¤VÍ:´kѤ/šbAÄ£Û8rçþw{õkÊdcÛ] ®v t‹Š(W¾hQ´Þ¿_]¹)© ¦¢)XN¥»wçoˆÿ÷ýú,H†I=Ú®¬½{÷EÀuŽ7\W•‹ÿÿ v'ß|¿M·Ôù"ÈE¼ € +äF`Á˜ ‹”p+žà` þÅÞ„ÖwßùI`JƒLtØá‡"Ž(Þ4Öˆ‡&þq^;U@ G˜ÐbB~¢„wda£8æÈUªäE‚è`„2.ɤ“>E¹!•ˆ¤’Zcf“îhÝŠº¨¡˜Y–y¦‰%vbŠêqð¦•pÆ)§hÚ÷W7º`ÇÞƒ|þƒ%™Œþ9š Oâ‰CƒF†¸h’–¹E…ƒ"´ß¤•ƈi¦K‚`ªwÚUœ z'à¥óý—yª@éè~ªV žvÛŧ蘱ʊêŽÓF›)ª½¡t$þ™Á°kì±È’Hž7–*̳оDÐTÔÒ'Y¶t2Òíè:îU ÑWg­¥+Hµ[žU9q$í¼ô¶åؽ±ÕÅUýÛ +'z[ÒTTq¦Wš•‚?i•ðF¯•àOb–±ÆG+ðÇ1Y„¢Ç% !ù + ÿ ,  9 8 ÿ ÿ H° Á›Ê(\Èð Ã‡vcèNVE‹/6ŒÈ"ÅT CŠL@RãÆŽ(?ŠL²¥Ë‘'S:Té˜Í›8_f”éqáÊœ=‚ +Í 3¦Ì‰ÍÀtéP›EyLZÓ©Õ¦O[š”Jµ*Ö¯`±­ˆ4¥O¯aÓ‚KÖ,I´juxFW-ÔF "}{3®Ü¿€ç +{wgO‹pëV bñÚÂyîÙÐõëâÆ˜33v|/噕™^ÆCz´fÎ?ô§dß €KËÖ1»6ÝÓX=¤ŒX(lÒ;‚ n›¶qÍ*æ-¹{/ËßÀ³HŸNøéëus–ÌZÖsèÓEÿO½|ñâ„™œÜ{Ktòðã›?[»;½Ÿã™ž¦ùòUG_vu¤†Ð?( ›tþ ò€ +‡]}þ3‘$ ÒÆÆ –,áƒBHž„6f_C$9à Xáb‡0†(bÅX7¡‰'Z˜_ j àÁL˜pÄ %¼âŒkx#,Y$™wÀ†°°bÂ5Xi¤ƒH¾Ü’8¦ÖJж R¥XfùOŒ\Îhã’6yß… j`C C^‰ÄžZ¶è_—%†)§ŽdZ‚§ž{öÑg‡2¨ä%ž¸WvZdš|ÂÂ& ¯€©œQjæ ˆfº)§a@ª*…rî•@”S’ÿÚǬŠjÊ(/F¨Ä»®ÊjI‘P©¬BÉf®ð­Áë²½úšYœÀr÷êwp䢧BÈì®Üb­“•!µ¶h ç*pd—Û6‹\SºéØ]n˜Æ­ÈÊ×n·ï~;'BÝ%1…ÁÍÈn»ÎÊU!wì)H°Á޾²¯»‚¶ºZÀ*îÄ4N¬DÂðF‹ôjÌ1usËï³þ–5òÜHPòÆn~™êÊÈ-|qkðhr„ÔÕ˜ð¯m¦ †3 t bÅÛSBGËL‚´ ¨q’ªö40'ÝÕõ1• g ¹ÅWÉÇ¥­öm +·™D„¶Tà×k6·˜\Úµ×sÃK&jþêµÖ\%õkô>¦ÓVyÜU‚@Õ*Y„7.ïãg.'°”WnùåIEÍùèá~Z¸0§®úÛ¦ŸŽ:ë­wTzì¦;G !ù + ÿ ,  J < ÿ ÿ H° Áƒý)\Ȱ!‡#J4ذ¢Å‰3J´È±£Æ;ŠB²ä¦“ Syò—IY0cÊ4©²&Ë’gdæÜÉs&J›oêÌ©%‡Ñ£H{º£ ô¡P¤0ŠF•:•êQŸMWŽŒiHT.^Ê {uéϬÿ¶r­ +öJÛ·pÉÝÉ´éV¨cãŽqË7î\ºgUvL ¯Þ¾‡÷¾ +8ðG‹ "§2 +¬G˜#ÞœXncÁ%¡HRù²—Ó¨5wæ ¶㘎1V$,tiÔÂÚèÞ­zuo×ë†l‰€T•ã·qç¾Ä¼yêÞÐU¿†ýø¤."Æ+©ÃÝôòæaœóÿŽNÞ3õáÅÿ×Þ]ˆïáÁ‹/Ϻõtá7èO/AÝvAlñ^1ñÉgàx™ùf_peì§Õ~ JæŸí°Ã+fX xÌ=GŸ_ æá8$fÇ€jàq¡†k°x ‡JWÖ’Xb'Öb†{+®ñ -¹á|1rvE­¸d#7¾àø#ª¸ 4TY¥CvcŒÀÍXq2™£ PJIåi¤ $–Yidˆ_¾´Þ“Rl‘"•Vª©&›Dº)£Qfi¥Þ˜dZp'žz&ÊgŸ~ÚwÞ—ƒ` Ðyhž‰¦¹¨–.È ƒiEJéRb)¢™îé"£äÕóÛ§•ÿH!0’J꩘¦ºf›­~gZK%âÆÂŽzk¡—êª*¯½–ÕgKéÁ°Ä[ª©Pfª²›nÙ¬b°[F*ÄÒjm¡†â±-šzþÓí·®¾ú©ƒãÒZ¬­•’™l»í¾; ¼ñò.AÐV«¤“&¬î¶‰º»é¿G\ß‚ÐLR“t껯@ý®z‰Äƒ,/ øÅ*aÂ(_x&»š¾ëEÈ0‹ <ºÒu„¦¨rÃ.G³Ì,(Æ–š9PÏãýì󟋈ó‰Zèq–k¦4ÐÃ[œ7>)5SsšôÕ2ÓlsD]{-%Õ¬îE¶ÄæŠÞ?µUÈvÕ*ööfónÆí4Ýu{7à ï}߈…9Yrƒ‹`ሙmV7 &>îâ–)ç­‚n3­µ¸ÕYwe™wúíá~£·é@ ÌyÜJ¦.å«kòÕ믓‰ÿB§¸™0I´Éˆv÷’vЋv Ì +˜Á:# !ù + ÿ ,  [ ; ÿ ÿ H° Áƒú[Ȱa·2ÿm˜¨°¢Å‹:ÜñaÇMCfIÒ"Ç“BB¦¨RbÉ—/QNT™²¦¬•.mz„ÉӤǟ3iž¹9”hÑ£5ö\:(M¡Õž¹AUêÍ–La‚|êΨר`«Š‹TdV’[;zM°`j*·9âÊ%«¥®]`¯&=‹‘ãÚ·€çÚ¥:¸páyõâä«0èßÀI"Ã0<™²å¹Š¥eLЯ$¶Ÿÿˆ–\¹‡i ¨ã”¾l¸ìÊÍœ† ™ôéÔªs³¾‹93EÆžg×v›‹ñã¸Wï*©fØ1¹ê>œxqäÉu/gîúHém©Kÿ€€Xyë×±gßÎÝ·Vð´Ï×q0?QzøÕ¯g_Õ}IÇ…&_}$ÔwŸ~ûñ×Ýo}9¥V|óé@ fà……ùe¨a‚ +ú—‘_ÅGÜQ"‰jT(Ì…¶ˆ`‡Î™ÕˆáAâ !ä¨H &€‡@®è¢‹ÚÁØ•ŒÉ” ôhT” %>èèãBù"íauQZAIÐä“Qž0%T²ÁÆXf©%‡F"9cŒbŠP™¥ÀbæžiðÊ úæ–qÊyЃ:`Î8B©çž|þ³æ+—¸9h‘…zg¢‰b “6@aEžòÉ‹¤”VÊ⥘nל‡›:ÿ"“æ$cÌ.l¸¢k©¬˜Ê‹ŸÅ¨º*‘­ºº K€) +Íd§"„**¯{žJ›–[¬±¾ÉÚmMŠÖR«“jîJ-,Vxð+¶Ã²Êe—\I´l3âþól¹Óžû+°Ùjû.¼†"b²)Ñ:.£ƒ˜«ïµÅ´ë¯r–µzìœj1+®­ä&¬°©üjè0¡K ë¡—±€Á7ºq)–„бLJ¼mb7& ÊM€êüF›0 §ÌºMühäÑs°Žjš$†Aƒ¼­<ÿD‚©Ñ2„4­(v=Eu€u†SËóAÙb‘3rƒŽ±Ä„ô5ÌpšmµÝgÏŒõw…ÿ7y€ØnÙwã­÷Úhía²Éâ (vÌ….¹äý!žøâ~ è8ä‘>yÞ /ÖSߌknÛuNyå{ÿGzãè 1è´×NsŒ|)» ñ>3ч¿Š;pZcÞûìÀv5ëï{æ‚%/ýí–þ:ôÑO™6Ôkêüõ_eßÚøp ßzlJ%þúi—oUõgÑx¤,a¹OYï¯Õ<ú¥¯>ûÌû–Nø÷%ÿÑï€ÿËŸN0×0V¤³Éî£À-Î{<”Û‚@ý-0^d›ü$˜ ÎO$ !Å8uBZÐK*¼Ü_ˆÂ’Å'¯ñV¼žsCô)KV%ì!ÿ j(¯ ±‡?,"L !ù + ÿ ,  d < ÿ ÿ H° Áƒ*DØ­ŒÀVB6m˜¸°¢Å‹3œÈ±á/C‚ÔH²$Ie$>D±¥È”0ÿM3I³æÊŽîrêÜ9r Ë—*m +½(&OYg ]zÔçÑŸC£24š4•Õ«X³’“É´kÕŸí(JÊ2k’³hÓæXëµm¨·]cŽ­YÖ,°»xó²ýZõL5Õ †Ët.ÝVõæ]܆–ÇkoHÜ¥²=Ë—µ †jآǾj7M:Î?Ó§1§ÆŒÙoRΧrµ+º´m ‘â|ØÍºwkÂ@cô·'%èеo_Yž7oß½]>¼8bäÉK3¯·]ÞsèÑSÿ¿©òxÚì=T¤_Î}€{æßÁÿ?–¸ýû³ŸOŸ¡¿zåc´Q{3Ì |ò…WO6Ýçàuûù'Œ„üý§Â¨!‚ *(Yøá¤_„za¢@b¨áŠv8l%=8ŽQ(@à@‰þ¥hâ‰ö¨"‹-º˜Ù‚Cɸ 6n‘Œ-wì€Ç“x䈢B¥€ãqJHe–:º…{¢cci¬GBò’ˆ¤äA<‡ÉN¥(2 ¥&7ÉIO‹'¥å(•JSz)’A™$udT”ZºR&¶ Ñ*3BËWºR—»Ì`ˆr‰b˜Á4`/qYÌø!3™¼ì¥ƒ¬3Íj>š'ÌŒyMlvÉšàôf"ÁNqŽ’œ6  !ù + ÿ ,  d = ÿ ÿ ¸iÁƒ*\Ȱ¡Ã‡ »m±bĉ-jÔXæ_‰1nYÑŸI&O’Lø±¥Ë•%;ŠT˜²¦Í›*7ºÜ9&K™ªÄI´¨PŽ<{ú<´iѤOB„úÒçK§£‚¤ŠQêT®0·bE©U,׳f"X˶-Ù®1»†”‹¬GYBÈå-£·¯_»wÛ +üó-Ö²tý +L +U¨3k“üO²åÇY .ØÌy0a¦YášEœóåȵT«ü¯‹j×°a_&ËMWgÏŸ5¸wcÎŽƒ·~=\žñã‘>(_n¯y¨_zÛžŽ›pèÝu1â-:‡÷šÀkÿYŽ|•ùóÒ—½¶{ê·sóÎîn»ýÓâ¿ÇÙý½ÿ ¦çßz˜UAÄð ø^uJ å[bïyWNpR¨_~å `v €Ì5gàˆ$Â7ƒ…ö K¶X¡‹°%ÉyÖèူ¥£ãŽ *Èà\*žx‚À™Ä‘(iä…¯Ç6F9 zöT<šøãŠù’Ž `Ö!æ˜JC“Î8£†~ᦔª·^3tBPg‰ZÒ'$‚V‚i#€’&™üq&“gªi^›o6zcœrvQg ƒf¹à–‹m6b˜¢BÀ§j„º…„z„ +‡¦™!£ŽÂ©<æÿ`Ь±Òs§[Ÿfxúį ŠªÃ°k*†¦êd‹²Új«ª'&(’˵˜$#¥#æÚÒ®ôªÊ¸¼an°Â‚`쩨&‹!³> -‡SÊC˽®Ü+ƒÙÚzežn}»i¸ä–û碛® + »ûîšÎÊû(zÆ•b1pàÃ"üNëï¥BîT›Ž‚ˆ[ð?' jYà±m«ì“lJo4¸J7rFüiÒJ/íòÓQO ¥ÕÎâˆt3óI c Ð"0ÿbå¸qCrÙãðÚi7m»Ý,Ü®¢GwÝ<÷lùÞ`Ýv Ù}øÁˆ«½ƒâ‹Ë,žqoC-Å“ƒcwå—ó­ƒ·Â÷9Ù¨ˆþé8pœøâs̱¸ÃË>Ëûì´ëýBæ:hÛ¯ô˜ 输¼% +Ü¡r1§?GãMÊÓúòô;!Ÿ°bBô{³Qíµ~|=ièÝ“þðŠkò’W3öµvtÓZäwú)"öC‡ó§` "øÙ6X:–­! §sZ»EµªY­y „ýöfêk‚ù{Ðö5=•nƒŸRã 6³Õ•ЀT8ÿØÀ"^Nzx¡”øÂŸOƒP´àÊZ&Œ*f ‡Éû¡›·µùå툃aôõÀ1N¯‰h4{ש6 ‹éÓ¢ëäfÄ/"±Œg\â ÷(Æ4*Œâ +”˜RD- ^&”X´º·Œý,_I´Öýð‡ÇÆ0j ÃEªN: I†,Ô?Ö9HU,]sâô4p z`pZ”Œå%Ñø)Mn‹“•JÒwvIB9*g®aa0XHFê {ÍØµd¹Lü)Ñ–m$UѲ§,^Z“f4á"ƒIL'b PÙ[¬°EÎfÆš%Ë¥Ž^tÍCb3›7k^sT Ã\h lï¡Ó8Í™ÿ-l½r“ê §{PÀÎvúPQðl”7Íie ŠœaÆ)ÚKkàªZ‹TÔ_ÕÑf°¿ò£ÖljlØC×¥®5­ZÅ \åê­§èµxÍ+b{ֽ؄CóLV‹*ÔŽRä0óá‹fÃꢛΆ4ÞzÏdQŽ }5³ µ«g«˜èÐÕ)¬hq¤Ës¦³uUíj!ÛÚÔêi¶5‰o¡SŸÊÄ6¶Ãý-Š’–¡$7)ÇíÇstÛ±Xeº¯EHN@»”¸L×+jAmw‘Zî:·ã]IyÁû•ª¤·»F9‰|Õ[]ê¾7,쥯mï{]ó’Ķ™á¯€¼_Ø' !ù + ÿ , d d ÿ  H° Áƒ*”U†¡C! !>\HQᦋ3jÜȱ£ÇŠ$ŠIò£É“(Sª´q¥Ë—0»…œI³e͘,qêÜÉÓæÍŸ=ƒ +•™ÓçУE‘*]JÔ(Ó§[EuJu$P¨X¥&­šµëÕ¦`½rK6ìײ[­šEËößÚ´lÏºŠ€î8»pãÖÕÛö.Þ2Y윗/áÁ‚oRü±cÃ#Kv̸rãÂo3¿´\7çÏCû½LZs`ѨA'VºäÙ±§[‹þS޵mÖ¯sǖݹŠoÚÀ¹_Í[·ñØD’ÿ^®¼¹sáÐQ%>ùêçÌÓeÇ›ôŸÔ'/ÿ½¾€»öó臫WO¹ø÷ñÄͧŸOß»}]÷Û—¬Íþçäå‡V0`}ÜåÞm šfgä5W`3VèÀ„¸]wJÄ ám6 x½(`†¦¨"‚Ìýçâ‹Âö ]&Ò†b 8æXËŽ9¢È"€5Âc*26a€ÛÝÈ£Šô¬h ?&è¡güCäDÇÍåtôM¸¤Ž_šÓ¤“n%ˆX:tÆgkVce*Õ¸fÜuz&˜ˆ &™u¶ˆ&•pj¢Å 9´™&IGÚx¡’{ê)fžô@Ú£(”)%’©$Q覄v +œŸ’#j¨¢Ž¡> +i2yŠÀꪒNÿZ欗VÃi¦¸v‡®¶vÑë?öØzXhÊ‘™ã«®j ì4«¬«ÈŽÉ§¥(äÚæ­‚f«ë®Ü~àí·ò„ûÁ‚¾-j'ŽÈ6ËÆº!´ëC»ÎBëŠuhÌ› À`mÛöÛm$ ÿóO bp ä2i2øá.PD\ŠÄÁ¼.Ná€Æ› Lµšêë©¶"Ãðï*(üO,·AT÷¡Š.ÃÛ q)'°¢ó:Olƒ GË DYàÇ!“¬´ÉLs‹ò=P»¼ÂÔ_Lí—„{¦J³7ç| y€Ý‡ &”à3ÐAÃ:4Lj40=$÷Ü@ôÀÅ¿q ìrÕS÷ÿíw‰çâ¹58ñu6?£8âa“ ñ»2à€¶¼ó²]G˜g®ÂæœáùÝu?-ð¤ûmú +XSøªªØ"B³\›mBˆ ¸@Hâ_q6ä5ÿìêkíÅñš#¯<Ÿ×3Àó£ŸîÄôÔKàŽÿ´úººã|8· þø·³¾SÁÀ Ϭ«[ÄO‚ôÇ/Ì%ø“øóß¼ó¥“õú¶œ +­n{ïRßÄ7»l€|Äùa¶õ±Or“«êG¿Wxp ü`ÂÀ¿”Єѓ† +ÈBÔÙ)]´`Ÿ½F6f<0‚œ ú÷® bðb:€Ÿÿ>˜…"†P„#<áèþ1µ¶p€æbÝÖеy lÇÀ¡yÀ +òЇ?d–ïPÄ! GD" •0ƒ[ÜâNlŸ¨ºtqO†ÞC„Øl¨Å-î£l6cÇHF2‚hLãéF9HÑ*”ãY †mÏY«YiÇ ö‡\dé¾Rà ˆL¤"y HFR’Oœ^ë Õ0î½ Äb'm÷Iòñ ”„« 4\1ˆb¢Í”§L¥*W©„VþÑrl4c)Ëd-ëŽxôZ'=ÙËR°Œ[ÄŒ9d¢2•«a#¡)ÍvRÓ –´¦ðÊ»n³› å :9ÿ¶~Ú€œðúa2ÑÉÌ9´RbHh;aùD;ªëŽ›D ñ)>.†M˜CøÄ0ÿé®y”ƒH'ªÐ…Nr€´¼f¼.‚*ÎÜ¤èø²aˆõŒ˜¤tßG—©¿,Ò -©Ic)Å´±45%Ü,È N™Vt‚'°BÎpšÓt xð©I*T†¶pGñÔ ö"Ç5.¦øü¥ËÆ3 bð­TæUÉÕ®žtzZX<øºÈÀ ýt Z?©Ö?ÊŽ£dZ\ƒ' +eŠT­ìªWYh  +¯³Œ\*ê Û‘ícaá»v®æä)T¡¾³ŽP›öúZ +ÆÿqŠ#ì/)±ÖÒ"VŒ•\!‡ÛØÇ~°‘v¥&ÍüÀ\±Ž•žïúkÚñ·:ücú~kNCrµ‹Ô*dåÐÚɲ¥1¤Å-›K¹`ÓÐ ìvÉKëîvø]kÁ¨ÁþžÑƒY 0VÚÌ[¼ò®ÔKl1ööΖ¹ – { P"|ö5~ÅFÚý^ð}Û[ÝÔ Õ;X¼âÅáè ÷- æ®XU*a4|/Ÿ¼û£5êáÏ¡jÐ \Gd[ôtÀ ÖŸ™(À˜ÁE°X³ì88,V÷©è#Ï*èÖ)ËY$²ÕÀÁ¬"™~Ë{^ ©ùä¬/ÿÂ8 ªü +ã¸qÂ4Û‡ÇüåÙŠ€ƒòÛ æä9OÍMÎdŒÕ«^?´wftçmÃ7Ú¨*ƒËR†Ÿàˆ[BZɳ[èÆ· ~v0^oœ…'Øì’Þhu§»ûVÆš¶ì8ݺ2:Ô T¸H5¨=4ÕŽf“DàjÙÅú³ …v6Æfé.¯:¶Ëf]ÑýkÈ­[%×°†É‡BgJG3ÜÛlX¢Âµ“u8yŒþæ:Ý•-Þ¶í×íoÃ-iÁòU>Ыo=k¥÷f=Ž*;Xs2qó¦7Ë)¯fàû7Q¼SñüÝ4OÙŠT¯†5}¡ç¬›ÎÐÿHù³#žr=ONÙ8ÒŒ*8Y™ÌZS"Õ”*©6tûé`w×Të.R{ªQv°ž ÀLõ‰Z¸ÂMt.„rm=øIN3f œµ¼ÎC[ãŽN…LüäYO Ìd"Y€ªHSúy‡zt‡-PªDïgµ9êå˜kh:j{Ô÷ø(H@̦˜â¿žTö]Ûï¿qÌôžÍH˜Z8l¦xλbœ òÒŸ„ù÷I?–—ÓFßÍ/8§ýqÆH/y©^)†úáçŠC>òµ¼uPú /7mæòSðM?¬Â;ÿ. +J lWgqÚ—žù¨ŸKåq/ùrAòË?—TN_"]ü¨‡ÐˆJÃ}Å=÷å ÿö×OÿÝÌŸõò7fÚý÷GÿþâwL" Ѹ¶'"ì—Íw{ è Ø€¥1xø€+Aˆã¡(~A€¨} X‚$X(€%¸‚!(¨‚,Ø‚¸'X1hƒ7È3hüǃ9øƒ2ƒ@Xˆƒ‡²€ !ù + ÿ , d d ÿ ËH° A*<Ȱႇ#r+7‘¢Å‹3.Ô¸¡£Ç mt²$ÉD VÇR‚Ë•-YrIÓäÉ›6kª„³çKž>yÎÔ™gD£ +/]Ê4¨Ï£D‹"º³éS«NŸ¢”ÊuêÊŒXej«+åÃ*g³VŒ:®«[‰a—¦%k¶¢L´Dðªýš–-U‡ öælW0a½U±"@ûöï†À a:Ðl²\Ä_3^»³âÆ~ÿ•\¹t…Ξ Ó­;—)h¨H [†@»v껫U÷-ÓïëѤgŸ¾ªº8k ¾“'8(;®ótƒi£6^á±Èß\•fµ-Xºdç¼Söÿtœ}ºyîÑŸ«ùã좗kGýÝvú÷¹ë__´uù©üáKpû­W`æ'TY¬aYkµ™!~ ¦3á…"8\V2\-jâˆ$–há†""ר{Àñ&\ГŸ¢‰4Ú&ã‰Ay߃<¦GÙ5N"C–ö#4v[y=ú$’‚XË”1Òs$‘RV™¤wf1ÙdO&"£˜dVIå•gjy%‘\ªÕQ*9à—(¤•Y¦©çžz> Óot*ˆa‘GòihŸkfÈXQÁVg9a*é™Tj锿dš =—bšeŒŽåáO|ã˜FâÙ©¥"°êꦭÂÿêi’þùX 1•Š" +ƒšéé«ÉÄ*,k¬±$Û©‰µ¾Ùh£±餚ڢì±2û ¢p+ÊÏ kí¸i†(•­¸ +ú¯l +¬Æf+CÞ²1Ƚõ~ .¼ãnZî„ÍÊçaº»â¸.ª¿úl°ÅÎKozØÀËÄËPlo¾Çò[i¢´I5'Á8†|°Œª¾ îÅSaE!FDÜrÅ_ìm¸ýZK 3ºÇ´;¥ëÏ¿&ÌjÃ(sPÈH?àÁÑ,·üò24Ìl ÍnØ\¤†èî8XžJrÉA/ ïwÌ[ñÑ ‘¶ÚLtà6ÓMC-u²6+;E„^‚üµÐ«Âÿ:¶Ã +,½6.„Ç`ø9…³ KÜsk°…Uãü3y‘6ßÀ^„àCàÂÂç “ñùሿírãÛ]Û‹šTt{cþϵbÿ ± ° ýIè³ôÞ;!€„N:ãÛÖy‘[mÝš¦ï*L·°k ˆÙ¹ã9ð¾ =8†tÿûèj/s·ëŒ{ü£;»7“]Ãû ‹;tô¶ß®û<Œ€Æöü÷ÿ=án‹XÔžQ¾Ç™ÏJ(눩 ëšSÀÃ?úU~l˜—î—?ÿyÁ3\Óh0@ªyÁ£Ì³Ä3Ö€^–À1J@Cr@‚œ¶þ¡éMÐ~GøÄ>ÿ°÷Á"~¯p€ƒHH3ÇAÎ 7›˜ØÕ(z@Pe%ÐÝ>þˆ ÚPb>£¼âÅà N,w4¢CxŽ$:‚s@ÆPøÄ.§ ™XÉÏP ÀÅà›Óݘñƒ  &ð"yC1Æ/‚1ä ¡Æ5²ÀpIœƒ&•`­FÎ;Ù#Ï‚ í1ÀðqŒ ìÕŠ\¤FËHÐIÛ+÷WI#‰ppÄh†˜Ï 3ðBZb¤ MìJ¼È"*E‡=V² ûèâfÈHÎÒ–Ãâ'¦ÉË^úqJt„0£ðÄ(áuúÇÝD) -°AHKå*ñÿýµÒ•Ùô"7eø,á ã"OÈAƒ{æôå%Ý8LNVï¼ìÄô“”$žG›æ>û9V¡JÚH,jñŒè9Û¨‡7ÞÂQÈè-¼Aªy:ógæÑô¹J’æïŸ(E),çÁT¦” +E§ Ç9ÑAT¦E¼$… GzúÊAi#Vù8àøìÜ>ùiT“* 'u*T9àRiN •WŪµÊ2uvõrƒ8ÚQ‰œ5­†„býG üq®ll\¹‰@|¢SÍF9õšULÁ¯€¬`™Ù¥¤œµ¨*QIjT£>V²KE%ôg€<ÿ`i”Ì+gýÇÆ"˜4ƒpE‹>G- "P@j‰ +Òö(m[a9£ÖVey0€e»Û½Šð·Ÿ ,5@A^7pôŽ(Á@n«Êæ: Ð}euYûC1ˆ,¸n!Û9Cê¶»½ý­#à`ò’·Å]R¬ˆÚqæV{4›þ/J÷gãlâx% ë' pYä7ãôïgA†ÒùÖiI$ðxÌ%GI€ÿS-Ç•¿œ‡}d÷¦ñ›ÊÍ"èaÜ28²‘˜Ž¹·gNgÕläu­2"Ö\ ߯N™µ#˜ ŸUjPlÙ +èðb=í^x·A>³Ó\à˜ž¨²E0êö’Ì‘=ꦻÕÀMœƒ`B¡É€ë˜bµÌmÚæV·ÀF³ž´”,„ªlÿ`AR¡¼ënû›÷ +ç BÊÜco„o,ñš£ôÀŒmÌɺb °ÍŒy@9¥rí5½0˜ÃânÞ5¶/µ{n.CŒ/mª¥-é] VUc±¨p9aÏÝöæÃÿvÁzι ¸À[Rgжàÿ'¡:‹Œ%†]‡G!Ý^ .ošÏOµA¯ÝÇó˜»/ƒá$÷ç¬ÛACÑt«†\ñRãÙœâx¼Ü­02®5d)éªoŸ{ý}Ó 7çˆZȈØì‡CZÜ,6@M:ý£c³ ü25s<‚ +Àìææêf¹‘û–Æ|N=€Üm%Û:pU>éøj;`½1Z—ËYt7Ñ‘w¬[áï*<üj7®“ýŒäNã¿ÁÇ[ _Þ‚\F¿Z)ÆïöÇÊ|[þ@ÍY¡ïQå»#1O»ú¥,—«WÓ~ÈÃÞ„mhƒ¾à ËOæ¹Gàî$ñ‰‡žïàÇáÿ¾š¯ÓSì÷¬_š%Ö®t™‰ ™^P ¾`÷lýãòÅÒ}3kSÿoßRçú†PÃ7;™u–×-ör~I·€`ô|w,u}`Ew ×*Gv³vþçM8zÈ7eS6bn&(3lpt«° +Èõ€ÑÓCùGw«¡d/äoè€þ‚9ñÂÏ—A)˜‚ûBu•òDÀqPØs08ƒ–6hKµ$…8‚­ª¤*öªÙ£Y·Vàêµ™ƒ³UÉÆ-K×&Ú´Lײm ¡.ܨpÿâݹ׭ƒÃÆf9÷o`ÁƒõÖâ«7ñãÆ~/[ü÷§3áÂy+Öœ™tÅ»ž?S­GÓ¥awÔ…w5âЯÝÁÞmõMÕ¶YÐM|£\ÞÈ}«e]9ïðÑÆ“ÇîM{yó®·û*׸R:Zͳÿÿ=žyöâX¿»>íýlx’‚‚g?/•#ŠÎåì‡?:?{÷#&`Iæa7Üv÷e’_nûý×uï§Ðu +¸@ú-ˆƒúçÞ‡Õ7߈|Øa*&xbƒ :è¡rÊG¢€µp¸¢,Bøbz0ÆXa‰åÑH=7¢h¤†Ûq†äŽ<2Ùdjd‰B∤ŠÝ­´äl:ªçŒ2HåD¹¥I_Zùdš=‚… MF¦9æly"–Yª¹&›i*_S¶%ç z*©¤|r¹g¢¿¹e€ +9è˜y册"š©•Žþ9¢‚ιÄ›j¨ tœ¦ª*”’}z‰tRÿšL¥zj©šZ•p:ê¨MЊk®«»k˜¯Š+°Â:ÉBGFk,‚œŠøh²‰d;Ŷ$,¬—µ¢*I„˜6¸aH¦6j­«(hË-·Ì6›QDÒ¦ˆ–ÔÞ‹î¹ûz–®Zƒ²ëî»4ïŽÑÚ«¯VãšÊðgï$ÒRûj·4 +GðæÄrðzö«ñ„\õú°R/ œ¬o«-.¬P·ÈÔ¼Ë! s§à¿*b;éœØ)s*û*EÁ±’0ðÒïºá´Ç7ã¬%Ï=ç×®·"̪5¥dþx-Ñ+#MgÌd—ý4PG=N›É¢\‹Ä-÷t?a7× ûf‚acÿ€wÓf{r¶-63`¸­ö‰™m‚‹‡ü3÷!u×ýëÍw«ûý7à£]x +¤o­ac/³ã”¿pˆë°Ã^ùçyç]ò×#rìy˼ î»à¢G!<éL’ƒé"cœ:êO¼^Àó“@}ô×M»íqÜõ¯º+í4èÁo8ñ§ Ïtê²:?ýúì»n}íð{êUÒ@/ß½òßç|øÃ_<æûýt÷8õá€Dàóª—5¼mu,Sívw?ý NxÃc€ÿNÑ‹¶%ï~ñ‚›HÂ2ÐGÜ[(Á¿QЂÄ É÷¿Šìƒ«Yéöé‘P`pßûÿRˆÂñ…\ƒ!ÿd8¾ ö‚0ÓØ¬xµÎ‡?T ·FDÌuñˆÝ!Çà¥D&f°†t ]wØö0‹YÜ"¿˜ #VPwÌ*ãÇ×DÒ!a d WÅæðˆ,áë¬WG#6ÒŽb¬â õ8Ã>ú‘ˡ͌!ÉQ2‘ФÜÝ)+R‚Q£ãïbhF^Òs©œ"C8+çáC  ¤€ þáŒlQŽu´Û0ÈàŠRÓ.E é7dè’ÛÀ,‰L¶Ò‰œc3c ¬RÒ¼L¤4yi8ã—vKg ˜à …P …ø 9Á!€ +òºT$z€ÿŒ]B‚x{´ä+iY°Áq³ `(g2ÿ¨KlŒây ¦+À lücGÆE8ŠYŒ¢ˆÃÀÇ6Èð}2`—È`e5øÏKb²›“”åîÚ(MNœóÒÜôüÀθ1 <„M1jÔ“ˆÅZ*w!M“ºÀ|ð]@]‰ÈNÆT¦žKè(؉Hl`Ä~8\q›"“¨É ç0, 2 •R“˜Å¨¤‰L0„±©SØE>°UV’N O¤ƒUwç. +"LàéMéàUŸºO¬d5äPÑÈŽÚUn%¥X—šÒ@Ú4yíegÏÆDÀ>‘ œ,oùÍ›`¨Õ{A6¾ÌÊÿþ£ 8€Mq{´&xhðªÅgùùT‘¦ ª¥å#ù»5nª²cÄÀ 0 ˆ:zÛ('+\1Œš20 Lè òV€p¾à˜DjS{KdôÀ ½ À8Ó(¾]¬t¹½ÐÚ`×Û-p:£—ÿÅ'ª›Ý“@ˆŒÌšxãCŽšÄDå¯[äÕJÀ ÄÍÇψ_SÆRÂ/¨hE-ÚËm@Î"6±(gT«0   '( ^¥-Š“è…–Ö CôuªNô03—ÛÜ–wè!‚yX¹Qš2~ ¶ñ£'8k„ƒ´:¼ï‘øáÉ •GöXcÛä>™Èaš_Ù¢à|ìÿÈÄca—UWXs ˆ™üdâ.4Lã$¼©bYË •°”gD‚Èé¹Ì“5ó)¯U´& òÅ>mèCGt‚\tvÜÖ¸IˆÒ‘>3”å¶Í¾½ í…W©ÒOCW¸q5 é'iH®úv­®Øê”vC*ttju¥}˜U{ñ×¼BY¹Ž¤8`;Y¶Y³½³ª™eÙc5ƒ]2iï‡Ú–¾6¶Ó,_½ yË.ÐÞæì\µ«lÛV#Vå³\›[×Ò>™âÊ-ðs|#É˾÷ VÜ_ ?¹Ö•²i›+q÷Ô—ó]MfˆbW +¢¬#q‹# ÝïÿŠâÂQɇ…ÜM©–ÃM²|k\Íüí¸^nnÚL+GÎ*N*:%êå¼[₸ÐDþs C(ãùãøÏR+sx«ÈçMgTLî”ã¼iÜYÔ’®žõ ?‰o_¿¹ÚÛ"ö¡ïÌjÐÒ“Ösf”§ë$íøöº‰¢Sö¹»èïÿ±”n(› êçø*U‹ÎNñ—yï}÷;uì>¤çÝðÓJ|Ý7O÷Î~ë9VÑI²rÝìŸO¼×¾ñ)È]W‰jÖ•>pÒËí4ýƒÚ*]|E§×½ìóÕ{WÝ>÷¨þìYÅz«bÈ÷¼òûÄ||;ÿùo'Öð1S*£ñ¥ûÑßþ…qxï}¯œ†jáfâîð|sžmW¿êCó·|þH©ß½lØ–2í€>þãÇ}‹!ü'1÷—È}ãG%W[—í¡ Ø/A/M˜Lw¸ +¸ärpÒçÓ ‚!˜tD°|Ü€ˆ‚ØúG‚g2›ƒóR48 !ù + ÿ , d d ÿ 7ü8Á‚ƒ \¨° 8‡¿ œ8Ž!È%Žk˜°£Ç »‰G²ŒIŠ'Kª\ɲ¥Æ”0[e|™¥Í›8cêlÉó¢Å—;-º3gHžiöüµôbQ—P‰9RêS¤B²ÎtºAàÕŸV§6òjײf¿†mº–›X·XÅ®]ÚŠiM¡v}šuË·¯_²hëV+sî\™^¹~K +.àÇ‚7Jž|6-S­†#>¬YÙ2ÈÆ gŽì9®i®—÷úåF„ukÈ)Ëzš-ÇÍ‹‹ºöÕº÷"°cÏ&HûaêÚI‡ã=~uµï*Ðý×MÚtñÒ¹…– =]õï„¿jÿ-­\»yÆé¢7/>1uöÌ×ì^¥Ýy…øsŽ]nö›’<çÝpð‘wŸÊ·›€Ÿ5XàfÆ)¥àóýÖÛIm=Háƒì&`} rxbÆøc 2˜Šål¸Üˆ'²è!}ù9˜À‚7ö·aŒ)â(`3ú¨¡2:çc€¹šˆ&yä“Ò¤J6©ÛŒ"™e\¸äXL†ˆ”[BÐL^~9d˜T2X¦™žåH%‘<öˆe”dš g•s§d~¨çžr:ù¢u|Vˆç¢?ž A*‹Š©&jˆþ h9˜>—i”ƒ>Ê]—j^JUNêbj ŒvÚ(xZP¨6†ÿféd…ƪ)£œ~Ú)«­âZ+ª¦i«–Äúšj¯ðª§oÃ+e©¿: ,®Èr™l«ËF{«´ðÐÇ[ŸÐf iÔb[mµŠªê­®ëb.·ìž‹,¹æ¢iG«*kí¾üöë.¬ÓÆ;¯&lðÁ½6ØÚ®Ž6Ìp ‚@Dzÿ*¬íåÖ ÃÆwœ² +'ëp3×bŽÉ(—œrÊÖÞyjÀ#,s%žÐüq«€>|òììó@]KÄ-» sÌ3{\s%çÌ*É%ó,õÔ=WmõÐû}§À\£CÒo¼4Ó繫9T§ŒÚ';¬¼[û;0ØdÛ<öÍ›Æí@Ä(OÿmÌßl7±öÚXO\4Ürkì5ÝuÛÝøâŸnu~^¹àTKœx×ý*ž ã;n³È†s·àÞ?_Žùê™[@téY¿Ýùìú‚úÝLïýºŸö­:ëÀîúë°Ón|í¶‹n7êšÎ<Ú”ÿ¼ðį¯õÉß¾üÞÜ_ÏåäÒ‡?|ñØ{JûÍÙã^I÷ìŸý?˜BÁ–ƒ!À,áàsÈÔãC=‰ ‡ðÐÿf kxOWü¾öCèãØPŸöF×>ImÈØþ Ëm£.p8 (4‰a€!üH‘ +ÀØ!'Ø€m¤09`G À‡Xð!lJÃ]ÿ¯79`áà àþ'€ý-aààæÆ7 NPà~Ã0Õ$¾ñìmƒ+ìW/(@‡ž ”`Õ7ħqzÜE +ˆBÀ¡0ˆß7r¶)AKp!t¡NtqYøØ]X©Z49LcúîÖÆA™Œ~r´†!&QGú @Š˜<À!þ±?º`êø£'¡‹fð{\J!HfJHh +†ÜE]ðÇ‘fì&%+ù=zHmŽóS¢'ÀºògœØméJ.k‹Êj +…]ör’K#¦û”9 +ØQ…S»Ÿ1ÚV½-2 1u´–#9È¡gŒ!: ÿ̱ ófÚT÷F †¿ur Æ$ªˆNv6o‹Æh F‰&â~8œ]îy†Jœ‚ƒ<˜òþ9…õ‰³SÌ6îçŒmŒb`àeÿ!EcMeÒ4g*}1À™†Q£4%Û†‹û‰Ttn éIx +Ò3„1›jE0”8­€1¬Ú²&ðƒŒï4ß¹À HÈ ‰üìg”ºÔe} ¸*øZ½A9†…b­çÜ!„q¬.8*RÙZ8Þ!°dpe›\ªQq•«¡Ð!n Xµ“±‡ëÄ(ÕÔ m±Ñ$Ÿé¶…±Òú•)¸ß+›ˆ~†Sœ‚Ú,8±2ÏÿÒU´™H*ASšv3­&m­paË,N5à8Ūr—ZÜŽV·»](24ÑQà÷ºm4V=u×þ97·ÐõÈH¾ÆZ¥¹Ñ°Ï͛ٚ[ׯ~ `Û!/ã΋^í’¶Qns¯–ÞB«ÑK¾I£/=Á[ÜoËxz}–ˆ†êWÈÍ,»÷U¯„&-põè¿ÎðÓ8gàO8ÂÆšÒÅr¥aÏyøÄZC\Åø;¦› o¦°iU`¹8‰Ãõúpxwœ)˜¬xT,1ç²õë¸M¬•°ŠŒ»gMnÖ“‚Lå(éÉY«‘”aUÙ´ò—-6æ./YË¢2š¾œä)¯iøG—JpäØ «ödˆÎ0ÃsÙ„ I9rzÞ³Ž(µ!¤šÉpÆ žãóg])ˆÏ²’ˆC†'%͘N’­l¶C'šRhõæå_õ'ÓÆW®&]+LWªÔqþ ¬ÅdäÜ%Õ”&Q ^'‡Éœ6Ò¦/-Þò¼Czás¸”]";çEÔ³¶“W|í'ÛüdØ6vÒt\ êA¿ +ØÆw°“3S{<š™I¯]„¢r›ûÝÍv6FˆÓmlC{×î&‘Z „¡c'{Ú¸þH¾áMð­ÛÖw®ò¶]]m~_»0 WøÀ –HGúØ‹fö~øƒo° ÆÞHI@ !ùd ÿ , d d ÿ ÿm¸¡ Áƒ*\Hp¡Ã‡#JôG±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª\ɲ¥Ë—0cÊœI³¦Í›8sêÜɳ§ÏŸ@ƒ +J´¨Ñ£H“*]Ê´©Ó§P£JJµªÕ«X³jÝʵ«×¯`ÊK¶¬Ù³hÓª]˶­Û·pãÊ+•¤~àsá‚N9¼wa‹ØN|'•é8I@#¼{Inx3Ö?…S€3„ÍÅåL…+.h¼Y1Ek›äû‡o1ÆLtþÉnЯÜìxâåÌ$3^v†ðî·Ë?Q€ÄéŸi¬-À;ÉéÐøAðv<ÙÓwRÿÀÖ Û&ê.tW„ôt¹Lð׉}×>á…ù|o|ÝõÓÈ?ùȇ“1á°“‚yQZ#†<Æ_äÖË? Ôæ\h±èƒÀ‘aè€ìxr»¹ Ø‚çÍ×Za üóXm X1µ @G7™yHÑ{®A&£€.àMü¼¸Ýzÿà8bGVmýÌX9ø¦Ñ„º}Ç$3Öa,ð5f„ú0Ð;lX„¿}Óäšœ@ØFÖ´‡Izæ$Mº b*ªÙOØÈ&ÛqQJ9$E *ªÏ)VD'Ã6 ƒ45’$ãH•ñôB?»TZQ#“üµjltPeÉQ,  h‚AÞ4àŸE±·Ó®ªö”É?ü S<³”HT&–é©„a>Œj,L càO夂²t]î¸ä–kî¹è¦«îºì¶ëî»ðÆ+ï¼ôÖkï½øæ«ï¾üöëï¿æ !ù + ÿ , 1 ?  ÿ ÿ ܯÑÀþþñãǠѯ„vHa£F ´ƒX±¢?v Ê 4FG@>ñ&1¨È@ c 8äH±L|â‹ÅMcšË4J1iR<„ ø<:hŠn9=XNæ„þ²úË“BÎS?µnĪ•ëÐ^G0èv`,±ø]ý—Ô'Uvaó&ì¶²£È z7=ÜkÌè?µÚþkD'ž1NÕÆ"›µÆxì2­Œ-§ÇbËatkX-ƒÁ‡·õ­Ë2ÇxWlDa²çÙ n[RnÓ öòJ·&ærý^ <{Rìœ¬Ê¦Ø …HÄRüv;:»ßäZ¾ý/SCÏvY'ÿ¯:h‚$;ßÞu=sL«@+rßQ€söíc—@G¹à™5L u‘HùU´@<ÁUÄA ´P» †vèᇠ†(âˆ$RôX‰(røWE !ù + ÿ , 1 B  ÿ ÿ ¸i Áx â-hçÏ ÃþÊ”+Ób&…>ldl`ƒ] ؉¬8pAÈnwñk0‘"IƒË]\‘v-5DËXKc ZŽs¸!žQ’øvm€ØÍåÃM`ü— RÇ—O¥Êl„ æÕ¬™dö‹h¬̦ #ªeŠ ,Ù45ªMÓåQ°¹ÖdGÔ%Ã_™ºí6)Öl˜»0fN˜2ùËÄn즋( ¶£9·¢cˆü ÔÙ™íb´PINn$2ÛÁ¹Û’6Ö¤û*®»;s–2žj4ÁaÍ‘‚{(™ôéá‘c†lD§Ðr¬§ç¦ŠSç?ÜÎÎSÅÑhõé~±köžñ¡ÙïìM÷‡ò%àžã÷ÕÏ~íÙægáÇ߀>¥ÖcˆÝW ò7`}át\ƒ&¸ 7b·‚vxVcÒåሠú÷O@ ; diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_landscape.gif b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_landscape.gif new file mode 100644 index 0000000000000000000000000000000000000000..870123532c3b97be8e2ab75452eca7060fb474c4 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_landscape.gif differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_portrait.gif b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_portrait.gif new file mode 100644 index 0000000000000000000000000000000000000000..cc480ca88ed7fa80ff8e3907ba14d692e3e9d3d4 Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_portrait.gif differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0fe3001d5ed0907aef6da47a36ca049c255350e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\GreaterThanOrEqual; +use Symfony\Component\Validator\Constraints\GreaterThanOrEqualValidator; + +/** + * @author Daniel Holmes + */ +class GreaterThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function createValidator() + { + return new GreaterThanOrEqualValidator(); + } + + protected function createConstraint(array $options) + { + return new GreaterThanOrEqual($options); + } + + protected function getErrorCode() + { + return GreaterThanOrEqual::TOO_LOW_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(3, 2), + array(1, 1), + array(new \DateTime('2010/01/01'), new \DateTime('2000/01/01')), + array(new \DateTime('2000/01/01'), new \DateTime('2000/01/01')), + array(new \DateTime('2010/01/01'), '2000/01/01'), + array(new \DateTime('2000/01/01'), '2000/01/01'), + array(new \DateTime('2010/01/01 UTC'), '2000/01/01 UTC'), + array(new \DateTime('2000/01/01 UTC'), '2000/01/01 UTC'), + array('a', 'a'), + array('z', 'a'), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(1, '1', 2, '2', 'integer'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2005/01/01'), 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2005/01/01', 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2005/01/01 UTC', 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array('b', '"b"', 'c', '"c"', 'string'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6742fcb9b9ec8775065a0672264f0204d562ce11 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.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\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\GreaterThan; +use Symfony\Component\Validator\Constraints\GreaterThanValidator; + +/** + * @author Daniel Holmes + */ +class GreaterThanValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function createValidator() + { + return new GreaterThanValidator(); + } + + protected function createConstraint(array $options) + { + return new GreaterThan($options); + } + + protected function getErrorCode() + { + return GreaterThan::TOO_LOW_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(2, 1), + array(new \DateTime('2005/01/01'), new \DateTime('2001/01/01')), + array(new \DateTime('2005/01/01'), '2001/01/01'), + array(new \DateTime('2005/01/01 UTC'), '2001/01/01 UTC'), + array(new ComparisonTest_Class(5), new ComparisonTest_Class(4)), + array('333', '22'), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(1, '1', 2, '2', 'integer'), + array(2, '2', 2, '2', 'integer'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2005/01/01'), 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2005/01/01', 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2000/01/01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2005/01/01 UTC', 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000/01/01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + array('22', '"22"', '333', '"333"', 'string'), + array('22', '"22"', '22', '"22"', 'string'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..98653274a9c66c945f624aaf2857c067379435ae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\GroupSequence; + +/** + * @author Bernhard Schussek + */ +class GroupSequenceTest extends TestCase +{ + public function testCreate() + { + $sequence = new GroupSequence(array('Group 1', 'Group 2')); + + $this->assertSame(array('Group 1', 'Group 2'), $sequence->groups); + } + + public function testCreateDoctrineStyle() + { + $sequence = new GroupSequence(array('value' => array('Group 1', 'Group 2'))); + + $this->assertSame(array('Group 1', 'Group 2'), $sequence->groups); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b9ad5af1db4a1288090d2d2ba582d86e8a98942e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php @@ -0,0 +1,433 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Iban; +use Symfony\Component\Validator\Constraints\IbanValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class IbanValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new IbanValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Iban()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Iban()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidIbans + */ + public function testValidIbans($iban) + { + $this->validator->validate($iban, new Iban()); + + $this->assertNoViolation(); + } + + public function getValidIbans() + { + return array( + array('CH9300762011623852957'), // Switzerland without spaces + array('CH93 0076 2011 6238 5295 7'), // Switzerland with multiple spaces + + // Country list + // http://www.rbs.co.uk/corporate/international/g0/guide-to-international-business/regulatory-information/iban/iban-example.ashx + + array('AL47 2121 1009 0000 0002 3569 8741'), //Albania + array('AD12 0001 2030 2003 5910 0100'), //Andorra + array('AT61 1904 3002 3457 3201'), //Austria + array('AZ21 NABZ 0000 0000 1370 1000 1944'), //Azerbaijan + array('BH67 BMAG 0000 1299 1234 56'), //Bahrain + array('BE62 5100 0754 7061'), //Belgium + array('BA39 1290 0794 0102 8494'), //Bosnia and Herzegovina + array('BG80 BNBG 9661 1020 3456 78'), //Bulgaria + array('HR12 1001 0051 8630 0016 0'), //Croatia + array('CY17 0020 0128 0000 0012 0052 7600'), //Cyprus + array('CZ65 0800 0000 1920 0014 5399'), //Czech Republic + array('DK50 0040 0440 1162 43'), //Denmark + array('EE38 2200 2210 2014 5685'), //Estonia + array('FO97 5432 0388 8999 44'), //Faroe Islands + array('FI21 1234 5600 0007 85'), //Finland + array('FR14 2004 1010 0505 0001 3M02 606'), //France + array('GE29 NB00 0000 0101 9049 17'), //Georgia + array('DE89 3704 0044 0532 0130 00'), //Germany + array('GI75 NWBK 0000 0000 7099 453'), //Gibraltar + array('GR16 0110 1250 0000 0001 2300 695'), //Greece + array('GL56 0444 9876 5432 10'), //Greenland + array('HU42 1177 3016 1111 1018 0000 0000'), //Hungary + array('IS14 0159 2600 7654 5510 7303 39'), //Iceland + array('IE29 AIBK 9311 5212 3456 78'), //Ireland + array('IL62 0108 0000 0009 9999 999'), //Israel + array('IT40 S054 2811 1010 0000 0123 456'), //Italy + array('LV80 BANK 0000 4351 9500 1'), //Latvia + array('LB62 0999 0000 0001 0019 0122 9114'), //Lebanon + array('LI21 0881 0000 2324 013A A'), //Liechtenstein + array('LT12 1000 0111 0100 1000'), //Lithuania + array('LU28 0019 4006 4475 0000'), //Luxembourg + array('MK072 5012 0000 0589 84'), //Macedonia + array('MT84 MALT 0110 0001 2345 MTLC AST0 01S'), //Malta + array('MU17 BOMM 0101 1010 3030 0200 000M UR'), //Mauritius + array('MD24 AG00 0225 1000 1310 4168'), //Moldova + array('MC93 2005 2222 1001 1223 3M44 555'), //Monaco + array('ME25 5050 0001 2345 6789 51'), //Montenegro + array('NL39 RABO 0300 0652 64'), //Netherlands + array('NO93 8601 1117 947'), //Norway + array('PK36 SCBL 0000 0011 2345 6702'), //Pakistan + array('PL60 1020 1026 0000 0422 7020 1111'), //Poland + array('PT50 0002 0123 1234 5678 9015 4'), //Portugal + array('RO49 AAAA 1B31 0075 9384 0000'), //Romania + array('SM86 U032 2509 8000 0000 0270 100'), //San Marino + array('SA03 8000 0000 6080 1016 7519'), //Saudi Arabia + array('RS35 2600 0560 1001 6113 79'), //Serbia + array('SK31 1200 0000 1987 4263 7541'), //Slovak Republic + array('SI56 1910 0000 0123 438'), //Slovenia + array('ES80 2310 0001 1800 0001 2345'), //Spain + array('SE35 5000 0000 0549 1000 0003'), //Sweden + array('CH93 0076 2011 6238 5295 7'), //Switzerland + array('TN59 1000 6035 1835 9847 8831'), //Tunisia + array('TR33 0006 1005 1978 6457 8413 26'), //Turkey + array('AE07 0331 2345 6789 0123 456'), //UAE + array('GB12 CPBK 0892 9965 0449 91'), //United Kingdom + + //Extended country list + //http://www.nordea.com/Our+services/International+products+and+services/Cash+Management/IBAN+countries/908462.html + // http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf + array('AO06000600000100037131174'), //Angola + array('AZ21NABZ00000000137010001944'), //Azerbaijan + array('BH29BMAG1299123456BH00'), //Bahrain + array('BJ11B00610100400271101192591'), //Benin + array('BR9700360305000010009795493P1'), // Brazil + array('BR1800000000141455123924100C2'), // Brazil + array('VG96VPVG0000012345678901'), //British Virgin Islands + array('BF1030134020015400945000643'), //Burkina Faso + array('BI43201011067444'), //Burundi + array('CM2110003001000500000605306'), //Cameroon + array('CV64000300004547069110176'), //Cape Verde + array('FR7630007000110009970004942'), //Central African Republic + array('CG5230011000202151234567890'), //Congo + array('CR0515202001026284066'), //Costa Rica + array('DO28BAGR00000001212453611324'), //Dominican Republic + array('GT82TRAJ01020000001210029690'), //Guatemala + array('IR580540105180021273113007'), //Iran + array('IL620108000000099999999'), //Israel + array('CI05A00060174100178530011852'), //Ivory Coast + array('JO94CBJO0010000000000131000302'), // Jordan + array('KZ176010251000042993'), //Kazakhstan + array('KW74NBOK0000000000001000372151'), //Kuwait + array('LB30099900000001001925579115'), //Lebanon + array('MG4600005030010101914016056'), //Madagascar + array('ML03D00890170001002120000447'), //Mali + array('MR1300012000010000002037372'), //Mauritania + array('MU17BOMM0101101030300200000MUR'), //Mauritius + array('MZ59000100000011834194157'), //Mozambique + array('PS92PALS000000000400123456702'), //Palestinian Territory + array('QA58DOHB00001234567890ABCDEFG'), //Qatar + array('XK051212012345678906'), //Republic of Kosovo + array('PT50000200000163099310355'), //Sao Tome and Principe + array('SA0380000000608010167519'), //Saudi Arabia + array('SN12K00100152000025690007542'), //Senegal + array('TL380080012345678910157'), //Timor-Leste + array('TN5914207207100707129648'), //Tunisia + array('TR330006100519786457841326'), //Turkey + array('AE260211000000230064016'), //United Arab Emirates + ); + } + + /** + * @dataProvider getIbansWithInvalidFormat + */ + public function testIbansWithInvalidFormat($iban) + { + $this->assertViolationRaised($iban, Iban::INVALID_FORMAT_ERROR); + } + + public function getIbansWithInvalidFormat() + { + return array( + array('AL47 2121 1009 0000 0002 3569 874'), //Albania + array('AD12 0001 2030 2003 5910 010'), //Andorra + array('AT61 1904 3002 3457 320'), //Austria + array('AZ21 NABZ 0000 0000 1370 1000 194'), //Azerbaijan + array('AZ21 N1BZ 0000 0000 1370 1000 1944'), //Azerbaijan + array('BH67 BMAG 0000 1299 1234 5'), //Bahrain + array('BH67 B2AG 0000 1299 1234 56'), //Bahrain + array('BE62 5100 0754 7061 2'), //Belgium + array('BA39 1290 0794 0102 8494 4'), //Bosnia and Herzegovina + array('BG80 BNBG 9661 1020 3456 7'), //Bulgaria + array('BG80 B2BG 9661 1020 3456 78'), //Bulgaria + array('HR12 1001 0051 8630 0016 01'), //Croatia + array('CY17 0020 0128 0000 0012 0052 7600 1'), //Cyprus + array('CZ65 0800 0000 1920 0014 5399 1'), //Czech Republic + array('DK50 0040 0440 1162 431'), //Denmark + array('EE38 2200 2210 2014 5685 1'), //Estonia + array('FO97 5432 0388 8999 441'), //Faroe Islands + array('FI21 1234 5600 0007 851'), //Finland + array('FR14 2004 1010 0505 0001 3M02 6061'), //France + array('GE29 NB00 0000 0101 9049 171'), //Georgia + array('DE89 3704 0044 0532 0130 001'), //Germany + array('GI75 NWBK 0000 0000 7099 4531'), //Gibraltar + array('GR16 0110 1250 0000 0001 2300 6951'), //Greece + array('GL56 0444 9876 5432 101'), //Greenland + array('HU42 1177 3016 1111 1018 0000 0000 1'), //Hungary + array('IS14 0159 2600 7654 5510 7303 391'), //Iceland + array('IE29 AIBK 9311 5212 3456 781'), //Ireland + array('IL62 0108 0000 0009 9999 9991'), //Israel + array('IT40 S054 2811 1010 0000 0123 4561'), //Italy + array('LV80 BANK 0000 4351 9500 11'), //Latvia + array('LB62 0999 0000 0001 0019 0122 9114 1'), //Lebanon + array('LI21 0881 0000 2324 013A A1'), //Liechtenstein + array('LT12 1000 0111 0100 1000 1'), //Lithuania + array('LU28 0019 4006 4475 0000 1'), //Luxembourg + array('MK072 5012 0000 0589 84 1'), //Macedonia + array('MT84 MALT 0110 0001 2345 MTLC AST0 01SA'), //Malta + array('MU17 BOMM 0101 1010 3030 0200 000M URA'), //Mauritius + array('MD24 AG00 0225 1000 1310 4168 1'), //Moldova + array('MC93 2005 2222 1001 1223 3M44 5551'), //Monaco + array('ME25 5050 0001 2345 6789 511'), //Montenegro + array('NL39 RABO 0300 0652 641'), //Netherlands + array('NO93 8601 1117 9471'), //Norway + array('PK36 SCBL 0000 0011 2345 6702 1'), //Pakistan + array('PL60 1020 1026 0000 0422 7020 1111 1'), //Poland + array('PT50 0002 0123 1234 5678 9015 41'), //Portugal + array('RO49 AAAA 1B31 0075 9384 0000 1'), //Romania + array('SM86 U032 2509 8000 0000 0270 1001'), //San Marino + array('SA03 8000 0000 6080 1016 7519 1'), //Saudi Arabia + array('RS35 2600 0560 1001 6113 791'), //Serbia + array('SK31 1200 0000 1987 4263 7541 1'), //Slovak Republic + array('SI56 1910 0000 0123 4381'), //Slovenia + array('ES80 2310 0001 1800 0001 2345 1'), //Spain + array('SE35 5000 0000 0549 1000 0003 1'), //Sweden + array('CH93 0076 2011 6238 5295 71'), //Switzerland + array('TN59 1000 6035 1835 9847 8831 1'), //Tunisia + array('TR33 0006 1005 1978 6457 8413 261'), //Turkey + array('AE07 0331 2345 6789 0123 4561'), //UAE + array('GB12 CPBK 0892 9965 0449 911'), //United Kingdom + + //Extended country list + array('AO060006000001000371311741'), //Angola + array('AZ21NABZ000000001370100019441'), //Azerbaijan + array('BH29BMAG1299123456BH001'), //Bahrain + array('BJ11B006101004002711011925911'), //Benin + array('BR9700360305000010009795493P11'), // Brazil + array('BR1800000000141455123924100C21'), // Brazil + array('VG96VPVG00000123456789011'), //British Virgin Islands + array('BF10301340200154009450006431'), //Burkina Faso + array('BI432010110674441'), //Burundi + array('CM21100030010005000006053061'), //Cameroon + array('CV640003000045470691101761'), //Cape Verde + array('FR76300070001100099700049421'), //Central African Republic + array('CG52300110002021512345678901'), //Congo + array('CR05152020010262840661'), //Costa Rica + array('DO28BAGR000000012124536113241'), //Dominican Republic + array('GT82TRAJ010200000012100296901'), //Guatemala + array('IR5805401051800212731130071'), //Iran + array('IL6201080000000999999991'), //Israel + array('CI05A000601741001785300118521'), //Ivory Coast + array('JO94CBJO00100000000001310003021'), // Jordan + array('KZ1760102510000429931'), //Kazakhstan + array('KW74NBOK00000000000010003721511'), //Kuwait + array('LB300999000000010019255791151'), //Lebanon + array('MG46000050300101019140160561'), //Madagascar + array('ML03D008901700010021200004471'), //Mali + array('MR13000120000100000020373721'), //Mauritania + array('MU17BOMM0101101030300200000MUR1'), //Mauritius + array('MZ590001000000118341941571'), //Mozambique + array('PS92PALS0000000004001234567021'), //Palestinian Territory + array('QA58DOHB00001234567890ABCDEFG1'), //Qatar + array('XK0512120123456789061'), //Republic of Kosovo + array('PT500002000001630993103551'), //Sao Tome and Principe + array('SA03800000006080101675191'), //Saudi Arabia + array('SN12K001001520000256900075421'), //Senegal + array('TL3800800123456789101571'), //Timor-Leste + array('TN59142072071007071296481'), //Tunisia + array('TR3300061005197864578413261'), //Turkey + array('AE2602110000002300640161'), //United Arab Emirates + ); + } + + /** + * @dataProvider getIbansWithValidFormatButIncorrectChecksum + */ + public function testIbansWithValidFormatButIncorrectChecksum($iban) + { + $this->assertViolationRaised($iban, Iban::CHECKSUM_FAILED_ERROR); + } + + public function getIbansWithValidFormatButIncorrectChecksum() + { + return array( + array('AL47 2121 1009 0000 0002 3569 8742'), //Albania + array('AD12 0001 2030 2003 5910 0101'), //Andorra + array('AT61 1904 3002 3457 3202'), //Austria + array('AZ21 NABZ 0000 0000 1370 1000 1945'), //Azerbaijan + array('BH67 BMAG 0000 1299 1234 57'), //Bahrain + array('BE62 5100 0754 7062'), //Belgium + array('BA39 1290 0794 0102 8495'), //Bosnia and Herzegovina + array('BG80 BNBG 9661 1020 3456 79'), //Bulgaria + array('HR12 1001 0051 8630 0016 1'), //Croatia + array('CY17 0020 0128 0000 0012 0052 7601'), //Cyprus + array('CZ65 0800 0000 1920 0014 5398'), //Czech Republic + array('DK50 0040 0440 1162 44'), //Denmark + array('EE38 2200 2210 2014 5684'), //Estonia + array('FO97 5432 0388 8999 43'), //Faroe Islands + array('FI21 1234 5600 0007 84'), //Finland + array('FR14 2004 1010 0505 0001 3M02 605'), //France + array('GE29 NB00 0000 0101 9049 16'), //Georgia + array('DE89 3704 0044 0532 0130 01'), //Germany + array('GI75 NWBK 0000 0000 7099 452'), //Gibraltar + array('GR16 0110 1250 0000 0001 2300 694'), //Greece + array('GL56 0444 9876 5432 11'), //Greenland + array('HU42 1177 3016 1111 1018 0000 0001'), //Hungary + array('IS14 0159 2600 7654 5510 7303 38'), //Iceland + array('IE29 AIBK 9311 5212 3456 79'), //Ireland + array('IL62 0108 0000 0009 9999 998'), //Israel + array('IT40 S054 2811 1010 0000 0123 457'), //Italy + array('LV80 BANK 0000 4351 9500 2'), //Latvia + array('LB62 0999 0000 0001 0019 0122 9115'), //Lebanon + array('LI21 0881 0000 2324 013A B'), //Liechtenstein + array('LT12 1000 0111 0100 1001'), //Lithuania + array('LU28 0019 4006 4475 0001'), //Luxembourg + array('MK072 5012 0000 0589 85'), //Macedonia + array('MT84 MALT 0110 0001 2345 MTLC AST0 01T'), //Malta + array('MU17 BOMM 0101 1010 3030 0200 000M UP'), //Mauritius + array('MD24 AG00 0225 1000 1310 4169'), //Moldova + array('MC93 2005 2222 1001 1223 3M44 554'), //Monaco + array('ME25 5050 0001 2345 6789 52'), //Montenegro + array('NL39 RABO 0300 0652 65'), //Netherlands + array('NO93 8601 1117 948'), //Norway + array('PK36 SCBL 0000 0011 2345 6703'), //Pakistan + array('PL60 1020 1026 0000 0422 7020 1112'), //Poland + array('PT50 0002 0123 1234 5678 9015 5'), //Portugal + array('RO49 AAAA 1B31 0075 9384 0001'), //Romania + array('SM86 U032 2509 8000 0000 0270 101'), //San Marino + array('SA03 8000 0000 6080 1016 7518'), //Saudi Arabia + array('RS35 2600 0560 1001 6113 78'), //Serbia + array('SK31 1200 0000 1987 4263 7542'), //Slovak Republic + array('SI56 1910 0000 0123 439'), //Slovenia + array('ES80 2310 0001 1800 0001 2346'), //Spain + array('SE35 5000 0000 0549 1000 0004'), //Sweden + array('CH93 0076 2011 6238 5295 8'), //Switzerland + array('TN59 1000 6035 1835 9847 8832'), //Tunisia + array('TR33 0006 1005 1978 6457 8413 27'), //Turkey + array('AE07 0331 2345 6789 0123 457'), //UAE + array('GB12 CPBK 0892 9965 0449 92'), //United Kingdom + + //Extended country list + array('AO06000600000100037131175'), //Angola + array('AZ21NABZ00000000137010001945'), //Azerbaijan + array('BH29BMAG1299123456BH01'), //Bahrain + array('BJ11B00610100400271101192592'), //Benin + array('BR9700360305000010009795493P2'), // Brazil + array('BR1800000000141455123924100C3'), // Brazil + array('VG96VPVG0000012345678902'), //British Virgin Islands + array('BF1030134020015400945000644'), //Burkina Faso + array('BI43201011067445'), //Burundi + array('CM2110003001000500000605307'), //Cameroon + array('CV64000300004547069110177'), //Cape Verde + array('FR7630007000110009970004943'), //Central African Republic + array('CG5230011000202151234567891'), //Congo + array('CR0515202001026284067'), //Costa Rica + array('DO28BAGR00000001212453611325'), //Dominican Republic + array('GT82TRAJ01020000001210029691'), //Guatemala + array('IR580540105180021273113008'), //Iran + array('IL620108000000099999998'), //Israel + array('CI05A00060174100178530011853'), //Ivory Coast + array('JO94CBJO0010000000000131000303'), // Jordan + array('KZ176010251000042994'), //Kazakhstan + array('KW74NBOK0000000000001000372152'), //Kuwait + array('LB30099900000001001925579116'), //Lebanon + array('MG4600005030010101914016057'), //Madagascar + array('ML03D00890170001002120000448'), //Mali + array('MR1300012000010000002037373'), //Mauritania + array('MU17BOMM0101101030300200000MUP'), //Mauritius + array('MZ59000100000011834194158'), //Mozambique + array('PS92PALS000000000400123456703'), //Palestinian Territory + array('QA58DOHB00001234567890ABCDEFH'), //Qatar + array('XK051212012345678907'), //Republic of Kosovo + array('PT50000200000163099310356'), //Sao Tome and Principe + array('SA0380000000608010167518'), //Saudi Arabia + array('SN12K00100152000025690007543'), //Senegal + array('TL380080012345678910158'), //Timor-Leste + array('TN5914207207100707129649'), //Tunisia + array('TR330006100519786457841327'), //Turkey + array('AE260211000000230064017'), //United Arab Emirates + ); + } + + /** + * @dataProvider getUnsupportedCountryCodes + */ + public function testIbansWithUnsupportedCountryCode($countryCode) + { + $this->assertViolationRaised($countryCode.'260211000000230064016', Iban::NOT_SUPPORTED_COUNTRY_CODE_ERROR); + } + + public function getUnsupportedCountryCodes() + { + return array( + array('AG'), + array('AI'), + array('AQ'), + array('AS'), + array('AW'), + ); + } + + public function testIbansWithInvalidCharacters() + { + $this->assertViolationRaised('CH930076201162385295]', Iban::INVALID_CHARACTERS_ERROR); + } + + /** + * @dataProvider getIbansWithInvalidCountryCode + */ + public function testIbansWithInvalidCountryCode($iban) + { + $this->assertViolationRaised($iban, Iban::INVALID_COUNTRY_CODE_ERROR); + } + + public function getIbansWithInvalidCountryCode() + { + return array( + array('0750447346'), + array('2X0750447346'), + array('A20750447346'), + ); + } + + private function assertViolationRaised($iban, $code) + { + $constraint = new Iban(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($iban, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$iban.'"') + ->setCode($code) + ->assertRaised(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0a23db7e046dce0134c4986d75e92209d3b8ee4d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\IdenticalTo; +use Symfony\Component\Validator\Constraints\IdenticalToValidator; + +/** + * @author Daniel Holmes + */ +class IdenticalToValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function createValidator() + { + return new IdenticalToValidator(); + } + + protected function createConstraint(array $options) + { + return new IdenticalTo($options); + } + + protected function getErrorCode() + { + return IdenticalTo::NOT_IDENTICAL_ERROR; + } + + public function provideAllValidComparisons() + { + $this->setDefaultTimezone('UTC'); + + // Don't call addPhp5Dot5Comparisons() automatically, as it does + // not take care of identical objects + $comparisons = $this->provideValidComparisons(); + + $this->restoreDefaultTimezone(); + + return $comparisons; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + $date = new \DateTime('2000-01-01'); + $object = new ComparisonTest_Class(2); + + $comparisons = array( + array(3, 3), + array('a', 'a'), + array($date, $date), + array($object, $object), + array(null, 1), + ); + + $immutableDate = new \DateTimeImmutable('2000-01-01'); + $comparisons[] = array($immutableDate, $immutableDate); + + return $comparisons; + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(1, '1', 2, '2', 'integer'), + array(2, '2', '2', '"2"', 'string'), + array('22', '"22"', '333', '"333"', 'string'), + array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', 'DateTime'), + array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('1999-01-01'), 'Jan 1, 1999, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..93b1d05bab7b2d623c78213866dcdc56f5a8ba84 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php @@ -0,0 +1,351 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Image; +use Symfony\Component\Validator\Constraints\ImageValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +/** + * @requires extension fileinfo + */ +class ImageValidatorTest extends ConstraintValidatorTestCase +{ + protected $context; + + /** + * @var ImageValidator + */ + protected $validator; + + protected $path; + protected $image; + protected $imageLandscape; + protected $imagePortrait; + protected $image4By3; + protected $imageCorrupted; + + protected function createValidator() + { + return new ImageValidator(); + } + + protected function setUp() + { + parent::setUp(); + + $this->image = __DIR__.'/Fixtures/test.gif'; + $this->imageLandscape = __DIR__.'/Fixtures/test_landscape.gif'; + $this->imagePortrait = __DIR__.'/Fixtures/test_portrait.gif'; + $this->image4By3 = __DIR__.'/Fixtures/test_4by3.gif'; + $this->imageCorrupted = __DIR__.'/Fixtures/test_corrupted.gif'; + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Image()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Image()); + + $this->assertNoViolation(); + } + + public function testValidImage() + { + $this->validator->validate($this->image, new Image()); + + $this->assertNoViolation(); + } + + public function testFileNotFound() + { + // Check that the logic from FileValidator still works + $constraint = new Image(array( + 'notFoundMessage' => 'myMessage', + )); + + $this->validator->validate('foobar', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ file }}', '"foobar"') + ->setCode(Image::NOT_FOUND_ERROR) + ->assertRaised(); + } + + public function testValidSize() + { + $constraint = new Image(array( + 'minWidth' => 1, + 'maxWidth' => 2, + 'minHeight' => 1, + 'maxHeight' => 2, + )); + + $this->validator->validate($this->image, $constraint); + + $this->assertNoViolation(); + } + + public function testWidthTooSmall() + { + $constraint = new Image(array( + 'minWidth' => 3, + 'minWidthMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ width }}', '2') + ->setParameter('{{ min_width }}', '3') + ->setCode(Image::TOO_NARROW_ERROR) + ->assertRaised(); + } + + public function testWidthTooBig() + { + $constraint = new Image(array( + 'maxWidth' => 1, + 'maxWidthMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ width }}', '2') + ->setParameter('{{ max_width }}', '1') + ->setCode(Image::TOO_WIDE_ERROR) + ->assertRaised(); + } + + public function testHeightTooSmall() + { + $constraint = new Image(array( + 'minHeight' => 3, + 'minHeightMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ height }}', '2') + ->setParameter('{{ min_height }}', '3') + ->setCode(Image::TOO_LOW_ERROR) + ->assertRaised(); + } + + public function testHeightTooBig() + { + $constraint = new Image(array( + 'maxHeight' => 1, + 'maxHeightMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ height }}', '2') + ->setParameter('{{ max_height }}', '1') + ->setCode(Image::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMinWidth() + { + $constraint = new Image(array( + 'minWidth' => '1abc', + )); + + $this->validator->validate($this->image, $constraint); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMaxWidth() + { + $constraint = new Image(array( + 'maxWidth' => '1abc', + )); + + $this->validator->validate($this->image, $constraint); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMinHeight() + { + $constraint = new Image(array( + 'minHeight' => '1abc', + )); + + $this->validator->validate($this->image, $constraint); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMaxHeight() + { + $constraint = new Image(array( + 'maxHeight' => '1abc', + )); + + $this->validator->validate($this->image, $constraint); + } + + public function testRatioTooSmall() + { + $constraint = new Image(array( + 'minRatio' => 2, + 'minRatioMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ ratio }}', 1) + ->setParameter('{{ min_ratio }}', 2) + ->setCode(Image::RATIO_TOO_SMALL_ERROR) + ->assertRaised(); + } + + public function testRatioTooBig() + { + $constraint = new Image(array( + 'maxRatio' => 0.5, + 'maxRatioMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ ratio }}', 1) + ->setParameter('{{ max_ratio }}', 0.5) + ->setCode(Image::RATIO_TOO_BIG_ERROR) + ->assertRaised(); + } + + public function testMaxRatioUsesTwoDecimalsOnly() + { + $constraint = new Image(array( + 'maxRatio' => 1.33, + )); + + $this->validator->validate($this->image4By3, $constraint); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMinRatio() + { + $constraint = new Image(array( + 'minRatio' => '1abc', + )); + + $this->validator->validate($this->image, $constraint); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMaxRatio() + { + $constraint = new Image(array( + 'maxRatio' => '1abc', + )); + + $this->validator->validate($this->image, $constraint); + } + + public function testSquareNotAllowed() + { + $constraint = new Image(array( + 'allowSquare' => false, + 'allowSquareMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ width }}', 2) + ->setParameter('{{ height }}', 2) + ->setCode(Image::SQUARE_NOT_ALLOWED_ERROR) + ->assertRaised(); + } + + public function testLandscapeNotAllowed() + { + $constraint = new Image(array( + 'allowLandscape' => false, + 'allowLandscapeMessage' => 'myMessage', + )); + + $this->validator->validate($this->imageLandscape, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ width }}', 2) + ->setParameter('{{ height }}', 1) + ->setCode(Image::LANDSCAPE_NOT_ALLOWED_ERROR) + ->assertRaised(); + } + + public function testPortraitNotAllowed() + { + $constraint = new Image(array( + 'allowPortrait' => false, + 'allowPortraitMessage' => 'myMessage', + )); + + $this->validator->validate($this->imagePortrait, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ width }}', 1) + ->setParameter('{{ height }}', 2) + ->setCode(Image::PORTRAIT_NOT_ALLOWED_ERROR) + ->assertRaised(); + } + + public function testCorrupted() + { + if (!function_exists('imagecreatefromstring')) { + $this->markTestSkipped('This test require GD extension'); + } + + $constraint = new Image(array( + 'detectCorrupted' => true, + 'corruptedMessage' => 'myMessage', + )); + + $this->validator->validate($this->image, $constraint); + + $this->assertNoViolation(); + + $this->validator->validate($this->imageCorrupted, $constraint); + + $this->buildViolation('myMessage') + ->setCode(Image::CORRUPTED_IMAGE_ERROR) + ->assertRaised(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..985bd9577d2d5f4ea99d83d6e4429c9a59da298d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php @@ -0,0 +1,451 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Ip; +use Symfony\Component\Validator\Constraints\IpValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class IpValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new IpValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Ip()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Ip()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Ip()); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidValidatorVersion() + { + new Ip(array( + 'version' => 666, + )); + } + + /** + * @dataProvider getValidIpsV4 + */ + public function testValidIpsV4($ip) + { + $this->validator->validate($ip, new Ip(array( + 'version' => Ip::V4, + ))); + + $this->assertNoViolation(); + } + + public function getValidIpsV4() + { + return array( + array('0.0.0.0'), + array('10.0.0.0'), + array('123.45.67.178'), + array('172.16.0.0'), + array('192.168.1.0'), + array('224.0.0.1'), + array('255.255.255.255'), + array('127.0.0.0'), + ); + } + + /** + * @dataProvider getValidIpsV6 + */ + public function testValidIpsV6($ip) + { + $this->validator->validate($ip, new Ip(array( + 'version' => Ip::V6, + ))); + + $this->assertNoViolation(); + } + + public function getValidIpsV6() + { + return array( + array('2001:0db8:85a3:0000:0000:8a2e:0370:7334'), + array('2001:0DB8:85A3:0000:0000:8A2E:0370:7334'), + array('2001:0Db8:85a3:0000:0000:8A2e:0370:7334'), + array('fdfe:dcba:9876:ffff:fdc6:c46b:bb8f:7d4c'), + array('fdc6:c46b:bb8f:7d4c:fdc6:c46b:bb8f:7d4c'), + array('fdc6:c46b:bb8f:7d4c:0000:8a2e:0370:7334'), + array('fe80:0000:0000:0000:0202:b3ff:fe1e:8329'), + array('fe80:0:0:0:202:b3ff:fe1e:8329'), + array('fe80::202:b3ff:fe1e:8329'), + array('0:0:0:0:0:0:0:0'), + array('::'), + array('0::'), + array('::0'), + array('0::0'), + // IPv4 mapped to IPv6 + array('2001:0db8:85a3:0000:0000:8a2e:0.0.0.0'), + array('::0.0.0.0'), + array('::255.255.255.255'), + array('::123.45.67.178'), + ); + } + + /** + * @dataProvider getValidIpsAll + */ + public function testValidIpsAll($ip) + { + $this->validator->validate($ip, new Ip(array( + 'version' => Ip::ALL, + ))); + + $this->assertNoViolation(); + } + + public function getValidIpsAll() + { + return array_merge($this->getValidIpsV4(), $this->getValidIpsV6()); + } + + /** + * @dataProvider getInvalidIpsV4 + */ + public function testInvalidIpsV4($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V4, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidIpsV4() + { + return array( + array('0'), + array('0.0'), + array('0.0.0'), + array('256.0.0.0'), + array('0.256.0.0'), + array('0.0.256.0'), + array('0.0.0.256'), + array('-1.0.0.0'), + array('foobar'), + ); + } + + /** + * @dataProvider getInvalidPrivateIpsV4 + */ + public function testInvalidPrivateIpsV4($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V4_NO_PRIV, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPrivateIpsV4() + { + return array( + array('10.0.0.0'), + array('172.16.0.0'), + array('192.168.1.0'), + ); + } + + /** + * @dataProvider getInvalidReservedIpsV4 + */ + public function testInvalidReservedIpsV4($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V4_NO_RES, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidReservedIpsV4() + { + return array( + array('0.0.0.0'), + array('240.0.0.1'), + array('255.255.255.255'), + ); + } + + /** + * @dataProvider getInvalidPublicIpsV4 + */ + public function testInvalidPublicIpsV4($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V4_ONLY_PUBLIC, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPublicIpsV4() + { + return array_merge($this->getInvalidPrivateIpsV4(), $this->getInvalidReservedIpsV4()); + } + + /** + * @dataProvider getInvalidIpsV6 + */ + public function testInvalidIpsV6($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V6, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidIpsV6() + { + return array( + array('z001:0db8:85a3:0000:0000:8a2e:0370:7334'), + array('fe80'), + array('fe80:8329'), + array('fe80:::202:b3ff:fe1e:8329'), + array('fe80::202:b3ff::fe1e:8329'), + // IPv4 mapped to IPv6 + array('2001:0db8:85a3:0000:0000:8a2e:0370:0.0.0.0'), + array('::0.0'), + array('::0.0.0'), + array('::256.0.0.0'), + array('::0.256.0.0'), + array('::0.0.256.0'), + array('::0.0.0.256'), + ); + } + + /** + * @dataProvider getInvalidPrivateIpsV6 + */ + public function testInvalidPrivateIpsV6($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V6_NO_PRIV, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPrivateIpsV6() + { + return array( + array('fdfe:dcba:9876:ffff:fdc6:c46b:bb8f:7d4c'), + array('fdc6:c46b:bb8f:7d4c:fdc6:c46b:bb8f:7d4c'), + array('fdc6:c46b:bb8f:7d4c:0000:8a2e:0370:7334'), + ); + } + + /** + * @dataProvider getInvalidReservedIpsV6 + */ + public function testInvalidReservedIpsV6($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V6_NO_RES, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidReservedIpsV6() + { + // Quoting after official filter documentation: + // "FILTER_FLAG_NO_RES_RANGE = This flag does not apply to IPv6 addresses." + // Full description: http://php.net/manual/en/filter.filters.flags.php + return $this->getInvalidIpsV6(); + } + + /** + * @dataProvider getInvalidPublicIpsV6 + */ + public function testInvalidPublicIpsV6($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V6_ONLY_PUBLIC, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPublicIpsV6() + { + return array_merge($this->getInvalidPrivateIpsV6(), $this->getInvalidReservedIpsV6()); + } + + /** + * @dataProvider getInvalidIpsAll + */ + public function testInvalidIpsAll($ip) + { + $constraint = new Ip(array( + 'version' => Ip::ALL, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidIpsAll() + { + return array_merge($this->getInvalidIpsV4(), $this->getInvalidIpsV6()); + } + + /** + * @dataProvider getInvalidPrivateIpsAll + */ + public function testInvalidPrivateIpsAll($ip) + { + $constraint = new Ip(array( + 'version' => Ip::ALL_NO_PRIV, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPrivateIpsAll() + { + return array_merge($this->getInvalidPrivateIpsV4(), $this->getInvalidPrivateIpsV6()); + } + + /** + * @dataProvider getInvalidReservedIpsAll + */ + public function testInvalidReservedIpsAll($ip) + { + $constraint = new Ip(array( + 'version' => Ip::ALL_NO_RES, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidReservedIpsAll() + { + return array_merge($this->getInvalidReservedIpsV4(), $this->getInvalidReservedIpsV6()); + } + + /** + * @dataProvider getInvalidPublicIpsAll + */ + public function testInvalidPublicIpsAll($ip) + { + $constraint = new Ip(array( + 'version' => Ip::ALL_ONLY_PUBLIC, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPublicIpsAll() + { + return array_merge($this->getInvalidPublicIpsV4(), $this->getInvalidPublicIpsV6()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ab139a93fd7d307ba0e8916c332941c86fd029cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\IsFalse; +use Symfony\Component\Validator\Constraints\IsFalseValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class IsFalseValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new IsFalseValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new IsFalse()); + + $this->assertNoViolation(); + } + + public function testFalseIsValid() + { + $this->validator->validate(false, new IsFalse()); + + $this->assertNoViolation(); + } + + public function testTrueIsInvalid() + { + $constraint = new IsFalse(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(true, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'true') + ->setCode(IsFalse::NOT_FALSE_ERROR) + ->assertRaised(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2cc289b85739d7c07e5898c1f799377bd5d2d1b7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\IsNull; +use Symfony\Component\Validator\Constraints\IsNullValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class IsNullValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new IsNullValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new IsNull()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidValues + */ + public function testInvalidValues($value, $valueAsString) + { + $constraint = new IsNull(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $valueAsString) + ->setCode(IsNull::NOT_NULL_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + return array( + array(0, '0'), + array(false, 'false'), + array(true, 'true'), + array('', '""'), + array('foo bar', '"foo bar"'), + array(new \DateTime(), 'object'), + array(new \stdClass(), 'object'), + array(array(), 'array'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..821d54da29e59ff6e3c4bd5617ec4f0a2bb1fbd5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\IsTrue; +use Symfony\Component\Validator\Constraints\IsTrueValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class IsTrueValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new IsTrueValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new IsTrue()); + + $this->assertNoViolation(); + } + + public function testTrueIsValid() + { + $this->validator->validate(true, new IsTrue()); + + $this->assertNoViolation(); + } + + public function testFalseIsInvalid() + { + $constraint = new IsTrue(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(false, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'false') + ->setCode(IsTrue::NOT_TRUE_ERROR) + ->assertRaised(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..344edb99f370a84150157497da0c7a17c26f9489 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php @@ -0,0 +1,266 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Isbn; +use Symfony\Component\Validator\Constraints\IsbnValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +/** + * @see https://en.wikipedia.org/wiki/Isbn + */ +class IsbnValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new IsbnValidator(); + } + + public function getValidIsbn10() + { + return array( + array('2723442284'), + array('2723442276'), + array('2723455041'), + array('2070546810'), + array('2711858839'), + array('2756406767'), + array('2870971648'), + array('226623854X'), + array('2851806424'), + array('0321812700'), + array('0-45122-5244'), + array('0-4712-92311'), + array('0-9752298-0-X'), + ); + } + + public function getInvalidIsbn10() + { + return array( + array('27234422841', Isbn::TOO_LONG_ERROR), + array('272344228', Isbn::TOO_SHORT_ERROR), + array('0-4712-9231', Isbn::TOO_SHORT_ERROR), + array('1234567890', Isbn::CHECKSUM_FAILED_ERROR), + array('0987656789', Isbn::CHECKSUM_FAILED_ERROR), + array('7-35622-5444', Isbn::CHECKSUM_FAILED_ERROR), + array('0-4X19-92611', Isbn::CHECKSUM_FAILED_ERROR), + array('0_45122_5244', Isbn::INVALID_CHARACTERS_ERROR), + array('2870#971#648', Isbn::INVALID_CHARACTERS_ERROR), + array('0-9752298-0-x', Isbn::INVALID_CHARACTERS_ERROR), + array('1A34567890', Isbn::INVALID_CHARACTERS_ERROR), + // chr(1) evaluates to 0 + // 2070546810 is valid + array('2'.chr(1).'70546810', Isbn::INVALID_CHARACTERS_ERROR), + ); + } + + public function getValidIsbn13() + { + return array( + array('978-2723442282'), + array('978-2723442275'), + array('978-2723455046'), + array('978-2070546817'), + array('978-2711858835'), + array('978-2756406763'), + array('978-2870971642'), + array('978-2266238540'), + array('978-2851806420'), + array('978-0321812704'), + array('978-0451225245'), + array('978-0471292319'), + ); + } + + public function getInvalidIsbn13() + { + return array( + array('978-27234422821', Isbn::TOO_LONG_ERROR), + array('978-272344228', Isbn::TOO_SHORT_ERROR), + array('978-2723442-82', Isbn::TOO_SHORT_ERROR), + array('978-2723442281', Isbn::CHECKSUM_FAILED_ERROR), + array('978-0321513774', Isbn::CHECKSUM_FAILED_ERROR), + array('979-0431225385', Isbn::CHECKSUM_FAILED_ERROR), + array('980-0474292319', Isbn::CHECKSUM_FAILED_ERROR), + array('0-4X19-92619812', Isbn::INVALID_CHARACTERS_ERROR), + array('978_2723442282', Isbn::INVALID_CHARACTERS_ERROR), + array('978#2723442282', Isbn::INVALID_CHARACTERS_ERROR), + array('978-272C442282', Isbn::INVALID_CHARACTERS_ERROR), + // chr(1) evaluates to 0 + // 978-2070546817 is valid + array('978-2'.chr(1).'70546817', Isbn::INVALID_CHARACTERS_ERROR), + ); + } + + public function getValidIsbn() + { + return array_merge( + $this->getValidIsbn10(), + $this->getValidIsbn13() + ); + } + + public function getInvalidIsbn() + { + return array_merge( + $this->getInvalidIsbn10(), + $this->getInvalidIsbn13() + ); + } + + public function testNullIsValid() + { + $constraint = new Isbn(true); + + $this->validator->validate(null, $constraint); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $constraint = new Isbn(true); + + $this->validator->validate('', $constraint); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $constraint = new Isbn(true); + + $this->validator->validate(new \stdClass(), $constraint); + } + + /** + * @dataProvider getValidIsbn10 + */ + public function testValidIsbn10($isbn) + { + $constraint = new Isbn(array( + 'type' => 'isbn10', + )); + + $this->validator->validate($isbn, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidIsbn10 + */ + public function testInvalidIsbn10($isbn, $code) + { + $constraint = new Isbn(array( + 'type' => 'isbn10', + 'isbn10Message' => 'myMessage', + )); + + $this->validator->validate($isbn, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$isbn.'"') + ->setCode($code) + ->assertRaised(); + } + + /** + * @dataProvider getValidIsbn13 + */ + public function testValidIsbn13($isbn) + { + $constraint = new Isbn(array('type' => 'isbn13')); + + $this->validator->validate($isbn, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidIsbn13 + */ + public function testInvalidIsbn13($isbn, $code) + { + $constraint = new Isbn(array( + 'type' => 'isbn13', + 'isbn13Message' => 'myMessage', + )); + + $this->validator->validate($isbn, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$isbn.'"') + ->setCode($code) + ->assertRaised(); + } + + /** + * @dataProvider getValidIsbn + */ + public function testValidIsbnAny($isbn) + { + $constraint = new Isbn(); + + $this->validator->validate($isbn, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidIsbn10 + */ + public function testInvalidIsbnAnyIsbn10($isbn, $code) + { + $constraint = new Isbn(array( + 'bothIsbnMessage' => 'myMessage', + )); + + $this->validator->validate($isbn, $constraint); + + // Too long for an ISBN-10, but not long enough for an ISBN-13 + if (Isbn::TOO_LONG_ERROR === $code) { + $code = Isbn::TYPE_NOT_RECOGNIZED_ERROR; + } + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$isbn.'"') + ->setCode($code) + ->assertRaised(); + } + + /** + * @dataProvider getInvalidIsbn13 + */ + public function testInvalidIsbnAnyIsbn13($isbn, $code) + { + $constraint = new Isbn(array( + 'bothIsbnMessage' => 'myMessage', + )); + + $this->validator->validate($isbn, $constraint); + + // Too short for an ISBN-13, but not short enough for an ISBN-10 + if (Isbn::TOO_SHORT_ERROR === $code) { + $code = Isbn::TYPE_NOT_RECOGNIZED_ERROR; + } + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$isbn.'"') + ->setCode($code) + ->assertRaised(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ca61ffac4c5505df1e99205b6aad57c2f4161fd9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php @@ -0,0 +1,182 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Issn; +use Symfony\Component\Validator\Constraints\IssnValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +/** + * @see https://en.wikipedia.org/wiki/Issn + */ +class IssnValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new IssnValidator(); + } + + public function getValidLowerCasedIssn() + { + return array( + array('2162-321x'), + array('2160-200x'), + array('1537-453x'), + array('1937-710x'), + array('0002-922x'), + array('1553-345x'), + array('1553-619x'), + ); + } + + public function getValidNonHyphenatedIssn() + { + return array( + array('2162321X'), + array('01896016'), + array('15744647'), + array('14350645'), + array('07174055'), + array('20905076'), + array('14401592'), + ); + } + + public function getFullValidIssn() + { + return array( + array('1550-7416'), + array('1539-8560'), + array('2156-5376'), + array('1119-023X'), + array('1684-5315'), + array('1996-0786'), + array('1684-5374'), + array('1996-0794'), + ); + } + + public function getValidIssn() + { + return array_merge( + $this->getValidLowerCasedIssn(), + $this->getValidNonHyphenatedIssn(), + $this->getFullValidIssn() + ); + } + + public function getInvalidIssn() + { + return array( + array(0, Issn::TOO_SHORT_ERROR), + array('1539', Issn::TOO_SHORT_ERROR), + array('2156-537A', Issn::INVALID_CHARACTERS_ERROR), + array('1119-0231', Issn::CHECKSUM_FAILED_ERROR), + array('1684-5312', Issn::CHECKSUM_FAILED_ERROR), + array('1996-0783', Issn::CHECKSUM_FAILED_ERROR), + array('1684-537X', Issn::CHECKSUM_FAILED_ERROR), + array('1996-0795', Issn::CHECKSUM_FAILED_ERROR), + ); + } + + public function testNullIsValid() + { + $constraint = new Issn(); + + $this->validator->validate(null, $constraint); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $constraint = new Issn(); + + $this->validator->validate('', $constraint); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $constraint = new Issn(); + $this->validator->validate(new \stdClass(), $constraint); + } + + /** + * @dataProvider getValidLowerCasedIssn + */ + public function testCaseSensitiveIssns($issn) + { + $constraint = new Issn(array( + 'caseSensitive' => true, + 'message' => 'myMessage', + )); + + $this->validator->validate($issn, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$issn.'"') + ->setCode(Issn::INVALID_CASE_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getValidNonHyphenatedIssn + */ + public function testRequireHyphenIssns($issn) + { + $constraint = new Issn(array( + 'requireHyphen' => true, + 'message' => 'myMessage', + )); + + $this->validator->validate($issn, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$issn.'"') + ->setCode(Issn::MISSING_HYPHEN_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getValidIssn + */ + public function testValidIssn($issn) + { + $constraint = new Issn(); + + $this->validator->validate($issn, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getInvalidIssn + */ + public function testInvalidIssn($issn, $code) + { + $constraint = new Issn(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($issn, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$issn.'"') + ->setCode($code) + ->assertRaised(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2980f2a23319320bdd5b3539eea332a662c0e70c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php @@ -0,0 +1,105 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Intl\Util\IntlTestHelper; +use Symfony\Component\Validator\Constraints\Language; +use Symfony\Component\Validator\Constraints\LanguageValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class LanguageValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new LanguageValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Language()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Language()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Language()); + } + + /** + * @dataProvider getValidLanguages + */ + public function testValidLanguages($language) + { + $this->validator->validate($language, new Language()); + + $this->assertNoViolation(); + } + + public function getValidLanguages() + { + return array( + array('en'), + array('en_US'), + array('my'), + ); + } + + /** + * @dataProvider getInvalidLanguages + */ + public function testInvalidLanguages($language) + { + $constraint = new Language(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($language, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$language.'"') + ->setCode(Language::NO_SUCH_LANGUAGE_ERROR) + ->assertRaised(); + } + + public function getInvalidLanguages() + { + return array( + array('EN'), + array('foobar'), + ); + } + + public function testValidateUsingCountrySpecificLocale() + { + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('fr_FR'); + $existingLanguage = 'en'; + + $this->validator->validate($existingLanguage, new Language(array( + 'message' => 'aMessage', + ))); + + $this->assertNoViolation(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..da98387ccb466669ee149f88b695681037d1f420 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php @@ -0,0 +1,247 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Length; +use Symfony\Component\Validator\Constraints\LengthValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class LengthValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new LengthValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Length(6)); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Length(6)); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Length(5)); + } + + public function getThreeOrLessCharacters() + { + return array( + array(12), + array('12'), + array('üü'), + array('éé'), + array(123), + array('123'), + array('üüü'), + array('ééé'), + ); + } + + public function getFourCharacters() + { + return array( + array(1234), + array('1234'), + array('üüüü'), + array('éééé'), + ); + } + + public function getFiveOrMoreCharacters() + { + return array( + array(12345), + array('12345'), + array('üüüüü'), + array('ééééé'), + array(123456), + array('123456'), + array('üüüüüü'), + array('éééééé'), + ); + } + + public function getOneCharset() + { + return array( + array('é', 'utf8', true), + array("\xE9", 'CP1252', true), + array("\xE9", 'XXX', false), + array("\xE9", 'utf8', false), + ); + } + + /** + * @dataProvider getFiveOrMoreCharacters + */ + public function testValidValuesMin($value) + { + $constraint = new Length(array('min' => 5)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getThreeOrLessCharacters + */ + public function testValidValuesMax($value) + { + $constraint = new Length(array('max' => 3)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getFourCharacters + */ + public function testValidValuesExact($value) + { + $constraint = new Length(4); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getThreeOrLessCharacters + */ + public function testInvalidValuesMin($value) + { + $constraint = new Length(array( + 'min' => 4, + 'minMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Length::TOO_SHORT_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getFiveOrMoreCharacters + */ + public function testInvalidValuesMax($value) + { + $constraint = new Length(array( + 'max' => 4, + 'maxMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Length::TOO_LONG_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getThreeOrLessCharacters + */ + public function testInvalidValuesExactLessThanFour($value) + { + $constraint = new Length(array( + 'min' => 4, + 'max' => 4, + 'exactMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Length::TOO_SHORT_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getFiveOrMoreCharacters + */ + public function testInvalidValuesExactMoreThanFour($value) + { + $constraint = new Length(array( + 'min' => 4, + 'max' => 4, + 'exactMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Length::TOO_LONG_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getOneCharset + */ + public function testOneCharset($value, $charset, $isValid) + { + $constraint = new Length(array( + 'min' => 1, + 'max' => 1, + 'charset' => $charset, + 'charsetMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + if ($isValid) { + $this->assertNoViolation(); + } else { + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ charset }}', $charset) + ->setInvalidValue($value) + ->setCode(Length::INVALID_CHARACTERS_ERROR) + ->assertRaised(); + } + } + + public function testConstraintGetDefaultOption() + { + $constraint = new Length(5); + + $this->assertEquals(5, $constraint->min); + $this->assertEquals(5, $constraint->max); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3d0cc902c8219b3ff08a3bc2d685667009dcff8d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.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\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\LessThanOrEqual; +use Symfony\Component\Validator\Constraints\LessThanOrEqualValidator; + +/** + * @author Daniel Holmes + */ +class LessThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function createValidator() + { + return new LessThanOrEqualValidator(); + } + + protected function createConstraint(array $options) + { + return new LessThanOrEqual($options); + } + + protected function getErrorCode() + { + return LessThanOrEqual::TOO_HIGH_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(1, 2), + array(1, 1), + array(new \DateTime('2000-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2000-01-01'), new \DateTime('2020-01-01')), + array(new \DateTime('2000-01-01'), '2000-01-01'), + array(new \DateTime('2000-01-01'), '2020-01-01'), + array(new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'), + array(new \DateTime('2000-01-01 UTC'), '2020-01-01 UTC'), + array(new ComparisonTest_Class(4), new ComparisonTest_Class(5)), + array(new ComparisonTest_Class(5), new ComparisonTest_Class(5)), + array('a', 'a'), + array('a', 'z'), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(2, '2', 1, '1', 'integer'), + array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2010-01-01 UTC'), 'Jan 1, 2010, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(4), '4', __NAMESPACE__.'\ComparisonTest_Class'), + array('c', '"c"', 'b', '"b"', 'string'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..807c43adaf46b5fb75d90093cf891af0b28c1df5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\LessThan; +use Symfony\Component\Validator\Constraints\LessThanValidator; + +/** + * @author Daniel Holmes + */ +class LessThanValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function createValidator() + { + return new LessThanValidator(); + } + + protected function createConstraint(array $options) + { + return new LessThan($options); + } + + protected function getErrorCode() + { + return LessThan::TOO_HIGH_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(1, 2), + array(new \DateTime('2000-01-01'), new \DateTime('2010-01-01')), + array(new \DateTime('2000-01-01'), '2010-01-01'), + array(new \DateTime('2000-01-01 UTC'), '2010-01-01 UTC'), + array(new ComparisonTest_Class(4), new ComparisonTest_Class(5)), + array('22', '333'), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(3, '3', 2, '2', 'integer'), + array(2, '2', 2, '2', 'integer'), + array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2010-01-01 UTC'), 'Jan 1, 2010, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + array(new ComparisonTest_Class(6), '6', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + array('333', '"333"', '22', '"22"', 'string'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..29409e61f52f78be53bfd00330b09697125a6737 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.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\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Locale; +use Symfony\Component\Validator\Constraints\LocaleValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class LocaleValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new LocaleValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Locale()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Locale()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Locale()); + } + + /** + * @dataProvider getValidLocales + */ + public function testValidLocales($locale) + { + $this->validator->validate($locale, new Locale()); + + $this->assertNoViolation(); + } + + public function getValidLocales() + { + return array( + array('en'), + array('en_US'), + array('pt'), + array('pt_PT'), + array('zh_Hans'), + array('fil_PH'), + ); + } + + /** + * @dataProvider getInvalidLocales + */ + public function testInvalidLocales($locale) + { + $constraint = new Locale(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($locale, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$locale.'"') + ->setCode(Locale::NO_SUCH_LOCALE_ERROR) + ->assertRaised(); + } + + public function getInvalidLocales() + { + return array( + array('EN'), + array('foobar'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3ee04d7f46820a82008d93fccc334b790bd9ece0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.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\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Luhn; +use Symfony\Component\Validator\Constraints\LuhnValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class LuhnValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new LuhnValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Luhn()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Luhn()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidNumbers + */ + public function testValidNumbers($number) + { + $this->validator->validate($number, new Luhn()); + + $this->assertNoViolation(); + } + + public function getValidNumbers() + { + return array( + array('42424242424242424242'), + array('378282246310005'), + array('371449635398431'), + array('378734493671000'), + array('5610591081018250'), + array('30569309025904'), + array('38520000023237'), + array('6011111111111117'), + array('6011000990139424'), + array('3530111333300000'), + array('3566002020360505'), + array('5555555555554444'), + array('5105105105105100'), + array('4111111111111111'), + array('4012888888881881'), + array('4222222222222'), + array('5019717010103742'), + array('6331101999990016'), + ); + } + + /** + * @dataProvider getInvalidNumbers + */ + public function testInvalidNumbers($number, $code) + { + $constraint = new Luhn(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($number, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$number.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidNumbers() + { + return array( + array('1234567812345678', Luhn::CHECKSUM_FAILED_ERROR), + array('4222222222222222', Luhn::CHECKSUM_FAILED_ERROR), + array('0000000000000000', Luhn::CHECKSUM_FAILED_ERROR), + array('000000!000000000', Luhn::INVALID_CHARACTERS_ERROR), + array('42-22222222222222', Luhn::INVALID_CHARACTERS_ERROR), + ); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + * @dataProvider getInvalidTypes + */ + public function testInvalidTypes($number) + { + $constraint = new Luhn(); + + $this->validator->validate($number, $constraint); + } + + public function getInvalidTypes() + { + return array( + array(0), + array(123), + array(42424242424242424242), + array(378282246310005), + array(371449635398431), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fd92febf9b29b96c31975ab7f67b4217db9d3f92 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\Constraints\NotBlankValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class NotBlankValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new NotBlankValidator(); + } + + /** + * @dataProvider getValidValues + */ + public function testValidValues($value) + { + $this->validator->validate($value, new NotBlank()); + + $this->assertNoViolation(); + } + + public function getValidValues() + { + return array( + array('foobar'), + array(0), + array(0.0), + array('0'), + array(1234), + ); + } + + public function testNullIsInvalid() + { + $constraint = new NotBlank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(null, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'null') + ->setCode(NotBlank::IS_BLANK_ERROR) + ->assertRaised(); + } + + public function testBlankIsInvalid() + { + $constraint = new NotBlank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate('', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '""') + ->setCode(NotBlank::IS_BLANK_ERROR) + ->assertRaised(); + } + + public function testFalseIsInvalid() + { + $constraint = new NotBlank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(false, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'false') + ->setCode(NotBlank::IS_BLANK_ERROR) + ->assertRaised(); + } + + public function testEmptyArrayIsInvalid() + { + $constraint = new NotBlank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(array(), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'array') + ->setCode(NotBlank::IS_BLANK_ERROR) + ->assertRaised(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ed3568b8f50dbbd95567e07799089fdcfb4e7dad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\NotEqualTo; +use Symfony\Component\Validator\Constraints\NotEqualToValidator; + +/** + * @author Daniel Holmes + */ +class NotEqualToValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function createValidator() + { + return new NotEqualToValidator(); + } + + protected function createConstraint(array $options) + { + return new NotEqualTo($options); + } + + protected function getErrorCode() + { + return NotEqualTo::IS_EQUAL_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(1, 2), + array('22', '333'), + array(new \DateTime('2001-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2001-01-01'), '2000-01-01'), + array(new \DateTime('2001-01-01 UTC'), '2000-01-01 UTC'), + array(new ComparisonTest_Class(6), new ComparisonTest_Class(5)), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(3, '3', 3, '3', 'integer'), + array('2', '"2"', 2, '2', 'integer'), + array('a', '"a"', 'a', '"a"', 'string'), + array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d9a3d16f8bfe7032645e9ab15c7872ebdd498f97 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\NotIdenticalTo; +use Symfony\Component\Validator\Constraints\NotIdenticalToValidator; + +/** + * @author Daniel Holmes + */ +class NotIdenticalToValidatorTest extends AbstractComparisonValidatorTestCase +{ + protected function createValidator() + { + return new NotIdenticalToValidator(); + } + + protected function createConstraint(array $options) + { + return new NotIdenticalTo($options); + } + + protected function getErrorCode() + { + return NotIdenticalTo::IS_IDENTICAL_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(1, 2), + array('2', 2), + array('22', '333'), + array(new \DateTime('2001-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2000-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2001-01-01'), '2000-01-01'), + array(new \DateTime('2000-01-01'), '2000-01-01'), + array(new \DateTime('2001-01-01'), '2000-01-01'), + array(new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'), + array(null, 1), + ); + } + + public function provideAllInvalidComparisons() + { + $this->setDefaultTimezone('UTC'); + + // Don't call addPhp5Dot5Comparisons() automatically, as it does + // not take care of identical objects + $comparisons = $this->provideInvalidComparisons(); + + $this->restoreDefaultTimezone(); + + return $comparisons; + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + $date = new \DateTime('2000-01-01'); + $object = new ComparisonTest_Class(2); + + $comparisons = array( + array(3, '3', 3, '3', 'integer'), + array('a', '"a"', 'a', '"a"', 'string'), + array($date, 'Jan 1, 2000, 12:00 AM', $date, 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array($object, '2', $object, '2', __NAMESPACE__.'\ComparisonTest_Class'), + ); + + return $comparisons; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..feb3c2f8e787ffd3f879e785c56e4e16e3acc4b9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.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\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\NotNullValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class NotNullValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new NotNullValidator(); + } + + /** + * @dataProvider getValidValues + */ + public function testValidValues($value) + { + $this->validator->validate($value, new NotNull()); + + $this->assertNoViolation(); + } + + public function getValidValues() + { + return array( + array(0), + array(false), + array(true), + array(''), + ); + } + + public function testNullIsInvalid() + { + $constraint = new NotNull(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(null, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'null') + ->setCode(NotNull::IS_NULL_ERROR) + ->assertRaised(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7eb931ee92039a7ecbebc16ac7d17f96bbcd8dd0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php @@ -0,0 +1,392 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Intl\Util\IntlTestHelper; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Constraints\RangeValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class RangeValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new RangeValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Range(array('min' => 10, 'max' => 20))); + + $this->assertNoViolation(); + } + + public function getTenToTwenty() + { + return array( + array(10.00001), + array(19.99999), + array('10.00001'), + array('19.99999'), + array(10), + array(20), + array(10.0), + array(20.0), + ); + } + + public function getLessThanTen() + { + return array( + array(9.99999, '9.99999'), + array('9.99999', '"9.99999"'), + array(5, '5'), + array(1.0, '1.0'), + ); + } + + public function getMoreThanTwenty() + { + return array( + array(20.000001, '20.000001'), + array('20.000001', '"20.000001"'), + array(21, '21'), + array(30.0, '30.0'), + ); + } + + /** + * @dataProvider getTenToTwenty + */ + public function testValidValuesMin($value) + { + $constraint = new Range(array('min' => 10)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getTenToTwenty + */ + public function testValidValuesMax($value) + { + $constraint = new Range(array('max' => 20)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getTenToTwenty + */ + public function testValidValuesMinMax($value) + { + $constraint = new Range(array('min' => 10, 'max' => 20)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getLessThanTen + */ + public function testInvalidValuesMin($value, $formattedValue) + { + $constraint = new Range(array( + 'min' => 10, + 'minMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $formattedValue) + ->setParameter('{{ limit }}', 10) + ->setCode(Range::TOO_LOW_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getMoreThanTwenty + */ + public function testInvalidValuesMax($value, $formattedValue) + { + $constraint = new Range(array( + 'max' => 20, + 'maxMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $formattedValue) + ->setParameter('{{ limit }}', 20) + ->setCode(Range::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getMoreThanTwenty + */ + public function testInvalidValuesCombinedMax($value, $formattedValue) + { + $constraint = new Range(array( + 'min' => 10, + 'max' => 20, + 'minMessage' => 'myMinMessage', + 'maxMessage' => 'myMaxMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMaxMessage') + ->setParameter('{{ value }}', $formattedValue) + ->setParameter('{{ limit }}', 20) + ->setCode(Range::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getLessThanTen + */ + public function testInvalidValuesCombinedMin($value, $formattedValue) + { + $constraint = new Range(array( + 'min' => 10, + 'max' => 20, + 'minMessage' => 'myMinMessage', + 'maxMessage' => 'myMaxMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMinMessage') + ->setParameter('{{ value }}', $formattedValue) + ->setParameter('{{ limit }}', 10) + ->setCode(Range::TOO_LOW_ERROR) + ->assertRaised(); + } + + public function getTenthToTwentiethMarch2014() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $tests = array( + array(new \DateTime('March 10, 2014')), + array(new \DateTime('March 15, 2014')), + array(new \DateTime('March 20, 2014')), + ); + + $tests[] = array(new \DateTimeImmutable('March 10, 2014')); + $tests[] = array(new \DateTimeImmutable('March 15, 2014')); + $tests[] = array(new \DateTimeImmutable('March 20, 2014')); + + $this->restoreDefaultTimezone(); + + return $tests; + } + + public function getSoonerThanTenthMarch2014() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $tests = array( + array(new \DateTime('March 20, 2013'), 'Mar 20, 2013, 12:00 AM'), + array(new \DateTime('March 9, 2014'), 'Mar 9, 2014, 12:00 AM'), + ); + + $tests[] = array(new \DateTimeImmutable('March 20, 2013'), 'Mar 20, 2013, 12:00 AM'); + $tests[] = array(new \DateTimeImmutable('March 9, 2014'), 'Mar 9, 2014, 12:00 AM'); + + $this->restoreDefaultTimezone(); + + return $tests; + } + + public function getLaterThanTwentiethMarch2014() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $tests = array( + array(new \DateTime('March 21, 2014'), 'Mar 21, 2014, 12:00 AM'), + array(new \DateTime('March 9, 2015'), 'Mar 9, 2015, 12:00 AM'), + ); + + $tests[] = array(new \DateTimeImmutable('March 21, 2014'), 'Mar 21, 2014, 12:00 AM'); + $tests[] = array(new \DateTimeImmutable('March 9, 2015'), 'Mar 9, 2015, 12:00 AM'); + + $this->restoreDefaultTimezone(); + + return $tests; + } + + /** + * @dataProvider getTenthToTwentiethMarch2014 + */ + public function testValidDatesMin($value) + { + $constraint = new Range(array('min' => 'March 10, 2014')); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getTenthToTwentiethMarch2014 + */ + public function testValidDatesMax($value) + { + $constraint = new Range(array('max' => 'March 20, 2014')); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getTenthToTwentiethMarch2014 + */ + public function testValidDatesMinMax($value) + { + $constraint = new Range(array('min' => 'March 10, 2014', 'max' => 'March 20, 2014')); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getSoonerThanTenthMarch2014 + */ + public function testInvalidDatesMin($value, $dateTimeAsString) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + IntlTestHelper::requireIntl($this, '57.1'); + + $constraint = new Range(array( + 'min' => 'March 10, 2014', + 'minMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $dateTimeAsString) + ->setParameter('{{ limit }}', 'Mar 10, 2014, 12:00 AM') + ->setCode(Range::TOO_LOW_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getLaterThanTwentiethMarch2014 + */ + public function testInvalidDatesMax($value, $dateTimeAsString) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + IntlTestHelper::requireIntl($this, '57.1'); + + $constraint = new Range(array( + 'max' => 'March 20, 2014', + 'maxMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $dateTimeAsString) + ->setParameter('{{ limit }}', 'Mar 20, 2014, 12:00 AM') + ->setCode(Range::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getLaterThanTwentiethMarch2014 + */ + public function testInvalidDatesCombinedMax($value, $dateTimeAsString) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + IntlTestHelper::requireIntl($this, '57.1'); + + $constraint = new Range(array( + 'min' => 'March 10, 2014', + 'max' => 'March 20, 2014', + 'minMessage' => 'myMinMessage', + 'maxMessage' => 'myMaxMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMaxMessage') + ->setParameter('{{ value }}', $dateTimeAsString) + ->setParameter('{{ limit }}', 'Mar 20, 2014, 12:00 AM') + ->setCode(Range::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getSoonerThanTenthMarch2014 + */ + public function testInvalidDatesCombinedMin($value, $dateTimeAsString) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + IntlTestHelper::requireIntl($this, '57.1'); + + $constraint = new Range(array( + 'min' => 'March 10, 2014', + 'max' => 'March 20, 2014', + 'minMessage' => 'myMinMessage', + 'maxMessage' => 'myMaxMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMinMessage') + ->setParameter('{{ value }}', $dateTimeAsString) + ->setParameter('{{ limit }}', 'Mar 10, 2014, 12:00 AM') + ->setCode(Range::TOO_LOW_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + return array( + array(9.999999), + array(20.000001), + array('9.999999'), + array('20.000001'), + array(new \stdClass()), + ); + } + + public function testNonNumeric() + { + $this->validator->validate('abcd', new Range(array( + 'min' => 10, + 'max' => 20, + 'invalidMessage' => 'myMessage', + ))); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"abcd"') + ->setCode(Range::INVALID_CHARACTERS_ERROR) + ->assertRaised(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3291c77356f23a8ac07ee3444b6e0508bc3ef57b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Regex; + +/** + * @author Bernhard Schussek + */ +class RegexTest extends TestCase +{ + public function testConstraintGetDefaultOption() + { + $constraint = new Regex('/^[0-9]+$/'); + + $this->assertSame('/^[0-9]+$/', $constraint->pattern); + } + + public function provideHtmlPatterns() + { + return array( + // HTML5 wraps the pattern in ^(?:pattern)$ + array('/^[0-9]+$/', '[0-9]+'), + array('/[0-9]+$/', '.*[0-9]+'), + array('/^[0-9]+/', '[0-9]+.*'), + array('/[0-9]+/', '.*[0-9]+.*'), + // We need a smart way to allow matching of patterns that contain + // ^ and $ at various sub-clauses of an or-clause + // .*(pattern).* seems to work correctly + array('/[0-9]$|[a-z]+/', '.*([0-9]$|[a-z]+).*'), + array('/[0-9]$|^[a-z]+/', '.*([0-9]$|^[a-z]+).*'), + array('/^[0-9]|[a-z]+$/', '.*(^[0-9]|[a-z]+$).*'), + // Unescape escaped delimiters + array('/^[0-9]+\/$/', '[0-9]+/'), + array('#^[0-9]+\#$#', '[0-9]+#'), + // Cannot be converted + array('/^[0-9]+$/i', null), + + // Inverse matches are simple, just wrap in + // ((?!pattern).)* + array('/^[0-9]+$/', '((?!^[0-9]+$).)*', false), + array('/[0-9]+$/', '((?![0-9]+$).)*', false), + array('/^[0-9]+/', '((?!^[0-9]+).)*', false), + array('/[0-9]+/', '((?![0-9]+).)*', false), + array('/[0-9]$|[a-z]+/', '((?![0-9]$|[a-z]+).)*', false), + array('/[0-9]$|^[a-z]+/', '((?![0-9]$|^[a-z]+).)*', false), + array('/^[0-9]|[a-z]+$/', '((?!^[0-9]|[a-z]+$).)*', false), + array('/^[0-9]+\/$/', '((?!^[0-9]+/$).)*', false), + array('#^[0-9]+\#$#', '((?!^[0-9]+#$).)*', false), + array('/^[0-9]+$/i', null, false), + ); + } + + /** + * @dataProvider provideHtmlPatterns + */ + public function testGetHtmlPattern($pattern, $htmlPattern, $match = true) + { + $constraint = new Regex(array( + 'pattern' => $pattern, + 'match' => $match, + )); + + $this->assertSame($pattern, $constraint->pattern); + $this->assertSame($htmlPattern, $constraint->getHtmlPattern()); + } + + public function testGetCustomHtmlPattern() + { + $constraint = new Regex(array( + 'pattern' => '((?![0-9]$|[a-z]+).)*', + 'htmlPattern' => 'foobar', + )); + + $this->assertSame('((?![0-9]$|[a-z]+).)*', $constraint->pattern); + $this->assertSame('foobar', $constraint->getHtmlPattern()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5194b0816ea39d55e5ae0d159a169745d5863019 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.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\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Regex; +use Symfony\Component\Validator\Constraints\RegexValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class RegexValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new RegexValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Regex(array('pattern' => '/^[0-9]+$/'))); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Regex(array('pattern' => '/^[0-9]+$/'))); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Regex(array('pattern' => '/^[0-9]+$/'))); + } + + /** + * @dataProvider getValidValues + */ + public function testValidValues($value) + { + $constraint = new Regex(array('pattern' => '/^[0-9]+$/')); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + public function getValidValues() + { + return array( + array(0), + array('0'), + array('090909'), + array(90909), + ); + } + + /** + * @dataProvider getInvalidValues + */ + public function testInvalidValues($value) + { + $constraint = new Regex(array( + 'pattern' => '/^[0-9]+$/', + 'message' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setCode(Regex::REGEX_FAILED_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + return array( + array('abcd'), + array('090foo'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..10ffe877087832f7efd70437336439e4b06e2b38 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Time; +use Symfony\Component\Validator\Constraints\TimeValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class TimeValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new TimeValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Time()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Time()); + + $this->assertNoViolation(); + } + + public function testDateTimeClassIsValid() + { + $this->validator->validate(new \DateTime(), new Time()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Time()); + } + + /** + * @dataProvider getValidTimes + */ + public function testValidTimes($time) + { + $this->validator->validate($time, new Time()); + + $this->assertNoViolation(); + } + + public function getValidTimes() + { + return array( + array('01:02:03'), + array('00:00:00'), + array('23:59:59'), + ); + } + + /** + * @dataProvider getInvalidTimes + */ + public function testInvalidTimes($time, $code) + { + $constraint = new Time(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($time, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$time.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidTimes() + { + return array( + array('foobar', Time::INVALID_FORMAT_ERROR), + array('foobar 12:34:56', Time::INVALID_FORMAT_ERROR), + array('12:34:56 foobar', Time::INVALID_FORMAT_ERROR), + array('00:00', Time::INVALID_FORMAT_ERROR), + array('24:00:00', Time::INVALID_TIME_ERROR), + array('00:60:00', Time::INVALID_TIME_ERROR), + array('00:00:60', Time::INVALID_TIME_ERROR), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..86ce972a466b0c486d39532d2ae4f39563fca329 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php @@ -0,0 +1,182 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Type; +use Symfony\Component\Validator\Constraints\TypeValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +class TypeValidatorTest extends ConstraintValidatorTestCase +{ + protected static $file; + + protected function createValidator() + { + return new TypeValidator(); + } + + public function testNullIsValid() + { + $constraint = new Type(array('type' => 'integer')); + + $this->validator->validate(null, $constraint); + + $this->assertNoViolation(); + } + + public function testEmptyIsValidIfString() + { + $constraint = new Type(array('type' => 'string')); + + $this->validator->validate('', $constraint); + + $this->assertNoViolation(); + } + + public function testEmptyIsInvalidIfNoString() + { + $constraint = new Type(array( + 'type' => 'integer', + 'message' => 'myMessage', + )); + + $this->validator->validate('', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '""') + ->setParameter('{{ type }}', 'integer') + ->setCode(Type::INVALID_TYPE_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getValidValues + */ + public function testValidValues($value, $type) + { + $constraint = new Type(array('type' => $type)); + + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + public function getValidValues() + { + $object = new \stdClass(); + $file = $this->createFile(); + + return array( + array(true, 'Boolean'), + array(false, 'Boolean'), + array(true, 'boolean'), + array(false, 'boolean'), + array(true, 'bool'), + array(false, 'bool'), + array(0, 'numeric'), + array('0', 'numeric'), + array(1.5, 'numeric'), + array('1.5', 'numeric'), + array(0, 'integer'), + array(1.5, 'float'), + array('12345', 'string'), + array(array(), 'array'), + array($object, 'object'), + array($object, 'stdClass'), + array($file, 'resource'), + array('12345', 'digit'), + array('12a34', 'alnum'), + array('abcde', 'alpha'), + array("\n\r\t", 'cntrl'), + array('arf12', 'graph'), + array('abcde', 'lower'), + array('ABCDE', 'upper'), + array('arf12', 'print'), + array('*&$()', 'punct'), + array("\n\r\t", 'space'), + array('AB10BC99', 'xdigit'), + ); + } + + /** + * @dataProvider getInvalidValues + */ + public function testInvalidValues($value, $type, $valueAsString) + { + $constraint = new Type(array( + 'type' => $type, + 'message' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $valueAsString) + ->setParameter('{{ type }}', $type) + ->setCode(Type::INVALID_TYPE_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + $object = new \stdClass(); + $file = $this->createFile(); + + return array( + array('foobar', 'numeric', '"foobar"'), + array('foobar', 'boolean', '"foobar"'), + array('0', 'integer', '"0"'), + array('1.5', 'float', '"1.5"'), + array(12345, 'string', '12345'), + array($object, 'boolean', 'object'), + array($object, 'numeric', 'object'), + array($object, 'integer', 'object'), + array($object, 'float', 'object'), + array($object, 'string', 'object'), + array($object, 'resource', 'object'), + array($file, 'boolean', 'resource'), + array($file, 'numeric', 'resource'), + array($file, 'integer', 'resource'), + array($file, 'float', 'resource'), + array($file, 'string', 'resource'), + array($file, 'object', 'resource'), + array('12a34', 'digit', '"12a34"'), + array('1a#23', 'alnum', '"1a#23"'), + array('abcd1', 'alpha', '"abcd1"'), + array("\nabc", 'cntrl', "\"\nabc\""), + array("abc\n", 'graph', "\"abc\n\""), + array('abCDE', 'lower', '"abCDE"'), + array('ABcde', 'upper', '"ABcde"'), + array("\nabc", 'print', "\"\nabc\""), + array('abc&$!', 'punct', '"abc&$!"'), + array("\nabc", 'space', "\"\nabc\""), + array('AR1012', 'xdigit', '"AR1012"'), + ); + } + + protected function createFile() + { + if (!static::$file) { + static::$file = fopen(__FILE__, 'r'); + } + + return static::$file; + } + + public static function tearDownAfterClass() + { + if (static::$file) { + fclose(static::$file); + static::$file = null; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..37dcd634530a8ef97bdda2ce4e1714e64537bcf2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.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\Component\Validator\Tests\Constraints; + +use Symfony\Bridge\PhpUnit\DnsMock; +use Symfony\Component\Validator\Constraints\Url; +use Symfony\Component\Validator\Constraints\UrlValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +/** + * @group dns-sensitive + */ +class UrlValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new UrlValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Url()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Url()); + + $this->assertNoViolation(); + } + + public function testEmptyStringFromObjectIsValid() + { + $this->validator->validate(new EmailProvider(), new Url()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Url()); + } + + /** + * @dataProvider getValidUrls + */ + public function testValidUrls($url) + { + $this->validator->validate($url, new Url()); + + $this->assertNoViolation(); + } + + public function getValidUrls() + { + return array( + array('http://a.pl'), + array('http://www.google.com'), + array('http://www.google.com.'), + array('http://www.google.museum'), + array('https://google.com/'), + array('https://google.com:80/'), + array('http://www.example.coop/'), + array('http://www.test-example.com/'), + array('http://www.symfony.com/'), + array('http://symfony.fake/blog/'), + array('http://symfony.com/?'), + array('http://symfony.com/search?type=&q=url+validator'), + array('http://symfony.com/#'), + array('http://symfony.com/#?'), + array('http://www.symfony.com/doc/current/book/validation.html#supported-constraints'), + array('http://very.long.domain.name.com/'), + array('http://localhost/'), + array('http://myhost123/'), + array('http://127.0.0.1/'), + array('http://127.0.0.1:80/'), + array('http://[::1]/'), + array('http://[::1]:80/'), + array('http://[1:2:3::4:5:6:7]/'), + array('http://sãopaulo.com/'), + array('http://xn--sopaulo-xwa.com/'), + array('http://sãopaulo.com.br/'), + array('http://xn--sopaulo-xwa.com.br/'), + array('http://пример.иÑпытание/'), + array('http://xn--e1afmkfd.xn--80akhbyknj4f/'), + array('http://مثال.إختبار/'), + array('http://xn--mgbh0fb.xn--kgbechtv/'), + array('http://例å­.测试/'), + array('http://xn--fsqu00a.xn--0zwm56d/'), + array('http://例å­.測試/'), + array('http://xn--fsqu00a.xn--g6w251d/'), + array('http://例ãˆ.テスト/'), + array('http://xn--r8jz45g.xn--zckzah/'), + array('http://مثال.آزمایشی/'), + array('http://xn--mgbh0fb.xn--hgbk6aj7f53bba/'), + array('http://실례.테스트/'), + array('http://xn--9n2bp8q.xn--9t4b11yi5a/'), + array('http://العربية.idn.icann.org/'), + array('http://xn--ogb.idn.icann.org/'), + array('http://xn--e1afmkfd.xn--80akhbyknj4f.xn--e1afmkfd/'), + array('http://xn--espaa-rta.xn--ca-ol-fsay5a/'), + array('http://xn--d1abbgf6aiiy.xn--p1ai/'), + array('http://☎.com/'), + array('http://username:password@symfony.com'), + array('http://user-name@symfony.com'), + array('http://symfony.com?'), + array('http://symfony.com?query=1'), + array('http://symfony.com/?query=1'), + array('http://symfony.com#'), + array('http://symfony.com#fragment'), + array('http://symfony.com/#fragment'), + ); + } + + /** + * @dataProvider getInvalidUrls + */ + public function testInvalidUrls($url) + { + $constraint = new Url(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($url, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$url.'"') + ->setCode(Url::INVALID_URL_ERROR) + ->assertRaised(); + } + + public function getInvalidUrls() + { + return array( + array('google.com'), + array('://google.com'), + array('http ://google.com'), + array('http:/google.com'), + array('http://goog_le.com'), + array('http://google.com::aa'), + array('http://google.com:aa'), + array('ftp://google.fr'), + array('faked://google.fr'), + array('http://127.0.0.1:aa/'), + array('ftp://[::1]/'), + array('http://[::1'), + array('http://hello.☎/'), + array('http://:password@symfony.com'), + array('http://:password@@symfony.com'), + array('http://username:passwordsymfony.com'), + array('http://usern@me:password@symfony.com'), + ); + } + + /** + * @dataProvider getValidCustomUrls + */ + public function testCustomProtocolIsValid($url) + { + $constraint = new Url(array( + 'protocols' => array('ftp', 'file', 'git'), + )); + + $this->validator->validate($url, $constraint); + + $this->assertNoViolation(); + } + + public function getValidCustomUrls() + { + return array( + array('ftp://google.com'), + array('file://127.0.0.1'), + array('git://[::1]/'), + ); + } + + /** + * @dataProvider getCheckDns + * @requires function Symfony\Bridge\PhpUnit\DnsMock::withMockedHosts + */ + public function testCheckDns($violation) + { + DnsMock::withMockedHosts(array('example.com' => array(array('type' => $violation ? '' : 'A')))); + + $constraint = new Url(array( + 'checkDNS' => true, + 'dnsMessage' => 'myMessage', + )); + + $this->validator->validate('http://example.com', $constraint); + + if (!$violation) { + $this->assertNoViolation(); + } else { + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"example.com"') + ->setCode(Url::INVALID_URL_ERROR) + ->assertRaised(); + } + } + + public function getCheckDns() + { + return array(array(true), array(false)); + } +} + +class EmailProvider +{ + public function __toString() + { + return ''; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a39ec93d6cdf6b10708391a222905838e37269e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.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\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Uuid; +use Symfony\Component\Validator\Constraints\UuidValidator; +use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; + +/** + * @author Colin O'Dell + */ +class UuidValidatorTest extends ConstraintValidatorTestCase +{ + protected function createValidator() + { + return new UuidValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Uuid()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Uuid()); + + $this->assertNoViolation(); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsUuidConstraintCompatibleType() + { + $constraint = $this->getMockForAbstractClass('Symfony\\Component\\Validator\\Constraint'); + + $this->validator->validate('216fff40-98d9-11e3-a5e2-0800200c9a66', $constraint); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Uuid()); + } + + /** + * @dataProvider getValidStrictUuids + */ + public function testValidStrictUuids($uuid, $versions = null) + { + $constraint = new Uuid(); + + if (null !== $versions) { + $constraint->versions = $versions; + } + + $this->validator->validate($uuid, $constraint); + + $this->assertNoViolation(); + } + + public function getValidStrictUuids() + { + return array( + array('216fff40-98d9-11e3-a5e2-0800200c9a66'), // Version 1 UUID in lowercase + array('216fff40-98d9-11e3-a5e2-0800200c9a66', array(Uuid::V1_MAC)), + array('216FFF40-98D9-11E3-A5E2-0800200C9A66'), // Version 1 UUID in UPPERCASE + array('456daefb-5aa6-41b5-8dbc-068b05a8b201'), // Version 4 UUID in lowercase + array('456daEFb-5AA6-41B5-8DBC-068B05A8B201'), // Version 4 UUID in mixed case + array('456daEFb-5AA6-41B5-8DBC-068B05A8B201', array(Uuid::V4_RANDOM)), + ); + } + + /** + * @dataProvider getInvalidStrictUuids + */ + public function testInvalidStrictUuids($uuid, $code, $versions = null) + { + $constraint = new Uuid(array( + 'message' => 'testMessage', + )); + + if (null !== $versions) { + $constraint->versions = $versions; + } + + $this->validator->validate($uuid, $constraint); + + $this->buildViolation('testMessage') + ->setParameter('{{ value }}', '"'.$uuid.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidStrictUuids() + { + return array( + array('216fff40-98d9-11e3-a5e2_0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216Gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216fff40-98d9-11e3-a5e-20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216f-ff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800-200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c-9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff4098d911e3a5e20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a6', Uuid::TOO_SHORT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a666', Uuid::TOO_LONG_ERROR), + array('216fff40-98d9-01e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-61e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-71e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-81e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-91e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-a1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-b1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-c1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-d1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-e1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-f1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR, array(Uuid::V2_DCE, Uuid::V3_MD5, Uuid::V4_RANDOM, Uuid::V5_SHA1)), + array('216fff40-98d9-21e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR, array(Uuid::V1_MAC, Uuid::V3_MD5, Uuid::V4_RANDOM, Uuid::V5_SHA1)), + array('216fff40-98d9-11e3-05e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-15e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-25e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-35e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-45e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-55e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-65e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-75e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-c5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-d5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-e5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-f5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + + // Non-standard UUID allowed by some other systems + array('{216fff40-98d9-11e3-a5e2-0800200c9a66}', Uuid::INVALID_CHARACTERS_ERROR), + array('[216fff40-98d9-11e3-a5e2-0800200c9a66]', Uuid::INVALID_CHARACTERS_ERROR), + ); + } + + /** + * @dataProvider getValidNonStrictUuids + */ + public function testValidNonStrictUuids($uuid) + { + $constraint = new Uuid(array( + 'strict' => false, + )); + + $this->validator->validate($uuid, $constraint); + + $this->assertNoViolation(); + } + + public function getValidNonStrictUuids() + { + return array( + array('216fff40-98d9-11e3-a5e2-0800200c9a66'), // Version 1 UUID in lowercase + array('216FFF40-98D9-11E3-A5E2-0800200C9A66'), // Version 1 UUID in UPPERCASE + array('456daefb-5aa6-41b5-8dbc-068b05a8b201'), // Version 4 UUID in lowercase + array('456DAEFb-5AA6-41B5-8DBC-068b05a8B201'), // Version 4 UUID in mixed case + + // Non-standard UUIDs allowed by some other systems + array('216f-ff40-98d9-11e3-a5e2-0800-200c-9a66'), // Non-standard dash positions (every 4 chars) + array('216fff40-98d911e3-a5e20800-200c9a66'), // Non-standard dash positions (every 8 chars) + array('216fff4098d911e3a5e20800200c9a66'), // No dashes at all + array('{216fff40-98d9-11e3-a5e2-0800200c9a66}'), // Wrapped with curly braces + array('[216fff40-98d9-11e3-a5e2-0800200c9a66]'), // Wrapped with squared braces + ); + } + + /** + * @dataProvider getInvalidNonStrictUuids + */ + public function testInvalidNonStrictUuids($uuid, $code) + { + $constraint = new Uuid(array( + 'strict' => false, + 'message' => 'myMessage', + )); + + $this->validator->validate($uuid, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$uuid.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidNonStrictUuids() + { + return array( + array('216fff40-98d9-11e3-a5e2_0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216Gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216fff40-98d9-11e3-a5e2_0800200c9a6', Uuid::INVALID_CHARACTERS_ERROR), + array('216fff40-98d9-11e3-a5e-20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a6', Uuid::TOO_SHORT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a666', Uuid::TOO_LONG_ERROR), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ValidTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ValidTest.php new file mode 100644 index 0000000000000000000000000000000000000000..83722fd2df0e0f48fee5481021d8e8c8b3e63503 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/ValidTest.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\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Valid; + +/** + * @author Bernhard Schussek + */ +class ValidTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectGroupsOption() + { + new Valid(array('groups' => 'foo')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/CallbackClass.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/CallbackClass.php new file mode 100644 index 0000000000000000000000000000000000000000..073efb5d9097622c6eee9347d2f720d0c16eae19 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/CallbackClass.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Context\ExecutionContextInterface; + +/** + * @author Bernhard Schussek + */ +class CallbackClass +{ + public static function callback($object, ExecutionContextInterface $context) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ClassConstraint.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ClassConstraint.php new file mode 100644 index 0000000000000000000000000000000000000000..a4dc77715c5bab0c5f51a9ea178beab21e0235c3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ClassConstraint.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +class ClassConstraint extends Constraint +{ + public function getTargets() + { + return self::CLASS_CONSTRAINT; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php new file mode 100644 index 0000000000000000000000000000000000000000..8a196dcc914ecf7dbb52fb320ee50d81ef2c0512 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintA extends Constraint +{ + public $property1; + public $property2; + + public function getDefaultOption() + { + return 'property2'; + } + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..867b024c27672da15aeec1660e168bf2cceb8564 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; + +class ConstraintAValidator extends ConstraintValidator +{ + public static $passedContext; + + public function initialize(ExecutionContextInterface $context) + { + parent::initialize($context); + + self::$passedContext = $context; + } + + public function validate($value, Constraint $constraint) + { + if ('VALID' != $value) { + $this->context->addViolation('message', array('param' => 'value')); + + return; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php new file mode 100644 index 0000000000000000000000000000000000000000..6258923372ed8240f4b69b7fe9cb5d2222c76f27 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintB extends Constraint +{ + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.php new file mode 100644 index 0000000000000000000000000000000000000000..b0418b8718695a46aa367183601ef3b1f30920c5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.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\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintC extends Constraint +{ + public $option1; + + public function getRequiredOptions() + { + return array('option1'); + } + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValue.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValue.php new file mode 100644 index 0000000000000000000000000000000000000000..4ebd981eef92479014fa6ec13bebb06ee813fac5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValue.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintWithValue extends Constraint +{ + public $property; + public $value; + + public function getDefaultOption() + { + return 'property'; + } + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValueAsDefault.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValueAsDefault.php new file mode 100644 index 0000000000000000000000000000000000000000..a975e0787fc97eda82bcb1452b3356ab9e2b31d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValueAsDefault.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintWithValueAsDefault extends Constraint +{ + public $property; + public $value; + + public function getDefaultOption() + { + return 'value'; + } + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/Countable.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/Countable.php new file mode 100644 index 0000000000000000000000000000000000000000..282d78d45a67222a7910102ad02d69969d703187 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/Countable.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\Validator\Tests\Fixtures; + +class Countable implements \Countable +{ + private $content; + + public function __construct(array $content) + { + $this->content = $content; + } + + public function count() + { + return count($this->content); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/CustomArrayObject.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/CustomArrayObject.php new file mode 100644 index 0000000000000000000000000000000000000000..41eac961acf91ed0cb88c2c1bc9427491e8c9343 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/CustomArrayObject.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +/** + * This class is a hand written simplified version of PHP native `ArrayObject` + * class, to show that it behaves differently than the PHP native implementation. + */ +class CustomArrayObject implements \ArrayAccess, \IteratorAggregate, \Countable, \Serializable +{ + private $array; + + public function __construct(array $array = null) + { + $this->array = $array ?: array(); + } + + public function offsetExists($offset) + { + return array_key_exists($offset, $this->array); + } + + public function offsetGet($offset) + { + return $this->array[$offset]; + } + + public function offsetSet($offset, $value) + { + if (null === $offset) { + $this->array[] = $value; + } else { + $this->array[$offset] = $value; + } + } + + public function offsetUnset($offset) + { + unset($this->array[$offset]); + } + + public function getIterator() + { + return new \ArrayIterator($this->array); + } + + public function count() + { + return count($this->array); + } + + public function serialize() + { + return serialize($this->array); + } + + public function unserialize($serialized) + { + $this->array = (array) unserialize((string) $serialized); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/Entity.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/Entity.php new file mode 100644 index 0000000000000000000000000000000000000000..16ba8a718ec59d5522f0d5613222b964b3b51d3b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/Entity.php @@ -0,0 +1,144 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints as Assert; +use Symfony\Component\Validator\Context\ExecutionContextInterface; + +/** + * @Symfony\Component\Validator\Tests\Fixtures\ConstraintA + * @Assert\GroupSequence({"Foo", "Entity"}) + * @Assert\Callback({"Symfony\Component\Validator\Tests\Fixtures\CallbackClass", "callback"}) + */ +class Entity extends EntityParent implements EntityInterfaceB +{ + /** + * @Assert\NotNull + * @Assert\Range(min=3) + * @Assert\All({@Assert\NotNull, @Assert\Range(min=3)}), + * @Assert\All(constraints={@Assert\NotNull, @Assert\Range(min=3)}) + * @Assert\Collection(fields={ + * "foo" = {@Assert\NotNull, @Assert\Range(min=3)}, + * "bar" = @Assert\Range(min=5) + * }) + * @Assert\Choice(choices={"A", "B"}, message="Must be one of %choices%") + */ + public $firstName; + /** + * @Assert\Valid + */ + public $childA; + /** + * @Assert\Valid + */ + public $childB; + protected $lastName; + public $reference; + public $reference2; + private $internal; + public $data = 'Overridden data'; + public $initialized = false; + + public function __construct($internal = null) + { + $this->internal = $internal; + } + + public function getInternal() + { + return $this->internal.' from getter'; + } + + public function setLastName($lastName) + { + $this->lastName = $lastName; + } + + /** + * @Assert\NotNull + */ + public function getLastName() + { + return $this->lastName; + } + + public function getValid() + { + } + + /** + * @Assert\IsTrue + */ + public function isValid() + { + return 'valid'; + } + + /** + * @Assert\IsTrue + */ + public function hasPermissions() + { + return 'permissions'; + } + + public function getData() + { + return 'Overridden data'; + } + + /** + * @Assert\Callback(payload="foo") + */ + public function validateMe(ExecutionContextInterface $context) + { + } + + /** + * @Assert\Callback + */ + public static function validateMeStatic($object, ExecutionContextInterface $context) + { + } + + /** + * @return mixed + */ + public function getChildA() + { + return $this->childA; + } + + /** + * @param mixed $childA + */ + public function setChildA($childA) + { + $this->childA = $childA; + } + + /** + * @return mixed + */ + public function getChildB() + { + return $this->childB; + } + + /** + * @param mixed $childB + */ + public function setChildB($childB) + { + $this->childB = $childB; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterfaceA.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterfaceA.php new file mode 100644 index 0000000000000000000000000000000000000000..a0afcf8163110459161c4f6289cb1d410d836879 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterfaceA.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\Validator\Tests\Fixtures; + +interface EntityInterfaceA +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterfaceB.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterfaceB.php new file mode 100644 index 0000000000000000000000000000000000000000..93b389414fadfdd59d0307b29f3094b25f45e80a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterfaceB.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\Validator\Tests\Fixtures; + +interface EntityInterfaceB extends EntityParentInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityParent.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityParent.php new file mode 100644 index 0000000000000000000000000000000000000000..4674f8b35a2261cd3d58478b1f09d7c2a7227622 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityParent.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints\NotNull; + +class EntityParent implements EntityInterfaceA +{ + protected $firstName; + private $internal; + private $data = 'Data'; + + /** + * @NotNull + */ + protected $other; + + public function getData() + { + return 'Data'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityParentInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityParentInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..3aad6fec5f76eefa01ec154727ef19f7de99b6ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityParentInterface.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\Validator\Tests\Fixtures; + +interface EntityParentInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCar.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCar.php new file mode 100644 index 0000000000000000000000000000000000000000..38c82982b14366e3d126987c07fba8af2698affd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCar.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Constraints\Length; + +class EntityStaticCar extends EntityStaticVehicle +{ + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addPropertyConstraint('wheels', new Length(array('max' => 99))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCarTurbo.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCarTurbo.php new file mode 100644 index 0000000000000000000000000000000000000000..83f192e7bd00db684c5cecf105c2d4e5f642416e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticCarTurbo.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Constraints\Length; + +class EntityStaticCarTurbo extends EntityStaticCar +{ + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addPropertyConstraint('wheels', new Length(array('max' => 99))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticVehicle.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticVehicle.php new file mode 100644 index 0000000000000000000000000000000000000000..41e616b03f4335d0c63b60971c5a7552ca1fe4e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/EntityStaticVehicle.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Constraints\Length; + +class EntityStaticVehicle +{ + public $wheels; + + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addPropertyConstraint('wheels', new Length(array('max' => 99))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraint.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraint.php new file mode 100644 index 0000000000000000000000000000000000000000..03019fc37ca38e82978e85216ac5b54eb9dfeafa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraint.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +class FailingConstraint extends Constraint +{ + public $message = 'Failed'; + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraintValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraintValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..a019dd6f836c20fbf06c2a3ad12b620c91a3ef06 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraintValidator.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; + +class FailingConstraintValidator extends ConstraintValidator +{ + public function validate($value, Constraint $constraint) + { + $this->context->addViolation($constraint->message, array()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeClassMetadata.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeClassMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..8c76a21598c0aee2492151a6ef57ad98f61e9fd4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeClassMetadata.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Mapping\ClassMetadata; + +class FakeClassMetadata extends ClassMetadata +{ + public function addCustomPropertyMetadata($propertyName, $metadata) + { + if (!isset($this->members[$propertyName])) { + $this->members[$propertyName] = array(); + } + + $this->members[$propertyName][] = $metadata; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeMetadataFactory.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeMetadataFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..98aa57ce8024b137c56a0d6c5032fe2d83724387 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FakeMetadataFactory.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Exception\NoSuchMetadataException; +use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; +use Symfony\Component\Validator\MetadataInterface; + +class FakeMetadataFactory implements MetadataFactoryInterface +{ + protected $metadatas = array(); + + public function getMetadataFor($class) + { + $hash = null; + + if (is_object($class)) { + $hash = spl_object_hash($class); + $class = get_class($class); + } + + if (!is_string($class)) { + throw new NoSuchMetadataException(sprintf('No metadata for type %s', gettype($class))); + } + + if (!isset($this->metadatas[$class])) { + if (isset($this->metadatas[$hash])) { + return $this->metadatas[$hash]; + } + + throw new NoSuchMetadataException(sprintf('No metadata for "%s"', $class)); + } + + return $this->metadatas[$class]; + } + + public function hasMetadataFor($class) + { + $hash = null; + + if (is_object($class)) { + $hash = spl_object_hash($class); + $class = get_class($class); + } + + if (!is_string($class)) { + return false; + } + + return isset($this->metadatas[$class]) || isset($this->metadatas[$hash]); + } + + public function addMetadata($metadata) + { + $this->metadatas[$metadata->getClassName()] = $metadata; + } + + public function addMetadataForValue($value, MetadataInterface $metadata) + { + $key = is_object($value) ? spl_object_hash($value) : $value; + $this->metadatas[$key] = $metadata; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FilesLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FilesLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..a4d6a6ab474a8c44c149bcd6fca0ac823a707fbe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/FilesLoader.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Mapping\Loader\FilesLoader as BaseFilesLoader; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; + +abstract class FilesLoader extends BaseFilesLoader +{ + protected $timesCalled = 0; + protected $loader; + + public function __construct(array $paths, LoaderInterface $loader) + { + $this->loader = $loader; + parent::__construct($paths); + } + + protected function getFileLoaderInstance($file) + { + ++$this->timesCalled; + + return $this->loader; + } + + public function getTimesCalled() + { + return $this->timesCalled; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/GroupSequenceProviderEntity.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/GroupSequenceProviderEntity.php new file mode 100644 index 0000000000000000000000000000000000000000..2b0beaf9adf986ee2bea1073506b44693e9b6a11 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/GroupSequenceProviderEntity.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\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints as Assert; +use Symfony\Component\Validator\GroupSequenceProviderInterface; + +/** + * @Assert\GroupSequenceProvider + */ +class GroupSequenceProviderEntity implements GroupSequenceProviderInterface +{ + public $firstName; + public $lastName; + + protected $sequence = array(); + + public function __construct($sequence) + { + $this->sequence = $sequence; + } + + public function getGroupSequence() + { + return $this->sequence; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/InvalidConstraint.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/InvalidConstraint.php new file mode 100644 index 0000000000000000000000000000000000000000..6a9eaa797a874ce768287daf249944142bb98d91 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/InvalidConstraint.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +class InvalidConstraint extends Constraint +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/InvalidConstraintValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/InvalidConstraintValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..bd9a5cf6c32dce5147afb3bcee1a8a380be6bdbe --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/InvalidConstraintValidator.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\Validator\Tests\Fixtures; + +class InvalidConstraintValidator +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/PropertyConstraint.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/PropertyConstraint.php new file mode 100644 index 0000000000000000000000000000000000000000..fadb5358a6102ec1c912f654c33c2eca0e1a2b62 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/PropertyConstraint.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +class PropertyConstraint extends Constraint +{ + public function getTargets() + { + return self::PROPERTY_CONSTRAINT; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/Reference.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/Reference.php new file mode 100644 index 0000000000000000000000000000000000000000..af2973592437919d5be38b1f7e3931a57bf7f919 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Fixtures/Reference.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\Component\Validator\Tests\Fixtures; + +class Reference +{ + public $value; + + private $privateValue; + + public function setPrivateValue($privateValue) + { + $this->privateValue = $privateValue; + } + + public function getPrivateValue() + { + return $this->privateValue; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/AbstractCacheTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/AbstractCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6083f65e28b6ab7ff15e747f838d93e3502e80dd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/AbstractCacheTest.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Cache; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\Cache\CacheInterface; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +abstract class AbstractCacheTest extends TestCase +{ + /** + * @var CacheInterface + */ + protected $cache; + + public function testWrite() + { + $meta = $this->getMockBuilder(ClassMetadata::class) + ->disableOriginalConstructor() + ->setMethods(array('getClassName')) + ->getMock(); + + $meta->expects($this->once()) + ->method('getClassName') + ->will($this->returnValue('Foo\\Bar')); + + $this->cache->write($meta); + + $this->assertInstanceOf( + ClassMetadata::class, + $this->cache->read('Foo\\Bar'), + 'write() stores metadata' + ); + } + + public function testHas() + { + $meta = $this->getMockBuilder(ClassMetadata::class) + ->disableOriginalConstructor() + ->setMethods(array('getClassName')) + ->getMock(); + + $meta->expects($this->once()) + ->method('getClassName') + ->will($this->returnValue('Foo\\Bar')); + + $this->assertFalse($this->cache->has('Foo\\Bar'), 'has() returns false when there is no entry'); + + $this->cache->write($meta); + $this->assertTrue($this->cache->has('Foo\\Bar'), 'has() returns true when the is an entry'); + } + + public function testRead() + { + $meta = $this->getMockBuilder(ClassMetadata::class) + ->disableOriginalConstructor() + ->setMethods(array('getClassName')) + ->getMock(); + + $meta->expects($this->once()) + ->method('getClassName') + ->will($this->returnValue('Foo\\Bar')); + + $this->assertFalse($this->cache->read('Foo\\Bar'), 'read() returns false when there is no entry'); + + $this->cache->write($meta); + + $this->assertInstanceOf(ClassMetadata::class, $this->cache->read('Foo\\Bar'), 'read() returns metadata'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/DoctrineCacheTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/DoctrineCacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6296030fd7dff17ddf43dce308a6100792dc4fa9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/DoctrineCacheTest.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Cache; + +use Doctrine\Common\Cache\ArrayCache; +use Symfony\Component\Validator\Mapping\Cache\DoctrineCache; + +class DoctrineCacheTest extends AbstractCacheTest +{ + protected function setUp() + { + $this->cache = new DoctrineCache(new ArrayCache()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/Psr6CacheTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/Psr6CacheTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c11dddbf6ff9dbfb749c1905d4b48960cf85d030 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Cache/Psr6CacheTest.php @@ -0,0 +1,26 @@ + + */ +class Psr6CacheTest extends AbstractCacheTest +{ + protected function setUp() + { + $this->cache = new Psr6Cache(new ArrayAdapter()); + } + + public function testNameCollision() + { + $metadata = new ClassMetadata('Foo\\Bar'); + + $this->cache->write($metadata); + $this->assertFalse($this->cache->has('Foo_Bar')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8ca3c9fbcb606557904a13aec41d435d8ff54441 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php @@ -0,0 +1,317 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; +use Symfony\Component\Validator\Tests\Fixtures\PropertyConstraint; + +class ClassMetadataTest extends TestCase +{ + const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + const PARENTCLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent'; + const PROVIDERCLASS = 'Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'; + + protected $metadata; + + protected function setUp() + { + $this->metadata = new ClassMetadata(self::CLASSNAME); + } + + protected function tearDown() + { + $this->metadata = null; + } + + public function testAddConstraintDoesNotAcceptValid() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); + + $this->metadata->addConstraint(new Valid()); + } + + public function testAddConstraintRequiresClassConstraints() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); + + $this->metadata->addConstraint(new PropertyConstraint()); + } + + public function testAddPropertyConstraints() + { + $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); + $this->metadata->addPropertyConstraint('lastName', new ConstraintB()); + + $this->assertEquals(array('firstName', 'lastName'), $this->metadata->getConstrainedProperties()); + } + + public function testAddMultiplePropertyConstraints() + { + $this->metadata->addPropertyConstraints('lastName', array(new ConstraintA(), new ConstraintB())); + + $constraints = array( + new ConstraintA(array('groups' => array('Default', 'Entity'))), + new ConstraintB(array('groups' => array('Default', 'Entity'))), + ); + + $properties = $this->metadata->getPropertyMetadata('lastName'); + + $this->assertCount(1, $properties); + $this->assertEquals('lastName', $properties[0]->getName()); + $this->assertEquals($constraints, $properties[0]->getConstraints()); + } + + public function testAddGetterConstraints() + { + $this->metadata->addGetterConstraint('lastName', new ConstraintA()); + $this->metadata->addGetterConstraint('lastName', new ConstraintB()); + + $constraints = array( + new ConstraintA(array('groups' => array('Default', 'Entity'))), + new ConstraintB(array('groups' => array('Default', 'Entity'))), + ); + + $properties = $this->metadata->getPropertyMetadata('lastName'); + + $this->assertCount(1, $properties); + $this->assertEquals('getLastName', $properties[0]->getName()); + $this->assertEquals($constraints, $properties[0]->getConstraints()); + } + + public function testAddMultipleGetterConstraints() + { + $this->metadata->addGetterConstraints('lastName', array(new ConstraintA(), new ConstraintB())); + + $constraints = array( + new ConstraintA(array('groups' => array('Default', 'Entity'))), + new ConstraintB(array('groups' => array('Default', 'Entity'))), + ); + + $properties = $this->metadata->getPropertyMetadata('lastName'); + + $this->assertCount(1, $properties); + $this->assertEquals('getLastName', $properties[0]->getName()); + $this->assertEquals($constraints, $properties[0]->getConstraints()); + } + + public function testMergeConstraintsMergesClassConstraints() + { + $parent = new ClassMetadata(self::PARENTCLASS); + $parent->addConstraint(new ConstraintA()); + + $this->metadata->mergeConstraints($parent); + $this->metadata->addConstraint(new ConstraintA()); + + $constraints = array( + new ConstraintA(array('groups' => array( + 'Default', + 'EntityParent', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'Entity', + ))), + ); + + $this->assertEquals($constraints, $this->metadata->getConstraints()); + } + + public function testMergeConstraintsMergesMemberConstraints() + { + $parent = new ClassMetadata(self::PARENTCLASS); + $parent->addPropertyConstraint('firstName', new ConstraintA()); + $parent->addPropertyConstraint('firstName', new ConstraintB(array('groups' => 'foo'))); + + $this->metadata->mergeConstraints($parent); + $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); + + $constraintA1 = new ConstraintA(array('groups' => array( + 'Default', + 'EntityParent', + 'Entity', + ))); + $constraintA2 = new ConstraintA(array('groups' => array( + 'Default', + 'Entity', + ))); + $constraintB = new ConstraintB(array( + 'groups' => array('foo'), + )); + + $constraints = array( + $constraintA1, + $constraintB, + $constraintA2, + ); + + $constraintsByGroup = array( + 'Default' => array( + $constraintA1, + $constraintA2, + ), + 'EntityParent' => array( + $constraintA1, + ), + 'Entity' => array( + $constraintA1, + $constraintA2, + ), + 'foo' => array( + $constraintB, + ), + ); + + $members = $this->metadata->getPropertyMetadata('firstName'); + + $this->assertCount(1, $members); + $this->assertEquals(self::PARENTCLASS, $members[0]->getClassName()); + $this->assertEquals($constraints, $members[0]->getConstraints()); + $this->assertEquals($constraintsByGroup, $members[0]->constraintsByGroup); + } + + public function testMemberMetadatas() + { + $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); + + $this->assertTrue($this->metadata->hasPropertyMetadata('firstName')); + $this->assertFalse($this->metadata->hasPropertyMetadata('non_existent_field')); + } + + public function testMergeConstraintsKeepsPrivateMembersSeparate() + { + $parent = new ClassMetadata(self::PARENTCLASS); + $parent->addPropertyConstraint('internal', new ConstraintA()); + + $this->metadata->mergeConstraints($parent); + $this->metadata->addPropertyConstraint('internal', new ConstraintA()); + + $parentConstraints = array( + new ConstraintA(array('groups' => array( + 'Default', + 'EntityParent', + 'Entity', + ))), + ); + $constraints = array( + new ConstraintA(array('groups' => array( + 'Default', + 'Entity', + ))), + ); + + $members = $this->metadata->getPropertyMetadata('internal'); + + $this->assertCount(2, $members); + $this->assertEquals(self::PARENTCLASS, $members[0]->getClassName()); + $this->assertEquals($parentConstraints, $members[0]->getConstraints()); + $this->assertEquals(self::CLASSNAME, $members[1]->getClassName()); + $this->assertEquals($constraints, $members[1]->getConstraints()); + } + + public function testGetReflectionClass() + { + $reflClass = new \ReflectionClass(self::CLASSNAME); + + $this->assertEquals($reflClass, $this->metadata->getReflectionClass()); + } + + public function testSerialize() + { + $this->metadata->addConstraint(new ConstraintA(array('property1' => 'A'))); + $this->metadata->addConstraint(new ConstraintB(array('groups' => 'TestGroup'))); + $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); + $this->metadata->addGetterConstraint('lastName', new ConstraintB()); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } + + public function testGroupSequencesWorkIfContainingDefaultGroup() + { + $this->metadata->setGroupSequence(array('Foo', $this->metadata->getDefaultGroup())); + } + + public function testGroupSequencesFailIfNotContainingDefaultGroup() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\GroupDefinitionException'); + + $this->metadata->setGroupSequence(array('Foo', 'Bar')); + } + + public function testGroupSequencesFailIfContainingDefault() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\GroupDefinitionException'); + + $this->metadata->setGroupSequence(array('Foo', $this->metadata->getDefaultGroup(), Constraint::DEFAULT_GROUP)); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\GroupDefinitionException + */ + public function testGroupSequenceFailsIfGroupSequenceProviderIsSet() + { + $metadata = new ClassMetadata(self::PROVIDERCLASS); + $metadata->setGroupSequenceProvider(true); + $metadata->setGroupSequence(array('GroupSequenceProviderEntity', 'Foo')); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\GroupDefinitionException + */ + public function testGroupSequenceProviderFailsIfGroupSequenceIsSet() + { + $metadata = new ClassMetadata(self::PROVIDERCLASS); + $metadata->setGroupSequence(array('GroupSequenceProviderEntity', 'Foo')); + $metadata->setGroupSequenceProvider(true); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\GroupDefinitionException + */ + public function testGroupSequenceProviderFailsIfDomainClassIsInvalid() + { + $metadata = new ClassMetadata('stdClass'); + $metadata->setGroupSequenceProvider(true); + } + + public function testGroupSequenceProvider() + { + $metadata = new ClassMetadata(self::PROVIDERCLASS); + $metadata->setGroupSequenceProvider(true); + $this->assertTrue($metadata->isGroupSequenceProvider()); + } + + /** + * https://github.com/symfony/symfony/issues/11604. + */ + public function testGetPropertyMetadataReturnsEmptyArrayWithoutConfiguredMetadata() + { + $this->assertCount(0, $this->metadata->getPropertyMetadata('foo'), '->getPropertyMetadata() returns an empty collection if no metadata is configured for the given property'); + } +} + +class ParentClass +{ + public $example = 0; +} + +class ChildClass extends ParentClass +{ + public $example = 1; // overrides parent property of same name +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Factory/BlackHoleMetadataFactoryTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Factory/BlackHoleMetadataFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a323567d2316bf3ba293d286790ba9d19a3b8b7a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Factory/BlackHoleMetadataFactoryTest.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory; + +class BlackHoleMetadataFactoryTest extends TestCase +{ + /** + * @expectedException \LogicException + */ + public function testGetMetadataForThrowsALogicException() + { + $metadataFactory = new BlackHoleMetadataFactory(); + $metadataFactory->getMetadataFor('foo'); + } + + public function testHasMetadataForReturnsFalse() + { + $metadataFactory = new BlackHoleMetadataFactory(); + + $this->assertFalse($metadataFactory->hasMetadataFor('foo')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1ebce65cc2029c2595af69777426c319297513a7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php @@ -0,0 +1,199 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; + +class LazyLoadingMetadataFactoryTest extends TestCase +{ + const CLASS_NAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + const PARENT_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent'; + const INTERFACE_A_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceA'; + const INTERFACE_B_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceB'; + const PARENT_INTERFACE_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParentInterface'; + + public function testLoadClassMetadataWithInterface() + { + $factory = new LazyLoadingMetadataFactory(new TestLoader()); + $metadata = $factory->getMetadataFor(self::PARENT_CLASS); + + $constraints = array( + new ConstraintA(array('groups' => array('Default', 'EntityParent'))), + new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA', 'EntityParent'))), + ); + + $this->assertEquals($constraints, $metadata->getConstraints()); + } + + public function testMergeParentConstraints() + { + $factory = new LazyLoadingMetadataFactory(new TestLoader()); + $metadata = $factory->getMetadataFor(self::CLASS_NAME); + + $constraints = array( + new ConstraintA(array('groups' => array( + 'Default', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'EntityParent', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'EntityInterfaceA', + 'EntityParent', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'EntityInterfaceB', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'EntityParentInterface', + 'EntityInterfaceB', + 'Entity', + ))), + ); + + $this->assertEquals($constraints, $metadata->getConstraints()); + } + + public function testWriteMetadataToCache() + { + $cache = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock(); + $factory = new LazyLoadingMetadataFactory(new TestLoader(), $cache); + + $parentClassConstraints = array( + new ConstraintA(array('groups' => array('Default', 'EntityParent'))), + new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA', 'EntityParent'))), + ); + $interfaceAConstraints = array( + new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA'))), + ); + + $cache->expects($this->never()) + ->method('has'); + $cache->expects($this->exactly(2)) + ->method('read') + ->withConsecutive( + array($this->equalTo(self::PARENT_CLASS)), + array($this->equalTo(self::INTERFACE_A_CLASS)) + ) + ->will($this->returnValue(false)); + $cache->expects($this->exactly(2)) + ->method('write') + ->withConsecutive( + $this->callback(function ($metadata) use ($interfaceAConstraints) { + return $interfaceAConstraints == $metadata->getConstraints(); + }), + $this->callback(function ($metadata) use ($parentClassConstraints) { + return $parentClassConstraints == $metadata->getConstraints(); + }) + ); + + $metadata = $factory->getMetadataFor(self::PARENT_CLASS); + + $this->assertEquals(self::PARENT_CLASS, $metadata->getClassName()); + $this->assertEquals($parentClassConstraints, $metadata->getConstraints()); + } + + public function testReadMetadataFromCache() + { + $loader = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $cache = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock(); + $factory = new LazyLoadingMetadataFactory($loader, $cache); + + $metadata = new ClassMetadata(self::PARENT_CLASS); + $metadata->addConstraint(new ConstraintA()); + + $parentClass = self::PARENT_CLASS; + $interfaceClass = self::INTERFACE_A_CLASS; + + $loader->expects($this->never()) + ->method('loadClassMetadata'); + + $cache->expects($this->never()) + ->method('has'); + $cache->expects($this->exactly(2)) + ->method('read') + ->withConsecutive( + array(self::PARENT_CLASS), + array(self::INTERFACE_A_CLASS) + ) + ->willReturnCallback(function ($name) use ($metadata, $parentClass, $interfaceClass) { + if ($parentClass == $name) { + return $metadata; + } + + return new ClassMetadata($interfaceClass); + }); + + $this->assertEquals($metadata, $factory->getMetadataFor(self::PARENT_CLASS)); + } + + public function testMetadataCacheWithRuntimeConstraint() + { + $cache = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock(); + $factory = new LazyLoadingMetadataFactory(new TestLoader(), $cache); + + $cache + ->expects($this->any()) + ->method('write') + ->will($this->returnCallback(function ($metadata) { serialize($metadata); })) + ; + + $cache->expects($this->any()) + ->method('read') + ->will($this->returnValue(false)); + + $metadata = $factory->getMetadataFor(self::PARENT_CLASS); + $metadata->addConstraint(new Callback(function () {})); + + $metadata = $factory->getMetadataFor(self::CLASS_NAME); + } + + public function testGroupsFromParent() + { + $reader = new \Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader(); + $factory = new LazyLoadingMetadataFactory($reader); + $metadata = $factory->getMetadataFor('Symfony\Component\Validator\Tests\Fixtures\EntityStaticCarTurbo'); + $groups = array(); + + foreach ($metadata->getPropertyMetadata('wheels') as $propertyMetadata) { + $constraints = $propertyMetadata->getConstraints(); + $groups = array_replace($groups, $constraints[0]->groups); + } + + $this->assertCount(4, $groups); + $this->assertContains('Default', $groups); + $this->assertContains('EntityStaticCarTurbo', $groups); + $this->assertContains('EntityStaticCar', $groups); + $this->assertContains('EntityStaticVehicle', $groups); + } +} + +class TestLoader implements LoaderInterface +{ + public function loadClassMetadata(ClassMetadata $metadata) + { + $metadata->addConstraint(new ConstraintA()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/GetterMetadataTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/GetterMetadataTest.php new file mode 100644 index 0000000000000000000000000000000000000000..05aef47e84aaf8d89b65d114f65598a55aa494a0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/GetterMetadataTest.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\GetterMetadata; +use Symfony\Component\Validator\Tests\Fixtures\Entity; + +class GetterMetadataTest extends TestCase +{ + const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + + public function testInvalidPropertyName() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ValidatorException'); + + new GetterMetadata(self::CLASSNAME, 'foobar'); + } + + public function testGetPropertyValueFromPublicGetter() + { + // private getters don't work yet because ReflectionMethod::setAccessible() + // does not exist yet in a stable PHP release + + $entity = new Entity('foobar'); + $metadata = new GetterMetadata(self::CLASSNAME, 'internal'); + + $this->assertEquals('foobar from getter', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromOverriddenPublicGetter() + { + $entity = new Entity(); + $metadata = new GetterMetadata(self::CLASSNAME, 'data'); + + $this->assertEquals('Overridden data', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromIsser() + { + $entity = new Entity(); + $metadata = new GetterMetadata(self::CLASSNAME, 'valid', 'isValid'); + + $this->assertEquals('valid', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromHasser() + { + $entity = new Entity(); + $metadata = new GetterMetadata(self::CLASSNAME, 'permissions'); + + $this->assertEquals('permissions', $metadata->getPropertyValue($entity)); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ValidatorException + * @expectedExceptionMessage The hasLastName() method does not exist in class Symfony\Component\Validator\Tests\Fixtures\Entity. + */ + public function testUndefinedMethodNameThrowsException() + { + new GetterMetadata(self::CLASSNAME, 'lastName', 'hasLastName'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..d032f0e8caa3e4dd345a914249b6e65941ab1472 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use Symfony\Component\Validator\Mapping\ClassMetadata; + +abstract class AbstractStaticMethodLoader +{ + abstract public static function loadMetadata(ClassMetadata $metadata); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5765a838d13733f152070a5b8035a8c106cb4171 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderTest.php @@ -0,0 +1,169 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use Doctrine\Common\Annotations\AnnotationReader; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Choice; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Constraints\IsTrue; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; + +class AnnotationLoaderTest extends TestCase +{ + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $reader = new AnnotationReader(); + $loader = new AnnotationLoader($reader); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->assertTrue($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadataReturnsFalseIfNotSuccessful() + { + $loader = new AnnotationLoader(new AnnotationReader()); + $metadata = new ClassMetadata('\stdClass'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadata() + { + $loader = new AnnotationLoader(new AnnotationReader()); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->addConstraint(new ConstraintA()); + $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addConstraint(new Callback(array('callback' => 'validateMe', 'payload' => 'foo'))); + $expected->addConstraint(new Callback('validateMeStatic')); + $expected->addPropertyConstraint('firstName', new NotNull()); + $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); + $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); + $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); + $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( + 'foo' => array(new NotNull(), new Range(array('min' => 3))), + 'bar' => new Range(array('min' => 5)), + )))); + $expected->addPropertyConstraint('firstName', new Choice(array( + 'message' => 'Must be one of %choices%', + 'choices' => array('A', 'B'), + ))); + $expected->addPropertyConstraint('childA', new Valid()); + $expected->addPropertyConstraint('childB', new Valid()); + $expected->addGetterConstraint('lastName', new NotNull()); + $expected->addGetterMethodConstraint('valid', 'isValid', new IsTrue()); + $expected->addGetterConstraint('permissions', new IsTrue()); + + // load reflection class so that the comparison passes + $expected->getReflectionClass(); + + $this->assertEquals($expected, $metadata); + } + + /** + * Test MetaData merge with parent annotation. + */ + public function testLoadParentClassMetadata() + { + $loader = new AnnotationLoader(new AnnotationReader()); + + // Load Parent MetaData + $parent_metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\EntityParent'); + $loader->loadClassMetadata($parent_metadata); + + $expected_parent = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\EntityParent'); + $expected_parent->addPropertyConstraint('other', new NotNull()); + $expected_parent->getReflectionClass(); + + $this->assertEquals($expected_parent, $parent_metadata); + } + + /** + * Test MetaData merge with parent annotation. + */ + public function testLoadClassMetadataAndMerge() + { + $loader = new AnnotationLoader(new AnnotationReader()); + + // Load Parent MetaData + $parent_metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\EntityParent'); + $loader->loadClassMetadata($parent_metadata); + + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + // Merge parent metaData. + $metadata->mergeConstraints($parent_metadata); + + $loader->loadClassMetadata($metadata); + + $expected_parent = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\EntityParent'); + $expected_parent->addPropertyConstraint('other', new NotNull()); + $expected_parent->getReflectionClass(); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->mergeConstraints($expected_parent); + + $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->addConstraint(new ConstraintA()); + $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addConstraint(new Callback(array('callback' => 'validateMe', 'payload' => 'foo'))); + $expected->addConstraint(new Callback('validateMeStatic')); + $expected->addPropertyConstraint('firstName', new NotNull()); + $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); + $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); + $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); + $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( + 'foo' => array(new NotNull(), new Range(array('min' => 3))), + 'bar' => new Range(array('min' => 5)), + )))); + $expected->addPropertyConstraint('firstName', new Choice(array( + 'message' => 'Must be one of %choices%', + 'choices' => array('A', 'B'), + ))); + $expected->addPropertyConstraint('childA', new Valid()); + $expected->addPropertyConstraint('childB', new Valid()); + $expected->addGetterConstraint('lastName', new NotNull()); + $expected->addGetterMethodConstraint('valid', 'isValid', new IsTrue()); + $expected->addGetterConstraint('permissions', new IsTrue()); + + // load reflection class so that the comparison passes + $expected->getReflectionClass(); + + $this->assertEquals($expected, $metadata); + } + + public function testLoadGroupSequenceProviderAnnotation() + { + $loader = new AnnotationLoader(new AnnotationReader()); + + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + $expected->setGroupSequenceProvider(true); + $expected->getReflectionClass(); + + $this->assertEquals($expected, $metadata); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/FilesLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/FilesLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6fee7b6ff54071cde23685ac7fa2925bb50ac2d8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/FilesLoaderTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; + +class FilesLoaderTest extends TestCase +{ + public function testCallsGetFileLoaderInstanceForeachPath() + { + $loader = $this->getFilesLoader($this->getFileLoader()); + $this->assertEquals(4, $loader->getTimesCalled()); + } + + public function testCallsActualFileLoaderForMetadata() + { + $fileLoader = $this->getFileLoader(); + $fileLoader->expects($this->exactly(4)) + ->method('loadClassMetadata'); + $loader = $this->getFilesLoader($fileLoader); + $loader->loadClassMetadata(new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity')); + } + + public function getFilesLoader(LoaderInterface $loader) + { + return $this->getMockForAbstractClass('Symfony\Component\Validator\Tests\Fixtures\FilesLoader', array(array( + __DIR__.'/constraint-mapping.xml', + __DIR__.'/constraint-mapping.yaml', + __DIR__.'/constraint-mapping.test', + __DIR__.'/constraint-mapping.txt', + ), $loader)); + } + + public function getFileLoader() + { + return $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/LoaderChainTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/LoaderChainTest.php new file mode 100644 index 0000000000000000000000000000000000000000..49a8b5256d0b6fed6abebfbbaa58e6b8c2d002f7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/LoaderChainTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\LoaderChain; + +class LoaderChainTest extends TestCase +{ + public function testAllLoadersAreCalled() + { + $metadata = new ClassMetadata('\stdClass'); + + $loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader1->expects($this->once()) + ->method('loadClassMetadata') + ->with($this->equalTo($metadata)); + + $loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader2->expects($this->once()) + ->method('loadClassMetadata') + ->with($this->equalTo($metadata)); + + $chain = new LoaderChain(array( + $loader1, + $loader2, + )); + + $chain->loadClassMetadata($metadata); + } + + public function testReturnsTrueIfAnyLoaderReturnedTrue() + { + $metadata = new ClassMetadata('\stdClass'); + + $loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader1->expects($this->any()) + ->method('loadClassMetadata') + ->will($this->returnValue(true)); + + $loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader2->expects($this->any()) + ->method('loadClassMetadata') + ->will($this->returnValue(false)); + + $chain = new LoaderChain(array( + $loader1, + $loader2, + )); + + $this->assertTrue($chain->loadClassMetadata($metadata)); + } + + public function testReturnsFalseIfNoLoaderReturnedTrue() + { + $metadata = new ClassMetadata('\stdClass'); + + $loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader1->expects($this->any()) + ->method('loadClassMetadata') + ->will($this->returnValue(false)); + + $loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader2->expects($this->any()) + ->method('loadClassMetadata') + ->will($this->returnValue(false)); + + $chain = new LoaderChain(array( + $loader1, + $loader2, + )); + + $this->assertFalse($chain->loadClassMetadata($metadata)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..069ccd322929ea5a486f189c6c1ef9fb6dad436b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; + +class StaticMethodLoaderTest extends TestCase +{ + private $errorLevel; + + protected function setUp() + { + $this->errorLevel = error_reporting(); + } + + protected function tearDown() + { + error_reporting($this->errorLevel); + } + + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\StaticLoaderEntity'); + + $this->assertTrue($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadataReturnsFalseIfNotSuccessful() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata('\stdClass'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadata() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\StaticLoaderEntity'); + + $loader->loadClassMetadata($metadata); + + $this->assertEquals(StaticLoaderEntity::$invokedWith, $metadata); + } + + public function testLoadClassMetadataDoesNotRepeatLoadWithParentClasses() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\StaticLoaderDocument'); + $loader->loadClassMetadata($metadata); + $this->assertCount(0, $metadata->getConstraints()); + + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\BaseStaticLoaderDocument'); + $loader->loadClassMetadata($metadata); + $this->assertCount(1, $metadata->getConstraints()); + } + + public function testLoadClassMetadataIgnoresInterfaces() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\StaticLoaderInterface'); + + $loader->loadClassMetadata($metadata); + + $this->assertCount(0, $metadata->getConstraints()); + } + + public function testLoadClassMetadataInAbstractClasses() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\AbstractStaticLoader'); + + $loader->loadClassMetadata($metadata); + + $this->assertCount(1, $metadata->getConstraints()); + } + + public function testLoadClassMetadataIgnoresAbstractMethods() + { + // Disable error reporting, as AbstractStaticMethodLoader produces a + // strict standards error + error_reporting(0); + + $metadata = new ClassMetadata(__NAMESPACE__.'\AbstractStaticMethodLoader'); + + $loader = new StaticMethodLoader('loadMetadata'); + $loader->loadClassMetadata($metadata); + + $this->assertCount(0, $metadata->getConstraints()); + } +} + +interface StaticLoaderInterface +{ + public static function loadMetadata(ClassMetadata $metadata); +} + +abstract class AbstractStaticLoader +{ + public static function loadMetadata(ClassMetadata $metadata) + { + $metadata->addConstraint(new ConstraintA()); + } +} + +class StaticLoaderEntity +{ + public static $invokedWith = null; + + public static function loadMetadata(ClassMetadata $metadata) + { + self::$invokedWith = $metadata; + } +} + +class StaticLoaderDocument extends BaseStaticLoaderDocument +{ +} + +class BaseStaticLoaderDocument +{ + public static function loadMetadata(ClassMetadata $metadata) + { + $metadata->addConstraint(new ConstraintA()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..20dc80ed069b816e175c4f17996fa33233086836 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.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\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Choice; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Constraints\Regex; +use Symfony\Component\Validator\Constraints\IsTrue; +use Symfony\Component\Validator\Constraints\Traverse; +use Symfony\Component\Validator\Exception\MappingException; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\XmlFileLoader; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; + +class XmlFileLoaderTest extends TestCase +{ + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->assertTrue($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadataReturnsFalseIfNotSuccessful() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); + $metadata = new ClassMetadata('\stdClass'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadata() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->addConstraint(new ConstraintA()); + $expected->addConstraint(new ConstraintB()); + $expected->addConstraint(new Callback('validateMe')); + $expected->addConstraint(new Callback('validateMeStatic')); + $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addConstraint(new Traverse(false)); + $expected->addPropertyConstraint('firstName', new NotNull()); + $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); + $expected->addPropertyConstraint('firstName', new Choice(array('A', 'B'))); + $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); + $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); + $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( + 'foo' => array(new NotNull(), new Range(array('min' => 3))), + 'bar' => array(new Range(array('min' => 5))), + )))); + $expected->addPropertyConstraint('firstName', new Choice(array( + 'message' => 'Must be one of %choices%', + 'choices' => array('A', 'B'), + ))); + $expected->addGetterConstraint('lastName', new NotNull()); + $expected->addGetterConstraint('valid', new IsTrue()); + $expected->addGetterConstraint('permissions', new IsTrue()); + + $this->assertEquals($expected, $metadata); + } + + public function testLoadClassMetadataWithNonStrings() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping-non-strings.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->addPropertyConstraint('firstName', new Regex(array('pattern' => '/^1/', 'match' => false))); + + $properties = $metadata->getPropertyMetadata('firstName'); + $constraints = $properties[0]->getConstraints(); + + $this->assertFalse($constraints[0]->match); + } + + public function testLoadGroupSequenceProvider() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + $expected->setGroupSequenceProvider(true); + + $this->assertEquals($expected, $metadata); + } + + public function testThrowExceptionIfDocTypeIsSet() + { + $loader = new XmlFileLoader(__DIR__.'/withdoctype.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('\Symfony\Component\Validator\Exception\MappingException'); + $loader->loadClassMetadata($metadata); + } + + /** + * @see https://github.com/symfony/symfony/pull/12158 + */ + public function testDoNotModifyStateIfExceptionIsThrown() + { + $loader = new XmlFileLoader(__DIR__.'/withdoctype.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + try { + $loader->loadClassMetadata($metadata); + } catch (MappingException $e) { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('\Symfony\Component\Validator\Exception\MappingException'); + $loader->loadClassMetadata($metadata); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..671296e90ca0f5f85e41c3713f27c42fba94df9b --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Choice; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Constraints\IsTrue; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\YamlFileLoader; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; + +class YamlFileLoaderTest extends TestCase +{ + public function testLoadClassMetadataReturnsFalseIfEmpty() + { + $loader = new YamlFileLoader(__DIR__.'/empty-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + + $r = new \ReflectionProperty($loader, 'classes'); + $r->setAccessible(true); + $this->assertSame(array(), $r->getValue($loader)); + } + + /** + * @dataProvider provideInvalidYamlFiles + * @expectedException \InvalidArgumentException + */ + public function testInvalidYamlFiles($path) + { + $loader = new YamlFileLoader(__DIR__.'/'.$path); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + } + + public function provideInvalidYamlFiles() + { + return array( + array('nonvalid-mapping.yml'), + array('bad-format.yml'), + ); + } + + /** + * @see https://github.com/symfony/symfony/pull/12158 + */ + public function testDoNotModifyStateIfExceptionIsThrown() + { + $loader = new YamlFileLoader(__DIR__.'/nonvalid-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + try { + $loader->loadClassMetadata($metadata); + } catch (\InvalidArgumentException $e) { + // Call again. Again an exception should be thrown + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('\InvalidArgumentException'); + $loader->loadClassMetadata($metadata); + } + } + + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->assertTrue($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadataReturnsFalseIfNotSuccessful() + { + $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); + $metadata = new ClassMetadata('\stdClass'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadata() + { + $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->addConstraint(new ConstraintA()); + $expected->addConstraint(new ConstraintB()); + $expected->addConstraint(new Callback('validateMe')); + $expected->addConstraint(new Callback('validateMeStatic')); + $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addPropertyConstraint('firstName', new NotNull()); + $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); + $expected->addPropertyConstraint('firstName', new Choice(array('A', 'B'))); + $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); + $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); + $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( + 'foo' => array(new NotNull(), new Range(array('min' => 3))), + 'bar' => array(new Range(array('min' => 5))), + )))); + $expected->addPropertyConstraint('firstName', new Choice(array( + 'message' => 'Must be one of %choices%', + 'choices' => array('A', 'B'), + ))); + $expected->addGetterConstraint('lastName', new NotNull()); + $expected->addGetterConstraint('valid', new IsTrue()); + $expected->addGetterConstraint('permissions', new IsTrue()); + + $this->assertEquals($expected, $metadata); + } + + public function testLoadGroupSequenceProvider() + { + $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + $expected->setGroupSequenceProvider(true); + + $this->assertEquals($expected, $metadata); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/bad-format.yml b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/bad-format.yml new file mode 100644 index 0000000000000000000000000000000000000000..d2b4ad2654d36d2d5bd5d7150d182eaa4723b797 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/bad-format.yml @@ -0,0 +1,9 @@ +namespaces: + custom: Symfony\Component\Validator\Tests\Fixtures\ + +Symfony\Component\Validator\Tests\Fixtures\Entity: + constraints: + # Custom constraint + - Symfony\Component\Validator\Tests\Fixtures\ConstraintA: ~ + # Custom constraint with namespaces prefix + - "custom:ConstraintB": ~ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping-non-strings.xml b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping-non-strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..dfd5edddc5ecadbd147359734a7ffc79fdce87ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping-non-strings.xml @@ -0,0 +1,19 @@ + + + + + Symfony\Component\Validator\Tests\Fixtures\ + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping.xml b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping.xml new file mode 100644 index 0000000000000000000000000000000000000000..b1426cf4a90cd8bff5b35f89ae7799a68ae8e1e0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping.xml @@ -0,0 +1,124 @@ + + + + + Symfony\Component\Validator\Tests\Fixtures\ + + + + + Foo + Entity + + + + + + + + + + + + validateMe + + validateMeStatic + + + Symfony\Component\Validator\Tests\Fixtures\CallbackClass + callback + + + + + false + + + + + + + + + + + + + + + + + A + B + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping.yml b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping.yml new file mode 100644 index 0000000000000000000000000000000000000000..c39168c96cac033ddb23b8e04f935b8f8a52cc2e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping.yml @@ -0,0 +1,62 @@ +namespaces: + custom: Symfony\Component\Validator\Tests\Fixtures\ + +Symfony\Component\Validator\Tests\Fixtures\Entity: + group_sequence: + - Foo + - Entity + + constraints: + # Custom constraint + - Symfony\Component\Validator\Tests\Fixtures\ConstraintA: ~ + # Custom constraint with namespaces prefix + - "custom:ConstraintB": ~ + # Callbacks + - Callback: validateMe + - Callback: validateMeStatic + - Callback: [Symfony\Component\Validator\Tests\Fixtures\CallbackClass, callback] + + properties: + firstName: + # Constraint without value + - NotNull: ~ + # Constraint with single value + - Range: + min: 3 + # Constraint with multiple values + - Choice: [A, B] + # Constraint with child constraints + - All: + - NotNull: ~ + - Range: + min: 3 + # Option with child constraints + - All: + constraints: + - NotNull: ~ + - Range: + min: 3 + # Value with child constraints + - Collection: + fields: + foo: + - NotNull: ~ + - Range: + min: 3 + bar: + - Range: + min: 5 + # Constraint with options + - Choice: { choices: [A, B], message: Must be one of %choices% } + dummy: + + getters: + lastName: + - NotNull: ~ + valid: + - "IsTrue": ~ + permissions: + - "IsTrue": ~ + +Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity: + group_sequence_provider: true diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/empty-mapping.yml b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/empty-mapping.yml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/nonvalid-mapping.yml b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/nonvalid-mapping.yml new file mode 100644 index 0000000000000000000000000000000000000000..257cc5642cb1a054f08cc83f2d943e56fd3ebe99 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/nonvalid-mapping.yml @@ -0,0 +1 @@ +foo diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/withdoctype.xml b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/withdoctype.xml new file mode 100644 index 0000000000000000000000000000000000000000..0beacc32cdac59cff5f34651410e6b87d2b546e2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/withdoctype.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php new file mode 100644 index 0000000000000000000000000000000000000000..593f90faa66b60a4db2b8ba5c2d07088c3999575 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Mapping\MemberMetadata; +use Symfony\Component\Validator\Tests\Fixtures\ClassConstraint; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; + +class MemberMetadataTest extends TestCase +{ + protected $metadata; + + protected function setUp() + { + $this->metadata = new TestMemberMetadata( + 'Symfony\Component\Validator\Tests\Fixtures\Entity', + 'getLastName', + 'lastName' + ); + } + + protected function tearDown() + { + $this->metadata = null; + } + + public function testAddConstraintRequiresClassConstraints() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); + + $this->metadata->addConstraint(new ClassConstraint()); + } + + public function testSerialize() + { + $this->metadata->addConstraint(new ConstraintA(array('property1' => 'A'))); + $this->metadata->addConstraint(new ConstraintB(array('groups' => 'TestGroup'))); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } + + public function testSerializeCollectionCascaded() + { + $this->metadata->addConstraint(new Valid(array('traverse' => true))); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } + + public function testSerializeCollectionNotCascaded() + { + $this->metadata->addConstraint(new Valid(array('traverse' => false))); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } +} + +class TestMemberMetadata extends MemberMetadata +{ + public function getPropertyValue($object) + { + } + + protected function newReflectionMember($object) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/PropertyMetadataTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/PropertyMetadataTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9fea435dff27997f5c4f48b157cddbc1de8bffa5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/PropertyMetadataTest.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\PropertyMetadata; +use Symfony\Component\Validator\Tests\Fixtures\Entity; + +class PropertyMetadataTest extends TestCase +{ + const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + const PARENTCLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent'; + + public function testInvalidPropertyName() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ValidatorException'); + + new PropertyMetadata(self::CLASSNAME, 'foobar'); + } + + public function testGetPropertyValueFromPrivateProperty() + { + $entity = new Entity('foobar'); + $metadata = new PropertyMetadata(self::CLASSNAME, 'internal'); + + $this->assertEquals('foobar', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromOverriddenPrivateProperty() + { + $entity = new Entity('foobar'); + $metadata = new PropertyMetadata(self::PARENTCLASS, 'data'); + + $this->assertTrue($metadata->isPublic($entity)); + $this->assertEquals('Overridden data', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromRemovedProperty() + { + $entity = new Entity('foobar'); + $metadata = new PropertyMetadata(self::CLASSNAME, 'internal'); + $metadata->name = 'test'; + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ValidatorException'); + $metadata->getPropertyValue($entity); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Resources/TranslationFilesTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Resources/TranslationFilesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d33351352777ccf44c4b385a3fa4fc2eb78d864e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Resources/TranslationFilesTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Resources; + +use PHPUnit\Framework\TestCase; + +class TranslationFilesTest extends TestCase +{ + /** + * @dataProvider provideTranslationFiles + */ + public function testTranslationFileIsValid($filePath) + { + if (class_exists('PHPUnit_Util_XML')) { + \PHPUnit_Util_XML::loadfile($filePath, false, false, true); + } else { + \PHPUnit\Util\XML::loadfile($filePath, false, false, true); + } + } + + public function provideTranslationFiles() + { + return array_map( + function ($filePath) { return (array) $filePath; }, + glob(dirname(dirname(__DIR__)).'/Resources/translations/*.xlf') + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php new file mode 100644 index 0000000000000000000000000000000000000000..235e1780d907825bbb03ca0b580b54b5ff82f998 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Util\PropertyPath; + +class PropertyPathTest extends TestCase +{ + /** + * @dataProvider provideAppendPaths + */ + public function testAppend($basePath, $subPath, $expectedPath, $message) + { + $this->assertSame($expectedPath, PropertyPath::append($basePath, $subPath), $message); + } + + public function provideAppendPaths() + { + return array( + array('foo', '', 'foo', 'It returns the basePath if subPath is empty'), + array('', 'bar', 'bar', 'It returns the subPath if basePath is empty'), + array('foo', 'bar', 'foo.bar', 'It append the subPath to the basePath'), + array('foo', '[bar]', 'foo[bar]', 'It does not include the dot separator if subPath uses the array notation'), + array('0', 'bar', '0.bar', 'Leading zeros are kept.'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php new file mode 100644 index 0000000000000000000000000000000000000000..77a7cc6c2bdc6815d8208ac32aabc9b00278301d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php @@ -0,0 +1,673 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Validator; + +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Traverse; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\ConstraintViolationInterface; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; +use Symfony\Component\Validator\Tests\Fixtures\Entity; +use Symfony\Component\Validator\Tests\Fixtures\FailingConstraint; +use Symfony\Component\Validator\Tests\Fixtures\Reference; +use Symfony\Component\Validator\Validator\ValidatorInterface; + +/** + * @author Bernhard Schussek + */ +abstract class AbstractTest extends AbstractValidatorTest +{ + /** + * @var ValidatorInterface + */ + protected $validator; + + /** + * @param MetadataFactoryInterface $metadataFactory + * @param array $objectInitializers + * + * @return ValidatorInterface + */ + abstract protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()); + + protected function setUp() + { + parent::setUp(); + + $this->validator = $this->createValidator($this->metadataFactory); + } + + protected function validate($value, $constraints = null, $groups = null) + { + return $this->validator->validate($value, $constraints, $groups); + } + + protected function validateProperty($object, $propertyName, $groups = null) + { + return $this->validator->validateProperty($object, $propertyName, $groups); + } + + protected function validatePropertyValue($object, $propertyName, $value, $groups = null) + { + return $this->validator->validatePropertyValue($object, $propertyName, $value, $groups); + } + + public function testValidateConstraintWithoutGroup() + { + $violations = $this->validator->validate(null, new NotNull()); + + $this->assertCount(1, $violations); + } + + public function testValidateWithEmptyArrayAsConstraint() + { + $violations = $this->validator->validate('value', array()); + $this->assertCount(0, $violations); + } + + public function testGroupSequenceAbortsAfterFailedGroup() + { + $entity = new Entity(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message 1'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message 2'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => function () {}, + 'groups' => 'Group 1', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group 2', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 3', + ))); + + $sequence = new GroupSequence(array('Group 1', 'Group 2', 'Group 3')); + $violations = $this->validator->validate($entity, new Valid(), $sequence); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message 1', $violations[0]->getMessage()); + } + + public function testGroupSequenceIncludesReferences() + { + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Reference violation 1'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Reference violation 2'); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group 1', + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 2', + ))); + + $sequence = new GroupSequence(array('Group 1', 'Entity')); + $violations = $this->validator->validate($entity, new Valid(), $sequence); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Reference violation 1', $violations[0]->getMessage()); + } + + public function testValidateInSeparateContext() + { + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback1 = function ($value, ExecutionContextInterface $context) use ($entity) { + $violations = $context + ->getValidator() + // Since the validator is not context aware, the group must + // be passed explicitly + ->validate($value->reference, new Valid(), 'Group') + ; + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('', $violations[0]->getPropertyPath()); + + // The root is different as we're in a new context + $this->assertSame($entity->reference, $violations[0]->getRoot()); + $this->assertSame($entity->reference, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + + // Verify that this method is called + $context->addViolation('Separate violation'); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) use ($entity) { + $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->referenceMetadata, $context->getMetadata()); + $this->assertSame($entity->reference, $context->getRoot()); + $this->assertSame($entity->reference, $context->getValue()); + $this->assertSame($entity->reference, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validator->validate($entity, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Separate violation', $violations[0]->getMessage()); + } + + public function testValidateInContext() + { + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $previousValue = $context->getValue(); + $previousObject = $context->getObject(); + $previousMetadata = $context->getMetadata(); + $previousPath = $context->getPropertyPath(); + $previousGroup = $context->getGroup(); + + $context + ->getValidator() + ->inContext($context) + ->atPath('subpath') + ->validate($value->reference) + ; + + // context changes shouldn't leak out of the validate() call + $this->assertSame($previousValue, $context->getValue()); + $this->assertSame($previousObject, $context->getObject()); + $this->assertSame($previousMetadata, $context->getMetadata()); + $this->assertSame($previousPath, $context->getPropertyPath()); + $this->assertSame($previousGroup, $context->getGroup()); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) use ($entity) { + $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('subpath', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->referenceMetadata, $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame($entity->reference, $context->getValue()); + $this->assertSame($entity->reference, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validator->validate($entity, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('subpath', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testValidateArrayInContext() + { + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $previousValue = $context->getValue(); + $previousObject = $context->getObject(); + $previousMetadata = $context->getMetadata(); + $previousPath = $context->getPropertyPath(); + $previousGroup = $context->getGroup(); + + $context + ->getValidator() + ->inContext($context) + ->atPath('subpath') + ->validate(array('key' => $value->reference)) + ; + + // context changes shouldn't leak out of the validate() call + $this->assertSame($previousValue, $context->getValue()); + $this->assertSame($previousObject, $context->getObject()); + $this->assertSame($previousMetadata, $context->getMetadata()); + $this->assertSame($previousPath, $context->getPropertyPath()); + $this->assertSame($previousGroup, $context->getGroup()); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) use ($entity) { + $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('subpath[key]', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->referenceMetadata, $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame($entity->reference, $context->getValue()); + $this->assertSame($entity->reference, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validator->validate($entity, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('subpath[key]', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testTraverseTraversableByDefault() + { + $entity = new Entity(); + $traversable = new \ArrayIterator(array('key' => $entity)); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity, $traversable) { + $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('[key]', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->metadata, $context->getMetadata()); + $this->assertSame($traversable, $context->getRoot()); + $this->assertSame($entity, $context->getValue()); + $this->assertSame($entity, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadataFactory->addMetadata(new ClassMetadata('ArrayIterator')); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($traversable, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('[key]', $violations[0]->getPropertyPath()); + $this->assertSame($traversable, $violations[0]->getRoot()); + $this->assertSame($entity, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testTraversalEnabledOnClass() + { + $entity = new Entity(); + $traversable = new \ArrayIterator(array('key' => $entity)); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $traversableMetadata = new ClassMetadata('ArrayIterator'); + $traversableMetadata->addConstraint(new Traverse(true)); + + $this->metadataFactory->addMetadata($traversableMetadata); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($traversable, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + public function testTraversalDisabledOnClass() + { + $entity = new Entity(); + $traversable = new \ArrayIterator(array('key' => $entity)); + + $callback = function ($value, ExecutionContextInterface $context) { + $this->fail('Should not be called'); + }; + + $traversableMetadata = new ClassMetadata('ArrayIterator'); + $traversableMetadata->addConstraint(new Traverse(false)); + + $this->metadataFactory->addMetadata($traversableMetadata); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($traversable, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testExpectTraversableIfTraversalEnabledOnClass() + { + $entity = new Entity(); + + $this->metadata->addConstraint(new Traverse(true)); + + $this->validator->validate($entity); + } + + public function testReferenceTraversalDisabledOnClass() + { + $entity = new Entity(); + $entity->reference = new \ArrayIterator(array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) { + $this->fail('Should not be called'); + }; + + $traversableMetadata = new ClassMetadata('ArrayIterator'); + $traversableMetadata->addConstraint(new Traverse(false)); + + $this->metadataFactory->addMetadata($traversableMetadata); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + $this->metadata->addPropertyConstraint('reference', new Valid()); + + $violations = $this->validate($entity, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + public function testReferenceTraversalEnabledOnReferenceDisabledOnClass() + { + $entity = new Entity(); + $entity->reference = new \ArrayIterator(array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) { + $this->fail('Should not be called'); + }; + + $traversableMetadata = new ClassMetadata('ArrayIterator'); + $traversableMetadata->addConstraint(new Traverse(false)); + + $this->metadataFactory->addMetadata($traversableMetadata); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => true, + ))); + + $violations = $this->validate($entity, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + public function testReferenceTraversalDisabledOnReferenceEnabledOnClass() + { + $entity = new Entity(); + $entity->reference = new \ArrayIterator(array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) { + $this->fail('Should not be called'); + }; + + $traversableMetadata = new ClassMetadata('ArrayIterator'); + $traversableMetadata->addConstraint(new Traverse(true)); + + $this->metadataFactory->addMetadata($traversableMetadata); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => false, + ))); + + $violations = $this->validate($entity, new Valid(), 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + public function testAddCustomizedViolation() + { + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->buildViolation('Message %param%') + ->setParameter('%param%', 'value') + ->setInvalidValue('Invalid value') + ->setPlural(2) + ->setCode(42) + ->addViolation(); + }; + + $this->metadata->addConstraint(new Callback($callback)); + + $violations = $this->validator->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Invalid value', $violations[0]->getInvalidValue()); + $this->assertSame(2, $violations[0]->getPlural()); + $this->assertSame(42, $violations[0]->getCode()); + } + + public function testNoDuplicateValidationIfClassConstraintInMultipleGroups() + { + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => array('Group 1', 'Group 2'), + ))); + + $violations = $this->validator->validate($entity, new Valid(), array('Group 1', 'Group 2')); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + public function testNoDuplicateValidationIfPropertyConstraintInMultipleGroups() + { + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $this->metadata->addPropertyConstraint('firstName', new Callback(array( + 'callback' => $callback, + 'groups' => array('Group 1', 'Group 2'), + ))); + + $violations = $this->validator->validate($entity, new Valid(), array('Group 1', 'Group 2')); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\RuntimeException + */ + public function testValidateFailsIfNoConstraintsAndNoObjectOrArray() + { + $this->validate('Foobar'); + } + + public function testAccessCurrentObject() + { + $called = false; + $entity = new Entity(); + $entity->firstName = 'Bernhard'; + + $callback = function ($value, ExecutionContextInterface $context) use ($entity, &$called) { + $called = true; + $this->assertSame($entity, $context->getObject()); + }; + + $this->metadata->addConstraint(new Callback($callback)); + $this->metadata->addPropertyConstraint('firstName', new Callback($callback)); + + $this->validator->validate($entity); + + $this->assertTrue($called); + } + + public function testInitializeObjectsOnFirstValidation() + { + $entity = new Entity(); + $entity->initialized = false; + + // prepare initializers that set "initialized" to true + $initializer1 = $this->getMockBuilder('Symfony\\Component\\Validator\\ObjectInitializerInterface')->getMock(); + $initializer2 = $this->getMockBuilder('Symfony\\Component\\Validator\\ObjectInitializerInterface')->getMock(); + + $initializer1->expects($this->once()) + ->method('initialize') + ->with($entity) + ->will($this->returnCallback(function ($object) { + $object->initialized = true; + })); + + $initializer2->expects($this->once()) + ->method('initialize') + ->with($entity); + + $this->validator = $this->createValidator($this->metadataFactory, array( + $initializer1, + $initializer2, + )); + + // prepare constraint which + // * checks that "initialized" is set to true + // * validates the object again + $callback = function ($object, ExecutionContextInterface $context) { + $this->assertTrue($object->initialized); + + // validate again in same group + $validator = $context->getValidator()->inContext($context); + + $validator->validate($object); + + // validate again in other group + $validator->validate($object, null, 'SomeGroup'); + }; + + $this->metadata->addConstraint(new Callback($callback)); + + $this->validate($entity); + + $this->assertTrue($entity->initialized); + } + + public function testPassConstraintToViolation() + { + $constraint = new FailingConstraint(); + $violations = $this->validate('Foobar', $constraint); + + $this->assertCount(1, $violations); + $this->assertSame($constraint, $violations[0]->getConstraint()); + } + + public function testCollectionConstraitViolationHasCorrectContext() + { + $data = array( + 'foo' => 'fooValue', + ); + + // Missing field must not be the first in the collection validation + $constraint = new Collection(array( + 'foo' => new NotNull(), + 'bar' => new NotNull(), + )); + + $violations = $this->validate($data, $constraint); + + $this->assertCount(1, $violations); + $this->assertSame($constraint, $violations[0]->getConstraint()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..360d84f98516704d781d2c66d7102a10a3a09a88 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php @@ -0,0 +1,1232 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Validator; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\ConstraintViolationInterface; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Tests\Fixtures\Entity; +use Symfony\Component\Validator\Tests\Fixtures\FakeMetadataFactory; +use Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity; +use Symfony\Component\Validator\Tests\Fixtures\Reference; + +/** + * @author Bernhard Schussek + */ +abstract class AbstractValidatorTest extends TestCase +{ + const ENTITY_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + + const REFERENCE_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\Reference'; + + /** + * @var FakeMetadataFactory + */ + public $metadataFactory; + + /** + * @var ClassMetadata + */ + public $metadata; + + /** + * @var ClassMetadata + */ + public $referenceMetadata; + + protected function setUp() + { + $this->metadataFactory = new FakeMetadataFactory(); + $this->metadata = new ClassMetadata(self::ENTITY_CLASS); + $this->referenceMetadata = new ClassMetadata(self::REFERENCE_CLASS); + $this->metadataFactory->addMetadata($this->metadata); + $this->metadataFactory->addMetadata($this->referenceMetadata); + } + + protected function tearDown() + { + $this->metadataFactory = null; + $this->metadata = null; + $this->referenceMetadata = null; + } + + abstract protected function validate($value, $constraints = null, $groups = null); + + abstract protected function validateProperty($object, $propertyName, $groups = null); + + abstract protected function validatePropertyValue($object, $propertyName, $value, $groups = null); + + public function testValidate() + { + $callback = function ($value, ExecutionContextInterface $context) { + $this->assertNull($context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame('Bernhard', $context->getRoot()); + $this->assertSame('Bernhard', $context->getValue()); + $this->assertSame('Bernhard', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $constraint = new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + )); + + $violations = $this->validate('Bernhard', $constraint, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('', $violations[0]->getPropertyPath()); + $this->assertSame('Bernhard', $violations[0]->getRoot()); + $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testClassConstraint() + { + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity) { + $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->metadata, $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame($entity, $context->getValue()); + $this->assertSame($entity, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testPropertyConstraint() + { + $entity = new Entity(); + $entity->firstName = 'Bernhard'; + + $callback = function ($value, ExecutionContextInterface $context) use ($entity) { + $propertyMetadatas = $this->metadata->getPropertyMetadata('firstName'); + + $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); + $this->assertSame('firstName', $context->getPropertyName()); + $this->assertSame('firstName', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($propertyMetadatas[0], $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame('Bernhard', $context->getValue()); + $this->assertSame('Bernhard', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('firstName', new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('firstName', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testGetterConstraint() + { + $entity = new Entity(); + $entity->setLastName('Schussek'); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity) { + $propertyMetadatas = $this->metadata->getPropertyMetadata('lastName'); + + $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); + $this->assertSame('lastName', $context->getPropertyName()); + $this->assertSame('lastName', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($propertyMetadatas[0], $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame('Schussek', $context->getValue()); + $this->assertSame('Schussek', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addGetterConstraint('lastName', new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('lastName', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Schussek', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testArray() + { + $entity = new Entity(); + $array = array('key' => $entity); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity, $array) { + $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('[key]', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->metadata, $context->getMetadata()); + $this->assertSame($array, $context->getRoot()); + $this->assertSame($entity, $context->getValue()); + $this->assertSame($entity, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($array, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('[key]', $violations[0]->getPropertyPath()); + $this->assertSame($array, $violations[0]->getRoot()); + $this->assertSame($entity, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testRecursiveArray() + { + $entity = new Entity(); + $array = array(2 => array('key' => $entity)); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity, $array) { + $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('[2][key]', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->metadata, $context->getMetadata()); + $this->assertSame($array, $context->getRoot()); + $this->assertSame($entity, $context->getValue()); + $this->assertSame($entity, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($array, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('[2][key]', $violations[0]->getPropertyPath()); + $this->assertSame($array, $violations[0]->getRoot()); + $this->assertSame($entity, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testTraversable() + { + $entity = new Entity(); + $traversable = new \ArrayIterator(array('key' => $entity)); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity, $traversable) { + $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('[key]', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->metadata, $context->getMetadata()); + $this->assertSame($traversable, $context->getRoot()); + $this->assertSame($entity, $context->getValue()); + $this->assertSame($entity, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($traversable, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('[key]', $violations[0]->getPropertyPath()); + $this->assertSame($traversable, $violations[0]->getRoot()); + $this->assertSame($entity, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testRecursiveTraversable() + { + $entity = new Entity(); + $traversable = new \ArrayIterator(array( + 2 => new \ArrayIterator(array('key' => $entity)), + )); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity, $traversable) { + $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('[2][key]', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->metadata, $context->getMetadata()); + $this->assertSame($traversable, $context->getRoot()); + $this->assertSame($entity, $context->getValue()); + $this->assertSame($entity, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($traversable, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('[2][key]', $violations[0]->getPropertyPath()); + $this->assertSame($traversable, $violations[0]->getRoot()); + $this->assertSame($entity, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testReferenceClassConstraint() + { + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity) { + $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('reference', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->referenceMetadata, $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame($entity->reference, $context->getValue()); + $this->assertSame($entity->reference, $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference, $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testReferencePropertyConstraint() + { + $entity = new Entity(); + $entity->reference = new Reference(); + $entity->reference->value = 'Foobar'; + + $callback = function ($value, ExecutionContextInterface $context) use ($entity) { + $propertyMetadatas = $this->referenceMetadata->getPropertyMetadata('value'); + + $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); + $this->assertSame('value', $context->getPropertyName()); + $this->assertSame('reference.value', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($propertyMetadatas[0], $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame('Foobar', $context->getValue()); + $this->assertSame('Foobar', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addPropertyConstraint('value', new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference.value', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Foobar', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testReferenceGetterConstraint() + { + $entity = new Entity(); + $entity->reference = new Reference(); + $entity->reference->setPrivateValue('Bamboo'); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity) { + $propertyMetadatas = $this->referenceMetadata->getPropertyMetadata('privateValue'); + + $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); + $this->assertSame('privateValue', $context->getPropertyName()); + $this->assertSame('reference.privateValue', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($propertyMetadatas[0], $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame('Bamboo', $context->getValue()); + $this->assertSame('Bamboo', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addPropertyConstraint('privateValue', new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference.privateValue', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Bamboo', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testsIgnoreNullReference() + { + $entity = new Entity(); + $entity->reference = null; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\NoSuchMetadataException + */ + public function testFailOnScalarReferences() + { + $entity = new Entity(); + $entity->reference = 'string'; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + + $this->validate($entity); + } + + public function testArrayReference() + { + $entity = new Entity(); + $entity->reference = array('key' => new Reference()); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity) { + $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('reference[key]', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->referenceMetadata, $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame($entity->reference['key'], $context->getValue()); + $this->assertSame($entity->reference['key'], $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference[key]', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference['key'], $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + // https://github.com/symfony/symfony/issues/6246 + public function testRecursiveArrayReference() + { + $entity = new Entity(); + $entity->reference = array(2 => array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity) { + $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('reference[2][key]', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->referenceMetadata, $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame($entity->reference[2]['key'], $context->getValue()); + $this->assertSame($entity->reference[2]['key'], $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference[2][key]', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference[2]['key'], $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testArrayTraversalCannotBeDisabled() + { + $entity = new Entity(); + $entity->reference = array('key' => new Reference()); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => false, + ))); + $this->referenceMetadata->addConstraint(new Callback($callback)); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + public function testRecursiveArrayTraversalCannotBeDisabled() + { + $entity = new Entity(); + $entity->reference = array(2 => array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => false, + ))); + $this->referenceMetadata->addConstraint(new Callback($callback)); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + public function testIgnoreScalarsDuringArrayTraversal() + { + $entity = new Entity(); + $entity->reference = array('string', 1234); + + $this->metadata->addPropertyConstraint('reference', new Valid()); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + public function testIgnoreNullDuringArrayTraversal() + { + $entity = new Entity(); + $entity->reference = array(null); + + $this->metadata->addPropertyConstraint('reference', new Valid()); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + public function testTraversableReference() + { + $entity = new Entity(); + $entity->reference = new \ArrayIterator(array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity) { + $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('reference[key]', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->referenceMetadata, $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame($entity->reference['key'], $context->getValue()); + $this->assertSame($entity->reference['key'], $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference[key]', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference['key'], $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testDisableTraversableTraversal() + { + $entity = new Entity(); + $entity->reference = new \ArrayIterator(array('key' => new Reference())); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadataFactory->addMetadata(new ClassMetadata('ArrayIterator')); + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => false, + ))); + $this->referenceMetadata->addConstraint(new Callback($callback)); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(0, $violations); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\NoSuchMetadataException + */ + public function testMetadataMustExistIfTraversalIsDisabled() + { + $entity = new Entity(); + $entity->reference = new \ArrayIterator(); + + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => false, + ))); + + $this->validate($entity); + } + + public function testEnableRecursiveTraversableTraversal() + { + $entity = new Entity(); + $entity->reference = new \ArrayIterator(array( + 2 => new \ArrayIterator(array('key' => new Reference())), + )); + + $callback = function ($value, ExecutionContextInterface $context) use ($entity) { + $this->assertSame($this::REFERENCE_CLASS, $context->getClassName()); + $this->assertNull($context->getPropertyName()); + $this->assertSame('reference[2][key]', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($this->referenceMetadata, $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame($entity->reference[2]['key'], $context->getValue()); + $this->assertSame($entity->reference[2]['key'], $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid(array( + 'traverse' => true, + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group', + ))); + + $violations = $this->validate($entity, null, 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('reference[2][key]', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame($entity->reference[2]['key'], $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testValidateProperty() + { + $entity = new Entity(); + $entity->firstName = 'Bernhard'; + $entity->setLastName('Schussek'); + + $callback1 = function ($value, ExecutionContextInterface $context) use ($entity) { + $propertyMetadatas = $this->metadata->getPropertyMetadata('firstName'); + + $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); + $this->assertSame('firstName', $context->getPropertyName()); + $this->assertSame('firstName', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($propertyMetadatas[0], $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame('Bernhard', $context->getValue()); + $this->assertSame('Bernhard', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Other violation'); + }; + + $this->metadata->addPropertyConstraint('firstName', new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->metadata->addPropertyConstraint('lastName', new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validateProperty($entity, 'firstName', 'Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('firstName', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + /** + * https://github.com/symfony/symfony/issues/11604. + */ + public function testValidatePropertyWithoutConstraints() + { + $entity = new Entity(); + $violations = $this->validateProperty($entity, 'lastName'); + + $this->assertCount(0, $violations, '->validateProperty() returns no violations if no constraints have been configured for the property being validated'); + } + + public function testValidatePropertyValue() + { + $entity = new Entity(); + $entity->setLastName('Schussek'); + + $callback1 = function ($value, ExecutionContextInterface $context) use ($entity) { + $propertyMetadatas = $this->metadata->getPropertyMetadata('firstName'); + + $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); + $this->assertSame('firstName', $context->getPropertyName()); + $this->assertSame('firstName', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($propertyMetadatas[0], $context->getMetadata()); + $this->assertSame($entity, $context->getRoot()); + $this->assertSame('Bernhard', $context->getValue()); + $this->assertSame('Bernhard', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Other violation'); + }; + + $this->metadata->addPropertyConstraint('firstName', new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->metadata->addPropertyConstraint('lastName', new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validatePropertyValue( + $entity, + 'firstName', + 'Bernhard', + 'Group' + ); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('firstName', $violations[0]->getPropertyPath()); + $this->assertSame($entity, $violations[0]->getRoot()); + $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + public function testValidatePropertyValueWithClassName() + { + $callback1 = function ($value, ExecutionContextInterface $context) { + $propertyMetadatas = $this->metadata->getPropertyMetadata('firstName'); + + $this->assertSame($this::ENTITY_CLASS, $context->getClassName()); + $this->assertSame('firstName', $context->getPropertyName()); + $this->assertSame('', $context->getPropertyPath()); + $this->assertSame('Group', $context->getGroup()); + $this->assertSame($propertyMetadatas[0], $context->getMetadata()); + $this->assertSame('Bernhard', $context->getRoot()); + $this->assertSame('Bernhard', $context->getValue()); + $this->assertSame('Bernhard', $value); + + $context->addViolation('Message %param%', array('%param%' => 'value')); + }; + + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Other violation'); + }; + + $this->metadata->addPropertyConstraint('firstName', new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group', + ))); + $this->metadata->addPropertyConstraint('lastName', new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group', + ))); + + $violations = $this->validatePropertyValue( + self::ENTITY_CLASS, + 'firstName', + 'Bernhard', + 'Group' + ); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Message value', $violations[0]->getMessage()); + $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); + $this->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); + $this->assertSame('', $violations[0]->getPropertyPath()); + $this->assertSame('Bernhard', $violations[0]->getRoot()); + $this->assertSame('Bernhard', $violations[0]->getInvalidValue()); + $this->assertNull($violations[0]->getPlural()); + $this->assertNull($violations[0]->getCode()); + } + + /** + * https://github.com/symfony/symfony/issues/11604. + */ + public function testValidatePropertyValueWithoutConstraints() + { + $entity = new Entity(); + $violations = $this->validatePropertyValue($entity, 'lastName', 'foo'); + + $this->assertCount(0, $violations, '->validatePropertyValue() returns no violations if no constraints have been configured for the property being validated'); + } + + public function testValidateObjectOnlyOncePerGroup() + { + $entity = new Entity(); + $entity->reference = new Reference(); + $entity->reference2 = $entity->reference; + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->metadata->addPropertyConstraint('reference2', new Valid()); + $this->referenceMetadata->addConstraint(new Callback($callback)); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + public function testValidateDifferentObjectsSeparately() + { + $entity = new Entity(); + $entity->reference = new Reference(); + $entity->reference2 = new Reference(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->metadata->addPropertyConstraint('reference2', new Valid()); + $this->referenceMetadata->addConstraint(new Callback($callback)); + + $violations = $this->validate($entity); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(2, $violations); + } + + public function testValidateSingleGroup() + { + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group 1', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group 2', + ))); + + $violations = $this->validate($entity, null, 'Group 2'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + } + + public function testValidateMultipleGroups() + { + $entity = new Entity(); + + $callback = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Message'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group 1', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback, + 'groups' => 'Group 2', + ))); + + $violations = $this->validate($entity, null, array('Group 1', 'Group 2')); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(2, $violations); + } + + public function testReplaceDefaultGroupByGroupSequenceObject() + { + $entity = new Entity(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 2'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 3'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => function () {}, + 'groups' => 'Group 1', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group 2', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 3', + ))); + + $sequence = new GroupSequence(array('Group 1', 'Group 2', 'Group 3', 'Entity')); + $this->metadata->setGroupSequence($sequence); + + $violations = $this->validate($entity, null, 'Default'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Violation in Group 2', $violations[0]->getMessage()); + } + + public function testReplaceDefaultGroupByGroupSequenceArray() + { + $entity = new Entity(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 2'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 3'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => function () {}, + 'groups' => 'Group 1', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group 2', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 3', + ))); + + $sequence = array('Group 1', 'Group 2', 'Group 3', 'Entity'); + $this->metadata->setGroupSequence($sequence); + + $violations = $this->validate($entity, null, 'Default'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Violation in Group 2', $violations[0]->getMessage()); + } + + public function testPropagateDefaultGroupToReferenceWhenReplacingDefaultGroup() + { + $entity = new Entity(); + $entity->reference = new Reference(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Default group'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in group sequence'); + }; + + $this->metadata->addPropertyConstraint('reference', new Valid()); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Default', + ))); + $this->referenceMetadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 1', + ))); + + $sequence = new GroupSequence(array('Group 1', 'Entity')); + $this->metadata->setGroupSequence($sequence); + + $violations = $this->validate($entity, null, 'Default'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Violation in Default group', $violations[0]->getMessage()); + } + + public function testValidateCustomGroupWhenDefaultGroupWasReplaced() + { + $entity = new Entity(); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in other group'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in group sequence'); + }; + + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Other Group', + ))); + $this->metadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 1', + ))); + + $sequence = new GroupSequence(array('Group 1', 'Entity')); + $this->metadata->setGroupSequence($sequence); + + $violations = $this->validate($entity, null, 'Other Group'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(1, $violations); + $this->assertSame('Violation in other group', $violations[0]->getMessage()); + } + + /** + * @dataProvider getTestReplaceDefaultGroup + */ + public function testReplaceDefaultGroup($sequence, array $assertViolations) + { + $entity = new GroupSequenceProviderEntity($sequence); + + $callback1 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 2'); + }; + $callback2 = function ($value, ExecutionContextInterface $context) { + $context->addViolation('Violation in Group 3'); + }; + + $metadata = new ClassMetadata(get_class($entity)); + $metadata->addConstraint(new Callback(array( + 'callback' => function () {}, + 'groups' => 'Group 1', + ))); + $metadata->addConstraint(new Callback(array( + 'callback' => $callback1, + 'groups' => 'Group 2', + ))); + $metadata->addConstraint(new Callback(array( + 'callback' => $callback2, + 'groups' => 'Group 3', + ))); + $metadata->setGroupSequenceProvider(true); + + $this->metadataFactory->addMetadata($metadata); + + $violations = $this->validate($entity, null, 'Default'); + + /* @var ConstraintViolationInterface[] $violations */ + $this->assertCount(count($assertViolations), $violations); + foreach ($assertViolations as $key => $message) { + $this->assertSame($message, $violations[$key]->getMessage()); + } + } + + public function getTestReplaceDefaultGroup() + { + return array( + array( + 'sequence' => new GroupSequence(array('Group 1', 'Group 2', 'Group 3', 'Entity')), + 'assertViolations' => array( + 'Violation in Group 2', + ), + ), + array( + 'sequence' => array('Group 1', 'Group 2', 'Group 3', 'Entity'), + 'assertViolations' => array( + 'Violation in Group 2', + ), + ), + array( + 'sequence' => new GroupSequence(array('Group 1', array('Group 2', 'Group 3'), 'Entity')), + 'assertViolations' => array( + 'Violation in Group 2', + 'Violation in Group 3', + ), + ), + array( + 'sequence' => array('Group 1', array('Group 2', 'Group 3'), 'Entity'), + 'assertViolations' => array( + 'Violation in Group 2', + 'Violation in Group 3', + ), + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9e0afe06390beb60127e28b43986e3bebb377f39 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Validator; + +use Symfony\Component\Translation\IdentityTranslator; +use Symfony\Component\Validator\ConstraintValidatorFactory; +use Symfony\Component\Validator\Context\ExecutionContextFactory; +use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; +use Symfony\Component\Validator\Tests\Constraints\Fixtures\ChildA; +use Symfony\Component\Validator\Tests\Constraints\Fixtures\ChildB; +use Symfony\Component\Validator\Tests\Fixtures\Entity; +use Symfony\Component\Validator\Validator\RecursiveValidator; + +class RecursiveValidatorTest extends AbstractTest +{ + protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) + { + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + $contextFactory = new ExecutionContextFactory($translator); + $validatorFactory = new ConstraintValidatorFactory(); + + return new RecursiveValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers); + } + + public function testEmptyGroupsArrayDoesNotTriggerDeprecation() + { + $entity = new Entity(); + $childA = new ChildA(); + $childB = new ChildB(); + $childA->name = false; + $childB->name = 'fake'; + $entity->childA = array($childA); + $entity->childB = array($childB); + $validatorContext = $this->getMockBuilder('Symfony\Component\Validator\Validator\ContextualValidatorInterface')->getMock(); + $validatorContext + ->expects($this->once()) + ->method('validate') + ->with($entity, null, array()) + ->willReturnSelf(); + + $validator = $this + ->getMockBuilder('Symfony\Component\Validator\Validator\RecursiveValidator') + ->disableOriginalConstructor() + ->setMethods(array('startContext')) + ->getMock(); + $validator + ->expects($this->once()) + ->method('startContext') + ->willReturn($validatorContext); + + $validator->validate($entity, null, array()); + } + + public function testRelationBetweenChildAAndChildB() + { + $entity = new Entity(); + $childA = new ChildA(); + $childB = new ChildB(); + + $childA->childB = $childB; + $childB->childA = $childA; + + $childA->name = false; + $childB->name = 'fake'; + $entity->childA = array($childA); + $entity->childB = array($childB); + + $validatorContext = $this->getMockBuilder('Symfony\Component\Validator\Validator\ContextualValidatorInterface')->getMock(); + $validatorContext + ->expects($this->once()) + ->method('validate') + ->with($entity, null, array()) + ->willReturnSelf(); + + $validator = $this + ->getMockBuilder('Symfony\Component\Validator\Validator\RecursiveValidator') + ->disableOriginalConstructor() + ->setMethods(array('startContext')) + ->getMock(); + $validator + ->expects($this->once()) + ->method('startContext') + ->willReturn($validatorContext); + + $validator->validate($entity, null, array()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..77d586412b76b7b1573d543c8ccd0f5c18dd4e26 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\ValidatorBuilder; +use Symfony\Component\Validator\ValidatorBuilderInterface; + +class ValidatorBuilderTest extends TestCase +{ + /** + * @var ValidatorBuilderInterface + */ + protected $builder; + + protected function setUp() + { + $this->builder = new ValidatorBuilder(); + } + + protected function tearDown() + { + $this->builder = null; + } + + public function testAddObjectInitializer() + { + $this->assertSame($this->builder, $this->builder->addObjectInitializer( + $this->getMockBuilder('Symfony\Component\Validator\ObjectInitializerInterface')->getMock() + )); + } + + public function testAddObjectInitializers() + { + $this->assertSame($this->builder, $this->builder->addObjectInitializers(array())); + } + + public function testAddXmlMapping() + { + $this->assertSame($this->builder, $this->builder->addXmlMapping('mapping')); + } + + public function testAddXmlMappings() + { + $this->assertSame($this->builder, $this->builder->addXmlMappings(array())); + } + + public function testAddYamlMapping() + { + $this->assertSame($this->builder, $this->builder->addYamlMapping('mapping')); + } + + public function testAddYamlMappings() + { + $this->assertSame($this->builder, $this->builder->addYamlMappings(array())); + } + + public function testAddMethodMapping() + { + $this->assertSame($this->builder, $this->builder->addMethodMapping('mapping')); + } + + public function testAddMethodMappings() + { + $this->assertSame($this->builder, $this->builder->addMethodMappings(array())); + } + + public function testEnableAnnotationMapping() + { + $this->assertSame($this->builder, $this->builder->enableAnnotationMapping()); + } + + public function testDisableAnnotationMapping() + { + $this->assertSame($this->builder, $this->builder->disableAnnotationMapping()); + } + + public function testSetMetadataCache() + { + $this->assertSame($this->builder, $this->builder->setMetadataCache( + $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock()) + ); + } + + public function testSetConstraintValidatorFactory() + { + $this->assertSame($this->builder, $this->builder->setConstraintValidatorFactory( + $this->getMockBuilder('Symfony\Component\Validator\ConstraintValidatorFactoryInterface')->getMock()) + ); + } + + public function testSetTranslator() + { + $this->assertSame($this->builder, $this->builder->setTranslator( + $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock()) + ); + } + + public function testSetTranslationDomain() + { + $this->assertSame($this->builder, $this->builder->setTranslationDomain('TRANS_DOMAIN')); + } + + public function testGetValidator() + { + $this->assertInstanceOf('Symfony\Component\Validator\Validator\RecursiveValidator', $this->builder->getValidator()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Util/PropertyPath.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Util/PropertyPath.php new file mode 100644 index 0000000000000000000000000000000000000000..4108a02c24f25bf6a797626f184c3aa6711dd953 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Util/PropertyPath.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Util; + +/** + * Contains utility methods for dealing with property paths. + * + * For more extensive functionality, use Symfony's PropertyAccess component. + * + * @author Bernhard Schussek + */ +class PropertyPath +{ + /** + * Appends a path to a given property path. + * + * If the base path is empty, the appended path will be returned unchanged. + * If the base path is not empty, and the appended path starts with a + * squared opening bracket ("["), the concatenation of the two paths is + * returned. Otherwise, the concatenation of the two paths is returned, + * separated by a dot ("."). + * + * @param string $basePath The base path + * @param string $subPath The path to append + * + * @return string The concatenation of the two property paths + */ + public static function append($basePath, $subPath) + { + if ('' !== (string) $subPath) { + if ('[' === $subPath[0]) { + return $basePath.$subPath; + } + + return '' !== (string) $basePath ? $basePath.'.'.$subPath : $subPath; + } + + return $basePath; + } + + /** + * Not instantiable. + */ + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Validation.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Validation.php new file mode 100644 index 0000000000000000000000000000000000000000..950efb6cce2677882aab72d5da89d7ba48d2daa6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Validation.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Symfony\Component\Validator\Validator\ValidatorInterface; + +/** + * Entry point for the Validator component. + * + * @author Bernhard Schussek + */ +final class Validation +{ + /** + * Creates a new validator. + * + * If you want to configure the validator, use + * {@link createValidatorBuilder()} instead. + * + * @return ValidatorInterface The new validator + */ + public static function createValidator() + { + return self::createValidatorBuilder()->getValidator(); + } + + /** + * Creates a configurable builder for validator objects. + * + * @return ValidatorBuilderInterface The new builder + */ + public static function createValidatorBuilder() + { + return new ValidatorBuilder(); + } + + /** + * This class cannot be instantiated. + */ + private function __construct() + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..1cc96c834e6f69cd101b15bdb2aa3cf3e8b0576f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Validator; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintViolationListInterface; + +/** + * A validator in a specific execution context. + * + * @author Bernhard Schussek + */ +interface ContextualValidatorInterface +{ + /** + * Appends the given path to the property path of the context. + * + * If called multiple times, the path will always be reset to the context's + * original path with the given path appended to it. + * + * @param string $path The path to append + * + * @return $this + */ + public function atPath($path); + + /** + * Validates a value against a constraint or a list of constraints. + * + * If no constraint is passed, the constraint + * {@link \Symfony\Component\Validator\Constraints\Valid} is assumed. + * + * @param mixed $value The value to validate + * @param Constraint|Constraint[] $constraints The constraint(s) to validate + * against + * @param array|null $groups The validation groups to + * validate. If none is given, + * "Default" is assumed + * + * @return $this + */ + public function validate($value, $constraints = null, $groups = null); + + /** + * Validates a property of an object against the constraints specified + * for this property. + * + * @param object $object The object + * @param string $propertyName The name of the validated property + * @param array|null $groups The validation groups to validate. If + * none is given, "Default" is assumed + * + * @return $this + */ + public function validateProperty($object, $propertyName, $groups = null); + + /** + * Validates a value against the constraints specified for an object's + * property. + * + * @param object|string $objectOrClass The object or its class name + * @param string $propertyName The name of the property + * @param mixed $value The value to validate against the + * property's constraints + * @param array|null $groups The validation groups to validate. If + * none is given, "Default" is assumed + * + * @return $this + */ + public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null); + + /** + * Returns the violations that have been generated so far in the context + * of the validator. + * + * @return ConstraintViolationListInterface The constraint violations + */ + public function getViolations(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..838d12b4033fdfd4870ffc41631a252796d33869 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php @@ -0,0 +1,853 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Validator; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; +use Symfony\Component\Validator\Context\ExecutionContext; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\NoSuchMetadataException; +use Symfony\Component\Validator\Exception\RuntimeException; +use Symfony\Component\Validator\Exception\UnsupportedMetadataException; +use Symfony\Component\Validator\Exception\ValidatorException; +use Symfony\Component\Validator\Mapping\CascadingStrategy; +use Symfony\Component\Validator\Mapping\ClassMetadataInterface; +use Symfony\Component\Validator\Mapping\GenericMetadata; +use Symfony\Component\Validator\Mapping\MetadataInterface; +use Symfony\Component\Validator\Mapping\PropertyMetadataInterface; +use Symfony\Component\Validator\Mapping\TraversalStrategy; +use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; +use Symfony\Component\Validator\ObjectInitializerInterface; +use Symfony\Component\Validator\Util\PropertyPath; + +/** + * Recursive implementation of {@link ContextualValidatorInterface}. + * + * @author Bernhard Schussek + */ +class RecursiveContextualValidator implements ContextualValidatorInterface +{ + /** + * @var ExecutionContextInterface + */ + private $context; + + /** + * @var string + */ + private $defaultPropertyPath; + + /** + * @var array + */ + private $defaultGroups; + + /** + * @var MetadataFactoryInterface + */ + private $metadataFactory; + + /** + * @var ConstraintValidatorFactoryInterface + */ + private $validatorFactory; + + /** + * @var ObjectInitializerInterface[] + */ + private $objectInitializers; + + /** + * Creates a validator for the given context. + * + * @param ExecutionContextInterface $context The execution context + * @param MetadataFactoryInterface $metadataFactory The factory for + * fetching the metadata + * of validated objects + * @param ConstraintValidatorFactoryInterface $validatorFactory The factory for creating + * constraint validators + * @param ObjectInitializerInterface[] $objectInitializers The object initializers + */ + public function __construct(ExecutionContextInterface $context, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = array()) + { + $this->context = $context; + $this->defaultPropertyPath = $context->getPropertyPath(); + $this->defaultGroups = array($context->getGroup() ?: Constraint::DEFAULT_GROUP); + $this->metadataFactory = $metadataFactory; + $this->validatorFactory = $validatorFactory; + $this->objectInitializers = $objectInitializers; + } + + /** + * {@inheritdoc} + */ + public function atPath($path) + { + $this->defaultPropertyPath = $this->context->getPropertyPath($path); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function validate($value, $constraints = null, $groups = null) + { + $groups = $groups ? $this->normalizeGroups($groups) : $this->defaultGroups; + + $previousValue = $this->context->getValue(); + $previousObject = $this->context->getObject(); + $previousMetadata = $this->context->getMetadata(); + $previousPath = $this->context->getPropertyPath(); + $previousGroup = $this->context->getGroup(); + $previousConstraint = null; + + if ($this->context instanceof ExecutionContext || method_exists($this->context, 'getConstraint')) { + $previousConstraint = $this->context->getConstraint(); + } + + // If explicit constraints are passed, validate the value against + // those constraints + if (null !== $constraints) { + // You can pass a single constraint or an array of constraints + // Make sure to deal with an array in the rest of the code + if (!is_array($constraints)) { + $constraints = array($constraints); + } + + $metadata = new GenericMetadata(); + $metadata->addConstraints($constraints); + + $this->validateGenericNode( + $value, + null, + is_object($value) ? spl_object_hash($value) : null, + $metadata, + $this->defaultPropertyPath, + $groups, + null, + TraversalStrategy::IMPLICIT, + $this->context + ); + + $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); + $this->context->setGroup($previousGroup); + + if (null !== $previousConstraint) { + $this->context->setConstraint($previousConstraint); + } + + return $this; + } + + // If an object is passed without explicit constraints, validate that + // object against the constraints defined for the object's class + if (is_object($value)) { + $this->validateObject( + $value, + $this->defaultPropertyPath, + $groups, + TraversalStrategy::IMPLICIT, + $this->context + ); + + $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); + $this->context->setGroup($previousGroup); + + return $this; + } + + // If an array is passed without explicit constraints, validate each + // object in the array + if (is_array($value)) { + $this->validateEachObjectIn( + $value, + $this->defaultPropertyPath, + $groups, + $this->context + ); + + $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); + $this->context->setGroup($previousGroup); + + return $this; + } + + throw new RuntimeException(sprintf( + 'Cannot validate values of type "%s" automatically. Please '. + 'provide a constraint.', + gettype($value) + )); + } + + /** + * {@inheritdoc} + */ + public function validateProperty($object, $propertyName, $groups = null) + { + $classMetadata = $this->metadataFactory->getMetadataFor($object); + + if (!$classMetadata instanceof ClassMetadataInterface) { + throw new ValidatorException(sprintf( + 'The metadata factory should return instances of '. + '"\Symfony\Component\Validator\Mapping\ClassMetadataInterface", '. + 'got: "%s".', + is_object($classMetadata) ? get_class($classMetadata) : gettype($classMetadata) + )); + } + + $propertyMetadatas = $classMetadata->getPropertyMetadata($propertyName); + $groups = $groups ? $this->normalizeGroups($groups) : $this->defaultGroups; + $cacheKey = spl_object_hash($object); + $propertyPath = PropertyPath::append($this->defaultPropertyPath, $propertyName); + + $previousValue = $this->context->getValue(); + $previousObject = $this->context->getObject(); + $previousMetadata = $this->context->getMetadata(); + $previousPath = $this->context->getPropertyPath(); + $previousGroup = $this->context->getGroup(); + + foreach ($propertyMetadatas as $propertyMetadata) { + $propertyValue = $propertyMetadata->getPropertyValue($object); + + $this->validateGenericNode( + $propertyValue, + $object, + $cacheKey.':'.get_class($object).':'.$propertyName, + $propertyMetadata, + $propertyPath, + $groups, + null, + TraversalStrategy::IMPLICIT, + $this->context + ); + } + + $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); + $this->context->setGroup($previousGroup); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null) + { + $classMetadata = $this->metadataFactory->getMetadataFor($objectOrClass); + + if (!$classMetadata instanceof ClassMetadataInterface) { + throw new ValidatorException(sprintf( + 'The metadata factory should return instances of '. + '"\Symfony\Component\Validator\Mapping\ClassMetadataInterface", '. + 'got: "%s".', + is_object($classMetadata) ? get_class($classMetadata) : gettype($classMetadata) + )); + } + + $propertyMetadatas = $classMetadata->getPropertyMetadata($propertyName); + $groups = $groups ? $this->normalizeGroups($groups) : $this->defaultGroups; + + if (is_object($objectOrClass)) { + $object = $objectOrClass; + $cacheKey = spl_object_hash($objectOrClass); + $propertyPath = PropertyPath::append($this->defaultPropertyPath, $propertyName); + } else { + // $objectOrClass contains a class name + $object = null; + $cacheKey = null; + $propertyPath = $this->defaultPropertyPath; + } + + $previousValue = $this->context->getValue(); + $previousObject = $this->context->getObject(); + $previousMetadata = $this->context->getMetadata(); + $previousPath = $this->context->getPropertyPath(); + $previousGroup = $this->context->getGroup(); + + foreach ($propertyMetadatas as $propertyMetadata) { + $this->validateGenericNode( + $value, + $object, + $cacheKey.':'.get_class($object).':'.$propertyName, + $propertyMetadata, + $propertyPath, + $groups, + null, + TraversalStrategy::IMPLICIT, + $this->context + ); + } + + $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); + $this->context->setGroup($previousGroup); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getViolations() + { + return $this->context->getViolations(); + } + + /** + * Normalizes the given group or list of groups to an array. + * + * @param mixed $groups The groups to normalize + * + * @return array A group array + */ + protected function normalizeGroups($groups) + { + if (is_array($groups)) { + return $groups; + } + + return array($groups); + } + + /** + * Validates an object against the constraints defined for its class. + * + * If no metadata is available for the class, but the class is an instance + * of {@link \Traversable} and the selected traversal strategy allows + * traversal, the object will be iterated and each nested object will be + * validated instead. + * + * @param object $object The object to cascade + * @param string $propertyPath The current property path + * @param string[] $groups The validated groups + * @param int $traversalStrategy The strategy for traversing the + * cascaded object + * @param ExecutionContextInterface $context The current execution context + * + * @throws NoSuchMetadataException If the object has no associated metadata + * and does not implement {@link \Traversable} + * or if traversal is disabled via the + * $traversalStrategy argument + * @throws UnsupportedMetadataException If the metadata returned by the + * metadata factory does not implement + * {@link ClassMetadataInterface} + */ + private function validateObject($object, $propertyPath, array $groups, $traversalStrategy, ExecutionContextInterface $context) + { + try { + $classMetadata = $this->metadataFactory->getMetadataFor($object); + + if (!$classMetadata instanceof ClassMetadataInterface) { + throw new UnsupportedMetadataException(sprintf( + 'The metadata factory should return instances of '. + '"Symfony\Component\Validator\Mapping\ClassMetadataInterface", '. + 'got: "%s".', + is_object($classMetadata) ? get_class($classMetadata) : gettype($classMetadata) + )); + } + + $this->validateClassNode( + $object, + spl_object_hash($object), + $classMetadata, + $propertyPath, + $groups, + null, + $traversalStrategy, + $context + ); + } catch (NoSuchMetadataException $e) { + // Rethrow if not Traversable + if (!$object instanceof \Traversable) { + throw $e; + } + + // Rethrow unless IMPLICIT or TRAVERSE + if (!($traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE))) { + throw $e; + } + + $this->validateEachObjectIn( + $object, + $propertyPath, + $groups, + $context + ); + } + } + + /** + * Validates each object in a collection against the constraints defined + * for their classes. + * + * If the parameter $recursive is set to true, nested {@link \Traversable} + * objects are iterated as well. Nested arrays are always iterated, + * regardless of the value of $recursive. + * + * @param array|\Traversable $collection The collection + * @param string $propertyPath The current property path + * @param string[] $groups The validated groups + * @param ExecutionContextInterface $context The current execution context + * + * @see ClassNode + * @see CollectionNode + */ + private function validateEachObjectIn($collection, $propertyPath, array $groups, ExecutionContextInterface $context) + { + foreach ($collection as $key => $value) { + if (is_array($value)) { + // Arrays are always cascaded, independent of the specified + // traversal strategy + $this->validateEachObjectIn( + $value, + $propertyPath.'['.$key.']', + $groups, + $context + ); + + continue; + } + + // Scalar and null values in the collection are ignored + if (is_object($value)) { + $this->validateObject( + $value, + $propertyPath.'['.$key.']', + $groups, + TraversalStrategy::IMPLICIT, + $context + ); + } + } + } + + /** + * Validates a class node. + * + * A class node is a combination of an object with a {@link ClassMetadataInterface} + * instance. Each class node (conceptionally) has zero or more succeeding + * property nodes: + * + * (Article:class node) + * \ + * ($title:property node) + * + * This method validates the passed objects against all constraints defined + * at class level. It furthermore triggers the validation of each of the + * class' properties against the constraints for that property. + * + * If the selected traversal strategy allows traversal, the object is + * iterated and each nested object is validated against its own constraints. + * The object is not traversed if traversal is disabled in the class + * metadata. + * + * If the passed groups contain the group "Default", the validator will + * check whether the "Default" group has been replaced by a group sequence + * in the class metadata. If this is the case, the group sequence is + * validated instead. + * + * @param object $object The validated object + * @param string $cacheKey The key for caching + * the validated object + * @param ClassMetadataInterface $metadata The class metadata of + * the object + * @param string $propertyPath The property path leading + * to the object + * @param string[] $groups The groups in which the + * object should be validated + * @param string[]|null $cascadedGroups The groups in which + * cascaded objects should + * be validated + * @param int $traversalStrategy The strategy used for + * traversing the object + * @param ExecutionContextInterface $context The current execution context + * + * @throws UnsupportedMetadataException If a property metadata does not + * implement {@link PropertyMetadataInterface} + * @throws ConstraintDefinitionException If traversal was enabled but the + * object does not implement + * {@link \Traversable} + * + * @see TraversalStrategy + */ + private function validateClassNode($object, $cacheKey, ClassMetadataInterface $metadata = null, $propertyPath, array $groups, $cascadedGroups, $traversalStrategy, ExecutionContextInterface $context) + { + $context->setNode($object, $object, $metadata, $propertyPath); + + if (!$context->isObjectInitialized($cacheKey)) { + foreach ($this->objectInitializers as $initializer) { + $initializer->initialize($object); + } + + $context->markObjectAsInitialized($cacheKey); + } + + foreach ($groups as $key => $group) { + // If the "Default" group is replaced by a group sequence, remember + // to cascade the "Default" group when traversing the group + // sequence + $defaultOverridden = false; + + // Use the object hash for group sequences + $groupHash = is_object($group) ? spl_object_hash($group) : $group; + + if ($context->isGroupValidated($cacheKey, $groupHash)) { + // Skip this group when validating the properties and when + // traversing the object + unset($groups[$key]); + + continue; + } + + $context->markGroupAsValidated($cacheKey, $groupHash); + + // Replace the "Default" group by the group sequence defined + // for the class, if applicable. + // This is done after checking the cache, so that + // spl_object_hash() isn't called for this sequence and + // "Default" is used instead in the cache. This is useful + // if the getters below return different group sequences in + // every call. + if (Constraint::DEFAULT_GROUP === $group) { + if ($metadata->hasGroupSequence()) { + // The group sequence is statically defined for the class + $group = $metadata->getGroupSequence(); + $defaultOverridden = true; + } elseif ($metadata->isGroupSequenceProvider()) { + // The group sequence is dynamically obtained from the validated + // object + /* @var \Symfony\Component\Validator\GroupSequenceProviderInterface $object */ + $group = $object->getGroupSequence(); + $defaultOverridden = true; + + if (!$group instanceof GroupSequence) { + $group = new GroupSequence($group); + } + } + } + + // If the groups (=[,G3,G4]) contain a group sequence + // (=), then call validateClassNode() with each entry of the + // group sequence and abort if necessary (G1, G2) + if ($group instanceof GroupSequence) { + $this->stepThroughGroupSequence( + $object, + $object, + $cacheKey, + $metadata, + $propertyPath, + $traversalStrategy, + $group, + $defaultOverridden ? Constraint::DEFAULT_GROUP : null, + $context + ); + + // Skip the group sequence when validating properties, because + // stepThroughGroupSequence() already validates the properties + unset($groups[$key]); + + continue; + } + + $this->validateInGroup($object, $cacheKey, $metadata, $group, $context); + } + + // If no more groups should be validated for the property nodes, + // we can safely quit + if (0 === count($groups)) { + return; + } + + // Validate all properties against their constraints + foreach ($metadata->getConstrainedProperties() as $propertyName) { + // If constraints are defined both on the getter of a property as + // well as on the property itself, then getPropertyMetadata() + // returns two metadata objects, not just one + foreach ($metadata->getPropertyMetadata($propertyName) as $propertyMetadata) { + if (!$propertyMetadata instanceof PropertyMetadataInterface) { + throw new UnsupportedMetadataException(sprintf( + 'The property metadata instances should implement '. + '"Symfony\Component\Validator\Mapping\PropertyMetadataInterface", '. + 'got: "%s".', + is_object($propertyMetadata) ? get_class($propertyMetadata) : gettype($propertyMetadata) + )); + } + + $propertyValue = $propertyMetadata->getPropertyValue($object); + + $this->validateGenericNode( + $propertyValue, + $object, + $cacheKey.':'.get_class($object).':'.$propertyName, + $propertyMetadata, + PropertyPath::append($propertyPath, $propertyName), + $groups, + $cascadedGroups, + TraversalStrategy::IMPLICIT, + $context + ); + } + } + + // If no specific traversal strategy was requested when this method + // was called, use the traversal strategy of the class' metadata + if ($traversalStrategy & TraversalStrategy::IMPLICIT) { + $traversalStrategy = $metadata->getTraversalStrategy(); + } + + // Traverse only if IMPLICIT or TRAVERSE + if (!($traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE))) { + return; + } + + // If IMPLICIT, stop unless we deal with a Traversable + if ($traversalStrategy & TraversalStrategy::IMPLICIT && !$object instanceof \Traversable) { + return; + } + + // If TRAVERSE, fail if we have no Traversable + if (!$object instanceof \Traversable) { + throw new ConstraintDefinitionException(sprintf( + 'Traversal was enabled for "%s", but this class '. + 'does not implement "\Traversable".', + get_class($object) + )); + } + + $this->validateEachObjectIn( + $object, + $propertyPath, + $groups, + $context + ); + } + + /** + * Validates a node that is not a class node. + * + * Currently, two such node types exist: + * + * - property nodes, which consist of the value of an object's + * property together with a {@link PropertyMetadataInterface} instance + * - generic nodes, which consist of a value and some arbitrary + * constraints defined in a {@link MetadataInterface} container + * + * In both cases, the value is validated against all constraints defined + * in the passed metadata object. Then, if the value is an instance of + * {@link \Traversable} and the selected traversal strategy permits it, + * the value is traversed and each nested object validated against its own + * constraints. Arrays are always traversed. + * + * @param mixed $value The validated value + * @param object|null $object The current object + * @param string $cacheKey The key for caching + * the validated value + * @param MetadataInterface $metadata The metadata of the + * value + * @param string $propertyPath The property path leading + * to the value + * @param string[] $groups The groups in which the + * value should be validated + * @param string[]|null $cascadedGroups The groups in which + * cascaded objects should + * be validated + * @param int $traversalStrategy The strategy used for + * traversing the value + * @param ExecutionContextInterface $context The current execution context + * + * @see TraversalStrategy + */ + private function validateGenericNode($value, $object, $cacheKey, MetadataInterface $metadata = null, $propertyPath, array $groups, $cascadedGroups, $traversalStrategy, ExecutionContextInterface $context) + { + $context->setNode($value, $object, $metadata, $propertyPath); + + foreach ($groups as $key => $group) { + if ($group instanceof GroupSequence) { + $this->stepThroughGroupSequence( + $value, + $object, + $cacheKey, + $metadata, + $propertyPath, + $traversalStrategy, + $group, + null, + $context + ); + + // Skip the group sequence when cascading, as the cascading + // logic is already done in stepThroughGroupSequence() + unset($groups[$key]); + + continue; + } + + $this->validateInGroup($value, $cacheKey, $metadata, $group, $context); + } + + if (0 === count($groups)) { + return; + } + + if (null === $value) { + return; + } + + $cascadingStrategy = $metadata->getCascadingStrategy(); + + // Quit unless we have an array or a cascaded object + if (!is_array($value) && !($cascadingStrategy & CascadingStrategy::CASCADE)) { + return; + } + + // If no specific traversal strategy was requested when this method + // was called, use the traversal strategy of the node's metadata + if ($traversalStrategy & TraversalStrategy::IMPLICIT) { + $traversalStrategy = $metadata->getTraversalStrategy(); + } + + // The $cascadedGroups property is set, if the "Default" group is + // overridden by a group sequence + // See validateClassNode() + $cascadedGroups = null !== $cascadedGroups && count($cascadedGroups) > 0 ? $cascadedGroups : $groups; + + if (is_array($value)) { + // Arrays are always traversed, independent of the specified + // traversal strategy + $this->validateEachObjectIn( + $value, + $propertyPath, + $cascadedGroups, + $context + ); + + return; + } + + // If the value is a scalar, pass it anyway, because we want + // a NoSuchMetadataException to be thrown in that case + $this->validateObject( + $value, + $propertyPath, + $cascadedGroups, + $traversalStrategy, + $context + ); + + // Currently, the traversal strategy can only be TRAVERSE for a + // generic node if the cascading strategy is CASCADE. Thus, traversable + // objects will always be handled within validateObject() and there's + // nothing more to do here. + + // see GenericMetadata::addConstraint() + } + + /** + * Sequentially validates a node's value in each group of a group sequence. + * + * If any of the constraints generates a violation, subsequent groups in the + * group sequence are skipped. + * + * @param mixed $value The validated value + * @param object|null $object The current object + * @param string $cacheKey The key for caching + * the validated value + * @param MetadataInterface $metadata The metadata of the + * value + * @param string $propertyPath The property path leading + * to the value + * @param int $traversalStrategy The strategy used for + * traversing the value + * @param GroupSequence $groupSequence The group sequence + * @param string|null $cascadedGroup The group that should + * be passed to cascaded + * objects instead of + * the group sequence + * @param ExecutionContextInterface $context The execution context + */ + private function stepThroughGroupSequence($value, $object, $cacheKey, MetadataInterface $metadata = null, $propertyPath, $traversalStrategy, GroupSequence $groupSequence, $cascadedGroup, ExecutionContextInterface $context) + { + $violationCount = count($context->getViolations()); + $cascadedGroups = $cascadedGroup ? array($cascadedGroup) : null; + + foreach ($groupSequence->groups as $groupInSequence) { + $groups = (array) $groupInSequence; + + if ($metadata instanceof ClassMetadataInterface) { + $this->validateClassNode( + $value, + $cacheKey, + $metadata, + $propertyPath, + $groups, + $cascadedGroups, + $traversalStrategy, + $context + ); + } else { + $this->validateGenericNode( + $value, + $object, + $cacheKey, + $metadata, + $propertyPath, + $groups, + $cascadedGroups, + $traversalStrategy, + $context + ); + } + + // Abort sequence validation if a violation was generated + if (count($context->getViolations()) > $violationCount) { + break; + } + } + } + + /** + * Validates a node's value against all constraints in the given group. + * + * @param mixed $value The validated value + * @param string $cacheKey The key for caching the + * validated value + * @param MetadataInterface $metadata The metadata of the value + * @param string $group The group to validate + * @param ExecutionContextInterface $context The execution context + */ + private function validateInGroup($value, $cacheKey, MetadataInterface $metadata, $group, ExecutionContextInterface $context) + { + $context->setGroup($group); + + foreach ($metadata->findConstraints($group) as $constraint) { + // Prevent duplicate validation of constraints, in the case + // that constraints belong to multiple validated groups + if (null !== $cacheKey) { + $constraintHash = spl_object_hash($constraint); + + if ($context->isConstraintValidated($cacheKey, $constraintHash)) { + continue; + } + + $context->markConstraintAsValidated($cacheKey, $constraintHash); + } + + $context->setConstraint($constraint); + + $validator = $this->validatorFactory->getInstance($constraint); + $validator->initialize($context); + $validator->validate($value, $constraint); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..c79d0a77d4909c80a235d293dc516842e3ce6af6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveValidator.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Validator; + +use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; +use Symfony\Component\Validator\Context\ExecutionContextFactoryInterface; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; +use Symfony\Component\Validator\ObjectInitializerInterface; + +/** + * Recursive implementation of {@link ValidatorInterface}. + * + * @author Bernhard Schussek + */ +class RecursiveValidator implements ValidatorInterface +{ + /** + * @var ExecutionContextFactoryInterface + */ + protected $contextFactory; + + /** + * @var MetadataFactoryInterface + */ + protected $metadataFactory; + + /** + * @var ConstraintValidatorFactoryInterface + */ + protected $validatorFactory; + + /** + * @var ObjectInitializerInterface[] + */ + protected $objectInitializers; + + /** + * Creates a new validator. + * + * @param ExecutionContextFactoryInterface $contextFactory The factory for + * creating new contexts + * @param MetadataFactoryInterface $metadataFactory The factory for + * fetching the metadata + * of validated objects + * @param ConstraintValidatorFactoryInterface $validatorFactory The factory for creating + * constraint validators + * @param ObjectInitializerInterface[] $objectInitializers The object initializers + */ + public function __construct(ExecutionContextFactoryInterface $contextFactory, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = array()) + { + $this->contextFactory = $contextFactory; + $this->metadataFactory = $metadataFactory; + $this->validatorFactory = $validatorFactory; + $this->objectInitializers = $objectInitializers; + } + + /** + * {@inheritdoc} + */ + public function startContext($root = null) + { + return new RecursiveContextualValidator( + $this->contextFactory->createContext($this, $root), + $this->metadataFactory, + $this->validatorFactory, + $this->objectInitializers + ); + } + + /** + * {@inheritdoc} + */ + public function inContext(ExecutionContextInterface $context) + { + return new RecursiveContextualValidator( + $context, + $this->metadataFactory, + $this->validatorFactory, + $this->objectInitializers + ); + } + + /** + * {@inheritdoc} + */ + public function getMetadataFor($object) + { + return $this->metadataFactory->getMetadataFor($object); + } + + /** + * {@inheritdoc} + */ + public function hasMetadataFor($object) + { + return $this->metadataFactory->hasMetadataFor($object); + } + + /** + * {@inheritdoc} + */ + public function validate($value, $constraints = null, $groups = null) + { + return $this->startContext($value) + ->validate($value, $constraints, $groups) + ->getViolations(); + } + + /** + * {@inheritdoc} + */ + public function validateProperty($object, $propertyName, $groups = null) + { + return $this->startContext($object) + ->validateProperty($object, $propertyName, $groups) + ->getViolations(); + } + + /** + * {@inheritdoc} + */ + public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null) + { + // If a class name is passed, take $value as root + return $this->startContext(is_object($objectOrClass) ? $objectOrClass : $value) + ->validatePropertyValue($objectOrClass, $propertyName, $value, $groups) + ->getViolations(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/ValidatorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/ValidatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e9576f5eceb370b85c569966015bbfcedfa6e568 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/ValidatorInterface.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\Component\Validator\Validator; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintViolationListInterface; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; + +/** + * Validates PHP values against constraints. + * + * @author Bernhard Schussek + */ +interface ValidatorInterface extends MetadataFactoryInterface +{ + /** + * Validates a value against a constraint or a list of constraints. + * + * If no constraint is passed, the constraint + * {@link \Symfony\Component\Validator\Constraints\Valid} is assumed. + * + * @param mixed $value The value to validate + * @param Constraint|Constraint[] $constraints The constraint(s) to validate + * against + * @param array|null $groups The validation groups to + * validate. If none is given, + * "Default" is assumed + * + * @return ConstraintViolationListInterface A list of constraint violations + * If the list is empty, validation + * succeeded + */ + public function validate($value, $constraints = null, $groups = null); + + /** + * Validates a property of an object against the constraints specified + * for this property. + * + * @param object $object The object + * @param string $propertyName The name of the validated property + * @param array|null $groups The validation groups to validate. If + * none is given, "Default" is assumed + * + * @return ConstraintViolationListInterface A list of constraint violations + * If the list is empty, validation + * succeeded + */ + public function validateProperty($object, $propertyName, $groups = null); + + /** + * Validates a value against the constraints specified for an object's + * property. + * + * @param object|string $objectOrClass The object or its class name + * @param string $propertyName The name of the property + * @param mixed $value The value to validate against the + * property's constraints + * @param array|null $groups The validation groups to validate. If + * none is given, "Default" is assumed + * + * @return ConstraintViolationListInterface A list of constraint violations + * If the list is empty, validation + * succeeded + */ + public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null); + + /** + * Starts a new validation context and returns a validator for that context. + * + * The returned validator collects all violations generated within its + * context. You can access these violations with the + * {@link ContextualValidatorInterface::getViolations()} method. + * + * @return ContextualValidatorInterface The validator for the new context + */ + public function startContext(); + + /** + * Returns a validator in the given execution context. + * + * The returned validator adds all generated violations to the given + * context. + * + * @param ExecutionContextInterface $context The execution context + * + * @return ContextualValidatorInterface The validator for that context + */ + public function inContext(ExecutionContextInterface $context); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/ValidatorBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/ValidatorBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..704d76baad0f0b09fd5ccd4963da9e91857c450f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -0,0 +1,346 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Doctrine\Common\Annotations\AnnotationReader; +use Doctrine\Common\Annotations\CachedReader; +use Doctrine\Common\Annotations\Reader; +use Doctrine\Common\Cache\ArrayCache; +use Symfony\Component\Translation\IdentityTranslator; +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Context\ExecutionContextFactory; +use Symfony\Component\Validator\Exception\ValidatorException; +use Symfony\Component\Validator\Mapping\Cache\CacheInterface; +use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; +use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; +use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Validator\Mapping\Loader\LoaderChain; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; +use Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader; +use Symfony\Component\Validator\Mapping\Loader\XmlFileLoader; +use Symfony\Component\Validator\Mapping\Loader\YamlFileLoader; +use Symfony\Component\Validator\Validator\RecursiveValidator; + +/** + * The default implementation of {@link ValidatorBuilderInterface}. + * + * @author Bernhard Schussek + */ +class ValidatorBuilder implements ValidatorBuilderInterface +{ + /** + * @var array + */ + private $initializers = array(); + + /** + * @var array + */ + private $xmlMappings = array(); + + /** + * @var array + */ + private $yamlMappings = array(); + + /** + * @var array + */ + private $methodMappings = array(); + + /** + * @var Reader|null + */ + private $annotationReader; + + /** + * @var MetadataFactoryInterface|null + */ + private $metadataFactory; + + /** + * @var ConstraintValidatorFactoryInterface|null + */ + private $validatorFactory; + + /** + * @var CacheInterface|null + */ + private $metadataCache; + + /** + * @var TranslatorInterface|null + */ + private $translator; + + /** + * @var null|string + */ + private $translationDomain; + + /** + * {@inheritdoc} + */ + public function addObjectInitializer(ObjectInitializerInterface $initializer) + { + $this->initializers[] = $initializer; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addObjectInitializers(array $initializers) + { + $this->initializers = array_merge($this->initializers, $initializers); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addXmlMapping($path) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->xmlMappings[] = $path; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addXmlMappings(array $paths) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->xmlMappings = array_merge($this->xmlMappings, $paths); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addYamlMapping($path) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->yamlMappings[] = $path; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addYamlMappings(array $paths) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->yamlMappings = array_merge($this->yamlMappings, $paths); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addMethodMapping($methodName) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->methodMappings[] = $methodName; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addMethodMappings(array $methodNames) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->methodMappings = array_merge($this->methodMappings, $methodNames); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function enableAnnotationMapping(Reader $annotationReader = null) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot enable annotation mapping after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + if (null === $annotationReader) { + if (!class_exists('Doctrine\Common\Annotations\AnnotationReader') || !class_exists('Doctrine\Common\Cache\ArrayCache')) { + throw new \RuntimeException('Enabling annotation based constraint mapping requires the packages doctrine/annotations and doctrine/cache to be installed.'); + } + + $annotationReader = new CachedReader(new AnnotationReader(), new ArrayCache()); + } + + $this->annotationReader = $annotationReader; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function disableAnnotationMapping() + { + $this->annotationReader = null; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setMetadataFactory(MetadataFactoryInterface $metadataFactory) + { + if (count($this->xmlMappings) > 0 || count($this->yamlMappings) > 0 || count($this->methodMappings) > 0 || null !== $this->annotationReader) { + throw new ValidatorException('You cannot set a custom metadata factory after adding custom mappings. You should do either of both.'); + } + + $this->metadataFactory = $metadataFactory; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setMetadataCache(CacheInterface $cache) + { + if (null !== $this->metadataFactory) { + throw new ValidatorException('You cannot set a custom metadata cache after setting a custom metadata factory. Configure your metadata factory instead.'); + } + + $this->metadataCache = $cache; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $validatorFactory) + { + $this->validatorFactory = $validatorFactory; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setTranslator(TranslatorInterface $translator) + { + $this->translator = $translator; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setTranslationDomain($translationDomain) + { + $this->translationDomain = $translationDomain; + + return $this; + } + + /** + * @return LoaderInterface[] + */ + public function getLoaders() + { + $loaders = array(); + + foreach ($this->xmlMappings as $xmlMapping) { + $loaders[] = new XmlFileLoader($xmlMapping); + } + + foreach ($this->yamlMappings as $yamlMappings) { + $loaders[] = new YamlFileLoader($yamlMappings); + } + + foreach ($this->methodMappings as $methodName) { + $loaders[] = new StaticMethodLoader($methodName); + } + + if ($this->annotationReader) { + $loaders[] = new AnnotationLoader($this->annotationReader); + } + + return $loaders; + } + + /** + * {@inheritdoc} + */ + public function getValidator() + { + $metadataFactory = $this->metadataFactory; + + if (!$metadataFactory) { + $loaders = $this->getLoaders(); + $loader = null; + + if (count($loaders) > 1) { + $loader = new LoaderChain($loaders); + } elseif (1 === count($loaders)) { + $loader = $loaders[0]; + } + + $metadataFactory = new LazyLoadingMetadataFactory($loader, $this->metadataCache); + } + + $validatorFactory = $this->validatorFactory ?: new ConstraintValidatorFactory(); + $translator = $this->translator; + + if (null === $translator) { + $translator = new IdentityTranslator(); + // Force the locale to be 'en' when no translator is provided rather than relying on the Intl default locale + // This avoids depending on Intl or the stub implementation being available. It also ensures that Symfony + // validation messages are pluralized properly even when the default locale gets changed because they are in + // English. + $translator->setLocale('en'); + } + + $contextFactory = new ExecutionContextFactory($translator, $this->translationDomain); + + return new RecursiveValidator($contextFactory, $metadataFactory, $validatorFactory, $this->initializers); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/ValidatorBuilderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/ValidatorBuilderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e4bd1040133d5f2801aa170749efd9e4ec0dc643 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/ValidatorBuilderInterface.php @@ -0,0 +1,170 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Doctrine\Common\Annotations\Reader; +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Mapping\Cache\CacheInterface; +use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; +use Symfony\Component\Validator\Validator\ValidatorInterface; + +/** + * A configurable builder for ValidatorInterface objects. + * + * @author Bernhard Schussek + */ +interface ValidatorBuilderInterface +{ + /** + * Adds an object initializer to the validator. + * + * @param ObjectInitializerInterface $initializer The initializer + * + * @return $this + */ + public function addObjectInitializer(ObjectInitializerInterface $initializer); + + /** + * Adds a list of object initializers to the validator. + * + * @param array $initializers The initializer + * + * @return $this + */ + public function addObjectInitializers(array $initializers); + + /** + * Adds an XML constraint mapping file to the validator. + * + * @param string $path The path to the mapping file + * + * @return $this + */ + public function addXmlMapping($path); + + /** + * Adds a list of XML constraint mapping files to the validator. + * + * @param array $paths The paths to the mapping files + * + * @return $this + */ + public function addXmlMappings(array $paths); + + /** + * Adds a YAML constraint mapping file to the validator. + * + * @param string $path The path to the mapping file + * + * @return $this + */ + public function addYamlMapping($path); + + /** + * Adds a list of YAML constraint mappings file to the validator. + * + * @param array $paths The paths to the mapping files + * + * @return $this + */ + public function addYamlMappings(array $paths); + + /** + * Enables constraint mapping using the given static method. + * + * @param string $methodName The name of the method + * + * @return $this + */ + public function addMethodMapping($methodName); + + /** + * Enables constraint mapping using the given static methods. + * + * @param array $methodNames The names of the methods + * + * @return $this + */ + public function addMethodMappings(array $methodNames); + + /** + * Enables annotation based constraint mapping. + * + * @param Reader $annotationReader The annotation reader to be used + * + * @return $this + */ + public function enableAnnotationMapping(Reader $annotationReader = null); + + /** + * Disables annotation based constraint mapping. + * + * @return $this + */ + public function disableAnnotationMapping(); + + /** + * Sets the class metadata factory used by the validator. + * + * @param MetadataFactoryInterface $metadataFactory The metadata factory + * + * @return $this + */ + public function setMetadataFactory(MetadataFactoryInterface $metadataFactory); + + /** + * Sets the cache for caching class metadata. + * + * @param CacheInterface $cache The cache instance + * + * @return $this + */ + public function setMetadataCache(CacheInterface $cache); + + /** + * Sets the constraint validator factory used by the validator. + * + * @param ConstraintValidatorFactoryInterface $validatorFactory The validator factory + * + * @return $this + */ + public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $validatorFactory); + + /** + * Sets the translator used for translating violation messages. + * + * @param TranslatorInterface $translator The translator instance + * + * @return $this + */ + public function setTranslator(TranslatorInterface $translator); + + /** + * Sets the default translation domain of violation messages. + * + * The same message can have different translations in different domains. + * Pass the domain that is used for violation messages by default to this + * method. + * + * @param string $translationDomain The translation domain of the violation messages + * + * @return $this + */ + public function setTranslationDomain($translationDomain); + + /** + * Builds and returns a new validator object. + * + * @return ValidatorInterface The built validator + */ + public function getValidator(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..bf887a08ec2b80b5b07eedc06737c3ef95fae95a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php @@ -0,0 +1,224 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Violation; + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationList; +use Symfony\Component\Validator\Util\PropertyPath; + +/** + * Default implementation of {@link ConstraintViolationBuilderInterface}. + * + * @author Bernhard Schussek + * + * @internal You should not instantiate or use this class. Code against + * {@link ConstraintViolationBuilderInterface} instead. + */ +class ConstraintViolationBuilder implements ConstraintViolationBuilderInterface +{ + /** + * @var ConstraintViolationList + */ + private $violations; + + /** + * @var string + */ + private $message; + + /** + * @var array + */ + private $parameters; + + /** + * @var mixed + */ + private $root; + + /** + * @var mixed + */ + private $invalidValue; + + /** + * @var string + */ + private $propertyPath; + + /** + * @var TranslatorInterface + */ + private $translator; + + /** + * @var string|null + */ + private $translationDomain; + + /** + * @var int|null + */ + private $plural; + + /** + * @var Constraint + */ + private $constraint; + + /** + * @var mixed + */ + private $code; + + /** + * @var mixed + */ + private $cause; + + public function __construct(ConstraintViolationList $violations, Constraint $constraint, $message, array $parameters, $root, $propertyPath, $invalidValue, TranslatorInterface $translator, $translationDomain = null) + { + $this->violations = $violations; + $this->message = $message; + $this->parameters = $parameters; + $this->root = $root; + $this->propertyPath = $propertyPath; + $this->invalidValue = $invalidValue; + $this->translator = $translator; + $this->translationDomain = $translationDomain; + $this->constraint = $constraint; + } + + /** + * {@inheritdoc} + */ + public function atPath($path) + { + $this->propertyPath = PropertyPath::append($this->propertyPath, $path); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setParameter($key, $value) + { + $this->parameters[$key] = $value; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setParameters(array $parameters) + { + $this->parameters = $parameters; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setTranslationDomain($translationDomain) + { + $this->translationDomain = $translationDomain; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setInvalidValue($invalidValue) + { + $this->invalidValue = $invalidValue; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setPlural($number) + { + $this->plural = $number; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setCode($code) + { + $this->code = $code; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setCause($cause) + { + $this->cause = $cause; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addViolation() + { + if (null === $this->plural) { + $translatedMessage = $this->translator->trans( + $this->message, + $this->parameters, + $this->translationDomain + ); + } else { + try { + $translatedMessage = $this->translator->transChoice( + $this->message, + $this->plural, + $this->parameters, + $this->translationDomain + ); + } catch (\InvalidArgumentException $e) { + $translatedMessage = $this->translator->trans( + $this->message, + $this->parameters, + $this->translationDomain + ); + } + } + + $this->violations->add(new ConstraintViolation( + $translatedMessage, + $this->message, + $this->parameters, + $this->root, + $this->propertyPath, + $this->invalidValue, + $this->plural, + $this->code, + $this->constraint, + $this->cause + )); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilderInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..811b4842e888d83bfa91b3942cbb5e529849311d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilderInterface.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\Validator\Violation; + +/** + * Builds {@link \Symfony\Component\Validator\ConstraintViolationInterface} + * objects. + * + * Use the various methods on this interface to configure the built violation. + * Finally, call {@link addViolation()} to add the violation to the current + * execution context. + * + * @author Bernhard Schussek + */ +interface ConstraintViolationBuilderInterface +{ + /** + * Stores the property path at which the violation should be generated. + * + * The passed path will be appended to the current property path of the + * execution context. + * + * @param string $path The property path + * + * @return $this + */ + public function atPath($path); + + /** + * Sets a parameter to be inserted into the violation message. + * + * @param string $key The name of the parameter + * @param string $value The value to be inserted in the parameter's place + * + * @return $this + */ + public function setParameter($key, $value); + + /** + * Sets all parameters to be inserted into the violation message. + * + * @param array $parameters An array with the parameter names as keys and + * the values to be inserted in their place as + * values + * + * @return $this + */ + public function setParameters(array $parameters); + + /** + * Sets the translation domain which should be used for translating the + * violation message. + * + * @param string $translationDomain The translation domain + * + * @return $this + * + * @see \Symfony\Component\Translation\TranslatorInterface + */ + public function setTranslationDomain($translationDomain); + + /** + * Sets the invalid value that caused this violation. + * + * @param mixed $invalidValue The invalid value + * + * @return $this + */ + public function setInvalidValue($invalidValue); + + /** + * Sets the number which determines how the plural form of the violation + * message is chosen when it is translated. + * + * @param int $number The number for determining the plural form + * + * @return $this + * + * @see \Symfony\Component\Translation\TranslatorInterface::transChoice() + */ + public function setPlural($number); + + /** + * Sets the violation code. + * + * @param string|null $code The violation code + * + * @return $this + */ + public function setCode($code); + + /** + * Sets the cause of the violation. + * + * @param mixed $cause The cause of the violation + * + * @return $this + */ + public function setCause($cause); + + /** + * Adds the violation to the current execution context. + */ + public function addViolation(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Validator/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..f17085aa98c45e9e1d3e8c5e8fbdc7dc6cf999bd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/composer.json @@ -0,0 +1,61 @@ +{ + "name": "symfony/validator", + "type": "library", + "description": "Symfony Validator Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation": "~2.8|~3.0" + }, + "require-dev": { + "symfony/http-foundation": "~2.8|~3.0", + "symfony/intl": "^2.8.18|^3.2.5", + "symfony/yaml": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/cache": "~3.1", + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", + "egulias/email-validator": "^1.2.8|~2.0" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "suggest": { + "psr/cache-implementation": "For using the metadata cache.", + "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", + "doctrine/cache": "For using the default cached annotation reader and metadata cache.", + "symfony/http-foundation": "", + "symfony/intl": "", + "symfony/yaml": "", + "symfony/config": "", + "egulias/email-validator": "Strict (RFC compliant) email validation", + "symfony/property-access": "For using the Expression validator", + "symfony/expression-language": "For using the Expression validator" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Validator\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Validator/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Validator/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..cf8c343863e5dcdbb0d0734a27e5fd8500c5a35e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Validator/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..6b08aa77ac7b1a92657c5ad5c4a8a5de73443cd7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/CHANGELOG.md @@ -0,0 +1,7 @@ +CHANGELOG +========= + +2.7.0 +----- + + * deprecated Cloner\Data::getLimitedClone(). Use withMaxDepth, withMaxItemsPerDepth or withRefHandles instead. diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/AmqpCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/AmqpCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..655262f4065ec5beb3978ad49a13f31e2b46b864 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/AmqpCaster.php @@ -0,0 +1,210 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Amqp related classes to array representation. + * + * @author Grégoire Pineau + */ +class AmqpCaster +{ + private static $flags = array( + AMQP_DURABLE => 'AMQP_DURABLE', + AMQP_PASSIVE => 'AMQP_PASSIVE', + AMQP_EXCLUSIVE => 'AMQP_EXCLUSIVE', + AMQP_AUTODELETE => 'AMQP_AUTODELETE', + AMQP_INTERNAL => 'AMQP_INTERNAL', + AMQP_NOLOCAL => 'AMQP_NOLOCAL', + AMQP_AUTOACK => 'AMQP_AUTOACK', + AMQP_IFEMPTY => 'AMQP_IFEMPTY', + AMQP_IFUNUSED => 'AMQP_IFUNUSED', + AMQP_MANDATORY => 'AMQP_MANDATORY', + AMQP_IMMEDIATE => 'AMQP_IMMEDIATE', + AMQP_MULTIPLE => 'AMQP_MULTIPLE', + AMQP_NOWAIT => 'AMQP_NOWAIT', + AMQP_REQUEUE => 'AMQP_REQUEUE', + ); + + private static $exchangeTypes = array( + AMQP_EX_TYPE_DIRECT => 'AMQP_EX_TYPE_DIRECT', + AMQP_EX_TYPE_FANOUT => 'AMQP_EX_TYPE_FANOUT', + AMQP_EX_TYPE_TOPIC => 'AMQP_EX_TYPE_TOPIC', + AMQP_EX_TYPE_HEADERS => 'AMQP_EX_TYPE_HEADERS', + ); + + public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += array( + $prefix.'is_connected' => $c->isConnected(), + ); + + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPConnection\x00login"])) { + return $a; + } + + // BC layer in the amqp lib + if (method_exists($c, 'getReadTimeout')) { + $timeout = $c->getReadTimeout(); + } else { + $timeout = $c->getTimeout(); + } + + $a += array( + $prefix.'is_connected' => $c->isConnected(), + $prefix.'login' => $c->getLogin(), + $prefix.'password' => $c->getPassword(), + $prefix.'host' => $c->getHost(), + $prefix.'vhost' => $c->getVhost(), + $prefix.'port' => $c->getPort(), + $prefix.'read_timeout' => $timeout, + ); + + return $a; + } + + public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += array( + $prefix.'is_connected' => $c->isConnected(), + $prefix.'channel_id' => $c->getChannelId(), + ); + + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPChannel\x00connection"])) { + return $a; + } + + $a += array( + $prefix.'connection' => $c->getConnection(), + $prefix.'prefetch_size' => $c->getPrefetchSize(), + $prefix.'prefetch_count' => $c->getPrefetchCount(), + ); + + return $a; + } + + public static function castQueue(\AMQPQueue $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += array( + $prefix.'flags' => self::extractFlags($c->getFlags()), + ); + + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPQueue\x00name"])) { + return $a; + } + + $a += array( + $prefix.'connection' => $c->getConnection(), + $prefix.'channel' => $c->getChannel(), + $prefix.'name' => $c->getName(), + $prefix.'arguments' => $c->getArguments(), + ); + + return $a; + } + + public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += array( + $prefix.'flags' => self::extractFlags($c->getFlags()), + ); + + $type = isset(self::$exchangeTypes[$c->getType()]) ? new ConstStub(self::$exchangeTypes[$c->getType()], $c->getType()) : $c->getType(); + + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPExchange\x00name"])) { + $a["\x00AMQPExchange\x00type"] = $type; + + return $a; + } + + $a += array( + $prefix.'connection' => $c->getConnection(), + $prefix.'channel' => $c->getChannel(), + $prefix.'name' => $c->getName(), + $prefix.'type' => $type, + $prefix.'arguments' => $c->getArguments(), + ); + + return $a; + } + + public static function castEnvelope(\AMQPEnvelope $c, array $a, Stub $stub, $isNested, $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $deliveryMode = new ConstStub($c->getDeliveryMode().(2 === $c->getDeliveryMode() ? ' (persistent)' : ' (non-persistent)'), $c->getDeliveryMode()); + + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPEnvelope\x00body"])) { + $a["\0AMQPEnvelope\0delivery_mode"] = $deliveryMode; + + return $a; + } + + if (!($filter & Caster::EXCLUDE_VERBOSE)) { + $a += array($prefix.'body' => $c->getBody()); + } + + $a += array( + $prefix.'delivery_tag' => $c->getDeliveryTag(), + $prefix.'is_redelivery' => $c->isRedelivery(), + $prefix.'exchange_name' => $c->getExchangeName(), + $prefix.'routing_key' => $c->getRoutingKey(), + $prefix.'content_type' => $c->getContentType(), + $prefix.'content_encoding' => $c->getContentEncoding(), + $prefix.'headers' => $c->getHeaders(), + $prefix.'delivery_mode' => $deliveryMode, + $prefix.'priority' => $c->getPriority(), + $prefix.'correlation_id' => $c->getCorrelationId(), + $prefix.'reply_to' => $c->getReplyTo(), + $prefix.'expiration' => $c->getExpiration(), + $prefix.'message_id' => $c->getMessageId(), + $prefix.'timestamp' => $c->getTimeStamp(), + $prefix.'type' => $c->getType(), + $prefix.'user_id' => $c->getUserId(), + $prefix.'app_id' => $c->getAppId(), + ); + + return $a; + } + + private static function extractFlags($flags) + { + $flagsArray = array(); + + foreach (self::$flags as $value => $name) { + if ($flags & $value) { + $flagsArray[] = $name; + } + } + + if (!$flagsArray) { + $flagsArray = array('AMQP_NOPARAM'); + } + + return new ConstStub(implode('|', $flagsArray), $flags); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ArgsStub.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ArgsStub.php new file mode 100644 index 0000000000000000000000000000000000000000..6675caa0478b9af99ae0a8bbab69c2317be6f646 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ArgsStub.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents a list of function arguments. + * + * @author Nicolas Grekas + */ +class ArgsStub extends EnumStub +{ + private static $parameters = array(); + + public function __construct(array $args, $function, $class) + { + list($variadic, $params) = self::getParameters($function, $class); + + $values = array(); + foreach ($args as $k => $v) { + $values[$k] = !is_scalar($v) && !$v instanceof Stub ? new CutStub($v) : $v; + } + if (null === $params) { + parent::__construct($values, false); + + return; + } + if (count($values) < count($params)) { + $params = array_slice($params, 0, count($values)); + } elseif (count($values) > count($params)) { + $values[] = new EnumStub(array_splice($values, count($params)), false); + $params[] = $variadic; + } + if (array('...') === $params) { + $this->dumpKeys = false; + $this->value = $values[0]->value; + } else { + $this->value = array_combine($params, $values); + } + } + + private static function getParameters($function, $class) + { + if (isset(self::$parameters[$k = $class.'::'.$function])) { + return self::$parameters[$k]; + } + + try { + $r = null !== $class ? new \ReflectionMethod($class, $function) : new \ReflectionFunction($function); + } catch (\ReflectionException $e) { + return array(null, null); + } + + $variadic = '...'; + $params = array(); + foreach ($r->getParameters() as $v) { + $k = '$'.$v->name; + if ($v->isPassedByReference()) { + $k = '&'.$k; + } + if (method_exists($v, 'isVariadic') && $v->isVariadic()) { + $variadic .= $k; + } else { + $params[] = $k; + } + } + + return self::$parameters[$k] = array($variadic, $params); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/Caster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/Caster.php new file mode 100644 index 0000000000000000000000000000000000000000..5428fecc2b27bc213dac5d0402f2eb5852b0712a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/Caster.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Helper for filtering out properties in casters. + * + * @author Nicolas Grekas + */ +class Caster +{ + const EXCLUDE_VERBOSE = 1; + const EXCLUDE_VIRTUAL = 2; + const EXCLUDE_DYNAMIC = 4; + const EXCLUDE_PUBLIC = 8; + const EXCLUDE_PROTECTED = 16; + const EXCLUDE_PRIVATE = 32; + const EXCLUDE_NULL = 64; + const EXCLUDE_EMPTY = 128; + const EXCLUDE_NOT_IMPORTANT = 256; + const EXCLUDE_STRICT = 512; + + const PREFIX_VIRTUAL = "\0~\0"; + const PREFIX_DYNAMIC = "\0+\0"; + const PREFIX_PROTECTED = "\0*\0"; + + /** + * Casts objects to arrays and adds the dynamic property prefix. + * + * @param object $obj The object to cast + * @param \ReflectionClass $reflector The class reflector to use for inspecting the object definition + * + * @return array The array-cast of the object, with prefixed dynamic properties + */ + public static function castObject($obj, \ReflectionClass $reflector) + { + if ($reflector->hasMethod('__debugInfo')) { + $a = $obj->__debugInfo(); + } elseif ($obj instanceof \Closure) { + $a = array(); + } else { + $a = (array) $obj; + } + if ($obj instanceof \__PHP_Incomplete_Class) { + return $a; + } + + if ($a) { + $combine = false; + $p = array_keys($a); + foreach ($p as $i => $k) { + if (isset($k[0]) && "\0" !== $k[0] && !$reflector->hasProperty($k)) { + $combine = true; + $p[$i] = self::PREFIX_DYNAMIC.$k; + } elseif (isset($k[16]) && "\0" === $k[16] && 0 === strpos($k, "\0class@anonymous\0")) { + $combine = true; + $p[$i] = "\0".$reflector->getParentClass().'@anonymous'.strrchr($k, "\0"); + } + } + if ($combine) { + $a = array_combine($p, $a); + } + } + + return $a; + } + + /** + * Filters out the specified properties. + * + * By default, a single match in the $filter bit field filters properties out, following an "or" logic. + * When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed. + * + * @param array $a The array containing the properties to filter + * @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out + * @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set + * @param int &$count Set to the number of removed properties + * + * @return array The filtered array + */ + public static function filter(array $a, $filter, array $listedProperties = array(), &$count = 0) + { + $count = 0; + + foreach ($a as $k => $v) { + $type = self::EXCLUDE_STRICT & $filter; + + if (null === $v) { + $type |= self::EXCLUDE_NULL & $filter; + } + if (empty($v)) { + $type |= self::EXCLUDE_EMPTY & $filter; + } + if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !in_array($k, $listedProperties, true)) { + $type |= self::EXCLUDE_NOT_IMPORTANT; + } + if ((self::EXCLUDE_VERBOSE & $filter) && in_array($k, $listedProperties, true)) { + $type |= self::EXCLUDE_VERBOSE; + } + + if (!isset($k[1]) || "\0" !== $k[0]) { + $type |= self::EXCLUDE_PUBLIC & $filter; + } elseif ('~' === $k[1]) { + $type |= self::EXCLUDE_VIRTUAL & $filter; + } elseif ('+' === $k[1]) { + $type |= self::EXCLUDE_DYNAMIC & $filter; + } elseif ('*' === $k[1]) { + $type |= self::EXCLUDE_PROTECTED & $filter; + } else { + $type |= self::EXCLUDE_PRIVATE & $filter; + } + + if ((self::EXCLUDE_STRICT & $filter) ? $type === $filter : $type) { + unset($a[$k]); + ++$count; + } + } + + return $a; + } + + public static function castPhpIncompleteClass(\__PHP_Incomplete_Class $c, array $a, Stub $stub, $isNested) + { + $stub->class .= '('.$a['__PHP_Incomplete_Class_Name'].')'; + unset($a['__PHP_Incomplete_Class_Name']); + + return $a; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ClassStub.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ClassStub.php new file mode 100644 index 0000000000000000000000000000000000000000..59efecda9ebe69dda88b0c247d7349112c690525 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ClassStub.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +/** + * Represents a PHP class identifier. + * + * @author Nicolas Grekas + */ +class ClassStub extends ConstStub +{ + /** + * Constructor. + * + * @param string A PHP identifier, e.g. a class, method, interface, etc. name + * @param callable The callable targeted by the identifier when it is ambiguous or not a real PHP identifier + */ + public function __construct($identifier, $callable = null) + { + $this->value = $identifier; + + if (0 < $i = strrpos($identifier, '\\')) { + $this->attr['ellipsis'] = strlen($identifier) - $i; + } + + try { + if (null !== $callable) { + if ($callable instanceof \Closure) { + $r = new \ReflectionFunction($callable); + } elseif (is_object($callable)) { + $r = array($callable, '__invoke'); + } elseif (is_array($callable)) { + $r = $callable; + } elseif (false !== $i = strpos($callable, '::')) { + $r = array(substr($callable, 0, $i), substr($callable, 2 + $i)); + } else { + $r = new \ReflectionFunction($callable); + } + } elseif (false !== $i = strpos($identifier, '::')) { + $r = array(substr($identifier, 0, $i), substr($identifier, 2 + $i)); + } else { + $r = new \ReflectionClass($identifier); + } + + if (is_array($r)) { + try { + $r = new \ReflectionMethod($r[0], $r[1]); + } catch (\ReflectionException $e) { + $r = new \ReflectionClass($r[0]); + } + } + } catch (\ReflectionException $e) { + return; + } + + if ($f = $r->getFileName()) { + $this->attr['file'] = $f; + $this->attr['line'] = $r->getStartLine(); + } + } + + public static function wrapCallable($callable) + { + if (is_object($callable) || !is_callable($callable)) { + return $callable; + } + + if (!is_array($callable)) { + $callable = new static($callable); + } elseif (is_string($callable[0])) { + $callable[0] = new static($callable[0]); + } else { + $callable[1] = new static($callable[1], $callable); + } + + return $callable; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ConstStub.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ConstStub.php new file mode 100644 index 0000000000000000000000000000000000000000..26c0010b66a8cac06c3ce25e8b1c2ef08d0b013a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ConstStub.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents a PHP constant and its value. + * + * @author Nicolas Grekas + */ +class ConstStub extends Stub +{ + public function __construct($name, $value) + { + $this->class = $name; + $this->value = $value; + } + + public function __toString() + { + return (string) $this->value; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/CutArrayStub.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/CutArrayStub.php new file mode 100644 index 0000000000000000000000000000000000000000..f2a803053a6c06f299892894c10247d620bbde8e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/CutArrayStub.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\VarDumper\Caster; + +/** + * Represents a cut array. + * + * @author Nicolas Grekas + */ +class CutArrayStub extends CutStub +{ + public $preservedSubset; + + public function __construct(array $value, array $preservedKeys) + { + parent::__construct($value); + + $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys)); + $this->cut -= count($this->preservedSubset); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/CutStub.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/CutStub.php new file mode 100644 index 0000000000000000000000000000000000000000..61140eb361d9f2ef0509c4d5bbcd8097394a95d6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/CutStub.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents the main properties of a PHP variable, pre-casted by a caster. + * + * @author Nicolas Grekas + */ +class CutStub extends Stub +{ + public function __construct($value) + { + $this->value = $value; + + switch (gettype($value)) { + case 'object': + $this->type = self::TYPE_OBJECT; + $this->class = get_class($value); + $this->cut = -1; + break; + + case 'array': + $this->type = self::TYPE_ARRAY; + $this->class = self::ARRAY_ASSOC; + $this->cut = $this->value = count($value); + break; + + case 'resource': + case 'unknown type': + case 'resource (closed)': + $this->type = self::TYPE_RESOURCE; + $this->handle = (int) $value; + if ('Unknown' === $this->class = @get_resource_type($value)) { + $this->class = 'Closed'; + } + $this->cut = -1; + break; + + case 'string': + $this->type = self::TYPE_STRING; + $this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY; + $this->cut = self::STRING_BINARY === $this->class ? strlen($value) : mb_strlen($value, 'UTF-8'); + $this->value = ''; + break; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DOMCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DOMCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..3a99865370ca253b6cfd91bf3f80bf6b08ef6eac --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DOMCaster.php @@ -0,0 +1,302 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts DOM related classes to array representation. + * + * @author Nicolas Grekas + */ +class DOMCaster +{ + private static $errorCodes = array( + DOM_PHP_ERR => 'DOM_PHP_ERR', + DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', + DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', + DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', + DOM_WRONG_DOCUMENT_ERR => 'DOM_WRONG_DOCUMENT_ERR', + DOM_INVALID_CHARACTER_ERR => 'DOM_INVALID_CHARACTER_ERR', + DOM_NO_DATA_ALLOWED_ERR => 'DOM_NO_DATA_ALLOWED_ERR', + DOM_NO_MODIFICATION_ALLOWED_ERR => 'DOM_NO_MODIFICATION_ALLOWED_ERR', + DOM_NOT_FOUND_ERR => 'DOM_NOT_FOUND_ERR', + DOM_NOT_SUPPORTED_ERR => 'DOM_NOT_SUPPORTED_ERR', + DOM_INUSE_ATTRIBUTE_ERR => 'DOM_INUSE_ATTRIBUTE_ERR', + DOM_INVALID_STATE_ERR => 'DOM_INVALID_STATE_ERR', + DOM_SYNTAX_ERR => 'DOM_SYNTAX_ERR', + DOM_INVALID_MODIFICATION_ERR => 'DOM_INVALID_MODIFICATION_ERR', + DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', + DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', + DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR', + ); + + private static $nodeTypes = array( + XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', + XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', + XML_TEXT_NODE => 'XML_TEXT_NODE', + XML_CDATA_SECTION_NODE => 'XML_CDATA_SECTION_NODE', + XML_ENTITY_REF_NODE => 'XML_ENTITY_REF_NODE', + XML_ENTITY_NODE => 'XML_ENTITY_NODE', + XML_PI_NODE => 'XML_PI_NODE', + XML_COMMENT_NODE => 'XML_COMMENT_NODE', + XML_DOCUMENT_NODE => 'XML_DOCUMENT_NODE', + XML_DOCUMENT_TYPE_NODE => 'XML_DOCUMENT_TYPE_NODE', + XML_DOCUMENT_FRAG_NODE => 'XML_DOCUMENT_FRAG_NODE', + XML_NOTATION_NODE => 'XML_NOTATION_NODE', + XML_HTML_DOCUMENT_NODE => 'XML_HTML_DOCUMENT_NODE', + XML_DTD_NODE => 'XML_DTD_NODE', + XML_ELEMENT_DECL_NODE => 'XML_ELEMENT_DECL_NODE', + XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', + XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', + XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE', + ); + + public static function castException(\DOMException $e, array $a, Stub $stub, $isNested) + { + $k = Caster::PREFIX_PROTECTED.'code'; + if (isset($a[$k], self::$errorCodes[$a[$k]])) { + $a[$k] = new ConstStub(self::$errorCodes[$a[$k]], $a[$k]); + } + + return $a; + } + + public static function castLength($dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'length' => $dom->length, + ); + + return $a; + } + + public static function castImplementation($dom, array $a, Stub $stub, $isNested) + { + $a += array( + Caster::PREFIX_VIRTUAL.'Core' => '1.0', + Caster::PREFIX_VIRTUAL.'XML' => '2.0', + ); + + return $a; + } + + public static function castNode(\DOMNode $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'nodeName' => $dom->nodeName, + 'nodeValue' => new CutStub($dom->nodeValue), + 'nodeType' => new ConstStub(self::$nodeTypes[$dom->nodeType], $dom->nodeType), + 'parentNode' => new CutStub($dom->parentNode), + 'childNodes' => $dom->childNodes, + 'firstChild' => new CutStub($dom->firstChild), + 'lastChild' => new CutStub($dom->lastChild), + 'previousSibling' => new CutStub($dom->previousSibling), + 'nextSibling' => new CutStub($dom->nextSibling), + 'attributes' => $dom->attributes, + 'ownerDocument' => new CutStub($dom->ownerDocument), + 'namespaceURI' => $dom->namespaceURI, + 'prefix' => $dom->prefix, + 'localName' => $dom->localName, + 'baseURI' => $dom->baseURI ? new LinkStub($dom->baseURI) : $dom->baseURI, + 'textContent' => new CutStub($dom->textContent), + ); + + return $a; + } + + public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'nodeName' => $dom->nodeName, + 'nodeValue' => new CutStub($dom->nodeValue), + 'nodeType' => new ConstStub(self::$nodeTypes[$dom->nodeType], $dom->nodeType), + 'prefix' => $dom->prefix, + 'localName' => $dom->localName, + 'namespaceURI' => $dom->namespaceURI, + 'ownerDocument' => new CutStub($dom->ownerDocument), + 'parentNode' => new CutStub($dom->parentNode), + ); + + return $a; + } + + public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, $isNested, $filter = 0) + { + $a += array( + 'doctype' => $dom->doctype, + 'implementation' => $dom->implementation, + 'documentElement' => new CutStub($dom->documentElement), + 'actualEncoding' => $dom->actualEncoding, + 'encoding' => $dom->encoding, + 'xmlEncoding' => $dom->xmlEncoding, + 'standalone' => $dom->standalone, + 'xmlStandalone' => $dom->xmlStandalone, + 'version' => $dom->version, + 'xmlVersion' => $dom->xmlVersion, + 'strictErrorChecking' => $dom->strictErrorChecking, + 'documentURI' => $dom->documentURI ? new LinkStub($dom->documentURI) : $dom->documentURI, + 'config' => $dom->config, + 'formatOutput' => $dom->formatOutput, + 'validateOnParse' => $dom->validateOnParse, + 'resolveExternals' => $dom->resolveExternals, + 'preserveWhiteSpace' => $dom->preserveWhiteSpace, + 'recover' => $dom->recover, + 'substituteEntities' => $dom->substituteEntities, + ); + + if (!($filter & Caster::EXCLUDE_VERBOSE)) { + $formatOutput = $dom->formatOutput; + $dom->formatOutput = true; + $a += array(Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML()); + $dom->formatOutput = $formatOutput; + } + + return $a; + } + + public static function castCharacterData(\DOMCharacterData $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'data' => $dom->data, + 'length' => $dom->length, + ); + + return $a; + } + + public static function castAttr(\DOMAttr $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'name' => $dom->name, + 'specified' => $dom->specified, + 'value' => $dom->value, + 'ownerElement' => $dom->ownerElement, + 'schemaTypeInfo' => $dom->schemaTypeInfo, + ); + + return $a; + } + + public static function castElement(\DOMElement $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'tagName' => $dom->tagName, + 'schemaTypeInfo' => $dom->schemaTypeInfo, + ); + + return $a; + } + + public static function castText(\DOMText $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'wholeText' => $dom->wholeText, + ); + + return $a; + } + + public static function castTypeinfo(\DOMTypeinfo $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'typeName' => $dom->typeName, + 'typeNamespace' => $dom->typeNamespace, + ); + + return $a; + } + + public static function castDomError(\DOMDomError $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'severity' => $dom->severity, + 'message' => $dom->message, + 'type' => $dom->type, + 'relatedException' => $dom->relatedException, + 'related_data' => $dom->related_data, + 'location' => $dom->location, + ); + + return $a; + } + + public static function castLocator(\DOMLocator $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'lineNumber' => $dom->lineNumber, + 'columnNumber' => $dom->columnNumber, + 'offset' => $dom->offset, + 'relatedNode' => $dom->relatedNode, + 'uri' => $dom->uri ? new LinkStub($dom->uri, $dom->lineNumber) : $dom->uri, + ); + + return $a; + } + + public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'name' => $dom->name, + 'entities' => $dom->entities, + 'notations' => $dom->notations, + 'publicId' => $dom->publicId, + 'systemId' => $dom->systemId, + 'internalSubset' => $dom->internalSubset, + ); + + return $a; + } + + public static function castNotation(\DOMNotation $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'publicId' => $dom->publicId, + 'systemId' => $dom->systemId, + ); + + return $a; + } + + public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'publicId' => $dom->publicId, + 'systemId' => $dom->systemId, + 'notationName' => $dom->notationName, + 'actualEncoding' => $dom->actualEncoding, + 'encoding' => $dom->encoding, + 'version' => $dom->version, + ); + + return $a; + } + + public static function castProcessingInstruction(\DOMProcessingInstruction $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'target' => $dom->target, + 'data' => $dom->data, + ); + + return $a; + } + + public static function castXPath(\DOMXPath $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'document' => $dom->document, + ); + + return $a; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DoctrineCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DoctrineCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..f6573b34fd1459b2d021f631d30add5e35a82ebb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/DoctrineCaster.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Doctrine\Common\Proxy\Proxy as CommonProxy; +use Doctrine\ORM\Proxy\Proxy as OrmProxy; +use Doctrine\ORM\PersistentCollection; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Doctrine related classes to array representation. + * + * @author Nicolas Grekas + */ +class DoctrineCaster +{ + public static function castCommonProxy(CommonProxy $proxy, array $a, Stub $stub, $isNested) + { + foreach (array('__cloner__', '__initializer__') as $k) { + if (array_key_exists($k, $a)) { + unset($a[$k]); + ++$stub->cut; + } + } + + return $a; + } + + public static function castOrmProxy(OrmProxy $proxy, array $a, Stub $stub, $isNested) + { + foreach (array('_entityPersister', '_identifier') as $k) { + if (array_key_exists($k = "\0Doctrine\\ORM\\Proxy\\Proxy\0".$k, $a)) { + unset($a[$k]); + ++$stub->cut; + } + } + + return $a; + } + + public static function castPersistentCollection(PersistentCollection $coll, array $a, Stub $stub, $isNested) + { + foreach (array('snapshot', 'association', 'typeClass') as $k) { + if (array_key_exists($k = "\0Doctrine\\ORM\\PersistentCollection\0".$k, $a)) { + $a[$k] = new CutStub($a[$k]); + } + } + + return $a; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/EnumStub.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/EnumStub.php new file mode 100644 index 0000000000000000000000000000000000000000..3cee23eac202b1dc7cad7e6ca3fb629110741e9d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/EnumStub.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\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents an enumeration of values. + * + * @author Nicolas Grekas + */ +class EnumStub extends Stub +{ + public $dumpKeys = true; + + public function __construct(array $values, $dumpKeys = true) + { + $this->value = $values; + $this->dumpKeys = $dumpKeys; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..aa32d8b90bb98d87c7ff139e329028da0d3f0de2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php @@ -0,0 +1,294 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Exception\ThrowingCasterException; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts common Exception classes to array representation. + * + * @author Nicolas Grekas + */ +class ExceptionCaster +{ + public static $srcContext = 1; + public static $traceArgs = true; + public static $errorTypes = array( + E_DEPRECATED => 'E_DEPRECATED', + E_USER_DEPRECATED => 'E_USER_DEPRECATED', + E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', + E_ERROR => 'E_ERROR', + E_WARNING => 'E_WARNING', + E_PARSE => 'E_PARSE', + E_NOTICE => 'E_NOTICE', + E_CORE_ERROR => 'E_CORE_ERROR', + E_CORE_WARNING => 'E_CORE_WARNING', + E_COMPILE_ERROR => 'E_COMPILE_ERROR', + E_COMPILE_WARNING => 'E_COMPILE_WARNING', + E_USER_ERROR => 'E_USER_ERROR', + E_USER_WARNING => 'E_USER_WARNING', + E_USER_NOTICE => 'E_USER_NOTICE', + E_STRICT => 'E_STRICT', + ); + + private static $framesCache = array(); + + public static function castError(\Error $e, array $a, Stub $stub, $isNested, $filter = 0) + { + return self::filterExceptionArray($stub->class, $a, "\0Error\0", $filter); + } + + public static function castException(\Exception $e, array $a, Stub $stub, $isNested, $filter = 0) + { + return self::filterExceptionArray($stub->class, $a, "\0Exception\0", $filter); + } + + public static function castErrorException(\ErrorException $e, array $a, Stub $stub, $isNested) + { + if (isset($a[$s = Caster::PREFIX_PROTECTED.'severity'], self::$errorTypes[$a[$s]])) { + $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); + } + + return $a; + } + + public static function castThrowingCasterException(ThrowingCasterException $e, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_PROTECTED; + $xPrefix = "\0Exception\0"; + + if (isset($a[$xPrefix.'previous'], $a[$xPrefix.'trace'])) { + $b = (array) $a[$xPrefix.'previous']; + self::traceUnshift($b[$xPrefix.'trace'], get_class($a[$xPrefix.'previous']), $b[$prefix.'file'], $b[$prefix.'line']); + $a[$xPrefix.'trace'] = new TraceStub($b[$xPrefix.'trace'], false, 0, -1 - count($a[$xPrefix.'trace']->value)); + } + + unset($a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']); + + return $a; + } + + public static function castTraceStub(TraceStub $trace, array $a, Stub $stub, $isNested) + { + if (!$isNested) { + return $a; + } + $stub->class = ''; + $stub->handle = 0; + $frames = $trace->value; + $prefix = Caster::PREFIX_VIRTUAL; + + $a = array(); + $j = count($frames); + if (0 > $i = $trace->sliceOffset) { + $i = max(0, $j + $i); + } + if (!isset($trace->value[$i])) { + return array(); + } + $lastCall = isset($frames[$i]['function']) ? (isset($frames[$i]['class']) ? $frames[0]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : ''; + $frames[] = array('function' => ''); + + for ($j += $trace->numberingOffset - $i++; isset($frames[$i]); ++$i, --$j) { + $f = $frames[$i]; + $call = isset($f['function']) ? (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'].'()' : '???'; + + $label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall; + $frame = new FrameStub( + array( + 'object' => isset($f['object']) ? $f['object'] : null, + 'class' => isset($f['class']) ? $f['class'] : null, + 'type' => isset($f['type']) ? $f['type'] : null, + 'function' => isset($f['function']) ? $f['function'] : null, + ) + $frames[$i - 1], + false, + true + ); + $f = self::castFrameStub($frame, array(), $frame, true); + if (isset($f[$prefix.'src'])) { + foreach ($f[$prefix.'src']->value as $label => $frame) { + $label = substr_replace($label, "title=Stack level $j.&", 2, 0); + } + $f = $frames[$i - 1]; + if ($trace->keepArgs && !empty($f['args']) && $frame instanceof EnumStub) { + $frame->value['arguments'] = new ArgsStub($f['args'], isset($f['function']) ? $f['function'] : null, isset($f['class']) ? $f['class'] : null); + } + } + $a[$label] = $frame; + + $lastCall = $call; + } + if (null !== $trace->sliceLength) { + $a = array_slice($a, 0, $trace->sliceLength, true); + } + + return $a; + } + + public static function castFrameStub(FrameStub $frame, array $a, Stub $stub, $isNested) + { + if (!$isNested) { + return $a; + } + $f = $frame->value; + $prefix = Caster::PREFIX_VIRTUAL; + + if (isset($f['file'], $f['line'])) { + $cacheKey = $f; + unset($cacheKey['object'], $cacheKey['args']); + $cacheKey[] = self::$srcContext; + $cacheKey = implode('-', $cacheKey); + + if (isset(self::$framesCache[$cacheKey])) { + $a[$prefix.'src'] = self::$framesCache[$cacheKey]; + } else { + if (preg_match('/\((\d+)\)(?:\([\da-f]{32}\))? : (?:eval\(\)\'d code|runtime-created function)$/', $f['file'], $match)) { + $f['file'] = substr($f['file'], 0, -strlen($match[0])); + $f['line'] = (int) $match[1]; + } + $caller = isset($f['function']) ? sprintf('in %s() on line %d', (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'], $f['line']) : null; + $src = $f['line']; + $srcKey = $f['file']; + $ellipsis = explode(DIRECTORY_SEPARATOR, $srcKey); + $ellipsis = 3 < count($ellipsis) ? 2 + strlen(implode(array_slice($ellipsis, -2))) : 0; + + if (file_exists($f['file']) && 0 <= self::$srcContext) { + if (!empty($f['class']) && is_subclass_of($f['class'], 'Twig_Template') && method_exists($f['class'], 'getDebugInfo')) { + $template = isset($f['object']) ? $f['object'] : unserialize(sprintf('O:%d:"%s":0:{}', strlen($f['class']), $f['class'])); + + $ellipsis = 0; + $templateSrc = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : ''); + $templateInfo = $template->getDebugInfo(); + if (isset($templateInfo[$f['line']])) { + if (!method_exists($template, 'getSourceContext') || !file_exists($templatePath = $template->getSourceContext()->getPath())) { + $templatePath = null; + } + if ($templateSrc) { + $src = self::extractSource($templateSrc, $templateInfo[$f['line']], self::$srcContext, $caller, 'twig', $templatePath); + $srcKey = ($templatePath ?: $template->getTemplateName()).':'.$templateInfo[$f['line']]; + } + } + } + if ($srcKey == $f['file']) { + $src = self::extractSource(file_get_contents($f['file']), $f['line'], self::$srcContext, $caller, 'php', $f['file']); + $srcKey .= ':'.$f['line']; + if ($ellipsis) { + $ellipsis += 1 + strlen($f['line']); + } + } + } + $srcAttr = $ellipsis ? 'ellipsis='.$ellipsis : ''; + self::$framesCache[$cacheKey] = $a[$prefix.'src'] = new EnumStub(array("\0~$srcAttr\0$srcKey" => $src)); + } + } + + unset($a[$prefix.'args'], $a[$prefix.'line'], $a[$prefix.'file']); + if ($frame->inTraceStub) { + unset($a[$prefix.'class'], $a[$prefix.'type'], $a[$prefix.'function']); + } + foreach ($a as $k => $v) { + if (!$v) { + unset($a[$k]); + } + } + if ($frame->keepArgs && !empty($f['args'])) { + $a[$prefix.'arguments'] = new ArgsStub($f['args'], $f['function'], $f['class']); + } + + return $a; + } + + private static function filterExceptionArray($xClass, array $a, $xPrefix, $filter) + { + if (isset($a[$xPrefix.'trace'])) { + $trace = $a[$xPrefix.'trace']; + unset($a[$xPrefix.'trace']); // Ensures the trace is always last + } else { + $trace = array(); + } + + if (!($filter & Caster::EXCLUDE_VERBOSE)) { + self::traceUnshift($trace, $xClass, $a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); + $a[$xPrefix.'trace'] = new TraceStub($trace, self::$traceArgs); + } + if (empty($a[$xPrefix.'previous'])) { + unset($a[$xPrefix.'previous']); + } + unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message'], $a[Caster::PREFIX_DYNAMIC.'__destructorException']); + + $a[Caster::PREFIX_PROTECTED.'file'] = new LinkStub($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); + + return $a; + } + + private static function traceUnshift(&$trace, $class, $file, $line) + { + if (isset($trace[0]['file'], $trace[0]['line']) && $trace[0]['file'] === $file && $trace[0]['line'] === $line) { + return; + } + array_unshift($trace, array( + 'function' => $class ? 'new '.$class : null, + 'file' => $file, + 'line' => $line, + )); + } + + private static function extractSource($srcLines, $line, $srcContext, $title, $lang, $file = null) + { + $srcLines = explode("\n", $srcLines); + $src = array(); + + for ($i = $line - 1 - $srcContext; $i <= $line - 1 + $srcContext; ++$i) { + $src[] = (isset($srcLines[$i]) ? $srcLines[$i] : '')."\n"; + } + + $srcLines = array(); + $ltrim = 0; + do { + $pad = null; + for ($i = $srcContext << 1; $i >= 0; --$i) { + if (isset($src[$i][$ltrim]) && "\r" !== ($c = $src[$i][$ltrim]) && "\n" !== $c) { + if (null === $pad) { + $pad = $c; + } + if ((' ' !== $c && "\t" !== $c) || $pad !== $c) { + break; + } + } + } + ++$ltrim; + } while (0 > $i && null !== $pad); + + --$ltrim; + + foreach ($src as $i => $c) { + if ($ltrim) { + $c = isset($c[$ltrim]) && "\r" !== $c[$ltrim] ? substr($c, $ltrim) : ltrim($c, " \t"); + } + $c = substr($c, 0, -1); + if ($i !== $srcContext) { + $c = new ConstStub('default', $c); + } else { + $c = new ConstStub($c, $title); + if (null !== $file) { + $c->attr['file'] = $file; + $c->attr['line'] = $line; + } + } + $c->attr['lang'] = $lang; + $srcLines[sprintf("\0~%d\0", $i + $line - $srcContext)] = $c; + } + + return new EnumStub($srcLines); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/FrameStub.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/FrameStub.php new file mode 100644 index 0000000000000000000000000000000000000000..1e1194dc85b89041be0bfb5a57071a05a4ba204a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/FrameStub.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\VarDumper\Caster; + +/** + * Represents a single backtrace frame as returned by debug_backtrace() or Exception->getTrace(). + * + * @author Nicolas Grekas + */ +class FrameStub extends EnumStub +{ + public $keepArgs; + public $inTraceStub; + + public function __construct(array $frame, $keepArgs = true, $inTraceStub = false) + { + $this->value = $frame; + $this->keepArgs = $keepArgs; + $this->inTraceStub = $inTraceStub; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/LinkStub.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/LinkStub.php new file mode 100644 index 0000000000000000000000000000000000000000..ea39c5b08eef74ae6ad336ba4092b00389cbcf16 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/LinkStub.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +/** + * Represents a file or a URL. + * + * @author Nicolas Grekas + */ +class LinkStub extends ConstStub +{ + public function __construct($label, $line = 0, $href = null) + { + $this->value = $label; + + if (null === $href) { + $href = $label; + } + if (is_string($href)) { + if (0 === strpos($href, 'file://')) { + if ($href === $label) { + $label = substr($label, 7); + } + $href = substr($href, 7); + } elseif (false !== strpos($href, '://')) { + $this->attr['href'] = $href; + + return; + } + if (file_exists($href)) { + if ($line) { + $this->attr['line'] = $line; + } + $this->attr['file'] = realpath($href) ?: $href; + + if ($this->attr['file'] === $label && 3 < count($ellipsis = explode(DIRECTORY_SEPARATOR, $href))) { + $this->attr['ellipsis'] = 2 + strlen(implode(array_slice($ellipsis, -2))); + } + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/MongoCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/MongoCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..92258f06fa23871b7f27b6c9de21549fba47f29f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/MongoCaster.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts classes from the MongoDb extension to array representation. + * + * @author Nicolas Grekas + */ +class MongoCaster +{ + public static function castCursor(\MongoCursorInterface $cursor, array $a, Stub $stub, $isNested) + { + if ($info = $cursor->info()) { + foreach ($info as $k => $v) { + $a[Caster::PREFIX_VIRTUAL.$k] = $v; + } + } + $a[Caster::PREFIX_VIRTUAL.'dead'] = $cursor->dead(); + + return $a; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PdoCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PdoCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..b86678247736ca10a91bef344c15dbcc012bc1d0 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PdoCaster.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts PDO related classes to array representation. + * + * @author Nicolas Grekas + */ +class PdoCaster +{ + private static $pdoAttributes = array( + 'CASE' => array( + \PDO::CASE_LOWER => 'LOWER', + \PDO::CASE_NATURAL => 'NATURAL', + \PDO::CASE_UPPER => 'UPPER', + ), + 'ERRMODE' => array( + \PDO::ERRMODE_SILENT => 'SILENT', + \PDO::ERRMODE_WARNING => 'WARNING', + \PDO::ERRMODE_EXCEPTION => 'EXCEPTION', + ), + 'TIMEOUT', + 'PREFETCH', + 'AUTOCOMMIT', + 'PERSISTENT', + 'DRIVER_NAME', + 'SERVER_INFO', + 'ORACLE_NULLS' => array( + \PDO::NULL_NATURAL => 'NATURAL', + \PDO::NULL_EMPTY_STRING => 'EMPTY_STRING', + \PDO::NULL_TO_STRING => 'TO_STRING', + ), + 'CLIENT_VERSION', + 'SERVER_VERSION', + 'STATEMENT_CLASS', + 'EMULATE_PREPARES', + 'CONNECTION_STATUS', + 'STRINGIFY_FETCHES', + 'DEFAULT_FETCH_MODE' => array( + \PDO::FETCH_ASSOC => 'ASSOC', + \PDO::FETCH_BOTH => 'BOTH', + \PDO::FETCH_LAZY => 'LAZY', + \PDO::FETCH_NUM => 'NUM', + \PDO::FETCH_OBJ => 'OBJ', + ), + ); + + public static function castPdo(\PDO $c, array $a, Stub $stub, $isNested) + { + $attr = array(); + $errmode = $c->getAttribute(\PDO::ATTR_ERRMODE); + $c->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); + + foreach (self::$pdoAttributes as $k => $v) { + if (!isset($k[0])) { + $k = $v; + $v = array(); + } + + try { + $attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(constant('PDO::ATTR_'.$k)); + if ($v && isset($v[$attr[$k]])) { + $attr[$k] = new ConstStub($v[$attr[$k]], $attr[$k]); + } + } catch (\Exception $e) { + } + } + if (isset($attr[$k = 'STATEMENT_CLASS'][1])) { + if ($attr[$k][1]) { + $attr[$k][1] = new ArgsStub($attr[$k][1], '__construct', $attr[$k][0]); + } + $attr[$k][0] = new ClassStub($attr[$k][0]); + } + + $prefix = Caster::PREFIX_VIRTUAL; + $a += array( + $prefix.'inTransaction' => method_exists($c, 'inTransaction'), + $prefix.'errorInfo' => $c->errorInfo(), + $prefix.'attributes' => new EnumStub($attr), + ); + + if ($a[$prefix.'inTransaction']) { + $a[$prefix.'inTransaction'] = $c->inTransaction(); + } else { + unset($a[$prefix.'inTransaction']); + } + + if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { + unset($a[$prefix.'errorInfo']); + } + + $c->setAttribute(\PDO::ATTR_ERRMODE, $errmode); + + return $a; + } + + public static function castPdoStatement(\PDOStatement $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $a[$prefix.'errorInfo'] = $c->errorInfo(); + + if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { + unset($a[$prefix.'errorInfo']); + } + + return $a; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PgSqlCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PgSqlCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..88414e4ccff265d256f8695565fc636771e5f134 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/PgSqlCaster.php @@ -0,0 +1,154 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts pqsql resources to array representation. + * + * @author Nicolas Grekas + */ +class PgSqlCaster +{ + private static $paramCodes = array( + 'server_encoding', + 'client_encoding', + 'is_superuser', + 'session_authorization', + 'DateStyle', + 'TimeZone', + 'IntervalStyle', + 'integer_datetimes', + 'application_name', + 'standard_conforming_strings', + ); + + private static $transactionStatus = array( + PGSQL_TRANSACTION_IDLE => 'PGSQL_TRANSACTION_IDLE', + PGSQL_TRANSACTION_ACTIVE => 'PGSQL_TRANSACTION_ACTIVE', + PGSQL_TRANSACTION_INTRANS => 'PGSQL_TRANSACTION_INTRANS', + PGSQL_TRANSACTION_INERROR => 'PGSQL_TRANSACTION_INERROR', + PGSQL_TRANSACTION_UNKNOWN => 'PGSQL_TRANSACTION_UNKNOWN', + ); + + private static $resultStatus = array( + PGSQL_EMPTY_QUERY => 'PGSQL_EMPTY_QUERY', + PGSQL_COMMAND_OK => 'PGSQL_COMMAND_OK', + PGSQL_TUPLES_OK => 'PGSQL_TUPLES_OK', + PGSQL_COPY_OUT => 'PGSQL_COPY_OUT', + PGSQL_COPY_IN => 'PGSQL_COPY_IN', + PGSQL_BAD_RESPONSE => 'PGSQL_BAD_RESPONSE', + PGSQL_NONFATAL_ERROR => 'PGSQL_NONFATAL_ERROR', + PGSQL_FATAL_ERROR => 'PGSQL_FATAL_ERROR', + ); + + private static $diagCodes = array( + 'severity' => PGSQL_DIAG_SEVERITY, + 'sqlstate' => PGSQL_DIAG_SQLSTATE, + 'message' => PGSQL_DIAG_MESSAGE_PRIMARY, + 'detail' => PGSQL_DIAG_MESSAGE_DETAIL, + 'hint' => PGSQL_DIAG_MESSAGE_HINT, + 'statement position' => PGSQL_DIAG_STATEMENT_POSITION, + 'internal position' => PGSQL_DIAG_INTERNAL_POSITION, + 'internal query' => PGSQL_DIAG_INTERNAL_QUERY, + 'context' => PGSQL_DIAG_CONTEXT, + 'file' => PGSQL_DIAG_SOURCE_FILE, + 'line' => PGSQL_DIAG_SOURCE_LINE, + 'function' => PGSQL_DIAG_SOURCE_FUNCTION, + ); + + public static function castLargeObject($lo, array $a, Stub $stub, $isNested) + { + $a['seek position'] = pg_lo_tell($lo); + + return $a; + } + + public static function castLink($link, array $a, Stub $stub, $isNested) + { + $a['status'] = pg_connection_status($link); + $a['status'] = new ConstStub(PGSQL_CONNECTION_OK === $a['status'] ? 'PGSQL_CONNECTION_OK' : 'PGSQL_CONNECTION_BAD', $a['status']); + $a['busy'] = pg_connection_busy($link); + + $a['transaction'] = pg_transaction_status($link); + if (isset(self::$transactionStatus[$a['transaction']])) { + $a['transaction'] = new ConstStub(self::$transactionStatus[$a['transaction']], $a['transaction']); + } + + $a['pid'] = pg_get_pid($link); + $a['last error'] = pg_last_error($link); + $a['last notice'] = pg_last_notice($link); + $a['host'] = pg_host($link); + $a['port'] = pg_port($link); + $a['dbname'] = pg_dbname($link); + $a['options'] = pg_options($link); + $a['version'] = pg_version($link); + + foreach (self::$paramCodes as $v) { + if (false !== $s = pg_parameter_status($link, $v)) { + $a['param'][$v] = $s; + } + } + + $a['param']['client_encoding'] = pg_client_encoding($link); + $a['param'] = new EnumStub($a['param']); + + return $a; + } + + public static function castResult($result, array $a, Stub $stub, $isNested) + { + $a['num rows'] = pg_num_rows($result); + $a['status'] = pg_result_status($result); + if (isset(self::$resultStatus[$a['status']])) { + $a['status'] = new ConstStub(self::$resultStatus[$a['status']], $a['status']); + } + $a['command-completion tag'] = pg_result_status($result, PGSQL_STATUS_STRING); + + if (-1 === $a['num rows']) { + foreach (self::$diagCodes as $k => $v) { + $a['error'][$k] = pg_result_error_field($result, $v); + } + } + + $a['affected rows'] = pg_affected_rows($result); + $a['last OID'] = pg_last_oid($result); + + $fields = pg_num_fields($result); + + for ($i = 0; $i < $fields; ++$i) { + $field = array( + 'name' => pg_field_name($result, $i), + 'table' => sprintf('%s (OID: %s)', pg_field_table($result, $i), pg_field_table($result, $i, true)), + 'type' => sprintf('%s (OID: %s)', pg_field_type($result, $i), pg_field_type_oid($result, $i)), + 'nullable' => (bool) pg_field_is_null($result, $i), + 'storage' => pg_field_size($result, $i).' bytes', + 'display' => pg_field_prtlen($result, $i).' chars', + ); + if (' (OID: )' === $field['table']) { + $field['table'] = null; + } + if ('-1 bytes' === $field['storage']) { + $field['storage'] = 'variable size'; + } elseif ('1 bytes' === $field['storage']) { + $field['storage'] = '1 byte'; + } + if ('1 chars' === $field['display']) { + $field['display'] = '1 char'; + } + $a['fields'][] = new EnumStub($field); + } + + return $a; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/RedisCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/RedisCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..7275a7d2c7f881ce50eaefd06f3a3f828a0129bf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/RedisCaster.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Redis class from ext-redis to array representation. + * + * @author Nicolas Grekas + */ +class RedisCaster +{ + private static $serializer = array( + \Redis::SERIALIZER_NONE => 'NONE', + \Redis::SERIALIZER_PHP => 'PHP', + 2 => 'IGBINARY', // Optional Redis::SERIALIZER_IGBINARY + ); + + public static function castRedis(\Redis $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + if (defined('HHVM_VERSION_ID')) { + $ser = $a[Caster::PREFIX_PROTECTED.'serializer']; + $a[Caster::PREFIX_PROTECTED.'serializer'] = isset(self::$serializer[$ser]) ? new ConstStub(self::$serializer[$ser], $ser) : $ser; + + return $a; + } + + if (!$connected = $c->isConnected()) { + return $a + array( + $prefix.'isConnected' => $connected, + ); + } + + $ser = $c->getOption(\Redis::OPT_SERIALIZER); + $retry = defined('Redis::OPT_SCAN') ? $c->getOption(\Redis::OPT_SCAN) : 0; + + return $a + array( + $prefix.'isConnected' => $connected, + $prefix.'host' => $c->getHost(), + $prefix.'port' => $c->getPort(), + $prefix.'auth' => $c->getAuth(), + $prefix.'dbNum' => $c->getDbNum(), + $prefix.'timeout' => $c->getTimeout(), + $prefix.'persistentId' => $c->getPersistentID(), + $prefix.'options' => new EnumStub(array( + 'READ_TIMEOUT' => $c->getOption(\Redis::OPT_READ_TIMEOUT), + 'SERIALIZER' => isset(self::$serializer[$ser]) ? new ConstStub(self::$serializer[$ser], $ser) : $ser, + 'PREFIX' => $c->getOption(\Redis::OPT_PREFIX), + 'SCAN' => new ConstStub($retry ? 'RETRY' : 'NORETRY', $retry), + )), + ); + } + + public static function castRedisArray(\RedisArray $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + return $a + array( + $prefix.'hosts' => $c->_hosts(), + $prefix.'function' => ClassStub::wrapCallable($c->_function()), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..dcb5a2f29ca347e835d8591d748edf8f802e882e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php @@ -0,0 +1,332 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Reflector related classes to array representation. + * + * @author Nicolas Grekas + */ +class ReflectionCaster +{ + private static $extraMap = array( + 'docComment' => 'getDocComment', + 'extension' => 'getExtensionName', + 'isDisabled' => 'isDisabled', + 'isDeprecated' => 'isDeprecated', + 'isInternal' => 'isInternal', + 'isUserDefined' => 'isUserDefined', + 'isGenerator' => 'isGenerator', + 'isVariadic' => 'isVariadic', + ); + + public static function castClosure(\Closure $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $c = new \ReflectionFunction($c); + + $stub->class = 'Closure'; // HHVM generates unique class names for closures + $a = static::castFunctionAbstract($c, $a, $stub, $isNested); + + if (isset($a[$prefix.'parameters'])) { + foreach ($a[$prefix.'parameters']->value as &$v) { + $param = $v; + $v = new EnumStub(array()); + foreach (static::castParameter($param, array(), $stub, true) as $k => $param) { + if ("\0" === $k[0]) { + $v->value[substr($k, 3)] = $param; + } + } + unset($v->value['position'], $v->value['isVariadic'], $v->value['byReference'], $v); + } + } + + if ($f = $c->getFileName()) { + $a[$prefix.'file'] = new LinkStub($f, $c->getStartLine()); + $a[$prefix.'line'] = $c->getStartLine().' to '.$c->getEndLine(); + } + + $prefix = Caster::PREFIX_DYNAMIC; + unset($a['name'], $a[$prefix.'this'], $a[$prefix.'parameter'], $a[Caster::PREFIX_VIRTUAL.'extra']); + + return $a; + } + + public static function castGenerator(\Generator $c, array $a, Stub $stub, $isNested) + { + if (!class_exists('ReflectionGenerator', false)) { + return $a; + } + + // Cannot create ReflectionGenerator based on a terminated Generator + try { + $reflectionGenerator = new \ReflectionGenerator($c); + } catch (\Exception $e) { + $a[Caster::PREFIX_VIRTUAL.'closed'] = true; + + return $a; + } + + return self::castReflectionGenerator($reflectionGenerator, $a, $stub, $isNested); + } + + public static function castType(\ReflectionType $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += array( + $prefix.'name' => $c instanceof \ReflectionNamedType ? $c->getName() : $c->__toString(), + $prefix.'allowsNull' => $c->allowsNull(), + $prefix.'isBuiltin' => $c->isBuiltin(), + ); + + return $a; + } + + public static function castReflectionGenerator(\ReflectionGenerator $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + if ($c->getThis()) { + $a[$prefix.'this'] = new CutStub($c->getThis()); + } + $function = $c->getFunction(); + $frame = array( + 'class' => isset($function->class) ? $function->class : null, + 'type' => isset($function->class) ? ($function->isStatic() ? '::' : '->') : null, + 'function' => $function->name, + 'file' => $c->getExecutingFile(), + 'line' => $c->getExecutingLine(), + ); + if ($trace = $c->getTrace(DEBUG_BACKTRACE_IGNORE_ARGS)) { + $function = new \ReflectionGenerator($c->getExecutingGenerator()); + array_unshift($trace, array( + 'function' => 'yield', + 'file' => $function->getExecutingFile(), + 'line' => $function->getExecutingLine() - 1, + )); + $trace[] = $frame; + $a[$prefix.'trace'] = new TraceStub($trace, false, 0, -1, -1); + } else { + $function = new FrameStub($frame, false, true); + $function = ExceptionCaster::castFrameStub($function, array(), $function, true); + $a[$prefix.'executing'] = new EnumStub(array( + $frame['class'].$frame['type'].$frame['function'].'()' => $function[$prefix.'src'], + )); + } + + $a[Caster::PREFIX_VIRTUAL.'closed'] = false; + + return $a; + } + + public static function castClass(\ReflectionClass $c, array $a, Stub $stub, $isNested, $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; + + if ($n = \Reflection::getModifierNames($c->getModifiers())) { + $a[$prefix.'modifiers'] = implode(' ', $n); + } + + self::addMap($a, $c, array( + 'extends' => 'getParentClass', + 'implements' => 'getInterfaceNames', + 'constants' => 'getConstants', + )); + + foreach ($c->getProperties() as $n) { + $a[$prefix.'properties'][$n->name] = $n; + } + + foreach ($c->getMethods() as $n) { + $a[$prefix.'methods'][$n->name] = $n; + } + + if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { + self::addExtra($a, $c); + } + + return $a; + } + + public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, array $a, Stub $stub, $isNested, $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; + + self::addMap($a, $c, array( + 'returnsReference' => 'returnsReference', + 'returnType' => 'getReturnType', + 'class' => 'getClosureScopeClass', + 'this' => 'getClosureThis', + )); + + if (isset($a[$prefix.'returnType'])) { + $v = $a[$prefix.'returnType']; + $v = $v instanceof \ReflectionNamedType ? $v->getName() : $v->__toString(); + $a[$prefix.'returnType'] = new ClassStub($a[$prefix.'returnType']->allowsNull() ? '?'.$v : $v, array(class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '')); + } + if (isset($a[$prefix.'class'])) { + $a[$prefix.'class'] = new ClassStub($a[$prefix.'class']); + } + if (isset($a[$prefix.'this'])) { + $a[$prefix.'this'] = new CutStub($a[$prefix.'this']); + } + + foreach ($c->getParameters() as $v) { + $k = '$'.$v->name; + if (method_exists($v, 'isVariadic') && $v->isVariadic()) { + $k = '...'.$k; + } + if ($v->isPassedByReference()) { + $k = '&'.$k; + } + $a[$prefix.'parameters'][$k] = $v; + } + if (isset($a[$prefix.'parameters'])) { + $a[$prefix.'parameters'] = new EnumStub($a[$prefix.'parameters']); + } + + if ($v = $c->getStaticVariables()) { + foreach ($v as $k => &$v) { + $a[$prefix.'use']['$'.$k] = &$v; + } + unset($v); + $a[$prefix.'use'] = new EnumStub($a[$prefix.'use']); + } + + if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { + self::addExtra($a, $c); + } + + // Added by HHVM + unset($a[Caster::PREFIX_DYNAMIC.'static']); + + return $a; + } + + public static function castMethod(\ReflectionMethod $c, array $a, Stub $stub, $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); + + return $a; + } + + public static function castParameter(\ReflectionParameter $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + // Added by HHVM + unset($a['info']); + + self::addMap($a, $c, array( + 'position' => 'getPosition', + 'isVariadic' => 'isVariadic', + 'byReference' => 'isPassedByReference', + 'allowsNull' => 'allowsNull', + )); + + if (method_exists($c, 'getType')) { + if ($v = $c->getType()) { + $a[$prefix.'typeHint'] = $v instanceof \ReflectionNamedType ? $v->getName() : $v->__toString(); + } + } elseif (preg_match('/^(?:[^ ]++ ){4}([a-zA-Z_\x7F-\xFF][^ ]++)/', $c, $v)) { + $a[$prefix.'typeHint'] = $v[1]; + } + + if (isset($a[$prefix.'typeHint'])) { + $v = $a[$prefix.'typeHint']; + $a[$prefix.'typeHint'] = new ClassStub($v, array(class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '')); + } else { + unset($a[$prefix.'allowsNull']); + } + + try { + $a[$prefix.'default'] = $v = $c->getDefaultValue(); + if (method_exists($c, 'isDefaultValueConstant') && $c->isDefaultValueConstant()) { + $a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v); + } + if (null === $v) { + unset($a[$prefix.'allowsNull']); + } + } catch (\ReflectionException $e) { + if (isset($a[$prefix.'typeHint']) && $c->allowsNull() && !class_exists('ReflectionNamedType', false)) { + $a[$prefix.'default'] = null; + unset($a[$prefix.'allowsNull']); + } + } + + return $a; + } + + public static function castProperty(\ReflectionProperty $c, array $a, Stub $stub, $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); + self::addExtra($a, $c); + + return $a; + } + + public static function castExtension(\ReflectionExtension $c, array $a, Stub $stub, $isNested) + { + self::addMap($a, $c, array( + 'version' => 'getVersion', + 'dependencies' => 'getDependencies', + 'iniEntries' => 'getIniEntries', + 'isPersistent' => 'isPersistent', + 'isTemporary' => 'isTemporary', + 'constants' => 'getConstants', + 'functions' => 'getFunctions', + 'classes' => 'getClasses', + )); + + return $a; + } + + public static function castZendExtension(\ReflectionZendExtension $c, array $a, Stub $stub, $isNested) + { + self::addMap($a, $c, array( + 'version' => 'getVersion', + 'author' => 'getAuthor', + 'copyright' => 'getCopyright', + 'url' => 'getURL', + )); + + return $a; + } + + private static function addExtra(&$a, \Reflector $c) + { + $x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : array(); + + if (method_exists($c, 'getFileName') && $m = $c->getFileName()) { + $x['file'] = new LinkStub($m, $c->getStartLine()); + $x['line'] = $c->getStartLine().' to '.$c->getEndLine(); + } + + self::addMap($x, $c, self::$extraMap, ''); + + if ($x) { + $a[Caster::PREFIX_VIRTUAL.'extra'] = new EnumStub($x); + } + } + + private static function addMap(&$a, \Reflector $c, $map, $prefix = Caster::PREFIX_VIRTUAL) + { + foreach ($map as $k => $m) { + if (method_exists($c, $m) && false !== ($m = $c->$m()) && null !== $m) { + $a[$prefix.$k] = $m instanceof \Reflector ? $m->name : $m; + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ResourceCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ResourceCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..bc9cb115264fbe3d262747bcdb346ce6a700f218 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/ResourceCaster.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts common resource types to array representation. + * + * @author Nicolas Grekas + */ +class ResourceCaster +{ + public static function castCurl($h, array $a, Stub $stub, $isNested) + { + return curl_getinfo($h); + } + + public static function castDba($dba, array $a, Stub $stub, $isNested) + { + $list = dba_list(); + $a['file'] = $list[(int) $dba]; + + return $a; + } + + public static function castProcess($process, array $a, Stub $stub, $isNested) + { + return proc_get_status($process); + } + + public static function castStream($stream, array $a, Stub $stub, $isNested) + { + $a = stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested); + if (isset($a['uri'])) { + $a['uri'] = new LinkStub($a['uri']); + } + + return $a; + } + + public static function castStreamContext($stream, array $a, Stub $stub, $isNested) + { + return stream_context_get_params($stream); + } + + public static function castGd($gd, array $a, Stub $stub, $isNested) + { + $a['size'] = imagesx($gd).'x'.imagesy($gd); + $a['trueColor'] = imageistruecolor($gd); + + return $a; + } + + public static function castMysqlLink($h, array $a, Stub $stub, $isNested) + { + $a['host'] = mysql_get_host_info($h); + $a['protocol'] = mysql_get_proto_info($h); + $a['server'] = mysql_get_server_info($h); + + return $a; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/SplCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/SplCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..2c676957584d6847ac767c0dd86bf9377c144c75 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/SplCaster.php @@ -0,0 +1,207 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts SPL related classes to array representation. + * + * @author Nicolas Grekas + */ +class SplCaster +{ + private static $splFileObjectFlags = array( + \SplFileObject::DROP_NEW_LINE => 'DROP_NEW_LINE', + \SplFileObject::READ_AHEAD => 'READ_AHEAD', + \SplFileObject::SKIP_EMPTY => 'SKIP_EMPTY', + \SplFileObject::READ_CSV => 'READ_CSV', + ); + + public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $class = $stub->class; + $flags = $c->getFlags(); + + $b = array( + $prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST), + $prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS), + $prefix.'iteratorClass' => new ClassStub($c->getIteratorClass()), + $prefix.'storage' => $c->getArrayCopy(), + ); + + if ($class === 'ArrayObject') { + $a = $b; + } else { + if (!($flags & \ArrayObject::STD_PROP_LIST)) { + $c->setFlags(\ArrayObject::STD_PROP_LIST); + $a = Caster::castObject($c, new \ReflectionClass($class)); + $c->setFlags($flags); + } + + $a += $b; + } + + return $a; + } + + public static function castHeap(\Iterator $c, array $a, Stub $stub, $isNested) + { + $a += array( + Caster::PREFIX_VIRTUAL.'heap' => iterator_to_array(clone $c), + ); + + return $a; + } + + public static function castDoublyLinkedList(\SplDoublyLinkedList $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $mode = $c->getIteratorMode(); + $c->setIteratorMode(\SplDoublyLinkedList::IT_MODE_KEEP | $mode & ~\SplDoublyLinkedList::IT_MODE_DELETE); + + $a += array( + $prefix.'mode' => new ConstStub((($mode & \SplDoublyLinkedList::IT_MODE_LIFO) ? 'IT_MODE_LIFO' : 'IT_MODE_FIFO').' | '.(($mode & \SplDoublyLinkedList::IT_MODE_DELETE) ? 'IT_MODE_DELETE' : 'IT_MODE_KEEP'), $mode), + $prefix.'dllist' => iterator_to_array($c), + ); + $c->setIteratorMode($mode); + + return $a; + } + + public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, $isNested) + { + static $map = array( + 'path' => 'getPath', + 'filename' => 'getFilename', + 'basename' => 'getBasename', + 'pathname' => 'getPathname', + 'extension' => 'getExtension', + 'realPath' => 'getRealPath', + 'aTime' => 'getATime', + 'mTime' => 'getMTime', + 'cTime' => 'getCTime', + 'inode' => 'getInode', + 'size' => 'getSize', + 'perms' => 'getPerms', + 'owner' => 'getOwner', + 'group' => 'getGroup', + 'type' => 'getType', + 'writable' => 'isWritable', + 'readable' => 'isReadable', + 'executable' => 'isExecutable', + 'file' => 'isFile', + 'dir' => 'isDir', + 'link' => 'isLink', + 'linkTarget' => 'getLinkTarget', + ); + + $prefix = Caster::PREFIX_VIRTUAL; + + foreach ($map as $key => $accessor) { + try { + $a[$prefix.$key] = $c->$accessor(); + } catch (\Exception $e) { + } + } + + if (isset($a[$prefix.'realPath'])) { + $a[$prefix.'realPath'] = new LinkStub($a[$prefix.'realPath']); + } + + if (isset($a[$prefix.'perms'])) { + $a[$prefix.'perms'] = new ConstStub(sprintf('0%o', $a[$prefix.'perms']), $a[$prefix.'perms']); + } + + static $mapDate = array('aTime', 'mTime', 'cTime'); + foreach ($mapDate as $key) { + if (isset($a[$prefix.$key])) { + $a[$prefix.$key] = new ConstStub(date('Y-m-d H:i:s', $a[$prefix.$key]), $a[$prefix.$key]); + } + } + + return $a; + } + + public static function castFileObject(\SplFileObject $c, array $a, Stub $stub, $isNested) + { + static $map = array( + 'csvControl' => 'getCsvControl', + 'flags' => 'getFlags', + 'maxLineLen' => 'getMaxLineLen', + 'fstat' => 'fstat', + 'eof' => 'eof', + 'key' => 'key', + ); + + $prefix = Caster::PREFIX_VIRTUAL; + + foreach ($map as $key => $accessor) { + try { + $a[$prefix.$key] = $c->$accessor(); + } catch (\Exception $e) { + } + } + + if (isset($a[$prefix.'flags'])) { + $flagsArray = array(); + foreach (self::$splFileObjectFlags as $value => $name) { + if ($a[$prefix.'flags'] & $value) { + $flagsArray[] = $name; + } + } + $a[$prefix.'flags'] = new ConstStub(implode('|', $flagsArray), $a[$prefix.'flags']); + } + + if (isset($a[$prefix.'fstat'])) { + $a[$prefix.'fstat'] = new CutArrayStub($a[$prefix.'fstat'], array('dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks')); + } + + return $a; + } + + public static function castFixedArray(\SplFixedArray $c, array $a, Stub $stub, $isNested) + { + $a += array( + Caster::PREFIX_VIRTUAL.'storage' => $c->toArray(), + ); + + return $a; + } + + public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $stub, $isNested) + { + $storage = array(); + unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967 + + foreach ($c as $obj) { + $storage[spl_object_hash($obj)] = array( + 'object' => $obj, + 'info' => $c->getInfo(), + ); + } + + $a += array( + Caster::PREFIX_VIRTUAL.'storage' => $storage, + ); + + return $a; + } + + public static function castOuterIterator(\OuterIterator $c, array $a, Stub $stub, $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'innerIterator'] = $c->getInnerIterator(); + + return $a; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/StubCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/StubCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..f8b13afcef4cca9b435145449e0e915acdd72882 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/StubCaster.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts a caster's Stub. + * + * @author Nicolas Grekas + */ +class StubCaster +{ + public static function castStub(Stub $c, array $a, Stub $stub, $isNested) + { + if ($isNested) { + $stub->type = $c->type; + $stub->class = $c->class; + $stub->value = $c->value; + $stub->handle = $c->handle; + $stub->cut = $c->cut; + $stub->attr = $c->attr; + + if (Stub::TYPE_REF === $c->type && !$c->class && is_string($c->value) && !preg_match('//u', $c->value)) { + $stub->type = Stub::TYPE_STRING; + $stub->class = Stub::STRING_BINARY; + } + + return array(); + } + } + + public static function castCutArray(CutArrayStub $c, array $a, Stub $stub, $isNested) + { + return $isNested ? $c->preservedSubset : $a; + } + + public static function cutInternals($obj, array $a, Stub $stub, $isNested) + { + if ($isNested) { + $stub->cut += count($a); + + return array(); + } + + return $a; + } + + public static function castEnum(EnumStub $c, array $a, Stub $stub, $isNested) + { + if ($isNested) { + $stub->class = $c->dumpKeys ? '' : null; + $stub->handle = 0; + $stub->value = null; + $stub->cut = $c->cut; + $stub->attr = $c->attr; + + $a = array(); + + if ($c->value) { + foreach (array_keys($c->value) as $k) { + $keys[] = !isset($k[0]) || "\0" !== $k[0] ? Caster::PREFIX_VIRTUAL.$k : $k; + } + // Preserve references with array_combine() + $a = array_combine($keys, $c->value); + } + } + + return $a; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/TraceStub.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/TraceStub.php new file mode 100644 index 0000000000000000000000000000000000000000..59548acaee61c8dbd93ee8492c4224ea36113186 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/TraceStub.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\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents a backtrace as returned by debug_backtrace() or Exception->getTrace(). + * + * @author Nicolas Grekas + */ +class TraceStub extends Stub +{ + public $keepArgs; + public $sliceOffset; + public $sliceLength; + public $numberingOffset; + + public function __construct(array $trace, $keepArgs = true, $sliceOffset = 0, $sliceLength = null, $numberingOffset = 0) + { + $this->value = $trace; + $this->keepArgs = $keepArgs; + $this->sliceOffset = $sliceOffset; + $this->sliceLength = $sliceLength; + $this->numberingOffset = $numberingOffset; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlReaderCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlReaderCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..c371009a17a283500d9ef10d1e13522aecd7a991 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlReaderCaster.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts XmlReader class to array representation. + * + * @author Baptiste Clavié + */ +class XmlReaderCaster +{ + private static $nodeTypes = array( + \XmlReader::NONE => 'NONE', + \XmlReader::ELEMENT => 'ELEMENT', + \XmlReader::ATTRIBUTE => 'ATTRIBUTE', + \XmlReader::TEXT => 'TEXT', + \XmlReader::CDATA => 'CDATA', + \XmlReader::ENTITY_REF => 'ENTITY_REF', + \XmlReader::ENTITY => 'ENTITY', + \XmlReader::PI => 'PI (Processing Instruction)', + \XmlReader::COMMENT => 'COMMENT', + \XmlReader::DOC => 'DOC', + \XmlReader::DOC_TYPE => 'DOC_TYPE', + \XmlReader::DOC_FRAGMENT => 'DOC_FRAGMENT', + \XmlReader::NOTATION => 'NOTATION', + \XmlReader::WHITESPACE => 'WHITESPACE', + \XmlReader::SIGNIFICANT_WHITESPACE => 'SIGNIFICANT_WHITESPACE', + \XmlReader::END_ELEMENT => 'END_ELEMENT', + \XmlReader::END_ENTITY => 'END_ENTITY', + \XmlReader::XML_DECLARATION => 'XML_DECLARATION', + ); + + public static function castXmlReader(\XmlReader $reader, array $a, Stub $stub, $isNested) + { + $props = Caster::PREFIX_VIRTUAL.'parserProperties'; + $info = array( + 'localName' => $reader->localName, + 'prefix' => $reader->prefix, + 'nodeType' => new ConstStub(self::$nodeTypes[$reader->nodeType], $reader->nodeType), + 'depth' => $reader->depth, + 'isDefault' => $reader->isDefault, + 'isEmptyElement' => \XmlReader::NONE === $reader->nodeType ? null : $reader->isEmptyElement, + 'xmlLang' => $reader->xmlLang, + 'attributeCount' => $reader->attributeCount, + 'value' => $reader->value, + 'namespaceURI' => $reader->namespaceURI, + 'baseURI' => $reader->baseURI ? new LinkStub($reader->baseURI) : $reader->baseURI, + $props => array( + 'LOADDTD' => $reader->getParserProperty(\XmlReader::LOADDTD), + 'DEFAULTATTRS' => $reader->getParserProperty(\XmlReader::DEFAULTATTRS), + 'VALIDATE' => $reader->getParserProperty(\XmlReader::VALIDATE), + 'SUBST_ENTITIES' => $reader->getParserProperty(\XmlReader::SUBST_ENTITIES), + ), + ); + + if ($info[$props] = Caster::filter($info[$props], Caster::EXCLUDE_EMPTY, array(), $count)) { + $info[$props] = new EnumStub($info[$props]); + $info[$props]->cut = $count; + } + + $info = Caster::filter($info, Caster::EXCLUDE_EMPTY, array(), $count); + // +2 because hasValue and hasAttributes are always filtered + $stub->cut += $count + 2; + + return $a + $info; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlResourceCaster.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlResourceCaster.php new file mode 100644 index 0000000000000000000000000000000000000000..5d0207ee81dac4613cec16d3be1e1c9013b4f910 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Caster/XmlResourceCaster.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts XML resources to array representation. + * + * @author Nicolas Grekas + */ +class XmlResourceCaster +{ + private static $xmlErrors = array( + XML_ERROR_NONE => 'XML_ERROR_NONE', + XML_ERROR_NO_MEMORY => 'XML_ERROR_NO_MEMORY', + XML_ERROR_SYNTAX => 'XML_ERROR_SYNTAX', + XML_ERROR_NO_ELEMENTS => 'XML_ERROR_NO_ELEMENTS', + XML_ERROR_INVALID_TOKEN => 'XML_ERROR_INVALID_TOKEN', + XML_ERROR_UNCLOSED_TOKEN => 'XML_ERROR_UNCLOSED_TOKEN', + XML_ERROR_PARTIAL_CHAR => 'XML_ERROR_PARTIAL_CHAR', + XML_ERROR_TAG_MISMATCH => 'XML_ERROR_TAG_MISMATCH', + XML_ERROR_DUPLICATE_ATTRIBUTE => 'XML_ERROR_DUPLICATE_ATTRIBUTE', + XML_ERROR_JUNK_AFTER_DOC_ELEMENT => 'XML_ERROR_JUNK_AFTER_DOC_ELEMENT', + XML_ERROR_PARAM_ENTITY_REF => 'XML_ERROR_PARAM_ENTITY_REF', + XML_ERROR_UNDEFINED_ENTITY => 'XML_ERROR_UNDEFINED_ENTITY', + XML_ERROR_RECURSIVE_ENTITY_REF => 'XML_ERROR_RECURSIVE_ENTITY_REF', + XML_ERROR_ASYNC_ENTITY => 'XML_ERROR_ASYNC_ENTITY', + XML_ERROR_BAD_CHAR_REF => 'XML_ERROR_BAD_CHAR_REF', + XML_ERROR_BINARY_ENTITY_REF => 'XML_ERROR_BINARY_ENTITY_REF', + XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF => 'XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF', + XML_ERROR_MISPLACED_XML_PI => 'XML_ERROR_MISPLACED_XML_PI', + XML_ERROR_UNKNOWN_ENCODING => 'XML_ERROR_UNKNOWN_ENCODING', + XML_ERROR_INCORRECT_ENCODING => 'XML_ERROR_INCORRECT_ENCODING', + XML_ERROR_UNCLOSED_CDATA_SECTION => 'XML_ERROR_UNCLOSED_CDATA_SECTION', + XML_ERROR_EXTERNAL_ENTITY_HANDLING => 'XML_ERROR_EXTERNAL_ENTITY_HANDLING', + ); + + public static function castXml($h, array $a, Stub $stub, $isNested) + { + $a['current_byte_index'] = xml_get_current_byte_index($h); + $a['current_column_number'] = xml_get_current_column_number($h); + $a['current_line_number'] = xml_get_current_line_number($h); + $a['error_code'] = xml_get_error_code($h); + + if (isset(self::$xmlErrors[$a['error_code']])) { + $a['error_code'] = new ConstStub(self::$xmlErrors[$a['error_code']], $a['error_code']); + } + + return $a; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php new file mode 100644 index 0000000000000000000000000000000000000000..437230e24eadb777d7a1fe5f26c223703e33cb1d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php @@ -0,0 +1,322 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +use Symfony\Component\VarDumper\Caster\Caster; +use Symfony\Component\VarDumper\Exception\ThrowingCasterException; + +/** + * AbstractCloner implements a generic caster mechanism for objects and resources. + * + * @author Nicolas Grekas + */ +abstract class AbstractCloner implements ClonerInterface +{ + public static $defaultCasters = array( + '__PHP_Incomplete_Class' => 'Symfony\Component\VarDumper\Caster\Caster::castPhpIncompleteClass', + + 'Symfony\Component\VarDumper\Caster\CutStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castStub', + 'Symfony\Component\VarDumper\Caster\CutArrayStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castCutArray', + 'Symfony\Component\VarDumper\Caster\ConstStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castStub', + 'Symfony\Component\VarDumper\Caster\EnumStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castEnum', + + 'Closure' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castClosure', + 'Generator' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castGenerator', + 'ReflectionType' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castType', + 'ReflectionGenerator' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castReflectionGenerator', + 'ReflectionClass' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castClass', + 'ReflectionFunctionAbstract' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castFunctionAbstract', + 'ReflectionMethod' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castMethod', + 'ReflectionParameter' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castParameter', + 'ReflectionProperty' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castProperty', + 'ReflectionExtension' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castExtension', + 'ReflectionZendExtension' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castZendExtension', + + 'Doctrine\Common\Persistence\ObjectManager' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'Doctrine\Common\Proxy\Proxy' => 'Symfony\Component\VarDumper\Caster\DoctrineCaster::castCommonProxy', + 'Doctrine\ORM\Proxy\Proxy' => 'Symfony\Component\VarDumper\Caster\DoctrineCaster::castOrmProxy', + 'Doctrine\ORM\PersistentCollection' => 'Symfony\Component\VarDumper\Caster\DoctrineCaster::castPersistentCollection', + + 'DOMException' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castException', + 'DOMStringList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMNameList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMImplementation' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castImplementation', + 'DOMImplementationList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMNode' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castNode', + 'DOMNameSpaceNode' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castNameSpaceNode', + 'DOMDocument' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castDocument', + 'DOMNodeList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMNamedNodeMap' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMCharacterData' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castCharacterData', + 'DOMAttr' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castAttr', + 'DOMElement' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castElement', + 'DOMText' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castText', + 'DOMTypeinfo' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castTypeinfo', + 'DOMDomError' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castDomError', + 'DOMLocator' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLocator', + 'DOMDocumentType' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castDocumentType', + 'DOMNotation' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castNotation', + 'DOMEntity' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castEntity', + 'DOMProcessingInstruction' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castProcessingInstruction', + 'DOMXPath' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castXPath', + + 'XmlReader' => 'Symfony\Component\VarDumper\Caster\XmlReaderCaster::castXmlReader', + + 'ErrorException' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castErrorException', + 'Exception' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castException', + 'Error' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castError', + 'Symfony\Component\DependencyInjection\ContainerInterface' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castThrowingCasterException', + 'Symfony\Component\VarDumper\Caster\TraceStub' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castTraceStub', + 'Symfony\Component\VarDumper\Caster\FrameStub' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castFrameStub', + + 'PHPUnit_Framework_MockObject_MockObject' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'Prophecy\Prophecy\ProphecySubjectInterface' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'Mockery\MockInterface' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + + 'PDO' => 'Symfony\Component\VarDumper\Caster\PdoCaster::castPdo', + 'PDOStatement' => 'Symfony\Component\VarDumper\Caster\PdoCaster::castPdoStatement', + + 'AMQPConnection' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castConnection', + 'AMQPChannel' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castChannel', + 'AMQPQueue' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castQueue', + 'AMQPExchange' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castExchange', + 'AMQPEnvelope' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castEnvelope', + + 'ArrayObject' => 'Symfony\Component\VarDumper\Caster\SplCaster::castArrayObject', + 'SplDoublyLinkedList' => 'Symfony\Component\VarDumper\Caster\SplCaster::castDoublyLinkedList', + 'SplFileInfo' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFileInfo', + 'SplFileObject' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFileObject', + 'SplFixedArray' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFixedArray', + 'SplHeap' => 'Symfony\Component\VarDumper\Caster\SplCaster::castHeap', + 'SplObjectStorage' => 'Symfony\Component\VarDumper\Caster\SplCaster::castObjectStorage', + 'SplPriorityQueue' => 'Symfony\Component\VarDumper\Caster\SplCaster::castHeap', + 'OuterIterator' => 'Symfony\Component\VarDumper\Caster\SplCaster::castOuterIterator', + + 'MongoCursorInterface' => 'Symfony\Component\VarDumper\Caster\MongoCaster::castCursor', + + 'Redis' => 'Symfony\Component\VarDumper\Caster\RedisCaster::castRedis', + 'RedisArray' => 'Symfony\Component\VarDumper\Caster\RedisCaster::castRedisArray', + + ':curl' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castCurl', + ':dba' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castDba', + ':dba persistent' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castDba', + ':gd' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castGd', + ':mysql link' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castMysqlLink', + ':pgsql large object' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castLargeObject', + ':pgsql link' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castLink', + ':pgsql link persistent' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castLink', + ':pgsql result' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castResult', + ':process' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castProcess', + ':stream' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castStream', + ':persistent stream' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castStream', + ':stream-context' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castStreamContext', + ':xml' => 'Symfony\Component\VarDumper\Caster\XmlResourceCaster::castXml', + ); + + protected $maxItems = 2500; + protected $maxString = -1; + protected $useExt; + + private $casters = array(); + private $prevErrorHandler; + private $classInfo = array(); + private $filter = 0; + + /** + * @param callable[]|null $casters A map of casters + * + * @see addCasters + */ + public function __construct(array $casters = null) + { + if (null === $casters) { + $casters = static::$defaultCasters; + } + $this->addCasters($casters); + $this->useExt = extension_loaded('symfony_debug'); + } + + /** + * Adds casters for resources and objects. + * + * Maps resources or objects types to a callback. + * Types are in the key, with a callable caster for value. + * Resource types are to be prefixed with a `:`, + * see e.g. static::$defaultCasters. + * + * @param callable[] $casters A map of casters + */ + public function addCasters(array $casters) + { + foreach ($casters as $type => $callback) { + $this->casters[strtolower($type)][] = $callback; + } + } + + /** + * Sets the maximum number of items to clone past the first level in nested structures. + * + * @param int $maxItems + */ + public function setMaxItems($maxItems) + { + $this->maxItems = (int) $maxItems; + } + + /** + * Sets the maximum cloned length for strings. + * + * @param int $maxString + */ + public function setMaxString($maxString) + { + $this->maxString = (int) $maxString; + } + + /** + * Clones a PHP variable. + * + * @param mixed $var Any PHP variable + * @param int $filter A bit field of Caster::EXCLUDE_* constants + * + * @return Data The cloned variable represented by a Data object + */ + public function cloneVar($var, $filter = 0) + { + $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context) { + if (E_RECOVERABLE_ERROR === $type || E_USER_ERROR === $type) { + // Cloner never dies + throw new \ErrorException($msg, 0, $type, $file, $line); + } + + if ($this->prevErrorHandler) { + return call_user_func($this->prevErrorHandler, $type, $msg, $file, $line, $context); + } + + return false; + }); + $this->filter = $filter; + + try { + $data = $this->doClone($var); + } catch (\Exception $e) { + } + restore_error_handler(); + $this->prevErrorHandler = null; + + if (isset($e)) { + throw $e; + } + + return new Data($data); + } + + /** + * Effectively clones the PHP variable. + * + * @param mixed $var Any PHP variable + * + * @return array The cloned variable represented in an array + */ + abstract protected function doClone($var); + + /** + * Casts an object to an array representation. + * + * @param Stub $stub The Stub for the casted object + * @param bool $isNested True if the object is nested in the dumped structure + * + * @return array The object casted as array + */ + protected function castObject(Stub $stub, $isNested) + { + $obj = $stub->value; + $class = $stub->class; + + if (isset($class[15]) && "\0" === $class[15] && 0 === strpos($class, "class@anonymous\x00")) { + $stub->class = get_parent_class($class).'@anonymous'; + } + if (isset($this->classInfo[$class])) { + $classInfo = $this->classInfo[$class]; + } else { + $classInfo = array( + new \ReflectionClass($class), + array_reverse(array($class => $class) + class_parents($class) + class_implements($class) + array('*' => '*')), + ); + $classInfo[1] = array_map('strtolower', $classInfo[1]); + + $this->classInfo[$class] = $classInfo; + } + + $a = Caster::castObject($obj, $classInfo[0]); + + foreach ($classInfo[1] as $p) { + if (!empty($this->casters[$p])) { + foreach ($this->casters[$p] as $p) { + $a = $this->callCaster($p, $obj, $a, $stub, $isNested); + } + } + } + + return $a; + } + + /** + * Casts a resource to an array representation. + * + * @param Stub $stub The Stub for the casted resource + * @param bool $isNested True if the object is nested in the dumped structure + * + * @return array The resource casted as array + */ + protected function castResource(Stub $stub, $isNested) + { + $a = array(); + $res = $stub->value; + $type = $stub->class; + + if (!empty($this->casters[':'.$type])) { + foreach ($this->casters[':'.$type] as $c) { + $a = $this->callCaster($c, $res, $a, $stub, $isNested); + } + } + + return $a; + } + + /** + * Calls a custom caster. + * + * @param callable $callback The caster + * @param object|resource $obj The object/resource being casted + * @param array $a The result of the previous cast for chained casters + * @param Stub $stub The Stub for the casted object/resource + * @param bool $isNested True if $obj is nested in the dumped structure + * + * @return array The casted object/resource + */ + private function callCaster($callback, $obj, $a, $stub, $isNested) + { + try { + $cast = call_user_func($callback, $obj, $a, $stub, $isNested, $this->filter); + + if (is_array($cast)) { + $a = $cast; + } + } catch (\Exception $e) { + $a = array((Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)) + $a; + } + + return $a; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/ClonerInterface.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/ClonerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..7ed287a2ddf0da20615c4f2c6d3bdaf4a6873b98 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/ClonerInterface.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\VarDumper\Cloner; + +/** + * @author Nicolas Grekas + */ +interface ClonerInterface +{ + /** + * Clones a PHP variable. + * + * @param mixed $var Any PHP variable + * + * @return Data The cloned variable represented by a Data object + */ + public function cloneVar($var); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Cursor.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Cursor.php new file mode 100644 index 0000000000000000000000000000000000000000..9db55992e4aa946fc193d35a574774ba2f9b9c74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Cursor.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * Represents the current state of a dumper while dumping. + * + * @author Nicolas Grekas + */ +class Cursor +{ + const HASH_INDEXED = Stub::ARRAY_INDEXED; + const HASH_ASSOC = Stub::ARRAY_ASSOC; + const HASH_OBJECT = Stub::TYPE_OBJECT; + const HASH_RESOURCE = Stub::TYPE_RESOURCE; + + public $depth = 0; + public $refIndex = 0; + public $softRefTo = 0; + public $softRefCount = 0; + public $softRefHandle = 0; + public $hardRefTo = 0; + public $hardRefCount = 0; + public $hardRefHandle = 0; + public $hashType; + public $hashKey; + public $hashKeyIsBinary; + public $hashIndex = 0; + public $hashLength = 0; + public $hashCut = 0; + public $stop = false; + public $attr = array(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Data.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Data.php new file mode 100644 index 0000000000000000000000000000000000000000..22fd2fd1a4a28ae13fd53107b8d56d7c3227b5de --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Data.php @@ -0,0 +1,270 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +use Symfony\Component\VarDumper\Caster\Caster; + +/** + * @author Nicolas Grekas + */ +class Data +{ + private $data; + private $position = 0; + private $key = 0; + private $maxDepth = 20; + private $maxItemsPerDepth = -1; + private $useRefHandles = -1; + + /** + * @param array $data A array as returned by ClonerInterface::cloneVar() + */ + public function __construct(array $data) + { + $this->data = $data; + } + + /** + * @return array The raw data structure + */ + public function getRawData() + { + return $this->data; + } + + /** + * Returns a depth limited clone of $this. + * + * @param int $maxDepth The max dumped depth level + * + * @return self A clone of $this + */ + public function withMaxDepth($maxDepth) + { + $data = clone $this; + $data->maxDepth = (int) $maxDepth; + + return $data; + } + + /** + * Limits the number of elements per depth level. + * + * @param int $maxItemsPerDepth The max number of items dumped per depth level + * + * @return self A clone of $this + */ + public function withMaxItemsPerDepth($maxItemsPerDepth) + { + $data = clone $this; + $data->maxItemsPerDepth = (int) $maxItemsPerDepth; + + return $data; + } + + /** + * Enables/disables objects' identifiers tracking. + * + * @param bool $useRefHandles False to hide global ref. handles + * + * @return self A clone of $this + */ + public function withRefHandles($useRefHandles) + { + $data = clone $this; + $data->useRefHandles = $useRefHandles ? -1 : 0; + + return $data; + } + + /** + * Seeks to a specific key in nested data structures. + * + * @param string|int $key The key to seek to + * + * @return self|null A clone of $this of null if the key is not set + */ + public function seek($key) + { + $item = $this->data[$this->position][$this->key]; + + if (!$item instanceof Stub || !$item->position) { + return; + } + $keys = array($key); + + switch ($item->type) { + case Stub::TYPE_OBJECT: + $keys[] = Caster::PREFIX_DYNAMIC.$key; + $keys[] = Caster::PREFIX_PROTECTED.$key; + $keys[] = Caster::PREFIX_VIRTUAL.$key; + $keys[] = "\0$item->class\0$key"; + case Stub::TYPE_ARRAY: + case Stub::TYPE_RESOURCE: + break; + default: + return; + } + + $data = null; + $children = $this->data[$item->position]; + + foreach ($keys as $key) { + if (isset($children[$key]) || array_key_exists($key, $children)) { + $data = clone $this; + $data->key = $key; + $data->position = $item->position; + break; + } + } + + return $data; + } + + /** + * Dumps data with a DumperInterface dumper. + */ + public function dump(DumperInterface $dumper) + { + $refs = array(0); + $this->dumpItem($dumper, new Cursor(), $refs, $this->data[$this->position][$this->key]); + } + + /** + * Depth-first dumping of items. + * + * @param DumperInterface $dumper The dumper being used for dumping + * @param Cursor $cursor A cursor used for tracking dumper state position + * @param array &$refs A map of all references discovered while dumping + * @param mixed $item A Stub object or the original value being dumped + */ + private function dumpItem($dumper, $cursor, &$refs, $item) + { + $cursor->refIndex = 0; + $cursor->softRefTo = $cursor->softRefHandle = $cursor->softRefCount = 0; + $cursor->hardRefTo = $cursor->hardRefHandle = $cursor->hardRefCount = 0; + $firstSeen = true; + + if (!$item instanceof Stub) { + $cursor->attr = array(); + $type = gettype($item); + } elseif (Stub::TYPE_REF === $item->type) { + if ($item->handle) { + if (!isset($refs[$r = $item->handle - (PHP_INT_MAX >> 1)])) { + $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; + } else { + $firstSeen = false; + } + $cursor->hardRefTo = $refs[$r]; + $cursor->hardRefHandle = $this->useRefHandles & $item->handle; + $cursor->hardRefCount = $item->refCount; + } + $cursor->attr = $item->attr; + $type = $item->class ?: gettype($item->value); + $item = $item->value; + } + if ($item instanceof Stub) { + if ($item->refCount) { + if (!isset($refs[$r = $item->handle])) { + $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; + } else { + $firstSeen = false; + } + $cursor->softRefTo = $refs[$r]; + } + $cursor->softRefHandle = $this->useRefHandles & $item->handle; + $cursor->softRefCount = $item->refCount; + $cursor->attr = $item->attr; + $cut = $item->cut; + + if ($item->position && $firstSeen) { + $children = $this->data[$item->position]; + + if ($cursor->stop) { + if ($cut >= 0) { + $cut += count($children); + } + $children = array(); + } + } else { + $children = array(); + } + switch ($item->type) { + case Stub::TYPE_STRING: + $dumper->dumpString($cursor, $item->value, Stub::STRING_BINARY === $item->class, $cut); + break; + + case Stub::TYPE_ARRAY: + $item = clone $item; + $item->type = $item->class; + $item->class = $item->value; + // No break; + case Stub::TYPE_OBJECT: + case Stub::TYPE_RESOURCE: + $withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth; + $dumper->enterHash($cursor, $item->type, $item->class, $withChildren); + if ($withChildren) { + $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class); + } elseif ($children && 0 <= $cut) { + $cut += count($children); + } + $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut); + break; + + default: + throw new \RuntimeException(sprintf('Unexpected Stub type: %s', $item->type)); + } + } elseif ('array' === $type) { + $dumper->enterHash($cursor, Cursor::HASH_INDEXED, 0, false); + $dumper->leaveHash($cursor, Cursor::HASH_INDEXED, 0, false, 0); + } elseif ('string' === $type) { + $dumper->dumpString($cursor, $item, false, 0); + } else { + $dumper->dumpScalar($cursor, $type, $item); + } + } + + /** + * Dumps children of hash structures. + * + * @param DumperInterface $dumper + * @param Cursor $parentCursor The cursor of the parent hash + * @param array &$refs A map of all references discovered while dumping + * @param array $children The children to dump + * @param int $hashCut The number of items removed from the original hash + * @param string $hashType A Cursor::HASH_* const + * @param bool $dumpKeys Whether keys should be dumped or not + * + * @return int The final number of removed items + */ + private function dumpChildren($dumper, $parentCursor, &$refs, $children, $hashCut, $hashType, $dumpKeys) + { + $cursor = clone $parentCursor; + ++$cursor->depth; + $cursor->hashType = $hashType; + $cursor->hashIndex = 0; + $cursor->hashLength = count($children); + $cursor->hashCut = $hashCut; + foreach ($children as $key => $child) { + $cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key); + $cursor->hashKey = $dumpKeys ? $key : null; + $this->dumpItem($dumper, $cursor, $refs, $child); + if (++$cursor->hashIndex === $this->maxItemsPerDepth || $cursor->stop) { + $parentCursor->stop = true; + + return $hashCut >= 0 ? $hashCut + $cursor->hashLength - $cursor->hashIndex : $hashCut; + } + } + + return $hashCut; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/DumperInterface.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/DumperInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..cb7981694f98137ad23c5239ec3e21bb8ba9bb65 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/DumperInterface.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * DumperInterface used by Data objects. + * + * @author Nicolas Grekas + */ +interface DumperInterface +{ + /** + * Dumps a scalar value. + * + * @param Cursor $cursor The Cursor position in the dump + * @param string $type The PHP type of the value being dumped + * @param scalar $value The scalar value being dumped + */ + public function dumpScalar(Cursor $cursor, $type, $value); + + /** + * Dumps a string. + * + * @param Cursor $cursor The Cursor position in the dump + * @param string $str The string being dumped + * @param bool $bin Whether $str is UTF-8 or binary encoded + * @param int $cut The number of characters $str has been cut by + */ + public function dumpString(Cursor $cursor, $str, $bin, $cut); + + /** + * Dumps while entering an hash. + * + * @param Cursor $cursor The Cursor position in the dump + * @param int $type A Cursor::HASH_* const for the type of hash + * @param string $class The object class, resource type or array count + * @param bool $hasChild When the dump of the hash has child item + */ + public function enterHash(Cursor $cursor, $type, $class, $hasChild); + + /** + * Dumps while leaving an hash. + * + * @param Cursor $cursor The Cursor position in the dump + * @param int $type A Cursor::HASH_* const for the type of hash + * @param string $class The object class, resource type or array count + * @param bool $hasChild When the dump of the hash has child item + * @param int $cut The number of items the hash has been cut by + */ + public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Stub.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Stub.php new file mode 100644 index 0000000000000000000000000000000000000000..313c591fc835a5ac1f003b87036277532ac047fa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/Stub.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * Represents the main properties of a PHP variable. + * + * @author Nicolas Grekas + */ +class Stub +{ + const TYPE_REF = 'ref'; + const TYPE_STRING = 'string'; + const TYPE_ARRAY = 'array'; + const TYPE_OBJECT = 'object'; + const TYPE_RESOURCE = 'resource'; + + const STRING_BINARY = 'bin'; + const STRING_UTF8 = 'utf8'; + + const ARRAY_ASSOC = 'assoc'; + const ARRAY_INDEXED = 'indexed'; + + public $type = self::TYPE_REF; + public $class = ''; + public $value; + public $cut = 0; + public $handle = 0; + public $refCount = 0; + public $position = 0; + public $attr = array(); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/VarCloner.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/VarCloner.php new file mode 100644 index 0000000000000000000000000000000000000000..6a3b451bda7f746281fed29ea950da31b36b0126 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Cloner/VarCloner.php @@ -0,0 +1,326 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * @author Nicolas Grekas + */ +class VarCloner extends AbstractCloner +{ + private static $hashMask = 0; + private static $hashOffset = 0; + + /** + * {@inheritdoc} + */ + protected function doClone($var) + { + $useExt = $this->useExt; + $len = 1; // Length of $queue + $pos = 0; // Number of cloned items past the first level + $refsCounter = 0; // Hard references counter + $queue = array(array($var)); // This breadth-first queue is the return value + $arrayRefs = array(); // Map of queue indexes to stub array objects + $hardRefs = array(); // Map of original zval hashes to stub objects + $objRefs = array(); // Map of original object handles to their stub object couterpart + $resRefs = array(); // Map of original resource handles to their stub object couterpart + $values = array(); // Map of stub objects' hashes to original values + $maxItems = $this->maxItems; + $maxString = $this->maxString; + $cookie = (object) array(); // Unique object used to detect hard references + $gid = uniqid(mt_rand(), true); // Unique string used to detect the special $GLOBALS variable + $a = null; // Array cast for nested structures + $stub = null; // Stub capturing the main properties of an original item value + // or null if the original value is used directly + $zval = array( // Main properties of the current value + 'type' => null, + 'zval_isref' => null, + 'zval_hash' => null, + 'array_count' => null, + 'object_class' => null, + 'object_handle' => null, + 'resource_type' => null, + ); + if (!self::$hashMask) { + self::initHashMask(); + } + $hashMask = self::$hashMask; + $hashOffset = self::$hashOffset; + + for ($i = 0; $i < $len; ++$i) { + $indexed = true; // Whether the currently iterated array is numerically indexed or not + $j = -1; // Position in the currently iterated array + $fromObjCast = array_keys($queue[$i]); + $fromObjCast = array_keys(array_flip($fromObjCast)) !== $fromObjCast; + $refs = $vals = $fromObjCast ? array_values($queue[$i]) : $queue[$i]; + foreach ($queue[$i] as $k => $v) { + // $k is the original key + // $v is the original value or a stub object in case of hard references + if ($k !== ++$j) { + $indexed = false; + } + if ($fromObjCast) { + $k = $j; + } + if ($useExt) { + $zval = symfony_zval_info($k, $refs); + } else { + $refs[$k] = $cookie; + if ($zval['zval_isref'] = $vals[$k] === $cookie) { + $zval['zval_hash'] = $v instanceof Stub ? spl_object_hash($v) : null; + } + $zval['type'] = gettype($v); + } + if ($zval['zval_isref']) { + $vals[$k] = &$stub; // Break hard references to make $queue completely + unset($stub); // independent from the original structure + if (isset($hardRefs[$zval['zval_hash']])) { + $vals[$k] = $useExt ? ($v = $hardRefs[$zval['zval_hash']]) : ($refs[$k] = $v); + if ($v->value instanceof Stub && (Stub::TYPE_OBJECT === $v->value->type || Stub::TYPE_RESOURCE === $v->value->type)) { + ++$v->value->refCount; + } + ++$v->refCount; + continue; + } + } + // Create $stub when the original value $v can not be used directly + // If $v is a nested structure, put that structure in array $a + switch ($zval['type']) { + case 'string': + if (isset($v[0]) && !preg_match('//u', $v)) { + $stub = new Stub(); + $stub->type = Stub::TYPE_STRING; + $stub->class = Stub::STRING_BINARY; + if (0 <= $maxString && 0 < $cut = strlen($v) - $maxString) { + $stub->cut = $cut; + $stub->value = substr($v, 0, -$cut); + } else { + $stub->value = $v; + } + } elseif (0 <= $maxString && isset($v[1 + ($maxString >> 2)]) && 0 < $cut = mb_strlen($v, 'UTF-8') - $maxString) { + $stub = new Stub(); + $stub->type = Stub::TYPE_STRING; + $stub->class = Stub::STRING_UTF8; + $stub->cut = $cut; + $stub->value = mb_substr($v, 0, $maxString, 'UTF-8'); + } + break; + + case 'integer': + break; + + case 'array': + if ($v) { + $stub = $arrayRefs[$len] = new Stub(); + $stub->type = Stub::TYPE_ARRAY; + $stub->class = Stub::ARRAY_ASSOC; + + // Copies of $GLOBALS have very strange behavior, + // let's detect them with some black magic + $a = $v; + $a[$gid] = true; + + // Happens with copies of $GLOBALS + if (isset($v[$gid])) { + unset($v[$gid]); + $a = array(); + foreach ($v as $gk => &$gv) { + $a[$gk] = &$gv; + } + } else { + $a = $v; + } + + $stub->value = $zval['array_count'] ?: count($a); + } + break; + + case 'object': + if (empty($objRefs[$h = $zval['object_handle'] ?: ($hashMask ^ hexdec(substr(spl_object_hash($v), $hashOffset, PHP_INT_SIZE)))])) { + $stub = new Stub(); + $stub->type = Stub::TYPE_OBJECT; + $stub->class = $zval['object_class'] ?: get_class($v); + $stub->value = $v; + $stub->handle = $h; + $a = $this->castObject($stub, 0 < $i); + if ($v !== $stub->value) { + if (Stub::TYPE_OBJECT !== $stub->type || null === $stub->value) { + break; + } + if ($useExt) { + $zval['type'] = $stub->value; + $zval = symfony_zval_info('type', $zval); + $h = $zval['object_handle']; + } else { + $h = $hashMask ^ hexdec(substr(spl_object_hash($stub->value), $hashOffset, PHP_INT_SIZE)); + } + $stub->handle = $h; + } + $stub->value = null; + if (0 <= $maxItems && $maxItems <= $pos) { + $stub->cut = count($a); + $a = null; + } + } + if (empty($objRefs[$h])) { + $objRefs[$h] = $stub; + } else { + $stub = $objRefs[$h]; + ++$stub->refCount; + $a = null; + } + break; + + case 'resource': + case 'unknown type': + case 'resource (closed)': + if (empty($resRefs[$h = (int) $v])) { + $stub = new Stub(); + $stub->type = Stub::TYPE_RESOURCE; + if ('Unknown' === $stub->class = $zval['resource_type'] ?: @get_resource_type($v)) { + $stub->class = 'Closed'; + } + $stub->value = $v; + $stub->handle = $h; + $a = $this->castResource($stub, 0 < $i); + $stub->value = null; + if (0 <= $maxItems && $maxItems <= $pos) { + $stub->cut = count($a); + $a = null; + } + } + if (empty($resRefs[$h])) { + $resRefs[$h] = $stub; + } else { + $stub = $resRefs[$h]; + ++$stub->refCount; + $a = null; + } + break; + } + + if (isset($stub)) { + if ($zval['zval_isref']) { + if ($useExt) { + $vals[$k] = $hardRefs[$zval['zval_hash']] = $v = new Stub(); + $v->value = $stub; + } else { + $refs[$k] = new Stub(); + $refs[$k]->value = $stub; + $h = spl_object_hash($refs[$k]); + $vals[$k] = $hardRefs[$h] = &$refs[$k]; + $values[$h] = $v; + } + $vals[$k]->handle = ++$refsCounter; + } else { + $vals[$k] = $stub; + } + + if ($a) { + if ($i && 0 <= $maxItems) { + $k = count($a); + if ($pos < $maxItems) { + if ($maxItems < $pos += $k) { + $a = array_slice($a, 0, $maxItems - $pos); + if ($stub->cut >= 0) { + $stub->cut += $pos - $maxItems; + } + } + } else { + if ($stub->cut >= 0) { + $stub->cut += $k; + } + $stub = $a = null; + unset($arrayRefs[$len]); + continue; + } + } + $queue[$len] = $a; + $stub->position = $len++; + } + $stub = $a = null; + } elseif ($zval['zval_isref']) { + if ($useExt) { + $vals[$k] = $hardRefs[$zval['zval_hash']] = new Stub(); + $vals[$k]->value = $v; + } else { + $refs[$k] = $vals[$k] = new Stub(); + $refs[$k]->value = $v; + $h = spl_object_hash($refs[$k]); + $hardRefs[$h] = &$refs[$k]; + $values[$h] = $v; + } + $vals[$k]->handle = ++$refsCounter; + } + } + + if ($fromObjCast) { + $refs = $vals; + $vals = array(); + $j = -1; + foreach ($queue[$i] as $k => $v) { + foreach (array($k => $v) as $a => $v) { + } + if ($a !== $k) { + $vals = (object) $vals; + $vals->{$k} = $refs[++$j]; + $vals = (array) $vals; + } else { + $vals[$k] = $refs[++$j]; + } + } + } + + $queue[$i] = $vals; + + if (isset($arrayRefs[$i])) { + if ($indexed) { + $arrayRefs[$i]->class = Stub::ARRAY_INDEXED; + } + unset($arrayRefs[$i]); + } + } + + foreach ($values as $h => $v) { + $hardRefs[$h] = $v; + } + + return $queue; + } + + private static function initHashMask() + { + $obj = (object) array(); + self::$hashOffset = 16 - PHP_INT_SIZE; + self::$hashMask = -1; + + if (defined('HHVM_VERSION')) { + self::$hashOffset += 16; + } else { + // 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(DEBUG_BACKTRACE_IGNORE_ARGS) 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), self::$hashOffset, PHP_INT_SIZE)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..166f87f5f95bfe13749fb8eedd2146dfdd83f14d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php @@ -0,0 +1,193 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Cloner\DumperInterface; + +/** + * Abstract mechanism for dumping a Data object. + * + * @author Nicolas Grekas + */ +abstract class AbstractDumper implements DataDumperInterface, DumperInterface +{ + const DUMP_LIGHT_ARRAY = 1; + const DUMP_STRING_LENGTH = 2; + + public static $defaultOutput = 'php://output'; + + protected $line = ''; + protected $lineDumper; + protected $outputStream; + protected $decimalPoint; // This is locale dependent + protected $indentPad = ' '; + protected $flags; + + private $charset; + + /** + * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput + * @param string $charset The default character encoding to use for non-UTF8 strings + * @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation + */ + public function __construct($output = null, $charset = null, $flags = 0) + { + $this->flags = (int) $flags; + $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'); + $this->decimalPoint = (string) 0.5; + $this->decimalPoint = $this->decimalPoint[1]; + $this->setOutput($output ?: static::$defaultOutput); + if (!$output && is_string(static::$defaultOutput)) { + static::$defaultOutput = $this->outputStream; + } + } + + /** + * Sets the output destination of the dumps. + * + * @param callable|resource|string $output A line dumper callable, an opened stream or an output path + * + * @return callable|resource|string The previous output destination + */ + public function setOutput($output) + { + $prev = null !== $this->outputStream ? $this->outputStream : $this->lineDumper; + + if (is_callable($output)) { + $this->outputStream = null; + $this->lineDumper = $output; + } else { + if (is_string($output)) { + $output = fopen($output, 'wb'); + } + $this->outputStream = $output; + $this->lineDumper = array($this, 'echoLine'); + } + + return $prev; + } + + /** + * Sets the default character encoding to use for non-UTF8 strings. + * + * @param string $charset The default character encoding to use for non-UTF8 strings + * + * @return string The previous charset + */ + public function setCharset($charset) + { + $prev = $this->charset; + + $charset = strtoupper($charset); + $charset = null === $charset || 'UTF-8' === $charset || 'UTF8' === $charset ? 'CP1252' : $charset; + + $this->charset = $charset; + + return $prev; + } + + /** + * Sets the indentation pad string. + * + * @param string $pad A string the will be prepended to dumped lines, repeated by nesting level + * + * @return string The indent pad + */ + public function setIndentPad($pad) + { + $prev = $this->indentPad; + $this->indentPad = $pad; + + return $prev; + } + + /** + * Dumps a Data object. + * + * @param Data $data A Data object + * @param callable|resource|string|true|null $output A line dumper callable, an opened stream, an output path or true to return the dump + * + * @return string|null The dump as string when $output is true + */ + public function dump(Data $data, $output = null) + { + if ($returnDump = true === $output) { + $output = fopen('php://memory', 'r+b'); + } + if ($output) { + $prevOutput = $this->setOutput($output); + } + try { + $data->dump($this); + $this->dumpLine(-1); + + if ($returnDump) { + $result = stream_get_contents($output, -1, 0); + fclose($output); + + return $result; + } + } finally { + if ($output) { + $this->setOutput($prevOutput); + } + } + } + + /** + * Dumps the current line. + * + * @param int $depth The recursive depth in the dumped structure for the line being dumped + */ + protected function dumpLine($depth) + { + call_user_func($this->lineDumper, $this->line, $depth, $this->indentPad); + $this->line = ''; + } + + /** + * Generic line dumper callback. + * + * @param string $line The line to write + * @param int $depth The recursive depth in the dumped structure + * @param string $indentPad The line indent pad + */ + protected function echoLine($line, $depth, $indentPad) + { + if (-1 !== $depth) { + fwrite($this->outputStream, str_repeat($indentPad, $depth).$line."\n"); + } + } + + /** + * Converts a non-UTF-8 string to UTF-8. + * + * @param string $s The non-UTF-8 string to convert + * + * @return string The string converted to UTF-8 + */ + protected function utf8Encode($s) + { + if (preg_match('//u', $s)) { + return $s; + } + if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) { + return $c; + } + if ('CP1252' !== $this->charset && false !== $c = @iconv('CP1252', 'UTF-8', $s)) { + return $c; + } + + return iconv('CP850', 'UTF-8', $s); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/CliDumper.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/CliDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..540f9245fdfd371c95b6adf5a0ae582cc629e382 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/CliDumper.php @@ -0,0 +1,489 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Cursor; + +/** + * CliDumper dumps variables for command line output. + * + * @author Nicolas Grekas + */ +class CliDumper extends AbstractDumper +{ + public static $defaultColors; + public static $defaultOutput = 'php://stdout'; + + protected $colors; + protected $maxStringWidth = 0; + protected $styles = array( + // See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics + 'default' => '38;5;208', + 'num' => '1;38;5;38', + 'const' => '1;38;5;208', + 'str' => '1;38;5;113', + 'note' => '38;5;38', + 'ref' => '38;5;247', + 'public' => '', + 'protected' => '', + 'private' => '', + 'meta' => '38;5;170', + 'key' => '38;5;113', + 'index' => '38;5;38', + ); + + protected static $controlCharsRx = '/[\x00-\x1F\x7F]+/'; + protected static $controlCharsMap = array( + "\t" => '\t', + "\n" => '\n', + "\v" => '\v', + "\f" => '\f', + "\r" => '\r', + "\033" => '\e', + ); + + /** + * {@inheritdoc} + */ + public function __construct($output = null, $charset = null, $flags = 0) + { + parent::__construct($output, $charset, $flags); + + if ('\\' === DIRECTORY_SEPARATOR && 'ON' !== @getenv('ConEmuANSI') && 'xterm' !== @getenv('TERM')) { + // Use only the base 16 xterm colors when using ANSICON or standard Windows 10 CLI + $this->setStyles(array( + 'default' => '31', + 'num' => '1;34', + 'const' => '1;31', + 'str' => '1;32', + 'note' => '34', + 'ref' => '1;30', + 'meta' => '35', + 'key' => '32', + 'index' => '34', + )); + } + } + + /** + * Enables/disables colored output. + * + * @param bool $colors + */ + public function setColors($colors) + { + $this->colors = (bool) $colors; + } + + /** + * Sets the maximum number of characters per line for dumped strings. + * + * @param int $maxStringWidth + */ + public function setMaxStringWidth($maxStringWidth) + { + $this->maxStringWidth = (int) $maxStringWidth; + } + + /** + * Configures styles. + * + * @param array $styles A map of style names to style definitions + */ + public function setStyles(array $styles) + { + $this->styles = $styles + $this->styles; + } + + /** + * {@inheritdoc} + */ + public function dumpScalar(Cursor $cursor, $type, $value) + { + $this->dumpKey($cursor); + + $style = 'const'; + $attr = $cursor->attr; + + switch ($type) { + case 'default': + $style = 'default'; + break; + + case 'integer': + $style = 'num'; + break; + + case 'double': + $style = 'num'; + + switch (true) { + case INF === $value: $value = 'INF'; break; + case -INF === $value: $value = '-INF'; break; + case is_nan($value): $value = 'NAN'; break; + default: + $value = (string) $value; + if (false === strpos($value, $this->decimalPoint)) { + $value .= $this->decimalPoint.'0'; + } + break; + } + break; + + case 'NULL': + $value = 'null'; + break; + + case 'boolean': + $value = $value ? 'true' : 'false'; + break; + + default: + $attr += array('value' => $this->utf8Encode($value)); + $value = $this->utf8Encode($type); + break; + } + + $this->line .= $this->style($style, $value, $attr); + + $this->dumpLine($cursor->depth, true); + } + + /** + * {@inheritdoc} + */ + public function dumpString(Cursor $cursor, $str, $bin, $cut) + { + $this->dumpKey($cursor); + $attr = $cursor->attr; + + if ($bin) { + $str = $this->utf8Encode($str); + } + if ('' === $str) { + $this->line .= '""'; + $this->dumpLine($cursor->depth, true); + } else { + $attr += array( + 'length' => 0 <= $cut ? mb_strlen($str, 'UTF-8') + $cut : 0, + 'binary' => $bin, + ); + $str = explode("\n", $str); + if (isset($str[1]) && !isset($str[2]) && !isset($str[1][0])) { + unset($str[1]); + $str[0] .= "\n"; + } + $m = count($str) - 1; + $i = $lineCut = 0; + + if (self::DUMP_STRING_LENGTH & $this->flags) { + $this->line .= '('.$attr['length'].') '; + } + if ($bin) { + $this->line .= 'b'; + } + + if ($m) { + $this->line .= '"""'; + $this->dumpLine($cursor->depth); + } else { + $this->line .= '"'; + } + + foreach ($str as $str) { + if ($i < $m) { + $str .= "\n"; + } + if (0 < $this->maxStringWidth && $this->maxStringWidth < $len = mb_strlen($str, 'UTF-8')) { + $str = mb_substr($str, 0, $this->maxStringWidth, 'UTF-8'); + $lineCut = $len - $this->maxStringWidth; + } + if ($m && 0 < $cursor->depth) { + $this->line .= $this->indentPad; + } + if ('' !== $str) { + $this->line .= $this->style('str', $str, $attr); + } + if ($i++ == $m) { + if ($m) { + if ('' !== $str) { + $this->dumpLine($cursor->depth); + if (0 < $cursor->depth) { + $this->line .= $this->indentPad; + } + } + $this->line .= '"""'; + } else { + $this->line .= '"'; + } + if ($cut < 0) { + $this->line .= '…'; + $lineCut = 0; + } elseif ($cut) { + $lineCut += $cut; + } + } + if ($lineCut) { + $this->line .= '…'.$lineCut; + $lineCut = 0; + } + + $this->dumpLine($cursor->depth, $i > $m); + } + } + } + + /** + * {@inheritdoc} + */ + public function enterHash(Cursor $cursor, $type, $class, $hasChild) + { + $this->dumpKey($cursor); + + $class = $this->utf8Encode($class); + if (Cursor::HASH_OBJECT === $type) { + $prefix = $class && 'stdClass' !== $class ? $this->style('note', $class).' {' : '{'; + } elseif (Cursor::HASH_RESOURCE === $type) { + $prefix = $this->style('note', $class.' resource').($hasChild ? ' {' : ' '); + } else { + $prefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? $this->style('note', 'array:'.$class).' [' : '['; + } + + if ($cursor->softRefCount || 0 < $cursor->softRefHandle) { + $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), array('count' => $cursor->softRefCount)); + } elseif ($cursor->hardRefTo && !$cursor->refIndex && $class) { + $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, array('count' => $cursor->hardRefCount)); + } elseif (!$hasChild && Cursor::HASH_RESOURCE === $type) { + $prefix = substr($prefix, 0, -1); + } + + $this->line .= $prefix; + + if ($hasChild) { + $this->dumpLine($cursor->depth); + } + } + + /** + * {@inheritdoc} + */ + public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) + { + $this->dumpEllipsis($cursor, $hasChild, $cut); + $this->line .= Cursor::HASH_OBJECT === $type ? '}' : (Cursor::HASH_RESOURCE !== $type ? ']' : ($hasChild ? '}' : '')); + $this->dumpLine($cursor->depth, true); + } + + /** + * Dumps an ellipsis for cut children. + * + * @param Cursor $cursor The Cursor position in the dump + * @param bool $hasChild When the dump of the hash has child item + * @param int $cut The number of items the hash has been cut by + */ + protected function dumpEllipsis(Cursor $cursor, $hasChild, $cut) + { + if ($cut) { + $this->line .= ' …'; + if (0 < $cut) { + $this->line .= $cut; + } + if ($hasChild) { + $this->dumpLine($cursor->depth + 1); + } + } + } + + /** + * Dumps a key in a hash structure. + * + * @param Cursor $cursor The Cursor position in the dump + */ + protected function dumpKey(Cursor $cursor) + { + if (null !== $key = $cursor->hashKey) { + if ($cursor->hashKeyIsBinary) { + $key = $this->utf8Encode($key); + } + $attr = array('binary' => $cursor->hashKeyIsBinary); + $bin = $cursor->hashKeyIsBinary ? 'b' : ''; + $style = 'key'; + switch ($cursor->hashType) { + default: + case Cursor::HASH_INDEXED: + if (self::DUMP_LIGHT_ARRAY & $this->flags) { + break; + } + $style = 'index'; + case Cursor::HASH_ASSOC: + if (is_int($key)) { + $this->line .= $this->style($style, $key).' => '; + } else { + $this->line .= $bin.'"'.$this->style($style, $key).'" => '; + } + break; + + case Cursor::HASH_RESOURCE: + $key = "\0~\0".$key; + // No break; + case Cursor::HASH_OBJECT: + if (!isset($key[0]) || "\0" !== $key[0]) { + $this->line .= '+'.$bin.$this->style('public', $key).': '; + } elseif (0 < strpos($key, "\0", 1)) { + $key = explode("\0", substr($key, 1), 2); + + switch ($key[0][0]) { + case '+': // User inserted keys + $attr['dynamic'] = true; + $this->line .= '+'.$bin.'"'.$this->style('public', $key[1], $attr).'": '; + break 2; + case '~': + $style = 'meta'; + if (isset($key[0][1])) { + parse_str(substr($key[0], 1), $attr); + $attr += array('binary' => $cursor->hashKeyIsBinary); + } + break; + case '*': + $style = 'protected'; + $bin = '#'.$bin; + break; + default: + $attr['class'] = $key[0]; + $style = 'private'; + $bin = '-'.$bin; + break; + } + + $this->line .= $bin.$this->style($style, $key[1], $attr).': '; + } else { + // This case should not happen + $this->line .= '-'.$bin.'"'.$this->style('private', $key, array('class' => '')).'": '; + } + break; + } + + if ($cursor->hardRefTo) { + $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), array('count' => $cursor->hardRefCount)).' '; + } + } + } + + /** + * Decorates a value with some style. + * + * @param string $style The type of style being applied + * @param string $value The value being styled + * @param array $attr Optional context information + * + * @return string The value with style decoration + */ + protected function style($style, $value, $attr = array()) + { + if (null === $this->colors) { + $this->colors = $this->supportsColors(); + } + + $style = $this->styles[$style]; + + $map = static::$controlCharsMap; + $startCchr = $this->colors ? "\033[m\033[{$this->styles['default']}m" : ''; + $endCchr = $this->colors ? "\033[m\033[{$style}m" : ''; + $value = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $startCchr, $endCchr) { + $s = $startCchr; + $c = $c[$i = 0]; + do { + $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', ord($c[$i])); + } while (isset($c[++$i])); + + return $s.$endCchr; + }, $value, -1, $cchrCount); + + if ($this->colors) { + if ($cchrCount && "\033" === $value[0]) { + $value = substr($value, strlen($startCchr)); + } else { + $value = "\033[{$style}m".$value; + } + if ($cchrCount && $endCchr === substr($value, -strlen($endCchr))) { + $value = substr($value, 0, -strlen($endCchr)); + } else { + $value .= "\033[{$this->styles['default']}m"; + } + } + + return $value; + } + + /** + * @return bool Tells if the current output stream supports ANSI colors or not + */ + protected function supportsColors() + { + if ($this->outputStream !== static::$defaultOutput) { + return @(is_resource($this->outputStream) && function_exists('posix_isatty') && posix_isatty($this->outputStream)); + } + if (null !== static::$defaultColors) { + return static::$defaultColors; + } + if (isset($_SERVER['argv'][1])) { + $colors = $_SERVER['argv']; + $i = count($colors); + while (--$i > 0) { + if (isset($colors[$i][5])) { + switch ($colors[$i]) { + case '--ansi': + case '--color': + case '--color=yes': + case '--color=force': + case '--color=always': + return static::$defaultColors = true; + + case '--no-ansi': + case '--color=no': + case '--color=none': + case '--color=never': + return static::$defaultColors = false; + } + } + } + } + + if ('\\' === DIRECTORY_SEPARATOR) { + static::$defaultColors = @( + '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM') + ); + } elseif (function_exists('posix_isatty')) { + $h = stream_get_meta_data($this->outputStream) + array('wrapper_type' => null); + $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'wb') : $this->outputStream; + static::$defaultColors = @posix_isatty($h); + } else { + static::$defaultColors = false; + } + + return static::$defaultColors; + } + + /** + * {@inheritdoc} + */ + protected function dumpLine($depth, $endOfValue = false) + { + if ($this->colors) { + $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line); + } + parent::dumpLine($depth); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..2c3d9db850d08b0325b8d46218f3faffb4071037 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.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\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Data; + +/** + * DataDumperInterface for dumping Data objects. + * + * @author Nicolas Grekas + */ +interface DataDumperInterface +{ + /** + * Dumps a Data object. + * + * @param Data $data A Data object + */ + public function dump(Data $data); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..198ec106be9989c46b05d1d7c3705192ee57d1a8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php @@ -0,0 +1,553 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Cursor; +use Symfony\Component\VarDumper\Cloner\Data; + +/** + * HtmlDumper dumps variables as HTML. + * + * @author Nicolas Grekas + */ +class HtmlDumper extends CliDumper +{ + public static $defaultOutput = 'php://output'; + + protected $dumpHeader; + protected $dumpPrefix = '
    ';
    +    protected $dumpSuffix = '
    '; + protected $dumpId = 'sf-dump'; + protected $colors = true; + protected $headerIsDumped = false; + protected $lastDepth = -1; + protected $styles = array( + 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: normal', + 'num' => 'font-weight:bold; color:#1299DA', + 'const' => 'font-weight:bold', + 'str' => 'font-weight:bold; color:#56DB3A', + 'note' => 'color:#1299DA', + 'ref' => 'color:#A0A0A0', + 'public' => 'color:#FFFFFF', + 'protected' => 'color:#FFFFFF', + 'private' => 'color:#FFFFFF', + 'meta' => 'color:#B729D9', + 'key' => 'color:#56DB3A', + 'index' => 'color:#1299DA', + 'ellipsis' => 'color:#FF8400', + ); + + private $displayOptions = array( + 'maxDepth' => 1, + 'maxStringLength' => 160, + 'fileLinkFormat' => null, + ); + private $extraDisplayOptions = array(); + + /** + * {@inheritdoc} + */ + public function __construct($output = null, $charset = null, $flags = 0) + { + AbstractDumper::__construct($output, $charset, $flags); + $this->dumpId = 'sf-dump-'.mt_rand(); + $this->displayOptions['fileLinkFormat'] = ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + } + + /** + * {@inheritdoc} + */ + public function setStyles(array $styles) + { + $this->headerIsDumped = false; + $this->styles = $styles + $this->styles; + } + + /** + * Configures display options. + * + * @param array $displayOptions A map of display options to customize the behavior + */ + public function setDisplayOptions(array $displayOptions) + { + $this->headerIsDumped = false; + $this->displayOptions = $displayOptions + $this->displayOptions; + } + + /** + * Sets an HTML header that will be dumped once in the output stream. + * + * @param string $header An HTML string + */ + public function setDumpHeader($header) + { + $this->dumpHeader = $header; + } + + /** + * Sets an HTML prefix and suffix that will encapse every single dump. + * + * @param string $prefix The prepended HTML string + * @param string $suffix The appended HTML string + */ + public function setDumpBoundaries($prefix, $suffix) + { + $this->dumpPrefix = $prefix; + $this->dumpSuffix = $suffix; + } + + /** + * {@inheritdoc} + */ + public function dump(Data $data, $output = null, array $extraDisplayOptions = array()) + { + $this->extraDisplayOptions = $extraDisplayOptions; + $result = parent::dump($data, $output); + $this->dumpId = 'sf-dump-'.mt_rand(); + + return $result; + } + + /** + * Dumps the HTML header. + */ + protected function getDumpHeader() + { + $this->headerIsDumped = null !== $this->outputStream ? $this->outputStream : $this->lineDumper; + + if (null !== $this->dumpHeader) { + return $this->dumpHeader; + } + + $line = str_replace('{$options}', json_encode($this->displayOptions, JSON_FORCE_OBJECT), <<<'EOHTML' +'.$this->dumpHeader; + } + + /** + * {@inheritdoc} + */ + public function enterHash(Cursor $cursor, $type, $class, $hasChild) + { + parent::enterHash($cursor, $type, $class, false); + + if ($hasChild) { + if ($cursor->refIndex) { + $r = Cursor::HASH_OBJECT !== $type ? 1 - (Cursor::HASH_RESOURCE !== $type) : 2; + $r .= $r && 0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->refIndex; + + $this->line .= sprintf('', $this->dumpId, $r); + } else { + $this->line .= ''; + } + $this->dumpLine($cursor->depth); + } + } + + /** + * {@inheritdoc} + */ + public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) + { + $this->dumpEllipsis($cursor, $hasChild, $cut); + if ($hasChild) { + $this->line .= ''; + } + parent::leaveHash($cursor, $type, $class, $hasChild, 0); + } + + /** + * {@inheritdoc} + */ + protected function style($style, $value, $attr = array()) + { + if ('' === $value) { + return ''; + } + + $v = esc($value); + + if ('ref' === $style) { + if (empty($attr['count'])) { + return sprintf('%s', $v); + } + $r = ('#' !== $v[0] ? 1 - ('@' !== $v[0]) : 2).substr($value, 1); + + return sprintf('%s', $this->dumpId, $r, 1 + $attr['count'], $v); + } + + if ('const' === $style && isset($attr['value'])) { + $style .= sprintf(' title="%s"', esc(is_scalar($attr['value']) ? $attr['value'] : json_encode($attr['value']))); + } elseif ('public' === $style) { + $style .= sprintf(' title="%s"', empty($attr['dynamic']) ? 'Public property' : 'Runtime added dynamic property'); + } elseif ('str' === $style && 1 < $attr['length']) { + $style .= sprintf(' title="%d%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : ''); + } elseif ('note' === $style && false !== $c = strrpos($v, '\\')) { + return sprintf('%s', $v, $style, substr($v, $c + 1)); + } elseif ('protected' === $style) { + $style .= ' title="Protected property"'; + } elseif ('meta' === $style && isset($attr['title'])) { + $style .= sprintf(' title="%s"', esc($this->utf8Encode($attr['title']))); + } elseif ('private' === $style) { + $style .= sprintf(' title="Private property defined in class: `%s`"', esc($this->utf8Encode($attr['class']))); + } + $map = static::$controlCharsMap; + + if (isset($attr['ellipsis'])) { + $label = esc(substr($value, -$attr['ellipsis'])); + $style = str_replace(' title="', " title=\"$v\n", $style); + $v = sprintf('%s%s', substr($v, 0, -strlen($label)), $label); + } + + $v = "".preg_replace_callback(static::$controlCharsRx, function ($c) use ($map) { + $s = ''; + $c = $c[$i = 0]; + do { + $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', ord($c[$i])); + } while (isset($c[++$i])); + + return $s.''; + }, $v).''; + + if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], isset($attr['line']) ? $attr['line'] : 0)) { + $attr['href'] = $href; + } + if (isset($attr['href'])) { + $v = sprintf('%s', esc($this->utf8Encode($attr['href'])), $v); + } + if (isset($attr['lang'])) { + $v = sprintf('%s', esc($attr['lang']), $v); + } + + return $v; + } + + /** + * {@inheritdoc} + */ + protected function dumpLine($depth, $endOfValue = false) + { + if (-1 === $this->lastDepth) { + $this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad).$this->line; + } + if ($this->headerIsDumped !== (null !== $this->outputStream ? $this->outputStream : $this->lineDumper)) { + $this->line = $this->getDumpHeader().$this->line; + } + + if (-1 === $depth) { + $args = array('"'.$this->dumpId.'"'); + if ($this->extraDisplayOptions) { + $args[] = json_encode($this->extraDisplayOptions, JSON_FORCE_OBJECT); + } + // Replace is for BC + $this->line .= sprintf(str_replace('"%s"', '%s', $this->dumpSuffix), implode(', ', $args)); + } + $this->lastDepth = $depth; + + $this->line = mb_convert_encoding($this->line, 'HTML-ENTITIES', 'UTF-8'); + + if (-1 === $depth) { + AbstractDumper::dumpLine(0); + } + AbstractDumper::dumpLine($depth); + } + + private function getSourceLink($file, $line) + { + $options = $this->extraDisplayOptions + $this->displayOptions; + + if ($fmt = $options['fileLinkFormat']) { + return is_string($fmt) ? strtr($fmt, array('%f' => $file, '%l' => $line)) : $fmt->format($file, $line); + } + + return false; + } +} + +function esc($str) +{ + return htmlspecialchars($str, ENT_QUOTES, 'UTF-8'); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php new file mode 100644 index 0000000000000000000000000000000000000000..976f4439b67f31291cc0a26a3a22b332676f80da --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Exception; + +/** + * @author Nicolas Grekas + */ +class ThrowingCasterException extends \Exception +{ + /** + * @param \Exception $prev The exception thrown from the caster + */ + public function __construct(\Exception $prev) + { + parent::__construct('Unexpected '.get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..207646a052dcd5ad165e62c15ef3da92e4f61a05 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-2017 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/vendor/symfony/symfony/src/Symfony/Component/VarDumper/README.md b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3b5d55f5f5bfd7f88d57bd2570f162dbb6190ba6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/README.md @@ -0,0 +1,15 @@ +VarDumper Component +=================== + +The VarDumper component provides mechanisms for walking through any arbitrary +PHP variable. Built on top, it provides a better `dump()` function that you +can use instead of `var_dump`. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/var_dumper/introduction.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/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php new file mode 100644 index 0000000000000000000000000000000000000000..b6c243c8b6e2f6083ea49cd0d1a93fe5a5985861 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Component\VarDumper\VarDumper; + +if (!function_exists('dump')) { + /** + * @author Nicolas Grekas + */ + function dump($var) + { + foreach (func_get_args() as $var) { + VarDumper::dump($var); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..40ec83d132221f8a6cb6de1242315fd473a7adcf --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Test; + +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\CliDumper; + +/** + * @author Nicolas Grekas + */ +trait VarDumperTestTrait +{ + public function assertDumpEquals($dump, $data, $message = '') + { + $this->assertSame(rtrim($dump), $this->getDump($data), $message); + } + + public function assertDumpMatchesFormat($dump, $data, $message = '') + { + $this->assertStringMatchesFormat(rtrim($dump), $this->getDump($data), $message); + } + + protected function getDump($data, $key = null) + { + $flags = getenv('DUMP_LIGHT_ARRAY') ? CliDumper::DUMP_LIGHT_ARRAY : 0; + $flags |= getenv('DUMP_STRING_LENGTH') ? CliDumper::DUMP_STRING_LENGTH : 0; + + $cloner = new VarCloner(); + $cloner->setMaxItems(-1); + $dumper = new CliDumper(null, null, $flags); + $dumper->setColors(false); + $data = $cloner->cloneVar($data)->withRefHandles(false); + if (null !== $key && null === $data = $data->seek($key)) { + return; + } + + return rtrim($dumper->dump($data, true)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..105d5638ee1bc08181f5e8dddb0b4530a9e19f92 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php @@ -0,0 +1,181 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Caster\Caster; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Nicolas Grekas + */ +class CasterTest extends TestCase +{ + use VarDumperTestTrait; + + private $referenceArray = array( + 'null' => null, + 'empty' => false, + 'public' => 'pub', + "\0~\0virtual" => 'virt', + "\0+\0dynamic" => 'dyn', + "\0*\0protected" => 'prot', + "\0Foo\0private" => 'priv', + ); + + /** + * @dataProvider provideFilter + */ + public function testFilter($filter, $expectedDiff, $listedProperties = null) + { + if (null === $listedProperties) { + $filteredArray = Caster::filter($this->referenceArray, $filter); + } else { + $filteredArray = Caster::filter($this->referenceArray, $filter, $listedProperties); + } + + $this->assertSame($expectedDiff, array_diff_assoc($this->referenceArray, $filteredArray)); + } + + public function provideFilter() + { + return array( + array( + 0, + array(), + ), + array( + Caster::EXCLUDE_PUBLIC, + array( + 'null' => null, + 'empty' => false, + 'public' => 'pub', + ), + ), + array( + Caster::EXCLUDE_NULL, + array( + 'null' => null, + ), + ), + array( + Caster::EXCLUDE_EMPTY, + array( + 'null' => null, + 'empty' => false, + ), + ), + array( + Caster::EXCLUDE_VIRTUAL, + array( + "\0~\0virtual" => 'virt', + ), + ), + array( + Caster::EXCLUDE_DYNAMIC, + array( + "\0+\0dynamic" => 'dyn', + ), + ), + array( + Caster::EXCLUDE_PROTECTED, + array( + "\0*\0protected" => 'prot', + ), + ), + array( + Caster::EXCLUDE_PRIVATE, + array( + "\0Foo\0private" => 'priv', + ), + ), + array( + Caster::EXCLUDE_VERBOSE, + array( + 'public' => 'pub', + "\0*\0protected" => 'prot', + ), + array('public', "\0*\0protected"), + ), + array( + Caster::EXCLUDE_NOT_IMPORTANT, + array( + 'null' => null, + 'empty' => false, + "\0~\0virtual" => 'virt', + "\0+\0dynamic" => 'dyn', + "\0Foo\0private" => 'priv', + ), + array('public', "\0*\0protected"), + ), + array( + Caster::EXCLUDE_VIRTUAL | Caster::EXCLUDE_DYNAMIC, + array( + "\0~\0virtual" => 'virt', + "\0+\0dynamic" => 'dyn', + ), + ), + array( + Caster::EXCLUDE_NOT_IMPORTANT | Caster::EXCLUDE_VERBOSE, + $this->referenceArray, + array('public', "\0*\0protected"), + ), + array( + Caster::EXCLUDE_NOT_IMPORTANT | Caster::EXCLUDE_EMPTY, + array( + 'null' => null, + 'empty' => false, + "\0~\0virtual" => 'virt', + "\0+\0dynamic" => 'dyn', + "\0*\0protected" => 'prot', + "\0Foo\0private" => 'priv', + ), + array('public', 'empty'), + ), + array( + Caster::EXCLUDE_VERBOSE | Caster::EXCLUDE_EMPTY | Caster::EXCLUDE_STRICT, + array( + 'empty' => false, + ), + array('public', 'empty'), + ), + ); + } + + /** + * @requires PHP 7.0 + */ + public function testAnonymousClass() + { + $c = eval('return new class extends stdClass { private $foo = "foo"; };'); + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +stdClass@anonymous { + -foo: "foo" +} +EOTXT + , $c + ); + + $c = eval('return new class { private $foo = "foo"; };'); + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +@anonymous { + -foo: "foo" +} +EOTXT + , $c + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e4a72ed7cf27141317a086e70a587a75dff1d667 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php @@ -0,0 +1,225 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Caster\ExceptionCaster; +use Symfony\Component\VarDumper\Caster\FrameStub; +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +class ExceptionCasterTest extends TestCase +{ + use VarDumperTestTrait; + + private function getTestException($msg, &$ref = null) + { + return new \Exception(''.$msg); + } + + protected function tearDown() + { + ExceptionCaster::$srcContext = 1; + ExceptionCaster::$traceArgs = true; + } + + public function testDefaultSettings() + { + $ref = array('foo'); + $e = $this->getTestException('foo', $ref); + + $expectedDump = <<<'EODUMP' +Exception { + #message: "foo" + #code: 0 + #file: "%sExceptionCasterTest.php" + #line: 27 + -trace: { + %sExceptionCasterTest.php:27: { + : { + : return new \Exception(''.$msg); + : } + } + %sExceptionCasterTest.php:%d: { + : $ref = array('foo'); + : $e = $this->getTestException('foo', $ref); + : + arguments: { + $msg: "foo" + &$ref: array:1 [ …1] + } + } +%A +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $e); + $this->assertSame(array('foo'), $ref); + } + + public function testSeek() + { + $e = $this->getTestException(2); + + $expectedDump = <<<'EODUMP' +{ + %sExceptionCasterTest.php:27: { + : { + : return new \Exception(''.$msg); + : } + } + %sExceptionCasterTest.php:%d: { + : { + : $e = $this->getTestException(2); + : + arguments: { + $msg: 2 + } + } +%A +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $this->getDump($e, 'trace')); + } + + public function testNoArgs() + { + $e = $this->getTestException(1); + ExceptionCaster::$traceArgs = false; + + $expectedDump = <<<'EODUMP' +Exception { + #message: "1" + #code: 0 + #file: "%sExceptionCasterTest.php" + #line: 27 + -trace: { + %sExceptionCasterTest.php:27: { + : { + : return new \Exception(''.$msg); + : } + } + %sExceptionCasterTest.php:%d: { + : { + : $e = $this->getTestException(1); + : ExceptionCaster::$traceArgs = false; + } +%A +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $e); + } + + public function testNoSrcContext() + { + $e = $this->getTestException(1); + ExceptionCaster::$srcContext = -1; + + $expectedDump = <<<'EODUMP' +Exception { + #message: "1" + #code: 0 + #file: "%sExceptionCasterTest.php" + #line: 27 + -trace: { + %sExceptionCasterTest.php: 27 + %sExceptionCasterTest.php: %d +%A +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $e); + } + + public function testHtmlDump() + { + $e = $this->getTestException(1); + ExceptionCaster::$srcContext = -1; + + $cloner = new VarCloner(); + $cloner->setMaxItems(1); + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $dump = $dumper->dump($cloner->cloneVar($e)->withRefHandles(false), true); + + $expectedDump = <<<'EODUMP' +Exception { + #message: "1" + #code: 0 + #file: "%sTests%eCaster%eExceptionCasterTest.php" + #line: 27 + -trace: { + %sVarDumper%eTests%eCaster%eExceptionCasterTest.php: 27 + …%d + } +} + +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $dump); + } + + /** + * @requires function Twig_Template::getSourceContext + */ + public function testFrameWithTwig() + { + require_once dirname(__DIR__).'/Fixtures/Twig.php'; + + $f = array( + new FrameStub(array( + 'file' => dirname(__DIR__).'/Fixtures/Twig.php', + 'line' => 20, + 'class' => '__TwigTemplate_VarDumperFixture_u75a09', + )), + new FrameStub(array( + 'file' => dirname(__DIR__).'/Fixtures/Twig.php', + 'line' => 21, + 'class' => '__TwigTemplate_VarDumperFixture_u75a09', + 'object' => new \__TwigTemplate_VarDumperFixture_u75a09(null, __FILE__), + )), + ); + + $expectedDump = <<<'EODUMP' +array:2 [ + 0 => { + class: "__TwigTemplate_VarDumperFixture_u75a09" + src: { + %sTwig.php:1: { + : + : foo bar + : twig source + } + } + } + 1 => { + class: "__TwigTemplate_VarDumperFixture_u75a09" + object: __TwigTemplate_VarDumperFixture_u75a09 { + %A + } + src: { + %sExceptionCasterTest.php:2: { + : foo bar + : twig source + : + } + } + } +] + +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $f); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..000e5feeb125aaa9667f2089477819f2ccb8f247 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Caster\PdoCaster; +use Symfony\Component\VarDumper\Cloner\Stub; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Nicolas Grekas + */ +class PdoCasterTest extends TestCase +{ + use VarDumperTestTrait; + + /** + * @requires extension pdo_sqlite + */ + public function testCastPdo() + { + $pdo = new \PDO('sqlite::memory:'); + $pdo->setAttribute(\PDO::ATTR_STATEMENT_CLASS, array('PDOStatement', array($pdo))); + + $cast = PdoCaster::castPdo($pdo, array(), new Stub(), false); + + $this->assertInstanceOf('Symfony\Component\VarDumper\Caster\EnumStub', $cast["\0~\0attributes"]); + + $attr = $cast["\0~\0attributes"] = $cast["\0~\0attributes"]->value; + $this->assertInstanceOf('Symfony\Component\VarDumper\Caster\ConstStub', $attr['CASE']); + $this->assertSame('NATURAL', $attr['CASE']->class); + $this->assertSame('BOTH', $attr['DEFAULT_FETCH_MODE']->class); + + $xDump = <<<'EODUMP' +array:2 [ + "\x00~\x00inTransaction" => false + "\x00~\x00attributes" => array:9 [ + "CASE" => NATURAL + "ERRMODE" => SILENT + "PERSISTENT" => false + "DRIVER_NAME" => "sqlite" + "ORACLE_NULLS" => NATURAL + "CLIENT_VERSION" => "%s" + "SERVER_VERSION" => "%s" + "STATEMENT_CLASS" => array:%d [ + 0 => "PDOStatement"%A + ] + "DEFAULT_FETCH_MODE" => BOTH + ] +] +EODUMP; + + $this->assertDumpMatchesFormat($xDump, $cast); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/RedisCasterTest.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/RedisCasterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..af038192f5c8d85291fb299c128e3d245ba12c3a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/RedisCasterTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Nicolas Grekas + * @requires extension redis + */ +class RedisCasterTest extends TestCase +{ + use VarDumperTestTrait; + + public function testNotConnected() + { + $redis = new \Redis(); + + if (defined('HHVM_VERSION_ID')) { + $xCast = <<<'EODUMP' +Redis { + #host: "" +%A +} +EODUMP; + } else { + $xCast = <<<'EODUMP' +Redis { + isConnected: false +} +EODUMP; + } + + $this->assertDumpMatchesFormat($xCast, $redis); + } + + public function testConnected() + { + $redis = new \Redis(); + if (!@$redis->connect('127.0.0.1')) { + $e = error_get_last(); + self::markTestSkipped($e['message']); + } + + if (defined('HHVM_VERSION_ID')) { + $xCast = <<<'EODUMP' +Redis { + #host: "127.0.0.1" +%A +} +EODUMP; + } else { + $xCast = <<<'EODUMP' +Redis { + +"socket": Redis Socket Buffer resource + isConnected: true + host: "127.0.0.1" + port: 6379 + auth: null + dbNum: 0 + timeout: 0.0 + persistentId: null + options: { + READ_TIMEOUT: 0.0 + SERIALIZER: NONE + PREFIX: null + SCAN: NORETRY + } +} +EODUMP; + } + + $this->assertDumpMatchesFormat($xCast, $redis); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5495a78e40f34f152ce8a9b8368ffb1b937407e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php @@ -0,0 +1,235 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; +use Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo; +use Symfony\Component\VarDumper\Tests\Fixtures\NotLoadableClass; + +/** + * @author Nicolas Grekas + */ +class ReflectionCasterTest extends TestCase +{ + use VarDumperTestTrait; + + public function testReflectionCaster() + { + $var = new \ReflectionClass('ReflectionClass'); + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +ReflectionClass { + +name: "ReflectionClass" +%Aimplements: array:%d [ + 0 => "Reflector" +%A] + constants: array:3 [ + "IS_IMPLICIT_ABSTRACT" => 16 + "IS_EXPLICIT_ABSTRACT" => 32 + "IS_FINAL" => %d + ] + properties: array:%d [ + "name" => ReflectionProperty { +%A +name: "name" + +class: "ReflectionClass" +%A modifiers: "public" + } +%A] + methods: array:%d [ +%A + "export" => ReflectionMethod { + +name: "export" + +class: "ReflectionClass" +%A parameters: { + $%s: ReflectionParameter { +%A position: 0 +%A +} +EOTXT + , $var + ); + } + + public function testClosureCaster() + { + $a = $b = 123; + $var = function ($x) use ($a, &$b) {}; + + $this->assertDumpMatchesFormat( + <<assertDumpMatchesFormat( + <<<'EOTXT' +ReflectionParameter { + +name: "arg1" + position: 0 + typeHint: "Symfony\Component\VarDumper\Tests\Fixtures\NotLoadableClass" + default: null +} +EOTXT + , $var + ); + } + + /** + * @requires PHP 7.0 + */ + public function testReflectionParameterScalar() + { + $f = eval('return function (int $a) {};'); + $var = new \ReflectionParameter($f, 0); + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +ReflectionParameter { + +name: "a" + position: 0 + typeHint: "int" +} +EOTXT + , $var + ); + } + + /** + * @requires PHP 7.0 + */ + public function testReturnType() + { + $f = eval('return function ():int {};'); + $line = __LINE__ - 1; + + $this->assertDumpMatchesFormat( + <<markTestSkipped('xdebug is active'); + } + + $generator = new GeneratorDemo(); + $generator = $generator->baz(); + + $expectedDump = <<<'EODUMP' +Generator { + this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …} + executing: { + Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo->baz(): { + %sGeneratorDemo.php:14: { + : { + : yield from bar(); + : } + } + } + } + closed: false +} +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $generator); + + foreach ($generator as $v) { + break; + } + + $expectedDump = <<<'EODUMP' +array:2 [ + 0 => ReflectionGenerator { + this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …} + trace: { + %sGeneratorDemo.php:9: { + : { + : yield 1; + : } + } + %sGeneratorDemo.php:20: { + : { + : yield from GeneratorDemo::foo(); + : } + } + %sGeneratorDemo.php:14: { + : { + : yield from bar(); + : } + } + } + closed: false + } + 1 => Generator { + executing: { + Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo(): { + %sGeneratorDemo.php:10: { + : yield 1; + : } + : + } + } + } + closed: false + } +] +EODUMP; + + $r = new \ReflectionGenerator($generator); + $this->assertDumpMatchesFormat($expectedDump, array($r, $r->getExecutingGenerator())); + + foreach ($generator as $v) { + } + + $expectedDump = <<<'EODUMP' +Generator { + closed: true +} +EODUMP; + $this->assertDumpMatchesFormat($expectedDump, $generator); + } +} + +function reflectionParameterFixture(NotLoadableClass $arg1 = null, $arg2) +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e2181d90b5b1dfc7b58c47193d25fd1e8f230ba1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php @@ -0,0 +1,147 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Grégoire Pineau + */ +class SplCasterTest extends TestCase +{ + use VarDumperTestTrait; + + public function getCastFileInfoTests() + { + return array( + array(__FILE__, <<<'EOTXT' +SplFileInfo { +%Apath: "%sCaster" + filename: "SplCasterTest.php" + basename: "SplCasterTest.php" + pathname: "%sSplCasterTest.php" + extension: "php" + realPath: "%sSplCasterTest.php" + aTime: %s-%s-%d %d:%d:%d + mTime: %s-%s-%d %d:%d:%d + cTime: %s-%s-%d %d:%d:%d + inode: %d + size: %d + perms: 0%d + owner: %d + group: %d + type: "file" + writable: true + readable: true + executable: false + file: true + dir: false + link: false +%A} +EOTXT + ), + array('https://google.com/about', <<<'EOTXT' +SplFileInfo { +%Apath: "https://google.com" + filename: "about" + basename: "about" + pathname: "https://google.com/about" + extension: "" + realPath: false +%A} +EOTXT + ), + ); + } + + /** @dataProvider getCastFileInfoTests */ + public function testCastFileInfo($file, $dump) + { + $this->assertDumpMatchesFormat($dump, new \SplFileInfo($file)); + } + + public function testCastFileObject() + { + $var = new \SplFileObject(__FILE__); + $var->setFlags(\SplFileObject::DROP_NEW_LINE | \SplFileObject::SKIP_EMPTY); + $dump = <<<'EOTXT' +SplFileObject { +%Apath: "%sCaster" + filename: "SplCasterTest.php" + basename: "SplCasterTest.php" + pathname: "%sSplCasterTest.php" + extension: "php" + realPath: "%sSplCasterTest.php" + aTime: %s-%s-%d %d:%d:%d + mTime: %s-%s-%d %d:%d:%d + cTime: %s-%s-%d %d:%d:%d + inode: %d + size: %d + perms: 0%d + owner: %d + group: %d + type: "file" + writable: true + readable: true + executable: false + file: true + dir: false + link: false +%AcsvControl: array:%d [ + 0 => "," + 1 => """ +%A] + flags: DROP_NEW_LINE|SKIP_EMPTY + maxLineLen: 0 + fstat: array:26 [ + "dev" => %d + "ino" => %d + "nlink" => %d + "rdev" => 0 + "blksize" => %i + "blocks" => %i + …20 + ] + eof: false + key: 0 +} +EOTXT; + $this->assertDumpMatchesFormat($dump, $var); + } + + /** + * @dataProvider provideCastSplDoublyLinkedList + */ + public function testCastSplDoublyLinkedList($modeValue, $modeDump) + { + $var = new \SplDoublyLinkedList(); + $var->setIteratorMode($modeValue); + $dump = <<assertDumpMatchesFormat($dump, $var); + } + + public function provideCastSplDoublyLinkedList() + { + return array( + array(\SplDoublyLinkedList::IT_MODE_FIFO, 'IT_MODE_FIFO | IT_MODE_KEEP'), + array(\SplDoublyLinkedList::IT_MODE_LIFO, 'IT_MODE_LIFO | IT_MODE_KEEP'), + array(\SplDoublyLinkedList::IT_MODE_FIFO | \SplDoublyLinkedList::IT_MODE_DELETE, 'IT_MODE_FIFO | IT_MODE_DELETE'), + array(\SplDoublyLinkedList::IT_MODE_LIFO | \SplDoublyLinkedList::IT_MODE_DELETE, 'IT_MODE_LIFO | IT_MODE_DELETE'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/StubCasterTest.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/StubCasterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b1d1c85be6a1372116378d64dc334eae71702582 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/StubCasterTest.php @@ -0,0 +1,171 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Caster\ArgsStub; +use Symfony\Component\VarDumper\Caster\ClassStub; +use Symfony\Component\VarDumper\Caster\LinkStub; +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; +use Symfony\Component\VarDumper\Tests\Fixtures\FooInterface; + +class StubCasterTest extends TestCase +{ + use VarDumperTestTrait; + + public function testArgsStubWithDefaults($foo = 234, $bar = 456) + { + $args = array(new ArgsStub(array(123), __FUNCTION__, __CLASS__)); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => { + $foo: 123 + } +] +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $args); + } + + public function testArgsStubWithExtraArgs($foo = 234) + { + $args = array(new ArgsStub(array(123, 456), __FUNCTION__, __CLASS__)); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => { + $foo: 123 + ...: { + 456 + } + } +] +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $args); + } + + public function testArgsStubNoParamWithExtraArgs() + { + $args = array(new ArgsStub(array(123), __FUNCTION__, __CLASS__)); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => { + 123 + } +] +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $args); + } + + public function testArgsStubWithClosure() + { + $args = array(new ArgsStub(array(123), '{closure}', null)); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => { + 123 + } +] +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $args); + } + + public function testLinkStub() + { + $var = array(new LinkStub(__CLASS__, 0, __FILE__)); + + $cloner = new VarCloner(); + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $dumper->setDisplayOptions(array('fileLinkFormat' => '%f:%l')); + $dump = $dumper->dump($cloner->cloneVar($var), true); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => "Symfony\Component\VarDumper\Tests\Caster\StubCasterTest" +] + +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $dump); + } + + public function testClassStub() + { + $var = array(new ClassStub('hello', array(FooInterface::class, 'foo'))); + + $cloner = new VarCloner(); + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $dump = $dumper->dump($cloner->cloneVar($var), true, array('fileLinkFormat' => '%f:%l')); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => "hello" +] + +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $dump); + } + + public function testClassStubWithNotExistingClass() + { + $var = array(new ClassStub(NotExisting::class)); + + $cloner = new VarCloner(); + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $dump = $dumper->dump($cloner->cloneVar($var), true); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => "Symfony\Component\VarDumper\Tests\Caster\NotExisting" +] + +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $dump); + } + + public function testClassStubWithNotExistingMethod() + { + $var = array(new ClassStub('hello', array(FooInterface::class, 'missing'))); + + $cloner = new VarCloner(); + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $dump = $dumper->dump($cloner->cloneVar($var), true, array('fileLinkFormat' => '%f:%l')); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => "hello" +] + +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $dump); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..374d298af1637e3e86b3d0d60f698af1ce40bca3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php @@ -0,0 +1,248 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Baptiste Clavié + */ +class XmlReaderCasterTest extends TestCase +{ + use VarDumperTestTrait; + + /** @var \XmlReader */ + private $reader; + + protected function setUp() + { + $this->reader = new \XmlReader(); + $this->reader->open(__DIR__.'/../Fixtures/xml_reader.xml'); + } + + protected function tearDown() + { + $this->reader->close(); + } + + public function testParserProperty() + { + $this->reader->setParserProperty(\XMLReader::SUBST_ENTITIES, true); + + $expectedDump = <<<'EODUMP' +XMLReader { + +nodeType: NONE + parserProperties: { + SUBST_ENTITIES: true + …3 + } + …12 +} +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $this->reader); + } + + /** + * @dataProvider provideNodes + */ + public function testNodes($seek, $expectedDump) + { + while ($seek--) { + $this->reader->read(); + } + $this->assertDumpMatchesFormat($expectedDump, $this->reader); + } + + public function provideNodes() + { + return array( + array(0, <<<'EODUMP' +XMLReader { + +nodeType: NONE + …13 +} +EODUMP + ), + array(1, <<<'EODUMP' +XMLReader { + +localName: "foo" + +nodeType: ELEMENT + +baseURI: "%sxml_reader.xml" + …11 +} +EODUMP + ), + array(2, <<<'EODUMP' +XMLReader { + +localName: "#text" + +nodeType: SIGNIFICANT_WHITESPACE + +depth: 1 + +value: """ + \n + + """ + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(3, <<<'EODUMP' +XMLReader { + +localName: "bar" + +nodeType: ELEMENT + +depth: 1 + +baseURI: "%sxml_reader.xml" + …10 +} +EODUMP + ), + array(4, <<<'EODUMP' +XMLReader { + +localName: "bar" + +nodeType: END_ELEMENT + +depth: 1 + +baseURI: "%sxml_reader.xml" + …10 +} +EODUMP + ), + array(6, <<<'EODUMP' +XMLReader { + +localName: "bar" + +nodeType: ELEMENT + +depth: 1 + +isEmptyElement: true + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(9, <<<'EODUMP' +XMLReader { + +localName: "#text" + +nodeType: TEXT + +depth: 2 + +value: "With text" + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(12, <<<'EODUMP' +XMLReader { + +localName: "bar" + +nodeType: ELEMENT + +depth: 1 + +attributeCount: 2 + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(13, <<<'EODUMP' +XMLReader { + +localName: "bar" + +nodeType: END_ELEMENT + +depth: 1 + +baseURI: "%sxml_reader.xml" + …10 +} +EODUMP + ), + array(15, <<<'EODUMP' +XMLReader { + +localName: "bar" + +nodeType: ELEMENT + +depth: 1 + +attributeCount: 1 + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(16, <<<'EODUMP' +XMLReader { + +localName: "#text" + +nodeType: SIGNIFICANT_WHITESPACE + +depth: 2 + +value: """ + \n + + """ + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(17, <<<'EODUMP' +XMLReader { + +localName: "baz" + +prefix: "baz" + +nodeType: ELEMENT + +depth: 2 + +namespaceURI: "http://symfony.com" + +baseURI: "%sxml_reader.xml" + …8 +} +EODUMP + ), + array(18, <<<'EODUMP' +XMLReader { + +localName: "baz" + +prefix: "baz" + +nodeType: END_ELEMENT + +depth: 2 + +namespaceURI: "http://symfony.com" + +baseURI: "%sxml_reader.xml" + …8 +} +EODUMP + ), + array(19, <<<'EODUMP' +XMLReader { + +localName: "#text" + +nodeType: SIGNIFICANT_WHITESPACE + +depth: 2 + +value: """ + \n + + """ + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(21, <<<'EODUMP' +XMLReader { + +localName: "#text" + +nodeType: SIGNIFICANT_WHITESPACE + +depth: 1 + +value: "\n" + +baseURI: "%sxml_reader.xml" + …9 +} +EODUMP + ), + array(22, <<<'EODUMP' +XMLReader { + +localName: "foo" + +nodeType: END_ELEMENT + +baseURI: "%sxml_reader.xml" + …11 +} +EODUMP + ), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8bb3db28ef6f8a0422b7f298f4eff28316152be4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php @@ -0,0 +1,488 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\CliDumper; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Nicolas Grekas + */ +class CliDumperTest extends TestCase +{ + use VarDumperTestTrait; + + public function testGet() + { + require __DIR__.'/Fixtures/dumb-var.php'; + + $dumper = new CliDumper('php://output'); + $dumper->setColors(false); + $cloner = new VarCloner(); + $cloner->addCasters(array( + ':stream' => function ($res, $a) { + unset($a['uri'], $a['wrapper_data']); + + return $a; + }, + )); + $data = $cloner->cloneVar($var); + + ob_start(); + $dumper->dump($data); + $out = ob_get_clean(); + $out = preg_replace('/[ \t]+$/m', '', $out); + $intMax = PHP_INT_MAX; + $res = (int) $var['res']; + + $r = defined('HHVM_VERSION') ? '' : '#%d'; + $this->assertStringMatchesFormat( + << 1 + 0 => &1 null + "const" => 1.1 + 1 => true + 2 => false + 3 => NAN + 4 => INF + 5 => -INF + 6 => {$intMax} + "str" => "déjà\\n" + 7 => b"é\\x00" + "[]" => [] + "res" => stream resource {@{$res} +%A wrapper_type: "plainfile" + stream_type: "STDIO" + mode: "r" + unread_bytes: 0 + seekable: true +%A options: [] + } + "obj" => Symfony\Component\VarDumper\Tests\Fixture\DumbFoo {#%d + +foo: "foo" + +"bar": "bar" + } + "closure" => Closure {{$r} + class: "Symfony\Component\VarDumper\Tests\CliDumperTest" + this: Symfony\Component\VarDumper\Tests\CliDumperTest {{$r} …} + parameters: { + \$a: {} + &\$b: { + typeHint: "PDO" + default: null + } + } + file: "{$var['file']}" + line: "{$var['line']} to {$var['line']}" + } + "line" => {$var['line']} + "nobj" => array:1 [ + 0 => &3 {#%d} + ] + "recurs" => &4 array:1 [ + 0 => &4 array:1 [&4] + ] + 8 => &1 null + "sobj" => Symfony\Component\VarDumper\Tests\Fixture\DumbFoo {#%d} + "snobj" => &3 {#%d} + "snobj2" => {#%d} + "file" => "{$var['file']}" + b"bin-key-é" => "" +] + +EOTXT + , + $out + ); + } + + /** + * @requires extension xml + */ + public function testXmlResource() + { + $var = xml_parser_create(); + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +xml resource { + current_byte_index: %i + current_column_number: %i + current_line_number: 1 + error_code: XML_ERROR_NONE +} +EOTXT + , + $var + ); + } + + public function testJsonCast() + { + $var = (array) json_decode('{"0":{},"1":null}'); + foreach ($var as &$v) { + } + $var[] = &$v; + $var[''] = 2; + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +array:4 [ + "0" => {} + "1" => &1 null + 0 => &1 null + "" => 2 +] +EOTXT + , + $var + ); + } + + public function testObjectCast() + { + $var = (object) array(1 => 1); + $var->{1} = 2; + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +{ + +1: 1 + +"1": 2 +} +EOTXT + , + $var + ); + } + + public function testClosedResource() + { + if (defined('HHVM_VERSION') && HHVM_VERSION_ID < 30600) { + $this->markTestSkipped(); + } + + $var = fopen(__FILE__, 'r'); + fclose($var); + + $dumper = new CliDumper('php://output'); + $dumper->setColors(false); + $cloner = new VarCloner(); + $data = $cloner->cloneVar($var); + + ob_start(); + $dumper->dump($data); + $out = ob_get_clean(); + $res = (int) $var; + + $this->assertStringMatchesFormat( + << 'bar'), + ); + + $this->assertDumpEquals( + << (3) "foo" + 2 => (3) "bar" + ] +] +EOTXT + , + $var + ); + + putenv('DUMP_LIGHT_ARRAY='); + putenv('DUMP_STRING_LENGTH='); + } + + /** + * @requires function Twig_Template::getSourceContext + */ + public function testThrowingCaster() + { + $out = fopen('php://memory', 'r+b'); + + require_once __DIR__.'/Fixtures/Twig.php'; + $twig = new \__TwigTemplate_VarDumperFixture_u75a09(new \Twig_Environment(new \Twig_Loader_Filesystem())); + + $dumper = new CliDumper(); + $dumper->setColors(false); + $cloner = new VarCloner(); + $cloner->addCasters(array( + ':stream' => function ($res, $a) { + unset($a['wrapper_data']); + + return $a; + }, + )); + $cloner->addCasters(array( + ':stream' => eval('return function () use ($twig) { + try { + $twig->render(array()); + } catch (\Twig_Error_Runtime $e) { + throw $e->getPrevious(); + } + };'), + )); + $line = __LINE__ - 2; + $ref = (int) $out; + + $data = $cloner->cloneVar($out); + $dumper->dump($data, $out); + $out = stream_get_contents($out, -1, 0); + + $r = defined('HHVM_VERSION') ? '' : '#%d'; + $this->assertStringMatchesFormat( + <<doDisplay(\$context, \$blocks); + : } catch (Twig_Error \$e) { + } + %sTemplate.php:%d: { + : { + : \$this->displayWithErrorHandling(\$this->env->mergeGlobals(\$context), array_merge(\$this->blocks, \$blocks)); + : } + } + %sTemplate.php:%d: { + : try { + : \$this->display(\$context); + : } catch (%s \$e) { + } + %sCliDumperTest.php:{$line}: { + : } + : };'), + : )); + } + } + } +%Awrapper_type: "PHP" + stream_type: "MEMORY" + mode: "%s+b" + unread_bytes: 0 + seekable: true + uri: "php://memory" +%Aoptions: [] +} + +EOTXT + , + $out + ); + } + + public function testRefsInProperties() + { + $var = (object) array('foo' => 'foo'); + $var->bar = &$var->foo; + + $dumper = new CliDumper(); + $dumper->setColors(false); + $cloner = new VarCloner(); + + $data = $cloner->cloneVar($var); + $out = $dumper->dump($data, true); + + $r = defined('HHVM_VERSION') ? '' : '#%d'; + $this->assertStringMatchesFormat( + <<getSpecialVars(); + + $this->assertDumpEquals( + <<<'EOTXT' +array:3 [ + 0 => array:1 [ + 0 => &1 array:1 [ + 0 => &1 array:1 [&1] + ] + ] + 1 => array:1 [ + "GLOBALS" => &2 array:1 [ + "GLOBALS" => &2 array:1 [&2] + ] + ] + 2 => &2 array:1 [&2] +] +EOTXT + , + $var + ); + } + + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testGlobalsNoExt() + { + $var = $this->getSpecialVars(); + unset($var[0]); + $out = ''; + + $dumper = new CliDumper(function ($line, $depth) use (&$out) { + if ($depth >= 0) { + $out .= str_repeat(' ', $depth).$line."\n"; + } + }); + $dumper->setColors(false); + $cloner = new VarCloner(); + + $refl = new \ReflectionProperty($cloner, 'useExt'); + $refl->setAccessible(true); + $refl->setValue($cloner, false); + + $data = $cloner->cloneVar($var); + $dumper->dump($data); + + $this->assertSame( + <<<'EOTXT' +array:2 [ + 1 => array:1 [ + "GLOBALS" => &1 array:1 [ + "GLOBALS" => &1 array:1 [&1] + ] + ] + 2 => &1 array:1 [&1] +] + +EOTXT + , + $out + ); + } + + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testBuggyRefs() + { + if (PHP_VERSION_ID >= 50600) { + $this->markTestSkipped('PHP 5.6 fixed refs counting'); + } + + $var = $this->getSpecialVars(); + $var = $var[0]; + + $dumper = new CliDumper(); + $dumper->setColors(false); + $cloner = new VarCloner(); + + $data = $cloner->cloneVar($var)->withMaxDepth(3); + $out = ''; + $dumper->dump($data, function ($line, $depth) use (&$out) { + if ($depth >= 0) { + $out .= str_repeat(' ', $depth).$line."\n"; + } + }); + + $this->assertSame( + <<<'EOTXT' +array:1 [ + 0 => array:1 [ + 0 => array:1 [ + 0 => array:1 [ …1] + ] + ] +] + +EOTXT + , + $out + ); + } + + public function testIncompleteClass() + { + $unserializeCallbackHandler = ini_set('unserialize_callback_func', null); + $var = unserialize('O:8:"Foo\Buzz":0:{}'); + ini_set('unserialize_callback_func', $unserializeCallbackHandler); + + $this->assertDumpMatchesFormat( + <<parent = false; + $this->blocks = array(); + $this->path = $path; + } + + protected function doDisplay(array $context, array $blocks = array()) + { + // line 2 + throw new \Exception('Foobar'); + } + + public function getTemplateName() + { + return 'foo.twig'; + } + + public function getDebugInfo() + { + return array(20 => 1, 21 => 2); + } + + public function getSourceContext() + { + return new Twig_Source(" foo bar\n twig source\n\n", 'foo.twig', $this->path ?: __FILE__); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/dumb-var.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/dumb-var.php new file mode 100644 index 0000000000000000000000000000000000000000..59ee19bdad121317d822a838fce15fd75b0809ec --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/dumb-var.php @@ -0,0 +1,40 @@ +bar = 'bar'; + +$g = fopen(__FILE__, 'r'); + +$var = array( + 'number' => 1, null, + 'const' => 1.1, true, false, NAN, INF, -INF, PHP_INT_MAX, + 'str' => "déjà\n", "\xE9\x00", + '[]' => array(), + 'res' => $g, + 'obj' => $foo, + 'closure' => function ($a, \PDO &$b = null) {}, + 'line' => __LINE__ - 1, + 'nobj' => array((object) array()), +); + +$r = array(); +$r[] = &$r; + +$var['recurs'] = &$r; +$var[] = &$var[0]; +$var['sobj'] = $var['obj']; +$var['snobj'] = &$var['nobj'][0]; +$var['snobj2'] = $var['nobj'][0]; +$var['file'] = __FILE__; +$var["bin-key-\xE9"] = ''; + +unset($g, $r); diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/xml_reader.xml b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/xml_reader.xml new file mode 100644 index 0000000000000000000000000000000000000000..740c399fc44376b513182a17affd9ae8ac06bffc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Fixtures/xml_reader.xml @@ -0,0 +1,10 @@ + + + + + With text + + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..24b4bf6d283a7a18c9852e682e53e2a43c53d1ca --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php @@ -0,0 +1,164 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; + +/** + * @author Nicolas Grekas + */ +class HtmlDumperTest extends TestCase +{ + public function testGet() + { + require __DIR__.'/Fixtures/dumb-var.php'; + + $dumper = new HtmlDumper('php://output'); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $cloner = new VarCloner(); + $cloner->addCasters(array( + ':stream' => function ($res, $a) { + unset($a['uri'], $a['wrapper_data']); + + return $a; + }, + )); + $data = $cloner->cloneVar($var); + + ob_start(); + $dumper->dump($data); + $out = ob_get_clean(); + $out = preg_replace('/[ \t]+$/m', '', $out); + $var['file'] = htmlspecialchars($var['file'], ENT_QUOTES, 'UTF-8'); + $intMax = PHP_INT_MAX; + preg_match('/sf-dump-\d+/', $out, $dumpId); + $dumpId = $dumpId[0]; + $res = (int) $var['res']; + + $r = defined('HHVM_VERSION') ? '' : '#%d'; + $this->assertStringMatchesFormat( + <<
    array:24 [ + "number" => 1 + 0 => &1 null + "const" => 1.1 + 1 => true + 2 => false + 3 => NAN + 4 => INF + 5 => -INF + 6 => {$intMax} + "str" => "d&%s;j&%s;\\n" + 7 => b"&%s;\\x00" + "[]" => [] + "res" => stream resource @{$res} +%A wrapper_type: "plainfile" + stream_type: "STDIO" + mode: "r" + unread_bytes: 0 + seekable: true +%A options: [] + } + "obj" => DumbFoo {#%d + +foo: "foo" + +"bar": "bar" + } + "closure" => Closure {{$r} + class: "Symfony\Component\VarDumper\Tests\HtmlDumperTest" + this: HtmlDumperTest {{$r} &%s;} + parameters: { + \$a: {} + &\$b: { + typeHint: "PDO" + default: null + } + } + file: "%sTests%eFixtures%edumb-var.php" + line: "{$var['line']} to {$var['line']}" + } + "line" => {$var['line']} + "nobj" => array:1 [ + 0 => &3 {#%d} + ] + "recurs" => &4 array:1 [ + 0 => &4 array:1 [&4] + ] + 8 => &1 null + "sobj" => DumbFoo {#%d} + "snobj" => &3 {#%d} + "snobj2" => {#%d} + "file" => "{$var['file']}" + b"bin-key-&%s;" => "" +] + + +EOTXT + , + + $out + ); + } + + public function testCharset() + { + $var = mb_convert_encoding('Словарь', 'CP1251', 'UTF-8'); + + $dumper = new HtmlDumper('php://output', 'CP1251'); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $cloner = new VarCloner(); + + $data = $cloner->cloneVar($var); + $out = $dumper->dump($data, true); + + $this->assertStringMatchesFormat( + <<<'EOTXT' +b"Словарь" + + +EOTXT + , + $out + ); + } + + public function testAppend() + { + $out = fopen('php://memory', 'r+b'); + + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $cloner = new VarCloner(); + + $dumper->dump($cloner->cloneVar(123), $out); + $dumper->dump($cloner->cloneVar(456), $out); + + $out = stream_get_contents($out, -1, 0); + + $this->assertSame(<<<'EOTXT' +123 + +456 + + +EOTXT + , + $out + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php new file mode 100644 index 0000000000000000000000000000000000000000..464d67f6cec033af6baad28dcac0be427ea9f5df --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Test; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +class VarDumperTestTraitTest extends TestCase +{ + use VarDumperTestTrait; + + public function testItComparesLargeData() + { + $howMany = 700; + $data = array_fill_keys(range(0, $howMany), array('a', 'b', 'c', 'd')); + + $expected = sprintf("array:%d [\n", $howMany + 1); + for ($i = 0; $i <= $howMany; ++$i) { + $expected .= << array:4 [ + 0 => "a" + 1 => "b" + 2 => "c" + 3 => "d" + ]\n +EODUMP; + } + $expected .= "]\n"; + + $this->assertDumpEquals($expected, $data); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/VarClonerTest.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/VarClonerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..273be61121bced9e06442fede3626e1c266a6716 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Tests/VarClonerTest.php @@ -0,0 +1,294 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Cloner\VarCloner; + +/** + * @author Nicolas Grekas + */ +class VarClonerTest extends TestCase +{ + public function testMaxIntBoundary() + { + $data = array(PHP_INT_MAX => 123); + + $cloner = new VarCloner(); + $clone = $cloner->cloneVar($data); + + $expected = << Array + ( + [0] => Array + ( + [0] => Symfony\Component\VarDumper\Cloner\Stub Object + ( + [type] => array + [class] => assoc + [value] => 1 + [cut] => 0 + [handle] => 0 + [refCount] => 0 + [position] => 1 + [attr] => Array + ( + ) + + ) + + ) + + [1] => Array + ( + [%s] => 123 + ) + + ) + + [position:Symfony\Component\VarDumper\Cloner\Data:private] => 0 + [key:Symfony\Component\VarDumper\Cloner\Data:private] => 0 + [maxDepth:Symfony\Component\VarDumper\Cloner\Data:private] => 20 + [maxItemsPerDepth:Symfony\Component\VarDumper\Cloner\Data:private] => -1 + [useRefHandles:Symfony\Component\VarDumper\Cloner\Data:private] => -1 +) + +EOTXT; + $this->assertSame(sprintf($expected, PHP_INT_MAX), print_r($clone, true)); + } + + public function testClone() + { + $json = json_decode('{"1":{"var":"val"},"2":{"var":"val"}}'); + + $cloner = new VarCloner(); + $clone = $cloner->cloneVar($json); + + $expected = << Array + ( + [0] => Array + ( + [0] => Symfony\Component\VarDumper\Cloner\Stub Object + ( + [type] => object + [class] => stdClass + [value] => + [cut] => 0 + [handle] => %i + [refCount] => 0 + [position] => 1 + [attr] => Array + ( + ) + + ) + + ) + + [1] => Array + ( + [\000+\0001] => Symfony\Component\VarDumper\Cloner\Stub Object + ( + [type] => object + [class] => stdClass + [value] => + [cut] => 0 + [handle] => %i + [refCount] => 0 + [position] => 2 + [attr] => Array + ( + ) + + ) + + [\000+\0002] => Symfony\Component\VarDumper\Cloner\Stub Object + ( + [type] => object + [class] => stdClass + [value] => + [cut] => 0 + [handle] => %i + [refCount] => 0 + [position] => 3 + [attr] => Array + ( + ) + + ) + + ) + + [2] => Array + ( + [\000+\000var] => val + ) + + [3] => Array + ( + [\000+\000var] => val + ) + + ) + + [position:Symfony\Component\VarDumper\Cloner\Data:private] => 0 + [key:Symfony\Component\VarDumper\Cloner\Data:private] => 0 + [maxDepth:Symfony\Component\VarDumper\Cloner\Data:private] => 20 + [maxItemsPerDepth:Symfony\Component\VarDumper\Cloner\Data:private] => -1 + [useRefHandles:Symfony\Component\VarDumper\Cloner\Data:private] => -1 +) + +EOTXT; + $this->assertStringMatchesFormat($expected, print_r($clone, true)); + } + + public function testJsonCast() + { + if (ini_get('xdebug.overload_var_dump') == 2) { + $this->markTestSkipped('xdebug is active'); + } + + $data = (array) json_decode('{"1":{}}'); + + $cloner = new VarCloner(); + $clone = $cloner->cloneVar($data); + + $expected = <<<'EOTXT' +object(Symfony\Component\VarDumper\Cloner\Data)#%i (6) { + ["data":"Symfony\Component\VarDumper\Cloner\Data":private]=> + array(2) { + [0]=> + array(1) { + [0]=> + object(Symfony\Component\VarDumper\Cloner\Stub)#%i (8) { + ["type"]=> + string(5) "array" + ["class"]=> + string(5) "assoc" + ["value"]=> + int(1) + ["cut"]=> + int(0) + ["handle"]=> + int(0) + ["refCount"]=> + int(0) + ["position"]=> + int(1) + ["attr"]=> + array(0) { + } + } + } + [1]=> + array(1) { + ["1"]=> + object(Symfony\Component\VarDumper\Cloner\Stub)#%i (8) { + ["type"]=> + string(6) "object" + ["class"]=> + string(8) "stdClass" + ["value"]=> + NULL + ["cut"]=> + int(0) + ["handle"]=> + int(%i) + ["refCount"]=> + int(0) + ["position"]=> + int(0) + ["attr"]=> + array(0) { + } + } + } + } + ["position":"Symfony\Component\VarDumper\Cloner\Data":private]=> + int(0) + ["key":"Symfony\Component\VarDumper\Cloner\Data":private]=> + int(0) + ["maxDepth":"Symfony\Component\VarDumper\Cloner\Data":private]=> + int(20) + ["maxItemsPerDepth":"Symfony\Component\VarDumper\Cloner\Data":private]=> + int(-1) + ["useRefHandles":"Symfony\Component\VarDumper\Cloner\Data":private]=> + int(-1) +} + +EOTXT; + ob_start(); + var_dump($clone); + $this->assertStringMatchesFormat($expected, ob_get_clean()); + } + + public function testCaster() + { + $cloner = new VarCloner(array( + '*' => function ($obj, $array) { + return array('foo' => 123); + }, + __CLASS__ => function ($obj, $array) { + ++$array['foo']; + + return $array; + }, + )); + $clone = $cloner->cloneVar($this); + + $expected = << Array + ( + [0] => Array + ( + [0] => Symfony\Component\VarDumper\Cloner\Stub Object + ( + [type] => object + [class] => %s + [value] => + [cut] => 0 + [handle] => %i + [refCount] => 0 + [position] => 1 + [attr] => Array + ( + ) + + ) + + ) + + [1] => Array + ( + [foo] => 124 + ) + + ) + + [position:Symfony\Component\VarDumper\Cloner\Data:private] => 0 + [key:Symfony\Component\VarDumper\Cloner\Data:private] => 0 + [maxDepth:Symfony\Component\VarDumper\Cloner\Data:private] => 20 + [maxItemsPerDepth:Symfony\Component\VarDumper\Cloner\Data:private] => -1 + [useRefHandles:Symfony\Component\VarDumper\Cloner\Data:private] => -1 +) + +EOTXT; + $this->assertStringMatchesFormat($expected, print_r($clone, true)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/VarDumper.php b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/VarDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..8c610c5d33b8637ae279cda595e2b4fde8a87edc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/VarDumper.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper; + +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\CliDumper; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; + +// Load the global dump() function +require_once __DIR__.'/Resources/functions/dump.php'; + +/** + * @author Nicolas Grekas + */ +class VarDumper +{ + private static $handler; + + public static function dump($var) + { + if (null === self::$handler) { + $cloner = new VarCloner(); + $dumper = 'cli' === PHP_SAPI ? new CliDumper() : new HtmlDumper(); + self::$handler = function ($var) use ($cloner, $dumper) { + $dumper->dump($cloner->cloneVar($var)); + }; + } + + return call_user_func(self::$handler, $var); + } + + public static function setHandler(callable $callable = null) + { + $prevHandler = self::$handler; + self::$handler = $callable; + + return $prevHandler; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/composer.json b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..8b2e0c86f45489fa6a1e096948835b2d426dc9e9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/composer.json @@ -0,0 +1,44 @@ +{ + "name": "symfony/var-dumper", + "type": "library", + "description": "Symfony mechanism for exploring and dumping PHP variables", + "keywords": ["dump", "debug"], + "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.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "autoload": { + "files": [ "Resources/functions/dump.php" ], + "psr-4": { "Symfony\\Component\\VarDumper\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/VarDumper/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..e39e6aa123f657ed39d0440ef6775fe7f0a0def1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/VarDumper/phpunit.xml.dist @@ -0,0 +1,31 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Workflow/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..c4df4750f73b208f7e0981d82a71606e2bed26e4 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/CHANGELOG.md @@ -0,0 +1,2 @@ +CHANGELOG +========= diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Definition.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Definition.php new file mode 100644 index 0000000000000000000000000000000000000000..5f8571b329a09499d052b35b8da985a63943d5ea --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Definition.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\Workflow; + +use Symfony\Component\Workflow\Exception\InvalidArgumentException; +use Symfony\Component\Workflow\Exception\LogicException; + +/** + * @author Fabien Potencier + * @author Grégoire Pineau + * @author Tobias Nyholm + */ +final class Definition +{ + private $places = array(); + private $transitions = array(); + private $initialPlace; + + /** + * @param string[] $places + * @param Transition[] $transitions + * @param string|null $initialPlace + */ + public function __construct(array $places, array $transitions, $initialPlace = null) + { + foreach ($places as $place) { + $this->addPlace($place); + } + + foreach ($transitions as $transition) { + $this->addTransition($transition); + } + + $this->setInitialPlace($initialPlace); + } + + /** + * @return string|null + */ + public function getInitialPlace() + { + return $this->initialPlace; + } + + /** + * @return string[] + */ + public function getPlaces() + { + return $this->places; + } + + /** + * @return Transition[] + */ + public function getTransitions() + { + return $this->transitions; + } + + private function setInitialPlace($place) + { + if (null === $place) { + return; + } + + if (!isset($this->places[$place])) { + throw new LogicException(sprintf('Place "%s" cannot be the initial place as it does not exist.', $place)); + } + + $this->initialPlace = $place; + } + + private function addPlace($place) + { + if (!preg_match('{^[\w\d_-]+$}', $place)) { + throw new InvalidArgumentException(sprintf('The place "%s" contains invalid characters.', $place)); + } + + if (!count($this->places)) { + $this->initialPlace = $place; + } + + $this->places[$place] = $place; + } + + private function addTransition(Transition $transition) + { + $name = $transition->getName(); + + foreach ($transition->getFroms() as $from) { + if (!isset($this->places[$from])) { + throw new LogicException(sprintf('Place "%s" referenced in transition "%s" does not exist.', $from, $name)); + } + } + + foreach ($transition->getTos() as $to) { + if (!isset($this->places[$to])) { + throw new LogicException(sprintf('Place "%s" referenced in transition "%s" does not exist.', $to, $name)); + } + } + + $this->transitions[] = $transition; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/DefinitionBuilder.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/DefinitionBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..34d27aa5e9d0dff0a0dce057626ab11cfe902684 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/DefinitionBuilder.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\Component\Workflow; + +use Symfony\Component\Workflow\Exception\InvalidArgumentException; + +/** + * Builds a definition. + * + * @author Fabien Potencier + * @author Grégoire Pineau + * @author Tobias Nyholm + */ +class DefinitionBuilder +{ + private $places = array(); + private $transitions = array(); + private $initialPlace; + + /** + * @param string[] $places + * @param Transition[] $transitions + */ + public function __construct(array $places = array(), array $transitions = array()) + { + $this->addPlaces($places); + $this->addTransitions($transitions); + } + + /** + * @return Definition + */ + public function build() + { + return new Definition($this->places, $this->transitions, $this->initialPlace); + } + + /** + * Clear all data in the builder. + */ + public function reset() + { + $this->places = array(); + $this->transitions = array(); + $this->initialPlace = null; + } + + public function setInitialPlace($place) + { + $this->initialPlace = $place; + } + + public function addPlace($place) + { + if (!preg_match('{^[\w\d_-]+$}', $place)) { + throw new InvalidArgumentException(sprintf('The place "%s" contains invalid characters.', $place)); + } + + if (!$this->places) { + $this->initialPlace = $place; + } + + $this->places[$place] = $place; + } + + public function addPlaces(array $places) + { + foreach ($places as $place) { + $this->addPlace($place); + } + } + + /** + * @param Transition[] $transitions + */ + public function addTransitions(array $transitions) + { + foreach ($transitions as $transition) { + $this->addTransition($transition); + } + } + + public function addTransition(Transition $transition) + { + $this->transitions[] = $transition; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/DumperInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/DumperInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b0eebd34f19527ee1c2716c01df785c3e6b98304 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/DumperInterface.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow\Dumper; + +use Symfony\Component\Workflow\Definition; +use Symfony\Component\Workflow\Marking; + +/** + * DumperInterface is the interface implemented by workflow dumper classes. + * + * @author Fabien Potencier + * @author Grégoire Pineau + */ +interface DumperInterface +{ + /** + * Dumps a workflow definition. + * + * @param Definition $definition A Definition instance + * @param Marking|null $marking A Marking instance + * @param array $options An array of options + * + * @return string The representation of the workflow + */ + public function dump(Definition $definition, Marking $marking = null, array $options = array()); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..3681b6f1391a875e8cb6b1c07c039f2eb72a7744 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php @@ -0,0 +1,225 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow\Dumper; + +use Symfony\Component\Workflow\Definition; +use Symfony\Component\Workflow\Marking; + +/** + * GraphvizDumper dumps a workflow as a graphviz file. + * + * You can convert the generated dot file with the dot utility (http://www.graphviz.org/): + * + * dot -Tpng workflow.dot > workflow.png + * + * @author Fabien Potencier + * @author Grégoire Pineau + */ +class GraphvizDumper implements DumperInterface +{ + protected static $defaultOptions = array( + 'graph' => array('ratio' => 'compress', 'rankdir' => 'LR'), + 'node' => array('fontsize' => 9, 'fontname' => 'Arial', 'color' => '#333333', 'fillcolor' => 'lightblue', 'fixedsize' => true, 'width' => 1), + 'edge' => array('fontsize' => 9, 'fontname' => 'Arial', 'color' => '#333333', 'arrowhead' => 'normal', 'arrowsize' => 0.5), + ); + + /** + * {@inheritdoc} + * + * Dumps the workflow as a graphviz graph. + * + * Available options: + * + * * graph: The default options for the whole graph + * * node: The default options for nodes (places + transitions) + * * edge: The default options for edges + */ + public function dump(Definition $definition, Marking $marking = null, array $options = array()) + { + $places = $this->findPlaces($definition, $marking); + $transitions = $this->findTransitions($definition); + $edges = $this->findEdges($definition); + + $options = array_replace_recursive(self::$defaultOptions, $options); + + return $this->startDot($options) + .$this->addPlaces($places) + .$this->addTransitions($transitions) + .$this->addEdges($edges) + .$this->endDot(); + } + + /** + * @internal + */ + protected function findPlaces(Definition $definition, Marking $marking = null) + { + $places = array(); + + foreach ($definition->getPlaces() as $place) { + $attributes = array(); + if ($place === $definition->getInitialPlace()) { + $attributes['style'] = 'filled'; + } + if ($marking && $marking->has($place)) { + $attributes['color'] = '#FF0000'; + $attributes['shape'] = 'doublecircle'; + } + $places[$place] = array( + 'attributes' => $attributes, + ); + } + + return $places; + } + + /** + * @internal + */ + protected function findTransitions(Definition $definition) + { + $transitions = array(); + + foreach ($definition->getTransitions() as $transition) { + $transitions[] = array( + 'attributes' => array('shape' => 'box', 'regular' => true), + 'name' => $transition->getName(), + ); + } + + return $transitions; + } + + /** + * @internal + */ + protected function addPlaces(array $places) + { + $code = ''; + + foreach ($places as $id => $place) { + $code .= sprintf(" place_%s [label=\"%s\", shape=circle%s];\n", $this->dotize($id), $id, $this->addAttributes($place['attributes'])); + } + + return $code; + } + + /** + * @internal + */ + protected function addTransitions(array $transitions) + { + $code = ''; + + foreach ($transitions as $place) { + $code .= sprintf(" transition_%s [label=\"%s\", shape=box%s];\n", $this->dotize($place['name']), $place['name'], $this->addAttributes($place['attributes'])); + } + + return $code; + } + + /** + * @internal + */ + protected function findEdges(Definition $definition) + { + $dotEdges = array(); + + foreach ($definition->getTransitions() as $transition) { + foreach ($transition->getFroms() as $from) { + $dotEdges[] = array( + 'from' => $from, + 'to' => $transition->getName(), + 'direction' => 'from', + ); + } + foreach ($transition->getTos() as $to) { + $dotEdges[] = array( + 'from' => $transition->getName(), + 'to' => $to, + 'direction' => 'to', + ); + } + } + + return $dotEdges; + } + + /** + * @internal + */ + protected function addEdges(array $edges) + { + $code = ''; + + foreach ($edges as $edge) { + $code .= sprintf(" %s_%s -> %s_%s [style=\"solid\"];\n", + 'from' === $edge['direction'] ? 'place' : 'transition', + $this->dotize($edge['from']), + 'from' === $edge['direction'] ? 'transition' : 'place', + $this->dotize($edge['to']) + ); + } + + return $code; + } + + /** + * @internal + */ + protected function startDot(array $options) + { + return sprintf("digraph workflow {\n %s\n node [%s];\n edge [%s];\n\n", + $this->addOptions($options['graph']), + $this->addOptions($options['node']), + $this->addOptions($options['edge']) + ); + } + + /** + * @internal + */ + protected function endDot() + { + return "}\n"; + } + + /** + * @internal + */ + protected function dotize($id) + { + return strtolower(preg_replace('/[^\w]/i', '_', $id)); + } + + private function addAttributes(array $attributes) + { + $code = array(); + + foreach ($attributes as $k => $v) { + $code[] = sprintf('%s="%s"', $k, $v); + } + + return $code ? ', '.implode(', ', $code) : ''; + } + + private function addOptions(array $options) + { + $code = array(); + + foreach ($options as $k => $v) { + $code[] = sprintf('%s="%s"', $k, $v); + } + + return implode(' ', $code); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/StateMachineGraphvizDumper.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/StateMachineGraphvizDumper.php new file mode 100644 index 0000000000000000000000000000000000000000..9f68e1daf72f3dceb9a322c121e86de7993034a1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Dumper/StateMachineGraphvizDumper.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow\Dumper; + +use Symfony\Component\Workflow\Definition; +use Symfony\Component\Workflow\Marking; + +class StateMachineGraphvizDumper extends GraphvizDumper +{ + /** + * {@inheritdoc} + * + * Dumps the workflow as a graphviz graph. + * + * Available options: + * + * * graph: The default options for the whole graph + * * node: The default options for nodes (places) + * * edge: The default options for edges + */ + public function dump(Definition $definition, Marking $marking = null, array $options = array()) + { + $places = $this->findPlaces($definition, $marking); + $edges = $this->findEdges($definition); + + $options = array_replace_recursive(self::$defaultOptions, $options); + + return $this->startDot($options) + .$this->addPlaces($places) + .$this->addEdges($edges) + .$this->endDot() + ; + } + + /** + * @internal + */ + protected function findEdges(Definition $definition) + { + $edges = array(); + + foreach ($definition->getTransitions() as $transition) { + foreach ($transition->getFroms() as $from) { + foreach ($transition->getTos() as $to) { + $edges[$from][] = array( + 'name' => $transition->getName(), + 'to' => $to, + ); + } + } + } + + return $edges; + } + + /** + * @internal + */ + protected function addEdges(array $edges) + { + $code = ''; + + foreach ($edges as $id => $edges) { + foreach ($edges as $edge) { + $code .= sprintf(" place_%s -> place_%s [label=\"%s\" style=\"%s\"];\n", $this->dotize($id), $this->dotize($edge['to']), $edge['name'], 'solid'); + } + } + + return $code; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Event/Event.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Event/Event.php new file mode 100644 index 0000000000000000000000000000000000000000..dce6a6f5df8fb7dea0cbcc7a3059bc2c4f147bb5 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Event/Event.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow\Event; + +use Symfony\Component\EventDispatcher\Event as BaseEvent; +use Symfony\Component\Workflow\Marking; +use Symfony\Component\Workflow\Transition; + +/** + * @author Fabien Potencier + * @author Grégoire Pineau + */ +class Event extends BaseEvent +{ + private $subject; + private $marking; + private $transition; + + /** + * @param object $subject + * @param Marking $marking + * @param Transition $transition + */ + public function __construct($subject, Marking $marking, Transition $transition) + { + $this->subject = $subject; + $this->marking = $marking; + $this->transition = $transition; + } + + public function getMarking() + { + return $this->marking; + } + + public function getSubject() + { + return $this->subject; + } + + public function getTransition() + { + return $this->transition; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Event/GuardEvent.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Event/GuardEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..bf4b6f3971e7abfbc089f132fab215bf38032e28 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Event/GuardEvent.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow\Event; + +/** + * @author Fabien Potencier + * @author Grégoire Pineau + */ +class GuardEvent extends Event +{ + private $blocked = false; + + public function isBlocked() + { + return $this->blocked; + } + + public function setBlocked($blocked) + { + $this->blocked = (bool) $blocked; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/EventListener/AuditTrailListener.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/EventListener/AuditTrailListener.php new file mode 100644 index 0000000000000000000000000000000000000000..b32833f2d26dfbe3997436758bde7248c5a80171 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/EventListener/AuditTrailListener.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow\EventListener; + +use Psr\Log\LoggerInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\Workflow\Event\Event; + +/** + * @author Grégoire Pineau + */ +class AuditTrailListener implements EventSubscriberInterface +{ + private $logger; + + public function __construct(LoggerInterface $logger) + { + $this->logger = $logger; + } + + public function onLeave(Event $event) + { + foreach ($event->getTransition()->getFroms() as $place) { + $this->logger->info(sprintf('Leaving "%s" for subject of class "%s".', $place, get_class($event->getSubject()))); + } + } + + public function onTransition(Event $event) + { + $this->logger->info(sprintf('Transition "%s" for subject of class "%s".', $event->getTransition()->getName(), get_class($event->getSubject()))); + } + + public function onEnter(Event $event) + { + foreach ($event->getTransition()->getTos() as $place) { + $this->logger->info(sprintf('Entering "%s" for subject of class "%s".', $place, get_class($event->getSubject()))); + } + } + + public static function getSubscribedEvents() + { + return array( + 'workflow.leave' => array('onLeave'), + 'workflow.transition' => array('onTransition'), + 'workflow.enter' => array('onEnter'), + ); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b0dfa9b79bbc10041040cea9b136469ab2fefdb8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Exception/ExceptionInterface.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\Workflow\Exception; + +/** + * @author Fabien Potencier + * @author Grégoire Pineau + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Exception/InvalidArgumentException.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..c44fa05cdd05c9367d94b25601793dc28006fb23 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Exception/InvalidArgumentException.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\Workflow\Exception; + +/** + * @author Fabien Potencier + * @author Grégoire Pineau + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Exception/InvalidDefinitionException.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Exception/InvalidDefinitionException.php new file mode 100644 index 0000000000000000000000000000000000000000..d41170953564c17349d3c41c600ccf81d819d612 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Exception/InvalidDefinitionException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow\Exception; + +/** + * Thrown by the DefinitionValidatorInterface when the definition is invalid. + * + * @author Tobias Nyholm + */ +class InvalidDefinitionException extends LogicException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Exception/LogicException.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Exception/LogicException.php new file mode 100644 index 0000000000000000000000000000000000000000..d0cf09f9dfe63fe19315534d034d1e236be58db8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Exception/LogicException.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\Workflow\Exception; + +/** + * @author Fabien Potencier + * @author Grégoire Pineau + */ +class LogicException extends \LogicException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Workflow/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..207646a052dcd5ad165e62c15ef3da92e4f61a05 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-2017 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/vendor/symfony/symfony/src/Symfony/Component/Workflow/Marking.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Marking.php new file mode 100644 index 0000000000000000000000000000000000000000..0d8bab25b7fe33749b2910a13714ec5dd05d2e0a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Marking.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow; + +/** + * Marking contains the place of every tokens. + * + * @author Grégoire Pineau + */ +class Marking +{ + private $places = array(); + + /** + * @param string[] $representation Keys are the place name and values should be 1 + */ + public function __construct(array $representation = array()) + { + foreach ($representation as $place => $nbToken) { + $this->mark($place); + } + } + + public function mark($place) + { + $this->places[$place] = 1; + } + + public function unmark($place) + { + unset($this->places[$place]); + } + + public function has($place) + { + return isset($this->places[$place]); + } + + public function getPlaces() + { + return $this->places; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/MarkingStoreInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/MarkingStoreInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..76df9cc0d21600a6b23e488fd49682c0f3063c02 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/MarkingStoreInterface.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\Component\Workflow\MarkingStore; + +use Symfony\Component\Workflow\Marking; + +/** + * MarkingStoreInterface is the interface between the Workflow Component and a + * plain old PHP object: the subject. + * + * It converts the Marking into something understandable by the subject and vice + * versa. + * + * @author Grégoire Pineau + */ +interface MarkingStoreInterface +{ + /** + * Gets a Marking from a subject. + * + * @param object $subject A subject + * + * @return Marking The marking + */ + public function getMarking($subject); + + /** + * Sets a Marking to a subject. + * + * @param object $subject A subject + * @param Marking $marking A marking + */ + public function setMarking($subject, Marking $marking); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/MultipleStateMarkingStore.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/MultipleStateMarkingStore.php new file mode 100644 index 0000000000000000000000000000000000000000..874d1fb5134a5e42d7eb171f551c634ff6bedbf1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/MultipleStateMarkingStore.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow\MarkingStore; + +use Symfony\Component\PropertyAccess\PropertyAccess; +use Symfony\Component\PropertyAccess\PropertyAccessorInterface; +use Symfony\Component\Workflow\Marking; + +/** + * MultipleStateMarkingStore stores the marking into a property of the + * subject. + * + * This store deals with a "multiple state" Marking. It means a subject can be + * in many states at the same time. + * + * @author Grégoire Pineau + */ +class MultipleStateMarkingStore implements MarkingStoreInterface +{ + private $property; + private $propertyAccessor; + + /** + * @param string $property + * @param PropertyAccessorInterface|null $propertyAccessor + */ + public function __construct($property = 'marking', PropertyAccessorInterface $propertyAccessor = null) + { + $this->property = $property; + $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); + } + + /** + * {@inheritdoc} + */ + public function getMarking($subject) + { + return new Marking($this->propertyAccessor->getValue($subject, $this->property) ?: array()); + } + + /** + * {@inheritdoc} + */ + public function setMarking($subject, Marking $marking) + { + $this->propertyAccessor->setValue($subject, $this->property, $marking->getPlaces()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/SingleStateMarkingStore.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/SingleStateMarkingStore.php new file mode 100644 index 0000000000000000000000000000000000000000..99adf1671bab15e27e26469d49b6739b86f6cc91 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/MarkingStore/SingleStateMarkingStore.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow\MarkingStore; + +use Symfony\Component\PropertyAccess\PropertyAccess; +use Symfony\Component\PropertyAccess\PropertyAccessorInterface; +use Symfony\Component\Workflow\Marking; + +/** + * SingleStateMarkingStore stores the marking into a property of the subject. + * + * This store deals with a "single state" Marking. It means a subject can be in + * one and only one state at the same time. + * + * @author Grégoire Pineau + */ +class SingleStateMarkingStore implements MarkingStoreInterface +{ + private $property; + private $propertyAccessor; + + /** + * @param string $property + * @param PropertyAccessorInterface|null $propertyAccessor + */ + public function __construct($property = 'marking', PropertyAccessorInterface $propertyAccessor = null) + { + $this->property = $property; + $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); + } + + /** + * {@inheritdoc} + */ + public function getMarking($subject) + { + $placeName = $this->propertyAccessor->getValue($subject, $this->property); + + if (!$placeName) { + return new Marking(); + } + + return new Marking(array($placeName => 1)); + } + + /** + * {@inheritdoc} + */ + public function setMarking($subject, Marking $marking) + { + $this->propertyAccessor->setValue($subject, $this->property, key($marking->getPlaces())); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/README.md b/vendor/symfony/symfony/src/Symfony/Component/Workflow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d0a1a4d3a9aef8b0b3e255a68a9b17afb4667d4f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/README.md @@ -0,0 +1,11 @@ +Workflow Component +=================== + +Resources +--------- + + * [Documentation](https://symfony.com/doc/master/components/workflow.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/vendor/symfony/symfony/src/Symfony/Component/Workflow/Registry.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Registry.php new file mode 100644 index 0000000000000000000000000000000000000000..53e06fbb5e8e4c727a80c352f85d26efc66dbc45 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Registry.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow; + +use Symfony\Component\Workflow\Exception\InvalidArgumentException; + +/** + * @author Fabien Potencier + * @author Grégoire Pineau + */ +class Registry +{ + private $workflows = array(); + + /** + * @param Workflow $workflow + * @param string $className + */ + public function add(Workflow $workflow, $className) + { + $this->workflows[] = array($workflow, $className); + } + + /** + * @param object $subject + * @param string|null $workflowName + * + * @return Workflow + */ + public function get($subject, $workflowName = null) + { + $matched = null; + + foreach ($this->workflows as list($workflow, $className)) { + if ($this->supports($workflow, $className, $subject, $workflowName)) { + if ($matched) { + throw new InvalidArgumentException('At least two workflows match this subject. Set a different name on each and use the second (name) argument of this method.'); + } + $matched = $workflow; + } + } + + if (!$matched) { + throw new InvalidArgumentException(sprintf('Unable to find a workflow for class "%s".', get_class($subject))); + } + + return $matched; + } + + private function supports(Workflow $workflow, $className, $subject, $name) + { + if (!$subject instanceof $className) { + return false; + } + + if (null === $name) { + return true; + } + + return $name === $workflow->getName(); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/StateMachine.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/StateMachine.php new file mode 100644 index 0000000000000000000000000000000000000000..00cfdac7d493ae6220d3d79d84f2c623faf1da62 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/StateMachine.php @@ -0,0 +1,18 @@ + + */ +class StateMachine extends Workflow +{ + public function __construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, $name = 'unnamed') + { + parent::__construct($definition, $markingStore ?: new SingleStateMarkingStore(), $dispatcher, $name); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionBuilderTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..20eb1c8feeed4eb29196a58d597a9480c0d6dce8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionBuilderTest.php @@ -0,0 +1,55 @@ +setInitialPlace('b'); + $definition = $builder->build(); + + $this->assertEquals('b', $definition->getInitialPlace()); + } + + public function testAddTransition() + { + $places = range('a', 'b'); + + $transition0 = new Transition('name0', $places[0], $places[1]); + $transition1 = new Transition('name1', $places[0], $places[1]); + $builder = new DefinitionBuilder($places, array($transition0)); + $builder->addTransition($transition1); + + $definition = $builder->build(); + + $this->assertCount(2, $definition->getTransitions()); + $this->assertSame($transition0, $definition->getTransitions()[0]); + $this->assertSame($transition1, $definition->getTransitions()[1]); + } + + public function testAddPlace() + { + $builder = new DefinitionBuilder(array('a'), array()); + $builder->addPlace('b'); + + $definition = $builder->build(); + + $this->assertCount(2, $definition->getPlaces()); + $this->assertEquals('a', $definition->getPlaces()['a']); + $this->assertEquals('b', $definition->getPlaces()['b']); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8eb1b6e4cf0fcccc954ecc592a411457391464aa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/DefinitionTest.php @@ -0,0 +1,79 @@ +assertCount(5, $definition->getPlaces()); + + $this->assertEquals('a', $definition->getInitialPlace()); + } + + /** + * @expectedException \Symfony\Component\Workflow\Exception\InvalidArgumentException + */ + public function testAddPlacesInvalidArgument() + { + $places = array('a"', 'e"'); + $definition = new Definition($places, array()); + } + + public function testSetInitialPlace() + { + $places = range('a', 'e'); + $definition = new Definition($places, array(), $places[3]); + + $this->assertEquals($places[3], $definition->getInitialPlace()); + } + + /** + * @expectedException \Symfony\Component\Workflow\Exception\LogicException + * @expectedExceptionMessage Place "d" cannot be the initial place as it does not exist. + */ + public function testSetInitialPlaceAndPlaceIsNotDefined() + { + $definition = new Definition(array(), array(), 'd'); + } + + public function testAddTransition() + { + $places = range('a', 'b'); + + $transition = new Transition('name', $places[0], $places[1]); + $definition = new Definition($places, array($transition)); + + $this->assertCount(1, $definition->getTransitions()); + $this->assertSame($transition, $definition->getTransitions()[0]); + } + + /** + * @expectedException \Symfony\Component\Workflow\Exception\LogicException + * @expectedExceptionMessage Place "c" referenced in transition "name" does not exist. + */ + public function testAddTransitionAndFromPlaceIsNotDefined() + { + $places = range('a', 'b'); + + new Definition($places, array(new Transition('name', 'c', $places[1]))); + } + + /** + * @expectedException \Symfony\Component\Workflow\Exception\LogicException + * @expectedExceptionMessage Place "c" referenced in transition "name" does not exist. + */ + public function testAddTransitionAndToPlaceIsNotDefined() + { + $places = range('a', 'b'); + + new Definition($places, array(new Transition('name', $places[0], 'c'))); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..067cb9d41534aca8115259f91bf0b813bb259221 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php @@ -0,0 +1,177 @@ +dumper = new GraphvizDumper(); + } + + /** + * @dataProvider provideWorkflowDefinitionWithoutMarking + */ + public function testDumpWithoutMarking($definition, $expected) + { + $dump = $this->dumper->dump($definition); + + $this->assertEquals($expected, $dump); + } + + /** + * @dataProvider provideWorkflowDefinitionWithMarking + */ + public function testDumpWithMarking($definition, $marking, $expected) + { + $dump = $this->dumper->dump($definition, $marking); + + $this->assertEquals($expected, $dump); + } + + public function provideWorkflowDefinitionWithMarking() + { + yield array( + $this->createComplexWorkflowDefinition(), + new Marking(array('b' => 1)), + $this->createComplexWorkflowDefinitionDumpWithMarking(), + ); + + yield array( + $this->createSimpleWorkflowDefinition(), + new Marking(array('c' => 1, 'd' => 1)), + $this->createSimpleWorkflowDumpWithMarking(), + ); + } + + public function provideWorkflowDefinitionWithoutMarking() + { + yield array($this->createComplexWorkflowDefinition(), $this->provideComplexWorkflowDumpWithoutMarking()); + yield array($this->createSimpleWorkflowDefinition(), $this->provideSimpleWorkflowDumpWithoutMarking()); + } + + public function createComplexWorkflowDefinitionDumpWithMarking() + { + return 'digraph workflow { + ratio="compress" rankdir="LR" + node [fontsize="9" fontname="Arial" color="#333333" fillcolor="lightblue" fixedsize="1" width="1"]; + edge [fontsize="9" fontname="Arial" color="#333333" arrowhead="normal" arrowsize="0.5"]; + + place_a [label="a", shape=circle, style="filled"]; + place_b [label="b", shape=circle, color="#FF0000", shape="doublecircle"]; + place_c [label="c", shape=circle]; + place_d [label="d", shape=circle]; + place_e [label="e", shape=circle]; + place_f [label="f", shape=circle]; + place_g [label="g", shape=circle]; + transition_t1 [label="t1", shape=box, shape="box", regular="1"]; + transition_t2 [label="t2", shape=box, shape="box", regular="1"]; + transition_t3 [label="t3", shape=box, shape="box", regular="1"]; + transition_t4 [label="t4", shape=box, shape="box", regular="1"]; + transition_t5 [label="t5", shape=box, shape="box", regular="1"]; + transition_t6 [label="t6", shape=box, shape="box", regular="1"]; + place_a -> transition_t1 [style="solid"]; + transition_t1 -> place_b [style="solid"]; + transition_t1 -> place_c [style="solid"]; + place_b -> transition_t2 [style="solid"]; + place_c -> transition_t2 [style="solid"]; + transition_t2 -> place_d [style="solid"]; + place_d -> transition_t3 [style="solid"]; + transition_t3 -> place_e [style="solid"]; + place_d -> transition_t4 [style="solid"]; + transition_t4 -> place_f [style="solid"]; + place_e -> transition_t5 [style="solid"]; + transition_t5 -> place_g [style="solid"]; + place_f -> transition_t6 [style="solid"]; + transition_t6 -> place_g [style="solid"]; +} +'; + } + + public function createSimpleWorkflowDumpWithMarking() + { + return 'digraph workflow { + ratio="compress" rankdir="LR" + node [fontsize="9" fontname="Arial" color="#333333" fillcolor="lightblue" fixedsize="1" width="1"]; + edge [fontsize="9" fontname="Arial" color="#333333" arrowhead="normal" arrowsize="0.5"]; + + place_a [label="a", shape=circle, style="filled"]; + place_b [label="b", shape=circle]; + place_c [label="c", shape=circle, color="#FF0000", shape="doublecircle"]; + transition_t1 [label="t1", shape=box, shape="box", regular="1"]; + transition_t2 [label="t2", shape=box, shape="box", regular="1"]; + place_a -> transition_t1 [style="solid"]; + transition_t1 -> place_b [style="solid"]; + place_b -> transition_t2 [style="solid"]; + transition_t2 -> place_c [style="solid"]; +} +'; + } + + public function provideComplexWorkflowDumpWithoutMarking() + { + return 'digraph workflow { + ratio="compress" rankdir="LR" + node [fontsize="9" fontname="Arial" color="#333333" fillcolor="lightblue" fixedsize="1" width="1"]; + edge [fontsize="9" fontname="Arial" color="#333333" arrowhead="normal" arrowsize="0.5"]; + + place_a [label="a", shape=circle, style="filled"]; + place_b [label="b", shape=circle]; + place_c [label="c", shape=circle]; + place_d [label="d", shape=circle]; + place_e [label="e", shape=circle]; + place_f [label="f", shape=circle]; + place_g [label="g", shape=circle]; + transition_t1 [label="t1", shape=box, shape="box", regular="1"]; + transition_t2 [label="t2", shape=box, shape="box", regular="1"]; + transition_t3 [label="t3", shape=box, shape="box", regular="1"]; + transition_t4 [label="t4", shape=box, shape="box", regular="1"]; + transition_t5 [label="t5", shape=box, shape="box", regular="1"]; + transition_t6 [label="t6", shape=box, shape="box", regular="1"]; + place_a -> transition_t1 [style="solid"]; + transition_t1 -> place_b [style="solid"]; + transition_t1 -> place_c [style="solid"]; + place_b -> transition_t2 [style="solid"]; + place_c -> transition_t2 [style="solid"]; + transition_t2 -> place_d [style="solid"]; + place_d -> transition_t3 [style="solid"]; + transition_t3 -> place_e [style="solid"]; + place_d -> transition_t4 [style="solid"]; + transition_t4 -> place_f [style="solid"]; + place_e -> transition_t5 [style="solid"]; + transition_t5 -> place_g [style="solid"]; + place_f -> transition_t6 [style="solid"]; + transition_t6 -> place_g [style="solid"]; +} +'; + } + + public function provideSimpleWorkflowDumpWithoutMarking() + { + return 'digraph workflow { + ratio="compress" rankdir="LR" + node [fontsize="9" fontname="Arial" color="#333333" fillcolor="lightblue" fixedsize="1" width="1"]; + edge [fontsize="9" fontname="Arial" color="#333333" arrowhead="normal" arrowsize="0.5"]; + + place_a [label="a", shape=circle, style="filled"]; + place_b [label="b", shape=circle]; + place_c [label="c", shape=circle]; + transition_t1 [label="t1", shape=box, shape="box", regular="1"]; + transition_t2 [label="t2", shape=box, shape="box", regular="1"]; + place_a -> transition_t1 [style="solid"]; + transition_t1 -> place_b [style="solid"]; + place_b -> transition_t2 [style="solid"]; + transition_t2 -> place_c [style="solid"]; +} +'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/StateMachineGraphvizDumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/StateMachineGraphvizDumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7277b1c65b838500f4709e0da0166f2599f006cb --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Dumper/StateMachineGraphvizDumperTest.php @@ -0,0 +1,75 @@ +dumper = new StateMachineGraphvizDumper(); + } + + public function testDumpWithoutMarking() + { + $definition = $this->createComplexStateMachineDefinition(); + + $dump = $this->dumper->dump($definition); + + $expected = <<<'EOGRAPH' +digraph workflow { + ratio="compress" rankdir="LR" + node [fontsize="9" fontname="Arial" color="#333333" fillcolor="lightblue" fixedsize="1" width="1"]; + edge [fontsize="9" fontname="Arial" color="#333333" arrowhead="normal" arrowsize="0.5"]; + + place_a [label="a", shape=circle, style="filled"]; + place_b [label="b", shape=circle]; + place_c [label="c", shape=circle]; + place_d [label="d", shape=circle]; + place_a -> place_b [label="t1" style="solid"]; + place_d -> place_b [label="t1" style="solid"]; + place_b -> place_c [label="t2" style="solid"]; + place_b -> place_d [label="t3" style="solid"]; +} + +EOGRAPH; + + $this->assertEquals($expected, $dump); + } + + public function testDumpWithMarking() + { + $definition = $this->createComplexStateMachineDefinition(); + $marking = new Marking(array('b' => 1)); + + $expected = <<<'EOGRAPH' +digraph workflow { + ratio="compress" rankdir="LR" + node [fontsize="9" fontname="Arial" color="#333333" fillcolor="lightblue" fixedsize="1" width="1"]; + edge [fontsize="9" fontname="Arial" color="#333333" arrowhead="normal" arrowsize="0.5"]; + + place_a [label="a", shape=circle, style="filled"]; + place_b [label="b", shape=circle, color="#FF0000", shape="doublecircle"]; + place_c [label="c", shape=circle]; + place_d [label="d", shape=circle]; + place_a -> place_b [label="t1" style="solid"]; + place_d -> place_b [label="t1" style="solid"]; + place_b -> place_c [label="t2" style="solid"]; + place_b -> place_d [label="t3" style="solid"]; +} + +EOGRAPH; + + $dump = $this->dumper->dump($definition, $marking); + + $this->assertEquals($expected, $dump); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/EventListener/AuditTrailListenerTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/EventListener/AuditTrailListenerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f953e9a53e1eb7fe39f5c14827fcc4af8ddcfde6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/EventListener/AuditTrailListenerTest.php @@ -0,0 +1,53 @@ +createSimpleWorkflowDefinition(); + + $object = new \stdClass(); + $object->marking = null; + + $logger = new Logger(); + + $ed = new EventDispatcher(); + $ed->addSubscriber(new AuditTrailListener($logger)); + + $workflow = new Workflow($definition, new MultipleStateMarkingStore(), $ed); + + $workflow->apply($object, 't1'); + + $expected = array( + 'Leaving "a" for subject of class "stdClass".', + 'Transition "t1" for subject of class "stdClass".', + 'Entering "b" for subject of class "stdClass".', + ); + + $this->assertSame($expected, $logger->logs); + } +} + +class Logger extends AbstractLogger +{ + public $logs = array(); + + public function log($level, $message, array $context = array()) + { + $this->logs[] = $message; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingStore/MultipleStateMarkingStoreTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingStore/MultipleStateMarkingStoreTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a0504af4b271677a905d2b0f982a41b5f420563d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingStore/MultipleStateMarkingStoreTest.php @@ -0,0 +1,33 @@ +myMarks = null; + + $markingStore = new MultipleStateMarkingStore('myMarks'); + + $marking = $markingStore->getMarking($subject); + + $this->assertInstanceOf(Marking::class, $marking); + $this->assertCount(0, $marking->getPlaces()); + + $marking->mark('first_place'); + + $markingStore->setMarking($subject, $marking); + + $this->assertSame(array('first_place' => 1), $subject->myMarks); + + $marking2 = $markingStore->getMarking($subject); + + $this->assertEquals($marking, $marking2); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingStore/SingleStateMarkingStoreTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingStore/SingleStateMarkingStoreTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2e00714d2762a2d96529f11807ab4481729bc4d1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingStore/SingleStateMarkingStoreTest.php @@ -0,0 +1,33 @@ +myMarks = null; + + $markingStore = new SingleStateMarkingStore('myMarks'); + + $marking = $markingStore->getMarking($subject); + + $this->assertInstanceOf(Marking::class, $marking); + $this->assertCount(0, $marking->getPlaces()); + + $marking->mark('first_place'); + + $markingStore->setMarking($subject, $marking); + + $this->assertSame('first_place', $subject->myMarks); + + $marking2 = $markingStore->getMarking($subject); + + $this->assertEquals($marking, $marking2); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingTest.php new file mode 100644 index 0000000000000000000000000000000000000000..98f031e94b966d513c5ddaef3e0ff46d5c0e870e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/MarkingTest.php @@ -0,0 +1,36 @@ + 1)); + + $this->assertTrue($marking->has('a')); + $this->assertFalse($marking->has('b')); + $this->assertSame(array('a' => 1), $marking->getPlaces()); + + $marking->mark('b'); + + $this->assertTrue($marking->has('a')); + $this->assertTrue($marking->has('b')); + $this->assertSame(array('a' => 1, 'b' => 1), $marking->getPlaces()); + + $marking->unmark('a'); + + $this->assertFalse($marking->has('a')); + $this->assertTrue($marking->has('b')); + $this->assertSame(array('b' => 1), $marking->getPlaces()); + + $marking->unmark('b'); + + $this->assertFalse($marking->has('a')); + $this->assertFalse($marking->has('b')); + $this->assertSame(array(), $marking->getPlaces()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/RegistryTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/RegistryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d3675ac2e04870af2e6f8e19d02bdf97be244466 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/RegistryTest.php @@ -0,0 +1,75 @@ +registry = new Registry(); + + $this->registry->add(new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow1'), Subject1::class); + $this->registry->add(new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow2'), Subject2::class); + $this->registry->add(new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow3'), Subject2::class); + } + + protected function tearDown() + { + $this->registry = null; + } + + public function testGetWithSuccess() + { + $workflow = $this->registry->get(new Subject1()); + $this->assertInstanceOf(Workflow::class, $workflow); + $this->assertSame('workflow1', $workflow->getName()); + + $workflow = $this->registry->get(new Subject1(), 'workflow1'); + $this->assertInstanceOf(Workflow::class, $workflow); + $this->assertSame('workflow1', $workflow->getName()); + + $workflow = $this->registry->get(new Subject2(), 'workflow2'); + $this->assertInstanceOf(Workflow::class, $workflow); + $this->assertSame('workflow2', $workflow->getName()); + } + + /** + * @expectedException \Symfony\Component\Workflow\Exception\InvalidArgumentException + * @expectedExceptionMessage At least two workflows match this subject. Set a different name on each and use the second (name) argument of this method. + */ + public function testGetWithMultipleMatch() + { + $w1 = $this->registry->get(new Subject2()); + $this->assertInstanceOf(Workflow::class, $w1); + $this->assertSame('workflow1', $w1->getName()); + } + + /** + * @expectedException \Symfony\Component\Workflow\Exception\InvalidArgumentException + * @expectedExceptionMessage Unable to find a workflow for class "stdClass". + */ + public function testGetWithNoMatch() + { + $w1 = $this->registry->get(new \stdClass()); + $this->assertInstanceOf(Workflow::class, $w1); + $this->assertSame('workflow1', $w1->getName()); + } +} + +class Subject1 +{ +} +class Subject2 +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/StateMachineTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/StateMachineTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5ece3c36d0566c859b34be513f74e8fa87fd76ad --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/StateMachineTest.php @@ -0,0 +1,41 @@ +createComplexStateMachineDefinition(); + + $net = new StateMachine($definition); + $subject = new \stdClass(); + + // If you are in place "a" you should be able to apply "t1" + $subject->marking = 'a'; + $this->assertTrue($net->can($subject, 't1')); + $subject->marking = 'd'; + $this->assertTrue($net->can($subject, 't1')); + + $subject->marking = 'b'; + $this->assertFalse($net->can($subject, 't1')); + } + + public function testCanWithMultipleTransition() + { + $definition = $this->createComplexStateMachineDefinition(); + + $net = new StateMachine($definition); + $subject = new \stdClass(); + + // If you are in place "b" you should be able to apply "t1" and "t2" + $subject->marking = 'b'; + $this->assertTrue($net->can($subject, 't2')); + $this->assertTrue($net->can($subject, 't3')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/TransitionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/TransitionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..74bab16f71166b1f66a3302ff9774ec93751a3cd --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/TransitionTest.php @@ -0,0 +1,27 @@ +assertSame('name', $transition->getName()); + $this->assertSame(array('a'), $transition->getFroms()); + $this->assertSame(array('b'), $transition->getTos()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..149d7d58f8e30ef7c9758ee7ec623343faecb17c --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php @@ -0,0 +1,109 @@ +validate($definition, 'foo'); + + // The graph looks like: + // + // +----+ +----+ +---+ + // | a | --> | t1 | --> | b | + // +----+ +----+ +---+ + // | + // | + // v + // +----+ +----+ + // | t1 | --> | c | + // +----+ +----+ + } + + /** + * @expectedException \Symfony\Component\Workflow\Exception\InvalidDefinitionException + * @expectedExceptionMessage A transition in StateMachine can only have one output. + */ + public function testWithMultipleTos() + { + $places = array('a', 'b', 'c'); + $transitions[] = new Transition('t1', 'a', array('b', 'c')); + $definition = new Definition($places, $transitions); + + (new StateMachineValidator())->validate($definition, 'foo'); + + // The graph looks like: + // + // +---+ +----+ +---+ + // | a | --> | t1 | --> | b | + // +---+ +----+ +---+ + // | + // | + // v + // +----+ + // | c | + // +----+ + } + + /** + * @expectedException \Symfony\Component\Workflow\Exception\InvalidDefinitionException + * @expectedExceptionMessage A transition in StateMachine can only have one input. + */ + public function testWithMultipleFroms() + { + $places = array('a', 'b', 'c'); + $transitions[] = new Transition('t1', array('a', 'b'), 'c'); + $definition = new Definition($places, $transitions); + + (new StateMachineValidator())->validate($definition, 'foo'); + + // The graph looks like: + // + // +---+ +----+ +---+ + // | a | --> | t1 | --> | c | + // +---+ +----+ +---+ + // ^ + // | + // | + // +----+ + // | b | + // +----+ + } + + public function testValid() + { + $places = array('a', 'b', 'c'); + $transitions[] = new Transition('t1', 'a', 'b'); + $transitions[] = new Transition('t2', 'a', 'c'); + $definition = new Definition($places, $transitions); + + (new StateMachineValidator())->validate($definition, 'foo'); + + // The graph looks like: + // + // +----+ +----+ +---+ + // | a | --> | t1 | --> | b | + // +----+ +----+ +---+ + // | + // | + // v + // +----+ +----+ + // | t2 | --> | c | + // +----+ +----+ + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..60b2c7150e4897e2471b54f41aa4599e26a0830f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php @@ -0,0 +1,64 @@ +createComplexWorkflowDefinition(); + + (new WorkflowValidator(true))->validate($definition, 'foo'); + } + + public function testSinglePlaceWorkflowValidatorAndSimpleWorkflow() + { + $definition = $this->createSimpleWorkflowDefinition(); + + (new WorkflowValidator(true))->validate($definition, 'foo'); + } + + /** + * @expectedException \Symfony\Component\Workflow\Exception\InvalidDefinitionException + * @expectedExceptionMessage All transitions for a place must have an unique name. Multiple transitions named "t1" where found for place "a" in workflow "foo". + */ + public function testWorkflowWithInvalidNames() + { + $places = range('a', 'c'); + + $transitions = array(); + $transitions[] = new Transition('t0', 'c', 'b'); + $transitions[] = new Transition('t1', 'a', 'b'); + $transitions[] = new Transition('t1', 'a', 'c'); + + $definition = new Definition($places, $transitions); + + (new WorkflowValidator())->validate($definition, 'foo'); + } + + public function testSameTransitionNameButNotSamePlace() + { + $places = range('a', 'd'); + + $transitions = array(); + $transitions[] = new Transition('t1', 'a', 'b'); + $transitions[] = new Transition('t1', 'b', 'c'); + $transitions[] = new Transition('t1', 'd', 'c'); + + $definition = new Definition($places, $transitions); + + (new WorkflowValidator())->validate($definition, 'foo'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowBuilderTrait.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowBuilderTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..3084be5749b7fb3459de25d9a0d638e52b8fa7f2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowBuilderTrait.php @@ -0,0 +1,107 @@ + | t1 | --> | c | --> | t2 | --> | d | --> | t4 | --> | f | --> | t6 | --> | g | + // +---+ +----+ +---+ +----+ +----+ +----+ +----+ +----+ +---+ + // | ^ | ^ + // | | | | + // v | v | + // +----+ | +----+ +----+ +----+ | + // | b | ----------------+ | t3 | --> | e | --> | t5 | -----------------+ + // +----+ +----+ +----+ +----+ + } + + private function createSimpleWorkflowDefinition() + { + $places = range('a', 'c'); + + $transitions = array(); + $transitions[] = new Transition('t1', 'a', 'b'); + $transitions[] = new Transition('t2', 'b', 'c'); + + return new Definition($places, $transitions); + + // The graph looks like: + // +---+ +----+ +---+ +----+ +---+ + // | a | --> | t1 | --> | b | --> | t2 | --> | c | + // +---+ +----+ +---+ +----+ +---+ + } + + private function createWorkflowWithSameNameTransition() + { + $places = range('a', 'c'); + + $transitions = array(); + $transitions[] = new Transition('a_to_bc', 'a', array('b', 'c')); + $transitions[] = new Transition('b_to_c', 'b', 'c'); + $transitions[] = new Transition('to_a', 'b', 'a'); + $transitions[] = new Transition('to_a', 'c', 'a'); + + return new Definition($places, $transitions); + + // The graph looks like: + // +------------------------------------------------------------+ + // | | + // | | + // | +----------------------------------------+ | + // v | v | + // +---+ +---------+ +---+ +--------+ +---+ +------+ + // | a | --> | a_to_bc | --> | b | --> | b_to_c | --> | c | --> | to_a | -+ + // +---+ +---------+ +---+ +--------+ +---+ +------+ | + // ^ | ^ | + // | +----------------------------------+ | + // | | + // | | + // +--------------------------------------------------------------------+ + } + + private function createComplexStateMachineDefinition() + { + $places = array('a', 'b', 'c', 'd'); + + $transitions[] = new Transition('t1', 'a', 'b'); + $transitions[] = new Transition('t1', 'd', 'b'); + $transitions[] = new Transition('t2', 'b', 'c'); + $transitions[] = new Transition('t3', 'b', 'd'); + + $definition = new Definition($places, $transitions); + + return $definition; + + // The graph looks like: + // t1 + // +------------------+ + // v | + // +---+ t1 +-----+ t2 +---+ | + // | a | ----> | b | ----> | c | | + // +---+ +-----+ +---+ | + // | | + // | t3 | + // v | + // +-----+ | + // | d | -------------+ + // +-----+ + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowTest.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ab8c767b59c17a0f3e518f20707732958ef20d80 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Tests/WorkflowTest.php @@ -0,0 +1,372 @@ +marking = null; + $workflow = new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock()); + + $workflow->getMarking($subject); + } + + /** + * @expectedException \Symfony\Component\Workflow\Exception\LogicException + * @expectedExceptionMessage The Marking is empty and there is no initial place for workflow "unnamed". + */ + public function testGetMarkingWithEmptyDefinition() + { + $subject = new \stdClass(); + $subject->marking = null; + $workflow = new Workflow(new Definition(array(), array()), new MultipleStateMarkingStore()); + + $workflow->getMarking($subject); + } + + /** + * @expectedException \Symfony\Component\Workflow\Exception\LogicException + * @expectedExceptionMessage Place "nope" is not valid for workflow "unnamed". + */ + public function testGetMarkingWithImpossiblePlace() + { + $subject = new \stdClass(); + $subject->marking = array('nope' => 1); + $workflow = new Workflow(new Definition(array(), array()), new MultipleStateMarkingStore()); + + $workflow->getMarking($subject); + } + + public function testGetMarkingWithEmptyInitialMarking() + { + $definition = $this->createComplexWorkflowDefinition(); + $subject = new \stdClass(); + $subject->marking = null; + $workflow = new Workflow($definition, new MultipleStateMarkingStore()); + + $marking = $workflow->getMarking($subject); + + $this->assertInstanceOf(Marking::class, $marking); + $this->assertTrue($marking->has('a')); + $this->assertSame(array('a' => 1), $subject->marking); + } + + public function testGetMarkingWithExistingMarking() + { + $definition = $this->createComplexWorkflowDefinition(); + $subject = new \stdClass(); + $subject->marking = null; + $subject->marking = array('b' => 1, 'c' => 1); + $workflow = new Workflow($definition, new MultipleStateMarkingStore()); + + $marking = $workflow->getMarking($subject); + + $this->assertInstanceOf(Marking::class, $marking); + $this->assertTrue($marking->has('b')); + $this->assertTrue($marking->has('c')); + } + + public function testCanWithUnexistingTransition() + { + $definition = $this->createComplexWorkflowDefinition(); + $subject = new \stdClass(); + $subject->marking = null; + $workflow = new Workflow($definition, new MultipleStateMarkingStore()); + + $this->assertFalse($workflow->can($subject, 'foobar')); + } + + public function testCan() + { + $definition = $this->createComplexWorkflowDefinition(); + $subject = new \stdClass(); + $subject->marking = null; + $workflow = new Workflow($definition, new MultipleStateMarkingStore()); + + $this->assertTrue($workflow->can($subject, 't1')); + $this->assertFalse($workflow->can($subject, 't2')); + } + + public function testCanWithGuard() + { + $definition = $this->createComplexWorkflowDefinition(); + $subject = new \stdClass(); + $subject->marking = null; + $eventDispatcher = new EventDispatcher(); + $eventDispatcher->addListener('workflow.workflow_name.guard.t1', function (GuardEvent $event) { + $event->setBlocked(true); + }); + $workflow = new Workflow($definition, new MultipleStateMarkingStore(), $eventDispatcher, 'workflow_name'); + + $this->assertFalse($workflow->can($subject, 't1')); + } + + /** + * @expectedException \Symfony\Component\Workflow\Exception\LogicException + * @expectedExceptionMessage Unable to apply transition "t2" for workflow "unnamed". + */ + public function testApplyWithImpossibleTransition() + { + $definition = $this->createComplexWorkflowDefinition(); + $subject = new \stdClass(); + $subject->marking = null; + $workflow = new Workflow($definition, new MultipleStateMarkingStore()); + + $workflow->apply($subject, 't2'); + } + + public function testCanWithSameNameTransition() + { + $definition = $this->createWorkflowWithSameNameTransition(); + $workflow = new Workflow($definition, new MultipleStateMarkingStore()); + + $subject = new \stdClass(); + $subject->marking = null; + $this->assertTrue($workflow->can($subject, 'a_to_bc')); + $this->assertFalse($workflow->can($subject, 'b_to_c')); + $this->assertFalse($workflow->can($subject, 'to_a')); + + $subject->marking = array('b' => 1); + $this->assertFalse($workflow->can($subject, 'a_to_bc')); + $this->assertTrue($workflow->can($subject, 'b_to_c')); + $this->assertTrue($workflow->can($subject, 'to_a')); + } + + public function testApply() + { + $definition = $this->createComplexWorkflowDefinition(); + $subject = new \stdClass(); + $subject->marking = null; + $workflow = new Workflow($definition, new MultipleStateMarkingStore()); + + $marking = $workflow->apply($subject, 't1'); + + $this->assertInstanceOf(Marking::class, $marking); + $this->assertFalse($marking->has('a')); + $this->assertTrue($marking->has('b')); + $this->assertTrue($marking->has('c')); + } + + public function testApplyWithSameNameTransition() + { + $subject = new \stdClass(); + $subject->marking = null; + $definition = $this->createWorkflowWithSameNameTransition(); + $workflow = new Workflow($definition, new MultipleStateMarkingStore()); + + $marking = $workflow->apply($subject, 'a_to_bc'); + + $this->assertFalse($marking->has('a')); + $this->assertTrue($marking->has('b')); + $this->assertTrue($marking->has('c')); + + $marking = $workflow->apply($subject, 'to_a'); + + $this->assertTrue($marking->has('a')); + $this->assertFalse($marking->has('b')); + $this->assertFalse($marking->has('c')); + + $marking = $workflow->apply($subject, 'a_to_bc'); + $marking = $workflow->apply($subject, 'b_to_c'); + + $this->assertFalse($marking->has('a')); + $this->assertFalse($marking->has('b')); + $this->assertTrue($marking->has('c')); + + $marking = $workflow->apply($subject, 'to_a'); + + $this->assertTrue($marking->has('a')); + $this->assertFalse($marking->has('b')); + $this->assertFalse($marking->has('c')); + } + + public function testApplyWithSameNameTransition2() + { + $subject = new \stdClass(); + $subject->marking = array('a' => 1, 'b' => 1); + + $places = range('a', 'd'); + $transitions = array(); + $transitions[] = new Transition('t', 'a', 'c'); + $transitions[] = new Transition('t', 'b', 'd'); + $definition = new Definition($places, $transitions); + $workflow = new Workflow($definition, new MultipleStateMarkingStore()); + + $marking = $workflow->apply($subject, 't'); + + $this->assertFalse($marking->has('a')); + $this->assertFalse($marking->has('b')); + $this->assertTrue($marking->has('c')); + $this->assertTrue($marking->has('d')); + } + + public function testApplyWithEventDispatcher() + { + $definition = $this->createComplexWorkflowDefinition(); + $subject = new \stdClass(); + $subject->marking = null; + $eventDispatcher = new EventDispatcherMock(); + $workflow = new Workflow($definition, new MultipleStateMarkingStore(), $eventDispatcher, 'workflow_name'); + + $eventNameExpected = array( + 'workflow.guard', + 'workflow.workflow_name.guard', + 'workflow.workflow_name.guard.t1', + 'workflow.leave', + 'workflow.workflow_name.leave', + 'workflow.workflow_name.leave.a', + 'workflow.transition', + 'workflow.workflow_name.transition', + 'workflow.workflow_name.transition.t1', + 'workflow.enter', + 'workflow.workflow_name.enter', + 'workflow.workflow_name.enter.b', + 'workflow.workflow_name.enter.c', + // Following events are fired because of announce() method + 'workflow.guard', + 'workflow.workflow_name.guard', + 'workflow.workflow_name.guard.t2', + 'workflow.workflow_name.announce.t2', + ); + + $marking = $workflow->apply($subject, 't1'); + + $this->assertSame($eventNameExpected, $eventDispatcher->dispatchedEvents); + } + + public function testMarkingStateOnApplyWithEventDispatcher() + { + $definition = new Definition(range('a', 'f'), array(new Transition('t', range('a', 'c'), range('d', 'f')))); + + $subject = new \stdClass(); + $subject->marking = array('a' => 1, 'b' => 1, 'c' => 1); + + $dispatcher = new EventDispatcher(); + + $workflow = new Workflow($definition, new MultipleStateMarkingStore(), $dispatcher, 'test'); + + $assertInitialState = function (Event $event) { + $this->assertEquals(new Marking(array('a' => 1, 'b' => 1, 'c' => 1)), $event->getMarking()); + }; + $assertTransitionState = function (Event $event) { + $this->assertEquals(new Marking(array()), $event->getMarking()); + }; + + $dispatcher->addListener('workflow.leave', $assertInitialState); + $dispatcher->addListener('workflow.test.leave', $assertInitialState); + $dispatcher->addListener('workflow.test.leave.a', $assertInitialState); + $dispatcher->addListener('workflow.test.leave.b', $assertInitialState); + $dispatcher->addListener('workflow.test.leave.c', $assertInitialState); + $dispatcher->addListener('workflow.transition', $assertTransitionState); + $dispatcher->addListener('workflow.test.transition', $assertTransitionState); + $dispatcher->addListener('workflow.test.transition.t', $assertTransitionState); + $dispatcher->addListener('workflow.enter', $assertTransitionState); + $dispatcher->addListener('workflow.test.enter', $assertTransitionState); + $dispatcher->addListener('workflow.test.enter.d', $assertTransitionState); + $dispatcher->addListener('workflow.test.enter.e', $assertTransitionState); + $dispatcher->addListener('workflow.test.enter.f', $assertTransitionState); + + $workflow->apply($subject, 't'); + } + + public function testGetEnabledTransitions() + { + $definition = $this->createComplexWorkflowDefinition(); + $subject = new \stdClass(); + $subject->marking = null; + $eventDispatcher = new EventDispatcher(); + $eventDispatcher->addListener('workflow.workflow_name.guard.t1', function (GuardEvent $event) { + $event->setBlocked(true); + }); + $workflow = new Workflow($definition, new MultipleStateMarkingStore(), $eventDispatcher, 'workflow_name'); + + $this->assertEmpty($workflow->getEnabledTransitions($subject)); + + $subject->marking = array('d' => 1); + $transitions = $workflow->getEnabledTransitions($subject); + $this->assertCount(2, $transitions); + $this->assertSame('t3', $transitions[0]->getName()); + $this->assertSame('t4', $transitions[1]->getName()); + + $subject->marking = array('c' => 1, 'e' => 1); + $transitions = $workflow->getEnabledTransitions($subject); + $this->assertCount(1, $transitions); + $this->assertSame('t5', $transitions[0]->getName()); + } + + public function testGetEnabledTransitionsWithSameNameTransition() + { + $definition = $this->createWorkflowWithSameNameTransition(); + $subject = new \stdClass(); + $subject->marking = null; + $workflow = new Workflow($definition, new MultipleStateMarkingStore()); + + $transitions = $workflow->getEnabledTransitions($subject); + $this->assertCount(1, $transitions); + $this->assertSame('a_to_bc', $transitions[0]->getName()); + + $subject->marking = array('b' => 1, 'c' => 1); + $transitions = $workflow->getEnabledTransitions($subject); + $this->assertCount(3, $transitions); + $this->assertSame('b_to_c', $transitions[0]->getName()); + $this->assertSame('to_a', $transitions[1]->getName()); + $this->assertSame('to_a', $transitions[2]->getName()); + } +} + +class EventDispatcherMock implements \Symfony\Component\EventDispatcher\EventDispatcherInterface +{ + public $dispatchedEvents = array(); + + public function dispatch($eventName, \Symfony\Component\EventDispatcher\Event $event = null) + { + $this->dispatchedEvents[] = $eventName; + } + + public function addListener($eventName, $listener, $priority = 0) + { + } + + public function addSubscriber(\Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber) + { + } + + public function removeListener($eventName, $listener) + { + } + + public function removeSubscriber(\Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber) + { + } + + public function getListeners($eventName = null) + { + } + + public function getListenerPriority($eventName, $listener) + { + } + + public function hasListeners($eventName = null) + { + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Transition.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Transition.php new file mode 100644 index 0000000000000000000000000000000000000000..fb4786c88a2678933139154cdec8dbb107e195b2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Transition.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow; + +use Symfony\Component\Workflow\Exception\InvalidArgumentException; + +/** + * @author Fabien Potencier + * @author Grégoire Pineau + */ +class Transition +{ + private $name; + private $froms; + private $tos; + + /** + * @param string $name + * @param string|string[] $froms + * @param string|string[] $tos + */ + public function __construct($name, $froms, $tos) + { + if (!preg_match('{^[\w\d_-]+$}', $name)) { + throw new InvalidArgumentException(sprintf('The transition "%s" contains invalid characters.', $name)); + } + + $this->name = $name; + $this->froms = (array) $froms; + $this->tos = (array) $tos; + } + + public function getName() + { + return $this->name; + } + + public function getFroms() + { + return $this->froms; + } + + public function getTos() + { + return $this->tos; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/DefinitionValidatorInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/DefinitionValidatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..244dceae9a9daa25b52a228065541dda9fef2e6a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/DefinitionValidatorInterface.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\Component\Workflow\Validator; + +use Symfony\Component\Workflow\Definition; +use Symfony\Component\Workflow\Exception\InvalidDefinitionException; + +/** + * @author Tobias Nyholm + */ +interface DefinitionValidatorInterface +{ + /** + * @param Definition $definition + * @param string $name + * + * @throws InvalidDefinitionException on invalid definition + */ + public function validate(Definition $definition, $name); +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/StateMachineValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/StateMachineValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..16948f6769b6e2f91082c650eb3dad711e05a11e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/StateMachineValidator.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow\Validator; + +use Symfony\Component\Workflow\Definition; +use Symfony\Component\Workflow\Exception\InvalidDefinitionException; + +/** + * @author Tobias Nyholm + */ +class StateMachineValidator implements DefinitionValidatorInterface +{ + public function validate(Definition $definition, $name) + { + $transitionFromNames = array(); + foreach ($definition->getTransitions() as $transition) { + // Make sure that each transition has exactly one TO + if (1 !== count($transition->getTos())) { + throw new InvalidDefinitionException(sprintf('A transition in StateMachine can only have one output. But the transition "%s" in StateMachine "%s" has %d outputs.', $transition->getName(), $name, count($transition->getTos()))); + } + + // Make sure that each transition has exactly one FROM + $froms = $transition->getFroms(); + if (1 !== count($froms)) { + throw new InvalidDefinitionException(sprintf('A transition in StateMachine can only have one input. But the transition "%s" in StateMachine "%s" has %d inputs.', $transition->getName(), $name, count($transition->getTos()))); + } + + // Enforcing uniqueness of the names of transitions starting at each node + $from = reset($froms); + if (isset($transitionFromNames[$from][$transition->getName()])) { + throw new InvalidDefinitionException(sprintf('A transition from a place/state must have an unique name. Multiple transitions named "%s" from place/state "%s" where found on StateMachine "%s". ', $transition->getName(), $from, $name)); + } + + $transitionFromNames[$from][$transition->getName()] = true; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/WorkflowValidator.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/WorkflowValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..27bd06f0d651bd7d0c1419d1044c04d3046b35b3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Validator/WorkflowValidator.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow\Validator; + +use Symfony\Component\Workflow\Definition; +use Symfony\Component\Workflow\Exception\InvalidDefinitionException; + +/** + * @author Tobias Nyholm + */ +class WorkflowValidator implements DefinitionValidatorInterface +{ + private $singlePlace; + + /** + * @param bool $singlePlace + */ + public function __construct($singlePlace = false) + { + $this->singlePlace = $singlePlace; + } + + public function validate(Definition $definition, $name) + { + // Make sure all transitions for one place has unique name. + $places = array_fill_keys($definition->getPlaces(), array()); + foreach ($definition->getTransitions() as $transition) { + foreach ($transition->getFroms() as $from) { + if (in_array($transition->getName(), $places[$from])) { + throw new InvalidDefinitionException(sprintf('All transitions for a place must have an unique name. Multiple transitions named "%s" where found for place "%s" in workflow "%s".', $transition->getName(), $from, $name)); + } + $places[$from][] = $transition->getName(); + } + } + + if (!$this->singlePlace) { + return; + } + + foreach ($definition->getTransitions() as $transition) { + if (1 < count($transition->getTos())) { + throw new InvalidDefinitionException(sprintf('The marking store of workflow "%s" can not store many places. But the transition "%s" has too many output (%d). Only one is accepted.', $name, $transition->getName(), count($transition->getTos()))); + } + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/Workflow.php b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Workflow.php new file mode 100644 index 0000000000000000000000000000000000000000..ec49895a3c604a48c13aca65c8660eae1e685d6f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/Workflow.php @@ -0,0 +1,289 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Workflow; + +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Workflow\Event\Event; +use Symfony\Component\Workflow\Event\GuardEvent; +use Symfony\Component\Workflow\Exception\LogicException; +use Symfony\Component\Workflow\MarkingStore\MarkingStoreInterface; +use Symfony\Component\Workflow\MarkingStore\MultipleStateMarkingStore; + +/** + * @author Fabien Potencier + * @author Grégoire Pineau + * @author Tobias Nyholm + */ +class Workflow +{ + private $definition; + private $markingStore; + private $dispatcher; + private $name; + + public function __construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, $name = 'unnamed') + { + $this->definition = $definition; + $this->markingStore = $markingStore ?: new MultipleStateMarkingStore(); + $this->dispatcher = $dispatcher; + $this->name = $name; + } + + /** + * Returns the object's Marking. + * + * @param object $subject A subject + * + * @return Marking The Marking + * + * @throws LogicException + */ + public function getMarking($subject) + { + $marking = $this->markingStore->getMarking($subject); + + if (!$marking instanceof Marking) { + throw new LogicException(sprintf('The value returned by the MarkingStore is not an instance of "%s" for workflow "%s".', Marking::class, $this->name)); + } + + // check if the subject is already in the workflow + if (!$marking->getPlaces()) { + if (!$this->definition->getInitialPlace()) { + throw new LogicException(sprintf('The Marking is empty and there is no initial place for workflow "%s".', $this->name)); + } + $marking->mark($this->definition->getInitialPlace()); + + // update the subject with the new marking + $this->markingStore->setMarking($subject, $marking); + } + + // check that the subject has a known place + $places = $this->definition->getPlaces(); + foreach ($marking->getPlaces() as $placeName => $nbToken) { + if (!isset($places[$placeName])) { + $message = sprintf('Place "%s" is not valid for workflow "%s".', $placeName, $this->name); + if (!$places) { + $message .= ' It seems you forgot to add places to the current workflow.'; + } + + throw new LogicException($message); + } + } + + return $marking; + } + + /** + * Returns true if the transition is enabled. + * + * @param object $subject A subject + * @param string $transitionName A transition + * + * @return bool true if the transition is enabled + */ + public function can($subject, $transitionName) + { + $transitions = $this->getEnabledTransitions($subject); + + foreach ($transitions as $transition) { + if ($transitionName === $transition->getName()) { + return true; + } + } + + return false; + } + + /** + * Fire a transition. + * + * @param object $subject A subject + * @param string $transitionName A transition + * + * @return Marking The new Marking + * + * @throws LogicException If the transition is not applicable + * @throws LogicException If the transition does not exist + */ + public function apply($subject, $transitionName) + { + $transitions = $this->getEnabledTransitions($subject); + + // We can shortcut the getMarking method in order to boost performance, + // since the "getEnabledTransitions" method already checks the Marking + // state + $marking = $this->markingStore->getMarking($subject); + + $applied = false; + + foreach ($transitions as $transition) { + if ($transitionName !== $transition->getName()) { + continue; + } + + $applied = true; + + $this->leave($subject, $transition, $marking); + + $this->transition($subject, $transition, $marking); + + $this->enter($subject, $transition, $marking); + + $this->markingStore->setMarking($subject, $marking); + + $this->announce($subject, $transition, $marking); + } + + if (!$applied) { + throw new LogicException(sprintf('Unable to apply transition "%s" for workflow "%s".', $transitionName, $this->name)); + } + + return $marking; + } + + /** + * Returns all enabled transitions. + * + * @param object $subject A subject + * + * @return Transition[] All enabled transitions + */ + public function getEnabledTransitions($subject) + { + $enabled = array(); + $marking = $this->getMarking($subject); + + foreach ($this->definition->getTransitions() as $transition) { + if ($this->doCan($subject, $marking, $transition)) { + $enabled[] = $transition; + } + } + + return $enabled; + } + + public function getName() + { + return $this->name; + } + + /** + * @return Definition + */ + public function getDefinition() + { + return $this->definition; + } + + private function doCan($subject, Marking $marking, Transition $transition) + { + foreach ($transition->getFroms() as $place) { + if (!$marking->has($place)) { + return false; + } + } + + if (true === $this->guardTransition($subject, $marking, $transition)) { + return false; + } + + return true; + } + + /** + * @param object $subject + * @param Marking $marking + * @param Transition $transition + * + * @return bool|void boolean true if this transition is guarded, ie you cannot use it + */ + private function guardTransition($subject, Marking $marking, Transition $transition) + { + if (null === $this->dispatcher) { + return; + } + + $event = new GuardEvent($subject, $marking, $transition); + + $this->dispatcher->dispatch('workflow.guard', $event); + $this->dispatcher->dispatch(sprintf('workflow.%s.guard', $this->name), $event); + $this->dispatcher->dispatch(sprintf('workflow.%s.guard.%s', $this->name, $transition->getName()), $event); + + return $event->isBlocked(); + } + + private function leave($subject, Transition $transition, Marking $marking) + { + $places = $transition->getFroms(); + + if (null !== $this->dispatcher) { + $event = new Event($subject, $marking, $transition); + + $this->dispatcher->dispatch('workflow.leave', $event); + $this->dispatcher->dispatch(sprintf('workflow.%s.leave', $this->name), $event); + + foreach ($places as $place) { + $this->dispatcher->dispatch(sprintf('workflow.%s.leave.%s', $this->name, $place), $event); + } + } + + foreach ($places as $place) { + $marking->unmark($place); + } + } + + private function transition($subject, Transition $transition, Marking $marking) + { + if (null === $this->dispatcher) { + return; + } + + $event = new Event($subject, $marking, $transition); + + $this->dispatcher->dispatch('workflow.transition', $event); + $this->dispatcher->dispatch(sprintf('workflow.%s.transition', $this->name), $event); + $this->dispatcher->dispatch(sprintf('workflow.%s.transition.%s', $this->name, $transition->getName()), $event); + } + + private function enter($subject, Transition $transition, Marking $marking) + { + $places = $transition->getTos(); + + if (null !== $this->dispatcher) { + $event = new Event($subject, $marking, $transition); + + $this->dispatcher->dispatch('workflow.enter', $event); + $this->dispatcher->dispatch(sprintf('workflow.%s.enter', $this->name), $event); + + foreach ($places as $place) { + $this->dispatcher->dispatch(sprintf('workflow.%s.enter.%s', $this->name, $place), $event); + } + } + + foreach ($places as $place) { + $marking->mark($place); + } + } + + private function announce($subject, Transition $initialTransition, Marking $marking) + { + if (null === $this->dispatcher) { + return; + } + + $event = new Event($subject, $marking, $initialTransition); + + foreach ($this->getEnabledTransitions($subject) as $transition) { + $this->dispatcher->dispatch(sprintf('workflow.%s.announce.%s', $this->name, $transition->getName()), $event); + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Workflow/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..b30d50091e1d67019dc8ee6e89b3efeb231b3a09 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/composer.json @@ -0,0 +1,39 @@ +{ + "name": "symfony/workflow", + "type": "library", + "description": "Symfony Workflow Component", + "keywords": ["workflow", "petrinet", "place", "transition"], + "homepage": "http://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Grégoire Pineau", + "email": "lyrixx@lyrixx.info" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/property-access": "~2.3|~3.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1|~3.0" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Workflow\\": "" } + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Workflow/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Workflow/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..5817db3b8fe26e2bda3a47ad96691af9248b07cc --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Workflow/phpunit.xml.dist @@ -0,0 +1,28 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Component/Yaml/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..45c331f9869628918249ccc0ab433ec13c69285a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/CHANGELOG.md @@ -0,0 +1,83 @@ +CHANGELOG +========= + +3.2.0 +----- + + * Mappings with a colon (`:`) that is not followed by a whitespace are deprecated + and will lead to a `ParseException` in Symfony 4.0 (e.g. `foo:bar` must be + `foo: bar`). + + * Added support for parsing PHP constants: + + ```php + Yaml::parse('!php/const:PHP_INT_MAX', Yaml::PARSE_CONSTANT); + ``` + + * Support for silently ignoring duplicate mapping keys in YAML has been + deprecated and will lead to a `ParseException` in Symfony 4.0. + +3.1.0 +----- + + * Strings that are not UTF-8 encoded will be dumped as base64 encoded binary + data. + + * Added support for dumping multi line strings as literal blocks. + + * Added support for parsing base64 encoded binary data when they are tagged + with the `!!binary` tag. + + * Added support for parsing timestamps as `\DateTime` objects: + + ```php + Yaml::parse('2001-12-15 21:59:43.10 -5', Yaml::PARSE_DATETIME); + ``` + + * `\DateTime` and `\DateTimeImmutable` objects are dumped as YAML timestamps. + + * Deprecated usage of `%` at the beginning of an unquoted string. + + * Added support for customizing the YAML parser behavior through an optional bit field: + + ```php + Yaml::parse('{ "foo": "bar", "fiz": "cat" }', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE | Yaml::PARSE_OBJECT | Yaml::PARSE_OBJECT_FOR_MAP); + ``` + + * Added support for customizing the dumped YAML string through an optional bit field: + + ```php + Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE | Yaml::DUMP_OBJECT); + ``` + +3.0.0 +----- + + * Yaml::parse() now throws an exception when a blackslash is not escaped + in double-quoted strings + +2.8.0 +----- + + * Deprecated usage of a colon in an unquoted mapping value + * Deprecated usage of @, \`, | and > at the beginning of an unquoted string + * When surrounding strings with double-quotes, you must now escape `\` characters. Not + escaping those characters (when surrounded by double-quotes) is deprecated. + + Before: + + ```yml + class: "Foo\Var" + ``` + + After: + + ```yml + class: "Foo\\Var" + ``` + +2.1.0 +----- + + * Yaml::parse() does not evaluate loaded files as PHP files by default + anymore (call Yaml::enablePhpParsing() to get back the old behavior) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Command/LintCommand.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Command/LintCommand.php new file mode 100644 index 0000000000000000000000000000000000000000..ea86a1f8c18c730b97ba05872738cf3658ace940 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Command/LintCommand.php @@ -0,0 +1,234 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Yaml\Exception\ParseException; +use Symfony\Component\Yaml\Parser; + +/** + * Validates YAML files syntax and outputs encountered errors. + * + * @author Grégoire Pineau + * @author Robin Chalas + */ +class LintCommand extends Command +{ + private $parser; + private $format; + private $displayCorrectFiles; + private $directoryIteratorProvider; + private $isReadableProvider; + + public function __construct($name = null, $directoryIteratorProvider = null, $isReadableProvider = null) + { + parent::__construct($name); + + $this->directoryIteratorProvider = $directoryIteratorProvider; + $this->isReadableProvider = $isReadableProvider; + } + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('lint:yaml') + ->setDescription('Lints a file and outputs encountered errors') + ->addArgument('filename', null, 'A file or a directory or STDIN') + ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt') + ->setHelp(<<%command.name% command lints a YAML file and outputs to STDOUT +the first encountered syntax error. + +You can validates YAML contents passed from STDIN: + + cat filename | php %command.full_name% + +You can also validate the syntax of a file: + + php %command.full_name% filename + +Or of a whole directory: + + php %command.full_name% dirname + php %command.full_name% dirname --format=json + +EOF + ) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new SymfonyStyle($input, $output); + $filename = $input->getArgument('filename'); + $this->format = $input->getOption('format'); + $this->displayCorrectFiles = $output->isVerbose(); + + if (!$filename) { + if (!$stdin = $this->getStdin()) { + throw new \RuntimeException('Please provide a filename or pipe file content to STDIN.'); + } + + return $this->display($io, array($this->validate($stdin))); + } + + if (!$this->isReadable($filename)) { + throw new \RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); + } + + $filesInfo = array(); + foreach ($this->getFiles($filename) as $file) { + $filesInfo[] = $this->validate(file_get_contents($file), $file); + } + + return $this->display($io, $filesInfo); + } + + private function validate($content, $file = null) + { + try { + $this->getParser()->parse($content); + } catch (ParseException $e) { + return array('file' => $file, 'valid' => false, 'message' => $e->getMessage()); + } + + return array('file' => $file, 'valid' => true); + } + + private function display(SymfonyStyle $io, array $files) + { + switch ($this->format) { + case 'txt': + return $this->displayTxt($io, $files); + case 'json': + return $this->displayJson($io, $files); + default: + throw new \InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format)); + } + } + + private function displayTxt(SymfonyStyle $io, array $filesInfo) + { + $countFiles = count($filesInfo); + $erroredFiles = 0; + + foreach ($filesInfo as $info) { + if ($info['valid'] && $this->displayCorrectFiles) { + $io->comment('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); + } elseif (!$info['valid']) { + ++$erroredFiles; + $io->text(' ERROR '.($info['file'] ? sprintf(' in %s', $info['file']) : '')); + $io->text(sprintf(' >> %s', $info['message'])); + } + } + + if ($erroredFiles === 0) { + $io->success(sprintf('All %d YAML files contain valid syntax.', $countFiles)); + } else { + $io->warning(sprintf('%d YAML files have valid syntax and %d contain errors.', $countFiles - $erroredFiles, $erroredFiles)); + } + + return min($erroredFiles, 1); + } + + private function displayJson(SymfonyStyle $io, array $filesInfo) + { + $errors = 0; + + array_walk($filesInfo, function (&$v) use (&$errors) { + $v['file'] = (string) $v['file']; + if (!$v['valid']) { + ++$errors; + } + }); + + $io->writeln(json_encode($filesInfo, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); + + return min($errors, 1); + } + + private function getFiles($fileOrDirectory) + { + if (is_file($fileOrDirectory)) { + yield new \SplFileInfo($fileOrDirectory); + + return; + } + + foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) { + if (!in_array($file->getExtension(), array('yml', 'yaml'))) { + continue; + } + + yield $file; + } + } + + private function getStdin() + { + if (0 !== ftell(STDIN)) { + return; + } + + $inputs = ''; + while (!feof(STDIN)) { + $inputs .= fread(STDIN, 1024); + } + + return $inputs; + } + + private function getParser() + { + if (!$this->parser) { + $this->parser = new Parser(); + } + + return $this->parser; + } + + private function getDirectoryIterator($directory) + { + $default = function ($directory) { + return new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), + \RecursiveIteratorIterator::LEAVES_ONLY + ); + }; + + if (null !== $this->directoryIteratorProvider) { + return call_user_func($this->directoryIteratorProvider, $directory, $default); + } + + return $default($directory); + } + + private function isReadable($fileOrDirectory) + { + $default = function ($fileOrDirectory) { + return is_readable($fileOrDirectory); + }; + + if (null !== $this->isReadableProvider) { + return call_user_func($this->isReadableProvider, $fileOrDirectory, $default); + } + + return $default($fileOrDirectory); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Dumper.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Dumper.php new file mode 100644 index 0000000000000000000000000000000000000000..98d82434c23882666e35bed6e613c2991d6cd582 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Dumper.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\Yaml; + +/** + * Dumper dumps PHP variables to YAML strings. + * + * @author Fabien Potencier + */ +class Dumper +{ + /** + * The amount of spaces to use for indentation of nested nodes. + * + * @var int + */ + protected $indentation; + + /** + * @param int $indentation + */ + public function __construct($indentation = 4) + { + if ($indentation < 1) { + throw new \InvalidArgumentException('The indentation must be greater than zero.'); + } + + $this->indentation = $indentation; + } + + /** + * Sets the indentation. + * + * @param int $num The amount of spaces to use for indentation of nested nodes + */ + public function setIndentation($num) + { + @trigger_error('The '.__METHOD__.' method is deprecated since version 3.1 and will be removed in 4.0. Pass the indentation to the constructor instead.', E_USER_DEPRECATED); + + $this->indentation = (int) $num; + } + + /** + * Dumps a PHP value to YAML. + * + * @param mixed $input The PHP value + * @param int $inline The level where you switch to inline YAML + * @param int $indent The level of indentation (used internally) + * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string + * + * @return string The YAML representation of the PHP value + */ + public function dump($input, $inline = 0, $indent = 0, $flags = 0) + { + if (is_bool($flags)) { + @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); + + if ($flags) { + $flags = Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE; + } else { + $flags = 0; + } + } + + if (func_num_args() >= 5) { + @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::DUMP_OBJECT flag instead.', E_USER_DEPRECATED); + + if (func_get_arg(4)) { + $flags |= Yaml::DUMP_OBJECT; + } + } + + $output = ''; + $prefix = $indent ? str_repeat(' ', $indent) : ''; + + if ($inline <= 0 || !is_array($input) || empty($input)) { + $output .= $prefix.Inline::dump($input, $flags); + } else { + $isAHash = Inline::isHash($input); + + foreach ($input as $key => $value) { + if ($inline >= 1 && Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && is_string($value) && false !== strpos($value, "\n")) { + $output .= sprintf("%s%s%s |\n", $prefix, $isAHash ? Inline::dump($key, $flags).':' : '-', ''); + + foreach (preg_split('/\n|\r\n/', $value) as $row) { + $output .= sprintf("%s%s%s\n", $prefix, str_repeat(' ', $this->indentation), $row); + } + + continue; + } + + $willBeInlined = $inline - 1 <= 0 || !is_array($value) || empty($value); + + $output .= sprintf('%s%s%s%s', + $prefix, + $isAHash ? Inline::dump($key, $flags).':' : '-', + $willBeInlined ? ' ' : "\n", + $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $flags) + ).($willBeInlined ? "\n" : ''); + } + } + + return $output; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Escaper.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Escaper.php new file mode 100644 index 0000000000000000000000000000000000000000..a74f14dd9c17ae44fe5890fd048c2b3ac183f3e7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Escaper.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\Component\Yaml; + +/** + * Escaper encapsulates escaping rules for single and double-quoted + * YAML strings. + * + * @author Matthew Lewinski + * + * @internal + */ +class Escaper +{ + // Characters that would cause a dumped string to require double quoting. + const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"; + + // Mapping arrays for escaping a double quoted string. The backslash is + // first to ensure proper escaping because str_replace operates iteratively + // on the input arrays. This ordering of the characters avoids the use of strtr, + // which performs more slowly. + private static $escapees = array('\\', '\\\\', '\\"', '"', + "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", + "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", + "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", + "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", + "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9"); + private static $escaped = array('\\\\', '\\"', '\\\\', '\\"', + '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a', + '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f', + '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17', + '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f', + '\\N', '\\_', '\\L', '\\P'); + + /** + * Determines if a PHP value would require double quoting in YAML. + * + * @param string $value A PHP value + * + * @return bool True if the value would require double quotes + */ + public static function requiresDoubleQuoting($value) + { + return preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value); + } + + /** + * Escapes and surrounds a PHP value with double quotes. + * + * @param string $value A PHP value + * + * @return string The quoted, escaped string + */ + public static function escapeWithDoubleQuotes($value) + { + return sprintf('"%s"', str_replace(self::$escapees, self::$escaped, $value)); + } + + /** + * Determines if a PHP value would require single quoting in YAML. + * + * @param string $value A PHP value + * + * @return bool True if the value would require single quotes + */ + public static function requiresSingleQuoting($value) + { + // Determines if a PHP value is entirely composed of a value that would + // require single quoting in YAML. + if (in_array(strtolower($value), array('null', '~', 'true', 'false', 'y', 'n', 'yes', 'no', 'on', 'off'))) { + return true; + } + + // Determines if the PHP value contains any single characters that would + // cause it to require single quoting in YAML. + return preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ \- ? | < > = ! % @ ` ]/x', $value); + } + + /** + * Escapes and surrounds a PHP value with single quotes. + * + * @param string $value A PHP value + * + * @return string The quoted, escaped string + */ + public static function escapeWithSingleQuotes($value) + { + return sprintf("'%s'", str_replace('\'', '\'\'', $value)); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Exception/DumpException.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Exception/DumpException.php new file mode 100644 index 0000000000000000000000000000000000000000..cce972f2468c93228fa3b7e24276eaf3ebd540b8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Exception/DumpException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Exception; + +/** + * Exception class thrown when an error occurs during dumping. + * + * @author Fabien Potencier + */ +class DumpException extends RuntimeException +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Exception/ExceptionInterface.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..ad850eea1d70fed08fb31077ab9da3274b6bece1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Exception; + +/** + * Exception interface for all exceptions thrown by the component. + * + * @author Fabien Potencier + */ +interface ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Exception/ParseException.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Exception/ParseException.php new file mode 100644 index 0000000000000000000000000000000000000000..ba3be7d4fa74352d40e954aa6579d34f9c7abbf6 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Exception/ParseException.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\Component\Yaml\Exception; + +/** + * Exception class thrown when an error occurs during parsing. + * + * @author Fabien Potencier + */ +class ParseException extends RuntimeException +{ + private $parsedFile; + private $parsedLine; + private $snippet; + private $rawMessage; + + /** + * Constructor. + * + * @param string $message The error message + * @param int $parsedLine The line where the error occurred + * @param int $snippet The snippet of code near the problem + * @param string $parsedFile The file name where the error occurred + * @param \Exception $previous The previous exception + */ + public function __construct($message, $parsedLine = -1, $snippet = null, $parsedFile = null, \Exception $previous = null) + { + $this->parsedFile = $parsedFile; + $this->parsedLine = $parsedLine; + $this->snippet = $snippet; + $this->rawMessage = $message; + + $this->updateRepr(); + + parent::__construct($this->message, 0, $previous); + } + + /** + * Gets the snippet of code near the error. + * + * @return string The snippet of code + */ + public function getSnippet() + { + return $this->snippet; + } + + /** + * Sets the snippet of code near the error. + * + * @param string $snippet The code snippet + */ + public function setSnippet($snippet) + { + $this->snippet = $snippet; + + $this->updateRepr(); + } + + /** + * Gets the filename where the error occurred. + * + * This method returns null if a string is parsed. + * + * @return string The filename + */ + public function getParsedFile() + { + return $this->parsedFile; + } + + /** + * Sets the filename where the error occurred. + * + * @param string $parsedFile The filename + */ + public function setParsedFile($parsedFile) + { + $this->parsedFile = $parsedFile; + + $this->updateRepr(); + } + + /** + * Gets the line where the error occurred. + * + * @return int The file line + */ + public function getParsedLine() + { + return $this->parsedLine; + } + + /** + * Sets the line where the error occurred. + * + * @param int $parsedLine The file line + */ + public function setParsedLine($parsedLine) + { + $this->parsedLine = $parsedLine; + + $this->updateRepr(); + } + + private function updateRepr() + { + $this->message = $this->rawMessage; + + $dot = false; + if ('.' === substr($this->message, -1)) { + $this->message = substr($this->message, 0, -1); + $dot = true; + } + + if (null !== $this->parsedFile) { + $this->message .= sprintf(' in %s', json_encode($this->parsedFile, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)); + } + + if ($this->parsedLine >= 0) { + $this->message .= sprintf(' at line %d', $this->parsedLine); + } + + if ($this->snippet) { + $this->message .= sprintf(' (near "%s")', $this->snippet); + } + + if ($dot) { + $this->message .= '.'; + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Exception/RuntimeException.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Exception/RuntimeException.php new file mode 100644 index 0000000000000000000000000000000000000000..3f36b73bec1355bd0607cb24bfbc914a7057af03 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Exception/RuntimeException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Exception; + +/** + * Exception class thrown when an error occurs during parsing. + * + * @author Romain Neutron + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php new file mode 100644 index 0000000000000000000000000000000000000000..2109f08bb370ca718aae54aa61b805a5567af5d9 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php @@ -0,0 +1,728 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml; + +use Symfony\Component\Yaml\Exception\ParseException; +use Symfony\Component\Yaml\Exception\DumpException; + +/** + * Inline implements a YAML parser/dumper for the YAML inline syntax. + * + * @author Fabien Potencier + * + * @internal + */ +class Inline +{ + const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'; + + public static $parsedLineNumber; + + private static $exceptionOnInvalidType = false; + private static $objectSupport = false; + private static $objectForMap = false; + private static $constantSupport = false; + + /** + * Converts a YAML string to a PHP value. + * + * @param string $value A YAML string + * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior + * @param array $references Mapping of variable names to values + * + * @return mixed A PHP value + * + * @throws ParseException + */ + public static function parse($value, $flags = 0, $references = array()) + { + if (is_bool($flags)) { + @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); + + if ($flags) { + $flags = Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE; + } else { + $flags = 0; + } + } + + if (func_num_args() >= 3 && !is_array($references)) { + @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT flag instead.', E_USER_DEPRECATED); + + if ($references) { + $flags |= Yaml::PARSE_OBJECT; + } + + if (func_num_args() >= 4) { + @trigger_error('Passing a boolean flag to toggle object for map support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT_FOR_MAP flag instead.', E_USER_DEPRECATED); + + if (func_get_arg(3)) { + $flags |= Yaml::PARSE_OBJECT_FOR_MAP; + } + } + + if (func_num_args() >= 5) { + $references = func_get_arg(4); + } else { + $references = array(); + } + } + + self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags); + self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags); + self::$objectForMap = (bool) (Yaml::PARSE_OBJECT_FOR_MAP & $flags); + self::$constantSupport = (bool) (Yaml::PARSE_CONSTANT & $flags); + + $value = trim($value); + + if ('' === $value) { + return ''; + } + + if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { + $mbEncoding = mb_internal_encoding(); + mb_internal_encoding('ASCII'); + } + + $i = 0; + switch ($value[0]) { + case '[': + $result = self::parseSequence($value, $flags, $i, $references); + ++$i; + break; + case '{': + $result = self::parseMapping($value, $flags, $i, $references); + ++$i; + break; + default: + $result = self::parseScalar($value, $flags, null, array('"', "'"), $i, true, $references); + } + + // some comments are allowed at the end + if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) { + throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i))); + } + + if (isset($mbEncoding)) { + mb_internal_encoding($mbEncoding); + } + + return $result; + } + + /** + * Dumps a given PHP variable to a YAML string. + * + * @param mixed $value The PHP variable to convert + * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string + * + * @return string The YAML string representing the PHP value + * + * @throws DumpException When trying to dump PHP resource + */ + public static function dump($value, $flags = 0) + { + if (is_bool($flags)) { + @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); + + if ($flags) { + $flags = Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE; + } else { + $flags = 0; + } + } + + if (func_num_args() >= 3) { + @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::DUMP_OBJECT flag instead.', E_USER_DEPRECATED); + + if (func_get_arg(2)) { + $flags |= Yaml::DUMP_OBJECT; + } + } + + switch (true) { + case is_resource($value): + if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) { + throw new DumpException(sprintf('Unable to dump PHP resources in a YAML file ("%s").', get_resource_type($value))); + } + + return 'null'; + case $value instanceof \DateTimeInterface: + return $value->format('c'); + case is_object($value): + if (Yaml::DUMP_OBJECT & $flags) { + return '!php/object:'.serialize($value); + } + + if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \stdClass || $value instanceof \ArrayObject)) { + return self::dumpArray((array) $value, $flags); + } + + if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) { + throw new DumpException('Object support when dumping a YAML file has been disabled.'); + } + + return 'null'; + case is_array($value): + return self::dumpArray($value, $flags); + case null === $value: + return 'null'; + case true === $value: + return 'true'; + case false === $value: + return 'false'; + case ctype_digit($value): + return is_string($value) ? "'$value'" : (int) $value; + case is_numeric($value): + $locale = setlocale(LC_NUMERIC, 0); + if (false !== $locale) { + setlocale(LC_NUMERIC, 'C'); + } + if (is_float($value)) { + $repr = (string) $value; + if (is_infinite($value)) { + $repr = str_ireplace('INF', '.Inf', $repr); + } elseif (floor($value) == $value && $repr == $value) { + // Preserve float data type since storing a whole number will result in integer value. + $repr = '!!float '.$repr; + } + } else { + $repr = is_string($value) ? "'$value'" : (string) $value; + } + if (false !== $locale) { + setlocale(LC_NUMERIC, $locale); + } + + return $repr; + case '' == $value: + return "''"; + case self::isBinaryString($value): + return '!!binary '.base64_encode($value); + case Escaper::requiresDoubleQuoting($value): + return Escaper::escapeWithDoubleQuotes($value); + case Escaper::requiresSingleQuoting($value): + case preg_match('{^[0-9]+[_0-9]*$}', $value): + case preg_match(self::getHexRegex(), $value): + case preg_match(self::getTimestampRegex(), $value): + return Escaper::escapeWithSingleQuotes($value); + default: + return $value; + } + } + + /** + * Check if given array is hash or just normal indexed array. + * + * @internal + * + * @param array $value The PHP array to check + * + * @return bool true if value is hash array, false otherwise + */ + public static function isHash(array $value) + { + $expectedKey = 0; + + foreach ($value as $key => $val) { + if ($key !== $expectedKey++) { + return true; + } + } + + return false; + } + + /** + * Dumps a PHP array to a YAML string. + * + * @param array $value The PHP array to dump + * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string + * + * @return string The YAML string representing the PHP array + */ + private static function dumpArray($value, $flags) + { + // array + if ($value && !self::isHash($value)) { + $output = array(); + foreach ($value as $val) { + $output[] = self::dump($val, $flags); + } + + return sprintf('[%s]', implode(', ', $output)); + } + + // hash + $output = array(); + foreach ($value as $key => $val) { + $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags)); + } + + return sprintf('{ %s }', implode(', ', $output)); + } + + /** + * Parses a YAML scalar. + * + * @param string $scalar + * @param int $flags + * @param string $delimiters + * @param array $stringDelimiters + * @param int &$i + * @param bool $evaluate + * @param array $references + * + * @return string + * + * @throws ParseException When malformed inline YAML string is parsed + * + * @internal + */ + public static function parseScalar($scalar, $flags = 0, $delimiters = null, $stringDelimiters = array('"', "'"), &$i = 0, $evaluate = true, $references = array()) + { + if (in_array($scalar[$i], $stringDelimiters)) { + // quoted scalar + $output = self::parseQuotedScalar($scalar, $i); + + if (null !== $delimiters) { + $tmp = ltrim(substr($scalar, $i), ' '); + if (!in_array($tmp[0], $delimiters)) { + throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i))); + } + } + } else { + // "normal" string + if (!$delimiters) { + $output = substr($scalar, $i); + $i += strlen($output); + + // remove comments + if (preg_match('/[ \t]+#/', $output, $match, PREG_OFFSET_CAPTURE)) { + $output = substr($output, 0, $match[0][1]); + } + } elseif (preg_match('/^(.+?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) { + $output = $match[1]; + $i += strlen($output); + } else { + throw new ParseException(sprintf('Malformed inline YAML string: %s.', $scalar)); + } + + // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >) + if ($output && ('@' === $output[0] || '`' === $output[0] || '|' === $output[0] || '>' === $output[0])) { + throw new ParseException(sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0])); + } + + if ($output && '%' === $output[0]) { + @trigger_error(sprintf('Not quoting the scalar "%s" starting with the "%%" indicator character is deprecated since Symfony 3.1 and will throw a ParseException in 4.0.', $output), E_USER_DEPRECATED); + } + + if ($evaluate) { + $output = self::evaluateScalar($output, $flags, $references); + } + } + + return $output; + } + + /** + * Parses a YAML quoted scalar. + * + * @param string $scalar + * @param int &$i + * + * @return string + * + * @throws ParseException When malformed inline YAML string is parsed + */ + private static function parseQuotedScalar($scalar, &$i) + { + if (!preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) { + throw new ParseException(sprintf('Malformed inline YAML string: %s.', substr($scalar, $i))); + } + + $output = substr($match[0], 1, strlen($match[0]) - 2); + + $unescaper = new Unescaper(); + if ('"' == $scalar[$i]) { + $output = $unescaper->unescapeDoubleQuotedString($output); + } else { + $output = $unescaper->unescapeSingleQuotedString($output); + } + + $i += strlen($match[0]); + + return $output; + } + + /** + * Parses a YAML sequence. + * + * @param string $sequence + * @param int $flags + * @param int &$i + * @param array $references + * + * @return array + * + * @throws ParseException When malformed inline YAML string is parsed + */ + private static function parseSequence($sequence, $flags, &$i = 0, $references = array()) + { + $output = array(); + $len = strlen($sequence); + ++$i; + + // [foo, bar, ...] + while ($i < $len) { + switch ($sequence[$i]) { + case '[': + // nested sequence + $output[] = self::parseSequence($sequence, $flags, $i, $references); + break; + case '{': + // nested mapping + $output[] = self::parseMapping($sequence, $flags, $i, $references); + break; + case ']': + return $output; + case ',': + case ' ': + break; + default: + $isQuoted = in_array($sequence[$i], array('"', "'")); + $value = self::parseScalar($sequence, $flags, array(',', ']'), array('"', "'"), $i, true, $references); + + // the value can be an array if a reference has been resolved to an array var + if (is_string($value) && !$isQuoted && false !== strpos($value, ': ')) { + // embedded mapping? + try { + $pos = 0; + $value = self::parseMapping('{'.$value.'}', $flags, $pos, $references); + } catch (\InvalidArgumentException $e) { + // no, it's not + } + } + + $output[] = $value; + + --$i; + } + + ++$i; + } + + throw new ParseException(sprintf('Malformed inline YAML string: %s.', $sequence)); + } + + /** + * Parses a YAML mapping. + * + * @param string $mapping + * @param int $flags + * @param int &$i + * @param array $references + * + * @return array|\stdClass + * + * @throws ParseException When malformed inline YAML string is parsed + */ + private static function parseMapping($mapping, $flags, &$i = 0, $references = array()) + { + $output = array(); + $len = strlen($mapping); + ++$i; + + // {foo: bar, bar:foo, ...} + while ($i < $len) { + switch ($mapping[$i]) { + case ' ': + case ',': + ++$i; + continue 2; + case '}': + if (self::$objectForMap) { + return (object) $output; + } + + return $output; + } + + // key + $key = self::parseScalar($mapping, $flags, array(':', ' '), array('"', "'"), $i, false); + + if (':' !== $key && false === $i = strpos($mapping, ':', $i)) { + break; + } + + if (':' !== $key && (!isset($mapping[$i + 1]) || !in_array($mapping[$i + 1], array(' ', ',', '[', ']', '{', '}'), true))) { + @trigger_error('Using a colon that is not followed by an indication character (i.e. " ", ",", "[", "]", "{", "}" is deprecated since version 3.2 and will throw a ParseException in 4.0.', E_USER_DEPRECATED); + } + + // value + $done = false; + + while ($i < $len) { + switch ($mapping[$i]) { + case '[': + // nested sequence + $value = self::parseSequence($mapping, $flags, $i, $references); + // Spec: Keys MUST be unique; first one wins. + // Parser cannot abort this mapping earlier, since lines + // are processed sequentially. + if (!isset($output[$key])) { + $output[$key] = $value; + } else { + @trigger_error(sprintf('Duplicate key "%s" detected on line %d whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key, self::$parsedLineNumber + 1), E_USER_DEPRECATED); + } + $done = true; + break; + case '{': + // nested mapping + $value = self::parseMapping($mapping, $flags, $i, $references); + // Spec: Keys MUST be unique; first one wins. + // Parser cannot abort this mapping earlier, since lines + // are processed sequentially. + if (!isset($output[$key])) { + $output[$key] = $value; + } else { + @trigger_error(sprintf('Duplicate key "%s" detected on line %d whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key, self::$parsedLineNumber + 1), E_USER_DEPRECATED); + } + $done = true; + break; + case ':': + case ' ': + break; + default: + $value = self::parseScalar($mapping, $flags, array(',', '}'), array('"', "'"), $i, true, $references); + // Spec: Keys MUST be unique; first one wins. + // Parser cannot abort this mapping earlier, since lines + // are processed sequentially. + if (!isset($output[$key])) { + $output[$key] = $value; + } else { + @trigger_error(sprintf('Duplicate key "%s" detected on line %d whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key, self::$parsedLineNumber + 1), E_USER_DEPRECATED); + } + $done = true; + --$i; + } + + ++$i; + + if ($done) { + continue 2; + } + } + } + + throw new ParseException(sprintf('Malformed inline YAML string: %s.', $mapping)); + } + + /** + * Evaluates scalars and replaces magic values. + * + * @param string $scalar + * @param int $flags + * @param array $references + * + * @return string A YAML string + * + * @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved + */ + private static function evaluateScalar($scalar, $flags, $references = array()) + { + $scalar = trim($scalar); + $scalarLower = strtolower($scalar); + + if (0 === strpos($scalar, '*')) { + if (false !== $pos = strpos($scalar, '#')) { + $value = substr($scalar, 1, $pos - 2); + } else { + $value = substr($scalar, 1); + } + + // an unquoted * + if (false === $value || '' === $value) { + throw new ParseException('A reference must contain at least one character.'); + } + + if (!array_key_exists($value, $references)) { + throw new ParseException(sprintf('Reference "%s" does not exist.', $value)); + } + + return $references[$value]; + } + + switch (true) { + case 'null' === $scalarLower: + case '' === $scalar: + case '~' === $scalar: + return; + case 'true' === $scalarLower: + return true; + case 'false' === $scalarLower: + return false; + // Optimise for returning strings. + case $scalar[0] === '+' || $scalar[0] === '-' || $scalar[0] === '.' || $scalar[0] === '!' || is_numeric($scalar[0]): + switch (true) { + case 0 === strpos($scalar, '!str'): + return (string) substr($scalar, 5); + case 0 === strpos($scalar, '! '): + return (int) self::parseScalar(substr($scalar, 2), $flags); + case 0 === strpos($scalar, '!php/object:'): + if (self::$objectSupport) { + return unserialize(substr($scalar, 12)); + } + + if (self::$exceptionOnInvalidType) { + throw new ParseException('Object support when parsing a YAML file has been disabled.'); + } + + return; + case 0 === strpos($scalar, '!!php/object:'): + if (self::$objectSupport) { + @trigger_error('The !!php/object tag to indicate dumped PHP objects is deprecated since version 3.1 and will be removed in 4.0. Use the !php/object tag instead.', E_USER_DEPRECATED); + + return unserialize(substr($scalar, 13)); + } + + if (self::$exceptionOnInvalidType) { + throw new ParseException('Object support when parsing a YAML file has been disabled.'); + } + + return; + case 0 === strpos($scalar, '!php/const:'): + if (self::$constantSupport) { + if (defined($const = substr($scalar, 11))) { + return constant($const); + } + + throw new ParseException(sprintf('The constant "%s" is not defined.', $const)); + } + if (self::$exceptionOnInvalidType) { + throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Have you forgotten to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar)); + } + + return; + case 0 === strpos($scalar, '!!float '): + return (float) substr($scalar, 8); + case preg_match('{^[+-]?[0-9][0-9_]*$}', $scalar): + $scalar = str_replace('_', '', (string) $scalar); + // omitting the break / return as integers are handled in the next case + case ctype_digit($scalar): + $raw = $scalar; + $cast = (int) $scalar; + + return '0' == $scalar[0] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw); + case '-' === $scalar[0] && ctype_digit(substr($scalar, 1)): + $raw = $scalar; + $cast = (int) $scalar; + + return '0' == $scalar[1] ? octdec($scalar) : (((string) $raw === (string) $cast) ? $cast : $raw); + case is_numeric($scalar): + case preg_match(self::getHexRegex(), $scalar): + $scalar = str_replace('_', '', $scalar); + + return '0x' === $scalar[0].$scalar[1] ? hexdec($scalar) : (float) $scalar; + case '.inf' === $scalarLower: + case '.nan' === $scalarLower: + return -log(0); + case '-.inf' === $scalarLower: + return log(0); + case 0 === strpos($scalar, '!!binary '): + return self::evaluateBinaryScalar(substr($scalar, 9)); + case preg_match('/^(-|\+)?[0-9][0-9,]*(\.[0-9_]+)?$/', $scalar): + case preg_match('/^(-|\+)?[0-9][0-9_]*(\.[0-9_]+)?$/', $scalar): + if (false !== strpos($scalar, ',')) { + @trigger_error('Using the comma as a group separator for floats is deprecated since version 3.2 and will be removed in 4.0.', E_USER_DEPRECATED); + } + + return (float) str_replace(array(',', '_'), '', $scalar); + case preg_match(self::getTimestampRegex(), $scalar): + if (Yaml::PARSE_DATETIME & $flags) { + // When no timezone is provided in the parsed date, YAML spec says we must assume UTC. + return new \DateTime($scalar, new \DateTimeZone('UTC')); + } + + $timeZone = date_default_timezone_get(); + date_default_timezone_set('UTC'); + $time = strtotime($scalar); + date_default_timezone_set($timeZone); + + return $time; + } + default: + return (string) $scalar; + } + } + + /** + * @param string $scalar + * + * @return string + * + * @internal + */ + public static function evaluateBinaryScalar($scalar) + { + $parsedBinaryData = self::parseScalar(preg_replace('/\s/', '', $scalar)); + + if (0 !== (strlen($parsedBinaryData) % 4)) { + throw new ParseException(sprintf('The normalized base64 encoded data (data without whitespace characters) length must be a multiple of four (%d bytes given).', strlen($parsedBinaryData))); + } + + if (!preg_match('#^[A-Z0-9+/]+={0,2}$#i', $parsedBinaryData)) { + throw new ParseException(sprintf('The base64 encoded data (%s) contains invalid characters.', $parsedBinaryData)); + } + + return base64_decode($parsedBinaryData, true); + } + + private static function isBinaryString($value) + { + return !preg_match('//u', $value) || preg_match('/[^\x00\x07-\x0d\x1B\x20-\xff]/', $value); + } + + /** + * Gets a regex that matches a YAML date. + * + * @return string The regular expression + * + * @see http://www.yaml.org/spec/1.2/spec.html#id2761573 + */ + private static function getTimestampRegex() + { + return <<[0-9][0-9][0-9][0-9]) + -(?P[0-9][0-9]?) + -(?P[0-9][0-9]?) + (?:(?:[Tt]|[ \t]+) + (?P[0-9][0-9]?) + :(?P[0-9][0-9]) + :(?P[0-9][0-9]) + (?:\.(?P[0-9]*))? + (?:[ \t]*(?PZ|(?P[-+])(?P[0-9][0-9]?) + (?::(?P[0-9][0-9]))?))?)? + $~x +EOF; + } + + /** + * Gets a regex that matches a YAML number in hexadecimal notation. + * + * @return string + */ + private static function getHexRegex() + { + return '~^0x[0-9a-f_]++$~i'; + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/LICENSE b/vendor/symfony/symfony/src/Symfony/Component/Yaml/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..17d16a13367dd1c08e82d1de69e2c44852dcc3d2 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2017 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/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php new file mode 100644 index 0000000000000000000000000000000000000000..b3dbad067d7b0655ab0395dbf4a38102661bb010 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php @@ -0,0 +1,867 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml; + +use Symfony\Component\Yaml\Exception\ParseException; + +/** + * Parser parses YAML strings to convert them to PHP arrays. + * + * @author Fabien Potencier + */ +class Parser +{ + const TAG_PATTERN = '((?P![\w!.\/:-]+) +)?'; + const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; + + private $offset = 0; + private $totalNumberOfLines; + private $lines = array(); + private $currentLineNb = -1; + private $currentLine = ''; + private $refs = array(); + private $skippedLineNumbers = array(); + private $locallySkippedLineNumbers = array(); + + /** + * Constructor. + * + * @param int $offset The offset of YAML document (used for line numbers in error messages) + * @param int|null $totalNumberOfLines The overall number of lines being parsed + * @param int[] $skippedLineNumbers Number of comment lines that have been skipped by the parser + */ + public function __construct($offset = 0, $totalNumberOfLines = null, array $skippedLineNumbers = array()) + { + $this->offset = $offset; + $this->totalNumberOfLines = $totalNumberOfLines; + $this->skippedLineNumbers = $skippedLineNumbers; + } + + /** + * Parses a YAML string to a PHP value. + * + * @param string $value A YAML string + * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior + * + * @return mixed A PHP value + * + * @throws ParseException If the YAML is not valid + */ + public function parse($value, $flags = 0) + { + if (is_bool($flags)) { + @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); + + if ($flags) { + $flags = Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE; + } else { + $flags = 0; + } + } + + if (func_num_args() >= 3) { + @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT flag instead.', E_USER_DEPRECATED); + + if (func_get_arg(2)) { + $flags |= Yaml::PARSE_OBJECT; + } + } + + if (func_num_args() >= 4) { + @trigger_error('Passing a boolean flag to toggle object for map support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT_FOR_MAP flag instead.', E_USER_DEPRECATED); + + if (func_get_arg(3)) { + $flags |= Yaml::PARSE_OBJECT_FOR_MAP; + } + } + + if (!preg_match('//u', $value)) { + throw new ParseException('The YAML value does not appear to be valid UTF-8.'); + } + $this->currentLineNb = -1; + $this->currentLine = ''; + $value = $this->cleanup($value); + $this->lines = explode("\n", $value); + + if (null === $this->totalNumberOfLines) { + $this->totalNumberOfLines = count($this->lines); + } + + if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { + $mbEncoding = mb_internal_encoding(); + mb_internal_encoding('UTF-8'); + } + + $data = array(); + $context = null; + $allowOverwrite = false; + while ($this->moveToNextLine()) { + if ($this->isCurrentLineEmpty()) { + continue; + } + + // tab? + if ("\t" === $this->currentLine[0]) { + throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + } + + $isRef = $mergeNode = false; + if (preg_match('#^\-((?P\s+)(?P.+?))?\s*$#u', $this->currentLine, $values)) { + if ($context && 'mapping' == $context) { + throw new ParseException('You cannot define a sequence item when in a mapping', $this->getRealCurrentLineNb() + 1, $this->currentLine); + } + $context = 'sequence'; + + if (isset($values['value']) && preg_match('#^&(?P[^ ]+) *(?P.*)#u', $values['value'], $matches)) { + $isRef = $matches['ref']; + $values['value'] = $matches['value']; + } + + // array + if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) { + $data[] = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true), $flags); + } else { + if (isset($values['leadspaces']) + && preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P.+?))?\s*$#u', $values['value'], $matches) + ) { + // this is a compact notation element, add to next block and parse + $block = $values['value']; + if ($this->isNextLineIndented()) { + $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + strlen($values['leadspaces']) + 1); + } + + $data[] = $this->parseBlock($this->getRealCurrentLineNb(), $block, $flags); + } else { + $data[] = $this->parseValue($values['value'], $flags, $context); + } + } + if ($isRef) { + $this->refs[$isRef] = end($data); + } + } elseif (preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\[\{].*?) *\:(\s+(?P.+?))?\s*$#u', $this->currentLine, $values) && (false === strpos($values['key'], ' #') || in_array($values['key'][0], array('"', "'")))) { + if ($context && 'sequence' == $context) { + throw new ParseException('You cannot define a mapping item when in a sequence', $this->currentLineNb + 1, $this->currentLine); + } + $context = 'mapping'; + + // force correct settings + Inline::parse(null, $flags, $this->refs); + try { + Inline::$parsedLineNumber = $this->getRealCurrentLineNb(); + $key = Inline::parseScalar($values['key']); + } catch (ParseException $e) { + $e->setParsedLine($this->getRealCurrentLineNb() + 1); + $e->setSnippet($this->currentLine); + + throw $e; + } + + // Convert float keys to strings, to avoid being converted to integers by PHP + if (is_float($key)) { + $key = (string) $key; + } + + if ('<<' === $key) { + $mergeNode = true; + $allowOverwrite = true; + if (isset($values['value']) && 0 === strpos($values['value'], '*')) { + $refName = substr($values['value'], 1); + if (!array_key_exists($refName, $this->refs)) { + throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine); + } + + $refValue = $this->refs[$refName]; + + if (!is_array($refValue)) { + throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + } + + $data += $refValue; // array union + } else { + if (isset($values['value']) && $values['value'] !== '') { + $value = $values['value']; + } else { + $value = $this->getNextEmbedBlock(); + } + $parsed = $this->parseBlock($this->getRealCurrentLineNb() + 1, $value, $flags); + + if (!is_array($parsed)) { + throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + } + + if (isset($parsed[0])) { + // If the value associated with the merge key is a sequence, then this sequence is expected to contain mapping nodes + // and each of these nodes is merged in turn according to its order in the sequence. Keys in mapping nodes earlier + // in the sequence override keys specified in later mapping nodes. + foreach ($parsed as $parsedItem) { + if (!is_array($parsedItem)) { + throw new ParseException('Merge items must be arrays.', $this->getRealCurrentLineNb() + 1, $parsedItem); + } + + $data += $parsedItem; // array union + } + } else { + // If the value associated with the key is a single mapping node, each of its key/value pairs is inserted into the + // current mapping, unless the key already exists in it. + $data += $parsed; // array union + } + } + } elseif (isset($values['value']) && preg_match('#^&(?P[^ ]+) *(?P.*)#u', $values['value'], $matches)) { + $isRef = $matches['ref']; + $values['value'] = $matches['value']; + } + + if ($mergeNode) { + // Merge keys + } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) { + // hash + // if next line is less indented or equal, then it means that the current value is null + if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) { + // Spec: Keys MUST be unique; first one wins. + // But overwriting is allowed when a merge node is used in current block. + if ($allowOverwrite || !isset($data[$key])) { + $data[$key] = null; + } else { + @trigger_error(sprintf('Duplicate key "%s" detected on line %d whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key, $this->getRealCurrentLineNb() + 1), E_USER_DEPRECATED); + } + } else { + // remember the parsed line number here in case we need it to provide some contexts in error messages below + $realCurrentLineNbKey = $this->getRealCurrentLineNb(); + $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $flags); + // Spec: Keys MUST be unique; first one wins. + // But overwriting is allowed when a merge node is used in current block. + if ($allowOverwrite || !isset($data[$key])) { + $data[$key] = $value; + } else { + @trigger_error(sprintf('Duplicate key "%s" detected on line %d whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key, $realCurrentLineNbKey + 1), E_USER_DEPRECATED); + } + } + } else { + $value = $this->parseValue($values['value'], $flags, $context); + // Spec: Keys MUST be unique; first one wins. + // But overwriting is allowed when a merge node is used in current block. + if ($allowOverwrite || !isset($data[$key])) { + $data[$key] = $value; + } else { + @trigger_error(sprintf('Duplicate key "%s" detected on line %d whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key, $this->getRealCurrentLineNb() + 1), E_USER_DEPRECATED); + } + } + if ($isRef) { + $this->refs[$isRef] = $data[$key]; + } + } else { + // multiple documents are not supported + if ('---' === $this->currentLine) { + throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine); + } + + // 1-liner optionally followed by newline(s) + if (is_string($value) && $this->lines[0] === trim($value)) { + try { + Inline::$parsedLineNumber = $this->getRealCurrentLineNb(); + $value = Inline::parse($this->lines[0], $flags, $this->refs); + } catch (ParseException $e) { + $e->setParsedLine($this->getRealCurrentLineNb() + 1); + $e->setSnippet($this->currentLine); + + throw $e; + } + + if (isset($mbEncoding)) { + mb_internal_encoding($mbEncoding); + } + + return $value; + } + + switch (preg_last_error()) { + case PREG_INTERNAL_ERROR: + $error = 'Internal PCRE error.'; + break; + case PREG_BACKTRACK_LIMIT_ERROR: + $error = 'pcre.backtrack_limit reached.'; + break; + case PREG_RECURSION_LIMIT_ERROR: + $error = 'pcre.recursion_limit reached.'; + break; + case PREG_BAD_UTF8_ERROR: + $error = 'Malformed UTF-8 data.'; + break; + case PREG_BAD_UTF8_OFFSET_ERROR: + $error = 'Offset doesn\'t correspond to the begin of a valid UTF-8 code point.'; + break; + default: + $error = 'Unable to parse.'; + } + + throw new ParseException($error, $this->getRealCurrentLineNb() + 1, $this->currentLine); + } + } + + if (isset($mbEncoding)) { + mb_internal_encoding($mbEncoding); + } + + if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && !is_object($data) && 'mapping' === $context) { + $object = new \stdClass(); + + foreach ($data as $key => $value) { + $object->$key = $value; + } + + $data = $object; + } + + return empty($data) ? null : $data; + } + + private function parseBlock($offset, $yaml, $flags) + { + $skippedLineNumbers = $this->skippedLineNumbers; + + foreach ($this->locallySkippedLineNumbers as $lineNumber) { + if ($lineNumber < $offset) { + continue; + } + + $skippedLineNumbers[] = $lineNumber; + } + + $parser = new self($offset, $this->totalNumberOfLines, $skippedLineNumbers); + $parser->refs = &$this->refs; + + return $parser->parse($yaml, $flags); + } + + /** + * Returns the current line number (takes the offset into account). + * + * @return int The current line number + */ + private function getRealCurrentLineNb() + { + $realCurrentLineNumber = $this->currentLineNb + $this->offset; + + foreach ($this->skippedLineNumbers as $skippedLineNumber) { + if ($skippedLineNumber > $realCurrentLineNumber) { + break; + } + + ++$realCurrentLineNumber; + } + + return $realCurrentLineNumber; + } + + /** + * Returns the current line indentation. + * + * @return int The current line indentation + */ + private function getCurrentLineIndentation() + { + return strlen($this->currentLine) - strlen(ltrim($this->currentLine, ' ')); + } + + /** + * Returns the next embed block of YAML. + * + * @param int $indentation The indent level at which the block is to be read, or null for default + * @param bool $inSequence True if the enclosing data structure is a sequence + * + * @return string A YAML string + * + * @throws ParseException When indentation problem are detected + */ + private function getNextEmbedBlock($indentation = null, $inSequence = false) + { + $oldLineIndentation = $this->getCurrentLineIndentation(); + $blockScalarIndentations = array(); + + if ($this->isBlockScalarHeader()) { + $blockScalarIndentations[] = $this->getCurrentLineIndentation(); + } + + if (!$this->moveToNextLine()) { + return; + } + + if (null === $indentation) { + $newIndent = $this->getCurrentLineIndentation(); + + $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem(); + + if (!$this->isCurrentLineEmpty() && 0 === $newIndent && !$unindentedEmbedBlock) { + throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + } + } else { + $newIndent = $indentation; + } + + $data = array(); + if ($this->getCurrentLineIndentation() >= $newIndent) { + $data[] = substr($this->currentLine, $newIndent); + } else { + $this->moveToPreviousLine(); + + return; + } + + if ($inSequence && $oldLineIndentation === $newIndent && isset($data[0][0]) && '-' === $data[0][0]) { + // the previous line contained a dash but no item content, this line is a sequence item with the same indentation + // and therefore no nested list or mapping + $this->moveToPreviousLine(); + + return; + } + + $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem(); + + if (empty($blockScalarIndentations) && $this->isBlockScalarHeader()) { + $blockScalarIndentations[] = $this->getCurrentLineIndentation(); + } + + $previousLineIndentation = $this->getCurrentLineIndentation(); + + while ($this->moveToNextLine()) { + $indent = $this->getCurrentLineIndentation(); + + // terminate all block scalars that are more indented than the current line + if (!empty($blockScalarIndentations) && $indent < $previousLineIndentation && trim($this->currentLine) !== '') { + foreach ($blockScalarIndentations as $key => $blockScalarIndentation) { + if ($blockScalarIndentation >= $this->getCurrentLineIndentation()) { + unset($blockScalarIndentations[$key]); + } + } + } + + if (empty($blockScalarIndentations) && !$this->isCurrentLineComment() && $this->isBlockScalarHeader()) { + $blockScalarIndentations[] = $this->getCurrentLineIndentation(); + } + + $previousLineIndentation = $indent; + + if ($isItUnindentedCollection && !$this->isCurrentLineEmpty() && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) { + $this->moveToPreviousLine(); + break; + } + + if ($this->isCurrentLineBlank()) { + $data[] = substr($this->currentLine, $newIndent); + continue; + } + + // we ignore "comment" lines only when we are not inside a scalar block + if (empty($blockScalarIndentations) && $this->isCurrentLineComment()) { + // remember ignored comment lines (they are used later in nested + // parser calls to determine real line numbers) + // + // CAUTION: beware to not populate the global property here as it + // will otherwise influence the getRealCurrentLineNb() call here + // for consecutive comment lines and subsequent embedded blocks + $this->locallySkippedLineNumbers[] = $this->getRealCurrentLineNb(); + + continue; + } + + if ($indent >= $newIndent) { + $data[] = substr($this->currentLine, $newIndent); + } elseif (0 == $indent) { + $this->moveToPreviousLine(); + + break; + } else { + throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + } + } + + return implode("\n", $data); + } + + /** + * Moves the parser to the next line. + * + * @return bool + */ + private function moveToNextLine() + { + if ($this->currentLineNb >= count($this->lines) - 1) { + return false; + } + + $this->currentLine = $this->lines[++$this->currentLineNb]; + + return true; + } + + /** + * Moves the parser to the previous line. + * + * @return bool + */ + private function moveToPreviousLine() + { + if ($this->currentLineNb < 1) { + return false; + } + + $this->currentLine = $this->lines[--$this->currentLineNb]; + + return true; + } + + /** + * Parses a YAML value. + * + * @param string $value A YAML value + * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior + * @param string $context The parser context (either sequence or mapping) + * + * @return mixed A PHP value + * + * @throws ParseException When reference does not exist + */ + private function parseValue($value, $flags, $context) + { + if (0 === strpos($value, '*')) { + if (false !== $pos = strpos($value, '#')) { + $value = substr($value, 1, $pos - 2); + } else { + $value = substr($value, 1); + } + + if (!array_key_exists($value, $this->refs)) { + throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine); + } + + return $this->refs[$value]; + } + + if (preg_match('/^'.self::TAG_PATTERN.self::BLOCK_SCALAR_HEADER_PATTERN.'$/', $value, $matches)) { + $modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : ''; + + $data = $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), (int) abs($modifiers)); + + if (isset($matches['tag']) && '!!binary' === $matches['tag']) { + return Inline::evaluateBinaryScalar($data); + } + + return $data; + } + + try { + $quotation = '' !== $value && ('"' === $value[0] || "'" === $value[0]) ? $value[0] : null; + + // do not take following lines into account when the current line is a quoted single line value + if (null !== $quotation && preg_match('/^'.$quotation.'.*'.$quotation.'(\s*#.*)?$/', $value)) { + return Inline::parse($value, $flags, $this->refs); + } + + while ($this->moveToNextLine()) { + // unquoted strings end before the first unindented line + if (null === $quotation && $this->getCurrentLineIndentation() === 0) { + $this->moveToPreviousLine(); + + break; + } + + $value .= ' '.trim($this->currentLine); + + // quoted string values end with a line that is terminated with the quotation character + if ('' !== $this->currentLine && substr($this->currentLine, -1) === $quotation) { + break; + } + } + + Inline::$parsedLineNumber = $this->getRealCurrentLineNb(); + $parsedValue = Inline::parse($value, $flags, $this->refs); + + if ('mapping' === $context && is_string($parsedValue) && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) { + throw new ParseException('A colon cannot be used in an unquoted mapping value.'); + } + + return $parsedValue; + } catch (ParseException $e) { + $e->setParsedLine($this->getRealCurrentLineNb() + 1); + $e->setSnippet($this->currentLine); + + throw $e; + } + } + + /** + * Parses a block scalar. + * + * @param string $style The style indicator that was used to begin this block scalar (| or >) + * @param string $chomping The chomping indicator that was used to begin this block scalar (+ or -) + * @param int $indentation The indentation indicator that was used to begin this block scalar + * + * @return string The text value + */ + private function parseBlockScalar($style, $chomping = '', $indentation = 0) + { + $notEOF = $this->moveToNextLine(); + if (!$notEOF) { + return ''; + } + + $isCurrentLineBlank = $this->isCurrentLineBlank(); + $blockLines = array(); + + // leading blank lines are consumed before determining indentation + while ($notEOF && $isCurrentLineBlank) { + // newline only if not EOF + if ($notEOF = $this->moveToNextLine()) { + $blockLines[] = ''; + $isCurrentLineBlank = $this->isCurrentLineBlank(); + } + } + + // determine indentation if not specified + if (0 === $indentation) { + if (preg_match('/^ +/', $this->currentLine, $matches)) { + $indentation = strlen($matches[0]); + } + } + + if ($indentation > 0) { + $pattern = sprintf('/^ {%d}(.*)$/', $indentation); + + while ( + $notEOF && ( + $isCurrentLineBlank || + preg_match($pattern, $this->currentLine, $matches) + ) + ) { + if ($isCurrentLineBlank && strlen($this->currentLine) > $indentation) { + $blockLines[] = substr($this->currentLine, $indentation); + } elseif ($isCurrentLineBlank) { + $blockLines[] = ''; + } else { + $blockLines[] = $matches[1]; + } + + // newline only if not EOF + if ($notEOF = $this->moveToNextLine()) { + $isCurrentLineBlank = $this->isCurrentLineBlank(); + } + } + } elseif ($notEOF) { + $blockLines[] = ''; + } + + if ($notEOF) { + $blockLines[] = ''; + $this->moveToPreviousLine(); + } elseif (!$notEOF && !$this->isCurrentLineLastLineInDocument()) { + $blockLines[] = ''; + } + + // folded style + if ('>' === $style) { + $text = ''; + $previousLineIndented = false; + $previousLineBlank = false; + + for ($i = 0, $blockLinesCount = count($blockLines); $i < $blockLinesCount; ++$i) { + if ('' === $blockLines[$i]) { + $text .= "\n"; + $previousLineIndented = false; + $previousLineBlank = true; + } elseif (' ' === $blockLines[$i][0]) { + $text .= "\n".$blockLines[$i]; + $previousLineIndented = true; + $previousLineBlank = false; + } elseif ($previousLineIndented) { + $text .= "\n".$blockLines[$i]; + $previousLineIndented = false; + $previousLineBlank = false; + } elseif ($previousLineBlank || 0 === $i) { + $text .= $blockLines[$i]; + $previousLineIndented = false; + $previousLineBlank = false; + } else { + $text .= ' '.$blockLines[$i]; + $previousLineIndented = false; + $previousLineBlank = false; + } + } + } else { + $text = implode("\n", $blockLines); + } + + // deal with trailing newlines + if ('' === $chomping) { + $text = preg_replace('/\n+$/', "\n", $text); + } elseif ('-' === $chomping) { + $text = preg_replace('/\n+$/', '', $text); + } + + return $text; + } + + /** + * Returns true if the next line is indented. + * + * @return bool Returns true if the next line is indented, false otherwise + */ + private function isNextLineIndented() + { + $currentIndentation = $this->getCurrentLineIndentation(); + $EOF = !$this->moveToNextLine(); + + while (!$EOF && $this->isCurrentLineEmpty()) { + $EOF = !$this->moveToNextLine(); + } + + if ($EOF) { + return false; + } + + $ret = false; + if ($this->getCurrentLineIndentation() > $currentIndentation) { + $ret = true; + } + + $this->moveToPreviousLine(); + + return $ret; + } + + /** + * Returns true if the current line is blank or if it is a comment line. + * + * @return bool Returns true if the current line is empty or if it is a comment line, false otherwise + */ + private function isCurrentLineEmpty() + { + return $this->isCurrentLineBlank() || $this->isCurrentLineComment(); + } + + /** + * Returns true if the current line is blank. + * + * @return bool Returns true if the current line is blank, false otherwise + */ + private function isCurrentLineBlank() + { + return '' == trim($this->currentLine, ' '); + } + + /** + * Returns true if the current line is a comment line. + * + * @return bool Returns true if the current line is a comment line, false otherwise + */ + private function isCurrentLineComment() + { + //checking explicitly the first char of the trim is faster than loops or strpos + $ltrimmedLine = ltrim($this->currentLine, ' '); + + return '' !== $ltrimmedLine && $ltrimmedLine[0] === '#'; + } + + private function isCurrentLineLastLineInDocument() + { + return ($this->offset + $this->currentLineNb) >= ($this->totalNumberOfLines - 1); + } + + /** + * Cleanups a YAML string to be parsed. + * + * @param string $value The input YAML string + * + * @return string A cleaned up YAML string + */ + private function cleanup($value) + { + $value = str_replace(array("\r\n", "\r"), "\n", $value); + + // strip YAML header + $count = 0; + $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#u', '', $value, -1, $count); + $this->offset += $count; + + // remove leading comments + $trimmedValue = preg_replace('#^(\#.*?\n)+#s', '', $value, -1, $count); + if ($count == 1) { + // items have been removed, update the offset + $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); + $value = $trimmedValue; + } + + // remove start of the document marker (---) + $trimmedValue = preg_replace('#^\-\-\-.*?\n#s', '', $value, -1, $count); + if ($count == 1) { + // items have been removed, update the offset + $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); + $value = $trimmedValue; + + // remove end of the document marker (...) + $value = preg_replace('#\.\.\.\s*$#', '', $value); + } + + return $value; + } + + /** + * Returns true if the next line starts unindented collection. + * + * @return bool Returns true if the next line starts unindented collection, false otherwise + */ + private function isNextLineUnIndentedCollection() + { + $currentIndentation = $this->getCurrentLineIndentation(); + $notEOF = $this->moveToNextLine(); + + while ($notEOF && $this->isCurrentLineEmpty()) { + $notEOF = $this->moveToNextLine(); + } + + if (false === $notEOF) { + return false; + } + + $ret = false; + if ( + $this->getCurrentLineIndentation() == $currentIndentation + && + $this->isStringUnIndentedCollectionItem() + ) { + $ret = true; + } + + $this->moveToPreviousLine(); + + return $ret; + } + + /** + * Returns true if the string is un-indented collection item. + * + * @return bool Returns true if the string is un-indented collection item, false otherwise + */ + private function isStringUnIndentedCollectionItem() + { + return '-' === rtrim($this->currentLine) || 0 === strpos($this->currentLine, '- '); + } + + /** + * Tests whether or not the current line is the header of a block scalar. + * + * @return bool + */ + private function isBlockScalarHeader() + { + return (bool) preg_match('~'.self::BLOCK_SCALAR_HEADER_PATTERN.'$~', $this->currentLine); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/README.md b/vendor/symfony/symfony/src/Symfony/Component/Yaml/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0d324881ce5e41c67ab20e2700f9640748d8c2fa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/README.md @@ -0,0 +1,13 @@ +Yaml Component +============== + +The Yaml component loads and dumps YAML files. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/yaml/index.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/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ce6ad480cf2b6e1e0c7c09fa145a3ead5b813574 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Tests\Command; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Yaml\Command\LintCommand; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Tester\CommandTester; + +/** + * Tests the YamlLintCommand. + * + * @author Robin Chalas + */ +class LintCommandTest extends TestCase +{ + private $files; + + public function testLintCorrectFile() + { + $tester = $this->createCommandTester(); + $filename = $this->createFile('foo: bar'); + + $ret = $tester->execute(array('filename' => $filename), array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false)); + + $this->assertEquals(0, $ret, 'Returns 0 in case of success'); + $this->assertRegExp('/^\/\/ OK in /', trim($tester->getDisplay())); + } + + public function testLintIncorrectFile() + { + $incorrectContent = ' +foo: +bar'; + $tester = $this->createCommandTester(); + $filename = $this->createFile($incorrectContent); + + $ret = $tester->execute(array('filename' => $filename), array('decorated' => false)); + + $this->assertEquals(1, $ret, 'Returns 1 in case of error'); + $this->assertContains('Unable to parse at line 3 (near "bar").', trim($tester->getDisplay())); + } + + /** + * @expectedException \RuntimeException + */ + public function testLintFileNotReadable() + { + $tester = $this->createCommandTester(); + $filename = $this->createFile(''); + unlink($filename); + + $ret = $tester->execute(array('filename' => $filename), array('decorated' => false)); + } + + /** + * @return string Path to the new file + */ + private function createFile($content) + { + $filename = tempnam(sys_get_temp_dir().'/framework-yml-lint-test', 'sf-'); + file_put_contents($filename, $content); + + $this->files[] = $filename; + + return $filename; + } + + /** + * @return CommandTester + */ + protected function createCommandTester() + { + $application = new Application(); + $application->add(new LintCommand()); + $command = $application->find('lint:yaml'); + + return new CommandTester($command); + } + + protected function setUp() + { + $this->files = array(); + @mkdir(sys_get_temp_dir().'/framework-yml-lint-test'); + } + + protected function tearDown() + { + foreach ($this->files as $file) { + if (file_exists($file)) { + unlink($file); + } + } + + rmdir(sys_get_temp_dir().'/framework-yml-lint-test'); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/DumperTest.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/DumperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..844177dbcd107a7c7d9998c0bb7e75145ab08f0f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/DumperTest.php @@ -0,0 +1,373 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Yaml\Parser; +use Symfony\Component\Yaml\Dumper; +use Symfony\Component\Yaml\Yaml; + +class DumperTest extends TestCase +{ + protected $parser; + protected $dumper; + protected $path; + + protected $array = array( + '' => 'bar', + 'foo' => '#bar', + 'foo\'bar' => array(), + 'bar' => array(1, 'foo'), + 'foobar' => array( + 'foo' => 'bar', + 'bar' => array(1, 'foo'), + 'foobar' => array( + 'foo' => 'bar', + 'bar' => array(1, 'foo'), + ), + ), + ); + + protected function setUp() + { + $this->parser = new Parser(); + $this->dumper = new Dumper(); + $this->path = __DIR__.'/Fixtures'; + } + + protected function tearDown() + { + $this->parser = null; + $this->dumper = null; + $this->path = null; + $this->array = null; + } + + public function testIndentationInConstructor() + { + $dumper = new Dumper(7); + $expected = <<<'EOF' +'': bar +foo: '#bar' +'foo''bar': { } +bar: + - 1 + - foo +foobar: + foo: bar + bar: + - 1 + - foo + foobar: + foo: bar + bar: + - 1 + - foo + +EOF; + $this->assertEquals($expected, $dumper->dump($this->array, 4, 0)); + } + + /** + * @group legacy + */ + public function testSetIndentation() + { + $this->dumper->setIndentation(7); + + $expected = <<<'EOF' +'': bar +foo: '#bar' +'foo''bar': { } +bar: + - 1 + - foo +foobar: + foo: bar + bar: + - 1 + - foo + foobar: + foo: bar + bar: + - 1 + - foo + +EOF; + $this->assertEquals($expected, $this->dumper->dump($this->array, 4, 0)); + } + + public function testSpecifications() + { + $files = $this->parser->parse(file_get_contents($this->path.'/index.yml')); + foreach ($files as $file) { + $yamls = file_get_contents($this->path.'/'.$file.'.yml'); + + // split YAMLs documents + foreach (preg_split('/^---( %YAML\:1\.0)?/m', $yamls) as $yaml) { + if (!$yaml) { + continue; + } + + $test = $this->parser->parse($yaml); + if (isset($test['dump_skip']) && $test['dump_skip']) { + continue; + } elseif (isset($test['todo']) && $test['todo']) { + // TODO + } else { + eval('$expected = '.trim($test['php']).';'); + $this->assertSame($expected, $this->parser->parse($this->dumper->dump($expected, 10)), $test['test']); + } + } + } + } + + public function testInlineLevel() + { + $expected = <<<'EOF' +{ '': bar, foo: '#bar', 'foo''bar': { }, bar: [1, foo], foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } } } +EOF; + $this->assertEquals($expected, $this->dumper->dump($this->array, -10), '->dump() takes an inline level argument'); + $this->assertEquals($expected, $this->dumper->dump($this->array, 0), '->dump() takes an inline level argument'); + + $expected = <<<'EOF' +'': bar +foo: '#bar' +'foo''bar': { } +bar: [1, foo] +foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } } + +EOF; + $this->assertEquals($expected, $this->dumper->dump($this->array, 1), '->dump() takes an inline level argument'); + + $expected = <<<'EOF' +'': bar +foo: '#bar' +'foo''bar': { } +bar: + - 1 + - foo +foobar: + foo: bar + bar: [1, foo] + foobar: { foo: bar, bar: [1, foo] } + +EOF; + $this->assertEquals($expected, $this->dumper->dump($this->array, 2), '->dump() takes an inline level argument'); + + $expected = <<<'EOF' +'': bar +foo: '#bar' +'foo''bar': { } +bar: + - 1 + - foo +foobar: + foo: bar + bar: + - 1 + - foo + foobar: + foo: bar + bar: [1, foo] + +EOF; + $this->assertEquals($expected, $this->dumper->dump($this->array, 3), '->dump() takes an inline level argument'); + + $expected = <<<'EOF' +'': bar +foo: '#bar' +'foo''bar': { } +bar: + - 1 + - foo +foobar: + foo: bar + bar: + - 1 + - foo + foobar: + foo: bar + bar: + - 1 + - foo + +EOF; + $this->assertEquals($expected, $this->dumper->dump($this->array, 4), '->dump() takes an inline level argument'); + $this->assertEquals($expected, $this->dumper->dump($this->array, 10), '->dump() takes an inline level argument'); + } + + public function testObjectSupportEnabled() + { + $dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_OBJECT); + + $this->assertEquals('{ foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects'); + } + + /** + * @group legacy + */ + public function testObjectSupportEnabledPassingTrue() + { + $dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, true); + + $this->assertEquals('{ foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects'); + } + + public function testObjectSupportDisabledButNoExceptions() + { + $dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1)); + + $this->assertEquals('{ foo: null, bar: 1 }', $dump, '->dump() does not dump objects when disabled'); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\DumpException + */ + public function testObjectSupportDisabledWithExceptions() + { + $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE); + } + + /** + * @group legacy + * @expectedException \Symfony\Component\Yaml\Exception\DumpException + */ + public function testObjectSupportDisabledWithExceptionsPassingTrue() + { + $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, true); + } + + /** + * @dataProvider getEscapeSequences + */ + public function testEscapedEscapeSequencesInQuotedScalar($input, $expected) + { + $this->assertEquals($expected, $this->dumper->dump($input)); + } + + public function getEscapeSequences() + { + return array( + 'empty string' => array('', "''"), + 'null' => array("\x0", '"\\0"'), + 'bell' => array("\x7", '"\\a"'), + 'backspace' => array("\x8", '"\\b"'), + 'horizontal-tab' => array("\t", '"\\t"'), + 'line-feed' => array("\n", '"\\n"'), + 'vertical-tab' => array("\v", '"\\v"'), + 'form-feed' => array("\xC", '"\\f"'), + 'carriage-return' => array("\r", '"\\r"'), + 'escape' => array("\x1B", '"\\e"'), + 'space' => array(' ', "' '"), + 'double-quote' => array('"', "'\"'"), + 'slash' => array('/', '/'), + 'backslash' => array('\\', '\\'), + 'next-line' => array("\xC2\x85", '"\\N"'), + 'non-breaking-space' => array("\xc2\xa0", '"\\_"'), + 'line-separator' => array("\xE2\x80\xA8", '"\\L"'), + 'paragraph-separator' => array("\xE2\x80\xA9", '"\\P"'), + 'colon' => array(':', "':'"), + ); + } + + public function testBinaryDataIsDumpedBase64Encoded() + { + $binaryData = file_get_contents(__DIR__.'/Fixtures/arrow.gif'); + $expected = '{ data: !!binary '.base64_encode($binaryData).' }'; + + $this->assertSame($expected, $this->dumper->dump(array('data' => $binaryData))); + } + + public function testNonUtf8DataIsDumpedBase64Encoded() + { + // "für" (ISO-8859-1 encoded) + $this->assertSame('!!binary ZsM/cg==', $this->dumper->dump("f\xc3\x3fr")); + } + + /** + * @dataProvider objectAsMapProvider + */ + public function testDumpObjectAsMap($object, $expected) + { + $yaml = $this->dumper->dump($object, 0, 0, Yaml::DUMP_OBJECT_AS_MAP); + + $this->assertEquals($expected, Yaml::parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP)); + } + + public function objectAsMapProvider() + { + $tests = array(); + + $bar = new \stdClass(); + $bar->class = 'classBar'; + $bar->args = array('bar'); + $zar = new \stdClass(); + $foo = new \stdClass(); + $foo->bar = $bar; + $foo->zar = $zar; + $object = new \stdClass(); + $object->foo = $foo; + $tests['stdClass'] = array($object, $object); + + $arrayObject = new \ArrayObject(); + $arrayObject['foo'] = 'bar'; + $arrayObject['baz'] = 'foobar'; + $parsedArrayObject = new \stdClass(); + $parsedArrayObject->foo = 'bar'; + $parsedArrayObject->baz = 'foobar'; + $tests['ArrayObject'] = array($arrayObject, $parsedArrayObject); + + $a = new A(); + $tests['arbitrary-object'] = array($a, null); + + return $tests; + } + + public function testDumpMultiLineStringAsScalarBlock() + { + $data = array( + 'data' => array( + 'single_line' => 'foo bar baz', + 'multi_line' => "foo\nline with trailing spaces:\n \nbar\r\ninteger like line:\n123456789\nempty line:\n\nbaz", + 'nested_inlined_multi_line_string' => array( + 'inlined_multi_line' => "foo\nbar\r\nempty line:\n\nbaz", + ), + ), + ); + + $this->assertSame(file_get_contents(__DIR__.'/Fixtures/multiple_lines_as_literal_block.yml'), $this->dumper->dump($data, 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK)); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The indentation must be greater than zero + */ + public function testZeroIndentationThrowsException() + { + new Dumper(0); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The indentation must be greater than zero + */ + public function testNegativeIndentationThrowsException() + { + new Dumper(-4); + } +} + +class A +{ + public $a = 'foo'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml new file mode 100644 index 0000000000000000000000000000000000000000..5f9c94275b7d21afa263db2c857cf6e243e374ae --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml @@ -0,0 +1,31 @@ +--- %YAML:1.0 +test: Simple Alias Example +brief: > + If you need to refer to the same item of data twice, + you can give that item an alias. The alias is a plain + string, starting with an ampersand. The item may then + be referred to by the alias throughout your document + by using an asterisk before the name of the alias. + This is called an anchor. +yaml: | + - &showell Steve + - Clark + - Brian + - Oren + - *showell +php: | + array('Steve', 'Clark', 'Brian', 'Oren', 'Steve') + +--- +test: Alias of a Mapping +brief: > + An alias can be used on any item of data, including + sequences, mappings, and other complex data types. +yaml: | + - &hello + Meat: pork + Starch: potato + - banana + - *hello +php: | + array(array('Meat'=>'pork', 'Starch'=>'potato'), 'banana', array('Meat'=>'pork', 'Starch'=>'potato')) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.yml new file mode 100644 index 0000000000000000000000000000000000000000..dfd93021d18cee7d51b8fc1f0c551e2712c1b63a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.yml @@ -0,0 +1,202 @@ +--- %YAML:1.0 +test: Simple Sequence +brief: | + You can specify a list in YAML by placing each + member of the list on a new line with an opening + dash. These lists are called sequences. +yaml: | + - apple + - banana + - carrot +php: | + array('apple', 'banana', 'carrot') +--- +test: Sequence With Item Being Null In The Middle +brief: | + You can specify a list in YAML by placing each + member of the list on a new line with an opening + dash. These lists are called sequences. +yaml: | + - apple + - + - carrot +php: | + array('apple', null, 'carrot') +--- +test: Sequence With Last Item Being Null +brief: | + You can specify a list in YAML by placing each + member of the list on a new line with an opening + dash. These lists are called sequences. +yaml: | + - apple + - banana + - +php: | + array('apple', 'banana', null) +--- +test: Nested Sequences +brief: | + You can include a sequence within another + sequence by giving the sequence an empty + dash, followed by an indented list. +yaml: | + - + - foo + - bar + - baz +php: | + array(array('foo', 'bar', 'baz')) +--- +test: Mixed Sequences +brief: | + Sequences can contain any YAML data, + including strings and other sequences. +yaml: | + - apple + - + - foo + - bar + - x123 + - banana + - carrot +php: | + array('apple', array('foo', 'bar', 'x123'), 'banana', 'carrot') +--- +test: Deeply Nested Sequences +brief: | + Sequences can be nested even deeper, with each + level of indentation representing a level of + depth. +yaml: | + - + - + - uno + - dos +php: | + array(array(array('uno', 'dos'))) +--- +test: Simple Mapping +brief: | + You can add a keyed list (also known as a dictionary or + hash) to your document by placing each member of the + list on a new line, with a colon separating the key + from its value. In YAML, this type of list is called + a mapping. +yaml: | + foo: whatever + bar: stuff +php: | + array('foo' => 'whatever', 'bar' => 'stuff') +--- +test: Sequence in a Mapping +brief: | + A value in a mapping can be a sequence. +yaml: | + foo: whatever + bar: + - uno + - dos +php: | + array('foo' => 'whatever', 'bar' => array('uno', 'dos')) +--- +test: Nested Mappings +brief: | + A value in a mapping can be another mapping. +yaml: | + foo: whatever + bar: + fruit: apple + name: steve + sport: baseball +php: | + array( + 'foo' => 'whatever', + 'bar' => array( + 'fruit' => 'apple', + 'name' => 'steve', + 'sport' => 'baseball' + ) + ) +--- +test: Mixed Mapping +brief: | + A mapping can contain any assortment + of mappings and sequences as values. +yaml: | + foo: whatever + bar: + - + fruit: apple + name: steve + sport: baseball + - more + - + python: rocks + perl: papers + ruby: scissorses +php: | + array( + 'foo' => 'whatever', + 'bar' => array( + array( + 'fruit' => 'apple', + 'name' => 'steve', + 'sport' => 'baseball' + ), + 'more', + array( + 'python' => 'rocks', + 'perl' => 'papers', + 'ruby' => 'scissorses' + ) + ) + ) +--- +test: Mapping-in-Sequence Shortcut +todo: true +brief: | + If you are adding a mapping to a sequence, you + can place the mapping on the same line as the + dash as a shortcut. +yaml: | + - work on YAML.py: + - work on Store +php: | + array(array('work on YAML.py' => array('work on Store'))) +--- +test: Sequence-in-Mapping Shortcut +todo: true +brief: | + The dash in a sequence counts as indentation, so + you can add a sequence inside of a mapping without + needing spaces as indentation. +yaml: | + allow: + - 'localhost' + - '%.sourceforge.net' + - '%.freepan.org' +php: | + array('allow' => array('localhost', '%.sourceforge.net', '%.freepan.org')) +--- +todo: true +test: Merge key +brief: | + A merge key ('<<') can be used in a mapping to insert other mappings. If + the value associated with the merge key is a mapping, each of its key/value + pairs is inserted into the current mapping. +yaml: | + mapping: + name: Joe + job: Accountant + <<: + age: 38 +php: | + array( + 'mapping' => + array( + 'name' => 'Joe', + 'job' => 'Accountant', + 'age' => 38 + ) + ) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml new file mode 100644 index 0000000000000000000000000000000000000000..f7ca469b40793389ef841852b3889e25ade296b1 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml @@ -0,0 +1,51 @@ +--- +test: One Element Mapping +brief: | + A mapping with one key/value pair +yaml: | + foo: bar +php: | + array('foo' => 'bar') +--- +test: Multi Element Mapping +brief: | + More than one key/value pair +yaml: | + red: baron + white: walls + blue: berries +php: | + array( + 'red' => 'baron', + 'white' => 'walls', + 'blue' => 'berries', + ) +--- +test: Values aligned +brief: | + Often times human editors of documents will align the values even + though YAML emitters generally don't. +yaml: | + red: baron + white: walls + blue: berries +php: | + array( + 'red' => 'baron', + 'white' => 'walls', + 'blue' => 'berries', + ) +--- +test: Colons aligned +brief: | + Spaces can come before the ': ' key/value separator. +yaml: | + red : baron + white : walls + blue : berries +php: | + array( + 'red' => 'baron', + 'white' => 'walls', + 'blue' => 'berries', + ) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.yml new file mode 100644 index 0000000000000000000000000000000000000000..d98810256ec213734803275c99ca56d881f32f78 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.yml @@ -0,0 +1,85 @@ +--- %YAML:1.0 +test: Trailing Document Separator +todo: true +brief: > + You can separate YAML documents + with a string of three dashes. +yaml: | + - foo: 1 + bar: 2 + --- + more: stuff +python: | + [ + [ { 'foo': 1, 'bar': 2 } ], + { 'more': 'stuff' } + ] +ruby: | + [ { 'foo' => 1, 'bar' => 2 } ] + +--- +test: Leading Document Separator +todo: true +brief: > + You can explicitly give an opening + document separator to your YAML stream. +yaml: | + --- + - foo: 1 + bar: 2 + --- + more: stuff +python: | + [ + [ {'foo': 1, 'bar': 2}], + {'more': 'stuff'} + ] +ruby: | + [ { 'foo' => 1, 'bar' => 2 } ] + +--- +test: YAML Header +todo: true +brief: > + The opening separator can contain directives + to the YAML parser, such as the version + number. +yaml: | + --- %YAML:1.0 + foo: 1 + bar: 2 +php: | + array('foo' => 1, 'bar' => 2) +documents: 1 + +--- +test: Red Herring Document Separator +brief: > + Separators included in blocks or strings + are treated as blocks or strings, as the + document separator should have no indentation + preceding it. +yaml: | + foo: | + --- +php: | + array('foo' => "---\n") + +--- +test: Multiple Document Separators in Block +brief: > + This technique allows you to embed other YAML + documents within literal blocks. +yaml: | + foo: | + --- + foo: bar + --- + yo: baz + bar: | + fooness +php: | + array( + 'foo' => "---\nfoo: bar\n---\nyo: baz\n", + 'bar' => "fooness\n" + ) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.yml new file mode 100644 index 0000000000000000000000000000000000000000..e8506fcb66bb31afdced90f8a1277c8828cfab9a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.yml @@ -0,0 +1,25 @@ +--- +test: Missing value for hash item +todo: true +brief: | + Third item in this hash doesn't have a value +yaml: | + okay: value + also okay: ~ + causes error because no value specified + last key: value okay here too +python-error: causes error because no value specified + +--- +test: Not indenting enough +brief: | + There was a bug in PyYaml where it was off by one + in the indentation check. It was allowing the YAML + below. +# This is actually valid YAML now. Someone should tell showell. +yaml: | + foo: + firstline: 1 + secondline: 2 +php: | + array('foo' => null, 'firstline' => 1, 'secondline' => 2) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.yml new file mode 100644 index 0000000000000000000000000000000000000000..03090e4abc40e0fb6e43d66cd6a1b90dabd8e0db --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.yml @@ -0,0 +1,60 @@ +--- +test: Simple Inline Array +brief: > + Sequences can be contained on a + single line, using the inline syntax. + Separate each entry with commas and + enclose in square brackets. +yaml: | + seq: [ a, b, c ] +php: | + array('seq' => array('a', 'b', 'c')) +--- +test: Simple Inline Hash +brief: > + Mapping can also be contained on + a single line, using the inline + syntax. Each key-value pair is + separated by a colon, with a comma + between each entry in the mapping. + Enclose with curly braces. +yaml: | + hash: { name: Steve, foo: bar } +php: | + array('hash' => array('name' => 'Steve', 'foo' => 'bar')) +--- +test: Multi-line Inline Collections +todo: true +brief: > + Both inline sequences and inline mappings + can span multiple lines, provided that you + indent the additional lines. +yaml: | + languages: [ Ruby, + Perl, + Python ] + websites: { YAML: yaml.org, + Ruby: ruby-lang.org, + Python: python.org, + Perl: use.perl.org } +php: | + array( + 'languages' => array('Ruby', 'Perl', 'Python'), + 'websites' => array( + 'YAML' => 'yaml.org', + 'Ruby' => 'ruby-lang.org', + 'Python' => 'python.org', + 'Perl' => 'use.perl.org' + ) + ) +--- +test: Commas in Values (not in the spec!) +todo: true +brief: > + List items in collections are delimited by commas, but + there must be a space after each comma. This allows you + to add numbers without quoting. +yaml: | + attendances: [ 45,123, 70,000, 17,222 ] +php: | + array('attendances' => array(45123, 70000, 17222)) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.yml new file mode 100644 index 0000000000000000000000000000000000000000..a14735a55a507dd9068dad58c29338cb1eddc1b8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.yml @@ -0,0 +1,176 @@ +--- %YAML:1.0 +test: Single ending newline +brief: > + A pipe character, followed by an indented + block of text is treated as a literal + block, in which newlines are preserved + throughout the block, including the final + newline. +yaml: | + --- + this: | + Foo + Bar +php: | + array('this' => "Foo\nBar\n") +--- +test: The '+' indicator +brief: > + The '+' indicator says to keep newlines at the end of text + blocks. +yaml: | + normal: | + extra new lines not kept + + preserving: |+ + extra new lines are kept + + + dummy: value +php: | + array( + 'normal' => "extra new lines not kept\n", + 'preserving' => "extra new lines are kept\n\n\n", + 'dummy' => 'value' + ) +--- +test: Three trailing newlines in literals +brief: > + To give you more control over how space + is preserved in text blocks, YAML has + the keep '+' and chomp '-' indicators. + The keep indicator will preserve all + ending newlines, while the chomp indicator + will strip all ending newlines. +yaml: | + clipped: | + This has one newline. + + + + same as "clipped" above: "This has one newline.\n" + + stripped: |- + This has no newline. + + + + same as "stripped" above: "This has no newline." + + kept: |+ + This has four newlines. + + + + same as "kept" above: "This has four newlines.\n\n\n\n" +php: | + array( + 'clipped' => "This has one newline.\n", + 'same as "clipped" above' => "This has one newline.\n", + 'stripped' => 'This has no newline.', + 'same as "stripped" above' => 'This has no newline.', + 'kept' => "This has four newlines.\n\n\n\n", + 'same as "kept" above' => "This has four newlines.\n\n\n\n" + ) +--- +test: Extra trailing newlines with spaces +todo: true +brief: > + Normally, only a single newline is kept + from the end of a literal block, unless the + keep '+' character is used in combination + with the pipe. The following example + will preserve all ending whitespace + since the last line of both literal blocks + contains spaces which extend past the indentation + level. +yaml: | + --- + this: | + Foo + + + kept: |+ + Foo + + +php: | + array('this' => "Foo\n\n \n", + 'kept' => "Foo\n\n \n" ) + +--- +test: Folded Block in a Sequence +brief: > + A greater-then character, followed by an indented + block of text is treated as a folded block, in + which lines of text separated by a single newline + are concatenated as a single line. +yaml: | + --- + - apple + - banana + - > + can't you see + the beauty of yaml? + hmm + - dog +php: | + array( + 'apple', + 'banana', + "can't you see the beauty of yaml? hmm\n", + 'dog' + ) +--- +test: Folded Block as a Mapping Value +brief: > + Both literal and folded blocks can be + used in collections, as values in a + sequence or a mapping. +yaml: | + --- + quote: > + Mark McGwire's + year was crippled + by a knee injury. + source: espn +php: | + array( + 'quote' => "Mark McGwire's year was crippled by a knee injury.\n", + 'source' => 'espn' + ) +--- +test: Three trailing newlines in folded blocks +brief: > + The keep and chomp indicators can also + be applied to folded blocks. +yaml: | + clipped: > + This has one newline. + + + + same as "clipped" above: "This has one newline.\n" + + stripped: >- + This has no newline. + + + + same as "stripped" above: "This has no newline." + + kept: >+ + This has four newlines. + + + + same as "kept" above: "This has four newlines.\n\n\n\n" +php: | + array( + 'clipped' => "This has one newline.\n", + 'same as "clipped" above' => "This has one newline.\n", + 'stripped' => 'This has no newline.', + 'same as "stripped" above' => 'This has no newline.', + 'kept' => "This has four newlines.\n\n\n\n", + 'same as "kept" above' => "This has four newlines.\n\n\n\n" + ) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml new file mode 100644 index 0000000000000000000000000000000000000000..9a5300f2eff6aa56bd0fd914ad86ecd709207a74 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml @@ -0,0 +1,45 @@ +--- %YAML:1.0 +test: Empty Sequence +brief: > + You can represent the empty sequence + with an empty inline sequence. +yaml: | + empty: [] +php: | + array('empty' => array()) +--- +test: Empty Mapping +brief: > + You can represent the empty mapping + with an empty inline mapping. +yaml: | + empty: {} +php: | + array('empty' => array()) +--- +test: Empty Sequence as Entire Document +yaml: | + [] +php: | + array() +--- +test: Empty Mapping as Entire Document +yaml: | + {} +php: | + array() +--- +test: Null as Document +yaml: | + ~ +php: | + null +--- +test: Empty String +brief: > + You can represent an empty string + with a pair of quotes. +yaml: | + '' +php: | + '' diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml new file mode 100644 index 0000000000000000000000000000000000000000..ac0c69da0af795bee1867683d9b480d146b18eb3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml @@ -0,0 +1,1727 @@ +--- %YAML:1.0 +test: Sequence of scalars +spec: 2.1 +yaml: | + - Mark McGwire + - Sammy Sosa + - Ken Griffey +php: | + array('Mark McGwire', 'Sammy Sosa', 'Ken Griffey') +--- +test: Mapping of scalars to scalars +spec: 2.2 +yaml: | + hr: 65 + avg: 0.278 + rbi: 147 +php: | + array('hr' => 65, 'avg' => 0.278, 'rbi' => 147) +--- +test: Mapping of scalars to sequences +spec: 2.3 +yaml: | + american: + - Boston Red Sox + - Detroit Tigers + - New York Yankees + national: + - New York Mets + - Chicago Cubs + - Atlanta Braves +php: | + array('american' => + array( 'Boston Red Sox', 'Detroit Tigers', + 'New York Yankees' ), + 'national' => + array( 'New York Mets', 'Chicago Cubs', + 'Atlanta Braves' ) + ) +--- +test: Sequence of mappings +spec: 2.4 +yaml: | + - + name: Mark McGwire + hr: 65 + avg: 0.278 + - + name: Sammy Sosa + hr: 63 + avg: 0.288 +php: | + array( + array('name' => 'Mark McGwire', 'hr' => 65, 'avg' => 0.278), + array('name' => 'Sammy Sosa', 'hr' => 63, 'avg' => 0.288) + ) +--- +test: Legacy A5 +todo: true +spec: legacy_A5 +yaml: | + ? + - New York Yankees + - Atlanta Braves + : + - 2001-07-02 + - 2001-08-12 + - 2001-08-14 + ? + - Detroit Tigers + - Chicago Cubs + : + - 2001-07-23 +perl-busted: > + YAML.pm will be able to emulate this behavior soon. In this regard + it may be somewhat more correct than Python's native behaviour which + can only use tuples as mapping keys. PyYAML will also need to figure + out some clever way to roundtrip structured keys. +python: | + [ + { + ('New York Yankees', 'Atlanta Braves'): + [yaml.timestamp('2001-07-02'), + yaml.timestamp('2001-08-12'), + yaml.timestamp('2001-08-14')], + ('Detroit Tigers', 'Chicago Cubs'): + [yaml.timestamp('2001-07-23')] + } + ] +ruby: | + { + [ 'New York Yankees', 'Atlanta Braves' ] => + [ Date.new( 2001, 7, 2 ), Date.new( 2001, 8, 12 ), Date.new( 2001, 8, 14 ) ], + [ 'Detroit Tigers', 'Chicago Cubs' ] => + [ Date.new( 2001, 7, 23 ) ] + } +syck: | + struct test_node seq1[] = { + { T_STR, 0, "New York Yankees" }, + { T_STR, 0, "Atlanta Braves" }, + end_node + }; + struct test_node seq2[] = { + { T_STR, 0, "2001-07-02" }, + { T_STR, 0, "2001-08-12" }, + { T_STR, 0, "2001-08-14" }, + end_node + }; + struct test_node seq3[] = { + { T_STR, 0, "Detroit Tigers" }, + { T_STR, 0, "Chicago Cubs" }, + end_node + }; + struct test_node seq4[] = { + { T_STR, 0, "2001-07-23" }, + end_node + }; + struct test_node map[] = { + { T_SEQ, 0, 0, seq1 }, + { T_SEQ, 0, 0, seq2 }, + { T_SEQ, 0, 0, seq3 }, + { T_SEQ, 0, 0, seq4 }, + end_node + }; + struct test_node stream[] = { + { T_MAP, 0, 0, map }, + end_node + }; + +--- +test: Sequence of sequences +spec: 2.5 +yaml: | + - [ name , hr , avg ] + - [ Mark McGwire , 65 , 0.278 ] + - [ Sammy Sosa , 63 , 0.288 ] +php: | + array( + array( 'name', 'hr', 'avg' ), + array( 'Mark McGwire', 65, 0.278 ), + array( 'Sammy Sosa', 63, 0.288 ) + ) +--- +test: Mapping of mappings +todo: true +spec: 2.6 +yaml: | + Mark McGwire: {hr: 65, avg: 0.278} + Sammy Sosa: { + hr: 63, + avg: 0.288 + } +php: | + array( + 'Mark McGwire' => + array( 'hr' => 65, 'avg' => 0.278 ), + 'Sammy Sosa' => + array( 'hr' => 63, 'avg' => 0.288 ) + ) +--- +test: Two documents in a stream each with a leading comment +todo: true +spec: 2.7 +yaml: | + # Ranking of 1998 home runs + --- + - Mark McGwire + - Sammy Sosa + - Ken Griffey + + # Team ranking + --- + - Chicago Cubs + - St Louis Cardinals +ruby: | + y = YAML::Stream.new + y.add( [ 'Mark McGwire', 'Sammy Sosa', 'Ken Griffey' ] ) + y.add( [ 'Chicago Cubs', 'St Louis Cardinals' ] ) +documents: 2 + +--- +test: Play by play feed from a game +todo: true +spec: 2.8 +yaml: | + --- + time: 20:03:20 + player: Sammy Sosa + action: strike (miss) + ... + --- + time: 20:03:47 + player: Sammy Sosa + action: grand slam + ... +perl: | + [ 'Mark McGwire', 'Sammy Sosa', 'Ken Griffey' ] +documents: 2 + +--- +test: Single document with two comments +spec: 2.9 +yaml: | + hr: # 1998 hr ranking + - Mark McGwire + - Sammy Sosa + rbi: + # 1998 rbi ranking + - Sammy Sosa + - Ken Griffey +php: | + array( + 'hr' => array( 'Mark McGwire', 'Sammy Sosa' ), + 'rbi' => array( 'Sammy Sosa', 'Ken Griffey' ) + ) +--- +test: Node for Sammy Sosa appears twice in this document +spec: 2.10 +yaml: | + --- + hr: + - Mark McGwire + # Following node labeled SS + - &SS Sammy Sosa + rbi: + - *SS # Subsequent occurrence + - Ken Griffey +php: | + array( + 'hr' => + array('Mark McGwire', 'Sammy Sosa'), + 'rbi' => + array('Sammy Sosa', 'Ken Griffey') + ) +--- +test: Mapping between sequences +todo: true +spec: 2.11 +yaml: | + ? # PLAY SCHEDULE + - Detroit Tigers + - Chicago Cubs + : + - 2001-07-23 + + ? [ New York Yankees, + Atlanta Braves ] + : [ 2001-07-02, 2001-08-12, + 2001-08-14 ] +ruby: | + { + [ 'Detroit Tigers', 'Chicago Cubs' ] => [ Date.new( 2001, 7, 23 ) ], + [ 'New York Yankees', 'Atlanta Braves' ] => [ Date.new( 2001, 7, 2 ), Date.new( 2001, 8, 12 ), Date.new( 2001, 8, 14 ) ] + } +syck: | + struct test_node seq1[] = { + { T_STR, 0, "New York Yankees" }, + { T_STR, 0, "Atlanta Braves" }, + end_node + }; + struct test_node seq2[] = { + { T_STR, 0, "2001-07-02" }, + { T_STR, 0, "2001-08-12" }, + { T_STR, 0, "2001-08-14" }, + end_node + }; + struct test_node seq3[] = { + { T_STR, 0, "Detroit Tigers" }, + { T_STR, 0, "Chicago Cubs" }, + end_node + }; + struct test_node seq4[] = { + { T_STR, 0, "2001-07-23" }, + end_node + }; + struct test_node map[] = { + { T_SEQ, 0, 0, seq3 }, + { T_SEQ, 0, 0, seq4 }, + { T_SEQ, 0, 0, seq1 }, + { T_SEQ, 0, 0, seq2 }, + end_node + }; + struct test_node stream[] = { + { T_MAP, 0, 0, map }, + end_node + }; + +--- +test: Sequence key shortcut +spec: 2.12 +yaml: | + --- + # products purchased + - item : Super Hoop + quantity: 1 + - item : Basketball + quantity: 4 + - item : Big Shoes + quantity: 1 +php: | + array ( + array ( + 'item' => 'Super Hoop', + 'quantity' => 1, + ), + array ( + 'item' => 'Basketball', + 'quantity' => 4, + ), + array ( + 'item' => 'Big Shoes', + 'quantity' => 1, + ) + ) +perl: | + [ + { item => 'Super Hoop', quantity => 1 }, + { item => 'Basketball', quantity => 4 }, + { item => 'Big Shoes', quantity => 1 } + ] + +ruby: | + [ + { 'item' => 'Super Hoop', 'quantity' => 1 }, + { 'item' => 'Basketball', 'quantity' => 4 }, + { 'item' => 'Big Shoes', 'quantity' => 1 } + ] +python: | + [ + { 'item': 'Super Hoop', 'quantity': 1 }, + { 'item': 'Basketball', 'quantity': 4 }, + { 'item': 'Big Shoes', 'quantity': 1 } + ] +syck: | + struct test_node map1[] = { + { T_STR, 0, "item" }, + { T_STR, 0, "Super Hoop" }, + { T_STR, 0, "quantity" }, + { T_STR, 0, "1" }, + end_node + }; + struct test_node map2[] = { + { T_STR, 0, "item" }, + { T_STR, 0, "Basketball" }, + { T_STR, 0, "quantity" }, + { T_STR, 0, "4" }, + end_node + }; + struct test_node map3[] = { + { T_STR, 0, "item" }, + { T_STR, 0, "Big Shoes" }, + { T_STR, 0, "quantity" }, + { T_STR, 0, "1" }, + end_node + }; + struct test_node seq[] = { + { T_MAP, 0, 0, map1 }, + { T_MAP, 0, 0, map2 }, + { T_MAP, 0, 0, map3 }, + end_node + }; + struct test_node stream[] = { + { T_SEQ, 0, 0, seq }, + end_node + }; + + +--- +test: Literal perserves newlines +todo: true +spec: 2.13 +yaml: | + # ASCII Art + --- | + \//||\/|| + // || ||_ +perl: | + "\\//||\\/||\n// || ||_\n" +ruby: | + "\\//||\\/||\n// || ||_\n" +python: | + [ + flushLeft( + """ + \//||\/|| + // || ||_ + """ + ) + ] +syck: | + struct test_node stream[] = { + { T_STR, 0, "\\//||\\/||\n// || ||_\n" }, + end_node + }; + +--- +test: Folded treats newlines as a space +todo: true +spec: 2.14 +yaml: | + --- + Mark McGwire's + year was crippled + by a knee injury. +perl: | + "Mark McGwire's year was crippled by a knee injury." +ruby: | + "Mark McGwire's year was crippled by a knee injury." +python: | + [ "Mark McGwire's year was crippled by a knee injury." ] +syck: | + struct test_node stream[] = { + { T_STR, 0, "Mark McGwire's year was crippled by a knee injury." }, + end_node + }; + +--- +test: Newlines preserved for indented and blank lines +todo: true +spec: 2.15 +yaml: | + --- > + Sammy Sosa completed another + fine season with great stats. + + 63 Home Runs + 0.288 Batting Average + + What a year! +perl: | + "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n" +ruby: | + "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n" +python: | + [ + flushLeft( + """ + Sammy Sosa completed another fine season with great stats. + + 63 Home Runs + 0.288 Batting Average + + What a year! + """ + ) + ] +syck: | + struct test_node stream[] = { + { T_STR, 0, "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n" }, + end_node + }; + + +--- +test: Indentation determines scope +spec: 2.16 +yaml: | + name: Mark McGwire + accomplishment: > + Mark set a major league + home run record in 1998. + stats: | + 65 Home Runs + 0.278 Batting Average +php: | + array( + 'name' => 'Mark McGwire', + 'accomplishment' => "Mark set a major league home run record in 1998.\n", + 'stats' => "65 Home Runs\n0.278 Batting Average\n" + ) +--- +test: Quoted scalars +todo: true +spec: 2.17 +yaml: | + unicode: "Sosa did fine.\u263A" + control: "\b1998\t1999\t2000\n" + hexesc: "\x0D\x0A is \r\n" + + single: '"Howdy!" he cried.' + quoted: ' # not a ''comment''.' + tie-fighter: '|\-*-/|' +ruby: | + { + "tie-fighter" => "|\\-*-/|", + "control"=>"\0101998\t1999\t2000\n", + "unicode"=>"Sosa did fine." + ["263A".hex ].pack('U*'), + "quoted"=>" # not a 'comment'.", + "single"=>"\"Howdy!\" he cried.", + "hexesc"=>"\r\n is \r\n" + } +--- +test: Multiline flow scalars +todo: true +spec: 2.18 +yaml: | + plain: + This unquoted scalar + spans many lines. + + quoted: "So does this + quoted scalar.\n" +ruby: | + { + 'plain' => 'This unquoted scalar spans many lines.', + 'quoted' => "So does this quoted scalar.\n" + } +--- +test: Integers +spec: 2.19 +yaml: | + canonical: 12345 + octal: 014 + hexadecimal: 0xC +php: | + array( + 'canonical' => 12345, + 'octal' => 014, + 'hexadecimal' => 0xC + ) +--- +test: Decimal Integer +deprecated: true +spec: 2.19 +yaml: | + decimal: +12,345 +php: | + array( + 'decimal' => 12345.0, + ) +--- +# FIX: spec shows parens around -inf and NaN +test: Floating point +spec: 2.20 +yaml: | + canonical: 1.23015e+3 + exponential: 12.3015e+02 + negative infinity: -.inf + not a number: .NaN + float as whole number: !!float 1 +php: | + array( + 'canonical' => 1230.15, + 'exponential' => 1230.15, + 'negative infinity' => log(0), + 'not a number' => -log(0), + 'float as whole number' => (float) 1 + ) +--- +test: Fixed Floating point +deprecated: true +spec: 2.20 +yaml: | + fixed: 1,230.15 +php: | + array( + 'fixed' => 1230.15, + ) +--- +test: Miscellaneous +spec: 2.21 +yaml: | + null: ~ + true: true + false: false + string: '12345' +php: | + array( + '' => null, + 1 => true, + 0 => false, + 'string' => '12345' + ) +--- +test: Timestamps +todo: true +spec: 2.22 +yaml: | + canonical: 2001-12-15T02:59:43.1Z + iso8601: 2001-12-14t21:59:43.10-05:00 + spaced: 2001-12-14 21:59:43.10 -05:00 + date: 2002-12-14 # Time is noon UTC +php: | + array( + 'canonical' => YAML::mktime( 2001, 12, 15, 2, 59, 43, 0.10 ), + 'iso8601' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), + 'spaced' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), + 'date' => Date.new( 2002, 12, 14 ) + ) +--- +test: legacy Timestamps test +todo: true +spec: legacy D4 +yaml: | + canonical: 2001-12-15T02:59:43.00Z + iso8601: 2001-02-28t21:59:43.00-05:00 + spaced: 2001-12-14 21:59:43.00 -05:00 + date: 2002-12-14 +php: | + array( + 'canonical' => Time::utc( 2001, 12, 15, 2, 59, 43, 0 ), + 'iso8601' => YAML::mktime( 2001, 2, 28, 21, 59, 43, 0, "-05:00" ), + 'spaced' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0, "-05:00" ), + 'date' => Date.new( 2002, 12, 14 ) + ) +--- +test: Various explicit families +todo: true +spec: 2.23 +yaml: | + not-date: !str 2002-04-28 + picture: !binary | + R0lGODlhDAAMAIQAAP//9/X + 17unp5WZmZgAAAOfn515eXv + Pz7Y6OjuDg4J+fn5OTk6enp + 56enmleECcgggoBADs= + + application specific tag: !!something | + The semantics of the tag + above may be different for + different documents. + +ruby-setup: | + YAML.add_private_type( "something" ) do |type, val| + "SOMETHING: #{val}" + end +ruby: | + { + 'not-date' => '2002-04-28', + 'picture' => "GIF89a\f\000\f\000\204\000\000\377\377\367\365\365\356\351\351\345fff\000\000\000\347\347\347^^^\363\363\355\216\216\216\340\340\340\237\237\237\223\223\223\247\247\247\236\236\236i^\020' \202\n\001\000;", + 'application specific tag' => "SOMETHING: The semantics of the tag\nabove may be different for\ndifferent documents.\n" + } +--- +test: Application specific family +todo: true +spec: 2.24 +yaml: | + # Establish a tag prefix + --- !clarkevans.com,2002/graph/^shape + # Use the prefix: shorthand for + # !clarkevans.com,2002/graph/circle + - !^circle + center: &ORIGIN {x: 73, 'y': 129} + radius: 7 + - !^line # !clarkevans.com,2002/graph/line + start: *ORIGIN + finish: { x: 89, 'y': 102 } + - !^label + start: *ORIGIN + color: 0xFFEEBB + value: Pretty vector drawing. +ruby-setup: | + YAML.add_domain_type( "clarkevans.com,2002", 'graph/shape' ) { |type, val| + if Array === val + val << "Shape Container" + val + else + raise YAML::Error, "Invalid graph of class #{ val.class }: " + val.inspect + end + } + one_shape_proc = Proc.new { |type, val| + scheme, domain, type = type.split( /:/, 3 ) + if val.is_a? ::Hash + val['TYPE'] = "Shape: #{type}" + val + else + raise YAML::Error, "Invalid graph of class #{ val.class }: " + val.inspect + end + } + YAML.add_domain_type( "clarkevans.com,2002", 'graph/circle', &one_shape_proc ) + YAML.add_domain_type( "clarkevans.com,2002", 'graph/line', &one_shape_proc ) + YAML.add_domain_type( "clarkevans.com,2002", 'graph/label', &one_shape_proc ) +ruby: | + [ + { + "radius" => 7, + "center"=> + { + "x" => 73, + "y" => 129 + }, + "TYPE" => "Shape: graph/circle" + }, { + "finish" => + { + "x" => 89, + "y" => 102 + }, + "TYPE" => "Shape: graph/line", + "start" => + { + "x" => 73, + "y" => 129 + } + }, { + "TYPE" => "Shape: graph/label", + "value" => "Pretty vector drawing.", + "start" => + { + "x" => 73, + "y" => 129 + }, + "color" => 16772795 + }, + "Shape Container" + ] +# --- +# test: Unordered set +# spec: 2.25 +# yaml: | +# # sets are represented as a +# # mapping where each key is +# # associated with the empty string +# --- !set +# ? Mark McGwire +# ? Sammy Sosa +# ? Ken Griff +--- +test: Ordered mappings +todo: true +spec: 2.26 +yaml: | + # ordered maps are represented as + # a sequence of mappings, with + # each mapping having one key + --- !omap + - Mark McGwire: 65 + - Sammy Sosa: 63 + - Ken Griffy: 58 +ruby: | + YAML::Omap[ + 'Mark McGwire', 65, + 'Sammy Sosa', 63, + 'Ken Griffy', 58 + ] +--- +test: Invoice +dump_skip: true +spec: 2.27 +yaml: | + --- !clarkevans.com,2002/^invoice + invoice: 34843 + date : 2001-01-23 + bill-to: &id001 + given : Chris + family : Dumars + address: + lines: | + 458 Walkman Dr. + Suite #292 + city : Royal Oak + state : MI + postal : 48046 + ship-to: *id001 + product: + - + sku : BL394D + quantity : 4 + description : Basketball + price : 450.00 + - + sku : BL4438H + quantity : 1 + description : Super Hoop + price : 2392.00 + tax : 251.42 + total: 4443.52 + comments: > + Late afternoon is best. + Backup contact is Nancy + Billsmer @ 338-4338. +php: | + array( + 'invoice' => 34843, 'date' => gmmktime(0, 0, 0, 1, 23, 2001), + 'bill-to' => + array( 'given' => 'Chris', 'family' => 'Dumars', 'address' => array( 'lines' => "458 Walkman Dr.\nSuite #292\n", 'city' => 'Royal Oak', 'state' => 'MI', 'postal' => 48046 ) ) + , 'ship-to' => + array( 'given' => 'Chris', 'family' => 'Dumars', 'address' => array( 'lines' => "458 Walkman Dr.\nSuite #292\n", 'city' => 'Royal Oak', 'state' => 'MI', 'postal' => 48046 ) ) + , 'product' => + array( + array( 'sku' => 'BL394D', 'quantity' => 4, 'description' => 'Basketball', 'price' => 450.00 ), + array( 'sku' => 'BL4438H', 'quantity' => 1, 'description' => 'Super Hoop', 'price' => 2392.00 ) + ), + 'tax' => 251.42, 'total' => 4443.52, + 'comments' => "Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.\n" + ) +--- +test: Log file +todo: true +spec: 2.28 +yaml: | + --- + Time: 2001-11-23 15:01:42 -05:00 + User: ed + Warning: > + This is an error message + for the log file + --- + Time: 2001-11-23 15:02:31 -05:00 + User: ed + Warning: > + A slightly different error + message. + --- + Date: 2001-11-23 15:03:17 -05:00 + User: ed + Fatal: > + Unknown variable "bar" + Stack: + - file: TopClass.py + line: 23 + code: | + x = MoreObject("345\n") + - file: MoreClass.py + line: 58 + code: |- + foo = bar +ruby: | + y = YAML::Stream.new + y.add( { 'Time' => YAML::mktime( 2001, 11, 23, 15, 01, 42, 00, "-05:00" ), + 'User' => 'ed', 'Warning' => "This is an error message for the log file\n" } ) + y.add( { 'Time' => YAML::mktime( 2001, 11, 23, 15, 02, 31, 00, "-05:00" ), + 'User' => 'ed', 'Warning' => "A slightly different error message.\n" } ) + y.add( { 'Date' => YAML::mktime( 2001, 11, 23, 15, 03, 17, 00, "-05:00" ), + 'User' => 'ed', 'Fatal' => "Unknown variable \"bar\"\n", + 'Stack' => [ + { 'file' => 'TopClass.py', 'line' => 23, 'code' => "x = MoreObject(\"345\\n\")\n" }, + { 'file' => 'MoreClass.py', 'line' => 58, 'code' => "foo = bar" } ] } ) +documents: 3 + +--- +test: Throwaway comments +yaml: | + ### These are four throwaway comment ### + + ### lines (the second line is empty). ### + this: | # Comments may trail lines. + contains three lines of text. + The third one starts with a + # character. This isn't a comment. + + # These are three throwaway comment + # lines (the first line is empty). +php: | + array( + 'this' => "contains three lines of text.\nThe third one starts with a\n# character. This isn't a comment.\n" + ) +--- +test: Document with a single value +todo: true +yaml: | + --- > + This YAML stream contains a single text value. + The next stream is a log file - a sequence of + log entries. Adding an entry to the log is a + simple matter of appending it at the end. +ruby: | + "This YAML stream contains a single text value. The next stream is a log file - a sequence of log entries. Adding an entry to the log is a simple matter of appending it at the end.\n" +--- +test: Document stream +todo: true +yaml: | + --- + at: 2001-08-12 09:25:00.00 Z + type: GET + HTTP: '1.0' + url: '/index.html' + --- + at: 2001-08-12 09:25:10.00 Z + type: GET + HTTP: '1.0' + url: '/toc.html' +ruby: | + y = YAML::Stream.new + y.add( { + 'at' => Time::utc( 2001, 8, 12, 9, 25, 00 ), + 'type' => 'GET', + 'HTTP' => '1.0', + 'url' => '/index.html' + } ) + y.add( { + 'at' => Time::utc( 2001, 8, 12, 9, 25, 10 ), + 'type' => 'GET', + 'HTTP' => '1.0', + 'url' => '/toc.html' + } ) +documents: 2 + +--- +test: Top level mapping +yaml: | + # This stream is an example of a top-level mapping. + invoice : 34843 + date : 2001-01-23 + total : 4443.52 +php: | + array( + 'invoice' => 34843, + 'date' => gmmktime(0, 0, 0, 1, 23, 2001), + 'total' => 4443.52 + ) +--- +test: Single-line documents +todo: true +yaml: | + # The following is a sequence of three documents. + # The first contains an empty mapping, the second + # an empty sequence, and the last an empty string. + --- {} + --- [ ] + --- '' +ruby: | + y = YAML::Stream.new + y.add( {} ) + y.add( [] ) + y.add( '' ) +documents: 3 + +--- +test: Document with pause +todo: true +yaml: | + # A communication channel based on a YAML stream. + --- + sent at: 2002-06-06 11:46:25.10 Z + payload: Whatever + # Receiver can process this as soon as the following is sent: + ... + # Even if the next message is sent long after: + --- + sent at: 2002-06-06 12:05:53.47 Z + payload: Whatever + ... +ruby: | + y = YAML::Stream.new + y.add( + { 'sent at' => YAML::mktime( 2002, 6, 6, 11, 46, 25, 0.10 ), + 'payload' => 'Whatever' } + ) + y.add( + { "payload" => "Whatever", "sent at" => YAML::mktime( 2002, 6, 6, 12, 5, 53, 0.47 ) } + ) +documents: 2 + +--- +test: Explicit typing +yaml: | + integer: 12 + also int: ! "12" + string: !str 12 +php: | + array( 'integer' => 12, 'also int' => 12, 'string' => '12' ) +--- +test: Private types +todo: true +yaml: | + # Both examples below make use of the 'x-private:ball' + # type family URI, but with different semantics. + --- + pool: !!ball + number: 8 + color: black + --- + bearing: !!ball + material: steel +ruby: | + y = YAML::Stream.new + y.add( { 'pool' => + YAML::PrivateType.new( 'ball', + { 'number' => 8, 'color' => 'black' } ) } + ) + y.add( { 'bearing' => + YAML::PrivateType.new( 'ball', + { 'material' => 'steel' } ) } + ) +documents: 2 + +--- +test: Type family under yaml.org +yaml: | + # The URI is 'tag:yaml.org,2002:str' + - !str a Unicode string +php: | + array( 'a Unicode string' ) +--- +test: Type family under perl.yaml.org +todo: true +yaml: | + # The URI is 'tag:perl.yaml.org,2002:Text::Tabs' + - !perl/Text::Tabs {} +ruby: | + [ YAML::DomainType.new( 'perl.yaml.org,2002', 'Text::Tabs', {} ) ] +--- +test: Type family under clarkevans.com +todo: true +yaml: | + # The URI is 'tag:clarkevans.com,2003-02:timesheet' + - !clarkevans.com,2003-02/timesheet {} +ruby: | + [ YAML::DomainType.new( 'clarkevans.com,2003-02', 'timesheet', {} ) ] +--- +test: URI Escaping +todo: true +yaml: | + same: + - !domain.tld,2002/type\x30 value + - !domain.tld,2002/type0 value + different: # As far as the YAML parser is concerned + - !domain.tld,2002/type%30 value + - !domain.tld,2002/type0 value +ruby-setup: | + YAML.add_domain_type( "domain.tld,2002", "type0" ) { |type, val| + "ONE: #{val}" + } + YAML.add_domain_type( "domain.tld,2002", "type%30" ) { |type, val| + "TWO: #{val}" + } +ruby: | + { 'same' => [ 'ONE: value', 'ONE: value' ], 'different' => [ 'TWO: value', 'ONE: value' ] } +--- +test: URI Prefixing +todo: true +yaml: | + # 'tag:domain.tld,2002:invoice' is some type family. + invoice: !domain.tld,2002/^invoice + # 'seq' is shorthand for 'tag:yaml.org,2002:seq'. + # This does not effect '^customer' below + # because it is does not specify a prefix. + customers: !seq + # '^customer' is shorthand for the full + # notation 'tag:domain.tld,2002:customer'. + - !^customer + given : Chris + family : Dumars +ruby-setup: | + YAML.add_domain_type( "domain.tld,2002", /(invoice|customer)/ ) { |type, val| + if val.is_a? ::Hash + scheme, domain, type = type.split( /:/, 3 ) + val['type'] = "domain #{type}" + val + else + raise YAML::Error, "Not a Hash in domain.tld/invoice: " + val.inspect + end + } +ruby: | + { "invoice"=> { "customers"=> [ { "given"=>"Chris", "type"=>"domain customer", "family"=>"Dumars" } ], "type"=>"domain invoice" } } + +--- +test: Overriding anchors +yaml: | + anchor : &A001 This scalar has an anchor. + override : &A001 > + The alias node below is a + repeated use of this value. + alias : *A001 +php: | + array( 'anchor' => 'This scalar has an anchor.', + 'override' => "The alias node below is a repeated use of this value.\n", + 'alias' => "The alias node below is a repeated use of this value.\n" ) +--- +test: Flow and block formatting +todo: true +yaml: | + empty: [] + flow: [ one, two, three # May span lines, + , four, # indentation is + five ] # mostly ignored. + block: + - First item in top sequence + - + - Subordinate sequence entry + - > + A folded sequence entry + - Sixth item in top sequence +ruby: | + { 'empty' => [], 'flow' => [ 'one', 'two', 'three', 'four', 'five' ], + 'block' => [ 'First item in top sequence', [ 'Subordinate sequence entry' ], + "A folded sequence entry\n", 'Sixth item in top sequence' ] } +--- +test: Complete mapping test +todo: true +yaml: | + empty: {} + flow: { one: 1, two: 2 } + spanning: { one: 1, + two: 2 } + block: + first : First entry + second: + key: Subordinate mapping + third: + - Subordinate sequence + - { } + - Previous mapping is empty. + - A key: value pair in a sequence. + A second: key:value pair. + - The previous entry is equal to the following one. + - + A key: value pair in a sequence. + A second: key:value pair. + !float 12 : This key is a float. + ? > + ? + : This key had to be protected. + "\a" : This key had to be escaped. + ? > + This is a + multi-line + folded key + : Whose value is + also multi-line. + ? this also works as a key + : with a value at the next line. + ? + - This key + - is a sequence + : + - With a sequence value. + ? + This: key + is a: mapping + : + with a: mapping value. +ruby: | + { 'empty' => {}, 'flow' => { 'one' => 1, 'two' => 2 }, + 'spanning' => { 'one' => 1, 'two' => 2 }, + 'block' => { 'first' => 'First entry', 'second' => + { 'key' => 'Subordinate mapping' }, 'third' => + [ 'Subordinate sequence', {}, 'Previous mapping is empty.', + { 'A key' => 'value pair in a sequence.', 'A second' => 'key:value pair.' }, + 'The previous entry is equal to the following one.', + { 'A key' => 'value pair in a sequence.', 'A second' => 'key:value pair.' } ], + 12.0 => 'This key is a float.', "?\n" => 'This key had to be protected.', + "\a" => 'This key had to be escaped.', + "This is a multi-line folded key\n" => "Whose value is also multi-line.", + 'this also works as a key' => 'with a value at the next line.', + [ 'This key', 'is a sequence' ] => [ 'With a sequence value.' ] } } + # Couldn't recreate map exactly, so we'll do a detailed check to be sure it's entact + obj_y['block'].keys.each { |k| + if Hash === k + v = obj_y['block'][k] + if k['This'] == 'key' and k['is a'] == 'mapping' and v['with a'] == 'mapping value.' + obj_r['block'][k] = v + end + end + } +--- +test: Literal explicit indentation +yaml: | + # Explicit indentation must + # be given in all the three + # following cases. + leading spaces: |2 + This value starts with four spaces. + + leading line break: |2 + + This value starts with a line break. + + leading comment indicator: |2 + # first line starts with a + # character. + + # Explicit indentation may + # also be given when it is + # not required. + redundant: |2 + This value is indented 2 spaces. +php: | + array( + 'leading spaces' => " This value starts with four spaces.\n", + 'leading line break' => "\nThis value starts with a line break.\n", + 'leading comment indicator' => "# first line starts with a\n# character.\n", + 'redundant' => "This value is indented 2 spaces.\n" + ) +--- +test: Chomping and keep modifiers +yaml: | + clipped: | + This has one newline. + + same as "clipped" above: "This has one newline.\n" + + stripped: |- + This has no newline. + + same as "stripped" above: "This has no newline." + + kept: |+ + This has two newlines. + + same as "kept" above: "This has two newlines.\n\n" +php: | + array( + 'clipped' => "This has one newline.\n", + 'same as "clipped" above' => "This has one newline.\n", + 'stripped' => 'This has no newline.', + 'same as "stripped" above' => 'This has no newline.', + 'kept' => "This has two newlines.\n\n", + 'same as "kept" above' => "This has two newlines.\n\n" + ) +--- +test: Literal combinations +todo: true +yaml: | + empty: | + + literal: | + The \ ' " characters may be + freely used. Leading white + space is significant. + + Line breaks are significant. + Thus this value contains one + empty line and ends with a + single line break, but does + not start with one. + + is equal to: "The \\ ' \" characters may \ + be\nfreely used. Leading white\n space \ + is significant.\n\nLine breaks are \ + significant.\nThus this value contains \ + one\nempty line and ends with a\nsingle \ + line break, but does\nnot start with one.\n" + + # Comments may follow a block + # scalar value. They must be + # less indented. + + # Modifiers may be combined in any order. + indented and chomped: |2- + This has no newline. + + also written as: |-2 + This has no newline. + + both are equal to: " This has no newline." +php: | + array( + 'empty' => '', + 'literal' => "The \\ ' \" characters may be\nfreely used. Leading white\n space " + + "is significant.\n\nLine breaks are significant.\nThus this value contains one\n" + + "empty line and ends with a\nsingle line break, but does\nnot start with one.\n", + 'is equal to' => "The \\ ' \" characters may be\nfreely used. Leading white\n space " + + "is significant.\n\nLine breaks are significant.\nThus this value contains one\n" + + "empty line and ends with a\nsingle line break, but does\nnot start with one.\n", + 'indented and chomped' => ' This has no newline.', + 'also written as' => ' This has no newline.', + 'both are equal to' => ' This has no newline.' + ) +--- +test: Folded combinations +todo: true +yaml: | + empty: > + + one paragraph: > + Line feeds are converted + to spaces, so this value + contains no line breaks + except for the final one. + + multiple paragraphs: >2 + + An empty line, either + at the start or in + the value: + + Is interpreted as a + line break. Thus this + value contains three + line breaks. + + indented text: > + This is a folded + paragraph followed + by a list: + * first entry + * second entry + Followed by another + folded paragraph, + another list: + + * first entry + + * second entry + + And a final folded + paragraph. + + above is equal to: | + This is a folded paragraph followed by a list: + * first entry + * second entry + Followed by another folded paragraph, another list: + + * first entry + + * second entry + + And a final folded paragraph. + + # Explicit comments may follow + # but must be less indented. +php: | + array( + 'empty' => '', + 'one paragraph' => 'Line feeds are converted to spaces, so this value'. + " contains no line breaks except for the final one.\n", + 'multiple paragraphs' => "\nAn empty line, either at the start or in the value:\n". + "Is interpreted as a line break. Thus this value contains three line breaks.\n", + 'indented text' => "This is a folded paragraph followed by a list:\n". + " * first entry\n * second entry\nFollowed by another folded paragraph, ". + "another list:\n\n * first entry\n\n * second entry\n\nAnd a final folded paragraph.\n", + 'above is equal to' => "This is a folded paragraph followed by a list:\n". + " * first entry\n * second entry\nFollowed by another folded paragraph, ". + "another list:\n\n * first entry\n\n * second entry\n\nAnd a final folded paragraph.\n" + ) +--- +test: Single quotes +todo: true +yaml: | + empty: '' + second: '! : \ etc. can be used freely.' + third: 'a single quote '' must be escaped.' + span: 'this contains + six spaces + + and one + line break' + is same as: "this contains six spaces\nand one line break" +php: | + array( + 'empty' => '', + 'second' => '! : \\ etc. can be used freely.', + 'third' => "a single quote ' must be escaped.", + 'span' => "this contains six spaces\nand one line break", + 'is same as' => "this contains six spaces\nand one line break" + ) +--- +test: Double quotes +todo: true +yaml: | + empty: "" + second: "! : etc. can be used freely." + third: "a \" or a \\ must be escaped." + fourth: "this value ends with an LF.\n" + span: "this contains + four \ + spaces" + is equal to: "this contains four spaces" +php: | + array( + 'empty' => '', + 'second' => '! : etc. can be used freely.', + 'third' => 'a " or a \\ must be escaped.', + 'fourth' => "this value ends with an LF.\n", + 'span' => "this contains four spaces", + 'is equal to' => "this contains four spaces" + ) +--- +test: Unquoted strings +todo: true +yaml: | + first: There is no unquoted empty string. + + second: 12 ## This is an integer. + + third: !str 12 ## This is a string. + + span: this contains + six spaces + + and one + line break + + indicators: this has no comments. + #:foo and bar# are + both text. + + flow: [ can span + lines, # comment + like + this ] + + note: { one-line keys: but multi-line values } + +php: | + array( + 'first' => 'There is no unquoted empty string.', + 'second' => 12, + 'third' => '12', + 'span' => "this contains six spaces\nand one line break", + 'indicators' => "this has no comments. #:foo and bar# are both text.", + 'flow' => [ 'can span lines', 'like this' ], + 'note' => { 'one-line keys' => 'but multi-line values' } + ) +--- +test: Spanning sequences +todo: true +yaml: | + # The following are equal seqs + # with different identities. + flow: [ one, two ] + spanning: [ one, + two ] + block: + - one + - two +php: | + array( + 'flow' => [ 'one', 'two' ], + 'spanning' => [ 'one', 'two' ], + 'block' => [ 'one', 'two' ] + ) +--- +test: Flow mappings +yaml: | + # The following are equal maps + # with different identities. + flow: { one: 1, two: 2 } + block: + one: 1 + two: 2 +php: | + array( + 'flow' => array( 'one' => 1, 'two' => 2 ), + 'block' => array( 'one' => 1, 'two' => 2 ) + ) +--- +test: Representations of 12 +todo: true +yaml: | + - 12 # An integer + # The following scalars + # are loaded to the + # string value '1' '2'. + - !str 12 + - '12' + - "12" + - "\ + 1\ + 2\ + " + # Strings containing paths and regexps can be unquoted: + - /foo/bar + - d:/foo/bar + - foo/bar + - /a.*b/ +php: | + array( 12, '12', '12', '12', '12', '/foo/bar', 'd:/foo/bar', 'foo/bar', '/a.*b/' ) +--- +test: "Null" +todo: true +yaml: | + canonical: ~ + + english: null + + # This sequence has five + # entries, two with values. + sparse: + - ~ + - 2nd entry + - Null + - 4th entry + - + + four: This mapping has five keys, + only two with values. + +php: | + array ( + 'canonical' => null, + 'english' => null, + 'sparse' => array( null, '2nd entry', null, '4th entry', null ]), + 'four' => 'This mapping has five keys, only two with values.' + ) +--- +test: Omap +todo: true +yaml: | + # Explicitly typed dictionary. + Bestiary: !omap + - aardvark: African pig-like ant eater. Ugly. + - anteater: South-American ant eater. Two species. + - anaconda: South-American constrictor snake. Scary. + # Etc. +ruby: | + { + 'Bestiary' => YAML::Omap[ + 'aardvark', 'African pig-like ant eater. Ugly.', + 'anteater', 'South-American ant eater. Two species.', + 'anaconda', 'South-American constrictor snake. Scary.' + ] + } + +--- +test: Pairs +todo: true +yaml: | + # Explicitly typed pairs. + tasks: !pairs + - meeting: with team. + - meeting: with boss. + - break: lunch. + - meeting: with client. +ruby: | + { + 'tasks' => YAML::Pairs[ + 'meeting', 'with team.', + 'meeting', 'with boss.', + 'break', 'lunch.', + 'meeting', 'with client.' + ] + } + +--- +test: Set +todo: true +yaml: | + # Explicitly typed set. + baseball players: !set + Mark McGwire: + Sammy Sosa: + Ken Griffey: +ruby: | + { + 'baseball players' => YAML::Set[ + 'Mark McGwire', nil, + 'Sammy Sosa', nil, + 'Ken Griffey', nil + ] + } + +--- +test: Boolean +yaml: | + false: used as key + logical: true + answer: false +php: | + array( + false => 'used as key', + 'logical' => true, + 'answer' => false + ) +--- +test: Integer +yaml: | + canonical: 12345 + octal: 014 + hexadecimal: 0xC +php: | + array( + 'canonical' => 12345, + 'octal' => 12, + 'hexadecimal' => 12 + ) +--- +test: Decimal +deprecated: true +yaml: | + decimal: +12,345 +php: | + array( + 'decimal' => 12345.0, + ) +--- +test: Fixed Float +deprecated: true +yaml: | + fixed: 1,230.15 +php: | + array( + 'fixed' => 1230.15, + ) +--- +test: Float +yaml: | + canonical: 1.23015e+3 + exponential: 12.3015e+02 + negative infinity: -.inf + not a number: .NaN +php: | + array( + 'canonical' => 1230.15, + 'exponential' => 1230.15, + 'negative infinity' => log(0), + 'not a number' => -log(0) + ) +--- +test: Timestamp +todo: true +yaml: | + canonical: 2001-12-15T02:59:43.1Z + valid iso8601: 2001-12-14t21:59:43.10-05:00 + space separated: 2001-12-14 21:59:43.10 -05:00 + date (noon UTC): 2002-12-14 +ruby: | + array( + 'canonical' => YAML::mktime( 2001, 12, 15, 2, 59, 43, 0.10 ), + 'valid iso8601' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), + 'space separated' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), + 'date (noon UTC)' => Date.new( 2002, 12, 14 ) + ) +--- +test: Binary +todo: true +yaml: | + canonical: !binary "\ + R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\ + OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\ + +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\ + AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=" + base64: !binary | + R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5 + OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+ + +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC + AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs= + description: > + The binary value above is a tiny arrow + encoded as a gif image. +ruby-setup: | + arrow_gif = "GIF89a\f\000\f\000\204\000\000\377\377\367\365\365\356\351\351\345fff\000\000\000\347\347\347^^^\363\363\355\216\216\216\340\340\340\237\237\237\223\223\223\247\247\247\236\236\236iiiccc\243\243\243\204\204\204\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371!\376\016Made with GIMP\000,\000\000\000\000\f\000\f\000\000\005, \216\2010\236\343@\024\350i\020\304\321\212\010\034\317\200M$z\357\3770\205p\270\2601f\r\e\316\001\303\001\036\020' \202\n\001\000;" +ruby: | + { + 'canonical' => arrow_gif, + 'base64' => arrow_gif, + 'description' => "The binary value above is a tiny arrow encoded as a gif image.\n" + } + +--- +test: Merge key +todo: true +yaml: | + --- + - &CENTER { x: 1, y: 2 } + - &LEFT { x: 0, y: 2 } + - &BIG { r: 10 } + - &SMALL { r: 1 } + + # All the following maps are equal: + + - # Explicit keys + x: 1 + y: 2 + r: 10 + label: center/big + + - # Merge one map + << : *CENTER + r: 10 + label: center/big + + - # Merge multiple maps + << : [ *CENTER, *BIG ] + label: center/big + + - # Override + << : [ *BIG, *LEFT, *SMALL ] + x: 1 + label: center/big + +ruby-setup: | + center = { 'x' => 1, 'y' => 2 } + left = { 'x' => 0, 'y' => 2 } + big = { 'r' => 10 } + small = { 'r' => 1 } + node1 = { 'x' => 1, 'y' => 2, 'r' => 10, 'label' => 'center/big' } + node2 = center.dup + node2.update( { 'r' => 10, 'label' => 'center/big' } ) + node3 = big.dup + node3.update( center ) + node3.update( { 'label' => 'center/big' } ) + node4 = small.dup + node4.update( left ) + node4.update( big ) + node4.update( { 'x' => 1, 'label' => 'center/big' } ) + +ruby: | + [ + center, left, big, small, node1, node2, node3, node4 + ] + +--- +test: Default key +todo: true +yaml: | + --- # Old schema + link with: + - library1.dll + - library2.dll + --- # New schema + link with: + - = : library1.dll + version: 1.2 + - = : library2.dll + version: 2.3 +ruby: | + y = YAML::Stream.new + y.add( { 'link with' => [ 'library1.dll', 'library2.dll' ] } ) + obj_h = Hash[ 'version' => 1.2 ] + obj_h.default = 'library1.dll' + obj_h2 = Hash[ 'version' => 2.3 ] + obj_h2.default = 'library2.dll' + y.add( { 'link with' => [ obj_h, obj_h2 ] } ) +documents: 2 + +--- +test: Special keys +todo: true +yaml: | + "!": These three keys + "&": had to be quoted + "=": and are normal strings. + # NOTE: the following node should NOT be serialized this way. + encoded node : + !special '!' : '!type' + !special|canonical '&' : 12 + = : value + # The proper way to serialize the above node is as follows: + node : !!type &12 value +ruby: | + { '!' => 'These three keys', '&' => 'had to be quoted', + '=' => 'and are normal strings.', + 'encoded node' => YAML::PrivateType.new( 'type', 'value' ), + 'node' => YAML::PrivateType.new( 'type', 'value' ) } diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.yml new file mode 100644 index 0000000000000000000000000000000000000000..8fefa494cfb20bdbf3e712adcb4c500a70ad7708 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.yml @@ -0,0 +1,280 @@ +--- %YAML:1.0 +test: Strings +brief: > + Any group of characters beginning with an + alphabetic or numeric character is a string, + unless it belongs to one of the groups below + (such as an Integer or Time). +yaml: | + String +php: | + 'String' +--- +test: String characters +brief: > + A string can contain any alphabetic or + numeric character, along with many + punctuation characters, including the + period, dash, space, quotes, exclamation, and + question mark. +yaml: | + - What's Yaml? + - It's for writing data structures in plain text. + - And? + - And what? That's not good enough for you? + - No, I mean, "And what about Yaml?" + - Oh, oh yeah. Uh.. Yaml for Ruby. +php: | + array( + "What's Yaml?", + "It's for writing data structures in plain text.", + "And?", + "And what? That's not good enough for you?", + "No, I mean, \"And what about Yaml?\"", + "Oh, oh yeah. Uh.. Yaml for Ruby." + ) +--- +test: Indicators in Strings +brief: > + Be careful using indicators in strings. In particular, + the comma, colon, and pound sign must be used carefully. +yaml: | + the colon followed by space is an indicator: but is a string:right here + same for the pound sign: here we have it#in a string + the comma can, honestly, be used in most cases: [ but not in, inline collections ] +php: | + array( + 'the colon followed by space is an indicator' => 'but is a string:right here', + 'same for the pound sign' => 'here we have it#in a string', + 'the comma can, honestly, be used in most cases' => array('but not in', 'inline collections') + ) +--- +test: Forcing Strings +brief: > + Any YAML type can be forced into a string using the + explicit !str method. +yaml: | + date string: !str 2001-08-01 + number string: !str 192 +php: | + array( + 'date string' => '2001-08-01', + 'number string' => '192' + ) +--- +test: Single-quoted Strings +brief: > + You can also enclose your strings within single quotes, + which allows use of slashes, colons, and other indicators + freely. Inside single quotes, you can represent a single + quote in your string by using two single quotes next to + each other. +yaml: | + all my favorite symbols: '#:!/%.)' + a few i hate: '&(*' + why do i hate them?: 'it''s very hard to explain' + entities: '£ me' +php: | + array( + 'all my favorite symbols' => '#:!/%.)', + 'a few i hate' => '&(*', + 'why do i hate them?' => 'it\'s very hard to explain', + 'entities' => '£ me' + ) +--- +test: Double-quoted Strings +brief: > + Enclosing strings in double quotes allows you + to use escapings to represent ASCII and + Unicode characters. +yaml: | + i know where i want my line breaks: "one here\nand another here\n" +php: | + array( + 'i know where i want my line breaks' => "one here\nand another here\n" + ) +--- +test: Multi-line Quoted Strings +todo: true +brief: > + Both single- and double-quoted strings may be + carried on to new lines in your YAML document. + They must be indented a step and indentation + is interpreted as a single space. +yaml: | + i want a long string: "so i'm going to + let it go on and on to other lines + until i end it with a quote." +php: | + array('i want a long string' => "so i'm going to ". + "let it go on and on to other lines ". + "until i end it with a quote." + ) + +--- +test: Plain scalars +todo: true +brief: > + Unquoted strings may also span multiple lines, if they + are free of YAML space indicators and indented. +yaml: | + - My little toe is broken in two places; + - I'm crazy to have skied this way; + - I'm not the craziest he's seen, since there was always the German guy + who skied for 3 hours on a broken shin bone (just below the kneecap); + - Nevertheless, second place is respectable, and he doesn't + recommend going for the record; + - He's going to put my foot in plaster for a month; + - This would impair my skiing ability somewhat for the + duration, as can be imagined. +php: | + array( + "My little toe is broken in two places;", + "I'm crazy to have skied this way;", + "I'm not the craziest he's seen, since there was always ". + "the German guy who skied for 3 hours on a broken shin ". + "bone (just below the kneecap);", + "Nevertheless, second place is respectable, and he doesn't ". + "recommend going for the record;", + "He's going to put my foot in plaster for a month;", + "This would impair my skiing ability somewhat for the duration, ". + "as can be imagined." + ) +--- +test: 'Null' +brief: > + You can use the tilde '~' character for a null value. +yaml: | + name: Mr. Show + hosted by: Bob and David + date of next season: ~ +php: | + array( + 'name' => 'Mr. Show', + 'hosted by' => 'Bob and David', + 'date of next season' => null + ) +--- +test: Boolean +brief: > + You can use 'true' and 'false' for Boolean values. +yaml: | + Is Gus a Liar?: true + Do I rely on Gus for Sustenance?: false +php: | + array( + 'Is Gus a Liar?' => true, + 'Do I rely on Gus for Sustenance?' => false + ) +--- +test: Integers +dump_skip: true +brief: > + An integer is a series of numbers, optionally + starting with a positive or negative sign. Integers + may also contain commas for readability. +yaml: | + zero: 0 + simple: 12 +php: | + array( + 'zero' => 0, + 'simple' => 12, + ) +--- +test: Positive Big Integer +deprecated: true +dump_skip: true +brief: > + An integer is a series of numbers, optionally + starting with a positive or negative sign. Integers + may also contain commas for readability. +yaml: | + one-thousand: 1,000 +php: | + array( + 'one-thousand' => 1000.0, + ) +--- +test: Negative Big Integer +deprecated: true +dump_skip: true +brief: > + An integer is a series of numbers, optionally + starting with a positive or negative sign. Integers + may also contain commas for readability. +yaml: | + negative one-thousand: -1,000 +php: | + array( + 'negative one-thousand' => -1000.0 + ) +--- +test: Integers as Map Keys +brief: > + An integer can be used a dictionary key. +yaml: | + 1: one + 2: two + 3: three +php: | + array( + 1 => 'one', + 2 => 'two', + 3 => 'three' + ) +--- +test: Floats +dump_skip: true +brief: > + Floats are represented by numbers with decimals, + allowing for scientific notation, as well as + positive and negative infinity and "not a number." +yaml: | + a simple float: 2.00 + scientific notation: 1.00009e+3 +php: | + array( + 'a simple float' => 2.0, + 'scientific notation' => 1000.09 + ) +--- +test: Larger Float +dump_skip: true +deprecated: true +brief: > + Floats are represented by numbers with decimals, + allowing for scientific notation, as well as + positive and negative infinity and "not a number." +yaml: | + larger float: 1,000.09 +php: | + array( + 'larger float' => 1000.09, + ) +--- +test: Time +todo: true +brief: > + You can represent timestamps by using + ISO8601 format, or a variation which + allows spaces between the date, time and + time zone. +yaml: | + iso8601: 2001-12-14t21:59:43.10-05:00 + space separated: 2001-12-14 21:59:43.10 -05:00 +php: | + array( + 'iso8601' => mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), + 'space separated' => mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ) + ) +--- +test: Date +todo: true +brief: > + A date can be represented by its year, + month and day in ISO8601 order. +yaml: | + 1976-07-31 +php: | + date( 1976, 7, 31 ) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/arrow.gif b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/arrow.gif new file mode 100644 index 0000000000000000000000000000000000000000..443aca422f7624b271903e5fbb577c7f99786c0e Binary files /dev/null and b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/arrow.gif differ diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml new file mode 100644 index 0000000000000000000000000000000000000000..ec456ed09fb38097b0fa6e0a7d9fdd61c37637f3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml @@ -0,0 +1 @@ +value: diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml new file mode 100644 index 0000000000000000000000000000000000000000..6ca044c8da1b63cc3ea2715fe282b2c1ab5702f8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml @@ -0,0 +1,155 @@ +test: outside double quotes +yaml: | + \0 \ \a \b \n +php: | + "\\0 \\ \\a \\b \\n" +--- +test: null +yaml: | + "\0" +php: | + "\x00" +--- +test: bell +yaml: | + "\a" +php: | + "\x07" +--- +test: backspace +yaml: | + "\b" +php: | + "\x08" +--- +test: horizontal tab (1) +yaml: | + "\t" +php: | + "\x09" +--- +test: horizontal tab (2) +yaml: | + "\ " +php: | + "\x09" +--- +test: line feed +yaml: | + "\n" +php: | + "\x0a" +--- +test: vertical tab +yaml: | + "\v" +php: | + "\x0b" +--- +test: form feed +yaml: | + "\f" +php: | + "\x0c" +--- +test: carriage return +yaml: | + "\r" +php: | + "\x0d" +--- +test: escape +yaml: | + "\e" +php: | + "\x1b" +--- +test: space +yaml: | + "\ " +php: | + "\x20" +--- +test: slash +yaml: | + "\/" +php: | + "\x2f" +--- +test: backslash +yaml: | + "\\" +php: | + "\\" +--- +test: Unicode next line +yaml: | + "\N" +php: | + "\xc2\x85" +--- +test: Unicode non-breaking space +yaml: | + "\_" +php: | + "\xc2\xa0" +--- +test: Unicode line separator +yaml: | + "\L" +php: | + "\xe2\x80\xa8" +--- +test: Unicode paragraph separator +yaml: | + "\P" +php: | + "\xe2\x80\xa9" +--- +test: Escaped 8-bit Unicode +yaml: | + "\x42" +php: | + "B" +--- +test: Escaped 16-bit Unicode +yaml: | + "\u20ac" +php: | + "\xe2\x82\xac" +--- +test: Escaped 32-bit Unicode +yaml: | + "\U00000043" +php: | + "C" +--- +test: Example 5.13 Escaped Characters +note: | + Currently throws an error parsing first line. Maybe Symfony Yaml doesn't support + continuation of string across multiple lines? Keeping test here but disabled. +todo: true +yaml: | + "Fun with \\ + \" \a \b \e \f \ + \n \r \t \v \0 \ + \ \_ \N \L \P \ + \x41 \u0041 \U00000041" +php: | + "Fun with \x5C\n\x22 \x07 \x08 \x1B \x0C\n\x0A \x0D \x09 \x0B \x00\n\x20 \xA0 \x85 \xe2\x80\xa8 \xe2\x80\xa9\nA A A" +--- +test: Double quotes with a line feed +yaml: | + { double: "some value\n \"some quoted string\" and 'some single quotes one'" } +php: | + array( + 'double' => "some value\n \"some quoted string\" and 'some single quotes one'" + ) +--- +test: Backslashes +yaml: | + { single: 'foo\Var', no-quotes: foo\Var, double: "foo\\Var" } +php: | + array( + 'single' => 'foo\Var', 'no-quotes' => 'foo\Var', 'double' => 'foo\Var' + ) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/index.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/index.yml new file mode 100644 index 0000000000000000000000000000000000000000..3216a89ebbc392af1fc2e86ac5aae4bfa3e3e864 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/index.yml @@ -0,0 +1,18 @@ +- escapedCharacters +- sfComments +- sfCompact +- sfTests +- sfObjects +- sfMergeKey +- sfQuotes +- YtsAnchorAlias +- YtsBasicTests +- YtsBlockMapping +- YtsDocumentSeparator +- YtsErrorTests +- YtsFlowCollections +- YtsFoldedScalars +- YtsNullsAndEmpties +- YtsSpecificationExamples +- YtsTypeTransfers +- unindentedCollections diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/multiple_lines_as_literal_block.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/multiple_lines_as_literal_block.yml new file mode 100644 index 0000000000000000000000000000000000000000..b4903d30a11c073dc8da5704d87a47600c2d3f4d --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/multiple_lines_as_literal_block.yml @@ -0,0 +1,13 @@ +data: + single_line: 'foo bar baz' + multi_line: | + foo + line with trailing spaces: + + bar + integer like line: + 123456789 + empty line: + + baz + nested_inlined_multi_line_string: { inlined_multi_line: "foo\nbar\r\nempty line:\n\nbaz" } diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml new file mode 100644 index 0000000000000000000000000000000000000000..b72a9b6996565eaba0a725b596e64d526c542986 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml @@ -0,0 +1,76 @@ +--- %YAML:1.0 +test: Comments at the end of a line +brief: > + Comments at the end of a line +yaml: | + ex1: "foo # bar" + ex2: "foo # bar" # comment + ex3: 'foo # bar' # comment + ex4: foo # comment + ex5: foo # comment with tab before + ex6: foo#foo # comment here + ex7: foo # ignore me # and me +php: | + array('ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo', 'ex5' => 'foo', 'ex6' => 'foo#foo', 'ex7' => 'foo') +--- +test: Comments in the middle +brief: > + Comments in the middle +yaml: | + foo: + # some comment + # some comment + bar: foo + # some comment + # some comment +php: | + array('foo' => array('bar' => 'foo')) +--- +test: Comments on a hash line +brief: > + Comments on a hash line +yaml: | + foo: # a comment + foo: bar # a comment +php: | + array('foo' => array('foo' => 'bar')) +--- +test: 'Value starting with a #' +brief: > + 'Value starting with a #' +yaml: | + foo: '#bar' +php: | + array('foo' => '#bar') +--- +test: Document starting with a comment and a separator +brief: > + Commenting before document start is allowed +yaml: | + # document comment + --- + foo: bar # a comment +php: | + array('foo' => 'bar') +--- +test: Comment containing a colon on a hash line +brief: > + Comment containing a colon on a scalar line +yaml: 'foo # comment: this is also part of the comment' +php: | + 'foo' +--- +test: 'Hash key containing a #' +brief: > + 'Hash key containing a #' +yaml: 'foo#bar: baz' +php: | + array('foo#bar' => 'baz') +--- +test: 'Hash key ending with a space and a #' +brief: > + 'Hash key ending with a space and a #' +yaml: | + 'foo #': baz +php: | + array('foo #' => 'baz') diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.yml new file mode 100644 index 0000000000000000000000000000000000000000..1339d23a6305c8471b52556bb120cf4d35f58c93 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.yml @@ -0,0 +1,159 @@ +--- %YAML:1.0 +test: Compact notation +brief: | + Compact notation for sets of mappings with single element +yaml: | + --- + # products purchased + - item : Super Hoop + - item : Basketball + quantity: 1 + - item: + name: Big Shoes + nick: Biggies + quantity: 1 +php: | + array ( + array ( + 'item' => 'Super Hoop', + ), + array ( + 'item' => 'Basketball', + 'quantity' => 1, + ), + array ( + 'item' => array( + 'name' => 'Big Shoes', + 'nick' => 'Biggies' + ), + 'quantity' => 1 + ) + ) +--- +test: Compact notation combined with inline notation +brief: | + Combinations of compact and inline notation are allowed +yaml: | + --- + items: + - { item: Super Hoop, quantity: 1 } + - [ Basketball, Big Shoes ] +php: | + array ( + 'items' => array ( + array ( + 'item' => 'Super Hoop', + 'quantity' => 1, + ), + array ( + 'Basketball', + 'Big Shoes' + ) + ) + ) +--- %YAML:1.0 +test: Compact notation +brief: | + Compact notation for sets of mappings with single element +yaml: | + --- + # products purchased + - item : Super Hoop + - item : Basketball + quantity: 1 + - item: + name: Big Shoes + nick: Biggies + quantity: 1 +php: | + array ( + array ( + 'item' => 'Super Hoop', + ), + array ( + 'item' => 'Basketball', + 'quantity' => 1, + ), + array ( + 'item' => array( + 'name' => 'Big Shoes', + 'nick' => 'Biggies' + ), + 'quantity' => 1 + ) + ) +--- +test: Compact notation combined with inline notation +brief: | + Combinations of compact and inline notation are allowed +yaml: | + --- + items: + - { item: Super Hoop, quantity: 1 } + - [ Basketball, Big Shoes ] +php: | + array ( + 'items' => array ( + array ( + 'item' => 'Super Hoop', + 'quantity' => 1, + ), + array ( + 'Basketball', + 'Big Shoes' + ) + ) + ) +--- %YAML:1.0 +test: Compact notation +brief: | + Compact notation for sets of mappings with single element +yaml: | + --- + # products purchased + - item : Super Hoop + - item : Basketball + quantity: 1 + - item: + name: Big Shoes + nick: Biggies + quantity: 1 +php: | + array ( + array ( + 'item' => 'Super Hoop', + ), + array ( + 'item' => 'Basketball', + 'quantity' => 1, + ), + array ( + 'item' => array( + 'name' => 'Big Shoes', + 'nick' => 'Biggies' + ), + 'quantity' => 1 + ) + ) +--- +test: Compact notation combined with inline notation +brief: | + Combinations of compact and inline notation are allowed +yaml: | + --- + items: + - { item: Super Hoop, quantity: 1 } + - [ Basketball, Big Shoes ] +php: | + array ( + 'items' => array ( + array ( + 'item' => 'Super Hoop', + 'quantity' => 1, + ), + array ( + 'Basketball', + 'Big Shoes' + ) + ) + ) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml new file mode 100644 index 0000000000000000000000000000000000000000..18e5abf939f7c9c8140ead12d017568cf4a48e3f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml @@ -0,0 +1,55 @@ +--- %YAML:1.0 +test: Simple In Place Substitution +brief: > + If you want to reuse an entire alias, only overwriting what is different + you can use a << in place substitution. This is not part of the official + YAML spec, but a widely implemented extension. See the following URL for + details: http://yaml.org/type/merge.html +yaml: | + foo: &foo + a: Steve + b: Clark + c: Brian + e: notnull + bar: + a: before + d: other + e: ~ + <<: *foo + b: new + x: Oren + c: + foo: bar + bar: foo + foo2: &foo2 + a: Ballmer + ding: &dong [ fi, fei, fo, fam] + check: + <<: + - *foo + - *dong + isit: tested + head: + <<: [ *foo , *dong , *foo2 ] + taz: &taz + a: Steve + w: + p: 1234 + nested: + <<: *taz + d: Doug + w: &nestedref + p: 12345 + z: + <<: *nestedref +php: | + array( + 'foo' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull'), + 'bar' => array('a' => 'before', 'd' => 'other', 'e' => null, 'b' => 'new', 'c' => array('foo' => 'bar', 'bar' => 'foo'), 'x' => 'Oren'), + 'foo2' => array('a' => 'Ballmer'), + 'ding' => array('fi', 'fei', 'fo', 'fam'), + 'check' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam', 'isit' => 'tested'), + 'head' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'), + 'taz' => array('a' => 'Steve', 'w' => array('p' => 1234)), + 'nested' => array('a' => 'Steve', 'w' => array('p' => 12345), 'd' => 'Doug', 'z' => array('p' => 12345)) + ) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml new file mode 100644 index 0000000000000000000000000000000000000000..ee124b2446eb9ba04b63fb6c2c68708f4b04822f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml @@ -0,0 +1,11 @@ +--- %YAML:1.0 +test: Objects +brief: > + Comments at the end of a line +yaml: | + ex1: "foo # bar" + ex2: "foo # bar" # comment + ex3: 'foo # bar' # comment + ex4: foo # comment +php: | + array('ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo') diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.yml new file mode 100644 index 0000000000000000000000000000000000000000..7c60baec97ceee4114afe432b67a1eec4346e700 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.yml @@ -0,0 +1,33 @@ +--- %YAML:1.0 +test: Some characters at the beginning of a string must be escaped +brief: > + Some characters at the beginning of a string must be escaped +yaml: | + foo: '| bar' +php: | + array('foo' => '| bar') +--- +test: A key can be a quoted string +brief: > + A key can be a quoted string +yaml: | + "foo1": bar + 'foo2': bar + "foo \" bar": bar + 'foo '' bar': bar + 'foo3: ': bar + "foo4: ": bar + foo5: { "foo \" bar: ": bar, 'foo '' bar: ': bar } +php: | + array( + 'foo1' => 'bar', + 'foo2' => 'bar', + 'foo " bar' => 'bar', + 'foo \' bar' => 'bar', + 'foo3: ' => 'bar', + 'foo4: ' => 'bar', + 'foo5' => array( + 'foo " bar: ' => 'bar', + 'foo \' bar: ' => 'bar', + ), + ) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml new file mode 100644 index 0000000000000000000000000000000000000000..a427be1c846909f69eb10c8c37964fe65df4f3fa --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml @@ -0,0 +1,149 @@ +--- %YAML:1.0 +test: Multiple quoted string on one line +brief: > + Multiple quoted string on one line +yaml: | + stripped_title: { name: "foo bar", help: "bar foo" } +php: | + array('stripped_title' => array('name' => 'foo bar', 'help' => 'bar foo')) +--- +test: Empty sequence +yaml: | + foo: [ ] +php: | + array('foo' => array()) +--- +test: Empty value +yaml: | + foo: +php: | + array('foo' => null) +--- +test: Inline string parsing +brief: > + Inline string parsing +yaml: | + test: ['complex: string', 'another [string]'] +php: | + array('test' => array('complex: string', 'another [string]')) +--- +test: Boolean +brief: > + Boolean +yaml: | + - false + - true + - null + - ~ + - 'false' + - 'true' + - 'null' + - '~' +php: | + array( + false, + true, + null, + null, + 'false', + 'true', + 'null', + '~', + ) +--- +test: Empty lines in literal blocks +brief: > + Empty lines in literal blocks +yaml: | + foo: + bar: | + foo + + + + bar +php: | + array('foo' => array('bar' => "foo\n\n\n \nbar\n")) +--- +test: Empty lines in folded blocks +brief: > + Empty lines in folded blocks +yaml: | + foo: + bar: > + + foo + + + bar +php: | + array('foo' => array('bar' => "\nfoo\n\nbar\n")) +--- +test: IP addresses +brief: > + IP addresses +yaml: | + foo: 10.0.0.2 +php: | + array('foo' => '10.0.0.2') +--- +test: A sequence with an embedded mapping +brief: > + A sequence with an embedded mapping +yaml: | + - foo + - bar: { bar: foo } +php: | + array('foo', array('bar' => array('bar' => 'foo'))) +--- +test: A sequence with an unordered array +brief: > + A sequence with an unordered array +yaml: | + 1: foo + 0: bar +php: | + array(1 => 'foo', 0 => 'bar') +--- +test: Octal +brief: as in spec example 2.19, octal value is converted +yaml: | + foo: 0123 +php: | + array('foo' => 83) +--- +test: Octal strings +brief: Octal notation in a string must remain a string +yaml: | + foo: "0123" +php: | + array('foo' => '0123') +--- +test: Octal strings +brief: Octal notation in a string must remain a string +yaml: | + foo: '0123' +php: | + array('foo' => '0123') +--- +test: Octal strings +brief: Octal notation in a string must remain a string +yaml: | + foo: | + 0123 +php: | + array('foo' => "0123\n") +--- +test: Document as a simple hash +brief: Document as a simple hash +yaml: | + { foo: bar } +php: | + array('foo' => 'bar') +--- +test: Document as a simple array +brief: Document as a simple array +yaml: | + [ foo, bar ] +php: | + array('foo', 'bar') diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml new file mode 100644 index 0000000000000000000000000000000000000000..0c96108e9911088ff0c4c1f601b813d04d08df08 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml @@ -0,0 +1,82 @@ +--- %YAML:1.0 +test: Unindented collection +brief: > + Unindented collection +yaml: | + collection: + - item1 + - item2 + - item3 +php: | + array('collection' => array('item1', 'item2', 'item3')) +--- +test: Nested unindented collection (two levels) +brief: > + Nested unindented collection +yaml: | + collection: + key: + - a + - b + - c +php: | + array('collection' => array('key' => array('a', 'b', 'c'))) +--- +test: Nested unindented collection (three levels) +brief: > + Nested unindented collection +yaml: | + collection: + key: + subkey: + - one + - two + - three +php: | + array('collection' => array('key' => array('subkey' => array('one', 'two', 'three')))) +--- +test: Key/value after unindented collection (1) +brief: > + Key/value after unindented collection (1) +yaml: | + collection: + key: + - a + - b + - c + foo: bar +php: | + array('collection' => array('key' => array('a', 'b', 'c')), 'foo' => 'bar') +--- +test: Key/value after unindented collection (at the same level) +brief: > + Key/value after unindented collection +yaml: | + collection: + key: + - a + - b + - c + foo: bar +php: | + array('collection' => array('key' => array('a', 'b', 'c'), 'foo' => 'bar')) +--- +test: Shortcut Key after unindented collection +brief: > + Key/value after unindented collection +yaml: | + collection: + - key: foo + foo: bar +php: | + array('collection' => array(array('key' => 'foo', 'foo' => 'bar'))) +--- +test: Shortcut Key after unindented collection with custom spaces +brief: > + Key/value after unindented collection +yaml: | + collection: + - key: foo + foo: bar +php: | + array('collection' => array(array('key' => 'foo', 'foo' => 'bar'))) diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/InlineTest.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/InlineTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bfa13e09d74e7c2cd261ee7528b7963ef93bc76f --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/InlineTest.php @@ -0,0 +1,712 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Yaml\Exception\ParseException; +use Symfony\Component\Yaml\Inline; +use Symfony\Component\Yaml\Yaml; + +class InlineTest extends TestCase +{ + /** + * @dataProvider getTestsForParse + */ + public function testParse($yaml, $value) + { + $this->assertSame($value, Inline::parse($yaml), sprintf('::parse() converts an inline YAML to a PHP structure (%s)', $yaml)); + } + + /** + * @dataProvider getTestsForParseWithMapObjects + */ + public function testParseWithMapObjects($yaml, $value) + { + $actual = Inline::parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP); + + $this->assertSame(serialize($value), serialize($actual)); + } + + /** + * @dataProvider getTestsForParsePhpConstants + */ + public function testParsePhpConstants($yaml, $value) + { + $actual = Inline::parse($yaml, Yaml::PARSE_CONSTANT); + + $this->assertSame($value, $actual); + } + + public function getTestsForParsePhpConstants() + { + return array( + array('!php/const:Symfony\Component\Yaml\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT), + array('!php/const:PHP_INT_MAX', PHP_INT_MAX), + array('[!php/const:PHP_INT_MAX]', array(PHP_INT_MAX)), + array('{ foo: !php/const:PHP_INT_MAX }', array('foo' => PHP_INT_MAX)), + ); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage The constant "WRONG_CONSTANT" is not defined + */ + public function testParsePhpConstantThrowsExceptionWhenUndefined() + { + Inline::parse('!php/const:WRONG_CONSTANT', Yaml::PARSE_CONSTANT); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessageRegExp #The string "!php/const:PHP_INT_MAX" could not be parsed as a constant.*# + */ + public function testParsePhpConstantThrowsExceptionOnInvalidType() + { + Inline::parse('!php/const:PHP_INT_MAX', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE); + } + + /** + * @group legacy + * @dataProvider getTestsForParseWithMapObjects + */ + public function testParseWithMapObjectsPassingTrue($yaml, $value) + { + $actual = Inline::parse($yaml, false, false, true); + + $this->assertSame(serialize($value), serialize($actual)); + } + + /** + * @dataProvider getTestsForDump + */ + public function testDump($yaml, $value) + { + $this->assertEquals($yaml, Inline::dump($value), sprintf('::dump() converts a PHP structure to an inline YAML (%s)', $yaml)); + + $this->assertSame($value, Inline::parse(Inline::dump($value)), 'check consistency'); + } + + public function testDumpNumericValueWithLocale() + { + $locale = setlocale(LC_NUMERIC, 0); + if (false === $locale) { + $this->markTestSkipped('Your platform does not support locales.'); + } + + try { + $requiredLocales = array('fr_FR.UTF-8', 'fr_FR.UTF8', 'fr_FR.utf-8', 'fr_FR.utf8', 'French_France.1252'); + if (false === setlocale(LC_NUMERIC, $requiredLocales)) { + $this->markTestSkipped('Could not set any of required locales: '.implode(', ', $requiredLocales)); + } + + $this->assertEquals('1.2', Inline::dump(1.2)); + $this->assertContains('fr', strtolower(setlocale(LC_NUMERIC, 0))); + } finally { + setlocale(LC_NUMERIC, $locale); + } + } + + public function testHashStringsResemblingExponentialNumericsShouldNotBeChangedToINF() + { + $value = '686e444'; + + $this->assertSame($value, Inline::parse(Inline::dump($value))); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage Found unknown escape character "\V". + */ + public function testParseScalarWithNonEscapedBlackslashShouldThrowException() + { + Inline::parse('"Foo\Var"'); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseScalarWithNonEscapedBlackslashAtTheEndShouldThrowException() + { + Inline::parse('"Foo\\"'); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseScalarWithIncorrectlyQuotedStringShouldThrowException() + { + $value = "'don't do somthin' like that'"; + Inline::parse($value); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseScalarWithIncorrectlyDoubleQuotedStringShouldThrowException() + { + $value = '"don"t do somthin" like that"'; + Inline::parse($value); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseInvalidMappingKeyShouldThrowException() + { + $value = '{ "foo " bar": "bar" }'; + Inline::parse($value); + } + + /** + * @group legacy + * @expectedDeprecation Using a colon that is not followed by an indication character (i.e. " ", ",", "[", "]", "{", "}" is deprecated since version 3.2 and will throw a ParseException in 4.0. + * throws \Symfony\Component\Yaml\Exception\ParseException in 4.0 + */ + public function testParseMappingKeyWithColonNotFollowedBySpace() + { + Inline::parse('{1:""}'); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseInvalidMappingShouldThrowException() + { + Inline::parse('[foo] bar'); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseInvalidSequenceShouldThrowException() + { + Inline::parse('{ foo: bar } bar'); + } + + public function testParseScalarWithCorrectlyQuotedStringShouldReturnString() + { + $value = "'don''t do somthin'' like that'"; + $expect = "don't do somthin' like that"; + + $this->assertSame($expect, Inline::parseScalar($value)); + } + + /** + * @dataProvider getDataForParseReferences + */ + public function testParseReferences($yaml, $expected) + { + $this->assertSame($expected, Inline::parse($yaml, 0, array('var' => 'var-value'))); + } + + /** + * @group legacy + * @dataProvider getDataForParseReferences + */ + public function testParseReferencesAsFifthArgument($yaml, $expected) + { + $this->assertSame($expected, Inline::parse($yaml, false, false, false, array('var' => 'var-value'))); + } + + public function getDataForParseReferences() + { + return array( + 'scalar' => array('*var', 'var-value'), + 'list' => array('[ *var ]', array('var-value')), + 'list-in-list' => array('[[ *var ]]', array(array('var-value'))), + 'map-in-list' => array('[ { key: *var } ]', array(array('key' => 'var-value'))), + 'embedded-mapping-in-list' => array('[ key: *var ]', array(array('key' => 'var-value'))), + 'map' => array('{ key: *var }', array('key' => 'var-value')), + 'list-in-map' => array('{ key: [*var] }', array('key' => array('var-value'))), + 'map-in-map' => array('{ foo: { bar: *var } }', array('foo' => array('bar' => 'var-value'))), + ); + } + + public function testParseMapReferenceInSequence() + { + $foo = array( + 'a' => 'Steve', + 'b' => 'Clark', + 'c' => 'Brian', + ); + $this->assertSame(array($foo), Inline::parse('[*foo]', 0, array('foo' => $foo))); + } + + /** + * @group legacy + */ + public function testParseMapReferenceInSequenceAsFifthArgument() + { + $foo = array( + 'a' => 'Steve', + 'b' => 'Clark', + 'c' => 'Brian', + ); + $this->assertSame(array($foo), Inline::parse('[*foo]', false, false, false, array('foo' => $foo))); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage A reference must contain at least one character. + */ + public function testParseUnquotedAsterisk() + { + Inline::parse('{ foo: * }'); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage A reference must contain at least one character. + */ + public function testParseUnquotedAsteriskFollowedByAComment() + { + Inline::parse('{ foo: * #foo }'); + } + + /** + * @dataProvider getReservedIndicators + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage cannot start a plain scalar; you need to quote the scalar. + */ + public function testParseUnquotedScalarStartingWithReservedIndicator($indicator) + { + Inline::parse(sprintf('{ foo: %sfoo }', $indicator)); + } + + public function getReservedIndicators() + { + return array(array('@'), array('`')); + } + + /** + * @dataProvider getScalarIndicators + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage cannot start a plain scalar; you need to quote the scalar. + */ + public function testParseUnquotedScalarStartingWithScalarIndicator($indicator) + { + Inline::parse(sprintf('{ foo: %sfoo }', $indicator)); + } + + public function getScalarIndicators() + { + return array(array('|'), array('>')); + } + + /** + * @group legacy + * @expectedDeprecation Not quoting the scalar "%bar " starting with the "%" indicator character is deprecated since Symfony 3.1 and will throw a ParseException in 4.0. + * throws \Symfony\Component\Yaml\Exception\ParseException in 4.0 + */ + public function testParseUnquotedScalarStartingWithPercentCharacter() + { + Inline::parse('{ foo: %bar }'); + } + + /** + * @dataProvider getDataForIsHash + */ + public function testIsHash($array, $expected) + { + $this->assertSame($expected, Inline::isHash($array)); + } + + public function getDataForIsHash() + { + return array( + array(array(), false), + array(array(1, 2, 3), false), + array(array(2 => 1, 1 => 2, 0 => 3), true), + array(array('foo' => 1, 'bar' => 2), true), + ); + } + + public function getTestsForParse() + { + return array( + array('', ''), + array('null', null), + array('false', false), + array('true', true), + array('12', 12), + array('-12', -12), + array('1_2', 12), + array('_12', '_12'), + array('12_', 12), + array('"quoted string"', 'quoted string'), + array("'quoted string'", 'quoted string'), + array('12.30e+02', 12.30e+02), + array('123.45_67', 123.4567), + array('0x4D2', 0x4D2), + array('0x_4_D_2_', 0x4D2), + array('02333', 02333), + array('0_2_3_3_3', 02333), + array('.Inf', -log(0)), + array('-.Inf', log(0)), + array("'686e444'", '686e444'), + array('686e444', 646e444), + array('123456789123456789123456789123456789', '123456789123456789123456789123456789'), + array('"foo\r\nbar"', "foo\r\nbar"), + array("'foo#bar'", 'foo#bar'), + array("'foo # bar'", 'foo # bar'), + array("'#cfcfcf'", '#cfcfcf'), + array('::form_base.html.twig', '::form_base.html.twig'), + + // Pre-YAML-1.2 booleans + array("'y'", 'y'), + array("'n'", 'n'), + array("'yes'", 'yes'), + array("'no'", 'no'), + array("'on'", 'on'), + array("'off'", 'off'), + + array('2007-10-30', gmmktime(0, 0, 0, 10, 30, 2007)), + array('2007-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 2007)), + array('2007-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 2007)), + array('1960-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 1960)), + array('1730-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 1730)), + + array('"a \\"string\\" with \'quoted strings inside\'"', 'a "string" with \'quoted strings inside\''), + array("'a \"string\" with ''quoted strings inside'''", 'a "string" with \'quoted strings inside\''), + + // sequences + // urls are no key value mapping. see #3609. Valid yaml "key: value" mappings require a space after the colon + array('[foo, http://urls.are/no/mappings, false, null, 12]', array('foo', 'http://urls.are/no/mappings', false, null, 12)), + array('[ foo , bar , false , null , 12 ]', array('foo', 'bar', false, null, 12)), + array('[\'foo,bar\', \'foo bar\']', array('foo,bar', 'foo bar')), + + // mappings + array('{foo: bar,bar: foo,false: false,null: null,integer: 12}', array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12)), + array('{ foo : bar, bar : foo, false : false, null : null, integer : 12 }', array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12)), + array('{foo: \'bar\', bar: \'foo: bar\'}', array('foo' => 'bar', 'bar' => 'foo: bar')), + array('{\'foo\': \'bar\', "bar": \'foo: bar\'}', array('foo' => 'bar', 'bar' => 'foo: bar')), + array('{\'foo\'\'\': \'bar\', "bar\"": \'foo: bar\'}', array('foo\'' => 'bar', 'bar"' => 'foo: bar')), + array('{\'foo: \': \'bar\', "bar: ": \'foo: bar\'}', array('foo: ' => 'bar', 'bar: ' => 'foo: bar')), + + // nested sequences and mappings + array('[foo, [bar, foo]]', array('foo', array('bar', 'foo'))), + array('[foo, {bar: foo}]', array('foo', array('bar' => 'foo'))), + array('{ foo: {bar: foo} }', array('foo' => array('bar' => 'foo'))), + array('{ foo: [bar, foo] }', array('foo' => array('bar', 'foo'))), + array('{ foo:{bar: foo} }', array('foo' => array('bar' => 'foo'))), + array('{ foo:[bar, foo] }', array('foo' => array('bar', 'foo'))), + + array('[ foo, [ bar, foo ] ]', array('foo', array('bar', 'foo'))), + + array('[{ foo: {bar: foo} }]', array(array('foo' => array('bar' => 'foo')))), + + array('[foo, [bar, [foo, [bar, foo]], foo]]', array('foo', array('bar', array('foo', array('bar', 'foo')), 'foo'))), + + array('[foo, {bar: foo, foo: [foo, {bar: foo}]}, [foo, {bar: foo}]]', array('foo', array('bar' => 'foo', 'foo' => array('foo', array('bar' => 'foo'))), array('foo', array('bar' => 'foo')))), + + array('[foo, bar: { foo: bar }]', array('foo', '1' => array('bar' => array('foo' => 'bar')))), + array('[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', array('foo', '@foo.baz', array('%foo%' => 'foo is %foo%', 'bar' => '%foo%'), true, '@service_container')), + ); + } + + public function getTestsForParseWithMapObjects() + { + return array( + array('', ''), + array('null', null), + array('false', false), + array('true', true), + array('12', 12), + array('-12', -12), + array('"quoted string"', 'quoted string'), + array("'quoted string'", 'quoted string'), + array('12.30e+02', 12.30e+02), + array('0x4D2', 0x4D2), + array('02333', 02333), + array('.Inf', -log(0)), + array('-.Inf', log(0)), + array("'686e444'", '686e444'), + array('686e444', 646e444), + array('123456789123456789123456789123456789', '123456789123456789123456789123456789'), + array('"foo\r\nbar"', "foo\r\nbar"), + array("'foo#bar'", 'foo#bar'), + array("'foo # bar'", 'foo # bar'), + array("'#cfcfcf'", '#cfcfcf'), + array('::form_base.html.twig', '::form_base.html.twig'), + + array('2007-10-30', gmmktime(0, 0, 0, 10, 30, 2007)), + array('2007-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 2007)), + array('2007-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 2007)), + array('1960-10-30 02:59:43 Z', gmmktime(2, 59, 43, 10, 30, 1960)), + array('1730-10-30T02:59:43Z', gmmktime(2, 59, 43, 10, 30, 1730)), + + array('"a \\"string\\" with \'quoted strings inside\'"', 'a "string" with \'quoted strings inside\''), + array("'a \"string\" with ''quoted strings inside'''", 'a "string" with \'quoted strings inside\''), + + // sequences + // urls are no key value mapping. see #3609. Valid yaml "key: value" mappings require a space after the colon + array('[foo, http://urls.are/no/mappings, false, null, 12]', array('foo', 'http://urls.are/no/mappings', false, null, 12)), + array('[ foo , bar , false , null , 12 ]', array('foo', 'bar', false, null, 12)), + array('[\'foo,bar\', \'foo bar\']', array('foo,bar', 'foo bar')), + + // mappings + array('{foo: bar,bar: foo,false: false,null: null,integer: 12}', (object) array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12)), + array('{ foo : bar, bar : foo, false : false, null : null, integer : 12 }', (object) array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12)), + array('{foo: \'bar\', bar: \'foo: bar\'}', (object) array('foo' => 'bar', 'bar' => 'foo: bar')), + array('{\'foo\': \'bar\', "bar": \'foo: bar\'}', (object) array('foo' => 'bar', 'bar' => 'foo: bar')), + array('{\'foo\'\'\': \'bar\', "bar\"": \'foo: bar\'}', (object) array('foo\'' => 'bar', 'bar"' => 'foo: bar')), + array('{\'foo: \': \'bar\', "bar: ": \'foo: bar\'}', (object) array('foo: ' => 'bar', 'bar: ' => 'foo: bar')), + + // nested sequences and mappings + array('[foo, [bar, foo]]', array('foo', array('bar', 'foo'))), + array('[foo, {bar: foo}]', array('foo', (object) array('bar' => 'foo'))), + array('{ foo: {bar: foo} }', (object) array('foo' => (object) array('bar' => 'foo'))), + array('{ foo: [bar, foo] }', (object) array('foo' => array('bar', 'foo'))), + + array('[ foo, [ bar, foo ] ]', array('foo', array('bar', 'foo'))), + + array('[{ foo: {bar: foo} }]', array((object) array('foo' => (object) array('bar' => 'foo')))), + + array('[foo, [bar, [foo, [bar, foo]], foo]]', array('foo', array('bar', array('foo', array('bar', 'foo')), 'foo'))), + + array('[foo, {bar: foo, foo: [foo, {bar: foo}]}, [foo, {bar: foo}]]', array('foo', (object) array('bar' => 'foo', 'foo' => array('foo', (object) array('bar' => 'foo'))), array('foo', (object) array('bar' => 'foo')))), + + array('[foo, bar: { foo: bar }]', array('foo', '1' => (object) array('bar' => (object) array('foo' => 'bar')))), + array('[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', array('foo', '@foo.baz', (object) array('%foo%' => 'foo is %foo%', 'bar' => '%foo%'), true, '@service_container')), + + array('{}', new \stdClass()), + array('{ foo : bar, bar : {} }', (object) array('foo' => 'bar', 'bar' => new \stdClass())), + array('{ foo : [], bar : {} }', (object) array('foo' => array(), 'bar' => new \stdClass())), + array('{foo: \'bar\', bar: {} }', (object) array('foo' => 'bar', 'bar' => new \stdClass())), + array('{\'foo\': \'bar\', "bar": {}}', (object) array('foo' => 'bar', 'bar' => new \stdClass())), + array('{\'foo\': \'bar\', "bar": \'{}\'}', (object) array('foo' => 'bar', 'bar' => '{}')), + + array('[foo, [{}, {}]]', array('foo', array(new \stdClass(), new \stdClass()))), + array('[foo, [[], {}]]', array('foo', array(array(), new \stdClass()))), + array('[foo, [[{}, {}], {}]]', array('foo', array(array(new \stdClass(), new \stdClass()), new \stdClass()))), + array('[foo, {bar: {}}]', array('foo', '1' => (object) array('bar' => new \stdClass()))), + ); + } + + public function getTestsForDump() + { + return array( + array('null', null), + array('false', false), + array('true', true), + array('12', 12), + array("'1_2'", '1_2'), + array('_12', '_12'), + array("'12_'", '12_'), + array("'quoted string'", 'quoted string'), + array('!!float 1230', 12.30e+02), + array('1234', 0x4D2), + array('1243', 02333), + array("'0x_4_D_2_'", '0x_4_D_2_'), + array("'0_2_3_3_3'", '0_2_3_3_3'), + array('.Inf', -log(0)), + array('-.Inf', log(0)), + array("'686e444'", '686e444'), + array('"foo\r\nbar"', "foo\r\nbar"), + array("'foo#bar'", 'foo#bar'), + array("'foo # bar'", 'foo # bar'), + array("'#cfcfcf'", '#cfcfcf'), + + array("'a \"string\" with ''quoted strings inside'''", 'a "string" with \'quoted strings inside\''), + + array("'-dash'", '-dash'), + array("'-'", '-'), + + // Pre-YAML-1.2 booleans + array("'y'", 'y'), + array("'n'", 'n'), + array("'yes'", 'yes'), + array("'no'", 'no'), + array("'on'", 'on'), + array("'off'", 'off'), + + // sequences + array('[foo, bar, false, null, 12]', array('foo', 'bar', false, null, 12)), + array('[\'foo,bar\', \'foo bar\']', array('foo,bar', 'foo bar')), + + // mappings + array('{ foo: bar, bar: foo, \'false\': false, \'null\': null, integer: 12 }', array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12)), + array('{ foo: bar, bar: \'foo: bar\' }', array('foo' => 'bar', 'bar' => 'foo: bar')), + + // nested sequences and mappings + array('[foo, [bar, foo]]', array('foo', array('bar', 'foo'))), + + array('[foo, [bar, [foo, [bar, foo]], foo]]', array('foo', array('bar', array('foo', array('bar', 'foo')), 'foo'))), + + array('{ foo: { bar: foo } }', array('foo' => array('bar' => 'foo'))), + + array('[foo, { bar: foo }]', array('foo', array('bar' => 'foo'))), + + array('[foo, { bar: foo, foo: [foo, { bar: foo }] }, [foo, { bar: foo }]]', array('foo', array('bar' => 'foo', 'foo' => array('foo', array('bar' => 'foo'))), array('foo', array('bar' => 'foo')))), + + array('[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', array('foo', '@foo.baz', array('%foo%' => 'foo is %foo%', 'bar' => '%foo%'), true, '@service_container')), + + array('{ foo: { bar: { 1: 2, baz: 3 } } }', array('foo' => array('bar' => array(1 => 2, 'baz' => 3)))), + ); + } + + /** + * @dataProvider getTimestampTests + */ + public function testParseTimestampAsUnixTimestampByDefault($yaml, $year, $month, $day, $hour, $minute, $second) + { + $this->assertSame(gmmktime($hour, $minute, $second, $month, $day, $year), Inline::parse($yaml)); + } + + /** + * @dataProvider getTimestampTests + */ + public function testParseTimestampAsDateTimeObject($yaml, $year, $month, $day, $hour, $minute, $second, $timezone) + { + $expected = new \DateTime($yaml); + $expected->setTimeZone(new \DateTimeZone('UTC')); + $expected->setDate($year, $month, $day); + + if (PHP_VERSION_ID >= 70100) { + $expected->setTime($hour, $minute, $second, 1000000 * ($second - (int) $second)); + } else { + $expected->setTime($hour, $minute, $second); + } + + $date = Inline::parse($yaml, Yaml::PARSE_DATETIME); + $this->assertEquals($expected, $date); + $this->assertSame($timezone, $date->format('O')); + } + + public function getTimestampTests() + { + return array( + 'canonical' => array('2001-12-15T02:59:43.1Z', 2001, 12, 15, 2, 59, 43.1, '+0000'), + 'ISO-8601' => array('2001-12-15t21:59:43.10-05:00', 2001, 12, 16, 2, 59, 43.1, '-0500'), + 'spaced' => array('2001-12-15 21:59:43.10 -5', 2001, 12, 16, 2, 59, 43.1, '-0500'), + 'date' => array('2001-12-15', 2001, 12, 15, 0, 0, 0, '+0000'), + ); + } + + /** + * @dataProvider getTimestampTests + */ + public function testParseNestedTimestampListAsDateTimeObject($yaml, $year, $month, $day, $hour, $minute, $second) + { + $expected = new \DateTime($yaml); + $expected->setTimeZone(new \DateTimeZone('UTC')); + $expected->setDate($year, $month, $day); + if (PHP_VERSION_ID >= 70100) { + $expected->setTime($hour, $minute, $second, 1000000 * ($second - (int) $second)); + } else { + $expected->setTime($hour, $minute, $second); + } + + $expectedNested = array('nested' => array($expected)); + $yamlNested = "{nested: [$yaml]}"; + + $this->assertEquals($expectedNested, Inline::parse($yamlNested, Yaml::PARSE_DATETIME)); + } + + /** + * @dataProvider getDateTimeDumpTests + */ + public function testDumpDateTime($dateTime, $expected) + { + $this->assertSame($expected, Inline::dump($dateTime)); + } + + public function getDateTimeDumpTests() + { + $tests = array(); + + $dateTime = new \DateTime('2001-12-15 21:59:43', new \DateTimeZone('UTC')); + $tests['date-time-utc'] = array($dateTime, '2001-12-15T21:59:43+00:00'); + + $dateTime = new \DateTimeImmutable('2001-07-15 21:59:43', new \DateTimeZone('Europe/Berlin')); + $tests['immutable-date-time-europe-berlin'] = array($dateTime, '2001-07-15T21:59:43+02:00'); + + return $tests; + } + + /** + * @dataProvider getBinaryData + */ + public function testParseBinaryData($data) + { + $this->assertSame('Hello world', Inline::parse($data)); + } + + public function getBinaryData() + { + return array( + 'enclosed with double quotes' => array('!!binary "SGVsbG8gd29ybGQ="'), + 'enclosed with single quotes' => array("!!binary 'SGVsbG8gd29ybGQ='"), + 'containing spaces' => array('!!binary "SGVs bG8gd 29ybGQ="'), + ); + } + + /** + * @dataProvider getInvalidBinaryData + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseInvalidBinaryData($data, $expectedMessage) + { + if (method_exists($this, 'expectException')) { + $this->expectExceptionMessageRegExp($expectedMessage); + } else { + $this->setExpectedExceptionRegExp(ParseException::class, $expectedMessage); + } + + Inline::parse($data); + } + + public function getInvalidBinaryData() + { + return array( + 'length not a multiple of four' => array('!!binary "SGVsbG8d29ybGQ="', '/The normalized base64 encoded data \(data without whitespace characters\) length must be a multiple of four \(\d+ bytes given\)/'), + 'invalid characters' => array('!!binary "SGVsbG8#d29ybGQ="', '/The base64 encoded data \(.*\) contains invalid characters/'), + 'too many equals characters' => array('!!binary "SGVsbG8gd29yb==="', '/The base64 encoded data \(.*\) contains invalid characters/'), + 'misplaced equals character' => array('!!binary "SGVsbG8gd29ybG=Q"', '/The base64 encoded data \(.*\) contains invalid characters/'), + ); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage Malformed inline YAML string: {this, is not, supported}. + */ + public function testNotSupportedMissingValue() + { + Inline::parse('{this, is not, supported}'); + } + + public function testVeryLongQuotedStrings() + { + $longStringWithQuotes = str_repeat("x\r\n\\\"x\"x", 1000); + + $yamlString = Inline::dump(array('longStringWithQuotes' => $longStringWithQuotes)); + $arrayFromYaml = Inline::parse($yamlString); + + $this->assertEquals($longStringWithQuotes, $arrayFromYaml['longStringWithQuotes']); + } + + public function testOmittedMappingKeyIsParsedAsColon() + { + $this->assertSame(array(':' => 'foo'), Inline::parse('{: foo}')); + } + + public function testBooleanMappingKeysAreConvertedToStrings() + { + $this->assertSame(array('false' => 'foo'), Inline::parse('{false: foo}')); + $this->assertSame(array('true' => 'foo'), Inline::parse('{true: foo}')); + } + + public function testTheEmptyStringIsAValidMappingKey() + { + $this->assertSame(array('' => 'foo'), Inline::parse('{ "": foo }')); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/ParseExceptionTest.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/ParseExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..39579ede7256f9fa655c4258df51df8ce26b17a3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/ParseExceptionTest.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Yaml\Exception\ParseException; + +class ParseExceptionTest extends TestCase +{ + public function testGetMessage() + { + $exception = new ParseException('Error message', 42, 'foo: bar', '/var/www/app/config.yml'); + $message = 'Error message in "/var/www/app/config.yml" at line 42 (near "foo: bar")'; + + $this->assertEquals($message, $exception->getMessage()); + } + + public function testGetMessageWithUnicodeInFilename() + { + $exception = new ParseException('Error message', 42, 'foo: bar', 'äöü.yml'); + $message = 'Error message in "äöü.yml" at line 42 (near "foo: bar")'; + + $this->assertEquals($message, $exception->getMessage()); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/ParserTest.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/ParserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5328b27b36808c797762cfb8b3ba2f8242563a4a --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -0,0 +1,1486 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Yaml\Exception\ParseException; +use Symfony\Component\Yaml\Yaml; +use Symfony\Component\Yaml\Parser; + +class ParserTest extends TestCase +{ + protected $parser; + + protected function setUp() + { + $this->parser = new Parser(); + } + + protected function tearDown() + { + $this->parser = null; + } + + /** + * @dataProvider getDataFormSpecifications + */ + public function testSpecifications($file, $expected, $yaml, $comment, $deprecated) + { + $deprecations = array(); + + if ($deprecated) { + set_error_handler(function ($type, $msg) use (&$deprecations) { + if (E_USER_DEPRECATED !== $type) { + restore_error_handler(); + + if (class_exists('PHPUnit_Util_ErrorHandler')) { + return call_user_func_array('PHPUnit_Util_ErrorHandler::handleError', func_get_args()); + } + + return call_user_func_array('PHPUnit\Util\ErrorHandler::handleError', func_get_args()); + } + + $deprecations[] = $msg; + }); + } + + $this->assertEquals($expected, var_export($this->parser->parse($yaml), true), $comment); + + if ($deprecated) { + restore_error_handler(); + + $this->assertCount(1, $deprecations); + $this->assertContains('Using the comma as a group separator for floats is deprecated since version 3.2 and will be removed in 4.0.', $deprecations[0]); + } + } + + public function getDataFormSpecifications() + { + $parser = new Parser(); + $path = __DIR__.'/Fixtures'; + + $tests = array(); + $files = $parser->parse(file_get_contents($path.'/index.yml')); + foreach ($files as $file) { + $yamls = file_get_contents($path.'/'.$file.'.yml'); + + // split YAMLs documents + foreach (preg_split('/^---( %YAML\:1\.0)?/m', $yamls) as $yaml) { + if (!$yaml) { + continue; + } + + $test = $parser->parse($yaml); + if (isset($test['todo']) && $test['todo']) { + // TODO + } else { + eval('$expected = '.trim($test['php']).';'); + + $tests[] = array($file, var_export($expected, true), $test['yaml'], $test['test'], isset($test['deprecated']) ? $test['deprecated'] : false); + } + } + } + + return $tests; + } + + public function testTabsInYaml() + { + // test tabs in YAML + $yamls = array( + "foo:\n bar", + "foo:\n bar", + "foo:\n bar", + "foo:\n bar", + ); + + foreach ($yamls as $yaml) { + try { + $content = $this->parser->parse($yaml); + + $this->fail('YAML files must not contain tabs'); + } catch (\Exception $e) { + $this->assertInstanceOf('\Exception', $e, 'YAML files must not contain tabs'); + $this->assertEquals('A YAML file cannot contain tabs as indentation at line 2 (near "'.strpbrk($yaml, "\t").'").', $e->getMessage(), 'YAML files must not contain tabs'); + } + } + } + + public function testEndOfTheDocumentMarker() + { + $yaml = <<<'EOF' +--- %YAML:1.0 +foo +... +EOF; + + $this->assertEquals('foo', $this->parser->parse($yaml)); + } + + public function getBlockChompingTests() + { + $tests = array(); + + $yaml = <<<'EOF' +foo: |- + one + two +bar: |- + one + two + +EOF; + $expected = array( + 'foo' => "one\ntwo", + 'bar' => "one\ntwo", + ); + $tests['Literal block chomping strip with single trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: |- + one + two + +bar: |- + one + two + + +EOF; + $expected = array( + 'foo' => "one\ntwo", + 'bar' => "one\ntwo", + ); + $tests['Literal block chomping strip with multiple trailing newlines'] = array($expected, $yaml); + + $yaml = <<<'EOF' +{} + + +EOF; + $expected = array(); + $tests['Literal block chomping strip with multiple trailing newlines after a 1-liner'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: |- + one + two +bar: |- + one + two +EOF; + $expected = array( + 'foo' => "one\ntwo", + 'bar' => "one\ntwo", + ); + $tests['Literal block chomping strip without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: | + one + two +bar: | + one + two + +EOF; + $expected = array( + 'foo' => "one\ntwo\n", + 'bar' => "one\ntwo\n", + ); + $tests['Literal block chomping clip with single trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: | + one + two + +bar: | + one + two + + +EOF; + $expected = array( + 'foo' => "one\ntwo\n", + 'bar' => "one\ntwo\n", + ); + $tests['Literal block chomping clip with multiple trailing newlines'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: +- bar: | + one + + two +EOF; + $expected = array( + 'foo' => array( + array( + 'bar' => "one\n\ntwo", + ), + ), + ); + $tests['Literal block chomping clip with embedded blank line inside unindented collection'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: | + one + two +bar: | + one + two +EOF; + $expected = array( + 'foo' => "one\ntwo\n", + 'bar' => "one\ntwo", + ); + $tests['Literal block chomping clip without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: |+ + one + two +bar: |+ + one + two + +EOF; + $expected = array( + 'foo' => "one\ntwo\n", + 'bar' => "one\ntwo\n", + ); + $tests['Literal block chomping keep with single trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: |+ + one + two + +bar: |+ + one + two + + +EOF; + $expected = array( + 'foo' => "one\ntwo\n\n", + 'bar' => "one\ntwo\n\n", + ); + $tests['Literal block chomping keep with multiple trailing newlines'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: |+ + one + two +bar: |+ + one + two +EOF; + $expected = array( + 'foo' => "one\ntwo\n", + 'bar' => "one\ntwo", + ); + $tests['Literal block chomping keep without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >- + one + two +bar: >- + one + two + +EOF; + $expected = array( + 'foo' => 'one two', + 'bar' => 'one two', + ); + $tests['Folded block chomping strip with single trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >- + one + two + +bar: >- + one + two + + +EOF; + $expected = array( + 'foo' => 'one two', + 'bar' => 'one two', + ); + $tests['Folded block chomping strip with multiple trailing newlines'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >- + one + two +bar: >- + one + two +EOF; + $expected = array( + 'foo' => 'one two', + 'bar' => 'one two', + ); + $tests['Folded block chomping strip without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: > + one + two +bar: > + one + two + +EOF; + $expected = array( + 'foo' => "one two\n", + 'bar' => "one two\n", + ); + $tests['Folded block chomping clip with single trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: > + one + two + +bar: > + one + two + + +EOF; + $expected = array( + 'foo' => "one two\n", + 'bar' => "one two\n", + ); + $tests['Folded block chomping clip with multiple trailing newlines'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: > + one + two +bar: > + one + two +EOF; + $expected = array( + 'foo' => "one two\n", + 'bar' => 'one two', + ); + $tests['Folded block chomping clip without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >+ + one + two +bar: >+ + one + two + +EOF; + $expected = array( + 'foo' => "one two\n", + 'bar' => "one two\n", + ); + $tests['Folded block chomping keep with single trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >+ + one + two + +bar: >+ + one + two + + +EOF; + $expected = array( + 'foo' => "one two\n\n", + 'bar' => "one two\n\n", + ); + $tests['Folded block chomping keep with multiple trailing newlines'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >+ + one + two +bar: >+ + one + two +EOF; + $expected = array( + 'foo' => "one two\n", + 'bar' => 'one two', + ); + $tests['Folded block chomping keep without trailing newline'] = array($expected, $yaml); + + return $tests; + } + + /** + * @dataProvider getBlockChompingTests + */ + public function testBlockChomping($expected, $yaml) + { + $this->assertSame($expected, $this->parser->parse($yaml)); + } + + /** + * Regression test for issue #7989. + * + * @see https://github.com/symfony/symfony/issues/7989 + */ + public function testBlockLiteralWithLeadingNewlines() + { + $yaml = <<<'EOF' +foo: |- + + + bar + +EOF; + $expected = array( + 'foo' => "\n\nbar", + ); + + $this->assertSame($expected, $this->parser->parse($yaml)); + } + + public function testObjectSupportEnabled() + { + $input = <<<'EOF' +foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";} +bar: 1 +EOF; + $this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, Yaml::PARSE_OBJECT), '->parse() is able to parse objects'); + } + + /** + * @group legacy + */ + public function testObjectSupportEnabledPassingTrue() + { + $input = <<<'EOF' +foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";} +bar: 1 +EOF; + $this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, false, true), '->parse() is able to parse objects'); + } + + /** + * @group legacy + */ + public function testObjectSupportEnabledWithDeprecatedTag() + { + $input = <<<'EOF' +foo: !!php/object:O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";} +bar: 1 +EOF; + $this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, Yaml::PARSE_OBJECT), '->parse() is able to parse objects'); + } + + /** + * @dataProvider invalidDumpedObjectProvider + */ + public function testObjectSupportDisabledButNoExceptions($input) + { + $this->assertEquals(array('foo' => null, 'bar' => 1), $this->parser->parse($input), '->parse() does not parse objects'); + } + + /** + * @dataProvider getObjectForMapTests + */ + public function testObjectForMap($yaml, $expected) + { + $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP)); + } + + /** + * @group legacy + * @dataProvider getObjectForMapTests + */ + public function testObjectForMapEnabledWithMappingUsingBooleanToggles($yaml, $expected) + { + $this->assertEquals($expected, $this->parser->parse($yaml, false, false, true)); + } + + public function getObjectForMapTests() + { + $tests = array(); + + $yaml = <<<'EOF' +foo: + fiz: [cat] +EOF; + $expected = new \stdClass(); + $expected->foo = new \stdClass(); + $expected->foo->fiz = array('cat'); + $tests['mapping'] = array($yaml, $expected); + + $yaml = '{ "foo": "bar", "fiz": "cat" }'; + $expected = new \stdClass(); + $expected->foo = 'bar'; + $expected->fiz = 'cat'; + $tests['inline-mapping'] = array($yaml, $expected); + + $yaml = "foo: bar\nbaz: foobar"; + $expected = new \stdClass(); + $expected->foo = 'bar'; + $expected->baz = 'foobar'; + $tests['object-for-map-is-applied-after-parsing'] = array($yaml, $expected); + + $yaml = <<<'EOT' +array: + - key: one + - key: two +EOT; + $expected = new \stdClass(); + $expected->array = array(); + $expected->array[0] = new \stdClass(); + $expected->array[0]->key = 'one'; + $expected->array[1] = new \stdClass(); + $expected->array[1]->key = 'two'; + $tests['nest-map-and-sequence'] = array($yaml, $expected); + + $yaml = <<<'YAML' +map: + 1: one + 2: two +YAML; + $expected = new \stdClass(); + $expected->map = new \stdClass(); + $expected->map->{1} = 'one'; + $expected->map->{2} = 'two'; + $tests['numeric-keys'] = array($yaml, $expected); + + $yaml = <<<'YAML' +map: + 0: one + 1: two +YAML; + $expected = new \stdClass(); + $expected->map = new \stdClass(); + $expected->map->{0} = 'one'; + $expected->map->{1} = 'two'; + $tests['zero-indexed-numeric-keys'] = array($yaml, $expected); + + return $tests; + } + + /** + * @dataProvider invalidDumpedObjectProvider + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testObjectsSupportDisabledWithExceptions($yaml) + { + $this->parser->parse($yaml, Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE); + } + + /** + * @group legacy + * @dataProvider invalidDumpedObjectProvider + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testObjectsSupportDisabledWithExceptionsUsingBooleanToggles($yaml) + { + $this->parser->parse($yaml, true); + } + + public function invalidDumpedObjectProvider() + { + $yamlTag = <<<'EOF' +foo: !!php/object:O:30:"Symfony\Tests\Component\Yaml\B":1:{s:1:"b";s:3:"foo";} +bar: 1 +EOF; + $localTag = <<<'EOF' +foo: !php/object:O:30:"Symfony\Tests\Component\Yaml\B":1:{s:1:"b";s:3:"foo";} +bar: 1 +EOF; + + return array( + 'yaml-tag' => array($yamlTag), + 'local-tag' => array($localTag), + ); + } + + /** + * @requires extension iconv + */ + public function testNonUtf8Exception() + { + $yamls = array( + iconv('UTF-8', 'ISO-8859-1', "foo: 'äöüß'"), + iconv('UTF-8', 'ISO-8859-15', "euro: '€'"), + iconv('UTF-8', 'CP1252', "cp1252: '©ÉÇáñ'"), + ); + + foreach ($yamls as $yaml) { + try { + $this->parser->parse($yaml); + + $this->fail('charsets other than UTF-8 are rejected.'); + } catch (\Exception $e) { + $this->assertInstanceOf('Symfony\Component\Yaml\Exception\ParseException', $e, 'charsets other than UTF-8 are rejected.'); + } + } + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testUnindentedCollectionException() + { + $yaml = <<<'EOF' + +collection: +-item1 +-item2 +-item3 + +EOF; + + $this->parser->parse($yaml); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testShortcutKeyUnindentedCollectionException() + { + $yaml = <<<'EOF' + +collection: +- key: foo + foo: bar + +EOF; + + $this->parser->parse($yaml); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessageRegExp /^Multiple documents are not supported.+/ + */ + public function testMultipleDocumentsNotSupportedException() + { + Yaml::parse(<<<'EOL' +# Ranking of 1998 home runs +--- +- Mark McGwire +- Sammy Sosa +- Ken Griffey + +# Team ranking +--- +- Chicago Cubs +- St Louis Cardinals +EOL + ); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testSequenceInAMapping() + { + Yaml::parse(<<<'EOF' +yaml: + hash: me + - array stuff +EOF + ); + } + + public function testSequenceInMappingStartedBySingleDashLine() + { + $yaml = <<<'EOT' +a: +- + b: + - + bar: baz +- foo +d: e +EOT; + $expected = array( + 'a' => array( + array( + 'b' => array( + array( + 'bar' => 'baz', + ), + ), + ), + 'foo', + ), + 'd' => 'e', + ); + + $this->assertSame($expected, $this->parser->parse($yaml)); + } + + public function testSequenceFollowedByCommentEmbeddedInMapping() + { + $yaml = <<<'EOT' +a: + b: + - c +# comment + d: e +EOT; + $expected = array( + 'a' => array( + 'b' => array('c'), + 'd' => 'e', + ), + ); + + $this->assertSame($expected, $this->parser->parse($yaml)); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testMappingInASequence() + { + Yaml::parse(<<<'EOF' +yaml: + - array stuff + hash: me +EOF + ); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage missing colon + */ + public function testScalarInSequence() + { + Yaml::parse(<<<'EOF' +foo: + - bar +"missing colon" + foo: bar +EOF + ); + } + + /** + * > It is an error for two equal keys to appear in the same mapping node. + * > In such a case the YAML processor may continue, ignoring the second + * > `key: value` pair and issuing an appropriate warning. This strategy + * > preserves a consistent information model for one-pass and random access + * > applications. + * + * @see http://yaml.org/spec/1.2/spec.html#id2759572 + * @see http://yaml.org/spec/1.1/#id932806 + * @group legacy + */ + public function testMappingDuplicateKeyBlock() + { + $input = <<<'EOD' +parent: + child: first + child: duplicate +parent: + child: duplicate + child: duplicate +EOD; + $expected = array( + 'parent' => array( + 'child' => 'first', + ), + ); + $this->assertSame($expected, Yaml::parse($input)); + } + + /** + * @group legacy + */ + public function testMappingDuplicateKeyFlow() + { + $input = <<<'EOD' +parent: { child: first, child: duplicate } +parent: { child: duplicate, child: duplicate } +EOD; + $expected = array( + 'parent' => array( + 'child' => 'first', + ), + ); + $this->assertSame($expected, Yaml::parse($input)); + } + + /** + * @group legacy + * @dataProvider getParseExceptionOnDuplicateData + * @expectedDeprecation Duplicate key "%s" detected on line %d whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated %s. + * throws \Symfony\Component\Yaml\Exception\ParseException in 4.0 + */ + public function testParseExceptionOnDuplicate($input, $duplicateKey, $lineNumber) + { + Yaml::parse($input); + } + + public function getParseExceptionOnDuplicateData() + { + $tests = array(); + + $yaml = <<assertEquals(array('hash' => null), Yaml::parse($input)); + } + + public function testCommentAtTheRootIndent() + { + $this->assertEquals(array( + 'services' => array( + 'app.foo_service' => array( + 'class' => 'Foo', + ), + 'app/bar_service' => array( + 'class' => 'Bar', + ), + ), + ), Yaml::parse(<<<'EOF' +# comment 1 +services: +# comment 2 + # comment 3 + app.foo_service: + class: Foo +# comment 4 + # comment 5 + app/bar_service: + class: Bar +EOF + )); + } + + public function testStringBlockWithComments() + { + $this->assertEquals(array('content' => <<<'EOT' +# comment 1 +header + + # comment 2 + +

    title

    + + +footer # comment3 +EOT + ), Yaml::parse(<<<'EOF' +content: | + # comment 1 + header + + # comment 2 + +

    title

    + + + footer # comment3 +EOF + )); + } + + public function testFoldedStringBlockWithComments() + { + $this->assertEquals(array(array('content' => <<<'EOT' +# comment 1 +header + + # comment 2 + +

    title

    + + +footer # comment3 +EOT + )), Yaml::parse(<<<'EOF' +- + content: | + # comment 1 + header + + # comment 2 + +

    title

    + + + footer # comment3 +EOF + )); + } + + public function testNestedFoldedStringBlockWithComments() + { + $this->assertEquals(array(array( + 'title' => 'some title', + 'content' => <<<'EOT' +# comment 1 +header + + # comment 2 + +

    title

    + + +footer # comment3 +EOT + )), Yaml::parse(<<<'EOF' +- + title: some title + content: | + # comment 1 + header + + # comment 2 + +

    title

    + + + footer # comment3 +EOF + )); + } + + public function testReferenceResolvingInInlineStrings() + { + $this->assertEquals(array( + 'var' => 'var-value', + 'scalar' => 'var-value', + 'list' => array('var-value'), + 'list_in_list' => array(array('var-value')), + 'map_in_list' => array(array('key' => 'var-value')), + 'embedded_mapping' => array(array('key' => 'var-value')), + 'map' => array('key' => 'var-value'), + 'list_in_map' => array('key' => array('var-value')), + 'map_in_map' => array('foo' => array('bar' => 'var-value')), + ), Yaml::parse(<<<'EOF' +var: &var var-value +scalar: *var +list: [ *var ] +list_in_list: [[ *var ]] +map_in_list: [ { key: *var } ] +embedded_mapping: [ key: *var ] +map: { key: *var } +list_in_map: { key: [*var] } +map_in_map: { foo: { bar: *var } } +EOF + )); + } + + public function testYamlDirective() + { + $yaml = <<<'EOF' +%YAML 1.2 +--- +foo: 1 +bar: 2 +EOF; + $this->assertEquals(array('foo' => 1, 'bar' => 2), $this->parser->parse($yaml)); + } + + public function testFloatKeys() + { + $yaml = <<<'EOF' +foo: + 1.2: "bar" + 1.3: "baz" +EOF; + + $expected = array( + 'foo' => array( + '1.2' => 'bar', + '1.3' => 'baz', + ), + ); + + $this->assertEquals($expected, $this->parser->parse($yaml)); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage A colon cannot be used in an unquoted mapping value + */ + public function testColonInMappingValueException() + { + $yaml = <<<'EOF' +foo: bar: baz +EOF; + + $this->parser->parse($yaml); + } + + public function testColonInMappingValueExceptionNotTriggeredByColonInComment() + { + $yaml = <<<'EOT' +foo: + bar: foobar # Note: a comment after a colon +EOT; + + $this->assertSame(array('foo' => array('bar' => 'foobar')), $this->parser->parse($yaml)); + } + + /** + * @dataProvider getCommentLikeStringInScalarBlockData + */ + public function testCommentLikeStringsAreNotStrippedInBlockScalars($yaml, $expectedParserResult) + { + $this->assertSame($expectedParserResult, $this->parser->parse($yaml)); + } + + public function getCommentLikeStringInScalarBlockData() + { + $tests = array(); + + $yaml = <<<'EOT' +pages: + - + title: some title + content: | + # comment 1 + header + + # comment 2 + +

    title

    + + + footer # comment3 +EOT; + $expected = array( + 'pages' => array( + array( + 'title' => 'some title', + 'content' => <<<'EOT' +# comment 1 +header + + # comment 2 + +

    title

    + + +footer # comment3 +EOT + , + ), + ), + ); + $tests[] = array($yaml, $expected); + + $yaml = <<<'EOT' +test: | + foo + # bar + baz +collection: + - one: | + foo + # bar + baz + - two: | + foo + # bar + baz +EOT; + $expected = array( + 'test' => <<<'EOT' +foo +# bar +baz + +EOT + , + 'collection' => array( + array( + 'one' => <<<'EOT' +foo +# bar +baz + +EOT + , + ), + array( + 'two' => <<<'EOT' +foo +# bar +baz +EOT + , + ), + ), + ); + $tests[] = array($yaml, $expected); + + $yaml = <<<'EOT' +foo: + bar: + scalar-block: > + line1 + line2> + baz: +# comment + foobar: ~ +EOT; + $expected = array( + 'foo' => array( + 'bar' => array( + 'scalar-block' => "line1 line2>\n", + ), + 'baz' => array( + 'foobar' => null, + ), + ), + ); + $tests[] = array($yaml, $expected); + + $yaml = <<<'EOT' +a: + b: hello +# c: | +# first row +# second row + d: hello +EOT; + $expected = array( + 'a' => array( + 'b' => 'hello', + 'd' => 'hello', + ), + ); + $tests[] = array($yaml, $expected); + + return $tests; + } + + public function testBlankLinesAreParsedAsNewLinesInFoldedBlocks() + { + $yaml = <<<'EOT' +test: > +

    A heading

    + +
      +
    • a list
    • +
    • may be a good example
    • +
    +EOT; + + $this->assertSame( + array( + 'test' => <<<'EOT' +

    A heading

    +
    • a list
    • may be a good example
    +EOT + , + ), + $this->parser->parse($yaml) + ); + } + + public function testAdditionallyIndentedLinesAreParsedAsNewLinesInFoldedBlocks() + { + $yaml = <<<'EOT' +test: > +

    A heading

    + +
      +
    • a list
    • +
    • may be a good example
    • +
    +EOT; + + $this->assertSame( + array( + 'test' => <<<'EOT' +

    A heading

    +
      +
    • a list
    • +
    • may be a good example
    • +
    +EOT + , + ), + $this->parser->parse($yaml) + ); + } + + /** + * @dataProvider getBinaryData + */ + public function testParseBinaryData($data) + { + $this->assertSame(array('data' => 'Hello world'), $this->parser->parse($data)); + } + + public function getBinaryData() + { + return array( + 'enclosed with double quotes' => array('data: !!binary "SGVsbG8gd29ybGQ="'), + 'enclosed with single quotes' => array("data: !!binary 'SGVsbG8gd29ybGQ='"), + 'containing spaces' => array('data: !!binary "SGVs bG8gd 29ybGQ="'), + 'in block scalar' => array( + <<<'EOT' +data: !!binary | + SGVsbG8gd29ybGQ= +EOT + ), + 'containing spaces in block scalar' => array( + <<<'EOT' +data: !!binary | + SGVs bG8gd 29ybGQ= +EOT + ), + ); + } + + /** + * @dataProvider getInvalidBinaryData + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseInvalidBinaryData($data, $expectedMessage) + { + if (method_exists($this, 'expectException')) { + $this->expectExceptionMessageRegExp($expectedMessage); + } else { + $this->setExpectedExceptionRegExp(ParseException::class, $expectedMessage); + } + + $this->parser->parse($data); + } + + public function getInvalidBinaryData() + { + return array( + 'length not a multiple of four' => array('data: !!binary "SGVsbG8d29ybGQ="', '/The normalized base64 encoded data \(data without whitespace characters\) length must be a multiple of four \(\d+ bytes given\)/'), + 'invalid characters' => array('!!binary "SGVsbG8#d29ybGQ="', '/The base64 encoded data \(.*\) contains invalid characters/'), + 'too many equals characters' => array('data: !!binary "SGVsbG8gd29yb==="', '/The base64 encoded data \(.*\) contains invalid characters/'), + 'misplaced equals character' => array('data: !!binary "SGVsbG8gd29ybG=Q"', '/The base64 encoded data \(.*\) contains invalid characters/'), + 'length not a multiple of four in block scalar' => array( + <<<'EOT' +data: !!binary | + SGVsbG8d29ybGQ= +EOT + , + '/The normalized base64 encoded data \(data without whitespace characters\) length must be a multiple of four \(\d+ bytes given\)/', + ), + 'invalid characters in block scalar' => array( + <<<'EOT' +data: !!binary | + SGVsbG8#d29ybGQ= +EOT + , + '/The base64 encoded data \(.*\) contains invalid characters/', + ), + 'too many equals characters in block scalar' => array( + <<<'EOT' +data: !!binary | + SGVsbG8gd29yb=== +EOT + , + '/The base64 encoded data \(.*\) contains invalid characters/', + ), + 'misplaced equals character in block scalar' => array( + <<<'EOT' +data: !!binary | + SGVsbG8gd29ybG=Q +EOT + , + '/The base64 encoded data \(.*\) contains invalid characters/', + ), + ); + } + + public function testParseDateAsMappingValue() + { + $yaml = <<<'EOT' +date: 2002-12-14 +EOT; + $expectedDate = new \DateTime(); + $expectedDate->setTimeZone(new \DateTimeZone('UTC')); + $expectedDate->setDate(2002, 12, 14); + $expectedDate->setTime(0, 0, 0); + + $this->assertEquals(array('date' => $expectedDate), $this->parser->parse($yaml, Yaml::PARSE_DATETIME)); + } + + /** + * @param $lineNumber + * @param $yaml + * @dataProvider parserThrowsExceptionWithCorrectLineNumberProvider + */ + public function testParserThrowsExceptionWithCorrectLineNumber($lineNumber, $yaml) + { + if (method_exists($this, 'expectException')) { + $this->expectException('\Symfony\Component\Yaml\Exception\ParseException'); + $this->expectExceptionMessage(sprintf('Unexpected characters near "," at line %d (near "bar: "123",").', $lineNumber)); + } else { + $this->setExpectedException('\Symfony\Component\Yaml\Exception\ParseException', sprintf('Unexpected characters near "," at line %d (near "bar: "123",").', $lineNumber)); + } + + $this->parser->parse($yaml); + } + + public function parserThrowsExceptionWithCorrectLineNumberProvider() + { + return array( + array( + 4, + <<<'YAML' +foo: + - + # bar + bar: "123", +YAML + ), + array( + 5, + <<<'YAML' +foo: + - + # bar + # bar + bar: "123", +YAML + ), + array( + 8, + <<<'YAML' +foo: + - + # foobar + baz: 123 +bar: + - + # bar + bar: "123", +YAML + ), + array( + 10, + <<<'YAML' +foo: + - + # foobar + # foobar + baz: 123 +bar: + - + # bar + # bar + bar: "123", +YAML + ), + ); + } + + public function testParseMultiLineQuotedString() + { + $yaml = <<assertSame(array('foo' => 'bar baz foobar foo', 'bar' => 'baz'), $this->parser->parse($yaml)); + } + + public function testParseMultiLineUnquotedString() + { + $yaml = <<assertSame(array('foo' => 'bar baz foobar foo', 'bar' => 'baz'), $this->parser->parse($yaml)); + } +} + +class B +{ + public $b = 'foo'; +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/YamlTest.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/YamlTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3f6c2525f755cfbd0fb8c78ea50b1f7138d99ca7 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/YamlTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Yaml\Yaml; + +class YamlTest extends TestCase +{ + public function testParseAndDump() + { + $data = array('lorem' => 'ipsum', 'dolor' => 'sit'); + $yml = Yaml::dump($data); + $parsed = Yaml::parse($yml); + $this->assertEquals($data, $parsed); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The indentation must be greater than zero + */ + public function testZeroIndentationThrowsException() + { + Yaml::dump(array('lorem' => 'ipsum', 'dolor' => 'sit'), 2, 0); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The indentation must be greater than zero + */ + public function testNegativeIndentationThrowsException() + { + Yaml::dump(array('lorem' => 'ipsum', 'dolor' => 'sit'), 2, -4); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Unescaper.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Unescaper.php new file mode 100644 index 0000000000000000000000000000000000000000..6e863e12f2ad498df43e48a1a517409f69bbcc3e --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Unescaper.php @@ -0,0 +1,142 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml; + +use Symfony\Component\Yaml\Exception\ParseException; + +/** + * Unescaper encapsulates unescaping rules for single and double-quoted + * YAML strings. + * + * @author Matthew Lewinski + * + * @internal + */ +class Unescaper +{ + /** + * Regex fragment that matches an escaped character in a double quoted string. + */ + const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)'; + + /** + * Unescapes a single quoted string. + * + * @param string $value A single quoted string + * + * @return string The unescaped string + */ + public function unescapeSingleQuotedString($value) + { + return str_replace('\'\'', '\'', $value); + } + + /** + * Unescapes a double quoted string. + * + * @param string $value A double quoted string + * + * @return string The unescaped string + */ + public function unescapeDoubleQuotedString($value) + { + $callback = function ($match) { + return $this->unescapeCharacter($match[0]); + }; + + // evaluate the string + return preg_replace_callback('/'.self::REGEX_ESCAPED_CHARACTER.'/u', $callback, $value); + } + + /** + * Unescapes a character that was found in a double-quoted string. + * + * @param string $value An escaped character + * + * @return string The unescaped character + */ + private function unescapeCharacter($value) + { + switch ($value[1]) { + case '0': + return "\x0"; + case 'a': + return "\x7"; + case 'b': + return "\x8"; + case 't': + return "\t"; + case "\t": + return "\t"; + case 'n': + return "\n"; + case 'v': + return "\xB"; + case 'f': + return "\xC"; + case 'r': + return "\r"; + case 'e': + return "\x1B"; + case ' ': + return ' '; + case '"': + return '"'; + case '/': + return '/'; + case '\\': + return '\\'; + case 'N': + // U+0085 NEXT LINE + return "\xC2\x85"; + case '_': + // U+00A0 NO-BREAK SPACE + return "\xC2\xA0"; + case 'L': + // U+2028 LINE SEPARATOR + return "\xE2\x80\xA8"; + case 'P': + // U+2029 PARAGRAPH SEPARATOR + return "\xE2\x80\xA9"; + case 'x': + return self::utf8chr(hexdec(substr($value, 2, 2))); + case 'u': + return self::utf8chr(hexdec(substr($value, 2, 4))); + case 'U': + return self::utf8chr(hexdec(substr($value, 2, 8))); + default: + throw new ParseException(sprintf('Found unknown escape character "%s".', $value)); + } + } + + /** + * Get the UTF-8 character for the given code point. + * + * @param int $c The unicode code point + * + * @return string The corresponding UTF-8 character + */ + private static function utf8chr($c) + { + if (0x80 > $c %= 0x200000) { + return chr($c); + } + if (0x800 > $c) { + return chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F); + } + if (0x10000 > $c) { + return chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); + } + + return chr(0xF0 | $c >> 18).chr(0x80 | $c >> 12 & 0x3F).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/Yaml.php b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Yaml.php new file mode 100644 index 0000000000000000000000000000000000000000..46e6ef5c17a8374b7a59f022d196ef163934e5e3 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/Yaml.php @@ -0,0 +1,119 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml; + +use Symfony\Component\Yaml\Exception\ParseException; + +/** + * Yaml offers convenience methods to load and dump YAML. + * + * @author Fabien Potencier + */ +class Yaml +{ + const DUMP_OBJECT = 1; + const PARSE_EXCEPTION_ON_INVALID_TYPE = 2; + const PARSE_OBJECT = 4; + const PARSE_OBJECT_FOR_MAP = 8; + const DUMP_EXCEPTION_ON_INVALID_TYPE = 16; + const PARSE_DATETIME = 32; + const DUMP_OBJECT_AS_MAP = 64; + const DUMP_MULTI_LINE_LITERAL_BLOCK = 128; + const PARSE_CONSTANT = 256; + + /** + * Parses YAML into a PHP value. + * + * Usage: + * + * $array = Yaml::parse(file_get_contents('config.yml')); + * print_r($array); + * + * + * @param string $input A string containing YAML + * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior + * + * @return mixed The YAML converted to a PHP value + * + * @throws ParseException If the YAML is not valid + */ + public static function parse($input, $flags = 0) + { + if (is_bool($flags)) { + @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since version 3.1 and will be removed in 4.0. Use the PARSE_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); + + if ($flags) { + $flags = self::PARSE_EXCEPTION_ON_INVALID_TYPE; + } else { + $flags = 0; + } + } + + if (func_num_args() >= 3) { + @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the PARSE_OBJECT flag instead.', E_USER_DEPRECATED); + + if (func_get_arg(2)) { + $flags |= self::PARSE_OBJECT; + } + } + + if (func_num_args() >= 4) { + @trigger_error('Passing a boolean flag to toggle object for map support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT_FOR_MAP flag instead.', E_USER_DEPRECATED); + + if (func_get_arg(3)) { + $flags |= self::PARSE_OBJECT_FOR_MAP; + } + } + + $yaml = new Parser(); + + return $yaml->parse($input, $flags); + } + + /** + * Dumps a PHP value to a YAML string. + * + * The dump method, when supplied with an array, will do its best + * to convert the array into friendly YAML. + * + * @param mixed $input The PHP value + * @param int $inline The level where you switch to inline YAML + * @param int $indent The amount of spaces to use for indentation of nested nodes + * @param int $flags A bit field of DUMP_* constants to customize the dumped YAML string + * + * @return string A YAML string representing the original PHP value + */ + public static function dump($input, $inline = 2, $indent = 4, $flags = 0) + { + if (is_bool($flags)) { + @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since version 3.1 and will be removed in 4.0. Use the DUMP_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); + + if ($flags) { + $flags = self::DUMP_EXCEPTION_ON_INVALID_TYPE; + } else { + $flags = 0; + } + } + + if (func_num_args() >= 5) { + @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the DUMP_OBJECT flag instead.', E_USER_DEPRECATED); + + if (func_get_arg(4)) { + $flags |= self::DUMP_OBJECT; + } + } + + $yaml = new Dumper($indent); + + return $yaml->dump($input, $inline, 0, $flags); + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/composer.json b/vendor/symfony/symfony/src/Symfony/Component/Yaml/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..9c92bebcf2e00f5dfe33453704aea8ecfa20f2e8 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/composer.json @@ -0,0 +1,39 @@ +{ + "name": "symfony/yaml", + "type": "library", + "description": "Symfony Yaml Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/console": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Yaml\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + } +} diff --git a/vendor/symfony/symfony/src/Symfony/Component/Yaml/phpunit.xml.dist b/vendor/symfony/symfony/src/Symfony/Component/Yaml/phpunit.xml.dist new file mode 100644 index 0000000000000000000000000000000000000000..6bdbea16e64262ac101186fceb586bfd19c58207 --- /dev/null +++ b/vendor/symfony/symfony/src/Symfony/Component/Yaml/phpunit.xml.dist @@ -0,0 +1,28 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/vendor/twig/twig/.editorconfig b/vendor/twig/twig/.editorconfig new file mode 100644 index 0000000000000000000000000000000000000000..270f1d1b770fc7163ac951bafe0ece7a94ac3d0e --- /dev/null +++ b/vendor/twig/twig/.editorconfig @@ -0,0 +1,18 @@ +; top-most EditorConfig file +root = true + +; Unix-style newlines +[*] +end_of_line = LF + +[*.php] +indent_style = space +indent_size = 4 + +[*.test] +indent_style = space +indent_size = 4 + +[*.rst] +indent_style = space +indent_size = 4 diff --git a/vendor/twig/twig/.php_cs.dist b/vendor/twig/twig/.php_cs.dist new file mode 100644 index 0000000000000000000000000000000000000000..cd75923a1649aa489e778cc858a4bffa4bd2d467 --- /dev/null +++ b/vendor/twig/twig/.php_cs.dist @@ -0,0 +1,15 @@ +setRules(array( + '@Symfony' => true, + '@Symfony:risky' => true, + 'array_syntax' => array('syntax' => 'long'), + 'php_unit_fqcn_annotation' => false, + 'no_unreachable_default_argument_value' => false, + 'braces' => array('allow_single_line_closure' => true), + 'heredoc_to_nowdoc' => false, + )) + ->setRiskyAllowed(true) + ->setFinder(PhpCsFixer\Finder::create()->in(__DIR__)) +; diff --git a/vendor/twig/twig/.travis.yml b/vendor/twig/twig/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..41b7510b82c71d37ac2643cecd1baa4d3b3ca873 --- /dev/null +++ b/vendor/twig/twig/.travis.yml @@ -0,0 +1,44 @@ +language: php + +sudo: false + +cache: + directories: + - vendor + - $HOME/.composer/cache/files + +php: + - 5.2 + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - hhvm + +env: + - TWIG_EXT=no + - TWIG_EXT=yes + +before_install: + - if [[ ! $TRAVIS_PHP_VERSION = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi + +install: + # Composer is not available on PHP 5.2 + - if [ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]; then travis_retry composer install; fi + +before_script: + - if [ "$TWIG_EXT" == "yes" ]; then sh -c "cd ext/twig && phpize && ./configure --enable-twig && make && make install"; fi + - if [ "$TWIG_EXT" == "yes" ]; then echo "extension=twig.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi + - if [ ${TRAVIS_PHP_VERSION:0:3} == "5.2" ]; then sed -i.bak "s|vendor/autoload.php|test/bootstrap.php|" phpunit.xml.dist; fi + +matrix: + fast_finish: true + exclude: + - php: hhvm + env: TWIG_EXT=yes + - php: 7.0 + env: TWIG_EXT=yes + - php: 7.1 + env: TWIG_EXT=yes diff --git a/vendor/twig/twig/LICENSE b/vendor/twig/twig/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..b6e17a1a6d96172bcd8e34debfe357f4dce26a1b --- /dev/null +++ b/vendor/twig/twig/LICENSE @@ -0,0 +1,31 @@ +Copyright (c) 2009-2017 by the Twig Team. + +Some rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/twig/twig/README.rst b/vendor/twig/twig/README.rst new file mode 100644 index 0000000000000000000000000000000000000000..81737b0b2c2b6981325e762a43518c56dc0ca3e8 --- /dev/null +++ b/vendor/twig/twig/README.rst @@ -0,0 +1,15 @@ +Twig, the flexible, fast, and secure template language for PHP +============================================================== + +Twig is a template language for PHP, released under the new BSD license (code +and documentation). + +Twig uses a syntax similar to the Django and Jinja template languages which +inspired the Twig runtime environment. + +More Information +---------------- + +Read the `documentation`_ for more information. + +.. _documentation: http://twig.sensiolabs.org/documentation diff --git a/vendor/twig/twig/composer.json b/vendor/twig/twig/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..f53b91b32d4cd88b5948da2a751152044e803e2d --- /dev/null +++ b/vendor/twig/twig/composer.json @@ -0,0 +1,47 @@ +{ + "name": "twig/twig", + "type": "library", + "description": "Twig, the flexible, fast, and secure template language for PHP", + "keywords": ["templating"], + "homepage": "http://twig.sensiolabs.org", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "homepage": "http://twig.sensiolabs.org/contributors", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "support": { + "forum": "https://groups.google.com/forum/#!forum/twig-users" + }, + "require": { + "php": ">=5.2.7" + }, + "require-dev": { + "symfony/phpunit-bridge": "~3.2", + "symfony/debug": "~2.7", + "psr/container": "^1.0" + }, + "autoload": { + "psr-0" : { + "Twig_" : "lib/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.32-dev" + } + } +} diff --git a/vendor/twig/twig/ext/twig/config.m4 b/vendor/twig/twig/ext/twig/config.m4 new file mode 100644 index 0000000000000000000000000000000000000000..83486be4c27c8774fac76fc8e86b9f0d59b5fec6 --- /dev/null +++ b/vendor/twig/twig/ext/twig/config.m4 @@ -0,0 +1,8 @@ +dnl config.m4 for extension twig + +PHP_ARG_ENABLE(twig, whether to enable twig support, +[ --enable-twig Enable twig support]) + +if test "$PHP_TWIG" != "no"; then + PHP_NEW_EXTENSION(twig, twig.c, $ext_shared) +fi diff --git a/vendor/twig/twig/ext/twig/config.w32 b/vendor/twig/twig/ext/twig/config.w32 new file mode 100644 index 0000000000000000000000000000000000000000..cb287b99ba25d486268a1025e03fe75527c04531 --- /dev/null +++ b/vendor/twig/twig/ext/twig/config.w32 @@ -0,0 +1,8 @@ +// vim:ft=javascript + +ARG_ENABLE("twig", "Twig support", "no"); + +if (PHP_TWIG != "no") { + AC_DEFINE('HAVE_TWIG', 1); + EXTENSION('twig', 'twig.c'); +} diff --git a/vendor/twig/twig/ext/twig/php_twig.h b/vendor/twig/twig/ext/twig/php_twig.h new file mode 100644 index 0000000000000000000000000000000000000000..43a839c5c545198c5599668ae4cd321ac8c9514c --- /dev/null +++ b/vendor/twig/twig/ext/twig/php_twig.h @@ -0,0 +1,35 @@ +/* + +----------------------------------------------------------------------+ + | Twig Extension | + +----------------------------------------------------------------------+ + | Copyright (c) 2011 Derick Rethans | + +----------------------------------------------------------------------+ + | Redistribution and use in source and binary forms, with or without | + | modification, are permitted provided that the conditions mentioned | + | in the accompanying LICENSE file are met (BSD-3-Clause). | + +----------------------------------------------------------------------+ + | Author: Derick Rethans | + +----------------------------------------------------------------------+ + */ + +#ifndef PHP_TWIG_H +#define PHP_TWIG_H + +#define PHP_TWIG_VERSION "1.32.0" + +#include "php.h" + +extern zend_module_entry twig_module_entry; +#define phpext_twig_ptr &twig_module_entry +#ifndef PHP_WIN32 +zend_module_entry *get_module(void); +#endif + +#ifdef ZTS +#include "TSRM.h" +#endif + +PHP_FUNCTION(twig_template_get_attributes); +PHP_RSHUTDOWN_FUNCTION(twig); + +#endif diff --git a/vendor/twig/twig/ext/twig/twig.c b/vendor/twig/twig/ext/twig/twig.c new file mode 100644 index 0000000000000000000000000000000000000000..6173c006728e5fa7cb9852f76ef455dcc074779f --- /dev/null +++ b/vendor/twig/twig/ext/twig/twig.c @@ -0,0 +1,1215 @@ +/* + +----------------------------------------------------------------------+ + | Twig Extension | + +----------------------------------------------------------------------+ + | Copyright (c) 2011 Derick Rethans | + +----------------------------------------------------------------------+ + | Redistribution and use in source and binary forms, with or without | + | modification, are permitted provided that the conditions mentioned | + | in the accompanying LICENSE file are met (BSD-3-Clause). | + +----------------------------------------------------------------------+ + | Author: Derick Rethans | + +----------------------------------------------------------------------+ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "php.h" +#include "php_twig.h" +#include "ext/standard/php_var.h" +#include "ext/standard/php_string.h" +#include "ext/standard/php_smart_str.h" +#include "ext/spl/spl_exceptions.h" + +#include "Zend/zend_object_handlers.h" +#include "Zend/zend_interfaces.h" +#include "Zend/zend_exceptions.h" + +#ifndef Z_ADDREF_P +#define Z_ADDREF_P(pz) (pz)->refcount++ +#endif + +#ifndef E_USER_DEPRECATED +#define E_USER_DEPRECATED (1<<14L) +#endif + +#define FREE_DTOR(z) \ + zval_dtor(z); \ + efree(z); + +#if PHP_VERSION_ID >= 50300 + #define APPLY_TSRMLS_DC TSRMLS_DC + #define APPLY_TSRMLS_CC TSRMLS_CC + #define APPLY_TSRMLS_FETCH() +#else + #define APPLY_TSRMLS_DC + #define APPLY_TSRMLS_CC + #define APPLY_TSRMLS_FETCH() TSRMLS_FETCH() +#endif + +ZEND_BEGIN_ARG_INFO_EX(twig_template_get_attribute_args, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 6) + ZEND_ARG_INFO(0, template) + ZEND_ARG_INFO(0, object) + ZEND_ARG_INFO(0, item) + ZEND_ARG_INFO(0, arguments) + ZEND_ARG_INFO(0, type) + ZEND_ARG_INFO(0, isDefinedTest) +ZEND_END_ARG_INFO() + +#ifndef PHP_FE_END +#define PHP_FE_END { NULL, NULL, NULL} +#endif + +static const zend_function_entry twig_functions[] = { + PHP_FE(twig_template_get_attributes, twig_template_get_attribute_args) + PHP_FE_END +}; + +PHP_RSHUTDOWN_FUNCTION(twig) +{ +#if ZEND_DEBUG + CG(unclean_shutdown) = 0; /* get rid of PHPUnit's exit() and report memleaks */ +#endif + return SUCCESS; +} + +zend_module_entry twig_module_entry = { + STANDARD_MODULE_HEADER, + "twig", + twig_functions, + NULL, + NULL, + NULL, + PHP_RSHUTDOWN(twig), + NULL, + PHP_TWIG_VERSION, + STANDARD_MODULE_PROPERTIES +}; + + +#ifdef COMPILE_DL_TWIG +ZEND_GET_MODULE(twig) +#endif + +static int TWIG_ARRAY_KEY_EXISTS(zval *array, zval *key) +{ + if (Z_TYPE_P(array) != IS_ARRAY) { + return 0; + } + + switch (Z_TYPE_P(key)) { + case IS_NULL: + return zend_hash_exists(Z_ARRVAL_P(array), "", 1); + + case IS_BOOL: + case IS_DOUBLE: + convert_to_long(key); + case IS_LONG: + return zend_hash_index_exists(Z_ARRVAL_P(array), Z_LVAL_P(key)); + + default: + convert_to_string(key); + return zend_symtable_exists(Z_ARRVAL_P(array), Z_STRVAL_P(key), Z_STRLEN_P(key) + 1); + } +} + +static int TWIG_INSTANCE_OF(zval *object, zend_class_entry *interface TSRMLS_DC) +{ + if (Z_TYPE_P(object) != IS_OBJECT) { + return 0; + } + return instanceof_function(Z_OBJCE_P(object), interface TSRMLS_CC); +} + +static int TWIG_INSTANCE_OF_USERLAND(zval *object, char *interface TSRMLS_DC) +{ + zend_class_entry **pce; + if (Z_TYPE_P(object) != IS_OBJECT) { + return 0; + } + if (zend_lookup_class(interface, strlen(interface), &pce TSRMLS_CC) == FAILURE) { + return 0; + } + return instanceof_function(Z_OBJCE_P(object), *pce TSRMLS_CC); +} + +static zval *TWIG_GET_ARRAYOBJECT_ELEMENT(zval *object, zval *offset TSRMLS_DC) +{ + zend_class_entry *ce = Z_OBJCE_P(object); + zval *retval; + + if (Z_TYPE_P(object) == IS_OBJECT) { + SEPARATE_ARG_IF_REF(offset); + zend_call_method_with_1_params(&object, ce, NULL, "offsetget", &retval, offset); + + zval_ptr_dtor(&offset); + + if (!retval) { + if (!EG(exception)) { + zend_error(E_ERROR, "Undefined offset for object of type %s used as array.", ce->name); + } + return NULL; + } + + return retval; + } + return NULL; +} + +static int TWIG_ISSET_ARRAYOBJECT_ELEMENT(zval *object, zval *offset TSRMLS_DC) +{ + zend_class_entry *ce = Z_OBJCE_P(object); + zval *retval; + + if (Z_TYPE_P(object) == IS_OBJECT) { + SEPARATE_ARG_IF_REF(offset); + zend_call_method_with_1_params(&object, ce, NULL, "offsetexists", &retval, offset); + + zval_ptr_dtor(&offset); + + if (!retval) { + if (!EG(exception)) { + zend_error(E_ERROR, "Undefined offset for object of type %s used as array.", ce->name); + } + return 0; + } + + return (retval && Z_TYPE_P(retval) == IS_BOOL && Z_LVAL_P(retval)); + } + return 0; +} + +static char *TWIG_STRTOLOWER(const char *str, int str_len) +{ + char *item_dup; + + item_dup = estrndup(str, str_len); + php_strtolower(item_dup, str_len); + return item_dup; +} + +static zval *TWIG_CALL_USER_FUNC_ARRAY(zval *object, char *function, zval *arguments TSRMLS_DC) +{ + zend_fcall_info fci; + zval ***args = NULL; + int arg_count = 0; + HashTable *table; + HashPosition pos; + int i = 0; + zval *retval_ptr; + zval *zfunction; + + if (arguments) { + table = HASH_OF(arguments); + args = safe_emalloc(sizeof(zval **), table->nNumOfElements, 0); + + zend_hash_internal_pointer_reset_ex(table, &pos); + + while (zend_hash_get_current_data_ex(table, (void **)&args[i], &pos) == SUCCESS) { + i++; + zend_hash_move_forward_ex(table, &pos); + } + arg_count = table->nNumOfElements; + } + + MAKE_STD_ZVAL(zfunction); + ZVAL_STRING(zfunction, function, 1); + fci.size = sizeof(fci); + fci.function_table = EG(function_table); + fci.function_name = zfunction; + fci.symbol_table = NULL; +#if PHP_VERSION_ID >= 50300 + fci.object_ptr = object; +#else + fci.object_pp = &object; +#endif + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = arg_count; + fci.params = args; + fci.no_separation = 0; + + if (zend_call_function(&fci, NULL TSRMLS_CC) == FAILURE) { + ALLOC_INIT_ZVAL(retval_ptr); + ZVAL_BOOL(retval_ptr, 0); + } + + if (args) { + efree(fci.params); + } + FREE_DTOR(zfunction); + return retval_ptr; +} + +static int TWIG_CALL_BOOLEAN(zval *object, char *functionName TSRMLS_DC) +{ + zval *ret; + int res; + + ret = TWIG_CALL_USER_FUNC_ARRAY(object, functionName, NULL TSRMLS_CC); + res = Z_LVAL_P(ret); + zval_ptr_dtor(&ret); + return res; +} + +static zval *TWIG_GET_STATIC_PROPERTY(zval *class, char *prop_name TSRMLS_DC) +{ + zval **tmp_zval; + zend_class_entry *ce; + + if (class == NULL || Z_TYPE_P(class) != IS_OBJECT) { + return NULL; + } + + ce = zend_get_class_entry(class TSRMLS_CC); +#if PHP_VERSION_ID >= 50400 + tmp_zval = zend_std_get_static_property(ce, prop_name, strlen(prop_name), 0, NULL TSRMLS_CC); +#else + tmp_zval = zend_std_get_static_property(ce, prop_name, strlen(prop_name), 0 TSRMLS_CC); +#endif + return *tmp_zval; +} + +static zval *TWIG_GET_ARRAY_ELEMENT_ZVAL(zval *class, zval *prop_name TSRMLS_DC) +{ + zval **tmp_zval; + + if (class == NULL || Z_TYPE_P(class) != IS_ARRAY) { + if (class != NULL && Z_TYPE_P(class) == IS_OBJECT && TWIG_INSTANCE_OF(class, zend_ce_arrayaccess TSRMLS_CC)) { + // array access object + return TWIG_GET_ARRAYOBJECT_ELEMENT(class, prop_name TSRMLS_CC); + } + return NULL; + } + + switch(Z_TYPE_P(prop_name)) { + case IS_NULL: + zend_hash_find(HASH_OF(class), "", 1, (void**) &tmp_zval); + return *tmp_zval; + + case IS_BOOL: + case IS_DOUBLE: + convert_to_long(prop_name); + case IS_LONG: + zend_hash_index_find(HASH_OF(class), Z_LVAL_P(prop_name), (void **) &tmp_zval); + return *tmp_zval; + + case IS_STRING: + zend_symtable_find(HASH_OF(class), Z_STRVAL_P(prop_name), Z_STRLEN_P(prop_name) + 1, (void**) &tmp_zval); + return *tmp_zval; + } + + return NULL; +} + +static zval *TWIG_GET_ARRAY_ELEMENT(zval *class, char *prop_name, int prop_name_length TSRMLS_DC) +{ + zval **tmp_zval; + + if (class == NULL/* || Z_TYPE_P(class) != IS_ARRAY*/) { + return NULL; + } + + if (class != NULL && Z_TYPE_P(class) == IS_OBJECT && TWIG_INSTANCE_OF(class, zend_ce_arrayaccess TSRMLS_CC)) { + // array access object + zval *tmp_name_zval; + zval *tmp_ret_zval; + + ALLOC_INIT_ZVAL(tmp_name_zval); + ZVAL_STRING(tmp_name_zval, prop_name, 1); + tmp_ret_zval = TWIG_GET_ARRAYOBJECT_ELEMENT(class, tmp_name_zval TSRMLS_CC); + FREE_DTOR(tmp_name_zval); + return tmp_ret_zval; + } + + if (zend_symtable_find(HASH_OF(class), prop_name, prop_name_length+1, (void**)&tmp_zval) == SUCCESS) { + return *tmp_zval; + } + return NULL; +} + +static zval *TWIG_PROPERTY(zval *object, zval *propname TSRMLS_DC) +{ + zval *tmp = NULL; + + if (Z_OBJ_HT_P(object)->read_property) { +#if PHP_VERSION_ID >= 50400 + tmp = Z_OBJ_HT_P(object)->read_property(object, propname, BP_VAR_IS, NULL TSRMLS_CC); +#else + tmp = Z_OBJ_HT_P(object)->read_property(object, propname, BP_VAR_IS TSRMLS_CC); +#endif + if (tmp == EG(uninitialized_zval_ptr)) { + ZVAL_NULL(tmp); + } + } + return tmp; +} + +static int TWIG_HAS_PROPERTY(zval *object, zval *propname TSRMLS_DC) +{ + if (Z_OBJ_HT_P(object)->has_property) { +#if PHP_VERSION_ID >= 50400 + return Z_OBJ_HT_P(object)->has_property(object, propname, 0, NULL TSRMLS_CC); +#else + return Z_OBJ_HT_P(object)->has_property(object, propname, 0 TSRMLS_CC); +#endif + } + return 0; +} + +static int TWIG_HAS_DYNAMIC_PROPERTY(zval *object, char *prop, int prop_len TSRMLS_DC) +{ + if (Z_OBJ_HT_P(object)->get_properties) { + return zend_hash_quick_exists( + Z_OBJ_HT_P(object)->get_properties(object TSRMLS_CC), // the properties hash + prop, // property name + prop_len + 1, // property length + zend_get_hash_value(prop, prop_len + 1) // hash value + ); + } + return 0; +} + +static zval *TWIG_PROPERTY_CHAR(zval *object, char *propname TSRMLS_DC) +{ + zval *tmp_name_zval, *tmp; + + ALLOC_INIT_ZVAL(tmp_name_zval); + ZVAL_STRING(tmp_name_zval, propname, 1); + tmp = TWIG_PROPERTY(object, tmp_name_zval TSRMLS_CC); + FREE_DTOR(tmp_name_zval); + return tmp; +} + +static zval *TWIG_CALL_S(zval *object, char *method, char *arg0 TSRMLS_DC) +{ + zend_fcall_info fci; + zval **args[1]; + zval *argument; + zval *zfunction; + zval *retval_ptr; + + MAKE_STD_ZVAL(argument); + ZVAL_STRING(argument, arg0, 1); + args[0] = &argument; + + MAKE_STD_ZVAL(zfunction); + ZVAL_STRING(zfunction, method, 1); + fci.size = sizeof(fci); + fci.function_table = EG(function_table); + fci.function_name = zfunction; + fci.symbol_table = NULL; +#if PHP_VERSION_ID >= 50300 + fci.object_ptr = object; +#else + fci.object_pp = &object; +#endif + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = 1; + fci.params = args; + fci.no_separation = 0; + + if (zend_call_function(&fci, NULL TSRMLS_CC) == FAILURE) { + FREE_DTOR(zfunction); + zval_ptr_dtor(&argument); + return 0; + } + FREE_DTOR(zfunction); + zval_ptr_dtor(&argument); + return retval_ptr; +} + +static int TWIG_CALL_SB(zval *object, char *method, char *arg0 TSRMLS_DC) +{ + zval *retval_ptr; + int success; + + retval_ptr = TWIG_CALL_S(object, method, arg0 TSRMLS_CC); + success = (retval_ptr && (Z_TYPE_P(retval_ptr) == IS_BOOL) && Z_LVAL_P(retval_ptr)); + + if (retval_ptr) { + zval_ptr_dtor(&retval_ptr); + } + + return success; +} + +static int TWIG_CALL_ZZ(zval *object, char *method, zval *arg1, zval *arg2 TSRMLS_DC) +{ + zend_fcall_info fci; + zval **args[2]; + zval *zfunction; + zval *retval_ptr; + int success; + + args[0] = &arg1; + args[1] = &arg2; + + MAKE_STD_ZVAL(zfunction); + ZVAL_STRING(zfunction, method, 1); + fci.size = sizeof(fci); + fci.function_table = EG(function_table); + fci.function_name = zfunction; + fci.symbol_table = NULL; +#if PHP_VERSION_ID >= 50300 + fci.object_ptr = object; +#else + fci.object_pp = &object; +#endif + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = 2; + fci.params = args; + fci.no_separation = 0; + + if (zend_call_function(&fci, NULL TSRMLS_CC) == FAILURE) { + FREE_DTOR(zfunction); + return 0; + } + + FREE_DTOR(zfunction); + + success = (retval_ptr && (Z_TYPE_P(retval_ptr) == IS_BOOL) && Z_LVAL_P(retval_ptr)); + if (retval_ptr) { + zval_ptr_dtor(&retval_ptr); + } + + return success; +} + +#ifndef Z_SET_REFCOUNT_P +# define Z_SET_REFCOUNT_P(pz, rc) pz->refcount = rc +# define Z_UNSET_ISREF_P(pz) pz->is_ref = 0 +#endif + +static void TWIG_NEW(zval *object, char *class, zval *arg0, zval *arg1 TSRMLS_DC) +{ + zend_class_entry **pce; + + if (zend_lookup_class(class, strlen(class), &pce TSRMLS_CC) == FAILURE) { + return; + } + + Z_TYPE_P(object) = IS_OBJECT; + object_init_ex(object, *pce); + Z_SET_REFCOUNT_P(object, 1); + Z_UNSET_ISREF_P(object); + + TWIG_CALL_ZZ(object, "__construct", arg0, arg1 TSRMLS_CC); +} + +static int twig_add_array_key_to_string(void *pDest APPLY_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) +{ + smart_str *buf; + char *joiner; + APPLY_TSRMLS_FETCH(); + + buf = va_arg(args, smart_str*); + joiner = va_arg(args, char*); + + if (buf->len != 0) { + smart_str_appends(buf, joiner); + } + + if (hash_key->nKeyLength == 0) { + smart_str_append_long(buf, (long) hash_key->h); + } else { + char *key, *tmp_str; + int key_len, tmp_len; + key = php_addcslashes(hash_key->arKey, hash_key->nKeyLength - 1, &key_len, 0, "'\\", 2 TSRMLS_CC); + tmp_str = php_str_to_str_ex(key, key_len, "\0", 1, "' . \"\\0\" . '", 12, &tmp_len, 0, NULL); + + smart_str_appendl(buf, tmp_str, tmp_len); + efree(key); + efree(tmp_str); + } + + return 0; +} + +static char *TWIG_IMPLODE_ARRAY_KEYS(char *joiner, zval *array TSRMLS_DC) +{ + smart_str collector = { 0, 0, 0 }; + + smart_str_appendl(&collector, "", 0); + zend_hash_apply_with_arguments(HASH_OF(array) APPLY_TSRMLS_CC, twig_add_array_key_to_string, 2, &collector, joiner); + smart_str_0(&collector); + + return collector.c; +} + +static void TWIG_RUNTIME_ERROR(zval *template TSRMLS_DC, char *message, ...) +{ + char *buffer; + va_list args; + zend_class_entry **pce; + zval *ex; + zval *constructor; + zval *zmessage; + zval *lineno; + zval *filename_func; + zval *filename; + zval *constructor_args[3]; + zval *constructor_retval; + + if (zend_lookup_class("Twig_Error_Runtime", strlen("Twig_Error_Runtime"), &pce TSRMLS_CC) == FAILURE) { + return; + } + + va_start(args, message); + vspprintf(&buffer, 0, message, args); + va_end(args); + + MAKE_STD_ZVAL(ex); + object_init_ex(ex, *pce); + + // Call Twig_Error constructor + MAKE_STD_ZVAL(constructor); + MAKE_STD_ZVAL(zmessage); + MAKE_STD_ZVAL(lineno); + MAKE_STD_ZVAL(filename); + MAKE_STD_ZVAL(filename_func); + MAKE_STD_ZVAL(constructor_retval); + + ZVAL_STRINGL(constructor, "__construct", sizeof("__construct")-1, 1); + ZVAL_STRING(zmessage, buffer, 1); + ZVAL_LONG(lineno, -1); + + // Get template filename + ZVAL_STRINGL(filename_func, "getTemplateName", sizeof("getTemplateName")-1, 1); + call_user_function(EG(function_table), &template, filename_func, filename, 0, 0 TSRMLS_CC); + + constructor_args[0] = zmessage; + constructor_args[1] = lineno; + constructor_args[2] = filename; + call_user_function(EG(function_table), &ex, constructor, constructor_retval, 3, constructor_args TSRMLS_CC); + + zval_ptr_dtor(&constructor_retval); + zval_ptr_dtor(&zmessage); + zval_ptr_dtor(&lineno); + zval_ptr_dtor(&filename); + FREE_DTOR(constructor); + FREE_DTOR(filename_func); + efree(buffer); + + zend_throw_exception_object(ex TSRMLS_CC); +} + +static char *TWIG_GET_CLASS_NAME(zval *object TSRMLS_DC) +{ + char *class_name; + zend_uint class_name_len; + + if (Z_TYPE_P(object) != IS_OBJECT) { + return ""; + } +#if PHP_API_VERSION >= 20100412 + zend_get_object_classname(object, (const char **) &class_name, &class_name_len TSRMLS_CC); +#else + zend_get_object_classname(object, &class_name, &class_name_len TSRMLS_CC); +#endif + return class_name; +} + +static int twig_add_method_to_class(void *pDest APPLY_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) +{ + zend_class_entry *ce; + zval *retval; + char *item; + size_t item_len; + zend_function *mptr = (zend_function *) pDest; + APPLY_TSRMLS_FETCH(); + + if (!(mptr->common.fn_flags & ZEND_ACC_PUBLIC)) { + return 0; + } + + ce = *va_arg(args, zend_class_entry**); + retval = va_arg(args, zval*); + + item_len = strlen(mptr->common.function_name); + item = estrndup(mptr->common.function_name, item_len); + php_strtolower(item, item_len); + + if (strcmp("getenvironment", item) == 0) { + zend_class_entry **twig_template_ce; + if (zend_lookup_class("Twig_Template", strlen("Twig_Template"), &twig_template_ce TSRMLS_CC) == FAILURE) { + return 0; + } + if (instanceof_function(ce, *twig_template_ce TSRMLS_CC)) { + return 0; + } + } + + add_assoc_stringl_ex(retval, item, item_len+1, item, item_len, 0); + + return 0; +} + +static int twig_add_property_to_class(void *pDest APPLY_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) +{ + zend_class_entry *ce; + zval *retval; + char *class_name, *prop_name; + zend_property_info *pptr = (zend_property_info *) pDest; + APPLY_TSRMLS_FETCH(); + + if (!(pptr->flags & ZEND_ACC_PUBLIC) || (pptr->flags & ZEND_ACC_STATIC)) { + return 0; + } + + ce = *va_arg(args, zend_class_entry**); + retval = va_arg(args, zval*); + +#if PHP_API_VERSION >= 20100412 + zend_unmangle_property_name(pptr->name, pptr->name_length, (const char **) &class_name, (const char **) &prop_name); +#else + zend_unmangle_property_name(pptr->name, pptr->name_length, &class_name, &prop_name); +#endif + + add_assoc_string(retval, prop_name, prop_name, 1); + + return 0; +} + +static void twig_add_class_to_cache(zval *cache, zval *object, char *class_name TSRMLS_DC) +{ + zval *class_info, *class_methods, *class_properties; + zend_class_entry *class_ce; + + class_ce = zend_get_class_entry(object TSRMLS_CC); + + ALLOC_INIT_ZVAL(class_info); + ALLOC_INIT_ZVAL(class_methods); + ALLOC_INIT_ZVAL(class_properties); + array_init(class_info); + array_init(class_methods); + array_init(class_properties); + // add all methods to self::cache[$class]['methods'] + zend_hash_apply_with_arguments(&class_ce->function_table APPLY_TSRMLS_CC, twig_add_method_to_class, 2, &class_ce, class_methods); + zend_hash_apply_with_arguments(&class_ce->properties_info APPLY_TSRMLS_CC, twig_add_property_to_class, 2, &class_ce, class_properties); + + add_assoc_zval(class_info, "methods", class_methods); + add_assoc_zval(class_info, "properties", class_properties); + add_assoc_zval(cache, class_name, class_info); +} + +/* {{{ proto mixed twig_template_get_attributes(TwigTemplate template, mixed object, mixed item, array arguments, string type, boolean isDefinedTest, boolean ignoreStrictCheck) + A C implementation of TwigTemplate::getAttribute() */ +PHP_FUNCTION(twig_template_get_attributes) +{ + zval *template; + zval *object; + char *item; + int item_len; + zval *zitem, ztmpitem; + zval *arguments = NULL; + zval *ret = NULL; + char *type = NULL; + int type_len = 0; + zend_bool isDefinedTest = 0; + zend_bool ignoreStrictCheck = 0; + int free_ret = 0; + zval *tmp_self_cache; + char *class_name = NULL; + zval *tmp_class; + char *type_name; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ozz|asbb", &template, &object, &zitem, &arguments, &type, &type_len, &isDefinedTest, &ignoreStrictCheck) == FAILURE) { + return; + } + + // convert the item to a string + ztmpitem = *zitem; + zval_copy_ctor(&ztmpitem); + convert_to_string(&ztmpitem); + item_len = Z_STRLEN(ztmpitem); + item = estrndup(Z_STRVAL(ztmpitem), item_len); + zval_dtor(&ztmpitem); + + if (!type) { + type = "any"; + } + +/* + // array + if (Twig_Template::METHOD_CALL !== $type) { + $arrayItem = is_bool($item) || is_float($item) ? (int) $item : $item; + + if ((is_array($object) && array_key_exists($arrayItem, $object)) + || ($object instanceof ArrayAccess && isset($object[$arrayItem])) + ) { + if ($isDefinedTest) { + return true; + } + + return $object[$arrayItem]; + } +*/ + + + if (strcmp("method", type) != 0) { + if ((TWIG_ARRAY_KEY_EXISTS(object, zitem)) + || (TWIG_INSTANCE_OF(object, zend_ce_arrayaccess TSRMLS_CC) && TWIG_ISSET_ARRAYOBJECT_ELEMENT(object, zitem TSRMLS_CC)) + ) { + + if (isDefinedTest) { + efree(item); + RETURN_TRUE; + } + + ret = TWIG_GET_ARRAY_ELEMENT_ZVAL(object, zitem TSRMLS_CC); + + if (!ret) { + ret = &EG(uninitialized_zval); + } + RETVAL_ZVAL(ret, 1, 0); + if (free_ret) { + zval_ptr_dtor(&ret); + } + efree(item); + return; + } +/* + if (Twig_Template::ARRAY_CALL === $type) { + if ($isDefinedTest) { + return false; + } + if ($ignoreStrictCheck || !$this->env->isStrictVariables()) { + return null; + } +*/ + if (strcmp("array", type) == 0 || Z_TYPE_P(object) != IS_OBJECT) { + if (isDefinedTest) { + efree(item); + RETURN_FALSE; + } + if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) { + efree(item); + return; + } +/* + if ($object instanceof ArrayAccess) { + $message = sprintf('Key "%s" in object with ArrayAccess of class "%s" does not exist', $arrayItem, get_class($object)); + } elseif (is_object($object)) { + $message = sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface', $item, get_class($object)); + } elseif (is_array($object)) { + if (empty($object)) { + $message = sprintf('Key "%s" does not exist as the array is empty', $arrayItem); + } else { + $message = sprintf('Key "%s" for array with keys "%s" does not exist', $arrayItem, implode(', ', array_keys($object))); + } + } elseif (Twig_Template::ARRAY_CALL === $type) { + if (null === $object) { + $message = sprintf('Impossible to access a key ("%s") on a null variable', $item); + } else { + $message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s")', $item, gettype($object), $object); + } + } elseif (null === $object) { + $message = sprintf('Impossible to access an attribute ("%s") on a null variable', $item); + } else { + $message = sprintf('Impossible to access an attribute ("%s") on a %s variable ("%s")', $item, gettype($object), $object); + } + throw new Twig_Error_Runtime($message, -1, $this->getTemplateName()); + } + } +*/ + if (TWIG_INSTANCE_OF(object, zend_ce_arrayaccess TSRMLS_CC)) { + TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Key \"%s\" in object with ArrayAccess of class \"%s\" does not exist.", item, TWIG_GET_CLASS_NAME(object TSRMLS_CC)); + } else if (Z_TYPE_P(object) == IS_OBJECT) { + TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Impossible to access a key \"%s\" on an object of class \"%s\" that does not implement ArrayAccess interface.", item, TWIG_GET_CLASS_NAME(object TSRMLS_CC)); + } else if (Z_TYPE_P(object) == IS_ARRAY) { + if (0 == zend_hash_num_elements(Z_ARRVAL_P(object))) { + TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Key \"%s\" does not exist as the array is empty.", item); + } else { + char *array_keys = TWIG_IMPLODE_ARRAY_KEYS(", ", object TSRMLS_CC); + TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Key \"%s\" for array with keys \"%s\" does not exist.", item, array_keys); + efree(array_keys); + } + } else { + char *type_name = zend_zval_type_name(object); + Z_ADDREF_P(object); + if (Z_TYPE_P(object) == IS_NULL) { + convert_to_string(object); + TWIG_RUNTIME_ERROR(template TSRMLS_CC, + (strcmp("array", type) == 0) + ? "Impossible to access a key (\"%s\") on a %s variable." + : "Impossible to access an attribute (\"%s\") on a %s variable.", + item, type_name); + } else { + convert_to_string(object); + TWIG_RUNTIME_ERROR(template TSRMLS_CC, + (strcmp("array", type) == 0) + ? "Impossible to access a key (\"%s\") on a %s variable (\"%s\")." + : "Impossible to access an attribute (\"%s\") on a %s variable (\"%s\").", + item, type_name, Z_STRVAL_P(object)); + } + zval_ptr_dtor(&object); + } + efree(item); + return; + } + } + +/* + if (!is_object($object)) { + if ($isDefinedTest) { + return false; + } +*/ + + if (Z_TYPE_P(object) != IS_OBJECT) { + if (isDefinedTest) { + efree(item); + RETURN_FALSE; + } +/* + if ($ignoreStrictCheck || !$this->env->isStrictVariables()) { + return null; + } + + if (null === $object) { + $message = sprintf('Impossible to invoke a method ("%s") on a null variable', $item); + } else { + $message = sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s")', $item, gettype($object), $object); + } + + throw new Twig_Error_Runtime($message, -1, $this->getTemplateName()); + } +*/ + if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) { + efree(item); + return; + } + + type_name = zend_zval_type_name(object); + Z_ADDREF_P(object); + if (Z_TYPE_P(object) == IS_NULL) { + convert_to_string_ex(&object); + + TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Impossible to invoke a method (\"%s\") on a %s variable.", item, type_name); + } else { + convert_to_string_ex(&object); + + TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Impossible to invoke a method (\"%s\") on a %s variable (\"%s\").", item, type_name, Z_STRVAL_P(object)); + } + + zval_ptr_dtor(&object); + efree(item); + return; + } +/* + $class = get_class($object); +*/ + + class_name = TWIG_GET_CLASS_NAME(object TSRMLS_CC); + tmp_self_cache = TWIG_GET_STATIC_PROPERTY(template, "cache" TSRMLS_CC); + tmp_class = TWIG_GET_ARRAY_ELEMENT(tmp_self_cache, class_name, strlen(class_name) TSRMLS_CC); + + if (!tmp_class) { + twig_add_class_to_cache(tmp_self_cache, object, class_name TSRMLS_CC); + tmp_class = TWIG_GET_ARRAY_ELEMENT(tmp_self_cache, class_name, strlen(class_name) TSRMLS_CC); + } + efree(class_name); + +/* + // object property + if (Twig_Template::METHOD_CALL !== $type && !$object instanceof Twig_Template) { + if (isset($object->$item) || array_key_exists((string) $item, $object)) { + if ($isDefinedTest) { + return true; + } + + if ($this->env->hasExtension('Twig_Extension_Sandbox')) { + $this->env->getExtension('Twig_Extension_Sandbox')->checkPropertyAllowed($object, $item); + } + + return $object->$item; + } + } +*/ + if (strcmp("method", type) != 0 && !TWIG_INSTANCE_OF_USERLAND(object, "Twig_Template" TSRMLS_CC)) { + zval *tmp_properties, *tmp_item; + + tmp_properties = TWIG_GET_ARRAY_ELEMENT(tmp_class, "properties", strlen("properties") TSRMLS_CC); + tmp_item = TWIG_GET_ARRAY_ELEMENT(tmp_properties, item, item_len TSRMLS_CC); + + if (tmp_item || TWIG_HAS_PROPERTY(object, zitem TSRMLS_CC) || TWIG_HAS_DYNAMIC_PROPERTY(object, item, item_len TSRMLS_CC)) { + if (isDefinedTest) { + efree(item); + RETURN_TRUE; + } + if (TWIG_CALL_SB(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "hasExtension", "Twig_Extension_Sandbox" TSRMLS_CC)) { + TWIG_CALL_ZZ(TWIG_CALL_S(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "getExtension", "Twig_Extension_Sandbox" TSRMLS_CC), "checkPropertyAllowed", object, zitem TSRMLS_CC); + } + if (EG(exception)) { + efree(item); + return; + } + + ret = TWIG_PROPERTY(object, zitem TSRMLS_CC); + efree(item); + RETURN_ZVAL(ret, 1, 0); + } + } +/* + // object method + if (!isset(self::$cache[$class]['methods'])) { + if ($object instanceof self) { + $ref = new ReflectionClass($class); + $methods = array(); + + foreach ($ref->getMethods(ReflectionMethod::IS_PUBLIC) as $refMethod) { + $methodName = strtolower($refMethod->name); + + // Accessing the environment from templates is forbidden to prevent untrusted changes to the environment + if ('getenvironment' !== $methodName) { + $methods[$methodName] = true; + } + } + + self::$cache[$class]['methods'] = $methods; + } else { + self::$cache[$class]['methods'] = array_change_key_case(array_flip(get_class_methods($object))); + } + } + + $call = false; + $lcItem = strtolower($item); + if (isset(self::$cache[$class]['methods'][$lcItem])) { + $method = (string) $item; + } elseif (isset(self::$cache[$class]['methods']['get'.$lcItem])) { + $method = 'get'.$item; + } elseif (isset(self::$cache[$class]['methods']['is'.$lcItem])) { + $method = 'is'.$item; + } elseif (isset(self::$cache[$class]['methods']['__call'])) { + $method = (string) $item; + $call = true; +*/ + { + int call = 0; + char *lcItem = TWIG_STRTOLOWER(item, item_len); + int lcItem_length; + char *method = NULL; + char *methodForDeprecation = NULL; + char *tmp_method_name_get; + char *tmp_method_name_is; + zval *zmethod; + zval *tmp_methods; + + lcItem_length = strlen(lcItem); + tmp_method_name_get = emalloc(4 + lcItem_length); + tmp_method_name_is = emalloc(3 + lcItem_length); + + sprintf(tmp_method_name_get, "get%s", lcItem); + sprintf(tmp_method_name_is, "is%s", lcItem); + + tmp_methods = TWIG_GET_ARRAY_ELEMENT(tmp_class, "methods", strlen("methods") TSRMLS_CC); + methodForDeprecation = emalloc(item_len + 1); + sprintf(methodForDeprecation, "%s", item); + + if (TWIG_GET_ARRAY_ELEMENT(tmp_methods, lcItem, lcItem_length TSRMLS_CC)) { + method = item; + } else if (TWIG_GET_ARRAY_ELEMENT(tmp_methods, tmp_method_name_get, lcItem_length + 3 TSRMLS_CC)) { + method = tmp_method_name_get; + } else if (TWIG_GET_ARRAY_ELEMENT(tmp_methods, tmp_method_name_is, lcItem_length + 2 TSRMLS_CC)) { + method = tmp_method_name_is; + } else if (TWIG_GET_ARRAY_ELEMENT(tmp_methods, "__call", 6 TSRMLS_CC)) { + method = item; + call = 1; +/* + } else { + if ($isDefinedTest) { + return false; + } + + if ($ignoreStrictCheck || !$this->env->isStrictVariables()) { + return null; + } + + throw new Twig_Error_Runtime(sprintf('Method "%s" for object "%s" does not exist.', $item, get_class($object)), -1, $this->getTemplateName()); + } + + if ($isDefinedTest) { + return true; + } +*/ + } else { + efree(tmp_method_name_get); + efree(tmp_method_name_is); + efree(lcItem); + + if (isDefinedTest) { + efree(item); + RETURN_FALSE; + } + if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) { + efree(item); + return; + } + TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Neither the property \"%s\" nor one of the methods \"%s()\", \"get%s()\"/\"is%s()\" or \"__call()\" exist and have public access in class \"%s\".", item, item, item, item, TWIG_GET_CLASS_NAME(object TSRMLS_CC)); + efree(item); + return; + } + + if (isDefinedTest) { + efree(tmp_method_name_get); + efree(tmp_method_name_is); + efree(lcItem);efree(item); + RETURN_TRUE; + } +/* + if ($this->env->hasExtension('Twig_Extension_Sandbox')) { + $this->env->getExtension('Twig_Extension_Sandbox')->checkMethodAllowed($object, $method); + } +*/ + MAKE_STD_ZVAL(zmethod); + ZVAL_STRING(zmethod, method, 1); + if (TWIG_CALL_SB(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "hasExtension", "Twig_Extension_Sandbox" TSRMLS_CC)) { + TWIG_CALL_ZZ(TWIG_CALL_S(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "getExtension", "Twig_Extension_Sandbox" TSRMLS_CC), "checkMethodAllowed", object, zmethod TSRMLS_CC); + } + zval_ptr_dtor(&zmethod); + if (EG(exception)) { + efree(tmp_method_name_get); + efree(tmp_method_name_is); + efree(lcItem);efree(item); + return; + } +/* + // Some objects throw exceptions when they have __call, and the method we try + // to call is not supported. If ignoreStrictCheck is true, we should return null. + try { + $ret = call_user_func_array(array($object, $method), $arguments); + } catch (BadMethodCallException $e) { + if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) { + return null; + } + throw $e; + } +*/ + ret = TWIG_CALL_USER_FUNC_ARRAY(object, method, arguments TSRMLS_CC); + if (EG(exception) && TWIG_INSTANCE_OF(EG(exception), spl_ce_BadMethodCallException TSRMLS_CC)) { + if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) { + efree(tmp_method_name_get); + efree(tmp_method_name_is); + efree(lcItem);efree(item); + zend_clear_exception(TSRMLS_C); + return; + } + } + free_ret = 1; + efree(tmp_method_name_get); + efree(tmp_method_name_is); + efree(lcItem); +/* + // @deprecated in 1.28 + if ($object instanceof Twig_TemplateInterface) { + $self = $object->getTemplateName() === $this->getTemplateName(); + $message = sprintf('Calling "%s" on template "%s" from template "%s" is deprecated since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName(), $this->getTemplateName()); + if ('renderBlock' === $method || 'displayBlock' === $method) { + $message .= sprintf(' Use block("%s"%s) instead).', $arguments[0], $self ? '' : ', template'); + } elseif ('hasBlock' === $method) { + $message .= sprintf(' Use "block("%s"%s) is defined" instead).', $arguments[0], $self ? '' : ', template'); + } elseif ('render' === $method || 'display' === $method) { + $message .= sprintf(' Use include("%s") instead).', $object->getTemplateName()); + } + @trigger_error($message, E_USER_DEPRECATED); + + return $ret === '' ? '' : new Twig_Markup($ret, $this->env->getCharset()); + } + + return $ret; +*/ + efree(item); + // ret can be null, if e.g. the called method throws an exception + if (ret) { + if (TWIG_INSTANCE_OF_USERLAND(object, "Twig_TemplateInterface" TSRMLS_CC)) { + int self; + int old_error_reporting; + zval *object_filename; + zval *this_filename; + zval *filename_func; + char *deprecation_message_complement = NULL; + char *deprecation_message = NULL; + + MAKE_STD_ZVAL(object_filename); + MAKE_STD_ZVAL(this_filename); + MAKE_STD_ZVAL(filename_func); + + // Get templates names + ZVAL_STRINGL(filename_func, "getTemplateName", sizeof("getTemplateName")-1, 1); + call_user_function(EG(function_table), &object, filename_func, object_filename, 0, 0 TSRMLS_CC); + ZVAL_STRINGL(filename_func, "getTemplateName", sizeof("getTemplateName")-1, 1); + call_user_function(EG(function_table), &template, filename_func, this_filename, 0, 0 TSRMLS_CC); + + self = (strcmp(Z_STRVAL_P(object_filename), Z_STRVAL_P(this_filename)) == 0); + + if (strcmp(methodForDeprecation, "renderBlock") == 0 || strcmp(methodForDeprecation, "displayBlock") == 0) { + zval **arg0; + zend_hash_index_find(HASH_OF(arguments), 0, (void **) &arg0); + asprintf( + &deprecation_message_complement, + " Use block(\"%s\"%s) instead).", + Z_STRVAL_PP(arg0), + self ? "" : ", template" + ); + } else if (strcmp(methodForDeprecation, "hasBlock") == 0) { + zval **arg0; + zend_hash_index_find(HASH_OF(arguments), 0, (void **) &arg0); + asprintf( + &deprecation_message_complement, + " Use \"block(\"%s\"%s) is defined\" instead).", + Z_STRVAL_PP(arg0), + self ? "" : ", template" + ); + } else if (strcmp(methodForDeprecation, "render") == 0 || strcmp(methodForDeprecation, "display") == 0) { + asprintf( + &deprecation_message_complement, + " Use include(\"%s\") instead).", + Z_STRVAL_P(object_filename) + ); + } else { + deprecation_message_complement = (char*)calloc(0, sizeof(char)); + } + + asprintf( + &deprecation_message, + "Calling \"%s\" on template \"%s\" from template \"%s\" is deprecated since version 1.28 and won't be supported anymore in 2.0.%s", + methodForDeprecation, + Z_STRVAL_P(object_filename), + Z_STRVAL_P(this_filename), + deprecation_message_complement + ); + + old_error_reporting = EG(error_reporting); + EG(error_reporting) = 0; + zend_error(E_USER_DEPRECATED, "%s", deprecation_message); + EG(error_reporting) = old_error_reporting; + + FREE_DTOR(filename_func) + FREE_DTOR(object_filename) + FREE_DTOR(this_filename) + free(deprecation_message); + free(deprecation_message_complement); + + if (Z_STRLEN_P(ret) != 0) { + zval *charset = TWIG_CALL_USER_FUNC_ARRAY(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "getCharset", NULL TSRMLS_CC); + TWIG_NEW(return_value, "Twig_Markup", ret, charset TSRMLS_CC); + zval_ptr_dtor(&charset); + if (ret) { + zval_ptr_dtor(&ret); + } + efree(methodForDeprecation); + return; + } + } + + RETVAL_ZVAL(ret, 1, 0); + if (free_ret) { + zval_ptr_dtor(&ret); + } + } + + efree(methodForDeprecation); + } +} diff --git a/vendor/twig/twig/lib/Twig/Autoloader.php b/vendor/twig/twig/lib/Twig/Autoloader.php new file mode 100644 index 0000000000000000000000000000000000000000..212af5445693aae29e8436f4a9d9661e043e0bed --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Autoloader.php @@ -0,0 +1,54 @@ + + * + * @deprecated since 1.21 and will be removed in 2.0. Use Composer instead. 2.0. + */ +class Twig_Autoloader +{ + /** + * Registers Twig_Autoloader as an SPL autoloader. + * + * @param bool $prepend whether to prepend the autoloader or not + */ + public static function register($prepend = false) + { + @trigger_error('Using Twig_Autoloader is deprecated since version 1.21. Use Composer instead.', E_USER_DEPRECATED); + + if (PHP_VERSION_ID < 50300) { + spl_autoload_register(array(__CLASS__, 'autoload')); + } else { + spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend); + } + } + + /** + * Handles autoloading of classes. + * + * @param string $class a class name + */ + public static function autoload($class) + { + if (0 !== strpos($class, 'Twig')) { + return; + } + + if (is_file($file = dirname(__FILE__).'/../'.str_replace(array('_', "\0"), array('/', ''), $class).'.php')) { + require $file; + } + } +} diff --git a/vendor/twig/twig/lib/Twig/BaseNodeVisitor.php b/vendor/twig/twig/lib/Twig/BaseNodeVisitor.php new file mode 100644 index 0000000000000000000000000000000000000000..1c917d2fbc81d70650ea0feec8d934d594f9c494 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/BaseNodeVisitor.php @@ -0,0 +1,50 @@ + + */ +abstract class Twig_BaseNodeVisitor implements Twig_NodeVisitorInterface +{ + final public function enterNode(Twig_NodeInterface $node, Twig_Environment $env) + { + if (!$node instanceof Twig_Node) { + throw new LogicException('Twig_BaseNodeVisitor only supports Twig_Node instances.'); + } + + return $this->doEnterNode($node, $env); + } + + final public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env) + { + if (!$node instanceof Twig_Node) { + throw new LogicException('Twig_BaseNodeVisitor only supports Twig_Node instances.'); + } + + return $this->doLeaveNode($node, $env); + } + + /** + * Called before child nodes are visited. + * + * @return Twig_Node The modified node + */ + abstract protected function doEnterNode(Twig_Node $node, Twig_Environment $env); + + /** + * Called after child nodes are visited. + * + * @return Twig_Node|false The modified node or false if the node must be removed + */ + abstract protected function doLeaveNode(Twig_Node $node, Twig_Environment $env); +} diff --git a/vendor/twig/twig/lib/Twig/Cache/Filesystem.php b/vendor/twig/twig/lib/Twig/Cache/Filesystem.php new file mode 100644 index 0000000000000000000000000000000000000000..de4e5072955f7a2cde6c6603baa16ee1ae9ea3b0 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Cache/Filesystem.php @@ -0,0 +1,86 @@ + + */ +class Twig_Cache_Filesystem implements Twig_CacheInterface +{ + const FORCE_BYTECODE_INVALIDATION = 1; + + private $directory; + private $options; + + /** + * @param $directory string The root cache directory + * @param $options int A set of options + */ + public function __construct($directory, $options = 0) + { + $this->directory = rtrim($directory, '\/').'/'; + $this->options = $options; + } + + public function generateKey($name, $className) + { + $hash = hash('sha256', $className); + + return $this->directory.$hash[0].$hash[1].'/'.$hash.'.php'; + } + + public function load($key) + { + if (file_exists($key)) { + @include_once $key; + } + } + + public function write($key, $content) + { + $dir = dirname($key); + if (!is_dir($dir)) { + if (false === @mkdir($dir, 0777, true) && !is_dir($dir)) { + throw new RuntimeException(sprintf('Unable to create the cache directory (%s).', $dir)); + } + } elseif (!is_writable($dir)) { + throw new RuntimeException(sprintf('Unable to write in the cache directory (%s).', $dir)); + } + + $tmpFile = tempnam($dir, basename($key)); + if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $key)) { + @chmod($key, 0666 & ~umask()); + + if (self::FORCE_BYTECODE_INVALIDATION == ($this->options & self::FORCE_BYTECODE_INVALIDATION)) { + // Compile cached file into bytecode cache + if (function_exists('opcache_invalidate')) { + opcache_invalidate($key, true); + } elseif (function_exists('apc_compile_file')) { + apc_compile_file($key); + } + } + + return; + } + + throw new RuntimeException(sprintf('Failed to write cache file "%s".', $key)); + } + + public function getTimestamp($key) + { + if (!file_exists($key)) { + return 0; + } + + return (int) @filemtime($key); + } +} diff --git a/vendor/twig/twig/lib/Twig/Cache/Null.php b/vendor/twig/twig/lib/Twig/Cache/Null.php new file mode 100644 index 0000000000000000000000000000000000000000..7a194950e3e76216c48db9b9628bd10027ef4b78 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Cache/Null.php @@ -0,0 +1,38 @@ + + */ +class Twig_Cache_Null implements Twig_CacheInterface +{ + public function generateKey($name, $className) + { + return ''; + } + + public function write($key, $content) + { + } + + public function load($key) + { + } + + public function getTimestamp($key) + { + return 0; + } +} diff --git a/vendor/twig/twig/lib/Twig/CacheInterface.php b/vendor/twig/twig/lib/Twig/CacheInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..2a3f04dd0637a1a3e9b69666cc6bedf47d89fe39 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/CacheInterface.php @@ -0,0 +1,56 @@ + + */ +interface Twig_CacheInterface +{ + /** + * Generates a cache key for the given template class name. + * + * @param string $name The template name + * @param string $className The template class name + * + * @return string + */ + public function generateKey($name, $className); + + /** + * Writes the compiled template to cache. + * + * @param string $key The cache key + * @param string $content The template representation as a PHP class + */ + public function write($key, $content); + + /** + * Loads a template from the cache. + * + * @param string $key The cache key + */ + public function load($key); + + /** + * Returns the modification timestamp of a key. + * + * @param string $key The cache key + * + * @return int + */ + public function getTimestamp($key); +} diff --git a/vendor/twig/twig/lib/Twig/Compiler.php b/vendor/twig/twig/lib/Twig/Compiler.php new file mode 100644 index 0000000000000000000000000000000000000000..cdca49c5979f7b4b611d11758b8a7a5eea5014c9 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Compiler.php @@ -0,0 +1,281 @@ + + */ +class Twig_Compiler implements Twig_CompilerInterface +{ + protected $lastLine; + protected $source; + protected $indentation; + protected $env; + protected $debugInfo = array(); + protected $sourceOffset; + protected $sourceLine; + protected $filename; + + public function __construct(Twig_Environment $env) + { + $this->env = $env; + } + + /** + * @deprecated since 1.25 (to be removed in 2.0) + */ + public function getFilename() + { + @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), E_USER_DEPRECATED); + + return $this->filename; + } + + /** + * Returns the environment instance related to this compiler. + * + * @return Twig_Environment + */ + public function getEnvironment() + { + return $this->env; + } + + /** + * Gets the current PHP code after compilation. + * + * @return string The PHP code + */ + public function getSource() + { + return $this->source; + } + + /** + * Compiles a node. + * + * @param Twig_NodeInterface $node The node to compile + * @param int $indentation The current indentation + * + * @return $this + */ + public function compile(Twig_NodeInterface $node, $indentation = 0) + { + $this->lastLine = null; + $this->source = ''; + $this->debugInfo = array(); + $this->sourceOffset = 0; + // source code starts at 1 (as we then increment it when we encounter new lines) + $this->sourceLine = 1; + $this->indentation = $indentation; + + if ($node instanceof Twig_Node_Module) { + // to be removed in 2.0 + $this->filename = $node->getTemplateName(); + } + + $node->compile($this); + + return $this; + } + + public function subcompile(Twig_NodeInterface $node, $raw = true) + { + if (false === $raw) { + $this->source .= str_repeat(' ', $this->indentation * 4); + } + + $node->compile($this); + + return $this; + } + + /** + * Adds a raw string to the compiled code. + * + * @param string $string The string + * + * @return $this + */ + public function raw($string) + { + $this->source .= $string; + + return $this; + } + + /** + * Writes a string to the compiled code by adding indentation. + * + * @return $this + */ + public function write() + { + $strings = func_get_args(); + foreach ($strings as $string) { + $this->source .= str_repeat(' ', $this->indentation * 4).$string; + } + + return $this; + } + + /** + * Appends an indentation to the current PHP code after compilation. + * + * @return $this + * + * @deprecated since 1.27 (to be removed in 2.0). + */ + public function addIndentation() + { + @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use write(\'\') instead.', E_USER_DEPRECATED); + + $this->source .= str_repeat(' ', $this->indentation * 4); + + return $this; + } + + /** + * Adds a quoted string to the compiled code. + * + * @param string $value The string + * + * @return $this + */ + public function string($value) + { + $this->source .= sprintf('"%s"', addcslashes($value, "\0\t\"\$\\")); + + return $this; + } + + /** + * Returns a PHP representation of a given value. + * + * @param mixed $value The value to convert + * + * @return $this + */ + public function repr($value) + { + if (is_int($value) || is_float($value)) { + if (false !== $locale = setlocale(LC_NUMERIC, 0)) { + setlocale(LC_NUMERIC, 'C'); + } + + $this->raw($value); + + if (false !== $locale) { + setlocale(LC_NUMERIC, $locale); + } + } elseif (null === $value) { + $this->raw('null'); + } elseif (is_bool($value)) { + $this->raw($value ? 'true' : 'false'); + } elseif (is_array($value)) { + $this->raw('array('); + $first = true; + foreach ($value as $key => $v) { + if (!$first) { + $this->raw(', '); + } + $first = false; + $this->repr($key); + $this->raw(' => '); + $this->repr($v); + } + $this->raw(')'); + } else { + $this->string($value); + } + + return $this; + } + + /** + * Adds debugging information. + * + * @return $this + */ + public function addDebugInfo(Twig_NodeInterface $node) + { + if ($node->getTemplateLine() != $this->lastLine) { + $this->write(sprintf("// line %d\n", $node->getTemplateLine())); + + // when mbstring.func_overload is set to 2 + // mb_substr_count() replaces substr_count() + // but they have different signatures! + if (((int) ini_get('mbstring.func_overload')) & 2) { + @trigger_error('Support for having "mbstring.func_overload" different from 0 is deprecated version 1.29 and will be removed in 2.0.', E_USER_DEPRECATED); + + // this is much slower than the "right" version + $this->sourceLine += mb_substr_count(mb_substr($this->source, $this->sourceOffset), "\n"); + } else { + $this->sourceLine += substr_count($this->source, "\n", $this->sourceOffset); + } + $this->sourceOffset = strlen($this->source); + $this->debugInfo[$this->sourceLine] = $node->getTemplateLine(); + + $this->lastLine = $node->getTemplateLine(); + } + + return $this; + } + + public function getDebugInfo() + { + ksort($this->debugInfo); + + return $this->debugInfo; + } + + /** + * Indents the generated code. + * + * @param int $step The number of indentation to add + * + * @return $this + */ + public function indent($step = 1) + { + $this->indentation += $step; + + return $this; + } + + /** + * Outdents the generated code. + * + * @param int $step The number of indentation to remove + * + * @return $this + * + * @throws LogicException When trying to outdent too much so the indentation would become negative + */ + public function outdent($step = 1) + { + // can't outdent by more steps than the current indentation level + if ($this->indentation < $step) { + throw new LogicException('Unable to call outdent() as the indentation would become negative.'); + } + + $this->indentation -= $step; + + return $this; + } + + public function getVarName() + { + return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false)); + } +} diff --git a/vendor/twig/twig/lib/Twig/CompilerInterface.php b/vendor/twig/twig/lib/Twig/CompilerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..42872c9cd568496ea48ab1da77214fffee70ac0e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/CompilerInterface.php @@ -0,0 +1,34 @@ + + * + * @deprecated since 1.12 (to be removed in 3.0) + */ +interface Twig_CompilerInterface +{ + /** + * Compiles a node. + * + * @return $this + */ + public function compile(Twig_NodeInterface $node); + + /** + * Gets the current PHP code after compilation. + * + * @return string The PHP code + */ + public function getSource(); +} diff --git a/vendor/twig/twig/lib/Twig/ContainerRuntimeLoader.php b/vendor/twig/twig/lib/Twig/ContainerRuntimeLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..3284569d8994dc3f98ec6ad7450af39fbe887cb2 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/ContainerRuntimeLoader.php @@ -0,0 +1,37 @@ + + * @author Robin Chalas + */ +class Twig_ContainerRuntimeLoader implements Twig_RuntimeLoaderInterface +{ + private $container; + + public function __construct(ContainerInterface $container) + { + $this->container = $container; + } + + public function load($class) + { + if ($this->container->has($class)) { + return $this->container->get($class); + } + } +} diff --git a/vendor/twig/twig/lib/Twig/Environment.php b/vendor/twig/twig/lib/Twig/Environment.php new file mode 100644 index 0000000000000000000000000000000000000000..c146858d7a4d4dea4c2060282b69e6ccefbea211 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Environment.php @@ -0,0 +1,1561 @@ + + */ +class Twig_Environment +{ + const VERSION = '1.32.0'; + const VERSION_ID = 13200; + const MAJOR_VERSION = 1; + const MINOR_VERSION = 32; + const RELEASE_VERSION = 0; + const EXTRA_VERSION = ''; + + protected $charset; + protected $loader; + protected $debug; + protected $autoReload; + protected $cache; + protected $lexer; + protected $parser; + protected $compiler; + protected $baseTemplateClass; + protected $extensions; + protected $parsers; + protected $visitors; + protected $filters; + protected $tests; + protected $functions; + protected $globals; + protected $runtimeInitialized = false; + protected $extensionInitialized = false; + protected $loadedTemplates; + protected $strictVariables; + protected $unaryOperators; + protected $binaryOperators; + protected $templateClassPrefix = '__TwigTemplate_'; + protected $functionCallbacks = array(); + protected $filterCallbacks = array(); + protected $staging; + + private $originalCache; + private $bcWriteCacheFile = false; + private $bcGetCacheFilename = false; + private $lastModifiedExtension = 0; + private $extensionsByClass = array(); + private $runtimeLoaders = array(); + private $runtimes = array(); + private $optionsHash; + + /** + * Constructor. + * + * Available options: + * + * * debug: When set to true, it automatically set "auto_reload" to true as + * well (default to false). + * + * * charset: The charset used by the templates (default to UTF-8). + * + * * base_template_class: The base template class to use for generated + * templates (default to Twig_Template). + * + * * cache: An absolute path where to store the compiled templates, + * a Twig_Cache_Interface implementation, + * or false to disable compilation cache (default). + * + * * auto_reload: Whether to reload the template if the original source changed. + * If you don't provide the auto_reload option, it will be + * determined automatically based on the debug value. + * + * * strict_variables: Whether to ignore invalid variables in templates + * (default to false). + * + * * autoescape: Whether to enable auto-escaping (default to html): + * * false: disable auto-escaping + * * true: equivalent to html + * * html, js: set the autoescaping to one of the supported strategies + * * name: set the autoescaping strategy based on the template name extension + * * PHP callback: a PHP callback that returns an escaping strategy based on the template "name" + * + * * optimizations: A flag that indicates which optimizations to apply + * (default to -1 which means that all optimizations are enabled; + * set it to 0 to disable). + * + * @param Twig_LoaderInterface $loader + * @param array $options An array of options + */ + public function __construct(Twig_LoaderInterface $loader = null, $options = array()) + { + if (null !== $loader) { + $this->setLoader($loader); + } else { + @trigger_error('Not passing a Twig_LoaderInterface as the first constructor argument of Twig_Environment is deprecated since version 1.21.', E_USER_DEPRECATED); + } + + $options = array_merge(array( + 'debug' => false, + 'charset' => 'UTF-8', + 'base_template_class' => 'Twig_Template', + 'strict_variables' => false, + 'autoescape' => 'html', + 'cache' => false, + 'auto_reload' => null, + 'optimizations' => -1, + ), $options); + + $this->debug = (bool) $options['debug']; + $this->charset = strtoupper($options['charset']); + $this->baseTemplateClass = $options['base_template_class']; + $this->autoReload = null === $options['auto_reload'] ? $this->debug : (bool) $options['auto_reload']; + $this->strictVariables = (bool) $options['strict_variables']; + $this->setCache($options['cache']); + + $this->addExtension(new Twig_Extension_Core()); + $this->addExtension(new Twig_Extension_Escaper($options['autoescape'])); + $this->addExtension(new Twig_Extension_Optimizer($options['optimizations'])); + $this->staging = new Twig_Extension_Staging(); + + // For BC + if (is_string($this->originalCache)) { + $r = new ReflectionMethod($this, 'writeCacheFile'); + if ($r->getDeclaringClass()->getName() !== __CLASS__) { + @trigger_error('The Twig_Environment::writeCacheFile method is deprecated since version 1.22 and will be removed in Twig 2.0.', E_USER_DEPRECATED); + + $this->bcWriteCacheFile = true; + } + + $r = new ReflectionMethod($this, 'getCacheFilename'); + if ($r->getDeclaringClass()->getName() !== __CLASS__) { + @trigger_error('The Twig_Environment::getCacheFilename method is deprecated since version 1.22 and will be removed in Twig 2.0.', E_USER_DEPRECATED); + + $this->bcGetCacheFilename = true; + } + } + } + + /** + * Gets the base template class for compiled templates. + * + * @return string The base template class name + */ + public function getBaseTemplateClass() + { + return $this->baseTemplateClass; + } + + /** + * Sets the base template class for compiled templates. + * + * @param string $class The base template class name + */ + public function setBaseTemplateClass($class) + { + $this->baseTemplateClass = $class; + $this->updateOptionsHash(); + } + + /** + * Enables debugging mode. + */ + public function enableDebug() + { + $this->debug = true; + $this->updateOptionsHash(); + } + + /** + * Disables debugging mode. + */ + public function disableDebug() + { + $this->debug = false; + $this->updateOptionsHash(); + } + + /** + * Checks if debug mode is enabled. + * + * @return bool true if debug mode is enabled, false otherwise + */ + public function isDebug() + { + return $this->debug; + } + + /** + * Enables the auto_reload option. + */ + public function enableAutoReload() + { + $this->autoReload = true; + } + + /** + * Disables the auto_reload option. + */ + public function disableAutoReload() + { + $this->autoReload = false; + } + + /** + * Checks if the auto_reload option is enabled. + * + * @return bool true if auto_reload is enabled, false otherwise + */ + public function isAutoReload() + { + return $this->autoReload; + } + + /** + * Enables the strict_variables option. + */ + public function enableStrictVariables() + { + $this->strictVariables = true; + $this->updateOptionsHash(); + } + + /** + * Disables the strict_variables option. + */ + public function disableStrictVariables() + { + $this->strictVariables = false; + $this->updateOptionsHash(); + } + + /** + * Checks if the strict_variables option is enabled. + * + * @return bool true if strict_variables is enabled, false otherwise + */ + public function isStrictVariables() + { + return $this->strictVariables; + } + + /** + * Gets the current cache implementation. + * + * @param bool $original Whether to return the original cache option or the real cache instance + * + * @return Twig_CacheInterface|string|false A Twig_CacheInterface implementation, + * an absolute path to the compiled templates, + * or false to disable cache + */ + public function getCache($original = true) + { + return $original ? $this->originalCache : $this->cache; + } + + /** + * Sets the current cache implementation. + * + * @param Twig_CacheInterface|string|false $cache A Twig_CacheInterface implementation, + * an absolute path to the compiled templates, + * or false to disable cache + */ + public function setCache($cache) + { + if (is_string($cache)) { + $this->originalCache = $cache; + $this->cache = new Twig_Cache_Filesystem($cache); + } elseif (false === $cache) { + $this->originalCache = $cache; + $this->cache = new Twig_Cache_Null(); + } elseif (null === $cache) { + @trigger_error('Using "null" as the cache strategy is deprecated since version 1.23 and will be removed in Twig 2.0.', E_USER_DEPRECATED); + $this->originalCache = false; + $this->cache = new Twig_Cache_Null(); + } elseif ($cache instanceof Twig_CacheInterface) { + $this->originalCache = $this->cache = $cache; + } else { + throw new LogicException(sprintf('Cache can only be a string, false, or a Twig_CacheInterface implementation.')); + } + } + + /** + * Gets the cache filename for a given template. + * + * @param string $name The template name + * + * @return string|false The cache file name or false when caching is disabled + * + * @deprecated since 1.22 (to be removed in 2.0) + */ + public function getCacheFilename($name) + { + @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); + + $key = $this->cache->generateKey($name, $this->getTemplateClass($name)); + + return !$key ? false : $key; + } + + /** + * Gets the template class associated with the given string. + * + * The generated template class is based on the following parameters: + * + * * The cache key for the given template; + * * The currently enabled extensions; + * * Whether the Twig C extension is available or not; + * * PHP version; + * * Twig version; + * * Options with what environment was created. + * + * @param string $name The name for which to calculate the template class name + * @param int|null $index The index if it is an embedded template + * + * @return string The template class name + */ + public function getTemplateClass($name, $index = null) + { + $key = $this->getLoader()->getCacheKey($name).$this->optionsHash; + + return $this->templateClassPrefix.hash('sha256', $key).(null === $index ? '' : '_'.$index); + } + + /** + * Gets the template class prefix. + * + * @return string The template class prefix + * + * @deprecated since 1.22 (to be removed in 2.0) + */ + public function getTemplateClassPrefix() + { + @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); + + return $this->templateClassPrefix; + } + + /** + * Renders a template. + * + * @param string $name The template name + * @param array $context An array of parameters to pass to the template + * + * @return string The rendered template + * + * @throws Twig_Error_Loader When the template cannot be found + * @throws Twig_Error_Syntax When an error occurred during compilation + * @throws Twig_Error_Runtime When an error occurred during rendering + */ + public function render($name, array $context = array()) + { + return $this->loadTemplate($name)->render($context); + } + + /** + * Displays a template. + * + * @param string $name The template name + * @param array $context An array of parameters to pass to the template + * + * @throws Twig_Error_Loader When the template cannot be found + * @throws Twig_Error_Syntax When an error occurred during compilation + * @throws Twig_Error_Runtime When an error occurred during rendering + */ + public function display($name, array $context = array()) + { + $this->loadTemplate($name)->display($context); + } + + /** + * Loads a template. + * + * @param string|Twig_TemplateWrapper|Twig_Template $name The template name + * + * @return Twig_TemplateWrapper + */ + public function load($name) + { + if ($name instanceof Twig_TemplateWrapper) { + return $name; + } + + if ($name instanceof Twig_Template) { + return new Twig_TemplateWrapper($this, $name); + } + + return new Twig_TemplateWrapper($this, $this->loadTemplate($name)); + } + + /** + * Loads a template internal representation. + * + * This method is for internal use only and should never be called + * directly. + * + * @param string $name The template name + * @param int $index The index if it is an embedded template + * + * @return Twig_TemplateInterface A template instance representing the given template name + * + * @throws Twig_Error_Loader When the template cannot be found + * @throws Twig_Error_Runtime When a previously generated cache is corrupted + * @throws Twig_Error_Syntax When an error occurred during compilation + * + * @internal + */ + public function loadTemplate($name, $index = null) + { + $cls = $mainCls = $this->getTemplateClass($name); + if (null !== $index) { + $cls .= '_'.$index; + } + + if (isset($this->loadedTemplates[$cls])) { + return $this->loadedTemplates[$cls]; + } + + if (!class_exists($cls, false)) { + if ($this->bcGetCacheFilename) { + $key = $this->getCacheFilename($name); + } else { + $key = $this->cache->generateKey($name, $mainCls); + } + + if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) { + $this->cache->load($key); + } + + if (!class_exists($cls, false)) { + $loader = $this->getLoader(); + if (!$loader instanceof Twig_SourceContextLoaderInterface) { + $source = new Twig_Source($loader->getSource($name), $name); + } else { + $source = $loader->getSourceContext($name); + } + + $content = $this->compileSource($source); + + if ($this->bcWriteCacheFile) { + $this->writeCacheFile($key, $content); + } else { + $this->cache->write($key, $content); + $this->cache->load($key); + } + + if (!class_exists($mainCls, false)) { + /* Last line of defense if either $this->bcWriteCacheFile was used, + * $this->cache is implemented as a no-op or we have a race condition + * where the cache was cleared between the above calls to write to and load from + * the cache. + */ + eval('?>'.$content); + } + } + + if (!class_exists($cls, false)) { + throw new Twig_Error_Runtime(sprintf('Failed to load Twig template "%s", index "%s": cache is corrupted.', $name, $index), -1, $source); + } + } + + if (!$this->runtimeInitialized) { + $this->initRuntime(); + } + + return $this->loadedTemplates[$cls] = new $cls($this); + } + + /** + * Creates a template from source. + * + * This method should not be used as a generic way to load templates. + * + * @param string $template The template name + * + * @return Twig_Template A template instance representing the given template name + * + * @throws Twig_Error_Loader When the template cannot be found + * @throws Twig_Error_Syntax When an error occurred during compilation + */ + public function createTemplate($template) + { + $name = sprintf('__string_template__%s', hash('sha256', uniqid(mt_rand(), true), false)); + + $loader = new Twig_Loader_Chain(array( + new Twig_Loader_Array(array($name => $template)), + $current = $this->getLoader(), + )); + + $this->setLoader($loader); + try { + $template = $this->loadTemplate($name); + } catch (Exception $e) { + $this->setLoader($current); + + throw $e; + } catch (Throwable $e) { + $this->setLoader($current); + + throw $e; + } + $this->setLoader($current); + + return $template; + } + + /** + * Returns true if the template is still fresh. + * + * Besides checking the loader for freshness information, + * this method also checks if the enabled extensions have + * not changed. + * + * @param string $name The template name + * @param int $time The last modification time of the cached template + * + * @return bool true if the template is fresh, false otherwise + */ + public function isTemplateFresh($name, $time) + { + if (0 === $this->lastModifiedExtension) { + foreach ($this->extensions as $extension) { + $r = new ReflectionObject($extension); + if (file_exists($r->getFileName()) && ($extensionTime = filemtime($r->getFileName())) > $this->lastModifiedExtension) { + $this->lastModifiedExtension = $extensionTime; + } + } + } + + return $this->lastModifiedExtension <= $time && $this->getLoader()->isFresh($name, $time); + } + + /** + * Tries to load a template consecutively from an array. + * + * Similar to loadTemplate() but it also accepts Twig_TemplateInterface instances and an array + * of templates where each is tried to be loaded. + * + * @param string|Twig_Template|array $names A template or an array of templates to try consecutively + * + * @return Twig_Template + * + * @throws Twig_Error_Loader When none of the templates can be found + * @throws Twig_Error_Syntax When an error occurred during compilation + */ + public function resolveTemplate($names) + { + if (!is_array($names)) { + $names = array($names); + } + + foreach ($names as $name) { + if ($name instanceof Twig_Template) { + return $name; + } + + try { + return $this->loadTemplate($name); + } catch (Twig_Error_Loader $e) { + } + } + + if (1 === count($names)) { + throw $e; + } + + throw new Twig_Error_Loader(sprintf('Unable to find one of the following templates: "%s".', implode('", "', $names))); + } + + /** + * Clears the internal template cache. + * + * @deprecated since 1.18.3 (to be removed in 2.0) + */ + public function clearTemplateCache() + { + @trigger_error(sprintf('The %s method is deprecated since version 1.18.3 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); + + $this->loadedTemplates = array(); + } + + /** + * Clears the template cache files on the filesystem. + * + * @deprecated since 1.22 (to be removed in 2.0) + */ + public function clearCacheFiles() + { + @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); + + if (is_string($this->originalCache)) { + foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->originalCache), RecursiveIteratorIterator::LEAVES_ONLY) as $file) { + if ($file->isFile()) { + @unlink($file->getPathname()); + } + } + } + } + + /** + * Gets the Lexer instance. + * + * @return Twig_LexerInterface + * + * @deprecated since 1.25 (to be removed in 2.0) + */ + public function getLexer() + { + @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), E_USER_DEPRECATED); + + if (null === $this->lexer) { + $this->lexer = new Twig_Lexer($this); + } + + return $this->lexer; + } + + public function setLexer(Twig_LexerInterface $lexer) + { + $this->lexer = $lexer; + } + + /** + * Tokenizes a source code. + * + * @param string|Twig_Source $source The template source code + * @param string $name The template name (deprecated) + * + * @return Twig_TokenStream + * + * @throws Twig_Error_Syntax When the code is syntactically wrong + */ + public function tokenize($source, $name = null) + { + if (!$source instanceof Twig_Source) { + @trigger_error(sprintf('Passing a string as the $source argument of %s() is deprecated since version 1.27. Pass a Twig_Source instance instead.', __METHOD__), E_USER_DEPRECATED); + $source = new Twig_Source($source, $name); + } + + if (null === $this->lexer) { + $this->lexer = new Twig_Lexer($this); + } + + return $this->lexer->tokenize($source); + } + + /** + * Gets the Parser instance. + * + * @return Twig_ParserInterface + * + * @deprecated since 1.25 (to be removed in 2.0) + */ + public function getParser() + { + @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), E_USER_DEPRECATED); + + if (null === $this->parser) { + $this->parser = new Twig_Parser($this); + } + + return $this->parser; + } + + public function setParser(Twig_ParserInterface $parser) + { + $this->parser = $parser; + } + + /** + * Converts a token stream to a node tree. + * + * @return Twig_Node_Module + * + * @throws Twig_Error_Syntax When the token stream is syntactically or semantically wrong + */ + public function parse(Twig_TokenStream $stream) + { + if (null === $this->parser) { + $this->parser = new Twig_Parser($this); + } + + return $this->parser->parse($stream); + } + + /** + * Gets the Compiler instance. + * + * @return Twig_CompilerInterface + * + * @deprecated since 1.25 (to be removed in 2.0) + */ + public function getCompiler() + { + @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), E_USER_DEPRECATED); + + if (null === $this->compiler) { + $this->compiler = new Twig_Compiler($this); + } + + return $this->compiler; + } + + public function setCompiler(Twig_CompilerInterface $compiler) + { + $this->compiler = $compiler; + } + + /** + * Compiles a node and returns the PHP code. + * + * @return string The compiled PHP source code + */ + public function compile(Twig_NodeInterface $node) + { + if (null === $this->compiler) { + $this->compiler = new Twig_Compiler($this); + } + + return $this->compiler->compile($node)->getSource(); + } + + /** + * Compiles a template source code. + * + * @param string|Twig_Source $source The template source code + * @param string $name The template name (deprecated) + * + * @return string The compiled PHP source code + * + * @throws Twig_Error_Syntax When there was an error during tokenizing, parsing or compiling + */ + public function compileSource($source, $name = null) + { + if (!$source instanceof Twig_Source) { + @trigger_error(sprintf('Passing a string as the $source argument of %s() is deprecated since version 1.27. Pass a Twig_Source instance instead.', __METHOD__), E_USER_DEPRECATED); + $source = new Twig_Source($source, $name); + } + + try { + return $this->compile($this->parse($this->tokenize($source))); + } catch (Twig_Error $e) { + $e->setSourceContext($source); + throw $e; + } catch (Exception $e) { + throw new Twig_Error_Syntax(sprintf('An exception has been thrown during the compilation of a template ("%s").', $e->getMessage()), -1, $source, $e); + } + } + + public function setLoader(Twig_LoaderInterface $loader) + { + if (!$loader instanceof Twig_SourceContextLoaderInterface && 0 !== strpos(get_class($loader), 'Mock_Twig_LoaderInterface')) { + @trigger_error(sprintf('Twig loader "%s" should implement Twig_SourceContextLoaderInterface since version 1.27.', get_class($loader)), E_USER_DEPRECATED); + } + + $this->loader = $loader; + } + + /** + * Gets the Loader instance. + * + * @return Twig_LoaderInterface + */ + public function getLoader() + { + if (null === $this->loader) { + throw new LogicException('You must set a loader first.'); + } + + return $this->loader; + } + + /** + * Sets the default template charset. + * + * @param string $charset The default charset + */ + public function setCharset($charset) + { + $this->charset = strtoupper($charset); + } + + /** + * Gets the default template charset. + * + * @return string The default charset + */ + public function getCharset() + { + return $this->charset; + } + + /** + * Initializes the runtime environment. + * + * @deprecated since 1.23 (to be removed in 2.0) + */ + public function initRuntime() + { + $this->runtimeInitialized = true; + + foreach ($this->getExtensions() as $name => $extension) { + if (!$extension instanceof Twig_Extension_InitRuntimeInterface) { + $m = new ReflectionMethod($extension, 'initRuntime'); + + if ('Twig_Extension' !== $m->getDeclaringClass()->getName()) { + @trigger_error(sprintf('Defining the initRuntime() method in the "%s" extension is deprecated since version 1.23. Use the `needs_environment` option to get the Twig_Environment instance in filters, functions, or tests; or explicitly implement Twig_Extension_InitRuntimeInterface if needed (not recommended).', $name), E_USER_DEPRECATED); + } + } + + $extension->initRuntime($this); + } + } + + /** + * Returns true if the given extension is registered. + * + * @param string $class The extension class name + * + * @return bool Whether the extension is registered or not + */ + public function hasExtension($class) + { + $class = ltrim($class, '\\'); + if (isset($this->extensions[$class])) { + if ($class !== get_class($this->extensions[$class])) { + @trigger_error(sprintf('Referencing the "%s" extension by its name (defined by getName()) is deprecated since 1.26 and will be removed in Twig 2.0. Use the Fully Qualified Extension Class Name instead.', $class), E_USER_DEPRECATED); + } + + return true; + } + + return isset($this->extensionsByClass[$class]); + } + + /** + * Adds a runtime loader. + */ + public function addRuntimeLoader(Twig_RuntimeLoaderInterface $loader) + { + $this->runtimeLoaders[] = $loader; + } + + /** + * Gets an extension by class name. + * + * @param string $class The extension class name + * + * @return Twig_ExtensionInterface + */ + public function getExtension($class) + { + $class = ltrim($class, '\\'); + + if (isset($this->extensions[$class])) { + if ($class !== get_class($this->extensions[$class])) { + @trigger_error(sprintf('Referencing the "%s" extension by its name (defined by getName()) is deprecated since 1.26 and will be removed in Twig 2.0. Use the Fully Qualified Extension Class Name instead.', $class), E_USER_DEPRECATED); + } + + return $this->extensions[$class]; + } + + if (!isset($this->extensionsByClass[$class])) { + throw new Twig_Error_Runtime(sprintf('The "%s" extension is not enabled.', $class)); + } + + return $this->extensionsByClass[$class]; + } + + /** + * Returns the runtime implementation of a Twig element (filter/function/test). + * + * @param string $class A runtime class name + * + * @return object The runtime implementation + * + * @throws Twig_Error_Runtime When the template cannot be found + */ + public function getRuntime($class) + { + if (isset($this->runtimes[$class])) { + return $this->runtimes[$class]; + } + + foreach ($this->runtimeLoaders as $loader) { + if (null !== $runtime = $loader->load($class)) { + return $this->runtimes[$class] = $runtime; + } + } + + throw new Twig_Error_Runtime(sprintf('Unable to load the "%s" runtime.', $class)); + } + + public function addExtension(Twig_ExtensionInterface $extension) + { + if ($this->extensionInitialized) { + throw new LogicException(sprintf('Unable to register extension "%s" as extensions have already been initialized.', $extension->getName())); + } + + $class = get_class($extension); + if ($class !== $extension->getName()) { + if (isset($this->extensions[$extension->getName()])) { + unset($this->extensions[$extension->getName()], $this->extensionsByClass[$class]); + @trigger_error(sprintf('The possibility to register the same extension twice ("%s") is deprecated since version 1.23 and will be removed in Twig 2.0. Use proper PHP inheritance instead.', $extension->getName()), E_USER_DEPRECATED); + } + } + + $this->lastModifiedExtension = 0; + $this->extensionsByClass[$class] = $extension; + $this->extensions[$extension->getName()] = $extension; + $this->updateOptionsHash(); + } + + /** + * Removes an extension by name. + * + * This method is deprecated and you should not use it. + * + * @param string $name The extension name + * + * @deprecated since 1.12 (to be removed in 2.0) + */ + public function removeExtension($name) + { + @trigger_error(sprintf('The %s method is deprecated since version 1.12 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); + + if ($this->extensionInitialized) { + throw new LogicException(sprintf('Unable to remove extension "%s" as extensions have already been initialized.', $name)); + } + + $class = ltrim($name, '\\'); + if (isset($this->extensions[$class])) { + if ($class !== get_class($this->extensions[$class])) { + @trigger_error(sprintf('Referencing the "%s" extension by its name (defined by getName()) is deprecated since 1.26 and will be removed in Twig 2.0. Use the Fully Qualified Extension Class Name instead.', $class), E_USER_DEPRECATED); + } + + unset($this->extensions[$class]); + } + + unset($this->extensions[$class]); + $this->updateOptionsHash(); + } + + /** + * Registers an array of extensions. + * + * @param array $extensions An array of extensions + */ + public function setExtensions(array $extensions) + { + foreach ($extensions as $extension) { + $this->addExtension($extension); + } + } + + /** + * Returns all registered extensions. + * + * @return Twig_ExtensionInterface[] An array of extensions (keys are for internal usage only and should not be relied on) + */ + public function getExtensions() + { + return $this->extensions; + } + + public function addTokenParser(Twig_TokenParserInterface $parser) + { + if ($this->extensionInitialized) { + throw new LogicException('Unable to add a token parser as extensions have already been initialized.'); + } + + $this->staging->addTokenParser($parser); + } + + /** + * Gets the registered Token Parsers. + * + * @return Twig_TokenParserBrokerInterface + * + * @internal + */ + public function getTokenParsers() + { + if (!$this->extensionInitialized) { + $this->initExtensions(); + } + + return $this->parsers; + } + + /** + * Gets registered tags. + * + * Be warned that this method cannot return tags defined by Twig_TokenParserBrokerInterface classes. + * + * @return Twig_TokenParserInterface[] + * + * @internal + */ + public function getTags() + { + $tags = array(); + foreach ($this->getTokenParsers()->getParsers() as $parser) { + if ($parser instanceof Twig_TokenParserInterface) { + $tags[$parser->getTag()] = $parser; + } + } + + return $tags; + } + + public function addNodeVisitor(Twig_NodeVisitorInterface $visitor) + { + if ($this->extensionInitialized) { + throw new LogicException('Unable to add a node visitor as extensions have already been initialized.'); + } + + $this->staging->addNodeVisitor($visitor); + } + + /** + * Gets the registered Node Visitors. + * + * @return Twig_NodeVisitorInterface[] + * + * @internal + */ + public function getNodeVisitors() + { + if (!$this->extensionInitialized) { + $this->initExtensions(); + } + + return $this->visitors; + } + + /** + * Registers a Filter. + * + * @param string|Twig_SimpleFilter $name The filter name or a Twig_SimpleFilter instance + * @param Twig_FilterInterface|Twig_SimpleFilter $filter + */ + public function addFilter($name, $filter = null) + { + if (!$name instanceof Twig_SimpleFilter && !($filter instanceof Twig_SimpleFilter || $filter instanceof Twig_FilterInterface)) { + throw new LogicException('A filter must be an instance of Twig_FilterInterface or Twig_SimpleFilter.'); + } + + if ($name instanceof Twig_SimpleFilter) { + $filter = $name; + $name = $filter->getName(); + } else { + @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated since version 1.21. Pass an instance of "Twig_SimpleFilter" instead when defining filter "%s".', __METHOD__, $name), E_USER_DEPRECATED); + } + + if ($this->extensionInitialized) { + throw new LogicException(sprintf('Unable to add filter "%s" as extensions have already been initialized.', $name)); + } + + $this->staging->addFilter($name, $filter); + } + + /** + * Get a filter by name. + * + * Subclasses may override this method and load filters differently; + * so no list of filters is available. + * + * @param string $name The filter name + * + * @return Twig_Filter|false A Twig_Filter instance or false if the filter does not exist + * + * @internal + */ + public function getFilter($name) + { + if (!$this->extensionInitialized) { + $this->initExtensions(); + } + + if (isset($this->filters[$name])) { + return $this->filters[$name]; + } + + foreach ($this->filters as $pattern => $filter) { + $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); + + if ($count) { + if (preg_match('#^'.$pattern.'$#', $name, $matches)) { + array_shift($matches); + $filter->setArguments($matches); + + return $filter; + } + } + } + + foreach ($this->filterCallbacks as $callback) { + if (false !== $filter = call_user_func($callback, $name)) { + return $filter; + } + } + + return false; + } + + public function registerUndefinedFilterCallback($callable) + { + $this->filterCallbacks[] = $callable; + } + + /** + * Gets the registered Filters. + * + * Be warned that this method cannot return filters defined with registerUndefinedFilterCallback. + * + * @return Twig_FilterInterface[] + * + * @see registerUndefinedFilterCallback + * + * @internal + */ + public function getFilters() + { + if (!$this->extensionInitialized) { + $this->initExtensions(); + } + + return $this->filters; + } + + /** + * Registers a Test. + * + * @param string|Twig_SimpleTest $name The test name or a Twig_SimpleTest instance + * @param Twig_TestInterface|Twig_SimpleTest $test A Twig_TestInterface instance or a Twig_SimpleTest instance + */ + public function addTest($name, $test = null) + { + if (!$name instanceof Twig_SimpleTest && !($test instanceof Twig_SimpleTest || $test instanceof Twig_TestInterface)) { + throw new LogicException('A test must be an instance of Twig_TestInterface or Twig_SimpleTest.'); + } + + if ($name instanceof Twig_SimpleTest) { + $test = $name; + $name = $test->getName(); + } else { + @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated since version 1.21. Pass an instance of "Twig_SimpleTest" instead when defining test "%s".', __METHOD__, $name), E_USER_DEPRECATED); + } + + if ($this->extensionInitialized) { + throw new LogicException(sprintf('Unable to add test "%s" as extensions have already been initialized.', $name)); + } + + $this->staging->addTest($name, $test); + } + + /** + * Gets the registered Tests. + * + * @return Twig_TestInterface[] + * + * @internal + */ + public function getTests() + { + if (!$this->extensionInitialized) { + $this->initExtensions(); + } + + return $this->tests; + } + + /** + * Gets a test by name. + * + * @param string $name The test name + * + * @return Twig_Test|false A Twig_Test instance or false if the test does not exist + * + * @internal + */ + public function getTest($name) + { + if (!$this->extensionInitialized) { + $this->initExtensions(); + } + + if (isset($this->tests[$name])) { + return $this->tests[$name]; + } + + return false; + } + + /** + * Registers a Function. + * + * @param string|Twig_SimpleFunction $name The function name or a Twig_SimpleFunction instance + * @param Twig_FunctionInterface|Twig_SimpleFunction $function + */ + public function addFunction($name, $function = null) + { + if (!$name instanceof Twig_SimpleFunction && !($function instanceof Twig_SimpleFunction || $function instanceof Twig_FunctionInterface)) { + throw new LogicException('A function must be an instance of Twig_FunctionInterface or Twig_SimpleFunction.'); + } + + if ($name instanceof Twig_SimpleFunction) { + $function = $name; + $name = $function->getName(); + } else { + @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated since version 1.21. Pass an instance of "Twig_SimpleFunction" instead when defining function "%s".', __METHOD__, $name), E_USER_DEPRECATED); + } + + if ($this->extensionInitialized) { + throw new LogicException(sprintf('Unable to add function "%s" as extensions have already been initialized.', $name)); + } + + $this->staging->addFunction($name, $function); + } + + /** + * Get a function by name. + * + * Subclasses may override this method and load functions differently; + * so no list of functions is available. + * + * @param string $name function name + * + * @return Twig_Function|false A Twig_Function instance or false if the function does not exist + * + * @internal + */ + public function getFunction($name) + { + if (!$this->extensionInitialized) { + $this->initExtensions(); + } + + if (isset($this->functions[$name])) { + return $this->functions[$name]; + } + + foreach ($this->functions as $pattern => $function) { + $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); + + if ($count) { + if (preg_match('#^'.$pattern.'$#', $name, $matches)) { + array_shift($matches); + $function->setArguments($matches); + + return $function; + } + } + } + + foreach ($this->functionCallbacks as $callback) { + if (false !== $function = call_user_func($callback, $name)) { + return $function; + } + } + + return false; + } + + public function registerUndefinedFunctionCallback($callable) + { + $this->functionCallbacks[] = $callable; + } + + /** + * Gets registered functions. + * + * Be warned that this method cannot return functions defined with registerUndefinedFunctionCallback. + * + * @return Twig_FunctionInterface[] + * + * @see registerUndefinedFunctionCallback + * + * @internal + */ + public function getFunctions() + { + if (!$this->extensionInitialized) { + $this->initExtensions(); + } + + return $this->functions; + } + + /** + * Registers a Global. + * + * New globals can be added before compiling or rendering a template; + * but after, you can only update existing globals. + * + * @param string $name The global name + * @param mixed $value The global value + */ + public function addGlobal($name, $value) + { + if ($this->extensionInitialized || $this->runtimeInitialized) { + if (null === $this->globals) { + $this->globals = $this->initGlobals(); + } + + if (!array_key_exists($name, $this->globals)) { + // The deprecation notice must be turned into the following exception in Twig 2.0 + @trigger_error(sprintf('Registering global variable "%s" at runtime or when the extensions have already been initialized is deprecated since version 1.21.', $name), E_USER_DEPRECATED); + //throw new LogicException(sprintf('Unable to add global "%s" as the runtime or the extensions have already been initialized.', $name)); + } + } + + if ($this->extensionInitialized || $this->runtimeInitialized) { + // update the value + $this->globals[$name] = $value; + } else { + $this->staging->addGlobal($name, $value); + } + } + + /** + * Gets the registered Globals. + * + * @return array An array of globals + * + * @internal + */ + public function getGlobals() + { + if (!$this->runtimeInitialized && !$this->extensionInitialized) { + return $this->initGlobals(); + } + + if (null === $this->globals) { + $this->globals = $this->initGlobals(); + } + + return $this->globals; + } + + /** + * Merges a context with the defined globals. + * + * @param array $context An array representing the context + * + * @return array The context merged with the globals + */ + public function mergeGlobals(array $context) + { + // we don't use array_merge as the context being generally + // bigger than globals, this code is faster. + foreach ($this->getGlobals() as $key => $value) { + if (!array_key_exists($key, $context)) { + $context[$key] = $value; + } + } + + return $context; + } + + /** + * Gets the registered unary Operators. + * + * @return array An array of unary operators + * + * @internal + */ + public function getUnaryOperators() + { + if (!$this->extensionInitialized) { + $this->initExtensions(); + } + + return $this->unaryOperators; + } + + /** + * Gets the registered binary Operators. + * + * @return array An array of binary operators + * + * @internal + */ + public function getBinaryOperators() + { + if (!$this->extensionInitialized) { + $this->initExtensions(); + } + + return $this->binaryOperators; + } + + /** + * @deprecated since 1.23 (to be removed in 2.0) + */ + public function computeAlternatives($name, $items) + { + @trigger_error(sprintf('The %s method is deprecated since version 1.23 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); + + return Twig_Error_Syntax::computeAlternatives($name, $items); + } + + /** + * @internal + */ + protected function initGlobals() + { + $globals = array(); + foreach ($this->extensions as $name => $extension) { + if (!$extension instanceof Twig_Extension_GlobalsInterface) { + $m = new ReflectionMethod($extension, 'getGlobals'); + + if ('Twig_Extension' !== $m->getDeclaringClass()->getName()) { + @trigger_error(sprintf('Defining the getGlobals() method in the "%s" extension without explicitly implementing Twig_Extension_GlobalsInterface is deprecated since version 1.23.', $name), E_USER_DEPRECATED); + } + } + + $extGlob = $extension->getGlobals(); + if (!is_array($extGlob)) { + throw new UnexpectedValueException(sprintf('"%s::getGlobals()" must return an array of globals.', get_class($extension))); + } + + $globals[] = $extGlob; + } + + $globals[] = $this->staging->getGlobals(); + + return call_user_func_array('array_merge', $globals); + } + + /** + * @internal + */ + protected function initExtensions() + { + if ($this->extensionInitialized) { + return; + } + + $this->parsers = new Twig_TokenParserBroker(array(), array(), false); + $this->filters = array(); + $this->functions = array(); + $this->tests = array(); + $this->visitors = array(); + $this->unaryOperators = array(); + $this->binaryOperators = array(); + + foreach ($this->extensions as $extension) { + $this->initExtension($extension); + } + $this->initExtension($this->staging); + // Done at the end only, so that an exception during initialization does not mark the environment as initialized when catching the exception + $this->extensionInitialized = true; + } + + /** + * @internal + */ + protected function initExtension(Twig_ExtensionInterface $extension) + { + // filters + foreach ($extension->getFilters() as $name => $filter) { + if ($filter instanceof Twig_SimpleFilter) { + $name = $filter->getName(); + } else { + @trigger_error(sprintf('Using an instance of "%s" for filter "%s" is deprecated since version 1.21. Use Twig_SimpleFilter instead.', get_class($filter), $name), E_USER_DEPRECATED); + } + + $this->filters[$name] = $filter; + } + + // functions + foreach ($extension->getFunctions() as $name => $function) { + if ($function instanceof Twig_SimpleFunction) { + $name = $function->getName(); + } else { + @trigger_error(sprintf('Using an instance of "%s" for function "%s" is deprecated since version 1.21. Use Twig_SimpleFunction instead.', get_class($function), $name), E_USER_DEPRECATED); + } + + $this->functions[$name] = $function; + } + + // tests + foreach ($extension->getTests() as $name => $test) { + if ($test instanceof Twig_SimpleTest) { + $name = $test->getName(); + } else { + @trigger_error(sprintf('Using an instance of "%s" for test "%s" is deprecated since version 1.21. Use Twig_SimpleTest instead.', get_class($test), $name), E_USER_DEPRECATED); + } + + $this->tests[$name] = $test; + } + + // token parsers + foreach ($extension->getTokenParsers() as $parser) { + if ($parser instanceof Twig_TokenParserInterface) { + $this->parsers->addTokenParser($parser); + } elseif ($parser instanceof Twig_TokenParserBrokerInterface) { + @trigger_error('Registering a Twig_TokenParserBrokerInterface instance is deprecated since version 1.21.', E_USER_DEPRECATED); + + $this->parsers->addTokenParserBroker($parser); + } else { + throw new LogicException('getTokenParsers() must return an array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances.'); + } + } + + // node visitors + foreach ($extension->getNodeVisitors() as $visitor) { + $this->visitors[] = $visitor; + } + + // operators + if ($operators = $extension->getOperators()) { + if (!is_array($operators)) { + throw new InvalidArgumentException(sprintf('"%s::getOperators()" must return an array with operators, got "%s".', get_class($extension), is_object($operators) ? get_class($operators) : gettype($operators).(is_resource($operators) ? '' : '#'.$operators))); + } + + if (2 !== count($operators)) { + throw new InvalidArgumentException(sprintf('"%s::getOperators()" must return an array of 2 elements, got %d.', get_class($extension), count($operators))); + } + + $this->unaryOperators = array_merge($this->unaryOperators, $operators[0]); + $this->binaryOperators = array_merge($this->binaryOperators, $operators[1]); + } + } + + /** + * @deprecated since 1.22 (to be removed in 2.0) + */ + protected function writeCacheFile($file, $content) + { + $this->cache->write($file, $content); + } + + private function updateOptionsHash() + { + $hashParts = array_merge( + array_keys($this->extensions), + array( + (int) function_exists('twig_template_get_attributes'), + PHP_MAJOR_VERSION, + PHP_MINOR_VERSION, + self::VERSION, + (int) $this->debug, + $this->baseTemplateClass, + (int) $this->strictVariables, + ) + ); + $this->optionsHash = implode(':', $hashParts); + } +} diff --git a/vendor/twig/twig/lib/Twig/Error.php b/vendor/twig/twig/lib/Twig/Error.php new file mode 100644 index 0000000000000000000000000000000000000000..358a03b97cca9a9b2338730e30d246835d0087a9 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Error.php @@ -0,0 +1,365 @@ + + */ +class Twig_Error extends Exception +{ + protected $lineno; + // to be renamed to name in 2.0 + protected $filename; + protected $rawMessage; + protected $previous; + + private $sourcePath; + private $sourceCode; + + /** + * Constructor. + * + * Set both the line number and the name to false to + * disable automatic guessing of the original template name + * and line number. + * + * Set the line number to -1 to enable its automatic guessing. + * Set the name to null to enable its automatic guessing. + * + * By default, automatic guessing is enabled. + * + * @param string $message The error message + * @param int $lineno The template line where the error occurred + * @param Twig_Source|string|null $source The source context where the error occurred + * @param Exception $previous The previous exception + */ + public function __construct($message, $lineno = -1, $source = null, Exception $previous = null) + { + if (null === $source) { + $name = null; + } elseif (!$source instanceof Twig_Source) { + // for compat with the Twig C ext., passing the template name as string is accepted + $name = $source; + } else { + $name = $source->getName(); + $this->sourceCode = $source->getCode(); + $this->sourcePath = $source->getPath(); + } + if (PHP_VERSION_ID < 50300) { + $this->previous = $previous; + parent::__construct(''); + } else { + parent::__construct('', 0, $previous); + } + + $this->lineno = $lineno; + $this->filename = $name; + + if (-1 === $lineno || null === $name || null === $this->sourcePath) { + $this->guessTemplateInfo(); + } + + $this->rawMessage = $message; + + $this->updateRepr(); + } + + /** + * Gets the raw message. + * + * @return string The raw message + */ + public function getRawMessage() + { + return $this->rawMessage; + } + + /** + * Gets the logical name where the error occurred. + * + * @return string The name + * + * @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead. + */ + public function getTemplateFile() + { + @trigger_error(sprintf('The "%s" method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', __METHOD__), E_USER_DEPRECATED); + + return $this->filename; + } + + /** + * Sets the logical name where the error occurred. + * + * @param string $name The name + * + * @deprecated since 1.27 (to be removed in 2.0). Use setSourceContext() instead. + */ + public function setTemplateFile($name) + { + @trigger_error(sprintf('The "%s" method is deprecated since version 1.27 and will be removed in 2.0. Use setSourceContext() instead.', __METHOD__), E_USER_DEPRECATED); + + $this->filename = $name; + + $this->updateRepr(); + } + + /** + * Gets the logical name where the error occurred. + * + * @return string The name + * + * @deprecated since 1.29 (to be removed in 2.0). Use getSourceContext() instead. + */ + public function getTemplateName() + { + @trigger_error(sprintf('The "%s" method is deprecated since version 1.29 and will be removed in 2.0. Use getSourceContext() instead.', __METHOD__), E_USER_DEPRECATED); + + return $this->filename; + } + + /** + * Sets the logical name where the error occurred. + * + * @param string $name The name + * + * @deprecated since 1.29 (to be removed in 2.0). Use setSourceContext() instead. + */ + public function setTemplateName($name) + { + @trigger_error(sprintf('The "%s" method is deprecated since version 1.29 and will be removed in 2.0. Use setSourceContext() instead.', __METHOD__), E_USER_DEPRECATED); + + $this->filename = $name; + $this->sourceCode = $this->sourcePath = null; + + $this->updateRepr(); + } + + /** + * Gets the template line where the error occurred. + * + * @return int The template line + */ + public function getTemplateLine() + { + return $this->lineno; + } + + /** + * Sets the template line where the error occurred. + * + * @param int $lineno The template line + */ + public function setTemplateLine($lineno) + { + $this->lineno = $lineno; + + $this->updateRepr(); + } + + /** + * Gets the source context of the Twig template where the error occurred. + * + * @return Twig_Source|null + */ + public function getSourceContext() + { + return $this->filename ? new Twig_Source($this->sourceCode, $this->filename, $this->sourcePath) : null; + } + + /** + * Sets the source context of the Twig template where the error occurred. + */ + public function setSourceContext(Twig_Source $source = null) + { + if (null === $source) { + $this->sourceCode = $this->filename = $this->sourcePath = null; + } else { + $this->sourceCode = $source->getCode(); + $this->filename = $source->getName(); + $this->sourcePath = $source->getPath(); + } + + $this->updateRepr(); + } + + public function guess() + { + $this->guessTemplateInfo(); + $this->updateRepr(); + } + + /** + * For PHP < 5.3.0, provides access to the getPrevious() method. + * + * @param string $method The method name + * @param array $arguments The parameters to be passed to the method + * + * @return Exception The previous exception or null + * + * @throws BadMethodCallException + */ + public function __call($method, $arguments) + { + if ('getprevious' == strtolower($method)) { + return $this->previous; + } + + throw new BadMethodCallException(sprintf('Method "Twig_Error::%s()" does not exist.', $method)); + } + + public function appendMessage($rawMessage) + { + $this->rawMessage .= $rawMessage; + $this->updateRepr(); + } + + /** + * @internal + */ + protected function updateRepr() + { + $this->message = $this->rawMessage; + + if ($this->sourcePath && $this->lineno > 0) { + $this->file = $this->sourcePath; + $this->line = $this->lineno; + + return; + } + + $dot = false; + if ('.' === substr($this->message, -1)) { + $this->message = substr($this->message, 0, -1); + $dot = true; + } + + $questionMark = false; + if ('?' === substr($this->message, -1)) { + $this->message = substr($this->message, 0, -1); + $questionMark = true; + } + + if ($this->filename) { + if (is_string($this->filename) || (is_object($this->filename) && method_exists($this->filename, '__toString'))) { + $name = sprintf('"%s"', $this->filename); + } else { + $name = json_encode($this->filename); + } + $this->message .= sprintf(' in %s', $name); + } + + if ($this->lineno && $this->lineno >= 0) { + $this->message .= sprintf(' at line %d', $this->lineno); + } + + if ($dot) { + $this->message .= '.'; + } + + if ($questionMark) { + $this->message .= '?'; + } + } + + /** + * @internal + */ + protected function guessTemplateInfo() + { + $template = null; + $templateClass = null; + + if (PHP_VERSION_ID >= 50306) { + $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT); + } else { + $backtrace = debug_backtrace(); + } + + foreach ($backtrace as $trace) { + if (isset($trace['object']) && $trace['object'] instanceof Twig_Template && 'Twig_Template' !== get_class($trace['object'])) { + $currentClass = get_class($trace['object']); + $isEmbedContainer = 0 === strpos($templateClass, $currentClass); + if (null === $this->filename || ($this->filename == $trace['object']->getTemplateName() && !$isEmbedContainer)) { + $template = $trace['object']; + $templateClass = get_class($trace['object']); + } + } + } + + // update template name + if (null !== $template && null === $this->filename) { + $this->filename = $template->getTemplateName(); + } + + // update template path if any + if (null !== $template && null === $this->sourcePath) { + $src = $template->getSourceContext(); + $this->sourceCode = $src->getCode(); + $this->sourcePath = $src->getPath(); + } + + if (null === $template || $this->lineno > -1) { + return; + } + + $r = new ReflectionObject($template); + $file = $r->getFileName(); + + // hhvm has a bug where eval'ed files comes out as the current directory + if (is_dir($file)) { + $file = ''; + } + + $exceptions = array($e = $this); + while (($e instanceof self || method_exists($e, 'getPrevious')) && $e = $e->getPrevious()) { + $exceptions[] = $e; + } + + while ($e = array_pop($exceptions)) { + $traces = $e->getTrace(); + array_unshift($traces, array('file' => $e->getFile(), 'line' => $e->getLine())); + + while ($trace = array_shift($traces)) { + if (!isset($trace['file']) || !isset($trace['line']) || $file != $trace['file']) { + continue; + } + + foreach ($template->getDebugInfo() as $codeLine => $templateLine) { + if ($codeLine <= $trace['line']) { + // update template line + $this->lineno = $templateLine; + + return; + } + } + } + } + } +} diff --git a/vendor/twig/twig/lib/Twig/Error/Loader.php b/vendor/twig/twig/lib/Twig/Error/Loader.php new file mode 100644 index 0000000000000000000000000000000000000000..68297201ab7d82da58e6dabc8127cdb8eeba9413 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Error/Loader.php @@ -0,0 +1,38 @@ + + */ +class Twig_Error_Loader extends Twig_Error +{ + public function __construct($message, $lineno = -1, $source = null, Exception $previous = null) + { + if (PHP_VERSION_ID < 50300) { + $this->previous = $previous; + Exception::__construct(''); + } else { + Exception::__construct('', 0, $previous); + } + $this->appendMessage($message); + $this->setTemplateLine(false); + } +} diff --git a/vendor/twig/twig/lib/Twig/Error/Runtime.php b/vendor/twig/twig/lib/Twig/Error/Runtime.php new file mode 100644 index 0000000000000000000000000000000000000000..c4e41b1d04bde03b31859c1c593ea11d96d3e2f7 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Error/Runtime.php @@ -0,0 +1,20 @@ + + */ +class Twig_Error_Runtime extends Twig_Error +{ +} diff --git a/vendor/twig/twig/lib/Twig/Error/Syntax.php b/vendor/twig/twig/lib/Twig/Error/Syntax.php new file mode 100644 index 0000000000000000000000000000000000000000..bded07e564405cffc745b0b38fefb9fe6f60eca8 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Error/Syntax.php @@ -0,0 +1,53 @@ + + */ +class Twig_Error_Syntax extends Twig_Error +{ + /** + * Tweaks the error message to include suggestions. + * + * @param string $name The original name of the item that does not exist + * @param array $items An array of possible items + */ + public function addSuggestions($name, array $items) + { + if (!$alternatives = self::computeAlternatives($name, $items)) { + return; + } + + $this->appendMessage(sprintf(' Did you mean "%s"?', implode('", "', $alternatives))); + } + + /** + * @internal + * + * To be merged with the addSuggestions() method in 2.0. + */ + public static function computeAlternatives($name, $items) + { + $alternatives = array(); + foreach ($items as $item) { + $lev = levenshtein($name, $item); + if ($lev <= strlen($name) / 3 || false !== strpos($item, $name)) { + $alternatives[$item] = $lev; + } + } + asort($alternatives); + + return array_keys($alternatives); + } +} diff --git a/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php b/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..553fb4e5e5f7c1d4aefab32d5cb769fbb7da7b2a --- /dev/null +++ b/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php @@ -0,0 +1,29 @@ + + * + * @deprecated since 1.12 (to be removed in 3.0) + */ +interface Twig_ExistsLoaderInterface +{ + /** + * Check if we have the source code of a template, given its name. + * + * @param string $name The name of the template to check if we can load + * + * @return bool If the template source code is handled by this loader or not + */ + public function exists($name); +} diff --git a/vendor/twig/twig/lib/Twig/ExpressionParser.php b/vendor/twig/twig/lib/Twig/ExpressionParser.php new file mode 100644 index 0000000000000000000000000000000000000000..517ad14c7640a322738c79c79c8d70199dd1615a --- /dev/null +++ b/vendor/twig/twig/lib/Twig/ExpressionParser.php @@ -0,0 +1,739 @@ + + * + * @internal + */ +class Twig_ExpressionParser +{ + const OPERATOR_LEFT = 1; + const OPERATOR_RIGHT = 2; + + protected $parser; + protected $unaryOperators; + protected $binaryOperators; + + private $env; + + public function __construct(Twig_Parser $parser, $env = null) + { + $this->parser = $parser; + + if ($env instanceof Twig_Environment) { + $this->env = $env; + $this->unaryOperators = $env->getUnaryOperators(); + $this->binaryOperators = $env->getBinaryOperators(); + } else { + @trigger_error('Passing the operators as constructor arguments to '.__METHOD__.' is deprecated since version 1.27. Pass the environment instead.', E_USER_DEPRECATED); + + $this->env = $parser->getEnvironment(); + $this->unaryOperators = func_get_arg(1); + $this->binaryOperators = func_get_arg(2); + } + } + + public function parseExpression($precedence = 0) + { + $expr = $this->getPrimary(); + $token = $this->parser->getCurrentToken(); + while ($this->isBinary($token) && $this->binaryOperators[$token->getValue()]['precedence'] >= $precedence) { + $op = $this->binaryOperators[$token->getValue()]; + $this->parser->getStream()->next(); + + if ('is not' === $token->getValue()) { + $expr = $this->parseNotTestExpression($expr); + } elseif ('is' === $token->getValue()) { + $expr = $this->parseTestExpression($expr); + } elseif (isset($op['callable'])) { + $expr = call_user_func($op['callable'], $this->parser, $expr); + } else { + $expr1 = $this->parseExpression(self::OPERATOR_LEFT === $op['associativity'] ? $op['precedence'] + 1 : $op['precedence']); + $class = $op['class']; + $expr = new $class($expr, $expr1, $token->getLine()); + } + + $token = $this->parser->getCurrentToken(); + } + + if (0 === $precedence) { + return $this->parseConditionalExpression($expr); + } + + return $expr; + } + + protected function getPrimary() + { + $token = $this->parser->getCurrentToken(); + + if ($this->isUnary($token)) { + $operator = $this->unaryOperators[$token->getValue()]; + $this->parser->getStream()->next(); + $expr = $this->parseExpression($operator['precedence']); + $class = $operator['class']; + + return $this->parsePostfixExpression(new $class($expr, $token->getLine())); + } elseif ($token->test(Twig_Token::PUNCTUATION_TYPE, '(')) { + $this->parser->getStream()->next(); + $expr = $this->parseExpression(); + $this->parser->getStream()->expect(Twig_Token::PUNCTUATION_TYPE, ')', 'An opened parenthesis is not properly closed'); + + return $this->parsePostfixExpression($expr); + } + + return $this->parsePrimaryExpression(); + } + + protected function parseConditionalExpression($expr) + { + while ($this->parser->getStream()->nextIf(Twig_Token::PUNCTUATION_TYPE, '?')) { + if (!$this->parser->getStream()->nextIf(Twig_Token::PUNCTUATION_TYPE, ':')) { + $expr2 = $this->parseExpression(); + if ($this->parser->getStream()->nextIf(Twig_Token::PUNCTUATION_TYPE, ':')) { + $expr3 = $this->parseExpression(); + } else { + $expr3 = new Twig_Node_Expression_Constant('', $this->parser->getCurrentToken()->getLine()); + } + } else { + $expr2 = $expr; + $expr3 = $this->parseExpression(); + } + + $expr = new Twig_Node_Expression_Conditional($expr, $expr2, $expr3, $this->parser->getCurrentToken()->getLine()); + } + + return $expr; + } + + protected function isUnary(Twig_Token $token) + { + return $token->test(Twig_Token::OPERATOR_TYPE) && isset($this->unaryOperators[$token->getValue()]); + } + + protected function isBinary(Twig_Token $token) + { + return $token->test(Twig_Token::OPERATOR_TYPE) && isset($this->binaryOperators[$token->getValue()]); + } + + public function parsePrimaryExpression() + { + $token = $this->parser->getCurrentToken(); + switch ($token->getType()) { + case Twig_Token::NAME_TYPE: + $this->parser->getStream()->next(); + switch ($token->getValue()) { + case 'true': + case 'TRUE': + $node = new Twig_Node_Expression_Constant(true, $token->getLine()); + break; + + case 'false': + case 'FALSE': + $node = new Twig_Node_Expression_Constant(false, $token->getLine()); + break; + + case 'none': + case 'NONE': + case 'null': + case 'NULL': + $node = new Twig_Node_Expression_Constant(null, $token->getLine()); + break; + + default: + if ('(' === $this->parser->getCurrentToken()->getValue()) { + $node = $this->getFunctionNode($token->getValue(), $token->getLine()); + } else { + $node = new Twig_Node_Expression_Name($token->getValue(), $token->getLine()); + } + } + break; + + case Twig_Token::NUMBER_TYPE: + $this->parser->getStream()->next(); + $node = new Twig_Node_Expression_Constant($token->getValue(), $token->getLine()); + break; + + case Twig_Token::STRING_TYPE: + case Twig_Token::INTERPOLATION_START_TYPE: + $node = $this->parseStringExpression(); + break; + + case Twig_Token::OPERATOR_TYPE: + if (preg_match(Twig_Lexer::REGEX_NAME, $token->getValue(), $matches) && $matches[0] == $token->getValue()) { + // in this context, string operators are variable names + $this->parser->getStream()->next(); + $node = new Twig_Node_Expression_Name($token->getValue(), $token->getLine()); + break; + } elseif (isset($this->unaryOperators[$token->getValue()])) { + $class = $this->unaryOperators[$token->getValue()]['class']; + + $ref = new ReflectionClass($class); + $negClass = 'Twig_Node_Expression_Unary_Neg'; + $posClass = 'Twig_Node_Expression_Unary_Pos'; + if (!(in_array($ref->getName(), array($negClass, $posClass)) || $ref->isSubclassOf($negClass) || $ref->isSubclassOf($posClass))) { + throw new Twig_Error_Syntax(sprintf('Unexpected unary operator "%s".', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); + } + + $this->parser->getStream()->next(); + $expr = $this->parsePrimaryExpression(); + + $node = new $class($expr, $token->getLine()); + break; + } + + default: + if ($token->test(Twig_Token::PUNCTUATION_TYPE, '[')) { + $node = $this->parseArrayExpression(); + } elseif ($token->test(Twig_Token::PUNCTUATION_TYPE, '{')) { + $node = $this->parseHashExpression(); + } else { + throw new Twig_Error_Syntax(sprintf('Unexpected token "%s" of value "%s".', Twig_Token::typeToEnglish($token->getType()), $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); + } + } + + return $this->parsePostfixExpression($node); + } + + public function parseStringExpression() + { + $stream = $this->parser->getStream(); + + $nodes = array(); + // a string cannot be followed by another string in a single expression + $nextCanBeString = true; + while (true) { + if ($nextCanBeString && $token = $stream->nextIf(Twig_Token::STRING_TYPE)) { + $nodes[] = new Twig_Node_Expression_Constant($token->getValue(), $token->getLine()); + $nextCanBeString = false; + } elseif ($stream->nextIf(Twig_Token::INTERPOLATION_START_TYPE)) { + $nodes[] = $this->parseExpression(); + $stream->expect(Twig_Token::INTERPOLATION_END_TYPE); + $nextCanBeString = true; + } else { + break; + } + } + + $expr = array_shift($nodes); + foreach ($nodes as $node) { + $expr = new Twig_Node_Expression_Binary_Concat($expr, $node, $node->getTemplateLine()); + } + + return $expr; + } + + public function parseArrayExpression() + { + $stream = $this->parser->getStream(); + $stream->expect(Twig_Token::PUNCTUATION_TYPE, '[', 'An array element was expected'); + + $node = new Twig_Node_Expression_Array(array(), $stream->getCurrent()->getLine()); + $first = true; + while (!$stream->test(Twig_Token::PUNCTUATION_TYPE, ']')) { + if (!$first) { + $stream->expect(Twig_Token::PUNCTUATION_TYPE, ',', 'An array element must be followed by a comma'); + + // trailing ,? + if ($stream->test(Twig_Token::PUNCTUATION_TYPE, ']')) { + break; + } + } + $first = false; + + $node->addElement($this->parseExpression()); + } + $stream->expect(Twig_Token::PUNCTUATION_TYPE, ']', 'An opened array is not properly closed'); + + return $node; + } + + public function parseHashExpression() + { + $stream = $this->parser->getStream(); + $stream->expect(Twig_Token::PUNCTUATION_TYPE, '{', 'A hash element was expected'); + + $node = new Twig_Node_Expression_Array(array(), $stream->getCurrent()->getLine()); + $first = true; + while (!$stream->test(Twig_Token::PUNCTUATION_TYPE, '}')) { + if (!$first) { + $stream->expect(Twig_Token::PUNCTUATION_TYPE, ',', 'A hash value must be followed by a comma'); + + // trailing ,? + if ($stream->test(Twig_Token::PUNCTUATION_TYPE, '}')) { + break; + } + } + $first = false; + + // a hash key can be: + // + // * a number -- 12 + // * a string -- 'a' + // * a name, which is equivalent to a string -- a + // * an expression, which must be enclosed in parentheses -- (1 + 2) + if (($token = $stream->nextIf(Twig_Token::STRING_TYPE)) || ($token = $stream->nextIf(Twig_Token::NAME_TYPE)) || $token = $stream->nextIf(Twig_Token::NUMBER_TYPE)) { + $key = new Twig_Node_Expression_Constant($token->getValue(), $token->getLine()); + } elseif ($stream->test(Twig_Token::PUNCTUATION_TYPE, '(')) { + $key = $this->parseExpression(); + } else { + $current = $stream->getCurrent(); + + throw new Twig_Error_Syntax(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s".', Twig_Token::typeToEnglish($current->getType()), $current->getValue()), $current->getLine(), $stream->getSourceContext()); + } + + $stream->expect(Twig_Token::PUNCTUATION_TYPE, ':', 'A hash key must be followed by a colon (:)'); + $value = $this->parseExpression(); + + $node->addElement($value, $key); + } + $stream->expect(Twig_Token::PUNCTUATION_TYPE, '}', 'An opened hash is not properly closed'); + + return $node; + } + + public function parsePostfixExpression($node) + { + while (true) { + $token = $this->parser->getCurrentToken(); + if ($token->getType() == Twig_Token::PUNCTUATION_TYPE) { + if ('.' == $token->getValue() || '[' == $token->getValue()) { + $node = $this->parseSubscriptExpression($node); + } elseif ('|' == $token->getValue()) { + $node = $this->parseFilterExpression($node); + } else { + break; + } + } else { + break; + } + } + + return $node; + } + + public function getFunctionNode($name, $line) + { + switch ($name) { + case 'parent': + $this->parseArguments(); + if (!count($this->parser->getBlockStack())) { + throw new Twig_Error_Syntax('Calling "parent" outside a block is forbidden.', $line, $this->parser->getStream()->getSourceContext()); + } + + if (!$this->parser->getParent() && !$this->parser->hasTraits()) { + throw new Twig_Error_Syntax('Calling "parent" on a template that does not extend nor "use" another template is forbidden.', $line, $this->parser->getStream()->getSourceContext()); + } + + return new Twig_Node_Expression_Parent($this->parser->peekBlockStack(), $line); + case 'block': + $args = $this->parseArguments(); + if (count($args) < 1) { + throw new Twig_Error_Syntax('The "block" function takes one argument (the block name).', $line, $this->parser->getStream()->getSourceContext()); + } + + return new Twig_Node_Expression_BlockReference($args->getNode(0), count($args) > 1 ? $args->getNode(1) : null, $line); + case 'attribute': + $args = $this->parseArguments(); + if (count($args) < 2) { + throw new Twig_Error_Syntax('The "attribute" function takes at least two arguments (the variable and the attributes).', $line, $this->parser->getStream()->getSourceContext()); + } + + return new Twig_Node_Expression_GetAttr($args->getNode(0), $args->getNode(1), count($args) > 2 ? $args->getNode(2) : null, Twig_Template::ANY_CALL, $line); + default: + if (null !== $alias = $this->parser->getImportedSymbol('function', $name)) { + $arguments = new Twig_Node_Expression_Array(array(), $line); + foreach ($this->parseArguments() as $n) { + $arguments->addElement($n); + } + + $node = new Twig_Node_Expression_MethodCall($alias['node'], $alias['name'], $arguments, $line); + $node->setAttribute('safe', true); + + return $node; + } + + $args = $this->parseArguments(true); + $class = $this->getFunctionNodeClass($name, $line); + + return new $class($name, $args, $line); + } + } + + public function parseSubscriptExpression($node) + { + $stream = $this->parser->getStream(); + $token = $stream->next(); + $lineno = $token->getLine(); + $arguments = new Twig_Node_Expression_Array(array(), $lineno); + $type = Twig_Template::ANY_CALL; + if ($token->getValue() == '.') { + $token = $stream->next(); + if ( + $token->getType() == Twig_Token::NAME_TYPE + || + $token->getType() == Twig_Token::NUMBER_TYPE + || + ($token->getType() == Twig_Token::OPERATOR_TYPE && preg_match(Twig_Lexer::REGEX_NAME, $token->getValue())) + ) { + $arg = new Twig_Node_Expression_Constant($token->getValue(), $lineno); + + if ($stream->test(Twig_Token::PUNCTUATION_TYPE, '(')) { + $type = Twig_Template::METHOD_CALL; + foreach ($this->parseArguments() as $n) { + $arguments->addElement($n); + } + } + } else { + throw new Twig_Error_Syntax('Expected name or number.', $lineno, $stream->getSourceContext()); + } + + if ($node instanceof Twig_Node_Expression_Name && null !== $this->parser->getImportedSymbol('template', $node->getAttribute('name'))) { + if (!$arg instanceof Twig_Node_Expression_Constant) { + throw new Twig_Error_Syntax(sprintf('Dynamic macro names are not supported (called on "%s").', $node->getAttribute('name')), $token->getLine(), $stream->getSourceContext()); + } + + $name = $arg->getAttribute('value'); + + if ($this->parser->isReservedMacroName($name)) { + throw new Twig_Error_Syntax(sprintf('"%s" cannot be called as macro as it is a reserved keyword.', $name), $token->getLine(), $stream->getSourceContext()); + } + + $node = new Twig_Node_Expression_MethodCall($node, 'get'.$name, $arguments, $lineno); + $node->setAttribute('safe', true); + + return $node; + } + } else { + $type = Twig_Template::ARRAY_CALL; + + // slice? + $slice = false; + if ($stream->test(Twig_Token::PUNCTUATION_TYPE, ':')) { + $slice = true; + $arg = new Twig_Node_Expression_Constant(0, $token->getLine()); + } else { + $arg = $this->parseExpression(); + } + + if ($stream->nextIf(Twig_Token::PUNCTUATION_TYPE, ':')) { + $slice = true; + } + + if ($slice) { + if ($stream->test(Twig_Token::PUNCTUATION_TYPE, ']')) { + $length = new Twig_Node_Expression_Constant(null, $token->getLine()); + } else { + $length = $this->parseExpression(); + } + + $class = $this->getFilterNodeClass('slice', $token->getLine()); + $arguments = new Twig_Node(array($arg, $length)); + $filter = new $class($node, new Twig_Node_Expression_Constant('slice', $token->getLine()), $arguments, $token->getLine()); + + $stream->expect(Twig_Token::PUNCTUATION_TYPE, ']'); + + return $filter; + } + + $stream->expect(Twig_Token::PUNCTUATION_TYPE, ']'); + } + + return new Twig_Node_Expression_GetAttr($node, $arg, $arguments, $type, $lineno); + } + + public function parseFilterExpression($node) + { + $this->parser->getStream()->next(); + + return $this->parseFilterExpressionRaw($node); + } + + public function parseFilterExpressionRaw($node, $tag = null) + { + while (true) { + $token = $this->parser->getStream()->expect(Twig_Token::NAME_TYPE); + + $name = new Twig_Node_Expression_Constant($token->getValue(), $token->getLine()); + if (!$this->parser->getStream()->test(Twig_Token::PUNCTUATION_TYPE, '(')) { + $arguments = new Twig_Node(); + } else { + $arguments = $this->parseArguments(true); + } + + $class = $this->getFilterNodeClass($name->getAttribute('value'), $token->getLine()); + + $node = new $class($node, $name, $arguments, $token->getLine(), $tag); + + if (!$this->parser->getStream()->test(Twig_Token::PUNCTUATION_TYPE, '|')) { + break; + } + + $this->parser->getStream()->next(); + } + + return $node; + } + + /** + * Parses arguments. + * + * @param bool $namedArguments Whether to allow named arguments or not + * @param bool $definition Whether we are parsing arguments for a function definition + * + * @return Twig_Node + * + * @throws Twig_Error_Syntax + */ + public function parseArguments($namedArguments = false, $definition = false) + { + $args = array(); + $stream = $this->parser->getStream(); + + $stream->expect(Twig_Token::PUNCTUATION_TYPE, '(', 'A list of arguments must begin with an opening parenthesis'); + while (!$stream->test(Twig_Token::PUNCTUATION_TYPE, ')')) { + if (!empty($args)) { + $stream->expect(Twig_Token::PUNCTUATION_TYPE, ',', 'Arguments must be separated by a comma'); + } + + if ($definition) { + $token = $stream->expect(Twig_Token::NAME_TYPE, null, 'An argument must be a name'); + $value = new Twig_Node_Expression_Name($token->getValue(), $this->parser->getCurrentToken()->getLine()); + } else { + $value = $this->parseExpression(); + } + + $name = null; + if ($namedArguments && $token = $stream->nextIf(Twig_Token::OPERATOR_TYPE, '=')) { + if (!$value instanceof Twig_Node_Expression_Name) { + throw new Twig_Error_Syntax(sprintf('A parameter name must be a string, "%s" given.', get_class($value)), $token->getLine(), $stream->getSourceContext()); + } + $name = $value->getAttribute('name'); + + if ($definition) { + $value = $this->parsePrimaryExpression(); + + if (!$this->checkConstantExpression($value)) { + throw new Twig_Error_Syntax(sprintf('A default value for an argument must be a constant (a boolean, a string, a number, or an array).'), $token->getLine(), $stream->getSourceContext()); + } + } else { + $value = $this->parseExpression(); + } + } + + if ($definition) { + if (null === $name) { + $name = $value->getAttribute('name'); + $value = new Twig_Node_Expression_Constant(null, $this->parser->getCurrentToken()->getLine()); + } + $args[$name] = $value; + } else { + if (null === $name) { + $args[] = $value; + } else { + $args[$name] = $value; + } + } + } + $stream->expect(Twig_Token::PUNCTUATION_TYPE, ')', 'A list of arguments must be closed by a parenthesis'); + + return new Twig_Node($args); + } + + public function parseAssignmentExpression() + { + $stream = $this->parser->getStream(); + $targets = array(); + while (true) { + $token = $stream->expect(Twig_Token::NAME_TYPE, null, 'Only variables can be assigned to'); + $value = $token->getValue(); + if (in_array(strtolower($value), array('true', 'false', 'none', 'null'))) { + throw new Twig_Error_Syntax(sprintf('You cannot assign a value to "%s".', $value), $token->getLine(), $stream->getSourceContext()); + } + $targets[] = new Twig_Node_Expression_AssignName($value, $token->getLine()); + + if (!$stream->nextIf(Twig_Token::PUNCTUATION_TYPE, ',')) { + break; + } + } + + return new Twig_Node($targets); + } + + public function parseMultitargetExpression() + { + $targets = array(); + while (true) { + $targets[] = $this->parseExpression(); + if (!$this->parser->getStream()->nextIf(Twig_Token::PUNCTUATION_TYPE, ',')) { + break; + } + } + + return new Twig_Node($targets); + } + + private function parseNotTestExpression(Twig_NodeInterface $node) + { + return new Twig_Node_Expression_Unary_Not($this->parseTestExpression($node), $this->parser->getCurrentToken()->getLine()); + } + + private function parseTestExpression(Twig_NodeInterface $node) + { + $stream = $this->parser->getStream(); + list($name, $test) = $this->getTest($node->getTemplateLine()); + + $class = $this->getTestNodeClass($test); + $arguments = null; + if ($stream->test(Twig_Token::PUNCTUATION_TYPE, '(')) { + $arguments = $this->parser->getExpressionParser()->parseArguments(true); + } + + return new $class($node, $name, $arguments, $this->parser->getCurrentToken()->getLine()); + } + + private function getTest($line) + { + $stream = $this->parser->getStream(); + $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue(); + + if ($test = $this->env->getTest($name)) { + return array($name, $test); + } + + if ($stream->test(Twig_Token::NAME_TYPE)) { + // try 2-words tests + $name = $name.' '.$this->parser->getCurrentToken()->getValue(); + + if ($test = $this->env->getTest($name)) { + $stream->next(); + + return array($name, $test); + } + } + + $e = new Twig_Error_Syntax(sprintf('Unknown "%s" test.', $name), $line, $stream->getSourceContext()); + $e->addSuggestions($name, array_keys($this->env->getTests())); + + throw $e; + } + + private function getTestNodeClass($test) + { + if ($test instanceof Twig_SimpleTest && $test->isDeprecated()) { + $stream = $this->parser->getStream(); + $message = sprintf('Twig Test "%s" is deprecated', $test->getName()); + if (!is_bool($test->getDeprecatedVersion())) { + $message .= sprintf(' since version %s', $test->getDeprecatedVersion()); + } + if ($test->getAlternative()) { + $message .= sprintf('. Use "%s" instead', $test->getAlternative()); + } + $src = $stream->getSourceContext(); + $message .= sprintf(' in %s at line %d.', $src->getPath() ? $src->getPath() : $src->getName(), $stream->getCurrent()->getLine()); + + @trigger_error($message, E_USER_DEPRECATED); + } + + if ($test instanceof Twig_SimpleTest) { + return $test->getNodeClass(); + } + + return $test instanceof Twig_Test_Node ? $test->getClass() : 'Twig_Node_Expression_Test'; + } + + protected function getFunctionNodeClass($name, $line) + { + if (false === $function = $this->env->getFunction($name)) { + $e = new Twig_Error_Syntax(sprintf('Unknown "%s" function.', $name), $line, $this->parser->getStream()->getSourceContext()); + $e->addSuggestions($name, array_keys($this->env->getFunctions())); + + throw $e; + } + + if ($function instanceof Twig_SimpleFunction && $function->isDeprecated()) { + $message = sprintf('Twig Function "%s" is deprecated', $function->getName()); + if (!is_bool($function->getDeprecatedVersion())) { + $message .= sprintf(' since version %s', $function->getDeprecatedVersion()); + } + if ($function->getAlternative()) { + $message .= sprintf('. Use "%s" instead', $function->getAlternative()); + } + $src = $this->parser->getStream()->getSourceContext(); + $message .= sprintf(' in %s at line %d.', $src->getPath() ? $src->getPath() : $src->getName(), $line); + + @trigger_error($message, E_USER_DEPRECATED); + } + + if ($function instanceof Twig_SimpleFunction) { + return $function->getNodeClass(); + } + + return $function instanceof Twig_Function_Node ? $function->getClass() : 'Twig_Node_Expression_Function'; + } + + protected function getFilterNodeClass($name, $line) + { + if (false === $filter = $this->env->getFilter($name)) { + $e = new Twig_Error_Syntax(sprintf('Unknown "%s" filter.', $name), $line, $this->parser->getStream()->getSourceContext()); + $e->addSuggestions($name, array_keys($this->env->getFilters())); + + throw $e; + } + + if ($filter instanceof Twig_SimpleFilter && $filter->isDeprecated()) { + $message = sprintf('Twig Filter "%s" is deprecated', $filter->getName()); + if (!is_bool($filter->getDeprecatedVersion())) { + $message .= sprintf(' since version %s', $filter->getDeprecatedVersion()); + } + if ($filter->getAlternative()) { + $message .= sprintf('. Use "%s" instead', $filter->getAlternative()); + } + $src = $this->parser->getStream()->getSourceContext(); + $message .= sprintf(' in %s at line %d.', $src->getPath() ? $src->getPath() : $src->getName(), $line); + + @trigger_error($message, E_USER_DEPRECATED); + } + + if ($filter instanceof Twig_SimpleFilter) { + return $filter->getNodeClass(); + } + + return $filter instanceof Twig_Filter_Node ? $filter->getClass() : 'Twig_Node_Expression_Filter'; + } + + // checks that the node only contains "constant" elements + protected function checkConstantExpression(Twig_NodeInterface $node) + { + if (!($node instanceof Twig_Node_Expression_Constant || $node instanceof Twig_Node_Expression_Array + || $node instanceof Twig_Node_Expression_Unary_Neg || $node instanceof Twig_Node_Expression_Unary_Pos + )) { + return false; + } + + foreach ($node as $n) { + if (!$this->checkConstantExpression($n)) { + return false; + } + } + + return true; + } +} diff --git a/vendor/twig/twig/lib/Twig/Extension.php b/vendor/twig/twig/lib/Twig/Extension.php new file mode 100644 index 0000000000000000000000000000000000000000..5d72634a68fe7d091e36d350a9d93f9eb1cdec42 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Extension.php @@ -0,0 +1,65 @@ +escapers[$strategy] = $callable; + } + + /** + * Gets all defined escapers. + * + * @return array An array of escapers + */ + public function getEscapers() + { + return $this->escapers; + } + + /** + * Sets the default format to be used by the date filter. + * + * @param string $format The default date format string + * @param string $dateIntervalFormat The default date interval format string + */ + public function setDateFormat($format = null, $dateIntervalFormat = null) + { + if (null !== $format) { + $this->dateFormats[0] = $format; + } + + if (null !== $dateIntervalFormat) { + $this->dateFormats[1] = $dateIntervalFormat; + } + } + + /** + * Gets the default format to be used by the date filter. + * + * @return array The default date format string and the default date interval format string + */ + public function getDateFormat() + { + return $this->dateFormats; + } + + /** + * Sets the default timezone to be used by the date filter. + * + * @param DateTimeZone|string $timezone The default timezone string or a DateTimeZone object + */ + public function setTimezone($timezone) + { + $this->timezone = $timezone instanceof DateTimeZone ? $timezone : new DateTimeZone($timezone); + } + + /** + * Gets the default timezone to be used by the date filter. + * + * @return DateTimeZone The default timezone currently in use + */ + public function getTimezone() + { + if (null === $this->timezone) { + $this->timezone = new DateTimeZone(date_default_timezone_get()); + } + + return $this->timezone; + } + + /** + * Sets the default format to be used by the number_format filter. + * + * @param int $decimal the number of decimal places to use + * @param string $decimalPoint the character(s) to use for the decimal point + * @param string $thousandSep the character(s) to use for the thousands separator + */ + public function setNumberFormat($decimal, $decimalPoint, $thousandSep) + { + $this->numberFormat = array($decimal, $decimalPoint, $thousandSep); + } + + /** + * Get the default format used by the number_format filter. + * + * @return array The arguments for number_format() + */ + public function getNumberFormat() + { + return $this->numberFormat; + } + + public function getTokenParsers() + { + return array( + new Twig_TokenParser_For(), + new Twig_TokenParser_If(), + new Twig_TokenParser_Extends(), + new Twig_TokenParser_Include(), + new Twig_TokenParser_Block(), + new Twig_TokenParser_Use(), + new Twig_TokenParser_Filter(), + new Twig_TokenParser_Macro(), + new Twig_TokenParser_Import(), + new Twig_TokenParser_From(), + new Twig_TokenParser_Set(), + new Twig_TokenParser_Spaceless(), + new Twig_TokenParser_Flush(), + new Twig_TokenParser_Do(), + new Twig_TokenParser_Embed(), + new Twig_TokenParser_With(), + ); + } + + public function getFilters() + { + $filters = array( + // formatting filters + new Twig_SimpleFilter('date', 'twig_date_format_filter', array('needs_environment' => true)), + new Twig_SimpleFilter('date_modify', 'twig_date_modify_filter', array('needs_environment' => true)), + new Twig_SimpleFilter('format', 'sprintf'), + new Twig_SimpleFilter('replace', 'twig_replace_filter'), + new Twig_SimpleFilter('number_format', 'twig_number_format_filter', array('needs_environment' => true)), + new Twig_SimpleFilter('abs', 'abs'), + new Twig_SimpleFilter('round', 'twig_round'), + + // encoding + new Twig_SimpleFilter('url_encode', 'twig_urlencode_filter'), + new Twig_SimpleFilter('json_encode', 'twig_jsonencode_filter'), + new Twig_SimpleFilter('convert_encoding', 'twig_convert_encoding'), + + // string filters + new Twig_SimpleFilter('title', 'twig_title_string_filter', array('needs_environment' => true)), + new Twig_SimpleFilter('capitalize', 'twig_capitalize_string_filter', array('needs_environment' => true)), + new Twig_SimpleFilter('upper', 'strtoupper'), + new Twig_SimpleFilter('lower', 'strtolower'), + new Twig_SimpleFilter('striptags', 'strip_tags'), + new Twig_SimpleFilter('trim', 'twig_trim_filter'), + new Twig_SimpleFilter('nl2br', 'nl2br', array('pre_escape' => 'html', 'is_safe' => array('html'))), + + // array helpers + new Twig_SimpleFilter('join', 'twig_join_filter'), + new Twig_SimpleFilter('split', 'twig_split_filter', array('needs_environment' => true)), + new Twig_SimpleFilter('sort', 'twig_sort_filter'), + new Twig_SimpleFilter('merge', 'twig_array_merge'), + new Twig_SimpleFilter('batch', 'twig_array_batch'), + + // string/array filters + new Twig_SimpleFilter('reverse', 'twig_reverse_filter', array('needs_environment' => true)), + new Twig_SimpleFilter('length', 'twig_length_filter', array('needs_environment' => true)), + new Twig_SimpleFilter('slice', 'twig_slice', array('needs_environment' => true)), + new Twig_SimpleFilter('first', 'twig_first', array('needs_environment' => true)), + new Twig_SimpleFilter('last', 'twig_last', array('needs_environment' => true)), + + // iteration and runtime + new Twig_SimpleFilter('default', '_twig_default_filter', array('node_class' => 'Twig_Node_Expression_Filter_Default')), + new Twig_SimpleFilter('keys', 'twig_get_array_keys_filter'), + + // escaping + new Twig_SimpleFilter('escape', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')), + new Twig_SimpleFilter('e', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')), + ); + + if (function_exists('mb_get_info')) { + $filters[] = new Twig_SimpleFilter('upper', 'twig_upper_filter', array('needs_environment' => true)); + $filters[] = new Twig_SimpleFilter('lower', 'twig_lower_filter', array('needs_environment' => true)); + } + + return $filters; + } + + public function getFunctions() + { + return array( + new Twig_SimpleFunction('max', 'max'), + new Twig_SimpleFunction('min', 'min'), + new Twig_SimpleFunction('range', 'range'), + new Twig_SimpleFunction('constant', 'twig_constant'), + new Twig_SimpleFunction('cycle', 'twig_cycle'), + new Twig_SimpleFunction('random', 'twig_random', array('needs_environment' => true)), + new Twig_SimpleFunction('date', 'twig_date_converter', array('needs_environment' => true)), + new Twig_SimpleFunction('include', 'twig_include', array('needs_environment' => true, 'needs_context' => true, 'is_safe' => array('all'))), + new Twig_SimpleFunction('source', 'twig_source', array('needs_environment' => true, 'is_safe' => array('all'))), + ); + } + + public function getTests() + { + return array( + new Twig_SimpleTest('even', null, array('node_class' => 'Twig_Node_Expression_Test_Even')), + new Twig_SimpleTest('odd', null, array('node_class' => 'Twig_Node_Expression_Test_Odd')), + new Twig_SimpleTest('defined', null, array('node_class' => 'Twig_Node_Expression_Test_Defined')), + new Twig_SimpleTest('sameas', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas', 'deprecated' => '1.21', 'alternative' => 'same as')), + new Twig_SimpleTest('same as', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas')), + new Twig_SimpleTest('none', null, array('node_class' => 'Twig_Node_Expression_Test_Null')), + new Twig_SimpleTest('null', null, array('node_class' => 'Twig_Node_Expression_Test_Null')), + new Twig_SimpleTest('divisibleby', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby', 'deprecated' => '1.21', 'alternative' => 'divisible by')), + new Twig_SimpleTest('divisible by', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby')), + new Twig_SimpleTest('constant', null, array('node_class' => 'Twig_Node_Expression_Test_Constant')), + new Twig_SimpleTest('empty', 'twig_test_empty'), + new Twig_SimpleTest('iterable', 'twig_test_iterable'), + ); + } + + public function getOperators() + { + return array( + array( + 'not' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'), + '-' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Neg'), + '+' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Pos'), + ), + array( + 'or' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + 'and' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + 'b-or' => array('precedence' => 16, 'class' => 'Twig_Node_Expression_Binary_BitwiseOr', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + 'b-xor' => array('precedence' => 17, 'class' => 'Twig_Node_Expression_Binary_BitwiseXor', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + 'b-and' => array('precedence' => 18, 'class' => 'Twig_Node_Expression_Binary_BitwiseAnd', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '==' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '!=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '<' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '>' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '>=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '<=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + 'not in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotIn', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + 'in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_In', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + 'matches' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Matches', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + 'starts with' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_StartsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + 'ends with' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_EndsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '..' => array('precedence' => 25, 'class' => 'Twig_Node_Expression_Binary_Range', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '+' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Add', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '-' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Sub', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '~' => array('precedence' => 40, 'class' => 'Twig_Node_Expression_Binary_Concat', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '*' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mul', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '/' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Div', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '//' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_FloorDiv', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '%' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + 'is' => array('precedence' => 100, 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + 'is not' => array('precedence' => 100, 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), + '**' => array('precedence' => 200, 'class' => 'Twig_Node_Expression_Binary_Power', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT), + '??' => array('precedence' => 300, 'class' => 'Twig_Node_Expression_NullCoalesce', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT), + ), + ); + } + + public function getName() + { + return 'core'; + } +} + +/** + * Cycles over a value. + * + * @param ArrayAccess|array $values + * @param int $position The cycle position + * + * @return string The next value in the cycle + */ +function twig_cycle($values, $position) +{ + if (!is_array($values) && !$values instanceof ArrayAccess) { + return $values; + } + + return $values[$position % count($values)]; +} + +/** + * Returns a random value depending on the supplied parameter type: + * - a random item from a Traversable or array + * - a random character from a string + * - a random integer between 0 and the integer parameter. + * + * @param Twig_Environment $env + * @param Traversable|array|int|float|string $values The values to pick a random item from + * + * @throws Twig_Error_Runtime when $values is an empty array (does not apply to an empty string which is returned as is) + * + * @return mixed A random value from the given sequence + */ +function twig_random(Twig_Environment $env, $values = null) +{ + if (null === $values) { + return mt_rand(); + } + + if (is_int($values) || is_float($values)) { + return $values < 0 ? mt_rand($values, 0) : mt_rand(0, $values); + } + + if ($values instanceof Traversable) { + $values = iterator_to_array($values); + } elseif (is_string($values)) { + if ('' === $values) { + return ''; + } + if (null !== $charset = $env->getCharset()) { + if ('UTF-8' !== $charset) { + $values = twig_convert_encoding($values, 'UTF-8', $charset); + } + + // unicode version of str_split() + // split at all positions, but not after the start and not before the end + $values = preg_split('/(? $value) { + $values[$i] = twig_convert_encoding($value, $charset, 'UTF-8'); + } + } + } else { + return $values[mt_rand(0, strlen($values) - 1)]; + } + } + + if (!is_array($values)) { + return $values; + } + + if (0 === count($values)) { + throw new Twig_Error_Runtime('The random function cannot pick from an empty array.'); + } + + return $values[array_rand($values, 1)]; +} + +/** + * Converts a date to the given format. + * + *
    + *   {{ post.published_at|date("m/d/Y") }}
    + * 
    + * + * @param Twig_Environment $env + * @param DateTime|DateTimeInterface|DateInterval|string $date A date + * @param string|null $format The target format, null to use the default + * @param DateTimeZone|string|null|false $timezone The target timezone, null to use the default, false to leave unchanged + * + * @return string The formatted date + */ +function twig_date_format_filter(Twig_Environment $env, $date, $format = null, $timezone = null) +{ + if (null === $format) { + $formats = $env->getExtension('Twig_Extension_Core')->getDateFormat(); + $format = $date instanceof DateInterval ? $formats[1] : $formats[0]; + } + + if ($date instanceof DateInterval) { + return $date->format($format); + } + + return twig_date_converter($env, $date, $timezone)->format($format); +} + +/** + * Returns a new date object modified. + * + *
    + *   {{ post.published_at|date_modify("-1day")|date("m/d/Y") }}
    + * 
    + * + * @param Twig_Environment $env + * @param DateTime|string $date A date + * @param string $modifier A modifier string + * + * @return DateTime A new date object + */ +function twig_date_modify_filter(Twig_Environment $env, $date, $modifier) +{ + $date = twig_date_converter($env, $date, false); + $resultDate = $date->modify($modifier); + + // This is a hack to ensure PHP 5.2 support and support for DateTimeImmutable + // DateTime::modify does not return the modified DateTime object < 5.3.0 + // and DateTimeImmutable does not modify $date. + return null === $resultDate ? $date : $resultDate; +} + +/** + * Converts an input to a DateTime instance. + * + *
    + *    {% if date(user.created_at) < date('+2days') %}
    + *      {# do something #}
    + *    {% endif %}
    + * 
    + * + * @param Twig_Environment $env + * @param DateTime|DateTimeInterface|string|null $date A date + * @param DateTimeZone|string|null|false $timezone The target timezone, null to use the default, false to leave unchanged + * + * @return DateTime A DateTime instance + */ +function twig_date_converter(Twig_Environment $env, $date = null, $timezone = null) +{ + // determine the timezone + if (false !== $timezone) { + if (null === $timezone) { + $timezone = $env->getExtension('Twig_Extension_Core')->getTimezone(); + } elseif (!$timezone instanceof DateTimeZone) { + $timezone = new DateTimeZone($timezone); + } + } + + // immutable dates + if ($date instanceof DateTimeImmutable) { + return false !== $timezone ? $date->setTimezone($timezone) : $date; + } + + if ($date instanceof DateTime || $date instanceof DateTimeInterface) { + $date = clone $date; + if (false !== $timezone) { + $date->setTimezone($timezone); + } + + return $date; + } + + if (null === $date || 'now' === $date) { + return new DateTime($date, false !== $timezone ? $timezone : $env->getExtension('Twig_Extension_Core')->getTimezone()); + } + + $asString = (string) $date; + if (ctype_digit($asString) || (!empty($asString) && '-' === $asString[0] && ctype_digit(substr($asString, 1)))) { + $date = new DateTime('@'.$date); + } else { + $date = new DateTime($date, $env->getExtension('Twig_Extension_Core')->getTimezone()); + } + + if (false !== $timezone) { + $date->setTimezone($timezone); + } + + return $date; +} + +/** + * Replaces strings within a string. + * + * @param string $str String to replace in + * @param array|Traversable $from Replace values + * @param string|null $to Replace to, deprecated (@see http://php.net/manual/en/function.strtr.php) + * + * @return string + */ +function twig_replace_filter($str, $from, $to = null) +{ + if ($from instanceof Traversable) { + $from = iterator_to_array($from); + } elseif (is_string($from) && is_string($to)) { + @trigger_error('Using "replace" with character by character replacement is deprecated since version 1.22 and will be removed in Twig 2.0', E_USER_DEPRECATED); + + return strtr($str, $from, $to); + } elseif (!is_array($from)) { + throw new Twig_Error_Runtime(sprintf('The "replace" filter expects an array or "Traversable" as replace values, got "%s".', is_object($from) ? get_class($from) : gettype($from))); + } + + return strtr($str, $from); +} + +/** + * Rounds a number. + * + * @param int|float $value The value to round + * @param int|float $precision The rounding precision + * @param string $method The method to use for rounding + * + * @return int|float The rounded number + */ +function twig_round($value, $precision = 0, $method = 'common') +{ + if ('common' == $method) { + return round($value, $precision); + } + + if ('ceil' != $method && 'floor' != $method) { + throw new Twig_Error_Runtime('The round filter only supports the "common", "ceil", and "floor" methods.'); + } + + return $method($value * pow(10, $precision)) / pow(10, $precision); +} + +/** + * Number format filter. + * + * All of the formatting options can be left null, in that case the defaults will + * be used. Supplying any of the parameters will override the defaults set in the + * environment object. + * + * @param Twig_Environment $env + * @param mixed $number A float/int/string of the number to format + * @param int $decimal the number of decimal points to display + * @param string $decimalPoint the character(s) to use for the decimal point + * @param string $thousandSep the character(s) to use for the thousands separator + * + * @return string The formatted number + */ +function twig_number_format_filter(Twig_Environment $env, $number, $decimal = null, $decimalPoint = null, $thousandSep = null) +{ + $defaults = $env->getExtension('Twig_Extension_Core')->getNumberFormat(); + if (null === $decimal) { + $decimal = $defaults[0]; + } + + if (null === $decimalPoint) { + $decimalPoint = $defaults[1]; + } + + if (null === $thousandSep) { + $thousandSep = $defaults[2]; + } + + return number_format((float) $number, $decimal, $decimalPoint, $thousandSep); +} + +/** + * URL encodes (RFC 3986) a string as a path segment or an array as a query string. + * + * @param string|array $url A URL or an array of query parameters + * + * @return string The URL encoded value + */ +function twig_urlencode_filter($url) +{ + if (is_array($url)) { + if (defined('PHP_QUERY_RFC3986')) { + return http_build_query($url, '', '&', PHP_QUERY_RFC3986); + } + + return http_build_query($url, '', '&'); + } + + return rawurlencode($url); +} + +if (PHP_VERSION_ID < 50300) { + /** + * JSON encodes a variable. + * + * @param mixed $value the value to encode + * @param int $options Not used on PHP 5.2.x + * + * @return mixed The JSON encoded value + */ + function twig_jsonencode_filter($value, $options = 0) + { + if ($value instanceof Twig_Markup) { + $value = (string) $value; + } elseif (is_array($value)) { + array_walk_recursive($value, '_twig_markup2string'); + } + + return json_encode($value); + } +} else { + /** + * JSON encodes a variable. + * + * @param mixed $value the value to encode + * @param int $options Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT + * + * @return mixed The JSON encoded value + */ + function twig_jsonencode_filter($value, $options = 0) + { + if ($value instanceof Twig_Markup) { + $value = (string) $value; + } elseif (is_array($value)) { + array_walk_recursive($value, '_twig_markup2string'); + } + + return json_encode($value, $options); + } +} + +function _twig_markup2string(&$value) +{ + if ($value instanceof Twig_Markup) { + $value = (string) $value; + } +} + +/** + * Merges an array with another one. + * + *
    + *  {% set items = { 'apple': 'fruit', 'orange': 'fruit' } %}
    + *
    + *  {% set items = items|merge({ 'peugeot': 'car' }) %}
    + *
    + *  {# items now contains { 'apple': 'fruit', 'orange': 'fruit', 'peugeot': 'car' } #}
    + * 
    + * + * @param array|Traversable $arr1 An array + * @param array|Traversable $arr2 An array + * + * @return array The merged array + */ +function twig_array_merge($arr1, $arr2) +{ + if ($arr1 instanceof Traversable) { + $arr1 = iterator_to_array($arr1); + } elseif (!is_array($arr1)) { + throw new Twig_Error_Runtime(sprintf('The merge filter only works with arrays or "Traversable", got "%s" as first argument.', gettype($arr1))); + } + + if ($arr2 instanceof Traversable) { + $arr2 = iterator_to_array($arr2); + } elseif (!is_array($arr2)) { + throw new Twig_Error_Runtime(sprintf('The merge filter only works with arrays or "Traversable", got "%s" as second argument.', gettype($arr2))); + } + + return array_merge($arr1, $arr2); +} + +/** + * Slices a variable. + * + * @param Twig_Environment $env + * @param mixed $item A variable + * @param int $start Start of the slice + * @param int $length Size of the slice + * @param bool $preserveKeys Whether to preserve key or not (when the input is an array) + * + * @return mixed The sliced variable + */ +function twig_slice(Twig_Environment $env, $item, $start, $length = null, $preserveKeys = false) +{ + if ($item instanceof Traversable) { + while ($item instanceof IteratorAggregate) { + $item = $item->getIterator(); + } + + if ($start >= 0 && $length >= 0 && $item instanceof Iterator) { + try { + return iterator_to_array(new LimitIterator($item, $start, $length === null ? -1 : $length), $preserveKeys); + } catch (OutOfBoundsException $exception) { + return array(); + } + } + + $item = iterator_to_array($item, $preserveKeys); + } + + if (is_array($item)) { + return array_slice($item, $start, $length, $preserveKeys); + } + + $item = (string) $item; + + if (function_exists('mb_get_info') && null !== $charset = $env->getCharset()) { + return (string) mb_substr($item, $start, null === $length ? mb_strlen($item, $charset) - $start : $length, $charset); + } + + return (string) (null === $length ? substr($item, $start) : substr($item, $start, $length)); +} + +/** + * Returns the first element of the item. + * + * @param Twig_Environment $env + * @param mixed $item A variable + * + * @return mixed The first element of the item + */ +function twig_first(Twig_Environment $env, $item) +{ + $elements = twig_slice($env, $item, 0, 1, false); + + return is_string($elements) ? $elements : current($elements); +} + +/** + * Returns the last element of the item. + * + * @param Twig_Environment $env + * @param mixed $item A variable + * + * @return mixed The last element of the item + */ +function twig_last(Twig_Environment $env, $item) +{ + $elements = twig_slice($env, $item, -1, 1, false); + + return is_string($elements) ? $elements : current($elements); +} + +/** + * Joins the values to a string. + * + * The separator between elements is an empty string per default, you can define it with the optional parameter. + * + *
    + *  {{ [1, 2, 3]|join('|') }}
    + *  {# returns 1|2|3 #}
    + *
    + *  {{ [1, 2, 3]|join }}
    + *  {# returns 123 #}
    + * 
    + * + * @param array $value An array + * @param string $glue The separator + * + * @return string The concatenated string + */ +function twig_join_filter($value, $glue = '') +{ + if ($value instanceof Traversable) { + $value = iterator_to_array($value, false); + } + + return implode($glue, (array) $value); +} + +/** + * Splits the string into an array. + * + *
    + *  {{ "one,two,three"|split(',') }}
    + *  {# returns [one, two, three] #}
    + *
    + *  {{ "one,two,three,four,five"|split(',', 3) }}
    + *  {# returns [one, two, "three,four,five"] #}
    + *
    + *  {{ "123"|split('') }}
    + *  {# returns [1, 2, 3] #}
    + *
    + *  {{ "aabbcc"|split('', 2) }}
    + *  {# returns [aa, bb, cc] #}
    + * 
    + * + * @param Twig_Environment $env + * @param string $value A string + * @param string $delimiter The delimiter + * @param int $limit The limit + * + * @return array The split string as an array + */ +function twig_split_filter(Twig_Environment $env, $value, $delimiter, $limit = null) +{ + if (!empty($delimiter)) { + return null === $limit ? explode($delimiter, $value) : explode($delimiter, $value, $limit); + } + + if (!function_exists('mb_get_info') || null === $charset = $env->getCharset()) { + return str_split($value, null === $limit ? 1 : $limit); + } + + if ($limit <= 1) { + return preg_split('/(? + * {% for key in array|keys %} + * {# ... #} + * {% endfor %} + * + * + * @param array $array An array + * + * @return array The keys + */ +function twig_get_array_keys_filter($array) +{ + if ($array instanceof Traversable) { + while ($array instanceof IteratorAggregate) { + $array = $array->getIterator(); + } + + if ($array instanceof Iterator) { + $keys = array(); + $array->rewind(); + while ($array->valid()) { + $keys[] = $array->key(); + $array->next(); + } + + return $keys; + } + + $keys = array(); + foreach ($array as $key => $item) { + $keys[] = $key; + } + + return $keys; + } + + if (!is_array($array)) { + return array(); + } + + return array_keys($array); +} + +/** + * Reverses a variable. + * + * @param Twig_Environment $env + * @param array|Traversable|string $item An array, a Traversable instance, or a string + * @param bool $preserveKeys Whether to preserve key or not + * + * @return mixed The reversed input + */ +function twig_reverse_filter(Twig_Environment $env, $item, $preserveKeys = false) +{ + if ($item instanceof Traversable) { + return array_reverse(iterator_to_array($item), $preserveKeys); + } + + if (is_array($item)) { + return array_reverse($item, $preserveKeys); + } + + if (null !== $charset = $env->getCharset()) { + $string = (string) $item; + + if ('UTF-8' !== $charset) { + $item = twig_convert_encoding($string, 'UTF-8', $charset); + } + + preg_match_all('/./us', $item, $matches); + + $string = implode('', array_reverse($matches[0])); + + if ('UTF-8' !== $charset) { + $string = twig_convert_encoding($string, $charset, 'UTF-8'); + } + + return $string; + } + + return strrev((string) $item); +} + +/** + * Sorts an array. + * + * @param array|Traversable $array + * + * @return array + */ +function twig_sort_filter($array) +{ + if ($array instanceof Traversable) { + $array = iterator_to_array($array); + } elseif (!is_array($array)) { + throw new Twig_Error_Runtime(sprintf('The sort filter only works with arrays or "Traversable", got "%s".', gettype($array))); + } + + asort($array); + + return $array; +} + +/** + * @internal + */ +function twig_in_filter($value, $compare) +{ + if (is_array($compare)) { + return in_array($value, $compare, is_object($value) || is_resource($value)); + } elseif (is_string($compare) && (is_string($value) || is_int($value) || is_float($value))) { + return '' === $value || false !== strpos($compare, (string) $value); + } elseif ($compare instanceof Traversable) { + if (is_object($value) || is_resource($value)) { + foreach ($compare as $item) { + if ($item === $value) { + return true; + } + } + } else { + foreach ($compare as $item) { + if ($item == $value) { + return true; + } + } + } + + return false; + } + + return false; +} + +/** + * Returns a trimmed string. + * + * @return string + * + * @throws Twig_Error_Runtime When an invalid trimming side is used (not a string or not 'left', 'right', or 'both') + */ +function twig_trim_filter($string, $characterMask = null, $side = 'both') +{ + if (null === $characterMask) { + $characterMask = " \t\n\r\0\x0B"; + } + + switch ($side) { + case 'both': + return trim($string, $characterMask); + case 'left': + return ltrim($string, $characterMask); + case 'right': + return rtrim($string, $characterMask); + default: + throw new Twig_Error_Runtime('Trimming side must be "left", "right" or "both".'); + } +} + +/** + * Escapes a string. + * + * @param Twig_Environment $env + * @param mixed $string The value to be escaped + * @param string $strategy The escaping strategy + * @param string $charset The charset + * @param bool $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false) + * + * @return string + */ +function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false) +{ + if ($autoescape && $string instanceof Twig_Markup) { + return $string; + } + + if (!is_string($string)) { + if (is_object($string) && method_exists($string, '__toString')) { + $string = (string) $string; + } elseif (in_array($strategy, array('html', 'js', 'css', 'html_attr', 'url'))) { + return $string; + } + } + + if (null === $charset) { + $charset = $env->getCharset(); + } + + switch ($strategy) { + case 'html': + // see http://php.net/htmlspecialchars + + // Using a static variable to avoid initializing the array + // each time the function is called. Moving the declaration on the + // top of the function slow downs other escaping strategies. + static $htmlspecialcharsCharsets; + + if (null === $htmlspecialcharsCharsets) { + if (defined('HHVM_VERSION')) { + $htmlspecialcharsCharsets = array('utf-8' => true, 'UTF-8' => true); + } else { + $htmlspecialcharsCharsets = array( + 'ISO-8859-1' => true, 'ISO8859-1' => true, + 'ISO-8859-15' => true, 'ISO8859-15' => true, + 'utf-8' => true, 'UTF-8' => true, + 'CP866' => true, 'IBM866' => true, '866' => true, + 'CP1251' => true, 'WINDOWS-1251' => true, 'WIN-1251' => true, + '1251' => true, + 'CP1252' => true, 'WINDOWS-1252' => true, '1252' => true, + 'KOI8-R' => true, 'KOI8-RU' => true, 'KOI8R' => true, + 'BIG5' => true, '950' => true, + 'GB2312' => true, '936' => true, + 'BIG5-HKSCS' => true, + 'SHIFT_JIS' => true, 'SJIS' => true, '932' => true, + 'EUC-JP' => true, 'EUCJP' => true, + 'ISO8859-5' => true, 'ISO-8859-5' => true, 'MACROMAN' => true, + ); + } + } + + if (isset($htmlspecialcharsCharsets[$charset])) { + return htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE, $charset); + } + + if (isset($htmlspecialcharsCharsets[strtoupper($charset)])) { + // cache the lowercase variant for future iterations + $htmlspecialcharsCharsets[$charset] = true; + + return htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE, $charset); + } + + $string = twig_convert_encoding($string, 'UTF-8', $charset); + $string = htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); + + return twig_convert_encoding($string, $charset, 'UTF-8'); + + case 'js': + // escape all non-alphanumeric characters + // into their \xHH or \uHHHH representations + if ('UTF-8' !== $charset) { + $string = twig_convert_encoding($string, 'UTF-8', $charset); + } + + if (0 == strlen($string) ? false : 1 !== preg_match('/^./su', $string)) { + throw new Twig_Error_Runtime('The string to escape is not a valid UTF-8 string.'); + } + + $string = preg_replace_callback('#[^a-zA-Z0-9,\._]#Su', '_twig_escape_js_callback', $string); + + if ('UTF-8' !== $charset) { + $string = twig_convert_encoding($string, $charset, 'UTF-8'); + } + + return $string; + + case 'css': + if ('UTF-8' !== $charset) { + $string = twig_convert_encoding($string, 'UTF-8', $charset); + } + + if (0 == strlen($string) ? false : 1 !== preg_match('/^./su', $string)) { + throw new Twig_Error_Runtime('The string to escape is not a valid UTF-8 string.'); + } + + $string = preg_replace_callback('#[^a-zA-Z0-9]#Su', '_twig_escape_css_callback', $string); + + if ('UTF-8' !== $charset) { + $string = twig_convert_encoding($string, $charset, 'UTF-8'); + } + + return $string; + + case 'html_attr': + if ('UTF-8' !== $charset) { + $string = twig_convert_encoding($string, 'UTF-8', $charset); + } + + if (0 == strlen($string) ? false : 1 !== preg_match('/^./su', $string)) { + throw new Twig_Error_Runtime('The string to escape is not a valid UTF-8 string.'); + } + + $string = preg_replace_callback('#[^a-zA-Z0-9,\.\-_]#Su', '_twig_escape_html_attr_callback', $string); + + if ('UTF-8' !== $charset) { + $string = twig_convert_encoding($string, $charset, 'UTF-8'); + } + + return $string; + + case 'url': + if (PHP_VERSION_ID < 50300) { + return str_replace('%7E', '~', rawurlencode($string)); + } + + return rawurlencode($string); + + default: + static $escapers; + + if (null === $escapers) { + $escapers = $env->getExtension('Twig_Extension_Core')->getEscapers(); + } + + if (isset($escapers[$strategy])) { + return call_user_func($escapers[$strategy], $env, $string, $charset); + } + + $validStrategies = implode(', ', array_merge(array('html', 'js', 'url', 'css', 'html_attr'), array_keys($escapers))); + + throw new Twig_Error_Runtime(sprintf('Invalid escaping strategy "%s" (valid ones: %s).', $strategy, $validStrategies)); + } +} + +/** + * @internal + */ +function twig_escape_filter_is_safe(Twig_Node $filterArgs) +{ + foreach ($filterArgs as $arg) { + if ($arg instanceof Twig_Node_Expression_Constant) { + return array($arg->getAttribute('value')); + } + + return array(); + } + + return array('html'); +} + +if (function_exists('mb_convert_encoding')) { + function twig_convert_encoding($string, $to, $from) + { + return mb_convert_encoding($string, $to, $from); + } +} elseif (function_exists('iconv')) { + function twig_convert_encoding($string, $to, $from) + { + return iconv($from, $to, $string); + } +} else { + function twig_convert_encoding($string, $to, $from) + { + throw new Twig_Error_Runtime('No suitable convert encoding function (use UTF-8 as your encoding or install the iconv or mbstring extension).'); + } +} + +function _twig_escape_js_callback($matches) +{ + $char = $matches[0]; + + // \xHH + if (!isset($char[1])) { + return '\\x'.strtoupper(substr('00'.bin2hex($char), -2)); + } + + // \uHHHH + $char = twig_convert_encoding($char, 'UTF-16BE', 'UTF-8'); + + return '\\u'.strtoupper(substr('0000'.bin2hex($char), -4)); +} + +function _twig_escape_css_callback($matches) +{ + $char = $matches[0]; + + // \xHH + if (!isset($char[1])) { + $hex = ltrim(strtoupper(bin2hex($char)), '0'); + if (0 === strlen($hex)) { + $hex = '0'; + } + + return '\\'.$hex.' '; + } + + // \uHHHH + $char = twig_convert_encoding($char, 'UTF-16BE', 'UTF-8'); + + return '\\'.ltrim(strtoupper(bin2hex($char)), '0').' '; +} + +/** + * This function is adapted from code coming from Zend Framework. + * + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +function _twig_escape_html_attr_callback($matches) +{ + /* + * While HTML supports far more named entities, the lowest common denominator + * has become HTML5's XML Serialisation which is restricted to the those named + * entities that XML supports. Using HTML entities would result in this error: + * XML Parsing Error: undefined entity + */ + static $entityMap = array( + 34 => 'quot', /* quotation mark */ + 38 => 'amp', /* ampersand */ + 60 => 'lt', /* less-than sign */ + 62 => 'gt', /* greater-than sign */ + ); + + $chr = $matches[0]; + $ord = ord($chr); + + /* + * The following replaces characters undefined in HTML with the + * hex entity for the Unicode replacement character. + */ + if (($ord <= 0x1f && $chr != "\t" && $chr != "\n" && $chr != "\r") || ($ord >= 0x7f && $ord <= 0x9f)) { + return '�'; + } + + /* + * Check if the current character to escape has a name entity we should + * replace it with while grabbing the hex value of the character. + */ + if (strlen($chr) == 1) { + $hex = strtoupper(substr('00'.bin2hex($chr), -2)); + } else { + $chr = twig_convert_encoding($chr, 'UTF-16BE', 'UTF-8'); + $hex = strtoupper(substr('0000'.bin2hex($chr), -4)); + } + + $int = hexdec($hex); + if (array_key_exists($int, $entityMap)) { + return sprintf('&%s;', $entityMap[$int]); + } + + /* + * Per OWASP recommendations, we'll use hex entities for any other + * characters where a named entity does not exist. + */ + return sprintf('&#x%s;', $hex); +} + +// add multibyte extensions if possible +if (function_exists('mb_get_info')) { + /** + * Returns the length of a variable. + * + * @param Twig_Environment $env + * @param mixed $thing A variable + * + * @return int The length of the value + */ + function twig_length_filter(Twig_Environment $env, $thing) + { + return is_scalar($thing) ? mb_strlen($thing, $env->getCharset()) : count($thing); + } + + /** + * Converts a string to uppercase. + * + * @param Twig_Environment $env + * @param string $string A string + * + * @return string The uppercased string + */ + function twig_upper_filter(Twig_Environment $env, $string) + { + if (null !== $charset = $env->getCharset()) { + return mb_strtoupper($string, $charset); + } + + return strtoupper($string); + } + + /** + * Converts a string to lowercase. + * + * @param Twig_Environment $env + * @param string $string A string + * + * @return string The lowercased string + */ + function twig_lower_filter(Twig_Environment $env, $string) + { + if (null !== $charset = $env->getCharset()) { + return mb_strtolower($string, $charset); + } + + return strtolower($string); + } + + /** + * Returns a titlecased string. + * + * @param Twig_Environment $env + * @param string $string A string + * + * @return string The titlecased string + */ + function twig_title_string_filter(Twig_Environment $env, $string) + { + if (null !== $charset = $env->getCharset()) { + return mb_convert_case($string, MB_CASE_TITLE, $charset); + } + + return ucwords(strtolower($string)); + } + + /** + * Returns a capitalized string. + * + * @param Twig_Environment $env + * @param string $string A string + * + * @return string The capitalized string + */ + function twig_capitalize_string_filter(Twig_Environment $env, $string) + { + if (null !== $charset = $env->getCharset()) { + return mb_strtoupper(mb_substr($string, 0, 1, $charset), $charset).mb_strtolower(mb_substr($string, 1, mb_strlen($string, $charset), $charset), $charset); + } + + return ucfirst(strtolower($string)); + } +} +// and byte fallback +else { + /** + * Returns the length of a variable. + * + * @param Twig_Environment $env + * @param mixed $thing A variable + * + * @return int The length of the value + */ + function twig_length_filter(Twig_Environment $env, $thing) + { + return is_scalar($thing) ? strlen($thing) : count($thing); + } + + /** + * Returns a titlecased string. + * + * @param Twig_Environment $env + * @param string $string A string + * + * @return string The titlecased string + */ + function twig_title_string_filter(Twig_Environment $env, $string) + { + return ucwords(strtolower($string)); + } + + /** + * Returns a capitalized string. + * + * @param Twig_Environment $env + * @param string $string A string + * + * @return string The capitalized string + */ + function twig_capitalize_string_filter(Twig_Environment $env, $string) + { + return ucfirst(strtolower($string)); + } +} + +/** + * @internal + */ +function twig_ensure_traversable($seq) +{ + if ($seq instanceof Traversable || is_array($seq)) { + return $seq; + } + + return array(); +} + +/** + * Checks if a variable is empty. + * + *
    + * {# evaluates to true if the foo variable is null, false, or the empty string #}
    + * {% if foo is empty %}
    + *     {# ... #}
    + * {% endif %}
    + * 
    + * + * @param mixed $value A variable + * + * @return bool true if the value is empty, false otherwise + */ +function twig_test_empty($value) +{ + if ($value instanceof Countable) { + return 0 == count($value); + } + + return '' === $value || false === $value || null === $value || array() === $value; +} + +/** + * Checks if a variable is traversable. + * + *
    + * {# evaluates to true if the foo variable is an array or a traversable object #}
    + * {% if foo is traversable %}
    + *     {# ... #}
    + * {% endif %}
    + * 
    + * + * @param mixed $value A variable + * + * @return bool true if the value is traversable + */ +function twig_test_iterable($value) +{ + return $value instanceof Traversable || is_array($value); +} + +/** + * Renders a template. + * + * @param Twig_Environment $env + * @param array $context + * @param string|array $template The template to render or an array of templates to try consecutively + * @param array $variables The variables to pass to the template + * @param bool $withContext + * @param bool $ignoreMissing Whether to ignore missing templates or not + * @param bool $sandboxed Whether to sandbox the template or not + * + * @return string The rendered template + */ +function twig_include(Twig_Environment $env, $context, $template, $variables = array(), $withContext = true, $ignoreMissing = false, $sandboxed = false) +{ + $alreadySandboxed = false; + $sandbox = null; + if ($withContext) { + $variables = array_merge($context, $variables); + } + + if ($isSandboxed = $sandboxed && $env->hasExtension('Twig_Extension_Sandbox')) { + $sandbox = $env->getExtension('Twig_Extension_Sandbox'); + if (!$alreadySandboxed = $sandbox->isSandboxed()) { + $sandbox->enableSandbox(); + } + } + + $result = null; + try { + $result = $env->resolveTemplate($template)->render($variables); + } catch (Twig_Error_Loader $e) { + if (!$ignoreMissing) { + if ($isSandboxed && !$alreadySandboxed) { + $sandbox->disableSandbox(); + } + + throw $e; + } + } catch (Throwable $e) { + if ($isSandboxed && !$alreadySandboxed) { + $sandbox->disableSandbox(); + } + + throw $e; + } catch (Exception $e) { + if ($isSandboxed && !$alreadySandboxed) { + $sandbox->disableSandbox(); + } + + throw $e; + } + + if ($isSandboxed && !$alreadySandboxed) { + $sandbox->disableSandbox(); + } + + return $result; +} + +/** + * Returns a template content without rendering it. + * + * @param Twig_Environment $env + * @param string $name The template name + * @param bool $ignoreMissing Whether to ignore missing templates or not + * + * @return string The template source + */ +function twig_source(Twig_Environment $env, $name, $ignoreMissing = false) +{ + $loader = $env->getLoader(); + try { + if (!$loader instanceof Twig_SourceContextLoaderInterface) { + return $loader->getSource($name); + } else { + return $loader->getSourceContext($name)->getCode(); + } + } catch (Twig_Error_Loader $e) { + if (!$ignoreMissing) { + throw $e; + } + } +} + +/** + * Provides the ability to get constants from instances as well as class/global constants. + * + * @param string $constant The name of the constant + * @param null|object $object The object to get the constant from + * + * @return string + */ +function twig_constant($constant, $object = null) +{ + if (null !== $object) { + $constant = get_class($object).'::'.$constant; + } + + return constant($constant); +} + +/** + * Checks if a constant exists. + * + * @param string $constant The name of the constant + * @param null|object $object The object to get the constant from + * + * @return bool + */ +function twig_constant_is_defined($constant, $object = null) +{ + if (null !== $object) { + $constant = get_class($object).'::'.$constant; + } + + return defined($constant); +} + +/** + * Batches item. + * + * @param array $items An array of items + * @param int $size The size of the batch + * @param mixed $fill A value used to fill missing items + * + * @return array + */ +function twig_array_batch($items, $size, $fill = null) +{ + if ($items instanceof Traversable) { + $items = iterator_to_array($items, false); + } + + $size = ceil($size); + + $result = array_chunk($items, $size, true); + + if (null !== $fill && !empty($result)) { + $last = count($result) - 1; + if ($fillCount = $size - count($result[$last])) { + $result[$last] = array_merge( + $result[$last], + array_fill(0, $fillCount, $fill) + ); + } + } + + return $result; +} diff --git a/vendor/twig/twig/lib/Twig/Extension/Debug.php b/vendor/twig/twig/lib/Twig/Extension/Debug.php new file mode 100644 index 0000000000000000000000000000000000000000..d22a3855001da55203d33de86806adff4204a2bc --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Extension/Debug.php @@ -0,0 +1,65 @@ + $isDumpOutputHtmlSafe ? array('html') : array(), 'needs_context' => true, 'needs_environment' => true)), + ); + } + + public function getName() + { + return 'debug'; + } +} + +function twig_var_dump(Twig_Environment $env, $context) +{ + if (!$env->isDebug()) { + return; + } + + ob_start(); + + $count = func_num_args(); + if (2 === $count) { + $vars = array(); + foreach ($context as $key => $value) { + if (!$value instanceof Twig_Template) { + $vars[$key] = $value; + } + } + + var_dump($vars); + } else { + for ($i = 2; $i < $count; ++$i) { + var_dump(func_get_arg($i)); + } + } + + return ob_get_clean(); +} diff --git a/vendor/twig/twig/lib/Twig/Extension/Escaper.php b/vendor/twig/twig/lib/Twig/Extension/Escaper.php new file mode 100644 index 0000000000000000000000000000000000000000..118b6b367358bfdc36c4dbc57d6b1a88c61fd14c --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Extension/Escaper.php @@ -0,0 +1,110 @@ +setDefaultStrategy($defaultStrategy); + } + + public function getTokenParsers() + { + return array(new Twig_TokenParser_AutoEscape()); + } + + public function getNodeVisitors() + { + return array(new Twig_NodeVisitor_Escaper()); + } + + public function getFilters() + { + return array( + new Twig_SimpleFilter('raw', 'twig_raw_filter', array('is_safe' => array('all'))), + ); + } + + /** + * Sets the default strategy to use when not defined by the user. + * + * The strategy can be a valid PHP callback that takes the template + * name as an argument and returns the strategy to use. + * + * @param string|false|callable $defaultStrategy An escaping strategy + */ + public function setDefaultStrategy($defaultStrategy) + { + // for BC + if (true === $defaultStrategy) { + @trigger_error('Using "true" as the default strategy is deprecated since version 1.21. Use "html" instead.', E_USER_DEPRECATED); + + $defaultStrategy = 'html'; + } + + if ('filename' === $defaultStrategy) { + @trigger_error('Using "filename" as the default strategy is deprecated since version 1.27. Use "name" instead.', E_USER_DEPRECATED); + + $defaultStrategy = 'name'; + } + + if ('name' === $defaultStrategy) { + $defaultStrategy = array('Twig_FileExtensionEscapingStrategy', 'guess'); + } + + $this->defaultStrategy = $defaultStrategy; + } + + /** + * Gets the default strategy to use when not defined by the user. + * + * @param string $name The template name + * + * @return string|false The default strategy to use for the template + */ + public function getDefaultStrategy($name) + { + // disable string callables to avoid calling a function named html or js, + // or any other upcoming escaping strategy + if (!is_string($this->defaultStrategy) && false !== $this->defaultStrategy) { + return call_user_func($this->defaultStrategy, $name); + } + + return $this->defaultStrategy; + } + + public function getName() + { + return 'escaper'; + } +} + +/** + * Marks a variable as being safe. + * + * @param string $string A PHP variable + * + * @return string + */ +function twig_raw_filter($string) +{ + return $string; +} diff --git a/vendor/twig/twig/lib/Twig/Extension/GlobalsInterface.php b/vendor/twig/twig/lib/Twig/Extension/GlobalsInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5370b8e2aa77ff036879f49a01455fd1d4d1e537 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Extension/GlobalsInterface.php @@ -0,0 +1,22 @@ + + */ +interface Twig_Extension_GlobalsInterface +{ +} diff --git a/vendor/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php b/vendor/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..7a075822f216e86232e6e3034053edd674e2323d --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php @@ -0,0 +1,22 @@ + + */ +interface Twig_Extension_InitRuntimeInterface +{ +} diff --git a/vendor/twig/twig/lib/Twig/Extension/Optimizer.php b/vendor/twig/twig/lib/Twig/Extension/Optimizer.php new file mode 100644 index 0000000000000000000000000000000000000000..e100f0b544374b6979cc6a442f0b2fa43fd94874 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Extension/Optimizer.php @@ -0,0 +1,33 @@ +optimizers = $optimizers; + } + + public function getNodeVisitors() + { + return array(new Twig_NodeVisitor_Optimizer($this->optimizers)); + } + + public function getName() + { + return 'optimizer'; + } +} diff --git a/vendor/twig/twig/lib/Twig/Extension/Profiler.php b/vendor/twig/twig/lib/Twig/Extension/Profiler.php new file mode 100644 index 0000000000000000000000000000000000000000..1d874ef8e840ece78da3ea2e56c83f0b93a30cf3 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Extension/Profiler.php @@ -0,0 +1,46 @@ +actives[] = $profile; + } + + public function enter(Twig_Profiler_Profile $profile) + { + $this->actives[0]->addProfile($profile); + array_unshift($this->actives, $profile); + } + + public function leave(Twig_Profiler_Profile $profile) + { + $profile->leave(); + array_shift($this->actives); + + if (1 === count($this->actives)) { + $this->actives[0]->leave(); + } + } + + public function getNodeVisitors() + { + return array(new Twig_Profiler_NodeVisitor_Profiler(get_class($this))); + } + + public function getName() + { + return 'profiler'; + } +} diff --git a/vendor/twig/twig/lib/Twig/Extension/Sandbox.php b/vendor/twig/twig/lib/Twig/Extension/Sandbox.php new file mode 100644 index 0000000000000000000000000000000000000000..1469a1e042bd2c2be6e70c84d3c5b15da7c579e2 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Extension/Sandbox.php @@ -0,0 +1,101 @@ +policy = $policy; + $this->sandboxedGlobally = $sandboxed; + } + + public function getTokenParsers() + { + return array(new Twig_TokenParser_Sandbox()); + } + + public function getNodeVisitors() + { + return array(new Twig_NodeVisitor_Sandbox()); + } + + public function enableSandbox() + { + $this->sandboxed = true; + } + + public function disableSandbox() + { + $this->sandboxed = false; + } + + public function isSandboxed() + { + return $this->sandboxedGlobally || $this->sandboxed; + } + + public function isSandboxedGlobally() + { + return $this->sandboxedGlobally; + } + + public function setSecurityPolicy(Twig_Sandbox_SecurityPolicyInterface $policy) + { + $this->policy = $policy; + } + + public function getSecurityPolicy() + { + return $this->policy; + } + + public function checkSecurity($tags, $filters, $functions) + { + if ($this->isSandboxed()) { + $this->policy->checkSecurity($tags, $filters, $functions); + } + } + + public function checkMethodAllowed($obj, $method) + { + if ($this->isSandboxed()) { + $this->policy->checkMethodAllowed($obj, $method); + } + } + + public function checkPropertyAllowed($obj, $method) + { + if ($this->isSandboxed()) { + $this->policy->checkPropertyAllowed($obj, $method); + } + } + + public function ensureToStringAllowed($obj) + { + if ($this->isSandboxed() && is_object($obj)) { + $this->policy->checkMethodAllowed($obj, '__toString'); + } + + return $obj; + } + + public function getName() + { + return 'sandbox'; + } +} diff --git a/vendor/twig/twig/lib/Twig/Extension/Staging.php b/vendor/twig/twig/lib/Twig/Extension/Staging.php new file mode 100644 index 0000000000000000000000000000000000000000..34b71d27eae26b2415e36e5ced0be037c8af4a6f --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Extension/Staging.php @@ -0,0 +1,110 @@ + + * + * @internal + */ +class Twig_Extension_Staging extends Twig_Extension +{ + protected $functions = array(); + protected $filters = array(); + protected $visitors = array(); + protected $tokenParsers = array(); + protected $globals = array(); + protected $tests = array(); + + public function addFunction($name, $function) + { + if (isset($this->functions[$name])) { + @trigger_error(sprintf('Overriding function "%s" that is already registered is deprecated since version 1.30 and won\'t be possible anymore in 2.0.', $name), E_USER_DEPRECATED); + } + + $this->functions[$name] = $function; + } + + public function getFunctions() + { + return $this->functions; + } + + public function addFilter($name, $filter) + { + if (isset($this->filters[$name])) { + @trigger_error(sprintf('Overriding filter "%s" that is already registered is deprecated since version 1.30 and won\'t be possible anymore in 2.0.', $name), E_USER_DEPRECATED); + } + + $this->filters[$name] = $filter; + } + + public function getFilters() + { + return $this->filters; + } + + public function addNodeVisitor(Twig_NodeVisitorInterface $visitor) + { + $this->visitors[] = $visitor; + } + + public function getNodeVisitors() + { + return $this->visitors; + } + + public function addTokenParser(Twig_TokenParserInterface $parser) + { + if (isset($this->tokenParsers[$parser->getTag()])) { + @trigger_error(sprintf('Overriding tag "%s" that is already registered is deprecated since version 1.30 and won\'t be possible anymore in 2.0.', $parser->getTag()), E_USER_DEPRECATED); + } + + $this->tokenParsers[$parser->getTag()] = $parser; + } + + public function getTokenParsers() + { + return $this->tokenParsers; + } + + public function addGlobal($name, $value) + { + $this->globals[$name] = $value; + } + + public function getGlobals() + { + return $this->globals; + } + + public function addTest($name, $test) + { + if (isset($this->tests[$name])) { + @trigger_error(sprintf('Overriding test "%s" that is already registered is deprecated since version 1.30 and won\'t be possible anymore in 2.0.', $name), E_USER_DEPRECATED); + } + + $this->tests[$name] = $test; + } + + public function getTests() + { + return $this->tests; + } + + public function getName() + { + return 'staging'; + } +} diff --git a/vendor/twig/twig/lib/Twig/Extension/StringLoader.php b/vendor/twig/twig/lib/Twig/Extension/StringLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..c41517397d872c116f042d70378965cbfdfe3711 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Extension/StringLoader.php @@ -0,0 +1,45 @@ + true)), + ); + } + + public function getName() + { + return 'string_loader'; + } +} + +/** + * Loads a template from a string. + * + *
    + * {{ include(template_from_string("Hello {{ name }}")) }}
    + * 
    + * + * @param Twig_Environment $env A Twig_Environment instance + * @param string $template A template as a string or object implementing __toString() + * + * @return Twig_Template + */ +function twig_template_from_string(Twig_Environment $env, $template) +{ + return $env->createTemplate((string) $template); +} diff --git a/vendor/twig/twig/lib/Twig/ExtensionInterface.php b/vendor/twig/twig/lib/Twig/ExtensionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c5214bd5630befd362efc5faf36829dd35873d54 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/ExtensionInterface.php @@ -0,0 +1,87 @@ + + */ +interface Twig_ExtensionInterface +{ + /** + * Initializes the runtime environment. + * + * This is where you can load some file that contains filter functions for instance. + * + * @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_InitRuntimeInterface instead + */ + public function initRuntime(Twig_Environment $environment); + + /** + * Returns the token parser instances to add to the existing list. + * + * @return Twig_TokenParserInterface[] + */ + public function getTokenParsers(); + + /** + * Returns the node visitor instances to add to the existing list. + * + * @return Twig_NodeVisitorInterface[] + */ + public function getNodeVisitors(); + + /** + * Returns a list of filters to add to the existing list. + * + * @return Twig_SimpleFilter[] + */ + public function getFilters(); + + /** + * Returns a list of tests to add to the existing list. + * + * @return Twig_SimpleTest[] + */ + public function getTests(); + + /** + * Returns a list of functions to add to the existing list. + * + * @return Twig_SimpleFunction[] + */ + public function getFunctions(); + + /** + * Returns a list of operators to add to the existing list. + * + * @return array First array of unary operators, second array of binary operators + */ + public function getOperators(); + + /** + * Returns a list of global variables to add to the existing list. + * + * @return array An array of global variables + * + * @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_GlobalsInterface instead + */ + public function getGlobals(); + + /** + * Returns the name of the extension. + * + * @return string The extension name + * + * @deprecated since 1.26 (to be removed in 2.0), not used anymore internally + */ + public function getName(); +} diff --git a/vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php b/vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..f428047ca0f7562b55a47c825fed7f6ae545bf43 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php @@ -0,0 +1,37 @@ + + */ +class Twig_FactoryRuntimeLoader implements Twig_RuntimeLoaderInterface +{ + private $map; + + /** + * @param array $map An array where keys are class names and values factory callables + */ + public function __construct($map = array()) + { + $this->map = $map; + } + + public function load($class) + { + if (isset($this->map[$class])) { + $runtimeFactory = $this->map[$class]; + + return $runtimeFactory(); + } + } +} diff --git a/vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php b/vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..47183726b44b4a6fa0585ba9b17bfb645509d7e7 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php @@ -0,0 +1,58 @@ + + */ +class Twig_FileExtensionEscapingStrategy +{ + /** + * Guesses the best autoescaping strategy based on the file name. + * + * @param string $name The template name + * + * @return string|false The escaping strategy name to use or false to disable + */ + public static function guess($name) + { + if (in_array(substr($name, -1), array('/', '\\'))) { + return 'html'; // return html for directories + } + + if ('.twig' === substr($name, -5)) { + $name = substr($name, 0, -5); + } + + $extension = pathinfo($name, PATHINFO_EXTENSION); + + switch ($extension) { + case 'js': + return 'js'; + + case 'css': + return 'css'; + + case 'txt': + return false; + + default: + return 'html'; + } + } +} diff --git a/vendor/twig/twig/lib/Twig/Filter.php b/vendor/twig/twig/lib/Twig/Filter.php new file mode 100644 index 0000000000000000000000000000000000000000..893d75d103fc6e7e3a1161d88c7dd32e2645645b --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Filter.php @@ -0,0 +1,84 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +abstract class Twig_Filter implements Twig_FilterInterface, Twig_FilterCallableInterface +{ + protected $options; + protected $arguments = array(); + + public function __construct(array $options = array()) + { + $this->options = array_merge(array( + 'needs_environment' => false, + 'needs_context' => false, + 'pre_escape' => null, + 'preserves_safety' => null, + 'callable' => null, + ), $options); + } + + public function setArguments($arguments) + { + $this->arguments = $arguments; + } + + public function getArguments() + { + return $this->arguments; + } + + public function needsEnvironment() + { + return $this->options['needs_environment']; + } + + public function needsContext() + { + return $this->options['needs_context']; + } + + public function getSafe(Twig_Node $filterArgs) + { + if (isset($this->options['is_safe'])) { + return $this->options['is_safe']; + } + + if (isset($this->options['is_safe_callback'])) { + return call_user_func($this->options['is_safe_callback'], $filterArgs); + } + } + + public function getPreservesSafety() + { + return $this->options['preserves_safety']; + } + + public function getPreEscape() + { + return $this->options['pre_escape']; + } + + public function getCallable() + { + return $this->options['callable']; + } +} diff --git a/vendor/twig/twig/lib/Twig/Filter/Function.php b/vendor/twig/twig/lib/Twig/Filter/Function.php new file mode 100644 index 0000000000000000000000000000000000000000..71b16554e04f7a97bc548898e800106c90d0a76e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Filter/Function.php @@ -0,0 +1,40 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +class Twig_Filter_Function extends Twig_Filter +{ + protected $function; + + public function __construct($function, array $options = array()) + { + $options['callable'] = $function; + + parent::__construct($options); + + $this->function = $function; + } + + public function compile() + { + return $this->function; + } +} diff --git a/vendor/twig/twig/lib/Twig/Filter/Method.php b/vendor/twig/twig/lib/Twig/Filter/Method.php new file mode 100644 index 0000000000000000000000000000000000000000..1b75676c59f61dcb8a2266b6a1e1d97e82ccfb7b --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Filter/Method.php @@ -0,0 +1,42 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +class Twig_Filter_Method extends Twig_Filter +{ + protected $extension; + protected $method; + + public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array()) + { + $options['callable'] = array($extension, $method); + + parent::__construct($options); + + $this->extension = $extension; + $this->method = $method; + } + + public function compile() + { + return sprintf('$this->env->getExtension(\'%s\')->%s', get_class($this->extension), $this->method); + } +} diff --git a/vendor/twig/twig/lib/Twig/Filter/Node.php b/vendor/twig/twig/lib/Twig/Filter/Node.php new file mode 100644 index 0000000000000000000000000000000000000000..3e6b12eff2ae03e849ae1ac1babfef2a6e338634 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Filter/Node.php @@ -0,0 +1,42 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +class Twig_Filter_Node extends Twig_Filter +{ + protected $class; + + public function __construct($class, array $options = array()) + { + parent::__construct($options); + + $this->class = $class; + } + + public function getClass() + { + return $this->class; + } + + public function compile() + { + } +} diff --git a/vendor/twig/twig/lib/Twig/FilterCallableInterface.php b/vendor/twig/twig/lib/Twig/FilterCallableInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..21b028c4eaa337ae749e535ba22f32c623cad06f --- /dev/null +++ b/vendor/twig/twig/lib/Twig/FilterCallableInterface.php @@ -0,0 +1,24 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +interface Twig_FilterCallableInterface +{ + public function getCallable(); +} diff --git a/vendor/twig/twig/lib/Twig/FilterInterface.php b/vendor/twig/twig/lib/Twig/FilterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..9d7e9ab6ac19fd7c44e7ddb61a8e3b6a0572a5bf --- /dev/null +++ b/vendor/twig/twig/lib/Twig/FilterInterface.php @@ -0,0 +1,43 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +interface Twig_FilterInterface +{ + /** + * Compiles a filter. + * + * @return string The PHP code for the filter + */ + public function compile(); + + public function needsEnvironment(); + + public function needsContext(); + + public function getSafe(Twig_Node $filterArgs); + + public function getPreservesSafety(); + + public function getPreEscape(); + + public function setArguments($arguments); + + public function getArguments(); +} diff --git a/vendor/twig/twig/lib/Twig/Function.php b/vendor/twig/twig/lib/Twig/Function.php new file mode 100644 index 0000000000000000000000000000000000000000..9dc16e90820c1a2fa3a31c383bc94c693f9e5a7e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Function.php @@ -0,0 +1,74 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +abstract class Twig_Function implements Twig_FunctionInterface, Twig_FunctionCallableInterface +{ + protected $options; + protected $arguments = array(); + + public function __construct(array $options = array()) + { + $this->options = array_merge(array( + 'needs_environment' => false, + 'needs_context' => false, + 'callable' => null, + ), $options); + } + + public function setArguments($arguments) + { + $this->arguments = $arguments; + } + + public function getArguments() + { + return $this->arguments; + } + + public function needsEnvironment() + { + return $this->options['needs_environment']; + } + + public function needsContext() + { + return $this->options['needs_context']; + } + + public function getSafe(Twig_Node $functionArgs) + { + if (isset($this->options['is_safe'])) { + return $this->options['is_safe']; + } + + if (isset($this->options['is_safe_callback'])) { + return call_user_func($this->options['is_safe_callback'], $functionArgs); + } + + return array(); + } + + public function getCallable() + { + return $this->options['callable']; + } +} diff --git a/vendor/twig/twig/lib/Twig/Function/Function.php b/vendor/twig/twig/lib/Twig/Function/Function.php new file mode 100644 index 0000000000000000000000000000000000000000..97c0eb77f74a524cde278e12825c03b2588324a9 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Function/Function.php @@ -0,0 +1,41 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +class Twig_Function_Function extends Twig_Function +{ + protected $function; + + public function __construct($function, array $options = array()) + { + $options['callable'] = $function; + + parent::__construct($options); + + $this->function = $function; + } + + public function compile() + { + return $this->function; + } +} diff --git a/vendor/twig/twig/lib/Twig/Function/Method.php b/vendor/twig/twig/lib/Twig/Function/Method.php new file mode 100644 index 0000000000000000000000000000000000000000..4299e11815e28b2060ad3feae9ea953049a3920f --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Function/Method.php @@ -0,0 +1,43 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +class Twig_Function_Method extends Twig_Function +{ + protected $extension; + protected $method; + + public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array()) + { + $options['callable'] = array($extension, $method); + + parent::__construct($options); + + $this->extension = $extension; + $this->method = $method; + } + + public function compile() + { + return sprintf('$this->env->getExtension(\'%s\')->%s', get_class($this->extension), $this->method); + } +} diff --git a/vendor/twig/twig/lib/Twig/Function/Node.php b/vendor/twig/twig/lib/Twig/Function/Node.php new file mode 100644 index 0000000000000000000000000000000000000000..0adc5d93755c8892a213b3b44cd45fd0db0e6391 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Function/Node.php @@ -0,0 +1,42 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +class Twig_Function_Node extends Twig_Function +{ + protected $class; + + public function __construct($class, array $options = array()) + { + parent::__construct($options); + + $this->class = $class; + } + + public function getClass() + { + return $this->class; + } + + public function compile() + { + } +} diff --git a/vendor/twig/twig/lib/Twig/FunctionCallableInterface.php b/vendor/twig/twig/lib/Twig/FunctionCallableInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..d23d69173dab693e75c8a5941d909a056d34f172 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/FunctionCallableInterface.php @@ -0,0 +1,24 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +interface Twig_FunctionCallableInterface +{ + public function getCallable(); +} diff --git a/vendor/twig/twig/lib/Twig/FunctionInterface.php b/vendor/twig/twig/lib/Twig/FunctionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..00d4f95c7ce1f53651e38baa3b334a77579ca275 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/FunctionInterface.php @@ -0,0 +1,40 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +interface Twig_FunctionInterface +{ + /** + * Compiles a function. + * + * @return string The PHP code for the function + */ + public function compile(); + + public function needsEnvironment(); + + public function needsContext(); + + public function getSafe(Twig_Node $filterArgs); + + public function setArguments($arguments); + + public function getArguments(); +} diff --git a/vendor/twig/twig/lib/Twig/Lexer.php b/vendor/twig/twig/lib/Twig/Lexer.php new file mode 100644 index 0000000000000000000000000000000000000000..834b54fbe45923ee1fd2621174483e341ea9669f --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Lexer.php @@ -0,0 +1,422 @@ + + */ +class Twig_Lexer implements Twig_LexerInterface +{ + protected $tokens; + protected $code; + protected $cursor; + protected $lineno; + protected $end; + protected $state; + protected $states; + protected $brackets; + protected $env; + // to be renamed to $name in 2.0 (where it is private) + protected $filename; + protected $options; + protected $regexes; + protected $position; + protected $positions; + protected $currentVarBlockLine; + + private $source; + + const STATE_DATA = 0; + const STATE_BLOCK = 1; + const STATE_VAR = 2; + const STATE_STRING = 3; + const STATE_INTERPOLATION = 4; + + const REGEX_NAME = '/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A'; + const REGEX_NUMBER = '/[0-9]+(?:\.[0-9]+)?/A'; + const REGEX_STRING = '/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As'; + const REGEX_DQ_STRING_DELIM = '/"/A'; + const REGEX_DQ_STRING_PART = '/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As'; + const PUNCTUATION = '()[]{}?:.,|'; + + public function __construct(Twig_Environment $env, array $options = array()) + { + $this->env = $env; + + $this->options = array_merge(array( + 'tag_comment' => array('{#', '#}'), + 'tag_block' => array('{%', '%}'), + 'tag_variable' => array('{{', '}}'), + 'whitespace_trim' => '-', + 'interpolation' => array('#{', '}'), + ), $options); + + $this->regexes = array( + 'lex_var' => '/\s*'.preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_variable'][1], '/').'/A', + 'lex_block' => '/\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')\n?/A', + 'lex_raw_data' => '/('.preg_quote($this->options['tag_block'][0].$this->options['whitespace_trim'], '/').'|'.preg_quote($this->options['tag_block'][0], '/').')\s*(?:end%s)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/s', + 'operator' => $this->getOperatorRegex(), + 'lex_comment' => '/(?:'.preg_quote($this->options['whitespace_trim'], '/').preg_quote($this->options['tag_comment'][1], '/').'\s*|'.preg_quote($this->options['tag_comment'][1], '/').')\n?/s', + 'lex_block_raw' => '/\s*(raw|verbatim)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/As', + 'lex_block_line' => '/\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1], '/').'/As', + 'lex_tokens_start' => '/('.preg_quote($this->options['tag_variable'][0], '/').'|'.preg_quote($this->options['tag_block'][0], '/').'|'.preg_quote($this->options['tag_comment'][0], '/').')('.preg_quote($this->options['whitespace_trim'], '/').')?/s', + 'interpolation_start' => '/'.preg_quote($this->options['interpolation'][0], '/').'\s*/A', + 'interpolation_end' => '/\s*'.preg_quote($this->options['interpolation'][1], '/').'/A', + ); + } + + public function tokenize($code, $name = null) + { + if (!$code instanceof Twig_Source) { + @trigger_error(sprintf('Passing a string as the $code argument of %s() is deprecated since version 1.27 and will be removed in 2.0. Pass a Twig_Source instance instead.', __METHOD__), E_USER_DEPRECATED); + $this->source = new Twig_Source($code, $name); + } else { + $this->source = $code; + } + + if (((int) ini_get('mbstring.func_overload')) & 2) { + @trigger_error('Support for having "mbstring.func_overload" different from 0 is deprecated version 1.29 and will be removed in 2.0.', E_USER_DEPRECATED); + } + + if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) { + $mbEncoding = mb_internal_encoding(); + mb_internal_encoding('ASCII'); + } else { + $mbEncoding = null; + } + + $this->code = str_replace(array("\r\n", "\r"), "\n", $this->source->getCode()); + $this->filename = $this->source->getName(); + $this->cursor = 0; + $this->lineno = 1; + $this->end = strlen($this->code); + $this->tokens = array(); + $this->state = self::STATE_DATA; + $this->states = array(); + $this->brackets = array(); + $this->position = -1; + + // find all token starts in one go + preg_match_all($this->regexes['lex_tokens_start'], $this->code, $matches, PREG_OFFSET_CAPTURE); + $this->positions = $matches; + + while ($this->cursor < $this->end) { + // dispatch to the lexing functions depending + // on the current state + switch ($this->state) { + case self::STATE_DATA: + $this->lexData(); + break; + + case self::STATE_BLOCK: + $this->lexBlock(); + break; + + case self::STATE_VAR: + $this->lexVar(); + break; + + case self::STATE_STRING: + $this->lexString(); + break; + + case self::STATE_INTERPOLATION: + $this->lexInterpolation(); + break; + } + } + + $this->pushToken(Twig_Token::EOF_TYPE); + + if (!empty($this->brackets)) { + list($expect, $lineno) = array_pop($this->brackets); + throw new Twig_Error_Syntax(sprintf('Unclosed "%s".', $expect), $lineno, $this->source); + } + + if ($mbEncoding) { + mb_internal_encoding($mbEncoding); + } + + return new Twig_TokenStream($this->tokens, $this->source); + } + + protected function lexData() + { + // if no matches are left we return the rest of the template as simple text token + if ($this->position == count($this->positions[0]) - 1) { + $this->pushToken(Twig_Token::TEXT_TYPE, substr($this->code, $this->cursor)); + $this->cursor = $this->end; + + return; + } + + // Find the first token after the current cursor + $position = $this->positions[0][++$this->position]; + while ($position[1] < $this->cursor) { + if ($this->position == count($this->positions[0]) - 1) { + return; + } + $position = $this->positions[0][++$this->position]; + } + + // push the template text first + $text = $textContent = substr($this->code, $this->cursor, $position[1] - $this->cursor); + if (isset($this->positions[2][$this->position][0])) { + $text = rtrim($text); + } + $this->pushToken(Twig_Token::TEXT_TYPE, $text); + $this->moveCursor($textContent.$position[0]); + + switch ($this->positions[1][$this->position][0]) { + case $this->options['tag_comment'][0]: + $this->lexComment(); + break; + + case $this->options['tag_block'][0]: + // raw data? + if (preg_match($this->regexes['lex_block_raw'], $this->code, $match, null, $this->cursor)) { + $this->moveCursor($match[0]); + $this->lexRawData($match[1]); + // {% line \d+ %} + } elseif (preg_match($this->regexes['lex_block_line'], $this->code, $match, null, $this->cursor)) { + $this->moveCursor($match[0]); + $this->lineno = (int) $match[1]; + } else { + $this->pushToken(Twig_Token::BLOCK_START_TYPE); + $this->pushState(self::STATE_BLOCK); + $this->currentVarBlockLine = $this->lineno; + } + break; + + case $this->options['tag_variable'][0]: + $this->pushToken(Twig_Token::VAR_START_TYPE); + $this->pushState(self::STATE_VAR); + $this->currentVarBlockLine = $this->lineno; + break; + } + } + + protected function lexBlock() + { + if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, null, $this->cursor)) { + $this->pushToken(Twig_Token::BLOCK_END_TYPE); + $this->moveCursor($match[0]); + $this->popState(); + } else { + $this->lexExpression(); + } + } + + protected function lexVar() + { + if (empty($this->brackets) && preg_match($this->regexes['lex_var'], $this->code, $match, null, $this->cursor)) { + $this->pushToken(Twig_Token::VAR_END_TYPE); + $this->moveCursor($match[0]); + $this->popState(); + } else { + $this->lexExpression(); + } + } + + protected function lexExpression() + { + // whitespace + if (preg_match('/\s+/A', $this->code, $match, null, $this->cursor)) { + $this->moveCursor($match[0]); + + if ($this->cursor >= $this->end) { + throw new Twig_Error_Syntax(sprintf('Unclosed "%s".', $this->state === self::STATE_BLOCK ? 'block' : 'variable'), $this->currentVarBlockLine, $this->source); + } + } + + // operators + if (preg_match($this->regexes['operator'], $this->code, $match, null, $this->cursor)) { + $this->pushToken(Twig_Token::OPERATOR_TYPE, preg_replace('/\s+/', ' ', $match[0])); + $this->moveCursor($match[0]); + } + // names + elseif (preg_match(self::REGEX_NAME, $this->code, $match, null, $this->cursor)) { + $this->pushToken(Twig_Token::NAME_TYPE, $match[0]); + $this->moveCursor($match[0]); + } + // numbers + elseif (preg_match(self::REGEX_NUMBER, $this->code, $match, null, $this->cursor)) { + $number = (float) $match[0]; // floats + if (ctype_digit($match[0]) && $number <= PHP_INT_MAX) { + $number = (int) $match[0]; // integers lower than the maximum + } + $this->pushToken(Twig_Token::NUMBER_TYPE, $number); + $this->moveCursor($match[0]); + } + // punctuation + elseif (false !== strpos(self::PUNCTUATION, $this->code[$this->cursor])) { + // opening bracket + if (false !== strpos('([{', $this->code[$this->cursor])) { + $this->brackets[] = array($this->code[$this->cursor], $this->lineno); + } + // closing bracket + elseif (false !== strpos(')]}', $this->code[$this->cursor])) { + if (empty($this->brackets)) { + throw new Twig_Error_Syntax(sprintf('Unexpected "%s".', $this->code[$this->cursor]), $this->lineno, $this->source); + } + + list($expect, $lineno) = array_pop($this->brackets); + if ($this->code[$this->cursor] != strtr($expect, '([{', ')]}')) { + throw new Twig_Error_Syntax(sprintf('Unclosed "%s".', $expect), $lineno, $this->source); + } + } + + $this->pushToken(Twig_Token::PUNCTUATION_TYPE, $this->code[$this->cursor]); + ++$this->cursor; + } + // strings + elseif (preg_match(self::REGEX_STRING, $this->code, $match, null, $this->cursor)) { + $this->pushToken(Twig_Token::STRING_TYPE, stripcslashes(substr($match[0], 1, -1))); + $this->moveCursor($match[0]); + } + // opening double quoted string + elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, null, $this->cursor)) { + $this->brackets[] = array('"', $this->lineno); + $this->pushState(self::STATE_STRING); + $this->moveCursor($match[0]); + } + // unlexable + else { + throw new Twig_Error_Syntax(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->lineno, $this->source); + } + } + + protected function lexRawData($tag) + { + if ('raw' === $tag) { + @trigger_error(sprintf('Twig Tag "raw" is deprecated since version 1.21. Use "verbatim" instead in %s at line %d.', $this->filename, $this->lineno), E_USER_DEPRECATED); + } + + if (!preg_match(str_replace('%s', $tag, $this->regexes['lex_raw_data']), $this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) { + throw new Twig_Error_Syntax(sprintf('Unexpected end of file: Unclosed "%s" block.', $tag), $this->lineno, $this->source); + } + + $text = substr($this->code, $this->cursor, $match[0][1] - $this->cursor); + $this->moveCursor($text.$match[0][0]); + + if (false !== strpos($match[1][0], $this->options['whitespace_trim'])) { + $text = rtrim($text); + } + + $this->pushToken(Twig_Token::TEXT_TYPE, $text); + } + + protected function lexComment() + { + if (!preg_match($this->regexes['lex_comment'], $this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) { + throw new Twig_Error_Syntax('Unclosed comment.', $this->lineno, $this->source); + } + + $this->moveCursor(substr($this->code, $this->cursor, $match[0][1] - $this->cursor).$match[0][0]); + } + + protected function lexString() + { + if (preg_match($this->regexes['interpolation_start'], $this->code, $match, null, $this->cursor)) { + $this->brackets[] = array($this->options['interpolation'][0], $this->lineno); + $this->pushToken(Twig_Token::INTERPOLATION_START_TYPE); + $this->moveCursor($match[0]); + $this->pushState(self::STATE_INTERPOLATION); + } elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, null, $this->cursor) && strlen($match[0]) > 0) { + $this->pushToken(Twig_Token::STRING_TYPE, stripcslashes($match[0])); + $this->moveCursor($match[0]); + } elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, null, $this->cursor)) { + list($expect, $lineno) = array_pop($this->brackets); + if ($this->code[$this->cursor] != '"') { + throw new Twig_Error_Syntax(sprintf('Unclosed "%s".', $expect), $lineno, $this->source); + } + + $this->popState(); + ++$this->cursor; + } + } + + protected function lexInterpolation() + { + $bracket = end($this->brackets); + if ($this->options['interpolation'][0] === $bracket[0] && preg_match($this->regexes['interpolation_end'], $this->code, $match, null, $this->cursor)) { + array_pop($this->brackets); + $this->pushToken(Twig_Token::INTERPOLATION_END_TYPE); + $this->moveCursor($match[0]); + $this->popState(); + } else { + $this->lexExpression(); + } + } + + protected function pushToken($type, $value = '') + { + // do not push empty text tokens + if (Twig_Token::TEXT_TYPE === $type && '' === $value) { + return; + } + + $this->tokens[] = new Twig_Token($type, $value, $this->lineno); + } + + protected function moveCursor($text) + { + $this->cursor += strlen($text); + $this->lineno += substr_count($text, "\n"); + } + + protected function getOperatorRegex() + { + $operators = array_merge( + array('='), + array_keys($this->env->getUnaryOperators()), + array_keys($this->env->getBinaryOperators()) + ); + + $operators = array_combine($operators, array_map('strlen', $operators)); + arsort($operators); + + $regex = array(); + foreach ($operators as $operator => $length) { + // an operator that ends with a character must be followed by + // a whitespace or a parenthesis + if (ctype_alpha($operator[$length - 1])) { + $r = preg_quote($operator, '/').'(?=[\s()])'; + } else { + $r = preg_quote($operator, '/'); + } + + // an operator with a space can be any amount of whitespaces + $r = preg_replace('/\s+/', '\s+', $r); + + $regex[] = $r; + } + + return '/'.implode('|', $regex).'/A'; + } + + protected function pushState($state) + { + $this->states[] = $this->state; + $this->state = $state; + } + + protected function popState() + { + if (0 === count($this->states)) { + throw new Exception('Cannot pop state without a previous state.'); + } + + $this->state = array_pop($this->states); + } +} diff --git a/vendor/twig/twig/lib/Twig/LexerInterface.php b/vendor/twig/twig/lib/Twig/LexerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c10bbfec4a02e0d70610fd51265938e020dddb30 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/LexerInterface.php @@ -0,0 +1,32 @@ + + * + * @deprecated since 1.12 (to be removed in 3.0) + */ +interface Twig_LexerInterface +{ + /** + * Tokenizes a source code. + * + * @param string|Twig_Source $code The source code + * @param string $name A unique identifier for the source code + * + * @return Twig_TokenStream + * + * @throws Twig_Error_Syntax When the code is syntactically wrong + */ + public function tokenize($code, $name = null); +} diff --git a/vendor/twig/twig/lib/Twig/Loader/Array.php b/vendor/twig/twig/lib/Twig/Loader/Array.php new file mode 100644 index 0000000000000000000000000000000000000000..430efd060698a0b0090d369d37b0170c60e5bb2d --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Loader/Array.php @@ -0,0 +1,95 @@ + + */ +class Twig_Loader_Array implements Twig_LoaderInterface, Twig_ExistsLoaderInterface, Twig_SourceContextLoaderInterface +{ + protected $templates = array(); + + /** + * @param array $templates An array of templates (keys are the names, and values are the source code) + */ + public function __construct(array $templates = array()) + { + $this->templates = $templates; + } + + /** + * Adds or overrides a template. + * + * @param string $name The template name + * @param string $template The template source + */ + public function setTemplate($name, $template) + { + $this->templates[(string) $name] = $template; + } + + public function getSource($name) + { + @trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', get_class($this)), E_USER_DEPRECATED); + + $name = (string) $name; + if (!isset($this->templates[$name])) { + throw new Twig_Error_Loader(sprintf('Template "%s" is not defined.', $name)); + } + + return $this->templates[$name]; + } + + public function getSourceContext($name) + { + $name = (string) $name; + if (!isset($this->templates[$name])) { + throw new Twig_Error_Loader(sprintf('Template "%s" is not defined.', $name)); + } + + return new Twig_Source($this->templates[$name], $name); + } + + public function exists($name) + { + return isset($this->templates[(string) $name]); + } + + public function getCacheKey($name) + { + $name = (string) $name; + if (!isset($this->templates[$name])) { + throw new Twig_Error_Loader(sprintf('Template "%s" is not defined.', $name)); + } + + return $this->templates[$name]; + } + + public function isFresh($name, $time) + { + $name = (string) $name; + if (!isset($this->templates[$name])) { + throw new Twig_Error_Loader(sprintf('Template "%s" is not defined.', $name)); + } + + return true; + } +} diff --git a/vendor/twig/twig/lib/Twig/Loader/Chain.php b/vendor/twig/twig/lib/Twig/Loader/Chain.php new file mode 100644 index 0000000000000000000000000000000000000000..ffa892b17e28baaedafb6270b5e909541712b64c --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Loader/Chain.php @@ -0,0 +1,149 @@ + + */ +class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterface, Twig_SourceContextLoaderInterface +{ + private $hasSourceCache = array(); + protected $loaders = array(); + + /** + * @param Twig_LoaderInterface[] $loaders + */ + public function __construct(array $loaders = array()) + { + foreach ($loaders as $loader) { + $this->addLoader($loader); + } + } + + public function addLoader(Twig_LoaderInterface $loader) + { + $this->loaders[] = $loader; + $this->hasSourceCache = array(); + } + + public function getSource($name) + { + @trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', get_class($this)), E_USER_DEPRECATED); + + $exceptions = array(); + foreach ($this->loaders as $loader) { + if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) { + continue; + } + + try { + return $loader->getSource($name); + } catch (Twig_Error_Loader $e) { + $exceptions[] = $e->getMessage(); + } + } + + throw new Twig_Error_Loader(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); + } + + public function getSourceContext($name) + { + $exceptions = array(); + foreach ($this->loaders as $loader) { + if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) { + continue; + } + + try { + if ($loader instanceof Twig_SourceContextLoaderInterface) { + return $loader->getSourceContext($name); + } + + return new Twig_Source($loader->getSource($name), $name); + } catch (Twig_Error_Loader $e) { + $exceptions[] = $e->getMessage(); + } + } + + throw new Twig_Error_Loader(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); + } + + public function exists($name) + { + $name = (string) $name; + + if (isset($this->hasSourceCache[$name])) { + return $this->hasSourceCache[$name]; + } + + foreach ($this->loaders as $loader) { + if ($loader instanceof Twig_ExistsLoaderInterface) { + if ($loader->exists($name)) { + return $this->hasSourceCache[$name] = true; + } + + continue; + } + + try { + if ($loader instanceof Twig_SourceContextLoaderInterface) { + $loader->getSourceContext($name); + } else { + $loader->getSource($name); + } + + return $this->hasSourceCache[$name] = true; + } catch (Twig_Error_Loader $e) { + } + } + + return $this->hasSourceCache[$name] = false; + } + + public function getCacheKey($name) + { + $exceptions = array(); + foreach ($this->loaders as $loader) { + if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) { + continue; + } + + try { + return $loader->getCacheKey($name); + } catch (Twig_Error_Loader $e) { + $exceptions[] = get_class($loader).': '.$e->getMessage(); + } + } + + throw new Twig_Error_Loader(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); + } + + public function isFresh($name, $time) + { + $exceptions = array(); + foreach ($this->loaders as $loader) { + if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) { + continue; + } + + try { + return $loader->isFresh($name, $time); + } catch (Twig_Error_Loader $e) { + $exceptions[] = get_class($loader).': '.$e->getMessage(); + } + } + + throw new Twig_Error_Loader(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); + } +} diff --git a/vendor/twig/twig/lib/Twig/Loader/Filesystem.php b/vendor/twig/twig/lib/Twig/Loader/Filesystem.php new file mode 100644 index 0000000000000000000000000000000000000000..25be4e2d88f75709399913eff22b3151f87b00e3 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Loader/Filesystem.php @@ -0,0 +1,288 @@ + + */ +class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderInterface, Twig_SourceContextLoaderInterface +{ + /** Identifier of the main namespace. */ + const MAIN_NAMESPACE = '__main__'; + + protected $paths = array(); + protected $cache = array(); + protected $errorCache = array(); + + private $rootPath; + + /** + * @param string|array $paths A path or an array of paths where to look for templates + * @param string|null $rootPath The root path common to all relative paths (null for getcwd()) + */ + public function __construct($paths = array(), $rootPath = null) + { + $this->rootPath = (null === $rootPath ? getcwd() : $rootPath).DIRECTORY_SEPARATOR; + if (false !== $realPath = realpath($rootPath)) { + $this->rootPath = $realPath.DIRECTORY_SEPARATOR; + } + + if ($paths) { + $this->setPaths($paths); + } + } + + /** + * Returns the paths to the templates. + * + * @param string $namespace A path namespace + * + * @return array The array of paths where to look for templates + */ + public function getPaths($namespace = self::MAIN_NAMESPACE) + { + return isset($this->paths[$namespace]) ? $this->paths[$namespace] : array(); + } + + /** + * Returns the path namespaces. + * + * The main namespace is always defined. + * + * @return array The array of defined namespaces + */ + public function getNamespaces() + { + return array_keys($this->paths); + } + + /** + * Sets the paths where templates are stored. + * + * @param string|array $paths A path or an array of paths where to look for templates + * @param string $namespace A path namespace + */ + public function setPaths($paths, $namespace = self::MAIN_NAMESPACE) + { + if (!is_array($paths)) { + $paths = array($paths); + } + + $this->paths[$namespace] = array(); + foreach ($paths as $path) { + $this->addPath($path, $namespace); + } + } + + /** + * Adds a path where templates are stored. + * + * @param string $path A path where to look for templates + * @param string $namespace A path namespace + * + * @throws Twig_Error_Loader + */ + public function addPath($path, $namespace = self::MAIN_NAMESPACE) + { + // invalidate the cache + $this->cache = $this->errorCache = array(); + + $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path; + if (!is_dir($checkPath)) { + throw new Twig_Error_Loader(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath)); + } + + $this->paths[$namespace][] = rtrim($path, '/\\'); + } + + /** + * Prepends a path where templates are stored. + * + * @param string $path A path where to look for templates + * @param string $namespace A path namespace + * + * @throws Twig_Error_Loader + */ + public function prependPath($path, $namespace = self::MAIN_NAMESPACE) + { + // invalidate the cache + $this->cache = $this->errorCache = array(); + + $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path; + if (!is_dir($checkPath)) { + throw new Twig_Error_Loader(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath)); + } + + $path = rtrim($path, '/\\'); + + if (!isset($this->paths[$namespace])) { + $this->paths[$namespace][] = $path; + } else { + array_unshift($this->paths[$namespace], $path); + } + } + + public function getSource($name) + { + @trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', get_class($this)), E_USER_DEPRECATED); + + return file_get_contents($this->findTemplate($name)); + } + + public function getSourceContext($name) + { + $path = $this->findTemplate($name); + + return new Twig_Source(file_get_contents($path), $name, $path); + } + + public function getCacheKey($name) + { + $path = $this->findTemplate($name); + $len = strlen($this->rootPath); + if (0 === strncmp($this->rootPath, $path, $len)) { + return substr($path, $len); + } + + return $path; + } + + public function exists($name) + { + $name = $this->normalizeName($name); + + if (isset($this->cache[$name])) { + return true; + } + + try { + return false !== $this->findTemplate($name, false); + } catch (Twig_Error_Loader $exception) { + @trigger_error(sprintf('In %s::findTemplate(), you must accept a second argument that when set to "false" returns "false" instead of throwing an exception. Not supporting this argument is deprecated since version 1.27.', get_class($this)), E_USER_DEPRECATED); + + return false; + } + } + + public function isFresh($name, $time) + { + return filemtime($this->findTemplate($name)) <= $time; + } + + protected function findTemplate($name) + { + $throw = func_num_args() > 1 ? func_get_arg(1) : true; + $name = $this->normalizeName($name); + + if (isset($this->cache[$name])) { + return $this->cache[$name]; + } + + if (isset($this->errorCache[$name])) { + if (!$throw) { + return false; + } + + throw new Twig_Error_Loader($this->errorCache[$name]); + } + + $this->validateName($name); + + list($namespace, $shortname) = $this->parseName($name); + + if (!isset($this->paths[$namespace])) { + $this->errorCache[$name] = sprintf('There are no registered paths for namespace "%s".', $namespace); + + if (!$throw) { + return false; + } + + throw new Twig_Error_Loader($this->errorCache[$name]); + } + + foreach ($this->paths[$namespace] as $path) { + if (!$this->isAbsolutePath($path)) { + $path = $this->rootPath.'/'.$path; + } + + if (is_file($path.'/'.$shortname)) { + if (false !== $realpath = realpath($path.'/'.$shortname)) { + return $this->cache[$name] = $realpath; + } + + return $this->cache[$name] = $path.'/'.$shortname; + } + } + + $this->errorCache[$name] = sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths[$namespace])); + + if (!$throw) { + return false; + } + + throw new Twig_Error_Loader($this->errorCache[$name]); + } + + protected function parseName($name, $default = self::MAIN_NAMESPACE) + { + if (isset($name[0]) && '@' == $name[0]) { + if (false === $pos = strpos($name, '/')) { + throw new Twig_Error_Loader(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name)); + } + + $namespace = substr($name, 1, $pos - 1); + $shortname = substr($name, $pos + 1); + + return array($namespace, $shortname); + } + + return array($default, $name); + } + + protected function normalizeName($name) + { + return preg_replace('#/{2,}#', '/', str_replace('\\', '/', (string) $name)); + } + + protected function validateName($name) + { + if (false !== strpos($name, "\0")) { + throw new Twig_Error_Loader('A template name cannot contain NUL bytes.'); + } + + $name = ltrim($name, '/'); + $parts = explode('/', $name); + $level = 0; + foreach ($parts as $part) { + if ('..' === $part) { + --$level; + } elseif ('.' !== $part) { + ++$level; + } + + if ($level < 0) { + throw new Twig_Error_Loader(sprintf('Looks like you try to load a template outside configured directories (%s).', $name)); + } + } + } + + private function isAbsolutePath($file) + { + return strspn($file, '/\\', 0, 1) + || (strlen($file) > 3 && ctype_alpha($file[0]) + && substr($file, 1, 1) === ':' + && strspn($file, '/\\', 2, 1) + ) + || null !== parse_url($file, PHP_URL_SCHEME) + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Loader/String.php b/vendor/twig/twig/lib/Twig/Loader/String.php new file mode 100644 index 0000000000000000000000000000000000000000..950bd35b0f09b8f916d121cb508cce97c5b696bd --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Loader/String.php @@ -0,0 +1,58 @@ + + */ +class Twig_Loader_String implements Twig_LoaderInterface, Twig_ExistsLoaderInterface, Twig_SourceContextLoaderInterface +{ + public function getSource($name) + { + @trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', get_class($this)), E_USER_DEPRECATED); + + return $name; + } + + public function getSourceContext($name) + { + return new Twig_Source($name, $name); + } + + public function exists($name) + { + return true; + } + + public function getCacheKey($name) + { + return $name; + } + + public function isFresh($name, $time) + { + return true; + } +} diff --git a/vendor/twig/twig/lib/Twig/LoaderInterface.php b/vendor/twig/twig/lib/Twig/LoaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b029997237d5e454237bd910fcb0a65ce4d202fe --- /dev/null +++ b/vendor/twig/twig/lib/Twig/LoaderInterface.php @@ -0,0 +1,55 @@ + + */ +interface Twig_LoaderInterface +{ + /** + * Gets the source code of a template, given its name. + * + * @param string $name The name of the template to load + * + * @return string The template source code + * + * @throws Twig_Error_Loader When $name is not found + * + * @deprecated since 1.27 (to be removed in 2.0), implement Twig_SourceContextLoaderInterface + */ + public function getSource($name); + + /** + * Gets the cache key to use for the cache for a given template name. + * + * @param string $name The name of the template to load + * + * @return string The cache key + * + * @throws Twig_Error_Loader When $name is not found + */ + public function getCacheKey($name); + + /** + * Returns true if the template is still fresh. + * + * @param string $name The template name + * @param int $time Timestamp of the last modification time of the + * cached template + * + * @return bool true if the template is fresh, false otherwise + * + * @throws Twig_Error_Loader When $name is not found + */ + public function isFresh($name, $time); +} diff --git a/vendor/twig/twig/lib/Twig/Markup.php b/vendor/twig/twig/lib/Twig/Markup.php new file mode 100644 index 0000000000000000000000000000000000000000..535ebe9e30b65d51fe1d2db7048fc11e0b706c00 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Markup.php @@ -0,0 +1,37 @@ + + */ +class Twig_Markup implements Countable +{ + protected $content; + protected $charset; + + public function __construct($content, $charset) + { + $this->content = (string) $content; + $this->charset = $charset; + } + + public function __toString() + { + return $this->content; + } + + public function count() + { + return function_exists('mb_get_info') ? mb_strlen($this->content, $this->charset) : strlen($this->content); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node.php b/vendor/twig/twig/lib/Twig/Node.php new file mode 100644 index 0000000000000000000000000000000000000000..807f198f27b35318813ecd1549098e3c6430f846 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node.php @@ -0,0 +1,253 @@ + + */ +class Twig_Node implements Twig_NodeInterface +{ + protected $nodes; + protected $attributes; + protected $lineno; + protected $tag; + + private $name; + + /** + * Constructor. + * + * The nodes are automatically made available as properties ($this->node). + * The attributes are automatically made available as array items ($this['name']). + * + * @param array $nodes An array of named nodes + * @param array $attributes An array of attributes (should not be nodes) + * @param int $lineno The line number + * @param string $tag The tag name associated with the Node + */ + public function __construct(array $nodes = array(), array $attributes = array(), $lineno = 0, $tag = null) + { + foreach ($nodes as $name => $node) { + if (!$node instanceof Twig_NodeInterface) { + @trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', is_object($node) ? get_class($node) : null === $node ? 'null' : gettype($node), $name, get_class($this)), E_USER_DEPRECATED); + } + } + $this->nodes = $nodes; + $this->attributes = $attributes; + $this->lineno = $lineno; + $this->tag = $tag; + } + + public function __toString() + { + $attributes = array(); + foreach ($this->attributes as $name => $value) { + $attributes[] = sprintf('%s: %s', $name, str_replace("\n", '', var_export($value, true))); + } + + $repr = array(get_class($this).'('.implode(', ', $attributes)); + + if (count($this->nodes)) { + foreach ($this->nodes as $name => $node) { + $len = strlen($name) + 4; + $noderepr = array(); + foreach (explode("\n", (string) $node) as $line) { + $noderepr[] = str_repeat(' ', $len).$line; + } + + $repr[] = sprintf(' %s: %s', $name, ltrim(implode("\n", $noderepr))); + } + + $repr[] = ')'; + } else { + $repr[0] .= ')'; + } + + return implode("\n", $repr); + } + + /** + * @deprecated since 1.16.1 (to be removed in 2.0) + */ + public function toXml($asDom = false) + { + @trigger_error(sprintf('%s is deprecated since version 1.16.1 and will be removed in 2.0.', __METHOD__), E_USER_DEPRECATED); + + $dom = new DOMDocument('1.0', 'UTF-8'); + $dom->formatOutput = true; + $dom->appendChild($xml = $dom->createElement('twig')); + + $xml->appendChild($node = $dom->createElement('node')); + $node->setAttribute('class', get_class($this)); + + foreach ($this->attributes as $name => $value) { + $node->appendChild($attribute = $dom->createElement('attribute')); + $attribute->setAttribute('name', $name); + $attribute->appendChild($dom->createTextNode($value)); + } + + foreach ($this->nodes as $name => $n) { + if (null === $n) { + continue; + } + + $child = $n->toXml(true)->getElementsByTagName('node')->item(0); + $child = $dom->importNode($child, true); + $child->setAttribute('name', $name); + + $node->appendChild($child); + } + + return $asDom ? $dom : $dom->saveXML(); + } + + public function compile(Twig_Compiler $compiler) + { + foreach ($this->nodes as $node) { + $node->compile($compiler); + } + } + + public function getTemplateLine() + { + return $this->lineno; + } + + /** + * @deprecated since 1.27 (to be removed in 2.0) + */ + public function getLine() + { + @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getTemplateLine() instead.', E_USER_DEPRECATED); + + return $this->lineno; + } + + public function getNodeTag() + { + return $this->tag; + } + + /** + * @return bool + */ + public function hasAttribute($name) + { + return array_key_exists($name, $this->attributes); + } + + /** + * @return mixed + */ + public function getAttribute($name) + { + if (!array_key_exists($name, $this->attributes)) { + throw new LogicException(sprintf('Attribute "%s" does not exist for Node "%s".', $name, get_class($this))); + } + + return $this->attributes[$name]; + } + + /** + * @param string $name + * @param mixed $value + */ + public function setAttribute($name, $value) + { + $this->attributes[$name] = $value; + } + + public function removeAttribute($name) + { + unset($this->attributes[$name]); + } + + /** + * @return bool + */ + public function hasNode($name) + { + return array_key_exists($name, $this->nodes); + } + + /** + * @return Twig_Node + */ + public function getNode($name) + { + if (!array_key_exists($name, $this->nodes)) { + throw new LogicException(sprintf('Node "%s" does not exist for Node "%s".', $name, get_class($this))); + } + + return $this->nodes[$name]; + } + + public function setNode($name, $node = null) + { + if (!$node instanceof Twig_NodeInterface) { + @trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', is_object($node) ? get_class($node) : null === $node ? 'null' : gettype($node), $name, get_class($this)), E_USER_DEPRECATED); + } + + $this->nodes[$name] = $node; + } + + public function removeNode($name) + { + unset($this->nodes[$name]); + } + + public function count() + { + return count($this->nodes); + } + + public function getIterator() + { + return new ArrayIterator($this->nodes); + } + + public function setTemplateName($name) + { + $this->name = $name; + foreach ($this->nodes as $node) { + if (null !== $node) { + $node->setTemplateName($name); + } + } + } + + public function getTemplateName() + { + return $this->name; + } + + /** + * @deprecated since 1.27 (to be removed in 2.0) + */ + public function setFilename($name) + { + @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use setTemplateName() instead.', E_USER_DEPRECATED); + + $this->setTemplateName($name); + } + + /** + * @deprecated since 1.27 (to be removed in 2.0) + */ + public function getFilename() + { + @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getTemplateName() instead.', E_USER_DEPRECATED); + + return $this->name; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/AutoEscape.php b/vendor/twig/twig/lib/Twig/Node/AutoEscape.php new file mode 100644 index 0000000000000000000000000000000000000000..570f23e498c7bec492e52ced3f06f476a60e7298 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/AutoEscape.php @@ -0,0 +1,34 @@ + + */ +class Twig_Node_AutoEscape extends Twig_Node +{ + public function __construct($value, Twig_NodeInterface $body, $lineno, $tag = 'autoescape') + { + parent::__construct(array('body' => $body), array('value' => $value), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->subcompile($this->getNode('body')); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Block.php b/vendor/twig/twig/lib/Twig/Node/Block.php new file mode 100644 index 0000000000000000000000000000000000000000..dfd8ceb8bd3580502a65bc3efbb763fdc77d492f --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Block.php @@ -0,0 +1,39 @@ + + */ +class Twig_Node_Block extends Twig_Node +{ + public function __construct($name, Twig_NodeInterface $body, $lineno, $tag = null) + { + parent::__construct(array('body' => $body), array('name' => $name), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write(sprintf("public function block_%s(\$context, array \$blocks = array())\n", $this->getAttribute('name')), "{\n") + ->indent() + ; + + $compiler + ->subcompile($this->getNode('body')) + ->outdent() + ->write("}\n\n") + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/BlockReference.php b/vendor/twig/twig/lib/Twig/Node/BlockReference.php new file mode 100644 index 0000000000000000000000000000000000000000..d9b59378c84a9709795f635a68952fc848203966 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/BlockReference.php @@ -0,0 +1,32 @@ + + */ +class Twig_Node_BlockReference extends Twig_Node implements Twig_NodeOutputInterface +{ + public function __construct($name, $lineno, $tag = null) + { + parent::__construct(array(), array('name' => $name), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write(sprintf("\$this->displayBlock('%s', \$context, \$blocks);\n", $this->getAttribute('name'))) + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Body.php b/vendor/twig/twig/lib/Twig/Node/Body.php new file mode 100644 index 0000000000000000000000000000000000000000..2314c9abd64df6a0fde0cef3398f55e42e674135 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Body.php @@ -0,0 +1,19 @@ + + */ +class Twig_Node_Body extends Twig_Node +{ +} diff --git a/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php b/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php new file mode 100644 index 0000000000000000000000000000000000000000..b9cf054aacce1f0edfc66aae61dd2fed09e8bd6f --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php @@ -0,0 +1,78 @@ + + */ +class Twig_Node_CheckSecurity extends Twig_Node +{ + protected $usedFilters; + protected $usedTags; + protected $usedFunctions; + + public function __construct(array $usedFilters, array $usedTags, array $usedFunctions) + { + $this->usedFilters = $usedFilters; + $this->usedTags = $usedTags; + $this->usedFunctions = $usedFunctions; + + parent::__construct(); + } + + public function compile(Twig_Compiler $compiler) + { + $tags = $filters = $functions = array(); + foreach (array('tags', 'filters', 'functions') as $type) { + foreach ($this->{'used'.ucfirst($type)} as $name => $node) { + if ($node instanceof Twig_Node) { + ${$type}[$name] = $node->getTemplateLine(); + } else { + ${$type}[$node] = null; + } + } + } + + $compiler + ->write('$tags = ')->repr(array_filter($tags))->raw(";\n") + ->write('$filters = ')->repr(array_filter($filters))->raw(";\n") + ->write('$functions = ')->repr(array_filter($functions))->raw(";\n\n") + ->write("try {\n") + ->indent() + ->write("\$this->env->getExtension('Twig_Extension_Sandbox')->checkSecurity(\n") + ->indent() + ->write(!$tags ? "array(),\n" : "array('".implode("', '", array_keys($tags))."'),\n") + ->write(!$filters ? "array(),\n" : "array('".implode("', '", array_keys($filters))."'),\n") + ->write(!$functions ? "array()\n" : "array('".implode("', '", array_keys($functions))."')\n") + ->outdent() + ->write(");\n") + ->outdent() + ->write("} catch (Twig_Sandbox_SecurityError \$e) {\n") + ->indent() + ->write("\$e->setSourceContext(\$this->getSourceContext());\n\n") + ->write("if (\$e instanceof Twig_Sandbox_SecurityNotAllowedTagError && isset(\$tags[\$e->getTagName()])) {\n") + ->indent() + ->write("\$e->setTemplateLine(\$tags[\$e->getTagName()]);\n") + ->outdent() + ->write("} elseif (\$e instanceof Twig_Sandbox_SecurityNotAllowedFilterError && isset(\$filters[\$e->getFilterName()])) {\n") + ->indent() + ->write("\$e->setTemplateLine(\$filters[\$e->getFilterName()]);\n") + ->outdent() + ->write("} elseif (\$e instanceof Twig_Sandbox_SecurityNotAllowedFunctionError && isset(\$functions[\$e->getFunctionName()])) {\n") + ->indent() + ->write("\$e->setTemplateLine(\$functions[\$e->getFunctionName()]);\n") + ->outdent() + ->write("}\n\n") + ->write("throw \$e;\n") + ->outdent() + ->write("}\n\n") + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Do.php b/vendor/twig/twig/lib/Twig/Node/Do.php new file mode 100644 index 0000000000000000000000000000000000000000..94305c7a5e7aacafcbe528591a5f70aa8d238b57 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Do.php @@ -0,0 +1,33 @@ + + */ +class Twig_Node_Do extends Twig_Node +{ + public function __construct(Twig_Node_Expression $expr, $lineno, $tag = null) + { + parent::__construct(array('expr' => $expr), array(), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write('') + ->subcompile($this->getNode('expr')) + ->raw(";\n") + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Embed.php b/vendor/twig/twig/lib/Twig/Node/Embed.php new file mode 100644 index 0000000000000000000000000000000000000000..1786f36c6f43bf6efefd6d625d293f968f2c8dbe --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Embed.php @@ -0,0 +1,44 @@ + + */ +class Twig_Node_Embed extends Twig_Node_Include +{ + // we don't inject the module to avoid node visitors to traverse it twice (as it will be already visited in the main module) + public function __construct($name, $index, Twig_Node_Expression $variables = null, $only = false, $ignoreMissing = false, $lineno, $tag = null) + { + parent::__construct(new Twig_Node_Expression_Constant('not_used', $lineno), $variables, $only, $ignoreMissing, $lineno, $tag); + + $this->setAttribute('name', $name); + // to be removed in 2.0, used name instead + $this->setAttribute('filename', $name); + $this->setAttribute('index', $index); + } + + protected function addGetTemplate(Twig_Compiler $compiler) + { + $compiler + ->write('$this->loadTemplate(') + ->string($this->getAttribute('name')) + ->raw(', ') + ->repr($this->getTemplateName()) + ->raw(', ') + ->repr($this->getTemplateLine()) + ->raw(', ') + ->string($this->getAttribute('index')) + ->raw(')') + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression.php b/vendor/twig/twig/lib/Twig/Node/Expression.php new file mode 100644 index 0000000000000000000000000000000000000000..e609d812fb54a8e757c5a1868c42fd9d1f4d4a1e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression.php @@ -0,0 +1,20 @@ + + */ +abstract class Twig_Node_Expression extends Twig_Node +{ +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Array.php b/vendor/twig/twig/lib/Twig/Node/Expression/Array.php new file mode 100644 index 0000000000000000000000000000000000000000..0c726c04be43e46a0731211a94d3e0c360eedd55 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Array.php @@ -0,0 +1,81 @@ +index = -1; + foreach ($this->getKeyValuePairs() as $pair) { + if ($pair['key'] instanceof Twig_Node_Expression_Constant && ctype_digit((string) $pair['key']->getAttribute('value')) && $pair['key']->getAttribute('value') > $this->index) { + $this->index = $pair['key']->getAttribute('value'); + } + } + } + + public function getKeyValuePairs() + { + $pairs = array(); + + foreach (array_chunk($this->nodes, 2) as $pair) { + $pairs[] = array( + 'key' => $pair[0], + 'value' => $pair[1], + ); + } + + return $pairs; + } + + public function hasElement(Twig_Node_Expression $key) + { + foreach ($this->getKeyValuePairs() as $pair) { + // we compare the string representation of the keys + // to avoid comparing the line numbers which are not relevant here. + if ((string) $key === (string) $pair['key']) { + return true; + } + } + + return false; + } + + public function addElement(Twig_Node_Expression $value, Twig_Node_Expression $key = null) + { + if (null === $key) { + $key = new Twig_Node_Expression_Constant(++$this->index, $value->getTemplateLine()); + } + + array_push($this->nodes, $key, $value); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->raw('array('); + $first = true; + foreach ($this->getKeyValuePairs() as $pair) { + if (!$first) { + $compiler->raw(', '); + } + $first = false; + + $compiler + ->subcompile($pair['key']) + ->raw(' => ') + ->subcompile($pair['value']) + ; + } + $compiler->raw(')'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php b/vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php new file mode 100644 index 0000000000000000000000000000000000000000..ceb7282335cad5d3f319fd4dacf95d6d8f3b8825 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php @@ -0,0 +1,23 @@ +raw('$context[') + ->string($this->getAttribute('name')) + ->raw(']') + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php new file mode 100644 index 0000000000000000000000000000000000000000..d4787698e501d78e774c056469b53cd446f63c81 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php @@ -0,0 +1,35 @@ + $left, 'right' => $right), array(), $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->raw('(') + ->subcompile($this->getNode('left')) + ->raw(' ') + ; + $this->operator($compiler); + $compiler + ->raw(' ') + ->subcompile($this->getNode('right')) + ->raw(')') + ; + } + + abstract public function operator(Twig_Compiler $compiler); +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Add.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Add.php new file mode 100644 index 0000000000000000000000000000000000000000..51bba4809544e471e2dbba5b0f1c5868ca4ed845 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Add.php @@ -0,0 +1,18 @@ +raw('+'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php new file mode 100644 index 0000000000000000000000000000000000000000..9b3997dade713a36a3b7630f246a3ae0650f1303 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php @@ -0,0 +1,18 @@ +raw('&&'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php new file mode 100644 index 0000000000000000000000000000000000000000..fa9729db031a6ce55b6b5839b408a7ce58058e54 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php @@ -0,0 +1,18 @@ +raw('&'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php new file mode 100644 index 0000000000000000000000000000000000000000..e3be548515c6b3275b72cbb6d2908ea9fe840349 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php @@ -0,0 +1,18 @@ +raw('|'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php new file mode 100644 index 0000000000000000000000000000000000000000..9255d8f7871b91b65c9b9147c7a6b0f110cbb8d3 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php @@ -0,0 +1,18 @@ +raw('^'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php new file mode 100644 index 0000000000000000000000000000000000000000..7de9070eba29cb379467b7c55c587fbca5dbb686 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php @@ -0,0 +1,18 @@ +raw('.'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Div.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Div.php new file mode 100644 index 0000000000000000000000000000000000000000..386b4eabec832a40e55b1e799cf0869be3c95445 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Div.php @@ -0,0 +1,18 @@ +raw('/'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/EndsWith.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/EndsWith.php new file mode 100644 index 0000000000000000000000000000000000000000..c24b720a4cd46ea52729ecb76adefe77952b90d8 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/EndsWith.php @@ -0,0 +1,30 @@ +getVarName(); + $right = $compiler->getVarName(); + $compiler + ->raw(sprintf('(is_string($%s = ', $left)) + ->subcompile($this->getNode('left')) + ->raw(sprintf(') && is_string($%s = ', $right)) + ->subcompile($this->getNode('right')) + ->raw(sprintf(') && (\'\' === $%2$s || $%2$s === substr($%1$s, -strlen($%2$s))))', $left, $right)) + ; + } + + public function operator(Twig_Compiler $compiler) + { + return $compiler->raw(''); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php new file mode 100644 index 0000000000000000000000000000000000000000..4535cd08264d0c1775eb29be0cb8a0ef53adbcb5 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php @@ -0,0 +1,17 @@ +raw('=='); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php new file mode 100644 index 0000000000000000000000000000000000000000..b386ae357d54433ab06471100cc6c3664af95029 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php @@ -0,0 +1,24 @@ +raw('(int) floor('); + parent::compile($compiler); + $compiler->raw(')'); + } + + public function operator(Twig_Compiler $compiler) + { + return $compiler->raw('/'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php new file mode 100644 index 0000000000000000000000000000000000000000..52dcb3322cd759f210169d44cf55f2203e0b0496 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php @@ -0,0 +1,17 @@ +raw('>'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php new file mode 100644 index 0000000000000000000000000000000000000000..1d66d6c427001d8001bae3623377eae5e578a98e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php @@ -0,0 +1,17 @@ +raw('>='); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/In.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/In.php new file mode 100644 index 0000000000000000000000000000000000000000..ba44961ac7dba98e1ac62727b2e408ed706ef8ef --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/In.php @@ -0,0 +1,28 @@ +raw('twig_in_filter(') + ->subcompile($this->getNode('left')) + ->raw(', ') + ->subcompile($this->getNode('right')) + ->raw(')') + ; + } + + public function operator(Twig_Compiler $compiler) + { + return $compiler->raw('in'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php new file mode 100644 index 0000000000000000000000000000000000000000..c9d20c4272f96d2b894396f98a9c4c161d630514 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php @@ -0,0 +1,17 @@ +raw('<'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php new file mode 100644 index 0000000000000000000000000000000000000000..219b3bdbf48e531fb5458507d8386854d4917742 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php @@ -0,0 +1,17 @@ +raw('<='); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Matches.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Matches.php new file mode 100644 index 0000000000000000000000000000000000000000..b22debf2fdfd4c09e7d088c189199b2f4a5e1f18 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Matches.php @@ -0,0 +1,28 @@ +raw('preg_match(') + ->subcompile($this->getNode('right')) + ->raw(', ') + ->subcompile($this->getNode('left')) + ->raw(')') + ; + } + + public function operator(Twig_Compiler $compiler) + { + return $compiler->raw(''); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php new file mode 100644 index 0000000000000000000000000000000000000000..c99874ca356b30b3ce738e56707ad11608f0ad24 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php @@ -0,0 +1,18 @@ +raw('%'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php new file mode 100644 index 0000000000000000000000000000000000000000..0d24cee4e3ba46ddc143bae6aa572aa61d8143c3 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php @@ -0,0 +1,18 @@ +raw('*'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php new file mode 100644 index 0000000000000000000000000000000000000000..69eae7e856c40a5b5be217b1905630c2c2742df2 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php @@ -0,0 +1,17 @@ +raw('!='); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php new file mode 100644 index 0000000000000000000000000000000000000000..f276da7d65ef830afe2e9b58f63b7e972088cd0e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php @@ -0,0 +1,28 @@ +raw('!twig_in_filter(') + ->subcompile($this->getNode('left')) + ->raw(', ') + ->subcompile($this->getNode('right')) + ->raw(')') + ; + } + + public function operator(Twig_Compiler $compiler) + { + return $compiler->raw('not in'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Or.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Or.php new file mode 100644 index 0000000000000000000000000000000000000000..7621763ddb3305c7e79d12aede63978929bcddb4 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Or.php @@ -0,0 +1,18 @@ +raw('||'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Power.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Power.php new file mode 100644 index 0000000000000000000000000000000000000000..d3225ded925a44b5102640440934f4e032e34372 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Power.php @@ -0,0 +1,32 @@ += 50600) { + return parent::compile($compiler); + } + + $compiler + ->raw('pow(') + ->subcompile($this->getNode('left')) + ->raw(', ') + ->subcompile($this->getNode('right')) + ->raw(')') + ; + } + + public function operator(Twig_Compiler $compiler) + { + return $compiler->raw('**'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php new file mode 100644 index 0000000000000000000000000000000000000000..4261cdea758a889f3410bdcb2217310c562eb88a --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php @@ -0,0 +1,28 @@ +raw('range(') + ->subcompile($this->getNode('left')) + ->raw(', ') + ->subcompile($this->getNode('right')) + ->raw(')') + ; + } + + public function operator(Twig_Compiler $compiler) + { + return $compiler->raw('..'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php new file mode 100644 index 0000000000000000000000000000000000000000..d1e9a5a7fa4779f3f7f3acdfe49d3a3c91682cdc --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php @@ -0,0 +1,30 @@ +getVarName(); + $right = $compiler->getVarName(); + $compiler + ->raw(sprintf('(is_string($%s = ', $left)) + ->subcompile($this->getNode('left')) + ->raw(sprintf(') && is_string($%s = ', $right)) + ->subcompile($this->getNode('right')) + ->raw(sprintf(') && (\'\' === $%2$s || 0 === strpos($%1$s, $%2$s)))', $left, $right)) + ; + } + + public function operator(Twig_Compiler $compiler) + { + return $compiler->raw(''); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php new file mode 100644 index 0000000000000000000000000000000000000000..b423d3eefe672eaea2c8421068d52fe27d2c75a2 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php @@ -0,0 +1,18 @@ +raw('-'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php b/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php new file mode 100644 index 0000000000000000000000000000000000000000..056d99185c9a2df023110273fd89c2859386e1b2 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php @@ -0,0 +1,91 @@ + + */ +class Twig_Node_Expression_BlockReference extends Twig_Node_Expression +{ + /** + * @param Twig_Node|null $template + */ + public function __construct(Twig_NodeInterface $name, $template = null, $lineno, $tag = null) + { + if (is_bool($template)) { + @trigger_error(sprintf('The %s method "$asString" argument is deprecated since version 1.28 and will be removed in 2.0.', __METHOD__), E_USER_DEPRECATED); + + $template = null; + } + + $nodes = array('name' => $name); + if (null !== $template) { + $nodes['template'] = $template; + } + + parent::__construct($nodes, array('is_defined_test' => false, 'output' => false), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + if ($this->getAttribute('is_defined_test')) { + $this->compileTemplateCall($compiler, 'hasBlock'); + } else { + if ($this->getAttribute('output')) { + $compiler->addDebugInfo($this); + + $this + ->compileTemplateCall($compiler, 'displayBlock') + ->raw(";\n"); + } else { + $this->compileTemplateCall($compiler, 'renderBlock'); + } + } + } + + private function compileTemplateCall(Twig_Compiler $compiler, $method) + { + if (!$this->hasNode('template')) { + $compiler->write('$this'); + } else { + $compiler + ->write('$this->loadTemplate(') + ->subcompile($this->getNode('template')) + ->raw(', ') + ->repr($this->getTemplateName()) + ->raw(', ') + ->repr($this->getTemplateLine()) + ->raw(')') + ; + } + + $compiler->raw(sprintf('->%s', $method)); + $this->compileBlockArguments($compiler); + + return $compiler; + } + + private function compileBlockArguments(Twig_Compiler $compiler) + { + $compiler + ->raw('(') + ->subcompile($this->getNode('name')) + ->raw(', $context'); + + if (!$this->hasNode('template')) { + $compiler->raw(', $blocks'); + } + + return $compiler->raw(')'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Call.php b/vendor/twig/twig/lib/Twig/Node/Expression/Call.php new file mode 100644 index 0000000000000000000000000000000000000000..277679724c02958ba7e2af542cdef256ae95a1cf --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Call.php @@ -0,0 +1,289 @@ +hasAttribute('callable') && $callable = $this->getAttribute('callable')) { + if (is_string($callable) && false === strpos($callable, '::')) { + $compiler->raw($callable); + } else { + list($r, $callable) = $this->reflectCallable($callable); + if ($r instanceof ReflectionMethod && is_string($callable[0])) { + if ($r->isStatic()) { + $compiler->raw(sprintf('%s::%s', $callable[0], $callable[1])); + } else { + $compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s', $callable[0], $callable[1])); + } + } elseif ($r instanceof ReflectionMethod && $callable[0] instanceof Twig_ExtensionInterface) { + $compiler->raw(sprintf('$this->env->getExtension(\'%s\')->%s', get_class($callable[0]), $callable[1])); + } else { + $type = ucfirst($this->getAttribute('type')); + $compiler->raw(sprintf('call_user_func_array($this->env->get%s(\'%s\')->getCallable(), array', $type, $this->getAttribute('name'))); + $closingParenthesis = true; + } + } + } else { + $compiler->raw($this->getAttribute('thing')->compile()); + } + + $this->compileArguments($compiler); + + if ($closingParenthesis) { + $compiler->raw(')'); + } + } + + protected function compileArguments(Twig_Compiler $compiler) + { + $compiler->raw('('); + + $first = true; + + if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) { + $compiler->raw('$this->env'); + $first = false; + } + + if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) { + if (!$first) { + $compiler->raw(', '); + } + $compiler->raw('$context'); + $first = false; + } + + if ($this->hasAttribute('arguments')) { + foreach ($this->getAttribute('arguments') as $argument) { + if (!$first) { + $compiler->raw(', '); + } + $compiler->string($argument); + $first = false; + } + } + + if ($this->hasNode('node')) { + if (!$first) { + $compiler->raw(', '); + } + $compiler->subcompile($this->getNode('node')); + $first = false; + } + + if ($this->hasNode('arguments')) { + $callable = $this->hasAttribute('callable') ? $this->getAttribute('callable') : null; + + $arguments = $this->getArguments($callable, $this->getNode('arguments')); + + foreach ($arguments as $node) { + if (!$first) { + $compiler->raw(', '); + } + $compiler->subcompile($node); + $first = false; + } + } + + $compiler->raw(')'); + } + + protected function getArguments($callable, $arguments) + { + $callType = $this->getAttribute('type'); + $callName = $this->getAttribute('name'); + + $parameters = array(); + $named = false; + foreach ($arguments as $name => $node) { + if (!is_int($name)) { + $named = true; + $name = $this->normalizeName($name); + } elseif ($named) { + throw new Twig_Error_Syntax(sprintf('Positional arguments cannot be used after named arguments for %s "%s".', $callType, $callName)); + } + + $parameters[$name] = $node; + } + + $isVariadic = $this->hasAttribute('is_variadic') && $this->getAttribute('is_variadic'); + if (!$named && !$isVariadic) { + return $parameters; + } + + if (!$callable) { + if ($named) { + $message = sprintf('Named arguments are not supported for %s "%s".', $callType, $callName); + } else { + $message = sprintf('Arbitrary positional arguments are not supported for %s "%s".', $callType, $callName); + } + + throw new LogicException($message); + } + + $callableParameters = $this->getCallableParameters($callable, $isVariadic); + $arguments = array(); + $names = array(); + $missingArguments = array(); + $optionalArguments = array(); + $pos = 0; + foreach ($callableParameters as $callableParameter) { + $names[] = $name = $this->normalizeName($callableParameter->name); + + if (array_key_exists($name, $parameters)) { + if (array_key_exists($pos, $parameters)) { + throw new Twig_Error_Syntax(sprintf('Argument "%s" is defined twice for %s "%s".', $name, $callType, $callName)); + } + + if (count($missingArguments)) { + throw new Twig_Error_Syntax(sprintf( + 'Argument "%s" could not be assigned for %s "%s(%s)" because it is mapped to an internal PHP function which cannot determine default value for optional argument%s "%s".', + $name, $callType, $callName, implode(', ', $names), count($missingArguments) > 1 ? 's' : '', implode('", "', $missingArguments)) + ); + } + + $arguments = array_merge($arguments, $optionalArguments); + $arguments[] = $parameters[$name]; + unset($parameters[$name]); + $optionalArguments = array(); + } elseif (array_key_exists($pos, $parameters)) { + $arguments = array_merge($arguments, $optionalArguments); + $arguments[] = $parameters[$pos]; + unset($parameters[$pos]); + $optionalArguments = array(); + ++$pos; + } elseif ($callableParameter->isDefaultValueAvailable()) { + $optionalArguments[] = new Twig_Node_Expression_Constant($callableParameter->getDefaultValue(), -1); + } elseif ($callableParameter->isOptional()) { + if (empty($parameters)) { + break; + } else { + $missingArguments[] = $name; + } + } else { + throw new Twig_Error_Syntax(sprintf('Value for argument "%s" is required for %s "%s".', $name, $callType, $callName)); + } + } + + if ($isVariadic) { + $arbitraryArguments = new Twig_Node_Expression_Array(array(), -1); + foreach ($parameters as $key => $value) { + if (is_int($key)) { + $arbitraryArguments->addElement($value); + } else { + $arbitraryArguments->addElement($value, new Twig_Node_Expression_Constant($key, -1)); + } + unset($parameters[$key]); + } + + if ($arbitraryArguments->count()) { + $arguments = array_merge($arguments, $optionalArguments); + $arguments[] = $arbitraryArguments; + } + } + + if (!empty($parameters)) { + $unknownParameter = null; + foreach ($parameters as $parameter) { + if ($parameter instanceof Twig_Node) { + $unknownParameter = $parameter; + break; + } + } + + throw new Twig_Error_Syntax(sprintf( + 'Unknown argument%s "%s" for %s "%s(%s)".', + count($parameters) > 1 ? 's' : '', implode('", "', array_keys($parameters)), $callType, $callName, implode(', ', $names) + ), $unknownParameter ? $unknownParameter->getTemplateLine() : -1); + } + + return $arguments; + } + + protected function normalizeName($name) + { + return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), $name)); + } + + private function getCallableParameters($callable, $isVariadic) + { + list($r) = $this->reflectCallable($callable); + if (null === $r) { + return array(); + } + + $parameters = $r->getParameters(); + if ($this->hasNode('node')) { + array_shift($parameters); + } + if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) { + array_shift($parameters); + } + if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) { + array_shift($parameters); + } + if ($this->hasAttribute('arguments') && null !== $this->getAttribute('arguments')) { + foreach ($this->getAttribute('arguments') as $argument) { + array_shift($parameters); + } + } + if ($isVariadic) { + $argument = end($parameters); + if ($argument && $argument->isArray() && $argument->isDefaultValueAvailable() && array() === $argument->getDefaultValue()) { + array_pop($parameters); + } else { + $callableName = $r->name; + if ($r instanceof ReflectionMethod) { + $callableName = $r->getDeclaringClass()->name.'::'.$callableName; + } + + throw new LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = array()".', $callableName, $this->getAttribute('type'), $this->getAttribute('name'))); + } + } + + return $parameters; + } + + private function reflectCallable($callable) + { + if (null !== $this->reflector) { + return $this->reflector; + } + + if (is_array($callable)) { + if (!method_exists($callable[0], $callable[1])) { + // __call() + return array(null, array()); + } + $r = new ReflectionMethod($callable[0], $callable[1]); + } elseif (is_object($callable) && !$callable instanceof Closure) { + $r = new ReflectionObject($callable); + $r = $r->getMethod('__invoke'); + $callable = array($callable, '__invoke'); + } elseif (is_string($callable) && false !== $pos = strpos($callable, '::')) { + $class = substr($callable, 0, $pos); + $method = substr($callable, $pos + 2); + if (!method_exists($class, $method)) { + // __staticCall() + return array(null, array()); + } + $r = new ReflectionMethod($callable); + $callable = array($class, $method); + } else { + $r = new ReflectionFunction($callable); + } + + return $this->reflector = array($r, $callable); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php b/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php new file mode 100644 index 0000000000000000000000000000000000000000..67cca1fd256be08517088613dc9729d0809a2203 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php @@ -0,0 +1,31 @@ + $expr1, 'expr2' => $expr2, 'expr3' => $expr3), array(), $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->raw('((') + ->subcompile($this->getNode('expr1')) + ->raw(') ? (') + ->subcompile($this->getNode('expr2')) + ->raw(') : (') + ->subcompile($this->getNode('expr3')) + ->raw('))') + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php b/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php new file mode 100644 index 0000000000000000000000000000000000000000..1a2c5964fbdc3ff578921acdcb1f8b12f15d69b5 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php @@ -0,0 +1,23 @@ + $value), $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->repr($this->getAttribute('value')); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php b/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php new file mode 100644 index 0000000000000000000000000000000000000000..114b5cd975ff23f5f701e91be17052ed29700094 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php @@ -0,0 +1,32 @@ + + * + * @deprecated since 1.23 and will be removed in 2.0. + */ +class Twig_Node_Expression_ExtensionReference extends Twig_Node_Expression +{ + public function __construct($name, $lineno, $tag = null) + { + parent::__construct(array(), array('name' => $name), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->raw(sprintf("\$this->env->getExtension('%s')", $this->getAttribute('name'))); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php b/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php new file mode 100644 index 0000000000000000000000000000000000000000..a8fa847a8146e8e3921d083e163c8a1eccddfa94 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php @@ -0,0 +1,39 @@ + $node, 'filter' => $filterName, 'arguments' => $arguments), array(), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $name = $this->getNode('filter')->getAttribute('value'); + $filter = $compiler->getEnvironment()->getFilter($name); + + $this->setAttribute('name', $name); + $this->setAttribute('type', 'filter'); + $this->setAttribute('thing', $filter); + $this->setAttribute('needs_environment', $filter->needsEnvironment()); + $this->setAttribute('needs_context', $filter->needsContext()); + $this->setAttribute('arguments', $filter->getArguments()); + if ($filter instanceof Twig_FilterCallableInterface || $filter instanceof Twig_SimpleFilter) { + $this->setAttribute('callable', $filter->getCallable()); + } + if ($filter instanceof Twig_SimpleFilter) { + $this->setAttribute('is_variadic', $filter->isVariadic()); + } + + $this->compileCallable($compiler); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php b/vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php new file mode 100644 index 0000000000000000000000000000000000000000..d32d86d340b1998328f2cffe29df2290181c695f --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php @@ -0,0 +1,43 @@ + + * {{ var.foo|default('foo item on var is not defined') }} + * + * + * @author Fabien Potencier + */ +class Twig_Node_Expression_Filter_Default extends Twig_Node_Expression_Filter +{ + public function __construct(Twig_NodeInterface $node, Twig_Node_Expression_Constant $filterName, Twig_NodeInterface $arguments, $lineno, $tag = null) + { + $default = new Twig_Node_Expression_Filter($node, new Twig_Node_Expression_Constant('default', $node->getTemplateLine()), $arguments, $node->getTemplateLine()); + + if ('default' === $filterName->getAttribute('value') && ($node instanceof Twig_Node_Expression_Name || $node instanceof Twig_Node_Expression_GetAttr)) { + $test = new Twig_Node_Expression_Test_Defined(clone $node, 'defined', new Twig_Node(), $node->getTemplateLine()); + $false = count($arguments) ? $arguments->getNode(0) : new Twig_Node_Expression_Constant('', $node->getTemplateLine()); + + $node = new Twig_Node_Expression_Conditional($test, $default, $false, $node->getTemplateLine()); + } else { + $node = $default; + } + + parent::__construct($node, $filterName, $arguments, $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->subcompile($this->getNode('node')); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Function.php b/vendor/twig/twig/lib/Twig/Node/Expression/Function.php new file mode 100644 index 0000000000000000000000000000000000000000..eaad56ec0757e95ee7c359147804c44be56befd1 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Function.php @@ -0,0 +1,43 @@ + $arguments), array('name' => $name, 'is_defined_test' => false), $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + $name = $this->getAttribute('name'); + $function = $compiler->getEnvironment()->getFunction($name); + + $this->setAttribute('name', $name); + $this->setAttribute('type', 'function'); + $this->setAttribute('thing', $function); + $this->setAttribute('needs_environment', $function->needsEnvironment()); + $this->setAttribute('needs_context', $function->needsContext()); + $this->setAttribute('arguments', $function->getArguments()); + if ($function instanceof Twig_FunctionCallableInterface || $function instanceof Twig_SimpleFunction) { + $callable = $function->getCallable(); + if ('constant' === $name && $this->getAttribute('is_defined_test')) { + $callable = 'twig_constant_is_defined'; + } + + $this->setAttribute('callable', $callable); + } + if ($function instanceof Twig_SimpleFunction) { + $this->setAttribute('is_variadic', $function->isVariadic()); + } + + $this->compileCallable($compiler); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php b/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php new file mode 100644 index 0000000000000000000000000000000000000000..75814265c9a5219545ac54c1c672719cc503cf78 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php @@ -0,0 +1,72 @@ + $node, 'attribute' => $attribute); + if (null !== $arguments) { + $nodes['arguments'] = $arguments; + } + + parent::__construct($nodes, array('type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'disable_c_ext' => false), $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + if ($this->getAttribute('disable_c_ext')) { + @trigger_error(sprintf('Using the "disable_c_ext" attribute on %s is deprecated since version 1.30 and will be removed in 2.0.', __CLASS__), E_USER_DEPRECATED); + } + + if (function_exists('twig_template_get_attributes') && !$this->getAttribute('disable_c_ext')) { + $compiler->raw('twig_template_get_attributes($this, '); + } else { + $compiler->raw('$this->getAttribute('); + } + + if ($this->getAttribute('ignore_strict_check')) { + $this->getNode('node')->setAttribute('ignore_strict_check', true); + } + + $compiler->subcompile($this->getNode('node')); + + $compiler->raw(', ')->subcompile($this->getNode('attribute')); + + // only generate optional arguments when needed (to make generated code more readable) + $needFourth = $this->getAttribute('ignore_strict_check'); + $needThird = $needFourth || $this->getAttribute('is_defined_test'); + $needSecond = $needThird || Twig_Template::ANY_CALL !== $this->getAttribute('type'); + $needFirst = $needSecond || $this->hasNode('arguments'); + + if ($needFirst) { + if ($this->hasNode('arguments')) { + $compiler->raw(', ')->subcompile($this->getNode('arguments')); + } else { + $compiler->raw(', array()'); + } + } + + if ($needSecond) { + $compiler->raw(', ')->repr($this->getAttribute('type')); + } + + if ($needThird) { + $compiler->raw(', ')->repr($this->getAttribute('is_defined_test')); + } + + if ($needFourth) { + $compiler->raw(', ')->repr($this->getAttribute('ignore_strict_check')); + } + + $compiler->raw(')'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php b/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php new file mode 100644 index 0000000000000000000000000000000000000000..39481337b975c4572add0f098cd2cdb1e7839e8a --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php @@ -0,0 +1,41 @@ + $node, 'arguments' => $arguments), array('method' => $method, 'safe' => false), $lineno); + + if ($node instanceof Twig_Node_Expression_Name) { + $node->setAttribute('always_defined', true); + } + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->subcompile($this->getNode('node')) + ->raw('->') + ->raw($this->getAttribute('method')) + ->raw('(') + ; + $first = true; + foreach ($this->getNode('arguments')->getKeyValuePairs() as $pair) { + if (!$first) { + $compiler->raw(', '); + } + $first = false; + + $compiler->subcompile($pair['value']); + } + $compiler->raw(')'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Name.php b/vendor/twig/twig/lib/Twig/Node/Expression/Name.php new file mode 100644 index 0000000000000000000000000000000000000000..e03ca35784d6dab8a6f557822dc0e342f495703d --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Name.php @@ -0,0 +1,100 @@ + '$this', + '_context' => '$context', + '_charset' => '$this->env->getCharset()', + ); + + public function __construct($name, $lineno) + { + parent::__construct(array(), array('name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false, 'always_defined' => false), $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + $name = $this->getAttribute('name'); + + $compiler->addDebugInfo($this); + + if ($this->getAttribute('is_defined_test')) { + if ($this->isSpecial()) { + $compiler->repr(true); + } else { + $compiler->raw('array_key_exists(')->repr($name)->raw(', $context)'); + } + } elseif ($this->isSpecial()) { + $compiler->raw($this->specialVars[$name]); + } elseif ($this->getAttribute('always_defined')) { + $compiler + ->raw('$context[') + ->string($name) + ->raw(']') + ; + } else { + if (PHP_VERSION_ID >= 70000) { + // use PHP 7 null coalescing operator + $compiler + ->raw('($context[') + ->string($name) + ->raw('] ?? ') + ; + + if ($this->getAttribute('ignore_strict_check') || !$compiler->getEnvironment()->isStrictVariables()) { + $compiler->raw('null)'); + } else { + $compiler->raw('$this->getContext($context, ')->string($name)->raw('))'); + } + } elseif (PHP_VERSION_ID >= 50400) { + // PHP 5.4 ternary operator performance was optimized + $compiler + ->raw('(isset($context[') + ->string($name) + ->raw(']) ? $context[') + ->string($name) + ->raw('] : ') + ; + + if ($this->getAttribute('ignore_strict_check') || !$compiler->getEnvironment()->isStrictVariables()) { + $compiler->raw('null)'); + } else { + $compiler->raw('$this->getContext($context, ')->string($name)->raw('))'); + } + } else { + $compiler + ->raw('$this->getContext($context, ') + ->string($name) + ; + + if ($this->getAttribute('ignore_strict_check')) { + $compiler->raw(', true'); + } + + $compiler + ->raw(')') + ; + } + } + } + + public function isSpecial() + { + return isset($this->specialVars[$this->getAttribute('name')]); + } + + public function isSimple() + { + return !$this->isSpecial() && !$this->getAttribute('is_defined_test'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php b/vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php new file mode 100644 index 0000000000000000000000000000000000000000..14f6358fdae1f5a6d59f9192c7789d78f69e53e8 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php @@ -0,0 +1,46 @@ +getTemplateLine()), + new Twig_Node_Expression_Unary_Not(new Twig_Node_Expression_Test_Null($left, 'null', new Twig_Node(), $left->getTemplateLine()), $left->getTemplateLine()), + $left->getTemplateLine() + ); + + parent::__construct($test, $left, $right, $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + /* + * This optimizes only one case. PHP 7 also supports more complex expressions + * that can return null. So, for instance, if log is defined, log("foo") ?? "..." works, + * but log($a["foo"]) ?? "..." does not if $a["foo"] is not defined. More advanced + * cases might be implemented as an optimizer node visitor, but has not been done + * as benefits are probably not worth the added complexity. + */ + if (PHP_VERSION_ID >= 70000 && $this->getNode('expr2') instanceof Twig_Node_Expression_Name) { + $this->getNode('expr2')->setAttribute('always_defined', true); + $compiler + ->raw('((') + ->subcompile($this->getNode('expr2')) + ->raw(') ?? (') + ->subcompile($this->getNode('expr3')) + ->raw('))') + ; + } else { + parent::compile($compiler); + } + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php b/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php new file mode 100644 index 0000000000000000000000000000000000000000..e7d82d81c22305023ceb2b070c0dc25dbe537261 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php @@ -0,0 +1,42 @@ + + */ +class Twig_Node_Expression_Parent extends Twig_Node_Expression +{ + public function __construct($name, $lineno, $tag = null) + { + parent::__construct(array(), array('output' => false, 'name' => $name), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + if ($this->getAttribute('output')) { + $compiler + ->addDebugInfo($this) + ->write('$this->displayParentBlock(') + ->string($this->getAttribute('name')) + ->raw(", \$context, \$blocks);\n") + ; + } else { + $compiler + ->raw('$this->renderParentBlock(') + ->string($this->getAttribute('name')) + ->raw(', $context, $blocks)') + ; + } + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php b/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php new file mode 100644 index 0000000000000000000000000000000000000000..09a04a3195135615cc786fb9831852e02cc0fef5 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php @@ -0,0 +1,26 @@ + $name), $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->raw('$_') + ->raw($this->getAttribute('name')) + ->raw('_') + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test.php new file mode 100644 index 0000000000000000000000000000000000000000..3dfe4f195f12513d836ecd11fb635fae4fc05e1f --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test.php @@ -0,0 +1,40 @@ + $node); + if (null !== $arguments) { + $nodes['arguments'] = $arguments; + } + + parent::__construct($nodes, array('name' => $name), $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + $name = $this->getAttribute('name'); + $test = $compiler->getEnvironment()->getTest($name); + + $this->setAttribute('name', $name); + $this->setAttribute('type', 'test'); + $this->setAttribute('thing', $test); + if ($test instanceof Twig_TestCallableInterface || $test instanceof Twig_SimpleTest) { + $this->setAttribute('callable', $test->getCallable()); + } + if ($test instanceof Twig_SimpleTest) { + $this->setAttribute('is_variadic', $test->isVariadic()); + } + + $this->compileCallable($compiler); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Constant.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Constant.php new file mode 100644 index 0000000000000000000000000000000000000000..ffde3488c10d11f393ca58bfc899be4d806dee8c --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Constant.php @@ -0,0 +1,46 @@ + + * {% if post.status is constant('Post::PUBLISHED') %} + * the status attribute is exactly the same as Post::PUBLISHED + * {% endif %} + * + * + * @author Fabien Potencier + */ +class Twig_Node_Expression_Test_Constant extends Twig_Node_Expression_Test +{ + public function compile(Twig_Compiler $compiler) + { + $compiler + ->raw('(') + ->subcompile($this->getNode('node')) + ->raw(' === constant(') + ; + + if ($this->getNode('arguments')->hasNode(1)) { + $compiler + ->raw('get_class(') + ->subcompile($this->getNode('arguments')->getNode(1)) + ->raw(')."::".') + ; + } + + $compiler + ->subcompile($this->getNode('arguments')->getNode(0)) + ->raw('))') + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php new file mode 100644 index 0000000000000000000000000000000000000000..31cd987cda32c799315df3981d5d9ec59c09334f --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php @@ -0,0 +1,59 @@ + + * {# defined works with variable names and variable attributes #} + * {% if foo is defined %} + * {# ... #} + * {% endif %} + * + * + * @author Fabien Potencier + */ +class Twig_Node_Expression_Test_Defined extends Twig_Node_Expression_Test +{ + public function __construct(Twig_NodeInterface $node, $name, Twig_NodeInterface $arguments = null, $lineno) + { + if ($node instanceof Twig_Node_Expression_Name) { + $node->setAttribute('is_defined_test', true); + } elseif ($node instanceof Twig_Node_Expression_GetAttr) { + $node->setAttribute('is_defined_test', true); + $this->changeIgnoreStrictCheck($node); + } elseif ($node instanceof Twig_Node_Expression_BlockReference) { + $node->setAttribute('is_defined_test', true); + } elseif ($node instanceof Twig_Node_Expression_Function && 'constant' === $node->getAttribute('name')) { + $node->setAttribute('is_defined_test', true); + } elseif ($node instanceof Twig_Node_Expression_Constant || $node instanceof Twig_Node_Expression_Array) { + $node = new Twig_Node_Expression_Constant(true, $node->getTemplateLine()); + } else { + throw new Twig_Error_Syntax('The "defined" test only works with simple variables.', $this->getTemplateLine()); + } + + parent::__construct($node, $name, $arguments, $lineno); + } + + protected function changeIgnoreStrictCheck(Twig_Node_Expression_GetAttr $node) + { + $node->setAttribute('ignore_strict_check', true); + + if ($node->getNode('node') instanceof Twig_Node_Expression_GetAttr) { + $this->changeIgnoreStrictCheck($node->getNode('node')); + } + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->subcompile($this->getNode('node')); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php new file mode 100644 index 0000000000000000000000000000000000000000..0d6bdb49e7fef643f919769280aadaec0ef08dde --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php @@ -0,0 +1,33 @@ + + * {% if loop.index is divisible by(3) %} + * + * + * @author Fabien Potencier + */ +class Twig_Node_Expression_Test_Divisibleby extends Twig_Node_Expression_Test +{ + public function compile(Twig_Compiler $compiler) + { + $compiler + ->raw('(0 == ') + ->subcompile($this->getNode('node')) + ->raw(' % ') + ->subcompile($this->getNode('arguments')->getNode(0)) + ->raw(')') + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Even.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Even.php new file mode 100644 index 0000000000000000000000000000000000000000..fe42e627db1b11569eb74b3e2a1b558381f9d9d7 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Even.php @@ -0,0 +1,32 @@ + + * {{ var is even }} + * + * + * @author Fabien Potencier + */ +class Twig_Node_Expression_Test_Even extends Twig_Node_Expression_Test +{ + public function compile(Twig_Compiler $compiler) + { + $compiler + ->raw('(') + ->subcompile($this->getNode('node')) + ->raw(' % 2 == 0') + ->raw(')') + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Null.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Null.php new file mode 100644 index 0000000000000000000000000000000000000000..934d83561a548a00064d74fdf81ce453c4d5a81c --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Null.php @@ -0,0 +1,31 @@ + + * {{ var is none }} + * + * + * @author Fabien Potencier + */ +class Twig_Node_Expression_Test_Null extends Twig_Node_Expression_Test +{ + public function compile(Twig_Compiler $compiler) + { + $compiler + ->raw('(null === ') + ->subcompile($this->getNode('node')) + ->raw(')') + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php new file mode 100644 index 0000000000000000000000000000000000000000..4f16029a29009a6158dc280dea0ef014089741ea --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php @@ -0,0 +1,32 @@ + + * {{ var is odd }} + * + * + * @author Fabien Potencier + */ +class Twig_Node_Expression_Test_Odd extends Twig_Node_Expression_Test +{ + public function compile(Twig_Compiler $compiler) + { + $compiler + ->raw('(') + ->subcompile($this->getNode('node')) + ->raw(' % 2 == 1') + ->raw(')') + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php new file mode 100644 index 0000000000000000000000000000000000000000..abc2f5bebe3f897d4624bdbe50a7bec1a8e198aa --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php @@ -0,0 +1,29 @@ + + */ +class Twig_Node_Expression_Test_Sameas extends Twig_Node_Expression_Test +{ + public function compile(Twig_Compiler $compiler) + { + $compiler + ->raw('(') + ->subcompile($this->getNode('node')) + ->raw(' === ') + ->subcompile($this->getNode('arguments')->getNode(0)) + ->raw(')') + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php b/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php new file mode 100644 index 0000000000000000000000000000000000000000..0ea2c2c32e606889466f7f21e27160cea760c398 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php @@ -0,0 +1,27 @@ + $node), array(), $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->raw(' '); + $this->operator($compiler); + $compiler->subcompile($this->getNode('node')); + } + + abstract public function operator(Twig_Compiler $compiler); +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php b/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php new file mode 100644 index 0000000000000000000000000000000000000000..ca3ef8f32278a5c123759ed567924449a395574e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php @@ -0,0 +1,18 @@ +raw('-'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Not.php b/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Not.php new file mode 100644 index 0000000000000000000000000000000000000000..a5e4f198f27913bf80fffce66e840a5d3c741c25 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Not.php @@ -0,0 +1,18 @@ +raw('!'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php b/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php new file mode 100644 index 0000000000000000000000000000000000000000..5497532bc4c0bd1ce975cb69f21cec60f9a4bb0d --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php @@ -0,0 +1,18 @@ +raw('+'); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Flush.php b/vendor/twig/twig/lib/Twig/Node/Flush.php new file mode 100644 index 0000000000000000000000000000000000000000..cd4be411ea07ed3d87919a1c319a0087276705fc --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Flush.php @@ -0,0 +1,31 @@ + + */ +class Twig_Node_Flush extends Twig_Node +{ + public function __construct($lineno, $tag) + { + parent::__construct(array(), array(), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write("flush();\n") + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/For.php b/vendor/twig/twig/lib/Twig/Node/For.php new file mode 100644 index 0000000000000000000000000000000000000000..f93d9c812dc9d1492b458d0ef10ef093008cb797 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/For.php @@ -0,0 +1,111 @@ + + */ +class Twig_Node_For extends Twig_Node +{ + protected $loop; + + public function __construct(Twig_Node_Expression_AssignName $keyTarget, Twig_Node_Expression_AssignName $valueTarget, Twig_Node_Expression $seq, Twig_Node_Expression $ifexpr = null, Twig_NodeInterface $body, Twig_NodeInterface $else = null, $lineno, $tag = null) + { + $body = new Twig_Node(array($body, $this->loop = new Twig_Node_ForLoop($lineno, $tag))); + + if (null !== $ifexpr) { + $body = new Twig_Node_If(new Twig_Node(array($ifexpr, $body)), null, $lineno, $tag); + } + + $nodes = array('key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body); + if (null !== $else) { + $nodes['else'] = $else; + } + + parent::__construct($nodes, array('with_loop' => true, 'ifexpr' => null !== $ifexpr), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write("\$context['_parent'] = \$context;\n") + ->write("\$context['_seq'] = twig_ensure_traversable(") + ->subcompile($this->getNode('seq')) + ->raw(");\n") + ; + + if ($this->hasNode('else')) { + $compiler->write("\$context['_iterated'] = false;\n"); + } + + if ($this->getAttribute('with_loop')) { + $compiler + ->write("\$context['loop'] = array(\n") + ->write(" 'parent' => \$context['_parent'],\n") + ->write(" 'index0' => 0,\n") + ->write(" 'index' => 1,\n") + ->write(" 'first' => true,\n") + ->write(");\n") + ; + + if (!$this->getAttribute('ifexpr')) { + $compiler + ->write("if (is_array(\$context['_seq']) || (is_object(\$context['_seq']) && \$context['_seq'] instanceof Countable)) {\n") + ->indent() + ->write("\$length = count(\$context['_seq']);\n") + ->write("\$context['loop']['revindex0'] = \$length - 1;\n") + ->write("\$context['loop']['revindex'] = \$length;\n") + ->write("\$context['loop']['length'] = \$length;\n") + ->write("\$context['loop']['last'] = 1 === \$length;\n") + ->outdent() + ->write("}\n") + ; + } + } + + $this->loop->setAttribute('else', $this->hasNode('else')); + $this->loop->setAttribute('with_loop', $this->getAttribute('with_loop')); + $this->loop->setAttribute('ifexpr', $this->getAttribute('ifexpr')); + + $compiler + ->write("foreach (\$context['_seq'] as ") + ->subcompile($this->getNode('key_target')) + ->raw(' => ') + ->subcompile($this->getNode('value_target')) + ->raw(") {\n") + ->indent() + ->subcompile($this->getNode('body')) + ->outdent() + ->write("}\n") + ; + + if ($this->hasNode('else')) { + $compiler + ->write("if (!\$context['_iterated']) {\n") + ->indent() + ->subcompile($this->getNode('else')) + ->outdent() + ->write("}\n") + ; + } + + $compiler->write("\$_parent = \$context['_parent'];\n"); + + // remove some "private" loop variables (needed for nested loops) + $compiler->write('unset($context[\'_seq\'], $context[\'_iterated\'], $context[\''.$this->getNode('key_target')->getAttribute('name').'\'], $context[\''.$this->getNode('value_target')->getAttribute('name').'\'], $context[\'_parent\'], $context[\'loop\']);'."\n"); + + // keep the values set in the inner context for variables defined in the outer context + $compiler->write("\$context = array_intersect_key(\$context, \$_parent) + \$_parent;\n"); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/ForLoop.php b/vendor/twig/twig/lib/Twig/Node/ForLoop.php new file mode 100644 index 0000000000000000000000000000000000000000..ab0215e6bb187dd1f123fe21dc6fc1460958ec7e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/ForLoop.php @@ -0,0 +1,50 @@ + + */ +class Twig_Node_ForLoop extends Twig_Node +{ + public function __construct($lineno, $tag = null) + { + parent::__construct(array(), array('with_loop' => false, 'ifexpr' => false, 'else' => false), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + if ($this->getAttribute('else')) { + $compiler->write("\$context['_iterated'] = true;\n"); + } + + if ($this->getAttribute('with_loop')) { + $compiler + ->write("++\$context['loop']['index0'];\n") + ->write("++\$context['loop']['index'];\n") + ->write("\$context['loop']['first'] = false;\n") + ; + + if (!$this->getAttribute('ifexpr')) { + $compiler + ->write("if (isset(\$context['loop']['length'])) {\n") + ->indent() + ->write("--\$context['loop']['revindex0'];\n") + ->write("--\$context['loop']['revindex'];\n") + ->write("\$context['loop']['last'] = 0 === \$context['loop']['revindex0'];\n") + ->outdent() + ->write("}\n") + ; + } + } + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/If.php b/vendor/twig/twig/lib/Twig/Node/If.php new file mode 100644 index 0000000000000000000000000000000000000000..9cd78f47148efce53edbafaf09430685d1212d4e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/If.php @@ -0,0 +1,66 @@ + + */ +class Twig_Node_If extends Twig_Node +{ + public function __construct(Twig_NodeInterface $tests, Twig_NodeInterface $else = null, $lineno, $tag = null) + { + $nodes = array('tests' => $tests); + if (null !== $else) { + $nodes['else'] = $else; + } + + parent::__construct($nodes, array(), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->addDebugInfo($this); + for ($i = 0, $count = count($this->getNode('tests')); $i < $count; $i += 2) { + if ($i > 0) { + $compiler + ->outdent() + ->write('} elseif (') + ; + } else { + $compiler + ->write('if (') + ; + } + + $compiler + ->subcompile($this->getNode('tests')->getNode($i)) + ->raw(") {\n") + ->indent() + ->subcompile($this->getNode('tests')->getNode($i + 1)) + ; + } + + if ($this->hasNode('else')) { + $compiler + ->outdent() + ->write("} else {\n") + ->indent() + ->subcompile($this->getNode('else')) + ; + } + + $compiler + ->outdent() + ->write("}\n"); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Import.php b/vendor/twig/twig/lib/Twig/Node/Import.php new file mode 100644 index 0000000000000000000000000000000000000000..759bb5c3e4a645cc048f021104956eab03dc650c --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Import.php @@ -0,0 +1,49 @@ + + */ +class Twig_Node_Import extends Twig_Node +{ + public function __construct(Twig_Node_Expression $expr, Twig_Node_Expression $var, $lineno, $tag = null) + { + parent::__construct(array('expr' => $expr, 'var' => $var), array(), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write('') + ->subcompile($this->getNode('var')) + ->raw(' = ') + ; + + if ($this->getNode('expr') instanceof Twig_Node_Expression_Name && '_self' === $this->getNode('expr')->getAttribute('name')) { + $compiler->raw('$this'); + } else { + $compiler + ->raw('$this->loadTemplate(') + ->subcompile($this->getNode('expr')) + ->raw(', ') + ->repr($this->getTemplateName()) + ->raw(', ') + ->repr($this->getTemplateLine()) + ->raw(')') + ; + } + + $compiler->raw(";\n"); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Include.php b/vendor/twig/twig/lib/Twig/Node/Include.php new file mode 100644 index 0000000000000000000000000000000000000000..15a27ca6010a74617f459216c5513a5701488f3b --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Include.php @@ -0,0 +1,88 @@ + + */ +class Twig_Node_Include extends Twig_Node implements Twig_NodeOutputInterface +{ + public function __construct(Twig_Node_Expression $expr, Twig_Node_Expression $variables = null, $only = false, $ignoreMissing = false, $lineno, $tag = null) + { + $nodes = array('expr' => $expr); + if (null !== $variables) { + $nodes['variables'] = $variables; + } + + parent::__construct($nodes, array('only' => (bool) $only, 'ignore_missing' => (bool) $ignoreMissing), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->addDebugInfo($this); + + if ($this->getAttribute('ignore_missing')) { + $compiler + ->write("try {\n") + ->indent() + ; + } + + $this->addGetTemplate($compiler); + + $compiler->raw('->display('); + + $this->addTemplateArguments($compiler); + + $compiler->raw(");\n"); + + if ($this->getAttribute('ignore_missing')) { + $compiler + ->outdent() + ->write("} catch (Twig_Error_Loader \$e) {\n") + ->indent() + ->write("// ignore missing template\n") + ->outdent() + ->write("}\n\n") + ; + } + } + + protected function addGetTemplate(Twig_Compiler $compiler) + { + $compiler + ->write('$this->loadTemplate(') + ->subcompile($this->getNode('expr')) + ->raw(', ') + ->repr($this->getTemplateName()) + ->raw(', ') + ->repr($this->getTemplateLine()) + ->raw(')') + ; + } + + protected function addTemplateArguments(Twig_Compiler $compiler) + { + if (!$this->hasNode('variables')) { + $compiler->raw(false === $this->getAttribute('only') ? '$context' : 'array()'); + } elseif (false === $this->getAttribute('only')) { + $compiler + ->raw('array_merge($context, ') + ->subcompile($this->getNode('variables')) + ->raw(')') + ; + } else { + $compiler->subcompile($this->getNode('variables')); + } + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Macro.php b/vendor/twig/twig/lib/Twig/Node/Macro.php new file mode 100644 index 0000000000000000000000000000000000000000..e9e1421aa3f4db4c9a266c7c3f05712997015a0e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Macro.php @@ -0,0 +1,123 @@ + + */ +class Twig_Node_Macro extends Twig_Node +{ + const VARARGS_NAME = 'varargs'; + + public function __construct($name, Twig_NodeInterface $body, Twig_NodeInterface $arguments, $lineno, $tag = null) + { + foreach ($arguments as $argumentName => $argument) { + if (self::VARARGS_NAME === $argumentName) { + throw new Twig_Error_Syntax(sprintf('The argument "%s" in macro "%s" cannot be defined because the variable "%s" is reserved for arbitrary arguments.', self::VARARGS_NAME, $name, self::VARARGS_NAME), $argument->getTemplateLine()); + } + } + + parent::__construct(array('body' => $body, 'arguments' => $arguments), array('name' => $name), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write(sprintf('public function get%s(', $this->getAttribute('name'))) + ; + + $count = count($this->getNode('arguments')); + $pos = 0; + foreach ($this->getNode('arguments') as $name => $default) { + $compiler + ->raw('$__'.$name.'__ = ') + ->subcompile($default) + ; + + if (++$pos < $count) { + $compiler->raw(', '); + } + } + + if (PHP_VERSION_ID >= 50600) { + if ($count) { + $compiler->raw(', '); + } + + $compiler->raw('...$__varargs__'); + } + + $compiler + ->raw(")\n") + ->write("{\n") + ->indent() + ; + + $compiler + ->write("\$context = \$this->env->mergeGlobals(array(\n") + ->indent() + ; + + foreach ($this->getNode('arguments') as $name => $default) { + $compiler + ->write('') + ->string($name) + ->raw(' => $__'.$name.'__') + ->raw(",\n") + ; + } + + $compiler + ->write('') + ->string(self::VARARGS_NAME) + ->raw(' => ') + ; + + if (PHP_VERSION_ID >= 50600) { + $compiler->raw("\$__varargs__,\n"); + } else { + $compiler + ->raw('func_num_args() > ') + ->repr($count) + ->raw(' ? array_slice(func_get_args(), ') + ->repr($count) + ->raw(") : array(),\n") + ; + } + + $compiler + ->outdent() + ->write("));\n\n") + ->write("\$blocks = array();\n\n") + ->write("ob_start();\n") + ->write("try {\n") + ->indent() + ->subcompile($this->getNode('body')) + ->outdent() + ->write("} catch (Exception \$e) {\n") + ->indent() + ->write("ob_end_clean();\n\n") + ->write("throw \$e;\n") + ->outdent() + ->write("} catch (Throwable \$e) {\n") + ->indent() + ->write("ob_end_clean();\n\n") + ->write("throw \$e;\n") + ->outdent() + ->write("}\n\n") + ->write("return ('' === \$tmp = ob_get_clean()) ? '' : new Twig_Markup(\$tmp, \$this->env->getCharset());\n") + ->outdent() + ->write("}\n\n") + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Module.php b/vendor/twig/twig/lib/Twig/Node/Module.php new file mode 100644 index 0000000000000000000000000000000000000000..5bfcc92305362b779ff0f9c6ab0c16351dc437ce --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Module.php @@ -0,0 +1,459 @@ + + */ +class Twig_Node_Module extends Twig_Node +{ + private $source; + + public function __construct(Twig_NodeInterface $body, Twig_Node_Expression $parent = null, Twig_NodeInterface $blocks, Twig_NodeInterface $macros, Twig_NodeInterface $traits, $embeddedTemplates, $name, $source = '') + { + if (!$name instanceof Twig_Source) { + @trigger_error(sprintf('Passing a string as the $name argument of %s() is deprecated since version 1.27. Pass a Twig_Source instance instead.', __METHOD__), E_USER_DEPRECATED); + $this->source = new Twig_Source($source, $name); + } else { + $this->source = $name; + } + + $nodes = array( + 'body' => $body, + 'blocks' => $blocks, + 'macros' => $macros, + 'traits' => $traits, + 'display_start' => new Twig_Node(), + 'display_end' => new Twig_Node(), + 'constructor_start' => new Twig_Node(), + 'constructor_end' => new Twig_Node(), + 'class_end' => new Twig_Node(), + ); + if (null !== $parent) { + $nodes['parent'] = $parent; + } + + // embedded templates are set as attributes so that they are only visited once by the visitors + parent::__construct($nodes, array( + // source to be remove in 2.0 + 'source' => $this->source->getCode(), + // filename to be remove in 2.0 (use getTemplateName() instead) + 'filename' => $this->source->getName(), + 'index' => null, + 'embedded_templates' => $embeddedTemplates, + ), 1); + + // populate the template name of all node children + $this->setTemplateName($this->source->getName()); + } + + public function setIndex($index) + { + $this->setAttribute('index', $index); + } + + public function compile(Twig_Compiler $compiler) + { + $this->compileTemplate($compiler); + + foreach ($this->getAttribute('embedded_templates') as $template) { + $compiler->subcompile($template); + } + } + + protected function compileTemplate(Twig_Compiler $compiler) + { + if (!$this->getAttribute('index')) { + $compiler->write('compileClassHeader($compiler); + + if ( + count($this->getNode('blocks')) + || count($this->getNode('traits')) + || !$this->hasNode('parent') + || $this->getNode('parent') instanceof Twig_Node_Expression_Constant + || count($this->getNode('constructor_start')) + || count($this->getNode('constructor_end')) + ) { + $this->compileConstructor($compiler); + } + + $this->compileGetParent($compiler); + + $this->compileDisplay($compiler); + + $compiler->subcompile($this->getNode('blocks')); + + $this->compileMacros($compiler); + + $this->compileGetTemplateName($compiler); + + $this->compileIsTraitable($compiler); + + $this->compileDebugInfo($compiler); + + $this->compileGetSource($compiler); + + $this->compileGetSourceContext($compiler); + + $this->compileClassFooter($compiler); + } + + protected function compileGetParent(Twig_Compiler $compiler) + { + if (!$this->hasNode('parent')) { + return; + } + $parent = $this->getNode('parent'); + + $compiler + ->write("protected function doGetParent(array \$context)\n", "{\n") + ->indent() + ->addDebugInfo($parent) + ->write('return ') + ; + + if ($parent instanceof Twig_Node_Expression_Constant) { + $compiler->subcompile($parent); + } else { + $compiler + ->raw('$this->loadTemplate(') + ->subcompile($parent) + ->raw(', ') + ->repr($this->source->getName()) + ->raw(', ') + ->repr($parent->getTemplateLine()) + ->raw(')') + ; + } + + $compiler + ->raw(";\n") + ->outdent() + ->write("}\n\n") + ; + } + + protected function compileClassHeader(Twig_Compiler $compiler) + { + $compiler + ->write("\n\n") + // if the template name contains */, add a blank to avoid a PHP parse error + ->write('/* '.str_replace('*/', '* /', $this->source->getName())." */\n") + ->write('class '.$compiler->getEnvironment()->getTemplateClass($this->source->getName(), $this->getAttribute('index'))) + ->raw(sprintf(" extends %s\n", $compiler->getEnvironment()->getBaseTemplateClass())) + ->write("{\n") + ->indent() + ; + } + + protected function compileConstructor(Twig_Compiler $compiler) + { + $compiler + ->write("public function __construct(Twig_Environment \$env)\n", "{\n") + ->indent() + ->subcompile($this->getNode('constructor_start')) + ->write("parent::__construct(\$env);\n\n") + ; + + // parent + if (!$this->hasNode('parent')) { + $compiler->write("\$this->parent = false;\n\n"); + } elseif (($parent = $this->getNode('parent')) && $parent instanceof Twig_Node_Expression_Constant) { + $compiler + ->addDebugInfo($parent) + ->write('$this->parent = $this->loadTemplate(') + ->subcompile($parent) + ->raw(', ') + ->repr($this->source->getName()) + ->raw(', ') + ->repr($parent->getTemplateLine()) + ->raw(");\n") + ; + } + + $countTraits = count($this->getNode('traits')); + if ($countTraits) { + // traits + foreach ($this->getNode('traits') as $i => $trait) { + $this->compileLoadTemplate($compiler, $trait->getNode('template'), sprintf('$_trait_%s', $i)); + + $compiler + ->addDebugInfo($trait->getNode('template')) + ->write(sprintf("if (!\$_trait_%s->isTraitable()) {\n", $i)) + ->indent() + ->write("throw new Twig_Error_Runtime('Template \"'.") + ->subcompile($trait->getNode('template')) + ->raw(".'\" cannot be used as a trait.');\n") + ->outdent() + ->write("}\n") + ->write(sprintf("\$_trait_%s_blocks = \$_trait_%s->getBlocks();\n\n", $i, $i)) + ; + + foreach ($trait->getNode('targets') as $key => $value) { + $compiler + ->write(sprintf('if (!isset($_trait_%s_blocks[', $i)) + ->string($key) + ->raw("])) {\n") + ->indent() + ->write("throw new Twig_Error_Runtime(sprintf('Block ") + ->string($key) + ->raw(' is not defined in trait ') + ->subcompile($trait->getNode('template')) + ->raw(".'));\n") + ->outdent() + ->write("}\n\n") + + ->write(sprintf('$_trait_%s_blocks[', $i)) + ->subcompile($value) + ->raw(sprintf('] = $_trait_%s_blocks[', $i)) + ->string($key) + ->raw(sprintf(']; unset($_trait_%s_blocks[', $i)) + ->string($key) + ->raw("]);\n\n") + ; + } + } + + if ($countTraits > 1) { + $compiler + ->write("\$this->traits = array_merge(\n") + ->indent() + ; + + for ($i = 0; $i < $countTraits; ++$i) { + $compiler + ->write(sprintf('$_trait_%s_blocks'.($i == $countTraits - 1 ? '' : ',')."\n", $i)) + ; + } + + $compiler + ->outdent() + ->write(");\n\n") + ; + } else { + $compiler + ->write("\$this->traits = \$_trait_0_blocks;\n\n") + ; + } + + $compiler + ->write("\$this->blocks = array_merge(\n") + ->indent() + ->write("\$this->traits,\n") + ->write("array(\n") + ; + } else { + $compiler + ->write("\$this->blocks = array(\n") + ; + } + + // blocks + $compiler + ->indent() + ; + + foreach ($this->getNode('blocks') as $name => $node) { + $compiler + ->write(sprintf("'%s' => array(\$this, 'block_%s'),\n", $name, $name)) + ; + } + + if ($countTraits) { + $compiler + ->outdent() + ->write(")\n") + ; + } + + $compiler + ->outdent() + ->write(");\n") + ->outdent() + ->subcompile($this->getNode('constructor_end')) + ->write("}\n\n") + ; + } + + protected function compileDisplay(Twig_Compiler $compiler) + { + $compiler + ->write("protected function doDisplay(array \$context, array \$blocks = array())\n", "{\n") + ->indent() + ->subcompile($this->getNode('display_start')) + ->subcompile($this->getNode('body')) + ; + + if ($this->hasNode('parent')) { + $parent = $this->getNode('parent'); + $compiler->addDebugInfo($parent); + if ($parent instanceof Twig_Node_Expression_Constant) { + $compiler->write('$this->parent'); + } else { + $compiler->write('$this->getParent($context)'); + } + $compiler->raw("->display(\$context, array_merge(\$this->blocks, \$blocks));\n"); + } + + $compiler + ->subcompile($this->getNode('display_end')) + ->outdent() + ->write("}\n\n") + ; + } + + protected function compileClassFooter(Twig_Compiler $compiler) + { + $compiler + ->subcompile($this->getNode('class_end')) + ->outdent() + ->write("}\n") + ; + } + + protected function compileMacros(Twig_Compiler $compiler) + { + $compiler->subcompile($this->getNode('macros')); + } + + protected function compileGetTemplateName(Twig_Compiler $compiler) + { + $compiler + ->write("public function getTemplateName()\n", "{\n") + ->indent() + ->write('return ') + ->repr($this->source->getName()) + ->raw(";\n") + ->outdent() + ->write("}\n\n") + ; + } + + protected function compileIsTraitable(Twig_Compiler $compiler) + { + // A template can be used as a trait if: + // * it has no parent + // * it has no macros + // * it has no body + // + // Put another way, a template can be used as a trait if it + // only contains blocks and use statements. + $traitable = !$this->hasNode('parent') && 0 === count($this->getNode('macros')); + if ($traitable) { + if ($this->getNode('body') instanceof Twig_Node_Body) { + $nodes = $this->getNode('body')->getNode(0); + } else { + $nodes = $this->getNode('body'); + } + + if (!count($nodes)) { + $nodes = new Twig_Node(array($nodes)); + } + + foreach ($nodes as $node) { + if (!count($node)) { + continue; + } + + if ($node instanceof Twig_Node_Text && ctype_space($node->getAttribute('data'))) { + continue; + } + + if ($node instanceof Twig_Node_BlockReference) { + continue; + } + + $traitable = false; + break; + } + } + + if ($traitable) { + return; + } + + $compiler + ->write("public function isTraitable()\n", "{\n") + ->indent() + ->write(sprintf("return %s;\n", $traitable ? 'true' : 'false')) + ->outdent() + ->write("}\n\n") + ; + } + + protected function compileDebugInfo(Twig_Compiler $compiler) + { + $compiler + ->write("public function getDebugInfo()\n", "{\n") + ->indent() + ->write(sprintf("return %s;\n", str_replace("\n", '', var_export(array_reverse($compiler->getDebugInfo(), true), true)))) + ->outdent() + ->write("}\n\n") + ; + } + + protected function compileGetSource(Twig_Compiler $compiler) + { + $compiler + ->write("/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */\n") + ->write("public function getSource()\n", "{\n") + ->indent() + ->write("@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);\n\n") + ->write('return $this->getSourceContext()->getCode();') + ->raw("\n") + ->outdent() + ->write("}\n\n") + ; + } + + protected function compileGetSourceContext(Twig_Compiler $compiler) + { + $compiler + ->write("public function getSourceContext()\n", "{\n") + ->indent() + ->write('return new Twig_Source(') + ->string($compiler->getEnvironment()->isDebug() ? $this->source->getCode() : '') + ->raw(', ') + ->string($this->source->getName()) + ->raw(', ') + ->string($this->source->getPath()) + ->raw(");\n") + ->outdent() + ->write("}\n") + ; + } + + protected function compileLoadTemplate(Twig_Compiler $compiler, $node, $var) + { + if ($node instanceof Twig_Node_Expression_Constant) { + $compiler + ->write(sprintf('%s = $this->loadTemplate(', $var)) + ->subcompile($node) + ->raw(', ') + ->repr($node->getTemplateName()) + ->raw(', ') + ->repr($node->getTemplateLine()) + ->raw(");\n") + ; + } else { + throw new LogicException('Trait templates can only be constant nodes.'); + } + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Print.php b/vendor/twig/twig/lib/Twig/Node/Print.php new file mode 100644 index 0000000000000000000000000000000000000000..9e317c84efcd7ceb28ef399b348281213340279b --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Print.php @@ -0,0 +1,34 @@ + + */ +class Twig_Node_Print extends Twig_Node implements Twig_NodeOutputInterface +{ + public function __construct(Twig_Node_Expression $expr, $lineno, $tag = null) + { + parent::__construct(array('expr' => $expr), array(), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write('echo ') + ->subcompile($this->getNode('expr')) + ->raw(";\n") + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Sandbox.php b/vendor/twig/twig/lib/Twig/Node/Sandbox.php new file mode 100644 index 0000000000000000000000000000000000000000..658e068e14143aa0cef3e1ea622c17ad5a696c03 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Sandbox.php @@ -0,0 +1,42 @@ + + */ +class Twig_Node_Sandbox extends Twig_Node +{ + public function __construct(Twig_NodeInterface $body, $lineno, $tag = null) + { + parent::__construct(array('body' => $body), array(), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write("\$sandbox = \$this->env->getExtension('Twig_Extension_Sandbox');\n") + ->write("if (!\$alreadySandboxed = \$sandbox->isSandboxed()) {\n") + ->indent() + ->write("\$sandbox->enableSandbox();\n") + ->outdent() + ->write("}\n") + ->subcompile($this->getNode('body')) + ->write("if (!\$alreadySandboxed) {\n") + ->indent() + ->write("\$sandbox->disableSandbox();\n") + ->outdent() + ->write("}\n") + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php b/vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php new file mode 100644 index 0000000000000000000000000000000000000000..fba0051ba1d12edada660d170d9302f3e4029001 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php @@ -0,0 +1,49 @@ + + */ +class Twig_Node_SandboxedPrint extends Twig_Node_Print +{ + public function compile(Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write('echo $this->env->getExtension(\'Twig_Extension_Sandbox\')->ensureToStringAllowed(') + ->subcompile($this->getNode('expr')) + ->raw(");\n") + ; + } + + /** + * Removes node filters. + * + * This is mostly needed when another visitor adds filters (like the escaper one). + * + * @return Twig_Node + */ + protected function removeNodeFilter(Twig_Node $node) + { + if ($node instanceof Twig_Node_Expression_Filter) { + return $this->removeNodeFilter($node->getNode('node')); + } + + return $node; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Set.php b/vendor/twig/twig/lib/Twig/Node/Set.php new file mode 100644 index 0000000000000000000000000000000000000000..36e05ccadd13bd6c408ef46a9c68fc8107500e1a --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Set.php @@ -0,0 +1,96 @@ + + */ +class Twig_Node_Set extends Twig_Node implements Twig_NodeCaptureInterface +{ + public function __construct($capture, Twig_NodeInterface $names, Twig_NodeInterface $values, $lineno, $tag = null) + { + parent::__construct(array('names' => $names, 'values' => $values), array('capture' => $capture, 'safe' => false), $lineno, $tag); + + /* + * Optimizes the node when capture is used for a large block of text. + * + * {% set foo %}foo{% endset %} is compiled to $context['foo'] = new Twig_Markup("foo"); + */ + if ($this->getAttribute('capture')) { + $this->setAttribute('safe', true); + + $values = $this->getNode('values'); + if ($values instanceof Twig_Node_Text) { + $this->setNode('values', new Twig_Node_Expression_Constant($values->getAttribute('data'), $values->getTemplateLine())); + $this->setAttribute('capture', false); + } + } + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->addDebugInfo($this); + + if (count($this->getNode('names')) > 1) { + $compiler->write('list('); + foreach ($this->getNode('names') as $idx => $node) { + if ($idx) { + $compiler->raw(', '); + } + + $compiler->subcompile($node); + } + $compiler->raw(')'); + } else { + if ($this->getAttribute('capture')) { + $compiler + ->write("ob_start();\n") + ->subcompile($this->getNode('values')) + ; + } + + $compiler->subcompile($this->getNode('names'), false); + + if ($this->getAttribute('capture')) { + $compiler->raw(" = ('' === \$tmp = ob_get_clean()) ? '' : new Twig_Markup(\$tmp, \$this->env->getCharset())"); + } + } + + if (!$this->getAttribute('capture')) { + $compiler->raw(' = '); + + if (count($this->getNode('names')) > 1) { + $compiler->write('array('); + foreach ($this->getNode('values') as $idx => $value) { + if ($idx) { + $compiler->raw(', '); + } + + $compiler->subcompile($value); + } + $compiler->raw(')'); + } else { + if ($this->getAttribute('safe')) { + $compiler + ->raw("('' === \$tmp = ") + ->subcompile($this->getNode('values')) + ->raw(") ? '' : new Twig_Markup(\$tmp, \$this->env->getCharset())") + ; + } else { + $compiler->subcompile($this->getNode('values')); + } + } + } + + $compiler->raw(";\n"); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/SetTemp.php b/vendor/twig/twig/lib/Twig/Node/SetTemp.php new file mode 100644 index 0000000000000000000000000000000000000000..0f43c7d317449b9f74c3036eb4fff1553442770b --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/SetTemp.php @@ -0,0 +1,35 @@ + $name), $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + $name = $this->getAttribute('name'); + $compiler + ->addDebugInfo($this) + ->write('if (isset($context[') + ->string($name) + ->raw('])) { $_') + ->raw($name) + ->raw('_ = $context[') + ->repr($name) + ->raw(']; } else { $_') + ->raw($name) + ->raw("_ = null; }\n") + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Spaceless.php b/vendor/twig/twig/lib/Twig/Node/Spaceless.php new file mode 100644 index 0000000000000000000000000000000000000000..00419e2603a5fd9afbd2b88e7d7010d2f1606a2f --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Spaceless.php @@ -0,0 +1,35 @@ + + */ +class Twig_Node_Spaceless extends Twig_Node +{ + public function __construct(Twig_NodeInterface $body, $lineno, $tag = 'spaceless') + { + parent::__construct(array('body' => $body), array(), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write("ob_start();\n") + ->subcompile($this->getNode('body')) + ->write("echo trim(preg_replace('/>\s+<', ob_get_clean()));\n") + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Text.php b/vendor/twig/twig/lib/Twig/Node/Text.php new file mode 100644 index 0000000000000000000000000000000000000000..2c013cd76f53940c71e8dc162ed6d19286b11dc4 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Text.php @@ -0,0 +1,34 @@ + + */ +class Twig_Node_Text extends Twig_Node implements Twig_NodeOutputInterface +{ + public function __construct($data, $lineno) + { + parent::__construct(array(), array('data' => $data), $lineno); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->addDebugInfo($this) + ->write('echo ') + ->string($this->getAttribute('data')) + ->raw(";\n") + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/With.php b/vendor/twig/twig/lib/Twig/Node/With.php new file mode 100644 index 0000000000000000000000000000000000000000..4978f375b25946d57394adec4763db54485e5a8a --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/With.php @@ -0,0 +1,62 @@ + + */ +class Twig_Node_With extends Twig_Node +{ + public function __construct(Twig_Node $body, Twig_Node $variables = null, $only = false, $lineno, $tag = null) + { + $nodes = array('body' => $body); + if (null !== $variables) { + $nodes['variables'] = $variables; + } + + parent::__construct($nodes, array('only' => (bool) $only), $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->addDebugInfo($this); + + if ($this->hasNode('variables')) { + $varsName = $compiler->getVarName(); + $compiler + ->write(sprintf('$%s = ', $varsName)) + ->subcompile($this->getNode('variables')) + ->raw(";\n") + ->write(sprintf("if (!is_array(\$%s)) {\n", $varsName)) + ->indent() + ->write("throw new Twig_Error_Runtime('Variables passed to the \"with\" tag must be a hash.');\n") + ->outdent() + ->write("}\n") + ; + + if ($this->getAttribute('only')) { + $compiler->write("\$context = array('_parent' => \$context);\n"); + } else { + $compiler->write("\$context['_parent'] = \$context;\n"); + } + + $compiler->write(sprintf("\$context = array_merge(\$context, \$%s);\n", $varsName)); + } else { + $compiler->write("\$context['_parent'] = \$context;\n"); + } + + $compiler + ->subcompile($this->getNode('body')) + ->write("\$context = \$context['_parent'];\n") + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/NodeCaptureInterface.php b/vendor/twig/twig/lib/Twig/NodeCaptureInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..97ffb6af28295cddda79711c676e7f868714cfbb --- /dev/null +++ b/vendor/twig/twig/lib/Twig/NodeCaptureInterface.php @@ -0,0 +1,19 @@ + + */ +interface Twig_NodeCaptureInterface +{ +} diff --git a/vendor/twig/twig/lib/Twig/NodeInterface.php b/vendor/twig/twig/lib/Twig/NodeInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..78e758bd4321d667648552995286201b0aed3647 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/NodeInterface.php @@ -0,0 +1,32 @@ + + * + * @deprecated since 1.12 (to be removed in 3.0) + */ +interface Twig_NodeInterface extends Countable, IteratorAggregate +{ + /** + * Compiles the node to PHP. + */ + public function compile(Twig_Compiler $compiler); + + /** + * @deprecated since 1.27 (to be removed in 2.0) + */ + public function getLine(); + + public function getNodeTag(); +} diff --git a/vendor/twig/twig/lib/Twig/NodeOutputInterface.php b/vendor/twig/twig/lib/Twig/NodeOutputInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e6bbd96432bb469e48b6e2c049753c475d679a78 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/NodeOutputInterface.php @@ -0,0 +1,19 @@ + + */ +interface Twig_NodeOutputInterface +{ +} diff --git a/vendor/twig/twig/lib/Twig/NodeTraverser.php b/vendor/twig/twig/lib/Twig/NodeTraverser.php new file mode 100644 index 0000000000000000000000000000000000000000..353221747affa3308dab345974db64044f12b575 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/NodeTraverser.php @@ -0,0 +1,82 @@ + + */ +class Twig_NodeTraverser +{ + protected $env; + protected $visitors = array(); + + /** + * @param Twig_Environment $env + * @param Twig_NodeVisitorInterface[] $visitors + */ + public function __construct(Twig_Environment $env, array $visitors = array()) + { + $this->env = $env; + foreach ($visitors as $visitor) { + $this->addVisitor($visitor); + } + } + + public function addVisitor(Twig_NodeVisitorInterface $visitor) + { + if (!isset($this->visitors[$visitor->getPriority()])) { + $this->visitors[$visitor->getPriority()] = array(); + } + + $this->visitors[$visitor->getPriority()][] = $visitor; + } + + /** + * Traverses a node and calls the registered visitors. + * + * @return Twig_NodeInterface + */ + public function traverse(Twig_NodeInterface $node) + { + ksort($this->visitors); + foreach ($this->visitors as $visitors) { + foreach ($visitors as $visitor) { + $node = $this->traverseForVisitor($visitor, $node); + } + } + + return $node; + } + + protected function traverseForVisitor(Twig_NodeVisitorInterface $visitor, Twig_NodeInterface $node = null) + { + if (null === $node) { + return; + } + + $node = $visitor->enterNode($node, $this->env); + + foreach ($node as $k => $n) { + if (false !== $n = $this->traverseForVisitor($visitor, $n)) { + $node->setNode($k, $n); + } else { + $node->removeNode($k); + } + } + + return $visitor->leaveNode($node, $this->env); + } +} diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php b/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php new file mode 100644 index 0000000000000000000000000000000000000000..7169f6f67c3813e02013e71940df5422dd41c3ed --- /dev/null +++ b/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php @@ -0,0 +1,152 @@ + + */ +class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor +{ + protected $statusStack = array(); + protected $blocks = array(); + protected $safeAnalysis; + protected $traverser; + protected $defaultStrategy = false; + protected $safeVars = array(); + + public function __construct() + { + $this->safeAnalysis = new Twig_NodeVisitor_SafeAnalysis(); + } + + protected function doEnterNode(Twig_Node $node, Twig_Environment $env) + { + if ($node instanceof Twig_Node_Module) { + if ($env->hasExtension('Twig_Extension_Escaper') && $defaultStrategy = $env->getExtension('Twig_Extension_Escaper')->getDefaultStrategy($node->getTemplateName())) { + $this->defaultStrategy = $defaultStrategy; + } + $this->safeVars = array(); + $this->blocks = array(); + } elseif ($node instanceof Twig_Node_AutoEscape) { + $this->statusStack[] = $node->getAttribute('value'); + } elseif ($node instanceof Twig_Node_Block) { + $this->statusStack[] = isset($this->blocks[$node->getAttribute('name')]) ? $this->blocks[$node->getAttribute('name')] : $this->needEscaping($env); + } elseif ($node instanceof Twig_Node_Import) { + $this->safeVars[] = $node->getNode('var')->getAttribute('name'); + } + + return $node; + } + + protected function doLeaveNode(Twig_Node $node, Twig_Environment $env) + { + if ($node instanceof Twig_Node_Module) { + $this->defaultStrategy = false; + $this->safeVars = array(); + $this->blocks = array(); + } elseif ($node instanceof Twig_Node_Expression_Filter) { + return $this->preEscapeFilterNode($node, $env); + } elseif ($node instanceof Twig_Node_Print) { + return $this->escapePrintNode($node, $env, $this->needEscaping($env)); + } + + if ($node instanceof Twig_Node_AutoEscape || $node instanceof Twig_Node_Block) { + array_pop($this->statusStack); + } elseif ($node instanceof Twig_Node_BlockReference) { + $this->blocks[$node->getAttribute('name')] = $this->needEscaping($env); + } + + return $node; + } + + protected function escapePrintNode(Twig_Node_Print $node, Twig_Environment $env, $type) + { + if (false === $type) { + return $node; + } + + $expression = $node->getNode('expr'); + + if ($this->isSafeFor($type, $expression, $env)) { + return $node; + } + + $class = get_class($node); + + return new $class( + $this->getEscaperFilter($type, $expression), + $node->getTemplateLine() + ); + } + + protected function preEscapeFilterNode(Twig_Node_Expression_Filter $filter, Twig_Environment $env) + { + $name = $filter->getNode('filter')->getAttribute('value'); + + $type = $env->getFilter($name)->getPreEscape(); + if (null === $type) { + return $filter; + } + + $node = $filter->getNode('node'); + if ($this->isSafeFor($type, $node, $env)) { + return $filter; + } + + $filter->setNode('node', $this->getEscaperFilter($type, $node)); + + return $filter; + } + + protected function isSafeFor($type, Twig_NodeInterface $expression, $env) + { + $safe = $this->safeAnalysis->getSafe($expression); + + if (null === $safe) { + if (null === $this->traverser) { + $this->traverser = new Twig_NodeTraverser($env, array($this->safeAnalysis)); + } + + $this->safeAnalysis->setSafeVars($this->safeVars); + + $this->traverser->traverse($expression); + $safe = $this->safeAnalysis->getSafe($expression); + } + + return in_array($type, $safe) || in_array('all', $safe); + } + + protected function needEscaping(Twig_Environment $env) + { + if (count($this->statusStack)) { + return $this->statusStack[count($this->statusStack) - 1]; + } + + return $this->defaultStrategy ? $this->defaultStrategy : false; + } + + protected function getEscaperFilter($type, Twig_NodeInterface $node) + { + $line = $node->getTemplateLine(); + $name = new Twig_Node_Expression_Constant('escape', $line); + $args = new Twig_Node(array(new Twig_Node_Expression_Constant((string) $type, $line), new Twig_Node_Expression_Constant(null, $line), new Twig_Node_Expression_Constant(true, $line))); + + return new Twig_Node_Expression_Filter($node, $name, $args, $line); + } + + public function getPriority() + { + return 0; + } +} diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php b/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php new file mode 100644 index 0000000000000000000000000000000000000000..43453c4dc2b3d3eb196f3a9e8b55bcce304a1980 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php @@ -0,0 +1,251 @@ + + */ +class Twig_NodeVisitor_Optimizer extends Twig_BaseNodeVisitor +{ + const OPTIMIZE_ALL = -1; + const OPTIMIZE_NONE = 0; + const OPTIMIZE_FOR = 2; + const OPTIMIZE_RAW_FILTER = 4; + const OPTIMIZE_VAR_ACCESS = 8; + + protected $loops = array(); + protected $loopsTargets = array(); + protected $optimizers; + protected $prependedNodes = array(); + protected $inABody = false; + + /** + * @param int $optimizers The optimizer mode + */ + public function __construct($optimizers = -1) + { + if (!is_int($optimizers) || $optimizers > (self::OPTIMIZE_FOR | self::OPTIMIZE_RAW_FILTER | self::OPTIMIZE_VAR_ACCESS)) { + throw new InvalidArgumentException(sprintf('Optimizer mode "%s" is not valid.', $optimizers)); + } + + $this->optimizers = $optimizers; + } + + protected function doEnterNode(Twig_Node $node, Twig_Environment $env) + { + if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) { + $this->enterOptimizeFor($node, $env); + } + + if (PHP_VERSION_ID < 50400 && self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('Twig_Extension_Sandbox')) { + if ($this->inABody) { + if (!$node instanceof Twig_Node_Expression) { + if (get_class($node) !== 'Twig_Node') { + array_unshift($this->prependedNodes, array()); + } + } else { + $node = $this->optimizeVariables($node, $env); + } + } elseif ($node instanceof Twig_Node_Body) { + $this->inABody = true; + } + } + + return $node; + } + + protected function doLeaveNode(Twig_Node $node, Twig_Environment $env) + { + $expression = $node instanceof Twig_Node_Expression; + + if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) { + $this->leaveOptimizeFor($node, $env); + } + + if (self::OPTIMIZE_RAW_FILTER === (self::OPTIMIZE_RAW_FILTER & $this->optimizers)) { + $node = $this->optimizeRawFilter($node, $env); + } + + $node = $this->optimizePrintNode($node, $env); + + if (self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('Twig_Extension_Sandbox')) { + if ($node instanceof Twig_Node_Body) { + $this->inABody = false; + } elseif ($this->inABody) { + if (!$expression && get_class($node) !== 'Twig_Node' && $prependedNodes = array_shift($this->prependedNodes)) { + $nodes = array(); + foreach (array_unique($prependedNodes) as $name) { + $nodes[] = new Twig_Node_SetTemp($name, $node->getTemplateLine()); + } + + $nodes[] = $node; + $node = new Twig_Node($nodes); + } + } + } + + return $node; + } + + protected function optimizeVariables(Twig_NodeInterface $node, Twig_Environment $env) + { + if ('Twig_Node_Expression_Name' === get_class($node) && $node->isSimple()) { + $this->prependedNodes[0][] = $node->getAttribute('name'); + + return new Twig_Node_Expression_TempName($node->getAttribute('name'), $node->getTemplateLine()); + } + + return $node; + } + + /** + * Optimizes print nodes. + * + * It replaces: + * + * * "echo $this->render(Parent)Block()" with "$this->display(Parent)Block()" + * + * @return Twig_NodeInterface + */ + protected function optimizePrintNode(Twig_NodeInterface $node, Twig_Environment $env) + { + if (!$node instanceof Twig_Node_Print) { + return $node; + } + + $exprNode = $node->getNode('expr'); + if ( + $exprNode instanceof Twig_Node_Expression_BlockReference || + $exprNode instanceof Twig_Node_Expression_Parent + ) { + $exprNode->setAttribute('output', true); + + return $exprNode; + } + + return $node; + } + + /** + * Removes "raw" filters. + * + * @return Twig_NodeInterface + */ + protected function optimizeRawFilter(Twig_NodeInterface $node, Twig_Environment $env) + { + if ($node instanceof Twig_Node_Expression_Filter && 'raw' == $node->getNode('filter')->getAttribute('value')) { + return $node->getNode('node'); + } + + return $node; + } + + /** + * Optimizes "for" tag by removing the "loop" variable creation whenever possible. + */ + protected function enterOptimizeFor(Twig_NodeInterface $node, Twig_Environment $env) + { + if ($node instanceof Twig_Node_For) { + // disable the loop variable by default + $node->setAttribute('with_loop', false); + array_unshift($this->loops, $node); + array_unshift($this->loopsTargets, $node->getNode('value_target')->getAttribute('name')); + array_unshift($this->loopsTargets, $node->getNode('key_target')->getAttribute('name')); + } elseif (!$this->loops) { + // we are outside a loop + return; + } + + // when do we need to add the loop variable back? + + // the loop variable is referenced for the current loop + elseif ($node instanceof Twig_Node_Expression_Name && 'loop' === $node->getAttribute('name')) { + $node->setAttribute('always_defined', true); + $this->addLoopToCurrent(); + } + + // optimize access to loop targets + elseif ($node instanceof Twig_Node_Expression_Name && in_array($node->getAttribute('name'), $this->loopsTargets)) { + $node->setAttribute('always_defined', true); + } + + // block reference + elseif ($node instanceof Twig_Node_BlockReference || $node instanceof Twig_Node_Expression_BlockReference) { + $this->addLoopToCurrent(); + } + + // include without the only attribute + elseif ($node instanceof Twig_Node_Include && !$node->getAttribute('only')) { + $this->addLoopToAll(); + } + + // include function without the with_context=false parameter + elseif ($node instanceof Twig_Node_Expression_Function + && 'include' === $node->getAttribute('name') + && (!$node->getNode('arguments')->hasNode('with_context') + || false !== $node->getNode('arguments')->getNode('with_context')->getAttribute('value') + ) + ) { + $this->addLoopToAll(); + } + + // the loop variable is referenced via an attribute + elseif ($node instanceof Twig_Node_Expression_GetAttr + && (!$node->getNode('attribute') instanceof Twig_Node_Expression_Constant + || 'parent' === $node->getNode('attribute')->getAttribute('value') + ) + && (true === $this->loops[0]->getAttribute('with_loop') + || ($node->getNode('node') instanceof Twig_Node_Expression_Name + && 'loop' === $node->getNode('node')->getAttribute('name') + ) + ) + ) { + $this->addLoopToAll(); + } + } + + /** + * Optimizes "for" tag by removing the "loop" variable creation whenever possible. + */ + protected function leaveOptimizeFor(Twig_NodeInterface $node, Twig_Environment $env) + { + if ($node instanceof Twig_Node_For) { + array_shift($this->loops); + array_shift($this->loopsTargets); + array_shift($this->loopsTargets); + } + } + + protected function addLoopToCurrent() + { + $this->loops[0]->setAttribute('with_loop', true); + } + + protected function addLoopToAll() + { + foreach ($this->loops as $loop) { + $loop->setAttribute('with_loop', true); + } + } + + public function getPriority() + { + return 255; + } +} diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php b/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php new file mode 100644 index 0000000000000000000000000000000000000000..6997f3573e965b4da7b4fc4071ed3d067971b8cb --- /dev/null +++ b/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php @@ -0,0 +1,148 @@ +safeVars = $safeVars; + } + + public function getSafe(Twig_NodeInterface $node) + { + $hash = spl_object_hash($node); + if (!isset($this->data[$hash])) { + return; + } + + foreach ($this->data[$hash] as $bucket) { + if ($bucket['key'] !== $node) { + continue; + } + + if (in_array('html_attr', $bucket['value'])) { + $bucket['value'][] = 'html'; + } + + return $bucket['value']; + } + } + + protected function setSafe(Twig_NodeInterface $node, array $safe) + { + $hash = spl_object_hash($node); + if (isset($this->data[$hash])) { + foreach ($this->data[$hash] as &$bucket) { + if ($bucket['key'] === $node) { + $bucket['value'] = $safe; + + return; + } + } + } + $this->data[$hash][] = array( + 'key' => $node, + 'value' => $safe, + ); + } + + protected function doEnterNode(Twig_Node $node, Twig_Environment $env) + { + return $node; + } + + protected function doLeaveNode(Twig_Node $node, Twig_Environment $env) + { + if ($node instanceof Twig_Node_Expression_Constant) { + // constants are marked safe for all + $this->setSafe($node, array('all')); + } elseif ($node instanceof Twig_Node_Expression_BlockReference) { + // blocks are safe by definition + $this->setSafe($node, array('all')); + } elseif ($node instanceof Twig_Node_Expression_Parent) { + // parent block is safe by definition + $this->setSafe($node, array('all')); + } elseif ($node instanceof Twig_Node_Expression_Conditional) { + // intersect safeness of both operands + $safe = $this->intersectSafe($this->getSafe($node->getNode('expr2')), $this->getSafe($node->getNode('expr3'))); + $this->setSafe($node, $safe); + } elseif ($node instanceof Twig_Node_Expression_Filter) { + // filter expression is safe when the filter is safe + $name = $node->getNode('filter')->getAttribute('value'); + $args = $node->getNode('arguments'); + if (false !== $filter = $env->getFilter($name)) { + $safe = $filter->getSafe($args); + if (null === $safe) { + $safe = $this->intersectSafe($this->getSafe($node->getNode('node')), $filter->getPreservesSafety()); + } + $this->setSafe($node, $safe); + } else { + $this->setSafe($node, array()); + } + } elseif ($node instanceof Twig_Node_Expression_Function) { + // function expression is safe when the function is safe + $name = $node->getAttribute('name'); + $args = $node->getNode('arguments'); + $function = $env->getFunction($name); + if (false !== $function) { + $this->setSafe($node, $function->getSafe($args)); + } else { + $this->setSafe($node, array()); + } + } elseif ($node instanceof Twig_Node_Expression_MethodCall) { + if ($node->getAttribute('safe')) { + $this->setSafe($node, array('all')); + } else { + $this->setSafe($node, array()); + } + } elseif ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name) { + $name = $node->getNode('node')->getAttribute('name'); + // attributes on template instances are safe + if ('_self' == $name || in_array($name, $this->safeVars)) { + $this->setSafe($node, array('all')); + } else { + $this->setSafe($node, array()); + } + } else { + $this->setSafe($node, array()); + } + + return $node; + } + + protected function intersectSafe(array $a = null, array $b = null) + { + if (null === $a || null === $b) { + return array(); + } + + if (in_array('all', $a)) { + return $b; + } + + if (in_array('all', $b)) { + return $a; + } + + return array_intersect($a, $b); + } + + public function getPriority() + { + return 0; + } +} diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php b/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php new file mode 100644 index 0000000000000000000000000000000000000000..baf00a0342b342baa28eec03b44d1a8b9ab0181f --- /dev/null +++ b/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php @@ -0,0 +1,75 @@ + + */ +class Twig_NodeVisitor_Sandbox extends Twig_BaseNodeVisitor +{ + protected $inAModule = false; + protected $tags; + protected $filters; + protected $functions; + + protected function doEnterNode(Twig_Node $node, Twig_Environment $env) + { + if ($node instanceof Twig_Node_Module) { + $this->inAModule = true; + $this->tags = array(); + $this->filters = array(); + $this->functions = array(); + + return $node; + } elseif ($this->inAModule) { + // look for tags + if ($node->getNodeTag() && !isset($this->tags[$node->getNodeTag()])) { + $this->tags[$node->getNodeTag()] = $node; + } + + // look for filters + if ($node instanceof Twig_Node_Expression_Filter && !isset($this->filters[$node->getNode('filter')->getAttribute('value')])) { + $this->filters[$node->getNode('filter')->getAttribute('value')] = $node; + } + + // look for functions + if ($node instanceof Twig_Node_Expression_Function && !isset($this->functions[$node->getAttribute('name')])) { + $this->functions[$node->getAttribute('name')] = $node; + } + + // wrap print to check __toString() calls + if ($node instanceof Twig_Node_Print) { + return new Twig_Node_SandboxedPrint($node->getNode('expr'), $node->getTemplateLine(), $node->getNodeTag()); + } + } + + return $node; + } + + protected function doLeaveNode(Twig_Node $node, Twig_Environment $env) + { + if ($node instanceof Twig_Node_Module) { + $this->inAModule = false; + + $node->setNode('display_start', new Twig_Node(array(new Twig_Node_CheckSecurity($this->filters, $this->tags, $this->functions), $node->getNode('display_start')))); + } + + return $node; + } + + public function getPriority() + { + return 0; + } +} diff --git a/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php b/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..092d36ae7a9ef89c10f072bd7b718de363e158e5 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php @@ -0,0 +1,41 @@ + + */ +interface Twig_NodeVisitorInterface +{ + /** + * Called before child nodes are visited. + * + * @return Twig_NodeInterface The modified node + */ + public function enterNode(Twig_NodeInterface $node, Twig_Environment $env); + + /** + * Called after child nodes are visited. + * + * @return Twig_NodeInterface|false The modified node or false if the node must be removed + */ + public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env); + + /** + * Returns the priority for this visitor. + * + * Priority should be between -10 and 10 (0 is the default). + * + * @return int The priority level + */ + public function getPriority(); +} diff --git a/vendor/twig/twig/lib/Twig/Parser.php b/vendor/twig/twig/lib/Twig/Parser.php new file mode 100644 index 0000000000000000000000000000000000000000..070f301b1f0aee30f6a0c7f4debe8fbea492dbdc --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Parser.php @@ -0,0 +1,406 @@ + + */ +class Twig_Parser implements Twig_ParserInterface +{ + protected $stack = array(); + protected $stream; + protected $parent; + protected $handlers; + protected $visitors; + protected $expressionParser; + protected $blocks; + protected $blockStack; + protected $macros; + protected $env; + protected $reservedMacroNames; + protected $importedSymbols; + protected $traits; + protected $embeddedTemplates = array(); + + public function __construct(Twig_Environment $env) + { + $this->env = $env; + } + + /** + * @deprecated since 1.27 (to be removed in 2.0) + */ + public function getEnvironment() + { + @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0.', E_USER_DEPRECATED); + + return $this->env; + } + + public function getVarName() + { + return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false)); + } + + /** + * @deprecated since 1.27 (to be removed in 2.0). Use $parser->getStream()->getSourceContext()->getPath() instead. + */ + public function getFilename() + { + @trigger_error(sprintf('The "%s" method is deprecated since version 1.27 and will be removed in 2.0. Use $parser->getStream()->getSourceContext()->getPath() instead.', __METHOD__), E_USER_DEPRECATED); + + return $this->stream->getSourceContext()->getName(); + } + + public function parse(Twig_TokenStream $stream, $test = null, $dropNeedle = false) + { + // push all variables into the stack to keep the current state of the parser + // using get_object_vars() instead of foreach would lead to https://bugs.php.net/71336 + // This hack can be removed when min version if PHP 7.0 + $vars = array(); + foreach ($this as $k => $v) { + $vars[$k] = $v; + } + + unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser'], $vars['reservedMacroNames']); + $this->stack[] = $vars; + + // tag handlers + if (null === $this->handlers) { + $this->handlers = $this->env->getTokenParsers(); + $this->handlers->setParser($this); + } + + // node visitors + if (null === $this->visitors) { + $this->visitors = $this->env->getNodeVisitors(); + } + + if (null === $this->expressionParser) { + $this->expressionParser = new Twig_ExpressionParser($this, $this->env); + } + + $this->stream = $stream; + $this->parent = null; + $this->blocks = array(); + $this->macros = array(); + $this->traits = array(); + $this->blockStack = array(); + $this->importedSymbols = array(array()); + $this->embeddedTemplates = array(); + + try { + $body = $this->subparse($test, $dropNeedle); + + if (null !== $this->parent && null === $body = $this->filterBodyNodes($body)) { + $body = new Twig_Node(); + } + } catch (Twig_Error_Syntax $e) { + if (!$e->getSourceContext()) { + $e->setSourceContext($this->stream->getSourceContext()); + } + + if (!$e->getTemplateLine()) { + $e->setTemplateLine($this->stream->getCurrent()->getLine()); + } + + throw $e; + } + + $node = new Twig_Node_Module(new Twig_Node_Body(array($body)), $this->parent, new Twig_Node($this->blocks), new Twig_Node($this->macros), new Twig_Node($this->traits), $this->embeddedTemplates, $stream->getSourceContext()); + + $traverser = new Twig_NodeTraverser($this->env, $this->visitors); + + $node = $traverser->traverse($node); + + // restore previous stack so previous parse() call can resume working + foreach (array_pop($this->stack) as $key => $val) { + $this->$key = $val; + } + + return $node; + } + + public function subparse($test, $dropNeedle = false) + { + $lineno = $this->getCurrentToken()->getLine(); + $rv = array(); + while (!$this->stream->isEOF()) { + switch ($this->getCurrentToken()->getType()) { + case Twig_Token::TEXT_TYPE: + $token = $this->stream->next(); + $rv[] = new Twig_Node_Text($token->getValue(), $token->getLine()); + break; + + case Twig_Token::VAR_START_TYPE: + $token = $this->stream->next(); + $expr = $this->expressionParser->parseExpression(); + $this->stream->expect(Twig_Token::VAR_END_TYPE); + $rv[] = new Twig_Node_Print($expr, $token->getLine()); + break; + + case Twig_Token::BLOCK_START_TYPE: + $this->stream->next(); + $token = $this->getCurrentToken(); + + if ($token->getType() !== Twig_Token::NAME_TYPE) { + throw new Twig_Error_Syntax('A block must start with a tag name.', $token->getLine(), $this->stream->getSourceContext()); + } + + if (null !== $test && call_user_func($test, $token)) { + if ($dropNeedle) { + $this->stream->next(); + } + + if (1 === count($rv)) { + return $rv[0]; + } + + return new Twig_Node($rv, array(), $lineno); + } + + $subparser = $this->handlers->getTokenParser($token->getValue()); + if (null === $subparser) { + if (null !== $test) { + $e = new Twig_Error_Syntax(sprintf('Unexpected "%s" tag', $token->getValue()), $token->getLine(), $this->stream->getSourceContext()); + + if (is_array($test) && isset($test[0]) && $test[0] instanceof Twig_TokenParserInterface) { + $e->appendMessage(sprintf(' (expecting closing tag for the "%s" tag defined near line %s).', $test[0]->getTag(), $lineno)); + } + } else { + $e = new Twig_Error_Syntax(sprintf('Unknown "%s" tag.', $token->getValue()), $token->getLine(), $this->stream->getSourceContext()); + $e->addSuggestions($token->getValue(), array_keys($this->env->getTags())); + } + + throw $e; + } + + $this->stream->next(); + + $node = $subparser->parse($token); + if (null !== $node) { + $rv[] = $node; + } + break; + + default: + throw new Twig_Error_Syntax('Lexer or parser ended up in unsupported state.', $this->getCurrentToken()->getLine(), $this->stream->getSourceContext()); + } + } + + if (1 === count($rv)) { + return $rv[0]; + } + + return new Twig_Node($rv, array(), $lineno); + } + + /** + * @deprecated since 1.27 (to be removed in 2.0) + */ + public function addHandler($name, $class) + { + @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0.', E_USER_DEPRECATED); + + $this->handlers[$name] = $class; + } + + /** + * @deprecated since 1.27 (to be removed in 2.0) + */ + public function addNodeVisitor(Twig_NodeVisitorInterface $visitor) + { + @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0.', E_USER_DEPRECATED); + + $this->visitors[] = $visitor; + } + + public function getBlockStack() + { + return $this->blockStack; + } + + public function peekBlockStack() + { + return $this->blockStack[count($this->blockStack) - 1]; + } + + public function popBlockStack() + { + array_pop($this->blockStack); + } + + public function pushBlockStack($name) + { + $this->blockStack[] = $name; + } + + public function hasBlock($name) + { + return isset($this->blocks[$name]); + } + + public function getBlock($name) + { + return $this->blocks[$name]; + } + + public function setBlock($name, Twig_Node_Block $value) + { + $this->blocks[$name] = new Twig_Node_Body(array($value), array(), $value->getTemplateLine()); + } + + public function hasMacro($name) + { + return isset($this->macros[$name]); + } + + public function setMacro($name, Twig_Node_Macro $node) + { + if ($this->isReservedMacroName($name)) { + throw new Twig_Error_Syntax(sprintf('"%s" cannot be used as a macro name as it is a reserved keyword.', $name), $node->getTemplateLine(), $this->stream->getSourceContext()); + } + + $this->macros[$name] = $node; + } + + public function isReservedMacroName($name) + { + if (null === $this->reservedMacroNames) { + $this->reservedMacroNames = array(); + $r = new ReflectionClass($this->env->getBaseTemplateClass()); + foreach ($r->getMethods() as $method) { + $methodName = strtolower($method->getName()); + + if ('get' === substr($methodName, 0, 3) && isset($methodName[3])) { + $this->reservedMacroNames[] = substr($methodName, 3); + } + } + } + + return in_array(strtolower($name), $this->reservedMacroNames); + } + + public function addTrait($trait) + { + $this->traits[] = $trait; + } + + public function hasTraits() + { + return count($this->traits) > 0; + } + + public function embedTemplate(Twig_Node_Module $template) + { + $template->setIndex(mt_rand()); + + $this->embeddedTemplates[] = $template; + } + + public function addImportedSymbol($type, $alias, $name = null, Twig_Node_Expression $node = null) + { + $this->importedSymbols[0][$type][$alias] = array('name' => $name, 'node' => $node); + } + + public function getImportedSymbol($type, $alias) + { + foreach ($this->importedSymbols as $functions) { + if (isset($functions[$type][$alias])) { + return $functions[$type][$alias]; + } + } + } + + public function isMainScope() + { + return 1 === count($this->importedSymbols); + } + + public function pushLocalScope() + { + array_unshift($this->importedSymbols, array()); + } + + public function popLocalScope() + { + array_shift($this->importedSymbols); + } + + /** + * @return Twig_ExpressionParser + */ + public function getExpressionParser() + { + return $this->expressionParser; + } + + public function getParent() + { + return $this->parent; + } + + public function setParent($parent) + { + $this->parent = $parent; + } + + /** + * @return Twig_TokenStream + */ + public function getStream() + { + return $this->stream; + } + + /** + * @return Twig_Token + */ + public function getCurrentToken() + { + return $this->stream->getCurrent(); + } + + protected function filterBodyNodes(Twig_NodeInterface $node) + { + // check that the body does not contain non-empty output nodes + if ( + ($node instanceof Twig_Node_Text && !ctype_space($node->getAttribute('data'))) + || + (!$node instanceof Twig_Node_Text && !$node instanceof Twig_Node_BlockReference && $node instanceof Twig_NodeOutputInterface) + ) { + if (false !== strpos((string) $node, chr(0xEF).chr(0xBB).chr(0xBF))) { + throw new Twig_Error_Syntax('A template that extends another one cannot start with a byte order mark (BOM); it must be removed.', $node->getTemplateLine(), $this->stream->getSourceContext()); + } + + throw new Twig_Error_Syntax('A template that extends another one cannot include contents outside Twig blocks. Did you forget to put the contents inside a {% block %} tag?', $node->getTemplateLine(), $this->stream->getSourceContext()); + } + + // bypass nodes that will "capture" the output + if ($node instanceof Twig_NodeCaptureInterface) { + return $node; + } + + if ($node instanceof Twig_NodeOutputInterface) { + return; + } + + foreach ($node as $k => $n) { + if (null !== $n && null === $this->filterBodyNodes($n)) { + $node->removeNode($k); + } + } + + return $node; + } +} diff --git a/vendor/twig/twig/lib/Twig/ParserInterface.php b/vendor/twig/twig/lib/Twig/ParserInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..85c6e67b20ce3ca94d5f4a9f0af85c10698c65b3 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/ParserInterface.php @@ -0,0 +1,29 @@ + + * + * @deprecated since 1.12 (to be removed in 3.0) + */ +interface Twig_ParserInterface +{ + /** + * Converts a token stream to a node tree. + * + * @return Twig_Node_Module + * + * @throws Twig_Error_Syntax When the token stream is syntactically or semantically wrong + */ + public function parse(Twig_TokenStream $stream); +} diff --git a/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php b/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php new file mode 100644 index 0000000000000000000000000000000000000000..6be67edf99419beb4d40091c5bd791686201e587 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php @@ -0,0 +1,70 @@ + + * + * @final + */ +class Twig_Profiler_Dumper_Blackfire +{ + public function dump(Twig_Profiler_Profile $profile) + { + $data = array(); + $this->dumpProfile('main()', $profile, $data); + $this->dumpChildren('main()', $profile, $data); + + $start = microtime(true); + $str = << $values) { + $str .= "{$name}//{$values['ct']} {$values['wt']} {$values['mu']} {$values['pmu']}\n"; + } + + return $str; + } + + private function dumpChildren($parent, Twig_Profiler_Profile $profile, &$data) + { + foreach ($profile as $p) { + if ($p->isTemplate()) { + $name = $p->getTemplate(); + } else { + $name = sprintf('%s::%s(%s)', $p->getTemplate(), $p->getType(), $p->getName()); + } + $this->dumpProfile(sprintf('%s==>%s', $parent, $name), $p, $data); + $this->dumpChildren($name, $p, $data); + } + } + + private function dumpProfile($edge, Twig_Profiler_Profile $profile, &$data) + { + if (isset($data[$edge])) { + $data[$edge]['ct'] += 1; + $data[$edge]['wt'] += floor($profile->getDuration() * 1000000); + $data[$edge]['mu'] += $profile->getMemoryUsage(); + $data[$edge]['pmu'] += $profile->getPeakMemoryUsage(); + } else { + $data[$edge] = array( + 'ct' => 1, + 'wt' => floor($profile->getDuration() * 1000000), + 'mu' => $profile->getMemoryUsage(), + 'pmu' => $profile->getPeakMemoryUsage(), + ); + } + } +} diff --git a/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php b/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php new file mode 100644 index 0000000000000000000000000000000000000000..f0fa406aa016d5b149f0afe748ba38553e8210cb --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php @@ -0,0 +1,45 @@ + + * + * @final + */ +class Twig_Profiler_Dumper_Html extends Twig_Profiler_Dumper_Text +{ + private static $colors = array( + 'block' => '#dfd', + 'macro' => '#ddf', + 'template' => '#ffd', + 'big' => '#d44', + ); + + public function dump(Twig_Profiler_Profile $profile) + { + return '
    '.parent::dump($profile).'
    '; + } + + protected function formatTemplate(Twig_Profiler_Profile $profile, $prefix) + { + return sprintf('%s└ %s', $prefix, self::$colors['template'], $profile->getTemplate()); + } + + protected function formatNonTemplate(Twig_Profiler_Profile $profile, $prefix) + { + return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), isset(self::$colors[$profile->getType()]) ? self::$colors[$profile->getType()] : 'auto', $profile->getName()); + } + + protected function formatTime(Twig_Profiler_Profile $profile, $percent) + { + return sprintf('%.2fms/%.0f%%', $percent > 20 ? self::$colors['big'] : 'auto', $profile->getDuration() * 1000, $percent); + } +} diff --git a/vendor/twig/twig/lib/Twig/Profiler/Dumper/Text.php b/vendor/twig/twig/lib/Twig/Profiler/Dumper/Text.php new file mode 100644 index 0000000000000000000000000000000000000000..c77e691840407b906714410896768861baa1f7b9 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Profiler/Dumper/Text.php @@ -0,0 +1,70 @@ + + * + * @final + */ +class Twig_Profiler_Dumper_Text +{ + private $root; + + public function dump(Twig_Profiler_Profile $profile) + { + return $this->dumpProfile($profile); + } + + protected function formatTemplate(Twig_Profiler_Profile $profile, $prefix) + { + return sprintf('%s└ %s', $prefix, $profile->getTemplate()); + } + + protected function formatNonTemplate(Twig_Profiler_Profile $profile, $prefix) + { + return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), $profile->getName()); + } + + protected function formatTime(Twig_Profiler_Profile $profile, $percent) + { + return sprintf('%.2fms/%.0f%%', $profile->getDuration() * 1000, $percent); + } + + private function dumpProfile(Twig_Profiler_Profile $profile, $prefix = '', $sibling = false) + { + if ($profile->isRoot()) { + $this->root = $profile->getDuration(); + $start = $profile->getName(); + } else { + if ($profile->isTemplate()) { + $start = $this->formatTemplate($profile, $prefix); + } else { + $start = $this->formatNonTemplate($profile, $prefix); + } + $prefix .= $sibling ? '│ ' : ' '; + } + + $percent = $this->root ? $profile->getDuration() / $this->root * 100 : 0; + + if ($profile->getDuration() * 1000 < 1) { + $str = $start."\n"; + } else { + $str = sprintf("%s %s\n", $start, $this->formatTime($profile, $percent)); + } + + $nCount = count($profile->getProfiles()); + foreach ($profile as $i => $p) { + $str .= $this->dumpProfile($p, $prefix, $i + 1 !== $nCount); + } + + return $str; + } +} diff --git a/vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php b/vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php new file mode 100644 index 0000000000000000000000000000000000000000..e10d857e0e9f41cfc8c248993fefafebe93ea8e4 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php @@ -0,0 +1,37 @@ + + */ +class Twig_Profiler_Node_EnterProfile extends Twig_Node +{ + public function __construct($extensionName, $type, $name, $varName) + { + parent::__construct(array(), array('extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName)); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->write(sprintf('$%s = $this->env->getExtension(', $this->getAttribute('var_name'))) + ->repr($this->getAttribute('extension_name')) + ->raw(");\n") + ->write(sprintf('$%s->enter($%s = new Twig_Profiler_Profile($this->getTemplateName(), ', $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof')) + ->repr($this->getAttribute('type')) + ->raw(', ') + ->repr($this->getAttribute('name')) + ->raw("));\n\n") + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php b/vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php new file mode 100644 index 0000000000000000000000000000000000000000..e4d0beb4e317926e5c9bf4bc669783142920618d --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php @@ -0,0 +1,31 @@ + + */ +class Twig_Profiler_Node_LeaveProfile extends Twig_Node +{ + public function __construct($varName) + { + parent::__construct(array(), array('var_name' => $varName)); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler + ->write("\n") + ->write(sprintf("\$%s->leave(\$%s);\n\n", $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof')) + ; + } +} diff --git a/vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php b/vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php new file mode 100644 index 0000000000000000000000000000000000000000..a990474887fb0181bc78e1d6c707c29018960867 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php @@ -0,0 +1,65 @@ + + * + * @final + */ +class Twig_Profiler_NodeVisitor_Profiler extends Twig_BaseNodeVisitor +{ + private $extensionName; + + public function __construct($extensionName) + { + $this->extensionName = $extensionName; + } + + protected function doEnterNode(Twig_Node $node, Twig_Environment $env) + { + return $node; + } + + protected function doLeaveNode(Twig_Node $node, Twig_Environment $env) + { + if ($node instanceof Twig_Node_Module) { + $varName = $this->getVarName(); + $node->setNode('display_start', new Twig_Node(array(new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::TEMPLATE, $node->getTemplateName(), $varName), $node->getNode('display_start')))); + $node->setNode('display_end', new Twig_Node(array(new Twig_Profiler_Node_LeaveProfile($varName), $node->getNode('display_end')))); + } elseif ($node instanceof Twig_Node_Block) { + $varName = $this->getVarName(); + $node->setNode('body', new Twig_Node_Body(array( + new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::BLOCK, $node->getAttribute('name'), $varName), + $node->getNode('body'), + new Twig_Profiler_Node_LeaveProfile($varName), + ))); + } elseif ($node instanceof Twig_Node_Macro) { + $varName = $this->getVarName(); + $node->setNode('body', new Twig_Node_Body(array( + new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::MACRO, $node->getAttribute('name'), $varName), + $node->getNode('body'), + new Twig_Profiler_Node_LeaveProfile($varName), + ))); + } + + return $node; + } + + private function getVarName() + { + return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false)); + } + + public function getPriority() + { + return 0; + } +} diff --git a/vendor/twig/twig/lib/Twig/Profiler/Profile.php b/vendor/twig/twig/lib/Twig/Profiler/Profile.php new file mode 100644 index 0000000000000000000000000000000000000000..9274da28bbb4e7b71505bd5cfa65980dc993b843 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Profiler/Profile.php @@ -0,0 +1,162 @@ + + * + * @final + */ +class Twig_Profiler_Profile implements IteratorAggregate, Serializable +{ + const ROOT = 'ROOT'; + const BLOCK = 'block'; + const TEMPLATE = 'template'; + const MACRO = 'macro'; + + private $template; + private $name; + private $type; + private $starts = array(); + private $ends = array(); + private $profiles = array(); + + public function __construct($template = 'main', $type = self::ROOT, $name = 'main') + { + $this->template = $template; + $this->type = $type; + $this->name = 0 === strpos($name, '__internal_') ? 'INTERNAL' : $name; + $this->enter(); + } + + public function getTemplate() + { + return $this->template; + } + + public function getType() + { + return $this->type; + } + + public function getName() + { + return $this->name; + } + + public function isRoot() + { + return self::ROOT === $this->type; + } + + public function isTemplate() + { + return self::TEMPLATE === $this->type; + } + + public function isBlock() + { + return self::BLOCK === $this->type; + } + + public function isMacro() + { + return self::MACRO === $this->type; + } + + public function getProfiles() + { + return $this->profiles; + } + + public function addProfile(Twig_Profiler_Profile $profile) + { + $this->profiles[] = $profile; + } + + /** + * Returns the duration in microseconds. + * + * @return int + */ + public function getDuration() + { + if ($this->isRoot() && $this->profiles) { + // for the root node with children, duration is the sum of all child durations + $duration = 0; + foreach ($this->profiles as $profile) { + $duration += $profile->getDuration(); + } + + return $duration; + } + + return isset($this->ends['wt']) && isset($this->starts['wt']) ? $this->ends['wt'] - $this->starts['wt'] : 0; + } + + /** + * Returns the memory usage in bytes. + * + * @return int + */ + public function getMemoryUsage() + { + return isset($this->ends['mu']) && isset($this->starts['mu']) ? $this->ends['mu'] - $this->starts['mu'] : 0; + } + + /** + * Returns the peak memory usage in bytes. + * + * @return int + */ + public function getPeakMemoryUsage() + { + return isset($this->ends['pmu']) && isset($this->starts['pmu']) ? $this->ends['pmu'] - $this->starts['pmu'] : 0; + } + + /** + * Starts the profiling. + */ + public function enter() + { + $this->starts = array( + 'wt' => microtime(true), + 'mu' => memory_get_usage(), + 'pmu' => memory_get_peak_usage(), + ); + } + + /** + * Stops the profiling. + */ + public function leave() + { + $this->ends = array( + 'wt' => microtime(true), + 'mu' => memory_get_usage(), + 'pmu' => memory_get_peak_usage(), + ); + } + + public function getIterator() + { + return new ArrayIterator($this->profiles); + } + + public function serialize() + { + return serialize(array($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles)); + } + + public function unserialize($data) + { + list($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles) = unserialize($data); + } +} diff --git a/vendor/twig/twig/lib/Twig/RuntimeLoaderInterface.php b/vendor/twig/twig/lib/Twig/RuntimeLoaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c41f44af9615b1197c53abb027e0fe72f772902c --- /dev/null +++ b/vendor/twig/twig/lib/Twig/RuntimeLoaderInterface.php @@ -0,0 +1,27 @@ + + */ +interface Twig_RuntimeLoaderInterface +{ + /** + * Creates the runtime implementation of a Twig element (filter/function/test). + * + * @param string $class A runtime class + * + * @return object|null The runtime instance or null if the loader does not know how to create the runtime for this class + */ + public function load($class); +} diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityError.php b/vendor/twig/twig/lib/Twig/Sandbox/SecurityError.php new file mode 100644 index 0000000000000000000000000000000000000000..5a4e021d55f3067f2f420fc5e63c6e994080087e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Sandbox/SecurityError.php @@ -0,0 +1,19 @@ + + */ +class Twig_Sandbox_SecurityError extends Twig_Error +{ +} diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php b/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php new file mode 100644 index 0000000000000000000000000000000000000000..1967cf7660f8a941d9f5f85197ee6980ea3a5107 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php @@ -0,0 +1,31 @@ + + */ +class Twig_Sandbox_SecurityNotAllowedFilterError extends Twig_Sandbox_SecurityError +{ + private $filterName; + + public function __construct($message, $functionName, $lineno = -1, $filename = null, Exception $previous = null) + { + parent::__construct($message, $lineno, $filename, $previous); + $this->filterName = $functionName; + } + + public function getFilterName() + { + return $this->filterName; + } +} diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.php b/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.php new file mode 100644 index 0000000000000000000000000000000000000000..79a400f12cec48253b5b7d1341c7072d6b08428d --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.php @@ -0,0 +1,31 @@ + + */ +class Twig_Sandbox_SecurityNotAllowedFunctionError extends Twig_Sandbox_SecurityError +{ + private $functionName; + + public function __construct($message, $functionName, $lineno = -1, $filename = null, Exception $previous = null) + { + parent::__construct($message, $lineno, $filename, $previous); + $this->functionName = $functionName; + } + + public function getFunctionName() + { + return $this->functionName; + } +} diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php b/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php new file mode 100644 index 0000000000000000000000000000000000000000..9e5d4df0491aa6ded378f548898b5ecb5ccc6322 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php @@ -0,0 +1,38 @@ + + */ +class Twig_Sandbox_SecurityNotAllowedMethodError extends Twig_Sandbox_SecurityError +{ + private $className; + private $methodName; + + public function __construct($message, $className, $methodName, $lineno = -1, $filename = null, Exception $previous = null) + { + parent::__construct($message, $lineno, $filename, $previous); + $this->className = $className; + $this->methodName = $methodName; + } + + public function getClassName() + { + return $this->className; + } + + public function getMethodName() + { + return $this->methodName; + } +} diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php b/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php new file mode 100644 index 0000000000000000000000000000000000000000..9f7eab2905f9ad95396a8783020ccd47c434d862 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedPropertyError.php @@ -0,0 +1,38 @@ + + */ +class Twig_Sandbox_SecurityNotAllowedPropertyError extends Twig_Sandbox_SecurityError +{ + private $className; + private $propertyName; + + public function __construct($message, $className, $propertyName, $lineno = -1, $filename = null, Exception $previous = null) + { + parent::__construct($message, $lineno, $filename, $previous); + $this->className = $className; + $this->propertyName = $propertyName; + } + + public function getClassName() + { + return $this->className; + } + + public function getPropertyName() + { + return $this->propertyName; + } +} diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php b/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php new file mode 100644 index 0000000000000000000000000000000000000000..a177206cc762265c37c09b518cca0490cdf87e60 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php @@ -0,0 +1,31 @@ + + */ +class Twig_Sandbox_SecurityNotAllowedTagError extends Twig_Sandbox_SecurityError +{ + private $tagName; + + public function __construct($message, $tagName, $lineno = -1, $filename = null, Exception $previous = null) + { + parent::__construct($message, $lineno, $filename, $previous); + $this->tagName = $tagName; + } + + public function getTagName() + { + return $this->tagName; + } +} diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php b/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php new file mode 100644 index 0000000000000000000000000000000000000000..4470c39f4a9931daf72378d453275935ce8e192b --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php @@ -0,0 +1,123 @@ + + */ +class Twig_Sandbox_SecurityPolicy implements Twig_Sandbox_SecurityPolicyInterface +{ + protected $allowedTags; + protected $allowedFilters; + protected $allowedMethods; + protected $allowedProperties; + protected $allowedFunctions; + + public function __construct(array $allowedTags = array(), array $allowedFilters = array(), array $allowedMethods = array(), array $allowedProperties = array(), array $allowedFunctions = array()) + { + $this->allowedTags = $allowedTags; + $this->allowedFilters = $allowedFilters; + $this->setAllowedMethods($allowedMethods); + $this->allowedProperties = $allowedProperties; + $this->allowedFunctions = $allowedFunctions; + } + + public function setAllowedTags(array $tags) + { + $this->allowedTags = $tags; + } + + public function setAllowedFilters(array $filters) + { + $this->allowedFilters = $filters; + } + + public function setAllowedMethods(array $methods) + { + $this->allowedMethods = array(); + foreach ($methods as $class => $m) { + $this->allowedMethods[$class] = array_map('strtolower', is_array($m) ? $m : array($m)); + } + } + + public function setAllowedProperties(array $properties) + { + $this->allowedProperties = $properties; + } + + public function setAllowedFunctions(array $functions) + { + $this->allowedFunctions = $functions; + } + + public function checkSecurity($tags, $filters, $functions) + { + foreach ($tags as $tag) { + if (!in_array($tag, $this->allowedTags)) { + throw new Twig_Sandbox_SecurityNotAllowedTagError(sprintf('Tag "%s" is not allowed.', $tag), $tag); + } + } + + foreach ($filters as $filter) { + if (!in_array($filter, $this->allowedFilters)) { + throw new Twig_Sandbox_SecurityNotAllowedFilterError(sprintf('Filter "%s" is not allowed.', $filter), $filter); + } + } + + foreach ($functions as $function) { + if (!in_array($function, $this->allowedFunctions)) { + throw new Twig_Sandbox_SecurityNotAllowedFunctionError(sprintf('Function "%s" is not allowed.', $function), $function); + } + } + } + + public function checkMethodAllowed($obj, $method) + { + if ($obj instanceof Twig_TemplateInterface || $obj instanceof Twig_Markup) { + return true; + } + + $allowed = false; + $method = strtolower($method); + foreach ($this->allowedMethods as $class => $methods) { + if ($obj instanceof $class) { + $allowed = in_array($method, $methods); + + break; + } + } + + if (!$allowed) { + $class = get_class($obj); + throw new Twig_Sandbox_SecurityNotAllowedMethodError(sprintf('Calling "%s" method on a "%s" object is not allowed.', $method, $class), $class, $method); + } + } + + public function checkPropertyAllowed($obj, $property) + { + $allowed = false; + foreach ($this->allowedProperties as $class => $properties) { + if ($obj instanceof $class) { + $allowed = in_array($property, is_array($properties) ? $properties : array($properties)); + + break; + } + } + + if (!$allowed) { + $class = get_class($obj); + throw new Twig_Sandbox_SecurityNotAllowedPropertyError(sprintf('Calling "%s" property on a "%s" object is not allowed.', $property, $class), $class, $property); + } + } +} diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php b/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..2111a03c11d81ca6a3815b6b50e0b29586a73e9c --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php @@ -0,0 +1,24 @@ + + */ +interface Twig_Sandbox_SecurityPolicyInterface +{ + public function checkSecurity($tags, $filters, $functions); + + public function checkMethodAllowed($obj, $method); + + public function checkPropertyAllowed($obj, $method); +} diff --git a/vendor/twig/twig/lib/Twig/SimpleFilter.php b/vendor/twig/twig/lib/Twig/SimpleFilter.php new file mode 100644 index 0000000000000000000000000000000000000000..a0b98af3a8bf6159c5e48429096f7fd35c7715a3 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/SimpleFilter.php @@ -0,0 +1,119 @@ + + */ +class Twig_SimpleFilter +{ + protected $name; + protected $callable; + protected $options; + protected $arguments = array(); + + public function __construct($name, $callable, array $options = array()) + { + $this->name = $name; + $this->callable = $callable; + $this->options = array_merge(array( + 'needs_environment' => false, + 'needs_context' => false, + 'is_variadic' => false, + 'is_safe' => null, + 'is_safe_callback' => null, + 'pre_escape' => null, + 'preserves_safety' => null, + 'node_class' => 'Twig_Node_Expression_Filter', + 'deprecated' => false, + 'alternative' => null, + ), $options); + } + + public function getName() + { + return $this->name; + } + + public function getCallable() + { + return $this->callable; + } + + public function getNodeClass() + { + return $this->options['node_class']; + } + + public function setArguments($arguments) + { + $this->arguments = $arguments; + } + + public function getArguments() + { + return $this->arguments; + } + + public function needsEnvironment() + { + return $this->options['needs_environment']; + } + + public function needsContext() + { + return $this->options['needs_context']; + } + + public function getSafe(Twig_Node $filterArgs) + { + if (null !== $this->options['is_safe']) { + return $this->options['is_safe']; + } + + if (null !== $this->options['is_safe_callback']) { + return call_user_func($this->options['is_safe_callback'], $filterArgs); + } + } + + public function getPreservesSafety() + { + return $this->options['preserves_safety']; + } + + public function getPreEscape() + { + return $this->options['pre_escape']; + } + + public function isVariadic() + { + return $this->options['is_variadic']; + } + + public function isDeprecated() + { + return (bool) $this->options['deprecated']; + } + + public function getDeprecatedVersion() + { + return $this->options['deprecated']; + } + + public function getAlternative() + { + return $this->options['alternative']; + } +} diff --git a/vendor/twig/twig/lib/Twig/SimpleFunction.php b/vendor/twig/twig/lib/Twig/SimpleFunction.php new file mode 100644 index 0000000000000000000000000000000000000000..b7ef92a598eee255f6556cb9f0503ca734d396c7 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/SimpleFunction.php @@ -0,0 +1,109 @@ + + */ +class Twig_SimpleFunction +{ + protected $name; + protected $callable; + protected $options; + protected $arguments = array(); + + public function __construct($name, $callable, array $options = array()) + { + $this->name = $name; + $this->callable = $callable; + $this->options = array_merge(array( + 'needs_environment' => false, + 'needs_context' => false, + 'is_variadic' => false, + 'is_safe' => null, + 'is_safe_callback' => null, + 'node_class' => 'Twig_Node_Expression_Function', + 'deprecated' => false, + 'alternative' => null, + ), $options); + } + + public function getName() + { + return $this->name; + } + + public function getCallable() + { + return $this->callable; + } + + public function getNodeClass() + { + return $this->options['node_class']; + } + + public function setArguments($arguments) + { + $this->arguments = $arguments; + } + + public function getArguments() + { + return $this->arguments; + } + + public function needsEnvironment() + { + return $this->options['needs_environment']; + } + + public function needsContext() + { + return $this->options['needs_context']; + } + + public function getSafe(Twig_Node $functionArgs) + { + if (null !== $this->options['is_safe']) { + return $this->options['is_safe']; + } + + if (null !== $this->options['is_safe_callback']) { + return call_user_func($this->options['is_safe_callback'], $functionArgs); + } + + return array(); + } + + public function isVariadic() + { + return $this->options['is_variadic']; + } + + public function isDeprecated() + { + return (bool) $this->options['deprecated']; + } + + public function getDeprecatedVersion() + { + return $this->options['deprecated']; + } + + public function getAlternative() + { + return $this->options['alternative']; + } +} diff --git a/vendor/twig/twig/lib/Twig/SimpleTest.php b/vendor/twig/twig/lib/Twig/SimpleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b9ae8f146a5f2924c2c152ee2ab1bcddac052211 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/SimpleTest.php @@ -0,0 +1,71 @@ + + */ +class Twig_SimpleTest +{ + protected $name; + protected $callable; + protected $options; + + public function __construct($name, $callable, array $options = array()) + { + $this->name = $name; + $this->callable = $callable; + $this->options = array_merge(array( + 'is_variadic' => false, + 'node_class' => 'Twig_Node_Expression_Test', + 'deprecated' => false, + 'alternative' => null, + ), $options); + } + + public function getName() + { + return $this->name; + } + + public function getCallable() + { + return $this->callable; + } + + public function getNodeClass() + { + return $this->options['node_class']; + } + + public function isVariadic() + { + return $this->options['is_variadic']; + } + + public function isDeprecated() + { + return (bool) $this->options['deprecated']; + } + + public function getDeprecatedVersion() + { + return $this->options['deprecated']; + } + + public function getAlternative() + { + return $this->options['alternative']; + } +} diff --git a/vendor/twig/twig/lib/Twig/Source.php b/vendor/twig/twig/lib/Twig/Source.php new file mode 100644 index 0000000000000000000000000000000000000000..389317ec1d38b86a3927d517324b0e4a3cd0c699 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Source.php @@ -0,0 +1,51 @@ + + */ +class Twig_Source +{ + private $code; + private $name; + private $path; + + /** + * @param string $code The template source code + * @param string $name The template logical name + * @param string $path The filesystem path of the template if any + */ + public function __construct($code, $name, $path = '') + { + $this->code = $code; + $this->name = $name; + $this->path = $path; + } + + public function getCode() + { + return $this->code; + } + + public function getName() + { + return $this->name; + } + + public function getPath() + { + return $this->path; + } +} diff --git a/vendor/twig/twig/lib/Twig/SourceContextLoaderInterface.php b/vendor/twig/twig/lib/Twig/SourceContextLoaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..acf21e37802dc8bc6b0ad95bcfb21cf7798db3b9 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/SourceContextLoaderInterface.php @@ -0,0 +1,31 @@ + + * + * @deprecated since 1.27 (to be removed in 3.0) + */ +interface Twig_SourceContextLoaderInterface +{ + /** + * Returns the source context for a given template logical name. + * + * @param string $name The template logical name + * + * @return Twig_Source + * + * @throws Twig_Error_Loader When $name is not found + */ + public function getSourceContext($name); +} diff --git a/vendor/twig/twig/lib/Twig/Template.php b/vendor/twig/twig/lib/Twig/Template.php new file mode 100644 index 0000000000000000000000000000000000000000..f1855f1173f96242ef5844f08a5ebb4c0e0c07f7 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Template.php @@ -0,0 +1,701 @@ +load() + * instead, which returns an instance of Twig_TemplateWrapper. + * + * @author Fabien Potencier + * + * @internal + */ +abstract class Twig_Template implements Twig_TemplateInterface +{ + /** + * @internal + */ + protected static $cache = array(); + + protected $parent; + protected $parents = array(); + protected $env; + protected $blocks = array(); + protected $traits = array(); + + public function __construct(Twig_Environment $env) + { + $this->env = $env; + } + + /** + * @internal this method will be removed in 2.0 and is only used internally to provide an upgrade path from 1.x to 2.0 + */ + public function __toString() + { + return $this->getTemplateName(); + } + + /** + * Returns the template name. + * + * @return string The template name + */ + abstract public function getTemplateName(); + + /** + * Returns debug information about the template. + * + * @return array Debug information + * + * @internal + */ + public function getDebugInfo() + { + return array(); + } + + /** + * Returns the template source code. + * + * @return string The template source code + * + * @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead + */ + public function getSource() + { + @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED); + + return ''; + } + + /** + * Returns information about the original template source code. + * + * @return Twig_Source + */ + public function getSourceContext() + { + return new Twig_Source('', $this->getTemplateName()); + } + + /** + * @deprecated since 1.20 (to be removed in 2.0) + */ + public function getEnvironment() + { + @trigger_error('The '.__METHOD__.' method is deprecated since version 1.20 and will be removed in 2.0.', E_USER_DEPRECATED); + + return $this->env; + } + + /** + * Returns the parent template. + * + * This method is for internal use only and should never be called + * directly. + * + * @param array $context + * + * @return Twig_TemplateInterface|false The parent template or false if there is no parent + * + * @internal + */ + public function getParent(array $context) + { + if (null !== $this->parent) { + return $this->parent; + } + + try { + $parent = $this->doGetParent($context); + + if (false === $parent) { + return false; + } + + if ($parent instanceof self) { + return $this->parents[$parent->getTemplateName()] = $parent; + } + + if (!isset($this->parents[$parent])) { + $this->parents[$parent] = $this->loadTemplate($parent); + } + } catch (Twig_Error_Loader $e) { + $e->setSourceContext(null); + $e->guess(); + + throw $e; + } + + return $this->parents[$parent]; + } + + protected function doGetParent(array $context) + { + return false; + } + + public function isTraitable() + { + return true; + } + + /** + * Displays a parent block. + * + * This method is for internal use only and should never be called + * directly. + * + * @param string $name The block name to display from the parent + * @param array $context The context + * @param array $blocks The current set of blocks + * + * @internal + */ + public function displayParentBlock($name, array $context, array $blocks = array()) + { + $name = (string) $name; + + if (isset($this->traits[$name])) { + $this->traits[$name][0]->displayBlock($name, $context, $blocks, false); + } elseif (false !== $parent = $this->getParent($context)) { + $parent->displayBlock($name, $context, $blocks, false); + } else { + throw new Twig_Error_Runtime(sprintf('The template has no parent and no traits defining the "%s" block.', $name), -1, $this->getSourceContext()); + } + } + + /** + * Displays a block. + * + * This method is for internal use only and should never be called + * directly. + * + * @param string $name The block name to display + * @param array $context The context + * @param array $blocks The current set of blocks + * @param bool $useBlocks Whether to use the current set of blocks + * + * @internal + */ + public function displayBlock($name, array $context, array $blocks = array(), $useBlocks = true) + { + $name = (string) $name; + + if ($useBlocks && isset($blocks[$name])) { + $template = $blocks[$name][0]; + $block = $blocks[$name][1]; + } elseif (isset($this->blocks[$name])) { + $template = $this->blocks[$name][0]; + $block = $this->blocks[$name][1]; + } else { + $template = null; + $block = null; + } + + // avoid RCEs when sandbox is enabled + if (null !== $template && !$template instanceof self) { + throw new LogicException('A block must be a method on a Twig_Template instance.'); + } + + if (null !== $template) { + try { + $template->$block($context, $blocks); + } catch (Twig_Error $e) { + if (!$e->getSourceContext()) { + $e->setSourceContext($template->getSourceContext()); + } + + // this is mostly useful for Twig_Error_Loader exceptions + // see Twig_Error_Loader + if (false === $e->getTemplateLine()) { + $e->setTemplateLine(-1); + $e->guess(); + } + + throw $e; + } catch (Exception $e) { + throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e); + } + } elseif (false !== $parent = $this->getParent($context)) { + $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false); + } else { + @trigger_error(sprintf('Silent display of undefined block "%s" in template "%s" is deprecated since version 1.29 and will throw an exception in 2.0. Use the "block(\'%s\') is defined" expression to test for block existence.', $name, $this->getTemplateName(), $name), E_USER_DEPRECATED); + } + } + + /** + * Renders a parent block. + * + * This method is for internal use only and should never be called + * directly. + * + * @param string $name The block name to render from the parent + * @param array $context The context + * @param array $blocks The current set of blocks + * + * @return string The rendered block + * + * @internal + */ + public function renderParentBlock($name, array $context, array $blocks = array()) + { + ob_start(); + $this->displayParentBlock($name, $context, $blocks); + + return ob_get_clean(); + } + + /** + * Renders a block. + * + * This method is for internal use only and should never be called + * directly. + * + * @param string $name The block name to render + * @param array $context The context + * @param array $blocks The current set of blocks + * @param bool $useBlocks Whether to use the current set of blocks + * + * @return string The rendered block + * + * @internal + */ + public function renderBlock($name, array $context, array $blocks = array(), $useBlocks = true) + { + ob_start(); + $this->displayBlock($name, $context, $blocks, $useBlocks); + + return ob_get_clean(); + } + + /** + * Returns whether a block exists or not in the current context of the template. + * + * This method checks blocks defined in the current template + * or defined in "used" traits or defined in parent templates. + * + * @param string $name The block name + * @param array $context The context + * @param array $blocks The current set of blocks + * + * @return bool true if the block exists, false otherwise + * + * @internal + */ + public function hasBlock($name, array $context = null, array $blocks = array()) + { + if (null === $context) { + @trigger_error('The '.__METHOD__.' method is internal and should never be called; calling it directly is deprecated since version 1.28 and won\'t be possible anymore in 2.0.', E_USER_DEPRECATED); + + return isset($this->blocks[(string) $name]); + } + + if (isset($blocks[$name])) { + return $blocks[$name][0] instanceof self; + } + + if (isset($this->blocks[$name])) { + return true; + } + + if (false !== $parent = $this->getParent($context)) { + return $parent->hasBlock($name, $context); + } + + return false; + } + + /** + * Returns all block names in the current context of the template. + * + * This method checks blocks defined in the current template + * or defined in "used" traits or defined in parent templates. + * + * @param array $context The context + * @param array $blocks The current set of blocks + * + * @return array An array of block names + * + * @internal + */ + public function getBlockNames(array $context = null, array $blocks = array()) + { + if (null === $context) { + @trigger_error('The '.__METHOD__.' method is internal and should never be called; calling it directly is deprecated since version 1.28 and won\'t be possible anymore in 2.0.', E_USER_DEPRECATED); + + return array_keys($this->blocks); + } + + $names = array_merge(array_keys($blocks), array_keys($this->blocks)); + + if (false !== $parent = $this->getParent($context)) { + $names = array_merge($names, $parent->getBlockNames($context)); + } + + return array_unique($names); + } + + protected function loadTemplate($template, $templateName = null, $line = null, $index = null) + { + try { + if (is_array($template)) { + return $this->env->resolveTemplate($template); + } + + if ($template instanceof self) { + return $template; + } + + if ($template instanceof Twig_TemplateWrapper) { + return $template; + } + + return $this->env->loadTemplate($template, $index); + } catch (Twig_Error $e) { + if (!$e->getSourceContext()) { + $e->setSourceContext($templateName ? new Twig_Source('', $templateName) : $this->getSourceContext()); + } + + if ($e->getTemplateLine()) { + throw $e; + } + + if (!$line) { + $e->guess(); + } else { + $e->setTemplateLine($line); + } + + throw $e; + } + } + + /** + * Returns all blocks. + * + * This method is for internal use only and should never be called + * directly. + * + * @return array An array of blocks + * + * @internal + */ + public function getBlocks() + { + return $this->blocks; + } + + public function display(array $context, array $blocks = array()) + { + $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); + } + + public function render(array $context) + { + $level = ob_get_level(); + ob_start(); + try { + $this->display($context); + } catch (Exception $e) { + while (ob_get_level() > $level) { + ob_end_clean(); + } + + throw $e; + } catch (Throwable $e) { + while (ob_get_level() > $level) { + ob_end_clean(); + } + + throw $e; + } + + return ob_get_clean(); + } + + protected function displayWithErrorHandling(array $context, array $blocks = array()) + { + try { + $this->doDisplay($context, $blocks); + } catch (Twig_Error $e) { + if (!$e->getSourceContext()) { + $e->setSourceContext($this->getSourceContext()); + } + + // this is mostly useful for Twig_Error_Loader exceptions + // see Twig_Error_Loader + if (false === $e->getTemplateLine()) { + $e->setTemplateLine(-1); + $e->guess(); + } + + throw $e; + } catch (Exception $e) { + throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e); + } + } + + /** + * Auto-generated method to display the template with the given context. + * + * @param array $context An array of parameters to pass to the template + * @param array $blocks An array of blocks to pass to the template + */ + abstract protected function doDisplay(array $context, array $blocks = array()); + + /** + * Returns a variable from the context. + * + * This method is for internal use only and should never be called + * directly. + * + * This method should not be overridden in a sub-class as this is an + * implementation detail that has been introduced to optimize variable + * access for versions of PHP before 5.4. This is not a way to override + * the way to get a variable value. + * + * @param array $context The context + * @param string $item The variable to return from the context + * @param bool $ignoreStrictCheck Whether to ignore the strict variable check or not + * + * @return mixed The content of the context variable + * + * @throws Twig_Error_Runtime if the variable does not exist and Twig is running in strict mode + * + * @internal + */ + final protected function getContext($context, $item, $ignoreStrictCheck = false) + { + if (!array_key_exists($item, $context)) { + if ($ignoreStrictCheck || !$this->env->isStrictVariables()) { + return; + } + + throw new Twig_Error_Runtime(sprintf('Variable "%s" does not exist.', $item), -1, $this->getSourceContext()); + } + + return $context[$item]; + } + + /** + * Returns the attribute value for a given array/object. + * + * @param mixed $object The object or array from where to get the item + * @param mixed $item The item to get from the array or object + * @param array $arguments An array of arguments to pass if the item is an object method + * @param string $type The type of attribute (@see Twig_Template constants) + * @param bool $isDefinedTest Whether this is only a defined check + * @param bool $ignoreStrictCheck Whether to ignore the strict attribute check or not + * + * @return mixed The attribute value, or a Boolean when $isDefinedTest is true, or null when the attribute is not set and $ignoreStrictCheck is true + * + * @throws Twig_Error_Runtime if the attribute does not exist and Twig is running in strict mode and $isDefinedTest is false + * + * @internal + */ + protected function getAttribute($object, $item, array $arguments = array(), $type = self::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false) + { + // array + if (self::METHOD_CALL !== $type) { + $arrayItem = is_bool($item) || is_float($item) ? (int) $item : $item; + + if ((is_array($object) && (isset($object[$arrayItem]) || array_key_exists($arrayItem, $object))) + || ($object instanceof ArrayAccess && isset($object[$arrayItem])) + ) { + if ($isDefinedTest) { + return true; + } + + return $object[$arrayItem]; + } + + if (self::ARRAY_CALL === $type || !is_object($object)) { + if ($isDefinedTest) { + return false; + } + + if ($ignoreStrictCheck || !$this->env->isStrictVariables()) { + return; + } + + if ($object instanceof ArrayAccess) { + $message = sprintf('Key "%s" in object with ArrayAccess of class "%s" does not exist.', $arrayItem, get_class($object)); + } elseif (is_object($object)) { + $message = sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface.', $item, get_class($object)); + } elseif (is_array($object)) { + if (empty($object)) { + $message = sprintf('Key "%s" does not exist as the array is empty.', $arrayItem); + } else { + $message = sprintf('Key "%s" for array with keys "%s" does not exist.', $arrayItem, implode(', ', array_keys($object))); + } + } elseif (self::ARRAY_CALL === $type) { + if (null === $object) { + $message = sprintf('Impossible to access a key ("%s") on a null variable.', $item); + } else { + $message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s").', $item, gettype($object), $object); + } + } elseif (null === $object) { + $message = sprintf('Impossible to access an attribute ("%s") on a null variable.', $item); + } else { + $message = sprintf('Impossible to access an attribute ("%s") on a %s variable ("%s").', $item, gettype($object), $object); + } + + throw new Twig_Error_Runtime($message, -1, $this->getSourceContext()); + } + } + + if (!is_object($object)) { + if ($isDefinedTest) { + return false; + } + + if ($ignoreStrictCheck || !$this->env->isStrictVariables()) { + return; + } + + if (null === $object) { + $message = sprintf('Impossible to invoke a method ("%s") on a null variable.', $item); + } else { + $message = sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s").', $item, gettype($object), $object); + } + + throw new Twig_Error_Runtime($message, -1, $this->getSourceContext()); + } + + // object property + if (self::METHOD_CALL !== $type && !$object instanceof self) { // Twig_Template does not have public properties, and we don't want to allow access to internal ones + if (isset($object->$item) || array_key_exists((string) $item, $object)) { + if ($isDefinedTest) { + return true; + } + + if ($this->env->hasExtension('Twig_Extension_Sandbox')) { + $this->env->getExtension('Twig_Extension_Sandbox')->checkPropertyAllowed($object, $item); + } + + return $object->$item; + } + } + + $class = get_class($object); + + // object method + if (!isset(self::$cache[$class])) { + // get_class_methods returns all methods accessible in the scope, but we only want public ones to be accessible in templates + if ($object instanceof self) { + $ref = new ReflectionClass($class); + $methods = array(); + + foreach ($ref->getMethods(ReflectionMethod::IS_PUBLIC) as $refMethod) { + // Accessing the environment from templates is forbidden to prevent untrusted changes to the environment + if ('getenvironment' !== strtolower($refMethod->name)) { + $methods[] = $refMethod->name; + } + } + } else { + $methods = get_class_methods($object); + } + // sort values to have consistent behavior, so that "get" methods win precedence over "is" methods + sort($methods); + + $cache = array(); + + foreach ($methods as $method) { + $cache[$method] = $method; + $cache[$lcName = strtolower($method)] = $method; + + if ('g' === $lcName[0] && 0 === strpos($lcName, 'get')) { + $name = substr($method, 3); + $lcName = substr($lcName, 3); + } elseif ('i' === $lcName[0] && 0 === strpos($lcName, 'is')) { + $name = substr($method, 2); + $lcName = substr($lcName, 2); + } else { + continue; + } + + if (!isset($cache[$name])) { + $cache[$name] = $method; + } + if (!isset($cache[$lcName])) { + $cache[$lcName] = $method; + } + } + self::$cache[$class] = $cache; + } + + $call = false; + if (isset(self::$cache[$class][$item])) { + $method = self::$cache[$class][$item]; + } elseif (isset(self::$cache[$class][$lcItem = strtolower($item)])) { + $method = self::$cache[$class][$lcItem]; + } elseif (isset(self::$cache[$class]['__call'])) { + $method = $item; + $call = true; + } else { + if ($isDefinedTest) { + return false; + } + + if ($ignoreStrictCheck || !$this->env->isStrictVariables()) { + return; + } + + throw new Twig_Error_Runtime(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), -1, $this->getSourceContext()); + } + + if ($isDefinedTest) { + return true; + } + + if ($this->env->hasExtension('Twig_Extension_Sandbox')) { + $this->env->getExtension('Twig_Extension_Sandbox')->checkMethodAllowed($object, $method); + } + + // Some objects throw exceptions when they have __call, and the method we try + // to call is not supported. If ignoreStrictCheck is true, we should return null. + try { + if (!$arguments) { + $ret = $object->$method(); + } else { + $ret = call_user_func_array(array($object, $method), $arguments); + } + } catch (BadMethodCallException $e) { + if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) { + return; + } + throw $e; + } + + // @deprecated in 1.28 + if ($object instanceof Twig_TemplateInterface) { + $self = $object->getTemplateName() === $this->getTemplateName(); + $message = sprintf('Calling "%s" on template "%s" from template "%s" is deprecated since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName(), $this->getTemplateName()); + if ('renderBlock' === $method || 'displayBlock' === $method) { + $message .= sprintf(' Use block("%s"%s) instead).', $arguments[0], $self ? '' : ', template'); + } elseif ('hasBlock' === $method) { + $message .= sprintf(' Use "block("%s"%s) is defined" instead).', $arguments[0], $self ? '' : ', template'); + } elseif ('render' === $method || 'display' === $method) { + $message .= sprintf(' Use include("%s") instead).', $object->getTemplateName()); + } + @trigger_error($message, E_USER_DEPRECATED); + + return $ret === '' ? '' : new Twig_Markup($ret, $this->env->getCharset()); + } + + return $ret; + } +} diff --git a/vendor/twig/twig/lib/Twig/TemplateInterface.php b/vendor/twig/twig/lib/Twig/TemplateInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..457ef7d7bb330d829adf9a907ceb44e4b1645bf6 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TemplateInterface.php @@ -0,0 +1,48 @@ + + * + * @deprecated since 1.12 (to be removed in 3.0) + */ +interface Twig_TemplateInterface +{ + const ANY_CALL = 'any'; + const ARRAY_CALL = 'array'; + const METHOD_CALL = 'method'; + + /** + * Renders the template with the given context and returns it as string. + * + * @param array $context An array of parameters to pass to the template + * + * @return string The rendered template + */ + public function render(array $context); + + /** + * Displays the template with the given context. + * + * @param array $context An array of parameters to pass to the template + * @param array $blocks An array of blocks to pass to the template + */ + public function display(array $context, array $blocks = array()); + + /** + * Returns the bound environment for this template. + * + * @return Twig_Environment + */ + public function getEnvironment(); +} diff --git a/vendor/twig/twig/lib/Twig/TemplateWrapper.php b/vendor/twig/twig/lib/Twig/TemplateWrapper.php new file mode 100644 index 0000000000000000000000000000000000000000..b72b92c202be7ec780d4a763f7cb39ddcbe94319 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TemplateWrapper.php @@ -0,0 +1,131 @@ + + */ +final class Twig_TemplateWrapper +{ + private $env; + private $template; + + /** + * This method is for internal use only and should never be called + * directly (use Twig_Environment::load() instead). + * + * @internal + */ + public function __construct(Twig_Environment $env, Twig_Template $template) + { + $this->env = $env; + $this->template = $template; + } + + /** + * Renders the template. + * + * @param array $context An array of parameters to pass to the template + * + * @return string The rendered template + */ + public function render($context = array()) + { + return $this->template->render($context); + } + + /** + * Displays the template. + * + * @param array $context An array of parameters to pass to the template + */ + public function display($context = array()) + { + $this->template->display($context); + } + + /** + * Checks if a block is defined. + * + * @param string $name The block name + * @param array $context An array of parameters to pass to the template + * + * @return bool + */ + public function hasBlock($name, $context = array()) + { + return $this->template->hasBlock($name, $context); + } + + /** + * Returns defined block names in the template. + * + * @param array $context An array of parameters to pass to the template + * + * @return string[] An array of defined template block names + */ + public function getBlockNames($context = array()) + { + return $this->template->getBlockNames($context); + } + + /** + * Renders a template block. + * + * @param string $name The block name to render + * @param array $context An array of parameters to pass to the template + * + * @return string The rendered block + */ + public function renderBlock($name, $context = array()) + { + $context = $this->env->mergeGlobals($context); + $level = ob_get_level(); + ob_start(); + try { + $this->template->displayBlock($name, $context); + } catch (Exception $e) { + while (ob_get_level() > $level) { + ob_end_clean(); + } + + throw $e; + } catch (Throwable $e) { + while (ob_get_level() > $level) { + ob_end_clean(); + } + + throw $e; + } + + return ob_get_clean(); + } + + /** + * Displays a template block. + * + * @param string $name The block name to render + * @param array $context An array of parameters to pass to the template + */ + public function displayBlock($name, $context = array()) + { + $this->template->displayBlock($name, $this->env->mergeGlobals($context)); + } + + /** + * @return Twig_Source + */ + public function getSourceContext() + { + return $this->template->getSourceContext(); + } +} diff --git a/vendor/twig/twig/lib/Twig/Test.php b/vendor/twig/twig/lib/Twig/Test.php new file mode 100644 index 0000000000000000000000000000000000000000..b450ec625fe51115aa18cde152cb76a2d0ab0fcf --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Test.php @@ -0,0 +1,37 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +abstract class Twig_Test implements Twig_TestInterface, Twig_TestCallableInterface +{ + protected $options; + protected $arguments = array(); + + public function __construct(array $options = array()) + { + $this->options = array_merge(array( + 'callable' => null, + ), $options); + } + + public function getCallable() + { + return $this->options['callable']; + } +} diff --git a/vendor/twig/twig/lib/Twig/Test/Function.php b/vendor/twig/twig/lib/Twig/Test/Function.php new file mode 100644 index 0000000000000000000000000000000000000000..9e83c3f844cdae49ec62cfa3c7e498e931c19b10 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Test/Function.php @@ -0,0 +1,38 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +class Twig_Test_Function extends Twig_Test +{ + protected $function; + + public function __construct($function, array $options = array()) + { + $options['callable'] = $function; + + parent::__construct($options); + + $this->function = $function; + } + + public function compile() + { + return $this->function; + } +} diff --git a/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php b/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..ca0f3594a0b4e365343cead07d7c27eb755d2175 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php @@ -0,0 +1,228 @@ + + * @author Karma Dordrak + */ +abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase +{ + /** + * @return string + */ + abstract protected function getFixturesDir(); + + /** + * @return Twig_ExtensionInterface[] + */ + protected function getExtensions() + { + return array(); + } + + /** + * @return Twig_SimpleFilter[] + */ + protected function getTwigFilters() + { + return array(); + } + + /** + * @return Twig_SimpleFunction[] + */ + protected function getTwigFunctions() + { + return array(); + } + + /** + * @return Twig_SimpleTest[] + */ + protected function getTwigTests() + { + return array(); + } + + /** + * @dataProvider getTests + */ + public function testIntegration($file, $message, $condition, $templates, $exception, $outputs) + { + $this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs); + } + + /** + * @dataProvider getLegacyTests + * @group legacy + */ + public function testLegacyIntegration($file, $message, $condition, $templates, $exception, $outputs) + { + $this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs); + } + + public function getTests($name, $legacyTests = false) + { + $fixturesDir = realpath($this->getFixturesDir()); + $tests = array(); + + foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($fixturesDir), RecursiveIteratorIterator::LEAVES_ONLY) as $file) { + if (!preg_match('/\.test$/', $file)) { + continue; + } + + if ($legacyTests xor false !== strpos($file->getRealpath(), '.legacy.test')) { + continue; + } + + $test = file_get_contents($file->getRealpath()); + + if (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)\s*(?:--DATA--\s*(.*))?\s*--EXCEPTION--\s*(.*)/sx', $test, $match)) { + $message = $match[1]; + $condition = $match[2]; + $templates = self::parseTemplates($match[3]); + $exception = $match[5]; + $outputs = array(array(null, $match[4], null, '')); + } elseif (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s', $test, $match)) { + $message = $match[1]; + $condition = $match[2]; + $templates = self::parseTemplates($match[3]); + $exception = false; + preg_match_all('/--DATA--(.*?)(?:--CONFIG--(.*?))?--EXPECT--(.*?)(?=\-\-DATA\-\-|$)/s', $test, $outputs, PREG_SET_ORDER); + } else { + throw new InvalidArgumentException(sprintf('Test "%s" is not valid.', str_replace($fixturesDir.'/', '', $file))); + } + + $tests[] = array(str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs); + } + + if ($legacyTests && empty($tests)) { + // add a dummy test to avoid a PHPUnit message + return array(array('not', '-', '', array(), '', array())); + } + + return $tests; + } + + public function getLegacyTests() + { + return $this->getTests('testLegacyIntegration', true); + } + + protected function doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs) + { + if ($condition) { + eval('$ret = '.$condition.';'); + if (!$ret) { + $this->markTestSkipped($condition); + } + } + + $loader = new Twig_Loader_Array($templates); + + foreach ($outputs as $i => $match) { + $config = array_merge(array( + 'cache' => false, + 'strict_variables' => true, + ), $match[2] ? eval($match[2].';') : array()); + $twig = new Twig_Environment($loader, $config); + $twig->addGlobal('global', 'global'); + foreach ($this->getExtensions() as $extension) { + $twig->addExtension($extension); + } + + foreach ($this->getTwigFilters() as $filter) { + $twig->addFilter($filter); + } + + foreach ($this->getTwigTests() as $test) { + $twig->addTest($test); + } + + foreach ($this->getTwigFunctions() as $function) { + $twig->addFunction($function); + } + + // avoid using the same PHP class name for different cases + // only for PHP 5.2+ + if (PHP_VERSION_ID >= 50300) { + $p = new ReflectionProperty($twig, 'templateClassPrefix'); + $p->setAccessible(true); + $p->setValue($twig, '__TwigTemplate_'.hash('sha256', uniqid(mt_rand(), true), false).'_'); + } + + try { + $template = $twig->loadTemplate('index.twig'); + } catch (Exception $e) { + if (false !== $exception) { + $message = $e->getMessage(); + $this->assertSame(trim($exception), trim(sprintf('%s: %s', get_class($e), $message))); + $last = substr($message, strlen($message) - 1); + $this->assertTrue('.' === $last || '?' === $last, $message, 'Exception message must end with a dot or a question mark.'); + + return; + } + + throw new Twig_Error(sprintf('%s: %s', get_class($e), $e->getMessage()), -1, $file, $e); + } + + try { + $output = trim($template->render(eval($match[1].';')), "\n "); + } catch (Exception $e) { + if (false !== $exception) { + $this->assertSame(trim($exception), trim(sprintf('%s: %s', get_class($e), $e->getMessage()))); + + return; + } + + $e = new Twig_Error(sprintf('%s: %s', get_class($e), $e->getMessage()), -1, $file, $e); + + $output = trim(sprintf('%s: %s', get_class($e), $e->getMessage())); + } + + if (false !== $exception) { + list($class) = explode(':', $exception); + $this->assertThat(null, new PHPUnit_Framework_Constraint_Exception($class)); + } + + $expected = trim($match[3], "\n "); + + if ($expected !== $output) { + printf("Compiled templates that failed on case %d:\n", $i + 1); + + foreach (array_keys($templates) as $name) { + echo "Template: $name\n"; + $loader = $twig->getLoader(); + if (!$loader instanceof Twig_SourceContextLoaderInterface) { + $source = new Twig_Source($loader->getSource($name), $name); + } else { + $source = $loader->getSourceContext($name); + } + echo $twig->compile($twig->parse($twig->tokenize($source))); + } + } + $this->assertEquals($expected, $output, $message.' (in '.$file.')'); + } + } + + protected static function parseTemplates($test) + { + $templates = array(); + preg_match_all('/--TEMPLATE(?:\((.*?)\))?--(.*?)(?=\-\-TEMPLATE|$)/s', $test, $matches, PREG_SET_ORDER); + foreach ($matches as $match) { + $templates[($match[1] ? $match[1] : 'index.twig')] = $match[2]; + } + + return $templates; + } +} diff --git a/vendor/twig/twig/lib/Twig/Test/Method.php b/vendor/twig/twig/lib/Twig/Test/Method.php new file mode 100644 index 0000000000000000000000000000000000000000..feccd5db345f0a1e6455c558f702b996f944c962 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Test/Method.php @@ -0,0 +1,40 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +class Twig_Test_Method extends Twig_Test +{ + protected $extension; + protected $method; + + public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array()) + { + $options['callable'] = array($extension, $method); + + parent::__construct($options); + + $this->extension = $extension; + $this->method = $method; + } + + public function compile() + { + return sprintf('$this->env->getExtension(\'%s\')->%s', get_class($this->extension), $this->method); + } +} diff --git a/vendor/twig/twig/lib/Twig/Test/Node.php b/vendor/twig/twig/lib/Twig/Test/Node.php new file mode 100644 index 0000000000000000000000000000000000000000..6098a5275f2058563673bed1a467fcc1a14a9bd6 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Test/Node.php @@ -0,0 +1,40 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +class Twig_Test_Node extends Twig_Test +{ + protected $class; + + public function __construct($class, array $options = array()) + { + parent::__construct($options); + + $this->class = $class; + } + + public function getClass() + { + return $this->class; + } + + public function compile() + { + } +} diff --git a/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php b/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..a6b550cf8cdd6568de416ca69aaf855596e00495 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php @@ -0,0 +1,68 @@ +assertNodeCompilation($source, $node, $environment, $isPattern); + } + + public function assertNodeCompilation($source, Twig_Node $node, Twig_Environment $environment = null, $isPattern = false) + { + $compiler = $this->getCompiler($environment); + $compiler->compile($node); + + if ($isPattern) { + $this->assertStringMatchesFormat($source, trim($compiler->getSource())); + } else { + $this->assertEquals($source, trim($compiler->getSource())); + } + } + + protected function getCompiler(Twig_Environment $environment = null) + { + return new Twig_Compiler(null === $environment ? $this->getEnvironment() : $environment); + } + + protected function getEnvironment() + { + return new Twig_Environment(new Twig_Loader_Array(array())); + } + + protected function getVariableGetter($name, $line = false) + { + $line = $line > 0 ? "// line {$line}\n" : ''; + + if (PHP_VERSION_ID >= 70000) { + return sprintf('%s($context["%s"] ?? null)', $line, $name, $name); + } + + if (PHP_VERSION_ID >= 50400) { + return sprintf('%s(isset($context["%s"]) ? $context["%s"] : null)', $line, $name, $name); + } + + return sprintf('%s$this->getContext($context, "%s")', $line, $name); + } + + protected function getAttributeGetter() + { + if (function_exists('twig_template_get_attributes')) { + return 'twig_template_get_attributes($this, '; + } + + return '$this->getAttribute('; + } +} diff --git a/vendor/twig/twig/lib/Twig/TestCallableInterface.php b/vendor/twig/twig/lib/Twig/TestCallableInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..51ecb9a285e2dfc78cb1ec85ea4706b1be92f41b --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TestCallableInterface.php @@ -0,0 +1,22 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +interface Twig_TestCallableInterface +{ + public function getCallable(); +} diff --git a/vendor/twig/twig/lib/Twig/TestInterface.php b/vendor/twig/twig/lib/Twig/TestInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..91664075a24952dbecf2d7b22322f73f13e2e478 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TestInterface.php @@ -0,0 +1,27 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +interface Twig_TestInterface +{ + /** + * Compiles a test. + * + * @return string The PHP code for the test + */ + public function compile(); +} diff --git a/vendor/twig/twig/lib/Twig/Token.php b/vendor/twig/twig/lib/Twig/Token.php new file mode 100644 index 0000000000000000000000000000000000000000..717ab0871db5e747cacaa07eb58c356172284be8 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Token.php @@ -0,0 +1,205 @@ + + * + * @final + */ +class Twig_Token +{ + protected $value; + protected $type; + protected $lineno; + + const EOF_TYPE = -1; + const TEXT_TYPE = 0; + const BLOCK_START_TYPE = 1; + const VAR_START_TYPE = 2; + const BLOCK_END_TYPE = 3; + const VAR_END_TYPE = 4; + const NAME_TYPE = 5; + const NUMBER_TYPE = 6; + const STRING_TYPE = 7; + const OPERATOR_TYPE = 8; + const PUNCTUATION_TYPE = 9; + const INTERPOLATION_START_TYPE = 10; + const INTERPOLATION_END_TYPE = 11; + + /** + * @param int $type The type of the token + * @param string $value The token value + * @param int $lineno The line position in the source + */ + public function __construct($type, $value, $lineno) + { + $this->type = $type; + $this->value = $value; + $this->lineno = $lineno; + } + + public function __toString() + { + return sprintf('%s(%s)', self::typeToString($this->type, true), $this->value); + } + + /** + * Tests the current token for a type and/or a value. + * + * Parameters may be: + * * just type + * * type and value (or array of possible values) + * * just value (or array of possible values) (NAME_TYPE is used as type) + * + * @param array|int $type The type to test + * @param array|string|null $values The token value + * + * @return bool + */ + public function test($type, $values = null) + { + if (null === $values && !is_int($type)) { + $values = $type; + $type = self::NAME_TYPE; + } + + return ($this->type === $type) && ( + null === $values || + (is_array($values) && in_array($this->value, $values)) || + $this->value == $values + ); + } + + /** + * @return int + */ + public function getLine() + { + return $this->lineno; + } + + /** + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Returns the constant representation (internal) of a given type. + * + * @param int $type The type as an integer + * @param bool $short Whether to return a short representation or not + * + * @return string The string representation + */ + public static function typeToString($type, $short = false) + { + switch ($type) { + case self::EOF_TYPE: + $name = 'EOF_TYPE'; + break; + case self::TEXT_TYPE: + $name = 'TEXT_TYPE'; + break; + case self::BLOCK_START_TYPE: + $name = 'BLOCK_START_TYPE'; + break; + case self::VAR_START_TYPE: + $name = 'VAR_START_TYPE'; + break; + case self::BLOCK_END_TYPE: + $name = 'BLOCK_END_TYPE'; + break; + case self::VAR_END_TYPE: + $name = 'VAR_END_TYPE'; + break; + case self::NAME_TYPE: + $name = 'NAME_TYPE'; + break; + case self::NUMBER_TYPE: + $name = 'NUMBER_TYPE'; + break; + case self::STRING_TYPE: + $name = 'STRING_TYPE'; + break; + case self::OPERATOR_TYPE: + $name = 'OPERATOR_TYPE'; + break; + case self::PUNCTUATION_TYPE: + $name = 'PUNCTUATION_TYPE'; + break; + case self::INTERPOLATION_START_TYPE: + $name = 'INTERPOLATION_START_TYPE'; + break; + case self::INTERPOLATION_END_TYPE: + $name = 'INTERPOLATION_END_TYPE'; + break; + default: + throw new LogicException(sprintf('Token of type "%s" does not exist.', $type)); + } + + return $short ? $name : 'Twig_Token::'.$name; + } + + /** + * Returns the English representation of a given type. + * + * @param int $type The type as an integer + * + * @return string The string representation + */ + public static function typeToEnglish($type) + { + switch ($type) { + case self::EOF_TYPE: + return 'end of template'; + case self::TEXT_TYPE: + return 'text'; + case self::BLOCK_START_TYPE: + return 'begin of statement block'; + case self::VAR_START_TYPE: + return 'begin of print statement'; + case self::BLOCK_END_TYPE: + return 'end of statement block'; + case self::VAR_END_TYPE: + return 'end of print statement'; + case self::NAME_TYPE: + return 'name'; + case self::NUMBER_TYPE: + return 'number'; + case self::STRING_TYPE: + return 'string'; + case self::OPERATOR_TYPE: + return 'operator'; + case self::PUNCTUATION_TYPE: + return 'punctuation'; + case self::INTERPOLATION_START_TYPE: + return 'begin of string interpolation'; + case self::INTERPOLATION_END_TYPE: + return 'end of string interpolation'; + default: + throw new LogicException(sprintf('Token of type "%s" does not exist.', $type)); + } + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser.php b/vendor/twig/twig/lib/Twig/TokenParser.php new file mode 100644 index 0000000000000000000000000000000000000000..700a227f10789f17199f59e51a97120255ae7ea0 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser.php @@ -0,0 +1,31 @@ + + */ +abstract class Twig_TokenParser implements Twig_TokenParserInterface +{ + /** + * @var Twig_Parser + */ + protected $parser; + + /** + * Sets the parser associated with this token parser. + */ + public function setParser(Twig_Parser $parser) + { + $this->parser = $parser; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php b/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php new file mode 100644 index 0000000000000000000000000000000000000000..176820ead4d0000a634dd294103029778eef010c --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php @@ -0,0 +1,81 @@ + + * {% autoescape true %} + * Everything will be automatically escaped in this block + * {% endautoescape %} + * + * {% autoescape false %} + * Everything will be outputed as is in this block + * {% endautoescape %} + * + * {% autoescape true js %} + * Everything will be automatically escaped in this block + * using the js escaping strategy + * {% endautoescape %} + * + * + * @final + */ +class Twig_TokenParser_AutoEscape extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $lineno = $token->getLine(); + $stream = $this->parser->getStream(); + + if ($stream->test(Twig_Token::BLOCK_END_TYPE)) { + $value = 'html'; + } else { + $expr = $this->parser->getExpressionParser()->parseExpression(); + if (!$expr instanceof Twig_Node_Expression_Constant) { + throw new Twig_Error_Syntax('An escaping strategy must be a string or a bool.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); + } + $value = $expr->getAttribute('value'); + + $compat = true === $value || false === $value; + + if (true === $value) { + $value = 'html'; + } + + if ($compat && $stream->test(Twig_Token::NAME_TYPE)) { + @trigger_error('Using the autoescape tag with "true" or "false" before the strategy name is deprecated since version 1.21.', E_USER_DEPRECATED); + + if (false === $value) { + throw new Twig_Error_Syntax('Unexpected escaping strategy as you set autoescaping to false.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); + } + + $value = $stream->next()->getValue(); + } + } + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + return new Twig_Node_AutoEscape($value, $body, $lineno, $this->getTag()); + } + + public function decideBlockEnd(Twig_Token $token) + { + return $token->test('endautoescape'); + } + + public function getTag() + { + return 'autoescape'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Block.php b/vendor/twig/twig/lib/Twig/TokenParser/Block.php new file mode 100644 index 0000000000000000000000000000000000000000..9dae2b9044485551f5f65ca2437f34e7c75ca40e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Block.php @@ -0,0 +1,71 @@ + + * {% block head %} + * + * {% block title %}{% endblock %} - My Webpage + * {% endblock %} + * + * + * @final + */ +class Twig_TokenParser_Block extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $lineno = $token->getLine(); + $stream = $this->parser->getStream(); + $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue(); + if ($this->parser->hasBlock($name)) { + throw new Twig_Error_Syntax(sprintf("The block '%s' has already been defined line %d.", $name, $this->parser->getBlock($name)->getTemplateLine()), $stream->getCurrent()->getLine(), $stream->getSourceContext()); + } + $this->parser->setBlock($name, $block = new Twig_Node_Block($name, new Twig_Node(array()), $lineno)); + $this->parser->pushLocalScope(); + $this->parser->pushBlockStack($name); + + if ($stream->nextIf(Twig_Token::BLOCK_END_TYPE)) { + $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + if ($token = $stream->nextIf(Twig_Token::NAME_TYPE)) { + $value = $token->getValue(); + + if ($value != $name) { + throw new Twig_Error_Syntax(sprintf('Expected endblock for block "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getSourceContext()); + } + } + } else { + $body = new Twig_Node(array( + new Twig_Node_Print($this->parser->getExpressionParser()->parseExpression(), $lineno), + )); + } + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + $block->setNode('body', $body); + $this->parser->popBlockStack(); + $this->parser->popLocalScope(); + + return new Twig_Node_BlockReference($name, $lineno, $this->getTag()); + } + + public function decideBlockEnd(Twig_Token $token) + { + return $token->test('endblock'); + } + + public function getTag() + { + return 'block'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Do.php b/vendor/twig/twig/lib/Twig/TokenParser/Do.php new file mode 100644 index 0000000000000000000000000000000000000000..fd03a2965746ca87e615f3f8e6b471cc76cced03 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Do.php @@ -0,0 +1,32 @@ +parser->getExpressionParser()->parseExpression(); + + $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); + + return new Twig_Node_Do($expr, $token->getLine(), $this->getTag()); + } + + public function getTag() + { + return 'do'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Embed.php b/vendor/twig/twig/lib/Twig/TokenParser/Embed.php new file mode 100644 index 0000000000000000000000000000000000000000..019d97810201d6ff8ff74db90ae0255adcb2032c --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Embed.php @@ -0,0 +1,65 @@ +parser->getStream(); + + $parent = $this->parser->getExpressionParser()->parseExpression(); + + list($variables, $only, $ignoreMissing) = $this->parseArguments(); + + $parentToken = $fakeParentToken = new Twig_Token(Twig_Token::STRING_TYPE, '__parent__', $token->getLine()); + if ($parent instanceof Twig_Node_Expression_Constant) { + $parentToken = new Twig_Token(Twig_Token::STRING_TYPE, $parent->getAttribute('value'), $token->getLine()); + } elseif ($parent instanceof Twig_Node_Expression_Name) { + $parentToken = new Twig_Token(Twig_Token::NAME_TYPE, $parent->getAttribute('name'), $token->getLine()); + } + + // inject a fake parent to make the parent() function work + $stream->injectTokens(array( + new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', $token->getLine()), + new Twig_Token(Twig_Token::NAME_TYPE, 'extends', $token->getLine()), + $parentToken, + new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', $token->getLine()), + )); + + $module = $this->parser->parse($stream, array($this, 'decideBlockEnd'), true); + + // override the parent with the correct one + if ($fakeParentToken === $parentToken) { + $module->setNode('parent', $parent); + } + + $this->parser->embedTemplate($module); + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + return new Twig_Node_Embed($module->getTemplateName(), $module->getAttribute('index'), $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag()); + } + + public function decideBlockEnd(Twig_Token $token) + { + return $token->test('endembed'); + } + + public function getTag() + { + return 'embed'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Extends.php b/vendor/twig/twig/lib/Twig/TokenParser/Extends.php new file mode 100644 index 0000000000000000000000000000000000000000..b8454d2d642fdd447c7b6a97de27d06d02e88865 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Extends.php @@ -0,0 +1,44 @@ + + * {% extends "base.html" %} + * + * + * @final + */ +class Twig_TokenParser_Extends extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $stream = $this->parser->getStream(); + + if (!$this->parser->isMainScope()) { + throw new Twig_Error_Syntax('Cannot extend from a block.', $token->getLine(), $stream->getSourceContext()); + } + + if (null !== $this->parser->getParent()) { + throw new Twig_Error_Syntax('Multiple extends tags are forbidden.', $token->getLine(), $stream->getSourceContext()); + } + $this->parser->setParent($this->parser->getExpressionParser()->parseExpression()); + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + } + + public function getTag() + { + return 'extends'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Filter.php b/vendor/twig/twig/lib/Twig/TokenParser/Filter.php new file mode 100644 index 0000000000000000000000000000000000000000..1cdc0dd07d0a838bcd9705ca12d53d17e81c3aa9 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Filter.php @@ -0,0 +1,51 @@ + + * {% filter upper %} + * This text becomes uppercase + * {% endfilter %} + * + * + * @final + */ +class Twig_TokenParser_Filter extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $name = $this->parser->getVarName(); + $ref = new Twig_Node_Expression_BlockReference(new Twig_Node_Expression_Constant($name, $token->getLine()), null, $token->getLine(), $this->getTag()); + + $filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag()); + $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); + + $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); + + $block = new Twig_Node_Block($name, $body, $token->getLine()); + $this->parser->setBlock($name, $block); + + return new Twig_Node_Print($filter, $token->getLine(), $this->getTag()); + } + + public function decideBlockEnd(Twig_Token $token) + { + return $token->test('endfilter'); + } + + public function getTag() + { + return 'filter'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Flush.php b/vendor/twig/twig/lib/Twig/TokenParser/Flush.php new file mode 100644 index 0000000000000000000000000000000000000000..b09ff95779cafedf5085b7370f1cc77f89e13b68 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Flush.php @@ -0,0 +1,32 @@ +parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); + + return new Twig_Node_Flush($token->getLine(), $this->getTag()); + } + + public function getTag() + { + return 'flush'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/For.php b/vendor/twig/twig/lib/Twig/TokenParser/For.php new file mode 100644 index 0000000000000000000000000000000000000000..6407afa819ed2d3d02072f0b2d29519d7a1f2dec --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/For.php @@ -0,0 +1,125 @@ + + *
      + * {% for user in users %} + *
    • {{ user.username|e }}
    • + * {% endfor %} + *
    + * + * + * @final + */ +class Twig_TokenParser_For extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $lineno = $token->getLine(); + $stream = $this->parser->getStream(); + $targets = $this->parser->getExpressionParser()->parseAssignmentExpression(); + $stream->expect(Twig_Token::OPERATOR_TYPE, 'in'); + $seq = $this->parser->getExpressionParser()->parseExpression(); + + $ifexpr = null; + if ($stream->nextIf(Twig_Token::NAME_TYPE, 'if')) { + $ifexpr = $this->parser->getExpressionParser()->parseExpression(); + } + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + $body = $this->parser->subparse(array($this, 'decideForFork')); + if ($stream->next()->getValue() == 'else') { + $stream->expect(Twig_Token::BLOCK_END_TYPE); + $else = $this->parser->subparse(array($this, 'decideForEnd'), true); + } else { + $else = null; + } + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + if (count($targets) > 1) { + $keyTarget = $targets->getNode(0); + $keyTarget = new Twig_Node_Expression_AssignName($keyTarget->getAttribute('name'), $keyTarget->getTemplateLine()); + $valueTarget = $targets->getNode(1); + $valueTarget = new Twig_Node_Expression_AssignName($valueTarget->getAttribute('name'), $valueTarget->getTemplateLine()); + } else { + $keyTarget = new Twig_Node_Expression_AssignName('_key', $lineno); + $valueTarget = $targets->getNode(0); + $valueTarget = new Twig_Node_Expression_AssignName($valueTarget->getAttribute('name'), $valueTarget->getTemplateLine()); + } + + if ($ifexpr) { + $this->checkLoopUsageCondition($stream, $ifexpr); + $this->checkLoopUsageBody($stream, $body); + } + + return new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, $lineno, $this->getTag()); + } + + public function decideForFork(Twig_Token $token) + { + return $token->test(array('else', 'endfor')); + } + + public function decideForEnd(Twig_Token $token) + { + return $token->test('endfor'); + } + + // the loop variable cannot be used in the condition + protected function checkLoopUsageCondition(Twig_TokenStream $stream, Twig_NodeInterface $node) + { + if ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name && 'loop' == $node->getNode('node')->getAttribute('name')) { + throw new Twig_Error_Syntax('The "loop" variable cannot be used in a looping condition.', $node->getTemplateLine(), $stream->getSourceContext()); + } + + foreach ($node as $n) { + if (!$n) { + continue; + } + + $this->checkLoopUsageCondition($stream, $n); + } + } + + // check usage of non-defined loop-items + // it does not catch all problems (for instance when a for is included into another or when the variable is used in an include) + protected function checkLoopUsageBody(Twig_TokenStream $stream, Twig_NodeInterface $node) + { + if ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name && 'loop' == $node->getNode('node')->getAttribute('name')) { + $attribute = $node->getNode('attribute'); + if ($attribute instanceof Twig_Node_Expression_Constant && in_array($attribute->getAttribute('value'), array('length', 'revindex0', 'revindex', 'last'))) { + throw new Twig_Error_Syntax(sprintf('The "loop.%s" variable is not defined when looping with a condition.', $attribute->getAttribute('value')), $node->getTemplateLine(), $stream->getSourceContext()); + } + } + + // should check for parent.loop.XXX usage + if ($node instanceof Twig_Node_For) { + return; + } + + foreach ($node as $n) { + if (!$n) { + continue; + } + + $this->checkLoopUsageBody($stream, $n); + } + } + + public function getTag() + { + return 'for'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/From.php b/vendor/twig/twig/lib/Twig/TokenParser/From.php new file mode 100644 index 0000000000000000000000000000000000000000..69c09c2f2f6fd590b2beddc4a133a5dba69aa35e --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/From.php @@ -0,0 +1,64 @@ + + * {% from 'forms.html' import forms %} + * + * + * @final + */ +class Twig_TokenParser_From extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $macro = $this->parser->getExpressionParser()->parseExpression(); + $stream = $this->parser->getStream(); + $stream->expect('import'); + + $targets = array(); + do { + $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue(); + + $alias = $name; + if ($stream->nextIf('as')) { + $alias = $stream->expect(Twig_Token::NAME_TYPE)->getValue(); + } + + $targets[$name] = $alias; + + if (!$stream->nextIf(Twig_Token::PUNCTUATION_TYPE, ',')) { + break; + } + } while (true); + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + $node = new Twig_Node_Import($macro, new Twig_Node_Expression_AssignName($this->parser->getVarName(), $token->getLine()), $token->getLine(), $this->getTag()); + + foreach ($targets as $name => $alias) { + if ($this->parser->isReservedMacroName($name)) { + throw new Twig_Error_Syntax(sprintf('"%s" cannot be an imported macro as it is a reserved keyword.', $name), $token->getLine(), $stream->getSourceContext()); + } + + $this->parser->addImportedSymbol('function', $alias, 'get'.$name, $node->getNode('var')); + } + + return $node; + } + + public function getTag() + { + return 'from'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/If.php b/vendor/twig/twig/lib/Twig/TokenParser/If.php new file mode 100644 index 0000000000000000000000000000000000000000..05459408f0e4d11c9c909c30bcd504a7ea42427f --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/If.php @@ -0,0 +1,84 @@ + + * {% if users %} + *
      + * {% for user in users %} + *
    • {{ user.username|e }}
    • + * {% endfor %} + *
    + * {% endif %} + * + * + * @final + */ +class Twig_TokenParser_If extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $lineno = $token->getLine(); + $expr = $this->parser->getExpressionParser()->parseExpression(); + $stream = $this->parser->getStream(); + $stream->expect(Twig_Token::BLOCK_END_TYPE); + $body = $this->parser->subparse(array($this, 'decideIfFork')); + $tests = array($expr, $body); + $else = null; + + $end = false; + while (!$end) { + switch ($stream->next()->getValue()) { + case 'else': + $stream->expect(Twig_Token::BLOCK_END_TYPE); + $else = $this->parser->subparse(array($this, 'decideIfEnd')); + break; + + case 'elseif': + $expr = $this->parser->getExpressionParser()->parseExpression(); + $stream->expect(Twig_Token::BLOCK_END_TYPE); + $body = $this->parser->subparse(array($this, 'decideIfFork')); + $tests[] = $expr; + $tests[] = $body; + break; + + case 'endif': + $end = true; + break; + + default: + throw new Twig_Error_Syntax(sprintf('Unexpected end of template. Twig was looking for the following tags "else", "elseif", or "endif" to close the "if" block started at line %d).', $lineno), $stream->getCurrent()->getLine(), $stream->getSourceContext()); + } + } + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + return new Twig_Node_If(new Twig_Node($tests), $else, $lineno, $this->getTag()); + } + + public function decideIfFork(Twig_Token $token) + { + return $token->test(array('elseif', 'else', 'endif')); + } + + public function decideIfEnd(Twig_Token $token) + { + return $token->test(array('endif')); + } + + public function getTag() + { + return 'if'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Import.php b/vendor/twig/twig/lib/Twig/TokenParser/Import.php new file mode 100644 index 0000000000000000000000000000000000000000..fa5ebae2c11c34cb3081d85d8e3d4c632791a339 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Import.php @@ -0,0 +1,39 @@ + + * {% import 'forms.html' as forms %} + * + * + * @final + */ +class Twig_TokenParser_Import extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $macro = $this->parser->getExpressionParser()->parseExpression(); + $this->parser->getStream()->expect('as'); + $var = new Twig_Node_Expression_AssignName($this->parser->getStream()->expect(Twig_Token::NAME_TYPE)->getValue(), $token->getLine()); + $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); + + $this->parser->addImportedSymbol('template', $var->getAttribute('name')); + + return new Twig_Node_Import($macro, $var, $token->getLine(), $this->getTag()); + } + + public function getTag() + { + return 'import'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Include.php b/vendor/twig/twig/lib/Twig/TokenParser/Include.php new file mode 100644 index 0000000000000000000000000000000000000000..b3ac1bc7cbc90021cf919a5ed3b5d34dae8128a4 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Include.php @@ -0,0 +1,65 @@ + + * {% include 'header.html' %} + * Body + * {% include 'footer.html' %} + * + * + * @final + */ +class Twig_TokenParser_Include extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $expr = $this->parser->getExpressionParser()->parseExpression(); + + list($variables, $only, $ignoreMissing) = $this->parseArguments(); + + return new Twig_Node_Include($expr, $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag()); + } + + protected function parseArguments() + { + $stream = $this->parser->getStream(); + + $ignoreMissing = false; + if ($stream->nextIf(Twig_Token::NAME_TYPE, 'ignore')) { + $stream->expect(Twig_Token::NAME_TYPE, 'missing'); + + $ignoreMissing = true; + } + + $variables = null; + if ($stream->nextIf(Twig_Token::NAME_TYPE, 'with')) { + $variables = $this->parser->getExpressionParser()->parseExpression(); + } + + $only = false; + if ($stream->nextIf(Twig_Token::NAME_TYPE, 'only')) { + $only = true; + } + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + return array($variables, $only, $ignoreMissing); + } + + public function getTag() + { + return 'include'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Macro.php b/vendor/twig/twig/lib/Twig/TokenParser/Macro.php new file mode 100644 index 0000000000000000000000000000000000000000..b845c90954a2689e6318baf3b232efdcfcd47afa --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Macro.php @@ -0,0 +1,58 @@ + + * {% macro input(name, value, type, size) %} + * + * {% endmacro %} + * + * + * @final + */ +class Twig_TokenParser_Macro extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $lineno = $token->getLine(); + $stream = $this->parser->getStream(); + $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue(); + + $arguments = $this->parser->getExpressionParser()->parseArguments(true, true); + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + $this->parser->pushLocalScope(); + $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + if ($token = $stream->nextIf(Twig_Token::NAME_TYPE)) { + $value = $token->getValue(); + + if ($value != $name) { + throw new Twig_Error_Syntax(sprintf('Expected endmacro for macro "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getSourceContext()); + } + } + $this->parser->popLocalScope(); + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + $this->parser->setMacro($name, new Twig_Node_Macro($name, new Twig_Node_Body(array($body)), $arguments, $lineno, $this->getTag())); + } + + public function decideBlockEnd(Twig_Token $token) + { + return $token->test('endmacro'); + } + + public function getTag() + { + return 'macro'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php b/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php new file mode 100644 index 0000000000000000000000000000000000000000..0b08fe61adfc164aed6bbd880fa7419ccc28f50a --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php @@ -0,0 +1,59 @@ + + * {% sandbox %} + * {% include 'user.html' %} + * {% endsandbox %} + * + * + * @see http://www.twig-project.org/doc/api.html#sandbox-extension for details + * + * @final + */ +class Twig_TokenParser_Sandbox extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $stream = $this->parser->getStream(); + $stream->expect(Twig_Token::BLOCK_END_TYPE); + $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + // in a sandbox tag, only include tags are allowed + if (!$body instanceof Twig_Node_Include) { + foreach ($body as $node) { + if ($node instanceof Twig_Node_Text && ctype_space($node->getAttribute('data'))) { + continue; + } + + if (!$node instanceof Twig_Node_Include) { + throw new Twig_Error_Syntax('Only "include" tags are allowed within a "sandbox" section.', $node->getTemplateLine(), $stream->getSourceContext()); + } + } + } + + return new Twig_Node_Sandbox($body, $token->getLine(), $this->getTag()); + } + + public function decideBlockEnd(Twig_Token $token) + { + return $token->test('endsandbox'); + } + + public function getTag() + { + return 'sandbox'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Set.php b/vendor/twig/twig/lib/Twig/TokenParser/Set.php new file mode 100644 index 0000000000000000000000000000000000000000..d03a36b017ff0157843b6d91bc6c1f3a923bec0d --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Set.php @@ -0,0 +1,73 @@ + + * {% set foo = 'foo' %} + * + * {% set foo = [1, 2] %} + * + * {% set foo = {'foo': 'bar'} %} + * + * {% set foo = 'foo' ~ 'bar' %} + * + * {% set foo, bar = 'foo', 'bar' %} + * + * {% set foo %}Some content{% endset %} + * + * + * @final + */ +class Twig_TokenParser_Set extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $lineno = $token->getLine(); + $stream = $this->parser->getStream(); + $names = $this->parser->getExpressionParser()->parseAssignmentExpression(); + + $capture = false; + if ($stream->nextIf(Twig_Token::OPERATOR_TYPE, '=')) { + $values = $this->parser->getExpressionParser()->parseMultitargetExpression(); + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + if (count($names) !== count($values)) { + throw new Twig_Error_Syntax('When using set, you must have the same number of variables and assignments.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); + } + } else { + $capture = true; + + if (count($names) > 1) { + throw new Twig_Error_Syntax('When using set with a block, you cannot have a multi-target.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); + } + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + $values = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $stream->expect(Twig_Token::BLOCK_END_TYPE); + } + + return new Twig_Node_Set($capture, $names, $values, $lineno, $this->getTag()); + } + + public function decideBlockEnd(Twig_Token $token) + { + return $token->test('endset'); + } + + public function getTag() + { + return 'set'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php b/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php new file mode 100644 index 0000000000000000000000000000000000000000..e8b2638e2c6e926520827214b318a95dd611af05 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php @@ -0,0 +1,49 @@ + + * {% spaceless %} + *
    + * foo + *
    + * {% endspaceless %} + * + * {# output will be
    foo
    #} + * + * + * @final + */ +class Twig_TokenParser_Spaceless extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $lineno = $token->getLine(); + + $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); + $body = $this->parser->subparse(array($this, 'decideSpacelessEnd'), true); + $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); + + return new Twig_Node_Spaceless($body, $lineno, $this->getTag()); + } + + public function decideSpacelessEnd(Twig_Token $token) + { + return $token->test('endspaceless'); + } + + public function getTag() + { + return 'spaceless'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Use.php b/vendor/twig/twig/lib/Twig/TokenParser/Use.php new file mode 100644 index 0000000000000000000000000000000000000000..c3fb069740b2ae3644ae9d517e7f6583ee8febe0 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Use.php @@ -0,0 +1,66 @@ + + * {% extends "base.html" %} + * + * {% use "blocks.html" %} + * + * {% block title %}{% endblock %} + * {% block content %}{% endblock %} + * + * + * @see http://www.twig-project.org/doc/templates.html#horizontal-reuse for details. + * + * @final + */ +class Twig_TokenParser_Use extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $template = $this->parser->getExpressionParser()->parseExpression(); + $stream = $this->parser->getStream(); + + if (!$template instanceof Twig_Node_Expression_Constant) { + throw new Twig_Error_Syntax('The template references in a "use" statement must be a string.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); + } + + $targets = array(); + if ($stream->nextIf('with')) { + do { + $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue(); + + $alias = $name; + if ($stream->nextIf('as')) { + $alias = $stream->expect(Twig_Token::NAME_TYPE)->getValue(); + } + + $targets[$name] = new Twig_Node_Expression_Constant($alias, -1); + + if (!$stream->nextIf(Twig_Token::PUNCTUATION_TYPE, ',')) { + break; + } + } while (true); + } + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + $this->parser->addTrait(new Twig_Node(array('template' => $template, 'targets' => new Twig_Node($targets)))); + } + + public function getTag() + { + return 'use'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParser/With.php b/vendor/twig/twig/lib/Twig/TokenParser/With.php new file mode 100644 index 0000000000000000000000000000000000000000..8d078d9721ac095426583deedd276c83ce597ac5 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/With.php @@ -0,0 +1,50 @@ + + * + * @final + */ +class Twig_TokenParser_With extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $stream = $this->parser->getStream(); + + $variables = null; + $only = false; + if (!$stream->test(Twig_Token::BLOCK_END_TYPE)) { + $variables = $this->parser->getExpressionParser()->parseExpression(); + $only = $stream->nextIf(Twig_Token::NAME_TYPE, 'only'); + } + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + $body = $this->parser->subparse(array($this, 'decideWithEnd'), true); + + $stream->expect(Twig_Token::BLOCK_END_TYPE); + + return new Twig_Node_With($body, $variables, $only, $token->getLine(), $this->getTag()); + } + + public function decideWithEnd(Twig_Token $token) + { + return $token->test('endwith'); + } + + public function getTag() + { + return 'with'; + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParserBroker.php b/vendor/twig/twig/lib/Twig/TokenParserBroker.php new file mode 100644 index 0000000000000000000000000000000000000000..a64013508ecf7d801ec479629c9d5d203b766b8b --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParserBroker.php @@ -0,0 +1,120 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +class Twig_TokenParserBroker implements Twig_TokenParserBrokerInterface +{ + protected $parser; + protected $parsers = array(); + protected $brokers = array(); + + /** + * @param array|Traversable $parsers A Traversable of Twig_TokenParserInterface instances + * @param array|Traversable $brokers A Traversable of Twig_TokenParserBrokerInterface instances + * @param bool $triggerDeprecationError + */ + public function __construct($parsers = array(), $brokers = array(), $triggerDeprecationError = true) + { + if ($triggerDeprecationError) { + @trigger_error('The '.__CLASS__.' class is deprecated since version 1.12 and will be removed in 2.0.', E_USER_DEPRECATED); + } + + foreach ($parsers as $parser) { + if (!$parser instanceof Twig_TokenParserInterface) { + throw new LogicException('$parsers must a an array of Twig_TokenParserInterface.'); + } + $this->parsers[$parser->getTag()] = $parser; + } + foreach ($brokers as $broker) { + if (!$broker instanceof Twig_TokenParserBrokerInterface) { + throw new LogicException('$brokers must a an array of Twig_TokenParserBrokerInterface.'); + } + $this->brokers[] = $broker; + } + } + + public function addTokenParser(Twig_TokenParserInterface $parser) + { + $this->parsers[$parser->getTag()] = $parser; + } + + public function removeTokenParser(Twig_TokenParserInterface $parser) + { + $name = $parser->getTag(); + if (isset($this->parsers[$name]) && $parser === $this->parsers[$name]) { + unset($this->parsers[$name]); + } + } + + public function addTokenParserBroker(Twig_TokenParserBroker $broker) + { + $this->brokers[] = $broker; + } + + public function removeTokenParserBroker(Twig_TokenParserBroker $broker) + { + if (false !== $pos = array_search($broker, $this->brokers)) { + unset($this->brokers[$pos]); + } + } + + /** + * Gets a suitable TokenParser for a tag. + * + * First looks in parsers, then in brokers. + * + * @param string $tag A tag name + * + * @return null|Twig_TokenParserInterface A Twig_TokenParserInterface or null if no suitable TokenParser was found + */ + public function getTokenParser($tag) + { + if (isset($this->parsers[$tag])) { + return $this->parsers[$tag]; + } + $broker = end($this->brokers); + while (false !== $broker) { + $parser = $broker->getTokenParser($tag); + if (null !== $parser) { + return $parser; + } + $broker = prev($this->brokers); + } + } + + public function getParsers() + { + return $this->parsers; + } + + public function getParser() + { + return $this->parser; + } + + public function setParser(Twig_ParserInterface $parser) + { + $this->parser = $parser; + foreach ($this->parsers as $tokenParser) { + $tokenParser->setParser($parser); + } + foreach ($this->brokers as $broker) { + $broker->setParser($parser); + } + } +} diff --git a/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php b/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..6c93f5ea19afc157bd6a24cfe2abff3962ca1495 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php @@ -0,0 +1,44 @@ + + * + * @deprecated since 1.12 (to be removed in 2.0) + */ +interface Twig_TokenParserBrokerInterface +{ + /** + * Gets a TokenParser suitable for a tag. + * + * @param string $tag A tag name + * + * @return Twig_TokenParserInterface|null A Twig_TokenParserInterface or null if no suitable TokenParser was found + */ + public function getTokenParser($tag); + + /** + * Calls Twig_TokenParserInterface::setParser on all parsers the implementation knows of. + */ + public function setParser(Twig_ParserInterface $parser); + + /** + * Gets the Twig_ParserInterface. + * + * @return null|Twig_ParserInterface A Twig_ParserInterface instance or null + */ + public function getParser(); +} diff --git a/vendor/twig/twig/lib/Twig/TokenParserInterface.php b/vendor/twig/twig/lib/Twig/TokenParserInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..aea969961668137dff0bb11650239c569674a152 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParserInterface.php @@ -0,0 +1,39 @@ + + */ +interface Twig_TokenParserInterface +{ + /** + * Sets the parser associated with this token parser. + */ + public function setParser(Twig_Parser $parser); + + /** + * Parses a token and returns a node. + * + * @return Twig_NodeInterface + * + * @throws Twig_Error_Syntax + */ + public function parse(Twig_Token $token); + + /** + * Gets the tag name associated with this token parser. + * + * @return string The tag name + */ + public function getTag(); +} diff --git a/vendor/twig/twig/lib/Twig/TokenStream.php b/vendor/twig/twig/lib/Twig/TokenStream.php new file mode 100644 index 0000000000000000000000000000000000000000..27ca1a74e41bfd75372d1781e8d668784a3cab0b --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenStream.php @@ -0,0 +1,194 @@ + + */ +class Twig_TokenStream +{ + protected $tokens; + protected $current = 0; + protected $filename; + + private $source; + + /** + * @param array $tokens An array of tokens + * @param string|null $name The name of the template which tokens are associated with + * @param string|null $source The source code associated with the tokens + */ + public function __construct(array $tokens, $name = null, $source = null) + { + if (!$name instanceof Twig_Source) { + if (null !== $name || null !== $source) { + @trigger_error(sprintf('Passing a string as the $name argument of %s() is deprecated since version 1.27. Pass a Twig_Source instance instead.', __METHOD__), E_USER_DEPRECATED); + } + $this->source = new Twig_Source($source, $name); + } else { + $this->source = $name; + } + + $this->tokens = $tokens; + + // deprecated, not used anymore, to be removed in 2.0 + $this->filename = $this->source->getName(); + } + + public function __toString() + { + return implode("\n", $this->tokens); + } + + public function injectTokens(array $tokens) + { + $this->tokens = array_merge(array_slice($this->tokens, 0, $this->current), $tokens, array_slice($this->tokens, $this->current)); + } + + /** + * Sets the pointer to the next token and returns the old one. + * + * @return Twig_Token + */ + public function next() + { + if (!isset($this->tokens[++$this->current])) { + throw new Twig_Error_Syntax('Unexpected end of template.', $this->tokens[$this->current - 1]->getLine(), $this->source); + } + + return $this->tokens[$this->current - 1]; + } + + /** + * Tests a token, sets the pointer to the next one and returns it or throws a syntax error. + * + * @return Twig_Token|null The next token if the condition is true, null otherwise + */ + public function nextIf($primary, $secondary = null) + { + if ($this->tokens[$this->current]->test($primary, $secondary)) { + return $this->next(); + } + } + + /** + * Tests a token and returns it or throws a syntax error. + * + * @return Twig_Token + */ + public function expect($type, $value = null, $message = null) + { + $token = $this->tokens[$this->current]; + if (!$token->test($type, $value)) { + $line = $token->getLine(); + throw new Twig_Error_Syntax(sprintf('%sUnexpected token "%s" of value "%s" ("%s" expected%s).', + $message ? $message.'. ' : '', + Twig_Token::typeToEnglish($token->getType()), $token->getValue(), + Twig_Token::typeToEnglish($type), $value ? sprintf(' with value "%s"', $value) : ''), + $line, + $this->source + ); + } + $this->next(); + + return $token; + } + + /** + * Looks at the next token. + * + * @param int $number + * + * @return Twig_Token + */ + public function look($number = 1) + { + if (!isset($this->tokens[$this->current + $number])) { + throw new Twig_Error_Syntax('Unexpected end of template.', $this->tokens[$this->current + $number - 1]->getLine(), $this->source); + } + + return $this->tokens[$this->current + $number]; + } + + /** + * Tests the current token. + * + * @return bool + */ + public function test($primary, $secondary = null) + { + return $this->tokens[$this->current]->test($primary, $secondary); + } + + /** + * Checks if end of stream was reached. + * + * @return bool + */ + public function isEOF() + { + return $this->tokens[$this->current]->getType() === Twig_Token::EOF_TYPE; + } + + /** + * @return Twig_Token + */ + public function getCurrent() + { + return $this->tokens[$this->current]; + } + + /** + * Gets the name associated with this stream (null if not defined). + * + * @return string|null + * + * @deprecated since 1.27 (to be removed in 2.0) + */ + public function getFilename() + { + @trigger_error(sprintf('The %s() method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', __METHOD__), E_USER_DEPRECATED); + + return $this->source->getName(); + } + + /** + * Gets the source code associated with this stream. + * + * @return string + * + * @internal Don't use this as it might be empty depending on the environment configuration + * + * @deprecated since 1.27 (to be removed in 2.0) + */ + public function getSource() + { + @trigger_error(sprintf('The %s() method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', __METHOD__), E_USER_DEPRECATED); + + return $this->source->getCode(); + } + + /** + * Gets the source associated with this stream. + * + * @return Twig_Source + * + * @internal + */ + public function getSourceContext() + { + return $this->source; + } +} diff --git a/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php b/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php new file mode 100644 index 0000000000000000000000000000000000000000..884cf055fdef311afea91117d2de80d14c5c6dd8 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php @@ -0,0 +1,84 @@ + + * + * @final + */ +class Twig_Util_DeprecationCollector +{ + private $twig; + private $deprecations; + + public function __construct(Twig_Environment $twig) + { + $this->twig = $twig; + } + + /** + * Returns deprecations for templates contained in a directory. + * + * @param string $dir A directory where templates are stored + * @param string $ext Limit the loaded templates by extension + * + * @return array An array of deprecations + */ + public function collectDir($dir, $ext = '.twig') + { + $iterator = new RegexIterator( + new RecursiveIteratorIterator( + new RecursiveDirectoryIterator($dir), RecursiveIteratorIterator::LEAVES_ONLY + ), '{'.preg_quote($ext).'$}' + ); + + return $this->collect(new Twig_Util_TemplateDirIterator($iterator)); + } + + /** + * Returns deprecations for passed templates. + * + * @param Traversable $iterator An iterator of templates (where keys are template names and values the contents of the template) + * + * @return array An array of deprecations + */ + public function collect(Traversable $iterator) + { + $this->deprecations = array(); + + set_error_handler(array($this, 'errorHandler')); + + foreach ($iterator as $name => $contents) { + try { + $this->twig->parse($this->twig->tokenize(new Twig_Source($contents, $name))); + } catch (Twig_Error_Syntax $e) { + // ignore templates containing syntax errors + } + } + + restore_error_handler(); + + $deprecations = $this->deprecations; + $this->deprecations = array(); + + return $deprecations; + } + + /** + * @internal + */ + public function errorHandler($type, $msg) + { + if (E_USER_DEPRECATED === $type) { + $this->deprecations[] = $msg; + } + } +} diff --git a/vendor/twig/twig/lib/Twig/Util/TemplateDirIterator.php b/vendor/twig/twig/lib/Twig/Util/TemplateDirIterator.php new file mode 100644 index 0000000000000000000000000000000000000000..3fb8932780df68cfca80c2d3de7a67714e441916 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Util/TemplateDirIterator.php @@ -0,0 +1,26 @@ + + */ +class Twig_Util_TemplateDirIterator extends IteratorIterator +{ + public function current() + { + return file_get_contents(parent::current()); + } + + public function key() + { + return (string) parent::key(); + } +} diff --git a/projet_hello/web/.htaccess b/web/.htaccess similarity index 100% rename from projet_hello/web/.htaccess rename to web/.htaccess diff --git a/projet_hello/web/app.php b/web/app.php similarity index 100% rename from projet_hello/web/app.php rename to web/app.php diff --git a/projet_hello/web/app_dev.php b/web/app_dev.php similarity index 100% rename from projet_hello/web/app_dev.php rename to web/app_dev.php diff --git a/projet_hello/web/apple-touch-icon.png b/web/apple-touch-icon.png similarity index 100% rename from projet_hello/web/apple-touch-icon.png rename to web/apple-touch-icon.png diff --git a/projet_hello/web/config.php b/web/config.php similarity index 100% rename from projet_hello/web/config.php rename to web/config.php diff --git a/projet_hello/web/favicon.ico b/web/favicon.ico similarity index 100% rename from projet_hello/web/favicon.ico rename to web/favicon.ico diff --git a/projet_hello/web/robots.txt b/web/robots.txt similarity index 100% rename from projet_hello/web/robots.txt rename to web/robots.txt